[SCM] image display tool for astronomy branch, upstream, updated. 33810b4428f5c39970b58b0d829484373697f574

Ole Streicher debian at liska.ath.cx
Wed Jan 25 10:11:24 UTC 2012


The following commit has been merged in the upstream branch:
commit 33810b4428f5c39970b58b0d829484373697f574
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Jan 25 11:10:37 2012 +0100

    Remove more packages:
    blt3.0, tkimg1.3: Already in Debian

diff --git a/blt3.0/INSTALL b/blt3.0/INSTALL
deleted file mode 100644
index fb209d5..0000000
--- a/blt3.0/INSTALL
+++ /dev/null
@@ -1,115 +0,0 @@
-This file describes how to compile and install the BLT library for UNIX.
-[See the file ./win/README for details on how to build under Win32.]
-
-1. Uncompress and untar the distribution file.  
-
-	zcat BLT3.0.tar.gz | tar -xvf - 
-
-   This will create a directory "blt3.0" with the following subdirectories:
-
-     		   blt3.0
-      	______________|_____________________________
-     	|       |       |      |      |    | 	   |
-      demos  examples  html library  man  src	  win
-        |		      	           |       |
-     scripts			         shared   X11
-
-2. Run ./configure
-
-   Go into the "blt3.0" directory 
-
-        cd blt3.0
-
-   and run the auto-configuration script "./configure".  Tell where to find 
-   the Tcl and Tk header files and libraries with the "--with-tcl" switch.
-
-        ./configure --with-tcl=/util/lang/tcl
-
-       Switches:
-
-       --prefix=path	Specifies the path where "bltwish", the BLT
-     			header files, libraries, scripts, and manual
-     			pages are installed. The default is 
-			"/usr/local/blt".  
-
-                        This switch also indicates where to find the 
-			Tcl/Tk header files and libraries. You can use 
-			the --with-tcl and --with-tk switches to override 
-			this value if the location of the Tcl/Tk files 
-			is different.
-
-       --with-tcl=dir	Directory where Tcl and/or Tk is installed.
-
-       --with-tk=dir	Directory where Tk is installed	if different 
-			from "--with-tcl".
-
-       --with-cc=program  Lets you specify the C compiler, such as 
-     			  "acc" or "gcc". 
-
-  The configure script creates a header file "src/bltConfig.h". It will also 
-  generate new Makefiles from their respective templates (Makefile.in).
-
-        Makefile.in 	        ==> Makefile
-        src/Makefile.in	        ==> src/Makefile
-        src/shared/Makefile.in	==> src/shared/Makefile
-        man/Makefile.in		==> man/Makefile
-        library/Makefile.in	==> library/Makefile
-
-3. Compile the libraries and build the demonstration program "bltwish".
-
-        make 
-
-   The program "bltwish" will be created in the ./src directory.
-
-4. Test by running the demos. 
-
-   Go into the demos directory 
-
-        cd demos
-
-   and run the test scripts.  
-
-        ./graph1.tcl
-
-   If your system doesn't support "#!" in shell scripts, then it's
-
-        ../src/bltwish ./graph1.tcl
-
-
-5. Installing BLT
-
-       make install
-
-   The following directories will be created when BLT is installed.  
-   By default, the top directory is /usr/local/blt.  
-                  
-           ___________|__________
-           |     |        |     |
-          bin  include   lib   man
-                          |
-                        blt3.0   
-                      ____|____
-                      |       |
-                    demos   dd_protocols
-
-   You can change the top directory by supplying the "--prefix=dir" switch 
-   to ./configure.
-
-*6. (Optional) Compiling BLT into your own custom "wish".
-
-   [If your version of "wish" supports dynamic loading of packages
-   you can simply add
-
-         package require BLT 
-
-   to the start of your script.]
-
-   Add the following lines to your program's Tcl_AppInit routine in
-   tkAppInit.c
-
-        if (Blt_Init(interp) != TCL_OK) {
-            return TCL_ERROR;
-        }
-
-   then link with libBLT.a.  And that's all there's to it.
-     
diff --git a/blt3.0/MANIFEST b/blt3.0/MANIFEST
deleted file mode 100644
index 04087eb..0000000
--- a/blt3.0/MANIFEST
+++ /dev/null
@@ -1,394 +0,0 @@
-blt2.4z
-blt2.4z/MANIFEST
-blt2.4z/INSTALL
-blt2.4z/cf
-blt2.4z/cf/config.guess
-blt2.4z/cf/config.sub
-blt2.4z/cf/install-sh
-blt2.4z/cf/install.sh
-blt2.4z/cf/ldAix
-blt2.4z/html
-blt2.4z/html/BLT.html
-blt2.4z/html/Makefile.vc
-blt2.4z/html/barchart.html
-blt2.4z/html/beep.html
-blt2.4z/html/bgexec.html
-blt2.4z/html/bitmap.html
-blt2.4z/html/bltdebug.html
-blt2.4z/html/busy.html
-blt2.4z/html/container.html
-blt2.4z/html/cutbuffer.html
-blt2.4z/html/dragdrop.html
-blt2.4z/html/eps.html
-blt2.4z/html/graph.html
-blt2.4z/html/hierbox.html
-blt2.4z/html/hiertable.html
-blt2.4z/html/htext.html
-blt2.4z/html/spline.html
-blt2.4z/html/stripchart.html
-blt2.4z/html/table.html
-blt2.4z/html/tabset.html
-blt2.4z/html/tile.html
-blt2.4z/html/tree.html
-blt2.4z/html/treeview.html
-blt2.4z/html/vector.html
-blt2.4z/html/watch.html
-blt2.4z/html/winop.html
-blt2.4z/Makefile.in
-blt2.4z/Makefile.vc
-blt2.4z/NEWS
-blt2.4z/PROBLEMS
-blt2.4z/README
-blt2.4z/acconfig.h
-blt2.4z/aclocal.m4
-blt2.4z/blt.mak
-blt2.4z/configure
-blt2.4z/configure.in
-blt2.4z/demos
-blt2.4z/demos/bitmaps
-blt2.4z/demos/bitmaps/fish
-blt2.4z/demos/bitmaps/fish/left.xbm
-blt2.4z/demos/bitmaps/fish/left1.xbm
-blt2.4z/demos/bitmaps/fish/left1m.xbm
-blt2.4z/demos/bitmaps/fish/leftm.xbm
-blt2.4z/demos/bitmaps/fish/mid.xbm
-blt2.4z/demos/bitmaps/fish/midm.xbm
-blt2.4z/demos/bitmaps/fish/right.xbm
-blt2.4z/demos/bitmaps/fish/right1.xbm
-blt2.4z/demos/bitmaps/fish/right1m.xbm
-blt2.4z/demos/bitmaps/fish/rightm.xbm
-blt2.4z/demos/bitmaps/hand
-blt2.4z/demos/bitmaps/hand/hand01.xbm
-blt2.4z/demos/bitmaps/hand/hand01m.xbm
-blt2.4z/demos/bitmaps/hand/hand02.xbm
-blt2.4z/demos/bitmaps/hand/hand02m.xbm
-blt2.4z/demos/bitmaps/hand/hand03.xbm
-blt2.4z/demos/bitmaps/hand/hand03m.xbm
-blt2.4z/demos/bitmaps/hand/hand04.xbm
-blt2.4z/demos/bitmaps/hand/hand04m.xbm
-blt2.4z/demos/bitmaps/hand/hand05.xbm
-blt2.4z/demos/bitmaps/hand/hand05m.xbm
-blt2.4z/demos/bitmaps/hand/hand06.xbm
-blt2.4z/demos/bitmaps/hand/hand06m.xbm
-blt2.4z/demos/bitmaps/hand/hand07.xbm
-blt2.4z/demos/bitmaps/hand/hand07m.xbm
-blt2.4z/demos/bitmaps/hand/hand08.xbm
-blt2.4z/demos/bitmaps/hand/hand08m.xbm
-blt2.4z/demos/bitmaps/hand/hand09.xbm
-blt2.4z/demos/bitmaps/hand/hand09m.xbm
-blt2.4z/demos/bitmaps/hand/hand10.xbm
-blt2.4z/demos/bitmaps/hand/hand10m.xbm
-blt2.4z/demos/bitmaps/hand/hand11.xbm
-blt2.4z/demos/bitmaps/hand/hand11m.xbm
-blt2.4z/demos/bitmaps/hand/hand12.xbm
-blt2.4z/demos/bitmaps/hand/hand12m.xbm
-blt2.4z/demos/bitmaps/hand/hand13.xbm
-blt2.4z/demos/bitmaps/hand/hand13m.xbm
-blt2.4z/demos/bitmaps/hand/hand14.xbm
-blt2.4z/demos/bitmaps/hand/hand14m.xbm
-blt2.4z/demos/bitmaps/face.xbm
-blt2.4z/demos/bitmaps/greenback.xbm
-blt2.4z/demos/bitmaps/hobbes.xbm
-blt2.4z/demos/bitmaps/hobbes_mask.xbm
-blt2.4z/demos/bitmaps/sharky.xbm
-blt2.4z/demos/bitmaps/xbob.xbm
-blt2.4z/demos/Makefile.in
-blt2.4z/demos/Makefile.vc
-blt2.4z/demos/barchart1.tcl
-blt2.4z/demos/barchart2.tcl
-blt2.4z/demos/barchart3.tcl
-blt2.4z/demos/barchart4.tcl
-blt2.4z/demos/barchart5.tcl
-blt2.4z/demos/bgexec1.tcl
-blt2.4z/demos/bgexec2.tcl
-blt2.4z/demos/bgexec3.tcl
-blt2.4z/demos/bgexec4.tcl
-blt2.4z/demos/bgexec5.tcl
-blt2.4z/demos/bitmap.tcl
-blt2.4z/demos/bitmap2.tcl
-blt2.4z/demos/busy1.tcl
-blt2.4z/demos/busy2.tcl
-blt2.4z/demos/container.tcl
-blt2.4z/demos/container3.tcl
-blt2.4z/demos/dnd1.tcl
-blt2.4z/demos/dnd2.tcl
-blt2.4z/demos/dragdrop1.tcl
-blt2.4z/demos/dragdrop2.tcl
-blt2.4z/demos/eps.tcl
-blt2.4z/demos/graph1.tcl
-blt2.4z/demos/graph2.tcl
-blt2.4z/demos/graph3.tcl
-blt2.4z/demos/graph4.tcl
-blt2.4z/demos/graph5.tcl
-blt2.4z/demos/graph6.tcl
-blt2.4z/demos/graph7.tcl
-blt2.4z/demos/hierbox1.tcl
-blt2.4z/demos/hierbox2.tcl
-blt2.4z/demos/hierbox3.tcl
-blt2.4z/demos/hierbox4.tcl
-blt2.4z/demos/hiertable1.tcl
-blt2.4z/demos/hiertable2.tcl
-blt2.4z/demos/hiertable3.tcl
-blt2.4z/demos/htext.txt
-blt2.4z/demos/htext1.tcl
-blt2.4z/demos/spline.tcl
-blt2.4z/demos/stripchart1.tcl
-blt2.4z/demos/tabnotebook1.tcl
-blt2.4z/demos/tabnotebook2.tcl
-blt2.4z/demos/tabnotebook3.tcl
-blt2.4z/demos/tabset1.tcl
-blt2.4z/demos/tabset2.tcl
-blt2.4z/demos/tabset3.tcl
-blt2.4z/demos/tabset4.tcl
-blt2.4z/demos/tour.tcl
-blt2.4z/demos/treeview1.tcl
-blt2.4z/demos/winop1.tcl
-blt2.4z/demos/winop2.tcl
-blt2.4z/demos/images
-blt2.4z/demos/images/blt98.gif
-blt2.4z/demos/images/buckskin.gif
-blt2.4z/demos/images/chalk.gif
-blt2.4z/demos/images/close.gif
-blt2.4z/demos/images/close2.gif
-blt2.4z/demos/images/clouds.gif
-blt2.4z/demos/images/corrugated_metal.gif
-blt2.4z/demos/images/folder.gif
-blt2.4z/demos/images/jan25_palm3x_L.jpg
-blt2.4z/demos/images/mini-book1.gif
-blt2.4z/demos/images/mini-book2.gif
-blt2.4z/demos/images/mini-display.gif
-blt2.4z/demos/images/mini-doc.gif
-blt2.4z/demos/images/mini-filemgr.gif
-blt2.4z/demos/images/mini-ofolder.gif
-blt2.4z/demos/images/mini-windows.gif
-blt2.4z/demos/images/ofolder.gif
-blt2.4z/demos/images/open.gif
-blt2.4z/demos/images/open2.gif
-blt2.4z/demos/images/out.ps
-blt2.4z/demos/images/qv100.t.gif
-blt2.4z/demos/images/rain.gif
-blt2.4z/demos/images/sample.gif
-blt2.4z/demos/images/smblue_rock.gif
-blt2.4z/demos/images/stopsign.gif
-blt2.4z/demos/images/tan_paper.gif
-blt2.4z/demos/images/tan_paper2.gif
-blt2.4z/demos/images/txtrflag.gif
-blt2.4z/demos/scripts
-blt2.4z/demos/scripts/barchart2.tcl
-blt2.4z/demos/scripts/bgtest.tcl
-blt2.4z/demos/scripts/clone.tcl
-blt2.4z/demos/scripts/demo.tcl
-blt2.4z/demos/scripts/globe.tcl
-blt2.4z/demos/scripts/graph1.tcl
-blt2.4z/demos/scripts/graph2.tcl
-blt2.4z/demos/scripts/graph3.tcl
-blt2.4z/demos/scripts/graph5.tcl
-blt2.4z/demos/scripts/graph8.tcl
-blt2.4z/demos/scripts/page.tcl
-blt2.4z/demos/scripts/patterns.tcl
-blt2.4z/demos/scripts/ps.tcl
-blt2.4z/demos/scripts/send.tcl
-blt2.4z/demos/scripts/stipples.tcl
-blt2.4z/demos/scripts/xcolors.tcl
-blt2.4z/examples
-blt2.4z/examples/calendar.tcl
-blt2.4z/examples/form.tcl
-blt2.4z/examples/pareto.tcl
-blt2.4z/library
-blt2.4z/library/dd_protocols
-blt2.4z/library/dd_protocols/dd-color.tcl
-blt2.4z/library/dd_protocols/dd-file.tcl
-blt2.4z/library/dd_protocols/dd-number.tcl
-blt2.4z/library/dd_protocols/dd-text.tcl
-blt2.4z/library/dd_protocols/tclIndex
-blt2.4z/library/Makefile.in
-blt2.4z/library/Makefile.vc
-blt2.4z/library/ZoomStack.itcl
-blt2.4z/library/bltCanvEps.pro
-blt2.4z/library/bltGraph.pro
-blt2.4z/library/dnd.tcl
-blt2.4z/library/dragdrop.tcl
-blt2.4z/library/graph.tcl
-blt2.4z/library/hierbox.tcl
-blt2.4z/library/hiertable.tcl
-blt2.4z/library/pkgIndex.tcl.in
-blt2.4z/library/tabnotebook.tcl
-blt2.4z/library/tabset.tcl
-blt2.4z/library/tclIndex
-blt2.4z/library/treeview.cur
-blt2.4z/library/treeview.tcl
-blt2.4z/library/treeview.xbm
-blt2.4z/library/treeview_m.xbm
-blt2.4z/man
-blt2.4z/man/BLT.mann
-blt2.4z/man/Blt_Tree.man3
-blt2.4z/man/Blt_TreeCreate.man3
-blt2.4z/man/Blt_TreeCreateNode.man3
-blt2.4z/man/Blt_TreeDeleteNode.man3
-blt2.4z/man/Blt_TreeExists.man3
-blt2.4z/man/Blt_TreeGetNode.man3
-blt2.4z/man/Blt_TreeGetToken.man3
-blt2.4z/man/Blt_TreeName.man3
-blt2.4z/man/Blt_TreeNodeId.man3
-blt2.4z/man/Blt_TreeReleaseToken.man3
-blt2.4z/man/Makefile.in
-blt2.4z/man/barchart.mann
-blt2.4z/man/beep.mann
-blt2.4z/man/bgexec.mann
-blt2.4z/man/bitmap.mann
-blt2.4z/man/bltdebug.mann
-blt2.4z/man/busy.mann
-blt2.4z/man/container.mann
-blt2.4z/man/cutbuffer.mann
-blt2.4z/man/dragdrop.mann
-blt2.4z/man/eps.mann
-blt2.4z/man/graph.mann
-blt2.4z/man/hierbox.mann
-blt2.4z/man/hiertable.mann
-blt2.4z/man/htext.mann
-blt2.4z/man/man.macros
-blt2.4z/man/spline.mann
-blt2.4z/man/stripchart.mann
-blt2.4z/man/table.mann
-blt2.4z/man/tabset.mann
-blt2.4z/man/tile.mann
-blt2.4z/man/tree.mann
-blt2.4z/man/treeview.mann
-blt2.4z/man/vector.mann
-blt2.4z/man/watch.mann
-blt2.4z/man/winop.mann
-blt2.4z/src
-blt2.4z/src/shared
-blt2.4z/src/shared/Makefile.in
-blt2.4z/src/Makefile-cyg.in
-blt2.4z/src/Makefile.bc
-blt2.4z/src/Makefile.in
-blt2.4z/src/Makefile.vc
-blt2.4z/src/TODO
-blt2.4z/src/blt.h
-blt2.4z/src/blt.mak
-blt2.4z/src/bltAlloc.c
-blt2.4z/src/bltArrayObj.c
-blt2.4z/src/bltBeep.c
-blt2.4z/src/bltBgexec.c
-blt2.4z/src/bltBind.c
-blt2.4z/src/bltBind.h
-blt2.4z/src/bltBitmap.c
-blt2.4z/src/bltBusy.c
-blt2.4z/src/bltCanvEps.c
-blt2.4z/src/bltChain.c
-blt2.4z/src/bltChain.h
-blt2.4z/src/bltColor.c
-blt2.4z/src/bltConfig.c
-blt2.4z/src/bltConfig.h.in
-blt2.4z/src/bltContainer.c
-blt2.4z/src/bltCutbuffer.c
-blt2.4z/src/bltDebug.c
-blt2.4z/src/bltDragdrop.c
-blt2.4z/src/bltGrAxis.c
-blt2.4z/src/bltGrAxis.h
-blt2.4z/src/bltGrBar.c
-blt2.4z/src/bltGrElem.c
-blt2.4z/src/bltGrElem.h
-blt2.4z/src/bltGrGrid.c
-blt2.4z/src/bltGrHairs.c
-blt2.4z/src/bltGrLegd.c
-blt2.4z/src/bltGrLegd.h
-blt2.4z/src/bltGrLine.c
-blt2.4z/src/bltGrMarker.c
-blt2.4z/src/bltGrMisc.c
-blt2.4z/src/bltGrPen.c
-blt2.4z/src/bltGrPs.c
-blt2.4z/src/bltGraph.c
-blt2.4z/src/bltGraph.h
-blt2.4z/src/bltHash.c
-blt2.4z/src/bltHash.h.in
-blt2.4z/src/bltHierbox.c
-blt2.4z/src/bltHtext.c
-blt2.4z/src/bltImage.c
-blt2.4z/src/bltImage.h
-blt2.4z/src/bltInit.c
-blt2.4z/src/bltInt.h
-blt2.4z/src/bltInterp.h
-blt2.4z/src/bltList.c
-blt2.4z/src/bltList.h
-blt2.4z/src/bltMath.h
-blt2.4z/src/bltNsUtil.c
-blt2.4z/src/bltNsUtil.h
-blt2.4z/src/bltObjConfig.c
-blt2.4z/src/bltObjConfig.h
-blt2.4z/src/bltParse.c
-blt2.4z/src/bltPool.c
-blt2.4z/src/bltPool.h
-blt2.4z/src/bltPs.c
-blt2.4z/src/bltPs.h
-blt2.4z/src/bltScrollbar.c
-blt2.4z/src/bltSpline.c
-blt2.4z/src/bltSwitch.c
-blt2.4z/src/bltSwitch.h
-blt2.4z/src/bltTable.c
-blt2.4z/src/bltTable.h
-blt2.4z/src/bltTabnotebook.c
-blt2.4z/src/bltTabset.c
-blt2.4z/src/bltTed.c
-blt2.4z/src/bltText.c
-blt2.4z/src/bltText.h
-blt2.4z/src/bltTile.c
-blt2.4z/src/bltTile.h
-blt2.4z/src/bltTkInt.h
-blt2.4z/src/bltTree.c
-blt2.4z/src/bltTree.h
-blt2.4z/src/bltTreeCmd.c
-blt2.4z/src/bltTreeView.c
-blt2.4z/src/bltTreeView.h
-blt2.4z/src/bltTreeViewCmd.c
-blt2.4z/src/bltTreeViewColumn.c
-blt2.4z/src/bltTreeViewEdit.c
-blt2.4z/src/bltTreeViewStyle.c
-blt2.4z/src/bltTuple.c
-blt2.4z/src/bltTuple.h
-blt2.4z/src/bltTupleCmd.c
-blt2.4z/src/bltUnixDnd.c
-blt2.4z/src/bltUnixImage.c
-blt2.4z/src/bltUnixMain.c
-blt2.4z/src/bltUnixPipe.c
-blt2.4z/src/bltUtil.c
-blt2.4z/src/bltVecCmd.c
-blt2.4z/src/bltVecInt.h
-blt2.4z/src/bltVecMath.c
-blt2.4z/src/bltVecObjCmd.c
-blt2.4z/src/bltVector.c
-blt2.4z/src/bltVector.h
-blt2.4z/src/bltWait.h
-blt2.4z/src/bltWatch.c
-blt2.4z/src/bltWin.h
-blt2.4z/src/bltWinConfig.h
-blt2.4z/src/bltWinDde.c
-blt2.4z/src/bltWinDraw.c
-blt2.4z/src/bltWinImage.c
-blt2.4z/src/bltWinMain.c
-blt2.4z/src/bltWinPipe.c
-blt2.4z/src/bltWinPrnt.c
-blt2.4z/src/bltWinUtil.c
-blt2.4z/src/bltWindow.c
-blt2.4z/src/bltWinop.c
-blt2.4z/src/missing.h
-blt2.4z/src/pure_api.c
-blt2.4z/src/tkButton.c
-blt2.4z/src/tkConsole.c
-blt2.4z/src/tkFrame.c
-blt2.4z/src/tkMenubutton.c
-blt2.4z/src/tkScrollbar.c
-blt2.4z/win
-blt2.4z/win/install.tcl
-blt2.4z/win/README
-blt2.4z/win/X11
-blt2.4z/win/X11/Xatom.h
-blt2.4z/win/X11/X.h
-blt2.4z/win/X11/Xfuncproto.h
-blt2.4z/win/X11/Xlib.h
-blt2.4z/win/X11/Xutil.h
-blt2.4z/win/X11/cursorfont.h
-blt2.4z/win/X11/keysym.h
-blt2.4z/win/X11/keysymdef.h
-blt2.4z/win/makedefs
diff --git a/blt3.0/Makefile.in b/blt3.0/Makefile.in
deleted file mode 100644
index 86d68f1..0000000
--- a/blt3.0/Makefile.in
+++ /dev/null
@@ -1,69 +0,0 @@
-# ------------------------------------------------------------------------
-#       Makefile for BLT distribution
-# ------------------------------------------------------------------------
-
-# ------------------------------------------------------------------------
-#       Source and target installation directories
-# ------------------------------------------------------------------------
-
-bindir =	@bindir@
-datadir = 	@datadir@
-datarootdir = 	@datarootdir@
-exec_prefix  =	@exec_prefix@
-includedir =	@includedir@
-libdir =	@libdir@
-prefix =	@prefix@
-srcdir =	@srcdir@
-
-version =	@BLT_VERSION@
-scriptdir =	$(prefix)/lib
-bltdir =	$(prefix)/lib/blt$(version)
-
-instdirs =	$(prefix) \
-		$(exec_prefix) \
-		$(bindir) \
-		$(libdir) \
-		$(includedir) \
-		$(scriptdir) \
-		$(bltdir)
-
-# ------------------------------------------------------------------------
-#       Don't edit anything beyond this point
-# ------------------------------------------------------------------------
-
-INSTALL =	@INSTALL@
-INSTALL_DATA =	@INSTALL_DATA@
-SHELL =		/bin/sh
-MKDIR_P =	@MKDIR_P@
-RM =		rm -f
-
-subdirs =	src library man demos 
-
-all:  
-	for i in $(subdirs); do \
-	   $(MAKE) -C $$i all || exit 1 ; \
-	done
-
-install: mkdirs install-all 
-
-install-all: 
-	for i in $(subdirs); do \
-	   $(MAKE) -C $$i install || exit 1 ; \
-	done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-	  $(MKDIR_P) $(DESTDIR)$$i; \
-        done
-
-clean:
-	for i in $(subdirs); do \
-	   $(MAKE) -C $$i clean || exit 1 ; \
-	done
-	$(RM) *.bak *\~ "#"* *pure* .pure*
-
-GENERATED_FILES = \
-	config.status config.cache config.log Makefile 
-
-distclean: clean
-	$(RM) $(GENERATED_FILES)
diff --git a/blt3.0/Makefile.vc b/blt3.0/Makefile.vc
deleted file mode 100644
index befd59c..0000000
--- a/blt3.0/Makefile.vc
+++ /dev/null
@@ -1,63 +0,0 @@
-
-# ------------------------------------------------------------------------
-#       Makefile for demonstation shell of BLT library
-# ------------------------------------------------------------------------
-
-include vc.config
-srcdir = $(TOP)
-
-# ------------------------------------------------------------------------
-#       Source and target installation directories
-# ------------------------------------------------------------------------
-
-instdirs =	$(prefix) $(exec_prefix) $(bindir) $(libdir) $(includedir)
-
-# ------------------------------------------------------------------------
-#       Don't edit anything beyond this point
-# ------------------------------------------------------------------------
-
-subdirs =	src demos library html
-
-all:  
-	(cd src; $(MAKE) -f Makefile.vc all) 
-	(cd demos; $(MAKE) -f Makefile.vc all) 
-	(cd library; $(MAKE) -f Makefile.vc all) 
-	(cd html; $(MAKE) -f Makefile.vc all) 
-
-install: install-dirs install-all install-readme
-
-install-all: 
-	(cd src; $(MAKE) -f Makefile.vc install) 
-	(cd demos; $(MAKE) -f Makefile.vc install) 
-	(cd library; $(MAKE) -f Makefile.vc install) 
-	(cd html; $(MAKE) -f Makefile.vc install) 
-
-install-dirs:
-	@for i in $(instdirs) ; do \
-	    if test ! -d "$$i" ; then \
-		echo " mkdir $$i" ; \
-		mkdir $$i ; \
-	    fi ; \
-        done
-
-install-readme:
-	$(INSTALL_DATA) $(srcdir)/README $(scriptdir)
-	$(INSTALL_DATA) $(srcdir)/PROBLEMS $(scriptdir)
-	$(INSTALL_DATA) $(srcdir)/NEWS $(scriptdir)
-
-clean:
-	(cd src; $(MAKE) -f Makefile.vc clean) 
-	(cd demos; $(MAKE) -f Makefile.vc clean) 
-	(cd library; $(MAKE) -f Makefile.vc clean) 
-	(cd html; $(MAKE) -f Makefile.vc clean) 
-	$(RM) *.bak *\~ "#"* *pure* .pure*
-
-GENERATED_FILES = \
-	config.status config.cache config.log Makefile 
-
-distclean: clean
-	(cd src; $(MAKE) -f Makefile.vc distclean) 
-	(cd demos; $(MAKE) -f Makefile.vc distclean) 
-	(cd library; $(MAKE) -f Makefile.vc distclean) 
-	(cd html; $(MAKE) -f Makefile.vc distclean) 
-	$(RM) $(GENERATED_FILES)
diff --git a/blt3.0/NEWS b/blt3.0/NEWS
deleted file mode 100644
index 3ff432b..0000000
--- a/blt3.0/NEWS
+++ /dev/null
@@ -1,730 +0,0 @@
-FEATURES
-========
-
-stripchart
-   The graph's -areapattern, -areaforeground, -areabackground, and
-   -areatile options are now available in the stripchart too.
-   
-
-BUG FIXES
-=========
-
-tree
-   On 64-bit platforms, bltTree.c doesn't compile because of missing
-   macros START_LOGSIZE and MAX_LIST_VALUES.  Thanks to Keith
-   W. Johnson <kwjohnson at llnl.gov> for the bug report.
-general
-   When compiling under Tru64, bltInit.c fails to compile.  Again many
-   thanks to Keith W. Johnson <kwjohnson at llnl.gov> for the bug report.
-vector
-   Vector always uses array variable in global namespace when name
-   is not namespace-qualified.  Thanks to Paul Kienzle 
-   <pkienzle at jazz.ncnr.nist.gov> for the bug report and example
-   script.
-
-Changes from 2.4y to 2.4z
-
-FEATURES
-========
-
-graph/stripchart/barchart
-   Under Windows, both the "print1" and "print2" operations will 
-   pop-up a standard printer dialog when you don't pass a printer
-   argument.
-graph/stripchart/barchart
-   New -state option for both elements and markers.  If "disabled",
-   marker or element isn't eligible for binding events.  This is 
-   useful when you have lots (>100,000) of data points.
-graph/stripchart/barchart
-   New axis option -titlealternate lets you place the axis title to
-   the top or right of the axis.  This used to automatically happen when 
-   you had more than one axis in a margin.  This option lets you control 
-   it.
-tree
-   Both "find" and "apply" operations may be given more than one 
-   pattern switch (-exact, -glob, or -regexp).  This performs a
-   logical "or"--if any one of the pattern matches, the node is 
-   a match.
-tree
-   Both "find" and "apply" operations now have addition switches
-   -keyexact, -keyglob, and -keyregexp (the -key switch works like
-   -keyexact).  You may supply more than one switch.   This performs 
-   a logical "or"--if any one of the pattern matches, the node is a 
-   match.
-graph/stripchart/barchart
-   New axis options -scrollmin and -scrollmax allow you to specify
-   the scroll region.   Thanks to both Meaghan Parizeau 
-   <Meaghan_Parizeau at srtelecom.com> and Julian H J
-   Loaring <jhjl at bigj.demon.co.uk> for the solution.
-graph/stripchart/barchart
-   Polygon marker will trigger bindings even if the marker is not
-   filled (-fill "") or has no outline (-linewidth 0).  Interior
-   is always considered part of the polygon.  
-tree
-   Tree adaptively restructures data values from a linked list into a
-   hash table when the number of values exceeds 20.
-configure.in
-   Can build BLT with cygwin (gcc under Windows) distribution.  Type 
-   ./configure and make to build.  Use -disable-cygwin switch to build 
-   "mingw" version. Many thanks to Mumit Khan <khan at pluto.xraylith.wisc.edu> 
-   for all the hard work of porting the configure.in and Makefiles.  
-
-BUG FIXES
-=========
-
-eps
-   Canvas item errors out with "can't get handle to EPS file" message.  
-   Thanks to Shamil Daghestani <shamild at hotmail.com> for the bug report.
-graph/stripchart/barchart
-   Image marker doesn't get scaled correctly when scaling factor is
-   large. Thanks to Paul Kienzle <pkienzle at jazz.ncnr.nist.gov> 
-   for the bug report and example script.  It really helped.
-vector
-   "min" and "max" initially don't report the correct value.  Many
-   thanks to Alexander Eisenhuth <stacom at stacom-software.de> for the 
-   bug report.
-treeview/tree
-   "show -full $key" operation doesn't work.
-graph/stripchart/barchart
-   Doesn't display trailing data points when there are more than
-   65331 points.  Thanks to Val Shkolnikov <nvsoft at pacbell.net>
-   for the bug report.
-vector
-   Vectors leak memory when accessing them through the Tcl array
-   variable.  Thanks to Alexander Eisenhuth <stacom at stacom-software.de>
-   for the bug report and especially the test script to demonstrate 
-   the problem.
-treeview/tree
-   In "apply" operation, -regexp, -exact, or -glob switches don't
-   work.  Always matches every node.
-graph/stripchart/barchart
-   Axis "-hide" option no longer accepts "all" value.  "all" was
-   supposed to hide the axis *and* all the elements mapped to it.
-   I don't think this option ever worked correctly.  It was also
-   unclear whether to hide the legend entry, markers, etc.
-graph/stripchart/barchart
-   Changing a marker's -hide option doesn't take effect until the
-   graph is redrawn.  Thanks to Alex Verstak <averstak at vt.edu> for 
-   the bug report.
-graph/stripchart/barchart
-   Spurious characters in PostScript output generated under Windows. 
-   Thanks to Cary D. Renzema <Cary.Renzema at analog.com> for the bug 
-   report and sample files.
-graph/stripchart/barchart
-   "snap" operation core dumps or returns X protocol error depending 
-   on arguments.  Thanks to Carsten Mortensen <cbm at microlex.dk> for
-   both the bug report and the fix.
-graph/stripchart/barchart
-   Polygon marker not drawn unless no outline is specified (-linewith 0).
-   Thanks to Nestor Patino <npatino at infovia.com.ar> for the bug report.
-treeview/tree
-   Tags are removed when tree or treeview widget is destroyed.  Many 
-   thanks to Todd Copeland <todd.copeland at legerity.com> for the report.
-treeview/tree
-   "index" operation segfaults when tag is empty. Again thanks to Todd
-   Copeland <todd.copeland at legerity.com> for the report.
-pkgIndex.tcl
-   Added checks for package directory and its parent when searching
-   for BLT shared library.  Thanks to Anton Hartl <toni at devsoft.com>
-   for the bug report.
-
-Changes from 2.4x to 2.4y
-
-FEATURES
-========
-
-tree
-   Added -notags switch to "restore" operation.  
-tree
-   Added additional fields to the tree "dump" format.  When trees are
-   restored, will try to reuse old node ids (not always possible).  
-tree
-   Added -label switch to "copy" operation.  This lets you relabel the 
-   destination node.
-   
-BUG FIXES
-=========
-
-graph/stripchart/barchart
-   PostScript output sometimes includes a spurious box around an axis.  
-   Thanks to Harvey.Davies at csiro.au for the bug report and example.
-tabset/tabnotebook
-   On errors tabnotebook grows ad infinitum.  Thanks to Terri Fischer 
-   <terri at ner.com> for the bug report and example.
-<general>
-   Tcl_Init fails with "can't find usable init.tcl" when running
-   bltsh or bltwish compile with ActiveTcl.  Changed Tcl_AppInit to 
-   set global "tclDefaultLibrary" variable.  
-graph
-   "legend get" operation doesn't account for hidden entries 
-   (i.e. -label is configured to "").  Thanks to Karl Voskuil 
-   <voskuil at ll.mit.edu> for the bug report and the fix.
-graph
-   NULL pointer referenced (bindingTable) when destroying axis.
-bgexec
-   File redirection broken under Windows.
-graph
-   Area under curve not stippled correctly when bitmap is greater than
-   8x8 (W95/W98) or device context is a metafile (all?).  Created
-   XFillPolygon replacement for Windows.
-tree
-   Node modifiers are incorrectly ignored when first component is a tag.
-treeview
-   -shadow option no longer accepts empty string (no shadow). Many 
-   thanks to Todd Copeland <todd.copeland at legerity.com> for the report.
-vector
-   Vector "create" operation slows down using #auto as more vectors 
-   are created. Thanks to Todd Copeland <todd.copeland at legerity.com> 
-   for the bug report.
-treeview/hiertable
-   Widget doesn't scroll horizontally correctly when -hideleaves is
-   true.  Ignores last level when computing world width.
-treeview/hiertable
-   Deleting a node doesn't remove tag references to it.  Thanks to 
-   Steven Hafer <steven.hafer at legerity.com> for the bug report.
-treeview/hiertable
-   Giving the -path option to the "index" operation always fails. Thanks 
-   to Paul Robins <paul.robins at st.com> for the bug report.
-<treeview.mann/hiertable.mann>
-   Documentation for the "get" operation isn't clear that it always returns
-   a list of lists when the -separator option is "" (the default), even
-   when there is only one node specified.
-
-Changes from 2.4w to 2.4x
-
-FEATURES
-========
-
-dragdrop
-   Back ported 8.3 "dde" command for use with 8.0.
-
-BUG FIXES
-=========
-
-treeview/hiertable
-   Can't create column that starts with a minus. Thanks to Todd Copeland 
-   <todd.copeland at legerity.com> for the bug report.
-<Makefile.in>
-   pkgIndex.tcl file not getting rebuilt.  Thanks to Terri Fischer 
-   <terri at ner.com> for the bug report and fix.
-<dragdrop1.tcl,dragdrop2.tcl>
-   Send emulation script isn't needed for Tcl8.0 under Windows. Thanks to
-   Linh H Phan <phan at grover.jpl.nasa.gov> for the bug report.
-graph/stripchart/barchart
-   Using pen styles results in a bus error.  Thanks to Julian H J
-   Loaring <jhjl at bigj.demon.co.uk> for the bug report.
-hiertable/treeview/tree
-   List of data values is reversed from 2.4v.  Thanks to Jorge Suit
-   Prez Ronda <jsperez at bayesinf.com> for the bug report.
-<bltObjConfig.c>
-   Missing header file for varargs.  Thanks to Terri Fischer <terri at ner.com>
-   for the bug report and fix.
-<bltAlloc.c>
-   TclpAlloc and TclpFree not found in Tcl 8.0. Again, thanks to Terri
-   Fischer <terri at ner.com> for the bug report and fix.
-<BLT.mann,barchart.mann,eps.mann,graph.mann,tabset.man>
-   Updated manual pages graciously provided by Terri Fischer <terri at ner.com>.
-
-Changes from 2.4v to 2.4w
-
-FEATURES
-========
-
-treeview
-   New treeview widget is updated version of hiertable.  Uses Tcl_Objs.
-   The "hiertable" and "treeview" are the 100% syntax compatible.  The 
-   old hiertable is temporariliy available as "hiertable-old" should 
-   you find errors.  Also use the "treeview" instead of the "hierbox"
-   widget. The "hierbox" isn't as capable and doesn't use tree data
-   objects.
-treeview/hiertable
-   Added tagging operations similar to the "tree" command.  Attaching
-   a tree to the treeview/hiertable (the -tree option) now gives you
-   access to the tree's tags too.  Don't confuse this with "bindtags".
-   For example, you can tag nodes with the "tree" command and operate
-   on them in the treeview/hiertable widget using that tag. If you
-   don't want to share tags, the -newtags option will prevent this.  
-   There's an update "treeview" manual entry to describe this.
-treeview/hiertable
-   The "nearest" operation can report what part of the entry the pointer
-   is over.  If a variable name argument is given, the variable will
-   contain either "button", "label", "icon", or "".
-eps/winop
-   Faster image zooming and rotation (fixed-point arithmetic).
-
-BUG FIXES
-=========
-
-vector
-   Test of real number in a range is broken. Thanks to Paul Robins
-   for the bug report.
-treeview/hiertable
-   "nearest" operation doesn't allow an optional "variable" argument.
-hiertable/hierbox
-   The -selectioncommand command is invoked when closing an entry 
-   with no selected descendants.  Thanks to Jorge Suit Prez Ronda 
-   <jsperez at bayesinf.com> for the bug report.
-hiertable/hierbox    
-   In single "mode", the selection anchor is not updated when the
-   selection is moved via the keyboard. Thanks to Jorge Suit Prez Ronda 
-   <jsperez at bayesinf.com> for the bug report.
-hiertable		
-   Editor overwrites memory (seen best under Windows).   
-hiertable		
-   The "open" and "close" operations don't check for no arguments.
-hiertable
-   Vertical dotted lines start on wrong y-coordinate when clipped.
-hiertable
-   Active button isn't clipped by column titles.
-hiertable
-   Column titles are still displayed and picked despite -showtitles 
-   set to "no". 
-hiertable
-   Editor doesn't automatically select acquired text. 
-hiertable
-   Moving the cursor in the editor doesn't clear the selection.
-hiertable
-   Typing a "space" doesn't replace the selection with a space.
-tree
-   Traces on the same node loop infinitely.  TRACE_ACTIVE flag not 
-   set/unset.
-tree
-   The "restore" and "restorefile" operations don't handle newlines
-   in data key/values, node labels, or tags.
-graph/barchart/stripchart
-   Crosshairs left on screen when the mouse is pulled quicky from the 
-   widget.  
-graph/barchart/stripchart
-   Spurious crosshairs also left on the screen if axes are reconfigured 
-   (active axes).
-graph/barchart/stripchart
-   Image marker not updated if image is changed.
-graph/barchart/stripchart
-   PostScript not generated for -showvalues option. 
-graph/barchart/stripchart
-   PostScript not generated for errorbars.
-bgexec
-   No check for wrong number of arguments if switch is present.
-<bltAlloc.c>
-   Blt_MallocProcPtr and Blt_FreeProcPtr not declared extern in 
-   bltInt.h
-<bltTile.c>
-   Bogus test for mask in Blt_TilePolygon routine.
-<bltImage.c>
-   Counter for transparent pixels wrong in Win32 version of Blt_PolygonMask.  
-<bltInit.c>
-   blt_version not set when dynamically loaded into wish83.exe.  
- 
-Note: Stub support is still missing although patches have been
-      graciously provided for the 2.4q release.  This will be added as
-      soon as I can get some free time.
-
-Changes from 2.4u to 2.4v
-
-FEATURES
-========
-bgexec
-   New -linebuffered switch.	
-
-        bgexec myVar -linebuffered yes -onoutput ShowLine myProg &
-
-    This option lets you process updated data (-onerror, -onoutput, 
-    -error, or -output) on a line by line basis.  Normally notifications 
-    occur once for entire data block. This switch causes separate 
-    notifications to made for each complete line.
-bgexec
-    New -decodeoutput and -decodeerror switches.
- 
-     bgexec myVar -decodeoutput unicode -output myOut myProg &
-
-    Translates data from the specified encoding to UTF before passing
-    it to the Tcl interpreter. Normally no translation is made (under
-    Windows CR-LF conversions are made) and the raw, typically ASCII,
-    characters are passed back to the Tcl interpreter.  
-    Binary data can be collected with the "binary" encoding. For 
-    versions using Tcl 8.1 or greater, data is returned as Tcl byte 
-    array object, so you can use the "binary" command to convert it 
-    as needed.
-
-      set out [bgexec myVar -decodeoutput binary myProg]
-      binary scan $myOut f values
-tree
-   New "dumpfile" and "restorefile" operations to "tree" command.
-tree
-   Extended -> syntax in tree command to use node names.  
-
-	set data [$tree get root->"fred"->"pebbles"]
-tree 
-   Improved memory handling of large trees.  Pool allocators added to
-   reduce overall memory consumption. 
-graph/stripchart/barchart
-   New -buffergraph switch.	
-	.graph configure -buffergraph no
-graph
-   New options to fill area under curve of an element.
-	
-	.graph element configure line1 -areapattern solid 
-	.graph element configure line2 -areapattern BLT 
-
-graph/stripchart/barchart
-   New -reduce option.
-
-	.graph element configure line1 -abstol 0.5
-
-   Designates error tolerance for line simplificiation. Points that 
-   vary less than the given tolerance are merged into a single line 
-   segment.
-miscellaneous
-   Can globally replace memory allocation routines by setting 
-   pointers Blt_MallocProcPtr and Blt_FreeProcPtr.
-winop
-   New "rotate" operation lets you rotate photo images.
-
-BUG FIXES
-=========
-bgexec
-   Fixed a race condition that caused assertion under Windows to fail.
-   When both stdout and stderr are collected, if the stdout handler
-   finishes first, the memory used by read thread handler could be 
-   freed before the stderr pipe was closed.
-graph/stripchart/barchart
-   PostScript coordinates are no longer integers (screen resolution).
-graph/stripchart/barchart
-   Polygon markers now clipped properly.
-vector
-   Vectors can't be mapped to local variables.  This was broken 
-   in the 2.4r release.  Thanks to Johannes Zellner 
-   <johannes at zellner.org> for the bug report.
-vector
-   Tcl command associated with a vector not destroyed when the vector
-   is deleted.  Much thanks to Alexander Eisenhuth <stacom at topmail.de> 
-   for the bug report and the example script.
-drag&drop
-   "drag&drop" command fails when multiple formats are specified.
-    Seen in the dragdrop2.tcl demo.
-spline
-   Incorrectly reports the spline's x-vector to be non-monotonic.  
-   Thanks to Chang Li <changl at neatware.com> for the bug report.
-<pkgIndex.tcl>
-   Fixed pkgIndex.tcl.in to figure out whether to load libBLT24.so
-   or libBLTlite24.so when BLT is loaded, not when the package is 
-   registered.  Thanks to Dr. Dieter Ruppert <ru at swb.siemens.de> for
-   the bug report and fix.
-
-Changes from 2.4t to 2.4u
-
-BUG FIXES
-=========
-<./configure>
-   Fixed my stupid error (missing close brace) in ./configure file.  
-<Makefile.in>
-   Makefile in src/shared doesn't define BLT_LIBRARY.  Thanks
-   to terri at ner.com (Terri L. Fischer) for the bug report and fix. 
-graph/barchart/stripchart
-   graph doesn't find vector in global namespace when inside of another 
-   namespace. Thanks to Julian H J Loaring <bigj at bigj.demon.co.uk> for 
-   the bug report.
-graph/barchart/stripchart
-   Scratch buffer to small for PostScript prolog.  Thanks again to
-   Julian H J Loaring <bigj at bigj.demon.co.uk> for the bug report 
-   and fix. 
-graph
-   "bind" would fail on elements without traces (-linewidth 0).
-   Thanks again to terri at ner.com (Terri L. Fischer) for the bug report.
-
- o Many changes to "dnd" command.  
-
-      +	-package option is treated as a command prefix (like the 
-        scrollbar), not a script.  Percent sign substitutions are
-        no longer allowed.  Information is passed via key-value 
-	parameters like the -onleave, -ondrop procedures. Procedure 
-        must return 1 if operation was Ok, and 0 if it failed.  
-  
-      +	The command arguments for both the "setdata" and "getdata"
-	operations have changed from an arbitrary Tcl script with
-	percent sign substitutions, to a command prefix with 
-	key-value arguments appended. The general form is
-
-		procName widget args...
-
-	where args is one of more key value pairs.
-
-		x		Relative X-coordinate of drop or pickup.
-		y		Relative Y-coordinate of drop or pickup.
-		timestamp	Timestamp of transaction.
-		format		Format desired.
-		value		Value transfered (setdata only).
-
-	You can use array set to parse "args".  For example:
-
-		proc GetColor { widget args } {
-		    array set info $args
-	
-		    puts "x-coordinate is $info(x)"
-		    puts "selected format is $info(format)"
-
-		    return [$widget cget -bg]	 	    
-		}
-	
-      + If an -onmotion procedure is specified for the target, it is
-	automatically invoked on drops before the -dropcmd is run. 
-	If it returns 0, the drop is canceled.
-	
-      + Added ./demos/dnd2.tcl to show more complicated example.
-	Just like dnd1.tcl, you need to run two of them at the same
-	time to see the drag-and-drop operations.
-
-      + Target property wasn't getting reset when changing -onmotion, 
-	-onleave, etc. procedures. 
-    
-      + Timestamps now displayed as unsigned. 
-	
-   Many thanks to Tom Lane <tgl at sss.pgh.pa.us> for all his help and
-   suggestions.
-
-Changes from 2.4s to 2.4t
-
- o Tree command syntax changes.  Notify and trace operation now work
-   as advertised and a copy operation added.  Many thanks to Matt 
-   Newman <matt at sensus.org> for meticulously reviewing the command. 
-
- o graph "snap" operation syntax change.  Added support for generating
-   Aldus metafiles and enhanced metafiles under Windows. 
-
-	# Normal syntax.
-         set image [image create photo]
-	.graph snap $image
-
-	# New additions.
-	.graph snap -format emf myFile.emf ;# Enhanced metafile
-	.graph snap -format wmf myFile.wmf ;# Aldus placable metafile
-	.graph snap -format emf CLIPBOARD  ;# Metafile written into clipboard.
-
-   Old width and height arguments are replaced with -width and -height 
-   switches.
-
-	.graph snap $image 500 500 			;# Old
-	.graph snap -width 500 -height 500 $image	;# New 
-
-   Thanks to Alain Zuur <a.zuur at marlab.ac.uk> for the enhancement.
-  
- o Tabset/Tabnotebook -selectforeground option for tabs using wrong
-   configuration option type.  Both the bug report and fix are from
-   Mark E. Smith <mark at pearl.grand.gdats.com>.  Thanks.
-
- o graph "bind" to use closest point instead of line segment when 
-   element contains only 1 point.  Thanks to Uwe Klein 
-   <uwe-klein at foni.net> for the bug report and script.  
-
- o Hiertable tree view column has been internally renamed to 
-	
-	  "BLT Hiertable widgetName".  
-
-   It was formerly the name of the widget.  Fortunately, you can
-   refer to the column as "treeView" instead.  
-
-	 .ht column configure treeView -text "View Label"
- 
- o There's no ".tree" suffix anymore on the default tree created by 
-   the hiertable widget.  It's now just the widget name. 
-
- o Many hiertable column bug fixes. Thanks to Julian H J Loaring 
-   <bigj at bigj.demon.co.uk> for all the tests and reports. 
-
- o Rotated text displayed incorrectly under Windows 95/98 using 
-   non-TrueType fonts.  A test for typetype fonts has been restored.
-   Thanks to James Pakko <jpakko at ford.com> for the bug report and
-   script.
-
-   Under Windows, Non-TrueType fonts are drawn into a bitmap and 
-   the bitmap is rotated.  This provides the same quality as using 
-   rotated fonts for on-screen display.  Unfortunately it's much 
-   poorer for higher resolution devices such as printers. The best 
-   bet is to simply choose TrueType fonts if you can.
-
- o Improved Hiertable folder images.  Many thanks to Tom Lane 
-   <tgl at sss.pgh.pa.us> for the new images. 
-
- o Bgexec segfaults under Windows (NT/95) if file handler is 
-   deleted inside of callback.  Thanks to Chris Oliver 
-   <coliver at mminternet.com> for the bug report.
-
- o graph segfaults if pen style range min/max are the same. 
-   Thanks to Thomas Wu <twu at gene.com> for the bug report and script.
-
- o tabnotebook and tabset widgets would generate X11 errors if
-   embedded window was resize to zero width/height.  Thanks to
-   Ed Ohsone <eosn at rahul.net> for the report and the script to
-   demonstrate the error.
- 
-Changes from 2.4r to 2.4s
-
- o Fixed bug in stripchart (introduced in 2.4r) allowing uninitialized
-   data to be displayed.  Thanks to Dick Gooris <gooris at lucent.com> for
-   the bug report.
-
- o AIX dynamic loading.  Actually made it work on a 4.3 AIX box.
-
- o Fixed -tree option in hiertable.  Would segfault if tree was not
-   fully initialized first.
-
- o Tree insert operation syntax changed from 
-
- 	tree0 insert $node key1 value1 key2 value2
-   to
-	tree0 insert $node -data { key1 value1 key2 value2 }
-
- o Fixed tree label operation.  Save uid instead of string.
-   
- o Bug in TreeEventProc, should be node != NULL instead of node >= 0
-   Thanks to Julian H J Loaring <bigj at bigj.demon.co.uk> for the
-   bug report. 
-
-
-What's new in 2.4?
-
- 1. "eps" canvas item.  
-
-    An encapsulated PostScript canvas item lets you embed an EPS file into 
-    the canvas.  The "eps" item displays either a EPS preview image found 
-    in the file, or a Tk image that you provide.  
-
- 2. "hierbox" and "hiertable" widget.
-
-    Hierarchical listbox widget. Displays a general ordered tree which 
-    may be built on-the-fly or all at once.
-
- 3. "tabset" and "tabnotebook" widget.
-
-    Can be used either as a tab notebook or simple tabset.  Tabs can 
-    be arranged in a variety of ways: multi-tiered, scrolled, and 
-    attached to any of the four sides.  Tab labels can contain both 
-    images and text (text can be arbitrarily rotated). Notebook pages 
-    can be torn-off into separate windows and replaced later. 
-    
- 4. Changes to vectors.
-
-    New features:
-	
-     o	Vector expressions.  The vector now has an "expr" operation
-	that lets you perform math (including math library
-	functions) on vectors.  There are several new functions
-	(such as "max", "min", "mean" "median", "q1", "q3", "prod",
-	"sum", "adev", "sdev", "skew", ...)
-
-		vector expr { sin(x)^2 + cos(x)^2 }
-		y expr { log(x) * $value }
-
-     o	New syntax to create and destroy vectors:
-
-		vector create x 
-		vector destroy x
- 
-	The old syntax for creating vectors still works.
-
-		vector x
-
-     o	Vectors are *not* automatically deleted when their Tcl
-	variable is unset anymore. This means that you can
-	temporarily map vectors to variables and use them as you
-	would an ordinary Tcl array (kind of like "upvar").
-
-	    proc AddValue { vecName value } {
-		 $vecName variable x
-	
-		 set x(++end) $value
-	    }	
-
-	There's an "-watchunset" flag to restore the old
-	behavior if you need it. 
-
-	    vector create x -watchunset yes
-
-     o  Vectors still automatically create Tcl variables by
-	default.  I'd like to change this, but it silently
-	breaks lots of code, so it will stay.
-
-    Bug fixes:
-
-     o  Vector reallocation failed when shrinking the vector.
-
-     o  Vector "destroy" callback made after vector was already freed.
-
-     o  Fixed vector/scalar operations.
-
-     o  Always store results in temporary, so not to overwrite accidently
-	current vector values.
-	
- 5. Changes to Graph, Barchart, Stripchart widgets.
-
-    New features:
-
-     o 	Drop shadows for text (titles, markers, etc). Drop
-	shadows improve contrast when displaying text over a
-	background with similar color intensities.
-   
-     o  Postscript "-preview" option to generate a EPS
-	PostScript preview image that can be read and
-	displayed by the EPS canvas item.
-
-     o  New "-topvariable", "-bottomvariable",
-	"-leftvariable", and "-rightvariable" options.  They
-	specify variables to contain the current margin
-	sizes.  These variables are updated whenever the
-	graph is redrawn.
-
-     o  New "-aspect" option. Let's you maintain a particular aspect
-	ratio for the the graph.
-
-     o  Image markers can now be stretched and zoomed like
-        bitmap markers.
-
-     o  Bind operation for legend entries, markers, and elements.
-
-	Much thanks to Julian Loaring <bigj at bigj.demon.co.uk> 
-	for the idea.
-
-     o  New "-xor" option for line markers, lets you draw the line
-	by rubberbanded by XOR-ing without requiring the graph to
-	be redrawn.  This can be used, for example, to select regions
-	for zooming.  
-
-	Thanks to Johannes Zellner (joze at krisal.physik.uni-karlsruhe.de) 
-	for the idea.
-
-     o  Can attach a scrollbar to an axis.  
-
-  	    .sbar configure -command { .graph axis view y } 
-	    .graph axis configure y -scrollcommand { .sbar set } 
-
-    Bug fixes:
-
-     o	Closest line (point) broken when using pens styles.
-
-     o	Marker elastic coordinates were wrong.
-
-     o	PostScript bounding box included the border of the page.
-
-     o	Bad PostScript generated for barchart symbols with stipples.
-
-     o	Wrong dimensions computed with postscript " -maxpect" option.
-
-     o  Text markers fixed.
-
-	Thanks to De Clarke for the bug report and fix.
-
-
-     o  Renamed axis configuration from "-range" to "-autorange" to
-	match the documentation.  
-
-	Thanks to Brian Smith for the correction.
-
-     o  Fixed polygon marker pick routine.
-
-     o  Fixed active tab labels overlapping the selected tab.
-
-     o  PostScript graph footer turned off by default.  Use -footer option
-        to turn on.
-
-	    .graph postscript configure -footer yes
-
diff --git a/blt3.0/PROBLEMS b/blt3.0/PROBLEMS
deleted file mode 100644
index c43d055..0000000
--- a/blt3.0/PROBLEMS
+++ /dev/null
@@ -1,146 +0,0 @@
-Specific problems:
-
-1. I've built BLT, but when I run "bltwish", it doesn't know about any
-   of the BLT commands.
-
-   % graph .g
-     invalid command name "graph"
-
-  Starting with Tcl 8.x, the BLT commands are stored in their own
-  namespace called "blt".  The idea is to prevent name clashes with Tcl
-  commands and variables from other packages, such as a "table" command
-  in two different packages.
-
-  You can access the BLT commands in a couple of ways.  
-
-  Prefix the BLT commands with the namespace qualifier "blt::"
-
-   % blt::graph .g
-   % blt::table . .g -resize both
-
-  or import the BLT commands into the global namespace.
-
-   % namespace import blt::*
-   % graph .g
-   % table . .g -resize both
-
-2. I'm try to compile BLT with ActiveState's Tcl/Tk distribution, 
-   but all the demos core dump. 
-
-   Look in the "include" directory where you installed ActiveState. 
-   Is there an "X11" directory?  Remove it and recompile BLT. 
-   It contains all the fake X11 headers needed for Windows builds.  
-   So it's okay to remove it for Solaris and Linux.
-
-3. Under Windows the "drag&drop" command doesn't work for me.  
-
-   The "drag&drop" command uses the "send" command to communicate
-   between Tk applications and under Windows Tk has no built-in
-   "send" command. In ./demos/scripts/send.tcl there is a "send"
-   look-a-like that uses the DDE package.  Source this first and
-   make sure you invoke the procedures "SendInit" and "SendVerify" 
-   *before* you create and drag-and-drop targets.
-
-4. I'm using Windows 95/98 and the -stipple option doesn't seem to work.
-
-   Under Windows 95/98, your bitmap must be exactly 8x8.  If you use 
-   a bigger or smaller bitmap, Windows won't stipple the pattern correctly.
-   For bitmaps larger than 8x8, only the upper-left 8x8 corner of the 
-   bitmap is used.  For smaller bitmaps, the bitmap is extended to 8x8 
-   with the new bits 0 (blank).  This is a limitation of Windows 95/98, 
-   not Tk.
-
-5. I can't run bltwish.exe under Windows with Tcl/Tk version 8.0.
-
-   Did you compile and install Tcl/Tk yourself?  Tcl is expecting a 
-   registry key to be set.  The installer normally does that for you.  
-   The key tells Tcl where to find the Tcl library scripts.  Setting 
-   the TCL_LIBRARY environment variable to the location of the Tcl
-   script directory (where init.tcl is located) will fix things. 
-   Dynamic loading (package require BLT) of BLT should also work.
-   This problem is fixed in later versions of Tcl.
-
-6. I'm on a DEC Alpha running the graph widget. I don't see any ticks 
-   or lines.
-
-   There's a problem with code generated by the GNU C compiler 
-   2.8.[0-1] for bltGrAxis.c and bltGrLine.c (I think it's just 
-   these two files).
-
-   Try compiling with either the native "cc" compiler or compile
-   the two modules with -O0.
-
-7. When I compile BLT on Solaris (maybe others?), I get lots of error 
-   messages in the form:
-
-    <unknown>	0xf44       /usr/local/lib/libtcl7.6.a(tclCmdIL.o)
-    <unknown>	0xf3c       /usr/local/lib/libtcl7.6.a(tclCmdIL.o)
-    <unknown>	0x628       /usr/local/lib/libtcl7.6.a(tclCmdIL.o)
-
-   This is because Tcl and Tk have been installed only as static libraries, 
-   not shared libraries.  The ./src/shared/Makefile creates the shared BLT 
-   library with a back-link to these libraries.  The advantage of this link
-   is that when you dynamically load BLT, the correct Tcl/Tk libraries are 
-   automatically searched for any unresolved references.
-
-   You can fix this in one of two ways. 
-
-   o Remove the back-link.  Edit ./src/shared/Makefile and cut the 
-     "-ltcl* -ltk*" references from the SHLIB_LD_LIBS macro.  
-
-   o Create shared libraries for Tcl and Tk.  Re-configure, compile, 
-     and install Tcl/Tk from their sources.  Make sure you add the 
-     "--enable-shared" switch to "configure".
-
-	./configure --enable-shared
-
-8. How do I create a shared library of BLT under AIX?
-
-   Check that Tcl and Tk were both configured with the --enable-shared flag.  
-   When you compile each of them, a "lib.exp" file is created in their 
-   respective "unix" subdirectories.  The lib.exp files are removed when 
-   you do a "make clean", so you may need to recompile.  
-
-   The BLT Makefile uses the TCL_SRC_DIR and TK_SRC_DIR values in the 
-   tclConfig.sh and tkConfig.sh files to find these lib.exp files.  You 
-   may need to edit ./src/Makefile/shared to reflect the real paths of 
-   the Tcl and Tk source distributions.
-
-9. ./configure can't find the Tcl/Tk libraries (or finds the wrong version).
-
-   If you build Tcl/Tk Tk with --enable-symbols versions, ./configure
-   won't find the libraries (it's looking for libtcl8.4.a and your
-   library is named libtcl8.4g.a)  You need to build Tcl/Tk again, this
-   time with --disable-symbols.
-
-General Problems:
-
-1. I can't compile BLT.
-
-   Send the output of both "./configure" and "make" to me at
-
-	ghowlett at grandecom.net
-	gah at silconmetrics.com
-
-   This will make it easier to track down the exact problem.  Make
-   sure you put "BLT" in the subject line.
-
-2. I get a segfault when running BLT in my application.
-
-   The best method is to send a Tcl script that I can run that
-   demonstrates the problem.  Make sure you include all the necessary 
-   pieces to make it run (e.g. data file). If it's needed, include 
-   directions how to make the problem occur (e.g. "double click on the 
-   left mouse button").    
-
-   The hard work you do pruning down the problem into a small script 
-   will greatly help solve it.  Once I see the problem, I can usually 
-   fix it right away.
-
-
-3. The manual page lies. 
-
-   I appreciate any help in pointing out errors, omissions, or lies
-   in the manuals.  If you have ideas how they might be improved, 
-   I'd love to hear them.
-
diff --git a/blt3.0/README b/blt3.0/README
deleted file mode 100644
index 24d4840..0000000
--- a/blt3.0/README
+++ /dev/null
@@ -1,179 +0,0 @@
-
-This is version 3.0 of the BLT library.  It's an extension to the
-Tcl/Tk toolkit.  You simply compile and link with the Tcl/Tk
-libraries. It does not require the Tcl or Tk source files.
-
-BLT is available from 
-
-    www.sourceforge.net/projects/blt/files
-
-This release has been built and tested with the following Tcl/Tk
-versions:
-
-	Tcl/Tk 8.0
-	Tcl/Tk 8.1
-	Tcl/Tk 8.2
-	Tcl/Tk 8.3 
-        Tcl/Tk 8.4 thru 8.4.0
-
-Tcl 7.6/Tk 4.2 isn't supported any more.  If you need Tcl 7.x, use the
-2.4z release.
-
-Avoid alpha and beta versions of Tcl/Tk.  They probably won't work.
-
-What is BLT? 
-
-  BLT is an extension to Tcl/Tk.  It adds plotting widgets (X-Y graph, 
-  barchart, stripchart), a powerful geometry manager, a new canvas 
-  item, and several new commands to Tk.  
-
-  Plotting widgets:  
-
-    graph, barchart, stripchart
-		BLT has X-Y graph, barchart, and stripchart widgets that are
-		both easy to use and customize.  All the widgets work with
-		BLT vector data objects, which makes it easy to manage data.
- 
-  Tree viewer
-
-    treeview 	Displays a general ordered tree which may be built 
-		on-the-fly or all at once.
-
-    tree 	Tree data object.  
-
-  Tab set:
-
-    tabset	Can be used either as a tab notebook or simple tabset.
-		Multi-tiered and/or scrolled tabsets are available.
-		Notebook pages can be torn-off into separate windows and 
-		later put back. 
-    
-  Geometry Manager:  
-
-    table	A table-based geometry manager. Lets you specify widget
-	      	layouts by row and column positions in the table. Unlike the
-		packer or grid, you can finely control and constrain window
-		sizes.
-
-  Vector Data Object:
-
-    vector	Lets you manage a vector of floating point values in a
-		high-level fashion.  Vectors inter-operate seamlessly with 
-		the plotting widgets. The graphs will automatically redraw 
-		themselves when the vector data changes. Vector's components 
-		can be managed through a Tcl array variable, a Tcl command, 
-		or the using its own C API.
-
-  Background Program Execution:
-
-    bgexec	Like Tcl's "exec ... &", but collects the output, error, and 
-		status of the detached UNIX subprocesses.  Sets a Tcl variable 
-		upon completion.  
-
-  Busy Command:
-
-    busy	For preventing user-interactions when the application is
-		busy.  Manages an invisible "busy" window which prevents
-		further user interactions (keyboard, mouse, button, etc.).
-		Also you can provide a busy cursor that temporarily 
-		overrides those of the Tk widgets.
-
-  New Canvas Item:
-
-    eps		An new item is added to the Tk canvas for handling
-		encapsulated PostScript.  It lets you embed an EPS file into
-		the canvas displaying either an EPS preview image found in 
-		the file, or a Tk image that you provide.  When you print 
-		the canvas the EPS item will automatically include the EPS 
-		file, translating and scaling the PostScript.  For example, 
-		you could use "eps" items to tile several PostScript pages 
-		into single page.
-
-		The "eps" item can also be used as a replacement for "image"
-		canvas items.  Unlike "image" canvas items, the image of an 
-		eps item can be printed and scaled arbitrarily.
-
-  Drag & Drop Facility:
-
-    drag&drop	Adds drag-n-drop capabilities to Tk.  It uses "send"-style 
-		communication between drag-drop sources and targets.  The 
-		result is a much more powerful drag-and-drop mechanism than 
-		is available with OpenLook or Motif.  
-
-  Bitmap Command:
-
-    bitmap	Lets you read and write bitmaps from Tcl.  You can define
-		bitmaps from ordinary text strings.  Bitmaps can also be
-		scaled and rotated.  For example, you can create a button
-		with rotated text by defining a bitmap from a text string
-		and rotating it.  You can then use the bitmap in the button
-		widget.
-
-  Miscellaneous Commands:
-
-    winop	Basic window operations. You can raise, lower, map, or, 
-		unmap windows.  Other operations let you move the pointer
-		or take photo image snapshots of Tk widgets.
-
-    bltdebug	Lets you trace the execution of Tcl commands and procedures.
-		Prints out each Tcl command before it's executed.  
-
-    watch	Lets you specify Tcl procedures to be run before and/or
-		after every Tcl command.  May be used for logging, tracing, 
-		profiling, or debugging or Tcl code.
-
-    spline	Computes a spline fitting a set of data points (x and y 
-		vectors) and produces a vector of the interpolated images 
-		(y-coordinates) at a given set of x-coordinates.
-
-    htext	A simple hypertext widget. Allows text and Tk widgets to
-		be combined in a scroll-able text window.  Any Tk widget 
-		can be embedded and used to form hyper-links.  Other 
-		options allow for selections and text searches.
-
-   
-How to compile and test BLT?
-
-  See the file "INSTALL" for instructions.
-
-
-Does BLT work under Windows?
-
-  Yes.  Windows 95/98/ME/NT/2000/XP.  I've compiled it with both
-  MS VC++ 5.0/6.0p4 and EGCS 1.1.1.  Self-installing pre-compiled versions 
-  are available.
-
-What are the differences between the Windows and Unix releases?
-
-  All commands work: graphs, bgexec, busy, drag&drop etc. except
-  the "container", and "cutbuffer" widgets. 
-
-  The "drag&drop" command still needs to use "send" to transfer
-  information between Tk applications.  You can use 
-
-	./demos/scripts/send.tcl 
-
-  to imitate "send" using DDE.  Just source the script and execute
-	
-   	SendInit	
-	SendVerify
-
-  to set up the new send command.
-
-When will...?
-
-  In general, I can't answer the "When will" questions, mostly out of 
-  embarrassment.  My estimates of when new features and releases will
-  occur usually turn out to be way way off.  
-
-What does BLT stand for?
-
-  Whatever you want it to.
-
-Where to send bugs reports, suggestions, etc. ?
-
-	ghowlett at grandecom.net
-
-  Make sure you include BLT and the version number in the subject line.
-
---gah
diff --git a/blt3.0/aclocal.m4 b/blt3.0/aclocal.m4
deleted file mode 100644
index 93e620c..0000000
--- a/blt3.0/aclocal.m4
+++ /dev/null
@@ -1,110 +0,0 @@
-dnl BLT_RUN_WITH_OUTPUT(VARIABLE, PROGRAM,)
-AC_DEFUN(BLT_RUN_WITH_OUTPUT,
-[AC_REQUIRE([AC_PROG_CC])dnl
-if test "$cross_compiling" = yes; then
-  ifelse([$3], ,
-    [errprint(__file__:__line__: warning: [AC_TRY_RUN_WITH_OUTPUT] called without default to
- allow cross compiling
-)dnl
-  AC_MSG_ERROR(can not run test program while cross compiling)],
-  [$3])
-else
-cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-[#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-]dnl
-[$2]
-EOF
-eval $ac_link
-if test -s conftest && (./conftest > ./conftest.stdout; exit) 2>/dev/null; then
-   $1=`cat ./conftest.stdout`
-else
-   $1=""
-fi
-fi
-rm -fr conftest*])
-
-dnl BLT_GET_SYMBOL(VARIABLE, SYMBOL, FILE)
-AC_DEFUN(BLT_GET_SYMBOL,
-[AC_REQUIRE([AC_PROG_AWK])dnl
-cat > conftest.awk <<EOF
-[/^# *define *]$2[[ \t]]/ { print [\$][3] }
-EOF
-$1=`${AWK} -f conftest.awk "$3"`
-rm -rf conftest*])
-
-dnl BLT_CHECK_LIBRARY(NAME, SPEC, SYMBOL, WITH)
-AC_DEFUN(BLT_CHECK_LIBRARY,
-[  
-  if test "$4" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$4" = "yes" ; then
-      lib_spec="-l$2"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      AC_CHECK_LIB([$2], [$3], [found="yes"],[found="no"])
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -l$2"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        AC_CHECK_LIB([$2], [$3], [found="yes"],[found="no"])
-        if test "${found}" = "yes" ; then
-	  $1_LIB_DIR="$dir"
-	fi
-      fi
-    else 
-      for dir in $4 $4/lib ; do 
-        lib_spec="-L${dir} -l$2"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        AC_CHECK_LIB([$2], [$3],[found="yes"],[found="no"])
-        if test "${found}" = "yes" ; then
-	  $1_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-      AC_DEFINE([HAVE_LIB$1], 1, 
-        [Define to 1 if you have the `$1' library (-l$2).])
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      $1_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-])
-
-
-dnl BLT_CHECK_HEADER(NAME, SPEC, WITH, DEF)
-AC_DEFUN(BLT_CHECK_HEADER,
-[  
-  if test "$3" != "no" ; then 
-    new_CPPFLAGS=""
-    if test "$3" != "yes" ; then
-      for dir in $3 $3/include ; do
-        if test -r "${dir}/$2" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  $1_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else 
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/$2" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  $1_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi     
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS="$4 ${new_CPPFLAGS}"
-    AC_CHECK_HEADERS($2, [$1_INC_SPEC="${new_CPPFLAGS}"], [$1_INC_SPEC=""])
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-])
diff --git a/blt3.0/blt.mak b/blt3.0/blt.mak
deleted file mode 100644
index a208592..0000000
--- a/blt3.0/blt.mak
+++ /dev/null
@@ -1,34 +0,0 @@
-# ------------------------------------------------------------------------
-#       Makefile for demonstation shell of BLT library
-# ------------------------------------------------------------------------
-
-!INCLUDE ./win/makedefs
-
-# ------------------------------------------------------------------------
-#       Source and target installation directories
-# ------------------------------------------------------------------------
-
-srcdir		= .
-
-# ------------------------------------------------------------------------
-#       Don't edit anything beyond this point
-# ------------------------------------------------------------------------
-
-all:  
-	cd $(MAKEDIR)\src
-	$(MAKE) -f blt.mak all
-	cd $(MAKEDIR)
-
-install: install-all
-
-install-all:
- 	wish$(v2)d.exe win/install.tcl $(v1) $(srcdir)
-
-clean:
-	cd $(MAKEDIR)\src
-	$(MAKE) -f blt.mak clean
-	cd $(MAKEDIR)
-	$(RM) *.bak *\~ "#"* *pure* .pure*
-
-distclean: clean
-
diff --git a/blt3.0/cf/config.guess b/blt3.0/cf/config.guess
deleted file mode 100755
index c7607c7..0000000
--- a/blt3.0/cf/config.guess
+++ /dev/null
@@ -1,1526 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
-
-timestamp='2008-04-14'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[456])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    EM64T | authenticamd)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
-	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/blt3.0/cf/config.sub b/blt3.0/cf/config.sub
deleted file mode 100755
index 63bfff0..0000000
--- a/blt3.0/cf/config.sub
+++ /dev/null
@@ -1,1669 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
-
-timestamp='2008-04-14'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
-	| mips64vr | mips64vrel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa*-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tile*)
-		basic_machine=tile-unknown
-		os=-linux-gnu
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-		os=-elf
-		;;
-        spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        c4x-* | tic4x-*)
-        	os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-        mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/blt3.0/cf/install-sh b/blt3.0/cf/install-sh
deleted file mode 100755
index 36f96f3..0000000
--- a/blt3.0/cf/install-sh
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd=$cpprog
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd=$stripprog
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "$0: no input file specified" >&2
-	exit 1
-else
-	:
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-
-	if [ -d "$dst" ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f "$src" ] || [ -d "$src" ]
-	then
-		:
-	else
-		echo "$0: $src does not exist" >&2
-		exit 1
-	fi
-
-	if [ x"$dst" = x ]
-	then
-		echo "$0: no destination specified" >&2
-		exit 1
-	else
-		:
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d "$dst" ]
-	then
-		dst=$dst/`basename "$src"`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp=$pathcomp$1
-	shift
-
-	if [ ! -d "$pathcomp" ] ;
-        then
-		$mkdirprog "$pathcomp"
-	else
-		:
-	fi
-
-	pathcomp=$pathcomp/
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd "$dst" &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		dstfile=`basename "$dst" $transformbasename |
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ]
-	then
-		dstfile=`basename "$dst"`
-	else
-		:
-	fi
-
-# Make a couple of temp file names in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-	rmtmp=$dstdir/#rm.$$#
-
-# Trap to clean up temp files at exit.
-
-	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-	trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
-	if [ -f "$dstdir/$dstfile" ]
-	then
-		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
-		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
-		{
-		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		  (exit 1); exit
-		}
-	else
-		:
-	fi
-} &&
-
-# Now rename the file to the real destination.
-
-	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-
-fi &&
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-
-{
-	(exit 0); exit
-}
diff --git a/blt3.0/cf/install.sh b/blt3.0/cf/install.sh
deleted file mode 100644
index ed46b48..0000000
--- a/blt3.0/cf/install.sh
+++ /dev/null
@@ -1,238 +0,0 @@
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/blt3.0/cf/ldAix b/blt3.0/cf/ldAix
deleted file mode 100644
index 199c125..0000000
--- a/blt3.0/cf/ldAix
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#
-# ldAix ldCmd ldArg ldArg ...
-#
-# This shell script provides a wrapper for ld under AIX in order to
-# create the .exp file required for linking.  Its arguments consist
-# of the name and arguments that would normally be provided to the
-# ld command.  This script extracts the names of the object files
-# from the argument list, creates a .exp file describing all of the
-# symbols exported by those files, and then invokes "ldCmd" to
-# perform the real link.
-#
-# SCCS: @(#) ldAix 1.8 97/02/21 14:50:27
-
-# Extract from the arguments the names of all of the object files.
-
-args=$*
-ofiles=""
-for i do
-    x=`echo $i | grep '[^.].o$'`
-    if test "$x" != ""; then
-	ofiles="$ofiles $i"
-    fi
-done
-
-# Create the export file from all of the object files, using nm followed
-# by sed editing.  Here are some tricky aspects of this:
-#
-# 1. Nm produces different output under AIX 4.1 than under AIX 3.2.5;
-#    the following statements handle both versions.
-# 2. Use the -g switch to nm instead of -e under 4.1 (this shows just
-#    externals, not statics;  -g isn't available under 3.2.5, though).
-# 3. Eliminate lines that end in ":": these are the names of object
-#    files (relevant in 4.1 only).
-# 4. Eliminate entries with the "U" key letter;  these are undefined
-#    symbols (relevant in 4.1 only).
-# 5. Eliminate lines that contain the string "0|extern" preceded by space;
-#    in 3.2.5, these are undefined symbols (address 0).
-# 6. Eliminate lines containing the "unamex" symbol.  In 3.2.5, these
-#    are also undefined symbols.
-# 7. If a line starts with ".", delete the leading ".", since this will
-#    just cause confusion later.
-# 8. Eliminate everything after the first field in a line, so that we're
-#    left with just the symbol name.
-
-nmopts="-g -C"
-osver=`uname -v`
-if test $osver -eq 3; then
-  nmopts="-e"
-fi
-rm -f lib.exp
-echo "#! " >lib.exp
-/usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ 	]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ 	|].*//' | sort | uniq >>lib.exp
-
-# Extract the name of the object file that we're linking.  If it's a .a
-# file, then link all the objects together into a single file "shr.o"
-# and then put that into the archive.  Otherwise link the object files
-# directly into the .a file.
-
-outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`
-noDotA=`echo $outputFile | sed -e '/\.a$/d'`
-echo "noDotA=\"$noDotA\""
-if test "$noDotA" = "" ; then
-    linkArgs=`echo $args | sed -e 's/-o .*\.a /-o shr.o /'`
-    echo $linkArgs
-    eval $linkArgs
-    echo ar cr $outputFile shr.o
-    ar cr $outputFile shr.o
-    rm -f shr.o
-else
-    eval $args
-fi
diff --git a/blt3.0/configure b/blt3.0/configure
deleted file mode 100755
index 83fc24c..0000000
--- a/blt3.0/configure
+++ /dev/null
@@ -1,11337 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
-
-ac_unique_file="src/bltInit.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-BLT_LIBRARY
-Z_LIB_SPEC
-XRENDER_LIB_SPEC
-XRANDR_LIB_SPEC
-XPM_LIB_SPEC
-XPM_INC_SPEC
-XFT_LIB_SPEC
-XFT_INC_SPEC
-XDMCP_LIB_SPEC
-XAU_LIB_SPEC
-X11_LIB_SPEC
-X11_INC_SPEC
-TK_XLIBSW
-TK_LIB_SPEC
-TK_INC_SPEC
-TIF_LIB_SPEC
-TIF_INC_SPEC
-TCL_VERSION
-TCL_LIB_SPEC
-TCL_LIB_DIR
-TCL_INC_SPEC
-TCL_DBGX
-PNG_LIB_SPEC
-PNG_INC_SPEC
-MYSQL_LIB_SPEC
-MYSQL_INC_SPEC
-LIB_SUFFIX
-LIB_PREFIX
-JPG_LIB_SPEC
-JPG_INC_SPEC
-INCLUDES
-GCCFLAGS
-FTCFG_LIB_SPEC
-FT2_LIB_SPEC
-FT2_INC_SPEC
-EXTRA_LIBS
-EXPAT_LIB_SPEC
-EXPAT_INC_SPEC
-DLL_PREFIX
-DEFINES
-BLT_VERSION
-BLT_MINOR_VERSION
-BLT_MAJOR_VERSION
-AUX_LIBS
-WIN32
-TK_STUBS_SPEC
-TCL_STUBS_SPEC
-IMPLIB_EXT
-IMPLIB_PREFIX
-BLT_LIB_SUFFIX
-BLT_SO_PREFIX
-LD_RUN_PATH
-BLT_SO_EXT
-BLT_SO_LIBS
-BLT_SO_LDFLAGS
-BLT_SO_LD
-BLT_TARGET
-BLT_SO_CFLAGS
-HAVE_INTTYPES_H
-XMKMF
-SIZEOF_FLOAT
-SIZEOF_VOID_P
-SIZEOF_LONG_LONG
-SIZEOF_LONG
-SIZEOF_INT
-EGREP
-GREP
-MKDIR_P
-LN_S
-RANLIB
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-AWK
-CPP
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-ac_prefix_program
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_blt
-with_tcl
-with_tk
-with_tclincdir
-with_tkincdir
-with_tcllibdir
-with_tklibdir
-with_jpegincdir
-with_jpeglibdir
-with_tiffincdir
-with_tifflibdir
-with_pngincdir
-with_pnglibdir
-with_zlibdir
-with_xpmincdir
-with_xpmlibdir
-with_freetype2incdir
-with_freetype2libdir
-with_xftincdir
-with_xftlibdir
-with_expatincdir
-with_expatlibdir
-with_mysqlincdir
-with_mysqllibdir
-with_gnu_ld
-enable_shared
-enable_symbols
-enable_stubs
-with_x
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP
-XMKMF'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-X features:
-  --x-includes=DIR    X include files are in DIR
-  --x-libraries=DIR   X library files are in DIR
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-shared         created shared libraries
-  --enable-symbols        compile with debugging symbols
-  --enable-stubs          compile with stubbed version of Tcl library
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-blt=DIR          install BLT scripts in DIR
-  --with-tcl=DIR          find tclConfig.sh in DIR
-  --with-tk=DIR           find tkConfig.sh in DIR
-  --with-tclincdir=DIR    find Tcl includes in DIR
-  --with-tkincdir=DIR     find Tk includes in DIR
-  --with-tcllibdir=DIR    find Tcl libraries in DIR
-  --with-tklibdir=DIR     find Tk libraries in DIR
-  --with-jpegincdir=DIR   find JPEG headers in DIR
-  --with-jpeglibdir=DIR   find JPEG libraries in DIR
-  --with-tiffincdir=DIR   find TIFF headers in DIR
-  --with-tifflibdir=DIR   find TIFF libraries in DIR
-  --with-pngincdir=DIR    find PNG headers in DIR
-  --with-pnglibdir=DIR    find PNG libraries in DIR
-  --with-zlibdir=DIR      find zlib libraries in DIR
-  --with-xpmincdir=DIR    find XPM headers in DIR
-  --with-xpmlibdir=DIR    find XPM libraries in DIR
-  --with-freetype2incdir=DIR
-                          find freetype2 headers in DIR
-  --with-freetype2libdir=DIR
-                          find freetype2 libraries in DIR
-  --with-xftincdir=DIR    find Xft headers in DIR
-  --with-xftlibdir=DIR    find Xft libraries in DIR
-  --with-expatincdir=DIR  find expat headers in DIR
-  --with-expatlibdir=DIR  find expat libraries in DIR
-  --with-mysqlincdir=DIR  find mysql headers in DIR
-  --with-mysqllibdir=DIR  find mysql libraries in DIR
-  --with-gnu-ld           use GNU linker
-  --with-x                use the X Window System
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-  XMKMF       Path to xmkmf, Makefile generator for X Window System
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to the package provider.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.65
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid; break
-else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
-else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
-  ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
-  fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_compute_int
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-	 return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
-
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $2
-  (void) $2;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_decl
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_config_headers="$ac_config_headers src/config.h"
-
-ac_aux_dir=
-for ac_dir in cf "$srcdir"/cf; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in cf \"$srcdir\"/cf" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-
-
-# -----------------------------------------------------------------------
-#
-# 	Handle command line options
-#
-#		--with-tcl=DIR
-#		--with-tk=DIR
-#		--with-cflags=flags	This is probably for me only
-#		--with-gnu-ld
-#
-# -----------------------------------------------------------------------
-
-INC_SPECS=""
-loader_run_path=""
-DEFINES=""
-
-
-blt_enable_symbols="no"
-blt_enable_shared="yes"
-blt_with_expat_include_dir="yes"
-blt_with_expat_lib_dir="yes"
-blt_with_ft2_include_dir="yes"
-blt_with_ft2_lib_dir="yes"
-blt_with_gnu_ld="no"
-blt_with_jpeg_include_dir="yes"
-blt_with_jpeg_lib_dir="yes"
-blt_with_mysql_include_dir="yes"
-blt_with_mysql_lib_dir="yes"
-blt_with_png_include_dir="yes"
-blt_with_png_lib_dir="yes"
-blt_with_z_lib_dir="yes"
-blt_with_scriptdir=""
-blt_with_tcl=""
-blt_with_tcl_include_dir="yes"
-blt_with_tcl_lib_dir="yes"
-blt_with_tiff_include_dir="yes"
-blt_with_tiff_lib_dir="yes"
-blt_with_tk=""
-blt_with_tk_include_dir="yes"
-blt_with_tk_lib_dir="yes"
-blt_with_xft_include_dir="yes"
-blt_with_xft_lib_dir="yes"
-blt_with_xpm_include_dir="yes"
-blt_with_xpm_lib_dir="yes"
-
-
-# Check whether --with-blt was given.
-if test "${with_blt+set}" = set; then :
-  withval=$with_blt; blt_with_scriptdir=$withval
-fi
-
-
-# Check whether --with-tcl was given.
-if test "${with_tcl+set}" = set; then :
-  withval=$with_tcl;  blt_with_tcl=$withval
-fi
-
-
-# Check whether --with-tk was given.
-if test "${with_tk+set}" = set; then :
-  withval=$with_tk;  blt_with_tk=$withval
-fi
-
-
-# Check whether --with-tclincdir was given.
-if test "${with_tclincdir+set}" = set; then :
-  withval=$with_tclincdir; blt_with_tcl_include_dir=$withval
-fi
-
-
-# Check whether --with-tkincdir was given.
-if test "${with_tkincdir+set}" = set; then :
-  withval=$with_tkincdir; blt_with_tk_include_dir=$withval
-fi
-
-
-# Check whether --with-tcllibdir was given.
-if test "${with_tcllibdir+set}" = set; then :
-  withval=$with_tcllibdir; blt_with_tcl_lib_dir=$withval
-fi
-
-
-# Check whether --with-tklibdir was given.
-if test "${with_tklibdir+set}" = set; then :
-  withval=$with_tklibdir; blt_with_tk_lib_dir=$withval
-fi
-
-
-# Check whether --with-jpegincdir was given.
-if test "${with_jpegincdir+set}" = set; then :
-  withval=$with_jpegincdir; unset ac_cv_header_jpeglib_h; blt_with_jpeg_include_dir=$withval
-fi
-
-
-# Check whether --with-jpeglibdir was given.
-if test "${with_jpeglibdir+set}" = set; then :
-  withval=$with_jpeglibdir; unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
-   blt_with_jpeg_lib_dir=$withval
-fi
-
-
-# --with-tiffincdir
-
-# Check whether --with-tiffincdir was given.
-if test "${with_tiffincdir+set}" = set; then :
-  withval=$with_tiffincdir; blt_with_tiff_include_dir=$withval
-fi
-
-# --with-tifflibdir
-
-# Check whether --with-tifflibdir was given.
-if test "${with_tifflibdir+set}" = set; then :
-  withval=$with_tifflibdir; blt_with_tiff_lib_dir=$withval
-fi
-
-# --with-pngincdir
-
-# Check whether --with-pngincdir was given.
-if test "${with_pngincdir+set}" = set; then :
-  withval=$with_pngincdir; blt_with_png_include_dir=$withval
-fi
-
-# --with-pnglibdir
-
-# Check whether --with-pnglibdir was given.
-if test "${with_pnglibdir+set}" = set; then :
-  withval=$with_pnglibdir; blt_with_png_lib_dir=$withval
-fi
-
-# --with-zlibdir
-
-# Check whether --with-zlibdir was given.
-if test "${with_zlibdir+set}" = set; then :
-  withval=$with_zlibdir; blt_with_z_lib_dir=$withval
-fi
-
-# --with-xpmincdir
-
-# Check whether --with-xpmincdir was given.
-if test "${with_xpmincdir+set}" = set; then :
-  withval=$with_xpmincdir; blt_with_xpm_include_dir=$withval
-fi
-
-# --with-xpmlibdir
-
-# Check whether --with-xpmlibdir was given.
-if test "${with_xpmlibdir+set}" = set; then :
-  withval=$with_xpmlibdir; blt_with_xpm_lib_dir=$withval
-fi
-
-# --with-freetype2incdir
-
-# Check whether --with-freetype2incdir was given.
-if test "${with_freetype2incdir+set}" = set; then :
-  withval=$with_freetype2incdir; blt_with_ft2_include_dir=$withval
-fi
-
-# --with-freetype2libdir
-
-# Check whether --with-freetype2libdir was given.
-if test "${with_freetype2libdir+set}" = set; then :
-  withval=$with_freetype2libdir; blt_with_ft2_lib_dir=$withval
-fi
-
-# --with-xftincdir
-
-# Check whether --with-xftincdir was given.
-if test "${with_xftincdir+set}" = set; then :
-  withval=$with_xftincdir; blt_with_xft_include_dir=$withval
-fi
-
-# --with-xftlibdir
-
-# Check whether --with-xftlibdir was given.
-if test "${with_xftlibdir+set}" = set; then :
-  withval=$with_xftlibdir; blt_with_xft_lib_dir=$withval
-fi
-
-# --with-expatincdir
-
-# Check whether --with-expatincdir was given.
-if test "${with_expatincdir+set}" = set; then :
-  withval=$with_expatincdir; blt_with_expat_include_dir=$withval
-fi
-
-# --with-expatlibdir
-
-# Check whether --with-expatlibdir was given.
-if test "${with_expatlibdir+set}" = set; then :
-  withval=$with_expatlibdir; blt_with_expat_lib_dir=$withval
-fi
-
-# --with-mysqlincdir
-
-# Check whether --with-mysqlincdir was given.
-if test "${with_mysqlincdir+set}" = set; then :
-  withval=$with_mysqlincdir; blt_with_mysql_include_dir=$withval
-fi
-
-# --with-mysqllibdir
-
-# Check whether --with-mysqllibdir was given.
-if test "${with_mysqllibdir+set}" = set; then :
-  withval=$with_mysqllibdir; blt_with_mysql_lib_dir=$withval
-fi
-
-
-
-# Check whether --with-gnu_ld was given.
-if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; blt_with_gnu_ld="yes"
-fi
-
-
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; blt_enable_shared=$enableval
-fi
-
-
-# Check whether --enable-symbols was given.
-if test "${enable_symbols+set}" = set; then :
-  enableval=$enable_symbols; blt_enable_symbols=$enableval
-fi
-
-# Check whether --enable-stubs was given.
-if test "${enable_stubs+set}" = set; then :
-  enableval=$enable_stubs; blt_enable_stubs=$enableval
-fi
-
-
-EXPAT_INC_SPEC=""
-EXPAT_LIB_SPEC=""
-FTCFG_LIB_SPEC=""
-FT2_INC_SPEC=""
-FT2_LIB_SPEC=""
-XFT_INC_SPEC=""
-XFT_LIB_SPEC=""
-JPG_INC_SPEC=""
-JPG_LIB_SPEC=""
-MYSQL_INC_SPEC=""
-MYSQL_LIB_SPEC=""
-PNG_INC_SPEC=""
-PNG_LIB_SPEC=""
-TCL_INC_SPEC=""
-TCL_LIB_SPEC=""
-TIF_INC_SPEC=""
-TIF_LIB_SPEC=""
-TK_INC_SPEC=""
-TK_LIB_SPEC=""
-XPM_INC_SPEC=""
-XPM_LIB_SPEC=""
-XRANDR_LIB_SPEC=""
-XRENDER_LIB_SPEC=""
-XAU_LIB_SPEC=""
-XDMCP_LIB_SPEC=""
-Z_LIB_SPEC=""
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-if test "x$prefix" = xNONE; then
-  $as_echo_n "checking for prefix by " >&6
-  # Extract the first word of "wish", so it can be a program name with args.
-set dummy wish; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_prefix_program+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_prefix_program in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_prefix_program=$ac_cv_path_ac_prefix_program
-if test -n "$ac_prefix_program"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prefix_program" >&5
-$as_echo "$ac_prefix_program" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  if test -n "$ac_prefix_program"; then
-    prefix=`$as_dirname -- "$ac_prefix_program" ||
-$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
-	 X"$ac_prefix_program" : 'X\(//\)$' \| \
-	 X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_prefix_program" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-    prefix=`$as_dirname -- "$prefix" ||
-$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$prefix" : 'X\(//\)[^/]' \| \
-	 X"$prefix" : 'X\(//\)$' \| \
-	 X"$prefix" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$prefix" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  fi
-fi
-
-
-# -----------------------------------------------------------------------
-# 	Set a variable containing current working directory if /bin/sh
-#	doesn't do it already.
-# -----------------------------------------------------------------------
-
-PWD=`pwd`
-
-# -----------------------------------------------------------------------
-# Programs:	Check for existence of ranlib and install programs
-# -----------------------------------------------------------------------
-# -----------------------------------------------------------------------
-# 	C compiler and debugging flags
-# -----------------------------------------------------------------------
-
-if test "x${CC}" = "x" ; then
-  CC=cc
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-if test "x${GCC}" != "x" ; then
-  blt_have_gcc="yes"
-fi
-
-case $host_os in
-  *cygwin* | *mingw*)
-    blt_platform_win32="yes"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using MinGW compiler" >&5
-$as_echo_n "checking if using MinGW compiler... " >&6; }
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-#ifndef __MINGW32__
-    _cc_is_not_mingw_
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  blt_have_mingw=yes
-else
-  blt_have_mingw=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_have_mingw" >&5
-$as_echo "$blt_have_mingw" >&6; }
-    ;;
-  * )
-    blt_platform_win32="no"
-    ;;
-esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-if test "x${GCC}" != "x" ; then
-  blt_have_gcc="yes"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C compiler is really gcc" >&5
-$as_echo_n "checking if C compiler is really gcc... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-#ifndef __GNUC__
-    _cc_is_not_gcc_
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  blt_have_gcc=yes
-else
-  blt_have_gcc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_have_gcc" >&5
-$as_echo "$blt_have_gcc" >&6; }
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-  done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-  done
-IFS=$as_save_IFS
-
-fi
-
-  test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "" >/dev/null 2>&1; then :
-
-fi
-rm -f conftest*
-
-
-#
-# CFLAGS search order
-#
-#  1. command line (--with-cflags)
-#  2. cached variable ($blt_cv_prog_cflags)
-#  3. set to "-O3" if using gcc ($blt_have_gcc)
-#  4. otherwise, default to "-O"
-#
-
-# Setup default flags for the compiler.
-case $target:$blt_have_gcc:$blt_enable_symbols in
-  *-solaris2*:no:yes)
-#    CFLAGS="-g -xs -O"
-    ;;
-  *:yes:no)
-#    CFLAGS="-O3"
-    ;;
-  *:yes:yes)
-#    CFLAGS="-g -O3"
-    ;;
-  *:no:no)
-#    CFLAGS="-O"
-    ;;
-  *)
-#    CFLAGS="-g -O3"
-    ;;
-esac
-
-GCCFLAGS=""
-if test "${blt_have_gcc}" = "yes" ; then
-  GCCFLAGS="-Wall -Wpointer-arith -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef"
-fi
-
-SO_PREFIX=""
-SO_EXT=""
-IMPLIB_SUFFIX=""
-IMPLIB_EXT=""
-
-case $target in
-  *-*-cygwin*|*-*-mingw*)
-    blt_platform="win"
-    if test "${blt_have_mingw}" = "yes" ; then
-      SO_PREFIX=""
-      SO_EXT=".dll"
-      IMPLIB_EXT=".lib"
-      IMPLIB_PREFIX=""
-    else
-      SO_PREFIX="cyg"
-      SO_EXT=".dll"
-      IMPLIB_EXT=".dll.a"
-      IMPLIB_PREFIX="lib"
-    fi
-    ;;
-  *-hpux*)
-    SO_EXT=".sl"
-    blt_platform="unix"
-    SO_PREFIX="lib"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;
-  *-*-darwin*)
-    blt_platform="macosx"
-    SO_EXT=".dylib"
-    SO_PREFIX="lib"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;
-  *)
-    blt_platform="unix"
-    SO_PREFIX="lib"
-    SO_EXT=".so"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;
-esac
-
-build_shared="yes"
-if test $blt_enable_symbols = "yes" ; then
-  LIB_SUFFIX=g
-fi
-
-# -----------------------------------------------------------------------
-# Hardware characteristics:
-# -----------------------------------------------------------------------
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-	       not a universal capable compiler
-	     #endif
-	     typedef int dummy;
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-	# Check for potential -arch flags.  It is not universal unless
-	# there are at least two -arch flags with different values.
-	ac_arch=
-	ac_prev=
-	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-	 if test -n "$ac_prev"; then
-	   case $ac_word in
-	     i?86 | x86_64 | ppc | ppc64)
-	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-		 ac_arch=$ac_word
-	       else
-		 ac_cv_c_bigendian=universal
-		 break
-	       fi
-	       ;;
-	   esac
-	   ac_prev=
-	 elif test "x$ac_word" = "x-arch"; then
-	   ac_prev=arch
-	 fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-	     #include <sys/param.h>
-
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-		     && LITTLE_ENDIAN)
-	      bogus endian macros
-	     #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-		#include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-		 not big endian
-		#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-	      bogus endian macros
-	     #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
-		 not big endian
-		#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-		short int ascii_ii[] =
-		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-		int use_ascii (int i) {
-		  return ascii_mm[i] + ascii_ii[i];
-		}
-		short int ebcdic_ii[] =
-		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-		short int ebcdic_mm[] =
-		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-		int use_ebcdic (int i) {
-		  return ebcdic_mm[i] + ebcdic_ii[i];
-		}
-		extern int foo;
-
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-	      ac_cv_c_bigendian=yes
-	    fi
-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-	      if test "$ac_cv_c_bigendian" = unknown; then
-		ac_cv_c_bigendian=no
-	      else
-		# finding both strings is unlikely to happen, but who knows?
-		ac_cv_c_bigendian=unknown
-	      fi
-	    fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-
-	     /* Are we little or big endian?  From Harbison&Steele.  */
-	     union
-	     {
-	       long int l;
-	       char c[sizeof (long int)];
-	     } u;
-	     u.l = 1;
-	     return u.c[sizeof (long int) - 1] == 1;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
-   no)
-      ;; #(
-   universal)
-
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
-
-     ;; #(
-   *)
-     as_fn_error "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
-if test "${ac_cv_sizeof_void_p+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_void_p" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (void *)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_void_p=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
-$as_echo_n "checking size of float... " >&6; }
-if test "${ac_cv_sizeof_float+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (float)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_float=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
-$as_echo "$ac_cv_sizeof_float" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_FLOAT $ac_cv_sizeof_float
-_ACEOF
-
-
-
-# Save the values as shell variables so that we can substitute them
-# into bltHash.h for situtations where there's no bltInt.h.
-
-SIZEOF_INT=${ac_cv_sizeof_int}
-
-SIZEOF_LONG=${ac_cv_sizeof_long}
-
-SIZEOF_LONG_LONG=${ac_cv_sizeof_long_long}
-
-SIZEOF_VOID_P=${ac_cv_sizeof_void_p}
-
-SIZEOF_FLOAT=${ac_cv_sizeof_float}
-
-
-
-# -----------------------------------------------------------------------
-# Libraries:
-# -----------------------------------------------------------------------
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
-$as_echo_n "checking for main in -lm... " >&6; }
-if test "${ac_cv_lib_m_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_main=yes
-else
-  ac_cv_lib_m_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
-$as_echo "$ac_cv_lib_m_main" >&6; }
-if test "x$ac_cv_lib_m_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
-$as_echo_n "checking for main in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_main=yes
-else
-  ac_cv_lib_nsl_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
-$as_echo "$ac_cv_lib_nsl_main" >&6; }
-if test "x$ac_cv_lib_nsl_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
-
-  LIBS="-lnsl $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
-$as_echo_n "checking for main in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_main=yes
-else
-  ac_cv_lib_socket_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
-$as_echo "$ac_cv_lib_socket_main" >&6; }
-if test "x$ac_cv_lib_socket_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
-
-  LIBS="-lsocket $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dld_shl_load=yes
-else
-  ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
-  blt_have_dld=yes
-else
-  blt_have_dld=no
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
-$as_echo_n "checking for X... " >&6; }
-
-
-# Check whether --with-x was given.
-if test "${with_x+set}" = set; then :
-  withval=$with_x;
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
-    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
-  cd conftest.dir
-  cat >Imakefile <<'_ACEOF'
-incroot:
-	@echo incroot='${INCROOT}'
-usrlibdir:
-	@echo usrlibdir='${USRLIBDIR}'
-libdir:
-	@echo libdir='${LIBDIR}'
-_ACEOF
-  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    for ac_var in incroot usrlibdir libdir; do
-      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
-    done
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl dylib la dll; do
-      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
-	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
-	ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case $ac_im_incroot in
-	/usr/include) ac_x_includes= ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
-    esac
-    case $ac_im_usrlibdir in
-	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
-    esac
-  fi
-  cd ..
-  rm -f -r conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
-
-if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Xlib.h.
-  # First, try using that file with no special directory specified.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Xlib.h"; then
-    ac_x_includes=$ac_dir
-    break
-  fi
-done
-fi
-rm -f conftest.err conftest.$ac_ext
-fi # $ac_x_includes = no
-
-if test "$ac_x_libraries" = no; then
-  # Check for the libraries.
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS=$LIBS
-  LIBS="-lX11 $LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize ()
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  LIBS=$ac_save_LIBS
-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
-  # Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl dylib la dll; do
-    if test -r "$ac_dir/libX11.$ac_extension"; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-case $ac_x_includes,$ac_x_libraries in #(
-  no,* | *,no | *\'*)
-    # Didn't find X, or a directory has "'" in its name.
-    ac_cv_have_x="have_x=no";; #(
-  *)
-    # Record where we found X for the cache.
-    ac_cv_have_x="have_x=yes\
-	ac_x_includes='$ac_x_includes'\
-	ac_x_libraries='$ac_x_libraries'"
-esac
-fi
-;; #(
-    *) have_x=yes;;
-  esac
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
-$as_echo "$have_x" >&6; }
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes\
-	ac_x_includes='$x_includes'\
-	ac_x_libraries='$x_libraries'"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
-$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
-fi
-
-
-# -----------------------------------------------------------------------
-# Headers:
-# -----------------------------------------------------------------------
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-
-int
-main ()
-{
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_sys_wait_h=yes
-else
-  ac_cv_header_sys_wait_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
-
-$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
-else
-  ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
-for ac_header in inttypes.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_inttypes_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_INTTYPES_H 1
-_ACEOF
-
-fi
-
-done
-
-if test "${ac_cv_header_inttypes_h}" = "yes" ; then
-  HAVE_INTTYPES_H="#define HAVE_INTTYPES_H 1"
-
-else
-  HAVE_INTTYPES_H="/* can't find inttypes.h */"
-
-fi
-for ac_header in limits.h sys/param.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in string.h ctype.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in errno.h float.h math.h ieeefp.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in sys/time.h waitflags.h sys/wait.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in malloc.h memory.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in setjmp.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_setjmp_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SETJMP_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in stdlib.h stddef.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# FREETYPE2 header
-if test "${blt_with_ft2_include_dir}" != "no" ; then
-  ft2_inc_spec=`freetype-config --cflags`
-  save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="${ft2_inc_spec}"
-  for ac_header in ft2build.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
-if test "x$ac_cv_header_ft2build_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_FT2BUILD_H 1
-_ACEOF
- FT2_INC_SPEC=${ft2_inc_spec}
-else
-  FT2_INC_SPEC=""
-fi
-
-done
-
-  CPPFLAGS=${save_CPPFLAGS}
-
-  # Xft header
-  if test "${blt_with_xft_include_dir}" != "no" ; then
-
-  if test "$blt_with_xft_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_xft_include_dir" != "yes" ; then
-      for dir in $blt_with_xft_include_dir $blt_with_xft_include_dir/include ; do
-        if test -r "${dir}/X11/Xft/Xft.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  XFT_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/X11/Xft/Xft.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  XFT_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS="${ft2_inc_spec} ${new_CPPFLAGS}"
-    for ac_header in X11/Xft/Xft.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
-if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_X11_XFT_XFT_H 1
-_ACEOF
- XFT_INC_SPEC="${new_CPPFLAGS}"
-else
-  XFT_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-  fi
-fi
-
-# EXPAT header
-if test "${blt_with_expat_include_dir}" != "no" ; then
-
-  if test "$blt_with_expat_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_expat_include_dir" != "yes" ; then
-      for dir in $blt_with_expat_include_dir $blt_with_expat_include_dir/include ; do
-        if test -r "${dir}/expat.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  EXPAT_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/expat.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  EXPAT_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in expat.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default"
-if test "x$ac_cv_header_expat_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_EXPAT_H 1
-_ACEOF
- EXPAT_INC_SPEC="${new_CPPFLAGS}"
-else
-  EXPAT_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# MYSQL header
-if test "${blt_with_mysql_include_dir}" != "no" ; then
-
-  if test "$blt_with_mysql_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_mysql_include_dir" != "yes" ; then
-      for dir in $blt_with_mysql_include_dir $blt_with_mysql_include_dir/include ; do
-        if test -r "${dir}/mysql/mysql.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  MYSQL_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/mysql/mysql.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  MYSQL_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in mysql/mysql.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "mysql/mysql.h" "ac_cv_header_mysql_mysql_h" "$ac_includes_default"
-if test "x$ac_cv_header_mysql_mysql_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MYSQL_MYSQL_H 1
-_ACEOF
- MYSQL_INC_SPEC="${new_CPPFLAGS}"
-else
-  MYSQL_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# XPM header
-if test "${blt_with_xpm_include_dir}" != "no" ; then
-
-  if test "$blt_with_xpm_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_xpm_include_dir" != "yes" ; then
-      for dir in $blt_with_xpm_include_dir $blt_with_xpm_include_dir/include ; do
-        if test -r "${dir}/X11/xpm.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  XPM_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/X11/xpm.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  XPM_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in X11/xpm.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
-if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_X11_XPM_H 1
-_ACEOF
- XPM_INC_SPEC="${new_CPPFLAGS}"
-else
-  XPM_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# JPEG header
-if test "${blt_with_jpeg_include_dir}" != "no" ; then
-
-  if test "$blt_with_jpeg_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_jpeg_include_dir" != "yes" ; then
-      for dir in $blt_with_jpeg_include_dir $blt_with_jpeg_include_dir/include ; do
-        if test -r "${dir}/jpeglib.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  JPG_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/jpeglib.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  JPG_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in jpeglib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
-if test "x$ac_cv_header_jpeglib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_JPEGLIB_H 1
-_ACEOF
- JPG_INC_SPEC="${new_CPPFLAGS}"
-else
-  JPG_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# TIFF header
-if test "${blt_with_tiff_include_dir}" != "no" ; then
-
-  if test "$blt_with_tiff_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_tiff_include_dir" != "yes" ; then
-      for dir in $blt_with_tiff_include_dir $blt_with_tiff_include_dir/include ; do
-        if test -r "${dir}/tiff.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  TIF_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/tiff.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  TIF_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in tiff.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "tiff.h" "ac_cv_header_tiff_h" "$ac_includes_default"
-if test "x$ac_cv_header_tiff_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TIFF_H 1
-_ACEOF
- TIF_INC_SPEC="${new_CPPFLAGS}"
-else
-  TIF_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# PNG header
-if test "${blt_with_png_include_dir}" != "no" ; then
-
-  if test "$blt_with_png_include_dir" != "no" ; then
-    new_CPPFLAGS=""
-    if test "$blt_with_png_include_dir" != "yes" ; then
-      for dir in $blt_with_png_include_dir $blt_with_png_include_dir/include ; do
-        if test -r "${dir}/png.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  PNG_INC_DIR="$dir"
-	  break
-        fi
-      done
-    else
-      for dir in $prefix $prefix/include ; do
-        if test -r "${dir}/png.h" ; then
-	  new_CPPFLAGS="-I${dir}"
-	  PNG_INC_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    save_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=" ${new_CPPFLAGS}"
-    for ac_header in png.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
-if test "x$ac_cv_header_png_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PNG_H 1
-_ACEOF
- PNG_INC_SPEC="${new_CPPFLAGS}"
-else
-  PNG_INC_SPEC=""
-fi
-
-done
-
-    CPPFLAGS=${save_CPPFLAGS}
-  fi
-
-fi
-
-# -----------------------------------------------------------------------
-# Types:
-# -----------------------------------------------------------------------
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union wait is defined correctly" >&5
-$as_echo_n "checking whether union wait is defined correctly... " >&6; }
-if test "${blt_cv_struct_wait_works+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-int
-main ()
-{
-
-    /*
-     *	Check whether <sys/wait.h> defines the type "union wait"
-     *	correctly.  It's needed because of weirdness in HP-UX where
-     *	"union wait" is defined in both the BSD and SYS-V  environments.
-     *	Checking the usability of WIFEXITED seems to do	the trick.
-     */
-    union wait x;
-    WIFEXITED(x);	/* Generates compiler error if WIFEXITED
-			 * uses an int. */
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  blt_cv_struct_wait_works="yes"
-else
-  blt_cv_struct_wait_works="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-if test "${blt_cv_struct_wait_works}" = "yes"; then
-
-$as_echo "#define HAVE_UNION_WAIT 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_cv_struct_wait_works" >&5
-$as_echo "$blt_cv_struct_wait_works" >&6; }
-
-
-# -----------------------------------------------------------------------
-#
-# Library Functions: 	Check for  drand48, and srand48.
-#
-# -----------------------------------------------------------------------
-
-for ac_func in strtolower strcasecmp strncasecmp drand48 srand48 finite isnan
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# For HPUX it's a little more complicated to search for isfinite
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite" >&5
-$as_echo_n "checking for isfinite... " >&6; }
-if test "${blt_cv_have_isfinite+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
-int
-main ()
-{
-
-double x = 1.0;
-if (isfinite(x)) {
-   return 0;
-}
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  blt_cv_have_isfinite="yes"
-else
-  blt_cv_have_isfinite="no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-if test "${blt_cv_have_isfinite}" = "yes"; then
-
-$as_echo "#define HAVE_ISFINITE 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_cv_have_isfinite" >&5
-$as_echo "$blt_cv_have_isfinite" >&6; }
-
-# -----------------------------------------------------------------------
-#
-# 	Check the smallest value such that 1.0 + x != 1.0.
-#	For ANSI compilers this is DBL_EPSILON in float.h
-#
-#--------------------------------------------------------------------
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DBL_EPSILON is defined in float.h" >&5
-$as_echo_n "checking whether DBL_EPSILON is defined in float.h... " >&6; }
-if test "${blt_cv_found_dbl_epsilon+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_FLOAT_H
-#include <float.h>
-#endif
-
-int
-main ()
-{
-
-#ifdef DBL_EPSILON
- exit(0);
-#else
- exit(1);
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  blt_cv_found_dbl_epsilon=yes
-else
-  blt_cv_found_dbl_epsilon=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blt_cv_found_dbl_epsilon}" >&5
-$as_echo "${blt_cv_found_dbl_epsilon}" >&6; }
-
-if test "${blt_cv_found_dbl_epsilon}" = "no" ; then
-  if test "${blt_cv_dbl_epsilon+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  old_flags="$CFLAGS"
-  CFLAGS="-lm"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DBL_EPSILON can be computed." >&5
-$as_echo_n "checking whether DBL_EPSILON can be computed.... " >&6; }
-  if test "$cross_compiling" = yes; then
-    as_fn_error "can not run test program while cross compiling" "$LINENO" 5
-else
-cat > conftest.$ac_ext <<EOF
-#line 6332 "configure"
-#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-
-main () {
-    double e, u;
-    /*
-     *	Check the smallest value such that 1.0 + x != 1.0.
-     *	For ANSI compilers this is DBL_EPSILON in float.h
-     */
-    u = 1.0;
-    for(;;) {
-       u *= 0.5;
-       if ((1.0 + u) == 1.0) {
-	   break;
-       }
-    }
-    e = u * 2.0;
-    printf("%.17e\n", e);
-    exit(0);
-}
-EOF
-eval $ac_link
-if test -s conftest && (./conftest > ./conftest.stdout; exit) 2>/dev/null; then
-   blt_cv_dbl_epsilon=`cat ./conftest.stdout`
-else
-   blt_cv_dbl_epsilon=""
-fi
-fi
-rm -fr conftest*
-    CFLAGS="$old_flags"
-
-cat >>confdefs.h <<_ACEOF
-#define BLT_DBL_EPSILON ${blt_cv_dbl_epsilon}
-_ACEOF
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blt_cv_dbl_epsilon}" >&5
-$as_echo "${blt_cv_dbl_epsilon}" >&6; }
-
-fi
-
-fi
-
-
-ac_fn_c_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_strcasecmp" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRCASECMP $ac_have_decl
-_ACEOF
-
-
-ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRNCASECMP $ac_have_decl
-_ACEOF
-
-
-ac_fn_c_check_decl "$LINENO" "strtolower" "ac_cv_have_decl_strtolower" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_strtolower" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRTOLOWER $ac_have_decl
-_ACEOF
-
-
-ac_fn_c_check_decl "$LINENO" "drand48" "ac_cv_have_decl_drand48" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_drand48" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_DRAND48 $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "srand48" "ac_cv_have_decl_srand48" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_srand48" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SRAND48 $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "j1" "ac_cv_have_decl_j1" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_j1" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_J1 $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "hypot" "ac_cv_have_decl_hypot" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_hypot" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_HYPOT $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_isnan" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ISNAN $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ISFINITE $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "finite" "ac_cv_have_decl_finite" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_finite" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FINITE $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-"
-if test "x$ac_cv_have_decl_free" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FREE $ac_have_decl
-_ACEOF
-
-
-# -----------------------------------------------------------------------
-#
-# System services: 	X, Tcl, Tk
-#
-# -----------------------------------------------------------------------
-
-if test "x${x_libraries}" = "x" ; then
-  X11_LIB_SPEC="-lX11"
-else
-  X11_LIB_SPEC="-L${x_libraries} -lX11"
-fi
-if test "x${x_includes}" = "x" ; then
-  X11_INC_SPEC=""
-else
-  X11_INC_SPEC="-I${x_includes}"
-fi
-
-case "$target_cpu" in
-  i[3-9]86|x86*|k5|k6|k6-2|k6-3|pentium*|athlon*)
-
-$as_echo "#define HAVE_X86 1" >>confdefs.h
-
-    ;;
-  *)
-    ;;
-esac
-
-# -----------------------------------------------------------------------
-#
-#	Find the Tcl build configuration file "tclConfig.sh"
-#
-# -----------------------------------------------------------------------
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
-$as_echo_n "checking for tclConfig.sh... " >&6; }
-tcl_config_sh=""
-if test "x$blt_with_tcl" != "x" ; then
-
-  # Verify that a tclConfig.sh file exists in the directory specified
-  # by --with-tcl.
-
-  for dir in \
-   $blt_with_tcl
-  do
-    if test -r "$dir/tclConfig.sh" ; then
-      tcl_config_sh="$dir/tclConfig.sh"
-      break
-    elif test -r "$dir/lib/tclConfig.sh" ; then
-      tcl_config_sh="$dir/lib/tclConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tclConfig.sh" ; then
-      tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-      break
-    fi
-  done
-elif test "${blt_with_tcl_include_dir}" = "yes" -a \
-	  "${blt_with_tcl_lib_dir}" = "yes" ; then
-
-  # Otherwise, search for Tcl configuration file.
-
-  #  1. Search previously named locations.
-
-  for dir in \
-   $prefix \
-   $exec_prefix \
-   $blt_cv_tcl_lib
-  do
-    if test -r "$dir/tclConfig.sh" ; then
-      tcl_config_sh="$dir/tclConfig.sh"
-      break
-    elif test -r "$dir/lib/tclConfig.sh" ; then
-      tcl_config_sh="$dir/lib/tclConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tclConfig.sh" ; then
-      tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-      break
-    fi
-  done
-
-  #  2. Search source directories.
-
-  if test "x$tcl_config_sh" = "x" ; then
-    for dir in \
-     `ls -dr ../tcl[7-9].[0-9]* 2>/dev/null` \
-     ../tcl \
-     `ls -dr ../../tcl[7-9].[0-9]* 2>/dev/null` \
-     ../../tcl \
-     `ls -dr ../../../tcl[7-9].[0-9]* 2>/dev/null` \
-     ../../../tcl
-    do
-      if test -r "$dir/$blt_platform/tclConfig.sh" ; then
-	tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-	break
-      fi
-    done
-  fi
-
-  #  3. Search standard locations.
-
-  if test "x$tcl_config_sh" = "x" ; then
-    for dir in \
-     /usr/local \
-     /usr
-    do
-      if test -r "$dir/tclConfig.sh" ; then
-	tcl_config_sh="$dir/tclConfig.sh"
-	break
-      elif test -r "$dir/lib/tclConfig.sh" ; then
-	tcl_config_sh="$dir/lib/tclConfig.sh"
-	break
-      fi
-    done
-  fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_config_sh}" >&5
-$as_echo "${tcl_config_sh}" >&6; }
-
-
-# -----------------------------------------------------------------------
-#
-#	Find the Tk build configuration file "tkConfig.sh"
-#
-# -----------------------------------------------------------------------
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkConfig.sh" >&5
-$as_echo_n "checking for tkConfig.sh... " >&6; }
-tk_config_sh=""
-if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
-
-  # Verify that a tkConfig.sh file exists in the directory specified
-  # by --with-tcl or --with-tk.
-
-  for dir in \
-   $blt_with_tk \
-   $blt_with_tcl
-  do
-    if test -r "$dir/tkConfig.sh" ; then
-      tk_config_sh="$dir/tkConfig.sh"
-      break
-    elif test -r "$dir/lib/tkConfig.sh" ; then
-      tk_config_sh="$dir/lib/tkConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tkConfig.sh" ; then
-      tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-      break
-    fi
-  done
-elif test "${blt_with_tk_include_dir}" = "yes" -a \
-	  "${blt_with_tk_lib_dir}" = "yes" ; then
-
-  # Search for Tk configuration file.
-
-  #  1. Search previously named locations.
-
-  for dir in \
-   $prefix \
-   $exec_prefix \
-   $blt_cv_tk_lib \
-   $blt_cv_tcl_lib
-  do
-    if test -r "$dir/tkConfig.sh" ; then
-      tk_config_sh="$dir/tkConfig.sh"
-      break
-    elif test -r "$dir/lib/tkConfig.sh" ; then
-      tk_config_sh="$dir/lib/tkConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tkConfig.sh" ; then
-      tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-      break
-    fi
-  done
-
-  #  2. Search source directories.
-
-  if test "x$tk_config_sh" = "x" ; then
-    for dir in \
-     ../tcl \
-     `ls -dr ../tk[4-9].[0-9]* 2>/dev/null` \
-     ../../tcl \
-     `ls -dr ../../tk[4-9].[0-9]* 2>/dev/null` \
-     ../../../tcl \
-     `ls -dr ../../../tk[4-9].[0-9]* 2>/dev/null`
-    do
-      if test -r "$dir/$blt_platform/tkConfig.sh"; then
-	tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-	break
-      fi
-    done
-  fi
-
-  #  3. Search standard locations.
-
-  if test "x$tk_config_sh" = "x" ; then
-    for dir in \
-     /usr/local \
-     ${x_libraries} \
-     /usr
-    do
-      if test -r "$dir/tkConfig.sh" ; then
-	tk_config_sh="$dir/tkConfig.sh"
-	break
-      elif test -r "$dir/lib/tkConfig.sh" ; then
-	tk_config_sh="$dir/lib/tkConfig.sh"
-	break
-      fi
-    done
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tk_config_sh}" >&5
-$as_echo "${tk_config_sh}" >&6; }
-
-# -----------------------------------------------------------------------
-#
-#	Source in the Tcl/Tk configuration scripts.
-#
-#
-#	Check for tclConfig.sh and tkConfig.sh.  If found use values
-#	in file, but don't check if libraries exist.
-#
-# -----------------------------------------------------------------------
-
-if test "x${tcl_config_sh}" != "x" ; then
-  . $tcl_config_sh
-  TCL_INC_SPEC=${TCL_INCLUDE_SPEC}
-fi
-
-if test "x${tk_config_sh}" != "x" ; then
-  . $tk_config_sh
-  TK_INC_SPEC=${TK_INCLUDE_SPEC}
-fi
-
-tcl_includes_dir=""
-tk_includes_dir=""
-TCL_INC_SPEC=${TCL_INCLUDE_SPEC}
-TK_INC_SPEC=${TK_INCLUDE_SPEC}
-
-if test "${blt_with_tcl_include_dir}" = "no" ; then
-  as_fn_error "Can't find tcl.h: use --with-tclincdir switch" "$LINENO" 5
-elif test "${blt_with_tcl_include_dir}" != "yes" ; then
-  if test -r "${blt_with_tcl_include_dir}/tcl.h" ; then
-    tcl_includes_dir=${blt_with_tcl_include_dir}
-    TCL_INC_SPEC="-I${tcl_includes_dir}"
-    cat > conftest.awk <<EOF
-/^# *define *TCL_MAJOR_VERSION[ \t]/ { print \$3 }
-EOF
-TCL_MAJOR_VERSION=`${AWK} -f conftest.awk "${tcl_includes_dir}/tcl.h"`
-rm -rf conftest*
-    cat > conftest.awk <<EOF
-/^# *define *TCL_MINOR_VERSION[ \t]/ { print \$3 }
-EOF
-TCL_MINOR_VERSION=`${AWK} -f conftest.awk "${tcl_includes_dir}/tcl.h"`
-rm -rf conftest*
-    TCL_VERSION=${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}
-  else
-    as_fn_error "Can't find tcl.h in \"${blt_with_tcl_include_dir}\"" "$LINENO" 5
-  fi
-else
-  for dir in \
-   ${TCL_PREFIX}/include \
-   ${TCL_SRC_DIR}/generic  \
-    /usr/local/include \
-    /usr/include
-  do
-    if test -r "$dir/tcl.h" ; then
-      tcl_includes_dir=$dir
-      break
-    fi
-  done
-  if test "x${tcl_includes_dir}" = "x" ; then
-    as_fn_error "Can't find tcl.h header file." "$LINENO" 5
-  fi
-fi
-
-if test "${blt_with_tk_include_dir}" = "no" ; then
-  as_fn_error "Can't find tk.h: use --with-tkincdir switch" "$LINENO" 5
-elif test "${blt_with_tk_include_dir}" != "yes" ; then
-  if test -r "${blt_with_tk_include_dir}/tk.h" ; then
-    tk_includes_dir=${blt_with_tk_include_dir}
-    TK_INC_SPEC="-I${tk_includes_dir}"
-    cat > conftest.awk <<EOF
-/^# *define *TK_MAJOR_VERSION[ \t]/ { print \$3 }
-EOF
-TK_MAJOR_VERSION=`${AWK} -f conftest.awk "${tk_includes_dir}/tk.h"`
-rm -rf conftest*
-    cat > conftest.awk <<EOF
-/^# *define *TK_MINOR_VERSION[ \t]/ { print \$3 }
-EOF
-TK_MINOR_VERSION=`${AWK} -f conftest.awk "${tk_includes_dir}/tk.h"`
-rm -rf conftest*
-    TK_VERSION=${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}
-  else
-    as_fn_error "Can't find tk.h in \"${blt_with_tk_include_dir}\"" "$LINENO" 5
-  fi
-else
-  for dir in \
-   ${TK_PREFIX}/include \
-   ${TK_SRC_DIR}/generic \
-   ${tcl_includes_dir} \
-    /usr/local/include \
-    /usr/include
-  do
-    if test -r "$dir/tk.h" ; then
-      tk_includes_dir=$dir
-      break
-    fi
-  done
-  if test "x${tk_includes_dir}" = "x" ; then
-    as_fn_error "Can't find tk.h header file." "$LINENO" 5
-  fi
-fi
-
-case $target in
-  *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
-    TCL_LIB_VERSION="${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
-    TK_LIB_VERSION="${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
-    ;;
-  *)
-    TCL_LIB_VERSION="${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
-    TK_LIB_VERSION="${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
-    ;;
-esac
-
-if test "${blt_with_tcl_lib_dir}" = "no" ; then
-  as_fn_error "Can't find Tcl library: use --with-tcllibdir switch" "$LINENO" 5
-elif test "${blt_with_tcl_lib_dir}" = "yes" ; then
-  for libname in \
-   "${TCL_EXEC_PREFIX}/lib/${SO_PREFIX}tcl${TCL_LIB_VERSION}${SO_EXT}" \
-   "${TCL_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}${IMPLIB_EXT}" \
-   "${TCL_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}.lib" \
-   "${TCL_EXEC_PREFIX}/lib/libtcl${TCL_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TCL_LIB_DIR="${TCL_EXEC_PREFIX}/lib"
-      TCL_LIB_SPEC="-L${TCL_LIB_DIR} -ltcl${TCL_LIB_VERSION}"
-      break
-    fi
-  done
-else
-  for libname in \
-   "${blt_with_tcl_lib_dir}/${SO_PREFIX}tcl${TCL_LIB_VERSION}${SO_EXT}" \
-   "${blt_with_tcl_lib_dir}/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}${IMPLIB_EXT}" \
-   "${blt_with_tcl_lib_dir}/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}.lib" \
-   "${blt_with_tcl_lib_dir}/libtcl${TCL_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TCL_LIB_DIR="${blt_with_tcl_lib_dir}"
-      TCL_LIB_SPEC="-L${TCL_LIB_DIR} -ltcl${TCL_LIB_VERSION}"
-      break
-    fi
-  done
-fi
-if test "x${TCL_LIB_DIR}" = "x" ; then
-  as_fn_error "Can't find tcl library ${libname} in \"${blt_with_tcl_lib_dir}\"" "$LINENO" 5
-fi
-
-if test "${blt_with_tk_lib_dir}" = "no" ; then
-  as_fn_error "Can't find Tcl library: use --with-tcllibdir switch" "$LINENO" 5
-elif test "${blt_with_tk_lib_dir}" = "yes" ; then
-  for libname in \
-   "${TK_EXEC_PREFIX}/lib/${SO_PREFIX}tk${TK_LIB_VERSION}${SO_EXT}" \
-   "${TK_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}${IMPLIB_EXT}" \
-   "${TK_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}.lib" \
-   "${TK_EXEC_PREFIX}/lib/libtk${TK_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TK_LIB_DIR="${TK_EXEC_PREFIX}/lib"
-      TK_LIB_SPEC="-L${TK_LIB_DIR} -ltk${TK_LIB_VERSION}"
-      break
-    fi
-  done
-else
-  for libname in \
-   "${blt_with_tk_lib_dir}/${SO_PREFIX}tk${TK_LIB_VERSION}${SO_EXT}" \
-   "${blt_with_tk_lib_dir}/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}${IMPLIB_EXT}" \
-   "${blt_with_tk_lib_dir}/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}$.lib" \
-   "${blt_with_tk_lib_dir}/libtk${TK_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TK_LIB_DIR="${blt_with_tk_lib_dir}"
-      TK_LIB_SPEC="-L${TK_LIB_DIR} -ltk${TK_LIB_VERSION}"
-      break
-    fi
-  done
-fi
-if test "x${TK_LIB_DIR}" = "x" ; then
-  as_fn_error "Can't find tk library." "$LINENO" 5
-fi
-
-# -----------------------------------------------------------------------
-#
-# Include files
-#
-#	Append to INC_SPECS the various include files specifications
-#	(built fromt the include directory information).
-#
-# -----------------------------------------------------------------------
-
-# Tk include files
-if test "${tk_includes_dir}" != "/usr/include" ; then
-  INC_SPECS="${INC_SPECS} ${TK_INC_SPEC}"
-fi
-
-# Tcl include files
-#
-#	Add the include directory specification only if the Tcl
-#	headers reside in a different directory from Tk's.
-if test "${tcl_includes_dir}" != "/usr/include" -a \
-	"${tcl_includes_dir}" != "${tk_includes_dir}" ; then
-  INC_SPECS="${INC_SPECS} ${TCL_INC_SPEC}"
-fi
-
-
-# On Windows, override the default include directory with our own.
-if test "${blt_platform}" = "win"; then
-   x_includes="NONE"
-fi
-
-# X11 include files
-if test "x${x_includes}" != "x" -a \
-	"${x_includes}" != "NONE" -a \
-	"${x_includes}" != "/usr/include" -a \
-	"${x_includes}" != "${tk_includes_dir}" -a \
-	"${x_includes}" != "${tcl_includes_dir}" ; then
-  INC_SPECS="${INC_SPECS} -I${x_includes}"
-fi
-
-# -----------------------------------------------------------------------
-#
-# Libraries
-#
-#	Append to LIB the various library specifications
-#	(built from the library directory information).
-#
-# -----------------------------------------------------------------------
-
-# Collect the libraries for AIX that aren't using stubs.
-aix_lib_specs=$LIBS
-
-if test "${blt_platform}" = "unix"; then
-
-  # Add specification for X11 library only on Unix platforms.
-
-  if test "x${x_libraries}" = "x"  -o \
-	  "x${x_libraries}" = "NONE"  -o \
-  	  "${x_libraries}" = "/usr/lib" -o  \
-  	  "${x_libraries}" = "/usr/lib64" -o  \
-	  "${x_libraries}" = "${TK_LIB_DIR}"  -o \
-	  "${x_libraries}" = "${TCL_LIB_DIR}" ; then
-    x_lib_spec=""
-    aix_lib_specs="-lX11 ${aix_lib_specs}"
-  else
-    x_lib_spec="-L${x_libraries}"
-    aix_lib_specs="-L${x_libraries} -lX11 ${aix_lib_specs}"
-    if test "x${loader_run_path}" = "x" ; then
-      loader_run_path="${x_libraries}"
-    else
-      loader_run_path="${loader_run_path}:${x_libraries}"
-    fi
-  fi
-fi
-
-
-# EXPAT library
-
-if test "${blt_with_expat_lib_dir}" != "no" -a \
-	"${ac_cv_header_expat_h}" != "no" ; then
-
-  if test "$blt_with_expat_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_expat_lib_dir" = "yes" ; then
-      lib_spec="-lexpat"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
-$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
-if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XML_ParserCreate ();
-int
-main ()
-{
-return XML_ParserCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_expat_XML_ParserCreate=yes
-else
-  ac_cv_lib_expat_XML_ParserCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
-$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
-if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lexpat"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
-$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
-if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XML_ParserCreate ();
-int
-main ()
-{
-return XML_ParserCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_expat_XML_ParserCreate=yes
-else
-  ac_cv_lib_expat_XML_ParserCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
-$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
-if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  EXPAT_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_expat_lib_dir $blt_with_expat_lib_dir/lib ; do
-        lib_spec="-L${dir} -lexpat"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
-$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
-if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XML_ParserCreate ();
-int
-main ()
-{
-return XML_ParserCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_expat_XML_ParserCreate=yes
-else
-  ac_cv_lib_expat_XML_ParserCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
-$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
-if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  EXPAT_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      EXPAT_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# MYSQL client library
-
-if test "${blt_with_mysql_lib_dir}" != "no" -a \
-	"${ac_cv_header_mysql_mysql_h}" != "no" ; then
-
-  if test "$blt_with_mysql_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_mysql_lib_dir" = "yes" ; then
-      lib_spec="-lmysqlclient"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
-$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
-if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_init ();
-int
-main ()
-{
-return mysql_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mysqlclient_mysql_init=yes
-else
-  ac_cv_lib_mysqlclient_mysql_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
-$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
-if test "x$ac_cv_lib_mysqlclient_mysql_init" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lmysqlclient"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
-$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
-if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_init ();
-int
-main ()
-{
-return mysql_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mysqlclient_mysql_init=yes
-else
-  ac_cv_lib_mysqlclient_mysql_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
-$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
-if test "x$ac_cv_lib_mysqlclient_mysql_init" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  MYSQL_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_mysql_lib_dir $blt_with_mysql_lib_dir/lib ; do
-        lib_spec="-L${dir} -lmysqlclient"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
-$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
-if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_init ();
-int
-main ()
-{
-return mysql_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mysqlclient_mysql_init=yes
-else
-  ac_cv_lib_mysqlclient_mysql_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
-$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
-if test "x$ac_cv_lib_mysqlclient_mysql_init" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  MYSQL_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBMYSQL 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      MYSQL_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# JPEG library
-
-if test "${blt_with_jpeg_lib_dir}" != "no" -a \
-	"${ac_cv_header_jpeglib_h}" != "no" ; then
-
-  if test "$blt_with_jpeg_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_jpeg_lib_dir" = "yes" ; then
-      lib_spec="-ljpeg"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
-$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jpeg_read_header ();
-int
-main ()
-{
-return jpeg_read_header ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_jpeg_read_header=yes
-else
-  ac_cv_lib_jpeg_jpeg_read_header=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_read_header" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -ljpeg"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
-$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jpeg_read_header ();
-int
-main ()
-{
-return jpeg_read_header ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_jpeg_read_header=yes
-else
-  ac_cv_lib_jpeg_jpeg_read_header=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_read_header" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  JPG_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_jpeg_lib_dir $blt_with_jpeg_lib_dir/lib ; do
-        lib_spec="-L${dir} -ljpeg"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
-$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jpeg_read_header ();
-int
-main ()
-{
-return jpeg_read_header ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_jpeg_read_header=yes
-else
-  ac_cv_lib_jpeg_jpeg_read_header=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_read_header" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  JPG_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBJPG 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      JPG_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# TIFF library
-
-if test "${blt_with_tiff_lib_dir}" != "no" -a \
-	"${ac_cv_header_tiff_h}" != "no" ; then
-
-  if test "$blt_with_tiff_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_tiff_lib_dir" = "yes" ; then
-      lib_spec="-ltiff"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFReadRGBAImage in -ltiff" >&5
-$as_echo_n "checking for TIFFReadRGBAImage in -ltiff... " >&6; }
-if test "${ac_cv_lib_tiff_TIFFReadRGBAImage+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char TIFFReadRGBAImage ();
-int
-main ()
-{
-return TIFFReadRGBAImage ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tiff_TIFFReadRGBAImage=yes
-else
-  ac_cv_lib_tiff_TIFFReadRGBAImage=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadRGBAImage" >&5
-$as_echo "$ac_cv_lib_tiff_TIFFReadRGBAImage" >&6; }
-if test "x$ac_cv_lib_tiff_TIFFReadRGBAImage" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -ltiff"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFReadRGBAImage in -ltiff" >&5
-$as_echo_n "checking for TIFFReadRGBAImage in -ltiff... " >&6; }
-if test "${ac_cv_lib_tiff_TIFFReadRGBAImage+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char TIFFReadRGBAImage ();
-int
-main ()
-{
-return TIFFReadRGBAImage ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tiff_TIFFReadRGBAImage=yes
-else
-  ac_cv_lib_tiff_TIFFReadRGBAImage=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadRGBAImage" >&5
-$as_echo "$ac_cv_lib_tiff_TIFFReadRGBAImage" >&6; }
-if test "x$ac_cv_lib_tiff_TIFFReadRGBAImage" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  TIF_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_tiff_lib_dir $blt_with_tiff_lib_dir/lib ; do
-        lib_spec="-L${dir} -ltiff"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFReadRGBAImage in -ltiff" >&5
-$as_echo_n "checking for TIFFReadRGBAImage in -ltiff... " >&6; }
-if test "${ac_cv_lib_tiff_TIFFReadRGBAImage+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char TIFFReadRGBAImage ();
-int
-main ()
-{
-return TIFFReadRGBAImage ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tiff_TIFFReadRGBAImage=yes
-else
-  ac_cv_lib_tiff_TIFFReadRGBAImage=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadRGBAImage" >&5
-$as_echo "$ac_cv_lib_tiff_TIFFReadRGBAImage" >&6; }
-if test "x$ac_cv_lib_tiff_TIFFReadRGBAImage" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  TIF_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBTIF 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      TIF_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# PNG library
-
-if test "${blt_with_png_lib_dir}" != "no" -a \
-	"${ac_cv_header_png_h}" != "no" ; then
-
-  if test "$blt_with_png_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_png_lib_dir" = "yes" ; then
-      lib_spec="-lpng"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_read_png in -lpng" >&5
-$as_echo_n "checking for png_read_png in -lpng... " >&6; }
-if test "${ac_cv_lib_png_png_read_png+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_read_png ();
-int
-main ()
-{
-return png_read_png ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_png_png_read_png=yes
-else
-  ac_cv_lib_png_png_read_png=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_read_png" >&5
-$as_echo "$ac_cv_lib_png_png_read_png" >&6; }
-if test "x$ac_cv_lib_png_png_read_png" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lpng"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_read_png in -lpng" >&5
-$as_echo_n "checking for png_read_png in -lpng... " >&6; }
-if test "${ac_cv_lib_png_png_read_png+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_read_png ();
-int
-main ()
-{
-return png_read_png ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_png_png_read_png=yes
-else
-  ac_cv_lib_png_png_read_png=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_read_png" >&5
-$as_echo "$ac_cv_lib_png_png_read_png" >&6; }
-if test "x$ac_cv_lib_png_png_read_png" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  PNG_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_png_lib_dir $blt_with_png_lib_dir/lib ; do
-        lib_spec="-L${dir} -lpng"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_read_png in -lpng" >&5
-$as_echo_n "checking for png_read_png in -lpng... " >&6; }
-if test "${ac_cv_lib_png_png_read_png+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_read_png ();
-int
-main ()
-{
-return png_read_png ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_png_png_read_png=yes
-else
-  ac_cv_lib_png_png_read_png=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_read_png" >&5
-$as_echo "$ac_cv_lib_png_png_read_png" >&6; }
-if test "x$ac_cv_lib_png_png_read_png" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  PNG_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBPNG 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      PNG_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# zlib library
-if test "${blt_with_z_lib_dir}" != "no" ; then
-
-  if test "$blt_with_z_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_z_lib_dir" = "yes" ; then
-      lib_spec="-lz"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
-$as_echo_n "checking for deflate in -lz... " >&6; }
-if test "${ac_cv_lib_z_deflate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_deflate=yes
-else
-  ac_cv_lib_z_deflate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
-$as_echo "$ac_cv_lib_z_deflate" >&6; }
-if test "x$ac_cv_lib_z_deflate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lz"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
-$as_echo_n "checking for deflate in -lz... " >&6; }
-if test "${ac_cv_lib_z_deflate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_deflate=yes
-else
-  ac_cv_lib_z_deflate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
-$as_echo "$ac_cv_lib_z_deflate" >&6; }
-if test "x$ac_cv_lib_z_deflate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  Z_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_z_lib_dir $blt_with_z_lib_dir/lib ; do
-        lib_spec="-L${dir} -lz"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
-$as_echo_n "checking for deflate in -lz... " >&6; }
-if test "${ac_cv_lib_z_deflate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_deflate=yes
-else
-  ac_cv_lib_z_deflate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
-$as_echo "$ac_cv_lib_z_deflate" >&6; }
-if test "x$ac_cv_lib_z_deflate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  Z_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      Z_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# XPM library
-
-old_CFLAGS=$CFLAGS
-CFLAGS=$X11_LIB_SPEC
-
-if test "${blt_with_xpm_lib_dir}" != "no" -a \
-	"${ac_cv_header_xpm_h}" != "no" ; then
-
-  if test "$blt_with_xpm_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_xpm_lib_dir" = "yes" ; then
-      lib_spec="-lXpm"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateXpmImageFromBuffer in -lXpm" >&5
-$as_echo_n "checking for XpmCreateXpmImageFromBuffer in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXpm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XpmCreateXpmImageFromBuffer ();
-int
-main ()
-{
-return XpmCreateXpmImageFromBuffer ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=yes
-else
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&5
-$as_echo "$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&6; }
-if test "x$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXpm"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateXpmImageFromBuffer in -lXpm" >&5
-$as_echo_n "checking for XpmCreateXpmImageFromBuffer in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXpm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XpmCreateXpmImageFromBuffer ();
-int
-main ()
-{
-return XpmCreateXpmImageFromBuffer ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=yes
-else
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&5
-$as_echo "$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&6; }
-if test "x$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XPM_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_xpm_lib_dir $blt_with_xpm_lib_dir/lib ; do
-        lib_spec="-L${dir} -lXpm"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateXpmImageFromBuffer in -lXpm" >&5
-$as_echo_n "checking for XpmCreateXpmImageFromBuffer in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXpm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XpmCreateXpmImageFromBuffer ();
-int
-main ()
-{
-return XpmCreateXpmImageFromBuffer ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=yes
-else
-  ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&5
-$as_echo "$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" >&6; }
-if test "x$ac_cv_lib_Xpm_XpmCreateXpmImageFromBuffer" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XPM_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXPM 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XPM_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# FREETYPE library
-
-if test "${blt_with_ft2_lib_dir}" != "no" -a \
-	"${ac_cv_header_ft2build_h}" != "no" ; then
-
-  if test "$blt_with_ft2_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_ft2_lib_dir" = "yes" ; then
-      lib_spec="-lfreetype"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
-$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfreetype  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FT_Init_FreeType ();
-int
-main ()
-{
-return FT_Init_FreeType ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_freetype_FT_Init_FreeType=yes
-else
-  ac_cv_lib_freetype_FT_Init_FreeType=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
-$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
-if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lfreetype"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
-$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfreetype  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FT_Init_FreeType ();
-int
-main ()
-{
-return FT_Init_FreeType ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_freetype_FT_Init_FreeType=yes
-else
-  ac_cv_lib_freetype_FT_Init_FreeType=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
-$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
-if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  FT2_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_ft2_lib_dir $blt_with_ft2_lib_dir/lib ; do
-        lib_spec="-L${dir} -lfreetype"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
-$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfreetype  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FT_Init_FreeType ();
-int
-main ()
-{
-return FT_Init_FreeType ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_freetype_FT_Init_FreeType=yes
-else
-  ac_cv_lib_freetype_FT_Init_FreeType=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
-$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
-if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  FT2_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBFT2 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      FT2_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# Xft library
-
-if test "${blt_with_xft2_lib_dir}" != "no" -a \
-	"${ac_cv_header_x11_xft_xft_h}" != "no" ; then
-
-  if test "$blt_with_xft_lib_dir" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "$blt_with_xft_lib_dir" = "yes" ; then
-      lib_spec="-lXft -lexpat"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpenPattern in -lXft -lexpat" >&5
-$as_echo_n "checking for XftFontOpenPattern in -lXft -lexpat... " >&6; }
-if test "${ac_cv_lib_Xft__lexpat_XftFontOpenPattern+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXft -lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XftFontOpenPattern ();
-int
-main ()
-{
-return XftFontOpenPattern ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=yes
-else
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&5
-$as_echo "$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&6; }
-if test "x$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXft -lexpat"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpenPattern in -lXft -lexpat" >&5
-$as_echo_n "checking for XftFontOpenPattern in -lXft -lexpat... " >&6; }
-if test "${ac_cv_lib_Xft__lexpat_XftFontOpenPattern+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXft -lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XftFontOpenPattern ();
-int
-main ()
-{
-return XftFontOpenPattern ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=yes
-else
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&5
-$as_echo "$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&6; }
-if test "x$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XFT_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in $blt_with_xft_lib_dir $blt_with_xft_lib_dir/lib ; do
-        lib_spec="-L${dir} -lXft -lexpat"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpenPattern in -lXft -lexpat" >&5
-$as_echo_n "checking for XftFontOpenPattern in -lXft -lexpat... " >&6; }
-if test "${ac_cv_lib_Xft__lexpat_XftFontOpenPattern+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXft -lexpat  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XftFontOpenPattern ();
-int
-main ()
-{
-return XftFontOpenPattern ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=yes
-else
-  ac_cv_lib_Xft__lexpat_XftFontOpenPattern=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&5
-$as_echo "$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" >&6; }
-if test "x$ac_cv_lib_Xft__lexpat_XftFontOpenPattern" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XFT_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXFT 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XFT_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-
-  if test "yes" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "yes" = "yes" ; then
-      lib_spec="-lfontconfig"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcPatternCreate in -lfontconfig" >&5
-$as_echo_n "checking for FcPatternCreate in -lfontconfig... " >&6; }
-if test "${ac_cv_lib_fontconfig_FcPatternCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfontconfig  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FcPatternCreate ();
-int
-main ()
-{
-return FcPatternCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_fontconfig_FcPatternCreate=yes
-else
-  ac_cv_lib_fontconfig_FcPatternCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fontconfig_FcPatternCreate" >&5
-$as_echo "$ac_cv_lib_fontconfig_FcPatternCreate" >&6; }
-if test "x$ac_cv_lib_fontconfig_FcPatternCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lfontconfig"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcPatternCreate in -lfontconfig" >&5
-$as_echo_n "checking for FcPatternCreate in -lfontconfig... " >&6; }
-if test "${ac_cv_lib_fontconfig_FcPatternCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfontconfig  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FcPatternCreate ();
-int
-main ()
-{
-return FcPatternCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_fontconfig_FcPatternCreate=yes
-else
-  ac_cv_lib_fontconfig_FcPatternCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fontconfig_FcPatternCreate" >&5
-$as_echo "$ac_cv_lib_fontconfig_FcPatternCreate" >&6; }
-if test "x$ac_cv_lib_fontconfig_FcPatternCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  FTCFG_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in yes yes/lib ; do
-        lib_spec="-L${dir} -lfontconfig"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcPatternCreate in -lfontconfig" >&5
-$as_echo_n "checking for FcPatternCreate in -lfontconfig... " >&6; }
-if test "${ac_cv_lib_fontconfig_FcPatternCreate+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfontconfig  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char FcPatternCreate ();
-int
-main ()
-{
-return FcPatternCreate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_fontconfig_FcPatternCreate=yes
-else
-  ac_cv_lib_fontconfig_FcPatternCreate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fontconfig_FcPatternCreate" >&5
-$as_echo "$ac_cv_lib_fontconfig_FcPatternCreate" >&6; }
-if test "x$ac_cv_lib_fontconfig_FcPatternCreate" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  FTCFG_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBFTCFG 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      FTCFG_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-
-  if test "yes" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "yes" = "yes" ; then
-      lib_spec="-lXrender"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
-$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
-if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrender  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRenderQueryExtension ();
-int
-main ()
-{
-return XRenderQueryExtension ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrender_XRenderQueryExtension=yes
-else
-  ac_cv_lib_Xrender_XRenderQueryExtension=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
-$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXrender"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
-$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
-if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrender  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRenderQueryExtension ();
-int
-main ()
-{
-return XRenderQueryExtension ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrender_XRenderQueryExtension=yes
-else
-  ac_cv_lib_Xrender_XRenderQueryExtension=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
-$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XRENDER_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in yes yes/lib ; do
-        lib_spec="-L${dir} -lXrender"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
-$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
-if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrender  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRenderQueryExtension ();
-int
-main ()
-{
-return XRenderQueryExtension ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrender_XRenderQueryExtension=yes
-else
-  ac_cv_lib_Xrender_XRenderQueryExtension=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
-$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XRENDER_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXRENDER 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XRENDER_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-fi
-
-# Xrandr library
-
-
-  if test "yes" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "yes" = "yes" ; then
-      lib_spec="-lXrandr"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
-$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
-if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrandr  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRRGetScreenInfo ();
-int
-main ()
-{
-return XRRGetScreenInfo ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
-else
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
-$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
-if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXrandr"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
-$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
-if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrandr  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRRGetScreenInfo ();
-int
-main ()
-{
-return XRRGetScreenInfo ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
-else
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
-$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
-if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XRANDR_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in yes yes/lib ; do
-        lib_spec="-L${dir} -lXrandr"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
-$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
-if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrandr  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XRRGetScreenInfo ();
-int
-main ()
-{
-return XRRGetScreenInfo ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
-else
-  ac_cv_lib_Xrandr_XRRGetScreenInfo=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
-$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
-if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XRANDR_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXRANDR 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XRANDR_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-
-
-  if test "yes" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "yes" = "yes" ; then
-      lib_spec="-lXdmcp"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XdmcpWrap in -lXdmcp" >&5
-$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; }
-if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXdmcp  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XdmcpWrap ();
-int
-main ()
-{
-return XdmcpWrap ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xdmcp_XdmcpWrap=yes
-else
-  ac_cv_lib_Xdmcp_XdmcpWrap=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5
-$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; }
-if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXdmcp"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XdmcpWrap in -lXdmcp" >&5
-$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; }
-if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXdmcp  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XdmcpWrap ();
-int
-main ()
-{
-return XdmcpWrap ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xdmcp_XdmcpWrap=yes
-else
-  ac_cv_lib_Xdmcp_XdmcpWrap=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5
-$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; }
-if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XDMCP_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in yes yes/lib ; do
-        lib_spec="-L${dir} -lXdmcp"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XdmcpWrap in -lXdmcp" >&5
-$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; }
-if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXdmcp  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XdmcpWrap ();
-int
-main ()
-{
-return XdmcpWrap ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xdmcp_XdmcpWrap=yes
-else
-  ac_cv_lib_Xdmcp_XdmcpWrap=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5
-$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; }
-if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XDMCP_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXDMCP 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XDMCP_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-
-  if test "yes" != "no" ; then
-    save_LDFLAGS="${LDFLAGS}"
-    if test "yes" = "yes" ; then
-      lib_spec="-lXau"
-      dir=""
-      LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauReadAuth in -lXau" >&5
-$as_echo_n "checking for XauReadAuth in -lXau... " >&6; }
-if test "${ac_cv_lib_Xau_XauReadAuth+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXau  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XauReadAuth ();
-int
-main ()
-{
-return XauReadAuth ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xau_XauReadAuth=yes
-else
-  ac_cv_lib_Xau_XauReadAuth=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xau_XauReadAuth" >&5
-$as_echo "$ac_cv_lib_Xau_XauReadAuth" >&6; }
-if test "x$ac_cv_lib_Xau_XauReadAuth" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-      if test "${found}" = "no" ; then
-	lib_spec="-L${dir} -lXau"
-        dir=$exec_prefix/lib
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauReadAuth in -lXau" >&5
-$as_echo_n "checking for XauReadAuth in -lXau... " >&6; }
-if test "${ac_cv_lib_Xau_XauReadAuth+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXau  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XauReadAuth ();
-int
-main ()
-{
-return XauReadAuth ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xau_XauReadAuth=yes
-else
-  ac_cv_lib_Xau_XauReadAuth=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xau_XauReadAuth" >&5
-$as_echo "$ac_cv_lib_Xau_XauReadAuth" >&6; }
-if test "x$ac_cv_lib_Xau_XauReadAuth" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XAU_LIB_DIR="$dir"
-	fi
-      fi
-    else
-      for dir in yes yes/lib ; do
-        lib_spec="-L${dir} -lXau"
-        LDFLAGS="${lib_spec} ${save_LDFLAGS}"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauReadAuth in -lXau" >&5
-$as_echo_n "checking for XauReadAuth in -lXau... " >&6; }
-if test "${ac_cv_lib_Xau_XauReadAuth+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXau  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XauReadAuth ();
-int
-main ()
-{
-return XauReadAuth ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xau_XauReadAuth=yes
-else
-  ac_cv_lib_Xau_XauReadAuth=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xau_XauReadAuth" >&5
-$as_echo "$ac_cv_lib_Xau_XauReadAuth" >&6; }
-if test "x$ac_cv_lib_Xau_XauReadAuth" = x""yes; then :
-  found="yes"
-else
-  found="no"
-fi
-
-        if test "${found}" = "yes" ; then
-	  XAU_LIB_DIR="$dir"
-	  break
-        fi
-      done
-    fi
-    if test "${found}" = "yes" ; then
-
-$as_echo "#define HAVE_LIBXAU 1" >>confdefs.h
-
-      aix_lib_specs="${aix_lib_specs} ${lib_spec}"
-      XAU_LIB_SPEC=${lib_spec}
-      if test "x${dir}" != "x" ; then
-        loader_run_path="${loader_run_path}:${dir}"
-      fi
-    fi
-    LDFLAGS=${save_LDFLAGS}
-  fi
-
-CFLAGS=$old_CFLAGS
-# Tcl libraries
-if test "${TCL_LIB_DIR}" != "/usr/lib" -a \
-	"${TCL_LIB_DIR}" != "/usr/lib64" -a \
-	"${TCL_LIB_DIR}" != "${TK_LIB_DIR}" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${TCL_LIB_DIR}"
-  else
-    loader_run_path="${TCL_LIB_DIR}:${loader_run_path}"
-  fi
-fi
-
-# Tk libraries
-if test "${TK_LIB_DIR}" != "/usr/lib" -a \
-	"${TK_LIB_DIR}" != "/usr/lib64" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${TK_LIB_DIR}"
-  else
-    loader_run_path="${TK_LIB_DIR}:${loader_run_path}"
-  fi
-fi
-
-
-# -----------------------------------------------------------------------
-#
-# 	Set up a new default prefix to installation path.  The ways
-#	the prefix can be set and their precedence are as follows:
-#
-#	1. --prefix option given to ./configure. (prefix != NONE)
-#       2. use previously configured Tk prefix
-#
-# -----------------------------------------------------------------------
-
-if test "$prefix" = "NONE" ; then
-  prefix=${TCL_PREFIX}
-fi
-
-if test "$exec_prefix" = "NONE" ; then
-  exec_prefix=${TCL_EXEC_PREFIX}
-fi
-
-# -------------------------------------------------------------------------
-#
-#	Extract the BLT version number for the blt.h header
-#
-# -------------------------------------------------------------------------
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking BLT_MAJOR_VERSION" >&5
-$as_echo_n "checking BLT_MAJOR_VERSION... " >&6; }
-if test "${blt_cv_major_version+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.awk <<EOF
-/^# *define *BLT_MAJOR_VERSION[ \t]/ { print \$3 }
-EOF
-blt_cv_major_version=`${AWK} -f conftest.awk "${srcdir}/src/blt.h"`
-rm -rf conftest*
-
-fi
-
-BLT_MAJOR_VERSION=${blt_cv_major_version}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_cv_major_version" >&5
-$as_echo "$blt_cv_major_version" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking BLT_MINOR_VERSION" >&5
-$as_echo_n "checking BLT_MINOR_VERSION... " >&6; }
-if test "${blt_cv_minor_version+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.awk <<EOF
-/^# *define *BLT_MINOR_VERSION[ \t]/ { print \$3 }
-EOF
-blt_cv_minor_version=`${AWK} -f conftest.awk "${srcdir}/src/blt.h"`
-rm -rf conftest*
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $blt_cv_minor_version" >&5
-$as_echo "$blt_cv_minor_version" >&6; }
-BLT_MINOR_VERSION=${blt_cv_minor_version}
-
-BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION}
-
-# Add BLT to the run path
-libdir=${exec_prefix}/lib
-
-if test "x${libdir}" != "x"  -a \
-	"${libdir}" != "/usr/lib" -a  \
-	"${libdir}" != "/usr/lib64" -a  \
-	"${libdir}" != "${x_libraries}" -a  \
-	"${libdir}" != "${TK_LIB_DIR}"  -a \
-	"${libdir}" != "${TCL_LIB_DIR}" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${libdir}"
-  else
-    loader_run_path="${libdir}:${loader_run_path}"
-  fi
-fi
-
-# -------------------------------------------------------------------------
-#
-#	Extract the Tcl version number for the tcl.h header
-#
-# -------------------------------------------------------------------------
-
-if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then
-  :
-elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then
-  :
-elif test "$TCL_VERSION" = "$TK_VERSION" ; then
-  :
-else
-  as_fn_error "Mismatched Tcl/Tk versions ($TCL_VERSION != $TK_VERSION)" "$LINENO" 5
-fi
-
-#--------------------------------------------------------------------
-#
-# Check if we can generate shared libraries on this system.  Set flags
-# to generate shared libraries for systems that we know about.  Start
-# with the values found in tclConfig.sh, make changes as we know about
-# the different systems.
-#
-#--------------------------------------------------------------------
-
-LIB_BASE_NAME=libBLT
-
-# Initialize shared library build variables
-
-SO_LD="$TCL_SHLIB_LD"
-SO_LDFLAGS="$TCL_LD_FLAGS"
-SO_RUNPATH="$TCL_LD_SEARCH_FLAGS"
-
-SO_TARGET=""
-SO_CFLAGS=""
-SO_LIBS=""
-LDFLAGS=""
-LD_RUN_PATH=""
-EXTRA_LIBS=""
-
-case $target in
-  *-aix4.[2-9]*)
-    # No Position-Independent flags needed
-    SO_CFLAGS=""
-
-    # Use the installed export file or the one found in the source directory.
-
-    if test -r "${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp" ; then
-      tcl_exp="${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp"
-    else
-      tcl_exp="${TCL_SRC_DIR}/unix/lib.exp"
-    fi
-    if test -r "${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp" ; then
-      tk_exp="${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp"
-    else
-      tk_exp="${TK_SRC_DIR}/unix/lib.exp"
-    fi
-
-    full_src_path=`cd ${srcdir}; pwd`
-
-    # Use shell-script to link shared library
-    SO_LD="${full_src_path}/cf/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}"
-
-    SO_LIBS="${aix_lib_specs} -lc"
-
-    LDFLAGS="-L${loader_run_path}"
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-aix*)
-    # No Position-Independent flags needed
-    SO_CFLAGS=""
-
-    # Use the installed export file or the one found in the source directory.
-
-    if test -r "${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp" ; then
-      tcl_exp="${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp"
-    else
-      tcl_exp="${TCL_SRC_DIR}/unix/lib.exp"
-    fi
-    if test -r "${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp" ; then
-      tk_exp="${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp"
-    else
-      tk_exp="${TK_SRC_DIR}/unix/lib.exp"
-    fi
-
-    full_src_path=`cd ${srcdir}/cf; pwd`
-
-    # Use shell-script to link shared library
-
-    SO_LD="${full_src_path}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}"
-
-    SO_LIBS="${aix_lib_specs} -lc"
-
-    LDFLAGS="-L${loader_run_path}"
-    EXTRA_LIBS="-lld"
-    ;;
-
-  *-bsdi2*|*-bsdi3*)
-    SO_CFLAGS=""
-    SO_LD="shlicc"
-    SO_LDFLAGS="-r"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-bsdi4*)
-    SO_CFLAGS="-export-dynamic -fPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS='-shared -Wl,-E -Wl,-soname,$@'
-    ;;
-
-  *-*-cygwin* | *-*-mingw*)
-    SO_LD="${CC}"
-    SO_LDFLAGS='-shared -Wl,-E -Wl,--out-implib,$@'
-    EXTRA_LIBS="-lwinspool"
-    SO_EXT=".dll"
-    LDFLAGS=""
-    ;;
-
-  *-*-darwin*)
-    build_shared="no"
-    SO_CFLAGS="-fno-common"
-    SO_EXT=".dylib"
-    SO_LD="${CC}"
-    SO_LDFLAGS="-dynamiclib"
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
-$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
-    save_LDFLAGS=$LDFLAGS
-    LDFLAGS="$SO_LDFLAGS -Wl,-single_module"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-int i;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  single_module=yes
-else
-  single_module=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "${single_module}" = "yes" ; then
-      SO_LDFLAGS=$LDFLAGS
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $single_module" >&5
-$as_echo "$single_module" >&6; }
-    SO_LIBRARY_PATH="DYLD_LIBRARY_PATH"
-    LDFLAGS=""
-    ;;
-
-  *-dgux*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-hpux*)
-    if test "$blt_have_gcc" = "no" ; then
-      DEFINES="$DEFINES -D_HPUX_SOURCE"
-    fi
-    if test "${blt_have_dld}" = "yes" ; then
-      SO_CFLAGS="+Z"
-      SO_LD="ld"
-      SO_LDFLAGS="-b -E -n +s +b,${loader_run_path}:."
-      SO_EXT=".sl"
-
-      # The run path is included in both LDFLAGS and SO_LDFLAGS
-      # because SO_LD is ld and LD is cc/gcc.
-
-      LDFLAGS="-Wl,-E -Wl,+s,+b,${loader_run_path}:."
-      EXTRA_LIBS="-ldld"
-    fi
-    ;;
-
-  *-irix64-6.5*)
-    SO_CFLAGS=""
-    SO_LD="ld"
-    SO_LDFLAGS="-32 -shared -rdata_shared"
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    ;;
-
-  *-irix-56.*|*-irix64-*)
-    SO_CFLAGS=""
-    SO_LD="ld"
-    SO_LDFLAGS="-shared -rdata_shared"
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    LDFLAGS=""
-    if test "$blt_have_gcc" = "yes" ; then
-      SO_CFLAGS="-mabi=n32 $SO_CFLAGS"
-      SO_LDFLAGS="-mabi=n32 $SO_LDFLAGS"
-      LDFLAGS="-mabi=n32 $LDFLAGS"
-    else
-      CFLAGS="-n32 $CFLAGS"
-      LDFLAGS="-n32 $LDFLAGS"
-    fi
-    ;;
-
-  *-linux*)
-    SO_CFLAGS="-fPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-
-    LDFLAGS=""
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-mp-ras-02*)
-    SO_CFLAGS="-G -K PIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS=""
-    ;;
-
-  *-mp-ras-*)
-    SO_CFLAGS="-G -K PIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS="-Wl,-Bexport"
-    ;;
-
-  *-ncr-sysv4-*2*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-ncr-sysv4*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G -Wl,-Bexport"
-
-    LDFLAGS="-Wl,-Bexport"
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-netbsd*|*-freebsd*|*-openbsd*)
-    # Not available on all versions:  check for include file.
-    ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
-  test_ok=yes
-else
-  test_ok=no
-fi
-
-
-    if test "$test_ok" = yes; then
-      SO_CFLAGS="-fpic"
-      SO_LD="ld"
-      SO_LDFLAGS="-Bshareable -x"
-    fi
-    ;;
-
-  *-nextstep*)
-    SO_CFLAGS=""
-    SO_LD="cc"
-    SO_LDFLAGS="-nostdlib -r"
-    ;;
-
-  *-osf1-1.012*)
-    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-
-    SO_CFLAGS=""
-
-    # Warning: Ugly Makefile Hack
-    #	Make package name same as library name
-
-    SO_LD='ld -R -export $@:'
-    ;;
-
-  *-osf1-1.*)
-    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-
-    SO_CFLAGS="-fpic"
-    SO_LD="ld -shared"
-    ;;
-
-  *-osf1V*)
-    # Digital OSF/1
-
-    SO_CFLAGS=""
-    SO_LD='ld'
-    SO_LDFLAGS='-shared -expect_unresolved "*"'
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    LDFLAGS=""
-    ;;
-
-  *-sco*)
-    # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
-    # this test works, since "uname -s" was non-standard in 3.2.4 and
-    # below.
-
-    SO_CFLAGS="-Kpic -belf"
-    SO_LD="ld"
-    SO_LDFLAGS="-G"
-    LDFLAGS="-belf -Wl,-Bexport"
-    ;;
-
-  *-sni-sysv*)
-
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-sunos4*)
-
-    SO_CFLAGS="-PIC"
-    SO_LD="ld"
-    SO_LDFLAGS="-assert pure-text"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-solaris2*)
-
-    SO_CFLAGS="-KPIC"
-    if test "${blt_with_gnu_ld}" = "yes" -a "$blt_have_gcc" = "yes" ; then
-      SO_LD="gcc"
-      SO_LDFLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
-      LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    else
-      SO_LD="/usr/ccs/bin/ld"
-      SO_LDFLAGS="-G -z text"
-      LD_RUN_PATH="-R ${loader_run_path}"
-    fi
-    EXTRA_LIBS="-ldl"
-  ;;
-
-  *-mips-dde-sysv*)
-
-    SO_CFLAGS="-KPIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-pc-sysv4* | *-unixware-5*)
-    SO_CFLAGS="-G -KPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS=" -Wl,-Bexport"
-    ;;
-
-  *)
-    build_shared="no"
-    ;;
-
-esac
-
-# If we're running gcc, then set SO_CFLAGS flags for compiling
-# shared libraries for gcc, instead of those of the vendor's
-# compiler.
-
-
-if test "$blt_have_gcc" = "yes" ; then
-  SO_CFLAGS="-fPIC"
-fi
-
-# We can't back link against static versions of Tcl/Tk.
-# If # ${TCL_SHARED_BUILD} can't be found or isn't "1", assume that
-# shared libraries weren't built.
-
-if test "${TCL_SHARED_BUILD}" != "1" ; then
-  SO_LIBS=""
-fi
-
-if test "${build_shared}" = "yes" -a "$blt_enable_shared" = "yes"; then
-  BLT_SO_CFLAGS="$SO_CFLAGS"
-
-  BLT_TARGET="shared"
-
-  BLT_SO_LD="$SO_LD"
-
-  BLT_SO_LDFLAGS="$SO_LDFLAGS"
-
-  BLT_SO_LIBS="$SO_LIBS"
-
-  BLT_SO_EXT="$SO_EXT"
-
-
-else
-  BLT_TARGET="static"
-
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define BLT_SO_EXT "$SO_EXT"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define BLT_SO_PREFIX "$SO_PREFIX"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define BLT_LIB_SUFFIX "$LIB_SUFFIX"
-_ACEOF
-
-BLT_SO_PREFIX="$SO_PREFIX"
-
-BLT_LIB_SUFFIX="$LIB_SUFFIX"
-
-
-
-
-if test "${blt_enable_stubs}" = "yes" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define USE_TCL_STUBS 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define USE_TK_STUBS 1
-_ACEOF
-
-  TCL_STUBS_SPEC="-L${TCL_LIB_DIR} -ltclstub${TCL_LIB_VERSION}"
-
-  TK_STUBS_SPEC="-L${TK_LIB_DIR} -ltkstub${TK_LIB_VERSION}"
-
-fi
-
-if test "${blt_platform_win32}" = "yes" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define WIN32 1
-_ACEOF
-
-fi
-WIN32=${blt_platform_win32}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-INCLUDES=${INC_SPECS}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#--------------------------------------------------------------------
-#	The BLT script directory was either specified or we
-#	assume <prefix>/lib
-#--------------------------------------------------------------------
-if test "x${blt_with_scriptdir}" = "x" ; then
-  BLT_LIBRARY="${prefix}/lib/blt${BLT_VERSION}"
-else
-  BLT_LIBRARY="${blt_with_scriptdir}/blt${BLT_VERSION}"
-fi
-
-
-#--------------------------------------------------------------------
-#	Print out some of the more important settings
-#--------------------------------------------------------------------
-echo ""
-echo "Configuration results:"
-echo ""
-echo "  tcl.h      found in  $TCL_INC_SPEC"
-echo "  tk.h       found in  $TK_INC_SPEC"
-echo "  X11/Xlib.h found in  $x_includes"
-echo "  libtcl${TCL_LIB_VERSION}  found in  $TCL_LIB_SPEC"
-echo "  libtk${TK_LIB_VERSION}   found in  $TK_LIB_SPEC"
-echo "  libX11     found in  $x_libraries"
-echo ""
-echo "Directories where BLT is to be installed:"
-echo ""
-echo "  \"\$prefix\" is $prefix"
-echo "  \"\$exec_prefix\" is $exec_prefix"
-echo ""
-echo "  shells       to be installed in  $bindir"
-echo "  libraries    to be installed in  $libdir"
-echo "  scripts      to be installed in  $BLT_LIBRARY"
-echo "  manual pages to be installed in  $mandir"
-echo "  MYSQL_LIB_SPEC=$MYSQL_LIB_SPEC"
-echo "  MYSQL_INC_SPEC=$MYSQL_INC_SPEC"
-echo "  EXPAT_LIB_SPEC=$EXPAT_LIB_SPEC"
-echo "  EXPAT_INC_SPEC=$EXPAT_INC_SPEC"
-echo "  FT2_LIB_SPEC=$FT2_LIB_SPEC"
-echo "  FT2_INC_SPEC=$FT2_INC_SPEC"
-echo "  JPG_LIB_SPEC=$JPG_LIB_SPEC"
-echo "  JPG_INC_SPEC=$JPG_INC_SPEC"
-echo ""
-
-#--------------------------------------------------------------------
-#
-#	Generate the following Makefiles
-#
-#	   ./Makefile
-#	   ./src/Makefile
-#	   ./src/shared/Makefile
-#	   ./man/Makefile
-#	   ./library/Makefile
-#	   ./demos/Makefile
-#
-#--------------------------------------------------------------------
-src_Makefile="src/Makefile"
-
-case ${blt_platform} in
-  "win")
-    src_Makefile="src/Makefile:src/Makefile-cyg.in"
-    ;;
-  "macosx")
-    src_Makefile="src/Makefile:src/Makefile-macosx.in"
-    ;;
-  *)
-    ;;
-esac
-
-# --------------------------------------------------------------
-# List of files to have be generated from <name>.in files with
-# autoconf substitutions.
-# --------------------------------------------------------------
-ac_config_files="$ac_config_files Makefile ${src_Makefile} src/bltHash.h src/shared/Makefile man/Makefile library/Makefile library/AFM/Makefile demos/Makefile"
-
-
-
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to the package provider."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.65,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2009 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "${src_Makefile}") CONFIG_FILES="$CONFIG_FILES ${src_Makefile}" ;;
-    "src/bltHash.h") CONFIG_FILES="$CONFIG_FILES src/bltHash.h" ;;
-    "src/shared/Makefile") CONFIG_FILES="$CONFIG_FILES src/shared/Makefile" ;;
-    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-    "library/Makefile") CONFIG_FILES="$CONFIG_FILES library/Makefile" ;;
-    "library/afm/Makefile") CONFIG_FILES="$CONFIG_FILES library/afm/Makefile" ;;
-    "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;;
-
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
diff --git a/blt3.0/configure.in b/blt3.0/configure.in
deleted file mode 100644
index 6753853..0000000
--- a/blt3.0/configure.in
+++ /dev/null
@@ -1,1796 +0,0 @@
-define([AC_CACHE_LOAD], )dnl
-define([AC_CACHE_SAVE], )dnl
-AC_INIT(src/bltInit.c)
-AC_CONFIG_HEADER(src/config.h)
-AC_CONFIG_AUX_DIR(cf)
-AC_PREREQ(2.0)	
-
-# -----------------------------------------------------------------------
-#
-# 	Handle command line options
-#
-#		--with-tcl=DIR
-#		--with-tk=DIR
-#		--with-cflags=flags	This is probably for me only
-#		--with-gnu-ld 
-#
-# -----------------------------------------------------------------------
-
-INC_SPECS=""
-loader_run_path=""
-DEFINES=""
-
-
-blt_enable_symbols="no"
-blt_enable_shared="yes"
-blt_with_expat_include_dir="yes"
-blt_with_expat_lib_dir="yes"
-blt_with_ft2_include_dir="yes"
-blt_with_ft2_lib_dir="yes"
-blt_with_gnu_ld="no"
-blt_with_jpeg_include_dir="yes"
-blt_with_jpeg_lib_dir="yes"
-blt_with_mysql_include_dir="yes"
-blt_with_mysql_lib_dir="yes"
-blt_with_png_include_dir="yes"
-blt_with_png_lib_dir="yes"
-blt_with_z_lib_dir="yes"
-blt_with_scriptdir=""
-blt_with_tcl=""
-blt_with_tcl_include_dir="yes"
-blt_with_tcl_lib_dir="yes"
-blt_with_tiff_include_dir="yes"
-blt_with_tiff_lib_dir="yes"
-blt_with_tk=""
-blt_with_tk_include_dir="yes"
-blt_with_tk_lib_dir="yes"
-blt_with_xft_include_dir="yes"
-blt_with_xft_lib_dir="yes"
-blt_with_xpm_include_dir="yes"
-blt_with_xpm_lib_dir="yes"
-
-AC_ARG_WITH(blt,        
-  [AS_HELP_STRING([--with-blt=DIR],[install BLT scripts in DIR])],
-  [blt_with_scriptdir=$withval]) 
-AC_ARG_WITH(tcl,        
-  [AS_HELP_STRING([--with-tcl=DIR],[find tclConfig.sh in DIR])],
-  [ blt_with_tcl=$withval])
-AC_ARG_WITH(tk,         
-  [AS_HELP_STRING([--with-tk=DIR],[find tkConfig.sh in DIR])],
-  [ blt_with_tk=$withval])
-AC_ARG_WITH(tclincdir,   
-  [AS_HELP_STRING([--with-tclincdir=DIR],[find Tcl includes in DIR])],
-  [blt_with_tcl_include_dir=$withval])
-AC_ARG_WITH(tkincdir,    
-  [AS_HELP_STRING([--with-tkincdir=DIR],[find Tk includes in DIR])],
-  [blt_with_tk_include_dir=$withval])
-AC_ARG_WITH(tcllibdir,    
-  [AS_HELP_STRING([--with-tcllibdir=DIR],[find Tcl libraries in DIR])],
-  [blt_with_tcl_lib_dir=$withval])
-AC_ARG_WITH(tklibdir,
-  [AS_HELP_STRING([--with-tklibdir=DIR],[find Tk libraries in DIR])],
-  [blt_with_tk_lib_dir=$withval])
-AC_ARG_WITH(jpegincdir,       
-  [AS_HELP_STRING([--with-jpegincdir=DIR],[find JPEG headers in DIR])],
-  [unset ac_cv_header_jpeglib_h; blt_with_jpeg_include_dir=$withval])
-AC_ARG_WITH(jpeglibdir,       
-  [AS_HELP_STRING([--with-jpeglibdir=DIR],[find JPEG libraries in DIR])],
-  [unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
-   blt_with_jpeg_lib_dir=$withval])
-
-# --with-tiffincdir
-AC_ARG_WITH(tiffincdir,       
-  [AS_HELP_STRING([--with-tiffincdir=DIR],[find TIFF headers in DIR])],
-  [blt_with_tiff_include_dir=$withval])
-# --with-tifflibdir
-AC_ARG_WITH(tifflibdir,       
-  [AS_HELP_STRING([--with-tifflibdir=DIR],[find TIFF libraries in DIR])],
-  [blt_with_tiff_lib_dir=$withval])
-# --with-pngincdir
-AC_ARG_WITH(pngincdir,        
-  [AS_HELP_STRING([--with-pngincdir=DIR],[find PNG headers in DIR])],
-  [blt_with_png_include_dir=$withval])
-# --with-pnglibdir
-AC_ARG_WITH(pnglibdir,        
-  [AS_HELP_STRING([--with-pnglibdir=DIR],[find PNG libraries in DIR])], 
-  [blt_with_png_lib_dir=$withval])
-# --with-zlibdir
-AC_ARG_WITH(zlibdir,        
-  [AS_HELP_STRING([--with-zlibdir=DIR],[find zlib libraries in DIR])], 
-  [blt_with_z_lib_dir=$withval]) 
-# --with-xpmincdir
-AC_ARG_WITH(xpmincdir,        
-  [AS_HELP_STRING([--with-xpmincdir=DIR],[find XPM headers in DIR])],
-  [blt_with_xpm_include_dir=$withval])
-# --with-xpmlibdir
-AC_ARG_WITH(xpmlibdir,        
-  [AS_HELP_STRING([--with-xpmlibdir=DIR],[find XPM libraries in DIR])],
-  [blt_with_xpm_lib_dir=$withval])
-# --with-freetype2incdir
-AC_ARG_WITH(freetype2incdir,  
-  [AS_HELP_STRING([--with-freetype2incdir=DIR],[find freetype2 headers in DIR])],
-  [blt_with_ft2_include_dir=$withval])
-# --with-freetype2libdir
-AC_ARG_WITH(freetype2libdir,  
-  [AS_HELP_STRING([--with-freetype2libdir=DIR],[find freetype2 libraries in DIR])], 
-  [blt_with_ft2_lib_dir=$withval])
-# --with-xftincdir
-AC_ARG_WITH(xftincdir,        
-  [AS_HELP_STRING([--with-xftincdir=DIR],[find Xft headers in DIR])],
-  [blt_with_xft_include_dir=$withval])
-# --with-xftlibdir
-AC_ARG_WITH(xftlibdir,  
-  [AS_HELP_STRING([--with-xftlibdir=DIR],[find Xft libraries in DIR])],
-  [blt_with_xft_lib_dir=$withval]) 
-# --with-expatincdir
-AC_ARG_WITH(expatincdir,      
-  [AS_HELP_STRING([--with-expatincdir=DIR],[find expat headers in DIR])],
-  [blt_with_expat_include_dir=$withval])
-# --with-expatlibdir
-AC_ARG_WITH(expatlibdir,      
-  [AS_HELP_STRING([--with-expatlibdir=DIR],[find expat libraries in DIR])],
-  [blt_with_expat_lib_dir=$withval])
-# --with-mysqlincdir
-AC_ARG_WITH(mysqlincdir,      
-  [AS_HELP_STRING([--with-mysqlincdir=DIR],[find mysql headers in DIR])],
-  [blt_with_mysql_include_dir=$withval])
-# --with-mysqllibdir
-AC_ARG_WITH(mysqllibdir,      
-  [AS_HELP_STRING([--with-mysqllibdir=DIR],[find mysql libraries in DIR])],
-  [blt_with_mysql_lib_dir=$withval])
-
-AC_ARG_WITH(gnu_ld,     
-  [AS_HELP_STRING([--with-gnu-ld], [use GNU linker])],
-  [blt_with_gnu_ld="yes"])
-
-AC_ARG_ENABLE(shared,  
-  [AS_HELP_STRING([--enable-shared],[created shared libraries])],
-  [blt_enable_shared=$enableval])
-
-AC_ARG_ENABLE(symbols,  
-  [AS_HELP_STRING([--enable-symbols],[compile with debugging symbols])],
-  [blt_enable_symbols=$enableval])
-AC_ARG_ENABLE(stubs,    
-  [AS_HELP_STRING([--enable-stubs],[compile with stubbed version of Tcl library])],
-  [blt_enable_stubs=$enableval])
-
-EXPAT_INC_SPEC=""
-EXPAT_LIB_SPEC=""
-FTCFG_LIB_SPEC=""
-FT2_INC_SPEC=""
-FT2_LIB_SPEC=""
-XFT_INC_SPEC=""
-XFT_LIB_SPEC=""
-JPG_INC_SPEC=""
-JPG_LIB_SPEC=""
-MYSQL_INC_SPEC=""
-MYSQL_LIB_SPEC=""
-PNG_INC_SPEC=""
-PNG_LIB_SPEC=""
-TCL_INC_SPEC=""
-TCL_LIB_SPEC=""
-TIF_INC_SPEC=""
-TIF_LIB_SPEC=""
-TK_INC_SPEC=""
-TK_LIB_SPEC=""
-XPM_INC_SPEC=""
-XPM_LIB_SPEC=""
-XRANDR_LIB_SPEC=""
-XRENDER_LIB_SPEC=""
-XAU_LIB_SPEC=""
-XDMCP_LIB_SPEC=""
-Z_LIB_SPEC=""
-
-AC_CANONICAL_TARGET
-AC_PREFIX_PROGRAM(wish)
-
-# -----------------------------------------------------------------------
-# 	Set a variable containing current working directory if /bin/sh
-#	doesn't do it already.
-# -----------------------------------------------------------------------
-
-PWD=`pwd`
-
-# -----------------------------------------------------------------------
-# Programs:	Check for existence of ranlib and install programs
-# -----------------------------------------------------------------------
-# -----------------------------------------------------------------------
-# 	C compiler and debugging flags
-# -----------------------------------------------------------------------
-
-if test "x${CC}" = "x" ; then
-  CC=cc
-fi
-
-AC_PROG_CC
-AC_PROG_CPP
-
-if test "x${GCC}" != "x" ; then
-  blt_have_gcc="yes"
-fi
-
-case $host_os in
-  *cygwin* | *mingw*)
-    blt_platform_win32="yes"
-    AC_MSG_CHECKING([if using MinGW compiler])
-    AC_TRY_COMPILE([], [
-#ifndef __MINGW32__
-    _cc_is_not_mingw_
-#endif
-], [blt_have_mingw=yes], [blt_have_mingw=no])
-    AC_MSG_RESULT([$blt_have_mingw])
-    ;;
-  * )		
-    blt_platform_win32="no"
-    ;;
-esac
-
-AC_PROG_CPP
-if test "x${GCC}" != "x" ; then
-  blt_have_gcc="yes"
-else
-  AC_MSG_CHECKING([if C compiler is really gcc])
-    AC_TRY_COMPILE([], [
-#ifndef __GNUC__
-    _cc_is_not_gcc_
-#endif
-], [blt_have_gcc=yes], [blt_have_gcc=no])
-  AC_MSG_RESULT([$blt_have_gcc])
-fi
-
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-AC_PROG_LN_S
-AC_PROG_MKDIR_P
-AC_EGREP_CPP
-	
-#
-# CFLAGS search order
-#
-#  1. command line (--with-cflags)
-#  2. cached variable ($blt_cv_prog_cflags)
-#  3. set to "-O3" if using gcc ($blt_have_gcc)
-#  4. otherwise, default to "-O"
-#
-
-# Setup default flags for the compiler.
-case $target:$blt_have_gcc:$blt_enable_symbols in
-  *-solaris2*:no:yes)
-    CFLAGS="-g -xs -O"
-    ;;
-  *:yes:no)
-    CFLAGS="-O3"
-    ;;
-  *:yes:yes)
-    CFLAGS="-g -O3"
-    ;;
-  *:no:no) 
-    CFLAGS="-O"
-    ;;
-  *)
-    CFLAGS="-g -O3"
-    ;;
-esac
-
-GCCFLAGS=""
-if test "${blt_have_gcc}" = "yes" ; then
-  GCCFLAGS="-Wall -Wpointer-arith -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef"
-fi
-
-SO_PREFIX=""
-SO_EXT=""
-IMPLIB_SUFFIX=""
-IMPLIB_EXT=""
-
-case $target in
-  *-*-cygwin*|*-*-mingw*)
-    blt_platform="win"
-    if test "${blt_have_mingw}" = "yes" ; then
-      SO_PREFIX=""
-      SO_EXT=".dll"
-      IMPLIB_EXT=".lib"
-      IMPLIB_PREFIX=""
-    else 
-      SO_PREFIX="cyg"
-      SO_EXT=".dll"
-      IMPLIB_EXT=".dll.a"
-      IMPLIB_PREFIX="lib"
-    fi
-    ;;
-  *-hpux*)
-    SO_EXT=".sl"
-    blt_platform="unix" 
-    SO_PREFIX="lib"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;	
-  *-*-darwin*)
-    blt_platform="macosx"
-    SO_EXT=".dylib"
-    SO_PREFIX="lib"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;
-  *)
-    blt_platform="unix" 
-    SO_PREFIX="lib"
-    SO_EXT=".so"
-    IMPLIB_SUFFIX=""
-    IMPLIB_EXT=""
-    ;;
-esac
-
-build_shared="yes"
-if test $blt_enable_symbols = "yes" ; then
-  LIB_SUFFIX=g
-fi
-
-# -----------------------------------------------------------------------
-# Hardware characteristics:	
-# -----------------------------------------------------------------------
-
-AC_C_BIGENDIAN
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(long long, 8)
-AC_CHECK_SIZEOF(void *, 4)
-AC_CHECK_SIZEOF(float, 4)
-
-# Save the values as shell variables so that we can substitute them
-# into bltHash.h for situtations where there's no bltInt.h.
-
-AC_SUBST(SIZEOF_INT, ${ac_cv_sizeof_int})
-AC_SUBST(SIZEOF_LONG, ${ac_cv_sizeof_long})
-AC_SUBST(SIZEOF_LONG_LONG, ${ac_cv_sizeof_long_long})
-AC_SUBST(SIZEOF_VOID_P, ${ac_cv_sizeof_void_p})
-AC_SUBST(SIZEOF_FLOAT, ${ac_cv_sizeof_float})
-
-
-# -----------------------------------------------------------------------
-# Libraries:	
-# -----------------------------------------------------------------------
-AC_CHECK_LIB(m, main)
-AC_CHECK_LIB(nsl, main)
-AC_CHECK_LIB(socket, main)
-AC_CHECK_LIB(dld, shl_load, [blt_have_dld=yes], [blt_have_dld=no])
-
-AC_PATH_X
-
-# -----------------------------------------------------------------------
-# Headers:	
-# -----------------------------------------------------------------------
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-
-AC_CHECK_HEADERS(inttypes.h)
-if test "${ac_cv_header_inttypes_h}" = "yes" ; then 
-  AC_SUBST(HAVE_INTTYPES_H, ["#define HAVE_INTTYPES_H 1"])
-else
-  AC_SUBST(HAVE_INTTYPES_H, ["/* can't find inttypes.h */"])
-fi	
-AC_CHECK_HEADERS(limits.h sys/param.h)
-AC_CHECK_HEADERS(string.h ctype.h)
-AC_CHECK_HEADERS(errno.h float.h math.h ieeefp.h)
-AC_CHECK_HEADERS(sys/time.h waitflags.h sys/wait.h)
-AC_CHECK_HEADERS(malloc.h memory.h)
-AC_CHECK_HEADERS(setjmp.h)
-AC_CHECK_HEADERS(stdlib.h stddef.h unistd.h)
-
-
-# FREETYPE2 header
-if test "${blt_with_ft2_include_dir}" != "no" ; then
-  ft2_inc_spec=`freetype-config --cflags`
-  save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="${ft2_inc_spec}"
-  AC_CHECK_HEADERS(ft2build.h, FT2_INC_SPEC=${ft2_inc_spec}, FT2_INC_SPEC="")
-  CPPFLAGS=${save_CPPFLAGS}
-
-  # Xft header
-  if test "${blt_with_xft_include_dir}" != "no" ; then
-    BLT_CHECK_HEADER(XFT, X11/Xft/Xft.h, $blt_with_xft_include_dir, ${ft2_inc_spec})
-  fi
-fi
-
-# EXPAT header
-if test "${blt_with_expat_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(EXPAT, expat.h, $blt_with_expat_include_dir)
-fi
-
-# MYSQL header
-if test "${blt_with_mysql_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(MYSQL, mysql/mysql.h, $blt_with_mysql_include_dir)
-fi
-
-# XPM header
-if test "${blt_with_xpm_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(XPM, X11/xpm.h, $blt_with_xpm_include_dir)
-fi
-
-# JPEG header
-if test "${blt_with_jpeg_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(JPG, jpeglib.h, $blt_with_jpeg_include_dir)
-fi
-
-# TIFF header
-if test "${blt_with_tiff_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(TIF, tiff.h, $blt_with_tiff_include_dir)
-fi
-
-# PNG header
-if test "${blt_with_png_include_dir}" != "no" ; then
-  BLT_CHECK_HEADER(PNG, png.h, $blt_with_png_include_dir)
-fi
-
-# -----------------------------------------------------------------------
-# Types:
-# -----------------------------------------------------------------------
-AC_TYPE_SIZE_T
-AC_TYPE_PID_T
-
-AC_MSG_CHECKING([whether union wait is defined correctly])
-AC_CACHE_VAL(blt_cv_struct_wait_works,
-    AC_TRY_COMPILE([#include <sys/types.h> 
-#include <sys/wait.h>], [
-    /* 
-     *	Check whether <sys/wait.h> defines the type "union wait" 
-     *	correctly.  It's needed because of weirdness in HP-UX where 
-     *	"union wait" is defined in both the BSD and SYS-V  environments.  
-     *	Checking the usability of WIFEXITED seems to do	the trick.
-     */
-    union wait x;
-    WIFEXITED(x);	/* Generates compiler error if WIFEXITED
-			 * uses an int. */
-], 
-    	[blt_cv_struct_wait_works="yes"], 
-	[blt_cv_struct_wait_works="no"]))
-
-if test "${blt_cv_struct_wait_works}" = "yes"; then
-    AC_DEFINE([HAVE_UNION_WAIT], 1, [Define if 'wait' is a union.])
-fi
-AC_MSG_RESULT([$blt_cv_struct_wait_works])
-
-
-# -----------------------------------------------------------------------
-#
-# Library Functions: 	Check for  drand48, and srand48.
-#
-# -----------------------------------------------------------------------
-
-AC_HAVE_FUNCS(strtolower strcasecmp strncasecmp drand48 srand48 finite isnan)
-
-# For HPUX it's a little more complicated to search for isfinite
-AC_MSG_CHECKING([for isfinite])
-AC_CACHE_VAL(blt_cv_have_isfinite,
-    AC_TRY_LINK([#include <math.h>], [
-double x = 1.0;
-if (isfinite(x)) {
-   return 0;
-}
-], [blt_cv_have_isfinite="yes"], [blt_cv_have_isfinite="no"]))
-
-if test "${blt_cv_have_isfinite}" = "yes"; then
-    AC_DEFINE([HAVE_ISFINITE], 1, [Define if we have a working 'isinfinite'.])
-fi
-AC_MSG_RESULT([$blt_cv_have_isfinite])
-
-# -----------------------------------------------------------------------
-#
-# 	Check the smallest value such that 1.0 + x != 1.0.
-#	For ANSI compilers this is DBL_EPSILON in float.h
-#
-#--------------------------------------------------------------------
-
-AC_MSG_CHECKING([whether DBL_EPSILON is defined in float.h])
-AC_CACHE_VAL(blt_cv_found_dbl_epsilon,
-    AC_TRY_COMPILE([
-#ifdef HAVE_FLOAT_H
-#include <float.h>
-#endif
-], [
-#ifdef DBL_EPSILON
- exit(0);
-#else
- exit(1);
-#endif
-], blt_cv_found_dbl_epsilon=yes, blt_cv_found_dbl_epsilon=no) 
-)
-AC_MSG_RESULT([${blt_cv_found_dbl_epsilon}])
-
-if test "${blt_cv_found_dbl_epsilon}" = "no" ; then
-  AC_CACHE_VAL([blt_cv_dbl_epsilon], 
-  old_flags="$CFLAGS"
-  CFLAGS="-lm"
-  AC_MSG_CHECKING([whether DBL_EPSILON can be computed.])
-  BLT_RUN_WITH_OUTPUT([blt_cv_dbl_epsilon], [
-main () {
-    double e, u;
-    /* 
-     *	Check the smallest value such that 1.0 + x != 1.0.
-     *	For ANSI compilers this is DBL_EPSILON in float.h
-     */
-    u = 1.0;
-    for(;;) {
-       u *= 0.5;
-       if ((1.0 + u) == 1.0) {
-	   break;
-       }
-    }
-    e = u * 2.0;
-    printf("%.17e\n", e);
-    exit(0);
-}])
-    CFLAGS="$old_flags"
-    AC_DEFINE_UNQUOTED([BLT_DBL_EPSILON], ${blt_cv_dbl_epsilon}, 
-	[Define the smallest machine value DBL_EPILSON.])
-    AC_MSG_RESULT([${blt_cv_dbl_epsilon}])
-)
-fi
-
-
-AC_CHECK_DECLS(strcasecmp,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-
-AC_CHECK_DECLS(strncasecmp,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-
-AC_CHECK_DECLS(strtolower,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-
-AC_CHECK_DECLS(drand48,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(srand48,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(j1,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(hypot,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(isnan,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(isfinite,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(finite,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-AC_CHECK_DECLS(free,,,[
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-])
-
-# -----------------------------------------------------------------------
-#
-# System services: 	X, Tcl, Tk
-#
-# -----------------------------------------------------------------------
-
-if test "x${x_libraries}" = "x" ; then
-  X11_LIB_SPEC="-lX11"
-else
-  X11_LIB_SPEC="-L${x_libraries} -lX11"
-fi
-if test "x${x_includes}" = "x" ; then
-  X11_INC_SPEC=""
-else
-  X11_INC_SPEC="-I${x_includes}"
-fi
-
-case "$target_cpu" in
-  [i[3-9]86|x86*|k5|k6|k6-2|k6-3|pentium*|athlon*])
-    AC_DEFINE([HAVE_X86], 1, [Define if we're compiling for an X86.])
-    ;;
-  *)
-    ;;
-esac
-
-# -----------------------------------------------------------------------
-#
-#	Find the Tcl build configuration file "tclConfig.sh"
-#
-# -----------------------------------------------------------------------
-
-AC_MSG_CHECKING([for tclConfig.sh])
-tcl_config_sh=""
-if test "x$blt_with_tcl" != "x" ; then
-
-  # Verify that a tclConfig.sh file exists in the directory specified 
-  # by --with-tcl. 
-
-  for dir in \
-   $blt_with_tcl 
-  do
-    if test -r "$dir/tclConfig.sh" ; then
-      tcl_config_sh="$dir/tclConfig.sh"
-      break
-    elif test -r "$dir/lib/tclConfig.sh" ; then
-      tcl_config_sh="$dir/lib/tclConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tclConfig.sh" ; then
-      tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-      break
-    fi
-  done
-elif test "${blt_with_tcl_include_dir}" = "yes" -a \
-	  "${blt_with_tcl_lib_dir}" = "yes" ; then 
-
-  # Otherwise, search for Tcl configuration file.  
-
-  #  1. Search previously named locations.
-
-  for dir in \
-   $prefix \
-   $exec_prefix \
-   $blt_cv_tcl_lib 
-  do
-    if test -r "$dir/tclConfig.sh" ; then
-      tcl_config_sh="$dir/tclConfig.sh"
-      break
-    elif test -r "$dir/lib/tclConfig.sh" ; then
-      tcl_config_sh="$dir/lib/tclConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tclConfig.sh" ; then
-      tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-      break
-    fi
-  done
-
-  #  2. Search source directories.
-
-  if test "x$tcl_config_sh" = "x" ; then
-    for dir in \
-     `ls -dr ../tcl[[7-9]].[[0-9]]* 2>/dev/null` \
-     ../tcl \
-     `ls -dr ../../tcl[[7-9]].[[0-9]]* 2>/dev/null` \
-     ../../tcl \
-     `ls -dr ../../../tcl[[7-9]].[[0-9]]* 2>/dev/null` \
-     ../../../tcl 
-    do
-      if test -r "$dir/$blt_platform/tclConfig.sh" ; then
-	tcl_config_sh="$dir/$blt_platform/tclConfig.sh"
-	break
-      fi
-    done
-  fi
-
-  #  3. Search standard locations.
-
-  if test "x$tcl_config_sh" = "x" ; then
-    for dir in \
-     /usr/local \
-     /usr
-    do
-      if test -r "$dir/tclConfig.sh" ; then
-	tcl_config_sh="$dir/tclConfig.sh"
-	break
-      elif test -r "$dir/lib/tclConfig.sh" ; then
-	tcl_config_sh="$dir/lib/tclConfig.sh"
-	break
-      fi
-    done
-  fi
-fi
-
-AC_MSG_RESULT([${tcl_config_sh}])
-
-
-# -----------------------------------------------------------------------
-#
-#	Find the Tk build configuration file "tkConfig.sh"
-#
-# -----------------------------------------------------------------------
-
-AC_MSG_CHECKING([for tkConfig.sh])
-tk_config_sh=""
-if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
-
-  # Verify that a tkConfig.sh file exists in the directory specified 
-  # by --with-tcl or --with-tk. 
-
-  for dir in \
-   $blt_with_tk \
-   $blt_with_tcl 
-  do
-    if test -r "$dir/tkConfig.sh" ; then
-      tk_config_sh="$dir/tkConfig.sh"
-      break
-    elif test -r "$dir/lib/tkConfig.sh" ; then
-      tk_config_sh="$dir/lib/tkConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tkConfig.sh" ; then
-      tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-      break
-    fi
-  done
-elif test "${blt_with_tk_include_dir}" = "yes" -a \
-	  "${blt_with_tk_lib_dir}" = "yes" ; then 
-
-  # Search for Tk configuration file.  
-
-  #  1. Search previously named locations.
-
-  for dir in \
-   $prefix \
-   $exec_prefix \
-   $blt_cv_tk_lib \
-   $blt_cv_tcl_lib 
-  do
-    if test -r "$dir/tkConfig.sh" ; then
-      tk_config_sh="$dir/tkConfig.sh"
-      break
-    elif test -r "$dir/lib/tkConfig.sh" ; then
-      tk_config_sh="$dir/lib/tkConfig.sh"
-      break
-    elif test -r "$dir/$blt_platform/tkConfig.sh" ; then
-      tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-      break
-    fi
-  done
-
-  #  2. Search source directories.
-
-  if test "x$tk_config_sh" = "x" ; then
-    for dir in \
-     ../tcl \
-     `ls -dr ../tk[[4-9]].[[0-9]]* 2>/dev/null` \
-     ../../tcl \
-     `ls -dr ../../tk[[4-9]].[[0-9]]* 2>/dev/null` \
-     ../../../tcl \
-     `ls -dr ../../../tk[[4-9]].[[0-9]]* 2>/dev/null`
-    do
-      if test -r "$dir/$blt_platform/tkConfig.sh"; then
-	tk_config_sh="$dir/$blt_platform/tkConfig.sh"
-	break
-      fi
-    done
-  fi
-
-  #  3. Search standard locations.
-
-  if test "x$tk_config_sh" = "x" ; then
-    for dir in \
-     /usr/local \
-     ${x_libraries} \
-     /usr
-    do
-      if test -r "$dir/tkConfig.sh" ; then
-	tk_config_sh="$dir/tkConfig.sh"
-	break
-      elif test -r "$dir/lib/tkConfig.sh" ; then
-	tk_config_sh="$dir/lib/tkConfig.sh"
-	break
-      fi
-    done
-  fi
-fi
-AC_MSG_RESULT([${tk_config_sh}])
-
-# -----------------------------------------------------------------------
-#
-#	Source in the Tcl/Tk configuration scripts.  
-#
-#
-#	Check for tclConfig.sh and tkConfig.sh.  If found use values
-#	in file, but don't check if libraries exist.  
-#
-# -----------------------------------------------------------------------
-
-if test "x${tcl_config_sh}" != "x" ; then
-  . $tcl_config_sh
-  TCL_INC_SPEC=${TCL_INCLUDE_SPEC}
-fi
-
-if test "x${tk_config_sh}" != "x" ; then
-  . $tk_config_sh
-  TK_INC_SPEC=${TK_INCLUDE_SPEC}
-fi
-
-tcl_includes_dir=""
-tk_includes_dir=""
-TCL_INC_SPEC=${TCL_INCLUDE_SPEC}
-TK_INC_SPEC=${TK_INCLUDE_SPEC}
-
-if test "${blt_with_tcl_include_dir}" = "no" ; then 
-  AC_ERROR([Can't find tcl.h: use --with-tclincdir switch])
-elif test "${blt_with_tcl_include_dir}" != "yes" ; then 
-  if test -r "${blt_with_tcl_include_dir}/tcl.h" ; then 
-    tcl_includes_dir=${blt_with_tcl_include_dir}
-    TCL_INC_SPEC="-I${tcl_includes_dir}"
-    BLT_GET_SYMBOL(TCL_MAJOR_VERSION, TCL_MAJOR_VERSION, 
-	[${tcl_includes_dir}/tcl.h])
-    BLT_GET_SYMBOL(TCL_MINOR_VERSION, TCL_MINOR_VERSION, 
-	[${tcl_includes_dir}/tcl.h])
-    TCL_VERSION=${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}
-  else
-    AC_ERROR([Can't find tcl.h in \"${blt_with_tcl_include_dir}\"])
-  fi
-else
-  for dir in \
-   ${TCL_PREFIX}/include \
-   ${TCL_SRC_DIR}/generic  \
-    /usr/local/include \
-    /usr/include 
-  do
-    if test -r "$dir/tcl.h" ; then
-      tcl_includes_dir=$dir
-      break
-    fi
-  done
-  if test "x${tcl_includes_dir}" = "x" ; then
-    AC_ERROR([Can't find tcl.h header file.])
-  fi
-fi
-
-if test "${blt_with_tk_include_dir}" = "no" ; then 
-  AC_ERROR([Can't find tk.h: use --with-tkincdir switch])
-elif test "${blt_with_tk_include_dir}" != "yes" ; then 
-  if test -r "${blt_with_tk_include_dir}/tk.h" ; then 
-    tk_includes_dir=${blt_with_tk_include_dir}
-    TK_INC_SPEC="-I${tk_includes_dir}"
-    BLT_GET_SYMBOL(TK_MAJOR_VERSION, TK_MAJOR_VERSION, 
-	${tk_includes_dir}/tk.h)
-    BLT_GET_SYMBOL(TK_MINOR_VERSION, TK_MINOR_VERSION, 
-	${tk_includes_dir}/tk.h)
-    TK_VERSION=${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}
-  else
-    AC_ERROR([Can't find tk.h in \"${blt_with_tk_include_dir}\"])
-  fi
-else
-  for dir in \
-   ${TK_PREFIX}/include \
-   ${TK_SRC_DIR}/generic \
-   ${tcl_includes_dir} \
-    /usr/local/include \
-    /usr/include 
-  do
-    if test -r "$dir/tk.h" ; then
-      tk_includes_dir=$dir
-      break
-    fi
-  done
-  if test "x${tk_includes_dir}" = "x" ; then
-    AC_ERROR([Can't find tk.h header file.])
-  fi
-fi
-
-case $target in
-  *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
-    TCL_LIB_VERSION="${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
-    TK_LIB_VERSION="${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
-    ;;
-  *)
-    TCL_LIB_VERSION="${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
-    TK_LIB_VERSION="${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
-    ;;
-esac
-
-if test "${blt_with_tcl_lib_dir}" = "no" ; then
-  AC_ERROR([Can't find Tcl library: use --with-tcllibdir switch])
-elif test "${blt_with_tcl_lib_dir}" = "yes" ; then
-  for libname in \
-   "${TCL_EXEC_PREFIX}/lib/${SO_PREFIX}tcl${TCL_LIB_VERSION}${SO_EXT}" \
-   "${TCL_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}${IMPLIB_EXT}" \
-   "${TCL_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}.lib" \
-   "${TCL_EXEC_PREFIX}/lib/libtcl${TCL_LIB_VERSION}.a" 
-  do
-    if test -r "$libname" ; then
-      TCL_LIB_DIR="${TCL_EXEC_PREFIX}/lib"
-      TCL_LIB_SPEC="-L${TCL_LIB_DIR} -ltcl${TCL_LIB_VERSION}"
-      break
-    fi
-  done
-else
-  for libname in \
-   "${blt_with_tcl_lib_dir}/${SO_PREFIX}tcl${TCL_LIB_VERSION}${SO_EXT}" \
-   "${blt_with_tcl_lib_dir}/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}${IMPLIB_EXT}" \
-   "${blt_with_tcl_lib_dir}/${IMPLIB_PREFIX}tcl${TCL_LIB_VERSION}.lib" \
-   "${blt_with_tcl_lib_dir}/libtcl${TCL_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TCL_LIB_DIR="${blt_with_tcl_lib_dir}"
-      TCL_LIB_SPEC="-L${TCL_LIB_DIR} -ltcl${TCL_LIB_VERSION}"
-      break
-    fi
-  done
-fi
-if test "x${TCL_LIB_DIR}" = "x" ; then
-  AC_ERROR([Can't find tcl library ${libname} in \"${blt_with_tcl_lib_dir}\"])
-fi
-
-if test "${blt_with_tk_lib_dir}" = "no" ; then
-  AC_ERROR([Can't find Tcl library: use --with-tcllibdir switch])
-elif test "${blt_with_tk_lib_dir}" = "yes" ; then
-  for libname in \
-   "${TK_EXEC_PREFIX}/lib/${SO_PREFIX}tk${TK_LIB_VERSION}${SO_EXT}" \
-   "${TK_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}${IMPLIB_EXT}" \
-   "${TK_EXEC_PREFIX}/lib/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}.lib" \
-   "${TK_EXEC_PREFIX}/lib/libtk${TK_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TK_LIB_DIR="${TK_EXEC_PREFIX}/lib"
-      TK_LIB_SPEC="-L${TK_LIB_DIR} -ltk${TK_LIB_VERSION}"
-      break
-    fi
-  done
-else
-  for libname in \
-   "${blt_with_tk_lib_dir}/${SO_PREFIX}tk${TK_LIB_VERSION}${SO_EXT}" \
-   "${blt_with_tk_lib_dir}/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}${IMPLIB_EXT}" \
-   "${blt_with_tk_lib_dir}/${IMPLIB_PREFIX}tk${TK_LIB_VERSION}$.lib" \
-   "${blt_with_tk_lib_dir}/libtk${TK_LIB_VERSION}.a"
-  do
-    if test -r "$libname" ; then
-      TK_LIB_DIR="${blt_with_tk_lib_dir}"
-      TK_LIB_SPEC="-L${TK_LIB_DIR} -ltk${TK_LIB_VERSION}"
-      break
-    fi
-  done
-fi
-if test "x${TK_LIB_DIR}" = "x" ; then
-  AC_ERROR([Can't find tk library.])
-fi
-
-# -----------------------------------------------------------------------
-#
-# Include files
-#
-#	Append to INC_SPECS the various include files specifications
-#	(built fromt the include directory information).
-#
-# -----------------------------------------------------------------------
-
-# Tk include files
-if test "${tk_includes_dir}" != "/usr/include" ; then
-  INC_SPECS="${INC_SPECS} ${TK_INC_SPEC}"
-fi
-
-# Tcl include files
-#
-#	Add the include directory specification only if the Tcl
-#	headers reside in a different directory from Tk's.  
-if test "${tcl_includes_dir}" != "/usr/include" -a \
-	"${tcl_includes_dir}" != "${tk_includes_dir}" ; then
-  INC_SPECS="${INC_SPECS} ${TCL_INC_SPEC}"
-fi
-
-
-# On Windows, override the default include directory with our own.
-if test "${blt_platform}" = "win"; then
-   x_includes="NONE"
-fi
-
-# X11 include files
-if test "x${x_includes}" != "x" -a \
-	"${x_includes}" != "NONE" -a \
-	"${x_includes}" != "/usr/include" -a \
-	"${x_includes}" != "${tk_includes_dir}" -a \
-	"${x_includes}" != "${tcl_includes_dir}" ; then
-  INC_SPECS="${INC_SPECS} -I${x_includes}"
-fi
-
-# -----------------------------------------------------------------------
-#
-# Libraries
-#
-#	Append to LIB the various library specifications 
-#	(built from the library directory information).
-#
-# -----------------------------------------------------------------------
-
-# Collect the libraries for AIX that aren't using stubs.
-aix_lib_specs=$LIBS
-
-if test "${blt_platform}" = "unix"; then
-
-  # Add specification for X11 library only on Unix platforms.
-
-  if test "x${x_libraries}" = "x"  -o \
-	  "x${x_libraries}" = "NONE"  -o \
-  	  "${x_libraries}" = "/usr/lib" -o  \
-  	  "${x_libraries}" = "/usr/lib64" -o  \
-	  "${x_libraries}" = "${TK_LIB_DIR}"  -o \
-	  "${x_libraries}" = "${TCL_LIB_DIR}" ; then
-    x_lib_spec=""
-    aix_lib_specs="-lX11 ${aix_lib_specs}"
-  else 
-    x_lib_spec="-L${x_libraries}"
-    aix_lib_specs="-L${x_libraries} -lX11 ${aix_lib_specs}"
-    if test "x${loader_run_path}" = "x" ; then
-      loader_run_path="${x_libraries}"
-    else
-      loader_run_path="${loader_run_path}:${x_libraries}"
-    fi
-  fi
-fi
-
-
-# EXPAT library
-
-if test "${blt_with_expat_lib_dir}" != "no" -a \
-	"${ac_cv_header_expat_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(EXPAT, expat, XML_ParserCreate, $blt_with_expat_lib_dir)
-fi
-
-# MYSQL client library
-
-if test "${blt_with_mysql_lib_dir}" != "no" -a \
-	"${ac_cv_header_mysql_mysql_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(MYSQL, mysqlclient, mysql_init, $blt_with_mysql_lib_dir)
-fi
-
-# JPEG library
-
-if test "${blt_with_jpeg_lib_dir}" != "no" -a \
-	"${ac_cv_header_jpeglib_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(JPG, jpeg, jpeg_read_header, $blt_with_jpeg_lib_dir)
-fi
-
-# TIFF library
-
-if test "${blt_with_tiff_lib_dir}" != "no" -a \
-	"${ac_cv_header_tiff_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(TIF, tiff, TIFFReadRGBAImage, $blt_with_tiff_lib_dir)
-fi
-
-# PNG library
-
-if test "${blt_with_png_lib_dir}" != "no" -a \
-	"${ac_cv_header_png_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(PNG, png, png_read_png, $blt_with_png_lib_dir)
-fi
-
-# zlib library
-if test "${blt_with_z_lib_dir}" != "no" ; then
-  BLT_CHECK_LIBRARY(Z, z, deflate, $blt_with_z_lib_dir)
-fi
-
-# XPM library
-
-old_CFLAGS=$CFLAGS
-CFLAGS=$X11_LIB_SPEC
-
-if test "${blt_with_xpm_lib_dir}" != "no" -a \
-	"${ac_cv_header_xpm_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(XPM, Xpm, XpmCreateXpmImageFromBuffer, $blt_with_xpm_lib_dir)
-fi
-
-# FREETYPE library
-
-if test "${blt_with_ft2_lib_dir}" != "no" -a \
-	"${ac_cv_header_ft2build_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(FT2, freetype, FT_Init_FreeType, $blt_with_ft2_lib_dir)
-fi
-
-# Xft library
-
-if test "${blt_with_xft2_lib_dir}" != "no" -a \
-	"${ac_cv_header_x11_xft_xft_h}" != "no" ; then
-  BLT_CHECK_LIBRARY(XFT, [Xft -lexpat], XftFontOpenPattern, $blt_with_xft_lib_dir)
-  BLT_CHECK_LIBRARY(FTCFG, fontconfig, FcPatternCreate, yes)
-  BLT_CHECK_LIBRARY(XRENDER, Xrender, XRenderQueryExtension, yes)
-fi
-
-# Xrandr library
-
-BLT_CHECK_LIBRARY(XRANDR, Xrandr, XRRGetScreenInfo, yes)
-
-BLT_CHECK_LIBRARY(XDMCP, Xdmcp, XdmcpWrap, yes)
-BLT_CHECK_LIBRARY(XAU, Xau, XauReadAuth, yes)
-CFLAGS=$old_CFLAGS
-# Tcl libraries
-if test "${TCL_LIB_DIR}" != "/usr/lib" -a \
-	"${TCL_LIB_DIR}" != "/usr/lib64" -a \
-	"${TCL_LIB_DIR}" != "${TK_LIB_DIR}" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${TCL_LIB_DIR}"
-  else
-    loader_run_path="${TCL_LIB_DIR}:${loader_run_path}"
-  fi
-fi
-
-# Tk libraries
-if test "${TK_LIB_DIR}" != "/usr/lib" -a \
-	"${TK_LIB_DIR}" != "/usr/lib64" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${TK_LIB_DIR}"
-  else
-    loader_run_path="${TK_LIB_DIR}:${loader_run_path}"
-  fi
-fi
-
-
-# -----------------------------------------------------------------------
-#
-# 	Set up a new default prefix to installation path.  The ways
-#	the prefix can be set and their precedence are as follows:
-#
-#	1. --prefix option given to ./configure. (prefix != NONE)
-#       2. use previously configured Tk prefix
-#
-# -----------------------------------------------------------------------
-
-if test "$prefix" = "NONE" ; then
-  prefix=${TCL_PREFIX}
-fi
-
-if test "$exec_prefix" = "NONE" ; then
-  exec_prefix=${TCL_EXEC_PREFIX}
-fi
-
-# -------------------------------------------------------------------------
-#
-#	Extract the BLT version number for the blt.h header
-#
-# -------------------------------------------------------------------------
-AC_MSG_CHECKING([BLT_MAJOR_VERSION])
-AC_CACHE_VAL(blt_cv_major_version, 
-BLT_GET_SYMBOL(blt_cv_major_version, BLT_MAJOR_VERSION, ${srcdir}/src/blt.h)
-)
-BLT_MAJOR_VERSION=${blt_cv_major_version}
-AC_MSG_RESULT([$blt_cv_major_version])
-
-AC_MSG_CHECKING([BLT_MINOR_VERSION])
-AC_CACHE_VAL(blt_cv_minor_version, 
-BLT_GET_SYMBOL(blt_cv_minor_version, BLT_MINOR_VERSION, ${srcdir}/src/blt.h)
-)
-AC_MSG_RESULT([$blt_cv_minor_version])
-BLT_MINOR_VERSION=${blt_cv_minor_version}
-
-BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION}
-
-# Add BLT to the run path
-libdir=${exec_prefix}/lib
-
-if test "x${libdir}" != "x"  -a \
-	"${libdir}" != "/usr/lib" -a  \
-	"${libdir}" != "/usr/lib64" -a  \
-	"${libdir}" != "${x_libraries}" -a  \
-	"${libdir}" != "${TK_LIB_DIR}"  -a \
-	"${libdir}" != "${TCL_LIB_DIR}" ; then
-  if test "x${loader_run_path}" = "x" ; then
-    loader_run_path="${libdir}"
-  else
-    loader_run_path="${libdir}:${loader_run_path}"
-  fi
-fi
-
-# -------------------------------------------------------------------------
-#
-#	Extract the Tcl version number for the tcl.h header
-#
-# -------------------------------------------------------------------------
-
-if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then
-  :
-elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then
-  :
-elif test "$TCL_VERSION" = "$TK_VERSION" ; then
-  :
-else
-  AC_ERROR([Mismatched Tcl/Tk versions ($TCL_VERSION != $TK_VERSION)])
-fi
-
-#--------------------------------------------------------------------
-#
-# Check if we can generate shared libraries on this system.  Set flags 
-# to generate shared libraries for systems that we know about.  Start 
-# with the values found in tclConfig.sh, make changes as we know about 
-# the different systems.
-#
-#--------------------------------------------------------------------
-
-LIB_BASE_NAME=libBLT
-
-# Initialize shared library build variables
-
-SO_LD="$TCL_SHLIB_LD"
-SO_LDFLAGS="$TCL_LD_FLAGS"
-SO_RUNPATH="$TCL_LD_SEARCH_FLAGS"
-
-SO_TARGET=""
-SO_CFLAGS=""
-SO_LIBS=""
-LDFLAGS=""
-LD_RUN_PATH=""
-EXTRA_LIBS=""
-
-case $target in
-  *-aix4.[[2-9]]*)
-    # No Position-Independent flags needed
-    SO_CFLAGS=""
-    
-    # Use the installed export file or the one found in the source directory.
-
-    if test -r "${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp" ; then
-      tcl_exp="${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp"
-    else
-      tcl_exp="${TCL_SRC_DIR}/unix/lib.exp"
-    fi
-    if test -r "${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp" ; then
-      tk_exp="${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp"
-    else
-      tk_exp="${TK_SRC_DIR}/unix/lib.exp"
-    fi
-    
-    full_src_path=`cd ${srcdir}; pwd`
-
-    # Use shell-script to link shared library
-    SO_LD="${full_src_path}/cf/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}"
-
-    SO_LIBS="${aix_lib_specs} -lc"
-
-    LDFLAGS="-L${loader_run_path}"
-    EXTRA_LIBS="-ldl"
-    ;;
-  
-  *-aix*)
-    # No Position-Independent flags needed
-    SO_CFLAGS=""
-    
-    # Use the installed export file or the one found in the source directory.
-
-    if test -r "${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp" ; then
-      tcl_exp="${TCL_LIB_DIR}/libtcl${TCL_LIB_VERSION}.exp"
-    else
-      tcl_exp="${TCL_SRC_DIR}/unix/lib.exp"
-    fi
-    if test -r "${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp" ; then
-      tk_exp="${TK_LIB_DIR}/libtk${TK_LIB_VERSION}.exp"
-    else
-      tk_exp="${TK_SRC_DIR}/unix/lib.exp"
-    fi
-
-    full_src_path=`cd ${srcdir}/cf; pwd`
-
-    # Use shell-script to link shared library
-
-    SO_LD="${full_src_path}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}"
-
-    SO_LIBS="${aix_lib_specs} -lc"
-    
-    LDFLAGS="-L${loader_run_path}"
-    EXTRA_LIBS="-lld"
-    ;;
-  
-  *-bsdi2*|*-bsdi3*)
-    SO_CFLAGS=""
-    SO_LD="shlicc"
-    SO_LDFLAGS="-r"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-bsdi4*)
-    SO_CFLAGS="-export-dynamic -fPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS='-shared -Wl,-E -Wl,-soname,$@'
-    ;;
-
-  *-*-cygwin* | *-*-mingw*)
-    SO_LD="${CC}"
-    SO_LDFLAGS='-shared -Wl,-E -Wl,--out-implib,$@'
-    EXTRA_LIBS="-lwinspool"
-    SO_EXT=".dll"
-    LDFLAGS=""
-    ;;
-
-  *-*-darwin*)
-    SO_CFLAGS="-fno-common"
-    SO_EXT=".dylib"
-    SO_LD="${CC}"
-    SO_LDFLAGS="-dynamiclib"
-
-    AC_MSG_CHECKING([if ld accepts -single_module flag])
-    save_LDFLAGS=$LDFLAGS
-    LDFLAGS="$SO_LDFLAGS -Wl,-single_module"
-    AC_TRY_LINK(, [int i;], [single_module=yes], [single_module=no])
-    if test "${single_module}" = "yes" ; then 
-      SO_LDFLAGS=$LDFLAGS
-    fi
-    AC_MSG_RESULT([$single_module])
-    SO_LIBRARY_PATH="DYLD_LIBRARY_PATH"
-    LDFLAGS=""
-    ;;
-
-  *-dgux*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-    EXTRA_LIBS="-ldl"
-    ;;
-  
-  *-hpux*)
-    if test "$blt_have_gcc" = "no" ; then
-      DEFINES="$DEFINES -D_HPUX_SOURCE"
-    fi
-    if test "${blt_have_dld}" = "yes" ; then
-      SO_CFLAGS="+Z"
-      SO_LD="ld"
-      SO_LDFLAGS="-b -E -n +s +b,${loader_run_path}:."
-      SO_EXT=".sl"
-
-      # The run path is included in both LDFLAGS and SO_LDFLAGS
-      # because SO_LD is ld and LD is cc/gcc.
-
-      LDFLAGS="-Wl,-E -Wl,+s,+b,${loader_run_path}:."
-      EXTRA_LIBS="-ldld"
-    fi
-    ;;
-  
-  *-irix64-6.5*)
-    SO_CFLAGS=""
-    SO_LD="ld"
-    SO_LDFLAGS="-32 -shared -rdata_shared"
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    ;;
-
-  *-irix-[56].*|*-irix64-*)
-    SO_CFLAGS=""
-    SO_LD="ld"
-    SO_LDFLAGS="-shared -rdata_shared"
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    LDFLAGS=""
-    if test "$blt_have_gcc" = "yes" ; then
-      SO_CFLAGS="-mabi=n32 $SO_CFLAGS"
-      SO_LDFLAGS="-mabi=n32 $SO_LDFLAGS"
-      LDFLAGS="-mabi=n32 $LDFLAGS"
-    else	
-      CFLAGS="-n32 $CFLAGS"
-      LDFLAGS="-n32 $LDFLAGS"
-    fi
-    ;;
-    
-  *-linux*)
-    SO_CFLAGS="-fPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    
-    LDFLAGS=""
-    EXTRA_LIBS="-ldl"
-    ;;
-  
-  *-mp-ras-02*)
-    SO_CFLAGS="-G -K PIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS=""
-    ;;
-
-  *-mp-ras-*)
-    SO_CFLAGS="-G -K PIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS="-Wl,-Bexport"
-    ;;
-
-  *-ncr-sysv4-*2*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-ncr-sysv4*)
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G -Wl,-Bexport"
-
-    LDFLAGS="-Wl,-Bexport"
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-netbsd*|*-freebsd*|*-openbsd*)
-    # Not available on all versions:  check for include file.
-    AC_CHECK_HEADER(dlfcn.h, test_ok=yes, test_ok=no)
-    if test "$test_ok" = yes; then
-      SO_CFLAGS="-fpic"
-      SO_LD="ld"
-      SO_LDFLAGS="-Bshareable -x"
-    fi
-    ;;
-
-  *-nextstep*)
-    SO_CFLAGS=""
-    SO_LD="cc"
-    SO_LDFLAGS="-nostdlib -r"
-    ;;
-
-  *-osf1-1.[012]*)
-    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-
-    SO_CFLAGS=""
-
-    # Warning: Ugly Makefile Hack 
-    #	Make package name same as library name
-
-    SO_LD='ld -R -export $@:'
-    ;;
-
-  *-osf1-1.*)
-    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-
-    SO_CFLAGS="-fpic"
-    SO_LD="ld -shared"
-    ;;
-
-  *-osf1V*)
-    # Digital OSF/1
-
-    SO_CFLAGS=""
-    SO_LD='ld'
-    SO_LDFLAGS='-shared -expect_unresolved "*"'
-    LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    LDFLAGS=""
-    ;;
-
-  *-sco*)
-    # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
-    # this test works, since "uname -s" was non-standard in 3.2.4 and
-    # below.
-
-    SO_CFLAGS="-Kpic -belf"
-    SO_LD="ld"
-    SO_LDFLAGS="-G"
-    LDFLAGS="-belf -Wl,-Bexport"
-    ;;
-
-  *-sni-sysv*)
-
-    SO_CFLAGS="-K PIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-sunos4*)
-
-    SO_CFLAGS="-PIC"
-    SO_LD="ld"
-    SO_LDFLAGS="-assert pure-text"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-solaris2*)
-
-    SO_CFLAGS="-KPIC"
-    if test "${blt_with_gnu_ld}" = "yes" -a "$blt_have_gcc" = "yes" ; then
-      SO_LD="gcc"
-      SO_LDFLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
-      LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
-    else
-      SO_LD="/usr/ccs/bin/ld"
-      SO_LDFLAGS="-G -z text"
-      LD_RUN_PATH="-R ${loader_run_path}"
-    fi
-    EXTRA_LIBS="-ldl"
-  ;;
-
-  *-mips-dde-sysv*)
-
-    SO_CFLAGS="-KPIC"
-    SO_LD="cc"
-    SO_LDFLAGS="-G"
-
-    EXTRA_LIBS="-ldl"
-    ;;
-
-  *-pc-sysv4* | *-unixware-5*)
-    SO_CFLAGS="-G -KPIC"
-    SO_LD="${CC}"
-    SO_LDFLAGS=" -Wl,-Bexport"
-    ;;
-  
-  *)
-    build_shared="no"
-    ;;
-
-esac
-
-# If we're running gcc, then set SO_CFLAGS flags for compiling
-# shared libraries for gcc, instead of those of the vendor's
-# compiler.
-
-
-if test "$blt_have_gcc" = "yes" ; then
-  SO_CFLAGS="-fPIC"
-fi
-
-# We can't back link against static versions of Tcl/Tk. 
-# If # ${TCL_SHARED_BUILD} can't be found or isn't "1", assume that
-# shared libraries weren't built.
-
-if test "${TCL_SHARED_BUILD}" != "1" ; then
-  SO_LIBS=""
-fi
-
-if test "${build_shared}" = "yes" -a "$blt_enable_shared" = "yes"; then
-  AC_SUBST(BLT_SO_CFLAGS, "$SO_CFLAGS")
-  AC_SUBST(BLT_TARGET, "shared")
-  AC_SUBST(BLT_SO_LD, "$SO_LD")
-  AC_SUBST(BLT_SO_LDFLAGS, "$SO_LDFLAGS")
-  AC_SUBST(BLT_SO_LIBS, "$SO_LIBS")
-  AC_SUBST(BLT_SO_EXT, "$SO_EXT")
-  AC_SUBST(LD_RUN_PATH)
-else 
-  AC_SUBST(BLT_TARGET, "static")
-fi
-
-AC_DEFINE_UNQUOTED([BLT_SO_EXT], "$SO_EXT", [Define 'soext' as the extension for shared libraries.])
-AC_DEFINE_UNQUOTED([BLT_SO_PREFIX], "$SO_PREFIX", [Define 'prefix' as the prefix for shared library names.])
-AC_DEFINE_UNQUOTED([BLT_LIB_SUFFIX], "$LIB_SUFFIX", [Define 'suffix' as the suffix for library names.])
-AC_SUBST(BLT_SO_PREFIX, "$SO_PREFIX")
-AC_SUBST(BLT_LIB_SUFFIX, "$LIB_SUFFIX")
-AC_SUBST(IMPLIB_PREFIX)
-AC_SUBST(IMPLIB_EXT)
-
-if test "${blt_enable_stubs}" = "yes" ; then
-  AC_DEFINE_UNQUOTED([USE_TCL_STUBS], [1], [Define if Tcl stubs are used.])
-  AC_DEFINE_UNQUOTED([USE_TK_STUBS],  [1], [Define if Tk stubs are used.])
-  TCL_STUBS_SPEC="-L${TCL_LIB_DIR} -ltclstub${TCL_LIB_VERSION}"
-  AC_SUBST(TCL_STUBS_SPEC)
-  TK_STUBS_SPEC="-L${TK_LIB_DIR} -ltkstub${TK_LIB_VERSION}"
-  AC_SUBST(TK_STUBS_SPEC)
-fi
-
-if test "${blt_platform_win32}" = "yes" ; then
-  AC_DEFINE_UNQUOTED([WIN32], [1], [Define if building for Win32.])
-fi
-WIN32=${blt_platform_win32}
-AC_SUBST(WIN32)
-
-AC_SUBST(AUX_LIBS)
-AC_SUBST(BLT_MAJOR_VERSION)
-AC_SUBST(BLT_MINOR_VERSION)
-AC_SUBST(BLT_VERSION)
-AC_SUBST(CC)
-AC_SUBST(CFLAGS)
-AC_SUBST(DEFINES)
-AC_SUBST(DLL_PREFIX)
-AC_SUBST(EXPAT_INC_SPEC)
-AC_SUBST(EXPAT_LIB_SPEC)
-AC_SUBST(EXTRA_LIBS)
-AC_SUBST(FT2_INC_SPEC)
-AC_SUBST(FT2_LIB_SPEC)
-AC_SUBST(FTCFG_LIB_SPEC)
-AC_SUBST(GCCFLAGS)
-AC_SUBST(INCLUDES, ${INC_SPECS})
-AC_SUBST(JPG_INC_SPEC)
-AC_SUBST(JPG_LIB_SPEC)
-AC_SUBST(LDFLAGS)
-AC_SUBST(LIBS)
-AC_SUBST(LIB_PREFIX)
-AC_SUBST(LIB_SUFFIX)
-AC_SUBST(MYSQL_INC_SPEC)
-AC_SUBST(MYSQL_LIB_SPEC)
-AC_SUBST(PNG_INC_SPEC)
-AC_SUBST(PNG_LIB_SPEC)
-AC_SUBST(TCL_DBGX)
-AC_SUBST(TCL_INC_SPEC)
-AC_SUBST(TCL_LIB_DIR)
-AC_SUBST(TCL_LIB_SPEC)
-AC_SUBST(TCL_VERSION)
-AC_SUBST(TIF_INC_SPEC)
-AC_SUBST(TIF_LIB_SPEC)
-AC_SUBST(TK_INC_SPEC)
-AC_SUBST(TK_LIB_SPEC)
-AC_SUBST(X11_INC_SPEC)
-AC_SUBST(X11_LIB_SPEC)
-AC_SUBST(XAU_LIB_SPEC)
-AC_SUBST(XDMCP_LIB_SPEC)
-AC_SUBST(XFT_INC_SPEC)
-AC_SUBST(XFT_LIB_SPEC)
-AC_SUBST(XPM_INC_SPEC)
-AC_SUBST(XPM_LIB_SPEC)
-AC_SUBST(XRANDR_LIB_SPEC)
-AC_SUBST(XRENDER_LIB_SPEC)
-AC_SUBST(Z_LIB_SPEC)
-
-
-#--------------------------------------------------------------------
-#	The BLT script directory was either specified or we 
-#	assume <prefix>/lib
-#--------------------------------------------------------------------
-if test "x${blt_with_scriptdir}" = "x" ; then 
-  BLT_LIBRARY="${prefix}/lib/blt${BLT_VERSION}"
-else 
-  BLT_LIBRARY="${blt_with_scriptdir}/blt${BLT_VERSION}"
-fi 
-AC_SUBST(BLT_LIBRARY)
-
-#--------------------------------------------------------------------
-#	Print out some of the more important settings 
-#--------------------------------------------------------------------
-echo ""
-echo "Configuration results:"
-echo ""
-echo "  tcl.h      found in  $TCL_INC_SPEC"
-echo "  tk.h       found in  $TK_INC_SPEC"
-echo "  X11/Xlib.h found in  $x_includes"
-echo "  libtcl${TCL_LIB_VERSION}  found in  $TCL_LIB_SPEC"
-echo "  libtk${TK_LIB_VERSION}   found in  $TK_LIB_SPEC"
-echo "  libX11     found in  $x_libraries"
-echo ""
-echo "Directories where BLT is to be installed:"
-echo ""
-echo "  \"\$prefix\" is $prefix"
-echo "  \"\$exec_prefix\" is $exec_prefix"
-echo ""
-echo "  shells       to be installed in  $bindir"
-echo "  libraries    to be installed in  $libdir"
-echo "  scripts      to be installed in  $BLT_LIBRARY"
-echo "  manual pages to be installed in  $mandir"
-echo "  MYSQL_LIB_SPEC=$MYSQL_LIB_SPEC"
-echo "  MYSQL_INC_SPEC=$MYSQL_INC_SPEC"
-echo "  EXPAT_LIB_SPEC=$EXPAT_LIB_SPEC"
-echo "  EXPAT_INC_SPEC=$EXPAT_INC_SPEC"
-echo "  FT2_LIB_SPEC=$FT2_LIB_SPEC"
-echo "  FT2_INC_SPEC=$FT2_INC_SPEC"
-echo "  JPG_LIB_SPEC=$JPG_LIB_SPEC"
-echo "  JPG_INC_SPEC=$JPG_INC_SPEC"
-echo ""
-
-#--------------------------------------------------------------------
-#
-#	Generate the following Makefiles
-#
-#	   ./Makefile
-#	   ./src/Makefile
-#	   ./src/shared/Makefile
-#	   ./man/Makefile
-#	   ./library/Makefile
-#	   ./demos/Makefile
-#
-#--------------------------------------------------------------------
-src_Makefile="src/Makefile"
-
-case ${blt_platform} in
-  "win")
-    src_Makefile="src/Makefile:src/Makefile-cyg.in"
-    ;;
-  "macosx")
-    src_Makefile="src/Makefile:src/Makefile-macosx.in"
-    ;;
-  *)
-    ;;
-esac
-
-# --------------------------------------------------------------
-# List of files to have be generated from <name>.in files with
-# autoconf substitutions.  
-# --------------------------------------------------------------
-AC_CONFIG_FILES(
-[
-  Makefile 
-  ${src_Makefile} 
-  src/bltHash.h 
-  src/shared/Makefile 
-  man/Makefile 
-  library/Makefile 
-  library/afm/Makefile 
-  demos/Makefile
-]
-)
-
-AC_OUTPUT()
-
diff --git a/blt3.0/demos/Makefile.in b/blt3.0/demos/Makefile.in
deleted file mode 100644
index cac676e..0000000
--- a/blt3.0/demos/Makefile.in
+++ /dev/null
@@ -1,92 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for demos 
-# ------------------------------------------------------------------------
-
-datadir =	@datadir@
-datarootdir =	@datarootdir@
-exec_prefix =	@exec_prefix@
-libdir =	@libdir@
-prefix =	@prefix@
-srcdir =	@srcdir@
-
-version =	@BLT_VERSION@
-scriptdir =	$(prefix)/lib/blt$(version)
-destdir =	$(scriptdir)/demos
-
-SHELL =		/bin/sh
-RM =		rm -rf
-INSTALL =	@INSTALL@
-INSTALL_DATA =	@INSTALL_DATA@
-
-instdirs =	$(prefix) \
-		$(exec_prefix) \
-		$(libdir) \
-		$(scriptdir) \
-		$(destdir) \
-		$(destdir)/bitmaps \
-		$(destdir)/bitmaps/hand \
-		$(destdir)/bitmaps/fish \
-		$(destdir)/images \
-		$(destdir)/scripts
-
-demos 	=	barchart1.tcl barchart2.tcl barchart3.tcl barchart4.tcl \
-		barchart5.tcl \
-		bgexec1.tcl bgexec2.tcl bgexec3.tcl bgexec4.tcl \
-		bitmap.tcl \
-		busy1.tcl busy2.tcl \
-		dnd1.tcl dnd2.tcl dragdrop1.tcl dragdrop2.tcl \
-		eps.tcl \
-		graph1.tcl graph2.tcl graph3.tcl graph4.tcl graph5.tcl \
-		graph6.tcl graph7.tcl \
-		hierbox1.tcl hierbox2.tcl hierbox3.tcl hierbox4.tcl \
-		hiertable1.tcl hiertable2.tcl \
-		htext1.tcl htext.txt \
-		spline.tcl stripchart1.tcl \
-		tabset1.tcl tabset2.tcl tabset3.tcl tabset4.tcl \
-		tabnotebook1.tcl tabnotebook2.tcl tabnotebook3.tcl \
-		treeview1.tcl \
-		winop1.tcl winop2.tcl
-
-all:
-
-install: mkdirs install-bitmaps install-images install-scripts 
-
-install-scripts: 
-	for i in $(srcdir)/scripts/*.tcl ; do \
-            $(INSTALL) $$i $(DESTDIR)$(destdir)/scripts ; \
-	done 
-	for i in $(demos) ; do \
-            $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(destdir)/$$i ; \
-	done 
-
-install-bitmaps: 
-	for i in $(srcdir)/bitmaps/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(destdir)/bitmaps ; \
-	done 
-	for i in $(srcdir)/bitmaps/hand/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(destdir)/bitmaps/hand ; \
-	done 
-	for i in $(srcdir)/bitmaps/fish/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(destdir)/bitmaps/fish ; \
-	done 
-
-install-images: 
-	for i in $(srcdir)/images/*.gif $(srcdir)/images/*.ps ; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(destdir)/images ; \
-	done 
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(DESTDIR)"$$i" ; then \
-            : ; \
-          else \
-            echo " mkdir $(DESTDIR)$$i" ; \
-            mkdir $(DESTDIR)"$$i" ; \
-          fi ; \
-        done
-
-clean:
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* 
-
-distclean: clean
-	$(RM) *.ps Makefile
diff --git a/blt3.0/demos/Makefile.vc b/blt3.0/demos/Makefile.vc
deleted file mode 100644
index 5e4dc2b..0000000
--- a/blt3.0/demos/Makefile.vc
+++ /dev/null
@@ -1,78 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for demos 
-# ------------------------------------------------------------------------
-
-include 	../vc.config
-srcdir =	../$(TOP)/demos
-
-destdir =	$(scriptdir)/demos
-
-SHELL =		bash
-RM =		rm -rf
-INSTALL =	install -m 0755
-INSTALL_DATA =	install -m 0644
-
-instdirs =	$(prefix) $(exec_prefix) $(libdir) $(scriptdir) \
-		$(destdir) \
-		$(destdir)/bitmaps \
-		$(destdir)/bitmaps/hand \
-		$(destdir)/bitmaps/fish \
-		$(destdir)/images \
-		$(destdir)/scripts
-
-demos 	=	barchart1.tcl barchart2.tcl barchart3.tcl barchart4.tcl \
-		barchart5.tcl \
-		bgexec1.tcl bgexec2.tcl bgexec3.tcl bgexec4.tcl \
-		bitmap.tcl \
-		busy1.tcl \
-		dragdrop1.tcl dragdrop2.tcl \
-		eps.tcl \
-		graph1.tcl graph2.tcl graph3.tcl graph4.tcl graph5.tcl \
-		graph6.tcl graph7.tcl \
-		hierbox1.tcl hierbox2.tcl hierbox3.tcl hierbox4.tcl \
-		hiertable1.tcl hiertable2.tcl hiertable3.tcl \
-		htext1.tcl htext.txt \
-		spline.tcl stripchart1.tcl \
-		tabset1.tcl tabset2.tcl tabset3.tcl tabset4.tcl \
-		tabnotebook1.tcl tabnotebook2.tcl tabnotebook3.tcl \
-		treeview1.tcl \
-		winop1.tcl winop2.tcl
-
-all:
-
-install: inst-dirs inst-bitmaps inst-images inst-scripts 
-
-inst-scripts: 
-	for i in $(srcdir)/scripts/*.tcl ; do \
-            $(INSTALL) $$i $(destdir)/scripts ; \
-	done 
-	for i in $(demos) ; do \
-            $(INSTALL) $(srcdir)/$$i $(destdir)/$$i ; \
-	done 
-
-inst-bitmaps: 
-	for i in $(srcdir)/bitmaps/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(destdir)/bitmaps ; \
-	done 
-	for i in $(srcdir)/bitmaps/hand/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(destdir)/bitmaps/hand ; \
-	done 
-	for i in $(srcdir)/bitmaps/fish/*.xbm ; do \
-	    $(INSTALL_DATA) $$i $(destdir)/bitmaps/fish ; \
-	done 
-
-inst-images: 
-	for i in $(srcdir)/images/*.gif $(srcdir)/images/*.ps ; do \
-	    $(INSTALL_DATA) $$i $(destdir)/images ; \
-	done 
-
-inst-dirs:
-	@for i in $(instdirs) ; do \
-	    if test -d "$$i" ; then : ; else mkdir "$$i" ; fi ; \
-        done
-
-clean:
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* 
-
-distclean: clean
-	$(RM) *.ps Makefile
diff --git a/blt3.0/demos/barchart1.tcl b/blt3.0/demos/barchart1.tcl
deleted file mode 100755
index f4f7228..0000000
--- a/blt3.0/demos/barchart1.tcl
+++ /dev/null
@@ -1,160 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-source scripts/demo.tcl
-
-set graph .bc
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed 148230
-
-proc FormatLabel { w value } {
-
-    # Determine the element name from the value
-
-    set names [$w element show]
-    set index [expr round($value)]
-    if { $index != $value } {
-	return $value 
-    }
-    global elemLabels
-    if { [info exists elemLabels($index)] } {
-	return $elemLabels($index)
-    }
-    return $value
-}
-
-source scripts/stipples.tcl
-
-set normalBg [blt::bgpattern create gradient -shape linear \
-		  -dir y -low white -high grey -relativeto self]
-set normalBg [blt::bgpattern create solid -color lightblue -opacity 50]
-#set normalBg lightblue
-
-option add *Htext.tileOffset		no
-
-option add *Barchart.title "A Simple Barchart"
-
-option add *x.Title	"X Axis Label"
-option add *x.Rotate	60
-option add *x.Command	FormatLabel
-option add *y.Title	"Y Axis Label"
-option add *x.tickFont  "{San Serif} 8"
-option add *Element.Background		white
-#option add *Element.Relief		solid
-option add *Element.BorderWidth		1
-
-option add *Legend.hide			yes
-
-option add *Grid.hide			no
-option add *Grid.dashes			{ 2 4 }
-option add *Grid.mapX			""
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *print.background yellow
-    option add *quit.background red
-    option add *graph.background palegreen
-}
-
-blt::htext .header -text {
-    The barchart has several components: coordinate axes, data 
-    elements, legend, crosshairs, grid,  postscript, and markers.  
-    They each control various aspects of the barchart.  For example,
-    the postscript component lets you generate PostScript output.  
-    Pressing the %%
-
-    set w $htext(widget)
-    button $w.print -text {Print} -command {
-	.bc postscript output bar.ps
-    } 
-    $w append $w.print
-
-%% button will create a file "bar.ps" 
-}
-
-blt::htext .footer -text {
-    Hit the %%
-
-    set w $htext(widget)
-    button $w.quit -text quit -command exit 
-    $w append $w.quit 
-
-%% button when you've seen enough.%%
-
-    label $w.logo -bitmap BLT
-    $w append $w.logo -padx 20
-
-%% }
-
-blt::barchart .bc -plotpadx 10
-
-.bc configure -bg white -plotborderwidth 0
-#
-# Element attributes:  
-#
-#    Label	Foreground	Background	Stipple Pattern
-
-source scripts/stipples.tcl
-set bg [blt::bgpattern create gradient -high orange2 -low yellow2 \
-	-shape linear -dir y -jitter no -log no -relativeto toplevel] 
-
-set bitmaps { 
-    bdiagonal1 bdiagonal2 checker2 checker3 cross1 cross2 cross3 crossdiag
-    dot1 dot2 dot3 dot4 fdiagonal1 fdiagonal2 hline1 hline2 lbottom ltop
-    rbottom rtop vline1 vline2
-}
-set count 1
-foreach stipple $bitmaps {
-    set label [file tail $stipple]
-    set label [file root $label] 
-    set y [random -2 10]
-    set yhigh [expr $y + 0.5]
-    set ylow [expr $y - 0.5]
-    .bc element create $label -y $y -x $count \
-	 -fg "" -bg $normalBg -yhigh $yhigh -ylow $ylow -errorbarcolor brown \
-	-relief raised -bd 2
-    set elemLabels($count) $label
-    incr count
-}
-
-blt::table . \
-    0,0 .header -fill x \
-    1,0 .bc -fill both \
-    2,0	.footer -fill x	
-	
-blt::table configure . r0 r2 -resize none
-
-Blt_ZoomStack .bc
-Blt_Crosshairs .bc
-Blt_ActiveLegend .bc
-Blt_ClosestPoint .bc
-
-if 0 {
-set printer [blt::printer open [lindex [blt::printer names] 0]]
-blt::printer getattr $printer attrs
-set attrs(Orientation) Portrait
-blt::printer setattr $printer attrs
-after 2000 {
-	$graph print2 $printer
-	blt::printer close $printer
-}
-}
-
-.bc axis bind x <Enter> {
-    set axis [%W axis get current]
-    %W axis configure $axis -color blue3 -titlecolor blue3
-}
-.bc axis bind x <Leave> {
-    set axis [%W axis get current]
-    %W axis configure $axis -color black -titlecolor black
-}
-
-
diff --git a/blt3.0/demos/barchart2.tcl b/blt3.0/demos/barchart2.tcl
deleted file mode 100755
index 0959d4a..0000000
--- a/blt3.0/demos/barchart2.tcl
+++ /dev/null
@@ -1,209 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc FormatXTicks { w value } {
-
-    # Determine the element name from the value
-
-    set index [expr round($value)]
-    if { $index != $value } {
-	return $value 
-    }
-    incr index -1
-
-    set name [lindex { A1 B1 A2 B2 C1 D1 C2 A3 E1 } $index]
-    return $name
-}
-
-source scripts/stipples.tcl
-
-#image create picture bgTexture -file ./images/chalk.gif
-
-option add *Button.padX			5
-
-option add *Radiobutton.relief		flat
-option add *Radiobutton.borderWidth     2
-option add *Radiobutton.highlightThickness 0
-option add *Radiobutton.font		"Arial 10 bold"
-option add *Htext.tileOffset		no
-
-option add *Barchart.title		"Comparison of Simulators"
-
-option add *x.Command			FormatXTicks
-option add *x.Title			"Simulator"
-option add *y.Title			"Time (hrs)"
-option add *Axis.tickInterior		yes
-option add *plotPadX			0
-option add *plotPadY			0
-
-option add *activeBar.Foreground	pink
-option add *activeBar.stipple		dot3
-option add *Element.Background		red
-option add *Element.Relief		solid
-
-option add *Grid.dashes			{ 2 4 }
-option add *Grid.hide			no
-option add *Grid.mapX			""
-
-option add *Legend.activeBorderWidth	2 
-option add *Legend.activeRelief		raised 
-option add *Legend.anchor		ne 
-option add *Legend.borderWidth		0 
-option add *Legend.position		right
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *print.background	yellow
-    option add *quit.background		red
-    option add *quit.activeBackground	red2
-}
-
-blt::htext .title -text {\
- Data points with like x-coordinates, can have their bar segments displayed
- in one of the following modes (using the -barmode option):
-}
-blt::htext .header -text {
-    %%
-    blt::tk::radiobutton .header.stacked -text stacked -variable barMode \
-	-anchor w -value "stacked" -command {
-            .graph configure -barmode $barMode
-        } 
-    .header append .header.stacked -width 1.0i -anchor w
-    %%      Bars are stacked on top of each other. The overall height is the     
-                                                   sum of the y-coordinates. 
-    %% 
-    blt::tk::radiobutton .header.aligned -text aligned -variable barMode \
-	-anchor w -value "aligned" -command {
-            .graph configure -barmode $barMode
-        }
-    .header append .header.aligned -width 1.0i -fill x
-    %%      Bars are drawn side-by-side at a fraction of their normal width. 
-    %%
-    blt::tk::radiobutton .header.overlap -text "overlap" -variable barMode \
-	-anchor w -value "overlap" -command {
-            .graph configure -barmode $barMode
-        } 
-    .header append .header.overlap -width 1.0i -fill x
-    %%      Bars overlap slightly. 
-    %%
-    blt::tk::radiobutton .header.normal -text "normal" -variable barMode \
-	-anchor w -value "normal" -command {
-            .graph configure -barmode $barMode
-        } 
-    .header append .header.normal -width 1.0i -fill x
-    %%      Bars are overlayed one on top of the next. 
-}
-
-blt::htext .footer -text { Hit the %%
-    set im [image create picture -file ./images/stopsign.gif]
-    button $htext(widget).quit -image $im -command { exit }
-    $htext(widget) append $htext(widget).quit -pady 2
-%% button when you've seen enough. %%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo 
-%%}
-
-if 0 {
-set file ./images/jan25_palm3x_L.jpg
-set file ./images/blt98.gif
-set file ./images/folder.gif
-image create picture bgTexture -file $file 
-set style [blt::bgpattern create tile -image bgTexture \
-	       -xorigin 0 -yorigin 0 -relativeto self]
-} else {
-set style [blt::bgpattern create gradient -high grey60 -low grey85 \
-	       -xorigin 0 -yorigin 0 -relativeto self -logscale yes]
-}
-
-blt::barchart .graph -bg $style  -barwidth 0.9
-
-blt::vector X Y0 Y1 Y2 Y3 Y4
-
-X set { 1 2 3 4 5 6 7 8 9 }
-Y0 set { 
-    0.729111111  0.002250000  0.09108333  0.006416667  0.026509167 
-    0.007027778  0.1628611    0.06405278  0.08786667  
-}
-Y1 set {
-    0.003120278	 0.004638889  0.01113889  0.048888889  0.001814722
-    0.291388889  0.0503500    0.13876389  0.04513333 
-}
-Y2 set {
-    11.534444444 3.879722222  4.54444444  4.460277778  2.334055556 
-    1.262194444  1.8009444    4.12194444  3.24527778  
-}
-Y3 set {
-    1.015750000  0.462888889  0.49394444  0.429166667  1.053694444
-    0.466111111  1.4152500    2.17538889  2.55294444 
-}
-Y4 set {
-    0.022018611  0.516333333  0.54772222  0.177638889  0.021703889 
-    0.134305556  0.5189278    0.07957222  0.41155556  
-}
-
-
-#
-# Element attributes:  
-#
-#    Label     yData	Foreground	Background	Stipple	    Borderwidth
-set attributes { 
-    "Setup"	Y1	lightyellow3	lightyellow1	fdiagonal1	1
-    "Read In"	Y0	lightgoldenrod3	lightgoldenrod1	bdiagonal1	1
-    "Other"	Y4	lightpink3	lightpink1	fdiagonal1	1
-    "Solve"	Y3	cyan3		cyan1		bdiagonal1	1
-    "Load"	Y2	lightblue3	lightblue1	fdiagonal1	1
-}
-
-
-foreach {label yData fg bg stipple bd} $attributes {
-#     set img [image create picture -width 5 -height 5]
-#     foreach {r g b} [winfo rgb . $bg] break
-#     set r [expr int($r / 257.0)]
-#     set g [expr int($g / 257.0)]
-#     set b [expr int($b / 257.0)]
-#     set color [format "0xA0%0.2x%0.2x%0.2x" $r $g $b]
-#     puts stderr color=$color
-#     $img blank $color
-    set pat [blt::bgpattern create solid -color $bg -opacity 90.0]
-    .graph element create $yData -label $label -bd $bd -relief raised \
-	-y $yData -x X -outline $fg -fill $pat
-}
-.header.stacked invoke
-
-blt::table . \
-    0,0 .title -fill x \
-    1,0 .header -fill x  \
-    2,0 .graph -fill both \
-    3,0 .footer -fill x
-
-blt::table configure . r0 r1 r3 -resize none
-
-Blt_ZoomStack .graph
-Blt_Crosshairs .graph
-Blt_ActiveLegend .graph
-Blt_ClosestPoint .graph
-
-.graph marker bind all <B2-Motion> {
-    set coords [%W invtransform %x %y]
-    catch { %W marker configure [%W marker get current] -coords $coords }
-}
-
-.graph marker bind all <Enter> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -bg green}
-}
-
-.graph marker bind all <Leave> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -bg ""}
-}
-
-.graph element bind all <Enter> {
-    set data [.graph element closest %x %y]
-    if { $data != "" } {
-	array set info $data
-	puts stderr "$info(x) $info(y)"
-    }
-}
diff --git a/blt3.0/demos/barchart3.tcl b/blt3.0/demos/barchart3.tcl
deleted file mode 100755
index 52417bd..0000000
--- a/blt3.0/demos/barchart3.tcl
+++ /dev/null
@@ -1,123 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-source scripts/demo.tcl
-source scripts/stipples.tcl
-source scripts/patterns.tcl
-
-option add *graph.xTitle "X Axis Label"
-option add *graph.yTitle "Y Axis Label"
-option add *graph.title "A Simple Barchart"
-option add *graph.xFont *Times-Medium-R*12*
-option add *graph.elemBackground white
-option add *graph.elemRelief raised
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *print.background yellow
-    option add *quit.background red
-}
-
-blt::htext .header -text {
-This is an example of the barchart widget.  To create a postscript 
-file "bar.ps", press the %% 
-button $htext(widget).print -text {Print} -command {
-  $graph postscript output bar.ps  -maxpect 1
-} 
-$htext(widget) append $htext(widget).print
-%% button.}
-
-set graph [blt::barchart .b]
-$graph configure \
-    -invert false \
-    -baseline 1.2
-$graph xaxis configure \
-    -command FormatLabel \
-    -descending no
-$graph legend configure \
-    -hide yes
-
-blt::htext .footer -text {Hit the %%
-    button $htext(widget).quit -text quit -command exit
-    $htext(widget) append $htext(widget).quit 
-%% button when you've seen enough.%%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo -padx 20
-%%}
-
-set data { 
-    One     1  1  red	   green     bdiagonal1	raised
-    Two     2  2  green	   blue      bdiagonal2	raised
-    Three   3  3  blue	   purple    checker2	raised
-    Four    4  4  purple   orange    checker3	raised
-    Five    5  5  orange   brown     cross1	raised
-    Six     6  6  brown	   cyan      cross2	raised
-    Seven   7  7  cyan	   navy      cross3	raised
-    Eight   8  8  navy	   red       crossdiag	raised
-    Nine    9 -1  pink     black      ""		solid
-    Ten	   10 -2  seagreen palegreen hobbes	raised
-    Eleven 11 -3  blue     blue4     ""		raised
-}
-
-foreach { name x y fg bg bitmap relief }  $data {
-    $graph element create $name \
-	-data { $x $y } -fg $fg -bg $bg -stipple $bitmap  \
-	-relief $relief -bd 2 
-    set labels($x) $name
-}
-
-$graph marker create bitmap \
-    -coords { 4 0.3 } -anchor center \
-    -bitmap @bitmaps/sharky.xbm \
-    -name bitmap -fill ""
-
-$graph marker create text \
-    -coords { 10 5.3 } -anchor center \
-    -text "Hi there" \
-    -name text  -rotate 45 -font "Arial 14"  -fg blue
-
-$graph marker create polygon \
-    -coords { 5 0 7 2  10 10  10 2 } \
-    -name poly -linewidth 1 -fill "" -outline red4 -under yes
-
-blt::table . \
-    .header 0,0 -padx .25i \
-    $graph 1,0 -fill both \
-    .footer 2,0 -padx .25i  
-
-blt::table configure . r0 r2 -resize none
-
-wm min . 0 0
-
-proc FormatLabel { w value } {
-    global labels
-
-    set value [expr int(round($value))]
-    # Determine the element name from the value
-    if { [info exists labels($value)] } {
-	return "$labels($value)"
-    } 
-    return "$value"
-}
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-
-$graph marker bind all <B3-Motion> {
-    set coords [%W invtransform %x %y]
-    catch { %W marker configure [%W marker get current] -coords $coords }
-}
-
-$graph marker bind all <Enter> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -fill green3 }
-}
-
-$graph marker bind all <Leave> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -fill "" }
-}
-
diff --git a/blt3.0/demos/barchart4.tcl b/blt3.0/demos/barchart4.tcl
deleted file mode 100755
index 7f8f4bd..0000000
--- a/blt3.0/demos/barchart4.tcl
+++ /dev/null
@@ -1,101 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed 14823
-
-
-set graph .graph
-
-source scripts/stipples.tcl
-source scripts/patterns.tcl
-
-
-option add *x.Title			"X Axis"
-option add *y.Title			"Y Axis"
-option add *LineMarker.Foreground	yellow
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *print.background yellow
-    option add *quit.background red
-    option add *graph.background palegreen
-}
-
-blt::htext .header -text \
-{   This is an example of the barchart widget.  The barchart has 
-    many components; x and y axis, legend, crosshairs, elements, etc.  
-    To create a postscript file "bar.ps", press the %%
-    set w $htext(widget)
-    button $w.print -text {Print} -command {
-	$graph postscript output bar.ps 
-    } 
-    $w append $w.print
-
-%% button.  
-}
-blt::barchart $graph 
-$graph xaxis configure -rotate 90 -stepsize 0
-
-blt::htext .footer -text {    Hit the %%
-    set im [image create picture -file ./images/stopsign.gif]
-    button $htext(widget).quit -image $im -command { exit }
-    $htext(widget) append $htext(widget).quit -pady 2
-%% button when you've seen enough. %%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo 
-%%}
-
-set attributes { 
-    red		bdiagonal1
-    orange	bdiagonal2
-    yellow	fdiagonal1
-    green	fdiagonal2
-    blue	hline1 
-    cyan	hline2
-    magenta	vline1 
-    violetred	vline2
-    purple	crossdiag
-    lightblue 	hobbes	
-}
-
-set count 0
-foreach { color stipple } $attributes {
-    $graph pen create pen$count \
-	-fill ${color}1 -outline ${color}4 -relief solid
-    lappend styles [list pen$count $count $count]
-    incr count
-}
-
-blt::vector x y w
-
-x seq 0 1000 400
-y expr random(x)*90.0
-w expr round(y/10.0)%$count
-y expr y+10.0
-
-$graph element create data -label {} \
-    -x x -y y -weight w -styles $styles
-
-blt::table . \
-    0,0 .header -fill x  \
-    1,0 .graph -fill both \
-    2,0 .footer -fill x
-
-blt::table configure . r0 r2 -resize none
-	
-wm min . 0 0
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-
diff --git a/blt3.0/demos/barchart5.tcl b/blt3.0/demos/barchart5.tcl
deleted file mode 100755
index 982c866..0000000
--- a/blt3.0/demos/barchart5.tcl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-source scripts/stipples.tcl
-
-option add *graph.x.Title "X Axis Label"
-option add *graph.y.Title "Y Axis Label"
-option add *graph.title "A Simple Barchart"
-option add *graph.Element.Relief raised
-
-blt::htext .htext -text \
-{   This is an example of the barchart widget.  The barchart has 
-    many components; x and y axis, legend, crosshairs, elements, etc.  
-    To create a postscript file "bar.ps", press the %%
-    set w $htext(widget)
-    button $w.print -text {Print} -command {
-	$graph postscript output bar.ps
-    } 
-    $w append $w.print
-
-%% button.  
-%%
-
-    set graph [blt::barchart .htext.graph]
-    $graph xaxis configure -stepsize 0 
-    $w append $graph -fill both -padx 4
-
-%%
-    Hit the %%
-
-    button $w.quit -text quit -command exit
-    $w append $w.quit 
-
-%% button when you've seen enough.%%
-
-    label $w.logo -bitmap BLT
-    $w append $w.logo -padx 20
-
-%% }
-
-set tcl_precision 15
-blt::vector create x
-blt::vector create y
-x seq -5.0 5.0 50
-y expr sin(x)
-set barWidth 0.19
-
-$graph element create sin -relief raised -bd 1 -x x -y y  -barwidth $barWidth
-blt::table . .htext -fill both
-	
-wm min . 0 0
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
diff --git a/blt3.0/demos/bgexec1.tcl b/blt3.0/demos/bgexec1.tcl
deleted file mode 100755
index 2753387..0000000
--- a/blt3.0/demos/bgexec1.tcl
+++ /dev/null
@@ -1,198 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-
-bitmap define blt.0 {{40 40} {
-    00 00 00 00 00 00 fc 07 00 00 00 04 08 00 00 00 04 04 00 00 00 e4 03 00
-    00 00 64 fe 07 00 00 64 02 04 00 00 e4 03 04 00 00 64 7e 02 00 00 64 1a
-    02 00 00 e4 1b 01 00 00 04 1a 01 00 00 04 1a 01 00 00 fc 1b 02 00 00 0c
-    1a 02 00 00 0c 02 04 00 00 0c 02 f4 03 80 ed fe 07 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.1 {{40 40} {
-    00 00 00 00 00 00 fc 07 00 00 00 04 08 00 00 00 04 04 00 00 00 e4 ff 0f
-    00 00 64 06 08 00 00 64 06 08 00 00 e4 ff 04 00 00 64 36 04 00 00 64 36
-    02 00 00 e4 37 02 00 00 04 34 02 00 00 04 34 04 00 00 fc 35 04 00 00 0c
-    04 08 00 00 0c 04 08 00 00 0c fc ef 03 80 ed 01 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.2 {{40 40} {
-    00 00 00 00 00 00 fc 0f 00 00 00 04 10 00 00 00 04 10 00 00 00 e4 fb 3f
-    00 00 64 0e 20 00 00 64 0e 20 00 00 e4 fb 13 00 00 64 ce 10 00 00 64 ce
-    08 00 00 e4 cb 08 00 00 04 c8 08 00 00 04 c8 10 00 00 fc cf 10 00 00 0c
-    08 20 00 00 0c 08 20 00 00 0c f8 bf 03 80 ed 03 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.3 {{40 40} {
-    00 00 00 00 00 00 fc 0f 00 00 00 04 f0 ff 00 00 04 00 80 00 00 e4 03 80
-    00 00 64 d6 4f 00 00 64 16 43 00 00 e4 13 23 00 00 64 16 23 00 00 64 16
-    23 00 00 e4 13 43 00 00 04 70 43 00 00 04 00 80 00 00 fc 0f 80 00 00 0c
-    f0 ff 00 00 0c 00 00 00 00 0c f8 ff 03 80 ed 07 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.4 {{40 40} {
-    00 00 00 00 00 00 fc ff ff 03 00 04 00 00 02 00 04 00 00 02 00 e4 33 3f
-    01 00 64 36 0c 01 00 64 36 8c 00 00 e4 33 8c 00 00 64 36 8c 00 00 64 36
-    0c 01 00 e4 f3 0d 01 00 04 00 00 02 00 04 00 00 02 00 fc ff ff 03 00 0c
-    00 00 00 00 0c 00 00 00 00 0c f8 ff 03 80 ed 07 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-
-
-#set animate(colors) { #ff8813 #ffaa13 #ffcc13 #ffff13 #ffcc13 #ffaa13 #ff8813 }
-bitmap define blt.5 [bitmap data blt.3]
-bitmap define blt.6 [bitmap data blt.2]
-bitmap define blt.7 [bitmap data blt.1]
-
-
-set interval 200
-
-proc AnimateBitmap { index } {
-    global interval afterId
-    if { ![winfo exists .logo] } {
-	return
-    }
-    if { $index >= 0 } {
-	.logo configure -bitmap blt.$index
-	incr index
-	if { $index >= 7 } {
-	    set index 0
-	}
-	set afterId [after $interval "AnimateBitmap $index"]
-    }
-}
-
-set length 80
-
-option add *text.yScrollCommand { .vscroll set }
-option add *text.relief sunken
-option add *text.width $length
-option add *text.height 10
-option add *text.borderWidth 2
-option add *vscroll.command { .text yview }
-option add *vscroll.minSlider 4p
-option add *quit.command { exit }
-option add *quit.text { quit }
-option add *stop.command { set bgStatus {} }
-option add *stop.text { stop }
-option add *logo.relief sunken
-option add *logo.padX 4
-option add *title.text "Virtual Memory Statistics"
-option add *title.font -*-Helvetica-Bold-R-*-*-14-*-*-*-*-*-*-*
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *text.background lightblue
-    option add *text.foreground blue
-    option add *quit.background red
-    option add *quit.foreground white
-    option add *stop.background yellow
-    option add *stop.foreground navyblue
-    option add *logo.background beige
-    option add *logo.foreground brown 
-}
-
-# Create widgets
-text .text 
-scrollbar .vscroll 
-button .quit
-button .stop
-label .logo 
-label .title
-
-# Layout widgets in table
-blt::table . \
-    .title      0,0 -columnspan 4 \
-    .text 	1,0 -columnspan 3 \
-    .vscroll 	1,3 -fill y \
-    .logo 	2,0 -anchor w -padx 10 -reqheight .6i -pady 4 \
-    .stop 	2,1 \
-    .quit  	2,2 
-
-set buttonWidth 1i
-blt::table configure . c1 c2 -width 1i
-blt::table configure . c3 -resize none
-blt::table configure . .stop .quit -reqwidth $buttonWidth -anchor e
-blt::table configure . .title .text -fill both
-
-wm min . 0 0
-
-proc DisplayStats { data } {
-    .text insert end "$data\n"
-    set textlen [expr int([.text index end])]
-    scan [.vscroll get] "%s %s %s %s" total window first last
-    if { $textlen > $total } {
-	.text yview [expr $textlen-$window]
-    }
-    update idletasks
-}
-
-set bgStatus {}
-
-AnimateBitmap 0
-
-#
-# Pick a command that 
-#    1) periodically writes output and
-#    2) flushes output each time.
-#
-set command { vmstat 1 }
-#set command { netstat -c }
-
-catch { eval "bgexec bgStatus -onoutput DisplayStats $command" } 
-
-# Turn off animation by canceling any pending after task.
-if { [info exists afterId] } {
-    after cancel $afterId
-}
diff --git a/blt3.0/demos/bgexec2.tcl b/blt3.0/demos/bgexec2.tcl
deleted file mode 100755
index 7639404..0000000
--- a/blt3.0/demos/bgexec2.tcl
+++ /dev/null
@@ -1,46 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-#    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-
-proc ShowResult { name1 name2 how } {
-    global var
-    .l$name2 configure -text "$var($name2)"
-    after 2000 "blt::table forget .l$name2"
-}
-    
-for { set i 1 } { $i <= 20 } { incr i } {
-    label .l$i 
-    blt::table . .l$i $i,0
-    set pid [bgexec var($i) du /usr/include &]
-    .l$i configure -text "Starting #$i pid=$pid"
-    trace variable var($i) w ShowResult
-    update
-    after 500
-}
-
diff --git a/blt3.0/demos/bgexec3.tcl b/blt3.0/demos/bgexec3.tcl
deleted file mode 100755
index 1db73bd..0000000
--- a/blt3.0/demos/bgexec3.tcl
+++ /dev/null
@@ -1,224 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-
-bitmap define blt.0 {{40 40} {
-    00 00 00 00 00 00 fc 07 00 00 00 04 08 00 00 00 04 04 00 00 00 e4 03 00
-    00 00 64 fe 07 00 00 64 02 04 00 00 e4 03 04 00 00 64 7e 02 00 00 64 1a
-    02 00 00 e4 1b 01 00 00 04 1a 01 00 00 04 1a 01 00 00 fc 1b 02 00 00 0c
-    1a 02 00 00 0c 02 04 00 00 0c 02 f4 03 80 ed fe 07 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.1 {{40 40} {
-    00 00 00 00 00 00 fc 07 00 00 00 04 08 00 00 00 04 04 00 00 00 e4 ff 0f
-    00 00 64 06 08 00 00 64 06 08 00 00 e4 ff 04 00 00 64 36 04 00 00 64 36
-    02 00 00 e4 37 02 00 00 04 34 02 00 00 04 34 04 00 00 fc 35 04 00 00 0c
-    04 08 00 00 0c 04 08 00 00 0c fc ef 03 80 ed 01 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.2 {{40 40} {
-    00 00 00 00 00 00 fc 0f 00 00 00 04 10 00 00 00 04 10 00 00 00 e4 fb 3f
-    00 00 64 0e 20 00 00 64 0e 20 00 00 e4 fb 13 00 00 64 ce 10 00 00 64 ce
-    08 00 00 e4 cb 08 00 00 04 c8 08 00 00 04 c8 10 00 00 fc cf 10 00 00 0c
-    08 20 00 00 0c 08 20 00 00 0c f8 bf 03 80 ed 03 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.3 {{40 40} {
-    00 00 00 00 00 00 fc 0f 00 00 00 04 f0 ff 00 00 04 00 80 00 00 e4 03 80
-    00 00 64 d6 4f 00 00 64 16 43 00 00 e4 13 23 00 00 64 16 23 00 00 64 16
-    23 00 00 e4 13 43 00 00 04 70 43 00 00 04 00 80 00 00 fc 0f 80 00 00 0c
-    f0 ff 00 00 0c 00 00 00 00 0c f8 ff 03 80 ed 07 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-bitmap define blt.4 {{40 40} {
-    00 00 00 00 00 00 fc ff ff 03 00 04 00 00 02 00 04 00 00 02 00 e4 33 3f
-    01 00 64 36 0c 01 00 64 36 8c 00 00 e4 33 8c 00 00 64 36 8c 00 00 64 36
-    0c 01 00 e4 f3 0d 01 00 04 00 00 02 00 04 00 00 02 00 fc ff ff 03 00 0c
-    00 00 00 00 0c 00 00 00 00 0c f8 ff 03 80 ed 07 00 04 e0 0c 00 20 09 10
-    0c 00 00 12 10 0c 00 00 10 30 00 00 00 19 d0 03 00 00 14 b0 fe ff ff 1b
-    50 55 55 55 0d e8 aa aa aa 16 e4 ff ff ff 2f f4 ff ff ff 27 d8 ae aa bd
-    2d 6c 5f d5 67 1b bc f3 7f d0 36 f8 01 10 cc 1f e0 45 8e 92 0f b0 32 41
-    43 0b d0 cf 3c 7c 0d b0 aa c2 ab 0a 60 55 55 55 05 c0 ff ab aa 03 00 00
-    fe ff 00 00 00 00 00 00}
-}
-
-set program ../src/bltwish
-if { [info exists tcl_platform ] } {
-    puts stderr $tcl_platform(platform)
-    if { $tcl_platform(platform) == "windows" } {
-        set shells [glob C:/Program\ Files/Tcl/bin/tclsh8*.exe ]
-  	set program [lindex $shells 0]
-    }
-}
-if { ![file executable $program] } {
-    error "Can't execute $program"
-}
-set command [list $program scripts/bgtest.tcl]
-set animate(index) -1
-set animate(interval) 200
-#set animate(colors) { #ff8813 #ffaa13 #ffcc13 #ffff13 #ffcc13 #ffaa13 #ff8813 }
-bitmap define blt.5 [bitmap data blt.3]
-bitmap define blt.6 [bitmap data blt.2]
-bitmap define blt.7 [bitmap data blt.1]
-
-proc Animate {} {
-    global animate
-    if { [info commands .logo] != ".logo" } {
-	set animate(index) 0
-	return
-    }
-    if { $animate(index) >= 0 } {
-	.logo configure -bitmap blt.$animate(index) 
-	incr animate(index)
-	if { $animate(index) >= 7 } {
-	    set animate(index) 0
-	}
-	after $animate(interval) Animate
-    }
-}
-
-
-proc InsertText { string tag } {
-    .text insert end "$tag: " "" $string $tag
-    set textlen [expr int([.text index end])]
-    scan [.vscroll get] "%s %s %s %s" total window first last
-    if { $textlen > $total } {
-	.text yview [expr $textlen-$window]
-    }
-    update idletasks
-    update
-}
-
-proc DisplayOutput { data } {
-    InsertText "$data\n" stdout
-}
-
-proc DisplayErrors { data } {
-    InsertText "$data\n" stderr
-}
-
-set length 80
-
-option add *text.yScrollCommand { .vscroll set }
-option add *text.relief sunken
-option add *text.width 20
-option add *text.height 10
-option add *text.height 10
-option add *text.borderWidth 2
-option add *vscroll.command { .text yview }
-option add *vscroll.minSlider 4p
-option add *stop.command { set results {} }
-option add *stop.text { stop }
-option add *logo.relief sunken
-option add *logo.padX 4
-option add *title.text "Catching stdout and stderr"
-option add *title.font -*-Helvetica-Bold-R-*-*-14-*-*-*-*-*-*-*
-
-set visual [winfo screenvisual .] 
-if { [string match *color $visual] } {
-    option add *text.background white
-    option add *text.foreground blue
-    option add *stop.background yellow
-    option add *stop.activeBackground yellow2
-    option add *stop.foreground navyblue
-    option add *start.activeBackground green2
-    option add *start.background green
-    option add *start.foreground navyblue
-    option add *logo.background beige
-    option add *logo.foreground brown 
-}
-
-proc Start { command } {
-    global results animate
-    .text delete 1.0 end
-    if { $animate(index) < 0 } {
-        set results {}
-        set animate(index) 0
-        eval "bgexec results -error barney -output fred -killsignal SIGINT \
-	    -onoutput DisplayOutput -onerror DisplayErrors -linebuffered no \
-		$command &"
-        Animate
-    }
-}
-
-proc Stop { } {
-    global results animate
-    set results {}
-    set animate(index) -1
-}
-
-# Create widgets
-text .text 
-.text tag configure stdout -font { Courier-Bold 14 } -foreground green2
-.text tag configure stderr -font  { Courier 14 } -foreground red2
-
-scrollbar .vscroll 
-button .start -text "Start" -command [list Start $command]
-button .stop -text "Stop" -command Stop
-label .logo  -bitmap blt.0
-label .title
-
-# Layout widgets in table
-blt::table . \
-    .title      0,0 -columnspan 4 \
-    .text 	1,0 -columnspan 3 \
-    .vscroll 	1,3 -fill y \
-    .logo 	2,0 -anchor w -padx 10 -reqheight .6i -pady 4 \
-    .start 	2,1 \
-    .stop 	2,2 
-
-set buttonWidth 1i
-blt::table configure . c1 c2 -width 1i
-blt::table configure . c3 r0 r2 -resize none
-blt::table configure . .start .stop -reqwidth $buttonWidth -anchor e
-blt::table configure . .title .text -fill both
-
-wm min . 0 0
-
-
diff --git a/blt3.0/demos/bgexec4.tcl b/blt3.0/demos/bgexec4.tcl
deleted file mode 100755
index 1bad07e..0000000
--- a/blt3.0/demos/bgexec4.tcl
+++ /dev/null
@@ -1,180 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-source scripts/globe.tcl
-
-option add *HighlightThickness 0
-
-set program ../src/bltwish
-if { [info exists tcl_platform ] } {
-    puts stderr $tcl_platform(platform)
-    if { $tcl_platform(platform) == "windows" } {
-        set shells [glob C:/Program\ Files/Tcl/bin/tclsh8*.exe ] 
-        set program [lindex $shells 0]
-    }
-}
-if { ![file executable $program] } {
-    error "Can't execute $program"
-}
-
-set command [list $program scripts/bgtest.tcl]
-
-array set animate {
-    index	-1
-    interval	200
-    colors	"#ff8813 #ffaa13 #ffcc13 #ffff13 #ffcc13 #ffaa13 #ff8813"
-    numBitmaps	30
-    prefix	globe
-}
-
-proc Animate {} {
-    global animate
-    if { [info commands .logo] != ".logo" } {
-	set animate(index) 0
-	return
-    }
-    if { $animate(index) >= 0 } {
-	.logo configure -bitmap $animate(prefix).$animate(index) 
-	incr animate(index)
-	if { $animate(index) >= $animate(numBitmaps) } {
-	    set animate(index) 0
-	}
-	after $animate(interval) Animate
-    }
-}
-
-proc InsertText { string tag } {
-    .text insert end "$tag: " "" $string $tag
-    set textlen [expr int([.text index end])]
-    scan [.vscroll get] "%s %s %s %s" total window first last
-    if { $textlen > $total } {
-	.text yview [expr $textlen-$window]
-    }
-    update idletasks
-}
-
-proc DisplayOutput { name1 name2 how } {
-    upvar #0 $name1 arr
-
-    InsertText "$arr($name2)\n" stdout
-    set arr($name2) {}
-}
-
-proc DisplayErrors { name1 name2 how } {
-    upvar #0 $name1 arr
-
-    InsertText "$arr($name2)\n" stderr
-    set arr($name2) {}
-}
-
-
-option add *text.yScrollCommand { .vscroll set }
-option add *text.relief sunken
-option add *text.width 20
-option add *text.height 10
-option add *text.height 10
-option add *text.borderWidth 2
-option add *vscroll.command { .text yview }
-option add *vscroll.minSlider 4p
-option add *stop.command { set results {} }
-option add *stop.text { stop }
-option add *logo.padX 4
-option add *title.text "Catching stdout and stderr"
-option add *title.font -*-Helvetica-Bold-R-*-*-14-*-*-*-*-*-*-*
-
-set visual [winfo screenvisual .] 
-if { [string match *color $visual] } {
-    option add *text.background white
-    option add *text.foreground blue
-    option add *stop.background yellow
-    option add *stop.activeBackground yellow2
-    option add *stop.foreground navyblue
-    option add *start.activeBackground green2
-    option add *start.background green
-    option add *start.foreground navyblue
-    option add *logo.background beige
-    option add *logo.foreground brown 
-    option add *logo.foreground green4
-    option add *title.background lightblue
-    option add *logo.background lightblue
-}
-. configure -bg lightblue
-
-trace variable results(stdout) w DisplayOutput
-trace variable results(stderr) w DisplayErrors
-
-proc Start { command } {
-    global results animate
-    .text delete 1.0 end
-    if { $animate(index) < 0 } {
-        set results(status) {}
-	eval "bgexec results(status) -lasterror results(stderr) \
-		-lastoutput results(stdout) $command &"
-        set animate(index) 0
-        Animate
-    }
-}
-
-proc Stop { } {
-    global results animate
-    set results(status) {}
-    set animate(index) -1
-}
-
-# Create widgets
-text .text 
-.text tag configure stdout -font -*-Helvetica-Bold-R-*-*-18-*-*-*-*-*-*-* \
-    -foreground green2
-.text tag configure stderr -font -*-Helvetica-Medium-O-*-*-18-*-*-*-*-*-*-* \
-    -foreground red2
-
-scrollbar .vscroll 
-button .start -text "Start" -command [list Start $command]
-button .stop -text "Stop" -command Stop
-label .logo  -bitmap globe.0
-label .title
-
-# Layout widgets in table
-blt::table . \
-    .title      0,0 -columnspan 4 \
-    .text 	1,0 -columnspan 3 \
-    .vscroll 	1,3 -fill y \
-    .logo 	2,0 -anchor w -padx 10 -reqheight .6i -pady 4 \
-    .start 	2,1 \
-    .stop 	2,2 
-
-set buttonWidth 1i
-blt::table configure . c1 c2 -width 1i
-blt::table configure . c3 r0 r2 -resize none
-blt::table configure . .start .stop -reqwidth $buttonWidth -anchor e
-blt::table configure . .title .text -fill both
-
-wm min . 0 0
-
-
diff --git a/blt3.0/demos/bgexec5.tcl b/blt3.0/demos/bgexec5.tcl
deleted file mode 100755
index aa228d7..0000000
--- a/blt3.0/demos/bgexec5.tcl
+++ /dev/null
@@ -1,47 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-
-set shell bltwish
-if { [info exists tcl_platform] && $tcl_platform(platform) == "windows" } {
-    set shell "$shell.exe"
-}
-if { [file executable "../src/$shell"] } {
-    set shell "../src/$shell"
-}
-
-set count 0
-foreach demo [glob barchart?.tcl] {
-    bgexec var $shell $demo &
-}
-
-button .kill -text "Kill All" -command { set var 0 }
-blt::table . .kill -fill both 
-
-
diff --git a/blt3.0/demos/bitmap.tcl b/blt3.0/demos/bitmap.tcl
deleted file mode 100755
index f299cfb..0000000
--- a/blt3.0/demos/bitmap.tcl
+++ /dev/null
@@ -1,230 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-
-source scripts/demo.tcl
-source scripts/stipples.tcl
-source scripts/patterns.tcl
-
-bitmap define wide_weave { 
-#define wide_weave_width 16
-#define wide_weave_height 16
-static char wide_weave_bits[] = {
-   0x11, 0x11, 0xb8, 0xb8, 0x7c, 0x7c, 0x3a, 0x3a, 0x11, 0x11, 0xa3, 0xa3,
-   0xc7, 0xc7, 0x8b, 0x8b, 0x11, 0x11, 0xb8, 0xb8, 0x7c, 0x7c, 0x3a, 0x3a,
-   0x11, 0x11, 0xa3, 0xa3, 0xc7, 0xc7, 0x8b, 0x8b};
-}
-
-bitmap define hobbes3 { 
-#define hobbes_width 25
-#define hobbes_height 25
-static char hobbes_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00,
-    0x78, 0xe0, 0x07, 0x00, 0xfc, 0xf8, 0x07, 0x00, 0xcc, 0x07, 0x04, 0x00,
-    0x0c, 0xf0, 0x0b, 0x00, 0x7c, 0x1c, 0x06, 0x00, 0x38, 0x00, 0x00, 0x00,
-    0xe0, 0x03, 0x10, 0x00, 0xe0, 0x41, 0x11, 0x00, 0x20, 0x40, 0x11, 0x00,
-    0xe0, 0x07, 0x10, 0x00, 0xe0, 0xc1, 0x17, 0x00, 0x10, 0xe0, 0x2f, 0x00,
-    0x20, 0xe0, 0x6f, 0x00, 0x18, 0xe0, 0x2f, 0x00, 0x20, 0xc6, 0x67, 0x00,
-    0x18, 0x84, 0x2b, 0x00, 0x20, 0x08, 0x64, 0x00, 0x70, 0xf0, 0x13, 0x00,
-    0x80, 0x01, 0x08, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00};
-} -scale 3.0
-
-
-bitmap define gort { 
-#define gort_width 64
-#define gort_height 64
-static char gort_bits[] = {
-    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf0, 
-    0x3f, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x80,
-    0x01, 0x00, 0xc0, 0xdf, 0x0f, 0x1e, 0x00, 0x80, 0x01, 0x00, 0x60, 0xdf, 
-    0x7f, 0x38, 0x00, 0x80, 0x01, 0x00, 0x30, 0x84, 0xfd, 0x67, 0x00, 0x80,
-    0x01, 0x00, 0x18, 0x04, 0xf6, 0xef, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x86, 
-    0xe1, 0xc7, 0x01, 0x80, 0x01, 0x00, 0x06, 0x06, 0xc0, 0x96, 0x01, 0x80,
-    0x01, 0x00, 0x06, 0x06, 0x00, 0x97, 0x03, 0x80, 0x01, 0x00, 0x06, 0x06, 
-    0x00, 0x3c, 0x03, 0x80, 0x01, 0x00, 0x03, 0x06, 0x00, 0x5c, 0x07, 0x80,
-    0x01, 0x00, 0x03, 0x02, 0x00, 0xd8, 0x06, 0x80, 0x01, 0x00, 0x03, 0x02, 
-    0x00, 0xd8, 0x06, 0x80, 0x01, 0x00, 0x43, 0x02, 0x00, 0xb0, 0x0c, 0x80,
-    0x01, 0x80, 0x31, 0x03, 0x00, 0xe0, 0x0d, 0x80, 0x01, 0x80, 0x61, 0x03, 
-    0x00, 0xe0, 0x0d, 0x80, 0x01, 0x80, 0x1b, 0x03, 0x00, 0xf0, 0x0c, 0x80,
-    0x01, 0x80, 0xb3, 0x03, 0xff, 0xff, 0x1d, 0x80, 0x01, 0xc0, 0xeb, 0xfb, 
-    0xff, 0xff, 0x1d, 0x80, 0x01, 0xe0, 0xc5, 0x7f, 0xfe, 0x7f, 0x3f, 0x01,
-    0xe0, 0xeb, 0xe3, 0xff, 0xff, 0x6e, 0x80, 0x01, 0xd0, 0x3b, 0xfe, 0x01, 
-    0x80, 0x40, 0xcf, 0x80, 0x01, 0xf0, 0xf7, 0x07, 0x00, 0x30, 0x8e, 0x80,
-    0x01, 0xf0, 0xf4, 0x00, 0x00, 0x1b, 0x98, 0x80, 0x01, 0x70, 0x14, 0x00, 
-    0x00, 0x1f, 0xdc, 0x80, 0x01, 0x30, 0xfe, 0xff, 0x1f, 0xc8, 0xff, 0x80,
-    0x01, 0x20, 0xee, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0x20, 0xf7, 0xff, 
-    0x7f, 0xfe, 0x7f, 0x80, 0x01, 0xc0, 0xe1, 0xff, 0xff, 0xfe, 0x3f, 0x80,
-    0x01, 0x80, 0xed, 0xff, 0xff, 0xff, 0x19, 0x80, 0x01, 0x80, 0x99, 0xff, 
-    0xff, 0xff, 0x18, 0x80, 0x01, 0x00, 0x63, 0x83, 0xff, 0x7f, 0x08, 0x80,
-    0x01, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0x9b, 0x07, 
-    0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xb6, 0x07, 0x00, 0x10, 0x0c, 0x80,
-    0x01, 0x00, 0xc6, 0x07, 0x00, 0x10, 0x04, 0x80, 0x01, 0x00, 0x36, 0x06, 
-    0x00, 0x18, 0x06, 0x80, 0x01, 0x00, 0x66, 0x06, 0x00, 0x18, 0x06, 0x80,
-    0x01, 0x00, 0x8c, 0x0d, 0x00, 0x18, 0x02, 0x80, 0x01, 0x00, 0x18, 0x0e, 
-    0x00, 0x18, 0x03, 0x80, 0x01, 0x00, 0xf0, 0x0c, 0x00, 0x18, 0x03, 0x80,
-    0x01, 0x00, 0x30, 0x0f, 0x00, 0x98, 0x01, 0x80, 0x01, 0x00, 0xb0, 0x1f, 
-    0x01, 0x98, 0x01, 0x80, 0x01, 0x00, 0x60, 0x1f, 0x03, 0xdc, 0x00, 0x80,
-    0x01, 0x00, 0xe0, 0x3f, 0x03, 0xdc, 0x00, 0x80, 0x01, 0x00, 0xe0, 0x3b, 
-    0x07, 0xee, 0x00, 0x80, 0x01, 0x00, 0x70, 0xf8, 0xff, 0xff, 0x01, 0x80,
-    0x01, 0x00, 0xf0, 0x80, 0xff, 0x37, 0x03, 0x80, 0x01, 0x00, 0xfc, 0x00, 
-    0x08, 0xd8, 0x03, 0x80, 0x01, 0x00, 0xfe, 0x03, 0xf8, 0x7f, 0x07, 0x80,
-    0x01, 0xc0, 0x87, 0x07, 0xe0, 0x3f, 0x1c, 0x80, 0x01, 0xf0, 0x03, 0x00, 
-    0x00, 0x00, 0xf8, 0x8f, 0x81, 0xff, 0x00, 0x38, 0x00, 0xf6, 0xf9, 0xff,
-    0xfd, 0x3f, 0x00, 0xe0, 0x00, 0x83, 0x8f, 0xff, 0xff, 0x00, 0x00, 0x80, 
-    0x01, 0x00, 0xfc, 0xc0, 0x07, 0x0e, 0x00, 0x38, 0xe0, 0x00, 0xe0, 0x9f,
-    0xf9, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x7f, 0x80, 0x01, 0x00, 
-    0xc0, 0x00, 0x00, 0xf0, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
-    0x0f, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 
-    0x38, 0xc0, 0xc0, 0x80, 0x01, 0x1c, 0xe0, 0x00, 0x0c, 0xc0, 0x83, 0x81,
-    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-} -rotate 180
-
-bitmap define xbob {
-#define bob_x_hot 30
-#define bob_y_hot 37
-#define bob_width 61
-#define bob_height 75
-static char bob_bits[] = {            
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
-   0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00,
-   0x00, 0x80, 0xff, 0xff, 0xff, 0xfb, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xcf,
-   0x9f, 0xd1, 0x03, 0x00, 0x00, 0xf0, 0x7f, 0x8c, 0x33, 0x91, 0x07, 0x00,
-   0x00, 0xf8, 0xa7, 0x18, 0x27, 0xb1, 0x06, 0x00, 0x00, 0xfc, 0x47, 0x31,
-   0x4e, 0xa6, 0x0e, 0x00, 0x00, 0xfe, 0x4f, 0x21, 0x4c, 0xae, 0x3d, 0x00,
-   0x00, 0xff, 0xdf, 0x23, 0x8d, 0xbe, 0x7d, 0x00, 0x80, 0xff, 0xff, 0x67,
-   0xbd, 0xfe, 0xff, 0x01, 0x80, 0xff, 0xff, 0x7f, 0xbf, 0xff, 0xff, 0x03,
-   0xc0, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf8, 0x07, 0xc0, 0xff, 0xff, 0xff,
-   0xbf, 0x3f, 0xf8, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0x0f,
-   0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0x0f, 0xe0, 0x7f, 0x00, 0xf8,
-   0x07, 0x00, 0xf0, 0x0f, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xf4, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x07,
-   0xc0, 0x3f, 0x00, 0x00, 0x00, 0x78, 0xf6, 0x07, 0xa0, 0xbf, 0xff, 0x00,
-   0x00, 0xff, 0xf7, 0x07, 0x70, 0x9f, 0xff, 0x01, 0x80, 0xff, 0xef, 0x07,
-   0xf0, 0x1c, 0x80, 0x03, 0xe0, 0x01, 0xef, 0x07, 0xf0, 0x1f, 0xbe, 0x07,
-   0xf0, 0x3f, 0xee, 0x07, 0xe0, 0x9d, 0x83, 0x1f, 0xf8, 0xe1, 0xdc, 0x07,
-   0xe0, 0xc1, 0x7f, 0x1f, 0xfc, 0xff, 0xc8, 0x07, 0xe0, 0xc1, 0x69, 0x1e,
-   0x7e, 0xca, 0xc0, 0x03, 0xe0, 0x81, 0xb8, 0x1f, 0xc0, 0x0e, 0xc0, 0x03,
-   0xe0, 0x01, 0xc0, 0x1b, 0xc0, 0xcf, 0xc1, 0x03, 0xc0, 0x03, 0xf7, 0x11,
-   0x00, 0x7f, 0xc0, 0x03, 0xc0, 0x03, 0x7c, 0x18, 0x00, 0x1c, 0xc0, 0x02,
-   0xc0, 0x02, 0x30, 0x08, 0x00, 0x00, 0x40, 0x03, 0x40, 0x03, 0x00, 0x08,
-   0x00, 0x00, 0x40, 0x02, 0x40, 0x13, 0x00, 0x0c, 0x00, 0x00, 0x60, 0x02,
-   0x40, 0x12, 0x00, 0x0e, 0x00, 0x00, 0xc0, 0x03, 0x80, 0x33, 0x80, 0x0e,
-   0x00, 0x00, 0xa8, 0x01, 0x00, 0x33, 0x40, 0x0f, 0xa0, 0x03, 0x2c, 0x00,
-   0x00, 0x74, 0x30, 0x0f, 0x38, 0x07, 0x2e, 0x00, 0x00, 0x74, 0x98, 0x1f,
-   0x1e, 0x1e, 0x2f, 0x00, 0x00, 0xfc, 0x8f, 0xff, 0x0f, 0xfc, 0x2f, 0x00,
-   0x00, 0xf8, 0xe3, 0xff, 0x03, 0xf8, 0x2f, 0x00, 0x00, 0xf8, 0xfd, 0xff,
-   0x81, 0xff, 0x3f, 0x00, 0x00, 0xb8, 0xf9, 0x1f, 0xf8, 0x0f, 0x1e, 0x00,
-   0x00, 0x30, 0xf1, 0xf0, 0x0f, 0x03, 0x0e, 0x00, 0x00, 0x30, 0xf1, 0x01,
-   0x80, 0x01, 0x0f, 0x00, 0x00, 0x20, 0xf1, 0xf7, 0xff, 0x00, 0x07, 0x00,
-   0x00, 0x60, 0xe3, 0x01, 0x60, 0x80, 0x07, 0x00, 0x00, 0x60, 0xc3, 0xef,
-   0x3f, 0x80, 0x03, 0x00, 0x00, 0x40, 0xc2, 0xff, 0x0f, 0xc0, 0x03, 0x00,
-   0x00, 0xc0, 0xe6, 0x1f, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0xf4, 0xfe,
-   0x3f, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x79, 0xfe, 0x1f, 0xe0, 0x00, 0x00,
-   0xc0, 0x01, 0x3d, 0x3e, 0x00, 0x70, 0x00, 0x00, 0x30, 0x06, 0x3e, 0x0f,
-   0x00, 0x38, 0x00, 0x00, 0xc8, 0x8c, 0x1f, 0x07, 0x00, 0x38, 0x00, 0x00,
-   0xf4, 0xcc, 0x8f, 0x07, 0x00, 0x1c, 0x00, 0x00, 0x72, 0xee, 0xf7, 0x07,
-   0x00, 0x0e, 0x00, 0x00, 0x02, 0xff, 0xe3, 0x07, 0x00, 0x07, 0x00, 0x00,
-   0x32, 0xfe, 0xc1, 0xff, 0x8f, 0x03, 0x00, 0x00, 0x3e, 0xfe, 0x80, 0xff,
-   0xff, 0x01, 0x00, 0x00, 0x7e, 0x7c, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
-   0x7c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xf8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-} -rotate -123
-
-bitmap compose top "Top\nScaled 2x" -pady 5 -padx 10 -rotate 0 -scale 2.0
-bitmap compose left "Left\na\nb\nc" -rotate 90
-bitmap compose right {Right} -rotate 270
-bitmap compose center {Center} -rotate 45 
-bitmap compose bottom {Bottom} -rotate 180
-
-#
-# Test bitmap 
-#
-#   1.   Test of rotated text bitmap
-#   2.   Define bitmap from output of "data" command
-#   3.   Define bitmap from X11 bitmap file
-#   4.   Define bitmap from X10 bitmap file
-#   5.   Define bitmap from internal Tcl list
-#   6.   Use predefined internal bitmap 
-#
-proc ChangeBitmap { w } {
-    global count bitmapList
-    if { [incr count] >= [llength $bitmapList] } {
-	exit
-    }
-    $w configure -bitmap [lindex $bitmapList $count]
-}
-set count -1
-set bitmapList {
-      sharky
-      hobbes3
-      xbob
-      gort 
-      question 
-      large_question 
-      questhead
-      large_questhead 
-      hobbes
-      BLT 
-}
-
-option add *center*padX 8
-option add *center*padY 4
-
-button .left -bitmap left -command { 
-	.center configure -bitmap sharky ; set count -1 
-}
-button .top -bitmap top -command {
-	.center configure -bitmap hobbes3 ; set count 0 
-}
-button .right -bitmap right -command {
-	.center configure -bitmap xbob ; set count 1 
-}
-button .bottom -bitmap bottom -command {
-	.center configure -bitmap gort ; set count 2 
-}
-button .center -bitmap center -command "ChangeBitmap .center"
-
-set bitmapFile @bitmaps/sharky.xbm
-bitmap define sharky [bitmap data $bitmapFile]  -rotate 45 -scale 0.75
-bitmap define large_question [bitmap data question]  -scale 2.0
-bitmap define large_questhead [bitmap data questhead]  -scale 2.0
-
-blt::table . \
-	.top	0,1 -fill x \
-	.left   1,0 -fill y \
-	.center 1,1 -fill both \
-	.right  1,2 -fill y \
-	.bottom 2,1 -fill x 
-	
diff --git a/blt3.0/demos/bitmap2.tcl b/blt3.0/demos/bitmap2.tcl
deleted file mode 100755
index ce14ca3..0000000
--- a/blt3.0/demos/bitmap2.tcl
+++ /dev/null
@@ -1,191 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-source scripts/demo.tcl
-source scripts/patterns.tcl
-source scripts/stipples.tcl
-
-blt::bitmap define hobbes { 
-#define hobbes_width 25
-#define hobbes_height 25
-static char hobbes_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00,
-    0x78, 0xe0, 0x07, 0x00, 0xfc, 0xf8, 0x07, 0x00, 0xcc, 0x07, 0x04, 0x00,
-    0x0c, 0xf0, 0x0b, 0x00, 0x7c, 0x1c, 0x06, 0x00, 0x38, 0x00, 0x00, 0x00,
-    0xe0, 0x03, 0x10, 0x00, 0xe0, 0x41, 0x11, 0x00, 0x20, 0x40, 0x11, 0x00,
-    0xe0, 0x07, 0x10, 0x00, 0xe0, 0xc1, 0x17, 0x00, 0x10, 0xe0, 0x2f, 0x00,
-    0x20, 0xe0, 0x6f, 0x00, 0x18, 0xe0, 0x2f, 0x00, 0x20, 0xc6, 0x67, 0x00,
-    0x18, 0x84, 0x2b, 0x00, 0x20, 0x08, 0x64, 0x00, 0x70, 0xf0, 0x13, 0x00,
-    0x80, 0x01, 0x08, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00};
-}
-
-blt::bitmap define gort { 
-#define gort_width 64
-#define gort_height 64
-static char gort_bits[] = {
-    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf0, 
-    0x3f, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x80,
-    0x01, 0x00, 0xc0, 0xdf, 0x0f, 0x1e, 0x00, 0x80, 0x01, 0x00, 0x60, 0xdf, 
-    0x7f, 0x38, 0x00, 0x80, 0x01, 0x00, 0x30, 0x84, 0xfd, 0x67, 0x00, 0x80,
-    0x01, 0x00, 0x18, 0x04, 0xf6, 0xef, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x86, 
-    0xe1, 0xc7, 0x01, 0x80, 0x01, 0x00, 0x06, 0x06, 0xc0, 0x96, 0x01, 0x80,
-    0x01, 0x00, 0x06, 0x06, 0x00, 0x97, 0x03, 0x80, 0x01, 0x00, 0x06, 0x06, 
-    0x00, 0x3c, 0x03, 0x80, 0x01, 0x00, 0x03, 0x06, 0x00, 0x5c, 0x07, 0x80,
-    0x01, 0x00, 0x03, 0x02, 0x00, 0xd8, 0x06, 0x80, 0x01, 0x00, 0x03, 0x02, 
-    0x00, 0xd8, 0x06, 0x80, 0x01, 0x00, 0x43, 0x02, 0x00, 0xb0, 0x0c, 0x80,
-    0x01, 0x80, 0x31, 0x03, 0x00, 0xe0, 0x0d, 0x80, 0x01, 0x80, 0x61, 0x03, 
-    0x00, 0xe0, 0x0d, 0x80, 0x01, 0x80, 0x1b, 0x03, 0x00, 0xf0, 0x0c, 0x80,
-    0x01, 0x80, 0xb3, 0x03, 0xff, 0xff, 0x1d, 0x80, 0x01, 0xc0, 0xeb, 0xfb, 
-    0xff, 0xff, 0x1d, 0x80, 0x01, 0xe0, 0xc5, 0x7f, 0xfe, 0x7f, 0x3f, 0x01,
-    0xe0, 0xeb, 0xe3, 0xff, 0xff, 0x6e, 0x80, 0x01, 0xd0, 0x3b, 0xfe, 0x01, 
-    0x80, 0x40, 0xcf, 0x80, 0x01, 0xf0, 0xf7, 0x07, 0x00, 0x30, 0x8e, 0x80,
-    0x01, 0xf0, 0xf4, 0x00, 0x00, 0x1b, 0x98, 0x80, 0x01, 0x70, 0x14, 0x00, 
-    0x00, 0x1f, 0xdc, 0x80, 0x01, 0x30, 0xfe, 0xff, 0x1f, 0xc8, 0xff, 0x80,
-    0x01, 0x20, 0xee, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0x20, 0xf7, 0xff, 
-    0x7f, 0xfe, 0x7f, 0x80, 0x01, 0xc0, 0xe1, 0xff, 0xff, 0xfe, 0x3f, 0x80,
-    0x01, 0x80, 0xed, 0xff, 0xff, 0xff, 0x19, 0x80, 0x01, 0x80, 0x99, 0xff, 
-    0xff, 0xff, 0x18, 0x80, 0x01, 0x00, 0x63, 0x83, 0xff, 0x7f, 0x08, 0x80,
-    0x01, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0x9b, 0x07, 
-    0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xb6, 0x07, 0x00, 0x10, 0x0c, 0x80,
-    0x01, 0x00, 0xc6, 0x07, 0x00, 0x10, 0x04, 0x80, 0x01, 0x00, 0x36, 0x06, 
-    0x00, 0x18, 0x06, 0x80, 0x01, 0x00, 0x66, 0x06, 0x00, 0x18, 0x06, 0x80,
-    0x01, 0x00, 0x8c, 0x0d, 0x00, 0x18, 0x02, 0x80, 0x01, 0x00, 0x18, 0x0e, 
-    0x00, 0x18, 0x03, 0x80, 0x01, 0x00, 0xf0, 0x0c, 0x00, 0x18, 0x03, 0x80,
-    0x01, 0x00, 0x30, 0x0f, 0x00, 0x98, 0x01, 0x80, 0x01, 0x00, 0xb0, 0x1f, 
-    0x01, 0x98, 0x01, 0x80, 0x01, 0x00, 0x60, 0x1f, 0x03, 0xdc, 0x00, 0x80,
-    0x01, 0x00, 0xe0, 0x3f, 0x03, 0xdc, 0x00, 0x80, 0x01, 0x00, 0xe0, 0x3b, 
-    0x07, 0xee, 0x00, 0x80, 0x01, 0x00, 0x70, 0xf8, 0xff, 0xff, 0x01, 0x80,
-    0x01, 0x00, 0xf0, 0x80, 0xff, 0x37, 0x03, 0x80, 0x01, 0x00, 0xfc, 0x00, 
-    0x08, 0xd8, 0x03, 0x80, 0x01, 0x00, 0xfe, 0x03, 0xf8, 0x7f, 0x07, 0x80,
-    0x01, 0xc0, 0x87, 0x07, 0xe0, 0x3f, 0x1c, 0x80, 0x01, 0xf0, 0x03, 0x00, 
-    0x00, 0x00, 0xf8, 0x8f, 0x81, 0xff, 0x00, 0x38, 0x00, 0xf6, 0xf9, 0xff,
-    0xfd, 0x3f, 0x00, 0xe0, 0x00, 0x83, 0x8f, 0xff, 0xff, 0x00, 0x00, 0x80, 
-    0x01, 0x00, 0xfc, 0xc0, 0x07, 0x0e, 0x00, 0x38, 0xe0, 0x00, 0xe0, 0x9f,
-    0xf9, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x7f, 0x80, 0x01, 0x00, 
-    0xc0, 0x00, 0x00, 0xf0, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
-    0x0f, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 
-    0x38, 0xc0, 0xc0, 0x80, 0x01, 0x1c, 0xe0, 0x00, 0x0c, 0xc0, 0x83, 0x81,
-    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-}
-
-blt::bitmap define xbob {
-#define bob_x_hot 30
-#define bob_y_hot 37
-#define bob_width 61
-#define bob_height 75
-static char bob_bits[] = {            
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
-   0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00,
-   0x00, 0x80, 0xff, 0xff, 0xff, 0xfb, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xcf,
-   0x9f, 0xd1, 0x03, 0x00, 0x00, 0xf0, 0x7f, 0x8c, 0x33, 0x91, 0x07, 0x00,
-   0x00, 0xf8, 0xa7, 0x18, 0x27, 0xb1, 0x06, 0x00, 0x00, 0xfc, 0x47, 0x31,
-   0x4e, 0xa6, 0x0e, 0x00, 0x00, 0xfe, 0x4f, 0x21, 0x4c, 0xae, 0x3d, 0x00,
-   0x00, 0xff, 0xdf, 0x23, 0x8d, 0xbe, 0x7d, 0x00, 0x80, 0xff, 0xff, 0x67,
-   0xbd, 0xfe, 0xff, 0x01, 0x80, 0xff, 0xff, 0x7f, 0xbf, 0xff, 0xff, 0x03,
-   0xc0, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf8, 0x07, 0xc0, 0xff, 0xff, 0xff,
-   0xbf, 0x3f, 0xf8, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0x0f,
-   0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0x0f, 0xe0, 0x7f, 0x00, 0xf8,
-   0x07, 0x00, 0xf0, 0x0f, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xf4, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x07,
-   0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00,
-   0x00, 0x00, 0xe6, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x07,
-   0xc0, 0x3f, 0x00, 0x00, 0x00, 0x78, 0xf6, 0x07, 0xa0, 0xbf, 0xff, 0x00,
-   0x00, 0xff, 0xf7, 0x07, 0x70, 0x9f, 0xff, 0x01, 0x80, 0xff, 0xef, 0x07,
-   0xf0, 0x1c, 0x80, 0x03, 0xe0, 0x01, 0xef, 0x07, 0xf0, 0x1f, 0xbe, 0x07,
-   0xf0, 0x3f, 0xee, 0x07, 0xe0, 0x9d, 0x83, 0x1f, 0xf8, 0xe1, 0xdc, 0x07,
-   0xe0, 0xc1, 0x7f, 0x1f, 0xfc, 0xff, 0xc8, 0x07, 0xe0, 0xc1, 0x69, 0x1e,
-   0x7e, 0xca, 0xc0, 0x03, 0xe0, 0x81, 0xb8, 0x1f, 0xc0, 0x0e, 0xc0, 0x03,
-   0xe0, 0x01, 0xc0, 0x1b, 0xc0, 0xcf, 0xc1, 0x03, 0xc0, 0x03, 0xf7, 0x11,
-   0x00, 0x7f, 0xc0, 0x03, 0xc0, 0x03, 0x7c, 0x18, 0x00, 0x1c, 0xc0, 0x02,
-   0xc0, 0x02, 0x30, 0x08, 0x00, 0x00, 0x40, 0x03, 0x40, 0x03, 0x00, 0x08,
-   0x00, 0x00, 0x40, 0x02, 0x40, 0x13, 0x00, 0x0c, 0x00, 0x00, 0x60, 0x02,
-   0x40, 0x12, 0x00, 0x0e, 0x00, 0x00, 0xc0, 0x03, 0x80, 0x33, 0x80, 0x0e,
-   0x00, 0x00, 0xa8, 0x01, 0x00, 0x33, 0x40, 0x0f, 0xa0, 0x03, 0x2c, 0x00,
-   0x00, 0x74, 0x30, 0x0f, 0x38, 0x07, 0x2e, 0x00, 0x00, 0x74, 0x98, 0x1f,
-   0x1e, 0x1e, 0x2f, 0x00, 0x00, 0xfc, 0x8f, 0xff, 0x0f, 0xfc, 0x2f, 0x00,
-   0x00, 0xf8, 0xe3, 0xff, 0x03, 0xf8, 0x2f, 0x00, 0x00, 0xf8, 0xfd, 0xff,
-   0x81, 0xff, 0x3f, 0x00, 0x00, 0xb8, 0xf9, 0x1f, 0xf8, 0x0f, 0x1e, 0x00,
-   0x00, 0x30, 0xf1, 0xf0, 0x0f, 0x03, 0x0e, 0x00, 0x00, 0x30, 0xf1, 0x01,
-   0x80, 0x01, 0x0f, 0x00, 0x00, 0x20, 0xf1, 0xf7, 0xff, 0x00, 0x07, 0x00,
-   0x00, 0x60, 0xe3, 0x01, 0x60, 0x80, 0x07, 0x00, 0x00, 0x60, 0xc3, 0xef,
-   0x3f, 0x80, 0x03, 0x00, 0x00, 0x40, 0xc2, 0xff, 0x0f, 0xc0, 0x03, 0x00,
-   0x00, 0xc0, 0xe6, 0x1f, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0xf4, 0xfe,
-   0x3f, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x79, 0xfe, 0x1f, 0xe0, 0x00, 0x00,
-   0xc0, 0x01, 0x3d, 0x3e, 0x00, 0x70, 0x00, 0x00, 0x30, 0x06, 0x3e, 0x0f,
-   0x00, 0x38, 0x00, 0x00, 0xc8, 0x8c, 0x1f, 0x07, 0x00, 0x38, 0x00, 0x00,
-   0xf4, 0xcc, 0x8f, 0x07, 0x00, 0x1c, 0x00, 0x00, 0x72, 0xee, 0xf7, 0x07,
-   0x00, 0x0e, 0x00, 0x00, 0x02, 0xff, 0xe3, 0x07, 0x00, 0x07, 0x00, 0x00,
-   0x32, 0xfe, 0xc1, 0xff, 0x8f, 0x03, 0x00, 0x00, 0x3e, 0xfe, 0x80, 0xff,
-   0xff, 0x01, 0x00, 0x00, 0x7e, 0x7c, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
-   0x7c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xf8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-}
-
-blt::bitmap compose text "Text String" -font {courier 12}
-
-. configure -bg grey80
-label .angle -text "Angle" -font { Helvetica 12 bold } -bg grey80
-label .scale -text "Scale" -font { Helvetica 12 bold } -bg grey80
-
-blt::table . \
-    0,0 .angle -fill both \
-    0,5 .scale -fill both 
-
-set row 1
-foreach angle { 0 90 180 270 360 45 -45 101 } {
-    label .angle$angle -text $angle -bg grey80
-    blt::table . \
-	$row,0 .angle$angle -fill both
-    set column 1
-    foreach bitmap { hobbes gort xbob text } {
-	set data [blt::bitmap data $bitmap]
-	blt::bitmap define $bitmap$row$column $data -rotate $angle
-	label .$bitmap$row$column -bitmap $bitmap$row$column -bg white
-	blt::table . \
-	    $row,$column .$bitmap$row$column
-	incr column
-    }
-    incr row
-}
-
-set row 1
-foreach scale { 1.0 0.5 0.75 1.4 3.0 } {
-    label .scale$row -text $scale -bg grey80
-    blt::table . \
-	$row,5 .scale$row -fill both
-    set column 6
-    foreach bitmap { hobbes gort xbob text } {
-	set data [blt::bitmap data $bitmap]
-	blt::bitmap define $bitmap$row$column $data -scale $scale
-	label .$bitmap$row$column -bitmap $bitmap$row$column -bg white
-	blt::table . \
-	    $row,$column .$bitmap$row$column
-	incr column
-    }
-    incr row
-}
-
-foreach scale { 2.0 0.8 1.2 } angle { 45 -45 101 } {
-    label .scale$row -text "$scale/$angle" -bg grey80
-    blt::table . \
-	$row,5 .scale$row -fill both
-    set column 6
-    foreach bitmap { hobbes gort xbob text } {
-	set data [blt::bitmap data $bitmap]
-	blt::bitmap define $bitmap$row $data -scale $scale -rotate $angle
-	label .$bitmap$row -bitmap $bitmap$row -bg white
-	blt::table . \
-	    $row,$column .$bitmap$row
-	incr column
-    }
-    incr row
-}
-
-blt::table configure . c* -padx 2
\ No newline at end of file
diff --git a/blt3.0/demos/bitmaps/face.xbm b/blt3.0/demos/bitmaps/face.xbm
deleted file mode 100644
index 8e09419..0000000
--- a/blt3.0/demos/bitmaps/face.xbm
+++ /dev/null
@@ -1,171 +0,0 @@
-#define face_width 108
-#define face_height 144
-static char face_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09,
-   0x20, 0x80, 0x24, 0x05, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x88,
-   0x24, 0x20, 0x80, 0x24, 0x00, 0x00, 0x00, 0x10, 0x80, 0x04, 0x00, 0x01,
-   0x00, 0x01, 0x40, 0x0a, 0x09, 0x00, 0x92, 0x04, 0x80, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x10, 0x40, 0x12, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x84,
-   0x24, 0x40, 0x22, 0xa8, 0x02, 0x14, 0x84, 0x92, 0x40, 0x42, 0x12, 0x04,
-   0x10, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x11, 0x00, 0x12, 0x00,
-   0x40, 0x02, 0x00, 0x20, 0x00, 0x08, 0x00, 0xaa, 0x02, 0x54, 0x85, 0x24,
-   0x00, 0x10, 0x12, 0x00, 0x00, 0x81, 0x44, 0x00, 0x90, 0x5a, 0x00, 0xea,
-   0x1b, 0x00, 0x80, 0x40, 0x40, 0x02, 0x00, 0x08, 0x00, 0x20, 0xa2, 0x05,
-   0x8a, 0xb4, 0x6e, 0x45, 0x12, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02,
-   0xa8, 0x92, 0x00, 0xda, 0x5f, 0x10, 0x00, 0x10, 0xa1, 0x04, 0x20, 0x41,
-   0x02, 0x00, 0x5a, 0x25, 0xa0, 0xff, 0xfb, 0x05, 0x41, 0x02, 0x04, 0x00,
-   0x00, 0x08, 0x40, 0x80, 0xec, 0x9b, 0xec, 0xfe, 0x7f, 0x01, 0x04, 0x20,
-   0x90, 0x02, 0x04, 0x00, 0x08, 0x20, 0xfb, 0x2e, 0xf5, 0xff, 0xff, 0x57,
-   0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x01, 0xc1, 0x6e, 0xab, 0xfa, 0xff,
-   0xff, 0x05, 0x90, 0x20, 0x48, 0x02, 0x00, 0x04, 0x20, 0xa8, 0xdf, 0xb5,
-   0xfe, 0xff, 0xff, 0x0b, 0x01, 0x00, 0x01, 0x00, 0x80, 0x80, 0x04, 0xe0,
-   0xbb, 0xef, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x04, 0x48, 0x02, 0x00, 0x20,
-   0x80, 0xf4, 0x6f, 0xfb, 0xff, 0xff, 0xff, 0x20, 0x90, 0x40, 0x02, 0x00,
-   0x00, 0x04, 0x08, 0xb8, 0xf6, 0xff, 0xff, 0xdf, 0xbe, 0x12, 0x45, 0x10,
-   0x90, 0x04, 0x90, 0x00, 0x22, 0xfa, 0xff, 0xff, 0xff, 0xbb, 0xd7, 0xe9,
-   0x3a, 0x02, 0x02, 0x00, 0x04, 0x90, 0x80, 0xfe, 0xdf, 0xf6, 0xb7, 0xef,
-   0xbe, 0x56, 0x57, 0x40, 0x48, 0x09, 0x00, 0x04, 0x00, 0xfa, 0xf5, 0xdf,
-   0xed, 0x5a, 0xd5, 0xea, 0xbd, 0x09, 0x00, 0x00, 0x40, 0x00, 0x92, 0xfe,
-   0xbf, 0x7d, 0xb7, 0x6a, 0x55, 0xbf, 0xf7, 0x02, 0x11, 0x01, 0x00, 0x91,
-   0x00, 0xff, 0xff, 0xaf, 0x55, 0x55, 0x5b, 0xeb, 0xef, 0x22, 0x04, 0x04,
-   0x04, 0x00, 0xa4, 0xff, 0xf7, 0xad, 0xaa, 0xaa, 0xaa, 0xbe, 0xfe, 0x03,
-   0x20, 0x00, 0x10, 0x44, 0x80, 0xff, 0x7f, 0x55, 0x12, 0x91, 0x2a, 0xeb,
-   0xbf, 0x0b, 0x82, 0x02, 0x00, 0x00, 0xd1, 0x7f, 0xdf, 0xa2, 0xa4, 0x54,
-   0x55, 0xfd, 0xfd, 0x47, 0x08, 0x08, 0x00, 0x21, 0xe4, 0xff, 0x37, 0x11,
-   0x09, 0xa5, 0xaa, 0xb6, 0xff, 0x0d, 0x80, 0x00, 0x00, 0x04, 0xd0, 0xff,
-   0x4f, 0x44, 0x20, 0x48, 0x55, 0xfb, 0xff, 0x27, 0x11, 0x02, 0x40, 0x40,
-   0xe2, 0xfb, 0x15, 0x11, 0x4a, 0x55, 0x4a, 0x7d, 0xf7, 0x0f, 0x00, 0x00,
-   0x04, 0x08, 0xf8, 0xdf, 0x52, 0x44, 0x01, 0x52, 0xb5, 0xfa, 0xff, 0x0f,
-   0x49, 0x02, 0x00, 0x02, 0xe9, 0xf6, 0x0a, 0x11, 0xa4, 0x88, 0x4a, 0x6d,
-   0xff, 0x5f, 0x00, 0x00, 0x10, 0x20, 0xf0, 0x2f, 0x21, 0x44, 0x10, 0x52,
-   0xb5, 0xfa, 0xff, 0x0f, 0x44, 0x04, 0x80, 0x08, 0xf8, 0xab, 0x8a, 0x00,
-   0x81, 0xa4, 0xd4, 0xd6, 0xfe, 0x2f, 0x00, 0x00, 0x04, 0x40, 0xb5, 0x2d,
-   0x21, 0x08, 0x04, 0x90, 0xaa, 0xfa, 0xff, 0x1f, 0x11, 0x01, 0x00, 0x04,
-   0xf0, 0x57, 0x0a, 0x22, 0x40, 0x4a, 0xda, 0x5e, 0xfb, 0x1f, 0x40, 0x00,
-   0x40, 0x20, 0xba, 0x95, 0x90, 0x00, 0x01, 0xa0, 0xaa, 0xea, 0xff, 0x5f,
-   0x02, 0x02, 0x00, 0x01, 0xe8, 0x57, 0x05, 0x00, 0x00, 0x12, 0xd5, 0xfe,
-   0xfd, 0x1f, 0x48, 0x00, 0x04, 0x48, 0x7a, 0x95, 0x08, 0x02, 0x10, 0x40,
-   0xaa, 0x55, 0xf7, 0x1f, 0x00, 0x09, 0x20, 0x00, 0xf8, 0x57, 0x22, 0x10,
-   0x00, 0x28, 0xa9, 0xfa, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x49, 0xdd, 0x29,
-   0x01, 0x00, 0x80, 0x80, 0xaa, 0xd7, 0xff, 0x0f, 0x10, 0x00, 0x08, 0x00,
-   0xf8, 0x96, 0x08, 0x00, 0x00, 0x20, 0x54, 0xfa, 0xee, 0x3f, 0x81, 0x04,
-   0x40, 0x24, 0xfe, 0x55, 0x82, 0x00, 0x00, 0x82, 0xd2, 0xad, 0xff, 0x0f,
-   0x08, 0x00, 0x04, 0x80, 0x6c, 0x97, 0x00, 0x00, 0x02, 0x20, 0xa9, 0xf6,
-   0xdf, 0x5f, 0x00, 0x02, 0x20, 0x09, 0xfa, 0x49, 0x12, 0x00, 0x20, 0x84,
-   0x54, 0xdb, 0xfe, 0x1f, 0x91, 0x00, 0x00, 0x00, 0xf8, 0x2b, 0x00, 0x20,
-   0x00, 0x40, 0xa4, 0xf6, 0xbb, 0x1f, 0x04, 0x00, 0x44, 0x92, 0x7e, 0x95,
-   0x02, 0x00, 0x00, 0x89, 0xaa, 0xdd, 0xff, 0x1f, 0x20, 0x09, 0x10, 0x00,
-   0xf4, 0x57, 0x20, 0x01, 0x08, 0x20, 0xa9, 0x76, 0xff, 0x5f, 0x02, 0x00,
-   0x00, 0x21, 0xfc, 0x4a, 0x05, 0x00, 0x01, 0x80, 0x54, 0xdb, 0xff, 0x1e,
-   0x08, 0x02, 0x04, 0x08, 0xf9, 0x2b, 0x00, 0x00, 0x40, 0x28, 0xd2, 0xf6,
-   0xff, 0xbf, 0x80, 0x00, 0x90, 0x00, 0xbc, 0x92, 0x08, 0x10, 0x00, 0x82,
-   0x54, 0xdb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x44, 0xf9, 0x55, 0x02, 0x01,
-   0x00, 0x20, 0xaa, 0xbd, 0xfd, 0x3f, 0x08, 0x04, 0x04, 0x10, 0xf4, 0x2a,
-   0x01, 0x00, 0x22, 0x80, 0xd4, 0xf6, 0xff, 0x5f, 0x82, 0x00, 0x40, 0x02,
-   0xf8, 0x55, 0x20, 0x00, 0x00, 0x50, 0x6a, 0xdf, 0xfe, 0x3f, 0x00, 0x00,
-   0x00, 0x48, 0xe9, 0x4a, 0x05, 0x08, 0x00, 0xa5, 0xd5, 0xf5, 0xff, 0x3f,
-   0x10, 0x01, 0x10, 0x01, 0xb0, 0xab, 0x92, 0x02, 0x40, 0xf8, 0xbf, 0xde,
-   0xfe, 0x5f, 0x02, 0x04, 0x04, 0x48, 0xfa, 0xd4, 0x6f, 0x20, 0x84, 0xef,
-   0xff, 0xfb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xe0, 0xed, 0xbf, 0x0b,
-   0xa1, 0x7e, 0xff, 0xbf, 0xfd, 0x5f, 0x04, 0x01, 0x20, 0x49, 0xd2, 0xfb,
-   0xfe, 0x55, 0xd4, 0xff, 0xff, 0xf6, 0xff, 0x07, 0x00, 0x04, 0x00, 0x00,
-   0xc0, 0xaa, 0xfb, 0x2b, 0xa2, 0xfe, 0xff, 0xdf, 0xee, 0x1f, 0x91, 0x00,
-   0x82, 0xa4, 0xa4, 0xf5, 0xff, 0x57, 0xd5, 0xff, 0xbf, 0xfd, 0xff, 0x4d,
-   0x00, 0x00, 0x20, 0x00, 0x88, 0x5b, 0xff, 0x2f, 0x69, 0xff, 0xff, 0xdb,
-   0xfe, 0x1f, 0x24, 0x02, 0x00, 0x49, 0xa2, 0xd6, 0xff, 0x5f, 0xea, 0xff,
-   0x7f, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x40, 0xab, 0xf7, 0xbb,
-   0xf0, 0xdf, 0xff, 0xd5, 0xff, 0xbf, 0x82, 0x04, 0x42, 0x24, 0x91, 0xd5,
-   0xaa, 0xae, 0xd4, 0xaa, 0x52, 0x7b, 0xff, 0x15, 0x08, 0x00, 0x00, 0x01,
-   0x04, 0x55, 0xd5, 0x55, 0x70, 0x5b, 0x75, 0xdd, 0xdf, 0x1f, 0x40, 0x00,
-   0x08, 0x48, 0xa0, 0x4a, 0xa9, 0x56, 0xea, 0x56, 0xad, 0x6a, 0x7d, 0x9b,
-   0x04, 0x01, 0x00, 0x02, 0x42, 0x2a, 0xd5, 0xaa, 0xa8, 0xaa, 0xaa, 0xfa,
-   0xdf, 0x2f, 0x10, 0x04, 0x22, 0x48, 0x08, 0x45, 0x2a, 0x15, 0x68, 0x55,
-   0x55, 0xd7, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x40, 0x2a, 0x80, 0xa0,
-   0xb2, 0x09, 0x48, 0xb9, 0xdf, 0x17, 0x22, 0x01, 0x00, 0x24, 0x45, 0x8a,
-   0x24, 0x4a, 0x54, 0x51, 0x91, 0xf6, 0x6e, 0x4b, 0x00, 0x04, 0x90, 0x00,
-   0x80, 0x52, 0x00, 0x20, 0x69, 0x05, 0xa4, 0xaa, 0xff, 0x1e, 0x48, 0x00,
-   0x02, 0x92, 0x08, 0x05, 0x81, 0x94, 0xd4, 0x92, 0x40, 0xfd, 0xb6, 0x8b,
-   0x00, 0x01, 0x40, 0x00, 0x82, 0x54, 0x00, 0x48, 0x68, 0x05, 0x90, 0xa4,
-   0xef, 0x06, 0x24, 0x00, 0x08, 0x12, 0x10, 0x05, 0x00, 0x10, 0xb5, 0x01,
-   0x42, 0xfb, 0xbf, 0x43, 0x00, 0x09, 0x00, 0x40, 0x81, 0xa8, 0x08, 0x4a,
-   0xaa, 0x96, 0x90, 0xac, 0x6d, 0x15, 0x22, 0x00, 0x20, 0x09, 0x04, 0x15,
-   0x80, 0x28, 0xdc, 0x01, 0x24, 0xfb, 0xbf, 0x01, 0x80, 0x04, 0x09, 0x00,
-   0x40, 0x48, 0x02, 0x45, 0xb2, 0x2e, 0x41, 0x6d, 0xef, 0x05, 0x11, 0x00,
-   0x40, 0x52, 0x02, 0x15, 0x29, 0x2a, 0xac, 0x42, 0x54, 0xfb, 0x3b, 0x51,
-   0x84, 0x00, 0x08, 0x00, 0x20, 0x54, 0x80, 0x05, 0xb5, 0x3d, 0xa2, 0xb6,
-   0xdf, 0x00, 0x20, 0x04, 0x20, 0x49, 0x89, 0xa8, 0x6a, 0x29, 0xac, 0xd6,
-   0x54, 0xff, 0x3f, 0x84, 0x00, 0x01, 0x04, 0x10, 0x00, 0x94, 0xa8, 0x56,
-   0xda, 0x5f, 0xab, 0xd5, 0x1e, 0x10, 0x48, 0x00, 0x90, 0x82, 0x48, 0xa8,
-   0xb2, 0xac, 0xfd, 0x55, 0xd5, 0xfe, 0x9f, 0x80, 0x00, 0x0a, 0x02, 0x08,
-   0x02, 0x55, 0x5a, 0x75, 0xff, 0xaf, 0xb6, 0xf7, 0x2d, 0x12, 0x92, 0x00,
-   0x10, 0x20, 0x10, 0xa8, 0x54, 0xd5, 0xbf, 0x5d, 0xad, 0xdd, 0x0f, 0x00,
-   0x00, 0x04, 0x40, 0x09, 0x84, 0xa8, 0xaa, 0x5a, 0xed, 0xeb, 0x6a, 0xff,
-   0x9f, 0xa4, 0x24, 0x01, 0x02, 0xa0, 0x20, 0x50, 0x55, 0xd5, 0xbe, 0xae,
-   0xad, 0xfd, 0x16, 0x00, 0x10, 0x04, 0x20, 0x0a, 0x08, 0xb4, 0xaa, 0x95,
-   0xaa, 0x7b, 0xb7, 0xdb, 0x5f, 0x92, 0x04, 0x01, 0x84, 0x20, 0x21, 0x51,
-   0xd5, 0x2a, 0xa9, 0xee, 0xd5, 0xfe, 0x0d, 0x00, 0x20, 0x04, 0x10, 0x00,
-   0x08, 0x50, 0xe9, 0xd7, 0xd4, 0xfb, 0xb5, 0xff, 0x9f, 0x24, 0x09, 0x01,
-   0x42, 0x4a, 0xa2, 0x64, 0xd5, 0x55, 0x7b, 0x7f, 0xda, 0x7d, 0x4f, 0x00,
-   0x20, 0x04, 0x00, 0x80, 0x00, 0xa0, 0x2a, 0x13, 0x84, 0x6a, 0x55, 0xff,
-   0x1d, 0x48, 0x8a, 0x00, 0x94, 0x24, 0x8a, 0xc8, 0xaa, 0x42, 0x20, 0x5d,
-   0xf5, 0xff, 0x5f, 0x01, 0x00, 0x02, 0x01, 0x00, 0x20, 0xa2, 0x4a, 0x1a,
-   0x82, 0x56, 0xda, 0xbd, 0x3f, 0x92, 0x92, 0x00, 0x90, 0x92, 0x00, 0x40,
-   0x95, 0x6a, 0xf4, 0x55, 0x6d, 0xff, 0xd6, 0x00, 0x00, 0x0a, 0x04, 0x20,
-   0x14, 0x49, 0x4b, 0xaa, 0xaa, 0x56, 0xf5, 0xff, 0xbf, 0xab, 0xa4, 0x00,
-   0x20, 0x89, 0x40, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xde, 0xbf, 0xeb, 0x03,
-   0x00, 0x02, 0x04, 0x02, 0x0a, 0x10, 0x2b, 0x2a, 0x55, 0x5b, 0xf5, 0xff,
-   0xd7, 0x2f, 0x92, 0x00, 0x10, 0x28, 0x21, 0x01, 0x56, 0x95, 0xa0, 0x56,
-   0xdf, 0xef, 0xea, 0x87, 0x40, 0x0a, 0x42, 0x41, 0x00, 0x90, 0xaa, 0x52,
-   0xb6, 0xad, 0xfa, 0xff, 0xd5, 0x2f, 0x14, 0x00, 0x00, 0x04, 0x95, 0x04,
-   0xaa, 0xac, 0x55, 0x6b, 0xff, 0xb7, 0xea, 0x9f, 0x40, 0x02, 0x28, 0x51,
-   0x00, 0x40, 0x58, 0xd5, 0xda, 0xd6, 0x6e, 0x7f, 0xf9, 0x3f, 0x12, 0x04,
-   0x02, 0x04, 0x49, 0x25, 0x55, 0xaa, 0x77, 0xab, 0xff, 0x2b, 0xfd, 0x3f,
-   0x48, 0x01, 0x20, 0x41, 0x00, 0x00, 0x58, 0xa9, 0xda, 0xea, 0xfd, 0xaf,
-   0xfa, 0xff, 0x02, 0x04, 0x08, 0x14, 0x29, 0x49, 0x52, 0x55, 0x55, 0x55,
-   0xff, 0x8d, 0xfe, 0x3f, 0xa8, 0x00, 0x02, 0x41, 0x00, 0x02, 0xa0, 0xa2,
-   0xaa, 0xea, 0xff, 0x53, 0xfd, 0xff, 0x02, 0x04, 0x50, 0x04, 0x25, 0xa8,
-   0x54, 0x49, 0x52, 0xb5, 0xbf, 0x8a, 0xfe, 0xff, 0xa9, 0x08, 0x04, 0x50,
-   0x80, 0x02, 0xa1, 0x2a, 0x95, 0xea, 0xff, 0xa1, 0xff, 0xff, 0x03, 0x02,
-   0x90, 0x02, 0x09, 0x08, 0x44, 0x49, 0x52, 0xbd, 0x7f, 0xca, 0xff, 0xff,
-   0x2b, 0x09, 0x04, 0x48, 0x40, 0x82, 0x90, 0x56, 0xa9, 0xf6, 0xbf, 0xd0,
-   0xff, 0xff, 0x47, 0x00, 0x50, 0x02, 0x15, 0x11, 0x40, 0x95, 0xaa, 0xfd,
-   0x2f, 0xe9, 0xff, 0xff, 0x8f, 0x0a, 0x84, 0x50, 0x40, 0x84, 0x14, 0xaa,
-   0x6a, 0xff, 0x5f, 0xf2, 0xff, 0xff, 0x7f, 0x00, 0x10, 0x02, 0x09, 0x10,
-   0x40, 0x7d, 0xf7, 0xff, 0x0b, 0xfc, 0xff, 0xff, 0xaf, 0x02, 0x84, 0x50,
-   0x42, 0x85, 0x12, 0xd0, 0xdd, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0xff, 0x04,
-   0x00, 0x0a, 0x08, 0x10, 0x48, 0xf8, 0xff, 0xff, 0x0a, 0xfe, 0xff, 0xff,
-   0x7f, 0x03, 0xa4, 0x80, 0xa2, 0x8a, 0x02, 0x68, 0xff, 0xff, 0x52, 0xfd,
-   0xff, 0xff, 0xff, 0x07, 0x00, 0x2a, 0x08, 0x20, 0x28, 0xdc, 0xff, 0x5f,
-   0x05, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x92, 0x40, 0x22, 0x09, 0x02, 0xea,
-   0xfb, 0xaf, 0x48, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x12, 0x81, 0xa0,
-   0x48, 0x9c, 0x6e, 0x93, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa8, 0x40,
-   0x28, 0x0a, 0x02, 0x74, 0xb5, 0x45, 0x81, 0xff, 0xff, 0xff, 0xff, 0x0f,
-   0x02, 0x0a, 0x81, 0x20, 0x08, 0xae, 0xaa, 0x90, 0xe8, 0xff, 0xff, 0xff,
-   0xff, 0x0f, 0x90, 0x40, 0x28, 0x88, 0x12, 0x58, 0x15, 0x50, 0xd0, 0xff,
-   0xff, 0xff, 0xff, 0x0f, 0x44, 0x0a, 0x41, 0x21, 0x08, 0xae, 0x04, 0x14,
-   0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x14, 0x88, 0x04, 0xba,
-   0x02, 0x28, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x15, 0x41, 0x21,
-   0x05, 0xad, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40,
-   0x24, 0x8a, 0x0e, 0x36, 0x00, 0x0a, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x0f,
-   0x42, 0x25, 0x90, 0xd0, 0x8b, 0xc2, 0x41, 0x05, 0xfc, 0xff, 0xff, 0xff,
-   0xff, 0x0f, 0x10, 0x08, 0x05, 0xe8, 0x8e, 0x58, 0x80, 0x02, 0xfa, 0xff,
-   0xff, 0xff, 0xff, 0x0f, 0x4a, 0x20, 0xa8, 0xba, 0x0b, 0x2b, 0x51, 0x01,
-   0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x8a, 0x02, 0xe8, 0xaf, 0x84,
-   0x90, 0x04, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x21, 0x54, 0xbf,
-   0x1f, 0x15, 0xa5, 0x02, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x08,
-   0x01, 0xfa, 0xb6, 0xa4, 0x52, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-   0x4a, 0xa2, 0x54, 0xef, 0x5f, 0x4b, 0xa4, 0x80, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0x0f, 0x80, 0x10, 0x82, 0xfe, 0xbf, 0x92, 0x52, 0x42, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0x0f, 0x12, 0x42, 0xa8, 0xbf, 0x1f, 0x24, 0x80, 0xa0,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0x8a, 0xf7, 0x37, 0x80,
-   0x52, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x82, 0xe0, 0xff,
-   0x1f, 0x00, 0x20, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28,
-   0xca, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-   0x10, 0x42, 0xf0, 0xfd, 0x1b, 0x00, 0x50, 0xf0, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0x0f, 0xa4, 0x10, 0xc5, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0x0f, 0x00, 0x22, 0xf8, 0xff, 0x0e, 0x00, 0x00, 0xf0,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xaa, 0x88, 0xe2, 0xff, 0x0f, 0x10,
-   0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x25, 0xfa, 0xff,
-   0x0f, 0x01, 0x11, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xfb,
-   0xfb, 0xff, 0x7f, 0x5d, 0xd5, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f};
diff --git a/blt3.0/demos/bitmaps/fish/left.xbm b/blt3.0/demos/bitmaps/fish/left.xbm
deleted file mode 100644
index 84d3c67..0000000
--- a/blt3.0/demos/bitmaps/fish/left.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_left_width 16
-#define fc_left_height 16
-#define fc_left_x_hot 8
-#define fc_left_y_hot 8
-static char fc_left_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x04, 0x70, 0x82, 0x8c, 0xe2,
-   0x22, 0x9c, 0x2d, 0x90, 0x2d, 0x80, 0x21, 0x90, 0x22, 0x9c, 0x1c, 0xe3,
-   0x70, 0x82, 0x80, 0x02, 0x00, 0x07, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/left1.xbm b/blt3.0/demos/bitmaps/fish/left1.xbm
deleted file mode 100644
index 077c5c9..0000000
--- a/blt3.0/demos/bitmaps/fish/left1.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_left1_width 16
-#define fc_left1_height 16
-#define fc_left1_x_hot 8
-#define fc_left1_y_hot 8
-static char fc_left1_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x02, 0xe0, 0x14, 0x10, 0x1f,
-   0xd8, 0x14, 0xd8, 0x14, 0x08, 0x10, 0x08, 0x14, 0xd0, 0x14, 0x70, 0x1e,
-   0x60, 0x13, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/left1m.xbm b/blt3.0/demos/bitmaps/fish/left1m.xbm
deleted file mode 100644
index c05c9b0..0000000
--- a/blt3.0/demos/bitmaps/fish/left1m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_left1m_width 16
-#define fc_left1m_height 16
-#define fc_left1m_x_hot 8
-#define fc_left1m_y_hot 8
-static char fc_left1m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x03, 0xe0, 0x17, 0xf0, 0x1f,
-   0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x1f, 0xf0, 0x1f,
-   0xe0, 0x13, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/leftm.xbm b/blt3.0/demos/bitmaps/fish/leftm.xbm
deleted file mode 100644
index 5b58736..0000000
--- a/blt3.0/demos/bitmaps/fish/leftm.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_leftm_width 16
-#define fc_leftm_height 16
-#define fc_leftm_x_hot 8
-#define fc_leftm_y_hot 8
-static char fc_leftm_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x07, 0xf0, 0x83, 0xfc, 0xe3,
-   0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfc, 0xe3,
-   0xf0, 0x83, 0x80, 0x03, 0x00, 0x07, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/mid.xbm b/blt3.0/demos/bitmaps/fish/mid.xbm
deleted file mode 100644
index e7a3c6e..0000000
--- a/blt3.0/demos/bitmaps/fish/mid.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_mid_width 16
-#define fc_mid_height 16
-#define fc_mid_x_hot 8
-#define fc_mid_y_hot 8
-static char fc_mid_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x40, 0x04, 0x20, 0x08,
-   0xe0, 0x0e, 0xe0, 0x0e, 0x20, 0x08, 0xa0, 0x0b, 0xe0, 0x0f, 0xa0, 0x0b,
-   0x40, 0x04, 0x80, 0x03, 0x80, 0x03, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/midm.xbm b/blt3.0/demos/bitmaps/fish/midm.xbm
deleted file mode 100644
index 227afe2..0000000
--- a/blt3.0/demos/bitmaps/fish/midm.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_midm_width 16
-#define fc_midm_height 16
-#define fc_midm_x_hot 8
-#define fc_midm_y_hot 8
-static char fc_midm_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f,
-   0xe0, 0x0f, 0xe0, 0x0f, 0xe0, 0x0f, 0xe0, 0x0f, 0xe0, 0x0f, 0xe0, 0x0f,
-   0xc0, 0x07, 0x80, 0x03, 0x80, 0x03, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/right.xbm b/blt3.0/demos/bitmaps/fish/right.xbm
deleted file mode 100644
index 4fb6b80..0000000
--- a/blt3.0/demos/bitmaps/fish/right.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_right_width 16
-#define fc_right_height 16
-#define fc_right_x_hot 8
-#define fc_right_y_hot 8
-static char fc_right_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x20, 0x03, 0x41, 0x0e, 0x47, 0x30,
-   0x39, 0x44, 0x09, 0xb4, 0x01, 0xb4, 0x09, 0x84, 0x39, 0x44, 0xc7, 0x38,
-   0x41, 0x0e, 0x40, 0x01, 0xe0, 0x00, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/right1.xbm b/blt3.0/demos/bitmaps/fish/right1.xbm
deleted file mode 100644
index 7858fa5..0000000
--- a/blt3.0/demos/bitmaps/fish/right1.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_right1_width 16
-#define fc_right1_height 16
-#define fc_right1_x_hot 8
-#define fc_right1_y_hot 8
-static char fc_right1_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x03, 0x28, 0x07, 0xf8, 0x08,
-   0x28, 0x1b, 0x28, 0x1b, 0x08, 0x10, 0x28, 0x10, 0x28, 0x0b, 0x38, 0x0e,
-   0xc8, 0x06, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/right1m.xbm b/blt3.0/demos/bitmaps/fish/right1m.xbm
deleted file mode 100644
index 75cda36..0000000
--- a/blt3.0/demos/bitmaps/fish/right1m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_right1m_width 16
-#define fc_right1m_height 16
-#define fc_right1m_x_hot 8
-#define fc_right1m_y_hot 8
-static char fc_right1m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x03, 0xe8, 0x07, 0xf8, 0x0f,
-   0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x0f, 0xf8, 0x0f,
-   0xc8, 0x07, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/fish/rightm.xbm b/blt3.0/demos/bitmaps/fish/rightm.xbm
deleted file mode 100644
index 4f8ee37..0000000
--- a/blt3.0/demos/bitmaps/fish/rightm.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define fc_rightm_width 16
-#define fc_rightm_height 16
-#define fc_rightm_x_hot 8
-#define fc_rightm_y_hot 8
-static char fc_rightm_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0xe0, 0x03, 0xc1, 0x0f, 0xc7, 0x3f,
-   0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc7, 0x3f,
-   0xc1, 0x0f, 0xc0, 0x01, 0xe0, 0x00, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/greenback.xbm b/blt3.0/demos/bitmaps/greenback.xbm
deleted file mode 100644
index f54211c..0000000
--- a/blt3.0/demos/bitmaps/greenback.xbm
+++ /dev/null
@@ -1,885 +0,0 @@
-#define greenback_width 499
-#define greenback_height 210
-static char greenback_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x44,
- 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x09,0x10,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
- 0x20,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x00,0x40,0x00,
- 0x08,0x20,0x20,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x10,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x11,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x48,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x20,0x02,0x04,
- 0x48,0x10,0x02,0x01,0x01,0x09,0x00,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,
- 0x22,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x04,0x48,0x10,0x01,
- 0x41,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x10,0x40,0x00,0x00,0x00,
- 0x40,0x00,0x02,0x08,0x48,0x00,0x02,0x80,0x20,0x00,0x00,0x80,0x04,0x00,0x00,
- 0x01,0x40,0x00,0x00,0x04,0x10,0x00,0x44,0x00,0x00,0x00,0x10,0x14,0x22,0x54,
- 0xa4,0xb6,0xf7,0xfe,0x6f,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0x9f,0xaa,0xd9,
- 0x95,0xef,0xfe,0xba,0xda,0xd7,0x56,0x77,0xaf,0x56,0x7d,0x81,0x50,0x45,0x15,
- 0xc9,0x00,0x00,0x00,0x6d,0xb5,0xd3,0x95,0xab,0xaa,0x35,0xad,0xaa,0x4a,0x29,
- 0x40,0x92,0x40,0x80,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x20,0x11,0x22,0x12,0x00,0x21,0x25,0x55,0xa8,0xa4,0x54,0xa9,0xaa,0x92,0x7e,
- 0x6f,0x7b,0xed,0xbe,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x88,0x00,0x42,0xa4,0x00,0x08,
- 0x41,0x00,0x00,0x01,0x00,0x81,0x80,0xa4,0x54,0x5b,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x08,0x00,0x10,0xfd,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xbb,0xf7,0x80,0x84,
- 0x28,0x22,0x00,0x06,0x14,0x0c,0x68,0x04,0x08,0x80,0xf7,0xf7,0xfd,0xff,0xbf,
- 0xfb,0xff,0xf3,0xff,0xff,0xbb,0xea,0xef,0xbb,0xbf,0x00,0x00,0x00,0xdd,0xbf,
- 0xfe,0xbf,0xfe,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xef,0xe7,0x8a,0x5a,
- 0x82,0x92,0xb4,0x40,0x48,0x40,0x7f,0x7b,0x54,0x3e,0x02,0x06,0x00,0x07,0x00,
- 0x00,0x0c,0x06,0x03,0x23,0x08,0x1e,0x30,0x8e,0xe1,0x84,0x08,0x0e,0xe7,0xbf,
- 0xbe,0xef,0x7b,0xf5,0xda,0xb5,0xbd,0x5f,0xbf,0xff,0xee,0xae,0xbf,0x00,0x00,
- 0x00,0xf5,0x5d,0x9f,0xdf,0xdf,0xff,0xff,0xef,0xbf,0x63,0xeb,0xfe,0xbf,0xd6,
- 0xe5,0xc0,0x18,0x1c,0x83,0xc1,0xe0,0x38,0x1a,0x3c,0xf0,0x81,0x3f,0x18,0x18,
- 0x1c,0x83,0x7f,0xf0,0x1c,0x06,0x02,0x77,0x78,0x3e,0x61,0x83,0x43,0x82,0x19,
- 0x2c,0x67,0xd5,0x6f,0x53,0xb7,0xdd,0xff,0xe5,0x67,0xed,0xee,0xae,0xe7,0x7d,
- 0xab,0x08,0x00,0x00,0xbd,0xdf,0xaf,0x7f,0xbb,0xfd,0xee,0xcf,0xfb,0xdf,0xbf,
- 0xff,0xfd,0xfb,0xe7,0xc1,0x19,0x2c,0x87,0xc1,0x61,0x3b,0x1c,0x1c,0xf0,0xc1,
- 0x7f,0x38,0x38,0x6c,0x01,0xf0,0xa0,0x1d,0x06,0x06,0x7f,0xc8,0x7f,0xc0,0x83,
- 0xc3,0x96,0x9b,0xf0,0xe7,0xfe,0xdd,0xdd,0xfd,0xdf,0xae,0xa4,0xbb,0xba,0xbf,
- 0xdd,0x77,0xff,0xbb,0x00,0x00,0x00,0xf5,0x6e,0xaf,0x6f,0xfe,0x5f,0xfb,0xd7,
- 0xbf,0x7b,0xff,0x4e,0x77,0xef,0xe5,0x01,0x1e,0xe2,0x87,0xc3,0x21,0x3f,0x80,
- 0xdf,0xe0,0xe1,0xff,0x00,0x3e,0xe4,0x03,0x60,0x10,0x3f,0x82,0x0f,0x7a,0xd0,
- 0xfe,0x01,0x83,0xc3,0x87,0x1f,0x6c,0xe7,0x5b,0x7f,0xbf,0xb7,0xad,0x7b,0xe6,
- 0xad,0x6a,0xd7,0xfb,0xcd,0xbe,0xbd,0x20,0x00,0x24,0x5d,0xbf,0xb6,0x5f,0xdd,
- 0x57,0xfd,0x95,0xff,0xf7,0xdb,0xbd,0xbf,0xde,0xe7,0xc1,0x9e,0x6c,0x87,0xc1,
- 0x61,0x3b,0x08,0x2e,0xe0,0xe1,0x7f,0x18,0x3c,0x6c,0x17,0x60,0xa2,0x1d,0x06,
- 0x0f,0x3c,0x78,0x7e,0x03,0x83,0xc3,0x03,0x1f,0x3c,0xf7,0xfe,0xdb,0xfb,0xee,
- 0xff,0x7f,0xe6,0xdf,0xf7,0xf6,0x76,0xcb,0xbe,0xbd,0x02,0x00,0x00,0xf5,0x7b,
- 0x33,0xb5,0x5e,0xeb,0x57,0x97,0xdf,0xb5,0x7f,0xff,0xb5,0x5f,0xe3,0xc0,0x1f,
- 0x1c,0x83,0xc1,0xe0,0x38,0x18,0xe6,0xc0,0x61,0x3c,0x10,0x18,0x0c,0xf3,0x70,
- 0x30,0x0c,0x24,0x1e,0x1e,0x08,0x1e,0x46,0x8f,0xf1,0x03,0x86,0x04,0xa7,0xdd,
- 0xb6,0xfe,0xba,0xaf,0x7f,0x67,0xf7,0xdf,0xbf,0xdb,0xdb,0x7f,0xbe,0x00,0x00,
- 0x00,0xdd,0xfc,0xaa,0x2e,0xff,0xfa,0xff,0x27,0x7f,0x7b,0xb3,0x77,0x7b,0xdb,
- 0x67,0x10,0x06,0x00,0x49,0xba,0x2a,0x08,0x25,0x80,0x00,0x84,0x2c,0x64,0x00,
- 0x50,0x57,0xbf,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xe7,0xfe,0xea,0xff,0xb3,0xff,0x6f,0xd7,0xfa,0xb5,0xf6,0xeb,0x9a,0x9f,
- 0xb6,0x20,0x00,0x00,0xbd,0x79,0x3b,0xb6,0xde,0xde,0xdb,0x35,0xef,0xf6,0x5d,
- 0xf7,0xdb,0x7e,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xbf,0x47,0x6d,0xff,0xba,
- 0xff,0xdb,0x97,0xbe,0x08,0x00,0x00,0xcd,0xf6,0xb6,0xae,0xad,0xf7,0x76,0x35,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xa7,0x56,0x7b,0x55,0x92,0x52,0x40,0x22,0x01,
- 0x08,0xa4,0x54,0x4a,0x01,0x12,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0xe0,0xe7,
- 0xd6,0xef,0xe7,0x91,0x35,0x57,0xbe,0x00,0x00,0x00,0xfd,0xe6,0x3c,0xf7,0x5a,
- 0xfc,0xcf,0x32,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x01,
- 0x00,0x00,0x42,0x04,0xb5,0xd2,0xaa,0xfa,0xef,0xff,0xf7,0xf7,0xbd,0x55,0xdd,
- 0xb6,0xad,0xc7,0xf3,0xfe,0xfe,0xe3,0x9d,0x6b,0xbe,0x00,0x00,0x40,0xdd,0xde,
- 0x77,0x8e,0xc5,0x7f,0xaf,0x5f,0xf2,0xff,0xff,0xff,0xff,0xbf,0xed,0x75,0xab,
- 0xd6,0x5a,0x55,0x8b,0x54,0x55,0xa9,0xab,0xaa,0xaa,0xaa,0x00,0x02,0x08,0x80,
- 0x10,0x10,0x00,0x84,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xa2,0xd3,0xfd,0x4b,0x49,0x40,0x77,0x7f,0xbe,0x02,0x00,
- 0x00,0xfd,0xd6,0xbd,0x81,0xb6,0xfd,0xaf,0x3b,0x02,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x04,0x20,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0xe7,0x74,0x01,0x00,0x04,0x00,0x20,
- 0xbe,0x00,0x00,0x08,0xed,0xaa,0x7d,0x48,0x1d,0xee,0x6f,0x7e,0x36,0x40,0x80,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x04,0x00,0x00,0x00,0x41,0x20,0x84,0x00,0x02,0x00,0x00,0x08,0x10,0x00,0x20,
- 0x42,0x02,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x55,0xf7,0xa7,0xad,
- 0xfe,0x6d,0x79,0xbf,0x40,0x00,0x00,0xfd,0x96,0x3d,0x82,0xeb,0xba,0x7f,0x2b,
- 0x15,0x02,0x21,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x24,0x22,0x00,
- 0x00,0x00,0x00,0x28,0x00,0x42,0x00,0x00,0x02,0x00,0x00,0x00,0x11,0x00,0x00,
- 0x00,0x44,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x21,0xb0,0x67,
- 0xa7,0xe7,0xff,0xf7,0xff,0x1b,0xbf,0x00,0x00,0x00,0xed,0xb4,0x0d,0xfc,0x14,
- 0xf4,0xed,0x7c,0x82,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80,0x80,0x24,
- 0x00,0x00,0x04,0x01,0x00,0x20,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x40,0x00,
- 0x00,0x02,0x00,0x08,0x00,0x02,0x80,0x10,0x80,0x40,0x04,0x11,0x20,0x40,0x10,
- 0x08,0xa9,0xad,0xe5,0xb7,0xff,0x7b,0xff,0x5a,0xb3,0x08,0x00,0x00,0xdd,0x2a,
- 0x01,0x7f,0xff,0xe9,0xef,0xb8,0x0a,0x00,0x00,0x20,0x00,0x00,0x04,0x00,0x08,
- 0x20,0x08,0x80,0x08,0x00,0x40,0x00,0x40,0x00,0x00,0x09,0x01,0x20,0x00,0x00,
- 0x10,0x00,0x00,0xc0,0x40,0x42,0x02,0x0a,0xa8,0x60,0xeb,0x7f,0x5a,0x1b,0xd5,
- 0xa1,0x0a,0x0c,0x00,0xa5,0xaf,0x53,0xb3,0xde,0xfa,0x57,0xdb,0xbf,0x00,0x00,
- 0x20,0xfd,0x4a,0x93,0x6f,0xf7,0xc9,0xaf,0x78,0x03,0x40,0x24,0x8a,0x02,0x40,
- 0x01,0x25,0x21,0x15,0xa5,0x02,0x52,0x49,0x05,0xad,0x00,0x80,0x11,0x52,0x42,
- 0x41,0xb5,0xfd,0x17,0xbd,0x07,0x10,0x45,0x95,0x00,0x10,0x00,0x49,0x55,0xd1,
- 0xea,0x4a,0xfd,0xc8,0x16,0x28,0x00,0xda,0x7d,0xe5,0x52,0xff,0xb3,0x7f,0xd2,
- 0xbb,0x00,0x00,0x08,0xad,0x1a,0xc8,0xdb,0xef,0x87,0xaf,0xb8,0x2e,0xf8,0xff,
- 0x3f,0x3f,0x3f,0x17,0xf0,0x79,0x5e,0xcf,0xf7,0xff,0xbc,0x9e,0xdf,0x04,0x68,
- 0xfe,0xff,0x87,0xe1,0xef,0x78,0x5c,0x8c,0x0b,0x34,0x16,0x8e,0x0b,0x5c,0xf6,
- 0xf2,0xc0,0xe1,0xf2,0x78,0x79,0x74,0x5c,0x5c,0x00,0xe5,0xff,0xe2,0x79,0xdf,
- 0xcc,0xb7,0xe7,0xbf,0x00,0x00,0x00,0xfd,0x65,0xe4,0x7f,0xfe,0x1e,0xaf,0x7d,
- 0x0b,0x78,0x67,0x3c,0x1e,0x3e,0x07,0xf8,0x60,0xbe,0x86,0xf7,0xef,0x38,0x5c,
- 0x1e,0x0b,0x70,0x9c,0xbb,0xc7,0xe5,0xde,0x71,0x9c,0x07,0x03,0x3d,0xae,0x8e,
- 0x43,0x98,0xf8,0xe5,0xd9,0xe9,0xf4,0x78,0x7a,0x7a,0x4a,0x1c,0x00,0x6d,0x3f,
- 0x13,0x38,0xa9,0xf9,0xad,0x85,0xb6,0x09,0x00,0x00,0x5d,0x69,0x75,0xb3,0xd4,
- 0x9b,0x0e,0xbb,0x01,0xb8,0xef,0xbc,0x9e,0x9c,0x6e,0xf0,0x29,0x3d,0xa1,0x77,
- 0xce,0x38,0x1b,0x1e,0x2f,0x3c,0xb1,0x79,0xd3,0x73,0xce,0x70,0x3e,0xe7,0x36,
- 0x9c,0x5e,0x4f,0x13,0x3e,0xe2,0xe9,0xf4,0xe9,0xf4,0xfe,0x7a,0x3a,0x95,0xbe,
- 0x41,0xb9,0x5d,0x30,0xdf,0x76,0xb7,0xd7,0x1f,0xf6,0x00,0x00,0x04,0xad,0x12,
- 0xb2,0x7e,0xbe,0x39,0xae,0x71,0x08,0x10,0xe7,0x3e,0x9e,0x9c,0xa6,0xf0,0x34,
- 0x7d,0x94,0x33,0xcf,0x38,0x5c,0x9f,0x4f,0x78,0xbd,0x39,0xd6,0x63,0x9e,0x79,
- 0x18,0x4f,0x27,0x1d,0x9f,0x8e,0x12,0x3e,0xf1,0xe9,0xec,0xd9,0xfc,0x7c,0x3a,
- 0x3e,0xcb,0x3d,0x02,0x7a,0x5b,0xa5,0xff,0xfc,0x08,0x4e,0x7f,0xbf,0x00,0x00,
- 0x00,0xbd,0x37,0xb9,0xda,0x5e,0xea,0x4c,0x73,0x05,0x99,0x67,0xbc,0x9f,0x9e,
- 0x26,0xf0,0x8c,0xfa,0xb0,0x37,0xcf,0x3c,0x8b,0x1e,0xcf,0xfc,0x85,0x78,0xd7,
- 0x73,0x4f,0x71,0x0a,0xff,0x10,0x9e,0x3f,0x4e,0x33,0x39,0xd3,0xe3,0xc5,0x59,
- 0xf8,0x7a,0x7e,0x3d,0x41,0x78,0x02,0xe6,0xbe,0xe2,0xb7,0x70,0xa5,0xe6,0xbb,
- 0xb7,0x00,0x00,0x00,0xdd,0x2d,0x3d,0xb7,0xfa,0x79,0xcd,0xb3,0x28,0x54,0x6f,
- 0x3e,0x9e,0xdc,0x6a,0xf0,0x2e,0xf1,0xd0,0x27,0xcf,0x3c,0x4b,0x9f,0x8f,0xf8,
- 0x9f,0x3c,0xa5,0x27,0xdf,0x78,0x83,0xff,0x33,0x3e,0x9f,0x7e,0x10,0x78,0xd2,
- 0xeb,0xec,0x1f,0xfb,0x3e,0x79,0x7c,0xd3,0x78,0x06,0x6a,0x5d,0x62,0xfa,0x6c,
- 0x00,0xb6,0x97,0xbf,0x00,0x00,0x00,0xbd,0x9b,0x5c,0x7a,0x5f,0xf6,0x5a,0x33,
- 0x0d,0x40,0x47,0xbc,0x9e,0xdc,0x24,0xf0,0x84,0xe2,0x93,0x93,0x9e,0xb8,0x53,
- 0x1f,0x5f,0xf0,0xff,0x7a,0x05,0xa7,0x8e,0x74,0xd3,0xfe,0x17,0x9f,0x3e,0x6f,
- 0xae,0xf1,0x8d,0xe7,0xc4,0xd9,0xf4,0x9c,0x7d,0x3d,0xb5,0x7c,0x04,0xec,0x59,
- 0x73,0x9f,0x39,0x00,0xd7,0x9d,0xbd,0x10,0x00,0x08,0xad,0x4e,0xbe,0x1d,0x50,
- 0xdd,0xb1,0x5b,0x06,0xa0,0x2f,0x3f,0x9e,0x9c,0x28,0xf0,0x24,0xdb,0xb3,0x77,
- 0x4f,0x3a,0x21,0x9e,0xcf,0x88,0x3f,0x3a,0x89,0xaf,0xce,0x75,0x3a,0xa0,0x07,
- 0x9e,0x9e,0x4e,0x81,0xfa,0x94,0xf7,0xec,0x89,0xf0,0x78,0x38,0x3e,0x19,0xf0,
- 0x04,0x54,0x57,0x33,0xfd,0x06,0x00,0xeb,0xaf,0xbb,0x04,0x00,0x00,0xfd,0x4f,
- 0xce,0xd5,0xcb,0xfa,0x35,0x13,0x0d,0x81,0x47,0x3c,0x9f,0x3c,0x0c,0xf2,0x24,
- 0xe1,0xd3,0xa7,0xce,0x3c,0x14,0x9e,0x8e,0x04,0x3c,0x79,0x52,0x2f,0x0f,0x79,
- 0x00,0x82,0x27,0x3d,0x9f,0x4e,0x86,0xf0,0xcc,0xe7,0xcd,0xc9,0xf2,0x7a,0x7b,
- 0x39,0x91,0xe1,0x09,0x95,0xa7,0xb6,0xfb,0x11,0x10,0x6e,0x47,0xbf,0x00,0x00,
- 0x00,0x5d,0xa3,0xdf,0x09,0xc0,0xad,0x77,0xab,0x06,0x88,0x67,0xbe,0x9e,0x9e,
- 0x4e,0xf0,0x8d,0x92,0xab,0x17,0x4f,0x38,0x39,0x1f,0x4f,0xd8,0x3a,0x3d,0x0d,
- 0x5e,0xde,0x70,0xba,0x79,0x66,0x9e,0x9e,0xce,0xc3,0xe4,0x99,0xf3,0xc4,0xfb,
- 0xf4,0x7a,0x7e,0x7a,0xc6,0xfc,0x09,0xd8,0x6a,0xbd,0x5e,0x0f,0x01,0xdf,0x65,
- 0xbf,0x00,0x00,0x00,0xfd,0x27,0xd7,0x06,0xd0,0xf7,0xeb,0x0a,0x2a,0x85,0x27,
- 0xbc,0x1e,0xbd,0x4e,0xf0,0x24,0xb3,0xd3,0x13,0xcf,0x3c,0x9f,0x9e,0xcf,0x98,
- 0x32,0x7b,0xca,0x9e,0x9e,0x75,0x1e,0x53,0x47,0x3c,0x8f,0x8e,0xa2,0xee,0x91,
- 0xea,0xd5,0xe9,0xf8,0x7c,0x79,0x76,0xca,0xf0,0x09,0x30,0x75,0x9b,0xfa,0x1e,
- 0x80,0xb6,0x57,0xbb,0x00,0x00,0x00,0xbd,0x65,0xfb,0x09,0xd0,0x5d,0xf7,0x62,
- 0x07,0xa0,0x6f,0x3d,0x9f,0x1e,0x4f,0xe0,0x09,0x47,0xd3,0xb7,0x9f,0xba,0x3c,
- 0x1e,0xa3,0x38,0x3b,0x7d,0x1a,0x9d,0x1f,0x79,0xbe,0xcf,0x31,0x34,0xe7,0x7f,
- 0xf8,0xf5,0x7b,0xf9,0xfa,0xab,0x74,0xf5,0xac,0xec,0xb1,0x96,0x32,0x60,0xaf,
- 0xed,0x54,0xbf,0x00,0xdf,0xd2,0xbf,0x12,0x00,0x00,0xed,0x96,0x6b,0x82,0xc0,
- 0xb7,0x4e,0xa2,0x85,0xa0,0x1f,0xff,0xbf,0xbf,0x8f,0xd0,0x8b,0x1f,0xe6,0xaf,
- 0xbf,0x7e,0x9f,0xdf,0x51,0xfc,0x8c,0xfd,0x5e,0x7f,0x7f,0xfd,0x1a,0xbf,0x28,
- 0xa4,0x21,0x84,0x00,0x09,0x80,0x01,0x00,0x00,0x00,0x04,0x00,0x12,0x00,0x00,
- 0x10,0x61,0x9a,0x7d,0xb6,0x2d,0x10,0x77,0x99,0xbb,0x00,0x00,0x08,0xad,0x93,
- 0xd6,0x24,0xd8,0xfd,0xf5,0xd5,0x25,0x20,0x40,0x00,0x00,0x00,0x40,0x00,0x60,
- 0x40,0x10,0x00,0x00,0x02,0x80,0x00,0x2c,0x00,0x20,0x02,0x80,0x00,0x00,0x02,
- 0x00,0x01,0x14,0x10,0xd0,0x28,0x61,0x50,0x55,0xbe,0xaf,0xba,0xae,0x95,0xb6,
- 0x4d,0x7e,0x6b,0x37,0x40,0x6a,0x9f,0xed,0xbd,0x00,0xbf,0xeb,0xb7,0x00,0x00,
- 0x00,0xfd,0x92,0xfd,0x01,0xe0,0x1f,0x6d,0x97,0x05,0x44,0xa5,0x2a,0xa0,0xaa,
- 0x52,0xc0,0xa0,0x52,0xb4,0x52,0x4a,0x69,0x55,0x15,0x29,0x20,0x68,0x00,0x84,
- 0x24,0xa9,0x55,0xf7,0x4a,0x0b,0x90,0x2c,0x57,0x81,0x47,0x55,0x61,0x55,0xeb,
- 0x52,0xeb,0xda,0xa6,0x45,0xad,0xea,0x80,0x59,0x8c,0x6a,0x37,0x00,0xfb,0x7b,
- 0xbe,0x10,0x00,0x00,0xfd,0xa9,0xb3,0x0f,0xd0,0xab,0xdd,0xe9,0x0a,0x00,0x5b,
- 0xd5,0xaf,0x5a,0xad,0x00,0x5d,0xac,0x28,0x6d,0xb4,0x52,0x55,0x55,0x0b,0xc0,
- 0x17,0xf8,0xb5,0xea,0x6a,0x53,0x4d,0xb9,0x02,0x40,0x05,0x54,0x02,0x95,0xaa,
- 0x4a,0xad,0x2a,0x45,0x15,0xa5,0x0a,0x02,0x83,0x04,0x08,0xff,0x4d,0xb1,0x9f,
- 0x00,0x5e,0x41,0xbd,0x00,0x00,0x00,0xad,0xd9,0xcf,0x06,0xf2,0x53,0xee,0x6d,
- 0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xa8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,
- 0x4e,0x6a,0x3d,0x88,0xab,0x35,0xb6,0x00,0x00,0x00,0x7d,0xa9,0xbd,0x13,0xc0,
- 0x09,0xd3,0x7a,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x02,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x00,
- 0x10,0x05,0x78,0x35,0x6d,0xb7,0x00,0x1e,0x2d,0xb7,0x08,0x00,0x00,0x9d,0xa9,
- 0x3f,0x06,0xd0,0x7c,0xa2,0x6b,0x10,0x90,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x20,
- 0x08,0x00,0x00,0x00,0x80,0x42,0x00,0x00,0x00,0x20,0x00,0x00,0x80,0x00,0x00,
- 0x00,0x00,0x20,0x00,0x18,0x62,0xfd,0xf2,0xb0,0x80,0xe2,0xc9,0xbb,0x00,0x00,
- 0x20,0xdd,0xa8,0xb6,0x15,0xf2,0x1d,0xf2,0xbe,0x82,0x00,0x20,0x00,0x00,0x00,
- 0x00,0x80,0x00,0x00,0x02,0x00,0x04,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x10,0x00,0x02,0x02,0x80,0x10,0x08,0x00,0x00,0x11,0x00,0x04,0x41,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x90,0xc8,0xec,0xf5,0x35,0x20,0xf7,0xe9,
- 0xbd,0x00,0x00,0x04,0xbd,0xa9,0xaf,0x85,0xc0,0x35,0xd4,0x54,0x28,0x80,0x00,
- 0x10,0x11,0x01,0x04,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x10,0x40,0x20,0x22,0x80,0x00,0x00,0x40,0x00,0x21,
- 0x01,0x00,0x00,0x08,0x20,0x04,0x88,0x08,0x02,0x00,0xbc,0xe5,0x1f,0xf1,0xbd,
- 0x08,0x6b,0xe9,0xbf,0x22,0x00,0x00,0xdc,0x98,0xb7,0x17,0xd8,0x7d,0xae,0xad,
- 0x02,0x20,0x00,0x04,0x00,0x20,0x01,0x10,0x00,0x00,0x00,0x24,0x00,0x49,0x00,
- 0x00,0x00,0x22,0x04,0x80,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x40,
- 0x10,0x00,0x00,0x00,0x20,0x84,0x80,0x00,0x80,0x00,0x00,0x20,0x04,0x64,0x92,
- 0x1d,0x65,0x2d,0x00,0xde,0x65,0xb5,0x00,0x00,0x00,0xdd,0x28,0xfb,0x07,0xc0,
- 0xfb,0x6c,0x23,0x5a,0x08,0x20,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x00,
- 0x10,0x00,0x00,0x10,0x20,0x00,0x20,0x02,0x10,0x00,0x40,0x80,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x40,0xb8,0xa7,0xdb,0xf3,0xb6,0x80,0x66,0xf1,0xbb,0x08,0x00,0x00,0x7d,0x4c,
- 0x5f,0x17,0xd0,0x5b,0xe4,0x00,0x20,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x20,0x02,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,
- 0x00,0x44,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x40,0x10,
- 0x00,0x00,0x00,0x00,0x68,0x55,0xda,0xe3,0x1e,0x00,0xdf,0xf5,0xbd,0x00,0x00,
- 0x00,0x9d,0x58,0xf7,0x82,0xd0,0x9f,0x2d,0x9f,0x97,0x06,0x00,0x00,0x38,0x15,
- 0x62,0x1f,0x9f,0xfc,0x8a,0xcb,0xbe,0x87,0x20,0x00,0x00,0x00,0x00,0x40,0x00,
- 0x00,0x00,0x10,0x90,0x00,0x22,0x0a,0x09,0x92,0x10,0x84,0x20,0x00,0x80,0x10,
- 0x00,0x04,0x00,0x20,0x82,0x08,0x00,0xc0,0x75,0xeb,0x62,0xbd,0x00,0x5a,0x75,
- 0xb7,0x02,0x00,0x00,0xed,0xc8,0x94,0x15,0xe4,0x55,0xc9,0x3c,0x10,0x8c,0x00,
- 0x00,0x90,0x35,0x0e,0x09,0x8d,0xd4,0x0b,0xe9,0xaa,0x23,0x00,0xa0,0x2a,0xad,
- 0x57,0x09,0x8a,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
- 0x00,0x24,0x04,0x44,0x00,0x00,0x08,0x20,0x00,0x02,0x00,0xde,0xae,0xe7,0x3a,
- 0x88,0xd7,0x9b,0xbf,0x10,0x00,0x00,0x7d,0xd8,0x2c,0x04,0xd0,0x58,0xab,0x77,
- 0xa0,0x0c,0x00,0x00,0x41,0x00,0x26,0x2b,0x89,0x71,0x0d,0x81,0x9a,0x13,0x00,
- 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x48,0xa5,0xa2,0x4a,0x45,0x00,
- 0x84,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x20,0x70,
- 0xcd,0x62,0xad,0x00,0x4b,0xb5,0xbb,0x0a,0x00,0x00,0x9d,0xa8,0xb1,0x07,0xe0,
- 0xbb,0xca,0x99,0xd2,0x11,0x04,0x10,0x00,0x14,0x00,0x10,0x00,0x00,0x40,0x00,
- 0x00,0x00,0x01,0x40,0xc7,0x9f,0x7c,0xef,0x87,0xff,0xff,0xe3,0x97,0xbd,0xfc,
- 0xe5,0x02,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x40,
- 0x00,0x42,0xa0,0xff,0xe3,0x1d,0x00,0xb6,0x5b,0xbd,0x00,0x00,0x00,0x6c,0x1c,
- 0xdb,0x15,0xd1,0xbb,0xd1,0xf6,0x85,0x3b,0x00,0x01,0x00,0x80,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x33,0x1f,0x34,0xeb,0xf1,0xff,0xff,0x8f,
- 0x77,0x5d,0xfd,0xd0,0x05,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x00,0x01,0x80,
- 0x00,0x00,0x02,0x40,0x80,0x6a,0xbb,0x73,0xb6,0x90,0xae,0xf3,0xbf,0x00,0x00,
- 0x00,0xfd,0x88,0xea,0x07,0xd0,0xfb,0xe9,0xa9,0xa2,0x6e,0x00,0x10,0x11,0x01,
- 0x08,0x25,0x00,0x02,0x42,0x10,0x2a,0x09,0x0c,0x40,0xfd,0xe0,0xb7,0x7f,0xfe,
- 0xff,0xff,0x7f,0xfc,0xcb,0x27,0xbf,0x04,0x80,0x10,0x04,0x20,0x00,0x08,0x00,
- 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xd6,0xee,0xf3,0x3d,0x00,0xab,0x93,
- 0xbf,0x00,0x00,0x00,0x6d,0x58,0xd8,0x05,0xc4,0xdd,0xab,0xe2,0x4f,0x7f,0x02,
- 0xb7,0xa5,0xc4,0xed,0x37,0x3e,0xd6,0x67,0x72,0x6c,0xab,0x0f,0x49,0xeb,0xe5,
- 0xd7,0x1b,0xff,0xff,0xff,0xff,0xd1,0xeb,0xcf,0xbf,0x05,0x00,0x00,0x00,0x04,
- 0x00,0x80,0x10,0x10,0x00,0x00,0x08,0x08,0x00,0x00,0x00,0xb8,0x5d,0x73,0x97,
- 0x00,0xde,0x73,0xb5,0x02,0x00,0x40,0x6d,0x32,0x7f,0x97,0xd0,0x7b,0xeb,0xcd,
- 0xf2,0x5a,0x00,0x8e,0x61,0xc4,0xed,0x32,0x9e,0x52,0xa1,0x56,0x7c,0x2d,0x0d,
- 0x00,0x3f,0xeb,0xf9,0xe7,0xff,0xff,0xff,0xff,0x47,0xdf,0xaa,0xee,0x02,0x00,
- 0x44,0x80,0x00,0x40,0x20,0x00,0x02,0x20,0x00,0x80,0x00,0x20,0x00,0x00,0x42,
- 0xb7,0xf9,0xbe,0x90,0xee,0xf3,0xbf,0x20,0x00,0x10,0x7c,0x30,0xbe,0x07,0xd2,
- 0xff,0xd3,0xc2,0xc7,0xf5,0x20,0xab,0x71,0x44,0xa5,0x02,0x24,0x96,0x65,0x54,
- 0x42,0x65,0x05,0x40,0xc3,0xee,0xf7,0xe2,0xff,0x7f,0xf5,0xff,0x9f,0xb5,0xab,
- 0x83,0x01,0x09,0x00,0x20,0x00,0x08,0x04,0x10,0x40,0x02,0x00,0x00,0x40,0x08,
- 0x00,0x10,0xa0,0xfb,0xd9,0x2a,0x04,0xf7,0xa2,0xbd,0x08,0x00,0x00,0xfd,0x5a,
- 0xbc,0x04,0xf0,0xda,0xeb,0x94,0x0d,0x68,0x00,0x22,0x08,0xca,0x64,0xb2,0x66,
- 0x52,0x82,0x14,0x40,0x14,0x04,0x00,0x3c,0x6b,0xbd,0xfc,0xff,0x02,0x80,0xff,
- 0x3f,0xbe,0xcd,0x3c,0x02,0x80,0x40,0x08,0x00,0x02,0x00,0x00,0x00,0x80,0x88,
- 0x00,0x08,0x00,0x08,0x00,0xb4,0xee,0xf9,0xb6,0xa0,0xea,0xe7,0xb7,0x02,0x00,
- 0x00,0xcd,0x30,0xbd,0x17,0xd1,0x2c,0xaa,0xe5,0x27,0x80,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x43,0x77,0x3d,0xff,0x0b,
- 0x0a,0x21,0xfc,0xff,0x68,0xef,0x80,0x00,0x00,0x10,0x00,0x80,0x80,0x00,0x08,
- 0x42,0x08,0x00,0x08,0x00,0x01,0x00,0x01,0x51,0xfb,0xf9,0xb1,0x00,0xd6,0xe7,
- 0xbe,0x00,0x00,0x00,0xfd,0x68,0xcc,0x06,0xd0,0xfd,0xeb,0x8c,0x0d,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x40,0x80,0xb6,
- 0x16,0xff,0xf5,0x00,0x00,0xf1,0xff,0xf1,0x7a,0x02,0x20,0x00,0x00,0x08,0x20,
- 0x02,0x00,0x20,0x10,0x00,0x01,0x05,0x00,0x28,0x40,0x10,0x8c,0xb5,0x59,0x39,
- 0x90,0x66,0xe5,0xbb,0x00,0x00,0x00,0xad,0xd8,0xbe,0x13,0xd0,0xe7,0xdb,0xe4,
- 0x06,0x12,0x00,0x00,0x09,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80,0x00,0x00,
- 0x88,0x01,0x7a,0xc7,0x7f,0x83,0x90,0x44,0x82,0xff,0xcf,0x6f,0xc3,0x03,0x00,
- 0x00,0xfa,0x80,0x8f,0x3e,0x3e,0xe4,0xd1,0xc7,0x9d,0x3e,0x78,0xc1,0x10,0x60,
- 0xbd,0x6c,0x36,0x82,0xbe,0xcf,0xb5,0x40,0x00,0x04,0xed,0xe8,0xf6,0x07,0xe2,
- 0x4b,0xd9,0xb4,0x87,0x80,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x00,
- 0x11,0x00,0x10,0x40,0x85,0xd6,0xe3,0xbf,0x14,0x00,0x42,0xc0,0xff,0xcf,0x7c,
- 0x23,0x06,0x20,0x10,0xa4,0x80,0x19,0x3a,0x20,0x30,0x43,0x84,0x00,0x22,0xca,
- 0xc0,0x10,0xc5,0xda,0xbc,0x5d,0x00,0x6a,0xdb,0xbb,0x00,0x00,0x20,0x99,0x31,
- 0x57,0x07,0xd0,0xbb,0xee,0xaa,0x0b,0x00,0x08,0x00,0x00,0x00,0x08,0x40,0x20,
- 0x42,0x00,0x10,0x00,0x04,0x00,0x60,0x09,0xfa,0xf8,0xbf,0x89,0x42,0x00,0x01,
- 0xff,0xbf,0x6b,0xd3,0x0a,0x02,0x00,0x09,0x81,0x10,0x03,0x10,0x10,0x22,0x84,
- 0x00,0x60,0x84,0x40,0x10,0x22,0x2c,0x56,0x47,0xad,0xf8,0x9c,0xbd,0x20,0x00,
- 0x00,0xfd,0x32,0xff,0x91,0xd0,0x7f,0x56,0xd8,0x0b,0x00,0x00,0x81,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x01,0x44,0x02,0xde,0xfd,0x9f,0x02,
- 0x04,0x48,0x24,0xff,0x3f,0x7f,0x51,0x8d,0x00,0x00,0x88,0x00,0x18,0x23,0xa0,
- 0x00,0x40,0x86,0x00,0x20,0x48,0xc0,0x18,0x62,0x4a,0xf6,0x03,0x00,0xd0,0x9b,
- 0xbf,0x04,0x00,0x00,0xdc,0xf1,0x75,0x0f,0xd0,0x9f,0x7a,0xb5,0x05,0x10,0x41,
- 0x00,0x40,0x10,0x01,0x08,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x90,0x08,0x7a,
- 0xfe,0x77,0x5c,0x11,0x02,0x01,0xf8,0x7f,0x4e,0x23,0x0d,0x00,0x08,0xd4,0x10,
- 0x0e,0x3c,0x30,0x00,0xc3,0x91,0x1f,0x1c,0x7c,0x40,0x4f,0x08,0x6d,0xab,0xfe,
- 0xff,0xff,0x2a,0xb7,0x00,0x00,0x00,0xfd,0xf1,0xf6,0x03,0xe4,0x66,0x55,0xa0,
- 0x07,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0x00,0x10,0x08,0x00,0x00,0x00,0x80,
- 0xa0,0x88,0x6a,0xfe,0x6b,0x05,0x00,0x40,0x00,0xf4,0x7f,0x5c,0x23,0x09,0x00,
- 0x00,0xf8,0x04,0x16,0x36,0x24,0xc4,0x91,0x86,0x10,0x38,0xd9,0xc0,0x10,0x12,
- 0x15,0xeb,0xff,0xff,0xbf,0x35,0xbf,0x40,0x00,0x00,0xfd,0xa5,0xaf,0x44,0x01,
- 0xef,0x39,0x42,0x05,0x02,0x10,0x40,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x02,
- 0x81,0x00,0x20,0xc0,0x98,0x9e,0xff,0x5a,0x05,0x90,0x10,0x90,0xf0,0xff,0xf9,
- 0x12,0x06,0x00,0x01,0x84,0x80,0x18,0x23,0x20,0x70,0x60,0x04,0x10,0x60,0x84,
- 0xc2,0x10,0x81,0xab,0x5f,0xff,0xff,0xff,0x5e,0xbe,0x00,0x00,0x40,0xac,0xe1,
- 0x6e,0x10,0x80,0xfa,0x3e,0x80,0x03,0x00,0x04,0x00,0x40,0x00,0x00,0x00,0x04,
- 0x02,0x00,0x40,0x00,0x10,0x00,0x00,0x88,0xda,0xbf,0x55,0x50,0x00,0x04,0x22,
- 0xc4,0xff,0xb3,0x32,0x00,0x00,0x00,0x08,0x01,0x10,0x41,0x20,0x10,0x64,0x0c,
- 0x08,0x00,0x84,0x40,0x10,0xd3,0x90,0x7b,0x45,0xa1,0xdd,0x77,0xbe,0x40,0x00,
- 0x08,0x7d,0xe9,0xdf,0xff,0xff,0xff,0x36,0x80,0x01,0x80,0x00,0x00,0x10,0x00,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x48,0xcf,0x7f,0xc6,0x0a,
- 0x14,0x41,0x08,0xc1,0xff,0xe7,0x10,0x00,0x00,0x80,0x88,0x00,0x18,0x23,0x30,
- 0x12,0x20,0x04,0x18,0x61,0xcc,0xc0,0x10,0x75,0x34,0xdf,0x7e,0x55,0xdd,0x3f,
- 0xbe,0x04,0x00,0x02,0xdd,0xe2,0xd7,0xff,0xff,0x6f,0x9d,0x10,0x00,0x20,0x00,
- 0x20,0x00,0x40,0x10,0x40,0x20,0x00,0x24,0x00,0x00,0x00,0x00,0x10,0x48,0xe7,
- 0xaf,0x35,0x05,0x10,0x88,0x41,0x94,0xff,0xcf,0x34,0x80,0x10,0x00,0x7c,0x80,
- 0x0f,0x3e,0xae,0xf0,0xc3,0x83,0x07,0x1e,0x38,0xc0,0x10,0x0b,0x40,0xd4,0xf5,
- 0xfb,0xf7,0x8c,0xbf,0x10,0x00,0x00,0xfa,0xcb,0x3d,0xad,0x7f,0x79,0x0d,0x00,
- 0x00,0x01,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
- 0x04,0x0c,0xf3,0x9f,0x0a,0x01,0x40,0x20,0x04,0x01,0xff,0xcf,0x14,0x00,0x00,
- 0x08,0x68,0x80,0x02,0x0c,0xfc,0xd8,0x02,0x41,0x05,0x14,0x40,0x00,0x00,0x05,
- 0x80,0xc9,0xea,0xde,0xda,0xc0,0xb7,0x00,0x00,0x00,0x9d,0xca,0xaf,0x7e,0xeb,
- 0xba,0x0f,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xa4,0xf9,0x55,0xa1,0x08,0x0d,0x00,0x00,0x24,0xdf,0x9f,
- 0x2d,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,
- 0x10,0x40,0x02,0x40,0xa2,0x7a,0xf3,0x67,0xf2,0xbf,0x00,0x00,0x00,0xfc,0x97,
- 0x37,0x6b,0x6f,0xbd,0x06,0x00,0x00,0x00,0x20,0x00,0x00,0x40,0x00,0x00,0x42,
- 0x00,0x00,0x82,0x00,0x04,0x00,0x00,0xa8,0xf9,0x37,0x54,0x10,0x90,0x20,0xa8,
- 0x00,0xfc,0x1f,0x2b,0x00,0x00,0x00,0x00,0x08,0x80,0x00,0x00,0x00,0x08,0x10,
- 0x20,0x00,0x00,0x00,0x10,0x90,0x00,0x96,0xea,0xfd,0x57,0x7b,0xbf,0x44,0x00,
- 0x00,0xad,0x57,0xcf,0x7d,0xfd,0x4c,0x83,0x00,0x42,0x00,0x02,0x40,0x20,0x08,
- 0x00,0x92,0x00,0x04,0x00,0x20,0x20,0x80,0x00,0x01,0xd6,0xfc,0x6b,0xa9,0x84,
- 0x04,0x14,0x48,0xa0,0xfc,0x7f,0x4b,0x00,0x00,0x81,0x00,0x00,0x24,0x40,0x00,
- 0x80,0x40,0x04,0x04,0x04,0x00,0x00,0x00,0x04,0x08,0x88,0xdd,0xbb,0x6d,0xde,
- 0xb9,0x00,0x00,0x00,0xf9,0x06,0x5b,0x3f,0xef,0xd9,0x0b,0x00,0x00,0x20,0x00,
- 0x04,0x08,0x02,0x80,0x00,0x00,0x00,0x80,0x00,0x08,0x00,0x20,0x00,0xc2,0xfe,
- 0xa7,0x5c,0x0e,0xaa,0x00,0x15,0x09,0xfc,0x7f,0x53,0x00,0x04,0x20,0x00,0x00,
- 0x00,0x01,0x80,0x24,0x00,0x00,0x01,0x41,0x02,0x00,0x00,0x00,0x80,0x94,0xf4,
- 0xf3,0xa7,0x7c,0xbb,0x00,0x00,0x00,0x7c,0x4b,0xcf,0x6d,0xba,0xa9,0x01,0x00,
- 0x10,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x80,0x80,0x08,0x00,0x00,0x00,0x08,
- 0x80,0x62,0xfe,0x8d,0xb2,0x20,0x0a,0xa1,0x00,0x50,0xf9,0xff,0xf4,0x08,0x01,
- 0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x80,0x08,0x11,0x00,
- 0x00,0x92,0xf5,0x6a,0xef,0xfe,0xb7,0x08,0x00,0x40,0xad,0x2f,0xf4,0x7e,0x6f,
- 0xf5,0x05,0x40,0x00,0x08,0x24,0x00,0x00,0x00,0x40,0x00,0x08,0x10,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x2b,0xff,0xb7,0xaa,0x14,0x56,0x48,0x55,0x00,0xf2,0xff,
- 0xac,0x00,0x00,0x00,0x00,0x04,0xdb,0x10,0x00,0x00,0x04,0x40,0xa8,0xc2,0x12,
- 0x00,0x00,0x02,0x40,0x88,0xdb,0xed,0xb5,0xfe,0xbf,0x00,0x00,0x00,0xdd,0x0d,
- 0xff,0x5b,0xfb,0xdb,0x00,0x11,0x00,0x02,0x00,0x20,0x40,0x00,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x04,0x01,0x10,0x35,0xff,0x2d,0x65,0x81,0x08,0x11,0x00,
- 0x95,0xf9,0xfb,0x2d,0x00,0x00,0x04,0x00,0x41,0x5a,0x40,0xa9,0x55,0x55,0x4c,
- 0x47,0x44,0x04,0x00,0x00,0x10,0x09,0x8a,0x7f,0x5b,0x7f,0xb6,0xbb,0x40,0x00,
- 0x00,0xae,0x7a,0xb2,0xff,0xde,0x6d,0x40,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
- 0x02,0x80,0x80,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0xd0,0xff,0xd5,0x9a,0xa7,
- 0x52,0x02,0x0a,0x28,0x62,0xff,0x4b,0x01,0x80,0x80,0x40,0x00,0x16,0x33,0x24,
- 0x8c,0x50,0xb3,0x41,0xc4,0x00,0x40,0x80,0x00,0x00,0x30,0xdf,0xea,0x2f,0x6f,
- 0xae,0x08,0x00,0x08,0xfd,0xdf,0xfa,0x7e,0xff,0x7e,0x08,0x00,0x08,0x00,0x82,
- 0x04,0x00,0x90,0x00,0x08,0x00,0x00,0x52,0x08,0x91,0x00,0x00,0x84,0xd8,0xff,
- 0x9a,0xed,0x2a,0x25,0x24,0xd1,0x44,0xf1,0xff,0x53,0x81,0x00,0x00,0x10,0x00,
- 0x36,0xf4,0xbd,0xb1,0x40,0xb2,0x45,0x56,0x84,0x10,0x08,0x00,0x80,0x74,0xff,
- 0xfb,0x37,0xfb,0xbf,0x00,0x00,0x00,0xda,0xdf,0xd4,0x5f,0x3f,0x1f,0x02,0x00,
- 0x00,0x40,0x00,0x00,0x12,0x02,0x60,0x06,0x24,0x40,0x00,0x00,0x00,0x00,0x10,
- 0x80,0xca,0xff,0xf5,0xab,0x4b,0x4d,0x45,0x00,0x00,0xc2,0xff,0xb3,0x00,0x08,
- 0x20,0x00,0x00,0x24,0x94,0x06,0xa5,0x66,0xb2,0x9a,0xd4,0x18,0x04,0x20,0x48,
- 0x12,0x80,0x7c,0xfb,0x9e,0x97,0xbe,0x00,0x00,0x00,0xbd,0xad,0x94,0x7b,0xf5,
- 0x8d,0x00,0x00,0x00,0x04,0x08,0x00,0x80,0x00,0x61,0x0c,0x01,0x12,0x00,0x00,
- 0x00,0x00,0x01,0x00,0xca,0x7f,0x7d,0x55,0xbd,0x96,0x10,0x49,0x49,0xd1,0xff,
- 0xb7,0x20,0x00,0x04,0x04,0x00,0xa4,0xbd,0xb4,0x2c,0x65,0xda,0xde,0x92,0x0a,
- 0x00,0x00,0x02,0x00,0xd2,0xfc,0xb3,0xcf,0xdf,0xbe,0x44,0x00,0x00,0xfd,0xb7,
- 0xb3,0x7c,0xbd,0x03,0x00,0x44,0x90,0x00,0x00,0x80,0x00,0x50,0xff,0xff,0x00,
- 0x00,0x00,0x02,0x00,0x10,0x40,0x42,0xe5,0xff,0x6b,0xbb,0x53,0x2b,0xaa,0x80,
- 0x90,0xca,0xbb,0x2f,0x03,0x40,0x00,0x01,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xa0,0xf3,0xf5,0xf3,0x7f,0xbe,0x00,0x00,
- 0x10,0xaa,0x2a,0x63,0x43,0xde,0x09,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00,
- 0xdf,0xf2,0x01,0x00,0x84,0x00,0x00,0x00,0x00,0x50,0xf4,0x7f,0xd7,0xea,0x96,
- 0xcc,0x3e,0x12,0x04,0xc2,0xff,0x0f,0x01,0x00,0x40,0x00,0x00,0x04,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x42,0x00,0x00,0x14,0xc3,0xca,0xfc,0xac,
- 0xae,0x00,0x00,0x00,0x6d,0x57,0x8f,0xb8,0xf3,0x02,0x40,0x00,0x00,0x88,0x80,
- 0x00,0x20,0xf8,0xbe,0xff,0x9e,0x42,0x00,0x80,0x44,0x00,0x40,0x80,0xf2,0xff,
- 0xbd,0xbe,0xaa,0xb3,0xf4,0xa7,0xf9,0x92,0xff,0x4f,0x05,0x08,0x02,0x80,0x00,
- 0x01,0x00,0x02,0x42,0x82,0x00,0x90,0x80,0x00,0x40,0x00,0x00,0x41,0xd0,0x1e,
- 0x3f,0xe4,0x77,0xbc,0x24,0x00,0x00,0xbc,0x77,0x14,0x0b,0x5d,0x00,0x04,0x00,
- 0x00,0x00,0x10,0x00,0x08,0xdc,0x99,0x93,0x1b,0x00,0x00,0x00,0x00,0x80,0x00,
- 0xa0,0xfb,0x7f,0x6d,0xa9,0x4a,0xaf,0xe6,0x05,0x7e,0xa5,0xff,0xdf,0x02,0x02,
- 0x10,0x00,0x40,0x00,0x05,0x80,0x00,0x20,0x40,0x00,0x10,0x00,0x01,0x00,0x00,
- 0x10,0xa0,0xef,0x8c,0xcb,0x5a,0xbe,0x00,0x00,0x00,0xfd,0xea,0xba,0x74,0x9f,
- 0x88,0x00,0x10,0x49,0x00,0x00,0x42,0x80,0xec,0x9b,0xe3,0x2e,0x10,0x20,0x00,
- 0x00,0x08,0x10,0x08,0xfb,0xdf,0xde,0x5a,0xe3,0xfa,0xcd,0xab,0xe7,0x87,0xfb,
- 0x9f,0x82,0x80,0x00,0x02,0x10,0x40,0x88,0xb0,0x1a,0x50,0xbf,0xbf,0x6f,0x1f,
- 0x00,0x00,0x00,0x00,0xe8,0xbf,0xc0,0x8b,0xbb,0xbc,0x00,0x00,0x10,0xfa,0xad,
- 0x7e,0xa4,0x30,0x80,0x04,0x04,0x00,0x42,0x00,0x10,0xc0,0xfb,0xff,0xdf,0xda,
- 0x03,0x02,0x00,0x00,0x00,0x00,0x42,0xfd,0x77,0x69,0x69,0x88,0x55,0x21,0x8f,
- 0x0b,0xa5,0xff,0x3f,0x06,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x22,0x00,0x22,
- 0x40,0x80,0x04,0x00,0x80,0x20,0x02,0xf2,0x7f,0xeb,0x1b,0x2f,0xbc,0x04,0x00,
- 0x00,0xbe,0xf4,0xae,0x0a,0xd2,0x40,0x80,0x00,0x00,0x00,0x44,0x00,0x82,0x6f,
- 0xbf,0x7a,0xff,0x01,0x00,0x08,0x08,0x00,0x40,0x40,0xfd,0x6f,0x5f,0xcb,0x65,
- 0xff,0xbf,0x57,0xb7,0x25,0xfe,0x3f,0x05,0x30,0x80,0x20,0x02,0x10,0x20,0x80,
- 0x04,0x01,0x15,0x34,0x81,0x02,0x00,0x08,0x00,0x00,0x40,0x7d,0xf6,0x95,0x5f,
- 0xbd,0x40,0x00,0x00,0xf8,0xfe,0xf7,0x43,0xe0,0xc8,0x30,0x00,0x80,0x08,0x00,
- 0x00,0x90,0x9f,0xc7,0xf4,0xe5,0x21,0x08,0x02,0x00,0x00,0x01,0xc0,0xfc,0xd5,
- 0xd0,0x28,0xb2,0xcd,0xc7,0x96,0xfd,0x02,0xff,0x3e,0x05,0x00,0x00,0x02,0x00,
- 0x20,0x80,0x10,0x18,0x90,0x0a,0x50,0x00,0x04,0x08,0x00,0x00,0x00,0x81,0xf2,
- 0xf9,0x18,0x1b,0xb6,0x00,0x00,0x00,0x3f,0xff,0xb6,0x0e,0xb0,0xc0,0x40,0x00,
- 0x22,0x00,0x00,0x04,0x80,0xcd,0x9e,0x32,0xaf,0x02,0x00,0x00,0x01,0x02,0x00,
- 0xa0,0xfc,0x7b,0xd5,0x82,0x45,0x57,0xcd,0x2e,0xbe,0x2b,0xfc,0x7f,0x05,0x00,
- 0x10,0x08,0x80,0x14,0x04,0x01,0x25,0x00,0x12,0x60,0x01,0x15,0x02,0x00,0x00,
- 0x51,0x00,0xc5,0x70,0x15,0x9f,0xbe,0x00,0x00,0x00,0xd8,0x7f,0xb3,0xfd,0xda,
- 0x80,0x31,0x00,0xc0,0x03,0x00,0x00,0xf8,0xf6,0xfc,0x3f,0xdd,0x9d,0x80,0x00,
- 0x00,0x00,0x00,0x82,0xde,0xa5,0x16,0xd0,0x78,0xe0,0x11,0x9d,0x40,0x42,0xfa,
- 0x7f,0x08,0x00,0x00,0x00,0x22,0x02,0x80,0x00,0x48,0x66,0x0a,0x90,0x40,0x04,
- 0x00,0x01,0x78,0x04,0x08,0xd7,0x67,0x59,0x1f,0xbe,0x00,0x00,0x40,0xfa,0x75,
- 0x72,0xb7,0xbb,0x00,0x01,0x10,0xf0,0x83,0x10,0x00,0xb1,0xfc,0xff,0x7b,0x7d,
- 0x0f,0x00,0x00,0x48,0x20,0x24,0xa0,0xfe,0xdb,0xf5,0x93,0x83,0x95,0x26,0x1b,
- 0x69,0xdd,0xfc,0xf7,0x0a,0x10,0x80,0x80,0x00,0x00,0x00,0x22,0x6a,0x56,0x83,
- 0x60,0x10,0x0a,0x00,0x80,0xf8,0x00,0x40,0x09,0xe9,0x15,0x5f,0xb6,0x10,0x00,
- 0x00,0xda,0x3f,0xf3,0x7a,0xf8,0x00,0x00,0x04,0x39,0x0e,0x00,0x22,0xf0,0x6f,
- 0x0b,0xb0,0x27,0x0d,0x04,0x00,0x02,0x00,0x00,0x40,0xff,0x6d,0x05,0xa4,0x75,
- 0xa2,0x00,0x2a,0x21,0x22,0xba,0xfd,0x1a,0x00,0x20,0x24,0x00,0x0c,0x80,0x04,
- 0xd4,0xff,0x3f,0x90,0x00,0x00,0x00,0x00,0x8e,0x03,0x04,0x16,0x86,0x3b,0x0e,
- 0xb6,0x00,0x00,0x08,0x5e,0x27,0x73,0x4d,0xa8,0x08,0x48,0x00,0x00,0x2c,0x80,
- 0x00,0x38,0xf3,0x01,0x80,0xf3,0x0f,0x01,0x00,0x00,0x08,0x00,0x50,0xff,0xf7,
- 0x3e,0x79,0xb9,0x23,0x52,0x15,0x44,0xac,0xf4,0xef,0x14,0x01,0x01,0x00,0x00,
- 0x01,0x40,0x01,0xfc,0x68,0xf9,0x29,0x01,0x84,0x00,0x00,0x02,0x03,0x10,0x04,
- 0xba,0x9d,0x5e,0xbf,0x00,0x00,0x00,0xf9,0x3d,0x6b,0x10,0xf9,0x00,0x00,0x00,
- 0x10,0x0c,0x00,0x00,0xfe,0x67,0x00,0x00,0xaf,0x3a,0x40,0x00,0x00,0x00,0x01,
- 0x70,0xff,0xff,0xf5,0x6e,0xe5,0x54,0x44,0xb5,0xa4,0x2a,0xeb,0x7b,0x15,0x10,
- 0x00,0x08,0x80,0x0a,0x42,0x80,0x3c,0xff,0xcf,0x61,0x01,0x24,0x20,0x08,0x00,
- 0x03,0x80,0x94,0xda,0x35,0x16,0xbb,0x44,0x00,0x00,0x1a,0x3b,0xe2,0x5a,0x2e,
- 0x00,0x00,0x00,0x82,0x07,0x22,0x80,0x9e,0x7f,0x10,0x10,0xfe,0x69,0x00,0x20,
- 0x01,0x00,0x00,0x68,0x7f,0xff,0x5a,0xbb,0xf5,0x09,0x21,0x54,0x02,0x94,0x77,
- 0xdf,0x05,0x00,0x00,0x01,0x10,0x04,0x80,0x83,0xf7,0xbd,0x24,0x5f,0x20,0x00,
- 0x00,0x02,0xc0,0x81,0x00,0x08,0x34,0xbd,0x8e,0xbf,0x00,0x00,0x00,0x7d,0x39,
- 0xeb,0xb1,0x3d,0x80,0x44,0x90,0xc0,0x27,0x00,0x08,0x9e,0x3f,0x00,0x01,0xfc,
- 0x7d,0x00,0x02,0x08,0x12,0x10,0xa9,0xdf,0xff,0xef,0x75,0x75,0x57,0x44,0x25,
- 0xd4,0x5a,0xca,0xf7,0x35,0x00,0x08,0x00,0x80,0x02,0x40,0x8a,0xbb,0xfb,0xfa,
- 0x5e,0x01,0x08,0x00,0x00,0xf0,0x00,0x48,0x32,0x68,0x3f,0xae,0xbb,0x20,0x00,
- 0x00,0xfa,0xa0,0x73,0xde,0x0f,0x10,0x00,0x00,0xf0,0x00,0x00,0x01,0xfc,0x1f,
- 0x7f,0x9e,0xf8,0x17,0x08,0x00,0x00,0x00,0x04,0xa8,0xff,0xfb,0xff,0xdd,0xf5,
- 0x57,0x84,0x58,0x2a,0xda,0xf6,0xff,0x21,0x00,0x02,0x10,0x01,0x4c,0x44,0xf5,
- 0xec,0xd4,0xfb,0x5a,0x80,0x08,0x00,0x40,0x3c,0x00,0x00,0xd0,0xa0,0xba,0xd2,
- 0xbd,0x00,0x00,0x10,0xfd,0x29,0x63,0xad,0x8f,0x00,0x10,0x04,0x30,0x00,0x41,
- 0x40,0xee,0x1f,0x7c,0x3c,0xe8,0xbb,0x40,0x00,0x00,0x00,0x00,0xa8,0xfd,0xdf,
- 0xfd,0xfb,0xaa,0xad,0x18,0x95,0x88,0x7a,0xe9,0xfd,0x29,0x88,0x00,0x04,0x80,
- 0x13,0x40,0x72,0xbf,0x2f,0xdf,0xf6,0x11,0x08,0x08,0x10,0x0c,0x20,0x40,0x70,
- 0x65,0x3e,0x96,0xb7,0x14,0x00,0x00,0xba,0xed,0x75,0xda,0x00,0x04,0x82,0x00,
- 0x18,0x20,0x00,0x80,0xbb,0x07,0x38,0x3c,0xf0,0xef,0x00,0x00,0x00,0x00,0x00,
- 0xa0,0xef,0xef,0xff,0xaf,0x55,0x2b,0x51,0x5a,0xa4,0xfa,0xee,0xff,0x69,0x00,
- 0x40,0x00,0x10,0x04,0x80,0xb4,0xeb,0xfe,0x75,0x59,0x00,0x00,0x00,0x00,0x06,
- 0x08,0x08,0x82,0x83,0x35,0xd7,0xbe,0x00,0x00,0x00,0xed,0xd1,0x73,0x7e,0x01,
- 0x00,0x00,0x00,0x19,0x00,0x00,0x88,0xe7,0x0e,0xbc,0x3c,0x72,0xe6,0x01,0x20,
- 0x01,0x80,0x80,0x84,0xff,0xfe,0x7e,0xa6,0xf6,0x5b,0x26,0x25,0x88,0x7a,0xe9,
- 0xf7,0x29,0x20,0x00,0x00,0x41,0x05,0x40,0x9f,0xb6,0x7b,0xc7,0xf5,0x01,0x00,
- 0x00,0x04,0x06,0x00,0x40,0xa0,0x0e,0xad,0xea,0xb5,0x04,0x00,0x00,0xda,0x8c,
- 0xf9,0x3c,0x04,0x01,0x04,0x40,0xf8,0x0f,0x04,0x02,0x5d,0x0b,0x78,0xbc,0xc0,
- 0xb3,0x00,0x04,0x00,0x10,0x10,0x90,0xff,0xff,0xdf,0x9f,0xab,0x5e,0x14,0x5b,
- 0x52,0xdb,0x7b,0xbf,0x69,0x00,0x00,0x00,0x40,0x11,0x44,0xfd,0xee,0xef,0x3f,
- 0xbb,0x93,0x00,0x80,0x00,0xfe,0x03,0x01,0x04,0x71,0xbe,0xed,0xb6,0x00,0x00,
- 0x00,0xbf,0x39,0xb3,0xdf,0x41,0x90,0x40,0x08,0x00,0x89,0x40,0x00,0x76,0x47,
- 0x3c,0x3c,0xe0,0xbe,0x08,0x01,0x20,0x04,0x04,0x94,0xef,0xad,0xff,0xbf,0xf5,
- 0x59,0x83,0xff,0xaa,0x7a,0xfb,0xff,0x5b,0x04,0x00,0x08,0x40,0x06,0x41,0x27,
- 0xfb,0xde,0xfe,0x66,0x02,0x08,0x11,0x00,0x20,0x04,0x08,0x48,0xe0,0x1d,0xfb,
- 0xbf,0x00,0x00,0x00,0xea,0x28,0xb3,0x6f,0x08,0x00,0x00,0x00,0x40,0x00,0x00,
- 0x00,0x6e,0x07,0x3c,0x3c,0xe0,0xde,0x40,0x00,0x00,0x00,0x01,0x94,0x7b,0xff,
- 0xf7,0xaf,0xf7,0xb7,0xa4,0xdd,0x46,0xdd,0xff,0xff,0x5b,0x00,0x42,0x00,0x49,
- 0x11,0x40,0xf5,0xbf,0x9f,0xdf,0xb7,0x43,0x00,0x00,0x00,0x01,0x00,0x02,0x41,
- 0xe1,0xbb,0xda,0xbd,0x20,0x00,0x20,0xfa,0x9c,0xeb,0xe3,0x00,0x00,0x00,0x02,
- 0x02,0x20,0x08,0x80,0xef,0x07,0xf8,0x07,0xa0,0xa2,0x00,0x00,0x00,0x00,0x00,
- 0xdc,0xff,0xb7,0xfe,0xff,0x6c,0x6d,0x91,0xfe,0xa9,0xba,0xff,0xfd,0x4b,0x10,
- 0x00,0x40,0x80,0x16,0x40,0xaf,0x0c,0x44,0x84,0xf9,0x8d,0x00,0x00,0x40,0x10,
- 0x11,0x40,0x10,0xf4,0xba,0x7d,0xbb,0x00,0x00,0x00,0x7e,0x7a,0xff,0x65,0x00,
- 0x80,0x00,0x40,0x00,0x00,0x00,0xe0,0x67,0x47,0xf8,0x07,0xe0,0xde,0x03,0x01,
- 0x00,0x22,0x00,0x94,0xdf,0xfd,0xfb,0xff,0xef,0xab,0x26,0xbd,0x89,0xdd,0x7f,
- 0xdf,0x57,0x81,0x00,0x04,0x40,0x05,0x10,0xcb,0x46,0x37,0x22,0xef,0x0d,0x00,
- 0x00,0x02,0x00,0x04,0x01,0x83,0x10,0xf7,0xfe,0xb7,0x08,0x00,0x00,0xd9,0x54,
- 0xd5,0xb0,0x20,0x02,0x10,0x00,0x00,0x04,0x82,0x04,0x7d,0x0f,0x3a,0xbc,0xa8,
- 0x96,0x10,0x00,0x84,0x00,0x20,0xdd,0x77,0xdf,0xae,0xef,0xd5,0xb5,0x11,0x01,
- 0x52,0xfe,0xdf,0xff,0x53,0x20,0x10,0x01,0xa0,0x92,0xc0,0x3d,0x47,0xfa,0x05,
- 0xb6,0xa6,0x90,0x40,0x00,0x00,0x01,0x08,0x1f,0xed,0xb5,0xff,0xbe,0x00,0x00,
- 0x00,0xfa,0x32,0xbb,0x92,0x04,0x00,0x00,0x02,0x40,0x00,0x20,0x00,0xfd,0x07,
- 0x38,0x3c,0xe0,0xbe,0x00,0x00,0x01,0x00,0x04,0xdc,0xfd,0xff,0xf7,0xdd,0x55,
- 0x6f,0x64,0x52,0x88,0xd5,0xfe,0xdb,0x57,0x10,0x00,0x80,0x88,0x14,0xc0,0xcf,
- 0x93,0xff,0x4f,0xee,0x1e,0x00,0x00,0x00,0x40,0x00,0x00,0x2d,0xa9,0xd7,0x6b,
- 0xbb,0x00,0x00,0x40,0xfe,0xd4,0x6a,0x19,0x00,0x00,0x02,0x00,0x10,0x80,0x00,
- 0x00,0x7e,0x07,0x78,0x78,0xe0,0xbe,0x88,0x00,0x00,0x04,0x00,0xea,0xff,0xff,
- 0xdf,0xbe,0xef,0x5f,0x8a,0x04,0x56,0xfd,0xf7,0xff,0x17,0x00,0x00,0x00,0x20,
- 0x05,0x80,0xaf,0xc7,0x62,0x30,0xfa,0xab,0x00,0x08,0x00,0x00,0x40,0x00,0xff,
- 0x70,0x2f,0x8f,0xb5,0x00,0x00,0x04,0xda,0xaa,0x7e,0x9a,0x00,0x00,0x00,0x41,
- 0x04,0x00,0x00,0x00,0xfc,0x0f,0x3a,0x78,0xc0,0xbf,0x00,0x10,0x00,0x40,0x08,
- 0xda,0xff,0xb7,0xfd,0xd7,0xfb,0xd4,0x24,0x89,0x28,0xbe,0x7f,0xbd,0xd7,0x00,
- 0x00,0x04,0x80,0x12,0xc0,0xaa,0x47,0x6e,0x12,0xde,0x1d,0x00,0x00,0x00,0x08,
- 0x08,0x84,0xac,0x81,0x7b,0x87,0xbf,0x20,0x00,0x00,0xfb,0x6d,0xab,0x7c,0x00,
- 0x20,0x00,0x10,0x00,0x44,0x08,0x84,0xef,0x0b,0x78,0x78,0xf2,0xf7,0x01,0x00,
- 0x80,0x00,0x00,0xea,0xbf,0xff,0xef,0xfd,0x56,0x57,0xed,0xff,0x5f,0xfa,0xff,
- 0xf7,0x06,0x20,0x02,0x81,0x20,0x15,0xc0,0xaa,0xa5,0x35,0xbc,0xde,0xb2,0x88,
- 0x00,0x20,0x00,0x00,0x00,0x7b,0xf5,0xbf,0xf7,0xbf,0x08,0x00,0x00,0xba,0xb1,
- 0x3d,0x8d,0x80,0x08,0x00,0x00,0x00,0x00,0x40,0x00,0xfa,0x4f,0x3c,0x7c,0xf0,
- 0xf7,0x08,0x02,0x00,0x10,0x80,0xea,0xef,0xff,0x7b,0xaf,0xff,0xaf,0x09,0x40,
- 0x02,0xff,0xdd,0xfe,0x97,0x00,0x40,0x00,0x80,0x14,0x68,0xdf,0x67,0x6d,0x4a,
- 0x36,0x77,0x00,0x40,0x00,0x02,0x00,0x01,0x71,0xe3,0xea,0x8b,0xb5,0x00,0x00,
- 0x00,0xfa,0x7b,0x35,0x5e,0x04,0x00,0x40,0x00,0x00,0x00,0x00,0x01,0xde,0x1f,
- 0x38,0x3c,0xe8,0x73,0x80,0x80,0x00,0x02,0x00,0xea,0xff,0xfd,0xff,0xdf,0xfb,
- 0x5b,0x13,0x08,0x28,0xdd,0xff,0xd7,0x87,0x10,0x10,0x00,0x90,0x05,0xc2,0xdd,
- 0x56,0x7d,0x6e,0xfe,0x35,0x00,0x00,0x00,0x40,0x42,0x00,0xe6,0x66,0xf7,0x7e,
- 0xb7,0x00,0x00,0x00,0xda,0xa7,0xad,0x9f,0x00,0x00,0x04,0x04,0x41,0x00,0x08,
- 0x00,0xfe,0x39,0x7f,0x0f,0xf0,0x1b,0x00,0x00,0x80,0x00,0x22,0xea,0x7e,0xdf,
- 0xee,0xb6,0x5e,0xbf,0xd4,0x22,0x49,0xff,0xf7,0xfd,0xa6,0x00,0x02,0x80,0xa4,
- 0x12,0x40,0xf7,0x6b,0xd9,0x59,0xbe,0x57,0x10,0x04,0x00,0x00,0x10,0x10,0x00,
- 0x97,0xbd,0xdf,0xbb,0x00,0x00,0x00,0xfa,0x37,0x4b,0xcf,0x40,0x00,0x01,0x00,
- 0x04,0x48,0x42,0x10,0xbe,0x2e,0xff,0x03,0x3e,0x1f,0x08,0x00,0x04,0x00,0x00,
- 0xea,0xf7,0xff,0xbb,0xdf,0xf6,0x6d,0x25,0x4b,0x12,0xed,0xbd,0xff,0x87,0x00,
- 0x00,0x00,0x80,0x14,0x40,0xdf,0xc7,0xbe,0x35,0x36,0xb5,0x04,0x00,0x80,0x08,
- 0x00,0x00,0x95,0x8b,0x7f,0xff,0xbf,0x20,0x00,0x40,0xfa,0x4e,0x8b,0x5f,0x00,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x7b,0x00,0x40,0xee,0x6d,0x00,0x00,
- 0x00,0x00,0x00,0xea,0xff,0xdf,0xff,0xaf,0xbe,0x5f,0xd5,0xd4,0x44,0xff,0xff,
- 0xb7,0xa7,0x80,0x00,0x10,0x20,0x93,0x70,0x77,0x03,0x77,0x27,0xfe,0x76,0x80,
- 0x40,0x20,0x00,0x00,0x02,0x4c,0xbd,0xfe,0x7b,0xbd,0x00,0x00,0x10,0xfe,0xef,
- 0xcd,0x5b,0x10,0x00,0x00,0x40,0x00,0x02,0x00,0x00,0xfe,0xfb,0x00,0x00,0xc5,
- 0x7f,0x00,0x20,0x00,0x04,0x04,0xaa,0xbf,0xf7,0x5a,0xbd,0xed,0xfb,0x2a,0xa9,
- 0x55,0xff,0xee,0xfe,0x87,0x08,0x00,0x00,0x80,0x14,0xc0,0xdb,0x47,0xfb,0x0e,
- 0xae,0x7d,0x00,0x00,0x08,0x00,0x00,0x00,0x48,0x5d,0xb7,0x95,0xbf,0x00,0x00,
- 0x00,0xda,0x95,0xf5,0x4c,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x41,0xf8,0xcf,
- 0x01,0xc0,0xdb,0x0f,0x00,0x01,0x01,0x81,0x00,0xea,0xed,0xfd,0xef,0x6f,0xfb,
- 0xae,0xa5,0x50,0xb4,0xdf,0xff,0xff,0x87,0x00,0x00,0x00,0x40,0x13,0x48,0xff,
- 0xc5,0xde,0xbd,0x7e,0x17,0x00,0x00,0x00,0x40,0x20,0x00,0x30,0xf5,0xef,0xea,
- 0xb2,0x10,0x00,0x00,0xfa,0xbf,0xfd,0xb9,0x00,0x21,0x80,0x00,0x00,0x00,0x21,
- 0x08,0xf0,0xed,0x07,0x60,0xf9,0x07,0x08,0x00,0x40,0x00,0x40,0xea,0xff,0xbf,
- 0xba,0x5f,0xdd,0xff,0x4d,0x85,0xca,0xff,0xef,0xdd,0xa7,0x00,0x00,0x04,0x41,
- 0x15,0xc0,0xdf,0xf3,0xee,0x2b,0xbe,0x17,0x00,0x10,0x00,0x04,0x00,0x48,0xb0,
- 0x7c,0xbd,0xfd,0xbf,0x00,0x00,0x00,0xfa,0xa9,0x1d,0x4c,0x10,0x00,0x12,0x00,
- 0x00,0x21,0x00,0x00,0x50,0xfd,0xfe,0xff,0x56,0x0e,0x40,0x10,0x10,0x00,0x00,
- 0xea,0xff,0xdd,0xef,0x7f,0x6b,0xfb,0x2a,0x5a,0xf2,0xb7,0x7d,0xf7,0x87,0x00,
- 0x81,0x40,0x50,0x05,0xf0,0xde,0x3e,0x33,0xef,0xf6,0x35,0x02,0x04,0x00,0x00,
- 0x84,0x00,0x84,0xd5,0xd7,0x03,0xba,0x20,0x00,0x00,0x5a,0x2f,0x6d,0x5a,0x04,
- 0x00,0x00,0x10,0x40,0x00,0x00,0x80,0xf8,0xf7,0xfa,0xdf,0x9c,0x1d,0x01,0x00,
- 0x00,0x00,0x01,0x62,0x7b,0xaf,0xbd,0xdf,0xec,0xfe,0x7f,0x45,0xfa,0xfd,0xdf,
- 0x7f,0x97,0x00,0x20,0x00,0x40,0x11,0x82,0x87,0xcf,0xa8,0xac,0x5f,0x11,0x90,
- 0x00,0x02,0x10,0x00,0x00,0x40,0xee,0xdf,0xc9,0xbd,0x00,0x00,0x00,0xfe,0xdd,
- 0x3e,0x58,0x01,0x08,0x00,0x04,0x09,0x00,0x80,0x04,0x6a,0xed,0x78,0xb7,0xbe,
- 0x43,0x10,0x00,0x01,0x20,0x00,0xca,0xff,0xbf,0xff,0x7f,0xdb,0xbf,0x6e,0x55,
- 0xbd,0xef,0xff,0xfb,0xa7,0x88,0x00,0x00,0x80,0x96,0xc0,0xba,0xb7,0x6e,0x7b,
- 0x7b,0x8b,0x08,0x00,0x20,0x01,0x00,0x08,0x90,0xd8,0xee,0x74,0xb7,0x08,0x00,
- 0x00,0x5a,0x73,0xbc,0x5a,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x80,0xcf,
- 0x7b,0xf3,0x7f,0x01,0x00,0x40,0x00,0x00,0x40,0xea,0xff,0xfb,0xbf,0xbd,0x6e,
- 0xfb,0xfb,0xcb,0xfa,0xba,0xfb,0xde,0x97,0x00,0x00,0x00,0x40,0x11,0xc0,0xf7,
- 0x3f,0xc9,0xce,0xef,0x1b,0x08,0x80,0x00,0x00,0x41,0x82,0x00,0x61,0x77,0xa5,
- 0x9a,0x00,0x00,0x00,0xde,0x73,0x2d,0x5d,0x00,0x40,0x00,0x00,0x00,0x48,0x00,
- 0x40,0x80,0x4f,0x7f,0xd7,0xe6,0x09,0x00,0x10,0x00,0x01,0x10,0xca,0xbf,0xbf,
- 0xef,0xff,0xbd,0xef,0xdf,0x7e,0xef,0xff,0xaf,0xff,0x86,0x00,0x00,0x10,0x04,
- 0x56,0xd0,0x7b,0x2d,0xb8,0xe5,0x7e,0x3f,0x00,0x08,0x00,0x04,0x10,0x00,0x44,
- 0x60,0xbd,0x10,0xa5,0x00,0x00,0x80,0x5a,0x99,0x3e,0x4c,0x00,0x04,0x40,0x20,
- 0x00,0x01,0x80,0x00,0x80,0xff,0xf5,0x2f,0xd9,0x01,0x00,0x00,0x00,0x20,0x00,
- 0xda,0xff,0xfb,0xfe,0xff,0xd2,0xbc,0xff,0xfb,0x7e,0xeb,0xfe,0xdb,0x57,0x40,
- 0x08,0x00,0x00,0x05,0x84,0x4d,0xcf,0xff,0x13,0x53,0x05,0x04,0x02,0x20,0x21,
- 0x00,0x00,0x00,0xc1,0x52,0x40,0xb9,0x40,0x00,0x00,0xda,0x6f,0x3d,0x5e,0x80,
- 0x00,0x00,0x04,0x20,0x00,0x00,0x00,0xa0,0xbc,0x75,0x6e,0x2d,0x00,0x00,0x02,
- 0x20,0x00,0x00,0xd8,0xfb,0xbf,0x5f,0x7f,0xed,0xfb,0xfa,0x3f,0xff,0xbf,0x77,
- 0x7f,0x13,0x00,0x00,0x00,0x01,0x15,0x40,0xcb,0x6f,0x82,0x12,0x77,0x05,0x8c,
- 0x00,0x00,0x00,0x02,0x08,0x08,0xf0,0xd7,0x27,0xbc,0x00,0x00,0x00,0xfa,0xdf,
- 0x96,0x5c,0x20,0x00,0x08,0x00,0x04,0x00,0x00,0x00,0x00,0xf8,0xf7,0xa6,0x1b,
- 0x24,0x40,0x00,0x00,0x08,0x22,0xda,0xff,0xf7,0xff,0xdf,0xab,0xdd,0xdf,0x6f,
- 0x6f,0xf7,0xff,0xed,0x57,0x00,0x00,0x02,0x40,0x12,0xd0,0xbb,0xde,0xab,0xce,
- 0xbb,0x0d,0x20,0x00,0x20,0x00,0x00,0x80,0x42,0xe5,0xfc,0xff,0xbf,0x00,0x00,
- 0x00,0x7a,0xbf,0x0d,0xce,0x00,0x00,0x00,0x00,0x00,0x20,0x10,0x42,0x08,0xf8,
- 0xff,0xfc,0x1f,0x00,0x02,0x00,0x08,0x00,0x00,0x9c,0x7f,0xef,0xee,0xf7,0x77,
- 0x7f,0xfb,0x1a,0xfb,0xfd,0xed,0xbf,0x53,0x10,0x00,0x00,0x90,0x02,0x82,0xbe,
- 0x3a,0xa0,0xc1,0xf0,0x0f,0x08,0x00,0x09,0x00,0x00,0x01,0x00,0xe0,0xbb,0xf7,
- 0xbf,0x00,0x00,0x00,0xba,0x6f,0xab,0x5d,0x00,0x20,0x00,0x01,0x20,0x04,0x04,
- 0x00,0x00,0x00,0xfb,0xcf,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0xf7,0xbf,
- 0x7f,0xff,0xab,0xf6,0xb7,0x17,0xff,0xdf,0x7f,0xff,0x5b,0x00,0x00,0x40,0x00,
- 0x14,0x40,0xc7,0xb7,0xa5,0xfe,0x5e,0x02,0x06,0x00,0x00,0x80,0x10,0x00,0x40,
- 0x62,0x5e,0xdf,0xaf,0x10,0x00,0x00,0xfa,0x87,0x83,0x5f,0x00,0x00,0x02,0x10,
- 0x01,0x00,0x00,0x00,0x00,0x00,0xf1,0xcf,0x00,0x00,0x00,0x80,0x00,0x00,0x20,
- 0x94,0xfd,0xda,0xf7,0xff,0xdf,0xed,0xfe,0x05,0x7f,0xfb,0xde,0xfb,0x53,0x04,
- 0x22,0x00,0x00,0x09,0x40,0xed,0xef,0xcf,0x37,0xff,0x01,0x09,0x00,0x00,0x02,
- 0x00,0x40,0x20,0xe5,0xbe,0xbd,0xba,0x00,0x00,0x00,0x5a,0x82,0xa1,0x5e,0x00,
- 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x61,0x0e,0x00,0x10,0x00,0x00,
- 0x00,0x01,0x09,0x94,0xbf,0xff,0xdb,0xef,0xd7,0xbf,0xff,0x83,0xff,0xbf,0xf7,
- 0xff,0x69,0x00,0x00,0x00,0x00,0x02,0x80,0xde,0xde,0x9b,0x9e,0xdb,0x03,0x0d,
- 0x40,0x40,0x08,0x0f,0x11,0x00,0x70,0xf7,0xab,0xad,0x00,0x00,0x00,0x7a,0xe9,
- 0x4a,0x4f,0x04,0x00,0x20,0x00,0x84,0x08,0x00,0x11,0x01,0x00,0x20,0x00,0x00,
- 0x05,0x00,0x00,0x40,0x40,0x00,0x90,0xf7,0xd7,0xfe,0xff,0xaf,0xea,0xb6,0x20,
- 0xbf,0xed,0xff,0xdf,0x69,0x00,0x00,0x02,0x04,0x08,0x91,0xb0,0x6f,0xfe,0xf3,
- 0x7f,0x00,0x00,0x10,0x00,0x00,0x01,0x00,0x08,0xa0,0x9b,0xde,0xba,0x00,0x00,
- 0x00,0xda,0x63,0xe2,0x5f,0x40,0x08,0x01,0x08,0x00,0x02,0x04,0x00,0x20,0x80,
- 0x04,0x00,0x00,0x00,0x40,0x40,0x08,0x04,0x00,0x90,0xbe,0xff,0xff,0xff,0xbf,
- 0xff,0x5f,0x04,0xfe,0xff,0xfb,0xf6,0x69,0x00,0x00,0x20,0x00,0x42,0x00,0xb0,
- 0xbb,0x51,0x7d,0x6b,0x41,0x8e,0x04,0x00,0x89,0x01,0x00,0x40,0xea,0x77,0xb5,
- 0xbf,0x20,0x00,0x80,0xfa,0xf9,0xff,0x5f,0x00,0x00,0x00,0x40,0x88,0x00,0x40,
- 0x00,0x00,0x22,0x00,0x10,0x10,0x00,0x11,0x00,0x00,0x00,0x00,0xa0,0xef,0x6d,
- 0xb5,0xfa,0xff,0x6a,0x17,0xa0,0xee,0x7b,0xff,0xff,0x29,0x00,0x01,0x00,0x80,
- 0x04,0x40,0xc9,0xfe,0xfa,0xff,0x7b,0x81,0x04,0x00,0x24,0x80,0x40,0x4b,0x01,
- 0xe0,0xb7,0x6f,0xaf,0x08,0x00,0x00,0xfa,0x62,0xb5,0x4f,0x01,0x41,0x00,0x01,
- 0x00,0x20,0x00,0x04,0x04,0x00,0x00,0x00,0x02,0x40,0x00,0x10,0x00,0x00,0x00,
- 0xa9,0xff,0xfb,0xef,0xdf,0xbf,0xbd,0x2d,0x00,0x7b,0xdf,0xdf,0xff,0x21,0x08,
- 0x00,0x00,0x02,0x20,0x90,0xc0,0xfd,0x46,0xea,0x18,0x81,0x01,0x00,0x00,0x08,
- 0x51,0xab,0x88,0xf0,0xdf,0xbb,0xbc,0x00,0x00,0x00,0xba,0x2e,0xee,0x5b,0x10,
- 0x10,0x14,0x10,0x02,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,
- 0x00,0x00,0x00,0x28,0x77,0xdf,0xf7,0xff,0x3b,0x56,0x00,0xa1,0xcf,0xfb,0x7b,
- 0xff,0x25,0x00,0x00,0x04,0x00,0x10,0x20,0xa0,0xd7,0xde,0x3b,0x6f,0x41,0x06,
- 0x00,0x80,0x00,0x47,0x93,0x00,0x42,0x7f,0xff,0xbf,0x08,0x00,0x00,0xfa,0xd6,
- 0xfb,0x5d,0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x42,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x10,0x40,0x68,0xff,0x7f,0xfe,0x6f,0xff,0xbf,0x11,0x80,
- 0xdf,0xde,0xfe,0xfb,0x14,0x02,0x00,0x01,0x00,0x20,0x14,0xa4,0xae,0x7b,0x3d,
- 0x1b,0x01,0x20,0x04,0x01,0x00,0x00,0x00,0x00,0xe0,0x7e,0xf7,0xba,0x00,0x00,
- 0x20,0x3a,0x7f,0xfb,0x4e,0x00,0x00,0x80,0x00,0x08,0x00,0x02,0x40,0x40,0x04,
- 0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x69,0xff,0xef,0xdb,0xfe,0x3f,
- 0xa5,0x00,0xe9,0xdf,0xf7,0xef,0xdf,0x16,0x01,0x40,0x40,0x40,0x00,0x03,0xa8,
- 0xfe,0xaa,0xd2,0x55,0x2a,0x09,0x20,0x00,0x08,0x00,0x00,0x20,0xb8,0xb5,0xbf,
- 0xb7,0x00,0x00,0x00,0xba,0xf7,0xbf,0x5d,0x00,0x00,0x01,0x00,0x00,0x82,0x80,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x40,0x00,0x80,0x52,0x7f,0x77,
- 0xff,0xff,0xbe,0x2d,0x40,0xd0,0xdd,0x7a,0x7f,0xf7,0x92,0x00,0x10,0x00,0x10,
- 0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x04,
- 0x66,0xc2,0xef,0xbd,0x40,0x00,0x00,0x7a,0xbf,0xdf,0x4e,0x00,0x09,0x00,0x08,
- 0x01,0x20,0x20,0x10,0x08,0x40,0x04,0x00,0x80,0x00,0x00,0x04,0x04,0x00,0x84,
- 0x59,0xef,0xdd,0xfb,0xef,0xbf,0x2a,0x2a,0xd4,0xff,0xdf,0xff,0xff,0x9e,0x00,
- 0x01,0x00,0x04,0x88,0x00,0x01,0x40,0xf6,0x33,0x00,0x00,0x00,0x00,0x20,0x90,
- 0x40,0x04,0x01,0xce,0xef,0xf6,0xbb,0x00,0x00,0x00,0xba,0xef,0xab,0x7d,0x04,
- 0x80,0x10,0x40,0xf8,0x00,0x0c,0x10,0x78,0x10,0x41,0x12,0x37,0x34,0x68,0x00,
- 0x21,0x00,0x80,0x06,0xfe,0xbf,0x7f,0xfd,0xff,0xaa,0x02,0xf0,0x7f,0xf7,0x7b,
- 0xff,0x58,0x41,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x22,0x00,0x10,0x00,0x00,
- 0x01,0x04,0x04,0x00,0x02,0x00,0xe5,0xb9,0xff,0xb7,0x10,0x00,0x00,0x7a,0xff,
- 0xfe,0x82,0x43,0x00,0x80,0x00,0xd0,0x01,0x1e,0x7c,0x58,0xc0,0x01,0x07,0x6f,
- 0x28,0xd0,0x01,0x21,0x00,0x20,0x8b,0xfe,0xf7,0xfa,0xdf,0xbf,0xaa,0x00,0xe8,
- 0xbd,0xfc,0xde,0x6b,0x9a,0x01,0x00,0x00,0x00,0x80,0x10,0x10,0x00,0x20,0x00,
- 0x00,0x00,0x02,0x00,0x00,0x00,0x10,0x80,0x40,0x81,0xff,0x6f,0xbd,0x00,0x00,
- 0x00,0xba,0xbf,0x1f,0x04,0x08,0x20,0x00,0x00,0x08,0x03,0x21,0x4c,0x20,0x60,
- 0x86,0x0c,0x01,0xcc,0x98,0x21,0x21,0x00,0x80,0xba,0xfc,0xef,0xef,0xff,0x3f,
- 0x44,0x00,0x75,0xff,0xcb,0xff,0x7f,0xe9,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x01,0x00,0x04,0x01,0x28,0x27,0xbd,0xbe,
- 0xb5,0x00,0x00,0x00,0xfa,0xfa,0xaf,0x95,0x30,0x08,0x02,0x08,0x08,0x03,0x23,
- 0x44,0x40,0x22,0x86,0x08,0x01,0xc4,0x18,0x01,0x21,0x00,0x42,0xac,0xfc,0xbb,
- 0xff,0xbf,0x7d,0xa8,0x40,0x52,0xbd,0xf2,0xff,0x7f,0xac,0x05,0x00,0x84,0x40,
- 0x20,0x00,0x00,0x80,0x02,0x00,0x00,0x12,0x00,0x48,0x88,0x10,0x00,0x00,0x04,
- 0x03,0xed,0xdd,0xbd,0x00,0x00,0x00,0x7a,0x7d,0x91,0x5e,0xc4,0x00,0x08,0x80,
- 0x18,0x21,0x30,0x4d,0x60,0x00,0x84,0x08,0x01,0xc0,0x88,0x01,0x29,0x10,0xc0,
- 0xb9,0x7c,0xef,0xf7,0x6f,0x7f,0x01,0x06,0x74,0xbd,0x4e,0xff,0x3f,0xed,0x07,
- 0x88,0x00,0x10,0x00,0x02,0x00,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x80,0x08,0xee,0xb2,0x7b,0xb6,0x00,0x00,0x00,0xfa,0xed,0x6b,0xc7,0x01,
- 0x00,0x20,0x20,0x90,0x03,0x18,0x54,0x60,0x00,0x86,0x0d,0x1d,0x50,0xf0,0x00,
- 0x3f,0x04,0x40,0x69,0xfc,0xff,0xbb,0xfa,0xf5,0x22,0x43,0xc8,0x7e,0xdb,0xf4,
- 0x3f,0xa7,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80,0x40,0x00,0x00,
- 0x01,0x00,0x08,0x01,0x00,0x2c,0x6b,0xf1,0x56,0x3f,0x20,0x00,0x10,0xfa,0xba,
- 0xb5,0x1e,0x97,0x82,0x08,0x01,0x78,0x01,0x1c,0x5c,0x60,0xc0,0x81,0x0b,0x23,
- 0x70,0x98,0x01,0x21,0x00,0x88,0x49,0xfd,0xfd,0xff,0xff,0xfd,0x41,0x2e,0x81,
- 0xf6,0xae,0x4f,0xaf,0xd6,0x25,0x00,0x20,0x04,0x02,0x20,0x00,0x01,0x00,0x10,
- 0x10,0x00,0x00,0x00,0x40,0x00,0x20,0x80,0xb0,0xff,0x0d,0x95,0xbf,0x00,0x00,
- 0x00,0xba,0x53,0xfd,0xe5,0x7f,0x08,0x00,0x00,0x08,0x03,0x20,0xc4,0x60,0x60,
- 0x40,0x18,0x60,0xc0,0x18,0x09,0x21,0x01,0xc1,0x1b,0x73,0x77,0xe7,0xbb,0xef,
- 0x57,0x25,0x24,0xf8,0xd5,0xbd,0x9f,0xa2,0x09,0x00,0x08,0x41,0x20,0x08,0x08,
- 0x00,0x08,0x00,0x00,0x20,0x21,0x10,0x04,0x00,0x24,0x60,0xe7,0x85,0x47,0xbc,
- 0xba,0x08,0x00,0x00,0xda,0xa6,0x59,0x00,0xfe,0x08,0x05,0x10,0x09,0x03,0x20,
- 0x86,0x20,0x20,0x80,0x10,0x60,0xc0,0x08,0x03,0x21,0x00,0xd0,0xcb,0xfa,0xdf,
- 0xfb,0xfe,0xfb,0x23,0x4b,0x08,0xea,0x5d,0xef,0xda,0xea,0x15,0x02,0x00,0x10,
- 0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x42,0x50,0x10,0xe3,
- 0x00,0xce,0xa8,0xb7,0x00,0x00,0x00,0xba,0x57,0x37,0xde,0xd0,0x93,0x80,0x00,
- 0x58,0x43,0x33,0x44,0x60,0x28,0x80,0x08,0x30,0xc6,0xd8,0x41,0x21,0x00,0x40,
- 0xa7,0xb2,0xff,0xdf,0xf7,0xb7,0x47,0x1e,0x80,0xf5,0xfd,0xbb,0x4f,0x4d,0x35,
- 0x40,0x08,0x00,0x04,0x00,0x08,0x00,0x00,0x82,0x00,0x04,0x00,0x40,0x20,0x00,
- 0x02,0x92,0x33,0xfe,0x80,0xdb,0xbd,0x00,0x00,0x00,0xea,0xf5,0x8f,0x55,0xe1,
- 0x07,0x00,0x00,0xb8,0x81,0x2f,0x7c,0xf8,0xd3,0x87,0x0d,0x1f,0xdc,0x78,0x01,
- 0x21,0x00,0x50,0x27,0xf4,0xeb,0xfd,0xef,0xff,0xc7,0x0a,0x51,0xee,0xaf,0xfe,
- 0x0a,0xc1,0x06,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x20,0x28,0xd8,0x0b,0xff,0xf3,0xb3,0x2e,0x00,0x00,0x00,0xfa,0xc3,
- 0x47,0xed,0xcf,0x67,0x90,0x20,0x20,0x00,0x08,0x10,0x08,0xa0,0x04,0x07,0x05,
- 0x10,0x00,0x00,0x00,0x20,0xa8,0xf5,0xe5,0xbb,0xfb,0xfb,0xfb,0x9f,0x1a,0xa4,
- 0xd0,0xbf,0xeb,0xa7,0xd7,0x11,0x00,0x40,0x10,0x41,0x00,0x00,0x02,0x80,0x00,
- 0x00,0x80,0x00,0x00,0x00,0x08,0x21,0xe0,0xc3,0x13,0xcb,0xe7,0xb5,0x20,0x00,
- 0x00,0xfa,0x65,0x71,0xab,0x95,0x5e,0x02,0x04,0x02,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x22,0xa5,0xcd,0xfe,0x7f,0xbf,0xef,
- 0x5e,0x2a,0x69,0xda,0x7b,0xbd,0xb3,0xd5,0x04,0x01,0x00,0x04,0x00,0x20,0x80,
- 0x00,0x10,0x10,0x08,0x00,0x04,0x42,0x90,0x00,0x14,0xe4,0xb3,0xee,0xcd,0xaf,
- 0xbf,0x00,0x00,0x00,0x7a,0x13,0x91,0x7e,0x29,0x9f,0x20,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x57,0xcb,0xf7,
- 0xd7,0xef,0xbf,0x8f,0x3a,0x85,0xa2,0xbb,0xdf,0xd3,0xd7,0x4c,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x40,0x00,0x00,0x40,0x10,0x80,0x00,0x02,0x42,0x02,0x72,0x59,
- 0x7f,0x3b,0x9d,0x37,0x00,0x00,0x80,0xea,0xf8,0xfc,0x04,0x35,0xba,0x22,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x40,
- 0x6e,0xc2,0xbf,0xfc,0xf5,0xfb,0x2f,0x6a,0xad,0xa9,0xeb,0xf6,0xd3,0x76,0x15,
- 0x20,0x40,0x80,0x10,0x01,0x02,0x00,0x00,0x00,0x01,0x04,0x00,0x20,0x00,0x00,
- 0x0c,0xfa,0xdc,0x81,0x3a,0x97,0xb7,0x10,0x00,0x00,0xda,0xf9,0xa4,0x03,0xef,
- 0x6e,0x01,0x40,0x04,0x08,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x11,
- 0x04,0x20,0x88,0xd8,0x93,0xf7,0x6b,0xef,0xd7,0x9f,0xad,0x12,0x85,0xf6,0xbd,
- 0xc9,0xb7,0x02,0x08,0xfa,0xff,0x0e,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
- 0x00,0x91,0x88,0x10,0xbc,0xb8,0x81,0x7d,0xb8,0xba,0x00,0x00,0x00,0xba,0x7c,
- 0x56,0x80,0xdb,0x6c,0x00,0x15,0x00,0x81,0xe0,0x00,0x01,0x14,0x00,0x08,0x40,
- 0x10,0x10,0x00,0x80,0x08,0x44,0x7f,0x2e,0xfd,0xff,0xbf,0xff,0x5f,0x35,0x50,
- 0xa5,0x6e,0xff,0x64,0xd7,0x4b,0x04,0xf8,0xce,0x0e,0x00,0x10,0x00,0x00,0x04,
- 0x00,0x40,0x00,0x10,0x00,0x00,0x0d,0x7d,0xe6,0x80,0xdb,0x3c,0x33,0x04,0x00,
- 0x00,0xea,0x5c,0x6e,0x00,0x6f,0x79,0x00,0x00,0x40,0x00,0x18,0x10,0xc0,0x3f,
- 0x04,0x80,0x88,0x04,0x04,0x00,0x00,0x80,0x82,0xd4,0x2a,0xff,0xdf,0xf7,0xfe,
- 0xbf,0xa6,0x6a,0xca,0xff,0xb7,0xf4,0xbf,0xaa,0x93,0x68,0x5a,0x28,0x01,0x00,
- 0x00,0x40,0x00,0x08,0x00,0x12,0x04,0x0a,0x42,0x02,0x6d,0x3d,0x80,0xbf,0x5c,
- 0xbb,0x00,0x00,0x00,0xba,0x3e,0xfd,0x80,0xfd,0xe8,0x13,0x00,0x02,0x00,0x04,
- 0x0c,0x30,0x01,0xc0,0x00,0xe0,0x03,0xc1,0x87,0x00,0x80,0x7d,0xfa,0xcd,0xee,
- 0xf6,0xde,0xef,0xbe,0xde,0x06,0x51,0xcf,0x7e,0xb2,0xca,0x7a,0x04,0x00,0x00,
- 0x00,0x08,0x00,0x78,0x00,0x00,0x80,0x19,0x00,0x00,0xc1,0x20,0x85,0x3e,0x7b,
- 0x80,0xb5,0x79,0x3e,0x10,0x00,0x00,0x7a,0x3e,0x7b,0x81,0xdb,0xf9,0x02,0x10,
- 0x2c,0x00,0x26,0x00,0x90,0x00,0xe0,0x00,0xe0,0x8e,0xc0,0x0d,0x00,0x64,0xab,
- 0xe2,0xdf,0xfe,0xff,0x7f,0xff,0x7f,0xa9,0xac,0xc8,0xfd,0x7b,0xbb,0xf7,0x4e,
- 0x05,0x40,0xb3,0x05,0x10,0x80,0x44,0x01,0x00,0x01,0x09,0x60,0x00,0x10,0x48,
- 0x83,0x2e,0xd7,0x80,0xef,0x69,0xbe,0x00,0x00,0x00,0x7a,0x16,0xb5,0x91,0xb5,
- 0xda,0x01,0x01,0x7f,0x20,0x90,0x00,0x38,0x11,0x60,0xa0,0x42,0x0a,0x42,0x00,
- 0x04,0x81,0xfc,0x0f,0x3e,0xdd,0x6d,0xef,0x5f,0xff,0xae,0x22,0x42,0xef,0x3f,
- 0xf9,0xc6,0x17,0x01,0x40,0x8d,0x41,0x02,0x40,0x02,0x01,0x00,0x41,0x09,0x20,
- 0x00,0x00,0xe0,0x8b,0x9e,0xbd,0x91,0x7b,0xba,0x36,0x00,0x00,0x00,0x7a,0xbe,
- 0xf7,0x01,0x77,0x73,0x01,0x80,0xe3,0x08,0xd1,0x20,0x08,0x19,0x25,0xcf,0x30,
- 0x65,0x67,0x22,0x00,0x20,0xd1,0x95,0x3c,0xf9,0xdf,0xfb,0xfb,0x7b,0x93,0x20,
- 0xc1,0x5d,0x9f,0xbc,0xa3,0x8d,0x44,0x44,0x97,0x00,0x00,0x00,0x02,0x01,0x00,
- 0xc5,0x3f,0x00,0x00,0x00,0xe8,0x8f,0x16,0xdb,0x80,0xaf,0xdb,0xbe,0x24,0x00,
- 0x00,0x5a,0x96,0xda,0x80,0xff,0xb2,0x11,0x80,0xc1,0x80,0xdd,0x28,0x80,0xd4,
- 0xdf,0x29,0x98,0x3c,0xb8,0xb3,0x41,0x88,0xf6,0x57,0x77,0xf1,0xff,0xff,0xfd,
- 0xdf,0x5e,0x2b,0xb0,0xfe,0x97,0x5e,0xf8,0xe7,0x93,0x40,0x93,0x20,0x00,0x00,
- 0x02,0x4d,0x99,0x07,0xcb,0x93,0x8d,0x01,0x31,0x09,0x8e,0xdd,0x81,0xfb,0xf2,
- 0x3a,0x00,0x00,0x20,0x7a,0x8e,0x5a,0x89,0x55,0xd3,0x81,0x08,0xd0,0x00,0xe7,
- 0x1b,0x80,0xbc,0x33,0x3c,0x04,0x36,0xe4,0xe9,0x00,0x62,0x2f,0xbf,0xee,0xf2,
- 0xfd,0xbf,0xff,0x7d,0x2b,0x63,0x60,0xf7,0x4f,0x46,0xbd,0xfa,0x2d,0x00,0x08,
- 0x08,0x00,0x03,0x46,0x6b,0x4d,0x03,0x4d,0x59,0x4b,0x01,0xa4,0x2a,0x9f,0xb7,
- 0x80,0x53,0xb3,0xbe,0x04,0x00,0x00,0x7a,0xdb,0xbe,0x21,0xff,0x76,0x05,0x00,
- 0xe5,0x10,0xc0,0x20,0x08,0x40,0x01,0x00,0x80,0x00,0x00,0x00,0x00,0xe8,0xcd,
- 0x65,0xfc,0xe4,0x77,0xf7,0x77,0xff,0x5a,0x54,0xa2,0xb6,0x67,0x7f,0x7a,0x0b,
- 0x77,0x11,0x0c,0x00,0x01,0x20,0x3c,0xd9,0x3b,0x0d,0xc9,0x37,0xb9,0x07,0x48,
- 0x4a,0x92,0x6c,0x81,0xf5,0xb2,0x3c,0x00,0x00,0x00,0x7a,0xcb,0xdd,0x81,0xed,
- 0xe7,0x05,0x02,0x3e,0x00,0x60,0x00,0x00,0x90,0x00,0x01,0x00,0x00,0x00,0x00,
- 0x08,0x11,0xb5,0xde,0xb8,0xc9,0xff,0xff,0xfd,0xff,0xd5,0x90,0xb0,0xba,0x93,
- 0xdb,0x8d,0xbf,0x42,0x02,0x1e,0x42,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x40,0x65,0x4f,0x9f,0xbf,0x91,0x7f,0xd7,0xbd,0x00,0x00,0x80,0x7a,0x5d,
- 0x6f,0x21,0xe7,0x66,0x83,0x00,0x0f,0x02,0x40,0x80,0x20,0xd2,0x00,0x00,0x00,
- 0x00,0x00,0x20,0x00,0xae,0xae,0xd3,0xf3,0x9b,0xd7,0xef,0xbf,0xff,0x1f,0x2c,
- 0x2d,0xdd,0x99,0x7f,0x57,0x4a,0xac,0x41,0x14,0x08,0x10,0x00,0x00,0x20,0x00,
- 0x00,0x10,0x00,0x00,0x00,0xe8,0x47,0xd3,0x6d,0x81,0xf7,0x75,0x35,0x04,0x00,
- 0x00,0x3a,0xd7,0xdc,0x89,0xef,0xe5,0x22,0xa0,0x83,0x00,0x10,0x00,0x00,0x20,
- 0x00,0x00,0x80,0xc0,0x08,0x00,0x00,0x61,0x11,0xea,0xce,0x36,0x7f,0xbf,0xff,
- 0xfe,0x69,0x0b,0x4d,0xf7,0xe4,0xca,0xb5,0x8e,0x2b,0x04,0x88,0x00,0x0b,0x08,
- 0x00,0x00,0x10,0x20,0x00,0x00,0x84,0x00,0x72,0x40,0x8b,0xef,0x81,0x55,0xd3,
- 0xbd,0x00,0x00,0x10,0x78,0xd5,0xdf,0x81,0x7b,0xa7,0x05,0x01,0x09,0x90,0x00,
- 0x10,0x04,0x38,0x80,0x00,0x00,0x30,0x01,0x82,0x20,0x40,0xc4,0xb0,0xbf,0x27,
- 0xfe,0xfb,0xaf,0xff,0x5b,0x93,0x4a,0x75,0xe4,0xfb,0x4a,0x3d,0x29,0x81,0x00,
- 0xa0,0x34,0x00,0x08,0x08,0x00,0x00,0x02,0x04,0x00,0x50,0xa8,0x00,0xdb,0xad,
- 0xa0,0xef,0xf7,0xbc,0x00,0x00,0x00,0x7a,0xdb,0xde,0x81,0xed,0xf6,0x22,0x88,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0c,0x02,0x20,0x00,0xa8,0x7f,
- 0xaf,0xb6,0x6d,0xee,0xbf,0xfb,0x00,0x00,0x0c,0x54,0xfd,0xec,0xb7,0xfd,0xfd,
- 0x5f,0x10,0x24,0x04,0x3e,0x00,0x00,0x01,0x04,0x01,0x80,0x80,0x00,0x04,0x32,
- 0x40,0x95,0xcf,0x81,0x73,0x55,0x2d,0x00,0x00,0x04,0x7a,0xc5,0x5b,0x11,0xff,
- 0xe5,0x09,0x80,0xff,0x00,0x04,0x02,0x80,0x00,0x00,0x00,0x40,0xe0,0x40,0x00,
- 0x08,0xe9,0xff,0x7e,0x7d,0x27,0xfe,0xf7,0x8f,0x0b,0xee,0xe3,0x49,0xed,0xd9,
- 0xff,0x77,0xd7,0xb6,0xef,0xdf,0xfb,0x57,0x40,0x40,0x80,0x00,0x70,0x04,0x00,
- 0x00,0x80,0x68,0x0d,0x9b,0x7e,0x81,0x7f,0xf3,0xbd,0x20,0x00,0x00,0x5a,0x97,
- 0xde,0x81,0x6d,0xb7,0x00,0x02,0x20,0x22,0x89,0x80,0x00,0x20,0x10,0x18,0x02,
- 0x94,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x90,0x61,0x3f,0x34,0xaa,0xea,0x60,
- 0xd9,0x16,0x22,0x00,0x89,0x2a,0x55,0xb5,0x6a,0xad,0x56,0x48,0x04,0x00,0x74,
- 0x10,0x90,0x10,0x44,0x00,0xf6,0x4f,0x96,0xeb,0x88,0xf7,0x5a,0x37,0x00,0x00,
- 0x00,0x6a,0x8a,0xb9,0x80,0x73,0xd3,0x01,0x20,0x09,0x00,0x04,0x20,0xa0,0x42,
- 0x00,0x0a,0x02,0xb0,0xef,0xfb,0x77,0x7f,0xf7,0xb7,0xef,0x9f,0xcd,0x57,0x9b,
- 0x03,0x00,0x52,0xa5,0x7e,0xe6,0xff,0xfe,0xdd,0xfb,0xdd,0xff,0xf7,0x71,0x00,
- 0xd5,0x3e,0xe5,0xd2,0x96,0x0f,0x00,0x20,0x01,0x00,0x95,0xde,0x81,0xb9,0x73,
- 0xae,0x04,0x00,0x00,0x58,0xb6,0xf7,0x00,0xbb,0xba,0x4a,0x00,0x00,0x91,0xba,
- 0x86,0x9a,0xa9,0xf2,0xe1,0x1c,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xd3,0x84,0xf0,0xff,0xff,0x1f,0x06,0xb1,0x0f,0x00,0x00,0x00,0x00,0x12,0x12,
- 0x24,0x2a,0xc0,0x58,0xa1,0x92,0x28,0x65,0x10,0x00,0x21,0x34,0x84,0x86,0xb9,
- 0xa0,0x7f,0xdb,0xb6,0x10,0x00,0x00,0xaa,0x26,0x3d,0x91,0xbd,0x59,0x03,0x00,
- 0x00,0x00,0xa5,0x6a,0x05,0x46,0x24,0x49,0x45,0xdc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x69,0x82,0xff,0xff,0xff,0xff,0x87,0xce,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x27,0x03,0x00,0x10,0x00,0x00,0x00,0x02,0x44,0x88,0x00,
- 0xa1,0x36,0x7f,0x81,0xcd,0x19,0xbe,0x00,0x00,0x08,0xfa,0x2e,0x7b,0x01,0x7b,
- 0xb9,0x43,0x04,0x48,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xb3,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0xf8,0xff,0xfd,0xff,0xff,0xbf,0x8e,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdb,0x02,0x04,0x00,0x00,0x00,0x00,0x02,
- 0x01,0x40,0x2a,0x80,0x36,0xb3,0x80,0xbd,0x79,0xbe,0x00,0x00,0x00,0xba,0x5b,
- 0x6f,0x00,0xcd,0x49,0x00,0x21,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,0x5f,0x95,0x00,0xf0,
- 0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x25,0x1a,0x42,0x48,0x41,
- 0x08,0x00,0x48,0x21,0xad,0x31,0x14,0x65,0xef,0x08,0xef,0x0c,0x31,0x10,0x00,
- 0x80,0xea,0x55,0x0a,0x04,0x58,0xac,0x54,0x00,0x00,0x08,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x10,0x15,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd5,0xee,0xb7,
- 0xad,0xfe,0x8b,0xfe,0xf7,0xa9,0xda,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xc6,
- 0x90,0x5a,0x1d,0x73,0x6f,0x27,0x94,0x5a,0xce,0x51,0x55,0x1d,0x40,0xbc,0x5c,
- 0xbf,0x00,0x00,0x00,0xf8,0xc5,0xfc,0xff,0xbf,0x56,0x9b,0x73,0x6b,0xe7,0xac,
- 0xbd,0xae,0x95,0xb3,0x56,0x4b,0xe5,0x49,0x0a,0x00,0x02,0x40,0x00,0x00,0x00,
- 0x3e,0x00,0x00,0x2b,0x20,0x30,0x00,0x70,0x01,0xe0,0x88,0xc0,0x06,0x40,0x80,
- 0x85,0x84,0x88,0xb4,0x56,0x45,0xa5,0x52,0x6a,0xa9,0xb5,0xab,0xb4,0x68,0xf6,
- 0xff,0xf7,0xb4,0xbf,0x04,0x00,0x00,0x9a,0xb9,0xd4,0xff,0x97,0x26,0x2d,0x55,
- 0x6d,0x55,0x1a,0x63,0x4a,0x90,0x54,0x2d,0x2a,0x95,0x56,0x05,0x07,0x06,0xc0,
- 0x61,0x00,0x00,0xe2,0x00,0x03,0x2f,0x70,0xe0,0x01,0xfc,0x03,0xf0,0x7f,0xc0,
- 0x1d,0xc0,0x00,0xb7,0x2b,0x53,0x6a,0xd7,0x56,0x49,0x0c,0x2b,0x2d,0xdf,0x67,
- 0xb5,0x88,0xd8,0xff,0x57,0xae,0xb5,0x00,0x00,0x00,0xda,0x1b,0xb9,0xb6,0x2e,
- 0xcb,0x4e,0x4b,0x0c,0xa9,0xb5,0xba,0xb7,0xb5,0x96,0xb2,0x57,0xb1,0xed,0x00,
- 0x0f,0x18,0x80,0xf7,0x00,0x07,0xae,0x09,0x07,0x0c,0x70,0x80,0x03,0xfc,0x07,
- 0xf8,0x2b,0x80,0x7f,0xc0,0x01,0x5f,0x72,0xb6,0xdf,0xfa,0xbd,0xf7,0xfb,0xea,
- 0xd6,0x6a,0xda,0x4b,0xdb,0xbd,0xfe,0x3d,0x93,0xbb,0x00,0x00,0x10,0xfa,0xaa,
- 0xe3,0xba,0x3c,0xab,0xfd,0xf7,0xf7,0xf7,0x6e,0x77,0xad,0x77,0xf7,0xfd,0xd6,
- 0x4e,0x5f,0x01,0x0f,0x38,0x04,0xf7,0x00,0x17,0x5e,0x81,0x97,0x0c,0x70,0x80,
- 0x03,0xbe,0x05,0xfc,0x5f,0x08,0x77,0xc0,0x20,0xbe,0x35,0x0a,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x04,0x20,0x56,0xd1,0x2e,0x16,0x47,0x3d,0x00,0x00,
- 0x00,0xe8,0x27,0xa6,0xb5,0x87,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0x78,0xb7,0x00,0x0f,0xb8,0x00,0xf6,0x00,0xe1,0xdf,0x00,0x07,
- 0x08,0x70,0x80,0x01,0x6e,0x02,0xbc,0xb0,0x01,0x5f,0xe0,0x80,0x9f,0xca,0xf1,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x87,0x63,0x5b,0xc5,0x69,
- 0xae,0x40,0x00,0x00,0xfa,0x2c,0x8d,0xaf,0xe3,0xe8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xaf,0xb7,0x5a,0x08,0x0f,0xb8,0x01,0xf0,0x04,0xf1,
- 0xb7,0x01,0x07,0x08,0x70,0xc0,0x03,0x3e,0x06,0x6c,0x8d,0x01,0x5e,0x40,0xc8,
- 0xbf,0xfc,0xc7,0xd5,0xbe,0xc5,0xba,0xea,0xff,0xdd,0xff,0xf7,0xff,0x6f,0x8c,
- 0x57,0x63,0xe4,0xbb,0x10,0x00,0x00,0xba,0x5c,0x1c,0xd6,0x70,0xe4,0xff,0xfd,
- 0xf7,0xee,0xfd,0xff,0xff,0x6f,0xfb,0xee,0xd7,0x6d,0xdd,0x00,0x07,0xb8,0x21,
- 0xb0,0x00,0xe3,0x5c,0x13,0x07,0x08,0xf0,0x80,0x23,0x5e,0x06,0xfc,0xdc,0x21,
- 0x3e,0xd0,0x80,0xaf,0xae,0xae,0xff,0xff,0xaa,0xfe,0xde,0xdf,0xf7,0xfd,0x55,
- 0xbf,0x9d,0x0e,0xdd,0xf1,0xb2,0xbd,0x00,0x00,0x00,0xea,0x9e,0x71,0x00,0x1c,
- 0xf5,0xfa,0x2b,0xfd,0xb7,0xbf,0xcf,0xf5,0xad,0xde,0x7f,0x6b,0x7f,0xbe,0x40,
- 0x0f,0xb8,0x07,0xf0,0x00,0x37,0x56,0x04,0x47,0x0e,0x71,0x80,0x03,0x1e,0x86,
- 0x38,0xec,0x01,0x7c,0xe0,0x80,0xb7,0xfa,0xcd,0xdf,0xdd,0x75,0xb7,0x55,0xf7,
- 0xbd,0xff,0xd5,0xbf,0x2f,0x71,0x00,0x1c,0xf9,0xb9,0x00,0x00,0x40,0x7a,0x3f,
- 0xe5,0x01,0x2f,0xda,0xdb,0x55,0x5f,0xef,0xed,0xfb,0xbe,0x6d,0xeb,0xaa,0xe3,
- 0xfb,0x7a,0x01,0x8f,0x18,0x0f,0xf0,0x00,0x0f,0xde,0x01,0x07,0x1c,0x70,0xc0,
- 0x01,0x0f,0x06,0x3c,0xcc,0x03,0x38,0xc4,0x04,0xaf,0xad,0xaa,0x97,0xfb,0xcd,
- 0xdb,0xff,0x3a,0xd7,0xfd,0xba,0xfd,0x7f,0xf5,0x21,0xaf,0x7c,0xb7,0x00,0x00,
- 0x00,0x48,0xfb,0x92,0xff,0xa3,0xfd,0xf6,0xe7,0xfe,0xd6,0x77,0xdf,0xf7,0xa7,
- 0x7e,0xf3,0x74,0x77,0xaf,0x00,0x07,0x1e,0x1b,0xf0,0x20,0x03,0xae,0x00,0x03,
- 0x1e,0x30,0xe0,0x00,0x02,0x02,0x08,0x84,0x01,0x18,0xc0,0x00,0x6f,0xbe,0x4d,
- 0x1c,0xfb,0xba,0xbe,0x55,0xef,0x7b,0xbb,0xad,0xdb,0xad,0x04,0xef,0x25,0xfe,
- 0xbb,0x20,0x00,0x00,0xfa,0xff,0x84,0x7c,0x80,0xee,0x7b,0x37,0xfb,0xbf,0xfb,
- 0xeb,0x6d,0x5b,0xfd,0xf1,0x6a,0x5d,0x7d,0x06,0x07,0x0e,0x2c,0x30,0x08,0x00,
- 0x1e,0x00,0x41,0x7f,0x20,0x38,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x01,0x83,
- 0xd8,0xfd,0xae,0xa5,0xbd,0x5d,0xef,0xef,0xef,0xfe,0x7e,0x5a,0xef,0xbb,0x28,
- 0xd6,0x12,0xf7,0x3d,0x00,0x00,0x00,0x9a,0xb5,0x33,0x02,0x2a,0xdb,0xf6,0xd5,
- 0x6a,0xdd,0xde,0xdf,0xd7,0xf5,0xba,0x2d,0x60,0xb4,0xde,0xfd,0xfa,0xff,0xdf,
- 0xff,0xff,0xff,0xf7,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x5f,0x5a,0x2a,0x3b,0xf7,0xbe,0xaf,0x5b,0xf7,0xeb,0x73,0xfd,
- 0x5e,0xcf,0x03,0x20,0xc9,0xbd,0xbb,0x08,0x00,0x00,0x7a,0xf7,0x62,0x01,0x88,
- 0x75,0xef,0x73,0xfd,0xdb,0xbf,0xef,0xef,0x5b,0x7d,0xcb,0xe5,0x75,0xbf,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x75,0x57,0xac,0x75,0xba,0x7c,0xaf,0xe7,
- 0xfb,0xae,0xad,0xd5,0xbf,0x07,0x50,0x60,0x6f,0xb5,0x00,0x00,0x00,0xba,0x7d,
- 0x1f,0xfe,0x71,0xb7,0xdf,0xdc,0xb6,0x7d,0xcf,0xbb,0xfb,0xf2,0xd7,0x51,0x51,
- 0x8f,0x77,0xfb,0xff,0xff,0x7f,0xff,0xff,0xff,0xdf,0xff,0xff,0x6f,0xff,0xaf,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xdd,0x1e,0xc7,0xaf,0x7d,
- 0xa7,0xff,0xdf,0xbf,0xdb,0xfa,0xfe,0xfb,0xff,0xa0,0xfe,0xef,0x3f,0x00,0x00,
- 0x40,0x72,0xdf,0xff,0x00,0xce,0xdf,0xb7,0x7b,0xef,0x77,0x7f,0xff,0xde,0xff,
- 0xff,0xff,0xff,0xfb,0x5d,0xea,0xff,0xe5,0xef,0xfe,0xff,0xff,0x37,0xff,0xff,
- 0xdb,0xee,0x7b,0xff,0xff,0xff,0xdd,0xf7,0xff,0x7b,0xab,0xaa,0x2a,0x85,0x54,
- 0x55,0x54,0x52,0x52,0x51,0x04,0x84,0x14,0x02,0x08,0x04,0x00,0x12,0x09,0x00,
- 0x80,0x00,0x00,0x10,0xf8,0xff,0xff,0xd7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xbf,0xff,0xde,0x56,0xad,0xaa,0x56,0x53,0x15,0x04,0x0a,0x11,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
- 0x00,0x00,0x20,0x80,0x24,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x22,0x22,0x91,0xac,0xea,0x6a,0x7b,0xed,
- 0xbe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xb7,
- 0xde,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x20,0x04,0x01,0x00,0x00,0x00,0x4a,0xca,0xaa,0xbe,0xdd,
- 0x76,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xef,0xfd,0x6d,0x6d,0xab,0xaa,
- 0x9a,0x4a,0x81,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x40,0x02,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x01,0x00,0x20,0x80,0x00,0x00,0x00,
- 0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x44,0x10,0xa4,0x08,0x80,0x80,0x00,0x08,
- 0x80,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x02,0x21,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
- 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x10,0x10,0x00,0x80,0x40,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x08,0x00,0x00,0x42,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,
- 0x41,0x00,0x02,0x04,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x40,0x04,0x00,0x80,
- 0x00,0x00,0x20,0x00,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x04,0x02,
- 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x02,0x10,0x02,0x80,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00,0x00,0x10,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x22,0x02,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x00,0x00,0x20,0x04,0x00,
- 0x08,0x00,0x04,0x80,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x00,
- 0x00,0x00,0x40,0x24,0x84,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x01,0x20,0x10,0x84,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x08,0x20,0x00,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x02,0x80,0x00,0x00,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x01,
- 0x00,0x00,0x00,0x24,0x02,0x01,0x00,0x00,0x00,0x00,0x20,0x00,0x14,0x88,0x10,
- 0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x10,0x00,0x40,0x00,0x40,0x00,0x42,0x00,
- 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x21,0x00,0x08,0x04,0x01,0x08,0x00,0x48,
- 0x00,0x00,0x04,0x08,0x00,0x80,0x00,0x10,0x00,0x20,0x00,0x08,0x00,0x40,0x00,
- 0x00,0x00,0x00,0x08,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/blt3.0/demos/bitmaps/hand/hand01.xbm b/blt3.0/demos/bitmaps/hand/hand01.xbm
deleted file mode 100644
index 096b56c..0000000
--- a/blt3.0/demos/bitmaps/hand/hand01.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-1_width 16
-#define hand6-1_height 16
-#define hand6-1_x_hot 8
-#define hand6-1_y_hot 10
-static unsigned char hand6-1_bits[] = {
-   0x00, 0x00, 0x80, 0x03, 0xe0, 0x0e, 0xa0, 0x1a, 0xa0, 0x2a, 0xa0, 0x2a,
-   0xa0, 0x2a, 0xb8, 0x2a, 0x28, 0x28, 0x28, 0x20, 0x28, 0x20, 0x08, 0x20,
-   0x08, 0x20, 0x10, 0x20, 0x20, 0x10, 0xe0, 0x1f};
diff --git a/blt3.0/demos/bitmaps/hand/hand01m.xbm b/blt3.0/demos/bitmaps/hand/hand01m.xbm
deleted file mode 100644
index eabce63..0000000
--- a/blt3.0/demos/bitmaps/hand/hand01m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-1m_width 16
-#define hand6-1m_height 16
-#define hand6-1m_x_hot 8
-#define hand6-1m_y_hot 9
-static unsigned char hand6-1m_bits[] = {
-   0x00, 0x00, 0x80, 0x03, 0xe0, 0x0f, 0xe0, 0x1f, 0xe0, 0x3f, 0xe0, 0x3f,
-   0xe0, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f,
-   0xf8, 0x3f, 0xf0, 0x3f, 0xe0, 0x1f, 0xe0, 0x1f};
diff --git a/blt3.0/demos/bitmaps/hand/hand02.xbm b/blt3.0/demos/bitmaps/hand/hand02.xbm
deleted file mode 100644
index 39cbf11..0000000
--- a/blt3.0/demos/bitmaps/hand/hand02.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-02_width 16
-#define hand6-02_height 16
-#define hand6-02_x_hot 10
-#define hand6-02_y_hot 11
-static unsigned char hand6-02_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0xbc, 0xaa, 0xa4, 0xaa, 0xa4, 0xa0, 0xbc, 0x80, 0x80, 0x80,
-   0xf8, 0x80, 0x08, 0x80, 0xf8, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand02m.xbm b/blt3.0/demos/bitmaps/hand/hand02m.xbm
deleted file mode 100644
index 6466efe..0000000
--- a/blt3.0/demos/bitmaps/hand/hand02m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-02m_width 16
-#define hand6-02m_height 16
-#define hand6-02m_x_hot 10
-#define hand6-02m_y_hot 11
-static unsigned char hand6-02m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0x80, 0xff,
-   0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand03.xbm b/blt3.0/demos/bitmaps/hand/hand03.xbm
deleted file mode 100644
index 9ad0c3d..0000000
--- a/blt3.0/demos/bitmaps/hand/hand03.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-03_width 16
-#define hand6-03_height 16
-#define hand6-03_x_hot 10
-#define hand6-03_y_hot 11
-static unsigned char hand6-03_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0xbc, 0xaa, 0xa4, 0xaa, 0xa4, 0xaa, 0xbc, 0xa0, 0x80, 0x80, 0x80, 0x80,
-   0xf8, 0x80, 0x08, 0x80, 0xf8, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand03m.xbm b/blt3.0/demos/bitmaps/hand/hand03m.xbm
deleted file mode 100644
index 026b54c..0000000
--- a/blt3.0/demos/bitmaps/hand/hand03m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-03m_width 16
-#define hand6-03m_height 16
-#define hand6-03m_x_hot 10
-#define hand6-03m_y_hot 11
-static unsigned char hand6-03m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0xbc, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0x80, 0xff, 0x80, 0xff,
-   0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand04.xbm b/blt3.0/demos/bitmaps/hand/hand04.xbm
deleted file mode 100644
index 0fb8628..0000000
--- a/blt3.0/demos/bitmaps/hand/hand04.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-04_width 16
-#define hand6-04_height 16
-#define hand6-04_x_hot 10
-#define hand6-04_y_hot 11
-static unsigned char hand6-04_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0xbc, 0x6a,
-   0xa4, 0xaa, 0xa4, 0xaa, 0xbc, 0xaa, 0x80, 0xa0, 0xb8, 0x80, 0xc8, 0x80,
-   0x98, 0x80, 0x30, 0x80, 0xe0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand04m.xbm b/blt3.0/demos/bitmaps/hand/hand04m.xbm
deleted file mode 100644
index e391196..0000000
--- a/blt3.0/demos/bitmaps/hand/hand04m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-04m_width 16
-#define hand6-04m_height 16
-#define hand6-04m_x_hot 10
-#define hand6-04m_y_hot 11
-static unsigned char hand6-04m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0xbc, 0x7f,
-   0xbc, 0xff, 0xbc, 0xff, 0xbc, 0xff, 0x80, 0xff, 0xb8, 0xff, 0xf8, 0xff,
-   0xf8, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand05.xbm b/blt3.0/demos/bitmaps/hand/hand05.xbm
deleted file mode 100644
index 57708c3..0000000
--- a/blt3.0/demos/bitmaps/hand/hand05.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-05_width 16
-#define hand6-05_height 16
-#define hand6-05_x_hot 10
-#define hand6-05_y_hot 11
-static unsigned char hand6-05_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xbc, 0x3b, 0xa4, 0x2a, 0xa4, 0x6a,
-   0xbc, 0xaa, 0x80, 0xaa, 0x80, 0xaa, 0x80, 0xa0, 0xb8, 0x80, 0xc8, 0x80,
-   0x98, 0x80, 0x30, 0x80, 0xe0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand05m.xbm b/blt3.0/demos/bitmaps/hand/hand05m.xbm
deleted file mode 100644
index 8d6704c..0000000
--- a/blt3.0/demos/bitmaps/hand/hand05m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-05m_width 16
-#define hand6-05m_height 16
-#define hand6-05m_x_hot 10
-#define hand6-05m_y_hot 11
-static unsigned char hand6-05m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xbc, 0x3f, 0xbc, 0x3f, 0xbc, 0x7f,
-   0xbc, 0xff, 0x80, 0xff, 0x80, 0xff, 0x80, 0xff, 0xb8, 0xff, 0xf8, 0xff,
-   0xf8, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand06.xbm b/blt3.0/demos/bitmaps/hand/hand06.xbm
deleted file mode 100644
index 6e0aae0..0000000
--- a/blt3.0/demos/bitmaps/hand/hand06.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-06_width 16
-#define hand6-06_height 16
-#define hand6-06_x_hot 10
-#define hand6-06_y_hot 11
-static unsigned char hand6-06_bits[] = {
-   0x00, 0x00, 0x3c, 0x00, 0x24, 0x0e, 0xa4, 0x3b, 0xbc, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0x80, 0xaa, 0x80, 0xa0, 0xb8, 0x80, 0xc8, 0x80,
-   0x98, 0x80, 0x30, 0x80, 0xe0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand06m.xbm b/blt3.0/demos/bitmaps/hand/hand06m.xbm
deleted file mode 100644
index de93e1d..0000000
--- a/blt3.0/demos/bitmaps/hand/hand06m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-06m_width 16
-#define hand6-06m_height 16
-#define hand6-06m_x_hot 10
-#define hand6-06m_y_hot 11
-static unsigned char hand6-06m_bits[] = {
-   0x00, 0x00, 0x3c, 0x00, 0x3c, 0x0e, 0xbc, 0x3f, 0xbc, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0x80, 0xff, 0x80, 0xff, 0xb8, 0xff, 0xf8, 0xff,
-   0xf8, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand07.xbm b/blt3.0/demos/bitmaps/hand/hand07.xbm
deleted file mode 100644
index dbc002a..0000000
--- a/blt3.0/demos/bitmaps/hand/hand07.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-07_width 16
-#define hand6-07_height 16
-#define hand6-07_x_hot 10
-#define hand6-07_y_hot 11
-static unsigned char hand6-07_bits[] = {
-   0x1e, 0x00, 0x12, 0x00, 0x12, 0x0e, 0x9e, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand07m.xbm b/blt3.0/demos/bitmaps/hand/hand07m.xbm
deleted file mode 100644
index 3b435a8..0000000
--- a/blt3.0/demos/bitmaps/hand/hand07m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-07m_width 16
-#define hand6-07m_height 16
-#define hand6-07m_x_hot 10
-#define hand6-07m_y_hot 11
-static unsigned char hand6-07m_bits[] = {
-   0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x0e, 0x9e, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand08.xbm b/blt3.0/demos/bitmaps/hand/hand08.xbm
deleted file mode 100644
index 2ed12f4..0000000
--- a/blt3.0/demos/bitmaps/hand/hand08.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-08_width 16
-#define hand6-08_height 16
-#define hand6-08_x_hot 10
-#define hand6-08_y_hot 11
-static unsigned char hand6-08_bits[] = {
-   0x00, 0x00, 0x0f, 0x00, 0x09, 0x0e, 0x89, 0x3b, 0x8f, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand08m.xbm b/blt3.0/demos/bitmaps/hand/hand08m.xbm
deleted file mode 100644
index c1c700e..0000000
--- a/blt3.0/demos/bitmaps/hand/hand08m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-08m_width 16
-#define hand6-08m_height 16
-#define hand6-08m_x_hot 10
-#define hand6-08m_y_hot 11
-static unsigned char hand6-08m_bits[] = {
-   0x00, 0x00, 0x0f, 0x00, 0x0f, 0x0e, 0x8f, 0x3f, 0x8f, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand09.xbm b/blt3.0/demos/bitmaps/hand/hand09.xbm
deleted file mode 100644
index 589b415..0000000
--- a/blt3.0/demos/bitmaps/hand/hand09.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-09_width 16
-#define hand6-09_height 16
-#define hand6-09_x_hot 10
-#define hand6-09_y_hot 11
-static unsigned char hand6-09_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x0f, 0x0e, 0x89, 0x3b, 0x89, 0x2a, 0x8f, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand09m.xbm b/blt3.0/demos/bitmaps/hand/hand09m.xbm
deleted file mode 100644
index ec289cc..0000000
--- a/blt3.0/demos/bitmaps/hand/hand09m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-09m_width 16
-#define hand6-09m_height 16
-#define hand6-09m_x_hot 10
-#define hand6-09m_y_hot 11
-static unsigned char hand6-09m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x0f, 0x0e, 0x8f, 0x3f, 0x8f, 0x3f, 0x8f, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand10.xbm b/blt3.0/demos/bitmaps/hand/hand10.xbm
deleted file mode 100644
index e0c728f..0000000
--- a/blt3.0/demos/bitmaps/hand/hand10.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-10_width 16
-#define hand6-10_height 16
-#define hand6-10_x_hot 10
-#define hand6-10_y_hot 11
-static unsigned char hand6-10_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x8f, 0x2a, 0x89, 0x6a,
-   0x89, 0xaa, 0x8f, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand10m.xbm b/blt3.0/demos/bitmaps/hand/hand10m.xbm
deleted file mode 100644
index 49c134b..0000000
--- a/blt3.0/demos/bitmaps/hand/hand10m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-10m_width 16
-#define hand6-10m_height 16
-#define hand6-10m_x_hot 10
-#define hand6-10m_y_hot 11
-static unsigned char hand6-10m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x8f, 0x3f, 0x8f, 0x7f,
-   0x8f, 0xff, 0x8f, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand11.xbm b/blt3.0/demos/bitmaps/hand/hand11.xbm
deleted file mode 100644
index 719919b..0000000
--- a/blt3.0/demos/bitmaps/hand/hand11.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-11_width 16
-#define hand6-11_height 16
-#define hand6-11_x_hot 10
-#define hand6-11_y_hot 11
-static unsigned char hand6-11_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x8f, 0xaa, 0x89, 0xaa, 0xe9, 0xaa, 0xaf, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand11m.xbm b/blt3.0/demos/bitmaps/hand/hand11m.xbm
deleted file mode 100644
index 5ea63b3..0000000
--- a/blt3.0/demos/bitmaps/hand/hand11m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-11m_width 16
-#define hand6-11m_height 16
-#define hand6-11m_x_hot 10
-#define hand6-11m_y_hot 11
-static unsigned char hand6-11m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x8f, 0xff, 0x8f, 0xff, 0xef, 0xff, 0xef, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand12.xbm b/blt3.0/demos/bitmaps/hand/hand12.xbm
deleted file mode 100644
index c394581..0000000
--- a/blt3.0/demos/bitmaps/hand/hand12.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-12_width 16
-#define hand6-12_height 16
-#define hand6-12_x_hot 10
-#define hand6-12_y_hot 11
-static unsigned char hand6-12_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xef, 0xaa, 0xa9, 0xa0, 0xa9, 0x80, 0xaf, 0x80,
-   0x20, 0x80, 0x60, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand12m.xbm b/blt3.0/demos/bitmaps/hand/hand12m.xbm
deleted file mode 100644
index d0cf21b..0000000
--- a/blt3.0/demos/bitmaps/hand/hand12m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-12m_width 16
-#define hand6-12m_height 16
-#define hand6-12m_x_hot 10
-#define hand6-12m_y_hot 11
-static unsigned char hand6-12m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff,
-   0xe0, 0xff, 0xe0, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand13.xbm b/blt3.0/demos/bitmaps/hand/hand13.xbm
deleted file mode 100644
index 414efb0..0000000
--- a/blt3.0/demos/bitmaps/hand/hand13.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-13_width 16
-#define hand6-13_height 16
-#define hand6-13_x_hot 10
-#define hand6-13_y_hot 11
-static unsigned char hand6-13_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xaf, 0x80, 0xa9, 0x80,
-   0x29, 0x80, 0x6f, 0x80, 0xc0, 0xc0, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand13m.xbm b/blt3.0/demos/bitmaps/hand/hand13m.xbm
deleted file mode 100644
index 6179c56..0000000
--- a/blt3.0/demos/bitmaps/hand/hand13m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-13m_width 16
-#define hand6-13m_height 16
-#define hand6-13m_x_hot 10
-#define hand6-13m_y_hot 11
-static unsigned char hand6-13m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xef, 0xff, 0xef, 0xff,
-   0xef, 0xff, 0xef, 0xff, 0xc0, 0xff, 0x80, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand14.xbm b/blt3.0/demos/bitmaps/hand/hand14.xbm
deleted file mode 100644
index f1f9c27..0000000
--- a/blt3.0/demos/bitmaps/hand/hand14.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-14_width 16
-#define hand6-14_height 16
-#define hand6-14_x_hot 10
-#define hand6-14_y_hot 11
-static unsigned char hand6-14_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3b, 0x80, 0x2a, 0x80, 0x6a,
-   0x80, 0xaa, 0x80, 0xaa, 0xe0, 0xaa, 0xa0, 0xa0, 0xa0, 0x80, 0xa0, 0x80,
-   0x2f, 0x80, 0x69, 0x80, 0xc9, 0xc0, 0x8f, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hand/hand14m.xbm b/blt3.0/demos/bitmaps/hand/hand14m.xbm
deleted file mode 100644
index f623eec..0000000
--- a/blt3.0/demos/bitmaps/hand/hand14m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define hand6-14m_width 16
-#define hand6-14m_height 16
-#define hand6-14m_x_hot 10
-#define hand6-14m_y_hot 11
-static unsigned char hand6-14m_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x3f, 0x80, 0x3f, 0x80, 0x7f,
-   0x80, 0xff, 0x80, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xe0, 0xff,
-   0xef, 0xff, 0xef, 0xff, 0xcf, 0xff, 0x8f, 0x7f};
diff --git a/blt3.0/demos/bitmaps/hobbes.xbm b/blt3.0/demos/bitmaps/hobbes.xbm
deleted file mode 100644
index a3778c3..0000000
--- a/blt3.0/demos/bitmaps/hobbes.xbm
+++ /dev/null
@@ -1,16 +0,0 @@
-#define hobbes_width 25
-#define hobbes_height 25
-#define hobbes_x_hot 16
-#define hobbes_y_hot 15
-static char hobbes_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00,
-   0x78, 0xe0, 0x07, 0x00, 0xfc, 0xf8, 0x07, 0x00, 0xcc, 0x07, 0x04, 0x00,
-   0x0c, 0xf0, 0x0b, 0x00, 0x7c, 0x1c, 0x06, 0x00, 0x38, 0x00, 0x00, 0x00,
-   0xe0, 0x03, 0x10, 0x00, 0xe0, 0x41, 0x11, 0x00, 0x20, 0x40, 0x11, 0x00,
-   0xe0, 0x07, 0x10, 0x00, 0xe0, 0xc1, 0x17, 0x00, 0x10, 0xe0, 0x2f, 0x00,
-   0x20, 0xe0, 0x6f, 0x00, 0x18, 0xe0, 0x2f, 0x00, 0x20, 0xc6, 0x67, 0x00,
-   0x18, 0x84, 0x2b, 0x00, 0x20, 0x08, 0x64, 0x00, 0x70, 0xf0, 0x13, 0x00,
-   0x80, 0x01, 0x08, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00};
-
-
diff --git a/blt3.0/demos/bitmaps/hobbes_mask.xbm b/blt3.0/demos/bitmaps/hobbes_mask.xbm
deleted file mode 100644
index 682ce5f..0000000
--- a/blt3.0/demos/bitmaps/hobbes_mask.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define hobbes_width 25
-#define hobbes_height 25
-#define hobbes_x_hot 16
-#define hobbes_y_hot 15
-static unsigned char hobbes_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00,
-   0x78, 0xe0, 0x07, 0x00, 0xfc, 0xf8, 0x07, 0x00, 0xfc, 0xff, 0x07, 0x00,
-   0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0xf8, 0xff, 0x0f, 0x00,
-   0xe0, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x1f, 0x00,
-   0xe0, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x3f, 0x00,
-   0xe0, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0x7f, 0x00,
-   0xf8, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
-   0x80, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00};
diff --git a/blt3.0/demos/bitmaps/sharky.xbm b/blt3.0/demos/bitmaps/sharky.xbm
deleted file mode 100644
index 25f923f..0000000
--- a/blt3.0/demos/bitmaps/sharky.xbm
+++ /dev/null
@@ -1,129 +0,0 @@
-#define sharky_width 171
-#define sharky_height 68
-static char sharky_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x80, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xe0, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
-   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0xd0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x54, 0xfd, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x49, 0x92, 0x54, 0x55, 0x45, 0xeb,
-   0x07, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x10, 0x41, 0x55, 0x84, 0x44, 0x85, 0xa2, 0x50, 0x94, 0x0f, 0x00,
-   0x00, 0x06, 0x00, 0xfc, 0x17, 0x00, 0x40, 0x12, 0x12, 0x42, 0x00, 0x01,
-   0x04, 0x04, 0x51, 0x75, 0x75, 0xd5, 0xae, 0x55, 0x10, 0x00, 0x80, 0x0f,
-   0x00, 0xfe, 0x1f, 0x00, 0x5c, 0x54, 0x45, 0x89, 0x04, 0x10, 0x00, 0x80,
-   0x08, 0x55, 0xd5, 0x5e, 0x55, 0xa5, 0x25, 0x15, 0xa0, 0x1f, 0x00, 0xfe,
-   0x1f, 0x00, 0xde, 0x55, 0xb5, 0x76, 0x65, 0x25, 0x52, 0x22, 0xd0, 0x56,
-   0x7b, 0xd5, 0xff, 0x5d, 0xb5, 0xa2, 0xd7, 0x1f, 0x00, 0xff, 0x0d, 0x00,
-   0x17, 0x41, 0x40, 0x00, 0x7a, 0x95, 0x00, 0x91, 0x0a, 0xd9, 0xed, 0x7f,
-   0xd5, 0x73, 0x5b, 0x55, 0x54, 0x7f, 0x80, 0xde, 0x07, 0x00, 0xab, 0x54,
-   0x14, 0x49, 0xa8, 0x6e, 0x55, 0x0c, 0x64, 0x75, 0xff, 0xff, 0xbf, 0xde,
-   0x57, 0xd5, 0x95, 0xfa, 0x43, 0x7f, 0x07, 0x00, 0x17, 0x00, 0x09, 0x00,
-   0x74, 0xd1, 0x5b, 0xb5, 0xa9, 0xdd, 0xd5, 0xf7, 0xfd, 0x5f, 0x5e, 0x55,
-   0x52, 0x95, 0xdd, 0xfd, 0x05, 0x00, 0x76, 0x55, 0x52, 0x25, 0xf9, 0x15,
-   0x76, 0x6f, 0xb6, 0xf7, 0xff, 0xff, 0xff, 0xfb, 0xd7, 0xf7, 0xaa, 0x75,
-   0xf7, 0xf7, 0x03, 0x00, 0xd8, 0x15, 0x50, 0x00, 0xf8, 0x60, 0xe8, 0xdd,
-   0x5d, 0x7f, 0xff, 0xff, 0xef, 0xff, 0xfd, 0x5e, 0x5b, 0xff, 0xbf, 0xad,
-   0x03, 0x00, 0x70, 0x27, 0x05, 0x49, 0xf9, 0x0a, 0x12, 0xb6, 0xf5, 0xfd,
-   0x7f, 0xdf, 0xfd, 0xff, 0xff, 0xdf, 0xff, 0xbd, 0x6d, 0xd6, 0x07, 0x00,
-   0xe0, 0x5b, 0x75, 0x04, 0x7c, 0x01, 0x40, 0xa8, 0xee, 0xff, 0xff, 0xff,
-   0xdf, 0xff, 0xbf, 0xff, 0xeb, 0xd7, 0xd5, 0xbd, 0x05, 0x00, 0x80, 0x7f,
-   0x05, 0x51, 0xb1, 0x44, 0x95, 0x46, 0x75, 0xe7, 0xff, 0xff, 0xff, 0xde,
-   0xfb, 0xfb, 0x7e, 0x7d, 0x75, 0xef, 0x07, 0x00, 0x00, 0x7e, 0x5b, 0x12,
-   0x00, 0x10, 0x00, 0x18, 0x4a, 0x9d, 0xfd, 0xdf, 0xf6, 0xfb, 0xff, 0xdf,
-   0xd7, 0xa5, 0x4d, 0xd5, 0x06, 0x00, 0x00, 0xf8, 0xd7, 0xad, 0x0a, 0x02,
-   0x44, 0x82, 0x52, 0x77, 0xef, 0xfd, 0xbf, 0xdf, 0xd6, 0xf6, 0x7e, 0x5f,
-   0x03, 0xf7, 0x0f, 0x00, 0x00, 0xe0, 0x5f, 0xb6, 0x44, 0x08, 0x11, 0x51,
-   0x54, 0x4a, 0xbb, 0xf7, 0xed, 0x7a, 0xdf, 0xdd, 0xd5, 0x75, 0x00, 0x5e,
-   0x1d, 0x00, 0x00, 0x00, 0x3f, 0x93, 0x5d, 0x43, 0x44, 0x08, 0x11, 0x69,
-   0xd5, 0x5e, 0x7f, 0xdf, 0x7b, 0x77, 0x75, 0x3b, 0x00, 0xf0, 0x2b, 0x00,
-   0x00, 0x00, 0xfc, 0x5d, 0x67, 0x11, 0x00, 0x21, 0x44, 0x55, 0x7b, 0x75,
-   0xd5, 0x6b, 0xd5, 0x6d, 0x5f, 0x07, 0x00, 0x50, 0x37, 0x00, 0x00, 0x00,
-   0xf0, 0xff, 0x9d, 0x84, 0x48, 0x48, 0x89, 0x50, 0xb6, 0xd6, 0xbd, 0x5a,
-   0x77, 0xdb, 0xd6, 0x3d, 0x00, 0xc0, 0x76, 0x00, 0x00, 0x00, 0x80, 0xff,
-   0xff, 0x57, 0x40, 0x02, 0x45, 0x44, 0xd7, 0x55, 0x55, 0xd5, 0x54, 0x55,
-   0x35, 0x33, 0x00, 0x80, 0xdf, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f,
-   0x15, 0x50, 0x50, 0xd1, 0x7f, 0x54, 0xb5, 0x56, 0xdd, 0xf6, 0x1d, 0x5c,
-   0x00, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x40, 0x45, 0x09,
-   0x41, 0xe4, 0x5f, 0x95, 0x52, 0x55, 0x25, 0x55, 0x07, 0x74, 0x00, 0x00,
-   0xbc, 0x01, 0x00, 0x00, 0x00, 0x80, 0x54, 0x12, 0x32, 0x11, 0x15, 0xf1,
-   0xff, 0x52, 0x15, 0x53, 0xa9, 0xdd, 0x1f, 0x10, 0x00, 0x00, 0xe8, 0x02,
-   0x00, 0x00, 0x00, 0x40, 0x05, 0xc9, 0x44, 0x49, 0x55, 0xf4, 0xf7, 0x12,
-   0x45, 0x11, 0x55, 0xd5, 0x1f, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
-   0x00, 0xc0, 0xff, 0x56, 0x5b, 0xb5, 0xa4, 0xea, 0x5f, 0x4f, 0x51, 0xcc,
-   0xd6, 0x3f, 0x74, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-   0xff, 0xff, 0xf5, 0x56, 0x5b, 0xf5, 0xff, 0x50, 0x55, 0xdb, 0xff, 0x1f,
-   0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff,
-   0xbf, 0xff, 0x55, 0xff, 0xff, 0xaf, 0xd6, 0xff, 0xc1, 0x17, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xef,
-   0xfe, 0xf7, 0xff, 0xdf, 0xff, 0x05, 0xe0, 0x0b, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0xdf, 0xff,
-   0xff, 0xff, 0x1e, 0x00, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xaf,
-   0x1f, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x02, 0x00, 0x3c, 0x00,
-   0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0x00, 0x80, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
-   0xff, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03,
-   0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00,
-   0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0,
-   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
-   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec,
-   0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x0f, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xda, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xf4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
-   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x03, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
diff --git a/blt3.0/demos/bitmaps/xbob.xbm b/blt3.0/demos/bitmaps/xbob.xbm
deleted file mode 100644
index 5ed778d..0000000
--- a/blt3.0/demos/bitmaps/xbob.xbm
+++ /dev/null
@@ -1,46 +0,0 @@
-#define bob_x_hot 30
-#define bob_y_hot 37
-#define bob_width 61
-#define bob_height 75
-static short bobr_bits[] = {            /* a right-going ``Bob'' */
-   0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffe0, 0x07ff, 0x0000,
-   0x0000, 0xfffe, 0x1fff, 0x0000, 0x8000, 0xffff, 0xfbff, 0x0000,
-   0xc000, 0xcfff, 0xd19f, 0x0003, 0xf000, 0x8c7f, 0x9133, 0x0007,
-   0xf800, 0x18a7, 0xb127, 0x0006, 0xfc00, 0x3147, 0xa64e, 0x000e,
-   0xfe00, 0x214f, 0xae4c, 0x003d, 0xff00, 0x23df, 0xbe8d, 0x007d,
-   0xff80, 0x67ff, 0xfebd, 0x01ff, 0xff80, 0x7fff, 0xffbf, 0x03ff,
-   0xffc0, 0xffff, 0xffbf, 0x07f8, 0xffc0, 0xffff, 0x3fbf, 0x07f8,
-   0xffc0, 0xffff, 0x07ff, 0x0ff8, 0xffc0, 0xffff, 0x003f, 0x0ff8,
-   0x7fe0, 0xf800, 0x0007, 0x0ff0, 0x3fe0, 0x0000, 0x0000, 0x07f0,
-   0x3fe0, 0x0000, 0x0000, 0x07f0, 0x3fe0, 0x0000, 0x0000, 0x07f4,
-   0x3fe0, 0x0000, 0x0000, 0x07e4, 0x3fe0, 0x0000, 0x0000, 0x07e4,
-   0x3fe0, 0x0000, 0x0000, 0x07e6, 0x3fe0, 0x0000, 0x0000, 0x07e7,
-   0x3fe0, 0x0000, 0x0000, 0x07e6, 0x3fe0, 0x0000, 0x0000, 0x07e6,
-   0x3fe0, 0x0000, 0x0000, 0x07e6, 0x3fc0, 0x0000, 0x7800, 0x07f6,
-   0xbfa0, 0x00ff, 0xff00, 0x07f7, 0x9f70, 0x01ff, 0xff80, 0x07ef,
-   0x1cf0, 0x0380, 0x01e0, 0x07ef, 0x1ff0, 0x07be, 0x3ff0, 0x07ee,
-   0x9de0, 0x1f83, 0xe1f8, 0x07dc, 0xc1e0, 0x1f7f, 0xfffc, 0x07c8,
-   0xc1e0, 0x1e69, 0xca7e, 0x03c0, 0x81e0, 0x1fb8, 0x0ec0, 0x03c0,
-   0x01e0, 0x1bc0, 0xcfc0, 0x03c1, 0x03c0, 0x11f7, 0x7f00, 0x03c0,
-   0x03c0, 0x187c, 0x1c00, 0x02c0, 0x02c0, 0x0830, 0x0000, 0x0340,
-   0x0340, 0x0800, 0x0000, 0x0240, 0x1340, 0x0c00, 0x0000, 0x0260,
-   0x1240, 0x0e00, 0x0000, 0x03c0, 0x3380, 0x0e80, 0x0000, 0x01a8,
-   0x3300, 0x0f40, 0x03a0, 0x002c, 0x7400, 0x0f30, 0x0738, 0x002e,
-   0x7400, 0x1f98, 0x1e1e, 0x002f, 0xfc00, 0xff8f, 0xfc0f, 0x002f,
-   0xf800, 0xffe3, 0xf803, 0x002f, 0xf800, 0xfffd, 0xff81, 0x003f,
-   0xb800, 0x1ff9, 0x0ff8, 0x001e, 0x3000, 0xf0f1, 0x030f, 0x000e,
-   0x3000, 0x01f1, 0x0180, 0x000f, 0x2000, 0xf7f1, 0x00ff, 0x0007,
-   0x6000, 0x01e3, 0x8060, 0x0007, 0x6000, 0xefc3, 0x803f, 0x0003,
-   0x4000, 0xffc2, 0xc00f, 0x0003, 0xc000, 0x1fe6, 0xc000, 0x0001,
-   0x8000, 0xfef4, 0xe03f, 0x0000, 0x8000, 0xfe79, 0xe01f, 0x0000,
-   0x01c0, 0x3e3d, 0x7000, 0x0000, 0x0630, 0x0f3e, 0x3800, 0x0000,
-   0x8cc8, 0x071f, 0x3800, 0x0000, 0xccf4, 0x078f, 0x1c00, 0x0000,
-   0xee72, 0x07f7, 0x0e00, 0x0000, 0xff02, 0x07e3, 0x0700, 0x0000,
-   0xfe32, 0xffc1, 0x038f, 0x0000, 0xfe3e, 0xff80, 0x01ff, 0x0000,
-   0x7c7e, 0x0000, 0x007e, 0x0000, 0x3c7c, 0x0000, 0x0000, 0x0000,
-   0x1cfc, 0x0000, 0x0000, 0x0000, 0x1cf8, 0x0000, 0x0000, 0x0000,
-   0x0ff0, 0x0000, 0x0000, 0x0000, 0x07e0, 0x0000, 0x0000, 0x0000,
-   0x0000, 0x0000, 0x0000, 0x0000};
-
-
-
diff --git a/blt3.0/demos/busy1.tcl b/blt3.0/demos/busy1.tcl
deleted file mode 100755
index 268084c..0000000
--- a/blt3.0/demos/busy1.tcl
+++ /dev/null
@@ -1,242 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set image [image create picture -file images/tan_paper.gif] 
-#set normalBg [blt::bgpattern create tile -image $image]
-set normalBg [blt::bgpattern create texture -high grey95 -low grey90]
-set activeBg [blt::bgpattern create texture -high red1 -low red2]
-#set normalBg grey80
-#set normalBg grey80
-#set activeBg grey70
-
-#
-# Script to test the "busy" command.
-# 
-
-#
-# General widget class resource attributes
-#
-option add *Button.padX 	10
-option add *Button.padY 	2
-option add *Scale.relief 	sunken
-#option add *Scale.orient	horizontal
-option add *Entry.relief 	sunken
-option add *borderWidth 	1
-
-set visual [winfo screenvisual .] 
-if { $visual == "staticgray"  || $visual == "grayscale" } {
-    set activeBg black
-    set normalBg white
-    set bitmapFg black
-    set bitmapBg white
-    option add *f1.background 		white
-} else {
-#    set activeBg red
-    set bitmapFg blue
-    set bitmapBg green
-    option add *Button.background       khaki2
-    option add *Button.activeBackground khaki1
-    option add *Frame.background        khaki2
-
-    option add *releaseButton.background 		limegreen
-    option add *releaseButton.activeBackground 	springgreen
-    option add *releaseButton.foreground 		black
-
-    option add *holdButton.background 		red
-    option add *holdButton.activeBackground	pink
-    option add *holdButton.foreground 		black
-    option add *f1.background 		springgreen
-}
-
-#
-# Instance specific widget options
-#
-option add *f1.relief 		sunken
-option add *f1.background 	$normalBg
-option add *testButton.text 	"Test"
-option add *quitButton.text 	"Quit"
-option add *newButton.text 	"New\nButton"
-option add *holdButton.text 	"Hold"
-option add *releaseButton.text 	"Release"
-option add *buttonLabel.text	"Buttons"
-option add *entryLabel.text	"Entries"
-option add *scaleLabel.text	"Scales"
-option add *textLabel.text	"Text"
-
-bind keepRaised <Visibility> { raise %W } 
-
-proc KeepRaised { w } {
-    bindtags $w keepRaised
-}
-
-#
-# This never gets used; it's reset by the Animate proc. It's 
-# here to just demonstrate how to set busy window options via
-# the host window path name
-#
-#option add *f1.busyCursor 	bogosity 
-
-#
-# Counter for new buttons created by the "New button" button
-#
-set numWin 0
-
-#
-# Create two frames. The top frame will be the host window for the
-# busy window.  It'll contain widgets to test the effectiveness of
-# the busy window.  The bottom frame will contain buttons to 
-# control the testing.
-#
-
-blt::tk::frame .f1 -bg $normalBg
-blt::tk::frame .f2 -bg $normalBg
-
-#
-# Create some widgets to test the busy window and its cursor
-#
-label .buttonLabel
-    blt::tk::button .testButton -command { 
-    puts stdout "Not busy." 
-}
-blt::tk::button .quitButton -command { exit }
-entry .entry 
-scale .scale
-text .text -width 20 -height 4
-
-#
-# The following buttons sit in the lower frame to control the demo
-#
-blt::tk::button .newButton -command {
-    global numWin
-    incr numWin
-    set name button#${numWin}
-    blt::tk::button .f1.$name -text "$name" \
-	-command [list .f1 configure -bg blue]
-    blt::table .f1 \
-	.f1.$name $numWin+3,0 -padx 10 -pady 10
-}
-
-blt::tk::button .holdButton -command {
-    if { [blt::busy isbusy .f1] == "" } {
-        global activeBg
-	.f1 configure -bg $activeBg
-    }
-    blt::busy .f1 
-    focus -force . 
-}
-
-blt::tk::button .releaseButton -command {
-    if { [blt::busy isbusy .f1] == ".f1" } {
-        blt::busy release .f1
-    }
-    global normalBg
-    .f1 configure -bg $normalBg
-}
-
-#
-# Notice that the widgets packed in .f1 and .f2 are not their children
-#
-blt::table .f1 \
-    0,0		.testButton \
-    1,0		.scale		-fill y \
-    0,1		.entry		-fill x \
-    1,1		.text		-fill both \
-    2,0		.quitButton	-cspan 2
-
-blt::table .f2 \
-    0,0		.holdButton \
-    0,1		.releaseButton  \
-    0,2		.newButton
-
-blt::table configure .f1 \
-    .testButton .scale .entry .quitButton -padx 10 -pady 10
-blt::table configure .f2 \
-    .newButton .holdButton .releaseButton -padx 10 -pady 4 -reqwidth 1.i
-
-blt::table configure .f1 r0 r2 -resize none
-blt::table configure .f2 r* -resize none
-
-#
-# Finally, realize and map the top level window
-#
-blt::table . \
-    0,0		.f1		-fill both \
-    1,0		.f2		-fill both
-
-blt::table configure . r1 -resize none
-
-blt::table configure .f1 c1 -weight 2.0
-
-# Initialize a list of bitmap file names which make up the animated 
-# fish cursor. The bitmap mask files have a "m" appended to them.
-
-set bitmapList { 
-    left left1 mid right1 right 
-}
-
-#
-# Simple cursor animation routine: Uses the "after" command to 
-# circulate through a list of cursors every 0.075 seconds. The
-# first pass through the cursor list may appear sluggish because 
-# the bitmaps have to be read from the disk.  Tk's cursor cache
-# takes care of it afterwards.
-#
-proc StartAnimation { widget count } {
-    global bitmapList
-    set prefix bitmaps/fish/[lindex $bitmapList $count]
-    set cursor [list @${prefix}.xbm ${prefix}m.xbm blue green ]
-    blt::busy configure $widget -cursor $cursor
-
-    incr count
-    set limit [llength $bitmapList]
-    if { $count >= $limit } {
-	set count 0
-    }
-    global afterId
-    set afterId($widget) [after 125 StartAnimation $widget $count]
-}
-
-proc StopAnimation { widget } {    
-    global afterId
-    after cancel $afterId($widget)
-}
-
-proc TranslateBusy { window } {
-    set widget [string trimright $window "_Busy"]
-    if { $widget != "." } {
-        set widget [string trimright $widget "."]
-    }
-    return $widget
-}
-
-if { [info exists tcl_platform] && $tcl_platform(platform) == "unix" } {
-    bind Busy <Map> { 
-	StartAnimation [TranslateBusy %W] 0
-    }
-    bind Busy <Unmap> { 
-	StopAnimation  [TranslateBusy %W] 
-    }
-}
-
-#
-# For testing, allow the top level window to be resized 
-#
-wm min . 0 0
-
-#
-# Force the demo to stay raised
-#
-raise .
-KeepRaised .
-
-bind .f1 <Enter> { puts stderr "Entering %W" }
-bind .f1 <Leave> { puts stderr "Leaving %W" }
-bind .f1 <B1-Leave> { puts stderr "B1 Leaving %W" }
-bind .f1 <B1-Enter> { puts stderr "B1 Entering %W" }
-
-bind .f1 <Motion> { puts stderr "Motion %W" }
-
-.testButton configure -font "{San Serif} 6"
-puts stderr [.testButton configure]
diff --git a/blt3.0/demos/busy2.tcl b/blt3.0/demos/busy2.tcl
deleted file mode 100755
index be666b3..0000000
--- a/blt3.0/demos/busy2.tcl
+++ /dev/null
@@ -1,237 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-#source scripts/demo.tcl
-
-#
-# Script to test the "busy" command.
-# 
-
-#
-# General widget class resource attributes
-#
-option add *Button.padX 	10
-option add *Button.padY 	2
-option add *Scale.relief 	sunken
-#option add *Scale.orient	horizontal
-option add *Entry.relief 	sunken
-option add *Frame.borderWidth 	2
-
-set visual [winfo screenvisual .] 
-if { $visual == "staticgray"  || $visual == "grayscale" } {
-    set activeBg black
-    set normalBg white
-    set bitmapFg black
-    set bitmapBg white
-    option add *f1.background 		white
-} else {
-    set activeBg red
-    set normalBg springgreen
-    set bitmapFg blue
-    set bitmapBg green
-    option add *Button.background       khaki2
-    option add *Button.activeBackground khaki1
-    option add *Frame.background        khaki2
-    option add *f2.tile		textureBg
-#    option add *Button.tile		textureBg
-
-    option add *releaseButton.background 		limegreen
-    option add *releaseButton.activeBackground 	springgreen
-    option add *releaseButton.foreground 		black
-
-    option add *holdButton.background 		red
-    option add *holdButton.activeBackground	pink
-    option add *holdButton.foreground 		black
-    option add *f1.background 		springgreen
-}
-
-#
-# Instance specific widget options
-#
-option add *f1.relief 		sunken
-option add *f1.background 	$normalBg
-option add *testButton.text 	"Test"
-option add *quitButton.text 	"Quit"
-option add *newButton.text 	"New button"
-option add *holdButton.text 	"Hold"
-option add *releaseButton.text 	"Release"
-option add *buttonLabel.text	"Buttons"
-option add *entryLabel.text	"Entries"
-option add *scaleLabel.text	"Scales"
-option add *textLabel.text	"Text"
-
-proc LoseFocus {} { 
-    focus -force . 
-}
-proc KeepRaised { w } {
-    bindtags $w keepRaised
-}
-
-bind keepRaised <Visibility> { raise %W } 
-
-set file ./images/chalk.gif
-image create picture textureBg -file $file
-
-#
-# This never gets used; it's reset by the Animate proc. It's 
-# here to just demonstrate how to set busy window options via
-# the host window path name
-#
-#option add *f1.busyCursor 	bogosity 
-
-
-#
-# Counter for new buttons created by the "New button" button
-#
-set numWin 0
-
-menu .menu 
-.menu add command -label "First"
-.menu add command -label "Second"
-.menu add command -label "Third"
-.menu add command -label "Fourth"
-. configure -menu .menu
-
-#
-# Create two frames. The top frame will be the host window for the
-# busy window.  It'll contain widgets to test the effectiveness of
-# the busy window.  The bottom frame will contain buttons to 
-# control the testing.
-#
-frame .f1
-frame .f2
-
-#
-# Create some widgets to test the busy window and its cursor
-#
-label .buttonLabel
-button .testButton -command { 
-    puts stdout "Not busy." 
-}
-button .quitButton -command { exit }
-entry .entry 
-scale .scale
-text .text -width 20 -height 4
-
-#
-# The following buttons sit in the lower frame to control the demo
-#
-button .newButton -command {
-    global numWin
-    incr numWin
-    set name button#${numWin}
-    button .f1.$name -text "$name" \
-	-command [list .f1 configure -bg blue]
-    blt::table .f1 \
-	.f1.$name $numWin+3,0 -padx 10 -pady 10
-}
-
-label .holdButton -command {
-    if { [busy isbusy .f1] == "" } {
-        global activeBg
-	.f1 configure -bg $activeBg
-    }
-    blt::busy .f1 
-    blt::busy .#menu
-    LoseFocus
-}
-label .releaseButton -command {
-    if { [blt::busy isbusy .f1] == ".f1" } {
-        blt::busy release .f1
-        blt::busy release .#menu
-    }
-    global normalBg
-    .f1 configure -bg $normalBg
-}
-
-#
-# Notice that the widgets packed in .f1 and .f2 are not their children
-#
-blt::table .f1 \
-    .testButton 0,0 \
-    .scale 1,0 \
-    .entry 0,1 \
-    .text 1,1 -fill both \
-    .quitButton 2,0 
-
-blt::table .f2 \
-    .newButton 0,0 \
-    .holdButton 1,0 \
-    .releaseButton 2,0  
-
-blt::table configure .f1 .testButton .scale .entry .quitButton \
-    -padx 10 -pady 10 -fill both
-blt::table configure .f2 .newButton .holdButton .releaseButton \
-    -padx 10 -pady 10 
-blt::table configure .f2 c0 -resize none
-#
-# Finally, realize and map the top level window
-#
-blt::table . \
-    .f1 0,0  \
-    .f2 1,0 
-
-blt::table configure . .f1 .f2 -fill both
-# Initialize a list of bitmap file names which make up the animated 
-# fish cursor. The bitmap mask files have a "m" appended to them.
-
-blt::table configure . r1 -resize none
-
-set bitmapList { left left1 mid right1 right }
-
-#
-# Simple cursor animation routine: Uses the "after" command to 
-# circulate through a list of cursors every 0.075 seconds. The
-# first pass through the cursor list may appear sluggish because 
-# the bitmaps have to be read from the disk.  Tk's cursor cache
-# takes care of it afterwards.
-#
-proc StartAnimation { widget count } {
-    global bitmapList
-    set prefix "bitmaps/fish/[lindex $bitmapList $count]"
-    set cursor [list @${prefix}.xbm ${prefix}m.xbm black white ]
-    blt::busy configure $widget -cursor $cursor
-
-    incr count
-    set limit [llength $bitmapList]
-    if { $count >= $limit } {
-	set count 0
-    }
-    global afterId
-    set afterId($widget) [after 125 StartAnimation $widget $count]
-}
-
-proc StopAnimation { widget } {    
-    global afterId
-    after cancel $afterId($widget)
-}
-
-proc TranslateBusy { window } {
-    #set widget [string trimright $window "_Busy"]
-    set widget [string trimright $window "Busy"]
-    set widget [string trimright $widget "_"]
-#    if { [winfo toplevel $widget] != $widget } {
-#        set widget [string trimright $widget "."]
-#    }
-    return $widget
-}
-
-if { [info exists tcl_platform] && $tcl_platform(platform) == "unix" } {
-    bind Busy <Map> { 
-	StartAnimation [TranslateBusy %W] 0
-    }
-    bind Busy <Unmap> { 
-	StopAnimation  [TranslateBusy %W] 
-    }
-}
-
-#
-# For testing, allow the top level window to be resized 
-#
-wm min . 0 0
-
-#
-# Force the demo to stay raised
-#
-raise .
-KeepRaised .
diff --git a/blt3.0/demos/cbutton1.tcl b/blt3.0/demos/cbutton1.tcl
deleted file mode 100644
index 3f9be50..0000000
--- a/blt3.0/demos/cbutton1.tcl
+++ /dev/null
@@ -1,316 +0,0 @@
-
-foreach {key file} {
-save_as /usr/share/gtk-doc/html/pygtk/icons/stock_save_as_24.png
-new_tab /usr/share/gtk-doc/html/pygtk/icons/stock_new_24.png
-new_window /usr/share/gtk-doc/html/pygtk/icons/stock_network_24.png
-open_file /usr/share/gtk-doc/html/pygtk/icons/stock_open_24.png
-quit /usr/share/gtk-doc/html/pygtk/icons/stock_exit_24.png
-print /usr/share/gtk-doc/html/pygtk/icons/stock_print_24.png
-print_preview /usr/share/gtk-doc/html/pygtk/icons/stock_print_preview_24.png
-undo /usr/share/gtk-doc/html/pygtk/icons/stock_undo_24.png
-redo /usr/share/gtk-doc/html/pygtk/icons/stock_redo_24.png
-cut /usr/share/gtk-doc/html/pygtk/icons/stock_cut_24.png
-paste /usr/share/gtk-doc/html/pygtk/icons/stock_paste_24.png
-copy /usr/share/gtk-doc/html/pygtk/icons/stock_copy_24.png
-delete /usr/share/gtk-doc/html/pygtk/icons/stock_trash_24.png
-select_all /usr/share/gtk-doc/html/pygtk/icons/stock_broken_image_24.png
-find /usr/share/gtk-doc/html/pygtk/icons/stock_search_24.png
-preferences /usr/share/gtk-doc/html/pygtk/icons/stock_preferences_24.png
-stop /usr/share/gtk-doc/html/pygtk/icons/stock_stop_24.png
-reload /usr/share/gtk-doc/html/pygtk/icons/stock_refresh_24.png
-back /usr/share/gtk-doc/html/pygtk/icons/stock_left_arrow_24.png
-forward /usr/share/gtk-doc/html/pygtk/icons/stock_right_arrow_24.png
-home /usr/share/gtk-doc/html/pygtk/icons/stock_home_24.png
-help /usr/share/gtk-doc/html/pygtk/icons/stock_help_24.png
-about /usr/share/gtk-doc/html/pygtk/icons/stock_about_24.png
-download /usr/share/icons/gnome/24x24/emblems/emblem-downloads.png
-bookmark /usr/share/icons/gnome/24x24/stock/object/stock_bookmark.png
-} {
-    set icon($key) [image create picture -file $file]
-}
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-#set image [image create picture -file ~/images.jpeg]
-set bg [blt::bgpattern create gradient -high  grey70 -low grey95 \
-	-jitter yes -log yes -relativeto self]
-
-set image ""
-
-blt::tk::frame .mbar -bg $bg
-
-set t "Hello, World"
-blt::combobutton .mbar.file \
-    -text "File" \
-    -underline 0 \
-    -image $image \
-    -relief flat \
-    -activerelief raised \
-    -arrowon off \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -menuanchor sw \
-    -menu .mbar.file.m
-
-
-
-blt::combomenu .mbar.file.m \
-    -width { 0 400 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.file.m add -text "New Window" -accelerator "Ctrl+N" -underline 0 \
-    -icon $icon(new_window)
-.mbar.file.m add -text "New Tab" -accelerator "Ctrl+T" -underline 4 \
-    -icon $icon(new_tab)
-.mbar.file.m add -text "Open Location..." -accelerator "Ctrl+L" -underline 5
-.mbar.file.m add -text "Open File..." -accelerator "Ctrl+O" -underline 0 \
-    -icon $icon(open_file)
-.mbar.file.m add -text "Close Window" -accelerator "Ctrl+Shift+W" -underline 9
-.mbar.file.m add -text "Close Tab" -accelerator "Ctrl+W" -underline 0
-.mbar.file.m add -type separator
-.mbar.file.m add -text "Save Page As..." -accelerator "Ctrl+O" -underline 10 \
-    -icon $icon(save_as)
-.mbar.file.m add -text "Save Page As PDF..." -accelerator "Ctrl+Shift+W" -underline 15
-.mbar.file.m add -text "Send Link..." -accelerator "Ctrl+W" -underline 1
-.mbar.file.m add -type separator
-.mbar.file.m add -text "Page Setup..." -underline 8
-.mbar.file.m add -text "Print Preview" -accelerator "Ctrl+Shift+W" -underline 9 \
-    -icon $icon(print_preview)
-.mbar.file.m add -text "Print..." -accelerator "Ctrl+P" -underline 0 \
-    -icon $icon(print)
-.mbar.file.m add -type separator
-.mbar.file.m add -text "Import..." -underline 0
-.mbar.file.m add -type separator
-.mbar.file.m add -text "Work Offline" -underline 0
-.mbar.file.m add -text "Quit" -accelerator "Ctrl+Q" -underline 0 \
-    -icon $icon(quit) 
-
-blt::combobutton .mbar.edit \
-    -text "Edit" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.edit.m
-
-blt::combomenu .mbar.edit.m \
-    -width { 0 400 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.edit.m add -text "Undo" -accelerator "Ctrl+Z"  \
-    -icon $icon(undo)
-.mbar.edit.m add -text "Redo" -accelerator "Ctrl+Shift+Z"  \
-    -icon $icon(redo)
-.mbar.edit.m add -type separator
-.mbar.edit.m add -text "Cut" -accelerator "Ctrl+X" \
-    -icon $icon(cut)
-.mbar.edit.m add -text "Copy" -accelerator "Ctrl+C" \
-    -icon $icon(copy)
-.mbar.edit.m add -text "Paste" -accelerator "Ctrl+V" \
-    -icon $icon(paste)
-.mbar.edit.m add -text "Delete" -accelerator "Del" \
-    -icon $icon(delete)
-.mbar.edit.m add -type separator
-.mbar.edit.m add -text "Select All" -accelerator "Ctrl+X" \
-    -icon $icon(select_all)
-.mbar.edit.m add -type separator
-.mbar.edit.m add -text "Find" -accelerator "Ctrl+F"  \
-    -icon $icon(find)
-.mbar.edit.m add -text "Find Again" -accelerator "Ctrl+G"
-.mbar.edit.m add -type separator
-.mbar.edit.m add -text "Preferences" \
-    -icon $icon(preferences)
-
-blt::combomenu .mbar.edit.m.m
-.mbar.edit.m.m add -type command -text "five" -accelerator "^A" -command "set t five"
-.mbar.edit.m.m add -type command -text "six" -accelerator "^B" -command "set t six"
-.mbar.edit.m.m add -type command -text "seven" -accelerator "^C" -command "set t seven"
-.mbar.edit.m.m add -type command -text "eight" -accelerator "^D" -command "set t eight"
-.mbar.edit.m.m add -type cascade -text "cascade" -accelerator "^E" 
-
-
-blt::combobutton .mbar.view \
-    -text "View" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.view.m
-
-blt::combomenu .mbar.view.m \
-    -width { 0 600 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.view.m add -type cascade -text "Toolbars" -underline 0 
-.mbar.view.m add -type checkbutton -text "Status Bar" \
-    -underline 4 -variable statusbar
-.mbar.view.m add -type checkbutton -text "Sidebar" \
-    -underline 5 -variable sidebar 
-.mbar.view.m add -type checkbutton -text "Adblock Plus: Blockable items" \
-    -accelerator "Ctrl+Shift+V" -underline 0 -variable adblock 
-.mbar.view.m add -type separator
-.mbar.view.m add -text "Stop" -accelerator "Esc" -underline 9 \
-    -icon $icon(stop)
-.mbar.view.m add -text "Reload" -accelerator "Ctrl+R" -underline 0 \
-    -icon $icon(reload)
-.mbar.view.m add -type separator
-.mbar.view.m add -type cascade -text "Zoom" -accelerator "Ctrl+O" -underline 10 
-.mbar.view.m add -type cascade -text "Page Style" -accelerator "Ctrl+Shift+W" \
-    -underline 15
-.mbar.view.m add -type cascade -text "Character Encoding" -accelerator "Ctrl+W" \
-    -underline 1
-.mbar.view.m add -type separator
-.mbar.view.m add -text "Page Source" -underline 8 -accelerator "Ctrl+U"
-.mbar.view.m add -text "Full Screen" -accelerator "F11" -underline 9 
-
-
-blt::combobutton .mbar.history \
-    -text "History" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.history.m
-
-blt::combomenu .mbar.history.m \
-    -width { 0 600 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.history.m add -text "Back" -accelerator "Alt+Left Arrow" \
-    -underline 0 -icon $icon(back)
-.mbar.history.m add -text "Forward" -accelerator "Alt+Right Arrow" \
-    -underline 4 -icon $icon(forward)
-.mbar.history.m add -text "Home" -accelerator "Alt+Home" \
-    -underline 5 -icon $icon(home)
-.mbar.history.m add -text "Show All History" -accelerator "Ctrl+Shift+H" \
-    -underline 0 
-.mbar.history.m add -type separator
-.mbar.history.m add -type cascade -text "Recently Closed Tabs" \
-    -accelerator "Ctrl+O" -underline 10 
-
-blt::combobutton .mbar.bmarks \
-    -text "Bookmarks" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.bmarks.m
-
-blt::combomenu .mbar.bmarks.m \
-    -width { 0 600 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.bmarks.m add -text "Bookmark This Page" -accelerator "Ctrl+D" \
-    -underline 0 -icon $icon(bookmark)
-.mbar.bmarks.m add -text "Subscribe to This Page..." \
-    -underline 4 -icon $icon(forward)
-.mbar.bmarks.m add -text "Bookmark All Tabs"  \
-    -underline 5 -icon $icon(home)
-.mbar.bmarks.m add -text "Organize Bookmarks" \
-    -underline 0 
-.mbar.bmarks.m add -type separator
-.mbar.bmarks.m add -type cascade -text "Bookmarks Toolbar" \
-    -underline 10 
-.mbar.bmarks.m add -type separator
-.mbar.bmarks.m add -type cascade -text "Recently Bookmarked" \
-    -underline 10 
-.mbar.bmarks.m add -type cascade -text "Recent Tags" \
-    -underline 10 
-.mbar.bmarks.m add -type separator
-.mbar.bmarks.m add -text "Page 1" \
-    -underline 10 
-.mbar.bmarks.m add -text "Page 2" \
-    -underline 10 
-
-blt::combobutton .mbar.tools \
-    -text "Tools" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.tools.m
-
-blt::combomenu .mbar.tools.m \
-    -width { 0 600 }  -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.tools.m add -text "Web Search" -accelerator "Ctrl+K" \
-    -underline 0 
-.mbar.tools.m add -type separator
-.mbar.tools.m add -text "Downloads" -accelerator "Ctrl+Y" \
-    -underline 4 -icon $icon(download)
-.mbar.tools.m add -text "Add-ons" -underline 0 
-.mbar.tools.m add -type separator
-.mbar.tools.m add -text "PDF Download - Options" -underline 0 
-.mbar.tools.m add -text "Save Images From Tabs" -underline 10 
-.mbar.tools.m add -text "Error Console" \
-    -accelerator "Ctrl+Shift+J" -underline 10 
-.mbar.tools.m add -text "Adblock Plus Preferences..." \
-    -accelerator "Ctrl+Shift+E" -underline 10 
-.mbar.tools.m add -text "Page Info" \
-    -accelerator "Ctrl+I" -underline 10 
-.mbar.tools.m add -type separator
-.mbar.tools.m add -text "Clear Private Data" \
-    -accelerator "Ctrl+Shift+Del" -underline 10 
-.mbar.tools.m add -text "Batch Download Settings" \
-    -underline 10 
-
-blt::combobutton .mbar.help \
-    -text "Help" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 9 } -justify left \
-    -underline 0 \
-    -arrowon no \
-    -menuanchor nw \
-    -menu .mbar.help.m
-
-blt::combomenu .mbar.help.m \
-    -width { 0 600 } -font "Arial 9" -acceleratorfont "Arial 9" \
-    -bg grey85 -relief raised -bd 1
-.mbar.help.m add -text "Help Contents" \
-    -underline 0 -icon $icon(help)
-.mbar.help.m add -text "Release Notes" -underline 0
-.mbar.help.m add -text "Report Broken Website..." -underline 5
-.mbar.help.m add -text "Report Web Forgery..." -underline 0 
-.mbar.help.m add -type separator
-.mbar.help.m add -text "Check For Updates..." -underline 0 
-.mbar.help.m add -text "About..." -underline 0  -icon $icon(about)
-
-canvas .c
-blt::table .mbar \
-    1,0 .mbar.file -fill both \
-    1,1 .mbar.edit -fill both \
-    1,2 .mbar.view -fill both \
-    1,3 .mbar.history -fill both \
-    1,4 .mbar.bmarks -fill both \
-    1,5 .mbar.tools -fill both \
-    1,6 .mbar.help -fill both \
-
-blt::table configure .mbar c* -padx 2 -resize none
-blt::table configure .mbar c7 -resize expand
-
-blt::table . \
-    0,0 .mbar -fill x \
-    1,0 .c -fill both 
-
-blt::table configure . r0 -resize none
-blt::table configure . r1 -resize expand
diff --git a/blt3.0/demos/cbutton2.tcl b/blt3.0/demos/cbutton2.tcl
deleted file mode 100644
index c481c88..0000000
--- a/blt3.0/demos/cbutton2.tcl
+++ /dev/null
@@ -1,240 +0,0 @@
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-set icon2 [image create picture -file images/blt98.gif]
-set icon [image create picture -data $imgData]
-set bg [blt::bgpattern create gradient -high  grey100 -low grey90 \
-	-dir x -jitter yes -log yes -relativeto self]
-
-set image ""
-option add *ComboEntry.takeFocus 1
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set myIcon ""
-blt::combobutton .b \
-    -font { arial 10 } \
-    -image $image \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -arrowon yes \
-    -menu .b.m \
-    -menuanchor se \
-    -command "puts {button pressed}"
-
-blt::combomenu .b.m  \
-    -bg $bg \
-    -cursor crosshair \
-    -activebackground skyblue4 \
-    -activeforeground white \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -font { Arial 9 bold } \
-    -acceleratorfont { Arial 8 } \
-    -disabledforeground grey35  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey35  \
-    -yscrollbar .b.m.ybar \
-    -xscrollbar .b.m.xbar
-
-blt::tk::scrollbar .b.m.xbar
-# -elementborderwidth 2 -borderwidth 0
-blt::tk::scrollbar .b.m.ybar
-#-elementborderwidth 2 -borderwidth 0
-
-set onOff 0
-set wwho ""
-foreach item { Undo X1 Y1 Redo Cut Copy X2 Y2 Paste "Select All" X3 Y3 
-    Find Replace } {
-    set char [string range $item 0 0] 
-    .b.m add \
-	-text $item \
-	-type checkbutton \
-	-accel "Ctrl+$char" \
-	-underline 0 \
-	-tag [string tolower $char] \
-	-icon $icon \
-	-variable onOff \
-	-value $item \
-
-}
-
-.b.m item configure Undo -type command
-.b.m item configure Cut -type command 
-.b.m item configure Find -type cascade -menu .b.m.m
-#-state disabled
-.b.m item configure Y3 -type command -image $icon2 
-.b.m item configure Undo -type command 
-.b.m item configure Paste -type separator 
-.b.m item configure x -state disabled 
-.b.m item configure y -type radiobutton -variable wwho 
-.b.m item configure Y1 -state disabled
-set wwho Y1
-blt::combomenu .b.m.m  \
-    -bg $bg \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -font { Arial 9 bold } \
-    -acceleratorfont { Arial 8 } \
-    -disabledforeground grey45  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey45  \
-    -width { 0 400 } \
-    -height { 0 500 } \
-    -yscrollbar .b.m.m.ybar \
-    -xscrollbar .b.m.m.xbar
-
-blt::tk::scrollbar .b.m.m.xbar 
-blt::tk::scrollbar .b.m.m.ybar 
-
-set onOff 0
-foreach item { Undo X1 Y1 Redo Cut Copy X2 Y2 Paste "Select All" X3 Y3 
-    Find Replace } {
-    set char [string range $item 0 0] 
-    .b.m.m add \
-	-text $item \
-	-type checkbutton \
-	-accel "Ctrl+$char" \
-	-accel "" \
-	-underline 0 \
-	-tag [string tolower $char] \
-	-icon $icon \
-	-variable onOff \
-	-value $item \
-
-}
-
-.b.m.m item configure Undo -type command
-.b.m.m item configure Cut -type command 
-.b.m.m item configure Find -type cascade -menu .b.m.m.m
-#-state disabled
-.b.m.m item configure Y3 -type command -image $icon2
-.b.m.m item configure Undo -type command 
-.b.m.m item configure Paste -type separator 
-.b.m.m item configure x -state disabled 
-.b.m.m item configure y -type radiobutton -variable wwho 
-
-set labels { 
-    Aarhus Aaron Ababa aback abaft abandon abandoned abandoning
-    abandonment abandons abase abased abasement abasements abases
-    abash abashed abashes abashing abasing abate abated abatement
-    abatements abater abates abating Abba abbe abbey abbeys abbot
-    abbots Abbott abbreviate abbreviated abbreviates abbreviating
-    abbreviation abbreviations Abby abdomen abdomens abdominal
-    abduct abducted abduction abductions abductor abductors abducts
-    Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant
-    aberration aberrations abet abets abetted abetter abetting
-    abeyance abhor abhorred abhorrent abhorrer abhorring abhors
-    abide abided abides abiding Abidjan Abigail Abilene abilities
-    ability abject abjection abjections abjectly abjectness abjure
-    abjured abjures abjuring ablate ablated ablates ablating
-    ablation ablative ablaze able abler ablest ably Abner abnormal
-    abnormalities abnormality abnormally Abo aboard abode abodes
-    abolish abolished abolisher abolishers abolishes abolishing
-    abolishment abolishments abolition abolitionist abolitionists
-    abominable abominate aboriginal aborigine aborigines abort
-    aborted aborting abortion abortions abortive abortively aborts
-    Abos abound abounded abounding abounds about above aboveboard
-    aboveground abovementioned abrade abraded abrades abrading
-    Abraham Abram Abrams Abramson abrasion abrasions abrasive
-    abreaction abreactions abreast abridge abridged abridges
-    abridging abridgment abroad abrogate abrogated abrogates
-    abrogating abrupt abruptly abruptness abscess abscessed
-    abscesses abscissa abscissas abscond absconded absconding
-    absconds absence absences absent absented absentee
-    absenteeism absentees absentia absenting absently absentminded
-    absents absinthe absolute absolutely absoluteness absolutes
-    absolution absolve absolved absolves absolving absorb
-    absorbed absorbency absorbent absorber absorbing absorbs
-    absorption absorptions absorptive abstain abstained abstainer
-    abstaining abstains abstention abstentions abstinence
-    abstract abstracted abstracting abstraction abstractionism
-    abstractionist abstractions abstractly abstractness
-    abstractor abstractors abstracts abstruse abstruseness
-    absurd absurdities absurdity absurdly Abu abundance abundant
-    abundantly abuse abused abuses abusing abusive abut abutment
-    abuts abutted abutter abutters abutting abysmal abysmally
-    abyss abysses Abyssinia Abyssinian Abyssinians acacia
-    academia academic academically academics academies academy
-    Acadia Acapulco accede acceded accedes accelerate accelerated
-    accelerates accelerating acceleration accelerations
-    accelerator accelerators accelerometer accelerometers accent
-    accented accenting accents accentual accentuate accentuated
-    accentuates accentuating accentuation accept acceptability
-    acceptable acceptably acceptance acceptances accepted
-    accepter accepters accepting acceptor acceptors accepts
-    access accessed accesses accessibility accessible accessibly
-    accessing accession accessions accessories accessors
-    accessory accident accidental accidentally accidently
-    accidents acclaim acclaimed acclaiming acclaims acclamation
-    acclimate acclimated acclimates acclimating acclimatization
-    acclimatized accolade accolades accommodate accommodated
-    accommodates accommodating accommodation accommodations
-    accompanied accompanies accompaniment accompaniments
-    accompanist accompanists accompany accompanying accomplice
-    accomplices accomplish accomplished accomplisher accomplishers
-    accomplishes accomplishing accomplishment accomplishments
-    accord accordance accorded accorder accorders according
-    accordingly accordion accordions accords accost accosted
-    accosting accosts account accountability accountable accountably
-    accountancy accountant accountants accounted accounting
-    accounts Accra accredit accreditation accreditations
-    accredited accretion accretions accrue accrued accrues
-    accruing acculturate acculturated acculturates acculturating
-    acculturation accumulate accumulated accumulates accumulating
-    accumulation accumulations accumulator accumulators
-    accuracies accuracy accurate accurately accurateness accursed
-    accusal accusation accusations accusative accuse accused
-    accuser accuses accusing accusingly accustom accustomed
-    accustoming accustoms ace aces acetate acetone acetylene
-    Achaean Achaeans ache ached aches achievable achieve achieved
-    achievement achievements achiever achievers achieves achieving
-    Achilles aching acid acidic acidities acidity acidly acids
-    acidulous Ackerman Ackley acknowledge acknowledgeable
-    acknowledged acknowledgement acknowledgements acknowledger
-    acknowledgers acknowledges acknowledging acknowledgment
-    acknowledgments acme acne acolyte acolytes acorn acorns
-    acoustic acoustical acoustically acoustician acoustics
-    acquaint acquaintance acquaintances acquainted acquainting
-    acquaints acquiesce acquiesced acquiescence acquiescent
-    acquiesces acquiescing acquirable acquire acquired acquires
-    acquiring acquisition acquisitions
-}
-
-blt::combomenu .b.m.m.m \
-    -bg $bg \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -font { Arial 9 bold } \
-    -acceleratorfont { Arial 8 } \
-    -disabledforeground grey45  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey45  \
-    -width { 0 400 } \
-    -height { 0 500 } \
-    -yscrollbar .b.m.m.m.ybar \
-    -xscrollbar .b.m.m.m.xbar
-
-.b.m.m.m listadd $labels \
-    -icon $icon 
-
-blt::tk::scrollbar .b.m.m.m.xbar  
-blt::tk::scrollbar .b.m.m.m.ybar 
-
-blt::tk::scrollbar .s -orient vertical -command { .b xview } 
-
-bind ComboEntry <3> {
-    grab release [grab current]
-}
-
-blt::table . \
-    0,0 .b -fill both 
-
-blt::table configure . r0 -resize shrink
-
diff --git a/blt3.0/demos/cbutton3.tcl b/blt3.0/demos/cbutton3.tcl
deleted file mode 100644
index 727d307..0000000
--- a/blt3.0/demos/cbutton3.tcl
+++ /dev/null
@@ -1,802 +0,0 @@
-set colors {
-    000000 black
-    000000 gray0
-    000000 grey0
-    000080 NavyBlue
-    000080 navy
-    000080 {navy blue}
-    00008B DarkBlue
-    00008B blue4
-    00008B {dark blue}
-    0000CD MediumBlue
-    0000CD blue3
-    0000CD {medium blue}
-    0000EE blue2
-    0000FF blue
-    0000FF blue1
-    006400 DarkGreen
-    006400 {dark green}
-    00688B DeepSkyBlue4
-    00868B turquoise4
-    008B00 green4
-    008B45 SpringGreen4
-    008B8B DarkCyan
-    008B8B cyan4
-    008B8B {dark cyan}
-    009ACD DeepSkyBlue3
-    00B2EE DeepSkyBlue2
-    00BFFF DeepSkyBlue
-    00BFFF DeepSkyBlue1
-    00BFFF {deep sky blue}
-    00C5CD turquoise3
-    00CD00 green3
-    00CD66 SpringGreen3
-    00CDCD cyan3
-    00CED1 DarkTurquoise
-    00CED1 {dark turquoise}
-    00E5EE turquoise2
-    00EE00 green2
-    00EE76 SpringGreen2
-    00EEEE cyan2
-    00F5FF turquoise1
-    00FA9A MediumSpringGreen
-    00FA9A {medium spring green}
-    00FF00 green
-    00FF00 green1
-    00FF7F SpringGreen
-    00FF7F SpringGreen1
-    00FF7F {spring green}
-    00FFFF cyan
-    00FFFF cyan1
-    030303 gray1
-    030303 grey1
-    050505 gray2
-    050505 grey2
-    080808 gray3
-    080808 grey3
-    0A0A0A gray4
-    0A0A0A grey4
-    0D0D0D gray5
-    0D0D0D grey5
-    0F0F0F gray6
-    0F0F0F grey6
-    104E8B DodgerBlue4
-    121212 gray7
-    121212 grey7
-    141414 gray8
-    141414 grey8
-    171717 gray9
-    171717 grey9
-    1874CD DodgerBlue3
-    191970 MidnightBlue
-    191970 {midnight blue}
-    1A1A1A gray10
-    1A1A1A grey10
-    1C1C1C gray11
-    1C1C1C grey11
-    1C86EE DodgerBlue2
-    1E90FF DodgerBlue
-    1E90FF DodgerBlue1
-    1E90FF {dodger blue}
-    1F1F1F gray12
-    1F1F1F grey12
-    20B2AA LightSeaGreen
-    20B2AA {light sea green}
-    212121 gray13
-    212121 grey13
-    228B22 ForestGreen
-    228B22 {forest green}
-    242424 gray14
-    242424 grey14
-    262626 gray15
-    262626 grey15
-    27408B RoyalBlue4
-    292929 gray16
-    292929 grey16
-    2B2B2B gray17
-    2B2B2B grey17
-    2E2E2E gray18
-    2E2E2E grey18
-    2E8B57 SeaGreen
-    2E8B57 SeaGreen4
-    2E8B57 {sea green}
-    2F4F4F DarkSlateGray
-    2F4F4F DarkSlateGrey
-    2F4F4F {dark slate gray}
-    2F4F4F {dark slate grey}
-    303030 gray19
-    303030 grey19
-    32CD32 LimeGreen
-    32CD32 {lime green}
-    333333 gray20
-    333333 grey20
-    363636 gray21
-    363636 grey21
-    36648B SteelBlue4
-    383838 gray22
-    383838 grey22
-    3A5FCD RoyalBlue3
-    3B3B3B gray23
-    3B3B3B grey23
-    3CB371 MediumSeaGreen
-    3CB371 {medium sea green}
-    3D3D3D gray24
-    3D3D3D grey24
-    404040 gray25
-    404040 grey25
-    40E0D0 turquoise
-    4169E1 RoyalBlue
-    4169E1 {royal blue}
-    424242 gray26
-    424242 grey26
-    436EEE RoyalBlue2
-    43CD80 SeaGreen3
-    454545 gray27
-    454545 grey27
-    458B00 chartreuse4
-    458B74 aquamarine4
-    4682B4 SteelBlue
-    4682B4 {steel blue}
-    473C8B SlateBlue4
-    474747 gray28
-    474747 grey28
-    483D8B DarkSlateBlue
-    483D8B {dark slate blue}
-    4876FF RoyalBlue1
-    48D1CC MediumTurquoise
-    48D1CC {medium turquoise}
-    4A4A4A gray29
-    4A4A4A grey29
-    4A708B SkyBlue4
-    4D4D4D gray30
-    4D4D4D grey30
-    4EEE94 SeaGreen2
-    4F4F4F gray31
-    4F4F4F grey31
-    4F94CD SteelBlue3
-    525252 gray32
-    525252 grey32
-    528B8B DarkSlateGray4
-    53868B CadetBlue4
-    545454 gray33
-    545454 grey33
-    548B54 PaleGreen4
-    54FF9F SeaGreen1
-    551A8B purple4
-    556B2F DarkOliveGreen
-    556B2F {dark olive green}
-    575757 gray34
-    575757 grey34
-    595959 gray35
-    595959 grey35
-    5C5C5C gray36
-    5C5C5C grey36
-    5CACEE SteelBlue2
-    5D478B MediumPurple4
-    5E5E5E gray37
-    5E5E5E grey37
-    5F9EA0 CadetBlue
-    5F9EA0 {cadet blue}
-    607B8B LightSkyBlue4
-    616161 gray38
-    616161 grey38
-    636363 gray39
-    636363 grey39
-    63B8FF SteelBlue1
-    6495ED CornflowerBlue
-    6495ED {cornflower blue}
-    666666 gray40
-    666666 grey40
-    668B8B PaleTurquoise4
-    66CD00 chartreuse3
-    66CDAA MediumAquamarine
-    66CDAA aquamarine3
-    66CDAA {medium aquamarine}
-    68228B DarkOrchid4
-    68838B LightBlue4
-    6959CD SlateBlue3
-    696969 DimGray
-    696969 DimGrey
-    696969 gray41
-    696969 grey41
-    696969 {dim gray}
-    696969 {dim grey}
-    698B22 OliveDrab4
-    698B69 DarkSeaGreen4
-    6A5ACD SlateBlue
-    6A5ACD {slate blue}
-    6B6B6B gray42
-    6B6B6B grey42
-    6B8E23 OliveDrab
-    6B8E23 {olive drab}
-    6C7B8B SlateGray4
-    6CA6CD SkyBlue3
-    6E6E6E gray43
-    6E6E6E grey43
-    6E7B8B LightSteelBlue4
-    6E8B3D DarkOliveGreen4
-    707070 gray44
-    707070 grey44
-    708090 SlateGray
-    708090 SlateGrey
-    708090 {slate gray}
-    708090 {slate grey}
-    737373 gray45
-    737373 grey45
-    757575 gray46
-    757575 grey46
-    76EE00 chartreuse2
-    76EEC6 aquamarine2
-    778899 LightSlateGray
-    778899 LightSlateGrey
-    778899 {light slate gray}
-    778899 {light slate grey}
-    787878 gray47
-    787878 grey47
-    79CDCD DarkSlateGray3
-    7A378B MediumOrchid4
-    7A67EE SlateBlue2
-    7A7A7A gray48
-    7A7A7A grey48
-    7A8B8B LightCyan4
-    7AC5CD CadetBlue3
-    7B68EE MediumSlateBlue
-    7B68EE {medium slate blue}
-    7CCD7C PaleGreen3
-    7CFC00 LawnGreen
-    7CFC00 {lawn green}
-    7D26CD purple3
-    7D7D7D gray49
-    7D7D7D grey49
-    7EC0EE SkyBlue2
-    7F7F7F gray50
-    7F7F7F grey50
-    7FFF00 chartreuse
-    7FFF00 chartreuse1
-    7FFFD4 aquamarine
-    7FFFD4 aquamarine1
-    828282 gray51
-    828282 grey51
-    836FFF SlateBlue1
-    838B83 honeydew4
-    838B8B azure4
-    8470FF LightSlateBlue
-    8470FF {light slate blue}
-    858585 gray52
-    858585 grey52
-    878787 gray53
-    878787 grey53
-    87CEEB SkyBlue
-    87CEEB {sky blue}
-    87CEFA LightSkyBlue
-    87CEFA {light sky blue}
-    87CEFF SkyBlue1
-    8968CD MediumPurple3
-    8A2BE2 BlueViolet
-    8A2BE2 {blue violet}
-    8A8A8A gray54
-    8A8A8A grey54
-    8B0000 DarkRed
-    8B0000 red4
-    8B0000 {dark red}
-    8B008B DarkMagenta
-    8B008B magenta4
-    8B008B {dark magenta}
-    8B0A50 DeepPink4
-    8B1A1A firebrick4
-    8B1C62 maroon4
-    8B2252 VioletRed4
-    8B2323 brown4
-    8B2500 OrangeRed4
-    8B3626 tomato4
-    8B3A3A IndianRed4
-    8B3A62 HotPink4
-    8B3E2F coral4
-    8B4500 DarkOrange4
-    8B4513 SaddleBrown
-    8B4513 chocolate4
-    8B4513 {saddle brown}
-    8B4726 sienna4
-    8B475D PaleVioletRed4
-    8B4789 orchid4
-    8B4C39 salmon4
-    8B5742 LightSalmon4
-    8B5A00 orange4
-    8B5A2B tan4
-    8B5F65 LightPink4
-    8B636C pink4
-    8B6508 DarkGoldenrod4
-    8B668B plum4
-    8B6914 goldenrod4
-    8B6969 RosyBrown4
-    8B7355 burlywood4
-    8B7500 gold4
-    8B7765 PeachPuff4
-    8B795E NavajoWhite4
-    8B7B8B thistle4
-    8B7D6B bisque4
-    8B7D7B MistyRose4
-    8B7E66 wheat4
-    8B814C LightGoldenrod4
-    8B8378 AntiqueWhite4
-    8B8386 LavenderBlush4
-    8B864E khaki4
-    8B8682 seashell4
-    8B8878 cornsilk4
-    8B8970 LemonChiffon4
-    8B8989 snow4
-    8B8B00 yellow4
-    8B8B7A LightYellow4
-    8B8B83 ivory4
-    8C8C8C gray55
-    8C8C8C grey55
-    8DB6CD LightSkyBlue3
-    8DEEEE DarkSlateGray2
-    8EE5EE CadetBlue2
-    8F8F8F gray56
-    8F8F8F grey56
-    8FBC8F DarkSeaGreen
-    8FBC8F {dark sea green}
-    90EE90 LightGreen
-    90EE90 PaleGreen2
-    90EE90 {light green}
-    912CEE purple2
-    919191 gray57
-    919191 grey57
-    9370DB MediumPurple
-    9370DB {medium purple}
-    9400D3 DarkViolet
-    9400D3 {dark violet}
-    949494 gray58
-    949494 grey58
-    969696 gray59
-    969696 grey59
-    96CDCD PaleTurquoise3
-    97FFFF DarkSlateGray1
-    98F5FF CadetBlue1
-    98FB98 PaleGreen
-    98FB98 {pale green}
-    9932CC DarkOrchid
-    9932CC {dark orchid}
-    999999 gray60
-    999999 grey60
-    9A32CD DarkOrchid3
-    9AC0CD LightBlue3
-    9ACD32 OliveDrab3
-    9ACD32 YellowGreen
-    9ACD32 {yellow green}
-    9AFF9A PaleGreen1
-    9B30FF purple1
-    9BCD9B DarkSeaGreen3
-    9C9C9C gray61
-    9C9C9C grey61
-    9E9E9E gray62
-    9E9E9E grey62
-    9F79EE MediumPurple2
-    9FB6CD SlateGray3
-    A020F0 purple
-    A0522D sienna
-    A1A1A1 gray63
-    A1A1A1 grey63
-    A2B5CD LightSteelBlue3
-    A2CD5A DarkOliveGreen3
-    A3A3A3 gray64
-    A3A3A3 grey64
-    A4D3EE LightSkyBlue2
-    A52A2A brown
-    A6A6A6 gray65
-    A6A6A6 grey65
-    A8A8A8 gray66
-    A8A8A8 grey66
-    A9A9A9 DarkGray
-    A9A9A9 DarkGrey
-    A9A9A9 {dark gray}
-    A9A9A9 {dark grey}
-    AB82FF MediumPurple1
-    ABABAB gray67
-    ABABAB grey67
-    ADADAD gray68
-    ADADAD grey68
-    ADD8E6 LightBlue
-    ADD8E6 {light blue}
-    ADFF2F GreenYellow
-    ADFF2F {green yellow}
-    AEEEEE PaleTurquoise2
-    AFEEEE PaleTurquoise
-    AFEEEE {pale turquoise}
-    B03060 maroon
-    B0B0B0 gray69
-    B0B0B0 grey69
-    B0C4DE LightSteelBlue
-    B0C4DE {light steel blue}
-    B0E0E6 PowderBlue
-    B0E0E6 {powder blue}
-    B0E2FF LightSkyBlue1
-    B22222 firebrick
-    B23AEE DarkOrchid2
-    B2DFEE LightBlue2
-    B3B3B3 gray70
-    B3B3B3 grey70
-    B3EE3A OliveDrab2
-    B452CD MediumOrchid3
-    B4CDCD LightCyan3
-    B4EEB4 DarkSeaGreen2
-    B5B5B5 gray71
-    B5B5B5 grey71
-    B8860B DarkGoldenrod
-    B8860B {dark goldenrod}
-    B8B8B8 gray72
-    B8B8B8 grey72
-    B9D3EE SlateGray2
-    BA55D3 MediumOrchid
-    BA55D3 {medium orchid}
-    BABABA gray73
-    BABABA grey73
-    BBFFFF PaleTurquoise1
-    BC8F8F RosyBrown
-    BC8F8F {rosy brown}
-    BCD2EE LightSteelBlue2
-    BCEE68 DarkOliveGreen2
-    BDB76B DarkKhaki
-    BDB76B {dark khaki}
-    BDBDBD gray74
-    BDBDBD grey74
-    BEBEBE gray
-    BEBEBE grey
-    BF3EFF DarkOrchid1
-    BFBFBF gray75
-    BFBFBF grey75
-    BFEFFF LightBlue1
-    C0FF3E OliveDrab1
-    C1CDC1 honeydew3
-    C1CDCD azure3
-    C1FFC1 DarkSeaGreen1
-    C2C2C2 gray76
-    C2C2C2 grey76
-    C4C4C4 gray77
-    C4C4C4 grey77
-    C6E2FF SlateGray1
-    C71585 MediumVioletRed
-    C71585 {medium violet red}
-    C7C7C7 gray78
-    C7C7C7 grey78
-    C9C9C9 gray79
-    C9C9C9 grey79
-    CAE1FF LightSteelBlue1
-    CAFF70 DarkOliveGreen1
-    CCCCCC gray80
-    CCCCCC grey80
-    CD0000 red3
-    CD00CD magenta3
-    CD1076 DeepPink3
-    CD2626 firebrick3
-    CD2990 maroon3
-    CD3278 VioletRed3
-    CD3333 brown3
-    CD3700 OrangeRed3
-    CD4F39 tomato3
-    CD5555 IndianRed3
-    CD5B45 coral3
-    CD5C5C IndianRed
-    CD5C5C {indian red}
-    CD6090 HotPink3
-    CD6600 DarkOrange3
-    CD661D chocolate3
-    CD6839 sienna3
-    CD6889 PaleVioletRed3
-    CD69C9 orchid3
-    CD7054 salmon3
-    CD8162 LightSalmon3
-    CD8500 orange3
-    CD853F peru
-    CD853F tan3
-    CD8C95 LightPink3
-    CD919E pink3
-    CD950C DarkGoldenrod3
-    CD96CD plum3
-    CD9B1D goldenrod3
-    CD9B9B RosyBrown3
-    CDAA7D burlywood3
-    CDAD00 gold3
-    CDAF95 PeachPuff3
-    CDB38B NavajoWhite3
-    CDB5CD thistle3
-    CDB79E bisque3
-    CDB7B5 MistyRose3
-    CDBA96 wheat3
-    CDBE70 LightGoldenrod3
-    CDC0B0 AntiqueWhite3
-    CDC1C5 LavenderBlush3
-    CDC5BF seashell3
-    CDC673 khaki3
-    CDC8B1 cornsilk3
-    CDC9A5 LemonChiffon3
-    CDC9C9 snow3
-    CDCD00 yellow3
-    CDCDB4 LightYellow3
-    CDCDC1 ivory3
-    CFCFCF gray81
-    CFCFCF grey81
-    D02090 VioletRed
-    D02090 {violet red}
-    D15FEE MediumOrchid2
-    D1D1D1 gray82
-    D1D1D1 grey82
-    D1EEEE LightCyan2
-    D2691E chocolate
-    D2B48C tan
-    D3D3D3 LightGray
-    D3D3D3 LightGrey
-    D3D3D3 {light gray}
-    D3D3D3 {light grey}
-    D4D4D4 gray83
-    D4D4D4 grey83
-    D6D6D6 gray84
-    D6D6D6 grey84
-    D8BFD8 thistle
-    D9D9D9 gray85
-    D9D9D9 grey85
-    DA70D6 orchid
-    DAA520 goldenrod
-    DB7093 PaleVioletRed
-    DB7093 {pale violet red}
-    DBDBDB gray86
-    DBDBDB grey86
-    DCDCDC gainsboro
-    DDA0DD plum
-    DEB887 burlywood
-    DEDEDE gray87
-    DEDEDE grey87
-    E066FF MediumOrchid1
-    E0E0E0 gray88
-    E0E0E0 grey88
-    E0EEE0 honeydew2
-    E0EEEE azure2
-    E0FFFF LightCyan
-    E0FFFF LightCyan1
-    E0FFFF {light cyan}
-    E3E3E3 gray89
-    E3E3E3 grey89
-    E5E5E5 gray90
-    E5E5E5 grey90
-    E6E6FA lavender
-    E8E8E8 gray91
-    E8E8E8 grey91
-    E9967A DarkSalmon
-    E9967A {dark salmon}
-    EBEBEB gray92
-    EBEBEB grey92
-    EDEDED gray93
-    EDEDED grey93
-    EE0000 red2
-    EE00EE magenta2
-    EE1289 DeepPink2
-    EE2C2C firebrick2
-    EE30A7 maroon2
-    EE3A8C VioletRed2
-    EE3B3B brown2
-    EE4000 OrangeRed2
-    EE5C42 tomato2
-    EE6363 IndianRed2
-    EE6A50 coral2
-    EE6AA7 HotPink2
-    EE7600 DarkOrange2
-    EE7621 chocolate2
-    EE7942 sienna2
-    EE799F PaleVioletRed2
-    EE7AE9 orchid2
-    EE8262 salmon2
-    EE82EE violet
-    EE9572 LightSalmon2
-    EE9A00 orange2
-    EE9A49 tan2
-    EEA2AD LightPink2
-    EEA9B8 pink2
-    EEAD0E DarkGoldenrod2
-    EEAEEE plum2
-    EEB422 goldenrod2
-    EEB4B4 RosyBrown2
-    EEC591 burlywood2
-    EEC900 gold2
-    EECBAD PeachPuff2
-    EECFA1 NavajoWhite2
-    EED2EE thistle2
-    EED5B7 bisque2
-    EED5D2 MistyRose2
-    EED8AE wheat2
-    EEDC82 LightGoldenrod2
-    EEDD82 LightGoldenrod
-    EEDD82 {light goldenrod}
-    EEDFCC AntiqueWhite2
-    EEE0E5 LavenderBlush2
-    EEE5DE seashell2
-    EEE685 khaki2
-    EEE8AA PaleGoldenrod
-    EEE8AA {pale goldenrod}
-    EEE8CD cornsilk2
-    EEE9BF LemonChiffon2
-    EEE9E9 snow2
-    EEEE00 yellow2
-    EEEED1 LightYellow2
-    EEEEE0 ivory2
-    F08080 LightCoral
-    F08080 {light coral}
-    F0E68C khaki
-    F0F0F0 gray94
-    F0F0F0 grey94
-    F0F8FF AliceBlue
-    F0F8FF {alice blue}
-    F0FFF0 honeydew
-    F0FFF0 honeydew1
-    F0FFFF azure
-    F0FFFF azure1
-    F2F2F2 gray95
-    F2F2F2 grey95
-    F4A460 SandyBrown
-    F4A460 {sandy brown}
-    F5DEB3 wheat
-    F5F5DC beige
-    F5F5F5 WhiteSmoke
-    F5F5F5 gray96
-    F5F5F5 grey96
-    F5F5F5 {white smoke}
-    F5FFFA MintCream
-    F5FFFA {mint cream}
-    F7F7F7 gray97
-    F7F7F7 grey97
-    F8F8FF GhostWhite
-    F8F8FF {ghost white}
-    FA8072 salmon
-    FAEBD7 AntiqueWhite
-    FAEBD7 {antique white}
-    FAF0E6 linen
-    FAFAD2 LightGoldenrodYellow
-    FAFAD2 {light goldenrod yellow}
-    FAFAFA gray98
-    FAFAFA grey98
-    FCFCFC gray99
-    FCFCFC grey99
-    FDF5E6 OldLace
-    FDF5E6 {old lace}
-    FF0000 red
-    FF0000 red1
-    FF00FF magenta
-    FF00FF magenta1
-    FF1493 DeepPink
-    FF1493 DeepPink1
-    FF1493 {deep pink}
-    FF3030 firebrick1
-    FF34B3 maroon1
-    FF3E96 VioletRed1
-    FF4040 brown1
-    FF4500 OrangeRed
-    FF4500 OrangeRed1
-    FF4500 {orange red}
-    FF6347 tomato
-    FF6347 tomato1
-    FF69B4 HotPink
-    FF69B4 {hot pink}
-    FF6A6A IndianRed1
-    FF6EB4 HotPink1
-    FF7256 coral1
-    FF7F00 DarkOrange1
-    FF7F24 chocolate1
-    FF7F50 coral
-    FF8247 sienna1
-    FF82AB PaleVioletRed1
-    FF83FA orchid1
-    FF8C00 DarkOrange
-    FF8C00 {dark orange}
-    FF8C69 salmon1
-    FFA07A LightSalmon
-    FFA07A LightSalmon1
-    FFA07A {light salmon}
-    FFA500 orange
-    FFA500 orange1
-    FFA54F tan1
-    FFAEB9 LightPink1
-    FFB5C5 pink1
-    FFB6C1 LightPink
-    FFB6C1 {light pink}
-    FFB90F DarkGoldenrod1
-    FFBBFF plum1
-    FFC0CB pink
-    FFC125 goldenrod1
-    FFC1C1 RosyBrown1
-    FFD39B burlywood1
-    FFD700 gold
-    FFD700 gold1
-    FFDAB9 PeachPuff
-    FFDAB9 PeachPuff1
-    FFDAB9 {peach puff}
-    FFDEAD NavajoWhite
-    FFDEAD NavajoWhite1
-    FFDEAD {navajo white}
-    FFE1FF thistle1
-    FFE4B5 moccasin
-    FFE4C4 bisque
-    FFE4C4 bisque1
-    FFE4E1 MistyRose
-    FFE4E1 MistyRose1
-    FFE4E1 {misty rose}
-    FFE7BA wheat1
-    FFEBCD BlanchedAlmond
-    FFEBCD {blanched almond}
-    FFEC8B LightGoldenrod1
-    FFEFD5 PapayaWhip
-    FFEFD5 {papaya whip}
-    FFEFDB AntiqueWhite1
-    FFF0F5 LavenderBlush
-    FFF0F5 LavenderBlush1
-    FFF0F5 {lavender blush}
-    FFF5EE seashell
-    FFF5EE seashell1
-    FFF68F khaki1
-    FFF8DC cornsilk
-    FFF8DC cornsilk1
-    FFFACD LemonChiffon
-    FFFACD LemonChiffon1
-    FFFACD {lemon chiffon}
-    FFFAF0 FloralWhite
-    FFFAF0 {floral white}
-    FFFAFA snow
-    FFFAFA snow1
-    FFFF00 yellow
-    FFFF00 yellow1
-    FFFFE0 LightYellow
-    FFFFE0 LightYellow1
-    FFFFE0 {light yellow}
-    FFFFF0 ivory
-    FFFFF0 ivory1
-    FFFFFF gray100
-    FFFFFF grey100
-    FFFFFF white
-}
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set bg [blt::bgpattern create gradient -low  grey100 -high grey90 \
-	-dir y -jitter yes -log yes -relativeto toplevel]
-set bg white
-set myIcon ""
-blt::combobutton .b \
-    -font { arial 10 bold } \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -borderwidth 2 \
-    -highlightthickness 1 \
-    -arrowon yes \
-    -menu .b.m 
-
-blt::table . \
-    0,0 .b -fill both
-
-
-blt::combomenu .b.m  \
-    -textvariable myText1 \
-    -height 400 \
-    -background $bg \
-    -iconvariable myIcon1 \
-    -font { Arial 9 bold } \
-    -acceleratorfont { Arial 8 } \
-    -yscrollbar .b.m.ybar \
-    -xscrollbar .b.m.xbar
-
-blt::tk::scrollbar .b.m.xbar
-blt::tk::scrollbar .b.m.ybar
-
-set bg [image create picture -width 30 -height 20]
-$bg blank 0x0000000
-$bg draw rectangle 5 5 14 26 -color 0xFF00000
-$bg blur $bg 4
-
-foreach {rgb name} $colors {
-    set icon [image create picture -width 25 -height 25]
-    $icon blank 0x00000000
-    $icon draw circle 11 11 9 -fill \#$rgb -antialias yes \
-	-outline black -linewidth 1 -shadow 2
-    #$icon draw circle 10 10 2 -color black -antialias yes
-    .b.m add -text $name -icon $icon
-}
diff --git a/blt3.0/demos/centry1.tcl b/blt3.0/demos/centry1.tcl
deleted file mode 100644
index d6b8e3f..0000000
--- a/blt3.0/demos/centry1.tcl
+++ /dev/null
@@ -1,95 +0,0 @@
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-#set icon [image create picture -data $imgData]
-set icon [image create picture -file images/mini-book1.gif]
-#set icon [image create picture -file images/blt98.gif]
-#set image [image create picture -file ~/images.jpeg]
-set activebg [blt::bgpattern create gradient -high  grey70 -low grey85 \
-	-jitter yes -log yes -relativeto self]
-set bg [blt::bgpattern create gradient -high  grey80 -low grey95 \
-	-jitter yes -log yes -relativeto self]
-
-set image ""
-option add *ComboEntry.takeFocus 1
-
-blt::comboentry .e \
-    -textvariable t \
-    -font { arial 10 } \
-    -image $image \
-    -iconvariable icon \
-    -textwidth 6 \
-    -menu .e.m \
-    -exportselection yes \
-    -xscrollcommand { .s set }  \
-    -command "puts {button pressed}"
-
-blt::combobutton .b \
-    -textvariable t \
-    -image $image \
-    -iconvariable icon \
-    -bg $bg \
-    -font { Arial 12  } -justify left \
-    -underline 19 \
-    -arrowborderwidth 2 \
-    -arrowrelief flat  
-
-blt::tk::scrollbar .s -orient vertical -command { .e xview } 
-
-
-blt::table . \
-    0,0 .e -fill both -cspan 2 -padx 2 -pady 2 \
-
-blt::table configure . c1 -resize shrink
-blt::table configure . r0 -resize shrink
-blt::table configure . c0 -pad { 2 0 }
-blt::table configure . c1 -pad { 0 2 }
-
-blt::combomenu .e.m  -relief sunken -bg white -textvariable t
-.e.m add -text "one" -accelerator "^A" 
-.e.m add -text "two" -accelerator "^B" 
-.e.m add -text "three" -accelerator "^C"
-.e.m add -text "four" -accelerator "^D" 
-.e.m add -type cascade -text "cascade" -accelerator "^E" -menu .e.m.m
-
-blt::combomenu .e.m.m -relief sunken -bg white -textvariable t
-.e.m.m add -text "five" -accelerator "^A"
-.e.m.m add -text "six" -accelerator "^B" 
-.e.m.m add -text "seven" -accelerator "^C" 
-.e.m.m add -text "eight" -accelerator "^D" 
-.e.m.m add -text "nine" -accelerator "^D" -command "set t {really really really long entry}"
-.e.m.m add -type cascade -text "cascade" -accelerator "^E" 
-
-
-after idle { 
-    set t "Hello, World" 
-    .e insert 0 "Fred says: \n"
-    puts "($t)"
-    update
-}
-
-proc AddEntry { e m } {
-    set s [$e get]
-    puts stderr "current entry is $s"
-
-    puts stderr "$m find $s -from 0 -type command => [$m find $s -from 0 -type command]"
-    puts stderr "$m find * -from 0 -type separator -glob => [$m find * -from 0 -type separator -glob]"
-
-    if { [$m find $s -from 0 -type command] < 0 } {
-	set sep [$m index "mysep"]
-	if { $sep < 0 } {
-	    $m insert before 0 -type separator -text "mysep"
-	}
-	$m insert before 0 -text $s 
-    } 
-}
-
-bind .e <Return> [list AddEntry .e .e.m]
-
-after 5000 {
-#	.e configure -state disabled
-}
diff --git a/blt3.0/demos/cmenu1.tcl b/blt3.0/demos/cmenu1.tcl
deleted file mode 100755
index 91b7a5b..0000000
--- a/blt3.0/demos/cmenu1.tcl
+++ /dev/null
@@ -1,252 +0,0 @@
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-set icon2 [image create picture -file images/blt98.gif]
-set icon [image create picture -data $imgData]
-set bg white
-
-set image ""
-option add *ComboEntry.takeFocus 1
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-#    -postcommand {.e.m configure -width [winfo width .e] ; update} \
-set myIcon ""
-blt::comboentry .e \
-    -image $image \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -textwidth 0 \
-    -menu .e.m \
-    -menuanchor se \
-    -exportselection yes \
-    -xscrollcommand { .s set }  \
-    -command "puts {button pressed}"
-
-#    -bg $bg 
-
-blt::combomenu .e.m  \
-    -background white \
-    -activebackground skyblue4 \
-    -activeforeground white \
-    -restrictwidth min \
-    -height 200 \
-    -checkbuttonoutlinecolor "" \
-    -checkbuttonfillcolor "" \
-    -disabledbackground \#f0f0f0 \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -yscrollbar .e.m.ybar \
-    -xscrollbar .e.m.xbar
-
-blt::tk::scrollbar .e.m.xbar 
-blt::tk::scrollbar .e.m.ybar
-
-set onOff 1
-set wwho ""
-foreach {item type} { 
-    Undo	command 
-    X1		checkbutton 
-    Y1		radiobutton
-    Redo	checkbutton
-    Cut		command
-    Copy	checkbutton
-    X2		checkbutton
-    Y2		radiobutton
-    Paste	checkbutton
-    "Edit Options" separator
-    "Select All" checkbutton
-    X3		checkbutton
-    Y3		radiobutton
-    Find	cascade
-    Replace	checkbutton
-} {
-    set char [string range $item 0 0] 
-    .e.m add \
-	-type $type \
-	-text $item \
-	-accel "Ctrl+$char" \
-	-underline 0 \
-	-tag "$type [string tolower $char]" \
-	-icon $icon \
-	-variable $item \
-	-value $item \
-
-}
-set X1 1
-set Redo 1
-
-.e.m item configure Find -menu .e.m.m
-#-state disabled
-.e.m item configure x -state disabled 
-.e.m item configure radiobutton -variable wwho 
-.e.m item configure Y1 -state disabled
-puts stderr "config=[.e.m item configure Y3]"
-set wwho Y1
-blt::combomenu .e.m.m  \
-    -bg $bg \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -disabledforeground grey45  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey45  \
-    -height { 0 500 } \
-    -yscrollbar .e.m.m.ybar \
-    -xscrollbar .e.m.m.xbar \
-    -font "Arial 8" 
-
-blt::tk::scrollbar .e.m.m.xbar 
-blt::tk::scrollbar .e.m.m.ybar 
-
-set onOff 0
-foreach item { 
-    Undo X1 Y1 Redo Cut Copy X2 Y2 Paste "Select All" X3 Y3 Find Replace 
-} {
-    set char [string range $item 0 0] 
-    .e.m.m add \
-	-type checkbutton \
-	-text $item \
-	-accel "Ctrl+$char" \
-	-accel "" \
-	-underline 0 \
-	-tag [string tolower $char] \
-	-icon $icon \
-	-variable $item \
-	-value $item \
-
-}
-set wwho2 ""
-.e.m.m item configure Undo -type command
-.e.m.m item configure Cut -type command 
-.e.m.m item configure Find -type cascade -menu .e.m.m.m
-#-state disabled
-.e.m.m item configure Y3 -type command -image $icon2
-.e.m.m item configure Undo -type command 
-.e.m.m item configure Paste -type separator 
-.e.m.m item configure x -state disabled 
-.e.m.m item configure y -type radiobutton -variable wwho2
-
-set labels { 
-    Aarhus Aaron Ababa aback abaft abandon abandoned abandoning
-    abandonment abandons abase abased abasement abasements abases
-    abash abashed abashes abashing abasing abate abated abatement
-    abatements abater abates abating Abba abbe abbey abbeys abbot
-    abbots Abbott abbreviate abbreviated abbreviates abbreviating
-    abbreviation abbreviations Abby abdomen abdomens abdominal
-    abduct abducted abduction abductions abductor abductors abducts
-    Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant
-    aberration aberrations abet abets abetted abetter abetting
-    abeyance abhor abhorred abhorrent abhorrer abhorring abhors
-    abide abided abides abiding Abidjan Abigail Abilene abilities
-    ability abject abjection abjections abjectly abjectness abjure
-    abjured abjures abjuring ablate ablated ablates ablating
-    ablation ablative ablaze able abler ablest ably Abner abnormal
-    abnormalities abnormality abnormally Abo aboard abode abodes
-    abolish abolished abolisher abolishers abolishes abolishing
-    abolishment abolishments abolition abolitionist abolitionists
-    abominable abominate aboriginal aborigine aborigines abort
-    aborted aborting abortion abortions abortive abortively aborts
-    Abos abound abounded abounding abounds about above aboveboard
-    aboveground abovementioned abrade abraded abrades abrading
-    Abraham Abram Abrams Abramson abrasion abrasions abrasive
-    abreaction abreactions abreast abridge abridged abridges
-    abridging abridgment abroad abrogate abrogated abrogates
-    abrogating abrupt abruptly abruptness abscess abscessed
-    abscesses abscissa abscissas abscond absconded absconding
-    absconds absence absences absent absented absentee
-    absenteeism absentees absentia absenting absently absentminded
-    absents absinthe absolute absolutely absoluteness absolutes
-    absolution absolve absolved absolves absolving absorb
-    absorbed absorbency absorbent absorber absorbing absorbs
-    absorption absorptions absorptive abstain abstained abstainer
-    abstaining abstains abstention abstentions abstinence
-    abstract abstracted abstracting abstraction abstractionism
-    abstractionist abstractions abstractly abstractness
-    abstractor abstractors abstracts abstruse abstruseness
-    absurd absurdities absurdity absurdly Abu abundance abundant
-    abundantly abuse abused abuses abusing abusive abut abutment
-    abuts abutted abutter abutters abutting abysmal abysmally
-    abyss abysses Abyssinia Abyssinian Abyssinians acacia
-    academia academic academically academics academies academy
-    Acadia Acapulco accede acceded accedes accelerate accelerated
-    accelerates accelerating acceleration accelerations
-    accelerator accelerators accelerometer accelerometers accent
-    accented accenting accents accentual accentuate accentuated
-    accentuates accentuating accentuation accept acceptability
-    acceptable acceptably acceptance acceptances accepted
-    accepter accepters accepting acceptor acceptors accepts
-    access accessed accesses accessibility accessible accessibly
-    accessing accession accessions accessories accessors
-    accessory accident accidental accidentally accidently
-    accidents acclaim acclaimed acclaiming acclaims acclamation
-    acclimate acclimated acclimates acclimating acclimatization
-    acclimatized accolade accolades accommodate accommodated
-    accommodates accommodating accommodation accommodations
-    accompanied accompanies accompaniment accompaniments
-    accompanist accompanists accompany accompanying accomplice
-    accomplices accomplish accomplished accomplisher accomplishers
-    accomplishes accomplishing accomplishment accomplishments
-    accord accordance accorded accorder accorders according
-    accordingly accordion accordions accords accost accosted
-    accosting accosts account accountability accountable accountably
-    accountancy accountant accountants accounted accounting
-    accounts Accra accredit accreditation accreditations
-    accredited accretion accretions accrue accrued accrues
-    accruing acculturate acculturated acculturates acculturating
-    acculturation accumulate accumulated accumulates accumulating
-    accumulation accumulations accumulator accumulators
-    accuracies accuracy accurate accurately accurateness accursed
-    accusal accusation accusations accusative accuse accused
-    accuser accuses accusing accusingly accustom accustomed
-    accustoming accustoms ace aces acetate acetone acetylene
-    Achaean Achaeans ache ached aches achievable achieve achieved
-    achievement achievements achiever achievers achieves achieving
-    Achilles aching acid acidic acidities acidity acidly acids
-    acidulous Ackerman Ackley acknowledge acknowledgeable
-    acknowledged acknowledgement acknowledgements acknowledger
-    acknowledgers acknowledges acknowledging acknowledgment
-    acknowledgments acme acne acolyte acolytes acorn acorns
-    acoustic acoustical acoustically acoustician acoustics
-    acquaint acquaintance acquaintances acquainted acquainting
-    acquaints acquiesce acquiesced acquiescence acquiescent
-    acquiesces acquiescing acquirable acquire acquired acquires
-    acquiring acquisition acquisitions
-}
-
-blt::combomenu .e.m.m.m \
-    -bg $bg \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -disabledforeground grey45  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey45  \
-    -width  { 0 400 } \
-    -height { 0 500 } \
-    -yscrollbar .e.m.m.m.ybar \
-    -xscrollbar .e.m.m.m.xbar
-
-.e.m.m.m listadd $labels \
-    -icon $icon 
-
-blt::tk::scrollbar .e.m.m.m.xbar
-blt::tk::scrollbar .e.m.m.m.ybar 
-
-blt::tk::scrollbar .s -orient vertical -command { .e xview } 
-
-bind ComboEntry <3> {
-    grab release [grab current]
-}
-
-blt::table . \
-    0,0 .e -fill x -anchor n 
-
-blt::table configure . r0 -resize none
-blt::table configure . r1 -resize both
-
-
diff --git a/blt3.0/demos/cmenu2.tcl b/blt3.0/demos/cmenu2.tcl
deleted file mode 100644
index bd209c7..0000000
--- a/blt3.0/demos/cmenu2.tcl
+++ /dev/null
@@ -1,295 +0,0 @@
-
-set colors {
-    aliceblue
-    antiquewhite
-    aqua
-    aquamarine
-    azure
-    beige
-    bisque
-    black
-    blanchedalmond
-    blue
-    blueviolet
-    brown
-    burlywood
-    cadetblue
-    chartreuse
-    chocolate
-    coral
-    cornflowerblue
-    cornsilk
-    crimson
-    cyan
-    darkblue
-    darkcyan
-    darkgoldenrod
-    darkgray
-    darkgreen
-    darkkhaki
-    darkmagenta
-    darkolivegreen
-    darkorange
-    darkorchid
-    darkred
-    darksalmon
-    darkseagreen
-    darkslateblue
-    darkslategray
-    darkturquoise
-    darkviolet
-    deeppink
-    deepskyblue
-    dimgray
-    dodgerblue
-    firebrick
-    floralwhite
-    forestgreen
-    fuchsia
-    gainsboro
-    ghostwhite
-    gold
-    goldenrod
-    gray
-    green
-    greenyellow
-    honeydew
-    hotpink
-    indianred
-    indigo
-    ivory
-    khaki
-    lavender
-    lavenderblush
-    lawngreen
-    lemonchiffon
-    lightblue
-    lightcoral
-    lightcyan
-    lightgoldenrodyellow
-    lightgreen
-    lightgrey
-    lightpink
-    lightsalmon
-    lightseagreen
-    lightskyblue
-    lightslategray
-    lightsteelblue
-    lightyellow
-    lime
-    limegreen
-    linen
-    magenta
-    #008000
-    mediumaquamarine
-    mediumblue
-    mediumorchid
-    mediumpurple
-    mediumseagreen
-    mediumslateblue
-    mediumspringgreen
-    mediumturquoise
-    mediumvioletred
-    midnightblue
-    mintcream
-    mistyrose
-    moccasin
-    navajowhite
-    navy
-    oldlace
-    olive
-    olivedrab
-    orange
-    orangered
-    orchid
-    palegoldenrod
-    palegreen
-    paleturquoise
-    palevioletred
-    papayawhip
-    peachpuff
-    peru
-    pink
-    plum
-    powderblue
-    purple
-    red
-    rosybrown
-    royalblue
-    saddlebrown
-    salmon
-    sandybrown
-    seagreen
-    seashell
-    sienna
-    silver
-    skyblue
-    slateblue
-    slategray
-    snow
-    springgreen
-    steelblue
-    tan
-    teal
-    thistle
-    tomato
-    turquoise
-    violet
-    wheat
-    white
-    whitesmoke
-    yellow
-    yellowgreen
-}
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-set icon2 [image create picture -file images/blt98.gif]
-set icon [image create picture -data $imgData]
-set bg [blt::bgpattern create gradient -high  grey100 -low grey90 \
-	-dir x -jitter yes -log yes -relativeto self]
-
-set image ""
-option add *ComboEntry.takeFocus 1
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set myIcon ""
-blt::comboentry .e \
-    -image $image \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -textwidth 6 \
-    -menu .e.m \
-    -menuanchor se \
-    -exportselection yes \
-    -xscrollcommand { .s set }  \
-    -postcommand {.e.m configure -width [winfo width .e] ; update} \
-    -command "puts {button pressed}"
-
-
-set labels { 
-    Aarhus Aaron Ababa aback abaft abandon abandoned abandoning
-    abandonment abandons abase abased abasement abasements abases
-    abash abashed abashes abashing abasing abate abated abatement
-    abatements abater abates abating Abba abbe abbey abbeys abbot
-    abbots Abbott abbreviate abbreviated abbreviates abbreviating
-    abbreviation abbreviations Abby abdomen abdomens abdominal
-    abduct abducted abduction abductions abductor abductors abducts
-    Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant
-    aberration aberrations abet abets abetted abetter abetting
-    abeyance abhor abhorred abhorrent abhorrer abhorring abhors
-    abide abided abides abiding Abidjan Abigail Abilene abilities
-    ability abject abjection abjections abjectly abjectness abjure
-    abjured abjures abjuring ablate ablated ablates ablating
-    ablation ablative ablaze able abler ablest ably Abner abnormal
-    abnormalities abnormality abnormally Abo aboard abode abodes
-    abolish abolished abolisher abolishers abolishes abolishing
-    abolishment abolishments abolition abolitionist abolitionists
-    abominable abominate aboriginal aborigine aborigines abort
-    aborted aborting abortion abortions abortive abortively aborts
-    Abos abound abounded abounding abounds about above aboveboard
-    aboveground abovementioned abrade abraded abrades abrading
-    Abraham Abram Abrams Abramson abrasion abrasions abrasive
-    abreaction abreactions abreast abridge abridged abridges
-    abridging abridgment abroad abrogate abrogated abrogates
-    abrogating abrupt abruptly abruptness abscess abscessed
-    abscesses abscissa abscissas abscond absconded absconding
-    absconds absence absences absent absented absentee
-    absenteeism absentees absentia absenting absently absentminded
-    absents absinthe absolute absolutely absoluteness absolutes
-    absolution absolve absolved absolves absolving absorb
-    absorbed absorbency absorbent absorber absorbing absorbs
-    absorption absorptions absorptive abstain abstained abstainer
-    abstaining abstains abstention abstentions abstinence
-    abstract abstracted abstracting abstraction abstractionism
-    abstractionist abstractions abstractly abstractness
-    abstractor abstractors abstracts abstruse abstruseness
-    absurd absurdities absurdity absurdly Abu abundance abundant
-    abundantly abuse abused abuses abusing abusive abut abutment
-    abuts abutted abutter abutters abutting abysmal abysmally
-    abyss abysses Abyssinia Abyssinian Abyssinians acacia
-    academia academic academically academics academies academy
-    Acadia Acapulco accede acceded accedes accelerate accelerated
-    accelerates accelerating acceleration accelerations
-    accelerator accelerators accelerometer accelerometers accent
-    accented accenting accents accentual accentuate accentuated
-    accentuates accentuating accentuation accept acceptability
-    acceptable acceptably acceptance acceptances accepted
-    accepter accepters accepting acceptor acceptors accepts
-    access accessed accesses accessibility accessible accessibly
-    accessing accession accessions accessories accessors
-    accessory accident accidental accidentally accidently
-    accidents acclaim acclaimed acclaiming acclaims acclamation
-    acclimate acclimated acclimates acclimating acclimatization
-    acclimatized accolade accolades accommodate accommodated
-    accommodates accommodating accommodation accommodations
-    accompanied accompanies accompaniment accompaniments
-    accompanist accompanists accompany accompanying accomplice
-    accomplices accomplish accomplished accomplisher accomplishers
-    accomplishes accomplishing accomplishment accomplishments
-    accord accordance accorded accorder accorders according
-    accordingly accordion accordions accords accost accosted
-    accosting accosts account accountability accountable accountably
-    accountancy accountant accountants accounted accounting
-    accounts Accra accredit accreditation accreditations
-    accredited accretion accretions accrue accrued accrues
-    accruing acculturate acculturated acculturates acculturating
-    acculturation accumulate accumulated accumulates accumulating
-    accumulation accumulations accumulator accumulators
-    accuracies accuracy accurate accurately accurateness accursed
-    accusal accusation accusations accusative accuse accused
-    accuser accuses accusing accusingly accustom accustomed
-    accustoming accustoms ace aces acetate acetone acetylene
-    Achaean Achaeans ache ached aches achievable achieve achieved
-    achievement achievements achiever achievers achieves achieving
-    Achilles aching acid acidic acidities acidity acidly acids
-    acidulous Ackerman Ackley acknowledge acknowledgeable
-    acknowledged acknowledgement acknowledgements acknowledger
-    acknowledgers acknowledges acknowledging acknowledgment
-    acknowledgments acme acne acolyte acolytes acorn acorns
-    acoustic acoustical acoustically acoustician acoustics
-    acquaint acquaintance acquaintances acquainted acquainting
-    acquaints acquiesce acquiesced acquiescence acquiescent
-    acquiesces acquiescing acquirable acquire acquired acquires
-    acquiring acquisition acquisitions
-}
-
-blt::combomenu .e.m \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -disabledforeground grey45  \
-    -disabledbackground grey85  \
-    -disabledacceleratorforeground grey45  \
-    -width { 0 400 } \
-    -height { 0 2i } \
-    -yscrollbar .e.m.ybar \
-    -xscrollbar .e.m.xbar
-
-.e.m listadd $labels \
-    -icon $icon 
-
-blt::tk::scrollbar .e.m.xbar  
-blt::tk::scrollbar .e.m.ybar 
-
-blt::tk::scrollbar .s -orient vertical -command { .e xview } 
-
-bind ComboEntry <3> {
-    grab release [grab current]
-}
-
-blt::table . \
-    0,0 .e -fill x -anchor n 
-
-blt::table configure . r0 -resize none
-blt::table configure . r1 -resize expand
-
-wm geometry . 200x400
-
-#blt::bltdebug 100
\ No newline at end of file
diff --git a/blt3.0/demos/cmenu3.tcl b/blt3.0/demos/cmenu3.tcl
deleted file mode 100644
index 5835a89..0000000
--- a/blt3.0/demos/cmenu3.tcl
+++ /dev/null
@@ -1,801 +0,0 @@
-set colors {
-    000000 black
-    000000 gray0
-    000000 grey0
-    000080 NavyBlue
-    000080 navy
-    000080 {navy blue}
-    00008B DarkBlue
-    00008B blue4
-    00008B {dark blue}
-    0000CD MediumBlue
-    0000CD blue3
-    0000CD {medium blue}
-    0000EE blue2
-    0000FF blue
-    0000FF blue1
-    006400 DarkGreen
-    006400 {dark green}
-    00688B DeepSkyBlue4
-    00868B turquoise4
-    008B00 green4
-    008B45 SpringGreen4
-    008B8B DarkCyan
-    008B8B cyan4
-    008B8B {dark cyan}
-    009ACD DeepSkyBlue3
-    00B2EE DeepSkyBlue2
-    00BFFF DeepSkyBlue
-    00BFFF DeepSkyBlue1
-    00BFFF {deep sky blue}
-    00C5CD turquoise3
-    00CD00 green3
-    00CD66 SpringGreen3
-    00CDCD cyan3
-    00CED1 DarkTurquoise
-    00CED1 {dark turquoise}
-    00E5EE turquoise2
-    00EE00 green2
-    00EE76 SpringGreen2
-    00EEEE cyan2
-    00F5FF turquoise1
-    00FA9A MediumSpringGreen
-    00FA9A {medium spring green}
-    00FF00 green
-    00FF00 green1
-    00FF7F SpringGreen
-    00FF7F SpringGreen1
-    00FF7F {spring green}
-    00FFFF cyan
-    00FFFF cyan1
-    030303 gray1
-    030303 grey1
-    050505 gray2
-    050505 grey2
-    080808 gray3
-    080808 grey3
-    0A0A0A gray4
-    0A0A0A grey4
-    0D0D0D gray5
-    0D0D0D grey5
-    0F0F0F gray6
-    0F0F0F grey6
-    104E8B DodgerBlue4
-    121212 gray7
-    121212 grey7
-    141414 gray8
-    141414 grey8
-    171717 gray9
-    171717 grey9
-    1874CD DodgerBlue3
-    191970 MidnightBlue
-    191970 {midnight blue}
-    1A1A1A gray10
-    1A1A1A grey10
-    1C1C1C gray11
-    1C1C1C grey11
-    1C86EE DodgerBlue2
-    1E90FF DodgerBlue
-    1E90FF DodgerBlue1
-    1E90FF {dodger blue}
-    1F1F1F gray12
-    1F1F1F grey12
-    20B2AA LightSeaGreen
-    20B2AA {light sea green}
-    212121 gray13
-    212121 grey13
-    228B22 ForestGreen
-    228B22 {forest green}
-    242424 gray14
-    242424 grey14
-    262626 gray15
-    262626 grey15
-    27408B RoyalBlue4
-    292929 gray16
-    292929 grey16
-    2B2B2B gray17
-    2B2B2B grey17
-    2E2E2E gray18
-    2E2E2E grey18
-    2E8B57 SeaGreen
-    2E8B57 SeaGreen4
-    2E8B57 {sea green}
-    2F4F4F DarkSlateGray
-    2F4F4F DarkSlateGrey
-    2F4F4F {dark slate gray}
-    2F4F4F {dark slate grey}
-    303030 gray19
-    303030 grey19
-    32CD32 LimeGreen
-    32CD32 {lime green}
-    333333 gray20
-    333333 grey20
-    363636 gray21
-    363636 grey21
-    36648B SteelBlue4
-    383838 gray22
-    383838 grey22
-    3A5FCD RoyalBlue3
-    3B3B3B gray23
-    3B3B3B grey23
-    3CB371 MediumSeaGreen
-    3CB371 {medium sea green}
-    3D3D3D gray24
-    3D3D3D grey24
-    404040 gray25
-    404040 grey25
-    40E0D0 turquoise
-    4169E1 RoyalBlue
-    4169E1 {royal blue}
-    424242 gray26
-    424242 grey26
-    436EEE RoyalBlue2
-    43CD80 SeaGreen3
-    454545 gray27
-    454545 grey27
-    458B00 chartreuse4
-    458B74 aquamarine4
-    4682B4 SteelBlue
-    4682B4 {steel blue}
-    473C8B SlateBlue4
-    474747 gray28
-    474747 grey28
-    483D8B DarkSlateBlue
-    483D8B {dark slate blue}
-    4876FF RoyalBlue1
-    48D1CC MediumTurquoise
-    48D1CC {medium turquoise}
-    4A4A4A gray29
-    4A4A4A grey29
-    4A708B SkyBlue4
-    4D4D4D gray30
-    4D4D4D grey30
-    4EEE94 SeaGreen2
-    4F4F4F gray31
-    4F4F4F grey31
-    4F94CD SteelBlue3
-    525252 gray32
-    525252 grey32
-    528B8B DarkSlateGray4
-    53868B CadetBlue4
-    545454 gray33
-    545454 grey33
-    548B54 PaleGreen4
-    54FF9F SeaGreen1
-    551A8B purple4
-    556B2F DarkOliveGreen
-    556B2F {dark olive green}
-    575757 gray34
-    575757 grey34
-    595959 gray35
-    595959 grey35
-    5C5C5C gray36
-    5C5C5C grey36
-    5CACEE SteelBlue2
-    5D478B MediumPurple4
-    5E5E5E gray37
-    5E5E5E grey37
-    5F9EA0 CadetBlue
-    5F9EA0 {cadet blue}
-    607B8B LightSkyBlue4
-    616161 gray38
-    616161 grey38
-    636363 gray39
-    636363 grey39
-    63B8FF SteelBlue1
-    6495ED CornflowerBlue
-    6495ED {cornflower blue}
-    666666 gray40
-    666666 grey40
-    668B8B PaleTurquoise4
-    66CD00 chartreuse3
-    66CDAA MediumAquamarine
-    66CDAA aquamarine3
-    66CDAA {medium aquamarine}
-    68228B DarkOrchid4
-    68838B LightBlue4
-    6959CD SlateBlue3
-    696969 DimGray
-    696969 DimGrey
-    696969 gray41
-    696969 grey41
-    696969 {dim gray}
-    696969 {dim grey}
-    698B22 OliveDrab4
-    698B69 DarkSeaGreen4
-    6A5ACD SlateBlue
-    6A5ACD {slate blue}
-    6B6B6B gray42
-    6B6B6B grey42
-    6B8E23 OliveDrab
-    6B8E23 {olive drab}
-    6C7B8B SlateGray4
-    6CA6CD SkyBlue3
-    6E6E6E gray43
-    6E6E6E grey43
-    6E7B8B LightSteelBlue4
-    6E8B3D DarkOliveGreen4
-    707070 gray44
-    707070 grey44
-    708090 SlateGray
-    708090 SlateGrey
-    708090 {slate gray}
-    708090 {slate grey}
-    737373 gray45
-    737373 grey45
-    757575 gray46
-    757575 grey46
-    76EE00 chartreuse2
-    76EEC6 aquamarine2
-    778899 LightSlateGray
-    778899 LightSlateGrey
-    778899 {light slate gray}
-    778899 {light slate grey}
-    787878 gray47
-    787878 grey47
-    79CDCD DarkSlateGray3
-    7A378B MediumOrchid4
-    7A67EE SlateBlue2
-    7A7A7A gray48
-    7A7A7A grey48
-    7A8B8B LightCyan4
-    7AC5CD CadetBlue3
-    7B68EE MediumSlateBlue
-    7B68EE {medium slate blue}
-    7CCD7C PaleGreen3
-    7CFC00 LawnGreen
-    7CFC00 {lawn green}
-    7D26CD purple3
-    7D7D7D gray49
-    7D7D7D grey49
-    7EC0EE SkyBlue2
-    7F7F7F gray50
-    7F7F7F grey50
-    7FFF00 chartreuse
-    7FFF00 chartreuse1
-    7FFFD4 aquamarine
-    7FFFD4 aquamarine1
-    828282 gray51
-    828282 grey51
-    836FFF SlateBlue1
-    838B83 honeydew4
-    838B8B azure4
-    8470FF LightSlateBlue
-    8470FF {light slate blue}
-    858585 gray52
-    858585 grey52
-    878787 gray53
-    878787 grey53
-    87CEEB SkyBlue
-    87CEEB {sky blue}
-    87CEFA LightSkyBlue
-    87CEFA {light sky blue}
-    87CEFF SkyBlue1
-    8968CD MediumPurple3
-    8A2BE2 BlueViolet
-    8A2BE2 {blue violet}
-    8A8A8A gray54
-    8A8A8A grey54
-    8B0000 DarkRed
-    8B0000 red4
-    8B0000 {dark red}
-    8B008B DarkMagenta
-    8B008B magenta4
-    8B008B {dark magenta}
-    8B0A50 DeepPink4
-    8B1A1A firebrick4
-    8B1C62 maroon4
-    8B2252 VioletRed4
-    8B2323 brown4
-    8B2500 OrangeRed4
-    8B3626 tomato4
-    8B3A3A IndianRed4
-    8B3A62 HotPink4
-    8B3E2F coral4
-    8B4500 DarkOrange4
-    8B4513 SaddleBrown
-    8B4513 chocolate4
-    8B4513 {saddle brown}
-    8B4726 sienna4
-    8B475D PaleVioletRed4
-    8B4789 orchid4
-    8B4C39 salmon4
-    8B5742 LightSalmon4
-    8B5A00 orange4
-    8B5A2B tan4
-    8B5F65 LightPink4
-    8B636C pink4
-    8B6508 DarkGoldenrod4
-    8B668B plum4
-    8B6914 goldenrod4
-    8B6969 RosyBrown4
-    8B7355 burlywood4
-    8B7500 gold4
-    8B7765 PeachPuff4
-    8B795E NavajoWhite4
-    8B7B8B thistle4
-    8B7D6B bisque4
-    8B7D7B MistyRose4
-    8B7E66 wheat4
-    8B814C LightGoldenrod4
-    8B8378 AntiqueWhite4
-    8B8386 LavenderBlush4
-    8B864E khaki4
-    8B8682 seashell4
-    8B8878 cornsilk4
-    8B8970 LemonChiffon4
-    8B8989 snow4
-    8B8B00 yellow4
-    8B8B7A LightYellow4
-    8B8B83 ivory4
-    8C8C8C gray55
-    8C8C8C grey55
-    8DB6CD LightSkyBlue3
-    8DEEEE DarkSlateGray2
-    8EE5EE CadetBlue2
-    8F8F8F gray56
-    8F8F8F grey56
-    8FBC8F DarkSeaGreen
-    8FBC8F {dark sea green}
-    90EE90 LightGreen
-    90EE90 PaleGreen2
-    90EE90 {light green}
-    912CEE purple2
-    919191 gray57
-    919191 grey57
-    9370DB MediumPurple
-    9370DB {medium purple}
-    9400D3 DarkViolet
-    9400D3 {dark violet}
-    949494 gray58
-    949494 grey58
-    969696 gray59
-    969696 grey59
-    96CDCD PaleTurquoise3
-    97FFFF DarkSlateGray1
-    98F5FF CadetBlue1
-    98FB98 PaleGreen
-    98FB98 {pale green}
-    9932CC DarkOrchid
-    9932CC {dark orchid}
-    999999 gray60
-    999999 grey60
-    9A32CD DarkOrchid3
-    9AC0CD LightBlue3
-    9ACD32 OliveDrab3
-    9ACD32 YellowGreen
-    9ACD32 {yellow green}
-    9AFF9A PaleGreen1
-    9B30FF purple1
-    9BCD9B DarkSeaGreen3
-    9C9C9C gray61
-    9C9C9C grey61
-    9E9E9E gray62
-    9E9E9E grey62
-    9F79EE MediumPurple2
-    9FB6CD SlateGray3
-    A020F0 purple
-    A0522D sienna
-    A1A1A1 gray63
-    A1A1A1 grey63
-    A2B5CD LightSteelBlue3
-    A2CD5A DarkOliveGreen3
-    A3A3A3 gray64
-    A3A3A3 grey64
-    A4D3EE LightSkyBlue2
-    A52A2A brown
-    A6A6A6 gray65
-    A6A6A6 grey65
-    A8A8A8 gray66
-    A8A8A8 grey66
-    A9A9A9 DarkGray
-    A9A9A9 DarkGrey
-    A9A9A9 {dark gray}
-    A9A9A9 {dark grey}
-    AB82FF MediumPurple1
-    ABABAB gray67
-    ABABAB grey67
-    ADADAD gray68
-    ADADAD grey68
-    ADD8E6 LightBlue
-    ADD8E6 {light blue}
-    ADFF2F GreenYellow
-    ADFF2F {green yellow}
-    AEEEEE PaleTurquoise2
-    AFEEEE PaleTurquoise
-    AFEEEE {pale turquoise}
-    B03060 maroon
-    B0B0B0 gray69
-    B0B0B0 grey69
-    B0C4DE LightSteelBlue
-    B0C4DE {light steel blue}
-    B0E0E6 PowderBlue
-    B0E0E6 {powder blue}
-    B0E2FF LightSkyBlue1
-    B22222 firebrick
-    B23AEE DarkOrchid2
-    B2DFEE LightBlue2
-    B3B3B3 gray70
-    B3B3B3 grey70
-    B3EE3A OliveDrab2
-    B452CD MediumOrchid3
-    B4CDCD LightCyan3
-    B4EEB4 DarkSeaGreen2
-    B5B5B5 gray71
-    B5B5B5 grey71
-    B8860B DarkGoldenrod
-    B8860B {dark goldenrod}
-    B8B8B8 gray72
-    B8B8B8 grey72
-    B9D3EE SlateGray2
-    BA55D3 MediumOrchid
-    BA55D3 {medium orchid}
-    BABABA gray73
-    BABABA grey73
-    BBFFFF PaleTurquoise1
-    BC8F8F RosyBrown
-    BC8F8F {rosy brown}
-    BCD2EE LightSteelBlue2
-    BCEE68 DarkOliveGreen2
-    BDB76B DarkKhaki
-    BDB76B {dark khaki}
-    BDBDBD gray74
-    BDBDBD grey74
-    BEBEBE gray
-    BEBEBE grey
-    BF3EFF DarkOrchid1
-    BFBFBF gray75
-    BFBFBF grey75
-    BFEFFF LightBlue1
-    C0FF3E OliveDrab1
-    C1CDC1 honeydew3
-    C1CDCD azure3
-    C1FFC1 DarkSeaGreen1
-    C2C2C2 gray76
-    C2C2C2 grey76
-    C4C4C4 gray77
-    C4C4C4 grey77
-    C6E2FF SlateGray1
-    C71585 MediumVioletRed
-    C71585 {medium violet red}
-    C7C7C7 gray78
-    C7C7C7 grey78
-    C9C9C9 gray79
-    C9C9C9 grey79
-    CAE1FF LightSteelBlue1
-    CAFF70 DarkOliveGreen1
-    CCCCCC gray80
-    CCCCCC grey80
-    CD0000 red3
-    CD00CD magenta3
-    CD1076 DeepPink3
-    CD2626 firebrick3
-    CD2990 maroon3
-    CD3278 VioletRed3
-    CD3333 brown3
-    CD3700 OrangeRed3
-    CD4F39 tomato3
-    CD5555 IndianRed3
-    CD5B45 coral3
-    CD5C5C IndianRed
-    CD5C5C {indian red}
-    CD6090 HotPink3
-    CD6600 DarkOrange3
-    CD661D chocolate3
-    CD6839 sienna3
-    CD6889 PaleVioletRed3
-    CD69C9 orchid3
-    CD7054 salmon3
-    CD8162 LightSalmon3
-    CD8500 orange3
-    CD853F peru
-    CD853F tan3
-    CD8C95 LightPink3
-    CD919E pink3
-    CD950C DarkGoldenrod3
-    CD96CD plum3
-    CD9B1D goldenrod3
-    CD9B9B RosyBrown3
-    CDAA7D burlywood3
-    CDAD00 gold3
-    CDAF95 PeachPuff3
-    CDB38B NavajoWhite3
-    CDB5CD thistle3
-    CDB79E bisque3
-    CDB7B5 MistyRose3
-    CDBA96 wheat3
-    CDBE70 LightGoldenrod3
-    CDC0B0 AntiqueWhite3
-    CDC1C5 LavenderBlush3
-    CDC5BF seashell3
-    CDC673 khaki3
-    CDC8B1 cornsilk3
-    CDC9A5 LemonChiffon3
-    CDC9C9 snow3
-    CDCD00 yellow3
-    CDCDB4 LightYellow3
-    CDCDC1 ivory3
-    CFCFCF gray81
-    CFCFCF grey81
-    D02090 VioletRed
-    D02090 {violet red}
-    D15FEE MediumOrchid2
-    D1D1D1 gray82
-    D1D1D1 grey82
-    D1EEEE LightCyan2
-    D2691E chocolate
-    D2B48C tan
-    D3D3D3 LightGray
-    D3D3D3 LightGrey
-    D3D3D3 {light gray}
-    D3D3D3 {light grey}
-    D4D4D4 gray83
-    D4D4D4 grey83
-    D6D6D6 gray84
-    D6D6D6 grey84
-    D8BFD8 thistle
-    D9D9D9 gray85
-    D9D9D9 grey85
-    DA70D6 orchid
-    DAA520 goldenrod
-    DB7093 PaleVioletRed
-    DB7093 {pale violet red}
-    DBDBDB gray86
-    DBDBDB grey86
-    DCDCDC gainsboro
-    DDA0DD plum
-    DEB887 burlywood
-    DEDEDE gray87
-    DEDEDE grey87
-    E066FF MediumOrchid1
-    E0E0E0 gray88
-    E0E0E0 grey88
-    E0EEE0 honeydew2
-    E0EEEE azure2
-    E0FFFF LightCyan
-    E0FFFF LightCyan1
-    E0FFFF {light cyan}
-    E3E3E3 gray89
-    E3E3E3 grey89
-    E5E5E5 gray90
-    E5E5E5 grey90
-    E6E6FA lavender
-    E8E8E8 gray91
-    E8E8E8 grey91
-    E9967A DarkSalmon
-    E9967A {dark salmon}
-    EBEBEB gray92
-    EBEBEB grey92
-    EDEDED gray93
-    EDEDED grey93
-    EE0000 red2
-    EE00EE magenta2
-    EE1289 DeepPink2
-    EE2C2C firebrick2
-    EE30A7 maroon2
-    EE3A8C VioletRed2
-    EE3B3B brown2
-    EE4000 OrangeRed2
-    EE5C42 tomato2
-    EE6363 IndianRed2
-    EE6A50 coral2
-    EE6AA7 HotPink2
-    EE7600 DarkOrange2
-    EE7621 chocolate2
-    EE7942 sienna2
-    EE799F PaleVioletRed2
-    EE7AE9 orchid2
-    EE8262 salmon2
-    EE82EE violet
-    EE9572 LightSalmon2
-    EE9A00 orange2
-    EE9A49 tan2
-    EEA2AD LightPink2
-    EEA9B8 pink2
-    EEAD0E DarkGoldenrod2
-    EEAEEE plum2
-    EEB422 goldenrod2
-    EEB4B4 RosyBrown2
-    EEC591 burlywood2
-    EEC900 gold2
-    EECBAD PeachPuff2
-    EECFA1 NavajoWhite2
-    EED2EE thistle2
-    EED5B7 bisque2
-    EED5D2 MistyRose2
-    EED8AE wheat2
-    EEDC82 LightGoldenrod2
-    EEDD82 LightGoldenrod
-    EEDD82 {light goldenrod}
-    EEDFCC AntiqueWhite2
-    EEE0E5 LavenderBlush2
-    EEE5DE seashell2
-    EEE685 khaki2
-    EEE8AA PaleGoldenrod
-    EEE8AA {pale goldenrod}
-    EEE8CD cornsilk2
-    EEE9BF LemonChiffon2
-    EEE9E9 snow2
-    EEEE00 yellow2
-    EEEED1 LightYellow2
-    EEEEE0 ivory2
-    F08080 LightCoral
-    F08080 {light coral}
-    F0E68C khaki
-    F0F0F0 gray94
-    F0F0F0 grey94
-    F0F8FF AliceBlue
-    F0F8FF {alice blue}
-    F0FFF0 honeydew
-    F0FFF0 honeydew1
-    F0FFFF azure
-    F0FFFF azure1
-    F2F2F2 gray95
-    F2F2F2 grey95
-    F4A460 SandyBrown
-    F4A460 {sandy brown}
-    F5DEB3 wheat
-    F5F5DC beige
-    F5F5F5 WhiteSmoke
-    F5F5F5 gray96
-    F5F5F5 grey96
-    F5F5F5 {white smoke}
-    F5FFFA MintCream
-    F5FFFA {mint cream}
-    F7F7F7 gray97
-    F7F7F7 grey97
-    F8F8FF GhostWhite
-    F8F8FF {ghost white}
-    FA8072 salmon
-    FAEBD7 AntiqueWhite
-    FAEBD7 {antique white}
-    FAF0E6 linen
-    FAFAD2 LightGoldenrodYellow
-    FAFAD2 {light goldenrod yellow}
-    FAFAFA gray98
-    FAFAFA grey98
-    FCFCFC gray99
-    FCFCFC grey99
-    FDF5E6 OldLace
-    FDF5E6 {old lace}
-    FF0000 red
-    FF0000 red1
-    FF00FF magenta
-    FF00FF magenta1
-    FF1493 DeepPink
-    FF1493 DeepPink1
-    FF1493 {deep pink}
-    FF3030 firebrick1
-    FF34B3 maroon1
-    FF3E96 VioletRed1
-    FF4040 brown1
-    FF4500 OrangeRed
-    FF4500 OrangeRed1
-    FF4500 {orange red}
-    FF6347 tomato
-    FF6347 tomato1
-    FF69B4 HotPink
-    FF69B4 {hot pink}
-    FF6A6A IndianRed1
-    FF6EB4 HotPink1
-    FF7256 coral1
-    FF7F00 DarkOrange1
-    FF7F24 chocolate1
-    FF7F50 coral
-    FF8247 sienna1
-    FF82AB PaleVioletRed1
-    FF83FA orchid1
-    FF8C00 DarkOrange
-    FF8C00 {dark orange}
-    FF8C69 salmon1
-    FFA07A LightSalmon
-    FFA07A LightSalmon1
-    FFA07A {light salmon}
-    FFA500 orange
-    FFA500 orange1
-    FFA54F tan1
-    FFAEB9 LightPink1
-    FFB5C5 pink1
-    FFB6C1 LightPink
-    FFB6C1 {light pink}
-    FFB90F DarkGoldenrod1
-    FFBBFF plum1
-    FFC0CB pink
-    FFC125 goldenrod1
-    FFC1C1 RosyBrown1
-    FFD39B burlywood1
-    FFD700 gold
-    FFD700 gold1
-    FFDAB9 PeachPuff
-    FFDAB9 PeachPuff1
-    FFDAB9 {peach puff}
-    FFDEAD NavajoWhite
-    FFDEAD NavajoWhite1
-    FFDEAD {navajo white}
-    FFE1FF thistle1
-    FFE4B5 moccasin
-    FFE4C4 bisque
-    FFE4C4 bisque1
-    FFE4E1 MistyRose
-    FFE4E1 MistyRose1
-    FFE4E1 {misty rose}
-    FFE7BA wheat1
-    FFEBCD BlanchedAlmond
-    FFEBCD {blanched almond}
-    FFEC8B LightGoldenrod1
-    FFEFD5 PapayaWhip
-    FFEFD5 {papaya whip}
-    FFEFDB AntiqueWhite1
-    FFF0F5 LavenderBlush
-    FFF0F5 LavenderBlush1
-    FFF0F5 {lavender blush}
-    FFF5EE seashell
-    FFF5EE seashell1
-    FFF68F khaki1
-    FFF8DC cornsilk
-    FFF8DC cornsilk1
-    FFFACD LemonChiffon
-    FFFACD LemonChiffon1
-    FFFACD {lemon chiffon}
-    FFFAF0 FloralWhite
-    FFFAF0 {floral white}
-    FFFAFA snow
-    FFFAFA snow1
-    FFFF00 yellow
-    FFFF00 yellow1
-    FFFFE0 LightYellow
-    FFFFE0 LightYellow1
-    FFFFE0 {light yellow}
-    FFFFF0 ivory
-    FFFFF0 ivory1
-    FFFFFF gray100
-    FFFFFF grey100
-    FFFFFF white
-}
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set bg [blt::bgpattern create gradient -low  grey100 -high grey90 \
-	-dir y -jitter yes -log yes -relativeto toplevel]
-set bg white
-set myIcon ""
-blt::comboentry .e \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -textbackground $bg \
-    -menu .e.m \
-    -menuanchor ne \
-    -exportselection yes 
-
-
-blt::combomenu .e.m  \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -height { 0 400 } \
-    -width  { 0 400 } \
-    -background $bg \
-    -yscrollbar .e.m.ybar \
-    -xscrollbar .e.m.xbar
-
-blt::tk::scrollbar .e.m.xbar 
-blt::tk::scrollbar .e.m.ybar 
-
-set bg [image create picture -width 30 -height 20]
-$bg blank 0x0000000
-$bg draw rectangle 5 5 14 26 -color 0xFF00000
-$bg blur $bg 4
-
-foreach {rgb name} $colors {
-    set icon [image create picture -width 27 -height 27]
-    $icon blank 0x00000000
-    $icon draw circle 12 12 11 -fill \#$rgb \
-    	-shadow 2 -antialiased 1 -linewidth 1
-    .e.m add -text $name -icon $icon
-}
-
-button .quit -text "Exit" -command exit
-blt::table . \
-    0,0 .e -fill both -padx 2 -pady 2  \
-    1,0 .quit 
diff --git a/blt3.0/demos/container.tcl b/blt3.0/demos/container.tcl
deleted file mode 100755
index 835b655..0000000
--- a/blt3.0/demos/container.tcl
+++ /dev/null
@@ -1,19 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-namespace import blt::*
-
-#set cmd "xterm"
-set cmd "xclock"
-set cmd "xterm"
-blt::container .c -width 800 -height 400 
-eval bgexec myVar $cmd &
-pack .c -fill both -expand yes
-.c configure -relief raised -bd 2 
-button .b -text "Quit" -command exit
-pack .b
-update
-#.c configure -relief raised -bd 2 -name "Mozilla Firefox"
-#.c configure -relief raised -bd 2 -command $cmd
-
-
diff --git a/blt3.0/demos/container3.tcl b/blt3.0/demos/container3.tcl
deleted file mode 100755
index 5cb2845..0000000
--- a/blt3.0/demos/container3.tcl
+++ /dev/null
@@ -1,451 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-namespace import blt::*
-
-
-image create picture mini-apm-alert -data {
-    R0lGODdhEAAQAPIAALLA3AAAAAAAoMDAwKCgoICAgP8AAP///ywAAAAAEAAQAAADSgiq1bGQ
-    tTNKuBHMMmrwEdeMDfEAhqENROu2Z7q6xhurXJvWsCLnOpsPx3q5bjNjD0VULhdAJTJqnBZ0
-    qZbgBAkIvuBtRnEpYyIJADs=
-}
-
-image create picture mini-apm-empty -data {
-    R0lGODdhEAAQAPIAALLA3AAAAMDAwKCgoICAgP8AAP///wAAACwAAAAAEAAQAAADSQiq1LGQ
-    NSNIuBFMImrwUVE0ZCNGhDisq/hAnNoWw7twgyrbjDDTK57Gl5PVUD4dUBgDFo8w40woZZ1g
-    BJYWCglsgxnFZYyJJAAAOw==
-}
-
-image create picture mini-apm-full -data {
-    R0lGODdhEAAQAPIAALLA3AAAAAAAoMDAwICAgP8AAP///wAAACwAAAAAEAAQAAADQAiq1LGQ
-    NTNIuBFMMmrwEdeMjfBAnKCu6rmkasG6zBAXchva8byzPhQPaPoRi8Ij8jUE0jSEW265CByf
-    1YsWmwAAOw==
-}
-
-image create picture mini-apm-half -data {
-    R0lGODdhEAAQAPIAALLA3AAAAAAAoMDAwKCgoICAgP8AAP///ywAAAAAEAAQAAADRwiq1bGQ
-    tTNKuBHMMmrwEdeMDfFAHKGu6rmkqsG6zBAbchva8byzKwFNMxAYj8YhB4lUFpnJHTSKKhhx
-    huMQEJhuFZcwJpIAADs=
-}
-
-image create picture mini-apm-loading -data {
-    R0lGODdhEAAQAPMAALLA3AAAAP//AMDAwKCgoICAgP8AAICAAP///wAAAAAAAAAAAAAAAAAA
-    AAAAAAAAACwAAAAAEAAQAAAEXRBIWWo4oNyZKxqHcFzi5BUDKBYhRg1VFcqC9hJ4rFvZkH+p
-    ICzQwxk0gaSSWDQWENCUrfkTTlGCbA0oZWK1ggBw2gNnl5yd9smkPKGI2KcNgCoH8AEdkOQv
-    +xwAEQA7
-}
-
-image create picture mini-apm-online -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAAMDAwICAgP//AP///wAAACwAAAAAEAAQAAADRQi6QCHt
-    sSkKrHAuDLhWFUGEwSeeaMkQxuC+g6M5QW2rs6G7stm+vRwsqAn8iJ/bBLVg4RosneHUeups
-    A+ngCagtblxAAgA7
-}
-
-image create picture mini-apm-unknown -data {
-    R0lGODdhEAAQAPIAALLA3AAAAP//AMDAwICAgP8AAP///wAAACwAAAAAEAAQAAADRAiq1LGQ
-    NTNIuBFMMmrwEdeMjfBAnKCu6rmkQiGvLjPEa9GGt676Nc0tR+MRi6ghDvlSskzGHytYeu4i
-    ASs0A7h4MZEEADs=
-}
-
-image create picture mini-folder -data {
-    R0lGODdhIAAbAPIAALLA3ICAgP//////AMDAwAAAAICAAAAAACwAAAAAIAAbAAADeQgK0e4r
-    yhmDuBgHyqUdBCiGxNZxHzmO5lkRcCzPT10XTKbvPF8UqZVqKBQagAKisrg8BpdQpjPJrEan
-    1qxyGu0Wsd4wiKsth8BmLVnsRbOt6/QVKVcj3206Hn6vz59+Rn17TXqBW0AGiouMjY6Pijg/
-    k5SVlpeTAAkAOw==
-}
-
-image create picture mini-arch -data {
-    R0lGODdhEAAQAPEAAICAgAAAAMBkMv+gMiwAAAAAEAAQAAACQQSCqXoi46B7YtlVA51Q1sxN
-    EaQhmyKWmoMYzTCoZOUes/kF9SrHtKvxIW47mIr1M/AyxqQtF2wVYzpG7ZC4arcFADs=
-}
-
-image create picture mini-asmail -data {
-    R0lGODdhEAAQAPMAAJSUlP///97e3mNjYzz4NK2trfgUQL29vXNzc0JCQoCAgAAAAAAAAAAA
-    AAAAAAAAACwAAAAAEAAQAAAEVFDJOYGgmA5iMwaGIYwfAAzDqJLT6q4ScMyvOsSyW9i3MhwC
-    hGo3GhR6JuHLeEAoAgUTcGVEWA9Q089WOCQTWROgcBxYv2GxWoxIeK3weDzhqdvrEQA7
-}
-
-image create picture mini-audiovol -data {
-    R0lGODdhDgAOAPEAALLA3AAA7v///2ZmZiwAAAAADgAOAAACMYQdcxgLkdhQK8E0oIMz4+19
-    ztMNwohQ5zkmK8BK0Xtel0I/tgv3uq3y7SiGmARlKAAAOw==
-}
-
-image create picture mini-ball -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP///4CAgCwAAAAAEAAQAAACG4SPqcvtD1mYMAhBncVh6Dl5
-    Xyc6wxml6so+BQA7
-}
-
-image create picture mini-bball -data {
-    R0lGODdhEAAQAPEAALLA3AAA/////4CAgCwAAAAAEAAQAAACG4SPqcvtD1mYMAhBncVh6Dl5
-    Xyc6wxml6so+BQA7
-}
-
-image create picture mini-bomb -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgMDAwP//AP///wAAAAAAACwAAAAAEAAQAAADPAi63K4h
-    vhZWneDaGTV0nbQxgVAMHbkIQcF2wpgFw5sqBJCHHVHlhNwsJEDhggpbhBXTUXgeh62JqVon
-    CQA7
-}
-
-image create picture mini-book1 -data {
-    R0lGODdhEAAQAPIAALLA3AAAAP8AAP//AICAgP///wAAAAAAACwAAAAAEAAQAAADPAi63K4h
-    vBaFkLNai5neWwcEwwCeXVSeIBZcK8uNXNymtckFBeHlkUKPIHpdeMOI48UjEEWUwHPigVKv
-    CQA7
-}
-
-image create picture mini-book2 -data {
-    R0lGODdhEAAQAPEAAL+/vwAAAICAgP///ywAAAAAEAAQAAACOYSPeRHqIUZbLMEhAcNzRf5J
-    lXFxGNiVUgil7Lm6p9p6M1zbK5fbgYgRdDwMgdE4JLUYzKTSAY0CCgA7
-}
-
-image create picture mini-books -data {
-    R0lGODdhEAAQAPIAAICAgP////8AAAAA/wAAAP//AAAAAAAAACwAAAAAEAAQAAADSgi63B3B
-    wRdFGGoSBy5exaYIwjJgRQGECwlgJ0Bs7FjGqFoDLgGvOhGvJIgBV0KXwKdIIVtEX+6Zqcww
-    k11PQVMJZbPG7MspmzkJADs=
-}
-
-image create picture mini-briefcase -data {
-    R0lGODdhEAAQAPIAALLA3ICAAMDAwAAAAICAgP///wAAAAAAACwAAAAAEAAQAAADSQi63B4Q
-    OhaKuCJMFcT4g9ZEZFgClWANAuGpahBegTsUa1eHRY17v5lMRyrWCLwOZpnJzJo6aAZZiVqh
-    z6uVauzKAKCw+LMpJwAAOw==
-}
-
-image create picture mini-bug1 -data {
-    R0lGODdhEAAQAPIAALLA3AAAAMDAwICAgP///wAAAAAAAAAAACwAAAAAEAAQAAADNAi63P5Q
-    hTWjDDUKzEUcAcENEChiIOlgxCCA2MoF2yxjddwEMD1mjA4H4ituLDygZckEJAAAOw==
-}
-
-image create picture mini-bug2 -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgMDAwP///wAAAAAAAAAAACwAAAAAEAAQAAADOAi63A5h
-    xceCpUvYLajQW/A9FsFdjWZ+oFiV1hCiyiyHjT1XbXBbmtzmN+ENTw/QrYMBCAbMZjMBADs=
-}
-
-image create picture mini-bx2 -data {
-    R0lGODdhEAAQAPAAALLA3AAAACwAAAAAEAAQAAACIoSPqcuNAeEKL9Kn7AU7ae5EoAOKDfVN
-    R4pVptGtFknXdQEAOw==
-}
-
-image create picture mini-calc -data {
-    R0lGODdhEAAQAPIAALLA3ICAgP///wAAANnZ2QAAAAAAAAAAACwAAAAAEAAQAAADRAi63Bow
-    SgmCuDjjUQUhQyiKYPcN2hWU1jdJrPfN9NkFA4Hr+c5ZIVAuSLz1jrwYcciM7Z7In2AprP5q
-    WBtgxB05vo0EADs=
-}
-
-image create picture mini-camera -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP///4CAgCwAAAAAEAAQAAACNYSPqRDta4KYNCAnhxviyYo1
-    YBgMJplp5XSWqtByptrC9HyLc7O7bx/q2YA4DQNFgiiXTGYBADs=
-}
-
-image create picture mini-cat -data {
-    R0lGODdhEAAQAPEAAICAgAAAAP//AP8AACwAAAAAEAAQAAACOYSPecGqIUR4YNZoEdw36yh1
-    FTNBoGSa2Cah5xsN2AW/llqHHYjPdErydTiblCG1wvhIo2PJ44gWAAA7
-}
-
-image create picture mini-cave -data {
-    R0lGODdhEAAQAPMAAAD//wBy/QAA/AAAuAD/jwD/Cv+EAHL/AP//AA8Pbf8AAP9FAP/HAAAA
-    AAAAAAAAACwAAAAAEAAQAAAEWhBIGaq4I+c5a7iCNhBEYRzGCFjggCAJARCJ8hKskOwJIAAw
-    Cc5C4yVgiUEBODHydL9dgVRw8haJxeKAtO4WBgSDofAaGYcD1sxD49iJwAE9hbcRZXtPz7dH
-    AAA7
-}
-
-image create picture mini-cd -data {
-    R0lGODdhEAAQAPIAALLA3ICAgP//AMDAwAAAAAD//wD/AP///ywAAAAAEAAQAAADUQiq0b2Q
-    BSGGJSSCUGi1FxQYRfdZx5AxBkmBqcpYbYeCcgCSAaHjmR8tQ8DlcIceB7iBoQyCAmili9Gi
-    0tXGesVqm7gW5SvZGTCaRQNDTrsVCQA7
-}
-
-image create picture mini-cdlabel -data {
-    R0lGODdhEAAQAPEAALLA3AAAAICAgAAAACwAAAAAEAAQAAACM4SPecEg8SJcIFQpqVWpsfcx
-    21aVBmmlZTqpbinE66yeVUt7NC2/qAkciYYQEeeITCoTBQA7
-}
-
-image create picture mini-chinese -data {
-    R0lGODdhEAAQAPAAAICAgAAA/ywAAAAAEAAQAAACJoQdB6kXrx5ri0FapZ4R2baFEpVAHFkt
-    WCaunuuFcDq/NV1f91oAADs=
-}
-
-image create picture mini-clipboard -data {
-    R0lGODdhEAAQAPIAALLA3AAAAP//AICAAICAgMDAwAAAgP///ywAAAAAEAAQAAADUgi63B4w
-    OBWhEFXSQUbAX9ARmkgWaCp6BBBwWUSQ7TpyeCe6+WD8QMPOxjEcjsdfrWdEHowG141gjDyB
-    r1vTmSRSD7Gnq7LlRgGzWXB9bqTfswQAOw==
-}
-
-image create picture mini-clock -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP///8DAwCwAAAAAEAAQAAACMoSPqRDda5qY86UwaKAjXCps
-    GiJqYHiU1elFoPSmrNoybDjKZ55me6eAaWpBBxGCTCoKADs=
-}
-
-image create picture mini-colors -data {
-    R0lGODdhEAAQAPIAALLA3ICAgP8AAP//AAAA/wAAAP///wAAACwAAAAAEAAQAAADPgi63P4w
-    skCrtSqILYYfREgEBaBxHyiSJtd94lieWxqzgaEbVuEXuB2v8gPOhL1fcJf04S5QSglQrFYl
-    WGwCADs=
-}
-
-image create picture mini-connect -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgP8AAP//AAAAAAAAAAAAACwAAAAAEAAQAAADLwi63P7Q
-    hbgECJaKMfJ8GzdcWROKHXSKpYl2n7MKsUkIOK3edFAzAh6l0tIMj44EADs=
-}
-
-image create picture mini-crosbone -data {
-    R0lGODdhEAAQAPEAAICAgAAAAP///8DAwCwAAAAAEAAQAAACQUQCqXqMu5qRMJ0HxBV8jygM
-    4jhoUPAhKTBgVnvAqGtkIcrVJ1uKeoUi0Rwz2SnQmSE1j4PgJXowLRHKr4LNagEFADs=
-}
-
-image create picture mini-cross -data {
-    R0lGODdhEAAQAPEAALLA3P8AAICAgAAAACwAAAAAEAAQAAACKISPqcsbHgQKFEpAM8x0DMYF
-    X8ONYNhgovpApqasU5TItWngiZ72TAEAOw==
-}
-
-image create picture mini-desktop -data {
-    R0lGODdhEAAQAPIAAICAgACAgAAAAAD//8DAwP///4CAAP//ACwAAAAAEAAQAAADQgi6EMIQ
-    BveidEBUG8asWqSNobJZzIku6tq62UIARSEQhkHsRDXXNtwhd/PRgoaD8vB49EjPkekIrAJj
-    K0iTxCUpEgA7
-}
-
-image create picture mini-dfolder -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwP//AAAA/wAAAP///wAAACwAAAAAEAAQAAADSQi63BsQ
-    OhbEsCJMUK/PkcQZZGmSQTF+YTtiwWkWsRcTeB7TBmwQP52BZwvmCLuY74hLGopM5LAVo+4A
-    hax2u93ESJkNlqsFJAAAOw==
-}
-
-image create picture mini-diff -data {
-    R0lGODdhEAAQAPEAALLA3P8AAAAAAP///ywAAAAAEAAQAAACQYSPqcLtckSYQYyLIZDGVnxB
-    HDBYw5dtAbldaKhGrhkyVTODTBnU07PjUSiaTsZBlIEyydbS93M+RVGgo1NUaA0FADs=
-}
-
-image create picture mini-diskette -data {
-    R0lGODdhEAAQAPIAAAAAgAAAAICAgP//AODg4P///8DAwAAAACwAAAAAEAAQAAADQAgQ3B5K
-    qEGrHQoCwrsnmVKMZFmE2/ehZouq6yK2JarcOK4pRu8bOhwQ8AvehsXbjsjzGXnNnk4STWYE
-    goe2kQAAOw==
-}
-
-image create picture mini-display -data {
-    R0lGODdhEAAQAPIAALLA3ICAgP///wAAAAAA/8DAwAAAAAAAACwAAAAAEAAQAAADPgi63Bsw
-    SviEvdgOFcT4INhtwEic6DlyHiGkqscOMLqWbU3cps7ntd9gIpHhMkgSIMQEOTqXQkC5aDYd
-    2EYCADs=
-}
-
-image create picture mini-doc -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwAAAAP///wAAAAAAAAAAACwAAAAAEAAQAAADNAix3PAw
-    kEmnCPDJSgXBEUcN5BCKnamh6ckKqsJa8fbWMwG76L7OPhkQN4wIjshksMRsqhIAOw==
-}
-
-image create picture mini-doc1 -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP///4CAgCwAAAAAEAAQAAACOYSPicEdeoKYk0EghxbyKUlx
-    zSdomxYMCRhW6lKaW7q2FA3L8xvZbq0bcHgGVgsXcSiJhqDsAgUUAAA7
-}
-
-image create picture mini-dog -data {
-    R0lGODdhEAAQAPEAAICAgAAAAP///8DAwCwAAAAAEAAQAAACPoSPqRbt6oKYgiEpxqA1XKkJ
-    zeRdGTZg4pVybgk0sTvFMENydhJsI3WbTVIRnoiSWqhsMmOIEzRwntGFFVAAADs=
-}
-
-image create picture mini-edit -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgP///wAA/wAAAAAAAAAAACwAAAAAEAAQAAADPwi63CAw
-    RveGvUMEJ7LMw7YQHWZpgUiQXoRta1CaVxBX0ndXtLXjOQ1BpJi9UkRgBBliGEMvZ6/GQFqv
-    lGwjAQA7
-}
-
-image create picture mini-espada -data {
-    R0lGODdhEAAQAPAAAICAgAAAACwAAAAAEAAQAAACIoSPqRbr7RSMJ1jK7I26v+4l4CiOYWVq
-    0tWo1IQBMHfGSwEAOw==
-}
-
-image create picture mini-exclam -data {
-    R0lGODdhEAAQAPIAALLA3ICAgACAAP///wAAAAAAAAAAAAAAACwAAAAAEAAQAAADLQi6GsKQ
-    hSFEiJJWglf9XOeAV/dtnXKGKZh6AvvGLyOnU1UDZznHPhwhuEslAAA7
-}
-
-image create picture mini-exp -data {
-    R0lGODdhEAAQAPEAALLA3AAAAICAgP//ACwAAAAAEAAQAAACMoSPqRbrzYQDYbQAD97VWtUN
-    4shJzIiSSZhmDKuuaayJmN1lHGVT2GHSuAJB0OSInBQAADs=
-}
-
-image create picture mini-eye -data {
-    R0lGODdhEAAQAPEAALLA3AAAAIKCgsPDwywAAAAAEAAQAAACK4SPqcvtb4KcYs1wKJIADzF0
-    HTZGgBBU5JiaX0hWh6Bmp5yoHA71/g+EFAAAOw==
-}
-
-image create picture mini-eyes -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgMDAwP///wAAAAAAAAAAACwAAAAAEAAQAAADPwi63P4w
-    tkDDqvYOQoYNW5eBHOeF5leWwcoFQuvKK9xSLIG/sSefO48AQBL1UoIhsZJcUpqLJBQgVUqu
-    2KwiAQA7
-}
-
-image create picture mini-fax -data {
-    R0lGODdhEAAQAPIAALLA3ICAgAAAAMDAwP///wAAAAAAAAAAACwAAAAAEAAQAAADSAi6HM5w
-    BUIfdI5qIuQk39Yp0zBkokScpTlwJ1DOQuAKZkYHtXvWu17OAaSYhBii0DhMdnC5VZI3Agig
-    LGXEitNuF9fqd7xIAAA7
-}
-
-image create picture mini-fdisk -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwAAAAP8AAP///wAAAAAAACwAAAAAEAAQAAADMgi63P4w
-    yhmqvVYFwbvnwRAUZGmSlfh9hJBu3eW9bjrcVq125hxiQMtAcSsajZOkcpkAADs=
-}
-
-image create picture mini-filemgr -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwAAAAP///wAAAAAAAAAAACwAAAAAEAAQAAADPggK0f5L
-    BUGraCO+jTX5IDF0S0BY1Bhk5TkMlcpKJyp7qHCXb9+TtNBnR8sRGS5YCog0riJN24zn60Gv
-    2EUCADs=
-}
-
-image create picture mini-folder -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwP//AAAAAP///wAAAAAAACwAAAAAEAAQAAADOwi63BsQ
-    OhbEsCJMUK/PkcQVZGmSATF+rJWOWHu9QSHHdBHvs1rfnhxvlwO6fKFkSAUgOJ9Q6GZKdSQA
-    ADs=
-}
-
-image create picture mini-font -data {
-    R0lGODdhEAAQAPEAALLA3AAAAICAgAAAACwAAAAAEAAQAAACJ4SPqcvtF8IzMYhXrYuCN95p
-    Cwh4Y2YmoBBequWWIpLKMcIm+cQ3BQA7
-}
-
-image create picture mini-fractal -data {
-    R0lGODdhEAAQAPIAALLA3AAAAICAgP8AAP//AMDAwACAAAAA/ywAAAAAEAAQAAADSQi63BpB
-    MAHjqvCNQXh4T7V15Fd8gZF24iZpxqBe3hXPALp9j4HzgcMAuBnmLofDK7AL5ZJE1iMJvZQu
-    kFeOZHTQrt4HlxcuexMAOw==
-}
-
-image create picture mini-frame -data {
-    R0lGODdhEAAQAPEAALLA3P8AAAAAAAAAACwAAAAAEAAQAAACM4SPqcGsGISU4YF43V3izrpx
-    IdMlWFRhZqeeD+rFJniWEHu4ptGwNmSQyF4NlQUw+R2PBQA7
-}
-
-image create picture mini-ftp -data {
-    R0lGODdhEAAQAPEAAICAgP///wAAAAAA/ywAAAAAEAAQAAACNoSPqcEdelwDDwh7w9hN+ItI
-    EhhtphmQhuiolMa1l/eyaQKf3ZzZd3gatHA+l+93+CiVkCagAAA7
-}
-
-image create picture mini-gball -data {
-    R0lGODdhEAAQAPEAALLA3ACAAP///4CAgCwAAAAAEAAQAAACG4SPqcvtD1mYMAhBncVh6Dl5
-    Xyc6wxml6so+BQA7
-}
-
-image create picture mini-go -data {
-    R0lGODdhEAAQAPEAAICAgAAA//8AAP///ywAAAAAEAAQAAACMoSPecEpj8IYzYgJjaTh3JEB
-    zOg9oViVgsK27gtbJ9p52KpN6Rduu4mjpQCmBCmGdBUAADs=
-}
-
-image create picture mini-gopher -data {
-    R0lGODdhEAAQAPIAAICAgICAAIAAAP///wAAAAAAAAAAAAAAACwAAAAAEAAQAAADSQgKESLN
-    LRXAg+41SzO+zbM4Q0mawuQQxECy0ijAGZzKmheOHst+qcvFRwAKQT8joIhkhggK5oywoq4m
-    LFSJNZloB92weExWJAAAOw==
-}
-
-image create picture mini-graph -data {
-    R0lGODdhEAAQAPIAAICAgAAAAP8A/wAA/wD/AP8AAAAAAAAAACwAAAAAEAAQAAADOwi6G86Q
-    CRGindUCV7EGw9BRXzhmlgl4DAeKK8kQRKWyC23Dnqu/J0ChUPndSMNiDRirJDnQKPRDrSoS
-    ADs=
-}
-
-image create picture mini-gv -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP///wAAACwAAAAAEAAQAAACMYSPqcGhGYQU7oE4ZV1ZP0Zp
-    FINgYYhtZjdtF9tyrHussdzRL0yV7e+pNS4kkuUIKAAAOw==
-}
-
-image create picture mini-hammer -data {
-    R0lGODdhEAAQAPEAAL+/vwAAAP///4CAgCwAAAAAEAAQAAACK4SPiRHAr5wQYdqWqt00i6FN
-    TLc0TzA4WAQZq9JG5SurtBzXtn7ktc8L6goAOw==
-}
-
-image create picture mini-happy -data {
-    R0lGODdhEAAQAPEAALLA3AAAAP//AAAAACwAAAAAEAAQAAACM4SPqRDda5qY86VAc70VSxEg
-    WAeO4GFK3xlpbti6GcxU2kjXpbOJFN8TmToQhiNXTCoPBQA7
-}
-
-image create picture mini-hdisk -data {
-    R0lGODdhEAAQAPIAALLA3ICAgMDAwAAAAACAAP///wAAAAAAACwAAAAAEAAQAAADLgi63P4w
-    yhmqvVYFwbvnwRAUZGmSlfh9hJBu6/e62EWr53nXfKgMwKAwOCkajwkAOw==
-}
-
-image create picture mini-heart -data {
-    R0lGODdhEAAQAPAAAICAgAAAACwAAAAAEAAQAAACIoSPqbvh54KKj0pogb16b+RRSRhNIeMx
-    RqauTwvBoBzTbQEAOw==
-}
-
-image create picture mini-hex -data {
-    R0lGODdhEAAQAPEAAICAgP///wAAAAAA/ywAAAAAEAAQAAACO4SPecHdIBIbjQYQ4qLcQqFh
-    3FRlS2ChZei0DauSJDtYY20a8qjC6Z/DuFq+0myjulFoydjyAIpKpYACADs=
-}
-
-image create picture mini-hextris -data {
-    R0lGODdhEAAQAPIAALLA3ICAgP//AAAAAP8AAAAAAAAAAAAAACwAAAAAEAAQAAADNAi63P5Q
-    hRlXEHjUSzrR0eANQQUMaLlhAvlM3EhZrNgNtSR4H7qPCttHJXQFUwyU0cRsMhMAOw==
-}
-
-image create picture mini-iconify -data {
-    R0lGODdhEAAOAPEAALLA3P8AAAAAAAAAACwAAAAAEAAOAAACKoyPKSHt7xgDtFoqxd0g8+tV
-    iIYtJHacIWqopgWJ7ydPdGnfUsKn0A8pAAA7
-}
-
-image create picture mini-icons -data {
-    R0lGODdhEAAQAPIAAICAgP///wAAAAAA/wD/AP8AAP//AAAAACwAAAAAEAAQAAADPAi63BoQ
-    ihfDBGFo+4jnmDaAgUeQImmS1VWBQiwr8uzceL68bvsUQJJhSAIWhESXEWlgRXpPWu0yvega
-    CQA7
-}
-
-image create picture mini-keyboard -data {
-    R0lGODdhEQAQAPEAAICAgP///wAAAMDAwCwAAAAAEQAQAAACPYSPecHtDgQIqsY5hwiab31R
-    QzQKZRlqwsq2kuTFHQPC2nkPqO32LxZrdGoYnI50gUV8rYul8mL2ntRqogAAOw==
-}
-
-set images1 { 
-    apm-alert apm-empty apm-full apm-half apm-loading apm-online 
-    apm-unknown folder arch asmail audiovol ball bball 
-}
-set images2 {
-    bomb book1 book2 books briefcase bug1 bug2 bx2 calc camera cat 
-    cave cd cdlabel chinese clipboard clock colors connect crosbone 
-}
-set images3 {
-    cross desktop dfolder diff diskette display doc doc1 dog edit 
-    espada exclam exp eye eyes fax fdisk filemgr font fractal 
-}
-set images4 {
-    frame ftp gball go gopher graph gv hammer happy hdisk heart hex 
-    hextris iconify icons keyboard 
-}
-
-proc MakeContainer { count images } {
-    set c .c$count
-    set top .top$count
-    set b .b$count
-
-    blt::container $c -bd 0 -highlightthickness 0
-    toplevel $top 
-    wm withdraw $top
-
-    wm protocol $top WM_DELETE_WINDOW "$b invoke"
-
-    frame $top.f -relief raised -highlightthickness 0
-    pack $top.f -expand yes -fill x 
-
-    foreach img $images {
-	button $top.f.$img -image mini-$img -bd 1 -command "puts $img" \
-	    -highlightthickness 0
-	pack $top.f.$img -side left -padx 0 -pady 0
-    } 
-    global $img
-    checkbutton $b -variable $img -onvalue $top -offvalue "" -command \
-	[subst -nocommands { $c configure -window \$$img }]
-    $b select 
-    blt::table . \
-	$b $count,0 -anchor w \
-	$c $count,1 -fill x 
-    blt::table configure . c0 -resize none
-    blt::table configure . r$count -resize none
-    after 1 [subst {
-	update 
-	wm deiconify $top
-	$c configure -window $top
-    }]
-    return $c
-}
-
-MakeContainer 1 $images1
-MakeContainer 2 $images2
-MakeContainer 3 $images3
-MakeContainer 4 $images4
-
-canvas .a 
-blt::table . .a -cspan 40
-
diff --git a/blt3.0/demos/ctree1.tcl b/blt3.0/demos/ctree1.tcl
deleted file mode 100644
index 81eaa16..0000000
--- a/blt3.0/demos/ctree1.tcl
+++ /dev/null
@@ -1,55 +0,0 @@
-
-proc find { tree parent dir } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [glob -nocomplain *] {
-	set name [file tail $f]
-	if { [file type $f] == "directory" } {
-	    set node [$tree insert $parent -label $name]
-	    find $tree $node $f
-	}
-    }
-    cd $saved
-}
-
-set tree [blt::tree create]
-set path ../..
-find $tree root $path
-$tree label root [file normalize $path]
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-puts [$tree label 0]
-#    -postcommand {.e.m configure -width [winfo width .e] ; update} \
-set myIcon ""
-blt::comboentry .e \
-    -font { arial 9 } \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -textwidth 20 \
-    -menu .e.m \
-    -menuanchor se \
-    -exportselection yes \
-    -command "puts {button pressed}"
-
-blt::combotree .e.m \
-    -tree $tree \
-    -borderwidth 1 \
-    -font { arial 10 } \
-    -textvariable myText1 \
-    -iconvariable myIcon1 \
-    -separator / \
-    -height -200 \
-    -linecolor grey50 \
-    -yscrollbar .e.m.ybar \
-    -xscrollbar .e.m.xbar
-
-blt::tk::scrollbar .e.m.xbar
-blt::tk::scrollbar .e.m.ybar
-
-focus .e.m
-
-blt::table . \
-    .e -fill x 
diff --git a/blt3.0/demos/ctree2.tcl b/blt3.0/demos/ctree2.tcl
deleted file mode 100644
index 66e1d96..0000000
--- a/blt3.0/demos/ctree2.tcl
+++ /dev/null
@@ -1,47 +0,0 @@
-
-proc find { tree parent dir } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [glob -nocomplain *] {
-	set name [file tail $f]
-	if { [file type $f] == "directory" } {
-	    set node [$tree insert $parent -label $name]
-	    find $tree $node $f
-	}
-    }
-    cd $saved
-}
-
-set tree [blt::tree create]
-set path ../..
-find $tree root $path
-$tree label root [file normalize $path]
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-puts [$tree label 0]
-#    -postcommand {.e.m configure -width [winfo width .e] ; update} \
-set myIcon ""
-blt::combobutton .b \
-    -text "Select Directory" \
-    -command "puts {button pressed}" \
-    -font { arial 10 bold } \
-    -menu .b.m 
-
-blt::combotree .b.m \
-    -tree $tree \
-    -borderwidth 1 \
-    -font { arial 10 } \
-    -separator / \
-    -yscrollbar .b.m.ybar \
-    -xscrollbar .b.m.xbar
-
-blt::tk::scrollbar .b.m.xbar
-blt::tk::scrollbar .b.m.ybar
-
-focus .b
-
-blt::table . \
-    .b -fill x 
\ No newline at end of file
diff --git a/blt3.0/demos/dnd1.tcl b/blt3.0/demos/dnd1.tcl
deleted file mode 100755
index 3b6b20e..0000000
--- a/blt3.0/demos/dnd1.tcl
+++ /dev/null
@@ -1,198 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-source scripts/demo.tcl
-
-if { ([info exists tcl_platform]) && ($tcl_platform(platform) == "windows") } {
-    source scripts/send.tcl
-    SendInit
-    SendVerify
-}
-
-proc OnEnter { widget args } {
-    array set info $args
-    $widget configure -highlightbackground red
-    return 1
-}
-
-proc OnMotion { widget args } {
-    array set info $args
-    set x1 [$widget cget -bd]
-    set x1 20
-    set y1 $x1
-    set x2 [expr [winfo width $widget] - $x1]
-    set y2 [expr [winfo height $widget] - $y1]
-    if { ($info(x) >= $x1) && ($info(x) <= $x2) && 
-	 ($info(y) >= $y1) && ($info(y) <= $y2) } {
-	$widget configure -highlightbackground red
-	return 1
-    }
-    $widget configure -highlightbackground grey
-    return 0
-}
-
-proc OnLeave { widget args } {
-    $widget configure -highlightbackground grey
-    return 0
-}
-
-option add *OnEnter	OnEnter
-option add *OnLeave	OnLeave
-option add *OnMotion	OnMotion
-	
-# ----------------------------------------------------------------------
-# This procedure is invoked each time a token is grabbed from the
-# sample window.  It configures the token to display the current
-# color, and returns the color value that is later passed to the
-# target handler.
-# ----------------------------------------------------------------------
-
-proc PackageSample { widget args } {
-    array set info $args
-    set bg [.sample cget -background]
-    set fg [.sample cget -foreground]
-    $info(token).label configure -background $bg -foreground $fg
-    return 1
-}
-
-proc ShowResult { widget args } {
-    array set info $args
-    puts "drop transaction($info(timestamp)) completed: result was $info(action)" 
-} 
-
-
-# ----------------------------------------------------------------------
-# Main application window...
-# ----------------------------------------------------------------------
-image create picture openFolder -data {
-R0lGODdhEAAOAPIAAP///wAAAH9/f9nZ2f//AAAAAAAAAAAAACwAAAAAEAAOAAADOwgqzPoQ
-iDjjAoPkIZuTgCZykBCA2ziaXusRrFUGQ5zeRMCcE76xvJBPozuBVCmT0eUKGAHOqFQqqwIS
-ADs=
-    }
-label .sample \
-    -text "Color" \
-    -height 12 \
-    -width 20 \
-    -bd 2 \
-    -relief raised  \
-    -highlightthickness 2 
-
-set cursors {
-    { @bitmaps/hand/hand01.xbm bitmaps/hand/hand01m.xbm  black white }
-    { @bitmaps/hand/hand02.xbm bitmaps/hand/hand02m.xbm  black white }
-    { @bitmaps/hand/hand03.xbm bitmaps/hand/hand03m.xbm  black white }
-    { @bitmaps/hand/hand04.xbm bitmaps/hand/hand04m.xbm  black white }
-    { @bitmaps/hand/hand05.xbm bitmaps/hand/hand05m.xbm  black white }
-    { @bitmaps/hand/hand06.xbm bitmaps/hand/hand06m.xbm  black white } 
-    { @bitmaps/hand/hand07.xbm bitmaps/hand/hand07m.xbm  black white }
-    { @bitmaps/hand/hand08.xbm bitmaps/hand/hand08m.xbm  black white }
-    { @bitmaps/hand/hand09.xbm bitmaps/hand/hand09m.xbm  black white }
-    { @bitmaps/hand/hand10.xbm bitmaps/hand/hand10m.xbm  black white }
-    { @bitmaps/hand/hand11.xbm bitmaps/hand/hand11m.xbm  black white }
-    { @bitmaps/hand/hand12.xbm bitmaps/hand/hand12m.xbm  black white }
-    { @bitmaps/hand/hand13.xbm bitmaps/hand/hand13m.xbm  black white }
-    { @bitmaps/hand/hand14.xbm bitmaps/hand/hand14m.xbm  black white }
-}
-
-
-# Set up the color sample as a drag&drop source and target for "color" values:
-blt::dnd register .sample \
-    -source yes \
-    -target yes \
-    -package PackageSample \
-    -result ShowResult \
-    -cursors $cursors
-
-blt::dnd getdata .sample color GetColor
-blt::dnd setdata .sample color SetColor
-
-# Establish the appearance of the token window:
-set token [blt::dnd token window .sample]
-label $token.label -text "Color" -bd 2 -highlightthickness 1  
-pack $token.label
-blt::dnd token configure .sample \
-    -borderwidth 2 \
-    -relief raised \
-    -activerelief raised  \
-    -outline pink \
-    -fill red \
-    -anchor s
-
-if 1 {
-    scale .redScale -label "Red" -orient horizontal \
-	-from 0 -to 255 -command adjust_color
-   frame .red -width 20 -height 20 -borderwidth 3 -relief sunken
-    
-    scale .greenScale -label "Green" -orient horizontal \
-	-from 0 -to 255 -command adjust_color
-    frame .green -width 20 -height 20 -borderwidth 3 -relief sunken
-
-    scale .blueScale -label "Blue" -orient horizontal \
-	-from 0 -to 255 -command adjust_color
-    frame .blue -width 20 -height 20 -borderwidth 3 -relief sunken
-
-    # ----------------------------------------------------------------------
-    # This procedure loads a new color value into this editor.
-    # ----------------------------------------------------------------------
-    proc GetColor { widget args } {
-	return [$widget cget -bg]
-    }
-
-    proc SetColor { widget args } {
-	array set info $args 
-	set rgb [winfo rgb . $info(value)]
-	set r [lindex $rgb 0]
-	set g [lindex $rgb 1]
-	set b [lindex $rgb 2]
-	
-	.redScale set [expr round($r/65535.0 * 255)]
-	.greenScale set [expr round($g/65535.0 * 255)]
-	.blueScale set [expr round($b/65535.0 * 255)]
-    }
-
-    # ----------------------------------------------------------------------
-    # This procedure is invoked whenever an RGB slider changes to
-    # update the color samples in this display.
-    # ----------------------------------------------------------------------
-    proc adjust_color {args} {
-	set rval [.redScale get]
-	.red configure -background [format "#%.2x0000" $rval]
-	set gval [.greenScale get]
-	.green configure -background [format "#00%.2x00" $gval]
-	set bval [.blueScale get]
-	.blue configure -background [format "#0000%.2x" $bval]
-	
-	.sample configure -background \
-	    [format "#%.2x%.2x%.2x" $rval $gval $bval]
-	if {$rval+$gval+$bval < 1.5*255} {
-	    .sample configure -foreground white
-	} else {
-	    .sample configure -foreground black
-	}
-    }
-    blt::table . .redScale    1,0 -fill both
-    blt::table . .red	     1,1 -fill both
-    blt::table . .greenScale  2,0 -fill both
-    blt::table . .green	     2,1 -fill both
-    blt::table . .blueScale   3,0 -fill both
-    blt::table . .blue	     3,1 -fill both
-}
-blt::table . .sample      0,0 -columnspan 2 -fill both -pady {0 4}
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed [clock clicks]
-
-.redScale set [expr round([random 255.0])]
-.blueScale set [expr round([random 255.0])]
-.greenScale set [expr round([random 255.0])]
-bind .sample <KeyPress-Escape> { blt::dnd cancel .sample }
-focus .sample
-
-
diff --git a/blt3.0/demos/dnd2.tcl b/blt3.0/demos/dnd2.tcl
deleted file mode 100755
index c28cc3e..0000000
--- a/blt3.0/demos/dnd2.tcl
+++ /dev/null
@@ -1,305 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-if { ([info exists tcl_platform]) && ($tcl_platform(platform) == "windows") } {
-    error "This script works only under X11"
-}
-
-canvas .c -width 320 -height 320 -background white
-
-blt::table . .c -fill both 
-
-set lastCell ""
-set cellWidth 1
-set cellHeight 1
-proc RedrawWorld { canvas } {
-    global cells cellWidth cellHeight
-
-    $canvas delete all
-
-    set width [winfo width $canvas]
-    set height [winfo height $canvas]
-
-    set cellWidth [expr $width / 8]
-    set cellHeight [expr $height / 8]
-
-    for { set row 0 } { $row < 8 } { incr row } {
-	set y [expr $row * $cellHeight]
-	set h [expr $y + $cellHeight]
-	for { set column 0 } { $column < 8 } { incr column } {
-	    set x [expr $column * $cellWidth]
-	    set w [expr $x + $cellWidth]
-	    $canvas create rectangle $x $y $w $h -fill white -outline "" \
-		-tags "$row,$column"
-	}
-    }
-
-    for { set row 0 } { $row < 8 } { incr row } {
-	set y [expr $row * $cellHeight]
-	$canvas create line 0 $y $width $y 
-    }
-    
-    for { set column 0 } { $column < 8 } { incr column } {
-	set x [expr $column * $cellWidth]
-	$canvas create line $x 0 $x $height 
-    }
-    foreach name [array names cells] {
-	set rc [split $name ,]
-	set row [lindex $rc 0]
-	set column [lindex $rc 1]
-	set x [expr ($column * $cellWidth) + 5]
-	set y [expr ($row * $cellHeight) + 5]
-	set w [expr $cellWidth - 10]
-	set h [expr $cellHeight - 10]
-	set color [lindex $cells($name) 0]
-	set type [lindex $cells($name) 1]
-	set pi1_2 [expr 3.14159265358979323846/180.0]
-	set points {}
-	switch $type {
-	    hexagon { 
-		lappend points $x [expr $y + $h/2] [expr $x + $w * 1/3] \
-		    $y [expr $x + $w * 2/3] $y [expr $x + $w] [expr $y + $h/2] \
-		    [expr $x + $w * 2/3] [expr $y + $h] \
-		    [expr $x + $w * 1/3] [expr $y + $h] 
-	    }
-	    parallelogram   { 
-		lappend points $x [expr $y + $h * 2/3] \
-		    [expr $x + $w * 2/3] $y \
-		    [expr $x + $w] [expr $y + $h * 1/3] \
-		    [expr $x + $w * 1/3] [expr $y + $h]
-	    }
-	    triangle { 
-		lappend points \
-		    $x [expr $y + $h] \
-		    [expr $x + $w * 1/2] $y \
-		    [expr $x + $w] [expr $y + $h] 
-	    }
-	}
-	eval .c create polygon $points -fill $color -outline black 
-    }
-}
-
-bind .c <Configure> { RedrawWorld %W }
-
-# ----------------------------------------------------------------------
-#  USAGE:  random ?<max>? ?<min>?
-#
-#  Returns a random number in the range <min> to <max>.
-#  If <min> is not specified, the default is 0; if max is not
-#  specified, the default is 1.
-# ----------------------------------------------------------------------
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed [clock clicks]
-
-set itemTypes { parallelogram hexagon triangle }
-set itemTypes { hexagon triangle parallelogram }
-
-for { set i 0 } { $i < 20 } { incr i } {
-    while { 1 } {
-	set row [expr int([random 8])]
-	set column [expr int([random 8])]
-	set type [expr int([random 3])]
-	set type [lindex $itemTypes $type]
-	if { ![info exists cells($row,$column)] } {
-	    set r [expr int([random 256 128])]
-	    set g [expr int([random 256 128])]
-	    set b [expr int([random 256 128])]
-	    set cells($row,$column) [format "#%.2x%.2x%.2x %s" $r $g $b $type]
-	    break
-	}
-    }
-}
-
-proc ScreenToCell { widget x y }  {
-    global cellWidth cellHeight 
-    set column [expr $x / $cellWidth]
-    set row [expr $y / $cellHeight]
-    return $row,$column
-}
-
-
-set count 0
-foreach i [winfo interps] {
-    puts $i
-    if { [string match "dnd2.tcl*" $i] } {
-	incr count
-    }
-}
-
-if { $count == 1 }  {
-    toplevel .info
-    raise .info
-    text .info.text -width 65 -height 12 -font { Helvetica 10 } -bg white \
-	-tabs { 0.25i } 
-    .info.text insert end {
-	This is a more involved example of the new "dnd" command.  
-	Run this script again to get another window. You can then drag
-	and drop symbols between the windows by clicking with the left 
-	mouse button on a symbol.  
-
-	It demonstates how to 
-		o Drag-and-drop on specific areas (canvas items) of a widget.
-		o How to receive and handle Enter/Leave/Motion events in the target.
-		o How to send drag feedback to the source.
-		o Use a drag threshold. 
-    }
-    button .info.quit -text "Dismiss" -command { destroy .info }
-    blt::table .info \
-	0,0 .info.text -fill both \
-	1,0 .info.quit
-}
-
-
-# -----------------------------------------------------------------
-# 
-#  Setup finished.  Start of drag-and-drop code here.
-# 
-
-# Set up the entire canvas as a drag&drop source.
-
-blt::dnd register .c -source yes  -dragthreshold 5 -button 1
-
-# Register code to pick up the information about a canvas item
-
-blt::dnd getdata .c color GetColor
-
-proc GetColor { widget args } {
-    array set info $args
-    global itemInfo
-    set id $itemInfo($info(timestamp))
-    set color [$widget itemcget $id -fill]
-    set ncoords [llength [$widget coords $id]]
-    if { $ncoords == 6 } {
-	set type triangle
-    } elseif { $ncoords == 8 } {
-	set type parallelogram
-    } elseif { $ncoords ==  12 } {
-        set type hexagon
-    } else {
-	error "unknown type n=$ncoords"
-    }
-    return [list $color $type]
-}
-
-blt::dnd configure .c -package PackageSample 
-
-proc PackageSample { widget args } {
-    array set info $args
-    
-    # Check if we're over a canvas item
-    set items [$widget find overlapping $info(x) $info(y) $info(x) $info(y)]
-    set pickedItem ""
-    foreach i $items {
-	if { [$widget type $i] == "polygon" } {
-	    set pickedItem $i
-	    break
-	}
-    }
-    if { $pickedItem == "" } {
-	# Cancel the drag
-	puts "Cancel the drag x=$info(x) y=$info(y)"
-	return 0
-    }
-    set fill [$widget itemcget $pickedItem -fill]
-    set outline [$widget itemcget $pickedItem -outline]
-
-    set ncoords [llength [$widget coords $pickedItem]]
-    if { $ncoords == 6 } {
-	set type triangle
-    } elseif { $ncoords == 8 } {
-	set type parallelogram
-    } elseif { $ncoords ==  12 } {
-        set type hexagon
-    } else {
-	error "unknown type n=$ncoords"
-    }
-    set tag [ScreenToCell $widget $info(x) $info(y)]
-    $info(token).label configure -background $fill -foreground $outline \
-	-text $type 
-    update idletasks
-    update
-    global itemInfo
-    set itemInfo($info(timestamp)) $pickedItem 
-    return 1
-}
-
-# Configure a set of animated cursors.
-
-blt::dnd configure .c -cursors {
-    { @bitmaps/hand/hand01.xbm bitmaps/hand/hand01m.xbm  black white }
-    { @bitmaps/hand/hand02.xbm bitmaps/hand/hand02m.xbm  black white }
-    { @bitmaps/hand/hand03.xbm bitmaps/hand/hand03m.xbm  black white }
-    { @bitmaps/hand/hand04.xbm bitmaps/hand/hand04m.xbm  black white }
-    { @bitmaps/hand/hand05.xbm bitmaps/hand/hand05m.xbm  black white }
-    { @bitmaps/hand/hand06.xbm bitmaps/hand/hand06m.xbm  black white } 
-    { @bitmaps/hand/hand07.xbm bitmaps/hand/hand07m.xbm  black white }
-    { @bitmaps/hand/hand08.xbm bitmaps/hand/hand08m.xbm  black white }
-    { @bitmaps/hand/hand09.xbm bitmaps/hand/hand09m.xbm  black white }
-    { @bitmaps/hand/hand10.xbm bitmaps/hand/hand10m.xbm  black white }
-    { @bitmaps/hand/hand11.xbm bitmaps/hand/hand11m.xbm  black white }
-    { @bitmaps/hand/hand12.xbm bitmaps/hand/hand12m.xbm  black white }
-    { @bitmaps/hand/hand13.xbm bitmaps/hand/hand13m.xbm  black white }
-    { @bitmaps/hand/hand14.xbm bitmaps/hand/hand14m.xbm  black white }
-}
-
-# Create a widget to place in the drag-and-drop token
-
-set token [blt::dnd token window .c]
-
-label $token.label -bd 2 -highlightthickness 1  
-pack $token.label
-blt::dnd token configure .c \
-    -borderwidth 2 \
-    -relief raised -activerelief raised  \
-    -outline pink -fill red \
-    -anchor s
-
-
-blt::dnd configure .c -target yes
-
-blt::dnd setdata .c color { 
-    NewObject 
-}
-
-proc NewObject { widget args } {
-    array set info $args
-    set tag [ScreenToCell $widget $info(x) $info(y)]
-    global cells
-    if { [info exists cells($tag)] } {
-	error "Cell already exists"
-    }
-    set cells($tag) $info(value)
-    RedrawWorld $widget
-
-}
-
-blt::dnd configure .c -onmotion OnMotion -onenter OnMotion -onleave OnMotion 
-
-proc OnMotion { widget args } {
-    global cells lastCell
-
-    array set info $args
-    set tag [ScreenToCell $widget $info(x) $info(y)]
-    if { $lastCell != "" } {
-	$widget itemconfigure $lastCell -fill white -outline "" -width 1 \
-	    -stipple ""
-    }
-    # Check that we're not over a canvas item
-    if { ![info exists cells($tag)] } {
-	$widget itemconfigure $tag -outline lightblue -fill lightblue \
-	    -width 2 -stipple BLT
-	set lastCell $tag
-	return 1
-    }
-    return 0
-}
-
diff --git a/blt3.0/demos/dragdrop1.tcl b/blt3.0/demos/dragdrop1.tcl
deleted file mode 100755
index 36ea14b..0000000
--- a/blt3.0/demos/dragdrop1.tcl
+++ /dev/null
@@ -1,131 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-source scripts/demo.tcl
-
-if { ([info exists tcl_platform]) && ($tcl_platform(platform) == "windows") } {
-    source scripts/send.tcl
-    SendInit
-    SendVerify
-}
-
-# ----------------------------------------------------------------------
-# This procedure is invoked each time a token is grabbed from the
-# sample window.  It configures the token to display the current
-# color, and returns the color value that is later passed to the
-# target handler.
-# ----------------------------------------------------------------------
-proc package_color {token} {
-    set bg [.sample cget -background]
-    set fg [.sample cget -foreground]
-
-    $token.label configure -background $bg -foreground $fg
-    return $bg
-}
-
-# ----------------------------------------------------------------------
-# Main application window...
-# ----------------------------------------------------------------------
-label .sample -text "Color" -height 2  -bd 10 -relief sunken
-
-#
-# Set up the color sample as a drag&drop source for "color" values:
-#
-drag&drop source .sample \
-    -packagecmd {package_color %t}  \
-    -sitecmd { puts "%s %t" } 
-
-drag&drop source .sample handler color
-
-#
-# Set up the color sample as a drag&drop target for "color" values:
-#
-drag&drop target .sample handler color {set_color %v}
-
-#
-# Establish the appearance of the token window:
-#
-set token [drag&drop token .sample]
-label $token.label -text "Color"
-pack $token.label
-
-scale .redScale -label "Red" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .redSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-scale .greenScale -label "Green" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .greenSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-scale .blueScale -label "Blue" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .blueSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-# ----------------------------------------------------------------------
-# This procedure loads a new color value into this editor.
-# ----------------------------------------------------------------------
-proc set_color {cval} {
-    set rgb [winfo rgb . $cval]
-
-    set rval [expr round([lindex $rgb 0]/65535.0*255)]
-    .redScale set $rval
-
-    set gval [expr round([lindex $rgb 1]/65535.0*255)]
-    .greenScale set $gval
-
-    set bval [expr round([lindex $rgb 2]/65535.0*255)]
-    .blueScale set $bval
-}
-
-# ----------------------------------------------------------------------
-# This procedure is invoked whenever an RGB slider changes to
-# update the color samples in this display.
-# ----------------------------------------------------------------------
-proc adjust_color {args} {
-    set rval [.redScale get]
-    .redSample configure -background [format "#%.2x0000" $rval]
-    set gval [.greenScale get]
-    .greenSample configure -background [format "#00%.2x00" $gval]
-    set bval [.blueScale get]
-    .blueSample configure -background [format "#0000%.2x" $bval]
-
-    .sample configure -background \
-        [format "#%.2x%.2x%.2x" $rval $gval $bval]
-    if {$rval+$gval+$bval < 1.5*255} {
-        .sample configure -foreground white
-    } else {
-        .sample configure -foreground black
-    }
-}
-
-blt::table . .sample      0,0 -columnspan 2 -fill both -pady {0 4}
-blt::table . .redScale    1,0 -fill both
-blt::table . .redSample   1,1 -fill both
-blt::table . .greenScale  2,0 -fill both
-blt::table . .greenSample 2,1 -fill both
-blt::table . .blueScale   3,0 -fill both
-blt::table . .blueSample  3,1 -fill both
diff --git a/blt3.0/demos/dragdrop2.tcl b/blt3.0/demos/dragdrop2.tcl
deleted file mode 100755
index c56fb07..0000000
--- a/blt3.0/demos/dragdrop2.tcl
+++ /dev/null
@@ -1,163 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tk::*
-}
-source scripts/demo.tcl
-
-if { ([info exists tcl_platform]) && ($tcl_platform(platform) == "windows") } {
-    source scripts/send.tcl
-    SendInit
-    SendVerify
-}
-
-# ----------------------------------------------------------------------
-# This procedure is invoked each time a token is grabbed from the
-# sample window.  It configures the token to display the current
-# color, and returns the color value that is later passed to the
-# target handler.
-# ----------------------------------------------------------------------
-
-proc package_color {token} {
-    set bg [.sample cget -background]
-    set fg [.sample cget -foreground]
-
-    $token.label configure -text "Color" -background $bg -foreground $fg
-    return $bg
-}
-
-# ----------------------------------------------------------------------
-# This procedure is invoked each time a token is grabbed from an
-# entry widget.  It configures the token to display the current
-# string, and returns the string that is later passed to the target
-# handler.
-# ----------------------------------------------------------------------
-proc package_string {str token} {
-    if {[string length $str] > 20} {
-        set mesg "[string range $str 0 19]..."
-    } else {
-        set mesg $str
-    }
-    $token.label configure -text $mesg
-    return $str
-}
-
-# ----------------------------------------------------------------------
-# Main application window...
-# ----------------------------------------------------------------------
-label .sample -text "Color" -height 2 -borderwidth 3 -relief sunken
-
-#
-# Set up the color sample as a drag&drop source for "color" values
-# and "string" values
-#
-drag&drop source .sample -packagecmd {package_color %t} 
-drag&drop source .sample handler color
-drag&drop source .sample handler string 
-
-#
-# Set up the color sample as a drag&drop target for "color" values:
-#
-drag&drop target .sample handler color {set_color %v}
-
-#
-# Establish the appearance of the token window:
-#
-set token [drag&drop token .sample -activebackground yellow ]
-label $token.label -text "Color"
-pack $token.label
-
-scale .redScale -label "Red" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .redSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-scale .greenScale -label "Green" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .greenSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-scale .blueScale -label "Blue" -orient horizontal \
-    -from 0 -to 255 -command adjust_color
-frame .blueSample -width 20 -height 20 -borderwidth 3 -relief sunken
-
-frame .color
-label .color.label -text "Color:"
-pack .color.label -side left
-entry .color.value -width 10
-pack .color.value -side left -expand yes -fill both
-
-bind .color.value <KeyPress-Return> {set_color [%W get]}
-
-#
-# Set up the entry widget as a drag&drop source for "string" values:
-#
-drag&drop source .color.value \
-	-packagecmd {package_string [%W get] %t} \
-	-selftarget yes
-drag&drop source .color.value handler string 
-
-#
-# Set up the entry widget as a drag&drop target for "string" values:
-#
-drag&drop target .color.value handler string {
-    %W delete 0 end
-    %W insert 0 "%v"
-}
-
-#
-# Establish the appearance of the token window:
-#
-set token [drag&drop token .color.value]
-label $token.label
-pack $token.label
-
-# ----------------------------------------------------------------------
-# This procedure loads a new color value into this editor.
-# ----------------------------------------------------------------------
-proc set_color {cval} {
-    set rgb [winfo rgb . $cval]
-
-    set rval [expr round([lindex $rgb 0]/65535.0*255)]
-    .redScale set $rval
-
-    set gval [expr round([lindex $rgb 1]/65535.0*255)]
-    .greenScale set $gval
-
-    set bval [expr round([lindex $rgb 2]/65535.0*255)]
-    .blueScale set $bval
-}
-
-# ----------------------------------------------------------------------
-# This procedure is invoked whenever an RGB slider changes to
-# update the color samples in this display.
-# ----------------------------------------------------------------------
-proc adjust_color {args} {
-    set rval [.redScale get]
-    .redSample configure -background [format "#%.2x0000" $rval]
-    set gval [.greenScale get]
-    .greenSample configure -background [format "#00%.2x00" $gval]
-    set bval [.blueScale get]
-    .blueSample configure -background [format "#0000%.2x" $bval]
-
-    .sample configure -background \
-        [format "#%.2x%.2x%.2x" $rval $gval $bval]
-    if {$rval+$gval+$bval < 1.5*255} {
-        .sample configure -foreground white
-    } else {
-        .sample configure -foreground black
-    }
-}
-
-blt::table . \
-    0,0 .sample -columnspan 2 -pady {0 4} \
-    1,0 .color  -columnspan 2 -padx 4 -pady 4 \
-    2,0 .redScale \
-    2,1 .redSample \
-    3,0 .greenScale \
-    3,1 .greenSample \
-    4,0 .blueScale \
-    4,1 .blueSample 
-
-eval blt::table configure . [winfo children .] -fill both
diff --git a/blt3.0/demos/drawerset1.tcl b/blt3.0/demos/drawerset1.tcl
deleted file mode 100644
index 3cdd13f..0000000
--- a/blt3.0/demos/drawerset1.tcl
+++ /dev/null
@@ -1,45 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::graph .g -bg \#CCCCFF -height 800 -width 801
-set w [blt::drawerset .g -handlethickness 3 -animate yes]
-blt::barchart .g.b -bg \#FFCCCC -height 1600 -width 300
-blt::barchart .g.b2 -bg \#CCFFCC -height 300 -width 300
-blt::barchart .g.b3 -bg \#FFFFCC -height 300 -width 300
-blt::barchart .g.b4 -bg \#CCFFFF -height 300 -width 300
-$w add top -window .g.b -fill no \
-    -side top -variable top -handlecolor \#FFCCCC -showhandle no
-$w add left -window .g.b2 -side left -variable left -handlecolor \#CCFFCC \
-    -showhandle no
-$w add right -window .g.b3 -side right -variable right -handlecolor \#FFFFCC
-$w add bottom -window .g.b4 -side bottom -variable bottom \
-    -handlecolor \#CCFFFF  -showhandle no
-checkbutton .left -text "L" -overrelief raised  \
-    -variable left -indicatoron no
-checkbutton .right -text "R" -overrelief raised  \
-    -variable right -indicatoron no
-checkbutton .top -text "T" -overrelief raised  \
-    -variable top -indicatoron no
-checkbutton .bottom -text "B" -overrelief raised  \
-    -variable bottom -indicatoron no
-
-blt::table . \
-    0,0 .g -fill both -rspan 5 \
-    0,1 .left \
-    1,1 .right \
-    2,1 .top \
-    3,1 .bottom
-
-blt::table configure . r* -resize none
-blt::table configure . r4 -resize both
-
-puts stderr [info commands .g.*]
-
-$w open all
-update
-puts stderr drawer=$w
-puts stderr "left is [$w isopen left] left=$left"
-after 2000 {
-    $w raise top
-}
diff --git a/blt3.0/demos/drawerset2.tcl b/blt3.0/demos/drawerset2.tcl
deleted file mode 100644
index e8bdb2a..0000000
--- a/blt3.0/demos/drawerset2.tcl
+++ /dev/null
@@ -1,34 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::graph .g -bg \#CCCCFF -height 800
-set w [blt::drawerset .g -side top -sashthickness 20]
-blt::barchart .g.b -bg \#FFCCCC -height 300
-blt::barchart .g.b2 -bg \#CCFFCC -height 300
-$w add -window .g.b -fill x -resize both
-$w add -window .g.b2 -fill y
-$w open pane0
-set pressed 0
-bind PanesetSash <Enter> { if { !$pressed } { %W activate } } 
-bind PanesetSash <Leave> { if { !$pressed } { %W deactivate } } 
-bind PanesetSash <KeyPress-Left> { %W move -10 0 }
-bind PanesetSash <KeyPress-Right> { %W move 10  0 }
-bind PanesetSash <KeyPress-Up> { %W move 0 -10 }
-bind PanesetSash <KeyPress-Down> { %W move 0 10 }
-bind PanesetSash <Shift-KeyPress-Left> { %W move -100 0 }
-bind PanesetSash <Shift-KeyPress-Right> { %W move 100  0 }
-bind PanesetSash <Shift-KeyPress-Up> { %W move 0 -100 }
-bind PanesetSash <Shift-KeyPress-Down> { %W move 0 100 }
-bind PanesetSash <ButtonPress-1> { 
-    set pressed 1 
-    %W anchor %X %Y 
-}
-bind PanesetSash <B1-Motion> { %W mark %X %Y }
-bind PanesetSash <ButtonRelease-1> { 
-    set pressed 0
-    %W set %X %Y 
-}
-
-blt::table . \
-    0,0 .g -fill both 
diff --git a/blt3.0/demos/eps.tcl b/blt3.0/demos/eps.tcl
deleted file mode 100755
index 02b53b9..0000000
--- a/blt3.0/demos/eps.tcl
+++ /dev/null
@@ -1,315 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-blt::debug watch ResizeEpsItem
-
-proc StartMove { canvas tagName x y } {
-    SaveImageCoords $canvas $tagName $x $y
-    $canvas itemconfigure $tagName-image -quick yes 
-}
-
-proc EndMove { canvas tagName } {
-    $canvas configure -cursor {}
-    $canvas itemconfigure $tagName-image -quick no 
-}
-
-proc MoveEpsItem { canvas tagName x y } {
-    global lastX lastY
-    $canvas move $tagName \
-	[expr $x - $lastX($tagName)] [expr $y - $lastY($tagName)]
-    set lastX($tagName) $x
-    set lastY($tagName) $y
-}
-
-proc GetEpsBBox { canvas tagName } {
-    global left top right bottom
-    set anchor [$canvas coords $tagName-image]
-    set left [lindex $anchor 0]
-    set top [lindex $anchor 1]
-    if { [$canvas type $tagName-image] == "image" } {
-	set image [$canvas itemcget $tagName-image -image]
-	set width [image width $image]
-	set height [image height $image]
-    } else {
-	set width [$canvas itemcget $tagName-image -width]
-	set height [$canvas itemcget $tagName-image -height]
-    }
-    set right [expr $left + $width]
-    set bottom [expr $top + $height]
-}
-    
-proc SaveImageCoords { canvas tagName x y } {
-    global lastX lastY 
-    set lastX($tagName) $x
-    set lastY($tagName) $y
-    $canvas configure -cursor sb_h_double_arrow
-    $canvas itemconfigure $tagName-image -quick yes 
-}
-
-array set cursors {
-    sw bottom_left_corner
-    ne top_right_corner
-    se bottom_right_corner
-    nw top_left_corner
-}
-
-proc StartResize { canvas tagName x y anchor } {
-    global left top right bottom image
-
-    GetEpsBBox $canvas $tagName
-    $canvas itemconfigure $tagName-image -quick yes 
-    $canvas itemconfigure $tagName-grip -fill red
-    $canvas create line $left $top $right $bottom  \
-	-tags "$tagName $tagName-cross $tagName-l1" \
-	-fill red -width 2
-
-    $canvas create line $left $bottom $right $top \
-	-tags "$tagName $tagName-cross $tagName-l2" \
-	-fill red  -width 2
-    $canvas raise $tagName-grip
-    global cursors
-    $canvas configure -cursor $cursors($anchor)
-    global lastX lastY 
-    set lastX($tagName) $x
-    set lastY($tagName) $y
-}
-
-proc EndResize { canvas tagName x y anchor } {
-    $canvas itemconfigure $tagName-image -quick no \
-        -showimage yes
-    ResizeEpsItem $canvas $anchor $tagName $x $y
-    $canvas itemconfigure $tagName-grip -fill green
-    $canvas delete $tagName-cross
-    $canvas configure -cursor ""
-}
-
-proc ResetGrips { canvas tagName } {
-    global gripSize
-    global left top right bottom
-
-    GetEpsBBox $canvas $tagName
-    $canvas coords $tagName-nw \
-	$left $top [expr $left + $gripSize] [expr $top + $gripSize] 
-    $canvas coords $tagName-se \
-	[expr $right - $gripSize] [expr $bottom - $gripSize] $right $bottom 
-    $canvas coords $tagName-ne \
-	[expr $right - $gripSize] [expr $top + $gripSize] $right $top 
-    $canvas coords $tagName-sw \
-	$left $bottom [expr $left + $gripSize] [expr $bottom - $gripSize] 
-    $canvas coords $tagName-l1 $left $top $right $bottom  
-    $canvas coords $tagName-l2 $left $bottom $right $top 
-}
-
-proc ResizeEpsItem { canvas anchor tagName x y } {
-    global left top right bottom 
-
-    GetEpsBBox $canvas $tagName
-    switch $anchor {
-	sw {
-	    set left $x ; set bottom $y
-	    set cursor bottom_left_corner
-	}
-	ne {
-	    set right $x ; set top $y
-	    set cursor top_right_corner
-	}
-	se {
-	    set right $x ; set bottom $y
-	    set cursor bottom_right_corner
-	}
-	nw {
-	    set left $x ; set top $y
-	    set cursor top_left_corner
-	}
-	default {
-	    error "anchor can't be $anchor"
-	}
-    }
-    set w [expr $right - $left]
-    set h [expr $bottom - $top]
-    set options ""
-    if { $w > 1 } {
-	append options "-width $w "
-    }
-    if { $h > 1 } {
-	append options "-height $h "
-    }
-    $canvas coords $tagName-image $left $top
-    eval $canvas itemconfigure $tagName-image $options
-    GetEpsBBox $canvas $tagName
-    ResetGrips $canvas $tagName
-}
-
-set numGroups 0
-set id 0
-
-proc MakeEps { canvas {epsFile ""} {imageFile ""} } {
-    global numGroups id gripSize image
-
-    set image ""
-    if { $imageFile != "" } {
-        set image [image create picture -file $imageFile]
-    }
-    set tagName "epsGroup[incr numGroups]"
-    $canvas create eps 20 20 \
-	-anchor nw \
-	-tags "$tagName $tagName-image" \
-	-titlecolor white \
-	-titlerotate 0 \
-	-titleanchor nw \
-	-font { Courier 24 } \
-	-stipple BLT \
-	-outline orange4 \
-	-fill orange \
-	-file $epsFile \
-	-showimage yes \
-	-image $image 
-    
-    set gripSize 8
-    GetEpsBBox $canvas $tagName
-    global left top right bottom
-    $canvas create rectangle \
-	$left $top [expr $left + $gripSize] [expr $top + $gripSize] \
-	-tags "$tagName $tagName-grip $tagName-nw" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	[expr $right - $gripSize] [expr $bottom - $gripSize] $right $bottom \
-	-tags "$tagName $tagName-grip $tagName-se" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	[expr $right - $gripSize] [expr $top + $gripSize] $right $top \
-	-tags "$tagName $tagName-grip $tagName-ne" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	$left $bottom [expr $left + $gripSize] [expr $bottom - $gripSize] \
-	-tags "$tagName $tagName-grip $tagName-sw" \
-	-fill red -outline ""
-
-    $canvas bind $tagName-image <ButtonPress-1> \
-	 "StartMove $canvas $tagName %x %y"
-    $canvas bind $tagName-image <B1-Motion> \
-	"MoveEpsItem $canvas $tagName %x %y"
-    $canvas bind $tagName <ButtonRelease-1> \
-	"EndMove $canvas $tagName"
-
-    foreach grip { sw ne se nw } {
-	$canvas bind $tagName-$grip <ButtonPress-1> \
-	    "StartResize $canvas $tagName %x %y $grip"
-	$canvas bind $tagName-$grip <B1-Motion> \
-	    "ResizeEpsItem $canvas $grip $tagName %x %y"
-	$canvas bind $tagName-$grip <ButtonRelease-1> \
-	    "EndResize $canvas $tagName %x %y $grip"
-	$canvas raise $tagName-$grip
-    }
-}
-
-proc MakeImage { canvas fileName } {
-    global numGroups id gripSize image
-
-    set image ""
-    set image [image create picture -file $fileName]
-
-    set tagName "epsGroup[incr numGroups]"
-    $canvas create image 20 20 \
-	-anchor nw \
-	-tags "$tagName $tagName-image" \
-	-image $image 
-    
-    set gripSize 8
-    GetEpsBBox $canvas $tagName
-    global left top right bottom
-    $canvas create rectangle \
-	$left $top [expr $left + $gripSize] [expr $top + $gripSize] \
-	-tags "$tagName $tagName-grip $tagName-nw" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	[expr $right - $gripSize] [expr $bottom - $gripSize] $right $bottom \
-	-tags "$tagName $tagName-grip $tagName-se" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	[expr $right - $gripSize] [expr $top + $gripSize] $right $top \
-	-tags "$tagName $tagName-grip $tagName-ne" \
-	-fill red -outline ""
-    $canvas create rectangle \
-	$left $bottom [expr $left + $gripSize] [expr $bottom - $gripSize] \
-	-tags "$tagName $tagName-grip $tagName-sw" \
-	-fill red -outline ""
-
-    $canvas bind $tagName <ButtonRelease-1> \
-	"$canvas configure -cursor {}"
-    $canvas bind $tagName-image <ButtonPress-1> \
-	"SaveImageCoords $canvas $tagName %x %y"
-    $canvas bind $tagName-image <B1-Motion> \
-	"MoveEpsItem $canvas $tagName %x %y"
-
-    foreach grip { sw ne se nw } {
-	$canvas bind $tagName-$grip <ButtonPress-1> \
-	    "StartResize $canvas $tagName %x %y $grip"
-	$canvas bind $tagName-$grip <B1-Motion> \
-	    "ResizeEpsItem $canvas $grip $tagName %x %y"
-	$canvas bind $tagName-$grip <ButtonRelease-1> \
-	    "EndResize $canvas $tagName %x %y $grip"
-	$canvas raise $tagName-$grip
-    }
-}
-
-source scripts/stipples.tcl
-
-#
-# Script to test the BLT "eps" canvas item.
-# 
-
-canvas .layout -bg white
-
-button .print -text "Print" -command {
-    wm iconify .
-    update
-    .layout postscript -file eps.ps 
-    wm deiconify .
-    update
-}
-button .quit -text "Quit" -command {
-    exit 0
-}
-
-blt::table . \
-    0,0 .layout -fill both -cspan 2 \
-    1,0 .print \
-    1,1 .quit \
-
-blt::table configure . r1 -resize none
-
-MakeImage .layout test2.gif
-
-foreach file { ./images/out.ps xy.ps test.ps } {
-    if { [file exists $file] } {
-        MakeEps .layout $file
-    }
-}
-
-if 0 {
-set image [image create picture -file testImg.jpg]
-.layout create eps 20 20 \
-	-anchor nw \
-        -outline blue \
-        -fill yellow \
-	-showimage yes \
-	-image $image 
-}
-
-
-.layout create rectangle 10 10 50 50 -fill blue -outline white
-
-.layout create text 200 200 \
-    -text "This is a text item" \
-    -fill yellow \
-    -anchor w \
-    -font { Times 24 }
-
-
-.layout create rectangle 50 50 150 150 -fill green -outline red
-
-wm colormapwindows . .layout
-
-.layout configure -scrollregion [.layout bbox all]
diff --git a/blt3.0/demos/filmstrip1.tcl b/blt3.0/demos/filmstrip1.tcl
deleted file mode 100644
index cbf4dae..0000000
--- a/blt3.0/demos/filmstrip1.tcl
+++ /dev/null
@@ -1,66 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-set pictures [glob -nocomplain "*.jpg"]
-set autocolors {
-#0000cd
-#cd0000
-#00cd00
-#3a5fcd
-#cdcd00
-#cd1076
-#009acd
-#00c5cd
-#a2b5cd
-#7ac5cd
-#66cdaa
-#a2cd5a
-#cd9b9b
-#cdba96
-#cd3333
-#cd6600
-#cd8c95
-#cd00cd
-#9a32cd
-#6ca6cd
-#9ac0cd
-#9bcd9b
-#00cd66
-#cdc673
-#cdad00
-#cd5555
-#cd853f
-#cd7054
-#cd5b45
-#cd6889
-#cd69c9
-#551a8b
-}
-
-proc Move { w pane } {
-#    puts stderr "w=$w pane=$pane"
-    .fs see $pane
-}
-
-blt::filmstrip .fs  -width 600 -scrollcommand { .s set } \
-    -scrolldelay 10 -scrollincrement 30 -animate yes
-
-
-for { set i 0 } { $i < 32 } { incr i } {
-    set color [lindex $autocolors $i]
-    blt::graph .fs.g$i -bg $color -width 500
-    set pane [.fs add -window .fs.g$i -fill x -showhandle yes]
-    bind .fs.g$i <ButtonPress-1>  [list Move %W $pane]
-    bind .fs.g$i <ButtonPress-2>  [list Move %W 0]
-    bind .fs.g$i <ButtonPress-3>  [list Move %W end]
-}
-blt::tk::scrollbar .s -command { .fs view } -orient horizontal
-
-blt::table . \
-    0,0 .fs -fill both \
-    1,0 .s -fill x 
-
-blt::table configure . r1 -resize none
-focus .fs
-
diff --git a/blt3.0/demos/graph1.tcl b/blt3.0/demos/graph1.tcl
deleted file mode 100755
index 5c7872e..0000000
--- a/blt3.0/demos/graph1.tcl
+++ /dev/null
@@ -1,984 +0,0 @@
-#!../src/bltwish
-
-if { [info exists env(BLT_LIBRARY)] } {
-   lappend auto_path $env(BLT_LIBRARY)
-}
-package require BLT
-
-source scripts/demo.tcl
-
-set normalBg [blt::bgpattern create texture -low grey85 -high grey88]
-set normalBg [blt::bgpattern create gradient -low grey40 -high grey95 \
-	-jitter yes -log no -opacity 80]
-#set normalBg white
-#set activeBg grey95
-# option add *Axis.activeBackground $activeBg
-# option add *Legend.activeBackground $activeBg
-
-set graph .g
-blt::graph .g \
-    -bg $normalBg \
-    -plotrelief solid \
-    -plotborderwidth 1 \
-    -relief raised \
-    -plotpadx 0 -plotpady 0 \
-    -borderwidth 2
-
-blt::htext .header \
-    -text {\
-This is an example of the graph widget.  It displays two-variable data 
-with assorted line attributes and symbols.  To create a postscript file 
-"xy.ps", press the %%
-    blt::tk::button $htext(widget).print -text print -command {
-        puts stderr [time {
-	    blt::busy hold .
-	    update
-	    .g postscript output demo1.eps  -width 5i -height 5i
-	    update
-	    blt::busy release .
-	    update
-        }]
-    } 
-    $htext(widget) append $htext(widget).print
-%% button.}
-
-
-set X { 
-    2.00000e-01 4.00000e-01 6.00000e-01 8.00000e-01 1.00000e+00 
-    1.20000e+00 1.40000e+00 1.60000e+00 1.80000e+00 2.00000e+00 
-    2.20000e+00 2.40000e+00 2.60000e+00 2.80000e+00 3.00000e+00 
-    3.20000e+00 3.40000e+00 3.60000e+00 3.80000e+00 4.00000e+00 
-    4.20000e+00 4.40000e+00 4.60000e+00 4.80000e+00 5.00000e+00 
-} 
-
-set Y1 { 
-    4.07008e+01 7.95658e+01 1.16585e+02 1.51750e+02 1.85051e+02 
-    2.16479e+02 2.46024e+02 2.73676e+02 2.99427e+02 3.23267e+02 
-    3.45187e+02 3.65177e+02 3.83228e+02 3.99331e+02 4.13476e+02 
-    4.25655e+02 4.35856e+02 4.44073e+02 4.50294e+02 4.54512e+02 
-    4.56716e+02 4.57596e+02 4.58448e+02 4.59299e+02 4.60151e+02 
-}
-
-set Y2 { 
-    5.14471e-00 2.09373e+01 2.84608e+01 3.40080e+01 3.75691e+01
-    3.91345e+01 3.92706e+01 3.93474e+01 3.94242e+01 3.95010e+01 
-    3.95778e+01 3.96545e+01 3.97313e+01 3.98081e+01 3.98849e+01 
-    3.99617e+01 4.00384e+01 4.01152e+01 4.01920e+01 4.02688e+01 
-    4.03455e+01 4.04223e+01 4.04990e+01 4.05758e+01 4.06526e+01 
-}
-
-set Y3 { 
-    2.61825e+01 5.04696e+01 7.28517e+01 9.33192e+01 1.11863e+02 
-    1.28473e+02 1.43140e+02 1.55854e+02 1.66606e+02 1.75386e+02 
-    1.82185e+02 1.86994e+02 1.89802e+02 1.90683e+02 1.91047e+02 
-    1.91411e+02 1.91775e+02 1.92139e+02 1.92503e+02 1.92867e+02 
-    1.93231e+02 1.93595e+02 1.93958e+02 1.94322e+02 1.94686e+02 
-}
-
-set configOptions {
-    Element.Pixels		6
-    Element.Smooth		catrom
-    Legend.ActiveBackground	khaki2
-    Legend.ActiveRelief		sunken
-    Legend.Background		""
-    Legend.Position		plotarea
-    Title			"A Simple X-Y Graph"
-    activeLine.Color		yellow4
-    activeLine.Fill		yellow
-    background			khaki3
-    line1.Color			red4
-    line1.Fill			red1
-    line1.Symbol		splus
-    line2.Color			purple4
-    line2.Fill			purple1
-    line2.Symbol		arrow
-    line3.Color			green4
-    line3.Fill			green1
-    line3.Symbol		triangle
-    x.Descending		no
-    x.Loose			no
-    x.Title			"X Axis Label"
-    y.Rotate			0
-    y.Title			"Y Axis Label" 
-}
-
-set resource [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resource.$option $value
-}
-$graph element create line1 -x $X -y $Y2 
-$graph element create line2 -x $X -y $Y3 
-$graph element create line3 -x $X -y $Y1 
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-#Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-
-blt::htext .footer \
-    -text {Hit the %%
-blt::tk::button $htext(widget).quit -text quit -command { exit } 
-$htext(widget) append $htext(widget).quit 
-%% button when you've seen enough.%%
-label $htext(widget).logo -bitmap BLT
-$htext(widget) append $htext(widget).logo 
-%%}
-
-proc MultiplexView { args } { 
-    eval .g axis view y $args
-    eval .g axis view y2 $args
-}
-
-blt::tk::scrollbar .xbar \
-    -command { .g axis view x } \
-    -orient horizontal \
-    -highlightthickness 0
-blt::tk::scrollbar .ybar \
-    -command MultiplexView \
-    -orient vertical -highlightthickness 0
-blt::table . \
-    0,0 .header -cspan 3 -fill x \
-    1,0 .g  -fill both -cspan 3 -rspan 3 \
-    2,3 .ybar -fill y  -padx 0 -pady 0 \
-    4,1 .xbar -fill x \
-    5,0 .footer -cspan 3 -fill x
-
-blt::table configure . c3 r0 r4 r5 -resize none
-
-.g axis configure x \
-    -scrollcommand { .xbar set }  \
-    -scrollmax 10 \
-    -scrollmin 2  \
-    -activeforeground red3 \
-    -activebackground white \
-    -title "X Energy (eV)" \
-	-titlefont {-family Arial -size 8 -weight light } \
-    -exterior no
-
-.g axis configure y \
-    -scrollcommand { .ybar set } \
-    -scrollmax 1000 \
-    -activeforeground red3 \
-    -activebackground white \
-    -scrollmin -100  \
-    -rotate 0 \
-    -title "Y ayis" \
-    -exterior no
-
-.g axis configure y2 \
-    -scrollmin 0.0 -scrollmax 1.0 \
-    -hide no \
-    -rotate 0 \
-    -exterior no \
-    -title "Y2"
-
-.g axis configure x2 \
-    -scrollmin 0.0 -scrollmax 1.0 \
-    -hide no \
-    -rotate 0 \
-    -exterior no \
-    -title "X2"
-
-.g legend configure \
-    -relief flat -bd 0 \
-    -activerelief flat \
-    -activeborderwidth 1  \
-    -position plotarea -anchor ne -padx 10 -pady 10 -bg ""
-
-#.g configure -plotpadx 0 -plotpady 0 -plotborderwidth 1 -plotrelief solid \
-#    -Width 4.4i -plotwidth 2.0i  -leftmargin 0i -rightmargin 1.0i
-
-.g pen configure "activeLine" \
-    -showvalues y
-.g configure -halo 50
-
-.g element bind all <Enter> {
-    eval %W legend deactivate *
-    %W legend activate [%W element get current]
-}
-.g configure -plotpady { 0 0 } 
-
-.g element bind all <Leave> {
-    %W legend deactivate *
-}
-.g axis bind all <Enter> {
-    set axis [%W axis get current]
-    #%W axis activate $axis
-    %W axis focus $axis
-}
-.g axis bind all <Leave> {
-    set axis [%W axis get current]
-    #%W axis deactivate $axis
-    %W axis focus ""
-}
-.g configure -leftvariable left 
-trace variable left w "UpdateTable .g"
-proc UpdateTable { graph p1 p2 how } {
-    blt::table configure . c0 -width [$graph extents leftmargin]
-    blt::table configure . c2 -width [$graph extents rightmargin]
-    blt::table configure . r1 -height [$graph extents topmargin]
-    blt::table configure . r3 -height [$graph extents bottommargin]
-}
-
-set image1 [image create picture -file bitmaps/sharky.xbm]
-set image2 [image create picture -file images/buckskin.gif]
-set bg1 [blt::bgpattern create solid -color blue -opacity 30]
-set bg2 [blt::bgpattern create solid -color green -opacity 40]
-set bg3 [blt::bgpattern create solid -color pink -opacity 40]
-.g element configure line1 -areabackground $bg1 -areaforeground blue 
-#.g element configure line2 -areabackground $bg2
-#.g element configure line3 -areabackground $bg3
-.g configure -title "Graph Title"
-
-if { $tcl_platform(platform) == "windows" } {
-    if 0 {
-        set name [lindex [blt::printer names] 0]
-        set printer {Lexmark Optra E310}
-	blt::printer open $printer
-	blt::printer getattrs $printer attrs
-	puts $attrs(Orientation)
-	set attrs(Orientation) Landscape
-	set attrs(DocumentName) "This is my print job"
-	blt::printer setattrs $printer attrs
-	blt::printer getattrs $printer attrs
-	puts $attrs(Orientation)
-	after 5000 {
-	    $graph print2 $printer
-	    blt::printer close $printer
-	}
-    } else {
-	after 5000 {
-	    $graph print2 
-	}
-    }	
-    if 1 {
-	after 2000 {
-	    $graph snap -format emf CLIPBOARD
-	}
-    }
-}
-
-focus .g
-.g xaxis bind <Left>  { 
-    .g xaxis view scroll -1 units 
-} 
-
-.g xaxis bind <Right> { 
-    .g xaxis view scroll 1 units 
-}
-
-.g yaxis bind <Up>  { 
-    .g yaxis view scroll -1 units 
-} 
-
-.g yaxis bind <Down> { 
-    .g yaxis view scroll 1 units 
-}
-
-.g y2axis bind <Up>  { 
-    .g y2axis view scroll -1 units 
-} 
-
-.g y2axis bind <Down> { 
-    .g y2axis view scroll 1 units 
-}
-
-.g axis bind all <ButtonPress-1> { 
-    set b1(x) %x
-    set b1(y) %y
-    set axis [%W axis get current]
-    %W axis activate $axis
-}
-.g axis bind all <ButtonRelease-1> { 
-    set b1(x) %x
-    set b1(y) %y
-    set axis [%W axis get current]
-    %W axis deactivate $axis
-#    %W axis focus ""
-}
-
-.g xaxis bind <B1-Motion> { 
-    set dist [expr %x - $b1(x)]
-    .g xaxis view scroll $dist pixels
-    set b1(x) %x
-}
-
-.g yaxis bind <B1-Motion> { 
-    set dist [expr %y - $b1(y)]
-    .g yaxis view scroll $dist pixels
-    set b1(y) %y
-}
-
-blt::LegendSelections .g
-.g legend configure -selectmode multiple
-
-
-proc FixAxes { g option value } {
-    global axisd
-    foreach a [$g axis names $axisd(axis)] {
-	$g axis configure $a $option $value
-    }
-}
-
-proc AxisOptions { w } {
-    global axisd
-    $w insert end "Axis" 
-    set t [frame $w.axis]
-    $w tab configure "Axis" -window $w.axis
-
-    blt::tk::label $t.axis_l -text  "Select Axis:" 
-    blt::combobutton $t.axis -textvariable axisd(-axis) \
-	-menu $t.axis.m -command "puts hi" 
-    set m [blt::combomenu $t.axis.m -textvariable axisd(-axis)]
-    foreach axis [.g axis names] {
-	$m add -type radiobutton -text $axis -value $axis 
-    }
-    $m add -type radiobutton -text "all" -value "*" 
-    $m item configure all -variable axisd(axis)
-
-    blt::tk::label $t.exterior_l -text  "-exterior" 
-    blt::combobutton $t.exterior -textvariable axisd(-exterior) \
-	-menu $t.exterior.m
-    set m [blt::combomenu $t.exterior.m]
-    $m add -type radiobutton -text "yes" 
-    $m add -type radiobutton -text "no"
-    $m item configure all -variable axisd(-exterior) \
-	-command { FixAxes .g -exterior $axisd(-exterior) }
-
-    blt::tk::label $t.color_l -text  "-color" 
-    blt::combobutton $t.color -textvariable axisd(-color) \
-	-menu $t.color.m
-    set m [blt::combomenu $t.color.m]
-    $m add -type radiobutton -text "black" 
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green"
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow" 
-    $m item configure all -variable axisd(-color) \
-	-command { FixAxes .g -color $axisd(-color) }
-
-    blt::tk::label $t.linewidth_l -text  "-linewidth" 
-    blt::combobutton $t.linewidth -textvariable axisd(-linewidth) \
-	-menu $t.linewidth.m
-    set m [blt::combomenu $t.linewidth.m]
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable axisd(-linewidth) \
-	-command { FixAxes .g -linewidth $axisd(-linewidth) }
-
-    blt::tk::label $t.showticks_l -text  "-showticks" 
-    blt::combobutton $t.showticks -textvariable axisd(-showticks) \
-	-menu $t.showticks.m
-    set m [blt::combomenu $t.showticks.m]
-    $m add -type radiobutton -text "yes" 
-    $m add -type radiobutton -text "no" 
-    $m item configure all -variable axisd(-showticks) \
-	-command { FixAxes .g -showticks $axisd(-showticks) }
-
-    blt::tk::label $t.hide_l -text  "-hide" 
-    blt::combobutton $t.hide -textvariable axisd(-hide) \
-	-menu $t.hide.m
-    set m [blt::combomenu $t.hide.m]
-    $m add -type radiobutton -text "yes" 
-    $m add -type radiobutton -text "no" 
-    $m item configure all -variable axisd(-hide) \
-	-command { FixAxes .g -hide $axisd(-hide) }
-
-
-    blt::tk::label $t.loose_l -text  "-loose" 
-    blt::combobutton $t.loose -textvariable axisd(-loose) \
-	-menu $t.loose.m
-    set m [blt::combomenu $t.loose.m]
-    $m add -type radiobutton -text "yes" 
-    $m add -type radiobutton -text "no" 
-    $m add -type radiobutton -text "always" 
-    $m item configure all -variable axisd(-loose) \
-	-command { FixAxes .g -loose $axisd(-loose) }
-    
-    blt::tk::label $t.title_l -text  "-title" 
-    blt::combobutton $t.title -textvariable axisd(-title) \
-	-menu $t.title.m
-    set m [blt::combomenu $t.title.m]
-    $m add -type radiobutton -text "title1" 
-    $m add -type radiobutton -text "Title2" 
-    $m add -type radiobutton -text "none" -value ""
-    $m item configure all -variable axisd(-title) \
-	-command { FixAxes .g -title $axisd(-title) }
-
-    $t.axis.m select 0
-    foreach option { color exterior showticks linewidth loose title hide } {
-	set value [.g axis cget $axisd(axis) -$option]
-	set axisd(-$option) $value
-    }
-    blt::table $t \
-	0,0 $t.axis_l -anchor e \
-	0,1 $t.axis -fill x \
-	2,0 $t.color_l -anchor e \
-	2,1 $t.color -fill x \
-	3,0 $t.exterior_l -anchor e \
-	3,1 $t.exterior -fill x \
-	4,0 $t.hide_l -anchor e \
-	4,1 $t.hide -fill x \
-	5,0 $t.linewidth_l -anchor e \
-	5,1 $t.linewidth -fill x \
-	6,0 $t.loose_l -anchor e \
-	6,1 $t.loose -fill x \
-	7,0 $t.showticks_l -anchor e \
-	7,1 $t.showticks -fill x  \
-	8,0 $t.title_l -anchor e \
-	8,1 $t.title -fill x 
-    blt::table configure $t r0 -pady 8
-}
-
-proc GraphOptions { w } {
-    global graphd
-    $w insert end "Graph" 
-    set t [frame $w.graph]
-    $w tab configure "Graph" -window $w.graph
-    blt::tk::label $t.plotborderwidth_l -text  "-plotborderwidth" 
-    blt::combobutton $t.plotborderwidth -textvariable graphd(-plotborderwidth) \
-	-menu $t.plotborderwidth.m
-    set m [blt::combomenu $t.plotborderwidth.m]
-    $m add -type radiobutton -text [.g cget -plotborderwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable graphd(-plotborderwidth) \
-	-command { .g configure -plotborderwidth $graphd(-plotborderwidth) }
-
-    blt::tk::label $t.borderwidth_l -text  "-borderwidth" 
-    blt::combobutton $t.borderwidth -textvariable graphd(-borderwidth) \
-	-menu $t.borderwidth.m
-    set m [blt::combomenu $t.borderwidth.m]
-    $m add -type radiobutton -text [.g cget -borderwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable graphd(-borderwidth) \
-	-command { .g configure -borderwidth $graphd(-borderwidth) }
-
-    blt::tk::label $t.plotpady_l -text  "-plotpady" 
-    blt::combobutton $t.plotpady -textvariable graphd(-plotpady) \
-	-menu $t.plotpady.m
-    set m [blt::combomenu $t.plotpady.m]
-    $m add -type radiobutton -text [.g cget -plotpady]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10"
-    $m item configure all -variable graphd(-plotpady) \
-	-command { .g configure -plotpady $graphd(-plotpady) }
-
-    blt::tk::label $t.plotpadx_l -text  "-plotpadx" 
-    blt::combobutton $t.plotpadx -textvariable graphd(-plotpadx) \
-	-menu $t.plotpadx.m
-    set m [blt::combomenu $t.plotpadx.m]
-    $m add -type radiobutton -text [.g cget -plotpadx]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable graphd(-plotpadx) \
-	-command { .g configure -plotpadx $graphd(-plotpadx) }
-
-    blt::tk::label $t.plotrelief_l -text  "-plotrelief" 
-    blt::combobutton $t.plotrelief -textvariable graphd(-plotrelief) \
-	-menu $t.plotrelief.m
-    set m [blt::combomenu $t.plotrelief.m]
-    $m add -type radiobutton -text [.g cget -plotrelief]
-    $m add -type separator
-    $m add -type radiobutton -text "flat" 
-    $m add -type radiobutton -text "groove" 
-    $m add -type radiobutton -text "raised" 
-    $m add -type radiobutton -text "ridge" 
-    $m add -type radiobutton -text "solid" 
-    $m add -type radiobutton -text "sunken"
-    $m item configure all -variable graphd(-plotrelief) \
-	-command { .g configure -plotrelief $graphd(-plotrelief) }
-
-    blt::tk::label $t.relief_l -text  "-relief" 
-    blt::combobutton $t.relief -textvariable graphd(-relief) \
-	-menu $t.relief.m
-    set m [blt::combomenu $t.relief.m]
-    $m add -type radiobutton -text [.g cget -relief]
-    $m add -type separator
-    $m add -type radiobutton -text "flat" 
-    $m add -type radiobutton -text "groove"
-    $m add -type radiobutton -text "raised"
-    $m add -type radiobutton -text "ridge"
-    $m add -type radiobutton -text "solid" 
-    $m add -type radiobutton -text "sunken"
-    $m item configure all -variable graphd(-relief) \
-	-command { .g configure -relief $graphd(-relief) }
-
-    blt::tk::label $t.plotwidth_l -text  "-plotwidth" 
-    blt::combobutton $t.plotwidth -textvariable graphd(-plotwidth) \
-	-menu $t.plotwidth.m
-    set m [blt::combomenu $t.plotwidth.m]
-    $m add -type radiobutton -text [.g cget -plotwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "100"
-    $m add -type radiobutton -text "200"
-    $m add -type radiobutton -text "2i" 
-    $m add -type radiobutton -text "4i" 
-    $m add -type radiobutton -text "8i" 
-    $m item configure all -variable graphd(-plotwidth) \
-	-command { .g configure -plotwidth $graphd(-plotwidth) }
-
-    blt::tk::label $t.plotheight_l -text  "-plotheight" 
-    blt::combobutton $t.plotheight -textvariable graphd(-plotheight) \
-	-menu $t.plotheight.m
-    set m [blt::combomenu $t.plotheight.m]
-    $m add -type radiobutton -text [.g cget -plotheight]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "100"
-    $m add -type radiobutton -text "200"
-    $m add -type radiobutton -text "2i" 
-    $m add -type radiobutton -text "4i" 
-    $m add -type radiobutton -text "8i" 
-    $m item configure all -variable graphd(-plotheight) \
-	-command { .g configure -plotheight $graphd(-plotheight) }
-
-    blt::tk::label $t.width_l -text  "-width" 
-    blt::combobutton $t.width -textvariable graphd(-width) \
-	-menu $t.width.m
-    set m [blt::combomenu $t.width.m]
-    $m add -type radiobutton -text [.g cget -width]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "100" 
-    $m add -type radiobutton -text "2.5i"
-    $m add -type radiobutton -text "4i"
-    $m add -type radiobutton -text "6i"
-    $m add -type radiobutton -text "8.5i" 
-    $m item configure all -variable graphd(-width) \
-	-command { .g configure -width $graphd(-width) }
-
-    blt::tk::label $t.height_l -text  "-height" 
-    blt::combobutton $t.height -textvariable graphd(-height) \
-	-menu $t.height.m
-    set m [blt::combomenu $t.height.m]
-    $m add -type radiobutton -text [.g cget -height]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "200" 
-    $m add -type radiobutton -text "2.5i"
-    $m add -type radiobutton -text "4i"
-    $m add -type radiobutton -text "6i"
-    $m add -type radiobutton -text "8.5i"
-    $m item configure all -variable graphd(-height) \
-	-command { .g configure -height $graphd(-height) }
-
-    blt::tk::label $t.plotbackground_l -text  "-plotbackground" 
-    blt::combobutton $t.plotbackground -textvariable graphd(-plotbackground) \
-	-menu $t.plotbackground.m
-    set m [blt::combomenu $t.plotbackground.m]
-    $m add -type radiobutton -text [.g cget -plotbackground]
-    $m add -type separator
-    $m add -type radiobutton -text "black"
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green"
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable graphd(-plotbackground) \
-	-command { .g configure -plotbackground $graphd(-plotbackground) }
-
-    blt::tk::label $t.background_l -text  "-background" 
-    blt::combobutton $t.background -textvariable graphd(-background) \
-	-menu $t.background.m
-    set m [blt::combomenu $t.background.m]
-    $m add -type radiobutton -text [.g cget -background]
-    $m add -type separator
-    $m add -type radiobutton -text "black" 
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green" 
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable graphd(-background) \
-	-command { .g configure -background $graphd(-background) }
-
-    blt::tk::label $t.title_l -text  "-title" 
-    blt::combobutton $t.title -textvariable graphd(-title) \
-	-menu $t.title.m
-    set m [blt::combomenu $t.title.m]
-    $m add -type radiobutton -text [.g cget -title]
-    $m add -type separator
-    $m add -type radiobutton -text "title1" 
-    $m add -type radiobutton -text "Title2" 
-    $m add -type radiobutton -text "none" -value ""
-    $m item configure all -variable graphd(-title) \
-	-command { .g configure -title $graphd(-title) }
-
-    blt::tk::label $t.leftmargin_l -text  "-leftmargin" 
-    blt::combobutton $t.leftmargin -textvariable graphd(-leftmargin) \
-	-menu $t.leftmargin.m
-    set m [blt::combomenu $t.leftmargin.m]
-    $m add -type radiobutton -text [.g cget -leftmargin]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "10" 
-    $m add -type radiobutton -text ".25i"
-    $m add -type radiobutton -text ".5i"
-    $m add -type radiobutton -text "1.0i"
-    $m add -type radiobutton -text "2.0i" 
-    $m item configure all -variable graphd(-leftmargin) \
-	-command { .g configure -leftmargin $graphd(-leftmargin) }
-
-    blt::tk::label $t.rightmargin_l -text  "-rightmargin" 
-    blt::combobutton $t.rightmargin -textvariable graphd(-rightmargin) \
-	-menu $t.rightmargin.m
-    set m [blt::combomenu $t.rightmargin.m]
-    $m add -type radiobutton -text [.g cget -rightmargin]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "10" 
-    $m add -type radiobutton -text ".25i"
-    $m add -type radiobutton -text ".5i"
-    $m add -type radiobutton -text "1.0i"
-    $m add -type radiobutton -text "2.0i" 
-    $m item configure all -variable graphd(-rightmargin) \
-	-command { .g configure -rightmargin $graphd(-rightmargin) }
-
-    blt::tk::label $t.topmargin_l -text  "-topmargin" 
-    blt::combobutton $t.topmargin -textvariable graphd(-topmargin) \
-	-menu $t.topmargin.m
-    set m [blt::combomenu $t.topmargin.m]
-    $m add -type radiobutton -text [.g cget -topmargin]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "10" 
-    $m add -type radiobutton -text ".25i"
-    $m add -type radiobutton -text ".5i"
-    $m add -type radiobutton -text "1.0i"
-    $m add -type radiobutton -text "2.0i" 
-    $m item configure all -variable graphd(-topmargin) \
-	-command { .g configure -topmargin $graphd(-topmargin) }
-
-    blt::tk::label $t.bottommargin_l -text  "-bottommargin" 
-    blt::combobutton $t.bottommargin -textvariable graphd(-bottommargin) \
-	-menu $t.bottommargin.m
-    set m [blt::combomenu $t.bottommargin.m]
-    $m add -type radiobutton -text [.g cget -bottommargin]
-    $m add -type separator
-    $m add -type radiobutton -text "0"
-    $m add -type radiobutton -text "10" 
-    $m add -type radiobutton -text ".25i"
-    $m add -type radiobutton -text ".5i"
-    $m add -type radiobutton -text "1.0i"
-    $m add -type radiobutton -text "2.0i" 
-    $m item configure all -variable graphd(-bottommargin) \
-	-command { .g configure -bottommargin $graphd(-bottommargin) }
-
-    foreach option { borderwidth plotrelief relief background
-	plotbackground background plotborderwidth plotpadx plotpady 
-	plotwidth plotheight width height title rightmargin leftmargin
-	topmargin bottommargin } {
-	$t.$option.m select 0
-    }
-
-    blt::table $t \
-	1,0 $t.background_l -anchor e \
-	1,1 $t.background -fill x  \
-	2,0 $t.borderwidth_l -anchor e \
-	2,1 $t.borderwidth -fill x \
-	3,0 $t.bottommargin_l -anchor e \
-	3,1 $t.bottommargin -fill x  \
-	4,0 $t.height_l -anchor e \
-	4,1 $t.height -fill x \
-	5,0 $t.leftmargin_l -anchor e \
-	5,1 $t.leftmargin -fill x  \
-	6,0 $t.plotbackground_l -anchor e \
-	6,1 $t.plotbackground -fill x  \
-	7,0 $t.plotborderwidth_l -anchor e \
-	7,1 $t.plotborderwidth -fill x  \
-	8,0 $t.plotheight_l -anchor e \
-	8,1 $t.plotheight -fill x \
-	9,0 $t.plotpadx_l -anchor e \
-	9,1 $t.plotpadx -fill x \
-	10,0 $t.plotpady_l -anchor e \
-	10,1 $t.plotpady -fill x \
-	11,0 $t.plotrelief_l -anchor e \
-	11,1 $t.plotrelief -fill x \
-	12,0 $t.plotwidth_l -anchor e \
-	12,1 $t.plotwidth -fill x \
-	13,0 $t.relief_l -anchor e \
-	13,1 $t.relief -fill x \
-	14,0 $t.rightmargin_l -anchor e \
-	14,1 $t.rightmargin -fill x  \
-	15,0 $t.title_l -anchor e \
-	15,1 $t.title -fill x \
-	16,0 $t.topmargin_l -anchor e \
-	16,1 $t.topmargin -fill x  \
-	17,0 $t.width_l -anchor e \
-	17,1 $t.width -fill x 
-}
-
-proc LegendOptions { w } {
-    global legend
-    $w insert end "Legend" 
-    set t [frame $w.legend]
-    $w tab configure "Legend" -window $w.legend
-    blt::tk::label $t.selectborderwidth_l -text  "-selectborderwidth" 
-    blt::combobutton $t.selectborderwidth -textvariable legend(-selectborderwidth) \
-	-menu $t.selectborderwidth.m
-    set m [blt::combomenu $t.selectborderwidth.m]
-    $m add -type radiobutton -text [.g legend cget -selectborderwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable legend(-selectborderwidth) \
-	-command { .g legend configure -selectborderwidth $legend(-selectborderwidth) }
-
-    blt::tk::label $t.borderwidth_l -text  "-borderwidth" 
-    blt::combobutton $t.borderwidth -textvariable legend(-borderwidth) \
-	-menu $t.borderwidth.m
-    set m [blt::combomenu $t.borderwidth.m]
-    $m add -type radiobutton -text [.g legend cget -borderwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable legend(-borderwidth) \
-	-command { .g legend configure -borderwidth $legend(-borderwidth) }
-
-    blt::tk::label $t.pady_l -text  "-pady" 
-    blt::combobutton $t.pady -textvariable legend(-pady) \
-	-menu $t.pady.m
-    set m [blt::combomenu $t.pady.m]
-    $m add -type radiobutton -text [.g legend cget -pady]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10"
-    $m item configure all -variable legend(-pady) \
-	-command { .g legend configure -pady $legend(-pady) }
-
-    blt::tk::label $t.padx_l -text  "-padx" 
-    blt::combobutton $t.padx -textvariable legend(-padx) \
-	-menu $t.padx.m
-    set m [blt::combomenu $t.padx.m]
-    $m add -type radiobutton -text [.g legend cget -padx]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable legend(-padx) \
-	-command { .g legend configure -padx $legend(-padx) }
-
-    blt::tk::label $t.selectrelief_l -text  "-selectrelief" 
-    blt::combobutton $t.selectrelief -textvariable legend(-selectrelief) \
-	-menu $t.selectrelief.m
-    set m [blt::combomenu $t.selectrelief.m]
-    $m add -type radiobutton -text [.g legend cget -selectrelief]
-    $m add -type separator
-    $m add -type radiobutton -text "flat" 
-    $m add -type radiobutton -text "groove" 
-    $m add -type radiobutton -text "raised" 
-    $m add -type radiobutton -text "ridge" 
-    $m add -type radiobutton -text "solid" 
-    $m add -type radiobutton -text "sunken"
-    $m item configure all -variable legend(-selectrelief) \
-	-command { .g legend configure -selectrelief $legend(-selectrelief) }
-
-    blt::tk::label $t.relief_l -text  "-relief" 
-    blt::combobutton $t.relief -textvariable legend(-relief) \
-	-menu $t.relief.m
-    set m [blt::combomenu $t.relief.m]
-    $m add -type radiobutton -text [.g legend cget -relief]
-    $m add -type separator
-    $m add -type radiobutton -text "flat" 
-    $m add -type radiobutton -text "groove"
-    $m add -type radiobutton -text "raised"
-    $m add -type radiobutton -text "ridge"
-    $m add -type radiobutton -text "solid" 
-    $m add -type radiobutton -text "sunken"
-    $m item configure all -variable legend(-relief) \
-	-command { .g legend configure -relief $legend(-relief) }
-
-    blt::tk::label $t.position_l -text  "-position" 
-    blt::combobutton $t.position -textvariable legend(-position) \
-	-menu $t.position.m
-    set m [blt::combomenu $t.position.m]
-    $m add -type radiobutton -text [.g legend cget -position]
-    $m add -type separator
-    $m add -type radiobutton -text "left" 
-    $m add -type radiobutton -text "right"
-    $m add -type radiobutton -text "top"
-    $m add -type radiobutton -text "bottom" 
-    $m add -type radiobutton -text "plotarea" 
-    $m add -type radiobutton -text "@200,200" 
-    $m item configure all -variable legend(-position) \
-	-command { .g legend configure -position $legend(-position) }
-
-    blt::tk::label $t.hide_l -text  "-hide" 
-    blt::combobutton $t.hide -textvariable legend(-hide) \
-	-menu $t.hide.m
-    set m [blt::combomenu $t.hide.m]
-    $m add -type radiobutton -text [.g legend cget -hide]
-    $m add -type separator
-    $m add -type radiobutton -text "yes" 
-    $m add -type radiobutton -text "no" 
-    $m item configure all -variable legend(-hide) \
-	-command { .g legend configure -hide $legend(-hide) }
-
-    blt::tk::label $t.activebackground_l -text  "-activebackground" 
-    blt::combobutton $t.activebackground -textvariable legend(-activebackground) \
-	-menu $t.activebackground.m
-    set m [blt::combomenu $t.activebackground.m]
-    $m add -type radiobutton -text [.g legend cget -activebackground]
-    $m add -type separator
-    $m add -type radiobutton -text "black"
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green"
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable legend(-activebackground) \
-	-command { .g legend configure -activebackground $legend(-activebackground) }
-
-    blt::tk::label $t.activeborderwidth_l -text  "-activeborderwidth" 
-    blt::combobutton $t.activeborderwidth -textvariable legend(-activeborderwidth) \
-	-menu $t.activeborderwidth.m
-    set m [blt::combomenu $t.activeborderwidth.m]
-    $m add -type radiobutton -text [.g legend cget -activeborderwidth]
-    $m add -type separator
-    $m add -type radiobutton -text "0" 
-    $m add -type radiobutton -text "1" 
-    $m add -type radiobutton -text "2" 
-    $m add -type radiobutton -text "3" 
-    $m add -type radiobutton -text "4" 
-    $m add -type radiobutton -text "10" 
-    $m item configure all -variable legend(-activeborderwidth) \
-	-command { .g legend configure -activeborderwidth $legend(-activeborderwidth) }
-
-    blt::tk::label $t.selectbackground_l -text  "-selectbackground" 
-    blt::combobutton $t.selectbackground -textvariable legend(-selectbackground) \
-	-menu $t.selectbackground.m
-    set m [blt::combomenu $t.selectbackground.m]
-    $m add -type radiobutton -text [.g legend cget -selectbackground]
-    $m add -type separator
-    $m add -type radiobutton -text "black"
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green"
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable legend(-selectbackground) \
-	-command { .g legend configure -selectbackground $legend(-selectbackground) }
-
-    blt::tk::label $t.selectforeground_l -text  "-selectforeground" 
-    blt::combobutton $t.selectforeground -textvariable legend(-selectforeground) \
-	-menu $t.selectforeground.m
-    set m [blt::combomenu $t.selectforeground.m]
-    $m add -type radiobutton -text [.g legend cget -selectforeground]
-    $m add -type separator
-    $m add -type radiobutton -text "black"
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green"
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable legend(-selectforeground) \
-	-command { .g legend configure -selectforeground $legend(-selectforeground) }
-
-
-    blt::tk::label $t.background_l -text  "-background" 
-    blt::combobutton $t.background -textvariable legend(-background) \
-	-menu $t.background.m
-    set m [blt::combomenu $t.background.m]
-    $m add -type radiobutton -text [.g legend cget -background]
-    $m add -type separator
-    $m add -type radiobutton -text "black" 
-    $m add -type radiobutton -text "blue" 
-    $m add -type radiobutton -text "green" 
-    $m add -type radiobutton -text "grey" 
-    $m add -type radiobutton -text "red" 
-    $m add -type radiobutton -text "white" 
-    $m add -type radiobutton -text "yellow"
-    $m item configure all -variable legend(-background) \
-	-command { .g legend configure -background $legend(-background) }
-    puts stderr [$m item configure "black"]
-    foreach option { borderwidth selectrelief relief 
-	selectbackground background selectborderwidth padx pady 
-	selectforeground activebackground
-	position hide activeborderwidth } {
-	$t.$option.m select 0
-    }
-
-    blt::table $t \
-	1,0 $t.activebackground_l -anchor e \
-	1,1 $t.activebackground -fill x \
-	2,0 $t.activeborderwidth_l -anchor e \
-	2,1 $t.activeborderwidth -fill x \
-	3,0 $t.background_l -anchor e \
-	3,1 $t.background -fill x  \
-	4,0 $t.borderwidth_l -anchor e \
-	4,1 $t.borderwidth -fill x \
-	5,0 $t.hide_l -anchor e \
-	5,1 $t.hide -fill x \
-	6,0 $t.padx_l -anchor e \
-	6,1 $t.padx -fill x \
-	7,0 $t.pady_l -anchor e \
-	7,1 $t.pady -fill x \
-	8,0 $t.position_l -anchor e \
-	8,1 $t.position -fill x \
-	9,0 $t.relief_l -anchor e \
-	9,1 $t.relief -fill x \
-	10,0 $t.selectbackground_l -anchor e \
-	10,1 $t.selectbackground -fill x  \
-	11,0 $t.selectborderwidth_l -anchor e \
-	11,1 $t.selectborderwidth -fill x  \
-	12,0 $t.selectforeground_l -anchor e \
-	12,1 $t.selectforeground -fill x  \
-	13,0 $t.selectrelief_l -anchor e \
-	13,1 $t.selectrelief -fill x 
-}
-
-set t [toplevel .cntrl]
-blt::tabnotebook $t.tb
-blt::table $t \
-    0,0 $t.tb -fill both
-GraphOptions $t.tb
-AxisOptions $t.tb
-LegendOptions $t.tb
diff --git a/blt3.0/demos/graph2.tcl b/blt3.0/demos/graph2.tcl
deleted file mode 100755
index b87e363..0000000
--- a/blt3.0/demos/graph2.tcl
+++ /dev/null
@@ -1,135 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-source scripts/demo.tcl
-source scripts/stipples.tcl
-
-if { ![string match "*gray*" [winfo screenvisual .]] } {
-    option add *Button.Background	red
-    option add *TextMarker.Foreground	black
-    option add *TextMarker.Background	yellow
-    option add *LineMarker.Foreground	black
-    option add *LineMarker.Background	yellow
-    option add *PolyMarker.Fill		yellow2
-    option add *PolyMarker.Outline	""
-    option add *PolyMarker.Stipple	bdiagonal1
-    option add *activeLine.Color	red4
-    option add *activeLine.Fill		red2
-    option add *Element.Color		purple
-}
-
-set data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-set data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-    nQkAOw==
-}
-set image [image create picture -data $data]
-
-set graph [blt::graph .g]
-blt::table . \
-    0,0 $graph -fill both 
-
-source scripts/graph2.tcl
-
-$graph postscript configure \
-    -landscape yes 
-
-$graph configure \
-    -width 10i \
-    -height 8i \
-    -title "Graph" \
-    -plotpady 0 -plotpadx 0 -plotborderwidth 0
-
-$graph axis configure y \
-    -title "Y Axis" 
-
-if 1 {
-    set bg [blt::bgpattern create gradient -low grey40 -high grey95 \
-	-jitter yes -log no -opacity 80]
-    $graph element configure line1 
-#	-areapattern solid -areaforeground green
-#	-areatile $image 
-    $graph element configure line3 \
-	-areaforeground red \
-	-areabackground $bg 
-}
-
-if 0 {
-set fileName testImg.jpg
-if { [file exists $fileName] } {
-    set image [image create picture -file $fileName]
-    if 1 { 
-	puts stderr [time { 
-	    $graph marker create image -image $image -resamplefilter sinc \
-		-coords "-360.0 -1.0 360.0 1.0" \
-		-under yes \
-		-mapx degrees \
-		-name $fileName 
-	}]
-    }
-} 
-}
-
-bind $graph <Control-ButtonPress-3> { MakeSnapshot }
-bind $graph <Shift-ButtonPress-3> { 
-    %W postscript output demo2.ps 
-    update
-    %W snap -format emf demo2.emf
-}
-
-$graph configure -title "This is the \nTitle\n"
-set unique 0
-proc MakeSnapshot {} {
-    update idletasks
-    global unique graph
-    set top ".snapshot[incr unique]"
-    set im [image create photo]
-    $graph snap $im 210 150
-
-    toplevel $top
-    wm title $top "Snapshot \#$unique of \"[$graph cget -title]\""
-    label $top.lab -image $im 
-    button $top.but -text "Dismiss" -command "DestroySnapshot $top"
-    blt::table $top $top.lab
-    blt::table $top $top.but -pady 4 
-    focus $top.but
-}
-
-proc DestroySnapshot { win } {
-    set im [$win.lab cget -image]
-    image delete $im
-    destroy $win
-    exit
-}
-
-if { $tcl_platform(platform) == "windows" } {
-    if 0 {
-        set name [lindex [blt::printer names] 0]
-        set printer {Lexmark Optra E310}
-	blt::printer open $printer
-	blt::printer getattrs $printer attrs
-	puts $attrs(Orientation)
-	set attrs(Orientation) Landscape
-	set attrs(DocumentName) "This is my print job"
-	blt::printer setattrs $printer attrs
-	blt::printer getattrs $printer attrs
-	puts $attrs(Orientation)
-	after 5000 {
-	    $graph print2 $printer
-	    blt::printer close $printer
-	}
-    } else {
-	after 5000 {
-	 #   $graph print2 
-	}
-    }	
-    if 1 {
-	after 2000 {$graph snap -format emf CLIPBOARD}
-    }
-}
diff --git a/blt3.0/demos/graph3.tcl b/blt3.0/demos/graph3.tcl
deleted file mode 100755
index 8943a4a..0000000
--- a/blt3.0/demos/graph3.tcl
+++ /dev/null
@@ -1,75 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-source scripts/stipples.tcl
-puts stderr "class=[winfo class .]"
-set visual [winfo screenvisual .]
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *Graph3.Button.Background	red
-    option add *TextMarker.Foreground	black
-    option add *TextMarker.Background	yellow
-    option add *LineMarker.Foreground	black
-    option add *LineMarker.Background	yellow
-    option add *PolyMarker.Fill		yellow2
-    option add *PolyMarker.Outline	""
-    option add *PolyMarker.Stipple	fdiagonal1
-    option add *activeLine.Color	red4
-    option add *activeLine.Fill		red2
-    option add *Element.Color		purple
-}
-
-image create picture bgTexture -file ./images/chalk.gif
-
-option add *Tile		bgTexture
-option add *Button.Tile		""
-option add *Text.font			{ "Serif" 12 }
-option add *header.font			{ "Serif" 12 }
-option add *footer.font			{ "Serif" 12 }
-option add *HighlightThickness		0
-option add *plotBorderWidth 		0
-option add *plotPadX 		0
-option add *plotPadY 		0
-set graph [blt::graph .g]
-source scripts/graph3.tcl
-
-
-set text {
-This is an example of a bitmap marker.  Try zooming in on 
-a region by clicking the left button, moving the pointer, 
-and clicking again.  Notice that the bitmap scales too. 
-To restore the last view, click on the right button.  
-}
-blt::htext .header -text $text
-
-blt::htext .footer -text {Hit the %%
-    set im [image create picture -file ./images/stopsign.gif]
-    button $htext(widget).quit -image $im -command { exit }
-    $htext(widget) append $htext(widget).quit 
-%% button when you've seen enough. %%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo 
-%%}
-
-blt::table . \
-    .header 0,0 -fill x -padx 4 -pady 4\
-    $graph 1,0 -fill both  \
-    .footer 2,0 -fill x -padx 4 -pady 4
-
-blt::table configure . r0 r2 -resize none
-
-source scripts/ps.tcl
-
-bind $graph <Shift-ButtonPress-1> { 
-    MakePsLayout $graph
-}
-
-if 0 {
-set printer [printer open [lindex [printer names] 0]]
-after 2000 {
-	$graph print2 $printer
-}
-}
-after 2000 {
-    PsDialog $graph
-}
diff --git a/blt3.0/demos/graph4.tcl b/blt3.0/demos/graph4.tcl
deleted file mode 100755
index f6be0bd..0000000
--- a/blt3.0/demos/graph4.tcl
+++ /dev/null
@@ -1,2279 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set tcl_precision 15 
-
-set graph .graph
-image create picture bgTexture -file ./images/chalk.gif
-
-option add *default			normal
-option add *Button.tile			bgTexture
-
-#option add *Htext.font			-*-times*-bold-r-*-*-18-*-*
-#option add *Text.font			"Serif 18"
-option add *header.font			"{Times New Roman} 12"
-#option add *footer.font			-*-times*-medium-r-*-*-18-*-*
-option add *Graph.relief		raised
-#option add *Graph.borderWidth		2
-option add *Graph.height		5i
-option add *Graph.plotBackground	black
-option add *Graph.width			7i
-option add *Graph.tile			bgTexture
-option add *Graph.halo			0
-
-option add *Graph.title			"s27.out"
-
-option add *Axis.titleColor		red2
-option add *x.title			"Time"
-option add *y.title			"Signals"
-
-option add *Crosshairs.Color		white
-
-option add *activeLine.Fill		navyblue
-option add *activeLine.LineWidth	2
-option add *Element.ScaleSymbols	yes
-option add *Element.Smooth		natural
-
-option add *Symbol			square
-option add *Element.LineWidth		1
-option add *Pen.LineWidth		1
-option add *Pixels			1
-
-option add *Grid.color			grey50
-option add *Grid.dashes			"2 4"
-option add *Grid.hide			no
-
-option add *Legend.ActiveRelief		sunken
-option add *Legend.Position		right
-option add *Legend.Relief		flat
-option add *Legend.Pad			0
-option add *Legend.hide			no
-
-option add *LineMarker.Dashes		5
-option add *LineMarker.Foreground	white
-option add *zoomOutline.outline		yellow
-
-option add *TextMarker.Background	{}
-option add *TextMarker.Foreground	white
-
-blt::vector create x -variable ""
-for { set i 1 } { $i <= 39 } { incr i } {
-    blt::vector create "v$i" -variable ""
-}
-
-x set {
-    0 1e-10 2e-10 3e-10 4e-10 5e-10 6e-10 7e-10 8e-10 9e-10 
-    1e-09 1.1e-09 1.2e-09 1.3e-09 1.4e-09 1.5e-09 1.6e-09 1.7e-09 
-    1.8e-09 1.9e-09 2e-09 2.1e-09 2.2e-09 2.3e-09 2.4e-09 2.5e-09 
-    2.6e-09 2.7e-09 2.8e-09 2.9e-09 3e-09 3.1e-09 3.2e-09 3.3e-09 
-    3.4e-09 3.5e-09 3.6e-09 3.7e-09 3.8e-09 3.9e-09 4e-09 4.1e-09 
-    4.2e-09 4.3e-09 4.4e-09 4.5e-09 4.6e-09 4.7e-09 4.8e-09 
-    4.9e-09 5e-09 5.1e-09 5.2e-09 5.3e-09 5.4e-09 5.5e-09 5.6e-09 
-    5.7e-09 5.8e-09 5.9e-09 6e-09 6.1e-09 6.2e-09 6.3e-09 6.4e-09 
-    6.5e-09 6.6e-09 6.7e-09 6.8e-09 6.9e-09 7e-09 7.1e-09 7.2e-09 
-    7.3e-09 7.4e-09 7.5e-09 7.6e-09 7.7e-09 7.8e-09 7.9e-09 
-    8e-09 8.1e-09 8.2e-09 8.3e-09 8.4e-09 8.5e-09 8.6e-09 8.7e-09 
-    8.8e-09 8.9e-09 9e-09 9.1e-09 9.2e-09 9.3e-09 9.4e-09 9.5e-09 
-    9.6e-09 9.7e-09 9.8e-09 9.9e-09 1e-08 1.01e-08 1.02e-08 
-    1.03e-08 1.04e-08 1.05e-08 1.06e-08 1.07e-08 1.08e-08 1.09e-08 
-    1.1e-08 1.11e-08 1.12e-08 1.13e-08 1.14e-08 1.15e-08 1.16e-08 
-    1.17e-08 1.18e-08 1.19e-08 1.2e-08 1.21e-08 1.22e-08 1.23e-08 
-    1.24e-08 1.25e-08 1.26e-08 1.27e-08 1.28e-08 1.29e-08 1.3e-08 
-    1.31e-08 1.32e-08 1.33e-08 1.34e-08 1.35e-08 1.36e-08 1.37e-08 
-    1.38e-08 1.39e-08 1.4e-08 1.41e-08 1.42e-08 1.43e-08 1.44e-08 
-    1.45e-08 1.46e-08 1.47e-08 1.48e-08 1.49e-08 1.5e-08 1.51e-08 
-    1.52e-08 1.53e-08 1.54e-08 1.55e-08 1.56e-08 1.57e-08 1.58e-08 
-    1.59e-08 1.6e-08 1.61e-08 1.62e-08 1.63e-08 1.64e-08 1.65e-08 
-    1.66e-08 1.67e-08 1.68e-08 1.69e-08 1.7e-08 1.71e-08 1.72e-08 
-    1.73e-08 1.74e-08 1.75e-08 1.76e-08 1.77e-08 1.78e-08 1.79e-08 
-    1.8e-08 1.81e-08 1.82e-08 1.83e-08 1.84e-08 1.85e-08 1.86e-08 
-    1.87e-08 1.88e-08 1.89e-08 1.9e-08 1.91e-08 1.92e-08 1.93e-08 
-    1.94e-08 1.95e-08 1.96e-08 1.97e-08 1.98e-08 1.99e-08 2e-08 
-    2.01e-08 2.02e-08 2.03e-08 2.04e-08 2.05e-08 2.06e-08 2.07e-08 
-    2.08e-08 2.09e-08 2.1e-08 2.11e-08 2.12e-08 2.13e-08 2.14e-08 
-    2.15e-08 2.16e-08 2.17e-08 2.18e-08 2.19e-08 2.2e-08 2.21e-08 
-    2.22e-08 2.23e-08 2.24e-08 2.25e-08 2.26e-08 2.27e-08 2.28e-08 
-    2.29e-08 2.3e-08 2.31e-08 2.32e-08 2.33e-08 2.34e-08 2.35e-08 
-    2.36e-08 2.37e-08 2.38e-08 2.39e-08 2.4e-08 2.41e-08 2.42e-08 
-    2.43e-08 2.44e-08 2.45e-08 2.46e-08 2.47e-08 2.48e-08 2.49e-08 
-    2.5e-08 2.51e-08 2.52e-08 2.53e-08 2.54e-08 2.55e-08 2.56e-08 
-    2.57e-08 2.58e-08 2.59e-08 2.6e-08 2.61e-08 2.62e-08 2.63e-08 
-    2.64e-08 2.65e-08 2.66e-08 2.67e-08 2.68e-08 2.69e-08 2.7e-08 
-    2.71e-08 2.72e-08 2.73e-08 2.74e-08 2.75e-08 2.76e-08 2.77e-08 
-    2.78e-08 2.79e-08 2.8e-08 2.81e-08 2.82e-08 2.83e-08 2.84e-08 
-    2.85e-08 2.86e-08 2.87e-08 2.88e-08 2.89e-08 2.9e-08 2.91e-08 
-    2.92e-08 2.93e-08 2.94e-08 2.95e-08 2.96e-08 2.97e-08 2.98e-08 
-    2.99e-08 3e-08 3.01e-08 3.02e-08 3.03e-08 3.04e-08 3.05e-08 
-    3.06e-08 3.07e-08 3.08e-08 3.09e-08 3.1e-08 3.11e-08 3.12e-08 
-    3.13e-08 3.14e-08 3.15e-08 3.16e-08 3.17e-08 3.18e-08 3.19e-08 
-    3.2e-08 3.21e-08 3.22e-08 3.23e-08 3.24e-08 3.25e-08 3.26e-08 
-    3.27e-08 3.28e-08 3.29e-08 3.3e-08 3.31e-08 3.32e-08 3.33e-08 
-    3.34e-08 3.35e-08 3.36e-08 3.37e-08 3.38e-08 3.39e-08 3.4e-08 
-    3.41e-08 3.42e-08 3.43e-08 3.44e-08 3.45e-08 3.46e-08 3.47e-08 
-    3.48e-08 3.49e-08 3.5e-08 3.51e-08 3.52e-08 3.53e-08 3.54e-08 
-    3.55e-08 3.56e-08 3.57e-08 3.58e-08 3.59e-08 3.6e-08 
-}
-v1 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-
-v2 set {
-    0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 
-    5.32907e-15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 
-    5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 
-}
-v3 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 
-}
-v4 set {
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-v5 set {
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-v6 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 
-}
-v7 set {
-    5 5.16904 4.84159 3.34542 0.317102 0.103304 0.0275721 0.0221534 
-    0.017689 0.0142639 0.0113974 0.00918238 0.00742541 0.00616602 
-    0.00481195 0.00397049 -0.0659889 -0.025671 0.165495 0.986891 
-    3.05229 4.55511 4.91611 4.98192 4.99428 4.99833 4.99095 
-    4.97295 4.95493 4.93428 4.90723 4.94799 4.98584 4.99566 
-    4.99813 4.99907 4.99947 4.99965 4.99976 4.99984 4.99989 
-    4.99992 4.99994 4.99996 4.99998 5.00002 5.00006 5.00002 
-    4.99996 4.99994 4.99999 5.00003 5.00002 5 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99996 4.99997 4.99997 4.99998 
-    4.99998 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.16575 
-    4.69986 2.43862 0.0230224 0.035229 -0.0210607 -0.0292766 
-    -0.0172693 -0.00271479 -0.000912251 -0.000349106 -0.000116866 
-    -4.24733e-05 -1.39536e-05 -3.01179e-05 -0.0657192 -0.0204835 
-    0.183378 1.07181 3.118 4.46472 4.84158 4.94795 4.98173 4.99236 
-    4.99762 5.01939 5.0433 5.05332 5.04959 5.03955 5.02851 5.02052 
-    5.01422 5.00965 5.00631 5.00405 5.00248 5.00083 5.00012 
-    5.00209 5.00387 5.00347 4.99917 4.99213 4.98411 4.97521 
-    4.96332 4.94601 4.9304 4.94633 4.97936 4.99264 4.99685 4.99857 
-    4.99925 4.99954 4.9997 4.99973 4.9997 4.99973 4.99979 4.99983 
-    4.99986 4.99988 4.9999 4.9999 4.99992 4.99993 4.99994 4.99995 
-    4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5.14242 4.76101 3.16003 0.299374 
-    0.0645506 -0.000498424 -2.45108e-05 -2.27986e-05 -5.24401e-05 
-    -4.9884e-05 -4.92491e-05 -2.93354e-05 -3.21402e-05 -2.11851e-05 
-    -3.37925e-05 -0.0657892 -0.020563 0.182582 1.06058 3.12484 
-    4.46552 4.84146 4.95102 4.98556 4.99472 4.99806 4.99909 
-    4.99955 4.99976 4.99994 4.99992 5.00029 4.99967 4.99849 
-    4.99736 4.99884 5.00099 5.00377 5.00215 4.99994 4.99893 
-    4.99788 4.99862 5.00055 5.00134 5.00127 5.00073 5.00039 
-    5.00018 5.00006 5.00001 4.99985 5.00026 5.00018 5.00003 
-    4.99981 4.99985 4.99987 4.99985 4.99982 4.99982 4.99982 
-    4.99983 4.99985 4.99987 4.99989 4.99991 4.99992 4.99994 
-    4.99995 4.99995 4.99994 4.99994 4.99996 4.99999 5.00002 
-    5.00008 5.00009 5.00006 5.00001 5 4.99999 4.99998 4.99997 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 
-    4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 4.99998 
-    4.99998 
-}
-v8 set {
-    5 5.03758 5.04711 4.96911 4.20882 3.96295 4.01117 4.15521 
-    4.2967 4.42274 4.5295 4.6176 4.69014 4.74831 4.7966 4.83537 
-    4.80526 4.787 4.79295 4.88588 5.08978 5.15615 5.10778 5.07718 
-    5.06652 5.08225 4.9744 4.52977 3.77452 2.69426 1.15294 0.245509 
-    0.0981544 0.0567527 0.0367487 0.0252578 0.0180599 0.0133837 
-    0.0101497 0.0078616 0.00620186 0.00499056 0.0041027 0.00344223 
-    0.00295808 0.00260089 0.00229887 0.00200817 0.00176397 0.00160116 
-    0.00147381 0.00134645 0.00125029 0.00116043 0.00107371 0.00101981 
-    0.000965921 0.000912028 0.000858135 0.000804242 0.000761669 
-    0.00072672 0.000691771 0.000656823 0.000621874 0.000588722 
-    0.00057041 0.000552098 0.000533785 0.000515473 0.000497162 
-    0.00047885 0.000460537 0.000442226 0.000423914 0.000405601 
-    0.000388399 0.000378694 0.000368989 0.000359284 0.00034958 
-    0.000339875 0.00033017 0.000320465 0.00031076 0.000301055 
-    0.00029135 0.000282207 0.000276247 0.000270287 0.000264327 
-    0.000258367 0.000252407 0.000246447 0.000240487 0.000234527 
-    0.000228567 0.000222607 0.000217086 0.000213696 0.000210307 
-    0.000206918 0.000203528 0.000200139 0.00019675 0.00019336 
-    0.000189971 0.000186582 0.000183192 0.000179803 0.000176414 
-    0.000173025 0.000169635 0.000166246 0.000162857 0.000159467 
-    0.000156078 0.000152689 0.000149299 0.00014591 0.00014255 
-    0.0316021 0.163272 0.348732 0.603651 0.35745 0.135965 0.0707354 
-    0.0314595 0.0201047 0.00994945 0.00389601 0.00138839 0.00060778 
-    0.000329648 0.000492396 -0.0732035 -0.0844077 -0.0789062 
-    -0.0390837 0.0197559 0.0183094 -0.00180099 -0.0189565 -0.0424144 
-    -0.0735904 -0.0892423 0.285039 1.13702 2.10809 2.95826 3.60164 
-    4.0435 4.35771 4.57254 4.71769 4.81329 4.87534 4.91487 4.94264 
-    4.97375 5.01526 5.06517 5.10154 5.06259 4.89005 4.5787 4.12226 
-    3.46151 2.49023 1.2586 0.32725 0.116753 0.0701865 0.0455509 
-    0.0286914 0.0178176 0.0117599 0.00902715 0.00760583 0.00637745 
-    0.00543811 0.00439377 0.00352448 0.0030151 0.00285771 0.002465 
-    0.00203114 0.00173004 0.0014839 0.00125177 0.00105327 0.000894905 
-    0.000766372 0.000658894 0.000569105 0.000492114 0.000427938 
-    0.000370217 0.000314758 0.000266569 0.000233726 0.000209048 
-    0.000191957 0.000177169 0.000166604 0.000161 0.000157314 
-    0.000143828 0.000130342 0.000116857 0.000103371 8.98855e-05 
-    7.63998e-05 6.29141e-05 5.76583e-05 5.30027e-05 4.8347e-05 
-    4.36913e-05 3.90357e-05 3.438e-05 2.97243e-05 2.72507e-05 
-    2.59083e-05 2.45659e-05 2.32235e-05 2.18811e-05 2.05387e-05 
-    1.91963e-05 1.78539e-05 1.65115e-05 1.51691e-05 1.38267e-05 
-    1.24843e-05 1.11419e-05 9.79954e-06 8.51574e-06 7.69807e-06 
-    6.8804e-06 6.06273e-06 5.24506e-06 0.0287318 0.0317111 -0.0320087 
-    -0.103609 0.0369639 0.0121128 0.00961197 0.00934971 0.00820853 
-    0.00699769 0.00607002 0.00535541 0.00476552 0.00427601 0.00376357 
-    -0.073012 -0.0866964 -0.0809538 -0.038005 0.0277001 0.0188906 
-    0.00614597 0.00373629 0.00489787 0.0146573 0.0191052 0.0151708 
-    0.0124224 0.0105859 0.00879272 0.00729464 0.0070047 0.00449575 
-    -0.00626652 -0.0252417 -0.0147287 0.022538 0.0822905 0.0947372 
-    0.0657516 0.0445506 0.0316753 0.0220971 0.0158101 0.0140971 
-    0.0161498 0.0139876 0.0122447 0.0106994 0.009397 0.00822236 
-    0.00686509 0.00797431 0.00751269 0.00671173 0.00595243 0.00524633 
-    0.00459528 0.00401688 0.00350109 0.00303954 0.00260569 0.00222792 
-    0.00191033 0.00163917 0.00140949 0.00121464 0.0010471 0.000900638 
-    0.000768847 0.000645236 0.000524807 0.000460275 0.000442237 
-    0.000446775 0.000397026 0.000301585 0.000228994 0.000190894 
-    0.000166569 0.000152261 0.000137953 0.000123644 0.000109336 
-    9.50281e-05 8.56557e-05 7.78437e-05 7.00318e-05 6.22198e-05 
-    5.44079e-05 4.87539e-05 4.57761e-05 4.27982e-05 3.98203e-05 
-    3.68425e-05 3.38646e-05 3.08868e-05 2.79089e-05 2.4931e-05 
-    2.19532e-05 1.89753e-05 1.75244e-05 1.64095e-05 1.52946e-05 
-    1.41797e-05 1.30648e-05 1.19499e-05 1.0835e-05 9.72011e-06 
-    8.60521e-06 7.4903e-06 6.5117e-06 6.10334e-06 5.69497e-06 
-    5.2866e-06 4.87824e-06 4.46987e-06 4.06151e-06 3.65314e-06 
-    3.24477e-06 
-}
-
-v9 set {
-    1.86175 1.99708 2.07867 2.01211 2.43309 3.27194 3.63896 
-    3.90426 4.11074 4.27932 4.41496 4.52543 4.61491 4.68862 
-    4.7479 4.79666 4.72895 4.68886 4.70354 4.81353 5.01568 5.14184 
-    5.10482 5.07362 5.05143 5.03638 5.02323 5.01465 5.00853 
-    5.00383 4.99985 5.00454 5.00652 5.00546 5.00411 5.003 5.00214 
-    5.00151 5.00106 5.00073 5.0005 5.00034 5.00023 5.00015 5.0001 
-    5.00005 5 5.00001 5.00005 5.00005 5.00003 5 4.99998 4.99996 
-    4.99994 4.99995 4.99997 4.99998 5 5.00001 5.00002 5.00002 
-    5.00003 5.00003 5.00003 5.00003 5.00003 5.00003 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.17392 4.94828 3.78491 
-    1.52079 0.608874 0.244031 0.127087 0.0552995 0.0361032 0.0169025 
-    0.006364 0.00217624 0.000921391 0.000457305 0.000786754 
-    -0.120016 -0.148054 -0.15898 -0.0801463 0.16463 0.174017 
-    0.0799249 0.0318788 0.0129696 0.00483397 0.0025677 0.0042079 
-    0.00350003 0.00178404 -8.72902e-05 -0.00128497 -0.00142213 
-    -0.00130018 -0.00106874 -0.000789207 -0.000824335 -0.00104518 
-    -0.00136799 -0.004366 -0.0102621 -0.0109254 -0.00649259 
-    -0.00194842 0.00029793 0.00148673 0.00221085 0.00228291 
-    0.00185261 0.00139687 0.00148183 0.00562266 0.00844119 0.00754627 
-    0.00657396 0.00591212 0.00539269 0.0049282 0.00448417 0.0040572 
-    0.00363719 0.00320392 0.00279607 0.00243938 0.00211505 0.00182302 
-    0.00156254 0.0013341 0.00113834 0.000971865 0.00082776 0.000706193 
-    0.000602499 0.000515059 0.000441401 0.00037897 0.000325459 
-    0.00028083 0.000242096 0.000207274 0.000176444 0.000150372 
-    0.000126407 0.000103373 9.05522e-05 8.53555e-05 8.63685e-05 
-    9.02593e-05 8.37346e-05 7.72099e-05 7.06852e-05 6.41605e-05 
-    5.76358e-05 5.11112e-05 4.45865e-05 4.08176e-05 3.72497e-05 
-    3.36818e-05 3.01138e-05 2.65459e-05 2.2978e-05 1.94101e-05 
-    1.76154e-05 1.67399e-05 1.58645e-05 1.4989e-05 1.41136e-05 
-    1.32381e-05 1.23626e-05 1.14872e-05 1.06117e-05 9.73629e-06 
-    8.86083e-06 7.98538e-06 7.10993e-06 6.23447e-06 5.44363e-06 
-    5.32578e-06 5.20792e-06 5.09007e-06 4.97222e-06 0.0784323 
-    0.0474527 -0.0764232 -0.151146 0.0615785 0.0144489 0.00974161 
-    0.00947176 0.00849005 0.00728201 0.00630581 0.00554032 0.00487809 
-    0.00441504 0.00384139 -0.118943 -0.149894 -0.161173 -0.0825299 
-    0.171686 0.176912 0.0816085 0.0335236 0.013791 0.0056976 
-    0.00238833 0.00105348 0.000526199 0.00025969 0.000396026 
-    0.000837835 0.00170131 0.00196699 -0.000553314 -0.0061621 
-    -0.0111895 -0.0142698 -0.0124608 -0.00795847 -0.00467822 
-    -0.0043058 -0.00874449 -0.0118584 -0.00871386 -0.00377892 
-    1.95244e-05 0.00218952 0.00325486 0.00386497 0.00422837 
-    0.00446883 0.00447065 0.00486647 0.00547838 0.00565398 0.00559092 
-    0.00538752 0.00507015 0.00466305 0.00420756 0.00373465 0.00328404 
-    0.00287059 0.00250057 0.00216124 0.00184861 0.00156815 0.00134624 
-    0.00117857 0.00103412 0.0008948 0.000761012 0.000619853 
-    0.000462614 0.000319965 0.000287666 0.000356415 0.000379946 
-    0.000339183 0.00027972 0.000252982 0.000226244 0.000199507 
-    0.000172769 0.000146031 0.000130097 0.000117578 0.000105059 
-    9.25401e-05 8.00213e-05 7.11204e-05 6.67061e-05 6.22918e-05 
-    5.78775e-05 5.34632e-05 4.90489e-05 4.46346e-05 4.02203e-05 
-    3.5806e-05 3.13916e-05 2.69773e-05 2.4827e-05 2.31747e-05 
-    2.15225e-05 1.98702e-05 1.8218e-05 1.65658e-05 1.49135e-05 
-    1.32613e-05 1.1609e-05 9.95678e-06 8.50108e-06 7.86765e-06 
-    7.23422e-06 6.60079e-06 5.96736e-06 5.33393e-06 4.7005e-06 
-    4.06707e-06 3.43363e-06 
-}
-v10 set {
-    1.86175 1.99308 2.16619 2.46661 3.09359 3.76864 4.31299 
-    4.65564 4.83425 4.92153 4.96157 4.98063 4.98649 4.99039 
-    4.9945 4.9972 4.96206 4.89882 4.83865 4.83202 4.91016 5.04479 
-    5.06078 5.04827 5.03474 5.0246 5.01639 5.00996 5.00569 5.00239 
-    5.00043 5.00296 5.00437 5.00382 5.00287 5.00208 5.00148 
-    5.00104 5.00073 5.0005 5.00034 5.00023 5.00016 5.00011 5.00008 
-    5.00007 5.00007 5.00004 5 4.99998 4.99998 4.99997 4.99998 
-    4.99999 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5.10081 
-    5.10949 4.98359 5.00733 5.15145 4.37298 2.36126 0.470759 
-    0.0577238 0.0115884 0.00262611 0.000671499 0.000389038 0.000291291 
-    0.000317347 -0.0167823 -0.0158344 -0.0140559 0.0104849 0.0865874 
-    0.107813 0.0524688 0.0214369 0.00876443 0.00341595 0.00170778 
-    0.00259042 0.0022241 0.00118519 1.10217e-06 -0.000784506 
-    -0.000948169 -0.000856256 -0.000696719 -0.000485987 -0.000724787 
-    -0.000981491 -0.001454 -0.00552498 -0.0114992 -0.0105266 
-    -0.00543527 -0.000982798 0.00127356 0.00224212 0.00275439 
-    0.00281098 0.0025471 0.00230368 0.00222576 0.00485522 0.00729453 
-    0.00691796 0.0062615 0.00573987 0.0052688 0.00481185 0.00436934 
-    0.00394326 0.00352712 0.00309978 0.00270038 0.00235335 0.00203742 
-    0.00175256 0.00150067 0.00128126 0.00109323 0.000933619 
-    0.000795113 0.000678182 0.00057843 0.000494345 0.000423609 
-    0.000363821 0.000312766 0.000269856 0.000232389 0.000198382 
-    0.000168126 0.00014267 0.000119293 9.69034e-05 8.5669e-05 
-    8.26828e-05 8.64066e-05 9.26665e-05 8.5454e-05 7.82416e-05 
-    7.10291e-05 6.38167e-05 5.66043e-05 4.93918e-05 4.21794e-05 
-    3.86073e-05 3.53007e-05 3.19941e-05 2.86876e-05 2.5381e-05 
-    2.20744e-05 1.87678e-05 1.70933e-05 1.62648e-05 1.54363e-05 
-    1.46079e-05 1.37794e-05 1.2951e-05 1.21225e-05 1.12941e-05 
-    1.04656e-05 9.63716e-06 8.80871e-06 7.98026e-06 7.1518e-06 
-    6.32335e-06 5.5374e-06 5.08959e-06 4.64178e-06 4.19397e-06 
-    3.74616e-06 0.0438026 0.0242078 -0.0602019 -0.0840866 0.00148461 
-    -0.00292489 0.000442098 0.00219489 0.00281478 0.00290756 
-    0.00277945 0.00263896 0.00240099 0.00223283 0.001947 -0.0153629 
-    -0.0148815 -0.0128673 0.0126017 0.0905161 0.11051 0.0538958 
-    0.022562 0.00935726 0.00397422 0.00172534 0.000790207 0.000416322 
-    0.000191632 0.000469721 0.0009779 0.00192566 0.00200688 
-    -0.0016502 -0.00733932 -0.0128113 -0.0147608 -0.0115456 
-    -0.00668995 -0.00401368 -0.00463908 -0.0101197 -0.0118993 
-    -0.0076276 -0.00262656 0.000813059 0.00264455 0.00350796 
-    0.00399494 0.0043049 0.00451658 0.00444739 0.00503842 0.00559516 
-    0.00568213 0.00556459 0.0053176 0.00496654 0.00454337 0.00408592 
-    0.00362171 0.00317793 0.00277001 0.00240394 0.00207009 0.00176575 
-    0.00149725 0.00129045 0.00114257 0.00101135 0.000871672 
-    0.000723764 0.000580438 0.000427507 0.000296956 0.000281834 
-    0.000376628 0.000412266 0.000367547 0.000295305 0.000264513 
-    0.000233721 0.000202929 0.000172137 0.000141345 0.000124721 
-    0.000112577 0.000100433 8.82893e-05 7.61453e-05 6.75517e-05 
-    6.33609e-05 5.91701e-05 5.49792e-05 5.07884e-05 4.65976e-05 
-    4.24067e-05 3.82159e-05 3.40251e-05 2.98342e-05 2.56434e-05 
-    2.36401e-05 2.21181e-05 2.05961e-05 1.90741e-05 1.75521e-05 
-    1.60301e-05 1.45081e-05 1.29861e-05 1.14641e-05 9.94208e-06 
-    8.59252e-06 7.96439e-06 7.33626e-06 6.70813e-06 6.07999e-06 
-    5.45186e-06 4.82373e-06 4.1956e-06 3.56747e-06 
-}
-v11 set {
-    1.86175 1.73419 1.42874 1.04055 0.943004 0.268275 0.0826455 
-    0.0388346 0.0214104 0.0135431 0.00961322 0.00712846 0.00588262 
-    0.00432397 0.00377774 0.00270134 -0.00393731 -0.00542187 
-    -0.00126596 0.0113777 0.0134522 0.00477056 -0.00211067 -0.00229253 
-    -0.00173355 -0.00122404 -0.00113426 -0.000744931 -0.000520112 
-    -0.000410048 -0.000220439 0.000508104 5.15856e-05 -0.000112593 
-    -0.000118917 -9.57394e-05 -7.15727e-05 -5.11847e-05 -3.58275e-05 
-    -2.47166e-05 -1.68866e-05 -1.14082e-05 -7.66646e-06 -5.12139e-06 
-    -3.63426e-06 -3.01815e-06 -2.64862e-06 -1.4947e-06 -1.91403e-07 
-    -2.5763e-08 -7.73699e-07 -1.52164e-06 -1.07268e-06 -3.81696e-07 
-    2.6727e-07 4.75489e-07 6.83708e-07 8.91926e-07 1.10014e-06 
-    1.30836e-06 1.2482e-06 1.00726e-06 7.66311e-07 5.25364e-07 
-    2.84417e-07 6.27857e-08 7.43904e-10 -6.12979e-08 -1.2334e-07 
-    -1.85382e-07 -2.47423e-07 -3.09465e-07 -3.71507e-07 -4.33549e-07 
-    -4.95591e-07 -5.57633e-07 -6.04571e-07 -5.4944e-07 -4.9431e-07 
-    -4.3918e-07 -3.84049e-07 -3.28919e-07 -2.73789e-07 -2.18659e-07 
-    -1.63528e-07 -1.08398e-07 -5.32678e-08 1.062e-09 5.08502e-08 
-    1.00638e-07 1.50427e-07 2.00215e-07 2.50003e-07 2.99791e-07 
-    3.4958e-07 3.99368e-07 4.49156e-07 4.98944e-07 5.34512e-07 
-    5.01032e-07 4.67553e-07 4.34073e-07 4.00593e-07 3.67113e-07 
-    3.33633e-07 3.00153e-07 2.66674e-07 2.33194e-07 1.99714e-07 
-    1.66234e-07 1.32754e-07 9.92744e-08 6.57945e-08 3.23147e-08 
-    -1.16513e-09 -3.4645e-08 -6.81248e-08 -1.01605e-07 -1.35084e-07 
-    -1.68564e-07 -2.18729e-07 0.0114926 -0.0245378 -0.111828 
-    0.0964775 1.61491 3.22668 4.22041 4.54492 4.82845 4.94868 
-    4.98588 4.99609 4.9981 4.99908 4.99788 4.98395 4.99294 4.99724 
-    5.01939 5.0471 5.00902 4.98194 4.98496 4.99188 4.99623 4.99862 
-    5.00025 4.99974 4.99953 4.99946 4.99958 5.00012 4.99997 
-    4.99992 4.99988 4.99985 4.9998 4.9997 4.9988 4.99806 4.99982 
-    5.00143 5.00159 5.00098 5.00053 5.00028 5.00007 4.99977 
-    4.99992 5.00005 5.00133 5.0009 4.99993 4.99972 4.99975 4.9998 
-    4.99982 4.99983 4.99983 4.99983 4.99983 4.99984 4.99986 
-    4.99987 4.99989 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5.01457 4.99482 4.96561 4.99326 
-    5.03452 5.00424 5.00101 5.00045 5.00004 4.99965 4.99997 
-    4.99994 4.99958 4.99999 4.99936 4.9839 4.99248 4.99717 5.01976 
-    5.04869 5.0087 4.98143 4.98488 4.99199 4.99622 4.9983 4.99928 
-    4.99971 4.99986 5.00031 5.00022 5.00035 5.0001 4.99884 4.99811 
-    4.99803 4.99887 5.00078 5.00151 5.00116 5.00007 4.99843 
-    4.99915 5.00107 5.00168 5.00141 5.00092 5.00055 5.0003 5.00016 
-    5.0001 5.00001 5.00016 5.0002 5.00009 4.99993 4.99975 4.99984 
-    4.99991 4.99991 4.99982 4.99974 4.99974 4.99985 4.99995 
-    4.99999 4.99998 5.00004 5.00013 5.00015 5.00007 4.99988 
-    4.99982 4.99985 4.99995 5.00006 5.0002 5.00025 5.0002 5.00009 
-    5.00006 5.00004 5.00002 5 4.99998 4.99997 4.99998 4.99998 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99998 
-}
-v12 set {
-    5 5.16975 4.78685 2.94241 0.126698 0.0487004 -0.00422591 
-    -0.00130689 -0.000486756 -0.000195875 -0.000108988 -6.66736e-05 
-    -7.26005e-05 -5.63608e-05 -3.81859e-05 -2.123e-05 -0.0646846 
-    -0.0184474 0.182248 1.06731 3.10988 4.46133 4.84133 4.95113 
-    4.98364 4.99455 4.99694 4.99727 4.9994 4.99975 5.0001 5.00132 
-    5.00089 5.00039 5.00019 5.00011 5.00006 5.00005 5.00004 
-    5.00001 4.99992 4.99992 5.00002 5.00013 5.00017 5.00009 
-    4.99992 4.99991 4.99994 4.99996 4.99998 4.99999 5.00001 
-    5.00004 5.00006 5.00005 5.00004 5.00003 5.00002 5.00001 
-    5 4.99999 4.99999 4.99998 4.99998 4.99997 4.99997 4.99998 
-    4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5.14699 4.78074 
-    3.19424 0.305663 0.0611255 -0.00179951 -0.0012032 0.000405978 
-    0.000989399 0.000445194 0.000191447 8.30476e-05 3.96236e-05 
-    1.91866e-05 1.70665e-05 -0.0655239 -0.0210234 0.1827 1.06848 
-    3.11554 4.46518 4.84212 4.94853 4.98244 4.99434 4.9997 5.00081 
-    5.00009 4.99972 4.99985 4.99974 4.9995 4.99949 4.99958 4.99973 
-    4.99948 4.99914 4.99874 4.99946 5.00309 5.0091 5.01576 5.01835 
-    5.01852 5.0176 5.01625 5.01479 5.01345 5.01264 5.011 5.01092 
-    5.01344 5.01363 5.01289 5.01184 5.01071 5.00956 5.00848 
-    5.00751 5.00663 5.00577 5.00497 5.00427 5.00365 5.0031 5.00264 
-    5.00224 5.00191 5.00163 5.00138 5.00117 5.00099 5.00083 
-    5.00071 5.00061 5.00053 5.00045 5.00037 5.00029 5.00022 
-    5.00019 5.0002 5.00023 5.00024 5.00023 5.00023 5.00022 5.0002 
-    5.00018 5.00016 5.00014 5.00011 5.00009 5.00007 5.00006 
-    5.00005 5.00005 5.00004 5.00003 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.14298 4.79809 3.32704 
-    0.498385 0.105773 0.0160646 0.0319912 0.0299434 0.0240102 
-    0.0185844 0.0130411 0.0106532 0.00864871 0.00744519 0.00660887 
-    -0.0612913 -0.0203719 0.174998 0.991787 3.06292 4.60005 
-    4.93058 4.98917 5.00033 4.9999 4.99909 4.9966 4.9955 4.99488 
-    4.99374 4.9943 5.00131 5.00506 4.99311 4.96288 4.93567 4.92439 
-    4.94236 4.9732 4.98864 4.99458 5.00031 5.00694 5.01525 5.01945 
-    5.01998 5.01953 5.01874 5.01766 5.0164 5.01509 5.01326 5.01423 
-    5.01455 5.01361 5.01245 5.01122 5.01002 5.00888 5.00783 
-    5.00687 5.00596 5.00514 5.00442 5.00379 5.00325 5.00279 
-    5.0024 5.00208 5.0018 5.00153 5.00126 5.00107 5.00094 5.00085 
-    5.00078 5.00072 5.00063 5.00053 5.00042 5.00038 5.00034 
-    5.0003 5.00027 5.00023 5.00021 5.00019 5.00017 5.00015 5.00013 
-    5.00012 5.00011 5.0001 5.0001 5.00009 5.00008 5.00007 5.00007 
-    5.00006 5.00005 5.00005 5.00004 5.00004 5.00003 5.00003 
-    5.00002 5.00002 5.00002 5.00001 5.00001 5 5 5 5.00001 5.00001 
-    5.00001 5.00002 5.00002 5.00002 5.00002 
-}
-v13 set {
-    9.73784e-10 0.0189926 0.0926769 0.206309 0.111533 0.0953491 
-    0.0426966 0.0214177 0.0117943 0.00741442 0.00528816 0.00398417 
-    0.0032967 0.00266499 0.00206647 0.00158788 -0.0371391 -0.0439528 
-    -0.0408653 -0.0188706 0.0150241 0.0126852 0.00209817 -0.000239206 
-    -5.31488e-05 0.000876324 -0.00451221 -0.0165223 -0.0284127 
-    -0.0427584 -0.0502453 -0.0257366 -0.00903938 -0.00376456 
-    -0.00233385 -0.00169922 -0.00130397 -0.00102542 -0.000811435 
-    -0.000648115 -0.000529266 -0.00043795 -0.00036574 -0.00030716 
-    -0.00026221 -0.000229662 -0.000205112 -0.000181038 -0.000162045 
-    -0.000148988 -0.000137633 -0.000126278 -0.000115562 -0.000104976 
-    -9.49324e-05 -9.0585e-05 -8.62375e-05 -8.18901e-05 -7.75426e-05 
-    -7.31952e-05 -6.93752e-05 -6.59106e-05 -6.24461e-05 -5.89815e-05 
-    -5.55169e-05 -5.22412e-05 -5.05263e-05 -4.88114e-05 -4.70966e-05 
-    -4.53817e-05 -4.36668e-05 -4.19519e-05 -4.0237e-05 -3.85222e-05 
-    -3.68073e-05 -3.50924e-05 -3.34782e-05 -3.25442e-05 -3.16102e-05 
-    -3.06763e-05 -2.97423e-05 -2.88083e-05 -2.78744e-05 -2.69404e-05 
-    -2.60064e-05 -2.50725e-05 -2.41385e-05 -2.32635e-05 -2.27232e-05 
-    -2.21829e-05 -2.16426e-05 -2.11023e-05 -2.0562e-05 -2.00217e-05 
-    -1.94814e-05 -1.89411e-05 -1.84007e-05 -1.78604e-05 -1.73647e-05 
-    -1.70853e-05 -1.68059e-05 -1.65265e-05 -1.62471e-05 -1.59677e-05 
-    -1.56883e-05 -1.54089e-05 -1.51295e-05 -1.48501e-05 -1.45707e-05 
-    -1.42913e-05 -1.40119e-05 -1.37325e-05 -1.34531e-05 -1.31737e-05 
-    -1.28943e-05 -1.26149e-05 -1.23355e-05 -1.20561e-05 -1.17767e-05 
-    -1.14973e-05 -1.10954e-05 0.0152675 0.0228237 -0.00460678 
-    -0.0341525 0.0232109 -0.0138039 -0.0416538 -0.0458764 -0.0201967 
-    -0.00878316 -0.00379173 -0.00164621 -0.000785131 -0.00037575 
-    -0.000352375 -0.0545586 -0.0746881 -0.0771865 -0.05386 -0.0022199 
-    0.0136703 0.00633526 0.00138826 -0.00108934 0.0038886 0.0298077 
-    0.0475776 0.0481003 0.0464167 0.047818 0.042789 0.035207 
-    0.0264423 0.0193959 0.0151614 0.00624257 -0.00913057 -0.0310696 
-    -0.0430238 0.016426 0.189762 0.49025 0.820116 1.13919 1.43549 
-    1.70658 1.95183 2.17414 2.38506 2.5657 2.73958 2.97905 3.21403 
-    3.43025 3.62645 3.8028 3.96002 4.09996 4.22443 4.33427 4.42886 
-    4.51097 4.5817 4.64326 4.6957 4.74132 4.7797 4.81298 4.84102 
-    4.86512 4.88523 4.90224 4.91649 4.92846 4.93868 4.94755 
-    4.95483 4.96114 4.96682 4.97161 4.97502 4.9776 4.97944 4.98141 
-    4.98319 4.98467 4.98585 4.9869 4.98796 4.98902 4.99008 4.99114 
-    4.9922 4.99326 4.9938 4.99429 4.99479 4.99528 4.99578 4.99628 
-    4.99677 4.99704 4.99718 4.99733 4.99747 4.99762 4.99777 
-    4.99791 4.99806 4.9982 4.99835 4.9985 4.99864 4.99879 4.99893 
-    4.99907 4.99916 4.99925 4.99934 4.99943 5.01473 4.92293 
-    4.61974 4.0316 3.7835 3.74195 3.78344 3.87272 3.97386 4.07319 
-    4.16686 4.25256 4.33126 4.40264 4.46697 4.49249 4.51807 
-    4.55803 4.64055 4.78574 4.86074 4.88334 4.8999 4.91455 4.92814 
-    4.93926 4.94761 4.95433 4.95907 4.9654 4.98317 5.0208 5.05134 
-    4.85852 4.16041 3.00077 1.68376 0.672707 0.240838 0.0794725 
-    -0.0106347 -0.00879443 0.107196 0.368163 0.701424 1.03581 
-    1.3601 1.6678 1.95731 2.22701 2.47544 2.69099 2.92327 3.16648 
-    3.3877 3.59067 3.77344 3.93584 4.08066 4.20863 4.32065 4.41791 
-    4.50211 4.57423 4.63614 4.68888 4.73377 4.7721 4.80519 4.83338 
-    4.85732 4.87815 4.89514 4.90927 4.92108 4.93122 4.94014 
-    4.94845 4.95601 4.96251 4.96576 4.969 4.97225 4.9755 4.97874 
-    4.98087 4.98265 4.98442 4.9862 4.98797 4.98924 4.9899 4.99055 
-    4.9912 4.99186 4.99251 4.99316 4.99381 4.99447 4.99512 4.99577 
-    4.99609 4.99634 4.99659 4.99683 4.99708 4.99732 4.99757 
-    4.99782 4.99806 4.99831 4.99853 4.99863 4.99873 4.99883 
-    4.99893 4.99903 4.99913 4.99923 4.99933 
-}
-
-v14 set {
-    1.86175 2.00147 1.85141 1.0654 0.275481 0.205547 0.0712627 
-    0.0313387 0.0151431 0.00864531 0.00593861 0.00438111 0.0037479 
-    0.00305857 0.00221221 0.0017081 -0.0896128 -0.109079 -0.121356 
-    -0.0542001 0.175821 0.177442 0.0814591 0.0333042 0.0134909 
-    0.00625777 0.00100092 -0.00552776 -0.00411139 -0.00150395 
-    -0.000564784 3.48169e-05 -0.000287014 -0.000538515 -0.000456537 
-    -0.000325677 -0.000275468 -0.000166452 -8.27481e-05 -8.28704e-05 
-    -7.47644e-05 -4.60552e-05 -2.61481e-06 2.26359e-05 2.53852e-05 
-    -1.39853e-06 -4.23456e-05 -4.0907e-05 -2.8501e-05 -1.5945e-05 
-    -9.01122e-06 -2.07747e-06 1.49328e-06 4.38398e-06 6.84248e-06 
-    4.76711e-06 2.69173e-06 6.16362e-07 -1.45901e-06 -3.53438e-06 
-    -4.14256e-06 -3.76238e-06 -3.3822e-06 -3.00202e-06 -2.62184e-06 
-    -2.24878e-06 -1.93456e-06 -1.62033e-06 -1.3061e-06 -9.91867e-07 
-    -6.77638e-07 -3.63409e-07 -4.91792e-08 2.6505e-07 5.7928e-07 
-    8.93509e-07 1.16076e-06 1.11055e-06 1.06034e-06 1.01014e-06 
-    9.59927e-07 9.09719e-07 8.59511e-07 8.09302e-07 7.59094e-07 
-    7.08886e-07 6.58678e-07 5.99251e-07 4.87523e-07 3.75795e-07 
-    2.64068e-07 1.5234e-07 4.06119e-08 -7.1116e-08 -1.82844e-07 
-    -2.94572e-07 -4.063e-07 -5.18027e-07 -6.08517e-07 -5.95879e-07 
-    -5.83241e-07 -5.70604e-07 -5.57966e-07 -5.45328e-07 -5.3269e-07 
-    -5.20053e-07 -5.07415e-07 -4.94777e-07 -4.8214e-07 -4.69502e-07 
-    -4.56864e-07 -4.44226e-07 -4.31589e-07 -4.18951e-07 -4.06313e-07 
-    -3.93676e-07 -3.81038e-07 -3.684e-07 -3.55762e-07 -3.43125e-07 
-    1.06736e-05 0.0797407 0.0437947 -0.0645098 -0.0877312 0.0653203 
-    -0.00621184 -0.0353188 -0.0491378 -0.0251957 -0.0110996 
-    -0.00481123 -0.0020941 -0.000998038 -0.000478747 -0.000445332 
-    -0.102046 -0.135753 -0.154351 -0.0827509 0.163348 0.174012 
-    0.0794822 0.0310624 0.0112213 0.00249061 0.00130764 0.00181315 
-    0.00163875 0.00101454 0.000497435 0.000195258 5.31901e-05 
-    2.4607e-05 6.62736e-05 7.90718e-05 4.0372e-05 -0.000141184 
-    -0.000280623 5.5608e-05 0.000799565 0.000920189 0.000931616 
-    0.000494527 0.000162303 -8.24884e-05 -0.000183938 -0.000203899 
-    -0.000144788 -9.87063e-05 -0.000227929 2.93932e-05 0.000208563 
-    1.88958e-06 -7.6335e-05 -0.000172472 -0.000165656 -0.000145889 
-    -0.000177311 -0.000191058 -0.000168287 -0.00015755 -0.00013142 
-    -8.10488e-05 -6.36115e-05 -7.8699e-05 -8.11282e-05 -7.98625e-05 
-    -5.98807e-05 -3.40879e-05 -1.95464e-05 -1.79247e-05 -4.45514e-05 
-    -7.47995e-05 -8.7682e-05 -7.50806e-05 -3.25561e-05 -4.34114e-05 
-    -7.69099e-05 -0.000141101 -0.00018743 -0.000148471 -5.06546e-05 
-    0.000120195 0.000177635 0.000177052 0.000146344 9.75126e-05 
-    8.31233e-05 6.8734e-05 5.43447e-05 3.99554e-05 2.55661e-05 
-    1.11768e-05 -3.21253e-06 -3.88937e-06 -3.56628e-06 -3.24318e-06 
-    -2.92008e-06 -2.59699e-06 -2.27389e-06 -1.9508e-06 -1.73227e-06 
-    -1.56796e-06 -1.40365e-06 -1.23934e-06 -1.07503e-06 -9.10722e-07 
-    -7.46412e-07 -5.82101e-07 -4.1779e-07 -2.5348e-07 -8.91694e-08 
-    7.51412e-08 2.39452e-07 4.03762e-07 5.95733e-07 1.00771e-06 
-    1.41969e-06 1.83167e-06 2.24365e-06 0.0828257 0.231038 0.465438 
-    1.54516 2.8461 3.19221 3.40395 3.6382 3.80758 3.93848 4.04882 
-    4.15428 4.247 4.32917 4.40235 4.36941 4.397 4.48862 4.64552 
-    4.86595 5.03475 5.0348 5.02627 5.01967 5.01542 5.00925 4.98613 
-    4.9519 4.91581 4.87357 4.82302 4.80403 4.82565 4.86102 4.89483 
-    4.92253 4.94428 4.96257 4.97608 4.98373 4.98823 4.99182 
-    4.99437 4.99635 4.99745 4.99802 4.99843 4.99873 4.99895 
-    4.99912 4.99925 4.99931 4.99962 4.99973 4.99972 4.99971 
-    4.9997 4.99969 4.9997 4.99971 4.99973 4.99974 4.99976 4.99978 
-    4.9998 4.99982 4.99985 4.99987 4.99989 4.9999 4.99991 4.99991 
-    4.99993 4.99994 4.99997 5.00001 5.00006 5.00008 5.00006 
-    5.00002 5 4.99999 4.99998 4.99997 4.99995 4.99995 4.99995 
-    4.99995 4.99995 4.99995 4.99995 4.99996 4.99997 4.99997 
-    4.99998 4.99999 5 5 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 
-    
-}
-v15 set {
-    1.86175 2.00199 2.08919 1.84314 1.08254 0.214737 0.0377351 
-    0.00952455 0.00232763 0.000563614 0.000263477 0.000148642 
-    0.000285086 0.000242592 7.34699e-05 -1.53467e-05 -0.0161874 
-    -0.0157876 -0.0141194 0.0132576 0.0903272 0.109938 0.0535295 
-    0.0224216 0.00940945 0.00466825 -0.000649972 -0.00654752 
-    -0.00333248 -0.00103671 -0.000508276 -5.8896e-05 -0.00043938 
-    -0.000544704 -0.00044444 -0.000307093 -0.00024517 -0.000154538 
-    -8.78602e-05 -7.10461e-05 -6.06485e-05 -3.91039e-05 -8.45988e-06 
-    9.43442e-06 1.28351e-05 -2.16734e-06 -2.6142e-05 -2.54768e-05 
-    -1.88997e-05 -1.17906e-05 -7.3808e-06 -2.97101e-06 1.19146e-07 
-    2.94246e-06 5.38942e-06 3.88851e-06 2.38761e-06 8.86704e-07 
-    -6.14201e-07 -2.11511e-06 -2.59565e-06 -2.38885e-06 -2.18205e-06 
-    -1.97525e-06 -1.76845e-06 -1.56241e-06 -1.36258e-06 -1.16276e-06 
-    -9.62939e-07 -7.63116e-07 -5.63293e-07 -3.6347e-07 -1.63647e-07 
-    3.61756e-08 2.35999e-07 4.35822e-07 6.07653e-07 5.90323e-07 
-    5.72994e-07 5.55665e-07 5.38336e-07 5.21007e-07 5.03678e-07 
-    4.86349e-07 4.6902e-07 4.51691e-07 4.34361e-07 4.11899e-07 
-    3.60315e-07 3.08731e-07 2.57146e-07 2.05562e-07 1.53977e-07 
-    1.02393e-07 5.08082e-08 -7.76222e-10 -5.23607e-08 -1.03945e-07 
-    -1.47815e-07 -1.54225e-07 -1.60635e-07 -1.67045e-07 -1.73455e-07 
-    -1.79864e-07 -1.86274e-07 -1.92684e-07 -1.99094e-07 -2.05504e-07 
-    -2.11914e-07 -2.18324e-07 -2.24734e-07 -2.31144e-07 -2.37554e-07 
-    -2.43964e-07 -2.50373e-07 -2.56783e-07 -2.63193e-07 -2.69603e-07 
-    -2.76013e-07 -2.82423e-07 2.92534e-06 0.0446777 0.024278 
-    -0.0518987 -0.0636547 0.00983929 -0.000518204 -0.000265194 
-    0.000154772 0.000299538 3.12715e-05 -3.18225e-05 -2.48268e-05 
-    -1.16701e-05 -6.05117e-06 7.61116e-06 -0.0163668 -0.0158244 
-    -0.0141177 0.0100085 0.0857144 0.107784 0.051862 0.0204448 
-    0.00629858 0.000967736 0.00121674 0.00190276 0.00154009 
-    0.000860922 0.000410386 0.000164585 3.99493e-05 1.93797e-05 
-    5.67594e-05 0.000110126 2.49925e-05 -7.17815e-05 -0.000142299 
-    -1.63109e-05 0.000439529 0.000562489 0.000594599 0.000326164 
-    0.000126423 -4.26063e-05 -0.000122927 -0.000114152 -6.72706e-05 
-    -6.41242e-05 -0.000135588 2.61507e-05 0.000134036 6.43734e-06 
-    -4.6223e-05 -0.000112047 -0.000101388 -8.67847e-05 -0.000117664 
-    -0.000133957 -0.000116558 -0.000100873 -7.65448e-05 -4.44964e-05 
-    -3.6677e-05 -5.26632e-05 -5.45172e-05 -5.13545e-05 -3.73869e-05 
-    -1.99732e-05 -1.0907e-05 -1.10081e-05 -3.02609e-05 -5.18517e-05 
-    -6.13597e-05 -5.30706e-05 -2.39572e-05 -3.24146e-05 -5.70062e-05 
-    -0.000103448 -0.000135376 -0.0001024 -2.39007e-05 0.000110929 
-    0.000151226 0.000142044 0.000105922 5.62834e-05 4.78476e-05 
-    3.94117e-05 3.09759e-05 2.25401e-05 1.41042e-05 5.66837e-06 
-    -2.76747e-06 -3.08639e-06 -2.81341e-06 -2.54043e-06 -2.26745e-06 
-    -1.99447e-06 -1.72149e-06 -1.44851e-06 -1.26226e-06 -1.12096e-06 
-    -9.79661e-07 -8.38363e-07 -6.97065e-07 -5.55768e-07 -4.1447e-07 
-    -2.73173e-07 -1.31875e-07 9.42259e-09 1.5072e-07 2.92018e-07 
-    4.33315e-07 5.74613e-07 7.10363e-07 8.01984e-07 8.93604e-07 
-    9.85225e-07 1.07685e-06 0.04474 0.0928765 0.141327 0.0176048 
-    -0.071675 -0.0124613 0.989022 2.28104 3.40619 4.21417 4.67173 
-    4.87438 4.96044 4.98996 4.99858 4.96672 4.89502 4.79391 
-    4.76433 4.8387 4.98612 5.0161 5.01722 5.01437 5.01256 4.99827 
-    4.95807 4.9209 4.88217 4.83006 4.78461 4.80759 4.85548 4.89604 
-    4.9254 4.94617 4.96126 4.97374 4.98255 4.98792 4.99126 4.99361 
-    4.99554 4.99699 4.99792 4.99846 4.99881 4.99905 4.99924 
-    4.99938 4.99949 4.99955 4.9997 4.9998 4.99982 4.99982 4.99982 
-    4.99982 4.99982 4.99983 4.99984 4.99985 4.99986 4.99987 
-    4.99988 4.99989 4.9999 4.99992 4.99993 4.99994 4.99995 4.99995 
-    4.99996 4.99996 4.99998 4.99999 5.00001 5.00002 5.00002 
-    5.00001 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    
-}
-v16 set {
-    1.86175 1.73073 1.50572 1.89001 3.39004 4.36034 4.79012 
-    4.93798 4.98305 4.99539 4.9979 4.99904 4.99772 4.9983 4.99935 
-    4.99975 4.98837 4.99456 4.99728 5.01838 5.04568 5.00759 
-    4.98112 4.98479 4.99197 4.99641 4.99747 4.99775 5.00043 
-    5.0007 5.00035 5.00023 4.99976 5.00002 5.00007 5.0002 4.99993 
-    5.00003 5.00021 5.00006 4.99993 4.99992 5.00002 5.00013 
-    5.00017 5.00009 4.99992 4.99991 4.99993 4.99996 4.99998 
-    4.99999 5.00001 5.00003 5.00005 5.00004 5.00004 5.00003 
-    5.00002 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 5 5.01498 4.99342 4.96899 5.00301 5.02627 4.9977 
-    4.99548 4.99757 5.00277 5.00245 5.0014 5.00069 5.00032 5.00014 
-    5.00009 4.9867 4.99262 4.99607 5.01805 5.04713 5.00927 4.98184 
-    4.98483 4.9914 4.99616 4.99902 4.9999 4.99987 4.99979 4.99981 
-    4.99989 4.99994 4.99998 5.0002 5.00001 5.00008 5.00008 5.0001 
-    5.00021 5.00032 5.00025 5.00019 5.00006 5.00007 4.99994 
-    4.99997 4.99999 5.00023 5.00008 4.99993 4.99998 4.99986 
-    4.99982 5.00003 4.99985 4.99996 5.00014 5 4.99984 4.99979 
-    4.99982 4.99993 5.00008 5.00011 5.00002 4.99996 4.9999 4.99994 
-    5.00001 5.00007 5.00009 4.99995 4.99978 4.99971 4.99976 
-    4.99997 4.99996 4.99989 4.99972 4.99955 4.99953 4.99959 
-    4.99976 4.9999 5.00005 5.00023 5.00039 5.00034 5.00029 5.00024 
-    5.00019 5.00014 5.00009 5.00004 5.00003 5.00002 5.00001 
-    5 5 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5.00001 5.00002 5.00003 5.00004 5.01564 5.03395 5.04932 
-    5.11868 3.92502 1.31888 0.163888 0.0946876 0.0789578 0.0565084 
-    0.0260333 0.0156986 0.00907667 0.00613629 0.00468417 -0.00174008 
-    -0.0021422 0.000586962 0.0124937 0.0147977 0.00838454 0.00039383 
-    -0.000522021 -0.000426598 -0.000290214 -0.00173713 -0.00384132 
-    -0.00382945 -0.00429219 -0.00580193 -0.00393246 0.0017543 
-    0.00423045 0.00408931 0.0031976 0.00245457 0.00187293 0.00159068 
-    0.00105697 0.000609902 0.000358825 0.000334125 0.000212708 
-    0.000168116 8.97349e-05 5.21578e-05 3.84527e-05 2.93033e-05 
-    2.10067e-05 1.59954e-05 1.13917e-05 5.49738e-06 2.77217e-05 
-    6.51259e-06 -6.65468e-06 2.09837e-06 -6.617e-06 -4.80187e-06 
-    1.55031e-06 4.26536e-06 7.69457e-07 -1.46213e-06 -7.25202e-07 
-    3.26501e-06 6.55807e-06 7.524e-06 6.07209e-06 6.00701e-06 
-    5.41166e-06 3.86573e-06 1.10651e-06 -2.74603e-06 -2.18566e-06 
-    2.3658e-06 8.59956e-06 8.35046e-06 2.90621e-06 -8.75982e-07 
-    -1.87189e-06 -2.1528e-06 -1.94875e-06 -1.74471e-06 -1.54067e-06 
-    -1.33662e-06 -1.13258e-06 -8.40567e-07 -5.20743e-07 -2.00918e-07 
-    1.18906e-07 4.38731e-07 6.11382e-07 6.01529e-07 5.91675e-07 
-    5.81822e-07 5.71968e-07 5.62115e-07 5.52261e-07 5.42407e-07 
-    5.32554e-07 5.227e-07 5.12847e-07 4.72812e-07 4.26137e-07 
-    3.79462e-07 3.32786e-07 2.86111e-07 2.39436e-07 1.92761e-07 
-    1.46086e-07 9.94107e-08 5.27356e-08 -2.77779e-10 -7.98079e-08 
-    -1.59338e-07 -2.38868e-07 -3.18398e-07 -3.97928e-07 -4.77458e-07 
-    -5.56988e-07 -6.36519e-07 
-}
-v17 set {
-    5 5.16963 4.84136 3.33754 0.316206 0.103113 0.0273341 0.0221102 
-    0.0177008 0.0143758 0.0115203 0.00929231 0.00752716 0.00625439 
-    0.00489872 0.00403656 -0.0657317 -0.0256467 0.165394 0.985963 
-    3.05067 4.55799 4.89728 4.92464 4.8882 4.90592 4.97315 4.99241 
-    4.99694 4.99845 4.99905 4.99939 4.99959 4.99971 4.9998 4.99986 
-    4.9999 4.99993 4.99995 4.99996 4.99997 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 5 5.00001 5.00003 5.00005 
-    5.00004 5.00002 5 4.99999 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99998 4.99998 4.99999 4.99999 5 5 5 5 5 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5.00025 5.1657 4.69981 2.43895 
-    0.0229743 0.0351406 -0.0211974 -0.0312063 -0.0160331 -0.0021718 
-    -0.000766597 -0.000251052 -5.49363e-05 -3.36364e-06 -2.01983e-06 
-    -9.70575e-06 -0.0657007 -0.0205247 0.183332 1.07163 3.11839 
-    4.46213 4.84163 4.95195 4.99159 5.02084 5.04029 5.04138 
-    5.0271 5.00445 4.97957 4.95702 4.95231 4.97819 4.99191 4.9963 
-    4.99822 4.99878 4.99903 4.99925 4.99942 4.9995 4.99954 4.99957 
-    4.99961 4.99966 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 
-    4.99988 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 4.99996 
-    4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.14239 4.76219 
-    3.16574 0.299969 0.0631609 -0.00118611 -0.00026052 -5.96333e-05 
-    -1.44904e-05 -4.3859e-06 -2.99454e-06 1.10547e-06 4.84662e-06 
-    1.30971e-05 2.23082e-05 -0.0655844 -0.0204818 0.182507 1.05954 
-    3.12277 4.46735 4.83915 4.94512 4.97679 4.98654 4.9966 5.00833 
-    5.00776 5.00432 5.00199 5.00086 5.00033 5.00008 5 5.00001 
-    5 5.00005 5.00002 4.99981 4.99991 4.99998 4.99979 4.99979 
-    4.99984 4.9998 4.9998 5.00006 5.00002 5.00001 5 5 4.99992 
-    4.99998 4.99999 5.00002 5.00014 4.99999 4.99987 4.99993 
-    5.00003 5.00011 5.00005 4.99996 4.99987 4.99985 4.99994 
-    5.00009 5.0001 5 4.99993 4.99997 5.00008 5.00015 5.00021 
-    5.00021 5.00007 4.99978 4.99965 4.99973 4.9999 4.99992 4.99995 
-    4.99997 4.99999 5.00001 5.00002 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00002 
-}
-v18 set {
-    5 5.0333 5.02472 4.92559 4.18383 3.93923 3.9961 4.14293 
-    4.28591 4.41336 4.52157 4.61101 4.68472 4.7439 4.79294 4.83239 
-    4.80697 4.78808 4.79322 4.8838 5.08529 5.21863 4.88852 3.90198 
-    2.14586 0.383977 0.101103 0.0525711 0.0318287 0.020895 0.0146908 
-    0.010831 0.00830272 0.00656377 0.00532066 0.00440078 0.00369956 
-    0.00315713 0.00272614 0.00237965 0.00209659 0.00186339 0.00167014 
-    0.0015081 0.00137172 0.00125607 0.00115393 0.00106076 0.000980166 
-    0.000918015 0.000862837 0.00080766 0.000763488 0.000721541 
-    0.000680825 0.000653026 0.000625226 0.000597426 0.000569627 
-    0.000541827 0.000519087 0.000499756 0.000480424 0.000461093 
-    0.000441761 0.000423291 0.000411941 0.00040059 0.00038924 
-    0.000377889 0.000366539 0.000355188 0.000343838 0.000332487 
-    0.000321137 0.000309786 0.000299055 0.000292509 0.000285963 
-    0.000279417 0.000272871 0.000266325 0.000259779 0.000253233 
-    0.000246686 0.00024014 0.000233594 0.000227387 0.0002231 
-    0.000218813 0.000214526 0.00021024 0.000205953 0.000201666 
-    0.000197379 0.000193092 0.000188805 0.000184519 0.000180526 
-    0.000177963 0.0001754 0.000172837 0.000170274 0.000167711 
-    0.000165148 0.000162585 0.000160022 0.000157459 0.000154895 
-    0.000152332 0.000149769 0.000147206 0.000144643 0.00014208 
-    0.000139517 0.000136954 0.000134391 0.000131828 0.000129265 
-    0.000126702 0.000132838 0.0311184 0.163151 0.34986 0.604501 
-    0.357125 0.136137 0.0711304 0.0346959 0.0212674 0.00872193 
-    0.00252206 0.000455269 7.59332e-05 2.91532e-05 0.000320562 
-    -0.0720911 -0.0840491 -0.0791345 -0.0404143 0.0182035 -0.0235871 
-    -0.0426072 -0.0597501 0.00824773 0.481404 1.32496 2.11949 
-    2.57317 2.58202 2.15054 1.33786 0.45702 0.153772 0.0913584 
-    0.0604989 0.0421591 0.0271456 0.0170021 0.0115815 0.00907886 
-    0.00742466 0.00626096 0.00531127 0.00450501 0.00381927 0.00323718 
-    0.00274374 0.00232494 0.00196885 0.00166686 0.00141134 0.00119437 
-    0.0010109 0.000855534 0.000723378 0.000611408 0.000516704 
-    0.000436769 0.000369523 0.000313026 0.00026526 0.000223976 
-    0.000188972 0.000159042 0.000134148 0.000112688 9.49738e-05 
-    7.97877e-05 6.721e-05 5.65115e-05 4.77194e-05 4.03591e-05 
-    3.42848e-05 2.92627e-05 2.50435e-05 2.1412e-05 1.84532e-05 
-    1.58624e-05 1.34673e-05 1.14461e-05 1.00935e-05 9.12375e-06 
-    8.50202e-06 7.81431e-06 7.20729e-06 6.73936e-06 6.3702e-06 
-    5.90049e-06 5.43077e-06 4.96105e-06 4.49133e-06 4.02162e-06 
-    3.5519e-06 3.08218e-06 2.79099e-06 2.51281e-06 2.23463e-06 
-    1.95645e-06 1.67827e-06 1.40009e-06 1.12191e-06 1.01376e-06 
-    9.9375e-07 9.73741e-07 9.53733e-07 9.33724e-07 9.13715e-07 
-    8.93707e-07 8.73698e-07 8.5369e-07 8.33681e-07 8.13673e-07 
-    7.93664e-07 7.73655e-07 7.53647e-07 7.21781e-07 5.956e-07 
-    4.69419e-07 3.43239e-07 2.17058e-07 0.0284032 0.0374438 
-    -0.0157543 -0.0680497 0.0504768 0.0100294 0.00222261 0.000528697 
-    0.000132929 3.99489e-05 2.46066e-05 4.56327e-06 -6.54853e-06 
-    1.33783e-05 -3.68221e-05 -0.0724498 -0.0843663 -0.0792935 
-    -0.0406426 0.0200019 0.0426259 0.0220753 0.00668555 -0.000968483 
-    0.024662 0.0383437 0.0911513 0.087848 0.0602076 0.0390559 
-    0.0260573 0.0180444 0.012974 0.00985409 0.00788132 0.0064228 
-    0.005545 0.00453571 0.00364245 0.00310278 0.00270523 0.00236439 
-    0.0020945 0.00186808 0.00167493 0.00151731 0.00138594 0.00126945 
-    0.00116695 0.0010762 0.000996366 0.000928387 0.000864414 
-    0.000808258 0.000759574 0.000713865 0.000666712 0.000632716 
-    0.000601262 0.000572163 0.000543986 0.000515253 0.0004897 
-    0.000468112 0.000449313 0.000432981 0.000417911 0.000401307 
-    0.000382712 0.000366678 0.000355736 0.000349171 0.000335727 
-    0.000317091 0.000296086 0.000283543 0.000277366 0.000272233 
-    0.000267001 0.000263147 0.000256699 0.000250251 0.000243803 
-    0.000237355 0.000230907 0.000225424 0.000220247 0.000215069 
-    0.000209892 0.000204714 0.000200213 0.000196548 0.000192884 
-    0.00018922 0.000185556 0.000181892 0.000178228 0.000174564 
-    0.0001709 0.000167236 0.000163572 0.000160824 0.000158279 
-    0.000155733 0.000153187 0.000150641 0.000148095 0.000145549 
-    0.000143003 0.000140457 0.000137911 0.000135457 0.000133386 
-    0.000131315 0.000129245 0.000127174 0.000125103 0.000123032 
-    0.000120961 0.000118891 
-}
-v19 set {
-    1.86175 1.99994 2.0833 2.01627 2.42503 3.25769 3.62134 3.88827 
-    4.09688 4.26773 4.40529 4.51734 4.60827 4.68313 4.74346 
-    4.79302 4.72815 4.68959 4.70421 4.81316 5.01375 5.14493 
-    5.10305 5.0699 5.04484 5.03751 5.03348 5.02504 5.01799 5.01271 
-    5.00895 5.00628 5.0044 5.00309 5.00216 5.00151 5.00105 5.00073 
-    5.00051 5.00034 5.00023 5.00015 5.0001 5.00007 5.00003 4.99998 
-    4.99993 4.99993 4.99995 4.99999 5.00001 5.00003 5.00002 
-    5.00001 5 5 5 5 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00017 5.17398 
-    4.94779 3.78508 1.52302 0.608808 0.244311 0.126053 0.0597175 
-    0.038422 0.0158174 0.00481338 0.00107847 0.000301256 0.000114861 
-    0.00059489 -0.118904 -0.147478 -0.158986 -0.080544 0.165361 
-    0.171378 0.0776087 0.0435738 0.0428235 0.0423755 0.0347695 
-    0.0225061 0.0155539 0.0121357 0.0107997 0.0103976 0.0124406 
-    0.016814 0.0167556 0.0149852 0.01459 0.0141182 0.0131934 
-    0.0120286 0.0108692 0.0097184 0.00855881 0.00744912 0.00643877 
-    0.00554044 0.00475165 0.00406535 0.00347158 0.00295981 0.00251995 
-    0.00214318 0.00182101 0.00154613 0.00131196 0.0011119 0.000941587 
-    0.000796999 0.000674582 0.000571283 0.000484276 0.000410649 
-    0.000347005 0.000292984 0.000246715 0.000208143 0.00017489 
-    0.000147412 0.000123854 0.000104332 8.77229e-05 7.40686e-05 
-    6.2637e-05 5.32e-05 4.53946e-05 3.88343e-05 3.31864e-05 
-    2.85905e-05 2.45725e-05 2.08671e-05 1.77301e-05 1.55911e-05 
-    1.40153e-05 1.29421e-05 1.18693e-05 1.09815e-05 1.03484e-05 
-    9.87664e-06 9.14446e-06 8.41228e-06 7.68011e-06 6.94793e-06 
-    6.21575e-06 5.48357e-06 4.7514e-06 4.38454e-06 4.04432e-06 
-    3.7041e-06 3.36388e-06 3.02366e-06 2.68344e-06 2.34322e-06 
-    2.15196e-06 2.03791e-06 1.92386e-06 1.80982e-06 1.69577e-06 
-    1.58173e-06 1.46768e-06 1.35363e-06 1.23959e-06 1.12554e-06 
-    1.0115e-06 8.9745e-07 7.83404e-07 6.69358e-07 4.76113e-07 
-    -3.47071e-07 -1.17025e-06 -1.99344e-06 -2.81662e-06 0.0783754 
-    0.0500262 -0.0659563 -0.120914 0.0815957 0.0154255 0.00347177 
-    0.000840357 0.000214582 6.54655e-05 3.91709e-05 8.07396e-06 
-    -4.44265e-07 1.74384e-05 -4.52725e-05 -0.119379 -0.147984 
-    -0.159247 -0.0824604 0.169014 0.177628 0.0758742 0.010558 
-    -0.0346506 -0.0710288 -0.0838952 -0.0599521 -0.034568 -0.0181615 
-    -0.00968034 -0.00547115 -0.00333511 -0.00232468 -0.00181159 
-    -0.00143841 -0.00116601 -0.000839755 -0.000569764 -0.000578683 
-    -0.000490551 -0.000411712 -0.000437859 -0.000408185 -0.000356644 
-    -0.000311332 -0.000269006 -0.000221396 -0.000210054 -0.0001923 
-    -0.000175122 -0.000161039 -0.0001428 -0.000126123 -0.000127893 
-    -8.14516e-05 -0.000120166 -0.000154909 -0.000112733 -8.40377e-05 
-    -7.11342e-05 -8.09538e-05 -9.77789e-05 -9.82402e-05 -7.73531e-05 
-    -5.28255e-05 -3.1096e-05 -1.87967e-05 -1.96552e-05 -4.16655e-05 
-    -5.77185e-05 -5.24142e-05 -2.83153e-05 -1.90012e-05 -1.54415e-05 
-    -2.52569e-05 -6.23747e-05 -0.000130543 -0.000149394 -0.000110886 
-    -4.35517e-05 -4.17084e-05 -3.98651e-05 -3.80218e-05 -3.61785e-05 
-    -3.43352e-05 -3.36249e-05 -3.32729e-05 -3.29208e-05 -3.25687e-05 
-    -3.22166e-05 -3.17143e-05 -3.10258e-05 -3.03372e-05 -2.96486e-05 
-    -2.89601e-05 -2.82715e-05 -2.75829e-05 -2.68944e-05 -2.62058e-05 
-    -2.55173e-05 -2.48287e-05 -2.43043e-05 -2.38159e-05 -2.33276e-05 
-    -2.28393e-05 -2.2351e-05 -2.18626e-05 -2.13743e-05 -2.0886e-05 
-    -2.03977e-05 -1.99093e-05 -1.945e-05 -1.91122e-05 -1.87744e-05 
-    -1.84366e-05 -1.80987e-05 -1.77609e-05 -1.74231e-05 -1.70853e-05 
-    -1.67474e-05 
-}
-v20 set {
-    1.86175 1.99724 2.17266 2.48439 3.15933 3.85231 4.38091 
-    4.69033 4.85034 4.92851 4.96453 4.98188 4.98736 4.991 4.99482 
-    4.9973 4.96422 4.89989 4.83907 4.83151 4.90868 5.04854 5.06104 
-    5.04571 5.03219 5.03025 5.02273 5.01707 5.0123 5.0087 5.00611 
-    5.00429 5.00301 5.00211 5.00148 5.00103 5.00072 5.0005 5.00035 
-    5.00024 5.00016 5.00011 5.00007 5.00005 5.00003 5.00001 
-    4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    5 5 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 5 4.99981 5.10081 5.10903 4.98404 5.00999 5.14946 4.36501 
-    2.23938 0.325144 0.00660272 -0.0102186 -0.0082401 -0.00556785 
-    -0.00374178 -0.00264763 -0.00202823 -0.0182241 -0.0169551 
-    -0.0150395 0.0103736 0.0877592 0.104382 0.0515938 0.0373818 
-    0.0411547 0.0397009 0.0308946 0.0205793 0.0154037 0.0129191 
-    0.0119327 0.011527 0.0124295 0.0161152 0.0161076 0.0145391 
-    0.0144541 0.0139287 0.0129215 0.0117239 0.0105795 0.00942983 
-    0.00827423 0.00718354 0.00619954 0.00532868 0.00456631 0.00390448 
-    0.00333254 0.00284003 0.00241714 0.00205524 0.0017458 0.00148202 
-    0.00125739 0.0010655 0.000902213 0.000763611 0.000646279 
-    0.000547291 0.000463934 0.000393401 0.000332424 0.000280655 
-    0.000236328 0.000199386 0.000167536 0.000141218 0.000118654 
-    9.99559e-05 8.40479e-05 7.09694e-05 6.00188e-05 5.09786e-05 
-    4.3502e-05 3.72191e-05 3.18114e-05 2.74071e-05 2.35539e-05 
-    1.99967e-05 1.69871e-05 1.49449e-05 1.3451e-05 1.24492e-05 
-    1.14256e-05 1.05669e-05 9.94487e-06 9.47514e-06 8.77318e-06 
-    8.07123e-06 7.36927e-06 6.66731e-06 5.96536e-06 5.2634e-06 
-    4.56144e-06 4.23044e-06 3.92649e-06 3.62254e-06 3.31858e-06 
-    3.01463e-06 2.71068e-06 2.40673e-06 2.23063e-06 2.12082e-06 
-    2.01102e-06 1.90121e-06 1.7914e-06 1.68159e-06 1.57178e-06 
-    1.46197e-06 1.35216e-06 1.24235e-06 1.13255e-06 1.02274e-06 
-    9.12929e-07 8.0312e-07 6.33171e-07 -1.51288e-08 -6.63428e-07 
-    -1.31173e-06 -1.96003e-06 0.0437517 0.0265689 -0.0515377 
-    -0.0658688 0.010727 -0.000511921 -8.36924e-05 2.13278e-05 
-    1.45207e-05 4.54862e-06 -6.14726e-06 2.0062e-06 1.02709e-06 
-    1.4152e-05 -3.08225e-05 -0.0166501 -0.0157139 -0.013957 
-    0.0107537 0.0873717 0.111302 0.0454129 -0.00530142 -0.0468336 
-    -0.0790063 -0.0826944 -0.0534753 -0.0288705 -0.0149009 -0.00801592 
-    -0.0046342 -0.00291835 -0.00213019 -0.00170055 -0.001352 
-    -0.00110593 -0.000742655 -0.000532042 -0.000544742 -0.000479206 
-    -0.000407307 -0.000403575 -0.000366209 -0.000324161 -0.000286183 
-    -0.000247579 -0.000214281 -0.000203435 -0.000186896 -0.000171033 
-    -0.00015779 -0.000145259 -0.000128069 -0.000122647 -9.89398e-05 
-    -0.000114926 -0.000132195 -0.000107872 -8.91015e-05 -7.87996e-05 
-    -8.14061e-05 -8.9098e-05 -8.83368e-05 -7.6122e-05 -6.14668e-05 
-    -4.75402e-05 -3.81855e-05 -3.69696e-05 -4.78656e-05 -5.61346e-05 
-    -5.35007e-05 -4.1459e-05 -3.35411e-05 -2.52374e-05 -2.37479e-05 
-    -4.6406e-05 -9.41884e-05 -0.000109222 -8.52676e-05 -4.25166e-05 
-    -4.10125e-05 -3.95085e-05 -3.80045e-05 -3.65004e-05 -3.49964e-05 
-    -3.41627e-05 -3.3541e-05 -3.29193e-05 -3.22976e-05 -3.16758e-05 
-    -3.10334e-05 -3.03653e-05 -2.96971e-05 -2.9029e-05 -2.83609e-05 
-    -2.76928e-05 -2.70246e-05 -2.63565e-05 -2.56884e-05 -2.50203e-05 
-    -2.43521e-05 -2.38716e-05 -2.34324e-05 -2.29932e-05 -2.25539e-05 
-    -2.21147e-05 -2.16755e-05 -2.12362e-05 -2.0797e-05 -2.03578e-05 
-    -1.99186e-05 -1.95079e-05 -1.9217e-05 -1.8926e-05 -1.8635e-05 
-    -1.8344e-05 -1.8053e-05 -1.7762e-05 -1.74711e-05 -1.71801e-05 
-    
-}
-v21 set {
-    1.86175 1.73273 1.42016 1.02483 0.944013 0.274107 0.0823742 
-    0.0379366 0.020816 0.0132952 0.00955525 0.00717008 0.00592286 
-    0.00437379 0.00383557 0.00273694 -0.0037467 -0.0054191 -0.00131454 
-    0.0112179 0.0133918 0.00519747 -0.00260113 -0.00252847 -0.00181292 
-    0.000183398 -0.000667607 -0.000750747 -0.000594314 -0.000433904 
-    -0.000308985 -0.000217858 -0.000152926 -0.000107454 -7.54076e-05 
-    -5.2675e-05 -3.66299e-05 -2.54341e-05 -1.75095e-05 -1.18848e-05 
-    -7.97289e-06 -5.30239e-06 -3.53615e-06 -2.38504e-06 -2.40158e-06 
-    -3.84485e-06 -5.29435e-06 -2.57099e-06 1.95189e-06 3.55083e-06 
-    2.06179e-06 5.72753e-07 3.30469e-07 3.40296e-07 3.60221e-07 
-    4.86081e-07 6.1194e-07 7.37799e-07 8.63659e-07 9.89518e-07 
-    9.21274e-07 7.22275e-07 5.23276e-07 3.24277e-07 1.25278e-07 
-    -5.59467e-08 -9.03265e-08 -1.24706e-07 -1.59086e-07 -1.93466e-07 
-    -2.27846e-07 -2.62226e-07 -2.96605e-07 -3.30985e-07 -3.65365e-07 
-    -3.99745e-07 -4.24266e-07 -3.82163e-07 -3.40061e-07 -2.97959e-07 
-    -2.55857e-07 -2.13755e-07 -1.71652e-07 -1.2955e-07 -8.7448e-08 
-    -4.53457e-08 -3.24353e-09 3.76901e-08 7.19937e-08 1.06297e-07 
-    1.40601e-07 1.74904e-07 2.09208e-07 2.43512e-07 2.77815e-07 
-    3.12119e-07 3.46422e-07 3.80726e-07 4.04507e-07 3.77191e-07 
-    3.49876e-07 3.22561e-07 2.95246e-07 2.67931e-07 2.40616e-07 
-    2.13301e-07 1.85986e-07 1.58671e-07 1.31356e-07 1.04041e-07 
-    7.67256e-08 4.94105e-08 2.20955e-08 -5.21962e-09 -3.25347e-08 
-    -5.98498e-08 -8.71649e-08 -1.1448e-07 -1.41795e-07 -1.6911e-07 
-    7.87893e-06 0.0114592 -0.0245712 -0.111637 0.0961324 1.61168 
-    3.22343 4.20442 4.53535 4.83834 4.95464 4.98874 4.99746 
-    4.99883 4.99948 4.99815 4.98431 4.99298 4.99718 5.01948 
-    5.04749 5.008 4.98243 4.98985 4.99781 4.99887 4.99679 4.99616 
-    4.99743 4.99859 4.99936 4.99972 5.00058 5.00123 5.0002 4.99945 
-    4.99983 4.9998 4.99966 4.99958 4.99956 4.99956 4.99956 4.99958 
-    4.99961 4.99965 4.99969 4.99973 4.99977 4.9998 4.99983 4.99985 
-    4.99987 4.99989 4.99991 4.99992 4.99993 4.99994 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.01454 
-    4.99566 4.96796 4.99819 5.03232 5.00034 4.99867 4.99937 
-    4.99977 4.99992 4.99997 4.99999 5.00001 5.00021 4.99974 
-    4.98462 4.99301 4.99723 5.01936 5.04807 5.00929 4.9789 4.97876 
-    4.98244 4.9863 4.99575 5.0069 5.00863 5.00624 5.00357 5.0019 
-    5.00098 5.00048 5.00025 5.00016 5.00011 5.00013 5.00009 
-    4.99982 4.99994 5.00005 4.99994 4.99988 4.99989 4.99997 
-    5.00003 5.00005 5.00002 5.00001 5.00001 5.00001 4.99993 
-    4.99999 5 5.00021 4.99997 4.99981 5 5.00009 5.0001 5.00001 
-    4.99991 4.9999 5 5.00011 5.00017 5.00018 5.00018 5.00014 
-    5.00007 4.99999 4.9999 4.9999 5.00001 5.00016 5.00014 4.99999 
-    4.99993 4.99999 5.00009 5.00007 5.00006 5.00004 5.00003 
-    5.00001 5.00001 5 4.99999 4.99998 4.99997 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 
-}
-v22 set {
-    7.10441e-10 0.00107105 0.000637109 -0.00236346 -0.018079 
-    -0.0120077 -0.00217059 0.00266679 0.00403383 0.00403836 
-    0.00356705 0.00303303 0.00244716 0.00198586 0.0016855 0.00136497 
-    -3.96022e-05 -0.000367409 -3.77079e-05 0.00194085 0.00506964 
-    -0.0400214 -0.0402572 0.0524434 0.286234 0.803011 1.44795 
-    2.02473 2.54768 3.02748 3.4415 3.78287 4.09667 4.35152 4.53987 
-    4.67614 4.77407 4.84319 4.89227 4.92702 4.95119 4.96764 
-    4.97846 4.98557 4.98982 4.99209 4.99371 4.99569 4.99727 
-    4.99802 4.99834 4.99867 4.99892 4.99915 4.99936 4.99939 
-    4.99943 4.99946 4.9995 4.99953 4.99957 4.9996 4.99963 4.99967 
-    4.9997 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 4.9998 
-    4.99981 4.99982 4.99983 4.99984 4.99985 4.99986 4.99986 
-    4.99986 4.99987 4.99987 4.99988 4.99988 4.99989 4.99989 
-    4.9999 4.9999 4.9999 4.9999 4.99991 4.99991 4.99991 4.99991 
-    4.99992 4.99992 4.99992 4.99992 4.99993 4.99993 4.99993 
-    4.99993 4.99993 4.99993 4.99993 4.99993 4.99994 4.99994 
-    4.99994 4.99994 4.99994 4.99994 4.99994 4.99994 4.99995 
-    4.99995 4.99995 4.99995 4.99995 4.99995 4.99995 5.00145 
-    5.00659 5.01209 5.01931 5.00279 4.99273 4.99217 4.99295 
-    4.99471 4.99594 4.99696 4.9978 4.99844 4.99891 4.99924 4.99635 
-    4.99699 4.99813 5.00068 5.00307 5.0588 4.96365 4.54012 3.6307 
-    2.35176 1.0322 0.354379 0.115986 0.0435668 0.0245112 0.020786 
-    0.0164656 0.0118409 0.00849698 0.00597078 0.0040105 0.0026076 
-    0.0016597 0.00118185 0.00121067 0.00153587 0.00174836 0.00136519 
-    -0.000189116 -0.00315555 -0.00646603 -0.00898042 -0.010203 
-    -0.0110896 -0.0123764 -0.00953841 -0.00225795 0.000818314 
-    0.00152252 0.00150269 0.00119025 0.000767068 0.000308852 
-    -3.79272e-05 -0.00019691 -0.000186642 -9.73653e-05 -8.49784e-06 
-    2.04147e-05 -9.91086e-06 -1.55959e-05 -1.80499e-05 -1.77097e-05 
-    -1.51548e-05 -1.1978e-05 -9.84916e-06 -1.29728e-05 -1.67235e-05 
-    -1.74153e-05 -1.39958e-05 -5.92272e-06 -8.08216e-06 -1.53077e-05 
-    -2.92531e-05 -3.91049e-05 -2.98935e-05 -7.32122e-06 3.18534e-05 
-    4.39134e-05 4.18753e-05 3.22759e-05 1.86766e-05 1.58432e-05 
-    1.30098e-05 1.01765e-05 7.34312e-06 4.50975e-06 1.67639e-06 
-    -1.15697e-06 -1.23877e-06 -1.11991e-06 -1.00106e-06 -8.82208e-07 
-    -7.63355e-07 -6.44502e-07 -5.2565e-07 -4.29318e-07 -3.44661e-07 
-    -2.60004e-07 -1.75347e-07 -9.06904e-08 -6.03349e-09 7.86234e-08 
-    1.6328e-07 2.47937e-07 3.32594e-07 4.17251e-07 5.01908e-07 
-    5.86565e-07 6.71222e-07 7.36123e-07 6.43886e-07 5.5165e-07 
-    4.59414e-07 3.67178e-07 0.000334759 -4.60833e-05 -0.00106139 
-    -0.00166624 0.000859563 0.00102606 0.00410037 0.00419931 
-    0.00518997 0.00459791 0.00503125 0.00523877 0.00452158 0.00339924 
-    0.00233399 0.000876915 0.000546439 0.000444299 0.000983968 
-    0.00119304 -0.0429422 -0.0403983 0.0534896 0.288013 0.807345 
-    1.44247 2.03448 2.57021 3.05049 3.47332 3.8131 4.1009 4.34677 
-    4.53512 4.67127 4.76531 4.82526 4.86593 4.89586 4.91904 
-    4.93806 4.95348 4.96597 4.97629 4.9843 4.98983 4.99335 4.9957 
-    4.99741 4.99864 4.99946 4.99994 5.00047 5.00073 5.00086 
-    5.00092 5.00094 5.00091 5.00087 5.00081 5.00074 5.00067 
-    5.00059 5.00052 5.00046 5.0004 5.00034 5.0003 5.00026 5.00022 
-    5.00019 5.00016 5.00014 5.00012 5.0001 5.00009 5.00007 5.00006 
-    5.00006 5.00005 5.00004 5.00004 5.00004 5.00003 5.00003 
-    5.00003 5.00002 5.00002 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00002 5.00002 
-}
-v23 set {
-    5 5.00284 5.01266 5.01895 4.98936 4.99575 4.99217 4.99545 
-    4.99775 4.99894 4.99946 4.99968 4.99975 4.99977 4.99986 
-    4.9999 4.99528 4.99808 5.00039 5.00392 5.00512 4.99985 4.99863 
-    4.99942 4.99992 5.00017 4.99897 4.99803 4.99784 4.99739 
-    4.99883 5.00365 5.00298 5.00133 5.00048 5.00019 5.00008 
-    5.00005 5.00004 5.00003 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 4.99999 4.99997 4.99995 4.99996 
-    4.99998 5 5.00001 5.00001 5.00002 5.00002 5.00003 5.00003 
-    5.00002 5.00002 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5.00217 5.00108 4.99547 4.99658 5.00667 
-    4.99641 4.99532 4.99938 5.00328 5.00222 5.00114 5.00052 
-    5.00024 5.00011 5.00009 4.99285 4.99591 4.99897 5.00403 
-    5.00786 5.00318 4.99942 4.9992 4.99949 5.001 5.00408 5.00319 
-    5.00063 4.99995 5.00014 4.99982 4.99832 4.99838 4.99865 
-    4.99912 4.99836 4.99735 4.99606 4.99814 5.00958 5.02973 
-    5.05293 5.06103 4.99342 4.80726 4.50744 4.07509 3.41358 
-    2.37924 1.03194 0.261552 0.142392 0.0904482 0.0555071 0.0322869 
-    0.018289 0.0113802 0.00875182 0.00757055 0.00629906 0.00523 
-    0.00403349 0.0031953 0.00280864 0.00286119 0.00250389 0.00202815 
-    0.001723 0.00147312 0.0012411 0.00104401 0.000886204 0.000758277 
-    0.000651915 0.00056348 0.000487966 0.000424048 0.000365613 
-    0.000308178 0.000258725 0.000228061 0.000207976 0.000198491 
-    0.00018518 0.000172716 0.000163197 0.000155007 0.000141734 
-    0.000128461 0.000115188 0.000101915 8.86417e-05 7.53686e-05 
-    6.20956e-05 5.69164e-05 5.23275e-05 4.77385e-05 4.31495e-05 
-    3.85605e-05 3.39716e-05 2.93826e-05 2.69449e-05 2.56224e-05 
-    2.42999e-05 2.29774e-05 2.16549e-05 2.03324e-05 1.90099e-05 
-    1.76873e-05 1.63648e-05 1.50423e-05 1.37198e-05 1.23973e-05 
-    1.10748e-05 9.75232e-06 8.48447e-06 7.65129e-06 6.81811e-06 
-    5.98494e-06 5.15176e-06 0.00056893 -0.00787906 -0.0217381 
-    -0.0370066 -0.00770505 0.00659312 0.00975477 0.00949456 
-    0.00777552 0.00655645 0.00568776 0.00508782 0.00458121 0.00410187 
-    0.00365665 0.0015121 0.00160863 0.00263181 0.00638941 0.00772607 
-    0.00225583 0.0010843 0.000882939 0.000801563 0.00075632 
-    0.000554992 0.000435131 0.0003474 0.000217667 0.000491602 
-    0.0012267 0.00250446 0.000212058 -0.0174972 -0.0527527 -0.0479071 
-    0.194908 1.45838 3.40677 4.49242 4.86894 4.97215 5.01218 
-    5.04342 5.06228 5.03069 4.87169 4.57056 4.11523 3.38264 
-    2.19691 0.715839 0.172818 0.102162 0.0627162 0.0363388 0.020289 
-    0.0119414 0.00826608 0.0066417 0.00549092 0.00492505 0.00439443 
-    0.0037156 0.00306471 0.00247451 0.00195965 0.0014822 0.0010815 
-    0.000904464 0.0010514 0.00152308 0.00120752 0.000228447 
-    -0.00102833 -0.00116644 -0.00042067 4.78758e-05 5.09599e-05 
-    -4.45756e-05 -3.22966e-06 3.81163e-05 7.94622e-05 0.000120808 
-    0.000162154 0.000161895 0.000148481 0.000135068 0.000121654 
-    0.000108241 9.81453e-05 9.2164e-05 8.61827e-05 8.02014e-05 
-    7.42201e-05 6.82388e-05 6.22576e-05 5.62763e-05 5.0295e-05 
-    4.43137e-05 3.83324e-05 3.54323e-05 3.321e-05 3.09877e-05 
-    2.87654e-05 2.65431e-05 2.43209e-05 2.20986e-05 1.98763e-05 
-    1.7654e-05 1.54317e-05 1.34612e-05 1.25441e-05 1.1627e-05 
-    1.07099e-05 9.79276e-06 8.87564e-06 7.95851e-06 7.04139e-06 
-    6.12427e-06 
-}
-v24 set {
-    5 5.01099 5.00866 4.97845 4.92369 4.9273 4.97413 4.9929 
-    4.99826 4.99958 4.99978 5.00005 4.99968 4.99959 5.00014 
-    4.99979 4.99914 4.99982 5.00023 5.00295 5.00664 4.99854 
-    4.99647 5.00438 5.01722 5.03681 5.04766 5.04799 5.04867 
-    5.04873 5.04685 5.04413 5.0367 5.02505 5.01726 5.01183 5.00806 
-    5.00549 5.00371 5.00246 5.00162 5.00105 5.00069 5.00045 
-    5.00031 5.00024 5.00019 5.00012 5.00007 5.00004 5.00001 
-    4.99998 4.99999 4.99999 5 5.00001 5.00001 5.00002 5.00002 
-    5.00003 5.00003 5.00003 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5.00418 4.99953 4.99152 
-    4.99807 5.00497 5.00112 5.00055 5.00038 5.00018 5.00006 
-    5.00006 5.00007 5.00006 5.00004 5.00004 4.99853 4.99945 
-    4.99998 5.00304 5.00935 5.00742 4.99181 4.97421 4.93603 
-    4.8853 4.8927 4.93984 4.97458 4.99039 4.99614 4.99801 4.99851 
-    4.99869 4.99924 5.00108 5.00181 5.00119 5.00059 5.00031 
-    5.00022 5.00018 5.00011 5.00001 5.00006 4.99981 4.99977 
-    4.99982 5.00012 4.99993 5.00008 5.00043 5.00048 5.00024 
-    5.00008 4.99984 4.99993 5.00011 4.99996 4.9998 4.99977 4.9998 
-    4.99993 5.00008 5.00011 5.00002 4.99995 4.99989 4.99993 
-    5 5.00007 5.00009 4.99994 4.99977 4.9997 4.99975 4.99996 
-    4.99996 4.99988 4.9997 4.99952 4.9995 4.99956 4.99973 4.99988 
-    5.00005 5.00025 5.00042 5.00036 5.00031 5.00025 5.0002 5.00014 
-    5.00009 5.00003 5.00002 5.00001 5.00001 5 4.99999 4.99998 
-    4.99998 4.99997 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5.00284 
-    5.00442 5.00381 4.98997 4.99092 5.00733 5.07791 4.98237 
-    4.86434 4.76835 4.74067 4.79278 4.85094 4.90068 4.93603 
-    4.95698 4.96984 4.97856 4.98869 4.99904 5.0005 4.99524 5.00181 
-    5.01878 5.05177 5.07986 4.98917 4.56217 3.68 2.3539 1.18541 
-    0.505772 0.221044 0.115287 0.0760938 0.0589194 0.0476784 
-    0.0457213 0.0412911 0.033889 0.0259741 0.0191452 0.0139018 
-    0.0100235 0.00711788 0.00497657 0.00349368 0.00250021 0.00176179 
-    0.00121843 0.000838368 0.000582711 0.000423458 0.000294608 
-    0.000201251 0.000133748 8.6227e-05 5.44252e-05 3.30514e-05 
-    1.93926e-05 1.09814e-05 5.29857e-06 1.92247e-06 3.08708e-07 
-    -3.74311e-07 -6.11121e-07 -7.27807e-07 -4.87604e-07 -4.80493e-07 
-    -9.15925e-07 -2.03774e-06 -4.01128e-06 -2.46644e-06 2.10626e-06 
-    8.22422e-06 1.04922e-05 9.83047e-06 7.27106e-06 3.29654e-06 
-    -2.06736e-06 -2.18019e-06 -2.29303e-06 -2.40586e-06 -2.51869e-06 
-    -2.63153e-06 -2.24615e-06 -1.70325e-06 -1.16036e-06 -6.17468e-07 
-    -7.45754e-08 2.45198e-07 2.88285e-07 3.31373e-07 3.7446e-07 
-    4.17548e-07 4.60635e-07 5.03723e-07 5.4681e-07 5.89898e-07 
-    6.32985e-07 6.76073e-07 6.19054e-07 5.4001e-07 4.60967e-07 
-    3.81923e-07 3.02879e-07 2.23836e-07 1.44792e-07 6.57488e-08 
-    -1.32948e-08 -9.23383e-08 -1.6698e-07 -2.23206e-07 -2.79432e-07 
-    -3.35658e-07 -3.91884e-07 -4.48109e-07 -5.04335e-07 -5.60561e-07 
-    -6.16787e-07 
-}
-v25 set {
-    1.34824 1.35838 1.36465 1.34675 1.29167 1.23161 1.2201 1.2185 
-    1.2181 1.21798 1.21793 1.21788 1.21785 1.21782 1.21779 1.21776 
-    1.21655 1.21656 1.21669 1.21871 1.22421 1.22247 1.21858 
-    1.2228 1.23803 1.27737 1.10647 0.395248 0.0600669 0.027687 
-    0.0192374 0.015425 0.0130881 0.00977445 0.00696598 0.00491122 
-    0.00341952 0.00237078 0.00162339 0.00109178 0.000726647 
-    0.000478886 0.00031568 0.000207902 0.000143494 0.000109768 
-    8.62987e-05 5.69775e-05 3.36547e-05 2.30356e-05 1.86108e-05 
-    1.41861e-05 1.08293e-05 7.68835e-06 4.79593e-06 4.51019e-06 
-    4.22444e-06 3.9387e-06 3.65295e-06 3.36721e-06 3.04559e-06 
-    2.69981e-06 2.35403e-06 2.00825e-06 1.66247e-06 1.34508e-06 
-    1.26225e-06 1.17941e-06 1.09657e-06 1.01373e-06 9.30893e-07 
-    8.48054e-07 7.65216e-07 6.82378e-07 5.9954e-07 5.16702e-07 
-    4.37489e-07 3.82774e-07 3.2806e-07 2.73346e-07 2.18632e-07 
-    1.63917e-07 1.09203e-07 5.4489e-08 -2.2523e-10 -5.49395e-08 
-    -1.09654e-07 -1.52862e-07 -1.3079e-07 -1.08718e-07 -8.6646e-08 
-    -6.45739e-08 -4.25019e-08 -2.04298e-08 1.64229e-09 2.37144e-08 
-    4.57864e-08 6.78585e-08 8.71693e-08 9.30725e-08 9.89758e-08 
-    1.04879e-07 1.10782e-07 1.16685e-07 1.22589e-07 1.28492e-07 
-    1.34395e-07 1.40298e-07 1.46201e-07 1.52105e-07 1.58008e-07 
-    1.63911e-07 1.69814e-07 1.75718e-07 1.81621e-07 1.87524e-07 
-    1.93427e-07 1.9933e-07 2.05234e-07 2.11137e-07 2.19788e-07 
-    0.000393944 -0.000218983 -0.00105784 0.00172403 -0.00027134 
-    -0.000204147 8.79968e-06 5.93762e-05 5.83554e-05 4.13815e-05 
-    3.71369e-05 3.03372e-05 2.25336e-05 1.5986e-05 1.07284e-05 
-    -7.5239e-05 5.60593e-05 6.97571e-05 0.000667617 0.000960856 
-    0.00131749 -0.00759564 -0.0217897 -0.0450321 -0.076646 -0.128569 
-    -0.186391 -0.202175 -0.206953 -0.2082 -0.208416 -0.208669 
-    -0.208934 -0.209111 -0.209234 -0.209329 -0.209389 -0.209416 
-    -0.2094 -0.209329 -0.20926 -0.209204 -0.209208 -0.209285 
-    -0.209454 -0.209641 -0.20977 -0.209811 -0.209833 -0.209887 
-    -0.209653 -0.209127 -0.208893 -0.208811 -0.208777 -0.208758 
-    -0.208747 -0.20874 -0.208726 -0.208697 -0.208657 -0.208611 
-    -0.208565 -0.208524 -0.208488 -0.208451 -0.208412 -0.208373 
-    -0.208333 -0.208294 -0.208256 -0.208219 -0.208183 -0.208145 
-    -0.208107 -0.208066 -0.208029 -0.207993 -0.207959 -0.207923 
-    -0.207883 -0.207838 -0.207789 -0.207747 -0.20771 -0.207675 
-    -0.207642 -0.207605 -0.207568 -0.207531 -0.207494 -0.207457 
-    -0.20742 -0.207383 -0.207346 -0.207308 -0.207271 -0.207233 
-    -0.207196 -0.207158 -0.207121 -0.207084 -0.207046 -0.207009 
-    -0.206972 -0.206935 -0.206898 -0.206861 -0.206823 -0.206786 
-    -0.206749 -0.206712 -0.206675 -0.206638 -0.2066 -0.206563 
-    -0.206526 -0.206489 -0.206452 -0.206415 -0.203384 -0.20015 
-    -0.196872 -0.205024 -0.210727 -0.206779 -0.0685263 0.586138 
-    1.4665 2.22945 2.77554 3.076 3.24926 3.34515 3.40164 3.43006 
-    3.43713 3.43075 3.42886 3.4384 3.46567 3.49025 3.51287 3.53821 
-    3.57841 3.39846 2.80753 2.22947 1.7549 1.30429 0.707786 
-    0.303206 0.131352 0.0671706 0.0429955 0.032461 0.0257161 
-    0.0239521 0.0217397 0.0179705 0.0138745 0.0102813 0.00749643 
-    0.0054328 0.00386817 0.0027004 0.00189442 0.00135552 0.000954715 
-    0.000659981 0.000453435 0.000313993 0.000231347 0.000159665 
-    0.000108122 7.10528e-05 4.50233e-05 2.77892e-05 1.62765e-05 
-    8.9893e-06 4.5471e-06 1.54614e-06 -1.6542e-07 -8.68508e-07 
-    -1.04369e-06 -9.63086e-07 -8.44294e-07 -6.57339e-07 -7.35885e-07 
-    -9.80056e-07 -1.39772e-06 -2.10199e-06 -1.37474e-06 6.13269e-07 
-    3.3028e-06 4.60941e-06 4.91053e-06 4.14186e-06 2.45258e-06 
-    -8.7388e-09 -3.59647e-07 -7.10554e-07 -1.06146e-06 -1.41237e-06 
-    -1.76328e-06 -1.63073e-06 -1.34534e-06 -1.05995e-06 -7.74561e-07 
-    -4.8917e-07 -2.95733e-07 -2.16326e-07 -1.3692e-07 -5.75135e-08 
-    2.18929e-08 1.01299e-07 1.80706e-07 2.60112e-07 3.39519e-07 
-    4.18925e-07 4.98332e-07 4.83984e-07 4.4901e-07 4.14035e-07 
-    3.79061e-07 3.44087e-07 3.09112e-07 2.74138e-07 2.39163e-07 
-    2.04189e-07 1.69215e-07 1.26002e-07 4.83213e-08 -2.9359e-08 
-    -1.07039e-07 -1.8472e-07 -2.624e-07 -3.4008e-07 -4.1776e-07 
-    -4.95441e-07 
-}
-v26 set {
-    7.10441e-10 0.000309731 -0.000308186 -0.001694 -0.00360784 
-    8.40909e-05 0.00203175 0.0012896 0.000596548 0.000277191 
-    0.000161134 0.000120439 8.4915e-05 9.49929e-05 6.18812e-05 
-    1.65433e-05 1.89682e-05 3.97578e-05 4.95446e-05 0.000225325 
-    0.000214579 -0.00230134 -0.000451102 0.00997237 0.0341443 
-    0.0449314 0.0424411 0.0341996 0.0315315 0.0308892 0.0291614 
-    0.024365 0.0190282 0.0188976 0.017238 0.0138526 0.0105645 
-    0.00778548 0.00561753 0.0039871 0.00279554 0.00194075 0.0013468 
-    0.000934775 0.000664723 0.000498911 0.000377384 0.000254183 
-    0.000163421 0.000120773 9.65058e-05 7.22384e-05 5.60316e-05 
-    4.14549e-05 2.79516e-05 2.57096e-05 2.34677e-05 2.12257e-05 
-    1.89837e-05 1.67417e-05 1.46737e-05 1.27228e-05 1.07719e-05 
-    8.82099e-06 6.87009e-06 5.0896e-06 4.71705e-06 4.34451e-06 
-    3.97196e-06 3.59941e-06 3.22686e-06 2.85431e-06 2.48176e-06 
-    2.10921e-06 1.73666e-06 1.36411e-06 1.02855e-06 9.42931e-07 
-    8.57316e-07 7.71701e-07 6.86086e-07 6.00471e-07 5.14856e-07 
-    4.29241e-07 3.43626e-07 2.58011e-07 1.72396e-07 9.85409e-08 
-    9.14091e-08 8.42773e-08 7.71456e-08 7.00138e-08 6.2882e-08 
-    5.57503e-08 4.86185e-08 4.14867e-08 3.4355e-08 2.72232e-08 
-    2.05821e-08 1.63235e-08 1.2065e-08 7.80643e-09 3.54786e-09 
-    -7.10696e-10 -4.96926e-09 -9.22782e-09 -1.34864e-08 -1.77449e-08 
-    -2.20035e-08 -2.62621e-08 -3.05206e-08 -3.47792e-08 -3.90378e-08 
-    -4.32963e-08 -4.75549e-08 -5.18134e-08 -5.6072e-08 -6.03306e-08 
-    -6.45891e-08 -6.88477e-08 -8.76373e-06 0.000131607 -0.00021685 
-    -0.000433027 0.00047234 0.000211593 -0.000189601 3.2492e-05 
-    0.000575955 7.72235e-05 -0.000285172 -0.000242061 -0.000135112 
-    -3.50117e-05 -2.75868e-05 5.48974e-05 1.80604e-07 5.48911e-05 
-    3.97478e-05 0.000192909 0.000297932 0.00402253 -0.0122366 
-    -0.047853 -0.0963082 -0.108071 -0.0567275 -0.0239271 -0.0178628 
-    -0.0233027 -0.031853 -0.0400843 -0.0482725 -0.0576154 -0.0627218 
-    -0.0511236 -0.0279524 -0.0150986 -0.00931091 -0.00652876 
-    -0.00479286 -0.00344346 -0.00249578 -0.0019532 -0.00157977 
-    -0.00131848 -0.00111251 -0.000939229 -0.000797445 -0.000708384 
-    -0.000630452 -0.000539722 -0.000508862 -0.000480596 -0.000439484 
-    -0.000407217 -0.000363866 -0.000329506 -0.000318642 -0.000307362 
-    -0.000286511 -0.000266253 -0.000242943 -0.000218107 -0.000204661 
-    -0.00020241 -0.000194435 -0.000185062 -0.000173042 -0.000160549 
-    -0.000151407 -0.000145626 -0.000145976 -0.000147342 -0.000145288 
-    -0.000137979 -0.000124481 -0.000123218 -0.000127453 -0.000139006 
-    -0.000145486 -0.000129764 -9.82749e-05 -4.72596e-05 -3.08671e-05 
-    -3.28834e-05 -4.52254e-05 -6.25389e-05 -6.32516e-05 -6.39643e-05 
-    -6.4677e-05 -6.53897e-05 -6.61023e-05 -6.6815e-05 -6.75277e-05 
-    -6.61005e-05 -6.45173e-05 -6.29341e-05 -6.13509e-05 -5.97676e-05 
-    -5.81844e-05 -5.66012e-05 -5.54231e-05 -5.4455e-05 -5.3487e-05 
-    -5.25189e-05 -5.15508e-05 -5.05828e-05 -4.96147e-05 -4.86466e-05 
-    -4.76785e-05 -4.67105e-05 -4.57424e-05 -4.47743e-05 -4.38063e-05 
-    -4.28382e-05 -4.18821e-05 -4.10211e-05 -4.016e-05 -3.9299e-05 
-    -3.8438e-05 4.29885e-05 5.14113e-05 -0.000127986 -0.000611463 
-    -0.000149428 0.000882394 0.00297059 -0.00405825 -0.00591067 
-    -0.00546997 -0.00158744 0.00190677 0.00298403 0.00268595 
-    0.00196161 0.00130289 0.000783347 0.000520683 0.000565306 
-    0.00053419 -0.00224696 -0.000920818 0.0132755 0.0322504 
-    0.0442808 0.0638615 0.0701007 0.0539356 0.0247771 0.056244 
-    0.294266 0.831368 1.45424 2.02898 2.54559 2.9937 3.35333 
-    3.72609 4.06363 4.32789 4.52413 4.66504 4.7652 4.83637 4.88631 
-    4.92109 4.94464 4.96046 4.97218 4.98079 4.98679 4.99076 
-    4.99361 4.99555 4.99686 4.99783 4.99853 4.99902 4.99936 
-    4.99959 4.99973 4.99983 4.9999 4.99993 4.99996 4.99998 5 
-    5.00001 5 4.99999 4.99997 4.99994 4.99993 4.99994 4.99996 
-    4.99999 5.00004 5.00006 5.00005 5.00003 5.00002 5.00001 
-    5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    
-}
-v27 set {
-    5 4.99984 4.99796 4.99478 4.9889 4.98738 4.98896 4.99087 
-    4.99262 4.99419 4.99552 4.99659 4.99743 4.99807 4.99855 
-    4.9989 4.99894 4.99908 4.99935 5.00001 5.0007 5.00132 5.00032 
-    4.99976 5.00134 5.00339 5.00315 5.00157 5.00091 5.00058 
-    5.00012 4.99944 4.99886 4.9994 4.99934 4.99899 4.99876 4.99868 
-    4.99872 4.99883 4.99898 4.99914 4.9993 4.99944 4.99956 4.99967 
-    4.99976 4.99982 4.99986 4.9999 4.99993 4.99997 4.99997 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00009 5.00028 5.00015 4.99983 
-    5.00036 4.99996 4.99834 4.99783 5.00383 5.00734 5.00387 
-    5.00058 4.99893 4.99836 4.99832 4.99854 4.99873 4.99905 
-    4.99927 4.99952 4.99969 4.99834 4.99536 4.99163 4.99073 
-    5.0053 5.03631 5.03103 4.9008 4.62503 4.21887 3.70902 3.09967 
-    2.35791 1.41912 0.519675 0.210458 0.131362 0.0980819 0.0708209 
-    0.0471701 0.0323272 0.0253535 0.0199144 0.0152615 0.0117228 
-    0.00917696 0.00738117 0.00609292 0.00512664 0.00436184 0.0037961 
-    0.00331639 0.00289006 0.0025477 0.00226529 0.00202925 0.00182793 
-    0.00165474 0.00150531 0.00137529 0.00125983 0.00115603 0.00106455 
-    0.000982977 0.000911255 0.000846819 0.000790092 0.000738698 
-    0.000692816 0.00065107 0.000613595 0.000579642 0.000548935 
-    0.00052106 0.000495598 0.000472174 0.000450849 0.000431118 
-    0.000412667 0.000395868 0.000381319 0.000368487 0.000357327 
-    0.000344212 0.000330334 0.00031622 0.000303298 0.000295809 
-    0.00028832 0.000280831 0.000273342 0.000265853 0.000258364 
-    0.000250875 0.000245118 0.000239488 0.000233857 0.000228227 
-    0.000222596 0.000216966 0.000211336 0.000207047 0.000203455 
-    0.000199863 0.00019627 0.000192678 0.000189085 0.000185493 
-    0.0001819 0.000178308 0.000174716 0.000171123 0.000167531 
-    0.000163938 0.000160346 0.000156835 0.000153973 0.00015111 
-    0.000148248 0.000145385 0.000296579 -3.96718e-05 -0.000449085 
-    0.000323433 0.000750086 0.000268264 0.000149028 -0.000100249 
-    7.00956e-05 0.00012605 0.00022592 0.000193036 0.000120453 
-    8.07865e-05 7.65771e-05 -3.27828e-05 0.000116759 0.000169498 
-    0.000409804 0.000414965 0.00092323 -0.00590633 -0.0175477 
-    -0.032433 -0.0559842 -0.0820373 0.0688484 0.626629 1.32929 
-    2.01657 2.60925 3.12329 3.38952 3.14128 2.38463 1.23802 
-    0.316019 0.107832 0.0694707 0.051837 0.035247 0.0209999 
-    0.0116618 0.00967674 0.00789182 0.00574566 0.00386872 0.00258612 
-    0.00167126 0.00104169 0.000641093 0.000401246 0.000277928 
-    0.000171775 0.000102266 5.89376e-05 3.29258e-05 1.80463e-05 
-    1.0057e-05 6.4571e-06 5.10093e-06 4.06791e-06 3.62716e-06 
-    3.63321e-06 3.99625e-06 4.64368e-06 5.20886e-06 4.77728e-06 
-    3.23919e-06 1.14113e-06 -1.29416e-06 -4.15607e-06 -1.88532e-06 
-    5.24411e-06 1.38678e-05 1.28823e-05 3.6758e-06 -2.52285e-06 
-    -3.97133e-06 -4.03071e-06 -3.37154e-06 -2.71238e-06 -2.05321e-06 
-    -1.39404e-06 -7.34872e-07 -3.73325e-07 -1.05873e-07 1.61578e-07 
-    4.2903e-07 6.96482e-07 8.18468e-07 7.60065e-07 7.01662e-07 
-    6.43258e-07 5.84855e-07 5.26452e-07 4.68049e-07 4.09646e-07 
-    3.51243e-07 2.9284e-07 2.34437e-07 1.71213e-07 1.06928e-07 
-    4.2644e-08 -2.16403e-08 -8.59247e-08 -1.50209e-07 -2.14493e-07 
-    -2.78778e-07 -3.43062e-07 -4.07346e-07 -4.55065e-07 -4.3348e-07 
-    -4.11896e-07 -3.90311e-07 -3.68726e-07 -3.47141e-07 -3.25556e-07 
-    -3.03971e-07 -2.82386e-07 
-}
-v28 set {
-    0.368163 0.361756 0.327463 0.269513 0.149476 0.0805716 0.0501146 
-    0.03403 0.0230886 0.0160474 0.0116071 0.00870013 0.00679614 
-    0.00542384 0.00432512 0.00340653 -0.00129719 -0.00399429 
-    -0.00318719 0.00443085 0.0150156 0.0334147 0.0132288 -0.0189751 
-    -0.0508377 -0.0252174 -0.0142489 -0.00675908 -0.0038653 
-    -0.00243423 -0.00168891 -0.00120901 -0.000900426 -0.000685575 
-    -0.000557595 -0.000457268 -0.000377427 -0.000315269 -0.000266613 
-    -0.000228397 -0.000198283 -0.000174248 -0.000154886 -0.00013892 
-    -0.000125864 -0.000115189 -0.000105841 -9.66611e-05 -8.84262e-05 
-    -8.23872e-05 -7.74668e-05 -7.25463e-05 -6.79992e-05 -6.35276e-05 
-    -5.92413e-05 -5.68994e-05 -5.45574e-05 -5.22154e-05 -4.98735e-05 
-    -4.75315e-05 -4.54981e-05 -4.36726e-05 -4.18471e-05 -4.00216e-05 
-    -3.81961e-05 -3.64559e-05 -3.54209e-05 -3.43858e-05 -3.33508e-05 
-    -3.23157e-05 -3.12807e-05 -3.02456e-05 -2.92105e-05 -2.81755e-05 
-    -2.71404e-05 -2.61054e-05 -2.51232e-05 -2.44984e-05 -2.38736e-05 
-    -2.32487e-05 -2.26239e-05 -2.19991e-05 -2.13742e-05 -2.07494e-05 
-    -2.01246e-05 -1.94998e-05 -1.88749e-05 -1.82865e-05 -1.79044e-05 
-    -1.75224e-05 -1.71403e-05 -1.67582e-05 -1.63762e-05 -1.59941e-05 
-    -1.56121e-05 -1.523e-05 -1.4848e-05 -1.44659e-05 -1.41138e-05 
-    -1.39075e-05 -1.37011e-05 -1.34947e-05 -1.32883e-05 -1.30819e-05 
-    -1.28755e-05 -1.26691e-05 -1.24627e-05 -1.22563e-05 -1.205e-05 
-    -1.18436e-05 -1.16372e-05 -1.14308e-05 -1.12244e-05 -1.1018e-05 
-    -1.08116e-05 -1.06052e-05 -1.03988e-05 -1.01924e-05 -9.98605e-06 
-    -9.77966e-06 -2.85319e-05 0.00281092 0.00180106 -0.000981083 
-    0.00551926 -0.00119763 -0.0295069 -0.0367677 0.064749 0.119022 
-    0.0882007 0.0552062 0.03418 0.0223243 0.015545 0.011949 
-    0.00757134 0.00667655 0.00583243 0.00644443 0.00650959 -0.0302575 
-    -0.0437806 -0.0355466 0.0381776 0.282109 0.674178 1.07582 
-    1.45189 1.789 2.08649 2.34663 2.57245 2.81211 3.04778 3.2523 
-    3.45877 3.65593 3.83396 3.9923 4.13368 4.25864 4.36719 4.46064 
-    4.54086 4.60962 4.66835 4.71838 4.76094 4.79716 4.82796 
-    4.85413 4.87634 4.89518 4.91116 4.92476 4.93631 4.94608 
-    4.95434 4.9613 4.96715 4.97211 4.97638 4.98001 4.98312 4.98571 
-    4.98795 4.98979 4.99138 4.99269 4.99381 4.99474 4.99551 
-    4.99615 4.99668 4.99713 4.99752 4.99783 4.99811 4.99836 
-    4.99858 4.99873 4.99884 4.99892 4.999 4.99907 4.99912 4.99916 
-    4.99921 4.99926 4.99932 4.99937 4.99942 4.99948 4.99953 
-    4.99956 4.99958 4.99961 4.99963 4.99966 4.99968 4.99971 
-    4.99972 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 
-    4.99979 4.9998 4.9998 4.99981 4.99982 4.99983 4.99984 4.99985 
-    4.99986 4.99986 4.99987 4.99987 5.00498 5.00354 4.99359 
-    4.98981 5.00498 5.00099 5.00041 5.00022 5.00015 5.00012 
-    5.0001 5.00008 5.00005 5.00003 5 4.99431 4.99459 4.99591 
-    5.00087 5.01029 5.03935 4.92784 4.51643 3.78356 2.68745 
-    1.43417 0.583128 0.205094 0.0777337 0.0391566 0.02723 0.023883 
-    0.018808 0.010165 0.00254623 -0.00377463 -0.0038097 0.00144145 
-    0.00267231 0.00193045 0.00144538 0.00121758 0.00112893 0.00109424 
-    0.0010226 0.000948072 0.000882573 0.000826996 0.000776391 
-    0.000729719 0.000686499 0.000647333 0.000610108 0.000575631 
-    0.000545069 0.000515485 0.000488514 0.000465316 0.000443215 
-    0.000422454 0.00040292 0.00038488 0.000368472 0.000353628 
-    0.000339643 0.000326197 0.000313483 0.000302884 0.000294038 
-    0.000284003 0.000270941 0.000254925 0.000246511 0.000244089 
-    0.000245538 0.000242099 0.000235728 0.000227482 0.000218001 
-    0.000207257 0.000202127 0.000196997 0.000191868 0.000186738 
-    0.000181608 0.00017758 0.000173899 0.000170219 0.000166538 
-    0.000162857 0.000159576 0.00015679 0.000154005 0.000151219 
-    0.000148433 0.000145647 0.000142861 0.000140076 0.00013729 
-    0.000134504 0.000131718 0.000129603 0.000127635 0.000125668 
-    0.0001237 0.000121732 0.000119765 0.000117797 0.000115829 
-    0.000113862 0.000111894 0.000109993 0.000108372 0.000106751 
-    0.00010513 0.000103509 0.000101887 0.000100266 9.86449e-05 
-    9.70237e-05 
-}
-v29 set {
-    5 4.99899 4.99654 4.99327 4.9863 4.98954 4.99212 4.99378 
-    4.9951 4.99624 4.99715 4.99786 4.99839 4.99879 4.99909 4.99931 
-    4.99922 4.99933 4.99971 5.00064 5.00084 5.00123 4.99865 
-    4.99853 4.99983 5.00457 5.00242 5.00105 5.00062 5.00042 
-    4.99971 4.9994 4.9992 4.9996 4.99955 4.99932 4.99918 4.99915 
-    4.99919 4.99927 4.99937 4.99948 4.99957 4.99966 4.99974 
-    4.9998 4.99985 4.99989 4.99992 4.99993 4.99994 4.99994 4.99996 
-    4.99998 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 4.9997 4.99998 4.99954 4.99963 
-    5.00059 4.99945 4.99732 4.99957 5.00919 5.00558 5.00033 
-    4.99851 4.9983 4.99854 4.99871 4.99928 4.99914 4.99939 4.99952 
-    4.9998 4.99976 4.99744 4.99598 4.99478 4.99806 5.01911 5.04602 
-    5.05469 5.01317 4.89484 4.69655 4.42036 4.06069 3.60793 
-    3.12531 2.72975 2.45187 2.25081 2.09841 1.98509 1.90211 
-    1.84084 1.79411 1.7574 1.72763 1.70283 1.68188 1.66389 1.64823 
-    1.63438 1.62201 1.61088 1.60081 1.59163 1.58323 1.57549 
-    1.56835 1.56173 1.55558 1.54985 1.54451 1.53951 1.53479 
-    1.53035 1.52615 1.5222 1.51845 1.5149 1.51153 1.50834 1.50529 
-    1.5024 1.49964 1.497 1.49449 1.49208 1.48977 1.48755 1.48542 
-    1.48336 1.48138 1.47948 1.47765 1.4759 1.47419 1.47255 1.47096 
-    1.46949 1.46823 1.46696 1.4657 1.46444 1.46317 1.46191 1.46065 
-    1.45956 1.4585 1.45743 1.45636 1.45529 1.45422 1.45315 1.45226 
-    1.45145 1.45064 1.44983 1.44902 1.44821 1.4474 1.44659 1.44579 
-    1.44498 1.44417 1.44336 1.44255 1.44174 1.44094 1.44019 
-    1.43944 1.43868 1.43793 1.43765 1.43679 1.43515 1.43405 
-    1.43478 1.43387 1.43345 1.43184 1.43086 1.43021 1.43003 
-    1.42988 1.42944 1.42883 1.42818 1.42702 1.42642 1.42595 
-    1.42586 1.42616 1.42783 1.41733 1.38106 1.30738 1.3877 2.09819 
-    3.05285 3.58059 3.77601 3.87609 4.02557 4.24887 4.4608 4.60411 
-    4.72109 4.8255 4.90465 4.97379 5.01253 5.01532 5.01239 5.0092 
-    5.00665 5.00474 5.00333 5.00232 5.00163 5.00117 5.00082 
-    5.00057 5.00039 5.00027 5.00019 5.00013 5.00009 5.00006 
-    5.00004 5.00003 5.00002 5.00001 5.00001 5 5 5 4.99998 4.99995 
-    4.99992 4.99996 5.00005 5.00012 5.00008 4.99996 4.9999 4.99985 
-    4.99986 4.99997 5.00021 5.0003 5.00024 5.00009 5.00007 5.00005 
-    5.00003 5.00001 4.99998 4.99998 4.99998 4.99999 4.99999 
-    5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 
-}
-v30 set {
-    7.10441e-10 5.70385e-05 0.000226143 0.000131916 -0.000887764 
-    -8.01837e-05 -3.49653e-05 9.40039e-05 0.000118663 0.000108025 
-    8.6059e-05 6.33268e-05 4.99295e-05 3.16843e-05 3.60692e-05 
-    2.07572e-05 -8.6375e-05 3.44583e-05 8.07397e-05 0.000196296 
-    0.000115615 -7.12768e-05 -0.000129812 -4.18679e-05 7.94364e-05 
-    0.000182034 -5.41226e-05 -0.000451819 -0.000713937 -0.00129863 
-    -0.00262186 -0.00213417 -0.00133767 0.000775698 0.000969902 
-    0.000549281 0.000280946 0.000140321 8.6919e-05 7.22446e-05 
-    6.5631e-05 6.45263e-05 6.63087e-05 7.17391e-05 7.59042e-05 
-    7.59172e-05 7.03353e-05 6.33558e-05 5.31136e-05 4.64278e-05 
-    4.40594e-05 4.16909e-05 4.05674e-05 3.96957e-05 3.87875e-05 
-    3.74977e-05 3.62079e-05 3.49181e-05 3.36283e-05 3.23385e-05 
-    3.12427e-05 3.02775e-05 2.93124e-05 2.83472e-05 2.7382e-05 
-    2.64613e-05 2.59077e-05 2.5354e-05 2.48004e-05 2.42468e-05 
-    2.36931e-05 2.31395e-05 2.25859e-05 2.20322e-05 2.14786e-05 
-    2.0925e-05 2.03916e-05 1.9995e-05 1.95984e-05 1.92019e-05 
-    1.88053e-05 1.84087e-05 1.80122e-05 1.76156e-05 1.7219e-05 
-    1.68225e-05 1.64259e-05 1.6051e-05 1.57991e-05 1.55471e-05 
-    1.52952e-05 1.50433e-05 1.47913e-05 1.45394e-05 1.42875e-05 
-    1.40356e-05 1.37836e-05 1.35317e-05 1.32978e-05 1.31513e-05 
-    1.30048e-05 1.28583e-05 1.27118e-05 1.25653e-05 1.24188e-05 
-    1.22724e-05 1.21259e-05 1.19794e-05 1.18329e-05 1.16864e-05 
-    1.15399e-05 1.13934e-05 1.12469e-05 1.11005e-05 1.0954e-05 
-    1.08075e-05 1.0661e-05 1.05145e-05 1.0368e-05 1.02215e-05 
-    1.76447e-05 7.21516e-05 -3.59786e-05 -0.000159618 0.000156236 
-    0.000135106 -0.000336402 -0.000302283 0.000699323 0.000473866 
-    -0.000156146 -0.000225625 -0.000123592 -3.78116e-05 8.47472e-06 
-    2.43387e-06 -7.44762e-05 7.80111e-05 9.43608e-05 0.000170159 
-    8.83919e-05 -0.00018802 -0.000373512 -0.000390597 0.000156875 
-    0.0032343 0.00776304 -0.000566905 -0.00760695 -0.0159226 
-    -0.0245989 -0.0331402 -0.0100902 0.067837 0.266702 0.910818 
-    1.82282 2.69714 3.43247 3.98325 4.32893 4.51529 4.67087 
-    4.79288 4.87574 4.92797 4.95902 4.97655 4.98622 4.99195 
-    4.99526 4.99735 4.9991 4.99974 4.99982 4.99974 4.99961 4.9995 
-    4.99943 4.9994 4.9994 4.99942 4.99944 4.99948 4.99952 4.99956 
-    4.99961 4.99965 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 
-    4.99988 4.9999 4.99991 4.99992 4.99993 4.99994 4.99995 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 
-    4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5 
-    5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5.00019 4.99888 4.99663 4.99457 4.99902 
-    5.00229 5.00323 5.00302 5.0023 5.0015 5.00085 5.00041 5.00013 
-    4.99993 4.99979 4.99948 4.99954 4.99983 5.00055 5.00109 
-    5.00009 4.9987 4.998 4.99755 4.99676 4.99618 5.01091 5.05272 
-    5.04156 4.80112 4.27692 3.42343 2.23953 0.967179 0.429813 
-    0.540757 1.32991 2.32147 3.14903 3.78143 4.22325 4.47978 
-    4.59448 4.69875 4.79798 4.87419 4.92339 4.95249 4.97174 
-    4.98408 4.99124 4.99478 4.99729 4.99868 4.9992 4.99941 4.99947 
-    4.99946 4.99943 4.9994 4.99939 4.9994 4.99942 4.99946 4.99951 
-    4.99956 4.99961 4.99967 4.99973 4.99977 4.9998 4.99981 4.99983 
-    4.99984 4.99987 4.99992 5.00001 5.00005 5.00001 4.99994 
-    4.99995 4.99995 4.99996 4.99996 4.99996 4.99997 4.99997 
-    4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99998 
-}
-v31 set {
-    1.8179e-09 -5.28841e-06 -1.44913e-05 -3.62932e-05 -9.75719e-05 
-    0.000141781 3.73396e-05 -1.65603e-05 -1.5271e-05 -6.73884e-06 
-    4.40157e-06 -4.85345e-06 -1.02964e-05 2.03126e-05 -1.89457e-05 
-    -8.75564e-06 7.67422e-06 4.71103e-06 1.29798e-05 6.13469e-06 
-    -1.14363e-05 -0.0394563 -0.0477298 -0.0622012 -0.0519225 
-    0.262499 0.943611 1.67052 2.31017 2.84028 3.28467 3.61582 
-    3.85887 4.13011 4.36511 4.54063 4.67013 4.76408 4.83263 
-    4.8825 4.91837 4.94373 4.96117 4.97318 4.98093 4.98562 4.98906 
-    4.99267 4.99539 4.99666 4.99731 4.99797 4.99844 4.99887 
-    4.99927 4.99933 4.99938 4.99944 4.99949 4.99955 4.9996 4.99965 
-    4.9997 4.99975 4.9998 4.99985 4.99986 4.99987 4.99989 4.9999 
-    4.99991 4.99992 4.99993 4.99995 4.99996 4.99997 4.99998 
-    4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99997 5.00002 5.00004 5.0001 5.0001 4.99987 5.00009 
-    5.00021 5.00002 5.00004 4.99988 5.00013 4.99993 5.00026 
-    4.99973 5 5.00006 5.00009 5.00004 5.00004 5.04854 4.82711 
-    4.04208 2.64155 0.838902 0.19014 0.0982549 0.0723197 0.0576863 
-    0.0427644 0.0301979 0.020146 0.0135728 0.00980358 0.00774482 
-    0.00586604 0.0036687 0.00211511 0.00121906 0.000647581 0.000828436 
-    0.00190938 0.00224254 0.00199956 0.00165488 0.00135612 0.00113715 
-    0.000984181 0.000877175 0.000789973 0.000741139 0.000689338 
-    0.000625676 0.000586082 0.000550152 0.000529573 0.000505606 
-    0.000482117 0.000460574 0.000441649 0.000424674 0.000408398 
-    0.000391914 0.000376272 0.000361487 0.000348181 0.000336045 
-    0.000324466 0.000313545 0.000303046 0.000293056 0.00028356 
-    0.000274586 0.000266155 0.000258279 0.000250938 0.000243789 
-    0.000236912 0.000230244 0.000224186 0.000219291 0.000215346 
-    0.000212468 0.000207291 0.000200862 0.00019368 0.000186767 
-    0.000183515 0.000180263 0.00017701 0.000173758 0.000170506 
-    0.000167253 0.000164001 0.000161164 0.000158357 0.00015555 
-    0.000152743 0.000149936 0.000147129 0.000144322 0.000142066 
-    0.000140096 0.000138127 0.000136157 0.000134187 0.000132218 
-    0.000130248 0.000128278 0.000126308 0.000124339 0.000122369 
-    0.000120399 0.000118429 0.00011646 0.000114527 0.000112892 
-    0.000111258 0.000109623 0.000107988 0.000103598 6.86052e-05 
-    3.337e-05 7.00783e-05 0.000218764 0.000221318 0.000118593 
-    -0.000113962 5.78552e-05 9.42068e-05 0.000237037 0.000171302 
-    0.0001033 6.16066e-05 5.52908e-05 6.30233e-05 7.01897e-05 
-    8.48573e-05 0.000106859 8.37213e-05 -0.0391541 -0.047722 
-    -0.0618454 -0.0169804 0.345725 1.03426 1.74825 2.37152 2.88737 
-    3.32173 3.66761 3.9707 4.17762 3.98832 3.30483 2.09737 0.710892 
-    0.148159 0.0707463 0.0555808 0.045618 0.0319116 0.0199589 
-    0.0133357 0.00898528 0.00586075 0.00375478 0.00245443 0.00156038 
-    0.000962344 0.000590953 0.000375107 0.000250243 0.00015882 
-    0.000100203 6.18122e-05 3.7372e-05 2.23009e-05 1.32569e-05 
-    8.29437e-06 5.72457e-06 3.96832e-06 2.98935e-06 2.59699e-06 
-    2.75024e-06 3.38689e-06 4.0453e-06 3.50095e-06 1.64988e-06 
-    -3.84371e-07 -2.03828e-06 -3.46401e-06 -1.24301e-06 4.63458e-06 
-    1.14104e-05 1.02619e-05 2.15487e-06 -2.98487e-06 -3.67221e-06 
-    -2.94279e-06 -2.58649e-06 -2.23019e-06 -1.87389e-06 -1.5176e-06 
-    -1.1613e-06 -7.92127e-07 -4.18889e-07 -4.56502e-08 3.27588e-07 
-    7.00827e-07 8.79539e-07 8.17025e-07 7.5451e-07 6.91996e-07 
-    6.29481e-07 5.66966e-07 5.04452e-07 4.41937e-07 3.79422e-07 
-    3.16908e-07 2.54393e-07 1.90078e-07 1.25366e-07 6.0654e-08 
-    -4.05776e-09 -6.87696e-08 -1.33481e-07 -1.98193e-07 -2.62905e-07 
-    -3.27617e-07 -3.92329e-07 -4.40392e-07 -4.18802e-07 -3.97213e-07 
-    -3.75624e-07 -3.54035e-07 -3.32446e-07 -3.10856e-07 -2.89267e-07 
-    -2.67678e-07 
-}
-v32 set {
-    1.10294 1.10297 1.10291 1.10277 1.10259 1.10294 1.10313 
-    1.10306 1.10299 1.10296 1.10295 1.10295 1.10294 1.10294 
-    1.10294 1.10294 1.10294 1.10294 1.10294 1.10296 1.10296 
-    1.00547 0.998599 1.5201 2.49297 3.31258 3.73162 3.84757 
-    3.92505 4.02965 4.16599 4.30294 4.41541 4.52886 4.64414 
-    4.73865 4.81065 4.86391 4.90315 4.93188 4.95258 4.96726 
-    4.97738 4.98436 4.98888 4.99162 4.99363 4.99573 4.99731 
-    4.99804 4.99843 4.99881 4.99909 4.99934 4.99957 4.9996 4.99964 
-    4.99967 4.9997 4.99973 4.99977 4.9998 4.99983 4.99986 4.99988 
-    4.99991 4.99992 4.99992 4.99993 4.99994 4.99994 4.99995 
-    4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 5.00028 4.99988 4.99968 
-    5.00019 4.99987 5.00021 4.99973 4.99977 4.99996 4.99997 
-    5.0002 4.99957 5.00026 4.99947 5.00074 5.00003 4.99987 4.99979 
-    5.00008 4.99997 5.08794 5.05993 4.76875 3.99197 3.10174 
-    2.5197 2.21771 2.04 1.92235 1.83874 1.77592 1.72665 1.686 
-    1.65276 1.6286 1.61299 1.60039 1.58934 1.57954 1.57083 1.56306 
-    1.55604 1.54963 1.54375 1.53832 1.53331 1.52865 1.52432 
-    1.52026 1.51645 1.51287 1.50949 1.50629 1.50327 1.50039 
-    1.49766 1.49505 1.49257 1.49019 1.48792 1.48574 1.48365 
-    1.48164 1.47971 1.47784 1.47604 1.47431 1.47264 1.47102 
-    1.46945 1.46794 1.46647 1.46505 1.46367 1.46233 1.46103 
-    1.45976 1.45853 1.45733 1.45616 1.45502 1.45392 1.45284 
-    1.45179 1.45076 1.44975 1.4488 1.44795 1.44711 1.44626 1.44541 
-    1.44457 1.44372 1.44287 1.44212 1.44138 1.44063 1.43989 
-    1.43914 1.4384 1.43766 1.43701 1.43641 1.43581 1.43522 1.43462 
-    1.43402 1.43342 1.43282 1.43223 1.43163 1.43103 1.43043 
-    1.42984 1.42924 1.42865 1.42808 1.42752 1.42695 1.42639 
-    1.42584 1.42529 1.42472 1.42412 1.42365 1.42326 1.42304 
-    1.42162 1.42082 1.42032 1.42029 1.42026 1.41995 1.41947 
-    1.41894 1.41841 1.4179 1.41742 1.41699 1.41656 1.32097 1.30963 
-    1.78765 2.64656 3.35764 3.747 3.86589 3.94217 4.04185 4.18453 
-    4.3561 4.53439 4.68621 4.74905 4.77848 4.84629 4.91261 4.97541 
-    5.01284 5.01548 5.01248 5.00924 5.00666 5.00475 5.00334 
-    5.00234 5.00164 5.00118 5.00083 5.00058 5.0004 5.00028 5.00019 
-    5.00013 5.00009 5.00007 5.00004 5.00003 5.00002 5.00001 
-    5.00001 5.00001 5 5 4.99999 4.99995 4.99992 4.99996 5.00006 
-    5.00012 5.00009 4.99997 4.9999 4.99985 4.99986 4.99997 5.00021 
-    5.00031 5.00024 5.0001 5.00007 5.00005 5.00003 5.00001 4.99998 
-    4.99998 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 4.99999 4.99999 4.99999 4.99998 4.99998 4.99998 
-}
-v33 set {
-    5 5.00012 5.00023 5.0003 4.99972 4.99988 4.99984 4.99991 
-    4.99996 4.99999 5.00008 5.00009 4.99986 5.00003 5.00007 
-    4.99995 4.9999 4.99997 5.00013 5.00014 5.00013 4.99701 4.99763 
-    4.99742 4.99998 5.02836 5.07262 4.96856 4.57267 3.85637 
-    2.79544 1.45942 0.408016 0.084885 0.0271375 0.0119294 0.00707546 
-    0.0051087 0.00373035 0.00264737 0.00186477 0.00130379 0.000915857 
-    0.000653121 0.000483893 0.000380852 0.000302362 0.000219498 
-    0.000154435 0.000121928 0.000104026 8.61242e-05 7.48526e-05 
-    6.49216e-05 5.56238e-05 5.29689e-05 5.03139e-05 4.7659e-05 
-    4.5004e-05 4.23491e-05 4.00356e-05 3.79522e-05 3.58687e-05 
-    3.37852e-05 3.17018e-05 2.97592e-05 2.89804e-05 2.82016e-05 
-    2.74228e-05 2.66441e-05 2.58653e-05 2.50865e-05 2.43077e-05 
-    2.35289e-05 2.27501e-05 2.19714e-05 2.12346e-05 2.07821e-05 
-    2.03295e-05 1.98769e-05 1.94244e-05 1.89718e-05 1.85192e-05 
-    1.80667e-05 1.76141e-05 1.71615e-05 1.6709e-05 1.62828e-05 
-    1.60061e-05 1.57294e-05 1.54527e-05 1.5176e-05 1.48993e-05 
-    1.46226e-05 1.43459e-05 1.40692e-05 1.37925e-05 1.35158e-05 
-    1.3262e-05 1.31191e-05 1.29761e-05 1.28332e-05 1.26903e-05 
-    1.25474e-05 1.24045e-05 1.22615e-05 1.21186e-05 1.19757e-05 
-    1.18328e-05 1.16898e-05 1.15469e-05 1.1404e-05 1.12611e-05 
-    1.11182e-05 1.09752e-05 1.08323e-05 1.06894e-05 1.05465e-05 
-    1.04036e-05 1.02606e-05 1.00185e-05 3.8343e-05 -3.06781e-05 
-    -0.000111758 0.000111673 0.000130815 -0.000210491 -0.000231304 
-    0.000310226 0.000265303 3.0878e-05 -4.48405e-05 -1.2852e-05 
-    -7.84469e-06 3.29986e-05 -1.23286e-05 -6.07871e-05 5.35082e-05 
-    7.69194e-05 0.000126221 6.57178e-05 0.00223349 -0.0148854 
-    -0.0476636 -0.0491447 0.220125 1.11174 2.03988 2.90209 3.61069 
-    4.13554 4.50679 4.71501 4.83916 4.91027 4.95284 4.98086 
-    4.99151 4.98651 4.97113 4.95075 4.93102 4.93683 4.95457 
-    4.97071 4.98212 4.98948 4.99386 4.99636 4.99785 4.9987 4.99927 
-    4.99989 5.00014 5.00007 4.99988 4.99982 4.99976 4.99973 
-    4.99972 4.99972 4.99973 4.99974 4.99975 4.99977 4.99979 
-    4.99981 4.99984 4.99986 4.99988 4.99989 4.99991 4.99992 
-    4.99993 4.99994 4.99995 4.99996 4.99996 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 
-    4.99999 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5.00012 4.99946 4.99839 4.99733 
-    4.99948 5.00114 5.00158 5.00147 5.00113 5.00073 5.00043 
-    5.0002 5.00006 4.99995 4.99986 4.99973 4.99976 4.9999 5.00029 
-    5.00055 4.99704 4.99734 4.9972 5.00278 5.03354 5.07184 4.94057 
-    4.51936 3.75638 2.60982 1.23803 0.315016 0.0796102 0.0252894 
-    0.0165723 0.0827785 0.491298 1.40686 2.33436 3.1251 3.7691 
-    4.22201 4.49976 4.68115 4.80513 4.88509 4.93208 4.95861 
-    4.97579 4.98655 4.99268 4.99571 4.99771 4.99881 4.99929 
-    4.99954 4.99965 4.9997 4.99971 4.99971 4.99971 4.99971 4.99972 
-    4.99974 4.99976 4.99978 4.99981 4.99984 4.99987 4.99989 
-    4.99991 4.99991 4.99992 4.99992 4.99993 4.99997 5.00003 
-    5.00006 5.00004 5.00001 5 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99998 4.99998 
-}
-v34 set {
-    5 5.00207 5.00813 5.01486 5.00156 5.0018 4.99861 4.99844 
-    4.99888 4.9993 4.99956 4.99971 4.99979 4.99983 4.99987 4.99989 
-    4.99671 4.9974 4.99864 5.00131 5.00377 5.0021 5.00039 4.99993 
-    5.00004 5.0009 5.00109 4.99636 4.98617 4.96778 4.92047 4.89528 
-    4.91112 4.9559 4.98286 4.99369 4.99812 4.99951 4.99994 5.00014 
-    5.00008 4.99994 4.99984 4.99989 4.99998 5.00004 5.00004 
-    5.00006 5.00005 5.00001 4.99997 4.99992 4.99993 4.99994 
-    4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 
-    4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 5.00131 5.00072 4.9977 4.99811 
-    5.00325 4.99647 4.98948 4.99459 5.00262 5.00276 5.00156 
-    5.00072 5.0003 5.00013 4.99995 4.99668 4.99775 4.99917 5.00173 
-    5.00386 5.00188 4.99888 4.99757 4.99951 5.01712 5.0557 5.07088 
-    5.07704 5.07758 5.06958 5.04223 5.03331 5.0279 5.03408 5.07611 
-    5.01911 4.68594 3.99152 2.92195 1.69878 0.809 0.344091 0.154663 
-    0.0788717 0.0467212 0.0336168 0.0280514 0.0254947 0.024173 
-    0.0223567 0.0220555 0.0271514 0.0295872 0.0296052 0.0283971 
-    0.0264726 0.0241813 0.0218244 0.0195349 0.017368 0.0152495 
-    0.013295 0.0115444 0.00996982 0.00857091 0.00733891 0.00627261 
-    0.0053494 0.00456316 0.00388373 0.00331073 0.00282181 0.00240991 
-    0.00206389 0.00177187 0.00152283 0.00131167 0.00112558 0.000954373 
-    0.000805726 0.00069326 0.000600991 0.000525743 0.00047355 
-    0.00044359 0.000434815 0.000436053 0.000402511 0.000368969 
-    0.000335427 0.000301886 0.000268344 0.000234802 0.00020126 
-    0.000184967 0.000169932 0.000154896 0.000139861 0.000124825 
-    0.00010979 9.47546e-05 8.67896e-05 8.24901e-05 7.81906e-05 
-    7.38911e-05 6.95915e-05 6.5292e-05 6.09925e-05 5.66929e-05 
-    5.23934e-05 4.80939e-05 4.37943e-05 3.94948e-05 3.51953e-05 
-    3.08957e-05 2.67968e-05 2.42936e-05 2.17904e-05 1.92872e-05 
-    1.6784e-05 0.00125927 -0.00794344 -0.0305499 -0.0621697 
-    -0.0463796 -0.0224608 -0.00538381 0.00546086 0.0108675 0.012883 
-    0.0131787 0.0127271 0.0119702 0.0110398 0.0100635 0.00649617 
-    0.00489388 0.00545863 0.0098351 0.0167428 0.0126563 0.00697542 
-    0.00427027 0.00330002 0.00390774 0.00408999 -0.00259143 
-    -0.0160578 -0.0451849 -0.0409651 0.1301 0.597429 1.3848 
-    2.63426 3.81272 4.51373 4.8412 4.98731 4.88165 4.37165 3.40034 
-    2.17681 1.12217 0.505129 0.219703 0.104992 0.0622333 0.0448317 
-    0.0355782 0.0311867 0.0293529 0.0274615 0.0288739 0.0307845 
-    0.0304909 0.029245 0.0273602 0.0251006 0.022697 0.0202765 
-    0.0179357 0.0157106 0.0136562 0.0117951 0.0101273 0.00865784 
-    0.00739394 0.00634364 0.00551356 0.00480538 0.00415747 0.00356084 
-    0.00297585 0.00236711 0.00181853 0.00160713 0.00169822 0.00166542 
-    0.00145504 0.00120252 0.00109259 0.000982658 0.00087273 
-    0.000762802 0.000652874 0.000584068 0.000528263 0.000472458 
-    0.000416653 0.000360848 0.000321155 0.000301442 0.000281729 
-    0.000262016 0.000242303 0.00022259 0.000202877 0.000183164 
-    0.000163451 0.000143738 0.000124025 0.000114582 0.000107399 
-    0.000100216 9.30332e-05 8.58502e-05 7.86672e-05 7.14841e-05 
-    6.43011e-05 5.7118e-05 4.9935e-05 4.35378e-05 4.04281e-05 
-    3.73184e-05 3.42088e-05 3.10991e-05 2.79894e-05 2.48798e-05 
-    2.17701e-05 1.86604e-05 
-}
-v35 set {
-    7.24585e-12 2.21843e-05 3.20014e-05 1.25076e-05 -2.44947e-05 
-    1.8425e-05 5.50546e-06 3.53025e-05 -1.07551e-05 -3.94383e-06 
-    -2.27848e-06 -9.04789e-05 7.44215e-05 -2.7662e-05 0.000200038 
-    -2.11998e-05 -2.09011e-05 2.37098e-05 2.18751e-05 -2.28422e-05 
-    -6.23659e-05 3.58241e-05 1.76386e-05 -4.28311e-05 0.000355626 
-    0.00156903 0.00100999 -0.0085304 -0.02067 -0.0389485 -0.0651568 
-    -0.128475 -0.314362 -0.406837 -0.421558 -0.421277 -0.418176 
-    -0.414481 -0.410845 -0.407348 -0.403971 -0.400716 -0.397582 
-    -0.394563 -0.391658 -0.388866 -0.386178 -0.383585 -0.381094 
-    -0.378789 -0.376569 -0.37435 -0.372256 -0.370188 -0.36815 
-    -0.366422 -0.364694 -0.362967 -0.361239 -0.359511 -0.357888 
-    -0.356334 -0.354781 -0.353227 -0.351674 -0.350152 -0.348888 
-    -0.347625 -0.346361 -0.345098 -0.343834 -0.342571 -0.341307 
-    -0.340044 -0.33878 -0.337517 -0.336279 -0.335215 -0.334152 
-    -0.333088 -0.332024 -0.330961 -0.329897 -0.328833 -0.32777 
-    -0.326706 -0.325642 -0.324601 -0.323683 -0.322766 -0.321849 
-    -0.320932 -0.320014 -0.319097 -0.31818 -0.317263 -0.316345 
-    -0.315428 -0.314545 -0.313825 -0.313106 -0.312387 -0.311667 
-    -0.310948 -0.310228 -0.309509 -0.308789 -0.30807 -0.307351 
-    -0.306631 -0.305912 -0.305192 -0.304473 -0.303754 -0.303034 
-    -0.302315 -0.301595 -0.300876 -0.300157 -0.299437 -0.298716 
-    -0.29798 -0.297329 -0.296691 -0.295837 -0.29516 -0.294725 
-    -0.294044 -0.292917 -0.292351 -0.291965 -0.291365 -0.290687 
-    -0.290027 -0.289376 -0.288772 -0.288193 -0.287505 -0.286892 
-    -0.28626 -0.285714 -0.284545 -0.289246 -0.298717 -0.298492 
-    -0.214163 0.181451 0.0749974 0.0454707 0.0292987 0.0196837 
-    0.0124119 0.00884715 0.00527181 0.00585821 0.0296361 0.169856 
-    0.361207 0.538856 0.67469 0.685933 0.392802 0.17772 0.0813085 
-    0.0424601 0.0246654 0.0175258 0.0144256 0.0129859 0.012205 
-    0.0112846 0.010933 0.0134813 0.0147254 0.0147981 0.0142156 
-    0.0132732 0.0121355 0.0109587 0.00981238 0.00872731 0.00767007 
-    0.00669346 0.00581341 0.00502167 0.00431819 0.00369842 0.00316168 
-    0.00269663 0.00230035 0.00195801 0.00166928 0.00142286 0.00121522 
-    0.00104072 0.000893384 0.000767675 0.000661268 0.000567659 
-    0.000481766 0.000407101 0.000350044 0.000302721 0.000263424 
-    0.000236813 0.00022199 0.000218182 0.000219548 0.0002027 
-    0.000185853 0.000169006 0.000152158 0.000135311 0.000118463 
-    0.000101616 9.33782e-05 8.57685e-05 7.81588e-05 7.0549e-05 
-    6.29393e-05 5.53296e-05 4.77199e-05 4.36954e-05 4.15296e-05 
-    3.93637e-05 3.71978e-05 3.50319e-05 3.28661e-05 3.07002e-05 
-    2.85343e-05 2.63685e-05 2.42026e-05 2.20367e-05 1.98709e-05 
-    1.7705e-05 1.55391e-05 1.34772e-05 1.22416e-05 1.10061e-05 
-    9.77055e-06 8.535e-06 0.000631271 -0.00362586 -0.0146235 
-    -0.0308486 -0.0237466 -0.0117522 -0.00304171 0.00251033 
-    0.00531986 0.0063897 0.00657351 0.00636494 0.00599705 0.00553442 
-    0.00505994 0.00330925 0.00246671 0.0027006 0.00473161 0.00830333 
-    0.00649147 0.00356815 0.00217448 0.00187579 0.00270447 0.00219543 
-    -0.00546118 -0.0179576 -0.0445306 -0.0649309 0.0197935 0.473629 
-    0.87268 0.269542 0.0086094 0.0844602 0.606456 1.04929 0.906014 
-    0.916205 0.919425 0.872867 0.556244 0.262457 0.11838 0.0571226 
-    0.0333451 0.0237133 0.0185096 0.0159617 0.0148663 0.0138683 
-    0.0144081 0.0153797 0.0152551 0.0146487 0.0137192 0.0125973 
-    0.0113996 0.0101903 0.00901851 0.00790495 0.00687502 0.00593994 
-    0.00510092 0.00436111 0.00372439 0.0031945 0.00277537 0.00241888 
-    0.002095 0.00179943 0.00150419 0.00119264 0.00090934 0.000802394 
-    0.000852816 0.000838368 0.000730842 0.000601028 0.000546616 
-    0.000492205 0.000437793 0.000383381 0.000328969 0.00029454 
-    0.000266428 0.000238317 0.000210205 0.000182093 0.000162091 
-    0.000152145 0.000142198 0.000132252 0.000122306 0.000112359 
-    0.000102413 9.24665e-05 8.25201e-05 7.25738e-05 6.26274e-05 
-    5.78553e-05 5.42216e-05 5.05878e-05 4.69541e-05 4.33204e-05 
-    3.96867e-05 3.60529e-05 3.24192e-05 2.87855e-05 2.51518e-05 
-    2.19153e-05 2.03406e-05 1.8766e-05 1.71913e-05 1.56167e-05 
-    1.4042e-05 1.24674e-05 1.08927e-05 9.31806e-06 
-}
-v36 set {
-    5 5.01426 5.02852 5.01923 4.77685 4.56471 4.52338 4.56813 
-    4.63122 4.693 4.74776 4.79385 4.83258 4.86358 4.88918 4.91021 
-    4.90553 4.89733 4.89554 4.91953 5.00757 5.07101 5.06318 
-    5.05241 5.05535 5.08042 5.07251 4.90973 4.56136 3.98637 
-    3.237 2.67216 2.33678 2.13529 2.00544 1.91429 1.84638 1.79461 
-    1.75338 1.71958 1.69175 1.6686 1.64918 1.63258 1.61836 1.60607 
-    1.59506 1.58483 1.57575 1.56847 1.56193 1.55538 1.54968 
-    1.54416 1.5388 1.53523 1.53165 1.52807 1.52449 1.52091 1.51771 
-    1.51477 1.51182 1.50888 1.50593 1.50309 1.50113 1.49917 
-    1.4972 1.49524 1.49328 1.49132 1.48935 1.48739 1.48543 1.48346 
-    1.48157 1.48012 1.47868 1.47724 1.47579 1.47435 1.47291 
-    1.47146 1.47002 1.46857 1.46713 1.46574 1.46462 1.4635 1.46238 
-    1.46126 1.46014 1.45902 1.4579 1.45678 1.45567 1.45455 1.45349 
-    1.45275 1.45201 1.45127 1.45053 1.44979 1.44905 1.44831 
-    1.44757 1.44683 1.44609 1.44535 1.44461 1.44387 1.44313 
-    1.44239 1.44165 1.44091 1.44017 1.43943 1.43869 1.43795 
-    1.43721 1.43874 1.43976 1.43619 1.43182 1.43726 1.43084 
-    1.42587 1.42383 1.42642 1.42728 1.42736 1.4271 1.42669 1.42621 
-    1.42569 1.41703 1.41244 1.41019 1.41199 1.41833 1.42502 
-    1.41504 1.37535 1.28381 1.44779 2.33713 3.25835 3.67554 
-    3.84975 4.01125 4.2253 4.45433 4.62215 4.74478 4.82998 4.8868 
-    4.92396 4.94768 4.96498 4.98537 5.0128 5.04467 5.06722 5.06535 
-    5.01475 4.91956 4.80647 4.7242 4.7059 4.73552 4.76379 4.81684 
-    4.87376 4.92276 4.96112 4.9884 5.0045 5.00999 5.00933 5.00619 
-    5.00384 5.00342 5.00373 5.00362 5.00309 5.00272 5.00239 
-    5.00204 5.00172 5.00146 5.00124 5.00105 5.00089 5.00076 
-    5.00065 5.00057 5.00048 5.00041 5.00034 5.00028 5.00023 
-    5.00019 5.00015 5.00015 5.00016 5.0002 5.00023 5.00021 5.00019 
-    5.00017 5.00015 5.00012 5.0001 5.00008 5.00007 5.00006 5.00005 
-    5.00004 5.00003 5.00002 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00062 4.99506 4.9835 4.96726 4.9728 4.97877 
-    4.98675 4.9966 5.00406 5.00679 5.00629 5.00561 5.00487 5.00429 
-    5.00384 5.002 5.00164 5.00229 5.00484 5.00769 5.00019 5.00242 
-    5.01319 5.0335 5.07265 5.10129 5.11485 5.12551 5.13953 5.16048 
-    5.18862 5.22811 5.25656 5.25627 5.19975 4.9139 4.24745 3.43732 
-    2.8202 2.43224 2.17409 2.01333 1.93951 1.94622 1.98861 2.02217 
-    2.05383 2.08376 2.11184 2.13793 2.16191 2.18267 2.20502 
-    2.22837 2.24958 2.26901 2.28648 2.302 2.31582 2.32802 2.33869 
-    2.34795 2.35596 2.36282 2.3687 2.37371 2.37797 2.38161 2.38476 
-    2.38743 2.3897 2.39168 2.39329 2.39463 2.39575 2.39671 2.39756 
-    2.39835 2.39907 2.39968 2.39999 2.4003 2.40061 2.40091 2.40122 
-    2.40142 2.40159 2.40176 2.40193 2.4021 2.40222 2.40228 2.40234 
-    2.4024 2.40247 2.40253 2.40259 2.40265 2.40271 2.40277 2.40284 
-    2.40287 2.40289 2.40291 2.40294 2.40296 2.40298 2.40301 
-    2.40303 2.40305 2.40308 2.4031 2.40311 2.40312 2.40313 2.40314 
-    2.40315 2.40316 2.40317 2.40318 
-}
-v37 set {
-    5 5.01732 5.03181 5.05944 5.12686 5.20725 5.28103 5.31254 
-    5.32901 5.33709 5.3408 5.34257 5.34311 5.34347 5.34386 5.34411 
-    5.3406 5.33484 5.32942 5.32904 5.33644 5.34869 5.35001 5.34882 
-    5.34758 5.34672 5.34599 5.34496 5.34364 5.34165 5.33712 
-    5.33502 5.3366 5.34067 5.34306 5.34398 5.34434 5.34442 5.34443 
-    5.34443 5.34441 5.34439 5.34437 5.34437 5.34438 5.34438 
-    5.34438 5.34438 5.34438 5.34437 5.34437 5.34436 5.34436 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.35377 5.35451 
-    5.34265 5.34488 5.35861 5.28622 4.90033 4.75027 4.89731 
-    4.97098 4.99293 4.99832 4.99909 4.99956 4.99858 4.99829 
-    4.9998 5.00035 5.0038 5.00989 5.00251 4.99438 4.9953 4.99761 
-    4.99985 5.00152 5.0011 5.00046 4.99996 4.99925 4.99862 4.99919 
-    4.99961 5.00048 5.00234 4.99654 4.98235 4.95936 4.83738 
-    4.53021 4.21004 4.00593 3.91207 3.88059 3.87822 3.89117 
-    3.91278 3.94044 3.97376 4.01152 4.05052 4.10679 4.17908 
-    4.25673 4.33414 4.40875 4.47879 4.54342 4.60258 4.65595 
-    4.70291 4.74414 4.78018 4.81185 4.83915 4.86291 4.88301 
-    4.90048 4.91528 4.92802 4.9387 4.94777 4.95539 4.9618 4.96725 
-    4.97195 4.97588 4.97932 4.98247 4.98512 4.98697 4.98831 
-    4.98919 4.99015 4.99101 4.99169 4.99222 4.99282 4.99341 
-    4.994 4.9946 4.99519 4.99578 4.99638 4.99667 4.99693 4.9972 
-    4.99747 4.99773 4.998 4.99827 4.99841 4.99849 4.99856 4.99864 
-    4.99872 4.9988 4.99888 4.99896 4.99904 4.99911 4.99919 4.99927 
-    4.99935 4.99943 4.9995 4.99955 4.9996 4.99965 4.9997 5.00736 
-    4.98252 4.87516 4.66727 4.49142 4.43103 4.4301 4.4571 4.49729 
-    4.5407 4.5835 4.62363 4.66114 4.69577 4.72738 4.74632 4.75971 
-    4.77576 4.80671 4.87073 4.91665 4.93252 4.94418 4.95331 
-    4.96094 4.96727 4.97148 4.97471 4.97612 4.98276 5.00247 
-    5.04086 5.08628 5.10673 5.08887 5.0564 5.02767 5.01336 4.99685 
-    4.97422 4.90866 4.67035 4.33117 4.07888 3.94432 3.89105 
-    3.88174 3.89292 3.91442 3.94564 3.98708 4.0355 4.09134 4.16315 
-    4.24088 4.31918 4.39527 4.46693 4.53337 4.59405 4.6486 4.69693 
-    4.73938 4.77617 4.80809 4.83551 4.85895 4.87894 4.89596 
-    4.91081 4.92417 4.93651 4.94552 4.95198 4.9565 4.96096 4.96523 
-    4.96972 4.97428 4.97868 4.98064 4.9826 4.98455 4.98651 4.98847 
-    4.98967 4.99064 4.9916 4.99257 4.99353 4.99422 4.99457 4.99493 
-    4.99528 4.99563 4.99598 4.99633 4.99668 4.99703 4.99738 
-    4.99773 4.9979 4.99804 4.99817 4.9983 4.99843 4.99856 4.99869 
-    4.99883 4.99896 4.99909 4.99921 4.99926 4.99931 4.99937 
-    4.99942 4.99948 4.99953 4.99959 4.99964 
-}
-v38 set {
-    4.49849 4.53282 4.58329 4.66625 4.83345 4.97823 5.0207 5.01816 
-    5.01116 5.00595 5.00296 5.00148 5.00073 5.00062 5.00033 
-    5.0003 4.99864 4.99661 4.99652 4.99928 5.00361 5.12573 5.17251 
-    5.22612 5.33479 5.44503 5.44432 5.44379 5.44334 5.443 5.44276 
-    5.44258 5.44246 5.44238 5.44232 5.44228 5.44225 5.44223 
-    5.44221 5.4422 5.44219 5.44219 5.44218 5.44218 5.44218 5.44218 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 
-    5.44214 5.44214 5.44214 5.44214 5.44212 5.45159 5.45236 
-    5.44064 5.44307 5.45616 5.38122 4.77163 3.53297 2.74466 
-    2.34448 2.11802 1.9783 1.88656 1.82001 1.77389 1.72955 1.69632 
-    1.66971 1.6526 1.65236 1.56034 1.53764 1.97139 2.75096 3.39212 
-    3.74042 3.82345 3.85696 3.88547 3.91862 3.9585 4.00467 4.05903 
-    4.1254 4.19533 4.26791 4.34517 4.42112 4.49238 4.55807 4.6179 
-    4.6713 4.71815 4.75889 4.79418 4.82456 4.85062 4.87291 4.89196 
-    4.90823 4.92209 4.93388 4.9439 4.95242 4.95968 4.96585 4.97108 
-    4.9755 4.97923 4.98237 4.98503 4.98732 4.98927 4.99094 4.99233 
-    4.99353 4.99452 4.99538 4.99608 4.99668 4.99718 4.9976 4.99794 
-    4.99822 4.99847 4.99867 4.99884 4.99899 4.99913 4.99924 
-    4.99932 4.99938 4.99943 4.99947 4.99951 4.99953 4.99955 
-    4.99958 4.99961 4.99964 4.99967 4.99969 4.99972 4.99975 
-    4.99977 4.99978 4.99979 4.99981 4.99982 4.99983 4.99985 
-    4.99986 4.99986 4.99987 4.99987 4.99988 4.99988 4.99988 
-    4.99989 4.99989 4.9999 4.9999 4.99991 4.99991 4.99992 4.99992 
-    4.99993 4.99993 4.99993 4.99994 5.00381 5.00064 4.99246 
-    4.99823 5.00349 5.00076 5.00033 5.00015 5.00009 5.00007 
-    5.00005 5.00004 5.00003 5.00002 4.99988 4.99732 4.99728 
-    4.9978 5.00187 5.00927 5.08712 5.07654 4.92855 4.4863 3.76162 
-    3.00049 2.49834 2.20883 2.03492 1.92384 1.84676 1.79021 
-    1.74716 1.7132 1.68576 1.66309 1.64406 1.62785 1.61383 1.60162 
-    1.59081 1.58117 1.57253 1.56473 1.55765 1.55117 1.54527 
-    1.53988 1.53485 1.53012 1.5257 1.5216 1.51773 1.51411 1.51071 
-    1.50746 1.50438 1.50146 1.49868 1.49603 1.4935 1.49109 1.48878 
-    1.48657 1.48445 1.48242 1.48046 1.47858 1.47677 1.47502 
-    1.47333 1.4717 1.47012 1.46859 1.46711 1.46568 1.46428 1.46292 
-    1.4616 1.46034 1.45923 1.45812 1.45701 1.4559 1.45479 1.45378 
-    1.45279 1.45181 1.45082 1.44983 1.44893 1.44813 1.44732 
-    1.44652 1.44571 1.44491 1.4441 1.4433 1.44249 1.44169 1.44089 
-    1.44019 1.43951 1.43883 1.43815 1.43747 1.4368 1.43612 1.43544 
-    1.43476 1.43408 1.43342 1.43283 1.43223 1.43163 1.43104 
-    1.43044 1.42984 1.42924 1.42865 
-}
-v39 set {
-    5 5.01048 5.01221 4.98887 4.76261 4.54943 4.51564 4.56249 
-    4.62621 4.68843 4.74374 4.79044 4.82972 4.86127 4.88724 
-    4.90862 4.90791 4.89858 4.89589 4.91767 5.00405 5.16956 
-    5.12391 4.7557 3.87953 3.01124 2.48482 2.20424 2.03812 1.92679 
-    1.84956 1.79256 1.74907 1.71487 1.68724 1.6644 1.64513 1.6287 
-    1.61446 1.60197 1.59095 1.58117 1.57245 1.5646 1.55752 1.55109 
-    1.54516 1.53958 1.53444 1.53008 1.52606 1.52205 1.51843 
-    1.5149 1.51146 1.50893 1.50639 1.50387 1.50133 1.4988 1.49651 
-    1.49436 1.49222 1.49007 1.48793 1.48585 1.48433 1.4828 1.48128 
-    1.47975 1.47823 1.4767 1.47518 1.47365 1.47213 1.4706 1.46912 
-    1.46795 1.46678 1.46561 1.46444 1.46327 1.4621 1.46093 1.45976 
-    1.45859 1.45741 1.45628 1.45534 1.45441 1.45347 1.45254 
-    1.4516 1.45067 1.44973 1.4488 1.44786 1.44693 1.44604 1.44539 
-    1.44475 1.4441 1.44345 1.44281 1.44216 1.44151 1.44086 1.44022 
-    1.43957 1.43892 1.43828 1.43763 1.43698 1.43633 1.43569 
-    1.43504 1.43439 1.43375 1.4331 1.43245 1.4318 1.43157 1.43089 
-    1.43001 1.43042 1.42899 1.42439 1.42216 1.43447 1.44048 
-    1.43705 1.43314 1.43039 1.42861 1.42739 1.42651 1.42548 
-    1.42488 1.4243 1.42392 1.4235 1.32443 1.31149 1.78169 2.64844 
-    3.43211 3.95252 4.20231 4.3746 4.49948 4.58929 4.65742 4.71183 
-    4.77057 4.83196 4.88354 4.92894 4.96625 4.99235 5.00651 
-    5.00941 5.00813 5.00689 5.00588 5.00504 5.00431 5.00368 
-    5.00314 5.00268 5.00228 5.00194 5.00165 5.0014 5.00118 5.001 
-    5.00085 5.00072 5.00061 5.00052 5.00044 5.00037 5.00031 
-    5.00027 5.00022 5.00019 5.00016 5.00013 5.00011 5.00009 
-    5.00008 5.00007 5.00006 5.00005 5.00004 5.00003 5.00003 
-    5.00003 5.00002 5.00002 5.00002 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 
-    5.00002 5.00003 5.00004 5.00022 4.99974 4.99942 4.99997 
-    5.00063 5.00002 5.00003 4.99994 4.99998 4.99999 5 5 5 5 
-    5 4.99981 4.99998 5.00004 5.00036 5.00049 5.12012 5.16315 
-    5.19712 5.21835 4.87874 4.10151 3.31555 2.74207 2.38075 
-    2.15872 2.01614 1.91886 1.84852 1.79401 1.75052 1.71508 
-    1.68672 1.66467 1.64602 1.62985 1.61576 1.60343 1.59256 
-    1.58287 1.57418 1.56632 1.55922 1.55282 1.54687 1.54132 
-    1.53618 1.53143 1.52698 1.52282 1.51895 1.51527 1.5118 1.50851 
-    1.5054 1.50244 1.49963 1.49695 1.4944 1.49196 1.48963 1.4874 
-    1.48527 1.48322 1.48124 1.47934 1.47751 1.47574 1.47403 
-    1.47239 1.4708 1.46926 1.46777 1.46632 1.46491 1.46355 1.46237 
-    1.4612 1.46002 1.45884 1.45766 1.45659 1.45555 1.45451 1.45346 
-    1.45242 1.45147 1.45062 1.44978 1.44894 1.44809 1.44725 
-    1.4464 1.44556 1.44472 1.44387 1.44303 1.4423 1.44159 1.44088 
-    1.44017 1.43947 1.43876 1.43805 1.43734 1.43664 1.43593 
-    1.43524 1.43462 1.434 1.43338 1.43276 1.43213 1.43151 1.43089 
-    1.43027 
-}
-
-set attributes {
-    V1	v1	red	red  
-    V2  v2	green	red  
-    V3	v3	blue	red  
-    V4  v4	yellow  red  
-    V5  v5	magenta red  
-    V6  v6	cyan	red  
-    V7	v7	white	red  
-    V8  v8	red	green  
-    V9  v9	green	green  
-    V10 v10	blue	green  
-    V11 v11	yellow	green  
-    V12 v12	magenta	green  
-    V13	v13	cyan	green  
-    V14	v14	red	red  
-    V15 v15	green	red  
-    V16	v16	blue	red  
-    V17 v17	yellow  red  
-    V18 v18	magenta red  
-    V19 v19	cyan	red  
-    V20	v20	white	red  
-    V21 v21	red	green  
-    V22 v22	green	green  
-    V23 v23	blue	green  
-    V24 v24	yellow	green  
-    V25 v25	magenta	green  
-    V26	v26	cyan	green  
-    V27	v27	red	red  
-    V28 v28	green	red  
-    V29	v29	blue	red  
-    V30 v30	yellow  red  
-    V31 v31	magenta red  
-    V32 v32	cyan	red  
-    V33	v33	white	red  
-    V34 v34	red	green  
-    V35 v35	green	green  
-    V36 v36	blue	green  
-    V37 v37	yellow	green  
-    V38 v38	magenta	green  
-    V39	v39	cyan	green  
-}
-
-text .header -wrap word -width 0 -height 6
-
-set text {
-To zoom in on a region of the graph, simply click once on the left 
-mouse button to pick one corner of the area to be zoomed.  Move the 
-mouse to the other corner and click again. 
-} 
-
-regsub -all "\n" $text "" text
-.header insert end "$text\n"
-.header insert end { You can click on the }
-set im [image create picture -file ./images/qv100.t.gif]
-button .header.snap -image $im -command { MakeSnapshot }
-.header window create end -window .header.snap
-.header insert end { button to see a picture image snapshot.}
-.header configure -state disabled
-blt::graph $graph 
-
-blt::htext .footer -text {Hit the %%
-    set im [image create picture -file ./images/stopsign.gif]
-    button $htext(widget).quit -image $im -command { exit }
-    $htext(widget) append $htext(widget).quit 
-%% button when you've seen enough. %%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo 
-%%}
-
-foreach {label yData outline color} $attributes {
-    .graph element create $label -x x -y $yData -outline $outline -color $color
-}
-
-set unique 0
-
-proc Sharpen { photo } {
-    set kernel { -1 -1 -1 -1  16 -1 -1 -1 -1 } 
-    #set kernel { 0 -1 0 -1  4.9 -1 0 -1 0 }
-    blt::winop convolve $photo $photo $kernel
-}
-
-proc MakeSnapshot {} {
-    update idletasks
-    global unique
-    set top ".snapshot[incr unique]"
-    set im1 [image create picture]
-    .graph snap $im1
-    set width 410
-    set height 293
-    set thumb1 [image create picture -width $width -height $height -gamma 2.2]
-    $thumb1 resize $im1 -filter sinc 
-    image delete $im1
-
-    set thumb2 [image create picture -window .graph -width $width \
-	-height $height -filter sinc -gamma 2.2 -aspect yes]
-
-    toplevel $top
-    wm title $top "Snapshot \#$unique of \"[.graph cget -title]\""
-    label $top.l1 -image $thumb1 
-    label $top.l2 -image $thumb2 
-
-    button $top.but -text "Dismiss" -command "DestroySnapshot $top"
-    blt::table $top \
-	0,0 $top.l1 \
-	0,1 $top.l2 \
-        1,0 $top.but -pady 4 
-    focus $top.but
-}
-
-proc DestroySnapshot { win } {
-    set im [$win.l1 cget -image]
-    $im export jpg -file test.jpg
-    image delete $im
-    destroy $win
-}
-
-blt::table . \
-    .header 0,0 -fill x \
-    .graph 1,0  -fill both \
-    .footer 2,0 -fill x
-
-blt::table configure . r0 r2 -resize none
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
-
-$graph element bind all <Enter> {
-    %W legend activate [%W element get current]
-}
-
-$graph element bind all <Leave> {
-    %W legend deactivate [%W element get current]
-}
-
-set table [blt::datatable create]
-$table column extend "x"
-$table import vector "x" 1
-$table column type "x" double
-set col 1
-foreach vector [lsort -dictionary [blt::vector names ::v*]] {
-    set name [string trim $vector ::]
-    $table column extend $name
-    $table column type $name double
-    incr col
-    $table import vector $vector $col
-}
-
-$table dump -file graph4.tab
diff --git a/blt3.0/demos/graph4a.tab b/blt3.0/demos/graph4a.tab
deleted file mode 100644
index 91a68ea..0000000
--- a/blt3.0/demos/graph4a.tab
+++ /dev/null
@@ -1,14842 +0,0 @@
-i 361 40 0 0
-c 1 x double {}
-c 2 v1 double {}
-c 3 v2 double {}
-c 4 v3 double {}
-c 5 v4 double {}
-c 6 v5 double {}
-c 7 v6 double {}
-c 8 v7 double {}
-c 9 v8 double {}
-c 10 v9 double {}
-c 11 v10 double {}
-c 12 v11 double {}
-c 13 v12 double {}
-c 14 v13 double {}
-c 15 v14 double {}
-c 16 v15 double {}
-c 17 v16 double {}
-c 18 v17 double {}
-c 19 v18 double {}
-c 20 v19 double {}
-c 21 v20 double {}
-c 22 v21 double {}
-c 23 v22 double {}
-c 24 v23 double {}
-c 25 v24 double {}
-c 26 v25 double {}
-c 27 v26 double {}
-c 28 v27 double {}
-c 29 v28 double {}
-c 30 v29 double {}
-c 31 v30 double {}
-c 32 v31 double {}
-c 33 v32 double {}
-c 34 v33 double {}
-c 35 v34 double {}
-c 36 v35 double {}
-c 37 v36 double {}
-c 38 v37 double {}
-c 39 v38 double {}
-c 40 v39 double {}
-r 1 r1 {}
-r 2 r2 {}
-r 3 r3 {}
-r 4 r4 {}
-r 5 r5 {}
-r 6 r6 {}
-r 7 r7 {}
-r 8 r8 {}
-r 9 r9 {}
-r 10 r10 {}
-r 11 r11 {}
-r 12 r12 {}
-r 13 r13 {}
-r 14 r14 {}
-r 15 r15 {}
-r 16 r16 {}
-r 17 r17 {}
-r 18 r18 {}
-r 19 r19 {}
-r 20 r20 {}
-r 21 r21 {}
-r 22 r22 {}
-r 23 r23 {}
-r 24 r24 {}
-r 25 r25 {}
-r 26 r26 {}
-r 27 r27 {}
-r 28 r28 {}
-r 29 r29 {}
-r 30 r30 {}
-r 31 r31 {}
-r 32 r32 {}
-r 33 r33 {}
-r 34 r34 {}
-r 35 r35 {}
-r 36 r36 {}
-r 37 r37 {}
-r 38 r38 {}
-r 39 r39 {}
-r 40 r40 {}
-r 41 r41 {}
-r 42 r42 {}
-r 43 r43 {}
-r 44 r44 {}
-r 45 r45 {}
-r 46 r46 {}
-r 47 r47 {}
-r 48 r48 {}
-r 49 r49 {}
-r 50 r50 {}
-r 51 r51 {}
-r 52 r52 {}
-r 53 r53 {}
-r 54 r54 {}
-r 55 r55 {}
-r 56 r56 {}
-r 57 r57 {}
-r 58 r58 {}
-r 59 r59 {}
-r 60 r60 {}
-r 61 r61 {}
-r 62 r62 {}
-r 63 r63 {}
-r 64 r64 {}
-r 65 r65 {}
-r 66 r66 {}
-r 67 r67 {}
-r 68 r68 {}
-r 69 r69 {}
-r 70 r70 {}
-r 71 r71 {}
-r 72 r72 {}
-r 73 r73 {}
-r 74 r74 {}
-r 75 r75 {}
-r 76 r76 {}
-r 77 r77 {}
-r 78 r78 {}
-r 79 r79 {}
-r 80 r80 {}
-r 81 r81 {}
-r 82 r82 {}
-r 83 r83 {}
-r 84 r84 {}
-r 85 r85 {}
-r 86 r86 {}
-r 87 r87 {}
-r 88 r88 {}
-r 89 r89 {}
-r 90 r90 {}
-r 91 r91 {}
-r 92 r92 {}
-r 93 r93 {}
-r 94 r94 {}
-r 95 r95 {}
-r 96 r96 {}
-r 97 r97 {}
-r 98 r98 {}
-r 99 r99 {}
-r 100 r100 {}
-r 101 r101 {}
-r 102 r102 {}
-r 103 r103 {}
-r 104 r104 {}
-r 105 r105 {}
-r 106 r106 {}
-r 107 r107 {}
-r 108 r108 {}
-r 109 r109 {}
-r 110 r110 {}
-r 111 r111 {}
-r 112 r112 {}
-r 113 r113 {}
-r 114 r114 {}
-r 115 r115 {}
-r 116 r116 {}
-r 117 r117 {}
-r 118 r118 {}
-r 119 r119 {}
-r 120 r120 {}
-r 121 r121 {}
-r 122 r122 {}
-r 123 r123 {}
-r 124 r124 {}
-r 125 r125 {}
-r 126 r126 {}
-r 127 r127 {}
-r 128 r128 {}
-r 129 r129 {}
-r 130 r130 {}
-r 131 r131 {}
-r 132 r132 {}
-r 133 r133 {}
-r 134 r134 {}
-r 135 r135 {}
-r 136 r136 {}
-r 137 r137 {}
-r 138 r138 {}
-r 139 r139 {}
-r 140 r140 {}
-r 141 r141 {}
-r 142 r142 {}
-r 143 r143 {}
-r 144 r144 {}
-r 145 r145 {}
-r 146 r146 {}
-r 147 r147 {}
-r 148 r148 {}
-r 149 r149 {}
-r 150 r150 {}
-r 151 r151 {}
-r 152 r152 {}
-r 153 r153 {}
-r 154 r154 {}
-r 155 r155 {}
-r 156 r156 {}
-r 157 r157 {}
-r 158 r158 {}
-r 159 r159 {}
-r 160 r160 {}
-r 161 r161 {}
-r 162 r162 {}
-r 163 r163 {}
-r 164 r164 {}
-r 165 r165 {}
-r 166 r166 {}
-r 167 r167 {}
-r 168 r168 {}
-r 169 r169 {}
-r 170 r170 {}
-r 171 r171 {}
-r 172 r172 {}
-r 173 r173 {}
-r 174 r174 {}
-r 175 r175 {}
-r 176 r176 {}
-r 177 r177 {}
-r 178 r178 {}
-r 179 r179 {}
-r 180 r180 {}
-r 181 r181 {}
-r 182 r182 {}
-r 183 r183 {}
-r 184 r184 {}
-r 185 r185 {}
-r 186 r186 {}
-r 187 r187 {}
-r 188 r188 {}
-r 189 r189 {}
-r 190 r190 {}
-r 191 r191 {}
-r 192 r192 {}
-r 193 r193 {}
-r 194 r194 {}
-r 195 r195 {}
-r 196 r196 {}
-r 197 r197 {}
-r 198 r198 {}
-r 199 r199 {}
-r 200 r200 {}
-r 201 r201 {}
-r 202 r202 {}
-r 203 r203 {}
-r 204 r204 {}
-r 205 r205 {}
-r 206 r206 {}
-r 207 r207 {}
-r 208 r208 {}
-r 209 r209 {}
-r 210 r210 {}
-r 211 r211 {}
-r 212 r212 {}
-r 213 r213 {}
-r 214 r214 {}
-r 215 r215 {}
-r 216 r216 {}
-r 217 r217 {}
-r 218 r218 {}
-r 219 r219 {}
-r 220 r220 {}
-r 221 r221 {}
-r 222 r222 {}
-r 223 r223 {}
-r 224 r224 {}
-r 225 r225 {}
-r 226 r226 {}
-r 227 r227 {}
-r 228 r228 {}
-r 229 r229 {}
-r 230 r230 {}
-r 231 r231 {}
-r 232 r232 {}
-r 233 r233 {}
-r 234 r234 {}
-r 235 r235 {}
-r 236 r236 {}
-r 237 r237 {}
-r 238 r238 {}
-r 239 r239 {}
-r 240 r240 {}
-r 241 r241 {}
-r 242 r242 {}
-r 243 r243 {}
-r 244 r244 {}
-r 245 r245 {}
-r 246 r246 {}
-r 247 r247 {}
-r 248 r248 {}
-r 249 r249 {}
-r 250 r250 {}
-r 251 r251 {}
-r 252 r252 {}
-r 253 r253 {}
-r 254 r254 {}
-r 255 r255 {}
-r 256 r256 {}
-r 257 r257 {}
-r 258 r258 {}
-r 259 r259 {}
-r 260 r260 {}
-r 261 r261 {}
-r 262 r262 {}
-r 263 r263 {}
-r 264 r264 {}
-r 265 r265 {}
-r 266 r266 {}
-r 267 r267 {}
-r 268 r268 {}
-r 269 r269 {}
-r 270 r270 {}
-r 271 r271 {}
-r 272 r272 {}
-r 273 r273 {}
-r 274 r274 {}
-r 275 r275 {}
-r 276 r276 {}
-r 277 r277 {}
-r 278 r278 {}
-r 279 r279 {}
-r 280 r280 {}
-r 281 r281 {}
-r 282 r282 {}
-r 283 r283 {}
-r 284 r284 {}
-r 285 r285 {}
-r 286 r286 {}
-r 287 r287 {}
-r 288 r288 {}
-r 289 r289 {}
-r 290 r290 {}
-r 291 r291 {}
-r 292 r292 {}
-r 293 r293 {}
-r 294 r294 {}
-r 295 r295 {}
-r 296 r296 {}
-r 297 r297 {}
-r 298 r298 {}
-r 299 r299 {}
-r 300 r300 {}
-r 301 r301 {}
-r 302 r302 {}
-r 303 r303 {}
-r 304 r304 {}
-r 305 r305 {}
-r 306 r306 {}
-r 307 r307 {}
-r 308 r308 {}
-r 309 r309 {}
-r 310 r310 {}
-r 311 r311 {}
-r 312 r312 {}
-r 313 r313 {}
-r 314 r314 {}
-r 315 r315 {}
-r 316 r316 {}
-r 317 r317 {}
-r 318 r318 {}
-r 319 r319 {}
-r 320 r320 {}
-r 321 r321 {}
-r 322 r322 {}
-r 323 r323 {}
-r 324 r324 {}
-r 325 r325 {}
-r 326 r326 {}
-r 327 r327 {}
-r 328 r328 {}
-r 329 r329 {}
-r 330 r330 {}
-r 331 r331 {}
-r 332 r332 {}
-r 333 r333 {}
-r 334 r334 {}
-r 335 r335 {}
-r 336 r336 {}
-r 337 r337 {}
-r 338 r338 {}
-r 339 r339 {}
-r 340 r340 {}
-r 341 r341 {}
-r 342 r342 {}
-r 343 r343 {}
-r 344 r344 {}
-r 345 r345 {}
-r 346 r346 {}
-r 347 r347 {}
-r 348 r348 {}
-r 349 r349 {}
-r 350 r350 {}
-r 351 r351 {}
-r 352 r352 {}
-r 353 r353 {}
-r 354 r354 {}
-r 355 r355 {}
-r 356 r356 {}
-r 357 r357 {}
-r 358 r358 {}
-r 359 r359 {}
-r 360 r360 {}
-r 361 r361 {}
-d 1 1 0.0
-d 2 1 1e-10
-d 3 1 2e-10
-d 4 1 3e-10
-d 5 1 4e-10
-d 6 1 5e-10
-d 7 1 6e-10
-d 8 1 7e-10
-d 9 1 8e-10
-d 10 1 9e-10
-d 11 1 1e-09
-d 12 1 1.1e-09
-d 13 1 1.2e-09
-d 14 1 1.3e-09
-d 15 1 1.4e-09
-d 16 1 1.5e-09
-d 17 1 1.6e-09
-d 18 1 1.7e-09
-d 19 1 1.8e-09
-d 20 1 1.9e-09
-d 21 1 2e-09
-d 22 1 2.1e-09
-d 23 1 2.2e-09
-d 24 1 2.3e-09
-d 25 1 2.4e-09
-d 26 1 2.5e-09
-d 27 1 2.6e-09
-d 28 1 2.7e-09
-d 29 1 2.8e-09
-d 30 1 2.9e-09
-d 31 1 3e-09
-d 32 1 3.1e-09
-d 33 1 3.2e-09
-d 34 1 3.3e-09
-d 35 1 3.4e-09
-d 36 1 3.5e-09
-d 37 1 3.6e-09
-d 38 1 3.7e-09
-d 39 1 3.8e-09
-d 40 1 3.9e-09
-d 41 1 4e-09
-d 42 1 4.1e-09
-d 43 1 4.2e-09
-d 44 1 4.3e-09
-d 45 1 4.4e-09
-d 46 1 4.5e-09
-d 47 1 4.6e-09
-d 48 1 4.7e-09
-d 49 1 4.8e-09
-d 50 1 4.9e-09
-d 51 1 5e-09
-d 52 1 5.1e-09
-d 53 1 5.2e-09
-d 54 1 5.3e-09
-d 55 1 5.4e-09
-d 56 1 5.5e-09
-d 57 1 5.6e-09
-d 58 1 5.7e-09
-d 59 1 5.8e-09
-d 60 1 5.9e-09
-d 61 1 6e-09
-d 62 1 6.1e-09
-d 63 1 6.2e-09
-d 64 1 6.3e-09
-d 65 1 6.4e-09
-d 66 1 6.5e-09
-d 67 1 6.6e-09
-d 68 1 6.7e-09
-d 69 1 6.8e-09
-d 70 1 6.9e-09
-d 71 1 7e-09
-d 72 1 7.1e-09
-d 73 1 7.2e-09
-d 74 1 7.3e-09
-d 75 1 7.4e-09
-d 76 1 7.5e-09
-d 77 1 7.6e-09
-d 78 1 7.7e-09
-d 79 1 7.8e-09
-d 80 1 7.9e-09
-d 81 1 8e-09
-d 82 1 8.1e-09
-d 83 1 8.2e-09
-d 84 1 8.3e-09
-d 85 1 8.4e-09
-d 86 1 8.5e-09
-d 87 1 8.6e-09
-d 88 1 8.7e-09
-d 89 1 8.8e-09
-d 90 1 8.9e-09
-d 91 1 9e-09
-d 92 1 9.1e-09
-d 93 1 9.2e-09
-d 94 1 9.3e-09
-d 95 1 9.4e-09
-d 96 1 9.5e-09
-d 97 1 9.6e-09
-d 98 1 9.7e-09
-d 99 1 9.8e-09
-d 100 1 9.9e-09
-d 101 1 1e-08
-d 102 1 1.01e-08
-d 103 1 1.02e-08
-d 104 1 1.03e-08
-d 105 1 1.04e-08
-d 106 1 1.05e-08
-d 107 1 1.06e-08
-d 108 1 1.07e-08
-d 109 1 1.08e-08
-d 110 1 1.09e-08
-d 111 1 1.1e-08
-d 112 1 1.11e-08
-d 113 1 1.12e-08
-d 114 1 1.13e-08
-d 115 1 1.14e-08
-d 116 1 1.15e-08
-d 117 1 1.16e-08
-d 118 1 1.17e-08
-d 119 1 1.18e-08
-d 120 1 1.19e-08
-d 121 1 1.2e-08
-d 122 1 1.21e-08
-d 123 1 1.22e-08
-d 124 1 1.23e-08
-d 125 1 1.24e-08
-d 126 1 1.25e-08
-d 127 1 1.26e-08
-d 128 1 1.27e-08
-d 129 1 1.28e-08
-d 130 1 1.29e-08
-d 131 1 1.3e-08
-d 132 1 1.31e-08
-d 133 1 1.32e-08
-d 134 1 1.33e-08
-d 135 1 1.34e-08
-d 136 1 1.35e-08
-d 137 1 1.36e-08
-d 138 1 1.37e-08
-d 139 1 1.38e-08
-d 140 1 1.39e-08
-d 141 1 1.4e-08
-d 142 1 1.41e-08
-d 143 1 1.42e-08
-d 144 1 1.43e-08
-d 145 1 1.44e-08
-d 146 1 1.45e-08
-d 147 1 1.46e-08
-d 148 1 1.47e-08
-d 149 1 1.48e-08
-d 150 1 1.49e-08
-d 151 1 1.5e-08
-d 152 1 1.51e-08
-d 153 1 1.52e-08
-d 154 1 1.53e-08
-d 155 1 1.54e-08
-d 156 1 1.55e-08
-d 157 1 1.56e-08
-d 158 1 1.57e-08
-d 159 1 1.58e-08
-d 160 1 1.59e-08
-d 161 1 1.6e-08
-d 162 1 1.61e-08
-d 163 1 1.62e-08
-d 164 1 1.63e-08
-d 165 1 1.64e-08
-d 166 1 1.65e-08
-d 167 1 1.66e-08
-d 168 1 1.67e-08
-d 169 1 1.68e-08
-d 170 1 1.69e-08
-d 171 1 1.7e-08
-d 172 1 1.71e-08
-d 173 1 1.72e-08
-d 174 1 1.73e-08
-d 175 1 1.74e-08
-d 176 1 1.75e-08
-d 177 1 1.76e-08
-d 178 1 1.77e-08
-d 179 1 1.78e-08
-d 180 1 1.79e-08
-d 181 1 1.8e-08
-d 182 1 1.81e-08
-d 183 1 1.82e-08
-d 184 1 1.83e-08
-d 185 1 1.84e-08
-d 186 1 1.85e-08
-d 187 1 1.86e-08
-d 188 1 1.87e-08
-d 189 1 1.88e-08
-d 190 1 1.89e-08
-d 191 1 1.9e-08
-d 192 1 1.91e-08
-d 193 1 1.92e-08
-d 194 1 1.93e-08
-d 195 1 1.94e-08
-d 196 1 1.95e-08
-d 197 1 1.96e-08
-d 198 1 1.97e-08
-d 199 1 1.98e-08
-d 200 1 1.99e-08
-d 201 1 2e-08
-d 202 1 2.01e-08
-d 203 1 2.02e-08
-d 204 1 2.03e-08
-d 205 1 2.04e-08
-d 206 1 2.05e-08
-d 207 1 2.06e-08
-d 208 1 2.07e-08
-d 209 1 2.08e-08
-d 210 1 2.09e-08
-d 211 1 2.1e-08
-d 212 1 2.11e-08
-d 213 1 2.12e-08
-d 214 1 2.13e-08
-d 215 1 2.14e-08
-d 216 1 2.15e-08
-d 217 1 2.16e-08
-d 218 1 2.17e-08
-d 219 1 2.18e-08
-d 220 1 2.19e-08
-d 221 1 2.2e-08
-d 222 1 2.21e-08
-d 223 1 2.22e-08
-d 224 1 2.23e-08
-d 225 1 2.24e-08
-d 226 1 2.25e-08
-d 227 1 2.26e-08
-d 228 1 2.27e-08
-d 229 1 2.28e-08
-d 230 1 2.29e-08
-d 231 1 2.3e-08
-d 232 1 2.31e-08
-d 233 1 2.32e-08
-d 234 1 2.33e-08
-d 235 1 2.34e-08
-d 236 1 2.35e-08
-d 237 1 2.36e-08
-d 238 1 2.37e-08
-d 239 1 2.38e-08
-d 240 1 2.39e-08
-d 241 1 2.4e-08
-d 242 1 2.41e-08
-d 243 1 2.42e-08
-d 244 1 2.43e-08
-d 245 1 2.44e-08
-d 246 1 2.45e-08
-d 247 1 2.46e-08
-d 248 1 2.47e-08
-d 249 1 2.48e-08
-d 250 1 2.49e-08
-d 251 1 2.5e-08
-d 252 1 2.51e-08
-d 253 1 2.52e-08
-d 254 1 2.53e-08
-d 255 1 2.54e-08
-d 256 1 2.55e-08
-d 257 1 2.56e-08
-d 258 1 2.57e-08
-d 259 1 2.58e-08
-d 260 1 2.59e-08
-d 261 1 2.6e-08
-d 262 1 2.61e-08
-d 263 1 2.62e-08
-d 264 1 2.63e-08
-d 265 1 2.64e-08
-d 266 1 2.65e-08
-d 267 1 2.66e-08
-d 268 1 2.67e-08
-d 269 1 2.68e-08
-d 270 1 2.69e-08
-d 271 1 2.7e-08
-d 272 1 2.71e-08
-d 273 1 2.72e-08
-d 274 1 2.73e-08
-d 275 1 2.74e-08
-d 276 1 2.75e-08
-d 277 1 2.76e-08
-d 278 1 2.77e-08
-d 279 1 2.78e-08
-d 280 1 2.79e-08
-d 281 1 2.8e-08
-d 282 1 2.81e-08
-d 283 1 2.82e-08
-d 284 1 2.83e-08
-d 285 1 2.84e-08
-d 286 1 2.85e-08
-d 287 1 2.86e-08
-d 288 1 2.87e-08
-d 289 1 2.88e-08
-d 290 1 2.89e-08
-d 291 1 2.9e-08
-d 292 1 2.91e-08
-d 293 1 2.92e-08
-d 294 1 2.93e-08
-d 295 1 2.94e-08
-d 296 1 2.95e-08
-d 297 1 2.96e-08
-d 298 1 2.97e-08
-d 299 1 2.98e-08
-d 300 1 2.99e-08
-d 301 1 3e-08
-d 302 1 3.01e-08
-d 303 1 3.02e-08
-d 304 1 3.03e-08
-d 305 1 3.04e-08
-d 306 1 3.05e-08
-d 307 1 3.06e-08
-d 308 1 3.07e-08
-d 309 1 3.08e-08
-d 310 1 3.09e-08
-d 311 1 3.1e-08
-d 312 1 3.11e-08
-d 313 1 3.12e-08
-d 314 1 3.13e-08
-d 315 1 3.14e-08
-d 316 1 3.15e-08
-d 317 1 3.16e-08
-d 318 1 3.17e-08
-d 319 1 3.18e-08
-d 320 1 3.19e-08
-d 321 1 3.2e-08
-d 322 1 3.21e-08
-d 323 1 3.22e-08
-d 324 1 3.23e-08
-d 325 1 3.24e-08
-d 326 1 3.25e-08
-d 327 1 3.26e-08
-d 328 1 3.27e-08
-d 329 1 3.28e-08
-d 330 1 3.29e-08
-d 331 1 3.3e-08
-d 332 1 3.31e-08
-d 333 1 3.32e-08
-d 334 1 3.33e-08
-d 335 1 3.34e-08
-d 336 1 3.35e-08
-d 337 1 3.36e-08
-d 338 1 3.37e-08
-d 339 1 3.38e-08
-d 340 1 3.39e-08
-d 341 1 3.4e-08
-d 342 1 3.41e-08
-d 343 1 3.42e-08
-d 344 1 3.43e-08
-d 345 1 3.44e-08
-d 346 1 3.45e-08
-d 347 1 3.46e-08
-d 348 1 3.47e-08
-d 349 1 3.48e-08
-d 350 1 3.49e-08
-d 351 1 3.5e-08
-d 352 1 3.51e-08
-d 353 1 3.52e-08
-d 354 1 3.53e-08
-d 355 1 3.54e-08
-d 356 1 3.55e-08
-d 357 1 3.56e-08
-d 358 1 3.57e-08
-d 359 1 3.58e-08
-d 360 1 3.59e-08
-d 361 1 3.6e-08
-d 1 2 5.0
-d 2 2 5.0
-d 3 2 5.0
-d 4 2 5.0
-d 5 2 5.0
-d 6 2 5.0
-d 7 2 5.0
-d 8 2 5.0
-d 9 2 5.0
-d 10 2 5.0
-d 11 2 5.0
-d 12 2 5.0
-d 13 2 5.0
-d 14 2 5.0
-d 15 2 5.0
-d 16 2 5.0
-d 17 2 5.0
-d 18 2 5.0
-d 19 2 5.0
-d 20 2 5.0
-d 21 2 5.0
-d 22 2 5.0
-d 23 2 5.0
-d 24 2 5.0
-d 25 2 5.0
-d 26 2 5.0
-d 27 2 5.0
-d 28 2 5.0
-d 29 2 5.0
-d 30 2 5.0
-d 31 2 5.0
-d 32 2 5.0
-d 33 2 5.0
-d 34 2 5.0
-d 35 2 5.0
-d 36 2 5.0
-d 37 2 5.0
-d 38 2 5.0
-d 39 2 5.0
-d 40 2 5.0
-d 41 2 5.0
-d 42 2 5.0
-d 43 2 5.0
-d 44 2 5.0
-d 45 2 5.0
-d 46 2 5.0
-d 47 2 5.0
-d 48 2 5.0
-d 49 2 5.0
-d 50 2 5.0
-d 51 2 5.0
-d 52 2 5.0
-d 53 2 5.0
-d 54 2 5.0
-d 55 2 5.0
-d 56 2 5.0
-d 57 2 5.0
-d 58 2 5.0
-d 59 2 5.0
-d 60 2 5.0
-d 61 2 5.0
-d 62 2 5.0
-d 63 2 5.0
-d 64 2 5.0
-d 65 2 5.0
-d 66 2 5.0
-d 67 2 5.0
-d 68 2 5.0
-d 69 2 5.0
-d 70 2 5.0
-d 71 2 5.0
-d 72 2 5.0
-d 73 2 5.0
-d 74 2 5.0
-d 75 2 5.0
-d 76 2 5.0
-d 77 2 5.0
-d 78 2 5.0
-d 79 2 5.0
-d 80 2 5.0
-d 81 2 5.0
-d 82 2 5.0
-d 83 2 5.0
-d 84 2 5.0
-d 85 2 5.0
-d 86 2 5.0
-d 87 2 5.0
-d 88 2 5.0
-d 89 2 5.0
-d 90 2 5.0
-d 91 2 5.0
-d 92 2 5.0
-d 93 2 5.0
-d 94 2 5.0
-d 95 2 5.0
-d 96 2 5.0
-d 97 2 5.0
-d 98 2 5.0
-d 99 2 5.0
-d 100 2 5.0
-d 101 2 5.0
-d 102 2 5.0
-d 103 2 5.0
-d 104 2 5.0
-d 105 2 5.0
-d 106 2 5.0
-d 107 2 5.0
-d 108 2 5.0
-d 109 2 5.0
-d 110 2 5.0
-d 111 2 5.0
-d 112 2 5.0
-d 113 2 5.0
-d 114 2 5.0
-d 115 2 5.0
-d 116 2 5.0
-d 117 2 5.0
-d 118 2 5.0
-d 119 2 5.0
-d 120 2 5.0
-d 121 2 5.0
-d 122 2 5.0
-d 123 2 5.0
-d 124 2 5.0
-d 125 2 5.0
-d 126 2 5.0
-d 127 2 5.0
-d 128 2 5.0
-d 129 2 5.0
-d 130 2 5.0
-d 131 2 5.0
-d 132 2 5.0
-d 133 2 5.0
-d 134 2 5.0
-d 135 2 5.0
-d 136 2 5.0
-d 137 2 5.0
-d 138 2 5.0
-d 139 2 5.0
-d 140 2 5.0
-d 141 2 5.0
-d 142 2 5.0
-d 143 2 5.0
-d 144 2 5.0
-d 145 2 5.0
-d 146 2 5.0
-d 147 2 5.0
-d 148 2 5.0
-d 149 2 5.0
-d 150 2 5.0
-d 151 2 5.0
-d 152 2 5.0
-d 153 2 5.0
-d 154 2 5.0
-d 155 2 5.0
-d 156 2 5.0
-d 157 2 5.0
-d 158 2 5.0
-d 159 2 5.0
-d 160 2 5.0
-d 161 2 5.0
-d 162 2 5.0
-d 163 2 5.0
-d 164 2 5.0
-d 165 2 5.0
-d 166 2 5.0
-d 167 2 5.0
-d 168 2 5.0
-d 169 2 5.0
-d 170 2 5.0
-d 171 2 5.0
-d 172 2 5.0
-d 173 2 5.0
-d 174 2 5.0
-d 175 2 5.0
-d 176 2 5.0
-d 177 2 5.0
-d 178 2 5.0
-d 179 2 5.0
-d 180 2 5.0
-d 181 2 5.0
-d 182 2 5.0
-d 183 2 5.0
-d 184 2 5.0
-d 185 2 5.0
-d 186 2 5.0
-d 187 2 5.0
-d 188 2 5.0
-d 189 2 5.0
-d 190 2 5.0
-d 191 2 5.0
-d 192 2 5.0
-d 193 2 5.0
-d 194 2 5.0
-d 195 2 5.0
-d 196 2 5.0
-d 197 2 5.0
-d 198 2 5.0
-d 199 2 5.0
-d 200 2 5.0
-d 201 2 5.0
-d 202 2 5.0
-d 203 2 5.0
-d 204 2 5.0
-d 205 2 5.0
-d 206 2 5.0
-d 207 2 5.0
-d 208 2 5.0
-d 209 2 5.0
-d 210 2 5.0
-d 211 2 5.0
-d 212 2 5.0
-d 213 2 5.0
-d 214 2 5.0
-d 215 2 5.0
-d 216 2 5.0
-d 217 2 5.0
-d 218 2 5.0
-d 219 2 5.0
-d 220 2 5.0
-d 221 2 5.0
-d 222 2 5.0
-d 223 2 5.0
-d 224 2 5.0
-d 225 2 5.0
-d 226 2 5.0
-d 227 2 5.0
-d 228 2 5.0
-d 229 2 5.0
-d 230 2 5.0
-d 231 2 5.0
-d 232 2 5.0
-d 233 2 5.0
-d 234 2 5.0
-d 235 2 5.0
-d 236 2 5.0
-d 237 2 5.0
-d 238 2 5.0
-d 239 2 5.0
-d 240 2 5.0
-d 241 2 5.0
-d 242 2 5.0
-d 243 2 5.0
-d 244 2 5.0
-d 245 2 5.0
-d 246 2 5.0
-d 247 2 5.0
-d 248 2 5.0
-d 249 2 5.0
-d 250 2 5.0
-d 251 2 5.0
-d 252 2 5.0
-d 253 2 5.0
-d 254 2 5.0
-d 255 2 5.0
-d 256 2 5.0
-d 257 2 5.0
-d 258 2 5.0
-d 259 2 5.0
-d 260 2 5.0
-d 261 2 5.0
-d 262 2 5.0
-d 263 2 5.0
-d 264 2 5.0
-d 265 2 5.0
-d 266 2 5.0
-d 267 2 5.0
-d 268 2 5.0
-d 269 2 5.0
-d 270 2 5.0
-d 271 2 5.0
-d 272 2 5.0
-d 273 2 5.0
-d 274 2 5.0
-d 275 2 5.0
-d 276 2 5.0
-d 277 2 5.0
-d 278 2 5.0
-d 279 2 5.0
-d 280 2 5.0
-d 281 2 5.0
-d 282 2 5.0
-d 283 2 5.0
-d 284 2 5.0
-d 285 2 5.0
-d 286 2 5.0
-d 287 2 5.0
-d 288 2 5.0
-d 289 2 5.0
-d 290 2 5.0
-d 291 2 5.0
-d 292 2 5.0
-d 293 2 5.0
-d 294 2 5.0
-d 295 2 5.0
-d 296 2 5.0
-d 297 2 5.0
-d 298 2 5.0
-d 299 2 5.0
-d 300 2 5.0
-d 301 2 5.0
-d 302 2 5.0
-d 303 2 5.0
-d 304 2 5.0
-d 305 2 5.0
-d 306 2 5.0
-d 307 2 5.0
-d 308 2 5.0
-d 309 2 5.0
-d 310 2 5.0
-d 311 2 5.0
-d 312 2 5.0
-d 313 2 5.0
-d 314 2 5.0
-d 315 2 5.0
-d 316 2 5.0
-d 317 2 5.0
-d 318 2 5.0
-d 319 2 5.0
-d 320 2 5.0
-d 321 2 5.0
-d 322 2 5.0
-d 323 2 5.0
-d 324 2 5.0
-d 325 2 5.0
-d 326 2 5.0
-d 327 2 5.0
-d 328 2 5.0
-d 329 2 5.0
-d 330 2 5.0
-d 331 2 5.0
-d 332 2 5.0
-d 333 2 5.0
-d 334 2 5.0
-d 335 2 5.0
-d 336 2 5.0
-d 337 2 5.0
-d 338 2 5.0
-d 339 2 5.0
-d 340 2 5.0
-d 341 2 5.0
-d 342 2 5.0
-d 343 2 5.0
-d 344 2 5.0
-d 345 2 5.0
-d 346 2 5.0
-d 347 2 5.0
-d 348 2 5.0
-d 349 2 5.0
-d 350 2 5.0
-d 351 2 5.0
-d 352 2 5.0
-d 353 2 5.0
-d 354 2 5.0
-d 355 2 5.0
-d 356 2 5.0
-d 357 2 5.0
-d 358 2 5.0
-d 359 2 5.0
-d 360 2 5.0
-d 361 2 5.0
-d 1 3 0.0
-d 2 3 1.0
-d 3 3 2.0
-d 4 3 3.0
-d 5 3 4.0
-d 6 3 5.0
-d 7 3 5.0
-d 8 3 5.0
-d 9 3 5.0
-d 10 3 5.0
-d 11 3 5.0
-d 12 3 5.0
-d 13 3 5.0
-d 14 3 5.0
-d 15 3 5.0
-d 16 3 5.0
-d 17 3 4.0
-d 18 3 3.0
-d 19 3 2.0
-d 20 3 1.0
-d 21 3 0.0
-d 22 3 0.0
-d 23 3 0.0
-d 24 3 0.0
-d 25 3 0.0
-d 26 3 0.0
-d 27 3 0.0
-d 28 3 0.0
-d 29 3 0.0
-d 30 3 0.0
-d 31 3 0.0
-d 32 3 0.0
-d 33 3 0.0
-d 34 3 0.0
-d 35 3 0.0
-d 36 3 0.0
-d 37 3 0.0
-d 38 3 0.0
-d 39 3 0.0
-d 40 3 0.0
-d 41 3 0.0
-d 42 3 0.0
-d 43 3 0.0
-d 44 3 0.0
-d 45 3 0.0
-d 46 3 0.0
-d 47 3 0.0
-d 48 3 0.0
-d 49 3 0.0
-d 50 3 0.0
-d 51 3 0.0
-d 52 3 0.0
-d 53 3 0.0
-d 54 3 0.0
-d 55 3 0.0
-d 56 3 0.0
-d 57 3 0.0
-d 58 3 0.0
-d 59 3 0.0
-d 60 3 0.0
-d 61 3 0.0
-d 62 3 0.0
-d 63 3 0.0
-d 64 3 0.0
-d 65 3 0.0
-d 66 3 0.0
-d 67 3 0.0
-d 68 3 0.0
-d 69 3 0.0
-d 70 3 0.0
-d 71 3 0.0
-d 72 3 0.0
-d 73 3 0.0
-d 74 3 0.0
-d 75 3 0.0
-d 76 3 0.0
-d 77 3 0.0
-d 78 3 0.0
-d 79 3 0.0
-d 80 3 0.0
-d 81 3 0.0
-d 82 3 0.0
-d 83 3 0.0
-d 84 3 0.0
-d 85 3 0.0
-d 86 3 0.0
-d 87 3 0.0
-d 88 3 0.0
-d 89 3 0.0
-d 90 3 0.0
-d 91 3 0.0
-d 92 3 0.0
-d 93 3 0.0
-d 94 3 0.0
-d 95 3 0.0
-d 96 3 0.0
-d 97 3 0.0
-d 98 3 0.0
-d 99 3 0.0
-d 100 3 0.0
-d 101 3 0.0
-d 102 3 0.0
-d 103 3 0.0
-d 104 3 0.0
-d 105 3 0.0
-d 106 3 0.0
-d 107 3 0.0
-d 108 3 0.0
-d 109 3 0.0
-d 110 3 0.0
-d 111 3 0.0
-d 112 3 0.0
-d 113 3 0.0
-d 114 3 0.0
-d 115 3 0.0
-d 116 3 0.0
-d 117 3 0.0
-d 118 3 0.0
-d 119 3 0.0
-d 120 3 0.0
-d 121 3 0.0
-d 122 3 1.0
-d 123 3 2.0
-d 124 3 3.0
-d 125 3 4.0
-d 126 3 5.0
-d 127 3 5.0
-d 128 3 5.0
-d 129 3 5.0
-d 130 3 5.0
-d 131 3 5.0
-d 132 3 5.0
-d 133 3 5.0
-d 134 3 5.0
-d 135 3 5.0
-d 136 3 5.0
-d 137 3 4.0
-d 138 3 3.0
-d 139 3 2.0
-d 140 3 1.0
-d 141 3 5.32907e-15
-d 142 3 0.0
-d 143 3 0.0
-d 144 3 0.0
-d 145 3 0.0
-d 146 3 0.0
-d 147 3 0.0
-d 148 3 0.0
-d 149 3 0.0
-d 150 3 0.0
-d 151 3 0.0
-d 152 3 0.0
-d 153 3 0.0
-d 154 3 0.0
-d 155 3 0.0
-d 156 3 0.0
-d 157 3 0.0
-d 158 3 0.0
-d 159 3 0.0
-d 160 3 0.0
-d 161 3 0.0
-d 162 3 0.0
-d 163 3 0.0
-d 164 3 0.0
-d 165 3 0.0
-d 166 3 0.0
-d 167 3 0.0
-d 168 3 0.0
-d 169 3 0.0
-d 170 3 0.0
-d 171 3 0.0
-d 172 3 0.0
-d 173 3 0.0
-d 174 3 0.0
-d 175 3 0.0
-d 176 3 0.0
-d 177 3 0.0
-d 178 3 0.0
-d 179 3 0.0
-d 180 3 0.0
-d 181 3 0.0
-d 182 3 0.0
-d 183 3 0.0
-d 184 3 0.0
-d 185 3 0.0
-d 186 3 0.0
-d 187 3 0.0
-d 188 3 0.0
-d 189 3 0.0
-d 190 3 0.0
-d 191 3 0.0
-d 192 3 0.0
-d 193 3 0.0
-d 194 3 0.0
-d 195 3 0.0
-d 196 3 0.0
-d 197 3 0.0
-d 198 3 0.0
-d 199 3 0.0
-d 200 3 0.0
-d 201 3 0.0
-d 202 3 0.0
-d 203 3 0.0
-d 204 3 0.0
-d 205 3 0.0
-d 206 3 0.0
-d 207 3 0.0
-d 208 3 0.0
-d 209 3 0.0
-d 210 3 0.0
-d 211 3 0.0
-d 212 3 0.0
-d 213 3 0.0
-d 214 3 0.0
-d 215 3 0.0
-d 216 3 0.0
-d 217 3 0.0
-d 218 3 0.0
-d 219 3 0.0
-d 220 3 0.0
-d 221 3 0.0
-d 222 3 0.0
-d 223 3 0.0
-d 224 3 0.0
-d 225 3 0.0
-d 226 3 0.0
-d 227 3 0.0
-d 228 3 0.0
-d 229 3 0.0
-d 230 3 0.0
-d 231 3 0.0
-d 232 3 0.0
-d 233 3 0.0
-d 234 3 0.0
-d 235 3 0.0
-d 236 3 0.0
-d 237 3 0.0
-d 238 3 0.0
-d 239 3 0.0
-d 240 3 0.0
-d 241 3 0.0
-d 242 3 1.0
-d 243 3 2.0
-d 244 3 3.0
-d 245 3 4.0
-d 246 3 5.0
-d 247 3 5.0
-d 248 3 5.0
-d 249 3 5.0
-d 250 3 5.0
-d 251 3 5.0
-d 252 3 5.0
-d 253 3 5.0
-d 254 3 5.0
-d 255 3 5.0
-d 256 3 5.0
-d 257 3 4.0
-d 258 3 3.0
-d 259 3 2.0
-d 260 3 1.0
-d 261 3 0.0
-d 262 3 0.0
-d 263 3 0.0
-d 264 3 0.0
-d 265 3 0.0
-d 266 3 0.0
-d 267 3 0.0
-d 268 3 0.0
-d 269 3 0.0
-d 270 3 0.0
-d 271 3 0.0
-d 272 3 0.0
-d 273 3 0.0
-d 274 3 0.0
-d 275 3 0.0
-d 276 3 0.0
-d 277 3 0.0
-d 278 3 0.0
-d 279 3 0.0
-d 280 3 0.0
-d 281 3 0.0
-d 282 3 0.0
-d 283 3 0.0
-d 284 3 0.0
-d 285 3 0.0
-d 286 3 0.0
-d 287 3 0.0
-d 288 3 0.0
-d 289 3 0.0
-d 290 3 0.0
-d 291 3 0.0
-d 292 3 0.0
-d 293 3 0.0
-d 294 3 0.0
-d 295 3 0.0
-d 296 3 0.0
-d 297 3 0.0
-d 298 3 0.0
-d 299 3 0.0
-d 300 3 0.0
-d 301 3 0.0
-d 302 3 0.0
-d 303 3 0.0
-d 304 3 0.0
-d 305 3 0.0
-d 306 3 0.0
-d 307 3 0.0
-d 308 3 0.0
-d 309 3 0.0
-d 310 3 0.0
-d 311 3 0.0
-d 312 3 0.0
-d 313 3 0.0
-d 314 3 0.0
-d 315 3 0.0
-d 316 3 0.0
-d 317 3 0.0
-d 318 3 0.0
-d 319 3 0.0
-d 320 3 0.0
-d 321 3 0.0
-d 322 3 0.0
-d 323 3 0.0
-d 324 3 0.0
-d 325 3 0.0
-d 326 3 0.0
-d 327 3 0.0
-d 328 3 0.0
-d 329 3 0.0
-d 330 3 0.0
-d 331 3 0.0
-d 332 3 0.0
-d 333 3 0.0
-d 334 3 0.0
-d 335 3 0.0
-d 336 3 0.0
-d 337 3 0.0
-d 338 3 0.0
-d 339 3 0.0
-d 340 3 0.0
-d 341 3 0.0
-d 342 3 0.0
-d 343 3 0.0
-d 344 3 0.0
-d 345 3 0.0
-d 346 3 0.0
-d 347 3 0.0
-d 348 3 0.0
-d 349 3 0.0
-d 350 3 0.0
-d 351 3 0.0
-d 352 3 0.0
-d 353 3 0.0
-d 354 3 0.0
-d 355 3 0.0
-d 356 3 0.0
-d 357 3 0.0
-d 358 3 0.0
-d 359 3 0.0
-d 360 3 0.0
-d 361 3 0.0
-d 1 4 5.0
-d 2 4 5.0
-d 3 4 5.0
-d 4 4 5.0
-d 5 4 5.0
-d 6 4 5.0
-d 7 4 5.0
-d 8 4 5.0
-d 9 4 5.0
-d 10 4 5.0
-d 11 4 5.0
-d 12 4 5.0
-d 13 4 5.0
-d 14 4 5.0
-d 15 4 5.0
-d 16 4 5.0
-d 17 4 5.0
-d 18 4 5.0
-d 19 4 5.0
-d 20 4 5.0
-d 21 4 5.0
-d 22 4 4.0
-d 23 4 3.0
-d 24 4 2.0
-d 25 4 1.0
-d 26 4 8.88178e-16
-d 27 4 0.0
-d 28 4 0.0
-d 29 4 0.0
-d 30 4 0.0
-d 31 4 0.0
-d 32 4 0.0
-d 33 4 0.0
-d 34 4 0.0
-d 35 4 0.0
-d 36 4 0.0
-d 37 4 0.0
-d 38 4 0.0
-d 39 4 0.0
-d 40 4 0.0
-d 41 4 0.0
-d 42 4 0.0
-d 43 4 0.0
-d 44 4 0.0
-d 45 4 0.0
-d 46 4 0.0
-d 47 4 0.0
-d 48 4 0.0
-d 49 4 0.0
-d 50 4 0.0
-d 51 4 0.0
-d 52 4 0.0
-d 53 4 0.0
-d 54 4 0.0
-d 55 4 0.0
-d 56 4 0.0
-d 57 4 0.0
-d 58 4 0.0
-d 59 4 0.0
-d 60 4 0.0
-d 61 4 0.0
-d 62 4 0.0
-d 63 4 0.0
-d 64 4 0.0
-d 65 4 0.0
-d 66 4 0.0
-d 67 4 0.0
-d 68 4 0.0
-d 69 4 0.0
-d 70 4 0.0
-d 71 4 0.0
-d 72 4 0.0
-d 73 4 0.0
-d 74 4 0.0
-d 75 4 0.0
-d 76 4 0.0
-d 77 4 0.0
-d 78 4 0.0
-d 79 4 0.0
-d 80 4 0.0
-d 81 4 0.0
-d 82 4 0.0
-d 83 4 0.0
-d 84 4 0.0
-d 85 4 0.0
-d 86 4 0.0
-d 87 4 0.0
-d 88 4 0.0
-d 89 4 0.0
-d 90 4 0.0
-d 91 4 0.0
-d 92 4 0.0
-d 93 4 0.0
-d 94 4 0.0
-d 95 4 0.0
-d 96 4 0.0
-d 97 4 0.0
-d 98 4 0.0
-d 99 4 0.0
-d 100 4 0.0
-d 101 4 0.0
-d 102 4 0.0
-d 103 4 0.0
-d 104 4 0.0
-d 105 4 0.0
-d 106 4 0.0
-d 107 4 0.0
-d 108 4 0.0
-d 109 4 0.0
-d 110 4 0.0
-d 111 4 0.0
-d 112 4 0.0
-d 113 4 0.0
-d 114 4 0.0
-d 115 4 0.0
-d 116 4 0.0
-d 117 4 0.0
-d 118 4 0.0
-d 119 4 0.0
-d 120 4 0.0
-d 121 4 0.0
-d 122 4 0.0
-d 123 4 0.0
-d 124 4 0.0
-d 125 4 0.0
-d 126 4 0.0
-d 127 4 0.0
-d 128 4 0.0
-d 129 4 0.0
-d 130 4 0.0
-d 131 4 0.0
-d 132 4 0.0
-d 133 4 0.0
-d 134 4 0.0
-d 135 4 0.0
-d 136 4 0.0
-d 137 4 0.0
-d 138 4 0.0
-d 139 4 0.0
-d 140 4 0.0
-d 141 4 0.0
-d 142 4 1.0
-d 143 4 2.0
-d 144 4 3.0
-d 145 4 4.0
-d 146 4 5.0
-d 147 4 5.0
-d 148 4 5.0
-d 149 4 5.0
-d 150 4 5.0
-d 151 4 5.0
-d 152 4 5.0
-d 153 4 5.0
-d 154 4 5.0
-d 155 4 5.0
-d 156 4 5.0
-d 157 4 5.0
-d 158 4 5.0
-d 159 4 5.0
-d 160 4 5.0
-d 161 4 5.0
-d 162 4 5.0
-d 163 4 5.0
-d 164 4 5.0
-d 165 4 5.0
-d 166 4 5.0
-d 167 4 5.0
-d 168 4 5.0
-d 169 4 5.0
-d 170 4 5.0
-d 171 4 5.0
-d 172 4 5.0
-d 173 4 5.0
-d 174 4 5.0
-d 175 4 5.0
-d 176 4 5.0
-d 177 4 5.0
-d 178 4 5.0
-d 179 4 5.0
-d 180 4 5.0
-d 181 4 5.0
-d 182 4 5.0
-d 183 4 5.0
-d 184 4 5.0
-d 185 4 5.0
-d 186 4 5.0
-d 187 4 5.0
-d 188 4 5.0
-d 189 4 5.0
-d 190 4 5.0
-d 191 4 5.0
-d 192 4 5.0
-d 193 4 5.0
-d 194 4 5.0
-d 195 4 5.0
-d 196 4 5.0
-d 197 4 5.0
-d 198 4 5.0
-d 199 4 5.0
-d 200 4 5.0
-d 201 4 5.0
-d 202 4 5.0
-d 203 4 5.0
-d 204 4 5.0
-d 205 4 5.0
-d 206 4 5.0
-d 207 4 5.0
-d 208 4 5.0
-d 209 4 5.0
-d 210 4 5.0
-d 211 4 5.0
-d 212 4 5.0
-d 213 4 5.0
-d 214 4 5.0
-d 215 4 5.0
-d 216 4 5.0
-d 217 4 5.0
-d 218 4 5.0
-d 219 4 5.0
-d 220 4 5.0
-d 221 4 5.0
-d 222 4 5.0
-d 223 4 5.0
-d 224 4 5.0
-d 225 4 5.0
-d 226 4 5.0
-d 227 4 5.0
-d 228 4 5.0
-d 229 4 5.0
-d 230 4 5.0
-d 231 4 5.0
-d 232 4 5.0
-d 233 4 5.0
-d 234 4 5.0
-d 235 4 5.0
-d 236 4 5.0
-d 237 4 5.0
-d 238 4 5.0
-d 239 4 5.0
-d 240 4 5.0
-d 241 4 5.0
-d 242 4 5.0
-d 243 4 5.0
-d 244 4 5.0
-d 245 4 5.0
-d 246 4 5.0
-d 247 4 5.0
-d 248 4 5.0
-d 249 4 5.0
-d 250 4 5.0
-d 251 4 5.0
-d 252 4 5.0
-d 253 4 5.0
-d 254 4 5.0
-d 255 4 5.0
-d 256 4 5.0
-d 257 4 5.0
-d 258 4 5.0
-d 259 4 5.0
-d 260 4 5.0
-d 261 4 5.0
-d 262 4 4.0
-d 263 4 3.0
-d 264 4 2.0
-d 265 4 1.0
-d 266 4 2.13718e-14
-d 267 4 0.0
-d 268 4 0.0
-d 269 4 0.0
-d 270 4 0.0
-d 271 4 0.0
-d 272 4 0.0
-d 273 4 0.0
-d 274 4 0.0
-d 275 4 0.0
-d 276 4 0.0
-d 277 4 0.0
-d 278 4 0.0
-d 279 4 0.0
-d 280 4 0.0
-d 281 4 0.0
-d 282 4 0.0
-d 283 4 0.0
-d 284 4 0.0
-d 285 4 0.0
-d 286 4 0.0
-d 287 4 0.0
-d 288 4 0.0
-d 289 4 0.0
-d 290 4 0.0
-d 291 4 0.0
-d 292 4 0.0
-d 293 4 0.0
-d 294 4 0.0
-d 295 4 0.0
-d 296 4 0.0
-d 297 4 0.0
-d 298 4 0.0
-d 299 4 0.0
-d 300 4 0.0
-d 301 4 0.0
-d 302 4 0.0
-d 303 4 0.0
-d 304 4 0.0
-d 305 4 0.0
-d 306 4 0.0
-d 307 4 0.0
-d 308 4 0.0
-d 309 4 0.0
-d 310 4 0.0
-d 311 4 0.0
-d 312 4 0.0
-d 313 4 0.0
-d 314 4 0.0
-d 315 4 0.0
-d 316 4 0.0
-d 317 4 0.0
-d 318 4 0.0
-d 319 4 0.0
-d 320 4 0.0
-d 321 4 0.0
-d 322 4 0.0
-d 323 4 0.0
-d 324 4 0.0
-d 325 4 0.0
-d 326 4 0.0
-d 327 4 0.0
-d 328 4 0.0
-d 329 4 0.0
-d 330 4 0.0
-d 331 4 0.0
-d 332 4 0.0
-d 333 4 0.0
-d 334 4 0.0
-d 335 4 0.0
-d 336 4 0.0
-d 337 4 0.0
-d 338 4 0.0
-d 339 4 0.0
-d 340 4 0.0
-d 341 4 0.0
-d 342 4 0.0
-d 343 4 0.0
-d 344 4 0.0
-d 345 4 0.0
-d 346 4 0.0
-d 347 4 0.0
-d 348 4 0.0
-d 349 4 0.0
-d 350 4 0.0
-d 351 4 0.0
-d 352 4 0.0
-d 353 4 0.0
-d 354 4 0.0
-d 355 4 0.0
-d 356 4 0.0
-d 357 4 0.0
-d 358 4 0.0
-d 359 4 0.0
-d 360 4 0.0
-d 361 4 0.0
-d 1 5 0.0
-d 2 5 0.0
-d 3 5 0.0
-d 4 5 0.0
-d 5 5 0.0
-d 6 5 0.0
-d 7 5 0.0
-d 8 5 0.0
-d 9 5 0.0
-d 10 5 0.0
-d 11 5 0.0
-d 12 5 0.0
-d 13 5 0.0
-d 14 5 0.0
-d 15 5 0.0
-d 16 5 0.0
-d 17 5 0.0
-d 18 5 0.0
-d 19 5 0.0
-d 20 5 0.0
-d 21 5 0.0
-d 22 5 1.0
-d 23 5 2.0
-d 24 5 3.0
-d 25 5 4.0
-d 26 5 5.0
-d 27 5 5.0
-d 28 5 5.0
-d 29 5 5.0
-d 30 5 5.0
-d 31 5 5.0
-d 32 5 5.0
-d 33 5 5.0
-d 34 5 5.0
-d 35 5 5.0
-d 36 5 5.0
-d 37 5 5.0
-d 38 5 5.0
-d 39 5 5.0
-d 40 5 5.0
-d 41 5 5.0
-d 42 5 5.0
-d 43 5 5.0
-d 44 5 5.0
-d 45 5 5.0
-d 46 5 5.0
-d 47 5 5.0
-d 48 5 5.0
-d 49 5 5.0
-d 50 5 5.0
-d 51 5 5.0
-d 52 5 5.0
-d 53 5 5.0
-d 54 5 5.0
-d 55 5 5.0
-d 56 5 5.0
-d 57 5 5.0
-d 58 5 5.0
-d 59 5 5.0
-d 60 5 5.0
-d 61 5 5.0
-d 62 5 5.0
-d 63 5 5.0
-d 64 5 5.0
-d 65 5 5.0
-d 66 5 5.0
-d 67 5 5.0
-d 68 5 5.0
-d 69 5 5.0
-d 70 5 5.0
-d 71 5 5.0
-d 72 5 5.0
-d 73 5 5.0
-d 74 5 5.0
-d 75 5 5.0
-d 76 5 5.0
-d 77 5 5.0
-d 78 5 5.0
-d 79 5 5.0
-d 80 5 5.0
-d 81 5 5.0
-d 82 5 5.0
-d 83 5 5.0
-d 84 5 5.0
-d 85 5 5.0
-d 86 5 5.0
-d 87 5 5.0
-d 88 5 5.0
-d 89 5 5.0
-d 90 5 5.0
-d 91 5 5.0
-d 92 5 5.0
-d 93 5 5.0
-d 94 5 5.0
-d 95 5 5.0
-d 96 5 5.0
-d 97 5 5.0
-d 98 5 5.0
-d 99 5 5.0
-d 100 5 5.0
-d 101 5 5.0
-d 102 5 5.0
-d 103 5 5.0
-d 104 5 5.0
-d 105 5 5.0
-d 106 5 5.0
-d 107 5 5.0
-d 108 5 5.0
-d 109 5 5.0
-d 110 5 5.0
-d 111 5 5.0
-d 112 5 5.0
-d 113 5 5.0
-d 114 5 5.0
-d 115 5 5.0
-d 116 5 5.0
-d 117 5 5.0
-d 118 5 5.0
-d 119 5 5.0
-d 120 5 5.0
-d 121 5 5.0
-d 122 5 5.0
-d 123 5 5.0
-d 124 5 5.0
-d 125 5 5.0
-d 126 5 5.0
-d 127 5 5.0
-d 128 5 5.0
-d 129 5 5.0
-d 130 5 5.0
-d 131 5 5.0
-d 132 5 5.0
-d 133 5 5.0
-d 134 5 5.0
-d 135 5 5.0
-d 136 5 5.0
-d 137 5 5.0
-d 138 5 5.0
-d 139 5 5.0
-d 140 5 5.0
-d 141 5 5.0
-d 142 5 4.0
-d 143 5 3.0
-d 144 5 2.0
-d 145 5 1.0
-d 146 5 0.0
-d 147 5 0.0
-d 148 5 0.0
-d 149 5 0.0
-d 150 5 0.0
-d 151 5 0.0
-d 152 5 0.0
-d 153 5 0.0
-d 154 5 0.0
-d 155 5 0.0
-d 156 5 0.0
-d 157 5 0.0
-d 158 5 0.0
-d 159 5 0.0
-d 160 5 0.0
-d 161 5 0.0
-d 162 5 0.0
-d 163 5 0.0
-d 164 5 0.0
-d 165 5 0.0
-d 166 5 0.0
-d 167 5 0.0
-d 168 5 0.0
-d 169 5 0.0
-d 170 5 0.0
-d 171 5 0.0
-d 172 5 0.0
-d 173 5 0.0
-d 174 5 0.0
-d 175 5 0.0
-d 176 5 0.0
-d 177 5 0.0
-d 178 5 0.0
-d 179 5 0.0
-d 180 5 0.0
-d 181 5 0.0
-d 182 5 0.0
-d 183 5 0.0
-d 184 5 0.0
-d 185 5 0.0
-d 186 5 0.0
-d 187 5 0.0
-d 188 5 0.0
-d 189 5 0.0
-d 190 5 0.0
-d 191 5 0.0
-d 192 5 0.0
-d 193 5 0.0
-d 194 5 0.0
-d 195 5 0.0
-d 196 5 0.0
-d 197 5 0.0
-d 198 5 0.0
-d 199 5 0.0
-d 200 5 0.0
-d 201 5 0.0
-d 202 5 0.0
-d 203 5 0.0
-d 204 5 0.0
-d 205 5 0.0
-d 206 5 0.0
-d 207 5 0.0
-d 208 5 0.0
-d 209 5 0.0
-d 210 5 0.0
-d 211 5 0.0
-d 212 5 0.0
-d 213 5 0.0
-d 214 5 0.0
-d 215 5 0.0
-d 216 5 0.0
-d 217 5 0.0
-d 218 5 0.0
-d 219 5 0.0
-d 220 5 0.0
-d 221 5 0.0
-d 222 5 0.0
-d 223 5 0.0
-d 224 5 0.0
-d 225 5 0.0
-d 226 5 0.0
-d 227 5 0.0
-d 228 5 0.0
-d 229 5 0.0
-d 230 5 0.0
-d 231 5 0.0
-d 232 5 0.0
-d 233 5 0.0
-d 234 5 0.0
-d 235 5 0.0
-d 236 5 0.0
-d 237 5 0.0
-d 238 5 0.0
-d 239 5 0.0
-d 240 5 0.0
-d 241 5 0.0
-d 242 5 0.0
-d 243 5 0.0
-d 244 5 0.0
-d 245 5 0.0
-d 246 5 0.0
-d 247 5 0.0
-d 248 5 0.0
-d 249 5 0.0
-d 250 5 0.0
-d 251 5 0.0
-d 252 5 0.0
-d 253 5 0.0
-d 254 5 0.0
-d 255 5 0.0
-d 256 5 0.0
-d 257 5 0.0
-d 258 5 0.0
-d 259 5 0.0
-d 260 5 0.0
-d 261 5 0.0
-d 262 5 1.0
-d 263 5 2.0
-d 264 5 3.0
-d 265 5 4.0
-d 266 5 5.0
-d 267 5 5.0
-d 268 5 5.0
-d 269 5 5.0
-d 270 5 5.0
-d 271 5 5.0
-d 272 5 5.0
-d 273 5 5.0
-d 274 5 5.0
-d 275 5 5.0
-d 276 5 5.0
-d 277 5 5.0
-d 278 5 5.0
-d 279 5 5.0
-d 280 5 5.0
-d 281 5 5.0
-d 282 5 5.0
-d 283 5 5.0
-d 284 5 5.0
-d 285 5 5.0
-d 286 5 5.0
-d 287 5 5.0
-d 288 5 5.0
-d 289 5 5.0
-d 290 5 5.0
-d 291 5 5.0
-d 292 5 5.0
-d 293 5 5.0
-d 294 5 5.0
-d 295 5 5.0
-d 296 5 5.0
-d 297 5 5.0
-d 298 5 5.0
-d 299 5 5.0
-d 300 5 5.0
-d 301 5 5.0
-d 302 5 5.0
-d 303 5 5.0
-d 304 5 5.0
-d 305 5 5.0
-d 306 5 5.0
-d 307 5 5.0
-d 308 5 5.0
-d 309 5 5.0
-d 310 5 5.0
-d 311 5 5.0
-d 312 5 5.0
-d 313 5 5.0
-d 314 5 5.0
-d 315 5 5.0
-d 316 5 5.0
-d 317 5 5.0
-d 318 5 5.0
-d 319 5 5.0
-d 320 5 5.0
-d 321 5 5.0
-d 322 5 5.0
-d 323 5 5.0
-d 324 5 5.0
-d 325 5 5.0
-d 326 5 5.0
-d 327 5 5.0
-d 328 5 5.0
-d 329 5 5.0
-d 330 5 5.0
-d 331 5 5.0
-d 332 5 5.0
-d 333 5 5.0
-d 334 5 5.0
-d 335 5 5.0
-d 336 5 5.0
-d 337 5 5.0
-d 338 5 5.0
-d 339 5 5.0
-d 340 5 5.0
-d 341 5 5.0
-d 342 5 5.0
-d 343 5 5.0
-d 344 5 5.0
-d 345 5 5.0
-d 346 5 5.0
-d 347 5 5.0
-d 348 5 5.0
-d 349 5 5.0
-d 350 5 5.0
-d 351 5 5.0
-d 352 5 5.0
-d 353 5 5.0
-d 354 5 5.0
-d 355 5 5.0
-d 356 5 5.0
-d 357 5 5.0
-d 358 5 5.0
-d 359 5 5.0
-d 360 5 5.0
-d 361 5 5.0
-d 1 6 0.0
-d 2 6 0.0
-d 3 6 0.0
-d 4 6 0.0
-d 5 6 0.0
-d 6 6 0.0
-d 7 6 0.0
-d 8 6 0.0
-d 9 6 0.0
-d 10 6 0.0
-d 11 6 0.0
-d 12 6 0.0
-d 13 6 0.0
-d 14 6 0.0
-d 15 6 0.0
-d 16 6 0.0
-d 17 6 0.0
-d 18 6 0.0
-d 19 6 0.0
-d 20 6 0.0
-d 21 6 0.0
-d 22 6 1.0
-d 23 6 2.0
-d 24 6 3.0
-d 25 6 4.0
-d 26 6 5.0
-d 27 6 5.0
-d 28 6 5.0
-d 29 6 5.0
-d 30 6 5.0
-d 31 6 5.0
-d 32 6 5.0
-d 33 6 5.0
-d 34 6 5.0
-d 35 6 5.0
-d 36 6 5.0
-d 37 6 5.0
-d 38 6 5.0
-d 39 6 5.0
-d 40 6 5.0
-d 41 6 5.0
-d 42 6 5.0
-d 43 6 5.0
-d 44 6 5.0
-d 45 6 5.0
-d 46 6 5.0
-d 47 6 5.0
-d 48 6 5.0
-d 49 6 5.0
-d 50 6 5.0
-d 51 6 5.0
-d 52 6 5.0
-d 53 6 5.0
-d 54 6 5.0
-d 55 6 5.0
-d 56 6 5.0
-d 57 6 5.0
-d 58 6 5.0
-d 59 6 5.0
-d 60 6 5.0
-d 61 6 5.0
-d 62 6 5.0
-d 63 6 5.0
-d 64 6 5.0
-d 65 6 5.0
-d 66 6 5.0
-d 67 6 5.0
-d 68 6 5.0
-d 69 6 5.0
-d 70 6 5.0
-d 71 6 5.0
-d 72 6 5.0
-d 73 6 5.0
-d 74 6 5.0
-d 75 6 5.0
-d 76 6 5.0
-d 77 6 5.0
-d 78 6 5.0
-d 79 6 5.0
-d 80 6 5.0
-d 81 6 5.0
-d 82 6 5.0
-d 83 6 5.0
-d 84 6 5.0
-d 85 6 5.0
-d 86 6 5.0
-d 87 6 5.0
-d 88 6 5.0
-d 89 6 5.0
-d 90 6 5.0
-d 91 6 5.0
-d 92 6 5.0
-d 93 6 5.0
-d 94 6 5.0
-d 95 6 5.0
-d 96 6 5.0
-d 97 6 5.0
-d 98 6 5.0
-d 99 6 5.0
-d 100 6 5.0
-d 101 6 5.0
-d 102 6 5.0
-d 103 6 5.0
-d 104 6 5.0
-d 105 6 5.0
-d 106 6 5.0
-d 107 6 5.0
-d 108 6 5.0
-d 109 6 5.0
-d 110 6 5.0
-d 111 6 5.0
-d 112 6 5.0
-d 113 6 5.0
-d 114 6 5.0
-d 115 6 5.0
-d 116 6 5.0
-d 117 6 5.0
-d 118 6 5.0
-d 119 6 5.0
-d 120 6 5.0
-d 121 6 5.0
-d 122 6 5.0
-d 123 6 5.0
-d 124 6 5.0
-d 125 6 5.0
-d 126 6 5.0
-d 127 6 5.0
-d 128 6 5.0
-d 129 6 5.0
-d 130 6 5.0
-d 131 6 5.0
-d 132 6 5.0
-d 133 6 5.0
-d 134 6 5.0
-d 135 6 5.0
-d 136 6 5.0
-d 137 6 5.0
-d 138 6 5.0
-d 139 6 5.0
-d 140 6 5.0
-d 141 6 5.0
-d 142 6 4.0
-d 143 6 3.0
-d 144 6 2.0
-d 145 6 1.0
-d 146 6 0.0
-d 147 6 0.0
-d 148 6 0.0
-d 149 6 0.0
-d 150 6 0.0
-d 151 6 0.0
-d 152 6 0.0
-d 153 6 0.0
-d 154 6 0.0
-d 155 6 0.0
-d 156 6 0.0
-d 157 6 0.0
-d 158 6 0.0
-d 159 6 0.0
-d 160 6 0.0
-d 161 6 0.0
-d 162 6 0.0
-d 163 6 0.0
-d 164 6 0.0
-d 165 6 0.0
-d 166 6 0.0
-d 167 6 0.0
-d 168 6 0.0
-d 169 6 0.0
-d 170 6 0.0
-d 171 6 0.0
-d 172 6 0.0
-d 173 6 0.0
-d 174 6 0.0
-d 175 6 0.0
-d 176 6 0.0
-d 177 6 0.0
-d 178 6 0.0
-d 179 6 0.0
-d 180 6 0.0
-d 181 6 0.0
-d 182 6 0.0
-d 183 6 0.0
-d 184 6 0.0
-d 185 6 0.0
-d 186 6 0.0
-d 187 6 0.0
-d 188 6 0.0
-d 189 6 0.0
-d 190 6 0.0
-d 191 6 0.0
-d 192 6 0.0
-d 193 6 0.0
-d 194 6 0.0
-d 195 6 0.0
-d 196 6 0.0
-d 197 6 0.0
-d 198 6 0.0
-d 199 6 0.0
-d 200 6 0.0
-d 201 6 0.0
-d 202 6 0.0
-d 203 6 0.0
-d 204 6 0.0
-d 205 6 0.0
-d 206 6 0.0
-d 207 6 0.0
-d 208 6 0.0
-d 209 6 0.0
-d 210 6 0.0
-d 211 6 0.0
-d 212 6 0.0
-d 213 6 0.0
-d 214 6 0.0
-d 215 6 0.0
-d 216 6 0.0
-d 217 6 0.0
-d 218 6 0.0
-d 219 6 0.0
-d 220 6 0.0
-d 221 6 0.0
-d 222 6 0.0
-d 223 6 0.0
-d 224 6 0.0
-d 225 6 0.0
-d 226 6 0.0
-d 227 6 0.0
-d 228 6 0.0
-d 229 6 0.0
-d 230 6 0.0
-d 231 6 0.0
-d 232 6 0.0
-d 233 6 0.0
-d 234 6 0.0
-d 235 6 0.0
-d 236 6 0.0
-d 237 6 0.0
-d 238 6 0.0
-d 239 6 0.0
-d 240 6 0.0
-d 241 6 0.0
-d 242 6 0.0
-d 243 6 0.0
-d 244 6 0.0
-d 245 6 0.0
-d 246 6 0.0
-d 247 6 0.0
-d 248 6 0.0
-d 249 6 0.0
-d 250 6 0.0
-d 251 6 0.0
-d 252 6 0.0
-d 253 6 0.0
-d 254 6 0.0
-d 255 6 0.0
-d 256 6 0.0
-d 257 6 0.0
-d 258 6 0.0
-d 259 6 0.0
-d 260 6 0.0
-d 261 6 0.0
-d 262 6 1.0
-d 263 6 2.0
-d 264 6 3.0
-d 265 6 4.0
-d 266 6 5.0
-d 267 6 5.0
-d 268 6 5.0
-d 269 6 5.0
-d 270 6 5.0
-d 271 6 5.0
-d 272 6 5.0
-d 273 6 5.0
-d 274 6 5.0
-d 275 6 5.0
-d 276 6 5.0
-d 277 6 5.0
-d 278 6 5.0
-d 279 6 5.0
-d 280 6 5.0
-d 281 6 5.0
-d 282 6 5.0
-d 283 6 5.0
-d 284 6 5.0
-d 285 6 5.0
-d 286 6 5.0
-d 287 6 5.0
-d 288 6 5.0
-d 289 6 5.0
-d 290 6 5.0
-d 291 6 5.0
-d 292 6 5.0
-d 293 6 5.0
-d 294 6 5.0
-d 295 6 5.0
-d 296 6 5.0
-d 297 6 5.0
-d 298 6 5.0
-d 299 6 5.0
-d 300 6 5.0
-d 301 6 5.0
-d 302 6 5.0
-d 303 6 5.0
-d 304 6 5.0
-d 305 6 5.0
-d 306 6 5.0
-d 307 6 5.0
-d 308 6 5.0
-d 309 6 5.0
-d 310 6 5.0
-d 311 6 5.0
-d 312 6 5.0
-d 313 6 5.0
-d 314 6 5.0
-d 315 6 5.0
-d 316 6 5.0
-d 317 6 5.0
-d 318 6 5.0
-d 319 6 5.0
-d 320 6 5.0
-d 321 6 5.0
-d 322 6 5.0
-d 323 6 5.0
-d 324 6 5.0
-d 325 6 5.0
-d 326 6 5.0
-d 327 6 5.0
-d 328 6 5.0
-d 329 6 5.0
-d 330 6 5.0
-d 331 6 5.0
-d 332 6 5.0
-d 333 6 5.0
-d 334 6 5.0
-d 335 6 5.0
-d 336 6 5.0
-d 337 6 5.0
-d 338 6 5.0
-d 339 6 5.0
-d 340 6 5.0
-d 341 6 5.0
-d 342 6 5.0
-d 343 6 5.0
-d 344 6 5.0
-d 345 6 5.0
-d 346 6 5.0
-d 347 6 5.0
-d 348 6 5.0
-d 349 6 5.0
-d 350 6 5.0
-d 351 6 5.0
-d 352 6 5.0
-d 353 6 5.0
-d 354 6 5.0
-d 355 6 5.0
-d 356 6 5.0
-d 357 6 5.0
-d 358 6 5.0
-d 359 6 5.0
-d 360 6 5.0
-d 361 6 5.0
-d 1 7 5.0
-d 2 7 5.0
-d 3 7 5.0
-d 4 7 5.0
-d 5 7 5.0
-d 6 7 5.0
-d 7 7 5.0
-d 8 7 5.0
-d 9 7 5.0
-d 10 7 5.0
-d 11 7 5.0
-d 12 7 5.0
-d 13 7 5.0
-d 14 7 5.0
-d 15 7 5.0
-d 16 7 5.0
-d 17 7 5.0
-d 18 7 5.0
-d 19 7 5.0
-d 20 7 5.0
-d 21 7 5.0
-d 22 7 4.0
-d 23 7 3.0
-d 24 7 2.0
-d 25 7 1.0
-d 26 7 8.88178e-16
-d 27 7 0.0
-d 28 7 0.0
-d 29 7 0.0
-d 30 7 0.0
-d 31 7 0.0
-d 32 7 0.0
-d 33 7 0.0
-d 34 7 0.0
-d 35 7 0.0
-d 36 7 0.0
-d 37 7 0.0
-d 38 7 0.0
-d 39 7 0.0
-d 40 7 0.0
-d 41 7 0.0
-d 42 7 0.0
-d 43 7 0.0
-d 44 7 0.0
-d 45 7 0.0
-d 46 7 0.0
-d 47 7 0.0
-d 48 7 0.0
-d 49 7 0.0
-d 50 7 0.0
-d 51 7 0.0
-d 52 7 0.0
-d 53 7 0.0
-d 54 7 0.0
-d 55 7 0.0
-d 56 7 0.0
-d 57 7 0.0
-d 58 7 0.0
-d 59 7 0.0
-d 60 7 0.0
-d 61 7 0.0
-d 62 7 0.0
-d 63 7 0.0
-d 64 7 0.0
-d 65 7 0.0
-d 66 7 0.0
-d 67 7 0.0
-d 68 7 0.0
-d 69 7 0.0
-d 70 7 0.0
-d 71 7 0.0
-d 72 7 0.0
-d 73 7 0.0
-d 74 7 0.0
-d 75 7 0.0
-d 76 7 0.0
-d 77 7 0.0
-d 78 7 0.0
-d 79 7 0.0
-d 80 7 0.0
-d 81 7 0.0
-d 82 7 0.0
-d 83 7 0.0
-d 84 7 0.0
-d 85 7 0.0
-d 86 7 0.0
-d 87 7 0.0
-d 88 7 0.0
-d 89 7 0.0
-d 90 7 0.0
-d 91 7 0.0
-d 92 7 0.0
-d 93 7 0.0
-d 94 7 0.0
-d 95 7 0.0
-d 96 7 0.0
-d 97 7 0.0
-d 98 7 0.0
-d 99 7 0.0
-d 100 7 0.0
-d 101 7 0.0
-d 102 7 0.0
-d 103 7 0.0
-d 104 7 0.0
-d 105 7 0.0
-d 106 7 0.0
-d 107 7 0.0
-d 108 7 0.0
-d 109 7 0.0
-d 110 7 0.0
-d 111 7 0.0
-d 112 7 0.0
-d 113 7 0.0
-d 114 7 0.0
-d 115 7 0.0
-d 116 7 0.0
-d 117 7 0.0
-d 118 7 0.0
-d 119 7 0.0
-d 120 7 0.0
-d 121 7 0.0
-d 122 7 0.0
-d 123 7 0.0
-d 124 7 0.0
-d 125 7 0.0
-d 126 7 0.0
-d 127 7 0.0
-d 128 7 0.0
-d 129 7 0.0
-d 130 7 0.0
-d 131 7 0.0
-d 132 7 0.0
-d 133 7 0.0
-d 134 7 0.0
-d 135 7 0.0
-d 136 7 0.0
-d 137 7 0.0
-d 138 7 0.0
-d 139 7 0.0
-d 140 7 0.0
-d 141 7 0.0
-d 142 7 1.0
-d 143 7 2.0
-d 144 7 3.0
-d 145 7 4.0
-d 146 7 5.0
-d 147 7 5.0
-d 148 7 5.0
-d 149 7 5.0
-d 150 7 5.0
-d 151 7 5.0
-d 152 7 5.0
-d 153 7 5.0
-d 154 7 5.0
-d 155 7 5.0
-d 156 7 5.0
-d 157 7 5.0
-d 158 7 5.0
-d 159 7 5.0
-d 160 7 5.0
-d 161 7 5.0
-d 162 7 5.0
-d 163 7 5.0
-d 164 7 5.0
-d 165 7 5.0
-d 166 7 5.0
-d 167 7 5.0
-d 168 7 5.0
-d 169 7 5.0
-d 170 7 5.0
-d 171 7 5.0
-d 172 7 5.0
-d 173 7 5.0
-d 174 7 5.0
-d 175 7 5.0
-d 176 7 5.0
-d 177 7 5.0
-d 178 7 5.0
-d 179 7 5.0
-d 180 7 5.0
-d 181 7 5.0
-d 182 7 5.0
-d 183 7 5.0
-d 184 7 5.0
-d 185 7 5.0
-d 186 7 5.0
-d 187 7 5.0
-d 188 7 5.0
-d 189 7 5.0
-d 190 7 5.0
-d 191 7 5.0
-d 192 7 5.0
-d 193 7 5.0
-d 194 7 5.0
-d 195 7 5.0
-d 196 7 5.0
-d 197 7 5.0
-d 198 7 5.0
-d 199 7 5.0
-d 200 7 5.0
-d 201 7 5.0
-d 202 7 5.0
-d 203 7 5.0
-d 204 7 5.0
-d 205 7 5.0
-d 206 7 5.0
-d 207 7 5.0
-d 208 7 5.0
-d 209 7 5.0
-d 210 7 5.0
-d 211 7 5.0
-d 212 7 5.0
-d 213 7 5.0
-d 214 7 5.0
-d 215 7 5.0
-d 216 7 5.0
-d 217 7 5.0
-d 218 7 5.0
-d 219 7 5.0
-d 220 7 5.0
-d 221 7 5.0
-d 222 7 5.0
-d 223 7 5.0
-d 224 7 5.0
-d 225 7 5.0
-d 226 7 5.0
-d 227 7 5.0
-d 228 7 5.0
-d 229 7 5.0
-d 230 7 5.0
-d 231 7 5.0
-d 232 7 5.0
-d 233 7 5.0
-d 234 7 5.0
-d 235 7 5.0
-d 236 7 5.0
-d 237 7 5.0
-d 238 7 5.0
-d 239 7 5.0
-d 240 7 5.0
-d 241 7 5.0
-d 242 7 5.0
-d 243 7 5.0
-d 244 7 5.0
-d 245 7 5.0
-d 246 7 5.0
-d 247 7 5.0
-d 248 7 5.0
-d 249 7 5.0
-d 250 7 5.0
-d 251 7 5.0
-d 252 7 5.0
-d 253 7 5.0
-d 254 7 5.0
-d 255 7 5.0
-d 256 7 5.0
-d 257 7 5.0
-d 258 7 5.0
-d 259 7 5.0
-d 260 7 5.0
-d 261 7 5.0
-d 262 7 4.0
-d 263 7 3.0
-d 264 7 2.0
-d 265 7 1.0
-d 266 7 2.13718e-14
-d 267 7 0.0
-d 268 7 0.0
-d 269 7 0.0
-d 270 7 0.0
-d 271 7 0.0
-d 272 7 0.0
-d 273 7 0.0
-d 274 7 0.0
-d 275 7 0.0
-d 276 7 0.0
-d 277 7 0.0
-d 278 7 0.0
-d 279 7 0.0
-d 280 7 0.0
-d 281 7 0.0
-d 282 7 0.0
-d 283 7 0.0
-d 284 7 0.0
-d 285 7 0.0
-d 286 7 0.0
-d 287 7 0.0
-d 288 7 0.0
-d 289 7 0.0
-d 290 7 0.0
-d 291 7 0.0
-d 292 7 0.0
-d 293 7 0.0
-d 294 7 0.0
-d 295 7 0.0
-d 296 7 0.0
-d 297 7 0.0
-d 298 7 0.0
-d 299 7 0.0
-d 300 7 0.0
-d 301 7 0.0
-d 302 7 0.0
-d 303 7 0.0
-d 304 7 0.0
-d 305 7 0.0
-d 306 7 0.0
-d 307 7 0.0
-d 308 7 0.0
-d 309 7 0.0
-d 310 7 0.0
-d 311 7 0.0
-d 312 7 0.0
-d 313 7 0.0
-d 314 7 0.0
-d 315 7 0.0
-d 316 7 0.0
-d 317 7 0.0
-d 318 7 0.0
-d 319 7 0.0
-d 320 7 0.0
-d 321 7 0.0
-d 322 7 0.0
-d 323 7 0.0
-d 324 7 0.0
-d 325 7 0.0
-d 326 7 0.0
-d 327 7 0.0
-d 328 7 0.0
-d 329 7 0.0
-d 330 7 0.0
-d 331 7 0.0
-d 332 7 0.0
-d 333 7 0.0
-d 334 7 0.0
-d 335 7 0.0
-d 336 7 0.0
-d 337 7 0.0
-d 338 7 0.0
-d 339 7 0.0
-d 340 7 0.0
-d 341 7 0.0
-d 342 7 0.0
-d 343 7 0.0
-d 344 7 0.0
-d 345 7 0.0
-d 346 7 0.0
-d 347 7 0.0
-d 348 7 0.0
-d 349 7 0.0
-d 350 7 0.0
-d 351 7 0.0
-d 352 7 0.0
-d 353 7 0.0
-d 354 7 0.0
-d 355 7 0.0
-d 356 7 0.0
-d 357 7 0.0
-d 358 7 0.0
-d 359 7 0.0
-d 360 7 0.0
-d 361 7 0.0
-d 1 8 5.0
-d 2 8 5.16904
-d 3 8 4.84159
-d 4 8 3.34542
-d 5 8 0.317102
-d 6 8 0.103304
-d 7 8 0.0275721
-d 8 8 0.0221534
-d 9 8 0.017689
-d 10 8 0.0142639
-d 11 8 0.0113974
-d 12 8 0.00918238
-d 13 8 0.00742541
-d 14 8 0.00616602
-d 15 8 0.00481195
-d 16 8 0.00397049
-d 17 8 -0.0659889
-d 18 8 -0.025671
-d 19 8 0.165495
-d 20 8 0.986891
-d 21 8 3.05229
-d 22 8 4.55511
-d 23 8 4.91611
-d 24 8 4.98192
-d 25 8 4.99428
-d 26 8 4.99833
-d 27 8 4.99095
-d 28 8 4.97295
-d 29 8 4.95493
-d 30 8 4.93428
-d 31 8 4.90723
-d 32 8 4.94799
-d 33 8 4.98584
-d 34 8 4.99566
-d 35 8 4.99813
-d 36 8 4.99907
-d 37 8 4.99947
-d 38 8 4.99965
-d 39 8 4.99976
-d 40 8 4.99984
-d 41 8 4.99989
-d 42 8 4.99992
-d 43 8 4.99994
-d 44 8 4.99996
-d 45 8 4.99998
-d 46 8 5.00002
-d 47 8 5.00006
-d 48 8 5.00002
-d 49 8 4.99996
-d 50 8 4.99994
-d 51 8 4.99999
-d 52 8 5.00003
-d 53 8 5.00002
-d 54 8 5.0
-d 55 8 4.99997
-d 56 8 4.99997
-d 57 8 4.99997
-d 58 8 4.99997
-d 59 8 4.99997
-d 60 8 4.99996
-d 61 8 4.99997
-d 62 8 4.99997
-d 63 8 4.99998
-d 64 8 4.99998
-d 65 8 4.99999
-d 66 8 5.0
-d 67 8 5.0
-d 68 8 5.0
-d 69 8 5.0
-d 70 8 5.0
-d 71 8 5.0
-d 72 8 5.00001
-d 73 8 5.00001
-d 74 8 5.00001
-d 75 8 5.00001
-d 76 8 5.00001
-d 77 8 5.00001
-d 78 8 5.00001
-d 79 8 5.00001
-d 80 8 5.00001
-d 81 8 5.00001
-d 82 8 5.00001
-d 83 8 5.00001
-d 84 8 5.00001
-d 85 8 5.0
-d 86 8 5.0
-d 87 8 5.0
-d 88 8 5.0
-d 89 8 5.0
-d 90 8 5.0
-d 91 8 5.0
-d 92 8 4.99999
-d 93 8 4.99999
-d 94 8 4.99999
-d 95 8 4.99999
-d 96 8 4.99999
-d 97 8 4.99999
-d 98 8 4.99998
-d 99 8 4.99998
-d 100 8 4.99998
-d 101 8 4.99999
-d 102 8 4.99999
-d 103 8 4.99999
-d 104 8 4.99999
-d 105 8 4.99999
-d 106 8 4.99999
-d 107 8 4.99999
-d 108 8 4.99999
-d 109 8 4.99999
-d 110 8 4.99999
-d 111 8 4.99999
-d 112 8 4.99999
-d 113 8 4.99999
-d 114 8 4.99999
-d 115 8 5.0
-d 116 8 5.0
-d 117 8 5.0
-d 118 8 5.0
-d 119 8 5.0
-d 120 8 5.0
-d 121 8 5.0
-d 122 8 5.16575
-d 123 8 4.69986
-d 124 8 2.43862
-d 125 8 0.0230224
-d 126 8 0.035229
-d 127 8 -0.0210607
-d 128 8 -0.0292766
-d 129 8 -0.0172693
-d 130 8 -0.00271479
-d 131 8 -0.000912251
-d 132 8 -0.000349106
-d 133 8 -0.000116866
-d 134 8 -4.24733e-05
-d 135 8 -1.39536e-05
-d 136 8 -3.01179e-05
-d 137 8 -0.0657192
-d 138 8 -0.0204835
-d 139 8 0.183378
-d 140 8 1.07181
-d 141 8 3.118
-d 142 8 4.46472
-d 143 8 4.84158
-d 144 8 4.94795
-d 145 8 4.98173
-d 146 8 4.99236
-d 147 8 4.99762
-d 148 8 5.01939
-d 149 8 5.0433
-d 150 8 5.05332
-d 151 8 5.04959
-d 152 8 5.03955
-d 153 8 5.02851
-d 154 8 5.02052
-d 155 8 5.01422
-d 156 8 5.00965
-d 157 8 5.00631
-d 158 8 5.00405
-d 159 8 5.00248
-d 160 8 5.00083
-d 161 8 5.00012
-d 162 8 5.00209
-d 163 8 5.00387
-d 164 8 5.00347
-d 165 8 4.99917
-d 166 8 4.99213
-d 167 8 4.98411
-d 168 8 4.97521
-d 169 8 4.96332
-d 170 8 4.94601
-d 171 8 4.9304
-d 172 8 4.94633
-d 173 8 4.97936
-d 174 8 4.99264
-d 175 8 4.99685
-d 176 8 4.99857
-d 177 8 4.99925
-d 178 8 4.99954
-d 179 8 4.9997
-d 180 8 4.99973
-d 181 8 4.9997
-d 182 8 4.99973
-d 183 8 4.99979
-d 184 8 4.99983
-d 185 8 4.99986
-d 186 8 4.99988
-d 187 8 4.9999
-d 188 8 4.9999
-d 189 8 4.99992
-d 190 8 4.99993
-d 191 8 4.99994
-d 192 8 4.99995
-d 193 8 4.99996
-d 194 8 4.99996
-d 195 8 4.99997
-d 196 8 4.99997
-d 197 8 4.99998
-d 198 8 4.99998
-d 199 8 4.99998
-d 200 8 4.99999
-d 201 8 4.99999
-d 202 8 4.99999
-d 203 8 4.99999
-d 204 8 4.99999
-d 205 8 4.99999
-d 206 8 4.99999
-d 207 8 5.0
-d 208 8 5.0
-d 209 8 5.0
-d 210 8 5.00001
-d 211 8 5.00001
-d 212 8 5.00001
-d 213 8 5.00001
-d 214 8 5.00002
-d 215 8 5.00002
-d 216 8 5.00002
-d 217 8 5.00002
-d 218 8 5.00001
-d 219 8 5.00001
-d 220 8 5.00001
-d 221 8 5.0
-d 222 8 5.0
-d 223 8 5.0
-d 224 8 5.0
-d 225 8 5.0
-d 226 8 5.0
-d 227 8 5.0
-d 228 8 5.0
-d 229 8 4.99999
-d 230 8 4.99999
-d 231 8 4.99999
-d 232 8 4.99999
-d 233 8 4.99999
-d 234 8 4.99999
-d 235 8 4.99999
-d 236 8 4.99999
-d 237 8 4.99999
-d 238 8 4.99999
-d 239 8 4.99999
-d 240 8 5.0
-d 241 8 5.0
-d 242 8 5.14242
-d 243 8 4.76101
-d 244 8 3.16003
-d 245 8 0.299374
-d 246 8 0.0645506
-d 247 8 -0.000498424
-d 248 8 -2.45108e-05
-d 249 8 -2.27986e-05
-d 250 8 -5.24401e-05
-d 251 8 -4.9884e-05
-d 252 8 -4.92491e-05
-d 253 8 -2.93354e-05
-d 254 8 -3.21402e-05
-d 255 8 -2.11851e-05
-d 256 8 -3.37925e-05
-d 257 8 -0.0657892
-d 258 8 -0.020563
-d 259 8 0.182582
-d 260 8 1.06058
-d 261 8 3.12484
-d 262 8 4.46552
-d 263 8 4.84146
-d 264 8 4.95102
-d 265 8 4.98556
-d 266 8 4.99472
-d 267 8 4.99806
-d 268 8 4.99909
-d 269 8 4.99955
-d 270 8 4.99976
-d 271 8 4.99994
-d 272 8 4.99992
-d 273 8 5.00029
-d 274 8 4.99967
-d 275 8 4.99849
-d 276 8 4.99736
-d 277 8 4.99884
-d 278 8 5.00099
-d 279 8 5.00377
-d 280 8 5.00215
-d 281 8 4.99994
-d 282 8 4.99893
-d 283 8 4.99788
-d 284 8 4.99862
-d 285 8 5.00055
-d 286 8 5.00134
-d 287 8 5.00127
-d 288 8 5.00073
-d 289 8 5.00039
-d 290 8 5.00018
-d 291 8 5.00006
-d 292 8 5.00001
-d 293 8 4.99985
-d 294 8 5.00026
-d 295 8 5.00018
-d 296 8 5.00003
-d 297 8 4.99981
-d 298 8 4.99985
-d 299 8 4.99987
-d 300 8 4.99985
-d 301 8 4.99982
-d 302 8 4.99982
-d 303 8 4.99982
-d 304 8 4.99983
-d 305 8 4.99985
-d 306 8 4.99987
-d 307 8 4.99989
-d 308 8 4.99991
-d 309 8 4.99992
-d 310 8 4.99994
-d 311 8 4.99995
-d 312 8 4.99995
-d 313 8 4.99994
-d 314 8 4.99994
-d 315 8 4.99996
-d 316 8 4.99999
-d 317 8 5.00002
-d 318 8 5.00008
-d 319 8 5.00009
-d 320 8 5.00006
-d 321 8 5.00001
-d 322 8 5.0
-d 323 8 4.99999
-d 324 8 4.99998
-d 325 8 4.99997
-d 326 8 4.99996
-d 327 8 4.99997
-d 328 8 4.99997
-d 329 8 4.99998
-d 330 8 4.99998
-d 331 8 4.99999
-d 332 8 4.99999
-d 333 8 4.99999
-d 334 8 5.0
-d 335 8 5.0
-d 336 8 5.0
-d 337 8 5.0
-d 338 8 5.00001
-d 339 8 5.00001
-d 340 8 5.00001
-d 341 8 5.00001
-d 342 8 5.00001
-d 343 8 5.00001
-d 344 8 5.00001
-d 345 8 5.00001
-d 346 8 5.00001
-d 347 8 5.00001
-d 348 8 5.00001
-d 349 8 5.00001
-d 350 8 5.0
-d 351 8 5.0
-d 352 8 5.0
-d 353 8 5.0
-d 354 8 5.0
-d 355 8 4.99999
-d 356 8 4.99999
-d 357 8 4.99999
-d 358 8 4.99999
-d 359 8 4.99998
-d 360 8 4.99998
-d 361 8 4.99998
-d 1 9 5.0
-d 2 9 5.03758
-d 3 9 5.04711
-d 4 9 4.96911
-d 5 9 4.20882
-d 6 9 3.96295
-d 7 9 4.01117
-d 8 9 4.15521
-d 9 9 4.2967
-d 10 9 4.42274
-d 11 9 4.5295
-d 12 9 4.6176
-d 13 9 4.69014
-d 14 9 4.74831
-d 15 9 4.7966
-d 16 9 4.83537
-d 17 9 4.80526
-d 18 9 4.787
-d 19 9 4.79295
-d 20 9 4.88588
-d 21 9 5.08978
-d 22 9 5.15615
-d 23 9 5.10778
-d 24 9 5.07718
-d 25 9 5.06652
-d 26 9 5.08225
-d 27 9 4.9744
-d 28 9 4.52977
-d 29 9 3.77452
-d 30 9 2.69426
-d 31 9 1.15294
-d 32 9 0.245509
-d 33 9 0.0981544
-d 34 9 0.0567527
-d 35 9 0.0367487
-d 36 9 0.0252578
-d 37 9 0.0180599
-d 38 9 0.0133837
-d 39 9 0.0101497
-d 40 9 0.0078616
-d 41 9 0.00620186
-d 42 9 0.00499056
-d 43 9 0.0041027
-d 44 9 0.00344223
-d 45 9 0.00295808
-d 46 9 0.00260089
-d 47 9 0.00229887
-d 48 9 0.00200817
-d 49 9 0.00176397
-d 50 9 0.00160116
-d 51 9 0.00147381
-d 52 9 0.00134645
-d 53 9 0.00125029
-d 54 9 0.00116043
-d 55 9 0.00107371
-d 56 9 0.00101981
-d 57 9 0.000965921
-d 58 9 0.000912028
-d 59 9 0.000858135
-d 60 9 0.000804242
-d 61 9 0.000761669
-d 62 9 0.00072672
-d 63 9 0.000691771
-d 64 9 0.000656823
-d 65 9 0.000621874
-d 66 9 0.000588722
-d 67 9 0.00057041
-d 68 9 0.000552098
-d 69 9 0.000533785
-d 70 9 0.000515473
-d 71 9 0.000497162
-d 72 9 0.00047885
-d 73 9 0.000460537
-d 74 9 0.000442226
-d 75 9 0.000423914
-d 76 9 0.000405601
-d 77 9 0.000388399
-d 78 9 0.000378694
-d 79 9 0.000368989
-d 80 9 0.000359284
-d 81 9 0.00034958
-d 82 9 0.000339875
-d 83 9 0.00033017
-d 84 9 0.000320465
-d 85 9 0.00031076
-d 86 9 0.000301055
-d 87 9 0.00029135
-d 88 9 0.000282207
-d 89 9 0.000276247
-d 90 9 0.000270287
-d 91 9 0.000264327
-d 92 9 0.000258367
-d 93 9 0.000252407
-d 94 9 0.000246447
-d 95 9 0.000240487
-d 96 9 0.000234527
-d 97 9 0.000228567
-d 98 9 0.000222607
-d 99 9 0.000217086
-d 100 9 0.000213696
-d 101 9 0.000210307
-d 102 9 0.000206918
-d 103 9 0.000203528
-d 104 9 0.000200139
-d 105 9 0.00019675
-d 106 9 0.00019336
-d 107 9 0.000189971
-d 108 9 0.000186582
-d 109 9 0.000183192
-d 110 9 0.000179803
-d 111 9 0.000176414
-d 112 9 0.000173025
-d 113 9 0.000169635
-d 114 9 0.000166246
-d 115 9 0.000162857
-d 116 9 0.000159467
-d 117 9 0.000156078
-d 118 9 0.000152689
-d 119 9 0.000149299
-d 120 9 0.00014591
-d 121 9 0.00014255
-d 122 9 0.0316021
-d 123 9 0.163272
-d 124 9 0.348732
-d 125 9 0.603651
-d 126 9 0.35745
-d 127 9 0.135965
-d 128 9 0.0707354
-d 129 9 0.0314595
-d 130 9 0.0201047
-d 131 9 0.00994945
-d 132 9 0.00389601
-d 133 9 0.00138839
-d 134 9 0.00060778
-d 135 9 0.000329648
-d 136 9 0.000492396
-d 137 9 -0.0732035
-d 138 9 -0.0844077
-d 139 9 -0.0789062
-d 140 9 -0.0390837
-d 141 9 0.0197559
-d 142 9 0.0183094
-d 143 9 -0.00180099
-d 144 9 -0.0189565
-d 145 9 -0.0424144
-d 146 9 -0.0735904
-d 147 9 -0.0892423
-d 148 9 0.285039
-d 149 9 1.13702
-d 150 9 2.10809
-d 151 9 2.95826
-d 152 9 3.60164
-d 153 9 4.0435
-d 154 9 4.35771
-d 155 9 4.57254
-d 156 9 4.71769
-d 157 9 4.81329
-d 158 9 4.87534
-d 159 9 4.91487
-d 160 9 4.94264
-d 161 9 4.97375
-d 162 9 5.01526
-d 163 9 5.06517
-d 164 9 5.10154
-d 165 9 5.06259
-d 166 9 4.89005
-d 167 9 4.5787
-d 168 9 4.12226
-d 169 9 3.46151
-d 170 9 2.49023
-d 171 9 1.2586
-d 172 9 0.32725
-d 173 9 0.116753
-d 174 9 0.0701865
-d 175 9 0.0455509
-d 176 9 0.0286914
-d 177 9 0.0178176
-d 178 9 0.0117599
-d 179 9 0.00902715
-d 180 9 0.00760583
-d 181 9 0.00637745
-d 182 9 0.00543811
-d 183 9 0.00439377
-d 184 9 0.00352448
-d 185 9 0.0030151
-d 186 9 0.00285771
-d 187 9 0.002465
-d 188 9 0.00203114
-d 189 9 0.00173004
-d 190 9 0.0014839
-d 191 9 0.00125177
-d 192 9 0.00105327
-d 193 9 0.000894905
-d 194 9 0.000766372
-d 195 9 0.000658894
-d 196 9 0.000569105
-d 197 9 0.000492114
-d 198 9 0.000427938
-d 199 9 0.000370217
-d 200 9 0.000314758
-d 201 9 0.000266569
-d 202 9 0.000233726
-d 203 9 0.000209048
-d 204 9 0.000191957
-d 205 9 0.000177169
-d 206 9 0.000166604
-d 207 9 0.000161
-d 208 9 0.000157314
-d 209 9 0.000143828
-d 210 9 0.000130342
-d 211 9 0.000116857
-d 212 9 0.000103371
-d 213 9 8.98855e-05
-d 214 9 7.63998e-05
-d 215 9 6.29141e-05
-d 216 9 5.76583e-05
-d 217 9 5.30027e-05
-d 218 9 4.8347e-05
-d 219 9 4.36913e-05
-d 220 9 3.90357e-05
-d 221 9 3.438e-05
-d 222 9 2.97243e-05
-d 223 9 2.72507e-05
-d 224 9 2.59083e-05
-d 225 9 2.45659e-05
-d 226 9 2.32235e-05
-d 227 9 2.18811e-05
-d 228 9 2.05387e-05
-d 229 9 1.91963e-05
-d 230 9 1.78539e-05
-d 231 9 1.65115e-05
-d 232 9 1.51691e-05
-d 233 9 1.38267e-05
-d 234 9 1.24843e-05
-d 235 9 1.11419e-05
-d 236 9 9.79954e-06
-d 237 9 8.51574e-06
-d 238 9 7.69807e-06
-d 239 9 6.8804e-06
-d 240 9 6.06273e-06
-d 241 9 5.24506e-06
-d 242 9 0.0287318
-d 243 9 0.0317111
-d 244 9 -0.0320087
-d 245 9 -0.103609
-d 246 9 0.0369639
-d 247 9 0.0121128
-d 248 9 0.00961197
-d 249 9 0.00934971
-d 250 9 0.00820853
-d 251 9 0.00699769
-d 252 9 0.00607002
-d 253 9 0.00535541
-d 254 9 0.00476552
-d 255 9 0.00427601
-d 256 9 0.00376357
-d 257 9 -0.073012
-d 258 9 -0.0866964
-d 259 9 -0.0809538
-d 260 9 -0.038005
-d 261 9 0.0277001
-d 262 9 0.0188906
-d 263 9 0.00614597
-d 264 9 0.00373629
-d 265 9 0.00489787
-d 266 9 0.0146573
-d 267 9 0.0191052
-d 268 9 0.0151708
-d 269 9 0.0124224
-d 270 9 0.0105859
-d 271 9 0.00879272
-d 272 9 0.00729464
-d 273 9 0.0070047
-d 274 9 0.00449575
-d 275 9 -0.00626652
-d 276 9 -0.0252417
-d 277 9 -0.0147287
-d 278 9 0.022538
-d 279 9 0.0822905
-d 280 9 0.0947372
-d 281 9 0.0657516
-d 282 9 0.0445506
-d 283 9 0.0316753
-d 284 9 0.0220971
-d 285 9 0.0158101
-d 286 9 0.0140971
-d 287 9 0.0161498
-d 288 9 0.0139876
-d 289 9 0.0122447
-d 290 9 0.0106994
-d 291 9 0.009397
-d 292 9 0.00822236
-d 293 9 0.00686509
-d 294 9 0.00797431
-d 295 9 0.00751269
-d 296 9 0.00671173
-d 297 9 0.00595243
-d 298 9 0.00524633
-d 299 9 0.00459528
-d 300 9 0.00401688
-d 301 9 0.00350109
-d 302 9 0.00303954
-d 303 9 0.00260569
-d 304 9 0.00222792
-d 305 9 0.00191033
-d 306 9 0.00163917
-d 307 9 0.00140949
-d 308 9 0.00121464
-d 309 9 0.0010471
-d 310 9 0.000900638
-d 311 9 0.000768847
-d 312 9 0.000645236
-d 313 9 0.000524807
-d 314 9 0.000460275
-d 315 9 0.000442237
-d 316 9 0.000446775
-d 317 9 0.000397026
-d 318 9 0.000301585
-d 319 9 0.000228994
-d 320 9 0.000190894
-d 321 9 0.000166569
-d 322 9 0.000152261
-d 323 9 0.000137953
-d 324 9 0.000123644
-d 325 9 0.000109336
-d 326 9 9.50281e-05
-d 327 9 8.56557e-05
-d 328 9 7.78437e-05
-d 329 9 7.00318e-05
-d 330 9 6.22198e-05
-d 331 9 5.44079e-05
-d 332 9 4.87539e-05
-d 333 9 4.57761e-05
-d 334 9 4.27982e-05
-d 335 9 3.98203e-05
-d 336 9 3.68425e-05
-d 337 9 3.38646e-05
-d 338 9 3.08868e-05
-d 339 9 2.79089e-05
-d 340 9 2.4931e-05
-d 341 9 2.19532e-05
-d 342 9 1.89753e-05
-d 343 9 1.75244e-05
-d 344 9 1.64095e-05
-d 345 9 1.52946e-05
-d 346 9 1.41797e-05
-d 347 9 1.30648e-05
-d 348 9 1.19499e-05
-d 349 9 1.0835e-05
-d 350 9 9.72011e-06
-d 351 9 8.60521e-06
-d 352 9 7.4903e-06
-d 353 9 6.5117e-06
-d 354 9 6.10334e-06
-d 355 9 5.69497e-06
-d 356 9 5.2866e-06
-d 357 9 4.87824e-06
-d 358 9 4.46987e-06
-d 359 9 4.06151e-06
-d 360 9 3.65314e-06
-d 361 9 3.24477e-06
-d 1 10 1.86175
-d 2 10 1.99708
-d 3 10 2.07867
-d 4 10 2.01211
-d 5 10 2.43309
-d 6 10 3.27194
-d 7 10 3.63896
-d 8 10 3.90426
-d 9 10 4.11074
-d 10 10 4.27932
-d 11 10 4.41496
-d 12 10 4.52543
-d 13 10 4.61491
-d 14 10 4.68862
-d 15 10 4.7479
-d 16 10 4.79666
-d 17 10 4.72895
-d 18 10 4.68886
-d 19 10 4.70354
-d 20 10 4.81353
-d 21 10 5.01568
-d 22 10 5.14184
-d 23 10 5.10482
-d 24 10 5.07362
-d 25 10 5.05143
-d 26 10 5.03638
-d 27 10 5.02323
-d 28 10 5.01465
-d 29 10 5.00853
-d 30 10 5.00383
-d 31 10 4.99985
-d 32 10 5.00454
-d 33 10 5.00652
-d 34 10 5.00546
-d 35 10 5.00411
-d 36 10 5.003
-d 37 10 5.00214
-d 38 10 5.00151
-d 39 10 5.00106
-d 40 10 5.00073
-d 41 10 5.0005
-d 42 10 5.00034
-d 43 10 5.00023
-d 44 10 5.00015
-d 45 10 5.0001
-d 46 10 5.00005
-d 47 10 5.0
-d 48 10 5.00001
-d 49 10 5.00005
-d 50 10 5.00005
-d 51 10 5.00003
-d 52 10 5.0
-d 53 10 4.99998
-d 54 10 4.99996
-d 55 10 4.99994
-d 56 10 4.99995
-d 57 10 4.99997
-d 58 10 4.99998
-d 59 10 5.0
-d 60 10 5.00001
-d 61 10 5.00002
-d 62 10 5.00002
-d 63 10 5.00003
-d 64 10 5.00003
-d 65 10 5.00003
-d 66 10 5.00003
-d 67 10 5.00003
-d 68 10 5.00003
-d 69 10 5.00002
-d 70 10 5.00002
-d 71 10 5.00001
-d 72 10 5.00001
-d 73 10 5.00001
-d 74 10 5.0
-d 75 10 5.0
-d 76 10 5.0
-d 77 10 4.99999
-d 78 10 4.99999
-d 79 10 4.99999
-d 80 10 4.99999
-d 81 10 4.99999
-d 82 10 4.99999
-d 83 10 4.99999
-d 84 10 4.99999
-d 85 10 4.99999
-d 86 10 4.99998
-d 87 10 4.99998
-d 88 10 4.99998
-d 89 10 4.99999
-d 90 10 4.99999
-d 91 10 4.99999
-d 92 10 4.99999
-d 93 10 5.0
-d 94 10 5.0
-d 95 10 5.0
-d 96 10 5.0
-d 97 10 5.00001
-d 98 10 5.00001
-d 99 10 5.00001
-d 100 10 5.00001
-d 101 10 5.00001
-d 102 10 5.00001
-d 103 10 5.00001
-d 104 10 5.00001
-d 105 10 5.00001
-d 106 10 5.00001
-d 107 10 5.00001
-d 108 10 5.00001
-d 109 10 5.00001
-d 110 10 5.00001
-d 111 10 5.00001
-d 112 10 5.00001
-d 113 10 5.00001
-d 114 10 5.00001
-d 115 10 5.00001
-d 116 10 5.00001
-d 117 10 5.00001
-d 118 10 5.00001
-d 119 10 5.00001
-d 120 10 5.00001
-d 121 10 5.00001
-d 122 10 5.17392
-d 123 10 4.94828
-d 124 10 3.78491
-d 125 10 1.52079
-d 126 10 0.608874
-d 127 10 0.244031
-d 128 10 0.127087
-d 129 10 0.0552995
-d 130 10 0.0361032
-d 131 10 0.0169025
-d 132 10 0.006364
-d 133 10 0.00217624
-d 134 10 0.000921391
-d 135 10 0.000457305
-d 136 10 0.000786754
-d 137 10 -0.120016
-d 138 10 -0.148054
-d 139 10 -0.15898
-d 140 10 -0.0801463
-d 141 10 0.16463
-d 142 10 0.174017
-d 143 10 0.0799249
-d 144 10 0.0318788
-d 145 10 0.0129696
-d 146 10 0.00483397
-d 147 10 0.0025677
-d 148 10 0.0042079
-d 149 10 0.00350003
-d 150 10 0.00178404
-d 151 10 -8.72902e-05
-d 152 10 -0.00128497
-d 153 10 -0.00142213
-d 154 10 -0.00130018
-d 155 10 -0.00106874
-d 156 10 -0.000789207
-d 157 10 -0.000824335
-d 158 10 -0.00104518
-d 159 10 -0.00136799
-d 160 10 -0.004366
-d 161 10 -0.0102621
-d 162 10 -0.0109254
-d 163 10 -0.00649259
-d 164 10 -0.00194842
-d 165 10 0.00029793
-d 166 10 0.00148673
-d 167 10 0.00221085
-d 168 10 0.00228291
-d 169 10 0.00185261
-d 170 10 0.00139687
-d 171 10 0.00148183
-d 172 10 0.00562266
-d 173 10 0.00844119
-d 174 10 0.00754627
-d 175 10 0.00657396
-d 176 10 0.00591212
-d 177 10 0.00539269
-d 178 10 0.0049282
-d 179 10 0.00448417
-d 180 10 0.0040572
-d 181 10 0.00363719
-d 182 10 0.00320392
-d 183 10 0.00279607
-d 184 10 0.00243938
-d 185 10 0.00211505
-d 186 10 0.00182302
-d 187 10 0.00156254
-d 188 10 0.0013341
-d 189 10 0.00113834
-d 190 10 0.000971865
-d 191 10 0.00082776
-d 192 10 0.000706193
-d 193 10 0.000602499
-d 194 10 0.000515059
-d 195 10 0.000441401
-d 196 10 0.00037897
-d 197 10 0.000325459
-d 198 10 0.00028083
-d 199 10 0.000242096
-d 200 10 0.000207274
-d 201 10 0.000176444
-d 202 10 0.000150372
-d 203 10 0.000126407
-d 204 10 0.000103373
-d 205 10 9.05522e-05
-d 206 10 8.53555e-05
-d 207 10 8.63685e-05
-d 208 10 9.02593e-05
-d 209 10 8.37346e-05
-d 210 10 7.72099e-05
-d 211 10 7.06852e-05
-d 212 10 6.41605e-05
-d 213 10 5.76358e-05
-d 214 10 5.11112e-05
-d 215 10 4.45865e-05
-d 216 10 4.08176e-05
-d 217 10 3.72497e-05
-d 218 10 3.36818e-05
-d 219 10 3.01138e-05
-d 220 10 2.65459e-05
-d 221 10 2.2978e-05
-d 222 10 1.94101e-05
-d 223 10 1.76154e-05
-d 224 10 1.67399e-05
-d 225 10 1.58645e-05
-d 226 10 1.4989e-05
-d 227 10 1.41136e-05
-d 228 10 1.32381e-05
-d 229 10 1.23626e-05
-d 230 10 1.14872e-05
-d 231 10 1.06117e-05
-d 232 10 9.73629e-06
-d 233 10 8.86083e-06
-d 234 10 7.98538e-06
-d 235 10 7.10993e-06
-d 236 10 6.23447e-06
-d 237 10 5.44363e-06
-d 238 10 5.32578e-06
-d 239 10 5.20792e-06
-d 240 10 5.09007e-06
-d 241 10 4.97222e-06
-d 242 10 0.0784323
-d 243 10 0.0474527
-d 244 10 -0.0764232
-d 245 10 -0.151146
-d 246 10 0.0615785
-d 247 10 0.0144489
-d 248 10 0.00974161
-d 249 10 0.00947176
-d 250 10 0.00849005
-d 251 10 0.00728201
-d 252 10 0.00630581
-d 253 10 0.00554032
-d 254 10 0.00487809
-d 255 10 0.00441504
-d 256 10 0.00384139
-d 257 10 -0.118943
-d 258 10 -0.149894
-d 259 10 -0.161173
-d 260 10 -0.0825299
-d 261 10 0.171686
-d 262 10 0.176912
-d 263 10 0.0816085
-d 264 10 0.0335236
-d 265 10 0.013791
-d 266 10 0.0056976
-d 267 10 0.00238833
-d 268 10 0.00105348
-d 269 10 0.000526199
-d 270 10 0.00025969
-d 271 10 0.000396026
-d 272 10 0.000837835
-d 273 10 0.00170131
-d 274 10 0.00196699
-d 275 10 -0.000553314
-d 276 10 -0.0061621
-d 277 10 -0.0111895
-d 278 10 -0.0142698
-d 279 10 -0.0124608
-d 280 10 -0.00795847
-d 281 10 -0.00467822
-d 282 10 -0.0043058
-d 283 10 -0.00874449
-d 284 10 -0.0118584
-d 285 10 -0.00871386
-d 286 10 -0.00377892
-d 287 10 1.95244e-05
-d 288 10 0.00218952
-d 289 10 0.00325486
-d 290 10 0.00386497
-d 291 10 0.00422837
-d 292 10 0.00446883
-d 293 10 0.00447065
-d 294 10 0.00486647
-d 295 10 0.00547838
-d 296 10 0.00565398
-d 297 10 0.00559092
-d 298 10 0.00538752
-d 299 10 0.00507015
-d 300 10 0.00466305
-d 301 10 0.00420756
-d 302 10 0.00373465
-d 303 10 0.00328404
-d 304 10 0.00287059
-d 305 10 0.00250057
-d 306 10 0.00216124
-d 307 10 0.00184861
-d 308 10 0.00156815
-d 309 10 0.00134624
-d 310 10 0.00117857
-d 311 10 0.00103412
-d 312 10 0.0008948
-d 313 10 0.000761012
-d 314 10 0.000619853
-d 315 10 0.000462614
-d 316 10 0.000319965
-d 317 10 0.000287666
-d 318 10 0.000356415
-d 319 10 0.000379946
-d 320 10 0.000339183
-d 321 10 0.00027972
-d 322 10 0.000252982
-d 323 10 0.000226244
-d 324 10 0.000199507
-d 325 10 0.000172769
-d 326 10 0.000146031
-d 327 10 0.000130097
-d 328 10 0.000117578
-d 329 10 0.000105059
-d 330 10 9.25401e-05
-d 331 10 8.00213e-05
-d 332 10 7.11204e-05
-d 333 10 6.67061e-05
-d 334 10 6.22918e-05
-d 335 10 5.78775e-05
-d 336 10 5.34632e-05
-d 337 10 4.90489e-05
-d 338 10 4.46346e-05
-d 339 10 4.02203e-05
-d 340 10 3.5806e-05
-d 341 10 3.13916e-05
-d 342 10 2.69773e-05
-d 343 10 2.4827e-05
-d 344 10 2.31747e-05
-d 345 10 2.15225e-05
-d 346 10 1.98702e-05
-d 347 10 1.8218e-05
-d 348 10 1.65658e-05
-d 349 10 1.49135e-05
-d 350 10 1.32613e-05
-d 351 10 1.1609e-05
-d 352 10 9.95678e-06
-d 353 10 8.50108e-06
-d 354 10 7.86765e-06
-d 355 10 7.23422e-06
-d 356 10 6.60079e-06
-d 357 10 5.96736e-06
-d 358 10 5.33393e-06
-d 359 10 4.7005e-06
-d 360 10 4.06707e-06
-d 361 10 3.43363e-06
-d 1 11 1.86175
-d 2 11 1.99308
-d 3 11 2.16619
-d 4 11 2.46661
-d 5 11 3.09359
-d 6 11 3.76864
-d 7 11 4.31299
-d 8 11 4.65564
-d 9 11 4.83425
-d 10 11 4.92153
-d 11 11 4.96157
-d 12 11 4.98063
-d 13 11 4.98649
-d 14 11 4.99039
-d 15 11 4.9945
-d 16 11 4.9972
-d 17 11 4.96206
-d 18 11 4.89882
-d 19 11 4.83865
-d 20 11 4.83202
-d 21 11 4.91016
-d 22 11 5.04479
-d 23 11 5.06078
-d 24 11 5.04827
-d 25 11 5.03474
-d 26 11 5.0246
-d 27 11 5.01639
-d 28 11 5.00996
-d 29 11 5.00569
-d 30 11 5.00239
-d 31 11 5.00043
-d 32 11 5.00296
-d 33 11 5.00437
-d 34 11 5.00382
-d 35 11 5.00287
-d 36 11 5.00208
-d 37 11 5.00148
-d 38 11 5.00104
-d 39 11 5.00073
-d 40 11 5.0005
-d 41 11 5.00034
-d 42 11 5.00023
-d 43 11 5.00016
-d 44 11 5.00011
-d 45 11 5.00008
-d 46 11 5.00007
-d 47 11 5.00007
-d 48 11 5.00004
-d 49 11 5.0
-d 50 11 4.99998
-d 51 11 4.99998
-d 52 11 4.99997
-d 53 11 4.99998
-d 54 11 4.99999
-d 55 11 5.0
-d 56 11 5.0
-d 57 11 5.00001
-d 58 11 5.00001
-d 59 11 5.00001
-d 60 11 5.00002
-d 61 11 5.00002
-d 62 11 5.00001
-d 63 11 5.00001
-d 64 11 5.00001
-d 65 11 5.00001
-d 66 11 5.0
-d 67 11 5.0
-d 68 11 5.0
-d 69 11 5.0
-d 70 11 5.0
-d 71 11 5.0
-d 72 11 4.99999
-d 73 11 4.99999
-d 74 11 4.99999
-d 75 11 4.99999
-d 76 11 4.99999
-d 77 11 4.99999
-d 78 11 4.99999
-d 79 11 4.99999
-d 80 11 4.99999
-d 81 11 4.99999
-d 82 11 4.99999
-d 83 11 4.99999
-d 84 11 5.0
-d 85 11 5.0
-d 86 11 5.0
-d 87 11 5.0
-d 88 11 5.0
-d 89 11 5.0
-d 90 11 5.0
-d 91 11 5.0
-d 92 11 5.0
-d 93 11 5.00001
-d 94 11 5.00001
-d 95 11 5.00001
-d 96 11 5.00001
-d 97 11 5.00001
-d 98 11 5.00001
-d 99 11 5.00001
-d 100 11 5.00001
-d 101 11 5.00001
-d 102 11 5.00001
-d 103 11 5.00001
-d 104 11 5.00001
-d 105 11 5.00001
-d 106 11 5.00001
-d 107 11 5.00001
-d 108 11 5.00001
-d 109 11 5.00001
-d 110 11 5.00001
-d 111 11 5.00001
-d 112 11 5.00001
-d 113 11 5.00001
-d 114 11 5.0
-d 115 11 5.0
-d 116 11 5.0
-d 117 11 5.0
-d 118 11 5.0
-d 119 11 5.0
-d 120 11 5.0
-d 121 11 5.0
-d 122 11 5.10081
-d 123 11 5.10949
-d 124 11 4.98359
-d 125 11 5.00733
-d 126 11 5.15145
-d 127 11 4.37298
-d 128 11 2.36126
-d 129 11 0.470759
-d 130 11 0.0577238
-d 131 11 0.0115884
-d 132 11 0.00262611
-d 133 11 0.000671499
-d 134 11 0.000389038
-d 135 11 0.000291291
-d 136 11 0.000317347
-d 137 11 -0.0167823
-d 138 11 -0.0158344
-d 139 11 -0.0140559
-d 140 11 0.0104849
-d 141 11 0.0865874
-d 142 11 0.107813
-d 143 11 0.0524688
-d 144 11 0.0214369
-d 145 11 0.00876443
-d 146 11 0.00341595
-d 147 11 0.00170778
-d 148 11 0.00259042
-d 149 11 0.0022241
-d 150 11 0.00118519
-d 151 11 1.10217e-06
-d 152 11 -0.000784506
-d 153 11 -0.000948169
-d 154 11 -0.000856256
-d 155 11 -0.000696719
-d 156 11 -0.000485987
-d 157 11 -0.000724787
-d 158 11 -0.000981491
-d 159 11 -0.001454
-d 160 11 -0.00552498
-d 161 11 -0.0114992
-d 162 11 -0.0105266
-d 163 11 -0.00543527
-d 164 11 -0.000982798
-d 165 11 0.00127356
-d 166 11 0.00224212
-d 167 11 0.00275439
-d 168 11 0.00281098
-d 169 11 0.0025471
-d 170 11 0.00230368
-d 171 11 0.00222576
-d 172 11 0.00485522
-d 173 11 0.00729453
-d 174 11 0.00691796
-d 175 11 0.0062615
-d 176 11 0.00573987
-d 177 11 0.0052688
-d 178 11 0.00481185
-d 179 11 0.00436934
-d 180 11 0.00394326
-d 181 11 0.00352712
-d 182 11 0.00309978
-d 183 11 0.00270038
-d 184 11 0.00235335
-d 185 11 0.00203742
-d 186 11 0.00175256
-d 187 11 0.00150067
-d 188 11 0.00128126
-d 189 11 0.00109323
-d 190 11 0.000933619
-d 191 11 0.000795113
-d 192 11 0.000678182
-d 193 11 0.00057843
-d 194 11 0.000494345
-d 195 11 0.000423609
-d 196 11 0.000363821
-d 197 11 0.000312766
-d 198 11 0.000269856
-d 199 11 0.000232389
-d 200 11 0.000198382
-d 201 11 0.000168126
-d 202 11 0.00014267
-d 203 11 0.000119293
-d 204 11 9.69034e-05
-d 205 11 8.5669e-05
-d 206 11 8.26828e-05
-d 207 11 8.64066e-05
-d 208 11 9.26665e-05
-d 209 11 8.5454e-05
-d 210 11 7.82416e-05
-d 211 11 7.10291e-05
-d 212 11 6.38167e-05
-d 213 11 5.66043e-05
-d 214 11 4.93918e-05
-d 215 11 4.21794e-05
-d 216 11 3.86073e-05
-d 217 11 3.53007e-05
-d 218 11 3.19941e-05
-d 219 11 2.86876e-05
-d 220 11 2.5381e-05
-d 221 11 2.20744e-05
-d 222 11 1.87678e-05
-d 223 11 1.70933e-05
-d 224 11 1.62648e-05
-d 225 11 1.54363e-05
-d 226 11 1.46079e-05
-d 227 11 1.37794e-05
-d 228 11 1.2951e-05
-d 229 11 1.21225e-05
-d 230 11 1.12941e-05
-d 231 11 1.04656e-05
-d 232 11 9.63716e-06
-d 233 11 8.80871e-06
-d 234 11 7.98026e-06
-d 235 11 7.1518e-06
-d 236 11 6.32335e-06
-d 237 11 5.5374e-06
-d 238 11 5.08959e-06
-d 239 11 4.64178e-06
-d 240 11 4.19397e-06
-d 241 11 3.74616e-06
-d 242 11 0.0438026
-d 243 11 0.0242078
-d 244 11 -0.0602019
-d 245 11 -0.0840866
-d 246 11 0.00148461
-d 247 11 -0.00292489
-d 248 11 0.000442098
-d 249 11 0.00219489
-d 250 11 0.00281478
-d 251 11 0.00290756
-d 252 11 0.00277945
-d 253 11 0.00263896
-d 254 11 0.00240099
-d 255 11 0.00223283
-d 256 11 0.001947
-d 257 11 -0.0153629
-d 258 11 -0.0148815
-d 259 11 -0.0128673
-d 260 11 0.0126017
-d 261 11 0.0905161
-d 262 11 0.11051
-d 263 11 0.0538958
-d 264 11 0.022562
-d 265 11 0.00935726
-d 266 11 0.00397422
-d 267 11 0.00172534
-d 268 11 0.000790207
-d 269 11 0.000416322
-d 270 11 0.000191632
-d 271 11 0.000469721
-d 272 11 0.0009779
-d 273 11 0.00192566
-d 274 11 0.00200688
-d 275 11 -0.0016502
-d 276 11 -0.00733932
-d 277 11 -0.0128113
-d 278 11 -0.0147608
-d 279 11 -0.0115456
-d 280 11 -0.00668995
-d 281 11 -0.00401368
-d 282 11 -0.00463908
-d 283 11 -0.0101197
-d 284 11 -0.0118993
-d 285 11 -0.0076276
-d 286 11 -0.00262656
-d 287 11 0.000813059
-d 288 11 0.00264455
-d 289 11 0.00350796
-d 290 11 0.00399494
-d 291 11 0.0043049
-d 292 11 0.00451658
-d 293 11 0.00444739
-d 294 11 0.00503842
-d 295 11 0.00559516
-d 296 11 0.00568213
-d 297 11 0.00556459
-d 298 11 0.0053176
-d 299 11 0.00496654
-d 300 11 0.00454337
-d 301 11 0.00408592
-d 302 11 0.00362171
-d 303 11 0.00317793
-d 304 11 0.00277001
-d 305 11 0.00240394
-d 306 11 0.00207009
-d 307 11 0.00176575
-d 308 11 0.00149725
-d 309 11 0.00129045
-d 310 11 0.00114257
-d 311 11 0.00101135
-d 312 11 0.000871672
-d 313 11 0.000723764
-d 314 11 0.000580438
-d 315 11 0.000427507
-d 316 11 0.000296956
-d 317 11 0.000281834
-d 318 11 0.000376628
-d 319 11 0.000412266
-d 320 11 0.000367547
-d 321 11 0.000295305
-d 322 11 0.000264513
-d 323 11 0.000233721
-d 324 11 0.000202929
-d 325 11 0.000172137
-d 326 11 0.000141345
-d 327 11 0.000124721
-d 328 11 0.000112577
-d 329 11 0.000100433
-d 330 11 8.82893e-05
-d 331 11 7.61453e-05
-d 332 11 6.75517e-05
-d 333 11 6.33609e-05
-d 334 11 5.91701e-05
-d 335 11 5.49792e-05
-d 336 11 5.07884e-05
-d 337 11 4.65976e-05
-d 338 11 4.24067e-05
-d 339 11 3.82159e-05
-d 340 11 3.40251e-05
-d 341 11 2.98342e-05
-d 342 11 2.56434e-05
-d 343 11 2.36401e-05
-d 344 11 2.21181e-05
-d 345 11 2.05961e-05
-d 346 11 1.90741e-05
-d 347 11 1.75521e-05
-d 348 11 1.60301e-05
-d 349 11 1.45081e-05
-d 350 11 1.29861e-05
-d 351 11 1.14641e-05
-d 352 11 9.94208e-06
-d 353 11 8.59252e-06
-d 354 11 7.96439e-06
-d 355 11 7.33626e-06
-d 356 11 6.70813e-06
-d 357 11 6.07999e-06
-d 358 11 5.45186e-06
-d 359 11 4.82373e-06
-d 360 11 4.1956e-06
-d 361 11 3.56747e-06
-d 1 12 1.86175
-d 2 12 1.73419
-d 3 12 1.42874
-d 4 12 1.04055
-d 5 12 0.943004
-d 6 12 0.268275
-d 7 12 0.0826455
-d 8 12 0.0388346
-d 9 12 0.0214104
-d 10 12 0.0135431
-d 11 12 0.00961322
-d 12 12 0.00712846
-d 13 12 0.00588262
-d 14 12 0.00432397
-d 15 12 0.00377774
-d 16 12 0.00270134
-d 17 12 -0.00393731
-d 18 12 -0.00542187
-d 19 12 -0.00126596
-d 20 12 0.0113777
-d 21 12 0.0134522
-d 22 12 0.00477056
-d 23 12 -0.00211067
-d 24 12 -0.00229253
-d 25 12 -0.00173355
-d 26 12 -0.00122404
-d 27 12 -0.00113426
-d 28 12 -0.000744931
-d 29 12 -0.000520112
-d 30 12 -0.000410048
-d 31 12 -0.000220439
-d 32 12 0.000508104
-d 33 12 5.15856e-05
-d 34 12 -0.000112593
-d 35 12 -0.000118917
-d 36 12 -9.57394e-05
-d 37 12 -7.15727e-05
-d 38 12 -5.11847e-05
-d 39 12 -3.58275e-05
-d 40 12 -2.47166e-05
-d 41 12 -1.68866e-05
-d 42 12 -1.14082e-05
-d 43 12 -7.66646e-06
-d 44 12 -5.12139e-06
-d 45 12 -3.63426e-06
-d 46 12 -3.01815e-06
-d 47 12 -2.64862e-06
-d 48 12 -1.4947e-06
-d 49 12 -1.91403e-07
-d 50 12 -2.5763e-08
-d 51 12 -7.73699e-07
-d 52 12 -1.52164e-06
-d 53 12 -1.07268e-06
-d 54 12 -3.81696e-07
-d 55 12 2.6727e-07
-d 56 12 4.75489e-07
-d 57 12 6.83708e-07
-d 58 12 8.91926e-07
-d 59 12 1.10014e-06
-d 60 12 1.30836e-06
-d 61 12 1.2482e-06
-d 62 12 1.00726e-06
-d 63 12 7.66311e-07
-d 64 12 5.25364e-07
-d 65 12 2.84417e-07
-d 66 12 6.27857e-08
-d 67 12 7.43904e-10
-d 68 12 -6.12979e-08
-d 69 12 -1.2334e-07
-d 70 12 -1.85382e-07
-d 71 12 -2.47423e-07
-d 72 12 -3.09465e-07
-d 73 12 -3.71507e-07
-d 74 12 -4.33549e-07
-d 75 12 -4.95591e-07
-d 76 12 -5.57633e-07
-d 77 12 -6.04571e-07
-d 78 12 -5.4944e-07
-d 79 12 -4.9431e-07
-d 80 12 -4.3918e-07
-d 81 12 -3.84049e-07
-d 82 12 -3.28919e-07
-d 83 12 -2.73789e-07
-d 84 12 -2.18659e-07
-d 85 12 -1.63528e-07
-d 86 12 -1.08398e-07
-d 87 12 -5.32678e-08
-d 88 12 1.062e-09
-d 89 12 5.08502e-08
-d 90 12 1.00638e-07
-d 91 12 1.50427e-07
-d 92 12 2.00215e-07
-d 93 12 2.50003e-07
-d 94 12 2.99791e-07
-d 95 12 3.4958e-07
-d 96 12 3.99368e-07
-d 97 12 4.49156e-07
-d 98 12 4.98944e-07
-d 99 12 5.34512e-07
-d 100 12 5.01032e-07
-d 101 12 4.67553e-07
-d 102 12 4.34073e-07
-d 103 12 4.00593e-07
-d 104 12 3.67113e-07
-d 105 12 3.33633e-07
-d 106 12 3.00153e-07
-d 107 12 2.66674e-07
-d 108 12 2.33194e-07
-d 109 12 1.99714e-07
-d 110 12 1.66234e-07
-d 111 12 1.32754e-07
-d 112 12 9.92744e-08
-d 113 12 6.57945e-08
-d 114 12 3.23147e-08
-d 115 12 -1.16513e-09
-d 116 12 -3.4645e-08
-d 117 12 -6.81248e-08
-d 118 12 -1.01605e-07
-d 119 12 -1.35084e-07
-d 120 12 -1.68564e-07
-d 121 12 -2.18729e-07
-d 122 12 0.0114926
-d 123 12 -0.0245378
-d 124 12 -0.111828
-d 125 12 0.0964775
-d 126 12 1.61491
-d 127 12 3.22668
-d 128 12 4.22041
-d 129 12 4.54492
-d 130 12 4.82845
-d 131 12 4.94868
-d 132 12 4.98588
-d 133 12 4.99609
-d 134 12 4.9981
-d 135 12 4.99908
-d 136 12 4.99788
-d 137 12 4.98395
-d 138 12 4.99294
-d 139 12 4.99724
-d 140 12 5.01939
-d 141 12 5.0471
-d 142 12 5.00902
-d 143 12 4.98194
-d 144 12 4.98496
-d 145 12 4.99188
-d 146 12 4.99623
-d 147 12 4.99862
-d 148 12 5.00025
-d 149 12 4.99974
-d 150 12 4.99953
-d 151 12 4.99946
-d 152 12 4.99958
-d 153 12 5.00012
-d 154 12 4.99997
-d 155 12 4.99992
-d 156 12 4.99988
-d 157 12 4.99985
-d 158 12 4.9998
-d 159 12 4.9997
-d 160 12 4.9988
-d 161 12 4.99806
-d 162 12 4.99982
-d 163 12 5.00143
-d 164 12 5.00159
-d 165 12 5.00098
-d 166 12 5.00053
-d 167 12 5.00028
-d 168 12 5.00007
-d 169 12 4.99977
-d 170 12 4.99992
-d 171 12 5.00005
-d 172 12 5.00133
-d 173 12 5.0009
-d 174 12 4.99993
-d 175 12 4.99972
-d 176 12 4.99975
-d 177 12 4.9998
-d 178 12 4.99982
-d 179 12 4.99983
-d 180 12 4.99983
-d 181 12 4.99983
-d 182 12 4.99983
-d 183 12 4.99984
-d 184 12 4.99986
-d 185 12 4.99987
-d 186 12 4.99989
-d 187 12 4.9999
-d 188 12 4.99991
-d 189 12 4.99992
-d 190 12 4.99994
-d 191 12 4.99995
-d 192 12 4.99995
-d 193 12 4.99996
-d 194 12 4.99997
-d 195 12 4.99997
-d 196 12 4.99998
-d 197 12 4.99998
-d 198 12 4.99998
-d 199 12 4.99998
-d 200 12 4.99999
-d 201 12 4.99999
-d 202 12 4.99999
-d 203 12 4.99999
-d 204 12 4.99999
-d 205 12 4.99999
-d 206 12 4.99999
-d 207 12 5.0
-d 208 12 5.0
-d 209 12 5.0
-d 210 12 5.00001
-d 211 12 5.00001
-d 212 12 5.00001
-d 213 12 5.00002
-d 214 12 5.00002
-d 215 12 5.00002
-d 216 12 5.00002
-d 217 12 5.00002
-d 218 12 5.00001
-d 219 12 5.00001
-d 220 12 5.00001
-d 221 12 5.0
-d 222 12 5.0
-d 223 12 5.0
-d 224 12 5.0
-d 225 12 5.0
-d 226 12 5.0
-d 227 12 5.0
-d 228 12 5.0
-d 229 12 4.99999
-d 230 12 4.99999
-d 231 12 4.99999
-d 232 12 4.99999
-d 233 12 4.99999
-d 234 12 4.99999
-d 235 12 4.99999
-d 236 12 4.99999
-d 237 12 4.99999
-d 238 12 4.99999
-d 239 12 4.99999
-d 240 12 5.0
-d 241 12 5.0
-d 242 12 5.01457
-d 243 12 4.99482
-d 244 12 4.96561
-d 245 12 4.99326
-d 246 12 5.03452
-d 247 12 5.00424
-d 248 12 5.00101
-d 249 12 5.00045
-d 250 12 5.00004
-d 251 12 4.99965
-d 252 12 4.99997
-d 253 12 4.99994
-d 254 12 4.99958
-d 255 12 4.99999
-d 256 12 4.99936
-d 257 12 4.9839
-d 258 12 4.99248
-d 259 12 4.99717
-d 260 12 5.01976
-d 261 12 5.04869
-d 262 12 5.0087
-d 263 12 4.98143
-d 264 12 4.98488
-d 265 12 4.99199
-d 266 12 4.99622
-d 267 12 4.9983
-d 268 12 4.99928
-d 269 12 4.99971
-d 270 12 4.99986
-d 271 12 5.00031
-d 272 12 5.00022
-d 273 12 5.00035
-d 274 12 5.0001
-d 275 12 4.99884
-d 276 12 4.99811
-d 277 12 4.99803
-d 278 12 4.99887
-d 279 12 5.00078
-d 280 12 5.00151
-d 281 12 5.00116
-d 282 12 5.00007
-d 283 12 4.99843
-d 284 12 4.99915
-d 285 12 5.00107
-d 286 12 5.00168
-d 287 12 5.00141
-d 288 12 5.00092
-d 289 12 5.00055
-d 290 12 5.0003
-d 291 12 5.00016
-d 292 12 5.0001
-d 293 12 5.00001
-d 294 12 5.00016
-d 295 12 5.0002
-d 296 12 5.00009
-d 297 12 4.99993
-d 298 12 4.99975
-d 299 12 4.99984
-d 300 12 4.99991
-d 301 12 4.99991
-d 302 12 4.99982
-d 303 12 4.99974
-d 304 12 4.99974
-d 305 12 4.99985
-d 306 12 4.99995
-d 307 12 4.99999
-d 308 12 4.99998
-d 309 12 5.00004
-d 310 12 5.00013
-d 311 12 5.00015
-d 312 12 5.00007
-d 313 12 4.99988
-d 314 12 4.99982
-d 315 12 4.99985
-d 316 12 4.99995
-d 317 12 5.00006
-d 318 12 5.0002
-d 319 12 5.00025
-d 320 12 5.0002
-d 321 12 5.00009
-d 322 12 5.00006
-d 323 12 5.00004
-d 324 12 5.00002
-d 325 12 5.0
-d 326 12 4.99998
-d 327 12 4.99997
-d 328 12 4.99998
-d 329 12 4.99998
-d 330 12 4.99999
-d 331 12 4.99999
-d 332 12 4.99999
-d 333 12 5.0
-d 334 12 5.0
-d 335 12 5.0
-d 336 12 5.0
-d 337 12 5.0
-d 338 12 5.00001
-d 339 12 5.00001
-d 340 12 5.00001
-d 341 12 5.00001
-d 342 12 5.00001
-d 343 12 5.00001
-d 344 12 5.00001
-d 345 12 5.00001
-d 346 12 5.00001
-d 347 12 5.00001
-d 348 12 5.00001
-d 349 12 5.00001
-d 350 12 5.0
-d 351 12 5.0
-d 352 12 5.0
-d 353 12 5.0
-d 354 12 5.0
-d 355 12 4.99999
-d 356 12 4.99999
-d 357 12 4.99999
-d 358 12 4.99999
-d 359 12 4.99998
-d 360 12 4.99998
-d 361 12 4.99998
-d 1 13 5.0
-d 2 13 5.16975
-d 3 13 4.78685
-d 4 13 2.94241
-d 5 13 0.126698
-d 6 13 0.0487004
-d 7 13 -0.00422591
-d 8 13 -0.00130689
-d 9 13 -0.000486756
-d 10 13 -0.000195875
-d 11 13 -0.000108988
-d 12 13 -6.66736e-05
-d 13 13 -7.26005e-05
-d 14 13 -5.63608e-05
-d 15 13 -3.81859e-05
-d 16 13 -2.123e-05
-d 17 13 -0.0646846
-d 18 13 -0.0184474
-d 19 13 0.182248
-d 20 13 1.06731
-d 21 13 3.10988
-d 22 13 4.46133
-d 23 13 4.84133
-d 24 13 4.95113
-d 25 13 4.98364
-d 26 13 4.99455
-d 27 13 4.99694
-d 28 13 4.99727
-d 29 13 4.9994
-d 30 13 4.99975
-d 31 13 5.0001
-d 32 13 5.00132
-d 33 13 5.00089
-d 34 13 5.00039
-d 35 13 5.00019
-d 36 13 5.00011
-d 37 13 5.00006
-d 38 13 5.00005
-d 39 13 5.00004
-d 40 13 5.00001
-d 41 13 4.99992
-d 42 13 4.99992
-d 43 13 5.00002
-d 44 13 5.00013
-d 45 13 5.00017
-d 46 13 5.00009
-d 47 13 4.99992
-d 48 13 4.99991
-d 49 13 4.99994
-d 50 13 4.99996
-d 51 13 4.99998
-d 52 13 4.99999
-d 53 13 5.00001
-d 54 13 5.00004
-d 55 13 5.00006
-d 56 13 5.00005
-d 57 13 5.00004
-d 58 13 5.00003
-d 59 13 5.00002
-d 60 13 5.00001
-d 61 13 5.0
-d 62 13 4.99999
-d 63 13 4.99999
-d 64 13 4.99998
-d 65 13 4.99998
-d 66 13 4.99997
-d 67 13 4.99997
-d 68 13 4.99998
-d 69 13 4.99998
-d 70 13 4.99998
-d 71 13 4.99998
-d 72 13 4.99999
-d 73 13 4.99999
-d 74 13 4.99999
-d 75 13 4.99999
-d 76 13 5.0
-d 77 13 5.0
-d 78 13 5.0
-d 79 13 5.0
-d 80 13 5.0
-d 81 13 5.0
-d 82 13 5.00001
-d 83 13 5.00001
-d 84 13 5.00001
-d 85 13 5.00001
-d 86 13 5.00001
-d 87 13 5.00001
-d 88 13 5.00002
-d 89 13 5.00001
-d 90 13 5.00001
-d 91 13 5.00001
-d 92 13 5.00001
-d 93 13 5.00001
-d 94 13 5.00001
-d 95 13 5.00001
-d 96 13 5.0
-d 97 13 5.0
-d 98 13 5.0
-d 99 13 5.0
-d 100 13 5.0
-d 101 13 5.0
-d 102 13 5.0
-d 103 13 5.0
-d 104 13 5.0
-d 105 13 5.0
-d 106 13 5.0
-d 107 13 5.0
-d 108 13 5.0
-d 109 13 5.0
-d 110 13 5.0
-d 111 13 5.0
-d 112 13 5.0
-d 113 13 5.0
-d 114 13 4.99999
-d 115 13 4.99999
-d 116 13 4.99999
-d 117 13 4.99999
-d 118 13 4.99999
-d 119 13 4.99999
-d 120 13 4.99999
-d 121 13 5.0
-d 122 13 5.14699
-d 123 13 4.78074
-d 124 13 3.19424
-d 125 13 0.305663
-d 126 13 0.0611255
-d 127 13 -0.00179951
-d 128 13 -0.0012032
-d 129 13 0.000405978
-d 130 13 0.000989399
-d 131 13 0.000445194
-d 132 13 0.000191447
-d 133 13 8.30476e-05
-d 134 13 3.96236e-05
-d 135 13 1.91866e-05
-d 136 13 1.70665e-05
-d 137 13 -0.0655239
-d 138 13 -0.0210234
-d 139 13 0.1827
-d 140 13 1.06848
-d 141 13 3.11554
-d 142 13 4.46518
-d 143 13 4.84212
-d 144 13 4.94853
-d 145 13 4.98244
-d 146 13 4.99434
-d 147 13 4.9997
-d 148 13 5.00081
-d 149 13 5.00009
-d 150 13 4.99972
-d 151 13 4.99985
-d 152 13 4.99974
-d 153 13 4.9995
-d 154 13 4.99949
-d 155 13 4.99958
-d 156 13 4.99973
-d 157 13 4.99948
-d 158 13 4.99914
-d 159 13 4.99874
-d 160 13 4.99946
-d 161 13 5.00309
-d 162 13 5.0091
-d 163 13 5.01576
-d 164 13 5.01835
-d 165 13 5.01852
-d 166 13 5.0176
-d 167 13 5.01625
-d 168 13 5.01479
-d 169 13 5.01345
-d 170 13 5.01264
-d 171 13 5.011
-d 172 13 5.01092
-d 173 13 5.01344
-d 174 13 5.01363
-d 175 13 5.01289
-d 176 13 5.01184
-d 177 13 5.01071
-d 178 13 5.00956
-d 179 13 5.00848
-d 180 13 5.00751
-d 181 13 5.00663
-d 182 13 5.00577
-d 183 13 5.00497
-d 184 13 5.00427
-d 185 13 5.00365
-d 186 13 5.0031
-d 187 13 5.00264
-d 188 13 5.00224
-d 189 13 5.00191
-d 190 13 5.00163
-d 191 13 5.00138
-d 192 13 5.00117
-d 193 13 5.00099
-d 194 13 5.00083
-d 195 13 5.00071
-d 196 13 5.00061
-d 197 13 5.00053
-d 198 13 5.00045
-d 199 13 5.00037
-d 200 13 5.00029
-d 201 13 5.00022
-d 202 13 5.00019
-d 203 13 5.0002
-d 204 13 5.00023
-d 205 13 5.00024
-d 206 13 5.00023
-d 207 13 5.00023
-d 208 13 5.00022
-d 209 13 5.0002
-d 210 13 5.00018
-d 211 13 5.00016
-d 212 13 5.00014
-d 213 13 5.00011
-d 214 13 5.00009
-d 215 13 5.00007
-d 216 13 5.00006
-d 217 13 5.00005
-d 218 13 5.00005
-d 219 13 5.00004
-d 220 13 5.00003
-d 221 13 5.00002
-d 222 13 5.00001
-d 223 13 5.00001
-d 224 13 5.00001
-d 225 13 5.00001
-d 226 13 5.00001
-d 227 13 5.00001
-d 228 13 5.00001
-d 229 13 5.00001
-d 230 13 5.00001
-d 231 13 5.00002
-d 232 13 5.00002
-d 233 13 5.00002
-d 234 13 5.00002
-d 235 13 5.00002
-d 236 13 5.00002
-d 237 13 5.00002
-d 238 13 5.00002
-d 239 13 5.00001
-d 240 13 5.00001
-d 241 13 5.00001
-d 242 13 5.14298
-d 243 13 4.79809
-d 244 13 3.32704
-d 245 13 0.498385
-d 246 13 0.105773
-d 247 13 0.0160646
-d 248 13 0.0319912
-d 249 13 0.0299434
-d 250 13 0.0240102
-d 251 13 0.0185844
-d 252 13 0.0130411
-d 253 13 0.0106532
-d 254 13 0.00864871
-d 255 13 0.00744519
-d 256 13 0.00660887
-d 257 13 -0.0612913
-d 258 13 -0.0203719
-d 259 13 0.174998
-d 260 13 0.991787
-d 261 13 3.06292
-d 262 13 4.60005
-d 263 13 4.93058
-d 264 13 4.98917
-d 265 13 5.00033
-d 266 13 4.9999
-d 267 13 4.99909
-d 268 13 4.9966
-d 269 13 4.9955
-d 270 13 4.99488
-d 271 13 4.99374
-d 272 13 4.9943
-d 273 13 5.00131
-d 274 13 5.00506
-d 275 13 4.99311
-d 276 13 4.96288
-d 277 13 4.93567
-d 278 13 4.92439
-d 279 13 4.94236
-d 280 13 4.9732
-d 281 13 4.98864
-d 282 13 4.99458
-d 283 13 5.00031
-d 284 13 5.00694
-d 285 13 5.01525
-d 286 13 5.01945
-d 287 13 5.01998
-d 288 13 5.01953
-d 289 13 5.01874
-d 290 13 5.01766
-d 291 13 5.0164
-d 292 13 5.01509
-d 293 13 5.01326
-d 294 13 5.01423
-d 295 13 5.01455
-d 296 13 5.01361
-d 297 13 5.01245
-d 298 13 5.01122
-d 299 13 5.01002
-d 300 13 5.00888
-d 301 13 5.00783
-d 302 13 5.00687
-d 303 13 5.00596
-d 304 13 5.00514
-d 305 13 5.00442
-d 306 13 5.00379
-d 307 13 5.00325
-d 308 13 5.00279
-d 309 13 5.0024
-d 310 13 5.00208
-d 311 13 5.0018
-d 312 13 5.00153
-d 313 13 5.00126
-d 314 13 5.00107
-d 315 13 5.00094
-d 316 13 5.00085
-d 317 13 5.00078
-d 318 13 5.00072
-d 319 13 5.00063
-d 320 13 5.00053
-d 321 13 5.00042
-d 322 13 5.00038
-d 323 13 5.00034
-d 324 13 5.0003
-d 325 13 5.00027
-d 326 13 5.00023
-d 327 13 5.00021
-d 328 13 5.00019
-d 329 13 5.00017
-d 330 13 5.00015
-d 331 13 5.00013
-d 332 13 5.00012
-d 333 13 5.00011
-d 334 13 5.0001
-d 335 13 5.0001
-d 336 13 5.00009
-d 337 13 5.00008
-d 338 13 5.00007
-d 339 13 5.00007
-d 340 13 5.00006
-d 341 13 5.00005
-d 342 13 5.00005
-d 343 13 5.00004
-d 344 13 5.00004
-d 345 13 5.00003
-d 346 13 5.00003
-d 347 13 5.00002
-d 348 13 5.00002
-d 349 13 5.00002
-d 350 13 5.00001
-d 351 13 5.00001
-d 352 13 5.0
-d 353 13 5.0
-d 354 13 5.0
-d 355 13 5.00001
-d 356 13 5.00001
-d 357 13 5.00001
-d 358 13 5.00002
-d 359 13 5.00002
-d 360 13 5.00002
-d 361 13 5.00002
-d 1 14 9.73784e-10
-d 2 14 0.0189926
-d 3 14 0.0926769
-d 4 14 0.206309
-d 5 14 0.111533
-d 6 14 0.0953491
-d 7 14 0.0426966
-d 8 14 0.0214177
-d 9 14 0.0117943
-d 10 14 0.00741442
-d 11 14 0.00528816
-d 12 14 0.00398417
-d 13 14 0.0032967
-d 14 14 0.00266499
-d 15 14 0.00206647
-d 16 14 0.00158788
-d 17 14 -0.0371391
-d 18 14 -0.0439528
-d 19 14 -0.0408653
-d 20 14 -0.0188706
-d 21 14 0.0150241
-d 22 14 0.0126852
-d 23 14 0.00209817
-d 24 14 -0.000239206
-d 25 14 -5.31488e-05
-d 26 14 0.000876324
-d 27 14 -0.00451221
-d 28 14 -0.0165223
-d 29 14 -0.0284127
-d 30 14 -0.0427584
-d 31 14 -0.0502453
-d 32 14 -0.0257366
-d 33 14 -0.00903938
-d 34 14 -0.00376456
-d 35 14 -0.00233385
-d 36 14 -0.00169922
-d 37 14 -0.00130397
-d 38 14 -0.00102542
-d 39 14 -0.000811435
-d 40 14 -0.000648115
-d 41 14 -0.000529266
-d 42 14 -0.00043795
-d 43 14 -0.00036574
-d 44 14 -0.00030716
-d 45 14 -0.00026221
-d 46 14 -0.000229662
-d 47 14 -0.000205112
-d 48 14 -0.000181038
-d 49 14 -0.000162045
-d 50 14 -0.000148988
-d 51 14 -0.000137633
-d 52 14 -0.000126278
-d 53 14 -0.000115562
-d 54 14 -0.000104976
-d 55 14 -9.49324e-05
-d 56 14 -9.0585e-05
-d 57 14 -8.62375e-05
-d 58 14 -8.18901e-05
-d 59 14 -7.75426e-05
-d 60 14 -7.31952e-05
-d 61 14 -6.93752e-05
-d 62 14 -6.59106e-05
-d 63 14 -6.24461e-05
-d 64 14 -5.89815e-05
-d 65 14 -5.55169e-05
-d 66 14 -5.22412e-05
-d 67 14 -5.05263e-05
-d 68 14 -4.88114e-05
-d 69 14 -4.70966e-05
-d 70 14 -4.53817e-05
-d 71 14 -4.36668e-05
-d 72 14 -4.19519e-05
-d 73 14 -4.0237e-05
-d 74 14 -3.85222e-05
-d 75 14 -3.68073e-05
-d 76 14 -3.50924e-05
-d 77 14 -3.34782e-05
-d 78 14 -3.25442e-05
-d 79 14 -3.16102e-05
-d 80 14 -3.06763e-05
-d 81 14 -2.97423e-05
-d 82 14 -2.88083e-05
-d 83 14 -2.78744e-05
-d 84 14 -2.69404e-05
-d 85 14 -2.60064e-05
-d 86 14 -2.50725e-05
-d 87 14 -2.41385e-05
-d 88 14 -2.32635e-05
-d 89 14 -2.27232e-05
-d 90 14 -2.21829e-05
-d 91 14 -2.16426e-05
-d 92 14 -2.11023e-05
-d 93 14 -2.0562e-05
-d 94 14 -2.00217e-05
-d 95 14 -1.94814e-05
-d 96 14 -1.89411e-05
-d 97 14 -1.84007e-05
-d 98 14 -1.78604e-05
-d 99 14 -1.73647e-05
-d 100 14 -1.70853e-05
-d 101 14 -1.68059e-05
-d 102 14 -1.65265e-05
-d 103 14 -1.62471e-05
-d 104 14 -1.59677e-05
-d 105 14 -1.56883e-05
-d 106 14 -1.54089e-05
-d 107 14 -1.51295e-05
-d 108 14 -1.48501e-05
-d 109 14 -1.45707e-05
-d 110 14 -1.42913e-05
-d 111 14 -1.40119e-05
-d 112 14 -1.37325e-05
-d 113 14 -1.34531e-05
-d 114 14 -1.31737e-05
-d 115 14 -1.28943e-05
-d 116 14 -1.26149e-05
-d 117 14 -1.23355e-05
-d 118 14 -1.20561e-05
-d 119 14 -1.17767e-05
-d 120 14 -1.14973e-05
-d 121 14 -1.10954e-05
-d 122 14 0.0152675
-d 123 14 0.0228237
-d 124 14 -0.00460678
-d 125 14 -0.0341525
-d 126 14 0.0232109
-d 127 14 -0.0138039
-d 128 14 -0.0416538
-d 129 14 -0.0458764
-d 130 14 -0.0201967
-d 131 14 -0.00878316
-d 132 14 -0.00379173
-d 133 14 -0.00164621
-d 134 14 -0.000785131
-d 135 14 -0.00037575
-d 136 14 -0.000352375
-d 137 14 -0.0545586
-d 138 14 -0.0746881
-d 139 14 -0.0771865
-d 140 14 -0.05386
-d 141 14 -0.0022199
-d 142 14 0.0136703
-d 143 14 0.00633526
-d 144 14 0.00138826
-d 145 14 -0.00108934
-d 146 14 0.0038886
-d 147 14 0.0298077
-d 148 14 0.0475776
-d 149 14 0.0481003
-d 150 14 0.0464167
-d 151 14 0.047818
-d 152 14 0.042789
-d 153 14 0.035207
-d 154 14 0.0264423
-d 155 14 0.0193959
-d 156 14 0.0151614
-d 157 14 0.00624257
-d 158 14 -0.00913057
-d 159 14 -0.0310696
-d 160 14 -0.0430238
-d 161 14 0.016426
-d 162 14 0.189762
-d 163 14 0.49025
-d 164 14 0.820116
-d 165 14 1.13919
-d 166 14 1.43549
-d 167 14 1.70658
-d 168 14 1.95183
-d 169 14 2.17414
-d 170 14 2.38506
-d 171 14 2.5657
-d 172 14 2.73958
-d 173 14 2.97905
-d 174 14 3.21403
-d 175 14 3.43025
-d 176 14 3.62645
-d 177 14 3.8028
-d 178 14 3.96002
-d 179 14 4.09996
-d 180 14 4.22443
-d 181 14 4.33427
-d 182 14 4.42886
-d 183 14 4.51097
-d 184 14 4.5817
-d 185 14 4.64326
-d 186 14 4.6957
-d 187 14 4.74132
-d 188 14 4.7797
-d 189 14 4.81298
-d 190 14 4.84102
-d 191 14 4.86512
-d 192 14 4.88523
-d 193 14 4.90224
-d 194 14 4.91649
-d 195 14 4.92846
-d 196 14 4.93868
-d 197 14 4.94755
-d 198 14 4.95483
-d 199 14 4.96114
-d 200 14 4.96682
-d 201 14 4.97161
-d 202 14 4.97502
-d 203 14 4.9776
-d 204 14 4.97944
-d 205 14 4.98141
-d 206 14 4.98319
-d 207 14 4.98467
-d 208 14 4.98585
-d 209 14 4.9869
-d 210 14 4.98796
-d 211 14 4.98902
-d 212 14 4.99008
-d 213 14 4.99114
-d 214 14 4.9922
-d 215 14 4.99326
-d 216 14 4.9938
-d 217 14 4.99429
-d 218 14 4.99479
-d 219 14 4.99528
-d 220 14 4.99578
-d 221 14 4.99628
-d 222 14 4.99677
-d 223 14 4.99704
-d 224 14 4.99718
-d 225 14 4.99733
-d 226 14 4.99747
-d 227 14 4.99762
-d 228 14 4.99777
-d 229 14 4.99791
-d 230 14 4.99806
-d 231 14 4.9982
-d 232 14 4.99835
-d 233 14 4.9985
-d 234 14 4.99864
-d 235 14 4.99879
-d 236 14 4.99893
-d 237 14 4.99907
-d 238 14 4.99916
-d 239 14 4.99925
-d 240 14 4.99934
-d 241 14 4.99943
-d 242 14 5.01473
-d 243 14 4.92293
-d 244 14 4.61974
-d 245 14 4.0316
-d 246 14 3.7835
-d 247 14 3.74195
-d 248 14 3.78344
-d 249 14 3.87272
-d 250 14 3.97386
-d 251 14 4.07319
-d 252 14 4.16686
-d 253 14 4.25256
-d 254 14 4.33126
-d 255 14 4.40264
-d 256 14 4.46697
-d 257 14 4.49249
-d 258 14 4.51807
-d 259 14 4.55803
-d 260 14 4.64055
-d 261 14 4.78574
-d 262 14 4.86074
-d 263 14 4.88334
-d 264 14 4.8999
-d 265 14 4.91455
-d 266 14 4.92814
-d 267 14 4.93926
-d 268 14 4.94761
-d 269 14 4.95433
-d 270 14 4.95907
-d 271 14 4.9654
-d 272 14 4.98317
-d 273 14 5.0208
-d 274 14 5.05134
-d 275 14 4.85852
-d 276 14 4.16041
-d 277 14 3.00077
-d 278 14 1.68376
-d 279 14 0.672707
-d 280 14 0.240838
-d 281 14 0.0794725
-d 282 14 -0.0106347
-d 283 14 -0.00879443
-d 284 14 0.107196
-d 285 14 0.368163
-d 286 14 0.701424
-d 287 14 1.03581
-d 288 14 1.3601
-d 289 14 1.6678
-d 290 14 1.95731
-d 291 14 2.22701
-d 292 14 2.47544
-d 293 14 2.69099
-d 294 14 2.92327
-d 295 14 3.16648
-d 296 14 3.3877
-d 297 14 3.59067
-d 298 14 3.77344
-d 299 14 3.93584
-d 300 14 4.08066
-d 301 14 4.20863
-d 302 14 4.32065
-d 303 14 4.41791
-d 304 14 4.50211
-d 305 14 4.57423
-d 306 14 4.63614
-d 307 14 4.68888
-d 308 14 4.73377
-d 309 14 4.7721
-d 310 14 4.80519
-d 311 14 4.83338
-d 312 14 4.85732
-d 313 14 4.87815
-d 314 14 4.89514
-d 315 14 4.90927
-d 316 14 4.92108
-d 317 14 4.93122
-d 318 14 4.94014
-d 319 14 4.94845
-d 320 14 4.95601
-d 321 14 4.96251
-d 322 14 4.96576
-d 323 14 4.969
-d 324 14 4.97225
-d 325 14 4.9755
-d 326 14 4.97874
-d 327 14 4.98087
-d 328 14 4.98265
-d 329 14 4.98442
-d 330 14 4.9862
-d 331 14 4.98797
-d 332 14 4.98924
-d 333 14 4.9899
-d 334 14 4.99055
-d 335 14 4.9912
-d 336 14 4.99186
-d 337 14 4.99251
-d 338 14 4.99316
-d 339 14 4.99381
-d 340 14 4.99447
-d 341 14 4.99512
-d 342 14 4.99577
-d 343 14 4.99609
-d 344 14 4.99634
-d 345 14 4.99659
-d 346 14 4.99683
-d 347 14 4.99708
-d 348 14 4.99732
-d 349 14 4.99757
-d 350 14 4.99782
-d 351 14 4.99806
-d 352 14 4.99831
-d 353 14 4.99853
-d 354 14 4.99863
-d 355 14 4.99873
-d 356 14 4.99883
-d 357 14 4.99893
-d 358 14 4.99903
-d 359 14 4.99913
-d 360 14 4.99923
-d 361 14 4.99933
-d 1 15 1.86175
-d 2 15 2.00147
-d 3 15 1.85141
-d 4 15 1.0654
-d 5 15 0.275481
-d 6 15 0.205547
-d 7 15 0.0712627
-d 8 15 0.0313387
-d 9 15 0.0151431
-d 10 15 0.00864531
-d 11 15 0.00593861
-d 12 15 0.00438111
-d 13 15 0.0037479
-d 14 15 0.00305857
-d 15 15 0.00221221
-d 16 15 0.0017081
-d 17 15 -0.0896128
-d 18 15 -0.109079
-d 19 15 -0.121356
-d 20 15 -0.0542001
-d 21 15 0.175821
-d 22 15 0.177442
-d 23 15 0.0814591
-d 24 15 0.0333042
-d 25 15 0.0134909
-d 26 15 0.00625777
-d 27 15 0.00100092
-d 28 15 -0.00552776
-d 29 15 -0.00411139
-d 30 15 -0.00150395
-d 31 15 -0.000564784
-d 32 15 3.48169e-05
-d 33 15 -0.000287014
-d 34 15 -0.000538515
-d 35 15 -0.000456537
-d 36 15 -0.000325677
-d 37 15 -0.000275468
-d 38 15 -0.000166452
-d 39 15 -8.27481e-05
-d 40 15 -8.28704e-05
-d 41 15 -7.47644e-05
-d 42 15 -4.60552e-05
-d 43 15 -2.61481e-06
-d 44 15 2.26359e-05
-d 45 15 2.53852e-05
-d 46 15 -1.39853e-06
-d 47 15 -4.23456e-05
-d 48 15 -4.0907e-05
-d 49 15 -2.8501e-05
-d 50 15 -1.5945e-05
-d 51 15 -9.01122e-06
-d 52 15 -2.07747e-06
-d 53 15 1.49328e-06
-d 54 15 4.38398e-06
-d 55 15 6.84248e-06
-d 56 15 4.76711e-06
-d 57 15 2.69173e-06
-d 58 15 6.16362e-07
-d 59 15 -1.45901e-06
-d 60 15 -3.53438e-06
-d 61 15 -4.14256e-06
-d 62 15 -3.76238e-06
-d 63 15 -3.3822e-06
-d 64 15 -3.00202e-06
-d 65 15 -2.62184e-06
-d 66 15 -2.24878e-06
-d 67 15 -1.93456e-06
-d 68 15 -1.62033e-06
-d 69 15 -1.3061e-06
-d 70 15 -9.91867e-07
-d 71 15 -6.77638e-07
-d 72 15 -3.63409e-07
-d 73 15 -4.91792e-08
-d 74 15 2.6505e-07
-d 75 15 5.7928e-07
-d 76 15 8.93509e-07
-d 77 15 1.16076e-06
-d 78 15 1.11055e-06
-d 79 15 1.06034e-06
-d 80 15 1.01014e-06
-d 81 15 9.59927e-07
-d 82 15 9.09719e-07
-d 83 15 8.59511e-07
-d 84 15 8.09302e-07
-d 85 15 7.59094e-07
-d 86 15 7.08886e-07
-d 87 15 6.58678e-07
-d 88 15 5.99251e-07
-d 89 15 4.87523e-07
-d 90 15 3.75795e-07
-d 91 15 2.64068e-07
-d 92 15 1.5234e-07
-d 93 15 4.06119e-08
-d 94 15 -7.1116e-08
-d 95 15 -1.82844e-07
-d 96 15 -2.94572e-07
-d 97 15 -4.063e-07
-d 98 15 -5.18027e-07
-d 99 15 -6.08517e-07
-d 100 15 -5.95879e-07
-d 101 15 -5.83241e-07
-d 102 15 -5.70604e-07
-d 103 15 -5.57966e-07
-d 104 15 -5.45328e-07
-d 105 15 -5.3269e-07
-d 106 15 -5.20053e-07
-d 107 15 -5.07415e-07
-d 108 15 -4.94777e-07
-d 109 15 -4.8214e-07
-d 110 15 -4.69502e-07
-d 111 15 -4.56864e-07
-d 112 15 -4.44226e-07
-d 113 15 -4.31589e-07
-d 114 15 -4.18951e-07
-d 115 15 -4.06313e-07
-d 116 15 -3.93676e-07
-d 117 15 -3.81038e-07
-d 118 15 -3.684e-07
-d 119 15 -3.55762e-07
-d 120 15 -3.43125e-07
-d 121 15 1.06736e-05
-d 122 15 0.0797407
-d 123 15 0.0437947
-d 124 15 -0.0645098
-d 125 15 -0.0877312
-d 126 15 0.0653203
-d 127 15 -0.00621184
-d 128 15 -0.0353188
-d 129 15 -0.0491378
-d 130 15 -0.0251957
-d 131 15 -0.0110996
-d 132 15 -0.00481123
-d 133 15 -0.0020941
-d 134 15 -0.000998038
-d 135 15 -0.000478747
-d 136 15 -0.000445332
-d 137 15 -0.102046
-d 138 15 -0.135753
-d 139 15 -0.154351
-d 140 15 -0.0827509
-d 141 15 0.163348
-d 142 15 0.174012
-d 143 15 0.0794822
-d 144 15 0.0310624
-d 145 15 0.0112213
-d 146 15 0.00249061
-d 147 15 0.00130764
-d 148 15 0.00181315
-d 149 15 0.00163875
-d 150 15 0.00101454
-d 151 15 0.000497435
-d 152 15 0.000195258
-d 153 15 5.31901e-05
-d 154 15 2.4607e-05
-d 155 15 6.62736e-05
-d 156 15 7.90718e-05
-d 157 15 4.0372e-05
-d 158 15 -0.000141184
-d 159 15 -0.000280623
-d 160 15 5.5608e-05
-d 161 15 0.000799565
-d 162 15 0.000920189
-d 163 15 0.000931616
-d 164 15 0.000494527
-d 165 15 0.000162303
-d 166 15 -8.24884e-05
-d 167 15 -0.000183938
-d 168 15 -0.000203899
-d 169 15 -0.000144788
-d 170 15 -9.87063e-05
-d 171 15 -0.000227929
-d 172 15 2.93932e-05
-d 173 15 0.000208563
-d 174 15 1.88958e-06
-d 175 15 -7.6335e-05
-d 176 15 -0.000172472
-d 177 15 -0.000165656
-d 178 15 -0.000145889
-d 179 15 -0.000177311
-d 180 15 -0.000191058
-d 181 15 -0.000168287
-d 182 15 -0.00015755
-d 183 15 -0.00013142
-d 184 15 -8.10488e-05
-d 185 15 -6.36115e-05
-d 186 15 -7.8699e-05
-d 187 15 -8.11282e-05
-d 188 15 -7.98625e-05
-d 189 15 -5.98807e-05
-d 190 15 -3.40879e-05
-d 191 15 -1.95464e-05
-d 192 15 -1.79247e-05
-d 193 15 -4.45514e-05
-d 194 15 -7.47995e-05
-d 195 15 -8.7682e-05
-d 196 15 -7.50806e-05
-d 197 15 -3.25561e-05
-d 198 15 -4.34114e-05
-d 199 15 -7.69099e-05
-d 200 15 -0.000141101
-d 201 15 -0.00018743
-d 202 15 -0.000148471
-d 203 15 -5.06546e-05
-d 204 15 0.000120195
-d 205 15 0.000177635
-d 206 15 0.000177052
-d 207 15 0.000146344
-d 208 15 9.75126e-05
-d 209 15 8.31233e-05
-d 210 15 6.8734e-05
-d 211 15 5.43447e-05
-d 212 15 3.99554e-05
-d 213 15 2.55661e-05
-d 214 15 1.11768e-05
-d 215 15 -3.21253e-06
-d 216 15 -3.88937e-06
-d 217 15 -3.56628e-06
-d 218 15 -3.24318e-06
-d 219 15 -2.92008e-06
-d 220 15 -2.59699e-06
-d 221 15 -2.27389e-06
-d 222 15 -1.9508e-06
-d 223 15 -1.73227e-06
-d 224 15 -1.56796e-06
-d 225 15 -1.40365e-06
-d 226 15 -1.23934e-06
-d 227 15 -1.07503e-06
-d 228 15 -9.10722e-07
-d 229 15 -7.46412e-07
-d 230 15 -5.82101e-07
-d 231 15 -4.1779e-07
-d 232 15 -2.5348e-07
-d 233 15 -8.91694e-08
-d 234 15 7.51412e-08
-d 235 15 2.39452e-07
-d 236 15 4.03762e-07
-d 237 15 5.95733e-07
-d 238 15 1.00771e-06
-d 239 15 1.41969e-06
-d 240 15 1.83167e-06
-d 241 15 2.24365e-06
-d 242 15 0.0828257
-d 243 15 0.231038
-d 244 15 0.465438
-d 245 15 1.54516
-d 246 15 2.8461
-d 247 15 3.19221
-d 248 15 3.40395
-d 249 15 3.6382
-d 250 15 3.80758
-d 251 15 3.93848
-d 252 15 4.04882
-d 253 15 4.15428
-d 254 15 4.247
-d 255 15 4.32917
-d 256 15 4.40235
-d 257 15 4.36941
-d 258 15 4.397
-d 259 15 4.48862
-d 260 15 4.64552
-d 261 15 4.86595
-d 262 15 5.03475
-d 263 15 5.0348
-d 264 15 5.02627
-d 265 15 5.01967
-d 266 15 5.01542
-d 267 15 5.00925
-d 268 15 4.98613
-d 269 15 4.9519
-d 270 15 4.91581
-d 271 15 4.87357
-d 272 15 4.82302
-d 273 15 4.80403
-d 274 15 4.82565
-d 275 15 4.86102
-d 276 15 4.89483
-d 277 15 4.92253
-d 278 15 4.94428
-d 279 15 4.96257
-d 280 15 4.97608
-d 281 15 4.98373
-d 282 15 4.98823
-d 283 15 4.99182
-d 284 15 4.99437
-d 285 15 4.99635
-d 286 15 4.99745
-d 287 15 4.99802
-d 288 15 4.99843
-d 289 15 4.99873
-d 290 15 4.99895
-d 291 15 4.99912
-d 292 15 4.99925
-d 293 15 4.99931
-d 294 15 4.99962
-d 295 15 4.99973
-d 296 15 4.99972
-d 297 15 4.99971
-d 298 15 4.9997
-d 299 15 4.99969
-d 300 15 4.9997
-d 301 15 4.99971
-d 302 15 4.99973
-d 303 15 4.99974
-d 304 15 4.99976
-d 305 15 4.99978
-d 306 15 4.9998
-d 307 15 4.99982
-d 308 15 4.99985
-d 309 15 4.99987
-d 310 15 4.99989
-d 311 15 4.9999
-d 312 15 4.99991
-d 313 15 4.99991
-d 314 15 4.99993
-d 315 15 4.99994
-d 316 15 4.99997
-d 317 15 5.00001
-d 318 15 5.00006
-d 319 15 5.00008
-d 320 15 5.00006
-d 321 15 5.00002
-d 322 15 5.0
-d 323 15 4.99999
-d 324 15 4.99998
-d 325 15 4.99997
-d 326 15 4.99995
-d 327 15 4.99995
-d 328 15 4.99995
-d 329 15 4.99995
-d 330 15 4.99995
-d 331 15 4.99995
-d 332 15 4.99995
-d 333 15 4.99996
-d 334 15 4.99997
-d 335 15 4.99997
-d 336 15 4.99998
-d 337 15 4.99999
-d 338 15 5.0
-d 339 15 5.0
-d 340 15 5.00001
-d 341 15 5.00002
-d 342 15 5.00002
-d 343 15 5.00002
-d 344 15 5.00002
-d 345 15 5.00002
-d 346 15 5.00002
-d 347 15 5.00002
-d 348 15 5.00002
-d 349 15 5.00002
-d 350 15 5.00002
-d 351 15 5.00001
-d 352 15 5.00001
-d 353 15 5.00001
-d 354 15 5.00001
-d 355 15 5.00001
-d 356 15 5.0
-d 357 15 5.0
-d 358 15 5.0
-d 359 15 4.99999
-d 360 15 4.99999
-d 361 15 4.99999
-d 1 16 1.86175
-d 2 16 2.00199
-d 3 16 2.08919
-d 4 16 1.84314
-d 5 16 1.08254
-d 6 16 0.214737
-d 7 16 0.0377351
-d 8 16 0.00952455
-d 9 16 0.00232763
-d 10 16 0.000563614
-d 11 16 0.000263477
-d 12 16 0.000148642
-d 13 16 0.000285086
-d 14 16 0.000242592
-d 15 16 7.34699e-05
-d 16 16 -1.53467e-05
-d 17 16 -0.0161874
-d 18 16 -0.0157876
-d 19 16 -0.0141194
-d 20 16 0.0132576
-d 21 16 0.0903272
-d 22 16 0.109938
-d 23 16 0.0535295
-d 24 16 0.0224216
-d 25 16 0.00940945
-d 26 16 0.00466825
-d 27 16 -0.000649972
-d 28 16 -0.00654752
-d 29 16 -0.00333248
-d 30 16 -0.00103671
-d 31 16 -0.000508276
-d 32 16 -5.8896e-05
-d 33 16 -0.00043938
-d 34 16 -0.000544704
-d 35 16 -0.00044444
-d 36 16 -0.000307093
-d 37 16 -0.00024517
-d 38 16 -0.000154538
-d 39 16 -8.78602e-05
-d 40 16 -7.10461e-05
-d 41 16 -6.06485e-05
-d 42 16 -3.91039e-05
-d 43 16 -8.45988e-06
-d 44 16 9.43442e-06
-d 45 16 1.28351e-05
-d 46 16 -2.16734e-06
-d 47 16 -2.6142e-05
-d 48 16 -2.54768e-05
-d 49 16 -1.88997e-05
-d 50 16 -1.17906e-05
-d 51 16 -7.3808e-06
-d 52 16 -2.97101e-06
-d 53 16 1.19146e-07
-d 54 16 2.94246e-06
-d 55 16 5.38942e-06
-d 56 16 3.88851e-06
-d 57 16 2.38761e-06
-d 58 16 8.86704e-07
-d 59 16 -6.14201e-07
-d 60 16 -2.11511e-06
-d 61 16 -2.59565e-06
-d 62 16 -2.38885e-06
-d 63 16 -2.18205e-06
-d 64 16 -1.97525e-06
-d 65 16 -1.76845e-06
-d 66 16 -1.56241e-06
-d 67 16 -1.36258e-06
-d 68 16 -1.16276e-06
-d 69 16 -9.62939e-07
-d 70 16 -7.63116e-07
-d 71 16 -5.63293e-07
-d 72 16 -3.6347e-07
-d 73 16 -1.63647e-07
-d 74 16 3.61756e-08
-d 75 16 2.35999e-07
-d 76 16 4.35822e-07
-d 77 16 6.07653e-07
-d 78 16 5.90323e-07
-d 79 16 5.72994e-07
-d 80 16 5.55665e-07
-d 81 16 5.38336e-07
-d 82 16 5.21007e-07
-d 83 16 5.03678e-07
-d 84 16 4.86349e-07
-d 85 16 4.6902e-07
-d 86 16 4.51691e-07
-d 87 16 4.34361e-07
-d 88 16 4.11899e-07
-d 89 16 3.60315e-07
-d 90 16 3.08731e-07
-d 91 16 2.57146e-07
-d 92 16 2.05562e-07
-d 93 16 1.53977e-07
-d 94 16 1.02393e-07
-d 95 16 5.08082e-08
-d 96 16 -7.76222e-10
-d 97 16 -5.23607e-08
-d 98 16 -1.03945e-07
-d 99 16 -1.47815e-07
-d 100 16 -1.54225e-07
-d 101 16 -1.60635e-07
-d 102 16 -1.67045e-07
-d 103 16 -1.73455e-07
-d 104 16 -1.79864e-07
-d 105 16 -1.86274e-07
-d 106 16 -1.92684e-07
-d 107 16 -1.99094e-07
-d 108 16 -2.05504e-07
-d 109 16 -2.11914e-07
-d 110 16 -2.18324e-07
-d 111 16 -2.24734e-07
-d 112 16 -2.31144e-07
-d 113 16 -2.37554e-07
-d 114 16 -2.43964e-07
-d 115 16 -2.50373e-07
-d 116 16 -2.56783e-07
-d 117 16 -2.63193e-07
-d 118 16 -2.69603e-07
-d 119 16 -2.76013e-07
-d 120 16 -2.82423e-07
-d 121 16 2.92534e-06
-d 122 16 0.0446777
-d 123 16 0.024278
-d 124 16 -0.0518987
-d 125 16 -0.0636547
-d 126 16 0.00983929
-d 127 16 -0.000518204
-d 128 16 -0.000265194
-d 129 16 0.000154772
-d 130 16 0.000299538
-d 131 16 3.12715e-05
-d 132 16 -3.18225e-05
-d 133 16 -2.48268e-05
-d 134 16 -1.16701e-05
-d 135 16 -6.05117e-06
-d 136 16 7.61116e-06
-d 137 16 -0.0163668
-d 138 16 -0.0158244
-d 139 16 -0.0141177
-d 140 16 0.0100085
-d 141 16 0.0857144
-d 142 16 0.107784
-d 143 16 0.051862
-d 144 16 0.0204448
-d 145 16 0.00629858
-d 146 16 0.000967736
-d 147 16 0.00121674
-d 148 16 0.00190276
-d 149 16 0.00154009
-d 150 16 0.000860922
-d 151 16 0.000410386
-d 152 16 0.000164585
-d 153 16 3.99493e-05
-d 154 16 1.93797e-05
-d 155 16 5.67594e-05
-d 156 16 0.000110126
-d 157 16 2.49925e-05
-d 158 16 -7.17815e-05
-d 159 16 -0.000142299
-d 160 16 -1.63109e-05
-d 161 16 0.000439529
-d 162 16 0.000562489
-d 163 16 0.000594599
-d 164 16 0.000326164
-d 165 16 0.000126423
-d 166 16 -4.26063e-05
-d 167 16 -0.000122927
-d 168 16 -0.000114152
-d 169 16 -6.72706e-05
-d 170 16 -6.41242e-05
-d 171 16 -0.000135588
-d 172 16 2.61507e-05
-d 173 16 0.000134036
-d 174 16 6.43734e-06
-d 175 16 -4.6223e-05
-d 176 16 -0.000112047
-d 177 16 -0.000101388
-d 178 16 -8.67847e-05
-d 179 16 -0.000117664
-d 180 16 -0.000133957
-d 181 16 -0.000116558
-d 182 16 -0.000100873
-d 183 16 -7.65448e-05
-d 184 16 -4.44964e-05
-d 185 16 -3.6677e-05
-d 186 16 -5.26632e-05
-d 187 16 -5.45172e-05
-d 188 16 -5.13545e-05
-d 189 16 -3.73869e-05
-d 190 16 -1.99732e-05
-d 191 16 -1.0907e-05
-d 192 16 -1.10081e-05
-d 193 16 -3.02609e-05
-d 194 16 -5.18517e-05
-d 195 16 -6.13597e-05
-d 196 16 -5.30706e-05
-d 197 16 -2.39572e-05
-d 198 16 -3.24146e-05
-d 199 16 -5.70062e-05
-d 200 16 -0.000103448
-d 201 16 -0.000135376
-d 202 16 -0.0001024
-d 203 16 -2.39007e-05
-d 204 16 0.000110929
-d 205 16 0.000151226
-d 206 16 0.000142044
-d 207 16 0.000105922
-d 208 16 5.62834e-05
-d 209 16 4.78476e-05
-d 210 16 3.94117e-05
-d 211 16 3.09759e-05
-d 212 16 2.25401e-05
-d 213 16 1.41042e-05
-d 214 16 5.66837e-06
-d 215 16 -2.76747e-06
-d 216 16 -3.08639e-06
-d 217 16 -2.81341e-06
-d 218 16 -2.54043e-06
-d 219 16 -2.26745e-06
-d 220 16 -1.99447e-06
-d 221 16 -1.72149e-06
-d 222 16 -1.44851e-06
-d 223 16 -1.26226e-06
-d 224 16 -1.12096e-06
-d 225 16 -9.79661e-07
-d 226 16 -8.38363e-07
-d 227 16 -6.97065e-07
-d 228 16 -5.55768e-07
-d 229 16 -4.1447e-07
-d 230 16 -2.73173e-07
-d 231 16 -1.31875e-07
-d 232 16 9.42259e-09
-d 233 16 1.5072e-07
-d 234 16 2.92018e-07
-d 235 16 4.33315e-07
-d 236 16 5.74613e-07
-d 237 16 7.10363e-07
-d 238 16 8.01984e-07
-d 239 16 8.93604e-07
-d 240 16 9.85225e-07
-d 241 16 1.07685e-06
-d 242 16 0.04474
-d 243 16 0.0928765
-d 244 16 0.141327
-d 245 16 0.0176048
-d 246 16 -0.071675
-d 247 16 -0.0124613
-d 248 16 0.989022
-d 249 16 2.28104
-d 250 16 3.40619
-d 251 16 4.21417
-d 252 16 4.67173
-d 253 16 4.87438
-d 254 16 4.96044
-d 255 16 4.98996
-d 256 16 4.99858
-d 257 16 4.96672
-d 258 16 4.89502
-d 259 16 4.79391
-d 260 16 4.76433
-d 261 16 4.8387
-d 262 16 4.98612
-d 263 16 5.0161
-d 264 16 5.01722
-d 265 16 5.01437
-d 266 16 5.01256
-d 267 16 4.99827
-d 268 16 4.95807
-d 269 16 4.9209
-d 270 16 4.88217
-d 271 16 4.83006
-d 272 16 4.78461
-d 273 16 4.80759
-d 274 16 4.85548
-d 275 16 4.89604
-d 276 16 4.9254
-d 277 16 4.94617
-d 278 16 4.96126
-d 279 16 4.97374
-d 280 16 4.98255
-d 281 16 4.98792
-d 282 16 4.99126
-d 283 16 4.99361
-d 284 16 4.99554
-d 285 16 4.99699
-d 286 16 4.99792
-d 287 16 4.99846
-d 288 16 4.99881
-d 289 16 4.99905
-d 290 16 4.99924
-d 291 16 4.99938
-d 292 16 4.99949
-d 293 16 4.99955
-d 294 16 4.9997
-d 295 16 4.9998
-d 296 16 4.99982
-d 297 16 4.99982
-d 298 16 4.99982
-d 299 16 4.99982
-d 300 16 4.99982
-d 301 16 4.99983
-d 302 16 4.99984
-d 303 16 4.99985
-d 304 16 4.99986
-d 305 16 4.99987
-d 306 16 4.99988
-d 307 16 4.99989
-d 308 16 4.9999
-d 309 16 4.99992
-d 310 16 4.99993
-d 311 16 4.99994
-d 312 16 4.99995
-d 313 16 4.99995
-d 314 16 4.99996
-d 315 16 4.99996
-d 316 16 4.99998
-d 317 16 4.99999
-d 318 16 5.00001
-d 319 16 5.00002
-d 320 16 5.00002
-d 321 16 5.00001
-d 322 16 5.00001
-d 323 16 5.0
-d 324 16 4.99999
-d 325 16 4.99999
-d 326 16 4.99998
-d 327 16 4.99998
-d 328 16 4.99998
-d 329 16 4.99998
-d 330 16 4.99998
-d 331 16 4.99998
-d 332 16 4.99998
-d 333 16 4.99998
-d 334 16 4.99998
-d 335 16 4.99998
-d 336 16 4.99999
-d 337 16 4.99999
-d 338 16 4.99999
-d 339 16 4.99999
-d 340 16 5.0
-d 341 16 5.0
-d 342 16 5.0
-d 343 16 5.0
-d 344 16 5.0
-d 345 16 5.0
-d 346 16 5.00001
-d 347 16 5.00001
-d 348 16 5.00001
-d 349 16 5.00001
-d 350 16 5.00001
-d 351 16 5.00001
-d 352 16 5.00001
-d 353 16 5.00001
-d 354 16 5.00001
-d 355 16 5.00001
-d 356 16 5.00001
-d 357 16 5.00001
-d 358 16 5.00001
-d 359 16 5.00001
-d 360 16 5.00001
-d 361 16 5.00001
-d 1 17 1.86175
-d 2 17 1.73073
-d 3 17 1.50572
-d 4 17 1.89001
-d 5 17 3.39004
-d 6 17 4.36034
-d 7 17 4.79012
-d 8 17 4.93798
-d 9 17 4.98305
-d 10 17 4.99539
-d 11 17 4.9979
-d 12 17 4.99904
-d 13 17 4.99772
-d 14 17 4.9983
-d 15 17 4.99935
-d 16 17 4.99975
-d 17 17 4.98837
-d 18 17 4.99456
-d 19 17 4.99728
-d 20 17 5.01838
-d 21 17 5.04568
-d 22 17 5.00759
-d 23 17 4.98112
-d 24 17 4.98479
-d 25 17 4.99197
-d 26 17 4.99641
-d 27 17 4.99747
-d 28 17 4.99775
-d 29 17 5.00043
-d 30 17 5.0007
-d 31 17 5.00035
-d 32 17 5.00023
-d 33 17 4.99976
-d 34 17 5.00002
-d 35 17 5.00007
-d 36 17 5.0002
-d 37 17 4.99993
-d 38 17 5.00003
-d 39 17 5.00021
-d 40 17 5.00006
-d 41 17 4.99993
-d 42 17 4.99992
-d 43 17 5.00002
-d 44 17 5.00013
-d 45 17 5.00017
-d 46 17 5.00009
-d 47 17 4.99992
-d 48 17 4.99991
-d 49 17 4.99993
-d 50 17 4.99996
-d 51 17 4.99998
-d 52 17 4.99999
-d 53 17 5.00001
-d 54 17 5.00003
-d 55 17 5.00005
-d 56 17 5.00004
-d 57 17 5.00004
-d 58 17 5.00003
-d 59 17 5.00002
-d 60 17 5.00001
-d 61 17 5.0
-d 62 17 4.99999
-d 63 17 4.99999
-d 64 17 4.99998
-d 65 17 4.99998
-d 66 17 4.99997
-d 67 17 4.99997
-d 68 17 4.99998
-d 69 17 4.99998
-d 70 17 4.99998
-d 71 17 4.99998
-d 72 17 4.99999
-d 73 17 4.99999
-d 74 17 4.99999
-d 75 17 4.99999
-d 76 17 5.0
-d 77 17 5.0
-d 78 17 5.0
-d 79 17 5.0
-d 80 17 5.0
-d 81 17 5.0
-d 82 17 5.00001
-d 83 17 5.00001
-d 84 17 5.00001
-d 85 17 5.00001
-d 86 17 5.00001
-d 87 17 5.00001
-d 88 17 5.00002
-d 89 17 5.00001
-d 90 17 5.00001
-d 91 17 5.00001
-d 92 17 5.00001
-d 93 17 5.00001
-d 94 17 5.00001
-d 95 17 5.00001
-d 96 17 5.0
-d 97 17 5.0
-d 98 17 5.0
-d 99 17 5.0
-d 100 17 5.0
-d 101 17 5.0
-d 102 17 5.0
-d 103 17 5.0
-d 104 17 5.0
-d 105 17 5.0
-d 106 17 5.0
-d 107 17 5.0
-d 108 17 5.0
-d 109 17 5.0
-d 110 17 5.0
-d 111 17 5.0
-d 112 17 5.0
-d 113 17 4.99999
-d 114 17 4.99999
-d 115 17 4.99999
-d 116 17 4.99999
-d 117 17 4.99999
-d 118 17 4.99999
-d 119 17 4.99999
-d 120 17 4.99999
-d 121 17 5.0
-d 122 17 5.01498
-d 123 17 4.99342
-d 124 17 4.96899
-d 125 17 5.00301
-d 126 17 5.02627
-d 127 17 4.9977
-d 128 17 4.99548
-d 129 17 4.99757
-d 130 17 5.00277
-d 131 17 5.00245
-d 132 17 5.0014
-d 133 17 5.00069
-d 134 17 5.00032
-d 135 17 5.00014
-d 136 17 5.00009
-d 137 17 4.9867
-d 138 17 4.99262
-d 139 17 4.99607
-d 140 17 5.01805
-d 141 17 5.04713
-d 142 17 5.00927
-d 143 17 4.98184
-d 144 17 4.98483
-d 145 17 4.9914
-d 146 17 4.99616
-d 147 17 4.99902
-d 148 17 4.9999
-d 149 17 4.99987
-d 150 17 4.99979
-d 151 17 4.99981
-d 152 17 4.99989
-d 153 17 4.99994
-d 154 17 4.99998
-d 155 17 5.0002
-d 156 17 5.00001
-d 157 17 5.00008
-d 158 17 5.00008
-d 159 17 5.0001
-d 160 17 5.00021
-d 161 17 5.00032
-d 162 17 5.00025
-d 163 17 5.00019
-d 164 17 5.00006
-d 165 17 5.00007
-d 166 17 4.99994
-d 167 17 4.99997
-d 168 17 4.99999
-d 169 17 5.00023
-d 170 17 5.00008
-d 171 17 4.99993
-d 172 17 4.99998
-d 173 17 4.99986
-d 174 17 4.99982
-d 175 17 5.00003
-d 176 17 4.99985
-d 177 17 4.99996
-d 178 17 5.00014
-d 179 17 5.0
-d 180 17 4.99984
-d 181 17 4.99979
-d 182 17 4.99982
-d 183 17 4.99993
-d 184 17 5.00008
-d 185 17 5.00011
-d 186 17 5.00002
-d 187 17 4.99996
-d 188 17 4.9999
-d 189 17 4.99994
-d 190 17 5.00001
-d 191 17 5.00007
-d 192 17 5.00009
-d 193 17 4.99995
-d 194 17 4.99978
-d 195 17 4.99971
-d 196 17 4.99976
-d 197 17 4.99997
-d 198 17 4.99996
-d 199 17 4.99989
-d 200 17 4.99972
-d 201 17 4.99955
-d 202 17 4.99953
-d 203 17 4.99959
-d 204 17 4.99976
-d 205 17 4.9999
-d 206 17 5.00005
-d 207 17 5.00023
-d 208 17 5.00039
-d 209 17 5.00034
-d 210 17 5.00029
-d 211 17 5.00024
-d 212 17 5.00019
-d 213 17 5.00014
-d 214 17 5.00009
-d 215 17 5.00004
-d 216 17 5.00003
-d 217 17 5.00002
-d 218 17 5.00001
-d 219 17 5.0
-d 220 17 5.0
-d 221 17 4.99999
-d 222 17 4.99998
-d 223 17 4.99998
-d 224 17 4.99998
-d 225 17 4.99998
-d 226 17 4.99998
-d 227 17 4.99999
-d 228 17 4.99999
-d 229 17 4.99999
-d 230 17 4.99999
-d 231 17 4.99999
-d 232 17 4.99999
-d 233 17 4.99999
-d 234 17 5.0
-d 235 17 5.0
-d 236 17 5.0
-d 237 17 5.0
-d 238 17 5.00001
-d 239 17 5.00002
-d 240 17 5.00003
-d 241 17 5.00004
-d 242 17 5.01564
-d 243 17 5.03395
-d 244 17 5.04932
-d 245 17 5.11868
-d 246 17 3.92502
-d 247 17 1.31888
-d 248 17 0.163888
-d 249 17 0.0946876
-d 250 17 0.0789578
-d 251 17 0.0565084
-d 252 17 0.0260333
-d 253 17 0.0156986
-d 254 17 0.00907667
-d 255 17 0.00613629
-d 256 17 0.00468417
-d 257 17 -0.00174008
-d 258 17 -0.0021422
-d 259 17 0.000586962
-d 260 17 0.0124937
-d 261 17 0.0147977
-d 262 17 0.00838454
-d 263 17 0.00039383
-d 264 17 -0.000522021
-d 265 17 -0.000426598
-d 266 17 -0.000290214
-d 267 17 -0.00173713
-d 268 17 -0.00384132
-d 269 17 -0.00382945
-d 270 17 -0.00429219
-d 271 17 -0.00580193
-d 272 17 -0.00393246
-d 273 17 0.0017543
-d 274 17 0.00423045
-d 275 17 0.00408931
-d 276 17 0.0031976
-d 277 17 0.00245457
-d 278 17 0.00187293
-d 279 17 0.00159068
-d 280 17 0.00105697
-d 281 17 0.000609902
-d 282 17 0.000358825
-d 283 17 0.000334125
-d 284 17 0.000212708
-d 285 17 0.000168116
-d 286 17 8.97349e-05
-d 287 17 5.21578e-05
-d 288 17 3.84527e-05
-d 289 17 2.93033e-05
-d 290 17 2.10067e-05
-d 291 17 1.59954e-05
-d 292 17 1.13917e-05
-d 293 17 5.49738e-06
-d 294 17 2.77217e-05
-d 295 17 6.51259e-06
-d 296 17 -6.65468e-06
-d 297 17 2.09837e-06
-d 298 17 -6.617e-06
-d 299 17 -4.80187e-06
-d 300 17 1.55031e-06
-d 301 17 4.26536e-06
-d 302 17 7.69457e-07
-d 303 17 -1.46213e-06
-d 304 17 -7.25202e-07
-d 305 17 3.26501e-06
-d 306 17 6.55807e-06
-d 307 17 7.524e-06
-d 308 17 6.07209e-06
-d 309 17 6.00701e-06
-d 310 17 5.41166e-06
-d 311 17 3.86573e-06
-d 312 17 1.10651e-06
-d 313 17 -2.74603e-06
-d 314 17 -2.18566e-06
-d 315 17 2.3658e-06
-d 316 17 8.59956e-06
-d 317 17 8.35046e-06
-d 318 17 2.90621e-06
-d 319 17 -8.75982e-07
-d 320 17 -1.87189e-06
-d 321 17 -2.1528e-06
-d 322 17 -1.94875e-06
-d 323 17 -1.74471e-06
-d 324 17 -1.54067e-06
-d 325 17 -1.33662e-06
-d 326 17 -1.13258e-06
-d 327 17 -8.40567e-07
-d 328 17 -5.20743e-07
-d 329 17 -2.00918e-07
-d 330 17 1.18906e-07
-d 331 17 4.38731e-07
-d 332 17 6.11382e-07
-d 333 17 6.01529e-07
-d 334 17 5.91675e-07
-d 335 17 5.81822e-07
-d 336 17 5.71968e-07
-d 337 17 5.62115e-07
-d 338 17 5.52261e-07
-d 339 17 5.42407e-07
-d 340 17 5.32554e-07
-d 341 17 5.227e-07
-d 342 17 5.12847e-07
-d 343 17 4.72812e-07
-d 344 17 4.26137e-07
-d 345 17 3.79462e-07
-d 346 17 3.32786e-07
-d 347 17 2.86111e-07
-d 348 17 2.39436e-07
-d 349 17 1.92761e-07
-d 350 17 1.46086e-07
-d 351 17 9.94107e-08
-d 352 17 5.27356e-08
-d 353 17 -2.77779e-10
-d 354 17 -7.98079e-08
-d 355 17 -1.59338e-07
-d 356 17 -2.38868e-07
-d 357 17 -3.18398e-07
-d 358 17 -3.97928e-07
-d 359 17 -4.77458e-07
-d 360 17 -5.56988e-07
-d 361 17 -6.36519e-07
-d 1 18 5.0
-d 2 18 5.16963
-d 3 18 4.84136
-d 4 18 3.33754
-d 5 18 0.316206
-d 6 18 0.103113
-d 7 18 0.0273341
-d 8 18 0.0221102
-d 9 18 0.0177008
-d 10 18 0.0143758
-d 11 18 0.0115203
-d 12 18 0.00929231
-d 13 18 0.00752716
-d 14 18 0.00625439
-d 15 18 0.00489872
-d 16 18 0.00403656
-d 17 18 -0.0657317
-d 18 18 -0.0256467
-d 19 18 0.165394
-d 20 18 0.985963
-d 21 18 3.05067
-d 22 18 4.55799
-d 23 18 4.89728
-d 24 18 4.92464
-d 25 18 4.8882
-d 26 18 4.90592
-d 27 18 4.97315
-d 28 18 4.99241
-d 29 18 4.99694
-d 30 18 4.99845
-d 31 18 4.99905
-d 32 18 4.99939
-d 33 18 4.99959
-d 34 18 4.99971
-d 35 18 4.9998
-d 36 18 4.99986
-d 37 18 4.9999
-d 38 18 4.99993
-d 39 18 4.99995
-d 40 18 4.99996
-d 41 18 4.99997
-d 42 18 4.99998
-d 43 18 4.99998
-d 44 18 4.99999
-d 45 18 4.99999
-d 46 18 4.99999
-d 47 18 4.99999
-d 48 18 4.99999
-d 49 18 5.0
-d 50 18 5.00001
-d 51 18 5.00003
-d 52 18 5.00005
-d 53 18 5.00004
-d 54 18 5.00002
-d 55 18 5.0
-d 56 18 4.99999
-d 57 18 4.99999
-d 58 18 4.99998
-d 59 18 4.99998
-d 60 18 4.99997
-d 61 18 4.99997
-d 62 18 4.99998
-d 63 18 4.99998
-d 64 18 4.99999
-d 65 18 4.99999
-d 66 18 5.0
-d 67 18 5.0
-d 68 18 5.0
-d 69 18 5.0
-d 70 18 5.0
-d 71 18 5.00001
-d 72 18 5.00001
-d 73 18 5.00001
-d 74 18 5.00001
-d 75 18 5.00001
-d 76 18 5.00001
-d 77 18 5.00002
-d 78 18 5.00001
-d 79 18 5.00001
-d 80 18 5.00001
-d 81 18 5.00001
-d 82 18 5.00001
-d 83 18 5.00001
-d 84 18 5.00001
-d 85 18 5.0
-d 86 18 5.0
-d 87 18 5.0
-d 88 18 5.0
-d 89 18 5.0
-d 90 18 5.0
-d 91 18 5.0
-d 92 18 4.99999
-d 93 18 4.99999
-d 94 18 4.99999
-d 95 18 4.99999
-d 96 18 4.99999
-d 97 18 4.99999
-d 98 18 4.99998
-d 99 18 4.99998
-d 100 18 4.99998
-d 101 18 4.99999
-d 102 18 4.99999
-d 103 18 4.99999
-d 104 18 4.99999
-d 105 18 4.99999
-d 106 18 4.99999
-d 107 18 4.99999
-d 108 18 4.99999
-d 109 18 4.99999
-d 110 18 4.99999
-d 111 18 4.99999
-d 112 18 4.99999
-d 113 18 4.99999
-d 114 18 4.99999
-d 115 18 5.0
-d 116 18 5.0
-d 117 18 5.0
-d 118 18 5.0
-d 119 18 5.0
-d 120 18 5.0
-d 121 18 5.00025
-d 122 18 5.1657
-d 123 18 4.69981
-d 124 18 2.43895
-d 125 18 0.0229743
-d 126 18 0.0351406
-d 127 18 -0.0211974
-d 128 18 -0.0312063
-d 129 18 -0.0160331
-d 130 18 -0.0021718
-d 131 18 -0.000766597
-d 132 18 -0.000251052
-d 133 18 -5.49363e-05
-d 134 18 -3.36364e-06
-d 135 18 -2.01983e-06
-d 136 18 -9.70575e-06
-d 137 18 -0.0657007
-d 138 18 -0.0205247
-d 139 18 0.183332
-d 140 18 1.07163
-d 141 18 3.11839
-d 142 18 4.46213
-d 143 18 4.84163
-d 144 18 4.95195
-d 145 18 4.99159
-d 146 18 5.02084
-d 147 18 5.04029
-d 148 18 5.04138
-d 149 18 5.0271
-d 150 18 5.00445
-d 151 18 4.97957
-d 152 18 4.95702
-d 153 18 4.95231
-d 154 18 4.97819
-d 155 18 4.99191
-d 156 18 4.9963
-d 157 18 4.99822
-d 158 18 4.99878
-d 159 18 4.99903
-d 160 18 4.99925
-d 161 18 4.99942
-d 162 18 4.9995
-d 163 18 4.99954
-d 164 18 4.99957
-d 165 18 4.99961
-d 166 18 4.99966
-d 167 18 4.9997
-d 168 18 4.99974
-d 169 18 4.99977
-d 170 18 4.99981
-d 171 18 4.99983
-d 172 18 4.99986
-d 173 18 4.99988
-d 174 18 4.9999
-d 175 18 4.99991
-d 176 18 4.99992
-d 177 18 4.99994
-d 178 18 4.99995
-d 179 18 4.99995
-d 180 18 4.99996
-d 181 18 4.99997
-d 182 18 4.99997
-d 183 18 4.99998
-d 184 18 4.99998
-d 185 18 4.99998
-d 186 18 4.99999
-d 187 18 4.99999
-d 188 18 4.99999
-d 189 18 4.99999
-d 190 18 4.99999
-d 191 18 4.99999
-d 192 18 4.99999
-d 193 18 5.0
-d 194 18 5.0
-d 195 18 5.0
-d 196 18 5.0
-d 197 18 5.0
-d 198 18 5.0
-d 199 18 5.0
-d 200 18 5.0
-d 201 18 5.0
-d 202 18 5.0
-d 203 18 5.0
-d 204 18 5.0
-d 205 18 5.0
-d 206 18 5.0
-d 207 18 5.0
-d 208 18 5.0
-d 209 18 5.0
-d 210 18 5.0
-d 211 18 5.0
-d 212 18 5.0
-d 213 18 5.0
-d 214 18 5.0
-d 215 18 5.0
-d 216 18 5.0
-d 217 18 5.00001
-d 218 18 5.00001
-d 219 18 5.00001
-d 220 18 5.00002
-d 221 18 5.00002
-d 222 18 5.00002
-d 223 18 5.00002
-d 224 18 5.00002
-d 225 18 5.00002
-d 226 18 5.00002
-d 227 18 5.00002
-d 228 18 5.00001
-d 229 18 5.00001
-d 230 18 5.00001
-d 231 18 5.00001
-d 232 18 5.00001
-d 233 18 5.00001
-d 234 18 5.00001
-d 235 18 5.0
-d 236 18 5.0
-d 237 18 5.0
-d 238 18 4.99999
-d 239 18 4.99998
-d 240 18 4.99997
-d 241 18 4.99996
-d 242 18 5.14239
-d 243 18 4.76219
-d 244 18 3.16574
-d 245 18 0.299969
-d 246 18 0.0631609
-d 247 18 -0.00118611
-d 248 18 -0.00026052
-d 249 18 -5.96333e-05
-d 250 18 -1.44904e-05
-d 251 18 -4.3859e-06
-d 252 18 -2.99454e-06
-d 253 18 1.10547e-06
-d 254 18 4.84662e-06
-d 255 18 1.30971e-05
-d 256 18 2.23082e-05
-d 257 18 -0.0655844
-d 258 18 -0.0204818
-d 259 18 0.182507
-d 260 18 1.05954
-d 261 18 3.12277
-d 262 18 4.46735
-d 263 18 4.83915
-d 264 18 4.94512
-d 265 18 4.97679
-d 266 18 4.98654
-d 267 18 4.9966
-d 268 18 5.00833
-d 269 18 5.00776
-d 270 18 5.00432
-d 271 18 5.00199
-d 272 18 5.00086
-d 273 18 5.00033
-d 274 18 5.00008
-d 275 18 5.0
-d 276 18 5.00001
-d 277 18 5.0
-d 278 18 5.00005
-d 279 18 5.00002
-d 280 18 4.99981
-d 281 18 4.99991
-d 282 18 4.99998
-d 283 18 4.99979
-d 284 18 4.99979
-d 285 18 4.99984
-d 286 18 4.9998
-d 287 18 4.9998
-d 288 18 5.00006
-d 289 18 5.00002
-d 290 18 5.00001
-d 291 18 5.0
-d 292 18 5.0
-d 293 18 4.99992
-d 294 18 4.99998
-d 295 18 4.99999
-d 296 18 5.00002
-d 297 18 5.00014
-d 298 18 4.99999
-d 299 18 4.99987
-d 300 18 4.99993
-d 301 18 5.00003
-d 302 18 5.00011
-d 303 18 5.00005
-d 304 18 4.99996
-d 305 18 4.99987
-d 306 18 4.99985
-d 307 18 4.99994
-d 308 18 5.00009
-d 309 18 5.0001
-d 310 18 5.0
-d 311 18 4.99993
-d 312 18 4.99997
-d 313 18 5.00008
-d 314 18 5.00015
-d 315 18 5.00021
-d 316 18 5.00021
-d 317 18 5.00007
-d 318 18 4.99978
-d 319 18 4.99965
-d 320 18 4.99973
-d 321 18 4.9999
-d 322 18 4.99992
-d 323 18 4.99995
-d 324 18 4.99997
-d 325 18 4.99999
-d 326 18 5.00001
-d 327 18 5.00002
-d 328 18 5.00001
-d 329 18 5.00001
-d 330 18 5.00001
-d 331 18 5.0
-d 332 18 5.0
-d 333 18 5.0
-d 334 18 5.0
-d 335 18 5.0
-d 336 18 4.99999
-d 337 18 4.99999
-d 338 18 4.99999
-d 339 18 4.99999
-d 340 18 4.99999
-d 341 18 4.99999
-d 342 18 4.99998
-d 343 18 4.99998
-d 344 18 4.99999
-d 345 18 4.99999
-d 346 18 4.99999
-d 347 18 4.99999
-d 348 18 4.99999
-d 349 18 4.99999
-d 350 18 4.99999
-d 351 18 5.0
-d 352 18 5.0
-d 353 18 5.0
-d 354 18 5.0
-d 355 18 5.0
-d 356 18 5.00001
-d 357 18 5.00001
-d 358 18 5.00001
-d 359 18 5.00002
-d 360 18 5.00002
-d 361 18 5.00002
-d 1 19 5.0
-d 2 19 5.0333
-d 3 19 5.02472
-d 4 19 4.92559
-d 5 19 4.18383
-d 6 19 3.93923
-d 7 19 3.9961
-d 8 19 4.14293
-d 9 19 4.28591
-d 10 19 4.41336
-d 11 19 4.52157
-d 12 19 4.61101
-d 13 19 4.68472
-d 14 19 4.7439
-d 15 19 4.79294
-d 16 19 4.83239
-d 17 19 4.80697
-d 18 19 4.78808
-d 19 19 4.79322
-d 20 19 4.8838
-d 21 19 5.08529
-d 22 19 5.21863
-d 23 19 4.88852
-d 24 19 3.90198
-d 25 19 2.14586
-d 26 19 0.383977
-d 27 19 0.101103
-d 28 19 0.0525711
-d 29 19 0.0318287
-d 30 19 0.020895
-d 31 19 0.0146908
-d 32 19 0.010831
-d 33 19 0.00830272
-d 34 19 0.00656377
-d 35 19 0.00532066
-d 36 19 0.00440078
-d 37 19 0.00369956
-d 38 19 0.00315713
-d 39 19 0.00272614
-d 40 19 0.00237965
-d 41 19 0.00209659
-d 42 19 0.00186339
-d 43 19 0.00167014
-d 44 19 0.0015081
-d 45 19 0.00137172
-d 46 19 0.00125607
-d 47 19 0.00115393
-d 48 19 0.00106076
-d 49 19 0.000980166
-d 50 19 0.000918015
-d 51 19 0.000862837
-d 52 19 0.00080766
-d 53 19 0.000763488
-d 54 19 0.000721541
-d 55 19 0.000680825
-d 56 19 0.000653026
-d 57 19 0.000625226
-d 58 19 0.000597426
-d 59 19 0.000569627
-d 60 19 0.000541827
-d 61 19 0.000519087
-d 62 19 0.000499756
-d 63 19 0.000480424
-d 64 19 0.000461093
-d 65 19 0.000441761
-d 66 19 0.000423291
-d 67 19 0.000411941
-d 68 19 0.00040059
-d 69 19 0.00038924
-d 70 19 0.000377889
-d 71 19 0.000366539
-d 72 19 0.000355188
-d 73 19 0.000343838
-d 74 19 0.000332487
-d 75 19 0.000321137
-d 76 19 0.000309786
-d 77 19 0.000299055
-d 78 19 0.000292509
-d 79 19 0.000285963
-d 80 19 0.000279417
-d 81 19 0.000272871
-d 82 19 0.000266325
-d 83 19 0.000259779
-d 84 19 0.000253233
-d 85 19 0.000246686
-d 86 19 0.00024014
-d 87 19 0.000233594
-d 88 19 0.000227387
-d 89 19 0.0002231
-d 90 19 0.000218813
-d 91 19 0.000214526
-d 92 19 0.00021024
-d 93 19 0.000205953
-d 94 19 0.000201666
-d 95 19 0.000197379
-d 96 19 0.000193092
-d 97 19 0.000188805
-d 98 19 0.000184519
-d 99 19 0.000180526
-d 100 19 0.000177963
-d 101 19 0.0001754
-d 102 19 0.000172837
-d 103 19 0.000170274
-d 104 19 0.000167711
-d 105 19 0.000165148
-d 106 19 0.000162585
-d 107 19 0.000160022
-d 108 19 0.000157459
-d 109 19 0.000154895
-d 110 19 0.000152332
-d 111 19 0.000149769
-d 112 19 0.000147206
-d 113 19 0.000144643
-d 114 19 0.00014208
-d 115 19 0.000139517
-d 116 19 0.000136954
-d 117 19 0.000134391
-d 118 19 0.000131828
-d 119 19 0.000129265
-d 120 19 0.000126702
-d 121 19 0.000132838
-d 122 19 0.0311184
-d 123 19 0.163151
-d 124 19 0.34986
-d 125 19 0.604501
-d 126 19 0.357125
-d 127 19 0.136137
-d 128 19 0.0711304
-d 129 19 0.0346959
-d 130 19 0.0212674
-d 131 19 0.00872193
-d 132 19 0.00252206
-d 133 19 0.000455269
-d 134 19 7.59332e-05
-d 135 19 2.91532e-05
-d 136 19 0.000320562
-d 137 19 -0.0720911
-d 138 19 -0.0840491
-d 139 19 -0.0791345
-d 140 19 -0.0404143
-d 141 19 0.0182035
-d 142 19 -0.0235871
-d 143 19 -0.0426072
-d 144 19 -0.0597501
-d 145 19 0.00824773
-d 146 19 0.481404
-d 147 19 1.32496
-d 148 19 2.11949
-d 149 19 2.57317
-d 150 19 2.58202
-d 151 19 2.15054
-d 152 19 1.33786
-d 153 19 0.45702
-d 154 19 0.153772
-d 155 19 0.0913584
-d 156 19 0.0604989
-d 157 19 0.0421591
-d 158 19 0.0271456
-d 159 19 0.0170021
-d 160 19 0.0115815
-d 161 19 0.00907886
-d 162 19 0.00742466
-d 163 19 0.00626096
-d 164 19 0.00531127
-d 165 19 0.00450501
-d 166 19 0.00381927
-d 167 19 0.00323718
-d 168 19 0.00274374
-d 169 19 0.00232494
-d 170 19 0.00196885
-d 171 19 0.00166686
-d 172 19 0.00141134
-d 173 19 0.00119437
-d 174 19 0.0010109
-d 175 19 0.000855534
-d 176 19 0.000723378
-d 177 19 0.000611408
-d 178 19 0.000516704
-d 179 19 0.000436769
-d 180 19 0.000369523
-d 181 19 0.000313026
-d 182 19 0.00026526
-d 183 19 0.000223976
-d 184 19 0.000188972
-d 185 19 0.000159042
-d 186 19 0.000134148
-d 187 19 0.000112688
-d 188 19 9.49738e-05
-d 189 19 7.97877e-05
-d 190 19 6.721e-05
-d 191 19 5.65115e-05
-d 192 19 4.77194e-05
-d 193 19 4.03591e-05
-d 194 19 3.42848e-05
-d 195 19 2.92627e-05
-d 196 19 2.50435e-05
-d 197 19 2.1412e-05
-d 198 19 1.84532e-05
-d 199 19 1.58624e-05
-d 200 19 1.34673e-05
-d 201 19 1.14461e-05
-d 202 19 1.00935e-05
-d 203 19 9.12375e-06
-d 204 19 8.50202e-06
-d 205 19 7.81431e-06
-d 206 19 7.20729e-06
-d 207 19 6.73936e-06
-d 208 19 6.3702e-06
-d 209 19 5.90049e-06
-d 210 19 5.43077e-06
-d 211 19 4.96105e-06
-d 212 19 4.49133e-06
-d 213 19 4.02162e-06
-d 214 19 3.5519e-06
-d 215 19 3.08218e-06
-d 216 19 2.79099e-06
-d 217 19 2.51281e-06
-d 218 19 2.23463e-06
-d 219 19 1.95645e-06
-d 220 19 1.67827e-06
-d 221 19 1.40009e-06
-d 222 19 1.12191e-06
-d 223 19 1.01376e-06
-d 224 19 9.9375e-07
-d 225 19 9.73741e-07
-d 226 19 9.53733e-07
-d 227 19 9.33724e-07
-d 228 19 9.13715e-07
-d 229 19 8.93707e-07
-d 230 19 8.73698e-07
-d 231 19 8.5369e-07
-d 232 19 8.33681e-07
-d 233 19 8.13673e-07
-d 234 19 7.93664e-07
-d 235 19 7.73655e-07
-d 236 19 7.53647e-07
-d 237 19 7.21781e-07
-d 238 19 5.956e-07
-d 239 19 4.69419e-07
-d 240 19 3.43239e-07
-d 241 19 2.17058e-07
-d 242 19 0.0284032
-d 243 19 0.0374438
-d 244 19 -0.0157543
-d 245 19 -0.0680497
-d 246 19 0.0504768
-d 247 19 0.0100294
-d 248 19 0.00222261
-d 249 19 0.000528697
-d 250 19 0.000132929
-d 251 19 3.99489e-05
-d 252 19 2.46066e-05
-d 253 19 4.56327e-06
-d 254 19 -6.54853e-06
-d 255 19 1.33783e-05
-d 256 19 -3.68221e-05
-d 257 19 -0.0724498
-d 258 19 -0.0843663
-d 259 19 -0.0792935
-d 260 19 -0.0406426
-d 261 19 0.0200019
-d 262 19 0.0426259
-d 263 19 0.0220753
-d 264 19 0.00668555
-d 265 19 -0.000968483
-d 266 19 0.024662
-d 267 19 0.0383437
-d 268 19 0.0911513
-d 269 19 0.087848
-d 270 19 0.0602076
-d 271 19 0.0390559
-d 272 19 0.0260573
-d 273 19 0.0180444
-d 274 19 0.012974
-d 275 19 0.00985409
-d 276 19 0.00788132
-d 277 19 0.0064228
-d 278 19 0.005545
-d 279 19 0.00453571
-d 280 19 0.00364245
-d 281 19 0.00310278
-d 282 19 0.00270523
-d 283 19 0.00236439
-d 284 19 0.0020945
-d 285 19 0.00186808
-d 286 19 0.00167493
-d 287 19 0.00151731
-d 288 19 0.00138594
-d 289 19 0.00126945
-d 290 19 0.00116695
-d 291 19 0.0010762
-d 292 19 0.000996366
-d 293 19 0.000928387
-d 294 19 0.000864414
-d 295 19 0.000808258
-d 296 19 0.000759574
-d 297 19 0.000713865
-d 298 19 0.000666712
-d 299 19 0.000632716
-d 300 19 0.000601262
-d 301 19 0.000572163
-d 302 19 0.000543986
-d 303 19 0.000515253
-d 304 19 0.0004897
-d 305 19 0.000468112
-d 306 19 0.000449313
-d 307 19 0.000432981
-d 308 19 0.000417911
-d 309 19 0.000401307
-d 310 19 0.000382712
-d 311 19 0.000366678
-d 312 19 0.000355736
-d 313 19 0.000349171
-d 314 19 0.000335727
-d 315 19 0.000317091
-d 316 19 0.000296086
-d 317 19 0.000283543
-d 318 19 0.000277366
-d 319 19 0.000272233
-d 320 19 0.000267001
-d 321 19 0.000263147
-d 322 19 0.000256699
-d 323 19 0.000250251
-d 324 19 0.000243803
-d 325 19 0.000237355
-d 326 19 0.000230907
-d 327 19 0.000225424
-d 328 19 0.000220247
-d 329 19 0.000215069
-d 330 19 0.000209892
-d 331 19 0.000204714
-d 332 19 0.000200213
-d 333 19 0.000196548
-d 334 19 0.000192884
-d 335 19 0.00018922
-d 336 19 0.000185556
-d 337 19 0.000181892
-d 338 19 0.000178228
-d 339 19 0.000174564
-d 340 19 0.0001709
-d 341 19 0.000167236
-d 342 19 0.000163572
-d 343 19 0.000160824
-d 344 19 0.000158279
-d 345 19 0.000155733
-d 346 19 0.000153187
-d 347 19 0.000150641
-d 348 19 0.000148095
-d 349 19 0.000145549
-d 350 19 0.000143003
-d 351 19 0.000140457
-d 352 19 0.000137911
-d 353 19 0.000135457
-d 354 19 0.000133386
-d 355 19 0.000131315
-d 356 19 0.000129245
-d 357 19 0.000127174
-d 358 19 0.000125103
-d 359 19 0.000123032
-d 360 19 0.000120961
-d 361 19 0.000118891
-d 1 20 1.86175
-d 2 20 1.99994
-d 3 20 2.0833
-d 4 20 2.01627
-d 5 20 2.42503
-d 6 20 3.25769
-d 7 20 3.62134
-d 8 20 3.88827
-d 9 20 4.09688
-d 10 20 4.26773
-d 11 20 4.40529
-d 12 20 4.51734
-d 13 20 4.60827
-d 14 20 4.68313
-d 15 20 4.74346
-d 16 20 4.79302
-d 17 20 4.72815
-d 18 20 4.68959
-d 19 20 4.70421
-d 20 20 4.81316
-d 21 20 5.01375
-d 22 20 5.14493
-d 23 20 5.10305
-d 24 20 5.0699
-d 25 20 5.04484
-d 26 20 5.03751
-d 27 20 5.03348
-d 28 20 5.02504
-d 29 20 5.01799
-d 30 20 5.01271
-d 31 20 5.00895
-d 32 20 5.00628
-d 33 20 5.0044
-d 34 20 5.00309
-d 35 20 5.00216
-d 36 20 5.00151
-d 37 20 5.00105
-d 38 20 5.00073
-d 39 20 5.00051
-d 40 20 5.00034
-d 41 20 5.00023
-d 42 20 5.00015
-d 43 20 5.0001
-d 44 20 5.00007
-d 45 20 5.00003
-d 46 20 4.99998
-d 47 20 4.99993
-d 48 20 4.99993
-d 49 20 4.99995
-d 50 20 4.99999
-d 51 20 5.00001
-d 52 20 5.00003
-d 53 20 5.00002
-d 54 20 5.00001
-d 55 20 5.0
-d 56 20 5.0
-d 57 20 5.0
-d 58 20 5.0
-d 59 20 4.99999
-d 60 20 4.99999
-d 61 20 4.99999
-d 62 20 5.0
-d 63 20 5.0
-d 64 20 5.0
-d 65 20 5.0
-d 66 20 5.0
-d 67 20 5.0
-d 68 20 5.0
-d 69 20 5.0
-d 70 20 5.0
-d 71 20 5.0
-d 72 20 5.0
-d 73 20 5.0
-d 74 20 5.0
-d 75 20 5.0
-d 76 20 5.0
-d 77 20 5.0
-d 78 20 5.0
-d 79 20 5.0
-d 80 20 5.0
-d 81 20 5.0
-d 82 20 5.0
-d 83 20 5.0
-d 84 20 5.0
-d 85 20 5.0
-d 86 20 5.0
-d 87 20 5.0
-d 88 20 5.0
-d 89 20 5.0
-d 90 20 5.0
-d 91 20 5.0
-d 92 20 5.0
-d 93 20 5.0
-d 94 20 5.0
-d 95 20 5.0
-d 96 20 5.0
-d 97 20 5.0
-d 98 20 5.0
-d 99 20 5.0
-d 100 20 5.0
-d 101 20 5.0
-d 102 20 5.0
-d 103 20 5.0
-d 104 20 5.0
-d 105 20 5.0
-d 106 20 5.0
-d 107 20 5.0
-d 108 20 5.0
-d 109 20 5.0
-d 110 20 5.0
-d 111 20 5.0
-d 112 20 5.0
-d 113 20 5.0
-d 114 20 5.0
-d 115 20 5.0
-d 116 20 5.0
-d 117 20 5.0
-d 118 20 5.0
-d 119 20 5.0
-d 120 20 5.0
-d 121 20 5.00017
-d 122 20 5.17398
-d 123 20 4.94779
-d 124 20 3.78508
-d 125 20 1.52302
-d 126 20 0.608808
-d 127 20 0.244311
-d 128 20 0.126053
-d 129 20 0.0597175
-d 130 20 0.038422
-d 131 20 0.0158174
-d 132 20 0.00481338
-d 133 20 0.00107847
-d 134 20 0.000301256
-d 135 20 0.000114861
-d 136 20 0.00059489
-d 137 20 -0.118904
-d 138 20 -0.147478
-d 139 20 -0.158986
-d 140 20 -0.080544
-d 141 20 0.165361
-d 142 20 0.171378
-d 143 20 0.0776087
-d 144 20 0.0435738
-d 145 20 0.0428235
-d 146 20 0.0423755
-d 147 20 0.0347695
-d 148 20 0.0225061
-d 149 20 0.0155539
-d 150 20 0.0121357
-d 151 20 0.0107997
-d 152 20 0.0103976
-d 153 20 0.0124406
-d 154 20 0.016814
-d 155 20 0.0167556
-d 156 20 0.0149852
-d 157 20 0.01459
-d 158 20 0.0141182
-d 159 20 0.0131934
-d 160 20 0.0120286
-d 161 20 0.0108692
-d 162 20 0.0097184
-d 163 20 0.00855881
-d 164 20 0.00744912
-d 165 20 0.00643877
-d 166 20 0.00554044
-d 167 20 0.00475165
-d 168 20 0.00406535
-d 169 20 0.00347158
-d 170 20 0.00295981
-d 171 20 0.00251995
-d 172 20 0.00214318
-d 173 20 0.00182101
-d 174 20 0.00154613
-d 175 20 0.00131196
-d 176 20 0.0011119
-d 177 20 0.000941587
-d 178 20 0.000796999
-d 179 20 0.000674582
-d 180 20 0.000571283
-d 181 20 0.000484276
-d 182 20 0.000410649
-d 183 20 0.000347005
-d 184 20 0.000292984
-d 185 20 0.000246715
-d 186 20 0.000208143
-d 187 20 0.00017489
-d 188 20 0.000147412
-d 189 20 0.000123854
-d 190 20 0.000104332
-d 191 20 8.77229e-05
-d 192 20 7.40686e-05
-d 193 20 6.2637e-05
-d 194 20 5.32e-05
-d 195 20 4.53946e-05
-d 196 20 3.88343e-05
-d 197 20 3.31864e-05
-d 198 20 2.85905e-05
-d 199 20 2.45725e-05
-d 200 20 2.08671e-05
-d 201 20 1.77301e-05
-d 202 20 1.55911e-05
-d 203 20 1.40153e-05
-d 204 20 1.29421e-05
-d 205 20 1.18693e-05
-d 206 20 1.09815e-05
-d 207 20 1.03484e-05
-d 208 20 9.87664e-06
-d 209 20 9.14446e-06
-d 210 20 8.41228e-06
-d 211 20 7.68011e-06
-d 212 20 6.94793e-06
-d 213 20 6.21575e-06
-d 214 20 5.48357e-06
-d 215 20 4.7514e-06
-d 216 20 4.38454e-06
-d 217 20 4.04432e-06
-d 218 20 3.7041e-06
-d 219 20 3.36388e-06
-d 220 20 3.02366e-06
-d 221 20 2.68344e-06
-d 222 20 2.34322e-06
-d 223 20 2.15196e-06
-d 224 20 2.03791e-06
-d 225 20 1.92386e-06
-d 226 20 1.80982e-06
-d 227 20 1.69577e-06
-d 228 20 1.58173e-06
-d 229 20 1.46768e-06
-d 230 20 1.35363e-06
-d 231 20 1.23959e-06
-d 232 20 1.12554e-06
-d 233 20 1.0115e-06
-d 234 20 8.9745e-07
-d 235 20 7.83404e-07
-d 236 20 6.69358e-07
-d 237 20 4.76113e-07
-d 238 20 -3.47071e-07
-d 239 20 -1.17025e-06
-d 240 20 -1.99344e-06
-d 241 20 -2.81662e-06
-d 242 20 0.0783754
-d 243 20 0.0500262
-d 244 20 -0.0659563
-d 245 20 -0.120914
-d 246 20 0.0815957
-d 247 20 0.0154255
-d 248 20 0.00347177
-d 249 20 0.000840357
-d 250 20 0.000214582
-d 251 20 6.54655e-05
-d 252 20 3.91709e-05
-d 253 20 8.07396e-06
-d 254 20 -4.44265e-07
-d 255 20 1.74384e-05
-d 256 20 -4.52725e-05
-d 257 20 -0.119379
-d 258 20 -0.147984
-d 259 20 -0.159247
-d 260 20 -0.0824604
-d 261 20 0.169014
-d 262 20 0.177628
-d 263 20 0.0758742
-d 264 20 0.010558
-d 265 20 -0.0346506
-d 266 20 -0.0710288
-d 267 20 -0.0838952
-d 268 20 -0.0599521
-d 269 20 -0.034568
-d 270 20 -0.0181615
-d 271 20 -0.00968034
-d 272 20 -0.00547115
-d 273 20 -0.00333511
-d 274 20 -0.00232468
-d 275 20 -0.00181159
-d 276 20 -0.00143841
-d 277 20 -0.00116601
-d 278 20 -0.000839755
-d 279 20 -0.000569764
-d 280 20 -0.000578683
-d 281 20 -0.000490551
-d 282 20 -0.000411712
-d 283 20 -0.000437859
-d 284 20 -0.000408185
-d 285 20 -0.000356644
-d 286 20 -0.000311332
-d 287 20 -0.000269006
-d 288 20 -0.000221396
-d 289 20 -0.000210054
-d 290 20 -0.0001923
-d 291 20 -0.000175122
-d 292 20 -0.000161039
-d 293 20 -0.0001428
-d 294 20 -0.000126123
-d 295 20 -0.000127893
-d 296 20 -8.14516e-05
-d 297 20 -0.000120166
-d 298 20 -0.000154909
-d 299 20 -0.000112733
-d 300 20 -8.40377e-05
-d 301 20 -7.11342e-05
-d 302 20 -8.09538e-05
-d 303 20 -9.77789e-05
-d 304 20 -9.82402e-05
-d 305 20 -7.73531e-05
-d 306 20 -5.28255e-05
-d 307 20 -3.1096e-05
-d 308 20 -1.87967e-05
-d 309 20 -1.96552e-05
-d 310 20 -4.16655e-05
-d 311 20 -5.77185e-05
-d 312 20 -5.24142e-05
-d 313 20 -2.83153e-05
-d 314 20 -1.90012e-05
-d 315 20 -1.54415e-05
-d 316 20 -2.52569e-05
-d 317 20 -6.23747e-05
-d 318 20 -0.000130543
-d 319 20 -0.000149394
-d 320 20 -0.000110886
-d 321 20 -4.35517e-05
-d 322 20 -4.17084e-05
-d 323 20 -3.98651e-05
-d 324 20 -3.80218e-05
-d 325 20 -3.61785e-05
-d 326 20 -3.43352e-05
-d 327 20 -3.36249e-05
-d 328 20 -3.32729e-05
-d 329 20 -3.29208e-05
-d 330 20 -3.25687e-05
-d 331 20 -3.22166e-05
-d 332 20 -3.17143e-05
-d 333 20 -3.10258e-05
-d 334 20 -3.03372e-05
-d 335 20 -2.96486e-05
-d 336 20 -2.89601e-05
-d 337 20 -2.82715e-05
-d 338 20 -2.75829e-05
-d 339 20 -2.68944e-05
-d 340 20 -2.62058e-05
-d 341 20 -2.55173e-05
-d 342 20 -2.48287e-05
-d 343 20 -2.43043e-05
-d 344 20 -2.38159e-05
-d 345 20 -2.33276e-05
-d 346 20 -2.28393e-05
-d 347 20 -2.2351e-05
-d 348 20 -2.18626e-05
-d 349 20 -2.13743e-05
-d 350 20 -2.0886e-05
-d 351 20 -2.03977e-05
-d 352 20 -1.99093e-05
-d 353 20 -1.945e-05
-d 354 20 -1.91122e-05
-d 355 20 -1.87744e-05
-d 356 20 -1.84366e-05
-d 357 20 -1.80987e-05
-d 358 20 -1.77609e-05
-d 359 20 -1.74231e-05
-d 360 20 -1.70853e-05
-d 361 20 -1.67474e-05
-d 1 21 1.86175
-d 2 21 1.99724
-d 3 21 2.17266
-d 4 21 2.48439
-d 5 21 3.15933
-d 6 21 3.85231
-d 7 21 4.38091
-d 8 21 4.69033
-d 9 21 4.85034
-d 10 21 4.92851
-d 11 21 4.96453
-d 12 21 4.98188
-d 13 21 4.98736
-d 14 21 4.991
-d 15 21 4.99482
-d 16 21 4.9973
-d 17 21 4.96422
-d 18 21 4.89989
-d 19 21 4.83907
-d 20 21 4.83151
-d 21 21 4.90868
-d 22 21 5.04854
-d 23 21 5.06104
-d 24 21 5.04571
-d 25 21 5.03219
-d 26 21 5.03025
-d 27 21 5.02273
-d 28 21 5.01707
-d 29 21 5.0123
-d 30 21 5.0087
-d 31 21 5.00611
-d 32 21 5.00429
-d 33 21 5.00301
-d 34 21 5.00211
-d 35 21 5.00148
-d 36 21 5.00103
-d 37 21 5.00072
-d 38 21 5.0005
-d 39 21 5.00035
-d 40 21 5.00024
-d 41 21 5.00016
-d 42 21 5.00011
-d 43 21 5.00007
-d 44 21 5.00005
-d 45 21 5.00003
-d 46 21 5.00001
-d 47 21 4.99999
-d 48 21 4.99998
-d 49 21 4.99998
-d 50 21 4.99998
-d 51 21 4.99998
-d 52 21 4.99998
-d 53 21 4.99999
-d 54 21 5.0
-d 55 21 5.0
-d 56 21 5.00001
-d 57 21 5.00001
-d 58 21 5.00002
-d 59 21 5.00002
-d 60 21 5.00002
-d 61 21 5.00002
-d 62 21 5.00002
-d 63 21 5.00002
-d 64 21 5.00001
-d 65 21 5.00001
-d 66 21 5.0
-d 67 21 5.0
-d 68 21 5.0
-d 69 21 5.0
-d 70 21 5.0
-d 71 21 5.0
-d 72 21 4.99999
-d 73 21 4.99999
-d 74 21 4.99999
-d 75 21 4.99999
-d 76 21 4.99999
-d 77 21 4.99999
-d 78 21 4.99999
-d 79 21 4.99999
-d 80 21 4.99999
-d 81 21 4.99999
-d 82 21 4.99999
-d 83 21 4.99999
-d 84 21 4.99999
-d 85 21 5.0
-d 86 21 5.0
-d 87 21 5.0
-d 88 21 5.0
-d 89 21 5.0
-d 90 21 5.0
-d 91 21 5.0
-d 92 21 5.0
-d 93 21 5.00001
-d 94 21 5.00001
-d 95 21 5.00001
-d 96 21 5.00001
-d 97 21 5.00001
-d 98 21 5.00001
-d 99 21 5.00001
-d 100 21 5.00001
-d 101 21 5.00001
-d 102 21 5.00001
-d 103 21 5.00001
-d 104 21 5.00001
-d 105 21 5.00001
-d 106 21 5.00001
-d 107 21 5.00001
-d 108 21 5.00001
-d 109 21 5.00001
-d 110 21 5.00001
-d 111 21 5.00001
-d 112 21 5.00001
-d 113 21 5.00001
-d 114 21 5.00001
-d 115 21 5.0
-d 116 21 5.0
-d 117 21 5.0
-d 118 21 5.0
-d 119 21 5.0
-d 120 21 5.0
-d 121 21 4.99981
-d 122 21 5.10081
-d 123 21 5.10903
-d 124 21 4.98404
-d 125 21 5.00999
-d 126 21 5.14946
-d 127 21 4.36501
-d 128 21 2.23938
-d 129 21 0.325144
-d 130 21 0.00660272
-d 131 21 -0.0102186
-d 132 21 -0.0082401
-d 133 21 -0.00556785
-d 134 21 -0.00374178
-d 135 21 -0.00264763
-d 136 21 -0.00202823
-d 137 21 -0.0182241
-d 138 21 -0.0169551
-d 139 21 -0.0150395
-d 140 21 0.0103736
-d 141 21 0.0877592
-d 142 21 0.104382
-d 143 21 0.0515938
-d 144 21 0.0373818
-d 145 21 0.0411547
-d 146 21 0.0397009
-d 147 21 0.0308946
-d 148 21 0.0205793
-d 149 21 0.0154037
-d 150 21 0.0129191
-d 151 21 0.0119327
-d 152 21 0.011527
-d 153 21 0.0124295
-d 154 21 0.0161152
-d 155 21 0.0161076
-d 156 21 0.0145391
-d 157 21 0.0144541
-d 158 21 0.0139287
-d 159 21 0.0129215
-d 160 21 0.0117239
-d 161 21 0.0105795
-d 162 21 0.00942983
-d 163 21 0.00827423
-d 164 21 0.00718354
-d 165 21 0.00619954
-d 166 21 0.00532868
-d 167 21 0.00456631
-d 168 21 0.00390448
-d 169 21 0.00333254
-d 170 21 0.00284003
-d 171 21 0.00241714
-d 172 21 0.00205524
-d 173 21 0.0017458
-d 174 21 0.00148202
-d 175 21 0.00125739
-d 176 21 0.0010655
-d 177 21 0.000902213
-d 178 21 0.000763611
-d 179 21 0.000646279
-d 180 21 0.000547291
-d 181 21 0.000463934
-d 182 21 0.000393401
-d 183 21 0.000332424
-d 184 21 0.000280655
-d 185 21 0.000236328
-d 186 21 0.000199386
-d 187 21 0.000167536
-d 188 21 0.000141218
-d 189 21 0.000118654
-d 190 21 9.99559e-05
-d 191 21 8.40479e-05
-d 192 21 7.09694e-05
-d 193 21 6.00188e-05
-d 194 21 5.09786e-05
-d 195 21 4.3502e-05
-d 196 21 3.72191e-05
-d 197 21 3.18114e-05
-d 198 21 2.74071e-05
-d 199 21 2.35539e-05
-d 200 21 1.99967e-05
-d 201 21 1.69871e-05
-d 202 21 1.49449e-05
-d 203 21 1.3451e-05
-d 204 21 1.24492e-05
-d 205 21 1.14256e-05
-d 206 21 1.05669e-05
-d 207 21 9.94487e-06
-d 208 21 9.47514e-06
-d 209 21 8.77318e-06
-d 210 21 8.07123e-06
-d 211 21 7.36927e-06
-d 212 21 6.66731e-06
-d 213 21 5.96536e-06
-d 214 21 5.2634e-06
-d 215 21 4.56144e-06
-d 216 21 4.23044e-06
-d 217 21 3.92649e-06
-d 218 21 3.62254e-06
-d 219 21 3.31858e-06
-d 220 21 3.01463e-06
-d 221 21 2.71068e-06
-d 222 21 2.40673e-06
-d 223 21 2.23063e-06
-d 224 21 2.12082e-06
-d 225 21 2.01102e-06
-d 226 21 1.90121e-06
-d 227 21 1.7914e-06
-d 228 21 1.68159e-06
-d 229 21 1.57178e-06
-d 230 21 1.46197e-06
-d 231 21 1.35216e-06
-d 232 21 1.24235e-06
-d 233 21 1.13255e-06
-d 234 21 1.02274e-06
-d 235 21 9.12929e-07
-d 236 21 8.0312e-07
-d 237 21 6.33171e-07
-d 238 21 -1.51288e-08
-d 239 21 -6.63428e-07
-d 240 21 -1.31173e-06
-d 241 21 -1.96003e-06
-d 242 21 0.0437517
-d 243 21 0.0265689
-d 244 21 -0.0515377
-d 245 21 -0.0658688
-d 246 21 0.010727
-d 247 21 -0.000511921
-d 248 21 -8.36924e-05
-d 249 21 2.13278e-05
-d 250 21 1.45207e-05
-d 251 21 4.54862e-06
-d 252 21 -6.14726e-06
-d 253 21 2.0062e-06
-d 254 21 1.02709e-06
-d 255 21 1.4152e-05
-d 256 21 -3.08225e-05
-d 257 21 -0.0166501
-d 258 21 -0.0157139
-d 259 21 -0.013957
-d 260 21 0.0107537
-d 261 21 0.0873717
-d 262 21 0.111302
-d 263 21 0.0454129
-d 264 21 -0.00530142
-d 265 21 -0.0468336
-d 266 21 -0.0790063
-d 267 21 -0.0826944
-d 268 21 -0.0534753
-d 269 21 -0.0288705
-d 270 21 -0.0149009
-d 271 21 -0.00801592
-d 272 21 -0.0046342
-d 273 21 -0.00291835
-d 274 21 -0.00213019
-d 275 21 -0.00170055
-d 276 21 -0.001352
-d 277 21 -0.00110593
-d 278 21 -0.000742655
-d 279 21 -0.000532042
-d 280 21 -0.000544742
-d 281 21 -0.000479206
-d 282 21 -0.000407307
-d 283 21 -0.000403575
-d 284 21 -0.000366209
-d 285 21 -0.000324161
-d 286 21 -0.000286183
-d 287 21 -0.000247579
-d 288 21 -0.000214281
-d 289 21 -0.000203435
-d 290 21 -0.000186896
-d 291 21 -0.000171033
-d 292 21 -0.00015779
-d 293 21 -0.000145259
-d 294 21 -0.000128069
-d 295 21 -0.000122647
-d 296 21 -9.89398e-05
-d 297 21 -0.000114926
-d 298 21 -0.000132195
-d 299 21 -0.000107872
-d 300 21 -8.91015e-05
-d 301 21 -7.87996e-05
-d 302 21 -8.14061e-05
-d 303 21 -8.9098e-05
-d 304 21 -8.83368e-05
-d 305 21 -7.6122e-05
-d 306 21 -6.14668e-05
-d 307 21 -4.75402e-05
-d 308 21 -3.81855e-05
-d 309 21 -3.69696e-05
-d 310 21 -4.78656e-05
-d 311 21 -5.61346e-05
-d 312 21 -5.35007e-05
-d 313 21 -4.1459e-05
-d 314 21 -3.35411e-05
-d 315 21 -2.52374e-05
-d 316 21 -2.37479e-05
-d 317 21 -4.6406e-05
-d 318 21 -9.41884e-05
-d 319 21 -0.000109222
-d 320 21 -8.52676e-05
-d 321 21 -4.25166e-05
-d 322 21 -4.10125e-05
-d 323 21 -3.95085e-05
-d 324 21 -3.80045e-05
-d 325 21 -3.65004e-05
-d 326 21 -3.49964e-05
-d 327 21 -3.41627e-05
-d 328 21 -3.3541e-05
-d 329 21 -3.29193e-05
-d 330 21 -3.22976e-05
-d 331 21 -3.16758e-05
-d 332 21 -3.10334e-05
-d 333 21 -3.03653e-05
-d 334 21 -2.96971e-05
-d 335 21 -2.9029e-05
-d 336 21 -2.83609e-05
-d 337 21 -2.76928e-05
-d 338 21 -2.70246e-05
-d 339 21 -2.63565e-05
-d 340 21 -2.56884e-05
-d 341 21 -2.50203e-05
-d 342 21 -2.43521e-05
-d 343 21 -2.38716e-05
-d 344 21 -2.34324e-05
-d 345 21 -2.29932e-05
-d 346 21 -2.25539e-05
-d 347 21 -2.21147e-05
-d 348 21 -2.16755e-05
-d 349 21 -2.12362e-05
-d 350 21 -2.0797e-05
-d 351 21 -2.03578e-05
-d 352 21 -1.99186e-05
-d 353 21 -1.95079e-05
-d 354 21 -1.9217e-05
-d 355 21 -1.8926e-05
-d 356 21 -1.8635e-05
-d 357 21 -1.8344e-05
-d 358 21 -1.8053e-05
-d 359 21 -1.7762e-05
-d 360 21 -1.74711e-05
-d 361 21 -1.71801e-05
-d 1 22 1.86175
-d 2 22 1.73273
-d 3 22 1.42016
-d 4 22 1.02483
-d 5 22 0.944013
-d 6 22 0.274107
-d 7 22 0.0823742
-d 8 22 0.0379366
-d 9 22 0.020816
-d 10 22 0.0132952
-d 11 22 0.00955525
-d 12 22 0.00717008
-d 13 22 0.00592286
-d 14 22 0.00437379
-d 15 22 0.00383557
-d 16 22 0.00273694
-d 17 22 -0.0037467
-d 18 22 -0.0054191
-d 19 22 -0.00131454
-d 20 22 0.0112179
-d 21 22 0.0133918
-d 22 22 0.00519747
-d 23 22 -0.00260113
-d 24 22 -0.00252847
-d 25 22 -0.00181292
-d 26 22 0.000183398
-d 27 22 -0.000667607
-d 28 22 -0.000750747
-d 29 22 -0.000594314
-d 30 22 -0.000433904
-d 31 22 -0.000308985
-d 32 22 -0.000217858
-d 33 22 -0.000152926
-d 34 22 -0.000107454
-d 35 22 -7.54076e-05
-d 36 22 -5.2675e-05
-d 37 22 -3.66299e-05
-d 38 22 -2.54341e-05
-d 39 22 -1.75095e-05
-d 40 22 -1.18848e-05
-d 41 22 -7.97289e-06
-d 42 22 -5.30239e-06
-d 43 22 -3.53615e-06
-d 44 22 -2.38504e-06
-d 45 22 -2.40158e-06
-d 46 22 -3.84485e-06
-d 47 22 -5.29435e-06
-d 48 22 -2.57099e-06
-d 49 22 1.95189e-06
-d 50 22 3.55083e-06
-d 51 22 2.06179e-06
-d 52 22 5.72753e-07
-d 53 22 3.30469e-07
-d 54 22 3.40296e-07
-d 55 22 3.60221e-07
-d 56 22 4.86081e-07
-d 57 22 6.1194e-07
-d 58 22 7.37799e-07
-d 59 22 8.63659e-07
-d 60 22 9.89518e-07
-d 61 22 9.21274e-07
-d 62 22 7.22275e-07
-d 63 22 5.23276e-07
-d 64 22 3.24277e-07
-d 65 22 1.25278e-07
-d 66 22 -5.59467e-08
-d 67 22 -9.03265e-08
-d 68 22 -1.24706e-07
-d 69 22 -1.59086e-07
-d 70 22 -1.93466e-07
-d 71 22 -2.27846e-07
-d 72 22 -2.62226e-07
-d 73 22 -2.96605e-07
-d 74 22 -3.30985e-07
-d 75 22 -3.65365e-07
-d 76 22 -3.99745e-07
-d 77 22 -4.24266e-07
-d 78 22 -3.82163e-07
-d 79 22 -3.40061e-07
-d 80 22 -2.97959e-07
-d 81 22 -2.55857e-07
-d 82 22 -2.13755e-07
-d 83 22 -1.71652e-07
-d 84 22 -1.2955e-07
-d 85 22 -8.7448e-08
-d 86 22 -4.53457e-08
-d 87 22 -3.24353e-09
-d 88 22 3.76901e-08
-d 89 22 7.19937e-08
-d 90 22 1.06297e-07
-d 91 22 1.40601e-07
-d 92 22 1.74904e-07
-d 93 22 2.09208e-07
-d 94 22 2.43512e-07
-d 95 22 2.77815e-07
-d 96 22 3.12119e-07
-d 97 22 3.46422e-07
-d 98 22 3.80726e-07
-d 99 22 4.04507e-07
-d 100 22 3.77191e-07
-d 101 22 3.49876e-07
-d 102 22 3.22561e-07
-d 103 22 2.95246e-07
-d 104 22 2.67931e-07
-d 105 22 2.40616e-07
-d 106 22 2.13301e-07
-d 107 22 1.85986e-07
-d 108 22 1.58671e-07
-d 109 22 1.31356e-07
-d 110 22 1.04041e-07
-d 111 22 7.67256e-08
-d 112 22 4.94105e-08
-d 113 22 2.20955e-08
-d 114 22 -5.21962e-09
-d 115 22 -3.25347e-08
-d 116 22 -5.98498e-08
-d 117 22 -8.71649e-08
-d 118 22 -1.1448e-07
-d 119 22 -1.41795e-07
-d 120 22 -1.6911e-07
-d 121 22 7.87893e-06
-d 122 22 0.0114592
-d 123 22 -0.0245712
-d 124 22 -0.111637
-d 125 22 0.0961324
-d 126 22 1.61168
-d 127 22 3.22343
-d 128 22 4.20442
-d 129 22 4.53535
-d 130 22 4.83834
-d 131 22 4.95464
-d 132 22 4.98874
-d 133 22 4.99746
-d 134 22 4.99883
-d 135 22 4.99948
-d 136 22 4.99815
-d 137 22 4.98431
-d 138 22 4.99298
-d 139 22 4.99718
-d 140 22 5.01948
-d 141 22 5.04749
-d 142 22 5.008
-d 143 22 4.98243
-d 144 22 4.98985
-d 145 22 4.99781
-d 146 22 4.99887
-d 147 22 4.99679
-d 148 22 4.99616
-d 149 22 4.99743
-d 150 22 4.99859
-d 151 22 4.99936
-d 152 22 4.99972
-d 153 22 5.00058
-d 154 22 5.00123
-d 155 22 5.0002
-d 156 22 4.99945
-d 157 22 4.99983
-d 158 22 4.9998
-d 159 22 4.99966
-d 160 22 4.99958
-d 161 22 4.99956
-d 162 22 4.99956
-d 163 22 4.99956
-d 164 22 4.99958
-d 165 22 4.99961
-d 166 22 4.99965
-d 167 22 4.99969
-d 168 22 4.99973
-d 169 22 4.99977
-d 170 22 4.9998
-d 171 22 4.99983
-d 172 22 4.99985
-d 173 22 4.99987
-d 174 22 4.99989
-d 175 22 4.99991
-d 176 22 4.99992
-d 177 22 4.99993
-d 178 22 4.99994
-d 179 22 4.99995
-d 180 22 4.99996
-d 181 22 4.99997
-d 182 22 4.99997
-d 183 22 4.99998
-d 184 22 4.99998
-d 185 22 4.99998
-d 186 22 4.99999
-d 187 22 4.99999
-d 188 22 4.99999
-d 189 22 4.99999
-d 190 22 4.99999
-d 191 22 4.99999
-d 192 22 4.99999
-d 193 22 5.0
-d 194 22 5.0
-d 195 22 5.0
-d 196 22 5.0
-d 197 22 5.0
-d 198 22 5.0
-d 199 22 5.0
-d 200 22 5.0
-d 201 22 5.0
-d 202 22 5.0
-d 203 22 5.0
-d 204 22 5.0
-d 205 22 5.0
-d 206 22 5.0
-d 207 22 5.0
-d 208 22 5.0
-d 209 22 5.0
-d 210 22 5.0
-d 211 22 5.0
-d 212 22 5.0
-d 213 22 5.0
-d 214 22 5.0
-d 215 22 5.0
-d 216 22 5.0
-d 217 22 5.00001
-d 218 22 5.00001
-d 219 22 5.00001
-d 220 22 5.00002
-d 221 22 5.00002
-d 222 22 5.00002
-d 223 22 5.00002
-d 224 22 5.00002
-d 225 22 5.00002
-d 226 22 5.00002
-d 227 22 5.00002
-d 228 22 5.00001
-d 229 22 5.00001
-d 230 22 5.00001
-d 231 22 5.00001
-d 232 22 5.00001
-d 233 22 5.00001
-d 234 22 5.00001
-d 235 22 5.0
-d 236 22 5.0
-d 237 22 5.0
-d 238 22 4.99999
-d 239 22 4.99998
-d 240 22 4.99997
-d 241 22 4.99996
-d 242 22 5.01454
-d 243 22 4.99566
-d 244 22 4.96796
-d 245 22 4.99819
-d 246 22 5.03232
-d 247 22 5.00034
-d 248 22 4.99867
-d 249 22 4.99937
-d 250 22 4.99977
-d 251 22 4.99992
-d 252 22 4.99997
-d 253 22 4.99999
-d 254 22 5.00001
-d 255 22 5.00021
-d 256 22 4.99974
-d 257 22 4.98462
-d 258 22 4.99301
-d 259 22 4.99723
-d 260 22 5.01936
-d 261 22 5.04807
-d 262 22 5.00929
-d 263 22 4.9789
-d 264 22 4.97876
-d 265 22 4.98244
-d 266 22 4.9863
-d 267 22 4.99575
-d 268 22 5.0069
-d 269 22 5.00863
-d 270 22 5.00624
-d 271 22 5.00357
-d 272 22 5.0019
-d 273 22 5.00098
-d 274 22 5.00048
-d 275 22 5.00025
-d 276 22 5.00016
-d 277 22 5.00011
-d 278 22 5.00013
-d 279 22 5.00009
-d 280 22 4.99982
-d 281 22 4.99994
-d 282 22 5.00005
-d 283 22 4.99994
-d 284 22 4.99988
-d 285 22 4.99989
-d 286 22 4.99997
-d 287 22 5.00003
-d 288 22 5.00005
-d 289 22 5.00002
-d 290 22 5.00001
-d 291 22 5.00001
-d 292 22 5.00001
-d 293 22 4.99993
-d 294 22 4.99999
-d 295 22 5.0
-d 296 22 5.00021
-d 297 22 4.99997
-d 298 22 4.99981
-d 299 22 5.0
-d 300 22 5.00009
-d 301 22 5.0001
-d 302 22 5.00001
-d 303 22 4.99991
-d 304 22 4.9999
-d 305 22 5.0
-d 306 22 5.00011
-d 307 22 5.00017
-d 308 22 5.00018
-d 309 22 5.00018
-d 310 22 5.00014
-d 311 22 5.00007
-d 312 22 4.99999
-d 313 22 4.9999
-d 314 22 4.9999
-d 315 22 5.00001
-d 316 22 5.00016
-d 317 22 5.00014
-d 318 22 4.99999
-d 319 22 4.99993
-d 320 22 4.99999
-d 321 22 5.00009
-d 322 22 5.00007
-d 323 22 5.00006
-d 324 22 5.00004
-d 325 22 5.00003
-d 326 22 5.00001
-d 327 22 5.00001
-d 328 22 5.0
-d 329 22 4.99999
-d 330 22 4.99998
-d 331 22 4.99997
-d 332 22 4.99997
-d 333 22 4.99997
-d 334 22 4.99998
-d 335 22 4.99998
-d 336 22 4.99998
-d 337 22 4.99998
-d 338 22 4.99999
-d 339 22 4.99999
-d 340 22 4.99999
-d 341 22 5.0
-d 342 22 5.0
-d 343 22 5.0
-d 344 22 5.0
-d 345 22 5.0
-d 346 22 5.0
-d 347 22 5.00001
-d 348 22 5.00001
-d 349 22 5.00001
-d 350 22 5.00001
-d 351 22 5.00001
-d 352 22 5.00002
-d 353 22 5.00002
-d 354 22 5.00001
-d 355 22 5.00001
-d 356 22 5.00001
-d 357 22 5.00001
-d 358 22 5.00001
-d 359 22 5.00001
-d 360 22 5.0
-d 361 22 5.0
-d 1 23 7.10441e-10
-d 2 23 0.00107105
-d 3 23 0.000637109
-d 4 23 -0.00236346
-d 5 23 -0.018079
-d 6 23 -0.0120077
-d 7 23 -0.00217059
-d 8 23 0.00266679
-d 9 23 0.00403383
-d 10 23 0.00403836
-d 11 23 0.00356705
-d 12 23 0.00303303
-d 13 23 0.00244716
-d 14 23 0.00198586
-d 15 23 0.0016855
-d 16 23 0.00136497
-d 17 23 -3.96022e-05
-d 18 23 -0.000367409
-d 19 23 -3.77079e-05
-d 20 23 0.00194085
-d 21 23 0.00506964
-d 22 23 -0.0400214
-d 23 23 -0.0402572
-d 24 23 0.0524434
-d 25 23 0.286234
-d 26 23 0.803011
-d 27 23 1.44795
-d 28 23 2.02473
-d 29 23 2.54768
-d 30 23 3.02748
-d 31 23 3.4415
-d 32 23 3.78287
-d 33 23 4.09667
-d 34 23 4.35152
-d 35 23 4.53987
-d 36 23 4.67614
-d 37 23 4.77407
-d 38 23 4.84319
-d 39 23 4.89227
-d 40 23 4.92702
-d 41 23 4.95119
-d 42 23 4.96764
-d 43 23 4.97846
-d 44 23 4.98557
-d 45 23 4.98982
-d 46 23 4.99209
-d 47 23 4.99371
-d 48 23 4.99569
-d 49 23 4.99727
-d 50 23 4.99802
-d 51 23 4.99834
-d 52 23 4.99867
-d 53 23 4.99892
-d 54 23 4.99915
-d 55 23 4.99936
-d 56 23 4.99939
-d 57 23 4.99943
-d 58 23 4.99946
-d 59 23 4.9995
-d 60 23 4.99953
-d 61 23 4.99957
-d 62 23 4.9996
-d 63 23 4.99963
-d 64 23 4.99967
-d 65 23 4.9997
-d 66 23 4.99973
-d 67 23 4.99974
-d 68 23 4.99975
-d 69 23 4.99976
-d 70 23 4.99977
-d 71 23 4.99978
-d 72 23 4.9998
-d 73 23 4.99981
-d 74 23 4.99982
-d 75 23 4.99983
-d 76 23 4.99984
-d 77 23 4.99985
-d 78 23 4.99986
-d 79 23 4.99986
-d 80 23 4.99986
-d 81 23 4.99987
-d 82 23 4.99987
-d 83 23 4.99988
-d 84 23 4.99988
-d 85 23 4.99989
-d 86 23 4.99989
-d 87 23 4.9999
-d 88 23 4.9999
-d 89 23 4.9999
-d 90 23 4.9999
-d 91 23 4.99991
-d 92 23 4.99991
-d 93 23 4.99991
-d 94 23 4.99991
-d 95 23 4.99992
-d 96 23 4.99992
-d 97 23 4.99992
-d 98 23 4.99992
-d 99 23 4.99993
-d 100 23 4.99993
-d 101 23 4.99993
-d 102 23 4.99993
-d 103 23 4.99993
-d 104 23 4.99993
-d 105 23 4.99993
-d 106 23 4.99993
-d 107 23 4.99994
-d 108 23 4.99994
-d 109 23 4.99994
-d 110 23 4.99994
-d 111 23 4.99994
-d 112 23 4.99994
-d 113 23 4.99994
-d 114 23 4.99994
-d 115 23 4.99995
-d 116 23 4.99995
-d 117 23 4.99995
-d 118 23 4.99995
-d 119 23 4.99995
-d 120 23 4.99995
-d 121 23 4.99995
-d 122 23 5.00145
-d 123 23 5.00659
-d 124 23 5.01209
-d 125 23 5.01931
-d 126 23 5.00279
-d 127 23 4.99273
-d 128 23 4.99217
-d 129 23 4.99295
-d 130 23 4.99471
-d 131 23 4.99594
-d 132 23 4.99696
-d 133 23 4.9978
-d 134 23 4.99844
-d 135 23 4.99891
-d 136 23 4.99924
-d 137 23 4.99635
-d 138 23 4.99699
-d 139 23 4.99813
-d 140 23 5.00068
-d 141 23 5.00307
-d 142 23 5.0588
-d 143 23 4.96365
-d 144 23 4.54012
-d 145 23 3.6307
-d 146 23 2.35176
-d 147 23 1.0322
-d 148 23 0.354379
-d 149 23 0.115986
-d 150 23 0.0435668
-d 151 23 0.0245112
-d 152 23 0.020786
-d 153 23 0.0164656
-d 154 23 0.0118409
-d 155 23 0.00849698
-d 156 23 0.00597078
-d 157 23 0.0040105
-d 158 23 0.0026076
-d 159 23 0.0016597
-d 160 23 0.00118185
-d 161 23 0.00121067
-d 162 23 0.00153587
-d 163 23 0.00174836
-d 164 23 0.00136519
-d 165 23 -0.000189116
-d 166 23 -0.00315555
-d 167 23 -0.00646603
-d 168 23 -0.00898042
-d 169 23 -0.010203
-d 170 23 -0.0110896
-d 171 23 -0.0123764
-d 172 23 -0.00953841
-d 173 23 -0.00225795
-d 174 23 0.000818314
-d 175 23 0.00152252
-d 176 23 0.00150269
-d 177 23 0.00119025
-d 178 23 0.000767068
-d 179 23 0.000308852
-d 180 23 -3.79272e-05
-d 181 23 -0.00019691
-d 182 23 -0.000186642
-d 183 23 -9.73653e-05
-d 184 23 -8.49784e-06
-d 185 23 2.04147e-05
-d 186 23 -9.91086e-06
-d 187 23 -1.55959e-05
-d 188 23 -1.80499e-05
-d 189 23 -1.77097e-05
-d 190 23 -1.51548e-05
-d 191 23 -1.1978e-05
-d 192 23 -9.84916e-06
-d 193 23 -1.29728e-05
-d 194 23 -1.67235e-05
-d 195 23 -1.74153e-05
-d 196 23 -1.39958e-05
-d 197 23 -5.92272e-06
-d 198 23 -8.08216e-06
-d 199 23 -1.53077e-05
-d 200 23 -2.92531e-05
-d 201 23 -3.91049e-05
-d 202 23 -2.98935e-05
-d 203 23 -7.32122e-06
-d 204 23 3.18534e-05
-d 205 23 4.39134e-05
-d 206 23 4.18753e-05
-d 207 23 3.22759e-05
-d 208 23 1.86766e-05
-d 209 23 1.58432e-05
-d 210 23 1.30098e-05
-d 211 23 1.01765e-05
-d 212 23 7.34312e-06
-d 213 23 4.50975e-06
-d 214 23 1.67639e-06
-d 215 23 -1.15697e-06
-d 216 23 -1.23877e-06
-d 217 23 -1.11991e-06
-d 218 23 -1.00106e-06
-d 219 23 -8.82208e-07
-d 220 23 -7.63355e-07
-d 221 23 -6.44502e-07
-d 222 23 -5.2565e-07
-d 223 23 -4.29318e-07
-d 224 23 -3.44661e-07
-d 225 23 -2.60004e-07
-d 226 23 -1.75347e-07
-d 227 23 -9.06904e-08
-d 228 23 -6.03349e-09
-d 229 23 7.86234e-08
-d 230 23 1.6328e-07
-d 231 23 2.47937e-07
-d 232 23 3.32594e-07
-d 233 23 4.17251e-07
-d 234 23 5.01908e-07
-d 235 23 5.86565e-07
-d 236 23 6.71222e-07
-d 237 23 7.36123e-07
-d 238 23 6.43886e-07
-d 239 23 5.5165e-07
-d 240 23 4.59414e-07
-d 241 23 3.67178e-07
-d 242 23 0.000334759
-d 243 23 -4.60833e-05
-d 244 23 -0.00106139
-d 245 23 -0.00166624
-d 246 23 0.000859563
-d 247 23 0.00102606
-d 248 23 0.00410037
-d 249 23 0.00419931
-d 250 23 0.00518997
-d 251 23 0.00459791
-d 252 23 0.00503125
-d 253 23 0.00523877
-d 254 23 0.00452158
-d 255 23 0.00339924
-d 256 23 0.00233399
-d 257 23 0.000876915
-d 258 23 0.000546439
-d 259 23 0.000444299
-d 260 23 0.000983968
-d 261 23 0.00119304
-d 262 23 -0.0429422
-d 263 23 -0.0403983
-d 264 23 0.0534896
-d 265 23 0.288013
-d 266 23 0.807345
-d 267 23 1.44247
-d 268 23 2.03448
-d 269 23 2.57021
-d 270 23 3.05049
-d 271 23 3.47332
-d 272 23 3.8131
-d 273 23 4.1009
-d 274 23 4.34677
-d 275 23 4.53512
-d 276 23 4.67127
-d 277 23 4.76531
-d 278 23 4.82526
-d 279 23 4.86593
-d 280 23 4.89586
-d 281 23 4.91904
-d 282 23 4.93806
-d 283 23 4.95348
-d 284 23 4.96597
-d 285 23 4.97629
-d 286 23 4.9843
-d 287 23 4.98983
-d 288 23 4.99335
-d 289 23 4.9957
-d 290 23 4.99741
-d 291 23 4.99864
-d 292 23 4.99946
-d 293 23 4.99994
-d 294 23 5.00047
-d 295 23 5.00073
-d 296 23 5.00086
-d 297 23 5.00092
-d 298 23 5.00094
-d 299 23 5.00091
-d 300 23 5.00087
-d 301 23 5.00081
-d 302 23 5.00074
-d 303 23 5.00067
-d 304 23 5.00059
-d 305 23 5.00052
-d 306 23 5.00046
-d 307 23 5.0004
-d 308 23 5.00034
-d 309 23 5.0003
-d 310 23 5.00026
-d 311 23 5.00022
-d 312 23 5.00019
-d 313 23 5.00016
-d 314 23 5.00014
-d 315 23 5.00012
-d 316 23 5.0001
-d 317 23 5.00009
-d 318 23 5.00007
-d 319 23 5.00006
-d 320 23 5.00006
-d 321 23 5.00005
-d 322 23 5.00004
-d 323 23 5.00004
-d 324 23 5.00004
-d 325 23 5.00003
-d 326 23 5.00003
-d 327 23 5.00003
-d 328 23 5.00002
-d 329 23 5.00002
-d 330 23 5.00002
-d 331 23 5.00002
-d 332 23 5.00001
-d 333 23 5.00001
-d 334 23 5.00001
-d 335 23 5.00001
-d 336 23 5.00001
-d 337 23 5.0
-d 338 23 5.0
-d 339 23 5.0
-d 340 23 5.0
-d 341 23 4.99999
-d 342 23 4.99999
-d 343 23 4.99999
-d 344 23 4.99999
-d 345 23 4.99999
-d 346 23 4.99999
-d 347 23 5.0
-d 348 23 5.0
-d 349 23 5.0
-d 350 23 5.0
-d 351 23 5.0
-d 352 23 5.0
-d 353 23 5.0
-d 354 23 5.0
-d 355 23 5.0
-d 356 23 5.00001
-d 357 23 5.00001
-d 358 23 5.00001
-d 359 23 5.00001
-d 360 23 5.00002
-d 361 23 5.00002
-d 1 24 5.0
-d 2 24 5.00284
-d 3 24 5.01266
-d 4 24 5.01895
-d 5 24 4.98936
-d 6 24 4.99575
-d 7 24 4.99217
-d 8 24 4.99545
-d 9 24 4.99775
-d 10 24 4.99894
-d 11 24 4.99946
-d 12 24 4.99968
-d 13 24 4.99975
-d 14 24 4.99977
-d 15 24 4.99986
-d 16 24 4.9999
-d 17 24 4.99528
-d 18 24 4.99808
-d 19 24 5.00039
-d 20 24 5.00392
-d 21 24 5.00512
-d 22 24 4.99985
-d 23 24 4.99863
-d 24 24 4.99942
-d 25 24 4.99992
-d 26 24 5.00017
-d 27 24 4.99897
-d 28 24 4.99803
-d 29 24 4.99784
-d 30 24 4.99739
-d 31 24 4.99883
-d 32 24 5.00365
-d 33 24 5.00298
-d 34 24 5.00133
-d 35 24 5.00048
-d 36 24 5.00019
-d 37 24 5.00008
-d 38 24 5.00005
-d 39 24 5.00004
-d 40 24 5.00003
-d 41 24 5.00002
-d 42 24 5.00002
-d 43 24 5.00001
-d 44 24 5.00001
-d 45 24 5.00001
-d 46 24 5.00001
-d 47 24 5.00001
-d 48 24 5.0
-d 49 24 5.0
-d 50 24 4.99999
-d 51 24 4.99997
-d 52 24 4.99995
-d 53 24 4.99996
-d 54 24 4.99998
-d 55 24 5.0
-d 56 24 5.00001
-d 57 24 5.00001
-d 58 24 5.00002
-d 59 24 5.00002
-d 60 24 5.00003
-d 61 24 5.00003
-d 62 24 5.00002
-d 63 24 5.00002
-d 64 24 5.00001
-d 65 24 5.00001
-d 66 24 5.0
-d 67 24 5.0
-d 68 24 5.0
-d 69 24 5.0
-d 70 24 5.0
-d 71 24 4.99999
-d 72 24 4.99999
-d 73 24 4.99999
-d 74 24 4.99999
-d 75 24 4.99999
-d 76 24 4.99999
-d 77 24 4.99998
-d 78 24 4.99999
-d 79 24 4.99999
-d 80 24 4.99999
-d 81 24 4.99999
-d 82 24 4.99999
-d 83 24 4.99999
-d 84 24 4.99999
-d 85 24 5.0
-d 86 24 5.0
-d 87 24 5.0
-d 88 24 5.0
-d 89 24 5.0
-d 90 24 5.0
-d 91 24 5.0
-d 92 24 5.00001
-d 93 24 5.00001
-d 94 24 5.00001
-d 95 24 5.00001
-d 96 24 5.00001
-d 97 24 5.00001
-d 98 24 5.00001
-d 99 24 5.00002
-d 100 24 5.00002
-d 101 24 5.00001
-d 102 24 5.00001
-d 103 24 5.00001
-d 104 24 5.00001
-d 105 24 5.00001
-d 106 24 5.00001
-d 107 24 5.00001
-d 108 24 5.00001
-d 109 24 5.00001
-d 110 24 5.00001
-d 111 24 5.00001
-d 112 24 5.00001
-d 113 24 5.00001
-d 114 24 5.00001
-d 115 24 5.0
-d 116 24 5.0
-d 117 24 5.0
-d 118 24 5.0
-d 119 24 5.0
-d 120 24 5.0
-d 121 24 5.0
-d 122 24 5.00217
-d 123 24 5.00108
-d 124 24 4.99547
-d 125 24 4.99658
-d 126 24 5.00667
-d 127 24 4.99641
-d 128 24 4.99532
-d 129 24 4.99938
-d 130 24 5.00328
-d 131 24 5.00222
-d 132 24 5.00114
-d 133 24 5.00052
-d 134 24 5.00024
-d 135 24 5.00011
-d 136 24 5.00009
-d 137 24 4.99285
-d 138 24 4.99591
-d 139 24 4.99897
-d 140 24 5.00403
-d 141 24 5.00786
-d 142 24 5.00318
-d 143 24 4.99942
-d 144 24 4.9992
-d 145 24 4.99949
-d 146 24 5.001
-d 147 24 5.00408
-d 148 24 5.00319
-d 149 24 5.00063
-d 150 24 4.99995
-d 151 24 5.00014
-d 152 24 4.99982
-d 153 24 4.99832
-d 154 24 4.99838
-d 155 24 4.99865
-d 156 24 4.99912
-d 157 24 4.99836
-d 158 24 4.99735
-d 159 24 4.99606
-d 160 24 4.99814
-d 161 24 5.00958
-d 162 24 5.02973
-d 163 24 5.05293
-d 164 24 5.06103
-d 165 24 4.99342
-d 166 24 4.80726
-d 167 24 4.50744
-d 168 24 4.07509
-d 169 24 3.41358
-d 170 24 2.37924
-d 171 24 1.03194
-d 172 24 0.261552
-d 173 24 0.142392
-d 174 24 0.0904482
-d 175 24 0.0555071
-d 176 24 0.0322869
-d 177 24 0.018289
-d 178 24 0.0113802
-d 179 24 0.00875182
-d 180 24 0.00757055
-d 181 24 0.00629906
-d 182 24 0.00523
-d 183 24 0.00403349
-d 184 24 0.0031953
-d 185 24 0.00280864
-d 186 24 0.00286119
-d 187 24 0.00250389
-d 188 24 0.00202815
-d 189 24 0.001723
-d 190 24 0.00147312
-d 191 24 0.0012411
-d 192 24 0.00104401
-d 193 24 0.000886204
-d 194 24 0.000758277
-d 195 24 0.000651915
-d 196 24 0.00056348
-d 197 24 0.000487966
-d 198 24 0.000424048
-d 199 24 0.000365613
-d 200 24 0.000308178
-d 201 24 0.000258725
-d 202 24 0.000228061
-d 203 24 0.000207976
-d 204 24 0.000198491
-d 205 24 0.00018518
-d 206 24 0.000172716
-d 207 24 0.000163197
-d 208 24 0.000155007
-d 209 24 0.000141734
-d 210 24 0.000128461
-d 211 24 0.000115188
-d 212 24 0.000101915
-d 213 24 8.86417e-05
-d 214 24 7.53686e-05
-d 215 24 6.20956e-05
-d 216 24 5.69164e-05
-d 217 24 5.23275e-05
-d 218 24 4.77385e-05
-d 219 24 4.31495e-05
-d 220 24 3.85605e-05
-d 221 24 3.39716e-05
-d 222 24 2.93826e-05
-d 223 24 2.69449e-05
-d 224 24 2.56224e-05
-d 225 24 2.42999e-05
-d 226 24 2.29774e-05
-d 227 24 2.16549e-05
-d 228 24 2.03324e-05
-d 229 24 1.90099e-05
-d 230 24 1.76873e-05
-d 231 24 1.63648e-05
-d 232 24 1.50423e-05
-d 233 24 1.37198e-05
-d 234 24 1.23973e-05
-d 235 24 1.10748e-05
-d 236 24 9.75232e-06
-d 237 24 8.48447e-06
-d 238 24 7.65129e-06
-d 239 24 6.81811e-06
-d 240 24 5.98494e-06
-d 241 24 5.15176e-06
-d 242 24 0.00056893
-d 243 24 -0.00787906
-d 244 24 -0.0217381
-d 245 24 -0.0370066
-d 246 24 -0.00770505
-d 247 24 0.00659312
-d 248 24 0.00975477
-d 249 24 0.00949456
-d 250 24 0.00777552
-d 251 24 0.00655645
-d 252 24 0.00568776
-d 253 24 0.00508782
-d 254 24 0.00458121
-d 255 24 0.00410187
-d 256 24 0.00365665
-d 257 24 0.0015121
-d 258 24 0.00160863
-d 259 24 0.00263181
-d 260 24 0.00638941
-d 261 24 0.00772607
-d 262 24 0.00225583
-d 263 24 0.0010843
-d 264 24 0.000882939
-d 265 24 0.000801563
-d 266 24 0.00075632
-d 267 24 0.000554992
-d 268 24 0.000435131
-d 269 24 0.0003474
-d 270 24 0.000217667
-d 271 24 0.000491602
-d 272 24 0.0012267
-d 273 24 0.00250446
-d 274 24 0.000212058
-d 275 24 -0.0174972
-d 276 24 -0.0527527
-d 277 24 -0.0479071
-d 278 24 0.194908
-d 279 24 1.45838
-d 280 24 3.40677
-d 281 24 4.49242
-d 282 24 4.86894
-d 283 24 4.97215
-d 284 24 5.01218
-d 285 24 5.04342
-d 286 24 5.06228
-d 287 24 5.03069
-d 288 24 4.87169
-d 289 24 4.57056
-d 290 24 4.11523
-d 291 24 3.38264
-d 292 24 2.19691
-d 293 24 0.715839
-d 294 24 0.172818
-d 295 24 0.102162
-d 296 24 0.0627162
-d 297 24 0.0363388
-d 298 24 0.020289
-d 299 24 0.0119414
-d 300 24 0.00826608
-d 301 24 0.0066417
-d 302 24 0.00549092
-d 303 24 0.00492505
-d 304 24 0.00439443
-d 305 24 0.0037156
-d 306 24 0.00306471
-d 307 24 0.00247451
-d 308 24 0.00195965
-d 309 24 0.0014822
-d 310 24 0.0010815
-d 311 24 0.000904464
-d 312 24 0.0010514
-d 313 24 0.00152308
-d 314 24 0.00120752
-d 315 24 0.000228447
-d 316 24 -0.00102833
-d 317 24 -0.00116644
-d 318 24 -0.00042067
-d 319 24 4.78758e-05
-d 320 24 5.09599e-05
-d 321 24 -4.45756e-05
-d 322 24 -3.22966e-06
-d 323 24 3.81163e-05
-d 324 24 7.94622e-05
-d 325 24 0.000120808
-d 326 24 0.000162154
-d 327 24 0.000161895
-d 328 24 0.000148481
-d 329 24 0.000135068
-d 330 24 0.000121654
-d 331 24 0.000108241
-d 332 24 9.81453e-05
-d 333 24 9.2164e-05
-d 334 24 8.61827e-05
-d 335 24 8.02014e-05
-d 336 24 7.42201e-05
-d 337 24 6.82388e-05
-d 338 24 6.22576e-05
-d 339 24 5.62763e-05
-d 340 24 5.0295e-05
-d 341 24 4.43137e-05
-d 342 24 3.83324e-05
-d 343 24 3.54323e-05
-d 344 24 3.321e-05
-d 345 24 3.09877e-05
-d 346 24 2.87654e-05
-d 347 24 2.65431e-05
-d 348 24 2.43209e-05
-d 349 24 2.20986e-05
-d 350 24 1.98763e-05
-d 351 24 1.7654e-05
-d 352 24 1.54317e-05
-d 353 24 1.34612e-05
-d 354 24 1.25441e-05
-d 355 24 1.1627e-05
-d 356 24 1.07099e-05
-d 357 24 9.79276e-06
-d 358 24 8.87564e-06
-d 359 24 7.95851e-06
-d 360 24 7.04139e-06
-d 361 24 6.12427e-06
-d 1 25 5.0
-d 2 25 5.01099
-d 3 25 5.00866
-d 4 25 4.97845
-d 5 25 4.92369
-d 6 25 4.9273
-d 7 25 4.97413
-d 8 25 4.9929
-d 9 25 4.99826
-d 10 25 4.99958
-d 11 25 4.99978
-d 12 25 5.00005
-d 13 25 4.99968
-d 14 25 4.99959
-d 15 25 5.00014
-d 16 25 4.99979
-d 17 25 4.99914
-d 18 25 4.99982
-d 19 25 5.00023
-d 20 25 5.00295
-d 21 25 5.00664
-d 22 25 4.99854
-d 23 25 4.99647
-d 24 25 5.00438
-d 25 25 5.01722
-d 26 25 5.03681
-d 27 25 5.04766
-d 28 25 5.04799
-d 29 25 5.04867
-d 30 25 5.04873
-d 31 25 5.04685
-d 32 25 5.04413
-d 33 25 5.0367
-d 34 25 5.02505
-d 35 25 5.01726
-d 36 25 5.01183
-d 37 25 5.00806
-d 38 25 5.00549
-d 39 25 5.00371
-d 40 25 5.00246
-d 41 25 5.00162
-d 42 25 5.00105
-d 43 25 5.00069
-d 44 25 5.00045
-d 45 25 5.00031
-d 46 25 5.00024
-d 47 25 5.00019
-d 48 25 5.00012
-d 49 25 5.00007
-d 50 25 5.00004
-d 51 25 5.00001
-d 52 25 4.99998
-d 53 25 4.99999
-d 54 25 4.99999
-d 55 25 5.0
-d 56 25 5.00001
-d 57 25 5.00001
-d 58 25 5.00002
-d 59 25 5.00002
-d 60 25 5.00003
-d 61 25 5.00003
-d 62 25 5.00003
-d 63 25 5.00002
-d 64 25 5.00002
-d 65 25 5.00001
-d 66 25 5.00001
-d 67 25 5.00001
-d 68 25 5.0
-d 69 25 5.0
-d 70 25 5.0
-d 71 25 5.0
-d 72 25 5.0
-d 73 25 4.99999
-d 74 25 4.99999
-d 75 25 4.99999
-d 76 25 4.99999
-d 77 25 4.99999
-d 78 25 4.99999
-d 79 25 4.99999
-d 80 25 4.99999
-d 81 25 4.99999
-d 82 25 4.99999
-d 83 25 4.99999
-d 84 25 4.99999
-d 85 25 5.0
-d 86 25 5.0
-d 87 25 5.0
-d 88 25 5.0
-d 89 25 5.0
-d 90 25 5.0
-d 91 25 5.0
-d 92 25 5.00001
-d 93 25 5.00001
-d 94 25 5.00001
-d 95 25 5.00001
-d 96 25 5.00001
-d 97 25 5.00001
-d 98 25 5.00001
-d 99 25 5.00002
-d 100 25 5.00001
-d 101 25 5.00001
-d 102 25 5.00001
-d 103 25 5.00001
-d 104 25 5.00001
-d 105 25 5.00001
-d 106 25 5.00001
-d 107 25 5.00001
-d 108 25 5.00001
-d 109 25 5.00001
-d 110 25 5.00001
-d 111 25 5.00001
-d 112 25 5.00001
-d 113 25 5.00001
-d 114 25 5.00001
-d 115 25 5.0
-d 116 25 5.0
-d 117 25 5.0
-d 118 25 5.0
-d 119 25 5.0
-d 120 25 5.0
-d 121 25 5.0
-d 122 25 5.00418
-d 123 25 4.99953
-d 124 25 4.99152
-d 125 25 4.99807
-d 126 25 5.00497
-d 127 25 5.00112
-d 128 25 5.00055
-d 129 25 5.00038
-d 130 25 5.00018
-d 131 25 5.00006
-d 132 25 5.00006
-d 133 25 5.00007
-d 134 25 5.00006
-d 135 25 5.00004
-d 136 25 5.00004
-d 137 25 4.99853
-d 138 25 4.99945
-d 139 25 4.99998
-d 140 25 5.00304
-d 141 25 5.00935
-d 142 25 5.00742
-d 143 25 4.99181
-d 144 25 4.97421
-d 145 25 4.93603
-d 146 25 4.8853
-d 147 25 4.8927
-d 148 25 4.93984
-d 149 25 4.97458
-d 150 25 4.99039
-d 151 25 4.99614
-d 152 25 4.99801
-d 153 25 4.99851
-d 154 25 4.99869
-d 155 25 4.99924
-d 156 25 5.00108
-d 157 25 5.00181
-d 158 25 5.00119
-d 159 25 5.00059
-d 160 25 5.00031
-d 161 25 5.00022
-d 162 25 5.00018
-d 163 25 5.00011
-d 164 25 5.00001
-d 165 25 5.00006
-d 166 25 4.99981
-d 167 25 4.99977
-d 168 25 4.99982
-d 169 25 5.00012
-d 170 25 4.99993
-d 171 25 5.00008
-d 172 25 5.00043
-d 173 25 5.00048
-d 174 25 5.00024
-d 175 25 5.00008
-d 176 25 4.99984
-d 177 25 4.99993
-d 178 25 5.00011
-d 179 25 4.99996
-d 180 25 4.9998
-d 181 25 4.99977
-d 182 25 4.9998
-d 183 25 4.99993
-d 184 25 5.00008
-d 185 25 5.00011
-d 186 25 5.00002
-d 187 25 4.99995
-d 188 25 4.99989
-d 189 25 4.99993
-d 190 25 5.0
-d 191 25 5.00007
-d 192 25 5.00009
-d 193 25 4.99994
-d 194 25 4.99977
-d 195 25 4.9997
-d 196 25 4.99975
-d 197 25 4.99996
-d 198 25 4.99996
-d 199 25 4.99988
-d 200 25 4.9997
-d 201 25 4.99952
-d 202 25 4.9995
-d 203 25 4.99956
-d 204 25 4.99973
-d 205 25 4.99988
-d 206 25 5.00005
-d 207 25 5.00025
-d 208 25 5.00042
-d 209 25 5.00036
-d 210 25 5.00031
-d 211 25 5.00025
-d 212 25 5.0002
-d 213 25 5.00014
-d 214 25 5.00009
-d 215 25 5.00003
-d 216 25 5.00002
-d 217 25 5.00001
-d 218 25 5.00001
-d 219 25 5.0
-d 220 25 4.99999
-d 221 25 4.99998
-d 222 25 4.99998
-d 223 25 4.99997
-d 224 25 4.99998
-d 225 25 4.99998
-d 226 25 4.99998
-d 227 25 4.99998
-d 228 25 4.99998
-d 229 25 4.99998
-d 230 25 4.99998
-d 231 25 4.99999
-d 232 25 4.99999
-d 233 25 4.99999
-d 234 25 4.99999
-d 235 25 4.99999
-d 236 25 4.99999
-d 237 25 4.99999
-d 238 25 4.99999
-d 239 25 4.99999
-d 240 25 4.99999
-d 241 25 4.99999
-d 242 25 5.00284
-d 243 25 5.00442
-d 244 25 5.00381
-d 245 25 4.98997
-d 246 25 4.99092
-d 247 25 5.00733
-d 248 25 5.07791
-d 249 25 4.98237
-d 250 25 4.86434
-d 251 25 4.76835
-d 252 25 4.74067
-d 253 25 4.79278
-d 254 25 4.85094
-d 255 25 4.90068
-d 256 25 4.93603
-d 257 25 4.95698
-d 258 25 4.96984
-d 259 25 4.97856
-d 260 25 4.98869
-d 261 25 4.99904
-d 262 25 5.0005
-d 263 25 4.99524
-d 264 25 5.00181
-d 265 25 5.01878
-d 266 25 5.05177
-d 267 25 5.07986
-d 268 25 4.98917
-d 269 25 4.56217
-d 270 25 3.68
-d 271 25 2.3539
-d 272 25 1.18541
-d 273 25 0.505772
-d 274 25 0.221044
-d 275 25 0.115287
-d 276 25 0.0760938
-d 277 25 0.0589194
-d 278 25 0.0476784
-d 279 25 0.0457213
-d 280 25 0.0412911
-d 281 25 0.033889
-d 282 25 0.0259741
-d 283 25 0.0191452
-d 284 25 0.0139018
-d 285 25 0.0100235
-d 286 25 0.00711788
-d 287 25 0.00497657
-d 288 25 0.00349368
-d 289 25 0.00250021
-d 290 25 0.00176179
-d 291 25 0.00121843
-d 292 25 0.000838368
-d 293 25 0.000582711
-d 294 25 0.000423458
-d 295 25 0.000294608
-d 296 25 0.000201251
-d 297 25 0.000133748
-d 298 25 8.6227e-05
-d 299 25 5.44252e-05
-d 300 25 3.30514e-05
-d 301 25 1.93926e-05
-d 302 25 1.09814e-05
-d 303 25 5.29857e-06
-d 304 25 1.92247e-06
-d 305 25 3.08708e-07
-d 306 25 -3.74311e-07
-d 307 25 -6.11121e-07
-d 308 25 -7.27807e-07
-d 309 25 -4.87604e-07
-d 310 25 -4.80493e-07
-d 311 25 -9.15925e-07
-d 312 25 -2.03774e-06
-d 313 25 -4.01128e-06
-d 314 25 -2.46644e-06
-d 315 25 2.10626e-06
-d 316 25 8.22422e-06
-d 317 25 1.04922e-05
-d 318 25 9.83047e-06
-d 319 25 7.27106e-06
-d 320 25 3.29654e-06
-d 321 25 -2.06736e-06
-d 322 25 -2.18019e-06
-d 323 25 -2.29303e-06
-d 324 25 -2.40586e-06
-d 325 25 -2.51869e-06
-d 326 25 -2.63153e-06
-d 327 25 -2.24615e-06
-d 328 25 -1.70325e-06
-d 329 25 -1.16036e-06
-d 330 25 -6.17468e-07
-d 331 25 -7.45754e-08
-d 332 25 2.45198e-07
-d 333 25 2.88285e-07
-d 334 25 3.31373e-07
-d 335 25 3.7446e-07
-d 336 25 4.17548e-07
-d 337 25 4.60635e-07
-d 338 25 5.03723e-07
-d 339 25 5.4681e-07
-d 340 25 5.89898e-07
-d 341 25 6.32985e-07
-d 342 25 6.76073e-07
-d 343 25 6.19054e-07
-d 344 25 5.4001e-07
-d 345 25 4.60967e-07
-d 346 25 3.81923e-07
-d 347 25 3.02879e-07
-d 348 25 2.23836e-07
-d 349 25 1.44792e-07
-d 350 25 6.57488e-08
-d 351 25 -1.32948e-08
-d 352 25 -9.23383e-08
-d 353 25 -1.6698e-07
-d 354 25 -2.23206e-07
-d 355 25 -2.79432e-07
-d 356 25 -3.35658e-07
-d 357 25 -3.91884e-07
-d 358 25 -4.48109e-07
-d 359 25 -5.04335e-07
-d 360 25 -5.60561e-07
-d 361 25 -6.16787e-07
-d 1 26 1.34824
-d 2 26 1.35838
-d 3 26 1.36465
-d 4 26 1.34675
-d 5 26 1.29167
-d 6 26 1.23161
-d 7 26 1.2201
-d 8 26 1.2185
-d 9 26 1.2181
-d 10 26 1.21798
-d 11 26 1.21793
-d 12 26 1.21788
-d 13 26 1.21785
-d 14 26 1.21782
-d 15 26 1.21779
-d 16 26 1.21776
-d 17 26 1.21655
-d 18 26 1.21656
-d 19 26 1.21669
-d 20 26 1.21871
-d 21 26 1.22421
-d 22 26 1.22247
-d 23 26 1.21858
-d 24 26 1.2228
-d 25 26 1.23803
-d 26 26 1.27737
-d 27 26 1.10647
-d 28 26 0.395248
-d 29 26 0.0600669
-d 30 26 0.027687
-d 31 26 0.0192374
-d 32 26 0.015425
-d 33 26 0.0130881
-d 34 26 0.00977445
-d 35 26 0.00696598
-d 36 26 0.00491122
-d 37 26 0.00341952
-d 38 26 0.00237078
-d 39 26 0.00162339
-d 40 26 0.00109178
-d 41 26 0.000726647
-d 42 26 0.000478886
-d 43 26 0.00031568
-d 44 26 0.000207902
-d 45 26 0.000143494
-d 46 26 0.000109768
-d 47 26 8.62987e-05
-d 48 26 5.69775e-05
-d 49 26 3.36547e-05
-d 50 26 2.30356e-05
-d 51 26 1.86108e-05
-d 52 26 1.41861e-05
-d 53 26 1.08293e-05
-d 54 26 7.68835e-06
-d 55 26 4.79593e-06
-d 56 26 4.51019e-06
-d 57 26 4.22444e-06
-d 58 26 3.9387e-06
-d 59 26 3.65295e-06
-d 60 26 3.36721e-06
-d 61 26 3.04559e-06
-d 62 26 2.69981e-06
-d 63 26 2.35403e-06
-d 64 26 2.00825e-06
-d 65 26 1.66247e-06
-d 66 26 1.34508e-06
-d 67 26 1.26225e-06
-d 68 26 1.17941e-06
-d 69 26 1.09657e-06
-d 70 26 1.01373e-06
-d 71 26 9.30893e-07
-d 72 26 8.48054e-07
-d 73 26 7.65216e-07
-d 74 26 6.82378e-07
-d 75 26 5.9954e-07
-d 76 26 5.16702e-07
-d 77 26 4.37489e-07
-d 78 26 3.82774e-07
-d 79 26 3.2806e-07
-d 80 26 2.73346e-07
-d 81 26 2.18632e-07
-d 82 26 1.63917e-07
-d 83 26 1.09203e-07
-d 84 26 5.4489e-08
-d 85 26 -2.2523e-10
-d 86 26 -5.49395e-08
-d 87 26 -1.09654e-07
-d 88 26 -1.52862e-07
-d 89 26 -1.3079e-07
-d 90 26 -1.08718e-07
-d 91 26 -8.6646e-08
-d 92 26 -6.45739e-08
-d 93 26 -4.25019e-08
-d 94 26 -2.04298e-08
-d 95 26 1.64229e-09
-d 96 26 2.37144e-08
-d 97 26 4.57864e-08
-d 98 26 6.78585e-08
-d 99 26 8.71693e-08
-d 100 26 9.30725e-08
-d 101 26 9.89758e-08
-d 102 26 1.04879e-07
-d 103 26 1.10782e-07
-d 104 26 1.16685e-07
-d 105 26 1.22589e-07
-d 106 26 1.28492e-07
-d 107 26 1.34395e-07
-d 108 26 1.40298e-07
-d 109 26 1.46201e-07
-d 110 26 1.52105e-07
-d 111 26 1.58008e-07
-d 112 26 1.63911e-07
-d 113 26 1.69814e-07
-d 114 26 1.75718e-07
-d 115 26 1.81621e-07
-d 116 26 1.87524e-07
-d 117 26 1.93427e-07
-d 118 26 1.9933e-07
-d 119 26 2.05234e-07
-d 120 26 2.11137e-07
-d 121 26 2.19788e-07
-d 122 26 0.000393944
-d 123 26 -0.000218983
-d 124 26 -0.00105784
-d 125 26 0.00172403
-d 126 26 -0.00027134
-d 127 26 -0.000204147
-d 128 26 8.79968e-06
-d 129 26 5.93762e-05
-d 130 26 5.83554e-05
-d 131 26 4.13815e-05
-d 132 26 3.71369e-05
-d 133 26 3.03372e-05
-d 134 26 2.25336e-05
-d 135 26 1.5986e-05
-d 136 26 1.07284e-05
-d 137 26 -7.5239e-05
-d 138 26 5.60593e-05
-d 139 26 6.97571e-05
-d 140 26 0.000667617
-d 141 26 0.000960856
-d 142 26 0.00131749
-d 143 26 -0.00759564
-d 144 26 -0.0217897
-d 145 26 -0.0450321
-d 146 26 -0.076646
-d 147 26 -0.128569
-d 148 26 -0.186391
-d 149 26 -0.202175
-d 150 26 -0.206953
-d 151 26 -0.2082
-d 152 26 -0.208416
-d 153 26 -0.208669
-d 154 26 -0.208934
-d 155 26 -0.209111
-d 156 26 -0.209234
-d 157 26 -0.209329
-d 158 26 -0.209389
-d 159 26 -0.209416
-d 160 26 -0.2094
-d 161 26 -0.209329
-d 162 26 -0.20926
-d 163 26 -0.209204
-d 164 26 -0.209208
-d 165 26 -0.209285
-d 166 26 -0.209454
-d 167 26 -0.209641
-d 168 26 -0.20977
-d 169 26 -0.209811
-d 170 26 -0.209833
-d 171 26 -0.209887
-d 172 26 -0.209653
-d 173 26 -0.209127
-d 174 26 -0.208893
-d 175 26 -0.208811
-d 176 26 -0.208777
-d 177 26 -0.208758
-d 178 26 -0.208747
-d 179 26 -0.20874
-d 180 26 -0.208726
-d 181 26 -0.208697
-d 182 26 -0.208657
-d 183 26 -0.208611
-d 184 26 -0.208565
-d 185 26 -0.208524
-d 186 26 -0.208488
-d 187 26 -0.208451
-d 188 26 -0.208412
-d 189 26 -0.208373
-d 190 26 -0.208333
-d 191 26 -0.208294
-d 192 26 -0.208256
-d 193 26 -0.208219
-d 194 26 -0.208183
-d 195 26 -0.208145
-d 196 26 -0.208107
-d 197 26 -0.208066
-d 198 26 -0.208029
-d 199 26 -0.207993
-d 200 26 -0.207959
-d 201 26 -0.207923
-d 202 26 -0.207883
-d 203 26 -0.207838
-d 204 26 -0.207789
-d 205 26 -0.207747
-d 206 26 -0.20771
-d 207 26 -0.207675
-d 208 26 -0.207642
-d 209 26 -0.207605
-d 210 26 -0.207568
-d 211 26 -0.207531
-d 212 26 -0.207494
-d 213 26 -0.207457
-d 214 26 -0.20742
-d 215 26 -0.207383
-d 216 26 -0.207346
-d 217 26 -0.207308
-d 218 26 -0.207271
-d 219 26 -0.207233
-d 220 26 -0.207196
-d 221 26 -0.207158
-d 222 26 -0.207121
-d 223 26 -0.207084
-d 224 26 -0.207046
-d 225 26 -0.207009
-d 226 26 -0.206972
-d 227 26 -0.206935
-d 228 26 -0.206898
-d 229 26 -0.206861
-d 230 26 -0.206823
-d 231 26 -0.206786
-d 232 26 -0.206749
-d 233 26 -0.206712
-d 234 26 -0.206675
-d 235 26 -0.206638
-d 236 26 -0.2066
-d 237 26 -0.206563
-d 238 26 -0.206526
-d 239 26 -0.206489
-d 240 26 -0.206452
-d 241 26 -0.206415
-d 242 26 -0.203384
-d 243 26 -0.20015
-d 244 26 -0.196872
-d 245 26 -0.205024
-d 246 26 -0.210727
-d 247 26 -0.206779
-d 248 26 -0.0685263
-d 249 26 0.586138
-d 250 26 1.4665
-d 251 26 2.22945
-d 252 26 2.77554
-d 253 26 3.076
-d 254 26 3.24926
-d 255 26 3.34515
-d 256 26 3.40164
-d 257 26 3.43006
-d 258 26 3.43713
-d 259 26 3.43075
-d 260 26 3.42886
-d 261 26 3.4384
-d 262 26 3.46567
-d 263 26 3.49025
-d 264 26 3.51287
-d 265 26 3.53821
-d 266 26 3.57841
-d 267 26 3.39846
-d 268 26 2.80753
-d 269 26 2.22947
-d 270 26 1.7549
-d 271 26 1.30429
-d 272 26 0.707786
-d 273 26 0.303206
-d 274 26 0.131352
-d 275 26 0.0671706
-d 276 26 0.0429955
-d 277 26 0.032461
-d 278 26 0.0257161
-d 279 26 0.0239521
-d 280 26 0.0217397
-d 281 26 0.0179705
-d 282 26 0.0138745
-d 283 26 0.0102813
-d 284 26 0.00749643
-d 285 26 0.0054328
-d 286 26 0.00386817
-d 287 26 0.0027004
-d 288 26 0.00189442
-d 289 26 0.00135552
-d 290 26 0.000954715
-d 291 26 0.000659981
-d 292 26 0.000453435
-d 293 26 0.000313993
-d 294 26 0.000231347
-d 295 26 0.000159665
-d 296 26 0.000108122
-d 297 26 7.10528e-05
-d 298 26 4.50233e-05
-d 299 26 2.77892e-05
-d 300 26 1.62765e-05
-d 301 26 8.9893e-06
-d 302 26 4.5471e-06
-d 303 26 1.54614e-06
-d 304 26 -1.6542e-07
-d 305 26 -8.68508e-07
-d 306 26 -1.04369e-06
-d 307 26 -9.63086e-07
-d 308 26 -8.44294e-07
-d 309 26 -6.57339e-07
-d 310 26 -7.35885e-07
-d 311 26 -9.80056e-07
-d 312 26 -1.39772e-06
-d 313 26 -2.10199e-06
-d 314 26 -1.37474e-06
-d 315 26 6.13269e-07
-d 316 26 3.3028e-06
-d 317 26 4.60941e-06
-d 318 26 4.91053e-06
-d 319 26 4.14186e-06
-d 320 26 2.45258e-06
-d 321 26 -8.7388e-09
-d 322 26 -3.59647e-07
-d 323 26 -7.10554e-07
-d 324 26 -1.06146e-06
-d 325 26 -1.41237e-06
-d 326 26 -1.76328e-06
-d 327 26 -1.63073e-06
-d 328 26 -1.34534e-06
-d 329 26 -1.05995e-06
-d 330 26 -7.74561e-07
-d 331 26 -4.8917e-07
-d 332 26 -2.95733e-07
-d 333 26 -2.16326e-07
-d 334 26 -1.3692e-07
-d 335 26 -5.75135e-08
-d 336 26 2.18929e-08
-d 337 26 1.01299e-07
-d 338 26 1.80706e-07
-d 339 26 2.60112e-07
-d 340 26 3.39519e-07
-d 341 26 4.18925e-07
-d 342 26 4.98332e-07
-d 343 26 4.83984e-07
-d 344 26 4.4901e-07
-d 345 26 4.14035e-07
-d 346 26 3.79061e-07
-d 347 26 3.44087e-07
-d 348 26 3.09112e-07
-d 349 26 2.74138e-07
-d 350 26 2.39163e-07
-d 351 26 2.04189e-07
-d 352 26 1.69215e-07
-d 353 26 1.26002e-07
-d 354 26 4.83213e-08
-d 355 26 -2.9359e-08
-d 356 26 -1.07039e-07
-d 357 26 -1.8472e-07
-d 358 26 -2.624e-07
-d 359 26 -3.4008e-07
-d 360 26 -4.1776e-07
-d 361 26 -4.95441e-07
-d 1 27 7.10441e-10
-d 2 27 0.000309731
-d 3 27 -0.000308186
-d 4 27 -0.001694
-d 5 27 -0.00360784
-d 6 27 8.40909e-05
-d 7 27 0.00203175
-d 8 27 0.0012896
-d 9 27 0.000596548
-d 10 27 0.000277191
-d 11 27 0.000161134
-d 12 27 0.000120439
-d 13 27 8.4915e-05
-d 14 27 9.49929e-05
-d 15 27 6.18812e-05
-d 16 27 1.65433e-05
-d 17 27 1.89682e-05
-d 18 27 3.97578e-05
-d 19 27 4.95446e-05
-d 20 27 0.000225325
-d 21 27 0.000214579
-d 22 27 -0.00230134
-d 23 27 -0.000451102
-d 24 27 0.00997237
-d 25 27 0.0341443
-d 26 27 0.0449314
-d 27 27 0.0424411
-d 28 27 0.0341996
-d 29 27 0.0315315
-d 30 27 0.0308892
-d 31 27 0.0291614
-d 32 27 0.024365
-d 33 27 0.0190282
-d 34 27 0.0188976
-d 35 27 0.017238
-d 36 27 0.0138526
-d 37 27 0.0105645
-d 38 27 0.00778548
-d 39 27 0.00561753
-d 40 27 0.0039871
-d 41 27 0.00279554
-d 42 27 0.00194075
-d 43 27 0.0013468
-d 44 27 0.000934775
-d 45 27 0.000664723
-d 46 27 0.000498911
-d 47 27 0.000377384
-d 48 27 0.000254183
-d 49 27 0.000163421
-d 50 27 0.000120773
-d 51 27 9.65058e-05
-d 52 27 7.22384e-05
-d 53 27 5.60316e-05
-d 54 27 4.14549e-05
-d 55 27 2.79516e-05
-d 56 27 2.57096e-05
-d 57 27 2.34677e-05
-d 58 27 2.12257e-05
-d 59 27 1.89837e-05
-d 60 27 1.67417e-05
-d 61 27 1.46737e-05
-d 62 27 1.27228e-05
-d 63 27 1.07719e-05
-d 64 27 8.82099e-06
-d 65 27 6.87009e-06
-d 66 27 5.0896e-06
-d 67 27 4.71705e-06
-d 68 27 4.34451e-06
-d 69 27 3.97196e-06
-d 70 27 3.59941e-06
-d 71 27 3.22686e-06
-d 72 27 2.85431e-06
-d 73 27 2.48176e-06
-d 74 27 2.10921e-06
-d 75 27 1.73666e-06
-d 76 27 1.36411e-06
-d 77 27 1.02855e-06
-d 78 27 9.42931e-07
-d 79 27 8.57316e-07
-d 80 27 7.71701e-07
-d 81 27 6.86086e-07
-d 82 27 6.00471e-07
-d 83 27 5.14856e-07
-d 84 27 4.29241e-07
-d 85 27 3.43626e-07
-d 86 27 2.58011e-07
-d 87 27 1.72396e-07
-d 88 27 9.85409e-08
-d 89 27 9.14091e-08
-d 90 27 8.42773e-08
-d 91 27 7.71456e-08
-d 92 27 7.00138e-08
-d 93 27 6.2882e-08
-d 94 27 5.57503e-08
-d 95 27 4.86185e-08
-d 96 27 4.14867e-08
-d 97 27 3.4355e-08
-d 98 27 2.72232e-08
-d 99 27 2.05821e-08
-d 100 27 1.63235e-08
-d 101 27 1.2065e-08
-d 102 27 7.80643e-09
-d 103 27 3.54786e-09
-d 104 27 -7.10696e-10
-d 105 27 -4.96926e-09
-d 106 27 -9.22782e-09
-d 107 27 -1.34864e-08
-d 108 27 -1.77449e-08
-d 109 27 -2.20035e-08
-d 110 27 -2.62621e-08
-d 111 27 -3.05206e-08
-d 112 27 -3.47792e-08
-d 113 27 -3.90378e-08
-d 114 27 -4.32963e-08
-d 115 27 -4.75549e-08
-d 116 27 -5.18134e-08
-d 117 27 -5.6072e-08
-d 118 27 -6.03306e-08
-d 119 27 -6.45891e-08
-d 120 27 -6.88477e-08
-d 121 27 -8.76373e-06
-d 122 27 0.000131607
-d 123 27 -0.00021685
-d 124 27 -0.000433027
-d 125 27 0.00047234
-d 126 27 0.000211593
-d 127 27 -0.000189601
-d 128 27 3.2492e-05
-d 129 27 0.000575955
-d 130 27 7.72235e-05
-d 131 27 -0.000285172
-d 132 27 -0.000242061
-d 133 27 -0.000135112
-d 134 27 -3.50117e-05
-d 135 27 -2.75868e-05
-d 136 27 5.48974e-05
-d 137 27 1.80604e-07
-d 138 27 5.48911e-05
-d 139 27 3.97478e-05
-d 140 27 0.000192909
-d 141 27 0.000297932
-d 142 27 0.00402253
-d 143 27 -0.0122366
-d 144 27 -0.047853
-d 145 27 -0.0963082
-d 146 27 -0.108071
-d 147 27 -0.0567275
-d 148 27 -0.0239271
-d 149 27 -0.0178628
-d 150 27 -0.0233027
-d 151 27 -0.031853
-d 152 27 -0.0400843
-d 153 27 -0.0482725
-d 154 27 -0.0576154
-d 155 27 -0.0627218
-d 156 27 -0.0511236
-d 157 27 -0.0279524
-d 158 27 -0.0150986
-d 159 27 -0.00931091
-d 160 27 -0.00652876
-d 161 27 -0.00479286
-d 162 27 -0.00344346
-d 163 27 -0.00249578
-d 164 27 -0.0019532
-d 165 27 -0.00157977
-d 166 27 -0.00131848
-d 167 27 -0.00111251
-d 168 27 -0.000939229
-d 169 27 -0.000797445
-d 170 27 -0.000708384
-d 171 27 -0.000630452
-d 172 27 -0.000539722
-d 173 27 -0.000508862
-d 174 27 -0.000480596
-d 175 27 -0.000439484
-d 176 27 -0.000407217
-d 177 27 -0.000363866
-d 178 27 -0.000329506
-d 179 27 -0.000318642
-d 180 27 -0.000307362
-d 181 27 -0.000286511
-d 182 27 -0.000266253
-d 183 27 -0.000242943
-d 184 27 -0.000218107
-d 185 27 -0.000204661
-d 186 27 -0.00020241
-d 187 27 -0.000194435
-d 188 27 -0.000185062
-d 189 27 -0.000173042
-d 190 27 -0.000160549
-d 191 27 -0.000151407
-d 192 27 -0.000145626
-d 193 27 -0.000145976
-d 194 27 -0.000147342
-d 195 27 -0.000145288
-d 196 27 -0.000137979
-d 197 27 -0.000124481
-d 198 27 -0.000123218
-d 199 27 -0.000127453
-d 200 27 -0.000139006
-d 201 27 -0.000145486
-d 202 27 -0.000129764
-d 203 27 -9.82749e-05
-d 204 27 -4.72596e-05
-d 205 27 -3.08671e-05
-d 206 27 -3.28834e-05
-d 207 27 -4.52254e-05
-d 208 27 -6.25389e-05
-d 209 27 -6.32516e-05
-d 210 27 -6.39643e-05
-d 211 27 -6.4677e-05
-d 212 27 -6.53897e-05
-d 213 27 -6.61023e-05
-d 214 27 -6.6815e-05
-d 215 27 -6.75277e-05
-d 216 27 -6.61005e-05
-d 217 27 -6.45173e-05
-d 218 27 -6.29341e-05
-d 219 27 -6.13509e-05
-d 220 27 -5.97676e-05
-d 221 27 -5.81844e-05
-d 222 27 -5.66012e-05
-d 223 27 -5.54231e-05
-d 224 27 -5.4455e-05
-d 225 27 -5.3487e-05
-d 226 27 -5.25189e-05
-d 227 27 -5.15508e-05
-d 228 27 -5.05828e-05
-d 229 27 -4.96147e-05
-d 230 27 -4.86466e-05
-d 231 27 -4.76785e-05
-d 232 27 -4.67105e-05
-d 233 27 -4.57424e-05
-d 234 27 -4.47743e-05
-d 235 27 -4.38063e-05
-d 236 27 -4.28382e-05
-d 237 27 -4.18821e-05
-d 238 27 -4.10211e-05
-d 239 27 -4.016e-05
-d 240 27 -3.9299e-05
-d 241 27 -3.8438e-05
-d 242 27 4.29885e-05
-d 243 27 5.14113e-05
-d 244 27 -0.000127986
-d 245 27 -0.000611463
-d 246 27 -0.000149428
-d 247 27 0.000882394
-d 248 27 0.00297059
-d 249 27 -0.00405825
-d 250 27 -0.00591067
-d 251 27 -0.00546997
-d 252 27 -0.00158744
-d 253 27 0.00190677
-d 254 27 0.00298403
-d 255 27 0.00268595
-d 256 27 0.00196161
-d 257 27 0.00130289
-d 258 27 0.000783347
-d 259 27 0.000520683
-d 260 27 0.000565306
-d 261 27 0.00053419
-d 262 27 -0.00224696
-d 263 27 -0.000920818
-d 264 27 0.0132755
-d 265 27 0.0322504
-d 266 27 0.0442808
-d 267 27 0.0638615
-d 268 27 0.0701007
-d 269 27 0.0539356
-d 270 27 0.0247771
-d 271 27 0.056244
-d 272 27 0.294266
-d 273 27 0.831368
-d 274 27 1.45424
-d 275 27 2.02898
-d 276 27 2.54559
-d 277 27 2.9937
-d 278 27 3.35333
-d 279 27 3.72609
-d 280 27 4.06363
-d 281 27 4.32789
-d 282 27 4.52413
-d 283 27 4.66504
-d 284 27 4.7652
-d 285 27 4.83637
-d 286 27 4.88631
-d 287 27 4.92109
-d 288 27 4.94464
-d 289 27 4.96046
-d 290 27 4.97218
-d 291 27 4.98079
-d 292 27 4.98679
-d 293 27 4.99076
-d 294 27 4.99361
-d 295 27 4.99555
-d 296 27 4.99686
-d 297 27 4.99783
-d 298 27 4.99853
-d 299 27 4.99902
-d 300 27 4.99936
-d 301 27 4.99959
-d 302 27 4.99973
-d 303 27 4.99983
-d 304 27 4.9999
-d 305 27 4.99993
-d 306 27 4.99996
-d 307 27 4.99998
-d 308 27 5.0
-d 309 27 5.00001
-d 310 27 5.0
-d 311 27 4.99999
-d 312 27 4.99997
-d 313 27 4.99994
-d 314 27 4.99993
-d 315 27 4.99994
-d 316 27 4.99996
-d 317 27 4.99999
-d 318 27 5.00004
-d 319 27 5.00006
-d 320 27 5.00005
-d 321 27 5.00003
-d 322 27 5.00002
-d 323 27 5.00001
-d 324 27 5.0
-d 325 27 4.99999
-d 326 27 4.99999
-d 327 27 4.99999
-d 328 27 4.99999
-d 329 27 4.99999
-d 330 27 4.99999
-d 331 27 4.99999
-d 332 27 5.0
-d 333 27 5.0
-d 334 27 5.0
-d 335 27 5.0
-d 336 27 5.0
-d 337 27 5.0
-d 338 27 5.00001
-d 339 27 5.00001
-d 340 27 5.00001
-d 341 27 5.00001
-d 342 27 5.00001
-d 343 27 5.00001
-d 344 27 5.00001
-d 345 27 5.00001
-d 346 27 5.00001
-d 347 27 5.00001
-d 348 27 5.00001
-d 349 27 5.00001
-d 350 27 5.00001
-d 351 27 5.0
-d 352 27 5.0
-d 353 27 5.0
-d 354 27 5.0
-d 355 27 5.0
-d 356 27 4.99999
-d 357 27 4.99999
-d 358 27 4.99999
-d 359 27 4.99999
-d 360 27 4.99999
-d 361 27 4.99998
-d 1 28 5.0
-d 2 28 4.99984
-d 3 28 4.99796
-d 4 28 4.99478
-d 5 28 4.9889
-d 6 28 4.98738
-d 7 28 4.98896
-d 8 28 4.99087
-d 9 28 4.99262
-d 10 28 4.99419
-d 11 28 4.99552
-d 12 28 4.99659
-d 13 28 4.99743
-d 14 28 4.99807
-d 15 28 4.99855
-d 16 28 4.9989
-d 17 28 4.99894
-d 18 28 4.99908
-d 19 28 4.99935
-d 20 28 5.00001
-d 21 28 5.0007
-d 22 28 5.00132
-d 23 28 5.00032
-d 24 28 4.99976
-d 25 28 5.00134
-d 26 28 5.00339
-d 27 28 5.00315
-d 28 28 5.00157
-d 29 28 5.00091
-d 30 28 5.00058
-d 31 28 5.00012
-d 32 28 4.99944
-d 33 28 4.99886
-d 34 28 4.9994
-d 35 28 4.99934
-d 36 28 4.99899
-d 37 28 4.99876
-d 38 28 4.99868
-d 39 28 4.99872
-d 40 28 4.99883
-d 41 28 4.99898
-d 42 28 4.99914
-d 43 28 4.9993
-d 44 28 4.99944
-d 45 28 4.99956
-d 46 28 4.99967
-d 47 28 4.99976
-d 48 28 4.99982
-d 49 28 4.99986
-d 50 28 4.9999
-d 51 28 4.99993
-d 52 28 4.99997
-d 53 28 4.99997
-d 54 28 4.99998
-d 55 28 4.99998
-d 56 28 4.99998
-d 57 28 4.99998
-d 58 28 4.99998
-d 59 28 4.99998
-d 60 28 4.99998
-d 61 28 4.99998
-d 62 28 4.99999
-d 63 28 4.99999
-d 64 28 4.99999
-d 65 28 4.99999
-d 66 28 5.0
-d 67 28 5.0
-d 68 28 5.0
-d 69 28 5.0
-d 70 28 5.0
-d 71 28 5.0
-d 72 28 5.0
-d 73 28 5.0
-d 74 28 5.0
-d 75 28 5.0
-d 76 28 5.0
-d 77 28 5.0
-d 78 28 5.0
-d 79 28 5.0
-d 80 28 5.0
-d 81 28 5.0
-d 82 28 5.0
-d 83 28 5.0
-d 84 28 5.0
-d 85 28 5.0
-d 86 28 5.0
-d 87 28 5.0
-d 88 28 5.0
-d 89 28 5.0
-d 90 28 5.0
-d 91 28 5.0
-d 92 28 5.0
-d 93 28 5.0
-d 94 28 5.0
-d 95 28 5.0
-d 96 28 5.0
-d 97 28 5.0
-d 98 28 5.0
-d 99 28 5.0
-d 100 28 5.0
-d 101 28 5.0
-d 102 28 5.0
-d 103 28 5.0
-d 104 28 5.0
-d 105 28 5.0
-d 106 28 5.0
-d 107 28 5.0
-d 108 28 5.0
-d 109 28 5.0
-d 110 28 5.0
-d 111 28 5.0
-d 112 28 5.0
-d 113 28 5.0
-d 114 28 5.0
-d 115 28 5.0
-d 116 28 5.0
-d 117 28 5.0
-d 118 28 5.0
-d 119 28 5.0
-d 120 28 5.0
-d 121 28 5.00009
-d 122 28 5.00028
-d 123 28 5.00015
-d 124 28 4.99983
-d 125 28 5.00036
-d 126 28 4.99996
-d 127 28 4.99834
-d 128 28 4.99783
-d 129 28 5.00383
-d 130 28 5.00734
-d 131 28 5.00387
-d 132 28 5.00058
-d 133 28 4.99893
-d 134 28 4.99836
-d 135 28 4.99832
-d 136 28 4.99854
-d 137 28 4.99873
-d 138 28 4.99905
-d 139 28 4.99927
-d 140 28 4.99952
-d 141 28 4.99969
-d 142 28 4.99834
-d 143 28 4.99536
-d 144 28 4.99163
-d 145 28 4.99073
-d 146 28 5.0053
-d 147 28 5.03631
-d 148 28 5.03103
-d 149 28 4.9008
-d 150 28 4.62503
-d 151 28 4.21887
-d 152 28 3.70902
-d 153 28 3.09967
-d 154 28 2.35791
-d 155 28 1.41912
-d 156 28 0.519675
-d 157 28 0.210458
-d 158 28 0.131362
-d 159 28 0.0980819
-d 160 28 0.0708209
-d 161 28 0.0471701
-d 162 28 0.0323272
-d 163 28 0.0253535
-d 164 28 0.0199144
-d 165 28 0.0152615
-d 166 28 0.0117228
-d 167 28 0.00917696
-d 168 28 0.00738117
-d 169 28 0.00609292
-d 170 28 0.00512664
-d 171 28 0.00436184
-d 172 28 0.0037961
-d 173 28 0.00331639
-d 174 28 0.00289006
-d 175 28 0.0025477
-d 176 28 0.00226529
-d 177 28 0.00202925
-d 178 28 0.00182793
-d 179 28 0.00165474
-d 180 28 0.00150531
-d 181 28 0.00137529
-d 182 28 0.00125983
-d 183 28 0.00115603
-d 184 28 0.00106455
-d 185 28 0.000982977
-d 186 28 0.000911255
-d 187 28 0.000846819
-d 188 28 0.000790092
-d 189 28 0.000738698
-d 190 28 0.000692816
-d 191 28 0.00065107
-d 192 28 0.000613595
-d 193 28 0.000579642
-d 194 28 0.000548935
-d 195 28 0.00052106
-d 196 28 0.000495598
-d 197 28 0.000472174
-d 198 28 0.000450849
-d 199 28 0.000431118
-d 200 28 0.000412667
-d 201 28 0.000395868
-d 202 28 0.000381319
-d 203 28 0.000368487
-d 204 28 0.000357327
-d 205 28 0.000344212
-d 206 28 0.000330334
-d 207 28 0.00031622
-d 208 28 0.000303298
-d 209 28 0.000295809
-d 210 28 0.00028832
-d 211 28 0.000280831
-d 212 28 0.000273342
-d 213 28 0.000265853
-d 214 28 0.000258364
-d 215 28 0.000250875
-d 216 28 0.000245118
-d 217 28 0.000239488
-d 218 28 0.000233857
-d 219 28 0.000228227
-d 220 28 0.000222596
-d 221 28 0.000216966
-d 222 28 0.000211336
-d 223 28 0.000207047
-d 224 28 0.000203455
-d 225 28 0.000199863
-d 226 28 0.00019627
-d 227 28 0.000192678
-d 228 28 0.000189085
-d 229 28 0.000185493
-d 230 28 0.0001819
-d 231 28 0.000178308
-d 232 28 0.000174716
-d 233 28 0.000171123
-d 234 28 0.000167531
-d 235 28 0.000163938
-d 236 28 0.000160346
-d 237 28 0.000156835
-d 238 28 0.000153973
-d 239 28 0.00015111
-d 240 28 0.000148248
-d 241 28 0.000145385
-d 242 28 0.000296579
-d 243 28 -3.96718e-05
-d 244 28 -0.000449085
-d 245 28 0.000323433
-d 246 28 0.000750086
-d 247 28 0.000268264
-d 248 28 0.000149028
-d 249 28 -0.000100249
-d 250 28 7.00956e-05
-d 251 28 0.00012605
-d 252 28 0.00022592
-d 253 28 0.000193036
-d 254 28 0.000120453
-d 255 28 8.07865e-05
-d 256 28 7.65771e-05
-d 257 28 -3.27828e-05
-d 258 28 0.000116759
-d 259 28 0.000169498
-d 260 28 0.000409804
-d 261 28 0.000414965
-d 262 28 0.00092323
-d 263 28 -0.00590633
-d 264 28 -0.0175477
-d 265 28 -0.032433
-d 266 28 -0.0559842
-d 267 28 -0.0820373
-d 268 28 0.0688484
-d 269 28 0.626629
-d 270 28 1.32929
-d 271 28 2.01657
-d 272 28 2.60925
-d 273 28 3.12329
-d 274 28 3.38952
-d 275 28 3.14128
-d 276 28 2.38463
-d 277 28 1.23802
-d 278 28 0.316019
-d 279 28 0.107832
-d 280 28 0.0694707
-d 281 28 0.051837
-d 282 28 0.035247
-d 283 28 0.0209999
-d 284 28 0.0116618
-d 285 28 0.00967674
-d 286 28 0.00789182
-d 287 28 0.00574566
-d 288 28 0.00386872
-d 289 28 0.00258612
-d 290 28 0.00167126
-d 291 28 0.00104169
-d 292 28 0.000641093
-d 293 28 0.000401246
-d 294 28 0.000277928
-d 295 28 0.000171775
-d 296 28 0.000102266
-d 297 28 5.89376e-05
-d 298 28 3.29258e-05
-d 299 28 1.80463e-05
-d 300 28 1.0057e-05
-d 301 28 6.4571e-06
-d 302 28 5.10093e-06
-d 303 28 4.06791e-06
-d 304 28 3.62716e-06
-d 305 28 3.63321e-06
-d 306 28 3.99625e-06
-d 307 28 4.64368e-06
-d 308 28 5.20886e-06
-d 309 28 4.77728e-06
-d 310 28 3.23919e-06
-d 311 28 1.14113e-06
-d 312 28 -1.29416e-06
-d 313 28 -4.15607e-06
-d 314 28 -1.88532e-06
-d 315 28 5.24411e-06
-d 316 28 1.38678e-05
-d 317 28 1.28823e-05
-d 318 28 3.6758e-06
-d 319 28 -2.52285e-06
-d 320 28 -3.97133e-06
-d 321 28 -4.03071e-06
-d 322 28 -3.37154e-06
-d 323 28 -2.71238e-06
-d 324 28 -2.05321e-06
-d 325 28 -1.39404e-06
-d 326 28 -7.34872e-07
-d 327 28 -3.73325e-07
-d 328 28 -1.05873e-07
-d 329 28 1.61578e-07
-d 330 28 4.2903e-07
-d 331 28 6.96482e-07
-d 332 28 8.18468e-07
-d 333 28 7.60065e-07
-d 334 28 7.01662e-07
-d 335 28 6.43258e-07
-d 336 28 5.84855e-07
-d 337 28 5.26452e-07
-d 338 28 4.68049e-07
-d 339 28 4.09646e-07
-d 340 28 3.51243e-07
-d 341 28 2.9284e-07
-d 342 28 2.34437e-07
-d 343 28 1.71213e-07
-d 344 28 1.06928e-07
-d 345 28 4.2644e-08
-d 346 28 -2.16403e-08
-d 347 28 -8.59247e-08
-d 348 28 -1.50209e-07
-d 349 28 -2.14493e-07
-d 350 28 -2.78778e-07
-d 351 28 -3.43062e-07
-d 352 28 -4.07346e-07
-d 353 28 -4.55065e-07
-d 354 28 -4.3348e-07
-d 355 28 -4.11896e-07
-d 356 28 -3.90311e-07
-d 357 28 -3.68726e-07
-d 358 28 -3.47141e-07
-d 359 28 -3.25556e-07
-d 360 28 -3.03971e-07
-d 361 28 -2.82386e-07
-d 1 29 0.368163
-d 2 29 0.361756
-d 3 29 0.327463
-d 4 29 0.269513
-d 5 29 0.149476
-d 6 29 0.0805716
-d 7 29 0.0501146
-d 8 29 0.03403
-d 9 29 0.0230886
-d 10 29 0.0160474
-d 11 29 0.0116071
-d 12 29 0.00870013
-d 13 29 0.00679614
-d 14 29 0.00542384
-d 15 29 0.00432512
-d 16 29 0.00340653
-d 17 29 -0.00129719
-d 18 29 -0.00399429
-d 19 29 -0.00318719
-d 20 29 0.00443085
-d 21 29 0.0150156
-d 22 29 0.0334147
-d 23 29 0.0132288
-d 24 29 -0.0189751
-d 25 29 -0.0508377
-d 26 29 -0.0252174
-d 27 29 -0.0142489
-d 28 29 -0.00675908
-d 29 29 -0.0038653
-d 30 29 -0.00243423
-d 31 29 -0.00168891
-d 32 29 -0.00120901
-d 33 29 -0.000900426
-d 34 29 -0.000685575
-d 35 29 -0.000557595
-d 36 29 -0.000457268
-d 37 29 -0.000377427
-d 38 29 -0.000315269
-d 39 29 -0.000266613
-d 40 29 -0.000228397
-d 41 29 -0.000198283
-d 42 29 -0.000174248
-d 43 29 -0.000154886
-d 44 29 -0.00013892
-d 45 29 -0.000125864
-d 46 29 -0.000115189
-d 47 29 -0.000105841
-d 48 29 -9.66611e-05
-d 49 29 -8.84262e-05
-d 50 29 -8.23872e-05
-d 51 29 -7.74668e-05
-d 52 29 -7.25463e-05
-d 53 29 -6.79992e-05
-d 54 29 -6.35276e-05
-d 55 29 -5.92413e-05
-d 56 29 -5.68994e-05
-d 57 29 -5.45574e-05
-d 58 29 -5.22154e-05
-d 59 29 -4.98735e-05
-d 60 29 -4.75315e-05
-d 61 29 -4.54981e-05
-d 62 29 -4.36726e-05
-d 63 29 -4.18471e-05
-d 64 29 -4.00216e-05
-d 65 29 -3.81961e-05
-d 66 29 -3.64559e-05
-d 67 29 -3.54209e-05
-d 68 29 -3.43858e-05
-d 69 29 -3.33508e-05
-d 70 29 -3.23157e-05
-d 71 29 -3.12807e-05
-d 72 29 -3.02456e-05
-d 73 29 -2.92105e-05
-d 74 29 -2.81755e-05
-d 75 29 -2.71404e-05
-d 76 29 -2.61054e-05
-d 77 29 -2.51232e-05
-d 78 29 -2.44984e-05
-d 79 29 -2.38736e-05
-d 80 29 -2.32487e-05
-d 81 29 -2.26239e-05
-d 82 29 -2.19991e-05
-d 83 29 -2.13742e-05
-d 84 29 -2.07494e-05
-d 85 29 -2.01246e-05
-d 86 29 -1.94998e-05
-d 87 29 -1.88749e-05
-d 88 29 -1.82865e-05
-d 89 29 -1.79044e-05
-d 90 29 -1.75224e-05
-d 91 29 -1.71403e-05
-d 92 29 -1.67582e-05
-d 93 29 -1.63762e-05
-d 94 29 -1.59941e-05
-d 95 29 -1.56121e-05
-d 96 29 -1.523e-05
-d 97 29 -1.4848e-05
-d 98 29 -1.44659e-05
-d 99 29 -1.41138e-05
-d 100 29 -1.39075e-05
-d 101 29 -1.37011e-05
-d 102 29 -1.34947e-05
-d 103 29 -1.32883e-05
-d 104 29 -1.30819e-05
-d 105 29 -1.28755e-05
-d 106 29 -1.26691e-05
-d 107 29 -1.24627e-05
-d 108 29 -1.22563e-05
-d 109 29 -1.205e-05
-d 110 29 -1.18436e-05
-d 111 29 -1.16372e-05
-d 112 29 -1.14308e-05
-d 113 29 -1.12244e-05
-d 114 29 -1.1018e-05
-d 115 29 -1.08116e-05
-d 116 29 -1.06052e-05
-d 117 29 -1.03988e-05
-d 118 29 -1.01924e-05
-d 119 29 -9.98605e-06
-d 120 29 -9.77966e-06
-d 121 29 -2.85319e-05
-d 122 29 0.00281092
-d 123 29 0.00180106
-d 124 29 -0.000981083
-d 125 29 0.00551926
-d 126 29 -0.00119763
-d 127 29 -0.0295069
-d 128 29 -0.0367677
-d 129 29 0.064749
-d 130 29 0.119022
-d 131 29 0.0882007
-d 132 29 0.0552062
-d 133 29 0.03418
-d 134 29 0.0223243
-d 135 29 0.015545
-d 136 29 0.011949
-d 137 29 0.00757134
-d 138 29 0.00667655
-d 139 29 0.00583243
-d 140 29 0.00644443
-d 141 29 0.00650959
-d 142 29 -0.0302575
-d 143 29 -0.0437806
-d 144 29 -0.0355466
-d 145 29 0.0381776
-d 146 29 0.282109
-d 147 29 0.674178
-d 148 29 1.07582
-d 149 29 1.45189
-d 150 29 1.789
-d 151 29 2.08649
-d 152 29 2.34663
-d 153 29 2.57245
-d 154 29 2.81211
-d 155 29 3.04778
-d 156 29 3.2523
-d 157 29 3.45877
-d 158 29 3.65593
-d 159 29 3.83396
-d 160 29 3.9923
-d 161 29 4.13368
-d 162 29 4.25864
-d 163 29 4.36719
-d 164 29 4.46064
-d 165 29 4.54086
-d 166 29 4.60962
-d 167 29 4.66835
-d 168 29 4.71838
-d 169 29 4.76094
-d 170 29 4.79716
-d 171 29 4.82796
-d 172 29 4.85413
-d 173 29 4.87634
-d 174 29 4.89518
-d 175 29 4.91116
-d 176 29 4.92476
-d 177 29 4.93631
-d 178 29 4.94608
-d 179 29 4.95434
-d 180 29 4.9613
-d 181 29 4.96715
-d 182 29 4.97211
-d 183 29 4.97638
-d 184 29 4.98001
-d 185 29 4.98312
-d 186 29 4.98571
-d 187 29 4.98795
-d 188 29 4.98979
-d 189 29 4.99138
-d 190 29 4.99269
-d 191 29 4.99381
-d 192 29 4.99474
-d 193 29 4.99551
-d 194 29 4.99615
-d 195 29 4.99668
-d 196 29 4.99713
-d 197 29 4.99752
-d 198 29 4.99783
-d 199 29 4.99811
-d 200 29 4.99836
-d 201 29 4.99858
-d 202 29 4.99873
-d 203 29 4.99884
-d 204 29 4.99892
-d 205 29 4.999
-d 206 29 4.99907
-d 207 29 4.99912
-d 208 29 4.99916
-d 209 29 4.99921
-d 210 29 4.99926
-d 211 29 4.99932
-d 212 29 4.99937
-d 213 29 4.99942
-d 214 29 4.99948
-d 215 29 4.99953
-d 216 29 4.99956
-d 217 29 4.99958
-d 218 29 4.99961
-d 219 29 4.99963
-d 220 29 4.99966
-d 221 29 4.99968
-d 222 29 4.99971
-d 223 29 4.99972
-d 224 29 4.99973
-d 225 29 4.99974
-d 226 29 4.99975
-d 227 29 4.99976
-d 228 29 4.99977
-d 229 29 4.99978
-d 230 29 4.99979
-d 231 29 4.9998
-d 232 29 4.9998
-d 233 29 4.99981
-d 234 29 4.99982
-d 235 29 4.99983
-d 236 29 4.99984
-d 237 29 4.99985
-d 238 29 4.99986
-d 239 29 4.99986
-d 240 29 4.99987
-d 241 29 4.99987
-d 242 29 5.00498
-d 243 29 5.00354
-d 244 29 4.99359
-d 245 29 4.98981
-d 246 29 5.00498
-d 247 29 5.00099
-d 248 29 5.00041
-d 249 29 5.00022
-d 250 29 5.00015
-d 251 29 5.00012
-d 252 29 5.0001
-d 253 29 5.00008
-d 254 29 5.00005
-d 255 29 5.00003
-d 256 29 5.0
-d 257 29 4.99431
-d 258 29 4.99459
-d 259 29 4.99591
-d 260 29 5.00087
-d 261 29 5.01029
-d 262 29 5.03935
-d 263 29 4.92784
-d 264 29 4.51643
-d 265 29 3.78356
-d 266 29 2.68745
-d 267 29 1.43417
-d 268 29 0.583128
-d 269 29 0.205094
-d 270 29 0.0777337
-d 271 29 0.0391566
-d 272 29 0.02723
-d 273 29 0.023883
-d 274 29 0.018808
-d 275 29 0.010165
-d 276 29 0.00254623
-d 277 29 -0.00377463
-d 278 29 -0.0038097
-d 279 29 0.00144145
-d 280 29 0.00267231
-d 281 29 0.00193045
-d 282 29 0.00144538
-d 283 29 0.00121758
-d 284 29 0.00112893
-d 285 29 0.00109424
-d 286 29 0.0010226
-d 287 29 0.000948072
-d 288 29 0.000882573
-d 289 29 0.000826996
-d 290 29 0.000776391
-d 291 29 0.000729719
-d 292 29 0.000686499
-d 293 29 0.000647333
-d 294 29 0.000610108
-d 295 29 0.000575631
-d 296 29 0.000545069
-d 297 29 0.000515485
-d 298 29 0.000488514
-d 299 29 0.000465316
-d 300 29 0.000443215
-d 301 29 0.000422454
-d 302 29 0.00040292
-d 303 29 0.00038488
-d 304 29 0.000368472
-d 305 29 0.000353628
-d 306 29 0.000339643
-d 307 29 0.000326197
-d 308 29 0.000313483
-d 309 29 0.000302884
-d 310 29 0.000294038
-d 311 29 0.000284003
-d 312 29 0.000270941
-d 313 29 0.000254925
-d 314 29 0.000246511
-d 315 29 0.000244089
-d 316 29 0.000245538
-d 317 29 0.000242099
-d 318 29 0.000235728
-d 319 29 0.000227482
-d 320 29 0.000218001
-d 321 29 0.000207257
-d 322 29 0.000202127
-d 323 29 0.000196997
-d 324 29 0.000191868
-d 325 29 0.000186738
-d 326 29 0.000181608
-d 327 29 0.00017758
-d 328 29 0.000173899
-d 329 29 0.000170219
-d 330 29 0.000166538
-d 331 29 0.000162857
-d 332 29 0.000159576
-d 333 29 0.00015679
-d 334 29 0.000154005
-d 335 29 0.000151219
-d 336 29 0.000148433
-d 337 29 0.000145647
-d 338 29 0.000142861
-d 339 29 0.000140076
-d 340 29 0.00013729
-d 341 29 0.000134504
-d 342 29 0.000131718
-d 343 29 0.000129603
-d 344 29 0.000127635
-d 345 29 0.000125668
-d 346 29 0.0001237
-d 347 29 0.000121732
-d 348 29 0.000119765
-d 349 29 0.000117797
-d 350 29 0.000115829
-d 351 29 0.000113862
-d 352 29 0.000111894
-d 353 29 0.000109993
-d 354 29 0.000108372
-d 355 29 0.000106751
-d 356 29 0.00010513
-d 357 29 0.000103509
-d 358 29 0.000101887
-d 359 29 0.000100266
-d 360 29 9.86449e-05
-d 361 29 9.70237e-05
-d 1 30 5.0
-d 2 30 4.99899
-d 3 30 4.99654
-d 4 30 4.99327
-d 5 30 4.9863
-d 6 30 4.98954
-d 7 30 4.99212
-d 8 30 4.99378
-d 9 30 4.9951
-d 10 30 4.99624
-d 11 30 4.99715
-d 12 30 4.99786
-d 13 30 4.99839
-d 14 30 4.99879
-d 15 30 4.99909
-d 16 30 4.99931
-d 17 30 4.99922
-d 18 30 4.99933
-d 19 30 4.99971
-d 20 30 5.00064
-d 21 30 5.00084
-d 22 30 5.00123
-d 23 30 4.99865
-d 24 30 4.99853
-d 25 30 4.99983
-d 26 30 5.00457
-d 27 30 5.00242
-d 28 30 5.00105
-d 29 30 5.00062
-d 30 30 5.00042
-d 31 30 4.99971
-d 32 30 4.9994
-d 33 30 4.9992
-d 34 30 4.9996
-d 35 30 4.99955
-d 36 30 4.99932
-d 37 30 4.99918
-d 38 30 4.99915
-d 39 30 4.99919
-d 40 30 4.99927
-d 41 30 4.99937
-d 42 30 4.99948
-d 43 30 4.99957
-d 44 30 4.99966
-d 45 30 4.99974
-d 46 30 4.9998
-d 47 30 4.99985
-d 48 30 4.99989
-d 49 30 4.99992
-d 50 30 4.99993
-d 51 30 4.99994
-d 52 30 4.99994
-d 53 30 4.99996
-d 54 30 4.99998
-d 55 30 5.0
-d 56 30 5.0
-d 57 30 5.00001
-d 58 30 5.00001
-d 59 30 5.00001
-d 60 30 5.00002
-d 61 30 5.00002
-d 62 30 5.00001
-d 63 30 5.00001
-d 64 30 5.00001
-d 65 30 5.0
-d 66 30 5.0
-d 67 30 5.0
-d 68 30 5.0
-d 69 30 4.99999
-d 70 30 4.99999
-d 71 30 4.99999
-d 72 30 4.99999
-d 73 30 4.99999
-d 74 30 4.99999
-d 75 30 4.99999
-d 76 30 4.99998
-d 77 30 4.99998
-d 78 30 4.99999
-d 79 30 4.99999
-d 80 30 4.99999
-d 81 30 4.99999
-d 82 30 4.99999
-d 83 30 4.99999
-d 84 30 4.99999
-d 85 30 4.99999
-d 86 30 5.0
-d 87 30 5.0
-d 88 30 5.0
-d 89 30 5.0
-d 90 30 5.0
-d 91 30 5.0
-d 92 30 5.00001
-d 93 30 5.00001
-d 94 30 5.00001
-d 95 30 5.00001
-d 96 30 5.00001
-d 97 30 5.00001
-d 98 30 5.00001
-d 99 30 5.00002
-d 100 30 5.00002
-d 101 30 5.00001
-d 102 30 5.00001
-d 103 30 5.00001
-d 104 30 5.00001
-d 105 30 5.00001
-d 106 30 5.00001
-d 107 30 5.00001
-d 108 30 5.00001
-d 109 30 5.00001
-d 110 30 5.00001
-d 111 30 5.00001
-d 112 30 5.00001
-d 113 30 5.00001
-d 114 30 5.00001
-d 115 30 5.0
-d 116 30 5.0
-d 117 30 5.0
-d 118 30 5.0
-d 119 30 5.0
-d 120 30 5.0
-d 121 30 4.9997
-d 122 30 4.99998
-d 123 30 4.99954
-d 124 30 4.99963
-d 125 30 5.00059
-d 126 30 4.99945
-d 127 30 4.99732
-d 128 30 4.99957
-d 129 30 5.00919
-d 130 30 5.00558
-d 131 30 5.00033
-d 132 30 4.99851
-d 133 30 4.9983
-d 134 30 4.99854
-d 135 30 4.99871
-d 136 30 4.99928
-d 137 30 4.99914
-d 138 30 4.99939
-d 139 30 4.99952
-d 140 30 4.9998
-d 141 30 4.99976
-d 142 30 4.99744
-d 143 30 4.99598
-d 144 30 4.99478
-d 145 30 4.99806
-d 146 30 5.01911
-d 147 30 5.04602
-d 148 30 5.05469
-d 149 30 5.01317
-d 150 30 4.89484
-d 151 30 4.69655
-d 152 30 4.42036
-d 153 30 4.06069
-d 154 30 3.60793
-d 155 30 3.12531
-d 156 30 2.72975
-d 157 30 2.45187
-d 158 30 2.25081
-d 159 30 2.09841
-d 160 30 1.98509
-d 161 30 1.90211
-d 162 30 1.84084
-d 163 30 1.79411
-d 164 30 1.7574
-d 165 30 1.72763
-d 166 30 1.70283
-d 167 30 1.68188
-d 168 30 1.66389
-d 169 30 1.64823
-d 170 30 1.63438
-d 171 30 1.62201
-d 172 30 1.61088
-d 173 30 1.60081
-d 174 30 1.59163
-d 175 30 1.58323
-d 176 30 1.57549
-d 177 30 1.56835
-d 178 30 1.56173
-d 179 30 1.55558
-d 180 30 1.54985
-d 181 30 1.54451
-d 182 30 1.53951
-d 183 30 1.53479
-d 184 30 1.53035
-d 185 30 1.52615
-d 186 30 1.5222
-d 187 30 1.51845
-d 188 30 1.5149
-d 189 30 1.51153
-d 190 30 1.50834
-d 191 30 1.50529
-d 192 30 1.5024
-d 193 30 1.49964
-d 194 30 1.497
-d 195 30 1.49449
-d 196 30 1.49208
-d 197 30 1.48977
-d 198 30 1.48755
-d 199 30 1.48542
-d 200 30 1.48336
-d 201 30 1.48138
-d 202 30 1.47948
-d 203 30 1.47765
-d 204 30 1.4759
-d 205 30 1.47419
-d 206 30 1.47255
-d 207 30 1.47096
-d 208 30 1.46949
-d 209 30 1.46823
-d 210 30 1.46696
-d 211 30 1.4657
-d 212 30 1.46444
-d 213 30 1.46317
-d 214 30 1.46191
-d 215 30 1.46065
-d 216 30 1.45956
-d 217 30 1.4585
-d 218 30 1.45743
-d 219 30 1.45636
-d 220 30 1.45529
-d 221 30 1.45422
-d 222 30 1.45315
-d 223 30 1.45226
-d 224 30 1.45145
-d 225 30 1.45064
-d 226 30 1.44983
-d 227 30 1.44902
-d 228 30 1.44821
-d 229 30 1.4474
-d 230 30 1.44659
-d 231 30 1.44579
-d 232 30 1.44498
-d 233 30 1.44417
-d 234 30 1.44336
-d 235 30 1.44255
-d 236 30 1.44174
-d 237 30 1.44094
-d 238 30 1.44019
-d 239 30 1.43944
-d 240 30 1.43868
-d 241 30 1.43793
-d 242 30 1.43765
-d 243 30 1.43679
-d 244 30 1.43515
-d 245 30 1.43405
-d 246 30 1.43478
-d 247 30 1.43387
-d 248 30 1.43345
-d 249 30 1.43184
-d 250 30 1.43086
-d 251 30 1.43021
-d 252 30 1.43003
-d 253 30 1.42988
-d 254 30 1.42944
-d 255 30 1.42883
-d 256 30 1.42818
-d 257 30 1.42702
-d 258 30 1.42642
-d 259 30 1.42595
-d 260 30 1.42586
-d 261 30 1.42616
-d 262 30 1.42783
-d 263 30 1.41733
-d 264 30 1.38106
-d 265 30 1.30738
-d 266 30 1.3877
-d 267 30 2.09819
-d 268 30 3.05285
-d 269 30 3.58059
-d 270 30 3.77601
-d 271 30 3.87609
-d 272 30 4.02557
-d 273 30 4.24887
-d 274 30 4.4608
-d 275 30 4.60411
-d 276 30 4.72109
-d 277 30 4.8255
-d 278 30 4.90465
-d 279 30 4.97379
-d 280 30 5.01253
-d 281 30 5.01532
-d 282 30 5.01239
-d 283 30 5.0092
-d 284 30 5.00665
-d 285 30 5.00474
-d 286 30 5.00333
-d 287 30 5.00232
-d 288 30 5.00163
-d 289 30 5.00117
-d 290 30 5.00082
-d 291 30 5.00057
-d 292 30 5.00039
-d 293 30 5.00027
-d 294 30 5.00019
-d 295 30 5.00013
-d 296 30 5.00009
-d 297 30 5.00006
-d 298 30 5.00004
-d 299 30 5.00003
-d 300 30 5.00002
-d 301 30 5.00001
-d 302 30 5.00001
-d 303 30 5.0
-d 304 30 5.0
-d 305 30 5.0
-d 306 30 4.99998
-d 307 30 4.99995
-d 308 30 4.99992
-d 309 30 4.99996
-d 310 30 5.00005
-d 311 30 5.00012
-d 312 30 5.00008
-d 313 30 4.99996
-d 314 30 4.9999
-d 315 30 4.99985
-d 316 30 4.99986
-d 317 30 4.99997
-d 318 30 5.00021
-d 319 30 5.0003
-d 320 30 5.00024
-d 321 30 5.00009
-d 322 30 5.00007
-d 323 30 5.00005
-d 324 30 5.00003
-d 325 30 5.00001
-d 326 30 4.99998
-d 327 30 4.99998
-d 328 30 4.99998
-d 329 30 4.99999
-d 330 30 4.99999
-d 331 30 5.0
-d 332 30 5.0
-d 333 30 5.0
-d 334 30 5.0
-d 335 30 5.0
-d 336 30 5.00001
-d 337 30 5.00001
-d 338 30 5.00001
-d 339 30 5.00001
-d 340 30 5.00001
-d 341 30 5.00001
-d 342 30 5.00002
-d 343 30 5.00002
-d 344 30 5.00001
-d 345 30 5.00001
-d 346 30 5.00001
-d 347 30 5.00001
-d 348 30 5.00001
-d 349 30 5.00001
-d 350 30 5.0
-d 351 30 5.0
-d 352 30 5.0
-d 353 30 5.0
-d 354 30 5.0
-d 355 30 4.99999
-d 356 30 4.99999
-d 357 30 4.99999
-d 358 30 4.99999
-d 359 30 4.99998
-d 360 30 4.99998
-d 361 30 4.99998
-d 1 31 7.10441e-10
-d 2 31 5.70385e-05
-d 3 31 0.000226143
-d 4 31 0.000131916
-d 5 31 -0.000887764
-d 6 31 -8.01837e-05
-d 7 31 -3.49653e-05
-d 8 31 9.40039e-05
-d 9 31 0.000118663
-d 10 31 0.000108025
-d 11 31 8.6059e-05
-d 12 31 6.33268e-05
-d 13 31 4.99295e-05
-d 14 31 3.16843e-05
-d 15 31 3.60692e-05
-d 16 31 2.07572e-05
-d 17 31 -8.6375e-05
-d 18 31 3.44583e-05
-d 19 31 8.07397e-05
-d 20 31 0.000196296
-d 21 31 0.000115615
-d 22 31 -7.12768e-05
-d 23 31 -0.000129812
-d 24 31 -4.18679e-05
-d 25 31 7.94364e-05
-d 26 31 0.000182034
-d 27 31 -5.41226e-05
-d 28 31 -0.000451819
-d 29 31 -0.000713937
-d 30 31 -0.00129863
-d 31 31 -0.00262186
-d 32 31 -0.00213417
-d 33 31 -0.00133767
-d 34 31 0.000775698
-d 35 31 0.000969902
-d 36 31 0.000549281
-d 37 31 0.000280946
-d 38 31 0.000140321
-d 39 31 8.6919e-05
-d 40 31 7.22446e-05
-d 41 31 6.5631e-05
-d 42 31 6.45263e-05
-d 43 31 6.63087e-05
-d 44 31 7.17391e-05
-d 45 31 7.59042e-05
-d 46 31 7.59172e-05
-d 47 31 7.03353e-05
-d 48 31 6.33558e-05
-d 49 31 5.31136e-05
-d 50 31 4.64278e-05
-d 51 31 4.40594e-05
-d 52 31 4.16909e-05
-d 53 31 4.05674e-05
-d 54 31 3.96957e-05
-d 55 31 3.87875e-05
-d 56 31 3.74977e-05
-d 57 31 3.62079e-05
-d 58 31 3.49181e-05
-d 59 31 3.36283e-05
-d 60 31 3.23385e-05
-d 61 31 3.12427e-05
-d 62 31 3.02775e-05
-d 63 31 2.93124e-05
-d 64 31 2.83472e-05
-d 65 31 2.7382e-05
-d 66 31 2.64613e-05
-d 67 31 2.59077e-05
-d 68 31 2.5354e-05
-d 69 31 2.48004e-05
-d 70 31 2.42468e-05
-d 71 31 2.36931e-05
-d 72 31 2.31395e-05
-d 73 31 2.25859e-05
-d 74 31 2.20322e-05
-d 75 31 2.14786e-05
-d 76 31 2.0925e-05
-d 77 31 2.03916e-05
-d 78 31 1.9995e-05
-d 79 31 1.95984e-05
-d 80 31 1.92019e-05
-d 81 31 1.88053e-05
-d 82 31 1.84087e-05
-d 83 31 1.80122e-05
-d 84 31 1.76156e-05
-d 85 31 1.7219e-05
-d 86 31 1.68225e-05
-d 87 31 1.64259e-05
-d 88 31 1.6051e-05
-d 89 31 1.57991e-05
-d 90 31 1.55471e-05
-d 91 31 1.52952e-05
-d 92 31 1.50433e-05
-d 93 31 1.47913e-05
-d 94 31 1.45394e-05
-d 95 31 1.42875e-05
-d 96 31 1.40356e-05
-d 97 31 1.37836e-05
-d 98 31 1.35317e-05
-d 99 31 1.32978e-05
-d 100 31 1.31513e-05
-d 101 31 1.30048e-05
-d 102 31 1.28583e-05
-d 103 31 1.27118e-05
-d 104 31 1.25653e-05
-d 105 31 1.24188e-05
-d 106 31 1.22724e-05
-d 107 31 1.21259e-05
-d 108 31 1.19794e-05
-d 109 31 1.18329e-05
-d 110 31 1.16864e-05
-d 111 31 1.15399e-05
-d 112 31 1.13934e-05
-d 113 31 1.12469e-05
-d 114 31 1.11005e-05
-d 115 31 1.0954e-05
-d 116 31 1.08075e-05
-d 117 31 1.0661e-05
-d 118 31 1.05145e-05
-d 119 31 1.0368e-05
-d 120 31 1.02215e-05
-d 121 31 1.76447e-05
-d 122 31 7.21516e-05
-d 123 31 -3.59786e-05
-d 124 31 -0.000159618
-d 125 31 0.000156236
-d 126 31 0.000135106
-d 127 31 -0.000336402
-d 128 31 -0.000302283
-d 129 31 0.000699323
-d 130 31 0.000473866
-d 131 31 -0.000156146
-d 132 31 -0.000225625
-d 133 31 -0.000123592
-d 134 31 -3.78116e-05
-d 135 31 8.47472e-06
-d 136 31 2.43387e-06
-d 137 31 -7.44762e-05
-d 138 31 7.80111e-05
-d 139 31 9.43608e-05
-d 140 31 0.000170159
-d 141 31 8.83919e-05
-d 142 31 -0.00018802
-d 143 31 -0.000373512
-d 144 31 -0.000390597
-d 145 31 0.000156875
-d 146 31 0.0032343
-d 147 31 0.00776304
-d 148 31 -0.000566905
-d 149 31 -0.00760695
-d 150 31 -0.0159226
-d 151 31 -0.0245989
-d 152 31 -0.0331402
-d 153 31 -0.0100902
-d 154 31 0.067837
-d 155 31 0.266702
-d 156 31 0.910818
-d 157 31 1.82282
-d 158 31 2.69714
-d 159 31 3.43247
-d 160 31 3.98325
-d 161 31 4.32893
-d 162 31 4.51529
-d 163 31 4.67087
-d 164 31 4.79288
-d 165 31 4.87574
-d 166 31 4.92797
-d 167 31 4.95902
-d 168 31 4.97655
-d 169 31 4.98622
-d 170 31 4.99195
-d 171 31 4.99526
-d 172 31 4.99735
-d 173 31 4.9991
-d 174 31 4.99974
-d 175 31 4.99982
-d 176 31 4.99974
-d 177 31 4.99961
-d 178 31 4.9995
-d 179 31 4.99943
-d 180 31 4.9994
-d 181 31 4.9994
-d 182 31 4.99942
-d 183 31 4.99944
-d 184 31 4.99948
-d 185 31 4.99952
-d 186 31 4.99956
-d 187 31 4.99961
-d 188 31 4.99965
-d 189 31 4.9997
-d 190 31 4.99974
-d 191 31 4.99977
-d 192 31 4.99981
-d 193 31 4.99983
-d 194 31 4.99986
-d 195 31 4.99988
-d 196 31 4.9999
-d 197 31 4.99991
-d 198 31 4.99992
-d 199 31 4.99993
-d 200 31 4.99994
-d 201 31 4.99995
-d 202 31 4.99995
-d 203 31 4.99996
-d 204 31 4.99997
-d 205 31 4.99997
-d 206 31 4.99998
-d 207 31 4.99998
-d 208 31 4.99999
-d 209 31 4.99999
-d 210 31 4.99999
-d 211 31 5.0
-d 212 31 5.0
-d 213 31 5.0
-d 214 31 5.00001
-d 215 31 5.00001
-d 216 31 5.00001
-d 217 31 5.00001
-d 218 31 5.00001
-d 219 31 5.0
-d 220 31 5.0
-d 221 31 5.0
-d 222 31 5.0
-d 223 31 5.0
-d 224 31 5.0
-d 225 31 5.0
-d 226 31 4.99999
-d 227 31 4.99999
-d 228 31 4.99999
-d 229 31 4.99999
-d 230 31 4.99999
-d 231 31 4.99999
-d 232 31 4.99999
-d 233 31 4.99999
-d 234 31 4.99999
-d 235 31 4.99999
-d 236 31 4.99999
-d 237 31 4.99999
-d 238 31 4.99999
-d 239 31 4.99999
-d 240 31 4.99999
-d 241 31 5.0
-d 242 31 5.00019
-d 243 31 4.99888
-d 244 31 4.99663
-d 245 31 4.99457
-d 246 31 4.99902
-d 247 31 5.00229
-d 248 31 5.00323
-d 249 31 5.00302
-d 250 31 5.0023
-d 251 31 5.0015
-d 252 31 5.00085
-d 253 31 5.00041
-d 254 31 5.00013
-d 255 31 4.99993
-d 256 31 4.99979
-d 257 31 4.99948
-d 258 31 4.99954
-d 259 31 4.99983
-d 260 31 5.00055
-d 261 31 5.00109
-d 262 31 5.00009
-d 263 31 4.9987
-d 264 31 4.998
-d 265 31 4.99755
-d 266 31 4.99676
-d 267 31 4.99618
-d 268 31 5.01091
-d 269 31 5.05272
-d 270 31 5.04156
-d 271 31 4.80112
-d 272 31 4.27692
-d 273 31 3.42343
-d 274 31 2.23953
-d 275 31 0.967179
-d 276 31 0.429813
-d 277 31 0.540757
-d 278 31 1.32991
-d 279 31 2.32147
-d 280 31 3.14903
-d 281 31 3.78143
-d 282 31 4.22325
-d 283 31 4.47978
-d 284 31 4.59448
-d 285 31 4.69875
-d 286 31 4.79798
-d 287 31 4.87419
-d 288 31 4.92339
-d 289 31 4.95249
-d 290 31 4.97174
-d 291 31 4.98408
-d 292 31 4.99124
-d 293 31 4.99478
-d 294 31 4.99729
-d 295 31 4.99868
-d 296 31 4.9992
-d 297 31 4.99941
-d 298 31 4.99947
-d 299 31 4.99946
-d 300 31 4.99943
-d 301 31 4.9994
-d 302 31 4.99939
-d 303 31 4.9994
-d 304 31 4.99942
-d 305 31 4.99946
-d 306 31 4.99951
-d 307 31 4.99956
-d 308 31 4.99961
-d 309 31 4.99967
-d 310 31 4.99973
-d 311 31 4.99977
-d 312 31 4.9998
-d 313 31 4.99981
-d 314 31 4.99983
-d 315 31 4.99984
-d 316 31 4.99987
-d 317 31 4.99992
-d 318 31 5.00001
-d 319 31 5.00005
-d 320 31 5.00001
-d 321 31 4.99994
-d 322 31 4.99995
-d 323 31 4.99995
-d 324 31 4.99996
-d 325 31 4.99996
-d 326 31 4.99996
-d 327 31 4.99997
-d 328 31 4.99997
-d 329 31 4.99997
-d 330 31 4.99998
-d 331 31 4.99998
-d 332 31 4.99998
-d 333 31 4.99998
-d 334 31 4.99999
-d 335 31 4.99999
-d 336 31 4.99999
-d 337 31 4.99999
-d 338 31 5.0
-d 339 31 5.0
-d 340 31 5.0
-d 341 31 5.00001
-d 342 31 5.00001
-d 343 31 5.00001
-d 344 31 5.00001
-d 345 31 5.00001
-d 346 31 5.00001
-d 347 31 5.0
-d 348 31 5.0
-d 349 31 5.0
-d 350 31 5.0
-d 351 31 5.0
-d 352 31 5.0
-d 353 31 5.0
-d 354 31 5.0
-d 355 31 4.99999
-d 356 31 4.99999
-d 357 31 4.99999
-d 358 31 4.99999
-d 359 31 4.99998
-d 360 31 4.99998
-d 361 31 4.99998
-d 1 32 1.8179e-09
-d 2 32 -5.28841e-06
-d 3 32 -1.44913e-05
-d 4 32 -3.62932e-05
-d 5 32 -9.75719e-05
-d 6 32 0.000141781
-d 7 32 3.73396e-05
-d 8 32 -1.65603e-05
-d 9 32 -1.5271e-05
-d 10 32 -6.73884e-06
-d 11 32 4.40157e-06
-d 12 32 -4.85345e-06
-d 13 32 -1.02964e-05
-d 14 32 2.03126e-05
-d 15 32 -1.89457e-05
-d 16 32 -8.75564e-06
-d 17 32 7.67422e-06
-d 18 32 4.71103e-06
-d 19 32 1.29798e-05
-d 20 32 6.13469e-06
-d 21 32 -1.14363e-05
-d 22 32 -0.0394563
-d 23 32 -0.0477298
-d 24 32 -0.0622012
-d 25 32 -0.0519225
-d 26 32 0.262499
-d 27 32 0.943611
-d 28 32 1.67052
-d 29 32 2.31017
-d 30 32 2.84028
-d 31 32 3.28467
-d 32 32 3.61582
-d 33 32 3.85887
-d 34 32 4.13011
-d 35 32 4.36511
-d 36 32 4.54063
-d 37 32 4.67013
-d 38 32 4.76408
-d 39 32 4.83263
-d 40 32 4.8825
-d 41 32 4.91837
-d 42 32 4.94373
-d 43 32 4.96117
-d 44 32 4.97318
-d 45 32 4.98093
-d 46 32 4.98562
-d 47 32 4.98906
-d 48 32 4.99267
-d 49 32 4.99539
-d 50 32 4.99666
-d 51 32 4.99731
-d 52 32 4.99797
-d 53 32 4.99844
-d 54 32 4.99887
-d 55 32 4.99927
-d 56 32 4.99933
-d 57 32 4.99938
-d 58 32 4.99944
-d 59 32 4.99949
-d 60 32 4.99955
-d 61 32 4.9996
-d 62 32 4.99965
-d 63 32 4.9997
-d 64 32 4.99975
-d 65 32 4.9998
-d 66 32 4.99985
-d 67 32 4.99986
-d 68 32 4.99987
-d 69 32 4.99989
-d 70 32 4.9999
-d 71 32 4.99991
-d 72 32 4.99992
-d 73 32 4.99993
-d 74 32 4.99995
-d 75 32 4.99996
-d 76 32 4.99997
-d 77 32 4.99998
-d 78 32 4.99998
-d 79 32 4.99999
-d 80 32 4.99999
-d 81 32 4.99999
-d 82 32 4.99999
-d 83 32 5.0
-d 84 32 5.0
-d 85 32 5.0
-d 86 32 5.0
-d 87 32 5.00001
-d 88 32 5.00001
-d 89 32 5.00001
-d 90 32 5.0
-d 91 32 5.0
-d 92 32 5.0
-d 93 32 5.0
-d 94 32 5.0
-d 95 32 5.0
-d 96 32 4.99999
-d 97 32 4.99999
-d 98 32 4.99999
-d 99 32 4.99999
-d 100 32 4.99999
-d 101 32 4.99999
-d 102 32 4.99999
-d 103 32 4.99999
-d 104 32 4.99999
-d 105 32 4.99999
-d 106 32 4.99999
-d 107 32 4.99999
-d 108 32 4.99999
-d 109 32 4.99999
-d 110 32 4.99999
-d 111 32 4.99999
-d 112 32 4.99999
-d 113 32 4.99999
-d 114 32 4.99999
-d 115 32 4.99999
-d 116 32 4.99999
-d 117 32 4.99999
-d 118 32 4.99999
-d 119 32 4.99999
-d 120 32 4.99999
-d 121 32 4.99999
-d 122 32 4.99997
-d 123 32 5.00002
-d 124 32 5.00004
-d 125 32 5.0001
-d 126 32 5.0001
-d 127 32 4.99987
-d 128 32 5.00009
-d 129 32 5.00021
-d 130 32 5.00002
-d 131 32 5.00004
-d 132 32 4.99988
-d 133 32 5.00013
-d 134 32 4.99993
-d 135 32 5.00026
-d 136 32 4.99973
-d 137 32 5.0
-d 138 32 5.00006
-d 139 32 5.00009
-d 140 32 5.00004
-d 141 32 5.00004
-d 142 32 5.04854
-d 143 32 4.82711
-d 144 32 4.04208
-d 145 32 2.64155
-d 146 32 0.838902
-d 147 32 0.19014
-d 148 32 0.0982549
-d 149 32 0.0723197
-d 150 32 0.0576863
-d 151 32 0.0427644
-d 152 32 0.0301979
-d 153 32 0.020146
-d 154 32 0.0135728
-d 155 32 0.00980358
-d 156 32 0.00774482
-d 157 32 0.00586604
-d 158 32 0.0036687
-d 159 32 0.00211511
-d 160 32 0.00121906
-d 161 32 0.000647581
-d 162 32 0.000828436
-d 163 32 0.00190938
-d 164 32 0.00224254
-d 165 32 0.00199956
-d 166 32 0.00165488
-d 167 32 0.00135612
-d 168 32 0.00113715
-d 169 32 0.000984181
-d 170 32 0.000877175
-d 171 32 0.000789973
-d 172 32 0.000741139
-d 173 32 0.000689338
-d 174 32 0.000625676
-d 175 32 0.000586082
-d 176 32 0.000550152
-d 177 32 0.000529573
-d 178 32 0.000505606
-d 179 32 0.000482117
-d 180 32 0.000460574
-d 181 32 0.000441649
-d 182 32 0.000424674
-d 183 32 0.000408398
-d 184 32 0.000391914
-d 185 32 0.000376272
-d 186 32 0.000361487
-d 187 32 0.000348181
-d 188 32 0.000336045
-d 189 32 0.000324466
-d 190 32 0.000313545
-d 191 32 0.000303046
-d 192 32 0.000293056
-d 193 32 0.00028356
-d 194 32 0.000274586
-d 195 32 0.000266155
-d 196 32 0.000258279
-d 197 32 0.000250938
-d 198 32 0.000243789
-d 199 32 0.000236912
-d 200 32 0.000230244
-d 201 32 0.000224186
-d 202 32 0.000219291
-d 203 32 0.000215346
-d 204 32 0.000212468
-d 205 32 0.000207291
-d 206 32 0.000200862
-d 207 32 0.00019368
-d 208 32 0.000186767
-d 209 32 0.000183515
-d 210 32 0.000180263
-d 211 32 0.00017701
-d 212 32 0.000173758
-d 213 32 0.000170506
-d 214 32 0.000167253
-d 215 32 0.000164001
-d 216 32 0.000161164
-d 217 32 0.000158357
-d 218 32 0.00015555
-d 219 32 0.000152743
-d 220 32 0.000149936
-d 221 32 0.000147129
-d 222 32 0.000144322
-d 223 32 0.000142066
-d 224 32 0.000140096
-d 225 32 0.000138127
-d 226 32 0.000136157
-d 227 32 0.000134187
-d 228 32 0.000132218
-d 229 32 0.000130248
-d 230 32 0.000128278
-d 231 32 0.000126308
-d 232 32 0.000124339
-d 233 32 0.000122369
-d 234 32 0.000120399
-d 235 32 0.000118429
-d 236 32 0.00011646
-d 237 32 0.000114527
-d 238 32 0.000112892
-d 239 32 0.000111258
-d 240 32 0.000109623
-d 241 32 0.000107988
-d 242 32 0.000103598
-d 243 32 6.86052e-05
-d 244 32 3.337e-05
-d 245 32 7.00783e-05
-d 246 32 0.000218764
-d 247 32 0.000221318
-d 248 32 0.000118593
-d 249 32 -0.000113962
-d 250 32 5.78552e-05
-d 251 32 9.42068e-05
-d 252 32 0.000237037
-d 253 32 0.000171302
-d 254 32 0.0001033
-d 255 32 6.16066e-05
-d 256 32 5.52908e-05
-d 257 32 6.30233e-05
-d 258 32 7.01897e-05
-d 259 32 8.48573e-05
-d 260 32 0.000106859
-d 261 32 8.37213e-05
-d 262 32 -0.0391541
-d 263 32 -0.047722
-d 264 32 -0.0618454
-d 265 32 -0.0169804
-d 266 32 0.345725
-d 267 32 1.03426
-d 268 32 1.74825
-d 269 32 2.37152
-d 270 32 2.88737
-d 271 32 3.32173
-d 272 32 3.66761
-d 273 32 3.9707
-d 274 32 4.17762
-d 275 32 3.98832
-d 276 32 3.30483
-d 277 32 2.09737
-d 278 32 0.710892
-d 279 32 0.148159
-d 280 32 0.0707463
-d 281 32 0.0555808
-d 282 32 0.045618
-d 283 32 0.0319116
-d 284 32 0.0199589
-d 285 32 0.0133357
-d 286 32 0.00898528
-d 287 32 0.00586075
-d 288 32 0.00375478
-d 289 32 0.00245443
-d 290 32 0.00156038
-d 291 32 0.000962344
-d 292 32 0.000590953
-d 293 32 0.000375107
-d 294 32 0.000250243
-d 295 32 0.00015882
-d 296 32 0.000100203
-d 297 32 6.18122e-05
-d 298 32 3.7372e-05
-d 299 32 2.23009e-05
-d 300 32 1.32569e-05
-d 301 32 8.29437e-06
-d 302 32 5.72457e-06
-d 303 32 3.96832e-06
-d 304 32 2.98935e-06
-d 305 32 2.59699e-06
-d 306 32 2.75024e-06
-d 307 32 3.38689e-06
-d 308 32 4.0453e-06
-d 309 32 3.50095e-06
-d 310 32 1.64988e-06
-d 311 32 -3.84371e-07
-d 312 32 -2.03828e-06
-d 313 32 -3.46401e-06
-d 314 32 -1.24301e-06
-d 315 32 4.63458e-06
-d 316 32 1.14104e-05
-d 317 32 1.02619e-05
-d 318 32 2.15487e-06
-d 319 32 -2.98487e-06
-d 320 32 -3.67221e-06
-d 321 32 -2.94279e-06
-d 322 32 -2.58649e-06
-d 323 32 -2.23019e-06
-d 324 32 -1.87389e-06
-d 325 32 -1.5176e-06
-d 326 32 -1.1613e-06
-d 327 32 -7.92127e-07
-d 328 32 -4.18889e-07
-d 329 32 -4.56502e-08
-d 330 32 3.27588e-07
-d 331 32 7.00827e-07
-d 332 32 8.79539e-07
-d 333 32 8.17025e-07
-d 334 32 7.5451e-07
-d 335 32 6.91996e-07
-d 336 32 6.29481e-07
-d 337 32 5.66966e-07
-d 338 32 5.04452e-07
-d 339 32 4.41937e-07
-d 340 32 3.79422e-07
-d 341 32 3.16908e-07
-d 342 32 2.54393e-07
-d 343 32 1.90078e-07
-d 344 32 1.25366e-07
-d 345 32 6.0654e-08
-d 346 32 -4.05776e-09
-d 347 32 -6.87696e-08
-d 348 32 -1.33481e-07
-d 349 32 -1.98193e-07
-d 350 32 -2.62905e-07
-d 351 32 -3.27617e-07
-d 352 32 -3.92329e-07
-d 353 32 -4.40392e-07
-d 354 32 -4.18802e-07
-d 355 32 -3.97213e-07
-d 356 32 -3.75624e-07
-d 357 32 -3.54035e-07
-d 358 32 -3.32446e-07
-d 359 32 -3.10856e-07
-d 360 32 -2.89267e-07
-d 361 32 -2.67678e-07
-d 1 33 1.10294
-d 2 33 1.10297
-d 3 33 1.10291
-d 4 33 1.10277
-d 5 33 1.10259
-d 6 33 1.10294
-d 7 33 1.10313
-d 8 33 1.10306
-d 9 33 1.10299
-d 10 33 1.10296
-d 11 33 1.10295
-d 12 33 1.10295
-d 13 33 1.10294
-d 14 33 1.10294
-d 15 33 1.10294
-d 16 33 1.10294
-d 17 33 1.10294
-d 18 33 1.10294
-d 19 33 1.10294
-d 20 33 1.10296
-d 21 33 1.10296
-d 22 33 1.00547
-d 23 33 0.998599
-d 24 33 1.5201
-d 25 33 2.49297
-d 26 33 3.31258
-d 27 33 3.73162
-d 28 33 3.84757
-d 29 33 3.92505
-d 30 33 4.02965
-d 31 33 4.16599
-d 32 33 4.30294
-d 33 33 4.41541
-d 34 33 4.52886
-d 35 33 4.64414
-d 36 33 4.73865
-d 37 33 4.81065
-d 38 33 4.86391
-d 39 33 4.90315
-d 40 33 4.93188
-d 41 33 4.95258
-d 42 33 4.96726
-d 43 33 4.97738
-d 44 33 4.98436
-d 45 33 4.98888
-d 46 33 4.99162
-d 47 33 4.99363
-d 48 33 4.99573
-d 49 33 4.99731
-d 50 33 4.99804
-d 51 33 4.99843
-d 52 33 4.99881
-d 53 33 4.99909
-d 54 33 4.99934
-d 55 33 4.99957
-d 56 33 4.9996
-d 57 33 4.99964
-d 58 33 4.99967
-d 59 33 4.9997
-d 60 33 4.99973
-d 61 33 4.99977
-d 62 33 4.9998
-d 63 33 4.99983
-d 64 33 4.99986
-d 65 33 4.99988
-d 66 33 4.99991
-d 67 33 4.99992
-d 68 33 4.99992
-d 69 33 4.99993
-d 70 33 4.99994
-d 71 33 4.99994
-d 72 33 4.99995
-d 73 33 4.99996
-d 74 33 4.99996
-d 75 33 4.99997
-d 76 33 4.99997
-d 77 33 4.99998
-d 78 33 4.99998
-d 79 33 4.99999
-d 80 33 4.99999
-d 81 33 4.99999
-d 82 33 4.99999
-d 83 33 5.0
-d 84 33 5.0
-d 85 33 5.0
-d 86 33 5.00001
-d 87 33 5.00001
-d 88 33 5.00001
-d 89 33 5.00001
-d 90 33 5.00001
-d 91 33 5.00001
-d 92 33 5.00001
-d 93 33 5.00001
-d 94 33 5.00001
-d 95 33 5.00001
-d 96 33 5.00001
-d 97 33 5.0
-d 98 33 5.0
-d 99 33 5.0
-d 100 33 5.0
-d 101 33 5.0
-d 102 33 5.0
-d 103 33 5.0
-d 104 33 5.0
-d 105 33 5.0
-d 106 33 5.0
-d 107 33 5.0
-d 108 33 5.0
-d 109 33 5.0
-d 110 33 5.0
-d 111 33 5.0
-d 112 33 5.0
-d 113 33 5.0
-d 114 33 5.0
-d 115 33 4.99999
-d 116 33 4.99999
-d 117 33 4.99999
-d 118 33 4.99999
-d 119 33 4.99999
-d 120 33 4.99999
-d 121 33 4.99999
-d 122 33 5.00028
-d 123 33 4.99988
-d 124 33 4.99968
-d 125 33 5.00019
-d 126 33 4.99987
-d 127 33 5.00021
-d 128 33 4.99973
-d 129 33 4.99977
-d 130 33 4.99996
-d 131 33 4.99997
-d 132 33 5.0002
-d 133 33 4.99957
-d 134 33 5.00026
-d 135 33 4.99947
-d 136 33 5.00074
-d 137 33 5.00003
-d 138 33 4.99987
-d 139 33 4.99979
-d 140 33 5.00008
-d 141 33 4.99997
-d 142 33 5.08794
-d 143 33 5.05993
-d 144 33 4.76875
-d 145 33 3.99197
-d 146 33 3.10174
-d 147 33 2.5197
-d 148 33 2.21771
-d 149 33 2.04
-d 150 33 1.92235
-d 151 33 1.83874
-d 152 33 1.77592
-d 153 33 1.72665
-d 154 33 1.686
-d 155 33 1.65276
-d 156 33 1.6286
-d 157 33 1.61299
-d 158 33 1.60039
-d 159 33 1.58934
-d 160 33 1.57954
-d 161 33 1.57083
-d 162 33 1.56306
-d 163 33 1.55604
-d 164 33 1.54963
-d 165 33 1.54375
-d 166 33 1.53832
-d 167 33 1.53331
-d 168 33 1.52865
-d 169 33 1.52432
-d 170 33 1.52026
-d 171 33 1.51645
-d 172 33 1.51287
-d 173 33 1.50949
-d 174 33 1.50629
-d 175 33 1.50327
-d 176 33 1.50039
-d 177 33 1.49766
-d 178 33 1.49505
-d 179 33 1.49257
-d 180 33 1.49019
-d 181 33 1.48792
-d 182 33 1.48574
-d 183 33 1.48365
-d 184 33 1.48164
-d 185 33 1.47971
-d 186 33 1.47784
-d 187 33 1.47604
-d 188 33 1.47431
-d 189 33 1.47264
-d 190 33 1.47102
-d 191 33 1.46945
-d 192 33 1.46794
-d 193 33 1.46647
-d 194 33 1.46505
-d 195 33 1.46367
-d 196 33 1.46233
-d 197 33 1.46103
-d 198 33 1.45976
-d 199 33 1.45853
-d 200 33 1.45733
-d 201 33 1.45616
-d 202 33 1.45502
-d 203 33 1.45392
-d 204 33 1.45284
-d 205 33 1.45179
-d 206 33 1.45076
-d 207 33 1.44975
-d 208 33 1.4488
-d 209 33 1.44795
-d 210 33 1.44711
-d 211 33 1.44626
-d 212 33 1.44541
-d 213 33 1.44457
-d 214 33 1.44372
-d 215 33 1.44287
-d 216 33 1.44212
-d 217 33 1.44138
-d 218 33 1.44063
-d 219 33 1.43989
-d 220 33 1.43914
-d 221 33 1.4384
-d 222 33 1.43766
-d 223 33 1.43701
-d 224 33 1.43641
-d 225 33 1.43581
-d 226 33 1.43522
-d 227 33 1.43462
-d 228 33 1.43402
-d 229 33 1.43342
-d 230 33 1.43282
-d 231 33 1.43223
-d 232 33 1.43163
-d 233 33 1.43103
-d 234 33 1.43043
-d 235 33 1.42984
-d 236 33 1.42924
-d 237 33 1.42865
-d 238 33 1.42808
-d 239 33 1.42752
-d 240 33 1.42695
-d 241 33 1.42639
-d 242 33 1.42584
-d 243 33 1.42529
-d 244 33 1.42472
-d 245 33 1.42412
-d 246 33 1.42365
-d 247 33 1.42326
-d 248 33 1.42304
-d 249 33 1.42162
-d 250 33 1.42082
-d 251 33 1.42032
-d 252 33 1.42029
-d 253 33 1.42026
-d 254 33 1.41995
-d 255 33 1.41947
-d 256 33 1.41894
-d 257 33 1.41841
-d 258 33 1.4179
-d 259 33 1.41742
-d 260 33 1.41699
-d 261 33 1.41656
-d 262 33 1.32097
-d 263 33 1.30963
-d 264 33 1.78765
-d 265 33 2.64656
-d 266 33 3.35764
-d 267 33 3.747
-d 268 33 3.86589
-d 269 33 3.94217
-d 270 33 4.04185
-d 271 33 4.18453
-d 272 33 4.3561
-d 273 33 4.53439
-d 274 33 4.68621
-d 275 33 4.74905
-d 276 33 4.77848
-d 277 33 4.84629
-d 278 33 4.91261
-d 279 33 4.97541
-d 280 33 5.01284
-d 281 33 5.01548
-d 282 33 5.01248
-d 283 33 5.00924
-d 284 33 5.00666
-d 285 33 5.00475
-d 286 33 5.00334
-d 287 33 5.00234
-d 288 33 5.00164
-d 289 33 5.00118
-d 290 33 5.00083
-d 291 33 5.00058
-d 292 33 5.0004
-d 293 33 5.00028
-d 294 33 5.00019
-d 295 33 5.00013
-d 296 33 5.00009
-d 297 33 5.00007
-d 298 33 5.00004
-d 299 33 5.00003
-d 300 33 5.00002
-d 301 33 5.00001
-d 302 33 5.00001
-d 303 33 5.00001
-d 304 33 5.0
-d 305 33 5.0
-d 306 33 4.99999
-d 307 33 4.99995
-d 308 33 4.99992
-d 309 33 4.99996
-d 310 33 5.00006
-d 311 33 5.00012
-d 312 33 5.00009
-d 313 33 4.99997
-d 314 33 4.9999
-d 315 33 4.99985
-d 316 33 4.99986
-d 317 33 4.99997
-d 318 33 5.00021
-d 319 33 5.00031
-d 320 33 5.00024
-d 321 33 5.0001
-d 322 33 5.00007
-d 323 33 5.00005
-d 324 33 5.00003
-d 325 33 5.00001
-d 326 33 4.99998
-d 327 33 4.99998
-d 328 33 4.99999
-d 329 33 4.99999
-d 330 33 4.99999
-d 331 33 5.0
-d 332 33 5.0
-d 333 33 5.0
-d 334 33 5.0
-d 335 33 5.0
-d 336 33 5.00001
-d 337 33 5.00001
-d 338 33 5.00001
-d 339 33 5.00001
-d 340 33 5.00001
-d 341 33 5.00001
-d 342 33 5.00002
-d 343 33 5.00002
-d 344 33 5.00001
-d 345 33 5.00001
-d 346 33 5.00001
-d 347 33 5.00001
-d 348 33 5.00001
-d 349 33 5.00001
-d 350 33 5.00001
-d 351 33 5.0
-d 352 33 5.0
-d 353 33 5.0
-d 354 33 5.0
-d 355 33 5.0
-d 356 33 4.99999
-d 357 33 4.99999
-d 358 33 4.99999
-d 359 33 4.99998
-d 360 33 4.99998
-d 361 33 4.99998
-d 1 34 5.0
-d 2 34 5.00012
-d 3 34 5.00023
-d 4 34 5.0003
-d 5 34 4.99972
-d 6 34 4.99988
-d 7 34 4.99984
-d 8 34 4.99991
-d 9 34 4.99996
-d 10 34 4.99999
-d 11 34 5.00008
-d 12 34 5.00009
-d 13 34 4.99986
-d 14 34 5.00003
-d 15 34 5.00007
-d 16 34 4.99995
-d 17 34 4.9999
-d 18 34 4.99997
-d 19 34 5.00013
-d 20 34 5.00014
-d 21 34 5.00013
-d 22 34 4.99701
-d 23 34 4.99763
-d 24 34 4.99742
-d 25 34 4.99998
-d 26 34 5.02836
-d 27 34 5.07262
-d 28 34 4.96856
-d 29 34 4.57267
-d 30 34 3.85637
-d 31 34 2.79544
-d 32 34 1.45942
-d 33 34 0.408016
-d 34 34 0.084885
-d 35 34 0.0271375
-d 36 34 0.0119294
-d 37 34 0.00707546
-d 38 34 0.0051087
-d 39 34 0.00373035
-d 40 34 0.00264737
-d 41 34 0.00186477
-d 42 34 0.00130379
-d 43 34 0.000915857
-d 44 34 0.000653121
-d 45 34 0.000483893
-d 46 34 0.000380852
-d 47 34 0.000302362
-d 48 34 0.000219498
-d 49 34 0.000154435
-d 50 34 0.000121928
-d 51 34 0.000104026
-d 52 34 8.61242e-05
-d 53 34 7.48526e-05
-d 54 34 6.49216e-05
-d 55 34 5.56238e-05
-d 56 34 5.29689e-05
-d 57 34 5.03139e-05
-d 58 34 4.7659e-05
-d 59 34 4.5004e-05
-d 60 34 4.23491e-05
-d 61 34 4.00356e-05
-d 62 34 3.79522e-05
-d 63 34 3.58687e-05
-d 64 34 3.37852e-05
-d 65 34 3.17018e-05
-d 66 34 2.97592e-05
-d 67 34 2.89804e-05
-d 68 34 2.82016e-05
-d 69 34 2.74228e-05
-d 70 34 2.66441e-05
-d 71 34 2.58653e-05
-d 72 34 2.50865e-05
-d 73 34 2.43077e-05
-d 74 34 2.35289e-05
-d 75 34 2.27501e-05
-d 76 34 2.19714e-05
-d 77 34 2.12346e-05
-d 78 34 2.07821e-05
-d 79 34 2.03295e-05
-d 80 34 1.98769e-05
-d 81 34 1.94244e-05
-d 82 34 1.89718e-05
-d 83 34 1.85192e-05
-d 84 34 1.80667e-05
-d 85 34 1.76141e-05
-d 86 34 1.71615e-05
-d 87 34 1.6709e-05
-d 88 34 1.62828e-05
-d 89 34 1.60061e-05
-d 90 34 1.57294e-05
-d 91 34 1.54527e-05
-d 92 34 1.5176e-05
-d 93 34 1.48993e-05
-d 94 34 1.46226e-05
-d 95 34 1.43459e-05
-d 96 34 1.40692e-05
-d 97 34 1.37925e-05
-d 98 34 1.35158e-05
-d 99 34 1.3262e-05
-d 100 34 1.31191e-05
-d 101 34 1.29761e-05
-d 102 34 1.28332e-05
-d 103 34 1.26903e-05
-d 104 34 1.25474e-05
-d 105 34 1.24045e-05
-d 106 34 1.22615e-05
-d 107 34 1.21186e-05
-d 108 34 1.19757e-05
-d 109 34 1.18328e-05
-d 110 34 1.16898e-05
-d 111 34 1.15469e-05
-d 112 34 1.1404e-05
-d 113 34 1.12611e-05
-d 114 34 1.11182e-05
-d 115 34 1.09752e-05
-d 116 34 1.08323e-05
-d 117 34 1.06894e-05
-d 118 34 1.05465e-05
-d 119 34 1.04036e-05
-d 120 34 1.02606e-05
-d 121 34 1.00185e-05
-d 122 34 3.8343e-05
-d 123 34 -3.06781e-05
-d 124 34 -0.000111758
-d 125 34 0.000111673
-d 126 34 0.000130815
-d 127 34 -0.000210491
-d 128 34 -0.000231304
-d 129 34 0.000310226
-d 130 34 0.000265303
-d 131 34 3.0878e-05
-d 132 34 -4.48405e-05
-d 133 34 -1.2852e-05
-d 134 34 -7.84469e-06
-d 135 34 3.29986e-05
-d 136 34 -1.23286e-05
-d 137 34 -6.07871e-05
-d 138 34 5.35082e-05
-d 139 34 7.69194e-05
-d 140 34 0.000126221
-d 141 34 6.57178e-05
-d 142 34 0.00223349
-d 143 34 -0.0148854
-d 144 34 -0.0476636
-d 145 34 -0.0491447
-d 146 34 0.220125
-d 147 34 1.11174
-d 148 34 2.03988
-d 149 34 2.90209
-d 150 34 3.61069
-d 151 34 4.13554
-d 152 34 4.50679
-d 153 34 4.71501
-d 154 34 4.83916
-d 155 34 4.91027
-d 156 34 4.95284
-d 157 34 4.98086
-d 158 34 4.99151
-d 159 34 4.98651
-d 160 34 4.97113
-d 161 34 4.95075
-d 162 34 4.93102
-d 163 34 4.93683
-d 164 34 4.95457
-d 165 34 4.97071
-d 166 34 4.98212
-d 167 34 4.98948
-d 168 34 4.99386
-d 169 34 4.99636
-d 170 34 4.99785
-d 171 34 4.9987
-d 172 34 4.99927
-d 173 34 4.99989
-d 174 34 5.00014
-d 175 34 5.00007
-d 176 34 4.99988
-d 177 34 4.99982
-d 178 34 4.99976
-d 179 34 4.99973
-d 180 34 4.99972
-d 181 34 4.99972
-d 182 34 4.99973
-d 183 34 4.99974
-d 184 34 4.99975
-d 185 34 4.99977
-d 186 34 4.99979
-d 187 34 4.99981
-d 188 34 4.99984
-d 189 34 4.99986
-d 190 34 4.99988
-d 191 34 4.99989
-d 192 34 4.99991
-d 193 34 4.99992
-d 194 34 4.99993
-d 195 34 4.99994
-d 196 34 4.99995
-d 197 34 4.99996
-d 198 34 4.99996
-d 199 34 4.99997
-d 200 34 4.99997
-d 201 34 4.99998
-d 202 34 4.99998
-d 203 34 4.99998
-d 204 34 4.99998
-d 205 34 4.99999
-d 206 34 4.99999
-d 207 34 4.99999
-d 208 34 4.99999
-d 209 34 5.0
-d 210 34 5.0
-d 211 34 5.0
-d 212 34 5.00001
-d 213 34 5.00001
-d 214 34 5.00001
-d 215 34 5.00002
-d 216 34 5.00001
-d 217 34 5.00001
-d 218 34 5.00001
-d 219 34 5.00001
-d 220 34 5.00001
-d 221 34 5.0
-d 222 34 5.0
-d 223 34 5.0
-d 224 34 5.0
-d 225 34 5.0
-d 226 34 5.0
-d 227 34 5.0
-d 228 34 5.0
-d 229 34 4.99999
-d 230 34 4.99999
-d 231 34 4.99999
-d 232 34 4.99999
-d 233 34 4.99999
-d 234 34 4.99999
-d 235 34 4.99999
-d 236 34 4.99999
-d 237 34 4.99999
-d 238 34 4.99999
-d 239 34 4.99999
-d 240 34 4.99999
-d 241 34 5.0
-d 242 34 5.00012
-d 243 34 4.99946
-d 244 34 4.99839
-d 245 34 4.99733
-d 246 34 4.99948
-d 247 34 5.00114
-d 248 34 5.00158
-d 249 34 5.00147
-d 250 34 5.00113
-d 251 34 5.00073
-d 252 34 5.00043
-d 253 34 5.0002
-d 254 34 5.00006
-d 255 34 4.99995
-d 256 34 4.99986
-d 257 34 4.99973
-d 258 34 4.99976
-d 259 34 4.9999
-d 260 34 5.00029
-d 261 34 5.00055
-d 262 34 4.99704
-d 263 34 4.99734
-d 264 34 4.9972
-d 265 34 5.00278
-d 266 34 5.03354
-d 267 34 5.07184
-d 268 34 4.94057
-d 269 34 4.51936
-d 270 34 3.75638
-d 271 34 2.60982
-d 272 34 1.23803
-d 273 34 0.315016
-d 274 34 0.0796102
-d 275 34 0.0252894
-d 276 34 0.0165723
-d 277 34 0.0827785
-d 278 34 0.491298
-d 279 34 1.40686
-d 280 34 2.33436
-d 281 34 3.1251
-d 282 34 3.7691
-d 283 34 4.22201
-d 284 34 4.49976
-d 285 34 4.68115
-d 286 34 4.80513
-d 287 34 4.88509
-d 288 34 4.93208
-d 289 34 4.95861
-d 290 34 4.97579
-d 291 34 4.98655
-d 292 34 4.99268
-d 293 34 4.99571
-d 294 34 4.99771
-d 295 34 4.99881
-d 296 34 4.99929
-d 297 34 4.99954
-d 298 34 4.99965
-d 299 34 4.9997
-d 300 34 4.99971
-d 301 34 4.99971
-d 302 34 4.99971
-d 303 34 4.99971
-d 304 34 4.99972
-d 305 34 4.99974
-d 306 34 4.99976
-d 307 34 4.99978
-d 308 34 4.99981
-d 309 34 4.99984
-d 310 34 4.99987
-d 311 34 4.99989
-d 312 34 4.99991
-d 313 34 4.99991
-d 314 34 4.99992
-d 315 34 4.99992
-d 316 34 4.99993
-d 317 34 4.99997
-d 318 34 5.00003
-d 319 34 5.00006
-d 320 34 5.00004
-d 321 34 5.00001
-d 322 34 5.0
-d 323 34 4.99999
-d 324 34 4.99998
-d 325 34 4.99998
-d 326 34 4.99997
-d 327 34 4.99997
-d 328 34 4.99997
-d 329 34 4.99998
-d 330 34 4.99998
-d 331 34 4.99998
-d 332 34 4.99999
-d 333 34 4.99999
-d 334 34 4.99999
-d 335 34 4.99999
-d 336 34 5.0
-d 337 34 5.0
-d 338 34 5.0
-d 339 34 5.0
-d 340 34 5.00001
-d 341 34 5.00001
-d 342 34 5.00001
-d 343 34 5.00001
-d 344 34 5.00001
-d 345 34 5.00001
-d 346 34 5.00001
-d 347 34 5.00001
-d 348 34 5.00001
-d 349 34 5.0
-d 350 34 5.0
-d 351 34 5.0
-d 352 34 5.0
-d 353 34 5.0
-d 354 34 5.0
-d 355 34 5.0
-d 356 34 4.99999
-d 357 34 4.99999
-d 358 34 4.99999
-d 359 34 4.99999
-d 360 34 4.99998
-d 361 34 4.99998
-d 1 35 5.0
-d 2 35 5.00207
-d 3 35 5.00813
-d 4 35 5.01486
-d 5 35 5.00156
-d 6 35 5.0018
-d 7 35 4.99861
-d 8 35 4.99844
-d 9 35 4.99888
-d 10 35 4.9993
-d 11 35 4.99956
-d 12 35 4.99971
-d 13 35 4.99979
-d 14 35 4.99983
-d 15 35 4.99987
-d 16 35 4.99989
-d 17 35 4.99671
-d 18 35 4.9974
-d 19 35 4.99864
-d 20 35 5.00131
-d 21 35 5.00377
-d 22 35 5.0021
-d 23 35 5.00039
-d 24 35 4.99993
-d 25 35 5.00004
-d 26 35 5.0009
-d 27 35 5.00109
-d 28 35 4.99636
-d 29 35 4.98617
-d 30 35 4.96778
-d 31 35 4.92047
-d 32 35 4.89528
-d 33 35 4.91112
-d 34 35 4.9559
-d 35 35 4.98286
-d 36 35 4.99369
-d 37 35 4.99812
-d 38 35 4.99951
-d 39 35 4.99994
-d 40 35 5.00014
-d 41 35 5.00008
-d 42 35 4.99994
-d 43 35 4.99984
-d 44 35 4.99989
-d 45 35 4.99998
-d 46 35 5.00004
-d 47 35 5.00004
-d 48 35 5.00006
-d 49 35 5.00005
-d 50 35 5.00001
-d 51 35 4.99997
-d 52 35 4.99992
-d 53 35 4.99993
-d 54 35 4.99994
-d 55 35 4.99996
-d 56 35 4.99996
-d 57 35 4.99996
-d 58 35 4.99996
-d 59 35 4.99996
-d 60 35 4.99996
-d 61 35 4.99996
-d 62 35 4.99996
-d 63 35 4.99996
-d 64 35 4.99996
-d 65 35 4.99996
-d 66 35 4.99996
-d 67 35 4.99996
-d 68 35 4.99996
-d 69 35 4.99997
-d 70 35 4.99997
-d 71 35 4.99997
-d 72 35 4.99997
-d 73 35 4.99997
-d 74 35 4.99997
-d 75 35 4.99997
-d 76 35 4.99997
-d 77 35 4.99997
-d 78 35 4.99997
-d 79 35 4.99997
-d 80 35 4.99997
-d 81 35 4.99997
-d 82 35 4.99997
-d 83 35 4.99997
-d 84 35 4.99997
-d 85 35 4.99997
-d 86 35 4.99997
-d 87 35 4.99997
-d 88 35 4.99997
-d 89 35 4.99997
-d 90 35 4.99998
-d 91 35 4.99998
-d 92 35 4.99998
-d 93 35 4.99998
-d 94 35 4.99998
-d 95 35 4.99998
-d 96 35 4.99998
-d 97 35 4.99998
-d 98 35 4.99998
-d 99 35 4.99998
-d 100 35 4.99998
-d 101 35 4.99998
-d 102 35 4.99998
-d 103 35 4.99998
-d 104 35 4.99998
-d 105 35 4.99998
-d 106 35 4.99998
-d 107 35 4.99998
-d 108 35 4.99998
-d 109 35 4.99998
-d 110 35 4.99998
-d 111 35 4.99998
-d 112 35 4.99998
-d 113 35 4.99998
-d 114 35 4.99998
-d 115 35 4.99998
-d 116 35 4.99998
-d 117 35 4.99998
-d 118 35 4.99998
-d 119 35 4.99998
-d 120 35 4.99998
-d 121 35 4.99998
-d 122 35 5.00131
-d 123 35 5.00072
-d 124 35 4.9977
-d 125 35 4.99811
-d 126 35 5.00325
-d 127 35 4.99647
-d 128 35 4.98948
-d 129 35 4.99459
-d 130 35 5.00262
-d 131 35 5.00276
-d 132 35 5.00156
-d 133 35 5.00072
-d 134 35 5.0003
-d 135 35 5.00013
-d 136 35 4.99995
-d 137 35 4.99668
-d 138 35 4.99775
-d 139 35 4.99917
-d 140 35 5.00173
-d 141 35 5.00386
-d 142 35 5.00188
-d 143 35 4.99888
-d 144 35 4.99757
-d 145 35 4.99951
-d 146 35 5.01712
-d 147 35 5.0557
-d 148 35 5.07088
-d 149 35 5.07704
-d 150 35 5.07758
-d 151 35 5.06958
-d 152 35 5.04223
-d 153 35 5.03331
-d 154 35 5.0279
-d 155 35 5.03408
-d 156 35 5.07611
-d 157 35 5.01911
-d 158 35 4.68594
-d 159 35 3.99152
-d 160 35 2.92195
-d 161 35 1.69878
-d 162 35 0.809
-d 163 35 0.344091
-d 164 35 0.154663
-d 165 35 0.0788717
-d 166 35 0.0467212
-d 167 35 0.0336168
-d 168 35 0.0280514
-d 169 35 0.0254947
-d 170 35 0.024173
-d 171 35 0.0223567
-d 172 35 0.0220555
-d 173 35 0.0271514
-d 174 35 0.0295872
-d 175 35 0.0296052
-d 176 35 0.0283971
-d 177 35 0.0264726
-d 178 35 0.0241813
-d 179 35 0.0218244
-d 180 35 0.0195349
-d 181 35 0.017368
-d 182 35 0.0152495
-d 183 35 0.013295
-d 184 35 0.0115444
-d 185 35 0.00996982
-d 186 35 0.00857091
-d 187 35 0.00733891
-d 188 35 0.00627261
-d 189 35 0.0053494
-d 190 35 0.00456316
-d 191 35 0.00388373
-d 192 35 0.00331073
-d 193 35 0.00282181
-d 194 35 0.00240991
-d 195 35 0.00206389
-d 196 35 0.00177187
-d 197 35 0.00152283
-d 198 35 0.00131167
-d 199 35 0.00112558
-d 200 35 0.000954373
-d 201 35 0.000805726
-d 202 35 0.00069326
-d 203 35 0.000600991
-d 204 35 0.000525743
-d 205 35 0.00047355
-d 206 35 0.00044359
-d 207 35 0.000434815
-d 208 35 0.000436053
-d 209 35 0.000402511
-d 210 35 0.000368969
-d 211 35 0.000335427
-d 212 35 0.000301886
-d 213 35 0.000268344
-d 214 35 0.000234802
-d 215 35 0.00020126
-d 216 35 0.000184967
-d 217 35 0.000169932
-d 218 35 0.000154896
-d 219 35 0.000139861
-d 220 35 0.000124825
-d 221 35 0.00010979
-d 222 35 9.47546e-05
-d 223 35 8.67896e-05
-d 224 35 8.24901e-05
-d 225 35 7.81906e-05
-d 226 35 7.38911e-05
-d 227 35 6.95915e-05
-d 228 35 6.5292e-05
-d 229 35 6.09925e-05
-d 230 35 5.66929e-05
-d 231 35 5.23934e-05
-d 232 35 4.80939e-05
-d 233 35 4.37943e-05
-d 234 35 3.94948e-05
-d 235 35 3.51953e-05
-d 236 35 3.08957e-05
-d 237 35 2.67968e-05
-d 238 35 2.42936e-05
-d 239 35 2.17904e-05
-d 240 35 1.92872e-05
-d 241 35 1.6784e-05
-d 242 35 0.00125927
-d 243 35 -0.00794344
-d 244 35 -0.0305499
-d 245 35 -0.0621697
-d 246 35 -0.0463796
-d 247 35 -0.0224608
-d 248 35 -0.00538381
-d 249 35 0.00546086
-d 250 35 0.0108675
-d 251 35 0.012883
-d 252 35 0.0131787
-d 253 35 0.0127271
-d 254 35 0.0119702
-d 255 35 0.0110398
-d 256 35 0.0100635
-d 257 35 0.00649617
-d 258 35 0.00489388
-d 259 35 0.00545863
-d 260 35 0.0098351
-d 261 35 0.0167428
-d 262 35 0.0126563
-d 263 35 0.00697542
-d 264 35 0.00427027
-d 265 35 0.00330002
-d 266 35 0.00390774
-d 267 35 0.00408999
-d 268 35 -0.00259143
-d 269 35 -0.0160578
-d 270 35 -0.0451849
-d 271 35 -0.0409651
-d 272 35 0.1301
-d 273 35 0.597429
-d 274 35 1.3848
-d 275 35 2.63426
-d 276 35 3.81272
-d 277 35 4.51373
-d 278 35 4.8412
-d 279 35 4.98731
-d 280 35 4.88165
-d 281 35 4.37165
-d 282 35 3.40034
-d 283 35 2.17681
-d 284 35 1.12217
-d 285 35 0.505129
-d 286 35 0.219703
-d 287 35 0.104992
-d 288 35 0.0622333
-d 289 35 0.0448317
-d 290 35 0.0355782
-d 291 35 0.0311867
-d 292 35 0.0293529
-d 293 35 0.0274615
-d 294 35 0.0288739
-d 295 35 0.0307845
-d 296 35 0.0304909
-d 297 35 0.029245
-d 298 35 0.0273602
-d 299 35 0.0251006
-d 300 35 0.022697
-d 301 35 0.0202765
-d 302 35 0.0179357
-d 303 35 0.0157106
-d 304 35 0.0136562
-d 305 35 0.0117951
-d 306 35 0.0101273
-d 307 35 0.00865784
-d 308 35 0.00739394
-d 309 35 0.00634364
-d 310 35 0.00551356
-d 311 35 0.00480538
-d 312 35 0.00415747
-d 313 35 0.00356084
-d 314 35 0.00297585
-d 315 35 0.00236711
-d 316 35 0.00181853
-d 317 35 0.00160713
-d 318 35 0.00169822
-d 319 35 0.00166542
-d 320 35 0.00145504
-d 321 35 0.00120252
-d 322 35 0.00109259
-d 323 35 0.000982658
-d 324 35 0.00087273
-d 325 35 0.000762802
-d 326 35 0.000652874
-d 327 35 0.000584068
-d 328 35 0.000528263
-d 329 35 0.000472458
-d 330 35 0.000416653
-d 331 35 0.000360848
-d 332 35 0.000321155
-d 333 35 0.000301442
-d 334 35 0.000281729
-d 335 35 0.000262016
-d 336 35 0.000242303
-d 337 35 0.00022259
-d 338 35 0.000202877
-d 339 35 0.000183164
-d 340 35 0.000163451
-d 341 35 0.000143738
-d 342 35 0.000124025
-d 343 35 0.000114582
-d 344 35 0.000107399
-d 345 35 0.000100216
-d 346 35 9.30332e-05
-d 347 35 8.58502e-05
-d 348 35 7.86672e-05
-d 349 35 7.14841e-05
-d 350 35 6.43011e-05
-d 351 35 5.7118e-05
-d 352 35 4.9935e-05
-d 353 35 4.35378e-05
-d 354 35 4.04281e-05
-d 355 35 3.73184e-05
-d 356 35 3.42088e-05
-d 357 35 3.10991e-05
-d 358 35 2.79894e-05
-d 359 35 2.48798e-05
-d 360 35 2.17701e-05
-d 361 35 1.86604e-05
-d 1 36 7.24585e-12
-d 2 36 2.21843e-05
-d 3 36 3.20014e-05
-d 4 36 1.25076e-05
-d 5 36 -2.44947e-05
-d 6 36 1.8425e-05
-d 7 36 5.50546e-06
-d 8 36 3.53025e-05
-d 9 36 -1.07551e-05
-d 10 36 -3.94383e-06
-d 11 36 -2.27848e-06
-d 12 36 -9.04789e-05
-d 13 36 7.44215e-05
-d 14 36 -2.7662e-05
-d 15 36 0.000200038
-d 16 36 -2.11998e-05
-d 17 36 -2.09011e-05
-d 18 36 2.37098e-05
-d 19 36 2.18751e-05
-d 20 36 -2.28422e-05
-d 21 36 -6.23659e-05
-d 22 36 3.58241e-05
-d 23 36 1.76386e-05
-d 24 36 -4.28311e-05
-d 25 36 0.000355626
-d 26 36 0.00156903
-d 27 36 0.00100999
-d 28 36 -0.0085304
-d 29 36 -0.02067
-d 30 36 -0.0389485
-d 31 36 -0.0651568
-d 32 36 -0.128475
-d 33 36 -0.314362
-d 34 36 -0.406837
-d 35 36 -0.421558
-d 36 36 -0.421277
-d 37 36 -0.418176
-d 38 36 -0.414481
-d 39 36 -0.410845
-d 40 36 -0.407348
-d 41 36 -0.403971
-d 42 36 -0.400716
-d 43 36 -0.397582
-d 44 36 -0.394563
-d 45 36 -0.391658
-d 46 36 -0.388866
-d 47 36 -0.386178
-d 48 36 -0.383585
-d 49 36 -0.381094
-d 50 36 -0.378789
-d 51 36 -0.376569
-d 52 36 -0.37435
-d 53 36 -0.372256
-d 54 36 -0.370188
-d 55 36 -0.36815
-d 56 36 -0.366422
-d 57 36 -0.364694
-d 58 36 -0.362967
-d 59 36 -0.361239
-d 60 36 -0.359511
-d 61 36 -0.357888
-d 62 36 -0.356334
-d 63 36 -0.354781
-d 64 36 -0.353227
-d 65 36 -0.351674
-d 66 36 -0.350152
-d 67 36 -0.348888
-d 68 36 -0.347625
-d 69 36 -0.346361
-d 70 36 -0.345098
-d 71 36 -0.343834
-d 72 36 -0.342571
-d 73 36 -0.341307
-d 74 36 -0.340044
-d 75 36 -0.33878
-d 76 36 -0.337517
-d 77 36 -0.336279
-d 78 36 -0.335215
-d 79 36 -0.334152
-d 80 36 -0.333088
-d 81 36 -0.332024
-d 82 36 -0.330961
-d 83 36 -0.329897
-d 84 36 -0.328833
-d 85 36 -0.32777
-d 86 36 -0.326706
-d 87 36 -0.325642
-d 88 36 -0.324601
-d 89 36 -0.323683
-d 90 36 -0.322766
-d 91 36 -0.321849
-d 92 36 -0.320932
-d 93 36 -0.320014
-d 94 36 -0.319097
-d 95 36 -0.31818
-d 96 36 -0.317263
-d 97 36 -0.316345
-d 98 36 -0.315428
-d 99 36 -0.314545
-d 100 36 -0.313825
-d 101 36 -0.313106
-d 102 36 -0.312387
-d 103 36 -0.311667
-d 104 36 -0.310948
-d 105 36 -0.310228
-d 106 36 -0.309509
-d 107 36 -0.308789
-d 108 36 -0.30807
-d 109 36 -0.307351
-d 110 36 -0.306631
-d 111 36 -0.305912
-d 112 36 -0.305192
-d 113 36 -0.304473
-d 114 36 -0.303754
-d 115 36 -0.303034
-d 116 36 -0.302315
-d 117 36 -0.301595
-d 118 36 -0.300876
-d 119 36 -0.300157
-d 120 36 -0.299437
-d 121 36 -0.298716
-d 122 36 -0.29798
-d 123 36 -0.297329
-d 124 36 -0.296691
-d 125 36 -0.295837
-d 126 36 -0.29516
-d 127 36 -0.294725
-d 128 36 -0.294044
-d 129 36 -0.292917
-d 130 36 -0.292351
-d 131 36 -0.291965
-d 132 36 -0.291365
-d 133 36 -0.290687
-d 134 36 -0.290027
-d 135 36 -0.289376
-d 136 36 -0.288772
-d 137 36 -0.288193
-d 138 36 -0.287505
-d 139 36 -0.286892
-d 140 36 -0.28626
-d 141 36 -0.285714
-d 142 36 -0.284545
-d 143 36 -0.289246
-d 144 36 -0.298717
-d 145 36 -0.298492
-d 146 36 -0.214163
-d 147 36 0.181451
-d 148 36 0.0749974
-d 149 36 0.0454707
-d 150 36 0.0292987
-d 151 36 0.0196837
-d 152 36 0.0124119
-d 153 36 0.00884715
-d 154 36 0.00527181
-d 155 36 0.00585821
-d 156 36 0.0296361
-d 157 36 0.169856
-d 158 36 0.361207
-d 159 36 0.538856
-d 160 36 0.67469
-d 161 36 0.685933
-d 162 36 0.392802
-d 163 36 0.17772
-d 164 36 0.0813085
-d 165 36 0.0424601
-d 166 36 0.0246654
-d 167 36 0.0175258
-d 168 36 0.0144256
-d 169 36 0.0129859
-d 170 36 0.012205
-d 171 36 0.0112846
-d 172 36 0.010933
-d 173 36 0.0134813
-d 174 36 0.0147254
-d 175 36 0.0147981
-d 176 36 0.0142156
-d 177 36 0.0132732
-d 178 36 0.0121355
-d 179 36 0.0109587
-d 180 36 0.00981238
-d 181 36 0.00872731
-d 182 36 0.00767007
-d 183 36 0.00669346
-d 184 36 0.00581341
-d 185 36 0.00502167
-d 186 36 0.00431819
-d 187 36 0.00369842
-d 188 36 0.00316168
-d 189 36 0.00269663
-d 190 36 0.00230035
-d 191 36 0.00195801
-d 192 36 0.00166928
-d 193 36 0.00142286
-d 194 36 0.00121522
-d 195 36 0.00104072
-d 196 36 0.000893384
-d 197 36 0.000767675
-d 198 36 0.000661268
-d 199 36 0.000567659
-d 200 36 0.000481766
-d 201 36 0.000407101
-d 202 36 0.000350044
-d 203 36 0.000302721
-d 204 36 0.000263424
-d 205 36 0.000236813
-d 206 36 0.00022199
-d 207 36 0.000218182
-d 208 36 0.000219548
-d 209 36 0.0002027
-d 210 36 0.000185853
-d 211 36 0.000169006
-d 212 36 0.000152158
-d 213 36 0.000135311
-d 214 36 0.000118463
-d 215 36 0.000101616
-d 216 36 9.33782e-05
-d 217 36 8.57685e-05
-d 218 36 7.81588e-05
-d 219 36 7.0549e-05
-d 220 36 6.29393e-05
-d 221 36 5.53296e-05
-d 222 36 4.77199e-05
-d 223 36 4.36954e-05
-d 224 36 4.15296e-05
-d 225 36 3.93637e-05
-d 226 36 3.71978e-05
-d 227 36 3.50319e-05
-d 228 36 3.28661e-05
-d 229 36 3.07002e-05
-d 230 36 2.85343e-05
-d 231 36 2.63685e-05
-d 232 36 2.42026e-05
-d 233 36 2.20367e-05
-d 234 36 1.98709e-05
-d 235 36 1.7705e-05
-d 236 36 1.55391e-05
-d 237 36 1.34772e-05
-d 238 36 1.22416e-05
-d 239 36 1.10061e-05
-d 240 36 9.77055e-06
-d 241 36 8.535e-06
-d 242 36 0.000631271
-d 243 36 -0.00362586
-d 244 36 -0.0146235
-d 245 36 -0.0308486
-d 246 36 -0.0237466
-d 247 36 -0.0117522
-d 248 36 -0.00304171
-d 249 36 0.00251033
-d 250 36 0.00531986
-d 251 36 0.0063897
-d 252 36 0.00657351
-d 253 36 0.00636494
-d 254 36 0.00599705
-d 255 36 0.00553442
-d 256 36 0.00505994
-d 257 36 0.00330925
-d 258 36 0.00246671
-d 259 36 0.0027006
-d 260 36 0.00473161
-d 261 36 0.00830333
-d 262 36 0.00649147
-d 263 36 0.00356815
-d 264 36 0.00217448
-d 265 36 0.00187579
-d 266 36 0.00270447
-d 267 36 0.00219543
-d 268 36 -0.00546118
-d 269 36 -0.0179576
-d 270 36 -0.0445306
-d 271 36 -0.0649309
-d 272 36 0.0197935
-d 273 36 0.473629
-d 274 36 0.87268
-d 275 36 0.269542
-d 276 36 0.0086094
-d 277 36 0.0844602
-d 278 36 0.606456
-d 279 36 1.04929
-d 280 36 0.906014
-d 281 36 0.916205
-d 282 36 0.919425
-d 283 36 0.872867
-d 284 36 0.556244
-d 285 36 0.262457
-d 286 36 0.11838
-d 287 36 0.0571226
-d 288 36 0.0333451
-d 289 36 0.0237133
-d 290 36 0.0185096
-d 291 36 0.0159617
-d 292 36 0.0148663
-d 293 36 0.0138683
-d 294 36 0.0144081
-d 295 36 0.0153797
-d 296 36 0.0152551
-d 297 36 0.0146487
-d 298 36 0.0137192
-d 299 36 0.0125973
-d 300 36 0.0113996
-d 301 36 0.0101903
-d 302 36 0.00901851
-d 303 36 0.00790495
-d 304 36 0.00687502
-d 305 36 0.00593994
-d 306 36 0.00510092
-d 307 36 0.00436111
-d 308 36 0.00372439
-d 309 36 0.0031945
-d 310 36 0.00277537
-d 311 36 0.00241888
-d 312 36 0.002095
-d 313 36 0.00179943
-d 314 36 0.00150419
-d 315 36 0.00119264
-d 316 36 0.00090934
-d 317 36 0.000802394
-d 318 36 0.000852816
-d 319 36 0.000838368
-d 320 36 0.000730842
-d 321 36 0.000601028
-d 322 36 0.000546616
-d 323 36 0.000492205
-d 324 36 0.000437793
-d 325 36 0.000383381
-d 326 36 0.000328969
-d 327 36 0.00029454
-d 328 36 0.000266428
-d 329 36 0.000238317
-d 330 36 0.000210205
-d 331 36 0.000182093
-d 332 36 0.000162091
-d 333 36 0.000152145
-d 334 36 0.000142198
-d 335 36 0.000132252
-d 336 36 0.000122306
-d 337 36 0.000112359
-d 338 36 0.000102413
-d 339 36 9.24665e-05
-d 340 36 8.25201e-05
-d 341 36 7.25738e-05
-d 342 36 6.26274e-05
-d 343 36 5.78553e-05
-d 344 36 5.42216e-05
-d 345 36 5.05878e-05
-d 346 36 4.69541e-05
-d 347 36 4.33204e-05
-d 348 36 3.96867e-05
-d 349 36 3.60529e-05
-d 350 36 3.24192e-05
-d 351 36 2.87855e-05
-d 352 36 2.51518e-05
-d 353 36 2.19153e-05
-d 354 36 2.03406e-05
-d 355 36 1.8766e-05
-d 356 36 1.71913e-05
-d 357 36 1.56167e-05
-d 358 36 1.4042e-05
-d 359 36 1.24674e-05
-d 360 36 1.08927e-05
-d 361 36 9.31806e-06
-d 1 37 5.0
-d 2 37 5.01426
-d 3 37 5.02852
-d 4 37 5.01923
-d 5 37 4.77685
-d 6 37 4.56471
-d 7 37 4.52338
-d 8 37 4.56813
-d 9 37 4.63122
-d 10 37 4.693
-d 11 37 4.74776
-d 12 37 4.79385
-d 13 37 4.83258
-d 14 37 4.86358
-d 15 37 4.88918
-d 16 37 4.91021
-d 17 37 4.90553
-d 18 37 4.89733
-d 19 37 4.89554
-d 20 37 4.91953
-d 21 37 5.00757
-d 22 37 5.07101
-d 23 37 5.06318
-d 24 37 5.05241
-d 25 37 5.05535
-d 26 37 5.08042
-d 27 37 5.07251
-d 28 37 4.90973
-d 29 37 4.56136
-d 30 37 3.98637
-d 31 37 3.237
-d 32 37 2.67216
-d 33 37 2.33678
-d 34 37 2.13529
-d 35 37 2.00544
-d 36 37 1.91429
-d 37 37 1.84638
-d 38 37 1.79461
-d 39 37 1.75338
-d 40 37 1.71958
-d 41 37 1.69175
-d 42 37 1.6686
-d 43 37 1.64918
-d 44 37 1.63258
-d 45 37 1.61836
-d 46 37 1.60607
-d 47 37 1.59506
-d 48 37 1.58483
-d 49 37 1.57575
-d 50 37 1.56847
-d 51 37 1.56193
-d 52 37 1.55538
-d 53 37 1.54968
-d 54 37 1.54416
-d 55 37 1.5388
-d 56 37 1.53523
-d 57 37 1.53165
-d 58 37 1.52807
-d 59 37 1.52449
-d 60 37 1.52091
-d 61 37 1.51771
-d 62 37 1.51477
-d 63 37 1.51182
-d 64 37 1.50888
-d 65 37 1.50593
-d 66 37 1.50309
-d 67 37 1.50113
-d 68 37 1.49917
-d 69 37 1.4972
-d 70 37 1.49524
-d 71 37 1.49328
-d 72 37 1.49132
-d 73 37 1.48935
-d 74 37 1.48739
-d 75 37 1.48543
-d 76 37 1.48346
-d 77 37 1.48157
-d 78 37 1.48012
-d 79 37 1.47868
-d 80 37 1.47724
-d 81 37 1.47579
-d 82 37 1.47435
-d 83 37 1.47291
-d 84 37 1.47146
-d 85 37 1.47002
-d 86 37 1.46857
-d 87 37 1.46713
-d 88 37 1.46574
-d 89 37 1.46462
-d 90 37 1.4635
-d 91 37 1.46238
-d 92 37 1.46126
-d 93 37 1.46014
-d 94 37 1.45902
-d 95 37 1.4579
-d 96 37 1.45678
-d 97 37 1.45567
-d 98 37 1.45455
-d 99 37 1.45349
-d 100 37 1.45275
-d 101 37 1.45201
-d 102 37 1.45127
-d 103 37 1.45053
-d 104 37 1.44979
-d 105 37 1.44905
-d 106 37 1.44831
-d 107 37 1.44757
-d 108 37 1.44683
-d 109 37 1.44609
-d 110 37 1.44535
-d 111 37 1.44461
-d 112 37 1.44387
-d 113 37 1.44313
-d 114 37 1.44239
-d 115 37 1.44165
-d 116 37 1.44091
-d 117 37 1.44017
-d 118 37 1.43943
-d 119 37 1.43869
-d 120 37 1.43795
-d 121 37 1.43721
-d 122 37 1.43874
-d 123 37 1.43976
-d 124 37 1.43619
-d 125 37 1.43182
-d 126 37 1.43726
-d 127 37 1.43084
-d 128 37 1.42587
-d 129 37 1.42383
-d 130 37 1.42642
-d 131 37 1.42728
-d 132 37 1.42736
-d 133 37 1.4271
-d 134 37 1.42669
-d 135 37 1.42621
-d 136 37 1.42569
-d 137 37 1.41703
-d 138 37 1.41244
-d 139 37 1.41019
-d 140 37 1.41199
-d 141 37 1.41833
-d 142 37 1.42502
-d 143 37 1.41504
-d 144 37 1.37535
-d 145 37 1.28381
-d 146 37 1.44779
-d 147 37 2.33713
-d 148 37 3.25835
-d 149 37 3.67554
-d 150 37 3.84975
-d 151 37 4.01125
-d 152 37 4.2253
-d 153 37 4.45433
-d 154 37 4.62215
-d 155 37 4.74478
-d 156 37 4.82998
-d 157 37 4.8868
-d 158 37 4.92396
-d 159 37 4.94768
-d 160 37 4.96498
-d 161 37 4.98537
-d 162 37 5.0128
-d 163 37 5.04467
-d 164 37 5.06722
-d 165 37 5.06535
-d 166 37 5.01475
-d 167 37 4.91956
-d 168 37 4.80647
-d 169 37 4.7242
-d 170 37 4.7059
-d 171 37 4.73552
-d 172 37 4.76379
-d 173 37 4.81684
-d 174 37 4.87376
-d 175 37 4.92276
-d 176 37 4.96112
-d 177 37 4.9884
-d 178 37 5.0045
-d 179 37 5.00999
-d 180 37 5.00933
-d 181 37 5.00619
-d 182 37 5.00384
-d 183 37 5.00342
-d 184 37 5.00373
-d 185 37 5.00362
-d 186 37 5.00309
-d 187 37 5.00272
-d 188 37 5.00239
-d 189 37 5.00204
-d 190 37 5.00172
-d 191 37 5.00146
-d 192 37 5.00124
-d 193 37 5.00105
-d 194 37 5.00089
-d 195 37 5.00076
-d 196 37 5.00065
-d 197 37 5.00057
-d 198 37 5.00048
-d 199 37 5.00041
-d 200 37 5.00034
-d 201 37 5.00028
-d 202 37 5.00023
-d 203 37 5.00019
-d 204 37 5.00015
-d 205 37 5.00015
-d 206 37 5.00016
-d 207 37 5.0002
-d 208 37 5.00023
-d 209 37 5.00021
-d 210 37 5.00019
-d 211 37 5.00017
-d 212 37 5.00015
-d 213 37 5.00012
-d 214 37 5.0001
-d 215 37 5.00008
-d 216 37 5.00007
-d 217 37 5.00006
-d 218 37 5.00005
-d 219 37 5.00004
-d 220 37 5.00003
-d 221 37 5.00002
-d 222 37 5.00001
-d 223 37 5.00001
-d 224 37 5.00001
-d 225 37 5.00001
-d 226 37 5.00001
-d 227 37 5.00001
-d 228 37 5.00001
-d 229 37 5.00002
-d 230 37 5.00002
-d 231 37 5.00002
-d 232 37 5.00002
-d 233 37 5.00002
-d 234 37 5.00002
-d 235 37 5.00002
-d 236 37 5.00002
-d 237 37 5.00002
-d 238 37 5.00002
-d 239 37 5.00001
-d 240 37 5.00001
-d 241 37 5.00001
-d 242 37 5.00062
-d 243 37 4.99506
-d 244 37 4.9835
-d 245 37 4.96726
-d 246 37 4.9728
-d 247 37 4.97877
-d 248 37 4.98675
-d 249 37 4.9966
-d 250 37 5.00406
-d 251 37 5.00679
-d 252 37 5.00629
-d 253 37 5.00561
-d 254 37 5.00487
-d 255 37 5.00429
-d 256 37 5.00384
-d 257 37 5.002
-d 258 37 5.00164
-d 259 37 5.00229
-d 260 37 5.00484
-d 261 37 5.00769
-d 262 37 5.00019
-d 263 37 5.00242
-d 264 37 5.01319
-d 265 37 5.0335
-d 266 37 5.07265
-d 267 37 5.10129
-d 268 37 5.11485
-d 269 37 5.12551
-d 270 37 5.13953
-d 271 37 5.16048
-d 272 37 5.18862
-d 273 37 5.22811
-d 274 37 5.25656
-d 275 37 5.25627
-d 276 37 5.19975
-d 277 37 4.9139
-d 278 37 4.24745
-d 279 37 3.43732
-d 280 37 2.8202
-d 281 37 2.43224
-d 282 37 2.17409
-d 283 37 2.01333
-d 284 37 1.93951
-d 285 37 1.94622
-d 286 37 1.98861
-d 287 37 2.02217
-d 288 37 2.05383
-d 289 37 2.08376
-d 290 37 2.11184
-d 291 37 2.13793
-d 292 37 2.16191
-d 293 37 2.18267
-d 294 37 2.20502
-d 295 37 2.22837
-d 296 37 2.24958
-d 297 37 2.26901
-d 298 37 2.28648
-d 299 37 2.302
-d 300 37 2.31582
-d 301 37 2.32802
-d 302 37 2.33869
-d 303 37 2.34795
-d 304 37 2.35596
-d 305 37 2.36282
-d 306 37 2.3687
-d 307 37 2.37371
-d 308 37 2.37797
-d 309 37 2.38161
-d 310 37 2.38476
-d 311 37 2.38743
-d 312 37 2.3897
-d 313 37 2.39168
-d 314 37 2.39329
-d 315 37 2.39463
-d 316 37 2.39575
-d 317 37 2.39671
-d 318 37 2.39756
-d 319 37 2.39835
-d 320 37 2.39907
-d 321 37 2.39968
-d 322 37 2.39999
-d 323 37 2.4003
-d 324 37 2.40061
-d 325 37 2.40091
-d 326 37 2.40122
-d 327 37 2.40142
-d 328 37 2.40159
-d 329 37 2.40176
-d 330 37 2.40193
-d 331 37 2.4021
-d 332 37 2.40222
-d 333 37 2.40228
-d 334 37 2.40234
-d 335 37 2.4024
-d 336 37 2.40247
-d 337 37 2.40253
-d 338 37 2.40259
-d 339 37 2.40265
-d 340 37 2.40271
-d 341 37 2.40277
-d 342 37 2.40284
-d 343 37 2.40287
-d 344 37 2.40289
-d 345 37 2.40291
-d 346 37 2.40294
-d 347 37 2.40296
-d 348 37 2.40298
-d 349 37 2.40301
-d 350 37 2.40303
-d 351 37 2.40305
-d 352 37 2.40308
-d 353 37 2.4031
-d 354 37 2.40311
-d 355 37 2.40312
-d 356 37 2.40313
-d 357 37 2.40314
-d 358 37 2.40315
-d 359 37 2.40316
-d 360 37 2.40317
-d 361 37 2.40318
-d 1 38 5.0
-d 2 38 5.01732
-d 3 38 5.03181
-d 4 38 5.05944
-d 5 38 5.12686
-d 6 38 5.20725
-d 7 38 5.28103
-d 8 38 5.31254
-d 9 38 5.32901
-d 10 38 5.33709
-d 11 38 5.3408
-d 12 38 5.34257
-d 13 38 5.34311
-d 14 38 5.34347
-d 15 38 5.34386
-d 16 38 5.34411
-d 17 38 5.3406
-d 18 38 5.33484
-d 19 38 5.32942
-d 20 38 5.32904
-d 21 38 5.33644
-d 22 38 5.34869
-d 23 38 5.35001
-d 24 38 5.34882
-d 25 38 5.34758
-d 26 38 5.34672
-d 27 38 5.34599
-d 28 38 5.34496
-d 29 38 5.34364
-d 30 38 5.34165
-d 31 38 5.33712
-d 32 38 5.33502
-d 33 38 5.3366
-d 34 38 5.34067
-d 35 38 5.34306
-d 36 38 5.34398
-d 37 38 5.34434
-d 38 38 5.34442
-d 39 38 5.34443
-d 40 38 5.34443
-d 41 38 5.34441
-d 42 38 5.34439
-d 43 38 5.34437
-d 44 38 5.34437
-d 45 38 5.34438
-d 46 38 5.34438
-d 47 38 5.34438
-d 48 38 5.34438
-d 49 38 5.34438
-d 50 38 5.34437
-d 51 38 5.34437
-d 52 38 5.34436
-d 53 38 5.34436
-d 54 38 5.34437
-d 55 38 5.34437
-d 56 38 5.34437
-d 57 38 5.34437
-d 58 38 5.34437
-d 59 38 5.34437
-d 60 38 5.34437
-d 61 38 5.34437
-d 62 38 5.34437
-d 63 38 5.34437
-d 64 38 5.34437
-d 65 38 5.34437
-d 66 38 5.34437
-d 67 38 5.34437
-d 68 38 5.34437
-d 69 38 5.34437
-d 70 38 5.34437
-d 71 38 5.34437
-d 72 38 5.34437
-d 73 38 5.34437
-d 74 38 5.34437
-d 75 38 5.34437
-d 76 38 5.34437
-d 77 38 5.34437
-d 78 38 5.34437
-d 79 38 5.34437
-d 80 38 5.34437
-d 81 38 5.34437
-d 82 38 5.34437
-d 83 38 5.34437
-d 84 38 5.34437
-d 85 38 5.34437
-d 86 38 5.34437
-d 87 38 5.34437
-d 88 38 5.34437
-d 89 38 5.34437
-d 90 38 5.34437
-d 91 38 5.34437
-d 92 38 5.34437
-d 93 38 5.34437
-d 94 38 5.34437
-d 95 38 5.34437
-d 96 38 5.34437
-d 97 38 5.34437
-d 98 38 5.34437
-d 99 38 5.34437
-d 100 38 5.34437
-d 101 38 5.34437
-d 102 38 5.34437
-d 103 38 5.34437
-d 104 38 5.34437
-d 105 38 5.34437
-d 106 38 5.34437
-d 107 38 5.34437
-d 108 38 5.34437
-d 109 38 5.34437
-d 110 38 5.34437
-d 111 38 5.34437
-d 112 38 5.34437
-d 113 38 5.34437
-d 114 38 5.34437
-d 115 38 5.34437
-d 116 38 5.34437
-d 117 38 5.34437
-d 118 38 5.34437
-d 119 38 5.34437
-d 120 38 5.34437
-d 121 38 5.34437
-d 122 38 5.35377
-d 123 38 5.35451
-d 124 38 5.34265
-d 125 38 5.34488
-d 126 38 5.35861
-d 127 38 5.28622
-d 128 38 4.90033
-d 129 38 4.75027
-d 130 38 4.89731
-d 131 38 4.97098
-d 132 38 4.99293
-d 133 38 4.99832
-d 134 38 4.99909
-d 135 38 4.99956
-d 136 38 4.99858
-d 137 38 4.99829
-d 138 38 4.9998
-d 139 38 5.00035
-d 140 38 5.0038
-d 141 38 5.00989
-d 142 38 5.00251
-d 143 38 4.99438
-d 144 38 4.9953
-d 145 38 4.99761
-d 146 38 4.99985
-d 147 38 5.00152
-d 148 38 5.0011
-d 149 38 5.00046
-d 150 38 4.99996
-d 151 38 4.99925
-d 152 38 4.99862
-d 153 38 4.99919
-d 154 38 4.99961
-d 155 38 5.00048
-d 156 38 5.00234
-d 157 38 4.99654
-d 158 38 4.98235
-d 159 38 4.95936
-d 160 38 4.83738
-d 161 38 4.53021
-d 162 38 4.21004
-d 163 38 4.00593
-d 164 38 3.91207
-d 165 38 3.88059
-d 166 38 3.87822
-d 167 38 3.89117
-d 168 38 3.91278
-d 169 38 3.94044
-d 170 38 3.97376
-d 171 38 4.01152
-d 172 38 4.05052
-d 173 38 4.10679
-d 174 38 4.17908
-d 175 38 4.25673
-d 176 38 4.33414
-d 177 38 4.40875
-d 178 38 4.47879
-d 179 38 4.54342
-d 180 38 4.60258
-d 181 38 4.65595
-d 182 38 4.70291
-d 183 38 4.74414
-d 184 38 4.78018
-d 185 38 4.81185
-d 186 38 4.83915
-d 187 38 4.86291
-d 188 38 4.88301
-d 189 38 4.90048
-d 190 38 4.91528
-d 191 38 4.92802
-d 192 38 4.9387
-d 193 38 4.94777
-d 194 38 4.95539
-d 195 38 4.9618
-d 196 38 4.96725
-d 197 38 4.97195
-d 198 38 4.97588
-d 199 38 4.97932
-d 200 38 4.98247
-d 201 38 4.98512
-d 202 38 4.98697
-d 203 38 4.98831
-d 204 38 4.98919
-d 205 38 4.99015
-d 206 38 4.99101
-d 207 38 4.99169
-d 208 38 4.99222
-d 209 38 4.99282
-d 210 38 4.99341
-d 211 38 4.994
-d 212 38 4.9946
-d 213 38 4.99519
-d 214 38 4.99578
-d 215 38 4.99638
-d 216 38 4.99667
-d 217 38 4.99693
-d 218 38 4.9972
-d 219 38 4.99747
-d 220 38 4.99773
-d 221 38 4.998
-d 222 38 4.99827
-d 223 38 4.99841
-d 224 38 4.99849
-d 225 38 4.99856
-d 226 38 4.99864
-d 227 38 4.99872
-d 228 38 4.9988
-d 229 38 4.99888
-d 230 38 4.99896
-d 231 38 4.99904
-d 232 38 4.99911
-d 233 38 4.99919
-d 234 38 4.99927
-d 235 38 4.99935
-d 236 38 4.99943
-d 237 38 4.9995
-d 238 38 4.99955
-d 239 38 4.9996
-d 240 38 4.99965
-d 241 38 4.9997
-d 242 38 5.00736
-d 243 38 4.98252
-d 244 38 4.87516
-d 245 38 4.66727
-d 246 38 4.49142
-d 247 38 4.43103
-d 248 38 4.4301
-d 249 38 4.4571
-d 250 38 4.49729
-d 251 38 4.5407
-d 252 38 4.5835
-d 253 38 4.62363
-d 254 38 4.66114
-d 255 38 4.69577
-d 256 38 4.72738
-d 257 38 4.74632
-d 258 38 4.75971
-d 259 38 4.77576
-d 260 38 4.80671
-d 261 38 4.87073
-d 262 38 4.91665
-d 263 38 4.93252
-d 264 38 4.94418
-d 265 38 4.95331
-d 266 38 4.96094
-d 267 38 4.96727
-d 268 38 4.97148
-d 269 38 4.97471
-d 270 38 4.97612
-d 271 38 4.98276
-d 272 38 5.00247
-d 273 38 5.04086
-d 274 38 5.08628
-d 275 38 5.10673
-d 276 38 5.08887
-d 277 38 5.0564
-d 278 38 5.02767
-d 279 38 5.01336
-d 280 38 4.99685
-d 281 38 4.97422
-d 282 38 4.90866
-d 283 38 4.67035
-d 284 38 4.33117
-d 285 38 4.07888
-d 286 38 3.94432
-d 287 38 3.89105
-d 288 38 3.88174
-d 289 38 3.89292
-d 290 38 3.91442
-d 291 38 3.94564
-d 292 38 3.98708
-d 293 38 4.0355
-d 294 38 4.09134
-d 295 38 4.16315
-d 296 38 4.24088
-d 297 38 4.31918
-d 298 38 4.39527
-d 299 38 4.46693
-d 300 38 4.53337
-d 301 38 4.59405
-d 302 38 4.6486
-d 303 38 4.69693
-d 304 38 4.73938
-d 305 38 4.77617
-d 306 38 4.80809
-d 307 38 4.83551
-d 308 38 4.85895
-d 309 38 4.87894
-d 310 38 4.89596
-d 311 38 4.91081
-d 312 38 4.92417
-d 313 38 4.93651
-d 314 38 4.94552
-d 315 38 4.95198
-d 316 38 4.9565
-d 317 38 4.96096
-d 318 38 4.96523
-d 319 38 4.96972
-d 320 38 4.97428
-d 321 38 4.97868
-d 322 38 4.98064
-d 323 38 4.9826
-d 324 38 4.98455
-d 325 38 4.98651
-d 326 38 4.98847
-d 327 38 4.98967
-d 328 38 4.99064
-d 329 38 4.9916
-d 330 38 4.99257
-d 331 38 4.99353
-d 332 38 4.99422
-d 333 38 4.99457
-d 334 38 4.99493
-d 335 38 4.99528
-d 336 38 4.99563
-d 337 38 4.99598
-d 338 38 4.99633
-d 339 38 4.99668
-d 340 38 4.99703
-d 341 38 4.99738
-d 342 38 4.99773
-d 343 38 4.9979
-d 344 38 4.99804
-d 345 38 4.99817
-d 346 38 4.9983
-d 347 38 4.99843
-d 348 38 4.99856
-d 349 38 4.99869
-d 350 38 4.99883
-d 351 38 4.99896
-d 352 38 4.99909
-d 353 38 4.99921
-d 354 38 4.99926
-d 355 38 4.99931
-d 356 38 4.99937
-d 357 38 4.99942
-d 358 38 4.99948
-d 359 38 4.99953
-d 360 38 4.99959
-d 361 38 4.99964
-d 1 39 4.49849
-d 2 39 4.53282
-d 3 39 4.58329
-d 4 39 4.66625
-d 5 39 4.83345
-d 6 39 4.97823
-d 7 39 5.0207
-d 8 39 5.01816
-d 9 39 5.01116
-d 10 39 5.00595
-d 11 39 5.00296
-d 12 39 5.00148
-d 13 39 5.00073
-d 14 39 5.00062
-d 15 39 5.00033
-d 16 39 5.0003
-d 17 39 4.99864
-d 18 39 4.99661
-d 19 39 4.99652
-d 20 39 4.99928
-d 21 39 5.00361
-d 22 39 5.12573
-d 23 39 5.17251
-d 24 39 5.22612
-d 25 39 5.33479
-d 26 39 5.44503
-d 27 39 5.44432
-d 28 39 5.44379
-d 29 39 5.44334
-d 30 39 5.443
-d 31 39 5.44276
-d 32 39 5.44258
-d 33 39 5.44246
-d 34 39 5.44238
-d 35 39 5.44232
-d 36 39 5.44228
-d 37 39 5.44225
-d 38 39 5.44223
-d 39 39 5.44221
-d 40 39 5.4422
-d 41 39 5.44219
-d 42 39 5.44219
-d 43 39 5.44218
-d 44 39 5.44218
-d 45 39 5.44218
-d 46 39 5.44218
-d 47 39 5.44217
-d 48 39 5.44217
-d 49 39 5.44217
-d 50 39 5.44217
-d 51 39 5.44217
-d 52 39 5.44217
-d 53 39 5.44217
-d 54 39 5.44217
-d 55 39 5.44217
-d 56 39 5.44217
-d 57 39 5.44217
-d 58 39 5.44217
-d 59 39 5.44217
-d 60 39 5.44217
-d 61 39 5.44217
-d 62 39 5.44217
-d 63 39 5.44217
-d 64 39 5.44217
-d 65 39 5.44217
-d 66 39 5.44217
-d 67 39 5.44216
-d 68 39 5.44216
-d 69 39 5.44216
-d 70 39 5.44216
-d 71 39 5.44216
-d 72 39 5.44216
-d 73 39 5.44216
-d 74 39 5.44216
-d 75 39 5.44216
-d 76 39 5.44216
-d 77 39 5.44216
-d 78 39 5.44216
-d 79 39 5.44216
-d 80 39 5.44216
-d 81 39 5.44216
-d 82 39 5.44216
-d 83 39 5.44216
-d 84 39 5.44216
-d 85 39 5.44216
-d 86 39 5.44215
-d 87 39 5.44215
-d 88 39 5.44215
-d 89 39 5.44215
-d 90 39 5.44215
-d 91 39 5.44215
-d 92 39 5.44215
-d 93 39 5.44215
-d 94 39 5.44215
-d 95 39 5.44215
-d 96 39 5.44215
-d 97 39 5.44215
-d 98 39 5.44215
-d 99 39 5.44215
-d 100 39 5.44215
-d 101 39 5.44215
-d 102 39 5.44215
-d 103 39 5.44215
-d 104 39 5.44215
-d 105 39 5.44215
-d 106 39 5.44215
-d 107 39 5.44215
-d 108 39 5.44215
-d 109 39 5.44215
-d 110 39 5.44214
-d 111 39 5.44214
-d 112 39 5.44214
-d 113 39 5.44214
-d 114 39 5.44214
-d 115 39 5.44214
-d 116 39 5.44214
-d 117 39 5.44214
-d 118 39 5.44214
-d 119 39 5.44214
-d 120 39 5.44214
-d 121 39 5.44212
-d 122 39 5.45159
-d 123 39 5.45236
-d 124 39 5.44064
-d 125 39 5.44307
-d 126 39 5.45616
-d 127 39 5.38122
-d 128 39 4.77163
-d 129 39 3.53297
-d 130 39 2.74466
-d 131 39 2.34448
-d 132 39 2.11802
-d 133 39 1.9783
-d 134 39 1.88656
-d 135 39 1.82001
-d 136 39 1.77389
-d 137 39 1.72955
-d 138 39 1.69632
-d 139 39 1.66971
-d 140 39 1.6526
-d 141 39 1.65236
-d 142 39 1.56034
-d 143 39 1.53764
-d 144 39 1.97139
-d 145 39 2.75096
-d 146 39 3.39212
-d 147 39 3.74042
-d 148 39 3.82345
-d 149 39 3.85696
-d 150 39 3.88547
-d 151 39 3.91862
-d 152 39 3.9585
-d 153 39 4.00467
-d 154 39 4.05903
-d 155 39 4.1254
-d 156 39 4.19533
-d 157 39 4.26791
-d 158 39 4.34517
-d 159 39 4.42112
-d 160 39 4.49238
-d 161 39 4.55807
-d 162 39 4.6179
-d 163 39 4.6713
-d 164 39 4.71815
-d 165 39 4.75889
-d 166 39 4.79418
-d 167 39 4.82456
-d 168 39 4.85062
-d 169 39 4.87291
-d 170 39 4.89196
-d 171 39 4.90823
-d 172 39 4.92209
-d 173 39 4.93388
-d 174 39 4.9439
-d 175 39 4.95242
-d 176 39 4.95968
-d 177 39 4.96585
-d 178 39 4.97108
-d 179 39 4.9755
-d 180 39 4.97923
-d 181 39 4.98237
-d 182 39 4.98503
-d 183 39 4.98732
-d 184 39 4.98927
-d 185 39 4.99094
-d 186 39 4.99233
-d 187 39 4.99353
-d 188 39 4.99452
-d 189 39 4.99538
-d 190 39 4.99608
-d 191 39 4.99668
-d 192 39 4.99718
-d 193 39 4.9976
-d 194 39 4.99794
-d 195 39 4.99822
-d 196 39 4.99847
-d 197 39 4.99867
-d 198 39 4.99884
-d 199 39 4.99899
-d 200 39 4.99913
-d 201 39 4.99924
-d 202 39 4.99932
-d 203 39 4.99938
-d 204 39 4.99943
-d 205 39 4.99947
-d 206 39 4.99951
-d 207 39 4.99953
-d 208 39 4.99955
-d 209 39 4.99958
-d 210 39 4.99961
-d 211 39 4.99964
-d 212 39 4.99967
-d 213 39 4.99969
-d 214 39 4.99972
-d 215 39 4.99975
-d 216 39 4.99977
-d 217 39 4.99978
-d 218 39 4.99979
-d 219 39 4.99981
-d 220 39 4.99982
-d 221 39 4.99983
-d 222 39 4.99985
-d 223 39 4.99986
-d 224 39 4.99986
-d 225 39 4.99987
-d 226 39 4.99987
-d 227 39 4.99988
-d 228 39 4.99988
-d 229 39 4.99988
-d 230 39 4.99989
-d 231 39 4.99989
-d 232 39 4.9999
-d 233 39 4.9999
-d 234 39 4.99991
-d 235 39 4.99991
-d 236 39 4.99992
-d 237 39 4.99992
-d 238 39 4.99993
-d 239 39 4.99993
-d 240 39 4.99993
-d 241 39 4.99994
-d 242 39 5.00381
-d 243 39 5.00064
-d 244 39 4.99246
-d 245 39 4.99823
-d 246 39 5.00349
-d 247 39 5.00076
-d 248 39 5.00033
-d 249 39 5.00015
-d 250 39 5.00009
-d 251 39 5.00007
-d 252 39 5.00005
-d 253 39 5.00004
-d 254 39 5.00003
-d 255 39 5.00002
-d 256 39 4.99988
-d 257 39 4.99732
-d 258 39 4.99728
-d 259 39 4.9978
-d 260 39 5.00187
-d 261 39 5.00927
-d 262 39 5.08712
-d 263 39 5.07654
-d 264 39 4.92855
-d 265 39 4.4863
-d 266 39 3.76162
-d 267 39 3.00049
-d 268 39 2.49834
-d 269 39 2.20883
-d 270 39 2.03492
-d 271 39 1.92384
-d 272 39 1.84676
-d 273 39 1.79021
-d 274 39 1.74716
-d 275 39 1.7132
-d 276 39 1.68576
-d 277 39 1.66309
-d 278 39 1.64406
-d 279 39 1.62785
-d 280 39 1.61383
-d 281 39 1.60162
-d 282 39 1.59081
-d 283 39 1.58117
-d 284 39 1.57253
-d 285 39 1.56473
-d 286 39 1.55765
-d 287 39 1.55117
-d 288 39 1.54527
-d 289 39 1.53988
-d 290 39 1.53485
-d 291 39 1.53012
-d 292 39 1.5257
-d 293 39 1.5216
-d 294 39 1.51773
-d 295 39 1.51411
-d 296 39 1.51071
-d 297 39 1.50746
-d 298 39 1.50438
-d 299 39 1.50146
-d 300 39 1.49868
-d 301 39 1.49603
-d 302 39 1.4935
-d 303 39 1.49109
-d 304 39 1.48878
-d 305 39 1.48657
-d 306 39 1.48445
-d 307 39 1.48242
-d 308 39 1.48046
-d 309 39 1.47858
-d 310 39 1.47677
-d 311 39 1.47502
-d 312 39 1.47333
-d 313 39 1.4717
-d 314 39 1.47012
-d 315 39 1.46859
-d 316 39 1.46711
-d 317 39 1.46568
-d 318 39 1.46428
-d 319 39 1.46292
-d 320 39 1.4616
-d 321 39 1.46034
-d 322 39 1.45923
-d 323 39 1.45812
-d 324 39 1.45701
-d 325 39 1.4559
-d 326 39 1.45479
-d 327 39 1.45378
-d 328 39 1.45279
-d 329 39 1.45181
-d 330 39 1.45082
-d 331 39 1.44983
-d 332 39 1.44893
-d 333 39 1.44813
-d 334 39 1.44732
-d 335 39 1.44652
-d 336 39 1.44571
-d 337 39 1.44491
-d 338 39 1.4441
-d 339 39 1.4433
-d 340 39 1.44249
-d 341 39 1.44169
-d 342 39 1.44089
-d 343 39 1.44019
-d 344 39 1.43951
-d 345 39 1.43883
-d 346 39 1.43815
-d 347 39 1.43747
-d 348 39 1.4368
-d 349 39 1.43612
-d 350 39 1.43544
-d 351 39 1.43476
-d 352 39 1.43408
-d 353 39 1.43342
-d 354 39 1.43283
-d 355 39 1.43223
-d 356 39 1.43163
-d 357 39 1.43104
-d 358 39 1.43044
-d 359 39 1.42984
-d 360 39 1.42924
-d 361 39 1.42865
-d 1 40 5.0
-d 2 40 5.01048
-d 3 40 5.01221
-d 4 40 4.98887
-d 5 40 4.76261
-d 6 40 4.54943
-d 7 40 4.51564
-d 8 40 4.56249
-d 9 40 4.62621
-d 10 40 4.68843
-d 11 40 4.74374
-d 12 40 4.79044
-d 13 40 4.82972
-d 14 40 4.86127
-d 15 40 4.88724
-d 16 40 4.90862
-d 17 40 4.90791
-d 18 40 4.89858
-d 19 40 4.89589
-d 20 40 4.91767
-d 21 40 5.00405
-d 22 40 5.16956
-d 23 40 5.12391
-d 24 40 4.7557
-d 25 40 3.87953
-d 26 40 3.01124
-d 27 40 2.48482
-d 28 40 2.20424
-d 29 40 2.03812
-d 30 40 1.92679
-d 31 40 1.84956
-d 32 40 1.79256
-d 33 40 1.74907
-d 34 40 1.71487
-d 35 40 1.68724
-d 36 40 1.6644
-d 37 40 1.64513
-d 38 40 1.6287
-d 39 40 1.61446
-d 40 40 1.60197
-d 41 40 1.59095
-d 42 40 1.58117
-d 43 40 1.57245
-d 44 40 1.5646
-d 45 40 1.55752
-d 46 40 1.55109
-d 47 40 1.54516
-d 48 40 1.53958
-d 49 40 1.53444
-d 50 40 1.53008
-d 51 40 1.52606
-d 52 40 1.52205
-d 53 40 1.51843
-d 54 40 1.5149
-d 55 40 1.51146
-d 56 40 1.50893
-d 57 40 1.50639
-d 58 40 1.50387
-d 59 40 1.50133
-d 60 40 1.4988
-d 61 40 1.49651
-d 62 40 1.49436
-d 63 40 1.49222
-d 64 40 1.49007
-d 65 40 1.48793
-d 66 40 1.48585
-d 67 40 1.48433
-d 68 40 1.4828
-d 69 40 1.48128
-d 70 40 1.47975
-d 71 40 1.47823
-d 72 40 1.4767
-d 73 40 1.47518
-d 74 40 1.47365
-d 75 40 1.47213
-d 76 40 1.4706
-d 77 40 1.46912
-d 78 40 1.46795
-d 79 40 1.46678
-d 80 40 1.46561
-d 81 40 1.46444
-d 82 40 1.46327
-d 83 40 1.4621
-d 84 40 1.46093
-d 85 40 1.45976
-d 86 40 1.45859
-d 87 40 1.45741
-d 88 40 1.45628
-d 89 40 1.45534
-d 90 40 1.45441
-d 91 40 1.45347
-d 92 40 1.45254
-d 93 40 1.4516
-d 94 40 1.45067
-d 95 40 1.44973
-d 96 40 1.4488
-d 97 40 1.44786
-d 98 40 1.44693
-d 99 40 1.44604
-d 100 40 1.44539
-d 101 40 1.44475
-d 102 40 1.4441
-d 103 40 1.44345
-d 104 40 1.44281
-d 105 40 1.44216
-d 106 40 1.44151
-d 107 40 1.44086
-d 108 40 1.44022
-d 109 40 1.43957
-d 110 40 1.43892
-d 111 40 1.43828
-d 112 40 1.43763
-d 113 40 1.43698
-d 114 40 1.43633
-d 115 40 1.43569
-d 116 40 1.43504
-d 117 40 1.43439
-d 118 40 1.43375
-d 119 40 1.4331
-d 120 40 1.43245
-d 121 40 1.4318
-d 122 40 1.43157
-d 123 40 1.43089
-d 124 40 1.43001
-d 125 40 1.43042
-d 126 40 1.42899
-d 127 40 1.42439
-d 128 40 1.42216
-d 129 40 1.43447
-d 130 40 1.44048
-d 131 40 1.43705
-d 132 40 1.43314
-d 133 40 1.43039
-d 134 40 1.42861
-d 135 40 1.42739
-d 136 40 1.42651
-d 137 40 1.42548
-d 138 40 1.42488
-d 139 40 1.4243
-d 140 40 1.42392
-d 141 40 1.4235
-d 142 40 1.32443
-d 143 40 1.31149
-d 144 40 1.78169
-d 145 40 2.64844
-d 146 40 3.43211
-d 147 40 3.95252
-d 148 40 4.20231
-d 149 40 4.3746
-d 150 40 4.49948
-d 151 40 4.58929
-d 152 40 4.65742
-d 153 40 4.71183
-d 154 40 4.77057
-d 155 40 4.83196
-d 156 40 4.88354
-d 157 40 4.92894
-d 158 40 4.96625
-d 159 40 4.99235
-d 160 40 5.00651
-d 161 40 5.00941
-d 162 40 5.00813
-d 163 40 5.00689
-d 164 40 5.00588
-d 165 40 5.00504
-d 166 40 5.00431
-d 167 40 5.00368
-d 168 40 5.00314
-d 169 40 5.00268
-d 170 40 5.00228
-d 171 40 5.00194
-d 172 40 5.00165
-d 173 40 5.0014
-d 174 40 5.00118
-d 175 40 5.001
-d 176 40 5.00085
-d 177 40 5.00072
-d 178 40 5.00061
-d 179 40 5.00052
-d 180 40 5.00044
-d 181 40 5.00037
-d 182 40 5.00031
-d 183 40 5.00027
-d 184 40 5.00022
-d 185 40 5.00019
-d 186 40 5.00016
-d 187 40 5.00013
-d 188 40 5.00011
-d 189 40 5.00009
-d 190 40 5.00008
-d 191 40 5.00007
-d 192 40 5.00006
-d 193 40 5.00005
-d 194 40 5.00004
-d 195 40 5.00003
-d 196 40 5.00003
-d 197 40 5.00003
-d 198 40 5.00002
-d 199 40 5.00002
-d 200 40 5.00002
-d 201 40 5.00001
-d 202 40 5.00001
-d 203 40 5.00001
-d 204 40 5.00001
-d 205 40 5.00001
-d 206 40 5.00001
-d 207 40 5.00001
-d 208 40 5.00001
-d 209 40 5.00001
-d 210 40 5.00001
-d 211 40 5.00001
-d 212 40 5.00001
-d 213 40 5.0
-d 214 40 5.0
-d 215 40 5.0
-d 216 40 5.0
-d 217 40 5.0
-d 218 40 4.99999
-d 219 40 4.99999
-d 220 40 4.99999
-d 221 40 4.99998
-d 222 40 4.99998
-d 223 40 4.99998
-d 224 40 4.99998
-d 225 40 4.99998
-d 226 40 4.99998
-d 227 40 4.99998
-d 228 40 4.99999
-d 229 40 4.99999
-d 230 40 4.99999
-d 231 40 4.99999
-d 232 40 4.99999
-d 233 40 4.99999
-d 234 40 5.0
-d 235 40 5.0
-d 236 40 5.0
-d 237 40 5.0
-d 238 40 5.00001
-d 239 40 5.00002
-d 240 40 5.00003
-d 241 40 5.00004
-d 242 40 5.00022
-d 243 40 4.99974
-d 244 40 4.99942
-d 245 40 4.99997
-d 246 40 5.00063
-d 247 40 5.00002
-d 248 40 5.00003
-d 249 40 4.99994
-d 250 40 4.99998
-d 251 40 4.99999
-d 252 40 5.0
-d 253 40 5.0
-d 254 40 5.0
-d 255 40 5.0
-d 256 40 5.0
-d 257 40 4.99981
-d 258 40 4.99998
-d 259 40 5.00004
-d 260 40 5.00036
-d 261 40 5.00049
-d 262 40 5.12012
-d 263 40 5.16315
-d 264 40 5.19712
-d 265 40 5.21835
-d 266 40 4.87874
-d 267 40 4.10151
-d 268 40 3.31555
-d 269 40 2.74207
-d 270 40 2.38075
-d 271 40 2.15872
-d 272 40 2.01614
-d 273 40 1.91886
-d 274 40 1.84852
-d 275 40 1.79401
-d 276 40 1.75052
-d 277 40 1.71508
-d 278 40 1.68672
-d 279 40 1.66467
-d 280 40 1.64602
-d 281 40 1.62985
-d 282 40 1.61576
-d 283 40 1.60343
-d 284 40 1.59256
-d 285 40 1.58287
-d 286 40 1.57418
-d 287 40 1.56632
-d 288 40 1.55922
-d 289 40 1.55282
-d 290 40 1.54687
-d 291 40 1.54132
-d 292 40 1.53618
-d 293 40 1.53143
-d 294 40 1.52698
-d 295 40 1.52282
-d 296 40 1.51895
-d 297 40 1.51527
-d 298 40 1.5118
-d 299 40 1.50851
-d 300 40 1.5054
-d 301 40 1.50244
-d 302 40 1.49963
-d 303 40 1.49695
-d 304 40 1.4944
-d 305 40 1.49196
-d 306 40 1.48963
-d 307 40 1.4874
-d 308 40 1.48527
-d 309 40 1.48322
-d 310 40 1.48124
-d 311 40 1.47934
-d 312 40 1.47751
-d 313 40 1.47574
-d 314 40 1.47403
-d 315 40 1.47239
-d 316 40 1.4708
-d 317 40 1.46926
-d 318 40 1.46777
-d 319 40 1.46632
-d 320 40 1.46491
-d 321 40 1.46355
-d 322 40 1.46237
-d 323 40 1.4612
-d 324 40 1.46002
-d 325 40 1.45884
-d 326 40 1.45766
-d 327 40 1.45659
-d 328 40 1.45555
-d 329 40 1.45451
-d 330 40 1.45346
-d 331 40 1.45242
-d 332 40 1.45147
-d 333 40 1.45062
-d 334 40 1.44978
-d 335 40 1.44894
-d 336 40 1.44809
-d 337 40 1.44725
-d 338 40 1.4464
-d 339 40 1.44556
-d 340 40 1.44472
-d 341 40 1.44387
-d 342 40 1.44303
-d 343 40 1.4423
-d 344 40 1.44159
-d 345 40 1.44088
-d 346 40 1.44017
-d 347 40 1.43947
-d 348 40 1.43876
-d 349 40 1.43805
-d 350 40 1.43734
-d 351 40 1.43664
-d 352 40 1.43593
-d 353 40 1.43524
-d 354 40 1.43462
-d 355 40 1.434
-d 356 40 1.43338
-d 357 40 1.43276
-d 358 40 1.43213
-d 359 40 1.43151
-d 360 40 1.43089
-d 361 40 1.43027
diff --git a/blt3.0/demos/graph4a.tcl b/blt3.0/demos/graph4a.tcl
deleted file mode 100644
index 5f30e49..0000000
--- a/blt3.0/demos/graph4a.tcl
+++ /dev/null
@@ -1,232 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set tcl_precision 15 
-
-set graph .graph
-image create picture bgTexture -file ./images/chalk.gif
-
-option add *default			normal
-option add *Button.tile			bgTexture
-
-option add *Htext.font			"Times 18 bold"
-option add *Text.font			"Times 18 bold"
-option add *header.font			"Times 12"
-option add *footer.font			"Times 18"
-option add *Graph.relief		raised
-#option add *Graph.borderWidth		2
-#option add *Graph.Legend.activeBackground white
-option add *Graph.height		5i
-option add *Graph.plotBackground	black
-option add *Graph.width			7i
-option add *Graph.tile			bgTexture
-option add *Graph.halo			0
-
-option add *Graph.title			"s27.out"
-
-option add *Axis.titleColor		red2
-option add *x.title			"Time"
-option add *y.title			"Signals"
-
-option add *Crosshairs.Color		white
-
-option add *activeLine.Fill		navyblue
-option add *activeLine.LineWidth	2
-option add *Element.ScaleSymbols	yes
-option add *Element.Smooth		natural
-
-option add *Symbol			square
-option add *Element.LineWidth		1
-option add *Pen.LineWidth		1
-option add *Pixels			1
-
-option add *Grid.color			grey50
-option add *Grid.dashes			"2 4"
-option add *Grid.hide			no
-
-option add *Legend.ActiveRelief		sunken
-option add *Legend.Position		right
-option add *Legend.Relief		flat
-option add *Legend.font			"Helvetica 6"
-option add *Legend.Pad			0
-option add *Legend.hide			no
-
-option add *LineMarker.Dashes		5
-option add *LineMarker.Foreground	white
-option add *zoomOutline.outline		yellow
-
-option add *TextMarker.Background	{}
-option add *TextMarker.Foreground	white
-
-set table [blt::datatable create]
-$table restore -file graph4a.tab
-
-set attributes {
-    V1	v1	red	red  
-    V2  v2	green	red  
-    V3	v3	blue	red  
-    V4  v4	yellow  red  
-    V5  v5	magenta red  
-    V6  v6	cyan	red  
-    V7	v7	white	red  
-    V8  v8	red	green  
-    V9  v9	green	green  
-    V10 v10	blue	green  
-    V11 v11	yellow	green  
-    V12 v12	magenta	green  
-    V13	v13	cyan	green  
-    V14	v14	red	red  
-    V15 v15	green	red  
-    V16	v16	blue	red  
-    V17 v17	yellow  red  
-    V18 v18	magenta red  
-    V19 v19	cyan	red  
-    V20	v20	white	red  
-    V21 v21	red	green  
-    V22 v22	green	green  
-    V23 v23	blue	green  
-    V24 v24	yellow	green  
-    V25 v25	magenta	green  
-    V26	v26	cyan	green  
-    V27	v27	red	red  
-    V28 v28	green	red  
-    V29	v29	blue	red  
-    V30 v30	yellow  red  
-    V31 v31	magenta red  
-    V32 v32	cyan	red  
-    V33	v33	white	red  
-    V34 v34	red	green  
-    V35 v35	green	green  
-    V36 v36	blue	green  
-    V37 v37	yellow	green  
-    V38 v38	magenta	green  
-    V39	v39	cyan	green  
-}
-
-text .header -wrap word -width 0 -height 6
-
-set text {
-To zoom in on a region of the graph, simply click once on the left 
-mouse button to pick one corner of the area to be zoomed.  Move the 
-mouse to the other corner and click again. 
-} 
-
-regsub -all "\n" $text "" text
-.header insert end "$text\n"
-.header insert end { You can click on the }
-set im [image create picture -file ./images/qv100.t.gif]
-button .header.snap -image $im -command { MakeSnapshot }
-.header window create end -window .header.snap
-.header insert end { button to see a picture image snapshot.}
-.header configure -state disabled
-blt::graph $graph 
-
-blt::htext .footer -text {Hit the %%
-    set im [image create picture -file ./images/stopsign.gif]
-    button $htext(widget).quit -image $im -command { exit }
-    $htext(widget) append $htext(widget).quit 
-%% button when you've seen enough. %%
-    label $htext(widget).logo -bitmap BLT
-    $htext(widget) append $htext(widget).logo 
-%%}
-
-foreach {label yData outline color} $attributes {
-    set xx [list $table "x"]
-    set yy [list $table $yData]
-    .graph element create $label -x $xx -y $yy -outline $outline -color $color
-}
-
-set unique 0
-
-proc Sharpen { photo } {
-    set kernel { -1 -1 -1 -1  16 -1 -1 -1 -1 } 
-    #set kernel { 0 -1 0 -1  4.9 -1 0 -1 0 }
-    blt::winop convolve $photo $photo $kernel
-}
-
-proc MakeSnapshot {} {
-    update idletasks
-    global unique
-    set top ".snapshot[incr unique]"
-    set im1 [image create picture]
-    .graph snap $im1
-    set width 210
-    set height 150
-    set thumb1 [image create picture -width $width -height $height -gamma 2.2]
-    $thumb1 resize $im1 -filter sinc 
-    image delete $im1
-
-    set thumb2 [image create picture -window .graph -width $width \
-	-height $height -filter sinc -gamma 2.2 -aspect yes]
-
-    toplevel $top
-    wm title $top "Snapshot \#$unique of \"[.graph cget -title]\""
-    label $top.l1 -image $thumb1 
-    label $top.l2 -image $thumb2 
-
-    button $top.but -text "Dismiss" -command "DestroySnapshot $top"
-    blt::table $top \
-	0,0 $top.l1 \
-	0,1 $top.l2 \
-        1,0 $top.but -pady 4 
-    focus $top.but
-}
-
-proc DestroySnapshot { win } {
-    set im [$win.l1 cget -image]
-    $im export jpg -file test.jpg
-    image delete $im
-    destroy $win
-}
-
-blt::table . \
-    .header 0,0 -fill x \
-    .graph 1,0  -fill both \
-    .footer 2,0 -fill x
-
-blt::table configure . r0 r2 -resize none
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-#Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
-
-$graph element bind all <Enter> {
-    %W legend activate [%W element get current]
-}
-
-$graph element bind all <Leave> {
-    %W legend deactivate [%W element get current]
-}
-
-if 0 {
-$table column extend "x"
-$table import vector "x" 1
-$table column type "x" double
-set col 1
-foreach vector [lsort -dictionary [blt::vector names ::v*]] {
-    set name [string trim $vector ::]
-    $table column extend $name
-    $table column type $name double
-    incr col
-    $table import vector $vector $col
-}
-
-$table dump -file graph4.tab
-}
-
-blt::LegendSelections $graph
-focus $graph
-toplevel .top
-update
-$graph legend configure \
-    -exportselection yes \
-    -selectbackground lightblue4 \
-    -selectforeground white \
-    -position .top.legend
-pack .top.legend -fill both -expand yes
-#-nofocusselectbackground grey90
-#    -nofocusselectforeground white 
diff --git a/blt3.0/demos/graph5.tcl b/blt3.0/demos/graph5.tcl
deleted file mode 100755
index d8a0d41..0000000
--- a/blt3.0/demos/graph5.tcl
+++ /dev/null
@@ -1,66 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-option add *Element.ScaleSymbols	true
-option add *Axis.loose			true
-option add *Pixels			.8c
-option add *Element.lineWidth		0
-option add *Legend.ActiveRelief		raised
-option add *Legend.padY			0
-option add *Button*Font			{ Arial 14 } widgetDefault
-option add *Legend*Font			{ Arial 14 bold } widgetDefault
-option add *Graph.Font			{ Arial 18 bold } widgetDefault
-option add *Graph.title			"Element Symbol Types"
-option add *Graph.width			8i
-option add *Graph.height		6i
-option add *Graph.plotPadY		.25i
-option add *Graph.plotPadX		.25i
-
-set graph .graph
-
-blt::graph $graph
-
-blt::vector x -variable ""
-x set { 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 }
-
-for { set i 0 } { $i < 11 } { incr i } {
-    set vecName "y${i}"
-    blt::vector ${vecName}
-    $vecName length 11
-    $vecName variable y
-    set y(:) [expr $i*100.0]
-}
-
-set attributes {
-    none	"None"		red	red4		y0
-    arrow	"Arrow"		brown	brown4		y10
-    circle	"Circle"	yellow	yellow4		y2
-    cross	"Cross"		cyan	cyan4		y6
-    diamond	"Diamond"	green	green4		y3
-    plus	"Plus"		magenta	magenta4	y9
-    splus	"Splus"		Purple	purple4		y7
-    scross	"Scross"	red	red4		y8
-    square	"Square"	orange	orange4		y1
-    triangle	"Triangle"	blue	blue4		y4
-    "@bitmaps/hobbes.xbm @bitmaps/hobbes_mask.xbm"
-		"Bitmap"	yellow	black		y5
-}
-
-set count 0
-foreach {symbol label fill color yVec} $attributes {
-    $graph element create line${count} \
-	-label $label -symbol $symbol -color $color -fill $fill -x x -y $yVec 
-    incr count
-}
-$graph element configure line0 -dashes  { 2 4 2 } -linewidth 2
-button .quit -text Quit -command exit
-blt::table . \
-  $graph 0,0 -fill both \
-  .quit  1,0 -fill x
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
diff --git a/blt3.0/demos/graph6.tcl b/blt3.0/demos/graph6.tcl
deleted file mode 100755
index f22e4d5..0000000
--- a/blt3.0/demos/graph6.tcl
+++ /dev/null
@@ -1,2320 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set tcl_precision 15 
-
-set graph .graph
-
-option add *Graph.Width			10i
-option add *Graph.leftMargin		.75i
-option add *Graph.Height		6i
-option add *Graph.plotBackground	black
-
-option add *LineMarker.color		white
-option add *LineMarker.Dashes		5
-option add *TextMarker.foreground	white
-option add *TextMarker.Background	{}
-
-option add *Graph.x.hide		yes
-option add *Graph.x.title		""
-option add *Graph.y.rotate		90
-#option add *Graph.y.stepSize		2.0
-option add *Graph.title			""
-option add *graph.Title			"Example s27" 
-option add *graph.x.hide		no
-option add *graph.topMargin		0
-option add *graph.bottomMargin		0
-option add *x.Title			Time
-option add *y.Title			Signals
-option add *Pixels			1
-
-option add *Reduce			0.5
-option add *bufferElements no
-
-option add *Element.color		green4
-option add *Element.ScaleSymbols	true
-option add *Element.Color		grey70
-option add *Element.Symbol		none
-option add *Element.LineWidth		1
-#option add *Element.Smooth		natural
-option add *Element.Smooth		catrom
-
-option add *activeLine.LineWidth	2
-option add *activeLine.Color		white
-option add *activeLine.Color		green1
-
-#option add *Legend.Hide		yes
-option add *Legend.Position		right
-option add *Legend.Relief		flat
-option add *Legend.activeRelief		sunken
-option add *Legend.borderWidth		2
-option add *Legend.Font		-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*
-option add *Grid.hide			no
-option add *Grid.dashes			"1 5"
-
-#option add *foreground white
-option add *zoomOutline.outline		yellow
-
-blt::graph .graph
-
-blt::vector x -variable ""
-for { set i 1 } { $i <= 39 } { incr i } {
-    blt::vector create v${i} -variable ""
-}
-
-x set {
-    0 1e-10 2e-10 3e-10 4e-10 5e-10 6e-10 7e-10 8e-10 9e-10 
-    1e-09 1.1e-09 1.2e-09 1.3e-09 1.4e-09 1.5e-09 1.6e-09 1.7e-09 
-    1.8e-09 1.9e-09 2e-09 2.1e-09 2.2e-09 2.3e-09 2.4e-09 2.5e-09 
-    2.6e-09 2.7e-09 2.8e-09 2.9e-09 3e-09 3.1e-09 3.2e-09 3.3e-09 
-    3.4e-09 3.5e-09 3.6e-09 3.7e-09 3.8e-09 3.9e-09 4e-09 4.1e-09 
-    4.2e-09 4.3e-09 4.4e-09 4.5e-09 4.6e-09 4.7e-09 4.8e-09 
-    4.9e-09 5e-09 5.1e-09 5.2e-09 5.3e-09 5.4e-09 5.5e-09 5.6e-09 
-    5.7e-09 5.8e-09 5.9e-09 6e-09 6.1e-09 6.2e-09 6.3e-09 6.4e-09 
-    6.5e-09 6.6e-09 6.7e-09 6.8e-09 6.9e-09 7e-09 7.1e-09 7.2e-09 
-    7.3e-09 7.4e-09 7.5e-09 7.6e-09 7.7e-09 7.8e-09 7.9e-09 
-    8e-09 8.1e-09 8.2e-09 8.3e-09 8.4e-09 8.5e-09 8.6e-09 8.7e-09 
-    8.8e-09 8.9e-09 9e-09 9.1e-09 9.2e-09 9.3e-09 9.4e-09 9.5e-09 
-    9.6e-09 9.7e-09 9.8e-09 9.9e-09 1e-08 1.01e-08 1.02e-08 
-    1.03e-08 1.04e-08 1.05e-08 1.06e-08 1.07e-08 1.08e-08 1.09e-08 
-    1.1e-08 1.11e-08 1.12e-08 1.13e-08 1.14e-08 1.15e-08 1.16e-08 
-    1.17e-08 1.18e-08 1.19e-08 1.2e-08 1.21e-08 1.22e-08 1.23e-08 
-    1.24e-08 1.25e-08 1.26e-08 1.27e-08 1.28e-08 1.29e-08 1.3e-08 
-    1.31e-08 1.32e-08 1.33e-08 1.34e-08 1.35e-08 1.36e-08 1.37e-08 
-    1.38e-08 1.39e-08 1.4e-08 1.41e-08 1.42e-08 1.43e-08 1.44e-08 
-    1.45e-08 1.46e-08 1.47e-08 1.48e-08 1.49e-08 1.5e-08 1.51e-08 
-    1.52e-08 1.53e-08 1.54e-08 1.55e-08 1.56e-08 1.57e-08 1.58e-08 
-    1.59e-08 1.6e-08 1.61e-08 1.62e-08 1.63e-08 1.64e-08 1.65e-08 
-    1.66e-08 1.67e-08 1.68e-08 1.69e-08 1.7e-08 1.71e-08 1.72e-08 
-    1.73e-08 1.74e-08 1.75e-08 1.76e-08 1.77e-08 1.78e-08 1.79e-08 
-    1.8e-08 1.81e-08 1.82e-08 1.83e-08 1.84e-08 1.85e-08 1.86e-08 
-    1.87e-08 1.88e-08 1.89e-08 1.9e-08 1.91e-08 1.92e-08 1.93e-08 
-    1.94e-08 1.95e-08 1.96e-08 1.97e-08 1.98e-08 1.99e-08 2e-08 
-    2.01e-08 2.02e-08 2.03e-08 2.04e-08 2.05e-08 2.06e-08 2.07e-08 
-    2.08e-08 2.09e-08 2.1e-08 2.11e-08 2.12e-08 2.13e-08 2.14e-08 
-    2.15e-08 2.16e-08 2.17e-08 2.18e-08 2.19e-08 2.2e-08 2.21e-08 
-    2.22e-08 2.23e-08 2.24e-08 2.25e-08 2.26e-08 2.27e-08 2.28e-08 
-    2.29e-08 2.3e-08 2.31e-08 2.32e-08 2.33e-08 2.34e-08 2.35e-08 
-    2.36e-08 2.37e-08 2.38e-08 2.39e-08 2.4e-08 2.41e-08 2.42e-08 
-    2.43e-08 2.44e-08 2.45e-08 2.46e-08 2.47e-08 2.48e-08 2.49e-08 
-    2.5e-08 2.51e-08 2.52e-08 2.53e-08 2.54e-08 2.55e-08 2.56e-08 
-    2.57e-08 2.58e-08 2.59e-08 2.6e-08 2.61e-08 2.62e-08 2.63e-08 
-    2.64e-08 2.65e-08 2.66e-08 2.67e-08 2.68e-08 2.69e-08 2.7e-08 
-    2.71e-08 2.72e-08 2.73e-08 2.74e-08 2.75e-08 2.76e-08 2.77e-08 
-    2.78e-08 2.79e-08 2.8e-08 2.81e-08 2.82e-08 2.83e-08 2.84e-08 
-    2.85e-08 2.86e-08 2.87e-08 2.88e-08 2.89e-08 2.9e-08 2.91e-08 
-    2.92e-08 2.93e-08 2.94e-08 2.95e-08 2.96e-08 2.97e-08 2.98e-08 
-    2.99e-08 3e-08 3.01e-08 3.02e-08 3.03e-08 3.04e-08 3.05e-08 
-    3.06e-08 3.07e-08 3.08e-08 3.09e-08 3.1e-08 3.11e-08 3.12e-08 
-    3.13e-08 3.14e-08 3.15e-08 3.16e-08 3.17e-08 3.18e-08 3.19e-08 
-    3.2e-08 3.21e-08 3.22e-08 3.23e-08 3.24e-08 3.25e-08 3.26e-08 
-    3.27e-08 3.28e-08 3.29e-08 3.3e-08 3.31e-08 3.32e-08 3.33e-08 
-    3.34e-08 3.35e-08 3.36e-08 3.37e-08 3.38e-08 3.39e-08 3.4e-08 
-    3.41e-08 3.42e-08 3.43e-08 3.44e-08 3.45e-08 3.46e-08 3.47e-08 
-    3.48e-08 3.49e-08 3.5e-08 3.51e-08 3.52e-08 3.53e-08 3.54e-08 
-    3.55e-08 3.56e-08 3.57e-08 3.58e-08 3.59e-08 3.6e-08 
-}
-
-wm min . 0 0 
-
-v1 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-
-.graph element create V1 -x x -y v1
-
-v2 set {
-    0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 
-    5.32907e-15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 
-    5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 
-}
-
-.graph element create V2 -x x -y v2 
-
-v3 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 
-}
-
-.graph element create V3 -x x -y v3 
-
-v4 set {
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-
-.graph element create V4 -x x -y v4 
-
-v5 set {
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-}
-
-.graph element create V5 -x x -y v5 
-v6 set {
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-    0 0 0 0 
-}
-.graph element create V6 -x x -y v6 
-v7 set {
-    5 5.16904 4.84159 3.34542 0.317102 0.103304 0.0275721 0.0221534 
-    0.017689 0.0142639 0.0113974 0.00918238 0.00742541 0.00616602 
-    0.00481195 0.00397049 -0.0659889 -0.025671 0.165495 0.986891 
-    3.05229 4.55511 4.91611 4.98192 4.99428 4.99833 4.99095 
-    4.97295 4.95493 4.93428 4.90723 4.94799 4.98584 4.99566 
-    4.99813 4.99907 4.99947 4.99965 4.99976 4.99984 4.99989 
-    4.99992 4.99994 4.99996 4.99998 5.00002 5.00006 5.00002 
-    4.99996 4.99994 4.99999 5.00003 5.00002 5 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99996 4.99997 4.99997 4.99998 
-    4.99998 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.16575 
-    4.69986 2.43862 0.0230224 0.035229 -0.0210607 -0.0292766 
-    -0.0172693 -0.00271479 -0.000912251 -0.000349106 -0.000116866 
-    -4.24733e-05 -1.39536e-05 -3.01179e-05 -0.0657192 -0.0204835 
-    0.183378 1.07181 3.118 4.46472 4.84158 4.94795 4.98173 4.99236 
-    4.99762 5.01939 5.0433 5.05332 5.04959 5.03955 5.02851 5.02052 
-    5.01422 5.00965 5.00631 5.00405 5.00248 5.00083 5.00012 
-    5.00209 5.00387 5.00347 4.99917 4.99213 4.98411 4.97521 
-    4.96332 4.94601 4.9304 4.94633 4.97936 4.99264 4.99685 4.99857 
-    4.99925 4.99954 4.9997 4.99973 4.9997 4.99973 4.99979 4.99983 
-    4.99986 4.99988 4.9999 4.9999 4.99992 4.99993 4.99994 4.99995 
-    4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5.14242 4.76101 3.16003 0.299374 
-    0.0645506 -0.000498424 -2.45108e-05 -2.27986e-05 -5.24401e-05 
-    -4.9884e-05 -4.92491e-05 -2.93354e-05 -3.21402e-05 -2.11851e-05 
-    -3.37925e-05 -0.0657892 -0.020563 0.182582 1.06058 3.12484 
-    4.46552 4.84146 4.95102 4.98556 4.99472 4.99806 4.99909 
-    4.99955 4.99976 4.99994 4.99992 5.00029 4.99967 4.99849 
-    4.99736 4.99884 5.00099 5.00377 5.00215 4.99994 4.99893 
-    4.99788 4.99862 5.00055 5.00134 5.00127 5.00073 5.00039 
-    5.00018 5.00006 5.00001 4.99985 5.00026 5.00018 5.00003 
-    4.99981 4.99985 4.99987 4.99985 4.99982 4.99982 4.99982 
-    4.99983 4.99985 4.99987 4.99989 4.99991 4.99992 4.99994 
-    4.99995 4.99995 4.99994 4.99994 4.99996 4.99999 5.00002 
-    5.00008 5.00009 5.00006 5.00001 5 4.99999 4.99998 4.99997 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 
-    4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 4.99998 
-    4.99998 
-}
-
-.graph element create V7 -x x -y v7 
-
-v8 set {
-    5 5.03758 5.04711 4.96911 4.20882 3.96295 4.01117 4.15521 
-    4.2967 4.42274 4.5295 4.6176 4.69014 4.74831 4.7966 4.83537 
-    4.80526 4.787 4.79295 4.88588 5.08978 5.15615 5.10778 5.07718 
-    5.06652 5.08225 4.9744 4.52977 3.77452 2.69426 1.15294 0.245509 
-    0.0981544 0.0567527 0.0367487 0.0252578 0.0180599 0.0133837 
-    0.0101497 0.0078616 0.00620186 0.00499056 0.0041027 0.00344223 
-    0.00295808 0.00260089 0.00229887 0.00200817 0.00176397 0.00160116 
-    0.00147381 0.00134645 0.00125029 0.00116043 0.00107371 0.00101981 
-    0.000965921 0.000912028 0.000858135 0.000804242 0.000761669 
-    0.00072672 0.000691771 0.000656823 0.000621874 0.000588722 
-    0.00057041 0.000552098 0.000533785 0.000515473 0.000497162 
-    0.00047885 0.000460537 0.000442226 0.000423914 0.000405601 
-    0.000388399 0.000378694 0.000368989 0.000359284 0.00034958 
-    0.000339875 0.00033017 0.000320465 0.00031076 0.000301055 
-    0.00029135 0.000282207 0.000276247 0.000270287 0.000264327 
-    0.000258367 0.000252407 0.000246447 0.000240487 0.000234527 
-    0.000228567 0.000222607 0.000217086 0.000213696 0.000210307 
-    0.000206918 0.000203528 0.000200139 0.00019675 0.00019336 
-    0.000189971 0.000186582 0.000183192 0.000179803 0.000176414 
-    0.000173025 0.000169635 0.000166246 0.000162857 0.000159467 
-    0.000156078 0.000152689 0.000149299 0.00014591 0.00014255 
-    0.0316021 0.163272 0.348732 0.603651 0.35745 0.135965 0.0707354 
-    0.0314595 0.0201047 0.00994945 0.00389601 0.00138839 0.00060778 
-    0.000329648 0.000492396 -0.0732035 -0.0844077 -0.0789062 
-    -0.0390837 0.0197559 0.0183094 -0.00180099 -0.0189565 -0.0424144 
-    -0.0735904 -0.0892423 0.285039 1.13702 2.10809 2.95826 3.60164 
-    4.0435 4.35771 4.57254 4.71769 4.81329 4.87534 4.91487 4.94264 
-    4.97375 5.01526 5.06517 5.10154 5.06259 4.89005 4.5787 4.12226 
-    3.46151 2.49023 1.2586 0.32725 0.116753 0.0701865 0.0455509 
-    0.0286914 0.0178176 0.0117599 0.00902715 0.00760583 0.00637745 
-    0.00543811 0.00439377 0.00352448 0.0030151 0.00285771 0.002465 
-    0.00203114 0.00173004 0.0014839 0.00125177 0.00105327 0.000894905 
-    0.000766372 0.000658894 0.000569105 0.000492114 0.000427938 
-    0.000370217 0.000314758 0.000266569 0.000233726 0.000209048 
-    0.000191957 0.000177169 0.000166604 0.000161 0.000157314 
-    0.000143828 0.000130342 0.000116857 0.000103371 8.98855e-05 
-    7.63998e-05 6.29141e-05 5.76583e-05 5.30027e-05 4.8347e-05 
-    4.36913e-05 3.90357e-05 3.438e-05 2.97243e-05 2.72507e-05 
-    2.59083e-05 2.45659e-05 2.32235e-05 2.18811e-05 2.05387e-05 
-    1.91963e-05 1.78539e-05 1.65115e-05 1.51691e-05 1.38267e-05 
-    1.24843e-05 1.11419e-05 9.79954e-06 8.51574e-06 7.69807e-06 
-    6.8804e-06 6.06273e-06 5.24506e-06 0.0287318 0.0317111 -0.0320087 
-    -0.103609 0.0369639 0.0121128 0.00961197 0.00934971 0.00820853 
-    0.00699769 0.00607002 0.00535541 0.00476552 0.00427601 0.00376357 
-    -0.073012 -0.0866964 -0.0809538 -0.038005 0.0277001 0.0188906 
-    0.00614597 0.00373629 0.00489787 0.0146573 0.0191052 0.0151708 
-    0.0124224 0.0105859 0.00879272 0.00729464 0.0070047 0.00449575 
-    -0.00626652 -0.0252417 -0.0147287 0.022538 0.0822905 0.0947372 
-    0.0657516 0.0445506 0.0316753 0.0220971 0.0158101 0.0140971 
-    0.0161498 0.0139876 0.0122447 0.0106994 0.009397 0.00822236 
-    0.00686509 0.00797431 0.00751269 0.00671173 0.00595243 0.00524633 
-    0.00459528 0.00401688 0.00350109 0.00303954 0.00260569 0.00222792 
-    0.00191033 0.00163917 0.00140949 0.00121464 0.0010471 0.000900638 
-    0.000768847 0.000645236 0.000524807 0.000460275 0.000442237 
-    0.000446775 0.000397026 0.000301585 0.000228994 0.000190894 
-    0.000166569 0.000152261 0.000137953 0.000123644 0.000109336 
-    9.50281e-05 8.56557e-05 7.78437e-05 7.00318e-05 6.22198e-05 
-    5.44079e-05 4.87539e-05 4.57761e-05 4.27982e-05 3.98203e-05 
-    3.68425e-05 3.38646e-05 3.08868e-05 2.79089e-05 2.4931e-05 
-    2.19532e-05 1.89753e-05 1.75244e-05 1.64095e-05 1.52946e-05 
-    1.41797e-05 1.30648e-05 1.19499e-05 1.0835e-05 9.72011e-06 
-    8.60521e-06 7.4903e-06 6.5117e-06 6.10334e-06 5.69497e-06 
-    5.2866e-06 4.87824e-06 4.46987e-06 4.06151e-06 3.65314e-06 
-    3.24477e-06 
-}
-
-.graph element create V8 -x x -y v8 
-
-v9 set {
-    1.86175 1.99708 2.07867 2.01211 2.43309 3.27194 3.63896 
-    3.90426 4.11074 4.27932 4.41496 4.52543 4.61491 4.68862 
-    4.7479 4.79666 4.72895 4.68886 4.70354 4.81353 5.01568 5.14184 
-    5.10482 5.07362 5.05143 5.03638 5.02323 5.01465 5.00853 
-    5.00383 4.99985 5.00454 5.00652 5.00546 5.00411 5.003 5.00214 
-    5.00151 5.00106 5.00073 5.0005 5.00034 5.00023 5.00015 5.0001 
-    5.00005 5 5.00001 5.00005 5.00005 5.00003 5 4.99998 4.99996 
-    4.99994 4.99995 4.99997 4.99998 5 5.00001 5.00002 5.00002 
-    5.00003 5.00003 5.00003 5.00003 5.00003 5.00003 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.17392 4.94828 3.78491 
-    1.52079 0.608874 0.244031 0.127087 0.0552995 0.0361032 0.0169025 
-    0.006364 0.00217624 0.000921391 0.000457305 0.000786754 
-    -0.120016 -0.148054 -0.15898 -0.0801463 0.16463 0.174017 
-    0.0799249 0.0318788 0.0129696 0.00483397 0.0025677 0.0042079 
-    0.00350003 0.00178404 -8.72902e-05 -0.00128497 -0.00142213 
-    -0.00130018 -0.00106874 -0.000789207 -0.000824335 -0.00104518 
-    -0.00136799 -0.004366 -0.0102621 -0.0109254 -0.00649259 
-    -0.00194842 0.00029793 0.00148673 0.00221085 0.00228291 
-    0.00185261 0.00139687 0.00148183 0.00562266 0.00844119 0.00754627 
-    0.00657396 0.00591212 0.00539269 0.0049282 0.00448417 0.0040572 
-    0.00363719 0.00320392 0.00279607 0.00243938 0.00211505 0.00182302 
-    0.00156254 0.0013341 0.00113834 0.000971865 0.00082776 0.000706193 
-    0.000602499 0.000515059 0.000441401 0.00037897 0.000325459 
-    0.00028083 0.000242096 0.000207274 0.000176444 0.000150372 
-    0.000126407 0.000103373 9.05522e-05 8.53555e-05 8.63685e-05 
-    9.02593e-05 8.37346e-05 7.72099e-05 7.06852e-05 6.41605e-05 
-    5.76358e-05 5.11112e-05 4.45865e-05 4.08176e-05 3.72497e-05 
-    3.36818e-05 3.01138e-05 2.65459e-05 2.2978e-05 1.94101e-05 
-    1.76154e-05 1.67399e-05 1.58645e-05 1.4989e-05 1.41136e-05 
-    1.32381e-05 1.23626e-05 1.14872e-05 1.06117e-05 9.73629e-06 
-    8.86083e-06 7.98538e-06 7.10993e-06 6.23447e-06 5.44363e-06 
-    5.32578e-06 5.20792e-06 5.09007e-06 4.97222e-06 0.0784323 
-    0.0474527 -0.0764232 -0.151146 0.0615785 0.0144489 0.00974161 
-    0.00947176 0.00849005 0.00728201 0.00630581 0.00554032 0.00487809 
-    0.00441504 0.00384139 -0.118943 -0.149894 -0.161173 -0.0825299 
-    0.171686 0.176912 0.0816085 0.0335236 0.013791 0.0056976 
-    0.00238833 0.00105348 0.000526199 0.00025969 0.000396026 
-    0.000837835 0.00170131 0.00196699 -0.000553314 -0.0061621 
-    -0.0111895 -0.0142698 -0.0124608 -0.00795847 -0.00467822 
-    -0.0043058 -0.00874449 -0.0118584 -0.00871386 -0.00377892 
-    1.95244e-05 0.00218952 0.00325486 0.00386497 0.00422837 
-    0.00446883 0.00447065 0.00486647 0.00547838 0.00565398 0.00559092 
-    0.00538752 0.00507015 0.00466305 0.00420756 0.00373465 0.00328404 
-    0.00287059 0.00250057 0.00216124 0.00184861 0.00156815 0.00134624 
-    0.00117857 0.00103412 0.0008948 0.000761012 0.000619853 
-    0.000462614 0.000319965 0.000287666 0.000356415 0.000379946 
-    0.000339183 0.00027972 0.000252982 0.000226244 0.000199507 
-    0.000172769 0.000146031 0.000130097 0.000117578 0.000105059 
-    9.25401e-05 8.00213e-05 7.11204e-05 6.67061e-05 6.22918e-05 
-    5.78775e-05 5.34632e-05 4.90489e-05 4.46346e-05 4.02203e-05 
-    3.5806e-05 3.13916e-05 2.69773e-05 2.4827e-05 2.31747e-05 
-    2.15225e-05 1.98702e-05 1.8218e-05 1.65658e-05 1.49135e-05 
-    1.32613e-05 1.1609e-05 9.95678e-06 8.50108e-06 7.86765e-06 
-    7.23422e-06 6.60079e-06 5.96736e-06 5.33393e-06 4.7005e-06 
-    4.06707e-06 3.43363e-06 
-}
-
-.graph element create V9 -x x -y v9 
-
-v10 set {
-    1.86175 1.99308 2.16619 2.46661 3.09359 3.76864 4.31299 
-    4.65564 4.83425 4.92153 4.96157 4.98063 4.98649 4.99039 
-    4.9945 4.9972 4.96206 4.89882 4.83865 4.83202 4.91016 5.04479 
-    5.06078 5.04827 5.03474 5.0246 5.01639 5.00996 5.00569 5.00239 
-    5.00043 5.00296 5.00437 5.00382 5.00287 5.00208 5.00148 
-    5.00104 5.00073 5.0005 5.00034 5.00023 5.00016 5.00011 5.00008 
-    5.00007 5.00007 5.00004 5 4.99998 4.99998 4.99997 4.99998 
-    4.99999 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5.10081 
-    5.10949 4.98359 5.00733 5.15145 4.37298 2.36126 0.470759 
-    0.0577238 0.0115884 0.00262611 0.000671499 0.000389038 0.000291291 
-    0.000317347 -0.0167823 -0.0158344 -0.0140559 0.0104849 0.0865874 
-    0.107813 0.0524688 0.0214369 0.00876443 0.00341595 0.00170778 
-    0.00259042 0.0022241 0.00118519 1.10217e-06 -0.000784506 
-    -0.000948169 -0.000856256 -0.000696719 -0.000485987 -0.000724787 
-    -0.000981491 -0.001454 -0.00552498 -0.0114992 -0.0105266 
-    -0.00543527 -0.000982798 0.00127356 0.00224212 0.00275439 
-    0.00281098 0.0025471 0.00230368 0.00222576 0.00485522 0.00729453 
-    0.00691796 0.0062615 0.00573987 0.0052688 0.00481185 0.00436934 
-    0.00394326 0.00352712 0.00309978 0.00270038 0.00235335 0.00203742 
-    0.00175256 0.00150067 0.00128126 0.00109323 0.000933619 
-    0.000795113 0.000678182 0.00057843 0.000494345 0.000423609 
-    0.000363821 0.000312766 0.000269856 0.000232389 0.000198382 
-    0.000168126 0.00014267 0.000119293 9.69034e-05 8.5669e-05 
-    8.26828e-05 8.64066e-05 9.26665e-05 8.5454e-05 7.82416e-05 
-    7.10291e-05 6.38167e-05 5.66043e-05 4.93918e-05 4.21794e-05 
-    3.86073e-05 3.53007e-05 3.19941e-05 2.86876e-05 2.5381e-05 
-    2.20744e-05 1.87678e-05 1.70933e-05 1.62648e-05 1.54363e-05 
-    1.46079e-05 1.37794e-05 1.2951e-05 1.21225e-05 1.12941e-05 
-    1.04656e-05 9.63716e-06 8.80871e-06 7.98026e-06 7.1518e-06 
-    6.32335e-06 5.5374e-06 5.08959e-06 4.64178e-06 4.19397e-06 
-    3.74616e-06 0.0438026 0.0242078 -0.0602019 -0.0840866 0.00148461 
-    -0.00292489 0.000442098 0.00219489 0.00281478 0.00290756 
-    0.00277945 0.00263896 0.00240099 0.00223283 0.001947 -0.0153629 
-    -0.0148815 -0.0128673 0.0126017 0.0905161 0.11051 0.0538958 
-    0.022562 0.00935726 0.00397422 0.00172534 0.000790207 0.000416322 
-    0.000191632 0.000469721 0.0009779 0.00192566 0.00200688 
-    -0.0016502 -0.00733932 -0.0128113 -0.0147608 -0.0115456 
-    -0.00668995 -0.00401368 -0.00463908 -0.0101197 -0.0118993 
-    -0.0076276 -0.00262656 0.000813059 0.00264455 0.00350796 
-    0.00399494 0.0043049 0.00451658 0.00444739 0.00503842 0.00559516 
-    0.00568213 0.00556459 0.0053176 0.00496654 0.00454337 0.00408592 
-    0.00362171 0.00317793 0.00277001 0.00240394 0.00207009 0.00176575 
-    0.00149725 0.00129045 0.00114257 0.00101135 0.000871672 
-    0.000723764 0.000580438 0.000427507 0.000296956 0.000281834 
-    0.000376628 0.000412266 0.000367547 0.000295305 0.000264513 
-    0.000233721 0.000202929 0.000172137 0.000141345 0.000124721 
-    0.000112577 0.000100433 8.82893e-05 7.61453e-05 6.75517e-05 
-    6.33609e-05 5.91701e-05 5.49792e-05 5.07884e-05 4.65976e-05 
-    4.24067e-05 3.82159e-05 3.40251e-05 2.98342e-05 2.56434e-05 
-    2.36401e-05 2.21181e-05 2.05961e-05 1.90741e-05 1.75521e-05 
-    1.60301e-05 1.45081e-05 1.29861e-05 1.14641e-05 9.94208e-06 
-    8.59252e-06 7.96439e-06 7.33626e-06 6.70813e-06 6.07999e-06 
-    5.45186e-06 4.82373e-06 4.1956e-06 3.56747e-06 
-}
-
-.graph element create V10 -x x -y v10 
-
-v11 set {
-    1.86175 1.73419 1.42874 1.04055 0.943004 0.268275 0.0826455 
-    0.0388346 0.0214104 0.0135431 0.00961322 0.00712846 0.00588262 
-    0.00432397 0.00377774 0.00270134 -0.00393731 -0.00542187 
-    -0.00126596 0.0113777 0.0134522 0.00477056 -0.00211067 -0.00229253 
-    -0.00173355 -0.00122404 -0.00113426 -0.000744931 -0.000520112 
-    -0.000410048 -0.000220439 0.000508104 5.15856e-05 -0.000112593 
-    -0.000118917 -9.57394e-05 -7.15727e-05 -5.11847e-05 -3.58275e-05 
-    -2.47166e-05 -1.68866e-05 -1.14082e-05 -7.66646e-06 -5.12139e-06 
-    -3.63426e-06 -3.01815e-06 -2.64862e-06 -1.4947e-06 -1.91403e-07 
-    -2.5763e-08 -7.73699e-07 -1.52164e-06 -1.07268e-06 -3.81696e-07 
-    2.6727e-07 4.75489e-07 6.83708e-07 8.91926e-07 1.10014e-06 
-    1.30836e-06 1.2482e-06 1.00726e-06 7.66311e-07 5.25364e-07 
-    2.84417e-07 6.27857e-08 7.43904e-10 -6.12979e-08 -1.2334e-07 
-    -1.85382e-07 -2.47423e-07 -3.09465e-07 -3.71507e-07 -4.33549e-07 
-    -4.95591e-07 -5.57633e-07 -6.04571e-07 -5.4944e-07 -4.9431e-07 
-    -4.3918e-07 -3.84049e-07 -3.28919e-07 -2.73789e-07 -2.18659e-07 
-    -1.63528e-07 -1.08398e-07 -5.32678e-08 1.062e-09 5.08502e-08 
-    1.00638e-07 1.50427e-07 2.00215e-07 2.50003e-07 2.99791e-07 
-    3.4958e-07 3.99368e-07 4.49156e-07 4.98944e-07 5.34512e-07 
-    5.01032e-07 4.67553e-07 4.34073e-07 4.00593e-07 3.67113e-07 
-    3.33633e-07 3.00153e-07 2.66674e-07 2.33194e-07 1.99714e-07 
-    1.66234e-07 1.32754e-07 9.92744e-08 6.57945e-08 3.23147e-08 
-    -1.16513e-09 -3.4645e-08 -6.81248e-08 -1.01605e-07 -1.35084e-07 
-    -1.68564e-07 -2.18729e-07 0.0114926 -0.0245378 -0.111828 
-    0.0964775 1.61491 3.22668 4.22041 4.54492 4.82845 4.94868 
-    4.98588 4.99609 4.9981 4.99908 4.99788 4.98395 4.99294 4.99724 
-    5.01939 5.0471 5.00902 4.98194 4.98496 4.99188 4.99623 4.99862 
-    5.00025 4.99974 4.99953 4.99946 4.99958 5.00012 4.99997 
-    4.99992 4.99988 4.99985 4.9998 4.9997 4.9988 4.99806 4.99982 
-    5.00143 5.00159 5.00098 5.00053 5.00028 5.00007 4.99977 
-    4.99992 5.00005 5.00133 5.0009 4.99993 4.99972 4.99975 4.9998 
-    4.99982 4.99983 4.99983 4.99983 4.99983 4.99984 4.99986 
-    4.99987 4.99989 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5.01457 4.99482 4.96561 4.99326 
-    5.03452 5.00424 5.00101 5.00045 5.00004 4.99965 4.99997 
-    4.99994 4.99958 4.99999 4.99936 4.9839 4.99248 4.99717 5.01976 
-    5.04869 5.0087 4.98143 4.98488 4.99199 4.99622 4.9983 4.99928 
-    4.99971 4.99986 5.00031 5.00022 5.00035 5.0001 4.99884 4.99811 
-    4.99803 4.99887 5.00078 5.00151 5.00116 5.00007 4.99843 
-    4.99915 5.00107 5.00168 5.00141 5.00092 5.00055 5.0003 5.00016 
-    5.0001 5.00001 5.00016 5.0002 5.00009 4.99993 4.99975 4.99984 
-    4.99991 4.99991 4.99982 4.99974 4.99974 4.99985 4.99995 
-    4.99999 4.99998 5.00004 5.00013 5.00015 5.00007 4.99988 
-    4.99982 4.99985 4.99995 5.00006 5.0002 5.00025 5.0002 5.00009 
-    5.00006 5.00004 5.00002 5 4.99998 4.99997 4.99998 4.99998 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99998 
-}
-
-.graph element create V11 -x x -y v11 
-
-v12 set {
-    5 5.16975 4.78685 2.94241 0.126698 0.0487004 -0.00422591 
-    -0.00130689 -0.000486756 -0.000195875 -0.000108988 -6.66736e-05 
-    -7.26005e-05 -5.63608e-05 -3.81859e-05 -2.123e-05 -0.0646846 
-    -0.0184474 0.182248 1.06731 3.10988 4.46133 4.84133 4.95113 
-    4.98364 4.99455 4.99694 4.99727 4.9994 4.99975 5.0001 5.00132 
-    5.00089 5.00039 5.00019 5.00011 5.00006 5.00005 5.00004 
-    5.00001 4.99992 4.99992 5.00002 5.00013 5.00017 5.00009 
-    4.99992 4.99991 4.99994 4.99996 4.99998 4.99999 5.00001 
-    5.00004 5.00006 5.00005 5.00004 5.00003 5.00002 5.00001 
-    5 4.99999 4.99999 4.99998 4.99998 4.99997 4.99997 4.99998 
-    4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5.14699 4.78074 
-    3.19424 0.305663 0.0611255 -0.00179951 -0.0012032 0.000405978 
-    0.000989399 0.000445194 0.000191447 8.30476e-05 3.96236e-05 
-    1.91866e-05 1.70665e-05 -0.0655239 -0.0210234 0.1827 1.06848 
-    3.11554 4.46518 4.84212 4.94853 4.98244 4.99434 4.9997 5.00081 
-    5.00009 4.99972 4.99985 4.99974 4.9995 4.99949 4.99958 4.99973 
-    4.99948 4.99914 4.99874 4.99946 5.00309 5.0091 5.01576 5.01835 
-    5.01852 5.0176 5.01625 5.01479 5.01345 5.01264 5.011 5.01092 
-    5.01344 5.01363 5.01289 5.01184 5.01071 5.00956 5.00848 
-    5.00751 5.00663 5.00577 5.00497 5.00427 5.00365 5.0031 5.00264 
-    5.00224 5.00191 5.00163 5.00138 5.00117 5.00099 5.00083 
-    5.00071 5.00061 5.00053 5.00045 5.00037 5.00029 5.00022 
-    5.00019 5.0002 5.00023 5.00024 5.00023 5.00023 5.00022 5.0002 
-    5.00018 5.00016 5.00014 5.00011 5.00009 5.00007 5.00006 
-    5.00005 5.00005 5.00004 5.00003 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.14298 4.79809 3.32704 
-    0.498385 0.105773 0.0160646 0.0319912 0.0299434 0.0240102 
-    0.0185844 0.0130411 0.0106532 0.00864871 0.00744519 0.00660887 
-    -0.0612913 -0.0203719 0.174998 0.991787 3.06292 4.60005 
-    4.93058 4.98917 5.00033 4.9999 4.99909 4.9966 4.9955 4.99488 
-    4.99374 4.9943 5.00131 5.00506 4.99311 4.96288 4.93567 4.92439 
-    4.94236 4.9732 4.98864 4.99458 5.00031 5.00694 5.01525 5.01945 
-    5.01998 5.01953 5.01874 5.01766 5.0164 5.01509 5.01326 5.01423 
-    5.01455 5.01361 5.01245 5.01122 5.01002 5.00888 5.00783 
-    5.00687 5.00596 5.00514 5.00442 5.00379 5.00325 5.00279 
-    5.0024 5.00208 5.0018 5.00153 5.00126 5.00107 5.00094 5.00085 
-    5.00078 5.00072 5.00063 5.00053 5.00042 5.00038 5.00034 
-    5.0003 5.00027 5.00023 5.00021 5.00019 5.00017 5.00015 5.00013 
-    5.00012 5.00011 5.0001 5.0001 5.00009 5.00008 5.00007 5.00007 
-    5.00006 5.00005 5.00005 5.00004 5.00004 5.00003 5.00003 
-    5.00002 5.00002 5.00002 5.00001 5.00001 5 5 5 5.00001 5.00001 
-    5.00001 5.00002 5.00002 5.00002 5.00002 
-}
-
-.graph element create V12 -x x -y v12 
-
-v13 set {
-    9.73784e-10 0.0189926 0.0926769 0.206309 0.111533 0.0953491 
-    0.0426966 0.0214177 0.0117943 0.00741442 0.00528816 0.00398417 
-    0.0032967 0.00266499 0.00206647 0.00158788 -0.0371391 -0.0439528 
-    -0.0408653 -0.0188706 0.0150241 0.0126852 0.00209817 -0.000239206 
-    -5.31488e-05 0.000876324 -0.00451221 -0.0165223 -0.0284127 
-    -0.0427584 -0.0502453 -0.0257366 -0.00903938 -0.00376456 
-    -0.00233385 -0.00169922 -0.00130397 -0.00102542 -0.000811435 
-    -0.000648115 -0.000529266 -0.00043795 -0.00036574 -0.00030716 
-    -0.00026221 -0.000229662 -0.000205112 -0.000181038 -0.000162045 
-    -0.000148988 -0.000137633 -0.000126278 -0.000115562 -0.000104976 
-    -9.49324e-05 -9.0585e-05 -8.62375e-05 -8.18901e-05 -7.75426e-05 
-    -7.31952e-05 -6.93752e-05 -6.59106e-05 -6.24461e-05 -5.89815e-05 
-    -5.55169e-05 -5.22412e-05 -5.05263e-05 -4.88114e-05 -4.70966e-05 
-    -4.53817e-05 -4.36668e-05 -4.19519e-05 -4.0237e-05 -3.85222e-05 
-    -3.68073e-05 -3.50924e-05 -3.34782e-05 -3.25442e-05 -3.16102e-05 
-    -3.06763e-05 -2.97423e-05 -2.88083e-05 -2.78744e-05 -2.69404e-05 
-    -2.60064e-05 -2.50725e-05 -2.41385e-05 -2.32635e-05 -2.27232e-05 
-    -2.21829e-05 -2.16426e-05 -2.11023e-05 -2.0562e-05 -2.00217e-05 
-    -1.94814e-05 -1.89411e-05 -1.84007e-05 -1.78604e-05 -1.73647e-05 
-    -1.70853e-05 -1.68059e-05 -1.65265e-05 -1.62471e-05 -1.59677e-05 
-    -1.56883e-05 -1.54089e-05 -1.51295e-05 -1.48501e-05 -1.45707e-05 
-    -1.42913e-05 -1.40119e-05 -1.37325e-05 -1.34531e-05 -1.31737e-05 
-    -1.28943e-05 -1.26149e-05 -1.23355e-05 -1.20561e-05 -1.17767e-05 
-    -1.14973e-05 -1.10954e-05 0.0152675 0.0228237 -0.00460678 
-    -0.0341525 0.0232109 -0.0138039 -0.0416538 -0.0458764 -0.0201967 
-    -0.00878316 -0.00379173 -0.00164621 -0.000785131 -0.00037575 
-    -0.000352375 -0.0545586 -0.0746881 -0.0771865 -0.05386 -0.0022199 
-    0.0136703 0.00633526 0.00138826 -0.00108934 0.0038886 0.0298077 
-    0.0475776 0.0481003 0.0464167 0.047818 0.042789 0.035207 
-    0.0264423 0.0193959 0.0151614 0.00624257 -0.00913057 -0.0310696 
-    -0.0430238 0.016426 0.189762 0.49025 0.820116 1.13919 1.43549 
-    1.70658 1.95183 2.17414 2.38506 2.5657 2.73958 2.97905 3.21403 
-    3.43025 3.62645 3.8028 3.96002 4.09996 4.22443 4.33427 4.42886 
-    4.51097 4.5817 4.64326 4.6957 4.74132 4.7797 4.81298 4.84102 
-    4.86512 4.88523 4.90224 4.91649 4.92846 4.93868 4.94755 
-    4.95483 4.96114 4.96682 4.97161 4.97502 4.9776 4.97944 4.98141 
-    4.98319 4.98467 4.98585 4.9869 4.98796 4.98902 4.99008 4.99114 
-    4.9922 4.99326 4.9938 4.99429 4.99479 4.99528 4.99578 4.99628 
-    4.99677 4.99704 4.99718 4.99733 4.99747 4.99762 4.99777 
-    4.99791 4.99806 4.9982 4.99835 4.9985 4.99864 4.99879 4.99893 
-    4.99907 4.99916 4.99925 4.99934 4.99943 5.01473 4.92293 
-    4.61974 4.0316 3.7835 3.74195 3.78344 3.87272 3.97386 4.07319 
-    4.16686 4.25256 4.33126 4.40264 4.46697 4.49249 4.51807 
-    4.55803 4.64055 4.78574 4.86074 4.88334 4.8999 4.91455 4.92814 
-    4.93926 4.94761 4.95433 4.95907 4.9654 4.98317 5.0208 5.05134 
-    4.85852 4.16041 3.00077 1.68376 0.672707 0.240838 0.0794725 
-    -0.0106347 -0.00879443 0.107196 0.368163 0.701424 1.03581 
-    1.3601 1.6678 1.95731 2.22701 2.47544 2.69099 2.92327 3.16648 
-    3.3877 3.59067 3.77344 3.93584 4.08066 4.20863 4.32065 4.41791 
-    4.50211 4.57423 4.63614 4.68888 4.73377 4.7721 4.80519 4.83338 
-    4.85732 4.87815 4.89514 4.90927 4.92108 4.93122 4.94014 
-    4.94845 4.95601 4.96251 4.96576 4.969 4.97225 4.9755 4.97874 
-    4.98087 4.98265 4.98442 4.9862 4.98797 4.98924 4.9899 4.99055 
-    4.9912 4.99186 4.99251 4.99316 4.99381 4.99447 4.99512 4.99577 
-    4.99609 4.99634 4.99659 4.99683 4.99708 4.99732 4.99757 
-    4.99782 4.99806 4.99831 4.99853 4.99863 4.99873 4.99883 
-    4.99893 4.99903 4.99913 4.99923 4.99933 
-}
-
-.graph element create V13 -x x -y v13 
-
-v14 set {
-    1.86175 2.00147 1.85141 1.0654 0.275481 0.205547 0.0712627 
-    0.0313387 0.0151431 0.00864531 0.00593861 0.00438111 0.0037479 
-    0.00305857 0.00221221 0.0017081 -0.0896128 -0.109079 -0.121356 
-    -0.0542001 0.175821 0.177442 0.0814591 0.0333042 0.0134909 
-    0.00625777 0.00100092 -0.00552776 -0.00411139 -0.00150395 
-    -0.000564784 3.48169e-05 -0.000287014 -0.000538515 -0.000456537 
-    -0.000325677 -0.000275468 -0.000166452 -8.27481e-05 -8.28704e-05 
-    -7.47644e-05 -4.60552e-05 -2.61481e-06 2.26359e-05 2.53852e-05 
-    -1.39853e-06 -4.23456e-05 -4.0907e-05 -2.8501e-05 -1.5945e-05 
-    -9.01122e-06 -2.07747e-06 1.49328e-06 4.38398e-06 6.84248e-06 
-    4.76711e-06 2.69173e-06 6.16362e-07 -1.45901e-06 -3.53438e-06 
-    -4.14256e-06 -3.76238e-06 -3.3822e-06 -3.00202e-06 -2.62184e-06 
-    -2.24878e-06 -1.93456e-06 -1.62033e-06 -1.3061e-06 -9.91867e-07 
-    -6.77638e-07 -3.63409e-07 -4.91792e-08 2.6505e-07 5.7928e-07 
-    8.93509e-07 1.16076e-06 1.11055e-06 1.06034e-06 1.01014e-06 
-    9.59927e-07 9.09719e-07 8.59511e-07 8.09302e-07 7.59094e-07 
-    7.08886e-07 6.58678e-07 5.99251e-07 4.87523e-07 3.75795e-07 
-    2.64068e-07 1.5234e-07 4.06119e-08 -7.1116e-08 -1.82844e-07 
-    -2.94572e-07 -4.063e-07 -5.18027e-07 -6.08517e-07 -5.95879e-07 
-    -5.83241e-07 -5.70604e-07 -5.57966e-07 -5.45328e-07 -5.3269e-07 
-    -5.20053e-07 -5.07415e-07 -4.94777e-07 -4.8214e-07 -4.69502e-07 
-    -4.56864e-07 -4.44226e-07 -4.31589e-07 -4.18951e-07 -4.06313e-07 
-    -3.93676e-07 -3.81038e-07 -3.684e-07 -3.55762e-07 -3.43125e-07 
-    1.06736e-05 0.0797407 0.0437947 -0.0645098 -0.0877312 0.0653203 
-    -0.00621184 -0.0353188 -0.0491378 -0.0251957 -0.0110996 
-    -0.00481123 -0.0020941 -0.000998038 -0.000478747 -0.000445332 
-    -0.102046 -0.135753 -0.154351 -0.0827509 0.163348 0.174012 
-    0.0794822 0.0310624 0.0112213 0.00249061 0.00130764 0.00181315 
-    0.00163875 0.00101454 0.000497435 0.000195258 5.31901e-05 
-    2.4607e-05 6.62736e-05 7.90718e-05 4.0372e-05 -0.000141184 
-    -0.000280623 5.5608e-05 0.000799565 0.000920189 0.000931616 
-    0.000494527 0.000162303 -8.24884e-05 -0.000183938 -0.000203899 
-    -0.000144788 -9.87063e-05 -0.000227929 2.93932e-05 0.000208563 
-    1.88958e-06 -7.6335e-05 -0.000172472 -0.000165656 -0.000145889 
-    -0.000177311 -0.000191058 -0.000168287 -0.00015755 -0.00013142 
-    -8.10488e-05 -6.36115e-05 -7.8699e-05 -8.11282e-05 -7.98625e-05 
-    -5.98807e-05 -3.40879e-05 -1.95464e-05 -1.79247e-05 -4.45514e-05 
-    -7.47995e-05 -8.7682e-05 -7.50806e-05 -3.25561e-05 -4.34114e-05 
-    -7.69099e-05 -0.000141101 -0.00018743 -0.000148471 -5.06546e-05 
-    0.000120195 0.000177635 0.000177052 0.000146344 9.75126e-05 
-    8.31233e-05 6.8734e-05 5.43447e-05 3.99554e-05 2.55661e-05 
-    1.11768e-05 -3.21253e-06 -3.88937e-06 -3.56628e-06 -3.24318e-06 
-    -2.92008e-06 -2.59699e-06 -2.27389e-06 -1.9508e-06 -1.73227e-06 
-    -1.56796e-06 -1.40365e-06 -1.23934e-06 -1.07503e-06 -9.10722e-07 
-    -7.46412e-07 -5.82101e-07 -4.1779e-07 -2.5348e-07 -8.91694e-08 
-    7.51412e-08 2.39452e-07 4.03762e-07 5.95733e-07 1.00771e-06 
-    1.41969e-06 1.83167e-06 2.24365e-06 0.0828257 0.231038 0.465438 
-    1.54516 2.8461 3.19221 3.40395 3.6382 3.80758 3.93848 4.04882 
-    4.15428 4.247 4.32917 4.40235 4.36941 4.397 4.48862 4.64552 
-    4.86595 5.03475 5.0348 5.02627 5.01967 5.01542 5.00925 4.98613 
-    4.9519 4.91581 4.87357 4.82302 4.80403 4.82565 4.86102 4.89483 
-    4.92253 4.94428 4.96257 4.97608 4.98373 4.98823 4.99182 
-    4.99437 4.99635 4.99745 4.99802 4.99843 4.99873 4.99895 
-    4.99912 4.99925 4.99931 4.99962 4.99973 4.99972 4.99971 
-    4.9997 4.99969 4.9997 4.99971 4.99973 4.99974 4.99976 4.99978 
-    4.9998 4.99982 4.99985 4.99987 4.99989 4.9999 4.99991 4.99991 
-    4.99993 4.99994 4.99997 5.00001 5.00006 5.00008 5.00006 
-    5.00002 5 4.99999 4.99998 4.99997 4.99995 4.99995 4.99995 
-    4.99995 4.99995 4.99995 4.99995 4.99996 4.99997 4.99997 
-    4.99998 4.99999 5 5 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 
-    
-}
-
-.graph element create V14 -x x -y v14
-
-v15 set {
-    1.86175 2.00199 2.08919 1.84314 1.08254 0.214737 0.0377351 
-    0.00952455 0.00232763 0.000563614 0.000263477 0.000148642 
-    0.000285086 0.000242592 7.34699e-05 -1.53467e-05 -0.0161874 
-    -0.0157876 -0.0141194 0.0132576 0.0903272 0.109938 0.0535295 
-    0.0224216 0.00940945 0.00466825 -0.000649972 -0.00654752 
-    -0.00333248 -0.00103671 -0.000508276 -5.8896e-05 -0.00043938 
-    -0.000544704 -0.00044444 -0.000307093 -0.00024517 -0.000154538 
-    -8.78602e-05 -7.10461e-05 -6.06485e-05 -3.91039e-05 -8.45988e-06 
-    9.43442e-06 1.28351e-05 -2.16734e-06 -2.6142e-05 -2.54768e-05 
-    -1.88997e-05 -1.17906e-05 -7.3808e-06 -2.97101e-06 1.19146e-07 
-    2.94246e-06 5.38942e-06 3.88851e-06 2.38761e-06 8.86704e-07 
-    -6.14201e-07 -2.11511e-06 -2.59565e-06 -2.38885e-06 -2.18205e-06 
-    -1.97525e-06 -1.76845e-06 -1.56241e-06 -1.36258e-06 -1.16276e-06 
-    -9.62939e-07 -7.63116e-07 -5.63293e-07 -3.6347e-07 -1.63647e-07 
-    3.61756e-08 2.35999e-07 4.35822e-07 6.07653e-07 5.90323e-07 
-    5.72994e-07 5.55665e-07 5.38336e-07 5.21007e-07 5.03678e-07 
-    4.86349e-07 4.6902e-07 4.51691e-07 4.34361e-07 4.11899e-07 
-    3.60315e-07 3.08731e-07 2.57146e-07 2.05562e-07 1.53977e-07 
-    1.02393e-07 5.08082e-08 -7.76222e-10 -5.23607e-08 -1.03945e-07 
-    -1.47815e-07 -1.54225e-07 -1.60635e-07 -1.67045e-07 -1.73455e-07 
-    -1.79864e-07 -1.86274e-07 -1.92684e-07 -1.99094e-07 -2.05504e-07 
-    -2.11914e-07 -2.18324e-07 -2.24734e-07 -2.31144e-07 -2.37554e-07 
-    -2.43964e-07 -2.50373e-07 -2.56783e-07 -2.63193e-07 -2.69603e-07 
-    -2.76013e-07 -2.82423e-07 2.92534e-06 0.0446777 0.024278 
-    -0.0518987 -0.0636547 0.00983929 -0.000518204 -0.000265194 
-    0.000154772 0.000299538 3.12715e-05 -3.18225e-05 -2.48268e-05 
-    -1.16701e-05 -6.05117e-06 7.61116e-06 -0.0163668 -0.0158244 
-    -0.0141177 0.0100085 0.0857144 0.107784 0.051862 0.0204448 
-    0.00629858 0.000967736 0.00121674 0.00190276 0.00154009 
-    0.000860922 0.000410386 0.000164585 3.99493e-05 1.93797e-05 
-    5.67594e-05 0.000110126 2.49925e-05 -7.17815e-05 -0.000142299 
-    -1.63109e-05 0.000439529 0.000562489 0.000594599 0.000326164 
-    0.000126423 -4.26063e-05 -0.000122927 -0.000114152 -6.72706e-05 
-    -6.41242e-05 -0.000135588 2.61507e-05 0.000134036 6.43734e-06 
-    -4.6223e-05 -0.000112047 -0.000101388 -8.67847e-05 -0.000117664 
-    -0.000133957 -0.000116558 -0.000100873 -7.65448e-05 -4.44964e-05 
-    -3.6677e-05 -5.26632e-05 -5.45172e-05 -5.13545e-05 -3.73869e-05 
-    -1.99732e-05 -1.0907e-05 -1.10081e-05 -3.02609e-05 -5.18517e-05 
-    -6.13597e-05 -5.30706e-05 -2.39572e-05 -3.24146e-05 -5.70062e-05 
-    -0.000103448 -0.000135376 -0.0001024 -2.39007e-05 0.000110929 
-    0.000151226 0.000142044 0.000105922 5.62834e-05 4.78476e-05 
-    3.94117e-05 3.09759e-05 2.25401e-05 1.41042e-05 5.66837e-06 
-    -2.76747e-06 -3.08639e-06 -2.81341e-06 -2.54043e-06 -2.26745e-06 
-    -1.99447e-06 -1.72149e-06 -1.44851e-06 -1.26226e-06 -1.12096e-06 
-    -9.79661e-07 -8.38363e-07 -6.97065e-07 -5.55768e-07 -4.1447e-07 
-    -2.73173e-07 -1.31875e-07 9.42259e-09 1.5072e-07 2.92018e-07 
-    4.33315e-07 5.74613e-07 7.10363e-07 8.01984e-07 8.93604e-07 
-    9.85225e-07 1.07685e-06 0.04474 0.0928765 0.141327 0.0176048 
-    -0.071675 -0.0124613 0.989022 2.28104 3.40619 4.21417 4.67173 
-    4.87438 4.96044 4.98996 4.99858 4.96672 4.89502 4.79391 
-    4.76433 4.8387 4.98612 5.0161 5.01722 5.01437 5.01256 4.99827 
-    4.95807 4.9209 4.88217 4.83006 4.78461 4.80759 4.85548 4.89604 
-    4.9254 4.94617 4.96126 4.97374 4.98255 4.98792 4.99126 4.99361 
-    4.99554 4.99699 4.99792 4.99846 4.99881 4.99905 4.99924 
-    4.99938 4.99949 4.99955 4.9997 4.9998 4.99982 4.99982 4.99982 
-    4.99982 4.99982 4.99983 4.99984 4.99985 4.99986 4.99987 
-    4.99988 4.99989 4.9999 4.99992 4.99993 4.99994 4.99995 4.99995 
-    4.99996 4.99996 4.99998 4.99999 5.00001 5.00002 5.00002 
-    5.00001 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    
-}
-.graph element create V15 -x x -y v15
-
-v16 set {
-    1.86175 1.73073 1.50572 1.89001 3.39004 4.36034 4.79012 
-    4.93798 4.98305 4.99539 4.9979 4.99904 4.99772 4.9983 4.99935 
-    4.99975 4.98837 4.99456 4.99728 5.01838 5.04568 5.00759 
-    4.98112 4.98479 4.99197 4.99641 4.99747 4.99775 5.00043 
-    5.0007 5.00035 5.00023 4.99976 5.00002 5.00007 5.0002 4.99993 
-    5.00003 5.00021 5.00006 4.99993 4.99992 5.00002 5.00013 
-    5.00017 5.00009 4.99992 4.99991 4.99993 4.99996 4.99998 
-    4.99999 5.00001 5.00003 5.00005 5.00004 5.00004 5.00003 
-    5.00002 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 5 5.01498 4.99342 4.96899 5.00301 5.02627 4.9977 
-    4.99548 4.99757 5.00277 5.00245 5.0014 5.00069 5.00032 5.00014 
-    5.00009 4.9867 4.99262 4.99607 5.01805 5.04713 5.00927 4.98184 
-    4.98483 4.9914 4.99616 4.99902 4.9999 4.99987 4.99979 4.99981 
-    4.99989 4.99994 4.99998 5.0002 5.00001 5.00008 5.00008 5.0001 
-    5.00021 5.00032 5.00025 5.00019 5.00006 5.00007 4.99994 
-    4.99997 4.99999 5.00023 5.00008 4.99993 4.99998 4.99986 
-    4.99982 5.00003 4.99985 4.99996 5.00014 5 4.99984 4.99979 
-    4.99982 4.99993 5.00008 5.00011 5.00002 4.99996 4.9999 4.99994 
-    5.00001 5.00007 5.00009 4.99995 4.99978 4.99971 4.99976 
-    4.99997 4.99996 4.99989 4.99972 4.99955 4.99953 4.99959 
-    4.99976 4.9999 5.00005 5.00023 5.00039 5.00034 5.00029 5.00024 
-    5.00019 5.00014 5.00009 5.00004 5.00003 5.00002 5.00001 
-    5 5 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5.00001 5.00002 5.00003 5.00004 5.01564 5.03395 5.04932 
-    5.11868 3.92502 1.31888 0.163888 0.0946876 0.0789578 0.0565084 
-    0.0260333 0.0156986 0.00907667 0.00613629 0.00468417 -0.00174008 
-    -0.0021422 0.000586962 0.0124937 0.0147977 0.00838454 0.00039383 
-    -0.000522021 -0.000426598 -0.000290214 -0.00173713 -0.00384132 
-    -0.00382945 -0.00429219 -0.00580193 -0.00393246 0.0017543 
-    0.00423045 0.00408931 0.0031976 0.00245457 0.00187293 0.00159068 
-    0.00105697 0.000609902 0.000358825 0.000334125 0.000212708 
-    0.000168116 8.97349e-05 5.21578e-05 3.84527e-05 2.93033e-05 
-    2.10067e-05 1.59954e-05 1.13917e-05 5.49738e-06 2.77217e-05 
-    6.51259e-06 -6.65468e-06 2.09837e-06 -6.617e-06 -4.80187e-06 
-    1.55031e-06 4.26536e-06 7.69457e-07 -1.46213e-06 -7.25202e-07 
-    3.26501e-06 6.55807e-06 7.524e-06 6.07209e-06 6.00701e-06 
-    5.41166e-06 3.86573e-06 1.10651e-06 -2.74603e-06 -2.18566e-06 
-    2.3658e-06 8.59956e-06 8.35046e-06 2.90621e-06 -8.75982e-07 
-    -1.87189e-06 -2.1528e-06 -1.94875e-06 -1.74471e-06 -1.54067e-06 
-    -1.33662e-06 -1.13258e-06 -8.40567e-07 -5.20743e-07 -2.00918e-07 
-    1.18906e-07 4.38731e-07 6.11382e-07 6.01529e-07 5.91675e-07 
-    5.81822e-07 5.71968e-07 5.62115e-07 5.52261e-07 5.42407e-07 
-    5.32554e-07 5.227e-07 5.12847e-07 4.72812e-07 4.26137e-07 
-    3.79462e-07 3.32786e-07 2.86111e-07 2.39436e-07 1.92761e-07 
-    1.46086e-07 9.94107e-08 5.27356e-08 -2.77779e-10 -7.98079e-08 
-    -1.59338e-07 -2.38868e-07 -3.18398e-07 -3.97928e-07 -4.77458e-07 
-    -5.56988e-07 -6.36519e-07 
-}
-.graph element create V16 -x x -y v16
-
-v17 set {
-    5 5.16963 4.84136 3.33754 0.316206 0.103113 0.0273341 0.0221102 
-    0.0177008 0.0143758 0.0115203 0.00929231 0.00752716 0.00625439 
-    0.00489872 0.00403656 -0.0657317 -0.0256467 0.165394 0.985963 
-    3.05067 4.55799 4.89728 4.92464 4.8882 4.90592 4.97315 4.99241 
-    4.99694 4.99845 4.99905 4.99939 4.99959 4.99971 4.9998 4.99986 
-    4.9999 4.99993 4.99995 4.99996 4.99997 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 5 5.00001 5.00003 5.00005 
-    5.00004 5.00002 5 4.99999 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99998 4.99998 4.99999 4.99999 5 5 5 5 5 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5 5.00025 5.1657 4.69981 2.43895 
-    0.0229743 0.0351406 -0.0211974 -0.0312063 -0.0160331 -0.0021718 
-    -0.000766597 -0.000251052 -5.49363e-05 -3.36364e-06 -2.01983e-06 
-    -9.70575e-06 -0.0657007 -0.0205247 0.183332 1.07163 3.11839 
-    4.46213 4.84163 4.95195 4.99159 5.02084 5.04029 5.04138 
-    5.0271 5.00445 4.97957 4.95702 4.95231 4.97819 4.99191 4.9963 
-    4.99822 4.99878 4.99903 4.99925 4.99942 4.9995 4.99954 4.99957 
-    4.99961 4.99966 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 
-    4.99988 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 4.99996 
-    4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.14239 4.76219 
-    3.16574 0.299969 0.0631609 -0.00118611 -0.00026052 -5.96333e-05 
-    -1.44904e-05 -4.3859e-06 -2.99454e-06 1.10547e-06 4.84662e-06 
-    1.30971e-05 2.23082e-05 -0.0655844 -0.0204818 0.182507 1.05954 
-    3.12277 4.46735 4.83915 4.94512 4.97679 4.98654 4.9966 5.00833 
-    5.00776 5.00432 5.00199 5.00086 5.00033 5.00008 5 5.00001 
-    5 5.00005 5.00002 4.99981 4.99991 4.99998 4.99979 4.99979 
-    4.99984 4.9998 4.9998 5.00006 5.00002 5.00001 5 5 4.99992 
-    4.99998 4.99999 5.00002 5.00014 4.99999 4.99987 4.99993 
-    5.00003 5.00011 5.00005 4.99996 4.99987 4.99985 4.99994 
-    5.00009 5.0001 5 4.99993 4.99997 5.00008 5.00015 5.00021 
-    5.00021 5.00007 4.99978 4.99965 4.99973 4.9999 4.99992 4.99995 
-    4.99997 4.99999 5.00001 5.00002 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00002 
-}
-.graph element create V17 -x x -y v17
-
-v18 set {
-    5 5.0333 5.02472 4.92559 4.18383 3.93923 3.9961 4.14293 
-    4.28591 4.41336 4.52157 4.61101 4.68472 4.7439 4.79294 4.83239 
-    4.80697 4.78808 4.79322 4.8838 5.08529 5.21863 4.88852 3.90198 
-    2.14586 0.383977 0.101103 0.0525711 0.0318287 0.020895 0.0146908 
-    0.010831 0.00830272 0.00656377 0.00532066 0.00440078 0.00369956 
-    0.00315713 0.00272614 0.00237965 0.00209659 0.00186339 0.00167014 
-    0.0015081 0.00137172 0.00125607 0.00115393 0.00106076 0.000980166 
-    0.000918015 0.000862837 0.00080766 0.000763488 0.000721541 
-    0.000680825 0.000653026 0.000625226 0.000597426 0.000569627 
-    0.000541827 0.000519087 0.000499756 0.000480424 0.000461093 
-    0.000441761 0.000423291 0.000411941 0.00040059 0.00038924 
-    0.000377889 0.000366539 0.000355188 0.000343838 0.000332487 
-    0.000321137 0.000309786 0.000299055 0.000292509 0.000285963 
-    0.000279417 0.000272871 0.000266325 0.000259779 0.000253233 
-    0.000246686 0.00024014 0.000233594 0.000227387 0.0002231 
-    0.000218813 0.000214526 0.00021024 0.000205953 0.000201666 
-    0.000197379 0.000193092 0.000188805 0.000184519 0.000180526 
-    0.000177963 0.0001754 0.000172837 0.000170274 0.000167711 
-    0.000165148 0.000162585 0.000160022 0.000157459 0.000154895 
-    0.000152332 0.000149769 0.000147206 0.000144643 0.00014208 
-    0.000139517 0.000136954 0.000134391 0.000131828 0.000129265 
-    0.000126702 0.000132838 0.0311184 0.163151 0.34986 0.604501 
-    0.357125 0.136137 0.0711304 0.0346959 0.0212674 0.00872193 
-    0.00252206 0.000455269 7.59332e-05 2.91532e-05 0.000320562 
-    -0.0720911 -0.0840491 -0.0791345 -0.0404143 0.0182035 -0.0235871 
-    -0.0426072 -0.0597501 0.00824773 0.481404 1.32496 2.11949 
-    2.57317 2.58202 2.15054 1.33786 0.45702 0.153772 0.0913584 
-    0.0604989 0.0421591 0.0271456 0.0170021 0.0115815 0.00907886 
-    0.00742466 0.00626096 0.00531127 0.00450501 0.00381927 0.00323718 
-    0.00274374 0.00232494 0.00196885 0.00166686 0.00141134 0.00119437 
-    0.0010109 0.000855534 0.000723378 0.000611408 0.000516704 
-    0.000436769 0.000369523 0.000313026 0.00026526 0.000223976 
-    0.000188972 0.000159042 0.000134148 0.000112688 9.49738e-05 
-    7.97877e-05 6.721e-05 5.65115e-05 4.77194e-05 4.03591e-05 
-    3.42848e-05 2.92627e-05 2.50435e-05 2.1412e-05 1.84532e-05 
-    1.58624e-05 1.34673e-05 1.14461e-05 1.00935e-05 9.12375e-06 
-    8.50202e-06 7.81431e-06 7.20729e-06 6.73936e-06 6.3702e-06 
-    5.90049e-06 5.43077e-06 4.96105e-06 4.49133e-06 4.02162e-06 
-    3.5519e-06 3.08218e-06 2.79099e-06 2.51281e-06 2.23463e-06 
-    1.95645e-06 1.67827e-06 1.40009e-06 1.12191e-06 1.01376e-06 
-    9.9375e-07 9.73741e-07 9.53733e-07 9.33724e-07 9.13715e-07 
-    8.93707e-07 8.73698e-07 8.5369e-07 8.33681e-07 8.13673e-07 
-    7.93664e-07 7.73655e-07 7.53647e-07 7.21781e-07 5.956e-07 
-    4.69419e-07 3.43239e-07 2.17058e-07 0.0284032 0.0374438 
-    -0.0157543 -0.0680497 0.0504768 0.0100294 0.00222261 0.000528697 
-    0.000132929 3.99489e-05 2.46066e-05 4.56327e-06 -6.54853e-06 
-    1.33783e-05 -3.68221e-05 -0.0724498 -0.0843663 -0.0792935 
-    -0.0406426 0.0200019 0.0426259 0.0220753 0.00668555 -0.000968483 
-    0.024662 0.0383437 0.0911513 0.087848 0.0602076 0.0390559 
-    0.0260573 0.0180444 0.012974 0.00985409 0.00788132 0.0064228 
-    0.005545 0.00453571 0.00364245 0.00310278 0.00270523 0.00236439 
-    0.0020945 0.00186808 0.00167493 0.00151731 0.00138594 0.00126945 
-    0.00116695 0.0010762 0.000996366 0.000928387 0.000864414 
-    0.000808258 0.000759574 0.000713865 0.000666712 0.000632716 
-    0.000601262 0.000572163 0.000543986 0.000515253 0.0004897 
-    0.000468112 0.000449313 0.000432981 0.000417911 0.000401307 
-    0.000382712 0.000366678 0.000355736 0.000349171 0.000335727 
-    0.000317091 0.000296086 0.000283543 0.000277366 0.000272233 
-    0.000267001 0.000263147 0.000256699 0.000250251 0.000243803 
-    0.000237355 0.000230907 0.000225424 0.000220247 0.000215069 
-    0.000209892 0.000204714 0.000200213 0.000196548 0.000192884 
-    0.00018922 0.000185556 0.000181892 0.000178228 0.000174564 
-    0.0001709 0.000167236 0.000163572 0.000160824 0.000158279 
-    0.000155733 0.000153187 0.000150641 0.000148095 0.000145549 
-    0.000143003 0.000140457 0.000137911 0.000135457 0.000133386 
-    0.000131315 0.000129245 0.000127174 0.000125103 0.000123032 
-    0.000120961 0.000118891 
-}
-.graph element create V18 -x x -y v18
-
-v19 set {
-    1.86175 1.99994 2.0833 2.01627 2.42503 3.25769 3.62134 3.88827 
-    4.09688 4.26773 4.40529 4.51734 4.60827 4.68313 4.74346 
-    4.79302 4.72815 4.68959 4.70421 4.81316 5.01375 5.14493 
-    5.10305 5.0699 5.04484 5.03751 5.03348 5.02504 5.01799 5.01271 
-    5.00895 5.00628 5.0044 5.00309 5.00216 5.00151 5.00105 5.00073 
-    5.00051 5.00034 5.00023 5.00015 5.0001 5.00007 5.00003 4.99998 
-    4.99993 4.99993 4.99995 4.99999 5.00001 5.00003 5.00002 
-    5.00001 5 5 5 5 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00017 5.17398 
-    4.94779 3.78508 1.52302 0.608808 0.244311 0.126053 0.0597175 
-    0.038422 0.0158174 0.00481338 0.00107847 0.000301256 0.000114861 
-    0.00059489 -0.118904 -0.147478 -0.158986 -0.080544 0.165361 
-    0.171378 0.0776087 0.0435738 0.0428235 0.0423755 0.0347695 
-    0.0225061 0.0155539 0.0121357 0.0107997 0.0103976 0.0124406 
-    0.016814 0.0167556 0.0149852 0.01459 0.0141182 0.0131934 
-    0.0120286 0.0108692 0.0097184 0.00855881 0.00744912 0.00643877 
-    0.00554044 0.00475165 0.00406535 0.00347158 0.00295981 0.00251995 
-    0.00214318 0.00182101 0.00154613 0.00131196 0.0011119 0.000941587 
-    0.000796999 0.000674582 0.000571283 0.000484276 0.000410649 
-    0.000347005 0.000292984 0.000246715 0.000208143 0.00017489 
-    0.000147412 0.000123854 0.000104332 8.77229e-05 7.40686e-05 
-    6.2637e-05 5.32e-05 4.53946e-05 3.88343e-05 3.31864e-05 
-    2.85905e-05 2.45725e-05 2.08671e-05 1.77301e-05 1.55911e-05 
-    1.40153e-05 1.29421e-05 1.18693e-05 1.09815e-05 1.03484e-05 
-    9.87664e-06 9.14446e-06 8.41228e-06 7.68011e-06 6.94793e-06 
-    6.21575e-06 5.48357e-06 4.7514e-06 4.38454e-06 4.04432e-06 
-    3.7041e-06 3.36388e-06 3.02366e-06 2.68344e-06 2.34322e-06 
-    2.15196e-06 2.03791e-06 1.92386e-06 1.80982e-06 1.69577e-06 
-    1.58173e-06 1.46768e-06 1.35363e-06 1.23959e-06 1.12554e-06 
-    1.0115e-06 8.9745e-07 7.83404e-07 6.69358e-07 4.76113e-07 
-    -3.47071e-07 -1.17025e-06 -1.99344e-06 -2.81662e-06 0.0783754 
-    0.0500262 -0.0659563 -0.120914 0.0815957 0.0154255 0.00347177 
-    0.000840357 0.000214582 6.54655e-05 3.91709e-05 8.07396e-06 
-    -4.44265e-07 1.74384e-05 -4.52725e-05 -0.119379 -0.147984 
-    -0.159247 -0.0824604 0.169014 0.177628 0.0758742 0.010558 
-    -0.0346506 -0.0710288 -0.0838952 -0.0599521 -0.034568 -0.0181615 
-    -0.00968034 -0.00547115 -0.00333511 -0.00232468 -0.00181159 
-    -0.00143841 -0.00116601 -0.000839755 -0.000569764 -0.000578683 
-    -0.000490551 -0.000411712 -0.000437859 -0.000408185 -0.000356644 
-    -0.000311332 -0.000269006 -0.000221396 -0.000210054 -0.0001923 
-    -0.000175122 -0.000161039 -0.0001428 -0.000126123 -0.000127893 
-    -8.14516e-05 -0.000120166 -0.000154909 -0.000112733 -8.40377e-05 
-    -7.11342e-05 -8.09538e-05 -9.77789e-05 -9.82402e-05 -7.73531e-05 
-    -5.28255e-05 -3.1096e-05 -1.87967e-05 -1.96552e-05 -4.16655e-05 
-    -5.77185e-05 -5.24142e-05 -2.83153e-05 -1.90012e-05 -1.54415e-05 
-    -2.52569e-05 -6.23747e-05 -0.000130543 -0.000149394 -0.000110886 
-    -4.35517e-05 -4.17084e-05 -3.98651e-05 -3.80218e-05 -3.61785e-05 
-    -3.43352e-05 -3.36249e-05 -3.32729e-05 -3.29208e-05 -3.25687e-05 
-    -3.22166e-05 -3.17143e-05 -3.10258e-05 -3.03372e-05 -2.96486e-05 
-    -2.89601e-05 -2.82715e-05 -2.75829e-05 -2.68944e-05 -2.62058e-05 
-    -2.55173e-05 -2.48287e-05 -2.43043e-05 -2.38159e-05 -2.33276e-05 
-    -2.28393e-05 -2.2351e-05 -2.18626e-05 -2.13743e-05 -2.0886e-05 
-    -2.03977e-05 -1.99093e-05 -1.945e-05 -1.91122e-05 -1.87744e-05 
-    -1.84366e-05 -1.80987e-05 -1.77609e-05 -1.74231e-05 -1.70853e-05 
-    -1.67474e-05 
-}
-.graph element create V19 -x x -y v19
-
-v20 set {
-    1.86175 1.99724 2.17266 2.48439 3.15933 3.85231 4.38091 
-    4.69033 4.85034 4.92851 4.96453 4.98188 4.98736 4.991 4.99482 
-    4.9973 4.96422 4.89989 4.83907 4.83151 4.90868 5.04854 5.06104 
-    5.04571 5.03219 5.03025 5.02273 5.01707 5.0123 5.0087 5.00611 
-    5.00429 5.00301 5.00211 5.00148 5.00103 5.00072 5.0005 5.00035 
-    5.00024 5.00016 5.00011 5.00007 5.00005 5.00003 5.00001 
-    4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    5 5 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 5 4.99981 5.10081 5.10903 4.98404 5.00999 5.14946 4.36501 
-    2.23938 0.325144 0.00660272 -0.0102186 -0.0082401 -0.00556785 
-    -0.00374178 -0.00264763 -0.00202823 -0.0182241 -0.0169551 
-    -0.0150395 0.0103736 0.0877592 0.104382 0.0515938 0.0373818 
-    0.0411547 0.0397009 0.0308946 0.0205793 0.0154037 0.0129191 
-    0.0119327 0.011527 0.0124295 0.0161152 0.0161076 0.0145391 
-    0.0144541 0.0139287 0.0129215 0.0117239 0.0105795 0.00942983 
-    0.00827423 0.00718354 0.00619954 0.00532868 0.00456631 0.00390448 
-    0.00333254 0.00284003 0.00241714 0.00205524 0.0017458 0.00148202 
-    0.00125739 0.0010655 0.000902213 0.000763611 0.000646279 
-    0.000547291 0.000463934 0.000393401 0.000332424 0.000280655 
-    0.000236328 0.000199386 0.000167536 0.000141218 0.000118654 
-    9.99559e-05 8.40479e-05 7.09694e-05 6.00188e-05 5.09786e-05 
-    4.3502e-05 3.72191e-05 3.18114e-05 2.74071e-05 2.35539e-05 
-    1.99967e-05 1.69871e-05 1.49449e-05 1.3451e-05 1.24492e-05 
-    1.14256e-05 1.05669e-05 9.94487e-06 9.47514e-06 8.77318e-06 
-    8.07123e-06 7.36927e-06 6.66731e-06 5.96536e-06 5.2634e-06 
-    4.56144e-06 4.23044e-06 3.92649e-06 3.62254e-06 3.31858e-06 
-    3.01463e-06 2.71068e-06 2.40673e-06 2.23063e-06 2.12082e-06 
-    2.01102e-06 1.90121e-06 1.7914e-06 1.68159e-06 1.57178e-06 
-    1.46197e-06 1.35216e-06 1.24235e-06 1.13255e-06 1.02274e-06 
-    9.12929e-07 8.0312e-07 6.33171e-07 -1.51288e-08 -6.63428e-07 
-    -1.31173e-06 -1.96003e-06 0.0437517 0.0265689 -0.0515377 
-    -0.0658688 0.010727 -0.000511921 -8.36924e-05 2.13278e-05 
-    1.45207e-05 4.54862e-06 -6.14726e-06 2.0062e-06 1.02709e-06 
-    1.4152e-05 -3.08225e-05 -0.0166501 -0.0157139 -0.013957 
-    0.0107537 0.0873717 0.111302 0.0454129 -0.00530142 -0.0468336 
-    -0.0790063 -0.0826944 -0.0534753 -0.0288705 -0.0149009 -0.00801592 
-    -0.0046342 -0.00291835 -0.00213019 -0.00170055 -0.001352 
-    -0.00110593 -0.000742655 -0.000532042 -0.000544742 -0.000479206 
-    -0.000407307 -0.000403575 -0.000366209 -0.000324161 -0.000286183 
-    -0.000247579 -0.000214281 -0.000203435 -0.000186896 -0.000171033 
-    -0.00015779 -0.000145259 -0.000128069 -0.000122647 -9.89398e-05 
-    -0.000114926 -0.000132195 -0.000107872 -8.91015e-05 -7.87996e-05 
-    -8.14061e-05 -8.9098e-05 -8.83368e-05 -7.6122e-05 -6.14668e-05 
-    -4.75402e-05 -3.81855e-05 -3.69696e-05 -4.78656e-05 -5.61346e-05 
-    -5.35007e-05 -4.1459e-05 -3.35411e-05 -2.52374e-05 -2.37479e-05 
-    -4.6406e-05 -9.41884e-05 -0.000109222 -8.52676e-05 -4.25166e-05 
-    -4.10125e-05 -3.95085e-05 -3.80045e-05 -3.65004e-05 -3.49964e-05 
-    -3.41627e-05 -3.3541e-05 -3.29193e-05 -3.22976e-05 -3.16758e-05 
-    -3.10334e-05 -3.03653e-05 -2.96971e-05 -2.9029e-05 -2.83609e-05 
-    -2.76928e-05 -2.70246e-05 -2.63565e-05 -2.56884e-05 -2.50203e-05 
-    -2.43521e-05 -2.38716e-05 -2.34324e-05 -2.29932e-05 -2.25539e-05 
-    -2.21147e-05 -2.16755e-05 -2.12362e-05 -2.0797e-05 -2.03578e-05 
-    -1.99186e-05 -1.95079e-05 -1.9217e-05 -1.8926e-05 -1.8635e-05 
-    -1.8344e-05 -1.8053e-05 -1.7762e-05 -1.74711e-05 -1.71801e-05 
-    
-}
-.graph element create V20 -x x -y v20
-
-v21 set {
-    1.86175 1.73273 1.42016 1.02483 0.944013 0.274107 0.0823742 
-    0.0379366 0.020816 0.0132952 0.00955525 0.00717008 0.00592286 
-    0.00437379 0.00383557 0.00273694 -0.0037467 -0.0054191 -0.00131454 
-    0.0112179 0.0133918 0.00519747 -0.00260113 -0.00252847 -0.00181292 
-    0.000183398 -0.000667607 -0.000750747 -0.000594314 -0.000433904 
-    -0.000308985 -0.000217858 -0.000152926 -0.000107454 -7.54076e-05 
-    -5.2675e-05 -3.66299e-05 -2.54341e-05 -1.75095e-05 -1.18848e-05 
-    -7.97289e-06 -5.30239e-06 -3.53615e-06 -2.38504e-06 -2.40158e-06 
-    -3.84485e-06 -5.29435e-06 -2.57099e-06 1.95189e-06 3.55083e-06 
-    2.06179e-06 5.72753e-07 3.30469e-07 3.40296e-07 3.60221e-07 
-    4.86081e-07 6.1194e-07 7.37799e-07 8.63659e-07 9.89518e-07 
-    9.21274e-07 7.22275e-07 5.23276e-07 3.24277e-07 1.25278e-07 
-    -5.59467e-08 -9.03265e-08 -1.24706e-07 -1.59086e-07 -1.93466e-07 
-    -2.27846e-07 -2.62226e-07 -2.96605e-07 -3.30985e-07 -3.65365e-07 
-    -3.99745e-07 -4.24266e-07 -3.82163e-07 -3.40061e-07 -2.97959e-07 
-    -2.55857e-07 -2.13755e-07 -1.71652e-07 -1.2955e-07 -8.7448e-08 
-    -4.53457e-08 -3.24353e-09 3.76901e-08 7.19937e-08 1.06297e-07 
-    1.40601e-07 1.74904e-07 2.09208e-07 2.43512e-07 2.77815e-07 
-    3.12119e-07 3.46422e-07 3.80726e-07 4.04507e-07 3.77191e-07 
-    3.49876e-07 3.22561e-07 2.95246e-07 2.67931e-07 2.40616e-07 
-    2.13301e-07 1.85986e-07 1.58671e-07 1.31356e-07 1.04041e-07 
-    7.67256e-08 4.94105e-08 2.20955e-08 -5.21962e-09 -3.25347e-08 
-    -5.98498e-08 -8.71649e-08 -1.1448e-07 -1.41795e-07 -1.6911e-07 
-    7.87893e-06 0.0114592 -0.0245712 -0.111637 0.0961324 1.61168 
-    3.22343 4.20442 4.53535 4.83834 4.95464 4.98874 4.99746 
-    4.99883 4.99948 4.99815 4.98431 4.99298 4.99718 5.01948 
-    5.04749 5.008 4.98243 4.98985 4.99781 4.99887 4.99679 4.99616 
-    4.99743 4.99859 4.99936 4.99972 5.00058 5.00123 5.0002 4.99945 
-    4.99983 4.9998 4.99966 4.99958 4.99956 4.99956 4.99956 4.99958 
-    4.99961 4.99965 4.99969 4.99973 4.99977 4.9998 4.99983 4.99985 
-    4.99987 4.99989 4.99991 4.99992 4.99993 4.99994 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.01454 
-    4.99566 4.96796 4.99819 5.03232 5.00034 4.99867 4.99937 
-    4.99977 4.99992 4.99997 4.99999 5.00001 5.00021 4.99974 
-    4.98462 4.99301 4.99723 5.01936 5.04807 5.00929 4.9789 4.97876 
-    4.98244 4.9863 4.99575 5.0069 5.00863 5.00624 5.00357 5.0019 
-    5.00098 5.00048 5.00025 5.00016 5.00011 5.00013 5.00009 
-    4.99982 4.99994 5.00005 4.99994 4.99988 4.99989 4.99997 
-    5.00003 5.00005 5.00002 5.00001 5.00001 5.00001 4.99993 
-    4.99999 5 5.00021 4.99997 4.99981 5 5.00009 5.0001 5.00001 
-    4.99991 4.9999 5 5.00011 5.00017 5.00018 5.00018 5.00014 
-    5.00007 4.99999 4.9999 4.9999 5.00001 5.00016 5.00014 4.99999 
-    4.99993 4.99999 5.00009 5.00007 5.00006 5.00004 5.00003 
-    5.00001 5.00001 5 4.99999 4.99998 4.99997 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 
-}
-.graph element create V21 -x x -y v21
-
-v22 set {
-    7.10441e-10 0.00107105 0.000637109 -0.00236346 -0.018079 
-    -0.0120077 -0.00217059 0.00266679 0.00403383 0.00403836 
-    0.00356705 0.00303303 0.00244716 0.00198586 0.0016855 0.00136497 
-    -3.96022e-05 -0.000367409 -3.77079e-05 0.00194085 0.00506964 
-    -0.0400214 -0.0402572 0.0524434 0.286234 0.803011 1.44795 
-    2.02473 2.54768 3.02748 3.4415 3.78287 4.09667 4.35152 4.53987 
-    4.67614 4.77407 4.84319 4.89227 4.92702 4.95119 4.96764 
-    4.97846 4.98557 4.98982 4.99209 4.99371 4.99569 4.99727 
-    4.99802 4.99834 4.99867 4.99892 4.99915 4.99936 4.99939 
-    4.99943 4.99946 4.9995 4.99953 4.99957 4.9996 4.99963 4.99967 
-    4.9997 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 4.9998 
-    4.99981 4.99982 4.99983 4.99984 4.99985 4.99986 4.99986 
-    4.99986 4.99987 4.99987 4.99988 4.99988 4.99989 4.99989 
-    4.9999 4.9999 4.9999 4.9999 4.99991 4.99991 4.99991 4.99991 
-    4.99992 4.99992 4.99992 4.99992 4.99993 4.99993 4.99993 
-    4.99993 4.99993 4.99993 4.99993 4.99993 4.99994 4.99994 
-    4.99994 4.99994 4.99994 4.99994 4.99994 4.99994 4.99995 
-    4.99995 4.99995 4.99995 4.99995 4.99995 4.99995 5.00145 
-    5.00659 5.01209 5.01931 5.00279 4.99273 4.99217 4.99295 
-    4.99471 4.99594 4.99696 4.9978 4.99844 4.99891 4.99924 4.99635 
-    4.99699 4.99813 5.00068 5.00307 5.0588 4.96365 4.54012 3.6307 
-    2.35176 1.0322 0.354379 0.115986 0.0435668 0.0245112 0.020786 
-    0.0164656 0.0118409 0.00849698 0.00597078 0.0040105 0.0026076 
-    0.0016597 0.00118185 0.00121067 0.00153587 0.00174836 0.00136519 
-    -0.000189116 -0.00315555 -0.00646603 -0.00898042 -0.010203 
-    -0.0110896 -0.0123764 -0.00953841 -0.00225795 0.000818314 
-    0.00152252 0.00150269 0.00119025 0.000767068 0.000308852 
-    -3.79272e-05 -0.00019691 -0.000186642 -9.73653e-05 -8.49784e-06 
-    2.04147e-05 -9.91086e-06 -1.55959e-05 -1.80499e-05 -1.77097e-05 
-    -1.51548e-05 -1.1978e-05 -9.84916e-06 -1.29728e-05 -1.67235e-05 
-    -1.74153e-05 -1.39958e-05 -5.92272e-06 -8.08216e-06 -1.53077e-05 
-    -2.92531e-05 -3.91049e-05 -2.98935e-05 -7.32122e-06 3.18534e-05 
-    4.39134e-05 4.18753e-05 3.22759e-05 1.86766e-05 1.58432e-05 
-    1.30098e-05 1.01765e-05 7.34312e-06 4.50975e-06 1.67639e-06 
-    -1.15697e-06 -1.23877e-06 -1.11991e-06 -1.00106e-06 -8.82208e-07 
-    -7.63355e-07 -6.44502e-07 -5.2565e-07 -4.29318e-07 -3.44661e-07 
-    -2.60004e-07 -1.75347e-07 -9.06904e-08 -6.03349e-09 7.86234e-08 
-    1.6328e-07 2.47937e-07 3.32594e-07 4.17251e-07 5.01908e-07 
-    5.86565e-07 6.71222e-07 7.36123e-07 6.43886e-07 5.5165e-07 
-    4.59414e-07 3.67178e-07 0.000334759 -4.60833e-05 -0.00106139 
-    -0.00166624 0.000859563 0.00102606 0.00410037 0.00419931 
-    0.00518997 0.00459791 0.00503125 0.00523877 0.00452158 0.00339924 
-    0.00233399 0.000876915 0.000546439 0.000444299 0.000983968 
-    0.00119304 -0.0429422 -0.0403983 0.0534896 0.288013 0.807345 
-    1.44247 2.03448 2.57021 3.05049 3.47332 3.8131 4.1009 4.34677 
-    4.53512 4.67127 4.76531 4.82526 4.86593 4.89586 4.91904 
-    4.93806 4.95348 4.96597 4.97629 4.9843 4.98983 4.99335 4.9957 
-    4.99741 4.99864 4.99946 4.99994 5.00047 5.00073 5.00086 
-    5.00092 5.00094 5.00091 5.00087 5.00081 5.00074 5.00067 
-    5.00059 5.00052 5.00046 5.0004 5.00034 5.0003 5.00026 5.00022 
-    5.00019 5.00016 5.00014 5.00012 5.0001 5.00009 5.00007 5.00006 
-    5.00006 5.00005 5.00004 5.00004 5.00004 5.00003 5.00003 
-    5.00003 5.00002 5.00002 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00002 5.00002 
-}
-.graph element create V22 -x x -y v22
-
-v23 set {
-    5 5.00284 5.01266 5.01895 4.98936 4.99575 4.99217 4.99545 
-    4.99775 4.99894 4.99946 4.99968 4.99975 4.99977 4.99986 
-    4.9999 4.99528 4.99808 5.00039 5.00392 5.00512 4.99985 4.99863 
-    4.99942 4.99992 5.00017 4.99897 4.99803 4.99784 4.99739 
-    4.99883 5.00365 5.00298 5.00133 5.00048 5.00019 5.00008 
-    5.00005 5.00004 5.00003 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 4.99999 4.99997 4.99995 4.99996 
-    4.99998 5 5.00001 5.00001 5.00002 5.00002 5.00003 5.00003 
-    5.00002 5.00002 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 
-    5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5.00217 5.00108 4.99547 4.99658 5.00667 
-    4.99641 4.99532 4.99938 5.00328 5.00222 5.00114 5.00052 
-    5.00024 5.00011 5.00009 4.99285 4.99591 4.99897 5.00403 
-    5.00786 5.00318 4.99942 4.9992 4.99949 5.001 5.00408 5.00319 
-    5.00063 4.99995 5.00014 4.99982 4.99832 4.99838 4.99865 
-    4.99912 4.99836 4.99735 4.99606 4.99814 5.00958 5.02973 
-    5.05293 5.06103 4.99342 4.80726 4.50744 4.07509 3.41358 
-    2.37924 1.03194 0.261552 0.142392 0.0904482 0.0555071 0.0322869 
-    0.018289 0.0113802 0.00875182 0.00757055 0.00629906 0.00523 
-    0.00403349 0.0031953 0.00280864 0.00286119 0.00250389 0.00202815 
-    0.001723 0.00147312 0.0012411 0.00104401 0.000886204 0.000758277 
-    0.000651915 0.00056348 0.000487966 0.000424048 0.000365613 
-    0.000308178 0.000258725 0.000228061 0.000207976 0.000198491 
-    0.00018518 0.000172716 0.000163197 0.000155007 0.000141734 
-    0.000128461 0.000115188 0.000101915 8.86417e-05 7.53686e-05 
-    6.20956e-05 5.69164e-05 5.23275e-05 4.77385e-05 4.31495e-05 
-    3.85605e-05 3.39716e-05 2.93826e-05 2.69449e-05 2.56224e-05 
-    2.42999e-05 2.29774e-05 2.16549e-05 2.03324e-05 1.90099e-05 
-    1.76873e-05 1.63648e-05 1.50423e-05 1.37198e-05 1.23973e-05 
-    1.10748e-05 9.75232e-06 8.48447e-06 7.65129e-06 6.81811e-06 
-    5.98494e-06 5.15176e-06 0.00056893 -0.00787906 -0.0217381 
-    -0.0370066 -0.00770505 0.00659312 0.00975477 0.00949456 
-    0.00777552 0.00655645 0.00568776 0.00508782 0.00458121 0.00410187 
-    0.00365665 0.0015121 0.00160863 0.00263181 0.00638941 0.00772607 
-    0.00225583 0.0010843 0.000882939 0.000801563 0.00075632 
-    0.000554992 0.000435131 0.0003474 0.000217667 0.000491602 
-    0.0012267 0.00250446 0.000212058 -0.0174972 -0.0527527 -0.0479071 
-    0.194908 1.45838 3.40677 4.49242 4.86894 4.97215 5.01218 
-    5.04342 5.06228 5.03069 4.87169 4.57056 4.11523 3.38264 
-    2.19691 0.715839 0.172818 0.102162 0.0627162 0.0363388 0.020289 
-    0.0119414 0.00826608 0.0066417 0.00549092 0.00492505 0.00439443 
-    0.0037156 0.00306471 0.00247451 0.00195965 0.0014822 0.0010815 
-    0.000904464 0.0010514 0.00152308 0.00120752 0.000228447 
-    -0.00102833 -0.00116644 -0.00042067 4.78758e-05 5.09599e-05 
-    -4.45756e-05 -3.22966e-06 3.81163e-05 7.94622e-05 0.000120808 
-    0.000162154 0.000161895 0.000148481 0.000135068 0.000121654 
-    0.000108241 9.81453e-05 9.2164e-05 8.61827e-05 8.02014e-05 
-    7.42201e-05 6.82388e-05 6.22576e-05 5.62763e-05 5.0295e-05 
-    4.43137e-05 3.83324e-05 3.54323e-05 3.321e-05 3.09877e-05 
-    2.87654e-05 2.65431e-05 2.43209e-05 2.20986e-05 1.98763e-05 
-    1.7654e-05 1.54317e-05 1.34612e-05 1.25441e-05 1.1627e-05 
-    1.07099e-05 9.79276e-06 8.87564e-06 7.95851e-06 7.04139e-06 
-    6.12427e-06 
-}
-.graph element create V23 -x x -y v23
-
-v24 set {
-    5 5.01099 5.00866 4.97845 4.92369 4.9273 4.97413 4.9929 
-    4.99826 4.99958 4.99978 5.00005 4.99968 4.99959 5.00014 
-    4.99979 4.99914 4.99982 5.00023 5.00295 5.00664 4.99854 
-    4.99647 5.00438 5.01722 5.03681 5.04766 5.04799 5.04867 
-    5.04873 5.04685 5.04413 5.0367 5.02505 5.01726 5.01183 5.00806 
-    5.00549 5.00371 5.00246 5.00162 5.00105 5.00069 5.00045 
-    5.00031 5.00024 5.00019 5.00012 5.00007 5.00004 5.00001 
-    4.99998 4.99999 4.99999 5 5.00001 5.00001 5.00002 5.00002 
-    5.00003 5.00003 5.00003 5.00002 5.00002 5.00001 5.00001 
-    5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5.00418 4.99953 4.99152 
-    4.99807 5.00497 5.00112 5.00055 5.00038 5.00018 5.00006 
-    5.00006 5.00007 5.00006 5.00004 5.00004 4.99853 4.99945 
-    4.99998 5.00304 5.00935 5.00742 4.99181 4.97421 4.93603 
-    4.8853 4.8927 4.93984 4.97458 4.99039 4.99614 4.99801 4.99851 
-    4.99869 4.99924 5.00108 5.00181 5.00119 5.00059 5.00031 
-    5.00022 5.00018 5.00011 5.00001 5.00006 4.99981 4.99977 
-    4.99982 5.00012 4.99993 5.00008 5.00043 5.00048 5.00024 
-    5.00008 4.99984 4.99993 5.00011 4.99996 4.9998 4.99977 4.9998 
-    4.99993 5.00008 5.00011 5.00002 4.99995 4.99989 4.99993 
-    5 5.00007 5.00009 4.99994 4.99977 4.9997 4.99975 4.99996 
-    4.99996 4.99988 4.9997 4.99952 4.9995 4.99956 4.99973 4.99988 
-    5.00005 5.00025 5.00042 5.00036 5.00031 5.00025 5.0002 5.00014 
-    5.00009 5.00003 5.00002 5.00001 5.00001 5 4.99999 4.99998 
-    4.99998 4.99997 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5.00284 
-    5.00442 5.00381 4.98997 4.99092 5.00733 5.07791 4.98237 
-    4.86434 4.76835 4.74067 4.79278 4.85094 4.90068 4.93603 
-    4.95698 4.96984 4.97856 4.98869 4.99904 5.0005 4.99524 5.00181 
-    5.01878 5.05177 5.07986 4.98917 4.56217 3.68 2.3539 1.18541 
-    0.505772 0.221044 0.115287 0.0760938 0.0589194 0.0476784 
-    0.0457213 0.0412911 0.033889 0.0259741 0.0191452 0.0139018 
-    0.0100235 0.00711788 0.00497657 0.00349368 0.00250021 0.00176179 
-    0.00121843 0.000838368 0.000582711 0.000423458 0.000294608 
-    0.000201251 0.000133748 8.6227e-05 5.44252e-05 3.30514e-05 
-    1.93926e-05 1.09814e-05 5.29857e-06 1.92247e-06 3.08708e-07 
-    -3.74311e-07 -6.11121e-07 -7.27807e-07 -4.87604e-07 -4.80493e-07 
-    -9.15925e-07 -2.03774e-06 -4.01128e-06 -2.46644e-06 2.10626e-06 
-    8.22422e-06 1.04922e-05 9.83047e-06 7.27106e-06 3.29654e-06 
-    -2.06736e-06 -2.18019e-06 -2.29303e-06 -2.40586e-06 -2.51869e-06 
-    -2.63153e-06 -2.24615e-06 -1.70325e-06 -1.16036e-06 -6.17468e-07 
-    -7.45754e-08 2.45198e-07 2.88285e-07 3.31373e-07 3.7446e-07 
-    4.17548e-07 4.60635e-07 5.03723e-07 5.4681e-07 5.89898e-07 
-    6.32985e-07 6.76073e-07 6.19054e-07 5.4001e-07 4.60967e-07 
-    3.81923e-07 3.02879e-07 2.23836e-07 1.44792e-07 6.57488e-08 
-    -1.32948e-08 -9.23383e-08 -1.6698e-07 -2.23206e-07 -2.79432e-07 
-    -3.35658e-07 -3.91884e-07 -4.48109e-07 -5.04335e-07 -5.60561e-07 
-    -6.16787e-07 
-}
-.graph element create V24 -x x -y v24
-
-v25 set {
-    1.34824 1.35838 1.36465 1.34675 1.29167 1.23161 1.2201 1.2185 
-    1.2181 1.21798 1.21793 1.21788 1.21785 1.21782 1.21779 1.21776 
-    1.21655 1.21656 1.21669 1.21871 1.22421 1.22247 1.21858 
-    1.2228 1.23803 1.27737 1.10647 0.395248 0.0600669 0.027687 
-    0.0192374 0.015425 0.0130881 0.00977445 0.00696598 0.00491122 
-    0.00341952 0.00237078 0.00162339 0.00109178 0.000726647 
-    0.000478886 0.00031568 0.000207902 0.000143494 0.000109768 
-    8.62987e-05 5.69775e-05 3.36547e-05 2.30356e-05 1.86108e-05 
-    1.41861e-05 1.08293e-05 7.68835e-06 4.79593e-06 4.51019e-06 
-    4.22444e-06 3.9387e-06 3.65295e-06 3.36721e-06 3.04559e-06 
-    2.69981e-06 2.35403e-06 2.00825e-06 1.66247e-06 1.34508e-06 
-    1.26225e-06 1.17941e-06 1.09657e-06 1.01373e-06 9.30893e-07 
-    8.48054e-07 7.65216e-07 6.82378e-07 5.9954e-07 5.16702e-07 
-    4.37489e-07 3.82774e-07 3.2806e-07 2.73346e-07 2.18632e-07 
-    1.63917e-07 1.09203e-07 5.4489e-08 -2.2523e-10 -5.49395e-08 
-    -1.09654e-07 -1.52862e-07 -1.3079e-07 -1.08718e-07 -8.6646e-08 
-    -6.45739e-08 -4.25019e-08 -2.04298e-08 1.64229e-09 2.37144e-08 
-    4.57864e-08 6.78585e-08 8.71693e-08 9.30725e-08 9.89758e-08 
-    1.04879e-07 1.10782e-07 1.16685e-07 1.22589e-07 1.28492e-07 
-    1.34395e-07 1.40298e-07 1.46201e-07 1.52105e-07 1.58008e-07 
-    1.63911e-07 1.69814e-07 1.75718e-07 1.81621e-07 1.87524e-07 
-    1.93427e-07 1.9933e-07 2.05234e-07 2.11137e-07 2.19788e-07 
-    0.000393944 -0.000218983 -0.00105784 0.00172403 -0.00027134 
-    -0.000204147 8.79968e-06 5.93762e-05 5.83554e-05 4.13815e-05 
-    3.71369e-05 3.03372e-05 2.25336e-05 1.5986e-05 1.07284e-05 
-    -7.5239e-05 5.60593e-05 6.97571e-05 0.000667617 0.000960856 
-    0.00131749 -0.00759564 -0.0217897 -0.0450321 -0.076646 -0.128569 
-    -0.186391 -0.202175 -0.206953 -0.2082 -0.208416 -0.208669 
-    -0.208934 -0.209111 -0.209234 -0.209329 -0.209389 -0.209416 
-    -0.2094 -0.209329 -0.20926 -0.209204 -0.209208 -0.209285 
-    -0.209454 -0.209641 -0.20977 -0.209811 -0.209833 -0.209887 
-    -0.209653 -0.209127 -0.208893 -0.208811 -0.208777 -0.208758 
-    -0.208747 -0.20874 -0.208726 -0.208697 -0.208657 -0.208611 
-    -0.208565 -0.208524 -0.208488 -0.208451 -0.208412 -0.208373 
-    -0.208333 -0.208294 -0.208256 -0.208219 -0.208183 -0.208145 
-    -0.208107 -0.208066 -0.208029 -0.207993 -0.207959 -0.207923 
-    -0.207883 -0.207838 -0.207789 -0.207747 -0.20771 -0.207675 
-    -0.207642 -0.207605 -0.207568 -0.207531 -0.207494 -0.207457 
-    -0.20742 -0.207383 -0.207346 -0.207308 -0.207271 -0.207233 
-    -0.207196 -0.207158 -0.207121 -0.207084 -0.207046 -0.207009 
-    -0.206972 -0.206935 -0.206898 -0.206861 -0.206823 -0.206786 
-    -0.206749 -0.206712 -0.206675 -0.206638 -0.2066 -0.206563 
-    -0.206526 -0.206489 -0.206452 -0.206415 -0.203384 -0.20015 
-    -0.196872 -0.205024 -0.210727 -0.206779 -0.0685263 0.586138 
-    1.4665 2.22945 2.77554 3.076 3.24926 3.34515 3.40164 3.43006 
-    3.43713 3.43075 3.42886 3.4384 3.46567 3.49025 3.51287 3.53821 
-    3.57841 3.39846 2.80753 2.22947 1.7549 1.30429 0.707786 
-    0.303206 0.131352 0.0671706 0.0429955 0.032461 0.0257161 
-    0.0239521 0.0217397 0.0179705 0.0138745 0.0102813 0.00749643 
-    0.0054328 0.00386817 0.0027004 0.00189442 0.00135552 0.000954715 
-    0.000659981 0.000453435 0.000313993 0.000231347 0.000159665 
-    0.000108122 7.10528e-05 4.50233e-05 2.77892e-05 1.62765e-05 
-    8.9893e-06 4.5471e-06 1.54614e-06 -1.6542e-07 -8.68508e-07 
-    -1.04369e-06 -9.63086e-07 -8.44294e-07 -6.57339e-07 -7.35885e-07 
-    -9.80056e-07 -1.39772e-06 -2.10199e-06 -1.37474e-06 6.13269e-07 
-    3.3028e-06 4.60941e-06 4.91053e-06 4.14186e-06 2.45258e-06 
-    -8.7388e-09 -3.59647e-07 -7.10554e-07 -1.06146e-06 -1.41237e-06 
-    -1.76328e-06 -1.63073e-06 -1.34534e-06 -1.05995e-06 -7.74561e-07 
-    -4.8917e-07 -2.95733e-07 -2.16326e-07 -1.3692e-07 -5.75135e-08 
-    2.18929e-08 1.01299e-07 1.80706e-07 2.60112e-07 3.39519e-07 
-    4.18925e-07 4.98332e-07 4.83984e-07 4.4901e-07 4.14035e-07 
-    3.79061e-07 3.44087e-07 3.09112e-07 2.74138e-07 2.39163e-07 
-    2.04189e-07 1.69215e-07 1.26002e-07 4.83213e-08 -2.9359e-08 
-    -1.07039e-07 -1.8472e-07 -2.624e-07 -3.4008e-07 -4.1776e-07 
-    -4.95441e-07 
-}
-.graph element create V25 -x x -y v25
-
-v26 set {
-    7.10441e-10 0.000309731 -0.000308186 -0.001694 -0.00360784 
-    8.40909e-05 0.00203175 0.0012896 0.000596548 0.000277191 
-    0.000161134 0.000120439 8.4915e-05 9.49929e-05 6.18812e-05 
-    1.65433e-05 1.89682e-05 3.97578e-05 4.95446e-05 0.000225325 
-    0.000214579 -0.00230134 -0.000451102 0.00997237 0.0341443 
-    0.0449314 0.0424411 0.0341996 0.0315315 0.0308892 0.0291614 
-    0.024365 0.0190282 0.0188976 0.017238 0.0138526 0.0105645 
-    0.00778548 0.00561753 0.0039871 0.00279554 0.00194075 0.0013468 
-    0.000934775 0.000664723 0.000498911 0.000377384 0.000254183 
-    0.000163421 0.000120773 9.65058e-05 7.22384e-05 5.60316e-05 
-    4.14549e-05 2.79516e-05 2.57096e-05 2.34677e-05 2.12257e-05 
-    1.89837e-05 1.67417e-05 1.46737e-05 1.27228e-05 1.07719e-05 
-    8.82099e-06 6.87009e-06 5.0896e-06 4.71705e-06 4.34451e-06 
-    3.97196e-06 3.59941e-06 3.22686e-06 2.85431e-06 2.48176e-06 
-    2.10921e-06 1.73666e-06 1.36411e-06 1.02855e-06 9.42931e-07 
-    8.57316e-07 7.71701e-07 6.86086e-07 6.00471e-07 5.14856e-07 
-    4.29241e-07 3.43626e-07 2.58011e-07 1.72396e-07 9.85409e-08 
-    9.14091e-08 8.42773e-08 7.71456e-08 7.00138e-08 6.2882e-08 
-    5.57503e-08 4.86185e-08 4.14867e-08 3.4355e-08 2.72232e-08 
-    2.05821e-08 1.63235e-08 1.2065e-08 7.80643e-09 3.54786e-09 
-    -7.10696e-10 -4.96926e-09 -9.22782e-09 -1.34864e-08 -1.77449e-08 
-    -2.20035e-08 -2.62621e-08 -3.05206e-08 -3.47792e-08 -3.90378e-08 
-    -4.32963e-08 -4.75549e-08 -5.18134e-08 -5.6072e-08 -6.03306e-08 
-    -6.45891e-08 -6.88477e-08 -8.76373e-06 0.000131607 -0.00021685 
-    -0.000433027 0.00047234 0.000211593 -0.000189601 3.2492e-05 
-    0.000575955 7.72235e-05 -0.000285172 -0.000242061 -0.000135112 
-    -3.50117e-05 -2.75868e-05 5.48974e-05 1.80604e-07 5.48911e-05 
-    3.97478e-05 0.000192909 0.000297932 0.00402253 -0.0122366 
-    -0.047853 -0.0963082 -0.108071 -0.0567275 -0.0239271 -0.0178628 
-    -0.0233027 -0.031853 -0.0400843 -0.0482725 -0.0576154 -0.0627218 
-    -0.0511236 -0.0279524 -0.0150986 -0.00931091 -0.00652876 
-    -0.00479286 -0.00344346 -0.00249578 -0.0019532 -0.00157977 
-    -0.00131848 -0.00111251 -0.000939229 -0.000797445 -0.000708384 
-    -0.000630452 -0.000539722 -0.000508862 -0.000480596 -0.000439484 
-    -0.000407217 -0.000363866 -0.000329506 -0.000318642 -0.000307362 
-    -0.000286511 -0.000266253 -0.000242943 -0.000218107 -0.000204661 
-    -0.00020241 -0.000194435 -0.000185062 -0.000173042 -0.000160549 
-    -0.000151407 -0.000145626 -0.000145976 -0.000147342 -0.000145288 
-    -0.000137979 -0.000124481 -0.000123218 -0.000127453 -0.000139006 
-    -0.000145486 -0.000129764 -9.82749e-05 -4.72596e-05 -3.08671e-05 
-    -3.28834e-05 -4.52254e-05 -6.25389e-05 -6.32516e-05 -6.39643e-05 
-    -6.4677e-05 -6.53897e-05 -6.61023e-05 -6.6815e-05 -6.75277e-05 
-    -6.61005e-05 -6.45173e-05 -6.29341e-05 -6.13509e-05 -5.97676e-05 
-    -5.81844e-05 -5.66012e-05 -5.54231e-05 -5.4455e-05 -5.3487e-05 
-    -5.25189e-05 -5.15508e-05 -5.05828e-05 -4.96147e-05 -4.86466e-05 
-    -4.76785e-05 -4.67105e-05 -4.57424e-05 -4.47743e-05 -4.38063e-05 
-    -4.28382e-05 -4.18821e-05 -4.10211e-05 -4.016e-05 -3.9299e-05 
-    -3.8438e-05 4.29885e-05 5.14113e-05 -0.000127986 -0.000611463 
-    -0.000149428 0.000882394 0.00297059 -0.00405825 -0.00591067 
-    -0.00546997 -0.00158744 0.00190677 0.00298403 0.00268595 
-    0.00196161 0.00130289 0.000783347 0.000520683 0.000565306 
-    0.00053419 -0.00224696 -0.000920818 0.0132755 0.0322504 
-    0.0442808 0.0638615 0.0701007 0.0539356 0.0247771 0.056244 
-    0.294266 0.831368 1.45424 2.02898 2.54559 2.9937 3.35333 
-    3.72609 4.06363 4.32789 4.52413 4.66504 4.7652 4.83637 4.88631 
-    4.92109 4.94464 4.96046 4.97218 4.98079 4.98679 4.99076 
-    4.99361 4.99555 4.99686 4.99783 4.99853 4.99902 4.99936 
-    4.99959 4.99973 4.99983 4.9999 4.99993 4.99996 4.99998 5 
-    5.00001 5 4.99999 4.99997 4.99994 4.99993 4.99994 4.99996 
-    4.99999 5.00004 5.00006 5.00005 5.00003 5.00002 5.00001 
-    5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 
-    
-}
-.graph element create V26 -x x -y v26
-
-v27 set {
-    5 4.99984 4.99796 4.99478 4.9889 4.98738 4.98896 4.99087 
-    4.99262 4.99419 4.99552 4.99659 4.99743 4.99807 4.99855 
-    4.9989 4.99894 4.99908 4.99935 5.00001 5.0007 5.00132 5.00032 
-    4.99976 5.00134 5.00339 5.00315 5.00157 5.00091 5.00058 
-    5.00012 4.99944 4.99886 4.9994 4.99934 4.99899 4.99876 4.99868 
-    4.99872 4.99883 4.99898 4.99914 4.9993 4.99944 4.99956 4.99967 
-    4.99976 4.99982 4.99986 4.9999 4.99993 4.99997 4.99997 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00009 5.00028 5.00015 4.99983 
-    5.00036 4.99996 4.99834 4.99783 5.00383 5.00734 5.00387 
-    5.00058 4.99893 4.99836 4.99832 4.99854 4.99873 4.99905 
-    4.99927 4.99952 4.99969 4.99834 4.99536 4.99163 4.99073 
-    5.0053 5.03631 5.03103 4.9008 4.62503 4.21887 3.70902 3.09967 
-    2.35791 1.41912 0.519675 0.210458 0.131362 0.0980819 0.0708209 
-    0.0471701 0.0323272 0.0253535 0.0199144 0.0152615 0.0117228 
-    0.00917696 0.00738117 0.00609292 0.00512664 0.00436184 0.0037961 
-    0.00331639 0.00289006 0.0025477 0.00226529 0.00202925 0.00182793 
-    0.00165474 0.00150531 0.00137529 0.00125983 0.00115603 0.00106455 
-    0.000982977 0.000911255 0.000846819 0.000790092 0.000738698 
-    0.000692816 0.00065107 0.000613595 0.000579642 0.000548935 
-    0.00052106 0.000495598 0.000472174 0.000450849 0.000431118 
-    0.000412667 0.000395868 0.000381319 0.000368487 0.000357327 
-    0.000344212 0.000330334 0.00031622 0.000303298 0.000295809 
-    0.00028832 0.000280831 0.000273342 0.000265853 0.000258364 
-    0.000250875 0.000245118 0.000239488 0.000233857 0.000228227 
-    0.000222596 0.000216966 0.000211336 0.000207047 0.000203455 
-    0.000199863 0.00019627 0.000192678 0.000189085 0.000185493 
-    0.0001819 0.000178308 0.000174716 0.000171123 0.000167531 
-    0.000163938 0.000160346 0.000156835 0.000153973 0.00015111 
-    0.000148248 0.000145385 0.000296579 -3.96718e-05 -0.000449085 
-    0.000323433 0.000750086 0.000268264 0.000149028 -0.000100249 
-    7.00956e-05 0.00012605 0.00022592 0.000193036 0.000120453 
-    8.07865e-05 7.65771e-05 -3.27828e-05 0.000116759 0.000169498 
-    0.000409804 0.000414965 0.00092323 -0.00590633 -0.0175477 
-    -0.032433 -0.0559842 -0.0820373 0.0688484 0.626629 1.32929 
-    2.01657 2.60925 3.12329 3.38952 3.14128 2.38463 1.23802 
-    0.316019 0.107832 0.0694707 0.051837 0.035247 0.0209999 
-    0.0116618 0.00967674 0.00789182 0.00574566 0.00386872 0.00258612 
-    0.00167126 0.00104169 0.000641093 0.000401246 0.000277928 
-    0.000171775 0.000102266 5.89376e-05 3.29258e-05 1.80463e-05 
-    1.0057e-05 6.4571e-06 5.10093e-06 4.06791e-06 3.62716e-06 
-    3.63321e-06 3.99625e-06 4.64368e-06 5.20886e-06 4.77728e-06 
-    3.23919e-06 1.14113e-06 -1.29416e-06 -4.15607e-06 -1.88532e-06 
-    5.24411e-06 1.38678e-05 1.28823e-05 3.6758e-06 -2.52285e-06 
-    -3.97133e-06 -4.03071e-06 -3.37154e-06 -2.71238e-06 -2.05321e-06 
-    -1.39404e-06 -7.34872e-07 -3.73325e-07 -1.05873e-07 1.61578e-07 
-    4.2903e-07 6.96482e-07 8.18468e-07 7.60065e-07 7.01662e-07 
-    6.43258e-07 5.84855e-07 5.26452e-07 4.68049e-07 4.09646e-07 
-    3.51243e-07 2.9284e-07 2.34437e-07 1.71213e-07 1.06928e-07 
-    4.2644e-08 -2.16403e-08 -8.59247e-08 -1.50209e-07 -2.14493e-07 
-    -2.78778e-07 -3.43062e-07 -4.07346e-07 -4.55065e-07 -4.3348e-07 
-    -4.11896e-07 -3.90311e-07 -3.68726e-07 -3.47141e-07 -3.25556e-07 
-    -3.03971e-07 -2.82386e-07 
-}
-.graph element create V27 -x x -y v27
-
-v28 set {
-    0.368163 0.361756 0.327463 0.269513 0.149476 0.0805716 0.0501146 
-    0.03403 0.0230886 0.0160474 0.0116071 0.00870013 0.00679614 
-    0.00542384 0.00432512 0.00340653 -0.00129719 -0.00399429 
-    -0.00318719 0.00443085 0.0150156 0.0334147 0.0132288 -0.0189751 
-    -0.0508377 -0.0252174 -0.0142489 -0.00675908 -0.0038653 
-    -0.00243423 -0.00168891 -0.00120901 -0.000900426 -0.000685575 
-    -0.000557595 -0.000457268 -0.000377427 -0.000315269 -0.000266613 
-    -0.000228397 -0.000198283 -0.000174248 -0.000154886 -0.00013892 
-    -0.000125864 -0.000115189 -0.000105841 -9.66611e-05 -8.84262e-05 
-    -8.23872e-05 -7.74668e-05 -7.25463e-05 -6.79992e-05 -6.35276e-05 
-    -5.92413e-05 -5.68994e-05 -5.45574e-05 -5.22154e-05 -4.98735e-05 
-    -4.75315e-05 -4.54981e-05 -4.36726e-05 -4.18471e-05 -4.00216e-05 
-    -3.81961e-05 -3.64559e-05 -3.54209e-05 -3.43858e-05 -3.33508e-05 
-    -3.23157e-05 -3.12807e-05 -3.02456e-05 -2.92105e-05 -2.81755e-05 
-    -2.71404e-05 -2.61054e-05 -2.51232e-05 -2.44984e-05 -2.38736e-05 
-    -2.32487e-05 -2.26239e-05 -2.19991e-05 -2.13742e-05 -2.07494e-05 
-    -2.01246e-05 -1.94998e-05 -1.88749e-05 -1.82865e-05 -1.79044e-05 
-    -1.75224e-05 -1.71403e-05 -1.67582e-05 -1.63762e-05 -1.59941e-05 
-    -1.56121e-05 -1.523e-05 -1.4848e-05 -1.44659e-05 -1.41138e-05 
-    -1.39075e-05 -1.37011e-05 -1.34947e-05 -1.32883e-05 -1.30819e-05 
-    -1.28755e-05 -1.26691e-05 -1.24627e-05 -1.22563e-05 -1.205e-05 
-    -1.18436e-05 -1.16372e-05 -1.14308e-05 -1.12244e-05 -1.1018e-05 
-    -1.08116e-05 -1.06052e-05 -1.03988e-05 -1.01924e-05 -9.98605e-06 
-    -9.77966e-06 -2.85319e-05 0.00281092 0.00180106 -0.000981083 
-    0.00551926 -0.00119763 -0.0295069 -0.0367677 0.064749 0.119022 
-    0.0882007 0.0552062 0.03418 0.0223243 0.015545 0.011949 
-    0.00757134 0.00667655 0.00583243 0.00644443 0.00650959 -0.0302575 
-    -0.0437806 -0.0355466 0.0381776 0.282109 0.674178 1.07582 
-    1.45189 1.789 2.08649 2.34663 2.57245 2.81211 3.04778 3.2523 
-    3.45877 3.65593 3.83396 3.9923 4.13368 4.25864 4.36719 4.46064 
-    4.54086 4.60962 4.66835 4.71838 4.76094 4.79716 4.82796 
-    4.85413 4.87634 4.89518 4.91116 4.92476 4.93631 4.94608 
-    4.95434 4.9613 4.96715 4.97211 4.97638 4.98001 4.98312 4.98571 
-    4.98795 4.98979 4.99138 4.99269 4.99381 4.99474 4.99551 
-    4.99615 4.99668 4.99713 4.99752 4.99783 4.99811 4.99836 
-    4.99858 4.99873 4.99884 4.99892 4.999 4.99907 4.99912 4.99916 
-    4.99921 4.99926 4.99932 4.99937 4.99942 4.99948 4.99953 
-    4.99956 4.99958 4.99961 4.99963 4.99966 4.99968 4.99971 
-    4.99972 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 
-    4.99979 4.9998 4.9998 4.99981 4.99982 4.99983 4.99984 4.99985 
-    4.99986 4.99986 4.99987 4.99987 5.00498 5.00354 4.99359 
-    4.98981 5.00498 5.00099 5.00041 5.00022 5.00015 5.00012 
-    5.0001 5.00008 5.00005 5.00003 5 4.99431 4.99459 4.99591 
-    5.00087 5.01029 5.03935 4.92784 4.51643 3.78356 2.68745 
-    1.43417 0.583128 0.205094 0.0777337 0.0391566 0.02723 0.023883 
-    0.018808 0.010165 0.00254623 -0.00377463 -0.0038097 0.00144145 
-    0.00267231 0.00193045 0.00144538 0.00121758 0.00112893 0.00109424 
-    0.0010226 0.000948072 0.000882573 0.000826996 0.000776391 
-    0.000729719 0.000686499 0.000647333 0.000610108 0.000575631 
-    0.000545069 0.000515485 0.000488514 0.000465316 0.000443215 
-    0.000422454 0.00040292 0.00038488 0.000368472 0.000353628 
-    0.000339643 0.000326197 0.000313483 0.000302884 0.000294038 
-    0.000284003 0.000270941 0.000254925 0.000246511 0.000244089 
-    0.000245538 0.000242099 0.000235728 0.000227482 0.000218001 
-    0.000207257 0.000202127 0.000196997 0.000191868 0.000186738 
-    0.000181608 0.00017758 0.000173899 0.000170219 0.000166538 
-    0.000162857 0.000159576 0.00015679 0.000154005 0.000151219 
-    0.000148433 0.000145647 0.000142861 0.000140076 0.00013729 
-    0.000134504 0.000131718 0.000129603 0.000127635 0.000125668 
-    0.0001237 0.000121732 0.000119765 0.000117797 0.000115829 
-    0.000113862 0.000111894 0.000109993 0.000108372 0.000106751 
-    0.00010513 0.000103509 0.000101887 0.000100266 9.86449e-05 
-    9.70237e-05 
-}
-.graph element create V28 -x x -y v28
-
-v29 set {
-    5 4.99899 4.99654 4.99327 4.9863 4.98954 4.99212 4.99378 
-    4.9951 4.99624 4.99715 4.99786 4.99839 4.99879 4.99909 4.99931 
-    4.99922 4.99933 4.99971 5.00064 5.00084 5.00123 4.99865 
-    4.99853 4.99983 5.00457 5.00242 5.00105 5.00062 5.00042 
-    4.99971 4.9994 4.9992 4.9996 4.99955 4.99932 4.99918 4.99915 
-    4.99919 4.99927 4.99937 4.99948 4.99957 4.99966 4.99974 
-    4.9998 4.99985 4.99989 4.99992 4.99993 4.99994 4.99994 4.99996 
-    4.99998 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 
-    5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 4.9997 4.99998 4.99954 4.99963 
-    5.00059 4.99945 4.99732 4.99957 5.00919 5.00558 5.00033 
-    4.99851 4.9983 4.99854 4.99871 4.99928 4.99914 4.99939 4.99952 
-    4.9998 4.99976 4.99744 4.99598 4.99478 4.99806 5.01911 5.04602 
-    5.05469 5.01317 4.89484 4.69655 4.42036 4.06069 3.60793 
-    3.12531 2.72975 2.45187 2.25081 2.09841 1.98509 1.90211 
-    1.84084 1.79411 1.7574 1.72763 1.70283 1.68188 1.66389 1.64823 
-    1.63438 1.62201 1.61088 1.60081 1.59163 1.58323 1.57549 
-    1.56835 1.56173 1.55558 1.54985 1.54451 1.53951 1.53479 
-    1.53035 1.52615 1.5222 1.51845 1.5149 1.51153 1.50834 1.50529 
-    1.5024 1.49964 1.497 1.49449 1.49208 1.48977 1.48755 1.48542 
-    1.48336 1.48138 1.47948 1.47765 1.4759 1.47419 1.47255 1.47096 
-    1.46949 1.46823 1.46696 1.4657 1.46444 1.46317 1.46191 1.46065 
-    1.45956 1.4585 1.45743 1.45636 1.45529 1.45422 1.45315 1.45226 
-    1.45145 1.45064 1.44983 1.44902 1.44821 1.4474 1.44659 1.44579 
-    1.44498 1.44417 1.44336 1.44255 1.44174 1.44094 1.44019 
-    1.43944 1.43868 1.43793 1.43765 1.43679 1.43515 1.43405 
-    1.43478 1.43387 1.43345 1.43184 1.43086 1.43021 1.43003 
-    1.42988 1.42944 1.42883 1.42818 1.42702 1.42642 1.42595 
-    1.42586 1.42616 1.42783 1.41733 1.38106 1.30738 1.3877 2.09819 
-    3.05285 3.58059 3.77601 3.87609 4.02557 4.24887 4.4608 4.60411 
-    4.72109 4.8255 4.90465 4.97379 5.01253 5.01532 5.01239 5.0092 
-    5.00665 5.00474 5.00333 5.00232 5.00163 5.00117 5.00082 
-    5.00057 5.00039 5.00027 5.00019 5.00013 5.00009 5.00006 
-    5.00004 5.00003 5.00002 5.00001 5.00001 5 5 5 4.99998 4.99995 
-    4.99992 4.99996 5.00005 5.00012 5.00008 4.99996 4.9999 4.99985 
-    4.99986 4.99997 5.00021 5.0003 5.00024 5.00009 5.00007 5.00005 
-    5.00003 5.00001 4.99998 4.99998 4.99998 4.99999 4.99999 
-    5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 
-}
-.graph element create V29 -x x -y v29
-v30 set {
-    7.10441e-10 5.70385e-05 0.000226143 0.000131916 -0.000887764 
-    -8.01837e-05 -3.49653e-05 9.40039e-05 0.000118663 0.000108025 
-    8.6059e-05 6.33268e-05 4.99295e-05 3.16843e-05 3.60692e-05 
-    2.07572e-05 -8.6375e-05 3.44583e-05 8.07397e-05 0.000196296 
-    0.000115615 -7.12768e-05 -0.000129812 -4.18679e-05 7.94364e-05 
-    0.000182034 -5.41226e-05 -0.000451819 -0.000713937 -0.00129863 
-    -0.00262186 -0.00213417 -0.00133767 0.000775698 0.000969902 
-    0.000549281 0.000280946 0.000140321 8.6919e-05 7.22446e-05 
-    6.5631e-05 6.45263e-05 6.63087e-05 7.17391e-05 7.59042e-05 
-    7.59172e-05 7.03353e-05 6.33558e-05 5.31136e-05 4.64278e-05 
-    4.40594e-05 4.16909e-05 4.05674e-05 3.96957e-05 3.87875e-05 
-    3.74977e-05 3.62079e-05 3.49181e-05 3.36283e-05 3.23385e-05 
-    3.12427e-05 3.02775e-05 2.93124e-05 2.83472e-05 2.7382e-05 
-    2.64613e-05 2.59077e-05 2.5354e-05 2.48004e-05 2.42468e-05 
-    2.36931e-05 2.31395e-05 2.25859e-05 2.20322e-05 2.14786e-05 
-    2.0925e-05 2.03916e-05 1.9995e-05 1.95984e-05 1.92019e-05 
-    1.88053e-05 1.84087e-05 1.80122e-05 1.76156e-05 1.7219e-05 
-    1.68225e-05 1.64259e-05 1.6051e-05 1.57991e-05 1.55471e-05 
-    1.52952e-05 1.50433e-05 1.47913e-05 1.45394e-05 1.42875e-05 
-    1.40356e-05 1.37836e-05 1.35317e-05 1.32978e-05 1.31513e-05 
-    1.30048e-05 1.28583e-05 1.27118e-05 1.25653e-05 1.24188e-05 
-    1.22724e-05 1.21259e-05 1.19794e-05 1.18329e-05 1.16864e-05 
-    1.15399e-05 1.13934e-05 1.12469e-05 1.11005e-05 1.0954e-05 
-    1.08075e-05 1.0661e-05 1.05145e-05 1.0368e-05 1.02215e-05 
-    1.76447e-05 7.21516e-05 -3.59786e-05 -0.000159618 0.000156236 
-    0.000135106 -0.000336402 -0.000302283 0.000699323 0.000473866 
-    -0.000156146 -0.000225625 -0.000123592 -3.78116e-05 8.47472e-06 
-    2.43387e-06 -7.44762e-05 7.80111e-05 9.43608e-05 0.000170159 
-    8.83919e-05 -0.00018802 -0.000373512 -0.000390597 0.000156875 
-    0.0032343 0.00776304 -0.000566905 -0.00760695 -0.0159226 
-    -0.0245989 -0.0331402 -0.0100902 0.067837 0.266702 0.910818 
-    1.82282 2.69714 3.43247 3.98325 4.32893 4.51529 4.67087 
-    4.79288 4.87574 4.92797 4.95902 4.97655 4.98622 4.99195 
-    4.99526 4.99735 4.9991 4.99974 4.99982 4.99974 4.99961 4.9995 
-    4.99943 4.9994 4.9994 4.99942 4.99944 4.99948 4.99952 4.99956 
-    4.99961 4.99965 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 
-    4.99988 4.9999 4.99991 4.99992 4.99993 4.99994 4.99995 4.99995 
-    4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 
-    4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5 
-    5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 5 5.00019 4.99888 4.99663 4.99457 4.99902 
-    5.00229 5.00323 5.00302 5.0023 5.0015 5.00085 5.00041 5.00013 
-    4.99993 4.99979 4.99948 4.99954 4.99983 5.00055 5.00109 
-    5.00009 4.9987 4.998 4.99755 4.99676 4.99618 5.01091 5.05272 
-    5.04156 4.80112 4.27692 3.42343 2.23953 0.967179 0.429813 
-    0.540757 1.32991 2.32147 3.14903 3.78143 4.22325 4.47978 
-    4.59448 4.69875 4.79798 4.87419 4.92339 4.95249 4.97174 
-    4.98408 4.99124 4.99478 4.99729 4.99868 4.9992 4.99941 4.99947 
-    4.99946 4.99943 4.9994 4.99939 4.9994 4.99942 4.99946 4.99951 
-    4.99956 4.99961 4.99967 4.99973 4.99977 4.9998 4.99981 4.99983 
-    4.99984 4.99987 4.99992 5.00001 5.00005 5.00001 4.99994 
-    4.99995 4.99995 4.99996 4.99996 4.99996 4.99997 4.99997 
-    4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99998 4.99998 4.99998 
-}
-.graph element create V30 -x x -y v30
-
-v31 set {
-    1.8179e-09 -5.28841e-06 -1.44913e-05 -3.62932e-05 -9.75719e-05 
-    0.000141781 3.73396e-05 -1.65603e-05 -1.5271e-05 -6.73884e-06 
-    4.40157e-06 -4.85345e-06 -1.02964e-05 2.03126e-05 -1.89457e-05 
-    -8.75564e-06 7.67422e-06 4.71103e-06 1.29798e-05 6.13469e-06 
-    -1.14363e-05 -0.0394563 -0.0477298 -0.0622012 -0.0519225 
-    0.262499 0.943611 1.67052 2.31017 2.84028 3.28467 3.61582 
-    3.85887 4.13011 4.36511 4.54063 4.67013 4.76408 4.83263 
-    4.8825 4.91837 4.94373 4.96117 4.97318 4.98093 4.98562 4.98906 
-    4.99267 4.99539 4.99666 4.99731 4.99797 4.99844 4.99887 
-    4.99927 4.99933 4.99938 4.99944 4.99949 4.99955 4.9996 4.99965 
-    4.9997 4.99975 4.9998 4.99985 4.99986 4.99987 4.99989 4.9999 
-    4.99991 4.99992 4.99993 4.99995 4.99996 4.99997 4.99998 
-    4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 
-    5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99997 5.00002 5.00004 5.0001 5.0001 4.99987 5.00009 
-    5.00021 5.00002 5.00004 4.99988 5.00013 4.99993 5.00026 
-    4.99973 5 5.00006 5.00009 5.00004 5.00004 5.04854 4.82711 
-    4.04208 2.64155 0.838902 0.19014 0.0982549 0.0723197 0.0576863 
-    0.0427644 0.0301979 0.020146 0.0135728 0.00980358 0.00774482 
-    0.00586604 0.0036687 0.00211511 0.00121906 0.000647581 0.000828436 
-    0.00190938 0.00224254 0.00199956 0.00165488 0.00135612 0.00113715 
-    0.000984181 0.000877175 0.000789973 0.000741139 0.000689338 
-    0.000625676 0.000586082 0.000550152 0.000529573 0.000505606 
-    0.000482117 0.000460574 0.000441649 0.000424674 0.000408398 
-    0.000391914 0.000376272 0.000361487 0.000348181 0.000336045 
-    0.000324466 0.000313545 0.000303046 0.000293056 0.00028356 
-    0.000274586 0.000266155 0.000258279 0.000250938 0.000243789 
-    0.000236912 0.000230244 0.000224186 0.000219291 0.000215346 
-    0.000212468 0.000207291 0.000200862 0.00019368 0.000186767 
-    0.000183515 0.000180263 0.00017701 0.000173758 0.000170506 
-    0.000167253 0.000164001 0.000161164 0.000158357 0.00015555 
-    0.000152743 0.000149936 0.000147129 0.000144322 0.000142066 
-    0.000140096 0.000138127 0.000136157 0.000134187 0.000132218 
-    0.000130248 0.000128278 0.000126308 0.000124339 0.000122369 
-    0.000120399 0.000118429 0.00011646 0.000114527 0.000112892 
-    0.000111258 0.000109623 0.000107988 0.000103598 6.86052e-05 
-    3.337e-05 7.00783e-05 0.000218764 0.000221318 0.000118593 
-    -0.000113962 5.78552e-05 9.42068e-05 0.000237037 0.000171302 
-    0.0001033 6.16066e-05 5.52908e-05 6.30233e-05 7.01897e-05 
-    8.48573e-05 0.000106859 8.37213e-05 -0.0391541 -0.047722 
-    -0.0618454 -0.0169804 0.345725 1.03426 1.74825 2.37152 2.88737 
-    3.32173 3.66761 3.9707 4.17762 3.98832 3.30483 2.09737 0.710892 
-    0.148159 0.0707463 0.0555808 0.045618 0.0319116 0.0199589 
-    0.0133357 0.00898528 0.00586075 0.00375478 0.00245443 0.00156038 
-    0.000962344 0.000590953 0.000375107 0.000250243 0.00015882 
-    0.000100203 6.18122e-05 3.7372e-05 2.23009e-05 1.32569e-05 
-    8.29437e-06 5.72457e-06 3.96832e-06 2.98935e-06 2.59699e-06 
-    2.75024e-06 3.38689e-06 4.0453e-06 3.50095e-06 1.64988e-06 
-    -3.84371e-07 -2.03828e-06 -3.46401e-06 -1.24301e-06 4.63458e-06 
-    1.14104e-05 1.02619e-05 2.15487e-06 -2.98487e-06 -3.67221e-06 
-    -2.94279e-06 -2.58649e-06 -2.23019e-06 -1.87389e-06 -1.5176e-06 
-    -1.1613e-06 -7.92127e-07 -4.18889e-07 -4.56502e-08 3.27588e-07 
-    7.00827e-07 8.79539e-07 8.17025e-07 7.5451e-07 6.91996e-07 
-    6.29481e-07 5.66966e-07 5.04452e-07 4.41937e-07 3.79422e-07 
-    3.16908e-07 2.54393e-07 1.90078e-07 1.25366e-07 6.0654e-08 
-    -4.05776e-09 -6.87696e-08 -1.33481e-07 -1.98193e-07 -2.62905e-07 
-    -3.27617e-07 -3.92329e-07 -4.40392e-07 -4.18802e-07 -3.97213e-07 
-    -3.75624e-07 -3.54035e-07 -3.32446e-07 -3.10856e-07 -2.89267e-07 
-    -2.67678e-07 
-}
-.graph element create V31 -x x -y v31
-v32 set {
-    1.10294 1.10297 1.10291 1.10277 1.10259 1.10294 1.10313 
-    1.10306 1.10299 1.10296 1.10295 1.10295 1.10294 1.10294 
-    1.10294 1.10294 1.10294 1.10294 1.10294 1.10296 1.10296 
-    1.00547 0.998599 1.5201 2.49297 3.31258 3.73162 3.84757 
-    3.92505 4.02965 4.16599 4.30294 4.41541 4.52886 4.64414 
-    4.73865 4.81065 4.86391 4.90315 4.93188 4.95258 4.96726 
-    4.97738 4.98436 4.98888 4.99162 4.99363 4.99573 4.99731 
-    4.99804 4.99843 4.99881 4.99909 4.99934 4.99957 4.9996 4.99964 
-    4.99967 4.9997 4.99973 4.99977 4.9998 4.99983 4.99986 4.99988 
-    4.99991 4.99992 4.99992 4.99993 4.99994 4.99994 4.99995 
-    4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 5.00028 4.99988 4.99968 
-    5.00019 4.99987 5.00021 4.99973 4.99977 4.99996 4.99997 
-    5.0002 4.99957 5.00026 4.99947 5.00074 5.00003 4.99987 4.99979 
-    5.00008 4.99997 5.08794 5.05993 4.76875 3.99197 3.10174 
-    2.5197 2.21771 2.04 1.92235 1.83874 1.77592 1.72665 1.686 
-    1.65276 1.6286 1.61299 1.60039 1.58934 1.57954 1.57083 1.56306 
-    1.55604 1.54963 1.54375 1.53832 1.53331 1.52865 1.52432 
-    1.52026 1.51645 1.51287 1.50949 1.50629 1.50327 1.50039 
-    1.49766 1.49505 1.49257 1.49019 1.48792 1.48574 1.48365 
-    1.48164 1.47971 1.47784 1.47604 1.47431 1.47264 1.47102 
-    1.46945 1.46794 1.46647 1.46505 1.46367 1.46233 1.46103 
-    1.45976 1.45853 1.45733 1.45616 1.45502 1.45392 1.45284 
-    1.45179 1.45076 1.44975 1.4488 1.44795 1.44711 1.44626 1.44541 
-    1.44457 1.44372 1.44287 1.44212 1.44138 1.44063 1.43989 
-    1.43914 1.4384 1.43766 1.43701 1.43641 1.43581 1.43522 1.43462 
-    1.43402 1.43342 1.43282 1.43223 1.43163 1.43103 1.43043 
-    1.42984 1.42924 1.42865 1.42808 1.42752 1.42695 1.42639 
-    1.42584 1.42529 1.42472 1.42412 1.42365 1.42326 1.42304 
-    1.42162 1.42082 1.42032 1.42029 1.42026 1.41995 1.41947 
-    1.41894 1.41841 1.4179 1.41742 1.41699 1.41656 1.32097 1.30963 
-    1.78765 2.64656 3.35764 3.747 3.86589 3.94217 4.04185 4.18453 
-    4.3561 4.53439 4.68621 4.74905 4.77848 4.84629 4.91261 4.97541 
-    5.01284 5.01548 5.01248 5.00924 5.00666 5.00475 5.00334 
-    5.00234 5.00164 5.00118 5.00083 5.00058 5.0004 5.00028 5.00019 
-    5.00013 5.00009 5.00007 5.00004 5.00003 5.00002 5.00001 
-    5.00001 5.00001 5 5 4.99999 4.99995 4.99992 4.99996 5.00006 
-    5.00012 5.00009 4.99997 4.9999 4.99985 4.99986 4.99997 5.00021 
-    5.00031 5.00024 5.0001 5.00007 5.00005 5.00003 5.00001 4.99998 
-    4.99998 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 
-    5 4.99999 4.99999 4.99999 4.99998 4.99998 4.99998 
-}
-.graph element create V32 -x x -y v32
-v33 set {
-    5 5.00012 5.00023 5.0003 4.99972 4.99988 4.99984 4.99991 
-    4.99996 4.99999 5.00008 5.00009 4.99986 5.00003 5.00007 
-    4.99995 4.9999 4.99997 5.00013 5.00014 5.00013 4.99701 4.99763 
-    4.99742 4.99998 5.02836 5.07262 4.96856 4.57267 3.85637 
-    2.79544 1.45942 0.408016 0.084885 0.0271375 0.0119294 0.00707546 
-    0.0051087 0.00373035 0.00264737 0.00186477 0.00130379 0.000915857 
-    0.000653121 0.000483893 0.000380852 0.000302362 0.000219498 
-    0.000154435 0.000121928 0.000104026 8.61242e-05 7.48526e-05 
-    6.49216e-05 5.56238e-05 5.29689e-05 5.03139e-05 4.7659e-05 
-    4.5004e-05 4.23491e-05 4.00356e-05 3.79522e-05 3.58687e-05 
-    3.37852e-05 3.17018e-05 2.97592e-05 2.89804e-05 2.82016e-05 
-    2.74228e-05 2.66441e-05 2.58653e-05 2.50865e-05 2.43077e-05 
-    2.35289e-05 2.27501e-05 2.19714e-05 2.12346e-05 2.07821e-05 
-    2.03295e-05 1.98769e-05 1.94244e-05 1.89718e-05 1.85192e-05 
-    1.80667e-05 1.76141e-05 1.71615e-05 1.6709e-05 1.62828e-05 
-    1.60061e-05 1.57294e-05 1.54527e-05 1.5176e-05 1.48993e-05 
-    1.46226e-05 1.43459e-05 1.40692e-05 1.37925e-05 1.35158e-05 
-    1.3262e-05 1.31191e-05 1.29761e-05 1.28332e-05 1.26903e-05 
-    1.25474e-05 1.24045e-05 1.22615e-05 1.21186e-05 1.19757e-05 
-    1.18328e-05 1.16898e-05 1.15469e-05 1.1404e-05 1.12611e-05 
-    1.11182e-05 1.09752e-05 1.08323e-05 1.06894e-05 1.05465e-05 
-    1.04036e-05 1.02606e-05 1.00185e-05 3.8343e-05 -3.06781e-05 
-    -0.000111758 0.000111673 0.000130815 -0.000210491 -0.000231304 
-    0.000310226 0.000265303 3.0878e-05 -4.48405e-05 -1.2852e-05 
-    -7.84469e-06 3.29986e-05 -1.23286e-05 -6.07871e-05 5.35082e-05 
-    7.69194e-05 0.000126221 6.57178e-05 0.00223349 -0.0148854 
-    -0.0476636 -0.0491447 0.220125 1.11174 2.03988 2.90209 3.61069 
-    4.13554 4.50679 4.71501 4.83916 4.91027 4.95284 4.98086 
-    4.99151 4.98651 4.97113 4.95075 4.93102 4.93683 4.95457 
-    4.97071 4.98212 4.98948 4.99386 4.99636 4.99785 4.9987 4.99927 
-    4.99989 5.00014 5.00007 4.99988 4.99982 4.99976 4.99973 
-    4.99972 4.99972 4.99973 4.99974 4.99975 4.99977 4.99979 
-    4.99981 4.99984 4.99986 4.99988 4.99989 4.99991 4.99992 
-    4.99993 4.99994 4.99995 4.99996 4.99996 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 
-    4.99999 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 
-    4.99999 4.99999 4.99999 5 5.00012 4.99946 4.99839 4.99733 
-    4.99948 5.00114 5.00158 5.00147 5.00113 5.00073 5.00043 
-    5.0002 5.00006 4.99995 4.99986 4.99973 4.99976 4.9999 5.00029 
-    5.00055 4.99704 4.99734 4.9972 5.00278 5.03354 5.07184 4.94057 
-    4.51936 3.75638 2.60982 1.23803 0.315016 0.0796102 0.0252894 
-    0.0165723 0.0827785 0.491298 1.40686 2.33436 3.1251 3.7691 
-    4.22201 4.49976 4.68115 4.80513 4.88509 4.93208 4.95861 
-    4.97579 4.98655 4.99268 4.99571 4.99771 4.99881 4.99929 
-    4.99954 4.99965 4.9997 4.99971 4.99971 4.99971 4.99971 4.99972 
-    4.99974 4.99976 4.99978 4.99981 4.99984 4.99987 4.99989 
-    4.99991 4.99991 4.99992 4.99992 4.99993 4.99997 5.00003 
-    5.00006 5.00004 5.00001 5 4.99999 4.99998 4.99998 4.99997 
-    4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 
-    4.99999 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 4.99999 
-    4.99999 4.99999 4.99999 4.99998 4.99998 
-}
-.graph element create V33 -x x -y v33
-v34 set {
-    5 5.00207 5.00813 5.01486 5.00156 5.0018 4.99861 4.99844 
-    4.99888 4.9993 4.99956 4.99971 4.99979 4.99983 4.99987 4.99989 
-    4.99671 4.9974 4.99864 5.00131 5.00377 5.0021 5.00039 4.99993 
-    5.00004 5.0009 5.00109 4.99636 4.98617 4.96778 4.92047 4.89528 
-    4.91112 4.9559 4.98286 4.99369 4.99812 4.99951 4.99994 5.00014 
-    5.00008 4.99994 4.99984 4.99989 4.99998 5.00004 5.00004 
-    5.00006 5.00005 5.00001 4.99997 4.99992 4.99993 4.99994 
-    4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 
-    4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 
-    4.99998 4.99998 4.99998 4.99998 5.00131 5.00072 4.9977 4.99811 
-    5.00325 4.99647 4.98948 4.99459 5.00262 5.00276 5.00156 
-    5.00072 5.0003 5.00013 4.99995 4.99668 4.99775 4.99917 5.00173 
-    5.00386 5.00188 4.99888 4.99757 4.99951 5.01712 5.0557 5.07088 
-    5.07704 5.07758 5.06958 5.04223 5.03331 5.0279 5.03408 5.07611 
-    5.01911 4.68594 3.99152 2.92195 1.69878 0.809 0.344091 0.154663 
-    0.0788717 0.0467212 0.0336168 0.0280514 0.0254947 0.024173 
-    0.0223567 0.0220555 0.0271514 0.0295872 0.0296052 0.0283971 
-    0.0264726 0.0241813 0.0218244 0.0195349 0.017368 0.0152495 
-    0.013295 0.0115444 0.00996982 0.00857091 0.00733891 0.00627261 
-    0.0053494 0.00456316 0.00388373 0.00331073 0.00282181 0.00240991 
-    0.00206389 0.00177187 0.00152283 0.00131167 0.00112558 0.000954373 
-    0.000805726 0.00069326 0.000600991 0.000525743 0.00047355 
-    0.00044359 0.000434815 0.000436053 0.000402511 0.000368969 
-    0.000335427 0.000301886 0.000268344 0.000234802 0.00020126 
-    0.000184967 0.000169932 0.000154896 0.000139861 0.000124825 
-    0.00010979 9.47546e-05 8.67896e-05 8.24901e-05 7.81906e-05 
-    7.38911e-05 6.95915e-05 6.5292e-05 6.09925e-05 5.66929e-05 
-    5.23934e-05 4.80939e-05 4.37943e-05 3.94948e-05 3.51953e-05 
-    3.08957e-05 2.67968e-05 2.42936e-05 2.17904e-05 1.92872e-05 
-    1.6784e-05 0.00125927 -0.00794344 -0.0305499 -0.0621697 
-    -0.0463796 -0.0224608 -0.00538381 0.00546086 0.0108675 0.012883 
-    0.0131787 0.0127271 0.0119702 0.0110398 0.0100635 0.00649617 
-    0.00489388 0.00545863 0.0098351 0.0167428 0.0126563 0.00697542 
-    0.00427027 0.00330002 0.00390774 0.00408999 -0.00259143 
-    -0.0160578 -0.0451849 -0.0409651 0.1301 0.597429 1.3848 
-    2.63426 3.81272 4.51373 4.8412 4.98731 4.88165 4.37165 3.40034 
-    2.17681 1.12217 0.505129 0.219703 0.104992 0.0622333 0.0448317 
-    0.0355782 0.0311867 0.0293529 0.0274615 0.0288739 0.0307845 
-    0.0304909 0.029245 0.0273602 0.0251006 0.022697 0.0202765 
-    0.0179357 0.0157106 0.0136562 0.0117951 0.0101273 0.00865784 
-    0.00739394 0.00634364 0.00551356 0.00480538 0.00415747 0.00356084 
-    0.00297585 0.00236711 0.00181853 0.00160713 0.00169822 0.00166542 
-    0.00145504 0.00120252 0.00109259 0.000982658 0.00087273 
-    0.000762802 0.000652874 0.000584068 0.000528263 0.000472458 
-    0.000416653 0.000360848 0.000321155 0.000301442 0.000281729 
-    0.000262016 0.000242303 0.00022259 0.000202877 0.000183164 
-    0.000163451 0.000143738 0.000124025 0.000114582 0.000107399 
-    0.000100216 9.30332e-05 8.58502e-05 7.86672e-05 7.14841e-05 
-    6.43011e-05 5.7118e-05 4.9935e-05 4.35378e-05 4.04281e-05 
-    3.73184e-05 3.42088e-05 3.10991e-05 2.79894e-05 2.48798e-05 
-    2.17701e-05 1.86604e-05 
-}
-.graph element create V34 -x x -y v34
-v35 set {
-    7.24585e-12 2.21843e-05 3.20014e-05 1.25076e-05 -2.44947e-05 
-    1.8425e-05 5.50546e-06 3.53025e-05 -1.07551e-05 -3.94383e-06 
-    -2.27848e-06 -9.04789e-05 7.44215e-05 -2.7662e-05 0.000200038 
-    -2.11998e-05 -2.09011e-05 2.37098e-05 2.18751e-05 -2.28422e-05 
-    -6.23659e-05 3.58241e-05 1.76386e-05 -4.28311e-05 0.000355626 
-    0.00156903 0.00100999 -0.0085304 -0.02067 -0.0389485 -0.0651568 
-    -0.128475 -0.314362 -0.406837 -0.421558 -0.421277 -0.418176 
-    -0.414481 -0.410845 -0.407348 -0.403971 -0.400716 -0.397582 
-    -0.394563 -0.391658 -0.388866 -0.386178 -0.383585 -0.381094 
-    -0.378789 -0.376569 -0.37435 -0.372256 -0.370188 -0.36815 
-    -0.366422 -0.364694 -0.362967 -0.361239 -0.359511 -0.357888 
-    -0.356334 -0.354781 -0.353227 -0.351674 -0.350152 -0.348888 
-    -0.347625 -0.346361 -0.345098 -0.343834 -0.342571 -0.341307 
-    -0.340044 -0.33878 -0.337517 -0.336279 -0.335215 -0.334152 
-    -0.333088 -0.332024 -0.330961 -0.329897 -0.328833 -0.32777 
-    -0.326706 -0.325642 -0.324601 -0.323683 -0.322766 -0.321849 
-    -0.320932 -0.320014 -0.319097 -0.31818 -0.317263 -0.316345 
-    -0.315428 -0.314545 -0.313825 -0.313106 -0.312387 -0.311667 
-    -0.310948 -0.310228 -0.309509 -0.308789 -0.30807 -0.307351 
-    -0.306631 -0.305912 -0.305192 -0.304473 -0.303754 -0.303034 
-    -0.302315 -0.301595 -0.300876 -0.300157 -0.299437 -0.298716 
-    -0.29798 -0.297329 -0.296691 -0.295837 -0.29516 -0.294725 
-    -0.294044 -0.292917 -0.292351 -0.291965 -0.291365 -0.290687 
-    -0.290027 -0.289376 -0.288772 -0.288193 -0.287505 -0.286892 
-    -0.28626 -0.285714 -0.284545 -0.289246 -0.298717 -0.298492 
-    -0.214163 0.181451 0.0749974 0.0454707 0.0292987 0.0196837 
-    0.0124119 0.00884715 0.00527181 0.00585821 0.0296361 0.169856 
-    0.361207 0.538856 0.67469 0.685933 0.392802 0.17772 0.0813085 
-    0.0424601 0.0246654 0.0175258 0.0144256 0.0129859 0.012205 
-    0.0112846 0.010933 0.0134813 0.0147254 0.0147981 0.0142156 
-    0.0132732 0.0121355 0.0109587 0.00981238 0.00872731 0.00767007 
-    0.00669346 0.00581341 0.00502167 0.00431819 0.00369842 0.00316168 
-    0.00269663 0.00230035 0.00195801 0.00166928 0.00142286 0.00121522 
-    0.00104072 0.000893384 0.000767675 0.000661268 0.000567659 
-    0.000481766 0.000407101 0.000350044 0.000302721 0.000263424 
-    0.000236813 0.00022199 0.000218182 0.000219548 0.0002027 
-    0.000185853 0.000169006 0.000152158 0.000135311 0.000118463 
-    0.000101616 9.33782e-05 8.57685e-05 7.81588e-05 7.0549e-05 
-    6.29393e-05 5.53296e-05 4.77199e-05 4.36954e-05 4.15296e-05 
-    3.93637e-05 3.71978e-05 3.50319e-05 3.28661e-05 3.07002e-05 
-    2.85343e-05 2.63685e-05 2.42026e-05 2.20367e-05 1.98709e-05 
-    1.7705e-05 1.55391e-05 1.34772e-05 1.22416e-05 1.10061e-05 
-    9.77055e-06 8.535e-06 0.000631271 -0.00362586 -0.0146235 
-    -0.0308486 -0.0237466 -0.0117522 -0.00304171 0.00251033 
-    0.00531986 0.0063897 0.00657351 0.00636494 0.00599705 0.00553442 
-    0.00505994 0.00330925 0.00246671 0.0027006 0.00473161 0.00830333 
-    0.00649147 0.00356815 0.00217448 0.00187579 0.00270447 0.00219543 
-    -0.00546118 -0.0179576 -0.0445306 -0.0649309 0.0197935 0.473629 
-    0.87268 0.269542 0.0086094 0.0844602 0.606456 1.04929 0.906014 
-    0.916205 0.919425 0.872867 0.556244 0.262457 0.11838 0.0571226 
-    0.0333451 0.0237133 0.0185096 0.0159617 0.0148663 0.0138683 
-    0.0144081 0.0153797 0.0152551 0.0146487 0.0137192 0.0125973 
-    0.0113996 0.0101903 0.00901851 0.00790495 0.00687502 0.00593994 
-    0.00510092 0.00436111 0.00372439 0.0031945 0.00277537 0.00241888 
-    0.002095 0.00179943 0.00150419 0.00119264 0.00090934 0.000802394 
-    0.000852816 0.000838368 0.000730842 0.000601028 0.000546616 
-    0.000492205 0.000437793 0.000383381 0.000328969 0.00029454 
-    0.000266428 0.000238317 0.000210205 0.000182093 0.000162091 
-    0.000152145 0.000142198 0.000132252 0.000122306 0.000112359 
-    0.000102413 9.24665e-05 8.25201e-05 7.25738e-05 6.26274e-05 
-    5.78553e-05 5.42216e-05 5.05878e-05 4.69541e-05 4.33204e-05 
-    3.96867e-05 3.60529e-05 3.24192e-05 2.87855e-05 2.51518e-05 
-    2.19153e-05 2.03406e-05 1.8766e-05 1.71913e-05 1.56167e-05 
-    1.4042e-05 1.24674e-05 1.08927e-05 9.31806e-06 
-}
-.graph element create V35 -x x -y v35
-v36 set {
-    5 5.01426 5.02852 5.01923 4.77685 4.56471 4.52338 4.56813 
-    4.63122 4.693 4.74776 4.79385 4.83258 4.86358 4.88918 4.91021 
-    4.90553 4.89733 4.89554 4.91953 5.00757 5.07101 5.06318 
-    5.05241 5.05535 5.08042 5.07251 4.90973 4.56136 3.98637 
-    3.237 2.67216 2.33678 2.13529 2.00544 1.91429 1.84638 1.79461 
-    1.75338 1.71958 1.69175 1.6686 1.64918 1.63258 1.61836 1.60607 
-    1.59506 1.58483 1.57575 1.56847 1.56193 1.55538 1.54968 
-    1.54416 1.5388 1.53523 1.53165 1.52807 1.52449 1.52091 1.51771 
-    1.51477 1.51182 1.50888 1.50593 1.50309 1.50113 1.49917 
-    1.4972 1.49524 1.49328 1.49132 1.48935 1.48739 1.48543 1.48346 
-    1.48157 1.48012 1.47868 1.47724 1.47579 1.47435 1.47291 
-    1.47146 1.47002 1.46857 1.46713 1.46574 1.46462 1.4635 1.46238 
-    1.46126 1.46014 1.45902 1.4579 1.45678 1.45567 1.45455 1.45349 
-    1.45275 1.45201 1.45127 1.45053 1.44979 1.44905 1.44831 
-    1.44757 1.44683 1.44609 1.44535 1.44461 1.44387 1.44313 
-    1.44239 1.44165 1.44091 1.44017 1.43943 1.43869 1.43795 
-    1.43721 1.43874 1.43976 1.43619 1.43182 1.43726 1.43084 
-    1.42587 1.42383 1.42642 1.42728 1.42736 1.4271 1.42669 1.42621 
-    1.42569 1.41703 1.41244 1.41019 1.41199 1.41833 1.42502 
-    1.41504 1.37535 1.28381 1.44779 2.33713 3.25835 3.67554 
-    3.84975 4.01125 4.2253 4.45433 4.62215 4.74478 4.82998 4.8868 
-    4.92396 4.94768 4.96498 4.98537 5.0128 5.04467 5.06722 5.06535 
-    5.01475 4.91956 4.80647 4.7242 4.7059 4.73552 4.76379 4.81684 
-    4.87376 4.92276 4.96112 4.9884 5.0045 5.00999 5.00933 5.00619 
-    5.00384 5.00342 5.00373 5.00362 5.00309 5.00272 5.00239 
-    5.00204 5.00172 5.00146 5.00124 5.00105 5.00089 5.00076 
-    5.00065 5.00057 5.00048 5.00041 5.00034 5.00028 5.00023 
-    5.00019 5.00015 5.00015 5.00016 5.0002 5.00023 5.00021 5.00019 
-    5.00017 5.00015 5.00012 5.0001 5.00008 5.00007 5.00006 5.00005 
-    5.00004 5.00003 5.00002 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 
-    5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 
-    5.00001 5.00001 5.00062 4.99506 4.9835 4.96726 4.9728 4.97877 
-    4.98675 4.9966 5.00406 5.00679 5.00629 5.00561 5.00487 5.00429 
-    5.00384 5.002 5.00164 5.00229 5.00484 5.00769 5.00019 5.00242 
-    5.01319 5.0335 5.07265 5.10129 5.11485 5.12551 5.13953 5.16048 
-    5.18862 5.22811 5.25656 5.25627 5.19975 4.9139 4.24745 3.43732 
-    2.8202 2.43224 2.17409 2.01333 1.93951 1.94622 1.98861 2.02217 
-    2.05383 2.08376 2.11184 2.13793 2.16191 2.18267 2.20502 
-    2.22837 2.24958 2.26901 2.28648 2.302 2.31582 2.32802 2.33869 
-    2.34795 2.35596 2.36282 2.3687 2.37371 2.37797 2.38161 2.38476 
-    2.38743 2.3897 2.39168 2.39329 2.39463 2.39575 2.39671 2.39756 
-    2.39835 2.39907 2.39968 2.39999 2.4003 2.40061 2.40091 2.40122 
-    2.40142 2.40159 2.40176 2.40193 2.4021 2.40222 2.40228 2.40234 
-    2.4024 2.40247 2.40253 2.40259 2.40265 2.40271 2.40277 2.40284 
-    2.40287 2.40289 2.40291 2.40294 2.40296 2.40298 2.40301 
-    2.40303 2.40305 2.40308 2.4031 2.40311 2.40312 2.40313 2.40314 
-    2.40315 2.40316 2.40317 2.40318 
-}
-.graph element create V36 -x x -y v36
-v37 set {
-    5 5.01732 5.03181 5.05944 5.12686 5.20725 5.28103 5.31254 
-    5.32901 5.33709 5.3408 5.34257 5.34311 5.34347 5.34386 5.34411 
-    5.3406 5.33484 5.32942 5.32904 5.33644 5.34869 5.35001 5.34882 
-    5.34758 5.34672 5.34599 5.34496 5.34364 5.34165 5.33712 
-    5.33502 5.3366 5.34067 5.34306 5.34398 5.34434 5.34442 5.34443 
-    5.34443 5.34441 5.34439 5.34437 5.34437 5.34438 5.34438 
-    5.34438 5.34438 5.34438 5.34437 5.34437 5.34436 5.34436 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 
-    5.34437 5.34437 5.34437 5.34437 5.34437 5.35377 5.35451 
-    5.34265 5.34488 5.35861 5.28622 4.90033 4.75027 4.89731 
-    4.97098 4.99293 4.99832 4.99909 4.99956 4.99858 4.99829 
-    4.9998 5.00035 5.0038 5.00989 5.00251 4.99438 4.9953 4.99761 
-    4.99985 5.00152 5.0011 5.00046 4.99996 4.99925 4.99862 4.99919 
-    4.99961 5.00048 5.00234 4.99654 4.98235 4.95936 4.83738 
-    4.53021 4.21004 4.00593 3.91207 3.88059 3.87822 3.89117 
-    3.91278 3.94044 3.97376 4.01152 4.05052 4.10679 4.17908 
-    4.25673 4.33414 4.40875 4.47879 4.54342 4.60258 4.65595 
-    4.70291 4.74414 4.78018 4.81185 4.83915 4.86291 4.88301 
-    4.90048 4.91528 4.92802 4.9387 4.94777 4.95539 4.9618 4.96725 
-    4.97195 4.97588 4.97932 4.98247 4.98512 4.98697 4.98831 
-    4.98919 4.99015 4.99101 4.99169 4.99222 4.99282 4.99341 
-    4.994 4.9946 4.99519 4.99578 4.99638 4.99667 4.99693 4.9972 
-    4.99747 4.99773 4.998 4.99827 4.99841 4.99849 4.99856 4.99864 
-    4.99872 4.9988 4.99888 4.99896 4.99904 4.99911 4.99919 4.99927 
-    4.99935 4.99943 4.9995 4.99955 4.9996 4.99965 4.9997 5.00736 
-    4.98252 4.87516 4.66727 4.49142 4.43103 4.4301 4.4571 4.49729 
-    4.5407 4.5835 4.62363 4.66114 4.69577 4.72738 4.74632 4.75971 
-    4.77576 4.80671 4.87073 4.91665 4.93252 4.94418 4.95331 
-    4.96094 4.96727 4.97148 4.97471 4.97612 4.98276 5.00247 
-    5.04086 5.08628 5.10673 5.08887 5.0564 5.02767 5.01336 4.99685 
-    4.97422 4.90866 4.67035 4.33117 4.07888 3.94432 3.89105 
-    3.88174 3.89292 3.91442 3.94564 3.98708 4.0355 4.09134 4.16315 
-    4.24088 4.31918 4.39527 4.46693 4.53337 4.59405 4.6486 4.69693 
-    4.73938 4.77617 4.80809 4.83551 4.85895 4.87894 4.89596 
-    4.91081 4.92417 4.93651 4.94552 4.95198 4.9565 4.96096 4.96523 
-    4.96972 4.97428 4.97868 4.98064 4.9826 4.98455 4.98651 4.98847 
-    4.98967 4.99064 4.9916 4.99257 4.99353 4.99422 4.99457 4.99493 
-    4.99528 4.99563 4.99598 4.99633 4.99668 4.99703 4.99738 
-    4.99773 4.9979 4.99804 4.99817 4.9983 4.99843 4.99856 4.99869 
-    4.99883 4.99896 4.99909 4.99921 4.99926 4.99931 4.99937 
-    4.99942 4.99948 4.99953 4.99959 4.99964 
-}
-.graph element create V37 -x x -y v37
-v38 set {
-    4.49849 4.53282 4.58329 4.66625 4.83345 4.97823 5.0207 5.01816 
-    5.01116 5.00595 5.00296 5.00148 5.00073 5.00062 5.00033 
-    5.0003 4.99864 4.99661 4.99652 4.99928 5.00361 5.12573 5.17251 
-    5.22612 5.33479 5.44503 5.44432 5.44379 5.44334 5.443 5.44276 
-    5.44258 5.44246 5.44238 5.44232 5.44228 5.44225 5.44223 
-    5.44221 5.4422 5.44219 5.44219 5.44218 5.44218 5.44218 5.44218 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 
-    5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 
-    5.44216 5.44216 5.44216 5.44216 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 
-    5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 
-    5.44214 5.44214 5.44214 5.44214 5.44212 5.45159 5.45236 
-    5.44064 5.44307 5.45616 5.38122 4.77163 3.53297 2.74466 
-    2.34448 2.11802 1.9783 1.88656 1.82001 1.77389 1.72955 1.69632 
-    1.66971 1.6526 1.65236 1.56034 1.53764 1.97139 2.75096 3.39212 
-    3.74042 3.82345 3.85696 3.88547 3.91862 3.9585 4.00467 4.05903 
-    4.1254 4.19533 4.26791 4.34517 4.42112 4.49238 4.55807 4.6179 
-    4.6713 4.71815 4.75889 4.79418 4.82456 4.85062 4.87291 4.89196 
-    4.90823 4.92209 4.93388 4.9439 4.95242 4.95968 4.96585 4.97108 
-    4.9755 4.97923 4.98237 4.98503 4.98732 4.98927 4.99094 4.99233 
-    4.99353 4.99452 4.99538 4.99608 4.99668 4.99718 4.9976 4.99794 
-    4.99822 4.99847 4.99867 4.99884 4.99899 4.99913 4.99924 
-    4.99932 4.99938 4.99943 4.99947 4.99951 4.99953 4.99955 
-    4.99958 4.99961 4.99964 4.99967 4.99969 4.99972 4.99975 
-    4.99977 4.99978 4.99979 4.99981 4.99982 4.99983 4.99985 
-    4.99986 4.99986 4.99987 4.99987 4.99988 4.99988 4.99988 
-    4.99989 4.99989 4.9999 4.9999 4.99991 4.99991 4.99992 4.99992 
-    4.99993 4.99993 4.99993 4.99994 5.00381 5.00064 4.99246 
-    4.99823 5.00349 5.00076 5.00033 5.00015 5.00009 5.00007 
-    5.00005 5.00004 5.00003 5.00002 4.99988 4.99732 4.99728 
-    4.9978 5.00187 5.00927 5.08712 5.07654 4.92855 4.4863 3.76162 
-    3.00049 2.49834 2.20883 2.03492 1.92384 1.84676 1.79021 
-    1.74716 1.7132 1.68576 1.66309 1.64406 1.62785 1.61383 1.60162 
-    1.59081 1.58117 1.57253 1.56473 1.55765 1.55117 1.54527 
-    1.53988 1.53485 1.53012 1.5257 1.5216 1.51773 1.51411 1.51071 
-    1.50746 1.50438 1.50146 1.49868 1.49603 1.4935 1.49109 1.48878 
-    1.48657 1.48445 1.48242 1.48046 1.47858 1.47677 1.47502 
-    1.47333 1.4717 1.47012 1.46859 1.46711 1.46568 1.46428 1.46292 
-    1.4616 1.46034 1.45923 1.45812 1.45701 1.4559 1.45479 1.45378 
-    1.45279 1.45181 1.45082 1.44983 1.44893 1.44813 1.44732 
-    1.44652 1.44571 1.44491 1.4441 1.4433 1.44249 1.44169 1.44089 
-    1.44019 1.43951 1.43883 1.43815 1.43747 1.4368 1.43612 1.43544 
-    1.43476 1.43408 1.43342 1.43283 1.43223 1.43163 1.43104 
-    1.43044 1.42984 1.42924 1.42865 
-}
-.graph element create V38 -x x -y v38
-v39 set {
-    5 5.01048 5.01221 4.98887 4.76261 4.54943 4.51564 4.56249 
-    4.62621 4.68843 4.74374 4.79044 4.82972 4.86127 4.88724 
-    4.90862 4.90791 4.89858 4.89589 4.91767 5.00405 5.16956 
-    5.12391 4.7557 3.87953 3.01124 2.48482 2.20424 2.03812 1.92679 
-    1.84956 1.79256 1.74907 1.71487 1.68724 1.6644 1.64513 1.6287 
-    1.61446 1.60197 1.59095 1.58117 1.57245 1.5646 1.55752 1.55109 
-    1.54516 1.53958 1.53444 1.53008 1.52606 1.52205 1.51843 
-    1.5149 1.51146 1.50893 1.50639 1.50387 1.50133 1.4988 1.49651 
-    1.49436 1.49222 1.49007 1.48793 1.48585 1.48433 1.4828 1.48128 
-    1.47975 1.47823 1.4767 1.47518 1.47365 1.47213 1.4706 1.46912 
-    1.46795 1.46678 1.46561 1.46444 1.46327 1.4621 1.46093 1.45976 
-    1.45859 1.45741 1.45628 1.45534 1.45441 1.45347 1.45254 
-    1.4516 1.45067 1.44973 1.4488 1.44786 1.44693 1.44604 1.44539 
-    1.44475 1.4441 1.44345 1.44281 1.44216 1.44151 1.44086 1.44022 
-    1.43957 1.43892 1.43828 1.43763 1.43698 1.43633 1.43569 
-    1.43504 1.43439 1.43375 1.4331 1.43245 1.4318 1.43157 1.43089 
-    1.43001 1.43042 1.42899 1.42439 1.42216 1.43447 1.44048 
-    1.43705 1.43314 1.43039 1.42861 1.42739 1.42651 1.42548 
-    1.42488 1.4243 1.42392 1.4235 1.32443 1.31149 1.78169 2.64844 
-    3.43211 3.95252 4.20231 4.3746 4.49948 4.58929 4.65742 4.71183 
-    4.77057 4.83196 4.88354 4.92894 4.96625 4.99235 5.00651 
-    5.00941 5.00813 5.00689 5.00588 5.00504 5.00431 5.00368 
-    5.00314 5.00268 5.00228 5.00194 5.00165 5.0014 5.00118 5.001 
-    5.00085 5.00072 5.00061 5.00052 5.00044 5.00037 5.00031 
-    5.00027 5.00022 5.00019 5.00016 5.00013 5.00011 5.00009 
-    5.00008 5.00007 5.00006 5.00005 5.00004 5.00003 5.00003 
-    5.00003 5.00002 5.00002 5.00002 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 
-    5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99998 
-    4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 
-    4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 
-    5.00002 5.00003 5.00004 5.00022 4.99974 4.99942 4.99997 
-    5.00063 5.00002 5.00003 4.99994 4.99998 4.99999 5 5 5 5 
-    5 4.99981 4.99998 5.00004 5.00036 5.00049 5.12012 5.16315 
-    5.19712 5.21835 4.87874 4.10151 3.31555 2.74207 2.38075 
-    2.15872 2.01614 1.91886 1.84852 1.79401 1.75052 1.71508 
-    1.68672 1.66467 1.64602 1.62985 1.61576 1.60343 1.59256 
-    1.58287 1.57418 1.56632 1.55922 1.55282 1.54687 1.54132 
-    1.53618 1.53143 1.52698 1.52282 1.51895 1.51527 1.5118 1.50851 
-    1.5054 1.50244 1.49963 1.49695 1.4944 1.49196 1.48963 1.4874 
-    1.48527 1.48322 1.48124 1.47934 1.47751 1.47574 1.47403 
-    1.47239 1.4708 1.46926 1.46777 1.46632 1.46491 1.46355 1.46237 
-    1.4612 1.46002 1.45884 1.45766 1.45659 1.45555 1.45451 1.45346 
-    1.45242 1.45147 1.45062 1.44978 1.44894 1.44809 1.44725 
-    1.4464 1.44556 1.44472 1.44387 1.44303 1.4423 1.44159 1.44088 
-    1.44017 1.43947 1.43876 1.43805 1.43734 1.43664 1.43593 
-    1.43524 1.43462 1.434 1.43338 1.43276 1.43213 1.43151 1.43089 
-    1.43027 
-}
-.graph element create V39 -x x -y v39
-toplevel .top 
-.graph legend configure -position .top.legend 
-pack .top.legend -fill both -expand yes
-
-button .quit -text "quit" -bg "red" -command "exit"
-blt::table . \
-    .graph 0,0 -fill both  \
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
-
-$graph legend bind all <ButtonRelease-1> { HighlightTrace %W }
-$graph legend bind all <ButtonRelease-3> { 
-    %W legend deactivate *
-    eval %W element deactivate [%W element activate]
-}
-
-proc HighlightTrace { graph } {
-    set entry [$graph legend get current]
-    set active [$graph legend activate]
-    if { [lsearch $active $entry] < 0 } {
-	$graph legend activate $entry
-	$graph element activate $entry
-    } else {
-        $graph legend deactivate $entry
-	$graph element deactivate $entry
-    }
-}
-
-set lastRow 0
-set logicPlots {}
-set leftMargin 0
-set rightMargin 0
-
-proc LogicPlot { from graph signal args } {
-    if { ![winfo exists $graph] } {
-	global rightMargin leftMargin
-	graph $graph -title "" -topmargin 1 -bottommargin 1 -height 0.75i \
-	    -plotpadx 4 -plotpady 8 -bd 0 \
-		-leftmargin $leftMargin -rightmargin $rightMargin
-	$graph grid off
-	set xMin [$from axis cget x -min]
-	set xMax [$from axis cget x -max]
-	set yLim [$from axis limits y]
-	set yMin [lindex $yLim 0]
-	set yMax [lindex $yLim 1]
-	$graph axis configure x -title "" -hide yes -min $xMin -max $xMax
-	$graph axis configure y -title $signal -min $yMin -max $yMax
-	$graph legend configure -anchor nw
-	global lastRow
-	incr lastRow
-	blt::table . $graph $lastRow,0 -fill both
-	global logicPlots
-	lappend logicPlots $graph
-    }
-    set list [linsert $args 0 $signal ]
-    foreach i [$graph element names] {
-	if { [lsearch $list $i] < 0 } {
-	    $graph element delete $i
-	}
-    }
-    foreach i $list { 
-	if { ![$graph element exists $i] } {
-	    $graph element create $i
-	}
-	set pen [$from element cget $i -pen]
-	set xData [$from element cget $i -x]
-	set yData [$from element cget $i -y]
-	$graph element configure $i -x $xData -y $yData -pen $pen
-    }
-}
-
-set changePending "no"
-proc EventuallyChangePlots { p1 p2 how } {
-    global changePending
-    if { $changePending == "no" } {
-        after idle ChangePlots
-    }
-    set changePending "yes"
-}
-
-proc ChangePlots { } {
-    global changePending
-    global logicPlots
-    global leftMargin rightMargin
-    set from .graph
-    set xMin [$from axis cget x -min]
-    set xMax [$from axis cget x -max]
-    set yLim [$from axis limits y]
-    set yMin [lindex $yLim 0]
-    set yMax [lindex $yLim 1]
-    foreach g ".graph .g2 .g3" {
-	$g configure -leftmargin $leftMargin -rightmargin $rightMargin
-	$g axis configure x -min $xMin -max $xMax
-	#$g axis configure y -min $yMin -max $yMax
-    }
-    set changePending "no"
-}
-
-#LogicPlot .graph .g1 V1 
-#LogicPlot .graph .g2 V5
-#LogicPlot .graph .g3 V9 
-# LogicPlot .graph .g4 V13
-# LogicPlot .graph .g5 V17
-# LogicPlot .graph .g6 V22
-# LogicPlot .graph .g7 V26
-
-#.g1 configure -leftvariable leftMargin -rightvariable rightMargin 
-trace variable leftMargin w EventuallyChangePlots
-trace variable rightMargin w EventuallyChangePlots
-
diff --git a/blt3.0/demos/graph7.tcl b/blt3.0/demos/graph7.tcl
deleted file mode 100755
index 756f5c7..0000000
--- a/blt3.0/demos/graph7.tcl
+++ /dev/null
@@ -1,78 +0,0 @@
-#!../src/bltwish
-
-
-set blt_library ../library
-package require BLT
-set blt_library ../library
-set auto_path [linsert $auto_path 0 ../library]
-source scripts/demo.tcl
-
-image create picture bgTexture -file ./images/buckskin.gif
-
-option add *Graph.Tile			bgTexture
-option add *Label.Tile			bgTexture
-option add *Frame.Tile			bgTexture
-option add *Htext.Tile			bgTexture
-option add *TileOffset			0
-option add *HighlightThickness		0
-option add *Element.ScaleSymbols	no
-option add *Element.Smooth		linear
-option add *activeLine.Color		yellow4
-option add *activeLine.Fill		yellow
-option add *activeLine.LineWidth	0
-option add *Element.Pixels		3
-option add *Graph.halo			7i
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" } {
-    option add *print.background yellow
-    option add *quit.background red
-}
-
-proc FormatLabel { w value } {
-    return $value
-}
-
-set graph .graph
-
-set s1 [image create picture -width 25 -height 25]
-$s1 blank 0x00000000
-$s1 draw circle 12 12 5 -shadow 0 -linewidth 1 \
-	-fill 0x90FF0000 -antialias yes 
-
-set length 2500000
-blt::graph $graph -title "Scatter Plot\n$length points"  -font Arial \
-    -plotborderwidth 1 -plotrelief solid  -plotpadx 0 -plotpady 0
-$graph xaxis configure \
-    -loose no \
-    -title "X Axis Label" 
-$graph yaxis configure \
-    -title "Y Axis Label" 
-$graph y2axis configure \
-    -title "Y2 Axis Label"  
-$graph legend configure \
-    -activerelief sunken \
-    -background ""
-
-$graph element create line3 -symbol circle -color green4 -fill green2 \
-    -linewidth 0 -outlinewidth 1 -pixels 4
-blt::table . .graph 0,0  -fill both
-update
-
-blt::vector x($length) y($length)
-x expr random(x)
-y expr random(y)
-x sort y
-$graph element configure line3 -x x -y y
-
-wm min . 0 0
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-
-blt::busy hold $graph
-update
-blt::busy release $graph
-
diff --git a/blt3.0/demos/hierbox1.tcl b/blt3.0/demos/hierbox1.tcl
deleted file mode 100755
index 28f0070..0000000
--- a/blt3.0/demos/hierbox1.tcl
+++ /dev/null
@@ -1,98 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-#source scripts/demo.tcl
-
-set saved [pwd]
-
-#blt::bltdebug 100
-
-set imagedir images
-image create picture bgTexture -file $imagedir/rain.gif
-
-set imageList {}
-foreach f [glob $imagedir/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-#option add *TreeView.Tile	bgTexture
-option add *TreeView.ScrollTile  yes
-
-option add *xTreeview.openCommand	{
-    set path /home/gah/src/blt/%P
-    if { [file isdirectory $path] } {
-	cd $path
-	set files [glob -nocomplain * */. ]
-	if { $files != "" } {
-	    eval %W insert -at %n end $files
-	}
-    }
-}
-
-option add *xTreeView.closeCommand {
-    eval %W delete %n 0 end
-}
-
-blt::treeview .h  \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set } 
-
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-
-blt::table configure . c1 r1 -resize none
-
-proc DoFind { entry } {
-    global fileList
-    lappend fileList $entry
-    #puts "$entry"
-    if { [file type $entry] == "directory" } { 
-	foreach f [lsort [glob -nocomplain $entry/*]] {
-	    DoFind $f
-	} 
-    }
-}
-
-proc Find { dir } {
-    global fileList
-    set fileList {}
-    DoFind $dir 
-    return $fileList
-}
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-set top [GetAbsolutePath .]
-set trim "$top"
-
-.h configure -separator "/" -autocreate yes  -trim $trim
-
-.h entry configure root -label "$top"
-.h configure -bg grey90
-update
-
-set fileList [Find $top]
-eval .h insert end $fileList
-.h configure -bg white -alternatebackground grey95
-
-# %n => %#
-# no -activebackground
-# no -image 
-
-focus .h
-
-# -labelcolor == -foreground
-set nodes [.h find -glob -name *.c]
-eval .h entry configure $nodes -foreground red 
-
-cd $saved
-
diff --git a/blt3.0/demos/hierbox2.tcl b/blt3.0/demos/hierbox2.tcl
deleted file mode 100755
index bc0648f..0000000
--- a/blt3.0/demos/hierbox2.tcl
+++ /dev/null
@@ -1,77 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc AddDirEntries { w dir } {
-    if { [file isdirectory $dir] } {
-	set files [glob -nocomplain $dir/*] 
-	eval $w insert end [lsort $files]
-	set subdirs [glob -nocomplain $dir/*/]
-	eval $w entry configure [lsort $subdirs] -button yes
-    }
-}
-
-set imageList {}
-foreach f [glob ./images/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-set top ../
-
-#option add *Hierbox.Tile	bgTexture
-option add *Hierbox.TileOffset  yes
-
-option add *forceGadgets	no
-option add *Hierbox.openCommand	{ 
-    AddDirEntries %W "$top/%P"
-}
-option add *Hierbox.closeCommand {
-    eval %W delete %n 0 end
-}
-
-image create picture openFolder -file images/open.gif
-image create picture closeFolder -file images/close.gif
-
-option add *Hierbox.icons "closeFolder openFolder"
-
-#option add *Hierbox.Button.activeForeground red
-#option add *Hierbox.bindTags "Label all"
-
-hierbox .h  \
-    -selectmode multiple \
-    -hideroot yes \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set }
-
-.h button configure -activebackground grey92
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-button .test -text Test -command {
-    set index [.h curselection]
-    set names [eval .h get -full $index]
-    puts "selected names are $names"
-}
-
-button .quit -text Quit -command { exit 0 }
-
-blt::table . \
-    0,0 .h  -fill both \
-    2,0 .quit \
-    0,1 .vs -fill y 1,0 .hs -fill x \
-    3,0 .test
-
-blt::table configure . c1 r1 r2 r3 -resize none
-
-.h configure -separator "/" -trim $top \
-    -allowduplicates no 
-
-#.h entry configure 0 -label [file tail $top] 
-
-AddDirEntries .h $top
-focus .h
-set nodes [.h find -glob -name *.c]
-eval .h entry configure $nodes -labelcolor red 
-
-wm protocol . WM_DELETE_WINDOW { destroy . }
-#blt::bltdebug 100
\ No newline at end of file
diff --git a/blt3.0/demos/hierbox3.tcl b/blt3.0/demos/hierbox3.tcl
deleted file mode 100755
index f1826d5..0000000
--- a/blt3.0/demos/hierbox3.tcl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc AddDirEntries { w dir } {
-    if { [file isdirectory $dir] } {
-	set files [glob -nocomplain $dir/*] 
-	eval $w insert end [lsort $files]
-	set subdirs [glob -nocomplain $dir/*/]
-	eval $w entry configure [lsort $subdirs] -button yes
-    }
-}
-
-set imageList {}
-foreach f [glob ./images/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-image create picture openFolder -file images/open.gif
-image create picture closeFolder -file images/close.gif
-option add *Hierbox.icons "closeFolder openFolder"
-
-#option add *Hierbox.openCommand { AddDirEntries %W "$top/%P" }
-#option add *Hierbox.closeCommand { eval %W delete %n 0 end }
-
-hierbox .h  \
-    -allowduplicates no \
-    -hideroot yes \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set }
-
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-button .test -text Test -command {
-    set index [.h curselection]
-    set names [eval .h get -full $index]
-    puts "selected names are $names"
-}
-
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x \
-
-blt::table configure . c1 r1 r2 -resize none
-
-set top ../
-.h configure -separator "/" -trim $top -autocreate yes  
-#.h entry configure 0 -label [file tail $top] 
-
-catch { exec du $top } files
-foreach f [split $files \n ] {
-    .h insert end [lindex $f 1] -text [lindex $f 0] -button auto
-}
-
-focus .h
diff --git a/blt3.0/demos/hierbox4.tcl b/blt3.0/demos/hierbox4.tcl
deleted file mode 100755
index e714e8a..0000000
--- a/blt3.0/demos/hierbox4.tcl
+++ /dev/null
@@ -1,55 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc AddDirEntries { w dir } {
-    if { [file isdirectory $dir] } {
-	set files [glob -nocomplain $dir/*] 
-	eval $w insert end [lsort $files]
-	set subdirs [glob -nocomplain $dir/*/]
-	eval $w entry configure [lsort $subdirs] -gadget yes
-    }
-}
-
-#blt::bltdebug 100
-
-image create picture openFolder -file images/open.gif
-image create picture closeFolder -file images/close.gif
-
-option add *Hierbox.icons "closeFolder openFolder"
-
-option add *Hierbox.cursor crosshair
-option add *Hierbox.Button.Relief solid
-option add *Hierbox.Button.ActiveBackground white
-option add *Hierbox.Button.Background white
-
-hierbox .h  \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set } \
-    -activebackground lightskyblue1 \
-    -selectbackground lightskyblue2
-
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-button .test -text Test -command {
-    set index [.h curselection]
-    set names [eval .h get -full $index]
-    puts "selected names are $names"
-}
-
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x \
-    2,0 .test 
-
-blt::table configure . c1 r1 -resize none
-
-.h configure -autocreate yes  -font { Helvetica 34 }
-focus .h
-.h insert end { The Quick Brown Fox Jumped Over the }
-.h entry configure root -label {[Root]}
-.h insert end { The\nQuick\nBrown\nFox\nJumped\nOver\nthe }
-
-.h configure -focusedit yes
diff --git a/blt3.0/demos/hiertable1.tcl b/blt3.0/demos/hiertable1.tcl
deleted file mode 100755
index 299e204..0000000
--- a/blt3.0/demos/hiertable1.tcl
+++ /dev/null
@@ -1,212 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set saved [pwd]
-
-#blt::bltdebug 100
-
-image create picture bgTexture -file ./images/rain.gif
-
-set imageList {}
-foreach f [glob ./images/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-#option add *Hiertable.Tile	bgTexture
-#option add *Hiertable.Column.background grey90
-option add *Hiertable.ScrollTile  yes
-option add *Hiertable.titleShadow { grey80 }
-option add *Hiertable.titleFont {*-helvetica-bold-r-*-*-11-*-*-*-*-*-*-*}
-
-option add *xHiertable.openCommand	{
-    set path /home/gah/src/blt/%P
-    if { [file isdirectory $path] } {
-	cd $path
-	set files [glob -nocomplain * */. ]
-	if { $files != "" } {
-	    eval %W insert -at %n end $files
-	}
-    }
-}
-
-option add *xHiertable.closeCommand {
-    eval %W delete %n 0 end
-}
-
-hiertable .h  -hideroot no -width 0 \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set }  \
-    -selectmode single -hideleaves false
-    
-
-.h column configure treeView -text View
-.h column insert 0 mtime atime gid 
-.h column insert end nlink mode type ctime uid ino size dev
-.h column configure uid -background \#eaeaff -relief raised -bd 1
-.h column configure mtime -hide no -bg \#ffeaea -relief raised -bd 1
-.h column configure size gid nlink uid ino dev -justify right -edit yes
-.h column configure treeView -hide no -edit no
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-blt::table configure . c1 r1 -resize none
-image create picture fileImage -file images/stopsign.gif
-proc DoFind { dir path } {
-    global fileList count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [lsort [glob -nocomplain *]] {
-	set entry [file join $path $f]
-	if { [catch { file stat $entry info }] != 0 } {
-	    lappend fileList $entry 
-	} else {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) @fileImage
-	    } else {
-		set info(type) ""
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [FormatMode $info(mode)]
-	    lappend fileList $entry -data [array get info]
-	}
-	incr count
-	if { [file type $f] == "directory" } {
-	    DoFind $f $entry
-	}
-    }
-    cd $saved
-}
-
-proc Find { dir } {
-    global fileList count
-    set fileList {}
-    catch { file stat $dir info }
-    incr count
-    lappend fileList $dir -data [array get info]
-    DoFind $dir $dir
-    return $fileList
-}
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-set top [GetAbsolutePath ..]
-set trim "$top"
-
-.h configure -separator "/" -trim $trim
-
-set count 0
-.h entry configure root -label [file tail [GetAbsolutePath $top]] 
-.h configure -bg grey90
-regsub -all {\.\./*} [Find $top] {} fileList
-puts "$count entries"
-eval .h insert end $fileList
-.h configure -bg white
-
-focus .h
-
-set nodes [.h find -glob -name *.c]
-eval .h entry configure $nodes -foreground green4
-set nodes [.h find -glob -name *.h]
-eval .h entry configure $nodes -foreground cyan4
-set nodes [.h find -glob -name *.o]
-eval .h entry configure $nodes -foreground red4
-
-cd $saved
-#bltdebug 100
-
-toplevel .top
-blt::hiertable .top.h2 -tree .h -yscrollcommand { .top.sbar set }
-scrollbar .top.sbar -command { .top.h2 yview }
-pack .top.h2 -side left -expand yes -fill both
-pack .top.sbar -side right -fill y
-
-.h column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-proc SortColumn { column } {
-    set old [.h sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.h sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .h sort configure -decreasing $decreasing -column $column -mode integer
-    .h configure -flat yes
-    .h sort auto yes
-
-    blt::busy hold .h
-    update
-    blt::busy release .h
-}
-
-foreach column [.h column names] {
-    .h column configure $column -command [list SortColumn $column]
-}
-
-scale .s -from 0 -to 300 -orient horizontal -length 300
-blt::table . \
-    3,0 .s
-update
-.s set 20
-if 1 {
-    .s configure -command { .h entry configure 0 -height }
-}
-
diff --git a/blt3.0/demos/hiertable2.tcl b/blt3.0/demos/hiertable2.tcl
deleted file mode 100755
index 0182d35..0000000
--- a/blt3.0/demos/hiertable2.tcl
+++ /dev/null
@@ -1,196 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set saved [pwd]
-
-#blt::bltdebug 100
-
-image create picture bgTexture -file ./images/rain.gif
-
-set imageList {}
-foreach f [glob ./images/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-#option add *Hiertable.Tile	bgTexture
-option add *Hiertable.ScrollTile  yes
-#option add *Hiertable.Column.background grey90
-option add *Hiertable.titleShadow { grey80 }
-option add *Hiertable.titleFont {*-helvetica-bold-r-*-*-11-*-*-*-*-*-*-*}
-
-option add *xHiertable.openCommand	{
-    set path /home/gah/src/blt/%P
-    if { [file isdirectory $path] } {
-	cd $path
-	set files [glob -nocomplain * */. ]
-	if { $files != "" } {
-	    eval %W insert -at %n end $files
-	}
-    }
-}
-
-option add *xHiertable.closeCommand {
-    eval %W delete %n 0 end
-}
-
-hiertable .h  -width 0\
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set }  \
-    -selectmode multiple 
-
-
-.h column configure treeView -text "View"
-.h column insert 0 mtime atime gid 
-.h column insert end nlink mode type ctime uid ino size dev
-.h column configure uid -background \#eaeaff 
-.h column configure mtime -hide no -bg \#ffeaea 
-.h column configure size gid nlink uid ino dev -justify right
-.h column configure treeView -hide no -edit no
-
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-blt::table configure . c1 r1 -resize none
-image create picture fileImage -file images/stopsign.gif
-proc DoFind { dir path } {
-    global fileList count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [lsort [glob -nocomplain *]] {
-	set entry [file join $path $f]
-	if { [catch { file stat $entry info }] != 0 } {
-	    lappend fileList $entry 
-	} else {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) @fileImage
-	    } else {
-		set info(type) ""
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [FormatMode $info(mode)]
-	    lappend fileList $entry -data [array get info]
-	}
-	incr count
-	if { [file isdirectory $f] } {
-	    DoFind $f $entry
-	}
-    }
-    cd $saved
-}
-
-proc Find { dir } {
-    global fileList count
-    set fileList {}
-    catch { file stat $dir info }
-    incr count
-    lappend fileList $dir -data [array get info]
-    DoFind $dir $dir
-    return $fileList
-}
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-set top [GetAbsolutePath ..]
-set trim "$top"
-
-.h configure -separator "/" -trim $trim 
-
-set count 0
-#.h entry configure root -label [file tail [GetAbsolutePath $top]] 
-.h configure -bg grey90
-regsub -all {\.\./*} [Find $top] {} fileList
-puts "$count entries"
-eval .h insert end $fileList
-.h configure -bg white
-
-focus .h
-
-set nodes [.h find -glob -name *.c]
-eval .h entry configure $nodes -foreground green4
-set nodes [.h find -glob -name *.h]
-eval .h entry configure $nodes -foreground cyan4
-set nodes [.h find -glob -name *.o]
-eval .h entry configure $nodes -foreground red4
-
-cd $saved
-#bltdebug 100
-
-.h column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-proc SortColumn { column } {
-    set old [.h sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.h sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .h sort configure -decreasing $decreasing -column $column 
-    .h configure -flat yes
-    .h sort auto yes
-    blt::busy hold .h
-    update
-    blt::busy release .h
-}
-
-foreach column [.h column names] {
-    .h column configure $column -command [list SortColumn $column]
-}
diff --git a/blt3.0/demos/hiertable3.tcl b/blt3.0/demos/hiertable3.tcl
deleted file mode 100755
index 556a78a..0000000
--- a/blt3.0/demos/hiertable3.tcl
+++ /dev/null
@@ -1,175 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set saved [pwd]
-
-#blt::bltdebug 100
-
-image create picture bgTexture -file ./images/rain.gif
-
-set imageList {}
-foreach f [glob ./images/mini-*.gif] {
-    lappend imageList [image create picture -file $f]
-}
-
-#option add *Hiertable.Tile	bgTexture
-option add *Hiertable.ScrollTile  yes
-#option add *Hiertable.Column.background grey90
-option add *Hiertable.titleShadow { grey80 }
-option add *Hiertable.titleFont {*-helvetica-bold-r-*-*-11-*-*-*-*-*-*-*}
-
-hiertable .h  -width 0\
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set }  \
-    -selectmode multiple \
-    -hideroot yes 
-
-#.h configure -icons "" -activeicons ""
-
-.h column configure treeView -text "View"
-.h column insert 0 mtime atime gid 
-.h column insert end nlink mode type ctime uid ino size dev 
-.h column configure uid -background \#eaeaff -style text 
-.h column configure mtime -hide no -bg \#ffeaea -style text 
-.h column configure size gid nlink uid ino dev -justify right -style text
-.h column configure treeView -hide no -edit no -style text 
-
-scrollbar .vs -orient vertical -command { .h yview }
-scrollbar .hs -orient horizontal -command { .h xview }
-blt::table . \
-    0,0 .h  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-blt::table configure . c1 r1 -resize none
-image create picture fileImage -file images/stopsign.gif
-
-proc DoFind { dir parent } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [lsort [glob -nocomplain *]] {
-	set node [tree0 insert $parent -label $f]
-	if { [catch { file stat $f info }] == 0 } {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) @fileImage
-	    } else {
-		set info(type) ""
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [FormatMode $info(mode)]
-	    eval tree0 set $node [array get info]
-	}
-	incr count
-	if { [file isdirectory $f] } {
-	    DoFind $f $node
-	}
-    }
-    cd $saved
-}
-
-proc Find { dir } {
-    global count
-    set count 0
-    catch { file stat $dir info }
-    incr count
-    tree create tree0
-    tree0 label root [file tail $dir]
-    eval tree0 set root [array get info]
-    DoFind $dir root
-    puts "$count entries"
-}
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-set top [GetAbsolutePath ..]
-Find $top
-
-focus .h
-
-.h configure -tree tree0 -separator /
-
-set nodes [.h find -glob -name *.c]
-eval .h entry configure $nodes -foreground green4
-set nodes [.h find -glob -name *.h]
-eval .h entry configure $nodes -foreground cyan4
-set nodes [.h find -glob -name *.o]
-eval .h entry configure $nodes -foreground red4 
-
-cd $saved
-
-.h column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-proc SortColumn { column } {
-    set old [.h sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.h sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .h sort configure -decreasing $decreasing -column $column 
-    .h configure -flat yes
-    .h sort auto yes
-    blt::busy hold .h
-    update
-    blt::busy release .h
-}
-
-foreach column [.h column names] {
-    .h column configure $column -command [list SortColumn $column]
-}
diff --git a/blt3.0/demos/htext.txt b/blt3.0/demos/htext.txt
deleted file mode 100644
index b03db51..0000000
--- a/blt3.0/demos/htext.txt
+++ /dev/null
@@ -1,615 +0,0 @@
-
-        This is a (for lack of a better name) hypertext widget.
-
-This widget combines text and other Tk widgets in the same window.
-It is sort of a cross between a read-only text widget and the pack command.
-Any widget can be attached to the hypertext window by the %% 
-set this $htext(widget)
-blt::tile::label $this.lab -text "append " -relief sunken \
-        -font *-Courier-Bold-R-Normal-*-12-120-*
-$this append $this.lab 
-%% command.
-For example,
-%% message $this.msg -relief sunken -bd 2 -aspect 10000 -font \
- *-Courier-Medium-R-Normal-*-12-* -text {set w $htext(widget)
-blt::tile::label $w.face -bitmap @bitmaps/face.xbm \ 
-  -relief sunken -borderwidth 2
-$w append $w.face -padx 2 -pady 0.25i}
-$this append $this.msg \
-        -fill both %% added this %%
-global tk_library
-blt::tile::label $this.face \
-        -bitmap @bitmaps/face.xbm  \
-        -relief sunken -borderwidth 2
-$this append $this.face -padx 2 -pady 0.25i 
-%%.
-There can be many types of widgets in the same document.  For example,
-this is a simple %% 
-blt::tile::button $this.but -bg pink -text { button } \
-  -command { puts stderr { a stupid message } } 
-$this append $this.but 
-%%. If you click on the button, it prints a stupid message.
-Any Tk widget can be used, including %%
-set whichTile 0
-proc ChangeTile { w } {
-   global whichTile
-
-   if { $whichTile } {
-        $w configure -bg $bg2
-   } else {
-	$w configure -bg $bg1
-   }
-}
-blt::tile::checkbutton $this.ckbut -bg lightblue -text { check buttons } \
-   -variable whichTile -command "ChangeTile $this" 
-$this append $this.ckbut -justify top
-%%, %%
-blt::tile::radiobutton $this.rdbut -bg mediumseagreen -text { radio buttons } \
-        -command { puts stderr { radio button pressed } } 
-$this append $this.rdbut -justify bottom
-%%, 
-and scales %%
-# -sliderforeground
-scale $this.sc -showvalue true \
-        -length 100 \
-        -foreground powderblue \
-        -sliderlength 10 \
-        -orient horizontal  
-$this append $this.sc
-%%.
-
-        Widget trees can be also be included. The following example is
-*borrowed* from the widget demo. It is a couple of frames surrounding a
-listbox, a message, and a button widget.
-%%
-    set w $this.frame 
-    frame $w 
-    message $w.msg -font *times-medium-r-normal--*-12-120-* -aspect 300 \
-            -text "A listbox containing the 50 states is displayed below, along with a scrollbar.  You can scan the list either using the scrollbar or by dragging in the listbox window with button 3 pressed.  Click the \"OK\" button when you've seen enough." -bg lightsteelblue -relief sunken
-    frame $w.frame -borderwidth 10 
-    pack append $w.frame \
-        [scrollbar $w.frame.scroll -relief sunken \
-            -command "$w.frame.list yview"] {right expand filly frame w} \
-        [listbox $w.frame.list -yscroll "$w.frame.scroll set" -relief sunken] \
-            {left expand filly frame e}
-    $w.frame.list insert 0 Alabama Alaska Arizona Arkansas California \
-        Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois \
-        Indiana Iowa Kansas Kentucky Louisiana Maine Maryland \
-        Massachusetts Michigan Minnesota Mississippi Missouri \
-        Montana Nebraska Nevada "New Hampshire" "New Jersey" "New Mexico" \
-        "New York" "North Carolina" "North Dakota" \
-        Ohio Oklahoma Oregon Pennsylvania "Rhode Island" \
-        "South Carolina" "South Dakota" \
-        Tennessee Texas Utah Vermont Virginia Washington \
-        "West Virginia" Wisconsin Wyoming
-    button $w.ok -text OK -command "puts stderr $w; destroy $w"
-
-    pack append $w $w.msg {top fill} $w.frame {top expand fill} \
-        $w.ok {bottom fill}
-    $w config -bg lightsteelblue -relief sunken
-
-$this append $w -pady 0.25i
-%%
-
-You can add you own home-grown widgets.  Here's the graph widget.
-Beside it is the "color" demo.  Moving the scales, adjusts the background
-color of the graph.
-%%
-#
-# Simple script to change colors of a window.
-#
-global xlabel ylabel red green blue graph
-set red 255
-set green 215
-set blue 0
-
-option add *Scale.sliderForeground "#cdb79e"
-option add *Scale.activeForeground "#ffe4c4"
-set w $this.colorFrame
-frame $w
-scale $w.red -command "color red" -label "Red Intensity" \
-        -from 0 -to 255 -orient horizontal -bg "#ffaeb9" -length 250
-scale $w.green -command "color green" -label "Green Intensity" \
-        -from 0 -to 255 -orient horizontal -bg "#43cd80"
-scale $w.blue -command "color blue" -label "Blue Intensity"  \
-        -from 0 -to 255 -orient horizontal -bg "#7ec0ee"
-
-$w.blue set $blue
-$w.green set $green
-$w.red set $red
-
-pack append $w $w.red {top expand fill}
-pack append $w $w.green {top expand fill}
-pack append $w $w.blue {top expand fill}
-
-proc color {which intensity} {
-    global red green blue graph xlabel ylabel
-    set $which $intensity
-    set rgb [format #%02x%02x%02x $red $green $blue]
-    $graph config -bg $rgb
-    $xlabel config -bg $rgb
-    $ylabel config -bg $rgb
-}
-
-$this append $w 
-
-%% 
-%%
-proc makeplot { widget } {
-
-    blt::graph $widget
-    set X { 
-        2.00000e-01 4.00000e-01 6.00000e-01 8.00000e-01 1.00000e+00 
-        1.20000e+00 1.40000e+00 1.60000e+00 1.80000e+00 2.00000e+00 
-        2.20000e+00 2.40000e+00 2.60000e+00 2.80000e+00 3.00000e+00 
-        3.20000e+00 3.40000e+00 3.60000e+00 3.80000e+00 4.00000e+00 
-        4.20000e+00 4.40000e+00 4.60000e+00 4.80000e+00 5.00000e+00 
-    } 
-
-    $widget element create Y1 -x $X -y { 
-        1.14471e+01 2.09373e+01 2.84608e+01 3.40080e+01 3.75691e+01 
-        3.91345e+01 3.92706e+01 3.93474e+01 3.94242e+01 3.95010e+01 
-        3.95778e+01 3.96545e+01 3.97313e+01 3.98081e+01 3.98849e+01 
-        3.99617e+01 4.00384e+01 4.01152e+01 4.01920e+01 4.02688e+01 
-        4.03455e+01 4.04223e+01 4.04990e+01 4.05758e+01 4.06526e+01 
-    } -symbol circle -label VGS=2.0 -color blue4 -fill blue
-
-    $widget element create Y2 -x $X -y { 
-        2.61825e+01 5.04696e+01 7.28517e+01 9.33192e+01 1.11863e+02 
-        1.28473e+02 1.43140e+02 1.55854e+02 1.66606e+02 1.75386e+02 
-        1.82185e+02 1.86994e+02 1.89802e+02 1.90683e+02 1.91047e+02 
-        1.91411e+02 1.91775e+02 1.92139e+02 1.92503e+02 1.92867e+02 
-        1.93231e+02 1.93595e+02 1.93958e+02 1.94322e+02 1.94686e+02 
-    } -symbol diamond -label VGS=3.5 -color green4 -fill green
-
-    $widget element create Y3 -x $X -y { 
-        4.07008e+01 7.95658e+01 1.16585e+02 1.51750e+02 1.85051e+02 
-        2.16479e+02 2.46024e+02 2.73676e+02 2.99427e+02 3.23267e+02 
-        3.45187e+02 3.65177e+02 3.83228e+02 3.99331e+02 4.13476e+02 
-        4.25655e+02 4.35856e+02 4.44073e+02 4.50294e+02 4.54512e+02 
-        4.56716e+02 4.57596e+02 4.58448e+02 4.59299e+02 4.60151e+02 
-   } -symbol triangle -label VGS=5.0 -color red4 -fill red
-
-}
-
-option add *graph.title  "Plot Title" 
-option add *graph.xTitle "X Axis Label"
-option add *graph.yTitle "Y Axis Label" 
-#option add *graph.legendMapped false 
-option add *graph.elemPixels 8
-option add *graph.relief ridge
-option add *graph.borderWidth 2
-
-set graph $this.graph
-set xlabel $this.xlab
-set ylabel $this.ylab
-makeplot $graph
-$this append $graph -padx 0.25i -pady 0.25i 
-
-%%
-If you click on any button in the graph, you will get the coordinate 
-values at the pointer location.  
-
-The current coordinate values are %%
-label $xlabel -text { ??? ??? } -relief sunken
-label $ylabel -text { ??? ??? } -relief sunken
-bind $graph <ButtonPress> {labelxy [ %W invtransform %x %y ]}
-
-proc labelxy { values } {
-    global xlabel ylabel
-    scan $values "%e %e" x y
-    $xlabel config -text $x
-    $ylabel config -text $y
-}
-$this append $this.xlab -width 100 -fill x
-%% and %%
-$this append $this.ylab -width 100 -fill x
-%%.
-
-
-There are four global variables automatically created when a hypertext
-file is read. They are:
-
-%% 
-button $this.l1 -text " \$htext(widget) " \
-	-command "puts $this" -bg orange
-$this append $this.l1 -width 200 -pady 4
-%%the pathname of the hypertext widget. 
-%% 
-button $this.l2 -text " \$htext(file) " \
-	-command "puts $htext(file)" -bg orange
-$this append $this.l2 -width 200 -pady 4
-%%the file being read.
-%% 
-button $this.l3 -text " \$htext(line) "  \
-	-command "puts $htext(line)" -bg orange
-$this append $this.l3 -width 200 -pady 4
-%%the current line number.
-%% 
-button $this.l4 -text " \$htext(index) " \
-	-command "puts $htext(index)" -bg orange
-$this append $this.l4 -width 200 -pady 4
-%%the current index in the text.
-
-Click on any button and the current value is printed on standard output.
-
-The hypertext widget works with plain text too. If you don't want
-to read it, click on the %% 
-button $this.goto -text button -fg purple -bg white \
-        -command "global endOfText; $this gotoline \$endOfText"
-$this append $this.goto
-%% to jump to the end of the plain text.
-
-         ------------------------------------------------------
-
-[This is a pre-release version of BLT.  It's basically the latest
-
-snapshot of BLT, as it moves towards a full release.  What this means
-is that the documentation and demos still need work.  Let me know
-about any configuration/compiler/installation goofs so I make sure
-they're fixed for the next release.]
-
-This is version 2.4 of the BLT library.  It's an extension to the
-Tcl/Tk toolkit.  You simply compile and link with the Tcl/Tk
-libraries. It does not require the Tcl or Tk source files.
-
-BLT is available from 
-
-    ftp.tcltk.com 
-
-in the "pub/blt" directory. The URL is 
-
-    ftp://ftp.tcltk.com/pub/blt/BLT2.4.tar.gz
-
-This release has been compiled and tested with versions:
-
-        Tcl 7.5 / Tk 4.1
-        Tcl 7.6 / Tk 4.2
-        Tcl/Tk 8.0
-        Tcl/Tk 8.1a2
-
-What is BLT? 
-
-  BLT is an extension to Tk.  It adds plotting widgets (X-Y graph, 
-  barchart, stripchart), a powerful geometry manager, a new canvas 
-  item, and several new commands to Tk.  
-
-  Plotting widgets:  
-
-    graph, barchart, stripchart
-                BLT has X-Y graph, barchart, and stripchart widgets that are
-                both easy to use and customize.  All the widgets work with
-                BLT vector data objects, which makes it easy to manage data.
- 
-  Hierarchical list box:
-
-    hierbox     Displays a general ordered tree which may be built 
-                on-the-fly or all at once.
-
-  Tab set:
-
-    tabset      Can be used either as a tab notebook or simple tabset.
-                Multi-tiered and/or scrolled tabsets are available.
-                Notebook pages can be torn-off into separate windows and 
-                later put back. 
-    
-  Geometry Manager:  
-
-    table       A table-based geometry manager. Lets you specify widget
-                layouts by row and column positions in the table. Unlike the
-                packer or grid, you can finely control and constrain window
-                sizes.
-
-  Vector Data Object:
-
-    vector      Lets you manage a vector of floating point values in a
-                high-level fashion.  Vectors inter-operate seamlessly with 
-                the plotting widgets. The graphs will automatically redraw 
-                themselves when the vector data changes. Vector's components 
-                can be managed through a Tcl array variable, a Tcl command, 
-                or the using its own C API.
-
-  Background Program Execution:
-
-    bgexec      Like Tcl's "exec ... &", but collects the output, error, and 
-                status of the detached UNIX subprocesses.  Sets a Tcl variable 
-                upon completion.  
-
-  Busy Command:
-
-    busy        For preventing user-interactions when the application is
-                busy.  Manages an invisible "busy" window which prevents
-                further user interactions (keyboard, mouse, button, etc.).
-                Also you can provide a busy cursor that temporarily 
-                overrides those of the Tk widgets.
-
-  New Canvas Item:
-
-    eps         An new item is added to the Tk canvas for handling
-                encapsulated PostScript.  It lets you embed an EPS file into
-                the canvas displaying either an EPS preview image found in 
-                the file, or a Tk image that you provide.  When you print 
-                the canvas the EPS item will automatically include the EPS 
-                file, translating and scaling the PostScript.  For example, 
-                you could use "eps" items to tile several PostScript pages 
-                into single page.
-
-                The "eps" item can also be used as a replacement for "image"
-                canvas items.  Unlike "image" canvas items, the image of an 
-                eps item can be printed and scaled arbitrarily.
-
-  Drag & Drop Facility:
-
-    drag&drop   Adds drag-n-drop capabilities to Tk.  It uses "send"-style 
-                communication between drag-drop sources and targets.  The 
-                result is a much more powerful drag-and-drop mechanism than 
-                is available with OpenLook or Motif.  
-
-  Bitmap Command:
-
-    bitmap      Lets you read and write bitmaps from Tcl.  You can define
-                bitmaps from ordinary text strings.  Bitmaps can also be
-                scaled and rotated.  For example, you can create a button
-                with rotated text by defining a bitmap from a text string
-                and rotating it.  You can then use the bitmap in the button
-                widget.
-
-  Miscellaneous Commands:
-
-    winop       Basic window operations. You can raise, lower, map, or, 
-                unmap windows.  Other operations let you move the pointer
-                or take photo image snapshots of Tk widgets.
-
-    bltdebug    Lets you trace the execution of Tcl commands and procedures.
-                Prints out each Tcl command before it's executed.  
-
-    watch       Lets you specify Tcl procedures to be run before and/or
-                after every Tcl command.  May be used for logging, tracing, 
-                profiling, or debugging or Tcl code.
-
-    spline      Computes a spline fitting a set of data points (x and y 
-                vectors) and produces a vector of the interpolated images 
-                (y-coordinates) at a given set of x-coordinates.
-
-    htext       A simple hypertext widget. Allows text and Tk widgets to
-                be combined in a scroll-able text window.  Any Tk widget 
-                can be embedded and used to form hyper-links.  Other 
-                options allow for selections and text searches.
-
-What's new in 2.4?
-
- 1. "eps" canvas item.  
-
-    An encapsulated PostScript canvas item lets you embed an EPS file into 
-    the canvas.  The "eps" item displays either a EPS preview image found 
-    in the file, or a Tk image that you provide.  
-
- 2. "hierbox" widget.
-
-    Hierarchical listbox widget. Displays a general ordered tree which 
-    may be built on-the-fly or all at once.
-
- 3. "tabset" widget.
-
-    Can be used either as a tab notebook or simple tabset.  Tabs can 
-    be arranged in a variety of ways: multi-tiered, scrolled, and 
-    attached to any of the four sides.  Tab labels can contain both 
-    images and text (text can be arbitrarily rotated). Notebook pages 
-    can be torn-off into separate windows and replaced later. 
-    
- 4. Changes to vectors.
-
-    New features:
-        
-     o  Vector expressions.  The vector now has an "expr" operation
-        that lets you perform math (including math library
-        functions) on vectors.  There are several new functions
-        (such as "max", "min", "mean" "median", "q1", "q3", "prod",
-        "sum", "adev", "sdev", "skew", ...)
-
-                vector expr { sin(x)^2 + cos(x)^2 }
-                y expr { log(x) * $value }
-
-     o  New syntax to create and destroy vectors:
-
-                vector create x 
-                vector destroy x
- 
-        The old syntax for creating vectors still works.
-
-                vector x
-
-     o  Vectors are *not* automatically deleted when their Tcl
-        variable is unset anymore. This means that you can
-        temporarily map vectors to variables and use them as you
-        would an ordinary Tcl array (kind of like "upvar").
-
-            proc AddValue { vecName value } {
-                 $vecName variable x
-        
-                 set x(++end) $value
-            }   
-
-        There's an "-watchunset" flag to restore the old
-        behavior if you need it. 
-
-            vector create x -watchunset yes
-
-     o  Vectors still automatically create Tcl variables by
-        default.  I'd like to change this, but it silently
-        breaks lots of code, so it will stay.
-
-    Bug fixes:
-
-     o  Vector reallocation failed when shrinking the vector.
-
-     o  Vector "destroy" callback made after vector was
-        already freed.
-
- 5. Changes to Graph, Barchart, Stripchart widgets.
-
-    New features:
-
-     o  Drop shadows for text (titles, markers, etc). Drop
-        shadows improve contrast when displaying text over a
-        background with similar color intensities.
-   
-     o  Postscript "-preview" option to generate a EPS
-        PostScript preview image that can be read and
-        displayed by the EPS canvas item.
-
-     o  New "-topvariable", "-bottomvariable",
-        "-leftvariable", and "-rightvariable" options.  They
-        specify variables to contain the current margin
-        sizes.  These variables are updated whenever the
-        graph is redrawn.
-
-     o  New "-aspect" option. Let's you maintain a particular aspect
-        ratio for the the graph.
-
-     o  Image markers can now be stretched and zoomed like
-        bitmap markers.
-
-     o  Bind operation for legend entries, markers, and elements.
-
-        Much thanks to Julian Loaring <bigj at bigj.demon.co.uk> 
-        for the suggestions.
-
-     o  New "-xor" option for line markers, lets you draw the line
-        by rubberbanded by XOR-ing without requiring the graph to
-        be redrawn.  This can be used, for example, to select regions
-        like in zooming.  
-
-        Thanks to Johannes Zellner (joze at krisal.physik.uni-karlsruhe.de) 
-        for the suggestion.
-
-    Bug fixes:
-
-     o  Closest line (point) broken when using pens styles.
-
-     o  Marker elastic coordinates were wrong.
-
-     o  PostScript bounding box included the border of the page.
-
-     o  Bad PostScript generated for barchart symbols with stipples.
-
-     o  Wrong dimensions computed with postscript " -maxpect" option.
-
-     o  Text markers fixed.
-
-        Thanks to De Clarke for the bug report and fix.
-
-
-     o  Renamed axis configuration from "-range" to "-autorange" to
-        match the documentation.  
-
-        Thanks to Brian Smith for the correction.
-
-     o  Fixed polygon marker pick routine.
-
-     o  Fixed active tab labels overlapping the selected tab.
-
-
-What's incompatible with releases prior to BLT 2.4?
-
- 1. Vector names must start with a letter and contain letters, digits,
-    or underscores.  
-
-    Namespace Issues:   Vector names are still global. If Tcl provides
-                        an API, vectors may in the future be created on
-                        a per-namespace basis.  Right now, there's no
-                        mechanism for detecting when a namespace has been
-                        destroyed. Which is why you can't currently
-                        prefix a vector name with a namespace qualifier.
-
-                        [Ok, there is... Thanks to Michael McLennan for
-                        pointing this out to me.  So maybe soon there 
-                        will be vectors on a per namespace basis.]
-        
- 2. The "-mapped" options throughout the graph have been replaced
-    by the "-hide" option.  The many usages of the word "map" was 
-    getting confusing.  
-
-        # No longer works.
-        .graph legend configure -mapped no
-
-        # Instead use this.
-        .graph legend configure -hide yes    
- 
-   
-How to compile and test BLT?
-
-  See the file "INSTALL" for instructions.
-
-When will the so-called "official" BLT work with Windows?  
-
-  It currently compiles and runs with MS VC++ and EGCS 1.1 under 
-  Windows 95/NT (loadable binary versions will be forthcoming).  
-  Everything pretty much works: graphs, bgexec, busy, drag&drop etc.
-   
-When will...?
-
-  In general, I can't answer the "When will" questions, mostly out of 
-  embarrassment.  My estimates of when new features and releases will
-  occur usually turn out to be way way off.  
-
-What does BLT stand for?
-
-  Whatever you want it to.
-
---gah
-
-%%
-global endOfText
-set endOfText [expr $htext(line)-1 ]
-
-global updateInterval count barchart
-global Red Green Blue
-set updateInterval 200
-set count 0
-set Red bb
-set Green 00
-set Blue 33
-
-option add *barchart.title "Bar Chart" 
-option add *barchart.x.title "X"
-option add *barchart.y.title "Y"
-option add *barchart.y2.title "Y"
-option add *barchart.Axis.subTicks 0
-option add *barchart.x.stepSize 0
-option add *barchart.x.Ticks 0
-option add *barchart.legend.hide yes
-option add *barchart.Axis.Font *-Courier-Bold-R-Normal-*-8-80-* 
-option add *barchart.y2.hide yes
-
-set barchart $this.barchart
-blt::barchart $barchart -bd 2 -relief raised  -bg $bg2
-$barchart y2axis use y
-$this append $barchart -fill both -padx 10 -pady 10 -relwidth 0.8
-
-proc AnimateBarchart {  } {
-    global updateInterval
-    global barchart count Red Blue Green
-    
-    if { [info commands $barchart] != $barchart } {
-        return
-    }   
-    incr count
-    if { $count > 100 } {
-        $barchart element delete [lindex [$barchart element show] end]
-    }
-    set color [format "%x" [expr $count%16]]
-    set Green ${color}${color}
-    $barchart element create $count -data { $count sin($count*0.1)} \
-        -fg #${Red}${Green}${Blue} -bg brown 
-    after $updateInterval AnimateBarchart
-}
-AnimateBarchart
-
-%%
-
-        Press %%
-button $this.quit -command { exit } -text {Quit} -bg pink
-$this append $this.quit
-%% to remove the window.
-
diff --git a/blt3.0/demos/htext1.tcl b/blt3.0/demos/htext1.tcl
deleted file mode 100755
index 66d1cb6..0000000
--- a/blt3.0/demos/htext1.tcl
+++ /dev/null
@@ -1,164 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-#source scripts/demo.tcl
-
-set visual [winfo screenvisual .] 
-if { $visual == "staticgray"  || $visual == "grayscale" } {
-    set activeBg black
-    set normalBg white
-    set bitmapFg black
-    set bitmapBg white
-    option add *top.background 		white
-} else {
-    option add *htext.foreground navyblue
-    if { $tk_version >= 4.0 } {
-	set file1 ./images/clouds.gif
-	set file2 ./images/chalk.gif
-	image create picture texture1 -file $file1
-	image create picture texture2 -file $file2
-	set bg1 [blt::bgpattern create tile -image texture1]
-	set bg2 [blt::bgpattern create tile -image texture2]
-	option add *htext.foreground black
-	option add *htext.background $bg1
-	option add *htext.selectBackground gold1
-    }
-}
-option add *highlightThickness 0
-
-proc Blt_FindPattern { htext } {
-    toplevel .search
-    wm title .search "Text search"
-    label .search.label1 -text "Enter Pattern"
-    entry .search.entry -relief sunken
-    label .search.clear -text "Clear" \
-	-command ".search.entry delete 0 end"
-    label .search.cancel -text "Cancel" \
-	-command "destroy .search; focus $htext"
-    label .search.search -text "Search" -command "Blt_Search&Move $htext"
-    bind .search.entry <Return> "Blt_Search&Move $htext"
-    blt::table .search \
-	.search.label1 	0,0 -padx 4 \
-	.search.entry 	0,1 -cspan 2 -pady 4 -padx 4 -reqwidth 3i \
-	.search.search  3,0 -reqwidth .75i -anchor w -padx 10 -pady 5  \
-	.search.clear	3,1 -reqwidth .75i -anchor center -padx 10 -pady 5 \
-	.search.cancel	3,2 -reqwidth .75i -anchor e -padx 10 -pady 5 
-    focus .search.entry
-    bind .search <Visibility> { raise .search }
-}
-       
-set last 0
-set lastPattern {}
-
-proc Blt_Search&Move { h } {
-    global last
-    global lastPattern
-
-
-    set pattern [.search.entry get]
-    if { [string compare $pattern $lastPattern] != 0 } {
-	set last 0
-	set lastPattern $pattern
-    }
-    if { $pattern == "" } {
-	return
-    }
-	
-    set indices [$h search $pattern $last end]
-    if { $indices == "" } {
-	bell
-    } else {
-	set first [lindex $indices 0]
-	set last [lindex $indices 1]
-	$h selection range $first $last
-	$h gotoline $first
-	incr last
-    }
-}
-
-# Create horizonatal and vertical scrollbars
-scrollbar .vscroll -command { .htext yview } -orient vertical 
-scrollbar .hscroll -command { .htext xview } -orient horizontal
-
-# Create the hypertext widget 
-blt::htext .htext -file ./htext.txt  \
-    -yscrollcommand { .vscroll set } \
-    -xscrollcommand { .hscroll set } \
-    -yscrollunits 10m -xscrollunits .25i \
-    -height 6i 
-
-
-blt::table . \
-    .htext 0,0 -fill both \
-    .vscroll 0,1 -fill y \
-    .hscroll 1,0 -fill x 
-
-blt::table configure . r1 c1 -resize none
-
-bind .htext <B1-Motion> {
-    %W select to @%x,%y
-}
-bind .htext <1> {
-    %W select from @%x,%y
-    %W select to @%x,%y
-}
-
-bind .htext <Shift-1> {
-    %W select word @%x,%y
-}
-bind .htext <Meta-1> {
-    %W select line @%x,%y
-}
-bind .htext <Control-1> {
-    puts stderr [%W select index @%x,%y]
-}
-
-bind .htext <B2-Motion> {
-    %W scan dragto @%x,%y
-}
-bind .htext <2> {
-    %W scan mark @%x,%y
-}
-
-bind .htext <3> {
-    %W select adjust @%x,%y
-}
-
-bind .htext <Control-p> { 
-    set line [%W gotoline]
-    if { $line == 0 } {
-	bell
-    } else {
-	set line [expr $line-1]
-	%W gotoline $line.0
-    }
-}
-bind .htext <Control-n> { 
-    set line [%W gotoline]
-    incr line
-    if { [%W gotoline $line.0] != $line } {
-	bell
-    }
-}
-
-bind .htext <Control-v> { 
-    %W yview [expr [%W yview]+10]
-}
-
-bind .htext <Meta-v> { 
-    %W yview [expr [%W yview]-10]
-}
-
-bind .htext <Alt-v> { 
-    %W yview [expr [%W yview]-10]
-}
-
-bind .htext <Any-q> {
-    exit 0
-}
-bind .htext <Control-s> {
-    Blt_FindPattern %W
-}
-
-wm min . 0 0
-focus .htext
diff --git a/blt3.0/demos/images/blt98.gif b/blt3.0/demos/images/blt98.gif
deleted file mode 100644
index 5d8c964..0000000
Binary files a/blt3.0/demos/images/blt98.gif and /dev/null differ
diff --git a/blt3.0/demos/images/buckskin.gif b/blt3.0/demos/images/buckskin.gif
deleted file mode 100644
index e2d7be9..0000000
Binary files a/blt3.0/demos/images/buckskin.gif and /dev/null differ
diff --git a/blt3.0/demos/images/chalk.gif b/blt3.0/demos/images/chalk.gif
deleted file mode 100644
index 30d29a7..0000000
Binary files a/blt3.0/demos/images/chalk.gif and /dev/null differ
diff --git a/blt3.0/demos/images/close.gif b/blt3.0/demos/images/close.gif
deleted file mode 100644
index 02f8363..0000000
Binary files a/blt3.0/demos/images/close.gif and /dev/null differ
diff --git a/blt3.0/demos/images/close2.gif b/blt3.0/demos/images/close2.gif
deleted file mode 100644
index 09cbdff..0000000
Binary files a/blt3.0/demos/images/close2.gif and /dev/null differ
diff --git a/blt3.0/demos/images/clouds.gif b/blt3.0/demos/images/clouds.gif
deleted file mode 100644
index 49d15c2..0000000
Binary files a/blt3.0/demos/images/clouds.gif and /dev/null differ
diff --git a/blt3.0/demos/images/corrugated_metal.gif b/blt3.0/demos/images/corrugated_metal.gif
deleted file mode 100644
index f212bd7..0000000
Binary files a/blt3.0/demos/images/corrugated_metal.gif and /dev/null differ
diff --git a/blt3.0/demos/images/folder.gif b/blt3.0/demos/images/folder.gif
deleted file mode 100644
index 86eb798..0000000
Binary files a/blt3.0/demos/images/folder.gif and /dev/null differ
diff --git a/blt3.0/demos/images/jan25_palm3x_L.jpg b/blt3.0/demos/images/jan25_palm3x_L.jpg
deleted file mode 100644
index de30779..0000000
Binary files a/blt3.0/demos/images/jan25_palm3x_L.jpg and /dev/null differ
diff --git a/blt3.0/demos/images/mini-book1.gif b/blt3.0/demos/images/mini-book1.gif
deleted file mode 100644
index b8868dc..0000000
Binary files a/blt3.0/demos/images/mini-book1.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-book2.gif b/blt3.0/demos/images/mini-book2.gif
deleted file mode 100644
index 266251a..0000000
Binary files a/blt3.0/demos/images/mini-book2.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-display.gif b/blt3.0/demos/images/mini-display.gif
deleted file mode 100644
index a2416fb..0000000
Binary files a/blt3.0/demos/images/mini-display.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-doc.gif b/blt3.0/demos/images/mini-doc.gif
deleted file mode 100644
index 3034320..0000000
Binary files a/blt3.0/demos/images/mini-doc.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-filemgr.gif b/blt3.0/demos/images/mini-filemgr.gif
deleted file mode 100644
index cd16bc2..0000000
Binary files a/blt3.0/demos/images/mini-filemgr.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-ofolder.gif b/blt3.0/demos/images/mini-ofolder.gif
deleted file mode 100644
index 78d7436..0000000
Binary files a/blt3.0/demos/images/mini-ofolder.gif and /dev/null differ
diff --git a/blt3.0/demos/images/mini-windows.gif b/blt3.0/demos/images/mini-windows.gif
deleted file mode 100644
index 5a504fc..0000000
Binary files a/blt3.0/demos/images/mini-windows.gif and /dev/null differ
diff --git a/blt3.0/demos/images/ofolder.gif b/blt3.0/demos/images/ofolder.gif
deleted file mode 100644
index 1238fa2..0000000
Binary files a/blt3.0/demos/images/ofolder.gif and /dev/null differ
diff --git a/blt3.0/demos/images/open.gif b/blt3.0/demos/images/open.gif
deleted file mode 100644
index ea826a9..0000000
Binary files a/blt3.0/demos/images/open.gif and /dev/null differ
diff --git a/blt3.0/demos/images/open2.gif b/blt3.0/demos/images/open2.gif
deleted file mode 100644
index 6db5fb7..0000000
Binary files a/blt3.0/demos/images/open2.gif and /dev/null differ
diff --git a/blt3.0/demos/images/out.ps b/blt3.0/demos/images/out.ps
deleted file mode 100644
index 1536442..0000000
--- a/blt3.0/demos/images/out.ps
+++ /dev/null
@@ -1,11662 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%BoundingBox: 72 104 539 687
-%%Pages: 0
-%%Creator: (BLT 2.4 Graph)
-%%CreationDate: (Sun May 16 22:17:22 1999)
-%%Title: (out.ps)
-%%%%DocumentData: Clean7Bit
-%Orientation: Landscape
-%%DocumentNeededResources: font Helvetica Courier
-%%EndComments
-%%BeginPreview: 599 480 8 9584
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000000000FF
-% 101018111818181818181818181818181818181818181818181811181010
-% 1218181818181A181A181818161010101010101010101010101817181818
-% 161210101210121012101216181818181818181818181010121018181818
-% 181818101012101018111818181818181818181818181818181818181818
-% 1818111810101218181818181A181A181818161010101010101010101010
-% 101817181818161210101210121012101216181818181818181818181010
-% 121018181818181818101012101018111818181818181818181818181818
-% 1818181818181818111810101218181818181A181A181818161010101010
-% 101010101010101817181818161210101210121012101216181818181818
-% 181818181010121018181818181818101012101018111818181818181818
-% 1818181818181818181818181818111810101218181818181A181A181818
-% 161010101010101010101010101817181818161210101210121012101216
-% 181818181818181818181010121018181818181818101012101018111818
-% 181818181818181818181818181818181818181811181010121818181818
-% 1A181A181818161010101010101010101010101817181818161210101210
-% 121012101216181818181818181818181010121018181818181818101012
-% 101018111818181818181818181818181818181818181818181811181010
-% 1218181818181A181A181818161010101010101010101010101817181818
-% 161210101210121012101216181818181818181818181010121018181818
-% 18181810101210101811181818181818181818181818181818181800FF12
-% 1810181018181018181818181A1818181818181A18181818161818131810
-% 181818181A18181818181818181012101010101010101010181818181818
-% 18181012161816121610181218161818161818121012101012101818181A
-% 1818101010121810181018181018181818181A1818181818181A18181818
-% 161818131810181818181A18181818181818181012101010101010101010
-% 181818181818181810121618161216101812181618181618181210121010
-% 12101818181A1818101010121810181018181018181818181A1818181818
-% 181A18181818161818131810181818181A18181818181818181012101010
-% 101010101010181818181818181810121618161216101812181618181618
-% 18121012101012101818181A181810101012181018101818101818181818
-% 1A1818181818181A18181818161818131810181818181A18181818181818
-% 181012101010101010101010181818181818181810121618161216101812
-% 18161818161818121012101012101818181A181810101012181018101818
-% 1018181818181A1818181818181A18181818161818131810181818181A18
-% 181818181818181012101010101010101010181818181818181810121618
-% 16121610181218161818161818121012101012101818181A181810101012
-% 1810181018181018181818181A1818181818181A18181818161818131810
-% 181818181A18181818181818181012101010101010101010181818181818
-% 18181012161816121610181218161818161818121012101012101818181A
-% 1818101010121810181018181018181818181A1818181818181A00FF1810
-% 121812161218101818181818181818181A18181818181818181810181018
-% 181818181818181818181818101810121010101010101012121012181818
-% 181012181818181212101210181218181810101810181010121218181818
-% 181810121810121812161218101818181818181818181A18181818181818
-% 181810181018181818181818181818181818101810121010101010101012
-% 121012181818181012181818181212101210181218181810101810181010
-% 121218181818181810121810121812161218101818181818181818181A18
-% 181818181818181810181018181818181818181818181818101810121010
-% 101010101012121012181818181012181818181212101210181218181810
-% 101810181010121218181818181810121810121812161218101818181818
-% 181818181A18181818181818181810181018181818181818181818181818
-% 101810121010101010101012121012181818181012181818181212101210
-% 181218181810101810181010121218181818181810121810121812161218
-% 101818181818181818181A18181818181818181810181018181818181818
-% 181818181818101810121010101010101012121012181818181012181818
-% 181212101210181218181810101810181010121218181818181810121810
-% 121812161218101818181818181818181A18181818181818181810181018
-% 181818181818181818181818101810121010101010101012121012181818
-% 181012181818181212101210181218181810101810181010121218181818
-% 181810121810121812161218101818181818181818181A181800FF171816
-% 12161012161210181818181818181A181818181818181818181810181818
-% 18181A181818101812181810121018101210121010101010101010121818
-% 121618181818161010121012101216121818181818181010101012101818
-% 16181817181612161012161210181818181818181A181818181818181818
-% 18181018181818181A181818101812181810121018101210121010101010
-% 101010121818121618181818161010121012101216121818181818181010
-% 10101210181816181817181612161012161210181818181818181A181818
-% 18181818181818181018181818181A181818101812181810121018101210
-% 121010101010101010121818121618181818161010121012101216121818
-% 181818181010101012101818161818171816121610121612101818181818
-% 18181A18181818181818181818181018181818181A181818101812181810
-% 121018101210121010101010101010121818121618181818161010121012
-% 101216121818181818181010101012101818161818171816121610121612
-% 10181818181818181A18181818181818181818181018181818181A181818
-% 101812181810121018101210121010101010101010121818121618181818
-% 161010121012101216121818181818181010101012101818161818171816
-% 12161012161210181818181818181A181818181818181818181810181818
-% 18181A181818101812181810121018101210121010101010101010121818
-% 121618181818161010121012101216121818181818181010101012101818
-% 16181817181612161012161210181818181818181A18181800FF18181818
-% 121010101010121618181818181818181A1818181A181818181818181818
-% 181818181818181010101012101818181010101010101010101010181810
-% 121810181318131010101012101210101210181818181818121012101018
-% 181818181818121010101010121618181818181818181A1818181A181818
-% 181818181818181818181818181010101012101818181010101010101010
-% 101010181810121810181318131010101012101210101210181818181818
-% 121012101018181818181818121010101010121618181818181818181A18
-% 18181A181818181818181818181818181818181010101012101818181010
-% 101010101010101010181810121810181318131010101012101210101210
-% 181818181818121012101018181818181818121010101010121618181818
-% 181818181A1818181A181818181818181818181818181818181010101012
-% 101818181010101010101010101010181810121810181318131010101012
-% 101210101210181818181818121012101018181818181818121010101010
-% 121618181818181818181A1818181A181818181818181818181818181818
-% 181010101012101818181010101010101010101010181810121810181318
-% 131010101012101210101210181818181818121012101018181818181818
-% 121010101010121618181818181818181A1818181A181818181818181818
-% 181818181818181010101012101818181010101010101010101010181810
-% 121810181318131010101012101210101210181818181818121012101018
-% 181818181818121010101010121618181818181818181A00FF1012181010
-% 1010101010101012181818181818181818181A181A181818181818181818
-% 181818181818101210101010181210181012101010101012101218181817
-% 181618161816121012101012101012101210121818181818101012121218
-% 1210121810101010101010101012181818181818181818181A181A181818
-% 181818181818181818181818101210101010181210181012101010101012
-% 101218181817181618161816121012101012101012101210121818181818
-% 101012121218121012181010101010101010101218181818181818181818
-% 1A181A181818181818181818181818181818101210101010181210181012
-% 101010101012101218181817181618161816121012101012101012101210
-% 121818181818101012121218121012181010101010101010101218181818
-% 1818181818181A181A181818181818181818181818181818101210101010
-% 181210181012101010101012101218181817181618161816121012101012
-% 101012101210121818181818101012121218121012181010101010101010
-% 1012181818181818181818181A181A181818181818181818181818181818
-% 101210101010181210181012101010101012101218181817181618161816
-% 121012101012101012101210121818181818101012121218121012181010
-% 1010101010101012181818181818181818181A181A181818181818181818
-% 181818181818101210101010181210181012101010101012101218181817
-% 181618161816121012101012101012101210121818181818101012121218
-% 1210121810101010101010101012181818181818181800FF121010101010
-% 0810101010101010101218161818181A181A181818181817181818181818
-% 181818181818101010101010101210121010181010101010121818181818
-% 181818181818181810181010121010121010101210181818181810101010
-% 1210101010100810101010101010101218161818181A181A181818181817
-% 181818181818181818181818101010101010101210121010181010101010
-% 121818181818181818181818181810181010121010121010101210181818
-% 1818101010101210101010100810101010101010101218161818181A181A
-% 181818181817181818181818181818181818101010101010101210121010
-% 181010101010121818181818181818181818181810181010121010121010
-% 101210181818181810101010121010101010081010101010101010121816
-% 1818181A181A181818181817181818181818181818181818101010101010
-% 101210121010181010101010121818181818181818181818181810181010
-% 121010121010101210181818181810101010121010101010081010101010
-% 1010101218161818181A181A181818181817181818181818181818181818
-% 101010101010101210121010181010101010121818181818181818181818
-% 181810181010121010121010101210181818181810101010121010101010
-% 0810101010101010101218161818181A181A181818181817181818181818
-% 181818181818101010101010101210121010181010101010121818181818
-% 181818181818181810181010121010121010101210181818181810101010
-% 12101010101008101010101010101012181618181800FF10101210101010
-% 0A0F0A10101010101010121618181820181A181818181818121618181818
-% 1818181818121010101010101010101818181817121018161818181A1818
-% 181818181818181812101210101210121012101012101816181612101010
-% 1012101010100A0F0A10101010101010121618181820181A181818181818
-% 121618181818181818181812101010101010101010181818181712101816
-% 1818181A1818181818181818181812101210101210121012101012101816
-% 1816121010101012101010100A0F0A10101010101010121618181820181A
-% 181818181818121618181818181818181812101010101010101010181818
-% 1817121018161818181A1818181818181818181812101210101210121012
-% 1010121018161816121010101012101010100A0F0A101010101010101216
-% 18181820181A181818181818121618181818181818181812101010101010
-% 1010101818181817121018161818181A1818181818181818181812101210
-% 1012101210121010121018161816121010101012101010100A0F0A101010
-% 10101010121618181820181A181818181818121618181818181818181812
-% 1010101010101010101818181817121018161818181A1818181818181818
-% 181812101210101210121012101012101816181612101010101210101010
-% 0A0F0A10101010101010121618181820181A181818181818121618181818
-% 1818181818121010101010101010101818181817121018161818181A1818
-% 181818181818181812101210101210121012101012101816181612101010
-% 1012101010100A0F0A101010101010101216181800FF1012101010101010
-% 0A1010080A10081010101818181A18181818181818101810181217181818
-% 181818181010101010101010101218181818181818181818181818181818
-% 181618181818181612161012101010101010101010121818181818181012
-% 1010101010100A1010080A10081010101818181A18181818181818101810
-% 181217181818181818181010101010101010101218181818181818181818
-% 181818181818181618181818181612161012101010101010101010121818
-% 1818181810121010101010100A1010080A10081010101818181A18181818
-% 181818101810181217181818181818181010101010101010101218181818
-% 181818181818181818181818181618181818181612161012101010101010
-% 1010101218181818181810121010101010100A1010080A10081010101818
-% 181A18181818181818101810181217181818181818181010101010101010
-% 101218181818181818181818181818181818181618181818181612161012
-% 1010101010101010101218181818181810121010101010100A1010080A10
-% 081010101818181A18181818181818101810181217181818181818181010
-% 101010101010101218181818181818181818181818181818181618181818
-% 181612161012101010101010101010121818181818181012101010101010
-% 0A1010080A10081010101818181A18181818181818101810181217181818
-% 181818181010101010101010101218181818181818181818181818181818
-% 181618181818181612161012101010101010101010121818181818181012
-% 1010101010100A1010080A100810101018181800FF181216121818181010
-% 10101008100810101012181818181A181818181818101210101818121818
-% 12161216121010100A10101012181818181818181818181A181818181818
-% 121018181818181210121018101812121612101010181818181818181216
-% 12181818101010101008100810101012181818181A181818181818101210
-% 10181812181812161216121010100A10101012181818181818181818181A
-% 181818181818121018181818181210121018101812121612101010181818
-% 18181818121612181818101010101008100810101012181818181A181818
-% 18181810121010181812181812161216121010100A101010121818181818
-% 18181818181A181818181818121018181818181210121018101812121612
-% 101010181818181818181216121818181010101010081008101010121818
-% 18181A18181818181810121010181812181812161216121010100A101010
-% 12181818181818181818181A181818181818121018181818181210121018
-% 101812121612101010181818181818181216121818181010101010081008
-% 10101012181818181A181818181818101210101818121818121612161210
-% 10100A10101012181818181818181818181A181818181818121018181818
-% 181210121018101812121612101010181818181818181216121818181010
-% 10101008100810101012181818181A181818181818101210101818121818
-% 12161216121010100A10101012181818181818181818181A181818181818
-% 121018181818181210121018101812121612101010181818181818181216
-% 12181818101010101008100810101012181800FF18161210181618101210
-% 101010080A10101010101818181818181817121012161218101210101010
-% 121018121012101010101012181818181A18181818181818181818181010
-% 121818171818101810181018181818181818181210121218161818161210
-% 181618101210101010080A10101010101818181818181817121012161218
-% 101210101010121018121012101010101012181818181A18181818181818
-% 181818181010121818171818101810181018181818181818181210121218
-% 161818161210181618101210101010080A10101010101818181818181817
-% 121012161218101210101010121018121012101010101012181818181A18
-% 181818181818181818181010121818171818101810181018181818181818
-% 181210121218161818161210181618101210101010080A10101010101818
-% 181818181817121012161218101210101010121018121012101010101012
-% 181818181A18181818181818181818181010121818171818101810181018
-% 181818181818181210121218161818161210181618101210101010080A10
-% 101010101818181818181817121012161218101210101010121018121012
-% 101010101012181818181A18181818181818181818181010121818171818
-% 101810181018181818181818181210121218161818161210181618101210
-% 101010080A10101010101818181818181817121012161218101210101010
-% 121018121012101010101012181818181A18181818181818181818181010
-% 121818171818101810181018181818181818181210121218161818161210
-% 181618101210101010080A10101010101800FF1012101012181818181012
-% 101010101010101218181818181818181812101218121012101210121010
-% 18121612101010101010101818181A181A18181A181A1818181810121010
-% 10181218101218181818181818181A181818181210101012181012101012
-% 181818181012101010101010101218181818181818181812101218121012
-% 10121012101018121612101010101010101818181A181A18181A181A1818
-% 18181012101010181218101218181818181818181A181818181210101012
-% 181012101012181818181012101010101010101218181818181818181812
-% 10121812101210121012101018121612101010101010101818181A181A18
-% 181A181A181818181012101010181218101218181818181818181A181818
-% 1812101010121810121010121818181810121010101010FF1012181818FF
-% 181818181812101218121012101210121010181216121010101010101018
-% 18181A181A18181A181A1818181810121010101812181012181818181818
-% 18181A181818181210101012181012101012181818181012101010101010
-% 101218181818181818181812101218121012101210121010181216121010
-% 10101010101818181A181A18181A181A1818181810121010101812181012
-% 18181818181818181A181818181210101012181012101012181818181012
-% 101010101010101218181818181818181812101218121012101210121010
-% 18121612101010101010101818181A181A18181A181A1818181810121010
-% 10181218101218181818181818181A181818181210101012181012101012
-% 1818181810121010101010101012181800FF181012101210101012101210
-% 100A08101010101012101218101810121010101010181818181010101010
-% 101210121810181012121818181A18181818181818181818101010101010
-% 101010121010101012101818181818181818181818181018181012101210
-% 101012101210100A08101010101012101218101810121010101010181818
-% 181010101010101210121810181012121818181A18181818181818181818
-% 101010101010101010121010101012101818181818181818181818181018
-% 181012101210101012101210100A08101010101012101218101810121010
-% 101010181818181010101010101210121810181012121818181A18181818
-% 181818181818101010101010101010121010101012101818181818181818
-% 181818181018181012101210101012101210100A081010FF101012FF1218
-% 101810121010101010181818181010101010101210121810181012121818
-% 181A18181818181818181818101010101010101010121010101012101818
-% 181818181818181818181018181012101210101012101210100A08101010
-% 101012101218101810121010101010181818181010101010101210121810
-% 181012121818181A18181818181818181818101010101010101010121010
-% 101012101818181818181818181818181018181012101210101012101210
-% 100A08101010101012101218101810121010101010181818181010101010
-% 101210121810181012121818181A18181818181818181818101010101010
-% 101010121010101012101818181818181818181818181018181012101210
-% 101012101210100A0810101010101200FF18181810101010121012161010
-% 101010101010101010121012121010101010101018181818181810181010
-% 101012101816121816181818181818181818181818181810101010101010
-% 101012101210121018181718181618181818181818181818181810101010
-% 121012161010101010101010101010121012121010101010101018181818
-% 181810181010101012101816121816181818181818181818181818181810
-% 101010101010101012101210121018181718181618181818181818181818
-% 181810101010121012161010101010101010101010121012121010101010
-% 101018181818181810181010101012101816121816181818181818181818
-% 181818181810101010101010101012101210121018181718181618181818
-% 18181818181818181010101012101216101010101010FF101010FF121012
-% 121010101010101018181818181810181010101012101816121816181818
-% 181818181818181818181810101010101010101012101210121018181718
-% 181618181818181818181818181810101010121012161010101010101010
-% 101010121012121010101010101018181818181810181010101012101816
-% 121816181818181818181818181818181810101010101010101012101210
-% 121018181718181618181818181818181818181810101010121012161010
-% 101010101010101010121012121010101010101018181818181810181010
-% 101012101816121816181818181818181818181818181810101010101010
-% 101012101210121018181718181618181818181818181818181810101010
-% 121012161010101010101010101000FF1818171818181810101210121010
-% 101010101010101010101010101010081010101218181818181818101010
-% 101010181212161818181A16181818181618181818101210101010101210
-% 181818101810181018121818181818181818181818181818171818181810
-% 101210121010101010101010101010101010101010081010101218181818
-% 181818101010101010181212161818181A16181818181618181818101210
-% 101010101210181818101810181018121818181818181818181818181818
-% 171818181810101210121010101010101010101010101010101010081010
-% 101218181818181818101010101010181212161818181A16181818181618
-% 181818101210101010101210181818101810181018121818181818181818
-% 18181818181817181818181010121012101010101010FF10FF1010101010
-% 101010081010101218181818181818101010101010181212161818181A16
-% 181818181618181818101210101010101210181818101810181018121818
-% 181818181818181818181818171818181810101210121010101010101010
-% 101010101010101010081010101218181818181818101010101010181212
-% 161818181A16181818181618181818101210101010101210181818101810
-% 181018121818181818181818181818181818171818181810101210121010
-% 101010101010101010101010101010081010101218181818181818101010
-% 101010181212161818181A16181818181618181818101210101010101210
-% 181818101810181018121818181818181818181818181818171818181810
-% 1012101210101010101010101000FF121818181818181012101810181816
-% 12181818121010101210101010100A081010181818181818181818121010
-% 101012101012121818181818161818181818161310101010101012161818
-% 181818181210121012101810181818181818181818121818181818181012
-% 10181018181612181818121010101210101010100A081010181818181818
-% 181818121010101012101012121818181818161818181818161310101010
-% 101012161818181818181210121012101810181818181818181818121818
-% 18181818101210181018181612181818121010101210101010100A081010
-% 181818181818181818121010101012101012121818181818161818181818
-% 161310101010101012161818181818181210121012101810181818181818
-% 18181812181818181818101210181018181612181818FF10101012101010
-% 10100A081010181818181818181818121010101012101012121818181818
-% 161818181818161310101010101012161818181818181210121012101810
-% 181818181818181818121818181818181012101810181816121818181210
-% 10101210101010100A081010181818181818181818121010101012101012
-% 121818181818161818181818161310101010101012161818181818181210
-% 121012101810181818181818181818121818181818181012101810181816
-% 12181818121010101210101010100A081010181818181818181818121010
-% 101012101012121818181818161818181818161310101010101012161818
-% 181818181210121012101810181818181818181818121818181818181012
-% 10181018181612181818121000FF10121012101212101012121618181818
-% 181818181818101818131610101010101210181818181818181010101010
-% 101010101010121018181818181818181818101210101010101818181818
-% 1A1818181010101010121012101812161818181010121012101212101012
-% 121618181818181818181818101818131610101010101210181818181818
-% 181010101010101010101010121018181818181818181818101210101010
-% 1018181818181A1818181010101010121012101812161818181010121012
-% 101212101012121618181818181818181818101818131610101010101210
-% 181818181818181010101010101010101010121018181818181818181818
-% 1012101010101018181818181A1818181010101010121012101812161818
-% 181010121012101212101012121618181818181818FF1818101818131610
-% 101010101210181818181818181010101010101010101010121018181818
-% 1818181818181012101010101018181818181A1818181010101010121012
-% 101812161818181010121012101212101012121618181818181818181818
-% 101818131610101010101210181818181818181010101010101010101010
-% 1210181818181818181818181012101010101018181818181A1818181010
-% 101010121012101812161818181010121012101212101012121618181818
-% 181818181818101818131610101010101210181818181818181010101010
-% 101010101010121018181818181818181818101210101010101818181818
-% 1A1818181010101010121012101812161818181010121012101212101012
-% 121618181818181818181800FF1210101210101010181010121818181818
-% 181A181A1818181718181218181810101810181218181012101210101818
-% 1010101010101212181818181818181818181012101010101818181A1818
-% 181818121010101010121010101012101818101210101210101010181010
-% 121818181818181A181A1818181718181218181810101810181218181012
-% 101210101818101010101010121218181818181818181818101210101010
-% 1818181A1818181818121010101010121010101012101818101210101210
-% 101010181010121818181818181A181A1818181718181218181810101810
-% 181218181012101210101818101010101010121218181818181818181818
-% 1012101010101818181A1818181818121010101010121010101012101818
-% 10121010121010101018101012181818181818FF18FF1818181718181218
-% 181810101810181218181012101210101818101010101010121218181818
-% 1818181818181012101010101818181A1818181818121010101010121010
-% 101012101818101210101210101010181010121818181818181A181A1818
-% 181718181218181810101810181218181012101210101818101010101010
-% 1212181818181818181818181012101010101818181A1818181818121010
-% 101010121010101012101818101210101210101010181010121818181818
-% 181A181A1818181718181218181810101810181218181012101210101818
-% 1010101010101212181818181818181818181012101010101818181A1818
-% 181818121010101010121010101012101818101210101210101010181010
-% 121818181818181A181A00FF181812101012101212101210101818161818
-% 1A1818181818181818171818181612121012101010181810101212181018
-% 181010101210101818181A18181818181816121012121818181818181A18
-% 181810100B0E10101010100E101010121818181812101012101212101210
-% 1018181618181A1818181818181818171818181612121012101010181810
-% 101212181018181010101210101818181A18181818181816121012121818
-% 181818181A18181810100B0E10101010100E101010121818181812101012
-% 1012121012101018181618181A1818181818181818171818181612121012
-% 101010181810101212181018181010101210101818181A18181818181816
-% 121012121818181818181A18181810100B0E10101010100E101010121818
-% 1818121010121012121012101018181618FF1A1818FF1818181818171818
-% 181612121012101010181810101212181018181010101210101818181A18
-% 181818181816121012121818181818181A18181810100B0E10101010100E
-% 1010101218181818121010121012121012101018181618181A1818181818
-% 181818171818181612121012101010181810101212181018181010101210
-% 101818181A18181818181816121012121818181818181A18181810100B0E
-% 10101010100E101010121818181812101012101212101210101818161818
-% 1A1818181818181818171818181612121012101010181810101212181018
-% 181010101210101818181A18181818181816121012121818181818181A18
-% 181810100B0E10101010100E101010121818181812101012101212101210
-% 1018181618181A181800FF18181818121010181010101012181810101818
-% 181818121012101818181818181810101010101018181012101010181818
-% 18181612161218181818181818181818181018131618181818181A181A18
-% 1812101010101010100A100A101012161818181818121010181010101012
-% 181810101818181818121012101818181818181810101010101018181012
-% 101010181818181816121612181818181818181818181810181316181818
-% 18181A181A181812101010101010100A100A101012161818181818121010
-% 181010101012181810101818181818121012101818181818181810101010
-% 101018181012101010181818181816121612181818181818181818181810
-% 18131618181818181A181A181812101010101010100A100A101012161818
-% 18181812101018101010101218181010FF181818FF121012101818181818
-% 181810101010101018181012101010181818181816121612181818181818
-% 18181818181018131618181818181A181A181812101010101010100A100A
-% 101012161818181818121010181010101012181810101818181818121012
-% 101818181818181810101010101018181012101010181818181816121612
-% 18181818181818181818181018131618181818181A181A18181210101010
-% 1010100A100A101012161818181818121010181010101012181810101818
-% 181818121012101818181818181810101010101018181012101010181818
-% 18181612161218181818181818181818181018131618181818181A181A18
-% 1812101010101010100A100A101012161818181818121010181010101012
-% 181810101818181800FF1618181818181018181810121010101818161818
-% 18161810101018131618181A181818121010101810181210181813181818
-% 18181818181818181818181818181018101216181818181A181A18181818
-% 1818181810100A1010101010101012181618181818181018181810121010
-% 10181816181818161810101018131618181A181818121010101810181210
-% 18181318181818181818181818181818181818181018101216181818181A
-% 181A181818181818181810100A1010101010101012181618181818181018
-% 18181012101010181816181818161810101018131618181A181818121010
-% 101810181210181813181818181818181818181818181818181810181012
-% 16181818181A181A181818181818181810100A1010101010101012181618
-% 1818181810181818101210101018FF1618181816FF10101018131618181A
-% 181818121010101810181210181813181818181818181818181818181818
-% 18181018101216181818181A181A181818181818181810100A1010101010
-% 101012181618181818181018181810121010101818161818181618101010
-% 18131618181A181818121010101810181210181813181818181818181818
-% 18181818181818181018101216181818181A181A18181818181818181010
-% 0A1010101010101012181618181818181018181810121010101818161818
-% 18161810101018131618181A181818121010101810181210181813181818
-% 18181818181818181818181818181018101216181818181A181A18181818
-% 1818181810100A1010101010101012181618181818181018181810121010
-% 1018181618181800FF121818181818181818171210101010121012181018
-% 121818181812161812161818181818101810121012161818101818181818
-% 1818181818181818181A1818181818181818181818181818181818181216
-% 181812101010121010101010101012121818181818181818171210101010
-% 121012181018121818181812161812161818181818101810121012161818
-% 1018181818181818181818181818181A1818181818181818181818181818
-% 181818181216181812101010121010101010101012121818181818181818
-% 171210101010121012181018121818181812161812161818181818101810
-% 1210121618181018181818181818181818181818181A1818181818181818
-% 181818181818181818181216181812101010121010101010101012121818
-% 181818181818171210101010121012181018121818181812161812161818
-% 1818181018101210121618181018181818181818181818181818181A1818
-% 181818181818181818181818181818181216181812101010121010101010
-% 101012121818181818181818171210101010121012181018121818181812
-% 161812161818181818101810121012161818101818181818181818181818
-% 1818181A1818181818181818181818181818181818181216181812101010
-% 121010101010101012121818181818181818171210101010121012181018
-% 121818181812161812161818181818101810121012161818101818181818
-% 1818181818181818181A1818181818181818181818181818181818181216
-% 181812101010121010101010101012121818181818181818171210101010
-% 12101218101800FF10121612181610181818121612101012101210121618
-% 181818181818121018101216181618181810181012101210181618181818
-% 18181A181A18181818181818181818181818181018181818181812101012
-% 161818121018101010101010101010121612181610181818121612101012
-% 101210121618181818181818121018101216181618181810181012101210
-% 18161818181818181A181A18181818181818181818181818181018181818
-% 181812101012161818121018101010101010101010121612181610181818
-% 121612101012101210121618181818181818121018101216181618181810
-% 18101210121018161818181818181A181A18181818181818181818181818
-% 181018181818181812101012161818121018101010101010101010121612
-% 181610181818121612101012101210121618181818181818121018101216
-% 18161818181018101210121018161818181818181A181A18181818181818
-% 181818181818181018181818181812101012161818121018101010101010
-% 101010121612181610181818121612101012101210121618181818181818
-% 12101810121618161818181018101210121018161818181818181A181A18
-% 181818181818181818181818181018181818181812101012161818121018
-% 101010101010101010121612181610181818121612101012101210121618
-% 181818181818121018101216181618181810181012101210181618181818
-% 18181A181A18181818181818181818181818181018181818181812101012
-% 161818121018101010101010101010121612181610181818121612101012
-% 101210121600FF1010121012181218161810121012101010101010121216
-% 181818161810181010121012181818181612101810121012121018181818
-% 18181818181A18181A1E181A181818181818181818181818181810101210
-% 181216181810121010121010101010121012181218161810121012101010
-% 101010121216181818161810181010121012181818181612101810121012
-% 12101818181818181818181A18181A1E181A181818181818181818181818
-% 181810101210181216181810121010121010101010121012181218161810
-% 121012101010101010121216181818161810181010121012181818181612
-% 10181012101212101818181818181818181A18181A1E181A181818181818
-% 181818181818181810101210181216181810121010121010101010121012
-% 181218161810121012101010101010121216181818161810181010121012
-% 18181818161210181012101212101818181818181818181A18181A1E181A
-% 181818181818181818181818181810101210181216181810121010121010
-% 101010121012181218161810121012101010101010121216181818161810
-% 18101012101218181818161210181012101212101818181818181818181A
-% 18181A1E181A181818181818181818181818181810101210181216181810
-% 121010121010101010121012181218161810121012101010101010121216
-% 181818161810181010121012181818181612101810121012121018181818
-% 18181818181A18181A1E181A181818181818181818181818181810101210
-% 181216181810121010121010101010121012181218161810121012101010
-% 1010101200FF101010101012161218101812161210101012101210101210
-% 181218181818181810181810121210121810121010101010121012181818
-% 1818181818181A181A18181818181818181818181A181818181010121012
-% 101210121810121010101210101010101012161218101812161210101012
-% 101210101210181218181818181810181810121210121810121010101010
-% 1210121818181818181818181A181A18181818181818181818181A181818
-% 181010121012101210121810121010101210101010101012161218101812
-% 161210101012101210101210181218181818181810181810121210121810
-% 1210101010101210121818181818181818181A181A181818181818181818
-% 18181A181818181010121012101210121810121010101210101010101012
-% 161218101812161210101012101210101210181218181818181810181810
-% 1212101218101210101010101210121818181818181818181A181A181818
-% 18181818181818181A181818181010121012101210121810121010101210
-% 101010101012161218101812161210101012101210101210181218181818
-% 181810181810121210121810121010101010121012181818181818181818
-% 1A181A18181818181818181818181A181818181010121012101210121810
-% 121010101210101010101012161218101812161210101012101210101210
-% 181218181818181810181810121210121810121010101010121012181818
-% 1818181818181A181A18181818181818181818181A181818181010121012
-% 101210121810121010101210101010101012161218101812161210101012
-% 10121000FF10101012181818161818181018161810101010101012101210
-% 101218161818181818101210101018161210121010101010101210121612
-% 181818181A18201E1A181A18181818181818181818181818181812101010
-% 101018101818181812101010101012181818161818181018161810101010
-% 101012101210101218161818181818101210101018161210121010101010
-% 101210121612181818181A18201E1A181A18181818181818181818181818
-% 181812101010101018101818181812101010101012181818161818181018
-% 161810101010101012101210101218161818181818101210101018161210
-% 121010101010101210121612181818181A18201E1A181A18181818181818
-% 181818181818181812101010101018101818181812101010101012181818
-% 161818181018161810101010101012101210101218161818181818101210
-% 101018161210121010101010101210121612181818181A18201E1A181A18
-% 181818181818181818181818181812101010101018101818181812101010
-% 101012181818161818181018161810101010101012101210101218161818
-% 181818101210101018161210121010101010101210121612181818181A18
-% 201E1A181A18181818181818181818181818181812101010101018101818
-% 181812101010101012181818161818181018161810101010101012101210
-% 101218161818181818101210101018161210121010101010101210121612
-% 181818181A18201E1A181A18181818181818181818181818181812101010
-% 101018101818181812101010101012181818161818181018161810101010
-% 101000FF1810121018181818121810181818181810121012101010101012
-% 101012121018181018101010101812101010101010101010101010101018
-% 18181818181A181A18181818181613181818181818181818121010101010
-% 101012101818181818181810121018181818121810181818181810121012
-% 101010101012101012121018181018101010101812101010101010101010
-% 10101010101818181818181A181A18181818181613181818181818181818
-% 121010101010101012101818181818181810121018181818121810181818
-% 181810121012101010101012101012121018181018101010101812101010
-% 10101010101010101010101818181818181A181A18181818181613181818
-% 181818181818121010101010101012101818181818181810121018181818
-% 121810181818181810121012101010101012101012121018181018101010
-% 10181210101010101010101010101010101818181818181A181A18181818
-% 181613181818181818181818121010101010101012101818181818181810
-% 121018181818121810181818181810121012101010101012101012121018
-% 18101810101010181210101010101010101010101010101818181818181A
-% 181A18181818181613181818181818181818121010101010101012101818
-% 181818181810121018181818121810181818181810121012101010101012
-% 101012121018181018101010101812101010101010101010101010101018
-% 18181818181A181A18181818181613181818181818181818121010101010
-% 101012101818181818181810121018181818121810181818181810121012
-% 1000FF1A1818181618181816181818181618181818101010101012121012
-% 101010101218101210121010181016121010101010101010101010101018
-% 18181818181820181A181818121612101818181012161216101010101012
-% 1010181818181818181A1818181618181816181818181618181818101010
-% 101012121012101010101218101210121010181016121010101010101010
-% 10101010101818181818181820181A181818121612101818181012161216
-% 1010101010121010181818181818181A1818181618181816181818181618
-% 181818101010101012121012101010101218101210121010181016121010
-% 10101010101010101010101818181818181820181A181818121612101818
-% 1810121612161010101010121010181818181818181A1818181618181816
-% 181818181618181818101010101012121012101010101218101210121010
-% 18101612101010101010101010101010101818181818181820181A181818
-% 1216121018181810121612161010101010121010181818181818181A1818
-% 181618181816181818181618181818101010101012121012101010101218
-% 101210121010181016121010101010101010101010101018181818181818
-% 20181A181818121612101818181012161216101010101012101018181818
-% 1818181A1818181618181816181818181618181818101010101012121012
-% 101010101218101210121010181016121010101010101010101010101018
-% 18181818181820181A181818121612101818181012161216101010101012
-% 1010181818181818181A1818181618181816181818181618181818101010
-% 00FF181818181A1818181810181018181816181216121018101010121010
-% 101010101012101216181812181818181810101010101010101010101210
-% 18181A20211818181818101612101210101210181018181310100A080810
-% 10101216181A1818181818181A1818181810181018181816181216121018
-% 101010121010101010101012101216181812181818181810101010101010
-% 10101010121018181A202118181818181016121012101012101810181813
-% 10100A08081010101216181A1818181818181A1818181810181018181816
-% 181216121018101010121010101010101012101216181812181818181810
-% 10101010101010101010121018181A202118181818181016121012101012
-% 10181018181310100A08081010101216181A1818181818181A1818181810
-% 181018181816181216121018101010121010101010101012101216181812
-% 18181818181010101010101010101010121018181A202118181818181016
-% 12101210101210181018181310100A08081010101216181A181818181818
-% 1A1818181810181018181816181216121018101010121010101010101012
-% 10121618181218181818181010101010101010101010121018181A202118
-% 18181818101612101210101210181018181310100A08081010101216181A
-% 1818181818181A1818181810181018181816181216121018101010121010
-% 101010101012101216181812181818181810101010101010101010101210
-% 18181A20211818181818101612101210101210181018181310100A080810
-% 10101216181A1818181818181A1818181810181018181816181216121000
-% FF1818181818181A18101812121212181818181012101210101216181818
-% 181210121018101812181612181618181818101010101010101010101218
-% 1818201A1818181212181218101810121018101218161818101010081010
-% 10181818181A181818181818181A18101812121212181818181012101210
-% 101216181818181210121018101812181612181618181818101010101010
-% 1010101012181818201A1818181212181218101810121018101218161818
-% 10101008101010181818181A181818181818181A18101812121212181818
-% 181012101210101216181818181210121018101812181612181618181818
-% 1010101010101010101012181818201A1818181212181218101810121018
-% 10121816181810101008101010181818181A181818181818181A18101812
-% 121212181818181012101210101216181818181210121018101812181612
-% 1816181818181010101010101010101012181818201A1818181212181218
-% 10181012101810121816181810101008101010181818181A181818181818
-% 181A18101812121212181818181012101210101216181818181210121018
-% 1018121816121816181818181010101010101010101012181818201A1818
-% 18121218121810181012101810121816181810101008101010181818181A
-% 181818181818181A18101812121212181818181012101210101216181818
-% 181210121018101812181612181618181818101010101010101010101218
-% 1818201A1818181212181218101810121018101218161818101010081010
-% 10181818181A181818181818181A181018121212121818181810121000FF
-% 1A181A181A18181818121010101010181210101012101216121818181818
-% 1818181818121618121012101212161818101010121010100E1010101218
-% 181818181810101012101818181818101210121018181818121010101012
-% 1818181A18181A181A181A18181818121010101010181210101012101216
-% 121818181818181818181812161812101210121216181810101012101010
-% 0E1010101218181818181810101012101818181818101210121018181818
-% 1210101010121818181A18181A181A181A18181818121010101010181210
-% 101012101216121818181818181818181812161812101210121216181810
-% 1010121010100E1010101218181818181810101012101818181818101210
-% 1210181818181210101010121818181A18181A181A181A18181818121010
-% 101010181210101012101216121818181818181818181812161812101210
-% 1212161818101010121010100E1010101218181818181810101012101818
-% 1818181012101210181818181210101010121818181A18181A181A181A18
-% 181818121010101010181210101012101216121818181818181818181812
-% 1618121012101212161818101010121010100E1010101218181818181810
-% 1010121018181818181012101210181818181210101010121818181A1818
-% 1A181A181A18181818121010101010181210101012101216121818181818
-% 1818181818121618121012101212161818101010121010100E1010101218
-% 181818181810101012101818181818101210121018181818121010101012
-% 1818181A18181A181A181A1818181812101010101018121010101200FF18
-% 181818181818181810101010101018181012101010121012161818181818
-% 181818181818131612101010101212181012101010101010101010101216
-% 181812101210121012161818181818121010101012181818181210121018
-% 18181A181818181818181818181810101010101018181012101010121012
-% 161818181818181818181818131612101010101212181012101010101010
-% 101010101216181812101210121012161818181818121010101012181818
-% 18121012101818181A181818181818181818181810101010101018181012
-% 101010121012161818181818181818181818131612101010101212181012
-% 101010101010101010101216181812101210121012161818181818121010
-% 10101218181818121012101818181A181818181818181818181810101010
-% 101018181012101010121012161818181818181818181818131612101010
-% 101212181012101010101010101010101216181812101210121012161818
-% 18181812101010101218181818121012101818181A181818181818181818
-% 181810101010101018181012101010121012161818181818181818181818
-% 131612101010101212181012101010101010101010101216181812101210
-% 12101216181818181812101010101218181818121012101818181A181818
-% 181818181818181810101010101018181012101010121012161818181818
-% 181818181818131612101010101212181012101010101010101010101216
-% 181812101210121012161818181818121010101012181818181210121018
-% 18181A181818181818181818181810101010101018181012101000FF1818
-% 181818181818121010101010101818101010101218101012181818181818
-% 181818181816181818121010101012161218101012101010101010121012
-% 101010101010101212181818181818101210101010101216181216181818
-% 18181A181818181818181818121010101010101818101010101218101012
-% 181818181818181818181816181818121010101012161218101012101010
-% 101010121012101010101010101212181818181818101210101010101216
-% 18121618181818181A181818181818181818121010101010101818101010
-% 101218101012181818181818181818181816181818121010101012161218
-% 101012101010101010121012101010101010101212181818181818101210
-% 10101010121618121618181818181A181818181818181818121010101010
-% 101818101010101218101012181818181818181818181816181818121010
-% 101012161218101012101010101010121012101010101010101212181818
-% 18181810121010101010121618121618181818181A181818181818181818
-% 121010101010101818101010101218101012181818181818181818181816
-% 181818121010101012161218101012101010101010121012101010101010
-% 10121218181818181810121010101010121618121618181818181A181818
-% 181818181818121010101010101818101010101218101012181818181818
-% 181818181816181818121010101012161218101012101010101010121012
-% 101010101010101212181818181818101210101010101216181216181818
-% 18181A1818181818181818181210101010101018181010101000FF181818
-% 181818181810121010101010181618181216121010101210181810121818
-% 181818181818181818161210101018121612101010101010121010121010
-% 12101010101010101818181A181812101010100808101012101812171818
-% 181818181818181818181810121010101010181618181216121010101210
-% 181810121818181818181818181818161210101018121612101010101010
-% 12101012101012101010101010101818181A181812101010100808101012
-% 101812171818181818181818181818181810121010101010181618181216
-% 121010101210181810121818181818181818181818161210101018121612
-% 10101010101012101012101012101010101010101818181A181812101010
-% 100808101012101812171818181818181818181818181810121010101010
-% 181618181216121010101210181810121818181818181818181818161210
-% 10101812161210101010101012101012101012101010101010101818181A
-% 181812101010100808101012101812171818181818181818181818181810
-% 121010101010181618181216121010101210181810121818181818181818
-% 181818161210101018121612101010101010121010121010121010101010
-% 10101818181A181812101010100808101012101812171818181818181818
-% 181818181810121010101010181618181216121010101210181810121818
-% 181818181818181818161210101018121612101010101010121010121010
-% 12101010101010101818181A181812101010100808101012101812171818
-% 18181818181818181818181012101010101018161818121600FF12161818
-% 101810181210121010101212181818181812101010121613101210181618
-% 181818181818181818181010101216121012101216181810181012101216
-% 12101010FFFFFFFF18181818FFFFFFFF1010100AFFFFFFFF121612181818
-% 181812161818101810181210121010101212181818181812101010121613
-% FFFFFFFFFFFF18181818FFFF1818181810FFFFFFFF121012101216181810
-% 181012101216121010101010101818181818181818101010100A10FFFFFF
-% FFFFFF181818FFFFFFFF18181018FFFFFFFF121010101212181818181812
-% 1010101216131012101816181818181818181818181810101012161210FF
-% FFFFFF1818101810FFFFFFFF121010101010101818181818181818101010
-% 100A10101010121612181818181812161818101810181210121010FFFFFF
-% FF1818181812101010121613101210181618181818181818181818181010
-% 10121612101210121618181018101210121612FFFFFFFF1010181818FFFF
-% FFFF18101010100A10101010121612181818181812161818101810181210
-% 12101010121218181818181210FFFFFFFFFFFF121018FFFFFFFF18181818
-% FFFFFFFF1010101216121012101216181810181012101216121010101010
-% 10181818181818181810FFFFFFFFFFFF10101216FFFF1818181812FFFFFF
-% FF1810181210121010101212181818181812101010121613101210181618
-% 181818181818181818FFFFFFFF12161210FFFFFFFF18181018FFFFFFFF16
-% 121010101010101818181818181818101010100A10101010121612181818
-% 181812161818101810181210121010101212181818181800FF1012101012
-% 161210101010121012161818181A18181210181218181818101218121216
-% 181818181218181818181012101810181018101218181818181216121812
-% 1010FF101010FFFF181AFFFF1818FFFF1010FFFF100AFFFF101818181818
-% 121012101012161210101010121012161818181A18181210181218181818
-% FFFF18121216181818FFFF18181818FFFF1210FFFF181018101218181818
-% 1812161218121010101010101818181A20181818101210101010100AFFFF
-% 10181818FFFF1210FFFF1012FFFF1010FFFF121012161818181A18181210
-% 181218181818101218121216181818181218181818181012101810181018
-% 10FFFF181818FFFF1612FFFF1010101010101818181A2018181810121010
-% 1010100A101210181818181812101210101216121010101012FFFF1618FF
-% FF1A18181210181218181818101218121216181818181218181818181012
-% 101810181018101218181818181216121812101010FFFF101818FFFF2018
-% FFFF101210101010100A1012101818181818121012101012161210101010
-% 121012161818181A181812101812FFFF18181012FFFF1216FFFF1818FFFF
-% 1818FFFF1012101810181018101218181818181216121812101010101010
-% 1818181A201818181012FFFF1010100A101210FFFF18181812FFFF1010FF
-% FF1210101010121012161818181A18181210181218181818101218121216
-% 18181818121818FF181810FFFF1810FFFF1810FFFF1818FFFF1216FFFF12
-% 1010101010101818181A20181818101210101010100A1012101818181818
-% 121012101012161210101010121012161818181A181800FF181818181810
-% 1216121612161218181818181A1818181010101010121018101010101218
-% 18181810121010101018181012101812181816181A181818181816181818
-% 1818101010FFFF1216FFFF1818FFFF1210FFFF1010FFFF10101012101818
-% 1818181818101216121612161218181818181A1818181010101010121018
-% FFFF10101218181818FFFF101010FFFF1810FFFF1812181816181A181818
-% 181816181818181810101010101216181818181810121010101010FFFF10
-% 101012FFFF1818FFFF1818FFFF1612FFFF161218181818181A1818181010
-% 101010121018101010101218181818101210101010181810121018121818
-% 16FFFF1818FFFF1816FFFF18181810101010101216181818181810121010
-% 101010101010101012101818181818181810121612161216FFFF1818FFFF
-% 1A1818181010101010121018101010101218181818101210101010181810
-% 12101812181816181A181818181816181818181810FFFF1010FFFF1818FF
-% FF1810121010101010101010101012101818181818181810121612161216
-% 1218181818181A181818101010FFFF12101810FFFF1012FFFF1818FFFF10
-% 10FFFF18181012101812181816181A181818181816181818181810101010
-% 10121618181818181012FFFF10101010101010FFFF101818FFFF1818FFFF
-% 1216121612161218181818181A1818181010101010121018101010101218
-% 18181810121010101018FFFF1210FFFF1818FFFF1A18FFFF1818FFFF1818
-% 181810101010101216181818181810121010101010101010101012101818
-% 1818181818101216121612161218181818181A181800FF1A181818101210
-% 181012101216181818181818181818181010101010101010101010101216
-% 1818181010121012181810101216121618181818181AFFFFFFFFFFFF1818
-% 16181818FFFF1012FFFF1810FFFF1010FFFF1210FFFF101210121618181A
-% 18181810121018101210121618181818181818FFFFFFFFFFFF1010101010
-% FFFF101012161818FFFF101210FFFF1810FFFF16121618181818181A1818
-% 18181818181816181818101010121810FFFFFFFFFFFF10101210FFFF1012
-% 1012FFFF181AFFFF1810FFFF1810FFFF1216181818181818181818181010
-% 101010101010101010101216181818101012FFFFFFFFFFFF121612FFFFFF
-% FFFF181AFFFF1818FFFF1818161818181010101218101810181210101010
-% 12101010101210121618181A1818181012101810121012FFFF1818FFFF18
-% 181818181010101010101010101010101216181818101012101218181010
-% 1216121618181818181A18181818181818FFFFFFFFFF1010FFFF1810FFFF
-% 18121010101012101010101210121618181A181818101210181012101216
-% 181818181818181818181010FFFF10101010FFFF1010FFFF1818FFFF1012
-% FFFF181810101216121618181818181A1818181818181818161818181010
-% 10121810181018121010FFFF121010101012FFFF161818FFFF1818FFFF10
-% 181012101216181818181818181818181010101010101010101010101216
-% 181818101012101218FFFF1012FFFF1618FFFF1818FFFF1818FFFF181818
-% 16181818101010121810181018121010101012101010101210121618181A
-% 181818101210181012101216181818181818181800FF1818181818111813
-% 161216121818181818181A18181818101010101010100A10101010101218
-% 181818181012161218101210181318181818181818181818181012161318
-% 18FFFFFF101012FFFFFFFFFF101012FFFF1618FFFF12161818FFFF181818
-% 181818111813161216121818181818181A18181818101010101010100A10
-% FFFF1010121818FFFF181012FFFF1810FFFF18131818FFFF181818181818
-% 18101216131818181812101012101012101810101210121618FFFF121618
-% 1818FFFFFFFF181818FFFF1316FFFF12181818FFFF181A18181818101010
-% 101010100A1010101010121818181818101216121810121018FFFF1818FF
-% FF1818FFFF1818FFFF16131818FFFF121010121010121018101012101216
-% 18161812161818181818181818181811181316121612FFFF1818FFFF1A18
-% 1818FFFF1010101010100A10101010101218181818181012161218101210
-% 181318181818181818181818181012FFFF1818FFFF1210FFFF1010FFFF18
-% 101012FFFF16181618121618181818181818181818111813161216121818
-% 181818181A181818181010FFFF1010100A10FFFFFFFF121818FFFF1810FF
-% FF12181012FFFF1318181818181818181818181012161318181818121010
-% 12101012101810101210FFFF1816181216FFFF181818FFFF1818FFFF1813
-% 1612FFFF1818181818181A18181818101010101010100A10101010101218
-% 181818181012FFFFFF101210FFFFFFFFFF181818FFFF1818FFFF12161318
-% FFFF18121010121010121018101012101216181618121618181818181818
-% 181818111813161216121818181818181A181800FF1A1818181818161818
-% 1210121618181A181A181818181810101010101010101010081010101818
-% 181818181018161216121810181018101818181818181810101012181818
-% 1818FFFF1010FFFF121012101210FFFF1818FFFF181818FF1818FF1A1818
-% 1818181618181210121618181A181A18181818181010101010FFFF1010FF
-% FF101010181818FFFF1810FFFF1216FFFF101810FF1018FF181818181810
-% 101012181818181818181010101012101210121012161818FFFF18181818
-% FFFF181AFFFF1818FFFF1818FFFF121618FF1A18FF181818181810101010
-% 101010101010081010101818181818181018161216121810FFFF1810FFFF
-% 1818FFFF1810FFFF121818FF1818FF181010101012101210121012161818
-% 1818181818181818181A1818181818161818121012FFFF181AFFFF181818
-% FF1810FF1010101010101010081010101818181818181018161216121810
-% 1810181018181818181818101010FFFF1818FFFF1818FFFF1010FFFF1210
-% 12FF1216FF181818181818181818181A1818181818161818121012161818
-% 1A181A18181818181010FFFF10101010FFFF0810FFFF1818FFFF1818FFFF
-% 161216FF1810FF1018101818181818181810101012181818181818181010
-% 1010121012FFFF1012FFFF181818181818FFFF1818FFFF1818FFFF161818
-% FF1012FF18181A181A181818181810101010101010101010081010101818
-% 18181818101816FFFF1218FFFF101810181818FFFF1818FFFF101218FF18
-% 18FF181810101010121012101210121618181818181818181818181A1818
-% 1818181618181210121618181A181A18181800FF18181818181818181712
-% 16181818181818181A181818181118121012101010101010080E10101818
-% 181818181210121018101810121812101818181817181218181816FF1818
-% 18FFFF181810FFFF1810181012FFFF1818FFFF181818FF1818FF18181818
-% 18181818171216181818181818181A181818181118121012FFFF1010FFFF
-% 080EFF101818FFFF1818FFFF1210FFFF181012FF1210FF18181817181218
-% 181816181818181818181810121018101810121018FFFFFFFF18181818FF
-% FF1818FFFF1818FFFF1817FFFF181818FF1818FF1A181818181118121012
-% 101010101010080E101018181818181812101210181018FFFF1812FFFF18
-% 18FFFF1812FFFF181618FF1818FF18181810121018101810121018181818
-% 1818181818181818181818181818181817121618FFFF1818FFFF1A1818FF
-% 1811FF121012101010101010080E10101818181818181210121018101810
-% 12181210181818181718121818FFFF1818FFFF1818FFFF1012FFFF101810
-% FF1018FF1818181818181818181818181818181818181712161818181818
-% 18181A18181818FFFFFFFF12101010FFFF1008FFFF1018FFFF1818FFFF10
-% 1210FF1018FF121812101818181817181218181816181818181818181810
-% 12101810FFFF1210FFFF1818FF181818FFFF1818FFFF1818FFFF181817FF
-% 1618FF18181818181A181818181118121012101010101010080E10101818
-% 1818FF181210FFFF181018FFFF1812101818FFFF1718FFFF181816FF1818
-% FF1818181810121018101810121018181818181818181818181818181818
-% 18181818171216181818181818181A181800FF18181818181A1818181812
-% 181818181818181818181618181612161810121012101010101010101218
-% 161818181018181316131810121010121612181812161818181818FFFFFF
-% FF1818181718FFFFFFFF101210FFFFFFFF1818181818FFFF181818181818
-% 1A1818181812181818181818181818181618181612161810FFFFFFFF1010
-% 10FFFFFFFFFFFF181818FFFFFFFF1613181012FFFF121612181812161818
-% 18181810181218181818171818181210101210121218FFFF1818181818FF
-% FFFFFF1818181AFFFFFFFF1218181818FFFF181818181618181612161810
-% 1210121010101010101012181618181810181813161318FFFFFFFF121612
-% 18FFFFFFFF1818181810FFFF181818181718181812101012101212181818
-% 1818181818181818181818181A18181818121818FFFFFFFF1818181816FF
-% FF1612161810121012101010101010101218161818181018181316131810
-% 12101012161218181216181818FFFFFFFF12181818FFFFFFFF1812101012
-% FFFF121818181818181818181818181818181A1818181812181818181818
-% 1818181816181816FFFF1810121012FFFFFFFF10101012FFFFFFFF181018
-% 1813FFFF1810121010121612181812161818181818101812181818181718
-% 18181210FFFFFFFF121818FFFFFFFFFFFF181818FFFFFFFF1A18181818FF
-% FF1818181818181818181618181612161810121012101010101010101218
-% 1618FFFFFFFF1813161318FFFFFFFF121612FFFFFFFF1818181818FFFF12
-% 181818181718181812101012101212181818181818181818181818181818
-% 1A18181818121818181818181818181800FF18181A181818181818181718
-% 181818121818181818121210121012101216121012101210101010101012
-% 181613101216181812161210121010121618181018181818181816121618
-% 18181818181612161210101010121018181818181A18181818181A181818
-% 181818181718181818121818181818121210121012101216121012101210
-% 101010101012181613101216181812161210121010121618181018181818
-% 18181612161818181818181612161210101010121018181818181A181818
-% 18181A181818181818181718181818121818181818121210121012101216
-% 121012101210101010101012181613101216181812161210121010121618
-% 181018181818181816121618181818181816121612101010101210181818
-% 18181A18181818181A181818181818181718181818121818181818121210
-% 121012101216121012101210101010101012181613101216181812161210
-% 121010121618181018181818181816121618181818181816121612101010
-% 10121018181818181A18181818181A181818181818181718181818121818
-% 181818121210121012101216121012101210101010101012181613101216
-% 181812161210121010121618181018181818181816121618181818181816
-% 12161210101010121018181818181A18181818181A181818181818181718
-% 181818121818181818121210121012101216121012101210101010101012
-% 181613101216181812161210121010121618181018181818181816121618
-% 18181818181612161210101010121018181818181A18181818181A181818
-% 18181818171818181812181818181800FF1818181818181A181818181818
-% 181818161818161810101010101010121012181612101010100A10101210
-% 181810121818181018101010101010121810181018181618181818181018
-% 1818181612101810121010101010181612181818181A181818181818181A
-% 181818181818181818161818161810101010101010121012181612101010
-% 100A10101210181810121818181018101010101010121810181018181618
-% 1818181810181818181612101810121010101010181612181818181A1818
-% 18181818181A181818181818181818161818161810101010101010121012
-% 181612101010100A10101210181810121818181018101010101010121810
-% 181018181618181818181018181818161210181012101010101018161218
-% 1818181A181818181818181A181818181818181818161818161810101010
-% 101010121012181612101010100A10101210181810121818181018101010
-% 101010121810181018181618181818181018181818161210181012101010
-% 1010181612181818181A181818181818181A181818181818181818161818
-% 161810101010101010121012181612101010100A10101210181810121818
-% 181018101010101010121810181018181618181818181018181818161210
-% 1810121010101010181612181818181A181818181818181A181818181818
-% 181818161818161810101010101010121012181612101010100A10101210
-% 181810121818181018101010101010121810181018181618181818181018
-% 1818181612101810121010101010181612181818181A181818181818181A
-% 181818181818181818161818161800FF181818181A181818181818181818
-% 181818181818181818101012101010101018121810181010101012161818
-% 181818161817181818181810101010101218181012121818181812101210
-% 12101210121816121010101010101010101216181810181818181A181818
-% 181818181818181818181818181818101012101010101018121810181010
-% 101012161818181818161817181818181810101010101218181012121818
-% 181812101210121012101218161210101010101010101012161818101818
-% 18181A181818181818181818181818181818181818101012101010101018
-% 121810181010101012161818181818161817181818181810101010101218
-% 181012121818181812101210121012101218161210101010101010101012
-% 16181810181818181A181818181818181818181818181818181818101012
-% 101010101018121810181010101012161818181818161817181818181810
-% 101010101218181012121818181812101210121012101218161210101010
-% 10101010101216181810181818181A181818181818181818181818181818
-% 181818101012101010101018121810181010101012161818181818161817
-% 181818181810101010101218181012121818181812101210121012101218
-% 16121010101010101010101216181810181818181A181818181818181818
-% 181818181818181818101012101010101018121810181010101012161818
-% 181818161817181818181810101010101218181012121818181812101210
-% 12101210121816121010101010101010101216181810181818181A181818
-% 1818181818181818181818181800FF1818181A1E181A1818181612101218
-% 181818181818101810121010101010101218171818101210101018181818
-% 181818181818171818161012101210121010101010101010121612161216
-% 1218101810121010101010101010101010121810181818181A1E181A1818
-% 181612101218181818181818101810121010101010101218171818101210
-% 101018181818181818181818171818161012101210121010101010101010
-% 121612161216121810181012101010101010101010101012181018181818
-% 1A1E181A1818181612101218181818181818101810121010101010101218
-% 171818101210101018181818181818181818171818161012101210121010
-% 101010101010121612161216121810181012101010101010101010101012
-% 1810181818181A1E181A1818181612101218181818181818101810121010
-% 101010101218171818101210101018181818181818181818171818161012
-% 101210121010101010101010121612161216121810181012101010101010
-% 1010101010121810181818181A1E181A1818181612101218181818181818
-% 101810121010101010101218171818101210101018181818181818181818
-% 171818161012101210121010101010101010121612161216121810181012
-% 1010101010101010101010121810181818181A1E181A1818181612101218
-% 181818181818101810121010101010101218171818101210101018181818
-% 181818181818171818161012101210121010101010101010121612161216
-% 1218101810121010101010101010101010121810181818181A1E181A1818
-% 18161210121818181818181800FF1818181A181A18181812101210101012
-% 161218101818181010101010101010121612181818181812181818181818
-% 181818181818181818181816121010121012101010101010121012101210
-% 101012101210101210100810100F1010101012181818181A181A18181812
-% 101210101012161218101818181010101010101010121612181818181812
-% 181818181818181818181818181818181816121010121012101010101010
-% 121012101210101012101210101210100810100F1010101012181818181A
-% 181A18181812101210101012161218101818181010101010101010121612
-% 181818181812181818181818181818181818181818181816121010121012
-% 101010101010121012101210101012101210101210100810100F10101010
-% 12181818181A181A18181812101210101012161218101818181010101010
-% 101010121612181818181812181818181818181818181818181818181816
-% 121010121012101010101010121012101210101012101210101210100810
-% 100F1010101012181818181A181A18181812101210101012161218101818
-% 181010101010101010121612181818181812181818181818181818181818
-% 181818181816121010121012101010101010121012101210101012101210
-% 101210100810100F1010101012181818181A181A18181812101210101012
-% 161218101818181010101010101010121612181818181812181818181818
-% 181818181818181818181816121010121012101010101010121012101210
-% 101012101210101210100810100F1010101012181818181A181A18181812
-% 101210101012161218101800FF1818181A18181A18181810101010121012
-% 101212161218101010100A1010101012181818181818181818181A181818
-% 181818161812181818181818101210101810101010101010121613181018
-% 1218161818181010100A100B101010101010181818181A18181A18181810
-% 101010121012101212161218101010100A10101010121818181818181818
-% 18181A181818181818161812181818181818101210101810101010101010
-% 1216131810181218161818181010100A100B101010101010181818181A18
-% 181A18181810101010121012101212161218101010100A10101010121818
-% 18181818181818181A181818181818161812181818181818101210101810
-% 1010101010101216131810181218161818181010100A100B101010101010
-% 181818181A18181A18181810101010121012101212161218101010100A10
-% 10101012181818181818181818181A181818181818161812181818181818
-% 1012101018101010101010101216131810181218161818181010100A100B
-% 101010101010181818181A18181A18181810101010121012101212161218
-% 101010100A1010101012181818181818181818181A181818181818161812
-% 181818181818101210101810101010101010121613181018121816181818
-% 1010100A100B101010101010181818181A18181A18181810101010121012
-% 101212161218101010100A1010101012181818181818181818181A181818
-% 181818161812181818181818101210101810101010101010121613181018
-% 1218161818181010100A100B101010101010181818181A18181A18181810
-% 1010101210121012121600FF1818181A181A181818181210121010121010
-% 10101210121818101010100810121618181A181A181818181A1818181818
-% 181012121816181212181018161010181818181810101012161216101316
-% 101818181818181010100E101010101010181818181A181A181818181210
-% 12101012101010101210121818101010100810121618181A181A18181818
-% 1A1818181818181012121816181212181018161010181818181810101012
-% 161216101316101818181818181010100E101010101010181818181A181A
-% 18181818121012101012101010101210121818101010100810121618181A
-% 181A181818181A1818181818181012121816181212181018161010181818
-% 181810101012161216101316101818181818181010100E10101010101018
-% 1818181A181A181818181210121010121010101012101218181010101008
-% 10121618181A181A181818181A1818181818181012121816181212181018
-% 161010181818181810101012161216101316101818181818181010100E10
-% 1010101010181818181A181A181818181210121010121010101012101218
-% 18101010100810121618181A181A181818181A1818181818181012121816
-% 181212181018161010181818181810101012161216101316101818181818
-% 181010100E101010101010181818181A181A181818181210121010121010
-% 10101210121818101010100810121618181A181A181818181A1818181818
-% 181012121816181212181018161010181818181810101012161216101316
-% 101818181818181010100E101010101010181818181A181A181818181210
-% 12101012101010101200FF10181818181818181818161216121810181018
-% 1012101018181610101010081012161818181818181A1818181818181810
-% 1210101012181010101210121818181818181A1818121818121818181218
-% 181818181818161210101010101010101210181818181818181818161216
-% 1218101810181012101018181610101010081012161818181818181A1818
-% 1818181818101210101012181010101210121818181818181A1818121818
-% 121818181218181818181818161210101010101010101210181818181818
-% 181818161216121810181018101210101818161010101008101216181818
-% 1818181A1818181818181810121010101218101010121012181818181818
-% 1A1818121818121818181218181818181818161210101010101010101210
-% 181818181818181818161216121810181018101210101818161010101008
-% 1012161818181818181A1818181818181810121010101218101010121012
-% 1818181818181A1818121818121818181218181818181818161210101010
-% 101010101210181818181818181818161216121810181018101210101818
-% 1610101010081012161818181818181A1818181818181810121010101218
-% 1010101210121818181818181A1818121818121818181218181818181818
-% 161210101010101010101210181818181818181818161216121810181018
-% 1012101018181610101010081012161818181818181A1818181818181810
-% 1210101012181010101210121818181818181A1818121818121818181218
-% 181818181818161210101010101010101210181818181818181818161216
-% 121810181018101200FF1012161818181818101210121018181818181312
-% 101010101212181810121012101818181818181818181A18181818101210
-% 10101012161010121012101210181818181818181810181618101818FF12
-% 101010121818181010101010101010101012161818181818101210121018
-% 18181818131210101010121218181012101210181818181818FF18181A18
-% 181818101210101010121610101210121012101818181818181818101816
-% 18101818161210101012181818101010101010101010FF12161818181818
-% 101210121018181818181312101010101212181810121012101818181818
-% 181818181A181818181012101010101216101012FF121012101818181818
-% 181818101816181018181612101010121818181010101010101010101012
-% 1618181818181012101210181818181813FF101010101212181810121012
-% 101818181818181818181A18181818101210101010121610101210121012
-% 1018181818181818181018161810FF181612101010121818181010101010
-% 101010101012161818181818101210121018181818181312101010101212
-% 181810121012101818181818FF1818181A18181818101210101010121610
-% 101210121012101818181818181818101816181018181612101010121818
-% 181010101010101010FF1012161818181818101210121018181818181312
-% 101010101212181810121012101818181818181818181A18181818101210
-% 10101012161010FF10121012101818181818181818101816181018181612
-% 101010121818181010101010101010101012161818181818101210121018
-% 1818181813121000FF101218161818101010101010101818181818181010
-% 101010101618181816101018181818181818181818181818181012101010
-% 101010121010101210101210181812161218181A18181218181810FF1010
-% 101010101218101010121010101010101218161818101010101010101818
-% 181818181010101010101618181816101018181818181818FF1818181818
-% 181012101010101010121010101210101210181812161218181A18181218
-% 181810181010101010101218101010121010101010FF1218161818101010
-% 101010101818181818181010101010101618181816101018181818181818
-% 18181818181818101210101010101012101010FF10101210181812161218
-% 181A18181218181810181010101010101218101010121010101010101218
-% 16181810101010101010181818181818FF10101010101618181816101018
-% 181818181818181818181818181012101010101010121010101210101210
-% 181812161218181A1818121818FF10181010101010101218101010121010
-% 101010101218161818101010101010101818181818181010101010101618
-% 1818161010181818181818FF181818181818181012101010101010121010
-% 101210101210181812161218181A18181218181810181010101010101218
-% 1010101210101010FF101218161818101010101010101818181818181010
-% 101010101618181816101018181818181818181818181818181012101010
-% 101010121010FF1210101210181812161218181A18181218181810181010
-% 101010101218101010121010101010101218161818101010101010101818
-% 18181818101000FF10101012101012101010101012181818181818181010
-% 080A10101012181818181818181818181218181818171812181010101010
-% 101012181810101012161818161816181618171A181818101218FF181812
-% 101010101018121610101210101010101012101012101010101012181818
-% 181818181010080A101010121818181818181818181812FF181818171812
-% 181010101010101012181810101012161818161816181618171A18181810
-% 1218181818121010101010181216101012101010FF101012101012101010
-% 101012181818181818181010080A10101012181818181818181818181218
-% 181818171812181010101010101012181810FF1012161818161816181618
-% 171A18181810121818181812101010101018121610101210101010101012
-% 101012101010101012181818181818FF1010080A10101012181818181818
-% 181818181218181818171812181010101010101012181810101012161818
-% 161816181618171A18181810FF1818181812101010101018121610101210
-% 101010101012101012101010101012181818181818181010080A10101012
-% 18181818181818181818FF18181818171812181010101010101012181810
-% 101012161818161816181618171A18181810121818181812101010101018
-% 12161010121010FF10101012101012101010101012181818181818181010
-% 080A10101012181818181818181818181218181818171812181010101010
-% 1010121818FF101012161818161816181618171A18181810121818181812
-% 101010101018121610101210101010101012101012101010101012181818
-% 181818181000FF1210121018101810101010101012161818181A18181010
-% 101010101010101018181818181818161818181818101810121010101010
-% 12181818181612101210181818181818181818181818181618FF18181710
-% 101210121612101210101818101210121018101810101010101012161818
-% 181A1818101010101010101010101818181818181816FF18181818101810
-% 121010101010121818181816121012101818181818181818181818181816
-% 18181818171010121012161210121010181810FF10121018101810101010
-% 101012161818181A18181010101010101010101018181818181818161818
-% 1818181018101210101010101218181818FF121012101818181818181818
-% 181818181816181818181710101210121612101210101818101210121018
-% 101810101010101012161818181AFF181010101010101010101018181818
-% 181818161818181818101810121010101010121818181816121012101818
-% 1818181818181818181818FF181818181710101210121612101210101818
-% 101210121018101810101010101012161818181A18181010101010101010
-% 101018181818181818FF1818181818101810121010101010121818181816
-% 121012101818181818181818181818181816181818181710101210121612
-% 101210101818FF1210121018101810101010101012161818181A18181010
-% 101010101010101018181818181818161818181818101810121010101010
-% 12181818FF16121012101818181818181818181818181816181818181710
-% 101210121612101210101818101210121018101810101010101012161818
-% 181A181800FF181818181818181810121210121012181818181818181010
-% 101010101010101012161818181818181718121612101210101210121818
-% 181818181818101210181818181818181818181818181811FF1218181818
-% 161210181018101818181818181818181818181810121210121012181818
-% 181818181010101010101010101012161818181818FF1718121612101210
-% 101210121818181818181818101210181818181818181818181818181811
-% 181218181818161210181018101818181818FF1818181818181810121210
-% 121012181818181818181010101010101010101012161818181818181718
-% 12161210121010121012181818181818FF18101210181818181818181818
-% 181818181811181218181818161210181018101818181818181818181818
-% 18181012121012101218181818FF18181010101010101010101012161818
-% 181818181718121612101210101210121818181818181818101210181818
-% 18181818181818181818FF11181218181818161210181018101818181818
-% 181818181818181810121210121012181818181818181010101010101010
-% 1010121618181818FF181718121612101210101210121818181818181818
-% 101210181818181818181818181818181811181218181818161210181018
-% 1018181818FF181818181818181810121210121012181818181818181010
-% 101010101010101012161818181818181718121612101210101210121818
-% 181818FF1818101210181818181818181818181818181811181218181818
-% 161210181018101818181818181818181818181810121210121012181818
-% 18181800FF1A181818181818181818101010101012181818181818101810
-% 121010101010101210181218181818181612181012101010101010181818
-% 18181A1818101010121012161216121012101818181818FF101210181818
-% 1012101210121818181A181A181818181818181818101010101012181818
-% 1818181018101210101010101012101812181818FF181612181012101010
-% 10101018181818181A181810101012101216121612101210181818181810
-% 1012101818181012101210121818181A18FF181818181818181818101010
-% 101012181818181818101810121010101010101210181218181818181612
-% 18101210101010101018181818181AFF1810101012101216121612101210
-% 1818181818101012101818181012101210121818181A181A181818181818
-% 181818101010101012181818FF1818101810121010101010101210181218
-% 18181818161218101210101010101018181818181A181810101012101216
-% 121612101210181818FF18101012101818181012101210121818181A181A
-% 181818181818181818101010101012181818181818101810121010101010
-% 10121018121818FF1818161218101210101010101018181818181A181810
-% 101012101216121612101210181818181810101210181818101210121012
-% 1818181AFF1A181818181818181818101010101012181818181818101810
-% 121010101010101210181218181818181612181012101010101010181818
-% 1818FF181810101012101216121612101210181818181810101210181818
-% 1012101210121818181A181A181818181818181818101010101012181818
-% 181800FF1818181818181818181818121010101210121018101812101216
-% 181018121610101210181718181818181810181012101010121818181A18
-% 18181818181010101010101010101010101216181810FF10101018121210
-% 101810121018181818181818181818181818181818121010101210121018
-% 10181210121618101812161010121018171818FF18181810181012101010
-% 121818181A18181818181810101010101010101010101012161818101210
-% 10101812121010181012101818181818FF18181818181818181818121010
-% 101210121018101812101216181018121610101210181718181818181810
-% 181012101010121818181A181818FF181810101010101010101010101012
-% 161818101210101018121210101810121018181818181818181818181818
-% 1818181210101012101210FF101812101216181018121610101210181718
-% 181818181810181012101010121818181A18181818181810101010101010
-% 1010101010121618FF101210101018121210101810121018181818181818
-% 181818181818181818121010101210121018101812101216181018121610
-% 101210181718FF1818181810181012101010121818181A18181818181810
-% 101010101010101010101012161818101210101018121210101810121018
-% 181818FF1818181818181818181818121010101210121018101812101216
-% 181018121610101210181718181818181810181012101010121818181A18
-% 18FF18181810101010101010101010101012161818101210101018121210
-% 101810121018181818181818181818181818181818121010101210121018
-% 1000FF1A1818181818181818181818181210101010101012101018101218
-% 1818181A181012101818181818181818181817181012101216181818181A
-% 181818121010101010101010101010101012181618FF1012101210101010
-% 1210181018161818181A1818181818181818181818181210101010101012
-% 1010181012181818181A1810121018181818FF1818181818171810121012
-% 16181818181A181818121010101010101010101010101012181618181012
-% 101210101010121018101816181818FF1818181818181818181818181210
-% 1010101010121010181012181818181A1810121018181818181818181818
-% 17181012101216181818181A18FF18121010101010101010101010101012
-% 1816181810121012101010101210181018161818181A1818181818181818
-% 18181818121010101010FF121010181012181818181A1810121018181818
-% 18181818181817181012101216181818181A181818121010101010101010
-% 10101010101218FF181810121012101010101210181018161818181A1818
-% 1818181818181818181812101010101010121010181012181818181A1810
-% 1210181818FF18181818181817181012101216181818181A181818121010
-% 101010101010101010101012181618181012101210101010121018101816
-% 1818FF1A1818181818181818181818181210101010101012101018101218
-% 1818181A181012101818181818181818181817181012101216181818181A
-% FF1818121010101010101010101010101012181618181012101210101010
-% 1210181018161818181A1818181818181818181818181210101010101012
-% 00FF18181818181012101817181818181810121010121010121012161818
-% 18181818181810181818181818181818181818181816181818181A181818
-% 1816181818101010101010101010101010101218FF181818181612161216
-% 121012101218181818181818181012101817181818181810121010121010
-% 1210121618181818181818181018181818FF181818181818181818161818
-% 18181A181818181618181810101010101010101010101010121818181818
-% 1816121612161210121012181818FF181818181012101817181818181810
-% 121010121010121012161818181818181818101818181818181818181818
-% 18181816181818181A181818FF1618181810101010101010101010101010
-% 121818181818181612161216121012101218181818181818181012101817
-% 181818181810121010FF1010121012161818181818181818101818181818
-% 18181818181818181816181818181A181818181618181810101010101010
-% 101010101010FF1818181818181612161216121012101218181818181818
-% 181012101817181818181810121010121010121012161818181818181818
-% 10181818FF1818181818181818181816181818181A181818181618181810
-% 101010101010101010101010121818181818181612161216121012101218
-% 18FF18181818181012101817181818181810121010121010121012161818
-% 18181818181810181818181818181818181818181816181818181A1818FF
-% 181618181810101010101010101010101010121818181818181612161216
-% 121012101218181818181818181012101817181818181810121010121000
-% FF1818111210101010121818181818181818181210101210101210121810
-% 121618181818181818181A1818181818181818181818181818181A181818
-% 18181818101210121010121010101010101818FF20191818181818181818
-% 101010121012181818111210101010121818181818181818181210101210
-% 10121012181012161818181818181818FF18181818181818181818181818
-% 18181A181818181818181012101210101210101010101018181820191818
-% 18181818181810101012101218FF18111210101010121818181818181818
-% 181210101210101210121810121618181818181818181A18181818181818
-% 18181818181818181A1818FF181818181012101210101210101010101018
-% 181820191818181818181818101010121012181818111210101010121818
-% 1818181818181812FF101210101210121810121618181818181818181A18
-% 18181818181818181818181818181A181818181818181012101210101210
-% 1010101010FF181820191818181818181818101010121012181818111210
-% 101010121818181818181818181210101210101210121810121618181818
-% 181818FF1A1818181818181818181818181818181A181818181818181012
-% 101210101210101010101018181820191818181818181818101010121012
-% FF1818111210101010121818181818181818181210101210101210121810
-% 121618181818181818181A1818181818181818181818181818181A18FF18
-% 181818181012101210101210101010101018181820191818181818181818
-% 1010101210121818181112101010101218181818181818181812101000FF
-% 181818161812181612101212181818181018101813181818181612161818
-% 181818181818181A181818181A1818181812101316181818181818181812
-% 101210121012161818181010101010101018FF1818181818181810181818
-% 181012101018181818161812181612101212181818181018101813181818
-% 181612161818181818181818181A18FF18181A1818181812101316181818
-% 181818181812101210121012161818181010101010101018181818181818
-% 181810181818181012101018FF1818161812181612101212181818181018
-% 101813181818181612161818181818181818181A181818181A1818181812
-% 10131618181818181818FF12101210121012161818181010101010101018
-% 181818181818181810181818181012101018181818161812181612101212
-% 18181818101810FF13181818181612161818181818181818181A18181818
-% 1A1818181812101316181818181818181812101210121012161818181010
-% 10101010FF18181818181818181810181818181012101018181818161812
-% 181612101212181818181018101813181818181612161818181818181818
-% 181AFF1818181A1818181812101316181818181818181812101210121012
-% 1618181810101010101010181818181818181818101818181810121010FF
-% 181818161812181612101212181818181018101813181818181612161818
-% 181818181818181A181818181A1818181812101316181818181818FF1812
-% 101210121012161818181010101010101018181818181818181810181818
-% 18101210101818181816181218161210121218181818101810181300FF10
-% 181018101818181818101618181818181818181816181212101210121818
-% 181818181818181818181818181A18181618181818181818181818181610
-% 1012101012101810181210121010101210FF101217181818101818181810
-% 121010101810181018101818181818101618181818181818181816181212
-% 1012101218181818181818181818FF181818181A18181618181818181818
-% 181818181610101210101210181018121012101010121012101217181818
-% 1018181818101210101018FF181018101818181818101618181818181818
-% 181816181212101210121818181818181818181818181818181A18181618
-% 181818181818181818FF1610101210101210181018121012101010121012
-% 101217181818101818181810121010101810181018101818181818101618
-% 181818181818FF1816181212101210121818181818181818181818181818
-% 181A18181618181818181818181818181610101210101210181018121012
-% 101010FF1012101217181818101818181810121010101810181018101818
-% 181818101618181818181818181816181212101210121818181818181818
-% 18FF18181818181A18181618181818181818181818181610101210101210
-% 18101812101210101012101210121718181810181818181012101010FF10
-% 181018101818181818101618181818181818181816181212101210121818
-% 181818181818181818181818181A181816181818181818181818FF181610
-% 101210101210181018121012101010121012101217181818101818181810
-% 121010101810181018101818181818101618181818181818181800FF1012
-% 121212101018181818181210121018121612161210101010101010101018
-% 181818181818181818181A18181818181818181818181818181818181813
-% 10101210121012181010101010101010FFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF18181813
-% 101012101210121810101010101010101012181812181618101210121010
-% 1010101210121212121010181818181812101210181216121600FF121010
-% 101010121810181818161010121010101210121612101010101010101012
-% 10161818181818181A1820181A1818181818181818181818181818181618
-% 101010101012101812121012101012101012101817121210181618101210
-% 101010121010101010121810181818161010121010101210121612101010
-% 10101010101210161818181818181A1820181A1818181818181818181818
-% 181818181618101010101012101812121012101012101012101817121210
-% 181618101210101010121010101010121810181818161010121010101210
-% 12161210101010101010101210161818181818181A1820181A1818181818
-% 181818181818181818181618101010101012101812121012101012101012
-% 101817121210181618101210101010121010101010121810181818161010
-% 12101010121012161210101010101010101210161818181818181A182018
-% 1A1818181818181818181818181818181618101010101012101812121012
-% 101012101012101817121210181618101210101010121010101010121810
-% 181818161010121010101210121612101010101010101012101618181818
-% 18181A1820181A1818181818181818181818181818181618101010101012
-% 101812121012101012101012101817121210181618101210101010121010
-% 101010121810181818161010121010101210121612101010101010101012
-% 10161818181818181A1820181A1818181818181818181818181818181618
-% 101010101012101812121012101012101012101817121210181618101210
-% 10101012101010101012181018181816101012101010121000FF10101012
-% 101210101218181810121012161218121612101010101008100E10101010
-% 12121618181818181A181818181818181818181818181818181818181810
-% 101010101012101817181612101010121618181818101618181816181618
-% 181010101012101210101218181810121012161218121612101010101008
-% 100E1010101012121618181818181A181818181818181818181818181818
-% 181818181810101010101012101817181612101010121618181818101618
-% 181816181618181010101012101210101218181810121012161218121612
-% 101010101008100E1010101012121618181818181A181818181818181818
-% 181818181818181818181810101010101012101817181612101010121618
-% 181818101618181816181618181010101012101210101218181810121012
-% 161218121612101010101008100E1010101012121618181818181A181818
-% 181818181818181818181818181818181810101010101012101817181612
-% 101010121618181818101618181816181618181010101012101210101218
-% 181810121012161218121612101010101008100E10101010121216181818
-% 18181A181818181818181818181818181818181818181810101010101012
-% 101817181612101010121618181818101618181816181618181010101012
-% 101210101218181810121012161218121612101010101008100E10101010
-% 12121618181818181A181818181818181818181818181818181818181810
-% 101010101012101817181612101010121618181818101618181816181618
-% 181010101012101210101218181810121012161218121600FF1012101010
-% 101010101012181818181012101010101210121010101010101010101010
-% 1012181818181A18181A1818181818171818121618181818181618181010
-% 101008101018181818181818181613181818181818121818181818181818
-% 101012101010101010101012181818181012101010101210121010101010
-% 1010101010101012181818181A18181A1818181818171818121618181818
-% 181618181010101008101018181818181818181613181818181818121818
-% 181818181818101012101010101010101012181818181012101010101210
-% 1210101010101010101010101012181818181A18181A1818181818171818
-% 121618181818181618181010101008101018181818181818181613181818
-% 181818121818181818181818101012101010101010101012181818181012
-% 1010101012101210101010101010101010101012181818181A18181A1818
-% 181818171818121618181818181618181010101008101018181818181818
-% 181613181818181818121818181818181818101012101010101010101012
-% 181818181012101010101210121010101010101010101010101218181818
-% 1A18181A1818181818171818121618181818181618181010101008101018
-% 181818181818181613181818181818121818181818181818101012101010
-% 101010101012181818181012101010101210121010101010101010101010
-% 1012181818181A18181A1818181818171818121618181818181618181010
-% 101008101018181818181818181613181818181818121818181818181818
-% 1010121010101010101010121818181810121010101000FF121010121012
-% 101210121010121612161216121813181718101210101010101010101010
-% 101816181818181A18181818181812101210121812171818181218101010
-% 08101010101818181A18181A181818181A18181818181818181818181810
-% 121010121012101210121010121612161216121813181718101210101010
-% 101010101010101816181818181A18181818181812101210121812171818
-% 18121810101008101010101818181A18181A181818181A18181818181818
-% 181818181810121010121012101210121010121612161216121813181718
-% 101210101010101010101010101816181818181A18181818181812101210
-% 12181217181818121810101008101010101818181A18181A181818181A18
-% 181818181818181818181810121010121012101210121010121612161216
-% 121813181718101210101010101010101010101816181818181A18181818
-% 18181210121012181217181818121810101008101010101818181A18181A
-% 181818181A18181818181818181818181810121010121012101210121010
-% 121612161216121813181718101210101010101010101010101816181818
-% 181A18181818181812101210121812171818181218101010081010101018
-% 18181A18181A181818181A18181818181818181818181810121010121012
-% 101210121010121612161216121813181718101210101010101010101010
-% 101816181818181A18181818181812101210121812171818181218101010
-% 08101010101818181A18181A181818181A18181818181818181818181810
-% 12101012101210121012101012161216121612181300FF10101210101210
-% 1812101210101210181818181816181818181610101010100A0E10101212
-% 181218181818181818181818101012101010121618121612181610101008
-% 0A0000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000008
-% 0A1010121818181820181818181818181818181812101210181216181010
-% 101210101210181210121010121018181818181600FF1218101818181818
-% 1A1818181810101818161216121012101218181818121010101010101010
-% 101818181818181818101018121816121612101210121010121818101010
-% FF2121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121001010
-% 1010101816181A181A181A18181A181A1816121010121012101210181218
-% 1018181818181A18181818101018181612161200FF101012101818181818
-% 181A18181218181818181812101810101218181010101010101010101210
-% AF16181818181612101210181018181818101810121012101216121010FF
-% 7D0000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000002100101010
-% 101018181818181A18181A181A1818181812101210121012101812101012
-% 101818181818181A1818121818181818181200FF10121010121012181818
-% 1818181818181818181817181310101010101210101010101010101012AF
-% 10121212101210101012101218181818181810121010101010121818FF7D
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 007F7F7F0000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000000000FF
-% FFFF00000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000007F7F7F000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000FFFFFF000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000210018181813
-% 16181818181A181818181818181818181010101010101012101010121010
-% 121012181818181818181818181818181700FF1810101210101818181818
-% 18181818181818181818181610101210101010101010101010121010AF10
-% 121010121010101010101216181818181818101010101010101018FF7D00
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000007F7F7F
-% 1313137F7F7F000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000FFFFFFFF5353
-% 53FFFFFF0000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000007F7F7F1313137F7F7F00000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000FFFFFF535353FFFFFF00000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000021001018181612
-% 181818181818181818181818181810101010101010121010181810101210
-% 1018181818181818181818181818181800FF181818101612181018181818
-% 181818181818181818181818181010121018181010101210101012AF1010
-% 10121010121010101010121818181818181012101010100A1010FF7D0000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000007F7F7F131313
-% 7F7F1313137F7F0000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000FFFF53FF535353FFFF
-% 535353FFFF00000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000007F7F7F1313137F7F1313137F7F000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000000000FFFFFF535353FFFF535353FFFF000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000002100101010121818
-% 1818181818181817181818181210121010C5C5C5C5181818181818101612
-% 18101818181818181818181818181800FF1A181812121210181012121018
-% 1818181818181812161818181012101818181010181018181818AF121012
-% 10101216101010101012181818181818101210101010100810FF7D000000
-% 00000000000000000000000000000000AFAFAFAFAFAF0000000000000000
-% 000000FFFFFFFF0000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000007F13137F13137F13
-% 13131313137F7F7F00000000000000000000000000000000000000000000
-% 00000000000000000000000000000000000000FF535353FF5353FF535353
-% 5353FFFFFF00000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000007F7F13137F13137F13131313137F7F7F000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000FF5353FF5353FF535353535353FFFFFF0000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000210008101010101818
-% 171818181818181818181612101010C5C51012C5C518181A181812121210
-% 181012121018181818181818181200FF1818121010101012101010121012
-% 1818181718181618121810121210121218181818181818181AAF18181010
-% 181818101210101010101818181818161217121010101010FF7D00000000
-% 0000000000000000000000000000000000AFAF0000000000000000000000
-% 00FFFF0000FFFF0000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000007F7F7F137F1313137F1313
-% 13137F7F1313137F7F000000000000000000000000000000000000000000
-% 00000000000000000000000000000000FFFFFF5353FF535353FF535353FF
-% FF535353FFFF000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000007F7F137F137F1313137F1313137F7F1313137F7F0000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000FFFFFF53FF535353FF53535353FFFF535353FFFF00000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000021001010101010101218
-% 1818181818181118131810101010C5C51218C5C5181A1818121010101012
-% 1010101210121818181718181600FF181810101010101210101010101216
-% 181818181012101210101010101010101818181818181818181818181818
-% 18181810101010AFAFAFAFAFAFAFAFAFAFAFAFAF181210FF7D0000000000
-% 0000003A3A3A3A3A3A3A3A3A3A3A3A3AAFAF3A3A3A3A3A3A3A3A3A3A3A3A
-% FFFF3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F13137F13137F13131313
-% 7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53FF535353FF5353FF535353FF5353
-% 5353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A7F13137F13137F13137F1313137F131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3AFF53FF5353FF5353FF53535353FF53535353535353FF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A000000000000210012101010C5C5C5C5C5
-% C5C5C5C5C5C5C5C51012101010C5C51618C5C51A18181810101010101210
-% 10101010121618181818101200FF1818181010080810101010100B0E0A10
-% 101618181818181810181316121612161210121618181818181818161218
-% 101818181818161010101012101010121010AF121818FF7D000000000000
-% 00003A3A3AAFAFAFAFAFAF3A3A3A3AAFAF3A3A3A3A3A3A3A3A3A3A3A3AFF
-% FF3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F13137F13137F131313137F
-% 13131313137F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3AFF53FF535353FF5353FF535353FF535353
-% 5353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F13137F13137F13137F1313137F13131313137F7F7F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3AFF53FF5353FF5353FF53535353FF5353535353FFFFFF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A000000000000210018181618C51010181618
-% 181A18181813101018101810C5C51818C5C5181818181810100808101010
-% 10100B0E0A10101618181800FF1818181612101010101010101010101010
-% 12181818181816101810161217121810121012AF1818181818AF18101810
-% 1818181818181818101210101210101010AF161818FF7D00000000000000
-% 003A3A3A3A3A3A3A3A3A3A3A3A3AAFAF3A3A3A3A3A3A3A3A3A3A3A3AFFFF
-% 3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F13137F1313137F137F1313137F1313
-% 13137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFFFF5353FF53535353FF53FF5353FF53535353FF
-% FF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F7F1313137F1313137F137F13137F131313137F7F1313137F7F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FFFF5353FF535353FF53FF535353FF53535353FFFF535353FFFF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A000000000000210018181818C5181818181818
-% 1818181818101210121816C5C51818C5C51A181818181612101010101010
-% 1010101010101218181800FF181618181818181012101010101010101010
-% 121618181818121812181218121012101210AF1018181816AF1810181210
-% 12101818181818121010121012101210AF121818FF7D0000000000000000
-% 3A3A3A3A3A3A3A3A3A3A3A3A3AAFAF3A3A3A3A3A3A3A3A3A3A3A3AFFFF3A
-% 3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F137F1313137F13137F13137F13137F131313
-% 7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF53FF535353FF535353FF5353FF53FF535353FF5353
-% 5353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 7F137F131313137F13137F13137F137F1313137F131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53
-% FF535353FF5353FF5353FF5353FF535353FF53535353535353FF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A000000000000210018181818C518181818181818
-% 18181818181316181012C5C51818C5C51818181618181818181012101010
-% 10101010101012161800FF1812121618181812161210101010100A0F1010
-% 12181818161817181618161810121010AFAFAFAFAFAFAFAF161218101010
-% 181818181818121612181018101810AF101216FF7D00000000000000003A
-% 3A9D3A3A9D3A3A9D3A3AAFAFAFAF9D3A3A3A3A3A3A3A3A3A3A3AFFFF3A3A
-% FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F137F1313137F1313137F7F7F13137F1313137F
-% 131313131313137F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF53FF535353FF53535353FFFFFF53FF535353FF535353
-% 53535353FF3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F
-% 137F131313137F1313137F7F7F137F1313137F131313131313137F3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF53FF
-% 535353FF535353FFFFFF5353FF535353FF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A000000000000210012161818C518181A1818181A18
-% 18181818181818181816C5C5C5C518181818121216181818121612101010
-% 10100A0F1010121800FF1810101012101216121810121010121010101010
-% 121618181818181818181810101010AFAFAFAFAFAFAFAF12181018101818
-% 1818181818161218101810181210AF101212FF7D0000000000000000FF3A
-% 9D3A3A9D3A3A9D3A3A3A3AAFAF9D3A3A3A3A3A3A3A3A3A3A3A3AFFFFFFFF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A7F1313137F1313137F7F1313137F7F7F137F137F1313
-% 131313137F7F7F7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF535353FF535353FFFF535353FFFFFFFFFF53FF5353535353
-% 53FFFFFFFF3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313
-% 137F131313137F7F1313137F7F7F7F137F131313131313137F7F7F3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFF535353FF
-% 535353FFFF535353FFFFFF53FF53FF535353535353FFFFFFFF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3AFF3A3A3A3AFF0000000000210012121818C518181818181818181A
-% 181818181818181818181818181818181810101012101216121810121010
-% 1210101010101200FF181612101010101210121612101216101010101210
-% 121818181818181818181612101010101210121012AF1216121818181818
-% 18161210121012101210121010AF101010FF7D0000000000000000FF3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A3A3A9D3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A7F7F1313137F13131313137F7F7F3A3A3A7F7F137F131313
-% 137F7F1313137F7F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3AFFFF535353FF5353535353FFFFFF3A3A3A3AFF53FF53535353FFFF
-% 535353FFFF3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A
-% 3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F131313
-% 7F1313131313137F7F7F3A3A3A7F137F13131313137F7F1313137F7F3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF535353FF53
-% 53535353FFFFFF3A3A3AFFFF53FF53535353FFFF535353FFFF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF3A3A3A3A3A00FF00000000210010101218C518181818181818181818
-% 181A18181818181818181818181818181612101010101210121612101216
-% 10101010121000FF18181816101010101012101210181216121010101012
-% 1618181818181818181218101010101010101210AF101810181818181818
-% 181210101210121012101210AF100F10FF7D0000000000000000FF3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9D
-% 3A3A3A9D7F137F131313137F7F1313137F7F3A3A3A3A3A3A7F7F1313137F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF53FF53535353FFFF535353FFFF3A9D3A3A3A3AFFFF535353FF535353
-% 53535353FF3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F13131313
-% 7F7F1313137F7F9D3A3A3A3A3A7F7F131313137F131313131313137F3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF5353FF53535353FFFF
-% 535353FFFF3A3A3A3A3A3AFFFF535353FF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% FF3A3AFF3A3A00FF0000000021000F101010C5101818181818181A18181A
-% 181A18181818181818181818181818181816101010101012101210181216
-% 121010101000FF1818181818121010101010101818181810101010101012
-% 181818181818181818181012101010121010101012101818101818181818
-% 1816121010101210101010AF100A10FF7D0000000000000000FF3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9D3A
-% 3A3A9D7F13137F13131313137F7F7F3A3A3A3A3A3A3A3A9D3A7F13137F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF5353FF5353535353FFFFFF3A3A3A9D3A3A3A3A3A3AFF5353FF53535353
-% 535353FF3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F13131313
-% 137F7F7F3A3A9D3A3A3A3A3A3A3A7F1313137F131313131313137F3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF535353FF5353535353FF
-% FFFF3A3A3A3A3A3A3A3A3A3AFF5353FF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3AFF
-% 3A3AFF3A3A00FF0000000021000A101010C510121018181818181A181A18
-% 201818181818181818181818181818181818121010101010101818181810
-% 1010101000FF181818181010101010101218181618181818181818181818
-% 1A1818181810101816181818181216101210121018101210101018181810
-% 12101012101010121010AF100A08FF7D0000000000000000FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A7F1313137F131313131313137F3A3A3A3A3A3A3A3A3A3A7F137F131313
-% 1313131313137F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3AFF53
-% 5353FF53535353535353FF3A3A3A3A3A3A3A3A3A3AFF53FF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313137F1313131313
-% 13137F3A3A3A3A9D3A3A3A3A3A7F13137F1313131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353FF53535353535353
-% FF3A3A3A3A3A3A3A3A3A3AFF53FF535353535353535353FF3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF
-% FFFFFFFFFFFF0000000021000A081010C510101012161818181818181A18
-% 181818101012101810181618181818181010101010101218181618181818
-% 18181800FF16181818101012081010101012181818181818181818181A18
-% 1A1818161212181818181818161210121010121216181010121010101212
-% 161218101210101012AF101010FF7D0000000000000000FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 7F131313137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A7F7F13131313
-% 13137F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353
-% 5353FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3AFFFF53535353535353
-% FFFFFF3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313137F7F1313137F
-% 7F3A3A3A3A3A3A3A3A3A3A3A9D7F7F7F1313131313137F7F7F7F3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3AFF5353535353FFFF535353FFFF3A
-% 9D3A3A3A3A3A3A3A3A3A3AFFFF535353535353FFFFFFFF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF
-% 3AFFFFFF0000000000210010101010C5101010101218181818181A181818
-% 181810121012101210121216181818101012081010101012181818181818
-% 181800FF121018121612100E0A081010101818181A18181A181818181818
-% 181812101018181818181818181010181318161818121010101010101018
-% 1816181810181216AF101010FF7D00000000000000003A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F
-% 1313131313137F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313137F
-% 7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353
-% 535353FFFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353535353FFFF53
-% 5353FFFF3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313131313137F7F7F7F3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F131313137F7F1313137F7F3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A3AFFFF53535353535353FFFFFF3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3AFF53535353FFFF535353FFFF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A000000000000210010101010C5100E1010121018181818181A181818
-% 18101216121018101210121018121612100E0A081010101818181A18181A
-% 1800FF101210181818181010100A1010181818181818181818181A181818
-% 181010121012101818181810181218161818181816181010101010121818
-% 18181618121618AF121010FF7D00000000000000003A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313137F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F1313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353FF535353
-% 53535353FF3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF535353FF53535353
-% 535353FF3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F13137F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F131313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF5353FF53535353535353FF9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF5353FF53535353535353FF3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A000000000000210010101010C510101010101212101818181818181818
-% 181810181112101610101210181818181010100A10101818181818181818
-% 00FF1010101012101818181010101218181818181818181818181A181818
-% 101210101010121012101018101818181818181818181818181010181218
-% 101212101218AF101810FF7D0000000000FF00003A3AFF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313137F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353FF53535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353FF5353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F131313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF5353FF53535353535353FF3A3A3A3A3A3A3A
-% 9D3A3A9D3A9D3A3A9D3AFF5353FF53535353535353FF3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFFFFFFFF
-% FF0000000000210018101210C51010101010101012181818181818181018
-% 101812181018121010101010121018181810101012181818181818181800
-% FF1012101010101218181810121618181818181818181818181818181012
-% 1010101010101012101212101810181818181818181A1818181216121612
-% 1010101012AF181012FF7D00000000FF0000003A3A3AFF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313137F7F
-% 1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353FFFF535353
-% FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313137F7F1313137F7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3AFF53535353FFFF535353FFFF3A3A3A3A3A3A3A3A9D
-% 3A3A9D3A9D3A3A9D3A3AFFFF535353535353535353FF3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFFFFFFFFFFFF
-% FF00000000210010121010C5101010101012101012121818161210101212
-% 1612161818181210121010101012181818101216181818181818181800FF
-% 1810121010100E1816121810181618161818161818181818181818121012
-% 101010101218181812101012121612181618181818181818181818181810
-% 18121010AF101216FF7D00000000FF0000FF3A3A3AFF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353FFFFFFFF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF5353535353535353
-% 53FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F1313131313137F7F7F7F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF535353535353FFFFFFFF3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF3AFF3A3A00FF
-% 00000000210012161210C510101010101012101210121012101010101012
-% 1818181818181810121010100E181612181018161816181816181800FF18
-% 1810100A100A101010101812121218181818181818181818181810101010
-% 101216181818181810121010121612181812101010181818181818181818
-% 18180AAF101216FF7D00000000FF0000FF3A3A3AFF3A3A3A3A9D3A9D3A3A
-% 9D3A3A9D3A3A3A9D9D3A9D3A9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D9D3A9D
-% 9D3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F131313131313131313
-% 7F9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D7F1313131313137F
-% 7F7F7F3A9D9D3A9D9D3A9D3A9D3A3A9D3A9DFF535353535353535353FF3A
-% 9D3A9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A3A3A3AFF535353535353FFFFFF
-% FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313137F7F7F7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3AFF535353535353FFFFFFFF3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3AFF3A3AFF3A3A00FF00
-% 000000210012161210C51010101010101010101010121010101010101210
-% 18181A181A181810100A100A101010101812121218181818181800FF1818
-% 18101010100B101012101818181818181818181010181216121012101010
-% 101218181818181A18181216121818121018181818181818181612181618
-% 1818AF101210FF7D00000000FFFFFFFFFFFFFFFF3A3A3A3A9D3A9D3A3A9D
-% 3A3A9D3A3A3A9D9D3A9D3A9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D9D3A9D9D
-% 3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F7F7F131313131313137F9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D7F1313137F7F1313
-% 137F7F9D9D3A9D9D3A9D3A9D3A3A9D3AFFFFFF53535353535353FF9D3A9D
-% 3A9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A3A3A3A3AFF535353FFFF535353FF
-% FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A7F7F7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F1313137F7F1313137F7F3A3A3A3A3A3A3A
-% 3A3A3A3A3AFFFFFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3AFF535353FFFF535353FFFF3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3AFF3A3AFFFFFFFFFF0000
-% 0000210012101818C5101216121818181810101210101210101010101218
-% 18181818181818101010100B1010121018181818181818181800FF181818
-% 101210101010101012101210181818181818181211181012101012101010
-% 101818181818181812101210181810121012181018181818181210121210
-% 18AF181012FF7D0000000000FFFF00FFFFFF3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13137F131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A3A7F13137F1313131313
-% 13137F3A9D3A3A9D9D3A9D3A3A9DFF5353FF53535353535353FF3A9D9D3A
-% 9D9D9D9D3A9D3A9D3A9D9D9D3A9D9D9D9D9D3AFF5353FF53535353535353
-% FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D
-% 9D3A9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D7F13137F131313131313137F9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D7F13137F131313131313137F9D9D9D9D9D9D9D
-% 9D9D9DFF5353FF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9DFF5353FF53535353535353FF9D9D9D3A3A3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF3A3A3AFFFFFF00000000
-% 00210010121612C518181818181818181218161812101010101010101012
-% 18181818181810121010101010101210121018181818181800FF16181216
-% 121012101010121010101018181818181818181812161216121012101218
-% 181818181A18181010101010101010101010121012101210101010101018
-% AF121012FF7D00000000000000003A3A3A3A9D3A3A3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F1313137F7F1313137F7F9D3A9D9D
-% 9D9D3A9D9D3A9D3A9D3A9D3A9D3A9D9D3A9D3A3A9D7F7F7F131313131313
-% 137F9D3A9D9D3A3A9D3A9D3A3AFF535353FFFF535353FFFF3A3A3A9D3A9D
-% 3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3AFFFFFF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F1313137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A3AFF535353FFFF535353FFFF3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFFFFFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A000000000000
-% 210010121018C51316181818181818181818181618181818101010101010
-% 181816181216121012101010121010101018181818181800FF1812161218
-% 10101210121010101010101218181818181818101812101210101217181A
-% 18181A1818181810101010101010101010101010101818121810101012AF
-% 121010FF7D00000000000000003A3A3A3A9D3A3A3A3A3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D7F1313131313137F7F7F7F9D9D3A9D9D9D
-% 9D3A9D9D3A9D3A9D3A9D3A9D3A9D9D3A9D3A3A9D3A7F1313131313131313
-% 137F3A9D9D3A3A9D3A9D3AFF535353535353FFFFFFFF3A3A3A3A9D3A9D3A
-% 3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3AFF535353535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F1313131313137F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A
-% FF535353535353FFFFFFFF3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A00000000000021
-% 0010101216C518181818181818181A181818121818181818121010101012
-% 1818121612181010121012101010101010121818181800FF101018111818
-% 181818181818181818181818181818181818181811181010121818181818
-% 1A181A18181816101010101010101010101010181718181816121010AF10
-% 1210FF7D000000000000FFFFFFFFFF3A3A3A3A3A9D3A3A9D9D9D3A9D9D9D
-% 9D3A9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D9D9D9D
-% 9D3A9D9D9D9D3A9D9D3A9D9D9D3A9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D3A
-% 9D9D3A9D9D9D9D9D9D9D3A9D7F1313131313131313137F9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F131313131313131313
-% 7F9D9D3A9D9D9D3A9D3AFF535353535353535353FF9D9D9D9D3A9D3A3A9D
-% 9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9DFF535353535353535353FF9D
-% 9D9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D
-% 9D3A9D9D3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D3A9D9D3A9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D3A3A9D
-% 3A9D7F1313131313131313137F3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D3A3A
-% 3A3A9D3A9D3A3A9D3A3A7F1313131313131313137F3A3A9D3A3A3A3A3AFF
-% 535353535353535353FF3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF535353535353535353FF3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFFFFFFFFFFFF00000000002100
-% 12101210C516181818181818181818181010121018181818181818101012
-% 10101811181818181818181818181818181818181800FF12181018101818
-% 1018181818181A1818181818181A18181818161818131810181818181A18
-% 181818181818181012101010101010101010181818181818181810AF1618
-% 16FF7D0000000000FFFFFFFFFFFFFF3A3A3A3A9D3A9D9D9D3A9D9D3A9D9D
-% 9D9D3A9D9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D3A3A3A9D9D3A9D9D9D3A9D
-% 9D3A9D9D9D9D9D3A9D9D3A3A9D9D9D3A9D3A9D9D3A9D9D3A9D9D3A9D9D9D
-% 9D3A9D9D9D9D3A3A9D9D9D7F1313131313131313137F9D9D3A9D3A3A9D9D
-% 9D9D9D9D3A9D3A9D9D9D3A3A3A9D3A3A9D3A3A7F1313131313131313137F
-% 9D9D9D9D3A9D9D9D3AFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9DFF535353535353535353FF9D9D
-% 9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A
-% 9D7F1313131313131313137F3A9D9D9D3A3A9D9D9D9D9D9D3A9D3A9D9D3A
-% 9D9D9D9D3A9D9D9D3A7F1313131313131313137F9D9D9D9D3A9D9D9DFF53
-% 5353535353535353FF3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D9DFF535353535353535353FF3A9D3A9D9D9D9D9D9D9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D3A3A3A3A3A3AFFFFFFFFFFFFFFFF00000000210018
-% 161216C5181218161818161818121012101012101818181A181810101012
-% 1810181018181018181818181A1818181818181A00FF1810121812161218
-% 101818181818181818181A18181818181818181810181018181818181818
-% 1818181818181018101210101010101010121210121818181810AF181818
-% FF7D00000000FFFF00FF3A3A3AFF3A3A3A3A9D3A9D9D9D3A9D9D3A9D9D9D
-% 9D3A9D9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D3A3A3A9D9D3A9D9D9D3A9D9D
-% 3A9D9D9D9D9D3A9D9D3A3A9D9D9D3A9D3A9D9D3A9D9D3A9D9D3A9D9D9D9D
-% 3A9D9D9D9D3A3A9D9D9D3A7F131313131313137F9D9D9D3A9D3A3A9D9D9D
-% 9D9D9D3A9D3A9D9D9D3A3A3A9D3A3A9D3A3A3A7F131313131313137F3A9D
-% 9D9D9D3A9D9D9D3A9DFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9DFF53535353535353FF9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D
-% 9D7F131313131313137F3A3A9D9D9D3A3A9D9D9D9D9D9D3A9D3A9D9D3A9D
-% 9D9D9D3A9D9D9D3A3A7F131313131313137F9D9D9D9D9D3A9D9D9D9DFF53
-% 535353535353FF9D3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D9D9D9D9DFF53535353535353FF9D3A9D3A9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D3A3A3A3A3A3AFF3A3A3A3A3A00FF0000000021001818
-% 1812C5101210181218181810101810181010121218181818181810121810
-% 121812161218101818181818181818181A181800FF171816121610121612
-% 10181818181818181A18181818181818181818181018181818181A181818
-% 10181218181012101810121012101010101010101012181812AF181818FF
-% 7D00000000FF0000FF3A3A3AFF3A3A3A3A9D3A9D9D9D9D3A9D9D9D3A9D9D
-% 9D3A9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D3A9D3A9D9D9D
-% 3A9D9D9D3A9D9D9D9D9D3A3A9D9D3A9D3A9D9D9D9D9D9D9D9D3A9D3A9D9D
-% 9D9D9D9D9D9D3A9D9D9D7F131313131313137F3A9D9D9D9D3A9D9D3A9D3A
-% 9D3A9D9D9D9D3A9D9D3A9D3A3A9D9D3A9D3A7F1313131313137F7F7F3A9D
-% 9D9D9D9D9D3A3AFFFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF5353535353FFFFFF9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D7F
-% 7F131313131313137F9D3A3A3A9D9D3A3A9D9D3A9D3A9D9D9D3A3A3A9D9D
-% 9D3A9D3A3A9D9D9D7F13131313137F7F7F9D9D9D9D3A9D9D9D9D9DFF5353
-% 5353535353FF3A9D3A9D9D3A9D9D3A3A9D9D3A9D3A9D3A9D9D9D9D9D9D9D
-% 3A9D9D9D9DFF5353535353FFFFFF3A9D3A3A3A3A3A9D9D3A9D9D9D9D3A9D
-% 9D3A3A9D3A9D9D3A9D3A3A3A3AFF3A3A3A3A3A00FF000000002100181818
-% 16C510121012101216121818181818181010101012101818161818171816
-% 12161012161210181818181818181A18181800FF18181818121010101010
-% 121618181818181818181A1818181A181818181818181818181818181818
-% 181010101012101818181010101010101010101010181810AF181018FF7D
-% 00000000FF0000FFFFFFFFFF3A3A3A3A9D3A9D9D3A3A9D9D3A9D3A9D3A9D
-% 9D9D3A3A9D9D3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A9D9D3A9D9D3A9D9D
-% 3A9D3A9D9D9D9D9D3A9D3A9D3A9D3A9D3A9D3A9D9D3A9D3A9D9D3A9D9D3A
-% 9D9D9D9D3A9D9D7F7F137F7F1313137F7F3A3A9D9D9D3A9D3A9D9D9D9D3A
-% 3A9D9D9D3A9D9D3A9D9D3A9D3A3A3A3A3A3A7F7F13137F7F1313137F7F9D
-% 9D9D9D3AFFFF5353FFFF535353FFFF3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9DFFFF53FFFF535353FFFF9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A7F7F1313
-% 7F7F1313137F7F9D3A3A9D9D3A9D9D3A3A9D9D9D3A9D9D9D9D3A9D9D9D9D
-% 3A9D9D9D9D9D3A9D7F7F137F7F1313137F7F9D9D3A9D9D9DFFFF53FFFF53
-% 5353FFFF3A9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D9D3A9D3A9D9D9D3A3A9D
-% 9D9D9D3A3AFFFF53FFFF535353FFFF3A9D3A3A3A3A9D9D9D3A9D9D9D9D3A
-% 9D9D3A9D9D9D3A9D3A3A3A9DFFFFFFFFFFFFFFFF00000000210010181318
-% C51010101012101210101210181818181818121012101018181818181818
-% 121010101010121618181818181818181A00FF1012181010101010101010
-% 1012181818181818181818181A181A181818181818181818181818181818
-% 1012101010101812101810121010101010121012181818AF181618FF7D00
-% 000000FF000000FFFFFF3A3A3A3A3A9D3A9D9D3A3A9D9D3A9D3A9D3A9D9D
-% 9D3A3A9D9D3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A9D9D3A9D9D3A9D9D3A
-% 9D3A9D9D9D9D9D3A9D3A9D3A9D3A9D3A9D3A9D9D3A9D3A9D9D3A9D9D3A9D
-% 9D9D9D3A9D7F13131313137F7F7F9D9D3A3A9D9D9D3A9D3A9D9D9D9D3A3A
-% 9D9D9D3A9D9D3A9D9D3A9D3A3A3A3A3A3A9D9D7F7F131313131313137F9D
-% 9D9DFF535353535353FFFFFF3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF53535353535353FF9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A7F1313131313
-% 137F7F7F9D3A9D3A3A9D9D3A9D9D3A3A9D9D9D3A9D9D9D9D3A9D9D9D9D3A
-% 9D9D9D9D9D3A9D3A9D7F131313131313137F9D3A9D9DFF5353535353FFFF
-% FF9D3A3A9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D9D3A9D3A9D9D9D3A3A9D9D
-% 9D9D3A3A3A3AFF53535353535353FF9D3A3A3A3A9D9D9D3A9D9D9D9D3A9D
-% 9D3A9D9D9D3A9D3A3A3A9D3AFFFFFFFFFFFF0000000000210016181618C5
-% 121012101012101012101210121818181818101012121218121012181010
-% 1010101010101012181818181818181800FF121010101010081010101010
-% 1010101218161818181A181A181818181817181818181818181818181818
-% 10101010101010121012101018101010101012181818AF181818FF7D0000
-% 0000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A
-% 9D3A3A3A3A3A3A9D9D9D9D9D3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D3A
-% 9D9D9D9D3A9D9D9D3A9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A
-% 9D9D9D9D7F131313131313137F3A9D9D3A9D3A9D9D3A9D9D3A9D3A9D3A9D
-% 9D9D9D9D9D3A3A3A9D9D9D3A9D3A9D3A9D9D3A7F131313131313137F9D9D
-% 9DFF53535353535353FF3A9D9D9D3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D3A
-% 9D3A3A3A3A3A3A9D9D3A3A3A3A9D3A3AFF53535353535353FF3A9D9D9D9D
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D9D9D9D9D9D3A3A3A3A3A9D
-% 3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A9D3A3A3A9D3A9D9D7F131313131313
-% 137F9D9D3A9D3A9D9D3A9D3A3A3A9D9D3A9D9D9D9D3A9D9D3A9D9D3A9D3A
-% 9D9D9D9D3A9D9D9D7F131313131313137F9D3A9D9DFF53535353535353FF
-% 9D9D9D9D9D9D3A3A9D3A9D3A9D3A9D9D9D9D3A9D9D9D9D3A9D9D9D3A9D3A
-% 3A3A9D3A9DFF53535353535353FF3A9D3A3A3A3A3A9D9D9D3A9D9D9D9D3A
-% 9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A000000000000210018181818C518
-% 181810181010121010121010101210181818181810101010121010101010
-% 08101010101010101012181618181800FF101012101010100A0F0A101010
-% 10101010121618181820181A181818181818121618181818181818181812
-% 101010101010101010181818181712101816181818AF181818FF7D000000
-% 00000000003A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D3A9D9D9D9D3A9D3A
-% 3A9D3A3A9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D9D3A9D9D9D9D9D9D3A9D3A
-% 9D9D9D9D9D9D9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D3A3A9D9D9D9D9D3A
-% 9D9D7F1313131313131313137F9D3A9D9D9D9D9D9D3A3A9D3A9D3A9D9D9D
-% 9D9D3A9D9D3A3A9D9D9D3A3A9D3A9D9D9D7F1313131313131313137F9DFF
-% 535353535353535353FF9D9D9D3A3A3A3A3A9D9D9D9D3A3A3A9D3A9D9D3A
-% 3A3A3A3A3A3A9D9D9D3A3A3A3A3AFF535353535353535353FF9D9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D3A
-% 3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D9D3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D3A9D9D7F1313131313131313
-% 137F9D3A3A9D3A3A3A9D9D3A3A3A9D9D3A9D9D9D9D9D3A3A9D9D9D3A9D3A
-% 9D9D9D9D9D3A7F1313131313131313137F3A9DFF535353535353535353FF
-% 3A9D9D9D3A9D9D3A9D9D3A3A9D9D9D3A9D9D3A9D9D9D3A9D3A9D3A9D3A3A
-% 9D3A3AFF535353535353535353FF3A9D3A9D3A3A3A9D9D9D9D9D9D9D9D3A
-% 9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181818C51818
-% 181812101210101210121012101012101816181612101010101210101010
-% 0A0F0A101010101010101216181800FF10121010101010100A1010080A10
-% 081010101818181A18181818181818101810181217181818181818181010
-% 1010101010101012181818181818181818181818AF181818FF7D00000000
-% 00FFFFFFFFFFFF3A3A3A3A3A3A3A9D3A3A9D3A9D9D3A9D9D9D9D3A9D3A3A
-% 9D3A3A9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D9D3A9D9D9D9D9D9D3A9D3A9D
-% 9D9D9D9D9D9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D3A3A9D9D9D9D9D3A9D
-% 9D7F1313131313131313137F9D3A9D9D9D9D9D9D3A3A9D3A9D3A9D9D9D9D
-% 9D3A9D9D3A3A9D9D9D3A3A9D3A9D9D9D7F1313131313131313137F9DFF53
-% 5353535353535353FF9D9D9D3A3A3A3A3A9D9D9D9D3A3A3A9D3A9D9D3A3A
-% 3A3A3A3A3A9D9D9D3A3A3A3A3AFF535353535353535353FF9D9D9D3A9D3A
-% 3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D3A3A
-% 3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D3A9D9D7F131313131313131313
-% 7F9D3A3A9D3A3A3A9D9D3A3A3A9D9D3A9D9D9D9D9D3A3A9D9D9D3A9D3A9D
-% 9D9D9D9D3A7F1313131313131313137F3A9DFF535353535353535353FF3A
-% 9D9D9D3A9D9D3A9D9D3A3A9D9D9D3A9D9D3A9D9D9D3A9D3A9D3A9D3A3A9D
-% 3A3AFF535353535353535353FF3A9D3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D
-% 9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181816C5181818
-% 181612161012101010101010101010121818181818181012101010101010
-% 0A1010080A100810101018181800FF181216121818181010101010081008
-% 10101012181818181A181818181818101210101818121818121612161210
-% 10100A10101012181818181818181818181A18AF181818FF7D00000000FF
-% FFFFFFFFFFFFFF3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D3A3A9D3A9D3A3A
-% 9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A9D3A9D9D3A9D9D9D3A9D9D3A
-% 9D9D9D3A9D3A9D3A3A9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D9D3A9D9D3A9D
-% 7F1313131313131313137F9D9D9D3A9D9D3A9D9D3A9D9D3A9D3A9D3A9D9D
-% 9D3A9D3A9D3A9D3A9D9D3A3A3A9D9D7F1313131313131313137F9DFF5353
-% 53535353535353FF9D9D9D9D3A3A9D3A3A3A9D9D3A3A3A9D9D9D3A3A3A3A
-% 3A3A3A3A9D9D9D3A3A3A3A3AFF535353535353535353FF9D9D9D9D3A9D9D
-% 3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A
-% 3A3A3A3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A9D9D3A3A3A3A3A3A
-% 9D9D9D9D3A3A3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A
-% 9D3A3A3A9D3A3A9D3A3A3A3A3A9D9D9D3A9D3A7F1313131313131313137F
-% 9D3A9D3A9D9D9D9D3A3A3A9D9D9D3A9D9D9D9D9D9D3A9D3A3A9D9D9D9D3A
-% 9D9D3A9D7F1313131313131313137F9D9DFF535353535353535353FF9D9D
-% 9D9D9D9D3A9D3A9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A
-% 9DFF535353535353535353FF9D9D3A9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181812C518181818
-% 181210121018101812121612101010181818181818181216121818181010
-% 10101008100810101012181800FF18161210181618101210101010080A10
-% 101010101818181818181817121012161218101210101010121018121012
-% 101010101012181818181A18181818181818AF181818FF7D00000000FF00
-% 00003A3A3AFF3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D3A3A9D9D3A3A3A9D9D
-% 9D3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D3A9D9D9D9D3A3A9D9D9D9D
-% 9D9D9D3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D3A
-% 7F131313131313137F3A9D3A9D9D9D9D3A9D9D3A9D3A9D3A9D9D9D3A9D9D
-% 9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A7F131313131313137F9D9D9DFF5353
-% 5353535353FF3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A3A3A3A3A3A
-% 3A3A3A9D9D9D3A3A3A3A3A3AFF53535353535353FF3A9D9D3A9D3A9D3A3A
-% 9D3A3A3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A3A3A9D3A3A9D9D9D3A3A3A
-% 3A3A3A3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D9D3A3A3A3A3A3A3A
-% 9D9D9D3A3A3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A
-% 3A3A9D9D3A3A3A3A3A3A3A9D9D9D9D3A9D3A9D7F131313131313137F9D9D
-% 3A3A9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D9D9D3A3A9D9D9D3A9D9D9D3A
-% 9D9D3A9D7F131313131313137F9D3A9D9DFF53535353535353FF9D9D9D9D
-% 9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A3A9D
-% 9DFF53535353535353FF3A3A9D9D3A3A3A9D3A3A9D9D9D9D9D3A3A9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181010C51818171818
-% 101810181018181818181818181210121218161818161210181618101210
-% 101010080A10101010101800FF1012101012181818181012101010101010
-% 101218181818181818181812101218121012101210121010181216121010
-% 10101010101818181A181A18181A181A18AF181810FF7D00000000FF0000
-% 003A3A3AFF3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D3A3A9D9D3A3A3A9D9D9D
-% 3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D3A9D9D9D9D3A3A9D9D9D9D9D
-% 9D9D3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D3A7F
-% 131313131313137F3A9D3A9D9D9D9D3A9D9D3A9D3A9D3A9D9D9D3A9D9D9D
-% 9D9D9D9D9D3A9D9D3A9D3A9D9D3A7F13131313137F7F7F9D9D9DFF535353
-% 53535353FF3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A3A3A3A3A3A3A
-% 3A3A9D9D9D3A3A3A3A3A3AFF5353535353FFFFFF3A9D9D3A9D3A9D3A3A9D
-% 3A3A3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A3A3A9D3A3A9D9D9D3A3A3A3A
-% 3A3A3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D9D3A3A3A3A3A3A3A9D
-% 9D9D3A3A3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A
-% 3A9D9D3A3A3A3A3A3A3A9D9D9D9D3A9D3A9D7F131313131313137F9D9D3A
-% 3A9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D9D9D3A3A9D9D9D3A9D9D9D3A9D
-% 9D3A9D7F13131313137F7F7F9D3A9D9DFF53535353535353FF9D9D9D9D9D
-% 9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A3A9D9D
-% FF535353535353FFFFFF3A9D9D3A3A3A9D3A3A9D9D9D9D9D3A3A9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A000000000000210018101210C5C5C5C5C5C5C5
-% 18181818181818181A181818181210101012181012101012181818181012
-% 1010101010101012181800FF181012101210101012101210100A08101010
-% 101012101218101810121010101010181818181010101010101210121810
-% 181012121818181A1818181818181818AF181010FF7D00000000FFFFFFFF
-% FFFFFFFF3A3A3A3A9D3A9D9D9D3A9D3A3A9D9D3A9D3A3A3A9D9D9D3A3A3A
-% 9D9D3A9D3A9D9D3A3A3A3A9D9D3A3A3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D7F7F137F
-% 7F1313137F7F9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D9D3A9D
-% 9D9D3A9D9D9D9D9D3A9D3A9D9D9D7F7F137F7F1313137FFFFF53FFFF5353
-% 53FFFF3A3A9D9D9D3A3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A9D3A3A3A3A3A
-% 3A9D9D3A3A3A3A3A3A3A3AFFFF53FFFF535353FFFF9D9D9D3A9D3A9D3A3A
-% 9D3A3A3A9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A
-% 3A3A3A9D9D3A3A3A9D3A3A3A9D9D9D3A9D3A3A9D9D3A3A3A3A3A3A9D9D9D
-% 9D9D9D3A3A9D9D3A9D9D9D3A3A3A3A9D3A3A3A9D9D9D9D3A3A3A3A3A3A9D
-% 3A9D3A3A3A3A3A3A3A9D9D9D9D3A9D7F7F137F7F1313137F7F9D9D9D3A9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D3A9D9D9D9D9D
-% 9D3A9D7F7F137F7F1313137F7FFFFF53FFFF535353FFFF9D3A9D9D9D9D9D
-% 9D9D3A9D3A3A9D3A9D9D9D9D9D9D3A9D9D3A9D9D3A3A9D3A9D9D9D3A3A3A
-% FFFF5353FFFF535353FFFF3A9D9D9D3A9D3A3A9D9D3A9D3A9D9D9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A000000000000210010101010C510101010121010
-% 101012101818181818181818181818181018181012101210101012101210
-% 100A0810101010101200FF18181810101010121012161010101010101010
-% 101010121012121010101010101018181818181810181010101012101816
-% 121816181818181818181818181818AF181010FF7D0000000000FFFFFFFF
-% FFFF3A3A3A3A3A9D3A9D9D9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A3A3A9D9D
-% 9D9D3A9D3A9D9D9D3A3A3A9D9D3A3A3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F1313131313
-% 7F7F7F9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D7F1313131313FF5353535353FFFFFF
-% 3A3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D3A3A9D3A3A3A3A3A9DFF53535353535353FF3A9D9D3A9D3A3A3A3A
-% 3A3A3A9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A
-% 3A9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A9D9D3A3A3A3A3A3A9D9D3A9D
-% 9D3A9D3A9D9D3A3A9D9D3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D9D9D9D9D9D7F13131313137F7F7F9D9D9D9D3A3A3A9D
-% 9D9D3A9D3A3A9D9D3A9D9D9D9D9D3A9D9D3A3A3A3A9D9D3A9D3A9D9D9D3A
-% 3A9D3A9D7F131313131313FF5353535353FFFFFF3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D9D3A3A3A9D
-% 9DFFFF53535353535353FF9D9D3A3A3A9D3A3A9D9D9D9D3A9D9D9D3A9D3A
-% 3A3A3A3A3A3A3A3A3A000000000000210010101010C51010101012101210
-% 121018181718181618181818181818181818181810101010121012161010
-% 101010101010101000FF1818171818181810101210121010101010101010
-% 101010101010101010081010101218181818181818101010101010181212
-% 161818181A161818181816181818AF101210FF7D00000000000000003A3A
-% 3A3A3A3A3A3A9D3A9D9D9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A3A3A9D9D9D
-% 9D3A9D3A9D9D9D3A3A3A9D9D3A3A3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F131313131313
-% 137F9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A9D9D9D9D7F1313131313FF53535353535353FF3A
-% 3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A9D
-% 9D9D3A3A9D3A3A3A3A3A9DFF53535353535353FF3A9D9D3A9D3A3A3A3A3A
-% 3A3A9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A
-% 9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A9D9D3A3A3A3A3A3A9D9D3A9D9D
-% 3A9D3A9D9D3A3A9D9D3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A9D9D9D9D9D9D7F131313131313137F9D9D9D9D3A3A3A9D9D
-% 9D3A9D3A3A9D9D3A9D9D9D9D9D3A9D9D3A3A3A3A9D9D3A9D3A9D9D9D3A3A
-% 9D3A9D7F131313131313FF53535353535353FF3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D9D3A3A3A9D9D
-% 9DFF53535353535353FF9D9D3A3A3A9D3A3A9D9D9D9D3A9D9D9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A000000000000210012101010C5101210181818101810
-% 181018121818181818181818181818181818171818181810101210121010
-% 1010101010101000FF121818181818181012101810181816121818181210
-% 10101210101010100A081010181818181818181818121010101012101012
-% 12181818181816181818181816AF101010FF7D00000000000000003A3A3A
-% 3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D3A3A3A9D9D3A3A9D3A9D3A9D3A
-% 9D9D3A9D9D9D9D3A3A3A9D9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313
-% 137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313FF535353535353535353FF3A
-% 3A3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A9D9D3A9D9D
-% 9D3A3A3A3A3A3A3A3AFF535353535353535353FF9D3A9D3A3A3A3A3A3A3A
-% 3A9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A9D9D3A9D9D3A3A9D3A3A3A3A3A3A3A9D9D9D9D3A9D
-% 3A3A3A3A9D3A9D9D3A3A3A3A3A3A3A9D9D9D9D3A9D3A3A3A3A3A3A9D9D3A
-% 3A3A3A3A3A3A9D9D9D9D7F1313131313131313137F9D3A3A3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D7F131313131313FF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D9D9D3A3A3A9D3A9D9DFF
-% 535353535353535353FF9D9D9D3A3A9D3A9D9D3A9D9D9D3A9D3A9D3A3A3A
-% 3A3A9D3A3A3A3A000000000000210010101010C512161818181818181210
-% 121012101810181818181818181818121818181818181012101810181816
-% 12181818121000FF10121012101212101012121618181818181818181818
-% 101818131610101010101210181818181818181010101010101010101010
-% 121018181818181818181818AF121010FF7D00000000000000003A3A3A3A
-% 9D3A3A3A9D3A9D9D9D9D9D3A9D3A3A9D3A9D9D9D3A3A3A9D9D3A9D3A9D9D
-% 9D3A9D3A3A9D9D9D3A3A9D9D3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D3A9D9D7F131313131313131313
-% 7F3A9D3A9D9D3A3A9D9D9D9D3A9D9D9D3A9D9D3A9D9D9D9D9D3A9D9D9D9D
-% 9D3A9D9D3A9D3A9D9D3A9D7F1313131313FF535353535353535353FF3A3A
-% 3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D
-% 3A3A3A3A3A3A3A3AFF535353535353535353FF9D3A9D3A3A3A3A3A3A3A9D
-% 9D9D9D3A3A3A9D3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A9D
-% 9D3A3A3A3A3A3A3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D
-% 9D9D9D3A9D3A3A3A3A9D3A3A3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A9D3A3A3A9D9D7F1313131313131313137F3A9D3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 7F131313131313FF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A3A9D3A9D3A9DFF53
-% 5353535353535353FF3A3A9D9D9D3A3A3A9D3A3A9D9D9D9D3A3A3A3A3A3A
-% 3AFF3A3A3A3A00FF00000000210010101010C518181818181A1818181010
-% 101010121012101812161818181010121012101212101012121618181818
-% 181818181800FF1210101210101010181010121818181818181A181A1818
-% 181718181218181810101810181218181012101210101818101010101010
-% 1212181818181818181818AF101210FF7D00000000000000003A3A3A3A9D
-% 3A3A3A9D3A9D9D9D9D9D3A9D3A3A9D3A9D9D9D3A3A3A9D9D3A9D3A9D9D9D
-% 3A9D3A3A9D9D9D3A3A9D9D3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D3A9D9D7F1313131313131313137F
-% 3A9D3A9D9D3A3A9D9D9D9D3A9D9D9D3A9D9D3A9D9D9D9D9D3A9D9D9D9D9D
-% 3A9D9D3A9D3A9D9D3A9D7F1313131313FF535353535353535353FF3A3A3A
-% 9D9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D3A
-% 3A3A3A3A3A3A3AFF535353535353535353FF9D3A9D3A3A3A3A3A3A3A9D9D
-% 9D9D3A3A3A9D3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A9D9D
-% 3A3A3A3A3A3A3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D9D
-% 9D9D3A9D3A3A3A3A9D3A3A3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A9D3A3A3A9D9D7F1313131313131313137F3A9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F
-% 131313131313FF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A3A9D3A9D3A9DFF5353
-% 53535353535353FF3A3A9D9D9D3A3A3A9D3A3A9D9D9D9D3A3A3A3A3A3A3A
-% FF3A3A3A3A00FF00000000210012101010C51818181A1818181818121010
-% 101010121010101012101818101210101210101010181010121818181818
-% 181A181A00FF1818121010121012121012101018181618181A1818181818
-% 181818171818181612121012101010181810101212181018181010101210
-% 101818181A1818181818AF161210FF7D00000000000000003A3A3A3A3A3A
-% 3A3A9D3A9D9D3A9D9D9D9D3A9D3A3A3A9D3A3A9D9D9D3A3A9D9D3A9D9D3A
-% 9D3A9D9D9D3A3A3A9D9D3A9D3A3A9D9D3A9D9D3A3A9D3A9D9D3A9D3A3A3A
-% 3A3A9D9D3A3A3A3A9D3A3A3A9D3A9D9D3A9D3A7F131313131313137F3A9D
-% 9D9D9D3A9D3A9D9D3A9D3A9D9D3A9D3A9D3A9D3A3A9D3A9D3A3A9D9D3A9D
-% 9D9D3A9D3A9D3A9D3A3A7F1313131313FF53535353535353FF3A3A3A3A9D
-% 9D9D9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D9D3A3A
-% 3A3A3A3A3A3A9DFF53535353535353FF9D3A9D3A9D3A3A9D3A3A3A3A9D9D
-% 9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A9D9D3A
-% 3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A3A3A3A3A3A9D9D3A3A3A
-% 3A3A3A3A9D9D9D9D7F131313131313137F9D3A9D9D3A9D9D3A9D9D9D9D9D
-% 3A9D9D3A9D3A9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D7F
-% 131313131313FF53535353535353FF3A9D3A9D3A9D3A9D9D3A3A9D3A9D3A
-% 9D9D9D9D3A9D3A3A9D3A9D3A9D9D3A9D9D9D3A9D9D9D9D3A3A9D9DFF5353
-% 5353535353FF9D3A3A9D9D3A3A9D3A3A9D9D3A9D9D9D3A9D3A3A3A3AFFFF
-% FFFFFFFFFFFF00000000210012101212C518181818181A18181810100B0E
-% 10101010100E101010121818181812101012101212101210101818161818
-% 1A181800FF18181818121010181010101012181810101818181818121012
-% 101818181818181810101010101018181012101010181818181816121612
-% 181818AFAFAFAFAFAFAF181018FF7D00000000000000003A3A3A3A3A3A3A
-% 3A9D3A9D9D3A3A9D9D3A3A9D9D3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A3A3A9D3A9D9D3A3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D
-% 3A9D9D3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D7F131313131313137F9D3A3A
-% 9D3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A3A9D3A9D3A9D3A9D9D3A9D3A3A9D
-% 3A9D3A9D3A3A9D3A9D7F1313131313FF53535353535353FF3A3A3A3A9D9D
-% 9D3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3AFF53535353535353FF3A3A9D9D3A3A3A3A3A3A3A3A9D9D3A
-% 3A3A3A3A9D9D9D9D3A9D3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A
-% 3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D
-% 9D9D3A3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A9D9D9D3A7F131313131313137F3A3A9D3A3A9D3A9D3A3A9D3A9D3A
-% 9D3A9D9D9D3A9D3A9D9D3A9D3A9D3A9D3A9D3A3A9D3A3A3A3A3A9D9D7F13
-% 1313131313FF53535353535353FF9D3A3A9D9D9D9D3A9D9D9D9D9D3A3A9D
-% 3A9D3A9D3A9D9D3A9D3A3A9D3A3A3A9D3A3A3A9D9D3A9D9D9D9DFF535353
-% 53535353FF3A9D3A3A9D9D9D3A9D3A9D3A9D3A9D9D3A9D3A3A3A3AFFFFFF
-% FFFFFFFFFF00000000210010181316C5181818181A181A18181210101010
-% 1010100A100A101012161818181818121010181010101012181810101818
-% 181800FF1618181818181018181810121010101818161818181618101010
-% 18131618181A181818121010101810181210181813181818181818181818
-% 1818181818181818AF181012FF7D00000000000000003A3A3A3A3A3A3A3A
-% 9D3A9D9D3A3A9D9D3A3A9D9D3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A3A3A9D3A9D9D3A3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D3A
-% 9D9D3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D7F7F7F1313137F7F9D9D3A3A9D
-% 3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A3A9D3A9D3A9D3A9D9D3A9D3A3A9D3A
-% 9D3A9D3A3A9D3A9D3A7F7F131313FFFFFF535353FFFF3A3A3A3A3A9D9D9D
-% 3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3AFFFF535353FFFFFF3A3A9D9D3A3A3A3A3A3A3A3A9D9D3A3A
-% 3A3A3A9D9D9D9D3A9D3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A3A
-% 3A3A3A3A3A9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D
-% 9D3A3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A9D9D9D3A7F7F7F1313137F7F9D3A3A9D3A3A9D3A9D3A3A9D3A9D3A9D
-% 3A9D9D9D3A9D3A9D9D3A9D3A9D3A9D3A9D3A3A9D3A3A3A3A3A9D9D3A7F7F
-% 131313FFFFFFFF535353FFFF3A9D3A3A9D9D9D9D3A9D9D9D9D9D3A3A9D3A
-% 9D3A9D3A9D9D3A9D3A3A9D3A3A3A9D3A3A3A9D9D3A9D9D9D9D9DFFFF5353
-% 53FFFFFF3A9D3A3A9D9D9D3A9D3A9D3A9D3A9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A00FF00000000210010121618C518181A181A18181818181818181010
-% 0A1010101010101012181618181818181018181810121010101818161818
-% 1800FF121818181818181818171210101010121012181018121818181812
-% 161812161818181818101810121012161818101818181818181818181818
-% 1818181A181818AF181818FF7D00000000000000003A3A3A3A3A3A3A3A3A
-% 3A9D9D9D9D9D9D3A9D3A3A9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D3A9D9D3A9D3A9D3A9D3A9D9D3A3A9D9D9D3A3A9D9D3A9D9D3A
-% 9D3A9D9D3A9D9D9D3A9D9D9D3A3A7F7F1313137F7F7F9D9D9D3A9D3A9D9D
-% 9D3A3A9D9D3A9D3A9D3A3A9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A9D9D3A9D
-% 3A3A9D3A9D3A9D3A9D9D7FFFFF535353FFFFFF9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFFFFFF535353FFFF9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D3A7F7F1313137F7F7F3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A9D3A9D
-% 3A9D9D3A9D3A9D3A9D3A3A3A3A9D3A9D3A9D3A3A9D3A3A9D3A3A9D3A9D7F
-% FFFF535353FFFFFFFF3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D3A9D3A3A9D3A
-% 3A9D3A9D9D3A9D3A3A9D3A9D9D3A3A9D9D3A9D9D9D9D9D9D9D9D9DFFFFFF
-% 535353FFFF9D3A3A9D3A9D9D3A9D9D9D9D9D9D3A9D3A3A9D3A3A3A3A3A3A
-% 3A00FF00000000210018181818C518181818181818181216181812101010
-% 121010101010101012121818181818181818171210101010121012181018
-% 00FF10121612181610181818121612101012101210121618181818181818
-% 12101810121618161818181018101210121018161818181818181A181A18
-% 181818181818AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A
-% 9D3A9D9D9D9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 9D3A9D3A3A3A9D9D3A9D3A9D3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D3A9D3A3A3AFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9DFF53535353535353FF9D3A9D9D9D3A9D9D9D9D9D9D3A9D3A
-% 9D9D3A9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D7F131313131313137F3A9D3A3A3A9D9D3A3A3A9D9D3A3A3A3A3A3A9D3A
-% 9D3A9D9D3A9D3A9D3A9D9D3A3A3A9D9D3A3A9D9D3A9D9D9D9D3A9D9DFF53
-% 535353535353FF3A9D3A9D3A3A3A9D3A9D9D3A9D3A3A9D9D9D3A9D9D9D3A
-% 3A3A9D3A9D3A9D3A3A9D3A9D3A9D3A9D9D9D3A3A3A3A3A3A3A3AFF535353
-% 53535353FF3A3A9D9D9D3A9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 000000000000210018181818C51018181818181812101012161818121018
-% 101010101010101010121612181610181818121612101012101210121600
-% FF1010121012181218161810121012101010101010121216181818161810
-% 18101012101218181818161210181012101212101818181818181818181A
-% 18181A1E18AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D
-% 3A9D9D9D9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A9D3A3A3A9D9D3A9D3A9D3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A9D3A3A3AFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9DFF53535353535353FF9D3A9D9D9D3A9D9D9D9D9D9D3A9D3A9D
-% 9D3A9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 7F131313131313137F3A9D3A3A3A9D9D3A3A3A9D9D3A3A3A3A3A3A9D3A9D
-% 3A9D9D3A9D3A9D3A9D9D3A3A3A9D9D3A3A9D9D3A9D9D9D9D3A9D9DFF5353
-% 5353535353FF3A9D3A9D3A3A3A9D3A9D9D3A9D3A3A9D9D9D3A9D9D9D3A3A
-% 3A9D3A9D3A9D3A3A9D3A9D3A9D3A9D9D9D3A3A3A3A3A3A3A3AFF53535353
-% 535353FF3A3A9D9D9D3A9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00
-% 0000000000210018181818C5181818181818181810101210181216181810
-% 1210101210101010101210121812181618101210121010101010101200FF
-% 101010101012161218101812161210101012101210101210181218181818
-% 181810181810121210121810121010101010121012181818181818181818
-% 1A181A18AF181818FF7D0000000000FFFFFFFFFFFF3A3A3A3A3A9D3A9D9D
-% 9D3A9D9D9D3A9D3A9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A3A3A9D3A9D9D3A
-% 9D9D9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A9D3A3AFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9DFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D
-% 3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F13
-% 13131313131313137F3A9D3A3A9D3A9D9D3A3A3A3A9D3A3A3A9D3A3A3A3A
-% 9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3AFF53535353
-% 5353535353FF3A3A3A9D3A3A3A9D9D3A9D3A9D9D3A3A3A9D3A3A3A3A9D3A
-% 9D3A3A3A9D3A3A3A9D9D3A9D9D9D9D3A9D9D3A3A3A9D3AFF535353535353
-% 535353FF3A9D9D3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A0000
-% 00000000210018181818C51818181A181818181010121012101210121810
-% 12101010121010101010101216121810181216121010101210121000FF10
-% 101012181818161818181018161810101010101012101210101218161818
-% 181818101210101018161210121010101010101210121612181818181A18
-% 201E1AAF1A1818FF7D00000000FFFFFFFFFFFFFFFF3A3A3A3A9D3A9D9D9D
-% 9D9D3A9D9D3A9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D3A9D9D9D
-% 3A9D3A3A9D9D9D3A9D9D3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A9D3A3A3A9D7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 9D9D3A3A9DFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9DFF535353535353535353FF3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D
-% 9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F1313
-% 131313131313137F9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A9D3A9D3A9D9D3A3A9D9D3A3A9D9D3A3A3A3A3A3AFF53535353535353
-% 5353FF3A3A9D9D9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000
-% 000000210018181818C51818181818181818181812101010101018101818
-% 181812101010101012181818161818181018161810101010101000FF1810
-% 121018181818121810181818181810121012101010101012101012121018
-% 18101810101010181210101010101010101010101010101818181818181A
-% 181AAF181818FF7D00000000FF0000003A3A3AFF3A3A3A3A9D3A9D9D9D9D
-% 9D3A9D9D3A9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D3A9D9D9D3A
-% 9D3A3A9D9D9D3A9D9D3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D3A
-% 3A3A9D3A3A3A9D7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D3A3A9DFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9DFF535353535353535353FF3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D
-% 3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F131313
-% 1313131313137F9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A9D3A9D3A9D9D3A3A9D9D3A3A9D9D3A3A3A3A3A3AFF5353535353535353
-% 53FF3A3A9D9D9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000
-% 0000210018181816C5181818181818181818121010101010101012101818
-% 1818181818101210181818181218101818181818101210121000FF1A1818
-% 181618181816181818181618181818101010101012121012101010101218
-% 101210121010181016121010101010101010101010101018181818181818
-% 20AF1A1818FF7D00000000FF0000003A3A3AFF3A3A3A3A9D3A9D3A9D3A9D
-% 3A9D9D3A9D3A3A9D3A9D9D9D9D3A3A3A3A3A9D3A3A9D9D3A9D9D9D3A9D9D
-% 3A3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D7F131313131313137F9D3A9D9D3A9D3A9D3A3A3A3A3A9D
-% 9D3A3A3A9D3A3A3A3A3A9D3A3A9D3A3A9D3A3A3A9D3A9D3A3A3A9D3A3A3A
-% 9D9D3A9DFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9DFF53535353535353FF9D3A9D3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D3A9D9D3A
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F131313
-% 131313137F3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 53FF3A9D3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A9D3A
-% 9D3A9D3A9D9D3A3A9D9D9D9D9D9D3A9D3A3A3A3A3AFF53535353535353FF
-% 9D3A3A9D9D3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000
-% 00210018181812C512101818181012161216101010101012101018181818
-% 1818181A181818161818181618181818161818181810101000FF18181818
-% 1A1818181810181018181816181216121018101010121010101010101012
-% 10121618181218181818181010101010101010101010121018181A202118
-% AF181818FF7D00000000FFFFFFFFFFFFFFFF3A3A3A3A3A3A9D9D3A9D3A3A
-% 9D9D3A9D3A9D9D9D9D3A9D9D9D3A3A3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D
-% 3A9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A9D3A7F131313131313137F3A3A3A3A9D3A9D3A9D3A3A9D9D3A3A
-% 9D3A9D3A9D3A3A3A9D9D9D9D9D3A3A3A3A9D9D3A3A9D9D9D3A3A3A3A3A9D
-% 3A3A9DFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF53535353535353FF9D3A3A9D3A3A3A3A9D3A3A3A3A9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D9D3A3A3A3A3A9D3A3A3A9D
-% 3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A7F13131313
-% 1313137F9D3A9D3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D3A9D3A3A3A3A9D3A
-% 9D3A3A3A9D3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A9D9DFF53535353535353
-% FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D
-% 3A9D3A3A3A3A9D9D3A3A9D9D9D3A3A3A3A3A3A9DFF53535353535353FF9D
-% 9D3A9D9D3A9D3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000
-% 210018181016C5101210101210181018181310100A08081010101216181A
-% 1818181818181A1818181810181018181816181216121000FF1818181818
-% 181A18101812121212181818181012101210101216181818181210121018
-% 1018121816121816181818181010101010101010101012181818201A18AF
-% 181212FF7D0000000000FFFFFFFFFFFF3A3A3A3A3A3A3A9D9D3A9D3A3A9D
-% 9D3A9D3A9D9D9D9D3A9D9D9D3A3A3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D3A
-% 9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A9D3A9D7F7F1313137F7F9D3A3A3A3A9D3A9D3A9D3A3A9D9D3A3A9D
-% 3A9D3A9D3A3A3A9D9D9D9D9D3A3A3A3A9D9D3A3A9D9D9D3A3A3A3A3A9D3A
-% 3A9D3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FFFF535353FFFF3A9D3A3A9D3A3A3A3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D9D3A3A3A3A3A9D3A3A3A9D3A
-% 9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A7F7F131313
-% 7F7F3A9D3A9D3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D3A9D3A3A3A3A9D3A9D
-% 3A3A3A9D3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A9D9D3AFFFF535353FFFF3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D3A
-% 9D3A3A3A3A9D9D3A3A9D9D9D3A3A3A3A3A3A9D3AFFFF535353FFFF3A9D9D
-% 3A9D9D3A9D3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021
-% 0012121812C510181012101810121816181810101008101010181818181A
-% 181818181818181A181018121212121818181810121000FF1A181A181A18
-% 181818121010101010181210101012101216121818181818181818181812
-% 1618121012101212161818101010121010100E101010121818181818AF10
-% 1010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D3A9D9D3A3A9D3A
-% 3A3A3A9D9D3A3A9D9D9D3A3A3A3A3A3A3A3A9D9D9D3A3A9D9D3A9D9D3A3A
-% 9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A7F7F7F7F7F7F7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3AFFFFFFFFFFFF7F7F7F9D3A9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D
-% 9D3A9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D3A3A
-% 9DFFFFFFFFFFFFFF9D9D9D3A9D3A9D3A9D9D3A9D3A3A9D9D9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A9D3A3A9D3A9D3A9D9D9D9D9D3A
-% 3A9D9D3A3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D3A9D9D
-% 9D3A9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D7F7F7F7F7F7F9D
-% 3A3A3A9D9D9D3A3A3A3A3A3A3A3A9D3A9D3A3A9D9D3A9D9D9D9D9D3A3A9D
-% 3A3A3A9D9D9D3A9D3A3A9D3A9D3A9D9D3A9D3A3AFFFFFFFFFFFF7F7F7F7F
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A9D3A3A9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A9D9DFFFFFFFFFFFF9D9D3A
-% 3A9D9D9D3A9D9D9D3A9D3A9D3A3A9D3A3A3A3A3A3A3A0000000000002100
-% 10101210C5181818181012101210181818181210101010121818181A1818
-% 1A181A181A1818181812101010101018121010101200FF18181818181818
-% 181810101010101018181012101010121012161818181818181818181818
-% 131612101010101212181012101010101010101010101216181812AF1210
-% 12FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D3A9D9D9D3A
-% 3A3A9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D9D9D3A9D
-% 9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D
-% 7F7F1313137F7F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A9D3AFFFF
-% 535353FFFF7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 9D3AFFFF535353FFFF9D9D9D9D3A3A3A3A9D3A9D3A3A3A9D3A9D3A9D3A9D
-% 3A3A9D3A9D9D9D3A3A3A3A3A9D3A9D3A3A9D9D3A9D9D3A9D9D3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A9D3A9D3A9D3A3A9D
-% 3A3A9D3A9D3A9D3A9D3A9D9D3A3A9D3A9D3A9D9D7F7F1313137F7F9D3A9D
-% 9D3A9D3A9D3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D9D3A3A3A3A3A9D3A3A3A3A3A3A9DFFFF535353FFFF7F7F1313137F
-% 7F3A3A9D3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D9D9D9D9D3A3A9D3A3A9D3A
-% 9D3A3A9D9D9D3A9D3A9D9D3A3A3A9D3A3A3A9D9D9DFFFF535353FFFF3A9D
-% 9D3A9D3A9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A000000000000210010
-% 121012C5181818181812101010101218181818121012101818181A181818
-% 181818181818181810101010101018181012101000FF1818181818181818
-% 121010101010101818101010101218101012181818181818181818181816
-% 1818181210101010121612181010121010101010101210121010AF101010
-% FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D3A9D9D9D3A3A
-% 3A9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D9D9D3A9D9D
-% 3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A7F13
-% 1313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A9DFF535353
-% 53535353FF13131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% FF53535353535353FF9D9D9D3A3A3A3A9D3A9D3A3A3A9D3A9D3A9D3A9D3A
-% 3A9D3A9D9D9D3A3A3A3A3A9D3A9D3A3A9D9D3A9D9D3A9D9D3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A9D3A9D3A9D3A3A9D3A
-% 3A9D3A9D3A9D3A9D3A9D9D3A3A9D3A9D3A9D7F131313131313137F3A9D9D
-% 3A9D3A9D3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D3A3A3A3A3A9D3A3A3A3A3A3AFF53535353535353FF131313131313
-% 7F3A9D3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D9D9D9D9D3A3A9D3A3A9D3A9D
-% 3A3A9D9D9D3A9D3A9D9D3A3A3A9D3A3A3A9D9DFF53535353535353FF9D9D
-% 3A9D3A9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A00000000000021001010
-% 1012C518181818181810121010101010121618121618181818181A181818
-% 1818181818181210101010101018181010101000FF181818181818181810
-% 121010101010181618181216121010101210181810121818181818181818
-% 18181816121010101812161210101010101012101012101012AF101010FF
-% 7D00000000000000003A3A9D3A3A3A3A3A9D3A9D9D9D9D3A9D3A9D3A3A9D
-% 9D9D9D3A9D9D3A9D3A3A3A3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D3A3A9D9D
-% 9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D3A3A3A3A7F1313
-% 13131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3AFF53535353
-% 535353FF13131313137F3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A9D9D9D9D
-% 9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D3A9D3A3A3AFF
-% 53535353535353FF3A9D9D9D9D9D9D9D9D3A3A9D9D9D3A9D3A3A3A3A3A9D
-% 9D3A9D9D9D9D9D3A3A3A9D9D9D3A3A9D3A3A9D3A9D3A9D3A9D9D9D9D3A3A
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D3A9D3A9D9D3A9D3A
-% 9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D3A7F131313131313137F9D9D9D3A
-% 9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A9D9D3A3A3A9D3AFF53535353535353FF1313131313137F
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D3A9D3A9D9D3A3A3A3A9D3A9D9D3A
-% 3A9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A9D9DFF53535353535353FF3A9D9D
-% 9D9D3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100101010
-% 10C51818181A181812101010100808101012101812171818181818181818
-% 18181818181012101010101018161818121600FF12161818101810181210
-% 121010101212181818181812101010121613101210181618181818181818
-% 181818181010101216121012101216181810181012101216AF101010FF7D
-% 00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D3A9D3A9D9D
-% 3A9D9D9D9D3A9D9D3A3A3A3A3A3A9D9D3A9D9D3A9D9D3A9D9D3A9D9D9D9D
-% 3A3A3A3A9D3A3A3A3A3A9D3A3A3A9D9D9D3A3A3A3A3A3A3A3A7F13131313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFF535353535353
-% 535353FF13131313137F9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D
-% 9D9D9D9D3A9D9D9D9D3A9D3A3A9D9D3A9D9D3A9D9D3A9D3A9D9D3AFF5353
-% 53535353535353FF9D9D3A9D9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D9D3A3A3A3A3A9D3A9D3A9D3A9D3A9D9D9D9D9D3A3A9D9D
-% 3A9D9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A7F1313131313131313137F9D9D9D9D
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3AFF535353535353535353FF1313131313137F
-% 3A3A3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A9D3A3A
-% 9D9D9D9D9D3A3A9D9D3A3A3A3A3A3A9DFF535353535353535353FF9D3A9D
-% 3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A000000000000210010101010
-% C51818181818181818101010100A10101010121612181818181812161818
-% 101810181210121010101212181818181800FF1012101012161210101010
-% 121012161818181A18181210181218181818101218121216181818181218
-% 1818181810121018101810181012181818181812161218AF101010FF7D00
-% 000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D3A9D3A9D9D3A
-% 9D9D9D9D3A9D9D3A3A3A3A3A3A9D9D3A9D9D3A9D9D3A9D9D3A9D9D9D9D3A
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A9D9D9D3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFF53535353535353
-% 5353FF13131313137F9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D
-% 9D9D9D3A9D9D9D9D3A9D3A3A9D9D3A9D9D3A9D9D3A9D3A9D9D3AFF535353
-% 535353535353FF9D9D3A9D9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D9D3A3A3A3A3A9D3A9D3A9D3A9D3A9D9D9D9D9D3A3A9D9D3A
-% 9D9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A
-% 9D3A3A3A3A3A9D3A3A3A3A9D3A3A7F1313131313131313137F9D9D9D9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3AFF535353535353535353FF1313131313137F3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A9D3A3A9D
-% 9D9D9D9D3A3A9D9D3A3A3A3A3A3A9DFF535353535353535353FF9D3A9D3A
-% 3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A000000000000210010101010C5
-% 1818181A20181818101210101010100A1012101818181818121012101012
-% 161210101010121012161818181A181800FF181818181810121612161216
-% 1218181818181A1818181010101010121018101010101218181818101210
-% 10101018181012101812181816181A18181818181618AF181818FF7D0000
-% 0000000000003A3A3A3A9D3A3A3A3A3A9D9D9D9D3A9D3A9D3A3A9D9D9D9D
-% 9D9D9D3A9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D3A3A9D3A9D9D3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353535353535353
-% 53FF13131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A9D9D3A3A3A3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D3A9D3A3AFF53535353
-% 5353535353FF9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D3A9D9D3A
-% 9D3A9D9D3A3A9D3A3A3A9D3A9D3A3A9D3A9D3A9D3A9D9D3A3A3A9D3A3A9D
-% 9D9D9D3A9D9D9D9D9D3A9D3A9D3A9D3A9D3A9D9D9D9D3A3A9D3A9D3A9D3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A9D3A9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3AFF535353535353535353FF1313131313137F3A3A
-% 3A3A3A9D3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D
-% 3A9D9D3A9D3A3A3A3A3A3A9D3A9DFF535353535353535353FF9D9D9D3A3A
-% 9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181010C510
-% 101216181818181810121010101010101010101012101818181818181810
-% 1216121612161218181818181A181800FF1A181818101210181012101216
-% 181818181818181818181010101010101010101010101216181818101012
-% 1012181810101216121618181818181A1818181818AF181816FF7D000000
-% 00000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A3A9D9D9D3A3A9D9D3A3A9D
-% 9D9D3A9D9D3A3A9D3A3A3A9D9D9D9D9D3A9D9D9D3A9D3A3A9D9D9D3A3A3A
-% 3A9D3A3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A9D3A3A3A3A7F131313131313
-% 137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF53535353535353FF
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D3A9D3A3A9D3A
-% 3A3A3A9D3A9D3A9D9D3A9D9D9D3A3A9D9D3A9D9D3A9D3A3A9DFF53535353
-% 535353FF9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D3A9D9D
-% 3A9D9D3A9D3A3A3A9D3A9D9D3A3A9D3A9D9D9D3A9D9D9D3A3A9D3A3A9D9D
-% 3A9D3A9D3A3A9D9D9D3A9D3A9D3A9D3A9D9D9D3A3A3A9D9D3A9D3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A3A9D3A3A7F131313131313137F9D9D3A9D3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3AFF53535353535353FF1313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A9D9D3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D9D9D
-% 9D9D3A9D9D9D3A3A3A3A3A3A9D9DFF53535353535353FF3A9D3A9D9D3A9D
-% 9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018161818C51010
-% 10121810181018121010101012101010101210121618181A181818101210
-% 181012101216181818181818181800FF1818181818111813161216121818
-% 181818181A18181818101010101010100A10101010101218181818181012
-% 1612181012101813181818181818181818181810AF161318FF7D00000000
-% 000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A3A9D9D9D3A3A9D9D3A3A9D9D
-% 9D3A9D9D3A3A9D3A3A3A9D9D9D9D9D3A9D9D9D3A9D3A3A9D9D9D3A3A3A3A
-% 9D3A3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A9D3A3A3A3A7F13131313131313
-% 7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF53535353535353FF13
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D3A9D3A3A9D3A3A
-% 3A3A9D3A9D3A9D9D3A9D9D9D3A3A9D9D3A9D9D3A9D3A3A9DFF5353535353
-% 5353FF9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D3A9D9D3A
-% 9D9D3A9D3A3A3A9D3A9D9D3A3A9D3A9D9D9D3A9D9D9D3A3A9D3A3A9D9D3A
-% 9D3A9D3A3A9D9D9D3A9D3A9D3A9D3A9D9D9D3A3A3A9D9D3A9D3A9D3A3A3A
-% 3A9D3A3A3A3A3A3A3A9D3A3A7F131313131313137F9D9D3A9D3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3AFF53535353535353FF1313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A9D9D3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D9D9D9D
-% 9D3A9D9D9D3A3A3A3A3A3A9D9DFF53535353535353FF3A9D3A9D9D3A9D9D
-% 9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210013181818C5121010
-% 121010121018101012101216181618121618181818181818181818111813
-% 161216121818181818181A181800FF1A1818181818161818121012161818
-% 1A181A181818181810101010101010101010081010101818181818181018
-% 16121612181018101810181818181818181010AF121818FF7D0000000000
-% 0000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D3A9D9D3A9D3A9D9D9D9D3A
-% 9D9D3A3A3A3A3A9D3A3A9D9D9D3A3A9D9D3A9D9D3A3A9D9D3A9D3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A9D3A3A3A7F7F1313137F7F3A
-% 9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF7F1313
-% 137F7F3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D3A9D3A9D9D3A9D3A9D
-% 9D9D3A3A9D3A9D9D9D3A3A9D9D9D9D9D9D3A9D3A3A9D9D9DFFFF535353FF
-% FF9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A
-% 3A9D9D3A9D3A9D3A9D9D3A9D3A3A9D3A9D9D3A9D9D9D3A3A9D9D3A3A9D9D
-% 9D9D9D9D9D3A9D9D9D3A3A9D3A3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D9D3A
-% 3A3A3A3A3A3A3A9D3A9D3A3A7F7F1313137F7F3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9DFFFF535353FFFF7F7F1313137F7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A9D9D9D9D9D3A3A3A9D3A9D3A3A9D3A9D9D9D3A9D9D
-% 3A9D3A9D3A3A3A3A3A3A9D9D9DFFFF535353FFFF9D3A9D9D9D3A3A9D3A9D
-% 9D3A3A3A3A9D3A3A3A3A3A3A3A000000000000210018181818C518181010
-% 1010121012101210121618181818C5C5C5C51818181A18C5C518181618C5
-% C5C5C5C5C5181A181A18181800FF18181818181818181712161818181818
-% 18181A181818181118121012101010101010080E10101818181818181210
-% 121018101810121812101818181817181218AF181618FF7D000000000000
-% 00003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D3A3A3A9D9D9D3A9D9D9D3A
-% 9D9D3A3A3A3A3A3A9D9D3A9D9D3A9D9D9D9D9D3A3A9D9D9D9D3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A7F7F7F3A3A9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A7F7F7F
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A9D3A3A9D9D3A9D3A
-% 9D9D9D9D3A9D3A3A3A9D9D9D3A9D9D3A3A3A3A9D9D9D9D9D9DFFFFFF9D9D
-% 9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D3A3A
-% 3A3A9D3A3A3A3A3A3A9D9D3A9D3A9D3A9D9D3A9D9D9D3A3A9D3A3A9D9D3A
-% 9D9D3A9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D3A9D3A3A3A3A3A9D3A3A9D3A
-% 3A3A3A3A3A9D9D9D9D3A3A3A3A7F7F7F3A9D3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A9D3A9D3A3A9D3A9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D9D9D9D
-% 9D3A9D3A3A3A9D3A3A9D9D9D9D9DFFFFFF9D9D9D3A9D3A9D9D3A9D9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A000000000000210016181818C51818181810
-% 121018101810121018181818C5C51818C5C518181818C5C51818181817C5
-% C5181818181818181A181800FF18181818181A1818181812181818181818
-% 181818181618181612161810121012101010101010101218161818181018
-% 1813161318101210101216121818121618AF181818FF7D00000000000000
-% 003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D3A3A3A9D9D9D3A9D9D9D3A9D
-% 9D3A3A3A3A3A3A9D9D3A9D9D3A9D9D9D9D9D3A3A9D9D9D9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A9D9D9D9D9D3A3A3A3A3A3A7F7F7F3A3A3A3A3A9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A7F
-% 7F7F3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A9D3A3A9D9D3A9D3A9D
-% 9D9D9D3A9D3A3A3A9D9D9D3A9D9D3A3A3A3A9D9D9D9D9D9D9D9D9DFFFFFF
-% 9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D3A3A3A
-% 3A9D3A3A3A3A3A3A9D9D3A9D3A9D3A9D9D3A9D9D9D3A3A9D3A3A9D9D3A9D
-% 9D3A9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D3A9D3A3A3A3A3A9D3A3A9D3A3A
-% 3A3A3A3A9D9D9D9D3A7F7F7F9D3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A
-% 9D3A9D3A9D3A3A9D3A9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D9D9D9D9D
-% 3A9D3A3A3A9D3A3A9D9D9D9D9D9D9D3AFFFFFF3A9D3A9D9D3A9D9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A000000000000210018181018C5181818181718
-% 1818121010121012121818C5C51818C5C5181818181818181A18181818C5
-% C518181818181818181800FF18181A181818181818181718181818121818
-% 181818121210121012101216121012101210101010101012181613101216
-% 18181216121012101012161818101818AF181818FF7D0000000000000000
-% 3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D3A9D3A9D9D3A9D9D9D9D9D3A9D
-% 3A3A3A3A9D3A3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A9D3A3A9D9D9D3A3A7F7F1313137F7F3A3A3A3A9D3A3A
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3AFFFF535353FFFF3A3A3A3A3A7F7F1313
-% 137F7F3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D3A3A9D9D9D3A9D
-% 3A3A9D3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A9DFFFF535353FF
-% FF9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D3A3A9D9D3A9D3A3A3A9D3A
-% 9D3A3A3A9D3A3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D9D
-% 9D9D3A3A9D3A9D9D9D3A9D9D3A9D3A3A3A3A9D9D3A9D9D9D3A9D3A3A3A9D
-% 3A3A3A3A9D9D7F7F1313137F7F3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A9D9D9D3A3A9D3A3A9D9D3A9D9D9D3A9D9D9D3A3A9D3A9D9D3A3A
-% 3A9D3AFFFF535353FFFF9D9D3A9D3A3A7F7F1313137F7F9D9D9D3A3A3A3A
-% 3A3A3A3A9D3A9D3A3A9D3A9D3A3A9D3A3A3A3A9D3A3A9D3A3A9D9D3A9D3A
-% 9D3A3A3A3A3A3A9D9D3A9D3A9DFFFF535353FFFF9D3A3A3A9D9D9D9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A000000000000210018181612C5C5C5C5C5C5C5C5
-% C5C5C5C5C51010121018C5C51818C5C5181818181A1818181818181817C5
-% C5181812181818181800FF1818181818181A181818181818181818161818
-% 161810101010101010121012181612101010100A10101210181810121818
-% 181018101010101010121810181018AF161818FF7D00000000000000003A
-% 3A3A3A3A9D3A3A9D3A9D9D9D9D3A3A9D9D3A3A3A9D3A9D3A9D9D3A9D3A3A
-% 3A9D3A3A3A9D9D3A9D3A3A9D3A9D9D3A3A9D3A9D9D9D3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A3A3A3A3A9D3A9D9D3A7F131313131313137F3A3A9D9D9D9D3A
-% 9D9D3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D3A3A3A3A9D
-% 9D9D9D3A3A3A9D3A3A3A3A3AFF53535353535353FF9D3A3A7F1313131313
-% 13137F9D3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A9D9D9D3A9D3A3A9D9D9D9D
-% 9D9D3A3A9D9D9D3A9D9D9D3A9D3A3A9D9D9D9D3A9D9DFF53535353535353
-% FF3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A9D3A3A9D9D3A3A3A
-% 9D3A3A3A3A3A3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D3A9D9D3A3A3A
-% 9D3A9D3A9D9D9D3A9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A9D9D3A3A9D3A9D9D3A9D3A9D9D3A9D3A9D3A3A9D3A9D9D3A3A3A3A3A
-% 9DFF53535353535353FF3A9D3A9D7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A9D9D9D9D3A3A9D9D9D9D3A9D9D3A3A
-% 3A3A3A3A3A3A9D9D9D3A3AFF53535353535353FF3A3A9D9D9D9D9D3A9D3A
-% 3A9D3A3A3A3A3A3A3A000000000000210018181818C51018181818161210
-% 181012101010101018C5C51818C5C51A181818181818181A1818181818C5
-% C51818161818161800FF181818181A181818181818181818181818181818
-% 18181810101210101010101812181018101010AF12161818181818161817
-% 1818181818101010101012181810AF121818FF7D00000000000000003A3A
-% 3A3A3A9D3A3A9D3A9D9D9D9D3A3A9D9D3A3A3A9D3A9D3A9D9D3A9D3A3A3A
-% 9D3A3A3A9D9D3A9D3A3A9D3A9D9D3A3A9D3A9D9D9D3A3A3A3A3A9D3A3A3A
-% 9D3A3A3A3A3A3A3A9D3A9D9D3A7F131313131313137F3A3A9D9D9D9D3A9D
-% 9D3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D3A3A3A3A9D9D
-% 9D9D3A3A3A9D3A3A3A3A3AFF53535353535353FF9D3A3A7F131313131313
-% 137F9D3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A9D9D9D3A9D3A3A9D9D9D9D9D
-% 9D3A3A9D9D9D3A9D9D9D3A9D3A3A9D9D9D9D3A9D9DFF53535353535353FF
-% 3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A9D3A3A9D9D3A3A3A9D
-% 3A3A3A3A3A3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D3A9D9D3A3A3A9D
-% 3A9D3A9D9D9D3A9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A9D9D3A3A9D3A9D9D3A9D3A9D9D3A9D3A9D3A3A9D3A9D9D3A3A3A3A3A9D
-% FF53535353535353FF3A9D3A9D7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A9D3A9D3A9D3A9D3A3A9D9D9D9D3A3A9D9D9D9D3A9D9D3A3A3A
-% 3A3A3A3A3A9D9D9D3A3AFF53535353535353FF3A3A9D9D9D9D9D3A9D3A3A
-% 9D3A3A3A3A3A3A3A000000000000210018181818C5101210121012101218
-% 1612101010101010C5C51012C5C51810181818181A181818C5C51818C5C5
-% 1818181818181800FF1818181A1E181A1818181612101218181818181818
-% 101810121010101010101218171818101210AF1018181818181818181818
-% 17181816101210121012101010AF101010FF7D00000000000000003A3A3A
-% 3A3A3A3A3A9D3A9D9D3A9D3A3A9D9D3A3A3A9D3A9D3A9D9D3A9D3A3A3A3A
-% 3A3A3A9D9D9D9D9D9D9D9D3A9D3A3A9D9D3A9D9D3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A9D9D7F1313131313131313137F9D3A9D3A3A3A9D3A
-% 9D3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D9D3A9D9D9D3A3A9D3A
-% 9D3A3A3A3A9D9D3A3AFF535353535353535353FF9D7F1313131313131313
-% 137F9D3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A9D3A9D9D9D9D9D9D9D3A9D3A
-% 3A9D9D9D3A9D9D9D3A9D3A3A3A9D9D9D9D9D9DFF535353535353535353FF
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D3A9D3A9D9D3A9D3A9D3A
-% 3A3A3A3A9D9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D3A3A3A9D9D9D9D3A9D3A
-% 3A3A3A9D9D9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A3A9D3A3A3A3A3A3A3A9D
-% 9D7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D3A9D9D3A3A9D3A9D3A9D9D3A3A9D9D9D9D3A3A3A3AFF53
-% 5353535353535353FF3A3A7F1313131313131313137F3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A9D3A3A9D3A3A3A3A3A9D9D3A3A3A9D9D3A9D9D9D3A9D9D3A3A
-% 3A3A3A3A9D9D9D3AFF535353535353535353FF3A9D3A9D9D9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A000000000000210010101012C512161216121810181012
-% 10101010101010C5C51010C5C510181818181A1E181A18C5C51612C5C518
-% 18181818181800FF1818181A181A18181812101210101012161218101818
-% 1810101010101010101216121818181818AF181818181818181818181818
-% 181818181816121010121012AF101010FF7D00000000000000003A3A3A3A
-% 3A3A3A3A9D3A9D9D9D9D3A3A9D9D9D9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A
-% 3A3A3A9D9D9D3A9D9D3A9D9D3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A3A3A9D9D9D7F1313131313131313137F9D3A9D3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A3A9D3A3A9D9D3A3A3A9D3A3A3A9D3A3A9D9D9D9D3A3A
-% 9D3A3A3A3A9D9D3AFF535353535353535353FF3A7F131313131313131313
-% 7F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A9D9D9D3A9D3A9D3A3A
-% 3A3A9D9D9D9D3A3A9D3A3A9D9D9D9D9D9D9DFF535353535353535353FF9D
-% 9D9D3A9D9D9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A3A9D3A9D
-% 3A3A3A3A3A9D9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A3A3A9D9D9D9D3A9D9D
-% 9D3A3A3A3A9D9D3A9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D9D
-% 7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9DFF5353
-% 53535353535353FF3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A
-% 9D3A9D9D9D9D9D9D3A3A3A9D3A9D3A9D3A3A3A9D9D3A9D9D3A9D3A3A3A3A
-% 3A3A3A9D9D9D9DFF535353535353535353FF3A9D9D9D9D9D3A9D3A3A9D3A
-% 3A3A3A3A3A3A000000000000210010101010C51012101210101012101210
-% 10121010081010C5C5C5C51012181818181A181A181818C5C5C5C5101012
-% 161218101800FF1818181A18181A18181810101010121012101212161218
-% 101010100A1010101012181818181818AF1818181A181818181818161812
-% 1818181818181012101018AF101010FF7D00000000000000003A3A3A3A3A
-% 3A3A3A9D3A9D9D9D9D3A3A9D9D9D9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A3A
-% 3A3A9D9D9D3A9D9D3A9D9D3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D3A3A3A9D9D9D7F1313131313131313137F9D3A9D3A3A3A3A3A9D3A
-% 3A3A3A3A9D3A3A3A9D3A3A9D9D3A3A3A9D3A3A3A9D3A3A9D9D9D9D3A3A9D
-% 3A3A3A3A9D9D3AFF535353535353535353FF3A7F1313131313131313137F
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A9D9D9D3A9D3A9D3A3A3A
-% 3A9D9D9D9D3A3A9D3A3A9D9D9D9D9D9D9DFF535353535353535353FF9D9D
-% 9D3A9D9D9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A3A9D3A9D3A
-% 3A3A3A3A9D9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A3A3A9D9D9D9D3A9D9D9D
-% 3A3A3A3A9D9D3A9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D9D7F
-% 1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9DFF535353
-% 535353535353FF3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A9D
-% 3A9D9D9D9D9D9D3A3A3A9D3A9D3A9D3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A
-% 3A3A9D9D9D9DFF535353535353535353FF3A9D9D9D9D9D3A9D3A3A9D3A3A
-% 3A3A3A3A3A000000000000210010101010C5121613181018121816181818
-% 1010100A100B101010101010181818181A18181A18181810101010121012
-% 1012121600FF1818181A181A181818181210121010121010101012101218
-% 18101010100810121618181A181A18AF18181A1818181818181012121816
-% 18121218101816101018AF181818FF7D00000000000000003A3A3A3A3A3A
-% 3A3A9D3A9D9D9D9D3A3A9D9D3A3A3A3A9D3A9D3A9D9D3A9D3A3A3A9D3A3A
-% 9D9D3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 9D9D9D9D9D9D9D3A3A7F131313131313137F3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A9D3A3A
-% 9D3A3A3A3A9D3AFF53535353535353FF3A3A3A7F131313131313137F3A3A
-% 3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D9D9D9D9D9D9D9D9D3A3A3A3A9D
-% 9D9D9D9D3A3A9D3A9D9D3A9D9D9D3A9D9DFF53535353535353FF9D9D9D9D
-% 9D9D3A9D3A9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D3A9D3A3A3A9D3A3A9D3A
-% 3A3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D3A3A3A3A9D9D9D9D9D3A9D9D
-% 3A3A9D9D9D9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D7F
-% 131313131313137F3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9DFF535353
-% 53535353FF3A3A9D3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D9D3A9D3A3A3A9D3A9D9D9D3A3A9D9D3A9D9D9D9D3A9D3A3A3A9D3A
-% 3A9D9D9D3A9DFF53535353535353FF3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A000000000000210018181010C512161216101316101818181818
-% 181010100E101010101010181818181A181A181818181210121010121010
-% 10101200FF10181818181818181818161216121810181018101210101818
-% 1610101010081012161818181818AF1A1818181818181810121010101218
-% 101010121012181818AF18181AFF7D00000000000000003A3A3A3A3A3A3A
-% 3A9D3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A9D
-% 9D9D3A9D3A9D9D9D3A3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A9D9D3A9D3A3A3A7F131313131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D9DFF53535353535353FF3A3A3A7F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A9D9D3A9D3A9D3A9D3A9D3A9D3A3A3A9D9D9D9D9D
-% 9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9DFF53535353535353FF9D3A9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D3A3A3A3A9D
-% 3A3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D9D9D3A9D9D9D9D3A
-% 9D9D9D3A9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A7F13
-% 1313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9DFF53535353
-% 535353FF3A3A9D9D7F131313131313137F3A3A3A9D3A3A3A3A3A3A9D3A9D
-% 3A9D9D3A3A3A3A3A9D3A9D9D3A9D3A3A9D9D9D3A9D3A9D3A3A3A3A3A3A3A
-% 9D9D9D9D3AFF53535353535353FF9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A0000000000002100181A1818C51818121818181218181818181818
-% 161210101010101010101210181818181818181818161216121810181018
-% 101200FF1012161818181818101210121018181818181312101010101212
-% 181810121012101818181818181818181A18181818101210101010121610
-% 1012101210121018AF181818FF7D00000000000000003A3A3A3A3A3A3A3A
-% 9D3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A9D9D
-% 9D3A9D3A9D9D9D3A3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 9D9D3A9D3A3A3A3A7F7F1313137F7F9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D9D3AFFFF535353FFFF3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A9D9D3A9D3A9D3A9D3A9D3A9D3A3A3A9D9D9D9D9D9D
-% 9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9DFFFF535353FFFF9D9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D3A3A3A3A9D3A
-% 3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D9D9D3A9D9D9D9D3A9D
-% 9D9D3A9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A7F7F
-% 1313137F7F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3AFFFF535353
-% FFFF3A3A3A9D9D3A7F7F1313137F7F3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A
-% 9D9D3A3A3A3A3A9D3A9D9D3A9D3A3A9D9D9D3A9D3A9D3A3A3A3A3A3A3A9D
-% 9D9D9D3A9DFFFF535353FFFF9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A000000000000210018181818C5101816181018181612101010121818
-% 181010101010101010101012161818181818101210121018181818181312
-% 1000FF101218161818101010101010101818181818181010101010101618
-% 181816101018181818181818181818181818181012101010101010121010
-% 10121010121018AF121612FF7D00000000000000003A3A3A3A3A3A3A3A9D
-% 3A9D9D9D3A9D3A9D9D9D9D3A3A9D3A9D9D9D9D9D3A3A3A3A3A3A3A9D9D3A
-% 9D9D9D9D9D3A3A3A9D3A9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A7F7F7F3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A
-% 3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D9D9D9DFFFFFFFF3A9D3A3A3A3A3A9D9D7F7F7F7F3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D9D3A3A9D3A9D9D9D9D9D3A9D9D3A
-% 3A9D9D3A9D9D3A9D9D9D3A9D9D3A9D9D9DFFFFFF9D9D3A9D9D9D9D9D9D3A
-% 9D9D3A9D9D9D9D9D3A9D3A9D9D9D3A9D9D3A9D9D3A3A3A3A9D3A3A3A9D3A
-% 9D3A9D9D9D3A3A9D9D3A9D9D9D9D9D9D3A9D3A3A9D9D3A9D3A9D3A9D3A9D
-% 9D3A9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F
-% 7F7F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9DFFFFFF3A
-% 3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A9D
-% 3A9D3A3A3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A9D9D
-% 3A9D3A9D3A9DFFFFFF9D9D9D9D3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A000000000000210016121818C518181218181810181010101010101218
-% 101010121010101010101218161818101010101010101818181818181010
-% 00FF10101012101012101010101012181818181818181010080A10101012
-% 1818181818181818AFAFAFAFAFAF18171812181010101010101012181810
-% 101012161818AF181618FF7D00000000000000003A3A3A3A3A3A3A3A9D3A
-% 9D3A9D9D9D3A3A9D9D3A9D3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A9D9D9D
-% 9D3A9D3A9D3A3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A7F3A3A3A3A3A3A9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A3AFF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D3A9D3A9D
-% 3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9DFF3A9D9D9D9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D3A9D3A3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D
-% 3A9D3A9D3A9D3A9D9D3A3A9D3A3A9D3A3A3A9D3A9D3A3A9D3A9D9D7F9D3A
-% 3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A9D3A7F3A3A3A9D3A9D3A3A3A3A3A9D3A3A3A9D3A3A9D
-% 3A3A3A3A3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D9D
-% 9D9D9D3A9D3A3AFF9D9D3A9D3A9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 000000000000210016181618C51A18181810121818181812101010101018
-% 121610101210101010101012101012101010101012181818181818181000
-% FF1210121018101810101010101012161818181A18181010101010101010
-% 101018181818AFAFAFAFAFAFAFAF18101810121010101010121818181816
-% 1210121018AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D
-% 3A9D9D9D3A3A9D9D3A9D3A3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A9D9D9D9D
-% 3A9D3A9D3A3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A7F7F7F3A3A3A3A3A3A9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3AFFFFFFFF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F7F7F7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D3A9D3A9D3A
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9DFFFFFF9D9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D3A9D3A3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D3A
-% 9D3A9D3A9D3A9D9D3A3A9D3A3A9D3A3A3A9D3A9D3A3A9D3A7F7F7F9D3A3A
-% 3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3AFFFFFF3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A9D3A3A7F7F7F9D3A9D3A3A3A3A3A9D3A3A3A9D3A3A9D3A
-% 3A3A3A3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D9D9D
-% 9D9D3A9D3A3A9DFFFFFF9D3A9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00
-% 0000000000210018181818C5181818181816181818181710101210121612
-% 101210101818101210121018101810101010101012161818181A181800FF
-% 181818181818181810121210121012181818181818181010101010101010
-% 1010121618AF181818181718AF1612101210101210121818181818181818
-% 10121018AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D
-% 9D3A9D3A3A9D9D9D9D3A3A9D9D3A9D3A9D3A3A3A3A3A3A3A9D9D9D3A9D3A
-% 9D9D3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A7F7F1313137F7F9D3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3AFFFF
-% 535353FFFF3A3A3A3A3A3A3A9D3A3A3A3A3A7F7F1313137F7F3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A3A9D9D9D3A9D3A3A
-% 9D3A9D9D9D9D9D9D9D9D9D9D9D9D9DFFFF535353FFFF9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D3A9D3A3A9D9D3A3A3A3A3A3A9D3A3A9D3A9D3A3A9D3A9D3A
-% 9D9D3A9D9D3A9D9D9D9D9D9D9D3A3A9D3A3A9D9D3A9D9D9D3A3A9D9D9D9D
-% 3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A7F7F1313137F7F3A9D
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF9D3A3A3A3A
-% 3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D
-% 3A3A3A3A9D3A9D9D9D9D3A3A9D9D3A3A9D9D3A3A3A3A3A3A3A9D9D9D3A9D
-% 3A9D9D3AFFFF535353FFFF9D3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A0000
-% 00000000210018181818C518181818181811181218181818161210181018
-% 10181818181818181818181818181012121012101218181818181800FF1A
-% 181818181818181818101010101012181818181818101810121010101010
-% 10121018AF181818181816AF18101210101010101018181818181A181810
-% 101012AF121612FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A
-% 9D9D9D3A3A9D9D9D9D3A3A9D3A3A9D3A9D9D3A3A3A3A3A3A9D9D9D9D3A9D
-% 9D3A9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 53535353FF3A9D3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A3A3A9D9D3A9D9D9D3A3A9D3A3A9D9D
-% 9D9D3A9D9D9D9D9D3A9D3A9D9DFF53535353535353FF9D9D3A3A9D9D9D9D
-% 9D9D9D3A3A9D9D3A9D3A9D3A9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A9D3A9D
-% 9D3A9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A9D3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A9D9D9D9D7F131313131313137F9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A7F131313131313137F9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A9D
-% 3A3A3A3A3A9D9D9D3A9D3A3A3A9D9D9D3A9D3A3A3A3A3A3A9D9D3A9D9D9D
-% 9D3AFF53535353535353FF3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000
-% 000000210016121612C51210181818181810101210181818101210121012
-% 1818181A181A181818181818181818101010101012181818181800FF1818
-% 181818181818181818121010101210121018101812101216181018121610
-% 101210AFAFAFAFAFAFAFAF10181012101010121818181A18181818181810
-% 1010AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D
-% 9D9D3A3A9D9D9D9D3A3A9D3A3A9D3A9D9D3A3A3A3A3A3A9D9D9D9D3A9D9D
-% 3A9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353
-% 535353FF3A9D3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A9D3A3A3A9D9D3A9D9D9D3A3A9D3A3A9D9D9D
-% 9D3A9D9D9D9D9D3A9D3A9D9DFF53535353535353FF9D9D3A3A9D9D9D9D9D
-% 9D9D3A3A9D9D3A9D3A9D3A9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A9D3A9D9D
-% 3A9D9D9D9D3A9D9D9D9D3A9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A9D3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A9D3A9D9D9D9D7F131313131313137F9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A7F131313131313137F9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A9D3A
-% 3A3A3A3A9D9D9D3A9D3A3A3A9D9D9D3A9D3A3A3A3A3A3A9D9D3A9D9D9D9D
-% 3AFF53535353535353FF3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000
-% 0000210010101010C5101012161818101210101018121210101810121018
-% 1818181818181818181818181818181210101012101210181000FF1A1818
-% 1818181818181818181812101010101010121010181012181818181A1810
-% 121018AFAFAFAFAFAF18181817181012101216181818181A181818121010
-% 10AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D3A9D9D9D
-% 3A3A3A9D9D9D9D3A3A9D9D9D9D9D3A3A9D3A3A3A3A3A9D3A9D3A9D3A3A3A
-% 9D3A9D9D9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D3A9D3A3A9D3A3A3A3A9D9D9D9D9D
-% 9D9D3A9D3A3A9D9D9D9DFF535353535353535353FF3A9D9D9D9D9D9D9D9D
-% 3A9D3A3A3A3A9D3A9D9D3A9D3A9D9D3A9D3A9D3A3A9D3A9D3A9D9D9D3A3A
-% 9D9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A9D9D3A9D9D3A9D9D3A9D3A9D3A9D
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353535353535353FF3A3A3A3A3A3A
-% 3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A
-% 3A3A3A9D9D9D9D9D3A3A9D9D9D3A9D9D3A3A3A3A3A3A9D3A9D3A9D9D3AFF
-% 535353535353535353FF3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000
-% 00210010101010C510101012181618181012101210101010121018101816
-% 1818181A181818181818181818181818121010101010101200FF18181818
-% 181012101817181818181810121010121010121012161818181818181818
-% 101818181818181818181818181818161818AFAFAFAFAFAFAFAFAFAFAFAF
-% AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D
-% 9D3A3A3A3A3A9D3A3A3A9D3A3A3A9D9D9D9D9D9D3A9D3A3A9D3A3A3A9D9D
-% 9D9D9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A9D9D3A9D3A3A9D9D9D9D9D3A
-% 9D9D9D9D9D9D3A9D3AFF535353535353535353FF9D9D9D3A9D9D9D9D9D3A
-% 3A3A9D3A3A9D9D9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A9D9D
-% 3A9D9D9D9D9D9D3A9D9D9D3A3A9D3A9D9D9D9D9D3A3A9D9D3A3A9D9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A9D
-% 3A7F1313131313131313137F3A3A3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A
-% 3A3A3A9D9D9D3A9D3A3A9D9D3A3A9D9D9D9D9D9D9D3A9D9D3A9D9D3AFF53
-% 5353535353535353FF3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A000000000000
-% 210010101010C51010101010121818181818181612161216121012101218
-% 181818181818181012101817181818181810121010121000FF1818111210
-% 101010121818181818181818181210101210101210121810121618181818
-% 181818181A1818181818181818181818181818181A1818181818181810AF
-% 101210FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D
-% 3A3A3A3A3A9D3A3A3A9D3A3A3A9D9D9D9D9D9D3A9D3A3A9D3A3A3A9D9D9D
-% 9D9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353535353535353
-% 53FF3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A9D9D3A9D3A3A9D9D9D9D9D3A9D
-% 9D9D9D9D9D3A9D3AFF535353535353535353FF9D9D9D3A9D9D9D9D9D3A3A
-% 3A9D3A3A9D9D9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A9D9D3A
-% 9D9D9D9D9D9D3A9D9D9D3A3A9D3A9D9D9D9D9D3A3A9D9D3A3A9D9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A9D3A
-% 7F1313131313131313137F3A3A3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 3A3A9D9D9D3A9D3A3A9D9D3A3A9D9D9D9D9D9D9D3A9D9D3A9D9D3AFF5353
-% 53535353535353FF3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A00000000000021
-% 0012101012C5101010101018181820191818181818181818101010121012
-% 1818181112101010101218181818181818181812101000FF181818161812
-% 181612101212181818181018101813181818181612161818181818181818
-% 181A181818181A181818181210131618181818181818181210121012AF12
-% 1618FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D
-% 3A9D9D3A9D3A3A3A9D9D9D3A9D3A9D3A9D3A9D9D3A9D3A3A3A9D3A9D9D9D
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A7F1313131313
-% 13137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A9D3A9D3A3A9D3A9D3A9D9D3A3A9D9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9DFF53535353535353FF9D9D9D3A9D9D3A9D9D9D9D3A9D
-% 3A3A3A9D3A9D3A3A9D3A3A9D3A9D3A3A9D3A9D9D3A9D9D9D9D3A9D9D9D3A
-% 9D3A9D9D9D9D3A9D9D3A3A9D9D3A9D9D3A9D3A3A9D9D3A3A9D3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A9D3AFF53535353535353FF3A3A3A9D3A3A3A3A3A9D
-% 7F131313131313137F9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A
-% 3A3A9D9D9D9D9D3A3A9D9D3A3A9D9D9D3A9D9D9D9D3A9D3A3A9D9DFF5353
-% 5353535353FF9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100
-% 16181818C510101010101018181818181818181810181818181012101018
-% 18181816181218161210121218181818101810181300FF10181018101818
-% 181818101618181818181818181816181212101210121818181818181818
-% 181818181818181A18181618181818181818181818181610101210AF1210
-% 18FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A3A
-% 3A9D9D9D9D9D3A3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D3A3A
-% 9D9D3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A9D7F131313131313
-% 137F3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D3AFF53535353535353FF3A
-% 3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D
-% 9D9D3A9D9D9D9DFF53535353535353FF9D3A9D9D9D9D9D9D9D9D9D3A3A9D
-% 3A3A9D9D3A3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A9D9D
-% 9D3A9D3A9D9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF53535353535353FF9D3A3A3A3A3A3A3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A9D9D9D9D9D3A3A3A3A9D9D9D3A3A9D3A3A3A9D9D3A3A3A9D9DFF535353
-% 53535353FF9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010
-% 181018C51012101010121012101217181818101818181810121010101810
-% 181018101818181818101618181818181818181800FF1012121212101018
-% 181818181210121018121612161210101010101010101018181818181818
-% 181818AFAF181818181818181818181818181818181818131010AF101210
-% FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A3A3A
-% 9D9D9D9D9D3A3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D3A3A9D
-% 9D3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A7F7F1313137F7F
-% 3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A
-% 9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D3A3AFFFF535353FFFF3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D9D
-% 9D3A9D9D9D9D9DFFFF535353FFFF9D9D3A9D9D9D9D9D9D9D9D9D3A3A9D3A
-% 3A9D9D3A3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A9D9D9D
-% 3A9D3A9D9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F9D3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A9D3A3A3A3A3A3A3A3A3A3A7F
-% 7F1313137F7F3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 9D9D9D9D9D3A3A3A3A9D9D9D3A3A9D3A3A3A9D9D3A3A3A9D9D9DFFFF5353
-% 53FFFF3A9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021001210
-% 1218C5101010101010101012181812181618101210121010101010121012
-% 1212121010181818181812101210181216121600FF121010101010121810
-% 181818161010121010101210121612101010101010101012101618181818
-% 1818AFAF20181A181818181818181818181818181818161810AF101010FF
-% 7D00000000000000003A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D3A9D3A9D9D
-% 9D9D9D9D9D3A3A3A9D3A9D3A9D3A9D3A9D3A3A3A3A9D9D9D9D9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D7F7F7F3A3A9D
-% 9D9D9D9D3A9D3A3A3A9D9D9D9D9D3A3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D
-% 9D9D3A3A3A3A9D9D3A9D9D3A3A3A9D9D9D9D9D3A3AFFFFFF9D9D3A9D9D3A
-% 3A3A9D9D9D9D3A3A3A3A3A7F7F7F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A9D3A9D9D9D3A3A9D3A3A3A9D3A9D9D9D9D9D9D3A3A9D9D9D9D3A
-% 9D9D9D9D9D9D9D9DFFFFFF9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D9D3A3A
-% 9D3A3A3A3A9D3A3A3A9D3A3A3A9D9D9D3A9D9D9D9D9D9D3A9D3A9D3A9D9D
-% 9D9D9D9D3A9D3A9D3A3A3A3A9D3A3A3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A9D3A7F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A9D9D3A
-% 9D9D9D9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D3AFFFFFF
-% FF3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A0000000000002100101012
-% 10C512121012101012101012101817121210181618101210101010121010
-% 10101012181018181816101012101010121000FF10101012101210101218
-% 181810121012161218121612101010101008100E10101010121216181818
-% 18181A181818181818181818181818181818181818181810AF101010FF7D
-% 00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D3A3A9D3A
-% 9D9D9D3A9D9D3A3A9D9D9D9D3A9D9D3A3A3A3A3A9D9D9D9D3A3A9D3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D3A9D3A7F9D3A3A3A9D3A9D
-% 9D3A3A9D9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A
-% 3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A9D9DFF3A3A9D9D3A3A9D9D3A3A
-% 3A9D9D3A9D9D3A3A3A3A3A9D7F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A9D9D9D3A3A9D3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D3A9DFF9D9D9D9D9D3A9D3A9D9D9D9D3A3A3A9D3A3A9D9D
-% 9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D
-% 9D9D3A9D9D9D9D3A3A9D3A9D3A9D9D3A9D3A9D3A9D3A9D9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A9D3A3A3A3A3A7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3AFF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D7F3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A
-% 9D9D9D3A3A9D9D3A3A9D9D9D9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D3AFF
-% 9D3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010101012
-% C51817181612101010121618181818101618181816181618181010101012
-% 101210101218181810121012161218121600FF1012101010101010101012
-% 181818181012101010101210121010101010101010101010101218181818
-% 1A18181A18181818181718181216181818181816181810AF101008FF7D00
-% 000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D3A3A9D3A9D
-% 9D9D3A9D9D3A3A9D9D9D9D3A9D9D3A3A3A3A3A9D9D9D9D3A3A9D3A3A9D3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D3A7F7F7F9D3A3A3A9D3A9D9D
-% 3A3A9D9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A3A
-% 3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3AFFFFFF3A3A9D9D3A3A9D9D3A3A3A
-% 9D9D3A9D9D3A3A3A3A3A9D3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A9D9D9D3A3A9D3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D3A9D9DFFFFFF9D9D3A9D3A9D9D9D9D3A3A3A9D3A3A9D9D9D
-% 3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D
-% 9D3A9D9D9D9D3A3A9D3A9D3A9D9D3A9D3A9D3A9D3A9D9D3A3A3A3A3A3A3A
-% 9D3A3A3A3A9D3A3A7F7F7F7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3AFFFFFF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A7F7F7F3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D
-% 9D9D3A3A9D9D3A3A9D9D9D9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D3AFFFF
-% FFFF9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010081010C5
-% 181818181818181613181818181818121818181818181818101012101010
-% 1010101010121818181810121010101000FF121010121012101210121010
-% 121612161216121813181718101210101010101010101010101816181818
-% 181A1818181818181210121012181217181818121810AF100810FF7D0000
-% 0000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D3A9D9D3A9D3A9D9D3A
-% 3A9D9D3A9D3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3A3A9D3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D7F7F1313137F7F3A3A3A3A3A3A3A
-% 3A3A9D3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A3AFFFF535353FFFF3A3A3A3A9D9D3A3A3A9D
-% 3A3A3A3A9D3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A9D9D9D9D3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D
-% 9D9D3A9D9D9DFFFF535353FFFF9D9D9D9D9D9D3A3A3A9D3A3A9D3A9D3A3A
-% 9D3A3A3A3A9D3A3A3A3A9D3A9D3A9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D
-% 9D3A9D3A9D9D3A9D9D3A9D3A9D3A9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F7F1313137F7F9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F
-% 1313137F7F3A9D3A9D3A3A3A9D3A3A3A3A3A9D3A9D3A3A3A3A9D3A3A3A9D
-% 9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A3A3A9D3AFFFF5353
-% 53FFFF9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210008101010C518
-% 18181A18181A181818181A18181818181818181818181810121010121012
-% 10121012101012161216121612181300FF10101210101210181210121010
-% 1210181818181816181818181610101010100A0E10101212181218181818
-% 181818181818101012101010121618121612181610AF10080AFF7D000000
-% 00000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D3A3A3A9D3A9D3A9D
-% 9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A9D3A3A3A9D3A3A3A9D9D3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A
-% 3A9D3A3A3A3A9D9D3A3A3AFF53535353535353FF3A3A3A9D9D3A3A3A9D9D
-% 3A3A3A3A3A9D3A7F131313131313137F3A9D3A3A3A3A3A3A3A9D3A3A3A3A
-% 9D9D9D9D3A9D9D3A3A9D9D3A3A9D9D9D3A9D9D9D3A9D9D3A9D9D9D3A3A9D
-% 9D9D9D3AFF53535353535353FF3A9D9D9D9D9D3A9D3A9D3A9D3A3A3A9D3A
-% 3A3A3A9D3A3A9D3A3A3A3A9D9D9D9D9D9D3A9D3A3A9D9D9D3A9D9D9D9D3A
-% 9D9D9D9D9D3A3A9D3A9D3A3A3A3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F131313131313137F3A9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF53535353535353FF3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A9D7F131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A9D9D3A9D9D
-% 9D3A3A9D9D9D3A9D3A3A3A3A9D9D9D9D3A3A9D3A3A3A9D9DFF5353535353
-% 5353FF3A9D3A3A3A9D3A3A3A3A3A3A0000000000002100080A1010C51818
-% 181820181818181818181818181812101210181216181010101210101210
-% 181210121010121018181818181600FF12181018181818181A1818181810
-% 101818161216121012101218181818121010101010101010101818AF1818
-% 1818181010181218161216121012101210101218AF101010FF7D00000000
-% 000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D3A3A3A9D3A9D3A9D9D
-% 9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A9D9D3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A
-% 9D3A3A3A3A9D9D3A3A3AFF53535353535353FF3A3A3A9D9D3A3A3A9D9D3A
-% 3A3A3A3A9D3A7F131313131313137F3A9D3A3A3A3A3A3A3A9D3A3A3A3A9D
-% 9D9D9D3A9D9D3A3A9D9D3A3A9D9D9D3A9D9D9D3A9D9D3A9D9D9D3A3A9D9D
-% 9D9D3AFF53535353535353FF3A9D9D9D9D9D3A9D3A9D3A9D3A3A3A9D3A3A
-% 3A3A9D3A3A9D3A3A3A3A9D9D9D9D9D9D3A9D3A3A9D9D9D3A9D9D9D9D3A9D
-% 9D9D9D9D3A3A9D3A9D3A3A3A3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F131313131313137F3A9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF53535353535353FF3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A9D7F13131313
-% 1313137F3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A9D9D3A9D9D9D
-% 3A3A9D9D9D3A9D3A3A3A3A9D9D9D9D3A3A9D3A3A3A9D9DFF535353535353
-% 53FF3A9D3A3A3A9D3A3A3A3A3A3A000000000000210010101010C5181618
-% 1A181A181A18181A181A1816121010121012101210181218101818181818
-% 1A18181818101018181612161200FF101012101818181818181A18181218
-% 1818181818121018101012181810101010101010AFAFAFAF121618AF1818
-% 16121012101810181818181018101210121012AF121010FF7D0000000000
-% 0000003A3A3A3A9D3A3A3A9D3A9D9D9D9D9D3A9D3A9D9D3A9D9D3A9D3A9D
-% 9D3A3A9D9D9D9D3A3A3A9D9D9D3A3A3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A9D9D9D3A
-% 3A3A3A9D9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A
-% 9D9D9D3A9D3A3A3AFF535353535353535353FF3A9D9D3A3A3A3A9D9D3A3A
-% 9D3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D
-% 9D3A3A9D3A3A3A9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9DFF535353535353535353FF9D9D9D3A3A3A3A3A9D3A3A9D9D3A9D3A3A9D
-% 3A3A3A3A3A3A3A9D9D3A9D9D9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A9D3A9D
-% 9D9D3A9D3A9D3A9D9D3A3A9D9D9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 7F1313131313131313137F3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3AFF53
-% 5353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 9D9D3A9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A9D3A9DFF5353535353535353
-% 53FF9D3A3A3A3A3A3A3A3A3A3A000000000000210010101010C518181818
-% 181A18181A181A1818181812101210121012101812101012101818181818
-% 181A1818121818181818181200FF10121010121012181818181818181818
-% 18181818171813101010101012101010101010AFAFAF12101012AF121012
-% 101010121012181818181818101210101010AF121818FF7D000000000000
-% 00003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A9D
-% 9D3A9D9D3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A9D3A3A3A7F1313131313131313137F3A3A3A3A3A9D9D3A3A
-% 3A3A9D3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D
-% 9D3A9D9D3A3A3AFF535353535353535353FF3A3A9D3A3A3A3A3A9D9D9D3A
-% 3A3A3A7F1313131313131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 3A3A9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A3A9D
-% FF535353535353535353FF9D9D3A9D3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A
-% 3A9D3A3A9D3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A3A9D3A9D9D9D9D9D9D
-% 9D9D9D3A3A9D9D9D3A3A3A9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A7F
-% 1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3AFF5353
-% 53535353535353FF3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F13131313131313
-% 13137F3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A
-% 9D3A9D9D3A9D3A9D9D3A9D3A3A3A9D9D9D3A9D9DFF535353535353535353
-% FF3A3A3A3A3A3A3A3A3A3A3A000000000000210018181813C5181818181A
-% 181818181818181818181010101010101012101010121010121012181818
-% 181818181818181818181700FF1810101210101818181818181818181818
-% 181818181816101012101010101010101010AF12AF10121012AF10121010
-% 1010101012161818181818181010101010AF101018FF7D00000000000000
-% 003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A9D9D
-% 3A9D9D3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A9D3A3A3A7F1313131313131313137F3A3A3A3A3A9D9D3A3A3A
-% 3A9D3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D
-% 3A9D9D3A3A3AFF535353535353535353FF3A3A9D3A3A3A3A3A9D9D9D3A3A
-% 3A3A7F1313131313131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A
-% 3A9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A3A9DFF
-% 535353535353535353FF9D9D3A9D3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A
-% 9D3A3A9D3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A3A9D3A9D9D9D9D9D9D9D
-% 9D9D3A3A9D9D9D3A3A3A9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A7F13
-% 13131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3AFF535353
-% 535353535353FF3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F1313131313131313
-% 137F3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D
-% 3A9D9D3A9D3A9D9D3A9D3A3A3A9D9D9D3A9D9DFF535353535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A000000000000210010181816C5181818181818
-% 181818181818181810101010101010121010181810101210101818181818
-% 1818181818181818181800FF181818101612181018181818181818181818
-% 1818181818181810101210181810101012AF10AFAFAFAFAFAF1210101210
-% 10101010121818181818181012101010AF0A1010FF7D0000000000000000
-% 3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D3A9D9D9D9D3A9D3A3A3A9D3A3A3A
-% 9D9D9D9D3A9D3A3A3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F131313131313137F9D3A3A3A3A3A3A9D9D3A3A3A
-% 9D9D3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A9DFF53535353535353FF3A3A3A9D9D3A3A3A9D3A3A3A9D3A3A
-% 3A3A7F131313131313137F3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D3A3A
-% 9D9D9D3A3A3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9DFF
-% 53535353535353FF9D9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A
-% 9D9D3A9D3A9D9D9D9D3A9D3A9D9D3A3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A3A9D3A9D9D3A9D9D9D9D9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A7F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A
-% 3A9D9D9D3A9D9D9D3A9D3A3A9D3A9D9D9D3A9DFF53535353535353FF3A9D
-% 3A3A3A3A3A3A3A3A3A3A000000000000210010101012C518181818181818
-% 181718181818121012101010121010181818181818101612181018181818
-% 18181818181818181800FF1A181812121210181012121018181818181818
-% 18121618181810121018181810101810AF1818AFAFAFAF12101012161010
-% 101010121818181818181012101010AF100810FF7D00000000000000003A
-% 3A3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D3A9D3A9D3A
-% 9D3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A7F131313131313137F3A3A3A9D9D3A3A3A9D3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A
-% 9D3A3A3A9DFF53535353535353FF9D3A3A9D9D3A3A3A9D9D3A3A3A3A3A3A
-% 3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D
-% 3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9DFF53
-% 535353535353FF9D9D3A3A3A3A9D3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A9D
-% 3A3A9D3A9D9D9D9D3A9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A3A3A9D9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313
-% 13131313137F3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353
-% 535353FF9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A7F131313131313137F9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D
-% 9D3A3A3A3A3A3A9D3A9D3A9D9D9D9D3A9D9DFF53535353535353FF3A9D3A
-% 3A3A3A3A3A3A3A3A3A000000000000210008101010C5C5C5C5C5C5C51818
-% 18181818161210101010101012181818181A181812121210181012121018
-% 181818181818181200FF1818121010101012101010121012181818171818
-% 1618121810121210121218181818181818181A1818181010181818101210
-% 1010101018181818181612171210AF101010FF7D00000000000000003A3A
-% 3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D9D3A9D3A9D3A9D
-% 3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A9D7F7F1313137F7F3A3A3A3A9D9D3A3A3A9D3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A9D
-% 3A3A3A9D3AFFFF535353FFFF3A9D3A3A9D9D3A3A3A9D9D3A3A3A3A3A3A3A
-% 3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A
-% 9D3A3A3A9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9DFFFF
-% 535353FFFF9D9D9D3A3A3A3A9D3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A9D3A
-% 3A9D3A9D9D9D9D3A9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 3A3A3A9D9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A7F7F13
-% 13137F7F3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353
-% FFFF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F7F1313137F7F3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D
-% 3A3A3A3A3A3A9D3A9D3A9D9D9D9D3A9D9D9DFFFF535353FFFF9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A000000000000210010101010C5101218181818181818
-% 1118131810101010101012181818181A1818121010101012101010121012
-% 1818181718181600FF181810101010101210101010101216181818181012
-% 101210101010101010101818181818181818181818181818181818101010
-% 10101218181818181818181810AF181210FF7D00000000000000003A3A3A
-% 3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A7F7F7F9D3A3A3A3A3A9D3A3A3A3A9D3A3A3A9D9D3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D3A3A3A3A9D3A3A9D9D3A
-% 3A3A9D3A3A3AFFFFFF3A3A3A9D3A3A9D9D3A3A3A9D9D3A3A9D3A3A3A3A9D
-% 3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D
-% 3A3A3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9DFF
-% FFFF9D9D9D9D3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D3A3A9D3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F
-% 7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3AFFFFFF3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D
-% 3A3A9D3A3A9D3A9D9D9D3A9D3A9D9D9D9D9D3AFFFFFF3A9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A000000000000210012101010C510101818181818181818
-% 181810121010101012161818181A18181810101010101210101010101216
-% 18181818101200FF1818181010080810101010100B0E0A10101618181818
-% 181810181316121612161210121618181818181818161218101818181818
-% 161010101012101010121010AF121818FF7D00000000000000003A3A3A3A
-% 3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A3A3A
-% 3A3A9D9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A9D7F9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A9D9D9D9D
-% 9D3A3A3A3A9D3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A
-% 3A9D9D9DFF3A9D9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A3A
-% 3A9D3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D3A9D3A3A3A
-% 3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D
-% FF9D9D9D9D3A9D3A9D3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D
-% 3A9D9D9D9D3A9D3A3A9D9D9D9D9D3A9D9D9D9D3A9D9D9D3A9D3A9D9D3A3A
-% 9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A3AFF9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A000000000000210018181618C51010181618181A18181813
-% 10101810181012181818181A18181818181010080810101010100B0E0A10
-% 101618181800FF1818181612101010101010101010101010121818181818
-% 161018101612171218101210121818181818181818101810181818181818
-% 1818101210101210101010AF161818FF7D00000000000000003A3A3A3A3A
-% 3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A3A3A3A
-% 3A9D9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A7F7F7F9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A9D9D9D9D9D
-% 3A3A3A3A9D3A9D3A3A3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D3A3A3A3A
-% 9DFFFFFF3A9D9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A3A3A
-% 9D3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D3A9D3A3A3A3A
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D
-% FFFFFF9D3A9D3A9D3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D3A
-% 9D9D9D9D3A9D3A3A9D9D9D9D9D3A9D9D9D9D3A9D9D9D3A9D3A9D9D3A3A9D
-% 3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A3A9DFFFFFF3A9D3A3A3A3A3A
-% 3A3A3A3A3A000000000000210018181818C5181818181818181818181810
-% 12101218161216181818181A181818181612101010101010101010101010
-% 1218181800FF181618181818181012101010101010101010121618181818
-% 121812181218121012101210121018181816181810181210121018181818
-% 18121010121012101210AF121818FF7D00000000000000003A3A3A3A3A3A
-% 3A3A9D3A9D9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D9D9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D9D9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A9D3A3A9D3AFFFF
-% 535353FFFF3A3A3A3A9D3A9D3A3A3A3A3A9D3A9D9D3A3A3A3A3A3A3A3A9D
-% 7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A3A9D9D9D9D9DFFFF53
-% 5353FFFF9D3A9D3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D3A9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D3A3A3A
-% 9D3A9D3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F7F1313137F7F3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A9D
-% 9D9D9D3A3A9D9D3A9D9D9D9D9D9D9D9D9DFFFF535353FFFF3A3A3A3A3A3A
-% 3A3A3A3A000000000000210018181818C518181818181818181818181813
-% 1618101218181818181A1818181618181818181012101010101010101010
-% 12161800FF1812121618181812161210101010100A0F1010121818181618
-% 171816181618101210101010121018181812161218101010181818181818
-% 121612181018101810AF101216FF7D00000000000000003A3A3A3A3A3A3A
-% 3A9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D3A3A9D3A
-% 3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F
-% 131313131313137F3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 53535353FF9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A7F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A3A9D9D9D
-% 9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9DFF53535353
-% 535353FF3A9D3A9D3A9D3A3A3A3A9D3A9D3A3A3A3A9D3A9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F131313131313137F9D3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A9D9D3A9D9D9D9D9D3A3A9D9D3AFF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A
-% 9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A9D
-% 9D9D9D9D3A9D9D9D3A9D9D3A9D9D9DFF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A000000000000210012161818C518181A1818181A18181818181818
-% 18181816181818181818181812121618181812161210101010100A0F1010
-% 121800FF1810101012101216121810121010121010101010121618181818
-% 181818181810101010121010101210121612181018101818181818181816
-% 1218101810181210AF101212FF7D00000000000000003A3A3A3A3A3A3A3A
-% 9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D3A3A9D3A3A
-% 3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F13
-% 1313131313137F3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353
-% 535353FF9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A7F1313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A3A9D9D9D9D
-% 3A9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9DFF5353535353
-% 5353FF3A9D3A9D3A9D3A3A3A3A9D3A9D3A3A3A3A9D3A9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A
-% 3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F131313131313137F9D3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A9D9D3A9D9D9D9D9D3A3A9D9D3AFF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D3A3A9D9D
-% 9D9D9D3A9D9D9D3A9D9D3A9D9D9DFF53535353535353FF3A3A3A3A3A3A3A
-% 3A3A000000000000210012121818C518181818181818181A181818181818
-% 181818181818181818181810101012101216121810121010121010101010
-% 1200FF181612101010101210121612101216101010101210121818181818
-% 181818181612101010101210121012101216121818181818181612101210
-% 12101210121010AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D
-% 3A9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F131313
-% 1313131313137F3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A7F13131313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A9D3A3A9D9D9D9D9D
-% 9D9D3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9DFF53535353535353
-% 5353FF3A9D9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A9D9D3A9D9D9D3A
-% 9D9D3A9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A3A9D9D3A3A
-% 9D3A3A3A9D9D9D9D9D9D3A9DFF535353535353535353FF3A3A3A9D3A3A3A
-% 3A000000000000210010101218C518181818181818181818181A18181818
-% 181818181818181818181612101010101210121612101216101010101210
-% 00FF18181816101010101012101210181216121010101012161818181818
-% 181818121810101010101010121012101810181818181818181210101210
-% 121012101210AF100F10FF7D00000000000000003A3A3A3A3A9D3A3A9D3A
-% 9D9D9D3A3A9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F13131313
-% 13131313137F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D3A9D9D9D9DFF5353535353535353
-% 53FF3A9D3A3A9D3A9D3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D9D3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F3A3A3A9D3A
-% 3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A9D3A9D3A9D3A9D9D9D9D9D9D3A
-% 9D3A9D3A9D3A9D3A3A3A9D3AFF535353535353535353FF3A9D3A9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A7F1313131313131313137F9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D3A9D9D3A
-% 9D3A9D3A9D9D9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A3A3A
-% 00000000000021000F101010C5101818181818181A18181A181A18181818
-% 181818181818181818181816101010101012101210181216121010101000
-% FF1818181818121010101010101818181810101010101012181818181818
-% 181818181012101010121010101012101818101818181818181612101010
-% 1210101010AF100A10FF7D00000000000000003A3A3A3A3A9D3A3A9D3A9D
-% 9D9D3A3A9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF5353535353535353
-% 53FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D3A9D9D9D9DFF535353535353535353
-% FF3A9D3A3A9D3A9D3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D9D9D9D3A9D9D
-% 9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D9D3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F3A3A3A9D3A3A
-% 3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A9D3A9D3A9D3A9D9D9D9D9D9D3A9D
-% 3A9D3A9D3A9D3A3A3A9D3AFF535353535353535353FF3A9D3A9D3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A7F1313131313131313137F9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D3A9D9D3A9D
-% 3A9D3A9D9D9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A3A3A00
-% 000000000021000A101010C510121018181818181A181A18201818181818
-% 1818181818181818181818181210101010101018181818101010101000FF
-% 1818181810101010101012181816181818181818181818181A1818181810
-% 101816181818181216101210121018101210101018181810121010121010
-% 10121010AF100A08FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D
-% 9D9D9D3A9D9D3A3A9D9D9D9D3A9D9D9D9D9D3A9D9D9D3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 13137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 137F3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D3A9DFF53535353535353FF9D
-% 9D9D9D9D9D3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D3A9D9D3A
-% 9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A3A9D3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A9D3A9D3A3A3A3A9D3A3A9D3A9D3A9D9D9D3A3A9D9D9D3A
-% 9D9D9D9D3A9D3A9D9D9D3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A9D3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D
-% 9D9D3A9D9D9D3A9D9D9DFF53535353535353FF3A3A3A3A3A3A3A3A3A0000
-% 0000000021000A081010C510101012161818181818181A18181818101012
-% 10181018161818181818101010101010121818161818181818181800FF16
-% 181818101012081010101012181818181818181818181A181A1818161212
-% 181818181818161210121010121216181010121010101212161218101210
-% 101012AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D
-% 3A9D3A9D9D3A9D3A3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A7F131313131313
-% 137F3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D3A9D
-% 9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D9DFF53535353535353FF3A9D
-% 9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D9D9D3A3A9D9D9D9D
-% 3A9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D
-% 9D3A9D9D9D3A9D9D9D3AFF53535353535353FF3A3A3A3A3A9D3A3A9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A9D9D9D3A3A
-% 3A9D3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D9D9D9D
-% 9D3A9D9D9D9D9D9D9DFF53535353535353FF3A3A9D3A3A3A3A3A3A000000
-% 000000210010101010C5101010101218181818181A181818181810121012
-% 101210121216181818101012081010101012181818181818181800FF1210
-% 18121612100E0A081010101818181A18181A181818181818181812101018
-% 181818181818181010181318161818121010101010101018181618181018
-% 1216AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A
-% 9D3A9D9D3A9D3A3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A7F7F1313137F7F
-% 3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D3A9D9D
-% 9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9DFFFF535353FFFF3A3A9D9D
-% 3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D9D9D3A3A9D9D9D9D3A
-% 9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D9D
-% 3A9D9D9D3A9D9D9D3A3AFFFF535353FFFF9D3A3A3A3A3A9D3A3A9D9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A9D9D9D3A3A3A
-% 9D3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D9D9D9D9D
-% 3A9D9D9D9D9D9D9D9DFFFF535353FFFF3A3A3A9D3A3A3A3A3A3A00000000
-% 0000210010101010C5100E1010121018181818181A181818181012161210
-% 18101210121018121612100E0A081010101818181A18181A1800FF101210
-% 181818181010100A1010181818181818181818181A181818181010121012
-% 101818181810181218161818181816181010101010121818181816181216
-% 18AF121010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D
-% 3A9D3A3A9D9D3A9D3A9D3A9D9D3A9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F7F7F7F3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F7F7F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9DFFFFFF9D3A9D9D3A9D9D
-% 9D9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D9D3A9D9D9D9D
-% 3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D9D9D3A9D9D3A3A3A
-% 9D3A3A3A9D3A9D9D9D3AFFFFFFFF3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F7F3A3A3A9D3A3A3A9D3A3A3A9D3A9D
-% 3A9D3A9D3A9D3A9D3A3A3A9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D3A9D9D9D3A3A3A9DFFFFFF3A9D3A3A3A3A3A3A3A3A3A3A0000000000
-% 00210010101010C510101010101212101818181818181818181810181112
-% 101610101210181818181010100A1010181818181818181800FF10101010
-% 12101818181010101218181818181818181818181A181818101210101010
-% 121012101018101818181818181818181818181010181218101212101218
-% AF101810FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D
-% 3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F9D3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A9D3A
-% 9D9D3A9D3A9D3A9D9D3A3A9D3A9D9D9D9D9D9D9D9DFF9D9D9D3A9D3A9D3A
-% 9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A9D3A3A9D9D9D3A9D9D9D9D9D3A9D9D
-% 9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D9DFF3A9D9D9D3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A9D3A7F3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A
-% 9D3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A9D3A9D9D
-% 9D9D9D3A9D9D3A9D9D9D3AFF3A9D3A3A3A9D3A3A3A3A3A3A000000000000
-% 210018101210C51010101010101012181818181818181018101812181018
-% 121010101010121018181810101012181818181818181800FF1012101010
-% 101218181810121618181818181818181818181818181012101010101010
-% 1012101212101810181818181818181A18181812161216121010101012AF
-% 181012FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F9D3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3AFF3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A9D3A9D
-% 9D3A9D3A9D3A9D9D3A3A9D3A9D9D9D9D9D9D9D9D9DFF9D9D3A9D3A9D3A9D
-% 9D3A9D9D3A9D3A3A3A3A3A3A3A3A9D3A3A9D9D9D3A9D9D9D9D9D3A9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9DFF3A9D9D9D3A9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A9D3A7F3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D
-% 3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A9D3A9D9D9D
-% 9D9D3A9D9D3A9D9D9D3A9DFF9D3A3A3A9D3A3A3A3A3A3A00000000000021
-% 0010121010C5101010101012101012121818161210101212161216181818
-% 1210121010101012181818101216181818181818181800FF181012101010
-% 0E1816121810181618161818161818181818181818121012101010101218
-% 18181210101212161218161818181818181818181818181018121010AF10
-% 1216FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D3A
-% 3A9D9D3A3A9D3A3A3A9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A9D
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A7F7F7F7F3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A9D3A3A7F7F7F9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFFFF9D9D9D9D9D9D9D
-% 9D9D9D9D9D3A9D3A3A3A9D3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A7F7F7F3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D3A9D9D3A9D9D3A3A3A9D3A9D3A9D
-% 3A9D9D9DFFFFFFFF3A9D3A9D3A9D3A3A3A3A3A9D3A3A9D9D3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A7F7F7F7F9D3A3A9D9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D3A9D9D3A9D3A9D
-% 3A9D9D3A9D9D9D9D9D9DFFFFFF3A3A3A3A3A3A3A3A3A0000000000002100
-% 12161210C510101010101012101210121012101010101012181818181818
-% 1810121010100E181612181018161816181816181800FF181810100A100A
-% 101010101812121218181818181818181818181810101010101216181818
-% 18181012101012161218181210101018181818181818181818180AAF1012
-% 16FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D3A3A3A
-% 9D9D9D3A9D3A9D3A3A9D3A9D9D9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F7F1313137F7F3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFF535353FFFF3A9D3A9D9D9D
-% 3A9D3A9D9D3A9D3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F7F1313137F7F3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A9D9D3A9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D3A
-% 3AFFFF535353FFFF9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D
-% 9D3A9D3A9D3A9DFFFF535353FFFF3A3A3A3A3A3A3A000000000000210012
-% 161210C5101010101010101010101012101010101010121018181A181A18
-% 1810100A100A101010101812121218181818181800FF181818101010100B
-% 101012101818181818181818181010181216121012101010101218181818
-% 181A181812161218181210181818181818181816121816181818AF101210
-% FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D3A3A3A9D
-% 9D9D3A9D3A9D3A3A9D3A9D9D9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A7F131313131313137F3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3AFF53535353535353FF3A3A3A3A9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF53535353535353FF9D3A9D9D9D3A
-% 9D3A9D9D3A9D3A3A3A3A3A9D3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F131313131313137F3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A3A3A3A9D9D3A9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D3AFF
-% 53535353535353FF9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A7F131313131313137F3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D9D
-% 3A9D3A9D3AFF53535353535353FF3A3A3A3A3A3A00000000000021001210
-% 1818C5101216121818181810101210101210101010101218181818181818
-% 18101010100B1010121018181818181818181800FF181818101210101010
-% 101012101210181818181818181211181012101012101010101818181818
-% 18181210121018181012101218101818181818121012121018AF181012FF
-% 7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D3A3A9D3A3A3A3A
-% 9D9D3A3A3A3A9D3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D9D3A3A9DFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A9D
-% 3A9D3A3A3A3A3A3A9D3A9D3A3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 3A9D9D3A9D9D9D9D9D3A9D9D9D9DFF53535353535353FF9D9D9D3A9D9D9D
-% 9D9D9D9D9D9D9D3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D9D9D9D3A9D9D3A9D9D9D3A9D9D9D9D3A9D9D3A3A9D3A9DFF53
-% 535353535353FF9D3A9D9D9D3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A7F131313131313137F3A9D9D9D9D3A3A3A3A9D3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D9D3A9D3A9D
-% 3A9D3A9DFF53535353535353FF3A3A3A3A3A3A0000000000002100101216
-% 12C518181818181818181218161812101010101010101012181818181818
-% 10121010101010101210121018181818181800FF16181216121012101010
-% 121010101018181818181818181812161216121012101218181818181A18
-% 181010101010101010101010121012101210101010101018AF121012FF7D
-% 00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A3A9D
-% 9D9D3A3A3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A3A3A3A
-% 3A3A9D3A3A3A3A9D3A9D3A3A9D3A9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9DFF535353535353535353FF3A9D9D9D3A9D9D
-% 9D9D9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D
-% 9D3A9D9D9D3A9D9D9D9D9D9D9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A7F
-% 1313131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A3A9D9D9DFF535353
-% 535353535353FF9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A9D3A9D3A9D3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A
-% 3A9DFF535353535353535353FF3A3A3A3A3A000000000000210010121018
-% C51316181818181818181818181618181818101010101010181816181216
-% 121012101010121010101018181818181800FF1812161218101012101210
-% 10101010101218181818181818101812101210101217181A18181A181818
-% 1810101010101010101010101010101818121810101012AF121010FF7D00
-% 000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A3A9D9D
-% 9D3A3A3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A9D3A3A3A3A9D3A9D3A3A9D3A9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9DFF535353535353535353FF3A9D9D9D3A9D9D9D
-% 9D9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D
-% 3A9D9D9D3A9D9D9D9D9D9D9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A7F13
-% 13131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A3A9D9D9DFF53535353
-% 5353535353FF9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A9D3A9D3A9D3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A3A
-% 9DFF535353535353535353FF3A3A3A3A3A000000000000210010101216C5
-% 18181818181818181A181818121818181818121010101012181812161218
-% 1010121012101010101010121818181800FF101018111818181818181818
-% 1818181818181818181818181818111810101218181818181A181A181818
-% 16101010101010101010101010181718181816121010AF101210FF7D0000
-% 0000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D
-% 3A9D3A9D3A9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A9D3A7F1313131313131313137F3A3A3A3A9D3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 9D9D9D9D9DFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D9D9DFF535353535353535353FF9D9D9D9D9D9D3A9D9D
-% 3A9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F1313
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3A9D9D3A3A3A9D9D9D9D9D3A9D3A9D9D3A9D3A3A9D3A9D3AFF5353535353
-% 53535353FF3A3A3A9D3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F1313131313131313137F3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D
-% FF535353535353535353FF3A3A3A3A3A000000000000210012101210C516
-% 181818181818181818181010121018181818181818101012101018111818
-% 18181818181818181818181818181800FF12181018101818101818181818
-% 1A1818181818181A18181818161818131810181818181A18181818181818
-% 181012101010101010101010181818AFAFAFAFAFAFAF161816FF7D000000
-% 00000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D
-% 9D3A3A3A3A9D9D9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A3AFF53535353535353FF9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D9D9D3A3A9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D9D9D3A9D
-% 9D9D9D9D3A9D9D9D9D9DFF53535353535353FF9D9D9D9D3A9D3A9D9D9D9D
-% 9D3A9D3A9D9D3A3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A9D9D
-% 9D9D9D9D9D9D3A9D9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A7F1313
-% 13131313137F3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 9D9D9D9D9D3A9D3A9D3A9D9D3A3A3A3A3A3A3A9D3A9D9D3AFF5353535353
-% 5353FF9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D
-% FF53535353535353FF3A3A3A3A3A3A000000000000210018161216C51812
-% 18161818161818121012101012101818181A181810101012181018101818
-% 1018181818181A1818181818181A00FF1810121812161218101818181818
-% 181818181A18181818181818181810181018181818181818181818181818
-% 1018101210101010101010121210121818181810AF181818FF7D00000000
-% 000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D9D
-% 3A3A3A3A9D9D9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A3AFF53535353535353FF9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D9D3A3A9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D9D9D3A9D9D
-% 9D9D9D3A9D9D9D9D9DFF53535353535353FF9D9D9D9D3A9D3A9D9D9D9D9D
-% 3A9D3A9D9D3A3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A9D9D9D
-% 9D9D9D9D9D3A9D9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A7F131313
-% 131313137F3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A9D
-% 9D9D9D9D3A9D3A9D3A9D9D3A3A3A3A3A3A3A9D3A9D9D3AFF535353535353
-% 53FF9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9DFF
-% 53535353535353FF3A3A3A3A3A3A000000000000210018181812C5101210
-% 181218181810101810181010121218181818181810121810121812161218
-% 101818181818181818181A181800FF171816121610121612101818181818
-% 18181A18181818181818181818181018181818181A181818101812181810
-% 12101810121012101010101010101012181812AF181818FF7D0000000000
-% 0000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D3A9D
-% 3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A9D9D9D
-% 9D3A9D9DFFFF535353FFFF9D9D3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9DFFFF535353FFFF9D9D9D3A9D9D9D9D9D9D3A9D9D9D
-% 9D9D9D3A9D3A9D9D9D9D3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D3A9D9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313
-% 137F7F3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D3A
-% 9D9D9D3A9D3A9D9D9D3A9D9D9D9D3A9D3A9D3A9D3A9D9DFFFF535353FFFF
-% 9D9D9D3A9D3A9D9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A
-% 3A3A3A9D3A9D3A3A9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF
-% FF535353FFFF3A3A3A3A3A3A3A000000000000210018181816C510121012
-% 101216121818181818181010101012101818161818171816121610121612
-% 10181818181818181A18181800FF18181818121010101010121618181818
-% 181818181A1818181A181818181818181818181818181818181010101012
-% 101818181010101010101010101010181810AF181018FF7D000000000000
-% 00003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D
-% 3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A7F7F7F3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D3A
-% 3A9D9D9D3AFFFFFF3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D
-% 9D9D9D9D9D3A9D3A9D9DFFFFFF9D9D3A9D9D9D9D9D3A3A9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D3A9D9D
-% 9D9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F
-% 3A3A3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D
-% 3A3A9D9D9D9D9D9D3A9D3A3A9D3A3A3A3A3A9D3A3A3A9D3AFFFFFF9D9D3A
-% 9D9D3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F7F7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D3A3A9D3A3A3A9D9D9D9D
-% FFFFFF3A3A3A3A3A3A3A3A3A000000000000210010181318C51010101012
-% 101210101210181818181818121012101018181818181818121010101010
-% 121618181818181818181A00FF1012181010101010101010101218181818
-% 1818181818181A181A181818181818181818181818181818101210101010
-% 1812101810121010101010121012181818AF181618FF7D00000000000000
-% 003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A
-% 3A9D9D9D9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D3A3A
-% 9D9D9D3AFF3A9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D
-% 9D9D9D9D3A9D3A9D9D3A9D9DFF9D3A9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D3A9D9D9D
-% 9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A
-% 3A9D9D9D9D9D9D3A9D3A3A9D3A3A3A3A3A9D3A3A3A9D3AFF3A9D9D9D3A9D
-% 9D3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D3A3A9D3A3A3A9D9D9D9D3A
-% 9DFF3A3A3A3A3A3A3A3A3A000000000000210016181618C5121012101012
-% 101012101210121818181818101012121218121012181010101010101010
-% 1012181818181818181800FF121010101010081010101010101010121816
-% 1818181A181A181818181817181818181818181818181818101010101010
-% 10121012101018101010101012181818AF181818FF7D0000000000000000
-% 3A3A3A3A3A3A3A3A9D3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D9D9D9D9D3A3A
-% 3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A7F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D
-% 9D9DFF9D3A9D3A3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D3A3A3A9D9DFF3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D
-% 9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D
-% 3A9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D3A3A
-% 9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A3A9DFF3A3A9D9D3A3A9D3A
-% 3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A9D3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D9D9D3A9D
-% FF3A3A3A3A9D3A3A3A3A000000000000210018181818C518181810181010
-% 1210101210101012101818C5C5C5C51010101210C5C51010081010C5C5C5
-% C5C51012181618181800FF101012101010100A0F0A101010101010101216
-% 18181820181A181818181818121618181818181818181812101010101010
-% 101010181818181712101816181818AF181818FF7D00000000000000003A
-% 3A3A3A3A3A3A3A9D9D9D9D3A9D9D9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A3A
-% 9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A9D9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A9D9D9D
-% 3AFF3A9D3A9D9D3A3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A9D3A7F3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D
-% 3A3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D3A9DFF9D9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D
-% 9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D
-% 9D9D3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A3A3A3A9D9D3A3A9D3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D
-% 3A9D3A9D9D3A3A3A3A3A3A9D9D9D3A9D9D3A3A3AFF9D9D3A9D9D9D9D9D3A
-% 9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A9D9D3A9D3A9D9D9D3A9D3A3A3A3A9D3A3A3A3A9D3A3A9D3A9D3A
-% FF3A3A3A3A3A3A3A3A000000000000210018181818C51818181812101210
-% 101210121012101012C5C51618C5C510101010C5C51010100A0F0A10C5C5
-% 101010101216181800FF10121010101010100A1010080A10081010101818
-% 181A18181818181818101810181217181818181818181010101010101010
-% 1012181818181818181818181818AF181818FF7D00000000000000003A3A
-% 3A3A3A3A3A3A9D9D9D9D3A9D9D9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A3A9D
-% 9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A9D9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A9D9DFFFF
-% FF3A9D3A9D9D3A3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A9D3A7F7F7F3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A
-% 3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D9D9D3A9D9DFFFFFF3A9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D
-% 3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D9D
-% 9D3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A9D9D3A3A9D3A3A3A3A3A9D3A9D9D9D3A9D9D9D9D3A
-% 9D3A9D9D3A3A3A3A3A3A9D9D9D3A9D9D3AFFFFFF9D9D3A9D9D9D9D9D3A9D
-% 9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D7F7F7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A9D9D3A9D3A9D9D9D3A9D3A3A3A3A9D3A3A3A3A9D3A3A9D3A9D3AFF
-% FFFF3A3A3A3A3A3A000000000000210018181816C5181818181612161012
-% 1010101010101010C5C51818C5C518181012101010101010C5C5C5C5C5C5
-% 0810101018181800FF181216121818181010101010081008101010121818
-% 18181A18181818181810121010181812181812161216121010100A101010
-% 12181818181818181818181A18AF181818FF7D00000000000000003A3A3A
-% 3A3A3A3A3A9D3A9D9D3A9D3A9D9D3A3A9D9D3A3A3A9D9D9D9D3A3A9D3A9D
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F13
-% 13137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D9D9D9D9D3A3A9D9D9D3A9D9D9D9D3AFFFF535353
-% FFFF9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A9D3A3A9D3A9D3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D3A
-% 9D3A9D9D9D3A9DFFFF535353FFFF9D9D9D3A9D9D9D9D9D9D9D3A9D3A3A9D
-% 3A9D3A9D9D9D9D9D3A9D3A9D9D3A9D9D9D3A9D9D9D9D3A9D9D9D9D3A9D9D
-% 9D9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D9D9D9D
-% 9D9D9D9D3A3A9D3A3A9D3A3A9D9DFFFF535353FFFF9D9D9D9D3A9D9D9D9D
-% 3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F
-% 7F1313137F7F3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A
-% 3A3A9D9D3A9D9D9D3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D9D3A3AFFFF5353
-% 53FFFF3A3A3A3A000000000000210018181812C5C5C5C5C5C5C5C5C5C5C5
-% C5C51212161210C5C51818C5C518181812161218181810C51010C5C51008
-% 10101012181800FF18161210181618101210101010080A10101010101818
-% 181818181817121012161218101210101010121018121012101010101012
-% 181818181A18181818181818AF181818FF7D00000000000000003A3A3A3A
-% 3A3A3A3A9D9D9D9D9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D9D3A3A3A3A9D9D
-% 3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A7F13131313
-% 1313137F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D3A3A9D9D9D9DFF535353535353
-% 53FF9D9D9D9D9D3A9D9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A9D3A9D3A3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D3A9D3AFF53535353535353FF9D3A9D9D3A9D9D3A9D3A9D3A9D3A3A9D
-% 3A9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D3A3A3A9D3A3A3A9D3A3A3A9D3A7F131313131313137F3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A9D9D3A3A3A9D3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D
-% 9D3A9D3A9D3A9D9D9D3A9D9DFF53535353535353FF9D3A9D9D9D3A9D9D3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313
-% 13131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D
-% 9D3A9D9D3A9D9D3A9D9D9D3A3A9D3A9D9D9D3A9D9D3A9D9DFF5353535353
-% 5353FF3A3A3A000000000000210018181010C51818171818101810181018
-% 181818181818C5C51012C5C51618181612101816181012C510C5C5080A10
-% 101010101800FF1012101012181818181012101010101010101218181818
-% 181818181812101218121012101210121010181216121010101010101018
-% 18181A181A18181A181A18AF181810FF7D00000000000000003A3A3A3A3A
-% 3A3A3A9D9D9D9D9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D9D3A3A3A3A9D9D3A
-% 9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 13137F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D3A3A9D9D9D9DFF53535353535353
-% FF9D9D9D9D9D3A9D9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A9D3A9D3A3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D
-% 9D3A9D3AFF53535353535353FF9D3A9D9D3A9D9D3A9D3A9D3A9D3A3A9D3A
-% 9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D3A3A3A9D3A3A3A9D3A3A3A9D3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A9D9D3A3A3A9D3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D9D
-% 3A9D3A9D3A9D9D9D3A9D9DFF53535353535353FF9D3A9D9D9D3A9D9D3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F131313
-% 131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D
-% 3A9D9D3A9D9D3A9D9D9D3A3A9D3A9D9D9D3A9D9D3A9D9DFF535353535353
-% 53FF3A3A3A000000000000210018101210C5101812181012181818181818
-% 18181A1818C5C51210C5C5121810121010121818181810C5C5C510101010
-% 1012181800FF181012101210101012101210100A08101010101012101218
-% 101810121010101010181818181010101010101210121810181012121818
-% 181A1818181818181818AF181010FF7D00000000000000003A3A3A3A3A3A
-% 3A3A9D3A9D9D3A9D3A9D9D9D3A9D3A3A9D3A9D9D3A9D9D3A9D3A9D9D3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 13137F3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D9D9D9D9D9D9D3A9D9D9D9D3A3A9D9D9DFF535353535353535353
-% FF9D9D9D3A3A9D9D3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D
-% 3A9D9D9D9D3A9D9D9D3A9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D3A3A
-% 9D9DFF535353535353535353FF9D9D9D9D9D9D3A9D3A9D3A3A3A3A3A9D3A
-% 9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A
-% 3A3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A9D9D9D9D9D
-% 3A9D9D3A3A3A9D3A9DFF535353535353535353FF9D9D9D3A3A9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D
-% 9D9D9D9D9D9D3A9D9D9D3A3A9D3A3A9D9D3A9D9D9DFF5353535353535353
-% 53FF3A3A000000000000210010101010C510101010121010101012101818
-% 18181818C5C51818C5C5101818101210121010101210C5C5C50A08101010
-% 10101200FF18181810101010121012161010101010101010101010121012
-% 121010101010101018181818181810181010101012101816121816181818
-% 181818181818181818AF181010FF7D00000000000000003A3A3A3A3A3A3A
-% 3A9D3A9D9D9D9D9D9D3A3A3A9D3A9D9D3A9D9D9D3A3A3A3A9D9D3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313
-% 137F3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A9D3A9D9D9D9D9D9D3A9D9D9D9DFF535353535353535353FF
-% 9D3A9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A
-% 9DFF535353535353535353FF3A3A9D3A9D3A3A3A9D3A9D9D3A3A3A9D3A3A
-% 9D9D9D9D9D9D9D3A9D3A9D9D3A9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D3A
-% 3A3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A9D
-% 3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D
-% 3A3A9D9D3A3A9D9DFF535353535353535353FF9D3A9D9D9D9D3A9D3A9D9D
-% 3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A9D3A9D
-% 9D9D9D9D3A3A9D9D9D9D3A3A3A3A3A3A9D3A9D9DFF535353535353535353
-% FF3A3A000000000000210010101010C51010101012101210121018181718
-% 18161818C5C5C5C51818181818181010101012101216C5C5101010101010
-% 101000FF1818171818181810101210121010101010101010101010101010
-% 101010081010101218181818181818101010101010181212161818181A16
-% 1818181816181818AF101210FF7D00000000000000003A3A3A3A3A3A3A3A
-% 9D3A9D9D9D9D9D9D3A3A3A9D3A9D9D3A9D9D9D3A3A3A3A9D9D3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F131313131313131313
-% 7F3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A9D3A9D9D9D9D9D9D3A9D9D9D9DFF535353535353535353FF9D
-% 3A9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A7F1313131313131313137F3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D
-% FF535353535353535353FF3A3A9D3A9D3A3A3A9D3A9D9D3A3A3A9D3A3A9D
-% 9D9D9D9D9D9D3A9D3A9D9D3A9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D3A3A
-% 3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A9D3A
-% 9D3A9D3A9D3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A
-% 3A9D9D3A3A9D9DFF535353535353535353FF9D3A9D9D9D9D3A9D3A9D9D3A
-% 3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 13137F3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A9D3A9D9D
-% 9D9D9D3A3A9D9D9D9D3A3A3A3A3A3A9D3A9D9DFF535353535353535353FF
-% 3A3A000000000000210012101010C5101210181818101810181018121818
-% 181818181818181818181818171818181810101210121010101010101010
-% 1000FF121818181818181012101810181816121818181210101012101010
-% 10100A081010181818181818181818121010101012101012121818181818
-% 16181818181816AF101010FF7D00000000000000003A3A3A3A3A3A3A3A9D
-% 3A9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D3A3A9D9D9D3A9D3A3A
-% 3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A9D7F131313131313137F3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A9D9D9D9D3A9D9D3A9D9D9D9D9D3A3A3A3AFF53535353535353FF3A3A9D
-% 9D9D9D9D9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D7F131313131313137F3A3A3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D3A9D3A9D9D9D3A9D9D9D9D9D3A9D3A9D3A9D9D3A
-% FF53535353535353FF9D9D3A9D3A3A9D3A9D3A9D3A3A3A3A3A9D3A9D3A3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D9D9D9D9D3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A9D3A3A3A3A3A9D
-% 3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A9D9D9D9D3A3A9D9D9D
-% 3A9D9D9D3A9D9DFF53535353535353FF9D9D9D9D9D3A9D9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A9D9D3A3A3A9D9D9D9D9D3A9D
-% 3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9DFF53535353535353FF3A3A
-% 3A000000000000210010101010C512161818181818181210121012101810
-% 181818181818181818121818181818181012101810181816121818181210
-% 00FF10121012101212101012121618181818181818181818101818131610
-% 101010101210181818181818181010101010101010101010121018181818
-% 181818181818AF121010FF7D00000000000000003A3A3A3A3A3A3A3A9D3A
-% 9D9D3A9D9D9D3A9D3A3A3A9D9D3A9D3A9D9D9D3A3A9D9D3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D
-% 9D9D9D9D9D9D9D3A3A9D9D9D3A3A3A3A3AFF53535353535353FF9D3A9D9D
-% 3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A7F131313131313137F3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D3A9D
-% 9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A9D9D3A9D9DFF
-% 53535353535353FF9D9D3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D3A9D9D3A
-% 9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D9D3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D9D9D9D9D3A9D3A3A9D9D3A
-% 9D9D9D9D3A9DFF53535353535353FF9D9D9D9D9D3A9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D3A9D3A9D9D9D9D9D9D
-% 9D3A9D9D9D3A9D3A9D3A9D9D3A9D3A3A9D9DFF53535353535353FF3A3A3A
-% 000000000000210010101010C518181818181A1818181010101010121012
-% 101812161818181010121012101212101012121618181818181818181800
-% FF1210101210101010181010121818181818181A181A1818181718181218
-% 181810101810181218181012101210101818101010101010121218181818
-% 1818181818AF101210FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D
-% 9D3A9D9D9D3A9D3A3A3A9D9D3A9D3A9D9D9D3A3A9D9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D
-% 9D9D9D9D9D9D3A3A9D9D9D3A3A3A3A3A3AFFFF535353FFFF9D9D3A9D9D3A
-% 9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A7F7F1313137F7F9D3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D9D3A9D9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A9D9D3A9D9D9DFF
-% FF535353FFFF3A9D9D3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D3A9D9D3A9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 9D3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D9D9D9D9D3A9D3A3A9D9D3A9D
-% 9D9D9D3A9D9DFFFF535353FFFF3A9D9D9D9D9D3A9D9D9D3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D3A9D3A9D9D9D9D9D9D9D
-% 3A9D9D9D3A9D3A9D3A9D9D3A9D3A3A9D9D3AFFFF535353FFFF3A3A3A3A00
-% 0000000000210012101010C51818181A1818181818121010101010121010
-% 101012101818101210101210101010181010121818181818181A181A00FF
-% 1818121010121012121012101018181618181A1818181818181818171818
-% 181612121012101010181810101212181018181010101210101818181A18
-% 18181818AF161210FF7D00000000000000003A3A3A3A9D3A3A3A9D9D9D9D
-% 9D9D9D9D9D9D3A9D9D9D9D3A9D9D3A3A9D9D9D3A9D9D3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D9D3A3A3A3A3A3A3A3AFFFFFFFF3A3A9D3A9D3A3A3A9D
-% 9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A9D9D9D9D9D9D3A9D
-% 9D9D9D3A9D9D9D3A9D3A9D9D3A9D3A3A9D9D9D9D3A9D9D3A9D9D3A9D9D9D
-% FFFFFF9D9D9D9D3A3A9D3A9D3A3A9D3A3A9D3A9D3A9D3A9D3A9D3A9D3A9D
-% 9D9D9D9D9D9D3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A3A3A9D3A3A
-% 3A9D3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A9D9D3A
-% 9D9D9D9D9D3A9DFFFFFF3A3A3A9D9D9D3A9D3A9D3A9D9D9D9D9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A9D3A9D9D9D3A
-% 9D3A9D9D3A9D3A9D3A3A9D9D9D9D9D9D3A9D3AFFFFFF3A3A3A3A3A3A0000
-% 00000000210012101212C518181818181A18181810100B0E10101010100E
-% 1010101218181818121010121012121012101018181618181A181800FF18
-% 181818121010181010101012181810101818181818121012101818181818
-% 181810101010101018181012101010181818181816121612181818181818
-% 181818AF181018FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D
-% 9D9D3A9D9D3A3A9D3A9D9D3A9D3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D
-% 9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3AFF3A3A3A3A3A3A9D9D9D3A9D9D9D
-% 9D3A9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D3A9D9D9D
-% 9DFF9D3A9D3A9D3A3A9D3A9D9D3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A3A
-% 3A3A3A3A9D3A3A3A3A7F3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D9D3A
-% 3A3A3A9D3A3A3A3A9D9D9D3A9D9D3A9D9D9D3A9D9D3A3A3A3A3A9D9D9D3A
-% 9D9D9D3A9D9DFF3A9D3A3A3A9D9D9D9D9D9D3A9D9D3A9D9D9D3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D9D9D9D3A9D3A9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D3A3A9D9D9D9D3A9D3A3A3AFF3A3A3A3A3A3A000000
-% 000000210010181316C5181818181A181A181812101010101010100A100A
-% 101012161818181818121010181010101012181810101818181800FF1618
-% 18181818101818181012101010181816181818161810101018131618181A
-% 181818121010101810181210181813181818181818181818181818181818
-% 1818AF181012FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D
-% 9D3A9D9D3A3A9D3A9D9D3A9D3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D9D9D
-% 9D3A9D9D9D9D3A3A3A3A3A3A3A3A3AFF3A3A3A3A3A3A9D9D9D3A9D9D9D9D
-% 3A9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D3A9D9D9D9D
-% 9DFF3A9D3A9D3A3A9D3A9D9D3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A3A3A
-% 3A3A3A9D3A3A3A7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D9D3A3A
-% 3A3A9D3A3A3A3A9D9D9D3A9D9D3A9D9D9D3A9D9D3A3A3A3A3A9D9D9D3A9D
-% 9D9D3A9DFF3A3A9D3A3A3A9D9D9D9D9D9D3A9D9D3A9D9D9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A9D3A9D9D9D9D3A9D3A9D9D9D9D9D
-% 9D9D9D3A9D9D9D9D3A3A9D9D9D9D3A9D3A3A3A3AFF3A3A3A3A3A00000000
-% 0000210010121618C518181A181A181818181818181810100A1010101010
-% 1010121816181818181810181818101210101018181618181800FF121818
-% 181818181818171210101010121012181018121818181812161812161818
-% 1818181018101210121618181018181818181818181818181818181A1818
-% 18AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D
-% 9D9D9D3A9D3A3A9D9D3A9D3A3A9D3A9D9D9D3A3A9D9D3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D9D9D9D3A9D3A9D
-% 9D9D3A9D3A3A9D9D9D9D9DFFFFFFFF3A3A3A3A3A3A9D9D9D9D9D3A3A9D9D
-% 9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A7F7F7F3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D3A9D9D
-% FFFFFF3A9D3A3A3A9D3A3A9D9D3A9D3A3A3A3A9D3A3A9D3A3A3A9D3A9D3A
-% 9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D9D3A3A9D9D3A9D9D9D9D9D
-% 3AFFFFFF3A9D9D3A3A3A9D9D3A9D9D3A9D3A9D3A9D9D3A9D3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A7F7F7F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A9D9D3A9D3A3A3A9D9D9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3AFFFFFF3A3A3A0000000000
-% 00210018181818C518181818181818181216181812101010121010101010
-% 10101212181818181818181817121010101012101218101800FF10121612
-% 181610181818121612101012101210121618181818181818121018101216
-% 18161818181018101210121018161818181818181A181A18181818181818
-% AF181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D
-% 9D9D3A9D3A9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A
-% 9D9D9D3A3A9D9D9DFFFF535353FFFF9D3A3A3A3A3A3A3A9D9D9D9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F
-% 7F1313137F7F3A3A9D3A3A3A9D3A9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D
-% 3A9D9D3A9D9D9D3A9D9D3A9D9D3A9D9D3A9D3A9D9D9D3A9D3A9D9DFFFF53
-% 5353FFFF3A3A9D3A9D9D3A9D3A3A3A9D3A9D3A3A9D3A3A9D3A9D9D9D9D9D
-% 9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A3A9D3A3A3A3A3A3A
-% 3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D9D3A9D3A9D3A9D3A3A9D9DFFFF
-% 535353FFFF3A9D3A3A9D9D9D9D9D3A9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F9D3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A9D9D3A9D9D9D3A9D9D
-% 9D9D9D9D3A9D9D9D3A9D9D9D3A9D3A3AFFFF535353FFFF3A000000000000
-% 210018181818C51018181818181812101012161818121018101010101010
-% 101010121612181610181818121612101012101210121600FF1010121012
-% 181218161810121012101010101010121216181818161810181010121012
-% 18181818161210181012101212101818181818181818181A18181A1E18AF
-% 181818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D
-% 9D3A9D3A9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F131313131313137F3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A9D
-% 9D9D3A3A9D9DFF53535353535353FF3A3A3A3A3A3A3A9D9D9D9D9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313
-% 13131313137F3A9D3A3A3A9D3A9D3A9D9D3A9D9D9D9D9D9D3A9D9D9D9D3A
-% 9D9D3A9D9D9D3A9D9D3A9D9D3A9D9D3A9D3A9D9D9D3A9D3A9DFF53535353
-% 535353FF3A9D3A9D9D3A9D3A3A3A9D3A9D3A3A9D3A3A9D3A9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A3A9D3A3A3A3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D9D3A9D3A9D3A9D3A3A9DFF535353
-% 53535353FF9D3A3A9D9D9D9D9D3A9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D3A3A9D9D3A9D9D9D3A9D9D9D
-% 9D9D9D3A9D9D9D3A9D9D9D3A9D3AFF53535353535353FF00000000000021
-% 0018181818C5181818181818181810101210181216181810121010121010
-% 1010101210121812181618101210121010101010101200FF101010101012
-% 161218101812161210101012101210101210181218181818181810181810
-% 1212101218101210101010101210121818181818181818181A181A18AF18
-% 1818FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A
-% 9D9D9D3A9D3A9D3A9D9D3A3A9D9D9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D9D9D9D9D
-% 3A3A3A3A3AFF53535353535353FF9D9D3A3A3A3A9D3A9D9D9D9D9D3A3A9D
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D7F131313
-% 131313137F3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9DFF5353535353
-% 5353FF3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A3A9D3A9D9D3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A3A3A9D3A3A3A3A9D3A7F13
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D9D3A9D3A3A3A3A3A
-% 9D3A3A3A3A9D9D3A9D9D9D3A9D9D3A9D9D3A3A9D3A9D3A9D9DFF53535353
-% 535353FF9D3A3A9D9D9D9D9D9D9D3A9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A9D3A3A3A
-% 3A3A3A3A3A3A9D9D3A3A9D9D3A9D9D3A3A9D9D3A9D9D9D3A9D9D9D3A9D9D
-% 9D9D9D9D3A9D9D3A9D9D3A9D3AFF53535353535353FF0000000000002100
-% 18181818C51818181A181818181010121012101210121810121010101210
-% 10101010101216121810181216121010101210121000FF10101012181818
-% 161818181018161810101010101012101210101218161818181818101210
-% 101018161210121010101010101210121612181818181A18201E1AAF1A18
-% 18FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D3A3A3A
-% 9D3A9D9D3A9D9D9D9D3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D3A
-% 3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A
-% 9D3A3AFF535353535353535353FF9D3A3A3A3A3A9D9D9D9D9D9D9D3A9D9D
-% 9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A9D3A9D3A9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D9D9DFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D9D
-% 3A9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D3A3A3A9D3A3A3A3A3A7F131313
-% 1313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A
-% 3A9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D3A3A9D3A9D3A9DFF535353535353
-% 535353FF3A3A9D9D3A9D9D3A9D9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F3A3A9D3A3A
-% 3A3A3A3A9D3A3A3A9D9D3A9D9D3A3A3A9D9D9D3A9D3A3A9D9D9D9D9D3A9D
-% 3A3A3A9D3A9D3A9D9D3A9DFF535353535353535353FF0000000000210018
-% 181818C51818181818181818181812101010101018101818181812101010
-% 101012181818161818181018161810101010101000FF1810121018181818
-% 121810181818181810121012101010101012101012121018181018101010
-% 10181210101010101010101010101010101818181818181A181AAF181818
-% FF7D00000000000000003A3A3A3A3A3A3A3A9D3A9D9D9D3A9D9D3A3A3A9D
-% 3A9D9D3A9D9D9D9D3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D3A3A
-% 3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A9D
-% 3A3AFF535353535353535353FF9D3A3A3A3A3A9D9D9D9D9D9D9D3A9D9D9D
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A3A9D3A9D3A9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D9D9DFF5353535353535353
-% 53FF3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9D9D9D3A
-% 9D9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D3A3A3A9D3A3A3A3A3A7F13131313
-% 13131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D3A3A9D3A9D3A9DFF53535353535353
-% 5353FF3A3A9D9D3A9D9D3A9D9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F3A3A9D3A3A3A
-% 3A3A3A9D3A3A3A9D9D3A9D9D3A3A3A9D9D9D3A9D3A3A9D9D9D9D9D3A9D3A
-% 3A3A9D3A9D3A9D9D3A9DFF535353535353535353FF000000000021001818
-% 1816C5181818181818181818121010101010101012101818181818181810
-% 1210181818181218101818181818101210121000FF1A1818181618181816
-% 181818181618181818101010101012121012101010101218101210121010
-% 18101612101010101010101010101010101818181818181820AF1A1818FF
-% 7D00000000000000003A3A3A3A3A3A3A9D9D3A9D9D9D9D9D9D3A9D3A9D9D
-% 3A9D9D3A9D3A9D3A3A3A9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A3A9D9D9D9D9D3A9D9D9D9D3A9D3A3A3A3A
-% 3AFF535353535353535353FF9D3A3A9D3A3A9D9D9D9D9D9D9D3A9D9D9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A7F13131313131313
-% 13137F3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D3AFF535353535353535353
-% FF3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A9D3A9D3A9D3A9D3A9D9D3A9D3A3A3A9D9D3A9DFF5353535353535353
-% 53FF9D3A9D9D9D9D3A9D3A9D3A3A9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A
-% 3A3A9D9D3A9D9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D9D
-% 9D9D9D9D9D9D9D3A9DFF535353535353535353FF00000000002100181818
-% 12C5121018181810121612161010101010121010181818181818181A1818
-% 18161818181618181818161818181810101000FF181818181A1818181810
-% 181018181816181216121018101010121010101010101012101216181812
-% 18181818181010101010101010101010121018181A202118AF181818FF7D
-% 00000000000000003A3A9D3A3A3A3A3A9D3A9D9D3A9D9D3A9D3A3A9D3A9D
-% 3A9D9D9D9D9D9D3A9D3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F131313131313137F3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D3A3A3A3A3A
-% 3AFF53535353535353FF9D9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D
-% 9D9D9D9D9D9D9D3A9D3A9D9D9D9D3A9D9D9D9D3AFF53535353535353FF3A
-% 3A9D3A3A9D3A3A9D3A3A3A3A3A3A9D3A9D3A3A3A9D9D9D9D3A9D9D9D9D9D
-% 9D9D9D3A3A9D9D9D9D3A9D9D9D9D3A3A9D9D3A3A3A3A3A3A7F1313131313
-% 13137F3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A9D3A9D3A9D3A9D9D9D9D3A3A9D3A3A9D9D9DFF53535353535353FF
-% 3A3A3A9D9D9D9D3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A
-% 9D3A3A9D9D3A9D3A9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D3A3A3A3A
-% 9D9D9D9D9D9D3A9D3AFF53535353535353FF000000000000210018181016
-% C5101210101210181018181310100A08081010101216181A181818181818
-% 1A1818181810181018181816181216121000FF1818181818181A18101812
-% 121212181818181012101210101216181818181210121018101812181612
-% 1816181818181010101010101010101012181818201A18AF181212FF7D00
-% 000000000000003A3A9D3A3A3A3A3A9D3A9D9D3A9D9D3A9D3A3A9D3A9D3A
-% 9D9D9D9D9D9D3A9D3A9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F131313131313137F3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A
-% FF53535353535353FF9D9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 3A3A3A3A3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D9D
-% 9D9D9D9D9D9D3A9D3A9D9D9D9D3A9D9D9D9D3AFF53535353535353FF3A3A
-% 9D3A3A9D3A3A9D3A3A3A3A3A3A9D3A9D3A3A3A9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D3A3A9D9D9D9D3A9D9D9D9D3A3A9D9D3A3A3A3A3A3A7F131313131313
-% 137F3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A9D3A9D3A9D3A9D9D9D9D3A3A9D3A3A9D9D9DFF53535353535353FF3A
-% 3A3A9D9D9D9D3A9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D
-% 3A3A9D9D3A9D3A9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D3A3A3A3A9D
-% 9D9D9D9D9D3A9D3AFF53535353535353FF000000000000210012121812C5
-% 10181012101810121816181810101008101010181818181A181818181818
-% 181A181018121212121818181810121000FF1A181A181A18181818121010
-% 101010181210101012101216121818181818181818181812161812101210
-% 1212161818101010121010100E101010121818181818AF101010FF7D0000
-% 0000000000003A3A3A3A3A3A3A3A9D9D9D9D9D9D9D3A3A9D3A3A9D9D3A9D
-% 3A9D3A9D9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F7F1313137F7F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D3A9D9D9D3A3A3A3A3A3A3A9D
-% FFFF535353FFFF9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D7F7F1313137F7F3A3A
-% 3A3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 3A9D3A9D9D9D9D9D3A9D9D9D9D9D3A9D9D9D9DFFFF535353FFFF3A9D3A3A
-% 3A9D3A3A9D3A3A3A3A3A9D9D3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D9D3A9D3A9D9D9D9D3A3A9D9D3A9D3A3A3AFFFF535353FFFF9D3A3A
-% 3A9D3A9D9D9D9D9D9D3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D3A3A3A3A3A3A3A3A9D
-% 9D9D9D9D9D9D3A3A3A3A9D9D9D3A9D9D9D3A9D3A3A9D9D9D9D3A3A3A9D3A
-% 9D3A9D9D3A9D3A3AFFFF535353FFFF3A000000000000210010101210C518
-% 1818181012101210181818181210101010121818181A18181A181A181A18
-% 18181812101010101018121010101200FF18181818181818181810101010
-% 101018181012101010121012161818181818181818181818131612101010
-% 101212181012101010101010101010101216181812AF121012FF7D000000
-% 00000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A3A9D3A3A9D9D3A
-% 9D9D9D3A3A9D3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A9D9D
-% 9DFFFFFF3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A
-% 3A3A3A3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D3A9D9D9D3A9D9D9D3A9D3A3A9D3A9D9D9D9DFFFFFF3A3A3A3A3A9D9D
-% 3A3A9D3A3A9D3A3A3A3A3A9D3A3A3A9D9D3A9D3A3A9D9D3A9D9D9D9D9D9D
-% 9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A3A3A3A3A9D3A3A3A3A7F7F7F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D9D9D3A3A9D9D9D9D3A3A3A3A9D9D9D9D9D9D9D9DFFFFFF9D3A3A9D3A3A
-% 9D9D9D3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D9D3A9D3A9D3A3A9D3A9D3A9D9D9D9D3A3A9D9D9D9D3A9D3A9D9D3A9D3A
-% 9D9D9D3A9D3A3A3A3AFFFFFF3A3A3A000000000000210010121012C51818
-% 18181812101010101218181818121012101818181A181818181818181818
-% 181810101010101018181012101000FF1818181818181818121010101010
-% 101818101010101218101012181818181818181818181816181818121010
-% 1010121612181010121010101010101210121010AF101010FF7D00000000
-% 000000003A3A3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A3A9D3A3A9D9D3A9D
-% 9D9D3A3A9D3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A9D9D9D
-% FF3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A
-% 3A3A3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D3A9D9D9D3A9D9D9D3A9D3A3A9D3A9D9D9D9D3A9DFF3A3A3A3A3A9D9D3A
-% 3A9D3A3A9D3A3A3A3A3A9D3A3A3A9D9D3A9D3A3A9D9D3A9D9D9D9D9D9D9D
-% 9D3A9D9D3A9D9D9D9D9D3A3A9D3A3A3A3A3A9D3A3A3A7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9D
-% 9D9D3A3A9D9D9D9D3A3A3A3A9D9D9D9D9D9D9D9DFF9D9D9D3A3A9D3A3A9D
-% 9D9D3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 9D3A9D3A9D3A3A9D3A9D3A9D9D9D9D3A3A9D9D9D9D3A9D3A9D9D3A9D3A9D
-% 9D9D3A9D3A3A3A3A3A3A3AFF3A3A000000000000210010101012C5181818
-% 18181810121010101010121618121618181818181A181818181818181818
-% 1210101010101018181010101000FF181818181818181810121010101010
-% 181618181216121010101210181810121818181818181818181818161210
-% 10101812161210101010101012101012101012AF101010FF7D0000000000
-% 0000003A3A3A3A3A3A3A9D3A3A9D9D3A9D9D3A3A9D3A3A9D3A9D3A9D3A9D
-% 3A9D3A3A3A3A9D9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A
-% 3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A3A3A9D9DFF3A
-% 3A3A3A9D9D9D9D3A3A3A3A9D3A9D3A9D3A9D9D3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A7F3A3A3A9D3A3A
-% 9D3A9D9D9D3A9D9D9D9D3A9D9D9D3A9D9D9D9D3A9D9D3A9D9D9D3A9D3A9D
-% 9D9D9D3A9D9D9D9D3A9D3A3A9D9D9D3A9D3A9D9DFF9D9D3A3A9D3A3A3A9D
-% 3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D9D9D9D9D9D9D9D3A3A3A9D3A3A3A3A3A3A9D3A3A7F3A3A9D3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A9D9D3A9D
-% 9D9D9D3A3A9D9D9D3A3A9D3A3A9D3A9D9D9DFF9D9D3A3A3A3A3A3A3A9D9D
-% 3A9D9D3A3A9D9D3A3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D7F3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D9D
-% 9D3A3A9D3A9D9D3A9D9D9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D
-% 9D3A9D3A3A3A3A3A3A3AFF3A3A000000000000210010101010C51818181A
-% 181812101010100808101012101812171818181818181818181818181810
-% 12101010101018161818121600FF12161818101810181210121010101212
-% 181818181812101010121613101210181618181818181818181818181010
-% 101216121012101216181810181012101216AF101010FF7D000000000000
-% 00003A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D9D3A9D9D9D9D9D9D
-% 9D9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D9D3A3A3A9D3A3A3A9D9DFF9D9D
-% 9D9D9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A7F3A3A3A3A3A3A3A
-% 3A9D3A9D3A3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D3AFF3A9D3A3A9D3A3A9D3A
-% 9D9D9D9D3A9D3A3A9D3A3A3A9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D3A9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A9D7F3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D
-% 3A3A9D9D3A9D9D3A3A9D3A9D9D9D3A9D9DFF3A3A3A3A3A9D3A3A9D9D9D9D
-% 3A9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D
-% 3A9D3A3A3A9D3A3A3AFF3A3A000000000000210010101010C51818181818
-% 181818101010100A10101010121612181818181812161818101810181210
-% 121010101212181818181800FF1012101012161210101010121012161818
-% 181A18181210181218181818101218121216181818181218181818181012
-% 1018101810181012181818181812161218AF101010FF7D00000000000000
-% FFFFFF3A3A3A3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D
-% 9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A7F7F7F
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D9D3A3A3A9D3A3A3AFFFFFF9D9D9D
-% 9D9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A7F7F7F3A3A3A3A3A
-% 9D3A9D3A3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D3AFFFFFF3A3A9D3A3A9D3A9D
-% 9D9D9D3A9D3A3A9D3A3A3A9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D3A9D9D9D9D9D3A3A9D3A9D3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D3A
-% 3A9D9D3A9D9D3A3A9D3A9D9D9D3AFFFFFF3A3A3A3A3A9D3A3A9D9D9D9D3A
-% 9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A
-% 9D3A3A3A9D3A3A3A3AFFFFFF0000000000210010101010C51818181A2018
-% 1818101210101010100A1012101818181818121012101012161210101010
-% 121012161818181A181800FF181818181810121612161216121818181818
-% 1A1818181010101010121018101010101218181818101210101010181810
-% 12101812181816181A18181818181618AF181818FF7D0000000000FFFF53
-% 5353FFFF3A9D3A3A9D3A9D9D9D9D9D3A3A9D9D3A3A9D9D9D3A9D3A9D9D9D
-% 9D3A3A3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F
-% 7F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A9D9D9D9D9D3A9D9D9D9D9D3A3A3A3A3AFFFF535353FFFF9D9D
-% 9D3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A3A9D9D3A9D3A9D3A9D9D3AFFFF535353FFFF3A3A9D3A9D9D9D
-% 9D9D9D9D3A3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D9D9D9D9D3A9D3A9D3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A9D9D3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D3A9D
-% 3A9D3A3A9D9D3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A9D9D3A3A9D9D9D
-% 9D9D3A9D9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A
-% 3A3A9D3A9D9D9D9D3A9D3A9D9D3A9D9D3A9D9D9D9D9D3A9D3A9D9D9D3A9D
-% 3A3A3A3A3A3AFFFF535353FFFF000000210018181010C510101216181818
-% 181810121010101010101010101012101818181818181810121612161216
-% 1218181818181A181800FF1A1818181012101810121012AF181818181818
-% 181818181010101010101010101010101216181818101012101218181010
-% 1216121618181818181A1818181818AF181816FF7D00000000FF53535353
-% 535353FF3A3A3A9D3A9D3A9D9D9D3A3A3A3A9D3A3A9D9D3A3A9D9D3A9D9D
-% 9D9D3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D9D9D3A9D3A9D9D9D3A3A3A3AFF53535353535353FF3A9D
-% 9D9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A9D3A
-% 9D3A3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A
-% 9D3A9D9D9D9D3A9D9D9D9D9D9D3AFF53535353535353FF3A9D9D3A9D9D9D
-% 3A9D3A9D9D3A3A3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A9D3A9D3A3A3A7F131313131313137F3A3A9D3A3A3A3A3A3A3A
-% 3A9D3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D
-% 9D9D9D9D9D9D3A9D9DFF53535353535353FF9D9D3A9D9D9D9D9D3A9D9D3A
-% 9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D
-% 3A3A3A3A9D9D9D9D9D3A9D9D3A9D3A9D3A9D9D3A9D9D3A9D9D9D9D3A9D3A
-% 3A3A3A3AFF53535353535353FF0000210018161818C51010101218101810
-% 18121010101012101010101210121618181A181818101210181012101216
-% 181818181818181800FF18181818181118131612161218AFAF1818181A18
-% 181818101010101010100A1010101010AFAFAFAFAFAF1012161218101210
-% 1813181818181818181818181810AF161318FF7D00000000FF5353535353
-% 5353FF3A3A3A9D3A9D3A9D9D9D3A3A3A3A9D3A3A9D9D3A3A9D9D3A9D9D9D
-% 9D3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D9D9D3A9D3A9D9D9D3A3A3A3AFF53535353535353FF3A9D9D
-% 9D9D3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A9D3A9D
-% 3A3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D
-% 3A9D9D9D9D3A9D9D9D9D9D9D3AFF53535353535353FF3A9D9D3A9D9D9D3A
-% 9D3A9D9D3A3A3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D3A9D3A9D3A3A3A7F131313131313137F3A3A9D3A3A3A3A3A3A3A3A
-% 9D3A3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D
-% 9D9D9D9D9D3A9D9DFF53535353535353FF9D9D3A9D9D9D9D9D3A9D9D3A9D
-% 9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A
-% 3A3A3A9D9D9D9D9D3A9D9D3A9D3A9D3A9D9D3A9D9D3A9D9D9D9D3A9D3A3A
-% 3A3A3AFF53535353535353FF0000210013181818C5121010121010121018
-% 101012101216181618121618181818181818181818111813161216121818
-% 181818181A181800FF1A1818181818161818121012161818AFAF1A181818
-% 1818101010101010101010100810AFAFAFAFAFAFAFAF1018161216121810
-% 18101810181818181818181010AF121818FF7D000000FF53535353535353
-% 5353FF3A9D9D9D9D9D9D3A9D9D3A3A9D9D3A3A9D9D3A3A9D9D3A9D9D9D9D
-% 9D3A9D9D9D3A3A3A3A9D3A3A3A3A3A9D3A3A9D7F1313131313131313137F
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A9D9D3A9D9D3A9D9D9D3A3A3AFF535353535353535353FF9D9D9D
-% 9D3A3A3A3A3A3A9D9D9D3A9D9D9D9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A9D3A9D3A
-% 3A9D9D9D9D3A9D9D9D9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D3A9D3A9D9D9D9D3A3AFF535353535353535353FF9D9D9D9D9D9D9D9D
-% 3A9D3A9D3A9D3A9D3A9D3A9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D3A9D3A9D3A3A7F1313131313131313137F3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A9D9D3A3A3A3A9D3A3A3A3A3A9D3A9D9D3A3A9D3A3A9D
-% 9D3A9D9D9D9DFF535353535353535353FF9D9D9D9D3A9D9D3A3A9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F1313131313131313137F3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A9D9D9D9D3A9D9D3A3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A
-% 3AFF535353535353535353FF00210018181818C518181010101012101210
-% 1210121618181818181818181818181A1818181818161818121012161818
-% 1A181A18181800FF1818181818181818171216181818181818AFAFAFAFAF
-% 18111812101210101010101008AF101018181818AF181210121018101810
-% AFAFAFAFAFAFAFAFAFAFAFAFAF181618FF7D000000FF5353535353535353
-% 53FF3A3A9D3A9D9D3A9D9D3A3A9D3A3A3A9D9D3A3A9D9D9D9D3A3A9D9D9D
-% 9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A7F1313131313131313137F3A
-% 3A3A3A3A3A9D9D9D9D9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A9D3A9D9D3A9D3A9D9D3A9D3A3AFF535353535353535353FF9D9D9D9D
-% 3A3A3A3A3A3A3A9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F3A3A3A9D3A3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A3A9D
-% 9D9D3A9D3A3A9D3A9D9DFF535353535353535353FF3A9D9D3A9D9D3A3A3A
-% 9D3A3A9D3A9D3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D9D
-% 3A3A9D3A9D3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A9D9D9D9D9D9D3A9D
-% 9D9D3A9D9DFF535353535353535353FF9D9D3A3A9D9D3A9D9D9D3A9D9D3A
-% 3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D9D7F1313131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A
-% 9D9D9D3A3A9D9D9D9D3A9D9D3A9D9D3A9D9D3A9D9D3A9D9D3A9D3A3A3A3A
-% FF535353535353535353FF00210016181818C5C5C5C5C5C5C51018101810
-% 121018181818181818181818181818181818181818181712161818181818
-% 18181A181800FF18181818181A181818181218181818AFAF181818181618
-% 181612161810121012101010AF101010121816AF18181018181316131810
-% 1210101216121818121618AF181818FF7D000000FF535353535353535353
-% FF3A9D3A9D9D3A9D9D9D9D3A3A3A3A9D9D9D9D3A3A9D9D9D3A9D9D9D9D9D
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A
-% 3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 9D9D9D9D3A3A9D9D3A9D9D9D3A3AFF535353535353535353FF9D9D9D9D3A
-% 3A9D3A3A9D9D9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A9D3A3A3A3A9D
-% 9D9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D3A9D3A
-% 9D9D3A9D9D9D9D9D3AFF535353535353535353FF3A9D3A9D3A3A9D3A3A3A
-% 3A9D3A3A3A9D3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D9D9D3A9D9D9D9D9D3A
-% 3A9D3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A3A9D3A9D9D
-% 3A9D3A9DFF535353535353535353FF3A3A9D9D9D3A9D3A9D9D9D9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A
-% 3A7F1313131313131313137F3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D9D9D3A
-% 3A3A3A9D3A9D3A9D3A9D3A9D3A9D3A9D9D9D3A9D3A9D9D3A9D3A3A9D3AFF
-% 535353535353535353FF00210018181018C5181818181718181812101012
-% 1012121818181818181818181818181818181A1818181812181818181818
-% 1818181800FF18181A18181818181818171818AFAF121818181818121210
-% 1210121012161210121012AFAFAFAFAFAFAFAF1613101216181812161210
-% 12101012161818101818AF181818FF7D00000000FF53535353535353FF3A
-% 3A9D3A9D9D3A9D9D9D9D3A3A3A3A9D9D9D9D3A3A9D9D9D3A9D9D9D9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A
-% 9D3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D
-% 9D9D9D3A3A9D9D3A9D9D9D3A3A3AFF53535353535353FF3A9D9D9D9D3A3A
-% 9D3A3A9D9D9D3A3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A9D3A3A3A3A9D9D
-% 9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D3A9D3A9D
-% 9D3A9D9D9D9D9D3A9DFF53535353535353FF3A3A9D3A9D3A3A9D3A3A3A3A
-% 9D3A3A3A9D3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D9D9D3A9D9D9D9D9D3A3A
-% 9D3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A3A9D3A9D9D3A
-% 9D3A9D9DFF53535353535353FF3A3A3A9D9D9D3A9D3A9D9D9D9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A
-% 3A7F131313131313137F3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D9D9D3A3A
-% 3A3A9D3A9D3A9D3A9D3A9D3A9D3A9D9D9D3A9D3A9D9D3A9D3A3A9D3A3AFF
-% 53535353535353FF0000210018181612C518181818181816121612101010
-% 10121018181818181A18181818181A181818181818181718181818121818
-% 18181800FF1818181818181A1818181818AF181818161818161810101010
-% 1010101210121816121010AFAFAFAFAFAF10181810121818181018101010
-% 101010121810181018AF161818FF7D00000000FF53535353535353FF3A3A
-% 3A9D3A9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D3A9D9D9D3A9D3A9D9D3A9D9D
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A
-% 3A3A9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D3A9D9D3A9D9D9D9D3A3A3A3AFF53535353535353FF3A9D9D9D9D3A3A3A
-% 3A3A9D9D9D9D9D9D9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A9D3A9D9D9D
-% 9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D
-% 3A3A9D3A9D9D3A9DFF53535353535353FF9D3A3A9D3A9D9D3A3A3A3A9D3A
-% 3A9D3A9D3A9D3A9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A3A9D
-% 3A9D3A3A3A7F131313131313137F3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D3A9D9D9D3A9D3A
-% 9D9D3AFF53535353535353FF3A9D9D9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A
-% 7F131313131313137F3A3A9D3A3A3A3A3A9D3A3A3A3A3A9D9D3A3A3A3A3A
-% 9D9D3A9D3A9D3A3A9D9D9D3A9D3A9D3A9D9D9D9D9D3A9D3A3A3A3A3AFF53
-% 535353535353FF0000210018181818C51018181818161210181012101010
-% 1010181612181818181A181818181818181A181818181818181818161818
-% 161800FF181818181A181818181818181818181818181818181818101012
-% 101010101018121810181010101012161818181818161817181818181810
-% 1010101012181810AF121818FF7D0000000000FFFF535353FFFF9D3A3A9D
-% 3A9D9D9D9D9D9D9D3A3A3A9D3A3A9D9D3A3A3A9D9D3A3A9D9D3A9D3A9D9D
-% 9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F9D3A3A3A3A3A3A
-% 3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D
-% 9D9D3A9D9D9D9D9D9D9D3A3A3AFFFF535353FFFF3A3A9D9D9D9D3A3A3A3A
-% 9D3A9D9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A9D3A9D3A9D3A9D9D
-% 9D9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A9D
-% 3A3A9D9D3A9D9D3AFFFF535353FFFF3A3A3A9D3A9D3A9D3A3A3A3A3A9D3A
-% 3A3A9D3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D3A
-% 3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A9D9D9D3A9D9D9D9D9D3A
-% 9D9D9DFFFF535353FFFF9D9D9D3A9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A3A3A
-% 7F7F1313137F7F3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A9D3A9D3A3A9D9D3A
-% 3A9D9D9D9D3A3A3A9D9D3A9D3A3A9D9D9D3A9D9D3A9D3A3A9D3A3A3AFFFF
-% 535353FFFF000000210018181818C5101210121012101218161210101010
-% 10101010101216181810181818181A181818181818181818181818181818
-% 1800FF1818181A1E181A1818181612101218181818181818101810121010
-% 101010101218171818101210101018181818181818181818171818161012
-% 10121012101010AF101010FF7D00000000000000FFFFFF3A3A9D3A3A9D3A
-% 9D9D9D9D9D9D9D3A3A3A9D3A3A9D9D3A3A3A9D9D3A3A9D9D3A9D3A9D9D9D
-% 9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D7F7F7F3A3A9D3A3A3A3A3A3A3A
-% 3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D9D
-% 9D3A9D9D9D9D9D9D9D3A3A3A3A3AFFFFFF9D3A3A3A9D9D9D9D3A3A3A3A9D
-% 3A9D9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A9D3A9D3A9D3A9D9D9D
-% 9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A
-% 3A9D9D3A9D9D3A9D3AFFFFFF9D9D3A3A3A9D3A9D3A9D3A3A3A3A3A9D3A3A
-% 3A9D3A9D3A9D9D9D3A9D3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D3A3A
-% 3A3A3A3A9D3A7F7F7F3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A9D9D9D3A9D9D9D9D9D3A9D
-% 9D9D9D9DFFFFFF3A9D9D9D9D3A9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A3A3A3A
-% 3A7F7F7F9D3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A9D3A9D3A3A9D9D3A3A
-% 9D9D9D9D3A3A3A9D9D3A9D3A3A9D9D9D3A9D9D3A9D3A3A9D3A3A3A3A3AFF
-% FFFF0000000000210010101012C512161216121810181012101010101010
-% 1010101010121810181818181A1E181A1818181612101218181818181818
-% 00FF1818181A181A18181812101210101012161218101818181010101010
-% 101010121612181818181812181818181818181818181818181818181816
-% 121010121012AF101010FF7D00000000000000003AFF3A3A3A3A3A3A9D3A
-% 9D9D9D9D9D3A3A3A3A9D3A9D9D9D3A3A9D9D9D3A9D9D9D9D3A9D9D9D9D9D
-% 9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D9D9D9D9D9D9D9D3A3A3A9D9DFF9D9D9D3A3A9D9D9D9D3A3A3A3A3A9D9D
-% 9D9D9D9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A9D3A9D3A9D9D9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D9D9D3A9D3A9D9D
-% 9D9D9D9D3A9D3A9D3A3AFF3A3A3A3A9D3A3A3A9D9D3A3A3A9D3A9D3A9D3A
-% 3A3A9D3A9D3A9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A
-% 3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 3A3A9D3A3A9D3A3A3A9D3A3A3A9D3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D3A
-% 3A9D3AFF3A9D9D9D3A9D9D9D9D9D3A9D3A9D9D3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D9D3A3A3A3A
-% 3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A9D3A9D3A9D
-% 3A9D9D3A9D3A9D3A3A9D3A9D9D3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 000000000000210010101010C51012101210101012101210101210100810
-% 100F1010101012181818181A181A18181812101210101012161218101800
-% FF1818181A18181A18181810101010121012101212161218101010100A10
-% 10101012181818181818181818181A181818181818161812181818181818
-% 1012101018AF101010FF7D00000000000000003AFF3A3A3A3A3A9D3A9D9D
-% 9D9D9D3A9D3A3A9D9D3A3A9D9D3A9D3A9D9D9D3A3A3A9D9D3A9D9D3A9D9D
-% 9D3A3A3A3A3A3A3A3A3A9D3A3A3A7F3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D9D3A
-% 3A9D9D9D9D9D9D9D3A3A3AFF3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D9D
-% 9D9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A9D3A3A9D3A3A3A3A3A3A7F3A3A3A9D3A3A9D3A9D3A9D9D9D9D9D3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D3A9D3A9D3A9D9D3A
-% 9D9D9D3A9D3A9D3A3AFF3A3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D9D
-% 3A9D3A9D3A9D3A3A9D3A9D3A3A9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A3A3A
-% 3A3A3A7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D9D9D3A9D9D3A9D9D9D
-% 3AFF9D9D9D9D3A3A9D9D9D9D9D3A9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A
-% 3A7F3A3A3A3A3A9D3A3A9D3A3A9D3A3A9D9D3A3A3A3A9D3A9D9D3A9D9D9D
-% 9D9D3A3A3A9D9D9D3A9D3A9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00
-% 0000000000210010101010C51216131810181218161818181010100A100B
-% 101010101010181818181A18181A181818101010101210121012121600FF
-% 1818181A181A181818181210121010121010101012101218181010101008
-% 10121618181A181A181818181A1818181818181012121816181212181018
-% 16101018AF181818FF7D00000000000000003A3AFF3A3A3A3A9D3A9D9D9D
-% 9D9D3A9D3A3A9D9D3A3A9D9D3A9D3A9D9D9D3A3A3A9D9D3A9D9D3A9D9D9D
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A7F3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A
-% 9D9D9D9D9D9D9D3A3A3AFF3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D9D9D
-% 9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A9D3A3A9D3A3A3A3A3A3A9D7F3A3A9D3A3A9D3A9D3A9D9D9D9D9D3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D3A9D3A9D3A9D9D3A9D
-% 9D9D3A9D3A9D3A3A3AFF3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D9D3A
-% 9D3A9D3A9D3A3A9D3A9D3A3A9D9D9D9D3A9D9D9D9D9D3A9D3A9D3A3A3A3A
-% 3A3A7F3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D9D9D3A9D9D3A9D9D9D3A
-% FF9D9D9D9D3A3A9D9D9D9D9D3A9D9D9D9D3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A
-% 3A7F3A3A3A3A9D3A3A9D3A3A9D3A3A9D9D3A3A3A3A9D3A9D9D3A9D9D9D9D
-% 9D3A3A3A9D9D9D3A9D3A9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000
-% 00000000210018181010C512161216101316101818181818181010100E10
-% 1010101010181818181A181A18181818121012101012101010101200FF10
-% 181818181818181818161216121810181018101210101818161010101008
-% 1012161818181818181A1818181818181810121010101218101010121012
-% 181818AF18181AFF7D00000000000000003A3AFFFFFF3A3A3A9D3A9D9D3A
-% 3A3A9D9D3A9D9D3A3A3A9D3A3A3A9D9D3A9D3A9D9D3A9D3A3A9D9D9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 9D9D9D9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D9D9D3A3A9D
-% 9D9D9D9D9D9D9DFFFFFF3A9D3A3A3A3A3A3A3A9D3A3A3A9D9D9D9D9D9D9D
-% 9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A9D3A9D3A9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D9D3A9D3A9D9D3A9D3A9D3A9D9D9D3A9D9D3A9D3A9D9D9D9D3A
-% 3A9D3A3A3A3A9D3AFFFFFF3A3A3A3A9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D9D9D9D3A9D9D9D3A9D9D9D9D3A9D9D9D3A9D3A3A3A3A3A3A7F
-% 7F7F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A9D9D9D9D3A9D9D9D9DFFFFFF
-% 9D9D3A9D3A3A3A3A9D3A3A9D9D9D9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A3A
-% 7F7F7F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A9D9D3A3A9D3A9D9D9D
-% 3A9D3A9D9D9D3A3A3A9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000
-% 0000002100181A1818C51818121818181218181818181818161210101010
-% 101010101210181818181818181818161216121810181018101200FF1012
-% 161818181818101210121018181818181312101010101212181810121012
-% 101818181818181818181A18181818101210101010121610101210121012
-% 1018AF181818FF7D0000000000000000FFFF535353FFFF9D3A3A9D9D9D9D
-% 9D9D3A9D9D9D3A3A9D9D3A9D3A9D9D3A3A3A3A9D3A3A3A9D3A3A9D9D9D9D
-% 3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D
-% 9D9D3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D3A9D3A
-% 9D3A9D9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A7F7F1313137F7F3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D3A3A9D9D3A3A9D
-% 3A9D3A9D3AFFFF535353FFFF9D3A9D3A9D9D3A3A3A9D3A3A9D3A9D3A9D3A
-% 3A9D3A3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D3A9D3A9D3A3A3A3A7F7F1313
-% 137F7F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A
-% 3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D9D9D3AFFFF535353FF
-% FF9D9D9D9D9D3A3A9D9D9D3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A9D
-% 3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D3A7F7F13
-% 13137F7F3A3A3A3A9D3A3A9D3A9D3A3A3A9D3A9D9D3A9D9D9D3A9D3A9D3A
-% 3A3A9D9D3A9D3A3A3A9D3A9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A00000000
-% 0000210018181818C5101816181018181612101010121818181010101010
-% 1010101010121618181818181012101210181818181813121000FF101218
-% 161818101010101010101818181818181010101010101618181816101018
-% 181818181818181818181818181012101010101010121010101210101210
-% 18AF121612FF7D00000000000000FF53535353535353FF3A3A9D9D9D9D9D
-% 9D3A9D9D9D3A3A9D9D3A9D3A9D9D3A3A3A3A9D3A3A3A9D3A3A9D9D9D9D3A
-% 3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D
-% 9D3AFF53535353535353FF3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D3A9D3A9D
-% 3A9D9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D7F131313131313137F3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D3A3A9D9D3A3A9D3A
-% 9D3A9DFF53535353535353FF3A9D3A9D9D3A3A3A9D3A3A9D3A9D3A9D3A3A
-% 9D3A3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D3A9D3A9D3A3A3A7F1313131313
-% 13137F3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D9D9DFF53535353535353
-% FF9D9D9D9D3A3A9D9D9D3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A
-% 3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D7F13131313
-% 1313137F3A3A3A9D3A3A9D3A9D3A3A3A9D3A9D9D3A9D9D9D3A9D3A9D3A3A
-% 3A9D9D3A9D3A3A3A9D3A9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A0000000000
-% 00210016121818C518181218181810181010101010101218101010121010
-% 10101010121816181810101010101010181818181818101000FF10101012
-% 101012101010101012181818181818181010080A10101012181818181818
-% 181818181218181818171812181010101010101012181810101012161818
-% AF181618FF7D00000000000000FF53535353535353FF9D9D9D9D3A9D3A9D
-% 9D9D3A9D3A3A9D9D3A3A9D9D9D3A3A9D9D3A3A9D3A3A3A3A9D3A3A9D3A3A
-% 3A9D3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A
-% 3AFF53535353535353FF3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D9D9D9D9D9D
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A7F131313131313137F3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D9D9D3A9D9D9D9D9D3A3A3A3A9D9D9D9D3A9D3A3A9D9D3A9D9D9D3A3A3A
-% 9D3AFF53535353535353FF3A9D3A9D3A3A3A3A9D3A3A3A9D3A3A3A9D3A9D
-% 3A9D3A3A9D3A9D9D9D9D9D9D9D3A9D9D9D3A3A9D3A3A3A7F131313131313
-% 137F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D9DFF53535353535353FF
-% 3A9D3A9D9D9D9D9D9D3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D7F1313131313
-% 13137F9D3A3A3A3A3A9D3A3A3A3A3A9D3A9D9D9D3A9D9D3A9D9D3A3A9D3A
-% 9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000
-% 210016181618C51A18181810121818181812101010101018121610101210
-% 101010101012101012101010101012181818181818181000FF1210121018
-% 101810101010101012161818181A18181010101010101010101018181818
-% 1818181618181818181018101210101010101218181818161210121018AF
-% 181818FF7D000000000000FF535353535353535353FF3A9D9D3A9D9D9D9D
-% 9D9D9D3A3A9D9D3A3A9D9D9D3A9D3A9D9D9D9D3A3A3A3A9D9D9D9D3A3A3A
-% 3A3A7F1313131313131313137F3A9D3A3A3A3A9D3A3A9D9D9D3A3A3A9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9DFF
-% 535353535353535353FF3A3A3A3A3A9D9D3A9D9D9D3A3A9D3A3A9D3A9D3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F1313131313131313137F3A3A3A9D9D9D9D9D9D9D9D9D3A9D3A9D
-% 9D3A9D3A9D3A3A3A3A3A3A9D3A3A9D3A9D9D3A9D3A9D9D3A3A9D3A3A3A9D
-% FF535353535353535353FF3A9D3A9D3A9D3A3A3A3A9D3A3A3A9D3A3A9D3A
-% 3A3A9D3A9D9D9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A7F1313131313131313
-% 137F3A3A3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3AFF535353535353535353FF
-% 9D9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A9D9D7F13131313131313
-% 13137F3A3A3A3A9D9D3A9D3A3A3A9D9D3A3A3A3A9D9D9D3A9D9D3A3A3A9D
-% 9D9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021
-% 0018181818C5181818181816181818181710101210121612101210101818
-% 101210121018101810101010101012161818181A181800FF181818181818
-% 181810121210121012181818181818181010101010101010101012161818
-% 18181818171812161210121010121012181818181818181810121018AF18
-% 1818FF7D000000000000FF535353535353535353FF3A9D9D3A9D9D9D9D9D
-% 9D9D3A3A9D9D3A3A9D9D9D3A9D3A9D9D9D9D3A3A3A3A9D9D9D9D3A3A3A3A
-% 3A7F1313131313131313137F3A9D3A3A3A3A9D3A3A9D9D9D3A3A3A9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9DFF53
-% 5353535353535353FF3A3A3A3A3A9D9D3A9D9D9D3A3A9D3A3A9D3A9D3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F1313131313131313137F3A3A3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D
-% 3A9D3A9D3A3A3A3A3A3A9D3A3A9D3A9D9D3A9D3A9D9D3A3A9D3A3A3A9DFF
-% 535353535353535353FF3A9D3A9D3A9D3A3A3A3A9D3A3A3A9D3A3A9D3A3A
-% 3A9D3A9D9D9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A7F131313131313131313
-% 7F3A3A3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3AFF535353535353535353FF9D
-% 9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A9D9D7F1313131313131313
-% 137F3A3A3A3A9D9D3A9D3A3A3A9D9D3A3A3A3A9D9D9D3A9D9D3A3A3A9D9D
-% 9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100
-% 18181818C518181818181811181218181818161210181018101818181818
-% 18181818181818181012121012101218181818181800FF1A181818181818
-% 181818101010101012181818181818101810121010101010101210181218
-% 18181818161218101210101010101018181818181A181810101012AF1216
-% 12FF7D000000000000FF535353535353535353FF3A9D9D9D9D9D9D3A9D3A
-% 9D9D3A3A9D3A3A9D9D9D3A9D9D3A9D9D3A9D9D9D3A9D9D3A9D3A3A3A3A3A
-% 7F1313131313131313137F3A3A3A9D3A3A3A3A3A3A9D9D9D9D9D9D3A3A3A
-% 3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D3A3A9DFF5353
-% 53535353535353FF9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D3A
-% 3A7F1313131313131313137F3A9D3A3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D
-% 9D3A9D3A9D9D9D9D9D3A3A9D3A3A9D9D9D3A3A3A3A9D9D3A9D3A9D3AFF53
-% 5353535353535353FF3A9D9D3A3A9D3A3A9D3A9D9D3A9D3A9D9D3A9D9D3A
-% 3A9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D3A7F1313131313131313137F
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A9DFF535353535353535353FF9D3A
-% 3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D9D9D3A7F131313131313131313
-% 7F3A9D3A9D3A3A9D3A3A3A9D3A3A9D3A9D9D9D9D3A9D3A3A3A3A9D9D9D9D
-% 9D3A9D3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210016
-% 121612C512101818181818101012101818181012101210121818181A181A
-% 181818181818181818101010101012181818181800FF1818181818181818
-% 181818121010101210121018101812101216181018121610101210181718
-% 181818181810181012101010121818181A181818181818101010AF101010
-% FF7D00000000000000FF53535353535353FF3A3A9D9D3A9D9D9D9D9D9D9D
-% 9D3A9D9D3A3A9D9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A9D9D3A3A3A3A3A3A
-% 7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D3AFF5353
-% 5353535353FF9D9D9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D3A9D9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A7F131313131313137F3A3A3A3A3A9D9D9D9D3A9D9D9D3A9D3A9D3A9D3A
-% 9D9D3A9D3A3A3A3A3A3A9D3A9D9D3A3A3A9D9D9D3A3A3A3A3A3A9D9DFF53
-% 535353535353FF3A9D9D9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D3A3A7F131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF53535353535353FF3A3A3A9D
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A7F131313131313137F3A
-% 3A3A3A9D9D9D3A9D3A9D9D9D9D3A3A9D9D3A9D3A3A9D3A9D3A9D9D9D9D9D
-% 3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021001010
-% 1010C5101012161818101210101018121210101810121018181818181818
-% 1818181818181818181210101012101210181000FF1A1818181818181818
-% 1818181812101010101010121010181012181818181A1810121018181818
-% 18181818181817181012101216181818181A18181812101010AF101010FF
-% 7D00000000000000FF53535353535353FF3A3A9D9D3A9D9D9D9D9D9D9D9D
-% 3A9D9D3A3A9D9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A9D9D3A3A3A3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D3AFF535353
-% 53535353FF9D9D9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D3A9D9D3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 7F131313131313137F3A3A3A3A3A9D9D9D9D3A9D9D9D3A9D3A9D3A9D3A9D
-% 9D3A9D3A3A3A3A3A3A9D3A9D9D3A3A3A9D9D9D3A3A3A3A3A3A9D9DFF5353
-% 5353535353FF3A9D9D9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A9D3A3A7F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF53535353535353FF3A3A3A9D3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A7F131313131313137F3A3A
-% 3A3A9D9D9D3A9D3A9D9D9D9D3A3A9D9D3A9D3A3A9D3A9D3A9D9D9D9D9D3A
-% 3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100101010
-% 10C5101010121816181810121012101010101210181018161818181A1818
-% 18181818181818181818121010101010101200FF18181818181012101817
-% 181818181810121010121010121012161818181818181818101818181818
-% 18181818181818181816181818181A181818181618181810AF101010FF7D
-% 0000000000000000FFFF535353FFFF9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D
-% 3A9D9D3A9D9D3A3A9D9D9D3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D7F
-% 7F1313137F7F3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D3AFFFF5353
-% 53FFFF3A3A9D3A9D3A3A9D9D3A9D9D9D9D3A9D3A9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 7F7F1313137F7F3A3A3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D
-% 3A9D3A9D3A9D3A3A3A3A3A9D9D3A9D3A3A9D3A9D9D9D3A9D3A9D3AFFFF53
-% 5353FFFF3A9D9D9D3A9D3A3A9D9D9D9D9D3A9D9D9D3A3A9D3A3A3A3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A3A3A3A7F7F1313137F7F3A3A3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3AFFFF535353FFFF3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F7F1313137F7F3A3A3A3A
-% 3A9D3A9D3A3A3A9D3A3A3A3A9D9D9D3A9D3A9D3A3A3A3A9D9D9D9D9D3A3A
-% 3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010101010
-% C51010101010121818181818181612161216121012101218181818181818
-% 181012101817181818181810121010121000FF1818111210101010121818
-% 181818181818181210101210101210121810121618181818181818181A18
-% 18181818181818181818181818181A1818181818181810AF101210FF7D00
-% 000000000000003A3AFFFFFF3A3A3A3A3A9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A9D3A3A9D9D3A
-% 7F7F7F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3AFFFFFF
-% 3A3A3A9D9D3A3A9D3A9D9D9D9D3A9D3A3A9D9D9D9D3A3A3A9D3A3A3A3A3A
-% 9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A7F7F7F3A3A3A3A3A3A9D3A3A9D9D9D9D9D9D9D3A9D3A3A9D9D3A3A3A3A
-% 9D3A9D3A3A3A9D3A9D3A3A3A9D3A3A9D3A9D9D3A9D9D3A3A9D9D9D9DFFFF
-% FF9D9D3A9D9D3A9D3A3A9D3A9D9D9D9D9D9D3A9D3A3A3A3A3A9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3AFFFFFFFF9D3A3A9D3A3A9D3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F7F3A3A3A3A3A9D
-% 3A9D3A3A9D9D9D9D3A3A9D9D9D9D9D3A3A3A9D3A3A3A9D9D3A9D9D3A3A3A
-% 9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210012101012C5
-% 101010101018181820191818181818181818101010121012181818111210
-% 1010101218181818181818181812101000FF181818161812181612101212
-% 181818181018101813181818181612161818181818181818181A18181818
-% 1A181818181210131618181818181818181210121012AF121618FF7D0000
-% 0000000000003A3A3A3AFF3A3A3A3A3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D
-% 9D3A9D9D9D9D9D3A3A3A3A9D3A3A3A3A3A3A9D9D3A3A3A9D3A3A9D9D3A7F
-% 3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3AFF9D9D3A
-% 3A3A9D9D3A3A9D3A9D9D9D9D3A9D3A3A9D9D9D9D3A3A3A9D3A3A3A3A3A9D
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A7F3A3A3A3A3A3A9D3A3A9D9D9D9D9D9D9D3A9D3A3A9D9D3A3A3A3A9D
-% 3A9D3A3A3A9D3A9D3A3A3A9D3A3A9D3A9D9D3A9D9D3A3A9D9D9D9D3A3AFF
-% 9D9D3A9D9D3A9D3A3A9D3A9D9D9D9D9D9D3A9D3A3A3A3A3A9D9D9D9D9D9D
-% 9D3A9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A9D3A3A3AFF3A3A3A9D3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A9D3A
-% 9D3A3A9D9D9D9D3A3A9D9D9D9D9D3A3A3A9D3A3A3A9D9D3A9D9D3A3A3A9D
-% 9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210016181818C510
-% 101010101018181818181818181810181818181012101018181818161812
-% 18161210121218181818101810181300FF10181018101818181818101618
-% 181818181818181816181212101210121818181818181818181818181818
-% 181A18181618181818181818181818181610101210AF121018FF7D000000
-% 00000000003A3A3A3A3AFF3A3A9D9D9D9D9D3A9D3A3A9D3A9D9D9D3A9D9D
-% 9D3A9D3A3A9D3A9D3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A9D3A7F3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D9D9D3A9DFF3A9D9D9D9D
-% 9D3A9D3A9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A7F3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D3A
-% 9D3A9D3A9D3A3A9D9D9D3A9D3A3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9DFF
-% 9D9D9D9D3A9D3A3A9D9D9D3A9D9D3A9D9D3A9D3A9D3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D9D9D3A3A9D3A9D3A3A3A3A3A7F3A3A9D9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A9D3A3A9D3A3A3A3AFF3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A
-% 3A9D3A9D9D3A9D3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A9D3A9D3A
-% 9D9D9D9D3A3A9D9D3A9D9D9D9D9D3A9D3A3A3A9D9D9D9D9D9D3A9D3A3A9D
-% 9D9D9D3A9D3A3A3A3A3A9D3A3A3A3A000000000000210010181018C51012
-% 101010121012101217181818101818181810121010101810181018101818
-% 181818101618181818181818181800FF1012121212101018181818181210
-% 121018121612161210101010101010101018181818181818181818181A18
-% 1818181818181818181818181818181818131010AF101210FF7D00000000
-% 000000003A3A3A3A9DFFFFFF9D3A9D9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D
-% 9D9D9D3A3A9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A7F7F7F3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D9D3A9DFFFFFF9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A9D3A9D9D3A9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A7F7F7F3A3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A9D3A9D9D
-% 3A3A3A9D3A9D9D3A3A3A3A9D3A3A9D9D3A9D3A9D3A9D3A9D3A3A3A9DFFFF
-% FF9D9D9D3A3A3A9D9D3A9D3A3A3A3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D3A3A3A9D9D3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3AFFFFFFFF3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F7F7F7F9D9D9D9D9D9D
-% 9D9D9D3A9D9D3A9D3A9D9D9D9D9D3A9D3A3A3A9D9D9D9D3A9D3A3A3A9D9D
-% 9D9D3A9D3A3A9D3A3A3A3A3A3A3A000000000000210012101218C5101010
-% 101010101012181812181618101210121010101010121012121212101018
-% 1818181812101210181216121600FF121010101010121810181818161010
-% 12101010121012161210101010101010101210161818181818181A182018
-% 1A181818181818181818181818181818161810AF101010FF7D0000000000
-% 0000003A3A3AFFFF535353FFFF9D9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D9D
-% 9D9D3A3A9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A7F7F1313137F7F3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D9D9DFFFF535353FFFF9D9D9D9D9D
-% 9D9D9D9D9D9D3A9D3A9D3A9D9D3A9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F
-% 1313137F7F3A3A9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A9D3A9D9D3A
-% 3A3A9D3A9D9D3A3A3A3A9D3A3A9D9D3A9D3A9D3A9D3A9D3A3AFFFF535353
-% FFFF9D3A3A3A9D9D3A9D3A3A3A3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D3A3A3A9D9D3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A9DFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A7F7F1313137F7F9D9D9D9D9D
-% 9D9D3A9D9D3A9D3A9D9D9D9D9D3A9D3A3A3A9D9D9D9D3A9D3A3A3A9D9D9D
-% 9D3A9D3A3A9D3A3A3A3A3A3A3A000000000000210010101210C512121012
-% 101012101012101817121210181618101210101010121010101010121810
-% 18181816101012101010121000FF10101012101210101218181810121012
-% 161218121612101010101008100E1010101012121618181818181A181818
-% 181818181818181818181818181818181810AF101010FF7D000000000000
-% 00003A3AFF53535353535353FF9D9D9D9D3A9D3A3A9D9D9D3A9D3A9D9D9D
-% 3A3A3A9D3A9D9D9D3A9D9D9D9D3A3A9D3A3A3A7F131313131313137F3A3A
-% 3A3A3A3A3A9D3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A9D3A3A3A3A3A3A3A9D3AFF53535353535353FF9D9D3A3A9D
-% 9D9D3A3A3A9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D7F131313
-% 131313137F3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A9D3A9D
-% 3A9D9D3A9D3A9D9D3A3A3A9D9D3A9D3A9D9D9D9D9D9D3AFF535353535353
-% 53FF3A9D3A9D9D9D3A3A9D9D9D9D9D9D3A3A3A9D9D9D3A9D9D9D9D9D9D9D
-% 9D9D3A3A9D3A9D3A7F131313131313137F3A3A9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 9D9D3A9D3AFF53535353535353FF3A9D3A9D3A9D9D9D9D9D3A9D9D9D9D9D
-% 9D9D3A9D9D9D9D3A9D9D3A9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F9D9D9D9D9D
-% 9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A9D9D9D3A9D9D9D3A3A3A9D9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010101012C51817181612
-% 101010121618181818101618181816181618181010101012101210101218
-% 181810121012161218121600FF1012101010101010101012181818181012
-% 1010101012101210101010101010101010101012181818181A18181A1818
-% 1818181718181216181818181816181810AF101008FF7D00000000000000
-% 003A3AFF53535353535353FF9D9D3A9D9D9D9D3A9D9D3A3A3A9D3A9D3A3A
-% 3A9D3A9D3A3A3A3A9D3A9D9D3A9D3A3A3A3A7F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3AFF53535353535353FF9D9D3A3A9D9D
-% 9D3A3A9D3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A7F13131313
-% 1313137F3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D9D3A3A3A
-% 9D3A9D3A9D3A9D3A9D3A9D3A9D9D9D9D3A9D3A9D3A9DFF53535353535353
-% FF3A3A3A3A9D9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A9D9D3A9D3A7F131313131313137F3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D3AFF53535353535353FF3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A7F131313131313137F9D9D9D9D3A9D
-% 9D3A3A9D9D3A3A3A9D9D9D3A3A3A9D9D3A9D3A9D9D3A9D3A9D9D9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A000000000000210010081010C5181818181818
-% 181613181818181818121818181818181818101012101010101010101012
-% 1818181810121010101000FF121010121012101210121010121612161216
-% 121813181718101210101010101010101010101816181818181A18181818
-% 18181210121012181217181818121810AF100810FF7D0000000000000000
-% 3AFF535353535353535353FF9D3A9D9D9D9D3A9D9D3A3A3A9D3A9D3A3A3A
-% 9D3A9D3A3A3A3A9D3A9D9D3A9D3A3A3A7F1313131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353535353535353FF9D3A3A9D9D9D
-% 3A3A9D3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F131313131313
-% 1313137F9D9D3A9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D9D3A3A3A9D
-% 3A9D3A9D3A9D3A9D3A9D3A9D9D9D9D3A9D3A9D3AFF535353535353535353
-% FF3A3A3A9D9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 3A9D9D3A9D7F1313131313131313137F3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9DFF535353535353535353FF3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F9D9D9D3A9D9D
-% 3A3A9D9D3A3A3A9D9D9D3A3A3A9D9D3A9D3A9D9D3A9D3A9D9D9D9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A000000000000210008101010C51818181A18181A
-% 181818181A18181818181818181818181810121010121012101210121010
-% 12161216121612181300FF10101210101210181210121010121018181818
-% 1816181818181610101010100A0E10101212181218181818181818181818
-% 101012101010121618121612181610AF10080AFF7D00000000000000003A
-% FF535353535353535353FF9D9D3A9D9D9D3A3A9D3A9D9D9D9D3A3A3A3A3A
-% 3A9D9D9D3A9D9D9D3A3A9D9D9D3A9D7F1313131313131313137F9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF9D9D3A9D9D9D9D
-% 9D9D9D9D3A9D9D9D9D3A3A9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 13137F3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A3A9D9D9D9D
-% 9D3A9D3A9D3A9D3A3A9D9D9D3A3A9D9D3A9D3AFF535353535353535353FF
-% 9D3A9D3A3A9D9D9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A
-% 9D3A9D3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3AFF535353535353535353FF3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A7F1313131313131313137F9D9D9D9D3A3A9D
-% 9D9D9D9D9D3A3A3A3A9D3A9D9D9D9D9D9D3A9D9D9D3A3A9D9D9D9D3A9D3A
-% 3A9D3A3A3A3A3A3A3A0000000000002100080A1010C51818181820181818
-% 181818181818181812101210181216181010101210101210181210121010
-% 121018181818181600FF12181018181818181A1818181810101818161216
-% 121012101218181818121010101010101010101818181818181818101018
-% 1218161216121012101210101218AF101010FF7D00000000000000003AFF
-% 535353535353535353FF9D3A9D3A9D3A3A9D3A3A9D9D3A3A3A9D9D3A9D3A
-% 3A3A3A9D3A3A9D9D9D3A9D9D9D3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF9D3A9D9D3A9D3A3A
-% 9D9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313
-% 137F3A3A9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D3A9D3A9D3A9D
-% 9D9D3A9D9D3A3A3A9D3A3A9D9D3A3A9D9D3AFF535353535353535353FF3A
-% 3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A
-% 3A9D3A7F1313131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F1313131313131313137F9D3A3A3A3A9D3A9D
-% 3A9D3A3A9D9D3A3A9D9D9D9D9D3A3A9D9D3A9D3A3A9D9D9D3A9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A000000000000210010101010C51816181A181A181A18
-% 181A181A1816121010C5C5C5C51210181218C5C5181818181AC5C5C5C510
-% 1018181612161200FF101012101818181818181A18181218181818181812
-% 101810101218181010101010101010101210121618181818161210121018
-% 10181818181018101210121012AF121010FF7D00000000000000003A3AFF
-% 53535353535353FF3A9D3A9D3A9D3A3A9D3A3A9D9D3A3A3A9D9D3A9D3A3A
-% 3A3A9D3A3A9D9D9D3A9D9D9D3A3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF9D9D3A9D9D3A9D3A3A9D
-% 9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 3A3A3A9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D3A9D3A9D3A9D9D
-% 9D3A9D9D3A3A3A9D3A3A9D9D3A3A9D9D3A9DFF53535353535353FF9D3A3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A3A
-% 9D3A3A7F131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F9D9D3A3A3A3A9D3A9D3A
-% 9D3A3A9D9D3A3A9D9D9D9D9D3A3A9D9D3A9D3A3A9D9D9D3A9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A000000000000210010101010C518181818181A18181A18
-% 1A181818181210C5C51210C5C518121010C5C518181818C5C51A18C5C518
-% 18181818181200FF10121010121012181818181818181818181818181718
-% 131010101010121010101010101010101210101212121012101010121012
-% 181818181818101210101010AF121818FF7D00000000000000003A3AFF53
-% 535353535353FF9D9D9D9D9D9D9D3A9D3A9D9D9D3A3A9D9D3A3A3A9D9D9D
-% 9D9D3A9D3A9D9D9D3A9D9D9D3A7F131313131313137F3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3AFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A7F131313131313137F3A
-% 9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D3A9D9D9D3A9D
-% 9D9D3A3A3A9D3A9D9D3A9D3A9D3A3A3A3AFF53535353535353FF3A3A3A3A
-% 3A3A3A9D3A3A9D3A9D3A3A3A9D9D9D9D3A9D9D9D3A9D9D9D9D3A9D3A3A9D
-% 9D3A7F131313131313137F3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF
-% 53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F131313131313137F9D9D3A3A9D9D9D9D3A9D3A
-% 9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A000000000000210018181813C5181818181A181818181818
-% 181818181010C5C51010C5C510101012101012101218C5C51818C5C51818
-% 181818181700FF1810101210101818181818181818181818181818181816
-% 101012101010101010101010101210101210121010121010101010101216
-% 1818181818181010101010AF101018FF7D00000000000000003A3A3AFFFF
-% 535353FFFF9D9D9D3A9D9D3A9D3A9D3A9D3A3A9D3A9D3A3A9D9D3A9D9D9D
-% 9D3A9D3A9D3A9D9D9D9D3A9D9D7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3AFFFF535353FFFF3A3A3A9D9D3A3A3A9D9D3A3A3A
-% 9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A7F7F1313137F7F3A3A3A
-% 9D3A9D3A3A9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A3A9D3A9D3A9D3A9D
-% 3A9D9D9D3A9D3A9D9D3A9D3A3A9D3A3A3AFFFF535353FFFF9D3A3A3A9D3A
-% 3A9D3A3A9D3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A
-% 3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A9D3A9D9D3A9D9D9D9D3A3A3A9D3A9D9D3A9D3A3AFF
-% FF535353FFFF9D3A3A9D9D3A3A3A9D9D3A9D9D3A9D9D9D9D3A9D3A9D3A3A
-% 9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F9D3A3A9D9D9D9D9D9D9D3A3A9D
-% 9D3A9D9D9D9D3A3A9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A3A9D3A3A
-% 9D3A3A3A3A000000000000210010181816C5C5C5C5C5C5C5C5C5C5C5C5C5
-% 1818101010C5C51010C5C510181810101210101818C5C51818C5C5181818
-% 1818181800FF181818101612181018181818181818181818181818181818
-% 181010121018181010101210101012101010101210101210101010101218
-% 18181818181012101010AF0A1010FF7D00000000000000003A3A3A3A3AFF
-% FFFF3A9D9D9D9D3A9D9D3A9D3A9D3A9D3A3A9D3A9D3A3A9D9D3A9D9D9D9D
-% 3A9D3A9D3A9D9D9D9D3A9D9D3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3AFFFFFF3A9D3A3A3A9D9D3A3A3A9D9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A7F7F7F3A3A3A3A3A9D
-% 3A9D3A3A9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A3A9D3A9D3A9D3A9D3A
-% 9D9D9D3A9D3A9D9D3A9D3A3A9D3A3A3A9D3AFFFFFF3A3A9D3A3A3A9D3A3A
-% 9D3A3A9D3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A3A
-% 3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A9D3A9D9D3A9D9D9D9D3A3A3A9D3A9D9D3A9D3A3A9D9D
-% FFFFFF9D3A9D3A3A9D9D3A3A3A9D9D3A9D9D3A9D9D9D9D3A9D3A9D3A3A9D
-% 3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A9D9D3A3A9D9D9D9D9D9D9D3A3A9D9D
-% 3A9D9D9D9D3A3A9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A3A9D3A3A9D
-% 3A3A3A3A000000000000210010101012C518181818181818181718181818
-% 12101210C5C51210C5C518181818181016121810C5C5C5C5C51818181818
-% 18181800FF1A181812121210181012121018181818181818181216181818
-% 101210181818101018101818181816121012101012161010101010121818
-% 181818181012101010AF100810FF7D00000000000000003A3A3A3A3A3A3A
-% FF9D3A9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D3A9D3A9D9D9D9D9D9D3A9D3A
-% 9D9D9D9D9D3A3A9D9D9D9D9D7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A9D3A3AFF3A3A3A3A3A3A3A9D9D3A3A9D9D3A3A3A3A3A3A
-% 9D3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A7F3A3A3A3A3A9D3A
-% 9D3A3A9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A9D3A9D9D9D3A
-% 9D3A9D3A9D3A9D9D3A3A9D3A9D3A3A3A3A9D3A3AFF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D3A9D3A3A3A3A
-% 3A3A7F3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A9D3A3A3A3A9D3A9D3A3A3A9D9D3A3A3A3A3A9D3A9D3AFF
-% 3A9D3A9D9D3A3A9D9D3A3A3A3A9D9D3A9D3A9D3A9D9D3A3A3A3A9D3A9D3A
-% 9D9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A9D
-% 3A3A9D3A3A9D3A3A3A3A3A3A7F3A3A9D3A3A9D9D9D9D3A9D9D3A9D9D9D9D
-% 9D3A9D9D9D3A3A9D9D9D9D3A9D3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A000000000000210008101010C51818171818181818181818181612
-% 101010C5C51012C5C518181A18181212121018C5C5121018181818181818
-% 181200FF1818121010101012101010121012181818171818161812181012
-% 1210121218181818181818181A1818181010181818101210101010101818
-% 1818181612171210AF101010FF7D00000000000000003A3A3A9D3A3A3AFF
-% 3A9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D9D3A9D9D9D9D7F9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A3A3A3A3A9D
-% 9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A3A9D3A9D9D3A9D9D9D3A9D3A9D
-% 3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A9D3A3A9DFF3A3A9D3A9D3A3A9D3A3A
-% 3A9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D3A3A3A3A
-% 7F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D3A9D3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A9D9D3A3AFF9D3A
-% 9D3A3A3A3A3A3A9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A9D9D3A9D3A9D
-% 3A3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A7F9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D
-% 9D9D9D3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A000000000000210010101010C5101218181818181818111813181010
-% 1010C5C51218C5C5181A181812101010101210C5C5121012181818171818
-% 1600FF181810101010101210101010101216181818181012101210101010
-% 101010101818181818181818181818181818181818101010101012181818
-% 18181818181810AF181210FF7D00000000000000003A3A3A9D3A3A3A9DFF
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D9D
-% 9D9D9D9D9D3A9D9D9D9D7F9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D3A3A3A9D3A3A3A3A9D3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D7F3A3A3A3A3A3A9D9D
-% 3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A3A9D3A9D9D3A9D9D9D3A9D3A9D3A
-% 3A3A9D3A9D3A3A9D3A3A3A3A3A3A9D3A3A9DFF3A3A9D3A9D3A3A9D3A3A3A
-% 9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D3A3A3A3A7F
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A9D3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A9D9D3A3AFF9D3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A9D9D3A9D3A9D3A
-% 3A3A9D3A3A3A9D3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D7F9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D
-% 9D9D3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A000000000000210012101010C510101818181818181818181810121010
-% 1010C5C5C5C5181A1818181010101010121010C5C5C5C516181818181012
-% 00FF1818181010080810101010100B0E0A10101618181818181810181316
-% 121612161210121618181818181818161218101818181818161010101012
-% 101010121010AF121818FF7D00000000000000003A3A3A3A3A3A3A3AFFFF
-% FF3A9D3A9D3A9D3A9D9D9D3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D3A9D9D
-% 9D3A9D9D9D3A7F7F7F9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A9D3A
-% 9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D3A9D3A9D9D3A3A9D9D9D9D3A3A3A
-% 9D3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A9DFFFFFF3A3A3A3A3A9D3A9D3A
-% 3A3A9D3A3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D3A3A9D3A9D3A3A7F7F7F3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D9D3A3A3A3A9D9D3A3A9D9D3A3A3A9D3A3A9D3A3A3AFFFFFF3A3A9D3A
-% 3A3A3A9D3A9D3A9D3A3A9D9D3A9D9D3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D7F7F7F9D9D9D9D9D3A9D3A9D3A9D3A9D9D9D9D9D
-% 9D3A9D3A3A9D9D9D9D3A9D9D3A9D9D9D3A9D3A9D3A3A3A9D3A3A3A3A3A3A
-% 000000000000210018181618C51010181618181A18181813101018101810
-% 12181818181A18181818181010080810101010100B0E0A10101618181800
-% FF1818181612101010101010101010101010121818181818161018101612
-% 171218101210121818181818181818101810181818181818181810121010
-% 1210101010AF161818FF7D00000000000000003A3A3A3A3A3AFFFF535353
-% FFFF9D9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A9D
-% 9D9D9D7F7F1313137F7F9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 9DFFFF535353FFFF3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A7F7F1313137F7F3A9D3A9D9D3A
-% 3A9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A3A9D3A3A9D9D3A9D3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A9D3A3A9D3A3A3AFFFF535353FFFF9D3A9D3A9D3A3A9D
-% 9D3A3A9D9D9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D3A3A3A7F7F1313137F7F
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A
-% 9D3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A9D3AFFFF535353FFFF3A9D3A
-% 9D3A9D3A9D3A3A3A9D3A3A9D3A9D9D9D3A3A3A3A3A3A9D3A3A3A9D3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A7F7F1313137F7F9D9D9D9D3A9D9D3A9D9D3A9D3A9D9D9D
-% 9D9D9D3A3A9D9D3A9D9D3A9D9D3A9D9D9D3A9D3A3A3A3A3A9D3A3A3A3A00
-% 0000000000210018181818C5181818181818181818181810121012181612
-% 16181818181A1818181816121010101010101010101010101218181800FF
-% 181618181818181012101010101010101010121618181818121812181218
-% 121012101210121018181816181810181210121018181818181210101210
-% 12101210AF121818FF7D00000000000000003A3A3A3A3AFF535353535353
-% 53FF9D9D3A9D3A3A3A3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A9D9D
-% 9D7F131313131313137F3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFF
-% 53535353535353FF3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A7F131313131313137F9D3A9D9D3A3A
-% 9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A3A9D3A3A9D9D3A9D3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A9D3A3A9D3A3AFF53535353535353FF3A9D3A9D3A3A9D9D
-% 3A3A9D9D9D9D9D9D3A9D9D9D9D9D3A9D9D3A9D3A3A7F131313131313137F
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D
-% 3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A9DFF53535353535353FF9D3A9D
-% 3A9D3A9D3A3A3A9D3A3A9D3A9D9D9D3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A3A3A7F131313131313137F9D9D9D3A9D9D3A9D9D3A9D3A9D9D9D9D
-% 9D9D3A3A9D9D3A9D9D3A9D9D3A9D9D9D3A9D3A3A3A3A3A9D3A3A3A3A0000
-% 00000000210018181818C518181818181818181818181813161810121818
-% 1818181A181818161818181818101210101010101010101012161800FF18
-% 12121618181812161210101010100A0F1010121818181618171816181618
-% 101210101010121018181812161218101010181818181818121612AFAFAF
-% AFAFAFAF101216FF7D00000000000000003A3A3A3A3AFF53535353535353
-% FF9D9D9D9D3A9D3A3A3A3A9D3A9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D3A9D
-% 7F131313131313137F9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53
-% 535353535353FF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A9D3A9D3A3A9D
-% 9D9D9D9D9D9D9D9D9D3A9D9D3A3A9D3A9D3A9D3A9D3A3A9D3A3A3A3A3A9D
-% 9D3A9D3A9D3A3A3A9D3A3A9DFF53535353535353FF3A3A3A3A3A3A3A3A9D
-% 3A3A9D9D9D9D9D9D9D9D9D9D3A3A9D9D3A9D3A9D7F131313131313137F3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D3A
-% 9D3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3AFF53535353535353FF3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A9D3A3A3A3A9D9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A7F131313131313137F9D9D3A9D9D3A9D9D3A9D9D9D9D3A9D3A9D
-% 3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000
-% 000000210012161818C518181A1818181A18181818181818181818161818
-% 18181818181812121618181812161210101010100A0F1010121800FF1810
-% 101012101216121810121010121010101010121618181818181818181810
-% 101010121010101210121612181018101818181818181816121810181018
-% 1210AF101212FF7D00000000000000003A3A3A3AFF535353535353535353
-% FF9D9D3A3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D3A9D9D3A3A9D3A9D9D7F13
-% 13131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353
-% 535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A7F1313131313131313137F3A3A9D9D3A3A9D
-% 9D9D9D9D9D9D3A9D9D3A3A3A3A9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A9D3A
-% 9D3A3A3A3A9D3A3A3A9DFF535353535353535353FF3A3A9D3A9D3A9D3A3A
-% 9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D9D7F1313131313131313137F3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353535353535353FF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F1313131313131313137F9D9D9D3A9D3A9D3A9D9D3A9D9D9D3A9D9D
-% 9D3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A3A9D3A3A3A3A3A3A00000000
-% 0000210012121818C518181818181818181A181818181818181818181818
-% 1818181818101010121012161218101210101210101010101200FF181612
-% 101010101210121612101216101010101210121818181818181818181612
-% 101010101210121012101216121818181818181612101210121012101210
-% 10AF101010FF7D00000000000000003A3A3A3AFF535353535353535353FF
-% 9D9D3A3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D3A9D9D3A3A9D3A9D9D7F1313
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF53535353
-% 5353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A7F1313131313131313137F3A3A9D9D3A3A9D9D
-% 9D9D9D9D9D3A9D9D3A3A3A3A9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A9D3A9D
-% 3A3A3A3A9D3A3A3A9DFF535353535353535353FF3A3A9D3A9D3A9D3A3A9D
-% 9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D9D7F1313131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A7F1313131313131313137F9D9D9D3A9D3A9D3A9D9D3A9D9D9D3A9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A3A3A9D3A3A3A3A3A3A0000000000
-% 00210010101218C518181818181818181818181A18181818181818181818
-% 18181818161210101010121012161210121610101010121000FF18181816
-% 101010101012101210181216121010101012161818181818181818121810
-% 101010101010121012101810181818181818181210101210121012101210
-% AF100F10FF7D00000000000000003A3A3A3AFF535353535353535353FF3A
-% 9D9D3A3A3A3A9D9D3A9D9D3A9D3A9D9D9D9D9D3A3A9D9D9D9D3A7F131313
-% 1313131313137F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9DFF5353535353
-% 53535353FF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A7F1313131313131313137F3A3A3A9D9D3A9D9D9D
-% 9D9D9D9D9D9D3A3A9D3A3A3A9D9D9D3A9D3A3A9D9D9D3A3A3A3A9D3A9D3A
-% 9D3A9D3A3A3A3A3AFF535353535353535353FF3A9D3A3A3A3A3A3A9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A9D3A3A9D3A9D7F1313131313131313137F3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 7F1313131313131313137F9D9D9D9D9D3A3A9D9D9D9D9D9D9D3A9D3A9D3A
-% 3A9D9D9D9D9D3A9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000
-% 21000F101010C5101818181818181A18181A181A18181818181818181818
-% 181818181816101010101012101210181216121010101000FF1818181818
-% 121010101010101818181810101010101012181818181818181818181012
-% 1010101210101010121018181018181818181816121010101210101010AF
-% 100A10FF7D00000000000000003A3A3A3A3AFF53535353535353FF9D9D9D
-% 9D3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D9D9D3A9D3A9D9D9D9D7F131313
-% 131313137F9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF5353535353
-% 5353FF3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A7F131313131313137F9D3A9D3A9D9D3A3A9D9D9D
-% 9D9D9D9D3A9D3A9D9D3A3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A3A9D3A3A3A
-% 3A3A3A3A3A9D3A3AFF53535353535353FF3A3A3A3A9D3A9D3A3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D3A9D3A3A9D3A7F131313131313137F3A3A3A3A3A
-% 3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 7F131313131313137F9D9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D9D3A3A9D
-% 9D9D9D3A9D9D3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021
-% 000A101010C510121018181818181A181A18201818181818181818181818
-% 1818181818181210101010101018181818101010101000FF181818181010
-% 1010101012181816181818181818181818181A1818181810101816181818
-% 18121610121012101810121010101818181012101012101010121010AF10
-% 0A08FF7D00000000000000003A3A3A3A3AFF53535353535353FF9D9D9D9D
-% 3A3A9D3A9D9D9D9D3A3A9D9D3A9D9D9D9D9D3A9D3A9D9D9D9D7F13131313
-% 1313137F9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF535353535353
-% 53FF3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A7F131313131313137F9D3A9D3A9D9D3A3A9D9D9D9D
-% 9D9D9D3A9D3A9D9D3A3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A3A9D3A3AFF53535353535353FF3A3A3A3A9D3A9D3A3A9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A9D3A3A9D3A7F131313131313137F3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A7F
-% 131313131313137F9D9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D9D3A3A9D9D
-% 9D9D3A9D9D3A3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100
-% 0A081010C510101012161818181818181A18181818101012101810181618
-% 18181818101010101010121818161818181818181800FF16181818101012
-% 081010101012181818181818181818181A181A1818161212181818181818
-% 161210121010121216181010121010101212161218101210101012AF1010
-% 10FF7D00000000000000003A3A3A3A3A3AFFFF535353FFFF9D9D9D9D9D3A
-% 3A3A9D9D9D9D3A9D9D3A3A9D3A9D3A9D9D3A9D9D9D9D3A9D3A7F7F131313
-% 7F7F9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D3A9D3A9D9D3A3A9D9D9D9D
-% 9D9D9D3A9D9D3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A3A9D3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D3A3A3A9D3A9D3A9D3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D7F
-% 7F1313137F7F3A9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D3A9D
-% 9D9D9D3A9D9D9D9D9D3A9D3A3A9D3A3A9D3A3A3A3A000000000000210010
-% 101010C5101010101218181818181A181818181810121012101210121216
-% 181818101012081010101012181818181818181800FF121018121612100E
-% 0A081010101818181A18181A181818181818181812101018181818181818
-% 1810101813181618181210101010101010181816181810181216AF101010
-% FF7D00000000000000003A3A3A3A3A3A3A9DFFFFFF9D3A3A9D3A9D3A3A3A
-% 9D9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A9D7F7F7F9D
-% 3A9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A9D3A3A9D3A9D9D3A3A9D9D9D9D9D
-% 3A9D3A9D3A9D3A3A3A3A3A9D3A9D3A3A3A9D3A3A3A9D3A9D9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A9D3A3A9D3A3A9D9D9D9D3A9D9D9D9D
-% 9D9D9D3A3A9D3A9D9D3A9D3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 7F7F7F3A9D3A9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D3A9D9D3A3A9D3A3A9D
-% 9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021001010
-% 1010C5100E1010121018181818181A181818181012161210181012101210
-% 18121612100E0A081010101818181A18181A1800FF101210181818181010
-% 100A1010181818181818181818181A181818181010121012101818181810
-% 18121816181818181618101010101012181818181618121618AF121010FF
-% 7D00000000000000003A3A3A3A3A3A3A9D3A9DFF9D3A3A9D3A9D3A3A3A9D
-% 9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A9D7F9D9D9D3A
-% 9D9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F3A3A3A9D3A3A9D3A9D9D3A3A9D9D9D9D9D3A
-% 9D3A9D3A9D3A3A3A3A3A9D3A9D3A3A3A9D3A3A3A9D3A9D9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3AFF3A3A3A3A9D3A3A9D3A3A9D9D9D9D3A9D9D9D9D9D
-% 9D9D3A3A9D3A9D9D3A9D3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D
-% 3A7F3A9D3A9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D3A9D9D3A3A9D3A3A9D9D
-% 9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100101010
-% 10C510101010101212101818181818181818181810181112101610101210
-% 181818181010100A1010181818181818181800FF10101010121018181810
-% 10101218181818181818181818181A181818101210101010121012101018
-% 101818181818181818181818181010181218101212101218AF101810FF7D
-% 00000000000000003A3A3A3A3A3A3A3A9D3A9DFF9D9D9D9D9D3A3A3A9D9D
-% 9D3A9D9D9D9D3A3A3A9D9D3A9D3A9D9D9D9D9D9D9D3A9D7F3A9D9D9D9D3A
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A7F3A3A9D9D3A3A3A3A9D9D3A3A9D9D9D9D9D9D
-% 9D9D3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A9D3A3A3A3A9D3A3AFF3A9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D9D
-% 3A3A9D3A3A9D3A9D3A3A3A3A3A7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A9D9D3A
-% 3A3A3A3A9D9D9D9D9D9DFF3A3A9D3A9D9D3A9D3A3A3A3A3A3A9D3A3A3A3A
-% 9D3A9D3A9D3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D3A3A9D
-% 9D7F9D3A9D3A9D9D3A9D9D9D9D3A9D9D3A9D3A9D3A9D9D3A3A3A3A3A3A9D
-% 9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018101210
-% C51010101010101012181818181818181018101812181018121010101010
-% 121018181810101012181818181818181800FF1012101010101218181810
-% 121618181818181818181818181818181012101010101010101210121210
-% 1810181818181818181A18181812161216121010101012AF181012FF7D00
-% 000000000000003A9D3A3A3A3A3A9D3A9D9DFFFFFF9D3A9D3A3A9D9D9D9D
-% 9D9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F7F7F9D9D3A9D9D3A9D
-% 3A9D9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A9D3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A7F7F7F3A9D3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D
-% 3A9D3A9D3A9D3A9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A
-% 3A3A9D9D3A3A3A3AFFFFFF3A9D3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 3A9D3A3A9D3A9D9D3A3A7F7F7F3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A9D9D9D9D9D
-% 3A3A9D9D9D3A9DFFFFFF3A3A3A9D9D9D9D9D3A3A3A3A9D9D9D3A3A3A3A3A
-% 9D9D9D9D3A3A3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A9D3A3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D
-% 7F7F7F3A9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D3A3A9D9D3A3A3A9D
-% 9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010121010C5
-% 101010101012101012121818161210101212161216181818121012101010
-% 1012181818101216181818181818181800FF1810121010100E1816121810
-% 181618161818161818181818181818121012101010101218181812101012
-% 12161218161818181818181818181818181018121010AF101216FF7D0000
-% 0000000000003A9D3A3A3A3A3A9D3AFFFF535353FFFF9D3A3A9D9D9D9D9D
-% 9D3A9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D7F7F1313137F7F3A9D9D3A9D3A
-% 9D9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFFFF535353FFFF3A3A3A9D3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A7F7F1313137F7F3A3A9D3A9D9D9D3A9D9D9D9D9D9D9D3A
-% 9D3A9D3A9D3A9D9D3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A
-% 3A9D9D3A3AFFFF535353FFFF3A9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A
-% 9D3A3A9D3A9D9D7F7F1313137F7F3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D9D9D3A3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A3A9D9D9D9D9D3A
-% 3A9D9D9DFFFF535353FFFF3A9D9D9D9D9D3A3A3A3A9D9D9D3A3A3A3A3A9D
-% 9D9D9D3A3A3A3A3A9D9D9D9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A7F7F13
-% 13137F7F9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D9D9D3A3A9D9D3A3A3A9D9D
-% 9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210012161210C510
-% 101010101012101210121012101010101012181818181818181012101010
-% 0E181612181018161816181816181800FF181810100A100A101010101812
-% 121218181818181818181818181810101010101216181818181810121010
-% 12161218181210101018181818181818181818180AAF101216FF7D000000
-% 00000000003A3A3A9D3A3A3A9DFF53535353535353FF3A3A9D9D9D9D9D9D
-% 9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D7F131313131313137F9D9D9D3A9D3A
-% 9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F131313131313137F3A9D3A9D9D9D3A3A9D9D9D9D9D9D9D9D
-% 9D3A9D9D3A3A3A9D9D3A9D3A9D3A3A3A3A3A9D3A9D3A3A3A9D3A3A3A3A9D
-% 3A3A3AFF53535353535353FF3A3A9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D
-% 3A3A3A3A9D7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A9D3A3A
-% 3A3AFF53535353535353FF3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A3A9D3A3A3A3A9D9D3A3A3A9D3A3A9D9D3A3A3A3A3A3A9D3A3A
-% 3A3A9D3A3A3A9D3A9D3A9D9D3A3A3A9D3A9D9D3A3A9D9D9D9D7F13131313
-% 1313137F3A9D3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D9D9D9D9D9D3A3A9D9D
-% 9D9D9D3A9D3A3A9D3A3A3A3A3A3A3A000000000000210012161210C51010
-% 10101010101010101012101010101010121018181A181A181810100A100A
-% 101010101812121218181818181800FF181818101010100B101012101818
-% 181818181818181010181216121012101010101218181818181A18181216
-% 1218181210181818181818181816121816181818AF101210FF7D00000000
-% 000000003A3A3A3A3A3A3A3AFF53535353535353FF3A3A9D9D9D3A9D9D9D
-% 3A9D9D3A3A3A3A9D3A3A3A3A3A3A7F131313131313137F9D9D9D3A9D9D9D
-% 9D3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F131313131313137F3A3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A
-% 9D3A9D3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9DFF53535353535353FF3A3A9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D3A3A
-% 9D3A3A9D7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A
-% 3AFF53535353535353FF3A3A3A3A3A9D3A3A9D9D3A3A3A9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A
-% 3A9D3A3A3A9D9D3A3A3A9D9D3A3A3A3A9D3A3A9D9D3A9D9D7F1313131313
-% 13137F3A9D3A3A3A3A9D3A9D9D3A9D9D3A9D9D9D9D9D3A9D9D9D3A9D9D9D
-% 9D9D3A9D3A3A3A3A3A9D3A3A3A3A000000000000210012101818C5101216
-% 12181818181010121010121010101010121818181818181818101010100B
-% 1010121018181818181818181800FF181818101210101010101012101210
-% 181818181818181211181012101012101010101818181818181812101210
-% 18181012101218101818181818121012121018AF181012FF7D0000000000
-% 0000003A3A3A3A3A3A3AFF535353535353535353FF3A9D9D9D3A9D9D9D3A
-% 9D9D3A3A3A3A9D3A3A3A3A3A7F1313131313131313137F9D9D3A9D9D9D9D
-% 3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A7F1313131313131313137F3A9D3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D
-% 3A9D3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF535353535353535353FF3A9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D3A3A9D
-% 3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3AFF
-% 535353535353535353FF3A3A3A3A9D3A3A9D9D3A3A3A9D3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A
-% 9D3A3A3A9D9D3A3A3A9D9D3A3A3A3A9D3A3A9D9D3A9D7F13131313131313
-% 13137F9D3A3A3A3A9D3A9D9D3A9D9D3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D
-% 9D3A9D3A3A3A3A3A9D3A3A3A3A000000000000210010121612C518181818
-% 181818181218161812101010101010101012181818181818101210101010
-% 10101210121018181818181800FF16181216121012101010121010101018
-% 181818181818181812161216121012101218181818181A18181010101010
-% 101010101010121012101210101010101018AF121012FF7D000000000000
-% 00003A3A3A3A3A3A3AFF535353535353535353FF3A9D3A9D9D9D9D9D3A9D
-% 3A3A3A9D3A3A3A9D3A9D3A7F1313131313131313137F9D9D9D3A9D9D9D3A
-% 3A3A9D3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A9D3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A7F1313131313131313137F3A9D3A9D9D9D3A3A9D9D9D9D9D9D9D9D3A9D
-% 3A9D9D3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A3AFF
-% 535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D3A9D3A
-% 3A7F1313131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D9D3A3A3A9D3A3A3AFF53
-% 5353535353535353FF9D3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A9D9D3A3A3A9D3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A9D9D9D3A9D3A9D3A9D9D9D9D7F1313131313131313
-% 137F9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A9D3A9D9D9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010121018C51316181818
-% 181818181818181618181818101010101010181816181216121012101010
-% 121010101018181818181800FF1812161218101012101210101010101012
-% 18181818181818101812101210101217181A18181A181818181010101010
-% 1010101010101010101818121810101012AF121010FF7D00000000000000
-% 003A3A3A3A3A3A3AFF535353535353535353FF3A9D9D9D3A9D9D3A9D9D9D
-% 9D9D3A3A3A3A3A3A3A3A7F1313131313131313137F9D3A9D3A3A9D3A9D3A
-% 3A3A3A3A3A9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 7F1313131313131313137F3A9D3A9D3A3A9D9D3A3A9D9D9D9D9D9D9D9D3A
-% 9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3AFF53
-% 5353535353535353FF9D9D9D9D9D9D9D9D9D3A3A3A9D9D9D3A9D3A9D3A3A
-% 7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 9D9D9D3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A9D9D3A9D9D3A3A3AFF5353
-% 53535353535353FF9D9D9D3A3A3A9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D
-% 3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D9D3A3A3A3A3A3A9D3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A3A3A9D3A9D3A9D3A3A3A9D3A9D7F131313131313131313
-% 7F9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A3A9D9D9D9D9D3A
-% 9D3A3A3A3A3A9D3A3A3A3A000000000000210010101216C5181818181818
-% 18181A181818121818181818121010101012181812161218101012101210
-% 1010101010121818181800FF101018111818181818181818181818181818
-% 1818181818181818111810101218181818181A181A181818161010101010
-% 10101010101010181718181816121010AF101210FF7D0000000000000000
-% 3A3A3A3A3A3A3A9DFF53535353535353FF3A3A9D9D9D3A9D9D3A9D9D9D9D
-% 9D3A3A3A3A3A3A3A3A9D7F131313131313137F9D9D3A9D3A3A9D3A9D3A3A
-% 3A3A3A3A9D3A9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9DFF53535353535353FF3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 7F131313131313137F3A3A9D3A9D3A3A9D9D3A3A9D9D9D9D9D9D9D9D3A9D
-% 3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF53
-% 535353535353FF9D9D9D9D9D9D9D9D9D9D3A3A3A9D9D9D3A9D3A9D3A3A3A
-% 7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 9D9D3A3A9D3A3A3A3A3A3A9D9D3A3A3A3A3A9D9D3A9D9D3A3A3A9DFF5353
-% 5353535353FF3A9D9D9D3A3A3A9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A9D3A
-% 3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D9D3A3A3A3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A9D3A9D3A9D3A3A3A9D3A9D3A7F131313131313137F9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D3A3A9D9D9D9D9D3A9D
-% 3A3A3A3A3A9D3A3A3A3A000000000000210012101210C516181818181818
-% 181818181010121018181818181818101012101018111818181818181818
-% 18181818181818181800FF121810181018181018181818181A1818181818
-% 181A18181818161818131810181818181A18181818181818181012101010
-% 101010101010181818181818181810AF161816FF7D00000000000000003A
-% 3A3A3A3A3A3A3AFF53535353535353FF3A3A9D9D9D9D3A9D3A9D9D9D3A9D
-% 9D9D3A3A3A3A3A3A3A7F131313131313137F3A3A9D3A3A9D9D9D9D3A9D3A
-% 9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3AFF53535353535353FF9D3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F
-% 131313131313137F3A3A3A3A9D3A9D9D9D3A3A9D9D9D9D9D9D9D9D9D3A9D
-% 9D9D3A3A3A9D9D3A9D3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3AFF5353
-% 5353535353FF9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D3A3A9D3A9D3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A
-% 9D3A3A3A3A9D3A3A3A3A9D9D3A3A3A3A3A3A9D9D9D9D3A3A3A3AFF535353
-% 53535353FF3A3A3A9D9D3A3A3A3A9D9D9D3A3A9D3A3A9D9D9D9D9D9D3A3A
-% 3A3A9D9D9D3A3A3A3A3A9D9D9D9D3A3A3A3A3A3A3A9D3A9D9D9D3A3A9D3A
-% 3A3A3A9D3A3A3A9D3A9D9D3A9D9D3A9D3A9D3A7F131313131313137F9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D3A9D3A3A9D9D3A9D9D3A9D3A
-% 3A3A3A3A3A3A3A3A3A000000000000210018161216C51812181618181618
-% 18121012101012101818181A181810101012181018101818101818181818
-% 1A1818181818181A00FF1810121812161218101818181818181818181A18
-% 181818181818181810181018181818181818181818181818101810121010
-% 1010101010121210121818181810AF181818FF7D00000000000000003A3A
-% 3A3A3A3A3A9D3AFFFF535353FFFF9D3A3A9D3A3A9D9D9D9D9D9D9D9D3A3A
-% 3A9D3A3A9D3A3A3A3A7F7F1313137F7F9D9D9D3A3A9D3A9D3A9D3A3A3A3A
-% 9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A7F
-% 7F1313137F7F3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A
-% 3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D3A3A3A9DFFFF53
-% 5353FFFF9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D3A3A3A3A9D3A7F
-% 7F1313137F7F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A9D3A3A3A3A3AFFFF5353
-% 53FFFF3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A
-% 9D3A3A3A9D3A3A9D3A9D3A3A9D3A3A9D3A9D9D7F7F1313137F7F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D3A3A9D9D9D9D9D9D3A9D3A3A
-% 9D3A3A3A3A3A3A3A000000000000210018181812C5101210181218181810
-% 101810181010121218181818181810121810121812161218101818181818
-% 181818181A181800FF17181612161012161210181818181818181A181818
-% 18181818181818181018181818181A181818101812181810121018101210
-% 12101010101010101012181812AF181818FF7D00000000000000003A3A3A
-% 3A3A3A3A9D3A9D9DFFFFFF9D3A9D3A3A9D3A3A9D9D9D9D9D9D9D9D3A3A3A
-% 9D3A3A9D3A3A3A3A3A9D7F7F7F9D9D9D9D9D3A3A9D3A9D3A9D3A3A3A3A9D
-% 9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3AFFFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A
-% 7F7F7F7F3A3A3A3A3A3A9D9D9D3A9D9D9D3A9D9D9D9D9D9D9D9D9D9D3A3A
-% 9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3AFFFF
-% FF9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D3A3A3A3A9D3A9D7F
-% 7F7F7F9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A9DFFFFFF
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A9D
-% 3A3A3A9D3A3A9D3A9D3A3A9D3A3A9D3A9D9D9D9D7F7F7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D9D3A3A9D9D9D9D9D9D3A9D3A3A9D
-% 3A3A3A3A3A3A3A000000000000210018181816C510121012101216121818
-% 181818181010101012101818161818171816121610121612101818181818
-% 18181A18181800FF18181818121010101010121618181818181818181A18
-% 18181A181818181818181818181818181818181010101012101818181010
-% 101010101010101010181810AF181018FF7D00000000000000003A3A3A3A
-% 3A9D3A9D3A3A9D9D3AFF9D9D3A3A3A9D3A3A9D9D9D3A9D3A9D3A9D9D3A3A
-% 3A3A3A3A3A3A3A3A7F9D9D9D3A9D9D9D3A9D3A9D9D3A9D9D9D3A9D3A9D3A
-% 9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D3A7F9D3A3A3A3A3A9D3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D3A9D
-% 9D3A3A9D3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFF
-% 9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D3A9D3A3A9D3A9D7F3A
-% 9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9DFF3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A
-% 3A3A3A3A3A3A9D9D3A9D3A3A3A9D3A9D3A9D3A9D9D7F3A3A3A3A9D3A9D9D
-% 3A9D3A9D3A3A3A9D9D9D9D3A3A9D9D9D3A3A9D3A9D9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A000000000000210010181318C51010101012101210101210
-% 181818181818121012101018181818181818121010101010121618181818
-% 181818181A00FF1012181010101010101010101218181818181818181818
-% 1A181A181818181818181818181818181818101210101010181210181012
-% 1010101010121012181818AF181618FF7D00000000000000003A3A9D3A3A
-% 3A3A9D3A9D9D3A9D9DFFFFFF3A3A9D9D9D3A9D9D3A9D9D9D9D9D9D3A3A3A
-% 3A3A3A9D3A7F7F7F9D9D9D3A9D3A3A9D3A9D3A9D9D3A9D9D3A3A9D3A9D9D
-% 3A9D9D9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3AFFFFFFFF3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3A7F7F7F7F3A9D3A9D9D3A3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D3A9D3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9DFF
-% FFFF9D9D9D9D9D9D9D3A3A9D9D3A3A9D9D9D9D9D3A9D3A3A7F7F7F7F3A9D
-% 9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A3A9D9D3A3A9D3A3A3A3A9D3A9D9D9D3A3A3A3AFFFFFF3A3A3A3A3A
-% 3A9D3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A9D3A
-% 3A9D9D3A9D3A9D9D3A9D9D3A3A9D9D9D3A9D9D3A9D7F7F7F3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D9D3A9D9D3A9D9D3A9D9D9D3A9D9D9D3A9D3A3A3A3A3A
-% 3A3A3A3A3A000000000000210016181618C5121012101012101012101210
-% 121818181818101012121218121012181010101010101010101218181818
-% 1818181800FF1210101010100810101010101010101218161818181A181A
-% 181818181817181818181818181818181818101010101010101210121010
-% 18101010101012181818AF181818FF7D00000000000000003A3A9D3A3A3A
-% 3A9D3A9D9D3AFFFF535353FFFF9D9D9D3A9D9D3A9D9D9D9D9D9D3A3A3A3A
-% 3A3A7F7F1313137F7F9D3A9D3A3A9D3A9D3A9D9D3A9D9D3A3A9D3A9D9D3A
-% 9D9D9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF
-% FF535353FFFF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D7F
-% 7F1313137F7F3A9D9D3A3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D3A9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFFFF5353
-% 53FFFF9D9D9D9D9D3A3A9D9D3A3A9D9D9D9D9D3A9D7F7F1313137F7F9D9D
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D3A3A3A3A3A
-% 3A3A3A9D9D3A3A9D3A3A3A3A9D3A9D9D9D3A3AFFFF535353FFFF3A3A3A3A
-% 9D3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A
-% 9D3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A9D3A9D3A3A
-% 9D9D3A9D3A9D9D3A9D9D3A3A9D9D9D3A9D9D7F7F1313137F7F3A3A3A3A3A
-% 3A3A3A9D3A3A9D9D3A9D9D3A9D9D3A9D9D9D3A9D9D9D3A9D3A3A3A3A3A3A
-% 3A3A3A3A000000000000210018181818C518181810181010121010121010
-% 101210181818181810101010121010101010081010101010101010121816
-% 18181800FF101012101010100A0F0A10101010101010121618181820181A
-% 181818181818121618181818181818181812101010101010101010181818
-% 181712101816181818AF181818FF7D00000000000000003A3A3A3A3A3A3A
-% 9D3A9D9DFF53535353535353FF9D9D3A9D9D9D9D9D3A9D9D3A3A9D3A3A3A
-% 7F131313131313137F9D3A3A9D9D9D9D3A9D9D3A9D9D3A3A9D3A3A9D9D3A
-% 9D9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF5353
-% 5353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F1313
-% 13131313137F9D3A9D9D9D3A9D9D9D3A3A3A9D9D9D9D9D9D9D9D3A9D9D3A
-% 3A3A3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A3A9D3A3A3AFF5353535353
-% 5353FF9D9D9D9D3A3A9D9D9D9D9D9D3A9D9D3A7F131313131313137F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D3A3A3A3A3A
-% 3A3A9D9D9D9D3A3A3A9D3A9D9D9D9D9D3AFF53535353535353FF3A9D3A3A
-% 9D9D9D3A3A3A9D3A9D9D9D9D3A3A3A9D9D9D3A9D9D9D3A3A3A9D9D9D9D9D
-% 3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A9D3A9D9D9D9D3A9D3A3A9D3A9D9D3A7F131313131313137F3A3A3A3A3A
-% 9D3A9D9D9D9D3A9D9D9D9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A3A3A3A9D3A
-% 3A3A3A000000000000210018181818C5C5C5C5C5C5C51210101210121012
-% 1010121018161816121010101012101010100A0F0A101010101010101216
-% 181800FF10121010101010100A1010080A10081010101818181A18181818
-% 181818101810181217181818181818181010101010101010101218181818
-% 1818181818181818AF181818FF7D00000000000000003A3A3A3A3A3A3A9D
-% 3A9D9DFF53535353535353FF9D3A3A3A9D9D3A3A9D3A9D9D3A3A3A3A3A7F
-% 131313131313137F9D9D9D9D9D9D9D3A9D3A9D9D9D3A3A9D9D3A3A3A9D3A
-% 9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3AFF535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313
-% 131313137F9D9D3A9D3A9D3A9D9D3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D3A
-% 9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9DFF535353535353
-% 53FF9D9D3A3A3A9D9D9D3A9D3A9D9D9D9D3A7F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A9D9D3A3A9D
-% 9D3A9D3A9D9D3A9D9D3A9D9D3A9D3A7F131313131313137F3A3A9D3A3A9D
-% 3A9D9D3A9D9D3A9D3A9D3A3A9D9D9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A000000000000210018181816C5181818181612161012101010101010
-% 1010101218181818181810121010101010100A1010080A10081010101818
-% 1800FF18121612181818101010101008100810101012181818181A181818
-% 18181810121010181812181812161216121010100A101010121818181818
-% 18181818181A18AF181818FF7D00000000000000003A3A3A3A3A3A3A9D3A
-% 9DFF535353535353535353FF3A3A3A9D9D3A3A9D3A9D9D3A3A3A3A7F1313
-% 131313131313137F9D9D9D9D9D9D3A9D3A9D9D9D3A3A9D9D3A3A3A9D3A9D
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3AFF5353535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F9D3A9D3A9D3A9D9D3A9D3A3A3A9D9D9D9D9D9D9D9D3A9D3A9D
-% 9D9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3AFF5353535353535353
-% 53FF9D3A3A3A9D9D9D3A9D3A9D9D9D9D7F1313131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A9D9D3A3A9D9D
-% 3A9D3A9D9D3A9D9D3A9D9D3A9D7F1313131313131313137F3A9D3A3A9D3A
-% 9D9D3A9D9D3A9D3A9D3A3A9D9D9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A000000000000210018181812C518181818181210121018101812121612
-% 101010181818181818181216121818181010101010081008101010121818
-% 00FF18161210181618101210101010080A10101010101818181818181817
-% 121012161218101210101010121018121012101010101012181818181A18
-% 181818181818AF181818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D
-% FF535353535353535353FF3A9D3A9D9D9D9D3A9D9D9D3A9D3A3A7F131313
-% 1313131313137F9D3A9D3A3A3A3A9D3A9D3A9D9D3A9D3A3A9D9D9D9D9D3A
-% 3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A7F131313131313
-% 1313137F9D3A9D9D3A9D3A9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D3A9D3A3A
-% 3A3A9D3A9D3A3A3A3A9D3A3A3A9D3A3A3A3A9D9DFF535353535353535353
-% FF3A3A3A3A9D9D3A9D9D9D9D3A9D9D7F1313131313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3AFF535353535353535353FF3A3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D9D
-% 3A9D9D9D9D9D9D3A9D9D9D9D7F1313131313131313137F3A3A3A3A3A3A9D
-% 9D3A3A9D9D9D9D9D3A3A9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 000000000000210018181010C51818171818101810181018181818181818
-% 181210121218161818161210181618101210101010080A10101010101800
-% FF1012101012181818181012101010101010101218181818181818181812
-% 10121812101210121012101018121612101010101010101818181A181A18
-% 181A181A18AF181810FF7D00000000000000003A3A3A3A3A3A3A9D3A9DFF
-% 535353535353535353FF3A3A3A9D9D9D9D3A3A3A9D3A3A3A3A7F13131313
-% 13131313137F9D9D3A9D9D9D3A9D3A9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A
-% 3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3AFF53535353535353
-% 5353FF9D3A9D3A3A9D9D3A3A3A3A9D9D3A3A9D3A3A9D9D3A3A9D9D3A3A9D
-% 9D3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 13137F3A3A9D9D3A9D3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9DFF535353535353535353FF
-% 3A9D9D9D9D3A9D9D3A9D9D3A3A9D7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A9D9D
-% 9D3A9D9D9D9D3A9D9D9D9D7F1313131313131313137F3A3A9D3A9D3A9D3A
-% 3A9D9D9D9D9D9D3A3A9D9D9D9D9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A00
-% 0000000000210018101210C510181218101218181818181818181A181818
-% 1812101010121810121010121818181810121010101010101012181800FF
-% 181012101210101012101210100A08101010101012101218101810121010
-% 101010181818AFAFAFAFAFAF101210121810181012121818181A18181818
-% 18181818AF181010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9DFF
-% 53535353535353FF9D3A3A3A9D9D9D9D3A3A3A9D3A3A3A3A3A7F13131313
-% 1313137F3A9D9D3A9D9D9D3A9D3A9D9D9D3A3A9D3A9D3A3A9D3A9D9D3A3A
-% 3A3A3A3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A3A3A9DFF53535353535353
-% FF3A9D3A9D3A3A9D9D3A3A3A3A9D9D3A3A9D3A3A9D9D3A3A9D9D3A3A9D9D
-% 3A3A9D3A3A3A9D3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F9D3A3A9D9D3A9D3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9DFF53535353535353FF3A3A
-% 9D9D9D9D3A9D9D3A9D9D3A3A9D3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A9D9D9D
-% 3A9D9D9D9D3A9D9D9D9D9D7F131313131313137F3A3A3A9D3A9D3A9D3A3A
-% 9D9D9D9D9D9D3A3A9D9D9D9D9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A0000
-% 00000000210010101010C510101010121010101012101818181818181818
-% 181818181018181012101210101012101210100A0810101010101200FF18
-% 181810101010121012161010101010101010101010121012121010101010
-% 10101818AFAFAFAFAFAFAFAF101012101816121816181818181818181818
-% 181818AF181010FF7D00000000000000003A3A3A3A9D3A3A3A3A9D9DFF53
-% 535353535353FF3A3A3A9D9D9D9D9D3A9D9D9D3A3A3A3A3A7F1313131313
-% 13137F9D9D9D9D9D9D9D3A3A9D3A9D9D3A9D3A3A3A3A9D9D9D9D3A3A3A9D
-% 9D9D3A9D3A9D9D9D3A3A3A3A3A9D3A3A9D3A9D3A9DFF53535353535353FF
-% 3A3A9D3A3A3A9D3A9D3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 3A9D9D3A3A3A9D9D3A9D3A3A9D9D3A3A9D3A9D3A9D3A3A9D3A3A3A9D3A9D
-% 3A9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F
-% 9D9D3A9D9D9D9D9D9D3A9D9D9D3A9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D3A9D3A3A9D9D9D9D9D9D9D9D9DFF53535353535353FF9D9D3A
-% 9D3A9D3A9D9D9D3A9D3A9D3A9D7F131313131313137F3A3A3A3A3A9D3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3AFF53535353535353FF3A3A3A3A9D3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D
-% 9D9D9D9D3A9D9D3A9D9D7F131313131313137F9D3A3A3A3A3A9D9D9D3A9D
-% 9D9D3A9D3A3A3A9D3A9D3A9D9D9D9D3A9D3A3A3A9D3A3A3A3A3A3A000000
-% 000000210010101010C51010101012101210121018181718181618181818
-% 181818181818181810101010121012161010101010101010101000FF1818
-% 171818181810101210121010101010101010101010101010101010081010
-% 101218AF181818181810AF10101010181212161818181A16181818181618
-% 1818AF101210FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3AFFFF
-% 535353FFFF9D3A3A9D9D9D9D9D9D9D3A9D9D3A9D3A3A9D3A7F7F1313137F
-% 7F9D3A9D9D9D9D3A9D3A9D3A9D9D9D9D3A9D9D3A3A9D3A9D3A3A9D9D9D9D
-% 3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A9D9D9D3A3A3AFFFF535353FFFF3A3A
-% 3A9D3A3A3A9D9D9D3A9D3A9D9D9D3A9D3A3A9D9D3A3A9D9D9D9D3A3A9D3A
-% 9D3A3A3A9D3A9D3A3A3A3A9D3A3A9D9D3A9D3A9D3A3A3A9D9D9D9D3A9D3A
-% 9D9D3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D7F7F1313137F7F9D9D
-% 3A3A9D9D9D9D3A3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFF535353FFFF9D3A9D9D9D
-% 9D3A9D9D3A9D3A9D3A9D3A3A9D7F7F1313137F7F9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A9D3A3AFFFF535353FFFF3A9D3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A9D9D
-% 3A9D9D3A9D9D9D9D9D3A7F7F1313137F7F3A3A3A9D3A3A9D3A9D9D3A9D9D
-% 9D9D9D3A3A9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000
-% 0000210012101010C5101210181818101810181018121818181818181818
-% 1818181818181718181818101012101210101010101010101000FF121818
-% 18181818101210181018181612181818121010101210101010100A081010
-% 1818AF181818181818AF1010101012101012121818181818161818181818
-% 16AF101010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3A9D9DFF
-% FFFFFF3A9D3A3A9D9D9D9D9D9D9D3A9D9D3A9D3A3A9D3A3A3A7F7F7F9D9D
-% 9D3A9D9D9D9D3A9D3A9D3A9D9D9D9D3A9D9D3A3A9D3A9D3A3A9D9D9D9D3A
-% 9D3A9D3A9D3A3A3A3A3A3A3A3A3A9D9D9D3A3A3A9D9DFFFFFF3A9D3A3A3A
-% 9D3A3A3A9D9D9D3A9D3A9D9D9D3A9D3A3A9D9D3A3A9D9D9D9D3A3A9D3A9D
-% 3A3A3A9D3A9D3A3A3A3A9D3A3A9D9D3A9D3A9D3A3A3A9D9D9D9D3A9D3A9D
-% 9D3A9D3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D9D7F7F7F3A3A9D9D3A
-% 3A9D9D9D9D3A3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFFFF3A3A9D3A9D9D9D9D
-% 3A9D9D3A9D3A9D3A9D3A3A9D9D9D7F7F7F9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A9D3A3A3A3AFFFFFF3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A9D9D3A
-% 9D9D3A9D9D9D9D9D3A9D9D7F7F7F3A3A3A3A3A9D3A3A9D3A9D9D3A9D9D9D
-% 9D9D3A3A9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000
-% 00210010101010C512161818181818181210121012101810181818181818
-% 18181812181818181818101210181018181612181818121000FF10121012
-% 101212101012121618181818181818181818101818131610101010101210
-% 18AFAFAFAFAFAFAFAF101010101010101010121018181818181818181818
-% AF121010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3A9D9D3A3A
-% 3AFF9D3A9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A7F3A3A9D9D9D3A
-% 9D9D9D3A9D9D9D3A9D3A9D3A9D3A9D3A3A3A9D9D9D9D9D9D3A3A9D3A9D9D
-% 9D9D9D9D3A3A9D3A3A3A3A3A3A9D9D3A9D9D3A9DFF3A9D3A3A3A9D3A3A9D
-% 3A3A3A9D9D9D3A9D3A9D9D9D9D9D9D3A9D9D3A3A9D9D9D9D9D3A3A3A9D9D
-% 3A3A9D9D9D9D9D3A3A9D9D3A9D3A3A9D9D9D3A3A3A9D9D3A9D3A9D9D3A9D
-% 3A9D3A9D9D9D9D3A3A3A3A9D3A3A9D3A3A3A9D9D3A9D3A7F9D9D9D3A9D3A
-% 9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3AFF9D3A9D9D9D9D3A3A9D
-% 9D9D9D9D9D9D3A3A9D9D9D9D7F9D9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D3A9D9D9D3A9D3A
-% 9D3A3A9D9D9D3A9D9D9D3A9D7F3A3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D9D
-% 9D3A3A9D9D9D3A3A9D3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A000000000000
-% 210010101010C518181818181A1818181010101010121012101812161818
-% 181010121012101212101012121618181818181818181800FF1210101210
-% 101010181010121818181818181A181A1818181718181218181810101810
-% 18AFAFAFAFAFAF12101018181010101010101212181818181818181818AF
-% 101210FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3A3A
-% FFFFFFFF9D3A9D3A9D3A9D9D9D9D9D3A3A3A3A3A7F7F7F3A3A9D9D9D9D3A
-% 9D9D9D9D9D9D3A9D3A9D9D9D9D3A3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D9D
-% 3A9D9D3A3A3A3A3A3A3A3A3A3A3A3A9D3AFFFFFF3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A9D3A3A9D3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D9D9D7F7F7F3A3A3A9D
-% 9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3A9D9DFFFFFF9D9D9D3A3A3A9D
-% 9D9D9D9D3A3A9D3A3A7F7F7F9D9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A9D9D9D3A9D9D9D9D
-% 3A3A9D9D9D9D9D3A9D9D9D9D7F7F7F3A3A3A3A3A3A9D9D3A3A9D3A9D9D9D
-% 3A3A9D3A3A9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021
-% 0012101010C51818181A1818181818121010101010121010101012101818
-% 101210101210101010181010121818181818181A181A00FF181812101012
-% 1012121012101018181618181A1818181818181818171818181612121012
-% 101010181810101212181018181010101210101818181A1818181818AF16
-% 1210FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D9D9D3AFFFF
-% 535353FFFF9D3A9D3A9D9D9D9D9D3A3A3A7F7F1313137F7F9D9D9D9D3A9D
-% 9D9D9D9D9D3A9D3A9D9D9D9D3A3A9D3A9D3A3A9D3A3A3A9D3A9D3A9D9D3A
-% 9D9D3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A3A3A3A9D3A9D3A3A3A9D3A3A9D3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D7F7F1313137F7F3A9D9D
-% 9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A3AFFFF535353FFFF9D3A3A3A9D9D
-% 9D9D9D3A3A9D7F7F1313137F7F3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A9D9D3A9D9D9D3A9D9D9D9D3A
-% 3A9D9D9D9D9D3A9D9D7F7F1313137F7F3A3A3A3A9D9D3A3A9D3A9D9D9D3A
-% 3A9D3A3A9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100
-% 12101212C518181818181A18181810100B0E10101010100E101010121818
-% 1818121010121012121012101018181618181A181800FF18181818121010
-% 181010101012181810101818181818121012101818181818181810101010
-% 101018181012101010181818181816121612181818181818181818AF1810
-% 18FF7D00000000000000003A3A3A3A3A3A3A3A3A9D9D3A9D9D3AFF535353
-% 53535353FF3A9D9D3A9D9D3A9D3A9D7F131313131313137F9D9D9D3A9D9D
-% 9D3A9D9D3A3A9D3A9D9D3A9D9D3A9D9D9D9D3A9D3A3A3A3A9D9D9D3A9D9D
-% 3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A7F131313131313137F3A3A3A
-% 3A3A9D3A9D9D3A3A9D3A9D3A9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D3A3A3A9DFF53535353535353FF9D9D3A9D3A9D
-% 3A9D9D9D7F131313131313137F9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A
-% 3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A9D3A9D3A9D3A9D3A9D9D3A9D9D9D3A9D9D3A3A
-% 9D9D9D3A3A9D9D7F131313131313137F3A3A9D3A9D9D3A9D3A9D9D9D3A3A
-% 9D9D9D9D9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210010
-% 181316C5181818181A181A181812101010101010100A100A101012161818
-% 181818121010181010101012181810101818181800FF1618181818181018
-% 18181012101010181816181818161810101018131618181A181818121010
-% 1018101812101818131818181818181818181818181818181818AF181012
-% FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A3A9DFF53535353
-% 535353FF3A3A9D9D3A9D9D9D3A3A7F131313131313137F9D9D9D3A9D9D9D
-% 3A9D3A3A9D3A3A9D9D9D3A3A9D9D3A3A3A9D3A3A9D3A9D9D9D3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D7F131313131313137F3A3A9D3A
-% 3A9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A3A3A9D9D9DFF53535353535353FF9D9D9D3A9D3A3A
-% 9D9D9D7F131313131313137F9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D3A3A3A
-% 9D9D9D9D3A9D7F131313131313137F3A3A3A3A9D9D3A9D3A9D9D9D3A9D9D
-% 3A9D3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A00000000000021001012
-% 1618C518181A181A181818181818181810100A1010101010101012181618
-% 1818181810181818101210101018181618181800FF121818181818181818
-% 171210101010121012181018121818181812161812161818181818101810
-% 1210121618181018181818181818181818181818181A181818AF181818FF
-% 7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A3AFF535353535353
-% 535353FF3A9D9D3A9D9D9D3A7F1313131313131313137F9D9D3A9D9D9D3A
-% 9D3A3A9D3A3A9D9D9D3A3A9D9D3A3A3A9D3A3A9D3A9D9D9D3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D7F1313131313131313137F3A9D3A3A
-% 9D9D9D9D9D3A9D9D9D3A9D9D9D9D9D9D3A3A3A9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A3A3A9D9DFF535353535353535353FF9D9D3A9D3A3A9D
-% 9D7F1313131313131313137F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF
-% 535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A9D9D9D9D9D9D9D9D9D9D3A3A3A9D
-% 9D9D9D3A7F1313131313131313137F3A3A3A9D9D3A9D3A9D9D9D3A9D9D3A
-% 9D3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A0000000000002100181818
-% 18C518181818181818181216181812101010121010101010101012121818
-% 18181818181817121010101012101218101800FF10121612181610181818
-% 121612101012101210121618181818181818121018101216181618181810
-% 18AFAF101210181618181818AFAFAFAFAFAFAFAFAFAFAFAFAF181818FF7D
-% 00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D9DFF53535353535353
-% 5353FF9D3A9D3A3A3A9D3A7F1313131313131313137F3A3A3A9D9D3A9D3A
-% 9D3A9D3A9D3A9D9D9D9D3A9D9D3A3A3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF535353535353535353FF9D3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A9D3A3A9D9D3A9D3A9D3A9D3A3A9D3A3A3A9D9D3A3A3A9D9D3A9D3A
-% 9D9D3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A9D9D9D3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3AFF535353535353535353FF3A9D3A9D3A9D3A3A
-% 7F1313131313131313137F9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFF53
-% 5353535353535353FF3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A9D9D3A9D3A9D9D3A3A9D9D3A3A3A3A9D9D
-% 3A9D3A7F1313131313131313137F3A3A9D9D3A3A3A9D3A9D3A9D3A9D9D3A
-% 9D9D3A9D9D9D3A9D3A9D3A9D3A3A3A3A3A3A000000000000210018181818
-% C51018181818181812101012161818121018101010101010101010121612
-% 181610181818121612101012101210121600FF1010121012181218161810
-% 121012101010101010121216181818161810181010121012181818181612
-% AFAF1012101212101818181818181818181A18181A1E18AF181818FF7D00
-% 000000000000003A3A3A3A3A3A3A9D3A9D9D3A9D9DFF5353535353535353
-% 53FF3A9D3A3A9D3A9D3A7F1313131313131313137F9D3A9D3A9D3A9D3A9D
-% 3A9D3A3A9D9D3A3A9D9D9D9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A9D3A3A
-% 3A3A3A3A3A3A3AFF535353535353535353FF3A9D9D3A9D3A9D9D3A3A3A9D
-% 9D3A3A3A3A9D3A3A9D3A3A3A9D3A9D9D3A3A3A9D3A3A9D3A3A9D9D9D9D3A
-% 9D3A3A3A3A3A3A9D3A9D9D9D3A9D3A9D3A3A9D9D9D3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A9D7F1313131313131313137F3A9D9D9D9D3A
-% 9D3A9D3A3A3A9D3A3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A7F
-% 1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9DFF5353
-% 53535353535353FF3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D3A9D9D9D3A9D3A9D9D9D3A3A9D9D9D
-% 3A9D7F1313131313131313137F3A9D9D9D9D3A3A9D9D9D9D3A9D9D3A3A9D
-% 9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181818C5
-% 181818181818181810101210181216181810121010121010101010121012
-% 1812181618101210121010101010101200FF101010101012161218101812
-% 161210101012101210101210181218181818181810181810121210121810
-% 1210101010101210121818181818181818181A181A18AF181818FF7D0000
-% 0000000000003A3A3A3A3A3A3A9D3A9D9D3A9D9D9DFF53535353535353FF
-% 9D3A9D3A3A9D3A9D3A9D7F131313131313137F9D9D3A9D3A9D3A9D3A9D3A
-% 9D3A3A9D9D3A3A9D9D9D9D3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3AFF53535353535353FF3A3A9D9D3A9D3A9D9D3A3A3A9D9D
-% 3A3A3A3A9D3A3A9D3A3A3A9D3A9D9D3A3A3A9D3A3A9D3A3A9D9D9D9D3A9D
-% 3A3A3A3A3A3A9D3A9D9D9D3A9D3A9D3A3A9D9D9D3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A9D3A7F131313131313137F9D3A9D9D9D9D3A9D
-% 3A9D3A3A3A9D3A3A3A3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A7F
-% 131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF5353
-% 5353535353FF3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D9D9D3A9D9D3A9D9D9D3A9D3A9D9D9D3A3A9D9D9D3A
-% 9D3A7F131313131313137F3A3A9D9D9D9D3A3A9D9D9D9D3A9D9D3A3A9D9D
-% 9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181818C518
-% 18181A181818181010121012101210121810121010101210101010101012
-% 16121810181216121010101210121000FF10101012181818161818181018
-% 161810101010101012101210101218161818181818101210101018161210
-% 121010101010101210121612181818181A18201E1AAF1A1818FF7D000000
-% 00000000003A3A3A3A3A3A3A9D3A9D9D9D3A3A9DFF53535353535353FF9D
-% 3A9D9D9D3A9D3A3A3A7F131313131313137F9D9D9D9D9D9D3A3A9D9D3A9D
-% 3A9D3A3A9D9D9D9D9D3A3A9D9D9D3A9D3A3A9D3A9D9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF53535353535353FF9D3A3A9D3A9D3A9D3A3A3A3A3A3A3A
-% 9D9D3A9D9D9D9D9D3A3A9D9D9D9D9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A
-% 3A3A9D9D3A9D3A3A9D9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A9D3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3AFF53535353535353FF3A3A3A3A3A3A9D3A3A3A7F13
-% 1313131313137F3A9D3A3A9D3A3A3A3A9D3A3A9D3A3A9D3A3A3A9D3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D9D9D3A9D3A9D9D3A9D9D3A9D3A9D9D9D3A3A3A3A9D9D3A9D3A
-% 9D7F131313131313137F3A3A3A3A9D3A9D3A9D3A9D3A9D3A9D9D9D3A9D9D
-% 3A9D9D3A9D3A9D3A3A3A3A3A3A3A3A000000000000210018181818C51818
-% 181818181818181812101010101018101818181812101010101012181818
-% 161818181018161810101010101000FF1810121018181818121810181818
-% 181810121012101010101012101012121018181018101010101812101010
-% 10101010101010101010101818181818181A181AAF181818FF7D00000000
-% 000000003A3A3A3A3A3A3A9D3A9D9D9D9D9D3A3AFFFF535353FFFF9D9D9D
-% 9D3A9D3A9D9D3A9D3A7F7F1313137F7F9D9D9D9D3A9D9D3A9D3A3A3A3A3A
-% 9D9D9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A9D3A3A9D3A3A3A3A3A3A3A7F7F
-% 1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFFFF5353
-% 53FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D9D3A9D9D9D3A3A3A9D9D9D3A9D9D
-% 9D7F7F1313137F7F3A3A3A3A9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D3A9D9D
-% 9D9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181816C5181818
-% 181818181818121010101010101012101818181818181810121018181818
-% 1218101818181818101210121000FF1A1818181618181816181818181618
-% 181818101010101012121012101010101218101210121010181016121010
-% 10101010101010101010101818181818181820AF1A1818FF7D0000000000
-% 0000003A3A3A3A3A3A3A9D3A9D9D9D9D9D3A3A3A9DFFFFFF3A9D9D9D9D9D
-% 3A9D3A9D9D3A9D3A3A3A7F7F7F3A3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A9D
-% 9D9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A7F
-% 7F7F3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3AFFFFFFFF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A9D9D3A9D3A9D3A3A9D3A3A9D3A9D9D3A9D9D9D3A3A3A9D9D9D3A9D9D9D
-% 9D3A7F7F7F3A3A3A3A3A3A9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D3A9D9D9D
-% 9D3A9D3A3A3A3A3A3A3A3A3A3A000000000000210018181812C512101818
-% 1810121612161010101010121010181818181818181A1818181618181816
-% 18181818161818181810101000FF181818181A1818181810181018181816
-% 18121612101810101012101010101010101210121618181218AF18181810
-% 10101010101010101010121018181A202118AF181818FF7D000000000000
-% 00003A3A3A3A3A3A3A9D3A9D9D9D3A9D9D3A3A3A3A9DFF3A9D9D3A9D9D9D
-% 9D9D9D9D3A3A3A3A7F3A3A3A3A3A9D9D9D9D3A9D9D9D9D9D3A3A9D3A9D9D
-% 3A9D9D3A3A3A9D3A3A9D3A9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3AFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A9D3A3A7F3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3AFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D9D
-% 9D3A9D9D9D9D3A3A3A9D9D9D3A9D9D3A9D9D9D3A3A9D9D9D9D3A9D9D3A9D
-% 9D3A3A7F3A3A3A3A3A9D3A9D9D3A9D9D3A9D3A3A3A9D9D9D9D9D3A9D9D9D
-% 3A9D3A3A3A9D3A3A3A3A3A3A000000000000210018181016C51012101012
-% 10181018181310100A08081010101216181A1818181818181A1818181810
-% 181018181816181216121000FF1818181818181A18101812121212181818
-% 181012101210101216181818181210121018AFAFAFAF161218AF18181818
-% 1010101010101010101012181818201A18AF181212FF7D00000000000000
-% 003A3A3A3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A9D3A3AFFFFFF9D3A9D9D3A
-% 9D9D9D3A9D7F7F7F3A3A3A9D3A9D9D9D3A9D9D9D9D9D3A3A9D9D3A9D3A9D
-% 9D3A9D9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9DFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFFFFFF3A3A3A3A3A3A3A3A3A3A7F7F7F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFFFF3A3A9D3A3A
-% 3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D
-% 9D3A3A9D3A3A3A3A9D9D3A9D9D9D3A3A3A9D3A3A3A9D9D3A9D3A9D9D3A9D
-% 3A3A3A7F7F7F3A3A3A3A9D9D9D3A9D9D9D3A9D3A3A9D9D3A3A9D3A9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A000000000000210012121812C5101810121018
-% 10121816181810101008101010181818181A181818181818181A18101812
-% 1212121818181810121000FF1A181A181A18181818121010101010181210
-% 1010121012161218181818181818181818AFAFAF12101210AF1216181810
-% 1010121010100E101010121818181818AF101010FF7D0000000000000000
-% 3A3A3A3A3A3A3A3A3A9D9D9D3A9D9D3A3A3A9DFFFF535353FFFF9D9D3A9D
-% 9D9D7F7F1313137F7F3A9D3A9D9D9D3A9D9D9D9D9D3A3A9D9D3A9D3A9D9D
-% 3A9D9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3AFF
-% FF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F7F3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A3A7F7F1313137F7F3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF3A9D3A3A3A
-% 3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A9D9D
-% 3A3A9D3A3A3A3A9D9D3A9D9D9D3A3A3A9D3A3A3A9D9D3A9D3A9D9D3A9D3A
-% 7F7F1313137F7F3A3A9D9D9D3A9D9D9D3A9D3A3A9D9D3A3A9D3A9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A000000000000210010101210C518181818101210
-% 1210181818181210101010121818181A18181A181A181A18181818121010
-% 10101018121010101200FF18181818181818181810101010101018181012
-% 10101012101216181818181818181818AF18AF16121010AF101212181012
-% 101010101010101010101216181812AF121012FF7D00000000000000003A
-% 3A9D3A3A3A3A9D3A9D9D9D9D3A9D9D3A3AFF53535353535353FF9D3A9D3A
-% 7F131313131313137F3A3A9D9D9D3A9D3A9D9D3A3A3A3A3A9D3A9D9D3A3A
-% 9D3A9D3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3AFF5353
-% 5353535353FF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3AFF53535353535353FF3A3A3A9D7F131313131313137F3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D3A9D
-% 9D3A9D3A3A9D9D9D9D9D9D9D3A3A3A9D3A3A9D9D9D9D9D3A9D9D9D9D7F13
-% 1313131313137F9D9D3A3A9D9D3A9D3A3A9D3A9D9D9D9D9D9D9D9D3A9D3A
-% 9D3A3A3A3A3A3A3A3A000000000000210010121012C51818181818121010
-% 10101218181818121012101818181A181818181818181818181810101010
-% 101018181012101000FF1818181818181818121010101010101818101010
-% 101218101012181818181818181818AF18AFAFAFAFAFAF10101012161218
-% 1010121010101010101210121010AF101010FF7D00000000000000003A3A
-% 3A3A3A9D3A9D3A9D9D9D3A9D9D3A3A3AFF53535353535353FF9D3A9D3A7F
-% 131313131313137F3A9D9D9D9D3A9D9D9D3A3A3A3A3A3A9D9D9D9D3A9D9D
-% 9D9D9D3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3AFF535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3AFF53535353535353FF3A3A3A3A7F131313131313137F9D3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3AFF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A
-% 3A3A9D3A9D9D3A3A9D9D3A9D9D9D9D3A3A9D9D9D9D9D3A9D3A9D9D7F1313
-% 13131313137F9D9D9D3A9D9D9D9D3A3A9D3A9D9D9D3A9D9D9D9D3A9D3A3A
-% 3A3A3A3A3A3A3A3A000000000000210010101012C5181818181818101210
-% 10101010121618121618181818181A181818181818181818121010101010
-% 1018181010101000FF181818181818181810121010101010181618181216
-% 1210101012101818101218181818AF1818AFAFAFAF161210101018121612
-% 10101010101012101012101012AF101010FF7D00000000000000003A3A3A
-% 3A3A9D3A9D3A9D9D9D3A9D9D3A3AFF535353535353535353FF3A9D7F1313
-% 131313131313137F9D9D9D9D3A9D9D9D3A3A3A3A3A3A9D9D9D9D3A9D9D9D
-% 9D9D3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9DFF5353535353
-% 53535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A9D3AFF535353535353535353FF3A3A7F1313131313131313137F3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3AFF535353535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 3A9D3A9D9D3A3A9D9D3A9D9D9D9D3A3A9D9D9D9D9D3A9D3A9D7F13131313
-% 13131313137F9D9D3A9D9D9D9D3A3A9D3A9D9D9D3A9D9D9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A000000000000210010101010C51818181A181812101010
-% 100808101012101812171818181818181818181818181810121010101010
-% 18161818121600FF12161818101810181210121010101212181818181812
-% 101010121613101210181618181818181818181818181010101216121012
-% 101216181810181012101216AF101010FF7D00000000000000003A3A3A3A
-% 3A3A3A9D3A9D9D9D3A3A9D9D3AFF535353535353535353FF3A3A7F131313
-% 1313131313137F3A9D9D3A3A9D9D9D9D9D3A3A3A3A3A9D3A9D9D9D3A9D3A
-% 9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3AFF535353535353535353FF3A3A7F1313131313131313137F3A3A3A3A
-% 3A3A3A3A3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3AFF535353535353535353FF3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A9D3A
-% 3A3A9D3A9D3A9D9D9D9D9D9D3A3A3A9D9D9D9D3A3A3A3A9D7F1313131313
-% 131313137F9D3A3A9D9D9D9D3A3A9D3A3A9D9D9D3A9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A000000000000210010101010C51818181818181818101010
-% 100A10101010121612181818181812161818101810181210121010101212
-% 181818181800FF1012101012161210101010121012161818181A18181210
-% 181218181818101218121216181818181218181818181012101810181018
-% 1012181818181812161218AF101010FF7D00000000000000003A3A3A3A3A
-% 3A3A9D3A9D9D9D9D9D3A9D3AFF535353535353535353FF3A9D7F13131313
-% 13131313137F3A9D9D9D3A3A9D3A3A3A3A9D3A3A9D3A9D9D3A9D3A9D9D9D
-% 3A9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3AFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF535353535353535353FF3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A0000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000000000000000007F131313131313
-% 1313137F0000000000000000000000000000000000000000000000000000
-% 0000000000000000000000210010101010C51818181A2018181810121010
-% 1010100A1012C5C5C5C51818121012C5C51216121010C5C5C5C512161818
-% 181A181800FF1818181818101216121612161218181818181A1818181010
-% 101010121018101010101218181818101210101010181810121018121818
-% 16181A18181818181618AF181818FF7D00000000000000003A3A3A3A3A3A
-% 3A9D3A9D9D9D9D9D3A9D3A3AFF53535353535353FF9D3A9D9D7F13131313
-% 1313137F3A3A9D9D9D3A3A9D3A3A3A3A9D3A3A9D3A9D9D3A9D3A9D9D9D3A
-% 9D9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353
-% FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF53535353535353FF3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF2121212121212121212121212121212121212121212121
-% 212121212121212121212121212121212121212121212121212121212121
-% 21212121212121212121212121212121212121212121217F131313131313
-% 137F21212121212121212121212121212121212121212121212121212121
-% 21212121212100000000210018181010C510101216181818181810121010
-% 10101010C5C51010C5C518181818C5C518101216C5C51216C5C518181818
-% 1A181800FF1A181818101210181012101216181818181818181818181010
-% 101010101010101010101216181818101012101218181010121612161818
-% 1818181A1818181818AF181816FF7D00000000000000003A3A3A3A3A3A3A
-% 9D3A9D9D3A9D3A9D9D3A3AFF53535353535353FF3A9D3A9D7F1313131313
-% 13137F3A9D9D9D9D9D3A3A9D3A9D3A3A9D9D3A9D9D9D9D3A9D9D3A9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3AFF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF53535353535353FF3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D3A
-% 9D3A9D9D9D3A3A9D3A3A3A9D3A9D9D3A9D3A9D9D9D9D7F13131313131313
-% 7F9D9D3A3A9D3A9D9D3A9D3A9D9D3A3A9D9D3A9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A002100000000210018161818C51010101218101810181210101010
-% 121010C5C51210C5C518181A18181810121018C5C51012C5C51818181818
-% 181800FF1818181818111813161216121818181818181A18181818101010
-% 101010100A10101010101218181818181012161218101210181318181818
-% 1818181818181810AF161318FF7D00000000000000003A3A3A3A3A3A3A9D
-% 3A9D9D9D9D9D9D9D3A3A3AFFFF535353FFFF9D9D3A9D9D9D7F7F1313137F
-% 7F3A3A3A9D9D9D9D3A9D3A9D3A9D9D3A9D9D3A9D9D9D3A3A9D3A9D9D3A9D
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D3A9D3AFFFF535353FFFF9D9D
-% 9D9D3A3A9D3A9D3A9D9D3A9D3A9D3A9D3A9D3A9D3A3A3A3A3A3A3A9D3A9D
-% 9D9D3A9D3A3A3A9D3A9D3A9D3A3A3A9D3A9D3A3A3A9D9D3A9D9D3A3A3A9D
-% 3A9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D
-% 3A3A3A7F7F1313137F7F9D9D9D9D3A9D3A3A3A3A3A9D9D9D9D9D9D3A9D3A
-% 9D3A9D3A9D3A9D3A9D9D9D3A3A9D3A9D9D3A9D9D3A3A9D3A3A9D3A9D9D3A
-% FFFF535353FFFF9D3A9D3A9D3A7F7F1313137F7F3A3A3A9D3A9D3A9D3A3A
-% 3A3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D3A9D3A9D
-% 3A9D3A9D3A3A3A9D3A9DFFFF535353FFFF9D3A9D3A9D3A3A9D3A9D3A3A9D
-% 3A9D3A9DFF7D3A3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A3A3A9D3A3A3A3A3A
-% 3A9D9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D9D9D9D9D
-% 9D3A9D9D3A3A9D3A9D3A3A9D9D3A9D9D9D9D9D9D3A3A7F7F1313137F7F3A
-% 3A9D9D9D3A9D3A9D3A3A3A3A3A9D3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A002100000000210013181818C5C5C5C5C5C5C5C5C5C5C5C5C5101216
-% 1816C5C51618C5C518181818181818111813C5C51612C5C5181818181A18
-% 1800FF1A18181818181618181210121618181A181A181818181810101010
-% 101010101010081010101818181818181018161216121810181018101818
-% 18181818181010AF121818FF7D00000000000000003A3A3A3A3A3A3A9D3A
-% 9D9D9D9D9D9D9D3A3A3A9D3AFFFFFF3A3A9D9D3A9D9D9D9D7F7F7F7F3A3A
-% 3A3A3A9D9D9D9D3A9D3A9D3A9D9D3A9D9D3A9D9D9D3A3A9D3A9D9D3A9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A9D9D3A9D9D3A9D3A3A9DFFFFFF9D9D9D9D9D
-% 9D3A3A9D3A9D3A9D9D3A9D3A9D3A9D3A9D3A9D3A3A3A3A3A3A3A9D3A9D9D
-% 9D3A9D3A3A3A9D3A9D3A9D3A3A3A9D3A9D3A3A3A9D9D3A9D9D3A3A3A9D3A
-% 9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D3A
-% 3A3A3A3A7F7F7F3A9D9D9D9D9D3A9D3A3A3A3A3A9D9D9D9D9D9D3A9D3A9D
-% 3A9D3A9D3A9D3A9D9D9D3A3A9D3A9D9D3A9D9D3A3A9D3A3A9D3A9D9D3A3A
-% 9DFFFFFFFF9D9D3A9D3A9D3A3A3A7F7F7F3A3A3A3A3A9D3A9D3A9D3A3A3A
-% 3A3A3A9D3A9D3A9D3A3A3A3A3A3A3A3A9D3A9D3A9D3A3A3A9D3A9D3A9D3A
-% 9D3A9D3A3A3A9D3A9D3A9DFFFFFF3A3A9D3A9D3A9D3A3A9D3A9D3A3A9D3A
-% 9D3A9DFF7D3A3A3A9D3A3A3A9D3A9D3A9D3A9D3A3A3A3A9D3A3A3A3A3A3A
-% 9D9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A9D9D9D9D9D9D9D9D
-% 3A9D9D3A3A9D3A9D3A3A9D9D3A9D9D9D9D9D9D3A3A3A3A7F7F7F7F3A3A3A
-% 9D9D9D3A9D3A9D3A3A3A3A3A9D3A3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A002100000000210018181818C518181010101012101210121012161818
-% 18C5C51818C5C518181A1818181818161818C5C5C5C518181A181A181818
-% 00FF1818181818181818171216181818181818181A181818181118121012
-% 101010101010080E10101818181818181210121018101810121812101818
-% 181817181218AF181618FF7D00000000000000003A3A3A3A3A3A3A9D3A9D
-% 9D9D9D9D9D3A9D3A3A3A3A9D9D3AFFFFFF9D9D9D7F7F7F7F3A3A3A3A3A3A
-% 3A3A9D9D9D9D9D9D9D3A3A3A9D3A9D3A9D9D3A9D9D9D3A9D3A3A9D3A9D3A
-% 3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A3A9D3AFFFFFF9D3A9D3A3A3A3A3A3A
-% 3A3A9D3A9D3A9D3A9D3A9D3A3A3A9D3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 9D3A9D3A9D3A3A3A9D3A3A3A9D3A9D9D3A3A9D3A3A9D3A9D3A3A9D3A9D3A
-% 9D3A9D3A3A9D3A9D9D3A9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D3A3A9D3A9D
-% 3A3A3A3A3A3A7F7F7F3A3A3A9D3A9D9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 9D3A3A9D3A3A9D3A3A9D3A9D3A9D3A9D9D3A9D3A9D3A3A9D9D9D3A9D9D9D
-% 9D3A9DFFFFFFFF3A9D9D7F7F7F3A3A3A3A3A3A9D3A3A9D3A3A9D9D3A3A3A
-% 9D9D9D3A9D3A9D3A9D3A3A3A3A3A9D9D9D9D3A3A3A3A9D3A9D3A9D3A9D3A
-% 9D3A3A3A9D9D3AFFFFFF3A9D3A9D3A9D3A9D3A9D9D9D3A9D3A3A3A9D3A9D
-% 9D3AFF7D9D9D9D3A3A9D9D3A9D9D3A9D9D3A3A9D3A9D3A9D3A3A3A9D3A9D
-% 3A9D3A9D3A9D3A9D3A9D3A9D9D3A3A3A3A3A3A3A9D9D3A3A9D3A9D3A3A3A
-% 9D9D3A3A3A9D3A3A9D3A9D9D3A9D9D9D3A9D9D3A3A3A3A3A3A7F7F7F7F9D
-% 3A9D9D9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 002100000000210016181818C51818181810121018101810121018181818
-% C5C51818C5C518181818181818181818C5C51618C5C5181818181A181800
-% FF18181818181A1818181812181818181818181818181618181612161810
-% 121012101010101010101218161818181018181316131810121010121612
-% 1818121618AF181818FF7D00000000000000003A3A3A9D3A3A3A9D3A9D9D
-% 3A9D3A9D9D9D3A3A3A3A9DFFFF535353FFFF7F1313137F7F3A3A3A3A3A9D
-% 3A9D9D9D3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D3A9D3A9D3A9D9D3A9D3A3A
-% 9D3A3A3A3A3A3A9D3A3A3A3A3A3A3AFFFF535353FFFF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 9D3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D9D3A9D3A
-% 3A3A3A7F7F1313137F7F3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9DFFFF535353FFFF7F1313137F7F3A3A3A3A9D3A3A3A3A3A3A3A3A9D9D3A
-% 3A3A9D3A9D3A3A9D3A3A3A9D9D3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D3A3A
-% 9D9D9D9DFFFF535353FFFF9D3A3A9D3A9D9D9D3A9D3A9D9D9D3A3A9D9D3A
-% 9DFF7D3A3A9D3A9D3A9D9D3A9D9D3A9D9D3A3A3A3A9D9D9D9D9D9D3A9D9D
-% 3A3A9D9D3A9D9D9D3A9D9D3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D9D9D
-% 9D9D3A3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A3A7F7F1313137F7F
-% 9D9D3A9DB2FF8B9D3A9D9D9D9D9D3A9D9D3A9D3A8BFF603A3A3A3A3A3A00
-% 2100000000210018181018C51818181817181818121010121012121818C5
-% C51818C5C5181818181818181A1818C5C51218C5C51818181818181800FF
-% 18181A181818181818181718181818121818181818121210121012101216
-% 121012101210101010101012181613101216181812161210121010121618
-% 18101818AF181818FF7D00000000000000003A3A3A9D3A3A3A9D3A9D9D3A
-% 9D3A9D9D9D3A3A3A3AFF53535353535353FF13131313137F3A3A3A3A9D3A
-% 9D9D9D3A9D9D9D9D9D9D9D3A3A9D9D9D9D9D3A9D3A9D3A9D9D3A9D3A3A9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D
-% 3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D9D3A9D3A3A
-% 3A7F131313131313137F3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF
-% 53535353535353FF13131313137F3A3A3A9D3A3A3A3A3A3A3A3A9D9D3A3A
-% 3A9D3A9D3A3A9D3A3A3A9D9D3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D3A3A9D
-% 9D9DFF53535353535353FF3A3A9D3A9D9D9D3A9D3A9D9D9D3A3A9D9D3A9D
-% FF7D3A3A9D3A9D3A9D9D3A9D9D3A9D9D3A3A3A3A9D9D9D9D9D9D3A9D9D3A
-% 3A9D9D3A9D9D9D3A9D9D3A3A3A3A3A3A3A9D3A3A9D3A9D3A9D3A9D9D9D9D
-% 9D3A3A9D9D3A9D3A9D9D9D9D3A9D9D9D9D3A3A3A3A7F131313131313137F
-% 9D3A9DE3E33A9D3A9D9D9D9D9D3A9D9D3A9D3A3AC8C83A3A3A3A3A3A0021
-% 00000000210018181612C5181818181818161216121010101012101818C5
-% C5C5C518181818181A181818181818C5C5C5C5181812181818181800FF18
-% 18181818181A181818181818181818161818161810101010101010121012
-% 181612101010100A10101210181810121818181018101010101010121810
-% 181018AF161818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3A9D
-% 9D9D3A9D9D3A3A3AFF53535353535353FF13131313137F9D3A3A3A3A3A9D
-% 9D9D9D9D3A9D9D3A9D3A9D9D3A3A9D3A3A9D3A3A3A9D3A9D3A9D3A3A3A3A
-% 9D3A3A3A3A9D3A9D9D9D9D9DFF53535353535353FF9D9D9D9D9D9D9D3A9D
-% 9D9D9D9D9D9D3A9D9D9D9D3A3A3A9D3A3A3A3A9D3A9D9D9D3A9D3A3A3A9D
-% 9D9D9D9D3A3A3A3A9D9D3A3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D9D3A9D3A
-% 9D9D9D9D9D9D3A9D9D9D9D3A3A9D9D9D9D9D9D3A9D9D3A3A3A9D3A9D3A3A
-% 7F131313131313137F9D3A3A3A9D3A9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D
-% 9D9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D3A9D9D3A3A3AFF53
-% 535353535353FF13131313137F3A9D3A3A9D3A9D9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A9D9D3A3A
-% 3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9DFF
-% 7D3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D9D3A3A9D3A9D3A3A9D9D3A9D9D9D
-% 9D9D3A3A9D3A9D9D3A9D9D3A9D9D3A9D3A3A3A3A7F131313131313137F9D
-% 9D82FF603A9D9D3A3A9D9D3A9D9D9D3A9D3A3A60FF823A3A3A3A3A002100
-% 000000210018181818C51018181818161210181012101010101018161218
-% 1818181A181818181818181A181818181818181818161818161800FF1818
-% 18181A181818181818181818181818181818181818101012101010101018
-% 121810181010101012161818181818161817181818181810101010101218
-% 1810AF121818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D3A
-% 9D9D3A9D3A9DFF535353535353535353FF13131313137F3A3A3A3A3A9D9D
-% 9D3A9D9D9D3A9D3A9D9D3A9D9D9D9D3A9D3A3A3A9D3A9D9D9D3A3A3A3A3A
-% 3A3A3A3A9D3A9D9D9D9DFF535353535353535353FF3A9D9D9D9D3A3A9D3A
-% 9D9D9D9D3A3A3A9D9D9D3A3A9D3A3A3A3A3A3A9D9D9D3A3A9D3A3A3A3A9D
-% 9D9D3A3A9D3A9D9D3A3A9D3A9D9D9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A9D
-% 3A9D9D9D3A9D3A3A9D9D9D3A3A3A9D9D9D9D3A3A9D9D3A3A3A9D3A9D7F13
-% 13131313131313137F9D9D3A3A3A9D9D9D9D9D3A3A9D3A9D3A3A3A9D3A9D
-% 9D9D3A3A9D9D9D9D9D3A3A3A9D3A3A9D9D9D3A3A9D9D9D9D9D3AFF535353
-% 535353535353FF13131313137F9D3A9D9D3A3A9D9D9D3A3A9D9D9D9D9D9D
-% 9D9D9D3A3A3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D9D3A9D3A3AFF
-% 535353535353535353FF9D9D3A9D3A9D3A9D3A3A9D3A9D9D3A9D3A9DFF7D
-% 9D9D9D3A3A9D3A9D3A9D3A3A9D9D3A9D9D9D3A3A3A9D9D7F7F7F7F7F3A3A
-% 3A9D3A9D3A3A9D9D3A3A3A3A3A3A9D9D3A9D9D9D9D3A3A9D9D3A9D9D3A9D
-% 9D9D3A3A3A9D3A9D3A9D9D9D9D9D9D3A3A3A7F1313131313131313137FA3
-% FFB19D3A3A9D3A9D9D9D9D9D9D9D3A9D3A9D3AB1FF483A3A3A3A00210000
-% 0000210018181818C5101210121012101218161210101010101010101012
-% 16181810181818181A1818181818181818181818181818181800FF181818
-% 1A1E181A1818181612101218181818181818101810121010101010101218
-% 171818101210101018181818181818181818171818161012101210121010
-% 10AF101010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D3A9D
-% 9D3A9D3A9DFF535353535353535353FF13131313137F3A3A3A3A3A9D9D9D
-% 3A9D9D9D3A9D3A9D9D3A9D9D9D9D3A9D3A3A3A9D3A9D9D9D3A3A3A3A3A3A
-% 3A3A3A9D3A9D9D9D9DFF535353535353535353FF3A9D9D9D9D3A3A9D3A9D
-% 9D9D9D3A3A3A9D9D9D3A3A9D3A3A3A3A3A3A9D9D9D3A3A9D3A3A3A3A9D9D
-% 9D3A3A9D3A9D9D3A3A9D3A9D9D9D9D3A9D9D3A9D9D9D9D9D3A3A9D3A9D3A
-% 9D9D9D3A9D3A3A9D9D9D3A3A3A9D9D9D9D3A3A9D9D3A3A3A9D3A9D7F1313
-% 131313131313137F9D9D3A3A3A9D9D9D9D9D3A3A9D3A9D3A3A3A9D3A9D9D
-% 9D3A3A9D9D9D9D9D3A3A3A9D3A3A9D9D9D3A3A9D9D9D9D9D3AFF53535353
-% 5353535353FF13131313137F9D3A9D9D3A3A9D9D9D3A3A9D9D9D9D9D9D9D
-% 9D9D3A3A3A9D9D9D9D9D9D3A9D3A9D9D9D9D9D3A9D9D9D9D3A9D3A3AFF53
-% 5353535353535353FF9D9D3A9D3A9D3A9D3A3A9D3A9D9D3A9D3A9DFF7D9D
-% 9D9D3A3A9D3A9D3A9D3A3A9D9D3A9D9D9D3A3A7F7F7F13131313137F7F7F
-% 9D3A9D3A3A9D9D3A3A3A3A3A3A9D9D3A9D9D9D9D3A3A9D9D3A9D9D3A9D9D
-% 9D3A3A3A9D3A9D3A9D9D9D9D9D9D3A3A3A7F1313131313131313137FC0FF
-% 609D3A3A9D3A9D9D9D9D9D9D9D3A9D3A9D3A60FF823A3A3A3A0021000000
-% 00210010101012C512161216121810181012101010101010101010101012
-% 1810181818181A1E181A181818161210121818181818181800FF1818181A
-% 181A18181812101210101012161218101818181010101010101010121612
-% 181818181812181818181818181818181818181818181816121010121012
-% AF101010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D
-% 9D9D3A9DFF535353535353535353FF13131313137F3A3A3A3A3A9D9D9D9D
-% 9D3A9D9D9D9D9D3A9D3A9D9D9D3A9D3A9D3A3A3A3A9D3A9D3A9D3A3A9D3A
-% 9D3A3A3A9D9D9D9DFF535353535353535353FF9D3A9D9D9D3A3A3A9D3A9D
-% 9D9D9D3A9D3A9D9D3A3A9D3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A3A9D9D3A
-% 3A9D3A9D9D9D3A3A9D3A9D9D9D3A3A9D3A3A3A9D9D9D9D3A9D9D3A3A9D9D
-% 9D9D3A3A9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D7F131313
-% 1313131313137F9D9D3A3A9D3A9D9D9D9D3A3A9D3A9D3A9D9D3A9D9D9D9D
-% 3A3A9D3A9D9D9D3A3A9D9D3A9D3A9D9D3A3A9D9D9D9D3A3AFF5353535353
-% 53535353FF13131313137F9D9D9D9D3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A
-% 3A9D3A3A3A3A9D3A9D3A9D9D9D3A9D9D9D3A3A3A9D3A3A9D3A9D3AFF5353
-% 53535353535353FF9D3A3A9D3A9D9D9D3A3A3A9D9D9D9D3A3A9DFF7D9D9D
-% 3A9D3A9D9D9D9D3A3A9D9D3A9D9D3A3A9D7F13131313131313131313137F
-% 9D3A3A9D3A3A3A3A3A3A3A9D9D3A3A9D3A9D3A9D9D54C6FFFFDAB73A3A9D
-% 3A3A9DA6C0E3FFC8C0A39D9D3A3A3A3A7F1313131313131313137FC8E39D
-% 9D9D3AC6FFBD3A9D3A9D9DBDFFC63A3A3A3AC8C83A3A3A3A002100000000
-% 210010101010C51012101210101012101210101210100810100F10101010
-% 12181818181A181A18181812101210101012161218101800FF1818181A18
-% 181A18181810101010121012101212161218101010100A10101010121818
-% 18181818181818181A1818181818181618121818181818181012101018AF
-% 101010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D3A9D9D
-% 3A3A9D3AFF53535353535353FF13131313137F3A3A3A3A3A3A9D9D9D3A9D
-% 9D3A9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D9D9D9D3AFF53535353535353FF3A9D3A9D9D9D3A3A9D3A9D9D9D
-% 9D3A3A9D3A9D9D3A3A9D3A3A3A3A3A9D9D9D9D3A9D9D3A3A3A9D3A9D3A3A
-% 3A3A9D9D9D3A9D3A9D3A9D9D9D3A9D3A3A3A9D9D9D9D3A9D3A3A3A3A9D9D
-% 9D3A3A9D3A9D9D9D3A3A9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A3A7F131313
-% 131313137F9D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D3A3A3A3A9D9D9D9D3A
-% 9D3A3A9D9D9D3A9D9D3A3A3A3A9D9D3A3A9D3A9D9D9D3A9DFF5353535353
-% 5353FF13131313137F9D9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D9D9D3A3A9D
-% 9D9D3A3A3A3A9D9D3A3A9D3A3A9D9D9D3A3A9D9D3A3A9D9D9D3A3AFF5353
-% 5353535353FF9D9D9D3A9D9D9D9D9D3A3A9D3A9D9D9D3A9D3AFF7D9D9D3A
-% 3A9D9D9D9D9D3A3A9D3A9D9D9D3A7F7F131313131313131313131313137F
-% 7F3A9D3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D3AB2FFFFFFFFFFFFD13A9D3A
-% 9DB2FFFFFFFFFFFFFFB23A3A3A9DA3FF7F131313131313137F60FFC69D3A
-% 9D3A3ADAFF549D9D9DA9FFC89D3A3A3A3A8BFF603A3A3A00210000000021
-% 0010101010C51216131810181218161818181010100A100B101010101010
-% 181818181A18181A181818101010101210121012121600FF1818181A181A
-% 18181818121012101012101010101210121818101010100810121618181A
-% 181A181818181A181818181818101212181618121218101816101018AF18
-% 1818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D3A9D9D3A
-% 3A9D3AFF53535353535353FF13131313137F3A3A3A3A3A3A9D9D9D3A9D9D
-% 3A9D3A9D9D9D3A9D9D9D3A9D9D3A9D3A9D3A3A9D9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D9D9D9D3AFF53535353535353FF3A9D3A9D9D9D3A3A9D3A9D9D9D9D
-% 3A3A9D3A9D9D3A3A9D3A3A3A3A3A9D9D9D9D3A9D9D3A3A3A9D3A9D3A3A3A
-% 3A9D9D9D3A9D3A9D3A9D9D9D3A9D3A3A3A9D9D9D9D3A9D3A3A3A3A9D9D9D
-% 3A3A9D3A9D9D9D3A3A9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A3A7F13131313
-% 1313137F9D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D3A3A3A3A9D9D9D9D3A9D
-% 3A3A9D9D9D3A9D9D3A3A3A3A9D9D3A3A9D3A9D9D9D3A9DFF535353535353
-% 53FF13131313137F9D9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D9D9D3A3A9D9D
-% 9D3A3A3A3A9D9D3A3A9D3A3A9D9D9D3A3A9D9D3A3A9D9D9D3A3AFF535353
-% 53535353FF9D9D9D3A9D9D9D9D9D3A3A9D3A9D9D9D3A9D3AFF7D9D9D3A3A
-% 9D9D9D9D9D3A3A9D3A9D9D9D3A7F1313131313131313131313131313137F
-% 3A9D3A3A3A3A3A3A9D9D3A9D9D3A9D3A9D48FFFFB73A9DA9D1FF719D3AA3
-% E3FF8BA33AA3C6FFE3483A3AB7FFA37F131313131313137F82FFB49D3A9D
-% 3A3AA9FFC89D9D9DDAFF599D3A3A3A3A66FF823A3A3A0021000000002100
-% 18181010C512161216101316101818181818181010100E10101010101018
-% 1818181A181A18181818121012101012101010101200FF10181818181818
-% 181818161216121810181018101210101818161010101008101216181818
-% 1818181A1818181818181810121010101218101010121012181818AF1818
-% 1AFF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D9D9D3A
-% 3A9D3AFFFF535353FFFF7F1313137F7F9D9D9D9D3A9D3A9D9D3A9D3A9D9D
-% 9D9D9D9D3A3A9D9D3A3A9D9D3A3A9D3A3A9D3A9D9D3A3A3A3A9D3A3A3A3A
-% 3A9D9D9D9D3A3AFFFF535353FFFF9D3A3A9D9D9D9D3A3A9D3A3A9D9D9D9D
-% 3A3A3A3A9D3A3A3A3A3A9D3A3A9D9D9D3A3A9D3A3A9D3A3A9D3A3A3A9D9D
-% 9D9D9D3A3A9D3A9D9D9D9D3A3A9D3A9D3A9D9D9D3A9D9D3A3A9D9D9D9D3A
-% 3A3A3A3A9D3A3A3A3A9D9D9D9D3A3A3A9D9D9D3A3A3A9D3A3A7F7F131313
-% 7F7F9D9D9D9D3A3A3A3A9D9D9D9D3A3A9D3A3A3A9D3A9D9D9D9D3A9D3A3A
-% 9D9D9D3A3A3A3A9D3A3A9D9D9D3A3A3A3A3A3A3A3A3A3AFFFF535353FFFF
-% 7F1313137F7F3A3A9D9D9D9D3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A9D3A3A
-% 9D3A3A3A3A9D3A3A3A3A9D9D9D3A3A9D9D3A3A9D9D9D9D9D3A9DFFFF5353
-% 53FFFF3A9D9D3A3A9D3A3A9D9D3A9D3A3A9D9D9D3A9D3AFF7D9D9D3A9D3A
-% 9D9D9D9D3A9D3A3A9D9D9D7F13131313131313131313131313131313137F
-% 9D3A3A3A3A3A9D3A9D3A3A9D9D9D9D3A77FFC03A9D9D3AA3FFB19D9D77FF
-% CB9D9D9D9D3A96FFBD3A3AB1FF483A7F7F1313137F7F3ACBFF549D9D9D3A
-% 3A3ABDFFC69DBDFFC63A9D3A3A3A3A54FF963A3A3A002100000000210018
-% 1A1818C51818121818181218181818181818161210101010101010101210
-% 181818181818181818161216121810181018101200FF1012161818181818
-% 101210121018181818181312101010101212181810121012101818181818
-% 181818181A181818181012101010101216101012101210121018AF181818
-% FF7D00000000000000003A3A3A9D3A3A3A9D3A9D9D3A9D3A9D3A9D9D3A3A
-% 9D3A3A9DFFFFFFFFFFFF7F7F7F9D3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A
-% 9D9D9D3A3A9D9D3A9D9D9D3A9D9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A
-% 9D9D9D9D9DFFFFFFFFFFFF9D9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A
-% 9D3A3A9D3A9D3A3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A3A9D9D3A9D3A9D9D
-% 9D9D3A3A9D9D3A9D9D9D3A9D9D9D3A9D9D9D9D3A9D3A3A9D3A9D9D9D3A3A
-% 9D3A3A3A9D3A3A3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D3A3A3A3A7F7F7F7F
-% 7F7F9D9D9D3A3A9D3A9D9D9D3A3A9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A
-% 9D9D3A3A9D9D9D3A9D3A9D9D3A3A9D3A9D9D9D3A3A3A3A3AFFFFFFFFFFFF
-% 7F7F7F3A3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D3A
-% 3A3A3A3A9D3A9D3A9D9D9D9D3A3A9D3A9D3A3A9D9D9D9D3AFFFFFFFFFFFF
-% 9D3A9D9D9D3A3A9D3A3A3A9D3A3A3A3A9D9D9D3A3A3AFF7D9D9D3A3A3A9D
-% 9D9D3A3A3A9D9D9D9D7F131313131313131313131313131313131313137F
-% 3A3A3A3A3A9D3A9D3A9D3A9D9D9D3AA3FF549D9D3A3A9D9D3A3A9DA3FFAF
-% 9D9D9D3A9DAFFFA33A3A3A3A3A3A3A3A7F7F7F7F7F7FFFFF9D9D9D9D9D3A
-% 9D3AD1FF77FFE39D3A9D3A3A9D3A3AFFFF3A3A3A00210000000021001818
-% 1818C5101816181018181612101010121818181010101010101010101012
-% 1618181818181012101210181818181813121000FF101218161818101010
-% 101010101818181818181010101010101618181816101018181818181818
-% 18181818181818101210101010101012101010121010121018AF121612FF
-% 7D00000000000000003A3A3A9D3A3A3A9D3A9D9D3A9D3A9D3A9D9D3A3A9D
-% 3A3A9D9DFFFF535353FFFF9D9D3A3A3A3A3A3A3A3A9D3A9D3A9D9D9D3A9D
-% 9D9D3A3A9D9D3A9D9D9D3A9D9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A9D3A9D
-% 9D9DFFFF535353FFFF9D9D9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A9D
-% 3A3A9D3A9D3A3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A3A9D9D3A9D3A9D9D9D
-% 9D3A3A9D9D3A9D9D9D3A9D9D9D3A9D9D9D9D3A9D3A3A9D3A9D9D9D3A3A9D
-% 3A3A3A9D3A3A3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D3A3A3A3A3A7F7F1313
-% 137F7F9D3A3A9D3A9D9D9D3A3A9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A9D
-% 9D3A3A9D9D9D3A9D3A9D9D3A3A9D3A9D9D9D3A3A3A3A3A3AFFFF535353FF
-% FF3A3A3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D9D9D3A3A9D3A9D3A3A
-% 3A3A3A9D3A9D3A9D9D9D9D3A3A9D3A9D3A3A9D9D9DFFFF535353FFFF9D9D
-% 3A9D9D9D3A3A9D3A3A3A9D3A3A3A3A9D9D9D3A3A3AFF7D9D9D3A3A3A9D9D
-% 9D3A3A3A9D9D9D9D7F131313131313131313131313131313131313137F3A
-% 3A3A3A3A9D3A9D3A9D3A9D9D9D3AFFFF3A9D9D3A3A9D9D3A3A9DFFFF9D9D
-% 9D9D3A9D9DFFFF3A3A3A3A3A486082B17F7F1313137F7F9D9D9D9D9D3A9D
-% 3AA6FFFFFFAF9D3A9D3A3A9D3A3AFFFF3A3A3A0021000000002100161218
-% 18C518181218181810181010101010101218101010121010101010101218
-% 16181810101010101010181818181818101000FF10101012101012101010
-% 101012181818181818181010080A10101012181818181818181818181218
-% 181818171812181010101010101012181810101012161818AF181618FF7D
-% 00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D3A9D3A3A9D
-% 3A3AFF53535353535353FF9D9D9D3A9D9D9D9D3A9D3A3A9D9D3A9D9D9D9D
-% 3A3A9D9D3A9D3A9D9D3A3A9D9D3A9D3A9D9D3A3A3A3A3A3A3A3A3A9D3A9D
-% FF53535353535353FF9D9D9D3A9D3A9D9D9D3A3A9D3A3A9D9D9D3A9D9D3A
-% 3A3A3A9D3A3A3A3A3A3A9D9D9D3A3A9D3A3A3A3A9D3A9D3A3A9D9D9D9D9D
-% 3A3A9D3A3A9D9D3A3A9D3A3A9D3A9D9D9D3A3A9D3A3A3A9D9D9D3A9D9D3A
-% 3A9D3A9D3A9D9D9D9D9D3A3A9D9D9D9D9D3A9D3A3A3A3A3A7F1313131313
-% 13137F9D3A9D3A9D9D9D9D3A9D3A9D3A3A3A3A9D9D9D3A3A9D3A9D3A9D9D
-% 3A3A3A9D3A3A9D3A9D9D3A9D9D3A3A9D3A9D9D3A9D9DFF53535353535353
-% FF3A3A3A9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D9D9D9D3A9D9D3A3A9D9D3A
-% 9D3A9D9D3A3A3A9D9D9D9D3A9D9D3A3A3A9D9DFF53535353535353FF3A3A
-% 3A9D9D3A3A9D9D3A9D9D3A3A9D3A9D9D9D3A3A9DFF7D3A3A9D9D3A9D9D9D
-% 9D3A9D3A9D9D9D7F131313131313131313131313131313131313137F3A3A
-% 3A3A3A9D9D3A9D9D9D9D3A3A9DFFFF3A9D9D3A3A9D9D9D3A9DFFFF9D3A3A
-% 9D9D3A3AFFFF9D3A3A59A3FFFFFF7F131313131313137F9D3A9D9D9D3A3A
-% 9D96FFDA9D9D3A9D3A3A3A3A3AFFFF3A3A3A002100000000210016181618
-% C51A18181810121818181812101010101018121610101210101010101012
-% 101012101010101012181818181818181000FF1210121018101810101010
-% 101012161818181A18181010101010101010101018181818181818161818
-% 1818181018101210101010101218181818161210121018AF181818FF7D00
-% 000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D3A9D3A9D3A3A9D
-% 3AFF53535353535353FF9D9D3A9D3A9D3A9D9D9D9D9D3A3A9D9D9D9D3A9D
-% 3A9D3A3A9D9D9D9D3A3A9D9D3A3A3A3A9D3A9D3A3A3A3A9D3A3A9D3A9DFF
-% 53535353535353FF9D9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A9D9D3A3A
-% 9D3A9D9D3A3A3A3A3A9D9D9D3A9D9D9D3A9D3A3A9D3A3A3A9D9D9D3A3A3A
-% 3A9D3A9D9D9D9D3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D9D3A3A9D3A9D
-% 3A3A9D3A9D9D9D9D9D3A3A9D9D9D9D3A3A3A9D3A3A3A9D7F131313131313
-% 137F3A3A3A9D9D9D9D3A3A9D3A9D3A3A3A9D9D9D9D3A3A9D3A3A9D9D9D9D
-% 3A9D9D3A3A3A9D9D9D3A9D9D3A3A3A3A3A9D9D9D9DFF53535353535353FF
-% 9D3A3A9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A3A3A3A9D3A
-% 3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D9D9DFF53535353535353FF9D3A9D
-% 9D9D9D9D9D9D3A3A3A9D9D3A9D9D9D9D3A9D9DFF7D9D3A3A9D3A9D9D9D9D
-% 3A3A3A9D9D7F1313131313131313131313131313131313131313137F3A3A
-% 3A9D3A9D3A9D9D3A9D3A9D9DFFFF3A3A9D3A3A3A9D9D3A3AFFFF9D9D9D9D
-% 3A3A9DFFFF9D3A60FFFFFFFFB17F131313131313137F9D9D9D3A9D3A3AAF
-% FFFFFFB49D3A9D3A3A3A3A3AFFFF3A3A3A002100000000210018181818C5
-% 181818181816181818181710101210121612101210101818101210121018
-% 101810101010101012161818181A181800FF181818181818181810121210
-% 121012181818181818181010101010101010101012161818181818181718
-% 12161210121010121012181818181818181810121018AF181818FF7D0000
-% 0000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D9D9D3A9D3A9D3A3A9DFF
-% 535353535353535353FF9D3A9D3A9D3A9D9D9D9D9D3A3A9D9D9D9D3A9D3A
-% 9D3A3A9D9D9D9D3A3A9D9D3A3A3A3A9D3A9D3A3A3A3A9D3A3A9D3AFF5353
-% 53535353535353FF9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A9D9D3A3A9D
-% 3A9D9D3A3A3A3A3A9D9D9D3A9D9D9D3A9D3A3A9D3A3A3A9D9D9D3A3A3A3A
-% 9D3A9D9D9D9D3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D9D3A3A9D3A9D3A
-% 3A9D3A9D9D9D9D9D3A3A9D9D9D9D3A3A3A9D3A3A3A7F1313131313131313
-% 137F3A3A9D9D9D9D3A3A9D3A9D3A3A3A9D9D9D9D3A3A9D3A3A9D9D9D9D3A
-% 9D9D3A3A3A9D9D9D3A9D9D3A3A3A3A3A9D9D9DFF535353535353535353FF
-% 3A3A9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A3A3A3A9D3A3A
-% 3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D9DFF535353535353535353FF3A9D9D
-% 9D9D9D9D9D3A3A3A9D9D3A9D9D9D9D3A9D9DFF7D9D3A3A9D7F7F7F7F7F7F
-% 7F7F7F7F7F1313131313131313131313131313131313131313137F7F7F7F
-% 7F7F7F7F7F7F3A9D3A9D9DA3FF543A9D3A3A3A9D9D3A3AA3FFAF9D9D9D3A
-% 3AAFFFA39D3AB1FF9660487F1313131313131313137F9D9D3A9D3A3AE3FF
-% B4E3E3A63A9D3A3A3A3A54FF963A3A3A002100000000210018181818C518
-% 181818181811181218181818161210181018101818181818181818181818
-% 18181012121012101218181818181800FF1A181818181818181818101010
-% 101012181818181818101810121010101010101210181218181818181612
-% 18101210101010101018181818181A181810101012AF121612FF7D000000
-% 00000000003A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D9D9D3A9D3A3A9DFF53
-% 5353535353535353FF3A9D9D3A9D9D9D3A9D3A3A9D3A9D3A9D9D9D3A3A9D
-% 3A3A9D3A9D9D3A3A9D9D3A9D3A9D3A3A3A3A3A9D3A3A9D3A3A9DFF535353
-% 535353535353FF9D9D3A9D9D9D9D9D3A3A9D3A9D9D9D9D3A3A9D3A9D3A3A
-% 9D3A3A3A3A3A3A9D9D9D3A3A9D9D3A3A3A9D3A9D3A9D9D9D9D3A3A3A3A9D
-% 9D3A9D9D9D3A9D9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D9D3A3A9D3A9D3A3A
-% 3A9D3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D3A3A9D7F131313131313131313
-% 7F3A3A3A9D9D9D9D3A9D9D9D3A3A9D9D9D9D3A3A9D9D9D3A9D9D9D3A3A9D
-% 3A9D3A3A3A9D9D3A3A9D3A9D3A3A3A3A9D9DFF535353535353535353FF3A
-% 3A9D9D9D9D3A3A9D9D9D9D9D9D3A3A3A9D9D9D3A3A9D3A9D3A3A9D9D3A3A
-% 9D3A3A9D9D9D3A9D9D3A3A9D3A9D9DFF535353535353535353FF3A3A9D9D
-% 3A3A9D9D3A9D3A3A3A3A9D9D9D9D3A9D3AFF7D9D9D3A3A7F7F7F7F7F7F7F
-% 7F7F7F7F1313131313131313131313131313131313131313137F7F7F7F7F
-% 7F7F7F7F7F9D3A9D9D9DBDFFC63A9D3A3A54FFDA9D9DBDFFCB9D3A9D3A3A
-% 96FFBD9D3AFFFF9D3A3A7F1313131313131313137F9D3A9D9D9D8BFFBD9D
-% 66FFD13A9D3A3A3A3A60FF823A3A3A002100000000210016121612C51210
-% 1818181818101012101818181012101210121818181A181A181818181818
-% 181818101010101012181818181800FF1818181818181818181818121010
-% 101210121018101812101216181018121610101210181718181818181810
-% 181012101010121818181A181818181818101010AF101010FF7D00000000
-% 000000003A3A9D3A3A3A3A9D3A9D9D3A9D3A9D3A9D3A3A3A3A3A3AFF5353
-% 53535353535353FF9D9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D3A3A3A9D9D3A
-% 9D3A9D9D3A3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3AFF53535353
-% 5353535353FF9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A9D3A9D3A3A9D
-% 3A9D3A3A3A3A9D9D9D3A3A9D3A9D9D3A3A9D3A9D9D9D9D3A3A3A9D3A9D3A
-% 3A9D9D3A3A9D9D3A3A9D9D9D9D3A9D9D3A3A3A9D9D9D3A3A3A3A9D9D3A9D
-% 3A9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A3A3A3A7F1313131313131313137F
-% 9D3A3A9D9D9D3A3A3A9D9D3A3A9D9D9D9D3A3A3A9D9D3A3A9D9D9D3A3A9D
-% 9D3A3A9D9D9D3A3A3A3A9D9D3A3A3A9D9DFF535353535353535353FF3A3A
-% 3A9D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A3A9D3A3A3A9D3A3A3A3A
-% 9D9D9D9D9D3A9D3A3A3A9D9D9D9DFF535353535353535353FF3A9D9D9D3A
-% 3A9D9D3A9D9D3A3A9D9D9D9D9D3A3A9DFF7D9D9D3A3A3A9D9D9D3A3A3A9D
-% 9D9D7F1313131313131313131313131313131313131313137F3A3A3A9D3A
-% 9D9D9D9D3A9D9D3A9D48FFFFBD489D54A3FF719D9DA3E3FFC6A39D488BFF
-% E3A39D9DA3FF82A33A7F1313131313131313137F9D9D9D9DAFFFB19D9D9D
-% CBFF719D3A3A3A3A82FF603A3A3A002100000000210010101010C5101012
-% 161818101210101018121210101810121018181818181818181818181818
-% 1818181210101012101210181000FF1A1818181818181818181818181210
-% 1010101010121010181012181818181A1810121018181818181818181818
-% 17181012101216181818181A18181812101010AF101010FF7D0000000000
-% 0000003A3A9D3A3A3A3A9D3A9D9D3A9D3A9D3A9D3A3A3A3A3A3A9DFF5353
-% 5353535353FF9D9D9D3A3A9D9D9D9D3A9D9D3A3A9D9D9D3A3A3A9D9D3A9D
-% 3A9D9D3A3A3A9D9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A9DFF53535353
-% 535353FF9D9D9D3A3A3A9D9D9D3A3A9D3A3A9D9D9D3A3A9D3A9D3A3A9D3A
-% 9D3A3A3A3A9D9D9D3A3A9D3A9D9D3A3A9D3A9D9D9D9D3A3A3A9D3A9D3A3A
-% 9D9D3A3A9D9D3A3A9D9D9D9D3A9D9D3A3A3A9D9D9D3A3A3A3A9D9D3A9D3A
-% 9D9D9D9D9D3A3A9D9D9D9D3A3A9D3A3A3A3A9D7F131313131313137F3A9D
-% 3A3A9D9D9D3A3A3A9D9D3A3A9D9D9D9D3A3A3A9D9D3A3A9D9D9D3A3A9D9D
-% 3A3A9D9D9D3A3A3A3A9D9D3A3A3A9D9D9DFF53535353535353FF9D3A3A3A
-% 9D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D9D3A3A3A9D3A3A3A9D3A3A3A3A9D
-% 9D9D9D9D3A9D3A3A3A9D9D9D9D9DFF53535353535353FF9D3A9D9D9D3A3A
-% 9D9D3A9D9D3A3A9D9D9D9D9D3A3A9DFF7D9D9D3A3A3A9D9D9D3A3A3A9D9D
-% 9D7F1313131313131313131313131313131313131313137F3A3A3A9D3A9D
-% 9D9D9D3A9D9D3A9D3AB2FFFFFFFFFFFFD13A9D9D9DB2FFFFFFFFFFFFE3B2
-% 9D9D9D4EC8FFFFFFFF7F131313131313137F9D9D9D9D9DE3FF549D9D9D9D
-% E3FFA63A3A3A3AC8FF3A3A3A3A002100000000210010101010C510101012
-% 1816181810121012101010101210181018161818181A1818181818181818
-% 18181818121010101010101200FF18181818181012101817181818181810
-% 121010121010121012161818181818181818101818181818181818181818
-% 18181816181818181A181818181618181810AF101010FF7D000000000000
-% 00003A3A3A3A3A3A3A9D3A9D9D9D3A9D3A9D3A3A3A9D9D3A9D3AFF535353
-% 53535353FF9D9D3A9D3A3A9D3A3A9D9D9D9D3A9D9D3A3A9D3A9D9D3A3A3A
-% 3A9D9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A9D9D3A9D9DFF5353535353
-% 5353FF9D9D9D3A9D3A9D9D9D3A3A9D3A3A9D9D9D3A3A9D3A9D9D3A9D9D3A
-% 3A3A3A3A9D9D9D9D3A3A9D3A9D3A3A9D3A9D9D9D3A3A9D3A3A3A3A9D3A9D
-% 9D9D3A9D9D9D3A3A9D9D9D3A9D9D3A3A3A9D9D9D3A3A9D3A9D9D3A3A3A3A
-% 9D9D9D9D3A3A9D9D9D9D3A9D3A3A3A3A9D9D7F131313131313137F3A9D3A
-% 3A9D9D9D9D3A9D9D3A3A3A9D9D9D9D3A3A9D9D9D3A3A9D9D3A3A9D9D3A3A
-% 3A3A9D9D3A3A9D9D9D9D9D3A3A9D9D9DFF53535353535353FF9D3A3A3A9D
-% 9D9D3A3A9D3A9D9D9D3A9D3A9D9D9D9D3A3A9D3A9D3A3A9D3A3A3A3A9D9D
-% 9D9D9D3A3A9D3A3A3A9D9D9D9DFF53535353535353FF3A9D9D9D9D3A3A9D
-% 3A9D9D9D3A3A9D3A9D9D9D3A9D9DFF7D9D9D9D3A3A9D9D9D9D3A3A9D3A9D
-% 9D7F131313131313131313131313131313131313137F3A3A9D3A3A3A9D9D
-% 9D3A9D9D3A9D9D3A9D548BC8FFB1B79D3A3A9D9D9DA682E3FFC8C0A63A9D
-% 9D3A9DA3C0B1FFFF7F131313131313137FB29D9D9DC6FF773A9D9D3A9DAF
-% FFDA3A3A3A60FF823A3A3A3A002100000000210010101010C51010101010
-% 121818181818181612161216121012101218181818181818181012101817
-% 181818181810121010121000FF1818111210101010121818181818181818
-% 181210101210101210121810121618181818181818181A18181818181818
-% 18181818181818181A1818181818181810AF101210FF7D00000000000000
-% 003A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A9D3A9D9D3A3A3A7FFFFF5353
-% 53FFFFFF9D9D9D3A3A9D9D9D9D9D9D3A9D9D9D9D3A3A3A9D9D9D3A9D3A9D
-% 9D3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A9D9D9D3AFFFFFFFF535353FF
-% FF9D9D9D9D3A3A3A9D9D9D3A3A3A3A9D9D9D9D9D3A3A9D9D3A3A3A3A3A3A
-% 3A3A9D9D9D9D3A3A3A3A3A9D9D3A3A9D9D9D9D3A9D3A9D9D3A3A3A3A9D9D
-% 9D3A9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D9D9D3A3A3A3A9D9D3A9D3A3A9D
-% 9D9D9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A9D7F7F1313137F7F7F7F9D9D3A
-% 9D9D9D3A9D9D9D9D3A3A9D9D9D3A9D3A3A9D9D9D3A9D9D9D3A9D9D9D3A3A
-% 3A9D9D3A3A3A9D9D9D3A3A9D9D9D9D7FFFFF535353FFFFFF3A3A3A3A9D9D
-% 9D9D3A3A3A9D9D9D3A3A9D3A9D9D9D3A3A3A9D9D3A3A3A3A9D3A3A3A3A9D
-% 9D3A3A3A3A3A9D9D9D9D9D9DFFFFFF535353FFFF3A9D9D3A9D9D3A3A9D3A
-% 9D9D9D3A3A9D3A9D9D9D3A3A3AFF7D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D
-% 7F131313131313131313131313131313131313137F3A3A3A3A3A9D9D3A9D
-% 9D3A9D9D9D9D9D3A3A9D9D3A3A9D3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D
-% 3A9D3A3A9D9D9D9D7F7F1313137F7F7FDA3A9D3A3A3A3A3A9D9D3A9D9D3A
-% 9D9D3A3ADAFF483A3A3A3A002100000000210012101012C5101010101018
-% 181820191818181818181818101010121012181818111210101010121818
-% 1818181818181812101000FF181818161812181612101212181818181018
-% 101813181818181612161818181818181818181A181818181A1818181812
-% 10131618181818181818181210121012AF121618FF7D0000000000000000
-% 3A3A3A3A3A3A3A9D3A9D9D9D9D9D9D9D3A9D3A9D9D3A7F7F131313FFFFFF
-% 535353FFFF9D3A3A9D9D9D9D9D9D3A9D9D9D9D3A3A3A9D9D9D3A9D3A9D9D
-% 3A9D9D9D9D3A9D9D3A9D3A3A3A3A3A3A3A9D9DFFFF535353FFFFFFFF3A3A
-% 9D9D9D9D3A3A3A9D9D9D3A3A3A3A9D9D9D9D9D3A3A9D9D3A3A3A3A3A3A3A
-% 3A9D9D9D9D3A3A3A3A3A9D9D3A3A9D9D9D9D3A9D3A9D9D3A3A3A3A9D9D9D
-% 3A9D9D9D9D9D9D9D9D3A9D9D3A3A3A9D9D9D3A3A3A3A9D9D3A9D3A3A9D9D
-% 9D9D3A3A9D9D3A9D3A3A3A3A3A3A3A3A9D9D3A7F7F7F7F1313137F7F3A9D
-% 9D9D3A9D9D9D9D3A3A9D9D9D3A9D3A3A9D9D9D3A9D9D9D3A9D9D9D3A3A3A
-% 9D9D3A3A3A9D9D9D3A3A9D9D7F7F131313FFFFFF535353FFFF3A3A9D9D9D
-% 9D3A3A3A9D9D9D3A3A9D3A9D9D9D3A3A3A9D9D3A3A3A3A9D3A3A3A3A9D9D
-% 3A3A3A3A3A9D9D9D9DFFFF535353FFFFFF9D3A3A9D9D3A9D9D3A3A9D3A9D
-% 9D9D3A3A9D3A9D9D9D3A3A3AFF7D9D9D3A3A3A9D9D9D9D3A3A9D3A9D9D7F
-% 131313131313131313131313131313131313137F3A3A3A3A3A9D9D3A9D9D
-% 3A9D9D9D9D9D3A3A9D9D3A3A9D3A3A3A3A3A9D9D9D3A3A9D3A3A9D3A9D3A
-% 9D3A3A9D9D9D9D9D9D7F7F7F1313137F7F9D3A3A3A3A3A9D9D3A9D9D3A9D
-% 9D3A60FF823A3A3A3A3A002100000000210016181818C510101010101018
-% 181818181818181810181818181012101018181818161812181612101212
-% 18181818101810181300FF10181018101818181818101618181818181818
-% 181816181212101210121818181818181818181818181818181A18181618
-% 181818181818181818AFAFAFAFAFAFAF121018FF7D00000000000000003A
-% 3A3A9D3A3A3A9D3A9D9D3A9D3A9D3A9D3A9D3A3A7F1313131313FF535353
-% 53535353FF9D9D9D9D9D3A9D9D9D9D9D3A3A3A3A9D9D9D9D3A9D3A9D3A3A
-% 3A9D9D9D3A3A9D9D9D3A9D3A3A3A3A3A9DFF53535353535353FF9D9D9D9D
-% 9D9D9D3A3A9D9D9D9D9D3A3A9D9D9D9D9D9D3A3A9D9D3A9D3A3A3A3A3A3A
-% 3A9D9D9D9D3A3A9D9D9D9D3A3A9D9D9D3A9D3A9D9D9D9D3A3A9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D9D3A9D3A9D9D9D3A3A9D9D9D9D9D
-% 9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D9D3A3A7F131313131313137F9D9D
-% 9D9D9D9D9D9D3A3A3A9D9D3A3A3A3A9D9D9D9D9D9D3A9D9D9D3A3A3A9D9D
-% 9D3A3A3A9D9D9D3A9D3A7F1313131313FF53535353535353FF3A9D3A9D9D
-% 3A3A3A9D9D3A3A3A3A3A9D9D9D3A3A3A9D9D3A9D3A3A3A3A3A3A9D9D9D3A
-% 3A3A9D9D3A9D9DFF53535353535353FF3A3A3A3A3A3A9D9D3A3A3A3A9D9D
-% 9D3A9D3A3A9D9D9D3A3A3AFF7D9D9D3A9D3A9D9D9D9D3A3A3A9D3A9D9D7F
-% 13131313131313131313131313131313137F3A3A3A3A3A3A9D3A3A9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A3A3A9D9D9D9D3A9D9D9D9D3A9D9D9D9D9D3A9D3A
-% 3A9D9D3A3A9D9D9D7F131313131313137F3A3A9D9D9D9D9D9D9D9D3A9D3A
-% 3AC8C83A3A3A3A3A3A002100000000210010181018C51012101010121012
-% 101217181818101818181810121010101810181018101818181818101618
-% 181818181818181800FF1012121212101018181818181210121018121612
-% 161210101010101010101018181818181818181818181A18181818181818
-% 1818181818181818181818131010AF101210FF7D00000000000000003A3A
-% 3A3A3A9D3A9D3A9D9D9D9D9D9D3A9D3A3A3A9D7F1313131313FF53535353
-% 535353FF3A9D9D9D3A9D9D9D9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A3A3A
-% 9D9D9D3A9D9D3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A3A9D3A9D
-% 3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D3A9D3A
-% 3A9D3A9D3A3A3A3A9D3A3A9D3A9D3A3A3A3A9D3A9D3A3A9D3A3A9D3A3A3A
-% 3A3A3A3A9D3A3A3A9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A9D9D3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D7F131313131313137F3A9D3A
-% 9D3A3A9D3A3A3A9D3A9D3A3A3A3A3A9D3A9D3A3A9D9D3A9D9D3A9D9D9D9D
-% 9D9D9D9D3A9D3A3A3A7F1313131313FF53535353535353FF3A3A3A9D3A3A
-% 3A9D3A9D3A3A9D3A9D3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3AFF53535353535353FF9D3A9D3A9D3A9D3A3A3A3A9D3A9D9D
-% 3A9D3A9D3A9D9D3A9D3AFF7D3A9D3A9D3A9D9D9D9D9D3A3A3A9D3A3A9D7F
-% 1313131313131313131313131313137F3A3A3A3A3A3A9D3A9D9D3A9D9D9D
-% 3A9D9D9D9D3A9D3A9D3A3A9D9D9D3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D
-% 3A3A9D9D3A9D9D7F131313131313137F3A9D3A9D9D9D3A9D9D9D3A9D3A8B
-% FF593A3A3A3A3A3A002100000000210012101218C5101010101010101012
-% 181812181618101210121010101010121012121212101018181818181210
-% 1210181216121600FF121010101010121810181818161010121010101210
-% 12161210101010101010101210161818181818181A1820181A1818181818
-% 18181818181818181818161810AF101010FF7D00000000000000003A3A3A
-% 3A3A9D3A9D3A9D9D9D9D9D9D3A9D3A3A3A7F1313131313FF535353535353
-% 535353FF9D9D9D3A9D9D9D9D3A3A9D3A3A9D9D9D9D9D3A9D3A9D3A3A3A9D
-% 9D9D3A9D9D3A3A3A3A3A3A3A3A3AFF535353535353535353FF3A9D3A9D3A
-% 3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A9D3A9D3A3A
-% 9D3A9D3A3A3A3A9D3A3A9D3A9D3A3A3A3A9D3A9D3A3A9D3A3A9D3A3A3A3A
-% 3A3A3A9D3A3A3A9D3A9D3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A9D9D3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D7F1313131313131313137F9D3A9D
-% 3A3A9D3A3A3A9D3A9D3A3A3A3A3A9D3A9D3A3A9D9D3A9D9D3A9D9D9D9D9D
-% 9D9D9D3A9D3A3A7F1313131313FF535353535353535353FF3A3A9D3A3A3A
-% 9D3A9D3A3A9D3A9D3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3AFF535353535353535353FF3A9D3A9D3A9D3A3A3A3A9D3A9D9D3A
-% 9D3A9D3A9D9D3A9D3AFF7D3A9D3A9D3A9D9D9D9D9D3A3A3A9D3A3A9D7F7F
-% 131313131313131313131313137F7F3A3A3A3A3A3A9D3A9D9D3A9D9D9D3A
-% 9D9D9D9D3A9D3A9D3A3A9D9D9D3A3A3A9D3A9D3A9D9D9D9D9D9D9D9D9D3A
-% 3A9D9D3A9D7F1313131313131313137F9D3A9D9D9D3A9D9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A002100000000210010101210C512121012101012101012
-% 101817121210181618101210101010121010101010121810181818161010
-% 12101010121000FF10101012101210101218181810121012161218121612
-% 101010101008100E1010101012121618181818181A181818181818181818
-% 181818181818181818181810AF101010FF7D00000000000000003A3A3A3A
-% 3A3A3A9D3A9D9D9D3A9D9D3A9D3A3A9D7F1313131313FF53535353535353
-% 5353FF9D9D9D9D9D9D9D9D3A3A9D3A9D9D9D9D9D9D3A9D9D9D3A3A3A9D9D
-% 9D3A3A9D3A9D3A3A3A3A3A3A3AFF535353535353535353FF3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A7F1313131313FF535353535353535353FF3A3A3A3A9D9D3A
-% 3A3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A
-% 3A9D3AFF535353535353535353FF9D3A9D3A9D9D9D9D9D9D9D9D9D3A3A9D
-% 3A9D3A9D3A9D9D3AFF7D3A3A3A9D3A3A9D3A9D9D9D3A3A3A3A9D3A3A9D7F
-% 13131313131313131313137F3A3A3A3A3A3A3A3A3A9D3A3A9D3A9D9D9D9D
-% 9D3A3A9D9D9D3A3A9D3A9D3A9D3A3A9D9D3A9D3A9D9D9D9D3A9D3A9D3A9D
-% 9D9D9D9D7F1313131313131313137F9D3A9D9D9D9D9D9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A002100000000210010101012C51817181612101010121618
-% 181818101618181816181618181010101012101210101218181810121012
-% 161218121600FF1012101010101010101012181818181012101010101210
-% 1210101010101010101010101012181818181A18181A1818181818171818
-% 1216181818181816181810AF101008FF7D00000000000000003A3A3A3A3A
-% 3A3A9D3A9D9D3A9D9D9D3A3A9D3A9D7F1313131313FF5353535353535353
-% 53FF3A3A9D3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A9D9D9D3A3A9D9D9D9D
-% 3A3A9D3A3A3A3A3A9D3A3A3AFF535353535353535353FF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A7F1313131313131313137F3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F1313131313FF535353535353535353FF3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3AFF535353535353535353FF3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A9D3A3A3A9DFF7D3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A7F
-% 7F7F13131313137F7F7F3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A9D9D3A9D9D
-% 3A3A9D9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D
-% 9D9D3A7F1313131313131313137F9D3A9D3A9D3A3A9D9D3A9D3A3A3A9D3A
-% 3A3A3A3A3A002100000000210010081010C5181818181818181613181818
-% 181818121818181818181818101012101010101010101012181818181012
-% 1010101000FF121010121012101210121010121612161216121813181718
-% 101210101010101010101010101816181818181A18181818181812101210
-% 12181217181818121810AF100810FF7D00000000000000003A3A3A3A3A3A
-% 3A9D3A9D9D3A9D9D9D3A3A9D3A9D3A7F1313131313FF53535353535353FF
-% 9D3A3A9D3A3A3A3A3A3A9D3A9D9D9D9D9D3A9D3A9D9D9D3A3A9D9D9D9D3A
-% 3A9D3A3A3A3A3A9D3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A7F1313131313FF53535353535353FF3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3AFF53535353535353FF3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A9D3A3A3A9DFF7D3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A7F7F7F7F7F3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A9D3A9D9D3A9D9D3A
-% 3A9D9D3A9D3A3A9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D3A9D7F131313131313137F9D9D3A9D3A9D3A3A9D9D3A9D3A3A3A9D3A3A
-% 3A3A3A3A002100000000210008101010C51818181A18181A181818181A18
-% 181818181818181818181810121010121012101210121010121612161216
-% 12181300FF10101210101210181210121010121018181818181618181818
-% 1610101010100A0E10101212181218181818181818181818101012101010
-% 121618121612181610AF10080AFF7D00000000000000003A3A3A3A3A3A3A
-% 9D3A9D9D9D9D9D9D3A9D9D3A3A3A7F1313131313FF535353535353FFFFFF
-% 9D9D3A9D3A9D9D3A9D3A9D9D9D3A9D9D9D9D9D9D9D3A9D9D3A9D3A9D3A9D
-% 3A9D3A9D3A3A3A3A9D3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313137F7F7F3A3A3A3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A7F7F1313131313FF5353535353FFFFFF3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A
-% 3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A9D9D3A9D9D9D9D3A3A9D
-% 3A9D9D9D3A3A9D3A9D9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D
-% 9D9D7F13131313137F7F7F9D9D3A3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A
-% 3A3A3A0021000000002100080A1010C51818181820181818181818181818
-% 181812101210181216181010101210101210181210121010121018181818
-% 181600FF12181018181818181A1818181810101818161216121012101218
-% 181818121010101010101010101818181818181818101018121816121612
-% 1012101210101218AF101010FF7D00000000000000003A3A3A9D3A3A3A9D
-% 3A9D9D3A9D9D9D3A9D3A3A7F7F137F7F1313137FFFFF5353FFFF535353FF
-% FF9D9D3A3A3A3A9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D9D9D9D9D3A3A9D
-% 9D3A9D9D3A3A3A3AFFFF53FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F137F7F1313137F7F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D3A3A
-% 7F7F13137F7F1313137FFFFF53FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF
-% 53FFFF535353FFFF3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D3A9D3A3A9D3A
-% 9D9D9D3A9D9D9D9D9D9D3A3A9D3A9D9D3A9D9D3A9D3A3A9D9D9D9D9D9D9D
-% 9D3A7F7F137F7F1313137F7F9D9D3A9D9D9D9D9D3A9D3A3A3A3A3A9D3A3A
-% 3A3A002100000000210010101010C51816181A181A181A18181A181A1816
-% 1210101210121012101812181018181818181A1818181810101818161216
-% 1200FF101012101818181818181A18181218181818181812101810101218
-% 181010101010101010101210121618181818161210121018101818181810
-% 18101210121012AF121010FF7D00000000000000003A3A3A9D3A3A3A9D3A
-% 9D9D3A9D9D9D3A9D3A7F13131313137F7F7F9D9D3AFFFF53535353535353
-% FF9D3A3A3A3A9D9D9D3A9D9D9D9D9D9D3A9D9D3A3A9D9D9D9D9D3A3A9D9D
-% 3A9D9D3A3A3AFF5353535353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A7F131313131313137F3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A9D3A7F13
-% 13131313137F7F7F3A3A9DFF53535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 5353FFFFFF3A9D3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D9D3A9D3A3A9D3A9D
-% 9D9D3A9D9D9D9D9D9D3A3A9D3A9D9D3A9D9D3A9D3A3A9D9D9D9D9D9D9D9D
-% 3A9D3A7F131313131313137F9D3A9D9D9D9D9D3A9D3A3A3A3A3A9D3A3A3A
-% 3A002100000000210010101010C5C5C5C5C5C5C518181A181A1818181812
-% 101210121012101812101012101818181818181A18181218181818181812
-% 00FF10121010121012181818181818181818181818181718131010101010
-% 121010101010101010101210101212121012101010121012181818181818
-% 101210101010AF121818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D
-% 9D9D9D9D9D3A9D9D7F131313131313137F9D3A9D3AFF53535353535353FF
-% 3A9D3A9D9D3A9D9D9D9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D3A3A9D3A3A
-% 3A3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313137F3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313
-% 13131313137F3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A9D3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A9D9D9D9D3A3A9D9D3A3A
-% 9D3A9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A7F131313131313137F3A3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A
-% 002100000000210018181813C5181818181A181818181818181818181010
-% 101010101012101010121010121012181818181818181818181818181700
-% FF1810101210101818181818181818181818181818181816101012101010
-% 101010101010101210101210121010121010101010101216181818181818
-% 1010101010AF101018FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D
-% 9D3A9D9D3A9D7F1313131313131313137F9D3AFF535353535353535353FF
-% 3A9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D3A3A3A9D3A3A9D
-% 9D9D9DFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D3A9D9D3A9D9D3A9D3A9D
-% 3A9D3A9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A9D3A9D3A9D3A9D9D3A9D3A3A
-% 9D3A3A9D3A9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D9D3A9D3A9D3A
-% 9D3A9D3A3A9D3A9D3A9D3A7F1313131313131313137F9D3A3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313
-% 13131313137F3A3AFF535353535353535353FF3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3AFF535353535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A3A3A9D9D9D3A9D
-% 9D9D9D9D9D9D3A9D3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D
-% 7F1313131313131313137F3A9D9D9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A00
-% 2100000000210010181816C5181818181818181818181818181810101010
-% 1010101210101818101012101018181818181818181818181818181800FF
-% 181818101612181018181818181818181818181818181818181010121018
-% 181010101210101012101010101210101210101010101218181818181810
-% 12101010AF0A1010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D
-% 3A9D9D3A9D7F1313131313131313137F9D3AFF535353535353535353FF3A
-% 9D9D9D9D9D9D9D9D9D3A9D9D9D3A9D3A9D9D9D9D9D9D3A3A3A9D3A3A9D9D
-% 9D9DFF535353535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D3A9D9D3A9D3A9D9D9D9D3A9D3A9D9D3A9D9D3A9D3A9D3A
-% 9D3A9D9D3A3A9D9D3A9D3A9D9D3A9D3A3A9D3A9D3A9D3A9D9D3A9D3A3A9D
-% 3A3A9D3A9D3A9D3A9D3A3A9D3A9D3A9D3A3A9D3A9D3A9D9D3A9D3A9D3A9D
-% 3A9D3A3A9D3A9D3A9D3A7F1313131313131313137F9D3A3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313131313
-% 131313137F3A3AFF535353535353535353FF3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3AFF53535353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% FF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A9D9D9D3A3A3A9D9D9D3A9D9D
-% 9D9D9D9D9D3A9D3A3A9D3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A9D9D9D7F
-% 1313131313131313137F3A9D9D9D9D9D3A9D3A9D3A3A3A3A3A3A3A3A0021
-% 00000000210010101012C518181818181818181718181818121012101010
-% 12101018181818181810161218101818181818181818181818181800FF1A
-% 181812121210181012121018181818181818181216181818101210181818
-% 101018101818181816121012101012161010101010121818181818181012
-% 101010AF100810FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D
-% 9D9D3A9D7F1313131313131313137F3A3AFF535353535353535353FF3A9D
-% 3A3A3A9D9D9D9D9D9D9D9D9D3A3A9D9D3A9D3A3A9D9D3A3A9D9D3A3A3A3A
-% 3AFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A7F1313131313131313137F3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 1313137F3A9DFF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A9D3A9D3A9D9D3A3A9DFF5353535353535353
-% 53FF3A9D3A9D3A9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D9DFF
-% 7D9D9D9D9D9D3A9D9D9D9D9D3A9D9D9D9D3A9D3A9D3A9D3A9D3A9D3A9D9D
-% 3A9D9D3A9D9D3A9D9D3A9D3A9D9D3A9D3A9D9D9D9D3A3A9D9D9D9D3A3A9D
-% 9D9D9D3A9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A3A3A9D9D9D9D3A9D7F13
-% 13131313131313137F3A9D9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A3A002100
-% 000000210008101010C51818171818181818181818181612101010101010
-% 12181818181A181812121210181012121018181818181818181200FF1818
-% 121010101012101010121012181818171818161812181012121012121818
-% 1818181818181A1818181010181818101210101010101818181818161217
-% 1210AF101010FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3A3A9D
-% 9D3A9D9D7F131313131313137F9D3A3A9DFF53535353535353FF9D3A3A9D
-% 9D9D9D3A9D9D9D9D3A9D3A9D9D9D3A9D3A9D3A9D9D3A3A9D9D9D9D9D9D9D
-% 9DFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D9D3A9D3A3A9D9D3A9D9D9D9D3A9D
-% 3A9D3A3A9D3A3A9D3A3A9D3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A3A9D
-% 3A3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D3A9D3A3A
-% 9D3A3A9D3A3A9D3A9D7F131313131313137F3A3A3A9D3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F131313131313
-% 137F3A3A3A3AFF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF7D
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3A9D9D3A9D9D3A9D3A
-% 9D9D9D9D9D3A9D9D9D9D9D9D3A3A9D9D9D3A3A3A9D3A3A9D9D60FF8B7F13
-% 1313131313137F9D3A9D9DC6FFB23A9D3A3A3A3A3A3A3A3A3A3A00210000
-% 0000210010101010C5101218181818181818111813181010101010101218
-% 1818181A18181210101010121010101210121818181718181600FF181810
-% 101010101210101010101216181818181012101210101010101010101818
-% 181818181818181818181818181818101010101012181818181818181818
-% 10AF181210FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D3A3A9D9D
-% 3A9D9D7F131313131313137F9D3A3A9DFF5353535353FFFFFF9D3A3A9D9D
-% 9D9D3A9D9D9D9D3A9D3A9D9D9D3A9D3A9D3A9D9D3A3A9D9D9D9D9D9D9D9D
-% FF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D9D3A9D3A3A9D9D3A9D9D9D9D3A9D3A
-% 9D3A3A9D3A3A9D3A3A9D3A3A3A9D3A3A9D3A9D3A3A3A3A3A3A9D3A3A9D3A
-% 3A3A9D3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A9D3A9D3A3A9D
-% 3A3A9D3A3A9D3A9D7F13131313137F7F7F3A3A3A9D3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F13131313131313
-% 7F3A3A3A3AFF5353535353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53535353535353FF3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF7D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D9D9D9D9D9D3A3A9D9D3A9D9D3A9D3A9D
-% 9D9D9D9D3A9D9D9D9D9D9D3A3A9D9D9D3A3A3A9D3A3A9D9DC8E33A7F1313
-% 1313137F7F7F9D3A9D9D9DE3E33A9D3A3A3A3A3A3A3A3A3A3A0021000000
-% 00210012101010C510101818181818181818181810121010101012161818
-% 181A1818181010101010121010101010121618181818101200FF18181810
-% 10080810101010100B0E0A10101618181818181810181316121612161210
-% 121618181818181818161218101818181818161010101012101010121010
-% AF121818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D9D3A9D9D
-% 7F7F137F7F1313137F7F9D9D3A3A9D9DFFFF53FFFF535353FFFF9D9D3A9D
-% 9D9D9D3A9D9D9D3A9D9D3A9D9D9D3A9D3A9D9D3A9D9D9D9D3A9D9DFFFF53
-% FFFF535353FFFF9D9D9D3A9D3A9D9D3A9D9D9D9D9D9D3A9D3A9D9D3A9D9D
-% 9D9D9D9D3A9D9D3A3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D7F7F137F7F1313137F7F9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D7F7F137F7F1313137F7F9D
-% 9D9D9D9D9DFFFF53FFFF535353FFFF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFF53FFFF535353FFFF9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF7D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D3A3A9D3A9D3A9D9D3A9D9D3A
-% 9D9D9D9D9D9D9D3A9D3A9D9D9D3A9D9D9D9D9D9D9D9DC0FF609D3A7F7F13
-% 7F7F1313137F7F9D9D9DB2FF829D3A3A3A9D3A3A3A3A3A3A002100000000
-% 210018181618C51010181618181A1818181310101810181012181818181A
-% 18181818181010080810101010100B0E0A10101618181800FF1818181612
-% 101010101010101010101010121818181818161018101612171218101210
-% 1218181818181818181018101818181818181818101210101210101010AF
-% 161818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D9D7F13
-% 131313137F7F7F3A9D3A9D3A3A9D9D9D3AFF53535353535353FF9D3A9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D9D9D9D9DFF53535353
-% 53FFFFFF9D9D3A3A9D9D3A9D9D9D3A9D9D9D3A9D9D3A9D9D9D3A9D9D3A9D
-% 9D3A9D9D9D9D3A3A9D9D3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A9D3A3A9D3A9D3A9D9D9D3A9D3A9D3A9D3A3A3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A9D3A3A9D9D3A9D3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A
-% 9D3A9D9D3A9D3A9D3A9D9D9D9D9D9D3A9D7F13131313137F7F7F9D9D9D9D
-% 9D9D9D9D9D9DFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF5353535353FFFFFF9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF7D9D9D9D
-% 3A9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9D9D9D9DFFFFFFFFFF3A9D3A9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D3A3A9D9D3A9D3A9D9D9D9D9D9D
-% 3A3A9D9D3A9D3A9D9D3A9D9D9D9D9D3A9D3A9D9DA3FFDA3A9D3A3A9D7F13
-% 1313131313137F9D3A9DDAFFA33A3A3A3A3A3A3A3A3A3A00210000000021
-% 0018181818C518181818181818181818181012101218161216181818181A
-% 1818181816121010101010101010101010101218181800FF181618181818
-% 181012101010101010101010121618181818121812181218121012101210
-% 12101818181618181018121012101818181818121010121012101210AF12
-% 1818FF7D00000000000000003A3A3A3A3A3A3A9D3A9D9D9D3A9D9D7F1313
-% 13131313137F3A9D3A9D3A3A9D9D9D3AFF53535353535353FF9D3A9D3A9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D9D9D9D9D9DFF5353535353
-% 5353FF9D9D3A3A9D9D3A9D9D9D3A9D9D9D3A9D9D3A9D9D9D3A9D9D3A9D9D
-% 3A9D9D9D9D3A3A9D9D3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A9D3A3A9D3A9D3A9D9D9D3A9D3A9D3A9D3A3A3A3A3A3A9D3A3A
-% 3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A
-% 9D3A3A9D9D3A9D3A7F131313131313137F3A3A3A3A3A3A3A3A3A3A9D3A9D
-% 3A9D9D3A9D3A9D3A9D9D9D9D9D9D3A9D7F131313131313137F9D9D9D9D9D
-% 9D9D9D9D9DFF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF53535353535353FF9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF7D9D9D9D3A
-% 9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9DFFFFFF5353535353FFFFFF9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A9D9D3A9D9D9D3A3A9D9D3A9D3A9D9D9D9D9D9D3A
-% 3A9D9D3A9D3A9D9D3A9D9D9D9D9D3A9D3A9D9DC0FFB23A9D3A3A9D7F1313
-% 13131313137F9D3A9DB2FFC03A3A3A3A3A3A3A3A3A3A0021000000002100
-% 18181818C5181818181818181818181818131618101218181818181A1818
-% 18161818181818101210101010101010101012161800FF18121216181818
-% 12161210101010100A0F1010121818181618171816181618101210101010
-% 121018181812161218101010181818181818121612181018101810AF1012
-% 16FF7D00000000000000003A3A3A3A3A3A3A9D3A9D3A9D9D9D7F13131313
-% 13131313137F3A9D9D3A3A3A9D3AFF535353535353535353FF9D9D3A9D3A
-% 9D9D9D9D9D3A9D3A9D3A9D9D9D3A9D3A3A9D9D9D9D9DFF53535353535353
-% 5353FF9D9D9D9D9D9D3A9D9D9D9D9D9D9D9D3A9D3A9D3A9D9D9D9D9D9D3A
-% 9D3A9D3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D9D9D9D3A3A3A3A3A9D9D3A3A
-% 3A9D9D3A3A3A3A3A9D3A3A3A3A3A9D9D3A3A3A3A3A9D9D3A3A3A9D9D9D3A
-% 3A3A3A9D9D3A3A3A3A9D9D3A3A9D9D3A3A3A3A3A3A9D9D9D3A3A3A9D9D3A
-% 3A3A9D9D9D9D7F1313131313131313137F3A9D3A3A3A3A3A9D9D3A3A3A3A
-% 9D3A3A9D9D9D9D3A3A3A3A9D9D3A7F1313131313131313137F3A3A3A3A3A
-% 3A9D3AFF535353535353535353FF3A9D9D9D3A3A3A3A3A3A9D3A3A3A3A3A
-% 9D9D9D3A3A3A3A9D9D3A3A3AFF535353535353535353FF3A3A9D9D9D9D9D
-% 3A3A3A3A3A3A9D9D3A3A3A3A9D3A3A9D3A3A3A3A9D9D9DFF7D9D3A9D9D3A
-% 9D9D3A9D9D3A9D9D3A9D9D3A3A9DFF5353535353535353535353FF9D9D9D
-% 9D3A9D3A9D9D9D9D9D9D9D3A9D9D9D3A3A9D71D1FFFFB1BD9D9D9D9D9DFF
-% FF3A9D9DFFFF9D9D9D9D3A9DFFFF9D9D3A9DE3E39D3A9D3AC67F13131313
-% 13131313137F9D9D9DC8E33A3A3A3A3A3A3A3A3A3A002100000000210012
-% 161818C518181A1818181A18181818181818181818161818181818181818
-% 12121618181812161210101010100A0F1010121800FF1810101012101216
-% 121810121010121010101010121618181818181818181810101010121010
-% 1012101216121810181018181818181818161218101810181210AF101212
-% FF7D00000000000000003A3A9D3A3A9D3A9D3A9D9D9D3A9D7F1313131313
-% 131313137F3A9D9D3A9D9D9D9DFF535353535353535353FF9D9D9D3A9D3A
-% 9D3A9D3A9D9D9D9D9D9D3A9D3A9D3A3A9D9D9D9D9DFF5353535353535353
-% 53FF9D3A9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D3A9D
-% 9D9D9D3A3A9D9D9D9D3A3A3A3A3A9D3A9D9D9D9D3A3A9D3A3A9D3A9D9D3A
-% 9D9D9D3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D9D3A9D9D9D3A3A
-% 3A3A9D3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A9D9D9D9D3A3A3A9D9D9D9D
-% 9D9D9D9D9D7F1313131313131313137F9D9D9D3A3A3A3A9D9D3A9D9D3A9D
-% 9D3A9D3A3A3A3A3A3A3A3A9D3A7F1313131313131313137F9D3A3A3A3A9D
-% 9D3AFF535353535353535353FF3A3A9D9D9D3A3A3A3A3A9D9D9D9D3A3A9D
-% 9D9D9D9D3A9D9D3A3A3A3AFF535353535353535353FF3A3A3A9D9D9D9D3A
-% 3A3A3A3A3A9D9D9D9D3A3A3A3A3A9D9D9D3A3A9D9D9DFF7D9D9D9D3A9D9D
-% 9D9D9D9D9D9D3A9D9D3A9DFFFF53535353535353535353535353FFFF9D9D
-% 9D9D9D9D9D9D9D9D9D9D3A3A9D9D3A3AD1FFFFFFFFFFFFC8A39D9D9DFFFF
-% 9D9D9DFFFF9D3A9D9D9D3AFFFF3A9D9DB2FFC69D3A3A3A9D7F1313131313
-% 131313137F9D9D9D8BFF609D3A3A3A3A3A3A3A3A00210000000021001212
-% 1818C518181818181818181A181818181818181818181818181818181810
-% 1010121012161218101210101210101010101200FF181612101010101210
-% 121612101216101010101210121818181818181818181612101010101210
-% 12101210121612181818181818161210121012101210121010AF101010FF
-% 7D00000000000000003A3A9D3A3A9D3A9D3A9D9D9D3A9D7F131313131313
-% 1313137F3A9D9D3A9D9D9D9DFF535353535353FFFFFFFF9D9D9D3A9D3A9D
-% 3A9D3A9D9D9D9D9D9D3A9D3A9D3A3A9D9D9D9D9DFF535353535353535353
-% FF9D3A9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9D9D9D3A9D9D
-% 9D9D3A3A9D9D9D9D3A3A3A3A3A9D3A9D9D9D9D3A3A9D3A3A9D3A9D9D3A9D
-% 9D9D3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D9D3A9D9D9D3A3A3A
-% 3A9D3A3A3A3A3A9D9D9D3A9D3A3A3A3A3A3A9D9D9D9D3A3A3A9D9D9D9D9D
-% 9D9D9D9D7F1313131313137F7F7F7F9D9D9D3A3A3A3A9D9D3A9D9D3A9D9D
-% 3A9D3A3A3A3A3A3A3A3A9D3A7F1313131313131313137F9D3A3A3A3A9D9D
-% 3AFF535353535353FFFFFFFF3A3A9D9D9D3A3A3A3A3A9D9D9D9D3A3A9D9D
-% 9D9D9D3A9D9D3A3A3A3AFF535353535353535353FF3A3A3A9D9D9D9D3A3A
-% 3A3A3A3A9D9D9D9D3A3A3A3A3A9D9D9D3A3A9D9D9DFF7D9D9D9D3A9D9D9D
-% 9D9D9D9D9D3A9D9D3A9DFF535353535353535353535353535353FF9D9D9D
-% 9D9D9D9D9D9D9D9D9D3A3A9D9D3A71FFD1AF9D9DA3C6FFC69D9D9DFFFF9D
-% 9D9DFFFF9D3A9D9D9D3AFFFF3A9D9DC0FFB49D3A3A3A9D7F131313131313
-% 137F7F7F9D9D9D66FF829D3A3A3A3A3A3A3A3A0021000000002100101012
-% 18C518181818181818181818181A18181818181818181818181818181612
-% 10101010121012161210121610101010121000FF18181816101010101012
-% 101210181216121010101012161818181818181818121810101010101010
-% 121012101810181818181818181210101210121012101210AF100F10FF7D
-% 00000000000000003A3A3A3A3A3A3A9D3A9D3A9D7F7F137F131313131313
-% 137F9D9D3A9D3A9D9D9D9D3AFF535353FFFF535353FFFF9D9D9D9D3A9D3A
-% 9D3A9D9D9D9D9D9D9D9D3A9D3A9D9D9D9D9DFFFFFF53535353535353FF9D
-% 9D9D9D9D9D9D3A9D9D9D3A3A9D3A9D9D9D3A9D9D3A9D9D9D9D3A9D9D9D9D
-% 3A3A3A9D9D9D9D3A3A3A3A3A3A3A9D9D9D9D3A3A3A3A9D3A3A9D9D9D9D9D
-% 9D3A3A3A3A9D9D3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D9D9D9D3A3A3A3A
-% 3A3A3A3A9D9D9D9D9D9D3A9D3A3A3A3A3A9D9D9D9D3A3A3A9D9D9D9D9D9D
-% 9D9D9D9D7F1313137F7F1313137F7F9D9D3A3A3A3A9D3A3A9D9D9D9D3A3A
-% 3A3A3A3A3A3A3A3A3A9D7F7F7F131313131313137F9D9D9D3A3A3A9D3A3A
-% 3AFF535353FFFF535353FFFF9D3A9D9D9D3A3A3A3A3A9D3A9D9D3A9D9D9D
-% 9D9D9D9D3A3A3AFFFF53FF53535353535353FF9D3A3A3A9D9D9D9D9D3A3A
-% 3A3A9D9D9D9D9D3A3A3A3A3A9D9D3A9D3A9D9D9DFF7D9D9D9D9D3A9D9D3A
-% 9D3A9D9D9D9D9D9DFF5353535353535353535353535353535353FF9D3A9D
-% 3A9D9D3A9D9D9D9D3A3A9D9D3AB1FFA39D3A9D9D3AFFFF9D3A3AFFFF9D9D
-% 3AFFFF9D3A9D3A9D9DFFFF9D9D9DCBFFA93A9D3A3A9D9D7F131313137F7F
-% 1313137F7F9D54FF963A3A3A3A3A3A3A3A3A00210000000021000F101010
-% C5101818181818181A18181A181A18181818181818181818181818181816
-% 101010101012101210181216121010101000FF1818181818121010101010
-% 101818181810101010101012181818181818181818181012101010121010
-% 1010121018181018181818181816121010101210101010AF100A10FF7D00
-% 000000000000003A3A3A3A3A3A3A9D3A9D9D7F1313137F13131313131313
-% 7F9D9D3A9D3A9D9D9D9D9DFF5353FF53535353535353FF9D9D9D9D9D9D3A
-% 9D9D3A9D9D9D9D9D9D9D3A3A9D9D9D3AFF5353FF53535353535353FF9D9D
-% 9D9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D
-% 3A3A9D9D9D9D3A3A3A3A3A9D9D3A3A9D9D3A3A3A3A3A9D3A9D3A3A9D9D9D
-% 3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D9D3A9D9D9D3A3A3A3A9D
-% 9D3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D9D9D3A3A3A3A9D9D9D9D9D9D
-% 9D9D9D7F13137F131313131313137F9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A
-% 3A3A3A3A3A3A3A9D7F13137F131313131313137F9D9D3A3A3A3A9D9D3A3A
-% FF5353FF53535353535353FF9D9D9D9D3A3A3A3A9D3A3A9D9D9D9D9D9D9D
-% 9D3A3A3A3AFF535353FF53535353535353FF9D3A3A3A9D9D3A9D9D3A9D3A
-% 3A9D9D3A9D9D3A3A9D3A3A3A3A9D9D9D9D9D9DFF7D9D9D9D3A9D9D9D9D9D
-% 9D9D3A9D9D9DFF53535353535353535353535353535353535353FF9D3A9D
-% 3A9D9D9D3A9D3A9D3A3A9D3A3A3A9D9D9D3A9DA6FFFF9D3A3AFFFF9D3A9D
-% FFFF9D9D9D9D3A9DFFFF9D9D3AFFFF9D9D9D3A9D9D3A7F1313137F131313
-% 131313137F3AFFFF3A3A3A3A3A3A3A3A3A00210000000021000A101010C5
-% 10121018181818181A181A18201818181818181818181818181818181818
-% 1210101010101018181818101010101000FF181818181010101010101218
-% 1816181818181818181818181A1818181810101816181818181216101210
-% 12101810121010101818181012101012101010121010AF100A08FF7D0000
-% 0000000000003A3A3A3A3A3A3A9D3A9D9D7F131313137F7F1313137F7F9D
-% 9D9D3A9D3A9D9D9D9D9D9DFFFFFF53535353535353FF9D9D9D9D9D9D3A9D
-% 9D3A9D9D9D9D9D9D9D3A3A9D9D9D3AFF535353FFFF535353FFFF9D9D9D9D
-% 9D9D9D3A9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A9D9D9D9D9D9D9D3A
-% 3A9D9D9D9D3A3A3A3A3A9D9D3A3A9D9D3A3A3A3A3A9D3A9D3A3A9D9D9D3A
-% 3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A9D3A9D9D3A9D9D9D3A3A3A3A9D9D
-% 3A3A3A3A3A9D9D9D3A3A3A3A3A3A9D9D9D9D9D3A3A3A3A9D9D9D9D9D9D9D
-% 9D9D3A7F7F7F131313131313137F9D3A3A3A3A9D9D3A9D9D3A9D3A3A3A3A
-% 3A3A3A3A3A3A9D7F1313137F7F1313137F7F3A9D9D3A3A3A3A9D9D3A3A3A
-% FFFFFF53535353535353FF9D9D9D9D3A3A3A3A9D3A3A9D9D9D9D9D9D9D9D
-% 3A3A3A3AFF53535353FFFF535353FFFF9D9D3A3A3A9D9D3A9D9D3A9D3A3A
-% 9D9D3A9D9D3A3A9D3A3A3A3A9D9D9D9D9D9DFF7D9D9D9D3A9D9D9D9D9D9D
-% 9D3A9D9D9DFF53535353535353535353535353535353535353FF9D3A9D3A
-% 9D9D9D3A9D3A9D3A3A9D3A3A3A9DA3B282DAFFFF8B9D3A3AFFFF9D3A9DFF
-% FF9D9D9D9D3A9DFFFF9D9D3AFFFF9D9D9D3A9D9D3A9D7F7F137F13131313
-% 1313137F3AFFFF3A3A3A3A3A3A3A3A3A00210000000021000A081010C510
-% 101012161818181818181A18181818101012101810181618181818181010
-% 10101010121818161818181818181800FF16181818101012081010101012
-% 181818181818181818181A181A1818161212181818181818161210121010
-% 121216181010121010101212161218101210101012AF101010FF7D000000
-% 00000000003A3A3A3A3A3A3A9D3A9D7F131313131313137F7F7F3A9D9D9D
-% 9D9D3A3A9D9D9D9D9D3A9DFF535353535353535353FF9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D3A9D9D9D9DFF535353535353FFFFFFFF9D3A9D9D3A9D
-% 3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9D3A9D3A9D9D3A9D3A9D9D9D3A3A3A
-% 9D9D9D3A3A3A3A3A3A9D3A3A3A9D9D3A3A3A3A3A9D9D3A3A3A9D9D3A3A3A
-% 3A3A9D3A3A3A3A3A9D9D3A3A3A3A3A9D9D3A3A3A9D9D9D3A3A3A3A9D9D3A
-% 3A3A3A3A9D9D9D9D3A3A3A3A3A9D9D9D9D9D3A3A3A3A3A9D9D9D9D9D9D9D
-% 3A3A3A7F1313131313131313137F3A3A3A3A9D9D9D3A3A3A9D3A3A3A3A3A
-% 9D9D9D9D9D7F1313131313137F7F7F7F3A3A9D9D3A3A3A3A9D9D3A3A3A3A
-% FF535353535353535353FF3A9D9D3A3A3A3A9D9D9D9D3A3A9D9D9D9D3A3A
-% 9D3AFF53535353535353FFFFFF3A9D9D9D3A3A3A9D3A3A9D3A3A3A3A3A9D
-% 3A3A9D9D3A3A3A3A3A9D9D3A3A3A9D9D9DFF7D9D9D3A9D3A3A9D3A9D9D9D
-% 9D9D9D3AFF53535353535353535353535353535353535353FF9D3A9D9D9D
-% 9D9D9D9D9D9D9D3A9D3A3AAFD1FFFFFFFFFFDAA63A9D3AFFFF9D9D9DFFFF
-% 9D9D3A9D9D3AFFFF9D3A9DFFFF9D9D9D3A9D9D9D9D3ACB7F131313131313
-% 1313137FFFFF3A3A9D3A3A3A3A3A3A002100000000210010101010C51010
-% 10101218181818181A181818181810121012101210121216181818101012
-% 081010101012181818181818181800FF121018121612100E0A0810101018
-% 18181A18181A181818181818181812101018181818181818181010181318
-% 1618181210101010101010181816181810181216AF101010FF7D00000000
-% 000000003A3A3A3A3A3A3A9D3A9D7F1313131313131313137F9D3A9D9D9D
-% 9D9D9D9D9D9D9D9D9D3AFF535353535353FFFFFFFF9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9DFF535353535353535353FF9D9D9D9D9D9D9D
-% 3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A3A9D
-% 9D9D3A9D3A9D3A3A3A3A9D3A9D9D3A9D3A3A9D3A3A3A3A9D3A9D3A3A9D3A
-% 3A3A3A9D3A9D9D3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A9D
-% 3A9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A9D3A3A9D9D9D9D9D3A
-% 3A9D7F1313131313137F7F7F7F3A3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A
-% 3A3A3A3A7F1313131313131313137F3A3A9D3A3A3A3A3A9D9D3A3A3A3AFF
-% 53535353535353FFFFFF3A3A3A3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3A
-% 3AFF535353535353535353FF3A9D9D3A3A3A9D9D9D3A3A9D3A3A3A3A3A3A
-% 3A9D3A3A3A3A3A9D9D9D3A3A3A9D9D9DFF7D9D9D9D9D9D9D9D9D3A9D3A9D
-% 9D9DFF535353535353535353535353535353535353535353FF9D9D3A9D3A
-% 9D9D3A9D9D9D3A9D3AB2FFFFFFFFDAC0AF9D3A9D9D9DFFFF3A9D3AFFFF9D
-% 9D9D9D3A9DFFFF9D9D9DFFFF3A9D9D3A9D9D9D3AAFFF7F1313131313137F
-% 7F7F7FFFFF3A3A3A3A3A3A3A3A3A002100000000210010101010C5100E10
-% 10121018181818181A18181818101216121018101210121018121612100E
-% 0A081010101818181A18181A1800FF101210181818181010100A10101818
-% 18181818181818181A181818181010121012101818181810181218161818
-% 18181618101010101012181818181618121618AF121010FF7D0000000000
-% 0000003A3A3A3A3A3A3A9D3A7F7F1313131313131313137F9D3A9D9D9D9D
-% 9D9D9D9D9D9D9D9D3AFF53535353FFFF535353FFFF9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9DFFFF535353535353535353FF9D9D9D9D9D9D9D3A
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A9D9D9D9D9D3A3A9D9D
-% 9D3A9D3A9D3A3A3A3A9D3A9D9D3A9D3A3A9D3A3A3A3A9D3A9D3A3A9D3A3A
-% 3A3A9D3A9D9D3A9D3A3A3A3A3A9D3A3A3A3A9D3A3A9D3A3A3A3A3A3A9D3A
-% 9D9D9D9D9D9D3A9D9D3A9D9D9D9D3A3A3A9D3A3A9D3A3A9D9D9D9D9D3A3A
-% 9D7F131313137F7F1313137F7F3A3A3A3A3A3A3A3A3A9D9D3A3A3A3A3A3A
-% 3A3A7F7F1313131313131313137F3A3A9D3A3A3A3A3A9D9D3A3A3A3AFF53
-% 53535353FFFF535353FFFF3A3A3A3A3A9D3A3A3A3A3A9D9D9D3A3A3A3AFF
-% FF535353535353535353FF3A9D9D3A3A3A9D9D9D3A3A9D3A3A3A3A3A3A3A
-% 9D3A3A3A3A3A9D9D9D3A3A3A9D9D9DFF7D9D9D9D9DFFFFFFFFFFFFFFFFFF
-% FFFF535353535353535353535353535353535353535353FFFFFFFFFFFFFF
-% FFFFFF9D9D3A9D3ADAFFCBB2489D9D9D9D3A9D9D9DFFFF3A9D3AFFFFA69D
-% 9D9D3A9DFFFF9D9D9DCBFF549D9D3A9D9D9D3AE3FF7F131313137F7F1313
-% 137F7F963A3A3A3A3A3A3A3A3A002100000000210010101010C510101010
-% 101212101818181818181818181810181112101610101210181818181010
-% 100A1010181818181818181800FF10101010121018181810101012181818
-% 18181818181818181A181818101210101010121012101018101818181818
-% 181818181818181010181218101212101218AF101810FF7D000000000000
-% 00003A3A3A3A9D3A3A9D7F13137F131313131313137F9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9DFF5353FF53535353535353FF9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9DFF5353FF53535353535353FF9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D7F13137F131313131313137F9D9D9D9D9D9D9D9D9D9D9D9D9D3A3A9D9D
-% 7F13137F131313131313137F9D3A3A3A3A3A3A9D3A3A9D3A3A3A3A3AFF53
-% 5353FF53535353535353FF3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3AFF5353
-% FF53535353535353FF3A3A3A3A3A3A3A9D9D3A3A3A9D3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A9D9D9D9DFF7D9D9D9D9DFFFFFFFFFFFFFFFFFFFF
-% FF535353535353535353535353535353535353535353FFFFFFFFFFFFFFFF
-% FFFF9D9D9D3A3AFFFF9D9D9D9D9DA3FFE39D9D9DFFFF9D9D9DFFFF719D9D
-% 9D3A54FFFF9D3A9DC0FFB29D9D3A9D9D9DC6FF779D7F13137F1313131313
-% 13137F3A3A3A3A3A3A3A3A3A002100000000210018101210C51010101010
-% 101012181818181818181018101812181018121010101010121018181810
-% 101012181818181818181800FF1012101010101218181810121618181818
-% 181818181818181818181012101010101010101210121210181018181818
-% 1818181A18181812161216121010101012AF181012FF7D00000000000000
-% 003A3A3A3A3A3A3A9D7F13137F131313131313137F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFF5353FF53535353535353FF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF5353FF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 7F13137F131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A3A7F
-% 13137F131313131313137F3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF5353
-% 53FF53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF5353FF
-% 53535353535353FF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9D9DFF7D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF
-% 535353535353535353535353535353535353535353FF9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9DD1FFC0A39D9DA9D1FFC09D9D9DFFFF9D9D9DFFFFDAC6A69D
-% A9D1FFC69D9D9DB2FFC09D9D9D9D9DAFFFDA9D9D7F13137F131313131313
-% 137F3A3A9D3A3A3A3A3A3A002100000000210010121010C5101010101012
-% 101012121818161210101212161216181818121012101010101218181810
-% 1216181818181818181800FF1810121010100E1816121810181618161818
-% 161818181818181818121012101010101218181812101012121612181618
-% 18181818181818181818181018121010AF101216FF7D0000000000000000
-% 3A3A3A3A3A3A3A7F131313137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3AFFFF535353535353FFFFFFFF3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF53535353FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A9D3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 7F7F1313131313137F7F7F7F3A3A3A3A3A3A9D3A3A3A3A9D3A9D3A7F1313
-% 13137F7F1313137F7F9D3A9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFFFFFF
-% 535353535353FFFFFFFF9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF53535353FF
-% FF535353FFFF9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9D9D9D9D9D9D9D9DFF7D9D9D9D9D9D9D9D9D9D9D9D9D9D9DFF53
-% 5353535353535353535353535353535353535353FF9D9D9D9D9D9D9D9D9D
-% 9D9D9D9D9DA6E3FFFFFFFFFFFFDA9D9D9D9DFFFF9D9D9DFFFFA6E3FFFFFF
-% FFFFA99D9D9D9DFFE39D9D9D9D9DE3FFA99D9D9D7F7F1313131313137F7F
-% 7F7F3A9D3A3A3A3A3A3A002100000000210012161210C510101010101012
-% 1012101210121010101010121818181818181810121010100E1816121810
-% 18161816181816181800FF181810100A100A101010101812121218181818
-% 181818181818181810101010101216181818181810121010121612181812
-% 10101018181818181818181818180AAF101216FF7D00000000000000003A
-% 3A3A3A3A3A7F7F1313131313137F7F7F7F3A9D3A9D9D9D3A3A9D3A9D9D3A
-% 9D3A9D3A3A9D9D9DFF53535353FFFF535353FFFF9D9D3A3A9D9D3A3A9D3A
-% 9D9DFFFFFF535353535353FFFFFFFF3A3A3A9D3A9D3A3A9D3A9D3A3A3A3A
-% 3A3A3A9D3A3A9D3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A
-% 3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 7F131313137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F131313
-% 1313137F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53
-% 535353FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353535353
-% FFFFFFFF3A3A3A3A3A3A3A3A3A9D3A3A9D3A3A3A9D3A3A3A9D3A3A3A9D3A
-% 3A3A9D3A3A3A3A3A3A3A3AFF7D3A3A3A9D3A3A3A9D3A3A9D3A9D3A3AFF53
-% 535353535353535353535353535353535353FF3A9D3A3A3A9D3A9D3A9D3A
-% 9D3A3A9D3A48C0B1FFFFD1719D3A9D3A3AFFFF3A3A9DFFFF9DA6CBFFFFC6
-% A99D9D3A9D9D82FFB23A9D9DC6FFBD3A9D9D3A9D7F131313137F7F131313
-% 7F7F3A3A3A3A3A3A3A002100000000210012161210C51010101010101010
-% 10101012101010101010121018181A181A181810100A100A101010101812
-% 121218181818181800FF181818101010100B101012101818181818181818
-% 181010181216121012101010101218181818181A18181216121818121018
-% 1818181818181816121816181818AF101210FF7D00000000000000003A3A
-% 3A3A3A7F137F1313131313131313137F3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 9D3A3A9D3A3A3AFF535353FF53535353535353FF3A3A3A3A3A3A9D3A3A3A
-% FF5353FF535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9D3A3A3A7F
-% 1313137F131313131313137F3A3A9D3A9D3A9D3A9D9D3A7F137F13131313
-% 13131313137F9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9DFF5353
-% 53FF53535353535353FF9D9D9D9D9D9D9D9D9D9DFF53FF53535353535353
-% 5353FF9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D9D
-% 9D3A9D3A3A3A9D9D9D9DFF7D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9DFF5353
-% 5353535353535353535353535353535353FF9D3A9D3A9D9D3A9D9D9D3A9D
-% 9D9D9D3A3A9D3A9D9D3A9D3A9D3A9D3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A
-% 3A3A9D3A9D48FFB19D3A3A9D3A9D3A9D3A9D3A7F1313137F131313131313
-% 137F3A3A3A3A3A3A002100000000210012101818C5101216121818181810
-% 10121010121010101010121818181818181818101010100B101012101818
-% 1818181818181800FF181818101210101010101012101210181818181818
-% 181211181012101012101010101818181818181812101210181810121012
-% 18101818181818121012121018AF181012FF7D00000000000000003A3A3A
-% 3A3A7F13137F131313131313137F3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D
-% 3A3A9D3A3A3A3AFF5353FF535353535353FFFFFF3A3A3A3A3A9D3A3A3AFF
-% 535353FF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A9D3A3A3A9D3A3A3A9D7F
-% 13137F1313131313137F7F7F3A9D3A9D3A9D3A9D9D7F7F13137F13131313
-% 1313137F9D9D9D9D9D9D9D3A9D9D3A9D9D9D9D9D9D9D9D9D9D9D9DFF5353
-% FF5353535353FFFFFF9D9D9D9D9D9D9D9D9D9DFF5353FF53535353535353
-% FF9D9D9D9D9D9D9D9D9D9D3A3A9D3A9D3A9D3A9D3A9D3A3A9D9D3A9D9D9D
-% 3A9D3A3A3A9D9D9D9DFF7D9D9D9D3A9D9D9D9D9D9D3A9D3A9D9DFF535353
-% 53535353535353535353535353535353FF9D3A9D3A9D9D3A9D9D9D3A9D9D
-% 9D9D3A3A9D3A9D9D3A9D3A9D3A9D3A9D9D9D9D3A9D3A3A3A3A3A3A3A3A3A
-% 3A9D3A9D3AC0FFB23A3A9D3A9D3A9D3A9D3A3A7F13137F13131313137F7F
-% 7F3A3A3A3A3A3A002100000000210010121612C518181818181818181218
-% 161812101010101010101012181818181818101210101010101012101210
-% 18181818181800FF16181216121012101010121010101018181818181818
-% 181812161216121012101218181818181A18181010101010101010101010
-% 121012101210101010101018AF121012FF7D00000000000000003A3A3A7F
-% 7F1313137F131313131313137F3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF53FF5353535353FFFF535353FFFF3A3A3A3A3AFFFF5353
-% 5353FF53535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A
-% 3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A9D3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F13
-% 7F13131313137F7F1313137F7F3A3A3A3A3A7F7F7F1313137F1313131313
-% 13137F3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3AFF53FF53
-% 535353FFFF535353FFFF3A3A3A3A3A3AFFFF535353FF53535353535353FF
-% 3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A9D3A9D3A3A3A3AFF7D3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3AFF535353
-% 5353535353535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF3A3A3A3A9D3A3A3A3A3A3A3A9D3A
-% 3A3A3A3A3AC8C83A3A3A3A3A3A3A3A3A3A9D7F137F131313137F7F131313
-% 7F7F3A3A3A3A002100000000210010121018C51316181818181818181818
-% 181618181818101010101010181816181216121012101010121010101018
-% 181818181800FF1812161218101012101210101010101012181818181818
-% 18101812101210101217181A18181A181818181010101010101010101010
-% 1010101818121810101012AF121010FF7D000000000000007F7F7F7F137F
-% 131313137F7F1313137F7F3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A
-% 3A3A3A3A3A3AFFFF53535353FF5353535353FFFFFFFFFFFFFF53FF535353
-% 5353FFFF535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F7F
-% 131313137F13131313137F7F7F7F7F7F7F13137F131313137F7F1313137F
-% 7F3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3AFFFF5353
-% 53FF5353535353FFFFFFFFFFFF3AFF53FF53535353FFFF535353FFFF3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 535353535353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A59FF8B3A3A3A3A3A3A3A3A3A3A3A7F7F1313137F13131313137F
-% 7F7F3A7F7F7F2100000000210010101216C518181818181818181A181818
-% 121818181818121010101012181812161218101012101210101010101012
-% 1818181800FF101018111818181818181818181818181818181818181818
-% 1818111810101218181818181A181A181818161010101010101010101010
-% 10181718181816121010AF101210FF7D00000000007F7F137F7F7F137F13
-% 13131313137F7F7F7F3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF53535353FF535353FFFF53FFFF53FFFFFF53FF53535353
-% 535353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 9D3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A9D3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F13
-% 1313137F1313137F7F137F7F137F7F7F13137F1313131313137F7F7F7F3A
-% 3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3AFF535353
-% FF535353FFFF53FFFF5353FFFFFF53FF535353535353FFFFFFFF3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF535353
-% 53535353535353535353FFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313137F1313137F7F1313
-% 7F7F1313137F7F000000210012101210C516181818181818181818181010
-% 121018181818181818101012101018111818181818181818181818181818
-% 18181800FF121810181018181018181818181A1818181818181A18181818
-% 161818131810181818181A18181818181818181012101010101010101010
-% 181818181818181810AF161816FF7D000000007F13137F137F1313137F13
-% 1313131313137F3A3A3A3A3AFFFFFFFFFFFF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFF5353FF535353FF5353FF5353FF53FF535353FF53535353
-% 535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A9D3A3A3A9D3A3A9D3A3A9D3A3A3A3A3A3A3A9D3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A7F13
-% 137F1313137F13137F13137F137F131313137F131313131313137F3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53FF53
-% 5353FF5353FF535353FF53FF535353FF53535353535353FF3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF535353
-% 5353535353535353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F1313137F1313137F13
-% 1313131313137F0000210018161216C51812181618181618181210121010
-% 121018C5C5C5C5C5C51010121810181018181018181818181A1818181818
-% 181A00FF1810121812161218101818181818181818181A18181818181818
-% 18181018101818181818AF1818181818AF18101810121010101010101012
-% 1210121818181810AF181818FF7D000000007F13137F137F1313137F1313
-% 13131313137F3A3A3A3A3A3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFF5353FF535353FF5353FF5353FF53FF535353FF5353535353
-% 5353FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A7F1313
-% 7F1313137F13137F13137F137F131313137F131313131313137F3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53FF5353
-% 53FF5353FF535353FF53FF535353FF53535353535353FF3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFFFF53
-% 53535353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F1313137F1313137F1313
-% 13131313137F0000210018181812C5101210181218181810101810181010
-% 12121818C5C5181810121810121812161218101818181818181818181A18
-% 1800FF17181612161012161210181818181818181A181818181818181818
-% 18181018181818181AAF1818101812AF1810121018101210121010101010
-% 10101012181812AF181818FF7D0000007F13137F13137F131313137F7F13
-% 13137F7F3A3A3A3A3A3A3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3AFFFFFF5353FF5353FF5353FF5353FF53535353FFFF535353FF
-% FF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A9D3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F7F
-% 13137F13137F13137F13137F13131313137F7F1313137F7F3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF5353FF
-% 5353FF535353FF5353FF53535353FFFF535353FFFF3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFFFF
-% FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F13137F1313137F13131313
-% 13131313137F00210018181816C510121012101216121818181818181010
-% 101012C5C51816181817181612161012161210181818181818181A181818
-% 00FF18181818121010101010121618181818181818181A1818181A181818
-% 18181818181818AFAFAFAFAFAFAFAF101012101818181010AFAFAFAFAFAF
-% AFAFAFAFAFAFAF181018FF7D0000007F13137F1313137F13131313137F7F
-% 7F3A3A3A3A3A3A3A3A3A3AFFFF3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3AFFFF53FF5353FF5353FF535353FF5353535353FFFFFF3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F7F
-% 137F13137F13137F1313137F1313131313137F7F7F3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3AFF53FF53
-% 53FF535353FF535353FF5353535353FFFFFF3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3AFF7D3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A
-% 3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A7F137F1313137F1313131313
-% 131313137F00210010181318C5C5C5C5C5C5C5C5C5C5C5C5C51818181818
-% 1210C5C51018181818181818121010101010121618181818181818181A00
-% FF10121810101010101010101012181818181818181818181A181A181818
-% 181818181818AFAFAFAFAFAFAFAF10101010181210181012101010101012
-% 101218181817181618FF7D0000007F13137F1313137F131313131313137F
-% 00000000000000000000FFFF000000000000000000000000000000000000
-% 000000000000FF53FF5353FF5353FF535353FF53535353535353FF000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000007F13
-% 7F13137F13137F1313137F131313131313137F0000000000000000000000
-% 00000000000000000000000000000000000000000000000000FF53FF5353
-% FF535353FF535353FF53535353535353FF00000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00FF7D000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000007F137F1313137F131313131313
-% 1313137F0021001618161816121012101012101012101210121818181818
-% 10C5C51212181210121810101010101010101012181818181818181800FF
-% 1210101010100810101010101010101218161818181A181A181818181817
-% 181818181818181818181818AF1010101010101210121010181010101010
-% 1218181818181818FF7D000000007F13137F1313137F7F1313137F7F0000
-% 000000000000000000FFFF00000000000000000000000000000000000000
-% 000000000000FFFFFF5353FF5353FF535353FFFF535353FFFF0000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000007F7F
-% 7F13137F13137F1313137F7F1313137F7F00000000000000000000000000
-% 00000000000000000000000000000000000000000000000000FFFFFF5353
-% FF535353FF535353FFFF535353FFFF000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% FF7D00000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000007F7F7F1313137F131313131313
-% 137F00002100181818181818181810181010121010121010101210181818
-% C5C51010101012101010101008101010101010101012181618181800FF10
-% 1012101010100A0F0A10101010101010121618181820181A181818181818
-% 1216181818181818181818AF101010101010101010181818181712101816
-% 1818181A181818FF7D000000007F13137F13131313137F7F7F0000000000
-% 000000000000FFFFFFFF0000000000000000000000000000000000000000
-% 00000000000000FF5353FF5353FF5353535353FFFFFF0000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000000000000000000000000000007F
-% 13137F13137F13131313137F7F7F00000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000FF5353FF
-% 535353FF5353535353FFFFFF000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000000000FF
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7F1313137F13131313131313
-% 7F0000210018181818181818181812101210101210121012101012C5C5C5
-% C516121010101012101010100A0F0A101010101010101216181800FF1012
-% 1010101010100A1010080A10081010101818181A18181818181818101810
-% 181217181818181818181010101010101010101218181818181818181818
-% 181818181818FF7D00000000007F7F137F7F1313137F7F00000000000000
-% 00000000000000FFFF000000000000000000000000000000000000000000
-% 00000000000000FFFF53FFFF53FFFF535353FFFF00000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 00000000000000000000000000000000000000000000000000000000007F
-% 7F137F7F137F7F1313137F7F000000000000000000000000000000000000
-% 0000000000000000000000000000000000000000000000000000FFFF53FF
-% FF5353FFFF535353FFFF0000000000000000000000000000000000000000
-% 00000000000000000000000000000000000000000000000000000000FFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F7F13137F7F1313137F7F00
-% 00002100181818161818181818161216101210101010101010101012C5C5
-% 1818181810121010101010100A1010080A100810101018181800FF181216
-% 12181818101010101008100810101012181818181A181818181818101210
-% 10181812181812161216121010100A10101012181818181818181818181A
-% 1818181818FF7D000000000000007F7F7F7F7F7F00000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 0000000000000000FFFFFFFFFFFFFFFFFF00000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 7F7F7F7F7F7F7F7F7F000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000FFFFFF
-% FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000007F7F7F007F7F7F00000000
-% 002100181818121018181818181210121018101812121612101010181818
-% 18181818121612181818101010101008100810101012181800FF18161210
-% 181618101210101010080A10101010101818181818181817121012161218
-% 101210101010121018121012101010101012181818181A18181818181818
-% 18181818FF7D000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 210018181010121818171818101810181018181818181818181210121218
-% 161818161210181618101210101010080A10101010101800FF1012101012
-% 181818181012101010101010101218181818181818181812101218121012
-% 10121012101018121612101010101010101818181A181A18181A181A1818
-% 181810FF7D00000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000021
-% 00181012101010181218101218181818181818181A181818181210101012
-% 1810121010121818181810121010101010101012181800FF181012101210
-% 101012101210100A08101010101012101218101810121010101010181818
-% 181010101010101210121810181012121818181A18181818181818181818
-% 1010FF7D0000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000000000
-% 000000000000000000000000000000000000000000000000000000002100
-% 101010101010101010121010101012101818181818181818181818181018
-% 181012101210101012101210100A0810101010101200FF18181810101010
-% 121012161010101010101010101010121012121010101010101018181818
-% 181810181010101012101816121816181818181818181818181818181810
-% 10FF7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D
-% 7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D210010
-% 101010101010101012101210121018181718181618181818181818181818
-% 181810101010121012161010101010101010101000FF1818171818181810
-% 101210121010101010101010101010101010101010081010101218181818
-% 181818101010101010181212161818181A16181818181618181818101210
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF001210
-% 101010101210181818101810181018121818181818181818181818181818
-% 1718181818101012101210101010101010101000FF121818181818181012
-% 10181018181612181818121010101210101010100A081010181818181818
-% 181818121010101012101012121818181818161818181818161310101010
-% 101012161818181818181210121012101810181818181818181818121818
-% 18181818101210181018181612181818121010101210101010100A081010
-% 181818181818181818121010101012101012121818181818161818181818
-% 161310101010101012161818181818181210121012101810181818181818
-% 181818121818181818181012101810181816121818181210101012101010
-% 10100A081010181818181818181818121010101012101012121818181818
-% 161818181818161310101010101012161818181818181210121012101810
-% 181818181818181818121818181818181012101810181816121818181210
-% 10101210101010100A081010181818181818181818121010101012101012
-% 121818181818161818181818161310101010101012161818181818181210
-% 121012101810181818181818181818121818181818181012101810181816
-% 12181818121010101210101010100A081010181818181818181818121010
-% 101012101012121818181818161818181818161310101010101012161818
-% 181818181210121012101810181818181818181818121818181818181012
-% 10181018181612181818121010101210101010100A081010181818181818
-% 181818121010101012101012121818181818161818181818161310101010
-% 101012161818181818181210121012101810181818181818181818121818
-% 18181818101210181018181612181818121000FF10121012101212101012
-% 121618181818181818181818101818131610101010101210181818181818
-% 181010101010101010101010121018181818181818181818101210101010
-% 1018181818181A1818181010101010121012101812161818181010121012
-% 101212101012121618181818181818181818101818131610101010101210
-% 181818181818181010101010101010101010121018181818181818181818
-% 1012101010101018181818181A1818181010101010121012101812161818
-% 181010121012101212101012121618181818181818181818101818131610
-% 101010101210181818181818181010101010101010101010121018181818
-% 1818181818181012101010101018181818181A1818181010101010121012
-% 101812161818181010121012101212101012121618181818181818181818
-% 101818131610101010101210181818181818181010101010101010101010
-% 1210181818181818181818181012101010101018181818181A1818181010
-% 101010121012101812161818181010121012101212101012121618181818
-% 181818181818101818131610101010101210181818181818181010101010
-% 101010101010121018181818181818181818101210101010101818181818
-% 1A1818181010101010121012101812161818181010121012101212101012
-% 121618181818181818181818101818131610101010101210181818181818
-% 181010101010101010101010121018181818181818181818101210101010
-% 1018181818181A1818181010101010121012101812161818181010121012
-% 101212101012121618181818181818181800FF1210101210101010181010
-% 121818181818181A181A1818181718181218181810101810181218181012
-% 101210101818101010101010121218181818181818181818101210101010
-% 1818181A1818181818121010101010121010101012101818101210101210
-% 101010181010121818181818181A181A1818181718181218181810101810
-% 181218181012101210101818101010101010121218181818181818181818
-% 1012101010101818181A1818181818121010101010121010101012101818
-% 101210101210101010181010121818181818181A181A1818181718181218
-% 181810101810181218181012101210101818101010101010121218181818
-% 1818181818181012101010101818181A1818181818121010101010121010
-% 101012101818101210101210101010181010121818181818181A181A1818
-% 181718181218181810101810181218181012101210101818101010101010
-% 1212181818181818181818181012101010101818181A1818181818121010
-% 101010121010101012101818101210101210101010181010121818181818
-% 181A181A1818181718181218181810101810181218181012101210101818
-% 1010101010101212181818181818181818181012101010101818181A1818
-% 181818121010101010121010101012101818101210101210101010181010
-% 121818181818181A181A1818181718181218181810101810181218181012
-% 101210101818101010101010121218181818181818181818101210101010
-% 1818181A1818181818121010101010121010101012101818101210101210
-% 101010181010121818181818181A181A00FF181812101012101212101210
-% 1018181618181A1818181818181818171818181612121012101010181810
-% 101212181018181010101210101818181A18181818181816121012121818
-% 181818181A18FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1A18181818181816121012121818
-% 181818181A18181810100B0E10101010100E101010121818181812101012
-% 1012121012101018181618181A181800FF18181818121010181010101012
-% 181810101818181818121012101818181818181810101010101018181012
-% 101010181818181816121612181818181818181818181810181316181818
-% 18181A181AFF1812101010101010100A100A101012161818181818121010
-% 1810101010121818101018181818181210121018FF181818181810101010
-% 101018181012101010181818181816121612181818181818181818181810
-% 181316181818FF181A181A181812101010101010100A100A101012161818
-% 18181812101018101010101218181010181818181812FF12101818181818
-% 181810101010101018181012101010181818181816121612181818181818
-% 1818181818101813FF18181818181A181A181812101010101010100A100A
-% 101012161818181818121010181010101012181810101818FF1818121012
-% 101818181818181810101010101018181012101010181818181816121612
-% 18181818181818181818FF1018131618181818181A181A18181210101010
-% 1010100A100A1010121618181818181210101810101010121818FF101818
-% 181818121012101818181818181810101010101018181012101010181818
-% 181816121612181818181818FF181818181018131618181818181A181A18
-% 1812101010101010100A100A10101216181818181812101018101010FF12
-% 181810101818181818121012101818181818181810101010101018181012
-% 1010101818181818161216121818FF181818181818181810181316181818
-% 18181A181A181812101010101010100A100A101012161818181818121010
-% 181010101012181810101818181800FF1618181818181018181810121010
-% 10181816181818161810101018131618181A181818121010101810181210
-% 18181318181818181818181818181818181818181018101216181818181A
-% 181A1818FF181818181810100A1010101010101012181618181818181018
-% 18181012101010181816181818161810101018FF1618181A181818121010
-% 101810181210181813181818181818181818181818181818181810181012
-% 1618181818FF181A181818181818181810100A1010101010101012181618
-% 181818181018181810121010101818161818181618FF101018131618181A
-% 181818121010101810181210181813181818181818181818181818181818
-% 18181018101216FF1818181A181A181818181818181810100A1010101010
-% 1010121816181818181810181818101210101018181618FF181618101010
-% 18131618181A181818121010101810181210181813181818181818181818
-% 181818181818181810FF101216181818181A181A18181818181818181010
-% 0A101010101010101218161818181818101818181012101010FF18161818
-% 18161810101018131618181A181818121010101810181210181813181818
-% 1818181818181818181818FF18181018101216181818181A181A18181818
-% 1818181810100A1010101010101012181618181818181018181810FF1010
-% 10181816181818161810101018131618181A181818121010101810181210
-% 18181318181818181818181818FF1818181818181018101216181818181A
-% 181A181818181818181810100A1010101010101012181618181818181018
-% 1818101210101018181618181800FF121818181818181818171210101010
-% 121012181018121818181812161812161818181818101810121012161818
-% 1018181818181818181818181818181A1818181818181818181818181818
-% 181818FF1216181812101010121010101010101012121818181818181818
-% 171210101010121012181018121818181812FF1812161818181818101810
-% 1210121618181018181818181818181818181818181A1818181818181818
-% 18181818FF18181818181216181812101010121010101010101012121818
-% 1818181818181712101010101210121810181218FF181812161812161818
-% 1818181018101210121618181018181818181818181818181818181A1818
-% 181818181818FF1818181818181818181216181812101010121010101010
-% 10101212181818181818181817121010101012101218FF18121818181812
-% 161812161818181818101810121012161818101818181818181818181818
-% 1818181A18181818FF181818181818181818181818181216181812101010
-% 121010101010101012121818181818181818171210101010FF1012181018
-% 121818181812161812161818181818101810121012161818101818181818
-% 1818181818181818181AFF18181818181818181818181818181818181216
-% 1818121010101210101010101010121218181818181818181712FF101010
-% 121012181018121818181812161812161818181818101810121012161818
-% 101818181818181818181818FF18181A1818181818181818181818181818
-% 181818181216181812101010121010101010101012121818181818181818
-% 17121010101012101218101800FF10121612181610181818121612101012
-% 101210121618181818181818121018101216181618181810181012101210
-% 18161818181818181A181A18181818181818181818181818181018181818
-% 1818FF101012161818121018101010101010101010121612181610181818
-% 1216121010121012101216181818181818FF121018101216181618181810
-% 18101210121018161818181818181A181A18181818181818181818181818
-% 181018FF1818181812101012161818121018101010101010101010121612
-% 18161018181812161210101210121012161818FF18181818121018101216
-% 18161818181018101210121018161818181818181A181A18181818181818
-% 1818181818FF181018181818181812101012161818121018101010101010
-% 101010121612181610181818121612101012101210FF1618181818181818
-% 12101810121618161818181018101210121018161818181818181A181A18
-% 18181818181818FF18181818181018181818181812101012161818121018
-% 1010101010101010101216121816101818181216121010FF101210121618
-% 181818181818121018101216181618181810181012101210181618181818
-% 18181A181A18181818FF1818181818181818181018181818181812101012
-% 16181812101810101010101010101012161218161018181812FF12101012
-% 101210121618181818181818121018101216181618181810181012101210
-% 18161818181818181A181AFF181818181818181818181818181018181818
-% 181812101012161818121018101010101010101010121612181610181818
-% 121612101012101210121600FF1010121012181218161810121012101010
-% 101010121216181818161810181010121012181818181612101810121012
-% 12101818181818181818181A18181A1E181A181818181818181818181818
-% 18FF10101210181216181810121010121010101010121012181218161810
-% 12101210101010101012121618181816FF10181010121012181818181612
-% 10181012101212101818181818181818181A18181A1E181A181818181818
-% 1818FF181818181810101210181216181810121010121010101010121012
-% 181218161810121012101010101010121216FF1818161810181010121012
-% 18181818161210181012101212101818181818181818181A18181A1E181A
-% 18181818FF18181818181818181810101210181216181810121010121010
-% 1010101210121812181618101210121010101010FF121216181818161810
-% 18101012101218181818161210181012101212101818181818181818181A
-% 18181A1E181AFF1818181818181818181818181810101210181216181810
-% 12101012101010101012101218121816181012101210FF10101010121216
-% 181818161810181010121012181818181612101810121012121018181818
-% 18181818181A1818FF1E181A181818181818181818181818181810101210
-% 181216181810121010121010101010121012181218161810FF1012101010
-% 101010121216181818161810181010121012181818181612101810121012
-% 12101818181818181818FF1A18181A1E181A181818181818181818181818
-% 181810101210181216181810121010121010101010121012181218161810
-% 1210121010101010101200FF101010101012161218101812161210101012
-% 101210101210181218181818181810181810121210121810121010101010
-% 1210121818181818181818181A181A18181818181818181818181A181818
-% FF1010121012101210121810121010101210101010101012161218101812
-% 161210101012101210101210181218FF1818181810181810121210121810
-% 1210101010101210121818181818181818181A181A181818181818181818
-% 18FF1A181818181010121012101210121810121010101210101010101012
-% 1612181018121612101010121012101012FF181218181818181810181810
-% 1212101218101210101010101210121818181818181818181A181A181818
-% 181818FF181818181A181818181010121012101210121810121010101210
-% 10101010101216121810181216121010101210FF10101210181218181818
-% 181810181810121210121810121010101010121012181818181818181818
-% 1A181A1818FF18181818181818181A181818181010121012101210121810
-% 121010101210101010101012161218101812161210FF1012101210101210
-% 181218181818181810181810121210121810121010101010121012181818
-% 1818181818181AFF1A18181818181818181818181A181818181010121012
-% 1012101218101210101012101010101010121612181018FF161210101012
-% 101210101210181218181818181810181810121210121810121010101010
-% 121012181818181818FF18181A181A18181818181818181818181A181818
-% 181010121012101210121810121010101210101010101012161218101812
-% 16121010101210121000FF10101012181818161818181018161810101010
-% 101012101210101218161818181818101210101018161210121010101010
-% 101210121612181818181A18201E1A181A181818181818181818181818FF
-% 181812101010101018101818181812101010101012181818161818181018
-% 161810101010101012101210101218161818181818101210101018161210
-% 121010101010101210121612181818181A18201E1A181A18181818181818
-% FF1818181818181812101010101018101818181812101010101012181818
-% 161818181018161810101010101012101210101218161818181818101210
-% 101018161210121010101010101210121612181818181A18201E1A181A18
-% 1818FF181818181818181818181812101010101018101818181812101010
-% 101012181818161818181018161810101010101012101210101218161818
-% 181818101210101018161210121010101010101210121612181818181A18
-% 201E1A18FF18181818181818181818181818181812101010101018101818
-% 181812101010101012181818161818181018161810101010101012101210
-% 101218161818181818101210101018161210121010101010101210121612
-% 181818181A18FF1E1A181A18181818181818181818181818181812101010
-% 101018101818181812101010101012181818161818181018161810101010
-% 101012101210101218161818181818101210101018161210121010101010
-% 1012101216121818FF181A18201E1A181A18181818181818181818181818
-% 181812101010101018101818181812101010101012181818161818181018
-% 161810101010101000FF1810121018181818121810181818181810121012
-% 101010101012101012121018181018101010101812101010101010101010
-% 10101010101818181818181A181A1818181818161318181818181818FF18
-% 121010101010101012101818181818181810121018181818121810181818
-% 181810121012101010101012101012121018181018101010101812101010
-% 10101010101010101010101818181818181A181A181818181816131818FF
-% 181818181818121010101010101012101818181818181810121018181818
-% 121810181818181810121012101010101012101012121018181018101010
-% 10181210101010101010101010101010101818181818181A181A18181818
-% 18FF13181818181818181818121010101010101012101818181818181810
-% 121018181818121810181818181810121012101010101012101012121018
-% 18101810101010181210101010101010101010101010101818181818181A
-% 181A18FF1818181613181818181818181818121010101010101012101818
-% 181818181810121018181818121810181818181810121012101010101012
-% 101012121018181018101010101812101010101010101010101010101018
-% 1818181818FF181A18181818181613181818181818181818121010101010
-% 101012101818181818181810121018181818121810181818181810121012
-% 101010101012101012121018181018101010101812101010101010101010
-% 10101010101818FF1818181A181A18181818181613181818181818181818
-% 121010101010101012101818181818181810121018181818121810181818
-% 1818101210121000FF1A1818181618181816181818181618181818101010
-% 101012121012101010101218101210121010181016121010101010101010
-% 10101010101818181818181820181A181818121612101818181012FF1216
-% 1010101010121010181818181818181A1818181618181816181818181618
-% 181818101010101012121012101010101218101210121010181016121010
-% 10101010101010101010101818181818181820181A18181812161210FF18
-% 1810121612161010101010121010181818181818181A1818181618181816
-% 181818181618181818101010101012121012101010101218101210121010
-% 18101612101010101010101010101010101818181818181820181A181818
-% FF16121018181810121612161010101010121010181818181818181A1818
-% 181618181816181818181618181818101010101012121012101010101218
-% 101210121010181016121010101010101010101010101018181818181818
-% 2018FF181818121612101818181012161216101010101012101018181818
-% 1818181A1818181618181816181818181618181818101010101012121012
-% 101010101218101210121010181016121010101010101010101010101018
-% 18181818FF1820181A181818121612101818181012161216101010101012
-% 1010181818181818181A1818181618181816181818181618181818101010
-% 101012121012101010101218101210121010181016121010101010101010
-% 101010101018FF181818181820181A181818121612101818181012161216
-% 1010101010121010181818181818181A1818181618181816181818181618
-% 18181810101000FF181818181A1818181810181018181816181216121018
-% 101010121010101010101012101216181812181818181810101010101010
-% 10101010121018181A2021181818181810161210121010121018FF181813
-% 10100A08081010101216181A1818181818181A1818181810181018181816
-% 181216121018101010121010101010101012101216181812181818181810
-% 10101010101010101010121018181A202118181818181016121012FF1012
-% 10181018181310100A08081010101216181A1818181818181A1818181810
-% 181018181816181216121018101010121010101010101012101216181812
-% 18181818181010101010101010101010121018181A2021181818181810FF
-% 12101210101210181018181310100A08081010101216181A181818181818
-% 1A1818181810181018181816181216121018101010121010101010101012
-% 10121618181218181818181010101010101010101010121018181A202118
-% 18FF1818101612101210101210181018181310100A08081010101216181A
-% 1818181818181A1818181810181018181816181216121018101010121010
-% 101010101012101216181812181818181810101010101010101010101210
-% 18181AFF211818181818101612101210101210181018181310100A080810
-% 10101216181A1818181818181A1818181810181018181816181216121018
-% 101010121010101010101012101216181812181818181810101010101010
-% 1010101012FF18181A202118181818181016121012101012101810181813
-% 10100A08081010101216181A1818181818181A1818181810181018181816
-% 181216121000FF1818181818181A18101812121212181818181012101210
-% 101216181818181210121018101812181612181618181818101010101010
-% 1010101012181818201A181818121218121810181012101810FF18161818
-% 10101008101010181818181A181818181818181A18101812121212181818
-% 181012101210101216181818181210121018101812181612181618181818
-% 1010101010101010101012181818201A18181812121812181018FF121018
-% 10121816181810101008101010181818181A181818181818181A18101812
-% 121212181818181012101210101216181818181210121018101812181612
-% 1816181818181010101010101010101012181818201A181818121218FF18
-% 10181012101810121816181810101008101010181818181A181818181818
-% 181A18101812121212181818181012101210101216181818181210121018
-% 1018121816121816181818181010101010101010101012181818201A1818
-% FF121218121810181012101810121816181810101008101010181818181A
-% 181818181818181A18101812121212181818181012101210101216181818
-% 181210121018101812181612181618181818101010101010101010101218
-% 1818FF1A1818181212181218101810121018101218161818101010081010
-% 10181818181A181818181818181A18101812121212181818181012101210
-% 101216181818181210121018101812181612181618181818101010101010
-% 10101010FF181818201A1818181212181218101810121018101218161818
-% 10101008101010181818181A181818181818181A18101812121212181818
-% 1810121000FF1A181A181A18181818121010101010181210101012101216
-% 121818181818181818181812161812101210121216181810101012101010
-% 0E1010101218181818181810101012101818181818101210FF1018181818
-% 1210101010121818181A18181A181A181A18181818121010101010181210
-% 101012101216121818181818181818181812161812101210121216181810
-% 1010121010100E101010121818181818181010101210181818FF18101210
-% 1210181818181210101010121818181A18181A181A181A18181818121010
-% 101010181210101012101216121818181818181818181812161812101210
-% 1212161818101010121010100E1010101218181818181810101012FF1818
-% 1818181012101210181818181210101010121818181A18181A181A181A18
-% 181818121010101010181210101012101216121818181818181818181812
-% 1618121012101212161818101010121010100E10101012181818181818FF
-% 1010121018181818181012101210181818181210101010121818181A1818
-% 1A181A181A18181818121010101010181210101012101216121818181818
-% 1818181818121618121012101212161818101010121010100E1010101218
-% 18FF18181810101012101818181818101210121018181818121010101012
-% 1818181A18181A181A181A18181818121010101010181210101012101216
-% 121818181818181818181812161812101210121216181810101012101010
-% 0E1010FF1218181818181810101012101818181818101210121018181818
-% 1210101010121818181A18181A181A181A18181818121010101010181210
-% 10101200FF18181818181818181810101010101018181012101010121012
-% 161818181818181818181818131612101010101212181012101010101010
-% 101010101216181812101210121012161818181818121010101012181818
-% 18121012101818181A181818181818181818181810101010101018181012
-% 101010121012161818181818181818181818131612101010101212181012
-% 101010101010101010101216181812101210121012161818181818121010
-% 10101218181818121012101818181A181818181818181818181810101010
-% 101018181012101010121012161818181818181818181818131612101010
-% 101212181012101010101010101010101216181812101210121012161818
-% 18181812101010101218181818121012101818181A181818181818181818
-% 181810101010101018181012101010121012161818181818181818181818
-% 131612101010101212181012101010101010101010101216181812101210
-% 12101216181818181812101010101218181818121012101818181A181818
-% 181818181818181810101010101018181012101010121012161818181818
-% 181818181818131612101010101212181012101010101010101010101216
-% 181812101210121012161818181818121010101012181818181210121018
-% 18181A181818181818181818181810101010101018181012101010121012
-% 161818181818181818181818131612101010101212181012101010101010
-% 101010101216181812101210121012161818181818121010101012181818
-% 18121012101818181A181818181818181818181810101010101018181012
-% 101000FF1818181818181818121010101010101818101010101218101012
-% 181818181818181818181816181818121010101012161218101012101010
-% 101010121012101010101010101212181818181818101210101010101216
-% 18121618181818181A181818181818181818121010101010101818101010
-% 101218101012181818181818181818181816181818121010101012161218
-% 101012101010101010121012101010101010101212181818181818101210
-% 10101010121618121618181818181A181818181818181818121010101010
-% 101818101010101218101012181818181818181818181816181818121010
-% 101012161218101012101010101010121012101010101010101212181818
-% 18181810121010101010121618121618181818181A181818181818181818
-% 121010101010101818101010101218101012181818181818181818181816
-% 181818121010101012161218101012101010101010121012101010101010
-% 10121218181818181810121010101010121618121618181818181A181818
-% 181818181818121010101010101818101010101218101012181818181818
-% 181818181816181818121010101012161218101012101010101010121012
-% 101010101010101212181818181818101210101010101216181216181818
-% 18181A181818181818181818121010101010101818101010101218101012
-% 181818181818181818181816181818121010101012161218101012101010
-% 101010121012101010101010101212181818181818101210101010101216
-% 18121618181818181A181818181818181818121010101010101818101010
-% 1000FF181818181818181810121010101010181618181216121010101210
-% 181810121818181818181818181818161210101018121612101010101010
-% 12101012101012101010101010101818181A181812101010100808101012
-% 101812171818181818181818181818181810121010101010181618181216
-% 121010101210181810121818181818181818181818161210101018121612
-% 10101010101012101012101012101010101010101818181A181812101010
-% 100808101012101812171818181818181818181818181810121010101010
-% 181618181216121010101210181810121818181818181818181818161210
-% 10101812161210101010101012101012101012101010101010101818181A
-% 181812101010100808101012101812171818181818181818181818181810
-% 121010101010181618181216121010101210181810121818181818181818
-% 181818161210101018121612101010101010121010121010121010101010
-% 10101818181A181812101010100808101012101812171818181818181818
-% 181818181810121010101010181618181216121010101210181810121818
-% 181818181818181818161210101018121612101010101010121010121010
-% 12101010101010101818181A181812101010100808101012101812171818
-% 181818181818181818181810121010101010181618181216121010101210
-% 181810121818181818181818181818161210101018121612101010101010
-% 12101012101012101010101010101818181A181812101010100808101012
-% 101812171818181818181818181818181810121010101010181618181216
-% 00FF12161818101810181210121010101212181818181812101010121613
-% 101210181618181818181818181818181010101216121012101216181810
-% 181012101216121010101010101818181818181818101010100A10101010
-% 121612181818181812161818101810181210121010101212181818181812
-% 101010121613101210181618181818181818181818181010101216121012
-% 101216181810181012101216121010101010101818181818181818101010
-% 100A10101010121612181818181812161818101810181210121010101212
-% 181818181812101010121613101210181618181818181818181818181010
-% 101216121012101216181810181012101216121010101010101818181818
-% 181818101010100A10101010121612181818181812161818101810181210
-% 121010101212181818181812101010121613101210181618181818181818
-% 181818181010101216121012101216181810181012101216121010101010
-% 101818181818181818101010100A10101010121612181818181812161818
-% 101810181210121010101212181818181812101010121613101210181618
-% 181818181818181818181010101216121012101216181810181012101216
-% 121010101010101818181818181818101010100A10101010121612181818
-% 181812161818101810181210121010101212181818181812101010121613
-% 101210181618181818181818181818181010101216121012101216181810
-% 181012101216121010101010101818181818181818101010100A10101010
-% 121612181818181812161818101810181210121010101212181818181800
-% FF1012101012161210101010121012161818181A18181210181218181818
-% 101218121216181818181218181818181012101810181018101218181818
-% 1812161218121010101010101818181A20181818101210101010100A1012
-% 101818181818121012101012161210101010121012161818181A18181210
-% 181218181818101218121216181818181218181818181012101810181018
-% 1012181818181812161218121010101010101818181A2018181810121010
-% 1010100A1012101818181818121012101012161210101010121012161818
-% 181A18181210181218181818101218121216181818181218181818181012
-% 1018101810181012181818181812161218121010101010101818181A2018
-% 1818101210101010100A1012101818181818121012101012161210101010
-% 121012161818181A18181210181218181818101218121216181818181218
-% 181818181012101810181018101218181818181216121812101010101010
-% 1818181A20181818101210101010100A1012101818181818121012101012
-% 161210101010121012161818181A18181210181218181818101218121216
-% 181818181218181818181012101810181018101218181818181216121812
-% 1010101010101818181A20181818101210101010100A1012101818181818
-% 121012101012161210101010121012161818181A18181210181218181818
-% 101218121216181818181218181818181012101810181018101218181818
-% 1812161218121010101010101818181A20181818101210101010100A1012
-% 101818181818121012101012161210101010121012161818181A181800FF
-% 1818181818101216121612161218181818181A1818181010101010121018
-% 10101010121818181810121010101018181012101812181816181A181818
-% 181816181818181810101010101216181818181810121010101010101010
-% 1010121018181818181818101216121612161218181818181A1818181010
-% 101010121018101010101218181818101210101010181810121018121818
-% 16181A181818181816181818181810101010101216181818181810121010
-% 101010101010101012101818181818181810121612161216121818181818
-% 1A1818181010101010121018101010101218181818101210101010181810
-% 12101812181816181A181818181816181818181810101010101216181818
-% 181810121010101010101010101012101818181818181810121612161216
-% 1218181818181A1818181010101010121018101010101218181818101210
-% 10101018181012101812181816181A181818181816181818181810101010
-% 101216181818181810121010101010101010101012101818181818181810
-% 1216121612161218181818181A1818181010101010121018101010101218
-% 18181810121010101018181012101812181816181A181818181816181818
-% 181810101010101216181818181810121010101010101010101012101818
-% 1818181818101216121612161218181818181A1818181010101010121018
-% 10101010121818181810121010101018181012101812181816181A181818
-% 181816181818181810101010101216181818181810121010101010101010
-% 1010121018181818181818101216121612161218181818181A181800FF1A
-% 181818101210181012101216181818181818181818181010101010101010
-% 1010101012161818181010121012181810101216121618181818181A1818
-% 181818181818161818181010101218101810181210101010121010101012
-% 10121618181A181818101210181012101216181818181818181818181010
-% 101010101010101010101216181818101012101218181010121612161818
-% 1818181A1818181818181818161818181010101218101810181210101010
-% 12101010101210121618181A181818101210181012101216181818181818
-% 181818181010101010101010101010101216181818101012101218181010
-% 1216121618181818181A1818181818181818161818181010101218101810
-% 18121010101012101010101210121618181A181818101210181012101216
-% 181818181818181818181010101010101010101010101216181818101012
-% 1012181810101216121618181818181A1818181818181818161818181010
-% 10121810181018121010101012101010101210121618181A181818101210
-% 181012101216181818181818181818181010101010101010101010101216
-% 1818181010121012181810101216121618181818181A1818181818181818
-% 16181818101010121810181018121010101012101010101210121618181A
-% 181818101210181012101216181818181818181818181010101010101010
-% 1010101012161818181010121012181810101216121618181818181A1818
-% 181818181818161818181010101218101810181210101010121010101012
-% 10121618181A181818101210181012101216181818181818181800FF1818
-% 181818111813161216121818181818181A18181818101010101010100A10
-% 101010101218181818181012161218101210181318181818181818181818
-% 181012161318181818121010121010121018101012101216181618121618
-% 181818181818181818111813161216121818181818181A18181818101010
-% 101010100A10101010101218181818181012161218101210181318181818
-% 181818181818181012161318181818121010121010121018101012101216
-% 181618121618181818181818181818111813161216121818181818181A18
-% 181818101010101010100A10101010101218181818181012161218101210
-% 181318181818181818181818181012161318181818121010121010121018
-% 101012101216181618121618181818181818181818111813161216121818
-% 181818181A18181818101010101010100A10101010101218181818181012
-% 161218101210181318181818181818181818181012161318181818121010
-% 121010121018101012101216181618121618181818181818181818111813
-% 161216121818181818181A18181818101010101010100A10101010101218
-% 181818181012161218101210181318181818181818181818181012161318
-% 181818121010121010121018101012101216181618121618181818181818
-% 181818111813161216121818181818181A18181818101010101010100A10
-% 101010101218181818181012161218101210181318181818181818181818
-% 181012161318181818121010121010121018101012101216181618121618
-% 181818181818181818111813161216121818181818181A181800FF1A1818
-% 1818181618181210121618181A181A181818181810101010101010101010
-% 081010101818181818181018161216121810181018101818181818181810
-% 101012181818181818181010101012101210121012161818181818181818
-% 1818181A18181818181618181210121618181A181A181818181810101010
-% 101010101010081010101818181818181018161216121810181018101818
-% 181818181810101012181818181818181010101012101210121012161818
-% 1818181818181818181A18181818181618181210121618181A181A181818
-% 181810101010101010101010081010101818181818181018161216121810
-% 181018101818181818181810101012181818181818181010101012101210
-% 1210121618181818181818181818181A1818181818161818121012161818
-% 1A181A181818181810101010101010101010081010101818181818181018
-% 161216121810181018101818181818181810101012181818181818181010
-% 1010121012101210121618181818181818181818181A1818181818161818
-% 1210121618181A181A181818181810101010101010101010081010101818
-% 181818181018161216121810181018101818181818181810101012181818
-% 1818181810101010121012101210121618181818181818181818181A1818
-% 1818181618181210121618181A181A181818181810101010101010101010
-% 081010101818181818181018161216121810181018101818181818181810
-% 101012181818181818181010101012101210121012161818181818181818
-% 1818181A18181818181618181210121618181A181A18181800FF18181818
-% 18181818171216181818181818181A181818181118121012101010101010
-% 080E10101818181818181210121018101810121812101818181817181218
-% 181816181818181818181810FFFFFFFF1810121018181818181818181818
-% 18181818181818181818171216181818181818181A181818181118121012
-% 101010101010080E10101818181818181210121018101810121812101818
-% 1818171812FFFFFFFF1818181818FFFF18101210FFFFFFFFFFFF18181818
-% 18181818181818181818181818181818171216181818181818181A181818
-% 181118121012101010101010080E10101818181818181210121018101810
-% 12181210181818FFFFFFFF1818181618FFFF1818181818FFFFFFFFFF1810
-% 121018181818181818181818181818181818181818181712161818181818
-% 18181A181818181118121012101010101010080E10101818181818181210
-% 121018101810121812FFFFFFFF1817181218FFFF1618181818FFFFFFFF10
-% 121018101810121018181818181818181818181818181818181818181712
-% 16181818181818181A181818181118121012101010101010080E10101818
-% 1818181812101210181018FFFFFFFF1018181818FFFF1218181816FFFFFF
-% FF1818181810121018101810121018181818181818181818181818181818
-% 18181818171216181818181818181A181818181118121012101010101010
-% 080E101018181818181812101210181018101218FFFFFFFFFFFF17181218
-% 181816181818181818181810121018101810121018181818181818181818
-% 18181818181818181818171216181818181818181A181800FF1818181818
-% 1A1818181812181818181818181818181618181612161810121012101010
-% 101010101218161818181018181316131810121010121612181812161818
-% 18181810181218181818FFFF1818FFFF1012101212181818181818181818
-% 1818181818181A1818181812181818181818181818181618181612161810
-% 121012101010101010101218161818181018181316131810121010121612
-% 181812FFFF1818FFFF10181218FFFF1817181818FFFF1012101212181818
-% 1818181818181818181818181A1818181812181818181818181818181618
-% 181612161810121012101010101010101218161818181018181316131810
-% 1210101216FFFF1812FFFF18181818FFFF12181818181718FFFF12101012
-% 1012121818181818181818181818181818181A1818181812181818181818
-% 181818181618181612161810121012101010101010101218161818181018
-% 18131613181012FFFF1216FFFF18121618FFFF18181018FFFF1818FFFF18
-% 1818121010121012121818181818181818181818181818181A1818181812
-% 181818181818181818181618181612161810121012101010101010101218
-% 161818181018181316FFFF1012FFFF12161218FFFF16181818FFFF1018FF
-% FF1818181718181812101012101212181818181818181818181818181818
-% 1A1818181812181818181818181818181618181612161810121012101010
-% 101010101218161818181018181316131810121010FFFF12181812161818
-% 181818101812181818181718181812101012101212181818181818181818
-% 1818181818181A18181818121818181818181818181800FF18181A181818
-% 181818181718181818121818181818121210121012101216121012101210
-% 101010101012181613101216181812161210121010121618181018181818
-% 181816121618181818FFFF1612FFFF10101010121018181818181A181818
-% 18181A181818181818181718181818121818181818121210121012101216
-% 121012101210101010101012181613101216181812161210121010121618
-% 1810FFFF1818FFFF161216181818181818161216FFFF1010101210181818
-% 18181A18181818181A181818181818181718181818121818181818121210
-% 121012101216121012101210101010101012181613101216181812161210
-% 12101012FFFF1810FFFF18181818161216181818FFFFFFFFFFFF12101010
-% 10121018181818181A18181818181A181818181818181718181818121818
-% 181818121210121012101216121012101210101010101012181613101216
-% 181812161210FFFF1012FFFF18101818181818181612FFFF1818FFFF1816
-% 12161210101010121018181818181A18181818181A181818181818181718
-% 181818121818181818121210121012101216121012101210101010101012
-% 1816131012161818FFFF1210FFFF10121618181018181818FFFF1612FFFF
-% 18181818181612161210101010121018181818181A18181818181A181818
-% 181818181718181818121818181818121210121012101216121012101210
-% 1010101010121816131012161818121612101210FFFF1618181018181818
-% 18181612161818181818181612161210101010121018181818181A181818
-% 18181A18181818181818171818181812181818181800FF1818181818181A
-% 181818181818181818161818161810101010101010121012181612101010
-% 100A10101210181810121818181018101010101010121810181018181618
-% 1818181810181818FFFF1210FFFF121010101010181612181818181A1818
-% 18181818181A181818181818181818161818161810101010101010121012
-% 181612101010100A10101210181810121818181018101010101010121810
-% 18FFFF1816FFFF18181810181818181612101810FFFF1010101018161218
-% 1818181A181818181818181A181818181818181818161818161810101010
-% 101010121012181612101010100A10101210181810121818181018101010
-% 101010FFFF1018FFFF18161818181818101818FF1816FFFF181012101010
-% 1010181612181818181A181818181818181A181818181818181818161818
-% 161810101010101010121012181612101010100A10101210181810121818
-% 1810181010FFFF1010FFFF10181018181618181818FFFF1818FFFF161210
-% 1810121010101010181612181818181A181818181818181A181818181818
-% 181818161818161810101010101010121012181612101010100A10101210
-% 18181012181818FFFF1010FFFF10101218101810181816FFFF1818FFFF18
-% 1818181612101810121010101010181612181818181A181818181818181A
-% 181818181818181818161818161810101010101010121012181612101010
-% 100A1010121018181012181818101810101010FFFF121810181018181618
-% 1818181810181818181612101810121010101010181612181818181A1818
-% 18181818181A181818181818181818161818161800FF181818181A181818
-% 181818181818181818181818181818101012101010101018121810181010
-% 101012161818181818161817181818181810101010101218181012121818
-% 18181210121012FFFF1012FFFF1210101010101010101012161818101818
-% 18181A181818181818181818181818181818181818101012101010101018
-% 121810181010101012161818181818161817181818181810101010101218
-% FFFF1212FFFF1818121012101210121012181612FFFF1010101010101012
-% 16181810181818181A181818181818181818181818181818181818101012
-% 101010101018121810181010101012161818181818161817181818181810
-% 1010FFFF1218FFFF1212181818181210121012FF12FFFF18161210101010
-% 10101010101216181810181818181A181818181818181818181818181818
-% 181818101012101010101018121810181010101012161818181818161817
-% 18181818FFFF1010FFFF12181810121218181818FFFFFFFFFF1012101218
-% 16121010101010101010101216181810181818181A181818181818181818
-% 181818181818181818101012101010101018121810181010101012161818
-% 181818161817FFFF1818FFFF1010101012181810121218FFFFFFFF101210
-% 12101210121816121010101010101010101216181810181818181A181818
-% 181818181818181818181818181818101012101010101018121810181010
-% 101012161818181818161817181818181810FFFF10101218181012121818
-% 181812101210121012101218161210101010101010101012161818101818
-% 18181A1818181818181818181818181818181800FF1818181A1E181A1818
-% 181612101218181818181818101810121010101010101218171818101210
-% 101018181818181818181818171818161012101210121010101010101010
-% 121612161216FFFF1018FFFF101010101010101010101012181018181818
-% 1A1E181A1818181612101218181818181818101810121010101010101218
-% 1718181012101010181818181818181818181718181610121012101210FF
-% FF1010FFFF10121612161216121810FFFF1210FFFF101010101010101012
-% 1810181818181A1E181A1818181612101218181818181818101810121010
-% 101010101218171818101210101018181818181818181818171818161012
-% 10FFFF1210FFFF101010101012161216121612FFFFFF1012101010101010
-% 1010101010121810181818181A1E181A1818181612101218181818181818
-% 101810121010101010101218171818101210101018181818181818181818
-% 171818FFFF1210FFFF12101010101010101012FFFF161216121810181012
-% 1010101010101010101010121810181818181A1E181A1818181612101218
-% 181818181818101810121010101010101218171818101210101018181818
-% 1818181818FFFF1818FFFF12101210121010101010FFFF1012FFFF161216
-% 1218101810121010101010101010101010121810181818181A1E181A1818
-% 181612101218181818181818101810121010101010101218171818101210
-% 1010181818181818181818181718181610FFFF1210121010101010101010
-% 121612161216121810181012101010101010101010101012181018181818
-% 1A1E181A181818161210121818181818181800FF1818181A181A18181812
-% 101210101012161218101818181010101010101010121612181818181812
-% 181818181818181818181818181818181816121010121012101010101010
-% 1210121012FFFF1012FFFF10101210100810100F1010101012181818181A
-% 181A18181812101210101012161218101818181010101010101010121612
-% 18181818181218181818181818181818181818181818181612101012FFFF
-% 1010FFFF10101210121012101010FFFF1210FFFF10100810100F10101010
-% 12181818181A181A18181812101210101012161218101818181010101010
-% 101010121612181818181812181818181818181818181818181818181816
-% FFFF1012FFFF101010101010121012101210FFFFFF101210101210100810
-% 100F1010101012181818181A181A18181812101210101012161218101818
-% 181010101010101010121612181818181812181818181818181818181818
-% 1818FFFF1816FFFF1012101210101010101012FFFF101210101012101210
-% 101210100810100F1010101012181818181A181A18181812101210101012
-% 161218101818181010101010101010121612181818181812181818181818
-% 18181818FFFF1818FFFF18161210101210121010FFFF1010FFFF12101210
-% 101012101210101210100810100F1010101012181818181A181A18181812
-% 101210101012161218101818181010101010101010121612181818181812
-% 1818181818181818181818181818FFFFFFFF121010121012101010101010
-% 121012101210101012101210101210100810100F1010101012181818181A
-% 181A18181812101210101012161218101800FF1818181A18181A18181810
-% 101010121012101212161218101010100A10101010121818181818181818
-% 18181A181818181818161812181818181818101210101810101010101010
-% 1216131810FFFFFFFF1818181010100A100B101010101010181818181A18
-% 181A18181810101010121012101212161218101010100A10101010121818
-% 18181818181818181A18181818181816181218181818181810121010FFFF
-% FFFF101010101216131810181218FFFFFFFF1010100A100B101010101010
-% 181818181A18181A18181810101010121012101212161218101010100A10
-% 10101012181818181818181818181A181818181818161812181818181818
-% FFFFFFFF1810101010101010121613181018FFFF161818181010100A100B
-% 101010101010181818181A18181A18181810101010121012101212161218
-% 101010100A1010101012181818181818181818181A181818181818161812
-% 1818FFFFFFFF10121010181010101010101012FFFFFFFF18121816181818
-% 1010100A100B101010101010181818181A18181A18181810101010121012
-% 101212161218101010100A1010101012181818181818181818181A181818
-% 18181816FFFFFFFF181818181012101018101010FFFFFFFF121613181018
-% 1218161818181010100A100B101010101010181818181A18181A18181810
-% 101010121012101212161218101010100A10101010121818181818181818
-% 18181A181818181818161812181818FFFF18101210101810101010101010
-% 1216131810181218161818181010100A100B101010101010181818181A18
-% 181A181818101010101210121012121600FF1818181A181A181818181210
-% 12101012101010101210121818101010100810121618181A181A18181818
-% 1A1818181818181012121816181212181018161010181818181810101012
-% 161216101316101818181818181010100E101010101010181818181A181A
-% 18181818121012101012101010101210121818101010100810121618181A
-% 181A181818181A1818181818181012121816181212181018161010181818
-% 181810101012161216101316101818181818181010100E10101010101018
-% 1818181A181A181818181210121010121010101012101218181010101008
-% 10121618181A181A181818181A1818181818181012121816181212181018
-% 161010181818181810101012161216101316101818181818181010100E10
-% 1010101010181818181A181A181818181210121010121010101012101218
-% 18101010100810121618181A181A181818181A1818181818181012121816
-% 181212181018161010181818181810101012161216101316101818181818
-% 181010100E101010101010181818181A181A181818181210121010121010
-% 10101210121818101010100810121618181A181A181818181A1818181818
-% 181012121816181212181018161010181818181810101012161216101316
-% 101818181818181010100E101010101010181818181A181A181818181210
-% 12101012101010101210121818101010100810121618181A181A18181818
-% 1A1818181818181012121816181212181018161010181818181810101012
-% 161216101316101818181818181010100E101010101010181818181A181A
-% 18181818121012101012101010101200FF10181818181818181818161216
-% 1218101810181012101018181610101010081012161818181818181A1818
-% 1818181818101210101012181010101210121818181818181A1818121818
-% 121818181218181818181818161210101010101010101210181818181818
-% 181818161216121810181018101210101818161010101008101216181818
-% 1818181A1818181818181810121010101218101010121012181818181818
-% 1A1818121818121818181218181818181818161210101010101010101210
-% 181818181818181818161216121810181018101210101818161010101008
-% 1012161818181818181A1818181818181810121010101218101010121012
-% 1818181818181A1818121818121818181218181818181818161210101010
-% 101010101210181818181818181818161216121810181018101210101818
-% 1610101010081012161818181818181A1818181818181810121010101218
-% 1010101210121818181818181A1818121818121818181218181818181818
-% 161210101010101010101210181818181818181818161216121810181018
-% 1012101018181610101010081012161818181818181A1818181818181810
-% 1210101012181010101210121818181818181A1818121818121818181218
-% 181818181818161210101010101010101210181818181818181818161216
-% 1218101810181012101018181610101010081012161818181818181A1818
-% 1818181818101210101012181010101210121818181818181A1818121818
-% 121818181218181818181818161210101010101010101210181818181818
-% 181818161216121810181018101200FF1012161818181818101210121018
-% 181818181312101010101212181810121012101818181818181818181A18
-% 181818101210101010121610101210121012101818181818181818101816
-% 181018181612101010121818181010101010101010101012161818181818
-% 101210121018181818181312101010101212181810121012101818181818
-% 181818181A18181818101210101010121610101210121012101818181818
-% 181818101816181018181612101010121818181010101010101010101012
-% 161818181818101210121018181818181312101010101212181810121012
-% 101818181818181818181A18181818101210101010121610101210121012
-% 101818181818181818101816181018181612101010121818181010101010
-% 101010101012161818181818101210121018181818181312101010101212
-% 181810121012101818181818181818181A18181818101210101010121610
-% 101210121012101818181818181818101816181018181612101010121818
-% 181010101010101010101012161818181818101210121018181818181312
-% 101010101212181810121012101818181818181818181A18181818101210
-% 101010121610101210121012101818181818181818101816181018181612
-% 101010121818181010101010101010101012161818181818101210121018
-% 181818181312101010101212181810121012101818181818181818181A18
-% 181818101210101010121610101210121012101818181818181818101816
-% 181018181612101010121818181010101010101010101012161818181818
-% 1012101210181818181813121000FF101218161818101010101010101818
-% 181818181010101010101618181816101018181818181818181818181818
-% 181012101010101010121010101210101210181812161218181A18181218
-% 181810181010101010101218101010121010101010101218161818101010
-% 101010101818181818181010101010101618181816101018181818181818
-% 181818181818181012101010101010121010101210101210181812161218
-% 181A18181218181810181010101010101218101010121010101010101218
-% 161818101010101010101818181818181010101010101618181816101018
-% 181818181818181818181818181012101010101010121010101210101210
-% 181812161218181A18181218181810181010101010101218101010121010
-% 101010101218161818101010101010101818181818181010101010101618
-% 181816101018181818181818181818181818181012101010101010121010
-% 101210101210181812161218181A18181218181810181010101010101218
-% 101010121010101010101218161818101010101010101818181818181010
-% 101010101618181816101018181818181818181818181818181012101010
-% 101010121010101210101210181812161218181A18181218181810181010
-% 101010101218101010121010101010101218161818101010101010101818
-% 181818181010101010101618181816101018181818181818181818181818
-% 181012101010101010121010101210101210181812161218181A18181218
-% 181810181010101010101218101010121010101010101218161818101010
-% 10101010181818181818101000FF10101012101012101010101012181818
-% 181818181010080A10101012181818181818181818181218181818171812
-% 181010101010101012181810101012161818161816181618171A18181810
-% 121818181812101010101018121610101210101010101012101012101010
-% 101012181818181818181010080A10101012181818181818181818181218
-% 181818171812181010101010101012181810101012161818161816181618
-% 171A18181810121818181812101010101018121610101210101010101012
-% 101012101010101012181818181818181010080A10101012181818181818
-% 181818181218181818171812181010101010101012181810101012161818
-% 161816181618171A18181810121818181812101010101018121610101210
-% 101010101012101012101010101012181818181818181010080A10101012
-% 181818181818181818181218181818171812181010101010101012181810
-% 101012161818161816181618171A18181810121818181812101010101018
-% 121610101210101010101012101012101010101012181818181818181010
-% 080A10101012181818181818181818181218181818171812181010101010
-% 101012181810101012161818161816181618171A18181810121818181812
-% 101010101018121610101210101010101012101012101010101012181818
-% 181818181010080A10101012181818181818181818181218181818171812
-% 181010101010101012181810101012161818161816181618171A18181810
-% 121818181812101010101018121610101210101010101012101012101010
-% 101012181818181818181000FF1210121018101810101010101012161818
-% 181A18181010101010101010101018181818181818161818181818101810
-% 121010101010121818181816121012101818181818181818181818181816
-% 181818181710101210121612101210101818101210121018101810101010
-% 101012161818181A18181010101010101010101018181818181818161818
-% 181818101810121010101010121818181816121012101818181818181818
-% 181818181816181818181710101210121612101210101818101210121018
-% 101810101010101012161818181A18181010101010101010101018181818
-% 181818161818181818101810121010101010121818181816121012101818
-% 181818181818181818181816181818181710101210121612101210101818
-% 101210121018101810101010101012161818181A18181010101010101010
-% 101018181818181818161818181818101810121010101010121818181816
-% 121012101818181818181818181818181816181818181710101210121612
-% 101210101818101210121018101810101010101012161818181A18181010
-% 101010101010101018181818181818161818181818101810121010101010
-% 121818181816121012101818181818181818181818181816181818181710
-% 101210121612101210101818101210121018101810101010101012161818
-% 181A18181010101010101010101018181818181818161818181818101810
-% 121010101010121818181816121012101818181818181818181818181816
-% 181818181710101210121612101210101818101210121018101810101010
-% 101012161818181A181800FF181818181818181810121210121012181818
-% 181818181010101010101010101012161818181818181718121612101210
-% 101210121818181818181818101210181818181818181818181818181811
-% 181218181818161210181018101818181818181818181818181810121210
-% 121012181818181818181010101010101010101012161818181818181718
-% 121612101210101210121818181818181818101210181818181818181818
-% 181818181811181218181818161210181018101818181818181818181818
-% 181810121210121012181818181818181010101010101010101012161818
-% 181818181718121612101210101210121818181818181818101210181818
-% 181818181818181818181811181218181818161210181018101818181818
-% 181818181818181810121210121012181818181818181010101010101010
-% 101012161818181818181718121612101210101210121818181818181818
-% 101210181818181818181818181818181811181218181818161210181018
-% 101818181818181818181818181810121210121012181818181818181010
-% 101010101010101012161818181818181718121612101210101210121818
-% 181818181818101210181818181818181818181818181811181218181818
-% 161210181018101818181818181818181818181810121210121012181818
-% 181818181010101010101010101012161818181818181718121612101210
-% 101210121818181818181818101210181818181818181818181818181811
-% 181218181818161210181018101818181818181818181818181810121210
-% 12101218181818181800FF1A181818181818181818101010101012181818
-% 181818101810121010101010101210181218181818181612181012101010
-% 10101018181818181A181810101012101216121612101210181818181810
-% 1012101818181012101210121818181A181A181818181818181818101010
-% 101012181818181818101810121010101010101210181218181818181612
-% 18101210101010101018181818181A181810101012101216121612101210
-% 1818181818101012101818181012101210121818181A181A181818181818
-% 181818101010101012181818181818101810121010101010101210181218
-% 18181818161218101210101010101018181818181A181810101012101216
-% 1216121012101818181818101012101818181012101210121818181A181A
-% 181818181818181818101010101012181818181818101810121010101010
-% 10121018121818181818161218101210101010101018181818181A181810
-% 101012101216121612101210181818181810101210181818101210121012
-% 1818181A181A181818181818181818101010101012181818181818101810
-% 121010101010101210181218181818181612181012101010101010181818
-% 18181A181810101012101216121612101210181818181810101210181818
-% 1012101210121818181A181A181818181818181818101010101012181818
-% 181818101810121010101010101210181218181818181612181012101010
-% 10101018181818181A181810101012101216121612101210181818181810
-% 1012101818181012101210121818181A181A181818181818181818101010
-% 101012181818181800FF1818181818181818181818121010101210121018
-% 101812101216181018121610101210181718181818181810181012101010
-% 121818181A18181818181810101010101010101010101012161818101210
-% 101018121210101810121018181818181818181818181818181818121010
-% 101210121018101812101216181018121610101210181718181818181810
-% 181012101010121818181A18181818181810101010101010101010101012
-% 161818101210101018121210101810121018181818181818181818181818
-% 181818121010101210121018101812101216181018121610101210181718
-% 181818181810181012101010121818181A18181818181810101010101010
-% 101010101012161818101210101018121210101810121018181818181818
-% 181818181818181818121010101210121018101812101216181018121610
-% 101210181718181818181810181012101010121818181A18181818181810
-% 101010101010101010101012161818101210101018121210101810121018
-% 181818181818181818181818181818121010101210121018101812101216
-% 181018121610101210181718181818181810181012101010121818181A18
-% 181818181810101010101010101010101012161818101210101018121210
-% 101810121018181818181818181818181818181818121010101210121018
-% 101812101216181018121610101210181718181818181810181012101010
-% 121818181A18181818181810101010101010101010101012161818101210
-% 101018121210101810121018181818181818181818181818181818121010
-% 1012101210181000FF1A1818181818181818181818181210101010101012
-% 1010181012181818181A1810121018181818181818181818171810121012
-% 16181818181A181818121010101010101010101010101012181618181012
-% 1012101010101210181018161818181A1818181818181818181818181210
-% 1010101010121010181012181818181A1810121018181818181818181818
-% 17181012101216181818181A181818121010101010101010101010101012
-% 1816181810121012101010101210181018161818181A1818181818181818
-% 1818181812101010101010121010181012181818181A1810121018181818
-% 18181818181817181012101216181818181A181818121010101010101010
-% 1010101010121816181810121012101010101210181018161818181A1818
-% 1818181818181818181812101010101010121010181012181818181A1810
-% 12101818181818181818181817181012101216181818181A181818121010
-% 101010101010101010101012181618181012101210101010121018101816
-% 1818181A1818181818181818181818181210101010101012101018101218
-% 1818181A181012101818181818181818181817181012101216181818181A
-% 181818121010101010101010101010101012181618181012101210101010
-% 1210181018161818181A1818181818181818181818181210101010101012
-% 1010181012181818181A1810121018181818181818181818171810121012
-% 16181818181A181818121010101010101010101010101012181618181012
-% 1012101010101210181018161818181A1818181818181818181818181210
-% 10101010101200FF18181818181012101817181818181810121010121010
-% 121012161818181818181818101818181818181818181818181818161818
-% 18181A181818181618181810101010101010101010101010121818181818
-% 181612161216121012101218181818181818181012101817181818181810
-% 121010121010121012161818181818181818101818181818181818181818
-% 18181816181818181A181818181618181810101010101010101010101010
-% 121818181818181612161216121012101218181818181818181012101817
-% 181818181810121010121010121012161818181818181818101818181818
-% 18181818181818181816181818181A181818181618181810101010101010
-% 101010101010121818181818181612161216121012101218181818181818
-% 181012101817181818181810121010121010121012161818181818181818
-% 10181818181818181818181818181816181818181A181818181618181810
-% 101010101010101010101010121818181818181612161216121012101218
-% 181818181818181012101817181818181810121010121010121012161818
-% 18181818181810181818181818181818181818181816181818181A181818
-% 181618181810101010101010101010101010121818181818181612161216
-% 121012101218181818181818181012101817181818181810121010121010
-% 121012161818181818181818101818181818181818181818181818161818
-% 18181A181818181618181810101010101010101010101010121818181818
-% 181612161216121012101218181818181818181012101817181818181810
-% 121010121000FF1818111210101010121818181818181818181210101210
-% 101210121810121618181818181818181A18181818181818181818181818
-% 18181A181818181818181012101210101210101010101018181820191818
-% 181818181818101010121012181818111210101010121818181818181818
-% 181210101210101210121810121618181818181818181A18181818181818
-% 18181818181818181A181818181818181012101210101210101010101018
-% 181820191818181818181818101010121012181818111210101010121818
-% 181818181818181210101210101210121810121618181818181818181A18
-% 18181818181818181818181818181A181818181818181012101210101210
-% 101010101018181820191818181818181818101010121012181818111210
-% 101010121818181818181818181210101210101210121810121618181818
-% 181818181A1818181818181818181818181818181A181818181818181012
-% 101210101210101010101018181820191818181818181818101010121012
-% 181818111210101010121818181818181818181210101210101210121810
-% 121618181818181818181A1818181818181818181818181818181A181818
-% 181818181012101210101210101010101018181820191818181818181818
-% 101010121012181818111210101010121818181818181818181210101210
-% 101210121810121618181818181818181A18181818181818181818181818
-% 18181A181818181818181012101210101210101010101018181820191818
-% 181818181818101010121012181818111210101010121818181818181818
-% 1812101000FF181818161812181612101212181818181018101813181818
-% 181612161818181818181818181A181818181A1818181812101316181818
-% 181818181812101210121012161818181010101010101018181818181818
-% 181810181818181012101018181818161812181612101212181818181018
-% 101813181818181612161818181818181818181A181818181A1818181812
-% 101316181818181818181812101210121012161818181010101010101018
-% 181818181818181810181818181012101018181818161812181612101212
-% 181818181018101813181818181612161818181818181818181A18181818
-% 1A1818181812101316181818181818181812101210121012161818181010
-% 101010101018181818181818181810181818181012101018181818161812
-% 181612101212181818181018101813181818181612161818181818181818
-% 181A181818181A1818181812101316181818181818181812101210121012
-% 161818181010101010101018181818181818181810181818181012101018
-% 181818161812181612101212181818181018101813181818181612161818
-% 181818181818181A181818181A1818181812101316181818181818181812
-% 101210121012161818181010101010101018181818181818181810181818
-% 181012101018181818161812181612101212181818181018101813181818
-% 181612161818181818181818181A181818181A1818181812101316181818
-% 181818181812101210121012161818181010101010101018181818181818
-% 181810181818181012101018181818161812181612101212181818181018
-% 10181300FF10181018101818181818101618181818181818181816181212
-% 101210121818181818181818181818181818181A18181618181818181818
-% 181818181610101210101210181018121012101010121012101217181818
-% 101818181810121010101810181018101818181818101618181818181818
-% 181816181212101210121818181818181818181818181818181A18181618
-% 181818181818181818181610101210101210181018121012101010121012
-% 101217181818101818181810121010101810181018101818181818101618
-% 181818181818181816181212101210121818181818181818181818181818
-% 181A18181618181818181818181818181610101210101210181018121012
-% 101010121012101217181818101818181810121010101810181018101818
-% 181818101618181818181818181816181212101210121818181818181818
-% 181818181818181A18181618181818181818181818181610101210101210
-% 181018121012101010121012101217181818101818181810121010101810
-% 181018101818181818101618181818181818181816181212101210121818
-% 181818181818181818181818181A18181618181818181818181818181610
-% 101210101210181018121012101010121012101217181818101818181810
-% 121010101810181018101818181818101618181818181818181816181212
-% 101210121818181818181818181818181818181A18181618181818181818
-% 181818181610101210101210181018121012101010121012101217181818
-% 101818181810121010101810181018101818181818101618181818181818
-% 181800FF1012121212101018181818181210121018121612161210101010
-% 101010101018181818181818181818181A18181818181818181818181818
-% 181818181813101012101210121810101010101010101012181812181618
-% 101210121010101010121012121212101018181818181210121018121612
-% 161210101010101010101018181818181818181818181A18181818181818
-% 181818181818181818181813101012101210121810101010101010101012
-% 181812181618101210121010101010121012121212101018181818181210
-% 121018121612161210101010101010101018181818181818181818181A18
-% 181818181818181818181818181818181813101012101210121810101010
-% 101010101012181812181618101210121010101010121012121212101018
-% 181818181210121018121612161210101010101010101018181818181818
-% 181818181A18181818181818181818181818181818181813101012101210
-% 121810101010101010101012181812181618101210121010101010121012
-% 121212101018181818181210121018121612161210101010101010101018
-% 181818181818181818181A18181818181818181818181818181818181813
-% 101012101210121810101010101010101012181812181618101210121010
-% 101010121012121212101018181818181210121018121612161210101010
-% 101010101018181818181818181818181A18181818181818181818181818
-% 181818181813101012101210121810101010101010101012181812181618
-% 101210121010101010121012121212101018181818181210121018121612
-% 1600FF121010101010121810181818161010121010101210121612101010
-% 10101010101210161818181818181A1820181A1818181818181818181818
-% 181818181618101010101012101812121012101012101012101817121210
-% 181618101210101010121010101010121810181818161010121010101210
-% 12161210101010101010101210161818181818181A1820181A1818181818
-% 181818181818181818181618101010101012101812121012101012101012
-% 101817121210181618101210101010121010101010121810181818161010
-% 12101010121012161210101010101010101210161818181818181A182018
-% 1A1818181818181818181818181818181618101010101012101812121012
-% 101012101012101817121210181618101210101010121010101010121810
-% 181818161010121010101210121612101010101010101012101618181818
-% 18181A1820181A1818181818181818181818181818181618101010101012
-% 101812121012101012101012101817121210181618101210101010121010
-% 101010121810181818161010121010101210121612101010101010101012
-% 10161818181818181A1820181A1818181818181818181818181818181618
-% 101010101012101812121012101012101012101817121210181618101210
-% 101010121010101010121810181818161010121010101210121612101010
-% 10101010101210161818181818181A1820181A1818181818181818181818
-% 181818181618101010101012101812121012101012101012101817121210
-% 181618101210101010121010101010121810181818161010121010101210
-% 00FF10101012101210101218181810121012161218121612101010101008
-% 100E1010101012121618181818181A181818181818181818181818181818
-% 181818181810101010101012101817181612101010121618181818101618
-% 181816181618181010101012101210101218181810121012161218121612
-% 101010101008100E1010101012121618181818181A181818181818181818
-% 181818181818181818181810101010101012101817181612101010121618
-% 181818101618181816181618181010101012101210101218181810121012
-% 161218121612101010101008100E1010101012121618181818181A181818
-% 181818181818181818181818181818181810101010101012101817181612
-% 101010121618181818101618181816181618181010101012101210101218
-% 181810121012161218121612101010101008100E10101010121216181818
-% 18181A181818181818181818181818181818181818181810101010101012
-% 101817181612101010121618181818101618181816181618181010101012
-% 101210101218181810121012161218121612101010101008100E10101010
-% 12121618181818181A181818181818181818181818181818181818181810
-% 101010101012101817181612101010121618181818101618181816181618
-% 181010101012101210101218181810121012161218121612101010101008
-% 100E1010101012121618181818181A181818181818181818181818181818
-% 181818181810101010101012101817181612101010121618181818101618
-% 181816181618181010101012101210101218181810121012161218121600
-% FF1012101010101010101012181818181012101010101210121010101010
-% 1010101010101012181818181A18181A1818181818171818121618181818
-% 181618181010101008101018181818181818181613181818181818121818
-% 181818181818101012101010101010101012181818181012101010101210
-% 1210101010101010101010101012181818181A18181A1818181818171818
-% 121618181818181618181010101008101018181818181818181613181818
-% 181818121818181818181818101012101010101010101012181818181012
-% 1010101012101210101010101010101010101012181818181A18181A1818
-% 181818171818121618181818181618181010101008101018181818181818
-% 181613181818181818121818181818181818101012101010101010101012
-% 181818181012101010101210121010101010101010101010101218181818
-% 1A18181A1818181818171818121618181818181618181010101008101018
-% 181818181818181613181818181818121818181818181818101012101010
-% 101010101012181818181012101010101210121010101010101010101010
-% 1012181818181A18181A1818181818171818121618181818181618181010
-% 101008101018181818181818181613181818181818121818181818181818
-% 101012101010101010101012181818181012101010101210121010101010
-% 1010101010101012181818181A18181A1818181818171818121618181818
-% 181618181010101008101018181818181818181613181818181818121818
-% 1818181818181010121010101010101010121818181810121010101000FF
-% 121010121012101210121010121612161216121813181718101210101010
-% 101010101010101816181818181A18181818181812101210121812171818
-% 18121810101008101010101818181A18181A181818181A18181818181818
-% 181818181810121010121012101210121010121612161216121813181718
-% 101210101010101010101010101816181818181A18181818181812101210
-% 1218121718184774BBFFFFFF7A59201010181818FFFFFF1A181818FFFFFF
-% 1818181818FFFFFF181818101210477FFFFF7F4010121010121612161216
-% 12183077FFFFBB742E28FFFF7F1010FFFFFF1018161818FFFFFF18181818
-% 182D74FFFF8E5318FFFFFF18181218101010081010101018184777BBFFFF
-% A37746181A1818181818184677BBFFFF773E121010121012104072FFFFFF
-% 90551216121612FFFFFF17181012FFFFFF1010101010FFFFFF1816181818
-% 184F83FFFF8346181210121012181217181818FFFFFF1010081010101018
-% 18181A18183877FFFF934F18FFFFFF18181818FFFFFF1810121010FFFFFF
-% 10121012102067BBFFFF7F451218131817187FFFFF71101010FFFFFF1010
-% 101816184677BBFFFF7747181818121012FFFFFF1217181818FFFFFF1010
-% 0810103E72FFFFFF9357181A181818181A18181818181818181818181810
-% 121010121012101210121010121612161216121813181718101210101010
-% 101010101010101816181818181A18181818181812101210121812171818
-% 18121810101008101010101818181A18181A181818181A18181818181818
-% 18181818181012101012101210121012101012161216121612181300FF10
-% 101210101210181210121010121018181818181618181818161010101010
-% 0A0E10101212181218181818181818181818101012101010121618121612
-% 1816101010080A1010121818181820181818181818181818181812101210
-% 181216181010101210101210181210121010121018181818181618181818
-% 1610101010100A0E10101212181218181818181818181818101012101010
-% 1216181291FFFFFFFFFFFFFFFFBB3E12181818FFFFFF18181818FFFFFF18
-% 18181210FFFFFF1216181029BBFFFFFFFFFFFF6710121010121018181818
-% 3EFFFFFFFFFFFFFFBBFFFF350A0EFFFFFF1218121818FFFFFF181818183E
-% FFFFFFFFFFFF7FFFFFFF16121816101010080A1010122893FFFFFFFFFFFF
-% FFFFA32D18181818128EFFFFFFFFFFFFFF72101210101265FFFFFFFFFFFF
-% FF8E18181818FFFFFF18181816FFFFFF10100A0E10FFFFFF181218182EBB
-% FFFFFFFFFFFF651012101010121618121612FFFFFF1010080A1010121818
-% 1818202EFFFFFFFFFFFF6AFFFFFF12101210FFFFFF1810101012FFFFFF10
-% 18121038BBFFFFFFFFFFFF6A1816181877FFFFFF8E101010FFFFFF101212
-% 181293FFFFFFFFFFFFFF771810101210FFFFFF1618121612FFFFFF101008
-% 0A65FFFFFFFFFFFFFF931818181818181818181812101210181216181010
-% 101210101210181210121010121018181818181618181818161010101010
-% 0A0E10101212181218181818181818181818101012101010121618121612
-% 1816101010080A1010121818181820181818181818181818181812101210
-% 181216181010101210101210181210121010121018181818181600FF1218
-% 1018181818181A1818181810101818161216121012101218181818121010
-% 101010101010101818181818181818101018121816121612101210121010
-% 1218181010101010101816181A181A181A18181A181A1816121010121012
-% 1012101812181018181818181A1818181810101818161216121012101218
-% 181818121010101010101010101818181818181818101018121816121612
-% 10127FFFFFFFFFFFFFFFFFFFFFFF29181618FFFFFF181A1818FFFFFF1816
-% 121010FFFFFF10121018BBFFFFFFFFFFFFFFFF3E18181810101818161291
-% FFFF67101246BBFFFFFF101010FFFFFF1010101818FFFFFF18181810BBFF
-% FFFFFFFFFFFFFFFFFF121010121818101010101021BBFFFFFFFFFFFFFFFF
-% FFFFBB301816128EFFFFFFFFFFFFFFFFFF7710181847FFFF932E181861FF
-% FF69181612FFFFFF12101218FFFFFF1210101010FFFFFF10101818BBFFFF
-% FFFFFFFFFFFF3818161216121012101210FFFFFF18101010101010181618
-% 1A1877FFFFFFFFFFFFFFFFFFFF10101210FFFFFF1018121810FFFFFF1818
-% 1A18BBFFFFFFFFFFFFFFFF55121012BBFFFFFF6A181210FFFFFF10101010
-% 8EFFFFFFFFFFFFFFFFFF7218121816FFFFFF1012101210FFFFFF1810103E
-% FFFF8E2D161864FFFF6A1A18181A181A1816121010121012101210181218
-% 1018181818181A1818181810101818161216121012101218181818121010
-% 101010101010101818181818181818101018121816121612101210121010
-% 1218181010101010101816181A181A181A18181A181A1816121010121012
-% 1012101812181018181818181A18181818101018181612161200FF101012
-% 101818181818181A18181218181818181812101810101218181010101010
-% 101010101210121618181818161210121018101818181810181012101210
-% 121612101010101018181818181A18181A181A1818181812101210121012
-% 101812101012101818181818181A18181218181818181812101810101218
-% 181010101010101010101210121618181818161210121018101818181810
-% 46FFFFFF74291216123EBBFFFF71181818FFFFFF18181A18FFFFFF181812
-% 1012FFFFFF12101849FFFFBB3618184FFFFF931A1818121818181818FFFF
-% FF1810101235FFFFFF101010FFFFFF1012101216FFFFFF18161252FFFFBB
-% 3E18184EBBFFFFFF12101210121612101010107FFFFFBB57291A182E64FF
-% FFFF83181840FFFFFF5321122161FFFFFF401018A3FFFF29181A1818FFFF
-% BB181818FFFFFF18101012FFFFFF1010101010FFFFFF1210124DFFFFBB3E
-% 161247FFFF9210181818181018101210FFFFFF1612101010101018181818
-% 18BBFFFF6C181A3EBBFFFFFF10121012FFFFFF1812101012FFFFFF181818
-% 57FFFFBB30182893FFFFA3121018FFFFFF1828101010FFFFFF10101040FF
-% FFFF5628182860FFFFFF3E181018FFFFFF1018101210FFFFFF161210A0FF
-% FF2018181818FFFFBB181A181A1818181812101210121012101812101012
-% 101818181818181A18181218181818181812101810101218181010101010
-% 101010101210121618181818161210121018101818181810181012101210
-% 121612101010101018181818181A18181A181A1818181812101210121012
-% 101812101012101818181818181A1818121818181818181200FF10121010
-% 121012181818181818181818181818181718131010101010121010101010
-% 101010101210101212121012101010121012181818181818101210101010
-% 10121818181316181818181A181818181818181818181010101010101012
-% 101010121010121012181818181818181818181818181718131010101010
-% 121010101010101010101210101212121012101010121012181818181877
-% FFFF721010101012182EFFFFFF181818FFFFFF18181818FFFFFF18181010
-% 10FFFFFF1012107FFFFF3E10121012181818181818181818181818A3FFFF
-% 4010101010FFFFFF101010FFFFFF1010121010FFFFFF1012107FFFFF3E12
-% 1818184EFFFFFF1210101010101218181838FFFFBB2D181A181818183EA3
-% 622E18187FFFFF51101010121065FFFF7210121012181818184777FFFFFF
-% 181818FFFFFF13101010FFFFFF1010101010FFFFFF1012107FFFFF401012
-% 101010121012181818181818101210FFFFFF10121818181316181818181A
-% FFFFFF281818183EFFFFFF10101010FFFFFF1010101210FFFFFF12181893
-% FFFF4618181828A3612D171813FFFFFF1010121010FFFFFF1010107FFFFF
-% 52121212101265FFFF74101218FFFFFF1818101210FFFFFF101218181813
-% 1618184677FFFFFF18181818181818181010101010101012101010121010
-% 121012181818181818181818181818181718131010101010121010101010
-% 101010101210101212121012101010121012181818181818101210101010
-% 10121818181316181818181A181818181818181818181010101010101012
-% 101010121010121012181818181818181818181818181700FF1810101210
-% 101818181818181818181818181818181816101012101010101010101010
-% 101210101210121010121010101010101216181818181818101010101010
-% 101018181612181818181818181818181818181810101010101010121010
-% 181810101210101818181818181818181818181818181816101012101010
-% 10101010101010121010121012101012101010101010121618181818BBFF
-% FF2110101010101018FFFFFF181818FFFFFF18181818FFFFFF1810101010
-% FFFFFF121010BBFFFF10121010181818181818181818181818184FFFFFFF
-% A072532DFFFFFF101010FFFFFF1210101210FFFFFF121010FFFFFF101216
-% 181818FFFFFF1010101010101010181868FFFF5618181818181818181818
-% 181810FFFFFF2010101210102DFFFFBB12101018284F92FFFFFFFFFF9318
-% 1818FFFFFF16101012FFFFFF1010101010FFFFFF101012BBFFFF10121010
-% 1010101012161818181818181010FFFFFF101010181816121818181818FF
-% FFFF1818181818FFFFFF10101010FFFFFF1018181010FFFFFF181818FFFF
-% FF1818181818181818181816FFFFFF1010101010FFFFFF101012FFFFFF21
-% 121010121029FFFFBB101216FFFFFF1818181010FFFFFF10101018182749
-% 93FFFFFFFFFF931818181818181810101010101010121010181810101210
-% 101818181818181818181818181818181816101012101010101010101010
-% 101210101210121010121010101010101216181818181818101010101010
-% 101018181612181818181818181818181818181810101010101010121010
-% 1818101012101018181818181818181818181818181800FF181818101612
-% 181018181818181818181818181818181818181010121018181010101210
-% 10101210101010121010121010101010121818181818181012101010100A
-% 101010121818181818181818181718181818121012101010121010181818
-% 181818101612181018181818181818181818181818181818181010121018
-% 181010101210101012101010101210101210101010101218181818181810
-% 12101010100A287FFFFFA3181818FFFFFF18181718FFFFFF1210121010FF
-% FFFF101818FFFFFFFFFFFFFFFFFFFFFF181818181818181818184EA3FFFF
-% FFFFFFFFFFFF181010FFFFFF1010121010FFFFFF101012FFFFFF10101218
-% 1818FFFFFF1012101010100A101010A0FFFF351818181818181718181818
-% 1210FFFFFF10121010181818FFFFFF10161269FFFFFFFFFFFFFFBB2D1818
-% 18FFFFFF18181810FFFFFF1818101010FFFFFF101210FFFFFFFFFFFFFFFF
-% FFFFFF10121818181818181012FFFFFF100A10101012181818181818FFFF
-% FF1718181818FFFFFF10101012FFFFFF1818181818FFFFFF181018FFFFFF
-% 1818181818181818181818FFFFFF1012101818FFFFFF121010FFFFFF1010
-% 1012101012FFFFFF101012FFFFFF1818181012FFFFFF100A101065FFFFFF
-% FFFFFFFFBB2D181718181818121012101010121010181818181818101612
-% 181018181818181818181818181818181818181010121018181010101210
-% 10101210101010121010121010101010121818181818181012101010100A
-% 101010121818181818181818181718181818121012101010121010181818
-% 18181810161218101818181818181818181818181800FF1A181812121210
-% 181012121018181818181818181216181818101210181818101018101818
-% 181816121012101012161010101010121818181818181012101010101008
-% 10101010181817181818181818181818161210101010101012181818181A
-% 181812121210181012121018181818181818181216181818101210181818
-% 101018101818181816121012101012161010101010121818181818181012
-% 10294671BBFFFFFFFF52181817FFFFFF18181818FFFFFF1210101010FFFF
-% FF181818BBFFFFFFFFFFFFFFFFFFBB1210181818181818181812162E4E69
-% 8EFFFFFFFF181010FFFFFF1818181612FFFFFF101216FFFFFF1010121818
-% 18FFFFFF10121010101010081010FFFFFF18171818181818181818181612
-% 10FFFFFF2010121818182EFFFFFF12125CFFFFFFFFFFFF77471818181818
-% FFFFFF18181810FFFFFF1818101018FFFFFF181816BBFFFFFFFFFFFFFFFF
-% FFBB10121818181818181012FFFFFFFFFFFFFFFFFFFFFF18171818FFFFFF
-% 1818181816FFFFFF10101010FFFFFF18181A1818FFFFFF101810FFFFFF18
-% 18181818181818121618FFFFFF1210181818FFFFFF101818FFFFFF221012
-% 1010122CFFFFFF101012FFFFFF1818181012FFFFFF10100859FFFFFFFFFF
-% FF774718181818181818161210101010101012181818181A181812121210
-% 181012121018181818181818181216181818101210181818101018101818
-% 181816121012101012161010101010121818181818181012101010101008
-% 10101010181817181818181818181818161210101010101012181818181A
-% 181812121210181012121018181818181818181200FF1818121010101012
-% 101010121012181818171818161812181012121012121818181818181818
-% 1A1818181010181818101210101010101818181818161217121010101010
-% 1010101012181818181818181118131810101010101012181818181A1818
-% 121010101012101010121012181818171818161812181012121012121818
-% 1818181818181A18181810101818181012101010101018181818181640A3
-% FFFFFFFFFFFFFF6510101218FFFFFF18181811FFFFFF3E10101020FFFFFF
-% 18181877FFFF2210101010FFFF7F10121012181818171818161812181012
-% 12FFFFFF181818FFFFFF46181A1829FFFFFF1818187FFFFF3E1010101847
-% FFFFFF16121712101010101010FFFFFF1218181818181818111813181010
-% 71FFFF5212181818186CFFFF741010BBFFFFFF723E1210121818181718FF
-% FFFF12181012FFFFFF4018181829FFFFFF181A1877FFFF2118181810FFFF
-% 7F10101018181818181612FFFFFFFFFFFFFFFFFFFFFF12181818FFFFFF18
-% 11181318FFFFFF10101012FFFFFF471A181822FFFFFF1012107FFFFF3E12
-% 181828A3612E161812FFFFFF1210121218FFFFFF18181877FFFF57181010
-% 18186AFFFF71101010FFFFFF4618181622FFFFFF101010BBFFFFFF724018
-% 1818181818181118131810101010101012181818181A1818121010101012
-% 101010121012181818171818161812181012121012121818181818181818
-% 1A1818181010181818101210101010101818181818161217121010101010
-% 1010101012181818181818181118131810101010101012181818181A1818
-% 1210101010121010101210121818181718181600FF181810101010101210
-% 101010101216181818181012101210101010101010101818181818181818
-% 181818181818181818101010101012181818181818181818101818121010
-% 100A10101818181818181818181810121010101012161818181A18181810
-% 101010101210101010101216181818181012101210101010101010101818
-% 181818181818181818181818181818101010101012181818181883FFFFFF
-% FFFFFFFFA03E100A101018FFFFFF18181818FFFFFFBB3E101072FFFFFF18
-% 181A47FFFF8E21102171FFFF47101010121618181818A0FFFF2A10101010
-% FFFFFF101818FFFFFFBB47181877FFFFFF1818184EFFFFBB3E101246BBFF
-% FFFF18181818101818121010FFFFFF10181818181818181818181012103E
-% FFFFFF5528182964FFFFFF3E1010FFFFFF2910101021FFFFA3181818FFFF
-% FF12101010FFFFFFBB3E181877FFFFFF18181846FFFF9229182977FFFF46
-% 10101218181818181818FFFFFFFFFFFFFFFFFFFFFF10181818FFFFFF1818
-% 181810FFFFFF10101216FFFFFFBB47181872FFFFFF10121052FFFFBB3016
-% 2892FFFFA0121012FFFFFF1010101010FFFFFF18181847FFFFFF57281829
-% 61FFFFFF3E101010FFFFFFBB46181877FFFFFF181812FFFFFF2210101828
-% FFFFA3181818181810121010101012161818181A18181810101010101210
-% 101010101216181818181012101210101010101010101818181818181818
-% 181818181818181818101010101012181818181818181818101818121010
-% 100A10101818181818181818181810121010101012161818181A18181810
-% 10101010121010101010121618181818101200FF18181810100808101010
-% 10100B0E0A10101618181818181810181316121612161210121618181818
-% 181818161218101818181818161010101012101010121010101218181618
-% 101010181618181A1818181310101810181012181818181A181818181810
-% 10080810101010100B0E0A10101618181818181810181316121612161210
-% 12161818181818181816121810181818181816101010101252FFFFFFFFBB
-% 72492D18161810101018FFFFFF1A181818FFFFFFFFFFFFFFFFFFFF77181A
-% 181892FFFFFFFFFFFFFFBB1010100B0E0A1010161857FFFF9328101867FF
-% FF83121612FFFFFFFFFFFFFFFFFFFF7512181018BBFFFFFFFFFFFFFFFFFF
-% FF1010121010101218181692FFFF29181618181A1818181310101810187F
-% FFFFFFFFFFFFFFFFFF831810106AFFFF461010208BFFFF52101618FFFFFF
-% 18181018FFFFFFFFFFFFFFFFFFFF771818181892FFFFFFFFFFFFFFBB1818
-% 161010101012101010FFFFFF101218181618101010181618FFFFFF181813
-% 1010FFFFFF10121818FFFFFFFFFFFFFFFFFFFF6A08101010BBFFFFFFFFFF
-% FFFFFF4718FFFFFFFFFFFFFF121612FFFFFF1216181883FFFFFFFFFFFFFF
-% FFFF8318181816FFFFFFFFFFFFFFFFFFFF7210121877FFFF4710102891FF
-% FF571818181310101810181012181818181A181818181810100808101010
-% 10100B0E0A10101618181818181810181316121612161210121618181818
-% 181818161218101818181818161010101012101010121010101218181618
-% 101010181618181A1818181310101810181012181818181A181818181810
-% 10080810101010100B0E0A10101618181800FF1818181612101010101010
-% 101010101010121818181818161018101612171218101210121818181818
-% 181818101810181818181818181810121010121010101012161818181818
-% 18181818181818181818181012101218161216181818181A181818181612
-% 101010101010101010101010121818181818161018101612171218101210
-% 1218181818181818181018101818181818181818101210A0FFFF7F361012
-% 161818181818181818FFFFFF18181818FFFFFF65FFFFFFFFFFFF3518181A
-% 181893FFFFFFFFFFFF36101010101010101012181892FFFFFFFFFFFFFFFF
-% 3C121810FFFFFF69FFFFFFFFFFFF35101810183EFFFFFFFFFFFF8EFFFFFF
-% 1210101010121618181869FFFF5718181818181818181810121012181690
-% FFFFFFFFFFFFFF831818161229BBFFFFFFFFFFFFFF8E10101218FFFFFF18
-% 161018FFFFFF68FFFFFFFFFFFF35181818181893FFFFFFFFFFFF3E181818
-% 1818101210101210FFFFFF121618181818181818181818FFFFFF18181810
-% 12FFFFFF16121618FFFFFF6CFFFFFFFFFFFF2E1010101029BBFFFFFFFFFF
-% FF691818FFFFFFFFFFFFFF121712FFFFFF101218181892FFFFFFFFFFFFFF
-% 831818181818FFFFFF67FFFFFFFFFFFF2E1216182EBBFFFFFFFFFFFFFF92
-% 18181818181012101218161216181818181A181818181612101010101010
-% 101010101010121818181818161018101612171218101210121818181818
-% 181818101810181818181818181810121010121010101012161818181818
-% 18181818181818181818181012101218161216181818181A181818181612
-% 1010101010101010101010101218181800FF181618181818181012101010
-% 101010101010121618181818121812181218121012101210121018181816
-% 181810181210121018181818181210101210121012101012181818181818
-% 1818181818181818181818131618101218181818181A1818181618181818
-% 181012101010101010101010121618181818121812181218121012101210
-% 12101818181618181018121012101818181818121010FFFFFF1012101012
-% 28FFFFFF18181818FFFFFF18181818FFFFFF16478EFFFF773518181A1818
-% 18164693FFBB6A29121010101010101010101216184F83FFFFFFA06A2A18
-% 121012FFFFFF123E92FFFF75351810181210122977BBFFA35612FFFFFF10
-% 12101210101218181835FFFFBB2D18181818181835A3612B161810121847
-% 77FFFFFF7746181618181818295A90FFFFFF7F471010101012FFFFFF1818
-% 1218FFFFFF18408EFFFF732E12101818181618478EFFBB652A1018181818
-% 18121010121012FFFFFF101218181818181818181818FFFFFF1818181813
-% FFFFFF12181818FFFFFF184692FFFF77351818101210102165A0FFFF8E3E
-% 121618FFFFFFFFFFFFFF121812FFFFFF1210121018184775FFFFFF774010
-% 1210181818FFFFFF103E90FFFF72301010121818296193FFFFFF834E1818
-% 1818181818131618101218181818181A1818181618181818181012101010
-% 101010101010121618181818121812181218121012101210121018181816
-% 181810181210121018181818181210101210121012101012181818181818
-% 1818181818181818181818131618101218181818181A1818181618181818
-% 18101210101010101010101012161800FF18121216181818121612101010
-% 10100A0F1010121818181618171816181618101210101010121018181812
-% 161218101010181818181818121612181018101810101012161818181818
-% 1A1818181A18181818181818181818161818181818181818121216181818
-% 12161210101010100A0F1010121818181618171816181618101210101010
-% 121018181812161218101010181818181818121612A3FFFF652810102990
-% FFFF831818181A1818181A18181818181818181818161818181818181818
-% 12121618181812161210101010100A0F1010121818181618171816181618
-% 10121010101012101818181216121810101018181818181812FFFFFF1018
-% 10181010101216181883FFFFBB5728181A2E56FFFFFF8318181818161818
-% 18181818181812121618181812161210101010100A0F1010121818181618
-% 171816181618101210101010121018181812161218101010181818181818
-% 121612181018FFFFFF1010121618181818181A1818181A18181818181818
-% 18181816181818181818181812121618181812161210101010100A0F1010
-% 12181818FFFFFF1816181618101210101010121018181812161218101010
-% 1818181818181216121810181018101010121618181818181A1818181A18
-% 181818181818181818161818181818181818121216181818121612101010
-% 10100A0F1010121818181618171816181618101210101010121018181812
-% 161218101010181818181818121612181018101810101012161818181818
-% 1A1818181A18181818181818181818161818181818181818121216181818
-% 12161210101010100A0F1010121800FF1810101012101216121810121010
-% 121010101010121618181818181818181810101010121010101210121612
-% 181018101818181818181816121810181018121010101212181818181818
-% 18181818181A181818181818181818181818181818181810101012101216
-% 121810121010121010101010121618181818181818181810101010121010
-% 101210121612181018101818181818181816121852FFFFFFFFFFFFFFFFFF
-% FF3E18181818FFFFFF18181A181818181818181818181818181818181810
-% 101012101216121810121010121010101010121618181818181818181810
-% 101010121010101210121612181018101818181818181816FFFFFF181018
-% 12101010121218181893FFFFFFFFFFFFFFFFFFFFFF361818181818181818
-% 1818181818101010121012161218101210101210101010FFFFFF18181818
-% 181818181810101010121010101210121612181018101818181818181816
-% 1218101810FFFFFFFFFFFFFFFFFFFFFFFF1818181818181A181818181818
-% 181818181818181818181810101012101216121810121010121010101010
-% 121618FFFFFF1818181818FFFFFF10121010101210121612181018101818
-% 18181818181612181018101812101010121218181818181818181818181A
-% 181818181818181818181818181818181810101012101216121810121010
-% 121010101010121618181818181818181810101010121010101210121612
-% 181018101818181818181816121810181018121010101212181818181818
-% 18181818181A181818181818181818181818181818181810101012101216
-% 1218101210101210101010101200FF181612101010101210121612101216
-% 101010101210121818181818181818181612101010101210121012101216
-% 121818181818181612101210121012101210101010101012181818181818
-% 181818181818181A18181818181818181818181818181612101010101210
-% 121612101216101010101210121818181818181818181612101010101210
-% 121012101216121818181818181612101210121067FFFFFFFFFFFFFFFF5C
-% 1818181818FFFFFF18181818181A18181818181818181818181818181612
-% 101010101210121612101216101010101210121818181818181818181612
-% 1010101012101210121012161218181818181816121012FFFFFF12101210
-% 10101010101218181883FFFFFFFFFFFFFFFFBB4018181818181818181818
-% 18181818161210101010121012161210121610101010FFFFFF1818181818
-% 181818181612101010101210121012101216121818181818181612101210
-% 12101210FFFFFFFFFFFFFFFFFFFFFFFF1818181818181818181A18181818
-% 181818181818181818181612101010101210121612101216101010101210
-% 12183EBBFF1818181818FFFFFF1010101210121012101216121818181818
-% 181612101210121012101210101010101012181818181818181818181818
-% 181A18181818181818181818181818181612101010101210121612101216
-% 101010101210121818181818181818181612101010101210121012101216
-% 121818181818181612101210121012101210101010101012181818181818
-% 181818181818181A18181818181818181818181818181612101010101210
-% 12161210121610101010121000FF18181816101010101012101210181216
-% 121010101012161818181818181818121810101010101010121012101810
-% 18181818181818121010121012101210121010100F101010121018181818
-% 18181A18181A181A18181818181818181818181818181816101010101012
-% 101210181216121010101012161818181818181818121810101010101010
-% 12101210181018181818181818121010121012104072BBFFFFA0652D1010
-% 12101818FFFFFF181A18181A181A18181818181818181818181818181816
-% 101010101012101210181216121010101012161818181818181818121810
-% 10101010101012101210181018181818181818121010FFFFFF1012101210
-% 10100F1010101210183E77A3FFFFBB834F1A181A18181818181818181818
-% 181818181816101010101012101210181216121010FFFFFF161818181818
-% 181818121810101010101010121012101810181818181818181210101210
-% 121012FFFFFFFFFFFFFFFFFFFFFFFF18181818181A18181A181A18181818
-% 181818181818181818181816101010101012101210181216121010101012
-% 161818771818181818FFFFFF101010101010121012101810181818181818
-% 18121010121012101210121010100F10101012101818181818181A18181A
-% 181A18181818181818181818181818181816101010101012101210181216
-% 121010101012161818181818181818121810101010101010121012101810
-% 18181818181818121010121012101210121010100F101010121018181818
-% 18181A18181A181A18181818181818181818181818181816101010101012
-% 101210181216121010101000FF1818181818121010101010101818181810
-% 101010101012181818181818181818181012101010121010101012101818
-% 101818181818181612101010121010101010100A10101010101210181818
-% 18181A181A18201818181818181818181818181818181818121010101010
-% 101818181810101010101012181818181818181818181012101010121010
-% 101012101818101818181818181612101010121010101010100A10101010
-% 10121018181818181A181A18201818181818181818181818181818181818
-% 121010101010101818181810101010101012181818181818181818181012
-% 101010121010101012101818101818181818181612101010121010101010
-% 100A1010101010121018181818181A181A18201818181818181818181818
-% 181818181818121010101010101818181810101010101012181818181818
-% 181818181012101010121010101012101818101818181818181612101010
-% 121010101010100A1010101010121018181818181A181A18201818181818
-% 181818181818181818181818121010101010101818181810101010101012
-% 181818181818181818181012101010121010101012101818101818181818
-% 181612101010121010101010100A1010101010121018181818181A181A18
-% 201818181818181818181818181818181818121010101010101818181810
-% 101010101012181818181818181818181012101010121010101012101818
-% 101818181818181612101010121010101010100A10101010101210181818
-% 18181A181A18201818181818181818181818181818181818121010101010
-% 1018181818101010101000FF181818181010101010101218181618181818
-% 1818181818181A1818181810101816181818181216101210121018101210
-% 1010181818101210101210101012101010100A0810101010101012161818
-% 181818181A18181818101012101810181618181818181010101010101218
-% 1816181818181818181818181A1818181810101816181818181216101210
-% 1210181012101010181818101210101210101012101010100A0810101010
-% 101012161818181818181A18181818101012101810181618181818181010
-% 1010101012181816181818181818181818181A1818181810101816181818
-% 181216101210121018101210101018181810121010121010101210101010
-% 0A0810101010101012161818181818181A18181818101012101810181618
-% 1818181810101010101012181816181818181818181818181A1818181810
-% 101816181818181216101210121018101210101018181810121010121010
-% 1012101010100A0810101010101012161818181818181A18181818101012
-% 101810181618181818181010101010101218181618181818181818181818
-% 1A1818181810101816181818181216101210121018101210101018181810
-% 1210101210101012101010100A0810101010101012161818181818181A18
-% 181818101012101810181618181818181010101010101218181618181818
-% 1818181818181A1818181810101816181818181216101210121018101210
-% 1010181818101210101210101012101010100A0810101010101012161818
-% 181818181A18181818101012101810181618181818181010101010101218
-% 18161818181818181800FF16181818101012081010101012181818181818
-% 181818181A181A1818161212181818181818161210121010121216181010
-% 121010101212161218101210101012101010101010101010101012181818
-% 18181A181818181810121012101210121216181818101012081010101012
-% 181818181818181818181A181A1818161212181818181818161210121010
-% 121216181010121010101212161218101210101012101010101010101010
-% 10101218181818181A181818181810121012101210121216181818101012
-% 081010101012181818181818181818181A181A1818161212181818181818
-% 161210121010121216181010121010101212161218101210101012101010
-% 10101010101010101218181818181A181818181810121012101210121216
-% 181818101012081010101012181818181818181818181A181A1818161212
-% 181818181818161210121010121216181010121010101212161218101210
-% 10101210101010101010101010101218181818181A181818181810121012
-% 101210121216181818101012081010101012181818181818181818181A18
-% 1A1818161212181818181818161210121010121216181010121010101212
-% 16121810121010101210101010101010101010101218181818181A181818
-% 181810121012101210121216181818101012081010101012181818181818
-% 181818181A181A1818161212181818181818161210121010121216181010
-% 121010101212161218101210101012101010101010101010101012181818
-% 18181A181818181810121012101210121216181818101012081010101012
-% 181818181818181800FF121018121612100E0A081010101818181A18181A
-% 181818181818181812101018181818181818181010181318161818121010
-% 101010101018181618181018121612101010101010100E10101210181818
-% 18181A18181818101216121018101210121018121612100E0A0810101018
-% 18181A18181A181818181818181812101018181818181818181010181318
-% 161818121010101010101018181618181018121612101010101010100E10
-% 10121018181818181A18181818101216121018101210121018121612100E
-% 0A081010101818181A18181A181818181818181812101018181818181818
-% 181010181318161818121010101010101018181618181018121612101010
-% 101010100E1010121018181818181A181818181012161210181012101210
-% 18121612100E0A081010101818181A18181A181818181818181812101018
-% 181818181818181010181318161818121010101010101018181618181018
-% 121612101010101010100E1010121018181818181A181818181012161210
-% 18101210121018121612100E0A081010101818181A18181A181818181818
-% 181812101018181818181818181010181318161818121010101010101018
-% 181618181018121612101010101010100E1010121018181818181A181818
-% 18101216121018101210121018121612100E0A081010101818181A18181A
-% 181818181818181812101018181818181818181010181318161818121010
-% 101010101018181618181018121612101010101010100E10101210181818
-% 18181A18181818101216121018101210121018121612100E0A0810101018
-% 18181A18181A1800FF101210181818181010100A10101818181818181818
-% 18181A181818181010121012101818181810181218161818181816181010
-% 101010121818181816181216181812101010101010101010101212101818
-% 181818181818181810181112101610101210181818181010100A10101818
-% 18181818181818181A181818181010121012101818181810181218161818
-% 181816181010101010121818181816181216181812101010101010101010
-% 101212101818181818181818181810181112101610101210181818181010
-% 100A1010181818181818181818181A181818181010121012101818181810
-% 181218161818181816181010101010121818181816181216181812101010
-% 101010101010101212101818181818181818181810181112101610101210
-% 181818181010100A1010181818181818181818181A181818181010121012
-% 101818181810181218161818181816181010101010121818181816181216
-% 181812101010101010101010101212101818181818181818181810181112
-% 101610101210181818181010100A1010181818181818181818181A181818
-% 181010121012101818181810181218161818181816181010101010121818
-% 181816181216181812101010101010101010101212101818181818181818
-% 181810181112101610101210181818181010100A10101818181818181818
-% 18181A181818181010121012101818181810181218161818181816181010
-% 101010121818181816181216181812101010101010101010101212101818
-% 181818181818181810181112101610101210181818181010100A10101818
-% 18181818181800FF10101010121018181810101012181818181818181818
-% 18181A181818101210101010121012101018101818181818181818181818
-% 181010181218101212101218181018101210101010101010101012181818
-% 181818181018101812181018121010101010121018181810101012181818
-% 18181818181818181A181818101210101010121012101018101818181818
-% 181818181818181010181218101212101218181018101210101010101010
-% 101012181818181818181018101812181018121010101010121018181810
-% 10101218181818181818181818181A181818101210101010121012101018
-% 101818181818181818181818181010181218101212101218181018101210
-% 101010101010101012181818181818181018101812181018121010101010
-% 12101818181010101218181818181818181818181A181818101210101010
-% 121012101018101818181818181818181818181010181218101212101218
-% 181018101210101010101010101012181818181818181018101812181018
-% 12101010101012101818181010101218181818181818181818181A181818
-% 101210101010121012101018101818181818181818181818181010181218
-% 101212101218181018101210101010101010101012181818181818181018
-% 101812181018121010101010121018181810101012181818181818181818
-% 18181A181818101210101010121012101018101818181818181818181818
-% 181010181218101212101218181018101210101010101010101012181818
-% 181818181018101812181018121010101010121018181810101012181818
-% 181818181800FF1012101010101218181810121618181818181818181818
-% 1818181810121010101010101012101212101810181818181818181A1818
-% 181216121612101010101210181012101010101010101012101012121818
-% 161210101212161216181818121012101010101218181810121618181818
-% 181818181818181818181012101010101010101210121210181018181818
-% 1818181A1818181216121612101010101210181012101010101010101012
-% 101012121818161210101212161216181818121012101010101218181810
-% 121618181818181818181818181818181012101010101010101210121210
-% 1810181818181818181A1818181216121612101010101210181012101010
-% 101010101012101012121818161210101212161216181818121012101010
-% 101218181810121618181818181818181818181818181012101010101010
-% 1012101212101810181818181818181A1818181216121612101010101210
-% 181012101010101010101012101012121818161210101212161216181818
-% 121012101010101218181810121618181818181818181818181818181012
-% 1010101010101012101212101810181818181818181A1818181216121612
-% 101010101210181012101010101010101012101012121818161210101212
-% 161216181818121012101010101218181810121618181818181818181818
-% 1818181810121010101010101012101212101810181818181818181A1818
-% 181216121612101010101210181012101010101010101012101012121818
-% 161210101212161216181818121012101010101218181810121618181818
-% 1818181800FF1810121010100E1816121810181618161818161818181818
-% 181818121012101010101218181812101012121612181618181818181818
-% 181818181810181210101010121612101010101010101012101210121012
-% 1010101010121818181818181810121010100E1816121810181618161818
-% 161818181818181818121012101010101218181812101012121612181618
-% 181818181818181818181810181210101010121612101010101010101012
-% 1012101210121010101010121818181818181810121010100E1816121810
-% 181618161818161818181818181818121012101010101218181812101012
-% 121612181618181818181818181818181810181210101010121612101010
-% 101010101012101210121012101010101012181818181818181012101010
-% 0E1816121810181618161818161818181818181818121012101010101218
-% 181812101012121612181618181818181818181818181810181210101010
-% 121612101010101010101012101210121012101010101012181818181818
-% 1810121010100E1816121810181618161818161818181818181818121012
-% 101010101218181812101012121612181618181818181818181818181810
-% 181210101010121612101010101010101012101210121012101010101012
-% 1818181818181810121010100E1816121810181618161818161818181818
-% 181818121012101010101218181812101012121612181618181818181818
-% 181818181810181210101010121612101010101010101012101210121012
-% 1010101010121818181818181810121010100E1816121810181618161818
-% 16181800FF181810100A100A101010101812121218181818181818181818
-% 181810101010101216181818181810121010121612181812101010181818
-% 18181818181818180A101012161210121010101010101010101010121010
-% 10101010121018181A181A181810100A100A101010101812121218181818
-% 181818181818181810101010101216181818181810121010121612181812
-% 10101018181818181818181818180A101012161210121010101010101010
-% 10101012101010101010121018181A181A181810100A100A101010101812
-% 121218181818181818181818181810101010101216181818181810121010
-% 12161218181210101018181818181818181818180A101012161210121010
-% 10101010101010101012101010101010121018181A181A181810100A100A
-% 101010101812121218181818181818181818181810101010101216181818
-% 18181012101012161218181210101018181818181818181818180A101012
-% 16121012101010101010101010101012101010101010121018181A181A18
-% 1810100A100A101010101812121218181818181818181818181810101010
-% 101216181818181810121010121612181812101010181818181818181818
-% 18180A101012161210121010101010101010101010121010101010101210
-% 18181A181A181810100A100A101010101812121218181818181818181818
-% 181810101010101216181818181810121010121612181812101010181818
-% 18181818181818180A101012161210121010101010101010101010121010
-% 10101010121018181A181A181810100A100A101010101812121218181818
-% 181800FF181818101010100B101012101818181818181818181010181216
-% 121012101010101218181818181A18181216121818121018181818181818
-% 181612181618181818101210181818101216121818181810101210101210
-% 10101010121818181818181818101010100B101012101818181818181818
-% 181010181216121012101010101218181818181A18181216121818121018
-% 181818181818181612181618181818101210181818101216121818181810
-% 10121010121010101010121818181818181818101010100B101012101818
-% 181818181818181010181216121012101010101218181818181A18181216
-% 121818121018181818181818181612181618181818101210181818101216
-% 12181818181010121010121010101010121818181818181818101010100B
-% 101012101818181818181818181010181216121012101010101218181818
-% 181A18181216121818121018181818181818181612181618181818101210
-% 181818101216121818181810101210101210101010101218181818181818
-% 18101010100B101012101818181818181818181010181216121012101010
-% 101218181818181A18181216121818121018181818181818181612181618
-% 181818101210181818101216121818181810101210101210101010101218
-% 18181818181818101010100B101012101818181818181818181010181216
-% 121012101010101218181818181A18181216121818121018181818181818
-% 181612181618181818101210181818101216121818181810101210101210
-% 10101010121818181818181818101010100B101012101818181818181818
-% 1800FF181818101210101010101012101210181818181818181211181012
-% 101012101010101818181818181812101210181810121012181018181818
-% 181210121210181818101216121818181818181818181218161812101010
-% 101010101012181818181818101210101010101012101210181818181818
-% 181211181012101012101010101818181818181812101210181810121012
-% 181018181818181210121210181818101216121818181818181818181218
-% 161812101010101010101012181818181818101210101010101012101210
-% 181818181818181211181012101012101010101818181818181812101210
-% 181810121012181018181818181210121210181818101216121818181818
-% 181818181218161812101010101010101012181818181818101210101010
-% 101012101210181818181818181211181012101012101010101818181818
-% 181812101210181810121012181018181818181210121210181818101216
-% 121818181818181818181218161812101010101010101012181818181818
-% 101210101010101012101210181818181818181211181012101012101010
-% 101818181818181812101210181810121012181018181818181210121210
-% 181818101216121818181818181818181218161812101010101010101012
-% 181818181818101210101010101012101210181818181818181211181012
-% 101012101010101818181818181812101210181810121012181018181818
-% 181210121210181818101216121818181818181818181218161812101010
-% 101010101012181818181818101210101010101012101210181818181818
-% 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
-%%EndPreview
-
-
-% including file "../library/bltGraph.pro"
-
-%
-% PostScript prolog file of the BLT graph widget.
-%
-% Copyright 1989-1992 Regents of the University of California.
-% Permission to use, copy, modify, and distribute this
-% software and its documentation for any purpose and without
-% fee is hereby granted, provided that the above copyright
-% notice appear in all copies.  The University of California
-% makes no representations about the suitability of this
-% software for any purpose.  It is provided "as is" without
-% express or implied warranty.
-%
-% Copyright 1991-1997 Bell Labs Innovations for Lucent Technologies.
-%
-% Permission to use, copy, modify, and distribute this software and its
-% documentation for any purpose and without fee is hereby granted, provided
-% that the above copyright notice appear in all copies and that both that the
-% copyright notice and warranty disclaimer appear in supporting documentation,
-% and that the names of Lucent Technologies any of their entities not be used
-% in advertising or publicity pertaining to distribution of the software
-% without specific, written prior permission.
-%
-% Lucent Technologies disclaims all warranties with regard to this software,
-% including all implied warranties of merchantability and fitness.  In no event
-% shall Lucent Technologies be liable for any special, indirect or
-% consequential damages or any damages whatsoever resulting from loss of use,
-% data or profits, whether in an action of contract, negligence or other
-% tortuous action, arising out of or in connection with the use or performance
-% of this software.
-%
-
-200 dict begin
-
-/BaseRatio 1.3467736870885982 def	% Ratio triangle base / symbol size
-/BgColorProc 0 def			% Background color routine (symbols)
-/DrawSymbolProc 0 def			% Routine to draw symbol outline/fill
-/StippleProc 0 def			% Stipple routine (bar segments)
-/DashesProc 0 def			% Dashes routine (line segments)
- 
-% Define the array ISOLatin1Encoding (which specifies how characters are 
-% encoded for ISO-8859-1 fonts), if it isn't already present (Postscript 
-% level 2 is supposed to define it, but level 1 doesn't). 
- 
-systemdict /ISOLatin1Encoding known not { 
-  /ISOLatin1Encoding [ 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /exclam /quotedbl /numbersign /dollar /percent /ampersand 
-    /quoteright 
-    /parenleft /parenright /asterisk /plus /comma /minus /period /slash 
-    /zero /one /two /three /four /five /six /seven 
-    /eight /nine /colon /semicolon /less /equal /greater /question 
-    /at /A /B /C /D /E /F /G 
-    /H /I /J /K /L /M /N /O 
-    /P /Q /R /S /T /U /V /W 
-    /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore 
-    /quoteleft /a /b /c /d /e /f /g 
-    /h /i /j /k /l /m /n /o 
-    /p /q /r /s /t /u /v /w 
-    /x /y /z /braceleft /bar /braceright /asciitilde /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent 
-    /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron 
-    /space /exclamdown /cent /sterling /currency /yen /brokenbar /section 
-    /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen 
-    /registered /macron 
-    /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph 
-    /periodcentered 
-    /cedillar /onesuperior /ordmasculine /guillemotright /onequarter 
-    /onehalf /threequarters /questiondown 
-    /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla 
-    /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex 
-    /Idieresis 
-    /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply 
-    /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn 
-    /germandbls 
-    /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla 
-    /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex 
-    /idieresis 
-    /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide 
-    /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn 
-    /ydieresis 
-  ] def 
-} if 
-
-% font ISOEncode font 
-% This procedure changes the encoding of a font from the default 
-% Postscript encoding to ISOLatin1.  It's typically invoked just 
-% before invoking "setfont".  The body of this procedure comes from 
-% Section 5.6.1 of the Postscript book. 
-
-/ISOEncode { 
-  dup length dict
-  begin 
-    {1 index /FID ne {def} {pop pop} ifelse} forall 
-    /Encoding ISOLatin1Encoding def 
-    currentdict 
-  end 
-
-  % I'm not sure why it's necessary to use "definefont" on this new 
-  % font, but it seems to be important; just use the name "Temporary" 
-  % for the font. 
-
-  /Temporary exch definefont 
-} bind def 
-
-/Stroke {
-  gsave
-    stroke
-  grestore
-} def
-
-/Fill {
-  gsave
-    fill
-  grestore
-} def
-
-/SetFont { 	
-  % Stack: pointSize fontName
-  findfont exch scalefont ISOEncode setfont
-} def
-
-/Box {
-  % Stack: x y width height
-  newpath
-  exch 4 2 roll moveto
-  dup 0 rlineto
-  exch 0 exch rlineto
-  neg 0 rlineto
-  closepath
-} def
-
-/SetFgColor {
-  % Stack: red green blue
-  CL 0 eq { 
-    pop pop pop 0 0 0 
-  } if
-  setrgbcolor
-  CL 1 eq { 
-    currentgray setgray 
-  } if
-} def
-
-/SetBgColor {
-  % Stack: red green blue
-  CL 0 eq { 
-    pop pop pop 1 1 1 
-  } if
-  setrgbcolor
-  CL 1 eq { 
-    currentgray setgray 
-  } if
-} def
-
-% The next two definitions are taken from "$tk_library/prolog.ps"
-
-% desiredSize EvenPixels closestSize
-%
-% The procedure below is used for stippling.  Given the optimal size
-% of a dot in a stipple pattern in the current user coordinate system,
-% compute the closest size that is an exact multiple of the device's
-% pixel size.  This allows stipple patterns to be displayed without
-% aliasing effects.
-
-/EvenPixels {
-  % Compute exact number of device pixels per stipple dot.
-  dup 0 matrix currentmatrix dtransform
-  dup mul exch dup mul add sqrt
-
-  % Round to an integer, make sure the number is at least 1, and compute
-  % user coord distance corresponding to this.
-  dup round dup 1 lt {pop 1} if
-  exch div mul
-} bind def
-
-% width height string filled StippleFill --
-%
-% Given a path and other graphics information already set up, this
-% procedure will fill the current path in a stippled fashion.  "String"
-% contains a proper image description of the stipple pattern and
-% "width" and "height" give its dimensions.  If "filled" is true then
-% it means that the area to be stippled is gotten by filling the
-% current path (e.g. the interior of a polygon); if it's false, the
-% area is gotten by stroking the current path (e.g. a wide line).
-% Each stipple dot is assumed to be about one unit across in the
-% current user coordinate system.
-
-% width height string StippleFill --
-%
-% Given a path already set up and a clipping region generated from
-% it, this procedure will fill the clipping region with a stipple
-% pattern.  "String" contains a proper image description of the
-% stipple pattern and "width" and "height" give its dimensions.  Each
-% stipple dot is assumed to be about one unit across in the current
-% user coordinate system.  This procedure trashes the graphics state.
-
-/StippleFill {
-    % The following code is needed to work around a NeWSprint bug.
-
-    /tmpstip 1 index def
-
-    % Change the scaling so that one user unit in user coordinates
-    % corresponds to the size of one stipple dot.
-    1 EvenPixels dup scale
-
-    % Compute the bounding box occupied by the path (which is now
-    % the clipping region), and round the lower coordinates down
-    % to the nearest starting point for the stipple pattern.  Be
-    % careful about negative numbers, since the rounding works
-    % differently on them.
-
-    pathbbox
-    4 2 roll
-    5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
-    6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
-
-    % Stack now: width height string y1 y2 x1 x2
-    % Below is a doubly-nested for loop to iterate across this area
-    % in units of the stipple pattern size, going up columns then
-    % across rows, blasting out a stipple-pattern-sized rectangle at
-    % each position
-
-    6 index exch {
-	2 index 5 index 3 index {
-	    % Stack now: width height string y1 y2 x y
-
-	    gsave
-	    1 index exch translate
-	    5 index 5 index true matrix tmpstip imagemask
-	    grestore
-	} for
-	pop
-    } for
-    pop pop pop pop pop
-} bind def
-
-
-/LS {	% Stack: x1 y1 x2 y2
-  newpath 4 2 roll moveto lineto stroke
-} def
-
-/EndText {
-  %Stack :
-  grestore
-} def
-
-/BeginText {
-  %Stack :  w h theta centerX centerY
-  gsave
-    % Translate the origin to the center of bounding box and rotate
-    translate neg rotate
-    % Translate back to the origin of the text region
-    -0.5 mul exch -0.5 mul exch translate
-} def
-
-/DrawAdjText {
-  %Stack : str strWidth x y
-  moveto				% Go to the text position
-  exch dup dup 4 2 roll
-
-  % Adjust character widths to get desired overall string width
-  % adjust X = (desired width - real width)/#chars
-
-  stringwidth pop sub exch
-  length div
-  0 3 -1 roll
-
-  % Flip back the scale so that the string is not drawn in reverse
-
-  gsave
-    1 -1 scale
-    ashow
-  grestore
-} def
-
-/DrawBitmap {
-  % Stack: ?bgColorProc? boolean centerX centerY width height theta imageStr
-  gsave
-    6 -2 roll translate			% Translate to center of bounding box
-    4 1 roll neg rotate			% Rotate by theta
-    
-    % Find upperleft corner of bounding box
-    
-    2 copy -.5 mul exch -.5 mul exch translate
-    2 copy scale			% Make pixel unit scale
-    newpath
-    0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto
-    closepath
-    
-    % Fill rectangle with background color
-    
-    4 -1 roll { 
-      gsave 
-	4 -1 roll exec fill 
-      grestore 
-    } if
-    
-    % Paint the image string into the unit rectangle
-    
-    2 copy true 3 -1 roll 0 0 5 -1 roll 0 0 6 array astore 5 -1 roll
-    imagemask
-  grestore
-}def
-
-% Symbols:
-
-% Skinny-cross
-/Sc {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate 45 rotate
-    0 0 3 -1 roll Sp
-  grestore
-} def
-
-% Skinny-plus
-/Sp {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    2 idiv
-    dup 2 copy
-    newpath neg 0 moveto 0 lineto
-    DrawSymbolProc
-    newpath neg 0 exch moveto 0 exch lineto
-    DrawSymbolProc
-  grestore
-} def
-
-% Cross
-/Cr {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate 45 rotate
-    0 0 3 -1 roll Pl
-  grestore
-} def
-
-% Plus
-/Pl {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    dup 2 idiv
-    exch 6 idiv
-
-    %
-    %          2   3		The plus/cross symbol is a
-    %				closed polygon of 12 points.
-    %      0   1   4    5	The diagram to the left
-    %           x,y		represents the positions of
-    %     11  10   7    6	the points which are computed
-    %				below.
-    %          9   8
-    %
-
-    newpath
-    2 copy exch neg exch neg moveto dup neg dup lineto
-    2 copy neg exch neg lineto 2 copy exch neg lineto
-    dup dup neg lineto 2 copy neg lineto 2 copy lineto
-    dup dup lineto 2 copy exch lineto 2 copy neg exch lineto
-    dup dup neg exch lineto exch neg exch lineto
-    closepath
-    DrawSymbolProc
-  grestore
-} def
-
-% Circle
-/Ci {
-  % Stack: x y symbolSize
-  3 copy pop
-  moveto newpath
-  2 div 0 360 arc
-  closepath DrawSymbolProc
-} def
-
-% Square
-/Sq {
-  % Stack: x y symbolSize
-  dup dup 2 div dup
-  6 -1 roll exch sub exch
-  5 -1 roll exch sub 4 -2 roll Box
-  DrawSymbolProc
-} def
-
-% Line
-/Li {
-  % Stack: x y symbolSize
-  3 1 roll exch 3 -1 roll 2 div 3 copy
-  newpath
-  sub exch moveto add exch lineto
-  stroke
-} def
-
-% Diamond
-/Di {
-  % Stack: x y symbolSize
-  gsave
-    3 1 roll translate 45 rotate 0 0 3 -1 roll Sq
-  grestore
-} def
-    
-% Triangle
-/Tr {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    BaseRatio mul 0.5 mul		% Calculate 1/2 base
-    dup 0 exch 30 cos mul		% h1 = height above center point
-    neg					% b2 0 -h1
-    newpath moveto			% point 1;  b2
-    dup 30 sin 30 cos div mul		% h2 = height below center point
-    2 copy lineto			% point 2;  b2 h2
-    exch neg exch lineto		% 
-    closepath
-    DrawSymbolProc
-  grestore
-} def
-% Bitmap
-/Bm {
-  % Stack: x y symbolSize
-  gsave
-    3 1 roll translate pop DrawSymbolProc
-  grestore
-} def
-    
-%%BeginSetup
-gsave					% Save the graphics state
-
-% Default line/text style parameters
-
-1 setlinewidth				% width
-1 setlinejoin				% join
-0 setlinecap				% cap
-[] 0 setdash				% dashes
-
-/CL 0 def				% Set color level mode
-0 0 0 setrgbcolor			% color
-
-% Transform coordinate system to use X11 coordinates
-
-% Flip the y-axis by changing the origin and reversing the scale,
-% making the origin the upper left corner
-0.600000 -0.600000 scale
-0 -1319 translate
-
-% User defined page layout
-
-%% Set color level
-/CL 2 def
-
-% Set origin
-120 173 translate
-
-% Landscape orientation
-0 972.127 translate
--90 rotate
-
-%% Set max aspect ratio
- 1.62292 1.62292 scale
-
-%%EndSetup
-
-14 /Helvetica-Bold SetFont
-0.996109 0.996109 0.996109 SetBgColor
-69 80 479 333 Box Fill
-
-gsave clip
-
-
-% Marker "bg" is a bitmap
-0.304692 0.929702 0.578134 SetBgColor
-newpath 79 90 moveto
-539 90 lineto
-539 404 lineto
-79 404 lineto
-79 90  lineto closepath Fill
-0 0.542977 0 SetFgColor
-  gsave
-    79 404 translate
-    460 -314 scale
-    460 314 true [460 0 0 -314 0 314] {	<000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000040000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000400000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	002410000000000000000449010000000000002000000000000000000000
-	000000000000000000000000000000002000000000000000000800004A00
-	000000000000000220002002010200000080000000000008020000000000
-	00002000000000200000000000008000000420000000000800004A000000
-	000000000002200020020102000000800000000000080200000000000000
-	2000000000200000000000008000000420000100000000A1000000000000
-	001011010020881020280000020004000000088040000000000000110201
-	411020000000000000020200004000000000804090040020800000200001
-	00000002010008800000005110912ADEEFFDBFFFFFFFFEFDFFCAA9BA3EEF
-	D72DF36ADDE5AAF400AA5504C00000008040900400208000002000010000
-	0002010008800000005110912ADEEFFDBFFFFFFFFEFDFFCAA9BA3EEFD72D
-	F36ADDE5AAF400AA5504C000016D572D4E95599695514A02420404200000
-	000000000001000000000000000000000000000000244444001129550524
-	5525544BEF6DD6DF40000100000000000000000000000000000008100844
-	400840000100020808529B5FFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFFFF
-	FFFFFFFFFFFF440001000000000000000000000000000000081008444008
-	40000100020808529B5FFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFFFFFFFF
-	FFFFFFFF4400097FFFFFFFFFFFFFFFFFFFFFFFFF9FFFFFFFFFFFFFFFFFFF
-	FFFFFFFFFFCDDDE0480A20004050C03101003DFBEFFFFDDFFF9FFFFEE57E
-	FBBF40000177F5FFEBFFFFFFFFFFFDFFFFEF9D42D21485A084817EDE24F9
-	018006000004182060107019C63901071CFF5F7BEEAEB756F7D7EFF6EEBF
-	40000177F5FFEBFFFFFFFFFFFDFFFFEF9D42D21485A084817EDE24F90180
-	06000004182060107019C63901071CFF5F7BEEAEB756F7D7EFF6EEBF400001
-	5F6BE7DFBFFFFEFF736B7FFAD71C08C18C1060C70C1E0F83F86041C41FC1
-	E61820761E790B071209831CD2FD6575BBFF4F9ABBB75EF7D54400017BEF
-	D7F6DBF6FE77FDFEFFBFBF9E0CC14E1070B70C1C0F87FC7061B400E0B618
-	307E13FC07071B4D90FCEFEEDDDFFAEA4774EFEBBEDFF74000017BEFD7F6
-	DBF6FE77FDFEFFBFBF9E0CC14E1070B70C1C0F87FC7061B400E0B618307E
-	13FC07071B4D90FCEFEEDDDFFAEA4774EFEBBEDFF74000015EDBD7B3FFAB
-	FD7F777F72EDEF1E03C27E18703F00FD078FFC01E13C00411F10782E0B7F
-	03071F0F835CF6BF7EF5B5BCCED4B75DFA6FAF40002575F5B7D5BEABF53F
-	FBEDBDFAF79E0BC96E1070B7083A078FFC60E1B68048B618381C1E7D8307
-	1E07839DEFF6EFB7FFFCCFEF7B76EC6FAF50002575F5B7D5BEABF53FFBED
-	BDFAF79E0BC96E1070B7083A078FFC60E1B68048B618381C1E7D83071E07
-	839DEFF6EFB7FFFCCFEF7B76EC6FAF5000015FBB316BAD7D5D3EEAFF7FAB
-	F51C0FC18C1060C70C33038C78204184F0C184093C381070C3C63E06121C
-	B6DB3FADF5FDCBBFDFEDBD7FDF400001767D53A7F5FFFCBFB766EEDDB798
-	2300092BAA042200002268980056AFDF7FFFFFFFFFFFFFFFFFFFFFFCEFD5
-	FFE5FFEDCD7E6B7D753F1B400001767D53A7F5FFFCBFB766EEDDB7982300
-	092BAA042200002268980056AFDF7FFFFFFFFFFFFFFFFFFFFFFCEFD5FFE5
-	FFEDCD7E6B7D753F1B4000017B3B736BB7BB75BDDBDD6FD6FD9FFFFFFFFF
-	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFB
-	CADBFAEFFD7D1F44000166DDB3AD9EF5D59FFFFFFFFFFF95A6F524894091
-	20082524A4010100000000000000000000000000000200000000000FCDAF
-	BF389A9D5F40000166DDB3AD9EF5D59FFFFFFFFFFF95A6F5248940912008
-	2524A4010100000000000000000000000000000200000000000FCDAFBF38
-	9A9D5F4000017EDCF37AA3FE699800000000000000000000000000000000
-	080000000000402000004201592D2AFF7FFDFBEF555B6D6BCF3DFBFC7B3A
-	DF40000176EFBB8D3FEEBF13FFFFFFFFFB5EB6AB35A55A4AA54AD54AA954
-	0201000100001080000400000000000000000000008B8EFE94802EDFDF50
-	000176EFBB8D3FEEBF13FFFFFFFFFB5EB6AB35A55A4AA54AD54AA9540201
-	000100001080000400000000000000000000008B8EFE94802EDFDF500001
-	7ECEF40B5BFEBB9000000000000000000000000000000000000000000000
-	040100080000000000000200000000000093CCBA000200009F4000116E96
-	F895877ECF9B010000000000000000000000000000004000000420442010
-	0000101000111200100000000000000B4BBF2DA7FAD3DF4100116E96F895
-	877ECF9B0100000000000000000000000000000040000004204420100000
-	101000111200100000000000000B4BBF2DA7FAD3DF4100017EC6F20EB5DF
-	DAAA10420000000000200000041100000000280110000400000004000000
-	40400000000000002080841BCB973FFEFFFB1F4000016E56C1F902FAE790
-	400000000000200010048000004000088000000000000080002000200100
-	0840104412010100102B669F6FFDEFEB534400016E56C1F902FAE7904000
-	000000002000100480000040000880000000000000800020002001000840
-	104412010100102B669F6FFDEFEB53440001769203F7F97EE39400000400
-	000000804100220001000200004200200001000001824200A05436BFE55B
-	12E12810004BE72A6BD5FE5B7F4000057E8B27B7793EA3B0011251400502
-	94250A4808A4A05A000311291414DBFD17780452A90010021550B56A57C4
-	B40400B77A9C57FCDFC9774000057E8B27B7793EA3B00112514005029425
-	0A4808A4A05A000311291414DBFD17780452A90010021550B56A57C4B404
-	00B77A9C57FCDFC9774000116AA04EDFBE1EA39D07FFFCF9F9A03CF3AF3D
-	FFCF5CFD200CFFFF8C3F71C74474163071A071BD381874E3D78B1D1A004F
-	FD1EF7D33EBCFF4000017F589FF3F78EB7B407733C70F9807833D61DFEC7
-	0D3CD00C73779D3BB8C73C301E397184307EBCD972E3C7972918006DF320
-	E4A9FAB41B6400017F589FF3F78EB7B407733C70F9807833D61DFEC70D3C
-	D00C73779D3BB8C73C301E397184307EBCD972E3C7972918006DF320E4A9
-	FAB41B640001751ABA693D961BA006FB3D7272D83CA5C85DCEC72C3CF439
-	1A7B1E7330CF9DDB1CBAF290F91E397972EFE79754BD823B6833DB6EDE7F
-	1BC000216A8133F3D9C6B18400737C7272943965E2999EC70D7CF21D7A71
-	9E3399C31CB91C797110FA3E39B9B3E7C71F69DC40BDAA97F9F1065FDF40
-	00216A8133F3D9C6B18400737C7272943965E2999EC70D7CF21D7A719E33
-	99C31CB91C797110FA3E39B9B3E7C71F69DC40BDAA97F9F1065FDF400001
-	7BD272DBA57259A824F33DF2F290398AF0DD9ECF28BCF33F407B9E7728CA
-	1FC23CFC72993B2F3D19A1EBCFAF410E40CEF51F686A56FBBB4000017752
-	F36AF9EA7985097B7C7276583BA470BC9ECF297CF11FF0F28F27B1D83FF3
-	3E797E10392F39BF8DEF978F658E60AD6918F9A006BD3F4000017752F36A
-	F9EA7985097B7C7276583BA470BC9ECF297CF11FF0F28F27B1D83FF33E79
-	7E10392F39BF8DEF978F658E60AD6918F9A006BD3F4000017BA4EAF7A6F3
-	59AC01713D727610390A7C992E47657CFA0FFD7A872B12D96FFA3CBCF66B
-	1EC7B919B2E737AF569E206F2B3BCCE00E772F4000116AC9F5C02BB9BB18
-	02FA7C7272503926BCDDDE97223CF303F9724FAB3ACB81783CB97282BCA7
-	B9B910E3C71F4C072055CB32FB000CFEB74800116AC9F5C02BB9BB1802FA
-	7C7272503926BCDDDE97223CF303F9724FAB3ACB81783CB97282BCA7B9B9
-	10E3C71F4C072055CB32FB000CFEB74800017FC9CD5EB5F9992C20F13CF2
-	784139247CBCAECF043C7120787917A709C008791E7972421CCFBD9934EB
-	D7A744C79053C5B6FC4086DC5F4000017597EC803B5DDA9800F37D72F2C8
-	3D8A1D5D1E872E7CF216B8F2C3D3B0CBB399BCB973864E67391DF2EBCF97
-	319F9036AAF5D7880F74DF4000017597EC803B5DDA9800F37D72F2C83D8A
-	1D5D1E872E7CF216B8F2C3D3B0CBB399BCB973864E67391DF2EBCF97319F
-	9036AAF5D7880F74DF4000017FD3AB003EFAEA1528F23D717AC839265CB9
-	1ECF3CBCF31299795BCB9ACF18B89E79710AEE253D5971E7D79B29879019
-	5B64FBC016BD574000017B5B7C803BADE8B802FB3CF2F1C81C872CBDBE57
-	4E3CC519B8F945CF89CFBCE31673FE3F5F7A7AFD52D5E54DC6B14C0DE6DC
-	57E00F697F5000017B5B7C803BADE8B802FB3CF2F1C81C872CBDBE574E3C
-	C519B8F945CF89CFBCE31673FE3F5F7A7AFD52D5E54DC6B14C0DE6DC57E0
-	0F697F5000016EC75A083ED648A842FC7FFBFBC42E8F867EBF5FBCFD8A3E
-	62FDD7F7EBEB1F4512C0210120060000000400120000080CA6F96DA08ED3
-	374000116B85A920BBF9F569020100000008003020800010008034000900
-	08000400100A0403148C12A9EFA5D7352B6C3F66EC04ABE6BDE00FBAFB40
-	00116B85A920BBF9F5690201000000080030208000100080340009000800
-	0400100A0403148C12A9EFA5D7352B6C3F66EC04ABE6BDE00FBAFB400001
-	7E86FC003F8ADD2809525402AA28082A22C94AA5A55494082C0089255A9D
-	E8B40498EA83C2AA3555745AE6D95155560328C4B7600DFBDF4000017F17
-	37803D5B72D4006D2BF2B55405D15146C552A554D007D07EAAB96C965350
-	01502A01515515A54A55115420612021FECA6FC007504F4000017F173780
-	3D5B72D4006D2BF2B55405D15146C552A554D007D07EAAB96C9653500150
-	2A01515515A54A55115420612021FECA6FC007504F4000016B2FCB027CA6
-	F6A00200000000000000000000000000000000000000000000000000002A
-	00000000000000000000000035C8B5E11CB59B4000017D16F64039096BB0
-	100000000000000000000000000000000000000000000000200000000000
-	000000000000040008403AB2B76007169B4400017D16F64039096BB01000
-	000000000000000000000000000000000000000000002000000000000000
-	00000000040008403AB2B76007169B4400017317F30033E0BA8200900000
-	000000000000000480000000040000000042000000014200000020000020
-	0000000400308AFC786014F2774000057615B5427B81EF90400200000000
-	000004000400010000000000000080080800040800011000841000040000
-	000000122CDE7D604EF2EF4000057615B5427B81EF904002000000000000
-	040004000100000000000000800808000408000110008410000400000000
-	00122CDE7D604EF2EF4000217B17D5083AC1650500800881000000000020
-	00002800000000800000008041110080000402120000010080040820007B
-	4FE27DE10CD2FF5000007627B740BBE6B690020020000900200000048024
-	8000004840040000080000000000021000000022102000400004204C86E2
-	35A00774CB4000007627B740BBE6B6900200200009002000000480248000
-	004840040000080000000000021000000022102000400004204C86E235A0
-	0774CB40000176137F003DF2D89680020000000000240000000000040400
-	09000000200200000000000000000000000000000000023BC76E7B6016D1
-	F74400017C4BEB403DA0E001201000000000000044000000008000000000
-	0080800004800200000000000800000042000000002D496E3BC00F75EF40
-	00017C4BEB403DA0E0012010000000000000440000000080000000000080
-	800004800200000000000800000042000000002D496E3BC00F75EF400001
-	722BBA083F9A9F3A58000019501BE7C9F51A6F7842000000000800000081
-	2011284849104010000080040001208000075B5C35E00555DB5000016E0C
-	A5413AAA67820880000358C245893D02EA71000254ABD441480000080000
-	00000000004001220240000402004000EDD73AE11E7B3F4000016E0CA541
-	3AAA67820880000358C245893D02EA71000254ABD4414800000800000000
-	0000004001220240000402004000EDD73AE11E7B3F4000017C2CD10031AA
-	BD81480000840093548C6B002A7200020000000000000202555129520002
-	0000800008000000000000081ACC35A00C55B7540001721637003DD27312
-	E010080050002000002000002000E3F27DDF8FFFFC7D374FD3A000000000
-	0000000210000002008407FE3DC006BB4F400001721637003DD27312E010
-	080050002000002000002000E3F27DDF8FFFFC7D374FD3A0000000000000
-	000210000002008407FE3DC006BB4F4000006C636D443DD96DE876000000
-	02000000000000028000CCF0595E3FFFFF1DD6AF85D00000000410000010
-	004000200202AB76736096B9FF4000017E055F003DFAF2915B0008810042
-	900204210A240800BF0FDBF9FFFFFFC7F8F93E9001104010008000000100
-	00000000CDDE7DE00CB93F4000017E055F003DFAF2915B00088100429002
-	04210A240800BF0FDBF9FFFFFFC7F8F93E90011040100080000001000000
-	0000CDDE7DE00CB93F4000016C286D013BBAA8FCBF206DA2475FB3E33E69
-	C6B57848D7AFD763FFFFFFF179FCFED00000008000008000000408000000
-	36EA77400779CB5000016C93FB483DEAF653D5007184475D33CA284D47AD
-	2800FCCF3F9FFFFFFFFC5ED53BA000040000102004008000000400008BB6
-	FBE096F9FF4000016C93FB483DEAF653D5007184475D33CA284D47AD2800
-	FCCF3F9FFFFFFFFC5ED53BA000040000102004008000000400008BB6FBE0
-	96F9FF4000087C11F7023FF96878EB82558C451501231A6548A9A000C36F
-	DD1FFFF4FFFF357560C09000080001008048000001000010077EDAA20EE8
-	AF4400017EA8F10075BAE52C03004410A61933322405008A00003CCD78FF
-	FA001FFF8F6C9E20010420010000000024400800100055DEFB6054FCFB50
-	00017EA8F10075BAE52C03004410A61933322405008A00003CCD78FFFA00
-	1FFF8F6C9E20010420010000000024400800100055DEFB6054FCFB500001
-	6612F7443342B4F90080000000000000000000000100C2ED79FF428443FF
-	E1BD808000100004080104420004004000010B7EFC60067CDF4000017E18
-	CB003BFAE62C0008000000000000008000000000016AD1FEB80008FFF1D7
-	A000000020110000400010280004021066B6D4E096D4F74000017E18CB00
-	3BFAE62C0008000000000000008000000000016AD1FEB80008FFF1D7A000
-	000020110000400010280004021066B6D4E096D4F74000016A2DF6403E7B
-	64D81000009000000000100000400008805DC7FB0848241FFCFDA1E00000
-	BC078BE7C27178EE3E0E82100AF4B36417BE6B4100216E1DBF023D2B65B8
-	4080000100000400000010000400A1678FF48000203FFCCFA23004104806
-	42E040984040222302114D6CEDC004DB774000216E1DBF023D2B65B84080
-	000100000400000010000400A1678FF48000203FFCCFA2300410480642E0
-	40984040222302114D6CEDC004DB774000053313AB003DD6EAB400080000
-	00400022200100080002905E3FF64A10081FFF75A5A84001220406008008
-	80400311021080D1570B51E72F4000017E93FC483FE54374000001000000
-	000000080000201040777FE50101225FFF3F855900002000462050004840
-	0202023089497E00007B3F4800017E93FC483FE543740000010000000000
-	00080000201040777FE50101225FFF3F8559000020004620500048400202
-	023089497E00007B3F480000771EBB803F93D5A800410004110040000020
-	00000004105CFFB8D4400803FF9CA2580020542181E0C018727E1C1E02E4
-	22DAABFFFFEA9B4000017F1DBE01366940B8000000400008000001000000
-	0082114CFF5A80002005FF8EA24800003C818362427128420E4B021082A2
-	BFFFFFB59F4100017F1DBE01366940B80000004000080000010000000082
-	114CFF5A80002005FF8EA24800003C818362427128420E4B021082A2BFFF
-	FFB59F4100017F57D1140F7B882810040200400000000008104002011973
-	FD6A80488081FFE7A43000804004462040C0C002031142110757D7FFFFEF
-	5F4000006B1DD84015F7803000100004000001020000400200001157FAA8
-	100004447FF326000000220004104004C404001102118C26F5085B7DDF41
-	00006B1DD84015F7803000100004000001020000400200001157FAA81000
-	04447FF326000000220004104004C404001102118C26F5085B7DDF410011
-	7D1FEFFFFFF58020008000000000800000000000000012E7FD8D41442110
-	7FF98400000220004620C40080064313021158B3DBEAAB7F9F480041769F
-	AFFFFF6B2100020004000420002002400000000412EFEAB2804118053FFC
-	96010800780783E750F870783C0C0211A0085D7DFEE63F400041769FAFFF
-	FF6B2100020004000420002002400000000412EFEAB2804118053FFC9601
-	0800780783E750F870783C0C0211A0085D7DFEE63F400000BF8EF1AFE9EA
-	0000200000400000000020000000001030CFF142001042101FFC94000020
-	28050183F16810A81402000140069AB7B5607B400001728FD3F6B5DE0400
-	0000000000000000000000000000259F5414458000049EFE5A0000008000
-	0000000000000040080480082AECFEC9FF400001728FD3F6B5DE04000000
-	000000000000000000000000259F5414458000049EFE5A00000080000000
-	000000000040080480082AECFEC9FF4000007FC7B2B7ABD4000000020000
-	04000210000820080000159FD8A80048414007FE2A000000004008000002
-	02010000001004014ABBFE5BDF4900016BCBCDF5F3282010802002002001
-	20010000800040406B3FAC5489008100A7FFA90000820000A01000204008
-	1000000040408DDDDACF674000016BCBCDF5F32820108020020020012001
-	0000800040406B3FAC5489008100A7FFA90000820000A010002040081000
-	000040408DDDDACF674000013EC36BE7B9BA000002002010800400000000
-	02000200437FC8E9C2A80A9207FFA5002008000004001200002041200000
-	0004497CFEA7D74000007D8BCDB2D9580002000000800000000811000000
-	0800467F61340284500153FF978880000002000400000000000110100000
-	4D756EEFFB4400007D8BCDB2D95800020000008000000008110000000800
-	467F61340284500153FF9788800000020004000000000001101000004D75
-	6EEFFB4400016BD0BBF7AAF800000012000000080080000000000000D4FF
-	D95483512A8009FF9A800000008358400004008521A0000080088EDB7AAF
-	FF4000017743FED6FDB011001000040400400000000000082004ACFF689A
-	0884801533F7DA000000020950115A5544B81110000002408FEDAFCDB741
-	00017743FED6FDB011001000040400400000000000082004ACFF689A0884
-	801533F7DA000000020950115A5544B81110000002408FEDAFCDB7410000
-	EAB937FBBB60400040000000000000080000000100000BFF55678A500502
-	89BFE9400102000186624321536011800202000067D57E9EDD4400117FED
-	7BF7F7E20004002020001200400004A2104000101BFEB2DD452048A451FF
-	E54100001001A17BD8A0436835110820000477FDFE9BFF4000117FED7BF7
-	F7E20004002020001200400004A2104000101BFEB2DD452048A451FFE541
-	00001001A17BD8A0436835110820000477FDFE9BFF400000B7ECAFD7CF80
-	0000010000408019812020000000040053FF5F575594200008FFE6801008
-	0000A1460A2CC35615882008292009EDF73D1F4000017B54A6F57B100000
-	080800020118C40200000000200053FD7CAAEB48891250FFF68000004000
-	ADE2D314C6DEA4A00000800059FCDE7F5F4900017B54A6F57B1000000808
-	00020118C40200000000200053FD7CAAEB48891250FFF68000004000ADE2
-	D314C6DEA4A00000800059FCDE7F5F4900017FD731F5DC00040240000100
-	15FFF800000800020120A7FFAD7716A1500128F77A600201001000000000
-	00000000000000042E7AFCFFDF400008AA931A13B90000080000200001ED
-	3C000200000000042FFDD55D899BC48408FFF84000040000800000000000
-	100000840000461533E69D400008AA931A13B90000080000200001ED3C00
-	0200000000042FFDD55D899BC48408FFF840000400008000000000001000
-	00840000461533E69D4000016DCBC0EE74004000008000003EF7FBCA2000
-	248001004FFF79F54E68FE53E87FF9501000000200040448200200800200
-	02085BCFC2FDCF4800007BD8A285A000000000040010776726C000000000
-	4002DFFD6C5557AA7A0FD57FFDA040100008050010008080040080000020
-	2FB31C6B5F4000007BD8A285A000000000040010776726C0000000004002
-	DFFD6C5557AA7A0FD57FFDA0401000080500100080800400800000202FB3
-	1C6B5F4000017E9D717791100124800042026F671BA0004000040408DFF6
-	F56B1AFD3D5CFC77FCA1010080201080D5015F7F7B7800000000BFE03C3B
-	8F400008BF55F9284010040011000807BFFFEADE040000000020BFED2C58
-	4D544F1A157FFE30000000000040040001000090000201007FED7D1E8F48
-	0008BF55F9284010040011000807BFFFEADE040000000020BFED2C584D54
-	4F1A157FFE30000000000040040001000090000201007FED7D1E8F480000
-	FA5DD2823020200000110043EDF577FC000202000100BFEDF54E97FFDE9D
-	B51FFE500C02090000201210120B40A00020000015E6FA3F4F4100003EFF
-	BE103131800040000003F38CBD3C4108000020013FA614512D9E3697E83F
-	BE50000080002000810124020010100000020A79F11B1B4000003EFFBE10
-	3131800040000003F38CBD3C4108000020013FA614512D9E3697E83FBE50
-	000080002000810124020010100000020A79F11B1B400001F9FDB3805030
-	40110000200366E537AA0000101000023FDD55069755374FB90FFF500010
-	200481000A0002014050400002280510EA1F1F40000037FB35FAB0198000
-	F000001EDE7FF5DD9000000000207BAAD02C703C8B804897FF0800000111
-	0000014CC402011000003880875E695F1F40000037FB35FAB0198000F000
-	001EDE7FF5DD9000000000207BAAD02C703C8B804897FF08000001110000
-	014CC402011000003880875E695F1F400000BF593B6ED0080103F084008A
-	7FFF75F70000028102027FD75F270D4A4D92D6CFF7A8080200000004454D
-	5041042000023C0014897A1F5B400000B7F33AF0F00004271800440FED40
-	3725020008000000FFAD4096B228055089175FA8000848008002027FFF02
-	00000000E70003461D8E1B400000B7F33AF0F00004271800440FED403725
-	020008000000FFAD4096B228055089175FA8000848008002027FFF020000
-	0000E70003461D8E1B400010F5D33990910240000A0000199F00067F0800
-	00040004FFEEF87A6E20AA84454BFB9080800002001003E2D7E540110000
-	83004105DB2F5F4000013F735844F00000020800007FCC0007AAC0200000
-	2006FFFF5DDA99502AC4A935EF50080020050210139FFCE1401404200300
-	0945BA8D174900013F735844F00000020800007FCC0007AAC02000002006
-	FFFF5DDA99502AC4A935EF50080020050210139FFCE14014042003000945
-	BA8D17490000B1B11AD38000001078220173FC2023FC60009000000AFEFE
-	B576BC844288047BBDD000010020800C1EF7A13E020000800E040082CBAE
-	3F4000017D335C6DC0104100FA001073F80201FDE0080212044AFBFFEEBA
-	B7502A456A94F7D40020000500151DBBE7DE400000001C0092616F8EB740
-	00017D335C6DC0104100FA001073F80201FDE0080212044AFBFFEEBAB750
-	2A456A94F7D40020000500151DBBE7DE400000001C0092616F8EB7400000
-	BE173BDF80800003C000003FF1F9E0FF01000000000AFFDFFEEEBF50118A
-	8ADBFFC0000012009112F36577D6008000047000005055A96F4000097F13
-	19AF9001040300410277F078F0BED0200000000ABFF77F7D4DA98A822BA5
-	DFC8110040070014EFBE9EDBC40010106010106A678D3B4800097F1319AF
-	9001040300410277F078F0BED0200000000ABFF77F7D4DA98A822BA5DFC8
-	110040070014EFBE9EDBC40010106010106A678D3B480000BB5EBAD80200
-	2006020001DBC070F07F700000000002F7EFFFD696A4A584ABDDFFCA0004
-	00208002DD6FF3A600000000C040820C1A9D5F4000016F0F3BF400000026
-	000011E6E074F273780090004090FF7EFD95BED24A422BA5F7C80400020A
-	801796BBD8EBC0000040C00010270AAAEB4800016F0F3BF4000000260000
-	11E6E074F273780090004090FF7EFD95BED24A422BA5F7C80400020A8017
-	96BBD8EBC0000040C00010270AAAEB480000B64679E108000007F81040B5
-	A078F01E500400020404FFFFF7E74BD08D895AF7BECA0000000A0113F77E
-	FF3764800000FF020108E7B6DB400001FB3337DC209042002081006DC470
-	F03BD10000080014F7ABFFF6BCD41FEAABB7FFEA2000200984164DEF6FD9
-	20008800008080807B1BFF400000AE1337B08000000080000075C070F03B
-	B02000002014DEFFDFD7BF685BAC56FFFFEA0004024A0012FFBF3EFB6100
-	0001000004087DAB6F400000AE1337B08000000080000075C070F03BB020
-	00002014DEFFDFD7BF685BAC56FFFFEA0004024A0012FFBF3EFB61000001
-	000004087DAB6F400004BE675E3800000810020801F7C07F802A50000000
-	001DFFEAFFFCD5B497F2AB7FDFEA08000005801753044067D88000040220
-	1042F5B7D7400000FCBBFD3000100000000007E5C47F803BBC0000110014
-	FBBFBFFFDEAA4BD236FFBDF28100400A8045365D813DD800008000820600
-	8EEFFB440000FCBBFD3000100000000007E5C47F803BBC0000110014FBBF
-	BFFFDEAA4BD236FFBDF28100400A8045365D813DD8000080008206008EEF
-	FB440001364AA86804010000082020BDE070F0AB10800440025DEEF6EBDE
-	9D6C88094FFEFFE204110015081BCE4BF01B32810200020087CB7ABFDF40
-	0000BE93724900000800800200BFC070F03BD0001000001DBFFFDEEE97B0
-	648234DFEDF208000044801F3C3FFC9DBC000000080005A95E7AD7400000
-	BE93724900000800800200BFC070F03BD0001000001DBFFFDEEE97B06482
-	34DFEDF208000044801F3C3FFC9DBC000000080005A95E7AD7400000FE4D
-	58C0000000020080007DC078703BD1000008002BFFFFF5F7DFD1120D57FB
-	FFF000000012800F5E68C317EA801000000807F0EE9E2B400020B695FAC8
-	000010080000003FE070701FD0010000882DFFEB7FAF795849028F7F9EF3
-	0000400500155E4EC21EDC000000204009A81DDC3F400020B695FAC80000
-	10080000003FE070701FD0010000882DFFEB7FAF795849028F7F9EF30000
-	400500155E4EC21EDC000000204009A81DDC3F400001BF5B51F000400100
-	090821F7A078727F78000040002BFDFFEEFD97557FFF4BFFF7B004010012
-	80155A35875EA6810008000006EAFFBDFF440000BB16F188110000000001
-	005FE470F07F7108000200ABF7FFBDD7FFAD00081FEEBFF10004000480B7
-	BE56C49B770002008002046C74FA2B400000BB16F188110000000001005F
-	E470F07F7108000200ABF7FFBDD7FFAD00081FEEBFF10004000480B7BE56
-	C49B770002008002046C74FA2B400000BFBAB3D10000400000000077F070
-	F0BE60002010002BFFBFFFEF7ED4810296FFF5F108100026821BB657CD9F
-	D6000000090803366EEFDB400000B7D6D7C8000004208008007F39FBC07E
-	80000040022B7EF6EDB5D7E8B4525FFBDFB1000000950016FD53769F7500
-	20000020400E9BBF77400000B7D6D7C8000004208008007F39FBC07E8000
-	0040022B7EF6EDB5D7E8B4525FFBDFB1000000950016FD53769F75002000
-	0020400E9BBF77400000BFD34B98200800080121087AE9FF03E781000400
-	002BEFFFBBEDBDB44D0915EF7FF1000000048017BE6FB31B569000022000
-	054D1FDFFF400000BECB47D0010000000000006FBC0003BD60000000002B
-	FFF7FFD5EFD4B2A45FFFF6F1010010130876EC1DD91FB70102080000018B
-	D7FBCF400000BECB47D0010000000000006FBC0003BD60000000002BFFF7
-	FFD5EFD4B2A45FFFF6F1010010130876EC1DD91FB70102080000018BD7FB
-	CF400008FFDECED0000000001000007FBE00051FE0008008002AFDEEB4F6
-	DEF949555FDDBFF110000004801DBE5BEC1D5F0000200000008BAEB53F40
-	0000B746B990000001080000021FE7000EDF00001020402BB7BFEFDB7BAC
-	5085BEFFFFF10000000B0097FA6F775F740000000810006AFEEAD3400000
-	B746B990000001080000021FE7000EDF00001020402BB7BFEFDB7BAC5085
-	BEFFFFF10000000B0097FA6F775F740000000810006AFEEAD3400000BFF6
-	FCE8084020000042100F6F8014FF01000080012BFFFABBEADFFD2A0A7FFD
-	DDF10000420A801FBCEEF51F7400080040009063EBB7FF400000BF16E190
-	00010000220000057EFFFB5300210000002BFFB7EFFB56F94589FD6FB7F1
-	0082002A8077B7999DDBD62020000084010ABE7817400000BF16E1900001
-	0000220000057EFFFB5300210000002BFFB7EFFB56F94589FD6FB7F10082
-	002A8077B7999DDBD62020000084010ABE7817400000B5D2DAD100000100
-	8000011FDE7FE9CD880000002022DEEB7BECDBFFEA0BF7FEFF710008000A
-	020E1F62A57E44010080000000077F726F400000FF6DF0D4010004240000
-	20556E7BB3EE208010010029FFFBFFFB5FEB6A97BDFFEFF1110000058815
-	DEAED7B76880000900008041B6E5DB440000FF6DF0D40100042400002055
-	6E7BB3EE208010010029FFFBFFFB5FEB6A97BDFFEFF1110000058815DEAE
-	D7B76880000900008041B6E5DB440000B598F2D00000000000480003E77B
-	3FF400004000012BFFDFFAF5D6FDFD2BEB77BDF10000000A001EFF926CFD
-	EC000000020808086ED496400000F79AD1D00020000001000203E5FBAB3C
-	000100200429FDFBEFFEEFBFB7DEFFFD7FB100001081905DEB03B1DF7E00
-	1000402001006BA109400000F79AD1D00020000001000203E5FBAB3C0001
-	00200429FDFBEFFEEFBFB7DEFFFD7FB100001081905DEB03B1DF7E001000
-	402001006BA109400000B525F1900200408020000003FF3FD4DC00000001
-	002DFFDEFFFD19EFFDEFD9DFEDF202200002810B2F7FF232501040090000
-	0008344047410000B7DAF3D010000401000000027B39D5A000080000000D
-	DFFBF5FADEF9FFDFFF7BBF600000020280153F48223B5011000001008080
-	FE7C8F400000B7DAF3D010000401000000027B39D5A000080000000DDFFB
-	F5FADEF9FFDFFF7BBF600000020280153F48223B5011000001008080FE7C
-	8F400000BFEDA1D000020008000000003FBD96C140200004022DFFEFFFEF
-	4DDFBF5EDDFFDBF200008009005DD77AACF75804000800000A0A73FFFF40
-	0000BDF6C39800000000020442103FFCFFC004000200001CFEEEEFBFB7F5
-	F59BF7EDFEE2080000250207D580B0C3F8000020000200007DBDFF400000
-	BDF6C39800000000020442103FFCFFC004000200001CFEEEEFBFB7F5F59B
-	F7EDFEE2080000250207D580B0C3F8000020000200007DBDFF400000BBDB
-	55D00040100108100000017FCC00000000000015EFFBFDFF4B7EDE9FFEFF
-	BFEA0000000080163EB4AFDE2030000004200004675F7D400000BFC707D0
-	0000012000000000013FC800000020000214BF57DFFFDDBBFA1FDBDEEFE2
-	2008000200137F7E7B3FC04000008000102A77B797400000BFC707D00000
-	012000000000013FC800000020000214BF57DFFFDDBBFA1FDBDEEFE22008
-	000200137F7E7B3FC04000008000102A77B797400000B48613D000000000
-	008000000119C000000000202814FDFFB7DF9FEFFC1FFF7BFFCA00000001
-	0007B77B2E76E050020423C24000EEFAAD400000BD1D4B91000080084000
-	088000100005000000808004EFE6FFFFCABAD05FB5FFFDCA000080800440
-	DF4FF3FF00000800020000805D2F57400000BD1D4B910000800840000880
-	00100005000000808004EFE6FFFFCABAD05FB5FFFDCA000080800440DF4F
-	F3FF00000800020000805D2F57400000B7991FD021080200101000000200
-	00000020420800047DFFFFFFEFFFA20FFFF7B7CA000008011000DDB157B5
-	41312001260000057ED5BF400000BF3FFFD0000000044001000088002040
-	088000000002F7AD597FFAB6804EFBBFFFC800800004801137EBFFF74090
-	0048040A94007EBEDD440000BF3FFFD00000000440010000880020400880
-	00000002F7AD597FFAB6804EFBBFFFC800800004801137EBFFF740900048
-	040A94007EBEDD440000BE9AB79408201000020020200000020020010000
-	004AFFDFEFEFEDED401BDEFEFFC01000010020403BEC45C640C00000222A
-	A880FF7B8F400000BAD1DED000810110080400000000000200000000000A
-	EEF7DFFF6350085E7BF7BFD00000400000205E6F773D41300002038A4804
-	2FDFFF440000BAD1DED000810110080400000000000200000000000AEEF7
-	DFFF6350085E7BF7BFD00000400000205E6F773D41300002038A48042FDF
-	FF440000BECF7DD000000001200000000008000000000002010AFFFCFFDB
-	FFEC801F6EDFEF90400100002142573BD736400420000000000077DDD740
-	0004B9FB7B9000002004002002044000800000000008004AFFEFB5FFE528
-	097F7DFDFDB080040008060157EAA2EA2A40040020000021DABFBB400004
-	B9FB7B9000002004002002044000800000000008004AFFEFB5FFE528097F
-	7DFDFDB080040008060157EAA2EA2A40040020000021DABFBB400000BBDF
-	F5D00008000010800000000000000080008000A4FEEDFFFDEDA020B76BBF
-	B7A1001000200000007FFF000000004200000106647EEF410000BDF7EB90
-	0900022002020810040000080004040000CCF7B7BFDFEAA142BFFEFFFFB9
-	008000800800004DF30000000008040804073EEDF7400000BDF7EB900900
-	022002020810040000080004040000CCF7B7BFDFEAA142BFFEFFFFB90080
-	00800800004DF30000000008040804073EEDF7400000BBDF55F100110007
-	C018081C110927614160100000B07FFBFCFFFAA800FFDDF7BF8A82000001
-	001000088002000080404000000A79BFFB400000BDFDFA0E20002002E03C
-	3E14070387B040B0100002687FEEBFEFEAA80177A7DEEB29800000000840
-	8000800000200000002008081FFECF400000BDFDFA0E20002002E03C3E14
-	070387B040B0100002687FEEBFEFEAA80177A7DEEB298000000008408000
-	800000200000002008081FFECF400000BBF7E10080400004304232000C84
-	C4013190900000AE3FEFEFFFE1100ADFF8FFFF4B20000000000000000008
-	00800000008200AE4BAFAB400000BEBFD548410002043062220488844401
-	31801000011A3FDBFFF6F0A82497A9FFFF19A00040082000002800002400
-	12220000010C0AF76F400000BEBFD5484100020430622204888444013180
-	1000011A3FDBFFF6F0A82497A9FFFF19A000400820000028000024001222
-	0000010C0AF76F400000BD7A23D130020006220632040004440031101202
-	01CE3EEFDFDBF40202D7ACBFFE5BE0220020020000000000000000000008
-	088774BBDB400000BF5F5B1C00008082700C2A040086C5C020E01F08014A
-	3FFFB97EBA24212FDACBFE71A200000000000000804000008000220001AD
-	68ED5F000000BF5F5B1C00008082700C2A040086C5C020E01F08014A3FFF
-	B97EBA24212FDACBFE71A200000000000000804000008000220001AD68ED
-	5F000008BEB6B3C714121007A01C3A04070746206190100008C8BFBFFFFE
-	FC13480DED7CBAB3A4000881002008000202000000040010086FFA153F40
-	0000BB8AFD3FE1000004300223040C0860303182102021ECCEEDCF77DF54
-	4243F4EF7CA190002208208100020000024408400090373A1E4797440000
-	BB8AFD3FE1000004300223040C0860303182102021ECCEEDCF77DF544243
-	F4EF7CA190002208208100020000024408400090373A1E4797440000B6D6
-	6803F108012430026100080420303108100005E95FF7BDFF7E25210AF6BD
-	ADABA800002004000000000000000002882846300662BB400000BBCBB3D8
-	3C902006B16622042804406331B0500001724DFFF7BFAF138015F7F7795A
-	AC0420008001000000401000020801004E67F03B6F400000BBCBB3D83C90
-	2006B16622042804406331B0500001724DFFF7BFAF138015F7F7795AAC04
-	20008001000000401000020801004E67F03B6F400000AF5FC5543E000007
-	60FA3E1F9786C7C1B1E0100005722FCF7FDFFF19088EFD5FA84360008200
-	000000100000000010000050DE8FFCF99D000000BF8F89BFBE6120810008
-	08100A038500000000010AD7A7DBBF7F7FC982417F75F2F3880000221000
-	040020000080000022103E1C8C7CEB400000BF8F89BFBE61208100080810
-	0A038500000000010AD7A7DBBF7F7FC982417F75F2F38800002210000400
-	20000080000022103E1C8C7CEB400000BF5A3AAD17A00410000000000000
-	0000000000200252B37FFDF7DBD1494B7BAF66D320800080002010010204
-	0010421200A03E677A7EBF400000BD8223F48F9080000000000000000000
-	000000000074D3EFD7DFEF89CA08BB7EE5F3320020000000004000000401
-	0080890074CFED973B000000BD8223F48F90800000000000000000000000
-	00000074D3EFD7DFEF89CA08BB7EE5F33200200000000040000004010080
-	890074CFED973B000000AE3CF90545D08000000000010010000000004000
-	013A43FA7EBF7FA16B52B9DBE5B6A80800040404000000201000040000C0
-	F9D8159D3B400000B73C9607B7680008000000000000000010010401088D
-	C9EFADDF9FCD54942DEF49F54020BFFD800000040000000000122420E8E8
-	1BC397400000B73C9607B7680008000000000000000010010401088DC9EF
-	ADDF9FCD54942DEF49F54020BFFD800000040000000000122420E8E81BC3
-	97400000BA79A80EB3601500208300805000401000800044017E74BFFFF7
-	FFD4C094ADBF9373D2003DCD8000800000000100080002C2F3301D679308
-	0000AE69D807A9E00000800C0807F800008902000000409554FFF7BDFFEA
-	554A7FFB17FD55922968240000004004002020A08902B5E01FA757400000
-	AE69D807A9E00000800C0807F800008902000000409554FFF7BDFFEA554A
-	7FFB17FD55922968240000004004002020A08902B5E01FA757400000BAF2
-	F80DF179001000103009000C003E083C20006F2FB36EDDEFDBEBB6115CDF
-	A6AB5E000000008001C000004C0000060285E6E01AB3DF000000BCF3780E
-	B9F0010D00320002001C003B10360009AAA3FB7FFFFBFFF5534277F7AEF7
-	72800336804012500020480600102B05A7501EF2DF400000BCF3780EB9F0
-	010D00320002001C003B10360009AAA3FB7FFFFBFFF5534277F7AEF77280
-	0336804012500020480600102B05A7501EF2DF400000BCC2B44D55B8103F
-	8204001910181212042004204FF87CB76DDFD7FB54485DFF0FB3E88002C6
-	120024100020480400000F45CDE89DCB9B000000BCF7BC076CE80031C045
-	04113113C8656E68800125D43C9FF77F7EF4905076BE1EE1B10443A40000
-	04100028FE0000002FC546D01EBB5F480000BCF7BC076CE80031C0450411
-	3113C8656E68800125D43C9FF77F7EF4905076BE1EE1B10443A400000410
-	0028FE0000002FC546D01EBB5F480000B4C5680FF4D90020C0DD140257EE
-	50C9C1D9B08457F4EE8FFFFEFFDBAD41AFFA3D0FE7920324200004165678
-	69E1B10112418DD81DE9D7000004BCC5688D2CB82202C073D8027B30F103
-	4272E011BA7E774F7FF7FDF54C40DDFCB15D5FA800400004065AD4B0594A
-	D2004553CF601C599F480004BCC5688D2CB82202C073D8027B30F1034272
-	E011BA7E774F7FF7FDF54C40DDFCB15D5FA800400004065AD4B0594AD200
-	4553CF601C599F480000BDADF427F6E80029C00104100500000800000005
-	E9D23F2FDDBFB7F9A288AD79BF2ED0DD10C004004393772C49F49DC02948
-	49A81AE98F000000BD8EEC0DBE78081F00030000120200000000022226BD
-	1D87FFFEFFFCB081AB726DD9FD0481E1100440000000000000054BCBCFE8
-	9FDD6F400000BD8EEC0DBE78081F00030000120200000000022226BD1D87
-	FFFEFFFCB081AB726DD9FD0481E1100440000000000000054BCBCFE89FDD
-	6F400000BD6BD8273668203C10010100960000000000801D5AE5CFD3D7DF
-	EFFF835696E67F72522B00A0004000008000040000002F8A5DA81EF5CB08
-	0000B9CCEC8FBA7080B0400400000800000831000021A42B7369FDF7FBFD
-	6D165DC9A9D571A8404406810000020100002000980A8FB81A596F400000
-	B9CCEC8FBA7080B0400400000800000831000021A42B7369FDF7FBFD6D16
-	5DC9A9D571A8404406810000020100002000980A8FB81A596F4000083D4F
-	EC0EEE5810240080082038040000480820008186FDE8FF7FCFFDAC8A5589
-	EFAABCA90000296001020000201000142402DDA05EFDCF400000BDADEC0D
-	B6F082380000000000000101040080057F7A6DACEFF77800030557CDF6DF
-	BFF4109083E00010002000810040900A4F981CD54D000000BDADEC0DB6F0
-	82380000000000000101040080057F7A6DACEFF77800030557CDF6DFBFF4
-	109083E00010002000810040900A4F981CD54D000020BD4F6847FA7A003F
-	C01040020000001070200225FFBEBEE8FFBFCE837C7255E6FFF6EB5BEFEF
-	7F5020402003100000022AC2CBE81FD9EF400000B5C5EC0DAED008011248
-	0100082062011C040000000000030DF0A2A970536C1100495495595AAB51
-	2200038204802200DFC94EB11EEB5B000000B5C5EC0DAED0080112480100
-	082062011C040000000000030DF0A2A970536C1100495495595AAB512200
-	038204802200DFC94EB11EEB5B000000AC86700E6CB800A4001004028401
-	42005F7BFDBFB7F6F7F367AB4E000494AF99FFBFBBBF77FFBC700A6F91D2
-	B4F0000900024BD819B9DD48000034D7B806D5D2400020AE61532A3E19C1
-	200000000000000794843FFFFF8C117C000000009120A2A03150A2455300
-	000850850CE05FDB5B40000034D7B806D5D2400020AE61532A3E19C12000
-	00000000000794843FFFFF8C117C000000009120A2A03150A24553000008
-	50850CE05FDB5B400000AAD2F04DD9A80000005256A0C4124511BFFFFFFF
-	FFFFFFFF2D07FFFFFFFC2CFFFFFFFFFFFFFFFF2400010000002022220215
-	67E81A731F400010BED37806E9D84404888000000000000E5FFFFFFFFFFF
-	FFFF9C7FFDFFFFFFAC7FFFFFFFFFFFFFFED40200000000208004A0056660
-	1BB3DF400010BED37806E9D84404888000000000000E5FFFFFFFFFFFFFFF
-	9C7FFDFFFFFFAC7FFFFFFFFFFFFFFED40200000000208004A00566601BB3
-	DF400000BBABD805B920108800100000000000053FFFFFFFFFFFFFFEBFFF
-	D54800FFFFF9FFFFFFFFFFFFFD25844250840002846B10A237B10EE60300
-	0000AF494100A351400000000080000000450FFFFFFFFFFFFFFF55DFADAB
-	FD0FFDE52DFFFFFFFFFFFD46302B56337B7428B4EE2A55C023A75F400000
-	AF494100A351400000000080000000450FFFFFFFFFFFFFFF55DFADABFD0F
-	FDE52DFFFFFFFFFFFD46302B56337B7428B4EE2A55C023A75F4000003F4C
-	FFFFD6AB39B5BB9ABD735335A695792A001001000000F80006A040C001A0
-	038903400006890112AD50A92526955BA4B4B37FFEE5BF480000B334AFFF
-	164A952DA92C4654122AD2A516A41C1801C200008C0307A0E07007F007FE
-	03B00403AEA4A55D6AA41864B4F7CAB488DFFE4EAB400000B334AFFF164A
-	952DA92C4654122AD2A516A41C1801C200008C0307A0E07007F007FE03B0
-	0403AEA4A55D6AA41864B4F7CAB488DFFE4EAB400000B7A2736B8D365A0C
-	22D65DEB5AA537545B601E0600F700E0EA438180E01807F80FE801FC0603
-	D276DF6BF77BEFA76AACAF4ADDE7FB9937400008BE971AE9CD5BFDFBFBBB
-	6EB3DDBEFB5B2FA01E07007700E0F4078980E0180F681FFA10DC0411ED65
-	000000000000000040115457461C4F000008BE971AE9CD5BFDFBFBBB6EB3
-	DDBEFB5B2FA01E07007700E0F4078980E0180F681FFA10DC0411ED650000
-	00000000000040115457461C4F0000002FD1956F18200000000000000000
-	0008EEC01E074037008FF4038080E0100D901E8580F40C07CA98FFFFFFFF
-	FFFFFFFFFFFF0E2DAA72DD410000BE52C7AE317FFFFFFFFFFFFFFFFFFFAF
-	55A21E076007208FDA038080E0380F181B598074004FE9FE3A6FB0D72BFF
-	BBFFDFFFB18EACC4F7400000BE52C7AE317FFFFFFFFFFFFFFFFFFFAF55A2
-	1E076007208FDA038080E0380F181B598074004FE9FE3A6FB0D72BFFBBFF
-	DFFFB18EACC4F7400000BA68E358627FF7FBDBDFFFFFED7DDF5D6BA01C07
-	620600CE75238080F0188E981F9B84781407ABA75FFFE55FBDFBEF7F4BF6
-	CB8BB8E9AF400000AEE638018AF3FAAFFAFEF3AF6AEFF6B7E7C05E077007
-	00E8D4839384E0180E180E1B803C0C07AAFB3F7773BB5577BDFF4FF7A460
-	0313E7400000AEE638018AF3FAAFFAFEF3AF6AEFF6B7E7C05E07700700E8
-	D4839384E0180E180E1B803C0C07AAFB3F7773BB5577BDFF4FF7A4600313
-	E7400000BDF29C0785BB753EBBDBDF7B6D5D563EF5E01E46380700E0F603
-	81C0E0301C181E1BC0384483ADA55E3BF4F6FFACEB7EB6FFF5784EA7DB40
-	000025BD27FE1BF5FCDFD9F77BEFCAFB39776F401C1E2C0704C0E80303C0
-	C0600810081180300403B3EB231BE75F5577DEBB676EA90F7A8FF7400000
-	25BD27FE1BF5FCDFD9F77BEFCAFB39776F401C1E2C0704C0E80303C0C060
-	0810081180300403B3EB231BE75F5577DEBB676EA90F7A8FF7400000BFFC
-	81F0177BDDB7FEEFD7B5B57E3AB5ABEC1C1C0A061000F00217F041C00000
-	0000010103045DF75A37B6BDFBF77EFCABDEE8A6B41DEF000000B3573202
-	8DB5F555ADBDFBE75E76D03157B7EBFFFDFFFFFFDFFFFFDFFFFFFFFFFFFF
-	FFFFFFFFD2D54D9DEF7D6D77D79D7DEB9E004877B7440000B35732028DB5
-	F555ADBDFBE75E76D03157B7EBFFFDFFFFFFDFFFFFDFFFFFFFFFFFFFFFFF
-	FFFFD2D54D9DEF7D6D77D79D7DEB9E004877B7440000BDDD18009AEEF9AF
-	F5FEF7F7B57B4D3D6FCFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFFFFFF
-	FD76A335C74F7AF7DEEB66AFEF00A0DECB400000BB7BE3FC6EDF675B6F79
-	DDDE9FAE24571EEBFFFFFF7FFFFFF7FFFFB7FF5FFFFFFFFFFFFFFFFFE5D7
-	8E7EB7B97FFBFDB6BDFEFFF057FEFF000000BB7BE3FC6EDF675B6F79DDDE
-	9FAE24571EEBFFFFFF7FFFFFF7FFFFB7FF5FFFFFFFFFFFFFFFFFE5D78E7E
-	B7B97FFBFDB6BDFEFFF057FEFF0000009DEFF803BFBDBBBDFB7F7F77FFFF
-	FFFEFBAAFFE9FBBFFFFFD9FFFEDB7DDFFFFFDDF7FFBDA9552502AA454292
-	45102050804000048800004000083FFFFF5FFFFFFFFFFFFFFDFEF6AAD2AB
-	2CA504142440000000000000000000000000000000000000000000000000
-	0000020000000000804800083FFFFF5FFFFFFFFFFFFFFDFEF6AAD2AB2CA5
-	041424400000000000000000000000000000000000000000000000000000
-	0200000000008048000080000000000000000000000000211224134AEAB7
-	ABBEFFFFFFFFFFFFFFFBFFFFFFFFED77FFBFFFFFFFFFFFFFFFFFFFFFFFFF
-	FFFFF08400000000A48D53EDB6EFFFFFFFFFFFF7FFDEFDB56D4AAA54A080
-	000000000000000000000000000000000000000000000000000000000000
-	020000900000A48D53EDB6EFFFFFFFFFFFF7FFDEFDB56D4AAA54A0800000
-	000000000000000000000000000000000000000000000000000000000200
-	009000000000000000000000000000000000000000000000001000000000
-	000000000000000000000000000000000000000000000800040000800000
-	000000000000000000000000000000000000000000000000100000000000
-	000000000000000000000000000000100000004400948000100200400000
-	000000000000000000000000000000000000000000001000000000000000
-	000000000000000000000000001000000044009480001002004000000100
-	800000000000000000000000000000000000040040880000000000000000
-	000000000010100000000000000000004000000040000200000004000000
-	000000008000000000000000000000000008000084200000000000000002
-	088401008000800004000002200004000020000040000000040000000000
-	000080000000000000000000000000080000842000000000000000020884
-	010080008000040000022000040000200000400000000000000004400000
-	000000000000000002080008000000000000000000000000000000000002
-	000004010000000000000000000100010000000010000000000000000001
-	444000020000000000002000002200000000000000000000000020200000
-	000400040010001080000000000400100000100000000000000000014440
-	000200000000000020000022000000000000000000000000202000000004
-	000400100010800000000004001000000008910800000000000000000000
-	000010002000002000800820880000000000020010080200000000000010
-	0080000000000400001000000024810000000000800A0084000042000001
-	008000800100420000020000000011000810802000480002010000400400
-	040020001000000004000024810000000000800A00840000420000010080
-	008001004200000200000000110008108020004800020100004004000400
-	200010000000040000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	000000000000000000000000000000000000000000000000000000000000
-	00>
-    } imagemask
-grestore
-0.500008 0.500008 0.500008 SetBgColor
-421 154 121 2 Box Fill
-
-540 86 2 70 Box Fill
-
-0.750011 0.750011 0.750011 SetBgColor
-newpath 421 156 moveto
-421 86 lineto
-542 86 lineto
-540 88 lineto
-423 88 lineto
-423 154 lineto
-421 156 lineto
-421 156  lineto closepath Fill
-0 setlinejoin
-0 setlinecap
-0 0 0 SetFgColor
-3 setlinewidth
-[ ] 0 setdash
-448 102 42 Li
-1 setlinewidth
-[ ] 0 setdash
-
-/DrawSymbolProc {
-  gsave
-    0.996109 0.644541 0 SetBgColor
-    Fill
-    0 0 0 SetFgColor
-    stroke
-  grestore
-} def
-
-448 102 21 Ci
-58 27 0 502 104 BeginText
-14 /Helvetica SetFont
-0 0 0 SetFgColor
-(sin\(x\)) 58 0 21 DrawAdjText
-EndText
-0 setlinejoin
-0 setlinecap
-0.542977 0.542977 0 SetFgColor
-3 setlinewidth
-[ ] 0 setdash
-448 135 42 Li
-1 setlinewidth
-[ ] 0 setdash
-
-/DrawSymbolProc {
-  gsave
-    0.996109 0.996109 0 SetBgColor
-    Fill
-    0.542977 0.542977 0 SetFgColor
-    stroke
-  grestore
-} def
-
-448 135 21 Ci
-64 27 0 505 137 BeginText
-14 /Helvetica SetFont
-0 0 0 SetFgColor
-(cos\(x\)) 64 0 21 DrawAdjText
-EndText
-24 16 90 537 388 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(360) 24 0 12 DrawAdjText
-EndText
-32 16 90 79 384 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(-360) 32 0 12 DrawAdjText
-EndText
-8 16 0 85 90 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-16 16 0 89 402 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(-1) 16 0 12 DrawAdjText
-EndText
-8 16 90 537 364 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-8 16 90 79 356 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0) 8 0 12 DrawAdjText
-EndText
-8 16 0 101 90 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-8 16 0 109 402 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0) 8 0 12 DrawAdjText
-EndText
-
-% Element "line2"
-
-0 setlinejoin
-0 setlinecap
-0.542977 0.542977 0 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-/DashesProc {} def
- newpath 79 90 moveto
- 82 90 lineto
- 85 92 lineto
- 88 95 lineto
- 91 99 lineto
- 94 104 lineto
- 98 110 lineto
- 101 118 lineto
- 104 126 lineto
- 107 135 lineto
- 110 145 lineto
- 114 156 lineto
- 117 168 lineto
- 120 180 lineto
- 123 192 lineto
- 126 205 lineto
- 130 219 lineto
- 133 232 lineto
- 136 246 lineto
- 139 260 lineto
- 142 273 lineto
- 145 287 lineto
- 149 300 lineto
- 152 312 lineto
- 155 324 lineto
- 158 336 lineto
- 161 347 lineto
- 165 357 lineto
- 168 366 lineto
- 171 374 lineto
- 174 382 lineto
- 177 388 lineto
- 181 393 lineto
- 184 397 lineto
- 187 400 lineto
- 190 402 lineto
- 193 403 lineto
- 196 402 lineto
- 200 400 lineto
- 203 397 lineto
- 206 393 lineto
- 209 388 lineto
- 212 382 lineto
- 216 374 lineto
- 219 366 lineto
- 222 357 lineto
- 225 347 lineto
- 228 336 lineto
- 232 324 lineto
- 235 312 lineto
- 238 300 lineto
- 241 287 lineto
- 244 273 lineto
- 247 260 lineto
- 251 246 lineto
- 254 232 lineto
- 257 219 lineto
- 260 205 lineto
- 263 192 lineto
- 267 180 lineto
- 270 168 lineto
- 273 156 lineto
- 276 145 lineto
- 279 135 lineto
- 283 126 lineto
- 286 118 lineto
- 289 110 lineto
- 292 104 lineto
- 295 99 lineto
- 298 95 lineto
- 302 92 lineto
- 305 90 lineto
- 308 90 lineto
- 311 90 lineto
- 314 92 lineto
- 318 95 lineto
- 321 99 lineto
- 324 104 lineto
- 327 110 lineto
- 330 118 lineto
- 334 126 lineto
- 337 135 lineto
- 340 145 lineto
- 343 156 lineto
- 346 168 lineto
- 349 180 lineto
- 353 192 lineto
- 356 205 lineto
- 359 219 lineto
- 362 232 lineto
- 365 246 lineto
- 369 260 lineto
- 372 273 lineto
- 375 287 lineto
- 378 300 lineto
- 381 312 lineto
- 385 324 lineto
- 388 336 lineto
- 391 347 lineto
- 394 357 lineto
- 397 366 lineto
- 400 374 lineto
- 404 382 lineto
- 407 388 lineto
- 410 393 lineto
- 413 397 lineto
- 416 400 lineto
- 420 402 lineto
- 423 403 lineto
- 426 402 lineto
- 429 400 lineto
- 432 397 lineto
- 436 393 lineto
- 439 388 lineto
- 442 382 lineto
- 445 374 lineto
- 448 366 lineto
- 451 357 lineto
- 455 347 lineto
- 458 336 lineto
- 461 324 lineto
- 464 312 lineto
- 467 300 lineto
- 471 287 lineto
- 474 273 lineto
- 477 260 lineto
- 480 246 lineto
- 483 232 lineto
- 487 219 lineto
- 490 205 lineto
- 493 192 lineto
- 496 180 lineto
- 499 168 lineto
- 502 156 lineto
- 506 145 lineto
- 509 135 lineto
- 512 126 lineto
- 515 118 lineto
- 518 110 lineto
- 522 104 lineto
- 525 99 lineto
- 528 95 lineto
- 531 92 lineto
- 534 90 lineto
- 538 90 lineto
-DashesProc stroke
-1 setlinewidth
-[ ] 0 setdash
-
-/DrawSymbolProc {
-  gsave
-    0.996109 0.996109 0 SetBgColor
-    Fill
-    0.542977 0.542977 0 SetFgColor
-    stroke
-  grestore
-} def
-
-79 90 9 Ci
-82 90 9 Ci
-85 92 9 Ci
-88 95 9 Ci
-91 99 9 Ci
-94 104 9 Ci
-98 110 9 Ci
-101 118 9 Ci
-104 126 9 Ci
-107 135 9 Ci
-110 145 9 Ci
-114 156 9 Ci
-117 168 9 Ci
-120 180 9 Ci
-123 192 9 Ci
-126 205 9 Ci
-130 219 9 Ci
-133 232 9 Ci
-136 246 9 Ci
-139 260 9 Ci
-142 273 9 Ci
-145 287 9 Ci
-149 300 9 Ci
-152 312 9 Ci
-155 324 9 Ci
-158 336 9 Ci
-161 347 9 Ci
-165 357 9 Ci
-168 366 9 Ci
-171 374 9 Ci
-174 382 9 Ci
-177 388 9 Ci
-181 393 9 Ci
-184 397 9 Ci
-187 400 9 Ci
-190 402 9 Ci
-193 403 9 Ci
-196 402 9 Ci
-200 400 9 Ci
-203 397 9 Ci
-206 393 9 Ci
-209 388 9 Ci
-212 382 9 Ci
-216 374 9 Ci
-219 366 9 Ci
-222 357 9 Ci
-225 347 9 Ci
-228 336 9 Ci
-232 324 9 Ci
-235 312 9 Ci
-238 300 9 Ci
-241 287 9 Ci
-244 273 9 Ci
-247 260 9 Ci
-251 246 9 Ci
-254 232 9 Ci
-257 219 9 Ci
-260 205 9 Ci
-263 192 9 Ci
-267 180 9 Ci
-270 168 9 Ci
-273 156 9 Ci
-276 145 9 Ci
-279 135 9 Ci
-283 126 9 Ci
-286 118 9 Ci
-289 110 9 Ci
-292 104 9 Ci
-295 99 9 Ci
-298 95 9 Ci
-302 92 9 Ci
-305 90 9 Ci
-308 90 9 Ci
-311 90 9 Ci
-314 92 9 Ci
-318 95 9 Ci
-321 99 9 Ci
-324 104 9 Ci
-327 110 9 Ci
-330 118 9 Ci
-334 126 9 Ci
-337 135 9 Ci
-340 145 9 Ci
-343 156 9 Ci
-346 168 9 Ci
-349 180 9 Ci
-353 192 9 Ci
-356 205 9 Ci
-359 219 9 Ci
-362 232 9 Ci
-365 246 9 Ci
-369 260 9 Ci
-372 273 9 Ci
-375 287 9 Ci
-378 300 9 Ci
-381 312 9 Ci
-385 324 9 Ci
-388 336 9 Ci
-391 347 9 Ci
-394 357 9 Ci
-397 366 9 Ci
-400 374 9 Ci
-404 382 9 Ci
-407 388 9 Ci
-410 393 9 Ci
-413 397 9 Ci
-416 400 9 Ci
-420 402 9 Ci
-423 403 9 Ci
-426 402 9 Ci
-429 400 9 Ci
-432 397 9 Ci
-436 393 9 Ci
-439 388 9 Ci
-442 382 9 Ci
-445 374 9 Ci
-448 366 9 Ci
-451 357 9 Ci
-455 347 9 Ci
-458 336 9 Ci
-461 324 9 Ci
-464 312 9 Ci
-467 300 9 Ci
-471 287 9 Ci
-474 273 9 Ci
-477 260 9 Ci
-480 246 9 Ci
-483 232 9 Ci
-487 219 9 Ci
-490 205 9 Ci
-493 192 9 Ci
-496 180 9 Ci
-499 168 9 Ci
-502 156 9 Ci
-506 145 9 Ci
-509 135 9 Ci
-512 126 9 Ci
-515 118 9 Ci
-518 110 9 Ci
-522 104 9 Ci
-525 99 9 Ci
-528 95 9 Ci
-531 92 9 Ci
-534 90 9 Ci
-538 90 9 Ci
-
-% Element "line1"
-
-0 setlinejoin
-0 setlinecap
-0 0 0 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-/DashesProc {} def
- newpath 79 246 moveto
- 82 232 lineto
- 85 219 lineto
- 88 205 lineto
- 91 192 lineto
- 94 180 lineto
- 98 168 lineto
- 101 156 lineto
- 104 145 lineto
- 107 135 lineto
- 110 126 lineto
- 114 118 lineto
- 117 110 lineto
- 120 104 lineto
- 123 99 lineto
- 126 95 lineto
- 130 92 lineto
- 133 90 lineto
- 136 90 lineto
- 139 90 lineto
- 142 92 lineto
- 145 95 lineto
- 149 99 lineto
- 152 104 lineto
- 155 110 lineto
- 158 118 lineto
- 161 126 lineto
- 165 135 lineto
- 168 145 lineto
- 171 156 lineto
- 174 168 lineto
- 177 180 lineto
- 181 192 lineto
- 184 205 lineto
- 187 219 lineto
- 190 232 lineto
- 193 246 lineto
- 196 260 lineto
- 200 273 lineto
- 203 287 lineto
- 206 300 lineto
- 209 312 lineto
- 212 324 lineto
- 216 336 lineto
- 219 347 lineto
- 222 357 lineto
- 225 366 lineto
- 228 374 lineto
- 232 382 lineto
- 235 388 lineto
- 238 393 lineto
- 241 397 lineto
- 244 400 lineto
- 247 402 lineto
- 251 403 lineto
- 254 402 lineto
- 257 400 lineto
- 260 397 lineto
- 263 393 lineto
- 267 388 lineto
- 270 382 lineto
- 273 374 lineto
- 276 366 lineto
- 279 357 lineto
- 283 347 lineto
- 286 336 lineto
- 289 324 lineto
- 292 312 lineto
- 295 300 lineto
- 298 287 lineto
- 302 273 lineto
- 305 260 lineto
- 308 246 lineto
- 311 232 lineto
- 314 219 lineto
- 318 205 lineto
- 321 192 lineto
- 324 180 lineto
- 327 168 lineto
- 330 156 lineto
- 334 145 lineto
- 337 135 lineto
- 340 126 lineto
- 343 118 lineto
- 346 110 lineto
- 349 104 lineto
- 353 99 lineto
- 356 95 lineto
- 359 92 lineto
- 362 90 lineto
- 365 90 lineto
- 369 90 lineto
- 372 92 lineto
- 375 95 lineto
- 378 99 lineto
- 381 104 lineto
- 385 110 lineto
- 388 118 lineto
- 391 126 lineto
- 394 135 lineto
- 397 145 lineto
- 400 156 lineto
- 404 168 lineto
- 407 180 lineto
- 410 192 lineto
- 413 205 lineto
- 416 219 lineto
- 420 232 lineto
- 423 246 lineto
- 426 260 lineto
- 429 273 lineto
- 432 287 lineto
- 436 300 lineto
- 439 312 lineto
- 442 324 lineto
- 445 336 lineto
- 448 347 lineto
- 451 357 lineto
- 455 366 lineto
- 458 374 lineto
- 461 382 lineto
- 464 388 lineto
- 467 393 lineto
- 471 397 lineto
- 474 400 lineto
- 477 402 lineto
- 480 403 lineto
- 483 402 lineto
- 487 400 lineto
- 490 397 lineto
- 493 393 lineto
- 496 388 lineto
- 499 382 lineto
- 502 374 lineto
- 506 366 lineto
- 509 357 lineto
- 512 347 lineto
- 515 336 lineto
- 518 324 lineto
- 522 312 lineto
- 525 300 lineto
- 528 287 lineto
- 531 273 lineto
- 534 260 lineto
- 538 246 lineto
-DashesProc stroke
-1 setlinewidth
-[ ] 0 setdash
-
-/DrawSymbolProc {
-  gsave
-    0.996109 0.644541 0 SetBgColor
-    Fill
-    0 0 0 SetFgColor
-    stroke
-  grestore
-} def
-
-79 246 9 Ci
-82 232 9 Ci
-85 219 9 Ci
-88 205 9 Ci
-91 192 9 Ci
-94 180 9 Ci
-98 168 9 Ci
-101 156 9 Ci
-104 145 9 Ci
-107 135 9 Ci
-110 126 9 Ci
-114 118 9 Ci
-117 110 9 Ci
-120 104 9 Ci
-123 99 9 Ci
-126 95 9 Ci
-130 92 9 Ci
-133 90 9 Ci
-136 90 9 Ci
-139 90 9 Ci
-142 92 9 Ci
-145 95 9 Ci
-149 99 9 Ci
-152 104 9 Ci
-155 110 9 Ci
-158 118 9 Ci
-161 126 9 Ci
-165 135 9 Ci
-168 145 9 Ci
-171 156 9 Ci
-174 168 9 Ci
-177 180 9 Ci
-181 192 9 Ci
-184 205 9 Ci
-187 219 9 Ci
-190 232 9 Ci
-193 246 9 Ci
-196 260 9 Ci
-200 273 9 Ci
-203 287 9 Ci
-206 300 9 Ci
-209 312 9 Ci
-212 324 9 Ci
-216 336 9 Ci
-219 347 9 Ci
-222 357 9 Ci
-225 366 9 Ci
-228 374 9 Ci
-232 382 9 Ci
-235 388 9 Ci
-238 393 9 Ci
-241 397 9 Ci
-244 400 9 Ci
-247 402 9 Ci
-251 403 9 Ci
-254 402 9 Ci
-257 400 9 Ci
-260 397 9 Ci
-263 393 9 Ci
-267 388 9 Ci
-270 382 9 Ci
-273 374 9 Ci
-276 366 9 Ci
-279 357 9 Ci
-283 347 9 Ci
-286 336 9 Ci
-289 324 9 Ci
-292 312 9 Ci
-295 300 9 Ci
-298 287 9 Ci
-302 273 9 Ci
-305 260 9 Ci
-308 246 9 Ci
-311 232 9 Ci
-314 219 9 Ci
-318 205 9 Ci
-321 192 9 Ci
-324 180 9 Ci
-327 168 9 Ci
-330 156 9 Ci
-334 145 9 Ci
-337 135 9 Ci
-340 126 9 Ci
-343 118 9 Ci
-346 110 9 Ci
-349 104 9 Ci
-353 99 9 Ci
-356 95 9 Ci
-359 92 9 Ci
-362 90 9 Ci
-365 90 9 Ci
-369 90 9 Ci
-372 92 9 Ci
-375 95 9 Ci
-378 99 9 Ci
-381 104 9 Ci
-385 110 9 Ci
-388 118 9 Ci
-391 126 9 Ci
-394 135 9 Ci
-397 145 9 Ci
-400 156 9 Ci
-404 168 9 Ci
-407 180 9 Ci
-410 192 9 Ci
-413 205 9 Ci
-416 219 9 Ci
-420 232 9 Ci
-423 246 9 Ci
-426 260 9 Ci
-429 273 9 Ci
-432 287 9 Ci
-436 300 9 Ci
-439 312 9 Ci
-442 324 9 Ci
-445 336 9 Ci
-448 347 9 Ci
-451 357 9 Ci
-455 366 9 Ci
-458 374 9 Ci
-461 382 9 Ci
-464 388 9 Ci
-467 393 9 Ci
-471 397 9 Ci
-474 400 9 Ci
-477 402 9 Ci
-480 403 9 Ci
-483 402 9 Ci
-487 400 9 Ci
-490 397 9 Ci
-493 393 9 Ci
-496 388 9 Ci
-499 382 9 Ci
-502 374 9 Ci
-506 366 9 Ci
-509 357 9 Ci
-512 347 9 Ci
-515 336 9 Ci
-518 324 9 Ci
-522 312 9 Ci
-525 300 9 Ci
-528 287 9 Ci
-531 273 9 Ci
-534 260 9 Ci
-538 246 9 Ci
-
-% Unset clipping
-grestore
-
-0.750011 0.750011 0.750011 SetBgColor
-0 0 598 82 Box Fill
-
-0 82 70 329 Box Fill
-
-546 82 52 329 Box Fill
-
-0 411 598 68 Box Fill
-
-0.500008 0.500008 0.500008 SetBgColor
-69 410 478 2 Box Fill
-
-545 80 2 332 Box Fill
-
-0.750011 0.750011 0.750011 SetBgColor
-newpath 69 412 moveto
-69 80 lineto
-547 80 lineto
-545 82 lineto
-71 82 lineto
-71 410 lineto
-69 412 lineto
-69 412  lineto closepath Fill
-311 29 0 308 20 BeginText
-14 /Helvetica-Bold SetFont
-0 0 0 SetFgColor
-(Sine and Cosine Functions) 311 0 23 DrawAdjText
-EndText
-7 16 0 308 463 BeginText
-8 /Helvetica SetFont
-0 0 0 SetFgColor
-(X) 7 0 13 DrawAdjText
-EndText
-40 16 0 79 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(-360°) 40 0 12 DrawAdjText
-EndText
-40 16 0 136 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(-270°) 40 0 12 DrawAdjText
-EndText
-40 16 0 193 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(-180°) 40 0 12 DrawAdjText
-EndText
-32 16 0 251 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(-90°) 32 0 12 DrawAdjText
-EndText
-16 16 0 308 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0°) 16 0 12 DrawAdjText
-EndText
-24 16 0 365 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(90°) 24 0 12 DrawAdjText
-EndText
-32 16 0 423 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(180°) 32 0 12 DrawAdjText
-EndText
-32 16 0 480 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(270°) 32 0 12 DrawAdjText
-EndText
-32 16 0 538 441 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(360°) 32 0 12 DrawAdjText
-EndText
-0 setlinejoin
-0 setlinecap
-0 0 0 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-79 416 538 416 LS
-79 416 79 428 LS
-136 416 136 428 LS
-193 416 193 428 LS
-251 416 251 428 LS
-308 416 308 428 LS
-365 416 365 428 LS
-423 416 423 428 LS
-480 416 480 428 LS
-538 416 538 428 LS
-9 16 90 18 246 BeginText
-8 /Helvetica SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(Y) 9 0 13 DrawAdjText
-EndText
-16 16 90 40 403 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(-1) 16 0 12 DrawAdjText
-EndText
-32 16 90 40 324 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(-0.5) 32 0 12 DrawAdjText
-EndText
-8 16 90 40 246 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(0) 8 0 12 DrawAdjText
-EndText
-24 16 90 40 168 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(0.5) 24 0 12 DrawAdjText
-EndText
-8 16 90 40 90 BeginText
-8 /CourierNewBold-Bold SetFont
-0.566415 0.171878 0.929702 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-0 setlinejoin
-0 setlinecap
-0.566415 0.171878 0.929702 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-65 403 65 90 LS
-65 363 59 363 LS
-65 403 53 403 LS
-65 285 59 285 LS
-65 324 53 324 LS
-65 207 59 207 LS
-65 246 53 246 LS
-65 129 59 129 LS
-65 168 53 168 LS
-65 90 53 90 LS
-8 16 0 79 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0) 8 0 12 DrawAdjText
-EndText
-24 16 0 170 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0.2) 24 0 12 DrawAdjText
-EndText
-24 16 0 262 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0.4) 24 0 12 DrawAdjText
-EndText
-24 16 0 354 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0.6) 24 0 12 DrawAdjText
-EndText
-24 16 0 446 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(0.8) 24 0 12 DrawAdjText
-EndText
-8 16 0 538 51 BeginText
-8 /CourierNewBold-Bold SetFont
-0 0 0 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-0 setlinejoin
-0 setlinecap
-0 0 0 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-79 76 538 76 LS
-124 76 124 70 LS
-79 76 79 64 LS
-216 76 216 70 LS
-170 76 170 64 LS
-308 76 308 70 LS
-262 76 262 64 LS
-400 76 400 70 LS
-354 76 354 64 LS
-492 76 492 70 LS
-446 76 446 64 LS
-538 76 538 64 LS
-8 16 0 572 403 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(0) 8 0 12 DrawAdjText
-EndText
-24 16 0 580 340 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(0.2) 24 0 12 DrawAdjText
-EndText
-24 16 0 580 277 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(0.4) 24 0 12 DrawAdjText
-EndText
-24 16 0 580 215 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(0.6) 24 0 12 DrawAdjText
-EndText
-24 16 0 580 152 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(0.8) 24 0 12 DrawAdjText
-EndText
-8 16 0 572 90 BeginText
-8 /CourierNewBold-Bold SetFont
-0.800793 0 0.800793 SetFgColor
-(1) 8 0 12 DrawAdjText
-EndText
-0 setlinejoin
-0 setlinecap
-0.800793 0 0.800793 SetFgColor
-1 setlinewidth
-[ ] 0 setdash
-551 403 551 90 LS
-551 371 557 371 LS
-551 403 563 403 LS
-551 309 557 309 LS
-551 340 563 340 LS
-551 246 557 246 LS
-551 277 563 277 LS
-551 183 557 183 LS
-551 215 563 215 LS
-551 121 557 121 LS
-551 152 563 152 LS
-551 90 563 90 LS
-showpage
-%Trailer
-grestore
-end
-%EOF
diff --git a/blt3.0/demos/images/qv100.t.gif b/blt3.0/demos/images/qv100.t.gif
deleted file mode 100644
index 1e738ee..0000000
Binary files a/blt3.0/demos/images/qv100.t.gif and /dev/null differ
diff --git a/blt3.0/demos/images/rain.gif b/blt3.0/demos/images/rain.gif
deleted file mode 100644
index d7bb417..0000000
Binary files a/blt3.0/demos/images/rain.gif and /dev/null differ
diff --git a/blt3.0/demos/images/sample.gif b/blt3.0/demos/images/sample.gif
deleted file mode 100644
index 1d8a401..0000000
Binary files a/blt3.0/demos/images/sample.gif and /dev/null differ
diff --git a/blt3.0/demos/images/smblue_rock.gif b/blt3.0/demos/images/smblue_rock.gif
deleted file mode 100644
index df1c8f5..0000000
Binary files a/blt3.0/demos/images/smblue_rock.gif and /dev/null differ
diff --git a/blt3.0/demos/images/stopsign.gif b/blt3.0/demos/images/stopsign.gif
deleted file mode 100644
index fe4d27e..0000000
Binary files a/blt3.0/demos/images/stopsign.gif and /dev/null differ
diff --git a/blt3.0/demos/images/tan_paper.gif b/blt3.0/demos/images/tan_paper.gif
deleted file mode 100644
index aca947d..0000000
Binary files a/blt3.0/demos/images/tan_paper.gif and /dev/null differ
diff --git a/blt3.0/demos/images/tan_paper2.gif b/blt3.0/demos/images/tan_paper2.gif
deleted file mode 100644
index 76d94ac..0000000
Binary files a/blt3.0/demos/images/tan_paper2.gif and /dev/null differ
diff --git a/blt3.0/demos/images/txtrflag.gif b/blt3.0/demos/images/txtrflag.gif
deleted file mode 100644
index 4017154..0000000
Binary files a/blt3.0/demos/images/txtrflag.gif and /dev/null differ
diff --git a/blt3.0/demos/mbar1.tcl b/blt3.0/demos/mbar1.tcl
deleted file mode 100644
index 97b6c4b..0000000
--- a/blt3.0/demos/mbar1.tcl
+++ /dev/null
@@ -1,276 +0,0 @@
-
-foreach {key file} {
-save_as /usr/share/gtk-doc/html/pygtk/icons/stock_save_as
-new_tab /usr/share/gtk-doc/html/pygtk/icons/stock_new
-new_window /usr/share/gtk-doc/html/pygtk/icons/stock_network
-open_file /usr/share/gtk-doc/html/pygtk/icons/stock_open
-quit /usr/share/gtk-doc/html/pygtk/icons/stock_exit
-print /usr/share/gtk-doc/html/pygtk/icons/stock_print
-print_preview /usr/share/gtk-doc/html/pygtk/icons/stock_print_preview
-undo /usr/share/gtk-doc/html/pygtk/icons/stock_undo
-redo /usr/share/gtk-doc/html/pygtk/icons/stock_redo
-cut /usr/share/gtk-doc/html/pygtk/icons/stock_cut
-paste /usr/share/gtk-doc/html/pygtk/icons/stock_paste
-copy /usr/share/gtk-doc/html/pygtk/icons/stock_copy
-delete /usr/share/gtk-doc/html/pygtk/icons/stock_trash
-select_all /usr/share/gtk-doc/html/pygtk/icons/stock_broken_image
-find /usr/share/gtk-doc/html/pygtk/icons/stock_search
-preferences /usr/share/gtk-doc/html/pygtk/icons/stock_preferences
-stop /usr/share/gtk-doc/html/pygtk/icons/stock_stop
-reload /usr/share/gtk-doc/html/pygtk/icons/stock_refresh
-back /usr/share/gtk-doc/html/pygtk/icons/stock_left_arrow
-forward /usr/share/gtk-doc/html/pygtk/icons/stock_right_arrow
-home /usr/share/gtk-doc/html/pygtk/icons/stock_home
-} {
-    set icon($key) [image create picture -file ${file}_24.png]
-}
-
-if { [file exists ../library] } {
-    set blt_library ../library
-}
-
-set imgData {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-
-#set image [image create picture -file ~/images.jpeg]
-set bg [blt::bgpattern create gradient -high  grey70 -low grey95 \
-	-jitter yes -log yes -relativeto self]
-
-set image ""
-
-blt::menubar .mbar \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 10 bold } -justify left \
-
-.mbar add \
-    -text "File" \
-    -underline 0 \
-    -image $image \
-    -menuanchor sw \
-    -menu .mbar.file
-
-blt::combomenu .mbar.file \
-    -width -400  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.file.m add -text "New Window" -accelerator "Ctrl+N" -underline 0 \
-    -icon $icon(new_window)
-.mbar.file add -text "New Tab" -accelerator "Ctrl+T" -underline 4 \
-    -icon $icon(new_tab)
-.mbar.file add -text "Open Location..." -accelerator "Ctrl+L" -underline 5
-.mbar.file add -text "Open File..." -accelerator "Ctrl+O" -underline 0 \
-    -icon $icon(open_file)
-.mbar.file add -text "Close Window" -accelerator "Ctrl+Shift+W" -underline 9
-.mbar.file add -text "Close Tab" -accelerator "Ctrl+W" -underline 0
-.mbar.file add -type separator
-.mbar.file add -text "Save Page As..." -accelerator "Ctrl+O" -underline 10 \
-    -icon $icon(save_as)
-.mbar.file add -text "Save Page As PDF..." -accelerator "Ctrl+Shift+W" -underline 15
-.mbar.file add -text "Send Link..." -accelerator "Ctrl+W" -underline 1
-.mbar.file add -type separator
-.mbar.file add -text "Page Setup..." -underline 8
-.mbar.file add -text "Print Preview" -accelerator "Ctrl+Shift+W" -underline 9 \
-    -icon $icon(print_preview)
-.mbar.file add -text "Print..." -accelerator "Ctrl+P" -underline 0 \
-    -icon $icon(print)
-.mbar.file add -type separator
-.mbar.file add -text "Import..." -underline 0
-.mbar.file add -type separator
-.mbar.file add -text "Work Offline" -underline 0
-.mbar.file add -text "Quit" -accelerator "Ctrl+Q" -underline 0 \
-    -icon $icon(quit) 
-
-.mbar add \
-    -text "Edit" \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.edit
-
-blt::combomenu .mbar.edit \
-    -width -400  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.edit add -text "Undo" -accelerator "Ctrl+Z"  \
-    -icon $icon(undo)
-.mbar.edit add -text "Redo" -accelerator "Ctrl+Shift+Z"  \
-    -icon $icon(redo)
-.mbar.edit add -type separator
-.mbar.edit add -text "Cut" -accelerator "Ctrl+X" \
-    -icon $icon(cut)
-.mbar.edit add -text "Copy" -accelerator "Ctrl+C" \
-    -icon $icon(copy)
-.mbar.edit add -text "Paste" -accelerator "Ctrl+V" \
-    -icon $icon(paste)
-.mbar.edit add -text "Delete" -accelerator "Del" \
-    -icon $icon(delete)
-.mbar.edit add -type separator
-.mbar.edit add -text "Select All" -accelerator "Ctrl+X" \
-    -icon $icon(select_all)
-.mbar.edit add -type separator
-.mbar.edit add -text "Find" -accelerator "Ctrl+F"  \
-    -icon $icon(find)
-.mbar.edit add -text "Find Again" -accelerator "Ctrl+G"
-.mbar.edit add -type separator
-.mbar.edit add -text "Preferences" \
-    -icon $icon(preferences)
-
-blt::combomenu .mbar.edit.m
-.mbar.edit.m add -type command -text "five" -accelerator "^A" -command "set t five"
-.mbar.edit.m add -type command -text "six" -accelerator "^B" -command "set t six"
-.mbar.edit.m add -type command -text "seven" -accelerator "^C" -command "set t seven"
-.mbar.edit.m add -type command -text "eight" -accelerator "^D" -command "set t eight"
-.mbar.edit.m add -type cascade -text "cascade" -accelerator "^E" 
-
-
-.mbar add \
-    -text "View" \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.view
-
-blt::combomenu .mbar.view \
-    -width -600  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.view add -type cascade -text "Toolbars" -underline 0 
-.mbar.view add -type checkbutton -text "Status Bar" \
-    -underline 4 
-.mbar.view add -type checkbutton -text "Sidebar" \
-    -underline 5 -variable sidebar 
-.mbar.view add -type checkbutton -text "Adblock Plus: Blockable items" \
-    -accelerator "Ctrl+Shift+V" -underline 0 -variable adblock 
-.mbar.view add -type separator
-.mbar.view add -text "Stop" -accelerator "Esc" -underline 9 \
-    -icon $icon(stop)
-.mbar.view add -text "Reload" -accelerator "Ctrl+R" -underline 0 \
-    -icon $icon(reload)
-.mbar.view add -type separator
-.mbar.view add -type cascade -text "Zoom" -accelerator "Ctrl+O" -underline 10 
-.mbar.view add -type cascade -text "Page Style" -accelerator "Ctrl+Shift+W" \
-    -underline 15
-.mbar.view add -type cascade -text "Character Encoding" -accelerator "Ctrl+W" \
-    -underline 1
-.mbar.view add -type separator
-.mbar.view add -text "Page Source" -underline 8 -accelerator "Ctrl+U"
-.mbar.view add -text "Full Screen" -accelerator "F11" -underline 9 
-
-
-.mbar add \
-    -text "History" \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.history
-
-blt::combomenu .mbar.history \
-    -width -600  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.history add -text "Back" -accelerator "Alt+Left Arrow" \
-    -underline 0 -icon $icon(back)
-.mbar.history add -text "Forward" -accelerator "Alt+Right Arrow" \
-    -underline 4 -icon $icon(forward)
-.mbar.history add -text "Home" -accelerator "Alt+Home" \
-    -underline 5 -icon $icon(home)
-.mbar.history add -text "Show All History" -accelerator "Ctrl+Shift+H" \
-    -underline 0 
-.mbar.history add -type separator
-.mbar.history add -type cascade -text "Recently Closed Tabs" \
-    -accelerator "Ctrl+O" -underline 10 
-
-.mbar add \
-    -text "Bookmarks" \
-    -relief flat \
-    -activerelief raised \
-    -bg $bg \
-    -font { Arial 10 bold } -justify left \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.bmarks
-
-blt::combomenu .mbar.bmarks \
-    -width -600  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.bmarks add -text "Bookmark This Page" -accelerator "Ctrl+D" \
-    -underline 0 -icon $icon(back)
-.mbar.bmarks add -text "Subscribe to This Page..." \
-    -underline 4 -icon $icon(forward)
-.mbar.bmarks add -text "Bookmark All Tabs"  \
-    -underline 5 -icon $icon(home)
-.mbar.bmarks add -text "Organize Bookmarks" \
-    -underline 0 
-.mbar.bmarks add -type separator
-.mbar.bmarks add -type cascade -text "Bookmarks Toolbar" \
-    -underline 10 
-.mbar.bmarks add -type separator
-.mbar.bmarks add -type cascade -text "Recently Bookmarked" \
-    -underline 10 
-.mbar.bmarks add -type cascade -text "Recent Tags" \
-    -underline 10 
-.mbar.bmarks add -type separator
-.mbar.bmarks add -text "Page 1" \
-    -underline 10 
-.mbar.bmarks add -text "Page 2" \
-    -underline 10 
-
-.mbar add  \
-    -text "Tools" \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.tools
-
-blt::combomenu .mbar.tools \
-    -width -600  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.tools add -text "Web Search" -accelerator "Ctrl+K" \
-    -underline 0 
-.mbar.tools add -type separator
-.mbar.tools add -text "Downloads" -accelerator "Ctrl+Y" \
-    -underline 4 -icon $icon(forward)
-.mbar.tools add -text "Add-ons" -underline 0 
-.mbar.tools add -type separator
-.mbar.tools add -text "PDF Download - Options" -underline 0 
-.mbar.tools add -text "Save Images From Tabs" -underline 10 
-.mbar.tools add -text "Error Console" \
-    -accelerator "Ctrl+Shift+J" -underline 10 
-.mbar.tools add -text "Adblock Plus Preferences..." \
-    -accelerator "Ctrl+Shift+E" -underline 10 
-.mbar.tools add -text "Page Info" \
-    -accelerator "Ctrl+I" -underline 10 
-.mbar.tools add -type separator
-.mbar.tools add -text "Clear Private Data" \
-    -accelerator "Ctrl+Shift+Del" -underline 10 
-.mbar.tools add -text "Batch Download Settings" \
-    -underline 10 
-
-.mbar add \
-    -text "Help" \
-    -underline 0 \
-    -menuanchor nw \
-    -menu .mbar.help
-
-blt::combomenu .mbar.help \
-    -width -600  -font "Arial 10 bold" -acceleratorfont "Arial 10 bold" \
-    -bg grey85 -relief raised -bd 1
-.mbar.help add -text "Help Contents" \
-    -underline 0 -icon $icon(back)
-.mbar.help add -text "Release Notes" \
-    -underline 4 -icon $icon(forward)
-.mbar.help add -text "Report Broken Website..." \
-    -underline 5 -icon $icon(home)
-.mbar.help add -text "Report Web Forgery..." \
-    -underline 0 
-.mbar.help add -type separator
-.mbar.help add -text "Check For Updates..." \
-    -underline 0 
-.mbar.help add -text "About..." \
-    -underline 0 
-
-canvas .c
-
-blt::table . \
-    0,0 .mbar -fill x \
-    1,0 .c -fill both 
-
-blt::table configure . r0 -resize none
-blt::table configure . r1 -resize expand
diff --git a/blt3.0/demos/paneset1.tcl b/blt3.0/demos/paneset1.tcl
deleted file mode 100644
index 5236b8b..0000000
--- a/blt3.0/demos/paneset1.tcl
+++ /dev/null
@@ -1,22 +0,0 @@
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .ps  -bg grey -width 800 \
-    -sashthickness 3 -background red \
-    -sashborderwidth 1 -sashrelief sunken \
-    -sashpad 1 
-
-blt::graph .ps.g -bg \#CCCCFF ;#-width 300
-blt::barchart .ps.b -bg \#FFCCCC ;# -width 300
-blt::barchart .ps.b2 -bg \#CCFFCC ;#-width 300
-
-.ps add -window .ps.g -fill both
-.ps add -window .ps.b -fill both 
-.ps add -window .ps.b2 -fill both
-
-focus .ps
-
-blt::table . \
-    0,0 .ps -fill both
-
-blt::table configure . r1 -resize none
diff --git a/blt3.0/demos/paneset2.tcl b/blt3.0/demos/paneset2.tcl
deleted file mode 100644
index 43b0bc1..0000000
--- a/blt3.0/demos/paneset2.tcl
+++ /dev/null
@@ -1,20 +0,0 @@
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .ps -height 900 \
-    -orient vertical
-
-blt::graph .ps.g 
-blt::barchart .ps.b 
-blt::barchart .ps.b2 
-
-.ps add -window .ps.g -fill both 
-.ps add -window .ps.b -fill both 
-.ps add -window .ps.b2 -fill both 
-
-focus .ps
-
-blt::table . \
-    0,0 .ps -fill both 
-
-blt::table configure . r1 -resize none
diff --git a/blt3.0/demos/paneset3.tcl b/blt3.0/demos/paneset3.tcl
deleted file mode 100644
index 99b4c40..0000000
--- a/blt3.0/demos/paneset3.tcl
+++ /dev/null
@@ -1,18 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .vps -orient vertical 
-blt::paneset .vps.hps  
-
-blt::graph .vps.g -height 400 -width 500
-blt::barchart .vps.hps.b  -height 400 -width 400 
-blt::barchart .vps.hps.b2 -height 400 -width 400 
-
-.vps add -window .vps.g -fill both  
-.vps add -window .vps.hps -fill both 
-.vps.hps add -window .vps.hps.b -fill both 
-.vps.hps add -window .vps.hps.b2 -fill both
-
-focus .vps
-pack .vps -fill both -expand yes
diff --git a/blt3.0/demos/paneset4.tcl b/blt3.0/demos/paneset4.tcl
deleted file mode 100644
index 22e2dbf..0000000
--- a/blt3.0/demos/paneset4.tcl
+++ /dev/null
@@ -1,20 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .ps -width 800 -mode spreadsheet 
-
-blt::graph .ps.g
-blt::barchart .ps.b
-blt::barchart .ps.b2
-
-.ps add -window .ps.g -fill both 
-.ps add -window .ps.b -fill both 
-.ps add -window .ps.b2 -fill both 
-
-focus .ps
-
-blt::table . \
-    0,0 .ps -fill both 
-
-blt::table configure . r1 -resize none
diff --git a/blt3.0/demos/paneset5.tcl b/blt3.0/demos/paneset5.tcl
deleted file mode 100644
index 85cfa15..0000000
--- a/blt3.0/demos/paneset5.tcl
+++ /dev/null
@@ -1,18 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .ps -height 900 -orient vertical
-
-blt::graph .ps.g 
-blt::barchart .ps.b
-blt::barchart .ps.b2
-
-.ps add -window .ps.g -fill both 
-.ps add -window .ps.b -fill both 
-.ps add -window .ps.b2 -fill both 
-
-focus .ps
-blt::table . \
-    0,0 .ps -fill both 
-blt::table configure . r1 -resize none
diff --git a/blt3.0/demos/paneset6.tcl b/blt3.0/demos/paneset6.tcl
deleted file mode 100644
index df7df60..0000000
--- a/blt3.0/demos/paneset6.tcl
+++ /dev/null
@@ -1,98 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-set pictures [glob -nocomplain "*.jpg"]
-set autocolors {
-#0000cd
-#cd0000
-#00cd00
-#3a5fcd
-#cdcd00
-#cd1076
-#009acd
-#00c5cd
-#a2b5cd
-#7ac5cd
-#66cdaa
-#a2cd5a
-#cd9b9b
-#cdba96
-#cd3333
-#cd6600
-#cd8c95
-#cd00cd
-#9a32cd
-#6ca6cd
-#9ac0cd
-#9bcd9b
-#00cd66
-#cdc673
-#cdad00
-#cd5555
-#cd853f
-#cd7054
-#cd5b45
-#cd6889
-#cd69c9
-#551a8b
-}
-
-proc Move { w pane } {
-#    puts stderr "w=$w pane=$pane"
-    .ps see $pane
-}
-
-blt::filmstrip .ps  -bg grey -width 600 -scrollcommand { .s set } \
-    -sashthickness 3 -handlepad 1 -handleborderwidth 2 \
-    -activehandlerelief raised -handlerelief flat
-    #-scrolldelay 10 -scrollincrement 10
-
-for { set i 0 } { $i < 32 } { incr i } {
-    set color [lindex $autocolors $i]
-    blt::graph .ps.g$i -bg $color -width 500
-    set pane [.ps add -window .ps.g$i -fill both]
-    bind .ps.g$i <ButtonPress-1>  [list Move %W $pane]
-    bind .ps.g$i <ButtonPress-2>  [list Move %W pane0]
-    bind .ps.g$i <ButtonPress-3>  [list Move %W pane35]
-}
-blt::tk::scrollbar .s -command { .ps view } -orient horizontal
-
-set pressed 0
-bind PanesetHandle <Enter> { %W activate } 
-bind PanesetHandle <Leave> { 
-    if { !$pressed } { %W deactivate } 
-}
-bind PanesetHandle <KeyPress-Left> { %W move -10 0 }
-bind PanesetHandle <KeyPress-Right> { %W move 10  0 }
-bind PanesetHandle <KeyPress-Up> { %W move 0 -10 }
-bind PanesetHandle <KeyPress-Down> { %W move 0 10 }
-bind PanesetHandle <Shift-KeyPress-Left> { %W move -100 0 }
-bind PanesetHandle <Shift-KeyPress-Right> { %W move 100  0 }
-bind PanesetHandle <Shift-KeyPress-Up> { %W move 0 -100 }
-bind PanesetHandle <Shift-KeyPress-Down> { %W move 0 100 }
-bind PanesetHandle <ButtonPress-1> { 
-    set pressed 1
-    %W anchor %X %Y 
-    focus %W
-}
-bind PanesetHandle <B1-Motion> { %W mark %X %Y }
-bind PanesetHandle <ButtonRelease-1> { 
-    set pressed 0
-    %W set %X %Y 
-}
-
-blt::table . \
-    0,0 .ps -fill both \
-    1,0 .s -fill x 
-
-blt::table configure . r1 -resize none
-
-focus .ps
-after 5000 {
-    #.ps pane configure 1 -size { 0 10000 10 }
-    focus .
-    #.ps see pane2
-    #.ps size pane2 1i
-}
-
diff --git a/blt3.0/demos/paneset7.tcl b/blt3.0/demos/paneset7.tcl
deleted file mode 100644
index 8460d97..0000000
--- a/blt3.0/demos/paneset7.tcl
+++ /dev/null
@@ -1,45 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::paneset .ps  -bg grey -width 900 -scrollcommand { .s set } 
-
-blt::graph .ps.g -bg \#CCCCFF -width 600 -height 800
-blt::barchart .ps.b -bg \#FFCCCC -width 700 -height 800
-blt::barchart .ps.b2 -bg \#CCFFCC -width 500 -height 800
-blt::tk::scrollbar .s -command { .ps view } -orient horizontal
-
-.ps add -window .ps.g -fill both 
-.ps add -window .ps.b ;#-fill both 
-.ps add -window .ps.b2 -fill both 
-
-.ps bind Sash <Enter> { .ps sash activate current } 
-.ps bind Sash <Leave> { .ps sash activate none } 
-
-.ps bind Sash <ButtonPress-1> {
-    %W sash anchor %x %y
-}
-.ps bind Sash <B1-Motion> {
-    %W sash mark %x %y
-}
-.ps bind Sash <ButtonRelease-1> {
-    %W sash set %x %y
-}
-
-blt::table . \
-    0,0 .ps -fill both \
-    1,0 .s -fill x 
-
-blt::table configure . r1 -resize none
-
-focus .ps
-after 5000 {
-    #.ps pane configure 1 -size { 0 10000 10 }
-    focus .
-    #.ps see pane2
-    #.ps size pane2 1i
-}
-
-bind .ps.g <ButtonPress-1>  ".ps see pane0"
-bind .ps.b <ButtonPress-1>  ".ps see pane1"
-bind .ps.b2 <ButtonPress-1>  ".ps see pane2"
\ No newline at end of file
diff --git a/blt3.0/demos/picture3.tcl b/blt3.0/demos/picture3.tcl
deleted file mode 100644
index ad83c3a..0000000
--- a/blt3.0/demos/picture3.tcl
+++ /dev/null
@@ -1,67 +0,0 @@
-
-set dest [image create picture -width 800 -height 600]
-
-source usmap.tcl
-
-set count 0
-array set colors {
-    0 red 
-    1 green 
-    2 blue 
-    3 cyan 
-    4 orange 
-    5 purple
-    6 brown
-    7 violet
-    8 seagreen
-    9 lightblue
-    10 yellow
-    11 pink
-    12 khaki
-    13 grey
-}
-
-blt::vector all
-blt::vector x
-blt::vector y
-set subset *
-label .l -image $dest 
-$dest blank white
-set bg [image create picture -file images/blt98.gif]
-$dest copy $bg
-pack .l
-foreach region [array names us_regions $subset] {
-    set coords $us_regions($region)
-    set cnum [expr {int(rand()*14.0)}]
-    all set $coords
-#     all split x y
-#     set min [blt::vector expr min(x)]
-#     x expr { (x-$min)*3.0 + 10 }
-#     set min [blt::vector expr min(y)]
-#     y expr { (y-$min)*3.0 + 10 }
-#     all merge x y 
-    all expr { all * 3.0 }
-    set coords [all print]
-    $dest draw polygon -coords $coords -color $colors($cnum) \
-	-antialiased 1 -shadow 1 -alpha 155 
-        #$dest draw line -coords $coords -color black 
-#    foreach {rx ry} $coords {
-#        $dest draw rectangle [expr int($rx-2)] [expr int($ry-2)] [expr int($rx+2)] [expr int($ry+2)] -color red 
-#    }
-    incr count
-}
-
-#$dest draw rectangle 200 200 300 300 -color green -shadow 0 \
-    -radius 10 -alpha 100
-#$dest draw rectangle 200 200 400 300 -color blue -linewidth 29 \
-    -radius 19 -shadow 0 -antialiased 0 -alpha 180 
-
-$dest draw circle 200 200 100 -alpha 055 -fill yellow -shadow 0 \
-    -antialiased 1 -linewidth 10 -outline 0xA0FF00FF 
-#$dest draw text "Hi George"  200 200  -anchor c -rotate 0.0 \
-    -font "@/usr/share/fonts/100dpi/helvB24-ISO8859-1.pcf.gz" \
-    -alpha 155 -color black 
-
-#$dest draw line -coords "200 200 500 200" -color black
-
-
diff --git a/blt3.0/demos/picture4.tcl b/blt3.0/demos/picture4.tcl
deleted file mode 100644
index 96a33d4..0000000
--- a/blt3.0/demos/picture4.tcl
+++ /dev/null
@@ -1,26 +0,0 @@
-
-set s1 [image create picture -width 25 -height 25]
-$s1 blank 0x00000000
-$s1 draw circle 12 12 5 -shadow 0 -linewidth 1 \
-	-fill 0x90FF0000 -antialias yes 
-
-set bg [image create picture -width 600 -height 600]
-$bg blank white
-
-
-set n 500000
-puts stderr [time {
-    blt::vector create points($n)
-    
-    points expr { round(random(points) * 512) + 30 }
-}]
-puts stderr [time {
-    foreach {x y} [points print] {
-	$bg copy $s1 -to "$x $y" -blend yes
-	#$bg draw circle $x $y 30 -shadow 0 -linewidth 2 \
-	    -fill 0x90FF0000 -antialias no
-    }
-}]
-label .l -image $bg
-pack .l
-
diff --git a/blt3.0/demos/picture5.tcl b/blt3.0/demos/picture5.tcl
deleted file mode 100644
index f89518c..0000000
--- a/blt3.0/demos/picture5.tcl
+++ /dev/null
@@ -1,4 +0,0 @@
-
-set img [image create picture]
-$img import ps -file sc.ps -dpi 600
-$img export png -file sc2.png
diff --git a/blt3.0/demos/scripts/barchart2.tcl b/blt3.0/demos/scripts/barchart2.tcl
deleted file mode 100644
index 3e06d7c..0000000
--- a/blt3.0/demos/scripts/barchart2.tcl
+++ /dev/null
@@ -1,132 +0,0 @@
-
-proc FormatXTicks { w value } {
-
-    # Determine the element name from the value
-
-    set index [expr round($value)]
-    if { $index != $value } {
-	return $value 
-    }
-    incr index -1
-
-    set name [lindex { A1 B1 A2 B2 C1 D1 C2 A3 E1 } $index]
-    return $name
-}
-
-source scripts/patterns.tcl
-
-image create picture bgTexture -file ./images/chalk.gif
-
-set configOptions {
-    Axis.TickFont		-*-helvetica-medium-r-*-*-12-*-*
-    Axis.TitleFont		-*-helvetica-bold-r-*-*-12-*-*
-    Element.Background		white
-    Element.Relief		raised
-    Grid.Dashes			{ 2 4 }
-    Grid.Hide			no
-    Grid.MapX			""
-    Legend.Font			"-*-helvetica*-bold-r-*-*-12-*-*"
-    Legend.ActiveBorderWidth	2 
-    Legend.ActiveRelief		raised 
-    Legend.Anchor		ne 
-    Legend.BorderWidth		0 
-    Legend.Position		right
-    TextMarker.Font		*Helvetica-Bold-R*14*
-    activeBar.Foreground	black
-    activeBar.Stipple		pattern1
-    BarMode			stacked
-    Font			-*-helvetica-bold-r-*-*-14-*-*
-    Tile			bgTexture
-    Title			"Comparison of Simulators"
-    x.Command			FormatXTicks
-    x.Title			"Simulator"
-    y.Title			"Time (hrs)"
-}
-
-set resource [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resource.$option $value
-}
-$graph configure -barmode stacked
-
-set visual [winfo screenvisual .] 
-if { $visual != "staticgray" && $visual != "grayscale" } {
-    option add *print.background	yellow
-    option add *quit.background		red
-    option add *quit.activeBackground	red2
-}
-
-blt::vector X Y0 Y1 Y2 Y3 Y4
-
-X set { 1 2 3 4 5 6 7 8 9 }
-Y0 set { 
-    0.729111111  0.002250000  0.09108333  0.006416667  0.026509167 
-    0.007027778  0.1628611    0.06405278  0.08786667  
-}
-Y1 set {
-    0.003120278	 0.004638889  0.01113889  0.048888889  0.001814722
-    0.291388889  0.0503500    0.13876389  0.04513333 
-}
-Y2 set {
-    11.534444444 3.879722222  4.54444444  4.460277778  2.334055556 
-    1.262194444  1.8009444    4.12194444  3.24527778  
-}
-Y3 set {
-    1.015750000  0.462888889  0.49394444  0.429166667  1.053694444
-    0.466111111  1.4152500    2.17538889  2.55294444 
-}
-Y4 set {
-    0.022018611  0.516333333  0.54772222  0.177638889  0.021703889 
-    0.134305556  0.5189278    0.07957222  0.41155556  
-}
-
-
-#
-# Element attributes:  
-#
-#    Label	yData	Color		Stipple Pattern
-set attributes { 
-    "Load"	Y2	lightblue	pattern1 
-    "Other"	Y4	lightpink	pattern1 1
-    "Read In"	Y0	lightgoldenrod	pattern1 1
-    "Setup"	Y1	lightyellow	pattern2 1
-}
-set attributes { 
-    "Load"	Y2	lightblue1	lightblue3	pattern1	1
-    "Solve"	Y3	cyan1		cyan3		pattern2 	1
-    "zOther"	Y4	lightpink1	lightpink3 	pattern1	1
-    "Read In"	Y0	lightgoldenrod1	lightgoldenrod3 pattern1	1
-    "Setup"	Y1	lightyellow1	lightyellow3	pattern2	1
-}
-     
-foreach {label yData fg bg stipple bd} $attributes {
-    $graph element create $yData \
-	-label $label \
-	-borderwidth $bd \
-	-y $yData \
-	-x X \
-	-fg $fg \
-	-bg $bg \
-	-stipple $stipple
-}
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-
-$graph marker bind all <B2-Motion> {
-    set coords [%W invtransform %x %y]
-    catch { %W marker configure [%W marker get current] -coords $coords }
-}
-
-$graph marker bind all <Enter> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -bg green}
-}
-
-$graph marker bind all <Leave> {
-    set marker [%W marker get current]
-    catch { %W marker configure $marker -bg ""}
-}
-
diff --git a/blt3.0/demos/scripts/bgtest.tcl b/blt3.0/demos/scripts/bgtest.tcl
deleted file mode 100644
index 332d801..0000000
--- a/blt3.0/demos/scripts/bgtest.tcl
+++ /dev/null
@@ -1,35 +0,0 @@
-
-set fid [open "../README" "r"]
-set data [read $fid]
-close $fid
-
-regsub -all "\r|\n|\t" $data " " data 
-set data [split $data " "]
-
-set count 0
-set maxWords 500
-foreach word $data {
-    if { $word == "" }  {
-	continue
-    }
-    if { $count & 0x1 } {
-	puts -nonewline stderr "($word)"
-	flush stderr
-    } else {
-	puts -nonewline stdout "($word)"
-	flush stdout
-    }
-    incr count
-    if { ($count % 10) == 0 } {
-	puts stdout ""
-	puts stderr ""
-	flush stdout
-	flush stderr
-    }
-    if { $count > $maxWords } {
-	break
-    }
-    after 500
-}
-exit 0
-
diff --git a/blt3.0/demos/scripts/clone.tcl b/blt3.0/demos/scripts/clone.tcl
deleted file mode 100644
index 874f55d..0000000
--- a/blt3.0/demos/scripts/clone.tcl
+++ /dev/null
@@ -1,88 +0,0 @@
-
-proc CopyOptions { cmd orig new } {
-    set all [eval $orig $cmd]
-    set configLine $new
-    foreach arg $cmd {
-	lappend configLine $arg
-    }
-    foreach option $all {
-	if { [llength $option] != 5 } {
-	    continue
-	}
-	set switch [lindex $option 0]
-	set initial [lindex $option 3]
-	set current [lindex $option 4]
-	if { [string compare $initial $current] == 0 } {
-	    continue
-	}
-	lappend configLine $switch $current
-    }
-    eval $configLine
-}
-
-proc CopyBindings { oper orig new args } {
-    set tags [$orig $oper bind]
-    if { [llength $args] > 0 } {
-	lappend tags [lindex $args 0]
-    }
-    foreach tag $tags {
-	foreach binding [$orig $oper bind $tag] {
-	    set cmd [$orig $oper bind $tag $binding]
-	    $new $oper bind $tag $binding $cmd
-	}
-    }
-}
-
-proc CloneGraph { orig new } {
-    graph $new
-    CopyOptions "configure" $orig $new 
-    # Axis component
-    foreach axis [$orig axis names] {
-	if { [$new axis name $axis] == "" } {
-	    $new axis create $axis
-	}
-	CopyOptions [list axis configure $axis] $orig $new
-    }
-    foreach axis { x y x2 y2 } {
-	$new ${axis}axis use [$orig ${axis}axis use]
-    }
-    # Pen component
-    foreach pen [$orig pen names] {
-	if { [$new pen name $pen] == "" } {
-	    $new pen create $pen
-	}
-	CopyOptions [list pen configure $pen] $orig $new
-    }
-    # Marker component
-    foreach marker [$orig marker names] {
-	$new marker create [$orig marker type $marker] -name $marker
-	CopyBindings marker $orig $new $marker
-	CopyOptions [list marker configure $marker] $orig $new
-    }
-    # Element component
-    foreach elem [$orig element names] {
-	$new element create $elem
-	CopyBindings element $orig $new $elem
-	CopyOptions [list element configure $elem] $orig $new
-    }
-    # Fix element display list
-    $new element show [$orig element show]
-    # Legend component
-    CopyOptions {legend configure} $orig $new
-    CopyBindings legend $orig $new
-    # Postscript component
-    CopyOptions {postscript configure} $orig $new
-    # Grid component
-    CopyOptions {grid configure} $orig $new
-    # Grid component
-    CopyOptions {crosshairs configure} $orig $new
-    # Graph bindings
-    foreach binding [bind $orig] {
-	set cmd [bind $orig $binding]
-	bind $new $binding $cmd
-    }
-    return $new
-}
-    
-toplevel .top
-pack [CloneGraph $graph .top.graph]
diff --git a/blt3.0/demos/scripts/demo.tcl b/blt3.0/demos/scripts/demo.tcl
deleted file mode 100644
index 81b0488..0000000
--- a/blt3.0/demos/scripts/demo.tcl
+++ /dev/null
@@ -1,28 +0,0 @@
-# ----------------------------------------------------------------------------
-#
-#	The following code is solely a convenience so that you can test the 
-#	BLT distribution without first installing it.
-#
-# ----------------------------------------------------------------------------
-
-# If we're in the ./demos directory, we can simply specify
-# "../library" as the library directory without having to install the
-# files.
-
-if { [file exists ../library/bltGraph.pro] } {
-    global blt_library
-    set blt_library ../library
-    set auto_path [linsert $auto_path 0 $blt_library]
-    auto_reset
-}
-
-# Add a binding for convenience to let you exit with pressing the
-# "quit" button.
-
-wm protocol . WM_DELETE_WINDOW { DoExit 0 }
-bind all <Control-KeyPress-c> { DoExit 0 } 
-
-proc DoExit { code } {
-    #destroy .
-    exit $code
-}
diff --git a/blt3.0/demos/scripts/globe.tcl b/blt3.0/demos/scripts/globe.tcl
deleted file mode 100644
index 9e7e17e..0000000
--- a/blt3.0/demos/scripts/globe.tcl
+++ /dev/null
@@ -1,509 +0,0 @@
-blt::bitmap define globe.0 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x40, 0x02, 0x00, 0x00, 0x1c, 0x3c, 0x00, 0x00, 0x01, 0xfe, 0x00, 
-    0x80, 0x80, 0xfe, 0x03, 0x60, 0x00, 0xff, 0x07, 0x10, 0xc0, 0xf1, 0x0f,
-    0x00, 0x80, 0xc0, 0x1f, 0x00, 0xc0, 0x07, 0x3f, 0x00, 0xc0, 0xff, 0x3f, 
-    0x00, 0xf0, 0xff, 0x4f, 0x02, 0xf0, 0xff, 0x5d, 0x00, 0xf0, 0xff, 0x1b,
-    0x00, 0xf0, 0xff, 0x8f, 0x02, 0xf0, 0xff, 0x0f, 0x06, 0xe0, 0xfc, 0x0f, 
-    0x0e, 0x00, 0xf8, 0x0f, 0x0f, 0x00, 0xf8, 0x07, 0x3f, 0x00, 0xf8, 0x03,
-    0x7e, 0x00, 0xf0, 0x03, 0x7e, 0x00, 0xf0, 0x03, 0x3e, 0x00, 0xf0, 0x0b, 
-    0x3c, 0x00, 0xf0, 0x09, 0x3c, 0x00, 0xf0, 0x01, 0x18, 0x00, 0xf0, 0x00,
-    0x18, 0x00, 0x70, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
-    0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.1 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0xc0, 0x00, 0x00, 0x00, 0x34, 0x38, 0x00, 0x00, 0x02, 0xe8, 0x00, 
-    0x80, 0x01, 0xfa, 0x03, 0xe0, 0x00, 0xfc, 0x07, 0x30, 0x00, 0xe6, 0x0f,
-    0x10, 0x00, 0x86, 0x1f, 0x08, 0x00, 0x3e, 0x3c, 0x04, 0x00, 0xff, 0x3f, 
-    0x04, 0x80, 0xff, 0x5f, 0x02, 0x80, 0xff, 0x3f, 0x00, 0x80, 0xff, 0x2f,
-    0x00, 0x80, 0xff, 0x3f, 0x0c, 0x00, 0xff, 0x3f, 0x1c, 0x00, 0xee, 0x3f, 
-    0x3c, 0x00, 0xc0, 0x3f, 0x7e, 0x00, 0xc0, 0x1f, 0xfe, 0x01, 0x80, 0x1f,
-    0xfc, 0x03, 0x80, 0x1f, 0xfc, 0x01, 0x80, 0x1f, 0xfc, 0x01, 0x80, 0x2f, 
-    0xf8, 0x01, 0x80, 0x0f, 0xf0, 0x00, 0x80, 0x17, 0xf0, 0x00, 0x80, 0x03,
-    0xf0, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-    0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00};
-}
-
-blt::bitmap define globe.2 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0xc0, 0x01, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x04, 0xf0, 0x00, 
-    0x80, 0x07, 0xe0, 0x03, 0xe0, 0x01, 0xf0, 0x07, 0xf0, 0x00, 0x38, 0x0f,
-    0x30, 0x00, 0x10, 0x1e, 0x18, 0x00, 0xf0, 0x30, 0x04, 0x00, 0xf8, 0x3f, 
-    0x10, 0x00, 0xf8, 0x7f, 0x12, 0x00, 0xfc, 0x7f, 0x02, 0x00, 0xfc, 0x7f,
-    0x04, 0x00, 0xfc, 0x7f, 0x74, 0x00, 0xf8, 0x7f, 0xf0, 0x00, 0x70, 0x7f, 
-    0xf8, 0x01, 0x00, 0x7e, 0xf8, 0x03, 0x00, 0x7e, 0xf8, 0x0f, 0x00, 0x7c,
-    0xf8, 0x1f, 0x00, 0x3c, 0xf0, 0x1f, 0x00, 0x3c, 0xf0, 0x0f, 0x00, 0x3e, 
-    0xe0, 0x0f, 0x00, 0x5e, 0xc0, 0x07, 0x00, 0x1c, 0xc0, 0x03, 0x00, 0x0e,
-    0xc0, 0x03, 0x00, 0x04, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 
-    0x80, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1c, 0x00};
-}
-
-blt::bitmap define globe.3 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0xc0, 0x01, 0x00, 0x00, 0xdc, 0x20, 0x00, 0x00, 0x09, 0xc0, 0x00, 
-    0x80, 0x1f, 0xa0, 0x03, 0xe0, 0x07, 0xc0, 0x07, 0xf0, 0x01, 0xc0, 0x0c,
-    0xf8, 0x00, 0x40, 0x18, 0x78, 0x00, 0xc0, 0x23, 0x08, 0x00, 0xc0, 0x3f, 
-    0x04, 0x00, 0xe0, 0x7f, 0x54, 0x00, 0xe0, 0x7f, 0x0c, 0x00, 0xc0, 0x7f,
-    0x10, 0x00, 0xc0, 0xff, 0xd0, 0x01, 0xc0, 0xff, 0xc0, 0x03, 0x80, 0xfb, 
-    0xe0, 0x0f, 0x00, 0xf0, 0xe0, 0x1f, 0x00, 0xf0, 0xe0, 0xff, 0x00, 0xf0,
-    0xe0, 0xff, 0x00, 0x70, 0xc0, 0xff, 0x00, 0x70, 0xc0, 0x7f, 0x00, 0x70, 
-    0x00, 0x7f, 0x00, 0x70, 0x00, 0x3f, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x38,
-    0x00, 0x1f, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 
-    0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x18, 0x00};
-}
-
-blt::bitmap define globe.4 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0xc0, 0x03, 0x00, 0x00, 0x7c, 0x03, 0x00, 0x00, 0x13, 0x00, 0x00, 
-    0x80, 0x7f, 0xc0, 0x03, 0xc0, 0x1f, 0x00, 0x07, 0xe0, 0x0f, 0x00, 0x0d,
-    0xf0, 0x03, 0x00, 0x10, 0xf0, 0x01, 0x00, 0x0e, 0x38, 0x01, 0x00, 0x3e, 
-    0x10, 0x00, 0x00, 0x7f, 0x50, 0x00, 0x00, 0x7f, 0x30, 0x00, 0x00, 0x7f,
-    0x40, 0x00, 0x00, 0xff, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0x3f, 0x00, 0xec, 
-    0x00, 0x7f, 0x00, 0xc0, 0x00, 0xff, 0x00, 0xc0, 0x00, 0xff, 0x07, 0xc0,
-    0x00, 0xff, 0x0f, 0xc0, 0x00, 0xfe, 0x07, 0xc0, 0x00, 0xfe, 0x07, 0xc0, 
-    0x00, 0xf8, 0x03, 0x40, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xf8, 0x00, 0x20,
-    0x00, 0xf8, 0x00, 0x20, 0x00, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 
-    0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00};
-}
-
-blt::bitmap define globe.5 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0xc0, 0x03, 0x00, 0x00, 0xbc, 0x06, 0x00, 0x00, 0xcf, 0x00, 0x00, 
-    0x80, 0xff, 0x01, 0x02, 0xc0, 0x7f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x0e,
-    0xe0, 0x1f, 0x00, 0x14, 0xe0, 0x0f, 0x00, 0x18, 0xe0, 0x00, 0x00, 0x38, 
-    0x60, 0x00, 0x00, 0x78, 0x40, 0x08, 0x00, 0x78, 0xc0, 0x01, 0x00, 0x78,
-    0x00, 0x02, 0x00, 0xf8, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 
-    0x00, 0xf8, 0x07, 0x80, 0x00, 0xf8, 0x0f, 0x80, 0x00, 0xf8, 0x3f, 0x00,
-    0x00, 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0x3f, 0x80, 0x00, 0xf0, 0x3f, 0x80, 
-    0x00, 0xc0, 0x1f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xc0, 0x07, 0x40,
-    0x00, 0xc0, 0x07, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-    0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00};
-}
-
-blt::bitmap define globe.6 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x80, 0x07, 0x00, 0x00, 0x7c, 0x0d, 0x00, 0x00, 0x9f, 0x03, 0x00, 
-    0x00, 0xff, 0x07, 0x02, 0x00, 0xff, 0x03, 0x04, 0x80, 0xff, 0x00, 0x08,
-    0xc0, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x30, 0x80, 0x07, 0x00, 0x20, 
-    0x00, 0x03, 0x00, 0x60, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0e, 0x00, 0x60,
-    0x00, 0x10, 0x00, 0xe0, 0x00, 0x80, 0x07, 0xc0, 0x00, 0x80, 0x0f, 0xc0, 
-    0x00, 0x80, 0x3f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0x01,
-    0x00, 0xc0, 0xff, 0x03, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 
-    0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3e, 0x00,
-    0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 
-    0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00};
-}
-
-blt::bitmap define globe.7 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x80, 0x07, 0x00, 0x00, 0xfc, 0x1a, 0x00, 0x00, 0x7d, 0x02, 0x00, 
-    0x00, 0xfe, 0x1f, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xfe, 0x07, 0x00,
-    0x00, 0xff, 0x03, 0x00, 0x00, 0xfe, 0x01, 0x20, 0x00, 0x1c, 0x01, 0x00, 
-    0x00, 0x1c, 0x00, 0x40, 0x00, 0x18, 0x00, 0x40, 0x00, 0x70, 0x00, 0x00,
-    0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x39, 0x80, 0x00, 0x00, 0x7c, 0x00, 
-    0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfe, 0x0f,
-    0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xf8, 0x07, 
-    0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01,
-    0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 
-    0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00};
-}
-
-blt::bitmap define globe.8 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x07, 0x00, 0x00, 0xfc, 0x25, 0x00, 0x00, 0xf8, 0x19, 0x00, 
-    0x00, 0xf8, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x1f, 0x00,
-    0x00, 0xf8, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x08, 0x00, 
-    0x00, 0xf0, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x80, 0x03, 0x00,
-    0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0xe0, 0x03, 
-    0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x3f,
-    0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0x1f, 
-    0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xc0, 0x07,
-    0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x60, 0x00, 
-    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00};
-}
-
-blt::bitmap define globe.9 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x03, 0x00, 0x00, 0xfc, 0x27, 0x00, 0x00, 0xf0, 0x13, 0x00, 
-    0x00, 0xe0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xe0, 0x7f, 0x00,
-    0x00, 0xe0, 0x7f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0x47, 0x00, 
-    0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x1c, 0x00,
-    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x1f, 
-    0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7f,
-    0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7e, 
-    0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x1e,
-    0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x01, 
-    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00};
-}
-
-blt::bitmap define globe.10 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x06, 0x00, 0x00, 0xf4, 0x2f, 0x00, 0x00, 0xc8, 0x4f, 0x00, 
-    0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01, 0x00, 0x80, 0xff, 0x01,
-    0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x3c, 0x00, 
-    0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0xe0, 0x00,
-    0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x38, 
-    0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc,
-    0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf8, 
-    0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x38,
-    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 
-    0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00};
-}
-
-blt::bitmap define globe.11 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x06, 0x00, 0x00, 0xec, 0x1f, 0x00, 0x00, 0x91, 0x9f, 0x00, 
-    0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07,
-    0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf0, 0x01, 
-    0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x07,
-    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe0, 
-    0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0,
-    0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 
-    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
-    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x08, 
-    0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00};
-}
-
-blt::bitmap define globe.12 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x04, 0x00, 0x00, 0xdc, 0x3f, 0x00, 0x00, 0x42, 0x7e, 0x00, 
-    0x00, 0x00, 0xf8, 0x03, 0x20, 0x00, 0xf0, 0x07, 0x10, 0x00, 0xf0, 0x0f,
-    0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x07, 
-    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18,
-    0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 
-    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
-    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 
-    0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40,
-    0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 
-    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-}
-
-blt::bitmap define globe.13 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x04, 0x00, 0x00, 0xbc, 0x3f, 0x00, 0x00, 0x01, 0x79, 0x00, 
-    0x80, 0x00, 0xe0, 0x03, 0x60, 0x00, 0xc0, 0x07, 0x10, 0x00, 0x80, 0x0f,
-    0x00, 0x00, 0x80, 0x1f, 0x08, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1c, 
-    0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
-    0x0e, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
-    0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00};
-}
-
-blt::bitmap define globe.14 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x03, 0xe6, 0x00, 
-    0x80, 0x01, 0xc0, 0x03, 0x60, 0x00, 0x00, 0x07, 0x30, 0x00, 0x00, 0x0f,
-    0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x30, 
-    0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
-    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
-    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 
-    0x3c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
-    0x78, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00};
-}
-
-blt::bitmap define globe.15 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3d, 0x00, 0x00, 0x27, 0xc8, 0x00, 
-    0x80, 0x13, 0x00, 0x03, 0xe0, 0x01, 0x00, 0x06, 0x70, 0x00, 0x00, 0x0c,
-    0x10, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x20, 
-    0x0c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
-    0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
-    0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-    0xf8, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00,
-    0xf0, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 
-    0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00};
-}
-
-blt::bitmap define globe.16 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3b, 0x00, 0x00, 0x9f, 0xa0, 0x00, 
-    0x80, 0x4f, 0x00, 0x02, 0xe0, 0x0f, 0x00, 0x04, 0xf0, 0x01, 0x00, 0x08,
-    0x70, 0x00, 0x00, 0x10, 0x38, 0x00, 0x00, 0x20, 0x3c, 0x00, 0x00, 0x00, 
-    0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
-    0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-    0x28, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x02, 0x00, 0x00, 
-    0xe0, 0x07, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00,
-    0xe0, 0x1f, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00};
-}
-
-blt::bitmap define globe.17 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x37, 0x00, 0x00, 0x3f, 0x42, 0x00, 
-    0x80, 0x3f, 0x01, 0x02, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00,
-    0xf0, 0x11, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
-    0x7c, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00,
-    0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00,
-    0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 
-    0x00, 0x3f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00,
-    0x80, 0x7f, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00};
-}
-
-blt::bitmap define globe.18 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0x84, 0x00, 
-    0x80, 0xff, 0x04, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xf0, 0x9f, 0x00, 0x00,
-    0xf0, 0x97, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 
-    0xfc, 0x03, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
-    0x60, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
-    0x20, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x05, 0x00,
-    0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 
-    0x00, 0xfc, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfe, 0x03, 0x00,
-    0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00};
-}
-
-blt::bitmap define globe.19 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x40, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0x13, 0x00, 
-    0x80, 0xff, 0x13, 0x00, 0xe0, 0xff, 0x03, 0x00, 0xf0, 0xff, 0x00, 0x00,
-    0xf0, 0x9f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 
-    0xf8, 0x1f, 0x00, 0x00, 0xba, 0x07, 0x00, 0x00, 0x98, 0x23, 0x00, 0x00,
-    0x08, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x80, 0x09, 0x00, 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x21, 0x0e, 0x00,
-    0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 
-    0x00, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00,
-    0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00};
-}
-
-blt::bitmap define globe.20 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0x07, 0x00, 
-    0x80, 0xff, 0x0f, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x13, 0x00,
-    0xf0, 0xff, 0x10, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 
-    0xf4, 0xff, 0x00, 0x00, 0xe6, 0x1e, 0x00, 0x00, 0x62, 0x1c, 0x01, 0x00,
-    0x20, 0x18, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-    0x01, 0xcc, 0x00, 0x00, 0x01, 0x68, 0x08, 0x00, 0x00, 0x00, 0x60, 0x00,
-    0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 
-    0x00, 0x00, 0x7e, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0xff, 0x00,
-    0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00};
-}
-
-blt::bitmap define globe.21 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x80, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0x1f, 0x00, 
-    0x80, 0xff, 0xbf, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
-    0xf8, 0xff, 0x17, 0x00, 0xf8, 0xff, 0x27, 0x00, 0xec, 0xff, 0x0f, 0x00, 
-    0x8c, 0xff, 0x07, 0x00, 0x9e, 0xf7, 0x00, 0x00, 0x0e, 0xe3, 0x00, 0x00,
-    0x06, 0xc1, 0x00, 0x00, 0x06, 0x81, 0x10, 0x00, 0x03, 0x40, 0x04, 0x00, 
-    0x03, 0x20, 0x06, 0x00, 0x03, 0x40, 0x06, 0x00, 0x01, 0x80, 0x00, 0x03,
-    0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0x02, 
-    0x02, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x03,
-    0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.22 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x01, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00, 
-    0x80, 0xff, 0x7f, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0x7f, 0x00,
-    0xf0, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 
-    0x34, 0xfe, 0x3f, 0x00, 0x76, 0xbc, 0x07, 0x00, 0x36, 0x1c, 0x07, 0x00,
-    0x0e, 0x08, 0x0e, 0x00, 0x1e, 0x08, 0x80, 0x00, 0x0f, 0x00, 0x02, 0x00, 
-    0x0f, 0x00, 0x20, 0x00, 0x07, 0x00, 0x36, 0x00, 0x07, 0x00, 0x04, 0x08,
-    0x07, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0b, 
-    0x16, 0x00, 0x80, 0x0f, 0x04, 0x00, 0xe0, 0x0f, 0x04, 0x00, 0xe0, 0x0f,
-    0x08, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.23 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0x7f, 0x00, 
-    0x80, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0x01,
-    0xe8, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xfc, 0xfe, 0xff, 0x01, 
-    0xdc, 0xf2, 0xff, 0x01, 0xde, 0xe3, 0x3d, 0x00, 0xde, 0xe1, 0x38, 0x02,
-    0x7e, 0x40, 0x70, 0x00, 0xfe, 0x40, 0x00, 0x04, 0x7f, 0x00, 0x00, 0x00, 
-    0x3e, 0x00, 0x30, 0x01, 0x3e, 0x00, 0xa0, 0x01, 0x1e, 0x00, 0x20, 0x20,
-    0x1e, 0x00, 0x00, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x3c,
-    0x1c, 0x00, 0x00, 0x3e, 0x1c, 0x00, 0x00, 0x3f, 0x18, 0x00, 0x80, 0x3f,
-    0x10, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.24 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x02, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xfe, 0xff, 0x00, 
-    0x80, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x03,
-    0xe0, 0xff, 0xff, 0x03, 0x18, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x07, 
-    0x7c, 0x87, 0xff, 0x07, 0xfe, 0x1f, 0xef, 0x01, 0xfe, 0x0e, 0xc6, 0x01,
-    0xfe, 0x01, 0x82, 0x03, 0xfe, 0x03, 0x02, 0x00, 0xff, 0x03, 0x00, 0x08, 
-    0xfc, 0x01, 0x80, 0x09, 0xfc, 0x00, 0x00, 0x0d, 0xfc, 0x00, 0x00, 0x00,
-    0xf8, 0x00, 0x00, 0x80, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x20, 
-    0x78, 0x02, 0x00, 0x70, 0x70, 0x02, 0x00, 0x7c, 0x70, 0x00, 0x00, 0x3c,
-    0x60, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.25 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0x00, 
-    0x80, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x07, 0xa0, 0xff, 0xff, 0x07,
-    0x10, 0xff, 0xff, 0x07, 0x30, 0xf8, 0xff, 0x0f, 0xf8, 0xdf, 0xff, 0x1f, 
-    0xfc, 0x3b, 0xfc, 0x1f, 0xfc, 0xfb, 0x78, 0x07, 0xfe, 0x77, 0x30, 0x0e,
-    0xfe, 0x1f, 0x30, 0x0c, 0xfe, 0x3f, 0x00, 0x48, 0xfe, 0x1f, 0x00, 0x00, 
-    0xf0, 0x0f, 0x00, 0x24, 0xf0, 0x07, 0x00, 0xa0, 0xf0, 0x07, 0x00, 0x08,
-    0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x27, 0x00, 0xc0, 
-    0xe0, 0x13, 0x00, 0x40, 0xc0, 0x13, 0x00, 0x70, 0xc0, 0x03, 0x00, 0x70,
-    0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.26 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x40, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe8, 0xff, 0x00, 
-    0x00, 0xfc, 0xff, 0x03, 0x00, 0xff, 0xff, 0x07, 0xc0, 0xfe, 0xff, 0x0f,
-    0x40, 0xf0, 0xff, 0x1f, 0xe0, 0xe0, 0xff, 0x1f, 0xf0, 0xff, 0xfe, 0x3f, 
-    0xf8, 0xdf, 0xe1, 0x3f, 0xf8, 0xdf, 0xc7, 0x1b, 0xfc, 0xbf, 0x83, 0x19,
-    0xfc, 0xff, 0x80, 0x30, 0xfc, 0xff, 0x01, 0x20, 0xf8, 0xff, 0x00, 0x00, 
-    0xc0, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0xe0, 0x80, 0x3f, 0x00, 0x20,
-    0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x01, 0x80, 
-    0x80, 0x9f, 0x00, 0x00, 0x00, 0x9f, 0x00, 0x40, 0x00, 0x0f, 0x00, 0x60,
-    0x00, 0x0e, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.27 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x80, 0x00, 0x00, 0x00, 0xc4, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0x00, 
-    0x00, 0xfe, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x07, 0x00, 0xeb, 0xff, 0x0f,
-    0x80, 0xc9, 0xff, 0x1f, 0x80, 0x07, 0xff, 0x3f, 0xc0, 0xff, 0xf7, 0x3f, 
-    0xe0, 0xff, 0x0e, 0x7f, 0xf0, 0xff, 0x3e, 0x6e, 0xf0, 0xff, 0x1d, 0x64,
-    0xf0, 0xff, 0x07, 0x44, 0xf0, 0xff, 0x0f, 0x00, 0x60, 0xff, 0x0f, 0x00, 
-    0x00, 0xfe, 0x07, 0x40, 0x00, 0xfe, 0x03, 0x00, 0x01, 0xfc, 0x01, 0x00,
-    0x01, 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x09, 0x00, 
-    0x02, 0xfc, 0x08, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x78, 0x00, 0x40,
-    0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.28 {
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x3f, 0x00, 0x00, 0x40, 0xff, 0x00, 
-    0x00, 0xe8, 0xff, 0x03, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x8c, 0xff, 0x0f,
-    0x00, 0x06, 0xfe, 0x1f, 0x00, 0x1e, 0xf8, 0x3f, 0x00, 0xff, 0xbf, 0x3f, 
-    0x80, 0xff, 0x77, 0x7c, 0x80, 0xff, 0xff, 0x79, 0xc0, 0xff, 0xef, 0x10,
-    0xc0, 0xff, 0x3f, 0x90, 0xc0, 0xff, 0x7f, 0x00, 0x81, 0xfb, 0x7f, 0x00, 
-    0x01, 0xf0, 0x3f, 0x00, 0x01, 0xf0, 0x1f, 0x00, 0x03, 0xe0, 0x1f, 0x00,
-    0x07, 0xe0, 0x0f, 0x00, 0x02, 0xc0, 0x1f, 0x00, 0x02, 0xe0, 0x5f, 0x00, 
-    0x06, 0xe0, 0x47, 0x00, 0x04, 0xc0, 0x27, 0x00, 0x04, 0xc0, 0x03, 0x00,
-    0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00};
-}
-
-blt::bitmap define globe.29 { 
-#define globe_width 32
-#define globe_height 32
-static char globe_bits[] = {
-    0x00, 0x40, 0x01, 0x00, 0x00, 0x0c, 0x3f, 0x00, 0x00, 0x80, 0xfd, 0x00, 
-    0x00, 0xa0, 0xff, 0x03, 0x20, 0xe0, 0xff, 0x07, 0x00, 0x30, 0xfd, 0x0f,
-    0x00, 0x10, 0xf4, 0x1f, 0x00, 0xf8, 0xc0, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 
-    0x00, 0xfc, 0xbf, 0x73, 0x00, 0xfe, 0xff, 0x67, 0x00, 0xfe, 0x7f, 0x47,
-    0x00, 0xfe, 0xff, 0x41, 0x00, 0xfe, 0xff, 0x03, 0x01, 0xdc, 0xff, 0x03, 
-    0x03, 0x00, 0xff, 0x01, 0x07, 0x80, 0xff, 0x00, 0x0f, 0x00, 0xff, 0x00,
-    0x1f, 0x00, 0x7e, 0x00, 0x0e, 0x00, 0xfe, 0x00, 0x0e, 0x00, 0xff, 0x02, 
-    0x0e, 0x00, 0x3f, 0x01, 0x0c, 0x00, 0x3e, 0x01, 0x0c, 0x00, 0x1e, 0x00,
-    0x08, 0x00, 0x1c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00};
-}
diff --git a/blt3.0/demos/scripts/graph1.tcl b/blt3.0/demos/scripts/graph1.tcl
deleted file mode 100644
index c59f442..0000000
--- a/blt3.0/demos/scripts/graph1.tcl
+++ /dev/null
@@ -1,72 +0,0 @@
-
-set X { 
-    2.00000e-01 4.00000e-01 6.00000e-01 8.00000e-01 1.00000e+00 
-    1.20000e+00 1.40000e+00 1.60000e+00 1.80000e+00 2.00000e+00 
-    2.20000e+00 2.40000e+00 2.60000e+00 2.80000e+00 3.00000e+00 
-    3.20000e+00 3.40000e+00 3.60000e+00 3.80000e+00 4.00000e+00 
-    4.20000e+00 4.40000e+00 4.60000e+00 4.80000e+00 5.00000e+00 
-} 
-
-set Y1 { 
-    4.07008e+01 7.95658e+01 1.16585e+02 1.51750e+02 1.85051e+02 
-    2.16479e+02 2.46024e+02 2.73676e+02 2.99427e+02 3.23267e+02 
-    3.45187e+02 3.65177e+02 3.83228e+02 3.99331e+02 4.13476e+02 
-    4.25655e+02 4.35856e+02 4.44073e+02 4.50294e+02 4.54512e+02 
-    4.56716e+02 4.57596e+02 4.58448e+02 4.59299e+02 4.60151e+02 
-}
-
-set Y2 { 
-    5.14471e-00 2.09373e+01 2.84608e+01 3.40080e+01 3.75691e+01
-    3.91345e+01 3.92706e+01 3.93474e+01 3.94242e+01 3.95010e+01 
-    3.95778e+01 3.96545e+01 3.97313e+01 3.98081e+01 3.98849e+01 
-    3.99617e+01 4.00384e+01 4.01152e+01 4.01920e+01 4.02688e+01 
-    4.03455e+01 4.04223e+01 4.04990e+01 4.05758e+01 4.06526e+01 
-}
-
-set Y3 { 
-    2.61825e+01 5.04696e+01 7.28517e+01 9.33192e+01 1.11863e+02 
-    1.28473e+02 1.43140e+02 1.55854e+02 1.66606e+02 1.75386e+02 
-    1.82185e+02 1.86994e+02 1.89802e+02 1.90683e+02 1.91047e+02 
-    1.91411e+02 1.91775e+02 1.92139e+02 1.92503e+02 1.92867e+02 
-    1.93231e+02 1.93595e+02 1.93958e+02 1.94322e+02 1.94686e+02 
-}
-
-set configOptions {
-    Element.Pixels		6
-    Element.Smooth		catrom
-    Legend.ActiveBackground	khaki2
-    Legend.ActiveRelief		sunken
-    Legend.Background		""
-    Legend.Position		plotarea
-    Title			"A Simple X-Y Graph"
-    activeLine.Color		yellow4
-    activeLine.Fill		yellow
-    background			khaki3
-    line1.Color			red4
-    line1.Fill			red1
-    line1.Symbol		circle
-    line2.Color			purple4
-    line2.Fill			purple1
-    line2.Symbol		arrow
-    line3.Color			green4
-    line3.Fill			green1
-    line3.Symbol		triangle
-    x.Descending		no
-    x.Loose			no
-    x.Title			"X Axis Label"
-    y.Rotate			90
-    y.Title			"Y Axis Label" 
-}
-
-set resource [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resource.$option $value
-}
-$graph element create line1 -x $X -y $Y2 
-$graph element create line2 -x $X -y $Y3 
-$graph element create line3 -x $X -y $Y1 
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
diff --git a/blt3.0/demos/scripts/graph2.tcl b/blt3.0/demos/scripts/graph2.tcl
deleted file mode 100644
index 5b09a3f..0000000
--- a/blt3.0/demos/scripts/graph2.tcl
+++ /dev/null
@@ -1,151 +0,0 @@
-option add *HighlightThickness		0
-option add *Tile			bgTexture
-option add *Button.Tile			""
-
-image create picture bgTexture -file ./images/chalk.gif
-
-set configOptions [subst {
-    InvertXY			no
-    Axis.TickFont		{ {Sans Serif} 14 bold }
-    Axis.TitleFont		{ {Sans Serif} 12 bold }
-    BorderWidth			2
-    Element.Pixels		8
-    Element.ScaleSymbols	true
-    Element.Smooth		cubic
-    Font			{ {Serif} 10 }
-    Foreground			white
-    Legend.ActiveBorderWidth	2
-    Legend.ActiveRelief		raised
-    Legend.Anchor		ne
-    Legend.BorderWidth		0
-    Legend.Font			{ Serif 14 }
-    Legend.Foreground		orange
-    #Legend.Position		plotarea
-    Legend.Hide			yes
-    Legend.Relief		flat
-    Postscript.Preview		yes
-    Relief			raised
-    Shadow			{ navyblue 2 }
-    Title			"Bitmap Symbols" 
-    degrees.Command		[namespace current]::FormatAxisLabel
-    degrees.LimitsFormat	"Deg=%g"
-    degrees.Subdivisions	0 
-    degrees.Title		"Degrees" 
-    degrees.stepSize		90 
-    temp.LimitsFormat		"Temp=%g"
-    temp.Title			"Temperature"
-    y.Color			purple2
-    y.LimitsFormat		"Y=%g"
-    y.Rotate			90 
-    y.Title			"Y" 
-    y.loose			no
-    y2.Color			magenta3
-    y2.Hide			no
-    xy2.Rotate			270
-    y2.Rotate			0
-    y2.Title			"Y2" 
-    y2.LimitsFormat		"Y2=%g"
-    x2.LimitsFormat		"x2=%g"
-}]
-
-set resource [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resource.$option $value
-}
-
-proc FormatAxisLabel {graph x} {
-     format "%d%c" [expr int($x)] 0xB0
-}
-
-set max -1.0
-set step 0.2
-
-set letters { A B C D E F G H I J K L }
-set count 0
-for { set level 30 } { $level <= 100 } { incr level 10 } {
-    set color [format "#dd0d%0.2x" [expr round($level*2.55)]]
-    set pen "pen$count"
-    set symbol "symbol$count"
-    set im [image create picture -width 25 -height 35]
-    $im blank 0x00000000
-    if 0 {
-    $im draw text [lindex $letters $count] 0 0 -color $color \
-    	-font "Arial 12" -anchor nw 
-    }
-    $graph pen create $pen -symbol $im 
-    set min $max
-    set max [expr $max + $step]
-    lappend styles "$pen $min $max"
-    incr count
-}
-
-$graph axis create temp \
-    -color lightgreen \
-    -title Temp  
-$graph axis create degrees \
-    -rotate 90
-$graph xaxis use degrees
-
-set tcl_precision 15
-set pi1_2 [expr 3.14159265358979323846/180.0]
-
-blt::vector create w x sinX cosX radians
-x seq -360.0 360.0 10.0
-#x seq -360.0 -180.0 30.0
-radians expr { x * $pi1_2 }
-sinX expr sin(radians)
-cosX expr cos(radians)
-cosX dup w
-blt::vector destroy radians
-
-blt::vector create xh xl yh yl
-set pct [expr ($cosX(max) - $cosX(min)) * 0.025]
-yh expr {cosX + $pct}
-yl expr {cosX - $pct}
-set pct [expr ($x(max) - $x(min)) * 0.025]
-xh expr {x + $pct}
-xl expr {x - $pct}
-
-set s1 [image create picture -width 25 -height 25]
-$s1 blank 0x00000000
-
-$s1 draw circle 11 11 7 -shadow 0 -linewidth 2 \
-	-fill 0x90FF0000 -antialias yes 
-
-$graph element create line3 \
-    -color green4 \
-    -fill green \
-    -label "cos(x)" \
-    -mapx degrees \
-    -styles $styles \
-    -symbol $s1 \
-    -weights w \
-    -x x \
-    -y cosX \
-    -yhigh yh -ylow yl
-
-set s2 [image create picture -width 25 -height 25]
-$s2 blank 0x00000000
-
-$s2 draw circle 12 12 7 -shadow 0 -linewidth 2 \
-	-fill 0x9000FF00 -antialias yes \
-	-outline orange
-
-$graph element create line1 \
-    -color orange \
-    -outline black \
-    -fill orange \
-    -fill yellow \
-    -label "sin(x)" \
-    -mapx degrees \
-    -pixels 6m \
-    -symbol $s2 \
-    -x x \
-    -y sinX 
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-#Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
-
diff --git a/blt3.0/demos/scripts/graph3.tcl b/blt3.0/demos/scripts/graph3.tcl
deleted file mode 100644
index 57dd893..0000000
--- a/blt3.0/demos/scripts/graph3.tcl
+++ /dev/null
@@ -1,88 +0,0 @@
-proc FormatAxisLabel {graph x} {
-     return "[expr int($x)]\260"
-}
-
-set configOptions [subst {
-    Axis.Hide			no
-    Axis.Limits			"%g"
-    BorderWidth			1
-    Element.Pixels		1.75m
-    Element.ScaleSymbols	no
-    Legend.ActiveBorderWidth	2
-    Legend.ActiveRelief		raised
-    Legend.Anchor		ne
-    Legend.BorderWidth		0
-    Legend.Position		plotarea
-    Relief			sunken
-    Title			"Sine and Cosine Functions" 
-    x.Command			[namespace current]::FormatAxisLabel
-    x.StepSize			90 
-    x.Subdivisions		0 
-    x.Title			"X" 
-    y.Color			purple2
-    y.Loose			no
-    y.Title			"Y" 
-    y.rotate			90 
-    y2.color			magenta3
-}]
-
-set resName [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resName.$option $value
-}
-
-$graph configure -leftvar changed
-
-set tcl_precision 15
-set pi1_2 [expr 3.14159265358979323846/180.0]
-
-blt::vector create x sinX cosX -variable ""
-x seq -360 360 100
-sinX expr { sin(x*$pi1_2) }
-cosX expr { cos(x*$pi1_2) }
-set s1 [image create picture -width 25 -height 25]
-$s1 blank 0x00000000
-
-$s1 draw circle 12 12 5 -shadow 0 -linewidth 1 \
-	-fill 0x90FF0000 -antialias yes 
-$graph element create line1 \
-    -label "sin(x)" \
-    -fill orange \
-    -color black \
-    -x x \
-    -y sinX \
-    -symbol $s1
-
-set s2 [image create picture -width 25 -height 25]
-$s2 blank 0x00000000
-
-$s2 draw circle 12 12 5 -shadow 0 -linewidth 1 \
-	-fill 0x900000F0 -antialias yes \
-	-outline orange
-set s2 splus
-$graph element create line2 \
-    -label "cos(x)" \
-    -color yellow4 \
-    -fill yellow \
-    -x x \
-    -y cosX \
-    -symbol $s2
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-#Blt_PrintKey $graph
-
-$graph marker create bitmap \
-    -name bg \
-    -coords "-360 -1 360 1" \
-    -bitmap @bitmaps/greenback.xbm \
-    -bg darkseagreen1 \
-    -fg darkseagreen3 \
-    -under yes \
-	-rotate 45
-#    -rotate 45
-$graph postscript configure \
-    -landscape yes
-
diff --git a/blt3.0/demos/scripts/graph5.tcl b/blt3.0/demos/scripts/graph5.tcl
deleted file mode 100644
index 89b7903..0000000
--- a/blt3.0/demos/scripts/graph5.tcl
+++ /dev/null
@@ -1,65 +0,0 @@
-
-set configOptions {
-    Element.LineWidth		0
-    Element.Pixels		0.7c
-    Element.ScaleSymbols	true
-    Font			{ Courier 18 bold}
-    Height			4i
-    Legend.ActiveRelief		raised
-    Legend.Font			{ Courier 14 } 
-    Legend.padY			0
-    Title			"Element Symbol Types"
-    Width			5i
-} 
-set resName [string trimleft $graph .]
-foreach { option value } $configOptions {
-    option add *$resName.$option $value
-}
-
-blt::vector xValues
-xValues set { 
-    0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 
-}
-
-for { set i 0 } { $i < 10 } { incr i } {
-    set vecName "y${i}"
-    blt::vector ${vecName}(10)
-    $vecName variable x
-    set x(:) [expr $i*50.0+10.0]
-}
-
-set attributes {
-    none	"None"		red	red4		y0
-    circle	"Circle"	yellow	yellow4		y2
-    cross	"Cross"		cyan	cyan4		y6
-    diamond	"Diamond"	green	green4		y3
-    plus	"Plus"		magenta	magenta4	y9
-    splus	"Splus"		Purple	purple4		y7
-    scross	"Scross"	red	red4		y8
-    square	"Square"	orange	orange4		y1
-    triangle	"Triangle"	blue	blue4		y4
-    "@bitmaps/hobbes.xbm @bitmaps/hobbes_mask.xbm"
-		"Bitmap"	yellow	black		y5
-}
-
-set count 0
-foreach { symbol label fill color yVec } $attributes {
-    $graph element create line${count} \
-	-label $label \
-	-symbol $symbol \
-	-color $color \
-	-fill $fill \
-	-x xValues \
-	-y $yVec 
-    incr count
-}
-$graph element configure line0 \
-    -dashes  { 2 4 2 } \
-    -linewidth 2
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
-Blt_PrintKey $graph
-
diff --git a/blt3.0/demos/scripts/graph8.tcl b/blt3.0/demos/scripts/graph8.tcl
deleted file mode 100644
index 86f94d7..0000000
--- a/blt3.0/demos/scripts/graph8.tcl
+++ /dev/null
@@ -1,85 +0,0 @@
-
-set X { 
-    2.00000e-01 4.00000e-01 6.00000e-01 8.00000e-01 1.00000e+00 
-    1.20000e+00 1.40000e+00 1.60000e+00 1.80000e+00 2.00000e+00 
-    2.20000e+00 2.40000e+00 2.60000e+00 2.80000e+00 3.00000e+00 
-    3.20000e+00 3.40000e+00 3.60000e+00 3.80000e+00 4.00000e+00 
-    4.20000e+00 4.40000e+00 4.60000e+00 4.80000e+00 5.00000e+00 
-} 
-
-set Y1 { 
-    1.14471e+01 2.09373e+01 2.84608e+01 3.40080e+01 3.75691e+01 
-    3.91345e+01 3.92706e+01 3.93474e+01 3.94242e+01 3.95010e+01 
-    3.95778e+01 3.96545e+01 3.97313e+01 3.98081e+01 3.98849e+01 
-    3.99617e+01 4.00384e+01 4.01152e+01 4.01920e+01 4.02688e+01 
-    4.03455e+01 4.04223e+01 4.04990e+01 4.05758e+01 4.06526e+01 
-}
-
-set Y2 { 
-    2.61825e+01 5.04696e+01 7.28517e+01 9.33192e+01 1.11863e+02 
-    1.28473e+02 1.43140e+02 1.55854e+02 1.66606e+02 1.75386e+02 
-    1.82185e+02 1.86994e+02 1.89802e+02 1.90683e+02 1.91047e+02 
-    1.91411e+02 1.91775e+02 1.92139e+02 1.92503e+02 1.92867e+02 
-    1.93231e+02 1.93595e+02 1.93958e+02 1.94322e+02 1.94686e+02 
-}
-
-set Y3 { 
-    4.07008e+01 7.95658e+01 1.16585e+02 1.51750e+02 1.85051e+02 
-    2.16479e+02 2.46024e+02 2.73676e+02 2.99427e+02 3.23267e+02 
-    3.45187e+02 3.65177e+02 3.83228e+02 3.99331e+02 4.13476e+02 
-    4.25655e+02 4.35856e+02 4.44073e+02 4.50294e+02 4.54512e+02 
-    4.56716e+02 4.57596e+02 4.58448e+02 4.59299e+02 4.60151e+02 
-}
-
-
-proc FormatLabel { w value } {
-    return $value
-}
-
-#option add *Graph.aspect		1.25
-option add *Graph.title			"A Simple X-Y Graph"
-option add *Graph.x.loose		yes
-option add *Graph.x.title		"X Axis Label"
-option add *Graph.y.title		"Y Axis Label" 
-option add *Graph.y.rotate		90
-option add *Graph.y.logScale		yes
-option add *Graph.y.loose		no
-option add *Graph.Axis.titleFont        {Times 18 bold}
-
-option add *Legend.activeRelief		sunken
-option add *Legend.background		""
-option add *Legend.activeBackground	khaki2
-option add *Graph.background		brown
-option add *Element.xData		$X 
-option add *activeLine.Color		yellow4
-option add *activeLine.Fill		yellow
-option add *Element.smooth		natural
-option add *Element.pixels		6
-option add *Element.scaleSymbols	yes
-
-option add *Graph.line1.symbol		circle
-option add *Graph.line1.color		red4
-option add *Graph.line1.fill		red1
-
-option add *Graph.line2.symbol		square
-option add *Graph.line2.color		purple4
-option add *Graph.line2.fill		purple1
-
-option add *Graph.line3.symbol		triangle
-option add *Graph.line3.color		green4
-option add *Graph.line3.fill		green1
-
-$graph configure \
-    -width 4i \
-    -height 5i
-$graph element create line1 \
-    -ydata $Y2 
-$graph element create line2 \
-    -ydata $Y3 
-$graph element create line3 \
-    -ydata $Y1 
-
-Blt_ZoomStack $graph
-Blt_Crosshairs $graph
-Blt_ActiveLegend $graph
-Blt_ClosestPoint $graph
diff --git a/blt3.0/demos/scripts/page.tcl b/blt3.0/demos/scripts/page.tcl
deleted file mode 100755
index c00cbc0..0000000
--- a/blt3.0/demos/scripts/page.tcl
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/local/bin/tclsh
-
-array set page "
-    rows	2
-    columns	2
-    padx	0.5
-    pady	0.5
-    width	8.5
-    height	11
-    gutter	0.25
-"
-
-proc Pica { dist } {
-    expr $dist * 72.0
-}
-
-# ------------------------------------------------------------------
-#
-# TileFiles
-#
-#	Tiles graph postscript files together in a pre-defined
-#	grid.
-#
-# Arguments:
-#	outFile	-- Resulting tiled PostScript output file.
-#	args    -- Names of input graph PostScript files.
-#
-# ------------------------------------------------------------------
-
-proc TileFiles { outFile args } {
-    global page
-
-    set row 0 
-    set column 0
-
-
-    set padx [Pica $page(padx)]
-    set pady [Pica $page(padx)]
-    set width [Pica $page(width)]
-    set height [Pica $page(height)]
-    set gutter [Pica $page(gutter)]
-
-    set totalGutters [expr $gutter * ($page(columns) - 1)]
-    set w [expr $width - (2 * $padx) - $totalGutters] 
-    set totalGutters [expr $gutter * ($page(rows) - 1)]
-    set h [expr $height - (2 * $pady) - $totalGutters]
-
-    set cellWidth  [expr double($w) / $page(columns)]
-    set cellHeight [expr double($h) / $page(rows)]
-    
-    set out [open $outFile "w"]
-
-    puts $out "%!PS-Adobe-3.0 EPSF-3.0"
-    puts $out "%%Pages: 1"
-    puts $out "%%Title: (Graph tiler)"
-    puts $out "%%DocumentNeededResources: font Helvetica Courier"
-    puts $out "%%CreationDate: [clock format [clock seconds]]"
-    puts $out "%%EndComments"
-    
-    puts $out "/showsheet { showpage } bind def"
-    puts $out "/showpage { } def"
-    puts $out "$padx $pady translate"
-
-    set first {}
-    foreach inFile $args {
-	set in [open $inFile "r"]
-
-	# Warning, this is assuming that the BoundingBox is in the first
-	# twenty lines of the graph's PostScript.  
-
-	for { set count 0 } { $count < 20 } { incr count } {
-	    gets $in line
-	    if { [string match "%%BoundingBox:*" $line] } {
-		set bbox $line
-		break;
-	    }
-	    append first "$line\n"
-	    if { [eof $in] } {
-		break
-	    }
-	}
-	if { ![info exists bbox] } {
-	    error "can't find \"%%BoundingBox:\" line"
-	}
-	set n [scan $bbox "%%%%BoundingBox: %d %d %d %d" x1 y1 x2 y2]
-	if { $n != 4} {
-	    error "Bad bounding box line \"$bbox\""
-	}
-
-	set rest [read $in]
-	close $in
-
-	set x [expr ($cellWidth + $gutter) * $column]
-	set y [expr ($cellHeight + $gutter) * $row]
-
-	set w [expr abs($x2 - $x1)]
-	set h [expr abs($y2 - $y1)]
-	
-	set scaleX [expr $cellWidth / $w]
-	set scaleY [expr $cellHeight / $h]
-	if { $scaleX > $scaleY } {
-	    set scale $scaleY
-	} else {
-	    set scale $scaleX
-	}
-	puts $out "% "
-	puts $out "% Tiling \"$inFile\" at ($row,$column)"
-	puts $out "% "
-	puts $out "gsave"
-	puts $out "$x $y translate"
-	puts $out "$scale $scale scale"
-	puts $out "-$x1 -$y1 translate"
-	puts $out $first
-	puts $out $rest
-	puts $out "grestore"
-	incr column
-	if { $column >= $page(columns) } {
-	    set column 0
-	    incr row
-	}
-    }
-    puts $out "showsheet"
-    close $out
-}
-
-eval TileFiles $argv
-
-
-
-
-
diff --git a/blt3.0/demos/scripts/patterns.tcl b/blt3.0/demos/scripts/patterns.tcl
deleted file mode 100644
index e7f281d..0000000
--- a/blt3.0/demos/scripts/patterns.tcl
+++ /dev/null
@@ -1,16 +0,0 @@
-blt::bitmap define pattern1 { {4 4} {01 02 04 08} }
-blt::bitmap define pattern2 { {4 4} {08 04 02 01} }
-blt::bitmap define pattern3 { {2 2} {01 02 } }
-blt::bitmap define pattern4 { {4 4} {0f 00 00 00} }
-blt::bitmap define pattern5 { {4 4} {01 01 01 01} }
-blt::bitmap define pattern6 { {2 2} {01 00 } }
-blt::bitmap define pattern7 { {4 4} {0f 01 01 01} }
-blt::bitmap define pattern8 { {8 8} {ff 00 ff 00 ff 00 ff 00 } }
-blt::bitmap define pattern9 { {4 4} {03 03 0c 0c} }
-blt::bitmap define hobbes { {25 25} {
-	00 00 00 00 00 00 00 00 00 c0 03 00 78 e0 07 00 fc f8 07 00 cc 07 04 00
-	0c f0 0b 00 7c 1c 06 00 38 00 00 00 e0 03 10 00 e0 41 11 00 20 40 11 00
-	e0 07 10 00 e0 c1 17 00 10 e0 2f 00 20 e0 6f 00 18 e0 2f 00 20 c6 67 00
-	18 84 2b 00 20 08 64 00 70 f0 13 00 80 01 08 00 00 fe 07 00 00 00 00 00
-	00 00 00 00 }
-}
diff --git a/blt3.0/demos/scripts/ps.tcl b/blt3.0/demos/scripts/ps.tcl
deleted file mode 100644
index e74e737..0000000
--- a/blt3.0/demos/scripts/ps.tcl
+++ /dev/null
@@ -1,822 +0,0 @@
-#bltdebug 100
-
-array set cursors {
-    w left_side
-    e right_side
-    n top_side
-    s bottom_side
-    sw bottom_left_corner
-    ne top_right_corner
-    se bottom_right_corner
-    nw top_left_corner
-}
-
-set paperSizes {
-    "Letter (8 1/2 x 11 in.)"	"i 8.5i 11i" 
-    "A3 (29.7 x 42 cm.)"	"c 28.7c 41c" 
-    "A4 (21 x 29.7 cm.)"	"c 21c 29.7c" 
-    "A5 (14.85 x 21 cm.)"	"c 14.85c 21c" 
-    "Legal (8 1/2 x 14 in.)"	"i 8.5i 14i" 
-    "Large (11 x 17 in.)"	"i 11i 17i" 
-}
-
-array set paperSize $paperSizes
-
-array set pageInfo {
-    gripSize 8
-    scale 0.25
-    radioFont -*-helvetica-medium-r-*-*-11-120-*-*-*-*-*-*
-    labelFont   "Arial 10 bold"
-    printCmd	"nlp -d2a211"
-    printFile   "out.ps"
-    units	"i"
-    uscale	1.0
-}
-
-proc ApplyWhenIdle { } {
-    global pageInfo 
-
-    set data [$pageInfo(graph) postscript output]
-    puts stderr "landscape= [$pageInfo(graph) postscript cget -landscape]"
-    $pageInfo(image) import ps -data $data -crop no
-    puts stderr "writing out2.ps"
-    $pageInfo(graph) postscript output -file out2.ps
-    unset pageInfo(afterId)
-}
-
-proc SetUnits { units }  {
-    global pageInfo
-    switch -glob $units {
-	"i*"    { set pageInfo(uscale) [winfo fpixels . 1i]  }
-	"c*"    { set pageInfo(uscale) [winfo fpixels . 1c] }
-	default { error "unknown unit \"$units\"" }
-    }
-    set pageInfo(units) [string index $units 0]
-}
-
-
-proc ConvertUnits { value } {
-    global pageInfo
-    set value [expr double($value) / $pageInfo(uscale)]
-    return [format "%.1f%s" $value $pageInfo(units)]
-}
-
-
-proc SetPaperSize {} {
-    global pageInfo 
-
-    set extents $pageInfo(paperExtents)
-    foreach { unit w h } $extents break
-    SetUnits $unit
-    set pageInfo(-paperwidth) $w
-    set pageInfo(-paperheight) $h
-    ApplyPs
-}
-    
-proc SetCanvasSize { canvas width height } {
-    global pageInfo
-
-    set width [winfo pixels . $width]
-    set height [winfo pixels . $height]
-    $canvas configure -width $width -height $height
-}
-
-proc SetCanvasOrientation { canvas } {
-    global pageInfo
-    set width $pageInfo(paperWidth)
-    set height $pageInfo(paperHeight)
-    SetCanvasSize $canvas $width $height
-}
-
-
-proc GetPsOptions { graph } {
-    global pageInfo
-
-    foreach opt [$graph postscript configure] {
-	set pageInfo([lindex $opt 0]) [lindex $opt 4]
-    }
-}
-
-proc SetOutline { canvas } {
-    global pageInfo
-    foreach var { gripSize xMin yMin xMax yMax } {
-	set $var $pageInfo($var)
-    }
-    set xMid [expr ($xMax + $xMin - $gripSize) * 0.5]
-    set yMid [expr ($yMax + $yMin - $gripSize) * 0.5]
-    $canvas coords image $xMin $yMin 
-    $canvas itemconfigure image \
-	-width [expr $xMax - $xMin] -height [expr $yMax - $yMin]
-    $canvas coords nw \
-	$xMin $yMin [expr $xMin + $gripSize] [expr $yMin + $gripSize] 
-    $canvas coords se \
-	[expr $xMax - $gripSize] [expr $yMax - $gripSize] $xMax $yMax 
-    $canvas coords ne \
-	[expr $xMax - $gripSize] [expr $yMin + $gripSize] $xMax $yMin 
-    $canvas coords sw \
-	$xMin $yMax [expr $xMin + $gripSize] [expr $yMax - $gripSize] 
-    SetCanvasOrientation $canvas
-    $canvas coords n \
-	$xMid $yMin [expr $xMid + $gripSize] [expr $yMin + $gripSize] 
-    $canvas coords s \
-	$xMid [expr $yMax - $gripSize] [expr $xMid + $gripSize] $yMax
-     $canvas coords e \
- 	[expr $xMax - $gripSize] $yMid $xMax [expr $yMid + $gripSize] 
-     $canvas coords w \
- 	$xMin $yMid [expr $xMin + $gripSize] [expr $yMid + $gripSize] 
-}
-
-proc CreateOutline { canvas } {
-    global pageInfo
-    foreach var { gripSize xMin yMin xMax yMax } {
-	set $var $pageInfo($var)
-    }
-    if { ![blt::bitmap exists pattern8] } {
-	blt::bitmap define pattern8 { {8 8} {ff 00 ff 00 ff 00 ff 00 } }
-    }
-    $canvas create eps $xMin $yMin \
-	-tags "outline image" \
-	-width [expr $xMax - $xMin] \
-	-height [expr $yMax - $yMin]
-
-    $canvas bind image <ButtonPress-1>   "StartMove $canvas %x %y"
-    $canvas bind image <B1-Motion>       "MoveOutline $canvas %x %y"
-    $canvas bind image <ButtonRelease-1> "EndMove $canvas"
-
-    $canvas bind image <Shift-B1-Motion> "ConstrainMoveOutline $canvas %x %y"
-    $canvas bind image <Enter> "EnterImage $canvas"
-    $canvas bind image <Leave> "LeaveImage $canvas"
-    focus $canvas
-    $canvas create rectangle \
-	$xMin $yMin [expr $xMin + $gripSize] [expr $yMin + $gripSize] \
-	-tags "outline grip nw" 
-    $canvas create rectangle \
-	[expr $xMax - $gripSize] [expr $yMax - $gripSize] $xMax $yMax \
-	-tags "outline grip se" 
-    $canvas create rectangle \
-	[expr $xMax - $gripSize] [expr $yMin + $gripSize] $xMax $yMin \
-	-tags "outline grip ne" 
-    $canvas create rectangle \
-	$xMin $yMax [expr $xMin + $gripSize] [expr $yMax - $gripSize] \
-	-tags "outline grip sw" 
-
-    set xMid [expr ($xMax + $xMin - $gripSize) * 0.5]
-    set yMid [expr ($yMax + $yMin - $gripSize) * 0.5]
-    $canvas create rectangle \
-	$xMid $yMin [expr $xMid + $gripSize] [expr $yMin + $gripSize] \
-	-tags "outline grip n" 
-    $canvas create rectangle \
-	$xMid [expr $yMax - $gripSize] [expr $xMid + $gripSize] $yMax \
-	-tags "outline grip s" 
-     $canvas create rectangle \
- 	[expr $xMax - $gripSize] $yMid $xMax [expr $yMid + $gripSize] \
- 	-tags "outline grip e" 
-     $canvas create rectangle \
- 	$xMin $yMid [expr $xMin + $gripSize] [expr $yMid + $gripSize] \
- 	-tags "outline grip w" 
-    foreach grip { e w s n sw ne se nw } {
-	$canvas bind $grip <ButtonPress-1>   "StartResize %W $grip %x %y"
-	$canvas bind $grip <B1-Motion>	     "ResizeOutline %W %x %y"
-	$canvas bind $grip <ButtonRelease-1> "EndResize %W $grip %x %y"
-	$canvas bind $grip <Enter>	     "EnterGrip %W $grip %x %y"
-	$canvas bind $grip <Leave>	     "LeaveGrip %W $grip"
-    }
-    $canvas raise grip
-    $canvas itemconfigure grip -fill red -outline black
-
-    set pageInfo(image) [image create picture]
-    set data [$pageInfo(graph) postscript output]
-    $pageInfo(image) import ps -data $data -crop no
-    $canvas itemconfigure image -image $pageInfo(image)
-    $pageInfo(graph) postscript output out2.ps
-}
-
-
-proc EnterImage  { canvas } {
-    global cursors
-    global pageInfo
-    bind $canvas <KeyPress-Left>  {
-	MoveOutline %W [expr $pageInfo(lastX) - 1]  $pageInfo(lastY)
-    }
-    bind $canvas <KeyPress-Right> {
-	MoveOutline %W [expr $pageInfo(lastX) + 1]  $pageInfo(lastY)
-    }
-    bind $canvas <KeyPress-Up>   {
-	MoveOutline %W $pageInfo(lastX) [expr $pageInfo(lastY) - 1]
-    }
-    bind $canvas <KeyPress-Down> {
-	MoveOutline %W $pageInfo(lastX) [expr $pageInfo(lastY) + 1]
-    }
-    focus $canvas
-    $canvas configure -cursor fleur
-    set pageInfo(lastX) 0
-    set pageInfo(lastY) 0
-}
-
-
-proc LeaveImage { canvas } {    
-    bind $canvas <KeyPress-Left> ""
-    bind $canvas <KeyPress-Right> ""
-    bind $canvas <KeyPress-Up> ""
-    bind $canvas <KeyPress-Down> ""
-    $canvas configure -cursor ""
-}
-
-proc EnterGrip  { canvas grip x y } {
-    global pageInfo
-    $canvas itemconfigure $grip -fill blue -outline black
-    set pageInfo(grip) $grip
-    global cursors
-    bind $canvas <KeyPress-Left>  {
-	ResizeOutline %W [expr $pageInfo(lastX) - 1] $pageInfo(lastY)
-    }
-    bind $canvas <KeyPress-Right> {
-	ResizeOutline %W [expr $pageInfo(lastX) + 1] $pageInfo(lastY)
-    }
-    bind $canvas <KeyPress-Up> {
-	ResizeOutline %W $pageInfo(lastX) [expr $pageInfo(lastY) - 1] 
-    }
-    bind $canvas <KeyPress-Down> {
-	ResizeOutline %W $pageInfo(lastX) [expr $pageInfo(lastY) + 1] 
-    }
-    focus $canvas
-    $canvas configure -cursor $cursors($grip)
-    set pageInfo(lastX) $x
-    set pageInfo(lastY) $y
-}
-
-proc LeaveGrip { canvas grip } {    
-    $canvas itemconfigure $grip -fill red -outline black
-    bind $canvas <KeyPress-Left> ""
-    bind $canvas <KeyPress-Right> ""
-    bind $canvas <KeyPress-Up> ""
-    bind $canvas <KeyPress-Down> ""
-    $canvas configure -cursor ""
-}
-
-proc StartMove { canvas x y } {
-    global pageInfo 
-    set pageInfo(lastX) $x
-    set pageInfo(lastY) $y
-    set pageInfo(direction) "undecided"
-    $canvas configure -cursor fleur
-}
-
-proc MoveOutline { canvas x y } {
-    global pageInfo
-    $canvas move outline [expr $x - $pageInfo(lastX)] [expr $y - $pageInfo(lastY)]
-    set pageInfo(lastX) $x
-    set pageInfo(lastY) $y
-}
-
-proc ConstrainMoveOutline { canvas x y } {
-    global pageInfo
-
-    set dx [expr $x - $pageInfo(lastX)]
-    set dy [expr $y - $pageInfo(lastY)]
-
-    if { $pageInfo(direction) == "undecided" } {
-	if { abs($dx) > abs($dy) } {
-	    set pageInfo(direction) x
-	    $canvas configure -cursor sb_h_double_arrow
-	} else {
-	    set pageInfo(direction) y
-	    $canvas configure -cursor sb_v_double_arrow
-	}
-    }
-    switch $pageInfo(direction) {
-	x { set dy 0 ; set pageInfo(lastX) $x } 
-	y { set dx 0 ; set pageInfo(lastY) $y }
-    }
-    $canvas move outline $dx $dy
-}
-
-proc EndMove { canvas } {
-    $canvas configure -cursor ""
-
-    set coords [$canvas coords image]
-    set x [lindex $coords 0]
-    set y [lindex $coords 1]
-    set w [$canvas itemcget image -width]
-    set h [$canvas itemcget image -height]
-
-    global pageInfo
-    set pageInfo(xMin) $x
-    set pageInfo(xMin) $y
-    set pageInfo(xMax) [expr $x + $w]
-    set pageInfo(yMax) [expr $y + $h]
-
-    global pageInfo
-    set pageInfo(-padx) [list $pageInfo(xMin) [expr $pageInfo(paperWidth) - $pageInfo(xMax)]]
-    set pageInfo(-pady) [list $pageInfo(yMin) [expr $pageInfo(paperHeight) - $pageInfo(yMax)]]
-}
-
-proc StartResize { canvas grip x y } {
-    global pageInfo
-    $canvas itemconfigure image -quick yes
-    set pageInfo(grip) $grip
-    $canvas itemconfigure $grip -fill red -outline black 
-    $canvas raise grip
-    global cursors
-    $canvas configure -cursor $cursors($grip)
-    set pageInfo(lastX) $x
-    set pageInfo(lastY) $y
-}
-
-proc EndResize { canvas grip x y } {
-    $canvas itemconfigure image -quick no
-    ResizeOutline $canvas $x $y
-    $canvas itemconfigure $grip -fill "" -outline "" 
-    $canvas configure -cursor ""
-}
-
-proc ResizeOutline { canvas x y } {
-    global pageInfo
-
-    foreach var { gripSize xMin yMin xMax yMax } {
-	set $var $pageInfo($var)
-    }
-    switch $pageInfo(grip) {
-	n {
-	    set yMin $y
-	}
-	s {
-	    set yMax $y
-	}
-	e {
-	    set xMax $x
-	}
-	w {
-	    set xMin $x
-	}
-	sw {
-	    set xMin $x ; set yMax $y
-	}
-	ne {
-	    set xMax $x ; set yMin $y
-	}
-	se {
-	    set xMax $x ; set yMax $y
-	}
-	nw {
-	    set xMin $x ; set yMin $y
-	}
-    }
-    set width [expr $xMax - $xMin]
-    set height [expr $yMax - $yMin]
-    if { ($width < 1) || ($height < 1) } {
-	return
-    }
-    SetOutline $canvas
-    foreach var { xMin yMin xMax yMax } {
-	set pageInfo($var) [set $var]
-    }
-}
-
-proc ComputePlotGeometry { graph } {
-    global pageInfo
-
-    GetPsOptions $graph
-    set width [winfo width $graph]
-    set height [winfo height $graph]
-    if { $pageInfo(-width) > 0 } {
-	set width $pageInfo(-width)
-    }
-    if { $pageInfo(-height) > 0 } {
-	set height $pageInfo(-height)
-    }
-
-    set left [lindex $pageInfo(-padx) 0]
-    set right [lindex $pageInfo(-padx) 1]
-    set top [lindex $pageInfo(-pady) 0]
-    set bottom [lindex $pageInfo(-pady) 1]
-    set padx [expr $left + $right]
-    set pady [expr $top + $bottom]
-
-    if { $pageInfo(-paperwidth) > 0 } {
-	set paperWidth $pageInfo(-paperwidth)
-    } else {
-	set paperWidth [expr $width + $padx]
-    }
-    if { $pageInfo(-paperheight) > 0 } {
-	set paperHeight $pageInfo(-paperheight)
-    } else {
-	set paperHeight [expr $height + $pady]
-    }
-    set scale 1.0
-    if { $pageInfo(-maxpect) } {
-	set xScale [expr ($paperWidth - $padx) / double($width)]
-	set yScale [expr ($paperHeight - $pady) / double($height)]
-	set scale [expr min($xScale,$yScale)]
-	set bboxWidth [expr round($width * $scale)]
-	set bboxHeight [expr round($height * $scale)]
-    } else {
-	if { ($width + $padx) > $paperWidth } {
-	    set width [expr $paperWidth - $padx]
-	}
-	if { ($height + $pady) > $paperHeight } {
-	    set height [expr $paperHeight - $pady]
-	}
-	set bboxWidth $width
-	set bboxHeight $height
-    }
-    set x $left
-    set y $top
-    if { $pageInfo(-center) } {
-	if { $paperWidth > $bboxWidth }  {
-	    set x [expr ($paperWidth - $bboxWidth) / 2]
-	}
-	if { $paperHeight > $bboxHeight } {
-	    set y [expr ($paperHeight - $bboxHeight) / 2]
-	}
-    }
-    set pageInfo(xMin) [expr $x * $pageInfo(scale)]
-    set pageInfo(yMin) [expr $y * $pageInfo(scale)]
-    set pageInfo(xMax) [expr ($x + $bboxWidth) * $pageInfo(scale)]
-    set pageInfo(yMax) [expr ($y + $bboxHeight) * $pageInfo(scale)]
-    set pageInfo(paperHeight) [expr $paperHeight * $pageInfo(scale)]
-    set pageInfo(paperWidth) [expr $paperWidth * $pageInfo(scale)]
-}
-
-proc PsDialog { graph } {
-    global pageInfo paperSizes 
-
-    set pageInfo(graph) $graph
-    set top $graph.top
-    toplevel $top
-    option add *graph.top*Radiobutton.font $pageInfo(radioFont)
-    GetPsOptions $graph
-    ComputePlotGeometry $graph
-    set canvas $top.layout
-    canvas $canvas -confine yes \
-	-width $pageInfo(paperWidth) -height $pageInfo(paperHeight) -bg gray \
-	-bd 2 -relief sunken 
-    CreateOutline $canvas
-    SetCanvasOrientation $canvas
-    blt::tk::label $top.titleLabel -text "PostScript Options"
-    blt::table $top \
-	0,0 $top.titleLabel -cspan 7 \
-	1,0 $canvas -cspan 7
-
-    set row 2
-    set col 0
-
-    blt::tk::label $top.paperLabel -text "Paper" -font "Arial 10 bold"
-    blt::combobutton $top.paper \
-	-textvariable pageInfo(paperSize)  \
-	-font { Arial 10 } \
-	-menu $top.paper.m
-
-    set menu [blt::combomenu $top.paper.m -textvariable pageInfo(paperSize)]
-    foreach { key value } $paperSizes {
-	$menu add -type command -text $key -value $value
-    }
-    $menu item configure command -variable pageInfo(paperExtents) \
-	-command "SetPaperSize"
-    set pageInfo(paperSize) [lindex $paperSizes 0]
-    blt::table $top \
-	$row,$col     $top.paperLabel -anchor e \
-	$row,$col+1   $top.paper -anchor e -fill x
-    incr row 
-
-    blt::tk::label $top.orientLabel -text "Orientation" -font "Arial 10 bold"
-    blt::combobutton $top.orient \
-	-textvariable pageInfo(orient)  \
-	-font { Arial 10 } \
-	-menu $top.orient.m
-
-    set menu [blt::combomenu $top.orient.m -textvariable pageInfo(orient)]
-    $menu add -type command -text "Portrait" -value "0" \
-	-variable pageInfo(-landscape) -command "ApplyPs"
-    $menu add -type command -text "Landscape" -value "1" \
-	-variable pageInfo(-landscape) -command "ApplyPs"
-    set pageInfo(orient) "Landscape"
-    set pageInfo(-landscape) 1
-    blt::table $top \
-	$row,$col     $top.orientLabel -anchor e \
-	$row,$col+1   $top.orient -anchor e -fill x 
-    incr row 
-
-    set col 0
-    incr row
-    blt::tk::label $top.sizeLabel -text "Plot Size" -font "Arial 10 bold"
-    blt::combobutton $top.plotsize \
-	-textvariable pageInfo(plotsize)  \
-	-font { Arial 10 } \
-	-menu $top.plotsize.m
-
-    set menu [blt::combomenu $top.plotsize.m -textvariable pageInfo(plotsize)]
-    $menu add -type command -text "Default" -value "default" \
-	-variable pageInfo(-plotsize) -command "SetPlotSize"
-    $menu add -type command -text "Max Aspect" -value "maxpect" \
-	-variable pageInfo(-plotsize) -command "SetPlotSize"
-    $menu add -type command -text "Small (3.25 in x 3.25 in)" -value "small" \
-	-variable pageInfo(-plotsize) -command "SetPlotSize"
-    $menu add -type command -text "Large (6 in x 8 in)" -value "large" \
-	-variable pageInfo(-plotsize) -command "SetPlotSize"
-    $menu add -type command -text "Other" -value "other" \
-	-variable pageInfo(-plotsize) \
-	-command "SizeDialog $graph {Adjust Plot Size}"
-    set pageInfo(plotsize) "Default"
-    blt::table $top \
-	$row,$col     $top.sizeLabel -anchor e \
-	$row,$col+1   $top.plotsize -anchor e -fill x 
-    incr row 
-
-    blt::tk::label $top.modeLabel -text "Color mode" -font "Arial 10 bold"
-    blt::combobutton $top.colormode \
-	-textvariable pageInfo(colormode)  \
-	-font { Arial 10 } \
-	-menu $top.colormode.m
-
-    set menu [blt::combomenu $top.colormode.m -textvariable pageInfo(colormode)]
-    $menu add -type command -text "Full Color" -value "0" \
-	-variable pageInfo(-greyscale) -command "ApplyPs"
-    $menu add -type command -text "Greyscale" -value "1" \
-	-variable pageInfo(-greyscale) -command "ApplyPs"
-    set pageInfo(colormode) "Full Color"
-    blt::table $top \
-	$row,$col     $top.modeLabel -anchor e \
-	$row,$col+1   $top.colormode -anchor e -fill x 
-    incr row 
-    
-    set pageInfo(oldPadX) $pageInfo(-padx)
-    set pageInfo(oldPadY) $pageInfo(-pady)
-
-    blt::tk::label $top.posLabel -text "Position" -font "Arial 10 bold"
-    blt::combobutton $top.position \
-	-textvariable pageInfo(position)  \
-	-font { Arial 10 } \
-	-menu $top.position.m
-
-    set menu [blt::combomenu $top.position.m -textvariable pageInfo(position)]
-
-    $menu add -type command -text "Center" -value "1" \
-	-variable pageInfo(-position) -command { CenterPlot }
-    $menu add -type command -text "Origin" -value "0" \
-	-variable pageInfo(-position) -command { ApplyPs }
-    $menu add -type command -text "Move" -value "move" \
- 	-variable pageInfo(-position) -command { MoveDialog }
-
-    set pageInfo(position) "Center"
-    blt::table $top \
-	$row,$col     $top.posLabel -anchor e \
-	$row,$col+1   $top.position -anchor e -fill x 
-    incr row 
-
-    blt::tk::label $top.previewLabel -text "Preview" -font "Arial 10 bold"
-    blt::combobutton $top.preview \
-	-textvariable pageInfo(preview)  \
-	-font { Arial 10 } \
-	-menu $top.preview.m
-
-    set pageInfo(preview) "No"
-    set menu [blt::combomenu $top.preview.m -textvariable pageInfo(preview)]
-    $menu add -type command -text "Yes" -value "1" \
-	-variable pageInfo(-preview) -command "ApplyPs"
-    $menu add -type command -text "No" -value "0" \
-	-variable pageInfo(-preview) -command "ApplyPs"
-
-    blt::table $top \
-	$row,$col     $top.previewLabel -anchor e \
-	$row,$col+1   $top.preview -anchor e -fill x 
-    incr row 
-
-    blt::tk::label $top.printLabel -text "Print To" -font "Arial 10 bold"
-    blt::combobutton $top.printer \
-	-textvariable pageInfo(printer)  \
-	-font { Arial 10 } -justify left \
-	-menu $top.printer.m
-
-    set menu [blt::combomenu $top.printer.m -textvariable pageInfo(printer)]
-    $menu add -type command -text "File" -value "printFile" \
-	-command "$top.fileEntry configure -textvariable pageInfo(printCmd)" \
-	-variable pageInfo(printTo) 
-
-    $menu add -type command -text "Command" -value "printCmd" \
-	-command "$top.fileEntry configure -textvariable pageInfo(printCmd)" \
-	-variable pageInfo(printTo) 
-    
-    entry $top.fileEntry -textvariable pageInfo(printTo)
-    $menu invoke "File" 
-
-    blt::table $top \
-	$row,$col     $top.printLabel -anchor e \
-	$row,$col+1   $top.printer -anchor e -fill x \
-	$row+1,1 $top.fileEntry -anchor w -fill x -cspan 3 
-    incr row 2
-
-
-    #blt::table configure $top c4 -width .125i
-    frame $top.frame 
-    button $top.frame.cancel -text "Cancel" -command "destroy $top"
-    button $top.frame.print -text "Ok" -command "PrintPs $graph"
-    blt::table $top.frame \
-	0,0 $top.frame.cancel -width 0.5i \
-	0,1 $top.frame.print  -width 0.5i
-
-    blt::table $top \
-	$row,$col     $top.frame -fill x -columnspan 2
-
-    blt::table configure $top r* -resize none -pady { 0 2 }
-    blt::table configure $top r1 -resize both
-}
-
-proc PrintPs { graph } {
-    $graph postscript output "out.ps"
-    puts stdout "wrote file \"out.ps\"."
-    flush stdout
-}
-
-proc ApplyPs { } {
-    global pageInfo
-
-    set graph $pageInfo(graph)
-    foreach option [$graph postscript configure] {
-	set var [lindex $option 0]
-	set old [lindex $option 4]
-	if { [catch {$graph postscript configure $var $pageInfo($var)}] != 0 } {
-	    $graph postscript configure $var $old
-	    set pageInfo($var) $old
-	}
-    }
-    ComputePlotGeometry $graph
-    foreach var { -paperheight -paperwidth -width -height } {
-	set pageInfo($var) [ConvertUnits $pageInfo($var)]
-    }
-    SetOutline $graph.top.layout
-    if { ![info exists pageInfo(afterId)] } {
-	set pageInfo(afterId) [after idle ApplyWhenIdle]
-    }
-}
-
-proc StartChange { w delta } {
-    ChangeSize $w $delta
-    global pageInfo
-    set pageInfo(afterId) [after 300 RepeatChange $w $delta]
-}
-
-proc RepeatChange { w delta } {
-    ChangeSize $w $delta
-    global pageInfo
-    set pageInfo(afterId) [after 100 RepeatChange $w $delta]
-}
-
-proc EndChange { w } {
-    global pageInfo
-    after cancel $pageInfo(afterId)
-}
-
-proc ChangeSize { w delta } {
-    set f [winfo parent $w]
-    set value [$f.entry get]
-    set value [expr $value + $delta]
-    if { $value < 0 } {
-	set value 1
-    }
-    $f.entry delete 0 end
-    $f.entry insert 0 $value
-}
-
-proc MakeSizeAdjustor { w label var } {
-    frame $w
-    label $w.label -text $label
-    button $w.plus -text "+" -padx 1 -pady 0 -font \*symbol\* 
-    entry $w.entry -width 6 -textvariable "pageInfo($var)"
-    button $w.minus -text "-" -padx 1 -pady 0 -font \*symbol\*
-    label $w.units -text "in"
-    bind $w.plus <ButtonPress-1>  { StartChange %W 0.1}
-    bind $w.plus <ButtonRelease-1> { EndChange %W }
-    bind $w.minus <ButtonPress-1>  { StartChange %W -0.1}
-    bind $w.minus <ButtonRelease-1> { EndChange %W }
-    blt::table $w \
-	0,1 $w.label \
-	1,1 $w.entry -rspan 2 -fill y \
-	1,0 $w.minus -padx 2 -pady 2 \
-	2,0 $w.plus -padx 2 -pady { 0 2 } \
-	1,2 $w.units -rspan 2 -fill y 
-    
-}
-
-
-proc SizeDialog { graph title } {
-    global pageInfo
-    set top .plotSize
-    if { [winfo exists $top] } {
-	return
-    }
-    toplevel $top
-    label $top.title -text $title
-    button $top.cancel -text "Cancel" -command "destroy $top"
-    button $top.ok -text "Ok" -command "ApplyPs; destroy $top"
-    MakeSizeAdjustor $top.plotWidth "Width" -width
-    MakeSizeAdjustor $top.plotHeight "Height" -height
-    blt::table $top \
-	0,0 $top.title -cspan 2 \
-	1,0 $top.plotWidth \
-	1,1 $top.plotHeight \
-	2,0 $top.cancel -pady 4 -padx 4 -width 1i \
-	2,1 $top.ok -pady 4 -padx 4 -width 1i
-    set width [winfo fpixels . $pageInfo(-width)]
-    set height [winfo fpixels . $pageInfo(-height)]
-    if { $width == 0 } {
-	set width [expr ($pageInfo(xMax) - $pageInfo(xMin)) / $pageInfo(scale)]
-	set pageInfo(-width) [ConvertUnits $width]
-    }
-    if { $height == 0 } {
-	set height [expr ($pageInfo(yMax) - $pageInfo(yMin)) / $pageInfo(scale)]
-	set pageInfo(-height) [ConvertUnits $height]
-    }
-    set pageInfo(-maxpect) 0
-}
-
-proc SetPlotSize { } {
-    global pageInfo
-    set graph $pageInfo(graph)
-    switch $pageInfo(-plotsize) {
-	default { 
-	    set pageInfo(-width) 0
-	    set pageInfo(-height) 0 
-	    set pageInfo(-maxpect) 0
-	    set pageInfo(-padx) $pageInfo(oldPadX)
-	    set pageInfo(-pady) $pageInfo(oldPadY)
-	} maxpect { 
-	    set pageInfo(-width) 0
-	    set pageInfo(-height) 0
-	    set pageInfo(-maxpect) 1
-	    set pageInfo(-padx) $pageInfo(oldPadX)
-	    set pageInfo(-pady) $pageInfo(oldPadY)
-	} resize {
-	    set pageInfo(-maxpect) 0
-	}
-    }
-    ApplyPs
-}
-
-
-proc PaperSizeDialog { title } {
-    set top .paperSize
-    if { [winfo exists $top] } {
-	return
-    }
-    toplevel $top
-    label $top.title -text $title
-    MakeSizeAdjustor $top.width "Width" -paperwidth
-    MakeSizeAdjustor $top.height "Height" -paperheight
-    button $top.cancel -text "Cancel" -command "destroy $top"
-    button $top.ok -text "Ok" -command "ApplyPs; destroy $top"
-    blt::table $top \
-	0,0 $top.title -cspan 2 \
-	1,0 $top.width \
-	1,1 $top.height \
-	2,0 $top.cancel -pady 4 -padx 4 -width 1i \
-	2,1 $top.ok -pady 4 -padx 4 -width 1i
-}
-
-proc MarginDialog { graph } {
-    set top $graph.top.options
-    if { [winfo exists $top] } {
-	return
-    }
-    toplevel $top
-    set row 0
-    set col 0
-    label $top.modeLabel -text "Printer"
-    radiobutton $top.color -text "Color" -value "color" \
-	-variable pageInfo(-colormode) -command "ApplyPs"
-    radiobutton $top.greyscale -text "Greyscale" -value "greyscale" \
-	-variable pageInfo(-colormode) -command "ApplyPs"
-    blt::table $top \
-	$row,$col   $top.modeLabel -anchor e \
-	$row,$col+1 $top.color -anchor w \
-	$row+1,$col+1 $top.greyscale -anchor w 
-
-    blt::table configure $top r$row -pady { 4 0 }
-
-    label $top.previewLabel -text "Preview"
-    radiobutton $top.previewYes -text "Yes" -value "1" \
-	-variable pageInfo(-preview) -command "ApplyPs"
-    radiobutton $top.previewNo -text "No" -value "0" \
-	-variable pageInfo(-preview) -command "ApplyPs"
-    set col 2
-    blt::table $top \
-	$row,$col   $top.previewLabel -anchor e \
-	$row,$col+1 $top.previewYes -anchor w \
-	$row+1,$col+1 $top.previewNo -anchor w 
-    incr row 2
-
-    button $top.cancel -text "Cancel" -command "destroy $top"
-    button $top.ok -text "Done" -command "PrintPs $graph"
-    blt::table $top \
-	$row,0 $top.cancel -pady 4 -padx 4 -width 1i \
-	$row,1 $top.ok -pady 4 -padx 4 -width 1i
-	
-}    
-
-proc CenterPlot { } {
-    global pageInfo
-
-    set pageInfo(-padx) $pageInfo(oldPadX)
-    set pageInfo(-pady) $pageInfo(oldPadY)
-    ApplyPs
-}
diff --git a/blt3.0/demos/scripts/send.tcl b/blt3.0/demos/scripts/send.tcl
deleted file mode 100644
index 7c57375..0000000
--- a/blt3.0/demos/scripts/send.tcl
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-# --------------------------------------------------------------------------
-#
-# SendInit --
-#	
-#	Creates a "send" proc to replace the former Tk send command.
-#	Uses DDE services to simulate the transfer.  This must be
-#	called before any drag&drop targets are registered. Otherwise
-#	they will pick up the wrong application name.
-#
-#	The first trick is to determine a unique application name. This
-#	is what other applications will use to send to us.  Tk used to
-#	do this for us.  
-#	
-#	Note that we can generate the same name for two different Tk 
-#	applications.  This can happen if two Tk applications picking
-#	names at exactly the same time.   [In the future, we should 
-#	probably generate a name based upon a global system value, such
-#	as the handle of the main window ".".]   The proc "SendVerify"
-#	below will verify that you have only one DDE server registered
-#	with this application's name.
-#	
-# Arguments:
-#	myInterp	Sets the application name explicitly to this 
-#			string. If the argument isn't given, or is the
-#			empty string, then the routine picks a name for
-#			us.
-#
-# Results:
-#	Returns the name of the application.
-#
-# Side Effects:
-#	Sets the name of our application.  You can call "tk appname" to
-#	get the name.  A DDE topic using the same name is also created.
-#	A send proc is also automatically created.  Be careful that you
-#	don't overwrite an existing send command.
-#
-# --------------------------------------------------------------------------
-
-proc SendInit { {myInterp ""} } {
-
-    # Load the DDE package.
-    package require dde
-
-    if { $myInterp == "" } {
-
-	# Pick a unique application name, replicating what Tk used to do.
-	# This is what other applications will use to "send" to us. We'll
-	# use DDE topics to represent interpreters.
-
-	set appName [tk appname]
-	set count 0
-	set suffix {}
-	
-	# Keep generating interpreter names by suffix-ing the original
-	# application name with " #number".  Sooner of later we'll find
-	# one that's not currently use. 
-
-	while { 1 } {
-	    set myInterp "${appName}${suffix}"
-	    set myServer [list TclEval $myInterp]
-	    if { [lsearch [dde services TclEval {}] $myServer] < 0 } {
-		break
-	    }
-	    incr count
-	    set suffix " \#$count"
-	}
-    }
-    tk appname $myInterp
-    dde servername $myInterp
-    proc send { interp args } {
-	dde eval $interp $args
-    }
-    return $myInterp
-}
-
-
-# --------------------------------------------------------------------------
-#
-# SendVerify --
-#	
-#	Verifies that application name picked is uniquely registered
-#	as a DDE server.  This checks that two Tk applications don't
-#	accidently use the same name.
-#
-# Arguments:
-#	None		Used the current application name.
-#
-# Results:
-#	Generates an error if either a server can't be found or more
-#	than one server is registered.
-#
-# --------------------------------------------------------------------------
-
-proc SendVerify {} {
-    # Load the DDE package.
-    package require dde
-
-    set count 0
-    set appName [tk appname]
-    foreach server [dde services TclEval {}] {
-	set topic [lindex $server 1]
-	if { [string compare $topic $appName] == 0 } {
-	    incr count
-	}
-    }
-    if {$count == 0} {
-	error "Service not found: wrong name registered???"
-    } 
-    if { $count > 1 } {
-	error "Duplicate names found for \"[tk appname]\""
-    } 
-}
-
diff --git a/blt3.0/demos/scripts/stipples.tcl b/blt3.0/demos/scripts/stipples.tcl
deleted file mode 100644
index 1845d09..0000000
--- a/blt3.0/demos/scripts/stipples.tcl
+++ /dev/null
@@ -1,153 +0,0 @@
-blt::bitmap define bdiagonal1 { 
-#define bdiagonal1_width 8
-#define bdiagonal1_height 8
-static unsigned char bdiagonal1_bits[] = {
-   0x88, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11};
-}
-
-blt::bitmap define bdiagonal2 { 
-#define bdiagonal2_width 8
-#define bdiagonal2_height 8
-static unsigned char bdiagonal2_bits[] = {
-   0x08, 0x04, 0x02, 0x01, 0x80, 0x40, 0x20, 0x10};
-}
-
-blt::bitmap define checker2 { 
-#define checker2_width 8
-#define checker2_height 8
-static unsigned char checker2_bits[] = {
-   0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc};
-}
-
-blt::bitmap define checker3 { 
-#define checker3_width 8
-#define checker3_height 8
-static unsigned char checker3_bits[] = {
-   0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0};
-}
-
-blt::bitmap define cross1 { 
-#define cross1_width 8
-#define cross1_height 8
-static unsigned char cross_bits[] = {
-   0xff, 0xaa, 0xff, 0xaa, 0xff, 0xaa, 0xff, 0xaa};
-}
-
-blt::bitmap define cross2 { 
-#define cross2_width 8
-#define cross2_height 8
-static unsigned char cross2_bits[] = {
-   0xff, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88};
-}
-
-blt::bitmap define cross3 { 
-#define cross3_width 8
-#define cross3_height 8
-static unsigned char cross3_bits[] = {
-   0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
-}
-
-blt::bitmap define crossdiag { 
-#define crossdiag_width 8
-#define crossdiag_height 8
-static unsigned char crossdiag2_bits[] = {
-   0x18, 0x24, 0x42, 0x81, 0x81, 0x42, 0x24, 0x18};
-}
-
-blt::bitmap define dot1 { 
-#define dot1_width 8
-#define dot1_height 8
-static unsigned char dot1_bits[] = {
-   0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa};
-}
-
-blt::bitmap define dot2 { 
-#define dot2_width 8
-#define dot2_height 8
-static unsigned char dot2_bits[] = {
-   0x55, 0x00, 0x55, 0x00, 0x55, 0x00, 0x55, 0x00};
-}
-
-blt::bitmap define dot3 { 
-#define dot3_width 8
-#define dot3_height 8
-static unsigned char dot3_bits[] = {
-   0x11, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00};
-}
-
-blt::bitmap define dot4 { 
-#define dot4_width 8
-#define dot4_height 8
-static unsigned char dot4_bits[] = {
-   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-}
-
-blt::bitmap define fdiagonal1 { 
-#define fdiagonal1_width 8
-#define fdiagonal1_height 8
-static unsigned char fdiagonal1_bits[] = {
-   0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88};
-}
-
-blt::bitmap define fdiagonal2 { 
-#define fdiagonal2_width 8
-#define fdiagonal2_height 8
-static unsigned char fdiagonal2_bits[] = {
-   0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08};
-}
-
-blt::bitmap define hline1 { 
-#define hline1_width 8
-#define hline1_height 8
-static unsigned char hline1_bits[] = {
-   0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00};
-}
-
-blt::bitmap define hline2 { 
-#define hline2_width 8
-#define hline2_height 8
-static unsigned char hline2_bits[] = {
-   0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00};
-}
-
-blt::bitmap define lbottom { 
-#define lbottom_width 8
-#define lbottom_height 8
-static unsigned char lbottom_bits[] = {
-   0x00, 0x11, 0x11, 0x77, 0x00, 0x11, 0x11, 0x77};
-}
-
-blt::bitmap define ltop { 
-#define ltop_width 8
-#define ltop_height 8
-static unsigned char ltop_bits[] = {
-   0xee, 0x88, 0x88, 0x00, 0xee, 0x88, 0x88, 0x00};
-}
-
-blt::bitmap define rbottom { 
-#define rbottom_width 8
-#define rbottom_height 8
-static unsigned char rbottom_bits[] = {
-   0x00, 0x88, 0x88, 0xee, 0x00, 0x88, 0x88, 0xee};
-}
-
-blt::bitmap define rtop { 
-#define rtop_width 8
-#define rtop_height 8
-static unsigned char rtop_bits[] = {
-   0x77, 0x11, 0x11, 0x00, 0x77, 0x11, 0x11, 0x00};
-}
-
-blt::bitmap define vline1 { 
-#define vline1_width 8
-#define vline1_height 8
-static unsigned char vline1_bits[] = {
-   0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
-}
-
-blt::bitmap define vline2 { 
-#define vline2_width 8
-#define vline2_height 8
-static unsigned char vline2_bits[] = {
-   0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33};
-}
diff --git a/blt3.0/demos/scripts/xcolors.tcl b/blt3.0/demos/scripts/xcolors.tcl
deleted file mode 100755
index 80d3e39..0000000
--- a/blt3.0/demos/scripts/xcolors.tcl
+++ /dev/null
@@ -1,250 +0,0 @@
-#!../bltwish
-#
-#  Tk version of xcolors
-#
-
-package require BLT
-source scripts/demo.tcl
-set numCols 0
-set numRows 0
-set maxCols 15
-set cellWidth 40
-set cellHeight 20
-set numCells 0
-set lastCount 0
-set beginInput(0) 0
-set map 0
-set entryCount 0
-set lastTagId {}
-
-scrollbar .xscroll -command { .canvas xview } -orient horizontal
-scrollbar .yscroll -command { .canvas yview }
-
-label .sample \
-    -font -*-new*century*schoolbook*-bold-r-*-*-24-*-*-*-*-*-*-* \
-    -text {"Bisque is Beautiful".}
-
-button .name -font -*-helvetica-medium-r-*-*-18-*-*-*-*-*-*-* \
-    -command "AddSelection name"
-button .rgb -font -*-courier-medium-r-*-*-18-*-*-*-*-*-*-* \
-    -command "AddSelection rgb"
-
-canvas .canvas \
-    -confine 1 \
-    -yscrollcommand { .yscroll set } \
-    -width [expr 16*$cellWidth] -height 400  \
-    -scrollregion [list 0 0 [expr 16*$cellWidth] 800]
-
-frame .border -bd 2 -relief raised
-
-label .status \
-    -anchor w \
-    -font -*-helvetica-medium-r-*-*-14-*-*-*-*-*-*-* 
-
-button .quit -text "Quit" -command "exit"
-button .next -text "Next" -command "DisplayColors next"
-button .prev -text "Previous" -command "DisplayColors last"
-
-selection handle .name GetColor
-selection handle .rgb GetValue
-
-bind .name <Enter> { 
-    .status config -text \
-	"Press button to write color name into primary selection"
-}
-
-bind .rgb <Enter> { 
-    .status config -text \
-	"Press button to write RGB value into primary selection"
-}
-bind .name <Leave> { 
-    .status config -text ""
-}
-
-bind .rgb <Leave> { 
-    .status config -text ""
-}
-
-bind .canvas <Enter> { 
-    .status config -text \
-	"Press button 1 to change background; Button 2 changes foreground"
-}
-
-
-blt::table . \
-    .sample 0,0 -cspan 2 -fill both -reqheight 1i \
-    .name 1,0 -fill both -anchor w \
-    .rgb 1,1 -fill both -anchor w \
-    .canvas 2,0 -cspan 2 -fill both \
-    .yscroll 2,2 -fill y \
-    .border 3,0 -cspan 2 -fill x -reqheight 8 \
-    .status 4,0 -cspan 2 -fill both  \
-    .quit 4,1 -anchor e -reqwidth 1i -fill y -padx 10 -pady 4 \
-    .prev 5,0 -anchor e -reqwidth 1i -fill y -padx 10 -pady 4 \
-    .next 5,1 -anchor e -reqwidth 1i -fill y -padx 10 -pady 4 
-
-proc AddSelection { what } {
-    selection own .$what
-    if {$what == "name" } {
-	set mesg "Color name written into primary selection"
-    } else {
-	set mesg "RGB value written into primary selection"
-    }
-    .status config -text $mesg
-}
-
-proc GetColor { args } {
-    return [lindex [.name config -text] 4]
-}
-
-proc GetValue { args } {
-    return [lindex [.rgb config -text] 4]
-}
-
-proc ShowInfo { tagId what info } {
-    global lastTagId
-
-    if { $lastTagId != {} } {
-	.canvas itemconfig $lastTagId -width 1
-    }
-    .canvas itemconfig $tagId -width 3
-    set lastTagId $tagId
-
-    set name [lindex $info 3]
-    .name config -text $name 
-    set value [format "#%0.2x%0.2x%0.2x" \
-	       [lindex $info 0] [lindex $info 1] [lindex $info 2]]
-    .rgb config -text $value
-    .sample config $what $name
-    .status config -bg $name
-}
-
-
-proc MakeCell { info } {
-    global numCols numRows maxCols cellWidth cellHeight numCells 
-
-    set x [expr $numCols*$cellWidth]
-    set y [expr $numRows*$cellHeight]
-    set color [lindex $info 3]
-
-    if [catch {winfo rgb . $color}] {
-	return "ok"
-    }
-#    if { [tk colormodel .] != "color" } {
-#	bind . <Leave> { 
-#	    .status config -text "Color table full after $numCells entries."
-#	}
-#	.status config -text "Color table full after $numCells entries."
-#	return "out of colors"
-#    }
-    set id [.canvas create rectangle \
-	    $x $y [expr $x+$cellWidth] [expr $y+$cellHeight] \
-		-fill $color -outline black]
-    if { $color == "white" } {
-	global whiteTagId
-	set whiteTagId $id
-    }
-
-    .canvas bind $id <1> [list ShowInfo $id -bg $info]
-    .canvas bind $id <2> [list ShowInfo $id -fg $info]
-    
-    incr numCols
-    if { $numCols > $maxCols } {
-	set numCols 0
-	incr numRows
-    }
-    return "ok"
-}
-
-proc DisplayColors { how } {
-    global lastCount numCells cellHeight numRows numCols rgbText 
-    global map beginInput
-    
-#    tk colormodel . color
-    set initialized no
-
-    if { $how == "last" } {
-	if { $map == 0 } {
-	    return
-	}
-	set map [expr $map-1]
-    } else {
-	incr map
-	if ![info exists beginInput($map)] {
-	    set beginInput($map) $lastCount
-	}
-    }
-
-    set start $beginInput($map)
-
-    if { $numCells > 0 } {
-	.canvas delete all
-	set numRows 0
-	set numCols 0
-	set initialized yes
-    }
-
-    set input [lrange $rgbText $start end]
-    set lineCount $start
-    set entryCount 0
-    foreach i $input {
-	incr lineCount
-	if { [llength $i] == 4 } {
-	    if { [MakeCell $i] == "out of colors"  } {
-		break
-	    }
-	    incr entryCount
-	}
-    }
-    if { $entryCount == 0 } {
-	bind . <Leave> { 
-	    .status config -text "No more entries in RGB database"
-	}
-	.status config -text "No more entries in RGB database"
-    } 
-    set lastCount $lineCount
-    proc tkerror {args} { 
-	#dummy procedure
-    }
-
-    if { $initialized == "no" } {
-	global cellWidth
-
-	set height [expr $cellHeight*($numRows+1)]
-	.canvas config -scrollregion [list 0 0 [expr 16*$cellWidth] $height]
-	if { $height < 800 } {
-	    .canvas config -height $height
-	}
-	global whiteTagId
-	if [info exists whiteTagId] {
-	    ShowInfo $whiteTagId -bg {255 255 255 white}
-	}
-    }
-    update idletasks
-    update
-    rename tkerror {}
-}
-
-wm min . 0 0
-
-foreach location {
-	/usr/X11R6/lib/X11
-	/util/X11R6/lib/X11
-	/usr/openwin/lib/X11
-	/usr/dt/lib/X11
-	/usr/lib/X11
-	/usr/share/X11
-} {
-    set file [file join $location rgb.txt]
-    if { [file exists $file] } {
-       break
-    }
-}
-set in [open $file "r"]
-set rgbText [read $in]
-close $in
-set rgbText [split $rgbText \n]
-DisplayColors next
-wm min . 0 0
-
-
diff --git a/blt3.0/demos/scrollset1.tcl b/blt3.0/demos/scrollset1.tcl
deleted file mode 100644
index 6d69d44..0000000
--- a/blt3.0/demos/scrollset1.tcl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::scrollset .ss \
-    -xscrollbar .ss.xsbar \
-    -yscrollbar .ss.ysbar \
-    -window .ss.g 
-
-blt::tk::scrollbar .ss.ysbar -orient vertical 
-blt::tk::scrollbar .ss.xsbar -orient horizontal 
-blt::graph .ss.g 
-
-pack .ss -fill both -expand yes
diff --git a/blt3.0/demos/scrollset2.tcl b/blt3.0/demos/scrollset2.tcl
deleted file mode 100644
index ed3fcd8..0000000
--- a/blt3.0/demos/scrollset2.tcl
+++ /dev/null
@@ -1,25 +0,0 @@
-
-package require BLT
-source scripts/demo.tcl
-
-blt::scrollset .ss \
-    -xscrollbar .ss.xsbar \
-    -yscrollbar .ss.ysbar \
-    -window .ss.t 
-
-blt::tk::scrollbar .ss.ysbar -orient vertical 
-blt::tk::scrollbar .ss.xsbar -orient horizontal 
-text .ss.t -wrap none
-
-.ss.t insert end "salsadkjlda s
-adslkjda lskjd
-asldkjda lskjd sa
-aslkj dlsakj lkdsa
-asdlkjdalskj ds
-aslkdj aldskjd ls
-asldkj dlskjd sl
-asldkj dlskjd l
-adlaldksjd ldkasj ldkjs ld"
-
-pack .ss -fill both -expand yes
-
diff --git a/blt3.0/demos/scrollset3.tcl b/blt3.0/demos/scrollset3.tcl
deleted file mode 100644
index 9818335..0000000
--- a/blt3.0/demos/scrollset3.tcl
+++ /dev/null
@@ -1,193 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc SortColumn { column } {
-    set old [.ss.t sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.ss.t sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .ss.t sort configure -decreasing $decreasing -column $column -mode integer
-    if { ![.ss.t cget -flat] } {
-	.ss.t configure -flat yes
-    }
-    .ss.t sort auto yes
-
-    blt::busy hold .ss.t
-    update
-    blt::busy release .ss.t
-}
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-proc Find { tree parent dir } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [glob -nocomplain *] {
-	set name [file tail $f]
-	if { [catch { file stat $f info }] != 0 } {
-	    set node [$tree insert $parent -label $name]
-	} else {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) [list @::blt::TreeView::openIcon $name]
-	    } else {
-		set info(type) "@::blt::TreeView::openIcon "
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [FormatMode $info(mode)]
-	    set node [$tree insert $parent -label $name -data [array get info]]
-	}
-	incr count
-	if { [file type $f] == "directory" } {
-	    Find $tree $node $f
-	}
-    }
-    cd $saved
-}
-
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-option add *TreeView.focusOutSelectForeground white
-option add *TreeView.focusOutSelectBackground grey80
-#option add *TreeView.Button.activeBackground pink
-option add *TreeView.Button.activeBackground grey90
-#option add *TreeView.Button.background grey95
-option add *TreeView.Column.background grey90
-option add *TreeView.CheckBoxStyle.activeBackground white
-if 0 {
-if 1 {
-    option add *TreeView.Column.titleFont { Arial 10 }
-    option add *TreeView.text.font { Monotype.com 10 Bold } 
-    option add *TreeView.CheckBoxStyle.font Courier-10
-    option add *TreeView.ComboBoxStyle.font Helvetica-10
-    option add *TreeView.TextBoxStyle.font {Arial 10 bold }
-} else {
-    option add *TreeView.Column.titleFont { Arial 14 }
-}
-}
-button .b -font { Helvetica 11 bold }
-set top [GetAbsolutePath ..]
-#set top [GetAbsolutePath /home/gah]
-set trim "$top"
-
-set tree [blt::tree create]    
-
-blt::scrollset .ss \
-    -xscrollbar .ss.hs \
-    -yscrollbar .ss.vs \
-    -window .ss.t 
-
-blt::tk::scrollbar .ss.vs -orient vertical 
-blt::tk::scrollbar .ss.hs -orient horizontal
-
-blt::treeview .ss.t \
-    -width 0 \
-    -height 0 \
-    -highlightthickness 0 \
-    -borderwidth 0 \
-    -selectmode multiple \
-    -separator / \
-    -tree $tree 
-
-.ss.t column configure treeView -text ""  -edit yes
-#file
-.ss.t column insert 0 mtime atime gid 
-.ss.t column insert end nlink mode type ctime uid ino size dev
-.ss.t column configure uid -background \#eaeaff -relief raised 
-.ss.t column configure mtime -hide no -bg \#ffeaea -relief raised
-.ss.t column configure size gid nlink uid ino dev -justify left -edit yes
-.ss.t column configure size type -justify left -edit yes
-.ss.t column configure treeView -hide no -edit yes \
-	-icon ::blt::TreeView::openIcon
-focus .ss.t
-
-
-blt::table . \
-    0,0 .ss  -fill both 
-
-set count 0
-Find $tree root $top
-puts "$count entries"
-
-$tree find root -glob *.c -addtag "c_files"
-$tree find root -glob *.h -addtag "header_files"
-$tree find root -glob *.tcl -addtag "tcl_files"
-
-.ss.t entry configure "c_files" -foreground green4
-.ss.t entry configure "header_files" -foreground cyan4
-.ss.t entry configure "tcl_files" -foreground red4 
-
-.ss.t column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-foreach column [.ss.t column names] {
-    .ss.t column configure $column -command [list SortColumn $column]
-}
-
-#.ss.t style configure text -background #F8fbF8 -selectbackground #D8fbD8 
-
-.ss.t style checkbox check \
-    -onvalue 100 -offvalue "50" \
-    -showvalue yes 
-
-.ss.t style combobox combo -icon ::blt::TreeView::openIcon
-
-.ss.t column configure uid -style combo 
-.ss.t column configure gid -style check
-
-
diff --git a/blt3.0/demos/scrollset4.tcl b/blt3.0/demos/scrollset4.tcl
deleted file mode 100644
index 2cd29c2..0000000
--- a/blt3.0/demos/scrollset4.tcl
+++ /dev/null
@@ -1,59 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-#blt::bltdebug 100
-
-image create picture label1 -file ./images/mini-book1.gif
-image create picture label2 -file ./images/mini-book2.gif
-image create picture testImage -file ./images/txtrflag.gif
-
-blt::scrollset .ss \
-    -xviewcommand { .ss.t view } \
-    -xscrollbar .ss.xsbar \
-    -yscrollbar .ss.ysbar \
-    -window .ss.t 
-
-blt::tk::scrollbar .ss.ysbar -orient vertical 
-blt::tk::scrollbar .ss.xsbar -orient horizontal 
-
-blt::tabset .ss.t \
-    -font { Arial 8 } \
-    -textside right \
-    -tabwidth same \
-    -scrollcommand { .ss set x } \
-    -scrollincrement 1 
-
-blt::table . \
-    .ss 0,0 -fill both 
-
-focus .ss.t
-
-set attributes {
-    graph1 "Graph \#1" pink	
-    graph2 "Graph \#2" lightblue	
-    graph3 "Graph \#3" orange
-    graph5 "Graph \#5" yellow	
-    barchart2 "Barchart \#2" green
-}
-
-foreach { name label color } $attributes {
-    .ss.t insert end $name -text $label 
-}
-
-blt::tk::label .ss.t.l -image testImage
-.ss.t insert end Image -window .ss.t.l
-
-.ss.t focus 0
-
-foreach file { graph1 graph2 graph3 graph5 barchart2 } {
-    namespace eval $file {
-	if { [string match graph* $file] } {
-	    set graph [blt::graph .ss.t.$file]
-	} else {
-	    set graph [blt::barchart .ss.t.$file]
-	}
-	source scripts/$file.tcl
-	.ss.t tab configure $file -window $graph -fill both 
-    }
-}
diff --git a/blt3.0/demos/spline.tcl b/blt3.0/demos/spline.tcl
deleted file mode 100755
index 427c40f..0000000
--- a/blt3.0/demos/spline.tcl
+++ /dev/null
@@ -1,61 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-option add *graph.Element.ScaleSymbols true
-
-# test to show spline over-shooting
-
-set tcl_precision 15
-
-# Make and fill small vectors
-blt::vector x y
-x seq 10 0 -0.5 
-y expr sin(x^3)
-x expr x*x
-x sort y
-blt::vector x2 y1 y2 y3
-
-# make and fill (x only) large vectors
-x populate x2 10
-
-# natural spline interpolation
-blt::spline natural x y x2 y1
-
-# quadratic spline interpolation
-blt::spline quadratic x y x2 y2 
-
-# make plot
-blt::graph .graph 
-.graph xaxis configure -title "x^2" -grid yes 
-.graph yaxis configure -title "sin(y^3)" -grid yes 
-
-.graph pen configure activeLine -pixels 5
-.graph element create Original \
-    -x x -y y \
-    -color red4 \
-    -fill red \
-    -pixels 5 \
-    -symbol circle
-
-.graph element create Natural -x x2 -y y1 \
-    -color green4 \
-    -fill green \
-    -pixels 3 \
-    -symbol triangle
-
-.graph element create Quadratic -x x2 -y y2 \
-    -color blue4 \
-    -fill orange2 \
-    -pixels 3 \
-    -symbol arrow
-
-blt::table . .graph -fill both
-
-Blt_ZoomStack .graph
-Blt_Crosshairs .graph
-Blt_ActiveLegend .graph
-Blt_ClosestPoint .graph
-Blt_PrintKey .graph
-
diff --git a/blt3.0/demos/stripchart1.tcl b/blt3.0/demos/stripchart1.tcl
deleted file mode 100755
index 5cd4c30..0000000
--- a/blt3.0/demos/stripchart1.tcl
+++ /dev/null
@@ -1,407 +0,0 @@
-#!../src/bltwish
-
-lappend auto_path /usr/local/blt/lib/blt3.0
-package require BLT
-source scripts/demo.tcl
-
-# ----------------------------------------------------------------------
-#  EXAMPLE: simple driver for stripchart widget
-# ----------------------------------------------------------------------
-#  Michael J. McLennan
-#  mmclennan at lucent.com
-#  Bell Labs Innovations for Lucent Technologies
-# ======================================================================
-#               Copyright (c) 1996  Lucent Technologies
-# ======================================================================
-
-option add *Axis.tickInterior yes
-option add *Axis.tickDefault 5
-option add *Axis.Grid yes
-option add *Axis.GridColor lightblue
-option add *Legend.Hide yes
-#option add *Axis.GridDashes 0
-option add *bufferElements no
-option add *bufferGraph yes
-option add *symbol triangle
-option add *symbol none
-option add *Axis.lineWidth 1
-#option add *Axis*Rotate 90
-option add *pixels 1.25m
-#option add *PlotPad 25
-option add *Stripchart.width 6i
-option add *Stripchart.height 6i
-#option add *Smooth quadratic
-#option add *x.descending yes
-
-# ----------------------------------------------------------------------
-#  USAGE:  random ?<max>? ?<min>?
-#
-#  Returns a random number in the range <min> to <max>.
-#  If <min> is not specified, the default is 0; if max is not
-#  specified, the default is 1.
-# ----------------------------------------------------------------------
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed 14823
-
-# ----------------------------------------------------------------------
-
-toplevel .addSource
-wm title .addSource "Add Source"
-wm group .addSource .
-wm withdraw .addSource
-wm protocol .addSource WM_DELETE_WINDOW {.addSource.controls.cancel invoke}
-
-frame .addSource.info
-pack .addSource.info -expand yes -fill both -padx 4 -pady 4
-label .addSource.info.namel -text "Name:"
-entry .addSource.info.name
-label .addSource.info.maxl -text "Maximum:"
-entry .addSource.info.max
-label .addSource.info.minl -text "Minimum:"
-entry .addSource.info.min
-blt::table .addSource.info \
-    .addSource.info.namel 0,0 -anchor e \
-    .addSource.info.name 0,1 -fill x \
-    .addSource.info.maxl 1,0 -anchor e \
-    .addSource.info.max 1,1 -fill x \
-    .addSource.info.minl 2,0 -anchor e \
-    .addSource.info.min 2,1 -fill x
-
-frame .addSource.color
-pack .addSource.color -padx 8 -pady 4
-frame .addSource.color.sample \
-    -width 30 -height 30 \
-    -borderwidth 2 -relief raised
-pack .addSource.color.sample -side top -fill both
-scale .addSource.color.r -label "Red" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.r -side left -fill y
-scale .addSource.color.g -label "Green" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.g -side left -fill y
-scale .addSource.color.b -label "Blue" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.b -side left -fill y
-
-proc source_color {args} {
-    set r [expr round(2.55*[.addSource.color.r get])]
-    set g [expr round(2.55*[.addSource.color.g get])]
-    set b [expr round(2.55*[.addSource.color.b get])]
-    set color [format "#%2.2x%2.2x%2.2x" $r $g $b]
-    .addSource.color.sample configure -background $color
-}
-source_color
-
-frame .addSource.sep -borderwidth 1 -height 2 -relief sunken
-pack .addSource.sep -fill x -pady 4
-
-frame .addSource.controls
-pack .addSource.controls -fill x -padx 4 -pady 4
-button .addSource.controls.ok -text "OK" -command {
-    wm withdraw .addSource
-    set name [.addSource.info.name get]
-    set color [.addSource.color.sample cget -background]
-    set max [.addSource.info.max get]
-    set min [.addSource.info.min get]
-    if {[catch {source_create $name $color $min $max} err] != 0} {
-        puts "error: $err"
-    }
-}
-pack .addSource.controls.ok -side left -expand yes -padx 4
-button .addSource.controls.cancel -text "Cancel" -command {
-    wm withdraw .addSource
-}
-pack .addSource.controls.cancel -side left -expand yes -padx 4
-
-set useAxes y
-blt::bitmap define pattern1 { {4 4} {01 02 04 08} }
-
-blt::bitmap define hobbes { {25 25} {
-	00 00 00 00 00 00 00 00 00 c0 03 00 78 e0 07 00 fc f8 07 00 cc 07 04 00
-	0c f0 0b 00 7c 1c 06 00 38 00 00 00 e0 03 10 00 e0 41 11 00 20 40 11 00
-	e0 07 10 00 e0 c1 17 00 10 e0 2f 00 20 e0 6f 00 18 e0 2f 00 20 c6 67 00
-	18 84 2b 00 20 08 64 00 70 f0 13 00 80 01 08 00 00 fe 07 00 00 00 00 00
-	00 00 00 00 }
-}
-
-proc source_create {name color min max} {
-    global sources
-
-    if {[info exists sources($name-controls)]} {
-        error "source \"$name\" already exists"
-    }
-    if {$max <= $min} {
-        error "bad range: $min - $max"
-    }
-
-    set unique 0
-    set win ".sources.nb.s[incr unique]"
-    while {[winfo exists $win]} {
-        set win ".sources.nb.s[incr unique]"
-    }
-
-    set xvname "xvector$unique"
-    set yvname "yvector$unique"
-    set wvname "wvector$unique"
-    global $xvname $yvname $wvname
-    blt::vector $xvname $yvname $wvname
-
-    if {$xvname == "xvector1"} {
-        $xvname append 0
-    } else {
-	xvector1 variable thisVec
-        $xvname append $thisVec(end)
-    }
-    $yvname append [random $max $min]
-    $wvname append 0
-    
-    catch {.sc element delete $name}
-    set bg [blt::bgpattern create solid -opacity 50 -color $color] 
-    .sc element create $name \
-        -areabackground $bg \
-	-x $xvname \
-	-y $yvname \
-	-color $color 
-    if { $name != "default" } {
-	.sc axis create $name \
-	    -loose no \
-	    -title $name \
-	    -grid yes \
-	    -rotate 0 \
-	    -limitscolor $color \
-	    -limitsformat "%4.4g" \
-	    -titlecolor ${color}
-	.sc element configure $name -mapy $name
-	global useAxes
-	lappend useAxes $name
-	set count 0
-if 0 {
-	set yUse $useAxes
-	set y2Use {}
-	foreach axis $useAxes {
-	    if { $count & 1 } {
-		lappend yUse $axis
-		.sc axis configure $axis -rotate 90
-	    } else {
-		lappend y2Use $axis
-		.sc axis configure $axis -rotate -90
-	    }
-	    incr count
-	}
-	.sc y2axis use $y2Use
-	.sc yaxis use $yUse
-} else {
-        .sc y2axis use $useAxes
-}
-    }
-    set cwin .sources.choices.rb$unique
-    radiobutton $cwin -text $name \
-        -variable choices -value $win -command "
-            foreach w \[pack slaves .sources.nb\] {
-                pack forget \$w
-            }
-            pack $win -fill both
-        "
-    pack $cwin -anchor w
-
-    frame $win
-    pack $win -fill x
-    label $win.limsl -text "Limits:"
-    entry $win.lims
-    bind $win.lims <KeyPress-Return> "
-        .sc yaxis configure -limits {%%g}
-    "
-    label $win.smoothl -text "Smooth:"
-    frame $win.smooth
-    radiobutton $win.smooth.linear -text "Linear" \
-        -variable smooth -value linear -command "
-            .sc element configure $name -smooth linear
-        "
-    pack $win.smooth.linear -side left
-    radiobutton $win.smooth.step -text "Step" \
-        -variable smooth -value step -command "
-            .sc element configure $name -smooth step
-        "
-    pack $win.smooth.step -side left
-    radiobutton $win.smooth.natural -text "Natural" \
-        -variable smooth -value natural -command "
-            .sc element configure $name -smooth natural
-        "
-    pack $win.smooth.natural -side left
-    label $win.ratel -text "Sampling Rate:"
-    scale $win.rate -orient horizontal -from 10 -to 1000
-
-    blt::table $win \
-        $win.smoothl 0,0 -anchor e \
-        $win.smooth 0,1 -fill x -padx 4 \
-        $win.limsl 1,0 -anchor e \
-        $win.lims 1,1 -fill x -padx 4 \
-        $win.ratel 2,0 -anchor e \
-        $win.rate 2,1 -fill x -padx 2
-
-    if {$unique != 1} {
-        button $win.del -text "Delete" -command [list source_delete $name]
-        pack $win.del -anchor w
-        blt::table $win $win.del 3,1 -anchor e -padx 4 -pady 4
-    }
-
-    $win.rate set 200
-    catch {$win.smooth.[.sc element cget $name -smooth] invoke} mesg
-
-    set sources($name-choice) $cwin
-    set sources($name-controls) $win
-    set sources($name-stream) [after 10 [list source_event $name 10]]
-    set sources($name-x) $xvname
-    set sources($name-y) $yvname
-    set sources($name-w) $wvname
-    set sources($name-max) $max
-    set sources($name-min) $min
-    set sources($name-steady) [random $max $min]
-
-    $cwin invoke
-}
-
-proc source_delete {name} {
-    global sources
-
-    after cancel $sources($name-stream)
-    destroy $sources($name-choice)
-    destroy $sources($name-controls)
-    unset sources($name-controls)
-
-    set first [lindex [pack slaves .sources.choices] 0]
-    $first invoke
-}
-
-proc source_event {name delay} {
-    global sources
-
-    set xv $sources($name-x)
-    set yv $sources($name-y)
-    set wv $sources($name-w)
-    global $xv $yv $wv
-
-    $xv variable x
-    set x(++end) [expr $x(end) + 0.001 * $delay]
-
-    $yv variable y
-    if {[random] > 0.97} {
-        set y(++end) [random $sources($name-max) $sources($name-min)]
-    } else {
-        set y(++end) [expr $y(end)+0.1*($sources($name-steady)-$y(end))]
-    }
-    set val [random]
-    if {$val > 0.95} {
-        $wv append 2
-    } elseif {$val > 0.8} {
-        $wv append 1
-    } else {
-        $wv append 0
-    }
-    #$wv notify now
-    if { [$xv length] > 1000 } {
-	$xv delete 0
-	$yv delete 0
-	$wv delete 0
-    }
-    update
-    set win $sources($name-controls)
-    set delay [$win.rate get]
-    set sources($name-stream) [after $delay [list source_event $name $delay]]
-}
-
-# ----------------------------------------------------------------------
-frame .mbar -borderwidth 2 -relief raised
-pack .mbar -fill x
-
-menubutton .mbar.main -text "Main" -menu .mbar.main.m
-pack .mbar.main -side left -padx 4
-menu .mbar.main.m
-.mbar.main.m add command -label "Add Source..." -command {
-    set x [expr [winfo rootx .]+50]
-    set y [expr [winfo rooty .]+50]
-    wm geometry .addSource +$x+$y
-    wm deiconify .addSource
-}
-.mbar.main.m add separator
-.mbar.main.m add command -label "Quit" -command exit
-
-menubutton .mbar.prefs -text "Preferences" -menu .mbar.prefs.m
-pack .mbar.prefs -side left -padx 4
-
-menu .mbar.prefs.m
-.mbar.prefs.m add cascade -label "Warning Symbol" -menu .mbar.prefs.m.wm
-menu .mbar.prefs.m.wm
-.mbar.prefs.m add cascade -label "Error Symbol" -menu .mbar.prefs.m.em
-menu .mbar.prefs.m.em
-
-foreach sym {square circle diamond plus cross triangle} {
-    .mbar.prefs.m.wm add radiobutton -label $sym \
-        -variable warningsym -value $sym \
-        -command {.sc pen configure "warning" -symbol $warningsym}
-
-    .mbar.prefs.m.em add radiobutton -label $sym \
-        -variable errorsym -value $sym \
-        -command {.sc pen configure "error" -symbol $errorsym}
-}
-catch {.mbar.prefs.m.wm invoke "circle"}
-catch {.mbar.prefs.m.em invoke "cross"}
-
-# ----------------------------------------------------------------------
-blt::stripchart .sc -title ""  -stackaxes yes -invert no \
-    -bufferelements no
-pack .sc -expand yes -fill both
-
-.sc xaxis configure -title "Time (s)" -autorange 20.0 -shiftby 0.5
-.sc yaxis configure -title "Samples"
-
-frame .sources
-frame .sources.nb -borderwidth 2 -relief sunken
-label .sources.title -text "Sources:"
-frame .sources.choices -borderwidth 2 -relief groove
-
-if 0 {
-pack .sources -fill x -padx 10 -pady 4
-pack .sources.nb -side right -expand yes -fill both -padx 4 -pady 4
-pack .sources.title -side top -anchor w -padx 4
-pack .sources.choices -expand yes -fill both -padx 4 -pady 4
-}
-
-
-source_create default red 0 10
-source_create temp blue3 0 10
-source_create pressure green3 0 200
-source_create volume orange3 0 1020
-source_create power yellow3 0 0.01999
-source_create work magenta3 0 10
-
-Blt_ZoomStack .sc
-
-.sc axis bind all <Enter> {
-    %W axis activate [%W axis get current]
-}
-.sc axis bind all <Leave> {
-    %W axis deactivate [%W axis get current]
-}
-
-.sc axis bind Y <ButtonPress-1> {
-   set axis [%W axis get current] 
-   %W axis configure $axis -logscale yes
-}
-
-.sc axis bind Y <ButtonPress-3> {
-   set axis [%W axis get current] 
-   %W axis configure $axis -logscale no
-}
-
-after 5000 {
-  puts stderr "printing stripchart"
-  .sc postscript output sc.ps
-} 
diff --git a/blt3.0/demos/stripchart2.tcl b/blt3.0/demos/stripchart2.tcl
deleted file mode 100755
index 586c9a8..0000000
--- a/blt3.0/demos/stripchart2.tcl
+++ /dev/null
@@ -1,397 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-# ----------------------------------------------------------------------
-#  EXAMPLE: simple driver for stripchart widget
-# ----------------------------------------------------------------------
-#  Michael J. McLennan
-#  mmclennan at lucent.com
-#  Bell Labs Innovations for Lucent Technologies
-# ======================================================================
-#               Copyright (c) 1996  Lucent Technologies
-# ======================================================================
-
-#option add *x.range 20.0
-option add *Axis.tickDefault 4
-option add *Axis.tickLength 5
-option add *Axis.tickInterior yes
-option add *Axis.GridLines yes
-#option add *x.shiftBy 15.0
-option add *bufferElements no
-option add *bufferGraph no
-option add *symbol triangle
-option add *Axis.lineWidth 1
-#option add *Axis*Rotate 90
-option add *pixels 1.25m
-#option add *PlotPad 25
-option add *Stripchart.width 6i
-#option add *Smooth quadratic
-#option add *Stripchart.invertXY yes
-#option add *x.descending yes
-
-# ----------------------------------------------------------------------
-#  USAGE:  random ?<max>? ?<min>?
-#
-#  Returns a random number in the range <min> to <max>.
-#  If <min> is not specified, the default is 0; if max is not
-#  specified, the default is 1.
-# ----------------------------------------------------------------------
-
-proc random {{max 1.0} {min 0.0}} {
-    global randomSeed
-
-    set randomSeed [expr (7141*$randomSeed+54773) % 259200]
-    set num  [expr $randomSeed/259200.0*($max-$min)+$min]
-    return $num
-}
-set randomSeed 14823
-
-# ----------------------------------------------------------------------
-
-toplevel .addSource
-wm title .addSource "Add Source"
-wm group .addSource .
-wm withdraw .addSource
-wm protocol .addSource WM_DELETE_WINDOW {.addSource.controls.cancel invoke}
-
-frame .addSource.info
-pack .addSource.info -expand yes -fill both -padx 4 -pady 4
-label .addSource.info.namel -text "Name:"
-entry .addSource.info.name
-label .addSource.info.maxl -text "Maximum:"
-entry .addSource.info.max
-label .addSource.info.minl -text "Minimum:"
-entry .addSource.info.min
-blt::table .addSource.info \
-    .addSource.info.namel 0,0 -anchor e \
-    .addSource.info.name 0,1 -fill x \
-    .addSource.info.maxl 1,0 -anchor e \
-    .addSource.info.max 1,1 -fill x \
-    .addSource.info.minl 2,0 -anchor e \
-    .addSource.info.min 2,1 -fill x
-
-frame .addSource.color
-pack .addSource.color -padx 8 -pady 4
-frame .addSource.color.sample \
-    -width 30 -height 30 \
-    -borderwidth 2 -relief raised
-pack .addSource.color.sample -side top -fill both
-scale .addSource.color.r -label "Red" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.r -side left -fill y
-scale .addSource.color.g -label "Green" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.g -side left -fill y
-scale .addSource.color.b -label "Blue" -orient vertical \
-    -from 100 -to 0 -command source_color
-pack .addSource.color.b -side left -fill y
-
-proc source_color {args} {
-    set r [expr round(2.55*[.addSource.color.r get])]
-    set g [expr round(2.55*[.addSource.color.g get])]
-    set b [expr round(2.55*[.addSource.color.b get])]
-    set color [format "#%2.2x%2.2x%2.2x" $r $g $b]
-    .addSource.color.sample configure -background $color
-}
-source_color
-
-frame .addSource.sep -borderwidth 1 -height 2 -relief sunken
-pack .addSource.sep -fill x -pady 4
-
-frame .addSource.controls
-pack .addSource.controls -fill x -padx 4 -pady 4
-button .addSource.controls.ok -text "OK" -command {
-    wm withdraw .addSource
-    set name [.addSource.info.name get]
-    set color [.addSource.color.sample cget -background]
-    set max [.addSource.info.max get]
-    set min [.addSource.info.min get]
-    if {[catch {source_create $name $color $min $max} err] != 0} {
-        puts "error: $err"
-    }
-}
-pack .addSource.controls.ok -side left -expand yes -padx 4
-button .addSource.controls.cancel -text "Cancel" -command {
-    wm withdraw .addSource
-}
-pack .addSource.controls.cancel -side left -expand yes -padx 4
-
-set useAxes y
-
-proc source_create {name color min max} {
-    global sources
-
-    if {[info exists sources($name-controls)]} {
-        error "source \"$name\" already exists"
-    }
-    if {$max <= $min} {
-        error "bad range: $min - $max"
-    }
-
-    set unique 0
-    set win ".sources.nb.s[incr unique]"
-    while {[winfo exists $win]} {
-        set win ".sources.nb.s[incr unique]"
-    }
-
-    set xvname "xvector$unique"
-    set yvname "yvector$unique"
-    set wvname "wvector$unique"
-    global $xvname $yvname $wvname
-    blt::vector $xvname $yvname $wvname
-
-    if {$xvname == "xvector1"} {
-        $xvname append 0
-    } else {
-	xvector1 variable thisVec
-        $xvname append $thisVec(end)
-    }
-    $yvname append [random $max $min]
-    $wvname append 0
-    
-    blt::bitmap define pattern1 { {4 4} {01 02 04 08} }
-    catch {.sc element delete $name}
-    #set style [blt::bgpattern create solid -bg $color -opacity 90.0]
-    .sc bar create $name \
-	-x $xvname \
-	-y $yvname \
-	-outline $color -fill $color 
-    if { $name != "default" } {
-	.sc axis create $name \
-	    -loose yes \
-	    -title $name \
-	    -grid yes \
-	    -rotate 0 \
-	    -limitscolor $color \
-	    -limitsformat "%4.4g" \
-	    -titlecolor ${color}
-	.sc element configure $name -mapy $name
-	global useAxes
-	lappend useAxes $name
-	set count 0
-if 0 {
-	set yUse $useAxes
-	set y2Use {}
-	foreach axis $useAxes {
-	    if { $count & 1 } {
-		lappend yUse $axis
-		.sc axis configure $axis -rotate 90
-	    } else {
-		lappend y2Use $axis
-		.sc axis configure $axis -rotate -90
-	    }
-	    incr count
-	}
-	.sc y2axis use $y2Use
-	.sc yaxis use $yUse
-} else {
-    .sc yaxis use $useAxes
-    #.sc yaxis use $useAxes
-}
-    }
-    set cwin .sources.choices.rb$unique
-    radiobutton $cwin -text $name \
-        -variable choices -value $win -command "
-            foreach w \[pack slaves .sources.nb\] {
-                pack forget \$w
-            }
-            pack $win -fill both
-        "
-    pack $cwin -anchor w
-
-    frame $win
-    pack $win -fill x
-    label $win.limsl -text "Limits:"
-    entry $win.lims
-    bind $win.lims <KeyPress-Return> "
-        .sc yaxis configure -limits {%%g}
-    "
-    label $win.smoothl -text "Smooth:"
-    frame $win.smooth
-    radiobutton $win.smooth.linear -text "Linear" \
-        -variable smooth -value linear -command "
-            .sc element configure $name -smooth linear
-        "
-    pack $win.smooth.linear -side left
-    radiobutton $win.smooth.step -text "Step" \
-        -variable smooth -value step -command "
-            .sc element configure $name -smooth step
-        "
-    pack $win.smooth.step -side left
-    radiobutton $win.smooth.natural -text "Natural" \
-        -variable smooth -value natural -command "
-            .sc element configure $name -smooth natural
-        "
-    pack $win.smooth.natural -side left
-    label $win.ratel -text "Sampling Rate:"
-    scale $win.rate -orient horizontal -from 10 -to 1000
-
-    blt::table $win \
-        $win.smoothl 0,0 -anchor e \
-        $win.smooth 0,1 -fill x -padx 4 \
-        $win.limsl 1,0 -anchor e \
-        $win.lims 1,1 -fill x -padx 4 \
-        $win.ratel 2,0 -anchor e \
-        $win.rate 2,1 -fill x -padx 2
-
-    if {$unique != 1} {
-        button $win.del -text "Delete" -command [list source_delete $name]
-        pack $win.del -anchor w
-        blt::table $win $win.del 3,1 -anchor e -padx 4 -pady 4
-    }
-
-    $win.rate set 1000
-    catch {$win.smooth.[.sc element cget $name -smooth] invoke} mesg
-
-    set sources($name-choice) $cwin
-    set sources($name-controls) $win
-    set sources($name-stream) [after 100 [list source_event $name 10]]
-    set sources($name-x) $xvname
-    set sources($name-y) $yvname
-    set sources($name-w) $wvname
-    set sources($name-max) $max
-    set sources($name-min) $min
-    set sources($name-steady) [random $max $min]
-
-    $cwin invoke
-}
-
-proc source_delete {name} {
-    global sources
-
-    after cancel $sources($name-stream)
-    destroy $sources($name-choice)
-    destroy $sources($name-controls)
-    unset sources($name-controls)
-
-    set first [lindex [pack slaves .sources.choices] 0]
-    $first invoke
-}
-
-proc source_event {name delay} {
-    global sources
-
-    set xv $sources($name-x)
-    set yv $sources($name-y)
-    set wv $sources($name-w)
-    global $xv $yv $wv
-
-    $xv variable x
-#    set x(++end) [expr $x(end) + 0.001 * $delay]
-    set x(++end) [expr round($x(end) + 1)]
-
-    $yv variable y
-    if {[random] > 0.97} {
-        set y(++end) [random $sources($name-max) $sources($name-min)]
-    } else {
-        set y(++end) [expr $y(end)+0.1*($sources($name-steady)-$y(end))]
-    }
-    set val [random]
-    if {$val > 0.95} {
-        $wv append 2
-    } elseif {$val > 0.8} {
-        $wv append 1
-    } else {
-        $wv append 0
-    }
-    #$wv notify now
-    if { [$xv length] > 100 } {
-	$xv delete 0
-	$yv delete 0
-	$wv delete 0
-    }
-    update
-    set win $sources($name-controls)
-    set delay [$win.rate get]
-    set sources($name-stream) [after $delay [list source_event $name $delay]]
-}
-
-# ----------------------------------------------------------------------
-frame .mbar -borderwidth 2 -relief raised
-pack .mbar -fill x
-
-menubutton .mbar.main -text "Main" -menu .mbar.main.m
-pack .mbar.main -side left -padx 4
-menu .mbar.main.m
-.mbar.main.m add command -label "Add Source..." -command {
-    set x [expr [winfo rootx .]+50]
-    set y [expr [winfo rooty .]+50]
-    wm geometry .addSource +$x+$y
-    wm deiconify .addSource
-}
-.mbar.main.m add separator
-.mbar.main.m add command -label "Quit" -command exit
-
-menubutton .mbar.prefs -text "Preferences" -menu .mbar.prefs.m
-pack .mbar.prefs -side left -padx 4
-
-menu .mbar.prefs.m
-.mbar.prefs.m add cascade -label "Warning Symbol" -menu .mbar.prefs.m.wm
-menu .mbar.prefs.m.wm
-.mbar.prefs.m add cascade -label "Error Symbol" -menu .mbar.prefs.m.em
-menu .mbar.prefs.m.em
-
-foreach sym {square circle diamond plus cross triangle} {
-    .mbar.prefs.m.wm add radiobutton -label $sym \
-        -variable warningsym -value $sym \
-        -command {.sc pen configure "warning" -symbol $warningsym}
-
-    .mbar.prefs.m.em add radiobutton -label $sym \
-        -variable errorsym -value $sym \
-        -command {.sc pen configure "error" -symbol $errorsym}
-}
-catch {.mbar.prefs.m.wm invoke "circle"}
-catch {.mbar.prefs.m.em invoke "cross"}
-
-# ----------------------------------------------------------------------
-blt::stripchart .sc -title "Stripchart"  -stackaxes yes -invert no \
- 	-bufferelements no -buffergraph no 
-pack .sc -expand yes -fill both
-
-.sc xaxis configure -title "Time (s)" -autorange 20.0 -shiftby 15
-.sc yaxis configure -title "Samples"
-
-frame .sources
-frame .sources.nb -borderwidth 2 -relief sunken
-label .sources.title -text "Sources:"
-frame .sources.choices -borderwidth 2 -relief groove
-
-if 0 {
-pack .sources -fill x -padx 10 -pady 4
-pack .sources.nb -side right -expand yes -fill both -padx 4 -pady 4
-pack .sources.title -side top -anchor w -padx 4
-pack .sources.choices -expand yes -fill both -padx 4 -pady 4
-}
-
-source_create default red 0 10
-source_create temp blue3 0 10
-source_create pressure green3 0 200
-source_create volume orange3 0 1020
-source_create power purple 0 0.01999
-source_create work magenta3 0 10
-
-Blt_ZoomStack .sc
-
-.sc axis bind all <Enter> {
-    %W axis activate [%W axis get current]
-}
-.sc axis bind all <Leave> {
-    %W axis deactivate [%W axis get current]
-}
-
-.sc axis bind Y <ButtonPress-1> {
-   set axis [%W axis get current] 
-   %W axis configure $axis -logscale yes
-}
-
-.sc axis bind Y <ButtonPress-3> {
-   set axis [%W axis get current] 
-   %W axis configure $axis -logscale no
-}
-
-after 5000 {
-   puts stderr "printing stripchart"
-   .sc postscript output sc.ps
-}
diff --git a/blt3.0/demos/tabnotebook1.tcl b/blt3.0/demos/tabnotebook1.tcl
deleted file mode 100755
index 9cd1719..0000000
--- a/blt3.0/demos/tabnotebook1.tcl
+++ /dev/null
@@ -1,64 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-# Create a tabset widget.  
-
-blt::tabset .ts -bg blue -outerpad 0 \
-    -highlightthickness 0 -bd 0 -gap 2 -justify left -tabwidth same
-
-# The tabset is initially empty.  Insert tabs (pages) into the tabset.  
-
-foreach label { First Second Third Fourth } {
-    .ts insert end -text $label
-}
-
-# Tabs are referred to by their index.  Tab indices can be one of the 
-# following:
-#
-#	 number		Position of tab the tabset's list of tabs.
-# 	 @x,y		Tab closest to the specified X-Y screen coordinates.
-# 	 "active"	Tab currently under the mouse pointer.
-# 	 "focus"	Tab that has focus.  
-# 	 "select"	The currently selected tab.
-# 	 "right"	Next tab from "focus".
-# 	 "left"		Previous tab from "focus".
-# 	 "up"		Next tab from "focus".
-# 	 "down"		Previous tab from "focus".
-# 	 "end"		Last tab in list.
-#	 string		Tab identifier.  The "insert" operation returns 
-#			a unique identifier for the new tab (e.g. "tab0").  
-#			This ID is valid for the life of the tab, even if
-#			the tabs are moved or reordered.  
-
-# Each tab has a text label and an optional Tk image.
-
-set image [image create picture -file ./images/mini-book1.gif]
-.ts tab configure 0 -image $image
-
-#
-# How to embed a widget into a page.  
-#
-
-# 1. The widget must be a child of the tabset.
-
-set image [image create picture -file ./images/blt98.gif]
-label .ts.label -image $image -relief sunken -bd 2
-
-# 2. Use the -window option to embed the widget.
-
-#.ts tab configure 0 -window .ts.label
-
-# The tearoff perforation, displayed on the selected tab, is
-# controlled by the tabset's -tearoff option.  
-#
-# If you don't want tearoff pages, configure -tearoff to "no".
-
-.ts configure -tearoff yes
-
-blt::table . \
-    0,0 .ts -fill both 
-
-focus .ts
-
diff --git a/blt3.0/demos/tabnotebook2.tcl b/blt3.0/demos/tabnotebook2.tcl
deleted file mode 100755
index 9fca1e5..0000000
--- a/blt3.0/demos/tabnotebook2.tcl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-image create picture bgTile -file ./images/smblue_rock.gif
-image create picture label1 -file ./images/mini-book1.gif
-image create picture label2 -file ./images/mini-book2.gif
-image create picture testImage -file ./images/txtrflag.gif
-
-scrollbar .s -command { .t view } -orient horizontal
-blt::tabset .t \
-    -outerborderwidth 2 \
-    -outerrelief sunken \
-    -tabwidth same \
-    -scrollcommand { .s set } \
-    -slant right \
-    -textside right \
-    -tiers 2 
-
-label .t.l -image testImage
-
-set attributes {
-    graph1 "Graph \#1" red	.t.graph1  
-    graph2 "Graph \#2" green	.t.graph2  
-    graph3 "Graph \#3" cyan	.t.graph3  
-    graph5 "Graph \#5" yellow	.t.graph5  
-    graph6 one		orange	.t.l       
-}
-
-foreach { entry label color window } $attributes {
-    .t insert end -text $label -fill both 
-}
-
-foreach label { there bunky another test of a widget } {
-    set id [.t insert end -text $label]
-}
-
-set img [image create picture -file ./images/blt98.gif]
-.t tab configure $id -image label2 
-
-blt::table . \
-    .t 0,0 -fill both \
-    .s 1,0 -fill x 
-
-blt::table configure . r1 -resize none
-
-set index 0
-foreach file { graph1 graph2 graph3 graph5 } {
-    namespace eval $file {
-	set graph [blt::graph .t.$file]
-	source scripts/$file.tcl
-	.t tab configure $index -window $graph
-	incr index
-    }
-}
-
diff --git a/blt3.0/demos/tabnotebook3.tcl b/blt3.0/demos/tabnotebook3.tcl
deleted file mode 100755
index f05b7e0..0000000
--- a/blt3.0/demos/tabnotebook3.tcl
+++ /dev/null
@@ -1,542 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-#blt::bltdebug 100
-
-image create picture label1 -file checkon.png
-image create picture label2 -file ./images/mini-book2.gif
-image create picture testImage -file ./images/txtrflag.gif
-
-blt::tabset .ts \
-    -scrollcommand { .s set } \
-    -scrollincrement 1 
-
-label .ts.l -image testImage
-
-set attributes {
-    "Graph \#1" pink	
-    "Graph \#2" lightblue	
-    "Graph \#3" orange
-    "Graph \#5" yellow	
-    "Barchart \#2" green
-}
-
-foreach { label color } $attributes {
-    .ts insert end $label \
-	-selectbackground ${color}3  \
-	-background ${color}3 \
-	-activebackground ${color}2
-}
-
-.ts insert end -selectbackground salmon2 -background salmon3 \
-    -selectbackground salmon3 -activebackground salmon2 -window .ts.l
-
-set tabLabels { 
-    Aarhus Aaron Ababa aback abaft abandon abandoned abandoning
-    abandonment abandons abase abased abasement abasements abases
-    abash abashed abashes abashing abasing abate abated abatement
-    abatements abater abates abating Abba abbe abbey abbeys abbot
-    abbots Abbott abbreviate abbreviated abbreviates abbreviating
-    abbreviation abbreviations Abby abdomen abdomens abdominal
-    abduct abducted abduction abductions abductor abductors abducts
-    Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant
-    aberration aberrations abet abets abetted abetter abetting
-    abeyance abhor abhorred abhorrent abhorrer abhorring abhors
-    abide abided abides abiding Abidjan Abigail Abilene abilities
-    ability abject abjection abjections abjectly abjectness abjure
-    abjured abjures abjuring ablate ablated ablates ablating
-    ablation ablative ablaze able abler ablest ably Abner abnormal
-    abnormalities abnormality abnormally Abo aboard abode abodes
-    abolish abolished abolisher abolishers abolishes abolishing
-    abolishment abolishments abolition abolitionist abolitionists
-    abominable abominate aboriginal aborigine aborigines abort
-    aborted aborting abortion abortions abortive abortively aborts
-    Abos abound abounded abounding abounds about above aboveboard
-    aboveground abovementioned abrade abraded abrades abrading
-    Abraham Abram Abrams Abramson abrasion abrasions abrasive
-    abreaction abreactions abreast abridge abridged abridges
-    abridging abridgment abroad abrogate abrogated abrogates
-    abrogating abrupt abruptly abruptness abscess abscessed
-    abscesses abscissa abscissas abscond absconded absconding
-    absconds absence absences absent absented absentee
-    absenteeism absentees absentia absenting absently absentminded
-    absents absinthe absolute absolutely absoluteness absolutes
-    absolution absolve absolved absolves absolving absorb
-    absorbed absorbency absorbent absorber absorbing absorbs
-    absorption absorptions absorptive abstain abstained abstainer
-    abstaining abstains abstention abstentions abstinence
-    abstract abstracted abstracting abstraction abstractionism
-    abstractionist abstractions abstractly abstractness
-    abstractor abstractors abstracts abstruse abstruseness
-    absurd absurdities absurdity absurdly Abu abundance abundant
-    abundantly abuse abused abuses abusing abusive abut abutment
-    abuts abutted abutter abutters abutting abysmal abysmally
-    abyss abysses Abyssinia Abyssinian Abyssinians acacia
-    academia academic academically academics academies academy
-    Acadia Acapulco accede acceded accedes accelerate accelerated
-    accelerates accelerating acceleration accelerations
-    accelerator accelerators accelerometer accelerometers accent
-    accented accenting accents accentual accentuate accentuated
-    accentuates accentuating accentuation accept acceptability
-    acceptable acceptably acceptance acceptances accepted
-    accepter accepters accepting acceptor acceptors accepts
-    access accessed accesses accessibility accessible accessibly
-    accessing accession accessions accessories accessors
-    accessory accident accidental accidentally accidently
-    accidents acclaim acclaimed acclaiming acclaims acclamation
-    acclimate acclimated acclimates acclimating acclimatization
-    acclimatized accolade accolades accommodate accommodated
-    accommodates accommodating accommodation accommodations
-    accompanied accompanies accompaniment accompaniments
-    accompanist accompanists accompany accompanying accomplice
-    accomplices accomplish accomplished accomplisher accomplishers
-    accomplishes accomplishing accomplishment accomplishments
-    accord accordance accorded accorder accorders according
-    accordingly accordion accordions accords accost accosted
-    accosting accosts account accountability accountable accountably
-    accountancy accountant accountants accounted accounting
-    accounts Accra accredit accreditation accreditations
-    accredited accretion accretions accrue accrued accrues
-    accruing acculturate acculturated acculturates acculturating
-    acculturation accumulate accumulated accumulates accumulating
-    accumulation accumulations accumulator accumulators
-    accuracies accuracy accurate accurately accurateness accursed
-    accusal accusation accusations accusative accuse accused
-    accuser accuses accusing accusingly accustom accustomed
-    accustoming accustoms ace aces acetate acetone acetylene
-    Achaean Achaeans ache ached aches achievable achieve achieved
-    achievement achievements achiever achievers achieves achieving
-    Achilles aching acid acidic acidities acidity acidly acids
-    acidulous Ackerman Ackley acknowledge acknowledgeable
-    acknowledged acknowledgement acknowledgements acknowledger
-    acknowledgers acknowledges acknowledging acknowledgment
-    acknowledgments acme acne acolyte acolytes acorn acorns
-    acoustic acoustical acoustically acoustician acoustics
-    acquaint acquaintance acquaintances acquainted acquainting
-    acquaints acquiesce acquiesced acquiescence acquiescent
-    acquiesces acquiescing acquirable acquire acquired acquires
-    acquiring acquisition acquisitions
-}
-
-foreach label $tabLabels {
-    .ts insert end $label -image label1 
-}
-
-blt::tk::scrollbar .s -command { .ts view } -orient horizontal -borderwidth 1
-blt::tk::label .side_l -text "-side" 
-blt::combobutton .side -textvariable text(-side) -menu .side.m
-blt::combomenu .side.m -textvariable text(-side)
-array set side2rotate {
-    top 0
-    bottom 0
-    left 90
-    right 270
-}
-.side.m add -type radiobutton -text [.ts cget -side] 
-.side.m add -type separator
-.side.m add -type radiobutton -text "top" 
-.side.m add -type radiobutton -text "bottom" 
-.side.m add -type radiobutton -text "left" 
-.side.m add -type radiobutton -text "right" 
-.side.m item configure all -variable config(-side) \
-    -command { .ts configure -side $config(-side) -rotate $side2rotate($config(-side)) }
-.side.m select 0
-
-blt::tk::label .txside_l -text "-textside" 
-blt::combobutton .txside -textvariable text(-textside) -menu .txside.m 
-blt::combomenu .txside.m -textvariable text(-textside)
-.txside.m add -type radiobutton -text [.ts cget -textside]
-.txside.m add -type separator
-.txside.m add -type radiobutton -text "right" 
-.txside.m add -type radiobutton -text "left"  
-.txside.m add -type radiobutton -text "bottom"
-.txside.m add -type radiobutton -text "top"   
-.txside.m item configure all -variable config(-textside) \
-    -command { .ts configure -textside $config(-textside) } 
-.txside.m select 0
-
-blt::tk::label .slant_l -text "-slant" 
-blt::combobutton .slant -textvariable text(-slant) -menu .slant.m 
-blt::combomenu .slant.m -textvariable text(-slant)
-.slant.m add -type radiobutton -text [.ts cget -slant]
-.slant.m add -type separator
-.slant.m add -type radiobutton -text "none" 
-.slant.m add -type radiobutton -text "left"
-.slant.m add -type radiobutton -text "right"
-.slant.m add -type radiobutton -text "both"
-.slant.m item configure all -variable config(-slant) \
-    -command { .ts configure -slant $config(-slant) }
-.slant.m select 0
-    
-blt::tk::label .rotate_l -text "-rotate"
-blt::combobutton .rotate -textvariable rotatelabel  -menu .rotate.m 
-blt::combomenu .rotate.m -textvariable rotatelabel
-.rotate.m add -type radiobutton -text [.ts cget -rotate]
-.rotate.m add -type separator
-.rotate.m add -type radiobutton -text "0" 
-.rotate.m add -type radiobutton -text "90" 
-.rotate.m add -type radiobutton -text "180" 
-.rotate.m add -type radiobutton -text "270" 
-.rotate.m add -type radiobutton -text "30" 
-.rotate.m item configure all -variable rotate \
-    -command { .ts configure -rotate $rotate }
-.rotate.m select 0
-
-blt::tk::label .tiers_l -text "-tiers"
-blt::combobutton .tiers -textvariable text(-tiers) -menu .tiers.m 
-blt::combomenu .tiers.m -textvariable text(-tiers)
-.tiers.m add -type radiobutton -text [.ts cget -tiers]
-.tiers.m add -type separator
-.tiers.m add -type radiobutton -text "1"
-.tiers.m add -type radiobutton -text "2"
-.tiers.m add -type radiobutton -text "3"
-.tiers.m add -type radiobutton -text "4" 
-.tiers.m add -type radiobutton -text "5"
-.tiers.m add -type radiobutton -text "10" 
-.tiers.m item configure all -variable tiers \
-    -command { .ts configure -tiers $tiers }
-.tiers.m select 0
-
-blt::tk::label .tabwidth_l -text "-tabwidth"
-blt::combobutton .tabwidth -textvariable text(-tabwidth) -menu .tabwidth.m 
-blt::combomenu .tabwidth.m -textvariable text(-tabwidth)
-.tabwidth.m add -type radiobutton -text [.ts cget -tabwidth]
-.tabwidth.m add -type separator
-.tabwidth.m add -type radiobutton -text "variable" 
-.tabwidth.m add -type radiobutton -text "same"
-.tabwidth.m add -type radiobutton -text ".5 inch" -value "0.5i" 
-.tabwidth.m add -type radiobutton -text "1 inch" -value "1i" 
-.tabwidth.m add -type radiobutton -text "2 inch" -value "2i" 
-.tabwidth.m item configure all -variable config(-tabwidth) \
-    -command { .ts configure -tabwidth $config(-tabwidth) }
-.tabwidth.m select 0
-
-blt::tk::label .justify_l -text "-justify" 
-blt::combobutton .justify -textvariable text(-justify) -menu .justify.m 
-blt::combomenu .justify.m -textvariable text(-justify)
-.justify.m add -type radiobutton -text [.ts cget -justify]
-.justify.m add -type separator
-.justify.m add -type radiobutton -text "left" 
-.justify.m add -type radiobutton -text "center"
-.justify.m add -type radiobutton -text "right"
-.justify.m item configure all -variable config(-justify) \
-    -command { .ts configure -justify $config(-justify) }
-.justify.m select 0
-
-blt::tk::label .tearoff_l -text "-tearoff" 
-blt::combobutton .tearoff -textvariable text(-tearoff) -menu .tearoff.m 
-blt::combomenu .tearoff.m -textvariable text(-tearoff)
-.tearoff.m add -type radiobutton -text [.ts cget -tearoff]
-.tearoff.m add -type separator
-.tearoff.m add -type radiobutton -text "No" -value "0" 
-.tearoff.m add -type radiobutton -text "Yes" -value "1" 
-.tearoff.m item configure all -variable config(-tearoff) \
-    -command { .ts configure -tearoff $config(-tearoff) }
-.tearoff.m select 0
-
-blt::tk::label .highlightthickness_l -text "-highlightthickness" 
-blt::combobutton .highlightthickness -textvariable text(-highlightthickness) \
-    -menu .highlightthickness.m 
-blt::combomenu .highlightthickness.m -textvariable text(-highlightthickness)
-.highlightthickness.m add -type radiobutton -text [.ts cget -highlightthickness]
-.highlightthickness.m add -type separator
-.highlightthickness.m add -type radiobutton -text "0" 
-.highlightthickness.m add -type radiobutton -text "1" 
-.highlightthickness.m add -type radiobutton -text "2" 
-.highlightthickness.m add -type radiobutton -text "3" 
-.highlightthickness.m add -type radiobutton -text "10" 
-.highlightthickness.m item configure all -variable config(-highlightthickness) \
-    -command { .ts configure -highlightthickness $config(-highlightthickness) }
-.highlightthickness.m select 0
-
-blt::tk::label .outerpad_l -text "-outerpad" 
-blt::combobutton .outerpad -textvariable text(-outerpad) -menu .outerpad.m 
-blt::combomenu .outerpad.m -textvariable text(-outerpad)
-.outerpad.m add -type radiobutton -text [.ts cget -outerpad]
-.outerpad.m add -type separator
-.outerpad.m add -type radiobutton -text "0" 
-.outerpad.m add -type radiobutton -text "1" 
-.outerpad.m add -type radiobutton -text "2" 
-.outerpad.m add -type radiobutton -text "3" 
-.outerpad.m add -type radiobutton -text "10" 
-.outerpad.m item configure all -variable config(-outerpad) \
-    -command { .ts configure -outerpad $config(-outerpad) }
-.outerpad.m select 0
-
-blt::tk::label .borderwidth_l -text "-borderwidth" 
-blt::combobutton .borderwidth -textvariable text(-borderwidth) \
-    -menu .borderwidth.m 
-blt::combomenu .borderwidth.m -textvariable text(-borderwidth)
-.borderwidth.m add -type radiobutton -text [.ts cget -borderwidth]
-.borderwidth.m add -type separator
-.borderwidth.m add -type radiobutton -text "0" 
-.borderwidth.m add -type radiobutton -text "1" 
-.borderwidth.m add -type radiobutton -text "2" 
-.borderwidth.m add -type radiobutton -text "3" 
-.borderwidth.m add -type radiobutton -text "10" 
-.borderwidth.m item configure all -variable config(-borderwidth) \
-    -command { .ts configure -borderwidth $config(-borderwidth) }
-.borderwidth.m select 0
-
-blt::tk::label .gap_l -text "-gap" 
-blt::combobutton .gap -textvariable text(-gap) -menu .gap.m 
-blt::combomenu .gap.m -textvariable text(-gap)
-.gap.m add -type radiobutton -text [.ts cget -gap]
-.gap.m add -type separator
-.gap.m add -type radiobutton -text "0" 
-.gap.m add -type radiobutton -text "1" 
-.gap.m add -type radiobutton -text "2" 
-.gap.m add -type radiobutton -text "3" 
-.gap.m add -type radiobutton -text "10" 
-.gap.m item configure all -variable config(-gap) \
-    -command { .ts configure -gap $config(-gap) }
-.gap.m select 0
-
-blt::tk::label .relief_l -text "-relief" 
-blt::combobutton .relief -textvariable text(-relief) -menu .relief.m 
-blt::combomenu .relief.m -textvariable text(-relief)
-.relief.m add -type radiobutton -text [.ts cget -relief]
-.relief.m add -type separator
-.relief.m add -type radiobutton -text "flat" 
-.relief.m add -type radiobutton -text "sunken" 
-.relief.m add -type radiobutton -text "raised" 
-.relief.m add -type radiobutton -text "groove" 
-.relief.m add -type radiobutton -text "ridge" 
-.relief.m add -type radiobutton -text "solid" 
-.relief.m item configure all -variable config(-relief) \
-    -command { .ts configure -relief $config(-relief) }
-.relief.m select 0
-
-blt::tk::label .background_l -text "-background" 
-blt::combobutton .background -textvariable text(-background) \
-    -menu .background.m 
-blt::combomenu .background.m -textvariable text(-background)
-.background.m add -type radiobutton -text [.ts cget -background]
-.background.m add -type separator
-.background.m add -type radiobutton -text "grey" 
-.background.m add -type radiobutton -text "white" 
-.background.m add -type radiobutton -text "black" 
-.background.m add -type radiobutton -text "lightblue" 
-.background.m item configure all -variable config(-background) \
-    -command { .ts configure -background $config(-background) }
-.background.m select 0
-
-blt::tk::label .activebackground_l -text "-activebackground" 
-blt::combobutton .activebackground -textvariable text(-activebackground) \
-    -menu .activebackground.m 
-blt::combomenu .activebackground.m -textvariable text(-activebackground)
-.activebackground.m add -type radiobutton -text [.ts cget -activebackground]
-.activebackground.m add -type separator
-.activebackground.m add -type radiobutton -text "grey" 
-.activebackground.m add -type radiobutton -text "white" 
-.activebackground.m add -type radiobutton -text "black" 
-.activebackground.m add -type radiobutton -text "lightblue" 
-.activebackground.m item configure all -variable config(-activebackground) \
-    -command { .ts configure -activebackground $config(-activebackground) }
-.activebackground.m select 0
-
-blt::tk::label .activeforeground_l -text "-activeforeground" 
-blt::combobutton .activeforeground -textvariable text(-activeforeground) \
-    -menu .activeforeground.m 
-blt::combomenu .activeforeground.m -textvariable text(-activeforeground)
-.activeforeground.m add -type radiobutton -text [.ts cget -activeforeground]
-.activeforeground.m add -type separator
-.activeforeground.m add -type radiobutton -text "grey" 
-.activeforeground.m add -type radiobutton -text "white" 
-.activeforeground.m add -type radiobutton -text "black" 
-.activeforeground.m add -type radiobutton -text "lightblue" 
-.activeforeground.m item configure all -variable config(-activeforeground) \
-    -command { .ts configure -activeforeground $config(-activeforeground) }
-.activeforeground.m select 0
-
-blt::tk::label .selectbackground_l -text "-selectbackground" 
-blt::combobutton .selectbackground -textvariable text(-selectbackground) \
-    -menu .selectbackground.m 
-blt::combomenu .selectbackground.m -textvariable text(-selectbackground)
-.selectbackground.m add -type radiobutton -text [.ts cget -selectbackground]
-.selectbackground.m add -type separator
-.selectbackground.m add -type radiobutton -text "grey" 
-.selectbackground.m add -type radiobutton -text "white" 
-.selectbackground.m add -type radiobutton -text "black" 
-.selectbackground.m add -type radiobutton -text "lightblue" 
-.selectbackground.m item configure all -variable config(-selectbackground) \
-    -command { .ts configure -selectbackground $config(-selectbackground) }
-.selectbackground.m select 0
-
-blt::tk::label .troughcolor_l -text "-troughcolor" 
-blt::combobutton .troughcolor -textvariable text(-troughcolor) \
-    -menu .troughcolor.m 
-blt::combomenu .troughcolor.m -textvariable text(-troughcolor)
-.troughcolor.m add -type radiobutton -text [.ts cget -troughcolor]
-.troughcolor.m add -type separator
-.troughcolor.m add -type radiobutton -text "grey" 
-.troughcolor.m add -type radiobutton -text "white" 
-.troughcolor.m add -type radiobutton -text "black" 
-.troughcolor.m add -type radiobutton -text "lightblue" 
-.troughcolor.m item configure all -variable config(-troughcolor) \
-    -command { .ts configure -troughcolor $config(-troughcolor) }
-.troughcolor.m select 0
-
-blt::tk::label .foreground_l -text "-foreground" 
-blt::combobutton .foreground -textvariable text(-foreground) \
-    -menu .foreground.m 
-blt::combomenu .foreground.m -textvariable text(-foreground)
-.foreground.m add -type radiobutton -text [.ts cget -foreground]
-.foreground.m add -type separator
-.foreground.m add -type radiobutton -text "grey" 
-.foreground.m add -type radiobutton -text "white" 
-.foreground.m add -type radiobutton -text "black" 
-.foreground.m add -type radiobutton -text "lightblue" 
-.foreground.m item configure all -variable config(-foreground) \
-    -command { .ts configure -foreground $config(-foreground) }
-.foreground.m select 0
-
-blt::tk::label .outerborderwidth_l -text "-outerborderwidth" 
-blt::combobutton .outerborderwidth -textvariable text(-outerborderwidth) \
-    -menu .outerborderwidth.m 
-blt::combomenu .outerborderwidth.m -textvariable text(-outerborderwidth)
-.outerborderwidth.m add -type radiobutton -text [.ts cget -outerborderwidth]
-.outerborderwidth.m add -type separator
-.outerborderwidth.m add -type radiobutton -text "0" 
-.outerborderwidth.m add -type radiobutton -text "1" 
-.outerborderwidth.m add -type radiobutton -text "2" 
-.outerborderwidth.m add -type radiobutton -text "3" 
-.outerborderwidth.m add -type radiobutton -text "10" 
-.outerborderwidth.m item configure all -variable config(-outerborderwidth) \
-    -command { .ts configure -outerborderwidth $config(-outerborderwidth) }
-.outerborderwidth.m select 0
-
-
-blt::tk::label .outerrelief_l -text "-outerrelief" 
-blt::combobutton .outerrelief -textvariable text(-outerrelief) \
-    -menu .outerrelief.m 
-blt::combomenu .outerrelief.m -textvariable text(-outerrelief)
-.outerrelief.m add -type radiobutton -text [.ts cget -outerrelief]
-.outerrelief.m add -type separator
-.outerrelief.m add -type radiobutton -text "flat" 
-.outerrelief.m add -type radiobutton -text "sunken" 
-.outerrelief.m add -type radiobutton -text "raised" 
-.outerrelief.m add -type radiobutton -text "groove" 
-.outerrelief.m add -type radiobutton -text "ridge" 
-.outerrelief.m add -type radiobutton -text "solid" 
-.outerrelief.m item configure all -variable config(-outerrelief) \
-    -command { .ts configure -outerrelief $config(-outerrelief) }
-.outerrelief.m select 0
-
-blt::tk::label .selectforeground_l -text "-selectforeground" 
-blt::combobutton .selectforeground -textvariable text(-selectforeground) \
-    -menu .selectforeground.m 
-blt::combomenu .selectforeground.m -textvariable text(-selectforeground)
-.selectforeground.m add -type radiobutton -text [.ts cget -selectforeground]
-.selectforeground.m add -type separator
-.selectforeground.m add -type radiobutton -text "grey" 
-.selectforeground.m add -type radiobutton -text "white" 
-.selectforeground.m add -type radiobutton -text "black" 
-.selectforeground.m add -type radiobutton -text "lightblue" 
-.selectforeground.m item configure all -variable config(-selectforeground) \
-    -command { .ts configure -selectforeground $config(-selectforeground) }
-.selectforeground.m select 0
-
-blt::tk::label .selectpad_l -text "-selectpad" 
-blt::combobutton .selectpad -textvariable text(-selectpad) -menu .selectpad.m 
-blt::combomenu .selectpad.m -textvariable text(-selectpad)
-.selectpad.m add -type radiobutton -text [.ts cget -selectpad]
-.selectpad.m add -type separator
-.selectpad.m add -type radiobutton -text "0" 
-.selectpad.m add -type radiobutton -text "1" 
-.selectpad.m add -type radiobutton -text "2" 
-.selectpad.m add -type radiobutton -text "3" 
-.selectpad.m add -type radiobutton -text "10" 
-.selectpad.m item configure all -variable config(-selectpad) \
-    -command { .ts configure -selectpad $config(-selectpad) }
-.selectpad.m select 0
-
-blt::table . \
-    .ts                   0,0 -fill both -rspan 25 \
-    .activebackground_l   1,1 -anchor e \
-    .activebackground     1,2 -fill x \
-    .activeforeground_l   2,1 -anchor e \
-    .activeforeground     2,2 -fill x \
-    .background_l         3,1 -anchor e \
-    .background           3,2 -fill x \
-    .borderwidth_l        4,1 -anchor e \
-    .borderwidth          4,2 -fill x \
-    .gap_l                5,1 -anchor e \
-    .gap                  5,2 -fill x \
-    .foreground_l         6,1 -anchor e \
-    .foreground           6,2 -fill x \
-    .highlightthickness_l 7,1 -anchor e \
-    .highlightthickness   7,2 -fill x \
-    .justify_l            8,1 -anchor e \
-    .justify              8,2 -fill x \
-    .outerborderwidth_l   9,1 -anchor e \
-    .outerborderwidth     9,2 -fill x \
-    .outerpad_l          10,1 -anchor e \
-    .outerpad            10,2 -fill x \
-    .outerrelief_l       11,1 -anchor e \
-    .outerrelief         11,2 -fill x \
-    .relief_l            12,1 -anchor e \
-    .relief              12,2 -fill x \
-    .rotate_l            13,1 -anchor e \
-    .rotate              13,2 -fill x \
-    .selectbackground_l  14,1 -anchor e \
-    .selectbackground    14,2 -fill x \
-    .selectforeground_l  15,1 -anchor e \
-    .selectforeground    15,2 -fill x \
-    .selectpad_l         16,1 -anchor e \
-    .selectpad           16,2 -fill x \
-    .side_l              17,1 -anchor e \
-    .side                17,2 -fill x \
-    .slant_l             18,1 -anchor e \
-    .slant               18,2 -fill x \
-    .tabwidth_l          19,1 -anchor e \
-    .tabwidth            19,2 -fill x \
-    .tearoff_l           20,1 -anchor e \
-    .tearoff             20,2 -fill x \
-    .tiers_l             21,1 -anchor e \
-    .tiers               21,2 -fill x \
-    .troughcolor_l       22,1 -anchor e \
-    .troughcolor         22,2 -fill x \
-    .txside_l            23,1 -anchor e \
-    .txside              23,2 -fill x \
-    .s                   25,0 -fill x 
-
-foreach option { 
-    borderwidth gap highlightthickness justify outerpad relief rotate 
-    side slant tabwidth tearoff tiers textside
-} {
-    set $option [.ts cget -$option]
-}
-
-puts stderr angle=[.ts cget -rotate]
-
-blt::table configure . r* c1 -resize none
-blt::table configure . r24 -resize expand
-focus .ts
-
-.ts focus 0
-
-if 1 {
-set filecount 0
-foreach file { graph1 graph2 graph3 graph5 barchart2 } {
-    namespace eval $file {
-	if { [string match graph* $file] } {
-	    set graph [blt::graph .ts.$file]
-	} else {
-	    set graph [blt::barchart .ts.$file]
-	}
-	source scripts/$file.tcl
-	.ts tab configure $filecount -window $graph -fill both 
-	incr filecount
-    }
-}
-}
-
-
-.ts select 0
-.ts activate 0
-.ts focus 0
-after 5000 {
-    .ts tab configure 0 -state disabled
-}
diff --git a/blt3.0/demos/tabset1.tcl b/blt3.0/demos/tabset1.tcl
deleted file mode 100755
index 10da70e..0000000
--- a/blt3.0/demos/tabset1.tcl
+++ /dev/null
@@ -1,60 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-image create picture bgTile -file ./images/chalk.gif
-image create picture label1 -file ./images/mini-book1.gif
-image create picture label2 -file ./images/mini-book2.gif
-
-blt::tabset .t \
-    -outerrelief raised \
-    -outerborderwidth 0 \
-    -highlightthickness 0 \
-    -scrollcommand { .s set } \
-    -width 3i 
-
-.t insert end First \
-    -button yes \
-    -image label1 \
-    -anchor center \
-    -selectbackground darkolivegreen2  
-
-.t button configure -image label1 -activeimage label2
-
-foreach page { Again Next another test of a widget } {
-    .t insert end $page \
-	-anchor center \
-	-selectbackground darkolivegreen2 \
-	-image label2 
-}
-
-.t insert end Again \
-    -selectbackground lightblue 
-
-set tabcount 0
-proc NewTab { args } {
-    global tabcount
-    set i [.t insert last "New Tab $tabcount"]
-    .t select $i
-    update
-    .t see last
-    incr tabcount
-}
-
-.t insert end "+" \
-    -font "Arial 10" \
-    -anchor center \
-    -selectbackground yellow \
-    -width 20 \
-    -command NewTab
-
-
-blt::tk::scrollbar .s -command { .t view } -orient horizontal
-blt::table . \
-    .t 0,0 -fill both \
-    .s 1,0 -fill x 
-
-blt::table configure . r1 -resize none
-focus .t
-
diff --git a/blt3.0/demos/tabset2.tcl b/blt3.0/demos/tabset2.tcl
deleted file mode 100755
index e4d74b0..0000000
--- a/blt3.0/demos/tabset2.tcl
+++ /dev/null
@@ -1,52 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-image create picture bgTile -file ./images/smblue_rock.gif
-image create picture label1 -file ./images/mini-book1.gif
-image create picture label2 -file page-zoom.png
-image create picture testImage -file ./images/txtrflag.gif
-blt::tk::scrollbar .s -command { .t view } -orient horizontal
-blt::tabset .t \
-    -outerrelief flat \
-    -font "Arial 8" \
-    -outerborderwidth 2 \
-    -textside right \
-    -tabwidth same \
-    -tiers 2 \
-    -scrollcommand { .s set } \
-    -scrollincrement 1  -selectforeground green2
-
-blt::tk::label .t.l -image testImage
-
-set attributes {
-    graph1 "Graph \#1" red	.t.graph1  
-    graph2 "Graph \#2" green	.t.graph2  
-    graph3 "Graph \#3" cyan	.t.graph3  
-    graph5 "Graph \#5" yellow	.t.graph5  
-    graph6 one		orange	.t.l       
-}
-
-foreach { entry label color window } $attributes {
-    .t insert end $entry -text $label -fill both
-}
-
-foreach page { there bunky another test of a widget } {
-    .t insert end $page -image label2 
-}
-
-blt::table . \
-    .t 0,0 -fill both \
-    .s 1,0 -fill x 
-
-blt::table configure . r1 -resize none
-
-foreach file { graph1 graph2 graph3 graph5 } {
-    namespace eval $file {
-	set graph [blt::graph .t.$file]
-	source scripts/$file.tcl
-	.t tab configure $file -window $graph
-    }
-}
-
diff --git a/blt3.0/demos/tabset3.tcl b/blt3.0/demos/tabset3.tcl
deleted file mode 100755
index 39b8184..0000000
--- a/blt3.0/demos/tabset3.tcl
+++ /dev/null
@@ -1,180 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-#blt::bltdebug 100
-
-image create picture label1 -file ./images/mini-book1.gif
-image create picture label2 -file ./images/mini-book2.gif
-image create picture testImage -file ./images/txtrflag.gif
-
-wm protocol . WM_DELETE_WINDOW { destroy . }
-
-blt::tabset .t \
-    -textside right \
-    -slant both \
-    -side right \
-    -tabwidth same \
-    -highlightcolor yellow \
-    -tiers 5 \
-    -scrollcommand { .s set } \
-    -scrollincrement 1 
-
-label .t.l -image testImage
-
-set font [font create -family "Arial" -size 8 -weight bold]
-puts stderr [font configure $font]
-option add *Tabset.Tab.font $font
-#option add *Tabset.Tab.fill both
-
-set attributes {
-    graph1 "Graph \#1" pink	
-    graph2 "Graph \#2" lightblue	
-    graph3 "Graph \#3" orange
-    graph5 "Graph \#5" yellow	
-    barchart2 "Barchart \#2" green
-}
-
-foreach { name label color } $attributes {
-    .t insert end $name -text $label \
-	-selectbackground ${color}3  \
-	-background ${color}3 \
-	-activebackground ${color}2
-}
-
-.t insert end Image -selectbackground salmon2 -background salmon3 \
-    -selectbackground salmon3 -activebackground salmon2 -window .t.l
-
-set tabLabels { 
-    Aarhus Aaron Ababa aback abaft abandon abandoned abandoning
-    abandonment abandons abase abased abasement abasements abases
-    abash abashed abashes abashing abasing abate abated abatement
-    abatements abater abates abating Abba abbe abbey abbeys abbot
-    abbots Abbott abbreviate abbreviated abbreviates abbreviating
-    abbreviation abbreviations Abby abdomen abdomens abdominal
-    abduct abducted abduction abductions abductor abductors abducts
-    Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant
-    aberration aberrations abet abets abetted abetter abetting
-    abeyance abhor abhorred abhorrent abhorrer abhorring abhors
-    abide abided abides abiding Abidjan Abigail Abilene abilities
-    ability abject abjection abjections abjectly abjectness abjure
-    abjured abjures abjuring ablate ablated ablates ablating
-    ablation ablative ablaze able abler ablest ably Abner abnormal
-    abnormalities abnormality abnormally Abo aboard abode abodes
-    abolish abolished abolisher abolishers abolishes abolishing
-    abolishment abolishments abolition abolitionist abolitionists
-    abominable abominate aboriginal aborigine aborigines abort
-    aborted aborting abortion abortions abortive abortively aborts
-    Abos abound abounded abounding abounds about above aboveboard
-    aboveground abovementioned abrade abraded abrades abrading
-    Abraham Abram Abrams Abramson abrasion abrasions abrasive
-    abreaction abreactions abreast abridge abridged abridges
-    abridging abridgment abroad abrogate abrogated abrogates
-    abrogating abrupt abruptly abruptness abscess abscessed
-    abscesses abscissa abscissas abscond absconded absconding
-    absconds absence absences absent absented absentee
-    absenteeism absentees absentia absenting absently absentminded
-    absents absinthe absolute absolutely absoluteness absolutes
-    absolution absolve absolved absolves absolving absorb
-    absorbed absorbency absorbent absorber absorbing absorbs
-    absorption absorptions absorptive abstain abstained abstainer
-    abstaining abstains abstention abstentions abstinence
-    abstract abstracted abstracting abstraction abstractionism
-    abstractionist abstractions abstractly abstractness
-    abstractor abstractors abstracts abstruse abstruseness
-    absurd absurdities absurdity absurdly Abu abundance abundant
-    abundantly abuse abused abuses abusing abusive abut abutment
-    abuts abutted abutter abutters abutting abysmal abysmally
-    abyss abysses Abyssinia Abyssinian Abyssinians acacia
-    academia academic academically academics academies academy
-    Acadia Acapulco accede acceded accedes accelerate accelerated
-    accelerates accelerating acceleration accelerations
-    accelerator accelerators accelerometer accelerometers accent
-    accented accenting accents accentual accentuate accentuated
-    accentuates accentuating accentuation accept acceptability
-    acceptable acceptably acceptance acceptances accepted
-    accepter accepters accepting acceptor acceptors accepts
-    access accessed accesses accessibility accessible accessibly
-    accessing accession accessions accessories accessors
-    accessory accident accidental accidentally accidently
-    accidents acclaim acclaimed acclaiming acclaims acclamation
-    acclimate acclimated acclimates acclimating acclimatization
-    acclimatized accolade accolades accommodate accommodated
-    accommodates accommodating accommodation accommodations
-    accompanied accompanies accompaniment accompaniments
-    accompanist accompanists accompany accompanying accomplice
-    accomplices accomplish accomplished accomplisher accomplishers
-    accomplishes accomplishing accomplishment accomplishments
-    accord accordance accorded accorder accorders according
-    accordingly accordion accordions accords accost accosted
-    accosting accosts account accountability accountable accountably
-    accountancy accountant accountants accounted accounting
-    accounts Accra accredit accreditation accreditations
-    accredited accretion accretions accrue accrued accrues
-    accruing acculturate acculturated acculturates acculturating
-    acculturation accumulate accumulated accumulates accumulating
-    accumulation accumulations accumulator accumulators
-    accuracies accuracy accurate accurately accurateness accursed
-    accusal accusation accusations accusative accuse accused
-    accuser accuses accusing accusingly accustom accustomed
-    accustoming accustoms ace aces acetate acetone acetylene
-    Achaean Achaeans ache ached aches achievable achieve achieved
-    achievement achievements achiever achievers achieves achieving
-    Achilles aching acid acidic acidities acidity acidly acids
-    acidulous Ackerman Ackley acknowledge acknowledgeable
-    acknowledged acknowledgement acknowledgements acknowledger
-    acknowledgers acknowledges acknowledging acknowledgment
-    acknowledgments acme acne acolyte acolytes acorn acorns
-    acoustic acoustical acoustically acoustician acoustics
-    acquaint acquaintance acquaintances acquainted acquainting
-    acquaints acquiesce acquiesced acquiescence acquiescent
-    acquiesces acquiescing acquirable acquire acquired acquires
-    acquiring acquisition acquisitions
-}
-
-for { set i 0 } { $i < 500 } { incr i } {
-    .t insert end [lindex $tabLabels $i] -state normal
-}
-
-scrollbar .s -command { .t view } -orient horizontal
-radiobutton .left -text "Left" -variable side -value "left" \
-    -command { .t configure -side $side -rotate 90 }
-radiobutton .right -text "Right" -variable side -value "right" \
-    -command { .t configure -side $side -rotate 270 }
-radiobutton .top -text "Top" -variable side -value "top" \
-    -command { .t configure -side $side -rotate 0 }
-radiobutton .bottom -text "Bottom" -variable side -value "bottom" \
-    -command { .t configure -side $side -rotate 0 }
-
-blt::table . \
-    .t 0,0 -fill both -cspan 2 \
-    .s 1,0 -fill x -cspan 2 \
-    .top 2,0 -cspan 2 \
-    .left 3,0 \
-    .right 3,1 \
-    .bottom 4,0 -cspan 2 
-
-blt::table configure . r1 r3 r4 r2 -resize none
-focus .t
-
-.t focus 0
-
-after 3000 {
-	.t move 0 after 3
-	.t tab configure 3 -state disabled 
-}
-
-foreach file { graph1 graph2 graph3 graph5 barchart2 } {
-    namespace eval $file {
-	if { [string match graph* $file] } {
-	    set graph [blt::graph .t.$file]
-	} else {
-	    set graph [blt::barchart .t.$file]
-	}
-	source scripts/$file.tcl
-	.t tab configure $file -window $graph -fill both 
-    }
-}
-
-.top invoke
-
diff --git a/blt3.0/demos/tabset4.tcl b/blt3.0/demos/tabset4.tcl
deleted file mode 100755
index c151bb8..0000000
--- a/blt3.0/demos/tabset4.tcl
+++ /dev/null
@@ -1,90 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-#blt::bltdebug 100
-
-source scripts/stipples.tcl
-
-blt::tabset .t \
-    -tabwidth same \
-    -side left \
-    -textside bottom \
-    -textside top \
-    -tiers 1 \
-    -scrollincrement 10 \
-    -scrollcommand { .s set } \
-    -rotate 0 \
-    -selectcommand {  MakePicture .t }  \
--width 500 -height 500
-
-scrollbar .s -command { .t view } -orient horizontal
- 
-option clear
-option add *Tabset.Tab.font -*-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
-
-set files [glob ./images/*.gif]
-set files [lsort $files]
-set vertFilter sinc
-set horzFilter sinc
-#set vertFilter none
-#set horzFilter none
-
-
-proc ResizePicture { src dest maxSize } {
-    puts stderr "maxSize=$maxSize"
-    set maxSize [winfo fpixels . $maxSize]
-    set w [image width $src]
-    set h [image height $src]
-    puts stderr "width=$w, height=$h"
-    set sw [expr double($maxSize) / $w]
-    set sh [expr double($maxSize) / $h]
-    puts stderr "sw=$sw,sh=$sh"
-    set s [expr min($sw, $sh)]
-    set w [expr round($s * $w)]
-    set h [expr round($s * $h)]
-    puts stderr "[$src configure]"
-    $dest configure -width $w -height $h
-    
-    global horzFilter vertFilter
-    $dest resize $src -filter $horzFilter 
-}
-
-image create picture src
-image create picture dest
-
-label .t.label -image dest  -width 500 -height 500
-
-proc MakePicture { w index } {
-    set file [$w tab cget $index -text]
-    src configure -file ./images/$file.gif
-
-    set width [$w cget -pagewidth]
-    set height [$w cget -pageheight]
-    puts stderr "pagewidth=$width, pageheight=$height"
-    if { $width < $height } {
-	ResizePicture src dest $width
-    } else {
-	ResizePicture src dest $height
-    }
-    .t dockall
-    .t tab configure $index -window .t.label -padx 4m -pady 4m -fill both
-}
-
-blt::table . \
-    .t 0,0 -fill both \
-    .s 1,0 -fill x 
-
-blt::table configure . r1 -resize none 
-focus .t
-
-foreach f $files {
-    src configure -file $f
-    set f [file tail [file root $f]]
-    set thumb [image create picture]
-    ResizePicture src $thumb .5i
-    .t insert end $f -image $thumb -fill both
-}
-
-.t focus 0
-.t invoke 0
diff --git a/blt3.0/demos/tour.tcl b/blt3.0/demos/tour.tcl
deleted file mode 100755
index c1e5000..0000000
--- a/blt3.0/demos/tour.tcl
+++ /dev/null
@@ -1,141 +0,0 @@
-#!../src/bltwish
-
-#package require BLT
-source scripts/demo.tcl
-option add *Scrollbar.relief	flat
-set oldLabel "dummy"
-
-proc RunDemo { program } {
-    if { ![file executable $program] } {
-	return
-    }
-    set cmd [list $program -name "demo:$program" -geom -4000-4000]
-    global programInfo
-    if { [info exists programInfo(lastProgram)] } {
-	set programInfo($programInfo(lastProgram)) 0
-    }
-    eval bgexec programInfo($program) $cmd &
-    set programInfo(lastProgram) $program
-    puts stderr [.top.tab.f1 search -name demo:$program]
-    .top.tab.f1 configure -name demo:$program
-}
-
-frame .top
-set tree [blt::tree create]
-blt::treeview .top.hier -separator "." -xscrollincrement 1 \
-    -yscrollcommand { .top.yscroll set } -xscrollcommand { .top.xscroll set } \
-    -separator . \
-    -tree $tree \
-    -selectcommand { 
-	set index [.top.hier curselection]
-	if { $index != "" } {
-	    set label [.top.hier entry cget $index -label]
-	    .top.title configure -text $label
-	    .top.tab tab configure Example -window .top.tab.f1 
-	    if { $label != $oldLabel }  {
-		RunDemo $label
-	    }
-	}
-    }
-	
-
-blt::tk::scrollbar .top.yscroll -command { .top.hier yview }
-blt::tk::scrollbar .top.xscroll -command { .top.hier xview } -orient horizontal
-blt::tk::label .top.mesg -relief groove -borderwidth 2 
-blt::tk::label .top.title -text "Synopsis" -highlightthickness 0
-blt::tabset .top.tab -side bottom -outerrelief flat -outerborderwidth 0 \
-    -highlightthickness 0 -pageheight 4i
-
-foreach tab { "Example" "See Code" "Manual" } {
-    .top.tab insert end $tab
-}
- 
-set pics /DOS/f/gah/Pics
-set pics /home/gah/Pics
-image create picture dummy -file images/blt98.gif
-image create picture graph.img -width 50 -height 50
-graph.img resample dummy
-
-dummy configure -file images/blt98.gif
-image create picture barchart.img -width 50 -height 50
-barchart.img resample dummy
-
-.top.hier entry configure root -label "BLT"
-.top.hier insert end \
-    "Plotting" \
-    "Plotting.graph" \
-    "Plotting.graph.graph" \
-    "Plotting.graph.graph2" \
-    "Plotting.graph.graph3" \
-    "Plotting.graph.graph4" \
-    "Plotting.graph.graph5" \
-    "Plotting.graph.graph6" \
-    "Plotting.barchart" \
-    "Plotting.barchart.barchart1" \
-    "Plotting.barchart.barchart2" \
-    "Plotting.barchart.barchart3" \
-    "Plotting.barchart.barchart4" \
-    "Plotting.barchart.barchart5" \
-    "Plotting.stripchart" \
-    "Plotting.vector" \
-    "Composition" \
-    "Composition.htext" \
-    "Composition.table" \
-    "Composition.tabset" \
-    "Composition.hierbox" \
-    "Miscellaneous" \
-    "Miscellaneous.busy" \
-    "Miscellaneous.bgexec" \
-    "Miscellaneous.watch" \
-    "Miscellaneous.bltdebug" 
-.top.hier open -r root
-.top.hier entry configure root -font *-helvetica*-bold-r-*-18-* 
-puts stderr [$tree dump root]
-foreach item { "Plotting" "Composition" "Miscellaneous" } {
-    set index [.top.hier index ".$item"]
-    .top.hier entry configure $index -font *-helvetica*-bold-r-*-14-* 
-}
-.top.hier entry configure [.top.hier index ".Plotting.graph"] \
-    -font *-helvetica*-bold-r-*-14-* -label "X-Y Graph"
-.top.hier entry configure [.top.hier index ".Plotting.barchart"] \
-    -font *-helvetica*-bold-r-*-14-* -label "Bar Chart"
-
-.top.hier entry configure [.top.hier index ".Plotting.stripchart"] \
-    -font *-helvetica*-bold-r-*-14-* -label "X-Y Graph"
-.top.hier entry configure [.top.hier index ".Plotting.stripchart"] \
-    -font *-helvetica*-bold-r-*-14-* -label "Strip Chart"
-
-.top.hier entry configure [.top.hier index ".Plotting.graph"] -icon graph.img
-.top.hier entry configure [.top.hier index ".Plotting.barchart"] \
-    -icon barchart.img
-
-blt::table .top \
-    0,0 .top.hier -fill both -rspan 2 \
-    0,1 .top.yscroll -fill y -rspan 2 \
-    0,2 .top.mesg -padx 2 -pady { 8 2 } -fill both \
-    0,2 .top.title -anchor nw -padx { 8 8 }  \
-    1,2 .top.tab -fill both -rspan 2 \
-    2,0 .top.xscroll -fill x 
-
-blt::table configure .top c1 r2 -resize none
-blt::table configure .top c0 -width { 3i {} }
-blt::table configure .top c2 -width { 4i {} }
-blt::table . \
-    .top -fill both
-
-proc DoExit { code } {
-    global progStatus
-    set progStatus 1
-    exit $code
-}
-
-blt::container .top.tab.f1 -relief raised -bd 2 -takefocus 0
-.top.tab tab configure Example -window .top.tab.f1 
-
-if  1 {
-    set cmd "xterm -fn fixed -geom +4000+4000"
-    eval blt::bgexec programInfo(xterm) $cmd &
-    set programInfo(lastProgram) xterm
-    .top.tab.f1 configure -command $cmd 
-} 
-wm protocol . WM_DELETE_WINDOW { destroy . }
diff --git a/blt3.0/demos/treeview1.tcl b/blt3.0/demos/treeview1.tcl
deleted file mode 100755
index ce620b2..0000000
--- a/blt3.0/demos/treeview1.tcl
+++ /dev/null
@@ -1,181 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-proc SortColumn { column } {
-    set old [.t sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.t sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .t sort configure -decreasing $decreasing -column $column -mode integer
-    if { ![.t cget -flat] } {
-	.t configure -flat yes
-    }
-    .t sort auto yes
-
-    blt::busy hold .t
-    update
-    blt::busy release .t
-}
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-proc Find { tree parent dir } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [glob -nocomplain *] {
-	set name [file tail $f]
-	if { [catch { file stat $f info }] != 0 } {
-	    set node [$tree insert $parent -label $name]
-	} else {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) [list @::blt::TreeView::openIcon $name]
-	    } else {
-		set info(type) "@::blt::TreeView::openIcon "
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [FormatMode $info(mode)]
-	    set node [$tree insert $parent -label $name -data [array get info]]
-	}
-	incr count
-	if { [file type $f] == "directory" } {
-	    Find $tree $node $f
-	}
-    }
-    cd $saved
-}
-
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-button .b -font { Helvetica 11 bold }
-set top [GetAbsolutePath ..]
-#set top [GetAbsolutePath /home/gah]
-set trim "$top"
-
-set tree [blt::tree create]    
-blt::tk::scrollbar .vs -orient vertical -command { .t yview }
-blt::tk::scrollbar .hs -orient horizontal -command { .t xview }
-
-blt::treeview .t \
-    -width 0 \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set } \
-    -selectmode multiple \
-    -separator / \
-    -tree $tree  
-
-.t column configure treeView -text ""  -edit yes
-#file
-.t column insert 0 mtime atime gid 
-.t column insert end nlink mode type ctime uid ino size dev
-.t column configure uid -background \#eaeaff 
-.t column configure mtime -hide no -bg \#ffeaea
-.t column configure size gid nlink uid ino dev -justify left -edit yes
-.t column configure size type -justify left -edit yes
-.t column configure treeView -hide no -edit yes \
-	-icon ::blt::TreeView::openIcon
-focus .t
-
-
-blt::table . \
-    0,0 .t  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-blt::table configure . c1 r1 -resize none
-
-set count 0
-Find $tree root $top
-puts "$count entries"
-
-$tree find root -glob *.c -addtag "c_files"
-$tree find root -glob *.h -addtag "header_files"
-$tree find root -glob *.tcl -addtag "tcl_files"
-
-.t entry configure "c_files" -foreground green4
-.t entry configure "header_files" -foreground cyan4
-.t entry configure "tcl_files" -foreground red4 
-
-.t column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-foreach column [.t column names] {
-    .t column configure $column -command [list SortColumn $column]
-}
-
-# Create a second treeview that shares the same tree.
-if 0 {
-toplevel .top
-blt::treeview .top.t2 -tree $tree -yscrollcommand { .top.sbar set }
-scrollbar .top.sbar -command { .top.t2 yview }
-pack .top.t2 -side left -expand yes -fill both
-pack .top.sbar -side right -fill y
-}
-
-#.t style configure text -background #F8fbF8 -selectbackground #D8fbD8 
-
-.t style checkbox check \
-    -onvalue 100 -offvalue "50" \
-    -showvalue yes 
-
-.t style combobox combo  \
-    -icon ::blt::TreeView::openIcon \
-    -arrowrelief flat -arrowborderwidth 0
-
-.t column configure uid -style combo 
-.t column configure gid -style check
-
diff --git a/blt3.0/demos/treeview2.tcl b/blt3.0/demos/treeview2.tcl
deleted file mode 100644
index 0a88ea1..0000000
--- a/blt3.0/demos/treeview2.tcl
+++ /dev/null
@@ -1,208 +0,0 @@
-#!../src/bltwish
-
-set count 0
-package require BLT
-#source scripts/demo.tcl
-
-proc SortColumn { column } {
-    set old [.t sort cget -column] 
-    set decreasing 0
-    if { "$old" == "$column" } {
-	set decreasing [.t sort cget -decreasing]
-	set decreasing [expr !$decreasing]
-    }
-    .t sort configure -decreasing $decreasing -column $column -mode integer
-    if { ![.t cget -flat] } {
-	.t configure -flat yes
-    }
-    .t sort auto yes
-
-    blt::busy hold .t
-    update
-    blt::busy release .t
-}
-
-proc FormatSize { size } {
-   set string ""
-   while { $size > 0 } {
-       set rem [expr $size % 1000]
-       set size [expr $size / 1000]
-       if { $size > 0 } {
-           set rem [format "%03d" $rem]
-       } 
-       if { $string != "" } {
-           set string "$rem,$string"
-       } else {
-           set string "$rem"
-       }
-   } 
-   return $string
-}
-
-array set modes {
-   0	---
-   1    --x
-   2    -w-
-   3    -wx
-   4    r-- 
-   5    r-x
-   6    rw-
-   7    rwx
-}
-
-proc FormatMode { mode } {
-   global modes
-
-   set mode [format %o [expr $mode & 07777]]
-   set owner $modes([string index $mode 0])
-   set group $modes([string index $mode 1])
-   set world $modes([string index $mode 2])
-
-   return "${owner}${group}${world}"
-}
-
-proc Find { tree parent dir } {
-    global count 
-    set saved [pwd]
-
-    cd $dir
-    foreach f [lsort [glob -nocomplain *]] {
-	set name [file tail $f]
-	    
-	if { [catch { file lstat $f info }] != 0 } {
-	    if { ![$tree exists $parent->"$name"] } {
-		set node [$tree insert $parent -label $name]
-	    }
-	} else {
-	    if 0 {
-	    if { $info(type) == "file" } {
-		set info(type) [list @blt::TreeView::openIcon $name]
-	    } else {
-		set info(type) "@blt::TreeView::openIcon "
-	    }
-	    }
-	    set info(mtime) [clock format $info(mtime) -format "%b %d, %Y"]
-	    set info(atime) [clock format $info(atime) -format "%b %d, %Y"]
-	    set info(ctime) [clock format $info(ctime) -format "%b %d, %Y"]
-            set info(owner)  [file attributes $name -owner]
-            set info(group)  [file attributes $name -group]
-            set info(size)  [FormatSize $info(size)]
-	    set info(mode)  [file attributes $name -permissions]
-	    if { ![$tree exists $parent->"$name"] } {
-		set node [$tree insert $parent -label $name \
-			      -data [array get info]]
-	    } else {
-		set node [$tree findchild $parent $name]
-		puts "already found $f"
-	    }
-	}
-	incr count
-	if { [file type $f] == "directory" } {
-	    .t entry configure $node -button yes 
-	}
-    }
-    cd $saved
-}
-
-proc GetAbsolutePath { dir } {
-    set saved [pwd]
-    cd $dir
-    set path [pwd] 
-    cd $saved
-    return $path
-}
-
-set top [GetAbsolutePath .]
-set trim "$top"
-
-set tree [blt::tree create]    
-scrollbar .vs -orient vertical -command { .t yview }
-scrollbar .hs -orient horizontal -command { .t xview }
-
-proc OpenNode  { tree node parent top } {
-    if { [file type $parent] == "directory" } {
-	blt::busy hold .t
-	Find $tree $node $top/$parent
-	update
-	blt::busy release .t
-    }
-}
-
-proc CloseNode  { tree node } {
-    eval $tree delete [$tree children $nodex]
-}
-
-
-blt::treeview .t \
-    -width 0 \
-    -yscrollcommand { .vs set } \
-    -xscrollcommand { .hs set } \
-    -selectmode multiple \
-    -separator / \
-    -tree $tree \
-    -opencommand [list OpenNode $tree %\# %P $top]  \
-    -closecommand [list CloseNode $tree %\#]
-
-set img [image create picture -data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-    nQkAOw==
-}]
-	 
-update
-.t column configure treeView -text "" 
-#file
-.t column insert 0 mtime atime ctime 
-.t column insert end nlink mode type owner group ino size dev
-.t column configure owner 
-.t column configure mtime -hide no
-.t column configure size group nlink owner ino dev -justify left -edit yes
-.t column configure size type -justify left -edit yes
-.t column configure treeView -hide no -edit no -icon $img
-focus .t
-
-
-blt::table . \
-    0,0 .t  -fill both \
-    0,1 .vs -fill y \
-    1,0 .hs -fill x
-blt::table configure . c1 r1 -resize none
-
-puts "$count entries"
-
-#$tree find root -glob *.c -addtag "c_files"
-#$tree find root -glob *.h -addtag "header_files"
-#$tree find root -glob *.tcl -addtag "tcl_files"
-
-#.t entry configure "c_files" -foreground green4
-#.t entry configure "header_files" -foreground cyan4
-#.t entry configure "tcl_files" -foreground red4 
-
-.t column bind all <ButtonRelease-3> {
-    %W configure -flat no
-}
-
-foreach column [.t column names] {
-    .t column configure $column -command [list SortColumn $column]
-}
-
-# Create a second treeview that shares the same tree.
-if 0 {
-toplevel .top
-blt::treeview .top.t2 -tree $tree -yscrollcommand { .top.sbar set }
-scrollbar .top.sbar -command { .top.t2 yview }
-pack .top.t2 -side left -expand yes -fill both
-pack .top.sbar -side right -fill y
-}
-
-#.t style configure text -background #F8fbF8 -selectbackground #D8fbD8 
-
-.t style checkbox check \
-    -onvalue 30 -offvalue "50" \
-    -showvalue yes 
-
-.t style combobox combo -icon $img
-
-#.t column configure owner -style combo 
-#.t column configure group -style check
-
diff --git a/blt3.0/demos/usmap.tcl b/blt3.0/demos/usmap.tcl
deleted file mode 100644
index 369914a..0000000
--- a/blt3.0/demos/usmap.tcl
+++ /dev/null
@@ -1,71 +0,0 @@
-# -------------------------------------------------------------------------
-#  DATA: US Map
-# -------------------------------------------------------------------------
-#  COURSE:  Effective Tcl/Tk Programming
-#  AUTHOR:  Michael J. McLennan
-# =========================================================================
-#  Copyright (c) 1997-1999  Cadence Design Systems, Inc.
-# =========================================================================
-
-#
-# Coordinates for each map region
-# -------------------------------------------------------------------------
-set us_regions(WV.60) {217.03 79.0715 220.0 85.2274 220.16 85.2624 220.16 85.2624 224.995 86.9429 229.995 82.059 235.0 76.154 235.0 76.1131 235.0 76.1015 239.965 73.289 241.405 72.7755 241.405 72.7755 241.4 72.7697 240.0 70.815 234.995 71.8186 232.615 69.9747 230.0 69.9747 227.405 63.5562 227.405 63.5446 225.0 71.0484 220.0 74.8353 217.035 79.0773 217.03 79.0715 }
-set us_regions(NV.35) {30.005 54.0568 30.0 59.0925 30.0 59.2675 30.0 69.0586 29.995 75.0278 34.995 79.9001 39.995 84.9123 44.995 90.0938 49.995 95.4387 54.995 100.947 56.825 103.007 56.835 103.012 59.745 89.026 59.79 54.0627 59.76 54.0627 54.995 54.0393 49.995 54.0277 44.995 54.0277 44.87 54.016 40.03 54.0277 35.15 54.0627 30.05 54.0452 30.005 54.0568 }
-set us_regions(IA.20) {176.795 50.4567 176.815 50.4216 175.0 49.0037 173.91 43.5072 170.02 43.5072 165.055 43.5188 160.045 43.513 155.03 43.5072 150.01 43.513 147.765 43.5072 147.735 43.513 147.785 50.5909 150.0 57.2369 150.01 57.482 150.0 57.7154 151.175 63.918 151.17 63.9238 151.18 63.9238 155.04 63.988 160.065 63.9997 165.07 63.9122 170.005 63.7896 172.905 65.3709 175.0 61.6657 175.01 59.8802 175.0 58.0188 176.785 50.4742 176.795 50.4567 }
-set us_regions(IA.21) {176.675 51.8687 176.675 51.8512 176.675 51.7812 176.675 51.8512 176.675 51.8687 }
-set us_regions(PA.49) {227.4 51.7228 227.405 63.5446 227.405 63.5562 230.0 69.9747 232.615 69.9747 232.625 69.9747 235.0 69.9631 240.0 69.9631 245.0 69.9806 250.0 69.9689 251.06 69.9689 252.925 69.4087 254.99 67.8274 255.0 65.1492 254.995 60.5104 256.525 58.5148 256.525 58.5148 255.0 57.4645 250.03 54.0218 245.0 54.0102 240.0 54.0218 235.0 54.0218 231.185 50.515 231.19 50.4041 230.0 51.0402 227.5 51.7053 227.4 51.7228 }
-set us_regions(IN.19) {205.97 56.1458 205.0 55.6965 200.005 55.6965 195.33 55.6906 194.375 55.6848 193.96 55.6906 193.895 55.6906 190.0 81.2713 190.015 81.4172 190.0 81.6564 189.86 83.4302 190.0 83.4361 194.985 82.5667 199.99 82.0298 204.99 76.6091 205.87 74.2926 205.9 74.281 205.97 56.1458 }
-set us_regions(KS.22) {156.91 89.0377 155.02 71.8828 155.0 70.284 155.01 68.726 153.46 68.0258 153.46 68.02 150.02 68.0142 145.035 68.0083 140.01 68.0025 135.0 68.0025 130.035 68.0083 125.0 68.0025 120.025 67.9967 119.815 67.9967 119.74 67.9967 119.79 89.0727 119.86 89.0727 120.04 89.0727 125.01 89.0377 130.01 89.0143 135.03 89.0318 140.015 89.0377 145.03 89.0318 150.02 89.0318 155.02 89.0318 156.91 89.0377 }
-set us_regions(ND.45) {143.825 4.99617 143.815 4.99617 143.81 4.99617 143.645 4.99617 143.535 4.99617 143.205 4.99617 143.05 4.99617 142.945 4.99617 142.875 4.99617 142.85 4.99617 142.75 4.99617 142.685 4.99617 142.215 4.99617 142.195 4.99617 141.89 4.99617 141.875 4.99617 141.805 4.99617 141.75 4.99617 141.69 4.99617 141.595 4.99617 141.57 4.99617 141.56 4.99617 141.5 4.99617 141.28 4.99617 141.25 4.99617 141.045 4.99617 140.985 4.99617 140.925 4.99617 140.905 4.99617 140.895 4.99617 140.715 4.99617 140.685 4.99617 140.58 4.99617 140.575 4.99617 140.455 4.99617 140.355 4.99617 140.25 4.99617 140.25 4.99617 140.205 4.99617 140.0 4.99617 139.835 4.99617 139.605 5.002 139.395 5.002 139.335 5.002 138.97 5.002 138.955 5.002 138.95 5.002 138.945 5.002 138.94 5.002 138.94 5.002 138.85 5.002 138.825 5.002 138.735 5.002 138.69 5.002 138.63 5.002 138.55 5.002 138.285 5.002 138.175 5.002 138.11 5.002 137.73 5.002 137.635 5.002 137.625 5.002 137.57 5.002 137.05 5.002 136.97 5.002 136.89 5.002 136.885 5.002 136.88 5.002 136.87 5.002 136.63 5.002 136.555 5.002 136.53 5.002 136.315 5.002 136.26 5.002 135.66 5.002 135.655 5.002 135.625 5.002 135.625 5.002 135.425 5.002 135.39 5.002 135.315 5.002 135.0 5.002 135.0 5.002 135.0 5.002 134.98 5.002 134.95 5.002 134.89 5.002 134.835 5.002 134.78 5.002 134.335 5.002 134.245 5.002 134.18 5.002 134.115 5.002 133.71 5.00784 133.685 5.00784 133.485 5.00784 133.265 5.00784 133.245 5.00784 133.14 5.00784 133.12 5.00784 133.115 5.00784 133.03 5.00784 132.635 5.00784 132.37 5.00784 132.37 5.00784 132.34 5.00784 132.26 5.00784 132.15 5.00784 132.06 5.00784 132.045 5.00784 131.715 5.00784 131.705 5.00784 131.595 5.00784 131.495 5.00784 131.42 5.00784 131.275 5.00784 131.165 5.00784 131.165 5.00784 130.945 5.00784 130.895 5.00784 130.835 5.00784 130.7 5.00784 130.695 5.00784 130.695 5.00784 130.69 5.00784 130.62 5.00784 130.61 5.00784 130.6 5.00784 130.59 5.00784 130.535 5.00784 130.43 5.00784 130.43 5.00784 130.4 5.00784 130.335 5.00784 130.3 5.00784 130.175 5.00784 130.065 5.00784 129.755 5.00784 129.75 5.00784 129.74 5.00784 129.73 5.00784 129.65 5.00784 129.19 5.00784 129.185 5.00784 129.1 5.00784 129.085 5.00784 129.075 5.00784 128.975 5.00784 128.97 5.00784 128.94 5.00784 128.935 5.00784 128.905 5.00784 128.76 5.00784 128.74 5.00784 128.46 5.00784 128.425 5.00784 128.36 5.00784 128.32 5.00784 128.24 5.00784 128.215 5.00784 128.17 5.00784 128.165 5.00784 128.125 5.00784 127.84 5.00784 127.84 5.002 127.83 5.00784 127.83 5.00784 127.77 5.00784 127.5 5.00784 127.22 5.00784 127.115 5.00784 127.03 5.00784 126.875 5.00784 126.855 5.00784 126.565 5.00784 126.515 5.00784 126.455 5.00784 126.25 5.00784 126.235 5.00784 125.905 5.00784 125.795 5.00784 125.735 5.00784 125.625 5.00784 125.465 5.002 125.43 5.002 125.41 5.00784 125.395 5.00784 125.36 5.00784 125.21 5.00784 125.06 5.00784 125.0 5.00784 124.915 5.00784 124.81 5.00784 124.7 5.00784 124.59 5.00784 124.545 5.00784 124.49 5.00784 124.375 5.00784 124.265 5.00784 124.155 5.00784 124.045 5.00784 123.995 5.00784 123.97 5.00784 123.935 5.00784 123.92 5.00784 123.9 5.00784 123.895 5.00784 123.875 5.00784 123.87 5.00784 123.845 5.00784 123.835 5.00784 123.83 5.00784 123.725 5.00784 123.725 5.00784 123.61 5.00784 123.515 5.00784 123.5 5.00784 123.44 5.00784 123.28 5.00784 123.175 5.00784 123.175 5.00784 122.85 5.00784 122.515 5.00784 122.405 5.002 122.3 5.00784 121.94 5.00784 121.865 5.00784 121.86 5.00784 121.855 5.00784 121.535 5.00784 121.205 5.00784 121.065 5.00784 120.985 5.00784 120.74 5.00784 120.725 5.00784 120.55 5.00784 120.375 5.00784 120.17 5.00784 120.165 5.00784 120.055 5.00784 120.0 5.00784 119.895 5.00784 119.83 5.00784 119.785 5.00784 119.7 5.00784 119.675 5.00784 119.655 5.00784 119.635 5.00784 119.62 5.00784 119.585 5.00784 119.56 5.00784 119.34 5.00784 119.24 5.00784 119.13 5.01367 119.02 5.01367 118.945 5.01367 118.93 5.01367 118.915 5.01367 118.68 5.00784 118.675 5.00784 118.625 5.00784 118.58 5.00784 118.53 5.00784 118.405 5.00784 118.255 5.00784 118.24 5.00784 118.145 5.00784 118.03 5.00784 117.94 5.00784 117.93 5.00784 117.82 5.00784 117.71 5.00784 117.6 5.00784 117.41 5.00784 117.405 5.00784 117.33 5.00784 117.255 5.00784 117.24 5.00784 117.225 5.00784 117.215 5.00784 117.185 5.00784 117.16 5.00784 116.83 5.00784 116.615 5.00784 116.395 5.00784 116.18 5.00784 116.17 5.00784 116.06 5.00784 116.05 5.00784 115.98 5.00784 115.975 5.00784 115.96 5.00784 115.85 5.00784 115.82 5.00784 115.815 5.00784 115.805 5.00784 115.78 5.00784 115.755 5.00784 115.63 5.00784 115.305 5.00784 115.305 5.00784 115.095 5.00784 115.0 5.00784 114.98 5.00784 114.755 5.00784 114.685 5.00784 114.65 5.00784 114.54 5.00784 114.43 5.00784 114.205 5.00784 114.095 5.00784 113.995 5.00784 113.985 5.00784 113.55 5.00784 113.44 5.00784 113.42 5.00784 113.33 5.00784 113.25 5.00784 113.245 5.00784 113.225 5.002 113.11 5.00784 113.0 5.00784 112.965 5.00784 112.89 5.00784 112.8 5.00784 112.78 5.00784 112.675 5.00784 112.66 5.00784 112.565 5.00784 112.345 5.00784 112.18 5.00784 112.125 5.00784 112.02 5.00784 112.015 5.00784 111.905 5.00784 111.365 5.00784 111.25 5.00784 110.965 5.00784 110.96 5.00784 110.95 5.00784 110.74 5.00784 110.72 5.00784 110.71 5.002 110.705 5.002 110.685 5.002 110.675 5.002 110.675 5.002 110.625 5.00784 110.615 5.00784 110.415 5.002 110.405 5.00784 110.39 5.00784 110.385 5.00784 110.155 5.00784 110.155 5.00784 110.12 5.002 110.095 5.00784 110.09 5.002 110.08 5.002 110.055 5.00784 110.04 5.00784 109.94 5.00784 109.9 5.002 109.76 5.002 109.755 5.002 109.775 26.3931 109.83 26.3931 110.05 26.3931 115.02 26.3931 120.005 26.3989 125.095 26.3989 130.07 26.4165 135.025 26.4281 140.005 26.4573 145.005 26.4573 147.185 26.4631 147.185 26.4456 145.0 12.9784 143.855 4.99617 143.85 4.99617 143.825 4.99617 143.825 4.99617 }
-set us_regions(DC.13) {244.4 75.483 244.805 76.4808 244.82 76.4691 245.0 76.2707 244.995 75.2729 244.4 75.483 }
-set us_regions(UT.56) {59.79 54.0627 59.745 89.026 59.995 89.0202 64.995 89.026 69.995 89.0202 74.995 89.0085 79.995 89.0377 84.775 89.0318 84.775 89.0318 84.75 61.0122 80.0 61.0355 75.02 61.0355 74.765 54.016 74.765 54.0043 74.755 54.0043 70.0 54.0277 64.995 54.0277 59.995 54.0685 59.79 54.0627 }
-set us_regions(OR.48) {9.77 31.3237 9.745 31.3645 9.765 31.8955 9.765 31.8955 9.75 32.0122 9.72 32.1348 9.52 32.7007 9.545 32.9458 9.55 32.9458 9.56 33.01 9.56 33.0392 9.555 33.045 9.55 33.0917 9.55 33.1442 9.545 33.1734 9.545 33.1792 9.545 33.2317 9.535 33.2901 9.505 33.4185 9.505 33.5176 9.45 33.7977 9.43 33.8969 9.37 33.9961 9.365 33.9961 9.3 34.1303 9.295 34.3462 9.265 34.5621 9.29 35.0639 9.25 35.3965 9.3 35.5015 9.305 35.5366 9.275 35.5891 9.29 35.8808 9.3 36.0034 9.2 36.3476 9.175 36.5635 9.23 36.7794 9.22 36.9486 9.215 37.0537 9.175 37.4154 9.135 37.6255 9.095 37.7772 9.065 38.0748 9.07 38.2615 9.06 38.6816 9.0 39.1368 9.02 39.3468 8.96 39.7553 8.935 39.8836 8.86 40.8756 8.855 40.8873 8.85 40.9689 8.82 41.1907 8.745 41.6808 8.745 41.6866 8.73 41.7683 8.57 42.3402 8.57 42.6378 8.55 42.7311 8.55 42.7369 8.47 43.0812 8.35 43.513 8.355 43.513 8.3 43.6997 8.235 43.8514 8.12 44.149 7.84 44.3474 7.81 44.3883 7.8 44.3883 7.69 45.1001 7.69 45.1818 7.67 45.2285 7.66 45.2635 7.665 45.6369 7.495 45.9754 7.425 46.1271 7.425 46.1796 7.43 46.3605 7.395 46.8273 7.335 47.014 7.345 47.014 7.24 47.3349 6.87 47.8834 6.87 47.8893 6.6 48.3794 6.505 48.7645 6.51 48.7645 6.87 48.9979 7.21 49.1788 7.28 49.2255 7.325 49.5522 7.405 49.6398 7.4 49.6398 7.495 49.6923 7.625 50.0599 7.55 50.2174 7.495 50.2699 7.495 50.2699 7.485 50.2816 7.47 50.2991 7.28 50.515 7.26 50.515 7.22 50.5675 7.28 51.0985 7.495 51.2269 7.53 51.2444 7.505 51.3202 7.495 51.3903 7.525 51.7637 7.6 52.0613 7.6 52.0613 7.59 52.1488 7.57 52.2655 7.59 52.4464 7.83 52.8548 7.825 52.9715 7.85 53.1408 7.895 53.3216 7.945 53.555 8.115 53.7943 8.12 53.8001 8.255 53.8993 8.34 54.016 8.355 54.0277 8.745 54.0277 10.165 54.0452 15.025 53.9927 20.125 53.9868 25.03 54.0627 30.005 54.0568 30.05 54.0452 35.15 54.0627 40.03 54.0277 44.87 54.016 44.995 40.9631 45.01 38.2965 45.0 34.7197 45.425 26.0488 45.42 26.043 45.0 26.0313 40.015 26.0022 35.005 26.0839 30.0 27.3209 25.07 28.4645 20.01 28.6863 15.015 25.1094 10.005 24.0883 9.37 24.1758 9.2 24.1816 9.225 24.2575 9.37 24.5726 9.775 24.9285 9.8 24.9927 9.86 25.1269 9.86 25.1328 9.91 25.2786 9.92 25.3195 9.92 25.3253 9.98 25.6754 9.975 25.8446 9.96 25.9321 9.885 26.008 9.825 26.078 9.8 26.1072 9.71 26.1422 9.695 26.7374 9.77 26.7782 9.79 26.9008 9.8 27.0933 9.675 27.5251 9.665 27.5484 9.665 27.5543 9.65 27.6885 9.83 27.9511 9.92 28.412 9.92 28.4879 9.91 28.6162 9.9 28.6338 9.895 28.6338 9.855 28.7271 9.845 28.838 9.815 29.0305 9.685 29.7016 9.71 29.9233 9.7 30.3843 9.625 30.5826 9.795 31.0786 9.785 31.2595 9.77 31.3237 }
-set us_regions(ID.17) {45.42 26.043 45.425 26.0488 45.0 34.7197 45.01 38.2965 44.995 40.9631 44.87 54.016 44.995 54.0277 49.995 54.0277 54.995 54.0393 59.76 54.0627 59.79 54.0627 59.995 54.0685 64.995 54.0277 70.0 54.0277 74.755 54.0043 74.765 54.0043 74.755 36.6919 70.025 36.2601 65.015 36.8786 60.0 28.1319 55.0 19.2336 50.0 12.43 49.755 5.002 49.755 4.99617 49.755 4.99617 49.695 4.99617 49.68 4.99617 49.235 4.99617 49.105 4.99617 49.095 4.99617 49.09 4.99617 48.935 4.99617 48.83 4.99617 48.81 4.99617 48.685 4.99617 48.685 4.99617 48.665 4.99617 48.52 4.99617 48.425 4.99617 48.36 4.99617 48.355 4.99617 48.33 4.99617 48.32 4.99617 48.205 4.99617 48.155 4.99617 47.645 5.002 47.625 5.002 47.585 5.002 47.58 5.002 47.505 5.002 47.495 5.002 47.495 5.002 47.49 5.002 47.485 5.002 47.475 5.002 47.175 5.002 47.03 5.002 46.93 5.002 46.87 5.002 46.49 5.002 46.485 5.002 46.445 5.002 46.325 5.002 46.31 5.002 46.275 5.002 46.245 5.002 46.215 5.002 46.215 5.002 46.21 5.002 45.86 5.002 45.855 5.002 45.79 5.002 45.31 5.00784 45.155 5.00784 44.995 5.00784 44.985 5.00784 44.89 5.00784 44.84 5.00784 44.84 5.17705 45.005 23.8782 45.42 26.043 }
-set us_regions(TX.55) {126.135 143.863 126.66 144.453 126.755 145.077 126.77 145.135 127.22 146.244 127.26 146.262 127.46 146.857 127.465 147.008 127.455 147.067 127.44 147.102 127.445 147.172 127.495 147.394 128.21 148.794 128.85 150.393 128.94 150.667 128.94 150.667 130.0 151.98 130.025 152.044 130.31 152.353 130.625 153.316 130.625 153.392 130.625 153.468 131.34 154.25 131.365 154.296 131.87 154.547 132.055 154.67 132.315 154.874 132.335 154.944 132.43 155.055 132.44 155.067 132.445 155.096 132.445 155.096 132.43 155.148 132.43 155.148 132.425 155.148 132.39 155.259 132.385 155.329 132.375 155.417 132.375 155.434 132.365 155.504 132.365 155.522 132.42 155.557 132.45 155.551 132.465 155.545 132.47 155.545 132.485 155.545 132.525 155.551 132.6 155.644 132.595 155.685 132.585 155.761 132.575 155.784 132.575 155.79 132.575 155.796 132.53 155.872 132.525 155.983 132.525 155.988 132.54 156.047 132.55 156.105 132.56 156.175 132.485 156.479 132.48 156.508 132.465 156.7 132.43 156.735 132.73 157.19 132.79 157.517 132.85 158.41 132.975 159.046 132.98 159.064 133.075 159.174 133.38 159.933 134.155 162.045 134.165 162.127 134.165 162.133 134.16 162.144 134.85 163.166 134.875 163.177 134.89 163.189 134.905 163.218 134.91 163.23 134.915 163.241 135.0 163.3 135.075 163.288 135.08 163.288 135.085 163.282 135.2 163.265 135.34 163.317 135.36 163.288 135.495 163.451 135.73 163.492 135.86 163.469 135.985 163.486 136.01 163.551 136.1 163.761 136.255 163.778 136.61 164.239 136.85 164.274 136.875 164.239 136.905 164.298 136.93 164.298 137.065 164.245 137.1 164.298 137.145 164.362 137.24 164.321 137.39 164.496 137.46 164.473 137.61 164.508 137.67 164.484 137.755 164.484 138.065 164.939 138.21 164.858 138.41 165.225 138.42 165.231 138.5 165.231 138.5 165.225 138.605 165.225 138.67 165.225 138.64 165.383 138.695 165.465 138.74 165.494 138.97 165.581 138.985 165.599 138.995 165.628 139.08 165.599 139.085 165.605 139.1 165.593 139.145 165.564 139.19 165.599 139.19 165.657 139.22 165.657 139.35 165.529 139.345 165.575 139.375 165.616 139.625 165.791 139.96 165.622 140.0 165.593 140.245 165.616 140.25 165.616 140.4 165.64 140.69 165.558 141.045 165.686 141.11 165.844 141.175 165.733 141.465 165.785 141.64 165.809 141.67 165.838 141.82 166.048 141.83 166.048 141.915 166.188 141.96 166.211 142.1 166.433 142.085 166.486 142.205 166.521 142.315 166.532 142.37 166.742 142.385 166.783 142.385 166.783 142.475 166.807 142.515 166.76 142.55 166.865 142.565 166.853 142.565 166.859 142.595 166.882 142.605 166.877 142.645 166.83 142.65 166.83 142.725 166.894 142.725 166.894 142.875 167.162 142.96 167.052 143.125 167.168 143.125 167.069 143.125 167.052 143.165 166.637 143.295 166.544 144.27 166.351 144.27 166.252 144.545 166.229 144.53 166.048 144.53 166.048 144.555 165.587 144.375 164.321 144.375 164.309 144.165 163.154 144.085 162.745 144.075 162.716 144.035 162.547 144.035 162.547 143.875 161.847 143.75 161.438 143.41 158.171 143.515 157.296 143.56 157.103 143.75 156.298 143.96 155.662 143.965 155.65 144.0 155.545 144.165 155.107 144.175 155.067 144.315 154.705 144.855 153.614 145.0 153.503 145.08 153.415 145.205 152.919 145.625 152.254 145.78 152.044 145.92 151.886 146.25 151.507 146.585 151.169 146.6 151.151 146.61 151.14 146.625 151.128 146.795 150.959 146.905 150.859 147.13 150.673 147.45 150.428 147.5 150.393 147.665 150.294 148.025 150.083 148.125 150.008 148.59 149.418 148.71 149.191 148.71 149.191 148.71 149.191 148.75 149.156 148.825 149.091 149.17 148.823 149.375 148.695 149.61 148.543 149.62 148.543 149.755 148.461 150.0 148.31 150.0 148.31 150.0 148.31 150.0 148.321 150.0 148.315 150.05 148.292 150.625 147.965 150.9 147.796 151.11 147.668 151.7 147.248 151.875 147.125 152.09 146.968 152.34 146.793 152.33 146.793 152.515 146.658 152.895 146.372 152.99 146.372 153.125 146.332 153.53 145.917 153.53 145.917 153.7 145.783 154.52 144.739 154.54 144.604 154.565 144.569 154.74 144.464 154.92 144.359 155.0 144.313 155.0 144.313 155.18 144.167 155.18 144.167 155.44 143.928 155.44 143.928 155.49 143.887 155.8 143.653 155.805 143.653 156.13 143.426 156.135 143.42 156.245 143.315 156.25 143.309 156.25 143.309 156.26 143.292 156.26 143.292 156.825 142.86 156.875 142.714 156.875 142.609 156.875 142.597 156.87 142.574 156.845 142.51 156.77 142.381 157.365 141.961 157.5 141.879 157.505 141.874 157.9 141.658 157.9 141.658 157.905 141.658 158.12 141.541 158.12 141.541 158.125 141.541 158.125 141.564 158.155 141.547 158.165 141.541 158.155 141.541 158.15 141.541 158.155 141.535 158.225 141.494 158.75 141.208 158.75 141.214 159.375 140.87 159.835 140.666 160.0 140.631 160.0 140.631 160.465 140.666 160.47 140.666 160.82 140.864 160.93 140.864 160.895 140.666 160.0 124.31 159.785 116.9 157.57 112.57 155.005 111.001 150.005 110.925 150.0 110.989 150.01 111.076 145.0 110.942 140.0 110.05 135.0 108.503 130.0 106.111 125.025 92.5328 120.035 92.527 115.085 92.527 115.0 92.527 114.99 92.527 114.88 92.5212 110.0 124.036 104.995 124.03 99.995 124.018 97.355 125.547 97.355 125.565 97.45 125.711 97.56 125.804 97.565 125.804 97.57 125.804 97.575 125.804 97.585 125.798 97.635 125.781 97.635 125.775 97.635 125.775 97.635 125.775 97.66 125.716 97.73 125.681 97.74 125.681 97.76 125.699 97.78 125.711 97.815 125.74 97.825 125.746 97.825 125.746 97.84 125.757 97.89 125.763 97.98 125.822 97.98 125.822 98.03 125.857 98.07 125.892 98.16 126.067 98.215 126.119 98.265 126.201 98.31 126.335 98.35 126.428 98.395 126.522 98.46 126.644 98.48 126.697 98.495 126.743 98.515 126.813 98.52 126.831 98.535 126.878 98.535 126.878 98.56 126.936 98.6 127.105 98.705 127.181 98.745 127.222 98.765 127.239 98.935 127.724 99.28 128.021 99.345 128.062 99.37 128.068 99.38 128.074 100.015 128.325 100.08 128.395 100.095 128.412 100.455 128.85 100.46 128.85 100.725 129.124 100.87 129.375 101.245 129.883 101.515 130.116 101.615 130.163 101.645 130.174 101.685 130.192 101.765 130.233 101.935 130.414 101.985 130.46 102.015 130.554 102.085 130.705 102.1 130.764 102.1 130.781 102.14 130.91 102.165 131.009 102.345 131.161 102.395 131.213 102.48 131.26 102.495 131.271 102.505 131.289 102.53 131.347 102.595 131.452 102.605 131.464 102.745 131.569 102.77 131.627 102.855 131.703 102.985 131.797 103.115 132.082 103.19 132.088 103.205 132.117 103.23 132.141 103.54 132.258 103.74 132.462 103.82 132.421 103.93 132.415 103.93 132.421 103.945 132.438 104.16 132.584 104.165 132.584 104.355 132.788 104.37 132.8 104.6 133.139 104.795 133.22 104.97 133.244 104.99 133.29 104.99 133.296 105.005 133.343 105.04 133.36 105.07 133.401 105.07 133.413 105.07 133.419 105.075 133.442 105.1 133.635 105.215 133.769 105.38 133.81 105.405 133.88 105.47 134.002 105.515 134.078 105.52 134.107 105.55 134.195 105.565 134.306 105.595 134.393 105.625 134.457 105.635 134.451 105.64 134.457 105.64 134.539 105.635 134.539 105.66 134.79 105.67 134.901 105.66 134.953 105.76 135.099 105.72 135.222 105.9 135.414 105.915 135.414 105.91 135.473 105.93 135.473 105.94 135.513 105.905 135.613 106.015 135.729 106.075 135.823 106.105 135.846 106.175 135.904 106.185 136.114 106.19 136.12 106.26 136.138 106.24 136.19 106.27 136.219 106.35 136.231 106.38 136.272 106.485 136.552 106.56 136.867 106.575 137.031 106.555 137.06 106.57 137.264 106.57 137.27 106.565 137.293 106.575 137.34 106.57 137.392 106.545 137.544 106.475 137.667 106.505 137.783 106.49 137.83 106.55 137.97 106.565 138.145 106.635 138.349 106.665 138.67 106.72 138.723 106.765 138.857 106.805 138.921 106.82 138.933 106.875 139.084 106.875 139.084 106.93 139.125 106.95 139.172 106.93 139.201 106.95 139.277 107.04 139.37 107.08 139.47 107.11 139.528 107.165 139.668 107.24 139.849 107.255 139.936 107.255 139.995 107.275 140.024 107.395 140.444 107.51 140.567 107.6 140.642 107.625 140.672 107.72 140.788 107.76 140.835 107.805 140.87 107.815 140.876 107.835 140.893 107.855 140.911 108.015 141.063 108.02 141.074 108.03 141.127 108.03 141.133 108.025 141.144 108.025 141.144 108.11 141.238 108.14 141.238 108.19 141.296 108.235 141.331 108.395 141.343 108.415 141.313 108.535 141.389 108.545 141.407 108.555 141.407 108.575 141.413 108.615 141.424 108.635 141.43 108.65 141.442 108.665 141.442 108.68 141.442 108.69 141.465 108.705 141.494 108.73 141.494 108.76 141.518 108.82 141.559 108.82 141.564 108.845 141.687 108.85 141.687 108.855 141.687 108.86 141.681 108.93 141.64 108.935 141.652 108.945 141.658 108.945 141.699 108.93 141.868 109.03 141.984 109.035 141.996 109.095 142.078 109.095 142.107 109.14 142.183 109.145 142.206 109.28 142.329 109.32 142.346 109.37 142.375 109.375 142.375 109.375 142.375 109.535 142.521 109.57 142.591 109.6 142.626 109.615 142.626 109.65 142.638 109.655 142.65 109.715 142.679 109.72 142.685 109.715 142.702 109.735 142.743 109.74 142.743 109.81 142.796 109.87 142.842 109.875 142.842 109.965 142.889 109.995 142.901 110.0 142.906 110.155 142.947 110.155 142.947 110.165 142.947 110.39 143.0 110.485 143.035 110.5 143.029 110.51 143.041 110.64 143.064 110.65 143.076 110.665 143.07 110.72 143.07 110.72 143.07 110.78 143.087 110.92 143.128 110.98 143.221 111.035 143.204 111.09 143.204 111.09 143.204 111.09 143.216 111.125 143.303 111.095 143.344 111.15 143.496 111.275 143.49 111.295 143.519 111.455 143.747 111.71 143.852 111.945 143.881 112.085 143.992 112.105 143.992 112.115 143.98 112.125 143.968 112.285 144.027 112.35 144.062 112.375 144.19 112.55 144.324 112.645 144.441 112.745 144.552 112.84 144.674 112.885 144.744 112.89 144.739 112.915 144.744 112.915 144.768 112.915 144.774 112.97 144.768 113.045 144.797 113.25 144.797 113.28 144.715 113.28 144.721 113.33 144.733 113.365 144.785 113.44 144.861 113.465 144.884 113.45 144.931 113.52 144.995 113.525 144.995 113.57 145.182 113.57 145.188 113.795 145.176 113.805 145.165 113.815 145.153 113.86 145.1 113.88 145.13 113.98 145.13 114.06 145.159 114.08 145.165 114.09 145.17 114.34 145.153 114.475 144.803 114.47 144.744 114.475 144.733 114.495 144.657 114.5 144.645 114.5 144.639 114.515 144.61 114.6 144.429 114.735 144.342 114.925 144.138 114.925 144.132 114.93 144.073 114.96 144.003 114.995 143.98 114.995 143.968 115.0 143.951 115.015 143.863 115.015 143.799 115.05 143.758 115.275 143.717 115.28 143.717 115.385 143.694 115.385 143.694 115.41 143.659 115.42 143.531 115.515 143.064 115.56 142.831 115.58 142.749 115.62 142.568 115.625 142.568 115.69 142.58 115.775 142.469 115.785 142.41 115.785 142.41 115.795 142.399 115.905 142.253 115.87 142.212 115.835 142.165 115.88 141.897 115.87 141.839 115.93 141.734 115.975 141.541 115.965 141.518 115.96 141.383 116.12 141.103 116.18 141.022 116.21 140.852 116.305 140.765 116.295 140.602 116.31 140.572 116.315 140.549 116.375 140.485 116.505 140.251 116.51 140.17 116.515 140.152 116.55 139.983 116.585 139.948 116.945 139.802 116.96 139.802 116.975 139.791 117.045 139.796 117.135 139.703 117.14 139.656 117.17 139.65 117.265 139.82 117.41 139.592 117.495 139.569 117.5 139.569 117.74 139.61 117.905 139.656 118.065 139.68 118.13 139.388 118.18 139.154 118.255 139.003 118.385 138.915 118.395 138.886 118.4 138.886 118.425 138.88 118.515 138.915 118.565 138.944 118.655 138.962 118.745 139.049 118.745 139.02 118.78 139.044 118.87 139.143 119.02 139.184 119.035 139.143 119.085 139.114 119.17 139.26 119.255 139.37 119.26 139.382 119.26 139.382 119.32 139.429 119.41 139.429 119.54 139.493 119.62 139.522 119.625 139.528 119.8 139.429 120.0 139.4 120.09 139.405 120.12 139.33 120.275 139.429 120.54 139.458 120.55 139.458 120.68 139.44 120.725 139.388 120.975 139.429 120.945 139.545 121.06 139.575 121.195 139.569 121.345 139.639 121.41 139.633 121.42 139.645 121.7 139.656 121.87 139.645 121.875 139.645 121.875 139.645 122.24 139.411 123.135 140.152 123.47 140.666 123.445 140.73 123.61 140.695 123.63 140.666 123.73 140.654 123.74 140.666 123.75 140.672 123.75 140.777 123.75 140.87 123.79 141.092 123.785 141.092 123.785 141.092 123.765 141.115 124.1 141.43 124.115 141.436 124.16 141.541 124.16 141.541 124.19 141.605 124.19 141.605 124.24 141.693 124.25 141.71 124.335 141.699 124.35 141.693 124.375 141.716 124.38 141.716 124.38 141.728 124.49 141.745 124.555 141.751 124.68 141.821 124.7 141.85 124.7 141.85 124.705 141.891 124.71 141.897 124.715 141.926 124.805 142.125 124.93 142.416 124.93 142.422 124.95 142.463 124.985 142.486 125.0 142.492 125.0 142.492 125.27 142.626 125.36 142.755 125.4 142.761 125.505 142.871 126.025 143.35 126.135 143.863 }
-set us_regions(WY.62) {84.75 61.0122 84.995 61.0122 89.995 61.0063 94.995 60.9947 99.995 61.0355 104.995 61.0297 109.735 61.0063 109.735 61.0063 109.735 47.0082 109.71 33.0275 109.7 33.0275 104.995 33.01 99.995 33.0567 94.995 33.0333 89.995 33.0042 84.995 33.01 79.995 32.9867 74.995 32.9983 74.755 36.6919 74.765 54.0043 74.765 54.016 75.02 61.0355 80.0 61.0355 84.75 61.0122 }
-set us_regions(MA.28) {271.005 53.9577 274.555 57.9955 274.74 58.1005 274.855 58.3923 274.87 58.4156 275.005 58.5381 275.52 58.4273 275.53 59.2208 276.755 58.9407 276.98 58.9232 277.535 59.0574 277.62 59.1275 280.005 59.6993 279.97 57.978 278.83 58.3339 277.55 57.7737 277.485 57.5112 277.485 57.5112 278.13 57.0969 279.53 56.7585 279.61 56.7293 279.66 56.7701 279.975 57.6162 280.02 53.5959 278.615 53.2166 278.385 53.1933 278.13 53.1641 276.88 52.9132 276.815 52.8198 276.62 52.2655 276.705 51.3903 276.76 51.1744 276.915 50.515 276.405 48.7645 276.325 47.8893 276.265 47.8893 274.98 47.9709 269.965 49.0154 267.705 48.9279 265.0 48.8287 263.75 48.7937 263.675 48.7937 262.565 53.6659 262.585 53.6659 265.0 53.7476 270.0 53.8293 271.005 53.9577 }
-set us_regions(RI.50) {274.555 57.9955 271.005 53.9577 270.465 58.8882 271.045 59.7285 271.355 59.0749 271.74 58.9291 271.875 58.8766 272.125 58.7715 272.455 58.8649 274.555 57.9955 }
-set us_regions(CT.11) {270.465 58.8882 271.005 53.9577 270.0 53.8293 265.0 53.7476 262.585 53.6659 262.565 53.6659 262.56 53.8059 265.0 60.4053 270.005 58.9466 270.465 58.8882 }
-set us_regions(OH.46) {227.405 63.5446 227.4 51.7228 227.35 51.7345 224.98 52.248 224.95 52.2538 224.465 52.353 224.045 52.4347 223.545 52.6448 222.525 53.3391 222.235 53.5492 221.875 53.8059 221.875 53.8001 221.67 53.946 221.57 54.016 221.455 54.016 221.06 54.2727 220.145 54.8737 220.0 54.9671 218.75 55.7957 218.335 56.0641 218.26 56.1166 216.37 56.1283 216.25 56.0466 215.97 55.854 215.965 55.854 215.84 55.7665 215.84 55.7665 215.02 55.2122 214.665 54.9788 214.665 54.9729 214.44 54.3019 214.375 54.3603 209.91 55.9999 205.97 56.1458 205.9 74.281 209.99 76.5566 214.98 76.9125 217.02 79.054 217.03 79.0715 217.035 79.0773 220.0 74.8353 225.0 71.0484 227.405 63.5446 }
-set us_regions(TN.54) {181.335 96.0222 180.005 99.103 178.45 103.03 178.455 103.059 179.99 103.065 185.0 103.065 189.0 103.059 189.0 103.059 190.0 102.989 195.0 103.065 199.965 103.106 201.945 103.135 201.975 103.135 201.98 103.135 205.0 103.118 208.39 103.112 210.0 100.054 214.995 97.6151 219.985 94.8727 221.61 91.9085 221.61 91.9085 221.61 91.9085 219.97 91.8676 214.975 91.8676 211.625 91.821 211.62 91.8326 209.975 91.8968 204.875 91.6926 199.985 91.6226 194.975 91.5175 190.0 91.2958 185.0 92.5095 182.915 92.5328 182.575 92.5445 182.305 92.5387 181.335 96.0222 }
-set us_regions(CO.10) {114.99 89.026 115.0 89.026 119.775 89.0727 119.79 89.0727 119.74 67.9967 119.74 67.9208 115.0 61.0005 109.995 61.0063 109.735 61.0063 109.735 61.0063 104.995 61.0297 99.995 61.0355 94.995 60.9947 89.995 61.0063 84.995 61.0122 84.75 61.0122 84.775 89.0318 84.775 89.0318 85.195 89.0318 90.015 89.026 95.07 89.026 100.015 89.0552 105.495 89.0727 110.015 89.0552 114.99 89.026 }
-set us_regions(VA.58) {220.16 85.2624 220.0 85.4141 215.0 90.0413 211.625 91.821 211.625 91.821 214.975 91.8676 219.97 91.8676 221.61 91.9085 221.61 91.9085 221.655 91.9085 225.0 92.0835 230.0 92.2294 235.0 92.2294 240.0 92.2177 245.0 92.2177 250.015 92.1711 251.01 92.1711 250.9 91.6518 250.75 91.1908 250.685 91.0157 250.65 90.8874 250.625 90.8173 250.615 90.7473 250.605 90.7065 250.605 90.7006 250.495 90.1347 250.475 90.0296 250.455 89.9246 250.43 89.8021 250.365 89.4695 250.455 89.0902 250.47 89.026 250.625 88.5534 251.015 88.1507 251.25 87.8007 251.36 87.2755 251.425 87.0946 251.795 86.4878 251.875 86.2485 252.015 85.8693 252.125 85.525 252.225 85.3383 252.365 85.0524 252.36 84.9473 252.305 84.8073 252.42 84.3988 252.5 84.1188 252.535 84.0371 252.65 83.7862 252.65 83.7803 252.65 83.7745 252.775 83.5003 252.955 83.2785 253.125 83.3544 253.625 82.8993 253.75 82.5958 254.06 82.024 254.17 81.8314 250.0 82.3508 245.0 80.0693 244.805 76.4866 244.805 76.4808 244.4 75.483 241.405 72.7755 241.405 72.7755 239.965 73.289 235.0 76.1015 235.0 76.1131 235.0 76.154 229.995 82.059 224.995 86.9429 220.16 85.2624 }
-set us_regions(MS.31) {174.17 117.005 175.0 120.459 175.005 120.658 175.0 120.891 175.0 121.352 175.0 121.533 175.0 122.7 175.0 131.044 180.0 131.026 184.52 136.879 184.625 136.961 184.755 136.867 184.93 136.867 184.97 136.896 185.0 136.902 185.0 136.902 185.0 136.914 185.335 136.914 185.5 136.85 186.025 136.64 186.59 136.774 186.655 136.791 186.765 136.803 186.91 136.826 187.765 137.013 188.08 136.931 189.0 103.059 189.0 103.059 185.0 103.065 179.99 103.065 178.455 103.059 175.01 110.277 175.0 111.438 175.03 111.619 174.17 117.005 174.17 117.005 }
-set us_regions(NY.41) {235.345 48.0643 235.215 48.1868 235.015 48.3736 235.0 48.3852 234.78 48.5019 234.77 48.5019 233.44 49.208 233.31 49.278 233.17 49.348 232.94 49.4705 232.52 49.6923 232.34 49.7856 231.685 50.1357 231.19 50.4041 231.185 50.515 235.0 54.0218 240.0 54.0218 245.0 54.0102 250.03 54.0218 255.0 57.4645 256.525 58.5148 259.98 60.7204 260.0 62.5818 259.79 64.4548 260.28 64.3615 260.565 64.5832 260.585 64.5482 261.155 64.2798 261.47 64.2798 261.49 64.2798 261.86 64.2798 262.125 64.3031 262.25 64.3206 262.355 64.344 262.44 64.3615 262.495 64.3673 262.575 64.3731 262.875 64.2798 263.675 64.1281 264.4 63.8246 264.44 63.8071 265.625 63.2936 265.755 63.247 265.96 63.1594 266.09 63.1011 266.25 63.0252 266.36 62.9844 266.535 62.9202 266.955 62.7685 267.06 62.7277 267.29 62.6285 267.715 62.4534 268.125 62.29 268.39 62.1442 268.675 61.9924 268.955 61.8466 269.025 61.8174 269.375 61.6365 269.43 61.6132 269.745 61.4556 270.1 61.2689 271.11 60.4462 271.095 60.3703 271.045 60.1428 271.045 59.7285 270.465 58.8882 270.005 58.9466 265.0 60.4053 262.56 53.8059 262.565 53.6659 263.675 48.7937 263.285 32.9341 263.24 32.9341 263.24 32.9341 263.145 32.9341 263.145 32.9341 263.14 32.9341 263.135 32.9341 263.135 32.9341 263.06 32.94 262.995 32.94 262.79 32.9458 262.74 32.9458 262.735 32.9458 262.58 32.9575 262.47 32.9575 262.415 32.9633 262.405 32.9633 262.34 32.9633 262.2 32.9692 262.135 32.9692 261.985 32.9808 261.875 32.9808 261.8 32.9867 261.74 32.9867 261.625 32.9925 261.425 32.9867 261.365 32.9867 261.215 32.9867 261.185 32.9867 261.07 32.9867 261.04 32.9867 260.99 32.9925 260.985 32.9925 260.94 32.9925 260.925 32.9925 260.305 33.0158 260.21 33.0217 260.14 33.0275 260.0 33.0333 259.99 33.0333 259.925 33.0392 259.865 33.0392 259.765 33.045 259.76 33.045 259.58 33.0567 259.57 33.0567 259.525 33.0567 259.38 33.0625 259.275 33.0683 259.265 33.0683 259.255 33.0683 259.2 33.0683 259.125 33.0683 259.115 33.0683 259.07 33.0683 258.99 33.0683 258.86 33.0625 258.79 33.0625 258.785 33.0625 258.725 33.0625 258.715 33.0625 258.685 33.0683 258.49 33.0625 258.465 33.0625 258.46 33.0625 258.29 33.0625 258.285 33.0625 258.21 33.0567 258.2 33.0567 258.14 33.0567 258.095 33.0508 258.08 33.0508 258.0 33.045 257.885 33.0392 257.875 33.0392 257.79 33.0333 257.775 33.0333 257.75 33.0333 257.73 33.0333 257.71 33.0333 257.57 33.0275 257.535 33.0275 257.465 33.0217 257.46 33.0217 257.455 33.0275 257.425 33.0217 257.27 33.0217 257.205 33.0217 257.14 33.0158 257.08 33.0158 256.985 33.0158 256.97 33.0158 256.93 33.0158 256.92 33.0158 256.875 33.0158 256.875 33.0158 256.855 33.0158 256.815 33.0158 256.81 33.0158 256.795 33.0158 256.79 33.0158 256.765 33.0158 256.75 33.0158 256.71 33.0158 256.695 33.01 256.69 33.01 256.61 33.01 256.57 33.01 256.425 33.01 256.37 33.045 256.3 33.0742 256.215 33.0508 256.19 33.01 256.07 32.975 256.025 32.9633 255.56 33.01 255.305 33.1209 255.265 33.115 254.985 33.2726 254.925 33.3426 254.675 33.506 254.305 33.7102 253.77 33.9611 253.72 34.0078 253.465 34.1653 253.47 34.2412 253.13 34.5329 252.78 34.813 252.71 34.8772 252.6 34.9764 252.55 35.0114 252.505 35.0464 252.5 35.0523 252.495 35.0581 252.47 35.0756 252.395 35.1573 252.1 35.4665 251.95 35.6299 251.695 35.8633 251.31 36.2659 250.945 36.7852 250.7 37.1879 250.625 37.2579 250.49 37.3863 250.4 37.4329 250.1 37.5846 250.085 37.5788 250.06 37.5788 250.05 37.5788 250.045 37.5788 250.0 37.5788 249.775 37.6897 249.645 37.8005 249.375 37.9464 249.18 38.3315 248.99 38.4949 248.675 38.5824 248.515 38.5999 248.235 39.0726 248.22 39.0784 248.125 39.1426 248.0 39.2243 247.505 40.012 247.5 40.012 246.325 42.0543 246.23 42.2235 246.12 42.6086 245.825 42.6086 245.445 42.6086 245.19 42.6086 245.0 42.6086 244.96 42.6086 244.335 42.5969 244.04 42.5969 243.705 42.5911 243.455 42.5911 243.06 42.5911 242.345 42.5911 241.26 42.5911 240.03 42.5969 239.805 42.5911 239.41 42.5969 239.03 42.5911 238.705 42.5911 238.535 42.5911 237.655 42.5794 235.0 43.3613 234.255 44.3883 234.375 44.6333 234.62 45.1235 234.65 45.176 234.72 45.2343 234.72 45.2402 234.72 45.2635 234.725 45.3569 234.73 45.4852 234.75 45.6661 234.735 45.7595 234.735 45.8062 234.745 45.8237 234.76 45.8587 234.775 45.9404 234.74 46.0921 234.71 46.2496 234.71 46.2555 234.68 46.343 234.665 46.3838 234.77 46.5064 234.8 46.5122 234.835 46.5239 234.855 46.5297 234.865 46.5297 234.905 46.5355 234.965 46.553 235.005 46.6231 234.94 47.119 235.085 47.2066 235.135 47.2474 235.34 47.3233 235.39 47.3699 235.42 47.4166 235.43 47.4341 235.44 47.4516 235.46 47.51 235.47 47.5683 235.47 47.6208 235.47 47.6675 235.47 47.6734 235.45 47.7725 235.44 47.8076 235.425 47.8484 235.345 48.0643 }
-set us_regions(IL.18) {184.335 89.1485 185.0 87.4564 189.85 83.4361 189.86 83.4302 190.0 81.6564 190.015 81.4172 190.0 81.2713 193.895 55.6906 193.96 55.6906 194.9 50.5617 194.375 50.5617 189.995 50.55 185.0 50.5442 180.0 50.4683 176.795 50.4567 176.785 50.4742 175.0 58.0188 175.01 59.8802 175.0 61.6657 172.905 65.3709 172.89 65.3884 175.0 72.0345 180.015 82.2807 184.335 89.1485 }
-set us_regions(MN.30) {173.91 43.5072 170.03 37.4096 169.99 21.0132 175.0 17.9557 180.0 16.9521 180.215 16.9696 182.585 11.9106 182.555 11.9048 182.5 11.9106 182.16 12.004 182.14 12.0215 182.085 12.0273 182.07 12.004 182.07 12.004 182.07 12.004 182.07 11.9982 182.06 11.9923 182.025 11.9748 182.01 11.969 181.985 11.969 181.97 11.9632 181.965 11.9573 181.955 11.9457 181.91 11.9281 181.885 11.9223 181.88 11.9281 181.875 11.9281 181.875 11.9281 181.875 11.9223 181.83 11.9398 181.81 11.9457 181.72 11.9515 181.67 11.9515 181.655 11.9457 181.64 11.934 181.56 11.9281 181.475 11.9573 181.46 11.934 181.41 11.8873 181.38 11.864 180.885 11.9281 180.855 11.9748 180.855 11.9865 180.845 12.004 180.845 12.004 180.825 12.004 180.825 12.004 180.785 12.004 180.785 12.004 180.785 12.0215 180.76 12.0565 180.685 12.074 180.565 12.0974 180.365 11.9923 180.16 11.9048 180.125 11.8406 180.085 11.829 180.025 11.7881 180.02 11.7764 180.015 11.7589 180.02 11.7414 180.02 11.7298 180.0 11.5839 179.97 11.5489 179.785 11.3738 179.75 11.3563 179.38 11.2513 179.375 11.2513 179.375 11.2513 179.345 11.2279 179.32 11.2163 179.31 11.2163 179.28 11.2163 179.265 11.2279 178.75 11.2805 178.51 11.2863 178.48 11.2746 178.285 11.3388 178.28 11.3446 178.155 11.3446 178.09 11.3505 178.01 11.2863 177.525 11.3038 177.52 11.3096 177.5 11.3096 177.485 11.3096 177.46 11.3096 177.18 11.3096 177.16 11.2921 177.14 11.1521 177.045 11.1638 176.9 11.2221 176.875 11.2221 176.24 11.368 176.19 11.3155 176.165 11.2163 176.13 11.1754 176.13 11.1696 176.125 11.1638 176.12 11.1463 176.12 11.1463 176.105 11.1288 176.08 11.1054 176.065 11.1112 176.075 11.0587 176.03 11.0529 176.025 11.0529 176.04 11.012 176.11 10.8545 176.105 10.8545 176.095 10.8487 176.085 10.8545 175.985 10.802 175.945 10.7436 175.82 10.4752 175.8 10.3994 175.505 10.3177 175.445 10.3702 175.18 10.4461 175.115 10.4694 174.84 10.6853 174.84 10.6853 174.82 10.6795 174.82 10.6795 174.815 10.6795 174.77 10.6795 174.735 10.6911 174.72 10.6853 174.31 10.942 174.31 10.9479 174.11 11.1288 174.085 11.1463 174.05 11.1288 174.05 11.1288 174.05 11.1288 173.75 11.4147 173.75 11.4147 173.69 11.4438 173.465 11.4964 173.445 11.4964 173.36 11.508 173.355 11.508 173.335 11.5197 173.325 11.5197 173.255 11.5022 173.23 11.508 172.885 11.6481 172.84 11.6656 172.81 11.6539 172.805 11.6481 172.795 11.6131 172.79 11.6072 172.745 11.5255 171.795 11.3155 171.54 11.1754 171.445 11.1813 171.465 10.9304 171.455 10.7962 171.385 10.7903 171.29 10.6094 171.25 10.6094 171.205 10.5686 171.01 10.5861 170.7 10.5511 170.625 10.4461 170.465 10.341 170.46 10.3352 170.23 10.2535 170.23 10.2477 170.23 10.2418 170.18 10.2302 170.145 10.2302 170.15 10.2593 170.13 10.2827 170.125 10.2885 170.115 10.2885 170.115 10.2768 170.11 10.271 170.1 10.271 170.0 10.1601 170.0 9.75169 169.545 9.52413 169.54 9.51829 168.52 10.0551 168.525 10.0668 168.65 10.2535 168.65 10.2652 168.375 10.3469 168.33 10.3644 168.165 10.4519 168.15 10.4519 168.105 10.3819 168.08 10.3118 168.08 10.306 168.035 10.1893 168.03 10.1776 167.865 9.86839 167.8 9.80421 167.795 9.79254 167.725 9.68167 167.71 9.6525 167.655 9.54746 167.65 9.52996 167.5 8.91145 167.33 8.87061 166.885 8.93479 166.875 8.93479 166.865 8.93479 166.48 8.63721 166.495 8.59636 166.715 8.503 166.715 8.503 166.73 8.49133 166.765 8.503 166.805 8.503 166.815 8.50884 166.83 8.503 166.835 8.503 166.845 8.45632 166.845 8.44465 166.845 8.44465 166.845 8.43882 166.875 8.40964 166.875 8.40964 166.87 8.40964 166.865 8.4038 166.865 8.36296 166.845 8.29294 166.825 8.20542 166.775 8.19375 166.575 8.19958 166.435 8.21709 166.36 8.22875 165.625 7.88449 165.455 7.83197 165.25 7.62775 165.25 7.59274 165.225 7.58107 165.1 7.62775 165.075 7.63942 165.0 7.63359 164.91 7.62775 164.56 7.61025 164.375 7.62192 164.29 7.62775 164.235 7.63359 164.12 7.63942 164.1 7.62775 164.055 7.58107 164.04 7.57524 163.255 7.62775 163.25 7.64525 163.235 7.69777 163.235 7.69777 163.165 7.74445 163.125 7.76779 163.03 7.77946 163.005 7.77363 162.99 7.75612 162.99 7.75029 162.925 7.76779 162.845 7.8203 162.74 7.85532 162.67 7.89033 162.69 7.98368 162.69 7.98368 162.585 8.19958 162.06 8.29878 162.055 8.29878 162.05 8.29878 161.91 8.33379 161.41 8.38046 161.22 8.39797 161.17 8.39213 161.14 8.39213 161.095 8.39213 161.03 8.39213 160.925 8.31628 160.94 8.15874 160.94 8.15874 160.97 7.97201 160.83 7.62775 160.635 7.58691 160.595 7.58691 160.43 7.56357 160.425 7.56357 160.01 7.51105 159.615 7.49354 159.6 7.49354 159.375 7.49354 159.155 7.46437 158.765 7.42353 158.755 7.41186 158.75 7.40602 158.75 7.40602 158.71 7.16095 158.68 7.11427 158.63 7.1026 158.505 7.03842 158.46 7.03258 158.235 7.07342 158.135 7.04425 158.12 7.03842 158.105 7.02675 158.08 7.02091 157.91 7.03258 157.9 7.03258 157.88 7.06175 157.88 7.06759 157.85 7.09676 157.8 7.13761 157.78 7.14928 157.74 7.15512 157.69 7.13761 157.42 7.09676 157.41 7.09676 157.37 7.09093 157.31 7.08509 157.27 7.01508 157.245 6.99757 157.065 6.98007 157.055 6.97423 157.05 6.97423 157.05 6.96839 157.045 6.96839 157.035 6.95089 156.95 6.88087 156.905 6.84003 156.875 6.83419 156.85 6.82836 156.825 6.82252 156.805 6.81668 156.795 6.81668 156.775 6.75834 156.77 6.7525 156.775 6.7525 156.74 6.71166 156.71 6.68832 156.675 6.6533 156.59 6.58912 156.55 6.55995 156.545 6.55411 156.545 6.55411 156.545 6.54828 156.525 6.45492 156.52 6.42574 156.52 6.39073 156.515 6.31488 156.48 6.23318 156.485 6.19234 156.5 6.169 156.55 6.13399 156.555 6.07564 156.535 6.02896 156.55 5.95894 156.55 5.95894 156.545 5.94143 156.54 5.91809 156.58 5.89475 156.58 5.87725 156.585 5.8189 156.585 5.81307 156.49 5.38128 156.405 5.002 156.405 5.002 156.25 5.002 156.25 4.3018 155.785 2.73218 155.73 2.73218 155.625 2.67967 155.135 2.42293 155.0 2.45794 155.0 2.45794 154.375 2.41709 154.235 2.31207 154.235 2.3179 154.235 2.41709 154.235 2.41709 154.235 2.42876 154.235 2.44043 154.235 2.52213 154.235 2.53963 154.235 2.58631 154.235 2.59798 154.235 2.59798 154.235 2.59798 154.235 2.60382 154.235 2.73802 154.235 2.73802 154.235 2.73802 154.235 2.73802 154.235 2.74386 154.235 2.79054 154.235 2.83721 154.235 2.84305 154.235 2.84888 154.235 2.84888 154.235 2.86055 154.235 2.98309 154.235 3.2515 154.235 3.26317 154.235 3.28067 154.235 3.38571 154.235 3.44989 154.235 3.46156 154.235 3.64828 154.235 3.70663 154.235 3.7358 154.235 3.75331 154.235 3.77082 154.23 4.12675 154.235 4.12675 154.23 4.94949 154.23 5.002 154.23 5.00784 153.75 5.00784 153.585 5.00784 153.525 5.01367 153.46 5.01367 153.425 5.01367 153.42 5.00784 153.385 5.00784 153.295 5.01367 153.22 5.01367 153.155 5.01367 153.13 5.00784 153.125 5.00784 153.125 5.00784 153.12 5.00784 153.025 5.00784 152.875 5.00784 152.805 5.00784 152.745 5.00784 152.63 5.00784 152.585 5.00784 152.58 5.00784 152.5 5.00784 152.5 5.00784 152.5 5.00784 152.475 5.00784 152.32 5.00784 151.915 5.00784 151.785 5.00784 151.71 5.00784 151.695 5.00784 151.695 5.00784 151.69 5.00784 151.675 5.00784 151.41 5.00784 151.205 5.002 151.17 5.002 151.165 5.002 150.725 5.002 150.72 5.002 150.615 5.002 150.52 5.002 150.39 5.002 150.385 5.002 150.27 5.002 150.125 5.002 150.11 5.002 150.0 5.002 149.96 5.002 149.775 5.002 149.375 5.002 149.3 5.002 148.955 5.002 148.75 5.002 148.53 5.002 148.205 5.002 147.975 5.002 147.755 5.002 147.7 5.002 147.51 5.002 147.505 5.002 147.49 5.002 147.47 5.002 147.32 5.002 147.32 5.002 146.875 5.002 146.655 5.002 146.325 5.002 146.25 5.002 146.01 5.002 146.0 5.002 145.99 5.002 145.785 5.002 145.35 5.002 145.345 5.002 145.345 4.99617 145.0 5.002 145.0 5.002 144.69 4.99617 144.58 4.99617 144.47 4.99617 144.245 4.99617 144.16 4.99617 144.1 4.99617 144.09 4.99617 144.07 4.99617 144.03 4.99617 144.02 4.99617 143.985 4.99617 143.98 4.99617 143.965 4.99617 143.92 4.99617 143.86 4.99617 143.855 4.99617 145.0 12.9784 147.185 26.4456 147.185 26.4631 147.735 43.513 147.765 43.5072 150.01 43.513 155.03 43.5072 160.045 43.513 165.055 43.5188 170.02 43.5072 173.91 43.5072 }
-set us_regions(MI.29) {193.96 55.6906 194.375 55.6848 195.33 55.6906 200.005 55.6965 205.0 55.6965 205.97 56.1458 209.91 55.9999 214.375 54.3603 214.44 54.3019 214.375 54.1094 214.345 54.016 214.34 53.9927 214.315 53.9226 214.31 53.9168 214.29 53.8468 214.28 53.8176 214.265 53.7709 214.255 53.7243 214.275 53.6367 214.275 53.6309 214.325 53.4267 214.33 53.3975 214.335 53.3858 214.335 53.38 214.355 53.3041 214.36 53.2808 214.36 53.275 214.365 53.2575 214.375 53.2108 214.38 53.1874 214.385 53.1641 214.395 53.1349 214.39 53.1291 214.39 53.1116 214.385 53.0941 214.375 53.0532 214.36 52.9599 214.33 52.7907 214.335 52.7206 214.34 52.6623 214.34 52.6448 214.345 52.5923 214.345 52.5631 214.35 52.5164 214.35 52.4931 214.36 52.3705 214.36 52.3414 214.39 52.2888 214.41 52.2597 214.43 52.2188 214.445 52.1896 214.47 52.1255 214.51 52.0088 214.515 51.9854 214.545 51.9387 214.6 51.857 214.605 51.8512 214.63 51.8337 214.68 51.7929 214.685 51.787 214.75 51.7637 214.8 51.7462 214.805 51.7462 214.805 51.7403 214.87 51.717 214.905 51.7053 214.91 51.7053 214.93 51.7053 214.975 51.6995 214.995 51.6937 215.055 51.6878 215.205 51.6353 215.275 51.5828 215.29 51.577 215.34 51.5653 215.38 51.5536 215.38 51.5536 215.385 51.5478 215.43 51.5361 215.445 51.5303 215.47 51.5245 215.505 51.507 215.535 51.5011 215.54 51.5011 215.55 51.4953 215.575 51.4894 215.625 51.4719 215.855 51.3903 215.905 51.3261 215.945 51.2677 216.25 50.8593 216.35 50.7134 216.37 50.69 216.385 50.6725 216.495 50.515 216.495 50.515 216.605 50.3575 216.615 50.3458 216.665 50.2758 216.875 50.1124 217.09 50.1007 217.14 50.0132 217.205 49.949 217.405 49.7098 217.41 49.7039 217.42 49.6573 217.425 49.6398 217.445 49.5814 217.45 49.4414 217.45 49.4063 217.495 49.2021 217.5 49.1905 217.505 49.1788 217.515 49.1496 217.52 49.1379 217.53 49.0971 217.565 49.0212 217.58 48.9862 217.58 48.9162 217.635 48.747 217.59 48.3677 217.6 48.2802 217.61 48.2277 217.64 48.1285 217.65 47.8717 217.69 47.6617 217.76 47.4516 217.765 47.4516 217.785 47.4283 217.815 47.3991 217.89 47.2999 217.92 47.2416 217.925 47.2182 217.925 47.1599 217.92 47.154 217.91 47.1365 217.895 47.119 217.885 47.0198 217.885 47.014 217.91 46.9848 217.92 46.9732 217.95 46.9148 217.95 46.909 218.005 46.7223 218.05 46.5764 218.125 46.378 218.125 46.3955 218.215 46.1388 218.22 46.1388 218.275 45.9754 218.33 45.8237 218.85 44.3591 219.375 42.8186 219.375 42.807 219.33 42.5269 219.275 42.1418 219.03 40.6188 218.9 39.8136 218.75 38.8975 218.75 38.8567 218.55 37.643 218.51 37.3921 218.35 36.4235 218.22 35.6358 218.225 35.6358 218.165 35.2857 218.125 35.0523 218.125 34.9939 218.07 34.7605 218.085 34.7605 217.955 34.002 217.545 31.5513 217.5 31.2712 217.495 31.2595 216.985 30.3843 216.685 30.1917 216.25 29.9116 215.625 29.5323 215.605 29.509 215.0 29.1122 214.805 28.9897 214.375 28.7213 214.235 28.6338 212.58 27.6068 212.5 27.6068 211.815 27.5893 212.26 26.8833 212.405 26.6615 212.5 26.5215 212.83 26.0138 212.82 26.008 212.5 25.6579 211.875 25.1911 210.625 25.4303 210.35 25.5937 210.345 25.5937 210.275 25.6054 210.225 25.6054 210.12 25.2903 210.0 25.2028 209.97 25.1794 209.97 25.1328 209.835 24.8585 209.645 24.7185 209.515 24.4267 209.46 24.3217 209.46 24.3158 209.475 24.2867 209.49 24.2575 209.455 24.1583 209.405 23.8024 209.415 23.6682 209.31 23.4114 209.375 22.7171 209.375 22.7171 209.435 22.507 209.445 22.4778 209.445 22.4778 209.415 22.3961 209.385 22.3611 209.385 22.3611 209.375 22.3436 209.355 22.2969 209.27 22.2911 209.265 22.2911 209.255 22.2969 209.24 22.3028 209.235 22.3086 209.22 22.3144 209.205 22.3144 209.19 22.3203 208.87 22.2678 208.75 22.4662 208.73 22.5012 208.72 22.507 208.68 22.542 208.665 22.5478 208.535 22.5595 208.47 22.5362 208.375 22.507 208.355 22.4953 208.31 22.4662 208.195 22.4487 208.125 22.4487 208.125 22.4487 208.06 22.4895 208.035 22.507 208.015 22.5128 207.995 22.507 207.97 22.507 207.9 22.5012 207.89 22.507 207.775 22.5829 207.685 22.7346 207.665 22.7696 207.62 22.8396 207.215 22.7812 207.215 22.7812 207.215 22.7812 207.05 22.5829 206.985 22.507 205.705 19.7821 204.37 19.006 203.84 18.6792 203.83 18.6734 203.75 18.6267 203.75 18.6092 202.9 18.1308 202.92 18.1308 201.39 17.2555 201.395 17.2555 201.25 17.1563 201.25 17.1738 200.725 16.8646 200.625 16.8062 200.625 16.7887 200.0 16.4328 200.0 16.4736 199.865 16.3803 199.9 16.3803 199.375 16.0885 199.375 16.0418 198.75 15.6859 198.75 15.6625 198.475 15.505 198.435 15.505 198.195 15.3766 198.125 15.3416 198.125 15.3416 197.5 15.0265 197.5 15.0207 196.875 14.6648 196.875 14.6823 196.83 14.6298 196.845 14.6298 196.25 14.2797 196.25 14.303 196.165 14.2563 195.255 13.7545 195.295 13.7545 194.435 13.276 193.75 12.9084 193.695 12.8793 192.115 12.004 192.13 12.004 191.875 11.8698 191.875 11.8581 191.76 11.7998 191.25 11.5547 191.25 11.543 190.625 11.1988 190.625 11.2104 190.46 11.1288 190.445 11.1288 190.0 10.9129 190.0 10.8545 189.135 10.3877 188.78 10.1952 188.75 10.1835 188.75 10.1835 188.46 10.0259 188.18 9.87422 188.125 9.86839 188.125 9.86839 186.735 10.2535 186.73 10.2535 186.25 10.4927 186.25 10.4927 185.985 10.6444 185.145 11.1288 185.14 11.1288 185.0 11.2104 185.0 11.2104 183.625 12.004 183.625 12.004 183.2 12.144 182.84 12.004 182.845 12.004 182.73 11.9573 182.585 11.9106 180.215 16.9696 180.0 23.814 185.0 25.302 190.0 27.4492 195.0 29.8999 195.005 38.915 194.9 50.5558 194.9 50.5617 193.96 55.6906 }
-set us_regions(MD.27) {232.615 69.9747 234.995 71.8186 240.0 70.815 241.4 72.7697 241.405 72.7755 244.4 75.483 244.995 75.2729 245.0 76.2707 244.82 76.4691 244.805 76.4808 244.805 76.4866 245.0 80.0693 250.0 82.3508 254.17 81.8314 254.375 81.3646 254.44 81.1488 254.71 80.2735 255.0 79.4216 255.0 79.3983 255.0 79.3399 255.07 78.8614 255.035 78.8614 254.755 78.8614 251.06 69.9689 250.0 69.9689 245.0 69.9806 240.0 69.9631 235.0 69.9631 232.625 69.9747 232.615 69.9747 }
-set us_regions(NE.34) {153.46 68.02 151.17 63.9238 151.175 63.918 150.0 57.7154 150.01 57.482 150.0 57.2369 147.785 50.5909 145.01 48.6945 140.03 48.6595 135.045 47.0257 130.185 47.0257 125.16 47.0257 120.025 47.0198 115.06 47.0082 110.04 47.0023 109.75 47.0082 109.735 47.0082 109.735 61.0063 109.995 61.0063 115.0 61.0005 119.74 67.9208 119.74 67.9967 119.815 67.9967 120.025 67.9967 125.0 68.0025 130.035 68.0083 135.0 68.0025 140.01 68.0025 145.035 68.0083 150.02 68.0142 153.46 68.02 }
-set us_regions(NJ.37) {259.42 70.6458 259.9 68.8953 259.96 68.4635 260.0 68.1834 260.02 68.0959 260.175 67.3373 260.195 67.1448 260.56 64.6299 260.565 64.5832 260.28 64.3615 259.79 64.4548 260.0 62.5818 259.98 60.7204 256.525 58.5148 256.525 58.5148 254.995 60.5104 255.0 65.1492 254.99 67.8274 252.925 69.4087 254.925 76.5041 255.0 76.4049 255.0 76.4049 255.445 75.8972 255.435 75.8972 256.25 75.3429 256.415 75.022 256.4 75.022 256.875 74.0184 256.875 74.0184 257.08 73.7091 257.085 73.7091 257.085 73.7091 257.44 73.2307 257.445 73.2307 257.545 73.1023 257.545 73.1023 257.675 72.9331 257.735 72.8981 258.125 72.7989 258.445 72.3962 258.725 71.9236 258.75 71.8536 258.84 71.696 258.935 71.521 258.945 71.521 259.375 70.7158 259.42 70.6458 }
-set us_regions(SC.52) {228.115 121.912 228.125 121.883 228.125 121.638 228.31 121.41 228.315 121.369 228.315 121.369 228.43 121.299 228.43 121.299 228.43 121.299 228.47 121.253 228.695 121.008 228.825 120.698 228.88 120.658 229.075 120.588 229.26 120.576 229.4 120.535 229.66 120.162 230.0 120.15 230.3 119.916 230.61 119.66 230.625 119.648 230.825 119.461 231.1 119.199 231.25 118.837 231.36 118.785 231.705 118.516 231.875 118.3 231.92 118.283 232.355 117.909 232.8 117.326 233.125 117.407 233.5 117.034 233.69 116.684 234.61 115.704 234.605 115.645 234.58 114.408 234.85 113.807 235.0 113.632 235.085 113.533 235.365 113.031 235.37 113.02 235.415 112.955 235.57 112.745 235.625 112.669 235.625 112.669 235.635 112.658 235.635 112.658 235.77 112.494 235.815 112.442 235.825 112.424 235.87 112.366 235.93 112.296 235.945 112.278 236.06 112.162 236.105 112.115 236.2 112.022 236.25 111.981 236.305 111.94 236.31 111.934 236.435 111.835 236.46 111.812 236.5 111.782 236.735 111.637 236.8 111.607 236.875 111.572 236.895 111.567 237.5 111.345 237.505 111.345 237.5 111.339 235.0 108.357 229.995 104.372 225.0 102.546 219.995 101.711 214.985 102.826 214.455 103.024 215.0 106.724 219.995 113.405 224.995 123.342 226.25 123.674 226.285 123.674 226.27 123.488 226.325 123.394 226.41 123.347 226.51 123.254 226.555 123.207 226.6 123.161 226.635 123.114 226.87 123.003 226.875 122.997 226.9 122.974 226.91 122.968 226.92 122.962 227.065 122.898 227.53 122.285 227.515 122.285 227.615 122.256 227.705 122.198 228.005 122.11 228.105 121.941 228.11 121.912 228.115 121.912 }
-set us_regions(AR.2) {174.17 117.005 174.17 117.005 175.03 111.619 175.0 111.438 175.01 110.277 178.455 103.059 178.45 103.03 180.005 99.103 181.335 96.0222 180.02 96.0338 175.015 92.5387 170.015 92.5387 165.01 92.5445 160.005 92.5328 156.91 92.5328 156.91 92.5328 157.57 112.57 159.785 116.9 160.0 116.9 165.0 116.911 170.0 116.981 174.15 117.005 174.17 117.005 }
-set us_regions(OK.47) {114.99 89.026 114.99 92.527 115.0 92.527 115.085 92.527 120.035 92.527 125.025 92.5328 130.0 106.111 135.0 108.503 140.0 110.05 145.0 110.942 150.01 111.076 150.0 110.989 150.005 110.925 155.005 111.001 157.57 112.57 156.91 92.5328 156.91 89.0377 155.02 89.0318 150.02 89.0318 145.03 89.0318 140.015 89.0377 135.03 89.0318 130.01 89.0143 125.01 89.0377 120.04 89.0727 119.86 89.0727 119.79 89.0727 119.775 89.0727 115.0 89.026 114.99 89.026 }
-set us_regions(KY.23) {189.86 83.4302 189.85 83.4361 185.0 87.4564 184.335 89.1485 182.915 92.5328 185.0 92.5095 190.0 91.2958 194.975 91.5175 199.985 91.6226 204.875 91.6926 209.975 91.8968 211.62 91.8326 211.625 91.821 211.625 91.821 215.0 90.0413 220.0 85.4141 220.16 85.2624 220.16 85.2624 220.0 85.2274 217.03 79.0715 217.02 79.054 214.98 76.9125 209.99 76.5566 205.9 74.281 205.87 74.2926 204.99 76.6091 199.99 82.0298 194.985 82.5667 190.0 83.4361 189.86 83.4302 }
-set us_regions(KY.24) {182.305 92.5387 182.575 92.5445 182.305 92.5387 }
-set us_regions(AZ.1) {84.75 128.71 84.775 89.0318 84.775 89.0318 79.995 89.0377 74.995 89.0085 69.995 89.0202 64.995 89.026 59.995 89.0202 59.745 89.026 56.835 103.012 56.4 119.0 56.355 119.094 56.35 119.135 56.295 119.245 56.265 119.35 56.26 119.386 56.245 119.415 56.235 119.426 56.18 119.531 56.1 119.607 56.09 119.654 56.09 119.66 55.995 119.852 56.0 119.911 56.04 120.068 56.025 120.179 55.98 120.418 55.93 120.576 56.05 120.623 56.09 120.64 56.11 120.652 56.225 120.698 56.325 120.739 56.89 120.978 56.935 120.996 57.18 121.101 57.87 121.393 58.25 121.556 58.355 121.603 58.36 121.603 58.475 121.649 58.56 121.69 58.565 121.69 58.6 121.708 58.62 121.714 58.795 121.79 58.85 121.813 58.985 121.871 59.11 121.924 59.14 121.941 59.225 121.976 59.275 121.994 59.39 122.046 59.41 122.052 59.445 122.07 59.46 122.075 59.51 122.099 59.54 122.11 59.665 122.163 59.785 122.215 59.845 122.245 59.905 122.268 60.03 122.321 60.145 122.373 60.185 122.391 60.2 122.396 60.25 122.42 60.255 122.42 60.3 122.443 60.355 122.461 60.455 122.507 60.475 122.513 60.56 122.554 60.615 122.577 60.625 122.583 60.705 122.612 60.755 122.636 60.91 122.706 61.075 122.776 61.09 122.781 61.29 122.869 61.395 122.916 61.48 122.951 61.665 123.032 61.805 123.097 61.945 123.155 63.33 123.768 63.415 123.803 63.485 123.832 63.585 123.878 63.615 123.89 63.86 123.995 63.915 124.018 63.955 124.042 64.145 124.124 64.585 124.316 65.62 124.748 65.64 124.76 65.655 124.765 65.665 124.765 65.845 124.847 65.91 124.87 65.915 124.876 65.96 124.894 66.025 124.923 66.125 124.964 66.25 125.022 66.375 125.075 66.41 125.086 66.51 125.133 66.61 125.174 66.66 125.197 66.775 125.244 66.825 125.267 66.87 125.285 66.88 125.291 66.96 125.326 67.155 125.407 67.22 125.436 67.23 125.442 67.325 125.483 67.48 125.547 67.765 125.67 67.835 125.699 67.915 125.734 67.925 125.74 68.005 125.775 68.045 125.792 68.06 125.798 68.175 125.851 68.42 125.956 68.45 125.967 68.77 126.107 69.0 126.207 69.145 126.271 69.21 126.3 69.285 126.335 69.37 126.37 69.435 126.399 69.54 126.446 69.62 126.481 69.735 126.533 69.81 126.563 69.835 126.574 69.86 126.586 69.91 126.609 69.995 126.644 70.03 126.662 70.045 126.668 70.105 126.691 70.14 126.708 70.71 126.959 70.95 127.07 71.03 127.099 71.15 127.158 71.305 127.222 71.675 127.391 71.7 127.403 71.705 127.403 71.815 127.449 71.86 127.473 71.885 127.484 71.99 127.531 72.1 127.578 72.18 127.613 72.2 127.619 72.275 127.654 72.42 127.718 72.45 127.735 72.485 127.747 72.51 127.765 72.54 127.77 72.565 127.782 72.58 127.794 72.71 127.852 72.745 127.864 72.78 127.881 72.79 127.887 72.93 127.951 73.075 128.015 73.09 128.021 73.165 128.056 73.17 128.056 73.21 128.074 73.215 128.074 73.24 128.085 73.285 128.109 73.37 128.144 73.435 128.173 73.575 128.237 73.66 128.278 73.745 128.313 73.885 128.377 73.915 128.389 74.205 128.523 74.295 128.558 74.355 128.587 74.48 128.646 74.51 128.657 74.58 128.692 74.665 128.71 74.84 128.71 74.935 128.71 75.05 128.71 75.115 128.71 75.15 128.71 75.175 128.71 75.275 128.71 75.29 128.71 75.29 128.71 75.295 128.71 75.295 128.71 75.41 128.704 75.435 128.704 75.445 128.704 75.545 128.704 75.555 128.704 75.66 128.704 75.75 128.704 75.765 128.704 76.025 128.704 76.105 128.704 76.16 128.704 76.195 128.704 76.345 128.704 76.58 128.704 76.595 128.704 76.67 128.704 76.73 128.704 76.815 128.704 76.89 128.704 76.9 128.704 77.015 128.704 77.035 128.704 77.05 128.704 77.23 128.704 77.33 128.704 77.425 128.704 77.475 128.704 77.59 128.71 77.69 128.71 77.7 128.71 77.805 128.71 77.885 128.71 78.065 128.71 78.08 128.71 78.4 128.704 78.63 128.704 78.745 128.704 79.245 128.698 79.32 128.698 79.37 128.698 79.495 128.698 79.98 128.704 79.985 128.704 79.995 128.704 80.045 128.704 80.06 128.704 80.12 128.704 80.19 128.704 80.215 128.704 80.23 128.704 80.305 128.704 80.325 128.704 80.41 128.698 80.415 128.698 80.62 128.698 80.735 128.698 80.83 128.698 80.96 128.698 80.98 128.698 81.035 128.698 81.045 128.698 81.085 128.698 81.26 128.698 81.28 128.698 81.35 128.698 81.38 128.698 81.415 128.698 81.605 128.698 81.675 128.698 81.765 128.698 81.855 128.698 82.105 128.698 82.155 128.698 82.17 128.698 82.185 128.698 82.195 128.698 82.2 128.698 82.2 128.698 82.245 128.698 82.27 128.698 82.295 128.698 82.315 128.698 82.345 128.698 82.36 128.698 82.365 128.698 82.445 128.698 82.53 128.698 82.565 128.698 82.57 128.698 82.665 128.698 83.3 128.698 83.495 128.698 83.5 128.698 83.515 128.698 83.63 128.698 83.64 128.698 83.655 128.698 83.67 128.698 83.7 128.698 83.735 128.698 83.96 128.704 84.1 128.704 84.235 128.704 84.34 128.71 84.34 128.71 84.555 128.71 84.75 128.71 }
-set us_regions(NH.36) {267.705 48.9279 269.965 49.0154 274.98 47.9709 276.265 47.8893 276.325 47.8893 276.325 47.8893 276.525 47.3174 277.125 47.5917 275.0 39.5802 274.59 30.9911 274.58 30.8744 273.97 31.2362 273.27 31.1078 273.185 31.1486 273.1 31.3295 273.035 31.3412 272.94 31.3529 272.87 31.3762 272.785 31.3645 272.84 31.4054 272.96 31.6796 272.95 31.6971 272.825 31.9889 272.86 32.0939 272.66 32.4207 272.605 32.4207 272.52 32.5257 272.51 32.5432 272.49 32.9166 272.5 32.9166 269.995 37.7305 267.705 48.9279 }
-set us_regions(NM.40) {97.355 125.547 99.995 124.018 104.995 124.03 110.0 124.036 114.88 92.5212 114.99 92.527 114.99 89.026 110.015 89.0552 105.495 89.0727 100.015 89.0552 95.07 89.026 90.015 89.026 85.195 89.0318 84.775 89.0318 84.775 89.0318 84.75 128.71 84.82 128.71 84.86 128.71 84.995 128.71 85.015 128.71 85.565 128.71 85.695 128.71 85.745 128.71 85.89 128.71 86.205 128.71 86.22 128.71 86.405 128.704 86.715 128.704 86.825 128.704 86.91 128.704 87.31 128.704 87.35 128.704 87.35 128.704 88.005 128.704 88.055 128.704 88.16 128.704 88.16 128.704 88.86 128.704 88.955 128.546 88.96 128.401 88.96 128.033 88.96 127.829 88.955 127.537 88.955 127.537 88.955 127.537 88.955 127.531 88.955 127.508 88.955 127.467 88.955 127.333 88.96 127.204 88.96 126.994 88.96 126.913 88.96 126.831 88.96 126.743 88.96 126.627 88.96 126.493 88.96 126.212 88.96 126.172 88.96 125.985 88.96 125.979 88.96 125.973 88.96 125.553 89.005 125.553 89.18 125.553 89.475 125.553 89.585 125.553 89.61 125.553 89.74 125.553 90.18 125.553 90.67 125.553 90.76 125.553 91.13 125.553 91.46 125.553 91.495 125.553 91.835 125.553 91.85 125.553 91.86 125.553 91.865 125.553 91.875 125.553 91.88 125.553 92.46 125.553 92.585 125.553 92.89 125.553 92.89 125.553 93.515 125.547 93.61 125.547 94.25 125.553 94.995 125.553 94.995 125.553 95.01 125.553 95.01 125.553 95.03 125.553 95.04 125.553 95.065 125.553 95.695 125.547 96.15 125.547 96.245 125.547 96.245 125.553 96.99 125.547 97.0 125.547 97.165 125.547 97.34 125.547 97.34 125.547 97.355 125.547 97.355 125.547 97.355 125.547 }
-set us_regions(LA.25) {184.625 136.961 184.52 136.879 180.0 131.026 175.0 131.044 175.0 122.7 175.0 121.533 175.0 121.352 175.0 120.891 175.005 120.658 175.0 120.459 174.17 117.005 174.15 117.005 170.0 116.981 165.0 116.911 160.0 116.9 159.785 116.9 160.0 124.31 160.895 140.666 160.93 140.864 161.14 140.666 161.25 140.281 161.875 140.111 162.835 140.006 163.07 140.036 163.125 140.094 163.305 140.17 163.415 140.135 163.88 139.954 163.925 139.966 164.32 140.076 164.375 140.1 164.63 140.216 164.805 140.292 164.93 140.333 164.935 140.339 165.0 140.356 165.53 140.666 165.625 140.73 165.665 140.747 166.115 141.004 166.165 141.028 166.25 141.074 166.25 141.074 166.915 141.343 167.87 141.518 168.015 141.541 168.015 141.541 168.46 141.669 168.925 141.541 168.915 141.541 169.78 141.494 169.785 141.541 169.795 141.605 170.0 141.815 170.085 141.821 170.32 142.037 170.51 142.416 170.59 142.486 170.625 142.515 170.625 142.515 170.955 142.416 171.25 142.37 172.04 142.51 172.5 142.708 172.685 142.801 173.23 143.362 174.815 144.161 174.815 144.161 174.82 144.167 174.82 144.167 175.0 144.213 175.015 144.208 175.135 144.202 175.055 144.301 175.0 144.348 175.0 144.348 174.91 144.674 175.0 144.884 175.23 145.024 175.23 145.024 175.26 145.042 176.045 145.13 176.54 145.042 176.55 145.042 177.035 144.861 177.05 144.855 177.315 144.832 177.5 144.937 177.78 145.03 177.79 145.03 177.825 145.042 177.955 145.077 177.955 145.077 178.075 145.054 178.095 145.042 178.095 145.042 178.84 144.814 178.87 144.814 179.375 144.517 179.72 144.19 179.75 144.167 179.9 144.003 180.015 143.922 180.5 143.402 180.53 143.373 180.545 143.35 180.625 143.292 180.785 143.239 180.85 143.204 181.41 143.292 181.41 143.292 181.58 143.391 181.875 143.612 181.95 143.642 182.115 143.694 182.19 143.723 182.255 143.752 182.33 143.799 182.5 143.963 182.505 143.968 182.58 144.143 182.59 144.167 182.595 144.184 182.625 144.243 182.66 144.342 182.675 144.429 182.675 145.042 182.61 145.917 182.685 145.993 182.7 146.005 183.09 145.917 183.125 145.865 183.43 145.404 183.665 145.065 183.675 145.042 183.75 145.013 183.75 145.013 183.765 145.042 183.955 145.287 184.375 145.561 184.705 145.089 184.73 145.042 184.73 145.042 185.0 144.552 185.0 144.552 185.23 143.77 185.125 143.362 185.0 143.14 184.58 142.807 184.575 142.807 184.44 142.661 184.44 142.661 184.375 142.445 184.355 142.416 184.375 141.856 184.775 141.634 184.825 141.541 185.0 141.313 185.0 141.313 185.065 141.197 185.605 140.508 185.625 140.479 185.625 140.467 186.135 138.04 186.115 138.04 185.98 137.637 185.625 137.322 185.31 137.597 185.485 138.04 185.47 138.04 185.0 138.915 185.0 138.927 184.655 139.791 185.0 140.123 185.01 140.228 185.0 140.257 184.76 140.508 184.74 140.567 184.73 140.666 184.395 141.022 184.375 141.057 184.255 141.22 184.125 140.602 184.125 140.59 184.375 139.067 184.61 138.915 184.59 138.489 184.375 138.104 184.37 138.098 184.37 138.098 184.32 138.04 184.375 137.952 184.375 137.958 184.375 137.381 184.32 137.165 184.34 137.153 184.375 137.13 184.625 136.961 }
-set us_regions(VT.57) {269.21 32.9692 269.14 32.9692 269.095 32.9692 269.02 32.9692 268.945 32.975 268.765 32.975 268.725 32.9808 268.715 32.9808 268.71 32.9808 268.625 32.9808 268.62 32.9808 268.58 32.9808 268.355 32.975 268.165 32.9692 268.125 32.9633 268.03 32.9633 267.995 32.9633 267.94 32.9575 267.92 32.9575 267.91 32.9575 267.835 32.9517 267.785 32.9517 267.755 32.9517 267.48 32.9517 267.23 32.9517 267.105 32.9341 267.09 32.9283 267.075 32.9283 267.065 32.9283 267.06 32.9283 267.05 32.9225 266.905 32.9108 266.69 32.905 266.68 32.905 266.66 32.905 266.63 32.905 266.5 32.8991 266.485 32.8991 266.445 32.8991 266.36 32.8991 266.11 32.8991 265.87 32.8933 265.865 32.8933 265.835 32.8933 265.785 32.8933 265.465 32.8991 265.345 32.905 265.335 32.905 265.11 32.905 265.035 32.905 265.015 32.905 264.925 32.905 264.92 32.905 264.76 32.8991 264.74 32.8991 264.7 32.8991 264.685 32.8991 264.575 32.8991 264.57 32.8991 264.545 32.905 264.375 32.905 264.15 32.9108 264.04 32.9166 263.95 32.9166 263.94 32.9166 263.795 32.9225 263.785 32.9225 263.69 32.9225 263.595 32.9283 263.52 32.9341 263.515 32.9283 263.325 32.9341 263.325 32.9341 263.285 32.9341 263.675 48.7937 263.75 48.7937 265.0 48.8287 267.705 48.9279 269.995 37.7305 272.5 32.9166 272.49 32.9166 272.475 32.9166 272.47 32.9166 272.22 32.9225 272.2 32.9225 272.02 32.9225 272.005 32.9225 271.94 32.9225 271.93 32.9225 271.79 32.9283 271.645 32.9283 271.585 32.9283 271.555 32.9283 271.51 32.9283 271.185 32.9283 271.035 32.9341 271.03 32.9341 271.025 32.9341 271.025 32.9341 271.025 32.9341 271.005 32.9341 270.905 32.94 270.68 32.9458 270.51 32.9517 270.23 32.9517 270.11 32.9575 270.06 32.9575 270.0 32.9575 269.93 32.9633 269.885 32.9633 269.85 32.9633 269.815 32.9633 269.74 32.9633 269.64 32.9692 269.56 32.9692 269.555 32.9692 269.545 32.9692 269.53 32.9692 269.52 32.9692 269.51 32.9692 269.5 32.9692 269.47 32.9692 269.455 32.9692 269.45 32.9692 269.45 32.9692 269.44 32.9692 269.35 32.9692 269.29 32.9692 269.265 32.9692 269.21 32.9692 }
-set us_regions(CA.3) {24.25 99.424 24.34 99.529 24.37 99.5698 24.705 99.9725 24.715 99.99 24.85 100.124 24.89 100.142 24.995 100.159 25.035 100.153 25.08 100.177 25.345 100.381 25.355 100.463 25.36 100.503 25.37 100.55 25.36 100.696 25.295 100.883 25.235 101.034 25.2 101.192 25.195 101.279 25.62 101.91 26.135 102.254 26.245 102.266 26.405 102.26 26.41 102.266 26.46 102.295 26.49 102.312 26.525 102.324 26.55 102.336 26.555 102.394 26.53 102.791 26.52 102.855 26.485 103.03 26.44 103.228 26.36 103.532 26.33 103.724 26.375 103.905 26.52 104.582 26.49 104.781 26.48 105.656 27.06 106.531 27.205 106.613 27.495 107.208 27.91 107.249 28.875 107.097 29.37 107.103 29.89 107.173 29.995 107.237 30.215 107.336 30.24 107.348 30.36 107.406 30.42 107.43 30.7 107.54 30.715 107.546 30.73 107.552 30.805 107.552 30.905 107.523 31.06 107.505 31.22 107.587 31.22 107.587 31.25 107.605 31.3 107.628 31.325 107.645 31.405 107.675 31.45 107.675 31.555 107.622 31.58 107.605 31.7 107.517 31.705 107.511 31.94 107.459 31.95 107.465 32.115 107.54 32.195 107.605 32.305 107.645 32.325 107.657 32.35 107.657 32.495 107.745 33.12 108.281 33.24 108.346 33.33 108.375 33.35 108.427 33.355 108.433 33.355 108.433 33.355 108.439 33.355 108.439 33.45 108.719 33.495 108.847 33.555 109.005 33.695 109.227 33.79 109.367 33.835 109.448 33.865 109.513 33.91 109.594 34.71 109.898 34.71 109.898 35.075 110.032 35.24 110.085 35.335 110.09 36.13 110.33 36.31 110.195 36.45 110.184 36.515 110.184 36.855 110.131 37.15 110.108 37.15 110.108 37.155 110.114 37.185 110.12 37.205 110.12 37.215 110.12 37.245 110.155 37.26 110.178 37.275 110.195 37.29 110.23 37.315 110.265 37.37 110.341 37.38 110.359 37.395 110.394 37.43 110.458 37.495 110.604 37.505 110.615 37.575 110.738 37.62 110.814 37.7 110.96 37.72 111.001 37.76 111.076 37.775 111.129 37.765 111.181 37.715 111.24 37.64 111.322 37.585 111.403 37.575 111.45 37.59 111.794 37.63 111.882 38.24 112.366 38.325 112.401 38.535 112.401 38.63 112.389 38.745 112.284 38.78 112.238 38.865 112.197 39.155 112.191 39.22 112.179 39.37 112.15 39.4 112.214 39.65 112.582 39.695 112.629 39.715 112.652 39.72 112.658 39.995 112.879 39.995 112.879 40.0 112.885 40.01 112.891 40.015 112.897 40.055 112.932 40.055 112.932 40.21 113.072 40.44 113.265 40.47 113.288 40.64 113.399 40.65 113.41 40.815 113.527 40.82 113.533 40.865 113.556 40.88 113.568 40.915 113.597 40.995 113.714 41.01 113.726 41.065 113.836 41.145 113.965 41.245 114.099 41.465 114.21 41.545 114.286 41.56 114.303 41.575 114.321 41.6 114.344 41.655 114.397 41.67 114.408 41.87 114.636 41.945 114.694 42.44 115.243 42.46 115.284 42.495 115.336 42.815 115.779 42.95 116.1 42.975 116.159 43.12 116.509 43.125 116.521 43.125 116.526 43.18 116.783 43.18 116.789 43.215 116.935 43.24 117.046 43.26 117.145 43.27 117.197 43.33 117.46 43.295 118.178 43.315 118.254 43.335 118.341 43.35 118.434 43.355 118.499 43.365 118.761 43.365 118.779 43.37 118.86 43.38 119.047 43.51 119.543 43.605 119.66 43.745 119.73 43.865 119.701 43.885 119.689 43.885 119.701 43.94 119.952 43.975 120.331 44.37 120.296 44.375 120.296 44.405 120.29 44.665 120.261 44.685 120.255 44.79 120.243 44.8 120.243 44.845 120.237 44.85 120.237 44.86 120.237 44.865 120.237 44.87 120.237 44.945 120.226 45.015 120.22 45.305 120.185 45.31 120.185 45.36 120.179 45.41 120.173 45.495 120.162 45.535 120.156 45.62 120.144 45.715 120.132 45.855 120.115 45.88 120.115 45.89 120.115 45.915 120.109 46.025 120.097 46.07 120.092 46.09 120.092 46.215 120.074 46.27 120.068 46.555 120.039 46.865 119.998 46.87 119.998 46.92 119.992 47.125 119.969 47.18 119.963 47.295 119.952 47.32 119.946 47.325 119.946 47.425 119.934 47.725 119.899 47.8 119.893 47.805 119.893 47.825 119.887 47.91 119.881 47.93 119.876 48.05 119.864 48.105 119.858 48.26 119.841 48.465 119.817 48.495 119.811 48.6 119.8 48.645 119.8 48.945 119.765 48.955 119.759 48.985 119.759 49.01 119.759 49.065 119.753 49.07 119.747 49.17 119.741 49.47 119.706 49.485 119.701 49.62 119.689 49.83 119.666 50.09 119.636 50.46 119.601 50.475 119.596 51.54 119.485 51.69 119.467 52.335 119.397 52.4 119.391 52.42 119.391 52.42 119.391 52.465 119.386 52.465 119.386 52.495 119.386 52.5 119.38 52.515 119.38 52.52 119.38 52.52 119.38 52.525 119.38 52.55 119.38 52.57 119.374 52.605 119.374 52.61 119.374 52.63 119.368 52.675 119.362 53.155 119.321 53.315 119.304 55.095 119.129 56.245 119.018 56.315 119.012 56.35 119.006 56.355 119.006 56.365 119.006 56.365 119.006 56.37 119.006 56.4 119.006 56.4 119.0 56.835 103.012 56.825 103.007 54.995 100.947 49.995 95.4387 44.995 90.0938 39.995 84.9123 34.995 79.9001 29.995 75.0278 30.0 69.0586 30.0 59.2675 30.0 59.0925 30.005 54.0568 25.03 54.0627 20.125 53.9868 15.025 53.9927 10.165 54.0452 8.745 54.0277 8.355 54.0277 8.365 54.0335 8.54 54.4536 8.54 54.4595 8.595 54.8913 8.6 54.8913 8.595 54.9204 8.35 54.8913 8.14 54.8096 8.12 54.8096 8.12 54.8096 7.905 54.8913 7.805 55.2238 8.12 55.6556 8.12 55.6615 8.155 55.6731 8.24 55.7665 8.42 55.9182 8.58 56.0232 8.745 56.1341 8.82 56.1574 8.955 56.2975 8.965 56.6126 8.975 56.6418 9.06 56.986 9.245 57.517 9.315 57.7679 8.855 58.8415 9.19 59.0166 9.13 59.2208 9.12 59.2675 9.125 59.2792 9.125 59.2908 8.78 59.9093 8.745 60.0552 8.745 60.1252 8.745 60.1369 8.745 60.1428 8.745 60.1486 8.75 60.1544 8.91 60.7788 8.93 60.8254 8.935 60.8371 8.935 60.8371 9.03 61.2747 9.03 61.2747 8.985 61.4673 8.98 61.479 8.85 61.8933 8.82 61.9749 8.595 62.4242 8.445 62.7685 8.165 63.3112 8.155 63.3287 8.12 63.4162 8.02 63.6438 7.65 64.7524 7.785 65.3943 8.12 66.6138 8.69 67.1448 8.745 67.2148 8.98 67.4482 8.985 67.454 9.325 68.0025 9.34 68.02 9.335 68.02 9.37 68.0667 9.995 68.8194 10.04 68.8544 10.485 69.7705 10.62 70.2198 10.81 71.1359 10.765 71.3518 10.735 71.416 10.635 71.521 10.625 71.5735 10.62 71.661 10.62 71.6669 10.605 71.7252 10.56 72.0286 10.55 72.0987 10.515 72.3904 10.52 72.4488 10.595 72.7872 10.605 72.9097 10.62 72.9797 10.62 72.9856 10.66 73.1315 10.97 74.1467 10.97 74.1467 11.035 74.3043 11.07 74.3743 11.1 74.9987 11.1 74.9987 11.075 75.022 11.075 75.022 11.025 75.0803 11.245 75.9498 11.54 76.3582 11.84 76.7142 11.87 76.7375 11.925 76.7725 11.93 76.7725 12.0 76.8075 12.565 77.4669 12.915 77.9979 13.12 78.3363 13.345 78.523 13.355 78.523 13.745 78.8614 13.79 78.8673 13.98 79.054 14.05 79.194 14.175 79.2991 14.2 79.3983 14.325 79.9467 14.37 80.0109 14.555 80.2735 14.88 81.1488 14.57 82.024 14.58 82.1349 14.58 82.1407 15.035 82.4383 15.62 82.2574 16.07 82.8176 16.11 82.8993 16.625 83.086 16.84 83.2318 16.87 83.2727 16.87 83.2727 16.94 83.3194 17.085 83.6228 17.09 83.6753 17.1 83.7862 17.11 83.8854 17.125 84.0779 17.13 84.1246 17.15 84.3697 17.155 84.428 17.16 84.5097 17.125 84.6614 17.105 84.7373 17.08 84.8306 17.06 85.0115 17.15 85.6417 17.195 85.7292 17.46 86.0502 17.495 86.1668 17.6 86.4002 17.64 86.8204 17.625 86.9429 17.92 88.1507 18.12 88.565 18.43 88.6409 18.67 89.026 18.745 89.1252 18.815 89.1835 19.205 89.4636 19.47 89.6037 19.62 89.6562 19.74 90.2864 19.77 90.4264 19.845 90.7765 19.865 92.2002 19.91 92.527 19.96 92.7079 19.995 92.7487 19.995 92.7546 20.0 92.7721 20.0 92.7837 20.005 92.8888 20.165 93.6823 20.185 93.7699 20.34 94.2016 20.35 94.2133 20.43 94.2775 20.62 94.5692 20.655 94.5984 21.245 94.9952 21.375 95.1527 22.495 97.1308 22.81 97.4517 23.03 97.7785 23.12 98.1228 23.38 98.6538 23.745 98.823 24.06 99.0447 24.065 99.0505 24.25 99.424 }
-set us_regions(FL.14) {218.41 161.077 218.375 161.234 218.51 161.613 218.535 161.672 218.59 161.818 218.64 162.069 218.725 162.296 218.75 162.43 218.75 162.436 218.755 162.459 218.77 162.547 218.855 162.769 219.02 162.903 219.135 162.985 219.375 163.346 219.44 163.405 219.48 163.422 219.48 163.422 219.505 163.434 219.59 163.446 219.6 163.446 219.81 163.37 219.92 163.306 219.96 163.282 220.11 163.247 220.165 163.288 220.29 163.422 220.305 163.44 220.395 163.568 220.47 163.737 220.57 164.076 220.59 164.216 220.59 164.222 220.625 164.443 220.65 164.508 220.675 164.723 220.685 164.922 220.685 164.969 220.69 165.056 220.695 165.103 220.695 165.144 220.695 165.167 220.695 165.173 220.7 165.254 220.72 165.453 220.725 165.494 220.75 165.61 220.895 166.001 220.92 166.048 220.95 166.106 220.995 166.229 220.97 166.375 220.97 166.381 220.975 166.421 221.08 166.702 221.115 166.859 221.305 167.227 221.8 167.658 221.875 167.641 222.145 167.437 222.58 167.798 223.125 168.557 223.665 169.549 223.75 169.771 223.835 171.299 224.075 172.175 224.375 172.507 224.4 172.537 225.0 173.663 225.085 173.925 225.505 173.96 225.555 174.042 225.545 174.083 225.47 174.112 225.0 174.38 225.0 174.369 224.95 174.386 224.64 174.474 224.29 174.299 223.91 173.925 223.6 173.925 223.34 173.943 223.115 173.925 222.865 173.925 222.86 173.925 222.595 174.054 222.335 174.229 222.295 174.287 222.13 174.375 222.035 174.421 221.93 174.515 221.91 174.544 221.875 174.555 221.775 174.649 221.58 174.795 221.445 174.871 221.425 174.9 221.4 174.935 221.075 175.127 220.975 175.174 220.965 175.18 220.745 175.343 220.625 175.396 220.0 175.67 219.98 175.67 219.775 175.746 219.68 175.67 219.145 175.67 218.925 175.973 218.91 176.271 219.12 176.545 219.105 176.545 219.47 176.545 219.505 176.545 219.74 176.545 219.73 176.545 219.78 176.627 219.83 176.674 220.0 176.72 220.125 176.755 221.06 176.615 221.04 176.586 221.055 176.586 221.135 176.58 221.225 176.954 221.395 177.041 221.605 176.983 221.73 176.948 222.045 176.796 222.355 176.545 222.37 176.545 222.405 176.353 222.5 176.119 222.56 176.148 222.775 176.143 222.865 176.084 222.945 176.061 223.005 176.061 223.035 176.061 223.41 175.927 223.935 175.67 224.12 175.623 224.27 175.518 224.545 175.617 224.87 175.437 224.885 175.407 224.885 175.402 224.925 175.384 225.0 175.361 225.0 175.366 225.11 175.285 225.11 175.279 225.205 175.215 225.625 174.946 225.79 174.806 225.83 174.795 226.145 174.69 226.85 174.124 226.875 174.094 227.01 173.925 227.02 173.925 227.05 173.861 227.125 173.791 227.5 173.453 227.59 173.418 227.68 173.365 227.835 173.05 227.83 173.05 228.005 172.875 228.045 172.747 228.045 172.717 228.125 172.607 228.225 172.525 228.425 172.175 228.42 172.175 228.5 171.988 228.75 171.795 228.805 171.299 228.805 171.299 228.795 171.282 229.25 170.85 229.375 170.558 229.375 170.086 229.365 170.08 229.31 170.022 229.375 169.637 229.375 169.578 229.39 169.549 229.395 169.549 229.395 169.543 229.73 168.72 229.7 168.674 229.695 168.674 229.525 168.446 229.515 168.271 229.555 168.114 229.545 167.997 229.645 167.798 229.74 166.223 229.745 166.141 229.795 165.4 229.875 164.63 229.91 164.274 229.925 163.802 229.925 163.696 229.925 163.691 229.925 163.591 229.945 163.311 229.965 163.06 229.97 163.02 229.985 162.868 230.0 162.751 230.01 162.716 230.03 162.524 230.03 162.512 230.035 162.477 230.07 162.29 230.075 162.232 230.09 161.958 230.095 161.934 230.095 161.882 230.095 161.736 230.095 161.672 230.095 161.514 230.1 161.316 230.125 161.094 230.11 160.995 230.1 160.797 230.125 160.633 230.125 160.581 230.105 160.347 230.075 160.19 230.045 160.032 230.04 159.98 230.015 159.869 230.0 159.799 229.975 159.67 229.935 159.478 229.93 159.454 229.925 159.443 229.925 159.437 229.885 159.256 229.85 159.046 229.695 158.457 229.635 158.276 229.595 158.171 229.53 157.897 229.375 157.395 229.375 157.395 229.31 157.208 229.055 156.42 228.985 156.222 228.91 155.988 228.9 155.953 228.86 155.802 228.86 155.697 228.855 155.668 228.75 155.411 228.75 155.405 228.68 155.148 228.66 155.037 228.63 154.868 228.625 154.856 228.525 154.53 228.46 154.232 228.44 154.121 228.38 153.87 228.36 153.794 228.075 153.013 228.04 152.919 227.91 152.581 227.77 152.225 227.695 152.044 227.635 151.869 227.615 151.811 227.6 151.776 227.59 151.752 227.575 151.706 227.535 151.606 227.5 151.496 227.48 151.373 227.46 151.233 227.435 151.07 227.42 151.0 227.415 150.959 227.41 150.93 227.405 150.877 227.395 150.83 227.39 150.789 227.385 150.76 227.38 150.731 227.365 150.649 227.36 150.609 227.355 150.574 227.35 150.55 227.28 150.142 227.295 150.013 227.305 149.938 227.31 149.862 227.32 149.798 227.325 149.722 227.34 149.628 227.36 149.529 227.375 149.459 227.375 149.453 227.385 149.389 227.4 149.307 227.485 149.197 227.5 149.179 227.5 148.31 227.46 148.105 226.82 146.793 226.685 146.507 226.39 145.917 226.37 145.876 226.25 145.62 226.18 145.48 226.18 145.48 226.02 145.13 225.995 145.083 225.84 144.744 225.775 144.604 225.7 144.447 225.695 144.447 225.645 144.342 225.64 144.33 225.64 144.33 225.625 144.301 225.625 144.295 225.48 144.05 225.395 143.846 225.27 143.449 225.24 143.362 225.22 143.292 225.21 143.262 225.195 143.216 225.125 143.023 225.075 142.889 225.055 142.836 225.03 142.761 225.0 142.685 225.0 142.685 224.99 142.644 224.77 142.014 224.79 142.014 224.69 141.693 224.655 141.576 224.64 141.541 224.62 141.477 224.585 141.366 224.43 140.946 224.375 140.782 224.245 140.345 224.17 140.018 224.12 139.866 224.095 139.791 224.03 139.551 224.005 139.423 223.99 139.33 223.98 139.3 223.97 139.172 223.965 139.049 223.955 138.915 223.955 138.909 223.87 138.548 223.77 138.238 223.75 138.163 223.725 138.04 223.685 137.818 223.575 137.165 223.5 136.774 223.4 136.29 223.4 136.272 223.4 136.266 223.41 136.266 223.365 136.05 223.36 136.021 223.35 135.951 223.345 135.934 223.34 135.893 223.34 135.887 223.335 135.834 223.33 135.77 223.325 135.642 223.325 135.513 223.38 135.414 223.395 135.368 223.415 135.268 223.205 134.527 223.125 134.311 223.095 134.002 223.09 133.815 223.09 133.763 223.095 133.646 223.125 133.442 223.265 133.051 220.0 132.52 215.0 133.728 210.0 133.337 205.0 131.242 204.99 131.032 204.99 131.032 204.99 131.032 199.97 131.085 194.98 131.044 192.41 136.435 193.025 136.29 193.035 136.29 193.125 136.266 193.485 136.149 193.75 136.179 194.035 136.144 194.375 136.068 194.885 135.934 195.0 135.916 195.415 135.811 195.625 135.764 195.75 135.747 195.995 135.7 196.005 135.694 197.55 135.724 197.615 135.724 197.79 135.735 198.01 135.764 198.02 135.764 198.125 135.782 198.66 135.928 198.78 135.98 199.41 136.237 199.52 136.29 199.615 136.336 200.0 136.546 200.03 136.564 200.605 136.943 200.87 137.165 200.9 137.188 200.915 137.206 201.08 137.404 201.145 137.48 201.25 137.579 201.7 137.859 202.025 138.244 202.195 138.443 202.395 138.612 202.5 138.664 202.705 138.694 202.77 138.734 202.725 138.787 202.625 139.137 202.63 139.359 202.655 139.569 202.675 139.674 202.695 139.791 202.75 140.036 202.85 140.351 202.975 140.578 203.035 140.666 203.51 140.666 203.75 140.654 203.77 140.66 203.82 140.666 203.825 140.666 204.36 141.004 204.375 141.004 204.495 141.115 204.66 141.273 204.855 141.261 205.0 141.197 205.625 140.852 205.95 140.666 206.71 139.971 206.72 139.96 206.875 139.884 207.085 139.791 207.405 139.382 207.5 139.219 207.595 139.201 207.855 139.049 208.535 138.915 208.53 138.915 208.72 138.408 208.675 138.198 208.675 138.192 208.72 138.133 208.745 138.069 208.75 138.069 209.035 138.157 209.35 138.04 209.36 138.028 209.37 138.017 209.37 138.017 209.37 138.017 209.375 138.011 209.395 137.982 209.625 137.795 210.0 137.952 210.15 138.04 210.625 138.454 210.83 138.606 210.885 138.659 211.25 138.781 211.365 138.886 211.405 138.915 211.77 139.598 211.79 139.791 211.795 139.82 211.875 139.983 211.88 140.001 211.905 140.076 212.5 140.625 212.595 140.631 212.68 141.168 212.7 141.389 212.73 141.541 213.125 141.973 213.355 142.323 213.395 142.34 213.455 142.416 213.55 142.667 213.685 142.755 213.75 142.825 213.795 143.076 213.8 143.286 213.8 143.292 214.075 143.677 214.135 143.799 214.375 144.634 215.0 144.674 215.0 144.686 215.21 144.529 215.625 144.727 215.635 144.727 215.665 144.721 215.73 144.896 215.735 145.007 215.735 145.024 215.74 145.042 215.725 145.042 215.76 145.643 215.96 145.818 215.975 145.917 216.025 146.04 215.93 146.407 215.94 146.53 216.025 146.763 216.045 146.979 216.11 147.183 216.25 147.592 216.295 147.668 216.3 147.668 216.36 147.878 216.305 148.0 216.255 148.304 216.26 148.543 216.26 148.543 216.28 148.596 216.25 148.934 216.23 149.01 216.07 149.342 216.045 149.418 216.005 149.523 216.0 149.547 215.995 149.657 215.95 150.048 215.905 150.183 215.625 150.241 215.46 150.55 215.475 150.842 215.475 151.046 215.485 151.175 215.495 151.21 215.52 151.472 215.555 151.676 215.57 151.921 215.575 152.12 215.575 152.155 215.565 152.202 215.56 152.283 215.5 152.482 215.475 152.663 215.465 152.744 215.46 152.937 215.47 153.042 215.55 153.322 215.605 153.439 215.605 153.444 215.61 153.45 215.615 153.468 215.62 153.479 215.625 153.485 215.77 153.73 215.925 153.999 215.965 154.069 215.975 154.104 215.94 154.308 215.935 154.524 215.885 155.049 215.99 155.405 216.08 155.545 216.14 155.644 216.145 155.65 216.155 155.673 216.155 155.673 216.185 155.743 216.2 155.778 216.25 155.948 216.25 155.948 216.255 155.965 216.475 156.315 216.565 156.543 216.61 156.636 216.61 156.636 216.875 157.126 216.875 157.132 216.88 157.185 217.17 157.599 217.22 157.786 217.35 158.171 217.38 158.357 217.445 158.515 217.47 158.62 217.5 158.743 217.5 158.737 217.54 158.824 217.545 158.824 217.545 158.824 217.655 159.046 217.815 159.425 217.815 159.425 217.84 159.484 217.995 159.84 218.025 159.921 218.125 160.085 218.325 160.528 218.4 160.785 218.41 161.077 }
-set us_regions(MT.33) {60.2 5.00784 60.025 5.00784 59.995 5.00784 59.75 5.00784 59.71 5.00784 59.66 5.00784 59.485 5.00784 59.36 5.00784 58.895 5.002 58.885 5.002 58.875 5.002 58.87 5.002 58.635 4.99617 58.45 4.99617 58.45 4.99617 58.45 4.99617 58.18 4.99033 57.965 4.99617 57.96 4.99617 57.88 4.99617 57.805 4.99617 57.705 4.99617 57.62 4.99617 57.61 4.99617 57.51 4.99617 57.395 4.99617 57.31 4.99617 57.29 4.99617 57.255 4.99617 57.205 4.99617 57.16 4.99617 56.935 4.99617 56.84 4.99617 56.84 4.99617 56.68 4.99617 56.645 4.99617 56.63 4.99617 56.61 4.99617 56.365 4.99617 56.36 4.99617 56.19 4.99617 56.175 4.99617 56.14 4.99617 56.125 4.99617 56.105 4.99617 56.05 4.99617 56.025 4.99617 55.995 4.99617 55.885 4.99617 55.69 4.99617 55.55 5.002 55.515 5.002 55.51 5.002 55.295 5.002 55.265 5.002 55.285 5.002 55.12 5.002 54.97 5.00784 54.965 5.00784 54.72 5.00784 54.69 5.00784 54.58 5.00784 54.545 5.00784 54.175 5.00784 54.145 5.00784 54.12 5.00784 54.085 5.00784 54.04 5.00784 53.96 5.00784 53.745 5.00784 53.68 5.00784 53.665 5.002 53.625 5.002 53.575 5.002 53.17 5.002 53.12 5.002 53.04 5.002 52.95 5.002 52.94 5.002 52.915 5.002 52.8 4.99617 52.675 4.99617 52.525 4.99617 52.27 4.99617 52.245 4.99617 51.99 4.99617 51.98 4.99617 51.97 4.99617 51.9 4.99617 51.79 4.99617 51.785 4.99617 51.765 4.99617 51.69 4.99617 51.625 4.99617 51.465 4.99617 51.45 4.99617 51.205 4.99617 51.095 4.99617 50.95 4.99617 50.92 4.99617 50.32 4.99617 50.315 4.99617 50.315 4.99617 50.27 4.99617 50.15 4.99617 50.12 4.99617 50.045 4.99617 49.93 4.99617 49.93 4.99617 49.755 4.99617 49.755 5.002 50.0 12.43 55.0 19.2336 60.0 28.1319 65.015 36.8786 70.025 36.2601 74.755 36.6919 74.995 32.9983 79.995 32.9867 84.995 33.01 89.995 33.0042 94.995 33.0333 99.995 33.0567 104.995 33.01 109.7 33.0275 109.71 33.0275 109.775 26.3931 109.755 5.002 109.61 5.002 109.375 5.002 109.37 5.002 109.175 5.002 109.06 5.002 108.94 5.002 108.93 5.002 108.595 5.002 108.585 5.002 108.54 5.002 108.525 5.00784 108.475 5.00784 108.46 5.00784 108.4 5.002 108.115 5.00784 108.01 5.00784 107.895 5.00784 107.745 5.00784 107.64 5.00784 107.515 5.00784 107.395 5.00784 107.37 5.00784 107.28 5.00784 107.28 5.00784 107.23 5.00784 107.14 5.00784 107.125 5.00784 106.94 5.00784 106.87 5.00784 106.765 5.00784 106.695 5.00784 106.58 5.00784 106.465 5.00784 106.36 5.00784 106.25 5.00784 106.14 5.00784 106.03 5.00784 105.685 5.00784 105.47 5.00784 105.395 5.00784 105.37 5.00784 105.26 5.00784 105.22 5.00784 104.955 5.00784 104.835 5.00784 104.71 5.00784 104.445 5.00784 104.44 5.00784 104.37 5.00784 104.3 5.00784 104.28 5.00784 104.19 5.00784 104.105 5.00784 104.03 5.00784 103.795 5.00784 103.755 5.00784 103.725 5.00784 103.675 5.00784 103.655 5.00784 103.61 5.00784 103.48 5.00784 103.475 5.00784 103.285 5.00784 103.22 5.00784 103.17 5.00784 103.16 5.00784 103.15 5.00784 103.065 5.00784 103.065 5.00784 103.045 5.00784 103.035 5.00784 103.035 5.00784 102.99 5.00784 102.97 5.00784 102.96 5.00784 102.95 5.00784 102.94 5.00784 102.895 5.00784 102.88 5.00784 102.855 5.00784 102.85 5.00784 102.845 5.00784 102.745 5.00784 102.735 5.002 102.695 5.002 102.67 5.002 102.615 5.00784 102.54 5.00784 102.515 5.002 102.385 5.002 102.24 5.00784 102.105 5.002 102.105 5.002 102.0 5.002 101.96 5.002 101.935 5.002 101.865 5.002 101.86 5.002 101.75 5.002 101.75 5.00784 101.48 5.002 101.415 5.002 101.215 5.002 101.16 5.002 101.12 5.002 101.12 5.002 101.11 5.002 100.83 5.002 100.27 5.002 100.205 5.002 100.17 5.00784 100.17 5.00784 100.025 5.00784 99.995 5.00784 99.99 5.00784 99.745 5.00784 99.44 5.00784 99.225 5.00784 99.2 5.00784 98.925 5.00784 98.88 5.00784 98.83 5.00784 98.825 5.00784 98.785 5.00784 98.77 5.00784 98.695 5.00784 98.69 5.00784 98.63 5.00784 98.63 5.00784 98.575 5.00784 98.395 5.00784 98.185 5.002 98.165 5.00784 98.16 5.00784 98.16 5.00784 98.125 5.002 98.11 5.002 97.975 5.002 97.91 5.002 97.895 5.00784 97.895 5.00784 97.855 5.00784 97.825 5.00784 97.825 5.00784 97.8 5.002 97.795 5.002 97.795 5.002 97.79 5.00784 97.78 5.00784 97.78 5.00784 97.78 5.00784 97.745 5.00784 97.665 5.00784 97.63 5.00784 97.625 5.00784 97.6 5.00784 97.54 5.00784 97.54 5.00784 97.51 5.00784 97.495 5.00784 97.495 5.002 97.49 5.002 97.41 5.00784 97.305 5.00784 97.21 5.00784 96.91 5.002 96.91 5.00784 96.91 5.00784 96.895 5.002 96.89 5.002 96.87 5.002 96.87 5.002 96.84 5.002 96.785 5.002 96.745 5.002 96.73 5.002 96.61 5.002 96.525 5.002 96.45 5.002 96.405 5.002 96.305 5.002 96.29 5.002 96.28 5.002 96.27 5.002 96.105 5.002 96.105 5.002 96.06 5.002 95.87 5.002 95.84 5.002 95.82 5.002 95.805 5.002 95.79 5.002 95.76 5.002 95.74 5.002 95.645 5.002 95.625 5.002 95.62 5.002 95.58 5.002 95.44 5.002 95.375 5.002 95.305 5.002 95.305 5.002 95.185 5.002 95.085 5.002 95.035 5.002 95.015 5.002 94.995 5.002 94.555 5.002 94.55 5.002 94.48 5.002 94.47 5.002 94.37 5.002 94.355 5.002 94.2 5.002 94.17 5.002 94.145 5.002 94.1 5.002 94.035 5.002 93.965 5.002 93.895 5.002 93.745 5.002 93.715 5.002 93.55 5.002 93.485 5.002 93.425 5.002 93.31 5.002 93.18 5.002 93.13 5.002 92.945 5.00784 92.9 5.00784 92.895 5.00784 92.845 5.00784 92.795 5.00784 92.78 5.00784 92.77 5.00784 92.61 5.00784 92.5 5.00784 92.45 5.00784 92.4 5.00784 92.29 5.00784 92.24 5.00784 92.215 5.002 92.18 5.00784 92.16 5.00784 92.075 5.00784 92.07 5.00784 92.065 5.00784 92.025 5.002 91.955 5.002 91.95 5.00784 91.835 5.002 91.66 5.002 91.635 5.002 91.6 5.002 91.475 5.002 91.36 5.002 91.285 5.002 91.275 5.002 91.175 5.002 91.155 5.002 91.115 5.002 91.1 5.002 91.085 5.002 91.02 5.002 91.01 5.002 90.95 5.002 90.84 5.002 90.645 5.002 90.585 5.002 90.555 5.002 90.165 5.002 90.135 5.002 90.13 5.002 89.93 5.002 89.765 5.00784 89.58 5.00784 89.505 5.00784 88.82 5.002 88.17 5.00784 88.06 5.00784 87.56 5.00784 87.44 5.00784 87.285 5.00784 86.65 5.00784 86.29 5.00784 86.195 5.00784 86.115 5.00784 85.885 5.00784 85.8 5.00784 85.73 5.00784 85.625 5.00784 85.04 5.00784 85.025 5.00784 85.015 5.00784 84.995 5.00784 84.995 5.00784 84.875 5.00784 84.86 5.00784 84.75 5.002 84.715 5.002 84.7 5.002 84.695 5.002 84.64 5.00784 84.585 5.002 84.53 5.002 84.45 5.002 84.44 5.002 84.425 5.002 84.31 5.002 84.2 5.002 84.14 5.002 84.09 5.002 83.98 5.002 83.945 5.002 83.835 5.002 83.765 5.002 83.76 5.002 83.745 5.002 83.57 4.99617 83.455 4.99617 83.325 4.99617 83.12 4.99617 83.08 5.002 83.08 4.99617 83.075 5.002 82.915 4.99617 82.84 4.99617 82.815 4.99617 82.73 4.99617 82.7 4.99617 82.685 4.99617 82.55 4.99617 82.52 4.99617 82.495 4.99617 82.44 4.99617 82.44 4.99617 82.43 4.99617 82.405 4.99617 82.29 5.002 82.275 5.002 82.225 5.002 82.03 5.002 82.0 5.002 81.87 5.002 81.72 5.002 81.635 5.002 81.63 5.002 81.63 5.002 81.625 5.002 81.475 5.002 81.46 5.002 81.445 5.002 81.34 5.002 80.865 5.002 80.62 5.002 80.42 5.002 80.355 5.002 80.135 5.002 80.125 5.002 80.02 5.002 79.995 5.002 79.89 5.002 79.635 5.00784 79.625 5.00784 79.61 5.00784 79.47 5.00784 79.37 5.00784 79.25 5.00784 79.14 5.00784 79.045 5.00784 79.04 5.00784 78.96 5.00784 78.92 5.00784 78.92 5.00784 78.645 5.00784 78.595 5.00784 78.49 5.00784 77.795 5.00784 77.78 5.00784 77.775 5.00784 77.66 5.00784 77.35 5.01367 77.345 5.01367 77.34 5.01367 77.34 5.01367 77.335 5.01367 77.33 5.01367 77.3 5.01367 77.295 5.01367 77.29 5.01367 77.07 5.00784 77.065 5.00784 77.045 5.00784 77.04 5.00784 76.945 5.00784 76.86 5.00784 76.83 5.01367 76.825 5.01367 76.82 5.01367 76.815 5.01367 76.62 5.01367 76.445 5.01367 76.285 5.01367 76.115 5.01367 76.03 5.01367 75.655 5.01367 75.625 5.01367 75.565 5.01367 75.565 5.01367 75.12 5.0195 75.075 5.0195 75.05 5.0195 74.98 5.0195 74.815 5.0195 74.8 5.0195 74.665 5.0195 74.655 5.0195 74.325 5.0195 74.16 5.0195 74.14 5.0195 73.965 5.0195 73.845 5.0195 73.84 5.0195 73.83 5.0195 73.795 5.0195 73.71 5.0195 73.645 5.0195 73.55 5.0195 73.515 5.0195 73.48 5.0195 73.4 5.0195 73.125 5.0195 73.055 5.0195 73.005 5.0195 72.91 5.02534 72.64 5.02534 72.565 5.02534 72.445 5.02534 72.155 5.02534 72.065 5.0195 71.675 5.0195 71.67 5.0195 71.245 5.0195 71.19 5.0195 71.19 5.0195 71.105 5.0195 71.065 5.0195 70.955 5.01367 70.955 5.01367 70.84 5.01367 70.73 5.01367 70.73 5.01367 70.62 5.01367 70.62 5.01367 70.4 5.01367 70.285 5.01367 70.21 5.01367 70.205 5.01367 70.2 5.01367 70.185 5.01367 70.175 5.01367 70.065 5.00784 69.995 5.00784 69.98 5.01367 69.56 5.01367 69.41 5.00784 69.325 5.00784 69.28 5.00784 69.27 5.00784 69.205 5.00784 69.03 5.00784 68.5 5.00784 68.49 5.00784 68.36 5.00784 68.245 5.00784 68.175 5.00784 68.12 5.00784 68.015 5.00784 67.795 5.00784 67.74 5.00784 67.495 5.00784 67.38 5.00784 67.225 5.00784 67.22 5.00784 66.985 5.00784 66.505 5.01367 66.295 5.01367 66.205 5.01367 66.06 5.01367 65.84 5.01367 65.685 5.01367 65.475 5.01367 65.095 5.01367 65.04 5.01367 65.02 5.00784 65.0 5.00784 64.95 5.01367 64.945 5.01367 64.945 5.01367 64.94 5.01367 64.905 5.01367 64.875 5.01367 64.765 5.01367 64.735 5.01367 64.595 5.01367 64.57 5.01367 64.56 5.01367 64.54 5.01367 64.525 5.01367 64.51 5.01367 64.485 5.01367 64.465 5.01367 64.45 5.01367 64.44 5.01367 64.42 5.01367 64.38 5.01367 64.37 5.01367 64.37 5.01367 64.37 5.01367 64.34 5.01367 64.29 5.01367 64.285 5.01367 64.23 5.01367 64.175 5.01367 63.795 5.00784 63.795 5.00784 63.72 5.01367 63.64 5.01367 63.445 5.01367 63.36 5.01367 63.28 5.01367 63.215 5.01367 63.105 5.01367 63.0 5.01367 62.965 5.01367 62.695 5.01367 62.665 5.01367 62.665 5.01367 62.65 5.01367 62.465 5.01367 62.415 5.01367 62.355 5.01367 62.285 5.01367 62.25 5.01367 62.145 5.01367 62.135 5.01367 62.07 5.01367 62.025 5.01367 62.0 5.01367 61.955 5.01367 61.805 5.01367 61.695 5.0195 61.585 5.0195 61.565 5.0195 61.225 5.0195 61.01 5.01367 60.68 5.01367 60.57 5.01367 60.56 5.01367 60.535 5.01367 60.475 5.00784 60.435 5.00784 60.43 5.00784 60.315 5.00784 60.29 5.00784 60.255 5.00784 60.2 5.00784 }
-set us_regions(CA.4) {14.995 84.533 14.995 84.5447 15.035 84.5389 15.31 84.0546 14.995 83.6228 14.37 83.2727 14.23 83.3777 14.13 83.5936 14.37 84.0079 14.995 84.533 }
-set us_regions(FL.15) {215.17 175.956 215.21 175.979 215.595 176.014 215.625 176.026 215.89 175.915 215.89 175.915 215.89 175.915 216.01 175.822 216.0 175.81 215.97 175.752 215.585 174.999 215.49 175.04 215.385 175.186 215.335 175.256 215.065 175.67 215.065 175.676 215.085 175.833 215.17 175.956 215.17 175.956 }
-set us_regions(CA.5) {33.52 110.032 32.66 109.589 30.655 109.157 30.26 109.157 30.04 109.577 28.735 109.624 28.3 109.157 28.505 110.254 28.745 110.674 29.0 110.907 29.92 110.907 29.995 110.837 30.475 110.458 32.54 110.149 33.52 110.032 }
-set us_regions(MO.32) {153.46 68.02 153.46 68.0258 155.01 68.726 155.0 70.284 155.02 71.8828 156.91 89.0377 156.91 92.5328 156.91 92.5328 160.005 92.5328 165.01 92.5445 170.015 92.5387 175.015 92.5387 180.02 96.0338 181.335 96.0222 182.305 92.5387 182.575 92.5445 182.915 92.5328 184.335 89.1485 180.015 82.2807 175.0 72.0345 172.89 65.3884 172.905 65.3709 170.005 63.7896 165.07 63.9122 160.065 63.9997 155.04 63.988 151.18 63.9238 151.17 63.9238 153.46 68.02 }
-set us_regions(NC.44) {251.01 92.1711 250.015 92.1711 245.0 92.2177 240.0 92.2177 235.0 92.2294 230.0 92.2294 225.0 92.0835 221.655 91.9085 221.61 91.9085 221.61 91.9085 219.985 94.8727 214.995 97.6151 210.0 100.054 208.39 103.112 209.975 103.118 214.395 103.024 214.455 103.024 214.985 102.826 219.995 101.711 225.0 102.546 229.995 104.372 235.0 108.357 237.5 111.339 237.505 111.345 238.125 111.088 238.16 111.076 238.835 110.995 239.935 111.403 240.0 111.66 240.285 111.753 240.51 111.537 240.515 111.526 240.515 111.292 240.53 110.907 240.795 110.032 240.79 110.032 240.93 109.583 241.075 109.157 241.07 109.157 241.23 108.941 241.25 108.9 241.25 108.906 241.6 108.281 241.625 108.258 242.37 107.406 242.5 107.29 242.575 107.231 243.125 106.834 243.475 106.642 243.585 106.554 243.61 106.531 244.22 106.035 244.375 105.948 244.415 105.942 245.0 105.714 245.245 105.656 245.245 105.656 245.31 105.638 245.31 105.638 245.385 105.627 246.535 105.527 246.795 105.656 246.875 105.685 247.5 106.233 247.725 105.726 247.755 105.656 247.815 105.533 248.125 105.02 248.145 104.991 248.175 104.944 248.29 104.781 248.385 104.646 248.44 104.576 248.6 104.372 248.75 104.185 248.815 104.127 249.02 103.905 249.375 103.497 249.835 103.03 249.965 102.989 250.0 102.983 250.04 102.954 250.075 102.931 251.1 102.155 251.315 102.044 251.365 102.038 251.875 101.799 252.5 101.787 252.68 101.408 252.7 101.309 252.705 101.303 252.705 101.279 252.885 99.9666 252.915 99.6865 252.925 99.529 253.0 98.8755 252.975 98.6538 252.81 97.8018 252.8 97.7785 252.64 97.3817 252.5 97.0608 252.44 96.9032 252.17 96.1972 252.09 96.028 252.09 96.028 252.045 95.9113 251.875 95.4912 251.455 94.3125 251.445 94.2775 251.275 93.6298 251.25 93.554 251.15 93.0463 251.045 92.527 251.045 92.527 251.01 92.1711 }
-set us_regions(ME.26) {279.085 43.513 279.38 43.2504 280.555 42.5794 281.065 42.4043 281.66 42.0484 283.83 41.5933 284.72 40.9981 284.95 41.4241 285.005 41.4708 285.005 41.4708 286.285 40.4088 286.395 40.2804 287.59 39.8136 288.01 39.6619 289.145 38.6816 289.36 38.1623 289.395 38.1506 289.44 38.139 290.005 38.0514 290.17 37.8706 290.23 37.7597 290.565 37.7772 290.685 37.7947 290.88 37.7247 291.025 37.3863 291.03 37.2112 291.125 37.1353 291.25 37.252 291.255 37.252 291.285 37.2695 291.725 37.3046 291.865 37.3279 292.365 37.1003 292.505 37.0186 293.015 36.4001 293.285 36.3651 294.41 35.6358 294.55 35.4607 294.94 34.9939 295.005 34.9589 295.575 34.4512 295.335 34.2353 295.12 34.037 295.11 34.0136 295.1 33.9961 295.095 33.9728 295.095 33.9086 295.12 33.8036 295.13 33.7744 295.145 33.6985 295.04 33.5352 295.015 33.5118 294.99 33.471 294.905 33.3426 294.85 33.2376 294.835 33.2084 294.585 32.6191 294.545 32.5315 294.385 32.1348 294.38 32.1231 294.13 31.8547 293.755 31.738 293.695 31.6971 293.68 31.6913 293.65 31.6738 293.545 31.7263 293.545 31.738 293.515 31.8197 293.475 31.9947 293.29 32.1289 293.13 31.9889 293.04 31.9305 292.975 31.8722 292.995 31.7671 292.665 31.2595 292.615 31.0786 292.565 31.0436 292.63 30.9678 292.87 29.4857 292.87 29.2231 292.88 29.1822 292.86 29.0597 292.86 29.0247 292.875 28.9547 292.775 28.8321 292.405 28.8905 291.88 28.6921 291.73 28.6746 291.685 28.6338 291.675 28.6338 291.665 28.6338 291.38 28.2136 291.35 28.1845 291.37 28.2953 291.37 28.3653 291.36 28.3653 291.335 28.3595 291.225 28.3303 290.97 28.2428 291.035 27.7585 290.975 27.5951 291.1 27.2975 291.1 27.2917 291.1 27.28 291.18 27.2684 291.18 27.1983 291.05 27.0466 291.02 26.9533 290.985 26.9299 290.98 26.8599 291.005 26.8132 291.11 26.7257 291.155 26.6965 291.095 26.4048 291.095 26.3639 291.095 26.2998 291.095 26.2647 291.095 26.2472 291.095 26.113 291.095 26.0022 291.095 25.8563 291.095 25.4945 291.095 25.4012 291.095 25.3895 291.095 25.337 291.095 25.337 291.095 25.3311 291.095 25.2728 291.095 25.1561 291.095 25.0802 291.095 25.0744 291.095 25.0627 291.095 25.0627 291.095 24.9927 291.095 24.7943 291.095 24.7827 291.095 24.7068 291.095 24.6718 291.09 24.4851 291.09 24.4209 291.09 24.415 291.09 24.38 291.09 24.3392 291.09 24.1408 291.09 24.1058 291.09 24.0766 291.09 24.0533 291.09 23.9366 291.085 23.7849 291.085 23.7674 291.085 23.7265 291.085 23.5515 291.085 23.5048 291.085 23.3939 291.08 23.3181 291.08 23.2831 291.075 22.8629 291.075 22.8571 291.075 22.7404 291.07 22.4837 291.07 22.4311 291.065 22.1627 291.06 22.0344 291.06 22.0227 291.06 21.8243 291.06 21.8068 291.06 21.801 291.06 21.7951 291.06 21.7893 291.055 21.6026 291.055 21.5559 291.055 21.4392 291.055 21.3108 291.055 21.1825 291.055 21.0891 291.055 20.9199 291.055 20.7623 291.055 20.6982 291.055 20.6865 291.055 20.6456 291.05 20.4472 291.05 20.4472 291.05 20.4472 291.05 20.4414 291.05 20.4414 291.05 20.4356 291.05 20.4122 291.05 20.2664 291.05 20.2313 291.05 20.1263 291.05 20.033 291.05 19.9921 291.055 19.8988 291.055 19.8696 291.055 19.8579 291.055 19.8404 291.055 19.7587 291.05 19.6537 291.05 19.5487 291.05 19.537 291.05 19.3619 291.05 19.2919 291.05 19.2219 291.055 19.1577 291.055 19.1052 291.05 18.8951 291.055 18.8076 291.05 18.7843 291.05 18.7376 291.05 18.7143 291.05 18.6501 291.05 18.6034 291.055 18.58 291.05 18.5392 290.36 17.909 290.35 17.8857 290.345 17.8798 290.305 17.8098 290.29 17.7807 290.23 17.6173 290.005 17.4772 290.005 17.4714 289.69 17.2088 289.095 16.6895 288.8 16.5261 288.525 16.497 288.355 16.4853 288.315 16.4853 288.235 16.5028 287.69 16.9813 287.505 16.9404 287.035 17.0863 286.975 17.2613 286.945 17.2847 286.88 17.308 286.51 17.3197 285.865 17.5531 285.59 17.7223 285.495 17.7573 285.105 17.4772 285.005 17.4072 284.85 17.3197 284.835 17.3197 284.78 17.2555 284.735 16.9462 284.77 16.3161 284.78 16.3219 284.805 16.3102 284.79 16.2227 284.795 16.2169 284.745 16.0126 284.515 16.0126 284.285 15.8843 283.94 15.8201 283.88 15.7851 283.815 15.8726 283.63 16.1235 283.6 16.1644 283.41 16.4211 283.27 16.6195 283.16 16.7712 283.09 16.8646 282.945 17.0571 282.72 17.3722 282.635 17.4831 282.455 17.7398 282.385 17.8332 282.355 17.874 282.27 17.9907 282.19 18.1016 282.09 18.2416 281.99 18.3817 281.855 18.5684 281.615 18.901 281.59 18.936 281.46 19.111 281.365 19.2511 281.25 19.4028 281.25 19.4028 281.145 19.5545 281.095 19.6245 281.05 19.6829 281.03 19.712 280.785 20.0563 280.68 20.2022 280.57 20.3597 280.165 20.9257 280.02 21.1299 280.015 21.1533 280.01 21.165 279.91 21.8185 279.9 21.8593 279.9 21.871 279.885 21.9877 279.865 22.1044 279.785 22.647 279.775 22.7171 279.725 23.0322 279.72 23.0555 279.72 23.0905 279.72 23.0905 279.62 23.143 279.335 23.4231 279.12 23.5048 278.74 24.2458 278.62 24.5551 278.81 24.9752 278.74 25.267 278.715 25.3078 278.55 25.3545 278.44 26.2064 278.8 26.4106 278.385 27.0233 278.015 27.3676 278.02 27.3909 277.905 28.0152 277.235 28.3362 277.16 28.4412 277.01 28.6046 276.775 28.7621 276.56 29.0597 276.45 29.3456 276.42 29.6024 275.96 30.3609 275.83 31.0669 275.635 31.3762 275.605 31.3762 275.42 31.0845 275.33 30.7752 275.0 30.6177 274.735 30.8277 274.735 30.8277 274.72 30.8219 274.58 30.8744 274.59 30.9911 275.0 39.5802 277.125 47.5917 277.255 46.1388 277.465 45.8703 277.44 45.8878 278.9 43.7289 279.085 43.513 }
-set us_regions(CA.6) {37.76 113.533 36.87 114.128 36.87 114.134 37.255 114.408 37.25 114.408 37.495 115.044 38.12 115.213 38.28 115.284 38.295 115.284 38.455 115.284 38.45 115.284 38.745 115.062 38.745 115.068 38.745 114.572 37.76 113.533 }
-set us_regions(CA.7) {37.815 118.785 37.9 118.785 38.35 117.909 38.355 117.909 38.12 117.676 37.595 117.034 37.6 117.034 37.495 116.818 36.87 116.433 36.65 117.034 36.775 117.034 36.87 117.402 36.98 117.699 37.815 118.785 }
-set us_regions(CA.8) {33.12 115.178 32.885 114.963 32.855 114.933 32.85 114.928 31.87 114.898 31.87 115.394 32.495 115.861 33.12 115.686 33.12 115.19 33.12 115.178 }
-set us_regions(AL.0) {204.99 131.032 204.99 131.026 205.0 130.98 205.0 130.933 205.0 122.752 205.0 121.784 205.0 121.591 204.995 120.477 201.975 103.135 201.945 103.135 199.965 103.106 195.0 103.065 190.0 102.989 189.0 103.059 188.08 136.931 189.19 136.64 189.695 137.031 189.815 137.013 190.0 136.82 190.0 136.82 190.095 136.803 190.095 136.803 190.945 136.797 191.015 136.785 191.28 136.727 191.53 136.675 191.7 136.651 191.875 136.599 192.41 136.435 194.98 131.044 199.97 131.085 204.99 131.032 204.99 131.032 }
-set us_regions(CA.9) {34.995 113.282 34.995 113.282 35.01 113.294 34.995 114.105 34.995 113.282 }
-set us_regions(WA.59) {35.685 5.002 35.62 4.99617 35.545 5.002 35.485 5.002 35.225 5.002 34.995 5.002 34.97 5.002 34.905 5.002 34.895 5.002 34.535 5.002 34.34 5.002 34.315 5.002 34.1 5.002 34.095 5.002 34.075 5.002 33.845 5.002 33.74 5.002 33.66 5.002 33.575 5.002 33.565 5.002 33.56 5.002 33.485 5.002 33.02 5.002 32.865 5.002 32.855 5.002 32.815 5.002 32.785 5.002 32.71 5.002 32.69 5.002 32.655 5.002 32.635 5.002 32.495 5.002 32.455 5.002 32.445 5.002 32.415 5.002 32.355 5.002 32.34 5.002 32.335 5.002 32.32 5.002 32.31 5.002 32.295 5.002 32.265 5.002 32.24 5.002 32.12 5.002 32.025 5.002 31.89 5.002 31.695 5.002 31.685 5.002 31.67 5.002 31.665 5.002 31.64 5.002 31.495 5.002 31.49 5.002 31.49 5.002 31.395 5.002 31.375 5.002 31.37 4.99617 31.365 4.99617 31.13 5.002 30.995 5.002 30.62 4.99617 30.615 4.99617 30.575 5.002 30.405 5.002 30.325 5.002 30.185 5.002 29.845 5.00784 29.815 5.00784 29.775 5.00784 29.65 5.00784 29.625 5.00784 29.5 5.002 29.42 5.002 29.295 5.002 29.27 5.002 29.22 5.002 28.8 5.002 28.745 5.002 28.475 4.99617 28.365 4.99617 28.205 4.99617 28.12 4.99617 27.87 4.99617 27.685 4.99617 27.575 4.99617 27.425 4.99617 27.225 4.99617 27.22 4.99617 26.92 4.99617 26.84 4.99617 26.595 5.002 26.415 5.002 26.0 5.002 25.985 5.002 25.745 5.002 25.58 5.002 25.25 5.002 25.105 5.002 24.9 4.99617 24.72 4.99617 24.685 4.99617 24.665 4.99617 24.55 4.99617 24.4 4.99617 23.965 4.99617 23.85 4.99617 23.84 4.99617 23.76 4.99617 23.755 4.99617 23.49 4.99617 23.465 4.99617 23.315 4.99617 23.245 4.99617 23.02 5.002 22.945 5.002 22.88 5.002 22.77 5.002 22.71 5.002 22.38 5.00784 22.38 5.00784 22.37 5.00784 21.935 5.01367 21.725 5.01367 21.715 5.01367 21.55 5.0195 21.385 5.0195 21.155 5.0195 21.03 5.01367 20.855 5.01367 20.58 5.00784 20.435 5.002 20.415 5.002 20.33 5.002 20.33 5.002 20.295 5.002 20.265 5.002 20.25 5.002 19.985 4.99617 19.955 4.99617 19.755 4.99033 19.32 4.9845 19.315 4.9845 19.195 4.9845 19.18 4.9845 19.08 4.9845 19.025 4.9845 18.835 4.9845 18.74 4.9845 18.685 4.9845 18.685 4.9845 18.675 4.9845 18.67 4.9845 18.665 4.9845 18.665 4.9845 18.665 4.9845 18.64 4.9845 18.54 4.9845 18.305 4.9845 18.275 4.9845 18.275 4.9845 18.185 4.9845 18.12 4.9845 17.97 4.9845 17.965 4.9845 17.96 4.9845 17.805 4.9845 17.805 4.9845 17.74 4.9845 17.685 4.9845 17.63 4.9845 17.575 4.9845 17.385 4.9845 17.245 4.9845 16.97 4.9845 16.585 4.9845 16.475 4.9845 16.385 4.9845 16.38 4.9845 16.325 4.99033 16.325 4.99033 16.32 4.99033 16.32 4.99033 16.31 4.99033 16.28 4.9845 16.255 4.9845 16.23 4.9845 16.22 4.9845 16.215 4.9845 16.21 4.9845 16.21 4.9845 16.165 4.9845 16.16 4.9845 16.105 4.9845 15.88 4.9845 15.765 4.9845 15.665 4.9845 15.62 4.9845 15.39 4.9845 14.995 4.99033 14.975 4.99033 14.935 4.99033 14.825 4.9845 14.605 4.99033 14.545 4.99033 14.37 4.99033 14.37 4.99033 13.405 5.002 14.37 5.73721 14.56 5.87725 14.71 5.99395 14.875 6.12232 14.96 6.18067 14.635 6.7525 14.37 6.86337 14.37 6.86337 13.745 7.10843 13.715 7.12594 13.695 7.12594 13.745 7.51105 13.76 7.58691 13.765 7.59858 13.885 8.08288 14.055 8.503 14.055 8.503 14.06 8.50884 14.2 8.82976 14.37 8.99314 14.38 9.00481 14.42 9.03982 14.42 9.04566 14.37 9.12151 14.19 9.37825 14.19 9.37825 13.755 10.0143 13.515 10.0785 13.255 10.1543 13.095 10.1952 13.07 10.2068 12.995 10.2302 12.915 10.2535 12.905 10.2535 12.395 10.3994 12.205 10.4169 11.32 10.2535 11.32 10.2535 11.11 10.2068 10.315 10.0143 10.26 10.0026 9.37 9.69334 9.37 9.69917 8.665 9.42493 8.545 9.37825 8.545 9.37825 8.195 9.24404 7.495 8.98147 7.495 8.97563 7.28 8.89395 7.24 8.88228 6.83 8.72473 6.36 8.54384 6.26 8.50884 6.25 8.503 6.25 8.503 6.245 8.503 6.185 8.503 6.185 8.503 6.245 8.86477 6.27 8.88228 6.27 8.88228 6.245 8.89395 6.08 10.0785 6.045 10.2535 5.905 11.1288 6.03 11.3271 6.085 12.3133 6.245 12.6517 6.245 12.6517 6.265 12.6809 6.285 12.7042 6.395 12.7859 6.425 12.8442 6.45 12.8793 6.44 12.8793 6.47 12.9726 6.87 13.3811 6.87 13.3752 7.145 13.7545 7.275 13.8887 7.31 13.9529 7.19 14.198 7.415 14.6298 7.41 14.6298 7.495 14.6531 7.805 14.974 7.815 15.0557 7.85 15.2716 7.85 15.2716 7.89 15.505 7.89 15.505 7.98 16.5611 8.075 16.7303 8.12 16.7654 8.22 17.0046 8.455 17.2555 8.455 17.2555 8.475 17.2905 8.565 17.664 8.635 17.979 8.745 18.3291 8.745 18.3291 8.745 18.3525 8.78 18.8835 8.79 19.006 8.79 19.006 8.78 19.1227 8.795 19.6887 8.955 19.8813 9.095 20.4531 9.12 20.6165 9.205 21.0132 9.235 21.1241 9.33 22.1686 9.33 22.4136 9.33 22.507 9.335 22.5187 9.34 22.5478 9.34 22.5712 9.34 22.7462 9.34 23.038 9.35 23.2364 9.34 23.4289 9.33 23.4756 9.315 23.5456 9.3 23.639 9.285 23.6973 9.2 24.1816 9.37 24.1758 10.005 24.0883 15.015 25.1094 20.01 28.6863 25.07 28.4645 30.0 27.3209 35.005 26.0839 40.015 26.0022 45.0 26.0313 45.42 26.043 45.005 23.8782 44.84 5.17705 44.84 5.00784 44.765 5.00784 44.33 5.00784 44.2 5.00784 44.155 5.00784 44.15 5.00784 44.01 5.00784 43.995 5.00784 43.82 5.00784 43.66 5.002 43.66 5.002 43.5 5.002 43.5 5.002 43.245 5.002 43.24 5.002 43.225 5.002 43.11 5.002 42.855 4.99617 42.835 4.99617 42.825 4.99617 42.68 4.99617 42.67 4.99617 42.605 4.99617 42.55 4.99617 42.385 4.99617 42.28 4.99617 42.23 4.99617 42.225 4.99617 42.03 4.99617 41.865 4.99617 41.865 4.99617 41.855 4.99617 41.845 4.99617 41.84 4.99617 41.835 4.99617 41.83 4.99617 41.82 4.99617 41.635 4.99617 41.625 4.99617 41.56 4.99617 41.495 4.99617 41.39 4.99617 41.355 4.99617 41.255 4.99617 41.24 4.99617 40.98 4.99617 40.975 4.99617 40.84 4.99617 40.83 4.99617 40.655 4.99617 40.62 4.99617 40.62 5.002 40.58 5.002 40.545 5.002 40.455 5.002 40.415 5.002 40.35 5.002 40.34 5.002 40.285 5.002 40.275 5.002 40.19 5.002 40.175 5.002 40.15 5.002 40.105 5.002 39.995 5.002 39.995 4.99617 39.99 4.99617 39.905 5.002 39.87 5.002 39.795 5.002 39.78 5.002 39.775 5.002 39.77 5.002 39.665 5.002 39.665 5.002 39.59 5.002 39.58 5.002 39.325 5.002 39.275 5.002 39.125 5.002 39.015 5.002 38.885 5.002 38.88 5.002 38.875 5.002 38.745 4.99617 38.62 5.002 38.55 5.002 38.5 5.002 38.45 5.002 38.32 5.002 38.205 5.002 38.175 5.002 38.12 4.99617 37.96 4.99617 37.68 5.002 37.54 5.002 37.54 5.002 37.51 5.002 37.48 5.002 37.32 5.002 37.105 5.002 36.945 5.002 36.895 5.002 36.71 5.002 36.605 5.002 36.6 5.002 36.59 5.002 36.515 5.002 36.4 5.002 36.365 5.002 36.29 5.002 36.195 5.002 36.15 5.002 36.14 5.002 35.95 5.002 35.87 5.002 35.815 5.002 35.72 5.002 35.685 5.002 }
-set us_regions(SD.53) {109.775 26.3931 109.71 33.0275 109.735 47.0082 109.75 47.0082 110.04 47.0023 115.06 47.0082 120.025 47.0198 125.16 47.0257 130.185 47.0257 135.045 47.0257 140.03 48.6595 145.01 48.6945 147.785 50.5909 147.735 43.513 147.185 26.4631 145.005 26.4573 140.005 26.4573 135.025 26.4281 130.07 26.4165 125.095 26.3989 120.005 26.3989 115.02 26.3931 110.05 26.3931 109.83 26.3931 109.775 26.3931 }
-set us_regions(DE.12) {252.925 69.4087 251.06 69.9689 254.755 78.8614 255.035 78.8614 255.07 78.8614 255.07 78.7564 255.075 78.6222 255.08 78.523 255.08 78.523 255.06 78.1554 255.03 77.7236 255.015 77.6478 255.0 77.6186 254.95 77.0059 254.935 76.615 254.925 76.5041 252.925 69.4087 }
-set us_regions(GA.16) {223.1 132.718 223.125 132.316 223.47 131.102 223.435 131.038 223.435 131.038 223.415 131.015 223.275 130.624 223.57 130.32 223.555 130.163 223.555 130.163 223.555 130.157 223.75 129.912 223.75 129.912 223.975 129.492 224.07 129.287 224.08 128.978 224.105 128.692 224.14 128.412 224.055 128.231 224.375 127.689 224.47 127.537 224.47 127.537 224.5 127.409 224.52 127.391 224.525 127.391 224.67 126.662 224.74 126.102 225.0 125.827 225.015 125.798 225.015 125.787 225.29 125.39 225.6 124.911 225.625 124.87 225.675 124.777 225.925 124.456 226.06 124.246 226.08 124.083 226.085 124.077 226.09 124.036 226.095 123.96 226.24 123.808 226.24 123.808 226.245 123.791 226.25 123.785 226.285 123.674 226.25 123.674 224.995 123.342 219.995 113.405 215.0 106.724 214.455 103.024 214.395 103.024 209.975 103.118 208.39 103.112 205.0 103.118 201.98 103.135 201.975 103.135 204.995 120.477 205.0 121.591 205.0 121.784 205.0 122.752 205.0 130.933 205.0 130.98 204.99 131.026 204.99 131.032 204.99 131.032 205.0 131.242 210.0 133.337 215.0 133.728 220.0 132.52 223.265 133.051 223.125 132.736 223.12 132.73 223.1 132.718 223.1 132.718 }
-set us_regions(WI.61) {180.215 16.9696 180.0 16.9521 175.0 17.9557 169.99 21.0132 170.03 37.4096 173.91 43.5072 175.0 49.0037 176.815 50.4216 176.795 50.4567 180.0 50.4683 185.0 50.5442 189.995 50.55 194.375 50.5617 194.9 50.5617 194.9 50.5558 195.005 38.915 195.0 29.8999 190.0 27.4492 185.0 25.302 180.0 23.814 180.215 16.9696 }
-
diff --git a/blt3.0/demos/winop1.tcl b/blt3.0/demos/winop1.tcl
deleted file mode 100755
index df97b08..0000000
--- a/blt3.0/demos/winop1.tcl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-#set imgfile ./images/sample.gif
-set imgfile ./images/blt98.gif
-set imgfile ~/dstrange.xpm
-set imgfile ~/8.jpg
-set imgfile ~/250px-KittyPryde+Wolverine4.jpg
-set imgfile ~/thunderbird.png
-set imgfile ~/testfile.png
-if { [llength $argv] > 0 } {
-    set imgfile [lindex $argv 0]
-}
-if { [ file exists $imgfile] } {
-    set src [image create picture -file $imgfile]  
-} else {
-    puts stderr "no image file"
-    exit 0
-}
-set name [file root [file tail $imgfile]]
-set width [image width $src]
-set height [image height $src]
-
-option add *Label.font *helvetica*10*
-option add *Label.background white
-label .l0 -image $src
-label .header0 -text "$width x $height"
-label .footer0 -text "100%"
-. configure -bg white
-#$src quantize $src 150
-set type gif
-set i 0
-foreach scale { 0.8 0.6666666 0.5 0.4 0.3333333 0.3 0.25 0.2 0.15 0.1 } {
-    incr i
-    set iw [expr int($width * $scale)]
-    set ih [expr int($height * $scale)]
-    set r [format %6g [expr 100.0 * $scale]]
-    image create picture r$i -width $iw -height $ih
-    #puts stderr before=[r$i info]
-    r$i resize $src -filter sinc
-    #puts stderr after=[r$i info]
-    r$i export $type -file ${name}-${scale}.$type 
-#triangle 
-#box
-    label .header$i -text "$iw x $ih"
-    label .footer$i -text "$r%"
-    label .l$i -image r$i
-    blt::table . \
-	0,$i .header$i \
-	1,$i .l$i \
-	2,$i .footer$i
-    update
-}
-
-
diff --git a/blt3.0/demos/winop2.tcl b/blt3.0/demos/winop2.tcl
deleted file mode 100755
index 348725d..0000000
--- a/blt3.0/demos/winop2.tcl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set file images/qv100.t.gif
-
-if { [file exists $file] } {
-    set photo [image create picture -file $file]  
-} else {
-    puts stderr "no image file"
-    exit 0
-}
-
-option add *Label.font *helvetica*10*
-option add *Label.background lightsteelblue
-
-set i 0
-foreach r { -45 0 45 90 135 180 225 270 315 360 -315 } {
-    set dest [image create picture -rotate $r -image $photo]
-    label .footer$i -text "$r degrees"
-    label .l$i -image $dest
-    blt::table . \
-	0,$i .l$i \
-	1,$i .footer$i
-    update
-    incr i
-}
-
-
diff --git a/blt3.0/demos/winop3.tcl b/blt3.0/demos/winop3.tcl
deleted file mode 100755
index 7a175bf..0000000
--- a/blt3.0/demos/winop3.tcl
+++ /dev/null
@@ -1,74 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-#set imgfile ./images/sample.gif
-set imgfile ./images/blt98.gif
-if { [llength $argv] > 0 } {
-    set imgfile [lindex $argv 0]
-}
-if { [ file exists $imgfile] } {
-    set src [image create picture -file $imgfile]  
-} else {
-    puts stderr "no image file"
-    exit 0
-}
-set name [file root [file tail $imgfile]]
-set width [image width $src]
-set height [image height $src]
-set filter sinc
-
-option add *Label.font *helvetica*10*
-option add *Label.background white
-label .l0 -image $src
-label .header0 -text "$width x $height"
-label .footer0 -text "100%"
-. configure -bg white
-set iw $width
-set ih $height
-set dest [image create picture -width $iw -height $ih]
-$dest resize $src -filter $filter
-label .header -text "$iw x $ih"
-label .footer -text "$filter"
-label .l1 -image $dest
-set filters {
-    "bell"    
-    "bessel"  
-    "box"     
-    "bspline" 
-    "catrom"  
-    "default" 
-    "dummy"   
-    "gauss8"  
-    "gaussian"
-    "gi"	
-    "lanczos3"
-    "mitchell"
-    "none"    
-    "sinc"    
-    "tent"	
-    "triangle"
-}
-
-proc Doit { filter } {
-    global dest src
-    set time [time {$dest resize $src -filter $filter}]
-    .footer configure -text $time
-}
-
-set i 0
-frame .f 
-foreach f $filters {
-    radiobutton .f.$f -variable filter -value $f -text $f \
-	-command "Doit $f"
-    blt::table .f $i,0 .f.$f -anchor w
-    incr i
-}
-blt::table . \
-   0,0 .f -rspan 3 \
-   0,1 .header \
-   1,1 .l0 1,2 .l1 \
-   2,1 .footer
-
-
diff --git a/blt3.0/demos/winop4.tcl b/blt3.0/demos/winop4.tcl
deleted file mode 100644
index 0b81f71..0000000
--- a/blt3.0/demos/winop4.tcl
+++ /dev/null
@@ -1,86 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set filter sinc
-set shadow 8
-#set imgfile ./images/sample.gif
-set imgfile ./images/blt98.gif
-#set imgfile ~/.icons/cd-player.xpm
-if { [llength $argv] > 0 } {
-    set imgfile [lindex $argv 0]
-}
-if { [ file exists $imgfile] } {
-    set src [image create picture -file $imgfile]  
-} else {
-    puts stderr "no image file"
-    exit 0
-}
-set name [file root [file tail $imgfile]]
-set width [image width $src]
-set height [image height $src]
-set bg [image create picture \
-	    -width [expr $width + $shadow] \
-	    -height [expr $height + $shadow]]
-$bg blank white
-$bg draw rectangle 4 4 [expr $width - 4] [expr $height - 4] -thickness 0 -color grey60
-puts stderr "blur=[time {$bg blur $bg 8}]"
-#puts stderr "resample=[time {$bg resize $bg -filter gi8}]"
-#$bg copy $src 
-set src $bg
-#$src blur $src 8
-option add *Label.font *helvetica*10*
-option add *Label.background white
-
-label .l0 -image $src
-label .header0 -text "$width x $height"
-label .footer0 -text "100%"
-. configure -bg white
-set iw $width
-set ih $height
-set dest [image create picture -width $iw -height $ih]
-$dest resize $src -filter $filter
-label .header -text "$iw x $ih"
-label .footer -text "$filter"
-label .l1 -image $dest
-set filters {
-    "bell"    
-    "bessel"  
-    "box"     
-    "bspline" 
-    "catrom"  
-    "default" 
-    "dummy"   
-    "gauss8"  
-    "gaussian"
-    "gi"	
-    "lanczos3"
-    "mitchell"
-    "none"    
-    "sinc"    
-    "tent"	
-    "triangle"
-}
-
-proc Doit { filter } {
-    global dest src
-    set time [time {$dest resize $src -filter $filter}]
-    .footer configure -text $time
-}
-
-set i 0
-frame .f 
-foreach f $filters {
-    radiobutton .f.$f -variable filter -value $f -text $f \
-	-command "Doit $f"
-    blt::table .f $i,0 .f.$f -anchor w
-    incr i
-}
-blt::table . \
-   0,0 .f -rspan 3 \
-   0,1 .header \
-   1,1 .l0 1,2 .l1 \
-   2,1 .footer
-
-
diff --git a/blt3.0/demos/winop5.tcl b/blt3.0/demos/winop5.tcl
deleted file mode 100644
index d8df6f8..0000000
--- a/blt3.0/demos/winop5.tcl
+++ /dev/null
@@ -1,81 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-source scripts/demo.tcl
-
-set filter sinc
-set shadow 8
-#set imgfile ./images/sample.gif
-set imgfile ./images/blt98.gif
-#set imgfile ~/.icons/cd-player.xpm
-if { [llength $argv] > 0 } {
-    set imgfile [lindex $argv 0]
-}
-if { [ file exists $imgfile] } {
-    set src [image create picture -file $imgfile]  
-} else {
-    puts stderr "no image file"
-    exit 0
-}
-set xoff 5
-set yoff 5
-set name [file root [file tail $imgfile]]
-set width 500 
-set height 500
-set bg [image create picture -width $width -height $height]
-set bg2 [image create picture -width $width -height $height]
-set r 200
-set cx [expr $width / 2]
-set cy [expr $height / 2]
-set x [expr $cx + $xoff]
-set y [expr $cy + $yoff]
-#$bg draw circle $x $y $r -color blue -thickness 0  
-set layer1 [image create picture -width $width -height $height]
-$layer1 blank 0x00000000
-$layer1 draw circle $x $y $r -color 0xFFFFFFFF -thickness 0  
-$layer1 blur $layer1 10
-set layer2 [image create picture -width $width -height $height]
-set layer3 [image create picture -width $width -height $height]
-$layer2 select $layer1 0x01000000 0xFFFFFFFF
-$layer2 and 0xFF000000
-$layer2 and $layer1 
-$layer3 copy $layer1
-$layer3 select $layer1 0x01000000 0xFFFFFFFF
-#$layer3 and 0x00FFFF00
-$bg2 gradient -low green2 -high green4 -jitter yes -log no
-puts bg2=[$bg2 get 200 200]
-#$bg2 and 0x00FFFFFF
-puts bg2=[$bg2 get 200 200]
-puts layer1=[$layer1 get 200 200]
-$layer1 and $bg2 
-puts and=[$layer1 get 200 200]
-$bg gradient -low blue1 -high blue4 -jitter yes -log no
-#$layer1 or 0xFF000000
-#$layer1 blend $bg $layer1 
-#-matte $layer3
-
-#$layer1 min $bg
-$bg blend $bg $layer2  
-#-matte $layer1
-
-set src $layer1
-set src $bg
-set dest $layer1
-
-option add *Label.font *helvetica*10*
-option add *Label.background white
-
-label .l0 -image $src
-label .header0 -text "$width x $height"
-label .footer0 -text "100%"
-. configure -bg white
-set iw $width
-set ih $height
-label .header -text "$iw x $ih"
-label .footer -text "$filter"
-label .l1 -image $dest
-
-blt::table . \
-   0,1 .header \
-   1,1 .l0  1,2 .l1 \
-   2,1 .footer
diff --git a/blt3.0/demos/winop6.tcl b/blt3.0/demos/winop6.tcl
deleted file mode 100644
index dda19ce..0000000
--- a/blt3.0/demos/winop6.tcl
+++ /dev/null
@@ -1,40 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-set shadow 8
-set xoff 5
-set yoff 5
-set width 500 
-set height 500
-set r 200
-set cx [expr $width / 2]
-set cy [expr $height / 2]
-set x [expr $cx + $xoff]
-set y [expr $cy + $yoff]
-
-set l1 [image create picture -width $width -height $height]
-set l2 [image create picture -width $width -height $height]
-set bg [image create picture -file images/blt98.gif -width 200 -height 200 -aspect no]
-$bg and 0x00FFFFFF
-$l1 blank 0x00000000
-$l1 draw rectangle 8 8 200 200 -color 0xFFFFFFFF -thickness 0  
-$l1 blur $l1 8
-$l2 select $l1 0x01000000 0xFFFFFFFF
-$l1 and 0xFF000000 -mask $l2
-$l1 or $bg -mask $l2
-$l1 sub 0x0F000000 -mask $l2
-set bg [image create picture -width $width -height $height]
-$bg gradient -high yellow -low black -jitter yes -log no
-$bg blend $bg $l1 
-
-option add *Label.font *helvetica*10*
-option add *Label.background white
-
-label .l0 -image $l1
-label .l1 -image $l2
-label .l3 -image $bg
-. configure -bg white
-
-blt::table . \
-   1,1 .l0  1,2 .l1 1,3 .l3 
diff --git a/blt3.0/examples/calendar.tcl b/blt3.0/examples/calendar.tcl
deleted file mode 100755
index d680df7..0000000
--- a/blt3.0/examples/calendar.tcl
+++ /dev/null
@@ -1,141 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-if { $tcl_version >= 8.0 } {
-    namespace import blt::*
-    namespace import -force blt::tile::*
-}
-
-#source scripts/demo.tcl
-
-set file ../demos/images/chalk.gif
-set active ../demos/images/rain.gif
-
-image create photo calendar.texture.1 -file $file
-image create photo calendar.texture.2 -file $active
-
-option add *Tile calendar.texture.1
-
-option add *HighlightThickness		0
-option add *calendar.weekframe*Tile	calendar.texture.2
-option add *Calendar.Label.borderWidth	0
-option add *Calendar.Label.relief	sunken
-option add *Calendar.Frame.borderWidth	2
-option add *Calendar.Frame.relief	raised
-option add *Calendar.Label.font		{ Helvetica 11 }
-option add *Calendar.Label.foreground	navyblue
-option add *button.foreground		navyblue
-option add *background 			grey85
-#option add *button.activeForeground	red
-#option add *button.activeBackground	blue4
-option add *Label.ipadX			200
-
-array set monthInfo {
-    Jan { January 31 }
-    Feb { February 28 } 
-    Mar { March 31 } 
-    Apr { April 30 } 
-    May { May 31 } 
-    Jun { June 30 } 
-    Jul { July 31 }
-    Aug { August 31 }
-    Sep { September 30 }
-    Oct { October 31 }
-    Nov { November 30 }
-    Dec { December 31 }
-}
-
-option add *tile calendar.texture.2 
-set abbrDays { Sun Mon Tue Wed Thu Fri Sat }
-
-proc Calendar { weekday day month year } {
-    global monthInfo abbrDays 
-    
-    set wkdayOffset [lsearch $abbrDays $weekday]
-    if { $wkdayOffset < 0 } {
-	error "Invalid week day \"$weekday\""
-    }
-    set dayOffset [expr ($day-1)%7]
-    if { $wkdayOffset < $dayOffset } {
-	set wkdayOffset [expr $wkdayOffset+7]
-    }
-    set wkday [expr $wkdayOffset-$dayOffset-1]
-    if { [info commands .calendar] == ".calendar" } {
-	destroy .calendar 
-    }
-    frame .calendar -class Calendar -width 3i -height 3i
-
-    if ![info exists monthInfo($month)] {
-	error "Invalid month \"$month\""
-    }
-
-    set info $monthInfo($month)
-    label .calendar.month \
-	-text "[lindex $info 0] $year"  \
-	-font { Courier 14 bold }
-    table .calendar .calendar.month 1,0 -cspan 7  -pady 10
-    
-    set cnt 0
-    frame .calendar.weekframe -relief sunken -bd 1
-    table .calendar .calendar.weekframe 2,0 -columnspan 7 -fill both  
-    foreach dayName $abbrDays {
-	set name [string tolower $dayName]
-	label .calendar.$name \
-	    -text $dayName \
-	    -font { Helvetica 12 }
-	table .calendar .calendar.$name 2,$cnt -pady 2 -padx 2
-	incr cnt
-    }
-    table configure .calendar c* r2 -pad 4 
-    set week 0
-    set numDays [lindex $info 1]
-    for { set cnt 1 } { $cnt <= $numDays } { incr cnt } {
-	label .calendar.day${cnt} -text $cnt 
-	if { $cnt == $day } {
-	    .calendar.day${cnt} configure -relief sunken -bd 1
-	}
-	incr wkday
-	if { $wkday == 7 } {
-	    incr week
-	    set wkday 0
-	}
-	table .calendar .calendar.day${cnt} $week+3,$wkday \
-	    -fill both -ipadx 10 -ipady 4 
-    }
-    frame .calendar.quit -bd 1 -relief sunken
-    button .calendar.quit.button -command { exit } -text {Quit} -bd 2 
-    table .calendar.quit \
-	.calendar.quit.button -padx 4 -pady 4
-    table .calendar \
-	.calendar.quit $week+4,5 -cspan 2 -pady 4 
-    table . \
-	.calendar -fill both
-    table configure .calendar r0 -resize none
-    table configure .calendar c0 c6
-}
-
-set date [clock format [clock seconds] -format {%a %b %d %Y}]
-scan $date { %s %s %d %d } weekday month day year
-
-Calendar $weekday $day $month $year
diff --git a/blt3.0/examples/form.tcl b/blt3.0/examples/form.tcl
deleted file mode 100755
index 00737f9..0000000
--- a/blt3.0/examples/form.tcl
+++ /dev/null
@@ -1,1061 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-#source scripts/demo.tcl
-
-option add *takeFocus 0
-
-set file1 ../demos/images/chalk.gif
-#set file1 /home/gah/titanium.jpg
-set file2 ../demos/images/tan_paper.gif
-image create picture texture1 -file $file1
-image create photo texture2 -file $file2
-option add *Frame.Tile texture1
-option add *Toplevel.Tile texture1
-option add *Label.Tile texture1
-#option add *Scrollbar.tile texture1
-#option add *Scrollbar.activeTile texture2
-#option add *Button.tile texture1
-#option add *Button.activeTile texture2
-option add *HighlightThickness 0
-option add *Entry.highlightThickness 2
-
-#
-# Initialization of global variables and Tk resource database
-#
-#
-# Resources available
-#
-# Tk.normalBgColor: 
-# Tk.normalFgColor: 
-# Tk.focusHighlightColor: 
-# Tk.statusFont: 
-# Tk.titleFont: 
-# Tk.headingFont: 
-# Tk.subheadingFont:
-# Tk.entryFont:
-# Tk.textFont:
-#
-
-#debug 50
-blt::bitmap define attlogo { { 60 30 } {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x7e, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xf8, 0x03,
-    0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x83, 0xf9, 0x87, 0x7f, 0x00,
-    0x00, 0x00, 0x00, 0x80, 0xf9, 0x87, 0x7f, 0x00, 0x40, 0x00, 0xf0, 0xc7,
-    0xc3, 0x38, 0x0c, 0x00, 0xc0, 0xff, 0xff, 0xc7, 0xc3, 0x7c, 0x0c, 0x00,
-    0x00, 0x00, 0x00, 0x40, 0xc2, 0x6c, 0x0c, 0x00, 0x40, 0x00, 0xf8, 0x67,
-    0xc6, 0x9c, 0x0d, 0x00, 0xc0, 0xff, 0xff, 0xe7, 0xc7, 0xf8, 0x0d, 0x00,
-    0x00, 0x00, 0x00, 0xe0, 0xc7, 0xec, 0x0c, 0x00, 0x80, 0x01, 0xfe, 0x33,
-    0xcc, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x33, 0xcc, 0xb8, 0x0d, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
-}
-
-blt::bitmap define globe_00 { { 32 32 } {
-    00 40 02 00 00 1c 3c 00 00 01 fe 00 80 80 fe 03 60 00 ff 07 10 c0 f1 0f
-    00 80 c0 1f 00 c0 07 3f 00 c0 ff 3f 00 f0 ff 4f 02 f0 ff 5d 00 f0 ff 1b
-    00 f0 ff 8f 02 f0 ff 0f 06 e0 fc 0f 0e 00 f8 0f 0f 00 f8 07 3f 00 f8 03
-    7e 00 f0 03 7e 00 f0 03 3e 00 f0 0b 3c 00 f0 09 3c 00 f0 01 18 00 f0 00
-    18 00 70 00 10 00 00 00 10 00 00 00 20 00 00 00 40 00 00 00 00 00 00 00
-    00 00 00 00 00 00 1f 00 }
-}
-
-blt::bitmap define globe_01 { { 32 32 } {
-    00 c0 00 00 00 34 38 00 00 02 e8 00 80 01 fa 03 e0 00 fc 07 30 00 e6 0f
-    10 00 86 1f 08 00 3e 3c 04 00 ff 3f 04 80 ff 5f 02 80 ff 3f 00 80 ff 2f
-    00 80 ff 3f 0c 00 ff 3f 1c 00 ee 3f 3c 00 c0 3f 7e 00 c0 1f fe 01 80 1f
-    fc 03 80 1f fc 01 80 1f fc 01 80 2f f8 01 80 0f f0 00 80 17 f0 00 80 03
-    f0 00 80 03 60 00 00 00 60 00 00 00 40 00 00 00 80 00 00 00 00 00 00 00
-    00 00 00 00 00 00 1e 00 }
-}
-
-blt::bitmap define globe_02 { { 32 32 } {
-    00 c0 01 00 00 60 30 00 00 04 f0 00 80 07 e0 03 e0 01 f0 07 f0 00 38 0f
-    30 00 10 1e 18 00 f0 30 04 00 f8 3f 10 00 f8 7f 12 00 fc 7f 02 00 fc 7f
-    04 00 fc 7f 74 00 f8 7f f0 00 70 7f f8 01 00 7e f8 03 00 7e f8 0f 00 7c
-    f8 1f 00 3c f0 1f 00 3c f0 0f 00 3e e0 0f 00 5e c0 07 00 1c c0 03 00 0e
-    c0 03 00 04 80 01 00 00 80 01 00 00 80 01 00 00 00 01 00 00 00 00 00 00
-    00 00 00 00 00 10 1c 00 }
-}
-
-blt::bitmap define globe_03 { { 32 32 } {
-    00 c0 01 00 00 dc 20 00 00 09 c0 00 80 1f a0 03 e0 07 c0 07 f0 01 c0 0c
-    f8 00 40 18 78 00 c0 23 08 00 c0 3f 04 00 e0 7f 54 00 e0 7f 0c 00 c0 7f
-    10 00 c0 ff d0 01 c0 ff c0 03 80 fb e0 0f 00 f0 e0 1f 00 f0 e0 ff 00 f0
-    e0 ff 00 70 c0 ff 00 70 c0 7f 00 70 00 7f 00 70 00 3f 00 30 00 1f 00 38
-    00 1f 00 18 00 0e 00 00 00 06 00 00 00 02 00 00 00 04 00 00 00 00 00 00
-    00 00 00 00 00 20 18 00 }
-}
-
-blt::bitmap define globe_04 { { 32 32 } {
-    00 c0 03 00 00 7c 03 00 00 13 00 00 80 7f c0 03 c0 1f 00 07 e0 0f 00 0d
-    f0 03 00 10 f0 01 00 0e 38 01 00 3e 10 00 00 7f 50 00 00 7f 30 00 00 7f
-    40 00 00 ff 00 1e 00 fe 00 3f 00 ec 00 7f 00 c0 00 ff 00 c0 00 ff 07 c0
-    00 ff 0f c0 00 fe 07 c0 00 fe 07 c0 00 f8 03 40 00 f8 01 60 00 f8 00 20
-    00 f8 00 20 00 38 00 00 00 18 00 00 00 18 00 00 00 18 00 00 00 00 00 00
-    00 00 00 00 00 40 10 00 }
-}
-
-blt::bitmap define globe_05 { { 32 32 } {
-    00 c0 03 00 00 bc 06 00 00 cf 00 00 80 ff 01 02 c0 7f 00 06 c0 3f 00 0e
-    e0 1f 00 14 e0 0f 00 18 e0 00 00 38 60 00 00 78 40 08 00 78 c0 01 00 78
-    00 02 00 f8 00 f0 00 f0 00 f0 01 b0 00 f8 07 80 00 f8 0f 80 00 f8 3f 00
-    00 f8 7f 00 00 f0 3f 80 00 f0 3f 80 00 c0 1f 00 00 c0 0f 00 00 c0 07 40
-    00 c0 07 00 00 c0 01 00 00 e0 00 00 00 60 00 00 00 40 00 00 00 00 00 00
-    00 00 00 00 00 80 10 00 }
-}
-
-blt::bitmap define globe_06 { { 32 32 } {
-    00 80 07 00 00 7c 0d 00 00 9f 03 00 00 ff 07 02 00 ff 03 04 80 ff 00 08
-    c0 7f 00 00 80 3f 00 30 80 07 00 20 00 03 00 60 00 03 00 60 00 0e 00 60
-    00 10 00 e0 00 80 07 c0 00 80 0f c0 00 80 3f 00 00 c0 7f 00 00 c0 ff 01
-    00 c0 ff 03 00 80 ff 01 00 80 ff 01 00 00 fe 00 00 00 7e 00 00 00 3e 00
-    00 00 1f 00 00 00 0f 00 00 00 03 00 00 00 03 00 00 00 01 00 00 00 00 00
-    00 00 00 00 00 00 01 00 }
-}
-
-blt::bitmap define globe_07 { { 32 32 } {
-    00 80 07 00 00 fc 1a 00 00 7d 02 00 00 fe 1f 00 00 fe 0f 00 00 fe 07 00
-    00 ff 03 00 00 fe 01 20 00 1c 01 00 00 1c 00 40 00 18 00 40 00 70 00 00
-    00 80 00 80 00 00 39 80 00 00 7c 00 00 00 fc 01 00 00 fe 03 00 00 fe 0f
-    00 00 fc 0f 00 00 fc 0f 00 00 f8 07 00 00 f0 07 00 00 f0 03 00 00 f0 01
-    00 00 f8 00 00 00 38 00 00 00 18 00 00 00 0c 00 00 00 04 00 00 00 00 00
-    00 00 00 00 00 00 02 00 }
-}
-
-blt::bitmap define globe_08 { { 32 32 } {
-    00 00 07 00 00 fc 25 00 00 f8 19 00 00 f8 7f 00 00 f8 3f 00 00 f8 1f 00
-    00 f8 1f 00 00 f8 0f 00 00 f0 08 00 00 f0 00 00 00 c0 04 00 00 80 03 00
-    00 00 0c 00 00 00 c8 01 00 00 e0 03 00 00 e0 0f 00 00 e0 0f 00 00 f0 3f
-    00 00 e0 3f 00 00 e0 3f 00 00 c0 1f 00 00 80 1f 00 00 80 0f 00 00 c0 07
-    00 00 c0 03 00 00 c0 01 00 00 60 00 00 00 30 00 00 00 10 00 00 00 00 00
-    00 00 00 00 00 00 04 00 }
-}
-
-blt::bitmap define globe_09 { { 32 32 } {
-    00 00 03 00 00 fc 27 00 00 f0 13 00 00 e0 ff 00 00 e0 ff 01 00 e0 7f 00
-    00 e0 7f 00 00 c0 7f 00 00 80 47 00 00 80 07 00 00 00 26 00 00 00 1c 00
-    00 00 60 00 00 00 40 0e 00 00 00 1f 00 00 00 3f 00 00 00 3f 00 00 00 7f
-    00 00 00 7f 00 00 00 7f 00 00 00 7e 00 00 00 3c 00 00 00 3e 00 00 00 1e
-    00 00 00 0f 00 00 00 07 00 00 80 01 00 00 80 00 00 00 40 00 00 00 00 00
-    00 00 00 00 00 00 08 00 }
-}
-
-blt::bitmap define globe_10 { { 32 32 } {
-    00 00 06 00 00 f4 2f 00 00 c8 4f 00 00 80 ff 01 00 80 ff 01 00 80 ff 01
-    00 00 ff 01 00 00 fe 01 00 00 3c 00 00 00 3c 00 00 00 30 04 00 00 e0 00
-    00 00 00 01 00 00 00 3a 00 00 00 38 00 00 00 78 00 00 00 f8 00 00 00 fc
-    00 00 00 f8 00 00 00 f8 00 00 00 f8 00 00 00 70 00 00 00 70 00 00 00 38
-    00 00 00 18 00 00 00 0c 00 00 00 06 00 00 00 03 00 00 00 00 00 00 00 00
-    00 00 00 00 00 00 10 00 }
-}
-
-blt::bitmap define globe_11 { { 32 32 } {
-    00 00 06 00 00 ec 1f 00 00 91 9f 00 00 00 fe 03 00 00 fc 07 00 00 fc 07
-    00 00 fc 07 00 00 f0 07 00 00 f0 01 00 00 e0 00 00 00 80 05 00 00 00 07
-    00 00 00 08 00 00 00 60 00 00 00 e0 00 00 00 e0 00 00 00 e0 00 00 00 e0
-    01 00 00 e0 00 00 00 e0 00 00 00 e0 00 00 00 40 00 00 00 60 00 00 00 60
-    00 00 00 30 00 00 00 10 40 00 00 08 40 00 00 04 00 00 00 00 00 00 00 00
-    00 00 00 00 00 00 10 00 }
-}
-
-blt::bitmap define globe_12 { { 32 32 } {
-    00 00 04 00 00 dc 3f 00 00 42 7e 00 00 00 f8 03 20 00 f0 07 10 00 f0 0f
-    00 00 e0 0f 00 00 c0 0f 00 00 00 07 00 00 00 06 00 00 00 14 00 00 00 18
-    00 00 00 20 00 00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 01 00 00 80
-    00 00 00 80 00 00 00 80 02 00 00 80 02 00 00 00 04 00 00 40 04 00 00 40
-    08 00 00 20 08 00 00 00 00 00 00 10 00 00 00 08 00 00 00 00 00 00 00 00
-    00 00 00 00 00 00 00 00 }
-}
-
-blt::bitmap define globe_13 { { 32 32 } {
-    00 00 04 00 00 bc 3f 00 00 01 79 00 80 00 e0 03 60 00 c0 07 10 00 80 0f
-    00 00 80 1f 08 00 00 1e 00 00 00 1c 00 00 00 58 00 00 00 10 00 00 00 20
-    00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 06 00 00 00
-    04 00 00 00 00 00 00 00 02 00 00 00 0e 00 00 00 0c 00 00 00 1c 00 00 00
-    18 00 00 00 30 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 10 00 00 }
-}
-
-blt::bitmap define globe_14 { { 32 32 } {
-    00 00 00 00 00 fc 3f 00 00 03 e6 00 80 01 c0 03 60 00 00 07 30 00 00 0f
-    00 00 00 1e 00 00 00 38 04 00 00 30 00 00 00 30 02 00 00 00 00 00 00 40
-    00 00 00 80 00 00 00 00 02 00 00 00 01 00 00 00 01 00 00 00 18 00 00 00
-    00 00 00 00 00 00 00 00 14 00 00 00 3c 00 00 00 3c 00 00 00 7c 00 00 00
-    78 00 00 00 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 30 00 00 }
-}
-
-blt::bitmap define globe_15 { { 32 32 } {
-    00 00 00 00 00 fc 3d 00 00 27 c8 00 80 13 00 03 e0 01 00 06 70 00 00 0c
-    10 00 00 18 18 00 00 30 0c 00 00 20 0c 00 00 40 02 00 00 00 02 00 00 00
-    00 00 00 00 00 00 00 00 01 00 00 00 03 00 00 00 13 00 00 00 64 00 00 00
-    c0 00 00 00 00 00 00 00 30 00 00 00 f8 00 00 00 f8 01 00 00 f8 03 00 00
-    f0 03 00 00 80 03 00 00 00 80 00 00 00 40 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 70 00 00
-  }
-}
-
-blt::bitmap define globe_16 { { 32 32 } {
-    00 00 00 00 00 fc 3b 00 00 9f a0 00 80 4f 00 02 e0 0f 00 04 f0 01 00 08
-    70 00 00 10 38 00 00 20 3c 00 00 00 1c 00 00 00 06 00 00 00 04 00 00 00
-    04 00 00 00 00 00 00 00 20 00 00 00 0a 00 00 00 0a 00 00 00 00 03 00 00
-    28 06 00 00 00 00 00 00 c0 02 00 00 e0 07 00 00 f0 0f 00 00 e0 1f 00 00
-    e0 1f 00 00 00 0c 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 00 00 }
-}
-
-blt::bitmap define globe_17 { { 32 32 } {
-    00 00 00 00 00 fc 37 00 00 3f 42 00 80 3f 01 02 e0 1f 00 00 f0 07 00 00
-    f0 11 00 00 f8 04 00 00 fc 00 00 00 7c 00 00 00 1a 00 00 00 9a 00 00 00
-    18 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 28 00 00 00 08 18 00 00
-    00 30 00 00 00 10 00 00 00 17 00 00 00 3f 00 00 c0 7f 00 00 80 7f 00 00
-    80 7f 00 00 00 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 01 00
-  }
-}
-
-blt::bitmap define globe_18 { { 32 32 } {
-    00 00 00 00 00 fc 2f 00 00 ff 84 00 80 ff 04 00 e0 7f 00 00 f0 9f 00 00
-    f0 97 00 00 f8 27 00 00 fc 07 00 00 fc 03 00 00 6c 00 00 00 64 00 00 00
-    60 04 00 00 40 00 00 00 20 00 00 00 20 01 00 00 a0 01 00 00 00 c0 05 00
-    00 88 00 00 00 00 00 00 00 38 01 00 00 fc 01 00 00 fe 03 00 00 fe 03 00
-    00 fc 03 00 00 80 03 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 03 00
-  }
-}
-
-blt::bitmap define globe_19 { { 32 32 } {
-    00 40 00 00 00 fc 3f 00 00 ff 13 00 80 ff 13 00 e0 ff 03 00 f0 ff 00 00
-    f0 9f 00 00 f8 3f 00 00 fc 3f 00 00 f8 1f 00 00 ba 07 00 00 98 23 00 00
-    08 03 00 00 08 00 00 00 00 00 00 00 80 09 00 00 00 0d 01 00 00 21 0e 00
-    00 00 1c 00 00 00 00 00 00 c0 09 00 00 e0 0f 00 00 f0 1f 00 00 f0 1f 00
-    00 f0 1f 00 00 00 0e 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 07 00
-  }
-}
-
-blt::bitmap define globe_20 { { 32 32 } {
-    00 00 00 00 00 fc 3f 00 00 ff 07 00 80 ff 0f 00 e0 ff 0f 00 f0 ff 13 00
-    f0 ff 10 00 f8 ff 00 00 fc ff 01 00 f4 ff 00 00 e6 1e 00 00 62 1c 01 00
-    20 18 00 00 20 10 00 00 01 80 00 00 01 cc 00 00 01 68 08 00 00 00 60 00
-    00 00 c0 00 00 00 00 00 00 00 5c 00 00 00 7e 00 00 80 ff 00 00 80 ff 00
-    00 80 ff 00 00 00 70 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 0f 00
-  }
-}
-
-blt::bitmap define globe_21 { { 32 32 } {
-    00 80 00 00 00 fc 3f 00 00 ff 1f 00 80 ff bf 00 e0 ff 3f 00 f0 ff 1f 00
-    f8 ff 17 00 f8 ff 27 00 ec ff 0f 00 8c ff 07 00 9e f7 00 00 0e e3 00 00
-    06 c1 00 00 06 81 10 00 03 40 04 00 03 20 06 00 03 40 06 00 01 80 00 03
-    01 00 00 02 02 00 00 00 02 00 e0 02 02 00 f0 03 00 00 fc 03 00 00 fc 03
-    00 00 fc 03 00 00 c0 01 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_22 { { 32 32 } {
-    00 00 01 00 00 fc 3f 00 00 ff 3f 00 80 ff 7f 00 e0 ff ff 00 f0 ff 7f 00
-    f0 ff 1f 00 e0 ff 3f 00 fc ff 3f 00 34 fe 3f 00 76 bc 07 00 36 1c 07 00
-    0e 08 0e 00 1e 08 80 00 0f 00 02 00 0f 00 20 00 07 00 36 00 07 00 04 08
-    07 00 00 18 06 00 00 00 16 00 00 0b 16 00 80 0f 04 00 e0 0f 04 00 e0 0f
-    08 00 e0 0f 00 00 00 06 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_23 { { 32 32 } {
-    00 00 00 00 00 fc 3f 00 00 ff 7f 00 80 ff ff 01 e0 ff ff 01 e0 ff ff 01
-    e8 ff ff 00 c0 ff ff 00 fc fe ff 01 dc f2 ff 01 de e3 3d 00 de e1 38 02
-    7e 40 70 00 fe 40 00 04 7f 00 00 00 3e 00 30 01 3e 00 a0 01 1e 00 20 20
-    1e 00 00 20 1c 00 00 00 9c 00 00 3c 1c 00 00 3e 1c 00 00 3f 18 00 80 3f
-    10 00 00 1f 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_24 { { 32 32 } {
-    00 00 02 00 00 fc 3f 00 00 fe ff 00 80 ff ff 01 c0 ff ff 03 80 ff ff 03
-    e0 ff ff 03 18 ff ff 03 fc ff ff 07 7c 87 ff 07 fe 1f ef 01 fe 0e c6 01
-    fe 01 82 03 fe 03 02 00 ff 03 00 08 fc 01 80 09 fc 00 00 0d fc 00 00 00
-    f8 00 00 80 f8 00 00 00 f8 00 00 20 78 02 00 70 70 02 00 7c 70 00 00 3c
-    60 00 00 3c 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_25 { { 32 32 } {
-    00 00 00 00 00 f0 3f 00 00 fc ff 00 80 ff ff 03 80 ff ff 07 a0 ff ff 07
-    10 ff ff 07 30 f8 ff 0f f8 df ff 1f fc 3b fc 1f fc fb 78 07 fe 77 30 0e
-    fe 1f 30 0c fe 3f 00 48 fe 1f 00 00 f0 0f 00 24 f0 07 00 a0 f0 07 00 08
-    e0 07 00 00 e0 07 00 00 e0 27 00 c0 e0 13 00 40 c0 13 00 70 c0 03 00 70
-    80 01 00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_26 { { 32 32 } {
-    00 40 00 00 00 e0 3f 00 00 e8 ff 00 00 fc ff 03 00 ff ff 07 c0 fe ff 0f
-    40 f0 ff 1f e0 e0 ff 1f f0 ff fe 3f f8 df e1 3f f8 df c7 1b fc bf 83 19
-    fc ff 80 30 fc ff 01 20 f8 ff 00 00 c0 ff 00 00 c0 7f 00 e0 80 3f 00 20
-    80 3f 00 00 80 3f 00 00 80 3f 01 80 80 9f 00 00 00 9f 00 40 00 0f 00 60
-    00 0e 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 f0 1f 00 }
-}
-
-blt::bitmap define globe_27 { { 32 32 } {
-    00 80 00 00 00 c4 3f 00 00 f0 ff 00 00 fe ff 03 00 fe ff 07 00 eb ff 0f
-    80 c9 ff 1f 80 07 ff 3f c0 ff f7 3f e0 ff 0e 7f f0 ff 3e 6e f0 ff 1d 64
-    f0 ff 07 44 f0 ff 0f 00 60 ff 0f 00 00 fe 07 40 00 fe 03 00 01 fc 01 00
-    01 fc 01 00 00 fc 01 00 00 fc 09 00 02 fc 08 00 00 f8 04 00 00 78 00 40
-    00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 e0 1f 00 }
-}
-
-blt::bitmap define globe_28 { { 32 32 } {
-    00 00 00 00 00 88 3f 00 00 40 ff 00 00 e8 ff 03 00 f8 ff 07 00 8c ff 0f
-    00 06 fe 1f 00 1e f8 3f 00 ff bf 3f 80 ff 77 7c 80 ff ff 79 c0 ff ef 10
-    c0 ff 3f 90 c0 ff 7f 00 81 fb 7f 00 01 f0 3f 00 01 f0 1f 00 03 e0 1f 00
-    07 e0 0f 00 02 c0 1f 00 02 e0 5f 00 06 e0 47 00 04 c0 27 00 04 c0 03 00
-    00 80 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 c0 1f 00 }
-}
-
-blt::bitmap define globe_29 { { 32 32 } {
-    00 40 01 00 00 0c 3f 00 00 80 fd 00 00 a0 ff 03 20 e0 ff 07 00 30 fd 0f
-    00 10 f4 1f 00 f8 c0 3f 00 f8 ff 3f 00 fc bf 73 00 fe ff 67 00 fe 7f 47
-    00 fe ff 41 00 fe ff 03 01 dc ff 03 03 00 ff 01 07 80 ff 00 0f 00 ff 00
-    1f 00 7e 00 0e 00 fe 00 0e 00 ff 02 0e 00 3f 01 0c 00 3e 01 0c 00 1e 00
-    08 00 1c 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-    00 00 00 00 00 80 1f 00 }
-}
-
-# ----------------------------------------------------------------
-#
-# SetOption --  
-#	
-#	Sets the option array associated with the resource. It
-# 	first check to see if the resource exists in the option
-#	data base, otherwise it uses the default value given.
-#	
-#
-# Arguments
-#	name		-- Name of the resource. Used as index into
-#			   the option array.
-#	value		-- default value given.
-# Globals
-#	pq_dict  	-- Associative array where the option resources
-#			   are stored.
-#
-# ----------------------------------------------------------------
-
-proc SetOption { name value } {
-    global pq_dict
-    set widgetOption [option get . $name Tk]
-    if { $widgetOption != "" } {
-	set value $widgetOption
-    }
-    set pq_dict($name) $value
-}
-
-set pq_dict(textIndex) {}
-
-set pq_dict(entryNames) {
-    last first middle 
-    area exch ext 
-    com org tl
-    room oldloc loc 
-    street 
-    city state zip 
-    ema
-}
-
-set pq_dict(numEntries) [llength $pq_dict(entryNames)]
-set pq_dict(index) 0
-set pq_dict(defaults) {}
-
-set cnt 0
-foreach name $pq_dict(entryNames) {
-    if { $cnt > 0 } {
-	set pq_dict(format) $pq_dict(format):%$name
-    } else {
-	set pq_dict(format) %$name
-    }
-    incr cnt
-}
-
-set visual [winfo screenvisual .]
-if { ($visual == "staticgray") || ($visual == "grayscale") } {
-    option add *Entry.background white
-    option add *Text.background white
-    set pq_dict(visual) mono
-} else {
-    set depth [winfo screendepth .]
-    if { $depth < 8 } {
-	SetOption normalBgColor grey
-	SetOption normalFgColor black
-	SetOption focusHighlightColor white
-    } else {
-#fff4de
-	SetOption normalBgColor grey90
-	SetOption normalFgColor #da5f5f
-	SetOption normalFgColor black
-#navyblue
-	SetOption focusHighlightColor #fffdf8 
-    }
-    option add *Entry.background $pq_dict(normalBgColor) widgetDefault
-    option add *Text.background $pq_dict(normalBgColor) widgetDefault
-    option add *Label.foreground $pq_dict(normalFgColor) widgetDefault
-    option add *Button.foreground $pq_dict(normalFgColor) widgetDefault
-    option add *Scrollbar.background $pq_dict(normalBgColor) 
-    set pq_dict(visual) color
-}    
-
-SetOption statusFont 	 -*-Helvetica-Medium-R-*-*-14-*-*-*-*-*-*-*
-SetOption titleFont	 -*-Helvetica-Bold-R-*-*-14-*-*-*-*-*-*-*
-SetOption headingFont 	 -*-Helvetica-Medium-R-*-*-14-*-*-*-*-*-*-*
-SetOption subheadingFont -*-Helvetica-Medium-R-*-*-12-*-*-*-*-*-*-* 
-SetOption entryFont 	 -*-Courier-Medium-R-*-*-18-*-*-*-*-*-*-*
-SetOption textFont 	 -*-Courier-Bold-R-*-*-18-*-*-*-*-*-*-*
-#SetOption entryFont 	 fixed
-#SetOption textFont 	 fixed
-
-option add *Label.borderWidth 	0		    widgetDefault
-option add *Entry.relief 	sunken              widgetDefault
-option add *Entry.width 	11		    widgetDefault
-option add *Entry.borderWidth 	2		    widgetDefault
-option add *Entry.font 		$pq_dict(entryFont) widgetDefault
-option add *Text.font		$pq_dict(textFont)  widgetDefault
-option add *Text.width 		35		    widgetDefault
-option add *Text.height 	10 		    widgetDefault
-option add *Scrollbar.relief 	flat		    widgetDefault
-option add *Scrollbar.minSlider	10		    widgetDefault
-option add *Button.padY 4
-option add *Text.relief 	sunken		    widgetDefault
-option add *Text.borderWidth 	2 		    widgetDefault
-
-foreach name $pq_dict(entryNames) {
-    option add *${name}_label.font $pq_dict(subheadingFont) widgetDefault
-}
-
-option add *Label.Font          $pq_dict(subheadingFont)
-option add *status_label.font   $pq_dict(statusFont)  widgetDefault
-option add *name_label.font   	$pq_dict(headingFont) widgetDefault
-option add *tel_label.font 	$pq_dict(headingFont) widgetDefault
-option add *office_label.font 	$pq_dict(headingFont) widgetDefault
-option add *addr_label.font 	$pq_dict(headingFont) widgetDefault
-option add *loc_title.font 	$pq_dict(headingFont) widgetDefault
-option add *org_title.font 	$pq_dict(headingFont) widgetDefault
-
-option add *overall_label.text	"Customer Database"
-option add *name_label.text	"Name"
-option add *tel_label.text 	"Telephone"
-option add *addr_label.text	"Address"
-option add *last_label.text	"last"
-option add *first_label.text	"first"
-option add *middle_label.text	"middle"
-option add *com_label.text	"company"
-option add *org_label.text      "organization"
-option add *tl_label.text	"title"
-option add *ext_label.text	"extension"
-option add *exch_label.text	"exchange"
-option add *area_label.text	"area code"
-option add *loc_label.text	"extension"
-option add *oldloc_label.text	"exchange"
-option add *room_label.text	"area code"
-option add *street_label.text	"street address"
-option add *ema_label.text	"e-mail"
-option add *city_label.text	"city"
-option add *state_label.text	"state"
-option add *zip_label.text	"zip code"
-option add *org_title.text	"Organization"
-option add *loc_title.text	"Fax"
-
-option add *clear_button.text	"Clear"
-option add *quit_button.text	"Quit"
-option add *cancel_button.text	"Cancel"
-
-# --------------------------------------------------------------------------
-#
-# Procedures to perform post queries
-#
-
-# ----------------------------------------------------------------
-#
-# StopQuery --  
-#	
-#	Stops any current "pq" request by setting the variable
-#	associated with the background subprocesses. 
-#
-# Arguments
-#	None.
-#
-# Globals
-#	postOutput 	-- variable where collected output from 
-#			   pq command will be stored
-#
-# ----------------------------------------------------------------
-
-proc StopQuery {} {
-    global postOutput
-    set postOutput {}
-}
-
-
-# ----------------------------------------------------------------
-#
-# PostQuery --  
-#	
-#	Collects the data from the entry widget fields and 
-#	executes a "pq" request.  The "pq" command is executed 
-#	in the background and a "wait" is setup to wait for the 
-#	command to finish.  This allows the animation routine
-#	to operate and exposure events to be handled properly.
-#
-# Arguments
-#	None.
-#
-# Globals
-#	postOutput 	    -- variable where collected output from 
-#			       pq command will be stored
-#	pq_dict(entryNames) -- list of entry widget names
-#	pq_dict(textIndex)  -- starting index of highlighted information
-#			       (a line in the text widget)
-#
-# ----------------------------------------------------------------
-
-proc PostQuery {} {
-    global pq_dict 
-
-    .status_label configure -text {}
-    set cnt 0
-    foreach name $pq_dict(entryNames) {
-	set value [.${name}_entry get]
-	if { $value != "" } {
-	    set value [split $value "|"]
-    	    foreach i $value {
-	        if { $cnt > 0 } {
-		    set query $query/$name=[list $i]
-	        } else {
-		    set query $name=[list $i]
-	        }
-	        incr cnt
- 	    }
-	}
-    }
-    if { $cnt == 0 } {
-	return
-    }
-    set fmt {%^24pn\t%10org\t%6loc\t%area-%exch-%ext\t%ema}
-    global postOutput postError
-    set postOutput {}
-    set postError {}
-    bgexec postStatus -error postError -output postOutput \
-	pq -o $fmt $query &
-    Animate on
-    tkwait variable postStatus
-    if { $postOutput != "" } {
-	.text configure -state normal
-	.text delete 0.0 end
-	.text insert 0.0 $postOutput
-	.text configure -state disabled
-	.status_label configure -text "Post query successful"
-    } else {
-	.status_label configure -text "Post query failed"
-    }
-    set pq_dict(textIndex) {}
-    Animate off
-    if { $postError != "" }  {
-        tkerror $postError
-    }
-}
-
-
-# ----------------------------------------------------------------
-#
-# ClearFields --  
-#	
-#	Clears the all the entry fields.
-#
-# Arguments
-#	None.
-#
-# Globals
-#	pq_dict(entryNames) -- list of entry widget names
-#	pq_dict(textIndex)  -- starting index of highlighted information
-#			       (a line in the text widget)
-#
-# ----------------------------------------------------------------
-
-proc ClearFields {} {
-    global pq_dict 
-
-    blt::busy hold . ; update
-    foreach name $pq_dict(entryNames) {
-	.${name}_entry delete 0 end
-    }
-    set pq_dict(textIndex) {}
-    .status_label configure -text "Cleared query fields"
-    blt::busy release .
-}
-
-
-# ----------------------------------------------------------------
-#
-# FillFields --  
-#	
-#	Makes a post query based upon the highlighted line in
-#	the text widget to fill in all post entry fields.
-#
-# Arguments
-#	x		    x screen coordinate
-#	y 		    y screen coordinate
-#
-# Globals
-#	postOutput 	    variable where collected output from pq 
-#			    command will be stored
-#	pq_dict(format)     standard query format to collect data for 
-#			    all entry fields
-#	pq_dict(entryNames) list of entry widget names
-#
-# ----------------------------------------------------------------
-
-proc FillFields { x y } {
-    global pq_dict 
-
-    set info [.text get [list @$x,$y linestart] [list @$x,$y lineend]]
-    set info [split $info \t]
-    if { [llength $info] == 0 } {
-	return
-    }
-    set name [string trim [lindex $info 0]]
-    set name [split $name ,]
-    set last [lindex $name 0]
-    set name [split [lindex $name 1]]
-    set first [lindex $name 0]
-    set middle [lindex $name 1]
-    set org [string trim [lindex $info 1]]
-    set loc [string trim [lindex $info 2]]
-    set tel [string trim [lindex $info 3]]
-    set query last=$last/first=$first/middle=$middle/org=$org/loc=$loc/tel=[list $tel]
-    global postOutput
-    set postOutput {}
-    bgexec postStatus -output postOutput \
-	pq -o $pq_dict(format) $query &
-    Animate on
-    tkwait variable postStatus
-
-    if { $postOutput == "" } {
-	# Try again with out the telephone number
-	set query last=$last/first=$first/middle=$middle/org=$org/loc=$loc
-	set postStatus {}
-	bgexec postStatus -output postOutput \
-		pq -o $pq_dict(format) $query &
-	tkwait variable postStatus
-    }	
-    Animate off
-    if { $postOutput == "" } {
-	.status_label configure -text "Post query failed"
-    } else {
-        .status_label configure -text "Post database fields found"
-        set postOutput [split $postOutput : ]
-	set cnt 0
-	foreach name $pq_dict(entryNames) {
-	    .${name}_entry delete 0 end
-	    .${name}_entry insert 0 [lindex $postOutput $cnt]
-	    incr cnt
-	}
-    }
-}
-
-
-# ----------------------------------------------------------------
-#
-# HighlightText --  
-#	
-#	Highlight the text under the current line (as based upon
-#	the given screen coordinates.  Only highlight the line if
-#	pointer has been moved to the another line.
-#
-# Arguments
-#	x		    x screen coordinate
-#	y 		    y screen coordinate
-#
-# Globals
-#	pq_dict(visual)     either "mono" or "color"; indicates if
-#			    color screen features can be used
-#	pq_dict(textIndex)  starting index of highlighted information
-#	pq_dict(normalFgColor)    color to use for highlighted region
-#
-# ----------------------------------------------------------------
-
-proc HighlightText { x y } {
-    global pq_dict
-
-    set newIndex [.text index [list @$x,$y linestart]]
-    if { $newIndex != $pq_dict(textIndex) } {
-	catch { .text tag delete highlight }
-	.text tag add highlight $newIndex [list $newIndex lineend]
-	if { $pq_dict(visual) == "color" } {
-	    .text tag configure highlight \
-		-foreground $pq_dict(normalFgColor) -underline on
-	} else {
-	    .text tag configure highlight -underline on 
-	}
-	set pq_dict(textIndex) $newIndex
-    }
-}
-
-
-# ----------------------------------------------------------------
-#
-# ChangeFocus --  
-#	
-#	Change the keyboard focus to the next/last entry widget.
-#
-# Arguments
-#	direction	    either "next" or "last"; indicates in 
-#			    which direction to change focus
-#
-# Globals
-#	pq_dict(entryNames) list of entry widget names
-#	pq_dict(index)      current index in list of entry widget 
-#			    names of the keyboard focus. An index
-#			    of -1 indicates there is no focus.
-#	pq_dict(numEntries) number of names in entry widget list
-#
-# ----------------------------------------------------------------
-
-proc ChangeFocus direction {
-    global pq_dict 
-
-    case $direction {
-	next {
-	    incr pq_dict(index)
-	    if { $pq_dict(index) == $pq_dict(numEntries) } {
-		set pq_dict(index) 0
-	    }
-	}
-	last {
-	    set pq_dict(index) [expr $pq_dict(index)-1]
-	    if { $pq_dict(index) < 0 } {
-		set pq_dict(index) [expr $pq_dict(numEntries)-1]
-	    }
-	}
-    }
-    focus .[lindex $pq_dict(entryNames) $pq_dict(index)]_entry 
-    update idletasks
-    update
-}
-
-
-# ----------------------------------------------------------------
-#
-# ColorFocus --  
-#	
-#	Change background color of entry widget with active 
-#	keyboard focus
-#
-# Arguments
-#	w		    name of entry widget to change
-#	bool		    either "on" or "off"; indicates if
-#			    the focus highlight should turned on
-#			    or off.
-#
-# Globals
-#	pq_dict(entryNames) list of entry widget names
-#	pq_dict(index)      current index in list of entry widget 
-#			    names of the keyboard focus. An index
-#			    of -1 indicates there is no focus.
-#	pq_dict(visual)     either "mono" or "color"; indicates if
-#			    color screen features can be used
-#
-# ----------------------------------------------------------------
-
-proc ColorFocus { w bool } {
-    global pq_dict 
-
-    regexp {\.([a-z]+)_entry} $w dummy name
-    if { $pq_dict(visual) == "color" && [info commands $w] == $w } {
-	if { $bool == "on" } {
-	    set pq_dict(index) [lsearch $pq_dict(entryNames) $name]
-	    $w configure -background $pq_dict(focusHighlightColor) 
-        } else {	
-	    $w configure -background $pq_dict(normalBgColor) 
-        }
-    }
-}
-
-# ----------------------------------------------------------------
-#
-# Animate --  
-#	
-#	Activates/deactivates an animated bitmap and busy window.
-#	A cancel button is mapped and raised so that it is unaffected
-#	by the busy window.
-#
-# Arguments
-#	option		    either "on", "off", or "continue"; 
-#			    indicates whether animation should
-#			    be started, stoped or continued.
-#
-# Globals
-#	pq_dict(entryNames) list of entry widget names
-#	pq_dict(index)      current index in list of entry widget 
-#			    names of the keyboard focus. An index
-#			    of -1 indicates there is no focus.
-#	pq_dict(visual)     either "mono" or "color"; indicates if
-#			    color screen features can be used
-#
-# ----------------------------------------------------------------
-
-set pq_dict(curBitmap) 0
-set pq_dict(lastBitmap) 0
-
-proc Animate option {
-    global pq_dict
-
-    case $option {
-	on {
-	    blt::busy hold . 
-	    .status_label configure -text "Searching..."
-	    global topLevel
-	    blt::table $topLevel .cancel_button 18,8 -anchor e -reqwidth .70i
-	    winop raise .cancel_button
-	    .quit_button configure -state disabled
-	    .clear_button configure -state disabled
-	    winop raise .cancel_button
-	    set pq_dict(lastFocus) [focus]
-            focus -force .
-	    set pq_dict(curBitmap) $pq_dict(lastBitmap) 
-	    update
-	} 
-	off {
-	    blt::table forget .cancel_button
-	    .quit_button configure -state normal
-	    .clear_button configure -state normal
-	    .trademark configure -bitmap attlogo
-	    set pq_dict(lastBitmap) $pq_dict(curBitmap)
-	    set pq_dict(curBitmap) -1 
-	    focus $pq_dict(lastFocus)
-	    blt::busy release .
-	}
-    }
-    #
-    # Continue with next bitmap
-    #
-    if { $pq_dict(curBitmap) >= 0 } {
-	set bmap [format globe_%0.2d $pq_dict(curBitmap)] 
-	.trademark configure -bitmap $bmap
-	incr pq_dict(curBitmap)
-	if { $pq_dict(curBitmap) >= 29 } {
-	    set pq_dict(curBitmap) 0
-	}
-	after 100 Animate continue
-    }
-}
-
-	
-# --------------------------------------------------------------------------
-#
-# main body of program
-#
-
-blt::tile::frame .frame 
-set topLevel .frame
-
-blt::tile::label .overall_label -font  -*-Helvetica-Bold-R-*-*-18-*-*-*-*-*-*-*
-blt::tile::label .name_label -font $pq_dict(titleFont)
-blt::tile::label .tel_label  -font $pq_dict(titleFont)
-blt::tile::label .addr_label -font $pq_dict(titleFont)
-blt::tile::label .org_title -font $pq_dict(titleFont)
-blt::tile::label .loc_title -font $pq_dict(titleFont)
-
-foreach name $pq_dict(entryNames) {
-    blt::tile::label .${name}_label 
-    entry .${name}_entry
-}
-if [info exists env(POST_DEFAULTS)] {
-    set pq_dict(defaults) [split $env(POST_DEFAULTS) ":"]
-}
-foreach i $pq_dict(defaults) {
-    set i [split $i "="]
-    if { [llength $i] == 2 } {
-	set name [lindex $i 0]
-	if { [lsearch $pq_dict(entryNames) $name] >= 0 } {
-	    .${name}_entry insert 0 [lindex $i 1]
-	}
-    }
-}
-blt::tile::label .orders_title -text "Current Orders" \
-	-font  -*-Helvetica-Bold-R-*-*-16-*-*-*-*-*-*-*
-
-set font -*-Helvetica-Bold-R-*-*-12-*-*-*-*-*-*-*
-button .clear_button -command ClearFields -font $font
-button .quit_button -command { exit }  -font $font
-button .search_button -text "Search" -font $font 
-
-blt::tile::label .status_label
-button .cancel_button -command StopQuery 
-#-relief raised
-blt::tile::label .trademark -bitmap attlogo 
-text .text -yscrollcommand { .vscroll set } -state disabled 
-scrollbar .vscroll -command { .text yview } 
-
-blt::table $topLevel \
-    .overall_label	0,1 -cspan 10 -pady 5 \
-    .name_label  	1,2 \
-    .last_entry  	2,2 -cspan 2 \
-    .first_entry 	2,4 \
-    .middle_entry 	2,5 \
-    .last_label 	3,2 \
-    .first_label 	3,4 \
-    .middle_label 	3,5 \
-    .tel_label 		1,7 \
-    .area_entry 	2,7 \
-    .exch_entry 	2,8 \
-    .ext_entry 		2,9 \
-    .area_label 	3,7 \
-    .exch_label  	3,8 \
-    .ext_label 		3,9 \
-    .org_title		4,2 \
-    .com_entry  	5,2 \
-    .org_entry 		5,3 \
-    .tl_entry 		5,4 \
-    .com_label 		6,2 \
-    .org_label 		6,3 \
-    .tl_label 		6,4 \
-    .loc_title		4,7 \
-    .room_entry 	5,7 \
-    .oldloc_entry 	5,8 \
-    .loc_entry 		5,9 \
-    .room_label 	6,7 \
-    .oldloc_label 	6,8 \
-    .loc_label 		6,9 \
-    .addr_label 	8,2 \
-    .street_entry       9,2 \
-    .ema_entry		9,7 -cspan 2  \
-    .street_label       10,2 \
-    .city_entry 	11,2 -cspan 2 \
-    .state_entry 	11,4 \
-    .zip_entry 		11,5 \
-    .ema_label       	10,7 -cspan 2 \
-    .city_label 	12,2 -cspan 2 \
-    .state_label 	12,4 \
-    .zip_label 		12,5 \
-    .orders_title       16,2  -pady { 4 0 } \
-    .text 		17,2 -cspan 8 -fill both -padx 2 \
-    .vscroll 		17,10 -anchor center -fill both \
-    .status_label	18,4 -cspan 6 -reqwidth {0 4i} \
-    .search_button      18,3 -reqwidth .6i -anchor center -pady 8\
-    .clear_button       18,5 -reqwidth .6i -anchor center \
-    .quit_button        18,8 -reqwidth .6i -anchor center
-
-eval blt::table configure $topLevel \
-	[info command .*_label] [info commands .*_title] \
-	-anchor w -padx 2 -ipadx 2 
-eval blt::table configure $topLevel [info command .*_entry] \
-	-fill both -padx 2 
-eval blt::table configure $topLevel .name_label .tel_label .org_title \
-    .com_label .addr_label .street_entry .street_label \
-    -cspan 3  
-eval blt::table configure $topLevel .last_entry .ema_entry .city_entry \
-    .ema_label .city_label -cspan 2 
-
-blt::table configure $topLevel .overall_label -anchor center
-blt::table configure $topLevel r16 -pady { 5 5 } -resize both
-blt::table configure $topLevel c0 -width .vscroll
-blt::table configure $topLevel c0 c10 -resize none 
-blt::table configure $topLevel r3 r6 r10 r12 -resize none
-blt::table configure $topLevel r17 -height { 40 {} } 
-blt::table configure $topLevel r16 r18 -resize none
-blt::table configure $topLevel c6 -pad { 5 5 }
-
-if { $topLevel == ".frame" } {
-    blt::table . \
-	$topLevel 0,0 -fill both
-}
-
-bind .text <Button-2> {
-    FillFields %x %y
-    continue
-}
-
-bind .text <Motion> {
-    HighlightText %x %y
-    continue
-}
-
-bind .text <Enter> {
-    set pq_dict(textIndex) {}
-    HighlightText %x %y
-    set info [.text get [list 0.0 linestart] [list 0.0 lineend]]
-    if { $info != "" } {
-        .status_label configure -text "Query individual with button-2"
-    }
-    continue
-}
-
-bind .text <Leave> {
-    if { [blt::busy isbusy .] != "." } {	
-	.text tag delete highlight
-	.status_label configure -text ""
-    }
-    continue
-}
-
-
-bind EntryFocus <Tab> {
-    ChangeFocus next
-    break
-}
-
-bind EntryFocus <Shift-Tab> {
-    ChangeFocus last
-    break
-}
-
-if { $pq_dict(visual) == "color" } {
-    bind EntryFocus <FocusIn> { 
-	ColorFocus %W on 
-    }
-    bind EntryFocus <FocusOut> { 
-	ColorFocus %W off 
-    }
-}
-
-bind Entry <Return> PostQuery
-
-foreach name $pq_dict(entryNames) {
-    set w .${name}_entry
-    bindtags $w [list EntryFocus $w Entry all]
-}
-
-focus .last_entry
-
diff --git a/blt3.0/examples/pareto.tcl b/blt3.0/examples/pareto.tcl
deleted file mode 100755
index 4868785..0000000
--- a/blt3.0/examples/pareto.tcl
+++ /dev/null
@@ -1,144 +0,0 @@
-#!../src/bltwish
-
-package require BLT
-
-# --------------------------------------------------------------------------
-# Starting with Tcl 8.x, the BLT commands are stored in their own 
-# namespace called "blt".  The idea is to prevent name clashes with
-# Tcl commands and variables from other packages, such as a "table"
-# command in two different packages.  
-#
-# You can access the BLT commands in a couple of ways.  You can prefix
-# all the BLT commands with the namespace qualifier "blt::"
-#  
-#    blt::graph .g
-#    blt::table . .g -resize both
-# 
-# or you can import all the command into the global namespace.
-#
-#    namespace import blt::*
-#    graph .g
-#    table . .g -resize both
-#
-# --------------------------------------------------------------------------
-
-# Example of a pareto chart.
-#
-# The pareto chart mixes line and bar elements in the same graph.
-# Each processing operating is represented by a bar element.  The
-# total accumulated defects is displayed with a single line element.
-
-blt::barchart .b \
-    -title "Defects Found During Inspection" \
-    -font {{Sans Serif} 12 Bold} \
-    -width 6i \
-    -height 5i \
-    -bg white \
-    -plotborderwidth 1 \
-    -plotrelief solid
-
-blt::table . .b -fill both
-
-set data {
-    "Spot Weld"		82	yellow
-    "Lathe"		49	orange
-    "Gear Cut"		38	green
-    "Drill"		24	blue
-    "Grind"		17	red
-    "Lapping"		12	brown
-    "Press"		8	purple
-    "De-burr"		4	pink
-    "Packaging"		3	cyan
-    "Other"		12	magenta
-}
-
-# Create an X-Y graph line element to trace the accumulated defects.
-.b line create accum -label "" -symbol none -color red
-
-# Define a bitmap to be used to stipple the background of each bar.
-blt::bitmap define pattern1 { {4 4} {01 02 04 08} }
-
-# For each process, create a bar element to display the magnitude.
-set count 0
-set sum 0
-set ydata 0
-set xdata 0
-set bg [blt::bgpattern create solid -color orange -opacity 70]
-set areabg [blt::bgpattern create solid -color blue -opacity 20]
-foreach { label value color } $data {
-    incr count
-    .b element create $label \
-	-xdata $count \
-	-ydata $value \
-	-fg $color \
-	-relief raised \
-	-borderwidth 1 \
-	-bg $bg 
-
-    set labels($count) $label
-    # Get the total number of defects.
-    set sum [expr $value + $sum]
-    lappend ydata $sum
-    lappend xdata $count
-}
-
-# Configure the coordinates of the accumulated defects, 
-# now that we know what they are.
-.b line configure accum -xdata $xdata -ydata $ydata \
-	-areabackground $areabg 
-.b element lower accum
-# Add text markers to label the percentage of total at each point.
-foreach x $xdata y $ydata {
-    set percent [expr ($y * 100.0) / $sum]
-    if { $x == 0 } {
-	set text " 0%"
-    } else {
-	set text [format %.1f $percent] 
-    }
-    .b marker create text \
-	-coords "$x $y" \
-	-text $text \
-	-font {Math 9} \
-	-fg red4 \
-	-anchor c \
-	-yoffset -5
-}
-
-# Display an auxillary y-axis for percentages.
-.b axis configure y2 \
-    -hide no \
-    -min 0.0 \
-    -max 100.0 \
-    -tickinterior yes \
-    -title "Percentage" -grid no
-
-# Title the y-axis
-.b axis configure y -title "Defects" -grid no \
-    -tickinterior yes \
-
-# Configure the x-axis to display the process names, instead of numbers.
-.b axis configure x \
-    -title "Process" \
-    -command FormatLabels \
-    -rotate 290 \
-    -tickanchor nw \
-    -tickfont {{Sans Serif} 9} \
-    -tickinterior yes \
-    -ticklength 5 \
-    -subdivisions 0
-
-proc FormatLabels { widget value } {
-    global labels
-    set value [expr round($value)]
-    if {[info exists labels($value)] } {
-	return $labels($value)
-    }
-    return ""
-}
-
-# No legend needed.
-.b legend configure -hide yes
-
-# Configure the grid lines.
-.b axis configure x -gridcolor lightblue -grid yes
-
diff --git a/blt3.0/html/BLT.html b/blt3.0/html/BLT.html
deleted file mode 100644
index 03317c2..0000000
--- a/blt3.0/html/BLT.html
+++ /dev/null
@@ -1,161 +0,0 @@
-                   <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>graph(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-BLT - Introduction to the BLT library 
-<H2><A NAME="sect1" HREF="#toc1">Description</A></H2>
-BLT
-is a library of extensions to the Tk library.  It adds new commands and
-variables to the application's interpreter. <P>
-
-<H2><A NAME="sect2" HREF="#toc2">Commands</A></H2>
-The following commands
-are added to the interpreter from the BLT library: 
-<DL>
-
-<DT><B>table</B>  </DT>
-<DD>A table geometry
-manager for Tk.  You specify window placements as table  row,column positions
-and windows can also span multiple rows or columns.  It also has many options
-for setting and/or bounding window sizes. </DD>
-
-<DT><B>graph</B>  </DT>
-<DD>A 2D plotting widget.  Plots
-two variable data in a window with an optional  legend and annotations.
-  It has of several components; coordinate axes,  crosshairs, a legend,
-and a collection of elements and tags. </DD>
-
-<DT><B>barchart</B>  </DT>
-<DD>A barchart widget.  Plots
-two-variable data as rectangular bars in a  window.  The x-coordinate values
-designate the position of the bar along  the x-axis, while the y-coordinate
-values designate the magnitude. The <B>barchart</B> widget has of several components;
-coordinate axes,  crosshairs, a legend, and a collection of elements and
-tags. </DD>
-
-<DT><B>vector</B>  </DT>
-<DD>Creates a vector of floating point values.  The vector's components
-can be manipulated in three ways: through a Tcl array variable, a Tcl command,
-or the C API. </DD>
-
-<DT><B>spline</B> </DT>
-<DD>Computes a spline fitting a set of data points (x and
-y vectors) and produces a vector of the interpolated images (y-coordinates)
-at a given set of x-coordinates. </DD>
-
-<DT><B>bgexec</B>  </DT>
-<DD>Like Tcl's <B>exec</B> command, <B>bgexec</B> runs
-a pipeline of Unix  commands in the background.  Unlike <B>exec</B>, the output
-of the last process is collected and a global Tcl variable is set upon
-its completion. <B>bgexec</B> can be used with <B>tkwait</B> to wait for Unix commands
-to finish while still handling expose events.  Intermediate output is also
-available while the pipeline is active. </DD>
-
-<DT><B>busy</B>  </DT>
-<DD>Creates a "busy window" which
-prevents user-interaction when an application is busy.  The busy window also
-provides an easy way  to have temporary busy cursors (such as a watch or
-hourglass). </DD>
-
-<DT><B>bitmap</B>  </DT>
-<DD>Reads and writes bitmaps from Tcl.  New X bitmaps can
-be defined on-the-fly from Tcl, obviating the need to copy around bitmap
-files.   Other options query loaded X bitmap's dimensions and data. </DD>
-
-<DT><B>drag&drop</B>
- </DT>
-<DD>Provides a drag-and-drop facility for Tk.  Information (represented by a
-token window) can be dragged to and from any Tk window, including those
-of another Tk application.  <B>drag&drop</B> acts as a  coordinator, directing Tk
-<B>send</B> commands between (or within) TCL/Tk  applications.  </DD>
-
-<DT><B>htext</B>  </DT>
-<DD>A simple
-hypertext widget.  Combines text and Tk widgets into a single scroll-able
-window.  Tcl commands can be embedded into text, which are invoked as the
-text is parsed.  In addition, Tk widgets can be appended to the window at
-the current point in the text.  <B>Htext</B> can be also used to create scrolled
-windows of Tk widgets. </DD>
-
-<DT><B>winop</B>  </DT>
-<DD>Raise, lower, map, or, unmap any window.  The
-raise and lower functions are useful for stacking windows above or below
-"busy windows". </DD>
-
-<DT><B>watch</B>  </DT>
-<DD>Arranges for Tcl procedures to be called before and/or
-after the execution of every Tcl command. This command may be used in the
-logging, profiling, or tracing of Tcl code. </DD>
-
-<DT><B>bltdebug</B>  </DT>
-<DD>A simple Tcl command
-tracing facility useful for debugging Tcl code.   Displays each Tcl command
-before and after substitution along its level  in the interpreter on standard
-error. </DD>
-</DL>
-
-<H2><A NAME="sect3" HREF="#toc3">Variables</A></H2>
-<P>
-The following Tcl variables are either set or used by BLT
-at various times in its execution: 
-<DL>
-
-<DT><B>blt_library</B> </DT>
-<DD>This variable contains the
-name of a directory containing a library of Tcl scripts and other files
-related to BLT.  Currently, this  directory contains the <B>drag&drop</B> protocol
-scripts and the  PostScript prolog used by <B>graph</B> and <B>barchart</B>. The value
-of this variable is taken from the BLT_LIBRARY environment variable, if
-one exists, or else from a default value compiled into the <B>BLT</B> library.
-</DD>
-
-<DT><B>blt_versions</B>  </DT>
-<DD>This variable is set in the interpreter for each application.
-It is an  array of the current version numbers for each  of the BLT commands
-in the form <I>major</I>.<I>minor</I>.  <I>Major</I> and <I>minor</I> are integers.  The major version
-number increases in any command that includes changes that are not backward
-compatible (i.e. whenever existing applications and scripts may have to change
-to work with the new release).  The minor version number increases with
-each new release of a command, except that it resets to zero whenever the
-major version number changes.  The array is indexed by the individual  command
-name. </DD>
-</DL>
-
-<H2><A NAME="sect4" HREF="#toc4">Adding Blt to Your Applications</A></H2>
-It's easy to add BLT to an existing
-Tk application.  BLT requires no  patches or edits to the Tcl or Tk libraries.
- To add BLT, simply add the  following code snippet to your application's
-tkAppInit.c file.   <BR>
-<CODE>if (Blt_Init(interp) != TCL_OK) {<BR>
-    return TCL_ERROR;<BR>
-}<BR>
-</CODE><P>Recompile and link with the BLT library (libBLT.a) and that's it. <P>
-Alternately,
-you can dynamically load BLT, simply by invoking the command <BR>
-<CODE>package require BLT<BR>
-</CODE><P>from your Tcl script. 
-<H2><A NAME="sect5" HREF="#toc5">Bugs</A></H2>
-Send bug reports, requests, suggestions, etc. to
- gah at siliconmetrics.com or gah at myfirstlink.net 
-<H2><A NAME="sect6" HREF="#toc6">Keywords</A></H2>
-BLT <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Description</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Commands</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Variables</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Adding Blt to Your Applications</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Bugs</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/Makefile.vc b/blt3.0/html/Makefile.vc
deleted file mode 100644
index 8244f42..0000000
--- a/blt3.0/html/Makefile.vc
+++ /dev/null
@@ -1,32 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for HTML files
-# ------------------------------------------------------------------------
-
-include ../vc.config
-srcdir =      ../$(TOP)/html
-
-instdirs =	$(prefix) $(libdir) $(scriptdir) $(scriptdir)/html 
-
-all: 
-
-install: install-dirs install-html
-
-install-dirs:
-	@for i in $(instdirs) ; do \
-	    if test -d "$$i" ; then : ; else \
-		echo "mkdir $$i" ; \
-		mkdir "$$i" ; \
-	    fi ; \
-        done
-
-install-html: install-dirs
-	for i in $(srcdir)/*.html ; do \
-	    $(INSTALL_DATA) $$i $(scriptdir)/html ; \
-	done 
-
-clean:
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* 
-
-distclean: clean
-	$(RM) Makefile
diff --git a/blt3.0/html/barchart.html b/blt3.0/html/barchart.html
deleted file mode 100644
index fd58741..0000000
--- a/blt3.0/html/barchart.html
+++ /dev/null
@@ -1,2240 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>barchat(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-barchart -  Bar chart for plotting X-Y coordinate
-data. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>barchart<I> <I>pathName </I></I></B>?<I>option value</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>barchart</B> command
-creates a bar chart for plotting two-dimensional data (X-Y coordinates). A
-bar chart is a graphic means of comparing numbers by displaying bars of
-lengths proportional to the y-coordinates of the points they represented.
- The bar chart has many configurable components: coordinate axes, elements,
-legend, grid lines, cross hairs, etc.  They allow you to customize the look
-and feel of the graph. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The <B>barchart</B> command creates a new window
-for plotting two-dimensional data (X-Y coordinates), using bars of various
-lengths to represent the data points.  The bars are drawn in a rectangular
-area displayed in the center of the new window.  This is the <I>plotting area</I>.
- The coordinate axes are drawn in the margins surrounding the plotting
-area.  By default, the legend is drawn in the right margin.  The title is
-displayed in top margin. <P>
-A <B>barchart</B> widget has several configurable components:
-coordinate axes, data elements, legend, grid, cross hairs, pens, postscript,
-and annotation markers.  Each component can be queried or modified. 
-<DL>
-
-<DT><I>axis</I>
- </DT>
-<DD><P>
- Up to four coordinate axes (two X-coordinate and two Y-coordinate axes)
-can be displayed, but you can create and use any number of axes. Axes control
-what region of data is displayed and how the data is scaled. Each axis consists
-of the axis line, title, major and minor ticks, and tick labels. Tick labels
-display the value at each major tick. </DD>
-
-<DT><I>crosshairs</I>  </DT>
-<DD>Cross hairs are used to
-position the mouse pointer relative to the X and Y coordinate axes. Two
-perpendicular lines, intersecting at the current location of the mouse,
-extend across the plotting area to the coordinate axes. </DD>
-
-<DT><I>element</I>  </DT>
-<DD>An element
-represents a set of data to be plotted.  It contains an x and y vector of
-values representing the data points.  Each data point is displayed as a
-bar where the length of the bar is proportional to the ordinate (Y-coordinate)
-of the data point. The appearance of the bar, such as its color, stipple,
-or relief is configurable. <P>
-A special case exists when two or more data points
-have the same abscissa (X-coordinate).  By default, the bars are overlayed,
-one on top of the other.  The bars are drawn in the order of the element
-display list.  But you can also configure the bars to be displayed in two
-other ways.  They may be displayed as a stack, where each bar (with the
-same abscissa) is stacked on the previous.  Or they can be drawn side-by-side
-as thin bars.  The width of each bar is a function of the number of data
-points with the same abscissa. </DD>
-
-<DT><I>grid</I> </DT>
-<DD>Extends the major and minor ticks of
-the X-axis and/or Y-axis across the  plotting area.  </DD>
-
-<DT><I>legend</I>  </DT>
-<DD>The legend displays
-the name and symbol of each data element.  The legend can be drawn in any
-margin or in the plotting area. </DD>
-
-<DT><I>marker</I> </DT>
-<DD>Markers are used annotate or highlight
-areas of the graph. For example, you could use a text marker to label a
-particular data point. Markers come in various forms: text strings, bitmaps,
-connected line segments, images, polygons, or embedded widgets. </DD>
-
-<DT><I>pen</I>  </DT>
-<DD>Pens
-define attributes for elements.  Data elements use pens to specify how they
-should be drawn.  A data element may use many pens at once.  Here the particular
-pen used for a data point is determined from each element's weight vector
-(see the element's <B>-weight</B> and <B>-style</B> options). </DD>
-
-<DT><I>postscript</I> </DT>
-<DD>The widget can generate
-encapsulated PostScript output. This component has several options to configure
-how the PostScript is generated. </DD>
-</DL>
-
-<H2><A NAME="sect4" HREF="#toc4">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>barchart <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>barchart</B> command creates a new window <I>pathName</I> and makes it into a
-<B>barchart</B> widget.  At the time this command is invoked, there must not exist
-a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options
-may be specified on the command line or in the option database to configure
-aspects of the graph such as its colors and font.  See the <B>configure</B> operation
-below for the exact details about what <I>option</I> and <I>value</I> pairs are valid.
-<P>
-If successful, <B>barchart</B> returns the path name of the widget.  It also creates
-a new Tcl command by the same name.  You can use this command to invoke
-various operations that query or modify the graph. The general form is:
-<BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for the graph are described in  the  <FONT SIZE=-1><B>BARCHART
-OPERATIONS</B></FONT>
-  section. <P>
-The command can also be used to access components of
-the graph. <BR>
-<P>
-<CODE><I>pathName component operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>The operation, now located after the name of the component, is the function
-to be performed on that component. Each component has its own set of operations
-that manipulate that component.  They will be described below in their own
-sections. 
-<H2><A NAME="sect5" HREF="#toc5">Example</A></H2>
-The <B>barchart</B> command creates a new bar chart.   <BR>
-<CODE># Create a new bar chart.  Plotting area is black.<BR>
-barchart .b -plotbackground black<BR>
-</CODE><P>A new Tcl command <I>.b</I> is created.  This command can be used to query and modify
-the bar chart.  For example, to change the title of the graph to "My Plot",
-you use the new command and the <B>configure</B> operation. <BR>
-<CODE># Change the title.<BR>
-.b configure -title "My Plot"<BR>
-</CODE><P>To add data elements, you use the command and the <B>element</B> component. <BR>
-<CODE># Create a new element named "e1"<BR>
-.b element create e1 \<BR>
-<tt> </tt> <tt> </tt> -xdata { 1 2 3 4 5 6 7 8 9 10 } \<BR>
-<tt> </tt> <tt> </tt> -ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 <BR>
-<tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> 155.85 166.60 175.38 }<BR>
-</CODE><P>The element's X-Y coordinates are specified using lists of numbers.  Alternately,
-BLT vectors could be used to hold the X-Y coordinates. <BR>
-<CODE># Create two vectors and add them to the barchart.<BR>
-vector xVector yVector<BR>
-xVector set { 1 2 3 4 5 6 7 8 9 10 }<BR>
-yVector set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 <BR>
-<tt> </tt> <tt> </tt> 166.60 175.38 }<BR>
-n.b element create e1 -xdata xVector -ydata yVector<BR>
-</CODE><P>The advantage of using vectors is that when you modify one, the graph is
-automatically redrawn to reflect the new values. <BR>
-<CODE># Change the y coordinate of the first point.<BR>
-set yVector(0) 25.18<BR>
-</CODE><P>An element named <I>e1</I> is now created in <I>.b</I>.  It  is automatically added to
-the display list of elements.  You can use this list to control in what
-order elements are displayed. To query or reset the element display list,
-you use the element's  <B>show</B> operation. <BR>
-<CODE># Get the current display list <BR>
-set elemList [.b element show]<BR>
-# Remove the first element so it won't be displayed.<BR>
-.b element show [lrange $elemList 0 end]<BR>
-</CODE><P>The element will be displayed by as many bars as there are data points
-(in this case there are ten).  The bars will be drawn centered at the x-coordinate
-of the data point.  All the bars will have the same attributes (colors,
-stipple, etc).  The width of each bar is by default one unit.  You can change
-this with using the <B>-barwidth</B> option. <BR>
-<CODE># Change the scale of the x-coordinate data <BR>
-xVector set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }<BR>
-# Make sure we change the bar width too.<BR>
-.b configure -barwidth 0.2<BR>
-</CODE><P>The height of each bar is proportional to the ordinate (Y-coordinate) of
-the data point. <P>
-If two or more data points have the same abscissa (X-coordinate
-value), the bars representing those data points may be drawn in  various
-ways. The default is to overlay the bars, one on top of the other. The ordering
-is determined from the of element display list.  If the stacked mode is
-selected (using the <B>-barmode</B> configuration option), the bars are stacked,
-each bar above the previous. <BR>
-<CODE># Display the elements as stacked.<BR>
-.b configure -barmode stacked<BR>
-</CODE><P>If the aligned mode is selected, the bars having the same x-coordinates
-are displayed side by side.  The width of each bar is a fraction of its
-normal width, based upon the number of bars with the same x-coordinate. <BR>
-<CODE># Display the elements side-by-side.<BR>
-.b configure -barmode aligned<BR>
-</CODE><P>By default, the element's label in the legend will be also <I>e1</I>.  You can change
-the label, or specify no legend entry, again using the element's <B>configure</B>
-operation. <BR>
-<CODE># Don't display "e1" in the legend.<BR>
-.b element configure e1 -label ""<BR>
-</CODE><P>You can configure more than just the element's label.  An element has many
-attributes such as stipple, foreground and background colors, relief, etc.
-<BR>
-<CODE>.b element configure e1 -fg red -bg pink \<BR>
-<tt> </tt> <tt> </tt> -stipple gray50<BR>
-</CODE><P>Four coordinate axes are automatically created: <I>x</I>, <I>x2</I>, <I>y</I>, and <I>y2</I>.  And by
-default, elements are mapped onto the axes <I>x</I> and <I>y</I>.  This can be changed
-with the <B>-mapx</B> and <B>-mapy</B> options. <BR>
-<CODE># Map "e1" on the alternate y axis "y2".<BR>
-.b element configure e1 -mapy y2<BR>
-</CODE><P>Axes can be configured in many ways too.  For example, you change the scale
-of the Y-axis from linear to log using the <B>axis</B> component. <BR>
-<CODE># Y-axis is log scale.<BR>
-.b axis configure y -logscale yes<BR>
-</CODE><P>One important way axes are used is to zoom in on a particular data region.
- Zooming is done by simply specifying new axis limits using the <B>-min</B> and
-<B>-max</B> configuration options. <BR>
-<CODE>.b axis configure x -min 1.0 -max 1.5<BR>
-.b axis configure y -min 12.0 -max 55.15<BR>
-</CODE><P>To zoom interactively, you link the<B>axis configure</B> operations with some
-user interaction (such as pressing the mouse button), using the <B>bind</B> command.
- To convert between screen and graph coordinates, use the <B>invtransform</B>
-operation. <BR>
-<CODE># Click the button to set a new minimum <BR>
-bind .b <ButtonPress-1> { <BR>
-    %W axis configure x -min [%W axis invtransform x %x]<BR>
-    %W axis configure x -min [%W axis invtransform x %y]<BR>
-}<BR>
-</CODE><P>By default, the limits of the axis are determined from data values. To reset
-back to the default limits, set the <B>-min</B> and <B>-max</B> options to the empty value.
-<BR>
-<CODE># Reset the axes to autoscale again.<BR>
-.b axis configure x -min {} -max {}<BR>
-.b axis configure y -min {} -max {}<BR>
-</CODE><P>By default, the legend is drawn in the right margin.  You can change this
-or any legend configuration options using the <B>legend</B> component. <BR>
-<CODE># Configure the legend font, color, and relief<BR>
-.b legend configure -position left -relief raised \<BR>
-<tt> </tt> <tt> </tt> -font fixed -fg blue<BR>
-</CODE><P>To prevent the legend from being displayed, turn on the <B>-hide</B> option. <BR>
-<CODE># Don't display the legend.<BR>
-.b legend configure -hide yes<BR>
-</CODE><P>The <B>barchart</B> has simple drawing procedures called markers.  They can be
-used to highlight or annotate data in the graph. The types of markers available
-are bitmaps, polygons, lines, or windows.  Markers can be used, for example,
-to mark or brush points.  For example there may be a line marker which indicates
-some low-water value.  Markers are created using the <B>marker</B> operation. <BR>
-<CODE># Create a line represent the low water mark at 10.0<BR>
-.b marker create line -name "low_water" \<BR>
-<tt> </tt> <tt> </tt> -coords { -Inf 10.0 Inf 10.0 } \<BR>
-<tt> </tt> <tt> </tt> -dashes { 2 4 2 } -fg red -bg blue <BR>
-</CODE><P>This creates a line marker named <I>low_water</I>.  It will display a horizontal
-line stretching across the plotting area at the y-coordinate 10.0.  The coordinates
-"-Inf" and "Inf" indicate the relative minimum and maximum of the axis (in
-this case the x-axis).  By default, markers are drawn last, on top of the
-bars.  You can change this with the <B>-under</B> option. <BR>
-<CODE># Draw the marker before elements are drawn.<BR>
-.b marker configure low_water -under yes<BR>
-</CODE><P>You can add cross hairs or grid lines using the <B>crosshairs</B> and <B>grid</B> components.
-<BR>
-<CODE># Display both cross hairs and grid lines.<BR>
-.b crosshairs configure -hide no -color red<BR>
-.b grid configure -hide no -dashes { 2 2 }<BR>
-</CODE><P>Finally, to get hardcopy of the graph, use the <B>postscript</B> component. <BR>
-<CODE># Print the bar chart into file "file.ps"<BR>
-.b postscript output file.ps -maxpect yes -decorations no<BR>
-</CODE><P>This generates a file <I>file.ps</I> containing the encapsulated PostScript of
-the graph.  The option <B>-maxpect</B> says to scale the plot to the size of the
-page.  Turning off the <B>-decorations</B> option denotes that no borders or color
-backgrounds should be drawn (i.e. the background of the margins, legend,
-and plotting area will be white). 
-<H2><A NAME="sect6" HREF="#toc6">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>barchart <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>barchart</B> command creates a new window <I>pathName</I> and makes it into a
-barchart widget.  At the time this command is invoked, there must not exist
-a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options
-may may be specified on the command line or in the option database to configure
-aspects of the bar chart such as its colors and font.  See the <B>configure</B>
-operation below for the exact details as to what <I>option</I> and <I>value</I> pairs
-are valid. <P>
-If successful, <B>barchart</B> returns <I>pathName</I>. It also creates a new
-Tcl command <I>pathName</I>.  This command may be used to invoke various operations
-to query or modify the bar chart.  It has the general form: <BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for the bar chart are described in the following
-section. 
-<H2><A NAME="sect7" HREF="#toc7">Barchart Operations</A></H2>
-
-<DL>
-
-<DT><I>pathName <B>bar <I>elemName </I></B></I>?<I>option value</I>?... </DT>
-<DD>Creates
-a new barchart element <I>elemName</I>.  It's an error if an element <I>elemName</I> already
-exists.   See the manual for <B>barchart</B> for details about what <I>option</I> and
-<I>value</I> pairs are valid. </DD>
-
-<DT><I>pathName <B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value of
-the configuration option given by <I>option</I>.  <I>Option</I> may be any option described
-below for the <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries
-or modifies the configuration options of the graph.  If <I>option</I> isn't specified,
-a list describing the current options for <I>pathName</I> is returned.  If <I>option</I>
-is specified, but not <I>value</I>, then a list describing <I>option</I> is returned.
-If one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair,
-the option <I>option</I> is set to <I>value</I>. The following options are valid. <blockquote></DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color. This includes the margins and legend, but
-not the plotting area. </DD>
-
-<DT><B>-barmode <I>mode</I></B>  </DT>
-<DD>Indicates how related bar elements
-will be drawn.  Related elements have data points with the same abscissas
-(X-coordinates). <I>Mode</I> indicates how those segments should be drawn. <I>Mode</I> can
-be <I>infront</I>, <I>aligned</I>, <I>overlap</I>, or <I>stacked</I>. The default mode is <I>infront</I>. <blockquote></DD>
-
-<DT><I>infront</I>
-</DT>
-<DD>Each successive segment is drawn in front of the previous.  </DD>
-
-<DT><I>stacked</I> </DT>
-<DD>Each
-successive segment is stacked vertically on top of the previous.   </DD>
-
-<DT><I>aligned</I>
-</DT>
-<DD>Segments is displayed aligned from right-to-left.   </DD>
-
-<DT><I>overlap</I> </DT>
-<DD>Like <I>aligned</I> but
-segments slightly overlap each other.   </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-barwidth <I>value</I></B>  </DT>
-<DD>Specifies the width
-of the bars.  This value can be overrided by the individual elements using
-their <B>-barwidth</B> configuration option. <I>Value</I> is the width in terms of graph
-coordinates.  The default width is <I>1.0</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the 3-D border around the outside edge of the widget.  The <B>-relief</B> option
-determines if the border is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-bottommargin
-<I>pixels</I></B> </DT>
-<DD>Specifies the size of the margin below the X-coordinate axis.  If
-<I>pixels</I> is <I>0</I>, the size of the margin is selected automatically. The default
-is <I>0</I>. </DD>
-
-<DT><B>-bufferelements <I>boolean</I></B> </DT>
-<DD>Indicates whether an internal pixmap to buffer
-the display of data elements should be used.  If <I>boolean</I> is true, data elements
-are drawn to an internal pixmap.  This option is especially useful when
-the graph is redrawn frequently while the remains data unchanged (for example,
-moving a marker across the plot).  See the <FONT SIZE=-1><B>SPEED TIPS</B></FONT>
-  section. The default
-is <I>1</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is
-<I>crosshair</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the font of the graph title. The default
-is <I>*-Helvetica-Bold-R-Normal-*-18-180-*</I>. </DD>
-
-<DT><B>-halo <I>pixels</I></B>  </DT>
-<DD>Specifies a maximum distance
-to consider when searching for the closest data point (see the element's
-<B>closest</B> operation below). Data points further than <I>pixels</I> away are ignored.
- The default is <I>0.5i</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.
- The default is <I>4i</I>. </DD>
-
-<DT><B>-invertxy <I>boolean</I></B> </DT>
-<DD>Indicates whether the placement X-axis
-and Y-axis should be inverted.  If <I>boolean</I> is true, the X and Y axes are
-swapped.  The default is <I>0</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the title should
-be justified.  This matters only when the title contains more than one line
-of text. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-leftmargin
-<I>pixels</I></B> </DT>
-<DD>Sets the size of the margin from the left edge of the window to
- the Y-coordinate axis.  If <I>pixels</I> is <I>0</I>, the size is calculated automatically.
- The default is <I>0</I>. </DD>
-
-<DT><B>-plotbackground <I>color</I></B> </DT>
-<DD>Specifies the background color of
-the plotting area.  The default is <I>white</I>. </DD>
-
-<DT><B>-plotborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the
-width of the 3-D border around the plotting area.  The <B>-plotrelief</B> option
-determines if a border is drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-plotpadx <I>pad</I></B> </DT>
-<DD>Sets the
-amount of padding to be added to the left and right sides of the plotting
-area.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has two
-elements, the left side of the plotting area entry is padded by the first
-distance and the right side by the second.  If <I>pad</I> is just one distance,
-both the left and right sides are padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotpady
-<I>pad</I></B> </DT>
-<DD>Sets the amount of padding to be added to the top and bottom of the
-plotting area.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I>
-has two elements, the top of the plotting area is padded by the first distance
-and the bottom by the second.  If <I>pad</I> is just one distance, both the top
-and bottom are padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotrelief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect for the plotting area.  <I>Relief</I> specifies how the interior
-of the plotting area should appear relative to rest of the graph; for example,
-<I>raised</I> means the plot should appear to protrude from the graph, relative
-to the surface of the graph.  The default is <I>sunken</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect for the barchart widget.  <I>Relief</I> specifies how the graph should
-appear relative to widget it is packed into; for example, <I>raised</I> means
-the graph should appear to protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-rightmargin <I>pixels</I></B>
-</DT>
-<DD>Sets the size of margin from the plotting area to the right edge of the
-window.  By default, the legend is drawn in this margin.  If <I>pixels</I> is than
-1, the margin size is selected automatically. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides
-information used when moving the focus from window to window via keyboard
-traversal (e.g., Tab and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window
-should be skipped entirely during keyboard traversal.  <I>1</I> means that the
-this window should always receive the input focus.  An empty value means
-that the traversal scripts make the decision whether to focus on the window.
-The default is <I>""</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies a tiled background for the widget.
- If <I>image</I> isn't <I>""</I>, the background is tiled using <I>image</I>. Otherwise, the normal
-background color is drawn (see the <B>-background</B> option).  <I>Image</I> must be an
-image created using the Tk <B>image</B> command.  The default is <I>""</I>. </DD>
-
-<DT><B>-title <I>text</I></B>
- </DT>
-<DD>Sets the title to <I>text</I>. If <I>text</I> is <I>""</I>, no title will be displayed. </DD>
-
-<DT><B>-topmargin
-<I>pixels</I></B> </DT>
-<DD>Specifies the size of the margin above the x2 axis.  If <I>pixels</I> is
-<I>0</I>, the margin size is calculated automatically. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the
-requested width of the widget.  The default is <I>5i</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>crosshairs <I>operation
-</I></B></I>?<I>arg</I>? </DT>
-<DD>See the  <FONT SIZE=-1><B>CROSSHAIRS COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>element <I>operation
-</I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>ELEMENT COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>extents <I>item</I></B></I>  </DT>
-<DD>Returns
-the size of a particular item in the graph.  <I>Item</I> must be either <I>leftmargin</I>,
-<I>rightmargin</I>, <I>topmargin</I>, <I>bottommargin</I>, <I>plotwidth</I>, or <I>plotheight</I>. </DD>
-
-<DT><I>pathName
-<B>grid <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>GRID COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>invtransform
-<I>winX winY</I></B></I>  </DT>
-<DD>Performs an inverse coordinate transformation, mapping window
-coordinates back to graph coordinates, using the standard X-axis and Y-axis.
-Returns a list of containing the X-Y graph coordinates. </DD>
-
-<DT><I>pathName <B>inside <I>x
-y</I></B></I> </DT>
-<DD>Returns <I>1</I> is the designated screen coordinate (<I>x</I> and <I>y</I>) is inside the
-plotting area and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>legend <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the 
-<FONT SIZE=-1><B>LEGEND COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>line<B> operation arg</B></B></I>... </DT>
-<DD>The operation is
-the same as <B>element</B>. </DD>
-
-<DT><I>pathName <B>marker <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>MARKER COMPONENTS</B></FONT>
-
- section. </DD>
-
-<DT><I>pathName</I> <B>metafile</B> ?<I>fileName</I>? </DT>
-<DD><I>This operation is for Window platforms
-only</I>.   Creates a Windows enhanced metafile of the barchart. If present,
-<I>fileName</I> is the file name of the new metafile. Otherwise, the metafile is
-automatically added to the clipboard. </DD>
-
-<DT><I>pathName <B>postscript <I>operation </I></B></I>?<I>arg</I>?...
-</DT>
-<DD>See the  <FONT SIZE=-1><B>POSTSCRIPT COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>snap <I>photoName</I></B></I> </DT>
-<DD>Takes a
-snapshot of the graph and stores the contents in the photo image <I>photoName</I>.
- <I>PhotoName</I> is the name of a Tk photo image that must already exist. </DD>
-
-<DT><I>pathName
-<B>transform <I>x y</I></B></I>  </DT>
-<DD>Performs a coordinate transformation, mapping graph coordinates
-to window coordinates, using the standard X-axis and Y-axis. Returns a list
-containing the X-Y screen coordinates. </DD>
-
-<DT><I>pathName <B>xaxis <I>operation</I></B></I> ?<I>arg</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName
-<B>x2axis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>yaxis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>y2axis
-<I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-</DL>
-
-<H2><A NAME="sect8" HREF="#toc8">Barchart Components</A></H2>
-A
-graph is composed of several components: coordinate axes, data elements,
-legend, grid, cross hairs, postscript, and annotation markers. Instead of
-one big set of configuration options and operations, the graph is partitioned,
-where each component has its own configuration options and operations that
-specifically control that aspect or part of the graph.  
-<H3><A NAME="sect9" HREF="#toc9">Axis Components</A></H3>
-Four
-coordinate axes are automatically created: two X-coordinate axes (<I>x</I> and
-<I>x2</I>) and two Y-coordinate axes (<I>y</I>, and <I>y2</I>).  By default, the axis <I>x</I> is located
-in the bottom margin, <I>y</I> in the left margin, <I>x2</I> in the top margin, and <I>y2</I>
-in the right margin. <P>
-An axis consists of the axis line, title, major and
-minor ticks, and tick labels.  Major ticks are drawn at uniform intervals
-along the axis.  Each tick is labeled with its coordinate value.  Minor ticks
-are drawn at uniform intervals within major ticks.   <P>
-The range of the axis
-controls what region of data is plotted. Data points outside the minimum
-and maximum limits of the axis are not plotted.  By default, the minimum
-and maximum limits are determined from the data, but you can reset either
-limit. <P>
-You can create and use several axes. To create an axis, invoke the
-axis component and its create operation. <BR>
-<CODE># Create a new axis called "temperature"<BR>
-.b axis create temperature<BR>
-</CODE><P>You map data elements to an axis using the element's -mapy and -mapx configuration
-options. They specify the coordinate axes an element is mapped onto. <BR>
-<CODE># Now map the temperature data to this axis.<BR>
-.b element create "temp" -xdata $x -ydata $tempData \<BR>
-    -mapy temperature<BR>
-</CODE><P>While you can have many axes, only four axes can be displayed simultaneously.
- They are drawn in each of the margins surrounding the plotting area.  The
-axes <I>x</I> and <I>y</I> are drawn in the bottom and left margins. The axes <I>x2</I> and <I>y2</I>
-are drawn in top and right margins.  Only <I>x</I> and <I>y</I> are shown by default. Note
-that the axes can have different scales. <P>
-To display a different axis, you
-invoke one of the following components: <B>xaxis</B>, <B>yaxis</B>, <B>x2axis</B>, and <B>y2axis</B>.
-The <B>use</B> operation designates the axis to be drawn in the corresponding
-margin: <B>xaxis</B> in the bottom, <B>yaxis</B> in the left,  <B>x2axis</B> in the top, and
-<B>y2axis</B> in the right. <BR>
-<CODE># Display the axis temperature in the left margin.<BR>
-.b yaxis use temperature<BR>
-<P>
-</CODE><P>You can configure axes in many ways. The axis scale can be linear or logarithmic.
- The values along the axis can either monotonically increase or decrease.
- If you need custom tick labels, you can specify a Tcl procedure to format
-the label any way you wish.  You can control how ticks are drawn, by changing
-the major tick interval or the number of minor ticks.  You can define non-uniform
-tick intervals, such as for time-series plots. <P>
-
-<DL>
-
-<DT><I>pathName <B>axis <B>cget <I>axisName
-<I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option given by <I>option</I> for <I>axisName</I>.
- <I>Option</I> may be any option described below for the axis <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>axis <B>configure <I>axisName </I></B></B></I>?<I>axisName</I>?... ?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options of <I>axisName</I>. Several axes can be changed.  If <I>option</I>
-isn't specified, a list describing all the current options for <I>axisName</I>
-is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list describing
-<I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are specified,
-then for each pair, the axis option <I>option</I> is set to <I>value</I>.  The following
-options are valid for axes. <blockquote></DD>
-
-<DT><B>-autorange <I>range</I></B>  </DT>
-<DD>Sets the range of values for
-the axis to <I>range</I>.  The axis limits are automatically reset to display the
-most recent data points in this range.   If <I>range</I> is 0.0, the range is determined
-from the limits of the data.  If <B>-min</B> or <B>-max</B> are specified, they override
-this option.  The default is <I>0.0</I>. </DD>
-
-<DT><B>-color <I>color</I></B> </DT>
-<DD>Sets the color of the axis and
-tick labels. The default is <I>black</I>. </DD>
-
-<DT><B>-command <I>prefix</I></B> </DT>
-<DD>Specifies a Tcl command
-to be invoked when formatting the axis tick labels. <I>Prefix</I> is a string containing
-the name of a Tcl proc and any extra arguments for the procedure.  This
-command is invoked for each major tick on the axis.  Two additional arguments
-are passed to the procedure: the pathname of the widget and the current
-the numeric value of the tick.  The procedure returns the formatted tick
-label.  If <I>""</I> is returned, no label will appear next to the tick.  You can
-get the standard tick labels again by setting <I>prefix</I> to <I>""</I>.  The default
-is <I>""</I>. <P>
-Please note that this procedure is invoked while the bar chart is
-redrawn. You may query the widget's configuration options.  But do not reset
-options, because this can have unexpected results. </DD>
-
-<DT><B>-descending <I>boolean</I></B>  </DT>
-<DD>Indicates
-whether the values along the axis are monotonically increasing or decreasing.
- If <I>boolean</I> is true, the axis values will be decreasing.  The default is
-<I>0</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the axis is displayed.  </DD>
-
-<DT><B>-justify <I>justify</I></B>
-</DT>
-<DD>Specifies how the axis title should be justified.  This matters only when
-the axis title contains more than one line of text. <I>Justify</I> must be <I>left</I>,
-<I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-limits <I>formatStr</I></B> </DT>
-<DD>Specifies a printf-like
-description to format the minimum and maximum limits of the axis.  The limits
-are displayed at the top/bottom or left/right sides of the plotting area.
- <I>FormatStr</I> is a list of one or two format descriptions.  If one description
-is supplied, both the minimum and maximum limits are formatted in the same
-way.  If two, the first designates the format for the minimum limit, the
-second for the maximum.  If <I>""</I> is given as either description, then  the
-that limit will not be displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets
-the width of the axis and tick lines.  The default is <I>1</I> pixel. </DD>
-
-<DT><B>-logscale <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the scale of the axis is logarithmic or linear.  If <I>boolean</I>
-is true, the axis is logarithmic.  The default scale is linear. </DD>
-
-<DT><B>-loose <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the limits of the axis should fit the data points tightly,
-at the outermost data points, or loosely, at the outer tick intervals. This
-is relevant only when the axis limit is automatically calculated. If <I>boolean</I>
-is true, the axis range is "loose". The default is <I>0</I>. </DD>
-
-<DT><B>-majorticks <I>majorList</I></B>
-</DT>
-<DD>Specifies where to display major axis ticks.  You can use this option to
-display ticks at non-uniform intervals.  <I>MajorList</I> is a list of axis coordinates
-designating the location of major ticks.  No minor ticks are drawn.  If <I>majorList</I>
-is <I>""</I>,  major ticks will be automatically computed. The default is <I>""</I>. </DD>
-
-<DT><B>-max
-<I>value</I></B> </DT>
-<DD>Sets the maximum limit of <I>axisName</I>.  Any data point greater  than
-<I>value</I> is not displayed.  If <I>value</I> is <I>""</I>,  the maximum limit is calculated
-using the largest data value. The default is <I>""</I>. </DD>
-
-<DT><B>-min <I>value</I></B> </DT>
-<DD>Sets the minimum
-limit of <I>axisName</I>. Any data point less than  <I>value</I> is not displayed.  If
-<I>value</I> is <I>""</I>, the minimum limit is calculated using the smallest data value.
-The default is <I>""</I>. </DD>
-
-<DT><B>-minorticks <I>minorList</I></B> </DT>
-<DD>Specifies where to display minor
-axis ticks.  You can use this option to display minor ticks at non-uniform
-intervals. <I>MinorList</I> is a list of real values, ranging from 0.0 to 1.0, designating
-the placement of a minor tick.  No minor ticks are drawn if the <B>-majortick</B>
-option is also set.  If <I>minorList</I> is <I>""</I>, minor ticks will be automatically
-computed. The default is <I>""</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the how many degrees
-to rotate the axis tick labels. <I>Theta</I> is a real value representing the number
-of degrees to rotate the tick labels.  The default is <I>0.0</I> degrees. </DD>
-
-<DT><B>-shiftby
-<I>value</I></B> </DT>
-<DD>Specifies how much to automatically shift the range of the axis. When
-the new data exceeds the current axis maximum, the maximum is increased
-in increments of <I>value</I>.  You can use this option to prevent the axis limits
-from being recomputed at each new time point. If <I>value</I> is 0.0, then no automatic
-shifting is down. The default is <I>0.0</I>. </DD>
-
-<DT><B>-showticks <I>boolean</I></B> </DT>
-<DD>Indicates whether
-axis ticks should be drawn. If <I>boolean</I> is true, ticks are drawn.  If false,
-only the axis line is drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-stepsize <I>value</I></B> </DT>
-<DD>Specifies the
-interval between major axis ticks.  If <I>value</I> isn't a valid interval (must
-be less than the axis range),  the request is ignored and the step size
-is automatically calculated. </DD>
-
-<DT><B>-subdivisions <I>number</I></B>  </DT>
-<DD>Indicates how many minor
-axis ticks are to be drawn.  For example, if <I>number</I> is two, only one minor
-tick is drawn.  If <I>number</I> is one, no minor ticks are displayed.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-tickfont <I>fontName</I></B>  </DT>
-<DD>Specifies the font for axis tick labels. The default
-is <I>*-Courier-Bold-R-Normal-*-100-*</I>. </DD>
-
-<DT><B>-ticklength <I>pixels</I></B> </DT>
-<DD>Sets the length of major
-and minor ticks (minor ticks are half the length of major ticks). If <I>pixels</I>
-is less than zero, the axis will be inverted with ticks drawn pointing
-towards the plot.  The default is <I>0.1i</I>. </DD>
-
-<DT><B>-title <I>text</I></B> </DT>
-<DD>Sets the title of the axis.
-If <I>text</I> is  <I>""</I>, no axis title will be displayed.   </DD>
-
-<DT><B>-titlecolor <I>color</I></B> </DT>
-<DD>Sets
-the color of the axis title. The default is <I>black</I>. </DD>
-
-<DT><B>-titlefont <I>fontName</I></B>  </DT>
-<DD>Specifies
-the font for axis title. The default is <I>*-Helvetica-Bold-R-Normal-*-14-140-*</I>. </DD>
-</DL>
-<P>
-Axis
-configuration options may be also be set by the <B>option</B> command.  The resource
-class is <I>Axis</I>.  The resource names are the names of the axes (such as <I>x</I>
-or <I>x2</I>). <BR>
-<CODE>option add *Barchart.Axis.Color  blue<BR>
-option add *Barchart.x.LogScale  true<BR>
-option add *Barchart.x2.LogScale false<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>axis <B>create <I>axisName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new axis by the
-name <I>axisName</I>.  No axis by the same name can already exist. <I>Option</I> and <I>value</I>
-are described  in above in the axis <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>axis <B>delete
-</B></B></I>?<I>axisName</I>?... </DT>
-<DD>Deletes the named axes. An axis is not really deleted until it
-is not longer in use, so it's safe to delete axes mapped to elements. </DD>
-
-<DT><I>pathName
-<B>axis invtransform <I>axisName value</I></B></I> </DT>
-<DD>Performs the inverse transformation, changing
-the screen coordinate <I>value</I> to a graph coordinate, mapping the value mapped
-to <I>axisName</I>.  Returns the graph coordinate. </DD>
-
-<DT><I>pathName <B>axis limits <I>axisName</I></B></I>
-</DT>
-<DD>Returns a list of the minimum and maximum limits for <I>axisName</I>.  The order
-of the list is <I>min max</I>. </DD>
-
-<DT><I>pathName <B>axis names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of
-axes matching zero or more patterns.  If no <I>pattern</I> argument is give, the
-names of all axes are returned. </DD>
-
-<DT><I>pathName <B>axis transform <I>axisName value</I></B></I> </DT>
-<DD>Transforms
-the coordinate <I>value</I> to a screen coordinate by mapping the it to <I>axisName</I>.
- Returns the transformed screen coordinate. </DD>
-</DL>
-<P>
-Only four axes can be displayed
-simultaneously.  By default, they are <I>x</I>, <I>y</I>, <I>x2</I>, and <I>y2</I>.  You can swap in
-a different axis with <B>use</B> operation of the special axis components: <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B>. <BR>
-<CODE>.g create axis temp<BR>
-.g create axis time<BR>
-...<BR>
-.g xaxis use temp<BR>
-.g yaxis use time<BR>
-</CODE><P>Only the axes specified for use are displayed on the screen. <P>
-The <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B> components operate on an axis location rather
-than a specific axis like the more general <B>axis</B> component does.  The <B>xaxis</B>
-component manages the X-axis located in the bottom margin (whatever axis
-that happens to be).  Likewise, <B>yaxis</B> uses the Y-axis in the left margin,
-<B>x2axis</B> the top X-axis, and <B>y2axis</B> the right Y-axis. <P>
-They implicitly control
-the axis that is currently using to that location.  By default, <B>xaxis</B> uses
-the <I>x</I> axis, <B>yaxis</B> uses <I>y</I>, <B>x2axis</B> uses <I>x2</I>, and <B>y2axis</B> uses <I>y2</I>.  These components
-can be more convenient to use than always determining what axes are current
-being displayed by the graph. <P>
-The following operations are available for
-axes. They mirror exactly the operations of the <B>axis</B> component.  The <I>axis</I>
-argument must be <B>xaxis</B>, <B>x2axis</B>, <B>yaxis</B>, or <B>y2axis</B>. 
-<DL>
-
-<DT><I>pathName <I>axis <B>cget <I>option</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>configure </B></I></I>?<I>option value</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> invtransform <I>value</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>limits</B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> transform <I>value</I></B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> use </B></I></I>?<I>axisName</I>?
-  </DT>
-<DD>Designates the axis <I>axisName</I> is to be displayed at this location.  <I>AxisName</I>
-can not be already in use at another location.   This command returns the
-name of the axis currently using this location. </DD>
-</DL>
-
-<H3><A NAME="sect10" HREF="#toc10">Crosshairs Component</A></H3>
-Cross
-hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position the
-mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives. This
-means that they can be quickly drawn and erased without redrawing the entire
-widget. <P>
-The following operations are available for cross hairs: 
-<DL>
-
-<DT><I>pathName
-<B>crosshairs cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the cross hairs configuration
-option given by <I>option</I>.  <I>Option</I> may be any option described below for the
-cross hairs <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>crosshairs configure </B></I>?<I>option value</I>?...
-  </DT>
-<DD>Queries or modifies the configuration options of the cross hairs.  If
-<I>option</I> isn't specified, a list describing all the current options for the
-cross hairs is returned.  If <I>option</I> is specified, but not <I>value</I>, then a
-list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I> pairs
-are specified, then for each pair, the cross hairs option <I>option</I> is set
-to <I>value</I>. The following options are available for cross hairs. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>
- </DT>
-<DD>Sets the color of the cross hairs.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the cross hairs. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the cross
-hair lines.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the
-cross hairs will be solid lines. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether cross hairs
-are drawn. If <I>boolean</I> is true, cross hairs are not drawn.  The default is
-<I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Set the width of the cross hair lines.  The default
-is <I>1</I>. </DD>
-
-<DT><B>-position <I>pos</I></B>  </DT>
-<DD>Specifies the screen position where the cross hairs
-intersect. <I>Pos</I> must be in the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window
-coordinates of the intersection. </DD>
-</DL>
-<P>
-Cross hairs configuration options may be
-also be set by the <B>option</B> command.  The resource name and class are <I>crosshairs</I>
-and <I>Crosshairs</I> respectively. <BR>
-<CODE>option add *Barchart.Crosshairs.LineWidth 2<BR>
-option add *Barchart.Crosshairs.Color     red<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>crosshairs off</B></I> </DT>
-<DD>Turns off the cross hairs.  </DD>
-
-<DT><I>pathName <B>crosshairs
-on</B></I> </DT>
-<DD>Turns on the display of the cross hairs. </DD>
-
-<DT><I>pathName <B>crosshairs toggle</B></I> 
-</DT>
-<DD>Toggles the current state of the cross hairs, alternately mapping and unmapping
-the cross hairs. </DD>
-</DL>
-
-<H2><A NAME="sect11" HREF="#toc11">Elements</A></H2>
-A data element represents a set of data.  It contains
-x and y vectors which are the coordinates of the data points.  Elements
-are displayed as bars where the length of the bar is proportional to the
-ordinate of the data point.  Elements also control the appearance of the
-data, such as the color, stipple, relief, etc. <P>
-When new data elements are
-created, they are automatically added to a list of displayed elements. 
- The display list controls what elements are drawn and in what order.  
-<P>
-The following operations are available for elements. 
-<DL>
-
-<DT><I>pathName <B>element activate
-<I>elemName </I></B></I>?<I>index</I>?... </DT>
-<DD>Specifies the data points of element <I>elemName</I> to be drawn
-using active foreground and background colors.  <I>ElemName</I> is the name of
-the element and <I>index</I> is a number representing the index of the data point.
-If no indices are present then all data points become active. </DD>
-
-<DT><I>pathName <B>element
-bind <I>tagName</I></B></I> ?<I>sequence</I>?  ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such
-that whenever the event sequence given by <I>sequence</I> occurs for an element
-with this tag, <I>command</I> will be invoked.  The syntax is similar to the  <B>bind</B>
-command except that it operates on graph elements, rather  than widgets.
-See the <B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on  <I>command</I> before invoking it.   <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>element cget <I>elemName
-<I>option</I></I></B></I> </DT>
-<DD>Returns the current value of the element configuration option given
-by  <I>option</I>.  <I>Option</I> may be any of the options described below for the element
-<B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>element closest <I>x y</I></B></I> ?<I>option value</I>?... ?<I>elemName</I>?...
-</DT>
-<DD>Finds the data point representing the bar closest to the window coordinates
-<I>x</I> and <I>y</I> in the element <I>elemName</I>. <I>ElemName</I> is the name of an element, which
-must be displayed.  If no elements are specified, then all displayed elements
-are searched.  It returns a list containing the name of the closest element,
-the index of its closest point, and the graph coordinates of the point.
-If no data point within the threshold distance can be found, <I>""</I> is returned.
- The following <I>option</I>-<I>value</I> pairs are available. <blockquote></DD>
-
-<DT><B>-halo <I>pixels</I></B> </DT>
-<DD>Specifies a
-threshold distance where selected data points are ignored. <I>Pixels</I> is a valid
-screen distance, such as <I>2</I> or <I>1.2i</I>. If this option isn't specified, then it
-defaults to the value of the <B>barchart</B>'s <B>-halo</B> option. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>element configure
-<I>elemName </I></B></I>?<I>elemName</I>... ?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration
-options for elements.  Several elements can be modified at the same time.
-If <I>option</I> isn't specified, a list describing all the current options for
-<I>elemName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list
-describing the option <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I>
-pairs are specified, then for each pair, the element option <I>option</I> is set
-to <I>value</I>.  The following options are valid for elements. <blockquote></DD>
-
-<DT><B>-activepen <I>penName</I></B>
-</DT>
-<DD>Specifies pen to use to draw active element.  If <I>penName</I> is <I>""</I>, no active
-elements will be drawn.  The default is  <I>activeLine</I>. </DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies
-the binding tags for the element.  <I>TagList</I> is a list of binding tag names.
- The tags and their order will determine how events for elements.  Each
-tag in the list matching the current event sequence will have its Tcl command
-executed.  Implicitly the name of the element is always the first tag in
-the list.  The default value is <I>all</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the the color
-of the border around each bar.  The default is <I>white</I>. </DD>
-
-<DT><B>-barwidth <I>value</I></B>  </DT>
-<DD>Specifies
-the width the bars drawn for the element.  <I>Value</I> is the width in X-coordinates.
- If this option isn't specified, the width of each bar is the value of the
-widget's <B>-barwidth</B> option. </DD>
-
-<DT><B>-baseline <I>value</I></B>  </DT>
-<DD>Specifies the baseline of the bar
-segments.  This affects how bars are  drawn since bars are drawn from their
-respective y-coordinate the  baseline. By default the baseline is <I>0.0</I>.   </DD>
-
-<DT><B>-borderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the border width of the 3-D border drawn around the outside
-of each bar.  The <B>-relief</B> option determines if such a border is drawn.  <I>Pixels</I>
-must be a valid screen distance like <I>2</I> or <I>0.25i</I>. The default is <I>2</I>. </DD>
-
-<DT><B>-data <I>coordList</I></B>
-</DT>
-<DD>Specifies the X-Y coordinates of the data.  <I>CoordList</I> is a list of numeric
-expressions representing the X-Y coordinate pairs of each data point. </DD>
-
-<DT><B>-foreground
-<I>color</I></B>  </DT>
-<DD>Sets the color of the interior of the bars.   </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates
-whether the element is displayed.  The default is <I>no</I>. </DD>
-
-<DT><B>-label <I>text</I></B> </DT>
-<DD>Sets the
-element's label in the legend.  If <I>text</I> is <I>""</I>, the element will have no entry
-in the legend. The default label is the element's name. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Selects
-the X-axis to map the element's X-coordinates onto. <I>XAxis</I> must be the name
-of an axis.  The default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Selects the Y-axis to map the element's
-Y-coordinates onto. <I>YAxis</I> must be the name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-relief
-<I>string</I></B> </DT>
-<DD>Specifies the 3-D effect desired for bars.  <I>Relief</I> indicates how the
-interior of the bar should appear relative to the surface of the chart;
-for example, <I>raised</I> means the bar should appear to protrude from the surface
-of the plotting area.  The default is <I>raised</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies a
-stipple pattern with which to draw the bars.  If <I>bitmap</I> is <I>""</I>, then the
-bar is drawn in a solid fashion. </DD>
-
-<DT><B>-xdata <I>xVector</I></B>  </DT>
-<DD>Specifies the x-coordinate
-vector of the data. <I>XVector</I> is the name of a BLT vector or a list of numeric
-expressions.   </DD>
-
-<DT><B>-ydata <I>yVector</I></B>  </DT>
-<DD>Specifies the y-coordinate vector of the data.
-<I>YVector</I> is the name of a BLT vector or a list of numeric expressions.  
-</DD>
-</DL>
-<P>
-Element configuration options may also be set by the  <B>option</B> command.  The
-resource names  in the option database  are prefixed by <I>elem</I>. <BR>
-<CODE>option add *Barchart.Element.background blue<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>element create <I>elemName</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a new element <I>elemName</I>.
- Element names must be unique, so an element <I>elemName</I> may not already exist.
- If additional arguments are present, they specify any of the element options
-valid for element <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>element deactivate <I>pattern</I></B></I>...
-</DT>
-<DD>Deactivates all the elements matching <I>pattern</I> for the graph.   Elements
-whose names match any of the patterns given are redrawn  using their normal
-colors.   </DD>
-
-<DT><I>pathName <B>element delete</B></I> ?<I>pattern</I>?... </DT>
-<DD>Deletes all the elements matching
-<I>pattern</I> for the graph.   Elements whose names match any of the patterns
-given are deleted.  The graph will be redrawn without the deleted elements.
-  </DD>
-
-<DT><I>pathName <B>element exists <I>elemName</I></B></I> </DT>
-<DD>Returns <I>1</I> if an element <I>elemName</I> currently
-exists and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>element names </B></I>?<I>pattern</I>?...   </DT>
-<DD>Returns the elements
-matching one or more pattern.  If no <I>pattern</I> is given, the names of all
-elements is returned. </DD>
-
-<DT><I>pathName <B>element show</B></I> ?<I>nameList</I>?   </DT>
-<DD>Queries or modifies
-the element display list.  The element display list designates the elements
-drawn and in what order. <I>NameList</I> is a list of elements to be displayed
-in the order they are named.  If there is no <I>nameList</I> argument, the current
-display list is returned. </DD>
-
-<DT><I>pathName <B>element type</B></I> <I>elemName</I> </DT>
-<DD>Returns the type
-of <I>elemName</I>.  If the element is a bar element, the commands returns the
-string <I>"bar"</I>, otherwise it returns <I>"line"</I>. </DD>
-</DL>
-
-<H3><A NAME="sect12" HREF="#toc12"></CODE><P>Grid Component</A></H3>
-Grid lines extend
-from the major and minor ticks of each axis horizontally or vertically
-across the plotting area.  The following operations are available for grid
-lines. 
-<DL>
-
-<DT><I>pathName <B>grid cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the grid line
-configuration option given by  <I>option</I>.  <I>Option</I> may be any option described
-below for the grid <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>grid configure</B></I> ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options for grid lines.  If
-<I>option</I> isn't specified, a list describing all the current grid options for
-<I>pathName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list
-describing <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are
-specified, then for each pair, the grid line option <I>option</I> is set to <I>value</I>.
- The following options are valid for grid lines. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color
-of the grid lines.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style
-of the grid lines. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the grid lines.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the grid will be solid lines.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid should be drawn. If <I>boolean</I> is true,
-grid lines are not shown. The default is <I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of grid lines.  The default width is <I>1</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Specifies the X-axis to
-display grid lines.  <I>XAxis</I> must be the name of an axis or <I>""</I> for no grid
-lines.   The default is <I>""</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to display grid
-lines.  <I>YAxis</I> must be the name of an axis or <I>""</I> for no grid lines.  The default
-is <I>y</I>. </DD>
-
-<DT><B>-minor <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid lines should be drawn for
-minor ticks.  If <I>boolean</I> is true, the lines will appear at minor tick intervals.
- The default is <I>1</I>. </DD>
-</DL>
-<P>
-Grid configuration options may also be set by the  <B>option</B>
-command.  The resource name and class are <I>grid</I> and  <I>Grid</I> respectively.  <BR>
-<CODE>option add *Barchart.grid.LineWidth 2<BR>
-option add *Barchart.Grid.Color     black<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>grid off</B></I> </DT>
-<DD>Turns off the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid on</B></I>
-</DT>
-<DD>Turns on the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid toggle</B></I> </DT>
-<DD>Toggles the display
-of the grid.   </DD>
-</DL>
-
-<H3><A NAME="sect13" HREF="#toc13">Legend Component</A></H3>
-The legend displays a list of the data elements.
- Each entry consists of the element's symbol and label.  The legend can appear
-in any margin (the default location is in the right margin).  It can also
-be positioned anywhere within the plotting area. <P>
-The following operations
-are valid for the legend. 
-<DL>
-
-<DT><I>pathName <B>legend activate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend
-entries to be drawn using the active legend colors and relief. All entries
-whose element names match <I>pattern</I>  are selected.  To be selected, the element
-name must match only one <I>pattern</I>.  </DD>
-
-<DT><I>pathName <B>legend bind <I>tagName</I></B></I> ?<I>sequence</I>?
- ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the event
-sequence given by <I>sequence</I> occurs for a legend entry with this tag, <I>command</I>
-will be invoked.  Implicitly the element names in the entry are tags.  The
-syntax is similar to the  <B>bind</B> command except that it operates on legend
-entries, rather  than widgets. See the <B>bind</B> manual entry for complete details
-on <I>sequence</I> and the substitutions performed on  <I>command</I> before invoking
-it.   <P>
-If all arguments are specified then a new binding is created, replacing
- any existing binding for the same <I>sequence</I> and <I>tagName</I>. If the first character
-of <I>command</I> is <I>+</I> then <I>command</I>  augments an existing binding rather than
-replacing it.  If no <I>command</I> argument is provided then the command currently
-associated with <I>tagName</I> and <I>sequence</I> (it's an error occurs  if there's no
-such binding) is returned.  If both <I>command</I> and  <I>sequence</I> are missing then
-a list of all the event sequences for  which bindings have been defined
-for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>legend cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of a
-legend configuration option. <I>Option</I> may be any option described below in
-the legend <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>legend configure </B></I>?<I>option value</I>?...
-</DT>
-<DD>Queries or modifies the configuration options for the legend.  If <I>option</I>
-isn't specified, a list describing the current legend options for <I>pathName</I>
-is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list describing
-<I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are specified,
-then for each pair, the legend option <I>option</I> is set to <I>value</I>.  The following
-options are valid for the legend. <blockquote></DD>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets the background
-color for active legend entries.  All legend entries marked active (see
-the legend <B>activate</B> operation) are drawn using this background color. </DD>
-
-<DT><B>-activeborderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the outside edge of the active
-legend entries.  The default is <I>2</I>. </DD>
-
-<DT><B>-activeforeground <I>color</I></B> </DT>
-<DD>Sets the foreground
-color for active legend entries.  All legend entries marked as active (see
-the legend <B>activate</B> operation) are drawn using this foreground color. </DD>
-
-<DT><B>-activerelief
-<I>relief</I></B>  </DT>
-<DD>Specifies the 3-D effect desired for active legend entries. <I>Relief</I>
-denotes how the interior of the entry should appear relative to the legend;
-for example, <I>raised</I> means the entry should appear to protrude from the
-legend, relative to the surface of the legend.  The default is <I>flat</I>. </DD>
-
-<DT><B>-anchor
-<I>anchor</I></B> </DT>
-<DD>Tells how to position the legend relative to the positioning point
-for the legend.  This is dependent on the value of the <B>-position</B> option. 
-The default is <I>center</I>. <blockquote></DD>
-
-<DT><I>left</I> or <I>right</I> </DT>
-<DD>The anchor describes how to position
-the legend vertically.   </DD>
-
-<DT><I>top</I> or <I>bottom</I> </DT>
-<DD>The anchor describes how to position
-the legend horizontally.   </DD>
-
-<DT><I>@x,y</I> </DT>
-<DD>The anchor specifies how to position the
-legend relative to the positioning point. For example, if <I>anchor</I> is <I>center</I>
-then the legend is centered on the point; if <I>anchor</I> is <I>n</I> then the legend
-will be drawn such that the top center point of the rectangular region
-occupied by the legend will be at the positioning point. </DD>
-
-<DT><I>plotarea</I> </DT>
-<DD>The anchor
-specifies how to position the legend relative to the plotting area. For
-example, if <I>anchor</I> is <I>center</I> then the legend is centered in the plotting
-area; if <I>anchor</I> is <I>ne</I> then the legend will be drawn such that occupies
-the upper right corner of the plotting area. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background
-color of the legend. If <I>color</I> is <I>""</I>, the legend background with be transparent.
-</DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for legend entries.  <I>TagList</I>
-is a list of binding tag names.  The tags and their order will determine
-how events for legend entries.  Each tag in the list matching the current
- event sequence will have its Tcl command executed. The default value  is
-<I>all</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the outside
-edge of the legend (if such border is being drawn; the <B>relief</B> option determines
-this). The default is <I>2</I> pixels. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD><I>FontName</I> specifies a font
-to use when drawing the labels of each element into the legend.  The default
-is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the foreground color
-of the text drawn for the element's label. The default is <I>black</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the legend should be displayed. If <I>boolean</I> is true, the
-legend will not be draw.  The default is <I>no</I>. </DD>
-
-<DT><B>-ipadx <I>pad</I></B>  </DT>
-<DD>Sets the amount of
-internal padding to be added to the width of each legend entry.  <I>Pad</I> can
-be a list of one or two screen distances.  If <I>pad</I> has two elements, the
-left side of the legend entry is padded by the first distance and the right
-side by the second.  If <I>pad</I> is just one distance, both the left and right
-sides are padded evenly.  The default is <I>2</I>. </DD>
-
-<DT><B>-ipady <I>pad</I></B> </DT>
-<DD>Sets an amount of internal
-padding to be added to the height of each legend entry.  <I>Pad</I> can be a list
-of one or two screen distances.  If <I>pad</I> has two elements, the top of the
-entry is padded by the first distance and the bottom by the second.  If
-<I>pad</I> is just one distance, both the top and bottom of the entry are padded
-evenly. The default is <I>2</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the padding to the left and right
-exteriors of the legend. <I>Pad</I> can be a list of one or two screen distances.
- If <I>pad</I> has two elements, the left side of the legend is padded by the
-first distance and the right side by the second.  If <I>pad</I> has just one distance,
-both the left and right sides are padded evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-pady
-<I>pad</I></B> </DT>
-<DD>Sets the padding above and below the legend.  <I>Pad</I> can be a list of one
-or two screen distances.  If <I>pad</I> has two elements, the area above the legend
-is padded by the first distance and the area below by the second.  If <I>pad</I>
-is just one distance, both the top and bottom areas are padded evenly. 
-The default is <I>0</I>. </DD>
-
-<DT><B>-position <I>pos</I></B> </DT>
-<DD>Specifies where the legend is drawn. The <B>-anchor</B>
-option also affects where the legend is positioned.  If <I>pos</I> is <I>left</I>, <I>left</I>,
-<I>top</I>, or <I>bottom</I>, the legend is drawn in the specified margin.  If <I>pos</I> is
-<I>plotarea</I>, then the legend is drawn inside the plotting area at a particular
-anchor.  If <I>pos</I> is in the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window coordinates,
-the legend is drawn in the plotting area at the specified coordinates. 
-The default is <I>right</I>. </DD>
-
-<DT><B>-raised <I>boolean</I></B> </DT>
-<DD>Indicates whether the legend is above
-or below the data elements.  This matters only if the legend is in the plotting
-area.  If <I>boolean</I> is true, the legend will be drawn on top of any elements
-that may overlap it. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the border around the legend. <I>Relief</I> specifies how the interior of the
-legend should appear relative to the bar chart; for example, <I>raised</I> means
-the legend should appear to protrude from the bar chart, relative to the
-surface of the bar chart.  The default is <I>sunken</I>. </DD>
-</DL>
-<P>
-Legend configuration options
-may also be set by the <B>option</B> command.  The resource name and class are
-<I>legend</I> and <I>Legend</I> respectively. <BR>
-<CODE>option add *Barchart.legend.Foreground blue<BR>
-option add *Barchart.Legend.Relief     raised<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>legend deactivate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend entries to be drawn using
-the normal legend colors and relief.  All entries whose element names match
-<I>pattern</I> are selected.  To be selected, the element name must match only
-one <I>pattern</I>. </DD>
-
-<DT><I>pathName <B>legend get <I>pos</I></B></I> </DT>
-<DD>Returns the name of the element whose
-entry is at the screen position <I>pos</I> in the legend.  <I>Pos</I> must be in the form
-"<I>@x,y</I>", where <I>x</I> and <I>y</I> are window coordinates.  If the given coordinates
-do not lie over a legend entry, <I>""</I> is returned. </DD>
-</DL>
-
-<H3><A NAME="sect14" HREF="#toc14">Pen Components</A></H3>
-Pens define
-attributes for elements. Pens mirror the configuration options of data elements
-that pertain to how symbols and lines are drawn.  Data elements use pens
-to determine how they are drawn.  A data element may use several pens at
-once.  In this case, the pen used for a particular data point is determined
-from each element's weight vector (see the element's <B>-weight</B> and <B>-style</B> options).
-<P>
-One pen, called <I>activeBar</I>, is automatically created. It's used as the default
-active pen for elements. So you can change the active attributes for all
-elements by simply reconfiguring this pen. <BR>
-<CODE>.g pen configure "activeBar" -fg green -bg green4<BR>
-</CODE><P>You can create and use several pens. To create a pen, invoke the pen component
-and its create operation. <BR>
-<CODE>.g pen create myPen<BR>
-</CODE><P>You map pens to a data element using either the element's  <B>-pen</B> or <B>-activepen</B>
-options. <BR>
-<CODE>.g element create "e1" -xdata $x -ydata $tempData \<BR>
-    -pen myPen<BR>
-</CODE><P>An element can use several pens at once. This is done by specifying the
-name of the pen in the element's style list (see the <B>-styles</B> option). <BR>
-<CODE>.g element configure "e1" -styles { myPen 2.0 3.0 }<BR>
-</CODE><P>This says that any data point with a weight between 2.0 and 3.0 is to be
-drawn using the pen <I>myPen</I>.  All other points are drawn with the element's
-default attributes. <P>
-The following operations are available for pen components.
-<P>
-
-<DL>
-
-<DT><I>pathName <B>pen <B>cget <I>penName <I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option
-given by <I>option</I> for <I>penName</I>.  <I>Option</I> may be any option described below for
-the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>configure <I>penName </I></B></B></I>?<I>penName</I>... ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options of <I>penName</I>. Several
-pens can be modified at once.  If <I>option</I> isn't specified, a list describing
-the current options for <I>penName</I> is returned.  If <I>option</I> is specified, but
-not <I>value</I>, then a list describing <I>option</I> is returned.  If one or more <I>option</I>
-and <I>value</I> pairs are specified, then for each pair, the pen option <I>option</I>
-is set to <I>value</I>.  The following options are valid for pens. <blockquote></DD>
-
-<DT><B>-background <I>color</I></B>
-</DT>
-<DD>Sets the the color of the border around each bar.  The default is <I>white</I>.
-</DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the border width of the 3-D border drawn around
-the outside of each bar.  The <B>-relief</B> option determines if such a border
-is drawn.  <I>Pixels</I> must be a valid screen distance like <I>2</I> or <I>0.25i</I>. The default
-is <I>2</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the color of the interior of the bars.   </DD>
-
-<DT><B>-relief
-<I>string</I></B> </DT>
-<DD>Specifies the 3-D effect desired for bars.  <I>Relief</I> indicates how the
-interior of the bar should appear relative to the surface of the chart;
-for example, <I>raised</I> means the bar should appear to protrude from the bar
-chart, relative to the surface of the plotting area.  The default is <I>raised</I>.
-</DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies a stipple pattern with which to draw the bars.
- If <I>bitmap</I> is <I>""</I>, then the bar is drawn in a solid fashion. </DD>
-
-<DT><B>-type <I>elemType</I></B>
- </DT>
-<DD>Specifies the type of element the pen is to be used with. This option should
-only be employed when creating the pen.  This is for those that wish to
-mix different types of elements (bars and lines) on the same graph.  The
-default type is "bar". </DD>
-</DL>
-<P>
-Pen configuration options may be also be set by the
-<B>option</B> command.  The resource class is <I>Pen</I>.  The resource names are the names
-of the pens. <BR>
-<CODE>option add *Barchart.Pen.Foreground<tt> </tt> <tt> </tt>    blue<BR>
-option add *Barchart.activeBar.foreground  green<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>pen <B>create <I>penName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new pen by the name
-<I>penName</I>.  No pen by the same name can already exist. <I>Option</I> and <I>value</I> are
-described  in above in the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>delete
-</B></B></I>?<I>penName</I>?... </DT>
-<DD>Deletes the named pens. A pen is not really deleted until it is
-not longer in use, so it's safe to delete pens mapped to elements. </DD>
-
-<DT><I>pathName
-<B>pen names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of pens matching zero or more patterns.
- If no <I>pattern</I> argument is give, the names of all pens are returned. </DD>
-</DL>
-
-<H3><A NAME="sect15" HREF="#toc15">PostScript
-Component</A></H3>
-The barchart can generate encapsulated PostScript output.  There
-are several configuration options you can specify to control how the plot
-will be generated.  You can change the page dimensions and borders.  The
-plot itself can be scaled, centered, or rotated to landscape.  The PostScript
-output can be written directly to a file or returned through the interpreter.
-<P>
-The following postscript operations are available. 
-<DL>
-
-<DT><I>pathName <B>postscript cget
-<I>option</I></B></I>  </DT>
-<DD>Returns the current value of the postscript option given by <I>option</I>.
- <I>Option</I> may be any option described below for the postscript <B>configure</B>
-operation. </DD>
-
-<DT><I>pathName <B>postscript configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options for PostScript generation.  If <I>option</I> isn't specified,
-a list describing  the current postscript options for <I>pathName</I> is returned.
- If <I>option</I> is specified, but not <I>value</I>, then a list describing <I>option</I> is
-returned.  If one or more <I>option</I> and <I>value</I> pairs are specified, then for
-each pair, the postscript option <I>option</I> is set to <I>value</I>.  The following
-postscript options are available. <blockquote></DD>
-
-<DT><B>-center <I>boolean</I></B> </DT>
-<DD>Indicates whether the plot
-should be centered on the PostScript page.  If <I>boolean</I> is false, the plot
-will be placed in the upper left corner of the page.  The default is <I>1</I>. </DD>
-
-<DT><B>-colormap
-<I>varName</I></B> </DT>
-<DD><I>VarName</I> must be the name of a global array variable that specifies
-a color mapping from the X color name to PostScript.  Each element of <I>varName</I>
-must consist of PostScript code to set a particular color value (e.g. ``<I>1.0
-1.0 0.0 setrgbcolor</I>'').  When generating color information in PostScript, the
-array variable <I>varName</I> is checked if an element of the name as the color
-exists. If so, it uses  its value as the PostScript command to set the color.
- If this option hasn't been specified, or if there isn't an entry in <I>varName</I>
-for a given color, then it uses the red, green, and blue intensities from
-the X color. </DD>
-
-<DT><B>-colormode <I>mode</I></B> </DT>
-<DD>Specifies how to output color information.  <I>Mode</I>
-must be either <I>color</I> (for full color output), <I>gray</I> (convert all colors
-to their gray-scale equivalents) or <I>mono</I> (convert foreground colors to black
-and background colors to white).  The default mode is <I>color</I>.  </DD>
-
-<DT><B>-fontmap <I>varName</I></B>
-</DT>
-<DD><I>VarName</I> must be the name of a global array variable that specifies a font
-mapping from the X font name to PostScript.  Each element of <I>varName</I> must
-consist of a Tcl list with one or two elements; the name and point size
-of a PostScript font. When outputting PostScript commands for a particular
-font, the array variable <I>varName</I> is checked to see if an element by the
- specified font exists.  If there is such an element, then the font information
-contained in that element is used in the PostScript output.  (If the point
-size is omitted from the list, the point size of the X font is used).  Otherwise
-the X font is examined in an attempt to guess what PostScript font to use.
- This works only for fonts whose foundry property is <I>Adobe</I> (such as Times,
-Helvetica, Courier, etc.).  If all of this fails then the font defaults to
-<I>Helvetica-Bold</I>. </DD>
-
-<DT><B>-decorations <I>boolean</I></B> </DT>
-<DD>Indicates whether PostScript commands
-to generate color backgrounds and 3-D borders will be output.  If <I>boolean</I>
-is false, the graph will background will be white and no 3-D borders will
-be generated. The default is <I>1</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Sets the height of the plot.
- This lets you print the bar chart with a height different from the one
-drawn on the screen.  If <I>pixels</I> is 0, the height is the same as the widget's
-height. The default is <I>0</I>. </DD>
-
-<DT><B>-landscape <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, this specifies
-the printed area is to be rotated 90 degrees.  In non-rotated output the
-X-axis of the printed area runs along the short dimension of the page (``portrait''
-orientation); in rotated output the X-axis runs along the long dimension
-of the page (``landscape'' orientation).  Defaults to <I>0</I>. </DD>
-
-<DT><B>-maxpect <I>boolean</I></B> </DT>
-<DD>Indicates
-to scale the plot so that it fills the PostScript page. The aspect ratio
-of the barchart is still retained.  The default is <I>0</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the horizontal
-padding for the left and right page borders.  The borders are exterior to
-the plot.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has
-two elements, the left border is padded by the first distance and the right
-border by the second.  If <I>pad</I> has just one distance, both the left and right
-borders are padded evenly.  The default is <I>1i</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B>  </DT>
-<DD>Sets the vertical
-padding for the top and bottom page borders. The borders are exterior to
-the plot.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has
-two elements, the top border is padded by the first distance and the bottom
-border by the second.  If <I>pad</I> has just one distance, both the top and bottom
-borders are padded evenly.  The default is <I>1i</I>. </DD>
-
-<DT><B>-paperheight <I>pixels</I></B> </DT>
-<DD>Sets the
-height of the postscript page.  This can be used to select between different
-page sizes (letter, A4, etc).  The default height is <I>11.0i</I>. </DD>
-
-<DT><B>-paperwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the postscript page.  This can be used to select between
-different page sizes (letter, A4, etc).  The default width is <I>8.5i</I>. </DD>
-
-<DT><B>-width
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the plot.  This lets you generate a plot of a width
-different from that of the widget.  If <I>pixels</I> is 0, the width is the same
-as the widget's width.  The default is <I>0</I>. </DD>
-</DL>
-<P>
-Postscript configuration options
-may be also be set by the <B>option</B> command.  The resource name and class are
-<I>postscript</I> and <I>Postscript</I> respectively. <BR>
-<CODE>option add *Barchart.postscript.Decorations false<BR>
-option add *Barchart.Postscript.Landscape   true<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>postscript output </B></I>?<I>fileName</I>? ?<I>option value</I>?... </DT>
-<DD>Outputs a file of
-encapsulated PostScript.  If a <I>fileName</I> argument isn't present, the command
-returns the PostScript. If any <I>option-value</I> pairs are present, they set configuration
-options controlling how the PostScript is generated. <I>Option</I> and <I>value</I> can
-be anything accepted by the postscript <B>configure</B> operation above. </DD>
-</DL>
-
-<H3><A NAME="sect16" HREF="#toc16">Marker
-Components</A></H3>
-Markers are simple drawing procedures used to annotate or highlight
-areas of the graph.  Markers have various types: text strings, bitmaps,
-images, connected lines, windows, or polygons.  They can be associated with
-a particular element, so that when the element is hidden or un-hidden, so
-is the marker.  By default, markers are the last items drawn, so that data
-elements will appear in behind them.  You can change this by configuring
-the <B>-under</B> option. <P>
-Markers, in contrast to elements, don't affect the scaling
-of the coordinate axes.  They can also have <I>elastic</I> coordinates (specified
-by <I>-Inf</I> and <I>Inf</I> respectively) that translate into the minimum or maximum
-limit of the axis.  For example, you can place a marker so it always remains
-in the lower left corner of the plotting area, by using the coordinates
-<I>-Inf</I>,<I>-Inf</I>. <P>
-The following operations are available for markers. 
-<DL>
-
-<DT><I>pathName <B>marker
-after <I>markerId</I></B></I> ?<I>afterId</I>? </DT>
-<DD>Changes the order of the markers, drawing the
-first marker after the second.  If no second <I>afterId</I> argument is specified,
-the marker is placed at the end of the display list.  This command can be
-used to control how markers are displayed since markers are drawn in the
-order of this display list. </DD>
-
-<DT><I>pathName <B>marker before <I>markerId</I></B></I> ?<I>beforeId</I>? </DT>
-<DD>Changes
-the order of the markers, drawing the first marker before the second.  If
-no second <I>beforeId</I> argument is specified, the marker is placed at the beginning
-of the display list. This command can be used to control how markers are
-displayed since markers are drawn in the order of this display list. </DD>
-
-<DT><I>pathName
-<B>marker bind <I>tagName</I></B></I> ?<I>sequence</I>?  ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I>
-such that whenever the event sequence given by <I>sequence</I> occurs for a marker
-with this tag, <I>command</I> will be invoked.  The syntax is similar to the  <B>bind</B>
-command except that it operates on graph markers, rather  than widgets.
-See the <B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on  <I>command</I> before invoking it.   <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>marker cget <I>option</I></B></I> </DT>
-<DD>Returns
-the current value of the marker configuration option given by <I>option</I>.  <I>Option</I>
-may be any option described below in the <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>marker
-configure <I>markerId</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration
-options for markers.  If <I>option</I> isn't specified, a list describing the current
-options for <I>markerId</I> is returned.  If <I>option</I> is specified, but not <I>value</I>,
-then a list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I>
-pairs are specified, then for each pair, the marker option <I>option</I> is set
-to <I>value</I>. <P>
-The following options are valid for all markers. Each type of marker
-also has its own type-specific options.   They are described in the sections
-below. <blockquote></DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for the marker.  <I>TagList</I>
-is a list of binding tag names.  The tags and their order will determine
-how events for markers are handled.  Each tag in the list matching the 
-current event sequence will have its Tcl command executed.  Implicitly 
-the name of the marker is always the first tag in the list. The default
-value is <I>all</I>. </DD>
-
-<DT><B>-coords <I>coordList</I></B> </DT>
-<DD>Specifies the coordinates of the marker. 
-<I>CoordList</I> is  a list of graph coordinates.  The number of coordinates required
-is dependent on the type of marker.  Text, image, and window markers need
-only two coordinates (an X-Y coordinate).   Bitmap markers can take either
-two or four coordinates (if four, they represent the corners of the bitmap).
-Line markers need at least four coordinates, polygons at least six. If <I>coordList</I>
-is <I>""</I>, the marker will not be displayed. The default is <I>""</I>. </DD>
-
-<DT><B>-element <I>elemName</I></B>
-</DT>
-<DD>Links the marker with the element <I>elemName</I>.  The marker is drawn only if
-the element is also currently displayed (see the element's <B>show</B> operation).
- If <I>elemName</I> is <I>""</I>, the marker is always drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-hide
-<I>boolean</I></B>  </DT>
-<DD>Indicates whether the marker is drawn. If <I>boolean</I> is true, the
-marker is not drawn.  The default is <I>no</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B>  </DT>
-<DD>Specifies the X-axis
-to map the marker's X-coordinates onto. <I>XAxis</I> must the name of an axis.  The
-default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to map the marker's Y-coordinates
-onto. <I>YAxis</I> must the name of an axis.  The default is <I>y</I>. </DD>
-
-<DT><B>-name <I>markerId</I></B> </DT>
-<DD>Changes
-the identifier for the marker.  The identifier <I>markerId</I>  can not already
-be used by another marker.  If this option isn't specified, the marker's name
-is uniquely generated. </DD>
-
-<DT><B>-under <I>boolean</I></B> </DT>
-<DD>Indicates whether the marker is drawn
-below/above data elements.  If <I>boolean</I> is true, the marker is be drawn underneath
-the data elements.  Otherwise, the marker is drawn on top of the element.
- The default is <I>0</I>. </DD>
-
-<DT><B>-xoffset <I>pixels</I></B> </DT>
-<DD>Specifies a screen distance to offset
-the marker horizontally.  <I>Pixels</I> is a valid screen distance, such as <I>2</I> or
-<I>1.2i</I>. The default is <I>0</I>. </DD>
-
-<DT><B>-yoffset <I>pixels</I></B> </DT>
-<DD>Specifies a screen distance to offset
-the markers vertically. <I>Pixels</I> is a valid screen distance, such as <I>2</I> or
-<I>1.2i</I>. The default is <I>0</I>. </DD>
-</DL>
-<P>
-Marker configuration options may also be set by the
-<B>option</B> command. The resource class is either <I>BitmapMarker</I>,  <I>ImageMarker</I>,
- <I>LineMarker</I>, <I>PolygonMarker</I>, <I>TextMarker</I>, or <I>WindowMarker</I>, depending on the
-type of marker.  The resource name is the name of the marker. <BR>
-<CODE>option add *Barchart.TextMarker.Foreground white<BR>
-option add *Barchart.BitmapMarker.Foreground white<BR>
-option add *Barchart.m1.Background     blue<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>marker create <I>type</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a marker of the selected
-type. <I>Type</I> may be either <I>text</I>, <I>line</I>, <I>bitmap</I>, <I>image</I>, <I>polygon</I>, or <I>window</I>. 
-This command returns the marker identifier,  used as the <I>markerId</I> argument
-in the other marker-related commands.  If the <B>-name</B> option is used, this overrides
-the normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old. </DD>
-
-<DT><I>pathName <B>marker delete</B></I>
-?<I>name</I>?... </DT>
-<DD>Removes one of more markers.  The graph will automatically be redrawn
-without the marker..   </DD>
-
-<DT><I>pathName <B>marker exists <I>markerId</I></B></I>  </DT>
-<DD>Returns <I>1</I> if the
-marker <I>markerId</I> exists and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>marker names</B></I> ?<I>pattern</I>?
-  </DT>
-<DD>Returns the names of all the markers that currently exist.  If <I>pattern</I>
-is supplied, only those markers whose names match it will be returned. </DD>
-
-<DT><I>pathName
-<B>marker type <I>markerId</I></B></I>  </DT>
-<DD>Returns the type of the marker given by <I>markerId</I>,
-such as <I>line</I> or <I>text</I>.  If <I>markerId</I> is not a valid a marker identifier, <I>""</I>
-is returned. </DD>
-</DL>
-
-<H3><A NAME="sect17" HREF="#toc17">Bitmap Markers</A></H3>
-A bitmap marker displays a bitmap.  The size of
-the bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the bitmap.
- The bitmap retains its normal width and height.  If four coordinates, the
-first and second pairs of coordinates represent the corners of the bitmap.
- The bitmap will be stretched or reduced as necessary to fit into the bounding
-rectangle. <P>
-Bitmap markers are created with the marker's <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create bitmap </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each  sets a configuration options
-for the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's
-<B>configure</B> operation. <P>
-The following options are specific to bitmap markers:
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Same as the <B>-fill</B> option. </DD>
-
-<DT><B>-bitmap <I>bitmap</I></B> </DT>
-<DD>Specifies the bitmap
-to be displayed.  If <I>bitmap</I> is <I>""</I>, the marker will not be displayed.  The
-default is <I>""</I>. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background color of the bitmap.  If <I>color</I>
-is the empty string, no background will be transparent.  The default background
-color is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Same as the <B>-outline</B> option. </DD>
-
-<DT><B>-mask <I>mask</I></B> </DT>
-<DD>Specifies
-a mask for the bitmap to be displayed. This mask is a bitmap itself, denoting
-the pixels that are transparent.  If <I>mask</I> is <I>""</I>, all pixels of the bitmap
-will be drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the foreground color
-of the bitmap. The default value is <I>black</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Sets the rotation
-of the bitmap.  <I>Theta</I> is a real number representing the angle of rotation
-in degrees.  The marker is first rotated and then placed according to its
-anchor position.  The default rotation is <I>0.0</I>. </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Image Markers</A></H3>
-A image marker
-displays an image.  Image markers are created with the marker's <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create image </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to image markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the image relative to the positioning point
-for the image. For example, if <I>anchor</I> is <I>center</I> then the image is centered
-on the point;  if <I>anchor</I> is <I>n</I> then the image will be drawn such that the
-top center point of the rectangular region occupied by the image will be
-at the positioning point. This option defaults to <I>center</I>. </DD>
-
-<DT><B>-image <I>image</I></B> </DT>
-<DD>Specifies
-the image to be drawn. If <I>image</I> is <I>""</I>, the marker will not be drawn.  The
-default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Line Markers</A></H3>
-A line marker displays one or more connected
-line segments. Line markers are created with marker's <B>create</B> operation in
-the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create line </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to line markers: 
-<DL>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the line. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the line.
- Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the marker line
-will be solid. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background color of the line.  This color
-is used with striped lines (see the <B>-fdashesR option). If <I>color</I></B> is the empty
-string, no background color is drawn (the line will be dashed, not striped).
- The default background color is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width of
-the lines. The default width is <I>0</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the foreground color
-of the line. The default value is <I>black</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies a stipple
-pattern used to draw the line, rather than a solid line. <I>Bitmap</I> specifies
-a bitmap to use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then the line
-is drawn in a solid fashion. The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Polygon Markers</A></H3>
-A polygon
-marker displays a closed region described as two or more connected line
-segments.  It is assumed the first and last points are connected.  Polygon
-markers are created using the marker <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create polygon </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the <B>marker configure</B>
-command to change the marker's configuration. The following options are supported
-for polygon markers: 
-<DL>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of the outline
-of the polygon. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the outline.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the outline will be a solid
-line. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the fill color of the polygon.  If <I>color</I> is <I>""</I>, then
-the interior of the polygon is transparent. The default is <I>white</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the outline of the polygon. If <I>pixels</I> is zero,
- no outline is drawn. The default is <I>0</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the color of the
-outline of the polygon.  If the polygon is stippled (see the <B>-stipple</B> option),
-then this represents the foreground color of the stipple.  The default is
-<I>black</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies that the polygon should be drawn with a
-stippled pattern rather than a solid color. <I>Bitmap</I> specifies a bitmap to
-use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then the polygon is filled
-with a solid color (if the <B>-fill</B> option is set).  The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Text
-Markers</A></H3>
-A text marker displays a string of characters on one or more lines
-of text.  Embedded newlines cause line breaks.  They may be used to annotate
-regions of the graph.  Text markers are created with the <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create text </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs,  each sets a configuration option
-for the text marker.   These same <I>option</I>-<I>value</I> pairs may be used with the
- marker's <B>configure</B> operation.   <P>
-The following options are specific to text
-markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B> </DT>
-<DD><I>Anchor</I> tells how to position the text relative to
-the positioning point for the text. For example, if <I>anchor</I> is <I>center</I> then
-the text is centered on the point; if <I>anchor</I> is <I>n</I> then the text will be
-drawn such that the top center point of the rectangular region occupied
-by the text will be at the positioning point.  This default is <I>center</I>. </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Same as the <B>-fill</B> option. </DD>
-
-<DT><B>-font <I>fontName</I></B> </DT>
-<DD>Specifies the font of the text.
- The default is <I>*-Helvetica-Bold-R-Normal-*-120-*</I>. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background
-color of the text.  If <I>color</I> is the empty string, no background will be
-transparent.  The default background color is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B> </DT>
-<DD>Same as
-the <B>-outline</B> option. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the text should be justified.
- This matters only when the marker contains more than one line of text.
-<I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>
-</DT>
-<DD>Sets the color of the text. The default value is <I>black</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the
-padding to the left and right exteriors of the text. <I>Pad</I> can be a list of
-one or two screen distances.  If <I>pad</I> has two elements, the left side of
-the text is padded by the first distance and the right side by the second.
- If <I>pad</I> has just one distance, both the left and right sides are padded
-evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and below the
-text.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has two
-elements, the area above the text is padded by the first distance and the
-area below by the second. If <I>pad</I> is just one distance, both the top and
-bottom areas are padded evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies
-the number of degrees to rotate the text.  <I>Theta</I> is a real number representing
-the angle of rotation.  The marker is first rotated along its center and
-is then drawn according to its anchor position. The default is <I>0.0</I>. </DD>
-
-<DT><B>-text <I>text</I></B>
-</DT>
-<DD>Specifies the text of the marker.  The exact way the text is displayed may
-be affected by other options such as <B>-anchor</B> or <B>-rotate</B>. </DD>
-</DL>
-
-<H3><A NAME="sect22" HREF="#toc22">Window Markers</A></H3>
-A window
-marker displays a widget at a given position. Window markers are created
-with the marker's <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create window </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-command. <P>
-The following options are specific to window markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the widget relative to the positioning point
-for the widget. For example, if <I>anchor</I> is <I>center</I> then the widget is centered
-on the point; if <I>anchor</I> is <I>n</I> then the widget will be displayed such that
-the top center point of the rectangular region occupied by the widget will
-be at the positioning point.  This option defaults to <I>center</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B>
-</DT>
-<DD>Specifies the height to assign to the marker's window.  If this option isn't
-specified, or if it is specified as <I>""</I>, then the window is given whatever
-height the widget requests internally. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the width
-to assign to the marker's window.  If this option isn't specified, or if it
-is specified as <I>""</I>, then the window is given whatever width the widget
-requests internally. </DD>
-
-<DT><B>-window <I>pathName</I></B> </DT>
-<DD>Specifies the widget to be managed
-by the barchart.  <I>PathName</I> must be a child of the <B>barchart</B> widget. </DD>
-</DL>
-
-<H2><A NAME="sect23" HREF="#toc23">Graph
-Component Bindings</A></H2>
-Specific barchart components, such as elements, markers
-and legend entries, can have a command trigger when event occurs in them,
-much like canvas items in Tk's canvas widget.  Not all event sequences are
-valid.  The only binding events that may be specified are those related
-to the mouse and keyboard (such as <B>Enter</B>, <B>Leave</B>, <B>ButtonPress</B>, <B>Motion</B>, and
-<B>KeyPress</B>). <P>
-Only one element or marker can be picked during an event.  This
-means, that if the mouse is directly over both an element and a marker,
-only the uppermost component is selected.  This isn't true for legend entries.
-  Both a legend entry and an element (or marker) binding commands  will
-be invoked if both items are picked. <P>
-It is possible for multiple bindings
-to match a particular event. This could occur, for example, if one binding
-is associated with the element name and another is associated with one
-of the element's tags (see the <B>-bindtags</B> option).  When this occurs, all of
-the  matching bindings are invoked.  A binding associated with the element
-name is invoked first, followed by one binding for each of the element's
- bindtags.  If there are multiple matching bindings for a single tag,  then
-only the most specific binding is invoked.  A continue command  in a binding
-script terminates that script, and a break command  terminates that script
-and skips any remaining scripts for the event,  just as for the bind command.
-<P>
-The <B>-bindtags</B> option for these components controls addition tag names which
-can be matched.  Implicitly elements and markers always have tags matching
-their names.  Setting the value of the <B>-bindtags</B> option doesn't change this.
-
-<H2><A NAME="sect24" HREF="#toc24">C Language API</A></H2>
-You can manipulate data elements from the C language.  There
-may be situations where it is too expensive to translate the data values
-from ASCII strings.  Or you might want to read data in a special file format.
-<P>
-Data can manipulated from the C language using BLT vectors. You specify
-the X-Y data coordinates of an element as vectors and manipulate the vector
-from C.  The barchart will be redrawn automatically after the vectors are
-updated. <P>
-From Tcl, create the vectors and configure the element to use them.
-<BR>
-<CODE>vector X Y<BR>
-.g element configure line1 -xdata X -ydata Y<BR>
-</CODE><P>To set data points from C, you pass the values as arrays of doubles using
-the <B>Blt_ResetVector</B> call.  The vector is reset with the new data and at
-the next idle point (when Tk re-enters its event loop), the graph will be
-redrawn automatically. <BR>
-<CODE>#include <tcl.h><BR>
-#include <blt.h><BR>
-<P>
-register int i;<BR>
-Blt_Vector *xVec, *yVec;<BR>
-double x[50], y[50];<BR>
-<P>
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */<BR>
-if ((Blt_GetVector(interp, "X", 50, &xVec) != TCL_OK) ||<BR>
-    (Blt_GetVector(interp, "Y", 50, &yVec) != TCL_OK)) {<BR>
-    return TCL_ERROR;<BR>
-}<BR>
-<P>
-for (i = 0; i < 50; i++) {<BR>
-    x[i] = i * 0.02;<BR>
-    y[i] = sin(x[i]);<BR>
-}<tt> </tt> <tt> </tt> <BR>
-<P>
-/* Put the data into BLT vectors */<BR>
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||<BR>
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {<BR>
-   return TCL_ERROR;<BR>
-}<BR>
-</CODE><P>See the <B>vector</B> manual page for more details. 
-<H2><A NAME="sect25" HREF="#toc25">Speed Tips</A></H2>
-There may be cases
-where the bar chart needs to be drawn and updated as quickly as possible.
- If drawing speed becomes a big problem, here are a few tips to speed up
-displays. 
-<UL>
-·<LI>Try to minimize the number of data points.  The more data points
- looked at, the more work the bar chart must do.   </LI>·<LI>If your data is generated
-as floating point values, the time required to convert the data values
-to and from ASCII strings can be significant, especially when there any
-many data points.  You can avoid the redundant string-to-decimal conversions
-using the C API to BLT vectors. </LI>·<LI>Don't stipple or dash the element.  Solid
-bars are much faster. </LI>·<LI>If you update data elements frequently, try turning
-off the widget's <B>-bufferelements</B> option.  When the bar chart is first displayed,
-it draws data elements into an internal pixmap.  The pixmap acts as a cache,
-so that when the bar chart needs to be redrawn again, and the data elements
-or coordinate axes haven't changed, the pixmap is simply copied to the screen.
- This is especially useful when you are using markers to highlight points
-and regions on the bar chart.  But if the bar chart is updated frequently,
-changing either the element data or coordinate axes, the buffering becomes
-redundant. </LI>
-</UL>
-
-<H2><A NAME="sect26" HREF="#toc26">Limitations</A></H2>
-Auto-scale routines do not use requested min/max limits
-as boundaries when the axis is logarithmically scaled.   <P>
-The PostScript
-output generated for polygons with more than 1500 points may exceed the
-limits of some printers (See PostScript Language Reference Manual, page
-568).  The work-around is to break the polygon into separate pieces. 
-<H2><A NAME="sect27" HREF="#toc27">Keywords</A></H2>
-bar
-chart, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Syntax</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Example</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Syntax</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Barchart Operations</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Barchart Components</A></LI>
-<UL>
-<LI><A NAME="toc9" HREF="#sect9">Axis Components</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Crosshairs Component</A></LI>
-</UL>
-<LI><A NAME="toc11" HREF="#sect11">Elements</A></LI>
-<UL>
-<LI><A NAME="toc12" HREF="#sect12">Grid Component</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Legend Component</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">Pen Components</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">PostScript Component</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Marker Components</A></LI>
-<LI><A NAME="toc17" HREF="#sect17">Bitmap Markers</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Image Markers</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Line Markers</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Polygon Markers</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Text Markers</A></LI>
-<LI><A NAME="toc22" HREF="#sect22">Window Markers</A></LI>
-</UL>
-<LI><A NAME="toc23" HREF="#sect23">Graph Component Bindings</A></LI>
-<LI><A NAME="toc24" HREF="#sect24">C Language API</A></LI>
-<LI><A NAME="toc25" HREF="#sect25">Speed Tips</A></LI>
-<LI><A NAME="toc26" HREF="#sect26">Limitations</A></LI>
-<LI><A NAME="toc27" HREF="#sect27">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/beep.html b/blt3.0/html/beep.html
deleted file mode 100644
index a3544c6..0000000
--- a/blt3.0/html/beep.html
+++ /dev/null
@@ -1,41 +0,0 @@
-                   <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>beep(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-beep - ring the bell 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>beep</B> ?<I>percent</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The
-<B>beep</B> command rings the keyboard bell.  <I>Percent</I> is relative to the base volume
-of the keyboard bell and can range from -100 to 100 inclusive. <P>
-If <I>percent</I>
-is nonnegative then the bell volume is: <BR>
-<CODE>base - [(base * <I>percent</I>) / 100] + <I>percent</I><BR>
-</CODE><P>If <I>percent</I> is negative then the bell volume is: <BR>
-<CODE>base + [(base * <I>percent</I>) / 100]<BR>
-</CODE><P>The default <I>percent</I> is 50. 
-<H2><A NAME="sect3" HREF="#toc3">Example</A></H2>
-<BR>
-<CODE>beep<BR>
-
-<H2><A NAME="sect4" HREF="#toc4"></CODE><P>Keywords</A></H2>
-bell, beep <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Example</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/bgexec.html b/blt3.0/html/bgexec.html
deleted file mode 100644
index efceca8..0000000
--- a/blt3.0/html/bgexec.html
+++ /dev/null
@@ -1,271 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>bgexec(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-bgexec - Run programs in the background while
-handling Tk events. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>blt::bgexec <I>varName</I></B> ?<I>option value</I>?... <I>program</I> ?<I>arg</I>?...
-
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-<P>
-The <B>bgexec</B> command executes programs in the background, allowing
-Tk to handle events.  A global Tcl variable <I>varName</I> is set when the program
-has completed. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Tcl's <B>exec</B> command is very useful for gathering
-information from the operating system.  It runs a program and returns the
-output as its  result.  This works well for Tcl-only applications. But for
-Tk applications, a problem occurs when the program takes time to process.
- Let's say we want the get the disk usage of a directory.  We'll use the Unix
-program <I>du</I> to get the summary. <BR>
-<CODE>set out [exec du -s $dir]<BR>
-puts "Disk usage for $dir is $out"<BR>
-</CODE><P>While <I>du</I> is running, scrollbars won't respond.  None of the Tk widgets will
-be redrawn properly.  The <B>send</B> command won't work. And the worst part is that
-the application appears hung up or dead. The problem is that while <B>exec</B>
-is waiting for <I>du</I> to finish, Tk is not able to handle X events. <P>
-The <B>bgexec</B>
-command performs the same functions as <B>exec</B>, but also allows Tk to handle
-events.  You can execute a long-running program and the Tk widgets will behave
-normally.  When the program finishes, its output and the exit status are
-written to Tcl variables.  This makes it easy to monitor and save the output
-of a program. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-Here is the disk usage example again, this time using
-<B>bgexec</B>. The syntax to invoke "du" is exactly the same as the previous example,
-when we used <B>exec</B>. <BR>
-<CODE>global myStatus myOutput<BR>
-blt::bgexec myStatus -output myOutput du -s $dir<BR>
-puts "Disk usage for $dir is $myOutput"<BR>
-</CODE><P>Two global variables, <I>myStatus</I> and <I>myOutput</I>, will be set by <B>bgexec</B> when
-<I>du</I> has completed. <I>MyStatus</I> will contain the program's exit status.  <I>MyOutput</I>,
-specified by the <B>-output</B> option, will store the output of the program. <P>
-You
-can also terminate the program by setting the variable <I>myStatus</I>.  If <I>myStatus</I>
-is set before <I>du</I> has completed, the process is killed. Under Unix, this
-is done sending by a configurable signal (by default it's SIGKILL). Under
-Win32, this is done by calling <B>TerminateProcess</B>. It makes no difference
-what <I>myStatus</I> is set to. <BR>
-<CODE>set myStatus {}<BR>
-</CODE><P>There are several <B>bgexec</B> options to collect different types of information.
-<BR>
-<CODE>global myStatus myOutput myErrs<BR>
-blt::bgexec myStatus -output myOutput -error myErrs du -s $dir<BR>
-</CODE><P>The <B>-error</B> option is similar to <B>-output</B>.  It sets a global variable when the
-program completes.  The variable will contain any data written to stderr
-by the program. <P>
-The <B>-output</B> and <B>-error</B> variables are set only after the program
-completes.  But if the program takes a long time, to run you may want to
-receive its partial output.  You can gather data as it becomes available
-using the <B>-onoutput</B> option.  It specifies a Tcl command prefix.  Whenever
-new data is available, this command is executed, with the data appended
-as an argument to the command. <BR>
-<CODE>proc GetInfo { data } {<BR>
-    puts $data<BR>
-}<BR>
-blt::bgexec myStatus -onoutput GetInfo du -s $dir<BR>
-</CODE><P>When output is available, the procedure <I>GetInfo</I> is called. The <B>-onerror</B> option
-performs a similar function for the stderr data stream. <P>
-Like <B>exec</B>, <B>bgexec</B>
-returns an error if the exit code of the program is not zero.  If you think
-you may get a non-zero exit code, you might want to invoke <B>bgexec</B> from within
-a <B>catch</B>. <BR>
-<CODE>catch { blt::bgexec myStatus -output myOutput du -s $dir }<BR>
-</CODE><P>By default, <B>bgexec</B> will wait for the program to finish. But you can detach
-the program making ampersand (&) the last argument on the command line. <BR>
-<CODE>global myStatus myOutput<BR>
-blt::bgexec myStatus -output myOutput du -s $dir &<BR>
-</CODE><P><B>Bgexec</B> will return immediately and its result will be a list of the spawned
-process ids.  If at some point you need to wait for the program to finish
-up, you can use <B>tkwait</B>.  When the program finishes, the variable <I>myStatus</I>
-will be written to, breaking out the <B>tkwait</B> command. <BR>
-<CODE>global myStatus myOutput<BR>
-blt::bgexec myStatus -output myOutput du -s $dir &<BR>
-<tt> </tt> <tt> </tt> ...<BR>
-tkwait variable myStatus<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Syntax</A></H2>
-The <B>bgexec</B> command takes the following form: <P>
-<B><tt> </tt> <tt> </tt> blt::bgexec <I>varName</I></B>
-?<I>option value</I>?... <I>program</I> ?<I>arg</I>?... <P>
-<I>VarName</I> is the name of a global variable which
-is set when  <I>program</I> has finished executing.  The exit status of will be
-stored in <I>varName</I>.  The exit status is a list of a status token, the process-id
-of the program, the exit code, and a status message.  You can also prematurely
-terminate the program by setting <I>varName</I>.  Under Unix, the program will
-be sent a signal to terminate it (by default the signal is a SIGKILL; see
-the <B>-killsignal</B> option). <P>
-<I>Program</I> is the name of the program to be executed
-and <I>args</I> are any extra arguments for <I>program</I>.  The syntax of <I>program</I> and
-<I>args</I> is the same as the <B>exec</B> command. So you can redirect I/O, execute pipelines,
-etc. (see the <B>exec</B> manual for further information) just like <B>exec</B>.  If the
-last argument is an ampersand (&), the program will be run detached, and
-<B>bgexec</B> will return immediately.  <I>VarName</I> will still be set with the return
-status when <I>program</I> completes. 
-<H2><A NAME="sect6" HREF="#toc6">Options</A></H2>
-<I>Option</I> refers to the switch name always
-beginning with a dash (-). <I>Value</I> is the value of the option.  Option-value
-pairs are terminated either by the program name, or double dashes (--). The
-following options are available for <B>bgexec</B>: 
-<DL>
-
-<DT><B>-decodeerror <I>encodingName</I></B>  </DT>
-<DD><BR>
-Specifies the encoding of the stderr channel. This affects only data returned
-to the Tcl interpreter.  No translation  is done on file redirection. <BR>
-For example if data is to be converted from Unicode for use in Tcl, you
-would use the "unicode" encoding. The default is that no  tranlation is
-performed. </DD>
-
-<DT><B>-decodeoutput <I>encodingName</I></B>  </DT>
-<DD><BR>
-Specifies the encoding of the stdout channels. This affects only data returned
-to the Tcl interpreter.  No translation  is done on file redirection. <BR>
-For example if data is to be converted from Unicode for use in Tcl, you
-would use the "unicode" encoding. The default is that no  tranlation is
-performed. </DD>
-
-<DT><B>-error <I>varName</I></B>  </DT>
-<DD><BR>
-Specifies that a global variable <I>varName</I> is to be set with the contents
-of stderr after the program has completed.  </DD>
-
-<DT><B>-keepnewline <I>boolean</I></B> </DT>
-<DD>Specifies
-that a trailing newline should be retained in the  output. If <I>boolean</I> is
-true, the trailing newline is truncated from the output of the <B>-onoutput</B>
-and <B>-output</B> variables.   The default value is <I>true</I>. </DD>
-
-<DT><B>-killsignal <I>signal</I></B> </DT>
-<DD>Specifies
-the signal to be sent to the program when  terminating. This is available
-only under Unix.  <I>Signal</I> can either be a number (typically 1-32) or a mnemonic
-(such as SIGINT). If <I>signal</I> is the empty string,  then no signal is sent.
- The default signal is <I>9</I> (SIGKILL). </DD>
-
-<DT><B>-lasterror <I>varName</I></B> </DT>
-<DD>Specifies a variable
-<I>varName</I> that is updated whenever data becomes available from standard error
-of the program. <I>VarName</I> is a global variable. Unlike the <B>-error</B> option, data
-is available as soon as it arrives. </DD>
-
-<DT><B>-lastoutput <I>varName</I></B>  </DT>
-<DD>Specifies a variable
-<I>varName</I> that is updated whenever data becomes available from standard output
-of the program. <I>VarName</I> is a global variable. Unlike the <B>-output</B> option, data
-is available as soon as it arrives. </DD>
-
-<DT><B>-linebuffered <I>boolean</I></B> </DT>
-<DD>Specifies that
-updates should be made on a line-by-line basis. Normally when new data is
-available <B>bgexec</B> will set the variable (<B>-lastoutput</B> and <B>-lasterror</B> options)
-or invoke the command (<B>-onoutput</B> and <B>-onerror</B> options) delivering all the
-new data currently available.  If <I>boolean</I> is true, only one line at a time
-will be delivered.  This can be useful when you want to process the output
-on a line-by-line basis.   The default value is <I>false</I>. </DD>
-
-<DT><B>-output <I>varName</I></B> </DT>
-<DD><BR>
-Specifies that a global variable <I>varName</I> is to be set with the output of
-the program, once it has completed.  If this option  is not set, no output
-will be accumulated. </DD>
-
-<DT><B>-onerror <I>command</I></B> </DT>
-<DD>Specifies the start of a Tcl command
-that will be executed whenever new data is available from standard error.
-The data is appended to the command as an extra argument before it is executed.
-</DD>
-
-<DT><B>-onoutput <I>command</I></B>  </DT>
-<DD>Specifies the start of a Tcl command that will be executed
-whenever new data is available from standard output. The data is appended
-to the command as an extra argument before it is executed. </DD>
-
-<DT><B>-update <I>varName</I></B>
- </DT>
-<DD>Deprecated. This option is replaced by <B>-lasterror</B>. </DD>
-
-<DT><B>--</B> </DT>
-<DD>This marks the end of
-the options.  The following argument will be considered the name of a program
-even if it starts with  a dash (<B>-</B>). </DD>
-</DL>
-
-<H2><A NAME="sect7" HREF="#toc7">Preemption</A></H2>
-Because <B>bgexec</B> allows Tk to
-handle events while a program is running, it's possible for an application
-to preempt itself with further user-interactions.  Let's say your application
-has a button that runs the disk usage example.  And while the <I>du</I> program
-is running, the user accidently presses the button again.  A second <B>bgexec</B>
-program will preempt the first.  What this means is that the first program
-can not finish until the second program has completed. <P>
-Care must be taken
-to prevent an application from preempting itself by blocking further user-interactions
-(such as button clicks).  The BLT <B>busy</B> command is very useful for just these
-situations. See the <B>busy</B> manual for details. 
-<H2><A NAME="sect8" HREF="#toc8">Differences with Fileevent</A></H2>
-Since
-Tk 4.0, a subset of <B>bgexec</B> can be also achieved using the <B>fileevent</B> command.
- The steps for running a program in the background are: <P>
-Execute the program
-with the <B>open</B> command (using the "|" syntax) and save the file handle. <BR>
-<CODE>global fileId <BR>
-set fileId [open "|du -s $dir" r]<BR>
-</CODE><P>Next register a Tcl code snippet with <B>fileevent</B> to be run whenever output
-is available on the file handle.  The code snippet will read from the file
-handle and save the output in a variable. <BR>
-<CODE>fileevent fileId readable { <BR>
-    if { [gets $fileId line] < 0 } {<BR>
-<tt> </tt> <tt> </tt> close $fileId<BR>
-<tt> </tt> <tt> </tt> set output $temp<BR>
-<tt> </tt> <tt> </tt> unset fileId temp<BR>
-    } else {<BR>
-<tt> </tt> <tt> </tt> append temp $line<BR>
-    }<BR>
-}<BR>
-<P>
-</CODE><P>The biggest advantage of <B>bgexec</B> is that, unlike <B>fileevent</B>, it requires
-no additional Tcl code to run a program.  It's simpler and less error prone.
- You don't have to worry about non-blocking I/O. It's handled tranparently
-for you. <P>
-<B>Bgexec</B> runs programs that <B>fileevent</B> can not. <B>Fileevent</B> assumes that
-the when stdout is closed the program has completed.  But some programs,
-like the Unix <I>compress</I> program, reopen stdout, fooling <B>fileevent</B> into thinking
-the program has terminated.  In the example above, we assume that the program
-will write and flush its output line-by-line.  However running another program,
-your application may block in the <B>gets</B> command reading a partial line. <P>
-<B>Bgexec</B>
-lets you get back the exit status of the program. It also allows you to
-collect data from both stdout and stderr simultaneously. Finally, since
-data collection is handled in C code, <B>bgexec</B> is faster. You get back to
-the Tk event loop more quickly, making your application seem more responsive.
-
-<H2><A NAME="sect9" HREF="#toc9">See Also</A></H2>
-busy, exec, tkwait 
-<H2><A NAME="sect10" HREF="#toc10">Keywords</A></H2>
-exec, background, busy <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Options</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Preemption</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Differences with Fileevent</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">See Also</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/bitmap.html b/blt3.0/html/bitmap.html
deleted file mode 100644
index d23c738..0000000
--- a/blt3.0/html/bitmap.html
+++ /dev/null
@@ -1,208 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>bitmap(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-bitmap - Define a new bitmap from a Tcl script
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>bitmap define <I>bitmapName data</I></B> ?<I>option value</I>?... <P>
-<B>bitmap compose <I>bitmapName
-text</I></B> ?<I>option value</I>?... <P>
-<B>bitmap exists <I>bitmapName</I></B> <P>
-<B>bitmap source <I>bitmapName</I></B> <P>
-<B>bitmap
-data <I>bitmapName</I></B> <P>
-<B>bitmap height <I>bitmapName</I></B> <P>
-<B>bitmap width <I>bitmapName</I></B> 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The
-<B>bitmap</B> command lets you create new bitmaps directly from your Tcl script.
- The bitmap can be specified as a list of data or a text string which is
-converted into a bitmap.  You can arbitrarily scale or rotate the bitmap
-too. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Bitmaps are commonly used within Tk.  In label and button
-widgets, you display bitmaps them instead of text strings and in the canvas
-and text widgets, they're used for stippling.  But Tk let's you can create
-new bitmaps only by reading the bitmap data from a file.  This makes bitmaps
-cumbersome to manage, especially in packaging the program as a <B>wish</B> script,
-since each bitmap must be its own file.  It would be nicer if you could
-create new bitmaps directly from your Tcl script. <P>
-The <B>bitmap</B> command lets
-you do just that.  You can specify the bitmap as in various formats (such
-as the X11 bitmap format).  You can also compose a bitmap from a text string.
- The <B>bitmap</B> command also lets you and arbitrarily rotate or scale the bitmap.
- For example, you could use this to create button widgets with the text
-label rotated 90 degrees. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-<<<<<<< bitmap.mann You can define a new bitmap
-with the <B>define</B> operation.  For example, let's say you are using the X11
-bitmap "gray1".  Normally to use it, you would specify the location of the
-file. <BR>
-<CODE>label .l -bitmap @/usr/X11R6/include/X11/bitmaps/gray1<BR>
-</CODE><P>But you can simply cut and paste the contents of "gray1" into the  <B>bitmap</B>
-command. <BR>
-<CODE>bitmap define gray1 {<BR>
-    #define gray1_width 2<BR>
-    #define gray1_height 2<BR>
-    static char gray1_bits[] = {<BR>
-       0x01, 0x02};<BR>
-}<BR>
-label .l -bitmap gray1<BR>
-</CODE><P>Tk will recognize "gray1" as a bitmap which can now be used with any widget
-that accepts bitmaps. <BR>
-<CODE></CODE><P>The bitmap data can be specified in a mulitude of forms. The following commands
-are all equivalent. <BR>
-<CODE>bitmap define gray1 {<BR>
-    #define gray1_width 2<BR>
-    #define gray1_height 2<BR>
-    static char gray1_bits[] = {<BR>
-       0x01, 0x02};<BR>
-}<BR>
-bitmap define gray1 { { 2 2 } { 0x01, 0x02 } }<BR>
-bitmap define gray1 { { 2 2 } { 0x01 0x02 } }<BR>
-bitmap define gray1 { { 2 2 } { 1 2 } }<BR>
-</CODE><P>Either the data is in the standard X11 bitmap form, or it's a list of two
-lists. The first list contains the height and width of the bitmap. The second
-list is the bitmap source data.  Each element of that list is an hexadecimal
-number specifying which pixels are <A HREF="foreground.1.html">foreground (1)</A>
- and which are background
-(0) of the bitmap.  Note that the format of the source data is exactly that
-of the XBM format.  <P>
-You can scale or rotate the bitmap as you create it,
-by using the <B>-scale</B> or<B>-rotate</B> options. <BR>
-<CODE>bitmap define gray1 {<BR>
-    #define gray1_width 2<BR>
-    #define gray1_height 2<BR>
-    static char gray1_bits[] = {<BR>
-       0x01, 0x02};<BR>
-} -scale 2.0 -rotate 90.0<BR>
-</CODE><P>In addition, you can compose bitmaps from text strings.  This makes it easy
-to create rotated buttons or labels.  The text string can have multi-line.
-  <BR>
-<CODE>bitmap compose rot_text "This is rotated\ntext" \<BR>
-<tt> </tt> <tt> </tt> -rotate 90.0 -font fixed<BR>
-</CODE><P>There are also a number of ways to query bitmaps.  This isn't limited to
-bitmaps that you create, but any bitmap. <BR>
-<CODE>bitmap exists rot_text<BR>
-bitmap width rot_text<BR>
-bitmap height rot_text<BR>
-bitmap data rot_text<BR>
-bitmap source rot_text<BR>
-</CODE><P>The <B>exists</B> operation indicates if a bitmap by that name is defined.  You
-can query the dimensions of the bitmap using the <B>width</B> and <B>height</B> operations.
-The <B>data</B> operation returns the list of the data used to create the bitmap.
-  For example, you could query the data of a bitmap and <B>send</B>  it across
-the network to another Tk application. <BR>
-<CODE>set data [bitmap data @/usr/X11R6/include/X11/bitmaps/ghost.xbm]<BR>
-send {wish #2} bitmap define ghost $data<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Operations</A></H2>
-The following operations are available for <B>bitmap</B>: 
-<DL>
-
-<DT><B>bitmap compose
-<I>bitmapName text </I></B>?<I>option value</I>?... </DT>
-<DD>Creates a bitmap <I>bitmapName</I> from the text
-string <I>text</I>. A bitmap <I>bitmapName</I> can not already exist.   The following options
-are available. <blockquote></DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies a font to use when drawing text
-into the bitmap. If this option isn't specified then <I>fontName</I> defaults to
- <I>*-Helvetica-Bold-R-Normal-*-140-*</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the angle of rotation
-of the text in the bitmap. <I>Theta</I> is a real number representing the angle
-in degrees. It defaults to <I>0.0</I> degrees. </DD>
-
-<DT><B>-scale <I>value</I></B> </DT>
-<DD>Specifies the scale of
-the bitmap. <I>Value</I> is a real number representing the scale.  A scale of 1.0
-indicates no scaling is necessary, while 2.0 would double the size of the
-bitmap.  There is no way to specify differents scales for the width and
-height of the bitmap. The default scale is <I>1.0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>bitmap data <I>bitmapName</I></B>  </DT>
-<DD>Returns
-a list of both the dimensions of the bitmap <I>bitmapName</I> and its source data.
-</DD>
-
-<DT><B>bitmap define <I>bitmapName data</I></B> ?<I>option value</I>?... </DT>
-<DD>Associates <I>bitmapName</I> with
-in-memory bitmap data so that <I>bitmapName</I> can be used in later calls to <B>Tk_GetBitmap</B>.
-The <I>bitmapName</I> argument is the name of the bitmap; it must not previously
-have been defined in either a call to Tk_DefineBitmap or <B>bitmap</B>.  The argument
-<I>data</I> describes the bitmap to be created.  It is either the X11 bitmap format
-(a C structure) or a list of two lists: the dimensions and source data.
- The dimensions  are a list of two numbers which are the width and height
-of the bitmap.  The source data is a list of hexadecimal values in a format
-similar to the X11 or X10 bitmap format.  The values may be optionally separated
-by commas and do not need to be prefixed with "0x".  The following options
-are available. <blockquote></DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies how many degrees to rotate the bitmap.
-<I>Theta</I> is a real number representing the angle. The default is <I>0.0</I> degrees.
-</DD>
-
-<DT><B>-scale <I>value</I></B> </DT>
-<DD>Specifies how to scale the bitmap. <I>Value</I> is a real number representing
-the scale.  A scale of 1.0 indicates no scaling is necessary, while 2.0 would
-double the size of the bitmap.  There is no way to specify differents scales
-for the width and height of the bitmap. The default scale is <I>1.0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>bitmap exists
-<I>bitmapName</I></B>  </DT>
-<DD>Returns <I>1</I> if a bitmap <I>bitmapName</I> exists, otherwise <I>0</I>.  </DD>
-
-<DT><B>bitmap
-height <I>bitmapName</I></B>  </DT>
-<DD>Returns the height in pixels of the bitmap <I>bitmapName</I>.
-</DD>
-
-<DT><B>bitmap source <I>bitmapName</I></B>  </DT>
-<DD>Returns the source data of the bitmap <I>bitmapName</I>.
-The source data is a  list of the hexadecimal values.   </DD>
-
-<DT><B>bitmap width <I>bitmapName</I></B>
- </DT>
-<DD>Returns the width in pixels of the bitmap <I>bitmapName</I>. </DD>
-</DL>
-
-<H2><A NAME="sect6" HREF="#toc6">Limitations</A></H2>
-Tk currently
-offers no way of destroying bitmaps.  Once a bitmap is created, it exists
-until the application terminates. 
-<H2><A NAME="sect7" HREF="#toc7">Keywords</A></H2>
-bitmap <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Operations</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Limitations</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/bltdebug.html b/blt3.0/html/bltdebug.html
deleted file mode 100644
index 6ff3953..0000000
--- a/blt3.0/html/bltdebug.html
+++ /dev/null
@@ -1,34 +0,0 @@
-                   <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>bltdebug(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-bltdebug - print Tcl commands before execution 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>bltdebug</B>
-?<I>level</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>bltdebug</B> command is a simple tracing facility for
-Tcl commands. Each command line is printed before it is executed on standard
-error. The output consists of the command line both before and after substitutions
-have occurred.  <I>Level</I> indicates at what level to stop tracing commands. 
-If <I>level</I> is <I>0</I>, no tracing is performed. This is the default.  If no <I>level</I>
-argument is given, the current level is printed. 
-<H2><A NAME="sect3" HREF="#toc3">Keywords</A></H2>
-debug <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/busy.html b/blt3.0/html/busy.html
deleted file mode 100644
index c588faf..0000000
--- a/blt3.0/html/busy.html
+++ /dev/null
@@ -1,218 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>busy(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-busy - Make Tk widgets busy, temporarily blocking
-user interactions. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>busy hold <I>window</I></B> ?<I>option value</I>?... <P>
-<B>busy release
-<I>window</I></B> ?<I>window</I>?... <P>
-<B>busy configure <I>window</I></B> ?<I>option value</I>?... <P>
-<B>busy forget <I>window</I></B>
-?<I>window</I>?... <P>
-<B>busy isbusy </B>?<I>pattern</I>? <P>
-<B>busy names </B>?<I>pattern</I>? <P>
-<B>busy status <I>window</I></B>
- 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-<P>
-The <B>busy</B> command provides a simple means to block keyboard,
-button, and pointer events from Tk widgets, while overriding the widget's
-cursor with a configurable busy cursor. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-<P>
-There are many times
-in applications where you want to temporarily restrict what actions the
-user can take.  For example, an application could have a "run" button that
-when pressed causes some processing to occur.  But while the application
-is busy processing, you probably don't want the the user to be able to click
-the "run" button again.  You may also want restrict the user from other
-tasks such as clicking a "print" button. <P>
-The <B>busy</B> command lets you make
-Tk widgets busy. This means that user interactions such as button clicks,
-moving the mouse, typing at the keyboard, etc. are ignored by the widget.
- You can set a special cursor (like a watch) that overrides the widget's
-normal cursor, providing feedback that the application (widget) is temporarily
-busy. <P>
-When a widget is made busy, the widget and all of its descendents
-will ignore events.  It's easy to make an entire panel of widgets busy. You
-can simply make the toplevel widget (such as ".") busy.  This is easier and
-far much more efficient than recursively traversing the widget hierarchy,
-disabling each widget and re-configuring its cursor. <P>
-Often, the busy command
-can be used instead of Tk's <B>grab</B> command.  Unlike <B>grab</B> which restricts all
-user interactions to one widget, with the busy command you can have more
-than one widget active (for example, a "cancel" dialog and a "help" button).
-
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-You can make several widgets busy by simply making its ancestor
-widget busy using the <B>hold</B> operation. <BR>
-<CODE>frame .top<BR>
-button .top.button; canvas .top.canvas<BR>
-pack .top.button .top.canvas<BR>
-pack .top<BR>
-  . . .<BR>
-busy hold .top<BR>
-update<BR>
-</CODE><P>All the widgets within <I>.top</I> (including <I>.top</I>) are now busy.   Using <B>update</B>
-insures that <B>busy</B> command will take effect before any other user events
-can occur. <P>
-When the application is no longer busy processing, you can allow
-user interactions again by the <B>release</B> operation. <BR>
-<PRE><I><tt> </tt> <tt> </tt> busy release .top </I>
-</PRE>The busy window has a configurable cursor.  You can change the busy cursor
-using the <B>configure</B> operation. <BR>
-<PRE><I><tt> </tt> <tt> </tt> busy configure .top -cursor "watch"</I>
-</PRE>Finally, when you no longer need to the busy window,  invoke the <B>forget</B>
-operation to free any resources it allocated. <BR>
-<PRE><I><tt> </tt> <tt> </tt> busy forget .top </I>
-</PRE>Destroying the widget will also clean up any resources allocated by the
-busy command. <P>
-
-<H2><A NAME="sect5" HREF="#toc5">Operations</A></H2>
-The following operations are available for the <B>busy</B>
-command: 
-<DL>
-
-<DT><B>busy hold <I>window</I></B> ?<I>option value</I>?... </DT>
-<DD>Makes the widget <I>window</I> (and its
-descendants in the Tk window hierarchy) busy.  <I>Window</I> must be a valid path
-name of a Tk widget.  The busy window is mapped the next time idle tasks
-are processed, and the widget and its descendants will be blocked from
-user interactions. All events in the widget window and its descendants are
-ignored.  Normally <B>update</B> should be called immediately afterward to insure
-that the <B>hold</B> operation is in effect <I>before</I> the application starts its
-processing. The following configuration options are valid: <blockquote></DD>
-
-<DT><B>-cursor <I>cursorName</I></B>
-</DT>
-<DD>Specifies the cursor to be displayed when the widget is made busy. <I>CursorName</I>
-can be in any form accepted by <B>Tk_GetCursor</B>. The default cursor is <I>watch</I>.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>busy configure <I>window</I></B> ?<I>option value</I>?... </DT>
-<DD>Queries or modifies the <B>busy</B> command
-configuration options for  <I>window</I>. <I>Window</I> must be the path name of a widget
-previously made busy by the <B>hold</B> operation.  If no options are specified,
-a list describing all of the available options for <I>window</I> (see <B>Tk_ConfigureInfo</B>
-for information on the format of this list) is returned.  If <I>option</I> is specified
-with no <I>value</I>, then the command returns a list describing the one named
-option (this list will be identical to the corresponding sublist of the
-value returned if no <I>option</I> is specified).  If one or more <I>option-value</I> pairs
-are specified, then the command modifies the given widget option(s) to
-have the given value(s); in this case the command returns the empty string.
- <I>Option</I> may have any of the values accepted by the <B>hold</B> operation.   <P>
-Please
-note that the option database is referenced through <I>window</I>.  For example,
-if  the widget <I>.frame</I> is to be made busy, the busy  cursor can be specified
-for it by either <B>option</B> command: <BR>
-<PRE><tt> </tt> <tt> </tt> <I>option add *frame.busyCursor gumby</I>
-<tt> </tt> <tt> </tt> <I>option add *Frame.BusyCursor gumby</I>
-</PRE></DD>
-
-<DT><B>busy forget <I>window</I></B> ?<I>window</I>?... </DT>
-<DD>Releases resources allocated by the busy command
-for <I>window</I>, including the busy window.  User events will again be received
-again  by <I>window</I>.  Resources are also released when <I>window</I> is destroyed.
-<I>Window</I> must be the name of a widget specified  in the <B>hold</B> operation, otherwise
-an error is reported. </DD>
-
-<DT><B>busy isbusy </B>?<I>pattern</I>? </DT>
-<DD>Returns the pathnames of all
-widgets that are currently busy. If a <I>pattern</I> is given, the path names of
-busy widgets  matching <I>pattern</I> are returned. </DD>
-
-<DT><B>busy names </B>?<I>pattern</I>? </DT>
-<DD>Returns
-the pathnames of all widgets that have previously been made busy (i.e. a
-busy window is allocated and associated with the widget).  It makes no difference
-if the window is currently busy or not.  If a <I>pattern</I> is given, the path
-names of busy widgets matching <I>pattern</I> are returned. </DD>
-
-<DT><B>busy release <I>window</I></B>
-?<I>window</I>?... </DT>
-<DD>Restores user interactions to the widget <I>window</I> again.  This differs
-from the <B>forget</B> operation in that the busy window  is not destroyed, but
-simply unmapped.   <I>Window</I> must be the name of a widget specified  in a <B>hold</B>
-operation, otherwise an error is reported. </DD>
-
-<DT><B>busy status <I>window</I></B> </DT>
-<DD>Returns the
-status of a widget <I>window</I> previously made busy. An error is reported if
-<I>window</I> was never made busy, or the <B>forget</B> operation was invoked (i.e. does
-not currently have a busy window associated with it).  If <I>window</I> is presently
-can not receive user interactions, <I>1</I> is returned, otherwise <I>0</I>. <P>
-</DD>
-</DL>
-
-<H2><A NAME="sect6" HREF="#toc6">Bindings</A></H2>
-The
-event blocking feature is implemented by creating and mapping a transparent
-window that completely covers the widget.  When the busy window is mapped,
-it invisibly shields the widget and its hierarchy from all events that
-may be sent.  Like Tk widgets, busy windows have widget names in the Tk
-window hierarchy.  This means that you can use the <B>bind</B> command, to handle
-events in the busy window. <BR>
-<CODE>busy hold .frame.canvas<BR>
-bind .frame.canvas_Busy <Enter> { ... } <BR>
-<P>
-</CODE><P>Normally the busy window is a sibling of the widget.  The name of the busy
-window is "<I>widget<I>_Busy</I></I>" where <I>widget</I> is the name of the widget to be made
-busy.  In the previous example, the pathname of the busy window is "<I>.frame.canvas_Busy</I>"
-The exception is when the widget is a toplevel widget (such as ".")  where
-the busy window can't be made a sibling.  The busy window is then a child
-of the widget named "<I>widget<I>._Busy</I></I>" where <I>widget</I> is the name of the toplevel
-widget.  In the following example, the pathname of the busy window is "<I>._Busy</I>"
-<BR>
-<CODE>busy hold .<BR>
-bind ._Busy <Enter> { ... } <BR>
-
-<H2><A NAME="sect7" HREF="#toc7"></CODE><P>Enter/Leave Events</A></H2>
-Mapping and unmapping busy windows generates Enter/Leave
-events for all widgets they cover.  Please note this if you are tracking
-Enter/Leave events in widgets. 
-<H2><A NAME="sect8" HREF="#toc8">Keyboard Events</A></H2>
-When a widget is made busy,
-the widget is prevented from gaining the keyboard focus by the busy window.
-But if the widget already had focus, it still may received keyboard events.
- To prevent this, you must move focus to another window. <BR>
-<CODE>busy hold .frame<BR>
-label .dummy<BR>
-focus .dummy<BR>
-update<BR>
-</CODE><P>The above example moves the focus from .frame immediately after invoking
-the <B>hold</B> so that no keyboard events will be sent to <I>.frame</I> or any of its
-descendants. 
-<H2><A NAME="sect9" HREF="#toc9">Keywords</A></H2>
-busy, keyboard events, pointer events, window, cursor
-<P>
- <P>
- <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Operations</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Bindings</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Enter/Leave Events</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Keyboard Events</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/container.html b/blt3.0/html/container.html
deleted file mode 100644
index 40cb470..0000000
--- a/blt3.0/html/container.html
+++ /dev/null
@@ -1,272 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>container(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-container - Widget to contain a foreign window.
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>container</B> <I>pathName </I>?<I>options</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>container</B> widget lets
-you embed an X11 window from a foreign application into your Tk application.
- The foreign window is reparented inside of the widget. You can then place
-and arrange the container just as you would any Tk widget. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Notebooks
-are a popular graphical paradigm.  They allow you to organize many windows
-in a single widget.  For example, you might have an application the displays
-several X-Y graphs at the same time. Typically, you can't pack the graphs
-into the same <B>frame</B> because they are too large.  The other alternative is
-to pack the graphs into several <B>toplevel</B> widgets, allowing them to overlap
-on the screen.  The problem is that all the different toplevel windows clutter
-the screen and are difficult to manage. <P>
-The <B>container</B> widget lets organize
-your application by displaying each graph as a page in a folder of a notebook.
- Only one page is visible at a time. When you click on a tab, the folder
-(graph) corresponding to the tab is displayed in the <B>container</B> widget. 
-The container also lets you temporarily tear pages out of the notebook
-into a separate toplevel widget, and put them back in the container later.
- For example, you could compare two graphs side-by-side by tearing them out,
-and then replace them when you are finished. <P>
-A container may contain an
-unlimited number of folders.  If there are too many tabs to view, you can
-arrange them as multiple tiers or scroll the tabs. The container uses the
-conventional Tk scrollbar syntax, so you can attach a scrollbar too.  
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-You
-create a container widget with the <B>container</B> command. <BR>
-<CODE># Create a new container<BR>
-container .c<BR>
-</CODE><P>A new Tcl command <I>.c</I> is also created.  This command can be used to query
-and modify the container.  For example, to change the default borderwidth,
-you use the new command and the container's <B>configure</B> operation. <BR>
-<CODE># Change the default font.<BR>
-.c configure -borderwidth 2<BR>
-</CODE><P>You can then add folders using the <B>insert</B> operation. <BR>
-<CODE># Create a new folder "f1"<BR>
-.c coinsert 0 "f1"<BR>
-</CODE><P>This inserts the new tab named "f1" into the container.  The index <I>0</I> indicates
-location to insert the new tab.  You can also use the index <I>end</I> to append
-a tab to the end of the container.  By default, the text of the tab is the
-name of the tab.  You can change this by configuring the <B>-text</B> option. <BR>
-<CODE># Change the label of "f1"<BR>
-.ts tab configure "f1" -label "Tab #1" <BR>
-</CODE><P>The <B>insert</B> operation lets you add one or more folders at a time. <BR>
-<CODE>.ts insert end "f2" -label "Tab #2" "f3" "f4" <BR>
-</CODE><P>The tab on each folder contains a label.  A label may display both an image
-and a text string.  You can reconfigure the tab's attributes (foreground/background
-colors, font, rotation, etc) using the <B>tab configure</B> operation. <BR>
-<CODE># Add an image to the label of "f1"<BR>
-set image [image create photo -file stopsign.gif]<BR>
-.ts tab configure "f1" -image $image<BR>
-.ts tab configure "f2" -rotate 90<BR>
-</CODE><P>Each folder may contain an embedded widget to represent its contents. The
-widget to be embedded must be a child of the container widget.  Using the
-<B>-window</B> option, you specify the name of widget to be embedded.  But don't
-pack the widget, the container takes care of placing and arranging the
-widget for you. <BR>
-<CODE>graph .ts.graph<BR>
-.ts tab configure "f1" -window ".ts.graph" \<BR>
-    -fill both -padx 0.25i -pady 0.25i<BR>
-</CODE><P>The size of the folder is determined the sizes of the Tk widgets embedded
-inside each folder.  The folder will be as wide as the widest widget in
-any folder. The tallest determines the height.  You can use the tab's <B>-pagewidth</B>
-and <B>-pageheight</B> options override this. <P>
-Other options control how the widget
-appears in the folder.  The <B>-fill</B> option says that you wish to have the widget
-stretch to fill the available space in the folder. <BR>
-<CODE>.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i<BR>
-<P>
-</CODE><P>Now when you click the left mouse button on "f1", the graph will be displayed
-in the folder.  It will be automatically hidden when another folder is selected.
- If you click on the right mouse button, the embedded widget will be moved
-into a toplevel widget  of its own.  Clicking again on the right mouse button
-puts it back into  the folder. <P>
-If you want to share a page between two different
-folders, the <B>-command</B> option lets you specify a Tcl command to be invoked
-whenever the folder is selected.  You can reset the <B>-window</B> option for the
-tab whenever it's clicked. <BR>
-<CODE>.ts tab configure "f2" -command { <BR>
-    .ts tab configure "f2" -window ".ts.graph"<BR>
-}<BR>
-.ts tab configure "f1" -command { <BR>
-    .ts tab configure "f1" -window ".ts.graph"<BR>
-}<BR>
-</CODE><P>If you have many folders, you may wish to stack tabs in multiple tiers.
- The container's <B>-tiers</B> option requests a maximum number of tiers.   The default
-is one tier.   <BR>
-<CODE>.ts configure -tiers 2<BR>
-</CODE><P>If the tabs can fit in less tiers, the widget will use that many.   Whenever
-there are more tabs than can be displayed in the maximum number of tiers,
-the container will automatically let you scroll the tabs.  You can even
-attach a scrollbar to the container. <BR>
-<CODE>.ts configure -scrollcommand { .sbar set }  -scrollincrement 20<BR>
-.sbar configure -orient horizontal -command { .ts view }<BR>
-</CODE><P>By default tabs are along the top of the container from left to right. 
- But tabs can be placed on any side of the container using the <B>-side</B> option.
-<BR>
-<CODE># Arrange tabs along the right side of the container. <BR>
-.ts configure -side right -rotate 270<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Syntax</A></H2>
-The <B>container</B> command creates a new window using the <I>pathName</I> argument
-and makes it into a container widget. <BR>
-<CODE><B>container <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>Additional options may be specified on the command line or in the option
-database to configure aspects of the container such as its colors, font,
-text, and relief.  The <B>container</B> command returns its <I>pathName</I> argument. 
-At the time this command is invoked, there must not exist a window named
-<I>pathName</I>, but <I>pathName</I>'s parent must exist. <P>
-When first created, a new container
-contains no tabs.  Tabs are added or deleted using widget operations described
-below. It is not necessary for all the tabs to be displayed in the container
-window at once; commands described below may be used to change the view
-in the window. Containers allow scrolling of tabs using the <B>-scrollcommand</B>
-option.  They also support scanning (see the <B>scan</B> operation). Tabs may be
-arranged along any side of the container window using the <B>-side</B> option. <P>
-The
-size of the container window is determined the number of tiers of tabs
-and the sizes of the Tk widgets embedded inside each folder. The widest
-widget determines the width of the folder. The tallest determines the height.
- If no folders contain an embedded widget, the size is detemined solely
-by the size of the tabs.   <P>
-You can override either dimension with the container's
-<B>-width</B> and <B>-height</B> options. 
-<H2><A NAME="sect6" HREF="#toc6">Container Operations</A></H2>
-All <B>container</B> operations are
-invoked by specifying the widget's pathname, the operation, and any arguments
-that pertain to that operation.  The general form is: <P>
-<BR>
-<CODE><tt> </tt> <tt> </tt> <I>pathName operation </I>?<I>arg arg ...</I>?<BR>
-<P>
-</CODE><P><I>Operation</I> and the <I>arg</I>s determine the exact behavior of the command.  The
-following operations are available for container widgets: 
-<DL>
-
-<DT><I>pathName <B>cget</B></I>
-<I>option</I> </DT>
-<DD>Returns the current value of the configuration option given by <I>option</I>.
-<I>Option</I> may have any of the values accepted by the <B>configure</B> operation described
-below. </DD>
-
-<DT><I>pathName <B>configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the configuration options of the widget. If no <I>option</I> is specified, returns
-a list describing all  the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B>
-for information on the format of this list).  If <I>option</I> is specified with
-no <I>value</I>, then the command returns a list describing the one named option
-(this list will be identical to the corresponding sublist of the value
-returned if no <I>option</I> is specified).  If one or more <I>option-value</I> pairs are
-specified, then the command modifies the given widget option(s) to have
-the given value(s);  in this case the command returns an empty string. <I>Option</I>
-and <I>value</I> are described below: <blockquote></DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the border color of
-the container.   </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the outside edge of the widget.  The <B>-relief</B> option determines how the border
-is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-command <I>pattern</I></B> </DT>
-<DD>Specifies to search for
-a window whose <I>WM_COMMAND</I> property matches the given pattern.  If no windows,
-or more than one window, matches the pattern, an error is generated.  If
-<I>pattern</I> is the empty string, then no command search is performed. The default
-is <I>""</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is
-<I>""</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.  If <I>pixels</I> is
-0, then the height is height the embedded window plus the specified  borderwidth.
-The default is <I>0</I>. </DD>
-
-<DT><B>-highlightbackground  <I>color</I></B> </DT>
-<DD>Sets the color to display in
-the traversal highlight region when the container does not have the input
-focus.   </DD>
-
-<DT><B>-highlightcolor <I>color</I></B> </DT>
-<DD>Sets the color to use for the traversal highlight
-rectangle that is drawn around the widget when it has the input focus. 
-The default is <I>black</I>. </DD>
-
-<DT><B>-highlightthickness <I>pixels</I></B> </DT>
-<DD>Sets the width of the highlight
-rectangle to draw around the outside of  the widget when it has the input
-focus. <I>Pixels</I> is a non-negative  value and may have any of the forms acceptable
-to <B>Tk_GetPixels</B>. If the value is zero, no focus highlight is drawn around
-the widget. The default is <I>2</I>. </DD>
-
-<DT><B>-name <I>pattern</I></B> </DT>
-<DD>Specifies to search for a window
-whose <I>WM_NAME</I> property matches the given pattern.  If no windows, or more
-than one window, matches the pattern, an error is generated.  If <I>pattern</I>
-is the empty string, then no name search is performed. The default is <I>""</I>.
-</DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect for the container widget.  <I>Relief</I>
-specifies how the container should appear relative to widget that it is
-packed into; for example, <I>raised</I> means the container should appear to protrude.
- The default is <I>sunken</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides information used when
-moving the focus from window to window via keyboard traversal (e.g., Tab
-and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window should be skipped
-entirely during keyboard traversal.  <I>1</I> means that the this window should
-always receive the input focus.  An empty value means that the traversal
-scripts decide whether to focus on the window. The default is <I>1</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B>
- </DT>
-<DD>Specifies the requested width of the widget.  If <I>pixels</I> is 0, then the
-width is the width the embedded window and the specified borderwidth.  The
-default is <I>0</I>. </DD>
-
-<DT><B>-window <I>id</I></B> </DT>
-<DD>Specifies the foreign embedded using its X window
-id.   </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>find <B>-command</B></B></I>|<B>-name</B> <I>pattern</I> </DT>
-<DD>Searches for all windows that match
-the given pattern.  If the <B>-command</B> switch is given, all windows whose WWM_COMMAND
-property match <I>pattern</I> are returned in a list.  If the <B>-name</B> switch is given,
-all windows whose WWM_NAME property match <I>pattern</I> are returned in a list.
- The list returned will contains pairs of the window id and the matching
-property. </DD>
-</DL>
-
-<H2><A NAME="sect7" HREF="#toc7">Keywords</A></H2>
-container, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Container Operations</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/cutbuffer.html b/blt3.0/html/cutbuffer.html
deleted file mode 100644
index 9661d80..0000000
--- a/blt3.0/html/cutbuffer.html
+++ /dev/null
@@ -1,57 +0,0 @@
-                   <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>cutbuffer(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-cutbuffer - Manipulate X cut buffer properties 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>cutbuffer<I>
-get ?number?</I></B> <BR>
-<B>cutbuffer<I> rotate ?count?</I></B> <BR>
-<B>cutbuffer<I> set value ?number?</I></B> 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-<P>
-The <B>cutbuffer</B> command allows you
-to read or modify the eight X cut buffer properties. You can also rotate
-the buffers properties. 
-<H2><A NAME="sect3" HREF="#toc3">Operations</A></H2>
-The following operations are available
-for the <B>cutbuffer</B> command: 
-<DL>
-
-<DT><B>cutbuffer get <I>?number?</I></B>  </DT>
-<DD>Returns the value of
-a cutbuffer <I>number</I>.  <I>Number</I> must be a number between 0 and 7.  The default
-is 0.  The cutbuffer is returned exactly, except that NUL bytes are converted
-to '@' characters.  If a cut buffer <I>number</I> does not exist, then <I>""</I> is returned.
-</DD>
-
-<DT><B>cutbuffer rotate <I>?count?</I></B>  </DT>
-<DD>Rotates the cut buffers by <I>count</I>. <I>Count</I> must be
-a number between -7 and 7. The default is 1. </DD>
-
-<DT><B>cutbuffer set <I>value</I></B> ?<I>number</I>?
-  </DT>
-<DD>Sets the cutbuffer <I>number</I> to <I>value</I>.  <I>Number</I> must be a number between 0
-and 7.  The default is 0. </DD>
-</DL>
-
-<H2><A NAME="sect4" HREF="#toc4">Keywords</A></H2>
-cut buffer, property <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Operations</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/dragdrop.html b/blt3.0/html/dragdrop.html
deleted file mode 100644
index 9773d9b..0000000
--- a/blt3.0/html/dragdrop.html
+++ /dev/null
@@ -1,479 +0,0 @@
-                    <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>drag&drop(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-drag&drop - facilities for handling drag&drop data
-transfers 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>drag&drop source </B><BR>
-<B>drag&drop source <I>window </I></B>?<I>options</I>? <BR>
-<B>drag&drop source <I>window <B>handler </B></I></B>?<I>dataType</I>? ?<I>command arg arg...</I>? <P>
-<B>drag&drop target
-</B><BR>
-<B>drag&drop target <I>window <B>handler </B></I></B>?<I>dataType command arg arg...</I>? <P>
-<B>drag&drop target
-<I>window <B>handle <I>dataType</I></B></I></B> ?<I>value</I>? <P>
-<B>drag&drop token <I>window </I></B><P>
-<B>drag&drop drag <I>window
-x y </I></B><BR>
-<B>drag&drop drop <I>window x y </I></B><BR>
-<B>drag&drop active </B><BR>
-<B>drag&drop errors </B>?<I>proc</I>? <BR>
-<B>drag&drop location </B>?<I>x y</I>? <P>
- 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-<P>
-The <B>drag&drop</B> command provides access
-to a set of facilities for managing drag-and-drop data transfers.  Any of
-the usual Tk widgets can be registered to participate in the drag-and-drop
-process.  Widgets registered as a drag&drop <I>source</I> can export data to other
-widgets registered as a drag&drop <I>target</I>.  Note that a particular widget
-can be registered as a source, as a target, or as both. <P>
-The drag-and-drop
-process begins when the user clicks and holds a mouse button in a source
-window; a token window appears with an icon or message to represent the
-data being transferred.  As the user moves the mouse pointer, the token
-window follows along, acting as a movable packet of data. Whenever the mouse
-pointer falls on a valid target window, the border of the token window
-is changed to a raised (active) state.  When the mouse button is released
-over the target window, a Tcl routine is invoked to send the data to the
-desired application, and the target window is asked to "handle" the data.
- If this communication process fails, a rejection symbol (a circle with
-a line through it) is displayed on the token window to indicate failure.
-<P>
-The details of the communication process are fully configurable by the
-application developer.  In the simplest case, the value that is sent to
-the target window is a simple string.  The target window is simply asked
-to "handle" that string value.  In general, the source window can have a
-special "handler" procedure to transfer a particular data type by issuing
-a series of "send" commands.  After this, the target window is again asked
-to "handle" the result. <P>
-Both sources and targets can have a list of "handlers"
-for different data types.  As a token window is dragged from its source
-to various targets, each target is checked to see if it recognizes a handler
-offered by the source.  If it does, it is treated as a valid target. Otherwise,
-it is ignored.  This scheme allows the same source to interact with many
-different kinds of targets.  For example, a source for RGB color samples
-might have "color" and "string" handlers.  This would allow it to communicate
-with "color" targets (sending RGB data) as well as entry widgets (sending
-strings of the form "#rrggbb"). <P>
-This introduction was presented as a brief
-overview of the communication process; further details are presented below:
-
-<DL>
-
-<DT><B>drag&drop source</B>  </DT>
-<DD>Returns a list of path names for widgets registered as
-drag&drop sources.  Returns an empty string if no widgets have been registered.
-</DD>
-
-<DT><B>drag&drop source <I>window </I></B>?<I>options</I>? </DT>
-<DD>Registers a new drag&drop source window
-with the given options, or modifies the options for an existing window:
-<blockquote></DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>buttonBinding</B>
-Class:<tt> </tt> <tt> </tt> <B>ButtonBinding</B>
-Switch:<tt> </tt> <tt> </tt> <B>-button</B> <I>n</I>
-</PRE>
-<DL>
-
-<DT>Specifies the mouse button (integer 1-5) that will invoke the drag&drop </DT>
-<DD>operation
-on the source window.  This causes the following bindings to be added to
-the widget: <P>
-<BR>
-<PRE><I>bind <I>win</I></I> <ButtonPress-<I>n</I>> {drag&drop drag %W %X %Y}
-<I>bind <I>win</I></I> <B<I>n</I>-Motion> {drag&drop drag %W %X %Y}
-<I>bind <I>win</I></I> <ButtonRelease-<I>n</I>> {drag&drop drop %W %X %Y}
-</PRE><P>
-The default value is button 3.  If the value "0" is specified, then no bindings
-are added; this enables the user to establish bindings manually. <P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>packageCommand</B>
-Class:<tt> </tt> <tt> </tt> <B>Command</B>
-Switch:<tt> </tt> <tt> </tt> <B>-packagecmd <I>command</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies a Tcl command used to establish the appearance of the token </DT>
-<DD>window
-at the start of each drag&drop operation.  This command is automatically
-invoked by the <B>drag&drop drag</B> command whenever the token window is about
-to be mapped for a drag operation.  It should update the appearance of the
-token window to represent the data that is being moved. </DD>
-</DL>
-<P>
-The following substitutions
-are made in the <I>command</I> string before it is executed: <blockquote>
-<DL>
-
-<DT><B>%t</B> </DT>
-<DD>Replaced with
-the window path name for the token which represents the data being dragged.
-</DD>
-
-<DT><B>%W</B> </DT>
-<DD>Replaced with the window path name for the drag&drop source. </DD>
-</DL>
-</blockquote>
-<P>
-The return
-value from the package command represents the data being transferred.  If
-the package command returns an empty string, the drag operation is quietly
-aborted.  This can be used to disallow drag&drop operations from certain
-parts of a widget, if the drag position is inappropriate. <P>
-For example, the
-following package routine will select an item from a listbox and configure
-the token window to display the selected string.  It uses the <B>drag&drop location</B>
-command to determine the entry in the listbox that the user has selected
-and it returns this as the data value: <P>
-<BR>
-<PRE><I>proc package_list_item {lbox token} {</I>
-    set xy [drag&drop location]
-    set y  [expr [lindex $xy 1]-[winfo rooty $lbox]]
-    set str [$lbox get [$lbox nearest $y]]
-    $token.value configure -text $str
-    return $str
-}
-</PRE><P>
-The return value is available later when the source and target communicate.
- If the source has a command associated with its data handler, then this
-value is substituted in place of "%v" in the source handler.  Otherwise,
-it is substituted in place of "%v" in the target handler. <P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>rejectBackground</B>
-Class:<tt> </tt> <tt> </tt> <B>Background</B>
-Switch:<tt> </tt> <tt> </tt> <B>-rejectbg <I>color</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies the color used to draw the background of the rejection symbol
-</DT>
-<DD>on the token window.  The rejection symbol (a circle with a line through
-it--the international "no") appears whenever communication fails. </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>rejectForeground</B>
-Class:<tt> </tt> <tt> </tt> <B>Foreground</B>
-Switch:<tt> </tt> <tt> </tt> <B>-rejectfg <I>color</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies the color used to draw the foreground of the rejection symbol
-</DT>
-<DD>on the token window. </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>rejectStipple</B>
-Class:<tt> </tt> <tt> </tt> <B>Stipple</B>
-Switch:<tt> </tt> <tt> </tt> <B>-rejectstipple <I>pattern</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies a stipple pattern used to draw the foreground of the rejection
-</DT>
-<DD>symbol on the token window.  Any of the forms acceptable to Tk_GetBitmap
-can be used. </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>selfTarget</B>
-Class:<tt> </tt> <tt> </tt> <B>SelfTarget</B>
-Switch:<tt> </tt> <tt> </tt> <B>-selftarget <I>boolean</I></B>
-</PRE>
-<DL>
-
-<DT>If the <I>boolean</I> value is true, and if a source widget is also </DT>
-<DD>registered
-as a compatible target, then the source will be able to transmit to itself
-during drag&drop operations.  This is primarily useful for complex sources
-such as a canvas widget, where items may be moved from place to place within
-the same widget.  By default, this option is disabled. </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>send</B>
-Class:<tt> </tt> <tt> </tt> <B>Send</B>
-Switch:<tt> </tt> <tt> </tt> <B>-send <I>list</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies a <I>list</I> of <I>dataTypes</I> enabled for communication.  Only </DT>
-<DD><I>dataTypes</I>
-defined by commands of the form "<B>drag&drop source <I>window <B>handler </B></I></B>?<I>dataType</I>
-?<I>command arg arg...</I>?" are allowed.  This list also determines the priority
-of the various <I>dataTypes</I>. When a token window is over a potential drag&drop
-target, this list is searched from start to finish for a <I>dataType</I> that
-is also recognized by the target.  The first matching <I>dataType</I> found determines
-the value that will be sent if the token is dropped.  If no matching <I>dataType</I>
-is found, then the target is incompatible, and is ignored.  By default,
-this option has the value "all", indicating that all <I>dataTypes</I> should be
-considered in the order that they were defined for the source. </DD>
-</DL>
-<P>
-Note that
-this option makes it easy to control a drag&drop source.  Setting the value
-to an empty string disables the source; setting the value back to "all"
-restores communication. <P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>siteCommand</B>
-Class:<tt> </tt> <tt> </tt> <B>Command</B>
-Switch:<tt> </tt> <tt> </tt> <B>-sitecmd <I>command</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies a Tcl command used to update the appearance of the token window.
-</DT>
-<DD>If specified, this command is automatically invoked by the <B>drag&drop drag</B>
-command whenever the token window is over a compatible drag&drop target.
-</DD>
-</DL>
-<P>
-The following substitutions are made in the <I>command</I> string before it is
-executed: <blockquote>
-<DL>
-
-<DT><B>%s</B> </DT>
-<DD>Replaced with "1" if the token window is over a compatible
-target, and "0" otherwise. </DD>
-
-<DT><B>%t</B> </DT>
-<DD>Replaced with the window path name for the
-token which represents the data being dragged. </DD>
-</DL>
-</blockquote>
-<P>
-Regardless of this command,
-border of the token window will become raised whenever the token is over
-a valid target.  This command can be used to display other visual cues. <P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>tokenAnchor</B>
-Class:<tt> </tt> <tt> </tt> <B>Anchor</B>
-Switch:<tt> </tt> <tt> </tt> <B>-tokenanchor <I>anchor</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies how the token window is positioned relative to the mouse </DT>
-<DD>pointer
-coordinates passed to the <B>drag&drop drag</B> command. Must be one of the values
-n, s, e, w, center, nw, ne, sw or se. For example, "nw" means to position
-the token such that its upper-left corner is at the mouse pointer.  The default
-value is "center". </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>tokenBackground</B>
-Class:<tt> </tt> <tt> </tt> <B>Background</B>
-Switch:<tt> </tt> <tt> </tt> <B>-tokenbg <I>color</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies the color used to draw the background of the token window. </DT>
-<DD></DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>tokenBorderWidth</B>
-Class:<tt> </tt> <tt> </tt> <B>BorderWidth</B>
-Switch:<tt> </tt> <tt> </tt> <B>-tokenborderwidth <I>size</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies the width in pixels of the border around the token window. </DT>
-<DD>This
-border becomes raised to indicate when the token is over a compatible drag&drop
-target site.  The value may have any of the forms acceptable to Tk_GetPixels.
- The default value is "3". </DD>
-</DL>
-<P>
-<BR>
-<PRE>Name:<tt> </tt> <tt> </tt> <B>tokenCursor</B>
-Class:<tt> </tt> <tt> </tt> <B>Cursor</B>
-Switch:<tt> </tt> <tt> </tt> <B>-tokencursor <I>cursor</I></B>
-</PRE>
-<DL>
-
-<DT>Specifies the cursor used when a token window is active.  The value </DT>
-<DD>may
-have any of the forms acceptable to Tk_GetCursor.  The default value is
-"center_ptr". </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>drag&drop source <I>window <B>handler </B></I></B>?<I>dataType</I>? ?<I>command arg arg...</I>?
-</DT>
-<DD>With no extra arguments, this command returns a list of all <I>dataType</I> names
-that have been registered for the source <I>window</I>.  If only the <I>dataType</I> is
-specified, then the <I>dataType</I> is created if necessary, and the command associated
-with the <I>dataType</I> is returned. Otherwise, it concatenates the <I>command</I> and
-any extra <I>arg</I> strings, and registers a new <I>dataType</I> with this command. </DD>
-</DL>
-<P>
-The
-following substitutions are made in the <I>command</I> string before it is executed:
-<blockquote>
-<DL>
-
-<DT><B>%i</B> </DT>
-<DD>Replaced with the name of the interpreter for the target application.
-</DD>
-
-<DT><B>%v</B> </DT>
-<DD>Replaced with the value returned from the "-packagecmd" command. </DD>
-
-<DT><B>%w</B> </DT>
-<DD>Replaced
-with the window path name for the target window. </DD>
-</DL>
-</blockquote>
-<P>
-A typical source handler
-contains one or more "send" commands which transfer data to the remote
-application.  The target window is then asked to handle the new data.  Whatever
-value is returned by the source <I>command</I> handler is automatically substituted
-into the "%v" fields of the target handler. <P>
-This separation between the
-transfer and the handling of the data is important.  It allows the same
-source handler to transfer data for many different targets, and it allows
-each of the targets to handle the incoming data differently.  If an error
-is encountered during the communication process, the rejection symbol is
-posted on the token window to indicate failure. </blockquote>
-<P>
-
-<DL>
-
-<DT><B>drag&drop target</B> </DT>
-<DD>Returns
-a list of path names for widgets registered as drag&drop targets.  Returns
-an empty string if no widgets have been registered. </DD>
-
-<DT><B>drag&drop target <I>window
-<B>handler </B></I></B>?<I>dataType command arg arg...</I>? </DT>
-<DD>Registers a new drag&drop target window
-with a given handler, or modifies the handlers for an existing window. 
-If no <I>dataType</I> is specified, this command returns the current list of recognized
-<I>dataType</I> strings.  Each <I>dataType</I> is a symbolic name representing a form
-of data, and the corresponding <I>command</I> is a Tcl command that specifies
-how the target will make use of the data. This command is invoked indirectly
-after a source has transferred data to a target application. </DD>
-</DL>
-<P>
-The following
-substitutions are made in the <I>command</I> string before it is executed: <blockquote>
-<DL>
-
-<DT><B>%v</B>
-</DT>
-<DD>In the simplest case, the source window does not have a handler command
-for the selected <I>dataType</I>, and this field is replaced with the result from
-the "-packagecmd" command.  When the source does have a handler command,
-the result from the "-packagecmd" command is substituted into its "%v" field,
-and the result from this command is substituted into this field in the
-target command. </DD>
-
-<DT><B>%W</B> </DT>
-<DD>Replaced with the window path name for the target window.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>drag&drop target <I>window </I></B>handle <I>dataType</I> ?<I>value</I>? </DT>
-<DD>Searches for the given <I>dataType</I>
-name among the handlers registered for the target <I>window</I>, and invokes the
-appropriate <I>command</I>. If a <I>value</I> is specified, it is substituted into any
-"%v" fields in the handler command associated with the <I>dataType</I>.  If the
-<I>dataType</I> name is not recognized, this command returns an error. This command
-is invoked automatically by the drag&drop facility when data is being transferred
-from a source to a target. </DD>
-
-<DT><B>drag&drop token <I>window</I></B> </DT>
-<DD>Returns the token window
-associated with a drag&drop source <I>window</I>. The token window is used to represent
-data as it is being dragged from the source to a target.  When a source
-is first established, its token window must be filled with widgets to display
-the source data.  For example, <P>
-<BR>
-<PRE><I>drag&drop source .foo</I>
-set win [drag&drop token .foo]
-label $win.label -text "Data"
-pack $win.label
-</PRE><P>
-
-<DL>
-
-<DT><B>drag&drop drag <I>window x y</I></B> </DT>
-<DD>Marks the start of (or movement during) a drag&drop
-operation.  If the token window is unmapped when this command is invoked,
-then the <B>-packagecmd</B> for the source <I>window</I> is executed.  If this command
-is successful and returns a non-null string, the token window is mapped.
- On subsequent calls, the token window is moved to the new <I>x y</I> location.
- Unless the "<B>-button 0</B>" option is specified for the source, this command
-is automatically bound to <ButtonPress-<I>n</I>> and <B<I>n</I>-Motion> events for "<B>-button
-<I>n</I></B>" of the source widget. </DD>
-
-<DT><B>drag&drop drop <I>window x y</I></B> </DT>
-<DD>Marks the end of a drag&drop
-operation.  If the mouse pointer is over a compatible target window, then
-the appropriate send handler for the first compatible <I>dataType</I> is invoked
-to handle the data transfer. If the data transfer is successful, then the
-token window is unmapped; otherwise, a rejection symbol is drawn on the
-token window, and the window is unmapped after a small delay.  Unless the
-"<B>-button 0</B>" option is specified for the source, this command is automatically
-bound to the <ButtonRelease-<I>n</I>> event for "<B>-button <I>n</I></B>" of the source widget. </DD>
-
-<DT><B>drag&drop
-active</B> </DT>
-<DD>Returns "1" if a drag&drop operation is in progress, and "0" otherwise.
-A drag&drop operation officially starts after the package command has been
-executed successfully, and ends after the send handler has been executed
-(successfully or otherwise). </DD>
-
-<DT><B>drag&drop errors </B>?<I>proc</I>? </DT>
-<DD>Specifies a Tcl <I>proc</I>
-used to handle errors encountered during drag&drop operations.  If a <I>proc</I>
-is not specified, this command returns the current error handler.  By default,
-all errors are sent to the usual <B>tkerror</B> command, and therefore appear
-in a dialog box to the user.  This behavior is quite useful when debugging
-communication protocols, but may not be desirable in a finished application.
- Errors can be suppressed entirely (leaving the rejection symbol as the
-only error indicator) by specifying a null string in place of the <I>proc</I>
-name. </DD>
-
-<DT><B>drag&drop location </B>?<I>x y</I>? </DT>
-<DD>Used to set or query the pointer location
-during a drag&drop operation. The <I>x y</I> arguments specify the current location;
-if these arguments are missing, then the last reported (x,y) location is
-returned as a list with two elements.  This command is issued automatically
-within the <B>drag&drop drag</B> and <B>drag&drop drop</B> commands, to keep track of pointer
-movement. <P>
- </DD>
-</DL>
-
-<H2><A NAME="sect3" HREF="#toc3">Keywords</A></H2>
-drag&drop, send, bind, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/eps.html b/blt3.0/html/eps.html
deleted file mode 100644
index 58d5c70..0000000
--- a/blt3.0/html/eps.html
+++ /dev/null
@@ -1,1231 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>graph(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-eps -  Encapsulated PostScript canvas item. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<I>canvas<B>
-create eps <I>x y </I></B></I>?<I>option value</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>eps</B> canvas item lets you place
-encapulated PostScript (EPS) on a canvas, controlling its size and placement.
- The EPS item is displayed either as a solid rectangle or a preview image.
- The preview image is designated in one of two ways: 1) the EPS file contains
-an ASCII hexidecimal preview, or 2) a Tk photo image.  When the canvas generates
-PostScript output, the EPS will be inserted with the proper translation
-and scaling to match that of the EPS item. So can use the canvas widget
-as a page layout tool. 
-<H2><A NAME="sect3" HREF="#toc3">Example</A></H2>
-Let's say you have for PostScript files of
-four graphs which you want to tile two-by-two on a single page.  Maybe you'd
-like to annotate the graphs by putting a caption at the bottom of each
-graph. <P>
-Normally, you would have to resort to an external tool or write your
-own PostScript program.  The <B>eps</B> canvas item lets you do this through Tk's
-canvas widget.  An <B>eps</B> item displays an image (or rectangle) representing
-the encapsulated PostScript file. It also scales and translates the EPS
-file when the canvas is printed. <P>
- 
-<H2><A NAME="sect4" HREF="#toc4">Syntax</A></H2>
-<BR>
-<P>
-<CODE><I>canvas <B>create eps <I>x y </I></B></I>?<I>option value</I>?...<BR>
-</CODE><P>The <B>eps</B> item creates a new canvas item. <I>Canvas</I> is the name of a <B>canvas</B> widget.
- You must supply the X-Y coordinate of the new eps item.  How the coordinate
-is exactly interpretered is  controlled by the <B>-anchor</B> option (see below).
-<P>
-Additional options may be specified on the command line to configure aspects
-of the eps item such as its color, stipple, and font.  The following <I>option</I>
-and <I>value</I> pairs are valid. 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B> </DT>
-<DD>Tells how to position the EPS item
-relative to its X-Y coordinate. The default is <I>center</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets
-the background color of the EPS rectangle. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the 3-D border around the outside edge of the item.  The <B>-relief</B> option
-determines if the border is to be drawn.  The default is <I>0</I>. </DD>
-
-<DT><B>-file <I>fileName</I></B>
-</DT>
-<DD>Specifies the name of the EPS file.  The first line of an EPS file must
-start with "%!PS" and contain a "EPS" version specification.  The other
-requirement is that there be a "%%BoundingBox:" entry which contains four
-integers representing the lower-left and upper-right coordinates of the area
-bounding the EPS. The default is <I>""</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the font of
-the title. The default is <I>*-Helvetica-Bold-R-Normal-*-18-180-*</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>
-</DT>
-<DD>Specifies the foreground color of the EPS rectangle.  The option matters
-only when the <B>-stipple</B> option is set. The default is <I>white</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B>
-</DT>
-<DD>Specifies the height EPS item.  If <I>pixels</I> is <I>0</I>, then the height is determined
-from the PostScript "BoundingBox:" entry in the EPS file. The default is
-<I>0</I>. </DD>
-
-<DT><B>-image <I>photo</I></B> </DT>
-<DD>Specifies the name of a Tk photo image to be displayed as
-in the item as a preview image.  This option overrides any preview specification
-found in the EPS file. The default is <I>""</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the
-title should be justified.  This matters only when the title contains more
-than one line of text. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default
-is <I>center</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect for the EPS item.  <I>Relief</I>
-specifies how the item should appear relative to canvas;  for example,
-<I>raised</I> means the item should appear to  protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-shadowcolor
-<I>color</I></B> </DT>
-<DD>Specifies the color of the drop shadow used for the title.  The option
-with the <B>-shadowoffset</B> option control how the title's drop shadow appears.
-The default is <I>grey</I>. </DD>
-
-<DT><B>-shadowoffset <I>pixels</I></B> </DT>
-<DD>Specifies the offset of the drop
-shadow from the title's text. If <I>pixels</I> is <I>0</I>, no shadow will be seen. The
-default is <I>0</I>. </DD>
-
-<DT><B>-showimage <I>boolean</I></B> </DT>
-<DD>Indicates whether to display the image preview
-(if one exists),  or a simple rectangle.   The default is <I>yes</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B>
-</DT>
-<DD>Specifies a bitmap to used to stipple the rectangle representing the EPS
-item.  The default is <I>""</I>. </DD>
-
-<DT><B>-title <I>string</I></B> </DT>
-<DD>Sets the title of the EPS item.  If
-<I>string</I> is <I>""</I>, then the title specified by the PostScript "Title:" entry
-is used.  You can set the string a single space to display no title.  The
-default is <I>""</I>. </DD>
-
-<DT><B>-titleanchor <I>anchor</I></B> </DT>
-<DD>Tells how to position the title within
-EPS item. The default is <I>n</I>. </DD>
-
-<DT><B>-titlecolor <I>color</I></B> </DT>
-<DD>Specifies the color of the title.
-  The default is <I>white</I>. </DD>
-
-<DT><B>-titlerotate <I>degrees</I></B> </DT>
-<DD>Sets the rotation of the title.
- <I>Degrees</I> is a real number representing the angle of rotation.   The title
-is first rotated in space and then placed according to  the <B>-titleanchor</B>
-position.  The default rotation is <I>0.0</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the width EPS
-item.  If <I>pixels</I> is <I>0</I>, then the width is determined from the PostScript
-"BoundingBox:" entry in the EPS file. The default is <I>0</I>. <I>5i</I>. </DD>
-</DL>
-
-<H2><A NAME="sect5" HREF="#toc5">Example</A></H2>
-The <B>graph</B>
-command creates a new graph.   <BR>
-<CODE># Create a new graph.  Plotting area is black.<BR>
-graph .g -plotbackground black<BR>
-</CODE><P>A new Tcl command <I>.g</I> is also created.  This command can be used to query
-and modify the graph.  For example, to change the title of the graph to
-"My Plot", you use the new command and the graph's <B>configure</B> operation. <BR>
-<CODE># Change the title.<BR>
-.g configure -title "My Plot"<BR>
-</CODE><P>A graph has several components. To access a particular component you use
-the component's name. For example, to add data elements, you use the new
-command and the <B>element</B> component. <BR>
-<CODE># Create a new element named "line1"<BR>
-.g element create line1 \<BR>
-<tt> </tt> <tt> </tt> -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \<BR>
-<tt> </tt> <tt> </tt> -ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 <BR>
-<tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> 155.85 166.60 175.38 }<BR>
-</CODE><P>The element's X and Y coordinates are specified using lists of numbers. 
-Alternately, BLT vectors could be used to hold the X-Y coordinates. <BR>
-<CODE># Create two vectors and add them to the graph.<BR>
-vector xVec yVec<BR>
-xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }<BR>
-yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 <BR>
-<tt> </tt> <tt> </tt> 166.60 175.38 }<BR>
-.g element create line1 -xdata xVec -ydata yVec<BR>
-</CODE><P>The advantage of using vectors is that when you modify one, the graph is
-automatically redrawn to display the new values. <BR>
-<CODE># Change the X-Y coordinates of the first point.<BR>
-set xVec(0) 0.18<BR>
-set yVec(0) 25.18<BR>
-</CODE><P>An element named <I>line1</I> is now created in <I>.g</I>.  By default, the element's label
-in the legend will be also <I>line1</I>. You can change the label, or specify no
-legend entry, again using the element's <B>configure</B> operation. <BR>
-<CODE># Don't display "line1" in the legend.<BR>
-.g element configure line1 -label ""<BR>
-</CODE><P>You can configure more than just the element's label.  An element has many
-attributes such as symbol type and size, dashed or solid lines, colors,
-line width, etc. <BR>
-<CODE>.g element configure line1 -symbol square -color red \<BR>
-<tt> </tt> <tt> </tt> -dashes { 2 4 2 } -linewidth 2 -pixels 2c<BR>
-</CODE><P>Four coordinate axes are automatically created: <I>x</I>, <I>x2</I>, <I>y</I>, and <I>y2</I>.  And by
-default, elements are mapped onto the axes <I>x</I> and <I>y</I>.  This can be changed
-with the <B>-mapx</B> and <B>-mapy</B> options. <BR>
-<CODE># Map "line1" on the alternate Y-axis "y2".<BR>
-.g element configure line1 -mapy y2<BR>
-</CODE><P>Axes can be configured in many ways too.  For example, you change the scale
-of the Y-axis from linear to log using the <B>axis</B> component. <BR>
-<CODE># Y-axis is log scale.<BR>
-.g axis configure y -logscale yes<BR>
-</CODE><P>One important way axes are used is to zoom in on a particular data region.
- Zooming is done by simply specifying new axis limits using the <B>-min</B> and
-<B>-max</B> configuration options. <BR>
-<CODE>.g axis configure x -min 1.0 -max 1.5<BR>
-.g axis configure y -min 12.0 -max 55.15<BR>
-</CODE><P>To zoom interactively, you link the axis <B>configure</B> operations with some
-user interaction (such as pressing the mouse button), using the <B>bind</B> command.
- To convert between screen and graph coordinates, use the <B>invtransform</B>
-operation. <BR>
-<CODE># Click the button to set a new minimum <BR>
-bind .g <ButtonPress-1> { <BR>
-    %W axis configure x -min [%W axis invtransform x %x]<BR>
-    %W axis configure x -min [%W axis invtransform x %y]<BR>
-}<BR>
-</CODE><P>By default, the limits of the axis are determined from data values. To reset
-back to the default limits, set the <B>-min</B> and <B>-max</B> options to the empty value.
-<BR>
-<CODE># Reset the axes to autoscale again.<BR>
-.g axis configure x -min {} -max {}<BR>
-.g axis configure y -min {} -max {}<BR>
-</CODE><P>By default, the legend is drawn in the right margin.  You can change this
-or any legend configuration options using the <B>legend</B> component. <BR>
-<CODE># Configure the legend font, color, and relief<BR>
-.g legend configure -position left -relief raised \<BR>
-<tt> </tt> <tt> </tt> -font fixed -fg blue<BR>
-</CODE><P>To prevent the legend from being displayed, turn on the <B>-hide</B> option. <BR>
-<CODE># Don't display the legend.<BR>
-.g legend configure -hide yes<BR>
-</CODE><P>The <B>graph</B> widget has simple drawing procedures called markers. They can
-be used to highlight or annotate data in the graph. The types of markers
-available are bitmaps, images, polygons, lines, or windows. Markers can
-be used, for example, to mark or brush points.  In this example, is a text
-marker that labels the data first point.  Markers are created using the
-<B>marker</B> component. <BR>
-<CODE># Create a label for the first data point of "line1".<BR>
-.g marker create text -name first_marker -coords { 0.2 26.18 } \<BR>
-<tt> </tt> <tt> </tt> -text "start" -anchor se -xoffset -10 -yoffset -10<BR>
-</CODE><P>This creates a text marker named <I>first_marker</I>.  It will display the text
-"start" near the coordinates of the first data point.  The <B>-anchor</B>, <B>-xoffset</B>,
-and <B>-yoffset</B> options are used to display the marker above and to the left
-of the data point, so that the data point isn't covered by the marker.  By
-default, markers are drawn last, on top of data.  You can change this with
-the <B>-under</B> option. <BR>
-<CODE># Draw the label before elements are drawn.<BR>
-.g marker configure first_marker -under yes<BR>
-</CODE><P>You can add cross hairs or grid lines using the <B>crosshairs</B> and <B>grid</B> components.
-<BR>
-<CODE># Display both cross hairs and grid lines.<BR>
-.g crosshairs configure -hide no -color red<BR>
-.g grid configure -hide no -dashes { 2 2 }<BR>
-</CODE><P>Finally, to get hardcopy of the graph, use the <B>postscript</B> component. <BR>
-<CODE># Print the graph into file "file.ps"<BR>
-.g postscript output file.ps -maxpect yes -decorations no<BR>
-</CODE><P>This generates a file <I>file.ps</I> containing the encapsulated PostScript of
-the graph.  The option <B>-maxpect</B> says to scale the plot to the size of the
-page.  Turning off the <B>-decorations</B> option denotes that no borders or color
-backgrounds should be drawn (i.e. the background of the margins, legend,
-and plotting area will be white). 
-<H2><A NAME="sect6" HREF="#toc6">Graph Operations</A></H2>
-
-<DL>
-
-<DT><I>pathName <B>axis <I>operation
-</I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>bar <I>elemName </I></B></I>?<I>option value</I>?...
-</DT>
-<DD>Creates a new barchart element <I>elemName</I>.  It's an error if an element <I>elemName</I>
-already exists.   See the manual for <B>barchart</B> for details about what <I>option</I>
-and <I>value</I> pairs are valid. </DD>
-
-<DT><I>pathName <B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>.  <I>Option</I> may be any option described
-below for the <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries
-or modifies the configuration options of the graph.  If <I>option</I> isn't specified,
-a list describing the current options for <I>pathName</I> is returned.  If <I>option</I>
-is specified, but not <I>value</I>, then a list describing <I>option</I> is returned.
-If one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair,
-the option <I>option</I> is set to <I>value</I>. The following options are valid. <blockquote></DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color. This includes the margins and legend, but
-not the plotting area. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border
-around the outside edge of the widget.  The <B>-relief</B> option determines if
-the border is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-bottommargin <I>pixels</I></B> </DT>
-<DD>Specifies
-the size of the margin below the X-coordinate axis.  If <I>pixels</I> is <I>0</I>, the
-size of the margin is selected automatically. The default is <I>0</I>. </DD>
-
-<DT><B>-bufferelements
-<I>boolean</I></B> </DT>
-<DD>Indicates whether an internal pixmap to buffer the display of data
-elements should be used.  If <I>boolean</I> is true, data elements are drawn to
-an internal pixmap.  This option is especially useful when the graph is
-redrawn frequently while the remains data unchanged (for example, moving
-a marker across the plot).  See the <FONT SIZE=-1><B>SPEED TIPS</B></FONT>
-  section. The default is <I>1</I>.
-</DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is <I>crosshair</I>.
-</DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the font of the graph title. The default is <I>*-Helvetica-Bold-R-Normal-*-18-180-*</I>.
-</DD>
-
-<DT><B>-halo <I>pixels</I></B>  </DT>
-<DD>Specifies a maximum distance to consider when searching for
-the closest data point (see the element's <B>closest</B> operation below). Data
-points further than <I>pixels</I> away are ignored.  The default is <I>0.5i</I>. </DD>
-
-<DT><B>-height
-<I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.  The default is <I>4i</I>. </DD>
-
-<DT><B>-invertxy
-<I>boolean</I></B> </DT>
-<DD>Indicates whether the placement X-axis and Y-axis should be inverted.
- If <I>boolean</I> is true, the X and Y axes are swapped.  The default is <I>0</I>. </DD>
-
-<DT><B>-justify
-<I>justify</I></B> </DT>
-<DD>Specifies how the title should be justified.  This matters only
-when the title contains more than one line of text. <I>Justify</I> must be <I>left</I>,
-<I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-leftmargin <I>pixels</I></B> </DT>
-<DD>Sets the size
-of the margin from the left edge of the window to  the Y-coordinate axis.
- If <I>pixels</I> is <I>0</I>, the size is calculated automatically.  The default is <I>0</I>.
-</DD>
-
-<DT><B>-plotbackground <I>color</I></B> </DT>
-<DD>Specifies the background color of the plotting area.
- The default is <I>white</I>. </DD>
-
-<DT><B>-plotborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border
-around the plotting area.  The <B>-plotrelief</B> option determines if a border
-is drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-plotpadx <I>pad</I></B> </DT>
-<DD>Sets the amount of padding to be
-added to the left and right sides of the plotting area.  <I>Pad</I> can be a list
-of one or two screen distances.  If <I>pad</I> has two elements, the left side
-of the plotting area entry is padded by the first distance and the right
-side by the second.  If <I>pad</I> is just one distance, both the left and right
-sides are padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotpady <I>pad</I></B> </DT>
-<DD>Sets the amount
-of padding to be added to the top and bottom of the plotting area.  <I>Pad</I>
-can be a list of one or two screen distances.  If <I>pad</I> has two elements,
-the top of the plotting area is padded by the first distance and the bottom
-by the second.  If <I>pad</I> is just one distance, both the top and bottom are
-padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the plotting area.  <I>Relief</I> specifies how the interior of the plotting
-area should appear relative to rest of the graph; for example, <I>raised</I> means
-the plot should appear to protrude from the graph, relative to the surface
-of the graph.  The default is <I>sunken</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the graph widget.  <I>Relief</I> specifies how the graph should appear relative
-to widget it is packed into; for example, <I>raised</I> means the graph should
-appear to protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-rightmargin <I>pixels</I></B> </DT>
-<DD>Sets the size
-of margin from the plotting area to the right edge of the window.  By default,
-the legend is drawn in this margin.  If <I>pixels</I> is than 1, the margin size
-is selected automatically. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides information used when
-moving the focus from window to window via keyboard traversal (e.g., Tab
-and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window should be skipped
-entirely during keyboard traversal.  <I>1</I> means that the this window should
-always receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window. The default is
-<I>""</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies a tiled background for the widget.  If <I>image</I> isn't
-<I>""</I>, the background is tiled using <I>image</I>. Otherwise, the normal background
-color is drawn (see the <B>-background</B> option).  <I>Image</I> must be an image created
-using the Tk <B>image</B> command.  The default is <I>""</I>. </DD>
-
-<DT><B>-title <I>text</I></B>  </DT>
-<DD>Sets the title
-to <I>text</I>. If <I>text</I> is <I>""</I>, no title will be displayed. </DD>
-
-<DT><B>-topmargin <I>pixels</I></B> </DT>
-<DD>Specifies
-the size of the margin above the x2 axis.  If <I>pixels</I> is <I>0</I>, the margin size
-is calculated automatically. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the requested width
-of the widget.  The default is <I>5i</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>crosshairs <I>operation </I></B></I>?<I>arg</I>? </DT>
-<DD>See
-the  <FONT SIZE=-1><B>CROSSHAIRS COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>element <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See
-the  <FONT SIZE=-1><B>ELEMENT COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>extents <I>item</I></B></I>  </DT>
-<DD>Reports the size
-of a particular items in the graph.  <I>Item</I> must be either <I>leftmargin</I>, <I>rightmargin</I>,
-<I>topmargin</I>, <I>bottommargin</I>, <I>plotwidth</I>, or <I>plotheight</I>. </DD>
-
-<DT><I>pathName <B>grid <I>operation
-</I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>GRID COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>invtransform <I>winX winY</I></B></I>
- </DT>
-<DD>Performs an inverse coordinate transformation, mapping window coordinates
-back to graph coordinates, using the standard X-axis and Y-axis. Returns a
-list of containing the X-Y y graph coordinates. </DD>
-
-<DT><I>pathName <B>inside <I>x y</I></B></I> </DT>
-<DD>Returns
-<I>1</I> is the designated screen coordinate (<I>x</I> and <I>y</I>) is inside the plotting
-area and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>legend <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>LEGEND COMPONENT</B></FONT>
-
- section. </DD>
-
-<DT><I>pathName <B>line<B> operation arg</B></B></I>... </DT>
-<DD>The operation is the same as <B>element</B>.
-</DD>
-
-<DT><I>pathName <B>marker <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>MARKER COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName
-<B>postscript <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>POSTSCRIPT COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName
-<B>snap <I>photoName</I></B></I> </DT>
-<DD>Takes a snapshot of the graph and stores the contents in
-the photo image <I>photoName</I>.  <I>PhotoName</I> is the name of a Tk photo image that
-must already exist. </DD>
-
-<DT><I>pathName <B>transform <I>x y</I></B></I>  </DT>
-<DD>Performs a coordinate transformation,
-mapping graph coordinates to window coordinates, using the standard X-axis
-and Y-axis. Returns a list containing the X-Y screen coordinates. </DD>
-
-<DT><I>pathName
-<B>xaxis <I>operation</I></B></I> ?<I>arg</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <B>x2axis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>yaxis <I>operation</I></B></I>
-?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>y2axis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section.
-</DD>
-</DL>
-
-<H2><A NAME="sect7" HREF="#toc7">Graph Components</A></H2>
-A graph is composed of several components: coordinate axes,
-data elements, legend, grid, cross hairs, postscript, and annotation markers.
-Instead of one big set of configuration options and operations, the graph
-is partitioned, where each component has its own configuration options
-and operations that specifically control that aspect or part of the graph.
- 
-<H3><A NAME="sect8" HREF="#toc8">Axis Components</A></H3>
-Four coordinate axes are automatically created: two X-coordinate
-axes (<I>x</I> and <I>x2</I>) and two Y-coordinate axes (<I>y</I>, and <I>y2</I>).  By default, the axis
-<I>x</I> is located in the bottom margin, <I>y</I> in the left margin, <I>x2</I> in the top
-margin, and <I>y2</I> in the right margin. <P>
-An axis consists of the axis line, title,
-major and minor ticks, and tick labels.  Major ticks are drawn at uniform
-intervals along the axis.  Each tick is labeled with its coordinate value.
- Minor ticks are drawn at uniform intervals within major ticks.   <P>
-The range
-of the axis controls what region of data is plotted. Data points outside
-the minimum and maximum limits of the axis are not plotted.  By default,
-the minimum and maximum limits are determined from the data, but you can
-reset either limit. <P>
-You can create and use several axes. To create an axis,
-invoke the axis component and its create operation. <BR>
-<CODE># Create a new axis called "tempAxis"<BR>
-.g axis create tempAxis<BR>
-</CODE><P>You map data elements to an axis using the element's -mapy and -mapx configuration
-options. They specify the coordinate axes an element is mapped onto. <BR>
-<CODE># Now map the tempAxis data to this axis.<BR>
-.g element create "e1" -xdata $x -ydata $y -mapy tempAxis<BR>
-</CODE><P>While you can create many axes, only four can be displayed simultaneously.
-They are drawn in each of the margins surrounding the plotting area.  The
-axes <I>x</I> and <I>y</I> are drawn in the bottom and left margins. The axes <I>x2</I> and <I>y2</I>
-are drawn in top and right margins. Only <I>x</I> and <I>y</I> are shown by default. Note
-that the axes can have different scales. <P>
-To display a different axis, you
-invoke one of the following components: <B>xaxis</B>, <B>yaxis</B>, <B>x2axis</B>, and <B>y2axis</B>.
-The <B>use</B> operation designates the axis to be drawn in the corresponding
-margin: <B>xaxis</B> in the bottom, <B>yaxis</B> in the left,  <B>x2axis</B> in the top, and
-<B>y2axis</B> in the right. <BR>
-<CODE># Display the axis tempAxis in the left margin.<BR>
-.g yaxis use tempAxis<BR>
-<P>
-</CODE><P>You can configure axes in many ways. The axis scale can be linear or logarithmic.
- The values along the axis can either monotonically increase or decrease.
- If you need custom tick labels, you can specify a Tcl procedure to format
-the label any way you wish.  You can control how ticks are drawn, by changing
-the major tick interval or the number of minor ticks.  You can define non-uniform
-tick intervals, such as for time-series plots. <P>
-
-<DL>
-
-<DT><I>pathName <B>axis <B>cget <I>axisName
-<I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option given by <I>option</I> for <I>axisName</I>.
- <I>Option</I> may be any option described below for the axis <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>axis <B>configure <I>axisName </I></B></B></I>?<I>axisName</I>?... ?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options of <I>axisName</I>. Several axes can be changed.  If <I>option</I>
-isn't specified, a list describing all the current options for <I>axisName</I>
-is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list describing
-<I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are specified,
-then for each pair, the axis option <I>option</I> is set to <I>value</I>.  The following
-options are valid for axes. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B> </DT>
-<DD>Sets the color of the axis and tick
-labels. The default is <I>black</I>. </DD>
-
-<DT><B>-command <I>prefix</I></B> </DT>
-<DD>Specifies a Tcl command to be
-invoked when formatting the axis tick labels. <I>Prefix</I> is a string containing
-the name of a Tcl proc and any extra arguments for the procedure.  This
-command is invoked for each major tick on the axis.  Two additional arguments
-are passed to the procedure: the pathname of the widget and the current
-the numeric value of the tick.  The procedure returns the formatted tick
-label.  If <I>""</I> is returned, no label will appear next to the tick.  You can
-get the standard tick labels again by setting <I>prefix</I> to <I>""</I>.  The default
-is <I>""</I>. <P>
-Please note that this procedure is invoked while the graph is redrawn.
-You may query configuration options.  But do not them, because this can
-have unexpected results. </DD>
-
-<DT><B>-descending <I>boolean</I></B>  </DT>
-<DD>Indicates whether the values
-along the axis are monotonically increasing or decreasing.  If <I>boolean</I> is
-true, the axis values will be decreasing.  The default is <I>0</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the axis is displayed.  </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how
-the axis title should be justified.  This matters only when the axis title
-contains more than one line of text. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.
- The default is <I>center</I>. </DD>
-
-<DT><B>-limits <I>formatStr</I></B> </DT>
-<DD>Specifies a printf-like description
-to format the minimum and maximum limits of the axis.  The limits are displayed
-at the top/bottom or left/right sides of the plotting area.  <I>FormatStr</I> is
-a list of one or two format descriptions.  If one description is supplied,
-both the minimum and maximum limits are formatted in the same way.  If two,
-the first designates the format for the minimum limit, the second for the
-maximum.  If <I>""</I> is given as either description, then  the that limit will
-not be displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width of
-the axis and tick lines.  The default is <I>1</I> pixel. </DD>
-
-<DT><B>-logscale <I>boolean</I></B> </DT>
-<DD>Indicates
-whether the scale of the axis is logarithmic or linear.  If <I>boolean</I> is true,
-the axis is logarithmic.  The default scale is linear. </DD>
-
-<DT><B>-loose <I>boolean</I></B> </DT>
-<DD>Indicates
-whether the limits of the axis should fit the data points tightly, at the
-outermost data points, or loosely, at the outer tick intervals. This is
-relevant only when the axis limit is automatically calculated. If <I>boolean</I>
-is true, the axis range is "loose". The default is <I>0</I>. </DD>
-
-<DT><B>-majorticks <I>majorList</I></B>
-</DT>
-<DD>Specifies where to display major axis ticks.  You can use this option to
-display ticks at non-uniform intervals.  <I>MajorList</I> is a list of axis coordinates
-designating the location of major ticks.  No minor ticks are drawn.  If <I>majorList</I>
-is <I>""</I>,  major ticks will be automatically computed. The default is <I>""</I>. </DD>
-
-<DT><B>-max
-<I>value</I></B> </DT>
-<DD>Sets the maximum limit of <I>axisName</I>.  Any data point greater  than
-<I>value</I> is not displayed.  If <I>value</I> is <I>""</I>,  the maximum limit is calculated
-using the largest data value. The default is <I>""</I>. </DD>
-
-<DT><B>-min <I>value</I></B> </DT>
-<DD>Sets the minimum
-limit of <I>axisName</I>. Any data point less than  <I>value</I> is not displayed.  If
-<I>value</I> is <I>""</I>, the minimum limit is calculated using the smallest data value.
-The default is <I>""</I>. </DD>
-
-<DT><B>-minorticks <I>minorList</I></B> </DT>
-<DD>Specifies where to display minor
-axis ticks.  You can use this option to display minor ticks at non-uniform
-intervals. <I>MinorList</I> is a list of real values, ranging from 0.0 to 1.0, designating
-the placement of a minor tick.  No minor ticks are drawn if the <B>-majortick</B>
-option is also set.  If <I>minorList</I> is <I>""</I>, minor ticks will be automatically
-computed. The default is <I>""</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the how many degrees
-to rotate the axis tick labels. <I>Theta</I> is a real value representing the number
-of degrees to rotate the tick labels.  The default is <I>0.0</I> degrees. </DD>
-
-<DT><B>-showticks
-<I>boolean</I></B> </DT>
-<DD>Indicates whether axis ticks should be drawn. If <I>boolean</I> is true,
-ticks are drawn.  If false, only the axis line is drawn. The default is <I>1</I>.
-</DD>
-
-<DT><B>-stepsize <I>value</I></B> </DT>
-<DD>Specifies the interval between major axis ticks.  If <I>value</I>
-isn't a valid interval (must be less than the axis range),  the request
-is ignored and the step size is automatically calculated. </DD>
-
-<DT><B>-subdivisions <I>number</I></B>
- </DT>
-<DD>Indicates how many minor axis ticks are to be drawn.  For example, if <I>number</I>
-is two, only one minor tick is drawn.  If <I>number</I> is one, no minor ticks
-are displayed.  The default is <I>2</I>. </DD>
-
-<DT><B>-tickfont <I>fontName</I></B>  </DT>
-<DD>Specifies the font for
-axis tick labels. The default is <I>*-Courier-Bold-R-Normal-*-100-*</I>. </DD>
-
-<DT><B>-ticklength <I>pixels</I></B>
-</DT>
-<DD>Sets the length of major and minor ticks (minor ticks are half the length
-of major ticks). If <I>pixels</I> is less than zero, the axis will be inverted
-with ticks drawn pointing towards the plot.  The default is <I>0.1i</I>. </DD>
-
-<DT><B>-title <I>text</I></B>
-</DT>
-<DD>Sets the title of the axis. If <I>text</I> is  <I>""</I>, no axis title will be displayed.
-  </DD>
-
-<DT><B>-titlecolor <I>color</I></B> </DT>
-<DD>Sets the color of the axis title. The default is <I>black</I>.
-</DD>
-
-<DT><B>-titlefont <I>fontName</I></B>  </DT>
-<DD>Specifies the font for axis title. The default is <I>*-Helvetica-Bold-R-Normal-*-14-140-*</I>.
-</DD>
-</DL>
-<P>
-Axis configuration options may be also be set by the <B>option</B> command.  The
-resource class is <I>Axis</I>.  The resource names are the names of the axes (such
-as <I>x</I> or <I>x2</I>). <BR>
-<CODE>option add *Graph.Axis.Color  blue<BR>
-option add *Graph.x.LogScale  true<BR>
-option add *Graph.x2.LogScale false<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>axis <B>create <I>axisName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new axis by the
-name <I>axisName</I>.  No axis by the same name can already exist. <I>Option</I> and <I>value</I>
-are described  in above in the axis <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>axis <B>delete
-</B></B></I>?<I>axisName</I>?... </DT>
-<DD>Deletes the named axes. An axis is not really deleted until it
-is not longer in use, so it's safe to delete axes mapped to elements. </DD>
-
-<DT><I>pathName
-<B>axis invtransform <I>axisName value</I></B></I> </DT>
-<DD>Performs the inverse transformation, changing
-the screen coordinate <I>value</I> to a graph coordinate, mapping the value mapped
-to <I>axisName</I>.  Returns the graph coordinate. </DD>
-
-<DT><I>pathName <B>axis limits <I>axisName</I></B></I>
-</DT>
-<DD>Returns a list of the minimum and maximum limits for <I>axisName</I>.  The order
-of the list is <I>min max</I>. </DD>
-
-<DT><I>pathName <B>axis names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of
-axes matching zero or more patterns.  If no <I>pattern</I> argument is give, the
-names of all axes are returned. </DD>
-
-<DT><I>pathName <B>axis transform <I>axisName value</I></B></I> </DT>
-<DD>Transforms
-the coordinate <I>value</I> to a screen coordinate by mapping the it to <I>axisName</I>.
- Returns the transformed screen coordinate. </DD>
-</DL>
-<P>
-Only four axes can be displayed
-simultaneously.  By default, they are <I>x</I>, <I>y</I>, <I>x2</I>, and <I>y2</I>.  You can swap in
-a different axis with <B>use</B> operation of the special axis components: <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B>. <BR>
-<CODE>.g create axis temp<BR>
-.g create axis time<BR>
-...<BR>
-.g xaxis use temp<BR>
-.g yaxis use time<BR>
-</CODE><P>Only the axes specified for use are displayed on the screen. <P>
-The <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B> components operate on an axis location rather
-than a specific axis like the more general <B>axis</B> component does.  The <B>xaxis</B>
-component manages the X-axis located in the bottom margin (whatever axis
-that happens to be).  Likewise, <B>yaxis</B> uses the Y-axis in the left margin,
-<B>x2axis</B> the top X-axis, and <B>y2axis</B> the right Y-axis. <P>
-They implicitly control
-the axis that is currently using to that location.  By default, <B>xaxis</B> uses
-the <I>x</I> axis, <B>yaxis</B> uses <I>y</I>, <B>x2axis</B> uses <I>x2</I>, and <B>y2axis</B> uses <I>y2</I>.  These components
-can be more convenient to use than always determining what axes are current
-being displayed by the graph. <P>
-The following operations are available for
-axes. They mirror exactly the operations of the <B>axis</B> component.  The <I>axis</I>
-argument must be <B>xaxis</B>, <B>x2axis</B>, <B>yaxis</B>, or <B>y2axis</B>. 
-<DL>
-
-<DT><I>pathName <I>axis <B>cget <I>option</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>configure </B></I></I>?<I>option value</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> invtransform <I>value</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>limits</B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> transform <I>value</I></B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> use </B></I></I>?<I>axisName</I>?
-  </DT>
-<DD>Designates the axis <I>axisName</I> is to be displayed at this location.  <I>AxisName</I>
-can not be already in use at another location.   This command returns the
-name of the axis currently using this location. </DD>
-</DL>
-
-<H3><A NAME="sect9" HREF="#toc9">Crosshairs Component</A></H3>
-Cross
-hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position the
-mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives. This
-means that they can be quickly drawn and erased without redrawing the entire
-graph. <P>
-The following operations are available for cross hairs: 
-<DL>
-
-<DT><I>pathName
-<B>crosshairs cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the cross hairs configuration
-option given by <I>option</I>.  <I>Option</I> may be any option described below for the
-cross hairs <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>crosshairs configure </B></I>?<I>option value</I>?...
-  </DT>
-<DD>Queries or modifies the configuration options of the cross hairs.  If
-<I>option</I> isn't specified, a list describing all the current options for the
-cross hairs is returned.  If <I>option</I> is specified, but not <I>value</I>, then a
-list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I> pairs
-are specified, then for each pair, the cross hairs option <I>option</I> is set
-to <I>value</I>. The following options are available for cross hairs. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>
- </DT>
-<DD>Sets the color of the cross hairs.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the cross hairs. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the cross
-hair lines.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the
-cross hairs will be solid lines. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether cross hairs
-are drawn. If <I>boolean</I> is true, cross hairs are not drawn.  The default is
-<I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Set the width of the cross hair lines.  The default
-is <I>1</I>. </DD>
-
-<DT><B>-position <I>pos</I></B>  </DT>
-<DD>Specifies the screen position where the cross hairs
-intersect. <I>Pos</I> must be in the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window
-coordinates of the intersection. </DD>
-</DL>
-<P>
-Cross hairs configuration options may be
-also be set by the <B>option</B> command.  The resource name and class are <I>crosshairs</I>
-and <I>Crosshairs</I> respectively. <BR>
-<CODE>option add *Graph.Crosshairs.LineWidth 2<BR>
-option add *Graph.Crosshairs.Color     red<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>crosshairs off</B></I> </DT>
-<DD>Turns off the cross hairs.  </DD>
-
-<DT><I>pathName <B>crosshairs
-on</B></I> </DT>
-<DD>Turns on the display of the cross hairs. </DD>
-
-<DT><I>pathName <B>crosshairs toggle</B></I> 
-</DT>
-<DD>Toggles the current state of the cross hairs, alternately mapping and unmapping
-the cross hairs. </DD>
-</DL>
-
-<H3><A NAME="sect10" HREF="#toc10">Element Components</A></H3>
-A data element represents a set of data.
- It contains x and y vectors containing the coordinates of the data points.
- Elements can be displayed with a symbol at each data point and lines connecting
-the points.  Elements also control the appearance of the data, such as the
-symbol type, line width, color etc. <P>
-When new data elements are created,
-they are automatically added to a list of displayed elements.   The display
-list controls what elements are drawn and in what order.   <P>
-The following
-operations are available for elements. 
-<DL>
-
-<DT><I>pathName <B>element activate <I>elemName
-</I></B></I>?<I>index</I>?... </DT>
-<DD>Specifies the data points of element <I>elemName</I> to be drawn using
-active foreground and background colors.  <I>ElemName</I> is the name of the element
-and <I>index</I> is a number representing the index of the data point. If no indices
-are present then all data points become active. </DD>
-
-<DT><I>pathName <B>element cget <I>elemName
-<I>option</I></I></B></I> </DT>
-<DD>Returns the current value of the element configuration option given
-by  <I>option</I>.  <I>Option</I> may be any of the options described below for the element
-<B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>element closest <I>x y</I></B></I> <I>varName</I> ?<I>option value</I>?...
-?<I>elemName</I>?... </DT>
-<DD>Finds the data point closest to the window coordinates <I>x</I> and
-<I>y</I> in the element <I>elemName</I>.  <I>ElemName</I> is the name of an element, that must
-not be hidden.  If no elements are specified, then all visible elements
-are searched.  It returns via the array variable <I>varName</I> the name of the
-closest element, the index of its closest point, and the graph coordinates
-of the point. Returns <I>0</I>, if no data point within the threshold distance
-can be found, otherwise <I>1</I> is returned.  The following <I>option</I>-<I>value</I> pairs
-are available. <blockquote></DD>
-
-<DT><B>-halo <I>pixels</I></B> </DT>
-<DD>Specifies a threshold distance where selected
-data points are ignored. <I>Pixels</I> is a valid screen distance, such as <I>2</I> or
-<I>1.2i</I>. If this option isn't specified, then it defaults to the value of the
-graph's <B>-halo</B> option. </DD>
-
-<DT><B>-interpolate <I>boolean</I></B> </DT>
-<DD>Indicates that both the data points
-and interpolated points along the line segment formed should be considered.
- If <I>boolean</I>  is true, the closest line segment will be selected instead
-of the closest point. If this option isn't specified, <I>boolean</I> defaults  to
-<I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>element configure <I>elemName </I></B></I>?<I>elemName</I>... ?<I>option value</I>?... </DT>
-<DD>Queries
-or modifies the configuration options for elements.  Several elements can
-be modified at the same time. If <I>option</I> isn't specified, a list describing
-all the current options for <I>elemName</I> is returned.  If <I>option</I> is specified,
-but not <I>value</I>, then a list describing the option <I>option</I> is returned.  If
-one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair, the
-element option <I>option</I> is set to <I>value</I>.  The following options are valid
-for elements. <blockquote></DD>
-
-<DT><B>-activepen <I>penName</I></B> </DT>
-<DD>Specifies pen to use to draw active element.
- If <I>penName</I> is <I>""</I>, no active elements will be drawn.  The default is  <I>activeLine</I>.
-</DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color of the traces connecting the data points.  
-</DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of element line. <I>DashList</I> is a list
-of up to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the element line.  Each number must be between 1 and 255.  If
-<I>dashList</I> is <I>""</I>, the lines will be solid. </DD>
-
-<DT><B>-data <I>coordList</I></B> </DT>
-<DD>Specifies the X-Y
-coordinates of the data.  <I>CoordList</I> is a list of numeric expressions representing
-the X-Y coordinate pairs of each data point. </DD>
-
-<DT><B>-fill <I>color</I></B>  </DT>
-<DD>Sets the interior
-color of symbols.  If <I>color</I> is <I>""</I>, then the interior of the symbol is transparent.
- If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the element is
-displayed.  The default is <I>no</I>. </DD>
-
-<DT><B>-label <I>text</I></B> </DT>
-<DD>Sets the element's label in the
-legend.  If <I>text</I> is <I>""</I>, the element will have no entry in the legend. The
-default label is the element's name. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of
-the connecting lines between data points.  If <I>pixels</I> is <I>0</I>, no connecting
-lines will be drawn between symbols.  The default is <I>0</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Selects
-the X-axis to map the element's X-coordinates onto. <I>XAxis</I> must be the name
-of an axis.  The default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Selects the Y-axis to map the element's
-Y-coordinates onto. <I>YAxis</I> must be the name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-offdash
-<I>color</I></B> </DT>
-<DD>Sets the color of the stripes when traces are dashed (see the <B>-dashes</B>
-option).  If <I>color</I> is <I>""</I>, then the "off" pixels will represent gaps instead
-of stripes.  If <I>color</I> is <I>defcolor</I>, then the color will be the same as the
-<B>-color</B> option.  The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>  </DT>
-<DD>Sets the color or
-the outline around each symbol.  If <I>color</I> is <I>""</I>, then no outline is drawn.
-If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outlinewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the outline
-bordering each symbol.  If <I>pixels</I> is <I>0</I>, no outline will be drawn. The default
-is <I>1</I>. </DD>
-
-<DT><B>-pixels <I>pixels</I></B> </DT>
-<DD>Sets the size of symbols.  If <I>pixels</I> is <I>0</I>, no symbols
-will be drawn.  The default is <I>0.125i</I>. </DD>
-
-<DT><B>-scalesymbols <I>boolean</I></B>  </DT>
-<DD>If <I>boolean</I> is
-true, the size of the symbols drawn for <I>elemName</I> will change with scale
-of the X-axis and Y-axis. At the time this option is set, the current ranges
-of the axes are saved as the normalized scales (i.e scale factor is 1.0)
-and the element is drawn at its designated size (see the <B>-pixels</B> option).
- As the scale of the axes change, the symbol will be scaled according to
-the smaller of the X-axis and Y-axis scales.  If <I>boolean</I> is false, the element's
-symbols are drawn at the designated size, regardless of axis scales.  The
-default is <I>0</I>. </DD>
-
-<DT><B>-smooth <I>smooth</I></B>  </DT>
-<DD>Specifies how connecting line segments are
-drawn between data points. <I>Smooth</I> can be either <I>linear</I>, <I>step</I>, <I>natural</I>, or
-<I>quadratic</I>.  If <I>smooth</I> is <I>linear</I>, a single line segment is drawn, connecting
-both data points. When <I>smooth</I> is <I>step</I>, two line segments are drawn. The first
-is a horizontal line segment that steps the next X-coordinate.  The second
-is a vertical line, moving to the next Y-coordinate.  Both <I>natural</I> and <I>quadratic</I>
-generate multiple segments between data points.  If <I>natural</I>, the segments
-are generated using a cubic spline.  If <I>quadratic</I>, a quadratic spline is
-used.  The default is <I>linear</I>. </DD>
-
-<DT><B>-styles <I>styleList</I></B>  </DT>
-<DD>Specifies what pen to use
-based on the range of weights given. <I>StyleList</I> is a list of style specifications.
-Each style specification, in turn, is a list consisting of a pen name,
-and optionally a minimum and maximum range.  Data points whose weight (see
-the <B>-weight</B> option) falls in this range, are drawn with this pen.  If no
-range is specified it defaults to the index of the pen in the list.  Note
-that this affects only symbol attributes. Line attributes, such as line
-width, dashes, etc. are ignored. </DD>
-
-<DT><B>-symbol <I>symbol</I></B>  </DT>
-<DD>Specifies the symbol for
-data points.  <I>Symbol</I> can be either <I>square</I>, <I>circle</I>, <I>diamond</I>, <I>plus</I>, <I>cross</I>,
-<I>splus</I>, <I>scross</I>, <I>triangle</I>, <I>""</I> (where no symbol is drawn), or a bitmap.  Bitmaps
-are specified as "<I>source</I> ?<I>mask</I>?", where <I>source</I> is the name of the bitmap,
-and <I>mask</I> is the bitmap's optional mask.  The default is <I>circle</I>. </DD>
-
-<DT><B>-trace <I>direction</I></B>
- </DT>
-<DD>Indicates whether connecting lines between data points (whose X-coordinate
-values are either increasing or decreasing) are drawn.   <I>Direction</I> must
-be <I>increasing</I>, <I>decreasing</I>, or <I>both</I>.  For example, if <I>direction</I> is <I>increasing</I>,
-connecting lines will be drawn only between those data points where X-coordinate
-values are monotonically increasing.  If <I>direction</I> is <I>both</I>, connecting lines
-will be draw between all data points.  The default is <I>both</I>. </DD>
-
-<DT><B>-weights <I>wVec</I></B>
- </DT>
-<DD>Specifies the weights of the individual data points.  This,  with the list
-pen styles (see the <B>-styles</B> option), controls how data points are drawn.
- <I>WVec</I> is the name of a BLT vector or a list of numeric expressions representing
-the weights for each data point. </DD>
-
-<DT><B>-xdata <I>xVec</I></B>  </DT>
-<DD>Specifies the X-coordinates
-of the data.  <I>XVec</I> is the name of a BLT vector or a list of numeric expressions.
-</DD>
-
-<DT><B>-ydata <I>yVec</I></B>  </DT>
-<DD>Specifies the Y-coordinates of the data.  <I>YVec</I> is the name of
-a BLT vector or a list of numeric expressions. </DD>
-</DL>
-<P>
-Element configuration options
-may also be set by the <B>option</B> command.  The resource class is <I>Element</I>. The
-resource name is the name of the element. <BR>
-<CODE>option add *Graph.Element.symbol line<BR>
-option add *Graph.e1.symbol line<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>element create <I>elemName</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a new element <I>elemName</I>.
- It's an error is an element <I>elemName</I> already exists.  If additional arguments
-are present, they specify options valid for  the element <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>element deactivate <I>elemName</I></B></I> ?<I>elemName</I>?... </DT>
-<DD>Deactivates all the elements
-matching <I>pattern</I>. Elements whose names match any of the patterns given are
-redrawn using their normal colors. </DD>
-
-<DT><I>pathName <B>element delete</B></I> ?<I>elemName</I>?... </DT>
-<DD>Deletes
-all the named elements.  The graph is automatically redrawn. </DD>
-
-<DT><I>pathName <B>element
-exists <I>elemName</I></B></I> </DT>
-<DD>Returns <I>1</I> if an element <I>elemName</I> currently exists and <I>0</I>
-otherwise. </DD>
-
-<DT><I>pathName <B>element names </B></I>?<I>pattern</I>?...   </DT>
-<DD>Returns the elements matching
-one or more pattern.  If no <I>pattern</I> is given, the names of all elements
-is returned. </DD>
-
-<DT><I>pathName <B>element show</B></I> ?<I>nameList</I>?   </DT>
-<DD>Queries or modifies the
-element display list.  The element display list designates the elements
-drawn and in what order. <I>NameList</I> is a list of elements to be displayed
-in the order they are named.  If there is no <I>nameList</I> argument, the current
-display list is returned. </DD>
-
-<DT><I>pathName <B>element type</B></I> <I>elemName</I> </DT>
-<DD>Returns the type
-of <I>elemName</I>.  If the element is a bar element, the commands returns the
-string <I>"bar"</I>, otherwise it returns <I>"line"</I>. </DD>
-</DL>
-
-<H3><A NAME="sect11" HREF="#toc11"></CODE><P>Grid Component</A></H3>
-Grid lines extend
-from the major and minor ticks of each axis horizontally or vertically
-across the plotting area.  The following operations are available for grid
-lines. 
-<DL>
-
-<DT><I>pathName <B>grid cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the grid line
-configuration option given by  <I>option</I>.  <I>Option</I> may be any option described
-below for the grid <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>grid configure</B></I> ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options for grid lines.  If
-<I>option</I> isn't specified, a list describing all the current grid options for
-<I>pathName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list
-describing <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are
-specified, then for each pair, the grid line option <I>option</I> is set to <I>value</I>.
- The following options are valid for grid lines. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color
-of the grid lines.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style
-of the grid lines. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the grid lines.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the grid will be solid lines.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid should be drawn. If <I>boolean</I> is true,
-grid lines are not shown. The default is <I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of grid lines.  The default width is <I>1</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Specifies the X-axis to
-display grid lines.  <I>XAxis</I> must be the name of an axis.  The default is <I>x</I>.
-</DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to display grid lines.  <I>YAxis</I> must be the
-name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-minor <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid
-lines should be drawn for minor ticks.  If <I>boolean</I> is true, the lines will
-appear at minor tick intervals.  The default is <I>1</I>. </DD>
-</DL>
-<P>
-</blockquote>
-
-<H2><A NAME="sect12" HREF="#toc12">Speed Tips</A></H2>
-There may be
-cases where the graph needs to be drawn and updated as quickly as possible.
- If drawing speed becomes a big problem, here are a few tips to speed up
-displays. 
-<UL>
-·<LI>Try to minimize the number of data points.  The more data points
-the looked at, the more work the graph must do. </LI>·<LI>If your data is generated
-as floating point values, the time required to convert the data values
-to and from ASCII strings can be significant, especially when there any
-many data points.  You can avoid the redundant string-to-decimal conversions
-using the C API to BLT vectors. </LI>·<LI>Data elements without symbols are drawn
-faster than with symbols. Set the data element's <B>-symbol</B> option to <I>none</I>.  If
-you need to draw symbols, try using the simple symbols such as <I>splus</I> and
-<I>scross</I>. </LI>·<LI>Don't stipple or dash the element.  Solid lines are much faster. </LI>·<LI>If
-you update data elements frequently, try turning off the widget's <B>-bufferelements</B>
-option.  When the graph is first displayed, it draws data elements into
-an internal pixmap.  The pixmap acts as a cache, so that when the graph
-needs to be redrawn again, and the data elements or coordinate axes haven't
-changed, the pixmap is simply copied to the screen.  This is especially
-useful when you are using markers to highlight points and regions on the
-graph.  But if the graph is updated frequently, changing either the element
-data or coordinate axes, the buffering becomes redundant. </LI>
-</UL>
-
-<H2><A NAME="sect13" HREF="#toc13">Limitations</A></H2>
-Auto-scale
-routines do not use requested min/max limits as boundaries when the axis
-is logarithmically scaled. <P>
-The PostScript output generated for polygons
-with more than 1500 points may exceed the limits of some printers (See
-PostScript Language Reference Manual, page 568).  The work-around is to break
-the polygon into separate pieces. 
-<H2><A NAME="sect14" HREF="#toc14">Future Incompatibility</A></H2>
-The <B>-mapped</B> options
-are obsoleted and will be removed.  You can achieve the same results using
-the <B>-hide</B> option instead. <BR>
-<CODE># Works for now.<BR>
-.g legend configure -mapped no<BR>
-<P>
-# Instead use this.<BR>
-.g legend configure -hide yes    <BR>
-
-<H2><A NAME="sect15" HREF="#toc15"></CODE><P>Keywords</A></H2>
-graph, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Example</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Syntax</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Example</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Graph Operations</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Graph Components</A></LI>
-<UL>
-<LI><A NAME="toc8" HREF="#sect8">Axis Components</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Crosshairs Component</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Element Components</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Grid Component</A></LI>
-</UL>
-<LI><A NAME="toc12" HREF="#sect12">Speed Tips</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Limitations</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">Future Incompatibility</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/graph.html b/blt3.0/html/graph.html
deleted file mode 100644
index 3d40e3a..0000000
--- a/blt3.0/html/graph.html
+++ /dev/null
@@ -1,2311 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>graph(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-graph -  2D graph for plotting X-Y coordinate data.
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>graph<I> <I>pathName </I></I></B>?<I>option value</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>graph</B> command creates
-a graph for plotting two-dimensional data (X-Y coordinates). It has many configurable
-components: coordinate axes, elements, legend, grid lines, cross hairs,
-etc.  They allow you to customize the look and feel of the graph. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The
-<B>graph</B> command creates a new window for plotting two-dimensional data (X-Y
-coordinates).  Data points are plotted in a rectangular area displayed in
-the center of the new window.  This is the <I>plotting area</I>.  The coordinate
-axes are drawn in the margins around the plotting area.  By default, the
-legend is displayed in the right margin.  The title is displayed in top
-margin. <P>
-The <B>graph</B> widget is composed of several components: coordinate axes,
-data elements, legend, grid, cross hairs, pens, postscript, and annotation
-markers. 
-<DL>
-
-<DT><I>axis</I>  </DT>
-<DD>The graph has four standard axes (<I>x</I>, <I>x2</I>, <I>y</I>, and <I>y2</I>), but
-you can create and display any number  of axes.  Axes control what region
-of data is displayed and how the data is scaled. Each axis consists of the
-axis line, title, major and minor ticks, and tick labels.  Tick labels display
-the value at each major tick. </DD>
-
-<DT><I>crosshairs</I>  </DT>
-<DD>Cross hairs are used to position
-the mouse pointer relative to the X and Y coordinate axes. Two perpendicular
-lines, intersecting at the current location of the mouse, extend across
-the plotting area to the coordinate axes. </DD>
-
-<DT><I>element</I>  </DT>
-<DD>An element represents
-a set of data points. Elements can be plotted  with a symbol at each data
-point and lines connecting the points.  The appearance of the element, such
-as its symbol, line width, and  color is configurable. </DD>
-
-<DT><I>grid</I> </DT>
-<DD>Extends the
-major and minor ticks of the X-axis and/or Y-axis across the  plotting area.
- </DD>
-
-<DT><I>legend</I>  </DT>
-<DD>The legend displays the name and symbol of each data element. 
-The legend can be drawn in any margin or in the plotting area. </DD>
-
-<DT><I>marker</I> </DT>
-<DD>Markers
-are used annotate or highlight areas of the graph. For  example, you could
-use a polygon marker to fill an area under a  curve, or a text marker to
-label a particular data point. Markers  come in various forms: text strings,
-bitmaps, connected line  segments, images, polygons, or embedded widgets.
-</DD>
-
-<DT><I>pen</I>  </DT>
-<DD>Pens define attributes (both symbol and line style) for elements. 
-Data elements use pens to specify how they should be drawn.  A data  element
-may use many pens at once.  Here, the particular pen  used for a data point
-is determined from each element's weight  vector (see the element's <B>-weight</B>
-and <B>-style</B> options).   </DD>
-
-<DT><I>postscript</I> </DT>
-<DD>The widget can generate encapsulated PostScript
-output. This component has several options to configure how the PostScript
-is generated. </DD>
-</DL>
-
-<H2><A NAME="sect4" HREF="#toc4">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>graph <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>graph</B> command creates a new window <I>pathName</I> and makes it into a <B>graph</B>
-widget.  At the time this command is invoked, there must not exist a window
-named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options may
-be specified on the command line or in the option database to configure
-aspects of the graph such as its colors and font.  See the <B>configure</B> operation
-below for the exact details about what <I>option</I> and <I>value</I> pairs are valid.
-<P>
-If successful, <B>graph</B> returns the path name of the widget.  It also creates
-a new Tcl command by the same name.  You can use this command to invoke
-various operations that query or modify the graph. The general form is:
-<BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for the graph are described in  the  <FONT SIZE=-1><B>GRAPH OPERATIONS</B></FONT>
-
- section. <P>
-The command can also be used to access components of the graph.
-<BR>
-<P>
-<CODE><I>pathName component operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>The operation, now located after the name of the component, is the function
-to be performed on that component. Each component has its own set of operations
-that manipulate that component.  They will be described below in their own
-sections. 
-<H2><A NAME="sect5" HREF="#toc5">Example</A></H2>
-The <B>graph</B> command creates a new graph.   <BR>
-<CODE># Create a new graph.  Plotting area is black.<BR>
-graph .g -plotbackground black<BR>
-</CODE><P>A new Tcl command <I>.g</I> is also created.  This command can be used to query
-and modify the graph.  For example, to change the title of the graph to
-"My Plot", you use the new command and the graph's <B>configure</B> operation. <BR>
-<CODE># Change the title.<BR>
-.g configure -title "My Plot"<BR>
-</CODE><P>A graph has several components. To access a particular component you use
-the component's name. For example, to add data elements, you use the new
-command and the <B>element</B> component. <BR>
-<CODE># Create a new element named "line1"<BR>
-.g element create line1 \<BR>
-<tt> </tt> <tt> </tt> -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \<BR>
-<tt> </tt> <tt> </tt> -ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 <BR>
-<tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> 155.85 166.60 175.38 }<BR>
-</CODE><P>The element's X-Y coordinates are specified using lists of numbers.  Alternately,
-BLT vectors could be used to hold the X-Y coordinates. <BR>
-<CODE># Create two vectors and add them to the graph.<BR>
-vector xVec yVec<BR>
-xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }<BR>
-yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 <BR>
-<tt> </tt> <tt> </tt> 166.60 175.38 }<BR>
-.g element create line1 -xdata xVec -ydata yVec<BR>
-</CODE><P>The advantage of using vectors is that when you modify one, the graph is
-automatically redrawn to reflect the new values. <BR>
-<CODE># Change the y coordinate of the first point.<BR>
-set yVector(0) 25.18<BR>
-</CODE><P>An element named <I>e1</I> is now created in <I>.b</I>.  It  is automatically added to
-the display list of elements.  You can use this list to control in what
-order elements are displayed. To query or reset the element display list,
-you use the element's  <B>show</B> operation. <BR>
-<CODE># Get the current display list <BR>
-set elemList [.b element show]<BR>
-# Remove the first element so it won't be displayed.<BR>
-.b element show [lrange $elemList 0 end]<BR>
-</CODE><P>The element will be displayed by as many bars as there are data points
-(in this case there are ten).  The bars will be drawn centered at the x-coordinate
-of the data point.  All the bars will have the same attributes (colors,
-stipple, etc).  The width of each bar is by default one unit.  You can change
-this with using the <B>-barwidth</B> option. <BR>
-<CODE># Change the X-Y coordinates of the first point.<BR>
-set xVec(0) 0.18<BR>
-set yVec(0) 25.18<BR>
-</CODE><P>An element named <I>line1</I> is now created in <I>.g</I>.  By default, the element's label
-in the legend will be also <I>line1</I>. You can change the label, or specify no
-legend entry, again using the element's <B>configure</B> operation. <BR>
-<CODE># Don't display "line1" in the legend.<BR>
-.g element configure line1 -label ""<BR>
-</CODE><P>You can configure more than just the element's label.  An element has many
-attributes such as symbol type and size, dashed or solid lines, colors,
-line width, etc. <BR>
-<CODE>.g element configure line1 -symbol square -color red \<BR>
-<tt> </tt> <tt> </tt> -dashes { 2 4 2 } -linewidth 2 -pixels 2c<BR>
-</CODE><P>Four coordinate axes are automatically created: <I>x</I>, <I>x2</I>, <I>y</I>, and <I>y2</I>.  And by
-default, elements are mapped onto the axes <I>x</I> and <I>y</I>.  This can be changed
-with the <B>-mapx</B> and <B>-mapy</B> options. <BR>
-<CODE># Map "line1" on the alternate Y-axis "y2".<BR>
-.g element configure line1 -mapy y2<BR>
-</CODE><P>Axes can be configured in many ways too.  For example, you change the scale
-of the Y-axis from linear to log using the <B>axis</B> component. <BR>
-<CODE># Y-axis is log scale.<BR>
-.g axis configure y -logscale yes<BR>
-</CODE><P>One important way axes are used is to zoom in on a particular data region.
- Zooming is done by simply specifying new axis limits using the <B>-min</B> and
-<B>-max</B> configuration options. <BR>
-<CODE>.g axis configure x -min 1.0 -max 1.5<BR>
-.g axis configure y -min 12.0 -max 55.15<BR>
-</CODE><P>To zoom interactively, you link the <B>axis configure</B> operations with some
-user interaction (such as pressing the mouse button), using the <B>bind</B> command.
- To convert between screen and graph coordinates, use the <B>invtransform</B>
-operation. <BR>
-<CODE># Click the button to set a new minimum <BR>
-bind .g <ButtonPress-1> { <BR>
-    %W axis configure x -min [%W axis invtransform x %x]<BR>
-    %W axis configure x -min [%W axis invtransform x %y]<BR>
-}<BR>
-</CODE><P>By default, the limits of the axis are determined from data values. To reset
-back to the default limits, set the <B>-min</B> and <B>-max</B> options to the empty value.
-<BR>
-<CODE># Reset the axes to autoscale again.<BR>
-.g axis configure x -min {} -max {}<BR>
-.g axis configure y -min {} -max {}<BR>
-</CODE><P>By default, the legend is drawn in the right margin.  You can change this
-or any legend configuration options using the <B>legend</B> component. <BR>
-<CODE># Configure the legend font, color, and relief<BR>
-.g legend configure -position left -relief raised \<BR>
-<tt> </tt> <tt> </tt> -font fixed -fg blue<BR>
-</CODE><P>To prevent the legend from being displayed, turn on the <B>-hide</B> option. <BR>
-<CODE># Don't display the legend.<BR>
-.g legend configure -hide yes<BR>
-</CODE><P>The <B>graph</B> widget has simple drawing procedures called markers. They can
-be used to highlight or annotate data in the graph. The types of markers
-available are bitmaps, images, polygons, lines, or windows. Markers can
-be used, for example, to mark or brush points.  In this example, is a text
-marker that labels the data first point.  Markers are created using the
-<B>marker</B> component. <BR>
-<CODE># Create a label for the first data point of "line1".<BR>
-.g marker create text -name first_marker -coords { 0.2 26.18 } \<BR>
-<tt> </tt> <tt> </tt> -text "start" -anchor se -xoffset -10 -yoffset -10<BR>
-</CODE><P>This creates a text marker named <I>first_marker</I>.  It will display the text
-"start" near the coordinates of the first data point.  The <B>-anchor</B>, <B>-xoffset</B>,
-and <B>-yoffset</B> options are used to display the marker above and to the left
-of the data point, so that the data point isn't covered by the marker.  By
-default, markers are drawn last, on top of data.  You can change this with
-the <B>-under</B> option. <BR>
-<CODE># Draw the label before elements are drawn.<BR>
-.g marker configure first_marker -under yes<BR>
-</CODE><P>You can add cross hairs or grid lines using the <B>crosshairs</B> and <B>grid</B> components.
-<BR>
-<CODE># Display both cross hairs and grid lines.<BR>
-.g crosshairs configure -hide no -color red<BR>
-.g grid configure -hide no -dashes { 2 2 }<BR>
-# Set up a binding to reposition the crosshairs.<BR>
-bind .g <Motion> {<BR>
-    .g crosshairs configure -position @%x,%y<BR>
-}<BR>
-</CODE><P>The crosshairs are repositioned as the mouse pointer is moved in the graph.
- The pointer X-Y coordinates define the center of the crosshairs. <P>
-Finally,
-to get hardcopy of the graph, use the <B>postscript</B> component. <BR>
-<CODE># Print the graph into file "file.ps"<BR>
-.g postscript output file.ps -maxpect yes -decorations no<BR>
-</CODE><P>This generates a file <I>file.ps</I> containing the encapsulated PostScript of
-the graph.  The option <B>-maxpect</B> says to scale the plot to the size of the
-page.  Turning off the <B>-decorations</B> option denotes that no borders or color
-backgrounds should be drawn (i.e. the background of the margins, legend,
-and plotting area will be white). 
-<H2><A NAME="sect6" HREF="#toc6">Graph Operations</A></H2>
-
-<DL>
-
-<DT><I>pathName <B>axis <I>operation
-</I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>bar <I>elemName </I></B></I>?<I>option value</I>?...
-</DT>
-<DD>Creates a new barchart element <I>elemName</I>.  It's an error if an element <I>elemName</I>
-already exists.   See the manual for <B>barchart</B> for details about what <I>option</I>
-and <I>value</I> pairs are valid. </DD>
-
-<DT><I>pathName <B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>.  <I>Option</I> may be any option described
-below for the <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries
-or modifies the configuration options of the graph.  If <I>option</I> isn't specified,
-a list describing the current options for <I>pathName</I> is returned.  If <I>option</I>
-is specified, but not <I>value</I>, then a list describing <I>option</I> is returned.
-If one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair,
-the option <I>option</I> is set to <I>value</I>. The following options are valid. <blockquote></DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color. This includes the margins and legend, but
-not the plotting area. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border
-around the outside edge of the widget.  The <B>-relief</B> option determines if
-the border is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-bottommargin <I>pixels</I></B> </DT>
-<DD>If non-zero,
-overrides the computed size of the margin extending  below the X-coordinate
-axis. If <I>pixels</I> is <I>0</I>, the automatically computed size is used.   The default
-is <I>0</I>. </DD>
-
-<DT><B>-bufferelements <I>boolean</I></B> </DT>
-<DD>Indicates whether an internal pixmap to buffer
-the display of data elements should be used.  If <I>boolean</I> is true, data elements
-are drawn to an internal pixmap.  This option is especially useful when
-the graph is redrawn frequently while the remains data unchanged (for example,
-moving a marker across the plot).  See the <FONT SIZE=-1><B>SPEED TIPS</B></FONT>
-  section. The default
-is <I>1</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is
-<I>crosshair</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the font of the graph title. The default
-is <I>*-Helvetica-Bold-R-Normal-*-18-180-*</I>. </DD>
-
-<DT><B>-halo <I>pixels</I></B>  </DT>
-<DD>Specifies a maximum distance
-to consider when searching for the closest data point (see the element's
-<B>closest</B> operation below). Data points further than <I>pixels</I> away are ignored.
- The default is <I>0.5i</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.
- The default is <I>4i</I>. </DD>
-
-<DT><B>-invertxy <I>boolean</I></B> </DT>
-<DD>Indicates whether the placement X-axis
-and Y-axis should be inverted.  If <I>boolean</I> is true, the X and Y axes are
-swapped.  The default is <I>0</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the title should
-be justified.  This matters only when the title contains more than one line
-of text. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-leftmargin
-<I>pixels</I></B> </DT>
-<DD>If non-zero, overrides the computed size of the margin extending
- from the left edge of the window to the Y-coordinate axis.   If <I>pixels</I> is
-<I>0</I>, the automatically computed size is used.   The default is <I>0</I>. </DD>
-
-<DT><B>-plotbackground
-<I>color</I></B> </DT>
-<DD>Specifies the background color of the plotting area.  The default
-is <I>white</I>. </DD>
-
-<DT><B>-plotborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the plotting area.  The <B>-plotrelief</B> option determines if a border is drawn.
- The default is <I>2</I>. </DD>
-
-<DT><B>-plotpadx <I>pad</I></B> </DT>
-<DD>Sets the amount of padding to be added to
-the left and right sides of the plotting area.  <I>Pad</I> can be a list of one
-or two screen distances.  If <I>pad</I> has two elements, the left side of the
-plotting area entry is padded by the first distance and the right side
-by the second.  If <I>pad</I> is just one distance, both the left and right sides
-are padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotpady <I>pad</I></B> </DT>
-<DD>Sets the amount of padding
-to be added to the top and bottom of the plotting area.  <I>Pad</I> can be a list
-of one or two screen distances.  If <I>pad</I> has two elements, the top of the
-plotting area is padded by the first distance and the bottom by the second.
- If <I>pad</I> is just one distance, both the top and bottom are padded evenly.
- The default is <I>8</I>. </DD>
-
-<DT><B>-plotrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect for the plotting
-area.  <I>Relief</I> specifies how the interior of the plotting area should appear
-relative to rest of the graph; for example, <I>raised</I> means the plot should
-appear to protrude from the graph, relative to the surface of the graph.
- The default is <I>sunken</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect for the graph
-widget.  <I>Relief</I> specifies how the graph should appear relative to widget
-it is packed into; for example, <I>raised</I> means the graph should appear to
-protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-rightmargin <I>pixels</I></B> </DT>
-<DD>If non-zero, overrides
-the computed size of the margin extending  from the plotting area to the
-right edge of the window. By default, the legend is drawn in this margin.
- If <I>pixels</I> is <I>0</I>, the automatically computed size is used.   The default
-is <I>0</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides information used when moving the focus from
-window to window via keyboard traversal (e.g., Tab and Shift-Tab).  If <I>focus</I>
-is <I>0</I>, this means that this window should be skipped entirely during keyboard
-traversal.  <I>1</I> means that the this window should always receive the input
-focus.  An empty value means that the traversal scripts make the decision
-whether to focus on the window. The default is <I>""</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies
-a tiled background for the widget.  If <I>image</I> isn't <I>""</I>, the background is
-tiled using <I>image</I>. Otherwise, the normal background color is drawn (see
-the <B>-background</B> option).  <I>Image</I> must be an image created using the Tk <B>image</B>
-command.  The default is <I>""</I>. </DD>
-
-<DT><B>-title <I>text</I></B>  </DT>
-<DD>Sets the title to <I>text</I>. If <I>text</I> is
-<I>""</I>, no title will be displayed. </DD>
-
-<DT><B>-topmargin <I>pixels</I></B>  </DT>
-<DD>If non-zero, overrides
-the computed size of the margin above the x2 axis.  If <I>pixels</I> is <I>0</I>, the
-automatically computed size is used.  The default is <I>0</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies
-the requested width of the widget.  The default is <I>5i</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>crosshairs
-<I>operation </I></B></I>?<I>arg</I>? </DT>
-<DD>See the  <FONT SIZE=-1><B>CROSSHAIRS COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>element
-<I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>ELEMENT COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>extents <I>item</I></B></I>
- </DT>
-<DD>Returns the size of a particular item in the graph.  <I>Item</I> must be either
-<I>leftmargin</I>, <I>rightmargin</I>, <I>topmargin</I>, <I>bottommargin</I>, <I>plotwidth</I>, or <I>plotheight</I>.
-</DD>
-
-<DT><I>pathName <B>grid <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>GRID COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName
-<B>invtransform <I>winX winY</I></B></I>  </DT>
-<DD>Performs an inverse coordinate transformation,
-mapping window coordinates back to graph coordinates, using the standard
-X-axis and Y-axis. Returns a list of containing the X-Y graph coordinates. </DD>
-
-<DT><I>pathName
-<B>inside <I>x y</I></B></I> </DT>
-<DD>Returns <I>1</I> is the designated screen coordinate (<I>x</I> and <I>y</I>) is inside
-the plotting area and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>legend <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the
- <FONT SIZE=-1><B>LEGEND COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>line<B> operation arg</B></B></I>... </DT>
-<DD>The operation is
-the same as <B>element</B>. </DD>
-
-<DT><I>pathName <B>marker <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>MARKER COMPONENTS</B></FONT>
-
- section. </DD>
-
-<DT><I>pathName</I> <B>metafile</B> ?<I>fileName</I>? </DT>
-<DD><I>This operation is for Window platforms
-only</I>.   Creates a Windows enhanced metafile of the graph. If present, <I>fileName</I>
-is the file name of the new metafile. Otherwise, the metafile is automatically
-added to the clipboard. </DD>
-
-<DT><I>pathName <B>postscript <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>POSTSCRIPT
-COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>snap <I>photoName</I></B></I> </DT>
-<DD>Takes a snapshot of the graph
-and stores the contents in the photo image <I>photoName</I>.  <I>PhotoName</I> is the
-name of a Tk photo image that must already exist. </DD>
-
-<DT><I>pathName <B>transform <I>x y</I></B></I>
- </DT>
-<DD>Performs a coordinate transformation, mapping graph coordinates to window
-coordinates, using the standard X-axis and Y-axis. Returns a list containing
-the X-Y screen coordinates. </DD>
-
-<DT><I>pathName <B>xaxis <I>operation</I></B></I> ?<I>arg</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <B>x2axis
-<I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>yaxis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>y2axis <I>operation</I></B></I>
-?<I>arg</I>?...  </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-</DL>
-
-<H2><A NAME="sect7" HREF="#toc7">Graph Components</A></H2>
-A graph is composed
-of several components: coordinate axes, data elements, legend, grid, cross
-hairs, postscript, and annotation markers. Instead of one big set of configuration
-options and operations, the graph is partitioned, where each component
-has its own configuration options and operations that specifically control
-that aspect or part of the graph.  
-<H3><A NAME="sect8" HREF="#toc8">Axis Components</A></H3>
-Four coordinate axes are
-automatically created: two X-coordinate axes (<I>x</I> and <I>x2</I>) and two Y-coordinate
-axes (<I>y</I>, and <I>y2</I>).  By default, the axis <I>x</I> is located in the bottom margin,
-<I>y</I> in the left margin, <I>x2</I> in the top margin, and <I>y2</I> in the right margin.
-<P>
-An axis consists of the axis line, title, major and minor ticks, and tick
-labels.  Major ticks are drawn at uniform intervals along the axis.  Each
-tick is labeled with its coordinate value.  Minor ticks are drawn at uniform
-intervals within major ticks.   <P>
-The range of the axis controls what region
-of data is plotted. Data points outside the minimum and maximum limits of
-the axis are not plotted.  By default, the minimum and maximum limits are
-determined from the data, but you can reset either limit. <P>
-You can have several
-axes. To create an axis, invoke the axis component and its create operation.
-<BR>
-<CODE># Create a new axis called "tempAxis"<BR>
-.g axis create tempAxis<BR>
-</CODE><P>You map data elements to an axis using the element's -mapy and -mapx configuration
-options. They specify the coordinate axes an element is mapped onto. <BR>
-<CODE># Now map the tempAxis data to this axis.<BR>
-.g element create "e1" -xdata $x -ydata $y -mapy tempAxis<BR>
-</CODE><P>Any number of axes can be displayed simultaneously. They are drawn in the
-margins surrounding the plotting area.  The default axes <I>x</I> and <I>y</I> are drawn
-in the bottom and left margins. The axes <I>x2</I> and <I>y2</I> are drawn in top and
-right margins.  By default, only <I>x</I> and <I>y</I> are shown. Note that the axes can
-have different scales. <P>
-To display a different axis or more than one axis,
-you invoke one of the following components: <B>xaxis</B>, <B>yaxis</B>, <B>x2axis</B>, and <B>y2axis</B>.
- Each component has a <B>use</B> operation that designates the axis (or axes)
-to be drawn in that corresponding margin: <B>xaxis</B> in the bottom, <B>yaxis</B> in
-the left, <B>x2axis</B> in the top, and <B>y2axis</B> in the right. <BR>
-<CODE># Display the axis tempAxis in the left margin.<BR>
-.g yaxis use tempAxis<BR>
-</CODE><P>The <B>use</B> operation takes a list of axis names as its last argument.  This
-is the list of axes to be drawn in this margin. <P>
-You can configure axes in
-many ways. The axis scale can be linear or logarithmic.  The values along
-the axis can either monotonically increase or decrease.  If you need custom
-tick labels, you can specify a Tcl procedure to format the label any way
-you wish.  You can control how ticks are drawn, by changing the major tick
-interval or the number of minor ticks.  You can define non-uniform tick intervals,
-such as for time-series plots. <P>
-
-<DL>
-
-<DT><I>pathName <B>axis bind <I>tagName</I></B></I> ?<I>sequence</I>?  ?<I>command</I>?
- </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the event sequence
-given by <I>sequence</I> occurs for an axis with this tag, <I>command</I> will be invoked.
- The syntax is similar to the  <B>bind</B> command except that it operates on
-graph axes, rather  than widgets. See the <B>bind</B> manual entry for complete
-details on <I>sequence</I> and the substitutions performed on  <I>command</I> before
-invoking it.   <P>
-If all arguments are specified then a new binding is created,
-replacing  any existing binding for the same <I>sequence</I> and <I>tagName</I>. If the
-first character of <I>command</I> is <I>+</I> then <I>command</I>  augments an existing binding
-rather than replacing it.  If no <I>command</I> argument is provided then the command
-currently associated with <I>tagName</I> and <I>sequence</I> (it's an error occurs  if
-there's no such binding) is returned.  If both <I>command</I> and  <I>sequence</I> are
-missing then a list of all the event sequences for  which bindings have
-been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>axis <B>cget <I>axisName <I>option</I></I></B></B></I> </DT>
-<DD>Returns the
-current value of the option given by <I>option</I> for <I>axisName</I>.  <I>Option</I> may be
-any option described below for the axis <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>axis
-<B>configure <I>axisName </I></B></B></I>?<I>axisName</I>?... ?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration
-options of <I>axisName</I>. Several axes can be changed.  If <I>option</I> isn't specified,
-a list describing all the current options for <I>axisName</I> is returned.  If
-<I>option</I> is specified, but not <I>value</I>, then a list describing <I>option</I> is returned.
- If one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair,
-the axis option <I>option</I> is set to <I>value</I>.  The following options are valid
-for axes. <blockquote></DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for the axis.  <I>TagList</I>
-is a list of binding tag names.  The tags and their order will determine
-how events for axes are handled.  Each tag in the list matching the current
-event sequence will have its Tcl command executed.  Implicitly the name
-of the element is always the first tag in the list.  The default value is
-<I>all</I>. </DD>
-
-<DT><B>-color <I>color</I></B> </DT>
-<DD>Sets the color of the axis and tick labels. The default
-is <I>black</I>. </DD>
-
-<DT><B>-command <I>prefix</I></B> </DT>
-<DD>Specifies a Tcl command to be invoked when formatting
-the axis tick labels. <I>Prefix</I> is a string containing the name of a Tcl proc
-and any extra arguments for the procedure.  This command is invoked for
-each major tick on the axis.  Two additional arguments are passed to the
-procedure: the pathname of the widget and the current the numeric value
-of the tick.  The procedure returns the formatted tick label.  If <I>""</I> is returned,
-no label will appear next to the tick.  You can get the standard tick labels
-again by setting <I>prefix</I> to <I>""</I>.  The default is <I>""</I>. <P>
-Please note that this
-procedure is invoked while the graph is redrawn. You may query configuration
-options.  But do not them, because this can have unexpected results. </DD>
-
-<DT><B>-descending
-<I>boolean</I></B>  </DT>
-<DD>Indicates whether the values along the axis are monotonically
-increasing or decreasing.  If <I>boolean</I> is true, the axis values will be decreasing.
- The default is <I>0</I>. </DD>
-
-<DT><B>-hide <I>string</I></B> </DT>
-<DD>Indicates if the axis and all the elements
-mapped to it will be  displayed.  The valid values for <I>string</I> are shown
-below.  The default value is <I>0</I>. <blockquote></DD>
-
-<DT><I>false</I> </DT>
-<DD>The axis and its data elements are
-displayed. </DD>
-
-<DT><I>true</I> </DT>
-<DD>The axis is hidden, but the data elements mapped to it are
-displayed. </DD>
-
-<DT><I>all</I> </DT>
-<DD>The axis and its data elements are hidden. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-justify <I>justify</I></B>
-</DT>
-<DD>Specifies how the axis title should be justified.  This matters only when
-the axis title contains more than one line of text. <I>Justify</I> must be <I>left</I>,
-<I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-limits <I>formatStr</I></B> </DT>
-<DD>Specifies a printf-like
-description to format the minimum and maximum limits of the axis.  The limits
-are displayed at the top/bottom or left/right sides of the plotting area.
- <I>FormatStr</I> is a list of one or two format descriptions.  If one description
-is supplied, both the minimum and maximum limits are formatted in the same
-way.  If two, the first designates the format for the minimum limit, the
-second for the maximum.  If <I>""</I> is given as either description, then  the
-that limit will not be displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets
-the width of the axis and tick lines.  The default is <I>1</I> pixel. </DD>
-
-<DT><B>-logscale <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the scale of the axis is logarithmic or linear.  If <I>boolean</I>
-is true, the axis is logarithmic.  The default scale is linear. </DD>
-
-<DT><B>-loose <I>boolean</I></B>
-</DT>
-<DD>Indicates whether the limits of the axis should fit the data points tightly,
-at the outermost data points, or loosely, at the outer tick intervals. If
-the axis limit is set with the -min or -max option, the axes are displayed
-tightly. If <I>boolean</I> is true, the axis range is "loose". The default is <I>0</I>.
-</DD>
-
-<DT><B>-majorticks <I>majorList</I></B> </DT>
-<DD>Specifies where to display major axis ticks.  You can
-use this option to display ticks at non-uniform intervals.  <I>MajorList</I> is
-a list of axis coordinates designating the location of major ticks.  No
-minor ticks are drawn.  If <I>majorList</I> is <I>""</I>,  major ticks will be automatically
-computed. The default is <I>""</I>. </DD>
-
-<DT><B>-max <I>value</I></B> </DT>
-<DD>Sets the maximum limit of <I>axisName</I>.
- Any data point greater  than <I>value</I> is not displayed.  If <I>value</I> is <I>""</I>, 
-the maximum limit is calculated using the largest data value. The default
-is <I>""</I>. </DD>
-
-<DT><B>-min <I>value</I></B> </DT>
-<DD>Sets the minimum limit of <I>axisName</I>. Any data point less
-than  <I>value</I> is not displayed.  If <I>value</I> is <I>""</I>, the minimum limit is calculated
-using the smallest data value. The default is <I>""</I>. </DD>
-
-<DT><B>-minorticks <I>minorList</I></B> </DT>
-<DD>Specifies
-where to display minor axis ticks.  You can use this option to display minor
-ticks at non-uniform intervals. <I>MinorList</I> is a list of real values, ranging
-from 0.0 to 1.0, designating the placement of a minor tick.  No minor ticks
-are drawn if the <B>-majortick</B> option is also set.  If <I>minorList</I> is <I>""</I>, minor
-ticks will be automatically computed. The default is <I>""</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies
-the how many degrees to rotate the axis tick labels. <I>Theta</I> is a real value
-representing the number of degrees to rotate the tick labels.  The default
-is <I>0.0</I> degrees. </DD>
-
-<DT><B>-showticks <I>boolean</I></B> </DT>
-<DD>Indicates whether axis ticks should be
-drawn. If <I>boolean</I> is true, ticks are drawn.  If false, only the axis line
-is drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-stepsize <I>value</I></B> </DT>
-<DD>Specifies the interval between
-major axis ticks.  If <I>value</I> isn't a valid interval (must be less than the
-axis range),  the request is ignored and the step size is automatically
-calculated. </DD>
-
-<DT><B>-subdivisions <I>number</I></B>  </DT>
-<DD>Indicates how many minor axis ticks are
-to be drawn.  For example, if <I>number</I> is two, only one minor tick is drawn.
- If <I>number</I> is one, no minor ticks are displayed.  The default is <I>2</I>. </DD>
-
-<DT><B>-tickfont
-<I>fontName</I></B>  </DT>
-<DD>Specifies the font for axis tick labels. The default is <I>*-Courier-Bold-R-Normal-*-100-*</I>.
-</DD>
-
-<DT><B>-ticklength <I>pixels</I></B> </DT>
-<DD>Sets the length of major and minor ticks (minor ticks
-are half the length of major ticks). If <I>pixels</I> is less than zero, the axis
-will be inverted with ticks drawn pointing towards the plot.  The default
-is <I>0.1i</I>. </DD>
-
-<DT><B>-title <I>text</I></B> </DT>
-<DD>Sets the title of the axis. If <I>text</I> is  <I>""</I>, no axis title
-will be displayed.   </DD>
-
-<DT><B>-titlecolor <I>color</I></B> </DT>
-<DD>Sets the color of the axis title. The
-default is <I>black</I>. </DD>
-
-<DT><B>-titlefont <I>fontName</I></B>  </DT>
-<DD>Specifies the font for axis title.
-The default is <I>*-Helvetica-Bold-R-Normal-*-14-140-*</I>. </DD>
-</DL>
-<P>
-Axis configuration options
-may be also be set by the <B>option</B> command.  The resource class is <I>Axis</I>.  The
-resource names are the names of the axes (such as <I>x</I> or <I>x2</I>). <BR>
-<CODE>option add *Graph.Axis.Color  blue<BR>
-option add *Graph.x.LogScale  true<BR>
-option add *Graph.x2.LogScale false<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>axis <B>create <I>axisName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new axis by the
-name <I>axisName</I>.  No axis by the same name can already exist. <I>Option</I> and <I>value</I>
-are described  in above in the axis <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>axis <B>delete
-</B></B></I>?<I>axisName</I>?... </DT>
-<DD>Deletes the named axes. An axis is not really deleted until it
-is not longer in use, so it's safe to delete axes mapped to elements. </DD>
-
-<DT><I>pathName
-<B>axis invtransform <I>axisName value</I></B></I> </DT>
-<DD>Performs the inverse transformation, changing
-the screen coordinate <I>value</I> to a graph coordinate, mapping the value mapped
-to <I>axisName</I>.  Returns the graph coordinate. </DD>
-
-<DT><I>pathName <B>axis limits <I>axisName</I></B></I>
-</DT>
-<DD>Returns a list of the minimum and maximum limits for <I>axisName</I>.  The order
-of the list is <I>min max</I>. </DD>
-
-<DT><I>pathName <B>axis names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of
-axes matching zero or more patterns.  If no <I>pattern</I> argument is give, the
-names of all axes are returned. </DD>
-
-<DT><I>pathName <B>axis transform <I>axisName value</I></B></I> </DT>
-<DD>Transforms
-the coordinate <I>value</I> to a screen coordinate by mapping the it to <I>axisName</I>.
- Returns the transformed screen coordinate. </DD>
-</DL>
-<P>
-The default axes are <I>x</I>, <I>y</I>, <I>x2</I>,
-and <I>y2</I>. But you can display more than four axes simultaneously.  You can
-also swap in a different axis with <B>use</B> operation of the special axis components:
-<B>xaxis</B>, <B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B>. <BR>
-<CODE>.g create axis temp<BR>
-.g create axis time<BR>
-...<BR>
-.g xaxis use temp<BR>
-.g yaxis use time<BR>
-</CODE><P>Only the axes specified for use are displayed on the screen. <P>
-The <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B> components operate on an axis location rather
-than a specific axis like the more general <B>axis</B> component does.  They implicitly
-control the axis that is currently using to that location.  By default,
-<B>xaxis</B> uses the <I>x</I> axis, <B>yaxis</B> uses <I>y</I>, <B>x2axis</B> uses <I>x2</I>, and <B>y2axis</B> uses <I>y2</I>.
- When more than one axis is displayed in a margin, it represents the first
-axis displayed. <P>
-The following operations are available for axes. They mirror
-exactly the operations of the <B>axis</B> component.  The <I>axis</I> argument must be
-<B>xaxis</B>, <B>x2axis</B>, <B>yaxis</B>, or <B>y2axis</B>.  This feature is deprecated since more
-than one axis can now be used a margin.  You should only use the <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B> components with the <B>use</B> operation. For all other
-operations, use the general <B>axis</B> component instead. 
-<DL>
-
-<DT><I>pathName <I>axis <B>cget <I>option</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>configure </B></I></I>?<I>option value</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> invtransform <I>value</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>limits</B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> transform <I>value</I></B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> use </B></I></I>?<I>axisName</I>?
-  </DT>
-<DD>Designates the axis <I>axisName</I> is to be displayed at this location.  <I>AxisName</I>
-can not be already in use at another location.   This command returns the
-name of the axis currently using this location. </DD>
-</DL>
-
-<H3><A NAME="sect9" HREF="#toc9">Crosshairs Component</A></H3>
-Cross
-hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position the
-mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives. This
-means that they can be quickly drawn and erased without redrawing the entire
-graph. <P>
-The following operations are available for cross hairs: 
-<DL>
-
-<DT><I>pathName
-<B>crosshairs cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the cross hairs configuration
-option given by <I>option</I>.  <I>Option</I> may be any option described below for the
-cross hairs <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>crosshairs configure </B></I>?<I>option value</I>?...
-  </DT>
-<DD>Queries or modifies the configuration options of the cross hairs.  If
-<I>option</I> isn't specified, a list describing all the current options for the
-cross hairs is returned.  If <I>option</I> is specified, but not <I>value</I>, then a
-list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I> pairs
-are specified, then for each pair, the cross hairs option <I>option</I> is set
-to <I>value</I>. The following options are available for cross hairs. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>
- </DT>
-<DD>Sets the color of the cross hairs.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the cross hairs. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the cross
-hair lines.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the
-cross hairs will be solid lines. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether cross hairs
-are drawn. If <I>boolean</I> is true, cross hairs are not drawn.  The default is
-<I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Set the width of the cross hair lines.  The default
-is <I>1</I>. </DD>
-
-<DT><B>-position <I>pos</I></B>  </DT>
-<DD>Specifies the screen position where the cross hairs
-intersect. <I>Pos</I> must be in the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window
-coordinates of the intersection. </DD>
-</DL>
-<P>
-Cross hairs configuration options may be
-also be set by the <B>option</B> command.  The resource name and class are <I>crosshairs</I>
-and <I>Crosshairs</I> respectively. <BR>
-<CODE>option add *Graph.Crosshairs.LineWidth 2<BR>
-option add *Graph.Crosshairs.Color     red<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>crosshairs off</B></I> </DT>
-<DD>Turns off the cross hairs.  </DD>
-
-<DT><I>pathName <B>crosshairs
-on</B></I> </DT>
-<DD>Turns on the display of the cross hairs. </DD>
-
-<DT><I>pathName <B>crosshairs toggle</B></I> 
-</DT>
-<DD>Toggles the current state of the cross hairs, alternately mapping and unmapping
-the cross hairs. </DD>
-</DL>
-
-<H3><A NAME="sect10" HREF="#toc10">Element Components</A></H3>
-A data element represents a set of data.
- It contains x and y vectors containing the coordinates of the data points.
- Elements can be displayed with a symbol at each data point and lines connecting
-the points.  Elements also control the appearance of the data, such as the
-symbol type, line width, color etc. <P>
-When new data elements are created,
-they are automatically added to a list of displayed elements.   The display
-list controls what elements are drawn and in what order.   <P>
-The following
-operations are available for elements. 
-<DL>
-
-<DT><I>pathName <B>element activate <I>elemName
-</I></B></I>?<I>index</I>?... </DT>
-<DD>Specifies the data points of element <I>elemName</I> to be drawn using
-active foreground and background colors.  <I>ElemName</I> is the name of the element
-and <I>index</I> is a number representing the index of the data point. If no indices
-are present then all data points become active. </DD>
-
-<DT><I>pathName <B>element bind <I>tagName</I></B></I>
-?<I>sequence</I>?  ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever
-the event sequence given by <I>sequence</I> occurs for an element with this tag,
-<I>command</I> will be invoked.  The syntax is similar to the  <B>bind</B> command except
-that it operates on graph elements, rather  than widgets. See the <B>bind</B> manual
-entry for complete details on <I>sequence</I> and the substitutions performed
-on  <I>command</I> before invoking it.   <P>
-If all arguments are specified then a
-new binding is created, replacing  any existing binding for the same <I>sequence</I>
-and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>  augments
-an existing binding rather than replacing it.  If no <I>command</I> argument is
-provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>element cget <I>elemName
-<I>option</I></I></B></I> </DT>
-<DD>Returns the current value of the element configuration option given
-by  <I>option</I>.  <I>Option</I> may be any of the options described below for the element
-<B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>element closest <I>x y</I></B></I> <I>varName</I> ?<I>option value</I>?...
-?<I>elemName</I>?... </DT>
-<DD>Finds the data point closest to the window coordinates <I>x</I> and
-<I>y</I> in the element <I>elemName</I>.  <I>ElemName</I> is the name of an element, that must
-not be hidden.  If no elements are specified, then all visible elements
-are searched.  It returns via the array variable <I>varName</I> the name of the
-closest element, the index of its closest point, and the graph coordinates
-of the point. Returns <I>0</I>, if no data point within the threshold distance
-can be found, otherwise <I>1</I> is returned.  The following <I>option</I>-<I>value</I> pairs
-are available. <blockquote></DD>
-
-<DT><B>-halo <I>pixels</I></B> </DT>
-<DD>Specifies a threshold distance where selected
-data points are ignored. <I>Pixels</I> is a valid screen distance, such as <I>2</I> or
-<I>1.2i</I>. If this option isn't specified, then it defaults to the value of the
-graph's <B>-halo</B> option. </DD>
-
-<DT><B>-interpolate <I>string</I></B> </DT>
-<DD>Indicates whether to consider projections
-that lie along the line segments  connecting data points when searching
-for the closest point. The default value is <I>0</I>. The values for <I>string</I> are
-described below. <blockquote></DD>
-
-<DT><I>no</I>  </DT>
-<DD>Search only for the closest data point. </DD>
-
-<DT><I>yes</I> </DT>
-<DD>Search includes
-projections that lie along the line segments connecting the data points.
-  </DD>
-
-<DT><I>x</I> </DT>
-<DD>Search includes vertical projections from the given X-coordinate.  </DD>
-
-<DT><I>y</I>
-</DT>
-<DD>Search includes horizontal projections from the given Y-coordinate.  </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>element configure <I>elemName </I></B></I>?<I>elemName</I>... ?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options for elements.  Several elements can be modified
-at the same time. If <I>option</I> isn't specified, a list describing all the current
-options for <I>elemName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>,
-then a list describing the option <I>option</I> is returned.  If one or more <I>option</I>
-and <I>value</I> pairs are specified, then for each pair, the element option <I>option</I>
-is set to <I>value</I>.  The following options are valid for elements. <blockquote></DD>
-
-<DT><B>-activepen
-<I>penName</I></B> </DT>
-<DD>Specifies pen to use to draw active element.  If <I>penName</I> is <I>""</I>,
-no active elements will be drawn.  The default is  <I>activeLine</I>. </DD>
-
-<DT><B>-bindtags <I>tagList</I></B>
-</DT>
-<DD>Specifies the binding tags for the element.  <I>TagList</I> is a list of binding
-tag names.  The tags and their order will determine how events are handled
-for elements.  Each tag in the list matching the  current event sequence
-will have its Tcl command executed.  Implicitly the name of the element
-is always the first tag in the list.  The default value is <I>all</I>. </DD>
-
-<DT><B>-color <I>color</I></B>
- </DT>
-<DD>Sets the color of the traces connecting the data points.   </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of element line. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the element
-line.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the lines
-will be solid. </DD>
-
-<DT><B>-data <I>coordList</I></B> </DT>
-<DD>Specifies the X-Y coordinates of the data. 
-<I>CoordList</I> is a list of numeric expressions representing the X-Y coordinate
-pairs of each data point. </DD>
-
-<DT><B>-fill <I>color</I></B>  </DT>
-<DD>Sets the interior color of symbols.
- If <I>color</I> is <I>""</I>, then the interior of the symbol is transparent.  If <I>color</I>
-is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.  The default
-is <I>defcolor</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the element is displayed.   The
-default is <I>no</I>. </DD>
-
-<DT><B>-label <I>text</I></B> </DT>
-<DD>Sets the element's label in the legend.  If <I>text</I>
-is <I>""</I>, the element will have no entry in the legend. The default label is
-the element's name.  </DD>
-
-<DT><B>-linewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the connecting lines
-between data points.  If <I>pixels</I> is <I>0</I>, no connecting lines will be drawn
-between symbols.  The default is <I>0</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Selects the X-axis to map the
-element's X-coordinates onto. <I>XAxis</I> must be the name of an axis.  The default
-is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Selects the Y-axis to map the element's Y-coordinates onto.
-<I>YAxis</I> must be the name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-offdash <I>color</I></B> </DT>
-<DD>Sets the
-color of the stripes when traces are dashed (see the <B>-dashes</B> option).  If
-<I>color</I> is <I>""</I>, then the "off" pixels will represent gaps instead of stripes.
- If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>  </DT>
-<DD>Sets the color or the outline around
-each symbol.  If <I>color</I> is <I>""</I>, then no outline is drawn. If <I>color</I> is <I>defcolor</I>,
-then the color will be the same as the <B>-color</B> option.  The default is <I>defcolor</I>.
-</DD>
-
-<DT><B>-outlinewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the outline bordering each symbol.
- If <I>pixels</I> is <I>0</I>, no outline will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-pixels <I>pixels</I></B>
-</DT>
-<DD>Sets the size of symbols.  If <I>pixels</I> is <I>0</I>, no symbols will be drawn.  The
-default is <I>0.125i</I>. </DD>
-
-<DT><B>-scalesymbols <I>boolean</I></B>  </DT>
-<DD>If <I>boolean</I> is true, the size of
-the symbols drawn for <I>elemName</I> will change with scale of the X-axis and
-Y-axis. At the time this option is set, the current ranges of the axes are
-saved as the normalized scales (i.e scale factor is 1.0) and the element
-is drawn at its designated size (see the <B>-pixels</B> option).  As the scale of
-the axes change, the symbol will be scaled according to the smaller of
-the X-axis and Y-axis scales.  If <I>boolean</I> is false, the element's symbols are
-drawn at the designated size, regardless of axis scales.  The default is
-<I>0</I>. </DD>
-
-<DT><B>-smooth <I>smooth</I></B>  </DT>
-<DD>Specifies how connecting line segments are drawn between
-data points. <I>Smooth</I> can be either <I>linear</I>, <I>step</I>, <I>natural</I>, or <I>quadratic</I>.  If
-<I>smooth</I> is <I>linear</I>, a single line segment is drawn, connecting both data
-points. When <I>smooth</I> is <I>step</I>, two line segments are drawn. The first is a
-horizontal line segment that steps the next X-coordinate.  The second is
-a vertical line, moving to the next Y-coordinate.  Both <I>natural</I> and <I>quadratic</I>
-generate multiple segments between data points.  If <I>natural</I>, the segments
-are generated using a cubic spline.  If <I>quadratic</I>, a quadratic spline is
-used.  The default is <I>linear</I>. </DD>
-
-<DT><B>-styles <I>styleList</I></B>  </DT>
-<DD>Specifies what pen to use
-based on the range of weights given. <I>StyleList</I> is a list of style specifications.
-Each style specification, in turn, is a list consisting of a pen name,
-and optionally a minimum and maximum range.  Data points whose weight (see
-the <B>-weight</B> option) falls in this range, are drawn with this pen.  If no
-range is specified it defaults to the index of the pen in the list.  Note
-that this affects only symbol attributes. Line attributes, such as line
-width, dashes, etc. are ignored. </DD>
-
-<DT><B>-symbol <I>symbol</I></B>  </DT>
-<DD>Specifies the symbol for
-data points.  <I>Symbol</I> can be either <I>square</I>, <I>circle</I>, <I>diamond</I>, <I>plus</I>, <I>cross</I>,
-<I>splus</I>, <I>scross</I>, <I>triangle</I>, <I>""</I> (where no symbol is drawn), or a bitmap.  Bitmaps
-are specified as "<I>source</I> ?<I>mask</I>?", where <I>source</I> is the name of the bitmap,
-and <I>mask</I> is the bitmap's optional mask.  The default is <I>circle</I>. </DD>
-
-<DT><B>-trace <I>direction</I></B>
- </DT>
-<DD>Indicates whether connecting lines between data points (whose X-coordinate
-values are either increasing or decreasing) are drawn.   <I>Direction</I> must
-be <I>increasing</I>, <I>decreasing</I>, or <I>both</I>.  For example, if <I>direction</I> is <I>increasing</I>,
-connecting lines will be drawn only between those data points where X-coordinate
-values are monotonically increasing.  If <I>direction</I> is <I>both</I>, connecting lines
-will be draw between all data points.  The default is <I>both</I>. </DD>
-
-<DT><B>-weights <I>wVec</I></B>
- </DT>
-<DD>Specifies the weights of the individual data points.  This,  with the list
-pen styles (see the <B>-styles</B> option), controls how data points are drawn.
- <I>WVec</I> is the name of a BLT vector or a list of numeric expressions representing
-the weights for each data point. </DD>
-
-<DT><B>-xdata <I>xVec</I></B>  </DT>
-<DD>Specifies the X-coordinates
-of the data.  <I>XVec</I> is the name of a BLT vector or a list of numeric expressions.
-</DD>
-
-<DT><B>-ydata <I>yVec</I></B>  </DT>
-<DD>Specifies the Y-coordinates of the data.  <I>YVec</I> is the name of
-a BLT vector or a list of numeric expressions. </DD>
-</DL>
-<P>
-Element configuration options
-may also be set by the <B>option</B> command.  The resource class is <I>Element</I>. The
-resource name is the name of the element. <BR>
-<CODE>option add *Graph.Element.symbol line<BR>
-option add *Graph.e1.symbol line<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>element create <I>elemName</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a new element <I>elemName</I>.
- It's an error is an element <I>elemName</I> already exists.  If additional arguments
-are present, they specify options valid for  the element <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>element deactivate <I>elemName</I></B></I> ?<I>elemName</I>?... </DT>
-<DD>Deactivates all the elements
-matching <I>pattern</I>. Elements whose names match any of the patterns given are
-redrawn using their normal colors. </DD>
-
-<DT><I>pathName <B>element delete</B></I> ?<I>elemName</I>?... </DT>
-<DD>Deletes
-all the named elements.  The graph is automatically redrawn. </DD>
-
-<DT><I>pathName <B>element
-exists <I>elemName</I></B></I> </DT>
-<DD>Returns <I>1</I> if an element <I>elemName</I> currently exists and <I>0</I>
-otherwise. </DD>
-
-<DT><I>pathName <B>element names </B></I>?<I>pattern</I>?...   </DT>
-<DD>Returns the elements matching
-one or more pattern.  If no <I>pattern</I> is given, the names of all elements
-is returned. </DD>
-
-<DT><I>pathName <B>element show</B></I> ?<I>nameList</I>?   </DT>
-<DD>Queries or modifies the
-element display list.  The element display list designates the elements
-drawn and in what order. <I>NameList</I> is a list of elements to be displayed
-in the order they are named.  If there is no <I>nameList</I> argument, the current
-display list is returned. </DD>
-
-<DT><I>pathName <B>element type</B></I> <I>elemName</I> </DT>
-<DD>Returns the type
-of <I>elemName</I>.  If the element is a bar element, the commands returns the
-string <I>"bar"</I>, otherwise it returns <I>"line"</I>. </DD>
-</DL>
-
-<H3><A NAME="sect11" HREF="#toc11"></CODE><P>Grid Component</A></H3>
-Grid lines extend
-from the major and minor ticks of each axis horizontally or vertically
-across the plotting area.  The following operations are available for grid
-lines. 
-<DL>
-
-<DT><I>pathName <B>grid cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the grid line
-configuration option given by  <I>option</I>.  <I>Option</I> may be any option described
-below for the grid <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>grid configure</B></I> ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options for grid lines.  If
-<I>option</I> isn't specified, a list describing all the current grid options for
-<I>pathName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list
-describing <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are
-specified, then for each pair, the grid line option <I>option</I> is set to <I>value</I>.
- The following options are valid for grid lines. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color
-of the grid lines.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style
-of the grid lines. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the grid lines.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the grid will be solid lines.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid should be drawn. If <I>boolean</I> is true,
-grid lines are not shown. The default is <I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of grid lines.  The default width is <I>1</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Specifies the X-axis to
-display grid lines.  <I>XAxis</I> must be the name of an axis or <I>""</I> for no grid
-lines.   The default is <I>""</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to display grid
-lines.  <I>YAxis</I> must be the name of an axis or <I>""</I> for no grid lines.  The default
-is <I>y</I>. </DD>
-
-<DT><B>-minor <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid lines should be drawn for
-minor ticks.  If <I>boolean</I> is true, the lines will appear at minor tick intervals.
- The default is <I>1</I>. </DD>
-</DL>
-<P>
-Grid configuration options may also be set by the  <B>option</B>
-command.  The resource name and class are <I>grid</I> and  <I>Grid</I> respectively.  <BR>
-<CODE>option add *Graph.grid.LineWidth 2<BR>
-option add *Graph.Grid.Color     black<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>grid off</B></I> </DT>
-<DD>Turns off the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid on</B></I>
-</DT>
-<DD>Turns on the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid toggle</B></I> </DT>
-<DD>Toggles the display
-of the grid.   </DD>
-</DL>
-
-<H3><A NAME="sect12" HREF="#toc12">Legend Component</A></H3>
-The legend displays a list of the data elements.
- Each entry consists of the element's symbol and label.  The legend can appear
-in any margin (the default location is in the right margin).  It can also
-be positioned anywhere within the plotting area. <P>
-The following operations
-are valid for the legend. 
-<DL>
-
-<DT><I>pathName <B>legend activate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend
-entries to be drawn using the active legend colors and relief. All entries
-whose element names match <I>pattern</I>  are selected.  To be selected, the element
-name must match only one <I>pattern</I>.  </DD>
-
-<DT><I>pathName <B>legend bind <I>tagName</I></B></I> ?<I>sequence</I>?
- ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the event
-sequence given by <I>sequence</I> occurs for a legend entry with this tag, <I>command</I>
-will be invoked.  Implicitly the element names in the entry are tags.  The
-syntax is similar to the  <B>bind</B> command except that it operates on legend
-entries, rather  than widgets. See the <B>bind</B> manual entry for complete details
-on <I>sequence</I> and the substitutions performed on  <I>command</I> before invoking
-it.   <P>
-If all arguments are specified then a new binding is created, replacing
- any existing binding for the same <I>sequence</I> and <I>tagName</I>. If the first character
-of <I>command</I> is <I>+</I> then <I>command</I>  augments an existing binding rather than
-replacing it.  If no <I>command</I> argument is provided then the command currently
-associated with <I>tagName</I> and <I>sequence</I> (it's an error occurs  if there's no
-such binding) is returned.  If both <I>command</I> and  <I>sequence</I> are missing then
-a list of all the event sequences for  which bindings have been defined
-for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>legend cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of a
-legend configuration option. <I>Option</I> may be any option described below in
-the legend <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>legend configure </B></I>?<I>option value</I>?...
-</DT>
-<DD>Queries or modifies the configuration options for the legend.  If <I>option</I>
-isn't specified, a list describing the current legend options for <I>pathName</I>
-is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list describing
-<I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are specified,
-then for each pair, the legend option <I>option</I> is set to <I>value</I>.  The following
-options are valid for the legend. <blockquote></DD>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets the background
-color for active legend entries.  All legend entries marked active (see
-the legend <B>activate</B> operation) are drawn using this background color. </DD>
-
-<DT><B>-activeborderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the outside edge of the active
-legend entries.  The default is <I>2</I>. </DD>
-
-<DT><B>-activeforeground <I>color</I></B> </DT>
-<DD>Sets the foreground
-color for active legend entries.  All legend entries marked as active (see
-the legend <B>activate</B> operation) are drawn using this foreground color. </DD>
-
-<DT><B>-activerelief
-<I>relief</I></B>  </DT>
-<DD>Specifies the 3-D effect desired for active legend entries. <I>Relief</I>
-denotes how the interior of the entry should appear relative to the legend;
-for example, <I>raised</I> means the entry should appear to protrude from the
-legend, relative to the surface of the legend.  The default is <I>flat</I>. </DD>
-
-<DT><B>-anchor
-<I>anchor</I></B> </DT>
-<DD>Tells how to position the legend relative to the positioning point
-for the legend.  This is dependent on the value of the <B>-position</B> option. 
-The default is <I>center</I>. <blockquote></DD>
-
-<DT><I>left</I> or <I>right</I> </DT>
-<DD>The anchor describes how to position
-the legend vertically.   </DD>
-
-<DT><I>top</I> or <I>bottom</I> </DT>
-<DD>The anchor describes how to position
-the legend horizontally.   </DD>
-
-<DT><I>@x,y</I> </DT>
-<DD>The anchor specifies how to position the
-legend relative to the positioning point. For example, if <I>anchor</I> is <I>center</I>
-then the legend is centered on the point; if <I>anchor</I> is <I>n</I> then the legend
-will be drawn such that the top center point of the rectangular region
-occupied by the legend will be at the positioning point. </DD>
-
-<DT><I>plotarea</I> </DT>
-<DD>The anchor
-specifies how to position the legend relative to the plotting area. For
-example, if <I>anchor</I> is <I>center</I> then the legend is centered in the plotting
-area; if <I>anchor</I> is <I>ne</I> then the legend will be drawn such that occupies
-the upper right corner of the plotting area. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background
-color of the legend. If <I>color</I> is <I>""</I>, the legend background with be transparent.
-</DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for legend entries.  <I>TagList</I>
-is a list of binding tag names.  The tags and their order will determine
-how events are handled for legend entries.  Each tag in the list matching
- the current event sequence will have its Tcl command executed. The  default
-value is <I>all</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the outside edge of the legend (if such border is being drawn; the <B>relief</B>
-option determines this). The default is <I>2</I> pixels. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD><I>FontName</I>
-specifies a font to use when drawing the labels of each element into the
-legend.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets
-the foreground color of the text drawn for the element's label. The default
-is <I>black</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the legend should be displayed.
-If <I>boolean</I> is true, the legend will not be draw.  The default is <I>no</I>. </DD>
-
-<DT><B>-ipadx
-<I>pad</I></B>  </DT>
-<DD>Sets the amount of internal padding to be added to the width of each
-legend entry.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I>
-has two elements, the left side of the legend entry is padded by the first
-distance and the right side by the second.  If <I>pad</I> is just one distance,
-both the left and right sides are padded evenly.  The default is <I>2</I>. </DD>
-
-<DT><B>-ipady
-<I>pad</I></B> </DT>
-<DD>Sets an amount of internal padding to be added to the height of each
-legend entry.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I>
-has two elements, the top of the entry is padded by the first distance
-and the bottom by the second.  If <I>pad</I> is just one distance, both the top
-and bottom of the entry are padded evenly. The default is <I>2</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets
-the padding to the left and right exteriors of the legend. <I>Pad</I> can be a
-list of one or two screen distances.  If <I>pad</I> has two elements, the left
-side of the legend is padded by the first distance and the right side by
-the second.  If <I>pad</I> has just one distance, both the left and right sides
-are padded evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and
-below the legend.  <I>Pad</I> can be a list of one or two screen distances.  If
-<I>pad</I> has two elements, the area above the legend is padded by the first
-distance and the area below by the second.  If <I>pad</I> is just one distance,
-both the top and bottom areas are padded evenly.  The default is <I>0</I>. </DD>
-
-<DT><B>-position
-<I>pos</I></B> </DT>
-<DD>Specifies where the legend is drawn. The <B>-anchor</B> option also affects
-where the legend is positioned.  If <I>pos</I> is <I>left</I>, <I>left</I>, <I>top</I>, or <I>bottom</I>, the
-legend is drawn in the specified margin.  If <I>pos</I> is <I>plotarea</I>, then the legend
-is drawn inside the plotting area at a particular anchor.  If <I>pos</I> is in
-the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window coordinates, the legend is
-drawn in the plotting area at the specified coordinates.  The default is
-<I>right</I>. </DD>
-
-<DT><B>-raised <I>boolean</I></B> </DT>
-<DD>Indicates whether the legend is above or below the
-data elements.  This matters only if the legend is in the plotting area.
- If <I>boolean</I> is true, the legend will be drawn on top of any elements that
-may overlap it. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the border around the legend. <I>Relief</I> specifies how the interior of the
-legend should appear relative to the graph; for example, <I>raised</I> means the
-legend should appear to protrude from the graph, relative to the surface
-of the graph.  The default is <I>sunken</I>. </DD>
-</DL>
-<P>
-Legend configuration options may also
-be set by the <B>option</B> command.  The resource name and class are <I>legend</I> and
-<I>Legend</I> respectively. <BR>
-<CODE>option add *Graph.legend.Foreground blue<BR>
-option add *Graph.Legend.Relief     raised<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>legend deactivate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend entries to be drawn using
-the normal legend colors and relief.  All entries whose element names match
-<I>pattern</I> are selected.  To be selected, the element name must match only
-one <I>pattern</I>. </DD>
-
-<DT><I>pathName <B>legend get <I>pos</I></B></I> </DT>
-<DD>Returns the name of the element whose
-entry is at the screen position <I>pos</I> in the legend.  <I>Pos</I> must be in the form
-"<I>@x,y</I>", where <I>x</I> and <I>y</I> are window coordinates.  If the given coordinates
-do not lie over a legend entry, <I>""</I> is returned. </DD>
-</DL>
-
-<H3><A NAME="sect13" HREF="#toc13">Pen Components</A></H3>
-Pens define
-attributes (both symbol and line style) for elements. Pens mirror the configuration
-options of data elements that pertain to how symbols and lines are drawn.
- Data elements use pens to determine how they are drawn.  A data element
-may use several pens at once.  In this case, the pen used for a particular
-data point is determined from each element's weight vector (see the element's
-<B>-weight</B> and <B>-style</B> options). <P>
-One pen, called <I>activeLine</I>, is automatically
-created. It's used as the default active pen for elements. So you can change
-the active attributes for all elements by simply reconfiguring this pen.
-<BR>
-<CODE>.g pen configure "activeLine" -color green<BR>
-</CODE><P>You can create and use several pens. To create a pen, invoke the pen component
-and its create operation. <BR>
-<CODE>.g pen create myPen<BR>
-</CODE><P>You map pens to a data element using either the element's  <B>-pen</B> or <B>-activepen</B>
-options. <BR>
-<CODE>.g element create "line1" -xdata $x -ydata $tempData \<BR>
-    -pen myPen<BR>
-</CODE><P>An element can use several pens at once. This is done by specifying the
-name of the pen in the element's style list (see the <B>-styles</B> option). <BR>
-<CODE>.g element configure "line1" -styles { myPen 2.0 3.0 }<BR>
-</CODE><P>This says that any data point with a weight between 2.0 and 3.0 is to be
-drawn using the pen <I>myPen</I>.  All other points are drawn with the element's
-default attributes. <P>
-The following operations are available for pen components.
-<P>
-
-<DL>
-
-<DT><I>pathName <B>pen <B>cget <I>penName <I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option
-given by <I>option</I> for <I>penName</I>.  <I>Option</I> may be any option described below for
-the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>configure <I>penName </I></B></B></I>?<I>penName</I>... ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options of <I>penName</I>. Several
-pens can be modified at once.  If <I>option</I> isn't specified, a list describing
-the current options for <I>penName</I> is returned.  If <I>option</I> is specified, but
-not <I>value</I>, then a list describing <I>option</I> is returned.  If one or more <I>option</I>
-and <I>value</I> pairs are specified, then for each pair, the pen option <I>option</I>
-is set to <I>value</I>.  The following options are valid for pens. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B> 
-</DT>
-<DD>Sets the color of the traces connecting the data points.   </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of element line. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the element
-line.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the lines
-will be solid. </DD>
-
-<DT><B>-fill <I>color</I></B>  </DT>
-<DD>Sets the interior color of symbols.  If <I>color</I>
-is <I>""</I>, then the interior of the symbol is transparent.  If <I>color</I> is <I>defcolor</I>,
-then the color will be the same as the <B>-color</B> option.  The default is <I>defcolor</I>.
-</DD>
-
-<DT><B>-linewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the connecting lines between data points.
- If <I>pixels</I> is <I>0</I>, no connecting lines will be drawn between symbols.  The
-default is <I>0</I>. </DD>
-
-<DT><B>-offdash <I>color</I></B> </DT>
-<DD>Sets the color of the stripes when traces are
-dashed (see the <B>-dashes</B> option).  If <I>color</I> is <I>""</I>, then the "off" pixels will
-represent gaps instead of stripes.  If <I>color</I> is <I>defcolor</I>, then the color
-will be the same as the <B>-color</B> option.  The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>
- </DT>
-<DD>Sets the color or the outline around each symbol.  If <I>color</I> is <I>""</I>, then
-no outline is drawn. If <I>color</I> is <I>defcolor</I>, then the color will be the same
-as the <B>-color</B> option.  The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outlinewidth <I>pixels</I></B>  </DT>
-<DD>Sets
-the width of the outline bordering each symbol.  If <I>pixels</I> is <I>0</I>, no outline
-will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-pixels <I>pixels</I></B> </DT>
-<DD>Sets the size of symbols. 
-If <I>pixels</I> is <I>0</I>, no symbols will be drawn.  The default is <I>0.125i</I>. </DD>
-
-<DT><B>-symbol <I>symbol</I></B>
- </DT>
-<DD>Specifies the symbol for data points.  <I>Symbol</I> can be either <I>square</I>, <I>circle</I>,
-<I>diamond</I>, <I>plus</I>, <I>cross</I>, <I>splus</I>, <I>scross</I>, <I>triangle</I>, <I>""</I> (where no symbol is drawn),
-or a bitmap.  Bitmaps are specified as "<I>source</I> ?<I>mask</I>?", where <I>source</I> is
-the name of the bitmap, and <I>mask</I> is the bitmap's optional mask.  The default
-is <I>circle</I>. </DD>
-
-<DT><B>-type <I>elemType</I></B>  </DT>
-<DD>Specifies the type of element the pen is to be
-used with. This option should only be employed when creating the pen.  This
-is for those that wish to mix different types of elements (bars and lines)
-on the same graph.  The default type is "line". </DD>
-</DL>
-<P>
-Pen configuration options
-may be also be set by the <B>option</B> command.  The resource class is <I>Pen</I>.  The
-resource names are the names of the pens. <BR>
-<CODE>option add *Graph.Pen.Color  blue<BR>
-option add *Graph.activeLine.color  green<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>pen <B>create <I>penName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new pen by the name
-<I>penName</I>.  No pen by the same name can already exist. <I>Option</I> and <I>value</I> are
-described  in above in the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>delete
-</B></B></I>?<I>penName</I>?... </DT>
-<DD>Deletes the named pens. A pen is not really deleted until it is
-not longer in use, so it's safe to delete pens mapped to elements. </DD>
-
-<DT><I>pathName
-<B>pen names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of pens matching zero or more patterns.
- If no <I>pattern</I> argument is give, the names of all pens are returned. </DD>
-</DL>
-
-<H3><A NAME="sect14" HREF="#toc14">PostScript
-Component</A></H3>
-The graph can generate encapsulated PostScript output.  There are
-several configuration options you can specify to control how the plot will
-be generated.  You can change the page dimensions and borders.  The plot
-itself can be scaled, centered, or rotated to landscape.  The PostScript
-output can be written directly to a file or returned through the interpreter.
-<P>
-The following postscript operations are available. 
-<DL>
-
-<DT><I>pathName <B>postscript cget
-<I>option</I></B></I>  </DT>
-<DD>Returns the current value of the postscript option given by <I>option</I>.
- <I>Option</I> may be any option described below for the postscript <B>configure</B>
-operation. </DD>
-
-<DT><I>pathName <B>postscript configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options for PostScript generation.  If <I>option</I> isn't specified,
-a list describing  the current postscript options for <I>pathName</I> is returned.
- If <I>option</I> is specified, but not <I>value</I>, then a list describing <I>option</I> is
-returned.  If one or more <I>option</I> and <I>value</I> pairs are specified, then for
-each pair, the postscript option <I>option</I> is set to <I>value</I>.  The following
-postscript options are available. <blockquote></DD>
-
-<DT><B>-center <I>boolean</I></B> </DT>
-<DD>Indicates whether the plot
-should be centered on the PostScript page.  If <I>boolean</I> is false, the plot
-will be placed in the upper left corner of the page.  The default is <I>1</I>. </DD>
-
-<DT><B>-colormap
-<I>varName</I></B> </DT>
-<DD><I>VarName</I> must be the name of a global array variable that specifies
-a color mapping from the X color name to PostScript.  Each element of <I>varName</I>
-must consist of PostScript code to set a particular color value (e.g. ``<I>1.0
-1.0 0.0 setrgbcolor</I>'').  When generating color information in PostScript, the
-array variable <I>varName</I> is checked if an element of the name as the color
-exists. If so, it uses  its value as the PostScript command to set the color.
- If this option hasn't been specified, or if there isn't an entry in <I>varName</I>
-for a given color, then it uses the red, green, and blue intensities from
-the X color. </DD>
-
-<DT><B>-colormode <I>mode</I></B> </DT>
-<DD>Specifies how to output color information.  <I>Mode</I>
-must be either <I>color</I> (for full color output), <I>gray</I> (convert all colors
-to their gray-scale equivalents) or <I>mono</I> (convert foreground colors to black
-and background colors to white).  The default mode is <I>color</I>.  </DD>
-
-<DT><B>-fontmap <I>varName</I></B>
-</DT>
-<DD><I>VarName</I> must be the name of a global array variable that specifies a font
-mapping from the X font name to PostScript.  Each element of <I>varName</I> must
-consist of a Tcl list with one or two elements; the name and point size
-of a PostScript font. When outputting PostScript commands for a particular
-font, the array variable <I>varName</I> is checked to see if an element by the
- specified font exists.  If there is such an element, then the font information
-contained in that element is used in the PostScript output.  (If the point
-size is omitted from the list, the point size of the X font is used).  Otherwise
-the X font is examined in an attempt to guess what PostScript font to use.
- This works only for fonts whose foundry property is <I>Adobe</I> (such as Times,
-Helvetica, Courier, etc.).  If all of this fails then the font defaults to
-<I>Helvetica-Bold</I>. </DD>
-
-<DT><B>-decorations <I>boolean</I></B> </DT>
-<DD>Indicates whether PostScript commands
-to generate color backgrounds and 3-D borders will be output.  If <I>boolean</I>
-is false, the background will be  white and no 3-D borders will be generated.
-The default is <I>1</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Sets the height of the plot.  This lets you
-print the graph with a height different from the one drawn on the screen.
- If <I>pixels</I> is 0, the height is the same as the widget's height. The default
-is <I>0</I>. </DD>
-
-<DT><B>-landscape <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, this specifies the printed area
-is to be rotated 90 degrees.  In non-rotated output the X-axis of the printed
-area runs along the short dimension of the page (``portrait'' orientation);
-in rotated output the X-axis runs along the long dimension of the page (``landscape''
-orientation).  Defaults to <I>0</I>. </DD>
-
-<DT><B>-maxpect <I>boolean</I></B> </DT>
-<DD>Indicates to scale the plot
-so that it fills the PostScript page. The aspect ratio of the graph is still
-retained.  The default is <I>0</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the horizontal padding for the
-left and right page borders.  The borders are exterior to the plot.  <I>Pad</I>
-can be a list of one or two screen distances.  If <I>pad</I> has two elements,
-the left border is padded by the first distance and the right border by
-the second.  If <I>pad</I> has just one distance, both the left and right borders
-are padded evenly.  The default is <I>1i</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B>  </DT>
-<DD>Sets the vertical padding
-for the top and bottom page borders. The borders are exterior to the plot.
- <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has two elements,
-the top border is padded by the first distance and the bottom border by
-the second.  If <I>pad</I> has just one distance, both the top and bottom borders
-are padded evenly.  The default is <I>1i</I>. </DD>
-
-<DT><B>-paperheight <I>pixels</I></B> </DT>
-<DD>Sets the height
-of the postscript page.  This can be used to select between different page
-sizes (letter, A4, etc).  The default height is <I>11.0i</I>. </DD>
-
-<DT><B>-paperwidth <I>pixels</I></B> </DT>
-<DD>Sets
-the width of the postscript page.  This can be used to select between different
-page sizes (letter, A4, etc).  The default width is <I>8.5i</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Sets
-the width of the plot.  This lets you generate a plot of a width different
-from that of the widget.  If <I>pixels</I> is 0, the width is the same as the widget's
-width.  The default is <I>0</I>. </DD>
-</DL>
-<P>
-Postscript configuration options may be also be
-set by the <B>option</B> command.  The resource name and class are <I>postscript</I> and
-<I>Postscript</I> respectively. <BR>
-<CODE>option add *Graph.postscript.Decorations false<BR>
-option add *Graph.Postscript.Landscape   true<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>postscript output </B></I>?<I>fileName</I>? ?<I>option value</I>?... </DT>
-<DD>Outputs a file of
-encapsulated PostScript.  If a <I>fileName</I> argument isn't present, the command
-returns the PostScript. If any <I>option-value</I> pairs are present, they set configuration
-options controlling how the PostScript is generated. <I>Option</I> and <I>value</I> can
-be anything accepted by the postscript <B>configure</B> operation above. </DD>
-</DL>
-
-<H3><A NAME="sect15" HREF="#toc15">Marker
-Components</A></H3>
-Markers are simple drawing procedures used to annotate or highlight
-areas of the graph.  Markers have various types: text strings, bitmaps,
-images, connected lines, windows, or polygons.  They can be associated with
-a particular element, so that when the element is hidden or un-hidden, so
-is the marker.  By default, markers are the last items drawn, so that data
-elements will appear in behind them.  You can change this by configuring
-the <B>-under</B> option. <P>
-Markers, in contrast to elements, don't affect the scaling
-of the coordinate axes.  They can also have <I>elastic</I> coordinates (specified
-by <I>-Inf</I> and <I>Inf</I> respectively) that translate into the minimum or maximum
-limit of the axis.  For example, you can place a marker so it always remains
-in the lower left corner of the plotting area, by using the coordinates
-<I>-Inf</I>,<I>-Inf</I>. <P>
-The following operations are available for markers. 
-<DL>
-
-<DT><I>pathName <B>marker
-after <I>markerId</I></B></I> ?<I>afterId</I>? </DT>
-<DD>Changes the order of the markers, drawing the
-first marker after the second.  If no second <I>afterId</I> argument is specified,
-the marker is placed at the end of the display list.  This command can be
-used to control how markers are displayed since markers are drawn in the
-order of this display list. </DD>
-
-<DT><I>pathName <B>marker before <I>markerId</I></B></I> ?<I>beforeId</I>? </DT>
-<DD>Changes
-the order of the markers, drawing the first marker before the second.  If
-no second <I>beforeId</I> argument is specified, the marker is placed at the beginning
-of the display list. This command can be used to control how markers are
-displayed since markers are drawn in the order of this display list. </DD>
-
-<DT><I>pathName
-<B>marker bind <I>tagName</I></B></I> ?<I>sequence</I>?  ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I>
-such that whenever the event sequence given by <I>sequence</I> occurs for a marker
-with this tag, <I>command</I> will be invoked.  The syntax is similar to the  <B>bind</B>
-command except that it operates on graph markers, rather  than widgets.
-See the <B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on  <I>command</I> before invoking it.   <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>marker cget <I>option</I></B></I> </DT>
-<DD>Returns
-the current value of the marker configuration option given by <I>option</I>.  <I>Option</I>
-may be any option described below in the <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>marker
-configure <I>markerId</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration
-options for markers.  If <I>option</I> isn't specified, a list describing the current
-options for <I>markerId</I> is returned.  If <I>option</I> is specified, but not <I>value</I>,
-then a list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I>
-pairs are specified, then for each pair, the marker option <I>option</I> is set
-to <I>value</I>. <P>
-The following options are valid for all markers. Each type of marker
-also has its own type-specific options.   They are described in the sections
-below. <blockquote></DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for the marker.  <I>TagList</I>
-is a list of binding tag names.  The tags and their order will determine
-how events for markers are handled.  Each tag in the list matching the 
-current event sequence will have its Tcl command executed.  Implicitly 
-the name of the marker is always the first tag in the list. The default
-value is <I>all</I>. </DD>
-
-<DT><B>-coords <I>coordList</I></B> </DT>
-<DD>Specifies the coordinates of the marker. 
-<I>CoordList</I> is  a list of graph coordinates.  The number of coordinates required
-is dependent on the type of marker.  Text, image, and window markers need
-only two coordinates (an X-Y coordinate).   Bitmap markers can take either
-two or four coordinates (if four, they represent the corners of the bitmap).
-Line markers need at least four coordinates, polygons at least six. If <I>coordList</I>
-is <I>""</I>, the marker will not be displayed. The default is <I>""</I>. </DD>
-
-<DT><B>-element <I>elemName</I></B>
-</DT>
-<DD>Links the marker with the element <I>elemName</I>.  The marker is drawn only if
-the element is also currently displayed (see the element's <B>show</B> operation).
- If <I>elemName</I> is <I>""</I>, the marker is always drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-hide
-<I>boolean</I></B>  </DT>
-<DD>Indicates whether the marker is drawn. If <I>boolean</I> is true, the
-marker is not drawn.  The default is <I>no</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B>  </DT>
-<DD>Specifies the X-axis
-to map the marker's X-coordinates onto. <I>XAxis</I> must the name of an axis.  The
-default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to map the marker's Y-coordinates
-onto. <I>YAxis</I> must the name of an axis.  The default is <I>y</I>. </DD>
-
-<DT><B>-name <I>markerId</I></B> </DT>
-<DD>Changes
-the identifier for the marker.  The identifier <I>markerId</I>  can not already
-be used by another marker.  If this option isn't specified, the marker's name
-is uniquely generated. </DD>
-
-<DT><B>-under <I>boolean</I></B> </DT>
-<DD>Indicates whether the marker is drawn
-below/above data elements.  If <I>boolean</I> is true, the marker is be drawn underneath
-the data element symbols and lines.  Otherwise, the marker is drawn on top
-of the element.  The default is <I>0</I>. </DD>
-
-<DT><B>-xoffset <I>pixels</I></B> </DT>
-<DD>Specifies a screen distance
-to offset the marker horizontally.  <I>Pixels</I> is a valid screen distance, such
-as <I>2</I> or <I>1.2i</I>. The default is <I>0</I>. </DD>
-
-<DT><B>-yoffset <I>pixels</I></B> </DT>
-<DD>Specifies a screen distance
-to offset the markers vertically. <I>Pixels</I> is a valid screen distance, such
-as <I>2</I> or <I>1.2i</I>. The default is <I>0</I>. </DD>
-</DL>
-<P>
-Marker configuration options may also be set
-by the <B>option</B> command. The resource class is either <I>BitmapMarker</I>,  <I>ImageMarker</I>,
- <I>LineMarker</I>, <I>PolygonMarker</I>, <I>TextMarker</I>, or <I>WindowMarker</I>, depending on the
-type of marker.  The resource name is the name of the marker. <BR>
-<CODE>option add *Graph.TextMarker.Foreground white<BR>
-option add *Graph.BitmapMarker.Foreground white<BR>
-option add *Graph.m1.Background     blue<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>marker create <I>type</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a marker of the selected
-type. <I>Type</I> may be either <I>text</I>, <I>line</I>, <I>bitmap</I>, <I>image</I>, <I>polygon</I>, or <I>window</I>. 
-This command returns the marker identifier,  used as the <I>markerId</I> argument
-in the other marker-related commands.  If the <B>-name</B> option is used, this overrides
-the normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old. </DD>
-
-<DT><I>pathName <B>marker delete</B></I>
-?<I>name</I>?... </DT>
-<DD>Removes one of more markers.  The graph will automatically be redrawn
-without the marker..   </DD>
-
-<DT><I>pathName <B>marker exists <I>markerId</I></B></I>  </DT>
-<DD>Returns <I>1</I> if the
-marker <I>markerId</I> exists and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>marker names</B></I> ?<I>pattern</I>?
-  </DT>
-<DD>Returns the names of all the markers that currently exist.  If <I>pattern</I>
-is supplied, only those markers whose names match it will be returned. </DD>
-
-<DT><I>pathName
-<B>marker type <I>markerId</I></B></I>  </DT>
-<DD>Returns the type of the marker given by <I>markerId</I>,
-such as <I>line</I> or <I>text</I>.  If <I>markerId</I> is not a valid a marker identifier, <I>""</I>
-is returned. </DD>
-</DL>
-
-<H3><A NAME="sect16" HREF="#toc16">Bitmap Markers</A></H3>
-A bitmap marker displays a bitmap.  The size of
-the bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the bitmap.
- The bitmap retains its normal width and height.  If four coordinates, the
-first and second pairs of coordinates represent the corners of the bitmap.
- The bitmap will be stretched or reduced as necessary to fit into the bounding
-rectangle. <P>
-Bitmap markers are created with the marker's <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create bitmap </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each  sets a configuration options
-for the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's
-<B>configure</B> operation. <P>
-The following options are specific to bitmap markers:
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Same as the <B>-fill</B> option. </DD>
-
-<DT><B>-bitmap <I>bitmap</I></B> </DT>
-<DD>Specifies the bitmap
-to be displayed.  If <I>bitmap</I> is <I>""</I>, the marker will not be displayed.  The
-default is <I>""</I>. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background color of the bitmap.  If <I>color</I>
-is the empty string, no background will be transparent.  The default background
-color is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Same as the <B>-outline</B> option. </DD>
-
-<DT><B>-mask <I>mask</I></B> </DT>
-<DD>Specifies
-a mask for the bitmap to be displayed. This mask is a bitmap itself, denoting
-the pixels that are transparent.  If <I>mask</I> is <I>""</I>, all pixels of the bitmap
-will be drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the foreground color
-of the bitmap. The default value is <I>black</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Sets the rotation
-of the bitmap.  <I>Theta</I> is a real number representing the angle of rotation
-in degrees.  The marker is first rotated and then placed according to its
-anchor position.  The default rotation is <I>0.0</I>. </DD>
-</DL>
-
-<H3><A NAME="sect17" HREF="#toc17">Image Markers</A></H3>
-A image marker
-displays an image.  Image markers are created with the marker's <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create image </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to image markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the image relative to the positioning point
-for the image. For example, if <I>anchor</I> is <I>center</I> then the image is centered
-on the point;  if <I>anchor</I> is <I>n</I> then the image will be drawn such that the
-top center point of the rectangular region occupied by the image will be
-at the positioning point. This option defaults to <I>center</I>. </DD>
-
-<DT><B>-image <I>image</I></B> </DT>
-<DD>Specifies
-the image to be drawn. If <I>image</I> is <I>""</I>, the marker will not be drawn.  The
-default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Line Markers</A></H3>
-A line marker displays one or more connected
-line segments. Line markers are created with marker's <B>create</B> operation in
-the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create line </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to line markers: 
-<DL>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the line. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the line.
- Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the marker line
-will be solid. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background color of the line.  This color
-is used with striped lines (see the <B>-fdashes</B> option). If <I>color</I> is the empty
-string, no background color is drawn (the line will be dashed, not striped).
- The default background color is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width of
-the lines. The default width is <I>0</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the foreground color
-of the line. The default value is <I>black</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies a stipple
-pattern used to draw the line, rather than a solid line. <I>Bitmap</I> specifies
-a bitmap to use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then the line
-is drawn in a solid fashion. The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Polygon Markers</A></H3>
-A polygon
-marker displays a closed region described as two or more connected line
-segments.  It is assumed the first and last points are connected.  Polygon
-markers are created using the marker <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create polygon </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the <B>marker configure</B>
-command to change the marker's configuration. The following options are supported
-for polygon markers: 
-<DL>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of the outline
-of the polygon. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the outline.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the outline will be a solid
-line. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the fill color of the polygon.  If <I>color</I> is <I>""</I>, then
-the interior of the polygon is transparent. The default is <I>white</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the outline of the polygon. If <I>pixels</I> is zero,
- no outline is drawn. The default is <I>0</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the color of the
-outline of the polygon.  If the polygon is stippled (see the <B>-stipple</B> option),
-then this represents the foreground color of the stipple.  The default is
-<I>black</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies that the polygon should be drawn with a
-stippled pattern rather than a solid color. <I>Bitmap</I> specifies a bitmap to
-use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then the polygon is filled
-with a solid color (if the <B>-fill</B> option is set).  The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Text
-Markers</A></H3>
-A text marker displays a string of characters on one or more lines
-of text.  Embedded newlines cause line breaks.  They may be used to annotate
-regions of the graph.  Text markers are created with the <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create text </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs,  each sets a configuration option
-for the text marker.   These same <I>option</I>-<I>value</I> pairs may be used with the
- marker's <B>configure</B> operation.   <P>
-The following options are specific to text
-markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B> </DT>
-<DD><I>Anchor</I> tells how to position the text relative to
-the positioning point for the text. For example, if <I>anchor</I> is <I>center</I> then
-the text is centered on the point; if <I>anchor</I> is <I>n</I> then the text will be
-drawn such that the top center point of the rectangular region occupied
-by the text will be at the positioning point.  This default is <I>center</I>. </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Same as the <B>-fill</B> option. </DD>
-
-<DT><B>-font <I>fontName</I></B> </DT>
-<DD>Specifies the font of the text.
- The default is <I>*-Helvetica-Bold-R-Normal-*-120-*</I>. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the background
-color of the text.  If <I>color</I> is the empty string, no background will be
-transparent.  The default background color is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B> </DT>
-<DD>Same as
-the <B>-outline</B> option. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the text should be justified.
- This matters only when the marker contains more than one line of text.
-<I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>
-</DT>
-<DD>Sets the color of the text. The default value is <I>black</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the
-padding to the left and right exteriors of the text. <I>Pad</I> can be a list of
-one or two screen distances.  If <I>pad</I> has two elements, the left side of
-the text is padded by the first distance and the right side by the second.
- If <I>pad</I> has just one distance, both the left and right sides are padded
-evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and below the
-text.  <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has two
-elements, the area above the text is padded by the first distance and the
-area below by the second. If <I>pad</I> is just one distance, both the top and
-bottom areas are padded evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies
-the number of degrees to rotate the text.  <I>Theta</I> is a real number representing
-the angle of rotation.  The marker is first rotated along its center and
-is then drawn according to its anchor position. The default is <I>0.0</I>. </DD>
-
-<DT><B>-text <I>text</I></B>
-</DT>
-<DD>Specifies the text of the marker.  The exact way the text is displayed may
-be affected by other options such as <B>-anchor</B> or <B>-rotate</B>. </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Window Markers</A></H3>
-A window
-marker displays a widget at a given position. Window markers are created
-with the marker's <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create window </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-command. <P>
-The following options are specific to window markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the widget relative to the positioning point
-for the widget. For example, if <I>anchor</I> is <I>center</I> then the widget is centered
-on the point; if <I>anchor</I> is <I>n</I> then the widget will be displayed such that
-the top center point of the rectangular region occupied by the widget will
-be at the positioning point.  This option defaults to <I>center</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B>
-</DT>
-<DD>Specifies the height to assign to the marker's window.  If this option isn't
-specified, or if it is specified as <I>""</I>, then the window is given whatever
-height the widget requests internally. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the width
-to assign to the marker's window.  If this option isn't specified, or if it
-is specified as <I>""</I>, then the window is given whatever width the widget
-requests internally. </DD>
-
-<DT><B>-window <I>pathName</I></B> </DT>
-<DD>Specifies the widget to be managed
-by the graph.  <I>PathName</I> must be a child of the <B>graph</B> widget. </DD>
-</DL>
-
-<H2><A NAME="sect22" HREF="#toc22">Graph Component
-Bindings</A></H2>
-Specific graph components, such as elements, markers and legend
-entries, can have a command trigger when event occurs in them, much like
-canvas items in Tk's canvas widget.  Not all event sequences are valid.  The
-only binding events that may be specified are those related to the mouse
-and keyboard (such as <B>Enter</B>, <B>Leave</B>, <B>ButtonPress</B>, <B>Motion</B>, and <B>KeyPress</B>).
-<P>
-Only one element or marker can be picked during an event.  This means, that
-if the mouse is directly over both an element and a marker, only the uppermost
-component is selected.  This isn't true for legend entries.   Both a legend
-entry and an element (or marker) binding commands  will be invoked if both
-items are picked. <P>
-It is possible for multiple bindings to match a particular
-event. This could occur, for example, if one binding is associated with
-the element name and another is associated with one of the element's tags
-(see the <B>-bindtags</B> option).  When this occurs, all of the  matching bindings
-are invoked.  A binding associated with the element name is invoked first,
-followed by one binding for each of the element's  bindtags.  If there are
-multiple matching bindings for a single tag,  then only the most specific
-binding is invoked.  A continue command  in a binding script terminates
-that script, and a break command  terminates that script and skips any
-remaining scripts for the event,  just as for the bind command. <P>
-The <B>-bindtags</B>
-option for these components controls addition tag names which can be matched.
- Implicitly elements and markers always have tags matching their names.
- Setting the value of the <B>-bindtags</B> option doesn't change this. 
-<H2><A NAME="sect23" HREF="#toc23">C Language
-API</A></H2>
-You can manipulate data elements from the C language.  There may be situations
-where it is too expensive to translate the data values from ASCII strings.
- Or you might want to read data in a special file format. <P>
-Data can manipulated
-from the C language using BLT vectors. You specify the X-Y data coordinates
-of an element as vectors and manipulate the vector from C.  The graph will
-be redrawn automatically after the vectors are updated. <P>
-From Tcl, create
-the vectors and configure the element to use them. <BR>
-<CODE>vector X Y<BR>
-.g element configure line1 -xdata X -ydata Y<BR>
-</CODE><P>To set data points from C, you pass the values as arrays of doubles using
-the <B>Blt_ResetVector</B> call.  The vector is reset with the new data and at
-the next idle point (when Tk re-enters its event loop), the graph will be
-redrawn automatically. <BR>
-<CODE>#include <tcl.h><BR>
-#include <blt.h><BR>
-<P>
-register int i;<BR>
-Blt_Vector *xVec, *yVec;<BR>
-double x[50], y[50];<BR>
-<P>
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */<BR>
-if ((Blt_GetVector(interp, "X", &xVec) != TCL_OK) ||<BR>
-    (Blt_GetVector(interp, "Y", &yVec) != TCL_OK)) {<BR>
-    return TCL_ERROR;<BR>
-}<BR>
-<P>
-for (i = 0; i < 50; i++) {<BR>
-    x[i] = i * 0.02;<BR>
-    y[i] = sin(x[i]);<BR>
-}<tt> </tt> <tt> </tt> <BR>
-<P>
-/* Put the data into BLT vectors */<BR>
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||<BR>
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {<BR>
-   return TCL_ERROR;<BR>
-}<BR>
-</CODE><P>See the <B>vector</B> manual page for more details. 
-<H2><A NAME="sect24" HREF="#toc24">Speed Tips</A></H2>
-There may be cases
-where the graph needs to be drawn and updated as quickly as possible.  If
-drawing speed becomes a big problem, here are a few tips to speed up displays.
-
-<UL>
-·<LI>Try to minimize the number of data points.  The more data points the looked
-at, the more work the graph must do. </LI>·<LI>If your data is generated as floating
-point values, the time required to convert the data values to and from
-ASCII strings can be significant, especially when there any many data points.
- You can avoid the redundant string-to-decimal conversions using the C API
-to BLT vectors. </LI>·<LI>Data elements without symbols are drawn faster than with
-symbols. Set the data element's <B>-symbol</B> option to <I>none</I>.  If you need to draw
-symbols, try using the simple symbols such as <I>splus</I> and <I>scross</I>. </LI>·<LI>Don't stipple
-or dash the element.  Solid lines are much faster. </LI>·<LI>If you update data elements
-frequently, try turning off the widget's <B>-bufferelements</B> option.  When the
-graph is first displayed, it draws data elements into an internal pixmap.
- The pixmap acts as a cache, so that when the graph needs to be redrawn
-again, and the data elements or coordinate axes haven't changed, the pixmap
-is simply copied to the screen.  This is especially useful when you are
-using markers to highlight points and regions on the graph.  But if the
-graph is updated frequently, changing either the element data or coordinate
-axes, the buffering becomes redundant. </LI>
-</UL>
-
-<H2><A NAME="sect25" HREF="#toc25">Limitations</A></H2>
-Auto-scale routines do
-not use requested min/max limits as boundaries when the axis is logarithmically
-scaled. <P>
-The PostScript output generated for polygons with more than 1500
-points may exceed the limits of some printers (See PostScript Language
-Reference Manual, page 568).  The work-around is to break the polygon into
-separate pieces. 
-<H2><A NAME="sect26" HREF="#toc26">Keywords</A></H2>
-graph, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Syntax</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Example</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Graph Operations</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Graph Components</A></LI>
-<UL>
-<LI><A NAME="toc8" HREF="#sect8">Axis Components</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Crosshairs Component</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Element Components</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Grid Component</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Legend Component</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Pen Components</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">PostScript Component</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Marker Components</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Bitmap Markers</A></LI>
-<LI><A NAME="toc17" HREF="#sect17">Image Markers</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Line Markers</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Polygon Markers</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Text Markers</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Window Markers</A></LI>
-</UL>
-<LI><A NAME="toc22" HREF="#sect22">Graph Component Bindings</A></LI>
-<LI><A NAME="toc23" HREF="#sect23">C Language API</A></LI>
-<LI><A NAME="toc24" HREF="#sect24">Speed Tips</A></LI>
-<LI><A NAME="toc25" HREF="#sect25">Limitations</A></LI>
-<LI><A NAME="toc26" HREF="#sect26">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/hierbox.html b/blt3.0/html/hierbox.html
deleted file mode 100644
index 7f56d0e..0000000
--- a/blt3.0/html/hierbox.html
+++ /dev/null
@@ -1,2331 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>treeview(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-treeview - Create and manipulate hierarchical
-table widgets 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>treeview</B> <I>pathName </I>?<I>options</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>treeview</B>
-widget displays a tree of data.  It replaces both the <B>hiertable</B> and <B>hierbox</B>
-widgets.  The <B>treeview</B> is 100% syntax compatible with the <B>hiertable</B> widget.
- The <B>hiertable</B> command is retained for sake of script-level compatibility.
- This widget obsoletes the <B>hierbox</B> widget.  It does everything the old <B>hierbox</B>
-widget did, but also provides data sharing (via <I>tree data objects</I>) and
-the ability to tag nodes. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The <B>treeview</B> widget displays hierarchical
-data.  Data is represented as nodes in a general-ordered tree.  Each node
-may have sub-nodes and these nodes can in turn has their own children. <P>
-A
-node is displayed as a row entry in the widget.  Each entry has a text label
-and icon.  When a node has children, its entry is drawn with a small button
-to the left of the label.  Clicking the mouse over this button opens or
-closes the node.  When a node is <I>open</I>, its children are exposed.  When it
-is <I>closed</I>, the children and their descedants are hidden.  The button is
-normally a <I>+</I> or <I>-</I> symbol (ala Windows Explorer), but can be replaced with
-a pair of Tk images (open and closed images). <P>
-If the node has data associated
-with it, they can be displayed in columns running vertically on either
-side the tree.  You can control the color, font, etc of each entry.  Any
-entry label or data field can be edited in-place. 
-<H2><A NAME="sect4" HREF="#toc4">Tree Data Object</A></H2>
-The tree
-is not stored inside the widget but in a tree data object (see the <B>tree</B>
-command for a further explanation).  Tree data objects can be shared among
-different clients, such as a <B>treeview</B> widget or the <B>tree</B> command.  You can
-walk the tree and manage its data with the <B>tree</B> command tree, while displaying
-it with the <B>treeview</B> widget.  Whenever the tree is updated, the <B>treeview</B>
-widget is automatically redrawn. <P>
-By default, the <B>treeview</B> widget creates
-its own tree object. The tree initially contains just a root node.  But you
-can also display trees created by the <B>tree</B> command using the <B>-tree</B> configuration
-option.  <B>Treeview</B> widgets can share the same tree object, possibly displaying
-different views of the same data. <P>
-A tree object has both a Tcl and C API.
- You can insert or delete nodes using <B>treeview</B> widget or <B>tree</B> command operations,
-but also from C code.  For example, you can load the tree from your C code
-while still managing and displaying the tree from Tcl. The widget is automatically
-notified whenever the tree is modified via C or Tcl. 
-<H2><A NAME="sect5" HREF="#toc5">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>treeview <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>treeview</B> command creates a new window <I>pathName</I> and makes it into a
-<B>treeview</B> widget.  At the time this command is invoked, there must not exist
-a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options
-may be specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the <B>configure</B> operation
-below for the exact details about what <I>option</I> and <I>value</I> pairs are valid.
-<P>
-If successful, <B>treeview</B> returns the path name of the widget.  It also creates
-a new Tcl command by the same name.  You can use this command to invoke
-various operations that query or modify the widget. The general form is:
-<BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available are described in the <FONT SIZE=-1><B>TREEVIEW OPERATIONS</B></FONT>
-  section.
-
-<H2><A NAME="sect6" HREF="#toc6">IDs and Tags</A></H2>
-Nodes can be inserted into a tree using the <B>treeview</B> widget
- <BR>
-<CODE>blt::treeview .t<BR>
-set node [.t insert end root "one"]<BR>
-</CODE><P>or <B>tree</B> command.  <BR>
-<CODE>set tree [blt::tree create]<BR>
-set node [$tree insert root "one"]<BR>
-</CODE><P>In both cases, a number identifying the node is returned (the value of
-<I>$node</I>).  This serial number or <I>id</I> uniquely identifies the node.  Please note
-that you can't infer a location or position of a node from its id.  The only
-exception is that the root node is always id <I>0</I>. Since nodes may have the
-same labels or be moved within the tree, ids provide an convenient way
-to identify nodes.  If a tree is shared, the ids will be the same regardless
-if you are using by the <B>treeview</B> widget or the <B>tree</B> command.  Ids are recycled
-when the node deleted. <P>
-A node may also have any number of <I>tags</I> associated
-with it.  A tag is just a string of characters, and it may take any form
-except that of an integer.  For example, "<I>x123</I>" is valid, but "<I>123</I>" isn't.
- The same tag may be associated with many different nodes.  This is typically
-done to associate a group of nodes.  Many operations in the <B>treeview</B> widget
-take either node ids or tag names as arguments.  Using a tag says to apply
-the operation to all nodes with that tag. <P>
-The tag <B>all</B> is implicitly associated
-with every node in the tree.  It may be used to invoke operations on all
-the nodes in the tree.  <P>
-Tags may be shared, just like trees, between clients.
- For example, you can use the tags created by the <B>tree</B> command with <B>treeview</B>
-widgets. 
-<H2><A NAME="sect7" HREF="#toc7">Special Node IDs</A></H2>
-There are also several special non-numeric ids. 
-Special ids differ from tags in that they are always translated to their
-numeric equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to the
-<B>treeview</B> widget. 
-<DL>
-
-<DT><B>active</B> </DT>
-<DD>The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon  (see the <B>-activeicon</B>
-option). The <B>active</B> id is changed automatically by moving the mouse pointer
-over another node or by using the <B>entry activate</B> operation. Note that there
-can be only one active node at a time. </DD>
-
-<DT><B>anchor</B> </DT>
-<DD>The node representing the
-fixed end of the current selection.   The anchor is set by the <B>selection
-anchor</B> operation. </DD>
-
-<DT><B>current</B> </DT>
-<DD>The node where the mouse pointer is currently
-located. But unlike <B>active</B>, this id changes while the selection is dragged.
- It is used to determine the current node during button drags. </DD>
-
-<DT><B>down</B> </DT>
-<DD>The
-next open node from the current focus. The <B>down</B> of the last open node is
-the same. </DD>
-
-<DT><B>end</B> </DT>
-<DD>The last open node (in depth-first order) on the tree.   </DD>
-
-<DT><B>focus</B>
-</DT>
-<DD>The node that currently has focus.  When a node has focus, it receives key
-events.  To indicate focus, the node is drawn with a dotted line around
-its label.  You can change the  focus using the <B>focus</B> operation. </DD>
-
-<DT><B>last</B> </DT>
-<DD>The
-last open node from the current focus. But unlike <B>up</B>, when the focus is
-at root, <B>last</B> wraps around to the last open node in the tree. </DD>
-
-<DT><B>mark</B> </DT>
-<DD>The node
-representing the non-fixed end of the current selection.   The mark is set
-by the <B>selection mark</B> operation. </DD>
-
-<DT><B>next</B> </DT>
-<DD>The next open node from the current
-focus.  But unlike <B>down</B>, when the focus is on last open node, <B>next</B> wraps
-around to the  root node. </DD>
-
-<DT><B>nextsibling</B> </DT>
-<DD>The next sibling from the node with
-the current focus.  If the node is already the last sibling then it is the
-<B>nextsibling<B>. </DD>
-
-<DT><B>parent</B></B></B> </DT>
-<DD>The parent of the node with the current focus. The <B>parent</B>
-of the root is also the root. </DD>
-
-<DT><B>prevsibling</B> </DT>
-<DD>The previous sibling from the
-node with the current focus.  If the node is already the first sibling then
-it is the <B>prevsibling<B>. </DD>
-
-<DT><B>root</B></B></B> </DT>
-<DD>The root node. You can also use id <I>0</I> to indicate
-the root. </DD>
-
-<DT><B>up</B> </DT>
-<DD>The last open node (in depth-first order) from the current focus.
-The <B>up</B> of the root node (i.e. the root has focus) is also the root. </DD>
-
-<DT><B>view.top</B>
-</DT>
-<DD>First node that's current visible in the widget. </DD>
-
-<DT><B>view.bottom</B> </DT>
-<DD>Last node that's
-current visible in the widget. </DD>
-
-<DT><I>path</I>  </DT>
-<DD>Absolute path of a node.  Path names
-refer to the node name, not their entry labels. Paths don't have to start
-with a separator (see the <B>-separator</B> configuration option), but component
-names must be separated by the designated separator. </DD>
-
-<DT><B>@<I>x<B>,<I>y</I></B></I></B> </DT>
-<DD>Indicates the
-node that covers the point in the treeview window specified by <I>x</I> and <I>y</I>
-(in pixel coordinates).  If no part of the entryd covers that point, then
-the closest node to that point is used. </DD>
-</DL>
-<P>
-A node may be specified as an id
-or tag. If the specifier is an integer then it is assumed to refer to the
-single node with that id. If the specifier is not an integer, it's checked
-to see if it's a special id (such as focus).  Otherwise, it's assumed to be
-tag.  Some operations only operate on a single node at a time; if a tag
-refers to more than one node, then an error is generated. 
-<H2><A NAME="sect8" HREF="#toc8">Data Fields</A></H2>
-A node
-in the tree can have <I>data fields</I>.  A data field is a name-value pair, used
-to represent arbitrary data in the node.  Nodes can contain different fields
-(they aren't required to contain the same fields).  You can optionally display
-these fields in the <B>treeview</B> widget in columns running on either side of
-the displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a specific
-field is left blank.  Columns can be interactively resized, hidden, or,
-moved. 
-<H2><A NAME="sect9" HREF="#toc9">Entry Bindings</A></H2>
-You can bind Tcl commands to be invoked when events
-occur on nodes (much like Tk canvas items).  You can bind a node using its
-id or its <I>bindtags</I>.  Bindtags are simply names that associate a binding
-with one or more nodes.  There is a built-in tag <I>all</I> that all node entries
-automatically have. 
-<H2><A NAME="sect10" HREF="#toc10">Treeview Operations</A></H2>
-The <B>treeview</B> operations are the invoked
-by specifying the widget's pathname, the operation, and any arguments that
-pertain  to that operation.  The general form is: <P>
-<BR>
-<CODE><I>pathName operation </I>?<I>arg arg ...</I>?<BR>
-<P>
-</CODE><P><I>Operation</I> and the <I>arg</I>s determine the exact behavior of the command.  The
-following operation are available for <B>treeview</B> widgets: 
-<DL>
-
-<DT><I>pathName <B>bbox</B></I> ?<B>-screen</B>?
-<I>tagOrId...</I> </DT>
-<DD>Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more <I>tagOrId</I>  arguments.
-  If the <B>-screen</B> flag is given, then the x-y coordinates of the bounding
-box are returned as screen coordinates, not  virtual coordinates. Virtual
-coordinates start from <I>0</I> from the root node. The returned list contains
-the following values. <blockquote></DD>
-
-<DT><I>x</I>  </DT>
-<DD>X-coordinate of the upper-left corner of the bounding
-box. </DD>
-
-<DT><I>y</I> </DT>
-<DD>Y-coordinate of the upper-left corner of the bounding box. </DD>
-
-<DT><I>width</I> </DT>
-<DD>Width
-of the bounding box. </DD>
-
-<DT><I>height</I> </DT>
-<DD>Height of the bounding box. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for a node with this tag, <I>command</I>
-will be invoked.  The syntax is similar to the  <B>bind</B> command except that
-it operates on <B>treeview</B> entries,  rather than widgets. See the <B>bind</B> manual
-entry for complete details on <I>sequence</I> and the substitutions performed
-on  <I>command</I> before invoking it.   <P>
-If all arguments are specified then a
-new binding is created, replacing  any existing binding for the same <I>sequence</I>
-and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>  augments
-an existing binding rather than replacing it.  If no <I>command</I> argument is
-provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button <I>operation</I></B></I> ?<I>args</I>?
-</DT>
-<DD>This command is used to control the button selectors within a  <B>treeview</B>
-widget.   It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>button
-activate</B></I> <I>tagOrId</I> </DT>
-<DD>Designates the node given by <I>tagOrId</I> as active.   When
-a node is active it's entry is drawn using its active icon  (see the <B>-activeicon</B>
-option).  Note that there can be only one active entry at a time. The special
-id <B>active</B> indicates the currently active node. </DD>
-
-<DT><I>pathName <B>button bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for an button of a node entry with
-this tag, <I>command</I> will be invoked.  The syntax is similar to the <B>bind</B> command
-except that it operates on <B>treeview</B> buttons, rather than widgets. See the
-<B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on <I>command</I> before invoking it. <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>button configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the configuration options of the widget. If no <I>option</I> is specified, returns
-a list describing all of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B>
-for information on the format of this list).  If <I>option</I> is specified with
-no <I>value</I>, then the command returns a list describing the one named option
-(this list will be identical to the corresponding sublist of the value
-returned if no <I>option</I> is specified).  If one or more <I>option-value</I> pairs are
-specified, then the command modifies the given widget option(s) to have
-the given value(s);  in this case the command returns an empty string. <I>Option</I>
-and <I>value</I> are described in the section  <FONT SIZE=-1><B>BUTTON OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value of the configuration option given
-by <I>option</I>. <I>Option</I> may have any of the values accepted by the <B>configure</B> operation
-described below. </DD>
-
-<DT><I>pathName <B>close </B></I>?<B>-recurse</B>? <I>tagOrId...</I> </DT>
-<DD>Closes the node specified
-by <I>tagOrId</I>.  In addition, if a Tcl script was specified by the <B>-closecommand</B>
-option, it is invoked.  If the node is already closed, this command has
-no effect. If the <B>-recurse</B> flag is present, each child node is recursively
-closed. </DD>
-
-<DT><I>pathName <B>column <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are available
-for treeview columns. <blockquote></DD>
-
-<DT><I>pathName <B>column activate</B></I> <I>column</I> </DT>
-<DD>Sets the active column
-to <I>column</I>.  <I>Column</I> is the name of a column in the widget. When a column is
-active, it's drawn using its <B>-activetitlebackground</B> and <B>-activetitleforeground</B>
-options.  If <I>column</I> is the <I>""</I>, then no column will be active.  If no column
-argument is provided, then the name of the currently active column is returned.
-</DD>
-
-<DT><I>pathName <B>column cget</B></I> <I>name</I> <I>option</I> </DT>
-<DD>Returns the current value of the column
-configuration option given by <I>option</I> for <I>name</I>.  <I>Name</I> is the name of column
-that corresponds to a data field. <I>Option</I> may have any of the values accepted
-by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>column configure</B></I> <I>name</I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the column designated by <I>name</I>. <I>Name</I> is the name of the column corresponding
-to a data field. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>COLUMN OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>column delete</B></I> <I>field</I>
-?<I>field</I>...? </DT>
-<DD>Deletes one of more columns designated by <I>field</I>.  Note that this
-does not delete the data fields themselves. </DD>
-
-<DT><I>pathName <B>column insert</B></I> <I>position</I>
-<I>field</I> ?<I>options</I>...? </DT>
-<DD>Inserts one of more columns designated by <I>field</I>.  A column
-displays each node's data field by the same name.  If the node doesn't have
-the given field, the cell is left blank. <I>Position</I> indicates where in the
-list of columns to add the new column.  It may be either a number or <I>end</I>.
- </DD>
-
-<DT><I>pathName <B>column invoke</B></I> <I>field</I> </DT>
-<DD>Invokes the Tcl command associated with the
-column <I>field</I>,  if there is one (using the column's <B>-command</B> option).   The
-command is ignored if the column's <B>-state</B> option  set to <I>disabled</I>. </DD>
-
-<DT><I>pathName
-<B>column move <I>name</I></B></I> <I>dest</I>  </DT>
-<DD>Moves the column <I>name</I> to the destination position.
-  <I>Dest</I> is the name of another column or a screen position in the form <I>@<I>x<I>,<I>y</I></I></I></I>.
-</DD>
-
-<DT><I>pathName <B>column names</B></I> </DT>
-<DD>Returns a list of the names of all columns in the
-widget. The list is ordered as the columns are drawn from left-to-right. </DD>
-
-<DT><I>pathName
-<B>column nearest</B></I> <I>x</I> ?<I>y</I>? </DT>
-<DD>Returns the name of the column closest to the given
-X-Y screen coordinate.  If you provide a <I>y</I> argument (it's optional), a name
-is returned only when if the point is over a column's title. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>configure</B></I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the widget. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>TREEVIEW OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>curselection</B></I>
-</DT>
-<DD>Returns a list containing the ids of all of the entries that are  currently
-selected. If there are no entries selected, then the empty string is returned.
-</DD>
-
-<DT><I>pathName <B>delete <I>tagOrId</I></B></I>... </DT>
-<DD>Deletes one or more entries given by <I>tagOrId</I> and
-its children. </DD>
-
-<DT><I>pathName <B>entry <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are
-available for treeview entries. <blockquote></DD>
-
-<DT><I>pathName <B>entry activate</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the
-active entry to the one specified by <I>tagOrId</I>.   When an entry is active
-it is drawn using its active icon  (see the <B>-activeicon</B> option).  Note that
-there can be only one active node at a time. The special id of the currently
-active node is <B>active</B>. </DD>
-
-<DT><I>pathName <B>entry cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>entry
-children</B></I> <I>tagOrId</I>  ?<I>first</I>? ?<I>last</I>? </DT>
-<DD>Returns a list of ids for the given range
-of children of <I>tagOrId</I>.   <I>TagOrId</I> is the id or tag of the node to be examined.
-If only a <I>first</I> argument is present, then the id  of the that child at
-that numeric position is returned.  If both <I>first</I>  and <I>last</I> arguments are
-given, then the ids of all the children in that range are returned.  Otherwise
-the ids of all children are returned.   </DD>
-
-<DT><I>pathName <B>entry configure</B></I> ?<I>option</I>?
-?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options of the
-widget. If no <I>option</I> is specified, returns a list describing all of the
-available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information on
-the format of this list).  If <I>option</I> is specified with no <I>value</I>, then the
-command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described below: </DD>
-
-<DT><I>pathName <B>entry delete</B></I> <I>tagOrId</I> ?<I>first</I> ?<I>last</I>? </DT>
-<DD>Deletes the
-one or more children nodes of the parent <I>tagOrId</I>. If <I>first</I> and <I>last</I> arguments
-are present, they are positions designating a range of children nodes to
-be deleted. </DD>
-
-<DT><I>pathName <B>entry isbefore <I>tagOrId1</I></B></I> <I>tagOrId2</I> </DT>
-<DD>Returns 1 if <I>tagOrId1</I>
-is before <I>tagOrId2</I> and 0 otherwise. </DD>
-
-<DT><I>pathName <B>entry ishidden <I>tagOrId</I></B></I> </DT>
-<DD>Returns
-1 if the node is currently hidden and 0 otherwise.  A node is also hidden
-if any of its ancestor nodes are closed or hidden. </DD>
-
-<DT><I>pathName <B>entry isopen
-<I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the node is currently open and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>entry size</B></I> <B>-recurse</B> <I>tagOrId</I> </DT>
-<DD>Returns the number of children for parent node
-<I>tagOrId</I>.   If the <B>-recurse</B> flag is set, the number of all  its descendants
-is returned.  The node itself is not counted. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>find </B></I>?<I>flags</I>? <I>first</I>
-<I>last</I> </DT>
-<DD>Finds for all entries matching the criteria given by <I>flags</I>.  A list
-of ids for all matching nodes is returned. <I>First</I> and <I>last</I> are ids designating
-the range of the search in depth-first order. If <I>last</I> is before <I>first</I>, then
-nodes are searched in reverse order.  The valid flags are: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B>
-</DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern
-to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match
-against the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Patterns must match
-exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching
-is done in a fashion similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical except that the  following
- special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of
- characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character
-in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a
-sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I>
-and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This
-provides a way of  avoiding  the  special interpretation of the characters
-<I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern matching (i.e.
-the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Pick entries
-that don't match.   </DD>
-
-<DT><B>-exec<I> string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked for
-each matching node. Percent substitutions are performed on <I>string</I> before
- it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-count<I> number</I></B> </DT>
-<DD>Stop
-searching after <I>number</I> matches. </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>focus
-</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the focus to the node given by <I>tagOrId</I>.  When a node has focus,
-it can receive keyboard events.    The special id <B>focus</B> designates the node
-that currently has focus. </DD>
-
-<DT><I>pathName <B>get </B></I>?<B>-full</B>? <I>tagOrId</I> <I>tagOrId</I>... </DT>
-<DD>Translates
-one or more ids to their node entry names.  It returns a list of  names
-for all the ids specified.  If the <B>-full</B> flag is set, then the full pathnames
-are returned. </DD>
-
-<DT><I>pathName <B>hide </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Hides all nodes matching the
-criteria given by <I>flags</I>.  The search is performed recursively for each node
-given by <I>tagOrId</I>. The valid flags are described below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies
-pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match
-against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match against
-the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Match patterns exactly.  The
-is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching is done in a
-fashion similar to that used by the C-shell.  For  the  two strings  to match,
-their contents must be identical except that the  following  special  sequences
- may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of  characters in string,
-including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I>
-</DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a sequence of the form
-<I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I> and <I>y</I>, inclusive, will
-match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This provides a way of  avoiding
- the  special interpretation of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B>
-</DT>
-<DD>Use regular expression pattern matching (i.e. the same as implemented by
-the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Hide nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates
-the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>index </B></I>?<B>-at</B> <I>tagOrId</I>? <I>string</I>  </DT>
-<DD>Returns the id of
-the node specified by <I>string</I>.  <I>String</I> may be a tag or node id. Some special
-ids are normally relative to the node that  has focus.  The <B>-at</B> flag lets
-you select another node. </DD>
-
-<DT><I>pathName <B>insert </B></I>?<B>-at <I>tagOrId</I></B>? <I>position</I> <I>path</I> ?<I>options...</I>?
-?<I>path</I>? ?<I>options...</I>?  </DT>
-<DD>Inserts one or more nodes at <I>position</I>.  <I>Position</I> is the
-location (number or <I>end</I>) where the new nodes are added to the parent node.
- <I>Path</I> is the pathname of the new node. Pathnames can be formated either
-as a Tcl list (each element is a path component) or as a string separated
-by a special character sequence (using the <B>-separator</B> option).  Pathnames
-are normally absolute, but the <B>-at</B> switch lets you select a relative starting
-point.  Its value is the id of the starting node.   <P>
-All ancestors of the
-new node must already exist, unless the <B>-autocreate</B> option is set.  It is
-also an error if a node already exists, unless the <B>-allowduplicates</B> option
-is set. <P>
-<I>Option</I> and <I>value</I> may have any of the values accepted by the  <B>entry
-configure</B> operation described in the <FONT SIZE=-1><B>ENTRY OPERATIONS</B></FONT>
-  section below.  This
-command returns a list of the ids of the new entries. </DD>
-
-<DT><I>pathName <B>move <I>tagOrId</I></B></I>
-<I>how</I> <I>destId</I> </DT>
-<DD>Moves the node given by <I>tagOrId</I> to the destination node.  The
-node can not be an ancestor of the destination.  <I>DestId</I> is the id of the
-destination node and can not be the root of the tree.  In conjunction with
-<I>how</I>, it describes how the move is performed. <blockquote></DD>
-
-<DT><I>before</I> </DT>
-<DD>Moves the node before
-the destination node. </DD>
-
-<DT><I>after</I> </DT>
-<DD>Moves the node after the destination node. </DD>
-
-<DT><I>into</I>
-</DT>
-<DD>Moves the node to the end of the destination's list of children. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>nearest <I>x y</I></B></I> ?<I>varName</I>? </DT>
-<DD>Returns the id of the node entry closest to the given
-X-Y screen coordinate.  The optional argument <I>varName</I> is the name of variable
-which is set to either <I>button</I> or <I>select</I> to indicate over what part of the
-node the coordinate lies.   If the coordinate is not directly over any node,
-then <I>varName</I> will contain the empty string. </DD>
-
-<DT><I>pathName <B>open </B></I>?<B>-recurse</B>? <I>tagOrId...</I>
-</DT>
-<DD>Opens the one or more nodes specified by <I>tagOrId</I>.   If a node is not already
-open, the Tcl script specified by the  <B>-opencommand</B> option is invoked. If
-the <B>-recurse</B> flag  is present, then each descendant is recursively opened.
-  </DD>
-
-<DT><I>pathName <B>range</B></I> ?<B>-open</B>? <I>first last</I> </DT>
-<DD>Returns the ids in depth-first order
-of the nodes between the <I>first</I> and <I>last</I> ids.  If the <B>-open</B> flag is present,
-it indicates to consider only open nodes. If <I>last</I> is before <I>first</I>, then
-the ids are returned in reverse order. </DD>
-
-<DT><I>pathName <B>scan</B></I> <I>option args</I> </DT>
-<DD>This command
-implements scanning.  It has two forms, depending on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>scan
-mark <I>x y</I></B></I> </DT>
-<DD>Records <I>x</I> and <I>y</I> and the current view in the treeview window; 
-used in conjunction with later <B>scan dragto</B> commands. Typically this command
-is associated with a mouse button press in the widget.  It returns an empty
-string. </DD>
-
-<DT><I>pathName <B>scan dragto <I>x y</I></B></I>. </DT>
-<DD>Computes the difference between its <I>x</I> and
-<I>y</I> arguments and the <I>x</I> and <I>y</I> arguments to the last <B>scan mark</B> command for
-the widget. It then adjusts the view by 10 times the difference in coordinates.
- This command is typically associated with mouse motion events in the widget,
-to produce the effect of dragging the list at high speed through the window.
- The return value is an empty string. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>see</B></I> ?<B>-anchor <I>anchor</I></B>? <I>tagOrId</I>
-</DT>
-<DD>Adjusts the view of entries so that the node given by <I>tagOrId</I> is visible
-in the widget window.  It is an error if <B>tagOrId</B> is a tag that refers to
-more than one node.  By default the node's entry is displayed in the middle
-of the window.  This can changed using the <B>-anchor</B> flag.  Its value is a Tk
-anchor position. </DD>
-
-<DT><I>pathName <B>selection <I>option arg</I></B></I> </DT>
-<DD>This command is used to adjust
-the selection within a <B>treeview</B> widget.  It has several forms, depending
-on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>selection anchor <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection anchor
-to the node given by <I>tagOrId</I>. If <I>tagOrId</I> refers to a non-existent node, then
-the closest node is used. The selection anchor is the end of the selection
-that is fixed while dragging out a selection with the mouse. The special
-id <B>anchor</B> may be used to refer to the anchor node. </DD>
-
-<DT><I>pathName <B>selection cancel</B></I>
-</DT>
-<DD>Clears the temporary selection of entries back to the current anchor.  Temporary
-selections are created by  the <B>selection mark</B> operation. </DD>
-
-<DT><I>pathName <B>selection
-clear <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Removes the entries between <I>first</I> and <I>last</I> (inclusive)
-from the selection.  Both <I>first</I> and  <I>last</I> are ids representing a range of
-entries. If <I>last</I> isn't given, then only <I>first</I> is deselected. Entries outside
-the selection are not affected. </DD>
-
-<DT><I>pathName <B>selection clearall</B></I> </DT>
-<DD>Clears the entire
-selection.   </DD>
-
-<DT><I>pathName <B>selection mark <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection mark to
-the node given by <I>tagOrId</I>.  This causes the range of entries between the
-anchor and the mark to be temporarily added to the selection.  The selection
-mark is the end of the selection that is fixed while dragging out a selection
-with the mouse.  The special id <B>mark</B> may be used to refer to the current
- mark node. If <I>tagOrId</I> refers to a non-existent node, then the mark is ignored.
-Resetting the mark will unselect the previous range.  Setting the anchor
-finalizes the range. </DD>
-
-<DT><I>pathName <B>selection includes <I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the
-node given by <I>tagOrId</I> is currently selected, 0 if it isn't. </DD>
-
-<DT><I>pathName <B>selection
-present</B></I> </DT>
-<DD>Returns 1 if any nodes are currently selected and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>selection set <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects all of the nodes in the range between
-<I>first</I> and <I>last</I>, inclusive, without affecting the selection state of nodes
-outside that range. </DD>
-
-<DT><I>pathName <B>selection toggle <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects/deselects
-nodes in the range between <I>first</I> and <I>last</I>, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and visa versa.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>show </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Exposes all nodes matching the criteria given
-by <I>flags</I>.  This is the inverse of the <B>hide</B> operation.  The search is performed
-recursively for each node given by <I>tagOrId</I>.  The valid flags are described
-below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I>
-pattern</I></B> </DT>
-<DD>Specifies pattern to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B>
-</DT>
-<DD>Specifies pattern to match against the entry's configuration option. </DD>
-
-<DT><B>-exact</B>
-</DT>
-<DD>Match patterns exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD><B>-glob</B> Use global pattern
-matching.  Matching is done in a fashion similar to that used by the C-shell.
- For  the  two strings  to match, their contents must be identical except
-that the  following  special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches
- any  sequence  of  characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches
-any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set
-given by <I>chars</I>. If a sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any
-character between  <I>x</I> and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single
- character  <I>x</I>.  This provides a way of  avoiding  the  special interpretation
-of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern
-matching (i.e. the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B>
-</DT>
-<DD>Expose nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort</B></I>
-?<I>operation</I>? <I>args...</I> </DT>
-<DD><blockquote></DD>
-
-<DT><I>pathName <B>sort auto</B></I> ?<I>boolean</I> </DT>
-<DD>Turns on/off automatic sorting
-of node entries.  If <I>boolean</I> is true, entries will be automatically sorted
-as they are opened, closed, inserted, or deleted.  If no <I>boolean</I> argument
-is provided, the current state is returned. </DD>
-
-<DT><I>pathName <B>sort cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>sort configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the sorting configuration options of the widget. If no <I>option</I> is specified,
-returns a list describing all of the available options for <I>pathName</I> (see
-<B>Tk_ConfigureInfo</B> for information on the format of this list).  If <I>option</I>
-is specified with no <I>value</I>, then the command returns a list describing
-the one named option (this list will be identical to the corresponding
-sublist of the value returned if no <I>option</I> is specified).  If one or more
-<I>option-value</I> pairs are specified, then the command modifies the given sorting
-option(s) to have the given value(s);  in this case the command returns
-an empty string. <I>Option</I> and <I>value</I> are described below: <blockquote></DD>
-
-<DT><B>-column<I> string</I></B> </DT>
-<DD>Specifies
-the column to sort. Entries in the widget are rearranged according to this
-column.  If <I>column</I> is <I>""</I> then no sort is performed. </DD>
-
-<DT><B>-command<I> string</I></B> </DT>
-<DD>Specifies
-a Tcl procedure to be called when sorting nodes.  The procedure is called
-with three arguments: the pathname of the widget and the fields of two
-entries.  The procedure returns 1 if the first node is greater than the
-second, -1 is the second is greater, and 0 if equal.   </DD>
-
-<DT><B>-decreasing<I> boolean</I></B>
-</DT>
-<DD>Indicates to sort in ascending/descending order.  If <I>boolean</I>  is true, then
-the entries as in descending order. The default is  <I>no</I>. </DD>
-
-<DT><B>-mode<I> string</I></B> </DT>
-<DD>Specifies
-how to compare entries when sorting. <I>String</I> may be one of the following:
-<blockquote></DD>
-
-<DT><I>ascii</I> </DT>
-<DD>Use string comparison based upon the ASCII collation order. </DD>
-
-<DT><I>dictionary</I>
- </DT>
-<DD>Use dictionary-style comparison.  This is the same as <I>ascii</I> except (a) case
-is ignored except as a tie-breaker and (b) if two strings contain embedded
-numbers, the numbers compare as integers, not characters.  For example,
-"bigBoy" sorts between "bigbang" and "bigboy", and "x10y" sorts between
-"x9y" and "x11y". </DD>
-
-<DT><I>integer</I> </DT>
-<DD>Compares fields as integers. </DD>
-
-<DT><I>real</I> </DT>
-<DD>Compares fields
-as floating point numbers. </DD>
-
-<DT><I>command</I> </DT>
-<DD>Use the Tcl proc specified by the <B>-command</B>
-option to compare entries  when sorting.   If no command is specified, the
-sort reverts to  <I>ascii</I> sorting. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort once</B></I> ?<I>flags</I>? <I>tagOrId...</I> </DT>
-<DD>Sorts
-the children for each entries specified by <I>tagOrId</I>.   By default, entries
-are sorted by name, but you can specify a  Tcl proc to do your own comparisons.
-<blockquote></DD>
-
-<DT><B>-recurse</B> </DT>
-<DD>Recursively sort the entire branch, not just the children. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>tag <I>operation args</I></B></I> </DT>
-<DD>Tags are a general means of selecting and marking nodes
-in the tree. A tag is just a string of characters, and it may take any form
-except that of an integer.  The same tag may be associated with many different
-nodes.   <P>
-Both <I>operation</I> and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below. <blockquote></DD>
-
-<DT><I>pathName</I>
-<B>tag add</B> <I>string</I> <I>id</I>... </DT>
-<DD>Adds the tag <I>string</I> to one of more entries. </DD>
-
-<DT><I>pathName</I> <B>tag
-delete</B> <I>string</I> <I>id</I>... </DT>
-<DD>Deletes the tag <I>string</I> from one or more entries.   </DD>
-
-<DT><I>pathName</I>
-<B>tag forget</B> <I>string</I> </DT>
-<DD>Removes the tag <I>string</I> from all entries.  It's not an error
-if no entries are tagged as <I>string</I>. </DD>
-
-<DT><I>pathName</I> <B>tag names</B> ?<I>id</I>? </DT>
-<DD>Returns a list
-of tags used.  If an <I>id</I> argument is present, only those tags used by the
-node designated by <I>id</I>  are returned. </DD>
-
-<DT><I>pathName</I> <B>tag nodes</B> <I>string</I> </DT>
-<DD>Returns a
-list of ids that have the tag <I>string</I>.  If no node is tagged as <I>string</I>, then
-an empty string is returned. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>This operation
-is used to provide text editing for cells (data  fields in a column) or
-entry labels. It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>text
-apply</B></I> </DT>
-<DD>Applies the edited buffer, replacing the entry label or data field.
-The edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cancel</B></I> </DT>
-<DD>Cancels the editing operation,
-reverting the entry label  or data value back to the previous value. The
-edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cget<I> value</I></B></I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>text
-configure</B></I> ?<I>option value</I>? </DT>
-<DD>Query or modify the configuration options of the
-edit window. If no <I>option</I> is specified, returns a list describing all of
-the available options (see <B>Tk_ConfigureInfo</B> for information on the format
-of this list).  If <I>option</I> is specified with no <I>value</I>, then the command returns
-a list describing the one named option (this list will be identical to
-the corresponding sublist of the value returned if no <I>option</I> is specified).
- If one or more <I>option-value</I> pairs are specified, then the command modifies
-the given widget option(s) to have the given value(s);  in this case the
-command returns an empty string. <I>Option</I> and <I>value</I> are described in the section
- <FONT SIZE=-1><B>TEXT EDITING OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text delete<I> first last</I></B></I> </DT>
-<DD>Deletes the
-characters in the edit buffer between the two given character positions.
-  </DD>
-
-<DT><I>pathName <B>text get</B></I> ?<I>-root</I>? <I>x y</I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text icursor<I> index</I></B></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text
-index<I> index</I></B></I> </DT>
-<DD>Returns the text index of given <I>index</I>. </DD>
-
-<DT><I>pathName <B>text insert<I>
-index string</I></B></I> </DT>
-<DD>Insert the text string <I>string</I> into the edit buffer at the
-index  <I>index</I>.  For example, the index 0 will prepend the buffer. </DD>
-
-<DT><I>pathName
-<B>text selection<I> args</I></B></I> </DT>
-<DD>This operation controls the selection of the editing
-window.  Note that this differs from the selection of entries. It has the
-following forms: <blockquote></DD>
-
-<DT><I>pathName <B>text selection adjust<I> index</I></B></I> </DT>
-<DD>Adjusts either the
-first or last index of the selection. </DD>
-
-<DT><I>pathName <B>text selection clear</B></I> </DT>
-<DD>Clears
-the selection. </DD>
-
-<DT><I>pathName <B>text selection from<I> index</I></B></I> </DT>
-<DD>Sets the anchor of the
-selection. </DD>
-
-<DT><I>pathName <B>text selection present</B></I> </DT>
-<DD>Indicates if a selection is present.
-</DD>
-
-<DT><I>pathName <B>text selection range<I> start end</I></B></I> </DT>
-<DD>Sets both the anchor and mark of
-the selection. </DD>
-
-<DT><I>pathName <B>text selection to<I> index</I></B></I> </DT>
-<DD>Sets the unanchored end
-(mark) of the selection. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>toggle <I>tagOrId</I></B></I> </DT>
-<DD>Opens or closes the node
-given by <I>tagOrId</I>.  If the corresponding  <B>-opencommand</B> or <B>-closecommand</B> option
-is set, then that command is also invoked.  </DD>
-
-<DT><I>pathName <B>xview <I>args</I></B></I> </DT>
-<DD>This command
-is used to query and change the horizontal position of the information
-in the widget's window.  It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>xview</B></I> </DT>
-<DD>Returns a list containing two elements. Each element is a real fraction
-between 0 and 1;  together they describe the horizontal span that is visible
-in the window. For example, if the first element is .2 and the second element
-is .6, 20% of the <B>treeview</B> widget's text is off-screen to the left,  the middle
-40% is visible in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the <B>-xscrollcommand</B> option.
-</DD>
-
-<DT><I>pathName <B>xview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the window so that the character
-position given by <I>tagOrId</I> is displayed at the left edge of the window. Character
-positions are defined by the width of the character <B>0</B>. </DD>
-
-<DT><I>pathName <B>xview moveto<I>
-fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so that <I>fraction</I> of the total width
-of the <B>treeview</B> widget's text is off-screen to the left. <I>fraction</I> must be
-a fraction between 0 and 1. </DD>
-
-<DT><I>pathName <B>xview scroll <I>number what</I></B></I> </DT>
-<DD>This command
-shifts the view in the window left or right according to <I>number</I> and <I>what</I>.
-<I>Number</I> must be an integer. <I>What</I> must be either <B>units</B> or <B>pages</B> or an abbreviation
-of one of these. If <I>what</I> is <B>units</B>, the view adjusts left or right by <I>number</I>
-character units (the width of the <B>0</B> character) on the display;  if it is
-<B>pages</B> then the view adjusts by <I>number</I> screenfuls. If <I>number</I> is negative
-then characters farther to the left become visible;  if it is positive
-then characters farther to the right become visible. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>yview <I>?args</I></B></I>?
-</DT>
-<DD>This command is used to query and change the vertical position of the text
-in the widget's window. It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>yview</B></I> </DT>
-<DD>Returns a list containing two elements, both of which are real fractions
-between 0 and 1. The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means it is halfway
-through the treeview window, for example). The second element gives the
-position of the node just after the last one in the window, relative to
-the widget as a whole. These are the same values passed to scrollbars via
-the <B>-yscrollcommand</B> option. </DD>
-
-<DT><I>pathName <B>yview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the
-window so that the node given by <I>tagOrId</I> is displayed at the top of the
-window. </DD>
-
-<DT><I>pathName <B>yview moveto<I> fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so
-that the node given by <I>fraction</I> appears at the top of the window. <I>Fraction</I>
-is a fraction between 0 and 1;  0 indicates the first node, 0.33 indicates
-the node one-third the way through the <B>treeview</B> widget, and so on. </DD>
-
-<DT><I>pathName
-<B>yview scroll <I>number what</I></B></I> </DT>
-<DD>This command adjusts the view in the window up
-or down according to <I>number</I> and <I>what</I>. <I>Number</I> must be an integer. <I>What</I> must
-be either <B>units</B> or <B>pages</B>. If <I>what</I> is <B>units</B>, the view adjusts up or down
-by <I>number</I> lines;  if it is <B>pages</B> then the view adjusts by <I>number</I> screenfuls.
-If <I>number</I> is negative then earlier nodes become visible;  if it is positive
-then later nodes become visible. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect11" HREF="#toc11">Treeview Options</A></H2>
-In addition to the <B>configure</B>
-operation, widget configuration options may also be set by the Tk <B>option</B>
-command.  The class resource name is <I>TreeView</I>. <BR>
-<CODE>option add *TreeView.Foreground white<BR>
-option add *TreeView.Background blue<BR>
-</CODE><P>The following widget options are available: 
-<DL>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets
-the background color for active entries.  A node is active when the mouse
-passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of the active node.  A node is active when
-the mouse passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeicons
-<I>images</I></B> </DT>
-<DD>Specifies images to be displayed for an entry's icon when it is active.
-<I>Images</I> is a list of two Tk images:  the first image is displayed when the
-node is open, the second when it is closed. </DD>
-
-<DT><B>-autocreate <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I>
-is true, automatically create missing ancestor  nodes when inserting new
-nodes. Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-allowduplicates <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is true, allow nodes with duplicate pathnames when inserting
-new nodes.  Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets
-the background color of the widget.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the 3-D border around the outside edge of the widget. 
-The <B>-relief</B> option determines if the border is to be drawn.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked when a node
-is closed.  You can overrider this for individual entries using the entry's
-<B>-closecommand</B>  option. The default is <I>""</I>. Percent substitutions are performed
-on <I>string</I> before  it is executed.  The following substitutions are valid:
-<blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-cursor
-<I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-dashes <I>number</I></B>
-</DT>
-<DD>Sets the dash style of the horizontal and vertical lines drawn connecting
- entries. <I>Number</I> is the length in pixels of the dashes and gaps in the line.
-If <I>number</I> is <I>0</I>, solid lines will  be drawn. The default is <I>1</I> (dotted). </DD>
-
-<DT><B>-exportselection
-<I>boolean</I></B>  </DT>
-<DD>Indicates if the selection is exported.  If the widget is exporting
-its selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type <B>STRING</B>; the value of the
-selection will be the label of the selected nodes, separated by newlines.
- The default is <I>no</I>. </DD>
-
-<DT><B>-flat <I>boolean</I></B> </DT>
-<DD>Indicates whether to display the tree as
-a flattened list.  If <I>boolean</I> is true, then the hierarchy will be a list
-of full paths for the nodes.  This option also has affect on sorting.  See
-the  <FONT SIZE=-1><B>SORT OPERATIONS</B></FONT>
-  section for more information. The default is <I>no</I>. </DD>
-
-<DT><B>-focusdashes
-<I>dashList</I></B>  </DT>
-<DD>Sets the dash style of the outline rectangle drawn around the
-entry label of the node that current has focus. <I>Number</I> is the length in
-pixels of the dashes and gaps in the line.  If <I>number</I> is <I>0</I>, a solid line
-will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-focusforeground <I>color</I></B>  </DT>
-<DD>Sets the color of
-the focus rectangle.  The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the
-font for entry labels.  You can override this for individual entries with
-the entry's <B>-font</B> configuration option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of entry labels.  You can override
-this for individual entries with the entry's <B>-foreground</B> configuration option.
-  The default is <I>black</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of
-widget.  The default is <I>400</I>. </DD>
-
-<DT><B>-hideroot <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, it indicates
-that no entry for the root node  should be displayed.  The default is <I>no</I>.
-</DD>
-
-<DT><B>-highlightbackground  <I>color</I></B> </DT>
-<DD>Specifies the normal color of the traversal
-highlight region when the widget does not have the input focus.   </DD>
-
-<DT><B>-highlightcolor
-<I>color</I></B> </DT>
-<DD>Specifies the color of the traversal highlight rectangle when the
-widget has the input focus.  The default is <I>black</I>. </DD>
-
-<DT><B>-highlightthickness <I>pixels</I></B>
-</DT>
-<DD>Specifies the width of the highlight rectangle indicating when the widget
-has input focus. The value may have any of the forms acceptable to <B>Tk_GetPixels</B>.
- If the value is zero, no focus highlight will be displayed.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-icons <I>images</I></B> </DT>
-<DD>Specifies images for the entry's icon. <I>Images</I> is a list
-of two Tk images:  the first image is displayed when the node is open,
-the second when it is closed. </DD>
-
-<DT><B>-linecolor <I>color</I></B> </DT>
-<DD>Sets the color of the connecting
-lines drawn between entries.   The default is <I>black</I>. </DD>
-
-<DT><B>-linespacing <I>pixels</I></B> </DT>
-<DD>Sets
-the number of pixels spacing between entries.   The default is <I>0</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Set the width of the lines drawn connecting entries.  If <I>pixels</I> is
-<I>0</I>, no vertical or horizontal lines are drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-opencommand
-<I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked when a node is open.   You can
-override this for individual entries with the entry's <B>-opencommand</B> configuration
-option.  The default is <I>""</I>. Percent substitutions are performed on <I>string</I>
-before  it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect for the widget.  <I>Relief</I> specifies how the <B>treeview</B> widget
-should appear relative to widget  it is packed into; for example, <I>raised</I>
-means the <B>treeview</B> widget  should appear to protrude.  The default is <I>sunken</I>.
-</DD>
-
-<DT><B>-scrollmode <I>mode</I></B>  </DT>
-<DD>Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is <I>hierbox</I>. <blockquote></DD>
-
-<DT><I>listbox</I> </DT>
-<DD>Like the <B>listbox</B>
-widget, the last entry can always be scrolled to the top of the widget
-window.  This allows the scrollbar thumb to shrink as the last entry is
-scrolled upward. </DD>
-
-<DT><I>hierbox</I> </DT>
-<DD>Like the <B>hierbox</B> widget, the last entry can only
-be viewed at the bottom of the widget window.  The scrollbar stays a constant
-size.   </DD>
-
-<DT><I>canvas</I> </DT>
-<DD>Like the <B>canvas</B> widget, the entries are bound within the
-scrolling area.  </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-selectbackground <I>color</I></B> </DT>
-<DD>Sets the background color selected
-node entries. The default is <I>#ffffea</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the raised 3-D border drawn around the labels  of selected entries. The
-default is <I>0</I>. <B>-selectcommand <I>string</I></B> Specifies a Tcl script to invoked when
-the set of selected nodes changes. The default is <I>""</I>. </DD>
-
-<DT><B>-selectforeground <I>color<B>
-</B></I></B></DT>
-<DD>Sets the color of the labels of selected node entries.  The default is <I>black</I>.
-</DD>
-
-<DT><B>-selectmode <I>mode</I></B> </DT>
-<DD>Specifies the selection mode. If <I>mode</I> is  <I>single</I>, only one
-node can be selected at a time.  If <I>multiple</I> more than one node can be selected.
-The default is <I>single</I>. </DD>
-
-<DT><B>-separator <I>string</I></B> </DT>
-<DD>Specifies the character sequence
-to use when spliting the path components.   The separator may be several
-characters wide (such as "::") Consecutive separators in a pathname are
-treated as one. If <I>string</I> is the empty string, the pathnames are Tcl lists.
- Each element is a path component.   The default is <I>""</I>. </DD>
-
-<DT><B>-showtitles <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is false, column titles are not be displayed.   The default is
-<I>yes</I>. </DD>
-
-<DT><B>-sortselection <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, nodes in the selection are
-ordered as they are currently displayed (depth-first or sorted), not in
-the order they were selected. The default is <I>no</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides
-information used when moving the focus from window to window via keyboard
-traversal (e.g., Tab and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window
-should be skipped entirely during keyboard traversal.  <I>1</I> means that the
-this window should always receive the input focus.  An empty value means
-that the traversal scripts make the decision whether to focus on the window.
-The default is <I>"1"</I>. </DD>
-
-<DT><B>-trim <I>string</I></B> </DT>
-<DD>Specifies a string leading characters to
-trim from entry pathnames  before parsing.  This only makes sense if the
-<B>-separator</B> is also set.  The default is <I>""</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Sets the requested
-width of the widget.  If <I>pixels</I> is 0, then the with is computed from the
-contents of the <B>treeview</B> widget. The default is <I>200</I>. </DD>
-
-<DT><B>-xscrollcommand <I>string</I></B>
-</DT>
-<DD>Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window  changes,
-the widget will generate a Tcl command by concatenating the  scroll command
-and two numbers.  If this option is not specified, then  no command will
-be executed. </DD>
-
-<DT><B>-xscrollincrement</B> <I>pixels</I> </DT>
-<DD>Sets the horizontal scrolling distance.
-The default is 20 pixels. </DD>
-
-<DT><B>-yscrollcommand <I>string</I></B> </DT>
-<DD>Specifies the prefix for
-a command used to communicate with vertical scrollbars.   Whenever the vertical
-view in the widget's window  changes, the widget will generate a Tcl command
-by concatenating the  scroll command and two numbers.  If this option is
-not specified, then  no command will be executed. </DD>
-
-<DT><B>-yscrollincrement</B> <I>pixels</I>
-</DT>
-<DD>Sets the vertical scrolling distance. The default is 20 pixels. </DD>
-</DL>
-
-<H2><A NAME="sect12" HREF="#toc12">Entry Options</A></H2>
-Many
-widget configuration options have counterparts in entries.  For example,
-there is a <B>-closecommand</B> configuration option for both widget itself and
-for individual entries.  Options set at the widget level are global for
-all entries.  If the entry configuration option is set, then it overrides
-the widget option.  This is done to avoid wasting memory by replicated options.
- Most entries will have redundant options. <P>
-There is no resource class or
-name for entries. 
-<DL>
-
-<DT><B>-activeicons <I>images</I></B> </DT>
-<DD>Specifies images to be displayed as
-the entry's icon when it is active. This overrides the global <B>-activeicons</B>
-configuration option for the specific entry. <I>Images</I> is a list of two Tk
-images:  the first image is displayed when the node is open, the second
-when it is closed. </DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for nodes.
- <I>TagList</I> is a list of binding tag names.  The tags and their order will
-determine how events are handled for nodes.  Each tag in the list matching
-the current  event sequence will have its Tcl command executed.  The default
-value  is <I>all</I>. </DD>
-
-<DT><B>-button <I>string</I></B> </DT>
-<DD>Indicates whether a button should be displayed
-on the left side of the node entry.  <I>String</I> can be <I>yes</I>, <I>no</I>,  or <I>auto</I>.  If
-<I>auto</I>, then a button is automatically displayed if the node has children.
- This is the default. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked
-when the node is closed.  This overrides the global <B>-closecommand</B> option
-for this entry. The default is <I>""</I>. Percent substitutions are performed on
-<I>string</I> before  it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I>
-</DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-data
-<I>string</I></B> </DT>
-<DD>Sets data fields for the node.  <I>String</I> is a list of  name-value pairs
-to be set. The default is <I>""</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Sets the font for entry labels.
- This overrides the widget's <B>-font</B> option for this node.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of the entry label.  This overrides
-the widget's <B>-foreground</B> configuration option.  The default is <I>""</I>. </DD>
-
-<DT><B>-icons <I>images</I></B>
-</DT>
-<DD>Specifies images to be displayed for the entry's icon. This overrides the
-global <B>-icons</B> configuration option. <I>Images</I> is a list of two Tk images:  the
-first image is displayed when the node is open, the second when it is closed.
-</DD>
-
-<DT><B>-label <I>string</I></B> </DT>
-<DD>Sets the text for the entry's label.  If not set, this  defaults
-to the name of the node. The default is <I>""</I>. </DD>
-
-<DT><B>-opencommand <I>string</I></B> </DT>
-<DD>Specifies
-a Tcl script to be invoked when the entry is opened.   This overrides the
-widget's <B>-opencommand</B> option for this node.   The default is <I>""</I>.  Percent substitutions
-are performed on <I>string</I> before  it is executed.  The following substitutions
-are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The
-full pathname of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single
-percent. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect13" HREF="#toc13">Button Options</A></H2>
-Button configuration options may also be set by the
-<B>option</B> command. The resource subclass is <I>Button</I>.   The resource name is always
-<I>button</I>. <BR>
-<CODE>option add *TreeView.Button.Foreground white<BR>
-option add *TreeView.button.Background blue<BR>
-</CODE><P>The following are the configuration options available for buttons. 
-<DL>
-
-<DT><B>-activebackground
-<I>color</I></B> </DT>
-<DD>Sets the background color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background of the button.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the button.   The <B>-relief</B> option
-determines if a border is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-closerelief <I>relief</I></B>
-</DT>
-<DD>Specifies the 3-D effect for the closed button.  <I>Relief</I> indicates how the
-button should appear relative to the widget;  for example, <I>raised</I> means
-the button should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B>
-</DT>
-<DD>Sets the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets
-the foreground color of buttons.  The default is <I>black</I>. </DD>
-
-<DT><B>-images <I>images</I></B> </DT>
-<DD>Specifies
-images to be displayed for the button. <I>Images</I> is a list of two Tk images:
- the first image is displayed when the button is open, the second when
-it is closed.  If the <I>images</I> is the empty string, then a plus/minus gadget
-is drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-openrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of
-the open button.  <I>Relief</I> indicates how the button should appear relative
-to the widget;  for example, <I>raised</I> means the button should appear to protrude.
- The default is <I>flat</I>. </DD>
-
-<DT><B>-size <I>pixels</I></B> </DT>
-<DD>Sets the requested size of the button.
-  The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect14" HREF="#toc14">Column Options</A></H2>
-Column configuration options may also
-be set by the <B>option</B> command. The resource subclass is <I>Column</I>.   The resource
-name is the  name of the column. <BR>
-<CODE>option add *TreeView.Column.Foreground white<BR>
-option add *TreeView.treeView.Background blue<BR>
-</CODE><P>The following configuration options are available for columns. 
-<DL>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color of the column.  This overrides the widget's
-<B>-background</B> option. The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the 3-D border of the column.   The <B>-relief</B> option determines if a border
-is to be drawn.  The default is <I>0</I>. </DD>
-
-<DT><B>-edit <I>boolean</I></B> </DT>
-<DD>Indicates if the column's
-data fields can be edited. If <I>boolean</I> is  false, the data fields in the
-column may not be edited. The default is <I>yes</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Specifies
-the foreground color of the column.  You can override this for individual
-entries with the entry's  <B>-foreground</B> option. The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>
- </DT>
-<DD>Sets the font for a column.  You can override this for individual entries
-with the entry's <B>-font</B> option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, the column is not displayed. The default
-is <I>yes</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the column data fields title should
-be justified within the column.  This matters only when the column is wider
-than the  data field to be display. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.
-  The default is <I>left</I>. </DD>
-
-<DT><B>-pad <I>pad</I></B> </DT>
-<DD>Specifies how much padding for the left and
-right sides of the column. <I>Pad</I> is a list of one or two screen distances.
- If <I>pad</I> has two elements, the left side of the column is padded by the
-first distance and the right side by the second.  If <I>pad</I> has just one distance,
-both the left and right sides are padded evenly.  The default is <I>2</I>. </DD>
-
-<DT><B>-relief
-<I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the column.  <I>Relief</I> specifies how the
-column should appear relative to the widget;  for example, <I>raised</I> means
-the column should appear to protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-state <I>state</I></B> </DT>
-<DD>Sets
-the state of the column. If <I>state</I> is <I>disable</I> then the column title can not
-be activated nor invoked. The default is <I>normal</I>. </DD>
-
-<DT><B>-text <I>string</I></B> </DT>
-<DD>Sets the title
-for the column. The default is <I>""</I>. </DD>
-
-<DT><B>-titleforeground <I>color</I></B>  </DT>
-<DD>Sets the foreground
-color of the column title.  The default is <I>black</I>. </DD>
-
-<DT><B>-titleshadow <I>color</I></B>  </DT>
-<DD>Sets
-the color of the drop shadow of the column title.   The default is <I>""</I>. </DD>
-
-<DT><B>-width
-<I>pixels</I></B> </DT>
-<DD>Sets the requested width of the column.  This overrides the computed
-with of the column.  If <I>pixels</I> is 0, the width is computed as from the contents
-of the column. The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect15" HREF="#toc15">Text Editing Options</A></H2>
-Text edit window configuration
-options may also be set by the  <B>option</B> command. The resource class is <I>TreeViewEditor</I>.
-The resource name is always <I>edit</I>. <BR>
-<CODE>option add *TreeViewEditor.Foreground white<BR>
-option add *edit.Background blue<BR>
-</CODE><P>The following are the configuration options available for the text editing
-window. 
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background of the text edit window.  The
-default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the edit window.   The <B>-relief</B> option determines if a border is to be drawn.
- The default is <I>1</I>. </DD>
-
-<DT><B>-exportselection <I>boolean</I></B> </DT>
-<DD>Indicates if the text selection
-is exported.  If the edit window is  exporting its selection then it will
-observe the standard X11 protocols  for handling the selection.  Selections
-are available as type <B>STRING</B>. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect of the edit window.  <I>Relief</I> indicates how the background should
-appear relative to the edit window; for example, <I>raised</I> means the background
-should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-selectbackground <I>color</I></B>
-</DT>
-<DD>Sets the background of the selected text in the edit window.   The default
-is <I>white</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the selected text in the  edit window.  The <B>-selectrelief</B> option determines
-if a border  is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-selectforeground <I>color</I></B> </DT>
-<DD>Sets
-the foreground of the selected text in the edit window.   The default is
-<I>white</I>. </DD>
-
-<DT><B>-selectrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the selected text
-in the edit window.   <I>Relief</I> indicates how the text should appear relative
-to the edit window; for example, <I>raised</I> means the text should appear to
-protrude.  The default is <I>flat</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect16" HREF="#toc16">Default Bindings</A></H2>
-Tk automatically creates
-class bindings for treeviews that give them Motif-like behavior.  Much of
-the behavior of a <B>treeview</B> widget is determined by its <B>-selectmode</B> option,
-which selects one of two ways of dealing with the selection. <P>
-If the selection
-mode is <B>single</B>, only one node can be  selected at a time. Clicking button
-1 on an node selects it and deselects any other selected item. <P>
-If the selection
-mode is <B>multiple</B>, any number of entries may be selected at once, including
-discontiguous ranges.  Clicking Control-Button-1 on a node entry toggles its
-selection state without affecting any other entries. Pressing Shift-Button-1
-on a node entry selects it, extends the selection. 
-<OL>
-<LI>In <B>extended</B> mode, the
-selected range can be adjusted by pressing button 1 with the Shift key
-down:  this modifies the selection to consist of the entries between the
-anchor and the entry under the mouse, inclusive. The un-anchored end of this
-new selection can also be dragged with the button down. </LI><LI>In <B>extended</B> mode,
-pressing button 1 with the Control key down starts a toggle operation:
-the anchor is set to the entry under the mouse, and its selection state
-is reversed.  The selection state of other entries isn't changed. If the mouse
-is dragged with button 1 down, then the selection state of all entries
-between the anchor and the entry under the mouse is set to match that of
-the anchor entry;  the selection state of all other entries remains what
-it was before the toggle operation began. </LI><LI>If the mouse leaves the treeview
-window with button 1 down, the window scrolls away from the mouse, making
-information visible that used to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the button
-is released, or the end of the hierarchy is reached. </LI><LI>Mouse button 2 may
-be used for scanning. If it is pressed and dragged over the <B>treeview</B> widget,
-the contents of the hierarchy drag at high speed in the direction the mouse
-moves. </LI><LI>If the Up or Down key is pressed, the location cursor (active entry)
-moves up or down one entry. If the selection mode is <B>browse</B> or <B>extended</B>
-then the new active entry is also selected and all other entries are deselected.
-In <B>extended</B> mode the new active entry becomes the selection anchor. </LI><LI>In <B>extended</B>
-mode, Shift-Up and Shift-Down move the location cursor (active entry) up
-or down one entry and also extend the selection to that entry in a fashion
-similar to dragging with mouse button 1. </LI><LI>The Left and Right keys scroll
-the <B>treeview</B> widget view left and right by the width of the character <B>0</B>.
-Control-Left and Control-Right scroll the <B>treeview</B> widget view left and right
-by the width of the window. Control-Prior and Control-Next also scroll left
-and right by the width of the window. </LI><LI>The Prior and Next keys scroll the
-<B>treeview</B> widget view up and down by one page (the height of the window).
-</LI><LI>The Home and End keys scroll the <B>treeview</B> widget horizontally to the left
-and right edges, respectively. </LI><LI>Control-Home sets the location cursor to the
-the first entry,  selects that entry, and deselects everything else in
-the widget. </LI><LI>Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else in the widget. </LI><LI>In <B>extended</B>
-mode, Control-Shift-Home extends the selection to the first entry and Control-Shift-End
-extends the selection to the last entry. </LI><LI>In <B>multiple</B> mode, Control-Shift-Home
-moves the location cursor to the first entry and Control-Shift-End moves
-the location cursor to the last entry. </LI><LI>The space and Select keys make a
-selection at the location cursor (active entry) just as if mouse button
-1 had been pressed over this entry. </LI><LI>In <B>extended</B> mode, Control-Shift-space
-and Shift-Select extend the selection to the active entry just as if button
-1 had been pressed with the Shift key down. </LI><LI>In <B>extended</B> mode, the Escape
-key cancels the most recent selection and restores all the entries in the
-selected range to their previous selection state. </LI><LI>Control-slash selects everything
-in the widget, except in <B>single</B> and <B>browse</B> modes, in which case it selects
-the active entry and deselects everything else. </LI><LI>Control-backslash deselects
-everything in the widget, except in <B>browse</B> mode where it has no effect.
-</LI><LI>The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the
-selection in the widget to the clipboard, if there is a selection. </LI>
-</OL>
-<P>
-The behavior
-of <B>treeview</B> widgets can be changed by defining new bindings  for individual
-widgets or by redefining the class bindings. 
-<H3><A NAME="sect17" HREF="#toc17">Widget Bindings</A></H3>
-In addition
-to the above behavior, the following additional behavior is defined by
-the default widget class (TreeView) bindings. 
-<DL>
-
-<DT><I><ButtonPress-2></I></DT>
-<DD>Starts scanning.
- </DD>
-
-<DT><I><B2-Motion></I></DT>
-<DD>Adjusts the scan. </DD>
-
-<DT><I><ButtonRelease-2></I></DT>
-<DD>Stops scanning. </DD>
-
-<DT><I><B1-Leave></I></DT>
-<DD>Starts auto-scrolling.
-</DD>
-
-<DT><I><B1-Enter></I></DT>
-<DD>Starts auto-scrolling  </DD>
-
-<DT><I><KeyPress-Up></I></DT>
-<DD>Moves the focus to the previous
-entry. </DD>
-
-<DT><I><KeyPress-Down></I></DT>
-<DD>Moves the focus to the next entry. </DD>
-
-<DT><I><Shift-KeyPress-Up></I></DT>
-<DD>Moves
-the focus to the previous sibling. </DD>
-
-<DT><I><Shift-KeyPress-Down></I></DT>
-<DD>Moves the focus to the
-next sibling. </DD>
-
-<DT><I><KeyPress-Prior></I></DT>
-<DD>Moves the focus to first entry.  Closed or hidden
-entries are ignored. </DD>
-
-<DT><I><KeyPress-Next></I></DT>
-<DD>Move the focus to the last entry. Closed
-or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-Left></I></DT>
-<DD>Closes the entry.  It is not an
-error if the entry has no children. </DD>
-
-<DT><I><KeyPress-Right></I></DT>
-<DD>Opens the entry, displaying
-its children.  It is not an error if the entry has no children. </DD>
-
-<DT><I><KeyPress-space></I></DT>
-<DD>In
-"single" select mode this selects the entry.  In "multiple" mode, it toggles
-the entry (if it was previous selected, it is not deselected). </DD>
-
-<DT><I><KeyRelease-space></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress-Return></I></DT>
-<DD>Sets the focus to the current entry. </DD>
-
-<DT><I><KeyRelease-Return></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress></I></DT>
-<DD>Moves to the next entry whose label starts with
-the letter typed. </DD>
-
-<DT><I><KeyPress-Home></I></DT>
-<DD>Moves the focus to first entry.  Closed or
-hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-End></I></DT>
-<DD>Move the focus to the last entry.
-Closed or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-F1></I></DT>
-<DD>Opens all entries. </DD>
-
-<DT><I><KeyPress-F2></I></DT>
-<DD>Closes
-all entries (except root). </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Button Bindings</A></H3>
-Buttons have bindings.  There are
-associated with the "all" bindtag (see the entry's -bindtag option).  You
-can use the <B>bind</B> operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the button of
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the button back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the view so that the current entry is visible. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Entry Bindings</A></H3>
-Entries have
-default bindings.  There are associated with the "all" bindtag (see the
-entry's -bindtag option).  You can use the <B>bind</B> operation to modify them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the entry back to its normal state. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets
-the selection anchor the current entry. </DD>
-
-<DT><I><Double-ButtonPress-1></I></DT>
-<DD>Toggles the selection
-of the current entry. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>For "multiple" mode only.  Saves the current
-location of the pointer for auto-scrolling.  Resets the selection mark.  
-</DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>For "multiple" mode only.  Sets the selection anchor to the
- current entry. </DD>
-
-<DT><I><Shift-ButtonPress-1></I></DT>
-<DD>For "multiple" mode only. Extends the selection.
-</DD>
-
-<DT><I><Shift-Double-ButtonPress-1></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Shift-B1-Motion></I></DT>
-<DD>Place holder.
-Does nothing. </DD>
-
-<DT><I><Shift-ButtonRelease-1></I></DT>
-<DD>Stop auto-scrolling. </DD>
-
-<DT><I><Control-ButtonPress-1></I></DT>
-<DD>For
-"multiple" mode only.  Toggles and extends the selection. </DD>
-
-<DT><I><Control-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Control-ButtonRelease-1></I></DT>
-<DD>Stops
-auto-scrolling. </DD>
-
-<DT><I><Control-Shift-ButtonPress-1></I></DT>
-<DD>??? </DD>
-
-<DT><I><Control-Shift-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-Shift-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Column
-Bindings</A></H3>
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the <B>column bind</B>
-operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the current column title. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns
-the column back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Invokes the command (see
-the column's -command option) if one if specified.   </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Column Rule Bindings</A></H3>
-
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current and activates the ruler. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the column back to its
-normal state. Deactivates the ruler. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets the resize anchor for
-the column. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>Sets the resize mark for the column. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the size of the column, based upon the resize anchor and mark positions.
-</DD>
-</DL>
-
-<H2><A NAME="sect22" HREF="#toc22">Example</A></H2>
-The <B>treeview</B> command creates a new widget.   <BR>
-<CODE>treeview .h -bg white<BR>
-</CODE><P>A new Tcl command <I>.h</I> is also created.  This command can be used to query
-and modify the <B>treeview</B> widget.  For example, to change the  background
-color of the table to "green", you use the new command and the widget's
-<B>configure</B> operation. <BR>
-<CODE># Change the background color.<BR>
-.h configure -background "green"<BR>
-</CODE><P>By default, the <B>treeview</B> widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the widget.
- Above, the new tree object name is ".h".  But you can use the <B>-tree</B> option
-to specify the name of another tree. <BR>
-<CODE># View the tree "myTree".<BR>
-.h configure -tree "myTree"<BR>
-</CODE><P>When a new tree is created, it contains only a root node.  The node is automatically
-opened.  The id of the root node is always <I>0</I> (you can use also use the special
-id <I>root</I>). The <B>insert</B> operation lets you insert one or more new entries into
-the tree.  The last argument is the node's <I>pathname</I>.   <BR>
-<CODE># Create a new entry named "myEntry"<BR>
-set id [.h insert end "myEntry"]<BR>
-</CODE><P>This appends a new node named "myEntry".  It will positioned as the last
-child of the root of the tree (using the position "end").  You can supply
-another position to order the node within its siblings. <BR>
-<CODE># Prepend "fred".<BR>
-set id [.h insert 0 "fred"]<BR>
-</CODE><P>Entry names do not need to be unique.  By default, the node's label is its
-name.  To supply a different text label, add the <B>-label</B> option. <BR>
-<CODE># Create a new node named "fred"<BR>
-set id [.h insert end "fred" -label "Fred Flintstone"]<BR>
-</CODE><P>The <B>insert</B> operation returns the id of the new node.  You can also use the
-<B>index</B> operation to get this information. <BR>
-<CODE># Get the id of "fred"<BR>
-.h index "fred"<BR>
-</CODE><P>To insert a node somewhere other than root, use the <B>-at</B> switch. It takes
-the id of the node where the new child will be added. <BR>
-<CODE># Create a new node "barney" in "fred".<BR>
-.h insert -at $id end "barney" <BR>
-</CODE><P>A pathname describes the path to an entry in the hierarchy.  It's a list
-of entry names that compose the path in the tree.  Therefore, you can also
-add "barney" to "fred" as follows. <BR>
-<CODE># Create a new sub-entry of "fred"<BR>
-.h insert end "fred barney" <BR>
-</CODE><P>Every name in the list is ancestor of the next.  All ancestors must already
-exist.  That means that an entry "fred" is an ancestor of "barney" and must
-already exist.  But you can use the <B>-autocreate</B> configuration option to force
-the creation of ancestor nodes. <BR>
-<CODE># Force the creation of ancestors.<BR>
-.h configure -autocreate yes <BR>
-.h insert end "fred barney wilma betty" <BR>
-</CODE><P>Sometimes the pathname is already separated by a character sequence rather
-than formed as a list.  A file name is a good example of this. You can use
-the <B>-separator</B> option to specify a separator string to split the path into
-its components.  Each pathname inserted is automatically split using the
-separator string as a separator. Multiple separators are treated as one.
-<BR>
-<CODE>.h configure -separator /<BR>
-.h insert end "/usr/local/tcl/bin" <BR>
-</CODE><P>If the path is prefixed by extraneous characters, you can automatically
-trim it off using the <B>-trim</B> option.  It removed the string from the path
-before it is parsed. <BR>
-<CODE>.h configure -trim C:/windows -separator /<BR>
-.h insert end "C:/window/system" <BR>
-</CODE><P>You can insert more than one entry at a time with the <B>insert</B> operation.
- This can be much faster than looping over a list of names. <BR>
-<CODE># The slow way<BR>
-foreach f [glob $dir/*] {<BR>
-    .h insert end $f<BR>
-}<BR>
-# The fast way<BR>
-eval .h insert end [glob $dir/*]<BR>
-</CODE><P>In this case, the <B>insert</B> operation will return a list of ids of the new
-entries. <P>
-You can delete entries with the <B>delete</B> operation.  It takes one
-or more tags of ids as its argument. It deletes the entry and all its children.
-<BR>
-<CODE>.h delete $id<BR>
-</CODE><P>Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the <B>-label</B> option that
-sets the entry's text label.   The <B>entry configure</B> operation lets you set
-or modify an entry's configuration options. <BR>
-<CODE>.h entry configure $id -color red -font fixed<BR>
-</CODE><P>You can hide an entry and its children using the <B>-hide</B> option. <BR>
-<CODE>.h entry configure $id -hide yes<BR>
-</CODE><P>More that one entry can be configured at once.  All entries specified are
-configured with the same options. <BR>
-<CODE>.h entry configure $i1 $i2 $i3 $i4 -color brown <BR>
-</CODE><P>An icon is displayed for each entry.  It's a Tk image drawn to the left of
-the label.  You can set the icon with the entry's <B>-icons</B> option.  It takes
-a list of two image names: one to represent the open entry, another when
-it is closed. <BR>
-<CODE>set im1 [image create photo -file openfolder.gif]<BR>
-set im2 [image create photo -file closefolder.gif]<BR>
-.h entry configure $id -icons "$im1 $im2"<BR>
-</CODE><P>If <B>-icons</B> is set to the empty string, no icons are display. <P>
-If an entry has
-children, a button is displayed to the left of the icon. Clicking the mouse
-on this button opens or closes the sub-hierarchy.  The button is normally
-a <I>+</I> or <I>-</I> symbol, but can be configured in a variety of ways using the <B>button
-configure</B> operation.  For example, the <I>+</I> and <I>-</I> symbols can be replaced with
-Tk images. <BR>
-<CODE>set im1 [image create photo -file closefolder.gif]<BR>
-set im2 [image create photo -file downarrow.gif]<BR>
-.h button configure $id -images "$im1 $im2" \<BR>
-    -openrelief raised -closerelief raised<BR>
-</CODE><P>Entries can contain an arbitrary number of <I>data fields</I>.  Data fields are
-name-value pairs.  Both the value and name are strings. The entry's <B>-data</B> option
-lets you set data fields. <BR>
-<CODE>.h entry configure $id -data {mode 0666 group users}<BR>
-</CODE><P>The <B>-data</B> takes a list of name-value pairs.   <P>
-You can display these data fields
-as <I>columns</I> in the <B>treeview</B> widget.  You can create and configure columns
-with the <B>column</B> operation.  For example, to add a new column to the widget,
-use the <B>column insert</B> operation.  The last argument is the name of the data
-field that you want to display. <BR>
-<CODE>.h column insert end "mode"<BR>
-</CODE><P>The column title is displayed at the top of the column.  By default, it's
-is the field name.  You can override this using the column's <B>-text</B> option.
-<BR>
-<CODE>.h column insert end "mode" -text "File Permissions"<BR>
-</CODE><P>Columns have several configuration options.  The <B>column configure</B> operation
-lets you query or modify column options. <BR>
-<CODE>.h column configure "mode" -justify left<BR>
-</CODE><P>The <B>-justify</B> option says how the data is justified within in the column.
- The <B>-hide</B> option indicates whether the column is displayed. <BR>
-<CODE>.h column configure "mode" -hide yes<BR>
-</CODE><P>Entries can be selected by clicking on the mouse.  Selected entries are
-drawn using the colors specified by the <B>-selectforeground</B>  and <B>-selectbackground</B>
-configuration options. The selection itself is managed by the <B>selection</B>
-operation. <BR>
-<CODE># Clear all selections<BR>
-.h selection clear 0 end<BR>
-# Select the root node<BR>
-.h selection set 0 <BR>
-</CODE><P>The <B>curselection</B> operation returns a list of ids of all the selected entries.
-<BR>
-<CODE>set ids [.h curselection]<BR>
-</CODE><P>You can use the <B>get</B> operation to convert the ids to  their pathnames. <BR>
-<CODE>set names [eval .h get -full $ids]<BR>
-</CODE><P>If a treeview is exporting its selection (using the <B>-exportselection</B> option),
-then it will observe the standard X11 protocols for handling the selection.
- Treeview selections are available as type <B>STRING</B>; the value of the selection
-will be the pathnames of the selected entries, separated by newlines. <P>
-The
-<B>treeview</B> supports two modes of selection: <I>single</I> and <I>multiple</I>.  In single
-select mode, only one entry can be selected at a time, while multiple select
-mode allows several entries to be selected.  The mode is set by the widget's
-<B>-selectmode</B> option. <BR>
-<CODE>.h configure -selectmode "multiple"<BR>
-</CODE><P>You can be notified when the list of selected entries changes.  The widget's
-<B>-selectcommand</B> specifies a Tcl procedure that is called whenever the selection
-changes. <BR>
-<CODE>proc SelectNotify { widget } {<BR>
-   set ids [$widget curselection]<BR>
-}<BR>
-.h configure -selectcommand "SelectNotify .h"<BR>
-</CODE><P>The widget supports the standard Tk scrolling and scanning operations. The
-<B>treeview</B> can be both horizontally and vertically. You can attach scrollbars
-to the <B>treeview</B> the same way as the listbox or canvas widgets. <BR>
-<CODE>scrollbar .xbar -orient horizontal -command ".h xview"<BR>
-scrollbar .ybar -orient vertical -command ".h yview"<BR>
-.h configure -xscrollcommand ".xbar set" \<BR>
-    -yscrollcommand ".ybar set"<BR>
-</CODE><P>There are three different modes of scrolling: <I>listbox</I>, <I>canvas</I>, and <I>hierbox</I>.
- In <I>listbox</I> mode, the last entry can always be scrolled to the top of the
-widget.  In <I>hierbox</I> mode, the last entry is always drawn at the bottom of
-the widget. The scroll mode is set by the widget's <B>-selectmode</B> option. <BR>
-<CODE>.h configure -scrollmode "listbox"<BR>
-</CODE><P>Entries can be programmatically opened or closed using the <B>open</B> and <B>close</B>
-operations respectively.   <BR>
-<CODE>.h open $id<BR>
-.h close $id<BR>
-</CODE><P>When an entry is opened, a Tcl procedure can be automatically invoked. The
-<B>-opencommand</B> option specifies this procedure.  This procedure can lazily
-insert entries as needed. <BR>
-<CODE>proc AddEntries { dir } {<BR>
-   eval .h insert end [glob -nocomplain $dir/*] <BR>
-}<BR>
-.h configure -opencommand "AddEntries %P"<BR>
-</CODE><P>Now when an entry is opened, the procedure <I>AddEntries</I> is called and adds
-children to the entry.  Before the command is invoked, special "%" substitutions
-(like <B>bind</B>) are performed. Above, <I>%P</I> is translated to the pathname of the
-entry. <P>
-The same feature exists when an entry is closed.  The <B>-closecommand</B>
-option specifies the procedure. <BR>
-<CODE>proc DeleteEntries { id } {<BR>
-   .h entry delete $id 0 end<BR>
-}<BR>
-.h configure -closecommand "DeleteEntries %#"<BR>
-</CODE><P>When an entry is closed, the procedure <I>DeleteEntries</I> is called and deletes
-the entry's children using the <B>entry delete</B> operation (<I>%#</I> is the id of entry).
-
-<H2><A NAME="sect23" HREF="#toc23">Keywords</A></H2>
-treeview, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Tree Data Object</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">IDs and Tags</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Special Node IDs</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Data Fields</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Entry Bindings</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Treeview Operations</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Treeview Options</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Entry Options</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Button Options</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">Column Options</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Text Editing Options</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Default Bindings</A></LI>
-<UL>
-<LI><A NAME="toc17" HREF="#sect17">Widget Bindings</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Button Bindings</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Entry Bindings</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Column Bindings</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Column Rule Bindings</A></LI>
-</UL>
-<LI><A NAME="toc22" HREF="#sect22">Example</A></LI>
-<LI><A NAME="toc23" HREF="#sect23">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/hiertable.html b/blt3.0/html/hiertable.html
deleted file mode 100644
index 7f56d0e..0000000
--- a/blt3.0/html/hiertable.html
+++ /dev/null
@@ -1,2331 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>treeview(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-treeview - Create and manipulate hierarchical
-table widgets 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>treeview</B> <I>pathName </I>?<I>options</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>treeview</B>
-widget displays a tree of data.  It replaces both the <B>hiertable</B> and <B>hierbox</B>
-widgets.  The <B>treeview</B> is 100% syntax compatible with the <B>hiertable</B> widget.
- The <B>hiertable</B> command is retained for sake of script-level compatibility.
- This widget obsoletes the <B>hierbox</B> widget.  It does everything the old <B>hierbox</B>
-widget did, but also provides data sharing (via <I>tree data objects</I>) and
-the ability to tag nodes. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The <B>treeview</B> widget displays hierarchical
-data.  Data is represented as nodes in a general-ordered tree.  Each node
-may have sub-nodes and these nodes can in turn has their own children. <P>
-A
-node is displayed as a row entry in the widget.  Each entry has a text label
-and icon.  When a node has children, its entry is drawn with a small button
-to the left of the label.  Clicking the mouse over this button opens or
-closes the node.  When a node is <I>open</I>, its children are exposed.  When it
-is <I>closed</I>, the children and their descedants are hidden.  The button is
-normally a <I>+</I> or <I>-</I> symbol (ala Windows Explorer), but can be replaced with
-a pair of Tk images (open and closed images). <P>
-If the node has data associated
-with it, they can be displayed in columns running vertically on either
-side the tree.  You can control the color, font, etc of each entry.  Any
-entry label or data field can be edited in-place. 
-<H2><A NAME="sect4" HREF="#toc4">Tree Data Object</A></H2>
-The tree
-is not stored inside the widget but in a tree data object (see the <B>tree</B>
-command for a further explanation).  Tree data objects can be shared among
-different clients, such as a <B>treeview</B> widget or the <B>tree</B> command.  You can
-walk the tree and manage its data with the <B>tree</B> command tree, while displaying
-it with the <B>treeview</B> widget.  Whenever the tree is updated, the <B>treeview</B>
-widget is automatically redrawn. <P>
-By default, the <B>treeview</B> widget creates
-its own tree object. The tree initially contains just a root node.  But you
-can also display trees created by the <B>tree</B> command using the <B>-tree</B> configuration
-option.  <B>Treeview</B> widgets can share the same tree object, possibly displaying
-different views of the same data. <P>
-A tree object has both a Tcl and C API.
- You can insert or delete nodes using <B>treeview</B> widget or <B>tree</B> command operations,
-but also from C code.  For example, you can load the tree from your C code
-while still managing and displaying the tree from Tcl. The widget is automatically
-notified whenever the tree is modified via C or Tcl. 
-<H2><A NAME="sect5" HREF="#toc5">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>treeview <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>treeview</B> command creates a new window <I>pathName</I> and makes it into a
-<B>treeview</B> widget.  At the time this command is invoked, there must not exist
-a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options
-may be specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the <B>configure</B> operation
-below for the exact details about what <I>option</I> and <I>value</I> pairs are valid.
-<P>
-If successful, <B>treeview</B> returns the path name of the widget.  It also creates
-a new Tcl command by the same name.  You can use this command to invoke
-various operations that query or modify the widget. The general form is:
-<BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available are described in the <FONT SIZE=-1><B>TREEVIEW OPERATIONS</B></FONT>
-  section.
-
-<H2><A NAME="sect6" HREF="#toc6">IDs and Tags</A></H2>
-Nodes can be inserted into a tree using the <B>treeview</B> widget
- <BR>
-<CODE>blt::treeview .t<BR>
-set node [.t insert end root "one"]<BR>
-</CODE><P>or <B>tree</B> command.  <BR>
-<CODE>set tree [blt::tree create]<BR>
-set node [$tree insert root "one"]<BR>
-</CODE><P>In both cases, a number identifying the node is returned (the value of
-<I>$node</I>).  This serial number or <I>id</I> uniquely identifies the node.  Please note
-that you can't infer a location or position of a node from its id.  The only
-exception is that the root node is always id <I>0</I>. Since nodes may have the
-same labels or be moved within the tree, ids provide an convenient way
-to identify nodes.  If a tree is shared, the ids will be the same regardless
-if you are using by the <B>treeview</B> widget or the <B>tree</B> command.  Ids are recycled
-when the node deleted. <P>
-A node may also have any number of <I>tags</I> associated
-with it.  A tag is just a string of characters, and it may take any form
-except that of an integer.  For example, "<I>x123</I>" is valid, but "<I>123</I>" isn't.
- The same tag may be associated with many different nodes.  This is typically
-done to associate a group of nodes.  Many operations in the <B>treeview</B> widget
-take either node ids or tag names as arguments.  Using a tag says to apply
-the operation to all nodes with that tag. <P>
-The tag <B>all</B> is implicitly associated
-with every node in the tree.  It may be used to invoke operations on all
-the nodes in the tree.  <P>
-Tags may be shared, just like trees, between clients.
- For example, you can use the tags created by the <B>tree</B> command with <B>treeview</B>
-widgets. 
-<H2><A NAME="sect7" HREF="#toc7">Special Node IDs</A></H2>
-There are also several special non-numeric ids. 
-Special ids differ from tags in that they are always translated to their
-numeric equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to the
-<B>treeview</B> widget. 
-<DL>
-
-<DT><B>active</B> </DT>
-<DD>The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon  (see the <B>-activeicon</B>
-option). The <B>active</B> id is changed automatically by moving the mouse pointer
-over another node or by using the <B>entry activate</B> operation. Note that there
-can be only one active node at a time. </DD>
-
-<DT><B>anchor</B> </DT>
-<DD>The node representing the
-fixed end of the current selection.   The anchor is set by the <B>selection
-anchor</B> operation. </DD>
-
-<DT><B>current</B> </DT>
-<DD>The node where the mouse pointer is currently
-located. But unlike <B>active</B>, this id changes while the selection is dragged.
- It is used to determine the current node during button drags. </DD>
-
-<DT><B>down</B> </DT>
-<DD>The
-next open node from the current focus. The <B>down</B> of the last open node is
-the same. </DD>
-
-<DT><B>end</B> </DT>
-<DD>The last open node (in depth-first order) on the tree.   </DD>
-
-<DT><B>focus</B>
-</DT>
-<DD>The node that currently has focus.  When a node has focus, it receives key
-events.  To indicate focus, the node is drawn with a dotted line around
-its label.  You can change the  focus using the <B>focus</B> operation. </DD>
-
-<DT><B>last</B> </DT>
-<DD>The
-last open node from the current focus. But unlike <B>up</B>, when the focus is
-at root, <B>last</B> wraps around to the last open node in the tree. </DD>
-
-<DT><B>mark</B> </DT>
-<DD>The node
-representing the non-fixed end of the current selection.   The mark is set
-by the <B>selection mark</B> operation. </DD>
-
-<DT><B>next</B> </DT>
-<DD>The next open node from the current
-focus.  But unlike <B>down</B>, when the focus is on last open node, <B>next</B> wraps
-around to the  root node. </DD>
-
-<DT><B>nextsibling</B> </DT>
-<DD>The next sibling from the node with
-the current focus.  If the node is already the last sibling then it is the
-<B>nextsibling<B>. </DD>
-
-<DT><B>parent</B></B></B> </DT>
-<DD>The parent of the node with the current focus. The <B>parent</B>
-of the root is also the root. </DD>
-
-<DT><B>prevsibling</B> </DT>
-<DD>The previous sibling from the
-node with the current focus.  If the node is already the first sibling then
-it is the <B>prevsibling<B>. </DD>
-
-<DT><B>root</B></B></B> </DT>
-<DD>The root node. You can also use id <I>0</I> to indicate
-the root. </DD>
-
-<DT><B>up</B> </DT>
-<DD>The last open node (in depth-first order) from the current focus.
-The <B>up</B> of the root node (i.e. the root has focus) is also the root. </DD>
-
-<DT><B>view.top</B>
-</DT>
-<DD>First node that's current visible in the widget. </DD>
-
-<DT><B>view.bottom</B> </DT>
-<DD>Last node that's
-current visible in the widget. </DD>
-
-<DT><I>path</I>  </DT>
-<DD>Absolute path of a node.  Path names
-refer to the node name, not their entry labels. Paths don't have to start
-with a separator (see the <B>-separator</B> configuration option), but component
-names must be separated by the designated separator. </DD>
-
-<DT><B>@<I>x<B>,<I>y</I></B></I></B> </DT>
-<DD>Indicates the
-node that covers the point in the treeview window specified by <I>x</I> and <I>y</I>
-(in pixel coordinates).  If no part of the entryd covers that point, then
-the closest node to that point is used. </DD>
-</DL>
-<P>
-A node may be specified as an id
-or tag. If the specifier is an integer then it is assumed to refer to the
-single node with that id. If the specifier is not an integer, it's checked
-to see if it's a special id (such as focus).  Otherwise, it's assumed to be
-tag.  Some operations only operate on a single node at a time; if a tag
-refers to more than one node, then an error is generated. 
-<H2><A NAME="sect8" HREF="#toc8">Data Fields</A></H2>
-A node
-in the tree can have <I>data fields</I>.  A data field is a name-value pair, used
-to represent arbitrary data in the node.  Nodes can contain different fields
-(they aren't required to contain the same fields).  You can optionally display
-these fields in the <B>treeview</B> widget in columns running on either side of
-the displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a specific
-field is left blank.  Columns can be interactively resized, hidden, or,
-moved. 
-<H2><A NAME="sect9" HREF="#toc9">Entry Bindings</A></H2>
-You can bind Tcl commands to be invoked when events
-occur on nodes (much like Tk canvas items).  You can bind a node using its
-id or its <I>bindtags</I>.  Bindtags are simply names that associate a binding
-with one or more nodes.  There is a built-in tag <I>all</I> that all node entries
-automatically have. 
-<H2><A NAME="sect10" HREF="#toc10">Treeview Operations</A></H2>
-The <B>treeview</B> operations are the invoked
-by specifying the widget's pathname, the operation, and any arguments that
-pertain  to that operation.  The general form is: <P>
-<BR>
-<CODE><I>pathName operation </I>?<I>arg arg ...</I>?<BR>
-<P>
-</CODE><P><I>Operation</I> and the <I>arg</I>s determine the exact behavior of the command.  The
-following operation are available for <B>treeview</B> widgets: 
-<DL>
-
-<DT><I>pathName <B>bbox</B></I> ?<B>-screen</B>?
-<I>tagOrId...</I> </DT>
-<DD>Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more <I>tagOrId</I>  arguments.
-  If the <B>-screen</B> flag is given, then the x-y coordinates of the bounding
-box are returned as screen coordinates, not  virtual coordinates. Virtual
-coordinates start from <I>0</I> from the root node. The returned list contains
-the following values. <blockquote></DD>
-
-<DT><I>x</I>  </DT>
-<DD>X-coordinate of the upper-left corner of the bounding
-box. </DD>
-
-<DT><I>y</I> </DT>
-<DD>Y-coordinate of the upper-left corner of the bounding box. </DD>
-
-<DT><I>width</I> </DT>
-<DD>Width
-of the bounding box. </DD>
-
-<DT><I>height</I> </DT>
-<DD>Height of the bounding box. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for a node with this tag, <I>command</I>
-will be invoked.  The syntax is similar to the  <B>bind</B> command except that
-it operates on <B>treeview</B> entries,  rather than widgets. See the <B>bind</B> manual
-entry for complete details on <I>sequence</I> and the substitutions performed
-on  <I>command</I> before invoking it.   <P>
-If all arguments are specified then a
-new binding is created, replacing  any existing binding for the same <I>sequence</I>
-and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>  augments
-an existing binding rather than replacing it.  If no <I>command</I> argument is
-provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button <I>operation</I></B></I> ?<I>args</I>?
-</DT>
-<DD>This command is used to control the button selectors within a  <B>treeview</B>
-widget.   It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>button
-activate</B></I> <I>tagOrId</I> </DT>
-<DD>Designates the node given by <I>tagOrId</I> as active.   When
-a node is active it's entry is drawn using its active icon  (see the <B>-activeicon</B>
-option).  Note that there can be only one active entry at a time. The special
-id <B>active</B> indicates the currently active node. </DD>
-
-<DT><I>pathName <B>button bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for an button of a node entry with
-this tag, <I>command</I> will be invoked.  The syntax is similar to the <B>bind</B> command
-except that it operates on <B>treeview</B> buttons, rather than widgets. See the
-<B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on <I>command</I> before invoking it. <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>button configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the configuration options of the widget. If no <I>option</I> is specified, returns
-a list describing all of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B>
-for information on the format of this list).  If <I>option</I> is specified with
-no <I>value</I>, then the command returns a list describing the one named option
-(this list will be identical to the corresponding sublist of the value
-returned if no <I>option</I> is specified).  If one or more <I>option-value</I> pairs are
-specified, then the command modifies the given widget option(s) to have
-the given value(s);  in this case the command returns an empty string. <I>Option</I>
-and <I>value</I> are described in the section  <FONT SIZE=-1><B>BUTTON OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value of the configuration option given
-by <I>option</I>. <I>Option</I> may have any of the values accepted by the <B>configure</B> operation
-described below. </DD>
-
-<DT><I>pathName <B>close </B></I>?<B>-recurse</B>? <I>tagOrId...</I> </DT>
-<DD>Closes the node specified
-by <I>tagOrId</I>.  In addition, if a Tcl script was specified by the <B>-closecommand</B>
-option, it is invoked.  If the node is already closed, this command has
-no effect. If the <B>-recurse</B> flag is present, each child node is recursively
-closed. </DD>
-
-<DT><I>pathName <B>column <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are available
-for treeview columns. <blockquote></DD>
-
-<DT><I>pathName <B>column activate</B></I> <I>column</I> </DT>
-<DD>Sets the active column
-to <I>column</I>.  <I>Column</I> is the name of a column in the widget. When a column is
-active, it's drawn using its <B>-activetitlebackground</B> and <B>-activetitleforeground</B>
-options.  If <I>column</I> is the <I>""</I>, then no column will be active.  If no column
-argument is provided, then the name of the currently active column is returned.
-</DD>
-
-<DT><I>pathName <B>column cget</B></I> <I>name</I> <I>option</I> </DT>
-<DD>Returns the current value of the column
-configuration option given by <I>option</I> for <I>name</I>.  <I>Name</I> is the name of column
-that corresponds to a data field. <I>Option</I> may have any of the values accepted
-by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>column configure</B></I> <I>name</I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the column designated by <I>name</I>. <I>Name</I> is the name of the column corresponding
-to a data field. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>COLUMN OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>column delete</B></I> <I>field</I>
-?<I>field</I>...? </DT>
-<DD>Deletes one of more columns designated by <I>field</I>.  Note that this
-does not delete the data fields themselves. </DD>
-
-<DT><I>pathName <B>column insert</B></I> <I>position</I>
-<I>field</I> ?<I>options</I>...? </DT>
-<DD>Inserts one of more columns designated by <I>field</I>.  A column
-displays each node's data field by the same name.  If the node doesn't have
-the given field, the cell is left blank. <I>Position</I> indicates where in the
-list of columns to add the new column.  It may be either a number or <I>end</I>.
- </DD>
-
-<DT><I>pathName <B>column invoke</B></I> <I>field</I> </DT>
-<DD>Invokes the Tcl command associated with the
-column <I>field</I>,  if there is one (using the column's <B>-command</B> option).   The
-command is ignored if the column's <B>-state</B> option  set to <I>disabled</I>. </DD>
-
-<DT><I>pathName
-<B>column move <I>name</I></B></I> <I>dest</I>  </DT>
-<DD>Moves the column <I>name</I> to the destination position.
-  <I>Dest</I> is the name of another column or a screen position in the form <I>@<I>x<I>,<I>y</I></I></I></I>.
-</DD>
-
-<DT><I>pathName <B>column names</B></I> </DT>
-<DD>Returns a list of the names of all columns in the
-widget. The list is ordered as the columns are drawn from left-to-right. </DD>
-
-<DT><I>pathName
-<B>column nearest</B></I> <I>x</I> ?<I>y</I>? </DT>
-<DD>Returns the name of the column closest to the given
-X-Y screen coordinate.  If you provide a <I>y</I> argument (it's optional), a name
-is returned only when if the point is over a column's title. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>configure</B></I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the widget. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>TREEVIEW OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>curselection</B></I>
-</DT>
-<DD>Returns a list containing the ids of all of the entries that are  currently
-selected. If there are no entries selected, then the empty string is returned.
-</DD>
-
-<DT><I>pathName <B>delete <I>tagOrId</I></B></I>... </DT>
-<DD>Deletes one or more entries given by <I>tagOrId</I> and
-its children. </DD>
-
-<DT><I>pathName <B>entry <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are
-available for treeview entries. <blockquote></DD>
-
-<DT><I>pathName <B>entry activate</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the
-active entry to the one specified by <I>tagOrId</I>.   When an entry is active
-it is drawn using its active icon  (see the <B>-activeicon</B> option).  Note that
-there can be only one active node at a time. The special id of the currently
-active node is <B>active</B>. </DD>
-
-<DT><I>pathName <B>entry cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>entry
-children</B></I> <I>tagOrId</I>  ?<I>first</I>? ?<I>last</I>? </DT>
-<DD>Returns a list of ids for the given range
-of children of <I>tagOrId</I>.   <I>TagOrId</I> is the id or tag of the node to be examined.
-If only a <I>first</I> argument is present, then the id  of the that child at
-that numeric position is returned.  If both <I>first</I>  and <I>last</I> arguments are
-given, then the ids of all the children in that range are returned.  Otherwise
-the ids of all children are returned.   </DD>
-
-<DT><I>pathName <B>entry configure</B></I> ?<I>option</I>?
-?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options of the
-widget. If no <I>option</I> is specified, returns a list describing all of the
-available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information on
-the format of this list).  If <I>option</I> is specified with no <I>value</I>, then the
-command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described below: </DD>
-
-<DT><I>pathName <B>entry delete</B></I> <I>tagOrId</I> ?<I>first</I> ?<I>last</I>? </DT>
-<DD>Deletes the
-one or more children nodes of the parent <I>tagOrId</I>. If <I>first</I> and <I>last</I> arguments
-are present, they are positions designating a range of children nodes to
-be deleted. </DD>
-
-<DT><I>pathName <B>entry isbefore <I>tagOrId1</I></B></I> <I>tagOrId2</I> </DT>
-<DD>Returns 1 if <I>tagOrId1</I>
-is before <I>tagOrId2</I> and 0 otherwise. </DD>
-
-<DT><I>pathName <B>entry ishidden <I>tagOrId</I></B></I> </DT>
-<DD>Returns
-1 if the node is currently hidden and 0 otherwise.  A node is also hidden
-if any of its ancestor nodes are closed or hidden. </DD>
-
-<DT><I>pathName <B>entry isopen
-<I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the node is currently open and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>entry size</B></I> <B>-recurse</B> <I>tagOrId</I> </DT>
-<DD>Returns the number of children for parent node
-<I>tagOrId</I>.   If the <B>-recurse</B> flag is set, the number of all  its descendants
-is returned.  The node itself is not counted. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>find </B></I>?<I>flags</I>? <I>first</I>
-<I>last</I> </DT>
-<DD>Finds for all entries matching the criteria given by <I>flags</I>.  A list
-of ids for all matching nodes is returned. <I>First</I> and <I>last</I> are ids designating
-the range of the search in depth-first order. If <I>last</I> is before <I>first</I>, then
-nodes are searched in reverse order.  The valid flags are: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B>
-</DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern
-to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match
-against the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Patterns must match
-exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching
-is done in a fashion similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical except that the  following
- special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of
- characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character
-in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a
-sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I>
-and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This
-provides a way of  avoiding  the  special interpretation of the characters
-<I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern matching (i.e.
-the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Pick entries
-that don't match.   </DD>
-
-<DT><B>-exec<I> string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked for
-each matching node. Percent substitutions are performed on <I>string</I> before
- it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-count<I> number</I></B> </DT>
-<DD>Stop
-searching after <I>number</I> matches. </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>focus
-</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the focus to the node given by <I>tagOrId</I>.  When a node has focus,
-it can receive keyboard events.    The special id <B>focus</B> designates the node
-that currently has focus. </DD>
-
-<DT><I>pathName <B>get </B></I>?<B>-full</B>? <I>tagOrId</I> <I>tagOrId</I>... </DT>
-<DD>Translates
-one or more ids to their node entry names.  It returns a list of  names
-for all the ids specified.  If the <B>-full</B> flag is set, then the full pathnames
-are returned. </DD>
-
-<DT><I>pathName <B>hide </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Hides all nodes matching the
-criteria given by <I>flags</I>.  The search is performed recursively for each node
-given by <I>tagOrId</I>. The valid flags are described below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies
-pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match
-against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match against
-the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Match patterns exactly.  The
-is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching is done in a
-fashion similar to that used by the C-shell.  For  the  two strings  to match,
-their contents must be identical except that the  following  special  sequences
- may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of  characters in string,
-including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I>
-</DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a sequence of the form
-<I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I> and <I>y</I>, inclusive, will
-match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This provides a way of  avoiding
- the  special interpretation of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B>
-</DT>
-<DD>Use regular expression pattern matching (i.e. the same as implemented by
-the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Hide nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates
-the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>index </B></I>?<B>-at</B> <I>tagOrId</I>? <I>string</I>  </DT>
-<DD>Returns the id of
-the node specified by <I>string</I>.  <I>String</I> may be a tag or node id. Some special
-ids are normally relative to the node that  has focus.  The <B>-at</B> flag lets
-you select another node. </DD>
-
-<DT><I>pathName <B>insert </B></I>?<B>-at <I>tagOrId</I></B>? <I>position</I> <I>path</I> ?<I>options...</I>?
-?<I>path</I>? ?<I>options...</I>?  </DT>
-<DD>Inserts one or more nodes at <I>position</I>.  <I>Position</I> is the
-location (number or <I>end</I>) where the new nodes are added to the parent node.
- <I>Path</I> is the pathname of the new node. Pathnames can be formated either
-as a Tcl list (each element is a path component) or as a string separated
-by a special character sequence (using the <B>-separator</B> option).  Pathnames
-are normally absolute, but the <B>-at</B> switch lets you select a relative starting
-point.  Its value is the id of the starting node.   <P>
-All ancestors of the
-new node must already exist, unless the <B>-autocreate</B> option is set.  It is
-also an error if a node already exists, unless the <B>-allowduplicates</B> option
-is set. <P>
-<I>Option</I> and <I>value</I> may have any of the values accepted by the  <B>entry
-configure</B> operation described in the <FONT SIZE=-1><B>ENTRY OPERATIONS</B></FONT>
-  section below.  This
-command returns a list of the ids of the new entries. </DD>
-
-<DT><I>pathName <B>move <I>tagOrId</I></B></I>
-<I>how</I> <I>destId</I> </DT>
-<DD>Moves the node given by <I>tagOrId</I> to the destination node.  The
-node can not be an ancestor of the destination.  <I>DestId</I> is the id of the
-destination node and can not be the root of the tree.  In conjunction with
-<I>how</I>, it describes how the move is performed. <blockquote></DD>
-
-<DT><I>before</I> </DT>
-<DD>Moves the node before
-the destination node. </DD>
-
-<DT><I>after</I> </DT>
-<DD>Moves the node after the destination node. </DD>
-
-<DT><I>into</I>
-</DT>
-<DD>Moves the node to the end of the destination's list of children. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>nearest <I>x y</I></B></I> ?<I>varName</I>? </DT>
-<DD>Returns the id of the node entry closest to the given
-X-Y screen coordinate.  The optional argument <I>varName</I> is the name of variable
-which is set to either <I>button</I> or <I>select</I> to indicate over what part of the
-node the coordinate lies.   If the coordinate is not directly over any node,
-then <I>varName</I> will contain the empty string. </DD>
-
-<DT><I>pathName <B>open </B></I>?<B>-recurse</B>? <I>tagOrId...</I>
-</DT>
-<DD>Opens the one or more nodes specified by <I>tagOrId</I>.   If a node is not already
-open, the Tcl script specified by the  <B>-opencommand</B> option is invoked. If
-the <B>-recurse</B> flag  is present, then each descendant is recursively opened.
-  </DD>
-
-<DT><I>pathName <B>range</B></I> ?<B>-open</B>? <I>first last</I> </DT>
-<DD>Returns the ids in depth-first order
-of the nodes between the <I>first</I> and <I>last</I> ids.  If the <B>-open</B> flag is present,
-it indicates to consider only open nodes. If <I>last</I> is before <I>first</I>, then
-the ids are returned in reverse order. </DD>
-
-<DT><I>pathName <B>scan</B></I> <I>option args</I> </DT>
-<DD>This command
-implements scanning.  It has two forms, depending on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>scan
-mark <I>x y</I></B></I> </DT>
-<DD>Records <I>x</I> and <I>y</I> and the current view in the treeview window; 
-used in conjunction with later <B>scan dragto</B> commands. Typically this command
-is associated with a mouse button press in the widget.  It returns an empty
-string. </DD>
-
-<DT><I>pathName <B>scan dragto <I>x y</I></B></I>. </DT>
-<DD>Computes the difference between its <I>x</I> and
-<I>y</I> arguments and the <I>x</I> and <I>y</I> arguments to the last <B>scan mark</B> command for
-the widget. It then adjusts the view by 10 times the difference in coordinates.
- This command is typically associated with mouse motion events in the widget,
-to produce the effect of dragging the list at high speed through the window.
- The return value is an empty string. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>see</B></I> ?<B>-anchor <I>anchor</I></B>? <I>tagOrId</I>
-</DT>
-<DD>Adjusts the view of entries so that the node given by <I>tagOrId</I> is visible
-in the widget window.  It is an error if <B>tagOrId</B> is a tag that refers to
-more than one node.  By default the node's entry is displayed in the middle
-of the window.  This can changed using the <B>-anchor</B> flag.  Its value is a Tk
-anchor position. </DD>
-
-<DT><I>pathName <B>selection <I>option arg</I></B></I> </DT>
-<DD>This command is used to adjust
-the selection within a <B>treeview</B> widget.  It has several forms, depending
-on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>selection anchor <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection anchor
-to the node given by <I>tagOrId</I>. If <I>tagOrId</I> refers to a non-existent node, then
-the closest node is used. The selection anchor is the end of the selection
-that is fixed while dragging out a selection with the mouse. The special
-id <B>anchor</B> may be used to refer to the anchor node. </DD>
-
-<DT><I>pathName <B>selection cancel</B></I>
-</DT>
-<DD>Clears the temporary selection of entries back to the current anchor.  Temporary
-selections are created by  the <B>selection mark</B> operation. </DD>
-
-<DT><I>pathName <B>selection
-clear <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Removes the entries between <I>first</I> and <I>last</I> (inclusive)
-from the selection.  Both <I>first</I> and  <I>last</I> are ids representing a range of
-entries. If <I>last</I> isn't given, then only <I>first</I> is deselected. Entries outside
-the selection are not affected. </DD>
-
-<DT><I>pathName <B>selection clearall</B></I> </DT>
-<DD>Clears the entire
-selection.   </DD>
-
-<DT><I>pathName <B>selection mark <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection mark to
-the node given by <I>tagOrId</I>.  This causes the range of entries between the
-anchor and the mark to be temporarily added to the selection.  The selection
-mark is the end of the selection that is fixed while dragging out a selection
-with the mouse.  The special id <B>mark</B> may be used to refer to the current
- mark node. If <I>tagOrId</I> refers to a non-existent node, then the mark is ignored.
-Resetting the mark will unselect the previous range.  Setting the anchor
-finalizes the range. </DD>
-
-<DT><I>pathName <B>selection includes <I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the
-node given by <I>tagOrId</I> is currently selected, 0 if it isn't. </DD>
-
-<DT><I>pathName <B>selection
-present</B></I> </DT>
-<DD>Returns 1 if any nodes are currently selected and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>selection set <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects all of the nodes in the range between
-<I>first</I> and <I>last</I>, inclusive, without affecting the selection state of nodes
-outside that range. </DD>
-
-<DT><I>pathName <B>selection toggle <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects/deselects
-nodes in the range between <I>first</I> and <I>last</I>, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and visa versa.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>show </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Exposes all nodes matching the criteria given
-by <I>flags</I>.  This is the inverse of the <B>hide</B> operation.  The search is performed
-recursively for each node given by <I>tagOrId</I>.  The valid flags are described
-below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I>
-pattern</I></B> </DT>
-<DD>Specifies pattern to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B>
-</DT>
-<DD>Specifies pattern to match against the entry's configuration option. </DD>
-
-<DT><B>-exact</B>
-</DT>
-<DD>Match patterns exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD><B>-glob</B> Use global pattern
-matching.  Matching is done in a fashion similar to that used by the C-shell.
- For  the  two strings  to match, their contents must be identical except
-that the  following  special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches
- any  sequence  of  characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches
-any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set
-given by <I>chars</I>. If a sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any
-character between  <I>x</I> and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single
- character  <I>x</I>.  This provides a way of  avoiding  the  special interpretation
-of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern
-matching (i.e. the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B>
-</DT>
-<DD>Expose nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort</B></I>
-?<I>operation</I>? <I>args...</I> </DT>
-<DD><blockquote></DD>
-
-<DT><I>pathName <B>sort auto</B></I> ?<I>boolean</I> </DT>
-<DD>Turns on/off automatic sorting
-of node entries.  If <I>boolean</I> is true, entries will be automatically sorted
-as they are opened, closed, inserted, or deleted.  If no <I>boolean</I> argument
-is provided, the current state is returned. </DD>
-
-<DT><I>pathName <B>sort cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>sort configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the sorting configuration options of the widget. If no <I>option</I> is specified,
-returns a list describing all of the available options for <I>pathName</I> (see
-<B>Tk_ConfigureInfo</B> for information on the format of this list).  If <I>option</I>
-is specified with no <I>value</I>, then the command returns a list describing
-the one named option (this list will be identical to the corresponding
-sublist of the value returned if no <I>option</I> is specified).  If one or more
-<I>option-value</I> pairs are specified, then the command modifies the given sorting
-option(s) to have the given value(s);  in this case the command returns
-an empty string. <I>Option</I> and <I>value</I> are described below: <blockquote></DD>
-
-<DT><B>-column<I> string</I></B> </DT>
-<DD>Specifies
-the column to sort. Entries in the widget are rearranged according to this
-column.  If <I>column</I> is <I>""</I> then no sort is performed. </DD>
-
-<DT><B>-command<I> string</I></B> </DT>
-<DD>Specifies
-a Tcl procedure to be called when sorting nodes.  The procedure is called
-with three arguments: the pathname of the widget and the fields of two
-entries.  The procedure returns 1 if the first node is greater than the
-second, -1 is the second is greater, and 0 if equal.   </DD>
-
-<DT><B>-decreasing<I> boolean</I></B>
-</DT>
-<DD>Indicates to sort in ascending/descending order.  If <I>boolean</I>  is true, then
-the entries as in descending order. The default is  <I>no</I>. </DD>
-
-<DT><B>-mode<I> string</I></B> </DT>
-<DD>Specifies
-how to compare entries when sorting. <I>String</I> may be one of the following:
-<blockquote></DD>
-
-<DT><I>ascii</I> </DT>
-<DD>Use string comparison based upon the ASCII collation order. </DD>
-
-<DT><I>dictionary</I>
- </DT>
-<DD>Use dictionary-style comparison.  This is the same as <I>ascii</I> except (a) case
-is ignored except as a tie-breaker and (b) if two strings contain embedded
-numbers, the numbers compare as integers, not characters.  For example,
-"bigBoy" sorts between "bigbang" and "bigboy", and "x10y" sorts between
-"x9y" and "x11y". </DD>
-
-<DT><I>integer</I> </DT>
-<DD>Compares fields as integers. </DD>
-
-<DT><I>real</I> </DT>
-<DD>Compares fields
-as floating point numbers. </DD>
-
-<DT><I>command</I> </DT>
-<DD>Use the Tcl proc specified by the <B>-command</B>
-option to compare entries  when sorting.   If no command is specified, the
-sort reverts to  <I>ascii</I> sorting. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort once</B></I> ?<I>flags</I>? <I>tagOrId...</I> </DT>
-<DD>Sorts
-the children for each entries specified by <I>tagOrId</I>.   By default, entries
-are sorted by name, but you can specify a  Tcl proc to do your own comparisons.
-<blockquote></DD>
-
-<DT><B>-recurse</B> </DT>
-<DD>Recursively sort the entire branch, not just the children. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>tag <I>operation args</I></B></I> </DT>
-<DD>Tags are a general means of selecting and marking nodes
-in the tree. A tag is just a string of characters, and it may take any form
-except that of an integer.  The same tag may be associated with many different
-nodes.   <P>
-Both <I>operation</I> and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below. <blockquote></DD>
-
-<DT><I>pathName</I>
-<B>tag add</B> <I>string</I> <I>id</I>... </DT>
-<DD>Adds the tag <I>string</I> to one of more entries. </DD>
-
-<DT><I>pathName</I> <B>tag
-delete</B> <I>string</I> <I>id</I>... </DT>
-<DD>Deletes the tag <I>string</I> from one or more entries.   </DD>
-
-<DT><I>pathName</I>
-<B>tag forget</B> <I>string</I> </DT>
-<DD>Removes the tag <I>string</I> from all entries.  It's not an error
-if no entries are tagged as <I>string</I>. </DD>
-
-<DT><I>pathName</I> <B>tag names</B> ?<I>id</I>? </DT>
-<DD>Returns a list
-of tags used.  If an <I>id</I> argument is present, only those tags used by the
-node designated by <I>id</I>  are returned. </DD>
-
-<DT><I>pathName</I> <B>tag nodes</B> <I>string</I> </DT>
-<DD>Returns a
-list of ids that have the tag <I>string</I>.  If no node is tagged as <I>string</I>, then
-an empty string is returned. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>This operation
-is used to provide text editing for cells (data  fields in a column) or
-entry labels. It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>text
-apply</B></I> </DT>
-<DD>Applies the edited buffer, replacing the entry label or data field.
-The edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cancel</B></I> </DT>
-<DD>Cancels the editing operation,
-reverting the entry label  or data value back to the previous value. The
-edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cget<I> value</I></B></I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>text
-configure</B></I> ?<I>option value</I>? </DT>
-<DD>Query or modify the configuration options of the
-edit window. If no <I>option</I> is specified, returns a list describing all of
-the available options (see <B>Tk_ConfigureInfo</B> for information on the format
-of this list).  If <I>option</I> is specified with no <I>value</I>, then the command returns
-a list describing the one named option (this list will be identical to
-the corresponding sublist of the value returned if no <I>option</I> is specified).
- If one or more <I>option-value</I> pairs are specified, then the command modifies
-the given widget option(s) to have the given value(s);  in this case the
-command returns an empty string. <I>Option</I> and <I>value</I> are described in the section
- <FONT SIZE=-1><B>TEXT EDITING OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text delete<I> first last</I></B></I> </DT>
-<DD>Deletes the
-characters in the edit buffer between the two given character positions.
-  </DD>
-
-<DT><I>pathName <B>text get</B></I> ?<I>-root</I>? <I>x y</I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text icursor<I> index</I></B></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text
-index<I> index</I></B></I> </DT>
-<DD>Returns the text index of given <I>index</I>. </DD>
-
-<DT><I>pathName <B>text insert<I>
-index string</I></B></I> </DT>
-<DD>Insert the text string <I>string</I> into the edit buffer at the
-index  <I>index</I>.  For example, the index 0 will prepend the buffer. </DD>
-
-<DT><I>pathName
-<B>text selection<I> args</I></B></I> </DT>
-<DD>This operation controls the selection of the editing
-window.  Note that this differs from the selection of entries. It has the
-following forms: <blockquote></DD>
-
-<DT><I>pathName <B>text selection adjust<I> index</I></B></I> </DT>
-<DD>Adjusts either the
-first or last index of the selection. </DD>
-
-<DT><I>pathName <B>text selection clear</B></I> </DT>
-<DD>Clears
-the selection. </DD>
-
-<DT><I>pathName <B>text selection from<I> index</I></B></I> </DT>
-<DD>Sets the anchor of the
-selection. </DD>
-
-<DT><I>pathName <B>text selection present</B></I> </DT>
-<DD>Indicates if a selection is present.
-</DD>
-
-<DT><I>pathName <B>text selection range<I> start end</I></B></I> </DT>
-<DD>Sets both the anchor and mark of
-the selection. </DD>
-
-<DT><I>pathName <B>text selection to<I> index</I></B></I> </DT>
-<DD>Sets the unanchored end
-(mark) of the selection. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>toggle <I>tagOrId</I></B></I> </DT>
-<DD>Opens or closes the node
-given by <I>tagOrId</I>.  If the corresponding  <B>-opencommand</B> or <B>-closecommand</B> option
-is set, then that command is also invoked.  </DD>
-
-<DT><I>pathName <B>xview <I>args</I></B></I> </DT>
-<DD>This command
-is used to query and change the horizontal position of the information
-in the widget's window.  It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>xview</B></I> </DT>
-<DD>Returns a list containing two elements. Each element is a real fraction
-between 0 and 1;  together they describe the horizontal span that is visible
-in the window. For example, if the first element is .2 and the second element
-is .6, 20% of the <B>treeview</B> widget's text is off-screen to the left,  the middle
-40% is visible in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the <B>-xscrollcommand</B> option.
-</DD>
-
-<DT><I>pathName <B>xview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the window so that the character
-position given by <I>tagOrId</I> is displayed at the left edge of the window. Character
-positions are defined by the width of the character <B>0</B>. </DD>
-
-<DT><I>pathName <B>xview moveto<I>
-fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so that <I>fraction</I> of the total width
-of the <B>treeview</B> widget's text is off-screen to the left. <I>fraction</I> must be
-a fraction between 0 and 1. </DD>
-
-<DT><I>pathName <B>xview scroll <I>number what</I></B></I> </DT>
-<DD>This command
-shifts the view in the window left or right according to <I>number</I> and <I>what</I>.
-<I>Number</I> must be an integer. <I>What</I> must be either <B>units</B> or <B>pages</B> or an abbreviation
-of one of these. If <I>what</I> is <B>units</B>, the view adjusts left or right by <I>number</I>
-character units (the width of the <B>0</B> character) on the display;  if it is
-<B>pages</B> then the view adjusts by <I>number</I> screenfuls. If <I>number</I> is negative
-then characters farther to the left become visible;  if it is positive
-then characters farther to the right become visible. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>yview <I>?args</I></B></I>?
-</DT>
-<DD>This command is used to query and change the vertical position of the text
-in the widget's window. It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>yview</B></I> </DT>
-<DD>Returns a list containing two elements, both of which are real fractions
-between 0 and 1. The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means it is halfway
-through the treeview window, for example). The second element gives the
-position of the node just after the last one in the window, relative to
-the widget as a whole. These are the same values passed to scrollbars via
-the <B>-yscrollcommand</B> option. </DD>
-
-<DT><I>pathName <B>yview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the
-window so that the node given by <I>tagOrId</I> is displayed at the top of the
-window. </DD>
-
-<DT><I>pathName <B>yview moveto<I> fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so
-that the node given by <I>fraction</I> appears at the top of the window. <I>Fraction</I>
-is a fraction between 0 and 1;  0 indicates the first node, 0.33 indicates
-the node one-third the way through the <B>treeview</B> widget, and so on. </DD>
-
-<DT><I>pathName
-<B>yview scroll <I>number what</I></B></I> </DT>
-<DD>This command adjusts the view in the window up
-or down according to <I>number</I> and <I>what</I>. <I>Number</I> must be an integer. <I>What</I> must
-be either <B>units</B> or <B>pages</B>. If <I>what</I> is <B>units</B>, the view adjusts up or down
-by <I>number</I> lines;  if it is <B>pages</B> then the view adjusts by <I>number</I> screenfuls.
-If <I>number</I> is negative then earlier nodes become visible;  if it is positive
-then later nodes become visible. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect11" HREF="#toc11">Treeview Options</A></H2>
-In addition to the <B>configure</B>
-operation, widget configuration options may also be set by the Tk <B>option</B>
-command.  The class resource name is <I>TreeView</I>. <BR>
-<CODE>option add *TreeView.Foreground white<BR>
-option add *TreeView.Background blue<BR>
-</CODE><P>The following widget options are available: 
-<DL>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets
-the background color for active entries.  A node is active when the mouse
-passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of the active node.  A node is active when
-the mouse passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeicons
-<I>images</I></B> </DT>
-<DD>Specifies images to be displayed for an entry's icon when it is active.
-<I>Images</I> is a list of two Tk images:  the first image is displayed when the
-node is open, the second when it is closed. </DD>
-
-<DT><B>-autocreate <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I>
-is true, automatically create missing ancestor  nodes when inserting new
-nodes. Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-allowduplicates <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is true, allow nodes with duplicate pathnames when inserting
-new nodes.  Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets
-the background color of the widget.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the 3-D border around the outside edge of the widget. 
-The <B>-relief</B> option determines if the border is to be drawn.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked when a node
-is closed.  You can overrider this for individual entries using the entry's
-<B>-closecommand</B>  option. The default is <I>""</I>. Percent substitutions are performed
-on <I>string</I> before  it is executed.  The following substitutions are valid:
-<blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-cursor
-<I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-dashes <I>number</I></B>
-</DT>
-<DD>Sets the dash style of the horizontal and vertical lines drawn connecting
- entries. <I>Number</I> is the length in pixels of the dashes and gaps in the line.
-If <I>number</I> is <I>0</I>, solid lines will  be drawn. The default is <I>1</I> (dotted). </DD>
-
-<DT><B>-exportselection
-<I>boolean</I></B>  </DT>
-<DD>Indicates if the selection is exported.  If the widget is exporting
-its selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type <B>STRING</B>; the value of the
-selection will be the label of the selected nodes, separated by newlines.
- The default is <I>no</I>. </DD>
-
-<DT><B>-flat <I>boolean</I></B> </DT>
-<DD>Indicates whether to display the tree as
-a flattened list.  If <I>boolean</I> is true, then the hierarchy will be a list
-of full paths for the nodes.  This option also has affect on sorting.  See
-the  <FONT SIZE=-1><B>SORT OPERATIONS</B></FONT>
-  section for more information. The default is <I>no</I>. </DD>
-
-<DT><B>-focusdashes
-<I>dashList</I></B>  </DT>
-<DD>Sets the dash style of the outline rectangle drawn around the
-entry label of the node that current has focus. <I>Number</I> is the length in
-pixels of the dashes and gaps in the line.  If <I>number</I> is <I>0</I>, a solid line
-will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-focusforeground <I>color</I></B>  </DT>
-<DD>Sets the color of
-the focus rectangle.  The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the
-font for entry labels.  You can override this for individual entries with
-the entry's <B>-font</B> configuration option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of entry labels.  You can override
-this for individual entries with the entry's <B>-foreground</B> configuration option.
-  The default is <I>black</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of
-widget.  The default is <I>400</I>. </DD>
-
-<DT><B>-hideroot <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, it indicates
-that no entry for the root node  should be displayed.  The default is <I>no</I>.
-</DD>
-
-<DT><B>-highlightbackground  <I>color</I></B> </DT>
-<DD>Specifies the normal color of the traversal
-highlight region when the widget does not have the input focus.   </DD>
-
-<DT><B>-highlightcolor
-<I>color</I></B> </DT>
-<DD>Specifies the color of the traversal highlight rectangle when the
-widget has the input focus.  The default is <I>black</I>. </DD>
-
-<DT><B>-highlightthickness <I>pixels</I></B>
-</DT>
-<DD>Specifies the width of the highlight rectangle indicating when the widget
-has input focus. The value may have any of the forms acceptable to <B>Tk_GetPixels</B>.
- If the value is zero, no focus highlight will be displayed.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-icons <I>images</I></B> </DT>
-<DD>Specifies images for the entry's icon. <I>Images</I> is a list
-of two Tk images:  the first image is displayed when the node is open,
-the second when it is closed. </DD>
-
-<DT><B>-linecolor <I>color</I></B> </DT>
-<DD>Sets the color of the connecting
-lines drawn between entries.   The default is <I>black</I>. </DD>
-
-<DT><B>-linespacing <I>pixels</I></B> </DT>
-<DD>Sets
-the number of pixels spacing between entries.   The default is <I>0</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Set the width of the lines drawn connecting entries.  If <I>pixels</I> is
-<I>0</I>, no vertical or horizontal lines are drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-opencommand
-<I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked when a node is open.   You can
-override this for individual entries with the entry's <B>-opencommand</B> configuration
-option.  The default is <I>""</I>. Percent substitutions are performed on <I>string</I>
-before  it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect for the widget.  <I>Relief</I> specifies how the <B>treeview</B> widget
-should appear relative to widget  it is packed into; for example, <I>raised</I>
-means the <B>treeview</B> widget  should appear to protrude.  The default is <I>sunken</I>.
-</DD>
-
-<DT><B>-scrollmode <I>mode</I></B>  </DT>
-<DD>Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is <I>hierbox</I>. <blockquote></DD>
-
-<DT><I>listbox</I> </DT>
-<DD>Like the <B>listbox</B>
-widget, the last entry can always be scrolled to the top of the widget
-window.  This allows the scrollbar thumb to shrink as the last entry is
-scrolled upward. </DD>
-
-<DT><I>hierbox</I> </DT>
-<DD>Like the <B>hierbox</B> widget, the last entry can only
-be viewed at the bottom of the widget window.  The scrollbar stays a constant
-size.   </DD>
-
-<DT><I>canvas</I> </DT>
-<DD>Like the <B>canvas</B> widget, the entries are bound within the
-scrolling area.  </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-selectbackground <I>color</I></B> </DT>
-<DD>Sets the background color selected
-node entries. The default is <I>#ffffea</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the raised 3-D border drawn around the labels  of selected entries. The
-default is <I>0</I>. <B>-selectcommand <I>string</I></B> Specifies a Tcl script to invoked when
-the set of selected nodes changes. The default is <I>""</I>. </DD>
-
-<DT><B>-selectforeground <I>color<B>
-</B></I></B></DT>
-<DD>Sets the color of the labels of selected node entries.  The default is <I>black</I>.
-</DD>
-
-<DT><B>-selectmode <I>mode</I></B> </DT>
-<DD>Specifies the selection mode. If <I>mode</I> is  <I>single</I>, only one
-node can be selected at a time.  If <I>multiple</I> more than one node can be selected.
-The default is <I>single</I>. </DD>
-
-<DT><B>-separator <I>string</I></B> </DT>
-<DD>Specifies the character sequence
-to use when spliting the path components.   The separator may be several
-characters wide (such as "::") Consecutive separators in a pathname are
-treated as one. If <I>string</I> is the empty string, the pathnames are Tcl lists.
- Each element is a path component.   The default is <I>""</I>. </DD>
-
-<DT><B>-showtitles <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is false, column titles are not be displayed.   The default is
-<I>yes</I>. </DD>
-
-<DT><B>-sortselection <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, nodes in the selection are
-ordered as they are currently displayed (depth-first or sorted), not in
-the order they were selected. The default is <I>no</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides
-information used when moving the focus from window to window via keyboard
-traversal (e.g., Tab and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window
-should be skipped entirely during keyboard traversal.  <I>1</I> means that the
-this window should always receive the input focus.  An empty value means
-that the traversal scripts make the decision whether to focus on the window.
-The default is <I>"1"</I>. </DD>
-
-<DT><B>-trim <I>string</I></B> </DT>
-<DD>Specifies a string leading characters to
-trim from entry pathnames  before parsing.  This only makes sense if the
-<B>-separator</B> is also set.  The default is <I>""</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Sets the requested
-width of the widget.  If <I>pixels</I> is 0, then the with is computed from the
-contents of the <B>treeview</B> widget. The default is <I>200</I>. </DD>
-
-<DT><B>-xscrollcommand <I>string</I></B>
-</DT>
-<DD>Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window  changes,
-the widget will generate a Tcl command by concatenating the  scroll command
-and two numbers.  If this option is not specified, then  no command will
-be executed. </DD>
-
-<DT><B>-xscrollincrement</B> <I>pixels</I> </DT>
-<DD>Sets the horizontal scrolling distance.
-The default is 20 pixels. </DD>
-
-<DT><B>-yscrollcommand <I>string</I></B> </DT>
-<DD>Specifies the prefix for
-a command used to communicate with vertical scrollbars.   Whenever the vertical
-view in the widget's window  changes, the widget will generate a Tcl command
-by concatenating the  scroll command and two numbers.  If this option is
-not specified, then  no command will be executed. </DD>
-
-<DT><B>-yscrollincrement</B> <I>pixels</I>
-</DT>
-<DD>Sets the vertical scrolling distance. The default is 20 pixels. </DD>
-</DL>
-
-<H2><A NAME="sect12" HREF="#toc12">Entry Options</A></H2>
-Many
-widget configuration options have counterparts in entries.  For example,
-there is a <B>-closecommand</B> configuration option for both widget itself and
-for individual entries.  Options set at the widget level are global for
-all entries.  If the entry configuration option is set, then it overrides
-the widget option.  This is done to avoid wasting memory by replicated options.
- Most entries will have redundant options. <P>
-There is no resource class or
-name for entries. 
-<DL>
-
-<DT><B>-activeicons <I>images</I></B> </DT>
-<DD>Specifies images to be displayed as
-the entry's icon when it is active. This overrides the global <B>-activeicons</B>
-configuration option for the specific entry. <I>Images</I> is a list of two Tk
-images:  the first image is displayed when the node is open, the second
-when it is closed. </DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for nodes.
- <I>TagList</I> is a list of binding tag names.  The tags and their order will
-determine how events are handled for nodes.  Each tag in the list matching
-the current  event sequence will have its Tcl command executed.  The default
-value  is <I>all</I>. </DD>
-
-<DT><B>-button <I>string</I></B> </DT>
-<DD>Indicates whether a button should be displayed
-on the left side of the node entry.  <I>String</I> can be <I>yes</I>, <I>no</I>,  or <I>auto</I>.  If
-<I>auto</I>, then a button is automatically displayed if the node has children.
- This is the default. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked
-when the node is closed.  This overrides the global <B>-closecommand</B> option
-for this entry. The default is <I>""</I>. Percent substitutions are performed on
-<I>string</I> before  it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I>
-</DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-data
-<I>string</I></B> </DT>
-<DD>Sets data fields for the node.  <I>String</I> is a list of  name-value pairs
-to be set. The default is <I>""</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Sets the font for entry labels.
- This overrides the widget's <B>-font</B> option for this node.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of the entry label.  This overrides
-the widget's <B>-foreground</B> configuration option.  The default is <I>""</I>. </DD>
-
-<DT><B>-icons <I>images</I></B>
-</DT>
-<DD>Specifies images to be displayed for the entry's icon. This overrides the
-global <B>-icons</B> configuration option. <I>Images</I> is a list of two Tk images:  the
-first image is displayed when the node is open, the second when it is closed.
-</DD>
-
-<DT><B>-label <I>string</I></B> </DT>
-<DD>Sets the text for the entry's label.  If not set, this  defaults
-to the name of the node. The default is <I>""</I>. </DD>
-
-<DT><B>-opencommand <I>string</I></B> </DT>
-<DD>Specifies
-a Tcl script to be invoked when the entry is opened.   This overrides the
-widget's <B>-opencommand</B> option for this node.   The default is <I>""</I>.  Percent substitutions
-are performed on <I>string</I> before  it is executed.  The following substitutions
-are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The
-full pathname of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single
-percent. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect13" HREF="#toc13">Button Options</A></H2>
-Button configuration options may also be set by the
-<B>option</B> command. The resource subclass is <I>Button</I>.   The resource name is always
-<I>button</I>. <BR>
-<CODE>option add *TreeView.Button.Foreground white<BR>
-option add *TreeView.button.Background blue<BR>
-</CODE><P>The following are the configuration options available for buttons. 
-<DL>
-
-<DT><B>-activebackground
-<I>color</I></B> </DT>
-<DD>Sets the background color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background of the button.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the button.   The <B>-relief</B> option
-determines if a border is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-closerelief <I>relief</I></B>
-</DT>
-<DD>Specifies the 3-D effect for the closed button.  <I>Relief</I> indicates how the
-button should appear relative to the widget;  for example, <I>raised</I> means
-the button should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B>
-</DT>
-<DD>Sets the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets
-the foreground color of buttons.  The default is <I>black</I>. </DD>
-
-<DT><B>-images <I>images</I></B> </DT>
-<DD>Specifies
-images to be displayed for the button. <I>Images</I> is a list of two Tk images:
- the first image is displayed when the button is open, the second when
-it is closed.  If the <I>images</I> is the empty string, then a plus/minus gadget
-is drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-openrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of
-the open button.  <I>Relief</I> indicates how the button should appear relative
-to the widget;  for example, <I>raised</I> means the button should appear to protrude.
- The default is <I>flat</I>. </DD>
-
-<DT><B>-size <I>pixels</I></B> </DT>
-<DD>Sets the requested size of the button.
-  The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect14" HREF="#toc14">Column Options</A></H2>
-Column configuration options may also
-be set by the <B>option</B> command. The resource subclass is <I>Column</I>.   The resource
-name is the  name of the column. <BR>
-<CODE>option add *TreeView.Column.Foreground white<BR>
-option add *TreeView.treeView.Background blue<BR>
-</CODE><P>The following configuration options are available for columns. 
-<DL>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color of the column.  This overrides the widget's
-<B>-background</B> option. The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the 3-D border of the column.   The <B>-relief</B> option determines if a border
-is to be drawn.  The default is <I>0</I>. </DD>
-
-<DT><B>-edit <I>boolean</I></B> </DT>
-<DD>Indicates if the column's
-data fields can be edited. If <I>boolean</I> is  false, the data fields in the
-column may not be edited. The default is <I>yes</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Specifies
-the foreground color of the column.  You can override this for individual
-entries with the entry's  <B>-foreground</B> option. The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>
- </DT>
-<DD>Sets the font for a column.  You can override this for individual entries
-with the entry's <B>-font</B> option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, the column is not displayed. The default
-is <I>yes</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the column data fields title should
-be justified within the column.  This matters only when the column is wider
-than the  data field to be display. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.
-  The default is <I>left</I>. </DD>
-
-<DT><B>-pad <I>pad</I></B> </DT>
-<DD>Specifies how much padding for the left and
-right sides of the column. <I>Pad</I> is a list of one or two screen distances.
- If <I>pad</I> has two elements, the left side of the column is padded by the
-first distance and the right side by the second.  If <I>pad</I> has just one distance,
-both the left and right sides are padded evenly.  The default is <I>2</I>. </DD>
-
-<DT><B>-relief
-<I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the column.  <I>Relief</I> specifies how the
-column should appear relative to the widget;  for example, <I>raised</I> means
-the column should appear to protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-state <I>state</I></B> </DT>
-<DD>Sets
-the state of the column. If <I>state</I> is <I>disable</I> then the column title can not
-be activated nor invoked. The default is <I>normal</I>. </DD>
-
-<DT><B>-text <I>string</I></B> </DT>
-<DD>Sets the title
-for the column. The default is <I>""</I>. </DD>
-
-<DT><B>-titleforeground <I>color</I></B>  </DT>
-<DD>Sets the foreground
-color of the column title.  The default is <I>black</I>. </DD>
-
-<DT><B>-titleshadow <I>color</I></B>  </DT>
-<DD>Sets
-the color of the drop shadow of the column title.   The default is <I>""</I>. </DD>
-
-<DT><B>-width
-<I>pixels</I></B> </DT>
-<DD>Sets the requested width of the column.  This overrides the computed
-with of the column.  If <I>pixels</I> is 0, the width is computed as from the contents
-of the column. The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect15" HREF="#toc15">Text Editing Options</A></H2>
-Text edit window configuration
-options may also be set by the  <B>option</B> command. The resource class is <I>TreeViewEditor</I>.
-The resource name is always <I>edit</I>. <BR>
-<CODE>option add *TreeViewEditor.Foreground white<BR>
-option add *edit.Background blue<BR>
-</CODE><P>The following are the configuration options available for the text editing
-window. 
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background of the text edit window.  The
-default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the edit window.   The <B>-relief</B> option determines if a border is to be drawn.
- The default is <I>1</I>. </DD>
-
-<DT><B>-exportselection <I>boolean</I></B> </DT>
-<DD>Indicates if the text selection
-is exported.  If the edit window is  exporting its selection then it will
-observe the standard X11 protocols  for handling the selection.  Selections
-are available as type <B>STRING</B>. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect of the edit window.  <I>Relief</I> indicates how the background should
-appear relative to the edit window; for example, <I>raised</I> means the background
-should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-selectbackground <I>color</I></B>
-</DT>
-<DD>Sets the background of the selected text in the edit window.   The default
-is <I>white</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the selected text in the  edit window.  The <B>-selectrelief</B> option determines
-if a border  is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-selectforeground <I>color</I></B> </DT>
-<DD>Sets
-the foreground of the selected text in the edit window.   The default is
-<I>white</I>. </DD>
-
-<DT><B>-selectrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the selected text
-in the edit window.   <I>Relief</I> indicates how the text should appear relative
-to the edit window; for example, <I>raised</I> means the text should appear to
-protrude.  The default is <I>flat</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect16" HREF="#toc16">Default Bindings</A></H2>
-Tk automatically creates
-class bindings for treeviews that give them Motif-like behavior.  Much of
-the behavior of a <B>treeview</B> widget is determined by its <B>-selectmode</B> option,
-which selects one of two ways of dealing with the selection. <P>
-If the selection
-mode is <B>single</B>, only one node can be  selected at a time. Clicking button
-1 on an node selects it and deselects any other selected item. <P>
-If the selection
-mode is <B>multiple</B>, any number of entries may be selected at once, including
-discontiguous ranges.  Clicking Control-Button-1 on a node entry toggles its
-selection state without affecting any other entries. Pressing Shift-Button-1
-on a node entry selects it, extends the selection. 
-<OL>
-<LI>In <B>extended</B> mode, the
-selected range can be adjusted by pressing button 1 with the Shift key
-down:  this modifies the selection to consist of the entries between the
-anchor and the entry under the mouse, inclusive. The un-anchored end of this
-new selection can also be dragged with the button down. </LI><LI>In <B>extended</B> mode,
-pressing button 1 with the Control key down starts a toggle operation:
-the anchor is set to the entry under the mouse, and its selection state
-is reversed.  The selection state of other entries isn't changed. If the mouse
-is dragged with button 1 down, then the selection state of all entries
-between the anchor and the entry under the mouse is set to match that of
-the anchor entry;  the selection state of all other entries remains what
-it was before the toggle operation began. </LI><LI>If the mouse leaves the treeview
-window with button 1 down, the window scrolls away from the mouse, making
-information visible that used to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the button
-is released, or the end of the hierarchy is reached. </LI><LI>Mouse button 2 may
-be used for scanning. If it is pressed and dragged over the <B>treeview</B> widget,
-the contents of the hierarchy drag at high speed in the direction the mouse
-moves. </LI><LI>If the Up or Down key is pressed, the location cursor (active entry)
-moves up or down one entry. If the selection mode is <B>browse</B> or <B>extended</B>
-then the new active entry is also selected and all other entries are deselected.
-In <B>extended</B> mode the new active entry becomes the selection anchor. </LI><LI>In <B>extended</B>
-mode, Shift-Up and Shift-Down move the location cursor (active entry) up
-or down one entry and also extend the selection to that entry in a fashion
-similar to dragging with mouse button 1. </LI><LI>The Left and Right keys scroll
-the <B>treeview</B> widget view left and right by the width of the character <B>0</B>.
-Control-Left and Control-Right scroll the <B>treeview</B> widget view left and right
-by the width of the window. Control-Prior and Control-Next also scroll left
-and right by the width of the window. </LI><LI>The Prior and Next keys scroll the
-<B>treeview</B> widget view up and down by one page (the height of the window).
-</LI><LI>The Home and End keys scroll the <B>treeview</B> widget horizontally to the left
-and right edges, respectively. </LI><LI>Control-Home sets the location cursor to the
-the first entry,  selects that entry, and deselects everything else in
-the widget. </LI><LI>Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else in the widget. </LI><LI>In <B>extended</B>
-mode, Control-Shift-Home extends the selection to the first entry and Control-Shift-End
-extends the selection to the last entry. </LI><LI>In <B>multiple</B> mode, Control-Shift-Home
-moves the location cursor to the first entry and Control-Shift-End moves
-the location cursor to the last entry. </LI><LI>The space and Select keys make a
-selection at the location cursor (active entry) just as if mouse button
-1 had been pressed over this entry. </LI><LI>In <B>extended</B> mode, Control-Shift-space
-and Shift-Select extend the selection to the active entry just as if button
-1 had been pressed with the Shift key down. </LI><LI>In <B>extended</B> mode, the Escape
-key cancels the most recent selection and restores all the entries in the
-selected range to their previous selection state. </LI><LI>Control-slash selects everything
-in the widget, except in <B>single</B> and <B>browse</B> modes, in which case it selects
-the active entry and deselects everything else. </LI><LI>Control-backslash deselects
-everything in the widget, except in <B>browse</B> mode where it has no effect.
-</LI><LI>The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the
-selection in the widget to the clipboard, if there is a selection. </LI>
-</OL>
-<P>
-The behavior
-of <B>treeview</B> widgets can be changed by defining new bindings  for individual
-widgets or by redefining the class bindings. 
-<H3><A NAME="sect17" HREF="#toc17">Widget Bindings</A></H3>
-In addition
-to the above behavior, the following additional behavior is defined by
-the default widget class (TreeView) bindings. 
-<DL>
-
-<DT><I><ButtonPress-2></I></DT>
-<DD>Starts scanning.
- </DD>
-
-<DT><I><B2-Motion></I></DT>
-<DD>Adjusts the scan. </DD>
-
-<DT><I><ButtonRelease-2></I></DT>
-<DD>Stops scanning. </DD>
-
-<DT><I><B1-Leave></I></DT>
-<DD>Starts auto-scrolling.
-</DD>
-
-<DT><I><B1-Enter></I></DT>
-<DD>Starts auto-scrolling  </DD>
-
-<DT><I><KeyPress-Up></I></DT>
-<DD>Moves the focus to the previous
-entry. </DD>
-
-<DT><I><KeyPress-Down></I></DT>
-<DD>Moves the focus to the next entry. </DD>
-
-<DT><I><Shift-KeyPress-Up></I></DT>
-<DD>Moves
-the focus to the previous sibling. </DD>
-
-<DT><I><Shift-KeyPress-Down></I></DT>
-<DD>Moves the focus to the
-next sibling. </DD>
-
-<DT><I><KeyPress-Prior></I></DT>
-<DD>Moves the focus to first entry.  Closed or hidden
-entries are ignored. </DD>
-
-<DT><I><KeyPress-Next></I></DT>
-<DD>Move the focus to the last entry. Closed
-or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-Left></I></DT>
-<DD>Closes the entry.  It is not an
-error if the entry has no children. </DD>
-
-<DT><I><KeyPress-Right></I></DT>
-<DD>Opens the entry, displaying
-its children.  It is not an error if the entry has no children. </DD>
-
-<DT><I><KeyPress-space></I></DT>
-<DD>In
-"single" select mode this selects the entry.  In "multiple" mode, it toggles
-the entry (if it was previous selected, it is not deselected). </DD>
-
-<DT><I><KeyRelease-space></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress-Return></I></DT>
-<DD>Sets the focus to the current entry. </DD>
-
-<DT><I><KeyRelease-Return></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress></I></DT>
-<DD>Moves to the next entry whose label starts with
-the letter typed. </DD>
-
-<DT><I><KeyPress-Home></I></DT>
-<DD>Moves the focus to first entry.  Closed or
-hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-End></I></DT>
-<DD>Move the focus to the last entry.
-Closed or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-F1></I></DT>
-<DD>Opens all entries. </DD>
-
-<DT><I><KeyPress-F2></I></DT>
-<DD>Closes
-all entries (except root). </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Button Bindings</A></H3>
-Buttons have bindings.  There are
-associated with the "all" bindtag (see the entry's -bindtag option).  You
-can use the <B>bind</B> operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the button of
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the button back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the view so that the current entry is visible. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Entry Bindings</A></H3>
-Entries have
-default bindings.  There are associated with the "all" bindtag (see the
-entry's -bindtag option).  You can use the <B>bind</B> operation to modify them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the entry back to its normal state. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets
-the selection anchor the current entry. </DD>
-
-<DT><I><Double-ButtonPress-1></I></DT>
-<DD>Toggles the selection
-of the current entry. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>For "multiple" mode only.  Saves the current
-location of the pointer for auto-scrolling.  Resets the selection mark.  
-</DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>For "multiple" mode only.  Sets the selection anchor to the
- current entry. </DD>
-
-<DT><I><Shift-ButtonPress-1></I></DT>
-<DD>For "multiple" mode only. Extends the selection.
-</DD>
-
-<DT><I><Shift-Double-ButtonPress-1></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Shift-B1-Motion></I></DT>
-<DD>Place holder.
-Does nothing. </DD>
-
-<DT><I><Shift-ButtonRelease-1></I></DT>
-<DD>Stop auto-scrolling. </DD>
-
-<DT><I><Control-ButtonPress-1></I></DT>
-<DD>For
-"multiple" mode only.  Toggles and extends the selection. </DD>
-
-<DT><I><Control-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Control-ButtonRelease-1></I></DT>
-<DD>Stops
-auto-scrolling. </DD>
-
-<DT><I><Control-Shift-ButtonPress-1></I></DT>
-<DD>??? </DD>
-
-<DT><I><Control-Shift-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-Shift-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Column
-Bindings</A></H3>
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the <B>column bind</B>
-operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the current column title. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns
-the column back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Invokes the command (see
-the column's -command option) if one if specified.   </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Column Rule Bindings</A></H3>
-
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current and activates the ruler. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the column back to its
-normal state. Deactivates the ruler. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets the resize anchor for
-the column. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>Sets the resize mark for the column. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the size of the column, based upon the resize anchor and mark positions.
-</DD>
-</DL>
-
-<H2><A NAME="sect22" HREF="#toc22">Example</A></H2>
-The <B>treeview</B> command creates a new widget.   <BR>
-<CODE>treeview .h -bg white<BR>
-</CODE><P>A new Tcl command <I>.h</I> is also created.  This command can be used to query
-and modify the <B>treeview</B> widget.  For example, to change the  background
-color of the table to "green", you use the new command and the widget's
-<B>configure</B> operation. <BR>
-<CODE># Change the background color.<BR>
-.h configure -background "green"<BR>
-</CODE><P>By default, the <B>treeview</B> widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the widget.
- Above, the new tree object name is ".h".  But you can use the <B>-tree</B> option
-to specify the name of another tree. <BR>
-<CODE># View the tree "myTree".<BR>
-.h configure -tree "myTree"<BR>
-</CODE><P>When a new tree is created, it contains only a root node.  The node is automatically
-opened.  The id of the root node is always <I>0</I> (you can use also use the special
-id <I>root</I>). The <B>insert</B> operation lets you insert one or more new entries into
-the tree.  The last argument is the node's <I>pathname</I>.   <BR>
-<CODE># Create a new entry named "myEntry"<BR>
-set id [.h insert end "myEntry"]<BR>
-</CODE><P>This appends a new node named "myEntry".  It will positioned as the last
-child of the root of the tree (using the position "end").  You can supply
-another position to order the node within its siblings. <BR>
-<CODE># Prepend "fred".<BR>
-set id [.h insert 0 "fred"]<BR>
-</CODE><P>Entry names do not need to be unique.  By default, the node's label is its
-name.  To supply a different text label, add the <B>-label</B> option. <BR>
-<CODE># Create a new node named "fred"<BR>
-set id [.h insert end "fred" -label "Fred Flintstone"]<BR>
-</CODE><P>The <B>insert</B> operation returns the id of the new node.  You can also use the
-<B>index</B> operation to get this information. <BR>
-<CODE># Get the id of "fred"<BR>
-.h index "fred"<BR>
-</CODE><P>To insert a node somewhere other than root, use the <B>-at</B> switch. It takes
-the id of the node where the new child will be added. <BR>
-<CODE># Create a new node "barney" in "fred".<BR>
-.h insert -at $id end "barney" <BR>
-</CODE><P>A pathname describes the path to an entry in the hierarchy.  It's a list
-of entry names that compose the path in the tree.  Therefore, you can also
-add "barney" to "fred" as follows. <BR>
-<CODE># Create a new sub-entry of "fred"<BR>
-.h insert end "fred barney" <BR>
-</CODE><P>Every name in the list is ancestor of the next.  All ancestors must already
-exist.  That means that an entry "fred" is an ancestor of "barney" and must
-already exist.  But you can use the <B>-autocreate</B> configuration option to force
-the creation of ancestor nodes. <BR>
-<CODE># Force the creation of ancestors.<BR>
-.h configure -autocreate yes <BR>
-.h insert end "fred barney wilma betty" <BR>
-</CODE><P>Sometimes the pathname is already separated by a character sequence rather
-than formed as a list.  A file name is a good example of this. You can use
-the <B>-separator</B> option to specify a separator string to split the path into
-its components.  Each pathname inserted is automatically split using the
-separator string as a separator. Multiple separators are treated as one.
-<BR>
-<CODE>.h configure -separator /<BR>
-.h insert end "/usr/local/tcl/bin" <BR>
-</CODE><P>If the path is prefixed by extraneous characters, you can automatically
-trim it off using the <B>-trim</B> option.  It removed the string from the path
-before it is parsed. <BR>
-<CODE>.h configure -trim C:/windows -separator /<BR>
-.h insert end "C:/window/system" <BR>
-</CODE><P>You can insert more than one entry at a time with the <B>insert</B> operation.
- This can be much faster than looping over a list of names. <BR>
-<CODE># The slow way<BR>
-foreach f [glob $dir/*] {<BR>
-    .h insert end $f<BR>
-}<BR>
-# The fast way<BR>
-eval .h insert end [glob $dir/*]<BR>
-</CODE><P>In this case, the <B>insert</B> operation will return a list of ids of the new
-entries. <P>
-You can delete entries with the <B>delete</B> operation.  It takes one
-or more tags of ids as its argument. It deletes the entry and all its children.
-<BR>
-<CODE>.h delete $id<BR>
-</CODE><P>Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the <B>-label</B> option that
-sets the entry's text label.   The <B>entry configure</B> operation lets you set
-or modify an entry's configuration options. <BR>
-<CODE>.h entry configure $id -color red -font fixed<BR>
-</CODE><P>You can hide an entry and its children using the <B>-hide</B> option. <BR>
-<CODE>.h entry configure $id -hide yes<BR>
-</CODE><P>More that one entry can be configured at once.  All entries specified are
-configured with the same options. <BR>
-<CODE>.h entry configure $i1 $i2 $i3 $i4 -color brown <BR>
-</CODE><P>An icon is displayed for each entry.  It's a Tk image drawn to the left of
-the label.  You can set the icon with the entry's <B>-icons</B> option.  It takes
-a list of two image names: one to represent the open entry, another when
-it is closed. <BR>
-<CODE>set im1 [image create photo -file openfolder.gif]<BR>
-set im2 [image create photo -file closefolder.gif]<BR>
-.h entry configure $id -icons "$im1 $im2"<BR>
-</CODE><P>If <B>-icons</B> is set to the empty string, no icons are display. <P>
-If an entry has
-children, a button is displayed to the left of the icon. Clicking the mouse
-on this button opens or closes the sub-hierarchy.  The button is normally
-a <I>+</I> or <I>-</I> symbol, but can be configured in a variety of ways using the <B>button
-configure</B> operation.  For example, the <I>+</I> and <I>-</I> symbols can be replaced with
-Tk images. <BR>
-<CODE>set im1 [image create photo -file closefolder.gif]<BR>
-set im2 [image create photo -file downarrow.gif]<BR>
-.h button configure $id -images "$im1 $im2" \<BR>
-    -openrelief raised -closerelief raised<BR>
-</CODE><P>Entries can contain an arbitrary number of <I>data fields</I>.  Data fields are
-name-value pairs.  Both the value and name are strings. The entry's <B>-data</B> option
-lets you set data fields. <BR>
-<CODE>.h entry configure $id -data {mode 0666 group users}<BR>
-</CODE><P>The <B>-data</B> takes a list of name-value pairs.   <P>
-You can display these data fields
-as <I>columns</I> in the <B>treeview</B> widget.  You can create and configure columns
-with the <B>column</B> operation.  For example, to add a new column to the widget,
-use the <B>column insert</B> operation.  The last argument is the name of the data
-field that you want to display. <BR>
-<CODE>.h column insert end "mode"<BR>
-</CODE><P>The column title is displayed at the top of the column.  By default, it's
-is the field name.  You can override this using the column's <B>-text</B> option.
-<BR>
-<CODE>.h column insert end "mode" -text "File Permissions"<BR>
-</CODE><P>Columns have several configuration options.  The <B>column configure</B> operation
-lets you query or modify column options. <BR>
-<CODE>.h column configure "mode" -justify left<BR>
-</CODE><P>The <B>-justify</B> option says how the data is justified within in the column.
- The <B>-hide</B> option indicates whether the column is displayed. <BR>
-<CODE>.h column configure "mode" -hide yes<BR>
-</CODE><P>Entries can be selected by clicking on the mouse.  Selected entries are
-drawn using the colors specified by the <B>-selectforeground</B>  and <B>-selectbackground</B>
-configuration options. The selection itself is managed by the <B>selection</B>
-operation. <BR>
-<CODE># Clear all selections<BR>
-.h selection clear 0 end<BR>
-# Select the root node<BR>
-.h selection set 0 <BR>
-</CODE><P>The <B>curselection</B> operation returns a list of ids of all the selected entries.
-<BR>
-<CODE>set ids [.h curselection]<BR>
-</CODE><P>You can use the <B>get</B> operation to convert the ids to  their pathnames. <BR>
-<CODE>set names [eval .h get -full $ids]<BR>
-</CODE><P>If a treeview is exporting its selection (using the <B>-exportselection</B> option),
-then it will observe the standard X11 protocols for handling the selection.
- Treeview selections are available as type <B>STRING</B>; the value of the selection
-will be the pathnames of the selected entries, separated by newlines. <P>
-The
-<B>treeview</B> supports two modes of selection: <I>single</I> and <I>multiple</I>.  In single
-select mode, only one entry can be selected at a time, while multiple select
-mode allows several entries to be selected.  The mode is set by the widget's
-<B>-selectmode</B> option. <BR>
-<CODE>.h configure -selectmode "multiple"<BR>
-</CODE><P>You can be notified when the list of selected entries changes.  The widget's
-<B>-selectcommand</B> specifies a Tcl procedure that is called whenever the selection
-changes. <BR>
-<CODE>proc SelectNotify { widget } {<BR>
-   set ids [$widget curselection]<BR>
-}<BR>
-.h configure -selectcommand "SelectNotify .h"<BR>
-</CODE><P>The widget supports the standard Tk scrolling and scanning operations. The
-<B>treeview</B> can be both horizontally and vertically. You can attach scrollbars
-to the <B>treeview</B> the same way as the listbox or canvas widgets. <BR>
-<CODE>scrollbar .xbar -orient horizontal -command ".h xview"<BR>
-scrollbar .ybar -orient vertical -command ".h yview"<BR>
-.h configure -xscrollcommand ".xbar set" \<BR>
-    -yscrollcommand ".ybar set"<BR>
-</CODE><P>There are three different modes of scrolling: <I>listbox</I>, <I>canvas</I>, and <I>hierbox</I>.
- In <I>listbox</I> mode, the last entry can always be scrolled to the top of the
-widget.  In <I>hierbox</I> mode, the last entry is always drawn at the bottom of
-the widget. The scroll mode is set by the widget's <B>-selectmode</B> option. <BR>
-<CODE>.h configure -scrollmode "listbox"<BR>
-</CODE><P>Entries can be programmatically opened or closed using the <B>open</B> and <B>close</B>
-operations respectively.   <BR>
-<CODE>.h open $id<BR>
-.h close $id<BR>
-</CODE><P>When an entry is opened, a Tcl procedure can be automatically invoked. The
-<B>-opencommand</B> option specifies this procedure.  This procedure can lazily
-insert entries as needed. <BR>
-<CODE>proc AddEntries { dir } {<BR>
-   eval .h insert end [glob -nocomplain $dir/*] <BR>
-}<BR>
-.h configure -opencommand "AddEntries %P"<BR>
-</CODE><P>Now when an entry is opened, the procedure <I>AddEntries</I> is called and adds
-children to the entry.  Before the command is invoked, special "%" substitutions
-(like <B>bind</B>) are performed. Above, <I>%P</I> is translated to the pathname of the
-entry. <P>
-The same feature exists when an entry is closed.  The <B>-closecommand</B>
-option specifies the procedure. <BR>
-<CODE>proc DeleteEntries { id } {<BR>
-   .h entry delete $id 0 end<BR>
-}<BR>
-.h configure -closecommand "DeleteEntries %#"<BR>
-</CODE><P>When an entry is closed, the procedure <I>DeleteEntries</I> is called and deletes
-the entry's children using the <B>entry delete</B> operation (<I>%#</I> is the id of entry).
-
-<H2><A NAME="sect23" HREF="#toc23">Keywords</A></H2>
-treeview, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Tree Data Object</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">IDs and Tags</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Special Node IDs</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Data Fields</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Entry Bindings</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Treeview Operations</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Treeview Options</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Entry Options</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Button Options</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">Column Options</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Text Editing Options</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Default Bindings</A></LI>
-<UL>
-<LI><A NAME="toc17" HREF="#sect17">Widget Bindings</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Button Bindings</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Entry Bindings</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Column Bindings</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Column Rule Bindings</A></LI>
-</UL>
-<LI><A NAME="toc22" HREF="#sect22">Example</A></LI>
-<LI><A NAME="toc23" HREF="#sect23">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/htext.html b/blt3.0/html/htext.html
deleted file mode 100644
index 67cc439..0000000
--- a/blt3.0/html/htext.html
+++ /dev/null
@@ -1,397 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>htext(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-htext - Create and manipulate hypertext widgets
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>htext</B> <I>pathName </I>?<I>option value</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-<P>
-The <B>htext</B> command creates
-a new window (given by the  <I>pathName</I> argument) and makes it into a <B>htext</B>
-widget. Additional options, described above, may be specified on the command
-line or in the option database to configure aspects of the widget such
-as its  color and font.  At the time this command is invoked, there must
-not  exist a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist. The
-<B>htext</B> command returns its <I>pathName</I>.    <P>
-The <B>htext</B> widget is hybrid of a non-editable
-text widget and a geometry manager (e.g. the packer).  It displays text (optionally
-read from file) in a window.  Text can be scrolled either horizontally or
-vertically using the <B>htext</B> window as a viewport. In addition, Tcl commands
-can be embedded into  the text which are evaluated as the text is parsed.
- Text between special double characters (percent signs "%%") is immediately
-passed to the Tcl  interpreter for evaluation.   <P>
-Furthermore, any widget
-or widget hierarchy can be packed in-line and made  to appear on the current
-line of the text.  Widgets are packed using the  <B>htext append</B> command.  All
-widgets must be children of the  <B>htext</B> window and must already exist before
-packing.  Once a widget has been packed it cannot be moved to a different
-position within the text.  Widgets can be resized but they will remain 
-at the same position within the text. <P>
-Before a file or text string is parsed
-by the <B>htext</B> widget, all the widget's current children are destroyed.  You
-can reload files or text  without worrying about unmapping or destroying
-each child window beforehand. <P>
-Setting the either the <B>-filename</B> or <B>-text</B> configuration
-option  will adjust the value of the other.  If both options are set, the
-file  takes precedence.  When a new file is read using the <B>-filename</B> option,
-the value of the <B>-text</B> option is reset to the empty string.  Likewise,  when
-the <B>-text</B> option is set, the string representing the  <B>-filename</B> option is
-cleared. 
-<H2><A NAME="sect3" HREF="#toc3">File Format</A></H2>
-The format of <B>htext</B> text file is typically ASCII text.
-  Text enclosed by special double characters (by default, percent signs
-'%%')  is interpreted and executed as Tcl commands.   The special character
- may be specified by the <B>-specialchar</B> option.  In the following example of
-a <B>htext</B> file,  a button widget  is appended to the text between  the words
-"<I>a</I>" and "<I>which</I>".   The <I>pathName</I> of the <B>htext</B> widget is "<I>.ht</I>". <BR>
-<CODE><I>This will be displayed as normal text. <BR>
-</I>But this will become a %% <BR>
-  button .ht.button -text "button" -fg red<BR>
-  .ht append .ht.button <BR>
-%% which can invoke a Tcl command.<BR>
-<P>
-
-<H2><A NAME="sect4" HREF="#toc4"></CODE><P>Indices</A></H2>
-<P>
-Some of the widget operations (<B>selection</B>, gotoline,  <B>search</B>, etc.)
-take one or more indices as arguments. An index is a string used to indicate
-a particular place within the text, such as the first and last characters
-in a range to be selected.  <P>
-An index must have one of the following forms:
-
-<DL>
-
-<DT><I>line<B>.<I>char</I></B></I> </DT>
-<DD>Indicates <I>char</I>'th character on line <I>line</I>. Both lines and characters
-are number from 0, so "0.0" is the first beginning of the text.  <I>Char</I> may
-be undesignated.  In this case a character position of 0 is assumed. </DD>
-
-<DT><B>@<I>x<B>,<I>y</I></B></I></B>
-</DT>
-<DD>Indicates the character that covers the pixel whose x and y coordinates
-within the text's window are <I>x</I> and <I>y</I>. </DD>
-
-<DT><B>end</B> </DT>
-<DD>Indicates the end of the text. </DD>
-
-<DT><B>anchor</B>
-</DT>
-<DD>Indicates the anchor point for the selection, which is set with the <B>selection</B>
-operation. </DD>
-
-<DT><B>sel.first</B> </DT>
-<DD>Indicates the first character in the selection.  It is
-an error to use this form if the selection isn't in the entry window. </DD>
-
-<DT><B>sel.last</B>
-</DT>
-<DD>Indicates the character just after the last one in the selection. It is
-an error to use this form if the selection isn't in the entry window. </DD>
-</DL>
-
-<H2><A NAME="sect5" HREF="#toc5">Variables</A></H2>
-<P>
-The
-following global Tcl variables are maintained when an  <B>htext</B> file is parsed.
-  
-<DL>
-
-<DT><B>htext(widget)</B>  </DT>
-<DD>is the pathname of the <B>htext</B> widget. </DD>
-
-<DT><B>htext(file)</B>  </DT>
-<DD>is the
-name of the file the <B>htext</B> widget is currently parsing.   It is the empty
-string when the <B>-text</B> option is used. </DD>
-
-<DT><B><A HREF="htext.l.html">htext(line)</B></A>
-  </DT>
-<DD>is the current line number
-in the text.   </DD>
-</DL>
-<P>
-This information might be used to construct hyper links 
-between different files and/or lines. <P>
-
-<H2><A NAME="sect6" HREF="#toc6">Syntax</A></H2>
-The <B>htext</B> command creates a
-new Tcl command whose name is <I>pathName</I>.  This command may be used to invoke
-various operations on the widget.  It has the following general form: <BR>
-<P>
-<CODE><I>pathName oper </I>?<I>args</I>?<BR>
-</CODE><P><I>Oper</I> and <I>args</I> determine the exact behavior of the command. <P>
-
-<H2><A NAME="sect7" HREF="#toc7">Operations</A></H2>
-The
-following operations are available for <B>htext</B> widgets: 
-<DL>
-
-<DT><I>pathName <B>append <I>window
-</I></B></I>?<I>option value</I>?...   </DT>
-<DD>Embeds the widget <I>window</I> into the htext widget.  <I>Window</I>
-is the pathname of the widget to be embedded which must be a child of <I>pathName</I>.
- <I>Window</I> will be positioned in the htext widget at the current location
-of the text. If <I>option</I> and <I>value</I> pairs are present, they configure various
-aspects how <I>window</I> appears in <I>pathName</I>.  The following options are available.
-<blockquote></DD>
-
-<DT><B>-anchor <I>anchorPos</I></B> </DT>
-<DD>Specifies how <I>window</I> will be arranged if there is any
-extra space in the cavity surrounding the window.  For example, if <I>anchorPos</I>
-is <B>center</B> then the window is centered in the cavity; if <I>anchorPos</I> is <B>w</B>
-then the window will be drawn such it touches the leftmost edge of the
-cavity. The default is <I>center</I>. </DD>
-
-<DT><B>-fill <I>style</I></B> </DT>
-<DD>Specifies how the <I>window</I> should
-be stretched to occupy the extra space in the cavity surrounding it (if
-any exists).  <I>Style</I> is <I>none</I>, <I>x</I>, <I>y</I>, <I>both</I>.  If <I>style</I> is <I>x</I>, the width of <I>window</I>
-is expanded to fill the cavity.  If <I>style</I> is <B>y</B>, the height is expanded. 
-The default is <I>none</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Sets the height of the cavity surrounding
-<I>window</I>.  If <I>pixels</I> is zero, the height of the cavity will be the same as
-the requested height of <I>window</I>.  If <I>pixels</I> is less than the  requested height
-of <I>window</I>, <I>window</I> will be reduced to fit the cavity.  The default is <I>0</I>. </DD>
-
-<DT><B>-ipadx
-<I>pad</I></B> </DT>
-<DD>Sets the amount of internal padding to be added to the width <I>window</I>.
- <I>Pad</I> can be a list of one or two numbers.  If <I>pad</I> has two elements, the
-left side of <I>window</I> is extended by the first value and the right side by
-the second value.  If <I>pad</I> is just one value, both the left and right sides
-are padded by evenly by the value.  The default is <I>0</I>. </DD>
-
-<DT><B>-ipady <I>pad</I></B> </DT>
-<DD>Sets an amount
-of internal padding to be added to the height of <I>window</I>.  <I>Pad</I> can be a list
-of one or two numbers.  If <I>pad</I> has two elements, the top of <I>window</I> is padded
-by the first value and the bottom by the second value.  If <I>pad</I> is just one
-number, both the top and bottom are padded evenly by the value. The default
-is <I>0</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Justifies <I>window</I> vertically within the cavity containing
-it in relation to the line of text. <I>Justify</I> is <B>top</B>,  <B>bottom</B>, or  <B>center</B>.
- If <I>justify</I> is <I>center</I> the widget is centered along the baseline of the
-line of text.  The  default is <I>center</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the padding on the left
-and right sides of <I>window</I>. <I>Pad</I> can be a list of one or two numbers.  If <I>pad</I>
-has two elements, the left side of <I>window</I> is padded by the first value
-and the right side by the second value.  If <I>pad</I> has just one value, both
-the left and right sides are padded evenly by the value. The default is
-<I>0</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and below <I>window</I>.  <I>Pad</I> can be a list of
-one or two numbers.  If <I>pad</I> has two elements, the area above <I>window</I> is padded
-by the first value and the area below by the second value.  If <I>pad</I> is just
-one number, both the top and bottom are padded by the value.  The default
-is <I>0</I>. </DD>
-
-<DT><B>-relheight <I>value</I></B> </DT>
-<DD>Specifies the height of the cavity containing <I>window</I>
-relative to  the height of <I>pathName</I>.  <I>Value</I> is real number indicating the
-ratio of the height of the cavity to the height of <I>pathName</I>.   As the height
-of <I>pathName</I> changes, so will the height of <I>window</I>. If <I>value</I> is 0.0 or less,
-the height of the cavity is the requested  height <I>window</I>.  The default is
-<I>0.0</I>. </DD>
-
-<DT><B>-relwidth <I>value</I></B> </DT>
-<DD>Specifies the width of the cavity containing <I>window</I> relative
-to the width of <I>pathName</I>.  <I>Value</I> is real number indicating the ratio of
-the width of the cavity to the width of IpathName. As the height of <I>pathName</I>
-changes, so will the height of <I>window</I>. If <I>value</I> is 0.0 or less, the width
-of the cavity is the requested width of <I>window</I>.   The default is <I>0.0</I>. </DD>
-
-<DT><B>-width
-<I>value</I></B> </DT>
-<DD>Species the width of the cavity containing the child window.   <I>Value</I>
-must be in a form accepted by <B>Tk_GetPixels</B>. If <I>value</I> is greater than zero,
-the cavity is resized to that width.   If the requested window width is
-greater than the cavity's width, the window will be reduced to fit the cavity.
-By default, the cavity is requested width of the child window.  </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>configure</B></I> ?<I>window</I>? ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Queries or modifies the
-configuration options of the text widget or one  of its embedded widgets.
- If no <I>window</I> argument is present,  the htext widget itself is configured.
- Otherwise <I>window</I> is the pathname of a widget already embedded into the
-htext widget. Then this command configure the options for the embedded widget.
-</DD>
-</DL>
-<P>
-If <I>option</I> isn't specified, a list describing all of the current options
-for <I>pathName</I> or <I>window</I> is returned.  If <I>option</I> is specified, but not <I>value</I>,
-then a list describing the option <I>option</I> is returned.  If one or more <I>option</I>
-and <I>value</I> pairs are specified, then for each pair, the htext or embedded
- window option <I>option</I> is set to <I>value</I>. <P>
-The following options are valid for
-the htext widget. <blockquote>
-<DL>
-
-<DT><B>-background</B> <I>color<I> </I></I></DT>
-<DD>Sets the background of the htext widget
-to <I>color</I>.  This default is <I>white</I>. </DD>
-
-<DT><B>-cursor</B> <I>cursor</I> </DT>
-<DD>Specifies the cursor for
-the htext widget.  The default cursor is  <I>pencil</I>. </DD>
-
-<DT><B>-filename</B> <I>fileName</I> </DT>
-<DD>Specifies
-a <B>htext</B> file to be displayed in the window.  If the value is the empty string,
-the <B>-text</B> option is used instead. See the section  <FONT SIZE=-1><B>FILE</B></FONT>
-  for a description
-of the <B>htext</B>  file format. </DD>
-
-<DT><B>-font</B> <I>fontName</I>  </DT>
-<DD>Sets the font of the text in the
-htext widget to <I>fontName</I>. The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>. </DD>
-
-<DT><B>-foreground</B>
-<I>color</I> </DT>
-<DD>Sets the foreground of the htext widget to <I>color</I>.  This is the color
-of the text.  This default is <I>black</I>. </DD>
-
-<DT><B>-height</B> <I>pixels</I> </DT>
-<DD>Specifies the height of
-the htext widget window.  </DD>
-
-<DT><B>-linespacing</B> <I>pixels</I> </DT>
-<DD>Specifies the spacing between
-each line of text.  The value must be in a form accepted by <B>Tk_GetPixels</B>.
-The default value is 1 pixel. </DD>
-
-<DT><B>-specialchar</B> <I>number</I> </DT>
-<DD>Specifies the ASCII value
-of the special double character delimiters. In <B>htext</B> files, the text between
-these special characters is  evaluated as a block of Tcl commands. The default
-special character  is the <I>0x25</I>  (percent sign). </DD>
-
-<DT><B>-text</B> <I>text</I> </DT>
-<DD>Specifies the
-text to be displayed in the htext widget.  <I>Text</I> can be any valid string
-of characters. See <FONT SIZE=-1><B>FILE FORMAT</B></FONT>
-  for a description. </DD>
-
-<DT><B>-xscrollcommand</B> <I>string</I>
- </DT>
-<DD>Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  When the view in the htext widget's window changes (or whenever
-anything else occurs that could change the display in a scrollbar, such
-as a change in the total size of the widget's contents), the widget invoke
-<I>string</I> concatenated by two numbers. Each of the numbers is a fraction between
-0 and 1, which indicates a position in the document.  If this option is
-not specified, then no command will be executed. </DD>
-
-<DT><B>-yscrollcommand</B> <I>string</I> </DT>
-<DD>Specifies
-the prefix for a command used to communicate with vertical scrollbars. 
-When the view in the htext widget's window changes (or whenever anything
-else occurs that could change the display in a scrollbar, such as a change
-in the total size of the widget's contents), the widget invoke <I>string</I> concatenated
-by two numbers. Each of the numbers is a fraction between 0 and 1, which
-indicates a position in the document.  If this option is not specified,
-then no command will be executed. </DD>
-
-<DT><B>-width</B> <I>pixels</I> </DT>
-<DD>Specifies the desired width
-of the viewport window.  If the <I>pixels</I> is less than one, the window will
-grow to accommodate the widest line of text.   </DD>
-
-<DT><B>-xscrollunits</B> <I>pixels</I> </DT>
-<DD>Specifies
-the horizontal scrolling distance. The default is 10 pixels. </DD>
-
-<DT><B>-yscrollunits</B>
-<I>pixels</I> </DT>
-<DD>Specifies the vertical scrolling distance. The default is 10 pixels.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>gotoline </B></I>?<I>index</I>? </DT>
-<DD>Sets the top line of the text to <I>index</I>. <I>Index</I>
-must be a valid text index (the character offset is ignored).   If an <I>index</I>
-isn't provided, the current line number is  returned. </DD>
-
-<DT><I>pathName <B>scan mark
-<I>position</I></B></I> </DT>
-<DD>Records <I>position</I> and the current view in the text window;  used
-in conjunction with later <B>scan dragto</B> commands.  <I>Position</I> must  be in the
-form "<I>@x,y</I>, where <I>x</I> and <I>y</I> are window coordinates. Typically this command
-is associated with a mouse button press in the widget.  It returns an empty
-string. </DD>
-
-<DT><I>pathName <B>scan dragto <I>position</I></B></I> </DT>
-<DD>Computes the difference between <I>position</I>
-and the position registered in the last <B>scan mark</B> command for the widget.
-  The view is then adjusted up or down by 10 times the difference in coordinates.
- This command is  can be associated with mouse motion events to produce
-the effect of dragging the text at high speed through the window.   <I>Position</I>
-must be in the form "<I>@x,y</I>, where <I>x</I> and  <I>y</I> are window coordinates. The command
-returns an empty string. </DD>
-
-<DT><I>pathName <B>search <I>pattern</I></B></I> ?<I>from</I>? ?<I>to</I>? </DT>
-<DD>Returns the
-number of the next line matching <I>pattern</I>.  <I>Pattern</I> is a string which obeys
-the matching rules of <B>Tcl_StringMatch</B>.  <I>From</I> and <I>to</I> are text line numbers
-(inclusive) which  bound the search.   If no match for <I>pattern</I> can be found,
-<B>-1</B> is returned. </DD>
-
-<DT><I>pathName <B>xview </B></I>?<I>position</I>? </DT>
-<DD>Moves the viewport horizontally
-to the new text x-coordinate position.   <I>Position</I> is the offset from the
-left side of the text to the current  position and must be in a form accepted
-by <B>Tk_GetPixels</B>. If <I>position</I> is not present, the current text position is
-returned. </DD>
-
-<DT><I>pathName <B>yview </B></I>?<I>position</I>? </DT>
-<DD>Moves the viewport vertically to the
-new text y-coordinate position.   <I>Position</I> is the offset from the top of
-the text to the current  position and must be in a form accepted by <B>Tk_GetPixels</B>.
-If <I>position</I> is not present, the current text position is returned. </DD>
-</DL>
-
-<H2><A NAME="sect8" HREF="#toc8">Bugs</A></H2>
-Text
-with embedded tabs can be obscured by child windows when scrolled  horizontally.
-
-<H2><A NAME="sect9" HREF="#toc9">Keywords</A></H2>
-hypertext, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">File Format</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Indices</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Variables</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Syntax</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Operations</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Bugs</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/spline.html b/blt3.0/html/spline.html
deleted file mode 100644
index 368746c..0000000
--- a/blt3.0/html/spline.html
+++ /dev/null
@@ -1,160 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>spline(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-spline -  Fit curves with spline interpolation
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<P>
-<B>spline natural <I>x y sx sy</I></B> <P>
-<B>spline quadratic <I>x y sx sy</I></B> 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The
-<B>spline</B> command computes a spline fitting a set of data points (x and y
-vectors) and produces a vector of the interpolated images (y-coordinates)
-at a given set of x-coordinates. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Curve fitting has many applications.
- In graphs, curve fitting can be useful for displaying curves which are
-aesthetically pleasing to the eye.  Another advantage is that you can quickly
-generate arbitrary points  on the curve from a small set of data points.
-<P>
-A spline is a device used in drafting to produce smoothed curves.  The points
-of the curve, known as <I>knots</I>, are fixed and the <I>spline</I>, typically a thin
-strip of wood or metal, is bent around the knots to create the smoothed
-curve.  Spline interpolation is the mathematical equivalent.  The curves
-between adjacent knots are piecewise functions such that the resulting
-spline runs exactly through all the knots.  The order and coefficients of
-the polynominal determine the "looseness" or "tightness" of the curve fit
-from the line segments formed by the knots. <P>
-The <B>spline</B> command performs
-spline interpolation using cubic ("natural") or quadratic polynomial functions.
- It computes the spline based upon the knots, which are given as x and
-y vectors.  The interpolated new points are determined by another vector
-which represents the abscissas (x-coordinates) or the new points.  The ordinates
-(y-coordinates) are interpolated using the spline and  written to another
-vector. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-Before we can use the <B>spline</B> command, we need to create two
-BLT vectors which will represent the knots (x and y coordinates) of the
-data that we're going to fit.  Obviously, both vectors must be the same length.
-<BR>
-<CODE># Create sample data of ten points. <BR>
-vector x(10) y(10)<BR>
-<P>
-for {set i 10} {$i > 0} {incr i -1} {<BR>
-    set x($i-1) [expr $i*$i]<BR>
-    set y($i-1) [expr sin($i*$i*$i)]<BR>
-}<BR>
-</CODE><P>We now have two vectors <I>x</I> and <I>y</I> representing the ten data points we're trying
-to fit.  The order of the values of <I>x</I> must be monotonically increasing. 
-We can use the vector's <B>sort</B> operation  to sort the vectors. <BR>
-<CODE>x sort y<BR>
-</CODE><P>The components of <I>x</I> are sorted in increasing order.  The components of <I>y</I>
-are rearranged so that the original x,y coordinate pairings are retained.
-<P>
-A third vector is needed to indicate the abscissas (x-coordinates) of the
-new points to be interpolated by the spline.  Like the x vector, the vector
-of abscissas must be monotonically increasing.  All the abscissas must lie
-between the first and last knots (x vector) forming the spline. <P>
-How the
-abscissas are picked is arbitrary.  But if we are going to plot the spline,
-we will want to include the knots too.  Since both the quadratic and natural
-splines preserve the knots (an abscissa from the x vector will always produce
-the corresponding ordinate from the y vector), we can simply make the new
-vector a superset of <I>x</I>. It will contain the same coordinates as <I>x</I>, but also
-the abscissas of the new points we want interpolated.  A simple way is to
-use the vector's <B>populate</B> operation. <BR>
-<CODE>x populate sx 10<BR>
-</CODE><P>This creates a new vector <I>sx</I>.  It contains the abscissas of <I>x</I>, but in addition
-<I>sx</I> will have ten evenly distributed values between each abscissa.  You can
-interpolate any points you wish, simply by setting the vector values. <P>
-Finally,
-we generate the ordinates (the images of the spline) using the <B>spline</B> command.
- The ordinates are stored in a fourth vector. <BR>
-<CODE>spline natural x y sx sy<BR>
-</CODE><P>This creates a new vector <I>sy</I>.  It will have the same length as <I>sx</I>.  The vectors
-<I>sx</I> and <I>sy</I> represent the smoothed curve which we can now plot. <BR>
-<CODE>graph .graph<BR>
-.graph element create original -x x -y x -color blue<BR>
-.graph element create spline -x sx -y sy -color red<BR>
-table . .graph<BR>
-</CODE><P>The <B>natural</B> operation employs a cubic interpolant when forming the spline.
- In terms of the draftmen's spline, a <I>natural spline</I> requires the least
-amount of energy to bend the spline (strip of wood), while still passing
-through each knot.  In mathematical terms, the second derivatives of the
-first and last points are zero. <P>
-Alternatively, you can generate a spline
-using the <B>quadratic</B> operation.  Quadratic interpolation produces a spline
-which follows  the line segments of the data points much more closely. 
- <BR>
-<CODE>spline quadratic x y sx sy <BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Operations</A></H2>
-
-<DL>
-
-<DT><B>spline natural <I>x y sx sy</I></B>  </DT>
-<DD>Computes a cubic spline from the data
-points represented by the vectors <I>x</I> and <I>y</I> and interpolates new points using
-vector <I>sx</I> as the x-coordinates.  The resulting y-coordinates are written to
-a new vector <I>sy</I>. The vectors <I>x</I> and <I>y</I> must be the same length and contain
-at least three components.  The order of the components of <I>x</I> must be monotonically
-increasing. <I>Sx</I> is the vector containing the x-coordinates of the points to
-be interpolated.  No component of <I>sx</I> can be less than first component of
-<I>x</I> or greater than the last component.  The order of the components of <I>sx</I>
-must be monotonically increasing. <I>Sy</I> is the name of the vector where the
-calculated y-coordinates will be stored.  If <I>sy</I> does not already exist, a
-new vector will be created. </DD>
-
-<DT><B>spline quadratic <I>x y sx sy</I></B>  </DT>
-<DD>Computes a quadratic
-spline from the data points represented by the vectors <I>x</I> and <I>y</I> and interpolates
-new points using vector <I>sx</I> as the x-coordinates.  The resulting y-coordinates
-are written to a new vector <I>sy</I>.  The vectors <I>x</I> and <I>y</I> must be the same length
-and contain at least three components.  The order of the components of <I>x</I>
-must be monotonically increasing. <I>Sx</I> is the vector containing the x-coordinates
-of the points to be interpolated. No component of <I>sx</I> can be less than first
-component of <I>x</I> or greater than the last component.  The order of the components
-of <I>sx</I> must be monotonically increasing.  <I>Sy</I> is the name of the vector where
-the calculated y-coordinates are stored.  If <I>sy</I> does not already exist, a
-new vector will be created. </DD>
-</DL>
-
-<H2><A NAME="sect6" HREF="#toc6">References</A></H2>
-<BR>
-<PRE>
-Numerical Analysis
-by R. Burden, J. Faires and A. Reynolds.<tt> </tt> <tt> </tt> 
-Prindle, Weber & Schmidt, 1981, pp. 112
-
-Shape Preserving Quadratic Splines 
-by D.F.Mcallister & J.A.Roulier
-Coded by S.L.Dodd & M.Roulier N.C.State University.
-
-</PRE>The original code for the quadratric spline can be found in TOMS #574. 
-<H2><A NAME="sect7" HREF="#toc7">Keywords</A></H2>
-spline,
-vector, graph <P>
- <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Operations</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">References</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/stripchart.html b/blt3.0/html/stripchart.html
deleted file mode 100644
index 9a9fe82..0000000
--- a/blt3.0/html/stripchart.html
+++ /dev/null
@@ -1,2179 +0,0 @@
-                    <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>stripchart(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-stripchart -  2D strip chart for plotting x and
-y coordinate data. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>stripchart<I> <I>pathName </I></I></B>?<I>option value</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The
-<B>stripchart</B> command creates a strip chart for plotting two-dimensional data
-(x,y coordinates). It has many configurable components: coordinate axes,
-elements, legend, grid lines, cross hairs, etc.  They allow you to customize
-the look and feel of the strip chart. <P>
-The <B>stripchart</B> is essentially the
-same as the <B>graph</B> widget.  It works almost exactly the very same way.   <P>
-The
-use of a strip chart differs in that the X-axis typically refers to time
-points.  Data values are added at intervals.  The strip chart lets you automatically
-maintain a view of the most recent time points. The axis options <B>-shiftby</B>
-and <B>-autorange</B> control this. You can specify different line styles for data
-points (see the  <B>-styles</B> option).   
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The <B>stripchart</B> command creates
-a new window for plotting two-dimensional data (x,y coordinates).  Data points
-are plotted in a box displayed in the center of the new window.  This is
-the <I>plotting area</I>.  The coordinate axes are displayed in the margins around
-the plotting area.  By default, the legend is displayed in the right margin.
- The title is displayed in top margin. <P>
-A strip chart is composed of several
-components: coordinate axes, data elements, legend, grid, cross hairs,
-pens, postscript, and annotation markers.  
-<DL>
-
-<DT><I>axis</I>  </DT>
-<DD>The stripchart widget can
-display up to four coordinate axes (two X-coordinate and two Y-coordinate
-axes), but you can create and use any number of axes. Axes control what
-region of data is displayed and how the data is scaled. Each axis consists
-of the axis line, title, major and minor ticks, and tick labels. Tick labels
-display the value of each major tick. </DD>
-
-<DT><I>crosshairs</I> </DT>
-<DD>Cross hairs are used to
-finely position the mouse pointer in relation to the coordinate axes. Two
-perpendicular lines are drawn across the plotting area, intersecting at
-the current location of the mouse pointer. </DD>
-
-<DT><I>element</I>  </DT>
-<DD>An element represents
-a set of data points. Elements can be plotted  with a symbol at each data
-point and lines connecting the points.  The appearance of the element, such
-as its symbol, line width, and  color is configurable. </DD>
-
-<DT><I>grid</I> </DT>
-<DD>Extends the
-major and minor ticks of the X-axis and/or Y-axis across the  plotting area.
- </DD>
-
-<DT><I>legend</I>  </DT>
-<DD>The legend displays the name and symbol of each data element. 
-The legend can be drawn in any margin or in the plotting area. </DD>
-
-<DT><I>marker</I> </DT>
-<DD>Markers
-are used annotate or highlight areas of the graph. For  example, you could
-use a polygon marker to fill an area under a  curve, or a text marker to
-label a particular data point. Markers  come in various forms: text strings,
-bitmaps, connected line  segments, images, polygons, or embedded widgets.
-</DD>
-
-<DT><I>pen</I>  </DT>
-<DD>Pens define attributes (both symbol and line style) for elements. 
-Data elements use pens to specify how they should be drawn.  A data  element
-may use many pens at once.  Here, the particular pen  used for a data point
-is determined from each element's weight  vector (see the element's <B>-weight</B>
-and <B>-style</B> options).   </DD>
-
-<DT><I>postscript</I> </DT>
-<DD>The widget can generate encapsulated PostScript
-output. This component has several options to configure how the PostScript
-is generated. </DD>
-</DL>
-
-<H2><A NAME="sect4" HREF="#toc4">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>stripchart <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>stripchart</B> command creates a new window <I>pathName</I> and makes it into
-a <B>stripchart</B> widget.  At the time this command is invoked, there must not
-exist a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional
-options may may be specified on the command line or in the option database
-to configure aspects of the strip chart such as its colors and font.  See
-the <B>configure</B> operation below for the exact details as to what <I>option</I> and
-<I>value</I> pairs are valid. <P>
-If successful, <B>stripchart</B> returns the path name of
-the widget.  It also creates a new Tcl command by the same name.  You can
-use this command to perform various operations that query or modify the
-graph. The general form is: <BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for the strip chart are described in  the  <FONT SIZE=-1><B>STRIPCHART
-OPERATIONS</B></FONT>
-  section. <P>
-The command can also be used to access components of
-the strip chart. <BR>
-<P>
-<CODE><I>pathName component operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>The operation, now located after the name of the component, is the function
-to be performed on that component. Each component has its own set of operations
-that manipulate that component.  They will be described below in their own
-sections. 
-<H2><A NAME="sect5" HREF="#toc5">Example</A></H2>
-The <B>stripchart</B> command creates a new strip chart.   <BR>
-<CODE># Create a new strip chart.  Plotting area is black.<BR>
-stripchart .s -plotbackground black<BR>
-</CODE><P>A new Tcl command <I>.s</I> is also created.  This command can be used to query
-and modify the strip chart.  For example, to change the title of the strip
-chart to "My Plot", you use the new command and the widget's <B>configure</B> operation.
-<BR>
-<CODE># Change the title.<BR>
-.s configure -title "My Plot"<BR>
-</CODE><P>A strip chart has several components. To access a particular component you
-use the component's name. For example, to add data elements, you use  the
-new command and the <B>element</B> component. <BR>
-<CODE># Create a new element named "line1"<BR>
-.s element create line1 \<BR>
-<tt> </tt> <tt> </tt> -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \<BR>
-<tt> </tt> <tt> </tt> -ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 <BR>
-<tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> 155.85 166.60 175.38 }<BR>
-</CODE><P>The element's X and Y coordinates are specified using lists of numbers. 
-Alternately, BLT vectors could be used to hold the X-Y coordinates. <BR>
-<CODE># Create two vectors and add them to the strip chart.<BR>
-vector xVec yVec<BR>
-xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }<BR>
-yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 <BR>
-<tt> </tt> <tt> </tt> 166.60 175.38 }<BR>
-.s element create line1 -xdata xVec -ydata yVec<BR>
-</CODE><P>The advantage of using vectors is that when you modify one, the graph is
-automatically redrawn to display the new values. <BR>
-<CODE># Change the X-Y coordinates of the first point.<BR>
-set xVec(0) 0.18<BR>
-set yVec(0) 25.18<BR>
-</CODE><P>An element named <I>line1</I> is now created in <I>.s</I>.  By default, the element's label
-in the legend will be also <I>line1</I>. You can change the label, or specify no
-legend entry, again using the element's <B>configure</B> operation. <BR>
-<CODE># Don't display "line1" in the legend.<BR>
-.s element configure line1 -label ""<BR>
-</CODE><P>You can configure more than just the element's label.  An element has many
-attributes such as symbol type and size, dashed or solid lines, colors,
-line width, etc. <BR>
-<CODE>.s element configure line1 -symbol square -color red \<BR>
-<tt> </tt> <tt> </tt> -dashes { 2 4 2 } -linewidth 2 -pixels 2c<BR>
-</CODE><P>Four coordinate axes are automatically created: <I>x</I>, <I>x2</I>, <I>y</I>, and <I>y2</I>.  And by
-default, elements are mapped onto the axes <I>x</I> and <I>y</I>.  This can be changed
-with the <B>-mapx</B> and <B>-mapy</B> options. <BR>
-<CODE># Map "line1" on the alternate Y-axis "y2".<BR>
-.s element configure line1 -mapy y2<BR>
-</CODE><P>Axes can be configured in many ways too.  For example, you change the scale
-of the Y-axis from linear to log using the <B>axis</B> operation. <BR>
-<CODE># Y-axis is log scale.<BR>
-.s axis configure y -logscale yes<BR>
-</CODE><P>Axis limits are reset by simply specifying new axis limits using the <B>-min</B>
-and <B>-max</B> configuration options. <BR>
-<CODE>.s axis configure x -min 1.0 -max 1.5<BR>
-.s axis configure y -min 12.0 -max 55.15<BR>
-</CODE><P>By default, the limits of the axis are determined from data values. To reset
-back to the default limits, set the <B>-min</B> and <B>-max</B> options to the empty value.
-<BR>
-<CODE># Reset the axes to autoscale again.<BR>
-.s axis configure x -min {} -max {}<BR>
-.s axis configure y -min {} -max {}<BR>
-</CODE><P>It's common with strip charts to automatically maintain a view of the most
-recent time points.  You can do this my setting the  <B>-autorange</B> option. <BR>
-<CODE>.s axis configure x -autorange 20.0<BR>
-</CODE><P>If the time points are added in X-coordinates 1.0 unit, only the last twenty
-time points will be displayed.  As more data is added, the view will march
-along. <P>
-Sometimes the rate of data is so high that changing the axis limits
-with each additional time point is prohibitive.  You can use the <B>-shiftby</B>
-option to define an increment to shift the view when needed.   <BR>
-<CODE>.s axis configure x -shiftby 15.0<BR>
-</CODE><P>When the view is shifted, it will allow a range of 15 new time points to
-be added until the axis limits are recomputed. <P>
-By default, the legend is
-displayed in the right margin.  You can change this or any other legend
-configuration options using the <B>legend</B> component. <BR>
-<CODE># Configure the legend font, color, and relief<BR>
-.s legend configure -position left -relief raised \<BR>
-<tt> </tt> <tt> </tt> -font fixed -fg blue<BR>
-</CODE><P>To prevent the legend from being displayed, turn on the <B>-hide</B> option. <BR>
-<CODE># Don't display the legend.<BR>
-.s legend configure -hide yes<BR>
-</CODE><P>The <B>stripchart</B> widget has simple drawing procedures called markers. They
-can be used to highlight or annotate data in the strip chart. The types
-of markers available are bitmaps, images, polygons, lines, or windows. Markers
-can be used, for example, to mark or brush points.  Here  is a text marker
-which labels the data first point.  Markers are created using the <B>marker</B>
-operation. <BR>
-<CODE># Create a label for the first data point of "line1".<BR>
-.s marker create text -name first_marker -coords { 0.2 26.18 } \<BR>
-<tt> </tt> <tt> </tt> -text "start" -anchor se -xoffset -10 -yoffset -10<BR>
-</CODE><P>This creates a text marker named <I>first_marker</I>.  It will display the text
-"start" near the coordinates of the first data point.  The <B>-anchor</B>, <B>-xoffset</B>,
-and <B>-yoffset</B> options are used to display the marker above and to the left
-of the data point, so that the actual data point isn't covered by the marker.
- By default, markers are drawn last, on top of data.  You can change this
-with the <B>-under</B> option. <BR>
-<CODE># Draw the label before elements are drawn.<BR>
-.s marker configure first_marker -under yes<BR>
-</CODE><P>You can add cross hairs or grid lines using the <B>crosshairs</B> and <B>grid</B> operations.
-<BR>
-<CODE># Display both cross hairs and grid lines.<BR>
-.s crosshairs configure -hide no -color red<BR>
-.s grid configure -hide no -dashes { 2 2 }<BR>
-</CODE><P>Finally, to get hardcopy of the strip chart, use the <B>postscript</B> operation.
-<BR>
-<CODE># Print the strip chart into file "file.ps"<BR>
-.s postscript output file.ps -maxpect yes -decorations no<BR>
-</CODE><P>This generates a file <I>file.ps</I> containing the encapsulated PostScript of
-the strip chart.  The option <B>-maxpect</B> says to scale the plot to the size
-of the page.  Turning off the <B>-decorations</B> option indicates that no borders
-or color backgrounds should be displayed (i.e. the background of the margins,
-legend, and plotting area will be white). 
-<H2><A NAME="sect6" HREF="#toc6">Stripchart Operations</A></H2>
-
-<DL>
-
-<DT><I>pathName
-<B>axis <I>operation</I></B></I> ?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>bar <I>elemName
-</I></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new barchart element <I>elemName</I>.  It's an error if
-an element <I>elemName</I> already exists.   See the manual for <B>barchart</B> for details
-about what <I>option</I> and <I>value</I> pairs are valid. </DD>
-
-<DT><I>pathName <B>cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the stripchart configuration option given by <I>option</I>.
- <I>Option</I> may be any option described below for the <B>configure</B> operation. </DD>
-
-<DT><I>pathName
-<B>configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration options
-of the strip chart.  If <I>option</I> isn't specified, a list describing all of
-the current options for <I>pathName</I> is returned.  If <I>option</I> is specified, but
-not <I>value</I>, then a list describing <I>option</I> is returned. If one or more <I>option</I>
-and <I>value</I> pairs are specified, then for each pair, the stripchart option
-<I>option</I> is set to <I>value</I>. The following options are valid for the stripchart.
-<blockquote></DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background color. This includes the margins and
-legend, but not the plotting area. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of
-the 3-D border around the outside edge of the widget.  The <B>-relief</B> option
-determines if the border is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-bottommargin
-<I>pixels</I></B> </DT>
-<DD>Specifies the size of the margin below the X-coordinate axis.  If
-<I>pixels</I> is <I>0</I>, the size of the margin is selected automatically. The default
-is <I>0</I>. </DD>
-
-<DT><B>-bufferelements <I>boolean</I></B> </DT>
-<DD>Indicates whether to draw elements into a pixmap
-before displaying them on the screen.  The advantage of buffering elements
-is when markers are used heavily.  Markers can be moved and redrawn without
-requiring every element to be redrawn again.  The disadvantage is that it
-takes slightly longer to draw the graph. If <I>boolean</I> is true, data elements
-are drawn to an internal pixmap.  The option should be turned off if the
-plot is updated frequently. See the <FONT SIZE=-1><B>SPEED TIPS</B></FONT>
-  section. The default is <I>1</I>.
-</DD>
-
-<DT><B>-buffergraph <I>boolean</I></B> </DT>
-<DD>Indicates whether to draw the graph into a pixmap first.
-If <I>boolean</I> is true, the entire graph is drawn into a pixmap and then copied
-onto the screen.  This reduces flashing.  If false, the graph is  drawn directly
-into the window.  Especially under Windows, turning off the  option can
-be helpful when the stripchart is updated frequently.  Turning  off this
-option also turns <B>-bufferelements</B> off. See the <FONT SIZE=-1><B>SPEED TIPS</B></FONT>
-  section. The default
-is <I>1</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is
-<I>crosshair</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the title font. The default is <I>*-Helvetica-Bold-R-Normal-*-18-180-*</I>.
-</DD>
-
-<DT><B>-halo <I>pixels</I></B>  </DT>
-<DD>Specifies a maximum distance to consider when searching for
-the closest data point (see the element's <B>closest</B> operation below). Data
-points further than <I>pixels</I> away are ignored.  The default is <I>0.5i</I>. </DD>
-
-<DT><B>-height
-<I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.  The default is <I>4i</I>. </DD>
-
-<DT><B>-invertxy
-<I>boolean</I></B> </DT>
-<DD>Indicates whether the placement X-axis and Y-axis should be inverted.
- If <I>boolean</I> is true, the X and Y axes are swapped.  The default is <I>0</I>. </DD>
-
-<DT><B>-justify
-<I>justify</I></B> </DT>
-<DD>Specifies how the title should be justified.  This matters only
-when the title contains more than one line of text. <I>Justify</I> must be <I>left</I>,
-<I>right</I>, or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-leftmargin <I>pixels</I></B> </DT>
-<DD>Sets the size
-of the margin from the left edge of the window to  the Y-coordinate axis.
- If <I>pixels</I> is <I>0</I>, the size is calculated automatically.  The default is <I>0</I>.
-</DD>
-
-<DT><B>-plotbackground <I>color</I></B> </DT>
-<DD>Specifies the background color of the plotting area.
- The default is <I>white</I>. </DD>
-
-<DT><B>-plotborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border
-around the plotting area.  The <B>-plotrelief</B> option determines if a border
-is drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-plotpadx <I>pad</I></B> </DT>
-<DD>Sets the amount of padding to be
-added to the left and right sides of the plotting area.  <I>Pad</I> can be a list
-of one or two screen distances.  If <I>pad</I> has two elements, the left side
-of the plotting area entry is padded by the first distance and the right
-side by the second.  If <I>pad</I> is just one distance, both the left and right
-sides are padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotpady <I>pad</I></B> </DT>
-<DD>Sets the amount
-of padding to be added to the top and bottom of the plotting area.  <I>Pad</I>
-can be a list of one or two screen distances.  If <I>pad</I> has two elements,
-the top of the plotting area is padded by the first distance and the bottom
-by the second.  If <I>pad</I> is just one distance, both the top and bottom are
-padded evenly.  The default is <I>8</I>. </DD>
-
-<DT><B>-plotrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the plotting area.  <I>Relief</I> indicates how the interior of the plotting
-area should appear relative to rest of the strip chart; for example, <I>raised</I>
-means the plot should appear to protrude from the strip chart, relative
-to the surface of the strip chart.  The default is <I>sunken</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B>
-</DT>
-<DD>Specifies the 3-D effect for the widget.  <I>Relief</I> indicates how the strip
-chart should appear relative to widget it is packed into; for example,
-<I>raised</I> means the strip chart should appear to protrude.  The default is
-<I>flat</I>. </DD>
-
-<DT><B>-rightmargin <I>pixels</I></B> </DT>
-<DD>Sets the size of margin from the plotting area
-to the right edge of the window.  By default, the legend is displayed in
-this margin.  If <I>pixels</I> is than 1, the margin size is selected automatically.
-</DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides information used when moving the focus from window
-to window via keyboard traversal (e.g., Tab and Shift-Tab).  If <I>focus</I> is <I>0</I>,
-this means that this window should be skipped entirely during keyboard
-traversal.  <I>1</I> means that the this window should always receive the input
-focus.  An empty value means that the traversal scripts make the decision
-whether to focus on the window. The default is <I>""</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies
-a tiled background.  If <I>image</I> isn't <I>""</I>, the background is tiled using <I>image</I>.
-Otherwise, the normal background color is drawn (see the <B>-background</B> option).
- <I>Image</I> must be an image created using the Tk <B>image</B> command.  The default
-is <I>""</I>. </DD>
-
-<DT><B>-title <I>text</I></B>  </DT>
-<DD>Sets the title to <I>text</I>. If <I>text</I> is <I>""</I>, no title will be
-displayed. </DD>
-
-<DT><B>-topmargin <I>pixels</I></B> </DT>
-<DD>Specifies the size of the margin above the x2
-axis.  If <I>pixels</I> is <I>0</I>, the margin size is calculated automatically. </DD>
-
-<DT><B>-width
-<I>pixels</I></B> </DT>
-<DD>Specifies the requested width of the widget.  The default is <I>5i</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>crosshairs <I>operation </I></B></I>?<I>arg</I>? </DT>
-<DD>See the  <FONT SIZE=-1><B>CROSSHAIRS COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName
-<B>element <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>ELEMENT COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>extents
-<I>item</I></B></I>  </DT>
-<DD>Returns the size of a particular item in the strip chart.  <I>Item</I> must
-be either <I>leftmargin</I>, <I>rightmargin</I>, <I>topmargin</I>, <I>bottommargin</I>, <I>plotwidth</I>,
-or <I>plotheight</I>. </DD>
-
-<DT><I>pathName <B>grid <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>GRID COMPONENT</B></FONT>
-  section.
-</DD>
-
-<DT><I>pathName <B>invtransform <I>winX winY</I></B></I>  </DT>
-<DD>Performs an inverse coordinate transformation,
-mapping window coordinates back to graph coordinates, using the standard
-X-axis and Y-axis. Returns a list of containing the graph coordinates. </DD>
-
-<DT><I>pathName
-<B>legend <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>LEGEND COMPONENT</B></FONT>
-  section. </DD>
-
-<DT><I>pathName <B>line
-<I>elemName</I></B></I> ?<I>option value</I>?... </DT>
-<DD>The operation is the same as <B>element</B>. </DD>
-
-<DT><I>pathName <B>marker
-<I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>MARKER COMPONENTS</B></FONT>
-  section. </DD>
-
-<DT><I>pathName</I> <B>metafile</B> ?<I>fileName</I>?
-</DT>
-<DD><I>This operation is for Window platforms only</I>.   Creates a Windows enhanced
-metafile of the stripchart. If present, <I>fileName</I> is the file name of the
-new metafile. Otherwise, the metafile is automatically added to the clipboard.
-</DD>
-
-<DT><I>pathName <B>postscript <I>operation </I></B></I>?<I>arg</I>?... </DT>
-<DD>See the  <FONT SIZE=-1><B>POSTSCRIPT COMPONENT</B></FONT>
-  section.
-</DD>
-
-<DT><I>pathName <B>snap <I>photoName</I></B></I> </DT>
-<DD>Takes a snapshot of the strip chart and stores
-the contents in the photo image <I>photoName</I>.  <I>PhotoName</I> is the name of a Tk
-photo image that must already exist. </DD>
-
-<DT><I>pathName <B>transform <I>x y</I></B></I>  </DT>
-<DD>Performs a
-coordinate transformation, mapping graph coordinates to window coordinates,
-using the standard X-axis and Y-axis. Returns a list containing the X-Y screen
-coordinates. </DD>
-
-<DT><I>pathName <B>xaxis <I>operation</I></B></I> ?<I>arg</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <B>x2axis <I>operation</I></B></I> ?<I>arg</I>?...
- </DT>
-<DD></DD>
-
-<DT><I>pathName <B>yaxis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD></DD>
-
-<DT><I>pathName <B>y2axis <I>operation</I></B></I> ?<I>arg</I>?...  </DT>
-<DD>See the
- <FONT SIZE=-1><B>AXIS COMPONENTS</B></FONT>
-  section. </DD>
-</DL>
-
-<H2><A NAME="sect7" HREF="#toc7">Stripchart Components</A></H2>
-A strip chart is composed
-of several components: coordinate axes, data elements, legend, grid, cross
-hairs, postscript, and annotation markers. Instead of one big set of configuration
-options and operations, the strip chart is partitioned, where each component
-has its own configuration options and operations that specifically control
-that aspect or part of the strip chart.  
-<H3><A NAME="sect8" HREF="#toc8">Axis Components</A></H3>
-Four coordinate
-axes are automatically created: two X-coordinate axes (<I>x</I> and <I>x2</I>) and two
-Y-coordinate axes (<I>y</I>, and <I>y2</I>).  By default, the axis <I>x</I> is located in the
-bottom margin, <I>y</I> in the left margin, <I>x2</I> in the top margin, and <I>y2</I> in the
-right margin. <P>
-An axis consists of the axis line, title, major and minor
-ticks, and tick labels.  Major ticks are drawn at uniform intervals along
-the axis.  Each tick is labeled with its coordinate value.  Minor ticks are
-drawn at uniform intervals within major ticks.   <P>
-The range of the axis controls
-what region of data is plotted. Data points outside the minimum and maximum
-limits of the axis are not plotted.  By default, the minimum and maximum
-limits are determined from the data, but you can reset either limit. <P>
-You
-can create and use several axes. To create an axis, invoke the axis component
-and its create operation. <BR>
-<CODE># Create a new axis called "temperature"<BR>
-.s axis create temperature<BR>
-</CODE><P>You map data elements to an axis using the element's -mapy and -mapx configuration
-options. They specify the coordinate axes an element is mapped onto. <BR>
-<CODE># Now map the temperature data to this axis.<BR>
-.s element create "temp" -xdata $x -ydata $tempData \<BR>
-    -mapy temperature<BR>
-</CODE><P>While you can have many axes, only four axes can be displayed simultaneously.
- They are drawn in each of the margins surrounding the plotting area.  The
-axes x and y are drawn in the bottom and left margins. The axes x2 and y2
-are drawn in top and right margins. Only x and y are shown by default. Note
-that the axes can have different scales. <P>
-To display a different axis, you
-invoke one of the following components: <B>xaxis</B>, <B>yaxis</B>, <B>x2axis</B>, and <B>y2axis</B>.
-The <B>use</B> operation designates the axis to be drawn in the corresponding
-margin: <B>xaxis</B> in the bottom, <B>yaxis</B> in the left,  <B>x2axis</B> in the top, and
-<B>y2axis</B> in the right. <BR>
-<CODE># Display the axis temperature in the left margin.<BR>
-.s yaxis use temperature<BR>
-<P>
-</CODE><P>You can configure axes in many ways. The axis scale can be linear or logarithmic.
- The values along the axis can either monotonically increase or decrease.
- If you need custom tick labels, you can specify a Tcl procedure to format
-the label as you wish.  You can control how ticks are drawn, by changing
-the major tick interval or the number of minor ticks.  You can define non-uniform
-tick intervals, such as for time-series plots. <P>
-
-<DL>
-
-<DT><I>pathName <B>axis <B>cget <I>axisName
-<I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option given by <I>option</I> for <I>axisName</I>.
- <I>Option</I> may be any option described below for the axis <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>axis <B>configure <I>axisName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies the
-configuration options of <I>axisName</I>.  If <I>option</I> isn't specified, a list describing
-all the current options for <I>axisName</I> is returned.  If <I>option</I> is specified,
-but not <I>value</I>, then a list describing <I>option</I> is returned.  If one or more
-<I>option</I> and <I>value</I> pairs are specified, then for each pair, the axis option
-<I>option</I> is set to <I>value</I>.   The following options are valid for axes. <blockquote></DD>
-
-<DT><B>-autorange
-<I>range</I></B>  </DT>
-<DD>Sets the range of values for the axis to <I>range</I>.  The axis limits
-are automatically reset  to display the most recent data points in this
-range.   If <I>range</I> is 0.0, the range is determined from the limits of the
-data.  If <B>-min</B> or <B>-max</B> are specified, they override this option.  The default
-is <I>0.0</I>. </DD>
-
-<DT><B>-color <I>color</I></B> </DT>
-<DD>Sets the color of the axis and tick labels. The default
-is <I>black</I>. </DD>
-
-<DT><B>-command <I>prefix</I></B> </DT>
-<DD>Specifies a Tcl command to be invoked when formatting
-the axis tick labels. <I>Prefix</I> is a string containing the name of a Tcl proc
-and any extra arguments for the procedure.  This command is invoked for
-each major tick on the axis.  Two additional arguments are passed to the
-procedure: the pathname of the widget and the current the numeric value
-of the tick.  The procedure returns the formatted tick label.  If <I>""</I> is returned,
-no label will appear next to the tick.  You can get the standard tick labels
-again by setting <I>prefix</I> to <I>""</I>.  The default is <I>""</I>. <P>
-Please note that this
-procedure is invoked while the strip chart is redrawn. You may query the
-configuration options.  But do not reset them, because  this can have unexpected
-results. </DD>
-
-<DT><B>-descending <I>boolean</I></B>  </DT>
-<DD>Indicates whether the values along the axis
-are monotonically increasing or decreasing.  If <I>boolean</I> is true, the axis
-values will be decreasing.  The default is <I>0</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether
-the axis is displayed.  </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the axis title should
-be justified.  This matters only when the axis title contains more than
-one line of text. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.  The default is
-<I>center</I>. </DD>
-
-<DT><B>-limits <I>formatStr</I></B> </DT>
-<DD>Specifies a printf-like description to format the
-minimum and maximum limits of the axis.  The limits are displayed at the
-top/bottom or left/right sides of the plotting area.  <I>FormatStr</I> is a list
-of one or two format descriptions.  If one description is supplied, both
-the minimum and maximum limits are formatted in the same way.  If two, the
-first designates the format for the minimum limit, the second for the maximum.
- If <I>""</I> is given as either description, then  the that limit will not be
-displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the axis
-and tick lines.  The default is <I>1</I> pixel. </DD>
-
-<DT><B>-logscale <I>boolean</I></B> </DT>
-<DD>Indicates whether
-the scale of the axis is logarithmic or linear.  If <I>boolean</I> is true, the
-axis is logarithmic.  The default scale is linear. </DD>
-
-<DT><B>-loose <I>boolean</I></B> </DT>
-<DD>Indicates
-whether the limits of the axis should fit the data points tightly, at the
-outermost data points, or loosely, at the outer tick intervals. This is
-relevant only when the axis limit is automatically calculated. If <I>boolean</I>
-is true, the axis range is "loose". The default is <I>0</I>. </DD>
-
-<DT><B>-majorticks <I>majorList</I></B>
-</DT>
-<DD>Specifies where to display major axis ticks.  You can use this option to
-display ticks at non-uniform intervals.  <I>MajorList</I> is a list of axis coordinates
-designating the location of major ticks.  No minor ticks are drawn.  If <I>majorList</I>
-is <I>""</I>,  major ticks will be automatically computed. The default is <I>""</I>. </DD>
-
-<DT><B>-max
-<I>value</I></B> </DT>
-<DD>Sets the maximum limit of <I>axisName</I>.  Any data point greater  than
-<I>value</I> is not displayed.  If <I>value</I> is <I>""</I>,  the maximum limit is calculated
-using the largest data value. The default is <I>""</I>. </DD>
-
-<DT><B>-min <I>value</I></B> </DT>
-<DD>Sets the minimum
-limit of <I>axisName</I>. Any data point less than  <I>value</I> is not displayed.  If
-<I>value</I> is <I>""</I>, the minimum limit is calculated using the smallest data value.
-The default is <I>""</I>. </DD>
-
-<DT><B>-minorticks <I>minorList</I></B> </DT>
-<DD>Specifies where to display minor
-axis ticks.  You can use this option to display minor ticks at non-uniform
-intervals. <I>MinorList</I> is a list of real values, ranging from 0.0 to 1.0, designating
-the placement of a minor tick.  No minor ticks are drawn if the <B>-majortick</B>
-option is also set.  If <I>minorList</I> is <I>""</I>, minor ticks will be automatically
-computed. The default is <I>""</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the how many degrees
-to rotate the axis tick labels. <I>Theta</I> is a real value representing the number
-of degrees to rotate the tick labels.  The default is <I>0.0</I> degrees. </DD>
-
-<DT><B>-shiftby
-<I>value</I></B> </DT>
-<DD>Specifies how much to automatically shift the range of the axis. When
-the new data exceeds the current axis maximum, the maximum is increased
-in increments of <I>value</I>.  You can use this option to prevent the axis limits
-from being recomputed at each new time point. If <I>value</I> is 0.0, then no automatic
-shifting is done. The default is <I>0.0</I>. </DD>
-
-<DT><B>-showticks <I>boolean</I></B> </DT>
-<DD>Indicates whether
-axis ticks should be drawn. If <I>boolean</I> is true, ticks are drawn.  If false,
-only the axis line is drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-stepsize <I>value</I></B> </DT>
-<DD>Specifies the
-interval between major axis ticks.  If <I>value</I> isn't a valid interval (must
-be less than the axis range),  the request is ignored and the step size
-is automatically calculated. </DD>
-
-<DT><B>-subdivisions <I>number</I></B>  </DT>
-<DD>Indicates how many minor
-axis ticks are to be drawn.  For example, if <I>number</I> is two, only one minor
-tick is drawn.  If <I>number</I> is one, no minor ticks are displayed.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-tickfont <I>fontName</I></B>  </DT>
-<DD>Specifies the font for axis tick labels. The default
-is <I>*-Courier-Bold-R-Normal-*-100-*</I>. </DD>
-
-<DT><B>-ticklength <I>pixels</I></B> </DT>
-<DD>Sets the length of major
-and minor ticks (minor ticks are half the length of major ticks). If <I>pixels</I>
-is less than zero, the axis will be inverted with ticks drawn pointing
-towards the plot.  The default is <I>0.1i</I>. </DD>
-
-<DT><B>-title <I>text</I></B> </DT>
-<DD>Sets the title of the axis.
-If <I>text</I> is  <I>""</I>, no axis title will be displayed.   </DD>
-
-<DT><B>-titlecolor <I>color</I></B> </DT>
-<DD>Sets
-the color of the axis title. The default is <I>black</I>. </DD>
-
-<DT><B>-titlefont <I>fontName</I></B>  </DT>
-<DD>Specifies
-the font for axis title. The default is <I>*-Helvetica-Bold-R-Normal-*-14-140-*</I>. </DD>
-</DL>
-<P>
-Axis
-configuration options may be also be set by the <B>option</B> command.  The resource
-class is <I>Axis</I>.  The resource names are the names of the axes (such as <I>x</I>
-or <I>x2</I>). <BR>
-<CODE>option add *Stripchart.Axis.Color  blue<BR>
-option add *Stripchart.x.LogScale  true<BR>
-option add *Stripchart.x2.LogScale false<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>axis <B>create <I>axisName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new axis by the
-name <I>axisName</I>.  No axis by the same name can already exist. <I>Option</I> and <I>value</I>
-are described  in above in the axis <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>axis <B>delete
-</B></B></I>?<I>axisName</I>?... </DT>
-<DD>Deletes the named axes. An axis is not really deleted until it
-is not longer in use, so it's safe to delete axes mapped to elements. </DD>
-
-<DT><I>pathName
-<B>axis invtransform <I>axisName value</I></B></I> </DT>
-<DD>Performs the inverse transformation, changing
-the screen coordinate <I>value</I> to a graph coordinate, mapping the value mapped
-to <I>axisName</I>.  Returns the graph coordinate. </DD>
-
-<DT><I>pathName <B>axis limits <I>axisName</I></B></I>
-</DT>
-<DD>Returns a list of the minimum and maximum limits for <I>axisName</I>.  The order
-of the list is <I>min max</I>. </DD>
-
-<DT><I>pathName <B>axis names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of
-axes matching zero or more patterns.  If no <I>pattern</I> argument is give, the
-names of all axes are returned. </DD>
-
-<DT><I>pathName <B>axis transform <I>axisName value</I></B></I> </DT>
-<DD>Transforms
-the coordinate <I>value</I> to a screen coordinate by mapping the it to <I>axisName</I>.
- Returns the transformed screen coordinate. </DD>
-</DL>
-<P>
-Only four axes can be displayed
-simultaneously.  By default, they are <I>x</I>, <I>y</I>, <I>x2</I>, and <I>y2</I>.  You can swap in
-a different axis with <B>use</B> operation of the special axis components: <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B>. <BR>
-<CODE>.g create axis temp<BR>
-.g create axis time<BR>
-...<BR>
-.g xaxis use temp<BR>
-.g yaxis use time<BR>
-</CODE><P>Only the axes specified for use are displayed on the screen. <P>
-The <B>xaxis</B>,
-<B>x2axis</B>, <B>yaxis</B>, and <B>y2axis</B> components operate on an axis location rather
-than a specific axis like the more general <B>axis</B> component does.  The <B>xaxis</B>
-component manages the X-axis located in the bottom margin (whatever axis
-that happens to be).  Likewise, <B>yaxis</B> uses the Y-axis in the left margin,
-<B>x2axis</B> the top X-axis, and <B>y2axis</B> the right Y-axis. <P>
-They implicitly control
-the axis that is currently using to that location.  By default, <B>xaxis</B> uses
-the <I>x</I> axis, <B>yaxis</B> uses <I>y</I>, <B>x2axis</B> uses <I>x2</I>, and <B>y2axis</B> uses <I>y2</I>.  These components
-can be more convenient to use than always determining what axes are current
-being displayed by the graph. <P>
-The following operations are available for
-axes. They mirror exactly the operations of the <B>axis</B> component.  The <I>axis</I>
-argument must be <B>xaxis</B>, <B>x2axis</B>, <B>yaxis</B>, or <B>y2axis</B>. 
-<DL>
-
-<DT><I>pathName <I>axis <B>cget <I>option</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>configure </B></I></I>?<I>option value</I>?... </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> invtransform <I>value</I></B></I></I>
-</DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis <B>limits</B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> transform <I>value</I></B></I></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <I>axis<B> use </B></I></I>?<I>axisName</I>?
-  </DT>
-<DD>Designates the axis <I>axisName</I> is to be displayed at this location.  <I>AxisName</I>
-can not be already in use at another location.   This command returns the
-name of the axis currently using this location. </DD>
-</DL>
-
-<H3><A NAME="sect9" HREF="#toc9">Crosshairs Component</A></H3>
-Cross
-hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position the
-mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives. This
-means that they can be quickly drawn and erased without redrawing the entire
-strip chart. <P>
-The following operations are available for cross hairs: 
-<DL>
-
-<DT><I>pathName
-<B>crosshairs cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the cross hairs configuration
-option given by <I>option</I>.  <I>Option</I> may be any option described below for the
-cross hairs <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>crosshairs configure </B></I>?<I>option value</I>?...
-  </DT>
-<DD>Queries or modifies the configuration options of the cross hairs.  If
-<I>option</I> isn't specified, a list describing all the current options for the
-cross hairs is returned.  If <I>option</I> is specified, but not <I>value</I>, then a
-list describing <I>option</I> is returned. If one or more <I>option</I> and <I>value</I> pairs
-are specified, then for each pair, the cross hairs option <I>option</I> is set
-to <I>value</I>. The following options are available for cross hairs. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>
- </DT>
-<DD>Sets the color of the cross hairs.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B>
-</DT>
-<DD>Sets the dash style of the cross hairs. <I>DashList</I> is a list of up to 11 numbers
-that alternately represent the lengths of the dashes and gaps on the cross
-hair lines.  Each number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the
-cross hairs will be solid lines. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether cross hairs
-are drawn. If <I>boolean</I> is true, cross hairs are not drawn.  The default is
-<I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Set the width of the cross hair lines.  The default
-is <I>1</I>. </DD>
-
-<DT><B>-position <I>pos</I></B>  </DT>
-<DD>Specifies the screen position where the cross hairs
-intersect. <I>Pos</I> must be in the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window
-coordinates of the intersection. </DD>
-</DL>
-<P>
-Cross hairs configuration options may be
-also be set by the <B>option</B> command.  The resource name and class are <I>crosshairs</I>
-and <I>Crosshairs</I> respectively. <BR>
-<CODE>option add *Stripchart.Crosshairs.LineWidth 2<BR>
-option add *Stripchart.Crosshairs.Color     red<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>crosshairs off</B></I> </DT>
-<DD>Turns of the cross hairs.  </DD>
-
-<DT><I>pathName <B>crosshairs on</B></I>
-</DT>
-<DD>Turns on the display of the cross hairs. </DD>
-
-<DT><I>pathName <B>crosshairs toggle</B></I>  </DT>
-<DD>Toggles
-the current state of the cross hairs, alternately mapping and unmapping
-the cross hairs. </DD>
-</DL>
-
-<H3><A NAME="sect10" HREF="#toc10">Element Components</A></H3>
-A data element represents a set of data.
- It contains x and y vectors containing the coordinates of the data points.
- Elements can be displayed with a symbol at each data point and lines connecting
-the points.  Elements also control the appearance of the data, such as the
-symbol type, line width, color etc. <P>
-When new data elements are created,
-they are automatically added to a list of displayed elements.   The display
-list controls what elements are drawn and in what order.   <P>
-The following
-operations are available for elements. 
-<DL>
-
-<DT><I>pathName <B>element activate <I>elemName
-</I></B></I>?<I>index</I>?... </DT>
-<DD>Specifies the data points of element <I>elemName</I> to be drawn using
-active foreground and background colors.  <I>ElemName</I> is the name of the element
-and <I>index</I> is a number representing the index of the data point. If no indices
-are present then all data points become active. </DD>
-
-<DT><I>pathName <B>element cget <I>elemName
-<I>option</I></I></B></I> </DT>
-<DD>Returns the current value of the element configuration option given
-by  <I>option</I>.  <I>Option</I> may be any option described below for the element <B>configure</B>
-operation. </DD>
-
-<DT><I>pathName <B>element closest <I>x y</I></B></I> <I>varName</I> ?<I>option value</I>?... ?<I>elemName</I>?...
-</DT>
-<DD>Finds the data point closest to the window coordinates <I>x</I> and <I>y</I> in the element
-<I>elemName</I>.  <I>ElemName</I> is the name of an element, that must not be hidden. 
-If no elements are specified, then all visible elements are searched.  It
-returns via the array variable <I>varName</I> the name of the closest element,
-the index of its closest point, and the graph coordinates of the point.
-Returns <I>0</I>, if no data point within the threshold distance can be found,
-otherwise <I>1</I> is returned.  The following <I>option</I>-<I>value</I> pairs are available.
-<blockquote></DD>
-
-<DT><B>-halo <I>pixels</I></B> </DT>
-<DD>Specifies a threshold distance where selected data points are
-ignored. <I>Pixels</I> is a valid screen distance, such as <I>2</I> or <I>1.2i</I>. If this option
-isn't specified, then it defaults to the value of the stripchart's <B>-halo</B> option.
-</DD>
-
-<DT><B>-interpolate <I>boolean</I></B> </DT>
-<DD>Indicates that both the data points and interpolated
-points along the line segment formed should be considered.  If <I>boolean</I> 
-is true, the closest line segment will be selected instead of the closest
-point. If this option isn't specified, <I>boolean</I> defaults  to <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>element
-configure <I>elemName </I></B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration
-options for elements.  If <I>option</I> isn't specified, a list describing all the
-current options for <I>elemName</I> is returned.  If <I>option</I> is specified, but not
-<I>value</I>, then a list describing the option <I>option</I> is returned.  If one or
-more <I>option</I> and <I>value</I> pairs are specified, then for each pair, the element
-option <I>option</I> is set to <I>value</I>.  The following options are valid for elements.
-<blockquote></DD>
-
-<DT><B>-activepen <I>penName</I></B> </DT>
-<DD>Specifies pen to use to draw active element.  If <I>penName</I>
-is <I>""</I>, no active elements will be drawn.  The default is  <I>activeLine</I>. </DD>
-
-<DT><B>-color
-<I>color</I></B>  </DT>
-<DD>Sets the color of the traces connecting the data points.   </DD>
-
-<DT><B>-dashes
-<I>dashList</I></B> </DT>
-<DD>Sets the dash style of element line. <I>DashList</I> is a list of up to
-11 numbers that alternately represent the lengths of the dashes and gaps
-on the element line.  Each number must be between 1 and 255.  If <I>dashList</I>
-is <I>""</I>, the lines will be solid. </DD>
-
-<DT><B>-data <I>coordList</I></B> </DT>
-<DD>Specifies the X-Y coordinates
-of the data.  <I>CoordList</I> is a list of numeric expressions representing the
-X-Y coordinate pairs of each data point. </DD>
-
-<DT><B>-fill <I>color</I></B>  </DT>
-<DD>Sets the interior color
-of symbols.  If <I>color</I> is <I>""</I>, then the interior of the symbol is transparent.
- If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the element is
-displayed.  The default is <I>no</I>. </DD>
-
-<DT><B>-label <I>text</I></B> </DT>
-<DD>Sets the element's label in the
-legend.  If <I>text</I> is <I>""</I>, the element will have no entry in the legend. The
-default label is the element's name. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of
-the connecting lines between data points.  If <I>pixels</I> is <I>0</I>, no connecting
-lines will be drawn between symbols.  The default is <I>0</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Selects
-the X-axis to map the element's X-coordinates onto. <I>XAxis</I> must be the name
-of an axis.  The default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Selects the Y-axis to map the element's
-Y-coordinates onto. <I>YAxis</I> must be the name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-offdash
-<I>color</I></B> </DT>
-<DD>Sets the color of the stripes when traces are dashed (see the <B>-dashes</B>
-option).  If <I>color</I> is <I>""</I>, then the "off" pixels will represent gaps instead
-of stripes.  If <I>color</I> is <I>defcolor</I>, then the color will be the same as the
-<B>-color</B> option.  The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>  </DT>
-<DD>Sets the color or
-the outline around each symbol.  If <I>color</I> is <I>""</I>, then no outline is drawn.
-If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outlinewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the outline
-bordering each symbol.  If <I>pixels</I> is <I>0</I>, no outline will be drawn. The default
-is <I>1</I>. </DD>
-
-<DT><B>-pixels <I>pixels</I></B> </DT>
-<DD>Sets the size of symbols.  If <I>pixels</I> is <I>0</I>, no symbols
-will be drawn.  The default is <I>0.125i</I>. </DD>
-
-<DT><B>-scalesymbols <I>boolean</I></B>  </DT>
-<DD>If <I>boolean</I> is
-true, the size of the symbols drawn for <I>elemName</I> will change with scale
-of the X-axis and Y-axis. At the time this option is set, the current ranges
-of the axes are saved as the normalized scales (i.e scale factor is 1.0)
-and the element is drawn at its designated size (see the <B>-pixels</B> option).
- As the scale of the axes change, the symbol will be scaled according to
-the smaller of the X-axis and Y-axis scales.  If <I>boolean</I> is false, the element's
-symbols are drawn at the designated size, regardless of axis scales.  The
-default is <I>0</I>. </DD>
-
-<DT><B>-smooth <I>smooth</I></B>  </DT>
-<DD>Specifies how connecting line segments are
-drawn between data points. <I>Smooth</I> can be either <I>linear</I>, <I>step</I>, <I>natural</I>, or
-<I>quadratic</I>.  If <I>smooth</I> is <I>linear</I>, a single line segment is drawn, connecting
-both data points. When <I>smooth</I> is <I>step</I>, two line segments are drawn. The first
-is a horizontal line segment which steps the next x-coordinate.  The second
-is a vertical line, moving to the next y-coordinate.  Both <I>natural</I> and <I>quadratic</I>
-generate multiple segments between data points.  If <I>natural</I>, the segments
-are generated using a cubic spline.  If <I>quadratic</I>, a quadratic spline is
-used.  The default is <I>linear</I>. </DD>
-
-<DT><B>-styles <I>styleList</I></B>  </DT>
-<DD>Specifies what pen to use
-based upon the range of weights given. <I>StyleList</I> is a list of style specifications.
-Each style specification, in turn, is a list consisting of a pen name,
-and optionally a minimum and maximum range.  Data points whose weight (see
-the <B>-weight</B> option) falls in this range, are drawn with this pen.  If no
-range is specified it defaults to the number of the pen in the list.  </DD>
-
-<DT><B>-symbol
-<I>symbol</I></B>  </DT>
-<DD>Specifies the symbol for data points.  <I>Symbol</I> can be either <I>square</I>,
-<I>circle</I>, <I>diamond</I>, <I>plus</I>, <I>cross</I>, <I>splus</I>, <I>scross</I>, <I>triangle</I>, <I>""</I> (where no symbol
-is drawn), or a bitmap.  Bitmaps are specified as "<I>source</I> ?<I>mask</I>?", where
-<I>source</I> is the name of the bitmap, and <I>mask</I> is the bitmap's optional mask.
- The default is <I>circle</I>. </DD>
-
-<DT><B>-weights <I>wVec</I></B>  </DT>
-<DD>Specifies the weights of the individual
-data points.  This, in conjunction with the list pen styles (see the <B>-styles</B>
-option) controls how data points are drawn.  <I>WVec</I> is the name of a BLT vector
-or a list of numeric expressions representing the weights for each data
-point. </DD>
-
-<DT><B>-xdata <I>xVec</I></B>  </DT>
-<DD>Specifies the x-coordinates of the data.  <I>XVec</I> is the name
-of a BLT vector or a list of numeric expressions. </DD>
-
-<DT><B>-ydata <I>yVec</I></B>  </DT>
-<DD>Specifies
-the y-coordinates of the data.  <I>YVec</I> is the name of a BLT vector or a list
-of numeric expressions. </DD>
-</DL>
-<P>
-Element configuration options may also be set by
-the <B>option</B> command.  The resource class is <I>Element</I>. The resource name is
-the name of the element. <BR>
-<CODE>option add *Stripchart.Element.symbol line<BR>
-option add *Stripchart.e1.symbol line<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>element create <I>elemName</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a new element <I>elemName</I>.
- It's an error is an element <I>elemName</I> already exists.  If additional arguments
-are present, they specify options valid for  element <B>configure</B> operation.
-</DD>
-
-<DT><I>pathName <B>element deactivate <I>elemName</I></B></I> ?<I>elemName</I>?... </DT>
-<DD>Deactivates all the elements
-matching <I>pattern</I>. Elements whose names match any of the patterns given are
-redrawn using their normal colors. </DD>
-
-<DT><I>pathName <B>element delete</B></I> ?<I>elemName</I>?... </DT>
-<DD>Deletes
-all the named elements.  The graph is automatically redrawn. </DD>
-
-<DT><I>pathName <B>element
-exists <I>elemName</I></B></I> </DT>
-<DD>Returns <I>1</I> if an element <I>elemName</I> currently exists and <I>0</I>
-otherwise. </DD>
-
-<DT><I>pathName <B>element names </B></I>?<I>pattern</I>?...   </DT>
-<DD>Returns the elements matching
-one or more pattern.  If no <I>pattern</I> is given, the names of all elements
-is returned. </DD>
-
-<DT><I>pathName <B>element show</B></I> ?<I>nameList</I>?   </DT>
-<DD>Queries or modifies the
-element display list.  The element display list designates the elements
-drawn and in what order. <I>NameList</I> is a list of elements to be displayed
-in the order they are named.  If there is no <I>nameList</I> argument, the current
-display list is returned. </DD>
-
-<DT><I>pathName <B>element type</B></I> <I>elemName</I> </DT>
-<DD>Returns the type
-of <I>elemName</I>.  If the element is a bar element, the commands returns the
-string <I>"bar"</I>, otherwise it returns <I>"line"</I>. </DD>
-</DL>
-
-<H3><A NAME="sect11" HREF="#toc11"></CODE><P>Grid Component</A></H3>
-Grid lines extend
-from the major and minor ticks of each axis horizontally or vertically
-across the plotting area.  The following operations are available for grid
-lines. 
-<DL>
-
-<DT><I>pathName <B>grid cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the grid line
-configuration option given by  <I>option</I>.  <I>Option</I> may be any option described
-below for the grid <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>grid configure</B></I> ?<I>option
-value</I>?... </DT>
-<DD>Queries or modifies the configuration options for grid lines.  If
-<I>option</I> isn't specified, a list describing all the current grid options for
-<I>pathName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a list
-describing <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs are
-specified, then for each pair, the grid line option <I>option</I> is set to <I>value</I>.
- The following options are valid for grid lines. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color
-of the grid lines.  The default is <I>black</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style
-of the grid lines. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the grid lines.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the grid will be solid lines.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid should be drawn. If <I>boolean</I> is true,
-grid lines are not shown. The default is <I>yes</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of grid lines.  The default width is <I>1</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B> </DT>
-<DD>Specifies the X-axis to
-display grid lines.  <I>XAxis</I> must be the name of an axis.  The default is <I>x</I>.
-</DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to display grid lines.  <I>YAxis</I> must be the
-name of an axis. The default is <I>y</I>. </DD>
-
-<DT><B>-minor <I>boolean</I></B> </DT>
-<DD>Indicates whether the grid
-lines should be drawn for minor ticks.  If <I>boolean</I> is true, the lines will
-appear at minor tick intervals.  The default is <I>1</I>. </DD>
-</DL>
-<P>
-Grid configuration options
-may also be set by the  <B>option</B> command.  The resource name and class are
-<I>grid</I> and  <I>Grid</I> respectively.  <BR>
-<CODE>option add *Stripchart.grid.LineWidth 2<BR>
-option add *Stripchart.Grid.Color     black<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>grid off</B></I> </DT>
-<DD>Turns off the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid on</B></I>
-</DT>
-<DD>Turns on the display the grid lines. </DD>
-
-<DT><I>pathName <B>grid toggle</B></I> </DT>
-<DD>Toggles the display
-of the grid.   </DD>
-</DL>
-
-<H3><A NAME="sect12" HREF="#toc12">Legend Component</A></H3>
-The legend displays a list of the data elements.
- Each entry consists of the element's symbol and label.  The legend can appear
-in any margin (the default location is in the right margin).  It can also
-be positioned anywhere within the plotting area. <P>
-The following operations
-are valid for the legend. 
-<DL>
-
-<DT><I>pathName <B>legend activate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend
-entries to be drawn using the active legend colors and relief. All entries
-whose element names match <I>pattern</I>  are selected.  To be selected, the element
-name must match only one <I>pattern</I>.  </DD>
-
-<DT><I>pathName <B>legend cget <I>option</I></B></I> </DT>
-<DD>Returns the
-current value of a legend configuration option. <I>Option</I> may be any option
-described below in the legend <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>legend configure
-</B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies the configuration options for the legend.
- If <I>option</I> isn't specified, a list describing the current legend options
-for <I>pathName</I> is returned.  If <I>option</I> is specified, but not <I>value</I>, then a
-list describing <I>option</I> is returned.  If one or more <I>option</I> and <I>value</I> pairs
-are specified, then for each pair, the legend option <I>option</I> is set to <I>value</I>.
- The following options are valid for the legend. <blockquote></DD>
-
-<DT><B>-activebackground <I>color</I></B>
-</DT>
-<DD>Sets the background color for active legend entries.  All legend entries
-marked active (see the legend <B>activate</B> operation) are drawn using this
-background color. </DD>
-
-<DT><B>-activeborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border
-around the outside edge of the active legend entries.  The default is <I>2</I>.
-</DD>
-
-<DT><B>-activeforeground <I>color</I></B> </DT>
-<DD>Sets the foreground color for active legend entries.
- All legend entries marked as active (see the legend <B>activate</B> operation)
-are drawn using this foreground color. </DD>
-
-<DT><B>-activerelief <I>relief</I></B>  </DT>
-<DD>Specifies the
-3-D effect desired for active legend entries. <I>Relief</I> denotes how the interior
-of the entry should appear relative to the legend; for example, <I>raised</I>
-means the entry should appear to protrude from the legend, relative to
-the surface of the legend.  The default is <I>flat</I>. </DD>
-
-<DT><B>-anchor <I>anchor</I></B> </DT>
-<DD>Tells how
-to position the legend relative to the positioning point for the legend.
- This is dependent on the value of the <B>-position</B> option.  The default is
-<I>center</I>. <blockquote></DD>
-
-<DT><I>left</I> or <I>right</I> </DT>
-<DD>The anchor describes how to position the legend vertically.
-  </DD>
-
-<DT><I>top</I> or <I>bottom</I> </DT>
-<DD>The anchor describes how to position the legend horizontally.
-  </DD>
-
-<DT><I>@x,y</I> </DT>
-<DD>The anchor specifies how to position the legend relative to the
-positioning point. For example, if <I>anchor</I> is <I>center</I> then the legend is centered
-on the point; if <I>anchor</I> is <I>n</I> then the legend will be drawn such that the
-top center point of the rectangular region occupied by the legend will
-be at the positioning point. </DD>
-
-<DT><I>plotarea</I> </DT>
-<DD>The anchor specifies how to position
-the legend relative to the plotting area. For example, if <I>anchor</I> is <I>center</I>
-then the legend is centered in the plotting area; if <I>anchor</I> is <I>ne</I> then
-the legend will be drawn such that occupies the upper right corner of the
-plotting area. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background color of the legend.
-If <I>color</I> is <I>""</I>, the legend background with be transparent. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the 3-D border around the outside edge of the legend (if
-such border is being drawn; the <B>relief</B> option determines this). The default
-is <I>2</I> pixels. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD><I>FontName</I> specifies a font to use when drawing
-the labels of each element into the legend.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the foreground color of the text drawn for the element's
-label. The default is <I>black</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>Indicates whether the legend should
-be displayed. If <I>boolean</I> is true, the legend will not be draw.  The default
-is <I>no</I>. </DD>
-
-<DT><B>-ipadx <I>pad</I></B>  </DT>
-<DD>Sets the amount of internal padding to be added to the
-width of each legend entry.  <I>Pad</I> can be a list of one or two screen distances.
- If <I>pad</I> has two elements, the left side of the legend entry is padded by
-the first distance and the right side by the second.  If <I>pad</I> is just one
-distance, both the left and right sides are padded evenly.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-ipady <I>pad</I></B> </DT>
-<DD>Sets an amount of internal padding to be added to the height
-of each legend entry.  <I>Pad</I> can be a list of one or two screen distances.
- If <I>pad</I> has two elements, the top of the entry is padded by the first distance
-and the bottom by the second.  If <I>pad</I> is just one distance, both the top
-and bottom of the entry are padded evenly. The default is <I>2</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets
-the padding to the left and right exteriors of the legend. <I>Pad</I> can be a
-list of one or two screen distances.  If <I>pad</I> has two elements, the left
-side of the legend is padded by the first distance and the right side by
-the second.  If <I>pad</I> has just one distance, both the left and right sides
-are padded evenly.  The default is <I>4</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and
-below the legend.  <I>Pad</I> can be a list of one or two screen distances.  If
-<I>pad</I> has two elements, the area above the legend is padded by the first
-distance and the area below by the second.  If <I>pad</I> is just one distance,
-both the top and bottom areas are padded evenly.  The default is <I>0</I>. </DD>
-
-<DT><B>-position
-<I>pos</I></B> </DT>
-<DD>Specifies where the legend is drawn. The <B>-anchor</B> option also affects
-where the legend is positioned.  If <I>pos</I> is <I>left</I>, <I>left</I>, <I>top</I>, or <I>bottom</I>, the
-legend is drawn in the specified margin.  If <I>pos</I> is <I>plotarea</I>, then the legend
-is drawn inside the plotting area at a particular anchor.  If <I>pos</I> is in
-the form "<I>@x,y</I>", where <I>x</I> and <I>y</I> are the window coordinates, the legend is
-drawn in the plotting area at the specified coordinates.  The default is
-<I>right</I>. </DD>
-
-<DT><B>-raised <I>boolean</I></B> </DT>
-<DD>Indicates whether the legend is above or below the
-data elements.  This matters only if the legend is in the plotting area.
- If <I>boolean</I> is true, the legend will be drawn on top of any elements that
-may overlap it. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect
-for the border around the legend. <I>Relief</I> specifies how the interior of the
-legend should appear relative to the strip chart; for example, <I>raised</I> means
-the legend should appear to protrude from the strip chart, relative to
-the surface of the strip chart.  The default is <I>sunken</I>. </DD>
-</DL>
-<P>
-Legend configuration
-options may also be set by the <B>option</B> command.  The resource name and class
-are <I>legend</I> and <I>Legend</I> respectively. <BR>
-<CODE>option add *Stripchart.legend.Foreground blue<BR>
-option add *Stripchart.Legend.Relief     raised<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>legend deactivate <I>pattern</I></B></I>... </DT>
-<DD>Selects legend entries to be drawn using
-the normal legend colors and relief.  All entries whose element names match
-<I>pattern</I> are selected.  To be selected, the element name must match only
-one <I>pattern</I>. </DD>
-
-<DT><I>pathName <B>legend get <I>pos</I></B></I> </DT>
-<DD>Returns the name of the element whose
-entry is at the screen position <I>pos</I> in the legend.  <I>Pos</I> must be in the form
-"<I>@x,y</I>", where <I>x</I> and <I>y</I> are window coordinates.  If the given coordinates
-do not lie over a legend entry, <I>""</I> is returned. </DD>
-</DL>
-
-<H3><A NAME="sect13" HREF="#toc13">Pen Components</A></H3>
-Pens define
-attributes (both symbol and line style) for elements. Pens mirror the configuration
-options of data elements that pertain to how symbols and lines are drawn.
- Data elements use pens to determine how they are drawn.  A data element
-may use several pens at once.  In this case, the pen used for a particular
-data point is determined from each element's weight vector (see the element's
-<B>-weight</B> and <B>-style</B> options). <P>
-One pen, called <I>activeLine</I>, is automatically
-created. It's used as the default active pen for elements. So you can change
-the active attributes for all elements by simply reconfiguring this pen.
-<BR>
-<CODE>.s pen configure "activeLine" -color green<BR>
-</CODE><P>You can create and use any number of pens. To create a pen, invoke the pen
-component and its create operation. <BR>
-<CODE>.s pen create myPen<BR>
-</CODE><P>You map pens to a data element using either the element's  <B>-pen</B> or <B>-activepen</B>
-options. <BR>
-<CODE>.s element create "line1" -xdata $x -ydata $tempData \<BR>
-    -pen myPen<BR>
-</CODE><P>An element can use several pens at once. This is done by specifying the
-name of the pen in the element's style list (see the <B>-styles</B> option). <BR>
-<CODE>.s element configure "line1" -styles { myPen 2.0 3.0 }<BR>
-</CODE><P>This says that any data point with a weight between 2.0 and 3.0 is to be
-drawn using the pen <I>myPen</I>.  All other points are drawn with the element's
-default attributes. <P>
-The following operations are available for pen components.
-<P>
-
-<DL>
-
-<DT><I>pathName <B>pen <B>cget <I>penName <I>option</I></I></B></B></I> </DT>
-<DD>Returns the current value of the option
-given by <I>option</I> for <I>penName</I>.  <I>Option</I> may be any option described below for
-the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>configure <I>penName </I></B></B></I>?<I>option value</I>?...
-</DT>
-<DD>Queries or modifies the configuration options of <I>penName</I>.  If <I>option</I> isn't
-specified, a list describing the current options for <I>penName</I> is returned.
- If <I>option</I> is specified, but not <I>value</I>, then a list describing <I>option</I> is
-returned.  If one or more <I>option</I> and <I>value</I> pairs are specified, then for
-each pair, the pen option <I>option</I> is set to <I>value</I>.   The following options
-are valid for pens. <blockquote></DD>
-
-<DT><B>-color <I>color</I></B>  </DT>
-<DD>Sets the color of the traces connecting
-the data points.   </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of element line. <I>DashList</I>
-is a list of up to 11 numbers that alternately represent the lengths of
-the dashes and gaps on the element line.  Each number must be between 1
-and 255.  If <I>dashList</I> is <I>""</I>, the lines will be solid. </DD>
-
-<DT><B>-fill <I>color</I></B>  </DT>
-<DD>Sets the
-interior color of symbols.  If <I>color</I> is <I>""</I>, then the interior of the symbol
-is transparent.  If <I>color</I> is <I>defcolor</I>, then the color will be the same as
-the <B>-color</B> option.  The default is <I>defcolor</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width
-of the connecting lines between data points.  If <I>pixels</I> is <I>0</I>, no connecting
-lines will be drawn between symbols.  The default is <I>0</I>. </DD>
-
-<DT><B>-offdash <I>color</I></B> </DT>
-<DD>Sets
-the color of the stripes when traces are dashed (see the <B>-dashes</B> option).
- If <I>color</I> is <I>""</I>, then the "off" pixels will represent gaps instead of stripes.
- If <I>color</I> is <I>defcolor</I>, then the color will be the same as the <B>-color</B> option.
- The default is <I>defcolor</I>. </DD>
-
-<DT><B>-outline <I>color</I></B>  </DT>
-<DD>Sets the color or the outline around
-each symbol.  If <I>color</I> is <I>""</I>, then no outline is drawn. If <I>color</I> is <I>defcolor</I>,
-then the color will be the same as the <B>-color</B> option.  The default is <I>defcolor</I>.
-</DD>
-
-<DT><B>-outlinewidth <I>pixels</I></B>  </DT>
-<DD>Sets the width of the outline bordering each symbol.
- If <I>pixels</I> is <I>0</I>, no outline will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-pixels <I>pixels</I></B>
-</DT>
-<DD>Sets the size of symbols.  If <I>pixels</I> is <I>0</I>, no symbols will be drawn.  The
-default is <I>0.125i</I>. </DD>
-
-<DT><B>-symbol <I>symbol</I></B>  </DT>
-<DD>Specifies the symbol for data points.  <I>Symbol</I>
-can be either <I>square</I>, <I>circle</I>, <I>diamond</I>, <I>plus</I>, <I>cross</I>, <I>splus</I>, <I>scross</I>, <I>triangle</I>,
-<I>""</I> (where no symbol is drawn), or a bitmap.  Bitmaps are specified as "<I>source</I>
-?<I>mask</I>?", where <I>source</I> is the name of the bitmap, and <I>mask</I> is the bitmap's
-optional mask.  The default is <I>circle</I>. </DD>
-
-<DT><B>-type <I>elemType</I></B>  </DT>
-<DD>Specifies the type
-of element the pen is to be used with. This option should only be employed
-when creating the pen.  This is for those that wish to mix different types
-of elements (bars and lines) on the same graph.  The default type is "line".
-</DD>
-</DL>
-<P>
-Pen configuration options may be also be set by the <B>option</B> command.  The
-resource class is <I>Pen</I>.  The resource names are the names of the pens. <BR>
-<CODE>option add *Stripchart.Pen.Color  blue<BR>
-option add *Stripchart.activeLine.color  green<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>pen <B>create <I>penName </I></B></B></I>?<I>option value</I>?... </DT>
-<DD>Creates a new pen by the name
-<I>penName</I>.  No pen by the same name can already exist. <I>Option</I> and <I>value</I> are
-described  in above in the pen <B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>pen <B>delete
-</B></B></I>?<I>penName</I>?... </DT>
-<DD>Deletes the named pens. A pen is not really deleted until it is
-not longer in use, so it's safe to delete pens mapped to elements. </DD>
-
-<DT><I>pathName
-<B>pen names </B></I>?<I>pattern</I>?... </DT>
-<DD>Returns a list of pens matching zero or more patterns.
- If no <I>pattern</I> argument is give, the names of all pens are returned. </DD>
-</DL>
-
-<H3><A NAME="sect14" HREF="#toc14">PostScript
-Component</A></H3>
-The strip chart can generate encapsulated PostScript output.  There
-are several configuration options you can specify to control how the plot
-is generated.  You can change the page dimensions and borders.  The plot
-itself can be scaled, centered, or rotated to landscape.  The PostScript
-output can be written directly to a file or returned through the interpreter.
-<P>
-The following postscript operations are available. 
-<DL>
-
-<DT><I>pathName <B>postscript cget
-<I>option</I></B></I>  </DT>
-<DD>Returns the current value of the postscript option given by <I>option</I>.
- <I>Option</I> may be any option described below for the postscript <B>configure</B>
-operation. </DD>
-
-<DT><I>pathName <B>postscript configure </B></I>?<I>option value</I>?... </DT>
-<DD>Queries or modifies
-the configuration options for PostScript generation.  If <I>option</I> isn't specified,
-a list describing  the current postscript options for <I>pathName</I> is returned.
- If <I>option</I> is specified, but not <I>value</I>, then a list describing <I>option</I> is
-returned.  If one or more <I>option</I> and <I>value</I> pairs are specified, then for
-each pair, the postscript option <I>option</I> is set to <I>value</I>.  The following
-postscript options are available. <blockquote></DD>
-
-<DT><B>-center <I>boolean</I></B> </DT>
-<DD>Indicates whether the plot
-should be centered on the PostScript page.  If <I>boolean</I> is false, the plot
-will be placed in the upper left corner of the page.  The default is <I>1</I>. </DD>
-
-<DT><B>-colormap
-<I>varName</I></B> </DT>
-<DD><I>VarName</I> must be the name of a global array variable that specifies
-a color mapping from the X color name to PostScript.  Each element of <I>varName</I>
-must consist of PostScript code to set a particular color value (e.g. ``<I>1.0
-1.0 0.0 setrgbcolor</I>'').  When outputting color information in PostScript, the
-array variable <I>varName</I>  is checked to see if an element of the name of
-the color exists. If so,  it uses the value of the element as the PostScript
-command to set the color.  If this option hasn't been specified, or if there
-isn't an entry in <I>varName</I> for a given color, then it uses the red, green,
-and blue intensities from the X color. </DD>
-
-<DT><B>-colormode <I>mode</I></B> </DT>
-<DD>Specifies how to output
-color information.  <I>Mode</I> must be either <I>color</I> (for full color output), <I>gray</I>
-(convert all colors to their gray-scale equivalents) or <I>mono</I> (convert foreground
-colors to black and background colors to white).  The default mode is <I>color</I>.
- </DD>
-
-<DT><B>-fontmap <I>varName</I></B> </DT>
-<DD><I>VarName</I> must be the name of a global array variable that
-specifies a font mapping from the X font name to PostScript.  Each element
-of <I>varName</I> must consist of a Tcl list with one or two elements, which are
-the name and point size of a PostScript font. When outputting PostScript
-commands for a particular font, the  array variable <I>varName</I> is checked
-to see an element of the specified  font exists.  If there is such an element,
-then the font information contained in that element is used in the PostScript
-output.  (If the point size is omitted from the list, the point size of
-the X font is used).  Otherwise the X font is examined in an attempt to
-guess what PostScript font to use.  This works only for fonts whose foundry
-property is <I>Adobe</I> (such as Times, Helvetica, Courier, etc.).  If all of this
-fails then the font defaults to <I>Helvetica-Bold</I>. </DD>
-
-<DT><B>-decorations <I>boolean</I></B> </DT>
-<DD>Indicates
-if PostScript commands to generate color backgrounds and 3-D borders should
-be output.  If <I>boolean</I> is false, the background will  be white and no 3-D
-borders will be generated. The default is <I>1</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Sets the height
-of the plot.  This lets you plot the stripchart with a height different
-from the one displayed on the screen.  If <I>pixels</I> is 0, the height is the
-same as the displayed height. The default is <I>0</I>. </DD>
-
-<DT><B>-landscape <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I>
-is true, this specifies the printed area is to be rotated 90 degrees.  In
-non-rotated output the X-axis of the printed area runs along the short dimension
-of the page (``portrait'' orientation); in rotated output the X-axis runs along
-the long dimension of the page (``landscape'' orientation).  Defaults to <I>0</I>. </DD>
-
-<DT><B>-maxpect
-<I>boolean</I></B> </DT>
-<DD>Indicates to scale the the plot so that it fills the PostScript
-page. The aspect ratio of the strip chart is still retained.  The default
-is <I>0</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the horizontal padding for the left and right page borders.
- The borders are exterior to the plot.  <I>Pad</I> can be a list of one or two
-screen distances.  If <I>pad</I> has two elements, the left border is padded by
-the first distance and the right border by the second.  If <I>pad</I> has just
-one distance, both the left and right borders are padded evenly.  The default
-is <I>1i</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B>  </DT>
-<DD>Sets the vertical padding for the top and bottom page borders.
-The borders are exterior to the plot.  <I>Pad</I> can be a list of one or two screen
-distances.  If <I>pad</I> has two elements, the top border is padded by the first
-distance and the bottom border by the second.  If <I>pad</I> has just one distance,
-both the top and bottom borders are padded evenly.  The default is <I>1i</I>. </DD>
-
-<DT><B>-paperheight
-<I>pixels</I></B> </DT>
-<DD>Sets the height of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default height is <I>11.0i</I>.
-</DD>
-
-<DT><B>-paperwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the postscript page.  This can be used
-to select between different page sizes (letter, A4, etc).  The default width
-is <I>8.5i</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Sets the width of the plot.  This lets you plot the
-strip chart with a width different from the one drawn on the screen.  If
-<I>pixels</I> is 0, the width is the same as the widget's width.  The default is
-<I>0</I>. </DD>
-</DL>
-<P>
-Postscript configuration options may be also be set by the <B>option</B> command.
- The resource name and class are <I>postscript</I> and <I>Postscript</I> respectively.
-<BR>
-<CODE>option add *Stripchart.postscript.Decorations false<BR>
-option add *Stripchart.Postscript.Landscape   true<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>postscript output </B></I>?<I>fileName</I>? ?<I>option value</I>?... </DT>
-<DD>Outputs a file of
-encapsulated PostScript.  If a <I>fileName</I> argument isn't present, the command
-returns the PostScript. If any <I>option-value</I> pairs are present, they set configuration
-options controlling how the PostScript is generated. <I>Option</I> and <I>value</I> can
-be anything accepted by the postscript <B>configure</B> operation above. </DD>
-</DL>
-
-<H3><A NAME="sect15" HREF="#toc15">Marker
-Components</A></H3>
-Markers are simple drawing procedures used to annotate or highlight
-areas of the strip chart.  Markers have various types: text strings, bitmaps,
-images, connected lines, windows, or polygons.  They can be associated with
-a particular element, so that when the element is hidden or un-hidden, so
-is the marker.  By default, markers are the last items drawn, so that data
-elements will appear in behind them.  You can change this by configuring
-the <B>-under</B> option. <P>
-Markers, in contrast to elements, don't affect the scaling
-of the coordinate axes.  They can also have <I>elastic</I> coordinates (specified
-by <I>-Inf</I> and <I>Inf</I> respectively) that translate into the minimum or maximum
-limit of the axis.  For example, you can place a marker so it always remains
-in the lower left corner of the plotting area, by using the coordinates
-<I>-Inf</I>,<I>-Inf</I>. <P>
-The following operations are available for markers. 
-<DL>
-
-<DT><I>pathName <B>marker
-after <I>markerId</I></B></I> ?<I>afterId</I>? </DT>
-<DD>Changes the order of the markers, drawing the
-first marker after the second.  If no second <I>afterId</I> argument is specified,
-the marker is placed at the end of the display list.  This command can be
-used to control how markers are displayed since markers are drawn in the
-order of this display list. </DD>
-
-<DT><I>pathName <B>marker before <I>markerId</I></B></I> ?<I>beforeId</I>? </DT>
-<DD>Changes
-the order of the markers, drawing the first marker before the second.  If
-no second <I>beforeId</I> argument is specified, the marker is placed at the beginning
-of the display list. This command can be used to control how markers are
-displayed since markers are drawn in the order of this display list. </DD>
-
-<DT><I>pathName
-<B>marker cget <I>option</I></B></I> </DT>
-<DD>Returns the current value of the marker configuration
-option given by <I>option</I>.  <I>Option</I> may be any option described below in the
-<B>configure</B> operation. </DD>
-
-<DT><I>pathName <B>marker configure <I>markerId</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Queries
-or modifies the configuration options for markers.  If <I>option</I> isn't specified,
-a list describing the current options for <I>markerId</I> is returned.  If <I>option</I>
-is specified, but not <I>value</I>, then a list describing <I>option</I> is returned.
-If one or more <I>option</I> and <I>value</I> pairs are specified, then for each pair,
-the marker option <I>option</I> is set to <I>value</I>. <P>
-The following options are valid
-for all markers. Each type of marker also has its own type-specific options.
-  They are described in the sections below. <blockquote></DD>
-
-<DT><B>-coords <I>coordList</I></B> </DT>
-<DD>Specifies the
-coordinates of the marker.  <I>CoordList</I> is  a list of graph coordinates.  The
-number of coordinates required is dependent on the type of marker.  Text,
-image, and window markers need only two coordinates (an X-Y coordinate).
-  Bitmap markers can take either two or four coordinates (if four, they
-represent the corners of the bitmap). Line markers need at least four coordinates,
-polygons at least six. If <I>coordList</I> is <I>""</I>, the marker will not be displayed.
-The default is <I>""</I>. </DD>
-
-<DT><B>-element <I>elemName</I></B> </DT>
-<DD>Links the marker with the element <I>elemName</I>.
- The marker is drawn only if the element is also currently displayed (see
-the element's <B>show</B> operation).  If <I>elemName</I> is <I>""</I>, the marker is always drawn.
- The default is <I>""</I>. </DD>
-
-<DT><B>-hide <I>boolean</I></B>  </DT>
-<DD>Indicates whether the marker is drawn.
-If <I>boolean</I> is true, the marker is not drawn.  The default is <I>no</I>. </DD>
-
-<DT><B>-mapx <I>xAxis</I></B>
- </DT>
-<DD>Specifies the X-axis to map the marker's X-coordinates onto. <I>XAxis</I> must the
-name of an axis.  The default is <I>x</I>. </DD>
-
-<DT><B>-mapy <I>yAxis</I></B> </DT>
-<DD>Specifies the Y-axis to map
-the marker's Y-coordinates onto. <I>YAxis</I> must the name of an axis.  The default
-is <I>y</I>. </DD>
-
-<DT><B>-name <I>markerId</I></B> </DT>
-<DD>Changes the identifier for the marker.  The identifier
-<I>markerId</I>  can not already be used by another marker.  If this option isn't
-specified, the marker's name is uniquely generated. </DD>
-
-<DT><B>-under <I>boolean</I></B> </DT>
-<DD>Indicates
-whether the marker is drawn below/above data elements.  If <I>boolean</I> is true,
-the marker is be drawn underneath the data element symbols and lines.  Otherwise,
-the marker is drawn on top of the element.  The default is <I>0</I>. </DD>
-
-<DT><B>-xoffset <I>pixels</I></B>
-</DT>
-<DD>Specifies a screen distance to offset the marker horizontally.  <I>Pixels</I> is
-a valid screen distance, such as <I>2</I> or <I>1.2i</I>. The default is <I>0</I>. </DD>
-
-<DT><B>-yoffset <I>pixels</I></B>
-</DT>
-<DD>Specifies a screen distance to offset the markers vertically. <I>Pixels</I> is
-a valid screen distance, such as <I>2</I> or <I>1.2i</I>. The default is <I>0</I>. </DD>
-</DL>
-<P>
-Marker configuration
-options may also be set by the <B>option</B> command. The resource class is either
-<I>BitmapMarker</I>,  <I>ImageMarker</I>,  <I>LineMarker</I>, <I>PolygonMarker</I>, <I>TextMarker</I>, or
-<I>WindowMarker</I>, depending on the type of marker.  The resource name is the
-name of the marker. <BR>
-<CODE>option add *Stripchart.TextMarker.Foreground white<BR>
-option add *Stripchart.BitmapMarker.Foreground white<BR>
-option add *Stripchart.m1.Background     blue<BR>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P><I>pathName <B>marker create <I>type</I></B></I> ?<I>option value</I>?... </DT>
-<DD>Creates a marker of the selected
-type. <I>Type</I> may be either <I>text</I>, <I>line</I>, <I>bitmap</I>, <I>image</I>, <I>polygon</I>, or <I>window</I>. 
-This command returns the marker identifier,  used as the <I>markerId</I> argument
-in the other marker-related commands.  If the <B>-name</B> option is used, this overrides
-the normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old. </DD>
-
-<DT><I>pathName <B>marker delete</B></I>
-?<I>name</I>?... </DT>
-<DD>Removes one of more markers.  The graph will automatically be redrawn
-without the marker..   </DD>
-
-<DT><I>pathName <B>marker exists <I>markerId</I></B></I>  </DT>
-<DD>Returns <I>1</I> if the
-marker <I>markerId</I> exists and <I>0</I> otherwise. </DD>
-
-<DT><I>pathName <B>marker names</B></I> ?<I>pattern</I>?
-  </DT>
-<DD>Returns the names of all the markers that currently exist.  If <I>pattern</I>
-is supplied, only those markers whose names match it will be returned. </DD>
-
-<DT><I>pathName
-<B>marker type <I>markerId</I></B></I>  </DT>
-<DD>Returns the type of the marker given by <I>markerId</I>,
-such as <I>line</I> or <I>text</I>.  If <I>markerId</I> is not a valid a marker identifier, <I>""</I>
-is returned. </DD>
-</DL>
-
-<H3><A NAME="sect16" HREF="#toc16">Bitmap Markers</A></H3>
-A bitmap marker displays a bitmap.  The size of
-the bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the bitmap.
- The bitmap retains its normal width and height.  If four coordinates, the
-first and second pairs of coordinates represent the corners of the bitmap.
- The bitmap will be stretched or reduced as necessary to fit into the bounding
-rectangle. <P>
-Bitmap markers are created with the marker's <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create bitmap </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each  sets a configuration options
-for the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's
-<B>configure</B> operation. <P>
-The following options are specific to bitmap markers:
-
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background color of the bitmap.  If <I>color</I> is <I>""</I>,
-the background color will be transparent.  The default background color
-is <I>white</I>. </DD>
-
-<DT><B>-bitmap <I>bitmap</I></B> </DT>
-<DD>Specifies the bitmap to be displayed.  If <I>bitmap</I>
-is <I>""</I>, the marker will not be displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>
- </DT>
-<DD>Sets the foreground color of the bitmap.  The default foreground color
-is <I>black</I>. </DD>
-
-<DT><B>-mask <I>mask</I></B> </DT>
-<DD>Specifies a mask for the bitmap to be displayed. This
-mask is a bitmap itself, denoting the pixels that are transparent.  If <I>mask</I>
-is <I>""</I>, all pixels of the bitmap will be drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-rotate
-<I>theta</I></B> </DT>
-<DD>Sets the rotation of the bitmap.  <I>Theta</I> is a real number representing
-the angle of rotation in degrees.  The marker is first rotated and then
-placed according to its anchor position.  The default rotation is <I>0.0</I>. </DD>
-</DL>
-
-<H3><A NAME="sect17" HREF="#toc17">Image
-Markers</A></H3>
-A image marker displays an image.  Image markers are created with
-the marker's <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create image </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to image markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the image relative to the positioning point
-for the image. For example, if <I>anchor</I> is <I>center</I> then the image is centered
-on the point;  if <I>anchor</I> is <I>n</I> then the image will be drawn such that the
-top center point of the rectangular region occupied by the image will be
-at the positioning point. This option defaults to <I>center</I>. </DD>
-
-<DT><B>-image <I>image</I></B> </DT>
-<DD>Specifies
-the image to be drawn. If <I>image</I> is <I>""</I>, the marker will not be drawn.  The
-default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Line Markers</A></H3>
-A line marker displays one or more connected
-line segments. Line markers are created with marker's <B>create</B> operation in
-the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create line </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-operation. <P>
-The following options are specific to line markers: 
-<DL>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color of the line. The option is affects the line
-color only when the <B>-stipple</B> option  is set.   If this option isn't specified
-then it defaults to <I>white</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of the line.
-<I>DashList</I> is a list of up to 11 numbers that alternately represent the lengths
-of the dashes and gaps on the line.  Each number must be between 1 and 255.
- If <I>dashList</I> is <I>""</I>, the marker line will be solid. </DD>
-
-<DT><B>-foreground <I>color</I></B> </DT>
-<DD>Sets
-the foreground color.  The default foreground color is <I>black</I>. </DD>
-
-<DT><B>-linewidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the lines. The default width is <I>0</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies
-a stipple pattern used to draw the line, rather than a solid line. <I>Bitmap</I>
-specifies a bitmap to use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then
-the line is drawn in a solid fashion. The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Polygon Markers</A></H3>
-A
-polygon marker displays a closed region described as two or more connected
-line segments.  It is assumed the first and last points are connected.  Polygon
-markers are created using the marker <B>create</B> operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create polygon </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the <B>marker configure</B>
-command to change the marker's configuration. The following options are supported
-for polygon markers: 
-<DL>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of the outline
-of the polygon. <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the outline.  Each number
-must be between 1 and 255. If <I>dashList</I> is <I>""</I>, the outline will be a solid
-line. </DD>
-
-<DT><B>-fill <I>color</I></B> </DT>
-<DD>Sets the fill color of the polygon.  If <I>color</I> is <I>""</I>, then
-the interior of the polygon is transparent. The default is <I>white</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the outline of the polygon. If <I>pixels</I> is zero,
- no outline is drawn. The default is <I>0</I>. </DD>
-
-<DT><B>-outline <I>color</I></B> </DT>
-<DD>Sets the color of the
-outline of the polygon.  If the polygon is stippled (see the <B>-stipple</B> option),
-then this represents the foreground color of the stipple.  The default is
-<I>black</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies that the polygon should be drawn with a
-stippled pattern rather than a solid color. <I>Bitmap</I> specifies a bitmap to
-use as the stipple pattern.  If <I>bitmap</I> is <I>""</I>, then the polygon is filled
-with a solid color (if the <B>-fill</B> option is set).  The default is <I>""</I>. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Text
-Markers</A></H3>
-A text marker displays a string of characters on one or more lines
-of text.  Embedded newlines cause line breaks.  They may be used to annotate
-regions of the strip chart.  Text markers are created with the <B>create</B> operation
-in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create text </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs,  each sets a configuration option
-for the text marker.   These same <I>option</I>-<I>value</I> pairs may be used with the
- marker's <B>configure</B> operation.   <P>
-The following options are specific to text
-markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B> </DT>
-<DD><I>Anchor</I> tells how to position the text relative to
-the positioning point for the text. For example, if <I>anchor</I> is <I>center</I> then
-the text is centered on the point; if <I>anchor</I> is <I>n</I> then the text will be
-drawn such that the top center point of the rectangular region occupied
-by the text will be at the positioning point.  This default is <I>center</I>. </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color of the text string.  If <I>color</I> is <I>""</I>, the
-background will be transparent.  The default is <I>white</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B> </DT>
-<DD>Specifies
-the font of the text.  The default is <I>*-Helvetica-Bold-R-Normal-*-120-*</I>. </DD>
-
-<DT><B>-foreground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of the text.  The default is <I>black</I>. </DD>
-
-<DT><B>-justify
-<I>justify</I></B> </DT>
-<DD>Specifies how the text should be justified.  This matters only when
-the marker contains more than one line of text. <I>Justify</I> must be <I>left</I>, <I>right</I>,
-or <I>center</I>.  The default is <I>center</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the padding to the left
-and right exteriors of the text. <I>Pad</I> can be a list of one or two screen
-distances.  If <I>pad</I> has two elements, the left side of the text is padded
-by the first distance and the right side by the second.  If <I>pad</I> has just
-one distance, both the left and right sides are padded evenly.  The default
-is <I>4</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding above and below the text.  <I>Pad</I> can be a list
-of one or two screen distances.  If <I>pad</I> has two elements, the area above
-the text is padded by the first distance and the area below by the second.
-If <I>pad</I> is just one distance, both the top and bottom areas are padded evenly.
- The default is <I>4</I>. </DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the number of degrees to rotate
-the text.  <I>Theta</I> is a real number representing the angle of rotation.  The
-marker is first rotated along its center and is then drawn according to
-its anchor position. The default is <I>0.0</I>. </DD>
-
-<DT><B>-text <I>text</I></B> </DT>
-<DD>Specifies the text of the
-marker.  The exact way the text is displayed may be affected by other options
-such as <B>-anchor</B> or <B>-rotate</B>. </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Window Markers</A></H3>
-A window marker displays a widget
-at a given position. Window markers are created with the marker's <B>create</B>
-operation in the form: <BR>
-<P>
-<CODE><I>pathName <B>marker create window </B></I>?<I>option value</I>?...<BR>
-</CODE><P>There may be many <I>option</I>-<I>value</I> pairs, each sets a configuration option for
-the marker.  These same <I>option</I>-<I>value</I> pairs may be used with the marker's <B>configure</B>
-command. <P>
-The following options are specific to window markers: 
-<DL>
-
-<DT><B>-anchor <I>anchor</I></B>
-</DT>
-<DD><I>Anchor</I> tells how to position the widget relative to the positioning point
-for the widget. For example, if <I>anchor</I> is <I>center</I> then the widget is centered
-on the point; if <I>anchor</I> is <I>n</I> then the widget will be displayed such that
-the top center point of the rectangular region occupied by the widget will
-be at the positioning point.  This option defaults to <I>center</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B>
-</DT>
-<DD>Specifies the height to assign to the marker's window.  If this option isn't
-specified, or if it is specified as <I>""</I>, then the window is given whatever
-height the widget requests internally. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the width
-to assign to the marker's window.  If this option isn't specified, or if it
-is specified as <I>""</I>, then the window is given whatever width the widget
-requests internally. </DD>
-
-<DT><B>-window <I>pathName</I></B> </DT>
-<DD>Specifies the widget to be managed.
- <I>PathName</I> must be a child of the <B>stripchart</B> widget. </DD>
-</DL>
-
-<H2><A NAME="sect22" HREF="#toc22">Graph Component Bindings</A></H2>
-Specific
-stripchart components, such as elements, markers and legend entries, can
-have a command trigger when event occurs in them, much like canvas items
-in Tk's canvas widget.  Not all event sequences are valid.  The only binding
-events that may be specified are those related to the mouse and keyboard
-(such as <B>Enter</B>, <B>Leave</B>, <B>ButtonPress</B>, <B>Motion</B>, and <B>KeyPress</B>). <P>
-Only one element
-or marker can be picked during an event.  This means, that if the mouse
-is directly over both an element and a marker, only the uppermost component
-is selected.  This isn't true for legend entries.   Both a legend entry and
-an element (or marker) binding commands  will be invoked if both items
-are picked. <P>
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the element
-name and another is associated with one of the element's tags (see the <B>-bindtags</B>
-option).  When this occurs, all of the  matching bindings are invoked.  A
-binding associated with the element name is invoked first, followed by
-one binding for each of the element's  bindtags.  If there are multiple matching
-bindings for a single tag,  then only the most specific binding is invoked.
- A continue command  in a binding script terminates that script, and a
-break command  terminates that script and skips any remaining scripts for
-the event,  just as for the bind command. <P>
-The <B>-bindtagsR option for these
-components controls addition tag names which can be matched.  Implicitly
-elements and markers always have tags matching their names.  Setting the
-value of the <B>-bindtags</B></B> option doesn't change this. 
-<H2><A NAME="sect23" HREF="#toc23">C Language API</A></H2>
-You can manipulate
-data elements from the C language.  There may be situations where it is
-too expensive to translate the data values from ASCII strings.  Or you might
-want to read data in a special file format. <P>
-Data can manipulated from the
-C language using BLT vectors. You specify the x and y data coordinates of
-an element as vectors and manipulate the vector from C.  The strip chart
-will be redrawn automatically after the vectors are updated. <P>
-From Tcl, create
-the vectors and configure the element to use them. <BR>
-<CODE>vector X Y<BR>
-.s element configure line1 -xdata X -ydata Y<BR>
-</CODE><P>To set data points from C, you pass the values as arrays of doubles using
-the <B>Blt_ResetVector</B> call.  The vector is reset with the new data and at
-the next idle point (when Tk re-enters its event loop), the strip chart
-will be redrawn automatically. <BR>
-<CODE>#include <tcl.h><BR>
-#include <blt.h><BR>
-<P>
-register int i;<BR>
-Blt_Vector *xVec, *yVec;<BR>
-double x[50], y[50];<BR>
-<P>
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */<BR>
-if ((Blt_GetVector(interp, "X", 50, &xVec) != TCL_OK) ||<BR>
-    (Blt_GetVector(interp, "Y", 50, &yVec) != TCL_OK)) {<BR>
-    return TCL_ERROR;<BR>
-}<BR>
-<P>
-for (i = 0; i < 50; i++) {<BR>
-    x[i] = i * 0.02;<BR>
-    y[i] = sin(x[i]);<BR>
-}<tt> </tt> <tt> </tt> <BR>
-<P>
-/* Put the data into BLT vectors */<BR>
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||<BR>
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {<BR>
-   return TCL_ERROR;<BR>
-}<BR>
-</CODE><P>See the <B>vector</B> manual page for more details. 
-<H2><A NAME="sect24" HREF="#toc24">Speed Tips</A></H2>
-There may be cases
-where the strip chart needs to be drawn and updated as quickly as possible.
- If drawing speed becomes a big problem, here are a few tips to speed up
-displays. 
-<UL>
-·<LI>Try to minimize the number of data points.  The more data points
-the looked at, the more work the strip chart must do. </LI>·<LI>If your data is generated
-as floating point values, the time required to convert the data values
-to and from ASCII strings can be significant, especially when there any
-many data points.  You can avoid the redundant string-to-decimal conversions
-using the C API to BLT vectors. </LI>·<LI>Data elements without symbols are drawn
-faster than with symbols. Set the data element's <B>-symbol</B> option to <I>none</I>.  If
-you need to draw symbols, try using the simple symbols such as <I>splus</I> and
-<I>scross</I>. </LI>·<LI>Don't stipple or dash the element.  Solid lines are much faster. </LI>·<LI>If
-you update data elements frequently, try turning off the widget's <B>-bufferelements</B>
-option.  When the strip chart is first displayed, it draws data elements
-into an internal pixmap.  The pixmap acts as a cache, so that when the strip
-chart needs to be redrawn again, and the data elements or coordinate axes
-haven't changed, the pixmap is simply copied to the screen.  This is especially
-useful when you are using markers to highlight points and regions on the
-strip chart.  But if the strip chart is updated frequently, changing either
-the element data or coordinate axes, the buffering becomes redundant. </LI>
-</UL>
-
-<H2><A NAME="sect25" HREF="#toc25">Limitations</A></H2>
-Auto-scale
-routines do not use requested min/max limits as boundaries when the axis
-is logarithmically scaled. <P>
-The PostScript output generated for polygons
-with more than 1500 points may exceed the limits of some printers (See
-PostScript Language Reference Manual, page 568).  The work-around is to break
-the polygon into separate pieces. 
-<H2><A NAME="sect26" HREF="#toc26">Future Incompatibility</A></H2>
-The <B>-mapped</B> options
-are obsoleted and will be removed.  You can achieve the same results using
-the <B>-hide</B> option instead. <BR>
-<CODE># Works for now.<BR>
-.s legend configure -mapped no<BR>
-<P>
-# Instead use this.<BR>
-.s legend configure -hide yes    <BR>
-
-<H2><A NAME="sect27" HREF="#toc27"></CODE><P>Keywords</A></H2>
-stripchart, graph, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Syntax</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Example</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Stripchart Operations</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Stripchart Components</A></LI>
-<UL>
-<LI><A NAME="toc8" HREF="#sect8">Axis Components</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Crosshairs Component</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Element Components</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Grid Component</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Legend Component</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Pen Components</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">PostScript Component</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Marker Components</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Bitmap Markers</A></LI>
-<LI><A NAME="toc17" HREF="#sect17">Image Markers</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Line Markers</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Polygon Markers</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Text Markers</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Window Markers</A></LI>
-</UL>
-<LI><A NAME="toc22" HREF="#sect22">Graph Component Bindings</A></LI>
-<LI><A NAME="toc23" HREF="#sect23">C Language API</A></LI>
-<LI><A NAME="toc24" HREF="#sect24">Speed Tips</A></LI>
-<LI><A NAME="toc25" HREF="#sect25">Limitations</A></LI>
-<LI><A NAME="toc26" HREF="#sect26">Future Incompatibility</A></LI>
-<LI><A NAME="toc27" HREF="#sect27">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/table.html b/blt3.0/html/table.html
deleted file mode 100644
index 178075b..0000000
--- a/blt3.0/html/table.html
+++ /dev/null
@@ -1,721 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>table(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-table - Arranges widgets in a table 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>table
-<I>container</I></B> ?<I>widget index option value</I>?... <P>
-<B>table arrange</B> <I>container</I> <P>
-<B>table cget
-<I>container</I></B> ?<I>item</I>? <I>option</I> <P>
-<B>table configure <I>container</I></B> ?<I>item</I>?... ?<I>option value</I>?...
-<P>
-<B>table extents <I>container</I></B> <I>item</I> <P>
-<B>table forget <I>widget</I></B> ?<I>widget</I>?... <P>
-<B>table info <I>container</I></B>
-<I>item</I> <P>
-<B>table locate <I>container</I></B> <I>x y</I> <P>
-<B>table containers </B>?<I>switch</I>? ?<I>arg</I>? <P>
-<B>table save
-<I>container</I></B>  <P>
-<B>table search <I>container</I></B> ?<I>switch arg</I>?... 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>table</B> command
-arranges widgets in a table.  The alignment of widgets is detemined by their
-row and column positions and the number of rows or columns that they span.
-
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Probably the most painstaking aspect of building a graphical
-application is getting the placement and size of the widgets just right.
-It usually takes many iterations to align widgets and adjust their spacing.
-That's because managing the geometry of widgets is simply not a packing
-problem, but also graphical design problem.  Attributes such as alignment,
-symmetry, and balance are more important than minimizing the amount of
-space used for packing. <P>
-The <B>table</B> geometry manager arranges widgets in a
-table.  It's easy to align widgets (horizontally and vertically) or to create
-empty space to balance the arrangement of the widgets.  Widgets (called
-<I>slaves</I> in the Tk parlance) are arranged inside a containing widget (called
-the <I>master</I>).  Widgets are positioned at row,column locations and may span
-any number of rows or columns.  More than one widget can occupy a single
-location. <P>
-The placement of widget windows determines both the size and arrangement
-of the table.  The table queries the requested size of each widget.  The
-<I>requested size</I> of a widget is the natural size of the widget (before the
-widget is shrunk or expanded).  The height of each row and the width of
-each column is the largest widget spanning that row or column.  The size
-of the table is in turn the sum of the row and column sizes.  This is the
-table's <I>normal size</I>. <P>
-The total number of rows and columns in a table is determined
-from the indices specified.  The table grows dynamically as windows are
-added at larger indices. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-The table geometry manager is created by
-invoking the <B>table</B> command. <BR>
-<CODE># Create a table in the root window<BR>
-table .<BR>
-</CODE><P>The window <I>.</I> is now the <I>container</I> of the table.  Widgets are packed into
-the table and displayed within the confines of the container. <P>
-You add widgets
-to the table by row and column location.  Row and column indices start from
-zero. <BR>
-<CODE>label .title -text "This is a title"<BR>
-<P>
-# Add a label to the table<BR>
-table . .title 0,0 <BR>
-</CODE><P>The label <I>.title</I> is added to the table.  We can add more widgets in the same
-way. <BR>
-<CODE>button .ok -text "Ok"<BR>
-button .cancel -text "Cancel"<BR>
-<P>
-# Add two buttons<BR>
-table . .ok 1,0<BR>
-table . .cancel 1,1<BR>
-</CODE><P>Two buttons <I>.ok</I> and <I>.cancel</I> are now packed into the second row of the table.
- They each occupy one cell of the table.  By default, widgets span only
-a single row and column. <P>
-The first column contains two widgets, <I>.title</I> and
-<I>.ok</I>.  By default, the widest of the two widgets will define the width of
-the column.  However, we want <I>.title</I> to be centered horizontally along the
-top of the table.  We can make <I>.title</I> span two columns using the <B>configure</B>
-operation. <BR>
-<CODE># Make the label span both columns<BR>
-table configure . .title -cspan 2<BR>
-</CODE><P>The label <I>.title</I> will now be centered along the top row of the table.   <P>
-In
-the above example, we've create and arranged the layout for the table invoking
-the <B>table</B> command several times.  Alternately, we could have used a single
-<B>table</B> command. <BR>
-<CODE>label .title -text "This is a title"<BR>
-button .ok -text "Ok"<BR>
-button .cancel -text "Cancel"<BR>
-<P>
-# Create and pack the table<BR>
-table . \<BR>
-    .title  0,0 -cspan 2 \<BR>
-    .ok     1,0 \<BR>
-    .cancel 1,1<BR>
-</CODE><P>The table will override the requested width and height of the container
-so that the window fits the table exactly.  This also means that any change
-to the size of table will be propagated up through the Tk window hierarchy.
- This feature can be turned off using the <B>configure</B> operation again. <BR>
-<CODE>table configure . -propagate no<BR>
-</CODE><P>You can also set the width of height of the table to a specific value. This
-supersedes the calculated table size. <BR>
-<CODE># Make the container 4 inches wide, 3 inches high<BR>
-table configure . -reqwidth 4i -reqheight 3i<BR>
-</CODE><P>If a widget is smaller than the cell(s) it occupies, the widget will float
-within the extra space.  By default, the widget will be centered within
-the space, but you can anchor the widget to any side of cell using the
-<B>-anchor</B> configuration option. <BR>
-<CODE>table configure . .ok -anchor w<BR>
-</CODE><P>The <B>-fill</B> option expands the widget to fill the  extra space either vertically
-or horizontally (or both). <BR>
-<CODE># Make the title label fill the entire top row<BR>
-table configure . .title -cspan 2 -fill x <BR>
-<P>
-# Each button will be as height of the 2nd row.<BR>
-table configure . .ok .cancel -fill y<BR>
-</CODE><P>The width of <I>.title</I> will be the combined widths of both columns. Both <I>.ok</I>
-and <I>.cancel</I> will become as tall as the second row.   <P>
-The <B>-padx</B> and <B>-pady</B> options
-control the amount of padding  around the widget.  Both options take a list
-of one or two values. <BR>
-<CODE># Pad the title by two pixels above and below.<BR>
-table configure . .title -pady 2<BR>
-<P>
-# Pad each button 2 pixels on the left, and 4 on the right.<BR>
-table configure . .ok .cancel -padx { 2 4 }<BR>
-</CODE><P>If the list has only one value, then both exterior sides (top and bottom
-or left and right) of the widget are padded by that amount.  If the list
-has two elements, the first specifies padding for the top or left side
-and the second for the bottom or right side. <P>
-Like the container, you can
-also override the requested widths and heights of widgets using the <B>-reqwidth</B>
-and <B>-reqheight</B> options.  This is especially useful with character-based widgets
-(such as buttons, labels, text, listbox, etc) that let you specify their
-size only in units of characters and lines, instead of pixels. <BR>
-<CODE># Make all buttons one inch wide<BR>
-table configure . .ok .cancel -reqwidth 1i<BR>
-<P>
-</CODE><P>Each row and column of the table can be configured, again using the <B>configure</B>
-operation.  Rows are and columns are designated by <I>R<I>i</I></I> and <I>C<I>i</I></I> respectively,
-where <I>i</I> is the index of the row or column. <P>
-For example, you can set the
-size of a row or column. <BR>
-<CODE># Make the 1st column 2 inches wide<BR>
-table configure . c0 -width 2.0i<BR>
-<P>
-# Make the 2nd row 1/2 inch high.<BR>
-table configure . r1 -height 0.5i<BR>
-</CODE><P>The new size for the row or column overrides its calculated size.  If no
-widgets span the row or column, its height or width is zero. So you can
-use the <B>-width</B> and <B>-height</B> options to create empty spaces in the table. <BR>
-<CODE># Create an empty row and column<BR>
-table configure . r2 c2 -width 1i<BR>
-</CODE><P>The <B>-pady</B> option lets you add padding to the top and bottom sides of rows.
- The <B>-padx</B> option adds padding to the left and right sides of columns.  Both
-options take a list of one or two values. <BR>
-<CODE># Pad above the title by two pixels <BR>
-table configure . r0 -pady { 2 0 }<BR>
-<P>
-# Pad each column 4 pixels on the left, and 2 on the right.<BR>
-table configure . c* -padx { 2 4 }<BR>
-<P>
-</CODE><P>Notice that you can configure all the rows and columns using either <I>R*</I>
-or <I>C*</I>. <P>
-When the container is resized, the rows and columns of the table
-are also resized.  Only the rows or columns that contain widgets (a widget
-spans the row or column) grow or shrink.  The <B>-resize</B> option indicates whether
-the row or column can be shrunk or stretched.  If the value is <I>shrink</I>, the
-row or column can only be resized smaller.  If <I>expand</I>, it can only be resized
-larger.  If <I>none</I>, the row or column is frozen at its requested size. <BR>
-<CODE># Let the 1st column get smaller, but not bigger<BR>
-table configure . c0 -resize shrink<BR>
-<P>
-# Let the 2nd column get bigger, not smaller<BR>
-table configure . c1 -resize expand<BR>
-<P>
-# Don't resize the first row <BR>
-table configure . r0 -resize none<BR>
-</CODE><P>The following example packs a canvas, two scrollbars, and a title. The rows
-and columns containing the scrollbars are frozen at their requested size,
-so that even if the frame is resized, the scrollbars will remain the same
-width. <BR>
-<CODE>table . \<BR>
-    .title   0,0 -cspan 3 \<BR>
-    .canvas  1,1 -fill both \<BR>
-    .vscroll 1,2 -fill y \<BR>
-    .hscroll 2,1 -fill x<BR>
-<P>
-# Don't let the scrollbars resize<BR>
-table configure . c2 r2 -resize none<BR>
-<P>
-# Create an empty space to balance the scrollbar<BR>
-table configure . c0 -width .vscroll<BR>
-</CODE><P>Note that the value of the <B>-width</B> option is the name of a widget window.
- This indicates that the width of the column should be the same as the
-requested width of <I>.vscroll</I>. <P>
-Finally, the <B>forget</B> operation removes widgets
-from the table. <BR>
-<CODE># Remove the windows from the table<BR>
-table forget .quit .frame<BR>
-</CODE><P>It's not necessary to specify the container.  The <B>table</B> command determines
-the container from the widget name. 
-<H2><A NAME="sect5" HREF="#toc5">Operations</A></H2>
-The following operations are
-available for the <B>table</B>: 
-<DL>
-
-<DT><B>table <I>container</I></B> ?<I>widget index option value</I>?...  
-</DT>
-<DD>Adds the widget <I>widget</I> to the table at <I>index</I>.  <I>Index</I> is a row,column position
-in the table.  It must be in the form <I>row</I>,<I>column</I> where <I>row</I> and <I>column</I> are
-the respective row and column numbers, starting from zero (0,0 is the upper
-leftmost position).  <I>Row</I> and <I>column</I> may also be numeric expressions that
-are recursively evaluated.  If a table doesn't exist for <I>container</I>, one is
-created.  <I>Widget</I> is the path name of the window, that must already exist,
-to be arranged inside of <I>container</I>. <I>Option</I> and <I>value</I> are described in the
- <FONT SIZE=-1><B>WIDGET</B></FONT>
-  section. </DD>
-
-<DT><B>table arrange</B> <I>container</I> </DT>
-<DD>Forces the table to compute its
-layout immediately.  Normally, the table geometry manager will wait until
-the next idle point, before calculating the size of its rows and columns.
- This is useful for collecting the <I>normal</I> sizes of rows and columns, that
-are based upon the requested widget sizes. </DD>
-
-<DT><B>table cget</B> <I>container </I>?<I>item</I>?<I> option</I>
-</DT>
-<DD>Returns the current value of the configuration option specific to <I>item</I>
-given by <I>option</I>.  <I>Item</I> is either a row or column index, or the path name
-of a widget.  <I>Item</I> can be in any form describe in the <B>configure</B> operation
-below. If no <I>item</I> argument is provided, then the configuration option is
-for the table itself.  <I>Option</I> may be any one of the options described in
-the appropiate section for <I>item</I>. </DD>
-
-<DT><B>table configure</B> <I>container item</I>... ?<I>option
-value</I>?...  </DT>
-<DD>Queries or modifies the configuration options specific to <I>item</I>.
-If no <I>option</I> is specified, this command returns a list describing all of
-the available options for <I>item</I>  If the argument <I>item</I> is omitted, then the
-specified  configuration options are for the table itself.  Otherwise <I>item</I>
-must be either a row or column specification, or the path name of a widget.
-  The following <I>item</I> types are available. <blockquote></DD>
-
-<DT><I>C<I>i</I></I> </DT>
-<DD>Specifies the column of <I>container</I>
-to be configured.  <I>Item</I> must be in the form <I>C<I>n</I></I>, where <I>i</I> is the index of
- the column.  See the  <FONT SIZE=-1><B>COLUMN</B></FONT>
-  section. </DD>
-
-<DT><I>R<I>i</I></I> </DT>
-<DD>Specifies the row of <I>container</I>
-to be configured. <I>Item</I> must be in the form <I>R<I>i</I></I>, where <I>i</I> is the index of the
-row.  See the <FONT SIZE=-1><B>ROW</B></FONT>
-  section. </DD>
-
-<DT><I>widget</I>  </DT>
-<DD>Specifies a widget of <I>container</I> to be
-queried.  <I>Widget</I> is the path name of a widget packed in <I>container</I>.  See the
-<FONT SIZE=-1><B>WIDGET</B></FONT>
-  section. </DD>
-
-<DT>No argument </DT>
-<DD>Specifies that the table itself is to be queried.
-  See the <FONT SIZE=-1><B>TABLE</B></FONT>
-  section for a description of the option-value pairs for
-the table. </DD>
-</DL>
-</blockquote>
-<blockquote><P>
-The <I>option<I> and <I>value</I></I></I> pairs are specific to <I>item</I>.  If <I>option</I> is
-specified with no <I>value</I>, then the command returns a list describing the
-one named option (this list will be identical to the corresponding sublist
-of the value returned if no <I>option</I> is specified).  If one or more <I>option-value</I>
-pairs are specified, then the command modifies the given option(s) to have
-the given value(s); in this case the command returns the empty string. </blockquote>
-
-<DL>
-
-<DT><B>table
-extents <I>container</I></B> <I>index</I>  </DT>
-<DD>Queries the location and dimensions of row and
-columns in the table. <I>Index</I> can be either a row or column index or a table
-index. Returns a list of the x,y coordinates (upperleft corner) and dimensions
-(width and height) of the cell, row, or column. </DD>
-
-<DT><B>table forget <I>widget</I></B> ?<I>widget</I>?...
-</DT>
-<DD>Requests that <I>widget</I> no longer have its geometry managed. <I>Widget</I> is the
-pathname of the window currently  managed by some table. The window will
-be unmapped so that it no longer  appears on the screen.  If <I>widget</I> is not
-currently managed by any table,  an error message is returned, otherwise
-the empty string. </DD>
-
-<DT><B>table info <I>container</I></B> <I>item</I>  </DT>
-<DD>Returns a list of the current
-configuration options for <I>item</I>.   The list returned is exactly in the form
-that might be specified to the <B>table</B> command.  It can be used to save and
-reset table  configurations. <I>Item</I> must be one of the following. <blockquote></DD>
-
-<DT><I>C<I>i</I></I> </DT>
-<DD>Specifies
-the column of <I>container</I> to be queried.  <I>Item</I> must be in the form <I>C<I>n</I></I>, where
-<I>n</I> is the index of  the column.   </DD>
-
-<DT><I>R<I>i</I></I>  </DT>
-<DD>Specifies the row of <I>container</I> to be
-queried. <I>Item</I> must be in the form <I>R<I>i</I></I>, where <I>i</I> is the index of the row.  
-</DD>
-
-<DT><I>widget</I>  </DT>
-<DD>Specifies a widget of <I>container</I> to be queried. <I>Widget</I> is the path
-name of a widget packed in <I>container</I>. </DD>
-
-<DT>No argument </DT>
-<DD>Specifies that the table
-itself is to be queried.  </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>table locate <I>container</I></B> <I>x y</I> </DT>
-<DD>Returns the table index
-(row,column) of the cell containing the given screen coordinates.  The <I>x</I>
-and <I>y</I> arguments represent the x and y coordinates of the sample point to
-be tested. </DD>
-
-<DT><B>table containers </B>?<I>switch arg</I>? </DT>
-<DD>Returns a list of all container
-windows matching a given criteria (using <I>switch</I> and <I>arg</I>).  If no <I>switch</I>
-and <I>arg</I> arguments are given, the names of all container windows (only those
-using the <B>table</B> command) are returned.  The following are valid switches:
-<blockquote></DD>
-
-<DT><B>-pattern</B> <I>pattern</I> </DT>
-<DD>Returns a list of pathnames of all container windows matching
-<I>pattern</I>. </DD>
-
-<DT><B>-slave</B> <I>window</I> </DT>
-<DD>Returns the name of the container window of table
-managing <I>window</I>. <I>Window</I> must be the path name of widget.  If <I>window</I> is not
-managed by any table, the empty string is returned. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>table search <I>container</I></B>
-?<I>switch arg</I>?... </DT>
-<DD>Returns the names of all the widgets in <I>container</I> matching
-the criteria given by <I>switch</I> and <I>arg</I>.  <I>Container</I> is name of the container
-window associated with the table to be searched. The name of the widget
-is returned if any one <I>switch</I>-<I>arg</I> criteria matches. If no <I>switch</I>-<I>arg</I> arguments
-are given, the names of all widgets managed by <I>container</I> are returned. 
-The following are switches are available: <blockquote></DD>
-
-<DT><B>-pattern</B> <I>pattern</I> </DT>
-<DD>Returns the names
-of any names of the widgets matching <I>pattern</I>.   </DD>
-
-<DT><B>-span</B> <I>index</I>  </DT>
-<DD>Returns the
-names of widgets that span <I>index</I>. A widget does not need to start at <I>index</I>
-to be included. <I>Index</I> must be in the form <I>row</I>,<I>column</I>, where <I>row</I> and <I>column</I>
-are valid row and column numbers. </DD>
-
-<DT><B>-start</B> <I>index</I> </DT>
-<DD>Returns the names of widgets
-that start at <I>index</I>. <I>Index</I> must be in the form <I>row</I>,<I>column</I>, where <I>row</I> and
-<I>column</I> are valid row and column numbers. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect6" HREF="#toc6">Table Options</A></H2>
-To configure the table
-itself, you omit the <I>item</I> argument  when invoking the <B>configure</B> operation.
-<BR>
-<CODE><B>table configure</B> <I>container</I> ?<I>option value</I>?...<BR>
-</CODE><P>The following options are available for the table: <blockquote>
-<DL>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets how much
-padding to add to the left and right exteriors of the table. <I>Pad</I> can be
-a list of one or two numbers.  If <I>pad</I> has two elements, the left side of
-the table is padded by the first value and the right side by the second
-value.  If <I>pad</I> has just one value, both the left and right sides are padded
-evenly by the value.  The default is <I>0</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets how much padding to
-add to the top and bottom exteriors of the table. <I>Pad</I> can be a list of one
-or two numbers.  If <I>pad</I> has two elements, the area above the table is padded
-by the first value and the area below by the second value.  If <I>pad</I> is just
-one number, both the top and bottom areas are padded by the value.  The
-default is <I>0</I>. </DD>
-
-<DT><B>-propagate <I>boolean</I></B>  </DT>
-<DD>Indicates if the table should override
-the requested width and height of the <I>container</I> window.  If <I>boolean</I> is false,
-<I>container</I> will not be resized.  <I>Container</I> will be its requested size.  The
-default is <I>1</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect7" HREF="#toc7">Widget Options</A></H2>
-widgets are configured by specifying the name
-of the widget when invoking the <B>configure</B> operation.   <BR>
-<P>
-<CODE><B>table configure</B> <I>container <I>widget</I></I> ?<I>option value</I>?...<BR>
-</CODE><P><I>Widget</I> must be the path name of a window already packed in the table associated
-with <I>container</I>.  The following options are available for widgets: <blockquote>
-<DL>
-
-<DT><B>-anchor
-<I>anchor</I></B>  </DT>
-<DD>Anchors <I>widget</I> to a particular edge of the cell(s) it resides. This
-option has effect only if the space of the spans surrounding <I>widget</I> is
-larger than <I>widget</I>. <I>Anchor</I> specifies how <I>widget</I> will be positioned in the
-space.  For example, if <I>anchor</I> is <I>center</I> then the window is centered in
-the rows and columns it spans; if <I>anchor</I> is <I>w</I> then the window will be aligned
-with the leftmost edge of the span. The default is <I>center</I>. </DD>
-
-<DT><B>-columnspan <I>number</I></B>
-</DT>
-<DD>Sets the number of columns <I>widget</I> will span. The default is <I>1</I>. </DD>
-
-<DT><B>-columncontrol
-<I>control</I></B> </DT>
-<DD>Specifies how the width of <I>widget</I> should control the width of the
-columns it spans. <I>Control</I> is  either <I>normal</I>, <I>none</I>, or <I>full</I>.   The default
-is <I>normal</I>. <blockquote></DD>
-
-<DT><I>none</I> </DT>
-<DD>The width of <I>widget</I> is not considered.    </DD>
-
-<DT><I>full</I> </DT>
-<DD>Only the width
-of <I>widget</I> will be considered when computing the widths of the columns. 
-</DD>
-
-<DT><I>normal</I> </DT>
-<DD>Indicates that the widest widget spanning the column will determine
- the width of the span. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-fill <I>fill</I></B> </DT>
-<DD>Specifies if <I>widget</I> should be stretched
-to fill any free space in the span surrounding <I>widget</I>. <I>Fill</I> is either <I>none</I>,
-<I>x</I>, <I>y</I>, <I>both</I>.  The default is <I>none</I>. <blockquote></DD>
-
-<DT><I>x</I> </DT>
-<DD>The widget can grow horizontally.   </DD>
-
-<DT><I>y</I>
-</DT>
-<DD>The widget can grow vertically.   </DD>
-
-<DT><I>both</I> </DT>
-<DD>The widget can grow both vertically
-and horizontally.   </DD>
-
-<DT><I>none</I> </DT>
-<DD>The widget does not grow along with the span.  
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-ipadx <I>pixels</I></B>  </DT>
-<DD>Sets how much horizontal padding to add internally on the
-left and right sides of <I>widget</I>.  <I>Pixels</I> must be a valid screen distance
-like <I>2</I> or <I>0.3i</I>.  The default is <I>0</I>. </DD>
-
-<DT><B>-ipady <I>pixels</I></B> </DT>
-<DD>Sets how much vertical padding
-to add internally on the top and bottom of <I>widget</I>.  <I>Pixels</I> must be a valid
-screen distance like <I>2</I> or <I>0.3i</I>.  The default is <I>0</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets how much
-padding to add to the left and right exteriors of <I>widget</I>. <I>Pad</I> can be a list
-of one or two numbers.  If <I>pad</I> has two elements, the left side of <I>widget</I>
-is padded by the first value and the right side by the second value.  If
-<I>pad</I> has just one value, both the left and right sides are padded evenly
-by the value.  The default is <I>0</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets how much padding to add to
-the top and bottom exteriors of <I>widget</I>.  <I>Pad</I> can be a list of one or two
-numbers.  If <I>pad</I> has two elements, the area above <I>widget</I> is padded by the
-first value and the area below by the second value.  If <I>pad</I> is just one
-number, both the top and bottom areas are padded by the value.  The default
-is <I>0</I>. </DD>
-
-<DT><B>-reqheight <I>height</I></B> </DT>
-<DD>Specifies the limits of the requested height for
-<I>widget</I>. <I>Height</I> is a list of bounding values.  See the  <FONT SIZE=-1><B>BOUNDING</B></FONT>
-  section
-for a description of this list.  By default, the height of <I>widget</I> is its
-requested height with its internal padding (see the <B>-ipady</B> option).  The
-bounds specified by <I>height</I> either override the height completely, or bound
-the height between two sizes. The default is <I>""</I>. </DD>
-
-<DT><B>-reqwidth <I>width</I></B> </DT>
-<DD>Specifies
-the limits of the requested width for <I>widget</I>. <I>Width</I> is a list of bounding
-values.  See the  <FONT SIZE=-1><B>BOUNDING</B></FONT>
-  section for a description of this list.  By default,
-the width of <I>widget</I> is its requested width with its internal padding (set
-the <B>-ipadx</B> option).  The bounds specified by <I>width</I> either override the width
-completely, or bound the height between two sizes. The default is <I>""</I>. </DD>
-
-<DT><B>-rowspan
-<I>number</I></B> </DT>
-<DD>Sets the number of rows <I>widget</I> will span. The default is <I>1</I>. </DD>
-
-<DT><B>-rowcontrol
-<I>control</I></B> </DT>
-<DD>Specifies how the height of <I>widget</I> should control the height of
-the rows it spans. <I>Control</I> is  either <I>normal</I>, <I>none</I>, or <I>full</I>.   The default
-is <I>normal</I>. <blockquote></DD>
-
-<DT><I>none</I> </DT>
-<DD>The height of <I>widget</I> is not considered.    </DD>
-
-<DT><I>full</I> </DT>
-<DD>Only the
-height of <I>widget</I> will be considered when computing the heights of the rows.
- </DD>
-
-<DT><I>normal</I> </DT>
-<DD>Indicates that the tallest widget spanning the row will determine
- the height of the span. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<H2><A NAME="sect8" HREF="#toc8">Column Options</A></H2>
-To configure a column in the table,
-specify the column index as <I>C<I>i</I></I>, where <I>i</I> is the index of the column to be
-configured. <BR>
-<P>
-<CODE><B>table configure</B> <I>container <I>C<I>i</I></I></I> ?<I>option value</I>?...<BR>
-</CODE><P>If the index is specified as <I>C*</I>, then all columns of the table will be
-configured.  The following options are available for table columns. <blockquote>
-<DL>
-
-<DT><B>-padx
-<I>pad</I></B> </DT>
-<DD>Sets the padding to the left and right of the column. <I>Pad</I> can be a list
-of one or two numbers.  If <I>pad</I> has two elements, the left side of the column
-is padded by the first value and the right side by the second value.  If
-<I>pad</I> has just one value, both the left and right sides are padded evenly
-by the value.  The default is <I>0</I>. </DD>
-
-<DT><B>-resize <I>mode</I></B> </DT>
-<DD>Indicates that the column can
-expand or shrink from its requested width  when the table is resized. <I>Mode</I>
-must be one of the following: <I>none</I>, <I>expand</I>, <I>shrink</I>, or <I>both</I>.  If <I>mode</I> is
- <I>expand</I> the width of the column is expanded if there is extra space in
-the container window. If <I>mode</I> is <I>shrink</I> its width may be reduced beyond
-its requested width if there is not enough space in the container. The default
-is <I>none</I>. </DD>
-
-<DT><B>-width <I>width</I></B> </DT>
-<DD>Specifies the limits within that the width of the column
-may expand or shrink.  <I>Width</I> is a list of bounding values.  See the section
-<FONT SIZE=-1><B>BOUNDING</B></FONT>
-  for a description of this list. By default there are no constraints.
-</DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect9" HREF="#toc9">Row Options</A></H2>
-To configure a row in the table, specify the row index as <I>R<I>i</I></I>,
-where <I>i</I> is the index of the row to be configured. <BR>
-<P>
-<CODE><B>table configure</B> <I>container <I>R<I>i</I></I></I> ?<I>option value</I>?...<BR>
-</CODE><P>If the index is specified as <I>R*</I>, then all rows of the table will be configured.
- The following options are available for table rows. <blockquote>
-<DL>
-
-<DT><B>-height <I>height</I></B> </DT>
-<DD>Specifies
-the limits of the height that the row may expand or shrink to.  <I>Height</I> is
-a list of bounding values.  See the section  <FONT SIZE=-1><B>BOUNDING</B></FONT>
-  for a description
-of this list. By default there are no constraints. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding
-above and below the row.  <I>Pad</I> can be a list of one or two numbers.  If <I>pad</I>
-has two elements, the area above the row is padded by the first value and
-the area below by the second value.  If <I>pad</I> is just one number, both the
-top and bottom areas are padded by the value.  The default is <I>0</I>. </DD>
-
-<DT><B>-resize <I>mode</I></B>
-</DT>
-<DD>Indicates that the row can expand or shrink from its requested height 
-when the table is resized. <I>Mode</I> must be one of the following: <I>none</I>, <I>expand</I>,
-<I>shrink</I>, or <I>both</I>.  If <I>mode</I> is  <I>expand</I> the height of the row is expanded if
-there is extra space in the container. If <I>mode</I> is <I>shrink</I> its height may
-be reduced beyond its requested height if there is not enough space in
- the container. The default is <I>none</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect10" HREF="#toc10">Bounding Sizes</A></H2>
-Sometimes it's more useful
-to limit resizes to an acceptable range, than to fix the size to a particular
-value or disallow resizing altogether.  Similar to the way the <B>wm</B> command
-lets you specify a <B>minsize</B> and <B>maxsize</B> for a toplevel window, you can bound
-the sizes the container, a widget, row, or column may take. The <B>-width</B>, <B>-height</B>,
-<B>-reqwidth</B>, and <B>-reqheight</B> options, take a list of one, two, or three values.
-We can take a previous example and instead preventing resizing, bound the
-size of the scrollbars between two values. <BR>
-<CODE>table . \<BR>
-    .title   0,0 -cspan 3 \<BR>
-    .canvas  1,1 -fill both \<BR>
-    .vscroll 1,2 -fill y \<BR>
-    .hscroll 2,1 -fill x<BR>
-<P>
-# Bound the scrollbars between 1/8 and 1/2 inch<BR>
-table configure . c2 -width { 0.125 0.5 }<BR>
-table configure . r2 -height { 0.125 0.5 }<BR>
-table configure . vscroll .hscroll -fill both<BR>
-</CODE><P>The scrollbars will get no smaller than 1/8 of an inch, or bigger than
-1/2 inch.  The initial size will be their requested size, so long as it
-is within the specified bounds. <P>
-How the elements of the list are interpreted
-is dependent upon the number of elements in the list.   <blockquote>
-<DL>
-
-<DT>{<I></I>} </DT>
-<DD>Empty list. No
-bounds are set. The default sizing is performed. </DD>
-
-<DT>{<I> x </I>}  </DT>
-<DD>Fixes the size to
-<I>x</I>.  The window or partition cannot grow or shrink. </DD>
-
-<DT>{<I> min max </I>} </DT>
-<DD>Sets up minimum
-and maximum limits for the size of the window or partition.  The window
-or partition can be reduced less than <I>min</I>, nor can it be stretched beyond
-<I>max</I>. </DD>
-
-<DT>{<I> min max nom </I>} </DT>
-<DD>Specifies minimum and maximum size limits, but also
-specifies a nominal size <I>nom</I>.  This overrides the calculated size of the
-window or partition. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect11" HREF="#toc11">Miscellaneous</A></H2>
-Another feature is that you can put two
-widgets in the same cell of the table.  This is useful when you want to
-add decorations around a widget. <BR>
-<CODE>frame .frame -bd 1 -relief sunken<BR>
-button .quit -text "Quit"<BR>
-<P>
-# Put both the frame and the button in the same cell.<BR>
-table . \<BR>
-    .quit  1,0 -padx 2 -pady 2 \<BR>
-    .frame 1,0 -fill both<BR>
-
-<H2><A NAME="sect12" HREF="#toc12"></CODE><P>Limitations</A></H2>
-A long standing bug in Tk (circa 1993), there is no way to detect
-if a window is already a container of a different geometry manager. This
-is usually done by accident, such as the following where all three widgets
-are arranged in the same container ".", but using different geometry managers.
-<BR>
-<CODE>    table .f1<BR>
-<tt> </tt> <tt> </tt> ...<BR>
-    pack .f2<BR>
-<tt> </tt> <tt> </tt> ...<BR>
-    grid .f3<BR>
-</CODE><P>This leads to bizarre window resizing, as each geometry manager applies
-its own brand of layout policies.  When the container is a top level window
-(such as "."), your window manager may become locked as it responds to the
-never-ending stream of resize requests.   
-<H2><A NAME="sect13" HREF="#toc13">Keywords</A></H2>
-frame, geometry manager,
-location, table, size <P>
- <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Operations</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Table Options</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Widget Options</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Column Options</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Row Options</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Bounding Sizes</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Miscellaneous</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Limitations</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/tabset.html b/blt3.0/html/tabset.html
deleted file mode 100644
index 265ebb3..0000000
--- a/blt3.0/html/tabset.html
+++ /dev/null
@@ -1,936 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>tabset(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-tabset - Create and manipulate tabset widgets
-
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>tabset</B> <I>pathName </I>?<I>options</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>tabset</B> widget displays
-a series of overlapping folders. Only the contents of one folder at a time
-is displayed.  By clicking on the tab's of a folder, you can view other folders.
- Each folder may contain any Tk widget that can be automatically positioned
-and resized in the folder. <P>
-There's no limit to the number of folders.  Tabs
-can be tiered or scrolled.  Pages (i.e. embedded widgets) can be torn off
-and displayed in another toplevel widget, and also restored.  A tabset can
-also be used as just a set of tabs, without a displaying any pages.  You
-can bind events to individual tabs, so it's easy to add features like "balloon
-help". 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Notebooks are a popular graphical paradigm.  They allow
-you to organize many windows in a single widget.  For example, you might
-have an application the displays several X-Y graphs at the same time. Typically,
-you can't pack the graphs into the same <B>frame</B> because they are too large.
- The other alternative is to pack the graphs into several <B>toplevel</B> widgets,
-allowing them to overlap on the screen.  The problem is that all the different
-toplevel windows clutter the screen and are difficult to manage. <P>
-The <B>tabset</B>
-widget lets organize your application by displaying each graph as a page
-in a folder of a notebook.  Only one page is visible at a time. When you
-click on a tab, the folder (graph) corresponding to the tab is displayed
-in the <B>tabset</B> widget.  The tabset also lets you temporarily tear pages out
-of the notebook into a separate toplevel widget, and put them back in the
-tabset later.  For example, you could compare two graphs side-by-side by tearing
-them out, and then replace them when you are finished. <P>
-A tabset may contain
-an unlimited number of folders.  If there are too many tabs to view, you
-can arrange them as multiple tiers or scroll the tabs. The tabset uses the
-conventional Tk scrollbar syntax, so you can attach a scrollbar too.  
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-You
-create a tabset widget with the <B>tabset</B> command. <BR>
-<CODE># Create a new tabset<BR>
-tabset .ts -relief sunken -borderwidth 2 <BR>
-</CODE><P>A new Tcl command <I>.ts</I> is also created.  This command can be used to query
-and modify the tabset.  For example, to change the default font used by
-all the tab labels, you use the new command and the tabset's <B>configure</B> operation.
-<BR>
-<CODE># Change the default font.<BR>
-.ts configure -font "fixed"<BR>
-</CODE><P>You can then add folders using the <B>insert</B> operation. <BR>
-<CODE># Create a new folder "f1"<BR>
-.ts insert 0 "f1"<BR>
-</CODE><P>This inserts the new tab named "f1" into the tabset.  The index <I>0</I> indicates
-location to insert the new tab.  You can also use the index <I>end</I> to append
-a tab to the end of the tabset.  By default, the text of the tab is the
-name of the tab.  You can change this by configuring the <B>-text</B> option. <BR>
-<CODE># Change the label of "f1"<BR>
-.ts tab configure "f1" -label "Tab #1" <BR>
-</CODE><P>The <B>insert</B> operation lets you add one or more folders at a time. <BR>
-<CODE>.ts insert end "f2" -label "Tab #2" "f3" "f4" <BR>
-</CODE><P>The tab on each folder contains a label.  A label may display both an image
-and a text string.  You can reconfigure the tab's attributes (foreground/background
-colors, font, rotation, etc) using the <B>tab configure</B> operation. <BR>
-<CODE># Add an image to the label of "f1"<BR>
-set image [image create photo -file stopsign.gif]<BR>
-.ts tab configure "f1" -image $image<BR>
-.ts tab configure "f2" -rotate 90<BR>
-</CODE><P>Each folder may contain an embedded widget to represent its contents. The
-widget to be embedded must be a child of the tabset widget.  Using the <B>-window</B>
-option, you specify the name of widget to be embedded.  But don't pack the
-widget, the tabset takes care of placing and arranging the widget for you.
-<BR>
-<CODE>graph .ts.graph<BR>
-.ts tab configure "f1" -window ".ts.graph" \<BR>
-    -fill both -padx 0.25i -pady 0.25i<BR>
-</CODE><P>The size of the folder is determined the sizes of the Tk widgets embedded
-inside each folder.  The folder will be as wide as the widest widget in
-any folder. The tallest determines the height.  You can use the tab's <B>-pagewidth</B>
-and <B>-pageheight</B> options override this. <P>
-Other options control how the widget
-appears in the folder.  The <B>-fill</B> option says that you wish to have the widget
-stretch to fill the available space in the folder. <BR>
-<CODE>.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i<BR>
-<P>
-</CODE><P>Now when you click the left mouse button on "f1", the graph will be displayed
-in the folder.  It will be automatically hidden when another folder is selected.
- If you click on the right mouse button, the embedded widget will be moved
-into a toplevel widget  of its own.  Clicking again on the right mouse button
-puts it back into  the folder. <P>
-If you want to share a page between two different
-folders, the <B>-command</B> option lets you specify a Tcl command to be invoked
-whenever the folder is selected.  You can reset the <B>-window</B> option for the
-tab whenever it's clicked. <BR>
-<CODE>.ts tab configure "f2" -command { <BR>
-    .ts tab configure "f2" -window ".ts.graph"<BR>
-}<BR>
-.ts tab configure "f1" -command { <BR>
-    .ts tab configure "f1" -window ".ts.graph"<BR>
-}<BR>
-</CODE><P>If you have many folders, you may wish to stack tabs in multiple tiers.
- The tabset's <B>-tiers</B> option requests a maximum number of tiers.   The default
-is one tier.   <BR>
-<CODE>.ts configure -tiers 2<BR>
-</CODE><P>If the tabs can fit in less tiers, the widget will use that many.   Whenever
-there are more tabs than can be displayed in the maximum number of tiers,
-the tabset will automatically let you scroll the tabs.  You can even attach
-a scrollbar to the tabset. <BR>
-<CODE>.ts configure -scrollcommand { .sbar set }  -scrollincrement 20<BR>
-.sbar configure -orient horizontal -command { .ts view }<BR>
-</CODE><P>By default tabs are along the top of the tabset from left to right.   But
-tabs can be placed on any side of the tabset using the <B>-side</B> option. <BR>
-<CODE># Arrange tabs along the right side of the tabset. <BR>
-.ts configure -side right -rotate 270<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Syntax</A></H2>
-The <B>tabset</B> command creates a new window using the <I>pathName</I> argument
-and makes it into a tabset widget. <BR>
-<P>
-<CODE><B>tabset <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>Additional options may be specified on the command line or in the option
-database to configure aspects of the tabset such as its colors, font, text,
-and relief.  The <B>tabset</B> command returns its <I>pathName</I> argument.  At the time
-this command is invoked, there must not exist a window named <I>pathName</I>,
-but <I>pathName</I>'s parent must exist. <P>
-When first created, a new tabset contains
-no tabs.  Tabs are added or deleted using widget operations described below.
-It is not necessary for all the tabs to be displayed in the tabset window
-at once; commands described below may be used to change the view in the
-window. Tabsets allow scrolling of tabs using the <B>-scrollcommand</B> option. 
-They also support scanning (see the <B>scan</B> operation). Tabs may be arranged
-along any side of the tabset window using the <B>-side</B> option. <P>
-The size of the
-tabset window is determined the number of tiers of tabs and the sizes of
-the Tk widgets embedded inside each folder. The widest widget determines
-the width of the folder. The tallest determines the height.  If no folders
-contain an embedded widget, the size is detemined solely by the size of
-the tabs.   <P>
-You can override either dimension with the tabset's <B>-width</B> and
-<B>-height</B> options. 
-<H2><A NAME="sect6" HREF="#toc6">Tabset Indices</A></H2>
-Indices refer to individual tabs/folders in
-the tabset.  Many of the operations for tabset widgets take one or more
-indices as arguments.  An index may take several forms: 
-<DL>
-
-<DT><I>number</I>  </DT>
-<DD>Unique node
-id of the tab. </DD>
-
-<DT><B>@<I>x<B>,<I>y</I></B></I></B> </DT>
-<DD>Tab that covers the point in the tabset window specified
-by <I>x</I> and <I>y</I> (in screen coordinates).  If no tab covers that point, then the
-index is ignored. </DD>
-
-<DT><B>select</B>  </DT>
-<DD>The currently selected tab.  The <B>select</B> index is
- typically changed by either clicking on the tab with the left mouse  button
-or using the widget's <B>invoke</B> operation. </DD>
-
-<DT><B>active</B>  </DT>
-<DD>The tab where the mouse pointer
-is currently located.  The label  is drawn using its active colors (see
-the <B>-activebackground</B> and <B>-activeforeground</B> options).  The <B>active</B> index is
-typically changed by moving the mouse pointer over a tab or using the widget's
-<B>activate</B> operation. There can be only one active tab at a time. If there
-is no tab located under the mouse pointer, the index is ignored. </DD>
-
-<DT><B>focus</B> 
-</DT>
-<DD>Tab that currently has the widget's focus. This tab is displayed with a dashed
-line around its label.  You can change this using the <B>focus</B> operation. If
-no tab has focus, then the index is ignored. </DD>
-
-<DT><B>down</B>  </DT>
-<DD>Tab immediately below
-the tab that currently has focus, if there is one. If there is no tab below,
-the current  tab is returned. </DD>
-
-<DT><B>left</B> </DT>
-<DD>Tab immediately to the left the tab that
-currently has focus, if there is one.  If there is no tab to the left, the
-current  tab is returned. </DD>
-
-<DT><B>right</B>  </DT>
-<DD>Tab immediately to the right the tab that
-currently has focus, if there is one. If there is no tab to the right, the
-current tab is returned. </DD>
-
-<DT><B>up</B>  </DT>
-<DD>Tab immediately above, if there is one, to
-the tab that currently has focus. If there is no tab above, the current
-tab is returned. </DD>
-
-<DT><B>end</B> </DT>
-<DD>Last tab in the tabset.  If there are no tabs in the
-tabset then the index is ignored. </DD>
-</DL>
-<P>
-Some indices may not always be available.
- For example, if the mouse is not over any tab, "active" does not have
-an index.  For most tabset operations this is harmless and ignored.   
-<H2><A NAME="sect7" HREF="#toc7">Tabset
-Operations</A></H2>
-All <B>tabset</B> operations are invoked by specifying the widget's pathname,
-the operation, and any arguments that pertain to that operation.  The general
-form is: <P>
-<BR>
-<P>
-<CODE><tt> </tt> <tt> </tt> <I>pathName operation </I>?<I>arg arg ...</I>?<BR>
-<P>
-</CODE><P><I>Operation</I> and the <I>arg</I>s determine the exact behavior of the command.  The
-following operations are available for tabset widgets: 
-<DL>
-
-<DT><I>pathName <B>activate</B></I>
-<I>index</I>  </DT>
-<DD>Sets the active tab to the one indicated by <I>index</I>.  The active tab
-is drawn with its <I>active</I> colors (see the <B>-activebackground</B> and <B>-activeforeground</B>
-options) and may be retrieved with the index <B>active</B>.  Only one tab may be
-active at a time.  If <I>index</I> is the empty string, then all tabs will be drawn
-with their normal foreground and background colors. </DD>
-
-<DT><I>pathName <B>bind</B></I> <I>tagName</I>
-?<I>sequence</I>? ?<I>command</I>?  </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever
-the event sequence given by <I>sequence</I> occurs for a tab with this tag, <I>command</I>
-will be invoked.  The syntax is similar to the  <B>bind</B> command except that
-it operates on tabs, rather  than widgets. See the <B>bind</B> manual entry for
-complete details on <I>sequence</I> and the substitutions performed on  <I>command</I>.
-  <P>
-If all arguments are specified then a new binding is created, replacing
- any existing binding for the same <I>sequence</I> and <I>tagName</I>. If the first character
-of <I>command</I> is <I>+</I> then <I>command</I>  augments an existing binding rather than
-replacing it.  If no <I>command</I> argument is provided then the command currently
-associated with <I>tagName</I> and <I>sequence</I> (it's an error occurs  if there's no
-such binding) is returned.  If both <I>command</I> and  <I>sequence</I> are missing then
-a list of all the event sequences for  which bindings have been defined
-for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value of the configuration
-option given by <I>option</I>. <I>Option</I> may have any of the values accepted by the
-<B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>configure</B></I> ?<I>option</I>? ?<I>value
-option value ...</I>? </DT>
-<DD>Query or modify the configuration options of the widget.
-If no <I>option</I> is specified, returns a list describing all  the available
-options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information on the format
-of this list).  If <I>option</I> is specified with no <I>value</I>, then the command returns
-a list describing the one named option (this list will be identical to
-the corresponding sublist of the value returned if no <I>option</I> is specified).
- If one or more <I>option-value</I> pairs are specified, then the command modifies
-the given widget option(s) to have the given value(s);  in this case the
-command returns an empty string. <I>Option</I> and <I>value</I> are described below: <blockquote></DD>
-
-<DT><B>-activebackground
-<I>color</I></B> </DT>
-<DD>Sets the default active background color for tabs.  A tab is active
-when the mouse is positioned over it or set by the <B>activate</B> operation. 
-Individual tabs may override this option by setting the  tab's <B>-activebackground</B>
-option.  </DD>
-
-<DT><B>-activeforeground <I>color</I></B> </DT>
-<DD>Sets the default active foreground color
-for tabs.  A tab is active when the mouse is positioned over it or set by
-the <B>activate</B> operation.  Individual tabs may override this option by setting
-the tab's <B>-activeforeground</B> option. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background color
-of the tabset.   </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the outside edge of the widget.  The <B>-relief</B> option determines how the border
-is to be drawn.  The default is <I>2</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.
- The default cursor is <I>""</I>. </DD>
-
-<DT><B>-dashes <I>dashList</I></B> </DT>
-<DD>Sets the dash style of the focus
-outline.  When a tab has the widget's focus, it is drawn with a dashed outline
-around its label.   <I>DashList</I> is a list of up to 11 numbers that alternately
-represent the lengths of the dashes and gaps on the cross hair lines.  Each
-number must be between 1 and 255.  If <I>dashList</I> is <I>""</I>, the outline will be
-a solid line.  The default value is <I>5 2</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Sets the default
-font for the text in tab labels.  Individual tabs may override this by setting
-the tab's <B>-font</B> option.  The default value is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the default color of tab labels.  Individual tabs
-may override this option by setting the tab's <B>-foreground</B> option.   The default
-value is <I>black</I>. </DD>
-
-<DT><B>-gap <I>size</I></B> </DT>
-<DD>Sets the gap (in pixels) between tabs.  The default
-value is <I>2</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of widget.  If <I>pixels</I>
-is 0, then the height of the widget will be calculated based on the size
-the tabs and their pages. The default is <I>0</I>. </DD>
-
-<DT><B>-highlightbackground  <I>color</I></B> </DT>
-<DD>Sets
-the color to display in the traversal highlight region when the tabset
-does not have the input focus.   </DD>
-
-<DT><B>-highlightcolor <I>color</I></B> </DT>
-<DD>Sets the color to
-use for the traversal highlight rectangle that is drawn around the widget
-when it has the input focus.  The default is <I>black</I>. </DD>
-
-<DT><B>-highlightthickness <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the highlight rectangle to draw around the outside of
- the widget when it has the input focus. <I>Pixels</I> is a non-negative  value
-and may have any of the forms acceptable to <B>Tk_GetPixels</B>. If the value is
-zero, no focus highlight is drawn around the widget. The default is <I>2</I>. </DD>
-
-<DT><B>-pageheight
-<I>pixels</I></B> </DT>
-<DD>Sets the requested height of the page.  The page is the area under
-the tab used to display the page contents.  If <I>pixels</I> is <I>0</I>, the maximum
-height of all embedded tab windows is used.  The default is <I>0</I>. </DD>
-
-<DT><B>-pagewidth
-<I>pixels</I></B> </DT>
-<DD>Sets the requested width of the page.  The page is the area under
-the tab used to display the page contents.  If <I>pixels</I> is <I>0</I>, the maximum
-width of all embedded tab windows is used.  The default is <I>0</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B>
-</DT>
-<DD>Specifies the 3-D effect for the tabset widget.  <I>Relief</I> specifies how the
-tabset should appear relative to widget that it is packed into; for example,
-<I>raised</I> means the tabset should appear to protrude.  The default is <I>sunken</I>.
-</DD>
-
-<DT><B>-rotate <I>theta</I></B> </DT>
-<DD>Specifies the degrees to rotate text in tab labels. <I>Theta</I> is
-a real value representing the number of degrees to rotate the tick labels.
- The default is <I>0.0</I> degrees. </DD>
-
-<DT><B>-samewidth <I>boolean</I></B> </DT>
-<DD>Indicates if each tab should
-be the same width.  If true, each tab will be as wide as the widest tab.
- The default is <I>no</I>. </DD>
-
-<DT><B>-scrollcommand <I>string</I></B> </DT>
-<DD>Specifies the prefix for a command
-for communicating with  scrollbars.  Whenever the view in the widget's window
- changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.  </DD>
-
-<DT><B>-scrollincrement <I>pixels</I></B> </DT>
-<DD>Sets the smallest number
-of pixels to scroll the tabs.  If <I>pixels</I> is greater than 0, this sets the
-units for  scrolling (e.g.,  when you the change the view by clicking on
-the left and right arrows of a scrollbar). </DD>
-
-<DT><B>-selectbackground <I>color</I></B> </DT>
-<DD>Sets the
-color to use when displaying background of the selected tab. Individual
-tabs can override this option by setting the tab's  <B>-selectbackground</B> option.
-</DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the raised 3-D border to draw
-around the label of  the selected tab.  <I>Pixels</I> must be a non-negative value.
-The default value is <I>1</I>. </DD>
-
-<DT><B>-selectcommand <I>string</I></B> </DT>
-<DD>Specifies a default Tcl script
-to be associated with tabs.  This command is typically invoked when left
-mouse button is released over  the tab.  Individual tabs may override this
-with the tab's <B>-command</B> option. The default value is <I>""</I>. </DD>
-
-<DT><B>-selectforeground <I>color<B>
-</B></I></B></DT>
-<DD>Sets the default color of the selected tab's text label.  Individual tabs
-can override this option by setting the tab's  <B>-selectforeground</B> option. The
-default value is <I>black</I>. </DD>
-
-<DT><B>-selectpad <I>pixels<B> </B></I></B></DT>
-<DD>Specifies extra padding to be displayed
-around the selected tab.  The default value is <I>3</I>. </DD>
-
-<DT><B>-side <I>side<B> </B></I></B></DT>
-<DD>Specifies the
-side of the widget to place tabs. The following values are valid for <I>side</I>.
-The default value is <I>top</I>. <blockquote></DD>
-
-<DT><I>top</I> </DT>
-<DD>Tabs are drawn along the top. </DD>
-
-<DT><I>left</I> </DT>
-<DD>Tabs are
-drawn along the left side. </DD>
-
-<DT><I>right</I> </DT>
-<DD>Tabs are drawn along the right side. </DD>
-
-<DT><I>both</I>
-</DT>
-<DD>Tabs are drawn along the bottom side. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-slant <I>slant</I></B> </DT>
-<DD>Specifies if the tabs
-should be slanted 45 degrees on the left and/or  right sides. The following
-values are valid for <I>slant</I>. The default  is <I>none</I>. <blockquote></DD>
-
-<DT><I>none</I> </DT>
-<DD>Tabs are drawn as
-a rectangle.   </DD>
-
-<DT><I>left</I> </DT>
-<DD>The left side of the tab is slanted.   </DD>
-
-<DT><I>right</I> </DT>
-<DD>The right
-side of the tab is slanted.   </DD>
-
-<DT><I>both</I> </DT>
-<DD>Boths sides of the tab are slanted. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-tabbackground
-<I>color</I></B> </DT>
-<DD>Sets the default background color of tabs. Individual tabs can override
-this option by setting the tab's  <B>-background</B> option. </DD>
-
-<DT><B>-tabborderwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the 3-D border around the outside edge of the tab.  The
-<B>-tabrelief</B> option determines how the border is to be drawn.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-tabforeground <I>color</I></B> </DT>
-<DD>Specifies the color to use when displaying a tab's
-label. Individual tabs can override this option by setting the tab's  <B>-foreground</B>
-option. </DD>
-
-<DT><B>-tabrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect for both tabs and folders.
- <I>Relief</I> specifies how the tabs should appear relative to background of
-the  widget; for example, <I>raised</I> means the tab should appear to protrude.
- The default is <I>raised</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides information used when
-moving the focus from window to window via keyboard traversal (e.g., Tab
-and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window should be skipped
-entirely during keyboard traversal.  <I>1</I> means that the this window should
-always receive the input focus.  An empty value means that the traversal
-scripts decide whether to focus on the window. The default is <I>1</I>. </DD>
-
-<DT><B>-textside
-<I>side<B> </B></I></B></DT>
-<DD>If both images and text are specified for a tab, this option determines
-on which side of the tab the text is to be displayed. The  valid sides are
-<I>left</I>, <I>right</I>, <I>top</I>, and <I>bottom</I>.  The default value is <I>left</I>. </DD>
-
-<DT><B>-tiers <I>number<B> </B></I></B></DT>
-<DD>Specifies
-the maximum number of tiers to use to display the tabs. The default value
-is <I>1</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies a tiled background for the widget.  If <I>image</I>
-isn't <I>""</I>, the background is tiled using <I>image</I>. Otherwise, the normal background
-color is drawn (see the <B>-background</B> option).  <I>Image</I> must be an image created
-using the Tk <B>image</B> command.  The default is <I>""</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Specifies the
-requested width of the widget.  If <I>pixels</I> is 0, then the width of the widget
-will be calculated based on the size the tabs and their pages. The default
-is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>delete <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Deletes one or more tabs from the tabset.
- <I>First</I> and <I>last</I> are the first and last indices, defining a range of tabs
-to be deleted.   If <I>last</I> isn't specified, then only the tab at <I>first</I>  is
-deleted. </DD>
-
-<DT><I>pathName <B>focus <I>index</I></B></I> </DT>
-<DD>Designates a tab to get the widget's focus.
- This tab is displayed  with a dashed line around its label.  </DD>
-
-<DT><I>pathName <B>get</B></I>
-<I>index</I> </DT>
-<DD>Returns the name of the tab.  The value of <I>index</I> may be in any form
-described in the section <FONT SIZE=-1><B>TABSET INDICES</B></FONT>
-  </DD>
-
-<DT><I>pathName <B>index</B></I> ?<I>flag</I>? <I>string</I> 
-</DT>
-<DD>Returns the node id of the tab specified by <I>string</I>.  If <I>flag</I> is <B>-name</B>, then
-<I>string</I> is the name of a tab. If <I>flag</I> is <B>-index</B>, <I>string</I> is an index such as
-"active" or "focus".  If <I>flag</I> isn't specified, it defaults to <B>-index</B>. </DD>
-
-<DT><I>pathName
-<B>insert</B></I> <I>position <I>name</I></I> ?<I>option value</I>?... </DT>
-<DD>Inserts new tabs into the tabset.  Tabs
-are inserted just before the tab given by <I>position</I>.  <I>Position</I> may be either
-a number, indicating where in the list the new tab should be added, or
-<B>end</B>, indicating that the new tab is to be added the end of the list.   <I>Name</I>
-is the symbolic name of the tab. <I>Be careful not to use  a number. Otherwise
-the tabset will confuse it with tab indices</I>.  Returns  a list of indices
-for all the new tabs. </DD>
-
-<DT><I>pathName <B>invoke <I>index</I></B></I> </DT>
-<DD>Selects the tab given by <I>index</I>,
-maps the tab's embedded widget, and  invokes the Tcl command associated
-with the tab, if  there  is  one.   The return value is the return value
-from the Tcl command, or an empty string  if there  is  no  command  associated
-with the tab. This command is ignored if the  tab's state (see the <B>-state</B>
-option) is disabled. </DD>
-
-<DT><I>pathName <B>move</B></I> <I>index</I> <B>before</B>|<B>after</B> <I>index</I> </DT>
-<DD>Moves the tab
-<I>index</I> to a new position in the tabset. </DD>
-
-<DT><I>pathName <B>nearest</B></I> <I>x</I> <I>y</I> </DT>
-<DD>Returns the
-name of the tab nearest to given X-Y screen coordinate. </DD>
-
-<DT><I>pathName <B>scan</B></I> <I>option
-args</I> </DT>
-<DD>This command implements scanning on tabsets.  It has two forms, depending
-on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>scan mark <I>x y</I></B></I> </DT>
-<DD>Records <I>x</I> and <I>y</I> and the current view
-in the tabset window;  used with later <B>scan dragto</B> commands. Typically this
-command is associated with a mouse button press in the widget.  It returns
-an empty string. </DD>
-
-<DT><I>pathName <B>scan dragto <I>x y</I></B></I>. </DT>
-<DD>This command computes the difference
-between its <I>x</I> and <I>y</I> arguments and the <I>x</I> and <I>y</I> arguments to the last <B>scan
-mark</B> command for the widget. It then adjusts the view by 10 times the difference
-in coordinates.  This command is typically associated with mouse motion
-events in the widget, to produce the effect of dragging the list at high
-speed through the window.  The return value is an empty string. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>see <I>index</I></B></I>  </DT>
-<DD>Scrolls the tabset so that the tab <I>index</I> is visible in the widget's
-window. </DD>
-
-<DT><I>pathName <B>size</B></I> </DT>
-<DD>Returns the number of tabs in the tabset. </DD>
-
-<DT><I>pathName
-<B>tab <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>See the  <FONT SIZE=-1><B>TAB OPERATIONS</B></FONT>
-  section below. </DD>
-
-<DT><I>pathName <B>view
-<I>args</I></B></I> </DT>
-<DD>This command queries or changes the position of the tabset in the
-widget's window.  It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName <B>view</B></I> 
-</DT>
-<DD>Returns a list of two numbers between 0.0 and 1.0 that describe the amount
-and position of the tabset that is visible in the window.  For example,
-if <I>view</I> is "0.2 0.6", 20% of the tabset's text is off-screen to the left, 40%
-is visible in the window, and 40% of the tabset is off-screen to the right.
- These are the same values passed to scrollbars via the <B>-scrollcommand</B> option.
-</DD>
-
-<DT><I>pathName <B>view moveto<I> fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so that <I>fraction</I>
-of the total width of the tabset text is off-screen to the left. <I>fraction</I>
-must be a number between 0.0 and 1.0. </DD>
-
-<DT><I>pathName <B>view scroll <I>number what</I></B></I>  </DT>
-<DD>This
-command shifts the view in the window (left/top or right/bottom) according
-to <I>number</I> and <I>what</I>.  <I>Number</I> must be an integer. <I>What</I> must be either <B>units</B>
-or <B>pages</B> or an abbreviation of these.  If <I>what</I> is <B>units</B>, the view adjusts
-left or right by <I>number</I> scroll units (see the <B>-scrollincrement</B> option). 
-; if it is <B>pages</B> then the view adjusts by <I>number</I> widget windows.  If <I>number</I>
-is negative then tabs farther to the left become visible; if it is positive
-then tabs farther to the right become visible. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect8" HREF="#toc8">Tab Operations</A></H2>
-
-<DL>
-
-<DT><I>pathName <B>tab
-cget</B></I> <I>nameOrIndex</I> <I>option</I> </DT>
-<DD>Returns the current value of the configuration
-option given by <I>option</I>. <I>Option</I> may have any of the values accepted by the
-<B>tab configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>tab configure</B></I> <I>nameOrIndex</I>
-?<I>nameOrIndex</I>...? <I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration
-options of one or more tabs. If no <I>option</I> is specified, this operation returns
-a list  describing all the available options for <I>nameOrIndex</I>.   <I>NameOrIndex</I>
-can be either the name of a tab or its index.  Names of tabs take precedence
-over their indices.  That means a tab named  <I>focus</I> is picked over the "focus"
-tab. </DD>
-</DL>
-<P>
-If <I>option</I> is specified, but not <I>value</I>, then a list describing the one
-named option is returned.  If  one or more <I>option-value</I> pairs  are specified,
-then each named tab (specified by <I>nameOrIndex</I>) will have its configurations
-option(s) set the given value(s).  In this last case, the empty string is
-returned. <I>Option</I> and <I>value</I> are described below: <blockquote>
-<DL>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets
-the active background color for <I>nameOrIndex</I>.  A tab is active when the mouse
-is positioned over it or set by the <B>activate</B> operation.  This overrides
-the widget's <B>-activebackground</B>  option.  </DD>
-
-<DT><B>-activeforeground <I>color</I></B> </DT>
-<DD>Sets the default
-active foreground color <I>nameOrIndex</I>.  A tab is "active" when the mouse is
-positioned over it or set by the <B>activate</B> operation.  Individual tabs may
-override this option by setting the tab's <B>-activeforeground</B> option. </DD>
-
-<DT><B>-anchor
-<I>anchor</I></B>  </DT>
-<DD>Anchors the tab's embedded widget to a particular edge of the folder.
-This option has effect only if the space in the folder surrounding the
- embedded widget is larger than the widget itself. <I>Anchor</I> specifies how
-the widget will be positioned in the extra space.  For example, if <I>anchor</I>
-is <I>center</I> then the window is centered in the folder ; if <I>anchor</I> is <I>w</I> then
-the window will be aligned with the leftmost edge of the folder. The default
-value is <I>center</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background color for <I>nameOrIndex</I>.
- Setting this option overides the  widget's <B>-tabbackground</B> option. </DD>
-
-<DT><B>-bindtags
-<I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for this tab.  <I>TagList</I> is a list of binding
-tag names.  The tags and their order will determine how commands for events
-in tabs are invoked.  Each tag in the list matching  the event sequence
-will have its Tcl command executed.  Implicitly the  name of the tab is
-always the first tag in the list.  The default value is <I>all</I>. </DD>
-
-<DT><B>-command <I>string</I></B>
-</DT>
-<DD>Specifies a Tcl script to be associated with <I>nameOrIndex</I>.  This command
-is typically invoked when left mouse button is released over  the tab. 
-Setting this option overrides the widget's <B>-selectcommand</B> option.  </DD>
-
-<DT><B>-data <I>string</I></B>
-</DT>
-<DD>Specifies a string to be associated with <I>nameOrIndex</I>. This value isn't used
-in the widget code.  It may be used in Tcl bindings  to associate extra
-data (other than the image or text) with the tab. The default value is <I>""</I>.
-</DD>
-
-<DT><B>-fill <I>fill</I></B> </DT>
-<DD>If the space in the folder surrounding the tab's embedded widget
-is  larger than the widget, then <I>fill</I> indicates if the embedded widget
- should be stretched to occupy the extra space.  <I>Fill</I> is either  <I>none</I>, <I>x</I>,
-<I>y</I>, <I>both</I>.  For example, if <I>fill</I> is <I>x</I>, then the widget is stretched horizontally.
- If <I>fill</I> is <I>y</I>, the widget is stretched vertically.  The default is <I>none</I>.
-</DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Sets the font for the text in tab labels.  If <I>fontName</I> is
-not the empty string, this overrides the tabset's <B>-font</B> option. The default
-value is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the color of the label for <I>nameOrIndex</I>.
- If <I>color</I> is not the empty string, this overrides the widget's <B>-tabforeground</B>
- option.  The default value is <I>""</I>. </DD>
-
-<DT><B>-image <I>imageName</I></B> </DT>
-<DD>Specifies the image to
-be drawn in label for <I>nameOrIndex</I>. If <I>image</I> is <I>""</I>, no image will be drawn.
- Both text and images may be displayed at the same time in tab labels. The
-default value is <I>""</I>. </DD>
-
-<DT><B>-ipadx <I>pad</I></B> </DT>
-<DD>Sets the padding to the left and right of
-the label. <I>Pad</I> can be a list of one or two screen distances.  If <I>pad</I> has
-two elements, the left side of the label is padded by the first distance
-and the right side by the second.  If <I>pad</I> has just one distance, both the
-left and right sides are padded evenly.  The default value is <I>0</I>. </DD>
-
-<DT><B>-ipady <I>pad</I></B>
-</DT>
-<DD>Sets the padding to the top and bottom of the label. <I>Pad</I> can be a list of
-one or two screen distances.  If <I>pad</I> has two elements, the top of the label
-is padded by the first distance and the bottom by the second.  If <I>pad</I> has
-just one distance, both the top and bottom sides are padded evenly.  The
-default value is <I>0</I>. </DD>
-
-<DT><B>-padx <I>pad</I></B> </DT>
-<DD>Sets the padding around the left and right
-of the embedded widget, if  one exists. <I>Pad</I> can be a list of one or two
-screen distances.  If <I>pad</I> has two elements, the left side of the widget
-is padded by the first distance and the right side by the second.  If <I>pad</I>
-has just one distance, both the left and right sides are padded evenly.
- The default value is <I>0</I>. </DD>
-
-<DT><B>-pady <I>pad</I></B> </DT>
-<DD>Sets the padding around the top and bottom
-of the embedded widget, if one exists. <I>Pad</I> can be a list of one or two screen
-distances.  If <I>pad</I> has two elements, the top of the widget is padded by
-the first distance and the bottom by the second.  If <I>pad</I> has just one distance,
-both the top and bottom sides are padded evenly.  The default value is <I>0</I>.
-</DD>
-
-<DT><B>-selectbackground <I>color</I></B> </DT>
-<DD>Sets the color to use when displaying background
-of the selected tab. If <I>color</I> is not the empty string, this overrides the
-widget's <B>-selectbackground</B> option. The default value is <I>""</I>. </DD>
-
-<DT><B>-shadow <I>color</I></B> </DT>
-<DD>Sets
-the shadow color for the text in the tab's label. Drop shadows are useful
-when both the foreground and background of the tab have similar color intensities.
-If <I>color</I> is the empty string, no shadow is drawn. The default value is <I>""</I>.
-</DD>
-
-<DT><B>-state <I>state</I></B> </DT>
-<DD>Sets the state of the tab. If <I>state</I> is <I>disable</I> the text of the
-tab is drawn as engraved and operations on the tab (such as <B>invoke</B> and
-<B>tab tearoff</B>) are ignored. The default is <I>normal</I>. </DD>
-
-<DT><B>-stipple <I>bitmap</I></B> </DT>
-<DD>Specifies
-a stipple pattern to use for the background of the folder when the window
-is torn off. <I>Bitmap</I> specifies a bitmap to use as the stipple pattern. The
-default is <I>BLT</I>. </DD>
-
-<DT><B>-text <I>text</I></B> </DT>
-<DD>Specifies the text of the tab's label.  The exact
-way the text is drawn may be affected by other options such as <B>-state</B> or
-<B>-rotate</B>. </DD>
-
-<DT><B>-window <I>pathName</I></B> </DT>
-<DD>Specifies the widget to be embedded into the tab.
- <I>PathName</I> must be a child of the <B>tabset</B> widget.  The tabset will "pack"
-and manage the size and placement of <I>pathName</I>.  The default value is <I>""</I>.
-</DD>
-
-<DT><B>-windowheight <I>pixels</I></B> </DT>
-<DD>Sets the requested height of the page.  The page is
-the area under the tab used to display the page contents.  If <I>pixels</I> is
-<I>0</I>, the maximum height of all embedded tab windows is used.  The default
-is <I>0</I>. </DD>
-
-<DT><B>-windowwidth <I>pixels</I></B> </DT>
-<DD>Sets the requested width of the page.  The page
-is the area under the tab used to display the page contents.  If <I>pixels</I>
-is <I>0</I>, the maximum width of all embedded tab windows is used.  The default
-is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>tab names</B></I> ?<I>pattern</I>? </DT>
-<DD>Returns the names of all the tabs matching
-the given pattern. If no <I>pattern</I> argument is provided, then all tab names
-are returned. </DD>
-
-<DT><I>pathName <B>tab tearoff <I>index</I></B></I> ?<I>newName</I>? </DT>
-<DD>Reparents the widget
-embedded into <I>index</I>, placing it inside of <I>newName</I>.  <I>NewName</I> is either the
-name of an new widget that will contain the embedded widget or the name
-of the <B>tabset</B> widget.  It the last case, the embedded widget is put back
-into the folder. <P>
-If no <I>newName</I> argument is provided, then the name of the
-current parent of the embedded widget is returned. </DD>
-</DL>
-
-<H2><A NAME="sect9" HREF="#toc9">Default Bindings</A></H2>
-<P>
-BLT automatically
-generates class bindings that supply tabsets their default behaviors. The
-following event sequences are set by default  for tabsets (via the class
-bind tag <I>Tabset</I>): 
-<DL>
-
-<DT><B><ButtonPress-2></B></DT>
-<DD></DD>
-
-<DT><B><B2-Motion></B></DT>
-<DD></DD>
-
-<DT><B><ButtonRelease-2></B></DT>
-<DD>Mouse button 2 may
-be used for scanning. If it is pressed and dragged over the tabset, the
-contents of the tabset drag at high speed in the direction the mouse moves.
-</DD>
-
-<DT><B><KeyPress-Up></B></DT>
-<DD></DD>
-
-<DT><B><KeyPress-Down></B></DT>
-<DD>The up and down arrow keys move the focus to the
-tab immediately above or below the current focus tab.  The tab with focus
-is drawn with the a dashed outline around the tab label. </DD>
-
-<DT><B><KeyPress-Left></B></DT>
-<DD></DD>
-
-<DT><B><KeyPress-Right></B></DT>
-<DD>The
-left and right arrow keys move the focus to the tab immediately to the
-left or right of the current focus tab.  The tab with focus is drawn with
-the a dashed outline around the tab label. </DD>
-
-<DT><B><KeyPress-space></B></DT>
-<DD></DD>
-
-<DT><B><KeyPress-Return></B></DT>
-<DD>The
-space and return keys select the current tab given focus. When a folder
-is selected, it's command is invoked and the  embedded widget is mapped.
-</DD>
-</DL>
-<P>
-Each tab, by default, also has a set of bindings (via the tag <I>all</I>).  These
-bindings may be reset using the tabset's  <B>bind</B> operation. 
-<DL>
-
-<DT><B><Enter></B></DT>
-<DD></DD>
-
-<DT><B><Leave></B></DT>
-<DD>When
-the mouse pointer enters a tab, it is activated (i.e. drawn in its active
-colors) and when the pointer leaves, it is redrawn in its normal colors.
-</DD>
-
-<DT><B><ButtonRelease-1></B></DT>
-<DD>Clicking with the left mouse button on a tab causes the tab
-to be selected and its Tcl script (see the <B>-command</B> or <B>-selectcommand</B> options)
-to be invoked.  The folder and any embedded widget (if one is specified)
-is automatically mapped. </DD>
-
-<DT><B><ButtonRelease-3></B></DT>
-<DD></DD>
-
-<DT><B><Control-ButtonRelease-1></B></DT>
-<DD>Clicking on
-the right mouse button (or the left mouse button with the Control key held
-down) tears off the current page into its own toplevel widget. The embedded
-widget is re-packed into a new toplevel and  an outline of the widget is
-drawn in the folder.  Clicking again (toggling) will reverse this operation
-and replace the page back in the folder. </DD>
-</DL>
-
-<H2><A NAME="sect10" HREF="#toc10">Bind Tags</A></H2>
-You can bind commands
-to tabs that are triggered when a particular event sequence occurs in them,
-much like canvas items in Tk's  canvas widget.  Not all event sequences are
-valid.  The only binding  events that may be specified are those related
-to the mouse and  keyboard (such as <B>Enter</B>, <B>Leave</B>, <B>ButtonPress</B>,  <B>Motion</B>,
-and <B>KeyPress</B>). <P>
-It is possible for multiple bindings to match a particular
-event. This could occur, for example, if one binding is associated with
-the tab name and another is associated with the tab's tags (see the <B>-bindtags</B>
-option).  When this occurs, all the  matching bindings are invoked.  A binding
-associated with the tab name is invoked first, followed by one binding
-for each of the tab's  bindtags.  If there are multiple matching bindings
-for a single tag,  then only the most specific binding is invoked.  A continue
-command  in a binding script terminates that script, and a break command
- terminates that script and skips any remaining scripts for the event,
- just as for the bind command. <P>
-The <B>-bindtags</B> option for tabs controls addition
-tag names that can be matched.  Implicitly the first tag for each tab is
-its name. Setting the value of the <B>-bindtags</B> option doesn't change this. 
-<H2><A NAME="sect11" HREF="#toc11">Keywords</A></H2>
-tabset,
-widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Tabset Indices</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Tabset Operations</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Tab Operations</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Default Bindings</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Bind Tags</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/tile.html b/blt3.0/html/tile.html
deleted file mode 100644
index 48f79e7..0000000
--- a/blt3.0/html/tile.html
+++ /dev/null
@@ -1,100 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>tile(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-tile -  Tiling versions of Tk widgets 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<P>
-<B>tile::button
-<I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::checkbutton <I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::frame
-<I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::label <I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::radiobutton
-<I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::scrollbar <I>pathName</I></B> <I>option value</I>... <P>
-<B>tile::toplevel
-<I>pathName</I></B> <I>option value</I>... <P>
-
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The tile widgets let you create textured
-backgrounds.  The texture is a Tk image which is tiled over the entire background
-of the widget. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-With the advent of Tk 4.0, images are now easy
-to create and use in applications.  Images add interest to applications
-and they convey more information.  But one area where Tk hasn't taken advantage
-of images is using images as textures for widgets.  Since tiling is a standard
-feature of windowing systems, it's very easy to use images  as textures.
-<P>
-The tile widgets take the standard Tk 4.0 widgets and add tiling configuration
-options to them.  Textures are specified by the name  of the image you wish
-to be tiled across the background of the widget.   
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-To add tiling
-to a widget, you simply create an image using  Tk's <B>image</B> command and use
-the image name as the value for the <B>-tile</B> configuration option of the widget.
-<BR>
-<CODE>image create photo my_texture -file tan_paper.gif<BR>
-blt::tile::frame .f -tile my_texture<BR>
-</CODE><P>The image <I>my_texture</I> is added to the frame.   If <I>my_texture</I> is updated,
-so will the widget background. <BR>
-<CODE>image create photo my_texture -file rain.gif<BR>
-</CODE><P>The tile widget commands reside in the "blt::tile" namespace, so as not
-to collide with the normal Tk widgets. An easy way to add tiling to existing
-programs is to import the tile widget commands into the global namespace.
-<BR>
-<CODE>image create photo my_texture -file tan_paper.gif<BR>
-namespace import -force blt::tile::*<BR>
-frame .f -tile my_texture<BR>
-</CODE><P>To use one image for all texturing, you can use the "Tile" option class
-name to specify the same image for all tile widgets. <BR>
-<CODE>image create photo my_texture -file tan_paper.gif<BR>
-option add *Tile my_texture<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Options</A></H2>
-The following configurations options are added to the widgets. If
-a <B>-tile<B> or <B>-activetile</B></B></B> option is specified, it overrides the background color
-of the widget. 
-<DL>
-
-<DT><B>-activetile <I>image</I></B>  </DT>
-<DD>Specifies a textured background to display
-when the widget is active. This option is available for the <B>tilebutton</B>,
-<B>tilecheckbutton</B>, <B>tileradiobutton</B>, and <B>tilescrollbar</B> widgets.  <I>Image</I> is the
-name an image created using Tk's <B>image</B> command.  The background of the widget
-is tiled with <I>image</I>.  If <I>image</I> is <I>""</I>, then the active background color is
-displayed.  The default is <I>""</I>. </DD>
-
-<DT><B>-tile <I>image</I></B>  </DT>
-<DD>Specifies a textured background
-to display for the widget. <I>Image</I> is the name an image created using Tk's
-<B>image</B> command.  The background of the widget is tiled with <I>image</I>.  If <I>image</I>
-is <I>""</I>, then the normal background color is displayed.  The default is <I>""</I>.
-</DD>
-</DL>
-
-<H2><A NAME="sect6" HREF="#toc6">Keywords</A></H2>
-tile, texture, button, label, radiobutton, checkbutton, scrollbar,
-frame, toplevel <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Options</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/tree.html b/blt3.0/html/tree.html
deleted file mode 100644
index 0d4e020..0000000
--- a/blt3.0/html/tree.html
+++ /dev/null
@@ -1,930 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>tree(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-tree -  Create and manage tree data objects. 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>blt::tree
-create </B>?<I>treeName</I>? <P>
-<B>blt::tree destroy</B> <I>treeName</I>... <P>
-<B>blt::tree names</B> ?<I>pattern</I>?
-
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>tree</B> command creates tree data objects.  A <I>tree object</I> is
-general ordered tree of nodes.  Each node has both a label and a key-value
-list of data.  Data can be heterogeneous, since nodes do not have to contain
-the same data keys.  It is associated with a Tcl command that you can use
-to access and modify the its structure and data. Tree objects can also be
-managed via a C API. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-<P>
- 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-<P>
- 
-<H2><A NAME="sect5" HREF="#toc5">Syntax</A></H2>
-
-<DL>
-
-<DT><B>tree create</B> ?<I>treeName</I>? 
- </DT>
-<DD>Creates a new tree object.  The name of the new tree is returned.  If no
-<I>treeName</I> argument is present, then the name of the tree is automatically
-generated in the form "<I>tree0</I>", "<I>tree1</I>", etc.  If the substring "<I>#auto</I>" is
-found in <I>treeName</I>, it is automatically substituted by a generated name.
- For example, the name <I>.foo.#auto.bar</I> will be translated to <I>.foo.tree0.bar</I>. <P>
-A
-new Tcl command (by the same name as the tree) is also created. Another
-Tcl command or tree object can not already exist as <I>treeName</I>.  If the Tcl
-command is deleted, the tree will also be freed.  The new tree will contain
-just the root node.  Trees are by default, created in the current namespace,
-not the global namespace, unless <I>treeName</I> contains a namespace qualifier,
-such as "<I>fred::myTree</I>". </DD>
-
-<DT><B>tree destroy</B> <I>treeName</I>... </DT>
-<DD>Releases one of more trees.
- The Tcl command associated with <I>treeName</I> is also removed.  Trees are reference
-counted.  The internal tree data object isn't destroyed until no one else
-is using the tree. </DD>
-
-<DT><B>tree names </B>?<I>pattern</I>? </DT>
-<DD>Returns the names of all tree objects.
- if a <I>pattern</I> argument is given, then the only those trees whose name matches
-pattern will be listed. </DD>
-</DL>
-
-<H2><A NAME="sect6" HREF="#toc6">Node IDs and Tags</A></H2>
-Nodes in a tree object may be referred
-in either of two ways: by id or by tag.  Each node has a unique serial number
-or id that is assigned to that node when it's created. The id of an node
-never changes and id numbers are not re-used. <P>
-A node may also have any number
-of tags associated with it.  A tag is just a string of characters, and it
-may take any form except that of an integer.  For example, "<I>x123</I>" is valid,
-but "<I>123</I>" isn't.  The same tag may be associated with many different nodes.
-This is commonly done to group nodes in various interesting ways. <P>
-There
-are two built-in tags: The tag <B>all</B> is implicitly associated with every node
-in the tree.  It may be used to invoke operations on all the nodes in the
-tree.  The tag <B>root</B> is managed automatically by the tree object. It applies
-to the node current set as root. <P>
-When specifying nodes in tree object commands,
-if the specifier is an integer then it is assumed to refer to the single
-node with that id. If the specifier is not an integer, then it is assumed
-to refer to all of the nodes in the tree that have a tag matching the specifier.
- The symbol <I>node</I> is used below to indicate that an argument specifies either
-an id that selects a single node or a tag that selects zero or more nodes.
- Many tree commands only operate on a single node at a time; if <I>node</I> is
-specified in a way that names multiple items, then an error "refers to
-more than one node" is generated. 
-<H2><A NAME="sect7" HREF="#toc7">Node Modifiers</A></H2>
-You can also specify node
-in relation to another node by appending one or more modifiers to the node
-id or tag.  A modifier refers to a node in relation to the specified node.
- For example,  "<I>root->firstchild</I>" selects the first subtree of the root node.
-<P>
-The following modifiers are available: <blockquote>
-<DL>
-
-<DT><B>firstchild</B>  </DT>
-<DD>Selects the first child
-of the node.   </DD>
-
-<DT><B>lastchild</B>  </DT>
-<DD>Selects the last child of the node.   </DD>
-
-<DT><B>next</B>  </DT>
-<DD>Selects
-the next node in preorder to the node.   </DD>
-
-<DT><B>nextsibling</B>  </DT>
-<DD>Selects the next sibling
-of the node.   </DD>
-
-<DT><B>parent</B>  </DT>
-<DD>Selects the parent of the node.   </DD>
-
-<DT><B>previous</B>  </DT>
-<DD>Selects
-the previous node in preorder to the node.   </DD>
-
-<DT><B>prevsibling</B>  </DT>
-<DD>Selects the previous
-sibling of the node.   </DD>
-
-<DT>"<I>label</I>" </DT>
-<DD>Selects the node whose label is <I>label</I>.  Enclosing
-<I>label</I> in  quotes indicates to always search for a node by its label (for
-example,  even if the node is labeled "parent"). </DD>
-</DL>
-</blockquote>
-<P>
-It's an error the node can't
-be found.  For example, <B>lastchild</B> and <B>firstchild</B> will generate errors if
-the node has no children.  The exception to this is the <B>index</B> operation.
-You can use <B>index</B> to test if a modifier is valid. 
-<H2><A NAME="sect8" HREF="#toc8">Tree Operations</A></H2>
-Once you
-create a tree object, you can use its Tcl command  to query or modify it.
- The general form is <BR>
-<P>
-<CODE><I>treeName</I> <I>operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for trees are listed below. 
-<DL>
-
-<DT><I>treeName</I> <B>ancestor</B>
-<I>node1</I> <I>node2</I> </DT>
-<DD>Returns the mutual ancestor of the two nodes <I>node1</I> and <I>node2</I>.
- The ancestor can be one of the two nodes.  For example, if <I>node1</I> and <I>node2</I>
-are the same nodes, their ancestor is <I>node1</I>. </DD>
-
-<DT><I>treeName</I> <B>apply</B> <I>node</I> ?<I>switches</I>?
-</DT>
-<DD>Runs commands for all nodes matching the criteria given by <I>switches</I> for
-the subtree designated by <I>node</I>.  By default all nodes match, but you can
-set switches to narrow the match.  This operation differs from <B>find</B> in two
-ways: 1) Tcl commands can be invoked both pre- and post-traversal of a node
-and 2) the tree is always traversed in depth first order. <P>
-The <B>-exact</B>, <B>-glob</B>,
- and <B>-regexp</B> switches indicate both what kind of pattern matching to perform
-and the pattern.  Pattern matching is done, by default, against each node's
-label.  But if the <B>-path</B> switch is present, it will match the full path of
-the node (a list containing the labels of  the node's ancestors too).  If
-the <B>-key</B> switch is used, it designates the data field to be matched.   <P>
-The
-valid switches are listed below: <blockquote></DD>
-
-<DT><B>-depth</B> <I>number</I> </DT>
-<DD>Descend at most <I>number</I> (a
-non-negative integer) levels If <I>number</I> is <I>1</I> this means only apply the tests
-to the children of <I>node</I>. </DD>
-
-<DT><B>-exact</B> <I>string</I> </DT>
-<DD>Matches each node using <I>string</I>.  The
-node must match <I>string</I> exactly. </DD>
-
-<DT><B>-glob</B> <I>string</I> </DT>
-<DD>Test each node to <I>string</I> using
-global pattern matching.  Matching is done in a fashion similar to that
-used by the C-shell. </DD>
-
-<DT><B>-invert</B> </DT>
-<DD>Select non-matching nodes.  Any node that <I>doesn't</I>
-match the given criteria will be selected. </DD>
-
-<DT><B>-key</B> <I>key</I> </DT>
-<DD>If pattern matching is
-selected (using the <B>-exact</B>, <B>-glob</B>, or <B>-regexp</B> switches), compare the values
-of the data field keyed by <I>key</I> instead of the node's label.  If no pattern
-matching switches are set, then any node with this data key will match.
-</DD>
-
-<DT><B>-leafonly</B> </DT>
-<DD>Only test nodes with no children. </DD>
-
-<DT><B>-nocase</B> </DT>
-<DD>Ignore case when matching
-patterns. </DD>
-
-<DT><B>-path</B> </DT>
-<DD>Use the node's full path when comparing nodes. </DD>
-
-<DT><B>-precommand</B> <I>command</I>
-</DT>
-<DD>Invoke <I>command</I> for each matching node.  Before <I>command</I> is invoked, the id
-of the node is appended.  You can control  processing by the return value
-of <I>command</I>.  If <I>command</I>  generates an error, processing stops and the <B>find</B>
-operation  returns an error.  But if <I>command</I> returns <B>break</B>, then  processing
-stops, no error is generated.  If <I>command</I> returns  <B>continue</B>, then processing
-stops on that subtree and continues on the next. </DD>
-
-<DT><B>-postcommand</B> <I>command</I> </DT>
-<DD>Invoke
-<I>command</I> for each matching node.  Before <I>command</I> is invoked, the id of the
-node is appended.  You can control  processing by the return value of <I>command</I>.
- If <I>command</I>  generates an error, processing stops and the <B>find</B> operation
- returns an error.  But if <I>command</I> returns <B>break</B>, then  processing stops,
-no error is generated.  If <I>command</I> returns  <B>continue</B>, then processing stops
-on that subtree and continues on the next. </DD>
-
-<DT><B>-regexp</B> <I>string</I> </DT>
-<DD>Test each node
-using <I>string</I> as a regular expression pattern. </DD>
-
-<DT><B>-tag</B> <I>string</I> </DT>
-<DD>Only test nodes
-that have the tag <I>string</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>attach</B> <I>treeObject</I> </DT>
-<DD>Attaches to an existing
-tree object <I>treeObject</I>.  This is for cases where the tree object was previously
-created via the C API.  The current tree associated with <I>treeName</I> is discarded.
- In addition, the current set of tags, notifier events, and traces are
-removed. </DD>
-
-<DT><I>treeName</I> <B>children</B> <I>node</I> </DT>
-<DD>Returns a list of children for <I>node</I>.  If
-<I>node</I> is a leaf, then an empty string is returned. </DD>
-
-<DT><I>treeName</I> <B>copy</B> <I>srcNode</I>
-?<I>destTree</I>? <I>destNode</I> ?<I>switches</I>? </DT>
-<DD>Copies <I>srcNode</I> into <I>destNode</I>. Both nodes
-<I>srcNode</I> and <I>destNode</I> must already exist.  If <I>destTree</I> argument is present,
-it indicates the name of the destination tree.  By default both the source
-and destination trees are the same. The valid <I>switches</I> are listed below:
-<blockquote></DD>
-
-<DT><B>-overwrite</B> </DT>
-<DD>Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This switch
-indicates to add or overwrite the node's data fields. </DD>
-
-<DT><B>-recurse</B> </DT>
-<DD>Recursively
-copy all the subtrees of <I>srcNode</I> as well.  In this case, <I>srcNode</I> can't be
-an ancestor of <I>destNode</I> as it would result in a cyclic copy. </DD>
-
-<DT><B>-tags</B> </DT>
-<DD>Copy tag
-inforation.  Normally the following node is copied: its  label and data
-fields.  This indicates to copy tags as well. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>degree</B> <I>node</I>  </DT>
-<DD>Returns
-the number of children of <I>node</I>. </DD>
-
-<DT><I>treeName</I> <B>delete</B> <I>node</I>... </DT>
-<DD>Recursively deletes
-one or more nodes from the tree.   The node and all its descendants are
-removed.   The one exception is the root node.  In this case, only its descendants
-are removed. The root node will remain.  Any tags or  traces on the nodes
-are released. </DD>
-
-<DT><I>treeName</I> <B>depth</B> <I>node</I>  </DT>
-<DD>Returns the depth of the node.  The depth
-is the number of  steps from the node to the root of the tree.  The depth
-of the root node is <I>0</I>. </DD>
-
-<DT><I>treeName</I> <B>dump</B> <I>node</I>  </DT>
-<DD>Returns a list of the paths and
-respective data for <I>node</I> and its descendants.  The subtree designated by
-<I>node</I> is traversed returning the following information for each node: 1)
-the node's path relative to <I>node</I>, 2) a sublist key value pairs representing
-the node's data fields, and 3) a sublist of tags.   This list returned can
-be used later to copy or restore the tree with the <B>restore</B> operation. </DD>
-
-<DT><I>treeName</I>
-<B>dumpfile</B> <I>node</I> <I>fileName</I> </DT>
-<DD>Writes a list of the paths and respective data for
-<I>node</I> and its descendants to the given file <I>fileName</I>.   The subtree designated
-by <I>node</I> is traversed returning the  following information for each node:
-1) the node's path relative to <I>node</I>, 2) a sublist key value pairs representing
-the node's data fields, and 3) a sublist of tags.   This list returned can
-be used later to copy or restore the tree with the <B>restore</B> operation. </DD>
-
-<DT><I>treeName</I>
-<B>exists</B> <I>node</I> ?<I>key</I>? </DT>
-<DD>Indicates if <I>node</I> exists in the tree.  If a <I>key</I> argument
-is present then the command also indicates if the named data field  exists.
-</DD>
-
-<DT><I>treeName</I> <B>find</B> <I>node</I> ?<I>switches</I>?  </DT>
-<DD>Finds for all nodes matching the criteria
-given by <I>switches</I>  for the subtree designated by <I>node</I>.  A list of the selected
- nodes is returned.  By default all nodes match, but you can set switches
-to narrow the match. <P>
-The <B>-exact</B>, <B>-glob</B>,  and <B>-regexp</B> switches indicate both
-what kind of pattern matching to perform and the pattern.  Pattern matching
-is done, by default, against each node's label.  But if the <B>-path</B> switch is
-present, it will match the full path of the node.  If the <B>-key</B> switch is
-used, it designates the data field to be matched.   <P>
-The order in  which
-the nodes are traversed is controlled by the  <B>-order</B> switch. The possible
-orderings are <B>preorder</B>, <B>postorder</B>, <B>inorder</B>,  and <B>breadthfirst</B>.  The default
-is <B>postorder</B>. <P>
-The valid switches are listed below: <blockquote></DD>
-
-<DT><B>-addtag</B> <I>string</I>  </DT>
-<DD>Add the
-tag <I>string</I> to each selected node.   </DD>
-
-<DT><B>-count</B> <I>number</I> </DT>
-<DD>Stop processing after <I>number</I>
-(a positive integer) matches.  </DD>
-
-<DT><B>-depth</B> <I>number</I> </DT>
-<DD>Descend at most <I>number</I> (a non-negative
-integer) levels If <I>number</I> is <I>1</I> this means only apply the tests to the children
-of <I>node</I>. </DD>
-
-<DT><B>-exact</B> <I>string</I> </DT>
-<DD>Matches each node using <I>string</I>.  The node must match
-<I>string</I> exactly. </DD>
-
-<DT><B>-exec</B> <I>command</I> </DT>
-<DD>Invoke <I>command</I> for each matching node.  Before
-<I>command</I> is invoked, the id of the node is appended.  You can control  processing
-by the return value of <I>command</I>.  If <I>command</I>  generates an error, processing
-stops and the <B>find</B> operation  returns an error.  But if <I>command</I> returns
-<B>break</B>, then  processing stops, no error is generated.  If <I>command</I> returns
- <B>continue</B>, then processing stops on that subtree and continues on the next.
-</DD>
-
-<DT><B>-glob</B> <I>string</I> </DT>
-<DD>Test each node to <I>string</I> using global pattern matching.  Matching
-is done in a fashion similar to that used by the C-shell. </DD>
-
-<DT><B>-invert</B> </DT>
-<DD>Select non-matching
-nodes.  Any node that <I>doesn't</I> match the given criteria will be selected. </DD>
-
-<DT><B>-key</B>
-<I>key</I> </DT>
-<DD>If pattern matching is selected (using the <B>-exact</B>, <B>-glob</B>, or <B>-regexp</B> switches),
-compare the values of the data field keyed by <I>key</I> instead of the node's
-label.  If no pattern matching switches are set, then any node with this
-data key will match. </DD>
-
-<DT><B>-leafonly</B> </DT>
-<DD>Only test nodes with no children. </DD>
-
-<DT><B>-nocase</B> </DT>
-<DD>Ignore
-case when matching patterns. </DD>
-
-<DT><B>-order</B> <I>string</I>  </DT>
-<DD>Traverse the tree and process
-nodes according to <I>string</I>. <I>String</I> can be one of the following: <blockquote></DD>
-
-<DT><B>breadthfirst</B>
- </DT>
-<DD>Process the node and the subtrees at each sucessive level. Each node on
-a level is processed before going to the next level. </DD>
-
-<DT><B>inorder</B>  </DT>
-<DD>Recursively
-process the nodes of the first subtree, the node itself, and any the remaining
-subtrees. </DD>
-
-<DT><B>postorder</B>  </DT>
-<DD>Recursively process all subtrees before the node. </DD>
-
-<DT><B>preorder</B>
- </DT>
-<DD>Recursively process the node first, then any subtrees. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-path</B> </DT>
-<DD>Use the node's
-full path when comparing nodes. </DD>
-
-<DT><B>-regexp</B> <I>string</I> </DT>
-<DD>Test each node using <I>string</I>
-as a regular expression pattern. </DD>
-
-<DT><B>-tag</B> <I>string</I> </DT>
-<DD>Only test nodes that have the
-tag <I>string</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>findchild</B> <I>node</I> <I>label</I> </DT>
-<DD>Searches for a child node Ilabel
-in <I>node</I>.  The id of the  child node is returned if found.  Otherwise <I>-1</I> is
-returned. </DD>
-
-<DT><I>treeName</I> <B>firstchild</B> <I>node</I>  </DT>
-<DD>Returns the id of the first child in
-the <I>node</I>'s list of subtrees.  If <I>node</I> is a leaf (has no children),  then
-<I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I> <B>get</B> <I>node</I> ?<I>key</I>? ?<I>defaultValue</I>? </DT>
-<DD>Returns a list of
-key-value pairs of data for the node.  If <I>key</I> is present, then onlyx the
-value for that particular data field is returned.  It's normally an error
-if <I>node</I> does not contain the data field <I>key</I>.  But if you provide a <I>defaultValue</I>
-argument, this value is returned instead (<I>node</I> will still not contain <I>key</I>).
- This feature can be used to access a data field of <I>node</I> without first
-testing if it exists.  This operation may trigger <B>read</B> data traces. </DD>
-
-<DT><I>treeName</I>
-<B>index</B> <I>node</I> </DT>
-<DD>Returns the id of <I>node</I>.  If <I>node</I> is a tag, it  can only specify
-one node.  If <I>node</I> does not represent a valid node id or tag, or has modifiers
-that are invalid, then <I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I> <B>insert</B> <I>parent</I> ?<I>switches</I>?
- </DT>
-<DD>Inserts a new node into parent node <I>parent</I>.   The id of the new node is
-returned. The following switches  are available: <blockquote></DD>
-
-<DT><B>-at</B> <I>number</I>  </DT>
-<DD>Inserts the
-node into <I>parent</I>'s list of children at  position <I>number</I>.  The default is
-to append <I>node</I>. </DD>
-
-<DT><B>-data</B> <I>dataList</I> </DT>
-<DD>Sets the value for each data field in <I>dataList</I>
-for the  new node. <I>DataList</I> is a list of key-value pairs. </DD>
-
-<DT><B>-label</B> <I>string</I>  </DT>
-<DD>Designates
-the labels of the node as <I>string</I>.  By default, nodes are labeled as <I>node0</I>,
-<I>node1</I>, etc. </DD>
-
-<DT><B>-tags</B> <I>tagList</I> </DT>
-<DD>Adds each tag in <I>tagList</I> to the new node. <I>TagList</I>
-is a list of tags, so be careful if a tag has embedded space. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>is</B>
-<I>property</I> <I>args</I>   </DT>
-<DD>Indicates the property of a node. Both <I>property</I> and <I>args</I>
-determine the property being tested.  Returns <I>1</I> if true and <I>0</I> otherwise.
- The following <I>property</I> and <I>args</I>  are valid: <blockquote></DD>
-
-<DT><B>ancestor</B> <I>node1</I> <I>node2</I> </DT>
-<DD>Indicates
-if <I>node1</I> is an ancestor of <I>node2</I>.  </DD>
-
-<DT><B>before</B> <I>node1</I> <I>node2</I> </DT>
-<DD>Indicates if <I>node1</I>
-is before <I>node2</I> in depth first traversal.  </DD>
-
-<DT><B>leaf</B> <I>node</I> </DT>
-<DD>Indicates if <I>node</I> is
-a leaf (it has no subtrees). </DD>
-
-<DT><B>root</B> <I>node</I> </DT>
-<DD>Indicates if <I>node</I> is the designated
-root.  This can be changed by the <B>root</B> operation. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>label</B> <I>node</I> ?<I>newLabel</I>?
-</DT>
-<DD>Returns the label of the node designated by <I>node</I>.  If <I>newLabel</I> is present,
-the node is relabeled using it as the new label. </DD>
-
-<DT><I>treeName</I> <B>lastchild</B> <I>node</I>
-</DT>
-<DD>Returns the id of the last child in the <I>node</I>'s list of subtrees.  If <I>node</I>
-is a leaf (has no children),  then <I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I> <B>move</B> <I>node</I> <I>newParent</I>
-?<I>switches</I>? </DT>
-<DD>Moves <I>node</I> into <I>newParent</I>. <I>Node</I> is appended to the list children
-of <I>newParent</I>.  <I>Node</I> can not be an ancestor of <I>newParent</I>.  The valid flags
-for <I>switches</I> are described below. <blockquote></DD>
-
-<DT><B>-after</B> <I>child</I>  </DT>
-<DD>Position <I>node</I> after <I>child</I>.
- The node <I>child</I> must be a  child of <I>newParent</I>. </DD>
-
-<DT><B>-at</B> <I>number</I>  </DT>
-<DD>Inserts <I>node</I> into
-<I>parent</I>'s list of children at  position <I>number</I>. The default is to append the
-node. </DD>
-
-<DT><B>-before</B> <I>child</I>  </DT>
-<DD>Position <I>node</I> before <I>child</I>.  The node <I>child</I> must be a
- child of <I>newParent</I>. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>next</B> <I>node</I> </DT>
-<DD>Returns the next node from <I>node</I>
-in a preorder traversal. If <I>node</I> is the last node in the tree,  then <I>-1</I> is
-returned. </DD>
-
-<DT><I>treeName</I> <B>nextsibling</B> <I>node</I> </DT>
-<DD>Returns the node representing the next
-subtree from <I>node</I> in its parent's list of children.  If <I>node</I> is the last
-child,  then <I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I> <B>notify</B> <I>args</I>  </DT>
-<DD>Manages notification events
-that indicate that the tree structure has  been changed. See the  <FONT SIZE=-1><B>NOTIFY
-OPERATIONS</B></FONT>
-  section below. </DD>
-
-<DT><I>treeName</I> <B>parent</B> <I>node</I> </DT>
-<DD>Returns the parent node
-of <I>node</I>.  If <I>node</I> is the root of the tree,  then <I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I>
-<B>path</B> <I>node</I> </DT>
-<DD>Returns the full path (from root) of <I>node</I>. </DD>
-
-<DT><I>treeName</I> <B>position</B> <I>node</I>
-</DT>
-<DD>Returns the position of the node in its parent's list of children. Positions
-are numbered from 0. The position of the root node is always 0. </DD>
-
-<DT><I>treeName</I>
-<B>previous</B> <I>node</I> </DT>
-<DD>Returns the previous node from <I>node</I> in a preorder traversal.
-If <I>node</I> is the root of the tree,  then <I>-1</I> is returned. </DD>
-
-<DT><I>treeName</I> <B>prevsibling</B>
-<I>node</I> </DT>
-<DD>Returns the node representing the previous subtree from <I>node</I> in its
-parent's list of children.  If <I>node</I> is the first child,  then <I>-1</I> is returned.
-</DD>
-
-<DT><I>treeName</I> <B>restore</B> <I>node</I> <I>dataString</I> <I>switches</I> </DT>
-<DD>Performs the inverse function
-of the <B>dump</B> operation, restoring nodes to the tree. The format of <I>dataString</I>
-is exactly what is  returned by the <B>dump</B> operation.  It's a list containing
-information for each node to be restored.  The information consists of 1)
-the relative path of the node, 2) a sublist of key value pairs representing
-the  node's data, and 3) a list of tags for the node.  Nodes are created
- starting from <I>node</I>. Nodes can be listed in any order.  If a node's  path
-describes ancestor nodes that do not already exist, they are  automatically
-created.  The valid <I>switches</I> are listed below: <blockquote></DD>
-
-<DT><B>-overwrite</B> </DT>
-<DD>Overwrite nodes
-that already exist.  Normally nodes are always created, even if there already
-exists a node by the same name.  This switch indicates to add or overwrite
-the node's data fields. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>restorefile</B> <I>node</I> <I>fileName</I> <I>switches</I> </DT>
-<DD>Performs
-the inverse function of the <B>dumpfile</B> operation, restoring nodes to the
-tree from the file <I>fileName</I>. The format of  <I>fileName</I> is exactly what is
-returned by the <B>dumpfile</B> operation.   It's a list containing information
-for each node to be restored.   The information consists of 1) the relative
-path of the node, 2)  a sublist of key value pairs representing the node's
-data, and 3)  a list of tags for the node.  Nodes are created  starting
-from <I>node</I>. Nodes can be listed in any order.  If a node's  path describes
-ancestor nodes that do not already exist, they are  automatically created.
- The valid <I>switches</I> are listed below: <blockquote></DD>
-
-<DT><B>-overwrite</B> </DT>
-<DD>Overwrite nodes that already
-exist.  Normally nodes are always created, even if there already exists
-a node by the same name.  This switch indicates to add or overwrite the
-node's data fields. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>root</B> ?<I>node</I>? </DT>
-<DD>Returns the id of the root node.
- Normally this is node <I>0</I>.  If a <I>node</I> argument is provided, it will become
-the new root of the tree. This lets you temporarily work within a subset
-of the tree. Changing root affects operations such as <B>next</B>, <B>path</B>, <B>previous</B>,
-etc. </DD>
-
-<DT><I>treeName</I> <B>set</B> <I>node</I> <I>key value</I> ?<I>key value</I>...? </DT>
-<DD>Sets one or more data fields
-in <I>node</I>. <I>Node</I> may  be a tag that represents several nodes.  <I>Key</I> is the name
-of the data field to be set and <I>value</I> is its respective value.  This operation
-may trigger <B>write</B> and <B>create</B> data traces. </DD>
-
-<DT><I>treeName</I> <B>size</B> <I>node</I> </DT>
-<DD>Returns the
-number of nodes in the subtree. This includes the node and all its descendants.
- The size of a leaf node is 1. </DD>
-
-<DT><I>treeName</I> <B>sort</B> <I>node</I> ?<I>switches</I>?  </DT>
-<DD><blockquote></DD>
-
-<DT><B>-ascii</B>  </DT>
-<DD>Compare
-strings using the ASCII  collation order. </DD>
-
-<DT><B>-command</B> <I>string</I> </DT>
-<DD>Use command <I>string</I>
-as a comparison command.  To compare two elements, evaluate a Tcl script
-consisting of command with the two elements appended as additional arguments.
- The script should return an integer less than, equal to, or greater than
-zero if the first element is to be considered less than, equal to, or greater
-than the second, respectively. </DD>
-
-<DT><B>-decreasing</B> </DT>
-<DD>Sort in decreasing order (largest
-items come first). </DD>
-
-<DT><B>-dictionary</B> </DT>
-<DD>Compare strings using a dictionary-style comparison.
- This is the same  as <B>-ascii</B> except (a) case is ignored except as a tie-breaker
-and (b)  if two strings contain embedded numbers, the numbers compare as
-integers, not characters.  For example, in <B>-dictionary</B> mode, bigBoy sorts
-between bigbang and bigboy, and x10y sorts between x9y and x11y. </DD>
-
-<DT><B>-integer</B>
-</DT>
-<DD>Compare the nodes as integers.   </DD>
-
-<DT><B>-key</B> <I>string</I> </DT>
-<DD>Sort based upon the node's data
-field keyed by <I>string</I>. Normally nodes are sorted according to their label.
- </DD>
-
-<DT><B>-path</B> </DT>
-<DD>Compare the full path of each node.  The default is to compare only
-its label. </DD>
-
-<DT><B>-real</B> </DT>
-<DD>Compare the nodes as real numbers. </DD>
-
-<DT><B>-recurse</B> </DT>
-<DD>Recursively sort
-the entire subtree rooted at <I>node</I>. </DD>
-
-<DT><B>-reorder</B>  </DT>
-<DD>Recursively sort subtrees for
-each node.  <B>Warning</B>.  Unlike the normal flat sort, where a list of nodes
-is returned, this will reorder the tree.   </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I> <B>tag</B> <I>args</I> </DT>
-<DD>Manages tags
-for the tree object. See the  <FONT SIZE=-1><B>TAG OPERATIONS</B></FONT>
-  section below. </DD>
-
-<DT><I>treeName</I> <B>trace</B>
-<I>args</I> </DT>
-<DD>Manages traces for data fields in the tree object. Traces cause Tcl
-commands to be executed whenever a data field of a node is created, read,
-written, or unset.  Traces can be set for a specific node or a tag, representing
-possibly many nodes. See the  <FONT SIZE=-1><B>TRACE OPERATIONS</B></FONT>
-  section below. </DD>
-
-<DT><I>treeName</I> <B>unset</B>
-<I>node</I> <I>key</I>... </DT>
-<DD>Removes one or more data fields from <I>node</I>. <I>Node</I> may  be a tag that
-represents several nodes.  <I>Key</I> is the name of the data field to be removed.
- It's not an error is <I>node</I> does not contain <I>key</I>.   This operation may trigger
-<B>unset</B> data traces. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect9" HREF="#toc9">Tag Operations</A></H2>
-Tags are a general means of selecting and
-marking nodes in the tree. A tag is just a string of characters, and it
-may take any form except that of an integer.  The same tag may be associated
-with many different nodes.   <P>
-There are two built-in tags: The tag <B>all</B> is
-implicitly associated with every node in the tree.  It may be used to invoke
-operations on all the nodes in the tree.  The tag <B>root</B> is managed automatically
-by the tree object.  It specifies the node that is currently set as the
-root of the tree. <P>
-Most tree operations use tags.  And several operations
-let you operate on multiple nodes at once.  For example, you can use the
-<B>set</B> operation with the tag <B>all</B> to set a data field in  for all nodes in
-the tree. <P>
-Tags are invoked by the <B>tag</B> operation.  The general form is <BR>
-<P>
-<CODE><I>treeName</I> <B>tag</B> <I>operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for tags are listed below. 
-<DL>
-
-<DT><I>treeName</I> <B>tag add</B> <I>string</I>
-<I>node</I>... </DT>
-<DD>Adds the tag <I>string</I> to one of more nodes. </DD>
-
-<DT><I>treeName</I> <B>tag delete</B> <I>string</I>
-<I>node</I>... </DT>
-<DD>Deletes the tag <I>string</I> from one or more nodes.   </DD>
-
-<DT><I>treeName</I> <B>tag forget</B>
-<I>string</I> </DT>
-<DD>Removes the tag <I>string</I> from all nodes.  It's not an error if no nodes
-are tagged as <I>string</I>. </DD>
-
-<DT><I>treeName</I> <B>tag names</B> ?<I>node</I>? </DT>
-<DD>Returns a list of tags used
-by the tree.  If a <I>node</I> argument is present, only those tags used by <I>node</I>
-are returned. </DD>
-
-<DT><I>treeName</I> <B>tag nodes</B> <I>string</I> </DT>
-<DD>Returns a list of nodes that have
-the tag <I>string</I>.  If no node is tagged as <I>string</I>, then an empty string is
-returned. </DD>
-</DL>
-
-<H2><A NAME="sect10" HREF="#toc10">Trace Operations</A></H2>
-Data fields can be traced much in the same way
-that you can trace Tcl variables.  Data traces cause Tcl commands to be
-executed whenever a particular data field of a node is created, read, written,
-or unset. A trace can apply to one or more nodes.  You can trace a specific
-node by using its id, or a group of nodes by a their tag. <P>
-The tree's <B>get</B>,
-<B>set</B>, and <B>unset</B> operations can  trigger various traces.  The <B>get</B> operation
-can cause  a <I>read</I>  trace to fire.  The <B>set</B> operation causes a <I>write</I>  trace
-to fire.  And if the data field is written for the first time, you will
-also get a <I>create</I> trace. The <B>unset</B> operation triggers <I>unset</I> traces. <P>
-Data
-traces are invoked by the <B>trace</B> operation.  The general form is <BR>
-<P>
-<CODE><I>treeName</I> <B>trace</B> <I>operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for traces are listed below. 
-<DL>
-
-<DT><I>treeName</I> <B>trace create</B>
-<I>node</I> <I>key</I> <I>ops</I> <I>command</I> </DT>
-<DD>Creates a trace for <I>node</I> on data field <I>key</I>.  <I>Node</I> can
-refer to more than one node (for example, the tag <B>all</B>). If <I>node</I> is a tag,
-any node with that tag can possibly trigger a trace, invoking <I>command</I>. 
- <I>Command</I> is command prefix, typically a procedure name. Whenever a trace
-is triggered, four arguments are appended to <I>command</I> before it is invoked:
-<I>treeName</I>, id of the node, <I>key</I> and, <I>ops</I>. Note that no nodes need have the
-field <I>key</I>.   A trace identifier in the form "<I>trace0</I>", "<I>trace1</I>", etc. is returned.
-  <P>
-<I>Ops</I> indicates which operations are of interest, and consists of one or
-more of the following letters: <blockquote></DD>
-
-<DT><B>r</B> </DT>
-<DD>Invoke <I>command</I> whenever <I>key</I> is read. Both
-read and write traces are temporarily disabled when <I>command</I> is executed.
-</DD>
-
-<DT><B>w</B> </DT>
-<DD>Invoke <I>command</I> whenever <I>key</I> is written.  Both read and write traces are
-temporarily disabled when <I>command</I> is executed. </DD>
-
-<DT><B>c</B> </DT>
-<DD>Invoke <I>command</I> whenever
-<I>key</I> is created. </DD>
-
-<DT><B>u</B>  </DT>
-<DD>Invoke <I>command</I> whenever <I>key</I> is unset.  Data fields are
-typically unset with the <B>unset</B> command.   Data fields are also  unset when
-the tree is released, but all traces are disabled prior to that. <P>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I>
-<B>trace delete</B> <I>traceId</I>... </DT>
-<DD>Deletes one of more traces.  <I>TraceId</I> is the trace identifier
-returned by the <B>trace create</B> operation. </DD>
-
-<DT><I>treeName</I> <B>trace info</B> <I>traceId</I>  </DT>
-<DD>Returns
-information about the trace <I>traceId</I>.  <I>TraceId</I> is a trace identifier previously
-returned by the <B>trace create</B> operation. It's the same information specified
-for the <B>trace create</B> operation. It consists of the node id or tag, data
-field key, a string of letters indicating the operations that are traced
-(it's in the same form as <I>ops</I>) and, the command prefix. </DD>
-
-<DT><I>treeName</I> <B>trace names</B>
-</DT>
-<DD>Returns a list of identifers for all the current traces. </DD>
-</DL>
-
-<H2><A NAME="sect11" HREF="#toc11">Notify Operations</A></H2>
-Tree
-objects can be shared among many clients, such as a <B>hiertable</B> widget.  Any
-client can create or delete nodes, sorting the tree, etc.  You can request
-to be notified whenever these events occur.  Notify events cause Tcl commands
-to be executed whenever the tree structure is changed.   <P>
-Notifications are
-handled by the <B>notify</B> operation.  The general form is <BR>
-<P>
-<CODE><I>treeName</I> <B>notify</B> <I>operation</I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for events are listed below. 
-<DL>
-
-<DT><I>treeName</I> <B>notify create</B>
-?<I>switches</I>? <I>command</I> ?<I>args</I>?...   </DT>
-<DD>Creates a notifier for the tree.  A notify identifier
-in the form "<I>notify0</I>", "<I>notify1</I>", etc.  is returned. <P>
-<I>Command</I> and <I>args</I> are
-saved and invoked whenever the tree structure is changed (according to
-<I>switches</I>). Two arguments are appended to <I>command</I> and <I>args</I> before it's invoked:
-the id of the node and a string representing the type of event that occured.
-One of more switches can be set to indicate the events that are of interest.
- The valid switches are as follows: <blockquote></DD>
-
-<DT><B>-create</B>  </DT>
-<DD>Invoke <I>command</I> whenever a new
-node has been added. </DD>
-
-<DT><B>-delete</B> </DT>
-<DD>Invoke <I>command</I> whenever a node has been deleted.
-</DD>
-
-<DT><B>-move</B> </DT>
-<DD>Invoke <I>command</I> whenever a node has been moved. </DD>
-
-<DT><B>-sort</B> </DT>
-<DD>Invoke <I>command</I>
-whenever the tree has been sorted and reordered. </DD>
-
-<DT><B>-relabel</B> </DT>
-<DD>Invoke <I>command</I>
-whenever a node has been relabeled. </DD>
-
-<DT><B>-allevents</B> </DT>
-<DD>Invoke <I>command</I> whenever any
-of the above events occur. </DD>
-
-<DT><B>-whenidle</B> </DT>
-<DD>When an event occurs don't invoke <I>command</I>
-immediately, but queue it to be run the next time the event loop is entered
-and there  are no events to process.  If subsequent events occur before
- the event loop is entered, <I>command</I> will still be  invoked only once. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>treeName</I>
-<B>notify delete</B> <I>notifyId</I>  </DT>
-<DD>Deletes one or more notifiers from the tree.  <I>NotifyId</I>
-is the notifier identifier returned by the <B>notify create</B> operation. </DD>
-
-<DT><I>treeName</I>
-<B>notify info</B> <I>notifyId</I> </DT>
-<DD>Returns information about the notify event <I>notifyId</I>.
- <I>NotifyId</I> is a notify identifier previously returned by the <B>notify create</B>
-operation. It's the same information specified for the <B>notify create</B> operation.
-It consists of the notify id, a sublist of event flags (it's in the same
-form as <I>flags</I>) and, the command prefix. </DD>
-
-<DT><I>treeName</I> <B>notify names</B> </DT>
-<DD>Returns a
-list of identifers for all the current notifiers. </DD>
-</DL>
-
-<H2><A NAME="sect12" HREF="#toc12">C Language API</A></H2>
-Blt_TreeApply,
- Blt_TreeApplyBFS,  Blt_TreeApplyDFS,  Blt_TreeChangeRoot,  Blt_TreeCreate,
- Blt_TreeCreateEventHandler,  Blt_TreeCreateNode,  Blt_TreeCreateTrace,
- Blt_TreeDeleteEventHandler,  Blt_TreeDeleteNode,  Blt_TreeDeleteTrace,
- Blt_TreeExists,  Blt_TreeFindChild,  Blt_TreeFirstChild,  Blt_TreeFirstKey,
- Blt_TreeGetNode,  Blt_TreeGetToken,  Blt_TreeGetValue,  Blt_TreeIsAncestor,
- Blt_TreeIsBefore,  Blt_TreeIsLeaf,  Blt_TreeLastChild,  Blt_TreeMoveNode,
- Blt_TreeName,  Blt_TreeNextKey,  Blt_TreeNextNode,  Blt_TreeNextSibling,
- Blt_TreeNodeDegree,  Blt_TreeNodeDepth,  Blt_TreeNodeId,  Blt_TreeNodeLabel,
- Blt_TreeNodeParent,  Blt_TreePrevNode,  Blt_TreePrevSibling,  Blt_TreeRelabelNode,
- Blt_TreeReleaseToken,  Blt_TreeRootNode,  Blt_TreeSetValue,  Blt_TreeSize,
- Blt_TreeSortNode, and Blt_TreeUnsetValue. 
-<H2><A NAME="sect13" HREF="#toc13">Keywords</A></H2>
-tree, hiertable, widget
-<P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Node IDs and Tags</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Node Modifiers</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Tree Operations</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Tag Operations</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Trace Operations</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Notify Operations</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">C Language API</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/treeview.html b/blt3.0/html/treeview.html
deleted file mode 100644
index 6db1969..0000000
--- a/blt3.0/html/treeview.html
+++ /dev/null
@@ -1,2336 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>treeview(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-treeview - Create and manipulate hierarchical
-table widgets 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>treeview</B> <I>pathName </I>?<I>options</I>? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>treeview</B>
-widget displays a tree of data.  It replaces both the <B>hiertable</B> and <B>hierbox</B>
-widgets.  The <B>treeview</B> is 100% syntax compatible with the <B>hiertable</B> widget.
- The <B>hiertable</B> command is retained for sake of script-level compatibility.
- This widget obsoletes the <B>hierbox</B> widget.  It does everything the old <B>hierbox</B>
-widget did, but also provides data sharing (via <I>tree data objects</I>) and
-the ability to tag nodes. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-The <B>treeview</B> widget displays hierarchical
-data.  Data is represented as nodes in a general-ordered tree.  Each node
-may have sub-nodes and these nodes can in turn has their own children. <P>
-A
-node is displayed as a row entry in the widget.  Each entry has a text label
-and icon.  When a node has children, its entry is drawn with a small button
-to the left of the label.  Clicking the mouse over this button opens or
-closes the node.  When a node is <I>open</I>, its children are exposed.  When it
-is <I>closed</I>, the children and their descedants are hidden.  The button is
-normally a <I>+</I> or <I>-</I> symbol (ala Windows Explorer), but can be replaced with
-a pair of Tk images (open and closed images). <P>
-If the node has data associated
-with it, they can be displayed in columns running vertically on either
-side the tree.  You can control the color, font, etc of each entry.  Any
-entry label or data field can be edited in-place. 
-<H2><A NAME="sect4" HREF="#toc4">Tree Data Object</A></H2>
-The tree
-is not stored inside the widget but in a tree data object (see the <B>tree</B>
-command for a further explanation).  Tree data objects can be shared among
-different clients, such as a <B>treeview</B> widget or the <B>tree</B> command.  You can
-walk the tree and manage its data with the <B>tree</B> command tree, while displaying
-it with the <B>treeview</B> widget.  Whenever the tree is updated, the <B>treeview</B>
-widget is automatically redrawn. <P>
-By default, the <B>treeview</B> widget creates
-its own tree object. The tree initially contains just a root node.  But you
-can also display trees created by the <B>tree</B> command using the <B>-tree</B> configuration
-option.  <B>Treeview</B> widgets can share the same tree object, possibly displaying
-different views of the same data. <P>
-A tree object has both a Tcl and C API.
- You can insert or delete nodes using <B>treeview</B> widget or <B>tree</B> command operations,
-but also from C code.  For example, you can load the tree from your C code
-while still managing and displaying the tree from Tcl. The widget is automatically
-notified whenever the tree is modified via C or Tcl. 
-<H2><A NAME="sect5" HREF="#toc5">Syntax</A></H2>
-<BR>
-<P>
-<CODE><B>treeview <I>pathName </I></B>?<I>option value</I>?...<BR>
-</CODE><P>The <B>treeview</B> command creates a new window <I>pathName</I> and makes it into a
-<B>treeview</B> widget.  At the time this command is invoked, there must not exist
-a window named <I>pathName</I>, but <I>pathName</I>'s parent must exist.  Additional options
-may be specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the <B>configure</B> operation
-below for the exact details about what <I>option</I> and <I>value</I> pairs are valid.
-<P>
-If successful, <B>treeview</B> returns the path name of the widget.  It also creates
-a new Tcl command by the same name.  You can use this command to invoke
-various operations that query or modify the widget. The general form is:
-<BR>
-<P>
-<CODE><I>pathName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available are described in the <FONT SIZE=-1><B>TREEVIEW OPERATIONS</B></FONT>
-  section.
-
-<H2><A NAME="sect6" HREF="#toc6">IDs and Tags</A></H2>
-Nodes can be inserted into a tree using the <B>treeview</B> widget
- <BR>
-<CODE>blt::treeview .t<BR>
-set node [.t insert end root "one"]<BR>
-</CODE><P>or <B>tree</B> command.  <BR>
-<CODE>set tree [blt::tree create]<BR>
-set node [$tree insert root "one"]<BR>
-</CODE><P>In both cases, a number identifying the node is returned (the value of
-<I>$node</I>).  This serial number or <I>id</I> uniquely identifies the node.  Please note
-that you can't infer a location or position of a node from its id.  The only
-exception is that the root node is always id <I>0</I>. Since nodes may have the
-same labels or be moved within the tree, ids provide an convenient way
-to identify nodes.  If a tree is shared, the ids will be the same regardless
-if you are using by the <B>treeview</B> widget or the <B>tree</B> command.  Ids are recycled
-when the node deleted. <P>
-A node may also have any number of <I>tags</I> associated
-with it.  A tag is just a string of characters, and it may take any form
-except that of an integer.  For example, "<I>x123</I>" is valid, but "<I>123</I>" isn't.
- The same tag may be associated with many different nodes.  This is typically
-done to associate a group of nodes.  Many operations in the <B>treeview</B> widget
-take either node ids or tag names as arguments.  Using a tag says to apply
-the operation to all nodes with that tag. <P>
-The tag <B>all</B> is implicitly associated
-with every node in the tree.  It may be used to invoke operations on all
-the nodes in the tree.  <P>
-Tags may be shared, just like trees, between clients.
- For example, you can use the tags created by the <B>tree</B> command with <B>treeview</B>
-widgets. 
-<H2><A NAME="sect7" HREF="#toc7">Special Node IDs</A></H2>
-There are also several special non-numeric ids. 
-Special ids differ from tags in that they are always translated to their
-numeric equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to the
-<B>treeview</B> widget. 
-<DL>
-
-<DT><B>active</B> </DT>
-<DD>The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon  (see the <B>-activeicon</B>
-option). The <B>active</B> id is changed automatically by moving the mouse pointer
-over another node or by using the <B>entry activate</B> operation. Note that there
-can be only one active node at a time. </DD>
-
-<DT><B>anchor</B> </DT>
-<DD>The node representing the
-fixed end of the current selection.   The anchor is set by the <B>selection
-anchor</B> operation. </DD>
-
-<DT><B>current</B> </DT>
-<DD>The node where the mouse pointer is currently
-located. But unlike <B>active</B>, this id changes while the selection is dragged.
- It is used to determine the current node during button drags. </DD>
-
-<DT><B>down</B> </DT>
-<DD>The
-next open node from the current focus. The <B>down</B> of the last open node is
-the same. </DD>
-
-<DT><B>end</B> </DT>
-<DD>The last open node (in depth-first order) on the tree.   </DD>
-
-<DT><B>focus</B>
-</DT>
-<DD>The node that currently has focus.  When a node has focus, it receives key
-events.  To indicate focus, the node is drawn with a dotted line around
-its label.  You can change the  focus using the <B>focus</B> operation. </DD>
-
-<DT><B>last</B> </DT>
-<DD>The
-last open node from the current focus. But unlike <B>up</B>, when the focus is
-at root, <B>last</B> wraps around to the last open node in the tree. </DD>
-
-<DT><B>mark</B> </DT>
-<DD>The node
-representing the non-fixed end of the current selection.   The mark is set
-by the <B>selection mark</B> operation. </DD>
-
-<DT><B>next</B> </DT>
-<DD>The next open node from the current
-focus.  But unlike <B>down</B>, when the focus is on last open node, <B>next</B> wraps
-around to the  root node. </DD>
-
-<DT><B>nextsibling</B> </DT>
-<DD>The next sibling from the node with
-the current focus.  If the node is already the last sibling then it is the
-<B>nextsibling<B>. </DD>
-
-<DT><B>parent</B></B></B> </DT>
-<DD>The parent of the node with the current focus. The <B>parent</B>
-of the root is also the root. </DD>
-
-<DT><B>prevsibling</B> </DT>
-<DD>The previous sibling from the
-node with the current focus.  If the node is already the first sibling then
-it is the <B>prevsibling<B>. </DD>
-
-<DT><B>root</B></B></B> </DT>
-<DD>The root node. You can also use id <I>0</I> to indicate
-the root. </DD>
-
-<DT><B>up</B> </DT>
-<DD>The last open node (in depth-first order) from the current focus.
-The <B>up</B> of the root node (i.e. the root has focus) is also the root. </DD>
-
-<DT><B>view.top</B>
-</DT>
-<DD>First node that's current visible in the widget. </DD>
-
-<DT><B>view.bottom</B> </DT>
-<DD>Last node that's
-current visible in the widget. </DD>
-
-<DT><I>path</I>  </DT>
-<DD>Absolute path of a node.  Path names
-refer to the node name, not their entry labels. Paths don't have to start
-with a separator (see the <B>-separator</B> configuration option), but component
-names must be separated by the designated separator. </DD>
-
-<DT><B>@<I>x<B>,<I>y</I></B></I></B> </DT>
-<DD>Indicates the
-node that covers the point in the treeview window specified by <I>x</I> and <I>y</I>
-(in pixel coordinates).  If no part of the entryd covers that point, then
-the closest node to that point is used. </DD>
-</DL>
-<P>
-A node may be specified as an id
-or tag. If the specifier is an integer then it is assumed to refer to the
-single node with that id. If the specifier is not an integer, it's checked
-to see if it's a special id (such as focus).  Otherwise, it's assumed to be
-tag.  Some operations only operate on a single node at a time; if a tag
-refers to more than one node, then an error is generated. 
-<H2><A NAME="sect8" HREF="#toc8">Data Fields</A></H2>
-A node
-in the tree can have <I>data fields</I>.  A data field is a name-value pair, used
-to represent arbitrary data in the node.  Nodes can contain different fields
-(they aren't required to contain the same fields).  You can optionally display
-these fields in the <B>treeview</B> widget in columns running on either side of
-the displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a specific
-field is left blank.  Columns can be interactively resized, hidden, or,
-moved. 
-<H2><A NAME="sect9" HREF="#toc9">Entry Bindings</A></H2>
-You can bind Tcl commands to be invoked when events
-occur on nodes (much like Tk canvas items).  You can bind a node using its
-id or its <I>bindtags</I>.  Bindtags are simply names that associate a binding
-with one or more nodes.  There is a built-in tag <I>all</I> that all node entries
-automatically have. 
-<H2><A NAME="sect10" HREF="#toc10">Treeview Operations</A></H2>
-The <B>treeview</B> operations are the invoked
-by specifying the widget's pathname, the operation, and any arguments that
-pertain  to that operation.  The general form is: <P>
-<BR>
-<CODE><I>pathName operation </I>?<I>arg arg ...</I>?<BR>
-<P>
-</CODE><P><I>Operation</I> and the <I>arg</I>s determine the exact behavior of the command.  The
-following operation are available for <B>treeview</B> widgets: 
-<DL>
-
-<DT><I>pathName <B>bbox</B></I> ?<B>-screen</B>?
-<I>tagOrId...</I> </DT>
-<DD>Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more <I>tagOrId</I>  arguments.
-  If the <B>-screen</B> flag is given, then the x-y coordinates of the bounding
-box are returned as screen coordinates, not  virtual coordinates. Virtual
-coordinates start from <I>0</I> from the root node. The returned list contains
-the following values. <blockquote></DD>
-
-<DT><I>x</I>  </DT>
-<DD>X-coordinate of the upper-left corner of the bounding
-box. </DD>
-
-<DT><I>y</I> </DT>
-<DD>Y-coordinate of the upper-left corner of the bounding box. </DD>
-
-<DT><I>width</I> </DT>
-<DD>Width
-of the bounding box. </DD>
-
-<DT><I>height</I> </DT>
-<DD>Height of the bounding box. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for a node with this tag, <I>command</I>
-will be invoked.  The syntax is similar to the  <B>bind</B> command except that
-it operates on <B>treeview</B> entries,  rather than widgets. See the <B>bind</B> manual
-entry for complete details on <I>sequence</I> and the substitutions performed
-on  <I>command</I> before invoking it.   <P>
-If all arguments are specified then a
-new binding is created, replacing  any existing binding for the same <I>sequence</I>
-and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>  augments
-an existing binding rather than replacing it.  If no <I>command</I> argument is
-provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button <I>operation</I></B></I> ?<I>args</I>?
-</DT>
-<DD>This command is used to control the button selectors within a  <B>treeview</B>
-widget.   It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>button
-activate</B></I> <I>tagOrId</I> </DT>
-<DD>Designates the node given by <I>tagOrId</I> as active.   When
-a node is active it's entry is drawn using its active icon  (see the <B>-activeicon</B>
-option).  Note that there can be only one active entry at a time. The special
-id <B>active</B> indicates the currently active node. </DD>
-
-<DT><I>pathName <B>button bind</B></I> <I>tagName</I>
-?<I>sequence command</I>? </DT>
-<DD>Associates <I>command</I> with <I>tagName</I> such that whenever the
-event sequence given by <I>sequence</I> occurs for an button of a node entry with
-this tag, <I>command</I> will be invoked.  The syntax is similar to the <B>bind</B> command
-except that it operates on <B>treeview</B> buttons, rather than widgets. See the
-<B>bind</B> manual entry for complete details on <I>sequence</I> and the substitutions
-performed on <I>command</I> before invoking it. <P>
-If all arguments are specified
-then a new binding is created, replacing  any existing binding for the
-same <I>sequence</I> and <I>tagName</I>. If the first character of <I>command</I> is <I>+</I> then <I>command</I>
- augments an existing binding rather than replacing it.  If no <I>command</I> argument
-is provided then the command currently associated with <I>tagName</I> and <I>sequence</I>
-(it's an error occurs  if there's no such binding) is returned.  If both <I>command</I>
-and  <I>sequence</I> are missing then a list of all the event sequences for  which
-bindings have been defined for <I>tagName</I>.  </DD>
-
-<DT><I>pathName <B>button cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>button configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the configuration options of the widget. If no <I>option</I> is specified, returns
-a list describing all of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B>
-for information on the format of this list).  If <I>option</I> is specified with
-no <I>value</I>, then the command returns a list describing the one named option
-(this list will be identical to the corresponding sublist of the value
-returned if no <I>option</I> is specified).  If one or more <I>option-value</I> pairs are
-specified, then the command modifies the given widget option(s) to have
-the given value(s);  in this case the command returns an empty string. <I>Option</I>
-and <I>value</I> are described in the section  <FONT SIZE=-1><B>BUTTON OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value of the configuration option given
-by <I>option</I>. <I>Option</I> may have any of the values accepted by the <B>configure</B> operation
-described below. </DD>
-
-<DT><I>pathName <B>close </B></I>?<B>-recurse</B>? <I>tagOrId...</I> </DT>
-<DD>Closes the node specified
-by <I>tagOrId</I>.  In addition, if a Tcl script was specified by the <B>-closecommand</B>
-option, it is invoked.  If the node is already closed, this command has
-no effect. If the <B>-recurse</B> flag is present, each child node is recursively
-closed. </DD>
-
-<DT><I>pathName <B>column <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are available
-for treeview columns. <blockquote></DD>
-
-<DT><I>pathName <B>column activate</B></I> <I>column</I> </DT>
-<DD>Sets the active column
-to <I>column</I>.  <I>Column</I> is the name of a column in the widget. When a column is
-active, it's drawn using its <B>-activetitlebackground</B> and <B>-activetitleforeground</B>
-options.  If <I>column</I> is the <I>""</I>, then no column will be active.  If no column
-argument is provided, then the name of the currently active column is returned.
-</DD>
-
-<DT><I>pathName <B>column cget</B></I> <I>name</I> <I>option</I> </DT>
-<DD>Returns the current value of the column
-configuration option given by <I>option</I> for <I>name</I>.  <I>Name</I> is the name of column
-that corresponds to a data field. <I>Option</I> may have any of the values accepted
-by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>column configure</B></I> <I>name</I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the column designated by <I>name</I>. <I>Name</I> is the name of the column corresponding
-to a data field. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>COLUMN OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>column delete</B></I> <I>field</I>
-?<I>field</I>...? </DT>
-<DD>Deletes one of more columns designated by <I>field</I>.  Note that this
-does not delete the data fields themselves. </DD>
-
-<DT><I>pathName <B>column insert</B></I> <I>position</I>
-<I>field</I> ?<I>options</I>...? </DT>
-<DD>Inserts one of more columns designated by <I>field</I>.  A column
-displays each node's data field by the same name.  If the node doesn't have
-the given field, the cell is left blank. <I>Position</I> indicates where in the
-list of columns to add the new column.  It may be either a number or <I>end</I>.
- </DD>
-
-<DT><I>pathName <B>column invoke</B></I> <I>field</I> </DT>
-<DD>Invokes the Tcl command associated with the
-column <I>field</I>,  if there is one (using the column's <B>-command</B> option).   The
-command is ignored if the column's <B>-state</B> option  set to <I>disabled</I>. </DD>
-
-<DT><I>pathName
-<B>column move <I>name</I></B></I> <I>dest</I>  </DT>
-<DD>Moves the column <I>name</I> to the destination position.
-  <I>Dest</I> is the name of another column or a screen position in the form <I>@<I>x<I>,<I>y</I></I></I></I>.
-</DD>
-
-<DT><I>pathName <B>column names</B></I> </DT>
-<DD>Returns a list of the names of all columns in the
-widget. The list is ordered as the columns are drawn from left-to-right. </DD>
-
-<DT><I>pathName
-<B>column nearest</B></I> <I>x</I> ?<I>y</I>? </DT>
-<DD>Returns the name of the column closest to the given
-X-Y screen coordinate.  If you provide a <I>y</I> argument (it's optional), a name
-is returned only when if the point is over a column's title. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>configure</B></I>
-?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options
-of the widget. If no <I>option</I> is specified, returns a list describing all
-of the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information
-on the format of this list).  If <I>option</I> is specified with no <I>value</I>, then
-the command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described in the section <FONT SIZE=-1><B>TREEVIEW OPTIONS</B></FONT>
-  below. </DD>
-
-<DT><I>pathName <B>curselection</B></I>
-</DT>
-<DD>Returns a list containing the ids of all of the entries that are  currently
-selected. If there are no entries selected, then the empty string is returned.
-</DD>
-
-<DT><I>pathName <B>delete <I>tagOrId</I></B></I>... </DT>
-<DD>Deletes one or more entries given by <I>tagOrId</I> and
-its children. </DD>
-
-<DT><I>pathName <B>entry <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>The following operations are
-available for treeview entries. <blockquote></DD>
-
-<DT><I>pathName <B>entry activate</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the
-active entry to the one specified by <I>tagOrId</I>.   When an entry is active
-it is drawn using its active icon  (see the <B>-activeicon</B> option).  Note that
-there can be only one active node at a time. The special id of the currently
-active node is <B>active</B>. </DD>
-
-<DT><I>pathName <B>entry cget</B></I> <I>option</I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>entry
-children</B></I> <I>tagOrId</I>  ?<I>first</I>? ?<I>last</I>? </DT>
-<DD>Returns a list of ids for the given range
-of children of <I>tagOrId</I>.   <I>TagOrId</I> is the id or tag of the node to be examined.
-If only a <I>first</I> argument is present, then the id  of the that child at
-that numeric position is returned.  If both <I>first</I>  and <I>last</I> arguments are
-given, then the ids of all the children in that range are returned.  Otherwise
-the ids of all children are returned.   </DD>
-
-<DT><I>pathName <B>entry configure</B></I> ?<I>option</I>?
-?<I>value option value ...</I>? </DT>
-<DD>Query or modify the configuration options of the
-widget. If no <I>option</I> is specified, returns a list describing all of the
-available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for information on
-the format of this list).  If <I>option</I> is specified with no <I>value</I>, then the
-command returns a list describing the one named option (this list will
-be identical to the corresponding sublist of the value returned if no <I>option</I>
-is specified).  If one or more <I>option-value</I> pairs are specified, then the
-command modifies the given widget option(s) to have the given value(s);
- in this case the command returns an empty string. <I>Option</I> and <I>value</I> are
-described below: </DD>
-
-<DT><I>pathName <B>entry delete</B></I> <I>tagOrId</I> ?<I>first</I> ?<I>last</I>? </DT>
-<DD>Deletes the
-one or more children nodes of the parent <I>tagOrId</I>. If <I>first</I> and <I>last</I> arguments
-are present, they are positions designating a range of children nodes to
-be deleted. </DD>
-
-<DT><I>pathName <B>entry isbefore <I>tagOrId1</I></B></I> <I>tagOrId2</I> </DT>
-<DD>Returns 1 if <I>tagOrId1</I>
-is before <I>tagOrId2</I> and 0 otherwise. </DD>
-
-<DT><I>pathName <B>entry ishidden <I>tagOrId</I></B></I> </DT>
-<DD>Returns
-1 if the node is currently hidden and 0 otherwise.  A node is also hidden
-if any of its ancestor nodes are closed or hidden. </DD>
-
-<DT><I>pathName <B>entry isopen
-<I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the node is currently open and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>entry size</B></I> <B>-recurse</B> <I>tagOrId</I> </DT>
-<DD>Returns the number of children for parent node
-<I>tagOrId</I>.   If the <B>-recurse</B> flag is set, the number of all  its descendants
-is returned.  The node itself is not counted. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>find </B></I>?<I>flags</I>? <I>first</I>
-<I>last</I> </DT>
-<DD>Finds for all entries matching the criteria given by <I>flags</I>.  A list
-of ids for all matching nodes is returned. <I>First</I> and <I>last</I> are ids designating
-the range of the search in depth-first order. If <I>last</I> is before <I>first</I>, then
-nodes are searched in reverse order.  The valid flags are: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B>
-</DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern
-to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match
-against the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Patterns must match
-exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching
-is done in a fashion similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical except that the  following
- special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of
- characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character
-in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a
-sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I>
-and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This
-provides a way of  avoiding  the  special interpretation of the characters
-<I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern matching (i.e.
-the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Pick entries
-that don't match.   </DD>
-
-<DT><B>-exec<I> string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked for
-each matching node. Percent substitutions are performed on <I>string</I> before
- it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-count<I> number</I></B> </DT>
-<DD>Stop
-searching after <I>number</I> matches. </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>focus
-</B></I> <I>tagOrId</I> </DT>
-<DD>Sets the focus to the node given by <I>tagOrId</I>.  When a node has focus,
-it can receive keyboard events.    The special id <B>focus</B> designates the node
-that currently has focus. </DD>
-
-<DT><I>pathName <B>get </B></I>?<B>-full</B>? <I>tagOrId</I> <I>tagOrId</I>... </DT>
-<DD>Translates
-one or more ids to their node entry names.  It returns a list of  names
-for all the ids specified.  If the <B>-full</B> flag is set, then the full pathnames
-are returned. </DD>
-
-<DT><I>pathName <B>hide </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Hides all nodes matching the
-criteria given by <I>flags</I>.  The search is performed recursively for each node
-given by <I>tagOrId</I>. The valid flags are described below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies
-pattern to match against node names. </DD>
-
-<DT><B>-full<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match
-against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B> </DT>
-<DD>Specifies pattern to match against
-the node entry's configuration option. </DD>
-
-<DT><B>-exact</B> </DT>
-<DD>Match patterns exactly.  The
-is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD>Use global pattern matching.  Matching is done in a
-fashion similar to that used by the C-shell.  For  the  two strings  to match,
-their contents must be identical except that the  following  special  sequences
- may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches  any  sequence  of  characters in string,
-including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I>
-</DT>
-<DD>Matches any character in the set given by <I>chars</I>. If a sequence of the form
-<I>x</I>-<I>y</I> appears in <I>chars</I>, then any character between  <I>x</I> and <I>y</I>, inclusive, will
-match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single  character  <I>x</I>.  This provides a way of  avoiding
- the  special interpretation of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B>
-</DT>
-<DD>Use regular expression pattern matching (i.e. the same as implemented by
-the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B> </DT>
-<DD>Hide nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates
-the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>index </B></I>?<B>-at</B> <I>tagOrId</I>? <I>string</I>  </DT>
-<DD>Returns the id of
-the node specified by <I>string</I>.  <I>String</I> may be a tag or node id. Some special
-ids are normally relative to the node that  has focus.  The <B>-at</B> flag lets
-you select another node. </DD>
-
-<DT><I>pathName <B>insert </B></I>?<B>-at <I>tagOrId</I></B>? <I>position</I> <I>path</I> ?<I>options...</I>?
-?<I>path</I>? ?<I>options...</I>?  </DT>
-<DD>Inserts one or more nodes at <I>position</I>.  <I>Position</I> is the
-location (number or <I>end</I>) where the new nodes are added to the parent node.
- <I>Path</I> is the pathname of the new node. Pathnames can be formated either
-as a Tcl list (each element is a path component) or as a string separated
-by a special character sequence (using the <B>-separator</B> option).  Pathnames
-are normally absolute, but the <B>-at</B> switch lets you select a relative starting
-point.  Its value is the id of the starting node.   <P>
-All ancestors of the
-new node must already exist, unless the <B>-autocreate</B> option is set.  It is
-also an error if a node already exists, unless the <B>-allowduplicates</B> option
-is set. <P>
-<I>Option</I> and <I>value</I> may have any of the values accepted by the  <B>entry
-configure</B> operation described in the <FONT SIZE=-1><B>ENTRY OPERATIONS</B></FONT>
-  section below.  This
-command returns a list of the ids of the new entries. </DD>
-
-<DT><I>pathName <B>move <I>tagOrId</I></B></I>
-<I>how</I> <I>destId</I> </DT>
-<DD>Moves the node given by <I>tagOrId</I> to the destination node.  The
-node can not be an ancestor of the destination.  <I>DestId</I> is the id of the
-destination node and can not be the root of the tree.  In conjunction with
-<I>how</I>, it describes how the move is performed. <blockquote></DD>
-
-<DT><I>before</I> </DT>
-<DD>Moves the node before
-the destination node. </DD>
-
-<DT><I>after</I> </DT>
-<DD>Moves the node after the destination node. </DD>
-
-<DT><I>into</I>
-</DT>
-<DD>Moves the node to the end of the destination's list of children. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>nearest <I>x y</I></B></I> ?<I>varName</I>? </DT>
-<DD>Returns the id of the node entry closest to the given
-X-Y screen coordinate.  The optional argument <I>varName</I> is the name of variable
-which is set to either <I>button</I> or <I>select</I> to indicate over what part of the
-node the coordinate lies.   If the coordinate is not directly over any node,
-then <I>varName</I> will contain the empty string. </DD>
-
-<DT><I>pathName <B>open </B></I>?<B>-recurse</B>? <I>tagOrId...</I>
-</DT>
-<DD>Opens the one or more nodes specified by <I>tagOrId</I>.   If a node is not already
-open, the Tcl script specified by the  <B>-opencommand</B> option is invoked. If
-the <B>-recurse</B> flag  is present, then each descendant is recursively opened.
-  </DD>
-
-<DT><I>pathName <B>range</B></I> ?<B>-open</B>? <I>first last</I> </DT>
-<DD>Returns the ids in depth-first order
-of the nodes between the <I>first</I> and <I>last</I> ids.  If the <B>-open</B> flag is present,
-it indicates to consider only open nodes. If <I>last</I> is before <I>first</I>, then
-the ids are returned in reverse order. </DD>
-
-<DT><I>pathName <B>scan</B></I> <I>option args</I> </DT>
-<DD>This command
-implements scanning.  It has two forms, depending on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>scan
-mark <I>x y</I></B></I> </DT>
-<DD>Records <I>x</I> and <I>y</I> and the current view in the treeview window; 
-used in conjunction with later <B>scan dragto</B> commands. Typically this command
-is associated with a mouse button press in the widget.  It returns an empty
-string. </DD>
-
-<DT><I>pathName <B>scan dragto <I>x y</I></B></I>. </DT>
-<DD>Computes the difference between its <I>x</I> and
-<I>y</I> arguments and the <I>x</I> and <I>y</I> arguments to the last <B>scan mark</B> command for
-the widget. It then adjusts the view by 10 times the difference in coordinates.
- This command is typically associated with mouse motion events in the widget,
-to produce the effect of dragging the list at high speed through the window.
- The return value is an empty string. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>see</B></I> ?<B>-anchor <I>anchor</I></B>? <I>tagOrId</I>
-</DT>
-<DD>Adjusts the view of entries so that the node given by <I>tagOrId</I> is visible
-in the widget window.  It is an error if <B>tagOrId</B> is a tag that refers to
-more than one node.  By default the node's entry is displayed in the middle
-of the window.  This can changed using the <B>-anchor</B> flag.  Its value is a Tk
-anchor position. </DD>
-
-<DT><I>pathName <B>selection <I>option arg</I></B></I> </DT>
-<DD>This command is used to adjust
-the selection within a <B>treeview</B> widget.  It has several forms, depending
-on <I>option</I>: <blockquote></DD>
-
-<DT><I>pathName <B>selection anchor <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection anchor
-to the node given by <I>tagOrId</I>. If <I>tagOrId</I> refers to a non-existent node, then
-the closest node is used. The selection anchor is the end of the selection
-that is fixed while dragging out a selection with the mouse. The special
-id <B>anchor</B> may be used to refer to the anchor node. </DD>
-
-<DT><I>pathName <B>selection cancel</B></I>
-</DT>
-<DD>Clears the temporary selection of entries back to the current anchor.  Temporary
-selections are created by  the <B>selection mark</B> operation. </DD>
-
-<DT><I>pathName <B>selection
-clear <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Removes the entries between <I>first</I> and <I>last</I> (inclusive)
-from the selection.  Both <I>first</I> and  <I>last</I> are ids representing a range of
-entries. If <I>last</I> isn't given, then only <I>first</I> is deselected. Entries outside
-the selection are not affected. </DD>
-
-<DT><I>pathName <B>selection clearall</B></I> </DT>
-<DD>Clears the entire
-selection.   </DD>
-
-<DT><I>pathName <B>selection mark <I>tagOrId</I></B></I> </DT>
-<DD>Sets the selection mark to
-the node given by <I>tagOrId</I>.  This causes the range of entries between the
-anchor and the mark to be temporarily added to the selection.  The selection
-mark is the end of the selection that is fixed while dragging out a selection
-with the mouse.  The special id <B>mark</B> may be used to refer to the current
- mark node. If <I>tagOrId</I> refers to a non-existent node, then the mark is ignored.
-Resetting the mark will unselect the previous range.  Setting the anchor
-finalizes the range. </DD>
-
-<DT><I>pathName <B>selection includes <I>tagOrId</I></B></I> </DT>
-<DD>Returns 1 if the
-node given by <I>tagOrId</I> is currently selected, 0 if it isn't. </DD>
-
-<DT><I>pathName <B>selection
-present</B></I> </DT>
-<DD>Returns 1 if any nodes are currently selected and 0 otherwise. </DD>
-
-<DT><I>pathName
-<B>selection set <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects all of the nodes in the range between
-<I>first</I> and <I>last</I>, inclusive, without affecting the selection state of nodes
-outside that range. </DD>
-
-<DT><I>pathName <B>selection toggle <I>first </I></B></I>?<I>last</I>? </DT>
-<DD>Selects/deselects
-nodes in the range between <I>first</I> and <I>last</I>, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and visa versa.
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>show </B></I>?<B>flags</B>? <I>tagOrId</I>... </DT>
-<DD>Exposes all nodes matching the criteria given
-by <I>flags</I>.  This is the inverse of the <B>hide</B> operation.  The search is performed
-recursively for each node given by <I>tagOrId</I>.  The valid flags are described
-below: <blockquote></DD>
-
-<DT><B>-name<I> pattern</I></B> </DT>
-<DD>Specifies pattern to match against node names. </DD>
-
-<DT><B>-full<I>
-pattern</I></B> </DT>
-<DD>Specifies pattern to match against node pathnames. </DD>
-
-<DT><B>-<I>option<I> pattern</I></I></B>
-</DT>
-<DD>Specifies pattern to match against the entry's configuration option. </DD>
-
-<DT><B>-exact</B>
-</DT>
-<DD>Match patterns exactly.  The is the default. </DD>
-
-<DT><B>-glob</B> </DT>
-<DD><B>-glob</B> Use global pattern
-matching.  Matching is done in a fashion similar to that used by the C-shell.
- For  the  two strings  to match, their contents must be identical except
-that the  following  special  sequences  may appear in pattern: <blockquote></DD>
-
-<DT><I>*</I> </DT>
-<DD>Matches
- any  sequence  of  characters in string, including a null string. </DD>
-
-<DT><I>?</I> </DT>
-<DD>Matches
-any single character in string. </DD>
-
-<DT><I>[<I>chars<I>]</I></I></I> </DT>
-<DD>Matches any character in the set
-given by <I>chars</I>. If a sequence of the form <I>x</I>-<I>y</I> appears in <I>chars</I>, then any
-character between  <I>x</I> and <I>y</I>, inclusive, will match. </DD>
-
-<DT><I>\<I>x</I></I> </DT>
-<DD>Matches  the  single
- character  <I>x</I>.  This provides a way of  avoiding  the  special interpretation
-of the characters <I>*?[]\</I> in the pattern. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-regexp</B> </DT>
-<DD>Use regular expression pattern
-matching (i.e. the same as implemented by the <B>regexp</B> command).   </DD>
-
-<DT><B>-nonmatching</B>
-</DT>
-<DD>Expose nodes that don't match.   </DD>
-
-<DT><B>--</B> </DT>
-<DD>Indicates the end of flags. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort</B></I>
-?<I>operation</I>? <I>args...</I> </DT>
-<DD><blockquote></DD>
-
-<DT><I>pathName <B>sort auto</B></I> ?<I>boolean</I> </DT>
-<DD>Turns on/off automatic sorting
-of node entries.  If <I>boolean</I> is true, entries will be automatically sorted
-as they are opened, closed, inserted, or deleted.  If no <I>boolean</I> argument
-is provided, the current state is returned. </DD>
-
-<DT><I>pathName <B>sort cget</B></I> <I>option</I> </DT>
-<DD>Returns
-the current value of the configuration option given by <I>option</I>. <I>Option</I> may
-have any of the values accepted by the <B>configure</B> operation described below.
-</DD>
-
-<DT><I>pathName <B>sort configure</B></I> ?<I>option</I>? ?<I>value option value ...</I>? </DT>
-<DD>Query or modify
-the sorting configuration options of the widget. If no <I>option</I> is specified,
-returns a list describing all of the available options for <I>pathName</I> (see
-<B>Tk_ConfigureInfo</B> for information on the format of this list).  If <I>option</I>
-is specified with no <I>value</I>, then the command returns a list describing
-the one named option (this list will be identical to the corresponding
-sublist of the value returned if no <I>option</I> is specified).  If one or more
-<I>option-value</I> pairs are specified, then the command modifies the given sorting
-option(s) to have the given value(s);  in this case the command returns
-an empty string. <I>Option</I> and <I>value</I> are described below: <blockquote></DD>
-
-<DT><B>-column<I> string</I></B> </DT>
-<DD>Specifies
-the column to sort. Entries in the widget are rearranged according to this
-column.  If <I>column</I> is <I>""</I> then no sort is performed. </DD>
-
-<DT><B>-command<I> string</I></B> </DT>
-<DD>Specifies
-a Tcl procedure to be called when sorting nodes.  The procedure is called
-with three arguments: the pathname of the widget and the fields of two
-entries.  The procedure returns 1 if the first node is greater than the
-second, -1 is the second is greater, and 0 if equal.   </DD>
-
-<DT><B>-decreasing<I> boolean</I></B>
-</DT>
-<DD>Indicates to sort in ascending/descending order.  If <I>boolean</I>  is true, then
-the entries as in descending order. The default is  <I>no</I>. </DD>
-
-<DT><B>-mode<I> string</I></B> </DT>
-<DD>Specifies
-how to compare entries when sorting. <I>String</I> may be one of the following:
-<blockquote></DD>
-
-<DT><I>ascii</I> </DT>
-<DD>Use string comparison based upon the ASCII collation order. </DD>
-
-<DT><I>dictionary</I>
- </DT>
-<DD>Use dictionary-style comparison.  This is the same as <I>ascii</I> except (a) case
-is ignored except as a tie-breaker and (b) if two strings contain embedded
-numbers, the numbers compare as integers, not characters.  For example,
-"bigBoy" sorts between "bigbang" and "bigboy", and "x10y" sorts between
-"x9y" and "x11y". </DD>
-
-<DT><I>integer</I> </DT>
-<DD>Compares fields as integers. </DD>
-
-<DT><I>real</I> </DT>
-<DD>Compares fields
-as floating point numbers. </DD>
-
-<DT><I>command</I> </DT>
-<DD>Use the Tcl proc specified by the <B>-command</B>
-option to compare entries  when sorting.   If no command is specified, the
-sort reverts to  <I>ascii</I> sorting. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>sort once</B></I> ?<I>flags</I>? <I>tagOrId...</I> </DT>
-<DD>Sorts
-the children for each entries specified by <I>tagOrId</I>.   By default, entries
-are sorted by name, but you can specify a  Tcl proc to do your own comparisons.
-<blockquote></DD>
-
-<DT><B>-recurse</B> </DT>
-<DD>Recursively sort the entire branch, not just the children. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName
-<B>tag <I>operation args</I></B></I> </DT>
-<DD>Tags are a general means of selecting and marking nodes
-in the tree. A tag is just a string of characters, and it may take any form
-except that of an integer.  The same tag may be associated with many different
-nodes.   <P>
-Both <I>operation</I> and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below. <blockquote></DD>
-
-<DT><I>pathName</I>
-<B>tag add</B> <I>string</I> <I>id</I>... </DT>
-<DD>Adds the tag <I>string</I> to one of more entries. </DD>
-
-<DT><I>pathName</I> <B>tag
-delete</B> <I>string</I> <I>id</I>... </DT>
-<DD>Deletes the tag <I>string</I> from one or more entries.   </DD>
-
-<DT><I>pathName</I>
-<B>tag forget</B> <I>string</I> </DT>
-<DD>Removes the tag <I>string</I> from all entries.  It's not an error
-if no entries are tagged as <I>string</I>. </DD>
-
-<DT><I>pathName</I> <B>tag names</B> ?<I>id</I>? </DT>
-<DD>Returns a list
-of tags used.  If an <I>id</I> argument is present, only those tags used by the
-node designated by <I>id</I>  are returned. </DD>
-
-<DT><I>pathName</I> <B>tag nodes</B> <I>string</I> </DT>
-<DD>Returns a
-list of ids that have the tag <I>string</I>.  If no node is tagged as <I>string</I>, then
-an empty string is returned. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text <I>operation</I></B></I> ?<I>args</I>? </DT>
-<DD>This operation
-is used to provide text editing for cells (data  fields in a column) or
-entry labels. It has several forms, depending on <I>operation</I>: <blockquote></DD>
-
-<DT><I>pathName <B>text
-apply</B></I> </DT>
-<DD>Applies the edited buffer, replacing the entry label or data field.
-The edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cancel</B></I> </DT>
-<DD>Cancels the editing operation,
-reverting the entry label  or data value back to the previous value. The
-edit window is hidden. </DD>
-
-<DT><I>pathName <B>text cget<I> value</I></B></I> </DT>
-<DD>Returns the current value
-of the configuration option given by <I>option</I>. <I>Option</I> may have any of the
-values accepted by the <B>configure</B> operation described below. </DD>
-
-<DT><I>pathName <B>text
-configure</B></I> ?<I>option value</I>? </DT>
-<DD>Query or modify the configuration options of the
-edit window. If no <I>option</I> is specified, returns a list describing all of
-the available options (see <B>Tk_ConfigureInfo</B> for information on the format
-of this list).  If <I>option</I> is specified with no <I>value</I>, then the command returns
-a list describing the one named option (this list will be identical to
-the corresponding sublist of the value returned if no <I>option</I> is specified).
- If one or more <I>option-value</I> pairs are specified, then the command modifies
-the given widget option(s) to have the given value(s);  in this case the
-command returns an empty string. <I>Option</I> and <I>value</I> are described in the section
- <FONT SIZE=-1><B>TEXT EDITING OPTIONS</B></FONT>
-  below. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>text delete<I> first last</I></B></I> </DT>
-<DD>Deletes the
-characters in the edit buffer between the two given character positions.
-  </DD>
-
-<DT><I>pathName <B>text get</B></I> ?<I>-root</I>? <I>x y</I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text icursor<I> index</I></B></I> </DT>
-<DD></DD>
-
-<DT><I>pathName <B>text
-index<I> index</I></B></I> </DT>
-<DD>Returns the text index of given <I>index</I>. </DD>
-
-<DT><I>pathName <B>text insert<I>
-index string</I></B></I> </DT>
-<DD>Insert the text string <I>string</I> into the edit buffer at the
-index  <I>index</I>.  For example, the index 0 will prepend the buffer. </DD>
-
-<DT><I>pathName
-<B>text selection<I> args</I></B></I> </DT>
-<DD>This operation controls the selection of the editing
-window.  Note that this differs from the selection of entries. It has the
-following forms: <blockquote></DD>
-
-<DT><I>pathName <B>text selection adjust<I> index</I></B></I> </DT>
-<DD>Adjusts either the
-first or last index of the selection. </DD>
-
-<DT><I>pathName <B>text selection clear</B></I> </DT>
-<DD>Clears
-the selection. </DD>
-
-<DT><I>pathName <B>text selection from<I> index</I></B></I> </DT>
-<DD>Sets the anchor of the
-selection. </DD>
-
-<DT><I>pathName <B>text selection present</B></I> </DT>
-<DD>Indicates if a selection is present.
-</DD>
-
-<DT><I>pathName <B>text selection range<I> start end</I></B></I> </DT>
-<DD>Sets both the anchor and mark of
-the selection. </DD>
-
-<DT><I>pathName <B>text selection to<I> index</I></B></I> </DT>
-<DD>Sets the unanchored end
-(mark) of the selection. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>toggle <I>tagOrId</I></B></I> </DT>
-<DD>Opens or closes the node
-given by <I>tagOrId</I>.  If the corresponding  <B>-opencommand</B> or <B>-closecommand</B> option
-is set, then that command is also invoked.  </DD>
-
-<DT><I>pathName <B>xview <I>args</I></B></I> </DT>
-<DD>This command
-is used to query and change the horizontal position of the information
-in the widget's window.  It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>xview</B></I> </DT>
-<DD>Returns a list containing two elements. Each element is a real fraction
-between 0 and 1;  together they describe the horizontal span that is visible
-in the window. For example, if the first element is .2 and the second element
-is .6, 20% of the <B>treeview</B> widget's text is off-screen to the left,  the middle
-40% is visible in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the <B>-xscrollcommand</B> option.
-</DD>
-
-<DT><I>pathName <B>xview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the window so that the character
-position given by <I>tagOrId</I> is displayed at the left edge of the window. Character
-positions are defined by the width of the character <B>0</B>. </DD>
-
-<DT><I>pathName <B>xview moveto<I>
-fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so that <I>fraction</I> of the total width
-of the <B>treeview</B> widget's text is off-screen to the left. <I>fraction</I> must be
-a fraction between 0 and 1. </DD>
-
-<DT><I>pathName <B>xview scroll <I>number what</I></B></I> </DT>
-<DD>This command
-shifts the view in the window left or right according to <I>number</I> and <I>what</I>.
-<I>Number</I> must be an integer. <I>What</I> must be either <B>units</B> or <B>pages</B> or an abbreviation
-of one of these. If <I>what</I> is <B>units</B>, the view adjusts left or right by <I>number</I>
-character units (the width of the <B>0</B> character) on the display;  if it is
-<B>pages</B> then the view adjusts by <I>number</I> screenfuls. If <I>number</I> is negative
-then characters farther to the left become visible;  if it is positive
-then characters farther to the right become visible. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>pathName <B>yview <I>?args</I></B></I>?
-</DT>
-<DD>This command is used to query and change the vertical position of the text
-in the widget's window. It can take any of the following forms: <blockquote></DD>
-
-<DT><I>pathName
-<B>yview</B></I> </DT>
-<DD>Returns a list containing two elements, both of which are real fractions
-between 0 and 1. The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means it is halfway
-through the treeview window, for example). The second element gives the
-position of the node just after the last one in the window, relative to
-the widget as a whole. These are the same values passed to scrollbars via
-the <B>-yscrollcommand</B> option. </DD>
-
-<DT><I>pathName <B>yview</B></I> <I>tagOrId</I> </DT>
-<DD>Adjusts the view in the
-window so that the node given by <I>tagOrId</I> is displayed at the top of the
-window. </DD>
-
-<DT><I>pathName <B>yview moveto<I> fraction</I></B></I> </DT>
-<DD>Adjusts the view in the window so
-that the node given by <I>fraction</I> appears at the top of the window. <I>Fraction</I>
-is a fraction between 0 and 1;  0 indicates the first node, 0.33 indicates
-the node one-third the way through the <B>treeview</B> widget, and so on. </DD>
-
-<DT><I>pathName
-<B>yview scroll <I>number what</I></B></I> </DT>
-<DD>This command adjusts the view in the window up
-or down according to <I>number</I> and <I>what</I>. <I>Number</I> must be an integer. <I>What</I> must
-be either <B>units</B> or <B>pages</B>. If <I>what</I> is <B>units</B>, the view adjusts up or down
-by <I>number</I> lines;  if it is <B>pages</B> then the view adjusts by <I>number</I> screenfuls.
-If <I>number</I> is negative then earlier nodes become visible;  if it is positive
-then later nodes become visible. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect11" HREF="#toc11">Treeview Options</A></H2>
-In addition to the <B>configure</B>
-operation, widget configuration options may also be set by the Tk <B>option</B>
-command.  The class resource name is <I>TreeView</I>. <BR>
-<CODE>option add *TreeView.Foreground white<BR>
-option add *TreeView.Background blue<BR>
-</CODE><P>The following widget options are available: 
-<DL>
-
-<DT><B>-activebackground <I>color</I></B> </DT>
-<DD>Sets
-the background color for active entries.  A node is active when the mouse
-passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of the active node.  A node is active when
-the mouse passes over it's entry or using the  <B>activate</B> operation.   </DD>
-
-<DT><B>-activeicons
-<I>images</I></B> </DT>
-<DD>Specifies images to be displayed for an entry's icon when it is active.
-<I>Images</I> is a list of two Tk images:  the first image is displayed when the
-node is open, the second when it is closed. </DD>
-
-<DT><B>-autocreate <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I>
-is true, automatically create missing ancestor  nodes when inserting new
-nodes. Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-allowduplicates <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is true, allow nodes with duplicate pathnames when inserting
-new nodes.  Otherwise flag an error. The default is <I>no</I>. </DD>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets
-the background color of the widget.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B>
-</DT>
-<DD>Sets the width of the 3-D border around the outside edge of the widget. 
-The <B>-relief</B> option determines if the border is to be drawn.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked when a node
-is closed.  You can overrider this for individual entries using the entry's
-<B>-closecommand</B>  option. The default is <I>""</I>. Percent substitutions are performed
-on <I>string</I> before  it is executed.  The following substitutions are valid:
-<blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-cursor
-<I>cursor</I></B> </DT>
-<DD>Specifies the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-dashes <I>number</I></B>
-</DT>
-<DD>Sets the dash style of the horizontal and vertical lines drawn connecting
- entries. <I>Number</I> is the length in pixels of the dashes and gaps in the line.
-If <I>number</I> is <I>0</I>, solid lines will  be drawn. The default is <I>1</I> (dotted). </DD>
-
-<DT><B>-exportselection
-<I>boolean</I></B>  </DT>
-<DD>Indicates if the selection is exported.  If the widget is exporting
-its selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type <B>STRING</B>; the value of the
-selection will be the label of the selected nodes, separated by newlines.
- The default is <I>no</I>. </DD>
-
-<DT><B>-flat <I>boolean</I></B> </DT>
-<DD>Indicates whether to display the tree as
-a flattened list.  If <I>boolean</I> is true, then the hierarchy will be a list
-of full paths for the nodes.  This option also has affect on sorting.  See
-the  <FONT SIZE=-1><B>SORT OPERATIONS</B></FONT>
-  section for more information. The default is <I>no</I>. </DD>
-
-<DT><B>-focusdashes
-<I>dashList</I></B>  </DT>
-<DD>Sets the dash style of the outline rectangle drawn around the
-entry label of the node that current has focus. <I>Number</I> is the length in
-pixels of the dashes and gaps in the line.  If <I>number</I> is <I>0</I>, a solid line
-will be drawn. The default is <I>1</I>. </DD>
-
-<DT><B>-focusforeground <I>color</I></B>  </DT>
-<DD>Sets the color of
-the focus rectangle.  The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Specifies the
-font for entry labels.  You can override this for individual entries with
-the entry's <B>-font</B> configuration option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of entry labels.  You can override
-this for individual entries with the entry's <B>-foreground</B> configuration option.
-  The default is <I>black</I>. </DD>
-
-<DT><B>-height <I>pixels</I></B> </DT>
-<DD>Specifies the requested height of
-widget.  The default is <I>400</I>. </DD>
-
-<DT><B>-hideroot <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, it indicates
-that no entry for the root node  should be displayed.  The default is <I>no</I>.
-</DD>
-
-<DT><B>-highlightbackground  <I>color</I></B> </DT>
-<DD>Specifies the normal color of the traversal
-highlight region when the widget does not have the input focus.   </DD>
-
-<DT><B>-highlightcolor
-<I>color</I></B> </DT>
-<DD>Specifies the color of the traversal highlight rectangle when the
-widget has the input focus.  The default is <I>black</I>. </DD>
-
-<DT><B>-highlightthickness <I>pixels</I></B>
-</DT>
-<DD>Specifies the width of the highlight rectangle indicating when the widget
-has input focus. The value may have any of the forms acceptable to <B>Tk_GetPixels</B>.
- If the value is zero, no focus highlight will be displayed.  The default
-is <I>2</I>. </DD>
-
-<DT><B>-icons <I>images</I></B> </DT>
-<DD>Specifies images for the entry's icon. <I>Images</I> is a list
-of two Tk images:  the first image is displayed when the node is open,
-the second when it is closed. </DD>
-
-<DT><B>-linecolor <I>color</I></B> </DT>
-<DD>Sets the color of the connecting
-lines drawn between entries.   The default is <I>black</I>. </DD>
-
-<DT><B>-linespacing <I>pixels</I></B> </DT>
-<DD>Sets
-the number of pixels spacing between entries.   The default is <I>0</I>. </DD>
-
-<DT><B>-linewidth
-<I>pixels</I></B> </DT>
-<DD>Set the width of the lines drawn connecting entries.  If <I>pixels</I> is
-<I>0</I>, no vertical or horizontal lines are drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-newtags
-<I>boolean</I></B>  </DT>
-<DD>If <I>boolean</I> is true, when sharing a tree object (see the <B>-tree</B> option),
-don't share its tags too.   The default is <I>0</I>. </DD>
-
-<DT><B>-opencommand <I>string</I></B> </DT>
-<DD>Specifies
-a Tcl script to be invoked when a node is open.   You can override this
-for individual entries with the entry's <B>-opencommand</B> configuration option.
- The default is <I>""</I>. Percent substitutions are performed on <I>string</I> before
- it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname
-of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname of the node.
-</DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect for the widget.  <I>Relief</I> specifies how the <B>treeview</B> widget
-should appear relative to widget  it is packed into; for example, <I>raised</I>
-means the <B>treeview</B> widget  should appear to protrude.  The default is <I>sunken</I>.
-</DD>
-
-<DT><B>-scrollmode <I>mode</I></B>  </DT>
-<DD>Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is <I>hierbox</I>. <blockquote></DD>
-
-<DT><I>listbox</I> </DT>
-<DD>Like the <B>listbox</B>
-widget, the last entry can always be scrolled to the top of the widget
-window.  This allows the scrollbar thumb to shrink as the last entry is
-scrolled upward. </DD>
-
-<DT><I>hierbox</I> </DT>
-<DD>Like the <B>hierbox</B> widget, the last entry can only
-be viewed at the bottom of the widget window.  The scrollbar stays a constant
-size.   </DD>
-
-<DT><I>canvas</I> </DT>
-<DD>Like the <B>canvas</B> widget, the entries are bound within the
-scrolling area.  </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-selectbackground <I>color</I></B> </DT>
-<DD>Sets the background color selected
-node entries. The default is <I>#ffffea</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the raised 3-D border drawn around the labels  of selected entries. The
-default is <I>0</I>. <B>-selectcommand <I>string</I></B> Specifies a Tcl script to invoked when
-the set of selected nodes changes. The default is <I>""</I>. </DD>
-
-<DT><B>-selectforeground <I>color<B>
-</B></I></B></DT>
-<DD>Sets the color of the labels of selected node entries.  The default is <I>black</I>.
-</DD>
-
-<DT><B>-selectmode <I>mode</I></B> </DT>
-<DD>Specifies the selection mode. If <I>mode</I> is  <I>single</I>, only one
-node can be selected at a time.  If <I>multiple</I> more than one node can be selected.
-The default is <I>single</I>. </DD>
-
-<DT><B>-separator <I>string</I></B> </DT>
-<DD>Specifies the character sequence
-to use when spliting the path components.   The separator may be several
-characters wide (such as "::") Consecutive separators in a pathname are
-treated as one. If <I>string</I> is the empty string, the pathnames are Tcl lists.
- Each element is a path component.   The default is <I>""</I>. </DD>
-
-<DT><B>-showtitles <I>boolean</I></B>
-</DT>
-<DD>If <I>boolean</I> is false, column titles are not be displayed.   The default is
-<I>yes</I>. </DD>
-
-<DT><B>-sortselection <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, nodes in the selection are
-ordered as they are currently displayed (depth-first or sorted), not in
-the order they were selected. The default is <I>no</I>. </DD>
-
-<DT><B>-takefocus</B> <I>focus</I>  </DT>
-<DD>Provides
-information used when moving the focus from window to window via keyboard
-traversal (e.g., Tab and Shift-Tab).  If <I>focus</I> is <I>0</I>, this means that this window
-should be skipped entirely during keyboard traversal.  <I>1</I> means that the
-this window should always receive the input focus.  An empty value means
-that the traversal scripts make the decision whether to focus on the window.
-The default is <I>"1"</I>. </DD>
-
-<DT><B>-trim <I>string</I></B> </DT>
-<DD>Specifies a string leading characters to
-trim from entry pathnames  before parsing.  This only makes sense if the
-<B>-separator</B> is also set.  The default is <I>""</I>. </DD>
-
-<DT><B>-width <I>pixels</I></B> </DT>
-<DD>Sets the requested
-width of the widget.  If <I>pixels</I> is 0, then the with is computed from the
-contents of the <B>treeview</B> widget. The default is <I>200</I>. </DD>
-
-<DT><B>-xscrollcommand <I>string</I></B>
-</DT>
-<DD>Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window  changes,
-the widget will generate a Tcl command by concatenating the  scroll command
-and two numbers.  If this option is not specified, then  no command will
-be executed. </DD>
-
-<DT><B>-xscrollincrement</B> <I>pixels</I> </DT>
-<DD>Sets the horizontal scrolling distance.
-The default is 20 pixels. </DD>
-
-<DT><B>-yscrollcommand <I>string</I></B> </DT>
-<DD>Specifies the prefix for
-a command used to communicate with vertical scrollbars.   Whenever the vertical
-view in the widget's window  changes, the widget will generate a Tcl command
-by concatenating the  scroll command and two numbers.  If this option is
-not specified, then  no command will be executed. </DD>
-
-<DT><B>-yscrollincrement</B> <I>pixels</I>
-</DT>
-<DD>Sets the vertical scrolling distance. The default is 20 pixels. </DD>
-</DL>
-
-<H2><A NAME="sect12" HREF="#toc12">Entry Options</A></H2>
-Many
-widget configuration options have counterparts in entries.  For example,
-there is a <B>-closecommand</B> configuration option for both widget itself and
-for individual entries.  Options set at the widget level are global for
-all entries.  If the entry configuration option is set, then it overrides
-the widget option.  This is done to avoid wasting memory by replicated options.
- Most entries will have redundant options. <P>
-There is no resource class or
-name for entries. 
-<DL>
-
-<DT><B>-activeicons <I>images</I></B> </DT>
-<DD>Specifies images to be displayed as
-the entry's icon when it is active. This overrides the global <B>-activeicons</B>
-configuration option for the specific entry. <I>Images</I> is a list of two Tk
-images:  the first image is displayed when the node is open, the second
-when it is closed. </DD>
-
-<DT><B>-bindtags <I>tagList</I></B> </DT>
-<DD>Specifies the binding tags for nodes.
- <I>TagList</I> is a list of binding tag names.  The tags and their order will
-determine how events are handled for nodes.  Each tag in the list matching
-the current  event sequence will have its Tcl command executed.  The default
-value  is <I>all</I>. </DD>
-
-<DT><B>-button <I>string</I></B> </DT>
-<DD>Indicates whether a button should be displayed
-on the left side of the node entry.  <I>String</I> can be <I>yes</I>, <I>no</I>,  or <I>auto</I>.  If
-<I>auto</I>, then a button is automatically displayed if the node has children.
- This is the default. </DD>
-
-<DT><B>-closecommand <I>string</I></B> </DT>
-<DD>Specifies a Tcl script to be invoked
-when the node is closed.  This overrides the global <B>-closecommand</B> option
-for this entry. The default is <I>""</I>. Percent substitutions are performed on
-<I>string</I> before  it is executed.  The following substitutions are valid: <blockquote></DD>
-
-<DT><I>%W</I>
-</DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The full pathname
-of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single percent. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>-data
-<I>string</I></B> </DT>
-<DD>Sets data fields for the node.  <I>String</I> is a list of  name-value pairs
-to be set. The default is <I>""</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>  </DT>
-<DD>Sets the font for entry labels.
- This overrides the widget's <B>-font</B> option for this node.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets the text color of the entry label.  This overrides
-the widget's <B>-foreground</B> configuration option.  The default is <I>""</I>. </DD>
-
-<DT><B>-icons <I>images</I></B>
-</DT>
-<DD>Specifies images to be displayed for the entry's icon. This overrides the
-global <B>-icons</B> configuration option. <I>Images</I> is a list of two Tk images:  the
-first image is displayed when the node is open, the second when it is closed.
-</DD>
-
-<DT><B>-label <I>string</I></B> </DT>
-<DD>Sets the text for the entry's label.  If not set, this  defaults
-to the name of the node. The default is <I>""</I>. </DD>
-
-<DT><B>-opencommand <I>string</I></B> </DT>
-<DD>Specifies
-a Tcl script to be invoked when the entry is opened.   This overrides the
-widget's <B>-opencommand</B> option for this node.   The default is <I>""</I>.  Percent substitutions
-are performed on <I>string</I> before  it is executed.  The following substitutions
-are valid: <blockquote></DD>
-
-<DT><I>%W</I> </DT>
-<DD>The pathname of the widget. </DD>
-
-<DT><I>%p</I> </DT>
-<DD>The name of the node. </DD>
-
-<DT><I>%P</I> </DT>
-<DD>The
-full pathname of the node. </DD>
-
-<DT><I>%#</I> </DT>
-<DD>The id of the node. </DD>
-
-<DT><I>%%</I> </DT>
-<DD>Translates to a single
-percent. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect13" HREF="#toc13">Button Options</A></H2>
-Button configuration options may also be set by the
-<B>option</B> command. The resource subclass is <I>Button</I>.   The resource name is always
-<I>button</I>. <BR>
-<CODE>option add *TreeView.Button.Foreground white<BR>
-option add *TreeView.button.Background blue<BR>
-</CODE><P>The following are the configuration options available for buttons. 
-<DL>
-
-<DT><B>-activebackground
-<I>color</I></B> </DT>
-<DD>Sets the background color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-activeforeground
-<I>color</I></B> </DT>
-<DD>Sets the foreground color of active buttons.  A button is made active
-when the mouse passes over it or by the  <B>button activate</B> operation.   </DD>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background of the button.  The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth
-<I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around the button.   The <B>-relief</B> option
-determines if a border is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-closerelief <I>relief</I></B>
-</DT>
-<DD>Specifies the 3-D effect for the closed button.  <I>Relief</I> indicates how the
-button should appear relative to the widget;  for example, <I>raised</I> means
-the button should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-cursor <I>cursor</I></B>
-</DT>
-<DD>Sets the widget's cursor.  The default cursor is <I>""</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Sets
-the foreground color of buttons.  The default is <I>black</I>. </DD>
-
-<DT><B>-images <I>images</I></B> </DT>
-<DD>Specifies
-images to be displayed for the button. <I>Images</I> is a list of two Tk images:
- the first image is displayed when the button is open, the second when
-it is closed.  If the <I>images</I> is the empty string, then a plus/minus gadget
-is drawn.  The default is <I>""</I>. </DD>
-
-<DT><B>-openrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of
-the open button.  <I>Relief</I> indicates how the button should appear relative
-to the widget;  for example, <I>raised</I> means the button should appear to protrude.
- The default is <I>flat</I>. </DD>
-
-<DT><B>-size <I>pixels</I></B> </DT>
-<DD>Sets the requested size of the button.
-  The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect14" HREF="#toc14">Column Options</A></H2>
-Column configuration options may also
-be set by the <B>option</B> command. The resource subclass is <I>Column</I>.   The resource
-name is the  name of the column. <BR>
-<CODE>option add *TreeView.Column.Foreground white<BR>
-option add *TreeView.treeView.Background blue<BR>
-</CODE><P>The following configuration options are available for columns. 
-<DL>
-
-<DT><B>-background
-<I>color</I></B> </DT>
-<DD>Sets the background color of the column.  This overrides the widget's
-<B>-background</B> option. The default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width
-of the 3-D border of the column.   The <B>-relief</B> option determines if a border
-is to be drawn.  The default is <I>0</I>. </DD>
-
-<DT><B>-edit <I>boolean</I></B> </DT>
-<DD>Indicates if the column's
-data fields can be edited. If <I>boolean</I> is  false, the data fields in the
-column may not be edited. The default is <I>yes</I>. </DD>
-
-<DT><B>-foreground <I>color</I></B>  </DT>
-<DD>Specifies
-the foreground color of the column.  You can override this for individual
-entries with the entry's  <B>-foreground</B> option. The default is <I>black</I>. </DD>
-
-<DT><B>-font <I>fontName</I></B>
- </DT>
-<DD>Sets the font for a column.  You can override this for individual entries
-with the entry's <B>-font</B> option.  The default is <I>*-Helvetica-Bold-R-Normal-*-12-120-*</I>.
-</DD>
-
-<DT><B>-hide <I>boolean</I></B> </DT>
-<DD>If <I>boolean</I> is true, the column is not displayed. The default
-is <I>yes</I>. </DD>
-
-<DT><B>-justify <I>justify</I></B> </DT>
-<DD>Specifies how the column data fields title should
-be justified within the column.  This matters only when the column is wider
-than the  data field to be display. <I>Justify</I> must be <I>left</I>, <I>right</I>, or <I>center</I>.
-  The default is <I>left</I>. </DD>
-
-<DT><B>-pad <I>pad</I></B> </DT>
-<DD>Specifies how much padding for the left and
-right sides of the column. <I>Pad</I> is a list of one or two screen distances.
- If <I>pad</I> has two elements, the left side of the column is padded by the
-first distance and the right side by the second.  If <I>pad</I> has just one distance,
-both the left and right sides are padded evenly.  The default is <I>2</I>. </DD>
-
-<DT><B>-relief
-<I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the column.  <I>Relief</I> specifies how the
-column should appear relative to the widget;  for example, <I>raised</I> means
-the column should appear to protrude.  The default is <I>flat</I>. </DD>
-
-<DT><B>-state <I>state</I></B> </DT>
-<DD>Sets
-the state of the column. If <I>state</I> is <I>disable</I> then the column title can not
-be activated nor invoked. The default is <I>normal</I>. </DD>
-
-<DT><B>-text <I>string</I></B> </DT>
-<DD>Sets the title
-for the column. The default is <I>""</I>. </DD>
-
-<DT><B>-titleforeground <I>color</I></B>  </DT>
-<DD>Sets the foreground
-color of the column title.  The default is <I>black</I>. </DD>
-
-<DT><B>-titleshadow <I>color</I></B>  </DT>
-<DD>Sets
-the color of the drop shadow of the column title.   The default is <I>""</I>. </DD>
-
-<DT><B>-width
-<I>pixels</I></B> </DT>
-<DD>Sets the requested width of the column.  This overrides the computed
-with of the column.  If <I>pixels</I> is 0, the width is computed as from the contents
-of the column. The default is <I>0</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect15" HREF="#toc15">Text Editing Options</A></H2>
-Text edit window configuration
-options may also be set by the  <B>option</B> command. The resource class is <I>TreeViewEditor</I>.
-The resource name is always <I>edit</I>. <BR>
-<CODE>option add *TreeViewEditor.Foreground white<BR>
-option add *edit.Background blue<BR>
-</CODE><P>The following are the configuration options available for the text editing
-window. 
-<DL>
-
-<DT><B>-background <I>color</I></B> </DT>
-<DD>Sets the background of the text edit window.  The
-default is <I>white</I>. </DD>
-
-<DT><B>-borderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the edit window.   The <B>-relief</B> option determines if a border is to be drawn.
- The default is <I>1</I>. </DD>
-
-<DT><B>-exportselection <I>boolean</I></B> </DT>
-<DD>Indicates if the text selection
-is exported.  If the edit window is  exporting its selection then it will
-observe the standard X11 protocols  for handling the selection.  Selections
-are available as type <B>STRING</B>. The default is <I>no</I>. </DD>
-
-<DT><B>-relief <I>relief</I></B> </DT>
-<DD>Specifies
-the 3-D effect of the edit window.  <I>Relief</I> indicates how the background should
-appear relative to the edit window; for example, <I>raised</I> means the background
-should appear to protrude.  The default is <I>solid</I>. </DD>
-
-<DT><B>-selectbackground <I>color</I></B>
-</DT>
-<DD>Sets the background of the selected text in the edit window.   The default
-is <I>white</I>. </DD>
-
-<DT><B>-selectborderwidth <I>pixels</I></B> </DT>
-<DD>Sets the width of the 3-D border around
-the selected text in the  edit window.  The <B>-selectrelief</B> option determines
-if a border  is to be drawn.  The default is <I>1</I>. </DD>
-
-<DT><B>-selectforeground <I>color</I></B> </DT>
-<DD>Sets
-the foreground of the selected text in the edit window.   The default is
-<I>white</I>. </DD>
-
-<DT><B>-selectrelief <I>relief</I></B> </DT>
-<DD>Specifies the 3-D effect of the selected text
-in the edit window.   <I>Relief</I> indicates how the text should appear relative
-to the edit window; for example, <I>raised</I> means the text should appear to
-protrude.  The default is <I>flat</I>. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect16" HREF="#toc16">Default Bindings</A></H2>
-Tk automatically creates
-class bindings for treeviews that give them Motif-like behavior.  Much of
-the behavior of a <B>treeview</B> widget is determined by its <B>-selectmode</B> option,
-which selects one of two ways of dealing with the selection. <P>
-If the selection
-mode is <B>single</B>, only one node can be  selected at a time. Clicking button
-1 on an node selects it and deselects any other selected item. <P>
-If the selection
-mode is <B>multiple</B>, any number of entries may be selected at once, including
-discontiguous ranges.  Clicking Control-Button-1 on a node entry toggles its
-selection state without affecting any other entries. Pressing Shift-Button-1
-on a node entry selects it, extends the selection. 
-<OL>
-<LI>In <B>extended</B> mode, the
-selected range can be adjusted by pressing button 1 with the Shift key
-down:  this modifies the selection to consist of the entries between the
-anchor and the entry under the mouse, inclusive. The un-anchored end of this
-new selection can also be dragged with the button down. </LI><LI>In <B>extended</B> mode,
-pressing button 1 with the Control key down starts a toggle operation:
-the anchor is set to the entry under the mouse, and its selection state
-is reversed.  The selection state of other entries isn't changed. If the mouse
-is dragged with button 1 down, then the selection state of all entries
-between the anchor and the entry under the mouse is set to match that of
-the anchor entry;  the selection state of all other entries remains what
-it was before the toggle operation began. </LI><LI>If the mouse leaves the treeview
-window with button 1 down, the window scrolls away from the mouse, making
-information visible that used to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the button
-is released, or the end of the hierarchy is reached. </LI><LI>Mouse button 2 may
-be used for scanning. If it is pressed and dragged over the <B>treeview</B> widget,
-the contents of the hierarchy drag at high speed in the direction the mouse
-moves. </LI><LI>If the Up or Down key is pressed, the location cursor (active entry)
-moves up or down one entry. If the selection mode is <B>browse</B> or <B>extended</B>
-then the new active entry is also selected and all other entries are deselected.
-In <B>extended</B> mode the new active entry becomes the selection anchor. </LI><LI>In <B>extended</B>
-mode, Shift-Up and Shift-Down move the location cursor (active entry) up
-or down one entry and also extend the selection to that entry in a fashion
-similar to dragging with mouse button 1. </LI><LI>The Left and Right keys scroll
-the <B>treeview</B> widget view left and right by the width of the character <B>0</B>.
-Control-Left and Control-Right scroll the <B>treeview</B> widget view left and right
-by the width of the window. Control-Prior and Control-Next also scroll left
-and right by the width of the window. </LI><LI>The Prior and Next keys scroll the
-<B>treeview</B> widget view up and down by one page (the height of the window).
-</LI><LI>The Home and End keys scroll the <B>treeview</B> widget horizontally to the left
-and right edges, respectively. </LI><LI>Control-Home sets the location cursor to the
-the first entry,  selects that entry, and deselects everything else in
-the widget. </LI><LI>Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else in the widget. </LI><LI>In <B>extended</B>
-mode, Control-Shift-Home extends the selection to the first entry and Control-Shift-End
-extends the selection to the last entry. </LI><LI>In <B>multiple</B> mode, Control-Shift-Home
-moves the location cursor to the first entry and Control-Shift-End moves
-the location cursor to the last entry. </LI><LI>The space and Select keys make a
-selection at the location cursor (active entry) just as if mouse button
-1 had been pressed over this entry. </LI><LI>In <B>extended</B> mode, Control-Shift-space
-and Shift-Select extend the selection to the active entry just as if button
-1 had been pressed with the Shift key down. </LI><LI>In <B>extended</B> mode, the Escape
-key cancels the most recent selection and restores all the entries in the
-selected range to their previous selection state. </LI><LI>Control-slash selects everything
-in the widget, except in <B>single</B> and <B>browse</B> modes, in which case it selects
-the active entry and deselects everything else. </LI><LI>Control-backslash deselects
-everything in the widget, except in <B>browse</B> mode where it has no effect.
-</LI><LI>The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the
-selection in the widget to the clipboard, if there is a selection. </LI>
-</OL>
-<P>
-The behavior
-of <B>treeview</B> widgets can be changed by defining new bindings  for individual
-widgets or by redefining the class bindings. 
-<H3><A NAME="sect17" HREF="#toc17">Widget Bindings</A></H3>
-In addition
-to the above behavior, the following additional behavior is defined by
-the default widget class (TreeView) bindings. 
-<DL>
-
-<DT><I><ButtonPress-2></I></DT>
-<DD>Starts scanning.
- </DD>
-
-<DT><I><B2-Motion></I></DT>
-<DD>Adjusts the scan. </DD>
-
-<DT><I><ButtonRelease-2></I></DT>
-<DD>Stops scanning. </DD>
-
-<DT><I><B1-Leave></I></DT>
-<DD>Starts auto-scrolling.
-</DD>
-
-<DT><I><B1-Enter></I></DT>
-<DD>Starts auto-scrolling  </DD>
-
-<DT><I><KeyPress-Up></I></DT>
-<DD>Moves the focus to the previous
-entry. </DD>
-
-<DT><I><KeyPress-Down></I></DT>
-<DD>Moves the focus to the next entry. </DD>
-
-<DT><I><Shift-KeyPress-Up></I></DT>
-<DD>Moves
-the focus to the previous sibling. </DD>
-
-<DT><I><Shift-KeyPress-Down></I></DT>
-<DD>Moves the focus to the
-next sibling. </DD>
-
-<DT><I><KeyPress-Prior></I></DT>
-<DD>Moves the focus to first entry.  Closed or hidden
-entries are ignored. </DD>
-
-<DT><I><KeyPress-Next></I></DT>
-<DD>Move the focus to the last entry. Closed
-or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-Left></I></DT>
-<DD>Closes the entry.  It is not an
-error if the entry has no children. </DD>
-
-<DT><I><KeyPress-Right></I></DT>
-<DD>Opens the entry, displaying
-its children.  It is not an error if the entry has no children. </DD>
-
-<DT><I><KeyPress-space></I></DT>
-<DD>In
-"single" select mode this selects the entry.  In "multiple" mode, it toggles
-the entry (if it was previous selected, it is not deselected). </DD>
-
-<DT><I><KeyRelease-space></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress-Return></I></DT>
-<DD>Sets the focus to the current entry. </DD>
-
-<DT><I><KeyRelease-Return></I></DT>
-<DD>Turns
-off select mode. </DD>
-
-<DT><I><KeyPress></I></DT>
-<DD>Moves to the next entry whose label starts with
-the letter typed. </DD>
-
-<DT><I><KeyPress-Home></I></DT>
-<DD>Moves the focus to first entry.  Closed or
-hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-End></I></DT>
-<DD>Move the focus to the last entry.
-Closed or hidden entries are ignored. </DD>
-
-<DT><I><KeyPress-F1></I></DT>
-<DD>Opens all entries. </DD>
-
-<DT><I><KeyPress-F2></I></DT>
-<DD>Closes
-all entries (except root). </DD>
-</DL>
-
-<H3><A NAME="sect18" HREF="#toc18">Button Bindings</A></H3>
-Buttons have bindings.  There are
-associated with the "all" bindtag (see the entry's -bindtag option).  You
-can use the <B>bind</B> operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the button of
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the button back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the view so that the current entry is visible. </DD>
-</DL>
-
-<H3><A NAME="sect19" HREF="#toc19">Entry Bindings</A></H3>
-Entries have
-default bindings.  There are associated with the "all" bindtag (see the
-entry's -bindtag option).  You can use the <B>bind</B> operation to modify them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current entry. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the entry back to its normal state. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets
-the selection anchor the current entry. </DD>
-
-<DT><I><Double-ButtonPress-1></I></DT>
-<DD>Toggles the selection
-of the current entry. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>For "multiple" mode only.  Saves the current
-location of the pointer for auto-scrolling.  Resets the selection mark.  
-</DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>For "multiple" mode only.  Sets the selection anchor to the
- current entry. </DD>
-
-<DT><I><Shift-ButtonPress-1></I></DT>
-<DD>For "multiple" mode only. Extends the selection.
-</DD>
-
-<DT><I><Shift-Double-ButtonPress-1></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Shift-B1-Motion></I></DT>
-<DD>Place holder.
-Does nothing. </DD>
-
-<DT><I><Shift-ButtonRelease-1></I></DT>
-<DD>Stop auto-scrolling. </DD>
-
-<DT><I><Control-ButtonPress-1></I></DT>
-<DD>For
-"multiple" mode only.  Toggles and extends the selection. </DD>
-
-<DT><I><Control-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-
-<DT><I><Control-ButtonRelease-1></I></DT>
-<DD>Stops
-auto-scrolling. </DD>
-
-<DT><I><Control-Shift-ButtonPress-1></I></DT>
-<DD>??? </DD>
-
-<DT><I><Control-Shift-Double-ButtonPress-1></I></DT>
-<DD>Place
-holder. Does nothing. </DD>
-
-<DT><I><Control-Shift-B1-Motion></I></DT>
-<DD>Place holder. Does nothing. </DD>
-</DL>
-
-<H3><A NAME="sect20" HREF="#toc20">Column
-Bindings</A></H3>
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the <B>column bind</B>
-operation to change them. 
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights the current column title. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns
-the column back to its normal state. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Invokes the command (see
-the column's -command option) if one if specified.   </DD>
-</DL>
-
-<H3><A NAME="sect21" HREF="#toc21">Column Rule Bindings</A></H3>
-
-<DL>
-
-<DT><I><Enter></I></DT>
-<DD>Highlights
-the current and activates the ruler. </DD>
-
-<DT><I><Leave></I></DT>
-<DD>Returns the column back to its
-normal state. Deactivates the ruler. </DD>
-
-<DT><I><ButtonPress-1></I></DT>
-<DD>Sets the resize anchor for
-the column. </DD>
-
-<DT><I><B1-Motion></I></DT>
-<DD>Sets the resize mark for the column. </DD>
-
-<DT><I><ButtonRelease-1></I></DT>
-<DD>Adjust
-the size of the column, based upon the resize anchor and mark positions.
-</DD>
-</DL>
-
-<H2><A NAME="sect22" HREF="#toc22">Example</A></H2>
-The <B>treeview</B> command creates a new widget.   <BR>
-<CODE>treeview .h -bg white<BR>
-</CODE><P>A new Tcl command <I>.h</I> is also created.  This command can be used to query
-and modify the <B>treeview</B> widget.  For example, to change the  background
-color of the table to "green", you use the new command and the widget's
-<B>configure</B> operation. <BR>
-<CODE># Change the background color.<BR>
-.h configure -background "green"<BR>
-</CODE><P>By default, the <B>treeview</B> widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the widget.
- Above, the new tree object name is ".h".  But you can use the <B>-tree</B> option
-to specify the name of another tree. <BR>
-<CODE># View the tree "myTree".<BR>
-.h configure -tree "myTree"<BR>
-</CODE><P>When a new tree is created, it contains only a root node.  The node is automatically
-opened.  The id of the root node is always <I>0</I> (you can use also use the special
-id <I>root</I>). The <B>insert</B> operation lets you insert one or more new entries into
-the tree.  The last argument is the node's <I>pathname</I>.   <BR>
-<CODE># Create a new entry named "myEntry"<BR>
-set id [.h insert end "myEntry"]<BR>
-</CODE><P>This appends a new node named "myEntry".  It will positioned as the last
-child of the root of the tree (using the position "end").  You can supply
-another position to order the node within its siblings. <BR>
-<CODE># Prepend "fred".<BR>
-set id [.h insert 0 "fred"]<BR>
-</CODE><P>Entry names do not need to be unique.  By default, the node's label is its
-name.  To supply a different text label, add the <B>-label</B> option. <BR>
-<CODE># Create a new node named "fred"<BR>
-set id [.h insert end "fred" -label "Fred Flintstone"]<BR>
-</CODE><P>The <B>insert</B> operation returns the id of the new node.  You can also use the
-<B>index</B> operation to get this information. <BR>
-<CODE># Get the id of "fred"<BR>
-.h index "fred"<BR>
-</CODE><P>To insert a node somewhere other than root, use the <B>-at</B> switch. It takes
-the id of the node where the new child will be added. <BR>
-<CODE># Create a new node "barney" in "fred".<BR>
-.h insert -at $id end "barney" <BR>
-</CODE><P>A pathname describes the path to an entry in the hierarchy.  It's a list
-of entry names that compose the path in the tree.  Therefore, you can also
-add "barney" to "fred" as follows. <BR>
-<CODE># Create a new sub-entry of "fred"<BR>
-.h insert end "fred barney" <BR>
-</CODE><P>Every name in the list is ancestor of the next.  All ancestors must already
-exist.  That means that an entry "fred" is an ancestor of "barney" and must
-already exist.  But you can use the <B>-autocreate</B> configuration option to force
-the creation of ancestor nodes. <BR>
-<CODE># Force the creation of ancestors.<BR>
-.h configure -autocreate yes <BR>
-.h insert end "fred barney wilma betty" <BR>
-</CODE><P>Sometimes the pathname is already separated by a character sequence rather
-than formed as a list.  A file name is a good example of this. You can use
-the <B>-separator</B> option to specify a separator string to split the path into
-its components.  Each pathname inserted is automatically split using the
-separator string as a separator. Multiple separators are treated as one.
-<BR>
-<CODE>.h configure -separator /<BR>
-.h insert end "/usr/local/tcl/bin" <BR>
-</CODE><P>If the path is prefixed by extraneous characters, you can automatically
-trim it off using the <B>-trim</B> option.  It removed the string from the path
-before it is parsed. <BR>
-<CODE>.h configure -trim C:/windows -separator /<BR>
-.h insert end "C:/window/system" <BR>
-</CODE><P>You can insert more than one entry at a time with the <B>insert</B> operation.
- This can be much faster than looping over a list of names. <BR>
-<CODE># The slow way<BR>
-foreach f [glob $dir/*] {<BR>
-    .h insert end $f<BR>
-}<BR>
-# The fast way<BR>
-eval .h insert end [glob $dir/*]<BR>
-</CODE><P>In this case, the <B>insert</B> operation will return a list of ids of the new
-entries. <P>
-You can delete entries with the <B>delete</B> operation.  It takes one
-or more tags of ids as its argument. It deletes the entry and all its children.
-<BR>
-<CODE>.h delete $id<BR>
-</CODE><P>Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the <B>-label</B> option that
-sets the entry's text label.   The <B>entry configure</B> operation lets you set
-or modify an entry's configuration options. <BR>
-<CODE>.h entry configure $id -color red -font fixed<BR>
-</CODE><P>You can hide an entry and its children using the <B>-hide</B> option. <BR>
-<CODE>.h entry configure $id -hide yes<BR>
-</CODE><P>More that one entry can be configured at once.  All entries specified are
-configured with the same options. <BR>
-<CODE>.h entry configure $i1 $i2 $i3 $i4 -color brown <BR>
-</CODE><P>An icon is displayed for each entry.  It's a Tk image drawn to the left of
-the label.  You can set the icon with the entry's <B>-icons</B> option.  It takes
-a list of two image names: one to represent the open entry, another when
-it is closed. <BR>
-<CODE>set im1 [image create photo -file openfolder.gif]<BR>
-set im2 [image create photo -file closefolder.gif]<BR>
-.h entry configure $id -icons "$im1 $im2"<BR>
-</CODE><P>If <B>-icons</B> is set to the empty string, no icons are display. <P>
-If an entry has
-children, a button is displayed to the left of the icon. Clicking the mouse
-on this button opens or closes the sub-hierarchy.  The button is normally
-a <I>+</I> or <I>-</I> symbol, but can be configured in a variety of ways using the <B>button
-configure</B> operation.  For example, the <I>+</I> and <I>-</I> symbols can be replaced with
-Tk images. <BR>
-<CODE>set im1 [image create photo -file closefolder.gif]<BR>
-set im2 [image create photo -file downarrow.gif]<BR>
-.h button configure $id -images "$im1 $im2" \<BR>
-    -openrelief raised -closerelief raised<BR>
-</CODE><P>Entries can contain an arbitrary number of <I>data fields</I>.  Data fields are
-name-value pairs.  Both the value and name are strings. The entry's <B>-data</B> option
-lets you set data fields. <BR>
-<CODE>.h entry configure $id -data {mode 0666 group users}<BR>
-</CODE><P>The <B>-data</B> takes a list of name-value pairs.   <P>
-You can display these data fields
-as <I>columns</I> in the <B>treeview</B> widget.  You can create and configure columns
-with the <B>column</B> operation.  For example, to add a new column to the widget,
-use the <B>column insert</B> operation.  The last argument is the name of the data
-field that you want to display. <BR>
-<CODE>.h column insert end "mode"<BR>
-</CODE><P>The column title is displayed at the top of the column.  By default, it's
-is the field name.  You can override this using the column's <B>-text</B> option.
-<BR>
-<CODE>.h column insert end "mode" -text "File Permissions"<BR>
-</CODE><P>Columns have several configuration options.  The <B>column configure</B> operation
-lets you query or modify column options. <BR>
-<CODE>.h column configure "mode" -justify left<BR>
-</CODE><P>The <B>-justify</B> option says how the data is justified within in the column.
- The <B>-hide</B> option indicates whether the column is displayed. <BR>
-<CODE>.h column configure "mode" -hide yes<BR>
-</CODE><P>Entries can be selected by clicking on the mouse.  Selected entries are
-drawn using the colors specified by the <B>-selectforeground</B>  and <B>-selectbackground</B>
-configuration options. The selection itself is managed by the <B>selection</B>
-operation. <BR>
-<CODE># Clear all selections<BR>
-.h selection clear 0 end<BR>
-# Select the root node<BR>
-.h selection set 0 <BR>
-</CODE><P>The <B>curselection</B> operation returns a list of ids of all the selected entries.
-<BR>
-<CODE>set ids [.h curselection]<BR>
-</CODE><P>You can use the <B>get</B> operation to convert the ids to  their pathnames. <BR>
-<CODE>set names [eval .h get -full $ids]<BR>
-</CODE><P>If a treeview is exporting its selection (using the <B>-exportselection</B> option),
-then it will observe the standard X11 protocols for handling the selection.
- Treeview selections are available as type <B>STRING</B>; the value of the selection
-will be the pathnames of the selected entries, separated by newlines. <P>
-The
-<B>treeview</B> supports two modes of selection: <I>single</I> and <I>multiple</I>.  In single
-select mode, only one entry can be selected at a time, while multiple select
-mode allows several entries to be selected.  The mode is set by the widget's
-<B>-selectmode</B> option. <BR>
-<CODE>.h configure -selectmode "multiple"<BR>
-</CODE><P>You can be notified when the list of selected entries changes.  The widget's
-<B>-selectcommand</B> specifies a Tcl procedure that is called whenever the selection
-changes. <BR>
-<CODE>proc SelectNotify { widget } {<BR>
-   set ids [$widget curselection]<BR>
-}<BR>
-.h configure -selectcommand "SelectNotify .h"<BR>
-</CODE><P>The widget supports the standard Tk scrolling and scanning operations. The
-<B>treeview</B> can be both horizontally and vertically. You can attach scrollbars
-to the <B>treeview</B> the same way as the listbox or canvas widgets. <BR>
-<CODE>scrollbar .xbar -orient horizontal -command ".h xview"<BR>
-scrollbar .ybar -orient vertical -command ".h yview"<BR>
-.h configure -xscrollcommand ".xbar set" \<BR>
-    -yscrollcommand ".ybar set"<BR>
-</CODE><P>There are three different modes of scrolling: <I>listbox</I>, <I>canvas</I>, and <I>hierbox</I>.
- In <I>listbox</I> mode, the last entry can always be scrolled to the top of the
-widget.  In <I>hierbox</I> mode, the last entry is always drawn at the bottom of
-the widget. The scroll mode is set by the widget's <B>-selectmode</B> option. <BR>
-<CODE>.h configure -scrollmode "listbox"<BR>
-</CODE><P>Entries can be programmatically opened or closed using the <B>open</B> and <B>close</B>
-operations respectively.   <BR>
-<CODE>.h open $id<BR>
-.h close $id<BR>
-</CODE><P>When an entry is opened, a Tcl procedure can be automatically invoked. The
-<B>-opencommand</B> option specifies this procedure.  This procedure can lazily
-insert entries as needed. <BR>
-<CODE>proc AddEntries { dir } {<BR>
-   eval .h insert end [glob -nocomplain $dir/*] <BR>
-}<BR>
-.h configure -opencommand "AddEntries %P"<BR>
-</CODE><P>Now when an entry is opened, the procedure <I>AddEntries</I> is called and adds
-children to the entry.  Before the command is invoked, special "%" substitutions
-(like <B>bind</B>) are performed. Above, <I>%P</I> is translated to the pathname of the
-entry. <P>
-The same feature exists when an entry is closed.  The <B>-closecommand</B>
-option specifies the procedure. <BR>
-<CODE>proc DeleteEntries { id } {<BR>
-   .h entry delete $id 0 end<BR>
-}<BR>
-.h configure -closecommand "DeleteEntries %#"<BR>
-</CODE><P>When an entry is closed, the procedure <I>DeleteEntries</I> is called and deletes
-the entry's children using the <B>entry delete</B> operation (<I>%#</I> is the id of entry).
-
-<H2><A NAME="sect23" HREF="#toc23">Keywords</A></H2>
-treeview, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Tree Data Object</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">IDs and Tags</A></LI>
-<LI><A NAME="toc7" HREF="#sect7">Special Node IDs</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Data Fields</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">Entry Bindings</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Treeview Operations</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">Treeview Options</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Entry Options</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Button Options</A></LI>
-<LI><A NAME="toc14" HREF="#sect14">Column Options</A></LI>
-<LI><A NAME="toc15" HREF="#sect15">Text Editing Options</A></LI>
-<LI><A NAME="toc16" HREF="#sect16">Default Bindings</A></LI>
-<UL>
-<LI><A NAME="toc17" HREF="#sect17">Widget Bindings</A></LI>
-<LI><A NAME="toc18" HREF="#sect18">Button Bindings</A></LI>
-<LI><A NAME="toc19" HREF="#sect19">Entry Bindings</A></LI>
-<LI><A NAME="toc20" HREF="#sect20">Column Bindings</A></LI>
-<LI><A NAME="toc21" HREF="#sect21">Column Rule Bindings</A></LI>
-</UL>
-<LI><A NAME="toc22" HREF="#sect22">Example</A></LI>
-<LI><A NAME="toc23" HREF="#sect23">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/vector.html b/blt3.0/html/vector.html
deleted file mode 100644
index c89a044..0000000
--- a/blt3.0/html/vector.html
+++ /dev/null
@@ -1,1124 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>vector(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-vector -  Vector data type for Tcl 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>vector
-create <I>vecName </I></B>?<I>vecName</I>...? ?<I>switches</I>?  <P>
-<B>vector destroy <I>vecName </I></B>?<I>vecName</I>...? <P>
-<B>vector
-expr <I>expression</I></B> <P>
-<B>vector names </B>?<I>pattern</I>...? 
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>vector</B> command creates
-a vector of floating point values.  The vector's components can be manipulated
-in three ways: through a Tcl array variable, a Tcl command, or the C API.
-
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-A vector is simply an ordered set of numbers.  The components
-of a vector are real numbers, indexed by counting numbers. <P>
-Vectors are common
-data structures for many applications.  For example, a graph may use two
-vectors to represent the X-Y coordinates of the data plotted.  The graph
-will automatically be redrawn when the vectors are updated or changed. By
-using vectors,  you can separate data analysis from the graph widget.  This
-makes it easier, for example, to add data transformations, such as splines.
- It's possible to plot the same data to in multiple graphs, where each graph
-presents a different view or scale of the data. <P>
-You could try to use Tcl's
-associative arrays as vectors.  Tcl arrays are easy to use.  You can access
-individual elements randomly by specifying the index, or the set the entire
-array by providing a list of index and value pairs for each element.  The
-disadvantages of  associative arrays as vectors lie in the fact they are
-implemented as hash tables. 
-<UL>
-·<LI>There's no implied ordering to the associative
-arrays.  If you used vectors for plotting, you would want to insure the
-second component comes after the first, an so on.  This isn't possible since
-arrays are actually hash tables.  For example, you can't get a range of values
-between two indices.  Nor can you sort an array. </LI>·<LI>Arrays consume lots of memory
-when the number of elements becomes large (tens of thousands).  This is
-because each element's index and value are stored as strings in the hash
-table. </LI>·<LI>The C programming interface is unwieldy.  Normally with vectors, you
-would like to view the Tcl array as you do a C array, as an array of floats
-or doubles.  But with hash tables, you must convert both the index and value
-to and from decimal strings, just to access an element in the array.  This
-makes it cumbersome to perform operations on the array as a whole. </LI>
-</UL>
-<P>
-The <B>vector</B>
-command tries to overcome these disadvantages while still retaining the
-ease of use of Tcl arrays.  The <B>vector</B> command creates both a new Tcl command
-and associate array which are linked to the vector components.  You can
-randomly access vector components though the elements of array.  Not have
-all indices are generated for the array, so printing the array (using the
-<B>parray</B> procedure) does not print out all the component values.  You can
-use the Tcl command to access the array as a whole.  You can copy, append,
-or sort vector using its command.  If you need greater performance, or customized
-behavior, you can write your own C code to manage vectors. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-You create
-vectors using the <B>vector</B> command and its <B>create</B> operation. <BR>
-<CODE># Create a new vector. <BR>
-vector create y(50)<BR>
-</CODE><P>This creates a new vector named <I>y</I>.  It has fifty components, by default,
-initialized to <I>0.0</I>.  In addition, both a Tcl command and array variable,
-both named <I>y</I>, are created.  You can use either the command or variable to
-query or modify components of the vector. <BR>
-<CODE># Set the first value. <BR>
-set y(0) 9.25<BR>
-puts "y has [y length] components"<BR>
-</CODE><P>The array <I>y</I> can be used to read or set individual components of the vector.
- Vector components are indexed from zero.  The array index must be a number
-less than the number of components.  For example, it's an error if you try
-to set the 51st element of <I>y</I>. <BR>
-<CODE># This is an error. The vector only has 50 components.<BR>
-set y(50) 0.02<BR>
-</CODE><P>You can also specify a range of indices using a colon (:) to separate the
-first and last indices of the range. <BR>
-<CODE># Set the first six components of y <BR>
-set y(0:5) 25.2<BR>
-</CODE><P>If you don't include an index, then it will default to the first and/or
-last component of the vector. <BR>
-<CODE># Print out all the components of y <BR>
-puts "y = $y(:)"<BR>
-</CODE><P>There are special non-numeric indices.  The index <I>end</I>, specifies the last
-component of the vector.  It's an error to use this index if the vector is
-empty (length is zero).  The index <I>++end</I> can be used to extend the vector
-by one component and initialize it to a specific  value.  You can't read
-from the array using this index, though. <BR>
-<CODE># Extend the vector by one component.<BR>
-set y(++end) 0.02<BR>
-</CODE><P>The other special indices are <I>min</I> and <I>max</I>.  They return the current smallest
-and largest components of the vector.   <BR>
-<CODE># Print the bounds of the vector<BR>
-puts "min=$y(min) max=$y(max)"<BR>
-</CODE><P>To delete components from a vector, simply unset the corresponding array
-element. In the following example, the first component of <I>y</I> is deleted. 
-All the remaining components of <I>y</I> will be moved down by one index as the
-length of the vector is reduced by one. <BR>
-<CODE># Delete the first component<BR>
-unset y(0)<BR>
-puts "new first element is $y(0)"<BR>
-</CODE><P>The vector's Tcl command can also be used to query or set the vector. <BR>
-<CODE># Create and set the components of a new vector<BR>
-vector create x<BR>
-x set { 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 }<BR>
-</CODE><P>Here we've created a vector <I>x</I> without a initial length specification. In
-this case, the length is zero.  The <B>set</B> operation resets the vector, extending
-it and setting values for each new component.   <P>
-There are several operations
-for vectors.  The <B>range</B> operation lists the components of a vector between
-two indices. <BR>
-<CODE># List the components <BR>
-puts "x = [x range 0 end]"<BR>
-</CODE><P>You can search for a particular value using the <B>search</B> operation.  It returns
-a list of indices of the components with the same value.  If no component
-has the same value, it returns <I>""</I>. <BR>
-<CODE># Find the index of the biggest component<BR>
-set indices [x search $x(max)]<BR>
-</CODE><P>Other operations copy, append, or sort vectors.  You can append vectors
-or new values onto an existing vector with the <B>append</B> operation. <BR>
-<CODE># Append assorted vectors and values to x<BR>
-x append x2 x3 { 2.3 4.5 } x4<BR>
-</CODE><P>The <B>sort</B> operation sorts the vector.  If any additional vectors are specified,
-they are rearranged in the same order as the vector. For example, you could
-use it to sort data points represented by x and y vectors. <BR>
-<CODE># Sort the data points<BR>
-x sort y<BR>
-</CODE><P>The vector <I>x</I> is sorted while the components of <I>y</I> are  rearranged so that
-the original x,y coordinate pairs are retained. <P>
-The <B>expr</B> operation lets
-you perform arithmetic on vectors.   The result is stored in the vector.
-<BR>
-<CODE># Add the two vectors and a scalar<BR>
-x expr { x + y }<BR>
-x expr { x * 2 }<BR>
-</CODE><P>When a vector is modified, resized, or deleted, it may trigger call-backs
-to notify the clients of the vector.  For example, when a vector used in
-the <B>graph</B> widget is updated, the vector automatically notifies the widget
-that it has changed.  The graph can then redrawn itself at the next idle
-point.  By default, the notification occurs when Tk is next idle.  This way
-you can modify the vector many times without incurring the penalty of the
-graph redrawing itself for each change.  You can change this behavior using
-the <B>notify</B> operation. <BR>
-<CODE># Make vector x notify after every change<BR>
-x notify always<BR>
-<tt> </tt> <tt> </tt> ...<BR>
-# Never notify<BR>
-x notify never<BR>
-<tt> </tt> <tt> </tt> ...<BR>
-# Force notification now<BR>
-x notify now<BR>
-</CODE><P>To delete a vector, use the <B>vector delete</B> command.   Both the vector and
-its corresponding Tcl command are destroyed. <BR>
-<CODE># Remove vector x<BR>
-vector destroy x<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Syntax</A></H2>
-Vectors are created using the <B>vector create</B> operation.   Th <B>create</B>
-operation can be invoked in one of three forms: 
-<DL>
-
-<DT><B>vector create <I>vecName</I></B> </DT>
-<DD>This
-creates a new vector <I>vecName</I> which initially has no components. </DD>
-
-<DT><B>vector create
-<I>vecName</I></B>(<I>size</I>) </DT>
-<DD>This second form creates a new vector which will contain
-<I>size</I> number of components.  The components will be indexed starting from
-zero (0). The default value for the components is <I>0.0</I>. </DD>
-
-<DT><B>vector create <I>vecName</I></B>(<I>first</I>:<I>last</I>)
-</DT>
-<DD>The last form creates a new vector of indexed <I>first</I> through <I>last</I>.  <I>First</I>
-and <I>last</I> can be any integer value so long as <I>first</I> is less than <I>last</I>. </DD>
-</DL>
-<P>
-Vector
-names must start with a letter and consist of letters, digits, or underscores.
-  <BR>
-<CODE># Error: must start with letter<BR>
-vector create 1abc<BR>
-</CODE><P>You can automatically generate vector names using the "<I>#auto</I>" vector name.
- The <B>create</B> operation will generate a  unique vector name. <BR>
-<CODE>set vec [vector create #auto]<BR>
-puts "$vec has [$vec length] components"<BR>
-
-<H3><A NAME="sect6" HREF="#toc6"></CODE><P>Vector Indices</A></H3>
-Vectors are indexed by integers.  You can access the individual
-vector components via its array variable or Tcl command.  The string representing
-the index can be an integer, a numeric expression, a range, or a special
-keyword. <P>
-The index must lie within the current range of the vector, otherwise
-an an error message is returned.  Normally the indices of a vector are start
-from 0.  But you can use the <B>offset</B> operation to change a vector's indices
-on-the-fly. <BR>
-<CODE>puts $vecName(0)<BR>
-vecName offset -5<BR>
-puts $vecName(-5)<BR>
-</CODE><P>You can also use numeric expressions as indices.  The result of the expression
-must be an integer value.   <BR>
-<CODE>set n 21<BR>
-set vecName($n+3) 50.2<BR>
-</CODE><P>The following special non-numeric indices are available: <I>min</I>, <I>max</I>, <I>end</I>,
-and <I>++end</I>.   <BR>
-<CODE>puts "min = $vecName($min)"<BR>
-set vecName(end) -1.2<BR>
-</CODE><P>The indices <I>min</I> and <I>max</I> will return the minimum and maximum values of the
-vector.  The index <I>end</I> returns the value of the  last component in the vector.
- The index <I>++end</I> is used to append new value onto the vector.  It automatically
-extends the vector by one component and sets its value. <BR>
-<CODE># Append an new component to the end<BR>
-set vecName(++end) 3.2<BR>
-</CODE><P>A range of indices can be indicated by a colon (:).   <BR>
-<CODE># Set the first six components to 1.0<BR>
-set vecName(0:5) 1.0<BR>
-</CODE><P>If no index is supplied the first or last component is assumed. <BR>
-<CODE># Print the values of all the components<BR>
-puts $vecName(:)<BR>
-
-<H2><A NAME="sect7" HREF="#toc7"></CODE><P>Vector Operations</A></H2>
-
-<DL>
-
-<DT><B>vector create <I>vecName</I></B>?(<I>size</I>)?... ?<I>switches</I>?  </DT>
-<DD>The <B>create</B> operation
-creates a new vector <I>vecName</I>.  Both a Tcl command and array variable <I>vecName</I>
-are also created.  The name <I>vecName</I> must be unique, so another Tcl command
-or array variable can not already exist in that scope.  You can access the
-components of the vector using its variable.  If you change a value in the
-array, or unset an array element, the vector is updated to reflect the
-changes.  When the variable <I>vecName</I> is unset, the vector and its Tcl command
-are also destroyed. <P>
-The vector has optional switches that affect how the
-vector is created. They are as follows: <blockquote></DD>
-
-<DT><B>-variable <I>varName</I></B> </DT>
-<DD>Specifies the name
-of a Tcl variable to be mapped to the vector. If the variable already exists,
-it is first deleted, then recreated.  If <I>varName</I> is the empty string, then
-no variable will be mapped. You can always map a variable back to the vector
-using the vector's  <B>variable</B> operation. </DD>
-
-<DT><B>-command <I>cmdName</I></B> </DT>
-<DD>Maps a Tcl command
-to the vector. The vector can be accessed using  <I>cmdName</I> and one of the
-vector instance operations.   A Tcl command by that name cannot already
-exist. If <I>cmdName</I> is the empty string, no command mapping will be made. </DD>
-
-<DT><B>-watchunset
-<I>boolean</I></B> </DT>
-<DD>Indicates that the vector should automatically delete itself if
-the variable associated with the vector is unset.  By default, the vector
-will not be deleted.  This is different from previous releases.  Set <I>boolean</I>
-to "true" to get the old behavior. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>vector destroy <I>vecName</I></B> ?<I>vecName...</I>? </DT>
-<DD></DD>
-
-<DT><B>vector
-expr <I>expression</I></B> </DT>
-<DD><blockquote>All binary operators take vectors as operands (remember
-that numbers are treated as one-component vectors).  The exact action of
-binary operators depends upon the length of the second operand.  If the
-second operand has only one component, then each element of the first vector
-operand is computed by that value.  For example, the expression "x * 2"
-multiples all elements of the vector x by 2.  If the second operand has
-more than one component, both operands must be the same length.  Each pair
-of corresponding elements are computed.  So "x + y" adds the the first components
-of x and y together, the second, and so on. <P>
-The valid operators are listed
-below, grouped in decreasing order of precedence: </DD>
-
-<DT><B>-  !</B> </DT>
-<DD>Unary minus and logical
-NOT.  The unary minus flips the sign of each component in the vector.  The
-logical not operator returns a vector of whose values are 0.0 or 1.0.  For
-each non-zero component 1.0 is returned, 0.0 otherwise. </DD>
-
-<DT><B>^</B> </DT>
-<DD>Exponentiation.   </DD>
-
-<DT><B>*
- /  %</B> </DT>
-<DD>Multiply, divide, remainder.   </DD>
-
-<DT><B>+  -</B> </DT>
-<DD>Add and subtract.   </DD>
-
-<DT><B><<  >></B> </DT>
-<DD>Left and
-right shift.  Circularly shifts the values of the vector  (not implemented
-yet). </DD>
-
-<DT><B><  >  <=  >=</B> </DT>
-<DD>Boolean less, greater, less than or equal, and greater than
-or equal. Each operator returns a vector of ones and zeros.  If the condition
-is true,  1.0 is the component value, 0.0 otherwise. </DD>
-
-<DT><B>==  !=</B> </DT>
-<DD>Boolean equal
-and not equal. Each operator returns a vector of ones and zeros.  If the
-condition is true,  1.0 is the component value, 0.0 otherwise. </DD>
-
-<DT><B>|</B> </DT>
-<DD>Bit-wise OR.
- (Not implemented). </DD>
-
-<DT><B>&&</B> </DT>
-<DD>Logical AND.  Produces a 1 result if both operands are
-non-zero, 0 otherwise. </DD>
-
-<DT><B>||</B> </DT>
-<DD>Logical OR.  Produces a 0 result if both operands
-are zero, 1 otherwise. </DD>
-
-<DT><I>x<B>?<I>y<B>:<I>z</I></B></I></B></I> </DT>
-<DD>If-then-else, as in C.  (Not implemented yet).
-</DD>
-</DL>
-<P>
-See the C manual for more details on the results produced by each operator.
- All of the binary operators group left-to-right within the same precedence
-level.   <P>
-Several mathematical functions are supported for vectors.  Each
-of the following functions invokes the math library function of the same
-name; see the manual entries for the library functions for details on what
-they do.  The operation is applied to all elements of the vector returning
-the results.  <BR>
-<CODE><P>
-<B>acos</B><tt> </tt> <tt> </tt> <B>cos</B><tt> </tt> <tt> </tt> <B>hypot</B><tt> </tt> <tt> </tt> <B>sinh</B> <BR>
-<B>asin</B><tt> </tt> <tt> </tt> <B>cosh</B><tt> </tt> <tt> </tt> <B>log</B><tt> </tt> <tt> </tt> <B>sqrt</B> <BR>
-<B>atan</B><tt> </tt> <tt> </tt> <B>exp</B><tt> </tt> <tt> </tt> <B>log10</B><tt> </tt> <tt> </tt> <B>tan</B>  <BR>
-<B>ceil</B><tt> </tt> <tt> </tt> <B>floor</B><tt> </tt> <tt> </tt> <B>sin</B><tt> </tt> <tt> </tt> <B>tanh</B> <BR>
-</CODE><P>Additional functions are: 
-<DL>
-
-<DT><B>abs</B> </DT>
-<DD>Returns the absolute value of each component.
-</DD>
-
-<DT><B>random</B> </DT>
-<DD>Returns a vector of non-negative values uniformly distributed  between
-[0.0, 1.0) using <I>drand48</I>. The seed comes from the internal clock of the machine
-or may be  set manual with the srandom function. </DD>
-
-<DT><B>round</B> </DT>
-<DD>Rounds each component
-of the vector. </DD>
-
-<DT><B>srandom</B> </DT>
-<DD>Initializes the random number generator using <I>srand48</I>.
-The high order 32-bits are set using the integral portion of the first 
-vector component. All other components are ignored.  The low order 16-bits
- are set to an arbitrary value. </DD>
-</DL>
-<P>
-The following functions return a single
-value. 
-<DL>
-
-<DT><B>adev</B>  </DT>
-<DD>Returns the average deviation (defined as the sum of the absolute
-values  of the differences between component and the mean, divided by the
-length of the vector). </DD>
-
-<DT><B>kurtosis</B> </DT>
-<DD>Returns the degree of peakedness (fourth
-moment) of the vector. </DD>
-
-<DT><B>length</B> </DT>
-<DD>Returns the number of components in the vector.
-</DD>
-
-<DT><B>max</B> </DT>
-<DD>Returns the vector's maximum value. </DD>
-
-<DT><B>mean</B> </DT>
-<DD>Returns the mean value of the
-vector. </DD>
-
-<DT><B>median</B> </DT>
-<DD>Returns the median of the vector. </DD>
-
-<DT><B>min</B> </DT>
-<DD>Returns the vector's
-minimum value. </DD>
-
-<DT><B>q1</B> </DT>
-<DD>Returns the first quartile of the vector. </DD>
-
-<DT><B>q3</B> </DT>
-<DD>Returns the
-third quartile of the vector. </DD>
-
-<DT><B>prod</B>  </DT>
-<DD>Returns the product of the components.
-</DD>
-
-<DT><B>sdev</B>  </DT>
-<DD>Returns the standard deviation (defined as the square root of the
-variance) of the vector. </DD>
-
-<DT><B>skew</B>  </DT>
-<DD>Returns the skewness (or third moment) of
-the vector.  This characterizes the degree of asymmetry of the vector about
-the mean. </DD>
-
-<DT><B>sum</B>  </DT>
-<DD>Returns the sum of the components. </DD>
-
-<DT><B>var</B> </DT>
-<DD>Returns the variance
-of the vector. The sum of the squared differences  between each component
-and the mean is computed.  The variance is  the sum divided by the length
-of the vector minus 1. </DD>
-</DL>
-<P>
-The last set returns a vector of the same length
-as the argument. 
-<DL>
-
-<DT><B>norm</B>  </DT>
-<DD>Scales the values of the vector to lie in the range
-[0.0..1.0]. </DD>
-
-<DT><B>sort</B> </DT>
-<DD>Returns the vector components sorted in ascending order. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>vector
-names </B>?<I>pattern</I>? </DT>
-<DD></DD>
-</DL>
-
-<H2><A NAME="sect8" HREF="#toc8">Instance Operations</A></H2>
-You can also use the vector's Tcl command
-to query or modify it.  The general form is <BR>
-<P>
-<CODE><I>vecName <I>operation</I></I> ?<I>arg</I>?...<BR>
-</CODE><P>Both <I>operation</I> and its arguments determine the exact behavior of the command.
- The operations available for vectors are listed below. 
-<DL>
-
-<DT><I>vecName <B>append</B></I> <I>item</I>
-?<I>item</I>?... </DT>
-<DD>Appends the component values from <I>item</I> to <I>vecName</I>. <I>Item</I> can be either
-the name of a vector or a list of numeric values. </DD>
-
-<DT><I>vecName <B>clear</B></I>  </DT>
-<DD>Clears
-the element indices from the array variable associated with <I>vecName</I>.  This
-doesn't affect the components of the vector.  By default, the number of entries
-in the Tcl array doesn't match the number of components in the vector.  This
-is because its too expensive to maintain decimal strings for both the index
-and value for each component.  Instead, the index and value are saved only
-when you read or write an element with a new index.  This command removes
-the index and value strings from the array.  This is useful when the vector
-is large. </DD>
-
-<DT><I>vecName <B>delete</B></I> <I>index</I> ?<I>index</I>?... </DT>
-<DD>Deletes the <I>index</I>th component from
-the vector <I>vecName</I>. <I>Index</I> is the index of the element to be deleted.  This
-is the same as unsetting the array variable element <I>index</I>.  The vector is
-compacted after all the indices have been deleted. </DD>
-
-<DT><I>vecName <B>dup</B></I> <I>destName</I>
- </DT>
-<DD>Copies <I>vecName</I> to <I>destName</I>. <I>DestName</I> is the name of a destination vector.
- If a vector <I>destName</I> already exists, it is overwritten with the components
-of <I>vecName</I>.  Otherwise a  new vector is created. </DD>
-
-<DT><I>vecName <B>expr</B></I> <I>expression</I>
-</DT>
-<DD>Computes the expression and resets the values of the vector accordingly.
-Both scalar and vector math operations are allowed.  All values in expressions
-are either real numbers or names of vectors.  All numbers are treated as
-one component vectors. </DD>
-
-<DT><I>vecName <B>length</B></I> ?<I>newSize</I>? </DT>
-<DD>Queries or resets the number
-of components in <I>vecName</I>. <I>NewSize</I> is a number specifying the new size of
-the vector.  If <I>newSize</I> is smaller than the current size of <I>vecName</I>, <I>vecName</I>
-is truncated.  If <I>newSize</I> is greater, the vector is extended and the new
-components are initialized to <I>0.0</I>.  If no <I>newSize</I> argument is present, the
-current length of the vector is returned. </DD>
-
-<DT><I>vecName <B>merge</B></I> <I>srcName</I> ?<I>srcName</I>?...
-</DT>
-<DD>Merges the named vectors into a single vector.  The resulting  vector is
-formed by merging the components of each source vector  one index at a
-time. </DD>
-
-<DT><I>vecName <B>notify</B></I> <I>keyword</I> </DT>
-<DD>Controls how vector clients are notified of
-changes to the vector.   The exact behavior is determined by <I>keyword</I>. <blockquote></DD>
-
-<DT><I>always</I>
- </DT>
-<DD>Indicates that clients are to be notified immediately whenever the vector
-is updated. </DD>
-
-<DT><I>never</I> </DT>
-<DD>Indicates that no clients are to be notified. </DD>
-
-<DT><I>whenidle</I>
-</DT>
-<DD>Indicates that clients are to be notified at the next idle point whenever
-the vector is updated. </DD>
-
-<DT><I>now</I> </DT>
-<DD>If any client notifications is currently pending,
-they are notified immediately. </DD>
-
-<DT><I>cancel</I> </DT>
-<DD>Cancels pending notifications of clients
-using the vector. </DD>
-
-<DT><I>pending</I> </DT>
-<DD>Returns <I>1</I> if a client notification is pending,
-and <I>0</I> otherwise. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><I>vecName <B>offset</B></I> ?<I>value</I>? </DT>
-<DD>Shifts the indices of the vector
-by the amount specified by <I>value</I>. <I>Value</I> is an integer number.  If no <I>value</I>
-argument is  given, the current offset is returned. </DD>
-
-<DT><I>vecName <B>populate</B></I> <I>destName</I>
-?<I>density</I>? </DT>
-<DD>Creates a vector <I>destName</I> which is a superset of <I>vecName</I>. <I>DestName</I>
-will include all the components of <I>vecName</I>, in addition the interval between
-each of the original components will contain a <I>density</I> number of new components,
-whose values are evenly distributed between the original components values.
- This is useful for generating abscissas to be interpolated along a spline.
-</DD>
-
-<DT><I>vecName <B>range</B></I> <I>firstIndex</I> ?<I>lastIndex</I>?... </DT>
-<DD>Returns a list of numeric values representing
-the vector components between two indices. Both <I>firstIndex</I> and <I>lastIndex</I>
-are  indices representing the range of components to be returned. If  <I>lastIndex</I>
-is less than <I>firstIndex</I>, the components are listed in reverse order. </DD>
-
-<DT><I>vecName
-<B>search</B></I> <I>value</I> ?<I>value</I>?   </DT>
-<DD>Searches for a value or range of values among the
-components of <I>vecName</I>.  If one <I>value</I> argument is given, a list of indices
-of the components which equal <I>value</I> is returned.  If a second <I>value</I> is also
-provided, then the indices of all components which lie within the range
-of the two values are returned. If no components are found, then <I>""</I> is returned.
-</DD>
-
-<DT><I>vecName <B>set</B></I> <I>item</I> </DT>
-<DD>Resets the components of the vector to <I>item</I>. <I>Item</I> can be
-either a list of numeric expressions or another vector. </DD>
-
-<DT><I>vecName <B>seq</B></I> <I>start</I>
-?<I>finish</I>? ?<I>step</I>? </DT>
-<DD>Generates a sequence of values starting with the value
-<I>start</I>. <I>Finish</I> indicates the terminating value of the sequence.   The vector
-is automatically resized to contain just the sequence. If three arguments
-are present, <I>step</I> designates the interval.   <P>
-With only two arguments (no
-<I>finish</I> argument), the sequence will continue until the vector is filled.
- With one argument, the interval  defaults to 1.0. </DD>
-
-<DT><I>vecName <B>sort</B></I> ?<B>-reverse</B>?
-?<I>argName</I>?...   </DT>
-<DD>Sorts the vector <I>vecName</I> in increasing order.  If the <B>-reverse</B>
-flag is present, the vector is sorted in decreasing order.  If other arguments
-<I>argName</I> are present, they are the names of vectors which will be rearranged
-in the same manner as <I>vecName</I>.  Each vector must be the same length as <I>vecName</I>.
-You could use this to sort the x vector of a graph, while still retaining
-the same x,y coordinate pairs in a y vector. </DD>
-
-<DT><I>vecName <B>variable</B></I> <I>varName</I> </DT>
-<DD>Maps
-a Tcl variable to the vector, creating another means for  accessing the
-vector.  The variable <I>varName</I> can't already  exist. This overrides any current
-variable mapping the vector may have. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect9" HREF="#toc9">C Language API</A></H2>
-You can create, modify,
-and destroy vectors from C code, using  library routines.   You need to
-include the header file <I>blt.h</I>. It contains the definition of the structure
-<B>Blt_Vector</B>, which represents the vector.  It appears below. <BR>
-<CODE>typedef struct {<BR>
-    double *<I>valueArr</I>; <BR>
-    int <I>numValues</I>;    <BR>
-    int <I>arraySize</I>;    <BR>
-    double <I>min</I>, <I>max</I>;  <BR>
-} <B>Blt_Vector</B>;<BR>
-</CODE><P>The field <I>valueArr</I> points to memory holding the vector components.  The
-components are stored in a double precision array, whose size size is represented
-by <I>arraySize</I>.  <I>NumValues</I> is the length of vector.  The size of the array
-is always equal to or larger than the length of the vector.  <I>Min</I> and <I>max</I>
-are minimum and maximum component values. 
-<H2><A NAME="sect10" HREF="#toc10">Library Routines</A></H2>
-The following
-routines are available from C to manage vectors. Vectors are identified
-by the vector name. <P>
-<B>Blt_CreateVector</B>  <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_CreateVector</B> (<I>interp</I>, <I>vecName</I>, <I>length</I>, <I>vecPtrPtr</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-char *<I>vecName</I>;<BR>
-int <I>length</I>;<BR>
-Blt_Vector **<I>vecPtrPtr</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Creates a new vector <I>vecName</I> with a length of <I>length</I>. <B>Blt_CreateVector</B>
-creates both a new Tcl command and array  variable <I>vecName</I>.  Neither a command
-nor variable named  <I>vecName</I> can already exist.  A pointer to the vector
-is  placed into <I>vecPtrPtr</I>. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is successfully
-created.  If <I>length</I> is negative, a Tcl variable or command <I>vecName</I> already
-exists, or memory cannot be allocated for the vector, then <I>TCL_ERROR</I> is
-returned and <I>interp->result</I> will contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_DeleteVectorByName</B>
- <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_DeleteVectorByName</B> (<I>interp</I>, <I>vecName</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-char *<I>vecName</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Removes the vector <I>vecName</I>.  <I>VecName</I> is the name of a vector
-which must already exist.  Both the Tcl command and array variable <I>vecName</I>
-are destroyed.  All clients of the vector will be notified immediately that
-the vector has been destroyed. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is
-successfully deleted.  If <I>vecName</I> is not the name a vector, then <I>TCL_ERROR</I>
-is returned and <I>interp->result</I> will contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_DeleteVector</B>
- <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_DeleteVector</B> (<I>vecPtr</I>)<BR>
-<blockquote>Blt_Vector *<I>vecPtr</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Removes the vector pointed to by <I>vecPtr</I>.  <I>VecPtr</I> is a pointer
-to a vector, typically set by <B>Blt_GetVector</B> or <B>Blt_CreateVector</B>.  Both the
-Tcl command and array variable of the vector are destroyed.  All clients
-of the vector will be notified immediately that the vector has been destroyed.
-</DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is successfully deleted.  If <I>vecName</I>
-is not the name a vector, then <I>TCL_ERROR</I> is returned and <I>interp->result</I> will
-contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_GetVector</B>  <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_GetVector</B> (<I>interp</I>, <I>vecName</I>, <I>vecPtrPtr</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-char *<I>vecName</I>;<BR>
-Blt_Vector **<I>vecPtrPtr</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Retrieves the vector <I>vecName</I>.  <I>VecName</I> is the name of a vector
-which must already exist.  <I>VecPtrPtr</I> will point be set to the address of
-the vector. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is successfully retrieved.
- If <I>vecName</I> is not the name of a vector, then <I>TCL_ERROR</I> is returned and
-<I>interp->result</I> will contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_ResetVector</B>  <P>
-<blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_ResetVector</B> (<I>vecPtr</I>, <I>dataArr</I>, <BR>
-<tt> </tt> <tt> </tt> <I>numValues</I>, <I>arraySize</I>, <I>freeProc</I>)<BR>
-<blockquote>Blt_Vector *<I>vecPtr</I>;<BR>
-double *<I>dataArr</I>;<BR>
-int *<I>numValues</I>;<BR>
-int *<I>arraySize</I>;<BR>
-Tcl_FreeProc *<I>freeProc</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description:  </DT>
-<DD>Resets the components of the vector pointed to by <I>vecPtr</I>.
-Calling <B>Blt_ResetVector</B> will trigger the vector to dispatch notifications
-to its clients. <I>DataArr</I> is the array of doubles which represents the vector
-data. <I>NumValues</I> is the number of elements in the array. <I>ArraySize</I> is the
-actual size of the array (the array may be bigger than the number of values
-stored in it). <I>FreeProc</I> indicates how the storage for the vector component
-array (<I>dataArr</I>) was allocated.  It is used to determine how to reallocate
-memory when the vector is resized or destroyed.  It must be <I>TCL_DYNAMIC</I>,
-<I>TCL_STATIC</I>, <I>TCL_VOLATILE</I>, or a pointer to a function to free the memory
-allocated for the vector array. If <I>freeProc</I> is <I>TCL_VOLATILE</I>, it indicates
-that <I>dataArr</I> must be copied and saved.  If <I>freeProc</I> is <I>TCL_DYNAMIC</I>, it indicates
-that <I>dataArr</I> was dynamically allocated and that Tcl should free <I>dataArr</I>
-if necessary.  <I>Static</I> indicates that nothing should be done to release storage
-for <I>dataArr</I>. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is successfully resized.
- If <I>newSize</I> is negative, a vector <I>vecName</I> does not exist, or memory cannot
-be allocated for the vector, then <I>TCL_ERROR</I> is returned and <I>interp->result</I>
-will contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_ResizeVector</B>  <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_ResizeVector</B> (<I>vecPtr</I>, <I>newSize</I>)<BR>
-<blockquote>Blt_Vector *<I>vecPtr</I>;<BR>
-int <I>newSize</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Resets the length of the vector pointed to by <I>vecPtr</I> to <I>newSize</I>.
- If <I>newSize</I> is smaller than the current size of the vector, it is truncated.
- If <I>newSize</I> is greater, the vector is extended and the new components are
-initialized to <I>0.0</I>. Calling <B>Blt_ResetVector</B> will trigger the vector to dispatch
-notifications. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the vector is successfully resized.
- If <I>newSize</I> is negative or memory can not be allocated for the vector,
- then <I>TCL_ERROR</I> is returned and <I>interp->result</I> will contain  an error message.
-<P>
-</DD>
-</DL>
-<P>
-<B>Blt_VectorExists</B>  <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>int <B>Blt_VectorExists</B> (<I>interp</I>, <I>vecName</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-char *<I>vecName</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Indicates if a vector named <I>vecName</I> exists in <I>interp</I>. </DD>
-
-<DT>Results:
-</DT>
-<DD>Returns <I>1</I> if a vector <I>vecName</I> exists and <I>0</I> otherwise. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-If your application
-needs to be notified when a vector changes, it can allocate a unique <I>client
-identifier</I> for itself.  Using this identifier, you can then register a call-back
-to be made whenever the vector is updated or destroyed.  By default, the
-call-backs are made at the next idle point.  This can be changed to occur
-at the time the vector is modified.  An application can allocate more than
-one identifier for any vector.  When the client application is done with
-the vector, it should free the identifier. <P>
-The call-back routine must of
-the following type. <BR>
-<blockquote><BR>
-<CODE>typedef void (<B>Blt_VectorChangedProc</B>) (Tcl_Interp *<I>interp</I>, <BR>
-<blockquote>ClientData <I>clientData</I>, Blt_VectorNotify <I>notify</I>);<BR>
-</blockquote>
-<BR>
-</blockquote>
-</PRE></CODE><P><I>ClientData</I> is passed to this routine whenever it is called.  You can use
-this to pass information to the call-back.  The <I>notify</I>  argument indicates
-whether the vector has been updated of destroyed. It is an enumerated type.
-<BR>
-<blockquote><BR>
-<CODE>typedef enum {<BR>
-    <I>BLT_VECTOR_NOTIFY_UPDATE</I>=1,<BR>
-    <I>BLT_VECTOR_NOTIFY_DESTROY</I>=2<BR>
-} <B>Blt_VectorNotify</B>;<BR>
-<BR>
-</blockquote>
-<P>
-</CODE><P><B>Blt_AllocVectorId</B> <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>Blt_VectorId <B>Blt_AllocVectorId</B> (<I>interp</I>, <I>vecName</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-char *<I>vecName</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Allocates an client identifier for with the vector <I>vecName</I>.
-This identifier can be used to specify a call-back which is triggered when
-the vector is updated or destroyed. </DD>
-
-<DT>Results: </DT>
-<DD>Returns a client identifier
-if successful.  If <I>vecName</I> is not the name of a vector, then <I>NULL</I> is returned
-and <I>interp->result</I> will contain an error message. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_GetVectorById</B>  <blockquote>
-<DL>
-
-<DT>Synopsis:
-</DT>
-<DD><BR>
-<CODE>int <B>Blt_GetVector</B> (<I>interp</I>, <I>clientId</I>, <I>vecPtrPtr</I>)<BR>
-<blockquote>Tcl_Interp *<I>interp</I>;<BR>
-Blt_VectorId <I>clientId</I>;<BR>
-Blt_Vector **<I>vecPtrPtr</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description: </DT>
-<DD>Retrieves the vector used by <I>clientId</I>.  <I>ClientId</I> is a valid
-vector client identifier allocated by <B>Blt_AllocVectorId</B>. <I>VecPtrPtr</I> will
-point be set to the address of the vector. </DD>
-
-<DT>Results: </DT>
-<DD>Returns <I>TCL_OK</I> if the
-vector is successfully retrieved.   </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_SetVectorChangedProc</B> <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>void <B>Blt_SetVectorChangedProc</B> (<I>clientId</I>, <I>proc</I>, <I>clientData</I>);<BR>
-<blockquote>Blt_VectorId <I>clientId</I>;<BR>
-Blt_VectorChangedProc *<I>proc</I>;<BR>
-ClientData *<I>clientData</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description:  </DT>
-<DD>Specifies a call-back routine to be called whenever the vector
-associated with <I>clientId</I> is updated or deleted.  <I>Proc</I> is a pointer to call-back
-routine and must be of the type <B>Blt_VectorChangedProc</B>.  <I>ClientData</I> is a
-one-word value to be passed to the routine when it is invoked. If <I>proc</I> is
-<I>NULL</I>, then the client is not notified. </DD>
-
-<DT>Results: </DT>
-<DD>The designated call-back
-procedure will be invoked when the vector is  updated or destroyed. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_FreeVectorId</B>
-<blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>void <B>Blt_FreeVectorId</B> (<I>clientId</I>);<BR>
-<blockquote>Blt_VectorId <I>clientId</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description:  </DT>
-<DD>Frees the client identifier.  Memory allocated for the identifier
- is released.  The client will no longer be notified when the vector is
-modified. </DD>
-
-<DT>Results: </DT>
-<DD>The designated call-back procedure will be no longer be
-invoked when the vector is updated or destroyed. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_NameOfVectorId</B> <blockquote>
-<DL>
-
-<DT>Synopsis:
-</DT>
-<DD><BR>
-<CODE>char *<B>Blt_NameOfVectorId</B> (<I>clientId</I>);<BR>
-<blockquote>Blt_VectorId <I>clientId</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description:  </DT>
-<DD>Retrieves the name of the vector associated with the client
-identifier <I>clientId</I>.   </DD>
-
-<DT>Results: </DT>
-<DD>Returns the name of the vector associated
-with <I>clientId</I>.  If <I>clientId</I> is not an identifier or the vector has been
-destroyed,  <I>NULL</I> is returned. </DD>
-</DL>
-</blockquote>
-<P>
-<P>
-<B>Blt_InstallIndexProc</B> <blockquote>
-<DL>
-
-<DT>Synopsis: </DT>
-<DD><BR>
-<CODE>void <B>Blt_InstallIndexProc</B> (<I>indexName</I>, <I>procPtr</I>)<BR>
-<blockquote>char *<I>indexName</I>;<BR>
-Blt_VectorIndexProc *<I>procPtr</I>;<BR>
-</DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT></CODE><P>Description:  </DT>
-<DD>Registers a function to be called to retrieved the index
-<I>indexName</I> from the vector's array variable.   <P>
-typedef double Blt_VectorIndexProc(Vector
-*vecPtr); <P>
-The function will be passed a pointer to the vector.  The function
-must return a double representing the value at the index. </DD>
-
-<DT>Results: </DT>
-<DD>The new
-index is installed into the vector. </DD>
-</DL>
-</blockquote>
-</blockquote>
-
-<H2><A NAME="sect11" HREF="#toc11">C API Example</A></H2>
-The following example opens
-a file of binary data and stores it in an array of doubles. The array size
-is computed from the size of the file. If the vector "data" exists, calling
-<B>Blt_VectorExists</B>, <B>Blt_GetVector</B> is called to get the pointer to the vector.
-Otherwise the routine <B>Blt_CreateVector</B> is called to create a new vector
-and returns a pointer to it. Just like the Tcl interface, both a new Tcl
-command and array variable are created when a new vector is created. It
-doesn't make any difference what the initial size of the vector is since
-it will be reset shortly. The vector is updated when <B>lt_ResetVector</B> is called.
- Blt_ResetVector makes the changes visible to the Tcl interface and other
-vector clients (such as a graph widget). <P>
-<BR>
-<CODE>#include <tcl.h><BR>
-#include <blt.h><tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> <tt> </tt> <BR>
-
-<!--
-  
-Blt_Vector *vecPtr;<BR>
-double *newArr;<BR>
-FILE *f;<BR>
-struct stat statBuf;<BR>
-int numBytes, numValues;<BR>
-<P>
-f = fopen("binary.dat", "r");<BR>
-fstat(fileno(f), &statBuf);<BR>
-numBytes = (int)statBuf.st_size;<BR>
-<P>
-/* Allocate an array big enough to hold all the data */<BR>
-newArr = (double *)m<A HREF="alloc.n.html">alloc(numBytes)</A>
-;<BR>
-numValues = numBytes / sizeof(double);<BR>
-fread((void *)newArr, numValues, sizeof(double), f);<BR>
-fclose(f);<BR>
-<P>
-if (Blt_VectorExists(interp, "data"))  {<BR>
-    if (Blt_GetVector(interp, "data", &vecPtr) != TCL_OK) {<BR>
-<tt> </tt> <tt> </tt> return TCL_ERROR;<BR>
-    }<BR>
-} else {<BR>
-   if (Blt_CreateVector(interp, "data", 0, &vecPtr) != TCL_OK) {<BR>
-<tt> </tt> <tt> </tt> return TCL_ERROR;<BR>
-   }<BR>
-}<BR>
-/* <BR>
- * Reset the vector. Clients will be notified when Tk is idle. <BR>
- * TCL_DYNAMIC tells the vector to free the memory allocated <BR>
- * if it needs to reallocate or destroy the vector.<BR>
- */<BR>
-if (Blt_ResetVector(vecPtr, newArr, numValues, numValues, <BR>
-<tt> </tt> <tt> </tt> TCL_DYNAMIC) != TCL_OK) {<BR>
-    return TCL_ERROR;<BR>
-}<BR>
-
--->
-
-<H2><A NAME="sect12" HREF="#toc12"></CODE><P>Incompatibilities</A></H2>
-In previous versions, if the array variable isn't global
- (i.e. local to a Tcl procedure), the vector is automatically  destroyed
-when the procedure returns. <BR>
-<CODE>proc doit {} {<BR>
-    # Temporary vector x<BR>
-    vector x(10)<BR>
-    set <A HREF="x.9.html">x(9)</A>
- 2.0<BR>
-      ...<BR>
-}<BR>
-<P>
-</CODE><P>This has changed.  Variables are not automatically destroyed when their
-variable is unset.  You can restore the old behavior by setting the "-watchunset"
-switch. 
-<H2><A NAME="sect13" HREF="#toc13"></CODE><P>Keywords</A></H2>
-vector, graph, widget <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Syntax</A></LI>
-<UL>
-<LI><A NAME="toc6" HREF="#sect6">Vector Indices</A></LI>
-</UL>
-<LI><A NAME="toc7" HREF="#sect7">Vector Operations</A></LI>
-<LI><A NAME="toc8" HREF="#sect8">Instance Operations</A></LI>
-<LI><A NAME="toc9" HREF="#sect9">C Language API</A></LI>
-<LI><A NAME="toc10" HREF="#sect10">Library Routines</A></LI>
-<LI><A NAME="toc11" HREF="#sect11">C API Example</A></LI>
-<LI><A NAME="toc12" HREF="#sect12">Incompatibilities</A></LI>
-<LI><A NAME="toc13" HREF="#sect13">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/watch.html b/blt3.0/html/watch.html
deleted file mode 100644
index 2059c07..0000000
--- a/blt3.0/html/watch.html
+++ /dev/null
@@ -1,140 +0,0 @@
-                    <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>watch(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
-
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-watch - call Tcl procedures before and after each
-command 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>watch create</B> <I>watchName</I> ?<I>options</I>? <P>
-<B>watch activate</B> <I>watchName</I>
-<P>
-<B>watch deactivate</B> <I>watchName</I> <P>
-<B>watch delete</B> <I>watchName</I> <P>
-<B>watch configure</B> <I>watchName</I>
-?<I>options</I> <P>
-<B>watch info</B> <I>watchName</I> <P>
-<B>watch names</B>  
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>watch</B> command
-arranges for Tcl procedures to be invoked before and after the execution
-of each Tcl command. 
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-When an error occurs in Tcl, the global
-variable <I>errorInfo</I> will contain a stack-trace of the active procedures when
-the error occured. Sometimes, however, the stack trace is insufficient. 
-You may need to know exactly where in the program's execution the error
-occured.  In cases like this, a more general tracing facility would be useful.
-<P>
-The <B>watch</B> command lets you designate Tcl procedures to be invoked before
-and after the execution of each Tcl command.  This means you can display
-the command line and its results for each command as it executes.  Another
-use is to profile your Tcl commands. You can profile any Tcl command (like
-<B>if</B> and <B>set</B>), not just Tcl procedures. 
-<H2><A NAME="sect4" HREF="#toc4">Example</A></H2>
-The following example use <B>watch</B>
-to trace Tcl commands  (printing to standard error) both before and after
-they are executed.  <BR>
-<CODE>proc preCmd { level command argv } {<BR>
-    set name [lindex $argv 0]<BR>
-    puts stderr "$level $name => $command"<BR>
-}<BR>
-<P>
-proc postCmd { level command argv retcode results } {<BR>
-    set name [lindex $argv 0]<BR>
-    puts stderr "$level $name => $argv0= ($retcode) $results"<BR>
-}<BR>
-watch create trace \<BR>
-<tt> </tt> <tt> </tt> -postcmd postCmd -precmd preCmd<BR>
-
-<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Operations</A></H2>
-The following operations are available for the <B>watch</B> command:
-
-<DL>
-
-<DT><B>watch activate <I>watchName</I></B>  </DT>
-<DD>Activates the watch, causing Tcl commands the
-be traced to the maximum depth selected. </DD>
-
-<DT><B>watch create <I>watchName</I></B> ?<I>options</I>?...
-</DT>
-<DD>Creates a new watch <I>watchName</I>. It's an error if another watch  <I>watchName</I>
-already exists and an error message will be returned. <I>Options</I> may have any
-of the values accepted by the  <B>watch configure</B> command. This command returns
-the empty string.   </DD>
-
-<DT><B>watch configure <I>watchName</I></B> ?<I>options...</I>? </DT>
-<DD>Queries or modifies
-the configuration options of the watch <I>watchName</I>. <I>WatchName</I> is the name
-of a watch. <I>Options</I> may have any of the following values: <blockquote></DD>
-
-<DT><B>-active <I>boolean</I></B>
-</DT>
-<DD>Specifies if the watch is active. By default, watches are active when created.
-</DD>
-
-<DT><B>-postcmd <I>string</I></B> </DT>
-<DD>Specifies a Tcl procedure to be called immediately after
-each Tcl command.  <I>String</I> is name of a Tcl procedure and any extra arguments
-to be passed to it.  Before <I>string</I> is invoked, five more arguments are appended:
-1) the current level 2) the current command line 3) a list containing the
-command after substitutions and split into words 4) the return code of
-the command, and 5) the results of the command.  The return status of the
-postcmd procedure is always ignored. </DD>
-
-<DT><B>-precmd <I>string</I></B>  </DT>
-<DD>Specifies a Tcl procedure
-to be called immediately before each Tcl command.  <I>String</I> is name of a Tcl
-procedure and any extra arguments to be passed to it.  Before <I>string</I> is
-invoked, three arguments are appended: 1) the current level 2) the current
-command line, and 3) a list containing the command after substitutions
-and split into words.  The return status of the <B>-precmd</B> procedure is always
-ignored. </DD>
-
-<DT><B>-maxlevel <I>number</I></B> </DT>
-<DD>Specifies the maximum evaluation depth to watch
-Tcl commands. The default maximum level is 10000. </DD>
-</DL>
-</blockquote>
-
-<DL>
-
-<DT><B>watch deactivate <I>watchName</I></B>
- </DT>
-<DD>Deactivates the watch.  The <B>-precmd</B> and <B>-postcmd</B> procedures will no longer
-be invoked. </DD>
-
-<DT><B>watch info <I>watchName</I></B>  </DT>
-<DD>Returns the configuration information
-associated with the  watch <I>watchName</I>.  <I>WatchName</I> is the name of a watch.
-</DD>
-
-<DT><B>watch names</B> ?<I>state</I>? </DT>
-<DD>Lists the names of the watches for a given state.  <I>State</I>
-may be one of the following: <I>active</I>, <I>idle</I>, or <I>ignore</I>.  If a <I>state</I> argument
-isn't specified,  all watches are<BR>
- listed. </DD>
-</DL>
-</blockquote>
-
-<H2><A NAME="sect6" HREF="#toc6">Keywords</A></H2>
-debug, profile <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Example</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Operations</A></LI>
-<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/html/winop.html b/blt3.0/html/winop.html
deleted file mode 100644
index 396a41f..0000000
--- a/blt3.0/html/winop.html
+++ /dev/null
@@ -1,124 +0,0 @@
-                     <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, -->
-<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
-
-<HTML>
-<HEAD>
-<TITLE>winop(n) manual page</TITLE>
-</HEAD>
-<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<A HREF="#toc">Table of Contents</A><P>
- 
-<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
-winop - Perform assorted window operations 
-<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
-<B>winop
-lower</B> ?<I>window</I>?... <P>
-<B>winop map</B> ?<I>window</I>?... <P>
-<B>winop move <I>window x y</I></B> <P>
-<B>winop raise</B> ?<I>window</I>?...
-<P>
-<B>winop snap <I>window photoName</I></B> <P>
-<B>winop unmap</B> ?<I>window</I>?... <P>
-<B>winop warpto</B> ?<I>window</I>?
-
-<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
-The <B>winop</B> command performs various window operations on Tk windows
-using low-level Xlib function calls to work around window manager pecularities.
-
-<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2>
-Tk has several commands for manipulating its windows: <B>raise</B>,
-<B>lower</B>, <B>wm</B>, etc.  These commands ask the window manager to perform operations
-on Tk windows.  In some cases, a particular window manager won't perform
-the operation as expected. <P>
-For example, if you positioned a toplevel window
-using <B>wm geometry</B>, the window may not actually be at those particular coordinates.
- The position of the window may be offset by dimensions of the title bar
-added by the window manager.   <P>
-In situations like these, the <B>winop</B> command
-can be used to workaround these difficulties.  Instead, it makes low-level
-Xlib (such <B>XRaiseWindow</B> and <B>XMapWindow</B>) calls to perform these operations.
-<BR>
-<CODE>toplevel .top<BR>
-wm withdraw .top<BR>
-<P>
-# Set the geometry to make the window manager <BR>
-# place the window.<BR>
-wm geometry .top +100+100<BR>
-<P>
-# Move the window to the desired location<BR>
-# and "update" to force the window manager<BR>
-# to recognize it.<BR>
-winop move .top 100 100<BR>
-update <BR>
-<P>
-wm deiconify .top<BR>
-winop move .top 100 100<BR>
-
-<H2><A NAME="sect4" HREF="#toc4"></CODE><P>Operations</A></H2>
-The following operations are available for the <B>winop</B> command:
-
-<DL>
-
-<DT><B>winop lower</B> ?<I>window</I>?... </DT>
-<DD>Lowers <I>window</I> to the bottom of the X window stack.
- <I>Window</I> is the path name of a Tk window.   </DD>
-
-<DT><B>winop map</B> ?<I>window</I>?... </DT>
-<DD>Maps <I>window</I>
-on the screen.  <I>Window</I> is the path name of a Tk window. If <I>window</I> is already
-mapped, this command has no effect.   </DD>
-
-<DT><B>winop move <I>window x y</I></B> </DT>
-<DD>Move <I>window</I>
-to the screen location specified by <I>x</I> and <I>y</I>. <I>Window</I> is the path name of
-a Tk window, while <I>x</I> and <I>y</I> are screen coordinates.  This command returns
- the empty string. </DD>
-
-<DT><B>winop raise</B> ?<I>window</I>?... </DT>
-<DD>Raises <I>window</I> to the top of the
-X window stack. <I>Window</I> must be a valid path name of a Tk window.  This command
-returns the empty string. </DD>
-
-<DT><B>winop snap <I>window photoName</I></B> </DT>
-<DD>Takes a snapshot of
-the <I>window</I> and stores the contents in the photo image <I>photoName</I>. <I>Window</I>
-is the valid path name of a Tk window which must be totally visible (unobscured).
- <I>PhotoName</I> is the name of a Tk photo image which must already exist.  This
-command can fail if the window is obscured in any fashion, such as covered
-by  another window or partially offscreen.  In that case, an error message
-is returned. </DD>
-
-<DT><B>winop unmap</B> ?<I>window</I>?... </DT>
-<DD>Unmaps <I>window</I> from the screen. <I>Window</I> is
-the path name of a Tk window.  </DD>
-
-<DT><B>winop warpto</B> ?<I>window</I>? </DT>
-<DD>Warps the pointer to
-<I>window</I>. <I>Window</I> is the path name of a Tk window which must be mapped. If <I>window</I>
-is in the form <I>@x,y</I>, where <I>x</I> and <I>y</I> are root screen coordinates, the pointer
-is warped to that location on the screen. <P>
-[<I>I've never heard a good case for
-warping the pointer in an application.  It can be useful for testing, but
-in applications, it's always a bad idea.  Simply stated, the user owns the
-pointer, not the application.  If you have an application that needs it,
-I'd like to hear about it.</I>] <P>
-If no <I>window</I> argument is present the current
-location of the pointer is returned. The location is returned as a list
-in the form "<I>x y</I>", where <I>x</I> and <I>y</I> are the current coordinates of the pointer.
-</DD>
-</DL>
-
-<H2><A NAME="sect5" HREF="#toc5">Keywords</A></H2>
-window, map, raise, lower, pointer, warp <P>
-
-<HR><P>
-<A NAME="toc"><B>Table of Contents</B></A><P>
-<UL>
-<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
-<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
-<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
-<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI>
-<LI><A NAME="toc4" HREF="#sect4">Operations</A></LI>
-<LI><A NAME="toc5" HREF="#sect5">Keywords</A></LI>
-</UL>
-</BODY></HTML>
diff --git a/blt3.0/library/AFM/AvantGarde-Book.afm b/blt3.0/library/AFM/AvantGarde-Book.afm
deleted file mode 100644
index 1e60fee..0000000
--- a/blt3.0/library/AFM/AvantGarde-Book.afm
+++ /dev/null
@@ -1,574 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Mar  4 13:37:31 1991
-Comment UniqueID 34364
-Comment VMusage 24225 31117
-FontName AvantGarde-Book
-FullName ITC Avant Garde Gothic Book
-FamilyName ITC Avant Garde Gothic
-Weight Book
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -113 -222 1148 955
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 740
-XHeight 547
-Ascender 740
-Descender -192
-StartCharMetrics 228
-C 32 ; WX 277 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 295 ; N exclam ; B 111 0 185 740 ;
-C 34 ; WX 309 ; N quotedbl ; B 36 444 273 740 ;
-C 35 ; WX 554 ; N numbersign ; B 33 0 521 740 ;
-C 36 ; WX 554 ; N dollar ; B 70 -70 485 811 ;
-C 37 ; WX 775 ; N percent ; B 21 -13 753 751 ;
-C 38 ; WX 757 ; N ampersand ; B 56 -12 736 753 ;
-C 39 ; WX 351 ; N quoteright ; B 94 546 256 740 ;
-C 40 ; WX 369 ; N parenleft ; B 47 -205 355 757 ;
-C 41 ; WX 369 ; N parenright ; B 14 -205 322 757 ;
-C 42 ; WX 425 ; N asterisk ; B 58 446 367 740 ;
-C 43 ; WX 606 ; N plus ; B 51 0 555 506 ;
-C 44 ; WX 277 ; N comma ; B 14 -67 176 126 ;
-C 45 ; WX 332 ; N hyphen ; B 30 248 302 315 ;
-C 46 ; WX 277 ; N period ; B 102 0 176 126 ;
-C 47 ; WX 437 ; N slash ; B 44 -100 403 740 ;
-C 48 ; WX 554 ; N zero ; B 29 -13 525 753 ;
-C 49 ; WX 554 ; N one ; B 135 0 336 740 ;
-C 50 ; WX 554 ; N two ; B 40 0 514 753 ;
-C 51 ; WX 554 ; N three ; B 34 -13 506 753 ;
-C 52 ; WX 554 ; N four ; B 14 0 528 740 ;
-C 53 ; WX 554 ; N five ; B 26 -13 530 740 ;
-C 54 ; WX 554 ; N six ; B 24 -13 530 739 ;
-C 55 ; WX 554 ; N seven ; B 63 0 491 740 ;
-C 56 ; WX 554 ; N eight ; B 41 -13 513 753 ;
-C 57 ; WX 554 ; N nine ; B 24 0 530 752 ;
-C 58 ; WX 277 ; N colon ; B 102 0 176 548 ;
-C 59 ; WX 277 ; N semicolon ; B 14 -67 176 548 ;
-C 60 ; WX 606 ; N less ; B 46 -8 554 514 ;
-C 61 ; WX 606 ; N equal ; B 51 118 555 388 ;
-C 62 ; WX 606 ; N greater ; B 52 -8 560 514 ;
-C 63 ; WX 591 ; N question ; B 64 0 526 752 ;
-C 64 ; WX 867 ; N at ; B 65 -13 803 753 ;
-C 65 ; WX 740 ; N A ; B 12 0 729 740 ;
-C 66 ; WX 574 ; N B ; B 74 0 544 740 ;
-C 67 ; WX 813 ; N C ; B 43 -13 771 752 ;
-C 68 ; WX 744 ; N D ; B 74 0 699 740 ;
-C 69 ; WX 536 ; N E ; B 70 0 475 740 ;
-C 70 ; WX 485 ; N F ; B 70 0 444 740 ;
-C 71 ; WX 872 ; N G ; B 40 -13 828 753 ;
-C 72 ; WX 683 ; N H ; B 76 0 607 740 ;
-C 73 ; WX 226 ; N I ; B 76 0 150 740 ;
-C 74 ; WX 482 ; N J ; B 6 -13 402 740 ;
-C 75 ; WX 591 ; N K ; B 81 0 591 740 ;
-C 76 ; WX 462 ; N L ; B 82 0 462 740 ;
-C 77 ; WX 919 ; N M ; B 76 0 843 740 ;
-C 78 ; WX 740 ; N N ; B 75 0 664 740 ;
-C 79 ; WX 869 ; N O ; B 43 -13 826 753 ;
-C 80 ; WX 592 ; N P ; B 75 0 564 740 ;
-C 81 ; WX 871 ; N Q ; B 40 -13 837 753 ;
-C 82 ; WX 607 ; N R ; B 70 0 572 740 ;
-C 83 ; WX 498 ; N S ; B 22 -13 473 753 ;
-C 84 ; WX 426 ; N T ; B 6 0 419 740 ;
-C 85 ; WX 655 ; N U ; B 75 -13 579 740 ;
-C 86 ; WX 702 ; N V ; B 8 0 693 740 ;
-C 87 ; WX 960 ; N W ; B 11 0 950 740 ;
-C 88 ; WX 609 ; N X ; B 8 0 602 740 ;
-C 89 ; WX 592 ; N Y ; B 1 0 592 740 ;
-C 90 ; WX 480 ; N Z ; B 12 0 470 740 ;
-C 91 ; WX 351 ; N bracketleft ; B 133 -179 337 753 ;
-C 92 ; WX 605 ; N backslash ; B 118 -100 477 740 ;
-C 93 ; WX 351 ; N bracketright ; B 14 -179 218 753 ;
-C 94 ; WX 606 ; N asciicircum ; B 53 307 553 740 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 351 ; N quoteleft ; B 95 546 257 740 ;
-C 97 ; WX 683 ; N a ; B 42 -13 621 561 ;
-C 98 ; WX 682 ; N b ; B 68 -13 647 740 ;
-C 99 ; WX 647 ; N c ; B 41 -13 607 561 ;
-C 100 ; WX 685 ; N d ; B 39 -13 618 740 ;
-C 101 ; WX 650 ; N e ; B 38 -13 608 561 ;
-C 102 ; WX 314 ; N f ; B 19 0 314 753 ; L i fi ; L l fl ;
-C 103 ; WX 673 ; N g ; B 37 -215 606 561 ;
-C 104 ; WX 610 ; N h ; B 62 0 543 740 ;
-C 105 ; WX 200 ; N i ; B 65 0 135 740 ;
-C 106 ; WX 203 ; N j ; B -44 -192 137 740 ;
-C 107 ; WX 502 ; N k ; B 70 0 498 740 ;
-C 108 ; WX 200 ; N l ; B 65 0 135 740 ;
-C 109 ; WX 938 ; N m ; B 66 0 872 561 ;
-C 110 ; WX 610 ; N n ; B 65 0 546 561 ;
-C 111 ; WX 655 ; N o ; B 42 -13 614 561 ;
-C 112 ; WX 682 ; N p ; B 64 -192 643 561 ;
-C 113 ; WX 682 ; N q ; B 37 -192 616 561 ;
-C 114 ; WX 301 ; N r ; B 65 0 291 561 ;
-C 115 ; WX 388 ; N s ; B 24 -13 364 561 ;
-C 116 ; WX 339 ; N t ; B 14 0 330 740 ;
-C 117 ; WX 608 ; N u ; B 62 -13 541 547 ;
-C 118 ; WX 554 ; N v ; B 7 0 546 547 ;
-C 119 ; WX 831 ; N w ; B 13 0 820 547 ;
-C 120 ; WX 480 ; N x ; B 12 0 468 547 ;
-C 121 ; WX 536 ; N y ; B 15 -192 523 547 ;
-C 122 ; WX 425 ; N z ; B 10 0 415 547 ;
-C 123 ; WX 351 ; N braceleft ; B 70 -189 331 740 ;
-C 124 ; WX 672 ; N bar ; B 299 -100 373 740 ;
-C 125 ; WX 351 ; N braceright ; B 20 -189 281 740 ;
-C 126 ; WX 606 ; N asciitilde ; B 72 179 534 319 ;
-C 161 ; WX 295 ; N exclamdown ; B 110 -192 184 548 ;
-C 162 ; WX 554 ; N cent ; B 48 62 510 707 ;
-C 163 ; WX 554 ; N sterling ; B 4 0 552 753 ;
-C 164 ; WX 166 ; N fraction ; B -113 0 280 740 ;
-C 165 ; WX 554 ; N yen ; B 4 0 550 740 ;
-C 166 ; WX 554 ; N florin ; B -12 -153 518 818 ;
-C 167 ; WX 615 ; N section ; B 85 -141 529 753 ;
-C 168 ; WX 554 ; N currency ; B 8 42 546 580 ;
-C 169 ; WX 198 ; N quotesingle ; B 59 444 140 740 ;
-C 170 ; WX 502 ; N quotedblleft ; B 97 546 406 740 ;
-C 171 ; WX 425 ; N guillemotleft ; B 40 81 386 481 ;
-C 172 ; WX 251 ; N guilsinglleft ; B 40 81 212 481 ;
-C 173 ; WX 251 ; N guilsinglright ; B 39 81 211 481 ;
-C 174 ; WX 487 ; N fi ; B 19 0 422 753 ;
-C 175 ; WX 485 ; N fl ; B 19 0 420 753 ;
-C 177 ; WX 500 ; N endash ; B 35 248 465 315 ;
-C 178 ; WX 553 ; N dagger ; B 59 -133 493 740 ;
-C 179 ; WX 553 ; N daggerdbl ; B 59 -133 493 740 ;
-C 180 ; WX 277 ; N periodcentered ; B 102 190 176 316 ;
-C 182 ; WX 564 ; N paragraph ; B 22 -110 551 740 ;
-C 183 ; WX 606 ; N bullet ; B 150 222 455 532 ;
-C 184 ; WX 354 ; N quotesinglbase ; B 89 -68 251 126 ;
-C 185 ; WX 502 ; N quotedblbase ; B 89 -68 399 126 ;
-C 186 ; WX 484 ; N quotedblright ; B 96 546 405 740 ;
-C 187 ; WX 425 ; N guillemotright ; B 39 81 385 481 ;
-C 188 ; WX 1000 ; N ellipsis ; B 130 0 870 126 ;
-C 189 ; WX 1174 ; N perthousand ; B 25 -13 1148 751 ;
-C 191 ; WX 591 ; N questiondown ; B 65 -205 527 548 ;
-C 193 ; WX 378 ; N grave ; B 69 619 300 786 ;
-C 194 ; WX 375 ; N acute ; B 78 619 309 786 ;
-C 195 ; WX 502 ; N circumflex ; B 74 639 428 764 ;
-C 196 ; WX 439 ; N tilde ; B 47 651 392 754 ;
-C 197 ; WX 485 ; N macron ; B 73 669 411 736 ;
-C 198 ; WX 453 ; N breve ; B 52 651 401 754 ;
-C 199 ; WX 222 ; N dotaccent ; B 74 639 148 765 ;
-C 200 ; WX 369 ; N dieresis ; B 73 639 295 765 ;
-C 202 ; WX 332 ; N ring ; B 62 600 269 807 ;
-C 203 ; WX 324 ; N cedilla ; B 80 -222 254 0 ;
-C 205 ; WX 552 ; N hungarumlaut ; B 119 605 453 800 ;
-C 206 ; WX 302 ; N ogonek ; B 73 -191 228 0 ;
-C 207 ; WX 502 ; N caron ; B 68 639 423 764 ;
-C 208 ; WX 1000 ; N emdash ; B 35 248 965 315 ;
-C 225 ; WX 992 ; N AE ; B -20 0 907 740 ;
-C 227 ; WX 369 ; N ordfeminine ; B -3 407 356 753 ;
-C 232 ; WX 517 ; N Lslash ; B 59 0 517 740 ;
-C 233 ; WX 868 ; N Oslash ; B 43 -83 826 819 ;
-C 234 ; WX 1194 ; N OE ; B 45 -13 1142 753 ;
-C 235 ; WX 369 ; N ordmasculine ; B 12 407 356 753 ;
-C 241 ; WX 1157 ; N ae ; B 34 -13 1113 561 ;
-C 245 ; WX 200 ; N dotlessi ; B 65 0 135 547 ;
-C 248 ; WX 300 ; N lslash ; B 43 0 259 740 ;
-C 249 ; WX 653 ; N oslash ; B 41 -64 613 614 ;
-C 250 ; WX 1137 ; N oe ; B 34 -13 1104 561 ;
-C 251 ; WX 554 ; N germandbls ; B 61 -13 525 753 ;
-C -1 ; WX 650 ; N ecircumflex ; B 38 -13 608 764 ;
-C -1 ; WX 650 ; N edieresis ; B 38 -13 608 765 ;
-C -1 ; WX 683 ; N aacute ; B 42 -13 621 786 ;
-C -1 ; WX 747 ; N registered ; B -9 -12 755 752 ;
-C -1 ; WX 200 ; N icircumflex ; B -77 0 277 764 ;
-C -1 ; WX 608 ; N udieresis ; B 62 -13 541 765 ;
-C -1 ; WX 655 ; N ograve ; B 42 -13 614 786 ;
-C -1 ; WX 608 ; N uacute ; B 62 -13 541 786 ;
-C -1 ; WX 608 ; N ucircumflex ; B 62 -13 541 764 ;
-C -1 ; WX 740 ; N Aacute ; B 12 0 729 949 ;
-C -1 ; WX 200 ; N igrave ; B -60 0 171 786 ;
-C -1 ; WX 226 ; N Icircumflex ; B -64 0 290 927 ;
-C -1 ; WX 647 ; N ccedilla ; B 41 -222 607 561 ;
-C -1 ; WX 683 ; N adieresis ; B 42 -13 621 765 ;
-C -1 ; WX 536 ; N Ecircumflex ; B 70 0 475 927 ;
-C -1 ; WX 388 ; N scaron ; B 11 -13 366 764 ;
-C -1 ; WX 682 ; N thorn ; B 64 -192 643 740 ;
-C -1 ; WX 1000 ; N trademark ; B 9 296 816 740 ;
-C -1 ; WX 650 ; N egrave ; B 38 -13 608 786 ;
-C -1 ; WX 332 ; N threesuperior ; B 18 289 318 747 ;
-C -1 ; WX 425 ; N zcaron ; B 10 0 415 764 ;
-C -1 ; WX 683 ; N atilde ; B 42 -13 621 754 ;
-C -1 ; WX 683 ; N aring ; B 42 -13 621 807 ;
-C -1 ; WX 655 ; N ocircumflex ; B 42 -13 614 764 ;
-C -1 ; WX 536 ; N Edieresis ; B 70 0 475 928 ;
-C -1 ; WX 831 ; N threequarters ; B 46 0 784 747 ;
-C -1 ; WX 536 ; N ydieresis ; B 15 -192 523 765 ;
-C -1 ; WX 536 ; N yacute ; B 15 -192 523 786 ;
-C -1 ; WX 200 ; N iacute ; B 31 0 262 786 ;
-C -1 ; WX 740 ; N Acircumflex ; B 12 0 729 927 ;
-C -1 ; WX 655 ; N Uacute ; B 75 -13 579 949 ;
-C -1 ; WX 650 ; N eacute ; B 38 -13 608 786 ;
-C -1 ; WX 869 ; N Ograve ; B 43 -13 826 949 ;
-C -1 ; WX 683 ; N agrave ; B 42 -13 621 786 ;
-C -1 ; WX 655 ; N Udieresis ; B 75 -13 579 928 ;
-C -1 ; WX 683 ; N acircumflex ; B 42 -13 621 764 ;
-C -1 ; WX 226 ; N Igrave ; B -47 0 184 949 ;
-C -1 ; WX 332 ; N twosuperior ; B 19 296 318 747 ;
-C -1 ; WX 655 ; N Ugrave ; B 75 -13 579 949 ;
-C -1 ; WX 831 ; N onequarter ; B 100 0 729 740 ;
-C -1 ; WX 655 ; N Ucircumflex ; B 75 -13 579 927 ;
-C -1 ; WX 498 ; N Scaron ; B 22 -13 473 927 ;
-C -1 ; WX 226 ; N Idieresis ; B 2 0 224 928 ;
-C -1 ; WX 200 ; N idieresis ; B -11 0 211 765 ;
-C -1 ; WX 536 ; N Egrave ; B 70 0 475 949 ;
-C -1 ; WX 869 ; N Oacute ; B 43 -13 826 949 ;
-C -1 ; WX 606 ; N divide ; B 51 -13 555 519 ;
-C -1 ; WX 740 ; N Atilde ; B 12 0 729 917 ;
-C -1 ; WX 740 ; N Aring ; B 12 0 729 955 ;
-C -1 ; WX 869 ; N Odieresis ; B 43 -13 826 928 ;
-C -1 ; WX 740 ; N Adieresis ; B 12 0 729 928 ;
-C -1 ; WX 740 ; N Ntilde ; B 75 0 664 917 ;
-C -1 ; WX 480 ; N Zcaron ; B 12 0 470 927 ;
-C -1 ; WX 592 ; N Thorn ; B 60 0 549 740 ;
-C -1 ; WX 226 ; N Iacute ; B 44 0 275 949 ;
-C -1 ; WX 606 ; N plusminus ; B 51 -24 555 518 ;
-C -1 ; WX 606 ; N multiply ; B 74 24 533 482 ;
-C -1 ; WX 536 ; N Eacute ; B 70 0 475 949 ;
-C -1 ; WX 592 ; N Ydieresis ; B 1 0 592 928 ;
-C -1 ; WX 332 ; N onesuperior ; B 63 296 198 740 ;
-C -1 ; WX 608 ; N ugrave ; B 62 -13 541 786 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 109 555 388 ;
-C -1 ; WX 610 ; N ntilde ; B 65 0 546 754 ;
-C -1 ; WX 869 ; N Otilde ; B 43 -13 826 917 ;
-C -1 ; WX 655 ; N otilde ; B 42 -13 614 754 ;
-C -1 ; WX 813 ; N Ccedilla ; B 43 -222 771 752 ;
-C -1 ; WX 740 ; N Agrave ; B 12 0 729 949 ;
-C -1 ; WX 831 ; N onehalf ; B 81 0 750 740 ;
-C -1 ; WX 790 ; N Eth ; B 40 0 739 740 ;
-C -1 ; WX 400 ; N degree ; B 56 421 344 709 ;
-C -1 ; WX 592 ; N Yacute ; B 1 0 592 949 ;
-C -1 ; WX 869 ; N Ocircumflex ; B 43 -13 826 927 ;
-C -1 ; WX 655 ; N oacute ; B 42 -13 614 786 ;
-C -1 ; WX 608 ; N mu ; B 80 -184 527 547 ;
-C -1 ; WX 606 ; N minus ; B 51 219 555 287 ;
-C -1 ; WX 655 ; N eth ; B 42 -12 614 753 ;
-C -1 ; WX 655 ; N odieresis ; B 42 -13 614 765 ;
-C -1 ; WX 747 ; N copyright ; B -9 -12 755 752 ;
-C -1 ; WX 672 ; N brokenbar ; B 299 -100 373 740 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 216
-
-KPX A y -62
-KPX A w -65
-KPX A v -70
-KPX A u -20
-KPX A quoteright -100
-KPX A quotedblright -100
-KPX A Y -92
-KPX A W -60
-KPX A V -102
-KPX A U -40
-KPX A T -45
-KPX A Q -40
-KPX A O -50
-KPX A G -40
-KPX A C -40
-
-KPX B A -10
-
-KPX C A -40
-
-KPX D period -20
-KPX D comma -20
-KPX D Y -30
-KPX D W -10
-KPX D V -50
-KPX D A -50
-
-KPX F period -160
-KPX F e -20
-KPX F comma -180
-KPX F a -20
-KPX F A -75
-
-KPX G period -20
-KPX G comma -20
-KPX G Y -20
-
-KPX J period -15
-KPX J a -20
-KPX J A -30
-
-KPX K o -15
-KPX K e -20
-KPX K O -20
-
-KPX L y -23
-KPX L quoteright -130
-KPX L quotedblright -130
-KPX L Y -91
-KPX L W -67
-KPX L V -113
-KPX L T -46
-
-KPX O period -30
-KPX O comma -30
-KPX O Y -30
-KPX O X -30
-KPX O W -20
-KPX O V -60
-KPX O T -30
-KPX O A -60
-
-KPX P period -300
-KPX P o -60
-KPX P e -20
-KPX P comma -280
-KPX P a -20
-KPX P A -114
-
-KPX Q comma 20
-
-KPX R Y -10
-KPX R W 10
-KPX R V -10
-KPX R T 6
-
-KPX S comma 20
-
-KPX T y -50
-KPX T w -55
-KPX T u -46
-KPX T semicolon -29
-KPX T r -30
-KPX T period -91
-KPX T o -70
-KPX T i 10
-KPX T hyphen -75
-KPX T e -49
-KPX T comma -82
-KPX T colon -15
-KPX T a -90
-KPX T O -30
-KPX T A -45
-
-KPX U period -20
-KPX U comma -20
-KPX U A -40
-
-KPX V u -40
-KPX V semicolon -33
-KPX V period -165
-KPX V o -101
-KPX V i -5
-KPX V hyphen -75
-KPX V e -101
-KPX V comma -145
-KPX V colon -18
-KPX V a -104
-KPX V O -60
-KPX V G -20
-KPX V A -102
-
-KPX W y -2
-KPX W u -30
-KPX W semicolon -33
-KPX W period -106
-KPX W o -46
-KPX W i 6
-KPX W hyphen -35
-KPX W e -47
-KPX W comma -106
-KPX W colon -15
-KPX W a -50
-KPX W O -20
-KPX W A -58
-
-KPX Y u -52
-KPX Y semicolon -23
-KPX Y period -175
-KPX Y o -89
-KPX Y hyphen -85
-KPX Y e -89
-KPX Y comma -145
-KPX Y colon -10
-KPX Y a -93
-KPX Y O -30
-KPX Y A -92
-
-KPX a p 20
-KPX a b 20
-
-KPX b y -20
-KPX b v -20
-
-KPX c y -20
-KPX c k -15
-
-KPX comma space -110
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX e y -20
-KPX e w -20
-KPX e v -20
-
-KPX f period -50
-KPX f o -40
-KPX f l -30
-KPX f i -34
-KPX f f -60
-KPX f e -20
-KPX f dotlessi -34
-KPX f comma -50
-KPX f a -40
-
-KPX g a -15
-
-KPX h y -30
-
-KPX k y -5
-KPX k e -15
-
-KPX m y -20
-KPX m u -20
-KPX m a -20
-
-KPX n y -15
-KPX n v -20
-
-KPX o y -20
-KPX o x -15
-KPX o w -20
-KPX o v -30
-
-KPX p y -20
-
-KPX period space -110
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblleft quoteleft -35
-KPX quotedblleft A -100
-
-KPX quotedblright space -110
-
-KPX quoteleft quoteleft -203
-KPX quoteleft A -100
-
-KPX quoteright v -30
-KPX quoteright t 10
-KPX quoteright space -110
-KPX quoteright s -15
-KPX quoteright r -20
-KPX quoteright quoteright -203
-KPX quoteright quotedblright -35
-KPX quoteright d -110
-
-KPX r y 40
-KPX r v 40
-KPX r u 20
-KPX r t 20
-KPX r s 20
-KPX r q -8
-KPX r period -73
-KPX r p 20
-KPX r o -20
-KPX r n 21
-KPX r m 28
-KPX r l 20
-KPX r k 20
-KPX r i 20
-KPX r hyphen -60
-KPX r g -15
-KPX r e -4
-KPX r d -6
-KPX r comma -75
-KPX r c -20
-KPX r a -20
-
-KPX s period 20
-KPX s comma 20
-
-KPX space quoteleft -110
-KPX space quotedblleft -110
-KPX space Y -60
-KPX space W -25
-KPX space V -50
-KPX space T -25
-KPX space A -20
-
-KPX v period -130
-KPX v o -30
-KPX v e -20
-KPX v comma -100
-KPX v a -30
-
-KPX w period -100
-KPX w o -30
-KPX w h 15
-KPX w e -20
-KPX w comma -90
-KPX w a -30
-
-KPX y period -125
-KPX y o -30
-KPX y e -20
-KPX y comma -110
-KPX y a -30
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 183 163 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 119 163 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 186 163 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 181 163 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 204 148 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 151 163 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 81 163 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 17 163 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 84 163 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 79 163 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -34 163 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -138 163 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -71 163 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -116 163 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 151 163 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 247 163 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 184 163 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 163 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 246 163 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 163 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron -2 163 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 163 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 77 163 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 143 163 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 119 163 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 129 163 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 112 163 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron -11 163 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 154 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 91 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 157 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 153 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 176 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 122 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 138 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 74 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 141 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 136 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -151 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -84 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -129 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 86 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 140 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 77 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 143 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 108 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron -57 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 137 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 53 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 120 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 95 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 101 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron -38 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/AvantGarde-BookOblique.afm b/blt3.0/library/AFM/AvantGarde-BookOblique.afm
deleted file mode 100644
index ca315b5..0000000
--- a/blt3.0/library/AFM/AvantGarde-BookOblique.afm
+++ /dev/null
@@ -1,574 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Mar  4 13:41:11 1991
-Comment UniqueID 34367
-Comment VMusage 6555 39267
-FontName AvantGarde-BookOblique
-FullName ITC Avant Garde Gothic Book Oblique
-FamilyName ITC Avant Garde Gothic
-Weight Book
-ItalicAngle -10.5
-IsFixedPitch false
-FontBBox -113 -222 1279 955
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 740
-XHeight 547
-Ascender 740
-Descender -192
-StartCharMetrics 228
-C 32 ; WX 277 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 295 ; N exclam ; B 111 0 322 740 ;
-C 34 ; WX 309 ; N quotedbl ; B 130 444 410 740 ;
-C 35 ; WX 554 ; N numbersign ; B 71 0 620 740 ;
-C 36 ; WX 554 ; N dollar ; B 107 -70 581 811 ;
-C 37 ; WX 775 ; N percent ; B 124 -13 787 751 ;
-C 38 ; WX 757 ; N ampersand ; B 92 -12 775 753 ;
-C 39 ; WX 351 ; N quoteright ; B 195 546 393 740 ;
-C 40 ; WX 369 ; N parenleft ; B 89 -205 495 757 ;
-C 41 ; WX 369 ; N parenright ; B -24 -205 382 757 ;
-C 42 ; WX 425 ; N asterisk ; B 170 446 479 740 ;
-C 43 ; WX 606 ; N plus ; B 92 0 608 506 ;
-C 44 ; WX 277 ; N comma ; B 2 -67 199 126 ;
-C 45 ; WX 332 ; N hyphen ; B 76 248 360 315 ;
-C 46 ; WX 277 ; N period ; B 102 0 199 126 ;
-C 47 ; WX 437 ; N slash ; B 25 -100 540 740 ;
-C 48 ; WX 554 ; N zero ; B 71 -13 622 753 ;
-C 49 ; WX 554 ; N one ; B 260 0 473 740 ;
-C 50 ; WX 554 ; N two ; B 40 0 615 753 ;
-C 51 ; WX 554 ; N three ; B 73 -13 565 753 ;
-C 52 ; WX 554 ; N four ; B 39 0 598 740 ;
-C 53 ; WX 554 ; N five ; B 69 -13 605 740 ;
-C 54 ; WX 554 ; N six ; B 65 -13 580 739 ;
-C 55 ; WX 554 ; N seven ; B 110 0 628 740 ;
-C 56 ; WX 554 ; N eight ; B 77 -13 580 753 ;
-C 57 ; WX 554 ; N nine ; B 111 0 626 752 ;
-C 58 ; WX 277 ; N colon ; B 102 0 278 548 ;
-C 59 ; WX 277 ; N semicolon ; B 2 -67 278 548 ;
-C 60 ; WX 606 ; N less ; B 87 -8 649 514 ;
-C 61 ; WX 606 ; N equal ; B 73 118 627 388 ;
-C 62 ; WX 606 ; N greater ; B 51 -8 613 514 ;
-C 63 ; WX 591 ; N question ; B 158 0 628 752 ;
-C 64 ; WX 867 ; N at ; B 126 -13 888 753 ;
-C 65 ; WX 740 ; N A ; B 12 0 729 740 ;
-C 66 ; WX 574 ; N B ; B 74 0 606 740 ;
-C 67 ; WX 813 ; N C ; B 105 -13 870 752 ;
-C 68 ; WX 744 ; N D ; B 74 0 773 740 ;
-C 69 ; WX 536 ; N E ; B 70 0 612 740 ;
-C 70 ; WX 485 ; N F ; B 70 0 581 740 ;
-C 71 ; WX 872 ; N G ; B 103 -13 891 753 ;
-C 72 ; WX 683 ; N H ; B 76 0 744 740 ;
-C 73 ; WX 226 ; N I ; B 76 0 287 740 ;
-C 74 ; WX 482 ; N J ; B 37 -13 539 740 ;
-C 75 ; WX 591 ; N K ; B 81 0 728 740 ;
-C 76 ; WX 462 ; N L ; B 82 0 474 740 ;
-C 77 ; WX 919 ; N M ; B 76 0 980 740 ;
-C 78 ; WX 740 ; N N ; B 75 0 801 740 ;
-C 79 ; WX 869 ; N O ; B 105 -13 901 753 ;
-C 80 ; WX 592 ; N P ; B 75 0 664 740 ;
-C 81 ; WX 871 ; N Q ; B 102 -13 912 753 ;
-C 82 ; WX 607 ; N R ; B 70 0 669 740 ;
-C 83 ; WX 498 ; N S ; B 57 -13 561 753 ;
-C 84 ; WX 426 ; N T ; B 131 0 556 740 ;
-C 85 ; WX 655 ; N U ; B 118 -13 716 740 ;
-C 86 ; WX 702 ; N V ; B 145 0 830 740 ;
-C 87 ; WX 960 ; N W ; B 148 0 1087 740 ;
-C 88 ; WX 609 ; N X ; B 8 0 724 740 ;
-C 89 ; WX 592 ; N Y ; B 138 0 729 740 ;
-C 90 ; WX 480 ; N Z ; B 12 0 596 740 ;
-C 91 ; WX 351 ; N bracketleft ; B 145 -179 477 753 ;
-C 92 ; WX 605 ; N backslash ; B 255 -100 458 740 ;
-C 93 ; WX 351 ; N bracketright ; B -19 -179 312 753 ;
-C 94 ; WX 606 ; N asciicircum ; B 110 307 610 740 ;
-C 95 ; WX 500 ; N underscore ; B -23 -125 486 -75 ;
-C 96 ; WX 351 ; N quoteleft ; B 232 546 358 740 ;
-C 97 ; WX 683 ; N a ; B 88 -13 722 561 ;
-C 98 ; WX 682 ; N b ; B 68 -13 703 740 ;
-C 99 ; WX 647 ; N c ; B 87 -13 678 561 ;
-C 100 ; WX 685 ; N d ; B 85 -13 755 740 ;
-C 101 ; WX 650 ; N e ; B 84 -13 664 561 ;
-C 102 ; WX 314 ; N f ; B 104 0 454 753 ; L i fi ; L l fl ;
-C 103 ; WX 673 ; N g ; B 56 -215 707 561 ;
-C 104 ; WX 610 ; N h ; B 62 0 606 740 ;
-C 105 ; WX 200 ; N i ; B 65 0 272 740 ;
-C 106 ; WX 203 ; N j ; B -80 -192 274 740 ;
-C 107 ; WX 502 ; N k ; B 70 0 588 740 ;
-C 108 ; WX 200 ; N l ; B 65 0 272 740 ;
-C 109 ; WX 938 ; N m ; B 66 0 938 561 ;
-C 110 ; WX 610 ; N n ; B 65 0 609 561 ;
-C 111 ; WX 655 ; N o ; B 88 -13 669 561 ;
-C 112 ; WX 682 ; N p ; B 28 -192 699 561 ;
-C 113 ; WX 682 ; N q ; B 83 -192 717 561 ;
-C 114 ; WX 301 ; N r ; B 65 0 395 561 ;
-C 115 ; WX 388 ; N s ; B 49 -13 424 561 ;
-C 116 ; WX 339 ; N t ; B 104 0 431 740 ;
-C 117 ; WX 608 ; N u ; B 100 -13 642 547 ;
-C 118 ; WX 554 ; N v ; B 108 0 647 547 ;
-C 119 ; WX 831 ; N w ; B 114 0 921 547 ;
-C 120 ; WX 480 ; N x ; B 12 0 569 547 ;
-C 121 ; WX 536 ; N y ; B 97 -192 624 547 ;
-C 122 ; WX 425 ; N z ; B 10 0 498 547 ;
-C 123 ; WX 351 ; N braceleft ; B 115 -189 468 740 ;
-C 124 ; WX 672 ; N bar ; B 280 -100 510 740 ;
-C 125 ; WX 351 ; N braceright ; B -15 -189 338 740 ;
-C 126 ; WX 606 ; N asciitilde ; B 114 179 584 319 ;
-C 161 ; WX 295 ; N exclamdown ; B 74 -192 286 548 ;
-C 162 ; WX 554 ; N cent ; B 115 62 596 707 ;
-C 163 ; WX 554 ; N sterling ; B 29 0 614 753 ;
-C 164 ; WX 166 ; N fraction ; B -113 0 417 740 ;
-C 165 ; WX 554 ; N yen ; B 75 0 687 740 ;
-C 166 ; WX 554 ; N florin ; B -39 -153 669 818 ;
-C 167 ; WX 615 ; N section ; B 118 -141 597 753 ;
-C 168 ; WX 554 ; N currency ; B 24 42 645 580 ;
-C 169 ; WX 198 ; N quotesingle ; B 153 444 277 740 ;
-C 170 ; WX 502 ; N quotedblleft ; B 234 546 507 740 ;
-C 171 ; WX 425 ; N guillemotleft ; B 92 81 469 481 ;
-C 172 ; WX 251 ; N guilsinglleft ; B 92 81 295 481 ;
-C 173 ; WX 251 ; N guilsinglright ; B 60 81 263 481 ;
-C 174 ; WX 487 ; N fi ; B 104 0 559 753 ;
-C 175 ; WX 485 ; N fl ; B 104 0 557 753 ;
-C 177 ; WX 500 ; N endash ; B 81 248 523 315 ;
-C 178 ; WX 553 ; N dagger ; B 146 -133 593 740 ;
-C 179 ; WX 553 ; N daggerdbl ; B 72 -133 593 740 ;
-C 180 ; WX 277 ; N periodcentered ; B 137 190 235 316 ;
-C 182 ; WX 564 ; N paragraph ; B 119 -110 688 740 ;
-C 183 ; WX 606 ; N bullet ; B 217 222 528 532 ;
-C 184 ; WX 354 ; N quotesinglbase ; B 76 -68 274 126 ;
-C 185 ; WX 502 ; N quotedblbase ; B 76 -68 422 126 ;
-C 186 ; WX 484 ; N quotedblright ; B 197 546 542 740 ;
-C 187 ; WX 425 ; N guillemotright ; B 60 81 437 481 ;
-C 188 ; WX 1000 ; N ellipsis ; B 130 0 893 126 ;
-C 189 ; WX 1174 ; N perthousand ; B 128 -13 1182 751 ;
-C 191 ; WX 591 ; N questiondown ; B 64 -205 534 548 ;
-C 193 ; WX 378 ; N grave ; B 204 619 425 786 ;
-C 194 ; WX 375 ; N acute ; B 203 619 444 786 ;
-C 195 ; WX 502 ; N circumflex ; B 192 639 546 764 ;
-C 196 ; WX 439 ; N tilde ; B 179 651 520 754 ;
-C 197 ; WX 485 ; N macron ; B 197 669 547 736 ;
-C 198 ; WX 453 ; N breve ; B 192 651 541 754 ;
-C 199 ; WX 222 ; N dotaccent ; B 192 639 290 765 ;
-C 200 ; WX 369 ; N dieresis ; B 191 639 437 765 ;
-C 202 ; WX 332 ; N ring ; B 191 600 401 807 ;
-C 203 ; WX 324 ; N cedilla ; B 52 -222 231 0 ;
-C 205 ; WX 552 ; N hungarumlaut ; B 239 605 594 800 ;
-C 206 ; WX 302 ; N ogonek ; B 53 -191 202 0 ;
-C 207 ; WX 502 ; N caron ; B 210 639 565 764 ;
-C 208 ; WX 1000 ; N emdash ; B 81 248 1023 315 ;
-C 225 ; WX 992 ; N AE ; B -20 0 1044 740 ;
-C 227 ; WX 369 ; N ordfeminine ; B 102 407 494 753 ;
-C 232 ; WX 517 ; N Lslash ; B 107 0 529 740 ;
-C 233 ; WX 868 ; N Oslash ; B 76 -83 929 819 ;
-C 234 ; WX 1194 ; N OE ; B 107 -13 1279 753 ;
-C 235 ; WX 369 ; N ordmasculine ; B 116 407 466 753 ;
-C 241 ; WX 1157 ; N ae ; B 80 -13 1169 561 ;
-C 245 ; WX 200 ; N dotlessi ; B 65 0 236 547 ;
-C 248 ; WX 300 ; N lslash ; B 95 0 354 740 ;
-C 249 ; WX 653 ; N oslash ; B 51 -64 703 614 ;
-C 250 ; WX 1137 ; N oe ; B 80 -13 1160 561 ;
-C 251 ; WX 554 ; N germandbls ; B 61 -13 578 753 ;
-C -1 ; WX 650 ; N ecircumflex ; B 84 -13 664 764 ;
-C -1 ; WX 650 ; N edieresis ; B 84 -13 664 765 ;
-C -1 ; WX 683 ; N aacute ; B 88 -13 722 786 ;
-C -1 ; WX 747 ; N registered ; B 53 -12 830 752 ;
-C -1 ; WX 200 ; N icircumflex ; B 41 0 395 764 ;
-C -1 ; WX 608 ; N udieresis ; B 100 -13 642 765 ;
-C -1 ; WX 655 ; N ograve ; B 88 -13 669 786 ;
-C -1 ; WX 608 ; N uacute ; B 100 -13 642 786 ;
-C -1 ; WX 608 ; N ucircumflex ; B 100 -13 642 764 ;
-C -1 ; WX 740 ; N Aacute ; B 12 0 729 949 ;
-C -1 ; WX 200 ; N igrave ; B 65 0 296 786 ;
-C -1 ; WX 226 ; N Icircumflex ; B 76 0 439 927 ;
-C -1 ; WX 647 ; N ccedilla ; B 87 -222 678 561 ;
-C -1 ; WX 683 ; N adieresis ; B 88 -13 722 765 ;
-C -1 ; WX 536 ; N Ecircumflex ; B 70 0 612 927 ;
-C -1 ; WX 388 ; N scaron ; B 49 -13 508 764 ;
-C -1 ; WX 682 ; N thorn ; B 28 -192 699 740 ;
-C -1 ; WX 1000 ; N trademark ; B 137 296 953 740 ;
-C -1 ; WX 650 ; N egrave ; B 84 -13 664 786 ;
-C -1 ; WX 332 ; N threesuperior ; B 98 289 408 747 ;
-C -1 ; WX 425 ; N zcaron ; B 10 0 527 764 ;
-C -1 ; WX 683 ; N atilde ; B 88 -13 722 754 ;
-C -1 ; WX 683 ; N aring ; B 88 -13 722 807 ;
-C -1 ; WX 655 ; N ocircumflex ; B 88 -13 669 764 ;
-C -1 ; WX 536 ; N Edieresis ; B 70 0 612 928 ;
-C -1 ; WX 831 ; N threequarters ; B 126 0 825 747 ;
-C -1 ; WX 536 ; N ydieresis ; B 97 -192 624 765 ;
-C -1 ; WX 536 ; N yacute ; B 97 -192 624 786 ;
-C -1 ; WX 200 ; N iacute ; B 65 0 397 786 ;
-C -1 ; WX 740 ; N Acircumflex ; B 12 0 729 927 ;
-C -1 ; WX 655 ; N Uacute ; B 118 -13 716 949 ;
-C -1 ; WX 650 ; N eacute ; B 84 -13 664 786 ;
-C -1 ; WX 869 ; N Ograve ; B 105 -13 901 949 ;
-C -1 ; WX 683 ; N agrave ; B 88 -13 722 786 ;
-C -1 ; WX 655 ; N Udieresis ; B 118 -13 716 928 ;
-C -1 ; WX 683 ; N acircumflex ; B 88 -13 722 764 ;
-C -1 ; WX 226 ; N Igrave ; B 76 0 340 949 ;
-C -1 ; WX 332 ; N twosuperior ; B 74 296 433 747 ;
-C -1 ; WX 655 ; N Ugrave ; B 118 -13 716 949 ;
-C -1 ; WX 831 ; N onequarter ; B 183 0 770 740 ;
-C -1 ; WX 655 ; N Ucircumflex ; B 118 -13 716 927 ;
-C -1 ; WX 498 ; N Scaron ; B 57 -13 593 927 ;
-C -1 ; WX 226 ; N Idieresis ; B 76 0 396 928 ;
-C -1 ; WX 200 ; N idieresis ; B 65 0 353 765 ;
-C -1 ; WX 536 ; N Egrave ; B 70 0 612 949 ;
-C -1 ; WX 869 ; N Oacute ; B 105 -13 901 949 ;
-C -1 ; WX 606 ; N divide ; B 92 -13 608 519 ;
-C -1 ; WX 740 ; N Atilde ; B 12 0 729 917 ;
-C -1 ; WX 740 ; N Aring ; B 12 0 729 955 ;
-C -1 ; WX 869 ; N Odieresis ; B 105 -13 901 928 ;
-C -1 ; WX 740 ; N Adieresis ; B 12 0 729 928 ;
-C -1 ; WX 740 ; N Ntilde ; B 75 0 801 917 ;
-C -1 ; WX 480 ; N Zcaron ; B 12 0 596 927 ;
-C -1 ; WX 592 ; N Thorn ; B 60 0 621 740 ;
-C -1 ; WX 226 ; N Iacute ; B 76 0 440 949 ;
-C -1 ; WX 606 ; N plusminus ; B 47 -24 618 518 ;
-C -1 ; WX 606 ; N multiply ; B 87 24 612 482 ;
-C -1 ; WX 536 ; N Eacute ; B 70 0 612 949 ;
-C -1 ; WX 592 ; N Ydieresis ; B 138 0 729 928 ;
-C -1 ; WX 332 ; N onesuperior ; B 190 296 335 740 ;
-C -1 ; WX 608 ; N ugrave ; B 100 -13 642 786 ;
-C -1 ; WX 606 ; N logicalnot ; B 110 109 627 388 ;
-C -1 ; WX 610 ; N ntilde ; B 65 0 609 754 ;
-C -1 ; WX 869 ; N Otilde ; B 105 -13 901 917 ;
-C -1 ; WX 655 ; N otilde ; B 88 -13 669 754 ;
-C -1 ; WX 813 ; N Ccedilla ; B 105 -222 870 752 ;
-C -1 ; WX 740 ; N Agrave ; B 12 0 729 949 ;
-C -1 ; WX 831 ; N onehalf ; B 164 0 810 740 ;
-C -1 ; WX 790 ; N Eth ; B 104 0 813 740 ;
-C -1 ; WX 400 ; N degree ; B 158 421 451 709 ;
-C -1 ; WX 592 ; N Yacute ; B 138 0 729 949 ;
-C -1 ; WX 869 ; N Ocircumflex ; B 105 -13 901 927 ;
-C -1 ; WX 655 ; N oacute ; B 88 -13 669 786 ;
-C -1 ; WX 608 ; N mu ; B 46 -184 628 547 ;
-C -1 ; WX 606 ; N minus ; B 92 219 608 287 ;
-C -1 ; WX 655 ; N eth ; B 88 -12 675 753 ;
-C -1 ; WX 655 ; N odieresis ; B 88 -13 669 765 ;
-C -1 ; WX 747 ; N copyright ; B 53 -12 830 752 ;
-C -1 ; WX 672 ; N brokenbar ; B 280 -100 510 740 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 216
-
-KPX A y -62
-KPX A w -65
-KPX A v -70
-KPX A u -20
-KPX A quoteright -100
-KPX A quotedblright -100
-KPX A Y -92
-KPX A W -60
-KPX A V -102
-KPX A U -40
-KPX A T -45
-KPX A Q -40
-KPX A O -50
-KPX A G -40
-KPX A C -40
-
-KPX B A -10
-
-KPX C A -40
-
-KPX D period -20
-KPX D comma -20
-KPX D Y -30
-KPX D W -10
-KPX D V -50
-KPX D A -50
-
-KPX F period -160
-KPX F e -20
-KPX F comma -180
-KPX F a -20
-KPX F A -75
-
-KPX G period -20
-KPX G comma -20
-KPX G Y -20
-
-KPX J period -15
-KPX J a -20
-KPX J A -30
-
-KPX K o -15
-KPX K e -20
-KPX K O -20
-
-KPX L y -23
-KPX L quoteright -130
-KPX L quotedblright -130
-KPX L Y -91
-KPX L W -67
-KPX L V -113
-KPX L T -46
-
-KPX O period -30
-KPX O comma -30
-KPX O Y -30
-KPX O X -30
-KPX O W -20
-KPX O V -60
-KPX O T -30
-KPX O A -60
-
-KPX P period -300
-KPX P o -60
-KPX P e -20
-KPX P comma -280
-KPX P a -20
-KPX P A -114
-
-KPX Q comma 20
-
-KPX R Y -10
-KPX R W 10
-KPX R V -10
-KPX R T 6
-
-KPX S comma 20
-
-KPX T y -50
-KPX T w -55
-KPX T u -46
-KPX T semicolon -29
-KPX T r -30
-KPX T period -91
-KPX T o -70
-KPX T i 10
-KPX T hyphen -75
-KPX T e -49
-KPX T comma -82
-KPX T colon -15
-KPX T a -90
-KPX T O -30
-KPX T A -45
-
-KPX U period -20
-KPX U comma -20
-KPX U A -40
-
-KPX V u -40
-KPX V semicolon -33
-KPX V period -165
-KPX V o -101
-KPX V i -5
-KPX V hyphen -75
-KPX V e -101
-KPX V comma -145
-KPX V colon -18
-KPX V a -104
-KPX V O -60
-KPX V G -20
-KPX V A -102
-
-KPX W y -2
-KPX W u -30
-KPX W semicolon -33
-KPX W period -106
-KPX W o -46
-KPX W i 6
-KPX W hyphen -35
-KPX W e -47
-KPX W comma -106
-KPX W colon -15
-KPX W a -50
-KPX W O -20
-KPX W A -58
-
-KPX Y u -52
-KPX Y semicolon -23
-KPX Y period -175
-KPX Y o -89
-KPX Y hyphen -85
-KPX Y e -89
-KPX Y comma -145
-KPX Y colon -10
-KPX Y a -93
-KPX Y O -30
-KPX Y A -92
-
-KPX a p 20
-KPX a b 20
-
-KPX b y -20
-KPX b v -20
-
-KPX c y -20
-KPX c k -15
-
-KPX comma space -110
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX e y -20
-KPX e w -20
-KPX e v -20
-
-KPX f period -50
-KPX f o -40
-KPX f l -30
-KPX f i -34
-KPX f f -60
-KPX f e -20
-KPX f dotlessi -34
-KPX f comma -50
-KPX f a -40
-
-KPX g a -15
-
-KPX h y -30
-
-KPX k y -5
-KPX k e -15
-
-KPX m y -20
-KPX m u -20
-KPX m a -20
-
-KPX n y -15
-KPX n v -20
-
-KPX o y -20
-KPX o x -15
-KPX o w -20
-KPX o v -30
-
-KPX p y -20
-
-KPX period space -110
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblleft quoteleft -35
-KPX quotedblleft A -100
-
-KPX quotedblright space -110
-
-KPX quoteleft quoteleft -203
-KPX quoteleft A -100
-
-KPX quoteright v -30
-KPX quoteright t 10
-KPX quoteright space -110
-KPX quoteright s -15
-KPX quoteright r -20
-KPX quoteright quoteright -203
-KPX quoteright quotedblright -35
-KPX quoteright d -110
-
-KPX r y 40
-KPX r v 40
-KPX r u 20
-KPX r t 20
-KPX r s 20
-KPX r q -8
-KPX r period -73
-KPX r p 20
-KPX r o -20
-KPX r n 21
-KPX r m 28
-KPX r l 20
-KPX r k 20
-KPX r i 20
-KPX r hyphen -60
-KPX r g -15
-KPX r e -4
-KPX r d -6
-KPX r comma -75
-KPX r c -20
-KPX r a -20
-
-KPX s period 20
-KPX s comma 20
-
-KPX space quoteleft -110
-KPX space quotedblleft -110
-KPX space Y -60
-KPX space W -25
-KPX space V -50
-KPX space T -25
-KPX space A -20
-
-KPX v period -130
-KPX v o -30
-KPX v e -20
-KPX v comma -100
-KPX v a -30
-
-KPX w period -100
-KPX w o -30
-KPX w h 15
-KPX w e -20
-KPX w comma -90
-KPX w a -30
-
-KPX y period -125
-KPX y o -30
-KPX y e -20
-KPX y comma -110
-KPX y a -30
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 213 163 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 149 163 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 216 163 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 211 163 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 231 148 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 181 163 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 111 163 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 47 163 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 114 163 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 109 163 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -4 163 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -108 163 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -41 163 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -86 163 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 181 163 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 277 163 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 214 163 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 280 163 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 276 163 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 245 163 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 28 163 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 190 163 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 107 163 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 173 163 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 149 163 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 159 163 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 142 163 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 19 163 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 154 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 91 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 157 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 153 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 176 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 122 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 138 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 74 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 141 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 136 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -151 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -84 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -129 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 86 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 140 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 77 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 143 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 108 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron -57 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 137 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 53 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 120 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 95 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 101 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron -38 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/AvantGarde-Demi.afm b/blt3.0/library/AFM/AvantGarde-Demi.afm
deleted file mode 100644
index 6f96912..0000000
--- a/blt3.0/library/AFM/AvantGarde-Demi.afm
+++ /dev/null
@@ -1,577 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Mar  4 13:46:34 1991
-Comment UniqueID 34370
-Comment VMusage 24954 31846
-FontName AvantGarde-Demi
-FullName ITC Avant Garde Gothic Demi
-FamilyName ITC Avant Garde Gothic
-Weight Demi
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -123 -251 1222 1021
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 740
-XHeight 555
-Ascender 740
-Descender -185
-StartCharMetrics 228
-C 32 ; WX 280 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 280 ; N exclam ; B 73 0 206 740 ;
-C 34 ; WX 360 ; N quotedbl ; B 19 444 341 740 ;
-C 35 ; WX 560 ; N numbersign ; B 29 0 525 700 ;
-C 36 ; WX 560 ; N dollar ; B 58 -86 501 857 ;
-C 37 ; WX 860 ; N percent ; B 36 -15 822 755 ;
-C 38 ; WX 680 ; N ampersand ; B 34 -15 665 755 ;
-C 39 ; WX 280 ; N quoteright ; B 72 466 205 740 ;
-C 40 ; WX 380 ; N parenleft ; B 74 -157 350 754 ;
-C 41 ; WX 380 ; N parenright ; B 37 -157 313 754 ;
-C 42 ; WX 440 ; N asterisk ; B 67 457 374 755 ;
-C 43 ; WX 600 ; N plus ; B 48 0 552 506 ;
-C 44 ; WX 280 ; N comma ; B 73 -141 206 133 ;
-C 45 ; WX 420 ; N hyphen ; B 71 230 349 348 ;
-C 46 ; WX 280 ; N period ; B 73 0 206 133 ;
-C 47 ; WX 460 ; N slash ; B 6 -100 454 740 ;
-C 48 ; WX 560 ; N zero ; B 32 -15 529 755 ;
-C 49 ; WX 560 ; N one ; B 137 0 363 740 ;
-C 50 ; WX 560 ; N two ; B 36 0 523 755 ;
-C 51 ; WX 560 ; N three ; B 28 -15 532 755 ;
-C 52 ; WX 560 ; N four ; B 15 0 545 740 ;
-C 53 ; WX 560 ; N five ; B 25 -15 535 740 ;
-C 54 ; WX 560 ; N six ; B 23 -15 536 739 ;
-C 55 ; WX 560 ; N seven ; B 62 0 498 740 ;
-C 56 ; WX 560 ; N eight ; B 33 -15 527 755 ;
-C 57 ; WX 560 ; N nine ; B 24 0 537 754 ;
-C 58 ; WX 280 ; N colon ; B 73 0 206 555 ;
-C 59 ; WX 280 ; N semicolon ; B 73 -141 206 555 ;
-C 60 ; WX 600 ; N less ; B 46 -8 554 514 ;
-C 61 ; WX 600 ; N equal ; B 48 81 552 425 ;
-C 62 ; WX 600 ; N greater ; B 46 -8 554 514 ;
-C 63 ; WX 560 ; N question ; B 38 0 491 755 ;
-C 64 ; WX 740 ; N at ; B 50 -12 750 712 ;
-C 65 ; WX 740 ; N A ; B 7 0 732 740 ;
-C 66 ; WX 580 ; N B ; B 70 0 551 740 ;
-C 67 ; WX 780 ; N C ; B 34 -15 766 755 ;
-C 68 ; WX 700 ; N D ; B 63 0 657 740 ;
-C 69 ; WX 520 ; N E ; B 61 0 459 740 ;
-C 70 ; WX 480 ; N F ; B 61 0 438 740 ;
-C 71 ; WX 840 ; N G ; B 27 -15 817 755 ;
-C 72 ; WX 680 ; N H ; B 71 0 610 740 ;
-C 73 ; WX 280 ; N I ; B 72 0 209 740 ;
-C 74 ; WX 480 ; N J ; B 2 -15 409 740 ;
-C 75 ; WX 620 ; N K ; B 89 0 620 740 ;
-C 76 ; WX 440 ; N L ; B 72 0 435 740 ;
-C 77 ; WX 900 ; N M ; B 63 0 837 740 ;
-C 78 ; WX 740 ; N N ; B 70 0 671 740 ;
-C 79 ; WX 840 ; N O ; B 33 -15 807 755 ;
-C 80 ; WX 560 ; N P ; B 72 0 545 740 ;
-C 81 ; WX 840 ; N Q ; B 32 -15 824 755 ;
-C 82 ; WX 580 ; N R ; B 64 0 565 740 ;
-C 83 ; WX 520 ; N S ; B 12 -15 493 755 ;
-C 84 ; WX 420 ; N T ; B 6 0 418 740 ;
-C 85 ; WX 640 ; N U ; B 55 -15 585 740 ;
-C 86 ; WX 700 ; N V ; B 8 0 695 740 ;
-C 87 ; WX 900 ; N W ; B 7 0 899 740 ;
-C 88 ; WX 680 ; N X ; B 4 0 676 740 ;
-C 89 ; WX 620 ; N Y ; B -2 0 622 740 ;
-C 90 ; WX 500 ; N Z ; B 19 0 481 740 ;
-C 91 ; WX 320 ; N bracketleft ; B 66 -157 284 754 ;
-C 92 ; WX 640 ; N backslash ; B 96 -100 544 740 ;
-C 93 ; WX 320 ; N bracketright ; B 36 -157 254 754 ;
-C 94 ; WX 600 ; N asciicircum ; B 73 375 527 740 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 280 ; N quoteleft ; B 72 466 205 740 ;
-C 97 ; WX 660 ; N a ; B 27 -18 613 574 ;
-C 98 ; WX 660 ; N b ; B 47 -18 632 740 ;
-C 99 ; WX 640 ; N c ; B 37 -18 610 574 ;
-C 100 ; WX 660 ; N d ; B 34 -18 618 740 ;
-C 101 ; WX 640 ; N e ; B 31 -18 610 577 ;
-C 102 ; WX 280 ; N f ; B 15 0 280 755 ; L i fi ; L l fl ;
-C 103 ; WX 660 ; N g ; B 32 -226 623 574 ;
-C 104 ; WX 600 ; N h ; B 54 0 546 740 ;
-C 105 ; WX 240 ; N i ; B 53 0 186 740 ;
-C 106 ; WX 260 ; N j ; B 16 -185 205 740 ;
-C 107 ; WX 580 ; N k ; B 80 0 571 740 ;
-C 108 ; WX 240 ; N l ; B 54 0 187 740 ;
-C 109 ; WX 940 ; N m ; B 54 0 887 574 ;
-C 110 ; WX 600 ; N n ; B 54 0 547 574 ;
-C 111 ; WX 640 ; N o ; B 25 -18 615 574 ;
-C 112 ; WX 660 ; N p ; B 47 -185 629 574 ;
-C 113 ; WX 660 ; N q ; B 31 -185 613 574 ;
-C 114 ; WX 320 ; N r ; B 63 0 317 574 ;
-C 115 ; WX 440 ; N s ; B 19 -18 421 574 ;
-C 116 ; WX 300 ; N t ; B 21 0 299 740 ;
-C 117 ; WX 600 ; N u ; B 50 -18 544 555 ;
-C 118 ; WX 560 ; N v ; B 3 0 556 555 ;
-C 119 ; WX 800 ; N w ; B 11 0 789 555 ;
-C 120 ; WX 560 ; N x ; B 3 0 556 555 ;
-C 121 ; WX 580 ; N y ; B 8 -185 571 555 ;
-C 122 ; WX 460 ; N z ; B 20 0 442 555 ;
-C 123 ; WX 340 ; N braceleft ; B -3 -191 317 747 ;
-C 124 ; WX 600 ; N bar ; B 233 -100 366 740 ;
-C 125 ; WX 340 ; N braceright ; B 23 -191 343 747 ;
-C 126 ; WX 600 ; N asciitilde ; B 67 160 533 347 ;
-C 161 ; WX 280 ; N exclamdown ; B 74 -185 207 555 ;
-C 162 ; WX 560 ; N cent ; B 43 39 517 715 ;
-C 163 ; WX 560 ; N sterling ; B -2 0 562 755 ;
-C 164 ; WX 160 ; N fraction ; B -123 0 282 740 ;
-C 165 ; WX 560 ; N yen ; B -10 0 570 740 ;
-C 166 ; WX 560 ; N florin ; B 0 -151 512 824 ;
-C 167 ; WX 560 ; N section ; B 28 -158 530 755 ;
-C 168 ; WX 560 ; N currency ; B 27 69 534 577 ;
-C 169 ; WX 220 ; N quotesingle ; B 44 444 177 740 ;
-C 170 ; WX 480 ; N quotedblleft ; B 70 466 410 740 ;
-C 171 ; WX 460 ; N guillemotleft ; B 61 108 400 469 ;
-C 172 ; WX 240 ; N guilsinglleft ; B 50 108 190 469 ;
-C 173 ; WX 240 ; N guilsinglright ; B 50 108 190 469 ;
-C 174 ; WX 520 ; N fi ; B 25 0 461 755 ;
-C 175 ; WX 520 ; N fl ; B 25 0 461 755 ;
-C 177 ; WX 500 ; N endash ; B 35 230 465 348 ;
-C 178 ; WX 560 ; N dagger ; B 51 -142 509 740 ;
-C 179 ; WX 560 ; N daggerdbl ; B 51 -142 509 740 ;
-C 180 ; WX 280 ; N periodcentered ; B 73 187 206 320 ;
-C 182 ; WX 600 ; N paragraph ; B -7 -103 607 740 ;
-C 183 ; WX 600 ; N bullet ; B 148 222 453 532 ;
-C 184 ; WX 280 ; N quotesinglbase ; B 72 -141 205 133 ;
-C 185 ; WX 480 ; N quotedblbase ; B 70 -141 410 133 ;
-C 186 ; WX 480 ; N quotedblright ; B 70 466 410 740 ;
-C 187 ; WX 460 ; N guillemotright ; B 61 108 400 469 ;
-C 188 ; WX 1000 ; N ellipsis ; B 100 0 899 133 ;
-C 189 ; WX 1280 ; N perthousand ; B 36 -15 1222 755 ;
-C 191 ; WX 560 ; N questiondown ; B 68 -200 521 555 ;
-C 193 ; WX 420 ; N grave ; B 50 624 329 851 ;
-C 194 ; WX 420 ; N acute ; B 91 624 370 849 ;
-C 195 ; WX 540 ; N circumflex ; B 71 636 470 774 ;
-C 196 ; WX 480 ; N tilde ; B 44 636 437 767 ;
-C 197 ; WX 420 ; N macron ; B 72 648 349 759 ;
-C 198 ; WX 480 ; N breve ; B 42 633 439 770 ;
-C 199 ; WX 280 ; N dotaccent ; B 74 636 207 769 ;
-C 200 ; WX 500 ; N dieresis ; B 78 636 422 769 ;
-C 202 ; WX 360 ; N ring ; B 73 619 288 834 ;
-C 203 ; WX 340 ; N cedilla ; B 98 -251 298 6 ;
-C 205 ; WX 700 ; N hungarumlaut ; B 132 610 609 862 ;
-C 206 ; WX 340 ; N ogonek ; B 79 -195 262 9 ;
-C 207 ; WX 540 ; N caron ; B 71 636 470 774 ;
-C 208 ; WX 1000 ; N emdash ; B 35 230 965 348 ;
-C 225 ; WX 900 ; N AE ; B -5 0 824 740 ;
-C 227 ; WX 360 ; N ordfeminine ; B 19 438 334 755 ;
-C 232 ; WX 480 ; N Lslash ; B 26 0 460 740 ;
-C 233 ; WX 840 ; N Oslash ; B 33 -71 807 814 ;
-C 234 ; WX 1060 ; N OE ; B 37 -15 1007 755 ;
-C 235 ; WX 360 ; N ordmasculine ; B 23 438 338 755 ;
-C 241 ; WX 1080 ; N ae ; B 29 -18 1048 574 ;
-C 245 ; WX 240 ; N dotlessi ; B 53 0 186 555 ;
-C 248 ; WX 320 ; N lslash ; B 34 0 305 740 ;
-C 249 ; WX 660 ; N oslash ; B 35 -50 625 608 ;
-C 250 ; WX 1080 ; N oe ; B 30 -18 1050 574 ;
-C 251 ; WX 600 ; N germandbls ; B 51 -18 585 755 ;
-C -1 ; WX 640 ; N ecircumflex ; B 31 -18 610 774 ;
-C -1 ; WX 640 ; N edieresis ; B 31 -18 610 769 ;
-C -1 ; WX 660 ; N aacute ; B 27 -18 613 849 ;
-C -1 ; WX 740 ; N registered ; B -12 -12 752 752 ;
-C -1 ; WX 240 ; N icircumflex ; B -79 0 320 774 ;
-C -1 ; WX 600 ; N udieresis ; B 50 -18 544 769 ;
-C -1 ; WX 640 ; N ograve ; B 25 -18 615 851 ;
-C -1 ; WX 600 ; N uacute ; B 50 -18 544 849 ;
-C -1 ; WX 600 ; N ucircumflex ; B 50 -18 544 774 ;
-C -1 ; WX 740 ; N Aacute ; B 7 0 732 1019 ;
-C -1 ; WX 240 ; N igrave ; B -65 0 214 851 ;
-C -1 ; WX 280 ; N Icircumflex ; B -59 0 340 944 ;
-C -1 ; WX 640 ; N ccedilla ; B 37 -251 610 574 ;
-C -1 ; WX 660 ; N adieresis ; B 27 -18 613 769 ;
-C -1 ; WX 520 ; N Ecircumflex ; B 61 0 460 944 ;
-C -1 ; WX 440 ; N scaron ; B 19 -18 421 774 ;
-C -1 ; WX 660 ; N thorn ; B 47 -185 629 740 ;
-C -1 ; WX 1000 ; N trademark ; B 9 296 821 740 ;
-C -1 ; WX 640 ; N egrave ; B 31 -18 610 851 ;
-C -1 ; WX 336 ; N threesuperior ; B 8 287 328 749 ;
-C -1 ; WX 460 ; N zcaron ; B 20 0 455 774 ;
-C -1 ; WX 660 ; N atilde ; B 27 -18 613 767 ;
-C -1 ; WX 660 ; N aring ; B 27 -18 613 834 ;
-C -1 ; WX 640 ; N ocircumflex ; B 25 -18 615 774 ;
-C -1 ; WX 520 ; N Edieresis ; B 61 0 459 939 ;
-C -1 ; WX 840 ; N threequarters ; B 18 0 803 749 ;
-C -1 ; WX 580 ; N ydieresis ; B 8 -185 571 769 ;
-C -1 ; WX 580 ; N yacute ; B 8 -185 571 849 ;
-C -1 ; WX 240 ; N iacute ; B 26 0 305 849 ;
-C -1 ; WX 740 ; N Acircumflex ; B 7 0 732 944 ;
-C -1 ; WX 640 ; N Uacute ; B 55 -15 585 1019 ;
-C -1 ; WX 640 ; N eacute ; B 31 -18 610 849 ;
-C -1 ; WX 840 ; N Ograve ; B 33 -15 807 1021 ;
-C -1 ; WX 660 ; N agrave ; B 27 -18 613 851 ;
-C -1 ; WX 640 ; N Udieresis ; B 55 -15 585 939 ;
-C -1 ; WX 660 ; N acircumflex ; B 27 -18 613 774 ;
-C -1 ; WX 280 ; N Igrave ; B -45 0 234 1021 ;
-C -1 ; WX 336 ; N twosuperior ; B 13 296 322 749 ;
-C -1 ; WX 640 ; N Ugrave ; B 55 -15 585 1021 ;
-C -1 ; WX 840 ; N onequarter ; B 92 0 746 740 ;
-C -1 ; WX 640 ; N Ucircumflex ; B 55 -15 585 944 ;
-C -1 ; WX 520 ; N Scaron ; B 12 -15 493 944 ;
-C -1 ; WX 280 ; N Idieresis ; B -32 0 312 939 ;
-C -1 ; WX 240 ; N idieresis ; B -52 0 292 769 ;
-C -1 ; WX 520 ; N Egrave ; B 61 0 459 1021 ;
-C -1 ; WX 840 ; N Oacute ; B 33 -15 807 1019 ;
-C -1 ; WX 600 ; N divide ; B 48 -20 552 526 ;
-C -1 ; WX 740 ; N Atilde ; B 7 0 732 937 ;
-C -1 ; WX 740 ; N Aring ; B 7 0 732 969 ;
-C -1 ; WX 840 ; N Odieresis ; B 33 -15 807 939 ;
-C -1 ; WX 740 ; N Adieresis ; B 7 0 732 939 ;
-C -1 ; WX 740 ; N Ntilde ; B 70 0 671 937 ;
-C -1 ; WX 500 ; N Zcaron ; B 19 0 481 944 ;
-C -1 ; WX 560 ; N Thorn ; B 72 0 545 740 ;
-C -1 ; WX 280 ; N Iacute ; B 46 0 325 1019 ;
-C -1 ; WX 600 ; N plusminus ; B 48 -62 552 556 ;
-C -1 ; WX 600 ; N multiply ; B 59 12 541 494 ;
-C -1 ; WX 520 ; N Eacute ; B 61 0 459 1019 ;
-C -1 ; WX 620 ; N Ydieresis ; B -2 0 622 939 ;
-C -1 ; WX 336 ; N onesuperior ; B 72 296 223 740 ;
-C -1 ; WX 600 ; N ugrave ; B 50 -18 544 851 ;
-C -1 ; WX 600 ; N logicalnot ; B 48 108 552 425 ;
-C -1 ; WX 600 ; N ntilde ; B 54 0 547 767 ;
-C -1 ; WX 840 ; N Otilde ; B 33 -15 807 937 ;
-C -1 ; WX 640 ; N otilde ; B 25 -18 615 767 ;
-C -1 ; WX 780 ; N Ccedilla ; B 34 -251 766 755 ;
-C -1 ; WX 740 ; N Agrave ; B 7 0 732 1021 ;
-C -1 ; WX 840 ; N onehalf ; B 62 0 771 740 ;
-C -1 ; WX 742 ; N Eth ; B 25 0 691 740 ;
-C -1 ; WX 400 ; N degree ; B 57 426 343 712 ;
-C -1 ; WX 620 ; N Yacute ; B -2 0 622 1019 ;
-C -1 ; WX 840 ; N Ocircumflex ; B 33 -15 807 944 ;
-C -1 ; WX 640 ; N oacute ; B 25 -18 615 849 ;
-C -1 ; WX 576 ; N mu ; B 38 -187 539 555 ;
-C -1 ; WX 600 ; N minus ; B 48 193 552 313 ;
-C -1 ; WX 640 ; N eth ; B 27 -18 616 754 ;
-C -1 ; WX 640 ; N odieresis ; B 25 -18 615 769 ;
-C -1 ; WX 740 ; N copyright ; B -12 -12 752 752 ;
-C -1 ; WX 600 ; N brokenbar ; B 233 -100 366 740 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 218
-
-KPX A y -50
-KPX A w -65
-KPX A v -70
-KPX A u -20
-KPX A quoteright -90
-KPX A Y -80
-KPX A W -60
-KPX A V -102
-KPX A U -40
-KPX A T -25
-KPX A Q -50
-KPX A O -50
-KPX A G -40
-KPX A C -40
-
-KPX B A -10
-
-KPX C A -40
-
-KPX D period -20
-KPX D comma -20
-KPX D Y -45
-KPX D W -25
-KPX D V -50
-KPX D A -50
-
-KPX F period -129
-KPX F e -20
-KPX F comma -162
-KPX F a -20
-KPX F A -75
-
-KPX G period -20
-KPX G comma -20
-KPX G Y -15
-
-KPX J period -15
-KPX J a -20
-KPX J A -30
-
-KPX K y -20
-KPX K u -15
-KPX K o -45
-KPX K e -40
-KPX K O -30
-
-KPX L y -23
-KPX L quoteright -30
-KPX L quotedblright -30
-KPX L Y -80
-KPX L W -55
-KPX L V -85
-KPX L T -46
-
-KPX O period -30
-KPX O comma -30
-KPX O Y -30
-KPX O X -30
-KPX O W -20
-KPX O V -45
-KPX O T -15
-KPX O A -60
-
-KPX P period -200
-KPX P o -20
-KPX P e -20
-KPX P comma -220
-KPX P a -20
-KPX P A -100
-
-KPX Q comma 20
-
-KPX R W 25
-KPX R V -10
-KPX R U 25
-KPX R T 40
-KPX R O 25
-
-KPX S comma 20
-
-KPX T y -10
-KPX T w -55
-KPX T u -46
-KPX T semicolon -29
-KPX T r -30
-KPX T period -91
-KPX T o -49
-KPX T hyphen -75
-KPX T e -49
-KPX T comma -82
-KPX T colon -15
-KPX T a -70
-KPX T O -15
-KPX T A -25
-
-KPX U period -20
-KPX U comma -20
-KPX U A -40
-
-KPX V u -55
-KPX V semicolon -33
-KPX V period -145
-KPX V o -101
-KPX V i -15
-KPX V hyphen -75
-KPX V e -101
-KPX V comma -145
-KPX V colon -18
-KPX V a -95
-KPX V O -45
-KPX V G -20
-KPX V A -102
-
-KPX W y -15
-KPX W u -30
-KPX W semicolon -33
-KPX W period -106
-KPX W o -46
-KPX W i -10
-KPX W hyphen -35
-KPX W e -47
-KPX W comma -106
-KPX W colon -15
-KPX W a -50
-KPX W O -20
-KPX W A -58
-
-KPX Y u -52
-KPX Y semicolon -23
-KPX Y period -145
-KPX Y o -89
-KPX Y hyphen -100
-KPX Y e -89
-KPX Y comma -145
-KPX Y colon -10
-KPX Y a -93
-KPX Y O -30
-KPX Y A -80
-
-KPX a t 5
-KPX a p 20
-KPX a b 5
-
-KPX b y -20
-KPX b v -20
-
-KPX c y -20
-KPX c l -15
-KPX c k -15
-
-KPX comma space -50
-KPX comma quoteright -70
-KPX comma quotedblright -70
-
-KPX e y -20
-KPX e x -20
-KPX e w -20
-KPX e v -20
-
-KPX f period -40
-KPX f o -20
-KPX f l -15
-KPX f i -15
-KPX f f -20
-KPX f dotlessi -15
-KPX f comma -40
-KPX f a -15
-
-KPX g i 25
-KPX g a 15
-
-KPX h y -30
-
-KPX k y -5
-KPX k o -30
-KPX k e -40
-
-KPX m y -20
-KPX m u -20
-
-KPX n y -15
-KPX n v -30
-
-KPX o y -20
-KPX o x -30
-KPX o w -20
-KPX o v -30
-
-KPX p y -20
-
-KPX period space -50
-KPX period quoteright -70
-KPX period quotedblright -70
-
-KPX quotedblleft A -50
-
-KPX quotedblright space -50
-
-KPX quoteleft quoteleft -80
-KPX quoteleft A -50
-
-KPX quoteright v -10
-KPX quoteright t 10
-KPX quoteright space -50
-KPX quoteright s -15
-KPX quoteright r -20
-KPX quoteright quoteright -80
-KPX quoteright d -50
-
-KPX r y 40
-KPX r v 40
-KPX r u 20
-KPX r t 20
-KPX r s 20
-KPX r q -8
-KPX r period -73
-KPX r p 20
-KPX r o -15
-KPX r n 21
-KPX r m 15
-KPX r l 20
-KPX r k 5
-KPX r i 20
-KPX r hyphen -60
-KPX r g 1
-KPX r e -4
-KPX r d -6
-KPX r comma -75
-KPX r c -7
-
-KPX s period 20
-KPX s comma 20
-
-KPX space quoteleft -50
-KPX space quotedblleft -50
-KPX space Y -60
-KPX space W -25
-KPX space V -80
-KPX space T -25
-KPX space A -20
-
-KPX v period -90
-KPX v o -20
-KPX v e -20
-KPX v comma -90
-KPX v a -30
-
-KPX w period -90
-KPX w o -30
-KPX w e -20
-KPX w comma -90
-KPX w a -30
-
-KPX x e -20
-
-KPX y period -100
-KPX y o -30
-KPX y e -20
-KPX y comma -100
-KPX y c -35
-KPX y a -30
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 170 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 100 170 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 120 170 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 170 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 190 135 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 130 170 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 50 170 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex -10 170 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 10 170 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 50 170 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -45 170 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -130 170 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -110 170 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -95 170 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 170 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 210 170 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 150 170 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 170 170 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 210 170 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 180 170 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron -10 170 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 145 170 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 50 170 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 70 170 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 75 170 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 135 170 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 60 170 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 5 170 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 60 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 150 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 90 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 70 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 110 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -65 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -150 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -130 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -115 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 50 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 80 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron -50 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 125 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 50 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 55 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 115 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron -15 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/AvantGarde-DemiOblique.afm b/blt3.0/library/AFM/AvantGarde-DemiOblique.afm
deleted file mode 100644
index ea40ef1..0000000
--- a/blt3.0/library/AFM/AvantGarde-DemiOblique.afm
+++ /dev/null
@@ -1,577 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Mar  4 13:49:44 1991
-Comment UniqueID 34373
-Comment VMusage 6550 39938
-FontName AvantGarde-DemiOblique
-FullName ITC Avant Garde Gothic Demi Oblique
-FamilyName ITC Avant Garde Gothic
-Weight Demi
-ItalicAngle -10.5
-IsFixedPitch false
-FontBBox -123 -251 1256 1021
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 740
-XHeight 555
-Ascender 740
-Descender -185
-StartCharMetrics 228
-C 32 ; WX 280 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 280 ; N exclam ; B 73 0 343 740 ;
-C 34 ; WX 360 ; N quotedbl ; B 127 444 478 740 ;
-C 35 ; WX 560 ; N numbersign ; B 66 0 618 700 ;
-C 36 ; WX 560 ; N dollar ; B 99 -86 582 857 ;
-C 37 ; WX 860 ; N percent ; B 139 -15 856 755 ;
-C 38 ; WX 680 ; N ampersand ; B 71 -15 742 755 ;
-C 39 ; WX 280 ; N quoteright ; B 159 466 342 740 ;
-C 40 ; WX 380 ; N parenleft ; B 120 -157 490 754 ;
-C 41 ; WX 380 ; N parenright ; B 8 -157 378 754 ;
-C 42 ; WX 440 ; N asterisk ; B 174 457 492 755 ;
-C 43 ; WX 600 ; N plus ; B 84 0 610 506 ;
-C 44 ; WX 280 ; N comma ; B 48 -141 231 133 ;
-C 45 ; WX 420 ; N hyphen ; B 114 230 413 348 ;
-C 46 ; WX 280 ; N period ; B 73 0 231 133 ;
-C 47 ; WX 460 ; N slash ; B -13 -100 591 740 ;
-C 48 ; WX 560 ; N zero ; B 70 -15 628 755 ;
-C 49 ; WX 560 ; N one ; B 230 0 500 740 ;
-C 50 ; WX 560 ; N two ; B 44 0 622 755 ;
-C 51 ; WX 560 ; N three ; B 67 -15 585 755 ;
-C 52 ; WX 560 ; N four ; B 36 0 604 740 ;
-C 53 ; WX 560 ; N five ; B 64 -15 600 740 ;
-C 54 ; WX 560 ; N six ; B 64 -15 587 739 ;
-C 55 ; WX 560 ; N seven ; B 83 0 635 740 ;
-C 56 ; WX 560 ; N eight ; B 71 -15 590 755 ;
-C 57 ; WX 560 ; N nine ; B 110 0 633 754 ;
-C 58 ; WX 280 ; N colon ; B 73 0 309 555 ;
-C 59 ; WX 280 ; N semicolon ; B 48 -141 309 555 ;
-C 60 ; WX 600 ; N less ; B 84 -8 649 514 ;
-C 61 ; WX 600 ; N equal ; B 63 81 631 425 ;
-C 62 ; WX 600 ; N greater ; B 45 -8 610 514 ;
-C 63 ; WX 560 ; N question ; B 135 0 593 755 ;
-C 64 ; WX 740 ; N at ; B 109 -12 832 712 ;
-C 65 ; WX 740 ; N A ; B 7 0 732 740 ;
-C 66 ; WX 580 ; N B ; B 70 0 610 740 ;
-C 67 ; WX 780 ; N C ; B 97 -15 864 755 ;
-C 68 ; WX 700 ; N D ; B 63 0 732 740 ;
-C 69 ; WX 520 ; N E ; B 61 0 596 740 ;
-C 70 ; WX 480 ; N F ; B 61 0 575 740 ;
-C 71 ; WX 840 ; N G ; B 89 -15 887 755 ;
-C 72 ; WX 680 ; N H ; B 71 0 747 740 ;
-C 73 ; WX 280 ; N I ; B 72 0 346 740 ;
-C 74 ; WX 480 ; N J ; B 34 -15 546 740 ;
-C 75 ; WX 620 ; N K ; B 89 0 757 740 ;
-C 76 ; WX 440 ; N L ; B 72 0 459 740 ;
-C 77 ; WX 900 ; N M ; B 63 0 974 740 ;
-C 78 ; WX 740 ; N N ; B 70 0 808 740 ;
-C 79 ; WX 840 ; N O ; B 95 -15 882 755 ;
-C 80 ; WX 560 ; N P ; B 72 0 645 740 ;
-C 81 ; WX 840 ; N Q ; B 94 -15 882 755 ;
-C 82 ; WX 580 ; N R ; B 64 0 656 740 ;
-C 83 ; WX 520 ; N S ; B 49 -15 578 755 ;
-C 84 ; WX 420 ; N T ; B 119 0 555 740 ;
-C 85 ; WX 640 ; N U ; B 97 -15 722 740 ;
-C 86 ; WX 700 ; N V ; B 145 0 832 740 ;
-C 87 ; WX 900 ; N W ; B 144 0 1036 740 ;
-C 88 ; WX 680 ; N X ; B 4 0 813 740 ;
-C 89 ; WX 620 ; N Y ; B 135 0 759 740 ;
-C 90 ; WX 500 ; N Z ; B 19 0 599 740 ;
-C 91 ; WX 320 ; N bracketleft ; B 89 -157 424 754 ;
-C 92 ; WX 640 ; N backslash ; B 233 -100 525 740 ;
-C 93 ; WX 320 ; N bracketright ; B 7 -157 342 754 ;
-C 94 ; WX 600 ; N asciicircum ; B 142 375 596 740 ;
-C 95 ; WX 500 ; N underscore ; B -23 -125 486 -75 ;
-C 96 ; WX 280 ; N quoteleft ; B 158 466 341 740 ;
-C 97 ; WX 660 ; N a ; B 73 -18 716 574 ;
-C 98 ; WX 660 ; N b ; B 47 -18 689 740 ;
-C 99 ; WX 640 ; N c ; B 84 -18 679 574 ;
-C 100 ; WX 660 ; N d ; B 80 -18 755 740 ;
-C 101 ; WX 640 ; N e ; B 77 -18 667 577 ;
-C 102 ; WX 280 ; N f ; B 62 0 420 755 ; L i fi ; L l fl ;
-C 103 ; WX 660 ; N g ; B 33 -226 726 574 ;
-C 104 ; WX 600 ; N h ; B 54 0 614 740 ;
-C 105 ; WX 240 ; N i ; B 53 0 323 740 ;
-C 106 ; WX 260 ; N j ; B -18 -185 342 740 ;
-C 107 ; WX 580 ; N k ; B 80 0 648 740 ;
-C 108 ; WX 240 ; N l ; B 54 0 324 740 ;
-C 109 ; WX 940 ; N m ; B 54 0 954 574 ;
-C 110 ; WX 600 ; N n ; B 54 0 613 574 ;
-C 111 ; WX 640 ; N o ; B 71 -18 672 574 ;
-C 112 ; WX 660 ; N p ; B 13 -185 686 574 ;
-C 113 ; WX 660 ; N q ; B 78 -185 716 574 ;
-C 114 ; WX 320 ; N r ; B 63 0 423 574 ;
-C 115 ; WX 440 ; N s ; B 49 -18 483 574 ;
-C 116 ; WX 300 ; N t ; B 86 0 402 740 ;
-C 117 ; WX 600 ; N u ; B 87 -18 647 555 ;
-C 118 ; WX 560 ; N v ; B 106 0 659 555 ;
-C 119 ; WX 800 ; N w ; B 114 0 892 555 ;
-C 120 ; WX 560 ; N x ; B 3 0 632 555 ;
-C 121 ; WX 580 ; N y ; B 75 -185 674 555 ;
-C 122 ; WX 460 ; N z ; B 20 0 528 555 ;
-C 123 ; WX 340 ; N braceleft ; B 40 -191 455 747 ;
-C 124 ; WX 600 ; N bar ; B 214 -100 503 740 ;
-C 125 ; WX 340 ; N braceright ; B -12 -191 405 747 ;
-C 126 ; WX 600 ; N asciitilde ; B 114 160 579 347 ;
-C 161 ; WX 280 ; N exclamdown ; B 40 -185 310 555 ;
-C 162 ; WX 560 ; N cent ; B 110 39 599 715 ;
-C 163 ; WX 560 ; N sterling ; B 38 0 615 755 ;
-C 164 ; WX 160 ; N fraction ; B -123 0 419 740 ;
-C 165 ; WX 560 ; N yen ; B 83 0 707 740 ;
-C 166 ; WX 560 ; N florin ; B -27 -151 664 824 ;
-C 167 ; WX 560 ; N section ; B 65 -158 602 755 ;
-C 168 ; WX 560 ; N currency ; B 53 69 628 577 ;
-C 169 ; WX 220 ; N quotesingle ; B 152 444 314 740 ;
-C 170 ; WX 480 ; N quotedblleft ; B 156 466 546 740 ;
-C 171 ; WX 460 ; N guillemotleft ; B 105 108 487 469 ;
-C 172 ; WX 240 ; N guilsinglleft ; B 94 108 277 469 ;
-C 173 ; WX 240 ; N guilsinglright ; B 70 108 253 469 ;
-C 174 ; WX 520 ; N fi ; B 72 0 598 755 ;
-C 175 ; WX 520 ; N fl ; B 72 0 598 755 ;
-C 177 ; WX 500 ; N endash ; B 78 230 529 348 ;
-C 178 ; WX 560 ; N dagger ; B 133 -142 612 740 ;
-C 179 ; WX 560 ; N daggerdbl ; B 63 -142 618 740 ;
-C 180 ; WX 280 ; N periodcentered ; B 108 187 265 320 ;
-C 182 ; WX 600 ; N paragraph ; B 90 -103 744 740 ;
-C 183 ; WX 600 ; N bullet ; B 215 222 526 532 ;
-C 184 ; WX 280 ; N quotesinglbase ; B 47 -141 230 133 ;
-C 185 ; WX 480 ; N quotedblbase ; B 45 -141 435 133 ;
-C 186 ; WX 480 ; N quotedblright ; B 157 466 547 740 ;
-C 187 ; WX 460 ; N guillemotright ; B 81 108 463 469 ;
-C 188 ; WX 1000 ; N ellipsis ; B 100 0 924 133 ;
-C 189 ; WX 1280 ; N perthousand ; B 139 -15 1256 755 ;
-C 191 ; WX 560 ; N questiondown ; B 69 -200 527 555 ;
-C 193 ; WX 420 ; N grave ; B 189 624 462 851 ;
-C 194 ; WX 420 ; N acute ; B 224 624 508 849 ;
-C 195 ; WX 540 ; N circumflex ; B 189 636 588 774 ;
-C 196 ; WX 480 ; N tilde ; B 178 636 564 767 ;
-C 197 ; WX 420 ; N macron ; B 192 648 490 759 ;
-C 198 ; WX 480 ; N breve ; B 185 633 582 770 ;
-C 199 ; WX 280 ; N dotaccent ; B 192 636 350 769 ;
-C 200 ; WX 500 ; N dieresis ; B 196 636 565 769 ;
-C 202 ; WX 360 ; N ring ; B 206 619 424 834 ;
-C 203 ; WX 340 ; N cedilla ; B 67 -251 272 6 ;
-C 205 ; WX 700 ; N hungarumlaut ; B 258 610 754 862 ;
-C 206 ; WX 340 ; N ogonek ; B 59 -195 243 9 ;
-C 207 ; WX 540 ; N caron ; B 214 636 613 774 ;
-C 208 ; WX 1000 ; N emdash ; B 78 230 1029 348 ;
-C 225 ; WX 900 ; N AE ; B -5 0 961 740 ;
-C 227 ; WX 360 ; N ordfeminine ; B 127 438 472 755 ;
-C 232 ; WX 480 ; N Lslash ; B 68 0 484 740 ;
-C 233 ; WX 840 ; N Oslash ; B 94 -71 891 814 ;
-C 234 ; WX 1060 ; N OE ; B 98 -15 1144 755 ;
-C 235 ; WX 360 ; N ordmasculine ; B 131 438 451 755 ;
-C 241 ; WX 1080 ; N ae ; B 75 -18 1105 574 ;
-C 245 ; WX 240 ; N dotlessi ; B 53 0 289 555 ;
-C 248 ; WX 320 ; N lslash ; B 74 0 404 740 ;
-C 249 ; WX 660 ; N oslash ; B 81 -50 685 608 ;
-C 250 ; WX 1080 ; N oe ; B 76 -18 1108 574 ;
-C 251 ; WX 600 ; N germandbls ; B 51 -18 629 755 ;
-C -1 ; WX 640 ; N ecircumflex ; B 77 -18 667 774 ;
-C -1 ; WX 640 ; N edieresis ; B 77 -18 667 769 ;
-C -1 ; WX 660 ; N aacute ; B 73 -18 716 849 ;
-C -1 ; WX 740 ; N registered ; B 50 -12 827 752 ;
-C -1 ; WX 240 ; N icircumflex ; B 39 0 438 774 ;
-C -1 ; WX 600 ; N udieresis ; B 87 -18 647 769 ;
-C -1 ; WX 640 ; N ograve ; B 71 -18 672 851 ;
-C -1 ; WX 600 ; N uacute ; B 87 -18 647 849 ;
-C -1 ; WX 600 ; N ucircumflex ; B 87 -18 647 774 ;
-C -1 ; WX 740 ; N Aacute ; B 7 0 732 1019 ;
-C -1 ; WX 240 ; N igrave ; B 53 0 347 851 ;
-C -1 ; WX 280 ; N Icircumflex ; B 72 0 489 944 ;
-C -1 ; WX 640 ; N ccedilla ; B 83 -251 679 574 ;
-C -1 ; WX 660 ; N adieresis ; B 73 -18 716 769 ;
-C -1 ; WX 520 ; N Ecircumflex ; B 61 0 609 944 ;
-C -1 ; WX 440 ; N scaron ; B 49 -18 563 774 ;
-C -1 ; WX 660 ; N thorn ; B 13 -185 686 740 ;
-C -1 ; WX 1000 ; N trademark ; B 131 296 958 740 ;
-C -1 ; WX 640 ; N egrave ; B 77 -18 667 851 ;
-C -1 ; WX 336 ; N threesuperior ; B 87 287 413 749 ;
-C -1 ; WX 460 ; N zcaron ; B 20 0 598 774 ;
-C -1 ; WX 660 ; N atilde ; B 73 -18 716 767 ;
-C -1 ; WX 660 ; N aring ; B 73 -18 716 834 ;
-C -1 ; WX 640 ; N ocircumflex ; B 71 -18 672 774 ;
-C -1 ; WX 520 ; N Edieresis ; B 61 0 606 939 ;
-C -1 ; WX 840 ; N threequarters ; B 97 0 836 749 ;
-C -1 ; WX 580 ; N ydieresis ; B 75 -185 674 769 ;
-C -1 ; WX 580 ; N yacute ; B 75 -185 674 849 ;
-C -1 ; WX 240 ; N iacute ; B 53 0 443 849 ;
-C -1 ; WX 740 ; N Acircumflex ; B 7 0 732 944 ;
-C -1 ; WX 640 ; N Uacute ; B 97 -15 722 1019 ;
-C -1 ; WX 640 ; N eacute ; B 77 -18 667 849 ;
-C -1 ; WX 840 ; N Ograve ; B 95 -15 882 1021 ;
-C -1 ; WX 660 ; N agrave ; B 73 -18 716 851 ;
-C -1 ; WX 640 ; N Udieresis ; B 97 -15 722 939 ;
-C -1 ; WX 660 ; N acircumflex ; B 73 -18 716 774 ;
-C -1 ; WX 280 ; N Igrave ; B 72 0 398 1021 ;
-C -1 ; WX 336 ; N twosuperior ; B 73 296 436 749 ;
-C -1 ; WX 640 ; N Ugrave ; B 97 -15 722 1021 ;
-C -1 ; WX 840 ; N onequarter ; B 187 0 779 740 ;
-C -1 ; WX 640 ; N Ucircumflex ; B 97 -15 722 944 ;
-C -1 ; WX 520 ; N Scaron ; B 49 -15 635 944 ;
-C -1 ; WX 280 ; N Idieresis ; B 72 0 486 939 ;
-C -1 ; WX 240 ; N idieresis ; B 53 0 435 769 ;
-C -1 ; WX 520 ; N Egrave ; B 61 0 596 1021 ;
-C -1 ; WX 840 ; N Oacute ; B 95 -15 882 1019 ;
-C -1 ; WX 600 ; N divide ; B 84 -20 610 526 ;
-C -1 ; WX 740 ; N Atilde ; B 7 0 732 937 ;
-C -1 ; WX 740 ; N Aring ; B 7 0 732 969 ;
-C -1 ; WX 840 ; N Odieresis ; B 95 -15 882 939 ;
-C -1 ; WX 740 ; N Adieresis ; B 7 0 732 939 ;
-C -1 ; WX 740 ; N Ntilde ; B 70 0 808 937 ;
-C -1 ; WX 500 ; N Zcaron ; B 19 0 650 944 ;
-C -1 ; WX 560 ; N Thorn ; B 72 0 619 740 ;
-C -1 ; WX 280 ; N Iacute ; B 72 0 494 1019 ;
-C -1 ; WX 600 ; N plusminus ; B 37 -62 626 556 ;
-C -1 ; WX 600 ; N multiply ; B 76 12 617 494 ;
-C -1 ; WX 520 ; N Eacute ; B 61 0 596 1019 ;
-C -1 ; WX 620 ; N Ydieresis ; B 135 0 759 939 ;
-C -1 ; WX 336 ; N onesuperior ; B 182 296 360 740 ;
-C -1 ; WX 600 ; N ugrave ; B 87 -18 647 851 ;
-C -1 ; WX 600 ; N logicalnot ; B 105 108 631 425 ;
-C -1 ; WX 600 ; N ntilde ; B 54 0 624 767 ;
-C -1 ; WX 840 ; N Otilde ; B 95 -15 882 937 ;
-C -1 ; WX 640 ; N otilde ; B 71 -18 672 767 ;
-C -1 ; WX 780 ; N Ccedilla ; B 97 -251 864 755 ;
-C -1 ; WX 740 ; N Agrave ; B 7 0 732 1021 ;
-C -1 ; WX 840 ; N onehalf ; B 157 0 830 740 ;
-C -1 ; WX 742 ; N Eth ; B 83 0 766 740 ;
-C -1 ; WX 400 ; N degree ; B 160 426 451 712 ;
-C -1 ; WX 620 ; N Yacute ; B 135 0 759 1019 ;
-C -1 ; WX 840 ; N Ocircumflex ; B 95 -15 882 944 ;
-C -1 ; WX 640 ; N oacute ; B 71 -18 672 849 ;
-C -1 ; WX 576 ; N mu ; B 3 -187 642 555 ;
-C -1 ; WX 600 ; N minus ; B 84 193 610 313 ;
-C -1 ; WX 640 ; N eth ; B 73 -18 699 754 ;
-C -1 ; WX 640 ; N odieresis ; B 71 -18 672 769 ;
-C -1 ; WX 740 ; N copyright ; B 50 -12 827 752 ;
-C -1 ; WX 600 ; N brokenbar ; B 214 -100 503 740 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 218
-
-KPX A y -50
-KPX A w -65
-KPX A v -70
-KPX A u -20
-KPX A quoteright -90
-KPX A Y -80
-KPX A W -60
-KPX A V -102
-KPX A U -40
-KPX A T -25
-KPX A Q -50
-KPX A O -50
-KPX A G -40
-KPX A C -40
-
-KPX B A -10
-
-KPX C A -40
-
-KPX D period -20
-KPX D comma -20
-KPX D Y -45
-KPX D W -25
-KPX D V -50
-KPX D A -50
-
-KPX F period -129
-KPX F e -20
-KPX F comma -162
-KPX F a -20
-KPX F A -75
-
-KPX G period -20
-KPX G comma -20
-KPX G Y -15
-
-KPX J period -15
-KPX J a -20
-KPX J A -30
-
-KPX K y -20
-KPX K u -15
-KPX K o -45
-KPX K e -40
-KPX K O -30
-
-KPX L y -23
-KPX L quoteright -30
-KPX L quotedblright -30
-KPX L Y -80
-KPX L W -55
-KPX L V -85
-KPX L T -46
-
-KPX O period -30
-KPX O comma -30
-KPX O Y -30
-KPX O X -30
-KPX O W -20
-KPX O V -45
-KPX O T -15
-KPX O A -60
-
-KPX P period -200
-KPX P o -20
-KPX P e -20
-KPX P comma -220
-KPX P a -20
-KPX P A -100
-
-KPX Q comma 20
-
-KPX R W 25
-KPX R V -10
-KPX R U 25
-KPX R T 40
-KPX R O 25
-
-KPX S comma 20
-
-KPX T y -10
-KPX T w -55
-KPX T u -46
-KPX T semicolon -29
-KPX T r -30
-KPX T period -91
-KPX T o -49
-KPX T hyphen -75
-KPX T e -49
-KPX T comma -82
-KPX T colon -15
-KPX T a -70
-KPX T O -15
-KPX T A -25
-
-KPX U period -20
-KPX U comma -20
-KPX U A -40
-
-KPX V u -55
-KPX V semicolon -33
-KPX V period -145
-KPX V o -101
-KPX V i -15
-KPX V hyphen -75
-KPX V e -101
-KPX V comma -145
-KPX V colon -18
-KPX V a -95
-KPX V O -45
-KPX V G -20
-KPX V A -102
-
-KPX W y -15
-KPX W u -30
-KPX W semicolon -33
-KPX W period -106
-KPX W o -46
-KPX W i -10
-KPX W hyphen -35
-KPX W e -47
-KPX W comma -106
-KPX W colon -15
-KPX W a -50
-KPX W O -20
-KPX W A -58
-
-KPX Y u -52
-KPX Y semicolon -23
-KPX Y period -145
-KPX Y o -89
-KPX Y hyphen -100
-KPX Y e -89
-KPX Y comma -145
-KPX Y colon -10
-KPX Y a -93
-KPX Y O -30
-KPX Y A -80
-
-KPX a t 5
-KPX a p 20
-KPX a b 5
-
-KPX b y -20
-KPX b v -20
-
-KPX c y -20
-KPX c l -15
-KPX c k -15
-
-KPX comma space -50
-KPX comma quoteright -70
-KPX comma quotedblright -70
-
-KPX e y -20
-KPX e x -20
-KPX e w -20
-KPX e v -20
-
-KPX f period -40
-KPX f o -20
-KPX f l -15
-KPX f i -15
-KPX f f -20
-KPX f dotlessi -15
-KPX f comma -40
-KPX f a -15
-
-KPX g i 25
-KPX g a 15
-
-KPX h y -30
-
-KPX k y -5
-KPX k o -30
-KPX k e -40
-
-KPX m y -20
-KPX m u -20
-
-KPX n y -15
-KPX n v -30
-
-KPX o y -20
-KPX o x -30
-KPX o w -20
-KPX o v -30
-
-KPX p y -20
-
-KPX period space -50
-KPX period quoteright -70
-KPX period quotedblright -70
-
-KPX quotedblleft A -50
-
-KPX quotedblright space -50
-
-KPX quoteleft quoteleft -80
-KPX quoteleft A -50
-
-KPX quoteright v -10
-KPX quoteright t 10
-KPX quoteright space -50
-KPX quoteright s -15
-KPX quoteright r -20
-KPX quoteright quoteright -80
-KPX quoteright d -50
-
-KPX r y 40
-KPX r v 40
-KPX r u 20
-KPX r t 20
-KPX r s 20
-KPX r q -8
-KPX r period -73
-KPX r p 20
-KPX r o -15
-KPX r n 21
-KPX r m 15
-KPX r l 20
-KPX r k 5
-KPX r i 20
-KPX r hyphen -60
-KPX r g 1
-KPX r e -4
-KPX r d -6
-KPX r comma -75
-KPX r c -7
-
-KPX s period 20
-KPX s comma 20
-
-KPX space quoteleft -50
-KPX space quotedblleft -50
-KPX space Y -60
-KPX space W -25
-KPX space V -80
-KPX space T -25
-KPX space A -20
-
-KPX v period -90
-KPX v o -20
-KPX v e -20
-KPX v comma -90
-KPX v a -30
-
-KPX w period -90
-KPX w o -30
-KPX w e -20
-KPX w comma -90
-KPX w a -30
-
-KPX x e -20
-
-KPX y period -100
-KPX y o -30
-KPX y e -20
-KPX y comma -100
-KPX y c -35
-KPX y a -30
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 192 170 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 132 170 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 152 170 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 192 170 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 215 135 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 162 170 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 82 170 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 22 170 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 42 170 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 82 170 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -13 170 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -98 170 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -78 170 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -63 170 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 162 170 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 242 170 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 182 170 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 202 170 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 242 170 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 212 170 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 22 170 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 177 170 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 82 170 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 102 170 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 107 170 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 170 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 92 170 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 37 170 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 60 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 150 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 90 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 70 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 110 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -65 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -150 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -130 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -115 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 50 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 80 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron -50 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 125 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 50 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 55 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 115 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron -15 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Bookman-Demi.afm b/blt3.0/library/AFM/Bookman-Demi.afm
deleted file mode 100644
index 51cb737..0000000
--- a/blt3.0/library/AFM/Bookman-Demi.afm
+++ /dev/null
@@ -1,416 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Jan 21 16:13:29 1992
-Comment UniqueID 37831
-Comment VMusage 31983 38875
-FontName Bookman-Demi
-FullName ITC Bookman Demi
-FamilyName ITC Bookman
-Weight Demi
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -194 -250 1346 934 
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 502
-Ascender 725
-Descender -212
-StartCharMetrics 228
-C 32 ; WX 340 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 360 ; N exclam ; B 82 -8 282 698 ;
-C 34 ; WX 420 ; N quotedbl ; B 11 379 369 698 ;
-C 35 ; WX 660 ; N numbersign ; B 84 0 576 681 ;
-C 36 ; WX 660 ; N dollar ; B 48 -119 620 805 ;
-C 37 ; WX 940 ; N percent ; B 12 -8 924 698 ;
-C 38 ; WX 800 ; N ampersand ; B 21 -17 772 698 ;
-C 39 ; WX 320 ; N quoteright ; B 82 440 242 698 ;
-C 40 ; WX 320 ; N parenleft ; B 48 -150 289 749 ;
-C 41 ; WX 320 ; N parenright ; B 20 -150 262 749 ;
-C 42 ; WX 460 ; N asterisk ; B 62 317 405 697 ;
-C 43 ; WX 600 ; N plus ; B 51 9 555 514 ;
-C 44 ; WX 340 ; N comma ; B 78 -124 257 162 ;
-C 45 ; WX 360 ; N hyphen ; B 20 210 340 318 ;
-C 46 ; WX 340 ; N period ; B 76 -8 258 172 ;
-C 47 ; WX 600 ; N slash ; B 50 -149 555 725 ;
-C 48 ; WX 660 ; N zero ; B 30 -17 639 698 ;
-C 49 ; WX 660 ; N one ; B 137 0 568 681 ;
-C 50 ; WX 660 ; N two ; B 41 0 628 698 ;
-C 51 ; WX 660 ; N three ; B 37 -17 631 698 ;
-C 52 ; WX 660 ; N four ; B 19 0 649 681 ;
-C 53 ; WX 660 ; N five ; B 44 -17 623 723 ;
-C 54 ; WX 660 ; N six ; B 34 -17 634 698 ;
-C 55 ; WX 660 ; N seven ; B 36 0 632 681 ;
-C 56 ; WX 660 ; N eight ; B 36 -17 633 698 ;
-C 57 ; WX 660 ; N nine ; B 33 -17 636 698 ;
-C 58 ; WX 340 ; N colon ; B 76 -8 258 515 ;
-C 59 ; WX 340 ; N semicolon ; B 75 -124 259 515 ;
-C 60 ; WX 600 ; N less ; B 49 -9 558 542 ;
-C 61 ; WX 600 ; N equal ; B 51 109 555 421 ;
-C 62 ; WX 600 ; N greater ; B 48 -9 557 542 ;
-C 63 ; WX 660 ; N question ; B 61 -8 608 698 ;
-C 64 ; WX 820 ; N at ; B 60 -17 758 698 ;
-C 65 ; WX 720 ; N A ; B -34 0 763 681 ;
-C 66 ; WX 720 ; N B ; B 20 0 693 681 ;
-C 67 ; WX 740 ; N C ; B 35 -17 724 698 ;
-C 68 ; WX 780 ; N D ; B 20 0 748 681 ;
-C 69 ; WX 720 ; N E ; B 20 0 724 681 ;
-C 70 ; WX 680 ; N F ; B 20 0 686 681 ;
-C 71 ; WX 780 ; N G ; B 35 -17 773 698 ;
-C 72 ; WX 820 ; N H ; B 20 0 800 681 ;
-C 73 ; WX 400 ; N I ; B 20 0 379 681 ;
-C 74 ; WX 640 ; N J ; B -12 -17 622 681 ;
-C 75 ; WX 800 ; N K ; B 20 0 796 681 ;
-C 76 ; WX 640 ; N L ; B 20 0 668 681 ;
-C 77 ; WX 940 ; N M ; B 20 0 924 681 ;
-C 78 ; WX 740 ; N N ; B 20 0 724 681 ;
-C 79 ; WX 800 ; N O ; B 35 -17 769 698 ;
-C 80 ; WX 660 ; N P ; B 20 0 658 681 ;
-C 81 ; WX 800 ; N Q ; B 35 -226 775 698 ;
-C 82 ; WX 780 ; N R ; B 20 0 783 681 ;
-C 83 ; WX 660 ; N S ; B 21 -17 639 698 ;
-C 84 ; WX 700 ; N T ; B -4 0 703 681 ;
-C 85 ; WX 740 ; N U ; B 15 -17 724 681 ;
-C 86 ; WX 720 ; N V ; B -20 0 730 681 ;
-C 87 ; WX 940 ; N W ; B -20 0 963 681 ;
-C 88 ; WX 780 ; N X ; B 1 0 770 681 ;
-C 89 ; WX 700 ; N Y ; B -20 0 718 681 ;
-C 90 ; WX 640 ; N Z ; B 6 0 635 681 ;
-C 91 ; WX 300 ; N bracketleft ; B 75 -138 285 725 ;
-C 92 ; WX 600 ; N backslash ; B 50 0 555 725 ;
-C 93 ; WX 300 ; N bracketright ; B 21 -138 231 725 ;
-C 94 ; WX 600 ; N asciicircum ; B 52 281 554 681 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 320 ; N quoteleft ; B 82 440 242 698 ;
-C 97 ; WX 580 ; N a ; B 28 -8 588 515 ;
-C 98 ; WX 600 ; N b ; B -20 -8 568 725 ;
-C 99 ; WX 580 ; N c ; B 31 -8 550 515 ;
-C 100 ; WX 640 ; N d ; B 31 -8 622 725 ;
-C 101 ; WX 580 ; N e ; B 31 -8 548 515 ;
-C 102 ; WX 380 ; N f ; B 22 0 461 741 ; L i fi ; L l fl ;
-C 103 ; WX 580 ; N g ; B 9 -243 583 595 ;
-C 104 ; WX 680 ; N h ; B 22 0 654 725 ;
-C 105 ; WX 360 ; N i ; B 22 0 335 729 ;
-C 106 ; WX 340 ; N j ; B -94 -221 278 729 ;
-C 107 ; WX 660 ; N k ; B 22 0 643 725 ;
-C 108 ; WX 340 ; N l ; B 9 0 322 725 ;
-C 109 ; WX 1000 ; N m ; B 22 0 980 515 ;
-C 110 ; WX 680 ; N n ; B 22 0 652 515 ;
-C 111 ; WX 620 ; N o ; B 31 -8 585 515 ;
-C 112 ; WX 640 ; N p ; B 22 -212 611 515 ;
-C 113 ; WX 620 ; N q ; B 31 -212 633 515 ;
-C 114 ; WX 460 ; N r ; B 22 0 462 502 ;
-C 115 ; WX 520 ; N s ; B 22 -8 492 515 ;
-C 116 ; WX 460 ; N t ; B 22 -8 445 660 ;
-C 117 ; WX 660 ; N u ; B 22 -8 653 502 ;
-C 118 ; WX 600 ; N v ; B -6 0 593 502 ;
-C 119 ; WX 800 ; N w ; B -6 0 810 502 ;
-C 120 ; WX 600 ; N x ; B 8 0 591 502 ;
-C 121 ; WX 620 ; N y ; B 6 -221 613 502 ;
-C 122 ; WX 560 ; N z ; B 22 0 547 502 ;
-C 123 ; WX 320 ; N braceleft ; B 14 -139 301 726 ;
-C 124 ; WX 600 ; N bar ; B 243 -250 362 750 ;
-C 125 ; WX 320 ; N braceright ; B 15 -140 302 725 ;
-C 126 ; WX 600 ; N asciitilde ; B 51 162 555 368 ;
-C 161 ; WX 360 ; N exclamdown ; B 84 -191 284 515 ;
-C 162 ; WX 660 ; N cent ; B 133 17 535 674 ;
-C 163 ; WX 660 ; N sterling ; B 10 -17 659 698 ;
-C 164 ; WX 120 ; N fraction ; B -194 0 312 681 ;
-C 165 ; WX 660 ; N yen ; B -28 0 696 681 ;
-C 166 ; WX 660 ; N florin ; B -46 -209 674 749 ;
-C 167 ; WX 600 ; N section ; B 36 -153 560 698 ;
-C 168 ; WX 660 ; N currency ; B 77 88 584 593 ;
-C 169 ; WX 240 ; N quotesingle ; B 42 379 178 698 ;
-C 170 ; WX 540 ; N quotedblleft ; B 82 439 449 698 ;
-C 171 ; WX 400 ; N guillemotleft ; B 34 101 360 457 ;
-C 172 ; WX 220 ; N guilsinglleft ; B 34 101 188 457 ;
-C 173 ; WX 220 ; N guilsinglright ; B 34 101 188 457 ;
-C 174 ; WX 740 ; N fi ; B 22 0 710 741 ;
-C 175 ; WX 740 ; N fl ; B 22 0 710 741 ;
-C 177 ; WX 500 ; N endash ; B -25 212 525 318 ;
-C 178 ; WX 440 ; N dagger ; B 33 -156 398 698 ;
-C 179 ; WX 380 ; N daggerdbl ; B 8 -156 380 698 ;
-C 180 ; WX 340 ; N periodcentered ; B 76 175 258 355 ;
-C 182 ; WX 800 ; N paragraph ; B 51 0 698 681 ;
-C 183 ; WX 460 ; N bullet ; B 60 170 404 511 ;
-C 184 ; WX 320 ; N quotesinglbase ; B 82 -114 242 144 ;
-C 185 ; WX 540 ; N quotedblbase ; B 82 -114 450 144 ;
-C 186 ; WX 540 ; N quotedblright ; B 82 440 449 698 ;
-C 187 ; WX 400 ; N guillemotright ; B 34 101 360 457 ;
-C 188 ; WX 1000 ; N ellipsis ; B 76 -8 924 172 ;
-C 189 ; WX 1360 ; N perthousand ; B 12 -8 1346 698 ;
-C 191 ; WX 660 ; N questiondown ; B 62 -191 609 515 ;
-C 193 ; WX 400 ; N grave ; B 68 547 327 730 ;
-C 194 ; WX 400 ; N acute ; B 68 547 327 731 ;
-C 195 ; WX 500 ; N circumflex ; B 68 555 430 731 ;
-C 196 ; WX 480 ; N tilde ; B 69 556 421 691 ;
-C 197 ; WX 460 ; N macron ; B 68 577 383 663 ;
-C 198 ; WX 500 ; N breve ; B 68 553 429 722 ;
-C 199 ; WX 320 ; N dotaccent ; B 68 536 259 730 ;
-C 200 ; WX 500 ; N dieresis ; B 68 560 441 698 ;
-C 202 ; WX 340 ; N ring ; B 68 552 275 755 ;
-C 203 ; WX 360 ; N cedilla ; B 68 -213 284 0 ;
-C 205 ; WX 440 ; N hungarumlaut ; B 68 554 365 741 ;
-C 206 ; WX 320 ; N ogonek ; B 68 -163 246 0 ;
-C 207 ; WX 500 ; N caron ; B 68 541 430 717 ;
-C 208 ; WX 1000 ; N emdash ; B -25 212 1025 318 ;
-C 225 ; WX 1140 ; N AE ; B -34 0 1149 681 ;
-C 227 ; WX 400 ; N ordfeminine ; B 27 383 396 698 ;
-C 232 ; WX 640 ; N Lslash ; B 20 0 668 681 ;
-C 233 ; WX 800 ; N Oslash ; B 35 -110 771 781 ;
-C 234 ; WX 1220 ; N OE ; B 35 -17 1219 698 ;
-C 235 ; WX 400 ; N ordmasculine ; B 17 383 383 698 ;
-C 241 ; WX 880 ; N ae ; B 28 -8 852 515 ;
-C 245 ; WX 360 ; N dotlessi ; B 22 0 335 502 ;
-C 248 ; WX 340 ; N lslash ; B 9 0 322 725 ;
-C 249 ; WX 620 ; N oslash ; B 31 -40 586 551 ;
-C 250 ; WX 940 ; N oe ; B 31 -8 908 515 ;
-C 251 ; WX 660 ; N germandbls ; B -61 -91 644 699 ;
-C -1 ; WX 580 ; N ecircumflex ; B 31 -8 548 731 ;
-C -1 ; WX 580 ; N edieresis ; B 31 -8 548 698 ;
-C -1 ; WX 580 ; N aacute ; B 28 -8 588 731 ;
-C -1 ; WX 740 ; N registered ; B 23 -17 723 698 ;
-C -1 ; WX 360 ; N icircumflex ; B -2 0 360 731 ;
-C -1 ; WX 660 ; N udieresis ; B 22 -8 653 698 ;
-C -1 ; WX 620 ; N ograve ; B 31 -8 585 730 ;
-C -1 ; WX 660 ; N uacute ; B 22 -8 653 731 ;
-C -1 ; WX 660 ; N ucircumflex ; B 22 -8 653 731 ;
-C -1 ; WX 720 ; N Aacute ; B -34 0 763 910 ;
-C -1 ; WX 360 ; N igrave ; B 22 0 335 730 ;
-C -1 ; WX 400 ; N Icircumflex ; B 18 0 380 910 ;
-C -1 ; WX 580 ; N ccedilla ; B 31 -213 550 515 ;
-C -1 ; WX 580 ; N adieresis ; B 28 -8 588 698 ;
-C -1 ; WX 720 ; N Ecircumflex ; B 20 0 724 910 ;
-C -1 ; WX 520 ; N scaron ; B 22 -8 492 717 ;
-C -1 ; WX 640 ; N thorn ; B 22 -212 611 725 ;
-C -1 ; WX 980 ; N trademark ; B 42 277 982 681 ;
-C -1 ; WX 580 ; N egrave ; B 31 -8 548 730 ;
-C -1 ; WX 396 ; N threesuperior ; B 5 269 391 698 ;
-C -1 ; WX 560 ; N zcaron ; B 22 0 547 717 ;
-C -1 ; WX 580 ; N atilde ; B 28 -8 588 691 ;
-C -1 ; WX 580 ; N aring ; B 28 -8 588 755 ;
-C -1 ; WX 620 ; N ocircumflex ; B 31 -8 585 731 ;
-C -1 ; WX 720 ; N Edieresis ; B 20 0 724 877 ;
-C -1 ; WX 990 ; N threequarters ; B 15 0 967 692 ;
-C -1 ; WX 620 ; N ydieresis ; B 6 -221 613 698 ;
-C -1 ; WX 620 ; N yacute ; B 6 -221 613 731 ;
-C -1 ; WX 360 ; N iacute ; B 22 0 335 731 ;
-C -1 ; WX 720 ; N Acircumflex ; B -34 0 763 910 ;
-C -1 ; WX 740 ; N Uacute ; B 15 -17 724 910 ;
-C -1 ; WX 580 ; N eacute ; B 31 -8 548 731 ;
-C -1 ; WX 800 ; N Ograve ; B 35 -17 769 909 ;
-C -1 ; WX 580 ; N agrave ; B 28 -8 588 730 ;
-C -1 ; WX 740 ; N Udieresis ; B 15 -17 724 877 ;
-C -1 ; WX 580 ; N acircumflex ; B 28 -8 588 731 ;
-C -1 ; WX 400 ; N Igrave ; B 20 0 379 909 ;
-C -1 ; WX 396 ; N twosuperior ; B 14 279 396 698 ;
-C -1 ; WX 740 ; N Ugrave ; B 15 -17 724 909 ;
-C -1 ; WX 990 ; N onequarter ; B 65 0 967 681 ;
-C -1 ; WX 740 ; N Ucircumflex ; B 15 -17 724 910 ;
-C -1 ; WX 660 ; N Scaron ; B 21 -17 639 896 ;
-C -1 ; WX 400 ; N Idieresis ; B 18 0 391 877 ;
-C -1 ; WX 360 ; N idieresis ; B -2 0 371 698 ;
-C -1 ; WX 720 ; N Egrave ; B 20 0 724 909 ;
-C -1 ; WX 800 ; N Oacute ; B 35 -17 769 910 ;
-C -1 ; WX 600 ; N divide ; B 51 9 555 521 ;
-C -1 ; WX 720 ; N Atilde ; B -34 0 763 870 ;
-C -1 ; WX 720 ; N Aring ; B -34 0 763 934 ;
-C -1 ; WX 800 ; N Odieresis ; B 35 -17 769 877 ;
-C -1 ; WX 720 ; N Adieresis ; B -34 0 763 877 ;
-C -1 ; WX 740 ; N Ntilde ; B 20 0 724 870 ;
-C -1 ; WX 640 ; N Zcaron ; B 6 0 635 896 ;
-C -1 ; WX 660 ; N Thorn ; B 20 0 658 681 ;
-C -1 ; WX 400 ; N Iacute ; B 20 0 379 910 ;
-C -1 ; WX 600 ; N plusminus ; B 51 0 555 514 ;
-C -1 ; WX 600 ; N multiply ; B 48 10 552 514 ;
-C -1 ; WX 720 ; N Eacute ; B 20 0 724 910 ;
-C -1 ; WX 700 ; N Ydieresis ; B -20 0 718 877 ;
-C -1 ; WX 396 ; N onesuperior ; B 65 279 345 687 ;
-C -1 ; WX 660 ; N ugrave ; B 22 -8 653 730 ;
-C -1 ; WX 600 ; N logicalnot ; B 51 129 555 421 ;
-C -1 ; WX 680 ; N ntilde ; B 22 0 652 691 ;
-C -1 ; WX 800 ; N Otilde ; B 35 -17 769 870 ;
-C -1 ; WX 620 ; N otilde ; B 31 -8 585 691 ;
-C -1 ; WX 740 ; N Ccedilla ; B 35 -213 724 698 ;
-C -1 ; WX 720 ; N Agrave ; B -34 0 763 909 ;
-C -1 ; WX 990 ; N onehalf ; B 65 0 980 681 ;
-C -1 ; WX 780 ; N Eth ; B 20 0 748 681 ;
-C -1 ; WX 400 ; N degree ; B 50 398 350 698 ;
-C -1 ; WX 700 ; N Yacute ; B -20 0 718 910 ;
-C -1 ; WX 800 ; N Ocircumflex ; B 35 -17 769 910 ;
-C -1 ; WX 620 ; N oacute ; B 31 -8 585 731 ;
-C -1 ; WX 660 ; N mu ; B 22 -221 653 502 ;
-C -1 ; WX 600 ; N minus ; B 51 207 555 323 ;
-C -1 ; WX 620 ; N eth ; B 31 -8 585 741 ;
-C -1 ; WX 620 ; N odieresis ; B 31 -8 585 698 ;
-C -1 ; WX 740 ; N copyright ; B 23 -17 723 698 ;
-C -1 ; WX 600 ; N brokenbar ; B 243 -175 362 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 90
-
-KPX A y -1
-KPX A w -9
-KPX A v -8
-KPX A Y -52
-KPX A W -20
-KPX A V -68
-KPX A T -40
-
-KPX F period -132
-KPX F comma -130
-KPX F A -59
-
-KPX L y 19
-KPX L Y -35
-KPX L W -41
-KPX L V -50
-KPX L T -4
-
-KPX P period -128
-KPX P comma -129
-KPX P A -46
-
-KPX R y -8
-KPX R Y -20
-KPX R W -24
-KPX R V -29
-KPX R T -4
-
-KPX T semicolon 5
-KPX T s -10
-KPX T r 27
-KPX T period -122
-KPX T o -28
-KPX T i 27
-KPX T hyphen -10
-KPX T e -29
-KPX T comma -122
-KPX T colon 7
-KPX T c -29
-KPX T a -24
-KPX T A -42
-
-KPX V y 12
-KPX V u -11
-KPX V semicolon -38
-KPX V r -15
-KPX V period -105
-KPX V o -79
-KPX V i 15
-KPX V hyphen -10
-KPX V e -80
-KPX V comma -103
-KPX V colon -37
-KPX V a -74
-KPX V A -88
-
-KPX W y 12
-KPX W u -11
-KPX W semicolon -38
-KPX W r -15
-KPX W period -105
-KPX W o -78
-KPX W i 15
-KPX W hyphen -10
-KPX W e -79
-KPX W comma -103
-KPX W colon -37
-KPX W a -73
-KPX W A -60
-
-KPX Y v 24
-KPX Y u -13
-KPX Y semicolon -34
-KPX Y q -66
-KPX Y period -105
-KPX Y p -23
-KPX Y o -66
-KPX Y i 2
-KPX Y hyphen -10
-KPX Y e -67
-KPX Y comma -103
-KPX Y colon -32
-KPX Y a -60
-KPX Y A -56
-
-KPX f f 21
-
-KPX r q -9
-KPX r period -102
-KPX r o -9
-KPX r n 20
-KPX r m 20
-KPX r hyphen -10
-KPX r h -23
-KPX r g -9
-KPX r f 20
-KPX r e -10
-KPX r d -10
-KPX r comma -101
-KPX r c -9
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 179 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 110 179 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 110 179 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 179 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 190 179 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 179 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 160 179 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 110 179 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 110 179 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 179 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 179 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -50 179 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -50 179 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 179 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 179 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 200 179 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 150 179 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 150 179 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 179 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 160 179 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 80 179 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 170 179 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 120 179 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 120 179 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 170 179 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 150 179 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 100 179 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 70 179 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 90 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 40 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 40 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 90 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 100 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 30 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 40 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 40 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -20 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -70 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -70 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -20 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 80 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 60 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 60 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 50 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 10 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 130 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 80 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 80 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 130 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 110 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 60 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 30 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Bookman-DemiItalic.afm b/blt3.0/library/AFM/Bookman-DemiItalic.afm
deleted file mode 100644
index 4b05c18..0000000
--- a/blt3.0/library/AFM/Bookman-DemiItalic.afm
+++ /dev/null
@@ -1,418 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Jan 21 16:12:43 1992
-Comment UniqueID 37832
-Comment VMusage 32139 39031
-FontName Bookman-DemiItalic
-FullName ITC Bookman Demi Italic
-FamilyName ITC Bookman
-Weight Demi
-ItalicAngle -10
-IsFixedPitch false
-FontBBox -231 -250 1333 941 
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 515
-Ascender 732
-Descender -213
-StartCharMetrics 228
-C 32 ; WX 340 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 320 ; N exclam ; B 86 -8 366 698 ;
-C 34 ; WX 380 ; N quotedbl ; B 140 371 507 697 ;
-C 35 ; WX 680 ; N numbersign ; B 157 0 649 681 ;
-C 36 ; WX 680 ; N dollar ; B 45 -164 697 790 ;
-C 37 ; WX 880 ; N percent ; B 106 -17 899 698 ;
-C 38 ; WX 980 ; N ampersand ; B 48 -17 1016 698 ;
-C 39 ; WX 320 ; N quoteright ; B 171 420 349 698 ;
-C 40 ; WX 260 ; N parenleft ; B 31 -134 388 741 ;
-C 41 ; WX 260 ; N parenright ; B -35 -134 322 741 ;
-C 42 ; WX 460 ; N asterisk ; B 126 346 508 698 ;
-C 43 ; WX 600 ; N plus ; B 91 9 595 514 ;
-C 44 ; WX 340 ; N comma ; B 100 -124 298 185 ;
-C 45 ; WX 280 ; N hyphen ; B 59 218 319 313 ;
-C 46 ; WX 340 ; N period ; B 106 -8 296 177 ;
-C 47 ; WX 360 ; N slash ; B 9 -106 502 742 ;
-C 48 ; WX 680 ; N zero ; B 87 -17 703 698 ;
-C 49 ; WX 680 ; N one ; B 123 0 565 681 ;
-C 50 ; WX 680 ; N two ; B 67 0 674 698 ;
-C 51 ; WX 680 ; N three ; B 72 -17 683 698 ;
-C 52 ; WX 680 ; N four ; B 63 0 708 681 ;
-C 53 ; WX 680 ; N five ; B 78 -17 669 681 ;
-C 54 ; WX 680 ; N six ; B 88 -17 704 698 ;
-C 55 ; WX 680 ; N seven ; B 123 0 739 681 ;
-C 56 ; WX 680 ; N eight ; B 68 -17 686 698 ;
-C 57 ; WX 680 ; N nine ; B 71 -17 712 698 ;
-C 58 ; WX 340 ; N colon ; B 106 -8 356 515 ;
-C 59 ; WX 340 ; N semicolon ; B 100 -124 352 515 ;
-C 60 ; WX 620 ; N less ; B 79 -9 588 540 ;
-C 61 ; WX 600 ; N equal ; B 91 109 595 421 ;
-C 62 ; WX 620 ; N greater ; B 89 -9 598 540 ;
-C 63 ; WX 620 ; N question ; B 145 -8 668 698 ;
-C 64 ; WX 780 ; N at ; B 80 -17 790 698 ;
-C 65 ; WX 720 ; N A ; B -27 0 769 681 ;
-C 66 ; WX 720 ; N B ; B 14 0 762 681 ;
-C 67 ; WX 700 ; N C ; B 78 -17 754 698 ;
-C 68 ; WX 760 ; N D ; B 14 0 805 681 ;
-C 69 ; WX 720 ; N E ; B 14 0 777 681 ;
-C 70 ; WX 660 ; N F ; B 14 0 763 681 ;
-C 71 ; WX 760 ; N G ; B 77 -17 828 698 ;
-C 72 ; WX 800 ; N H ; B 14 0 910 681 ;
-C 73 ; WX 380 ; N I ; B 14 0 485 681 ;
-C 74 ; WX 620 ; N J ; B 8 -17 721 681 ;
-C 75 ; WX 780 ; N K ; B 14 0 879 681 ;
-C 76 ; WX 640 ; N L ; B 14 0 725 681 ;
-C 77 ; WX 860 ; N M ; B 14 0 970 681 ;
-C 78 ; WX 740 ; N N ; B 14 0 845 681 ;
-C 79 ; WX 760 ; N O ; B 78 -17 806 698 ;
-C 80 ; WX 640 ; N P ; B -6 0 724 681 ;
-C 81 ; WX 760 ; N Q ; B 37 -213 805 698 ;
-C 82 ; WX 740 ; N R ; B 14 0 765 681 ;
-C 83 ; WX 700 ; N S ; B 59 -17 731 698 ;
-C 84 ; WX 700 ; N T ; B 70 0 802 681 ;
-C 85 ; WX 740 ; N U ; B 112 -17 855 681 ;
-C 86 ; WX 660 ; N V ; B 72 0 819 681 ;
-C 87 ; WX 1000 ; N W ; B 72 0 1090 681 ;
-C 88 ; WX 740 ; N X ; B -7 0 835 681 ;
-C 89 ; WX 660 ; N Y ; B 72 0 817 681 ;
-C 90 ; WX 680 ; N Z ; B 23 0 740 681 ;
-C 91 ; WX 260 ; N bracketleft ; B 9 -118 374 741 ;
-C 92 ; WX 580 ; N backslash ; B 73 0 575 741 ;
-C 93 ; WX 260 ; N bracketright ; B -18 -118 347 741 ;
-C 94 ; WX 620 ; N asciicircum ; B 92 281 594 681 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 320 ; N quoteleft ; B 155 420 333 698 ;
-C 97 ; WX 680 ; N a ; B 84 -8 735 515 ;
-C 98 ; WX 600 ; N b ; B 57 -8 633 732 ;
-C 99 ; WX 560 ; N c ; B 58 -8 597 515 ;
-C 100 ; WX 680 ; N d ; B 60 -8 714 732 ;
-C 101 ; WX 560 ; N e ; B 59 -8 596 515 ;
-C 102 ; WX 420 ; N f ; B -192 -213 641 741 ; L i fi ; L l fl ;
-C 103 ; WX 620 ; N g ; B 21 -213 669 515 ;
-C 104 ; WX 700 ; N h ; B 93 -8 736 732 ;
-C 105 ; WX 380 ; N i ; B 83 -8 420 755 ;
-C 106 ; WX 320 ; N j ; B -160 -213 392 755 ;
-C 107 ; WX 700 ; N k ; B 97 -8 732 732 ;
-C 108 ; WX 380 ; N l ; B 109 -8 410 732 ;
-C 109 ; WX 960 ; N m ; B 83 -8 996 515 ;
-C 110 ; WX 680 ; N n ; B 83 -8 715 515 ;
-C 111 ; WX 600 ; N o ; B 59 -8 627 515 ;
-C 112 ; WX 660 ; N p ; B -24 -213 682 515 ;
-C 113 ; WX 620 ; N q ; B 60 -213 640 515 ;
-C 114 ; WX 500 ; N r ; B 84 0 582 515 ;
-C 115 ; WX 540 ; N s ; B 32 -8 573 515 ;
-C 116 ; WX 440 ; N t ; B 106 -8 488 658 ;
-C 117 ; WX 680 ; N u ; B 83 -8 720 507 ;
-C 118 ; WX 540 ; N v ; B 56 -8 572 515 ;
-C 119 ; WX 860 ; N w ; B 56 -8 891 515 ;
-C 120 ; WX 620 ; N x ; B 10 -8 654 515 ;
-C 121 ; WX 600 ; N y ; B 25 -213 642 507 ;
-C 122 ; WX 560 ; N z ; B 36 -8 586 515 ;
-C 123 ; WX 300 ; N braceleft ; B 49 -123 413 742 ;
-C 124 ; WX 620 ; N bar ; B 303 -250 422 750 ;
-C 125 ; WX 300 ; N braceright ; B -8 -114 356 751 ;
-C 126 ; WX 620 ; N asciitilde ; B 101 162 605 368 ;
-C 161 ; WX 320 ; N exclamdown ; B 64 -191 344 515 ;
-C 162 ; WX 680 ; N cent ; B 161 25 616 718 ;
-C 163 ; WX 680 ; N sterling ; B 0 -17 787 698 ;
-C 164 ; WX 120 ; N fraction ; B -144 0 382 681 ;
-C 165 ; WX 680 ; N yen ; B 92 0 782 681 ;
-C 166 ; WX 680 ; N florin ; B -28 -199 743 741 ;
-C 167 ; WX 620 ; N section ; B 46 -137 638 698 ;
-C 168 ; WX 680 ; N currency ; B 148 85 637 571 ;
-C 169 ; WX 180 ; N quotesingle ; B 126 370 295 696 ;
-C 170 ; WX 520 ; N quotedblleft ; B 156 420 545 698 ;
-C 171 ; WX 380 ; N guillemotleft ; B 62 84 406 503 ;
-C 172 ; WX 220 ; N guilsinglleft ; B 62 84 249 503 ;
-C 173 ; WX 220 ; N guilsinglright ; B 62 84 249 503 ;
-C 174 ; WX 820 ; N fi ; B -191 -213 850 741 ;
-C 175 ; WX 820 ; N fl ; B -191 -213 850 741 ;
-C 177 ; WX 500 ; N endash ; B 40 219 573 311 ;
-C 178 ; WX 420 ; N dagger ; B 89 -137 466 698 ;
-C 179 ; WX 420 ; N daggerdbl ; B 79 -137 486 698 ;
-C 180 ; WX 340 ; N periodcentered ; B 126 173 316 358 ;
-C 182 ; WX 680 ; N paragraph ; B 137 0 715 681 ;
-C 183 ; WX 360 ; N bullet ; B 60 170 404 511 ;
-C 184 ; WX 300 ; N quotesinglbase ; B 106 -112 284 166 ;
-C 185 ; WX 520 ; N quotedblbase ; B 106 -112 495 166 ;
-C 186 ; WX 520 ; N quotedblright ; B 171 420 560 698 ;
-C 187 ; WX 380 ; N guillemotright ; B 62 84 406 503 ;
-C 188 ; WX 1000 ; N ellipsis ; B 86 -8 942 177 ;
-C 189 ; WX 1360 ; N perthousand ; B 106 -17 1333 698 ;
-C 191 ; WX 620 ; N questiondown ; B 83 -189 606 515 ;
-C 193 ; WX 380 ; N grave ; B 193 566 424 771 ;
-C 194 ; WX 340 ; N acute ; B 176 566 407 771 ;
-C 195 ; WX 480 ; N circumflex ; B 183 582 523 749 ;
-C 196 ; WX 480 ; N tilde ; B 178 587 533 709 ;
-C 197 ; WX 480 ; N macron ; B 177 603 531 691 ;
-C 198 ; WX 460 ; N breve ; B 177 577 516 707 ;
-C 199 ; WX 380 ; N dotaccent ; B 180 570 345 734 ;
-C 200 ; WX 520 ; N dieresis ; B 180 570 569 734 ;
-C 202 ; WX 360 ; N ring ; B 185 558 406 775 ;
-C 203 ; WX 360 ; N cedilla ; B 68 -220 289 -8 ;
-C 205 ; WX 560 ; N hungarumlaut ; B 181 560 616 775 ;
-C 206 ; WX 320 ; N ogonek ; B 68 -182 253 0 ;
-C 207 ; WX 480 ; N caron ; B 183 582 523 749 ;
-C 208 ; WX 1000 ; N emdash ; B 40 219 1073 311 ;
-C 225 ; WX 1140 ; N AE ; B -27 0 1207 681 ;
-C 227 ; WX 440 ; N ordfeminine ; B 118 400 495 685 ;
-C 232 ; WX 640 ; N Lslash ; B 14 0 724 681 ;
-C 233 ; WX 760 ; N Oslash ; B 21 -29 847 725 ;
-C 234 ; WX 1180 ; N OE ; B 94 -17 1245 698 ;
-C 235 ; WX 440 ; N ordmasculine ; B 127 400 455 685 ;
-C 241 ; WX 880 ; N ae ; B 39 -8 913 515 ;
-C 245 ; WX 380 ; N dotlessi ; B 83 -8 420 507 ;
-C 248 ; WX 380 ; N lslash ; B 63 -8 412 732 ;
-C 249 ; WX 600 ; N oslash ; B 17 -54 661 571 ;
-C 250 ; WX 920 ; N oe ; B 48 -8 961 515 ;
-C 251 ; WX 660 ; N germandbls ; B -231 -213 702 741 ;
-C -1 ; WX 560 ; N ecircumflex ; B 59 -8 596 749 ;
-C -1 ; WX 560 ; N edieresis ; B 59 -8 596 734 ;
-C -1 ; WX 680 ; N aacute ; B 84 -8 735 771 ;
-C -1 ; WX 780 ; N registered ; B 83 -17 783 698 ;
-C -1 ; WX 380 ; N icircumflex ; B 83 -8 433 749 ;
-C -1 ; WX 680 ; N udieresis ; B 83 -8 720 734 ;
-C -1 ; WX 600 ; N ograve ; B 59 -8 627 771 ;
-C -1 ; WX 680 ; N uacute ; B 83 -8 720 771 ;
-C -1 ; WX 680 ; N ucircumflex ; B 83 -8 720 749 ;
-C -1 ; WX 720 ; N Aacute ; B -27 0 769 937 ;
-C -1 ; WX 380 ; N igrave ; B 83 -8 424 771 ;
-C -1 ; WX 380 ; N Icircumflex ; B 14 0 493 915 ;
-C -1 ; WX 560 ; N ccedilla ; B 58 -220 597 515 ;
-C -1 ; WX 680 ; N adieresis ; B 84 -8 735 734 ;
-C -1 ; WX 720 ; N Ecircumflex ; B 14 0 777 915 ;
-C -1 ; WX 540 ; N scaron ; B 32 -8 573 749 ;
-C -1 ; WX 660 ; N thorn ; B -24 -213 682 732 ;
-C -1 ; WX 940 ; N trademark ; B 42 277 982 681 ;
-C -1 ; WX 560 ; N egrave ; B 59 -8 596 771 ;
-C -1 ; WX 408 ; N threesuperior ; B 86 269 483 698 ;
-C -1 ; WX 560 ; N zcaron ; B 36 -8 586 749 ;
-C -1 ; WX 680 ; N atilde ; B 84 -8 735 709 ;
-C -1 ; WX 680 ; N aring ; B 84 -8 735 775 ;
-C -1 ; WX 600 ; N ocircumflex ; B 59 -8 627 749 ;
-C -1 ; WX 720 ; N Edieresis ; B 14 0 777 900 ;
-C -1 ; WX 1020 ; N threequarters ; B 86 0 1054 691 ;
-C -1 ; WX 600 ; N ydieresis ; B 25 -213 642 734 ;
-C -1 ; WX 600 ; N yacute ; B 25 -213 642 771 ;
-C -1 ; WX 380 ; N iacute ; B 83 -8 420 771 ;
-C -1 ; WX 720 ; N Acircumflex ; B -27 0 769 915 ;
-C -1 ; WX 740 ; N Uacute ; B 112 -17 855 937 ;
-C -1 ; WX 560 ; N eacute ; B 59 -8 596 771 ;
-C -1 ; WX 760 ; N Ograve ; B 78 -17 806 937 ;
-C -1 ; WX 680 ; N agrave ; B 84 -8 735 771 ;
-C -1 ; WX 740 ; N Udieresis ; B 112 -17 855 900 ;
-C -1 ; WX 680 ; N acircumflex ; B 84 -8 735 749 ;
-C -1 ; WX 380 ; N Igrave ; B 14 0 485 937 ;
-C -1 ; WX 408 ; N twosuperior ; B 91 279 485 698 ;
-C -1 ; WX 740 ; N Ugrave ; B 112 -17 855 937 ;
-C -1 ; WX 1020 ; N onequarter ; B 118 0 1054 681 ;
-C -1 ; WX 740 ; N Ucircumflex ; B 112 -17 855 915 ;
-C -1 ; WX 700 ; N Scaron ; B 59 -17 731 915 ;
-C -1 ; WX 380 ; N Idieresis ; B 14 0 499 900 ;
-C -1 ; WX 380 ; N idieresis ; B 83 -8 479 734 ;
-C -1 ; WX 720 ; N Egrave ; B 14 0 777 937 ;
-C -1 ; WX 760 ; N Oacute ; B 78 -17 806 937 ;
-C -1 ; WX 600 ; N divide ; B 91 9 595 521 ;
-C -1 ; WX 720 ; N Atilde ; B -27 0 769 875 ;
-C -1 ; WX 720 ; N Aring ; B -27 0 769 941 ;
-C -1 ; WX 760 ; N Odieresis ; B 78 -17 806 900 ;
-C -1 ; WX 720 ; N Adieresis ; B -27 0 769 900 ;
-C -1 ; WX 740 ; N Ntilde ; B 14 0 845 875 ;
-C -1 ; WX 680 ; N Zcaron ; B 23 0 740 915 ;
-C -1 ; WX 640 ; N Thorn ; B -6 0 701 681 ;
-C -1 ; WX 380 ; N Iacute ; B 14 0 485 937 ;
-C -1 ; WX 600 ; N plusminus ; B 91 0 595 514 ;
-C -1 ; WX 600 ; N multiply ; B 91 10 595 514 ;
-C -1 ; WX 720 ; N Eacute ; B 14 0 777 937 ;
-C -1 ; WX 660 ; N Ydieresis ; B 72 0 817 900 ;
-C -1 ; WX 408 ; N onesuperior ; B 118 279 406 688 ;
-C -1 ; WX 680 ; N ugrave ; B 83 -8 720 771 ;
-C -1 ; WX 620 ; N logicalnot ; B 81 129 585 421 ;
-C -1 ; WX 680 ; N ntilde ; B 83 -8 715 709 ;
-C -1 ; WX 760 ; N Otilde ; B 78 -17 806 875 ;
-C -1 ; WX 600 ; N otilde ; B 59 -8 627 709 ;
-C -1 ; WX 700 ; N Ccedilla ; B 78 -220 754 698 ;
-C -1 ; WX 720 ; N Agrave ; B -27 0 769 937 ;
-C -1 ; WX 1020 ; N onehalf ; B 118 0 1036 681 ;
-C -1 ; WX 760 ; N Eth ; B 14 0 805 681 ;
-C -1 ; WX 400 ; N degree ; B 130 398 430 698 ;
-C -1 ; WX 660 ; N Yacute ; B 72 0 817 937 ;
-C -1 ; WX 760 ; N Ocircumflex ; B 78 -17 806 915 ;
-C -1 ; WX 600 ; N oacute ; B 59 -8 627 771 ;
-C -1 ; WX 680 ; N mu ; B 54 -213 720 507 ;
-C -1 ; WX 600 ; N minus ; B 91 207 595 323 ;
-C -1 ; WX 600 ; N eth ; B 59 -8 662 741 ;
-C -1 ; WX 600 ; N odieresis ; B 59 -8 627 734 ;
-C -1 ; WX 780 ; N copyright ; B 83 -17 783 698 ;
-C -1 ; WX 620 ; N brokenbar ; B 303 -175 422 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 92
-
-KPX A y 20
-KPX A w 20
-KPX A v 20
-KPX A Y -25
-KPX A W -35
-KPX A V -40
-KPX A T -17
-
-KPX F period -105
-KPX F comma -98
-KPX F A -35
-
-KPX L y 62
-KPX L Y -5
-KPX L W -15
-KPX L V -19
-KPX L T -26
-
-KPX P period -105
-KPX P comma -98
-KPX P A -31
-
-KPX R y 27
-KPX R Y 4
-KPX R W -4
-KPX R V -8
-KPX R T -3
-
-KPX T y 56
-KPX T w 69
-KPX T u 42
-KPX T semicolon 31
-KPX T s -1
-KPX T r 41
-KPX T period -107
-KPX T o -5
-KPX T i 42
-KPX T hyphen -20
-KPX T e -10
-KPX T comma -100
-KPX T colon 26
-KPX T c -8
-KPX T a -8
-KPX T A -42
-
-KPX V y 17
-KPX V u -1
-KPX V semicolon -22
-KPX V r 2
-KPX V period -115
-KPX V o -50
-KPX V i 32
-KPX V hyphen -20
-KPX V e -50
-KPX V comma -137
-KPX V colon -28
-KPX V a -50
-KPX V A -50
-
-KPX W y -51
-KPX W u -69
-KPX W semicolon -81
-KPX W r -66
-KPX W period -183
-KPX W o -100
-KPX W i -36
-KPX W hyphen -22
-KPX W e -100
-KPX W comma -201
-KPX W colon -86
-KPX W a -100
-KPX W A -77
-
-KPX Y v 26
-KPX Y u -1
-KPX Y semicolon -4
-KPX Y q -43
-KPX Y period -113
-KPX Y o -41
-KPX Y i 20
-KPX Y hyphen -20
-KPX Y e -46
-KPX Y comma -106
-KPX Y colon -9
-KPX Y a -45
-KPX Y A -30
-
-KPX f f 10
-
-KPX r q -3
-KPX r period -120
-KPX r o -1
-KPX r n 39
-KPX r m 39
-KPX r hyphen -20
-KPX r h -35
-KPX r g -23
-KPX r f 42
-KPX r e -6
-KPX r d -3
-KPX r comma -113
-KPX r c -5
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 190 166 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 120 166 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 100 166 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 170 166 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 200 166 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 166 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 190 166 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 120 166 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 100 166 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 170 166 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 20 166 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -30 166 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -70 166 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 166 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 166 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 210 166 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 140 166 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 140 166 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 190 166 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 140 166 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 110 166 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 200 166 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 130 166 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 130 166 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 180 166 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 160 166 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 70 166 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 100 166 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 170 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 100 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 150 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 160 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 100 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 60 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 20 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -90 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -90 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 130 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 60 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 40 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 60 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 30 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 170 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 100 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 80 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 150 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 130 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 40 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Bookman-Light.afm b/blt3.0/library/AFM/Bookman-Light.afm
deleted file mode 100644
index 75e019b..0000000
--- a/blt3.0/library/AFM/Bookman-Light.afm
+++ /dev/null
@@ -1,408 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Jan 21 16:15:53 1992
-Comment UniqueID 37833
-Comment VMusage 32321 39213
-FontName Bookman-Light
-FullName ITC Bookman Light
-FamilyName ITC Bookman
-Weight Light
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -188 -251 1266 908 
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 484
-Ascender 717
-Descender -228
-StartCharMetrics 228
-C 32 ; WX 320 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 300 ; N exclam ; B 75 -8 219 698 ;
-C 34 ; WX 380 ; N quotedbl ; B 56 458 323 698 ;
-C 35 ; WX 620 ; N numbersign ; B 65 0 556 681 ;
-C 36 ; WX 620 ; N dollar ; B 34 -109 593 791 ;
-C 37 ; WX 900 ; N percent ; B 22 -8 873 698 ;
-C 38 ; WX 800 ; N ampersand ; B 45 -17 787 698 ;
-C 39 ; WX 220 ; N quoteright ; B 46 480 178 698 ;
-C 40 ; WX 300 ; N parenleft ; B 76 -145 278 727 ;
-C 41 ; WX 300 ; N parenright ; B 17 -146 219 727 ;
-C 42 ; WX 440 ; N asterisk ; B 54 325 391 698 ;
-C 43 ; WX 600 ; N plus ; B 51 8 555 513 ;
-C 44 ; WX 320 ; N comma ; B 90 -114 223 114 ;
-C 45 ; WX 400 ; N hyphen ; B 50 232 350 292 ;
-C 46 ; WX 320 ; N period ; B 92 -8 220 123 ;
-C 47 ; WX 600 ; N slash ; B 74 -149 532 717 ;
-C 48 ; WX 620 ; N zero ; B 40 -17 586 698 ;
-C 49 ; WX 620 ; N one ; B 160 0 501 681 ;
-C 50 ; WX 620 ; N two ; B 42 0 576 698 ;
-C 51 ; WX 620 ; N three ; B 40 -17 576 698 ;
-C 52 ; WX 620 ; N four ; B 25 0 600 681 ;
-C 53 ; WX 620 ; N five ; B 60 -17 584 717 ;
-C 54 ; WX 620 ; N six ; B 45 -17 590 698 ;
-C 55 ; WX 620 ; N seven ; B 60 0 586 681 ;
-C 56 ; WX 620 ; N eight ; B 44 -17 583 698 ;
-C 57 ; WX 620 ; N nine ; B 37 -17 576 698 ;
-C 58 ; WX 320 ; N colon ; B 92 -8 220 494 ;
-C 59 ; WX 320 ; N semicolon ; B 90 -114 223 494 ;
-C 60 ; WX 600 ; N less ; B 49 -2 558 526 ;
-C 61 ; WX 600 ; N equal ; B 51 126 555 398 ;
-C 62 ; WX 600 ; N greater ; B 48 -2 557 526 ;
-C 63 ; WX 540 ; N question ; B 27 -8 514 698 ;
-C 64 ; WX 820 ; N at ; B 55 -17 755 698 ;
-C 65 ; WX 680 ; N A ; B -37 0 714 681 ;
-C 66 ; WX 740 ; N B ; B 31 0 702 681 ;
-C 67 ; WX 740 ; N C ; B 44 -17 702 698 ;
-C 68 ; WX 800 ; N D ; B 31 0 752 681 ;
-C 69 ; WX 720 ; N E ; B 31 0 705 681 ;
-C 70 ; WX 640 ; N F ; B 31 0 654 681 ;
-C 71 ; WX 800 ; N G ; B 44 -17 778 698 ;
-C 72 ; WX 800 ; N H ; B 31 0 769 681 ;
-C 73 ; WX 340 ; N I ; B 31 0 301 681 ;
-C 74 ; WX 600 ; N J ; B -23 -17 567 681 ;
-C 75 ; WX 720 ; N K ; B 31 0 750 681 ;
-C 76 ; WX 600 ; N L ; B 31 0 629 681 ;
-C 77 ; WX 920 ; N M ; B 26 0 894 681 ;
-C 78 ; WX 740 ; N N ; B 26 0 722 681 ;
-C 79 ; WX 800 ; N O ; B 44 -17 758 698 ;
-C 80 ; WX 620 ; N P ; B 31 0 613 681 ;
-C 81 ; WX 820 ; N Q ; B 44 -189 769 698 ;
-C 82 ; WX 720 ; N R ; B 31 0 757 681 ;
-C 83 ; WX 660 ; N S ; B 28 -17 634 698 ;
-C 84 ; WX 620 ; N T ; B -37 0 656 681 ;
-C 85 ; WX 780 ; N U ; B 25 -17 754 681 ;
-C 86 ; WX 700 ; N V ; B -30 0 725 681 ;
-C 87 ; WX 960 ; N W ; B -30 0 984 681 ;
-C 88 ; WX 720 ; N X ; B -30 0 755 681 ;
-C 89 ; WX 640 ; N Y ; B -30 0 666 681 ;
-C 90 ; WX 640 ; N Z ; B 10 0 656 681 ;
-C 91 ; WX 300 ; N bracketleft ; B 92 -136 258 717 ;
-C 92 ; WX 600 ; N backslash ; B 74 0 532 717 ;
-C 93 ; WX 300 ; N bracketright ; B 41 -136 207 717 ;
-C 94 ; WX 600 ; N asciicircum ; B 52 276 554 681 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 220 ; N quoteleft ; B 46 479 178 698 ;
-C 97 ; WX 580 ; N a ; B 35 -8 587 494 ;
-C 98 ; WX 620 ; N b ; B -2 -8 582 717 ;
-C 99 ; WX 520 ; N c ; B 37 -8 498 494 ;
-C 100 ; WX 620 ; N d ; B 37 -8 591 717 ;
-C 101 ; WX 520 ; N e ; B 37 -8 491 494 ;
-C 102 ; WX 320 ; N f ; B 20 0 414 734 ; L i fi ; L l fl ;
-C 103 ; WX 540 ; N g ; B 17 -243 542 567 ;
-C 104 ; WX 660 ; N h ; B 20 0 643 717 ;
-C 105 ; WX 300 ; N i ; B 20 0 288 654 ;
-C 106 ; WX 300 ; N j ; B -109 -251 214 654 ;
-C 107 ; WX 620 ; N k ; B 20 0 628 717 ;
-C 108 ; WX 300 ; N l ; B 20 0 286 717 ;
-C 109 ; WX 940 ; N m ; B 17 0 928 494 ;
-C 110 ; WX 660 ; N n ; B 20 0 649 494 ;
-C 111 ; WX 560 ; N o ; B 37 -8 526 494 ;
-C 112 ; WX 620 ; N p ; B 20 -228 583 494 ;
-C 113 ; WX 580 ; N q ; B 37 -228 589 494 ;
-C 114 ; WX 440 ; N r ; B 20 0 447 494 ;
-C 115 ; WX 520 ; N s ; B 40 -8 487 494 ;
-C 116 ; WX 380 ; N t ; B 20 -8 388 667 ;
-C 117 ; WX 680 ; N u ; B 20 -8 653 484 ;
-C 118 ; WX 520 ; N v ; B -23 0 534 484 ;
-C 119 ; WX 780 ; N w ; B -19 0 804 484 ;
-C 120 ; WX 560 ; N x ; B -16 0 576 484 ;
-C 121 ; WX 540 ; N y ; B -23 -236 549 484 ;
-C 122 ; WX 480 ; N z ; B 7 0 476 484 ;
-C 123 ; WX 280 ; N braceleft ; B 21 -136 260 717 ;
-C 124 ; WX 600 ; N bar ; B 264 -250 342 750 ;
-C 125 ; WX 280 ; N braceright ; B 21 -136 260 717 ;
-C 126 ; WX 600 ; N asciitilde ; B 52 173 556 352 ;
-C 161 ; WX 300 ; N exclamdown ; B 75 -214 219 494 ;
-C 162 ; WX 620 ; N cent ; B 116 20 511 651 ;
-C 163 ; WX 620 ; N sterling ; B 8 -17 631 698 ;
-C 164 ; WX 140 ; N fraction ; B -188 0 335 681 ;
-C 165 ; WX 620 ; N yen ; B -22 0 647 681 ;
-C 166 ; WX 620 ; N florin ; B -29 -155 633 749 ;
-C 167 ; WX 520 ; N section ; B 33 -178 486 698 ;
-C 168 ; WX 620 ; N currency ; B 58 89 563 591 ;
-C 169 ; WX 220 ; N quotesingle ; B 67 458 153 698 ;
-C 170 ; WX 400 ; N quotedblleft ; B 46 479 348 698 ;
-C 171 ; WX 360 ; N guillemotleft ; B 51 89 312 437 ;
-C 172 ; WX 240 ; N guilsinglleft ; B 51 89 189 437 ;
-C 173 ; WX 240 ; N guilsinglright ; B 51 89 189 437 ;
-C 174 ; WX 620 ; N fi ; B 20 0 608 734 ;
-C 175 ; WX 620 ; N fl ; B 20 0 606 734 ;
-C 177 ; WX 500 ; N endash ; B -15 232 515 292 ;
-C 178 ; WX 540 ; N dagger ; B 79 -156 455 698 ;
-C 179 ; WX 540 ; N daggerdbl ; B 79 -156 455 698 ;
-C 180 ; WX 320 ; N periodcentered ; B 92 196 220 327 ;
-C 182 ; WX 600 ; N paragraph ; B 14 0 577 681 ;
-C 183 ; WX 460 ; N bullet ; B 60 170 404 511 ;
-C 184 ; WX 220 ; N quotesinglbase ; B 46 -108 178 110 ;
-C 185 ; WX 400 ; N quotedblbase ; B 46 -108 348 110 ;
-C 186 ; WX 400 ; N quotedblright ; B 46 480 348 698 ;
-C 187 ; WX 360 ; N guillemotright ; B 51 89 312 437 ;
-C 188 ; WX 1000 ; N ellipsis ; B 101 -8 898 123 ;
-C 189 ; WX 1280 ; N perthousand ; B 22 -8 1266 698 ;
-C 191 ; WX 540 ; N questiondown ; B 23 -217 510 494 ;
-C 193 ; WX 340 ; N grave ; B 68 571 274 689 ;
-C 194 ; WX 340 ; N acute ; B 68 571 274 689 ;
-C 195 ; WX 420 ; N circumflex ; B 68 567 352 685 ;
-C 196 ; WX 440 ; N tilde ; B 68 572 375 661 ;
-C 197 ; WX 440 ; N macron ; B 68 587 364 635 ;
-C 198 ; WX 460 ; N breve ; B 68 568 396 687 ;
-C 199 ; WX 260 ; N dotaccent ; B 68 552 186 672 ;
-C 200 ; WX 420 ; N dieresis ; B 68 552 349 674 ;
-C 202 ; WX 320 ; N ring ; B 68 546 252 731 ;
-C 203 ; WX 320 ; N cedilla ; B 68 -200 257 0 ;
-C 205 ; WX 380 ; N hungarumlaut ; B 68 538 311 698 ;
-C 206 ; WX 320 ; N ogonek ; B 68 -145 245 0 ;
-C 207 ; WX 420 ; N caron ; B 68 554 352 672 ;
-C 208 ; WX 1000 ; N emdash ; B -15 232 1015 292 ;
-C 225 ; WX 1260 ; N AE ; B -36 0 1250 681 ;
-C 227 ; WX 420 ; N ordfeminine ; B 49 395 393 698 ;
-C 232 ; WX 600 ; N Lslash ; B 31 0 629 681 ;
-C 233 ; WX 800 ; N Oslash ; B 44 -53 758 733 ;
-C 234 ; WX 1240 ; N OE ; B 44 -17 1214 698 ;
-C 235 ; WX 420 ; N ordmasculine ; B 56 394 361 698 ;
-C 241 ; WX 860 ; N ae ; B 35 -8 832 494 ;
-C 245 ; WX 300 ; N dotlessi ; B 20 0 288 484 ;
-C 248 ; WX 320 ; N lslash ; B 20 0 291 717 ;
-C 249 ; WX 560 ; N oslash ; B 37 -40 526 534 ;
-C 250 ; WX 900 ; N oe ; B 37 -8 876 494 ;
-C 251 ; WX 660 ; N germandbls ; B -109 -110 614 698 ;
-C -1 ; WX 520 ; N ecircumflex ; B 37 -8 491 685 ;
-C -1 ; WX 520 ; N edieresis ; B 37 -8 491 674 ;
-C -1 ; WX 580 ; N aacute ; B 35 -8 587 689 ;
-C -1 ; WX 740 ; N registered ; B 23 -17 723 698 ;
-C -1 ; WX 300 ; N icircumflex ; B 8 0 292 685 ;
-C -1 ; WX 680 ; N udieresis ; B 20 -8 653 674 ;
-C -1 ; WX 560 ; N ograve ; B 37 -8 526 689 ;
-C -1 ; WX 680 ; N uacute ; B 20 -8 653 689 ;
-C -1 ; WX 680 ; N ucircumflex ; B 20 -8 653 685 ;
-C -1 ; WX 680 ; N Aacute ; B -37 0 714 866 ;
-C -1 ; WX 300 ; N igrave ; B 20 0 288 689 ;
-C -1 ; WX 340 ; N Icircumflex ; B 28 0 312 862 ;
-C -1 ; WX 520 ; N ccedilla ; B 37 -200 498 494 ;
-C -1 ; WX 580 ; N adieresis ; B 35 -8 587 674 ;
-C -1 ; WX 720 ; N Ecircumflex ; B 31 0 705 862 ;
-C -1 ; WX 520 ; N scaron ; B 40 -8 487 672 ;
-C -1 ; WX 620 ; N thorn ; B 20 -228 583 717 ;
-C -1 ; WX 980 ; N trademark ; B 34 277 930 681 ;
-C -1 ; WX 520 ; N egrave ; B 37 -8 491 689 ;
-C -1 ; WX 372 ; N threesuperior ; B 12 269 360 698 ;
-C -1 ; WX 480 ; N zcaron ; B 7 0 476 672 ;
-C -1 ; WX 580 ; N atilde ; B 35 -8 587 661 ;
-C -1 ; WX 580 ; N aring ; B 35 -8 587 731 ;
-C -1 ; WX 560 ; N ocircumflex ; B 37 -8 526 685 ;
-C -1 ; WX 720 ; N Edieresis ; B 31 0 705 851 ;
-C -1 ; WX 930 ; N threequarters ; B 52 0 889 691 ;
-C -1 ; WX 540 ; N ydieresis ; B -23 -236 549 674 ;
-C -1 ; WX 540 ; N yacute ; B -23 -236 549 689 ;
-C -1 ; WX 300 ; N iacute ; B 20 0 288 689 ;
-C -1 ; WX 680 ; N Acircumflex ; B -37 0 714 862 ;
-C -1 ; WX 780 ; N Uacute ; B 25 -17 754 866 ;
-C -1 ; WX 520 ; N eacute ; B 37 -8 491 689 ;
-C -1 ; WX 800 ; N Ograve ; B 44 -17 758 866 ;
-C -1 ; WX 580 ; N agrave ; B 35 -8 587 689 ;
-C -1 ; WX 780 ; N Udieresis ; B 25 -17 754 851 ;
-C -1 ; WX 580 ; N acircumflex ; B 35 -8 587 685 ;
-C -1 ; WX 340 ; N Igrave ; B 31 0 301 866 ;
-C -1 ; WX 372 ; N twosuperior ; B 20 279 367 698 ;
-C -1 ; WX 780 ; N Ugrave ; B 25 -17 754 866 ;
-C -1 ; WX 930 ; N onequarter ; B 80 0 869 681 ;
-C -1 ; WX 780 ; N Ucircumflex ; B 25 -17 754 862 ;
-C -1 ; WX 660 ; N Scaron ; B 28 -17 634 849 ;
-C -1 ; WX 340 ; N Idieresis ; B 28 0 309 851 ;
-C -1 ; WX 300 ; N idieresis ; B 8 0 289 674 ;
-C -1 ; WX 720 ; N Egrave ; B 31 0 705 866 ;
-C -1 ; WX 800 ; N Oacute ; B 44 -17 758 866 ;
-C -1 ; WX 600 ; N divide ; B 51 10 555 514 ;
-C -1 ; WX 680 ; N Atilde ; B -37 0 714 838 ;
-C -1 ; WX 680 ; N Aring ; B -37 0 714 908 ;
-C -1 ; WX 800 ; N Odieresis ; B 44 -17 758 851 ;
-C -1 ; WX 680 ; N Adieresis ; B -37 0 714 851 ;
-C -1 ; WX 740 ; N Ntilde ; B 26 0 722 838 ;
-C -1 ; WX 640 ; N Zcaron ; B 10 0 656 849 ;
-C -1 ; WX 620 ; N Thorn ; B 31 0 613 681 ;
-C -1 ; WX 340 ; N Iacute ; B 31 0 301 866 ;
-C -1 ; WX 600 ; N plusminus ; B 51 0 555 513 ;
-C -1 ; WX 600 ; N multiply ; B 51 9 555 513 ;
-C -1 ; WX 720 ; N Eacute ; B 31 0 705 866 ;
-C -1 ; WX 640 ; N Ydieresis ; B -30 0 666 851 ;
-C -1 ; WX 372 ; N onesuperior ; B 80 279 302 688 ;
-C -1 ; WX 680 ; N ugrave ; B 20 -8 653 689 ;
-C -1 ; WX 600 ; N logicalnot ; B 51 128 555 398 ;
-C -1 ; WX 660 ; N ntilde ; B 20 0 649 661 ;
-C -1 ; WX 800 ; N Otilde ; B 44 -17 758 838 ;
-C -1 ; WX 560 ; N otilde ; B 37 -8 526 661 ;
-C -1 ; WX 740 ; N Ccedilla ; B 44 -200 702 698 ;
-C -1 ; WX 680 ; N Agrave ; B -37 0 714 866 ;
-C -1 ; WX 930 ; N onehalf ; B 80 0 885 681 ;
-C -1 ; WX 800 ; N Eth ; B 31 0 752 681 ;
-C -1 ; WX 400 ; N degree ; B 50 398 350 698 ;
-C -1 ; WX 640 ; N Yacute ; B -30 0 666 866 ;
-C -1 ; WX 800 ; N Ocircumflex ; B 44 -17 758 862 ;
-C -1 ; WX 560 ; N oacute ; B 37 -8 526 689 ;
-C -1 ; WX 680 ; N mu ; B 20 -251 653 484 ;
-C -1 ; WX 600 ; N minus ; B 51 224 555 300 ;
-C -1 ; WX 560 ; N eth ; B 37 -8 526 734 ;
-C -1 ; WX 560 ; N odieresis ; B 37 -8 526 674 ;
-C -1 ; WX 740 ; N copyright ; B 24 -17 724 698 ;
-C -1 ; WX 600 ; N brokenbar ; B 264 -175 342 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 82
-
-KPX A y 32
-KPX A w 4
-KPX A v 7
-KPX A Y -35
-KPX A W -40
-KPX A V -56
-KPX A T 1
-
-KPX F period -46
-KPX F comma -41
-KPX F A -21
-
-KPX L y 79
-KPX L Y 13
-KPX L W 1
-KPX L V -4
-KPX L T 28
-
-KPX P period -60
-KPX P comma -55
-KPX P A -8
-
-KPX R y 59
-KPX R Y 26
-KPX R W 13
-KPX R V 8
-KPX R T 71
-
-KPX T s 16
-KPX T r 38
-KPX T period -33
-KPX T o 15
-KPX T i 42
-KPX T hyphen 90
-KPX T e 13
-KPX T comma -28
-KPX T c 14
-KPX T a 17
-KPX T A 1
-
-KPX V y 15
-KPX V u -38
-KPX V r -41
-KPX V period -40
-KPX V o -71
-KPX V i -20
-KPX V hyphen 11
-KPX V e -72
-KPX V comma -34
-KPX V a -69
-KPX V A -66
-
-KPX W y 15
-KPX W u -38
-KPX W r -41
-KPX W period -40
-KPX W o -68
-KPX W i -20
-KPX W hyphen 11
-KPX W e -69
-KPX W comma -34
-KPX W a -66
-KPX W A -64
-
-KPX Y v 15
-KPX Y u -38
-KPX Y q -55
-KPX Y period -40
-KPX Y p -31
-KPX Y o -57
-KPX Y i -37
-KPX Y hyphen 11
-KPX Y e -58
-KPX Y comma -34
-KPX Y a -54
-KPX Y A -53
-
-KPX f f 29
-
-KPX r q 9
-KPX r period -64
-KPX r o 8
-KPX r n 31
-KPX r m 31
-KPX r hyphen 70
-KPX r h -21
-KPX r g -4
-KPX r f 33
-KPX r e 7
-KPX r d 7
-KPX r comma -58
-KPX r c 7
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 200 177 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 130 177 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 130 177 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 140 177 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 180 177 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 177 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 220 177 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 150 177 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 150 177 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 177 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 20 177 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -40 177 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -40 177 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -20 177 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 150 177 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 260 177 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 190 177 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 190 177 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 177 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 180 177 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 120 177 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 250 177 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 180 177 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 180 177 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 190 177 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 150 177 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 110 177 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 110 177 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 80 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 130 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 70 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 50 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -20 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -60 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -60 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -20 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 110 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 70 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 60 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 50 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 170 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 130 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 130 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 170 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 100 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 60 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 30 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Bookman-LightItalic.afm b/blt3.0/library/AFM/Bookman-LightItalic.afm
deleted file mode 100644
index 3e6ef4c..0000000
--- a/blt3.0/library/AFM/Bookman-LightItalic.afm
+++ /dev/null
@@ -1,411 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Jan 21 16:12:06 1992
-Comment UniqueID 37830
-Comment VMusage 33139 40031
-FontName Bookman-LightItalic
-FullName ITC Bookman Light Italic
-FamilyName ITC Bookman
-Weight Light
-ItalicAngle -10
-IsFixedPitch false
-FontBBox -228 -250 1269 883 
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated.  All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 494
-Ascender 717
-Descender -212
-StartCharMetrics 228
-C 32 ; WX 300 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 320 ; N exclam ; B 103 -8 342 698 ;
-C 34 ; WX 360 ; N quotedbl ; B 107 468 402 698 ;
-C 35 ; WX 620 ; N numbersign ; B 107 0 598 681 ;
-C 36 ; WX 620 ; N dollar ; B 78 -85 619 762 ;
-C 37 ; WX 800 ; N percent ; B 56 -8 811 691 ;
-C 38 ; WX 820 ; N ampersand ; B 65 -18 848 698 ;
-C 39 ; WX 280 ; N quoteright ; B 148 470 288 698 ;
-C 40 ; WX 280 ; N parenleft ; B 96 -146 383 727 ;
-C 41 ; WX 280 ; N parenright ; B -8 -146 279 727 ;
-C 42 ; WX 440 ; N asterisk ; B 139 324 505 698 ;
-C 43 ; WX 600 ; N plus ; B 91 43 595 548 ;
-C 44 ; WX 300 ; N comma ; B 88 -115 227 112 ;
-C 45 ; WX 320 ; N hyphen ; B 78 269 336 325 ;
-C 46 ; WX 300 ; N period ; B 96 -8 231 127 ;
-C 47 ; WX 600 ; N slash ; B 104 -149 562 717 ;
-C 48 ; WX 620 ; N zero ; B 86 -17 646 698 ;
-C 49 ; WX 620 ; N one ; B 154 0 500 681 ;
-C 50 ; WX 620 ; N two ; B 66 0 636 698 ;
-C 51 ; WX 620 ; N three ; B 55 -17 622 698 ;
-C 52 ; WX 620 ; N four ; B 69 0 634 681 ;
-C 53 ; WX 620 ; N five ; B 70 -17 614 681 ;
-C 54 ; WX 620 ; N six ; B 89 -17 657 698 ;
-C 55 ; WX 620 ; N seven ; B 143 0 672 681 ;
-C 56 ; WX 620 ; N eight ; B 61 -17 655 698 ;
-C 57 ; WX 620 ; N nine ; B 77 -17 649 698 ;
-C 58 ; WX 300 ; N colon ; B 96 -8 292 494 ;
-C 59 ; WX 300 ; N semicolon ; B 88 -114 292 494 ;
-C 60 ; WX 600 ; N less ; B 79 33 588 561 ;
-C 61 ; WX 600 ; N equal ; B 91 161 595 433 ;
-C 62 ; WX 600 ; N greater ; B 93 33 602 561 ;
-C 63 ; WX 540 ; N question ; B 114 -8 604 698 ;
-C 64 ; WX 780 ; N at ; B 102 -17 802 698 ;
-C 65 ; WX 700 ; N A ; B -25 0 720 681 ;
-C 66 ; WX 720 ; N B ; B 21 0 746 681 ;
-C 67 ; WX 720 ; N C ; B 88 -17 746 698 ;
-C 68 ; WX 740 ; N D ; B 21 0 782 681 ;
-C 69 ; WX 680 ; N E ; B 21 0 736 681 ;
-C 70 ; WX 620 ; N F ; B 21 0 743 681 ;
-C 71 ; WX 760 ; N G ; B 88 -17 813 698 ;
-C 72 ; WX 800 ; N H ; B 21 0 888 681 ;
-C 73 ; WX 320 ; N I ; B 21 0 412 681 ;
-C 74 ; WX 560 ; N J ; B -2 -17 666 681 ;
-C 75 ; WX 720 ; N K ; B 21 0 804 681 ;
-C 76 ; WX 580 ; N L ; B 21 0 656 681 ;
-C 77 ; WX 860 ; N M ; B 18 0 956 681 ;
-C 78 ; WX 720 ; N N ; B 18 0 823 681 ;
-C 79 ; WX 760 ; N O ; B 88 -17 799 698 ;
-C 80 ; WX 600 ; N P ; B 21 0 681 681 ;
-C 81 ; WX 780 ; N Q ; B 61 -191 812 698 ;
-C 82 ; WX 700 ; N R ; B 21 0 736 681 ;
-C 83 ; WX 640 ; N S ; B 61 -17 668 698 ;
-C 84 ; WX 600 ; N T ; B 50 0 725 681 ;
-C 85 ; WX 720 ; N U ; B 118 -17 842 681 ;
-C 86 ; WX 680 ; N V ; B 87 0 815 681 ;
-C 87 ; WX 960 ; N W ; B 87 0 1095 681 ;
-C 88 ; WX 700 ; N X ; B -25 0 815 681 ;
-C 89 ; WX 660 ; N Y ; B 87 0 809 681 ;
-C 90 ; WX 580 ; N Z ; B 8 0 695 681 ;
-C 91 ; WX 260 ; N bracketleft ; B 56 -136 351 717 ;
-C 92 ; WX 600 ; N backslash ; B 84 0 542 717 ;
-C 93 ; WX 260 ; N bracketright ; B 15 -136 309 717 ;
-C 94 ; WX 600 ; N asciicircum ; B 97 276 599 681 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 280 ; N quoteleft ; B 191 470 330 698 ;
-C 97 ; WX 620 ; N a ; B 71 -8 686 494 ;
-C 98 ; WX 600 ; N b ; B 88 -8 621 717 ;
-C 99 ; WX 480 ; N c ; B 65 -8 522 494 ;
-C 100 ; WX 640 ; N d ; B 65 -8 695 717 ;
-C 101 ; WX 540 ; N e ; B 65 -8 575 494 ;
-C 102 ; WX 340 ; N f ; B -160 -218 557 725 ; L i fi ; L l fl ;
-C 103 ; WX 560 ; N g ; B 4 -221 581 494 ;
-C 104 ; WX 620 ; N h ; B 88 -8 689 717 ;
-C 105 ; WX 280 ; N i ; B 88 -8 351 663 ;
-C 106 ; WX 280 ; N j ; B -200 -221 308 663 ;
-C 107 ; WX 600 ; N k ; B 88 -8 657 717 ;
-C 108 ; WX 280 ; N l ; B 100 -8 342 717 ;
-C 109 ; WX 880 ; N m ; B 88 -8 952 494 ;
-C 110 ; WX 620 ; N n ; B 88 -8 673 494 ;
-C 111 ; WX 540 ; N o ; B 65 -8 572 494 ;
-C 112 ; WX 600 ; N p ; B -24 -212 620 494 ;
-C 113 ; WX 560 ; N q ; B 65 -212 584 494 ;
-C 114 ; WX 400 ; N r ; B 88 0 481 494 ;
-C 115 ; WX 540 ; N s ; B 65 -8 547 494 ;
-C 116 ; WX 340 ; N t ; B 88 -8 411 664 ;
-C 117 ; WX 620 ; N u ; B 88 -8 686 484 ;
-C 118 ; WX 540 ; N v ; B 88 -8 562 494 ;
-C 119 ; WX 880 ; N w ; B 88 -8 893 494 ;
-C 120 ; WX 540 ; N x ; B 9 -8 626 494 ;
-C 121 ; WX 600 ; N y ; B 60 -221 609 484 ;
-C 122 ; WX 520 ; N z ; B 38 -8 561 494 ;
-C 123 ; WX 360 ; N braceleft ; B 122 -191 442 717 ;
-C 124 ; WX 600 ; N bar ; B 294 -250 372 750 ;
-C 125 ; WX 380 ; N braceright ; B 13 -191 333 717 ;
-C 126 ; WX 600 ; N asciitilde ; B 91 207 595 386 ;
-C 161 ; WX 320 ; N exclamdown ; B 73 -213 301 494 ;
-C 162 ; WX 620 ; N cent ; B 148 -29 596 715 ;
-C 163 ; WX 620 ; N sterling ; B 4 -17 702 698 ;
-C 164 ; WX 20 ; N fraction ; B -228 0 323 681 ;
-C 165 ; WX 620 ; N yen ; B 71 0 735 681 ;
-C 166 ; WX 620 ; N florin ; B -26 -218 692 725 ;
-C 167 ; WX 620 ; N section ; B 38 -178 638 698 ;
-C 168 ; WX 620 ; N currency ; B 100 89 605 591 ;
-C 169 ; WX 200 ; N quotesingle ; B 99 473 247 698 ;
-C 170 ; WX 440 ; N quotedblleft ; B 191 470 493 698 ;
-C 171 ; WX 300 ; N guillemotleft ; B 70 129 313 434 ;
-C 172 ; WX 180 ; N guilsinglleft ; B 75 129 208 434 ;
-C 173 ; WX 180 ; N guilsinglright ; B 70 129 203 434 ;
-C 174 ; WX 640 ; N fi ; B -159 -222 709 725 ;
-C 175 ; WX 660 ; N fl ; B -159 -218 713 725 ;
-C 177 ; WX 500 ; N endash ; B 33 269 561 325 ;
-C 178 ; WX 620 ; N dagger ; B 192 -130 570 698 ;
-C 179 ; WX 620 ; N daggerdbl ; B 144 -122 566 698 ;
-C 180 ; WX 300 ; N periodcentered ; B 137 229 272 364 ;
-C 182 ; WX 620 ; N paragraph ; B 112 0 718 681 ;
-C 183 ; WX 460 ; N bullet ; B 100 170 444 511 ;
-C 184 ; WX 320 ; N quotesinglbase ; B 87 -114 226 113 ;
-C 185 ; WX 480 ; N quotedblbase ; B 87 -114 390 113 ;
-C 186 ; WX 440 ; N quotedblright ; B 148 470 451 698 ;
-C 187 ; WX 300 ; N guillemotright ; B 60 129 303 434 ;
-C 188 ; WX 1000 ; N ellipsis ; B 99 -8 900 127 ;
-C 189 ; WX 1180 ; N perthousand ; B 56 -8 1199 691 ;
-C 191 ; WX 540 ; N questiondown ; B 18 -212 508 494 ;
-C 193 ; WX 340 ; N grave ; B 182 551 377 706 ;
-C 194 ; WX 320 ; N acute ; B 178 551 373 706 ;
-C 195 ; WX 440 ; N circumflex ; B 176 571 479 685 ;
-C 196 ; WX 440 ; N tilde ; B 180 586 488 671 ;
-C 197 ; WX 440 ; N macron ; B 178 599 484 658 ;
-C 198 ; WX 440 ; N breve ; B 191 577 500 680 ;
-C 199 ; WX 260 ; N dotaccent ; B 169 543 290 664 ;
-C 200 ; WX 420 ; N dieresis ; B 185 569 467 688 ;
-C 202 ; WX 300 ; N ring ; B 178 551 334 706 ;
-C 203 ; WX 320 ; N cedilla ; B 45 -178 240 0 ;
-C 205 ; WX 340 ; N hungarumlaut ; B 167 547 402 738 ;
-C 206 ; WX 260 ; N ogonek ; B 51 -173 184 0 ;
-C 207 ; WX 440 ; N caron ; B 178 571 481 684 ;
-C 208 ; WX 1000 ; N emdash ; B 33 269 1061 325 ;
-C 225 ; WX 1220 ; N AE ; B -45 0 1269 681 ;
-C 227 ; WX 440 ; N ordfeminine ; B 130 396 513 698 ;
-C 232 ; WX 580 ; N Lslash ; B 21 0 656 681 ;
-C 233 ; WX 760 ; N Oslash ; B 88 -95 799 777 ;
-C 234 ; WX 1180 ; N OE ; B 88 -17 1237 698 ;
-C 235 ; WX 400 ; N ordmasculine ; B 139 396 455 698 ;
-C 241 ; WX 880 ; N ae ; B 71 -8 918 494 ;
-C 245 ; WX 280 ; N dotlessi ; B 88 -8 351 484 ;
-C 248 ; WX 340 ; N lslash ; B 50 -8 398 717 ;
-C 249 ; WX 540 ; N oslash ; B 65 -49 571 532 ;
-C 250 ; WX 900 ; N oe ; B 65 -8 948 494 ;
-C 251 ; WX 620 ; N germandbls ; B -121 -111 653 698 ;
-C -1 ; WX 540 ; N ecircumflex ; B 65 -8 575 685 ;
-C -1 ; WX 540 ; N edieresis ; B 65 -8 575 688 ;
-C -1 ; WX 620 ; N aacute ; B 71 -8 686 706 ;
-C -1 ; WX 740 ; N registered ; B 84 -17 784 698 ;
-C -1 ; WX 280 ; N icircumflex ; B 76 -8 379 685 ;
-C -1 ; WX 620 ; N udieresis ; B 88 -8 686 688 ;
-C -1 ; WX 540 ; N ograve ; B 65 -8 572 706 ;
-C -1 ; WX 620 ; N uacute ; B 88 -8 686 706 ;
-C -1 ; WX 620 ; N ucircumflex ; B 88 -8 686 685 ;
-C -1 ; WX 700 ; N Aacute ; B -25 0 720 883 ;
-C -1 ; WX 280 ; N igrave ; B 88 -8 351 706 ;
-C -1 ; WX 320 ; N Icircumflex ; B 21 0 449 862 ;
-C -1 ; WX 480 ; N ccedilla ; B 65 -178 522 494 ;
-C -1 ; WX 620 ; N adieresis ; B 71 -8 686 688 ;
-C -1 ; WX 680 ; N Ecircumflex ; B 21 0 736 862 ;
-C -1 ; WX 540 ; N scaron ; B 65 -8 547 684 ;
-C -1 ; WX 600 ; N thorn ; B -24 -212 620 717 ;
-C -1 ; WX 980 ; N trademark ; B 69 277 965 681 ;
-C -1 ; WX 540 ; N egrave ; B 65 -8 575 706 ;
-C -1 ; WX 372 ; N threesuperior ; B 70 269 439 698 ;
-C -1 ; WX 520 ; N zcaron ; B 38 -8 561 684 ;
-C -1 ; WX 620 ; N atilde ; B 71 -8 686 671 ;
-C -1 ; WX 620 ; N aring ; B 71 -8 686 706 ;
-C -1 ; WX 540 ; N ocircumflex ; B 65 -8 572 685 ;
-C -1 ; WX 680 ; N Edieresis ; B 21 0 736 865 ;
-C -1 ; WX 930 ; N threequarters ; B 99 0 913 691 ;
-C -1 ; WX 600 ; N ydieresis ; B 60 -221 609 688 ;
-C -1 ; WX 600 ; N yacute ; B 60 -221 609 706 ;
-C -1 ; WX 280 ; N iacute ; B 88 -8 351 706 ;
-C -1 ; WX 700 ; N Acircumflex ; B -25 0 720 862 ;
-C -1 ; WX 720 ; N Uacute ; B 118 -17 842 883 ;
-C -1 ; WX 540 ; N eacute ; B 65 -8 575 706 ;
-C -1 ; WX 760 ; N Ograve ; B 88 -17 799 883 ;
-C -1 ; WX 620 ; N agrave ; B 71 -8 686 706 ;
-C -1 ; WX 720 ; N Udieresis ; B 118 -17 842 865 ;
-C -1 ; WX 620 ; N acircumflex ; B 71 -8 686 685 ;
-C -1 ; WX 320 ; N Igrave ; B 21 0 412 883 ;
-C -1 ; WX 372 ; N twosuperior ; B 68 279 439 698 ;
-C -1 ; WX 720 ; N Ugrave ; B 118 -17 842 883 ;
-C -1 ; WX 930 ; N onequarter ; B 91 0 913 681 ;
-C -1 ; WX 720 ; N Ucircumflex ; B 118 -17 842 862 ;
-C -1 ; WX 640 ; N Scaron ; B 61 -17 668 861 ;
-C -1 ; WX 320 ; N Idieresis ; B 21 0 447 865 ;
-C -1 ; WX 280 ; N idieresis ; B 88 -8 377 688 ;
-C -1 ; WX 680 ; N Egrave ; B 21 0 736 883 ;
-C -1 ; WX 760 ; N Oacute ; B 88 -17 799 883 ;
-C -1 ; WX 600 ; N divide ; B 91 46 595 548 ;
-C -1 ; WX 700 ; N Atilde ; B -25 0 720 848 ;
-C -1 ; WX 700 ; N Aring ; B -25 0 720 883 ;
-C -1 ; WX 760 ; N Odieresis ; B 88 -17 799 865 ;
-C -1 ; WX 700 ; N Adieresis ; B -25 0 720 865 ;
-C -1 ; WX 720 ; N Ntilde ; B 18 0 823 848 ;
-C -1 ; WX 580 ; N Zcaron ; B 8 0 695 861 ;
-C -1 ; WX 600 ; N Thorn ; B 21 0 656 681 ;
-C -1 ; WX 320 ; N Iacute ; B 21 0 412 883 ;
-C -1 ; WX 600 ; N plusminus ; B 91 0 595 548 ;
-C -1 ; WX 600 ; N multiply ; B 91 44 595 548 ;
-C -1 ; WX 680 ; N Eacute ; B 21 0 736 883 ;
-C -1 ; WX 660 ; N Ydieresis ; B 87 0 809 865 ;
-C -1 ; WX 372 ; N onesuperior ; B 114 279 339 688 ;
-C -1 ; WX 620 ; N ugrave ; B 88 -8 686 706 ;
-C -1 ; WX 600 ; N logicalnot ; B 91 163 595 433 ;
-C -1 ; WX 620 ; N ntilde ; B 88 -8 673 671 ;
-C -1 ; WX 760 ; N Otilde ; B 88 -17 799 848 ;
-C -1 ; WX 540 ; N otilde ; B 65 -8 572 671 ;
-C -1 ; WX 720 ; N Ccedilla ; B 88 -178 746 698 ;
-C -1 ; WX 700 ; N Agrave ; B -25 0 720 883 ;
-C -1 ; WX 930 ; N onehalf ; B 91 0 925 681 ;
-C -1 ; WX 740 ; N Eth ; B 21 0 782 681 ;
-C -1 ; WX 400 ; N degree ; B 120 398 420 698 ;
-C -1 ; WX 660 ; N Yacute ; B 87 0 809 883 ;
-C -1 ; WX 760 ; N Ocircumflex ; B 88 -17 799 862 ;
-C -1 ; WX 540 ; N oacute ; B 65 -8 572 706 ;
-C -1 ; WX 620 ; N mu ; B 53 -221 686 484 ;
-C -1 ; WX 600 ; N minus ; B 91 259 595 335 ;
-C -1 ; WX 540 ; N eth ; B 65 -8 642 725 ;
-C -1 ; WX 540 ; N odieresis ; B 65 -8 572 688 ;
-C -1 ; WX 740 ; N copyright ; B 84 -17 784 698 ;
-C -1 ; WX 600 ; N brokenbar ; B 294 -175 372 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 85
-
-KPX A Y -62
-KPX A W -73
-KPX A V -78
-KPX A T -5
-
-KPX F period -97
-KPX F comma -98
-KPX F A -16
-
-KPX L y 20
-KPX L Y 7
-KPX L W 9
-KPX L V 4
-
-KPX P period -105
-KPX P comma -106
-KPX P A -30
-
-KPX R Y 11
-KPX R W 2
-KPX R V 2
-KPX R T 65
-
-KPX T semicolon 48
-KPX T s -7
-KPX T r 67
-KPX T period -78
-KPX T o 14
-KPX T i 71
-KPX T hyphen 20
-KPX T e 10
-KPX T comma -79
-KPX T colon 48
-KPX T c 16
-KPX T a 9
-KPX T A -14
-
-KPX V y -14
-KPX V u -10
-KPX V semicolon -44
-KPX V r -20
-KPX V period -100
-KPX V o -70
-KPX V i 3
-KPX V hyphen 20
-KPX V e -70
-KPX V comma -109
-KPX V colon -35
-KPX V a -70
-KPX V A -70
-
-KPX W y -14
-KPX W u -20
-KPX W semicolon -42
-KPX W r -30
-KPX W period -100
-KPX W o -60
-KPX W i 3
-KPX W hyphen 20
-KPX W e -60
-KPX W comma -109
-KPX W colon -35
-KPX W a -60
-KPX W A -60
-
-KPX Y v -19
-KPX Y u -31
-KPX Y semicolon -40
-KPX Y q -72
-KPX Y period -100
-KPX Y p -37
-KPX Y o -75
-KPX Y i -11
-KPX Y hyphen 20
-KPX Y e -78
-KPX Y comma -109
-KPX Y colon -35
-KPX Y a -79
-KPX Y A -82
-
-KPX f f -19
-
-KPX r q -14
-KPX r period -134
-KPX r o -10
-KPX r n 38
-KPX r m 37
-KPX r hyphen 20
-KPX r h -20
-KPX r g -3
-KPX r f -9
-KPX r e -15
-KPX r d -9
-KPX r comma -143
-KPX r c -8
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 200 177 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 130 177 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 140 177 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 177 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 220 177 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 130 177 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 210 177 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 140 177 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 150 177 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 150 177 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 30 177 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -30 177 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -20 177 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -30 177 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 177 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 177 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 190 177 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 200 177 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 210 177 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 190 177 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 100 177 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 230 177 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 170 177 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 180 177 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 170 177 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 200 177 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 140 177 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 70 177 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 70 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 110 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 140 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 60 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 30 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 40 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 80 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -40 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -100 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -90 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -60 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 80 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 20 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 40 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 80 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 30 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 30 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 120 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 60 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 70 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 110 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 140 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 70 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 20 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Courier-Bold.afm b/blt3.0/library/AFM/Courier-Bold.afm
deleted file mode 100644
index 4ade4fa..0000000
--- a/blt3.0/library/AFM/Courier-Bold.afm
+++ /dev/null
@@ -1,345 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Tue Sep 17 14:02:41 1991
-Comment UniqueID 36384
-Comment VMusage 31992 40360
-FontName Courier-Bold
-FullName Courier Bold
-FamilyName Courier
-Weight Bold
-ItalicAngle 0
-IsFixedPitch true
-FontBBox -113 -250 749 801
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.004
-Notice Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 439
-Ascender 626
-Descender -142
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 202 -15 398 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 135 277 465 562 ;
-C 35 ; WX 600 ; N numbersign ; B 56 -45 544 651 ;
-C 36 ; WX 600 ; N dollar ; B 82 -126 519 666 ;
-C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ;
-C 38 ; WX 600 ; N ampersand ; B 36 -15 546 543 ;
-C 39 ; WX 600 ; N quoteright ; B 171 277 423 562 ;
-C 40 ; WX 600 ; N parenleft ; B 219 -102 461 616 ;
-C 41 ; WX 600 ; N parenright ; B 139 -102 381 616 ;
-C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ;
-C 43 ; WX 600 ; N plus ; B 71 39 529 478 ;
-C 44 ; WX 600 ; N comma ; B 123 -111 393 174 ;
-C 45 ; WX 600 ; N hyphen ; B 100 203 500 313 ;
-C 46 ; WX 600 ; N period ; B 192 -15 408 171 ;
-C 47 ; WX 600 ; N slash ; B 98 -77 502 626 ;
-C 48 ; WX 600 ; N zero ; B 87 -15 513 616 ;
-C 49 ; WX 600 ; N one ; B 81 0 539 616 ;
-C 50 ; WX 600 ; N two ; B 61 0 499 616 ;
-C 51 ; WX 600 ; N three ; B 63 -15 501 616 ;
-C 52 ; WX 600 ; N four ; B 53 0 507 616 ;
-C 53 ; WX 600 ; N five ; B 70 -15 521 601 ;
-C 54 ; WX 600 ; N six ; B 90 -15 521 616 ;
-C 55 ; WX 600 ; N seven ; B 55 0 494 601 ;
-C 56 ; WX 600 ; N eight ; B 83 -15 517 616 ;
-C 57 ; WX 600 ; N nine ; B 79 -15 510 616 ;
-C 58 ; WX 600 ; N colon ; B 191 -15 407 425 ;
-C 59 ; WX 600 ; N semicolon ; B 123 -111 408 425 ;
-C 60 ; WX 600 ; N less ; B 66 15 523 501 ;
-C 61 ; WX 600 ; N equal ; B 71 118 529 398 ;
-C 62 ; WX 600 ; N greater ; B 77 15 534 501 ;
-C 63 ; WX 600 ; N question ; B 98 -14 501 580 ;
-C 64 ; WX 600 ; N at ; B 16 -15 584 616 ;
-C 65 ; WX 600 ; N A ; B -9 0 609 562 ;
-C 66 ; WX 600 ; N B ; B 30 0 573 562 ;
-C 67 ; WX 600 ; N C ; B 22 -18 560 580 ;
-C 68 ; WX 600 ; N D ; B 30 0 594 562 ;
-C 69 ; WX 600 ; N E ; B 25 0 560 562 ;
-C 70 ; WX 600 ; N F ; B 39 0 570 562 ;
-C 71 ; WX 600 ; N G ; B 22 -18 594 580 ;
-C 72 ; WX 600 ; N H ; B 20 0 580 562 ;
-C 73 ; WX 600 ; N I ; B 77 0 523 562 ;
-C 74 ; WX 600 ; N J ; B 37 -18 601 562 ;
-C 75 ; WX 600 ; N K ; B 21 0 599 562 ;
-C 76 ; WX 600 ; N L ; B 39 0 578 562 ;
-C 77 ; WX 600 ; N M ; B -2 0 602 562 ;
-C 78 ; WX 600 ; N N ; B 8 -12 610 562 ;
-C 79 ; WX 600 ; N O ; B 22 -18 578 580 ;
-C 80 ; WX 600 ; N P ; B 48 0 559 562 ;
-C 81 ; WX 600 ; N Q ; B 32 -138 578 580 ;
-C 82 ; WX 600 ; N R ; B 24 0 599 562 ;
-C 83 ; WX 600 ; N S ; B 47 -22 553 582 ;
-C 84 ; WX 600 ; N T ; B 21 0 579 562 ;
-C 85 ; WX 600 ; N U ; B 4 -18 596 562 ;
-C 86 ; WX 600 ; N V ; B -13 0 613 562 ;
-C 87 ; WX 600 ; N W ; B -18 0 618 562 ;
-C 88 ; WX 600 ; N X ; B 12 0 588 562 ;
-C 89 ; WX 600 ; N Y ; B 12 0 589 562 ;
-C 90 ; WX 600 ; N Z ; B 62 0 539 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 245 -102 475 616 ;
-C 92 ; WX 600 ; N backslash ; B 99 -77 503 626 ;
-C 93 ; WX 600 ; N bracketright ; B 125 -102 355 616 ;
-C 94 ; WX 600 ; N asciicircum ; B 108 250 492 616 ;
-C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 178 277 428 562 ;
-C 97 ; WX 600 ; N a ; B 35 -15 570 454 ;
-C 98 ; WX 600 ; N b ; B 0 -15 584 626 ;
-C 99 ; WX 600 ; N c ; B 40 -15 545 459 ;
-C 100 ; WX 600 ; N d ; B 20 -15 591 626 ;
-C 101 ; WX 600 ; N e ; B 40 -15 563 454 ;
-C 102 ; WX 600 ; N f ; B 83 0 547 626 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 30 -146 580 454 ;
-C 104 ; WX 600 ; N h ; B 5 0 592 626 ;
-C 105 ; WX 600 ; N i ; B 77 0 523 658 ;
-C 106 ; WX 600 ; N j ; B 63 -146 440 658 ;
-C 107 ; WX 600 ; N k ; B 20 0 585 626 ;
-C 108 ; WX 600 ; N l ; B 77 0 523 626 ;
-C 109 ; WX 600 ; N m ; B -22 0 626 454 ;
-C 110 ; WX 600 ; N n ; B 18 0 592 454 ;
-C 111 ; WX 600 ; N o ; B 30 -15 570 454 ;
-C 112 ; WX 600 ; N p ; B -1 -142 570 454 ;
-C 113 ; WX 600 ; N q ; B 20 -142 591 454 ;
-C 114 ; WX 600 ; N r ; B 47 0 580 454 ;
-C 115 ; WX 600 ; N s ; B 68 -17 535 459 ;
-C 116 ; WX 600 ; N t ; B 47 -15 532 562 ;
-C 117 ; WX 600 ; N u ; B -1 -15 569 439 ;
-C 118 ; WX 600 ; N v ; B -1 0 601 439 ;
-C 119 ; WX 600 ; N w ; B -18 0 618 439 ;
-C 120 ; WX 600 ; N x ; B 6 0 594 439 ;
-C 121 ; WX 600 ; N y ; B -4 -142 601 439 ;
-C 122 ; WX 600 ; N z ; B 81 0 520 439 ;
-C 123 ; WX 600 ; N braceleft ; B 160 -102 464 616 ;
-C 124 ; WX 600 ; N bar ; B 255 -250 345 750 ;
-C 125 ; WX 600 ; N braceright ; B 136 -102 440 616 ;
-C 126 ; WX 600 ; N asciitilde ; B 71 153 530 356 ;
-C 161 ; WX 600 ; N exclamdown ; B 202 -146 398 449 ;
-C 162 ; WX 600 ; N cent ; B 66 -49 518 614 ;
-C 163 ; WX 600 ; N sterling ; B 72 -28 558 611 ;
-C 164 ; WX 600 ; N fraction ; B 25 -60 576 661 ;
-C 165 ; WX 600 ; N yen ; B 10 0 590 562 ;
-C 166 ; WX 600 ; N florin ; B -30 -131 572 616 ;
-C 167 ; WX 600 ; N section ; B 83 -70 517 580 ;
-C 168 ; WX 600 ; N currency ; B 54 49 546 517 ;
-C 169 ; WX 600 ; N quotesingle ; B 227 277 373 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 71 277 535 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ;
-C 174 ; WX 600 ; N fi ; B 12 0 593 626 ;
-C 175 ; WX 600 ; N fl ; B 12 0 593 626 ;
-C 177 ; WX 600 ; N endash ; B 65 203 535 313 ;
-C 178 ; WX 600 ; N dagger ; B 106 -70 494 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 106 -70 494 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 196 165 404 351 ;
-C 182 ; WX 600 ; N paragraph ; B 6 -70 576 580 ;
-C 183 ; WX 600 ; N bullet ; B 140 132 460 430 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 175 -142 427 143 ;
-C 185 ; WX 600 ; N quotedblbase ; B 65 -142 529 143 ;
-C 186 ; WX 600 ; N quotedblright ; B 61 277 525 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 26 -15 574 116 ;
-C 189 ; WX 600 ; N perthousand ; B -113 -15 713 616 ;
-C 191 ; WX 600 ; N questiondown ; B 99 -146 502 449 ;
-C 193 ; WX 600 ; N grave ; B 132 508 395 661 ;
-C 194 ; WX 600 ; N acute ; B 205 508 468 661 ;
-C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ;
-C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ;
-C 197 ; WX 600 ; N macron ; B 88 505 512 585 ;
-C 198 ; WX 600 ; N breve ; B 83 468 517 631 ;
-C 199 ; WX 600 ; N dotaccent ; B 230 485 370 625 ;
-C 200 ; WX 600 ; N dieresis ; B 128 485 472 625 ;
-C 202 ; WX 600 ; N ring ; B 198 481 402 678 ;
-C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 68 488 588 661 ;
-C 206 ; WX 600 ; N ogonek ; B 169 -199 367 0 ;
-C 207 ; WX 600 ; N caron ; B 103 493 497 667 ;
-C 208 ; WX 600 ; N emdash ; B -10 203 610 313 ;
-C 225 ; WX 600 ; N AE ; B -29 0 602 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ;
-C 232 ; WX 600 ; N Lslash ; B 39 0 578 562 ;
-C 233 ; WX 600 ; N Oslash ; B 22 -22 578 584 ;
-C 234 ; WX 600 ; N OE ; B -25 0 595 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ;
-C 241 ; WX 600 ; N ae ; B -4 -15 601 454 ;
-C 245 ; WX 600 ; N dotlessi ; B 77 0 523 439 ;
-C 248 ; WX 600 ; N lslash ; B 77 0 523 626 ;
-C 249 ; WX 600 ; N oslash ; B 30 -24 570 463 ;
-C 250 ; WX 600 ; N oe ; B -18 -15 611 454 ;
-C 251 ; WX 600 ; N germandbls ; B 22 -15 596 626 ;
-C -1 ; WX 600 ; N Odieresis ; B 22 -18 578 748 ;
-C -1 ; WX 600 ; N logicalnot ; B 71 103 529 413 ;
-C -1 ; WX 600 ; N minus ; B 71 203 529 313 ;
-C -1 ; WX 600 ; N merge ; B 137 -15 464 487 ;
-C -1 ; WX 600 ; N degree ; B 86 243 474 616 ;
-C -1 ; WX 600 ; N dectab ; B 8 0 592 320 ;
-C -1 ; WX 600 ; N ll ; B -12 0 600 626 ;
-C -1 ; WX 600 ; N IJ ; B -8 -18 622 562 ;
-C -1 ; WX 600 ; N Eacute ; B 25 0 560 784 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 22 -18 578 780 ;
-C -1 ; WX 600 ; N ucircumflex ; B -1 -15 569 657 ;
-C -1 ; WX 600 ; N left ; B 65 44 535 371 ;
-C -1 ; WX 600 ; N threesuperior ; B 138 222 433 616 ;
-C -1 ; WX 600 ; N up ; B 136 0 463 447 ;
-C -1 ; WX 600 ; N multiply ; B 81 39 520 478 ;
-C -1 ; WX 600 ; N Scaron ; B 47 -22 553 790 ;
-C -1 ; WX 600 ; N tab ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 4 -18 596 780 ;
-C -1 ; WX 600 ; N divide ; B 71 16 529 500 ;
-C -1 ; WX 600 ; N Acircumflex ; B -9 0 609 780 ;
-C -1 ; WX 600 ; N eacute ; B 40 -15 563 661 ;
-C -1 ; WX 600 ; N uacute ; B -1 -15 569 661 ;
-C -1 ; WX 600 ; N Aacute ; B -9 0 609 784 ;
-C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N twosuperior ; B 143 230 436 616 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 25 0 560 780 ;
-C -1 ; WX 600 ; N ntilde ; B 18 0 592 636 ;
-C -1 ; WX 600 ; N down ; B 137 -15 464 439 ;
-C -1 ; WX 600 ; N center ; B 40 14 560 580 ;
-C -1 ; WX 600 ; N onesuperior ; B 153 230 447 616 ;
-C -1 ; WX 600 ; N ij ; B 6 -146 574 658 ;
-C -1 ; WX 600 ; N edieresis ; B 40 -15 563 625 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ;
-C -1 ; WX 600 ; N odieresis ; B 30 -15 570 625 ;
-C -1 ; WX 600 ; N Ograve ; B 22 -18 578 784 ;
-C -1 ; WX 600 ; N threequarters ; B -47 -60 648 661 ;
-C -1 ; WX 600 ; N plusminus ; B 71 24 529 515 ;
-C -1 ; WX 600 ; N prescription ; B 24 -15 599 562 ;
-C -1 ; WX 600 ; N eth ; B 58 -27 543 626 ;
-C -1 ; WX 600 ; N largebullet ; B 248 229 352 333 ;
-C -1 ; WX 600 ; N egrave ; B 40 -15 563 661 ;
-C -1 ; WX 600 ; N ccedilla ; B 40 -206 545 459 ;
-C -1 ; WX 600 ; N notegraphic ; B 77 -15 523 572 ;
-C -1 ; WX 600 ; N Udieresis ; B 4 -18 596 748 ;
-C -1 ; WX 600 ; N Gcaron ; B 22 -18 594 790 ;
-C -1 ; WX 600 ; N arrowdown ; B 144 -15 456 608 ;
-C -1 ; WX 600 ; N format ; B 5 -146 115 601 ;
-C -1 ; WX 600 ; N Otilde ; B 22 -18 578 759 ;
-C -1 ; WX 600 ; N Idieresis ; B 77 0 523 748 ;
-C -1 ; WX 600 ; N adieresis ; B 35 -15 570 625 ;
-C -1 ; WX 600 ; N ecircumflex ; B 40 -15 563 657 ;
-C -1 ; WX 600 ; N Eth ; B 30 0 594 562 ;
-C -1 ; WX 600 ; N onequarter ; B -56 -60 656 661 ;
-C -1 ; WX 600 ; N LL ; B -45 0 645 562 ;
-C -1 ; WX 600 ; N agrave ; B 35 -15 570 661 ;
-C -1 ; WX 600 ; N Zcaron ; B 62 0 539 790 ;
-C -1 ; WX 600 ; N Scedilla ; B 47 -206 553 582 ;
-C -1 ; WX 600 ; N Idot ; B 77 0 523 748 ;
-C -1 ; WX 600 ; N Iacute ; B 77 0 523 784 ;
-C -1 ; WX 600 ; N indent ; B 65 45 535 372 ;
-C -1 ; WX 600 ; N Ugrave ; B 4 -18 596 784 ;
-C -1 ; WX 600 ; N scaron ; B 68 -17 535 667 ;
-C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ;
-C -1 ; WX 600 ; N Aring ; B -9 0 609 801 ;
-C -1 ; WX 600 ; N Ccedilla ; B 22 -206 560 580 ;
-C -1 ; WX 600 ; N Igrave ; B 77 0 523 784 ;
-C -1 ; WX 600 ; N brokenbar ; B 255 -175 345 675 ;
-C -1 ; WX 600 ; N Oacute ; B 22 -18 578 784 ;
-C -1 ; WX 600 ; N otilde ; B 30 -15 570 636 ;
-C -1 ; WX 600 ; N Yacute ; B 12 0 589 784 ;
-C -1 ; WX 600 ; N lira ; B 72 -28 558 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 77 0 523 780 ;
-C -1 ; WX 600 ; N Atilde ; B -9 0 609 759 ;
-C -1 ; WX 600 ; N Uacute ; B 4 -18 596 784 ;
-C -1 ; WX 600 ; N Ydieresis ; B 12 0 589 748 ;
-C -1 ; WX 600 ; N ydieresis ; B -4 -142 601 625 ;
-C -1 ; WX 600 ; N idieresis ; B 77 0 523 625 ;
-C -1 ; WX 600 ; N Adieresis ; B -9 0 609 748 ;
-C -1 ; WX 600 ; N mu ; B -1 -142 569 439 ;
-C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ;
-C -1 ; WX 600 ; N oacute ; B 30 -15 570 661 ;
-C -1 ; WX 600 ; N acircumflex ; B 35 -15 570 657 ;
-C -1 ; WX 600 ; N Agrave ; B -9 0 609 784 ;
-C -1 ; WX 600 ; N return ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N atilde ; B 35 -15 570 636 ;
-C -1 ; WX 600 ; N square ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N stop ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N udieresis ; B -1 -15 569 625 ;
-C -1 ; WX 600 ; N arrowup ; B 144 3 456 626 ;
-C -1 ; WX 600 ; N igrave ; B 77 0 523 661 ;
-C -1 ; WX 600 ; N Edieresis ; B 25 0 560 748 ;
-C -1 ; WX 600 ; N zcaron ; B 81 0 520 667 ;
-C -1 ; WX 600 ; N arrowboth ; B -24 143 624 455 ;
-C -1 ; WX 600 ; N gcaron ; B 30 -146 580 667 ;
-C -1 ; WX 600 ; N arrowleft ; B -24 143 634 455 ;
-C -1 ; WX 600 ; N aacute ; B 35 -15 570 661 ;
-C -1 ; WX 600 ; N ocircumflex ; B 30 -15 570 657 ;
-C -1 ; WX 600 ; N scedilla ; B 68 -206 535 459 ;
-C -1 ; WX 600 ; N ograve ; B 30 -15 570 661 ;
-C -1 ; WX 600 ; N onehalf ; B -47 -60 648 661 ;
-C -1 ; WX 600 ; N ugrave ; B -1 -15 569 661 ;
-C -1 ; WX 600 ; N Ntilde ; B 8 -12 610 759 ;
-C -1 ; WX 600 ; N iacute ; B 77 0 523 661 ;
-C -1 ; WX 600 ; N arrowright ; B -34 143 624 455 ;
-C -1 ; WX 600 ; N Thorn ; B 48 0 557 562 ;
-C -1 ; WX 600 ; N Egrave ; B 25 0 560 784 ;
-C -1 ; WX 600 ; N thorn ; B -14 -142 570 626 ;
-C -1 ; WX 600 ; N aring ; B 35 -15 570 678 ;
-C -1 ; WX 600 ; N yacute ; B -4 -142 601 661 ;
-C -1 ; WX 600 ; N icircumflex ; B 63 0 523 657 ;
-EndCharMetrics
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 30 123 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 123 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -20 123 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -50 123 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring -10 123 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde -30 123 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 123 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 123 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 123 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 123 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 10 123 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 123 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 123 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 123 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 123 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 123 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 123 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 123 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 123 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 123 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 123 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 123 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 123 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 123 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 123 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 123 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 123 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 123 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 123 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Courier-BoldOblique.afm b/blt3.0/library/AFM/Courier-BoldOblique.afm
deleted file mode 100644
index e0b3940..0000000
--- a/blt3.0/library/AFM/Courier-BoldOblique.afm
+++ /dev/null
@@ -1,345 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Tue Sep 17 14:13:24 1991
-Comment UniqueID 36389
-Comment VMusage 10055 54684
-FontName Courier-BoldOblique
-FullName Courier Bold Oblique
-FamilyName Courier
-Weight Bold
-ItalicAngle -12
-IsFixedPitch true
-FontBBox -56 -250 868 801
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.004
-Notice Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 439
-Ascender 626
-Descender -142
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 216 -15 495 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 212 277 584 562 ;
-C 35 ; WX 600 ; N numbersign ; B 88 -45 640 651 ;
-C 36 ; WX 600 ; N dollar ; B 87 -126 629 666 ;
-C 37 ; WX 600 ; N percent ; B 102 -15 624 616 ;
-C 38 ; WX 600 ; N ampersand ; B 62 -15 594 543 ;
-C 39 ; WX 600 ; N quoteright ; B 230 277 542 562 ;
-C 40 ; WX 600 ; N parenleft ; B 266 -102 592 616 ;
-C 41 ; WX 600 ; N parenright ; B 117 -102 444 616 ;
-C 42 ; WX 600 ; N asterisk ; B 179 219 597 601 ;
-C 43 ; WX 600 ; N plus ; B 114 39 596 478 ;
-C 44 ; WX 600 ; N comma ; B 99 -111 430 174 ;
-C 45 ; WX 600 ; N hyphen ; B 143 203 567 313 ;
-C 46 ; WX 600 ; N period ; B 207 -15 426 171 ;
-C 47 ; WX 600 ; N slash ; B 91 -77 626 626 ;
-C 48 ; WX 600 ; N zero ; B 136 -15 592 616 ;
-C 49 ; WX 600 ; N one ; B 93 0 561 616 ;
-C 50 ; WX 600 ; N two ; B 61 0 593 616 ;
-C 51 ; WX 600 ; N three ; B 72 -15 571 616 ;
-C 52 ; WX 600 ; N four ; B 82 0 558 616 ;
-C 53 ; WX 600 ; N five ; B 77 -15 621 601 ;
-C 54 ; WX 600 ; N six ; B 136 -15 652 616 ;
-C 55 ; WX 600 ; N seven ; B 147 0 622 601 ;
-C 56 ; WX 600 ; N eight ; B 115 -15 604 616 ;
-C 57 ; WX 600 ; N nine ; B 76 -15 592 616 ;
-C 58 ; WX 600 ; N colon ; B 206 -15 479 425 ;
-C 59 ; WX 600 ; N semicolon ; B 99 -111 480 425 ;
-C 60 ; WX 600 ; N less ; B 121 15 612 501 ;
-C 61 ; WX 600 ; N equal ; B 96 118 614 398 ;
-C 62 ; WX 600 ; N greater ; B 97 15 589 501 ;
-C 63 ; WX 600 ; N question ; B 183 -14 591 580 ;
-C 64 ; WX 600 ; N at ; B 66 -15 641 616 ;
-C 65 ; WX 600 ; N A ; B -9 0 631 562 ;
-C 66 ; WX 600 ; N B ; B 30 0 629 562 ;
-C 67 ; WX 600 ; N C ; B 75 -18 674 580 ;
-C 68 ; WX 600 ; N D ; B 30 0 664 562 ;
-C 69 ; WX 600 ; N E ; B 25 0 669 562 ;
-C 70 ; WX 600 ; N F ; B 39 0 683 562 ;
-C 71 ; WX 600 ; N G ; B 75 -18 674 580 ;
-C 72 ; WX 600 ; N H ; B 20 0 699 562 ;
-C 73 ; WX 600 ; N I ; B 77 0 642 562 ;
-C 74 ; WX 600 ; N J ; B 59 -18 720 562 ;
-C 75 ; WX 600 ; N K ; B 21 0 691 562 ;
-C 76 ; WX 600 ; N L ; B 39 0 635 562 ;
-C 77 ; WX 600 ; N M ; B -2 0 721 562 ;
-C 78 ; WX 600 ; N N ; B 8 -12 729 562 ;
-C 79 ; WX 600 ; N O ; B 74 -18 645 580 ;
-C 80 ; WX 600 ; N P ; B 48 0 642 562 ;
-C 81 ; WX 600 ; N Q ; B 84 -138 636 580 ;
-C 82 ; WX 600 ; N R ; B 24 0 617 562 ;
-C 83 ; WX 600 ; N S ; B 54 -22 672 582 ;
-C 84 ; WX 600 ; N T ; B 86 0 678 562 ;
-C 85 ; WX 600 ; N U ; B 101 -18 715 562 ;
-C 86 ; WX 600 ; N V ; B 84 0 732 562 ;
-C 87 ; WX 600 ; N W ; B 84 0 737 562 ;
-C 88 ; WX 600 ; N X ; B 12 0 689 562 ;
-C 89 ; WX 600 ; N Y ; B 109 0 708 562 ;
-C 90 ; WX 600 ; N Z ; B 62 0 636 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 223 -102 606 616 ;
-C 92 ; WX 600 ; N backslash ; B 223 -77 496 626 ;
-C 93 ; WX 600 ; N bracketright ; B 103 -102 486 616 ;
-C 94 ; WX 600 ; N asciicircum ; B 171 250 555 616 ;
-C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 297 277 487 562 ;
-C 97 ; WX 600 ; N a ; B 62 -15 592 454 ;
-C 98 ; WX 600 ; N b ; B 13 -15 636 626 ;
-C 99 ; WX 600 ; N c ; B 81 -15 631 459 ;
-C 100 ; WX 600 ; N d ; B 61 -15 644 626 ;
-C 101 ; WX 600 ; N e ; B 81 -15 604 454 ;
-C 102 ; WX 600 ; N f ; B 83 0 677 626 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 41 -146 673 454 ;
-C 104 ; WX 600 ; N h ; B 18 0 614 626 ;
-C 105 ; WX 600 ; N i ; B 77 0 545 658 ;
-C 106 ; WX 600 ; N j ; B 37 -146 580 658 ;
-C 107 ; WX 600 ; N k ; B 33 0 642 626 ;
-C 108 ; WX 600 ; N l ; B 77 0 545 626 ;
-C 109 ; WX 600 ; N m ; B -22 0 648 454 ;
-C 110 ; WX 600 ; N n ; B 18 0 614 454 ;
-C 111 ; WX 600 ; N o ; B 71 -15 622 454 ;
-C 112 ; WX 600 ; N p ; B -31 -142 622 454 ;
-C 113 ; WX 600 ; N q ; B 61 -142 684 454 ;
-C 114 ; WX 600 ; N r ; B 47 0 654 454 ;
-C 115 ; WX 600 ; N s ; B 67 -17 607 459 ;
-C 116 ; WX 600 ; N t ; B 118 -15 566 562 ;
-C 117 ; WX 600 ; N u ; B 70 -15 591 439 ;
-C 118 ; WX 600 ; N v ; B 70 0 694 439 ;
-C 119 ; WX 600 ; N w ; B 53 0 711 439 ;
-C 120 ; WX 600 ; N x ; B 6 0 670 439 ;
-C 121 ; WX 600 ; N y ; B -20 -142 694 439 ;
-C 122 ; WX 600 ; N z ; B 81 0 613 439 ;
-C 123 ; WX 600 ; N braceleft ; B 204 -102 595 616 ;
-C 124 ; WX 600 ; N bar ; B 202 -250 504 750 ;
-C 125 ; WX 600 ; N braceright ; B 114 -102 506 616 ;
-C 126 ; WX 600 ; N asciitilde ; B 120 153 589 356 ;
-C 161 ; WX 600 ; N exclamdown ; B 197 -146 477 449 ;
-C 162 ; WX 600 ; N cent ; B 121 -49 604 614 ;
-C 163 ; WX 600 ; N sterling ; B 107 -28 650 611 ;
-C 164 ; WX 600 ; N fraction ; B 22 -60 707 661 ;
-C 165 ; WX 600 ; N yen ; B 98 0 709 562 ;
-C 166 ; WX 600 ; N florin ; B -56 -131 701 616 ;
-C 167 ; WX 600 ; N section ; B 74 -70 619 580 ;
-C 168 ; WX 600 ; N currency ; B 77 49 643 517 ;
-C 169 ; WX 600 ; N quotesingle ; B 304 277 492 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 190 277 594 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 63 70 638 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 196 70 544 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 166 70 514 446 ;
-C 174 ; WX 600 ; N fi ; B 12 0 643 626 ;
-C 175 ; WX 600 ; N fl ; B 12 0 643 626 ;
-C 177 ; WX 600 ; N endash ; B 108 203 602 313 ;
-C 178 ; WX 600 ; N dagger ; B 176 -70 586 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 122 -70 586 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 249 165 461 351 ;
-C 182 ; WX 600 ; N paragraph ; B 61 -70 699 580 ;
-C 183 ; WX 600 ; N bullet ; B 197 132 523 430 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 145 -142 457 143 ;
-C 185 ; WX 600 ; N quotedblbase ; B 35 -142 559 143 ;
-C 186 ; WX 600 ; N quotedblright ; B 120 277 644 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 72 70 647 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 35 -15 586 116 ;
-C 189 ; WX 600 ; N perthousand ; B -44 -15 742 616 ;
-C 191 ; WX 600 ; N questiondown ; B 101 -146 509 449 ;
-C 193 ; WX 600 ; N grave ; B 272 508 503 661 ;
-C 194 ; WX 600 ; N acute ; B 313 508 608 661 ;
-C 195 ; WX 600 ; N circumflex ; B 212 483 606 657 ;
-C 196 ; WX 600 ; N tilde ; B 200 493 642 636 ;
-C 197 ; WX 600 ; N macron ; B 195 505 636 585 ;
-C 198 ; WX 600 ; N breve ; B 217 468 651 631 ;
-C 199 ; WX 600 ; N dotaccent ; B 346 485 490 625 ;
-C 200 ; WX 600 ; N dieresis ; B 244 485 592 625 ;
-C 202 ; WX 600 ; N ring ; B 319 481 528 678 ;
-C 203 ; WX 600 ; N cedilla ; B 169 -206 367 0 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 172 488 728 661 ;
-C 206 ; WX 600 ; N ogonek ; B 144 -199 350 0 ;
-C 207 ; WX 600 ; N caron ; B 238 493 632 667 ;
-C 208 ; WX 600 ; N emdash ; B 33 203 677 313 ;
-C 225 ; WX 600 ; N AE ; B -29 0 707 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 189 196 526 580 ;
-C 232 ; WX 600 ; N Lslash ; B 39 0 635 562 ;
-C 233 ; WX 600 ; N Oslash ; B 48 -22 672 584 ;
-C 234 ; WX 600 ; N OE ; B 26 0 700 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 189 196 542 580 ;
-C 241 ; WX 600 ; N ae ; B 21 -15 651 454 ;
-C 245 ; WX 600 ; N dotlessi ; B 77 0 545 439 ;
-C 248 ; WX 600 ; N lslash ; B 77 0 578 626 ;
-C 249 ; WX 600 ; N oslash ; B 55 -24 637 463 ;
-C 250 ; WX 600 ; N oe ; B 19 -15 661 454 ;
-C 251 ; WX 600 ; N germandbls ; B 22 -15 628 626 ;
-C -1 ; WX 600 ; N Odieresis ; B 74 -18 645 748 ;
-C -1 ; WX 600 ; N logicalnot ; B 135 103 617 413 ;
-C -1 ; WX 600 ; N minus ; B 114 203 596 313 ;
-C -1 ; WX 600 ; N merge ; B 168 -15 533 487 ;
-C -1 ; WX 600 ; N degree ; B 173 243 569 616 ;
-C -1 ; WX 600 ; N dectab ; B 8 0 615 320 ;
-C -1 ; WX 600 ; N ll ; B 1 0 653 626 ;
-C -1 ; WX 600 ; N IJ ; B -8 -18 741 562 ;
-C -1 ; WX 600 ; N Eacute ; B 25 0 669 784 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 74 -18 645 780 ;
-C -1 ; WX 600 ; N ucircumflex ; B 70 -15 591 657 ;
-C -1 ; WX 600 ; N left ; B 109 44 589 371 ;
-C -1 ; WX 600 ; N threesuperior ; B 193 222 525 616 ;
-C -1 ; WX 600 ; N up ; B 196 0 523 447 ;
-C -1 ; WX 600 ; N multiply ; B 105 39 606 478 ;
-C -1 ; WX 600 ; N Scaron ; B 54 -22 672 790 ;
-C -1 ; WX 600 ; N tab ; B 19 0 641 562 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 101 -18 715 780 ;
-C -1 ; WX 600 ; N divide ; B 114 16 596 500 ;
-C -1 ; WX 600 ; N Acircumflex ; B -9 0 631 780 ;
-C -1 ; WX 600 ; N eacute ; B 81 -15 608 661 ;
-C -1 ; WX 600 ; N uacute ; B 70 -15 608 661 ;
-C -1 ; WX 600 ; N Aacute ; B -9 0 665 784 ;
-C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N twosuperior ; B 192 230 541 616 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 25 0 669 780 ;
-C -1 ; WX 600 ; N ntilde ; B 18 0 642 636 ;
-C -1 ; WX 600 ; N down ; B 168 -15 496 439 ;
-C -1 ; WX 600 ; N center ; B 103 14 623 580 ;
-C -1 ; WX 600 ; N onesuperior ; B 213 230 514 616 ;
-C -1 ; WX 600 ; N ij ; B 6 -146 714 658 ;
-C -1 ; WX 600 ; N edieresis ; B 81 -15 604 625 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ;
-C -1 ; WX 600 ; N odieresis ; B 71 -15 622 625 ;
-C -1 ; WX 600 ; N Ograve ; B 74 -18 645 784 ;
-C -1 ; WX 600 ; N threequarters ; B 8 -60 698 661 ;
-C -1 ; WX 600 ; N plusminus ; B 76 24 614 515 ;
-C -1 ; WX 600 ; N prescription ; B 24 -15 632 562 ;
-C -1 ; WX 600 ; N eth ; B 93 -27 661 626 ;
-C -1 ; WX 600 ; N largebullet ; B 307 229 413 333 ;
-C -1 ; WX 600 ; N egrave ; B 81 -15 604 661 ;
-C -1 ; WX 600 ; N ccedilla ; B 81 -206 631 459 ;
-C -1 ; WX 600 ; N notegraphic ; B 91 -15 619 572 ;
-C -1 ; WX 600 ; N Udieresis ; B 101 -18 715 748 ;
-C -1 ; WX 600 ; N Gcaron ; B 75 -18 674 790 ;
-C -1 ; WX 600 ; N arrowdown ; B 174 -15 486 608 ;
-C -1 ; WX 600 ; N format ; B -26 -146 243 601 ;
-C -1 ; WX 600 ; N Otilde ; B 74 -18 668 759 ;
-C -1 ; WX 600 ; N Idieresis ; B 77 0 642 748 ;
-C -1 ; WX 600 ; N adieresis ; B 62 -15 592 625 ;
-C -1 ; WX 600 ; N ecircumflex ; B 81 -15 606 657 ;
-C -1 ; WX 600 ; N Eth ; B 30 0 664 562 ;
-C -1 ; WX 600 ; N onequarter ; B 14 -60 706 661 ;
-C -1 ; WX 600 ; N LL ; B -45 0 694 562 ;
-C -1 ; WX 600 ; N agrave ; B 62 -15 592 661 ;
-C -1 ; WX 600 ; N Zcaron ; B 62 0 659 790 ;
-C -1 ; WX 600 ; N Scedilla ; B 54 -206 672 582 ;
-C -1 ; WX 600 ; N Idot ; B 77 0 642 748 ;
-C -1 ; WX 600 ; N Iacute ; B 77 0 642 784 ;
-C -1 ; WX 600 ; N indent ; B 99 45 579 372 ;
-C -1 ; WX 600 ; N Ugrave ; B 101 -18 715 784 ;
-C -1 ; WX 600 ; N scaron ; B 67 -17 632 667 ;
-C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ;
-C -1 ; WX 600 ; N Aring ; B -9 0 631 801 ;
-C -1 ; WX 600 ; N Ccedilla ; B 74 -206 674 580 ;
-C -1 ; WX 600 ; N Igrave ; B 77 0 642 784 ;
-C -1 ; WX 600 ; N brokenbar ; B 218 -175 488 675 ;
-C -1 ; WX 600 ; N Oacute ; B 74 -18 645 784 ;
-C -1 ; WX 600 ; N otilde ; B 71 -15 642 636 ;
-C -1 ; WX 600 ; N Yacute ; B 109 0 708 784 ;
-C -1 ; WX 600 ; N lira ; B 107 -28 650 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 77 0 642 780 ;
-C -1 ; WX 600 ; N Atilde ; B -9 0 638 759 ;
-C -1 ; WX 600 ; N Uacute ; B 101 -18 715 784 ;
-C -1 ; WX 600 ; N Ydieresis ; B 109 0 708 748 ;
-C -1 ; WX 600 ; N ydieresis ; B -20 -142 694 625 ;
-C -1 ; WX 600 ; N idieresis ; B 77 0 552 625 ;
-C -1 ; WX 600 ; N Adieresis ; B -9 0 631 748 ;
-C -1 ; WX 600 ; N mu ; B 50 -142 591 439 ;
-C -1 ; WX 600 ; N trademark ; B 86 230 868 562 ;
-C -1 ; WX 600 ; N oacute ; B 71 -15 622 661 ;
-C -1 ; WX 600 ; N acircumflex ; B 62 -15 592 657 ;
-C -1 ; WX 600 ; N Agrave ; B -9 0 631 784 ;
-C -1 ; WX 600 ; N return ; B 79 0 700 562 ;
-C -1 ; WX 600 ; N atilde ; B 62 -15 642 636 ;
-C -1 ; WX 600 ; N square ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N stop ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N udieresis ; B 70 -15 591 625 ;
-C -1 ; WX 600 ; N arrowup ; B 244 3 556 626 ;
-C -1 ; WX 600 ; N igrave ; B 77 0 545 661 ;
-C -1 ; WX 600 ; N Edieresis ; B 25 0 669 748 ;
-C -1 ; WX 600 ; N zcaron ; B 81 0 632 667 ;
-C -1 ; WX 600 ; N arrowboth ; B 40 143 688 455 ;
-C -1 ; WX 600 ; N gcaron ; B 41 -146 673 667 ;
-C -1 ; WX 600 ; N arrowleft ; B 40 143 708 455 ;
-C -1 ; WX 600 ; N aacute ; B 62 -15 608 661 ;
-C -1 ; WX 600 ; N ocircumflex ; B 71 -15 622 657 ;
-C -1 ; WX 600 ; N scedilla ; B 67 -206 607 459 ;
-C -1 ; WX 600 ; N ograve ; B 71 -15 622 661 ;
-C -1 ; WX 600 ; N onehalf ; B 23 -60 715 661 ;
-C -1 ; WX 600 ; N ugrave ; B 70 -15 591 661 ;
-C -1 ; WX 600 ; N Ntilde ; B 8 -12 729 759 ;
-C -1 ; WX 600 ; N iacute ; B 77 0 608 661 ;
-C -1 ; WX 600 ; N arrowright ; B 20 143 688 455 ;
-C -1 ; WX 600 ; N Thorn ; B 48 0 619 562 ;
-C -1 ; WX 600 ; N Egrave ; B 25 0 669 784 ;
-C -1 ; WX 600 ; N thorn ; B -31 -142 622 626 ;
-C -1 ; WX 600 ; N aring ; B 62 -15 592 678 ;
-C -1 ; WX 600 ; N yacute ; B -20 -142 694 661 ;
-C -1 ; WX 600 ; N icircumflex ; B 77 0 566 657 ;
-EndCharMetrics
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 56 123 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 123 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 6 123 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -24 123 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 16 123 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde -4 123 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 123 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 123 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 26 123 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 123 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 36 123 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 123 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 123 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 26 123 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 123 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 26 123 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 123 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 123 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 26 123 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 123 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 26 123 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 26 123 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 123 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 123 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 26 123 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 123 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 123 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 26 123 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 26 123 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Courier-Oblique.afm b/blt3.0/library/AFM/Courier-Oblique.afm
deleted file mode 100644
index 79bb0c3..0000000
--- a/blt3.0/library/AFM/Courier-Oblique.afm
+++ /dev/null
@@ -1,345 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Tue Sep 17 09:42:19 1991
-Comment UniqueID 36350
-Comment VMusage 9174 52297
-FontName Courier-Oblique
-FullName Courier Oblique
-FamilyName Courier
-Weight Medium
-ItalicAngle -12
-IsFixedPitch true
-FontBBox -28 -250 742 805
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.004
-Notice Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 426
-Ascender 629
-Descender -157
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 243 -15 464 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ;
-C 35 ; WX 600 ; N numbersign ; B 133 -32 596 639 ;
-C 36 ; WX 600 ; N dollar ; B 108 -126 596 662 ;
-C 37 ; WX 600 ; N percent ; B 134 -15 599 622 ;
-C 38 ; WX 600 ; N ampersand ; B 87 -15 580 543 ;
-C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ;
-C 40 ; WX 600 ; N parenleft ; B 313 -108 572 622 ;
-C 41 ; WX 600 ; N parenright ; B 137 -108 396 622 ;
-C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ;
-C 43 ; WX 600 ; N plus ; B 129 44 580 470 ;
-C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ;
-C 45 ; WX 600 ; N hyphen ; B 152 231 558 285 ;
-C 46 ; WX 600 ; N period ; B 238 -15 382 109 ;
-C 47 ; WX 600 ; N slash ; B 112 -80 604 629 ;
-C 48 ; WX 600 ; N zero ; B 154 -15 575 622 ;
-C 49 ; WX 600 ; N one ; B 98 0 515 622 ;
-C 50 ; WX 600 ; N two ; B 70 0 568 622 ;
-C 51 ; WX 600 ; N three ; B 82 -15 538 622 ;
-C 52 ; WX 600 ; N four ; B 108 0 541 622 ;
-C 53 ; WX 600 ; N five ; B 99 -15 589 607 ;
-C 54 ; WX 600 ; N six ; B 155 -15 629 622 ;
-C 55 ; WX 600 ; N seven ; B 182 0 612 607 ;
-C 56 ; WX 600 ; N eight ; B 132 -15 588 622 ;
-C 57 ; WX 600 ; N nine ; B 93 -15 574 622 ;
-C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ;
-C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ;
-C 60 ; WX 600 ; N less ; B 96 42 610 472 ;
-C 61 ; WX 600 ; N equal ; B 109 138 600 376 ;
-C 62 ; WX 600 ; N greater ; B 85 42 599 472 ;
-C 63 ; WX 600 ; N question ; B 222 -15 583 572 ;
-C 64 ; WX 600 ; N at ; B 127 -15 582 622 ;
-C 65 ; WX 600 ; N A ; B 3 0 607 562 ;
-C 66 ; WX 600 ; N B ; B 43 0 616 562 ;
-C 67 ; WX 600 ; N C ; B 93 -18 655 580 ;
-C 68 ; WX 600 ; N D ; B 43 0 645 562 ;
-C 69 ; WX 600 ; N E ; B 53 0 660 562 ;
-C 70 ; WX 600 ; N F ; B 53 0 660 562 ;
-C 71 ; WX 600 ; N G ; B 83 -18 645 580 ;
-C 72 ; WX 600 ; N H ; B 32 0 687 562 ;
-C 73 ; WX 600 ; N I ; B 96 0 623 562 ;
-C 74 ; WX 600 ; N J ; B 52 -18 685 562 ;
-C 75 ; WX 600 ; N K ; B 38 0 671 562 ;
-C 76 ; WX 600 ; N L ; B 47 0 607 562 ;
-C 77 ; WX 600 ; N M ; B 4 0 715 562 ;
-C 78 ; WX 600 ; N N ; B 7 -13 712 562 ;
-C 79 ; WX 600 ; N O ; B 94 -18 625 580 ;
-C 80 ; WX 600 ; N P ; B 79 0 644 562 ;
-C 81 ; WX 600 ; N Q ; B 95 -138 625 580 ;
-C 82 ; WX 600 ; N R ; B 38 0 598 562 ;
-C 83 ; WX 600 ; N S ; B 76 -20 650 580 ;
-C 84 ; WX 600 ; N T ; B 108 0 665 562 ;
-C 85 ; WX 600 ; N U ; B 125 -18 702 562 ;
-C 86 ; WX 600 ; N V ; B 105 -13 723 562 ;
-C 87 ; WX 600 ; N W ; B 106 -13 722 562 ;
-C 88 ; WX 600 ; N X ; B 23 0 675 562 ;
-C 89 ; WX 600 ; N Y ; B 133 0 695 562 ;
-C 90 ; WX 600 ; N Z ; B 86 0 610 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 246 -108 574 622 ;
-C 92 ; WX 600 ; N backslash ; B 249 -80 468 629 ;
-C 93 ; WX 600 ; N bracketright ; B 135 -108 463 622 ;
-C 94 ; WX 600 ; N asciicircum ; B 175 354 587 622 ;
-C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 343 328 457 562 ;
-C 97 ; WX 600 ; N a ; B 76 -15 569 441 ;
-C 98 ; WX 600 ; N b ; B 29 -15 625 629 ;
-C 99 ; WX 600 ; N c ; B 106 -15 608 441 ;
-C 100 ; WX 600 ; N d ; B 85 -15 640 629 ;
-C 101 ; WX 600 ; N e ; B 106 -15 598 441 ;
-C 102 ; WX 600 ; N f ; B 114 0 662 629 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 61 -157 657 441 ;
-C 104 ; WX 600 ; N h ; B 33 0 592 629 ;
-C 105 ; WX 600 ; N i ; B 95 0 515 657 ;
-C 106 ; WX 600 ; N j ; B 52 -157 550 657 ;
-C 107 ; WX 600 ; N k ; B 58 0 633 629 ;
-C 108 ; WX 600 ; N l ; B 95 0 515 629 ;
-C 109 ; WX 600 ; N m ; B -5 0 615 441 ;
-C 110 ; WX 600 ; N n ; B 26 0 585 441 ;
-C 111 ; WX 600 ; N o ; B 102 -15 588 441 ;
-C 112 ; WX 600 ; N p ; B -24 -157 605 441 ;
-C 113 ; WX 600 ; N q ; B 85 -157 682 441 ;
-C 114 ; WX 600 ; N r ; B 60 0 636 441 ;
-C 115 ; WX 600 ; N s ; B 78 -15 584 441 ;
-C 116 ; WX 600 ; N t ; B 167 -15 561 561 ;
-C 117 ; WX 600 ; N u ; B 101 -15 572 426 ;
-C 118 ; WX 600 ; N v ; B 90 -10 681 426 ;
-C 119 ; WX 600 ; N w ; B 76 -10 695 426 ;
-C 120 ; WX 600 ; N x ; B 20 0 655 426 ;
-C 121 ; WX 600 ; N y ; B -4 -157 683 426 ;
-C 122 ; WX 600 ; N z ; B 99 0 593 426 ;
-C 123 ; WX 600 ; N braceleft ; B 233 -108 569 622 ;
-C 124 ; WX 600 ; N bar ; B 222 -250 485 750 ;
-C 125 ; WX 600 ; N braceright ; B 140 -108 477 622 ;
-C 126 ; WX 600 ; N asciitilde ; B 116 197 600 320 ;
-C 161 ; WX 600 ; N exclamdown ; B 225 -157 445 430 ;
-C 162 ; WX 600 ; N cent ; B 151 -49 588 614 ;
-C 163 ; WX 600 ; N sterling ; B 124 -21 621 611 ;
-C 164 ; WX 600 ; N fraction ; B 84 -57 646 665 ;
-C 165 ; WX 600 ; N yen ; B 120 0 693 562 ;
-C 166 ; WX 600 ; N florin ; B -26 -143 671 622 ;
-C 167 ; WX 600 ; N section ; B 104 -78 590 580 ;
-C 168 ; WX 600 ; N currency ; B 94 58 628 506 ;
-C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 262 328 541 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ;
-C 174 ; WX 600 ; N fi ; B 3 0 619 629 ;
-C 175 ; WX 600 ; N fl ; B 3 0 619 629 ;
-C 177 ; WX 600 ; N endash ; B 124 231 586 285 ;
-C 178 ; WX 600 ; N dagger ; B 217 -78 546 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 163 -78 546 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 275 189 434 327 ;
-C 182 ; WX 600 ; N paragraph ; B 100 -78 630 562 ;
-C 183 ; WX 600 ; N bullet ; B 224 130 485 383 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ;
-C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ;
-C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 46 -15 575 111 ;
-C 189 ; WX 600 ; N perthousand ; B 59 -15 627 622 ;
-C 191 ; WX 600 ; N questiondown ; B 105 -157 466 430 ;
-C 193 ; WX 600 ; N grave ; B 294 497 484 672 ;
-C 194 ; WX 600 ; N acute ; B 348 497 612 672 ;
-C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ;
-C 196 ; WX 600 ; N tilde ; B 212 489 629 606 ;
-C 197 ; WX 600 ; N macron ; B 232 525 600 565 ;
-C 198 ; WX 600 ; N breve ; B 279 501 576 609 ;
-C 199 ; WX 600 ; N dotaccent ; B 360 477 466 580 ;
-C 200 ; WX 600 ; N dieresis ; B 262 492 570 595 ;
-C 202 ; WX 600 ; N ring ; B 332 463 500 627 ;
-C 203 ; WX 600 ; N cedilla ; B 197 -151 344 10 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ;
-C 206 ; WX 600 ; N ogonek ; B 207 -151 348 0 ;
-C 207 ; WX 600 ; N caron ; B 262 492 614 669 ;
-C 208 ; WX 600 ; N emdash ; B 49 231 661 285 ;
-C 225 ; WX 600 ; N AE ; B 3 0 655 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 209 249 512 580 ;
-C 232 ; WX 600 ; N Lslash ; B 47 0 607 562 ;
-C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ;
-C 234 ; WX 600 ; N OE ; B 59 0 672 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 210 249 535 580 ;
-C 241 ; WX 600 ; N ae ; B 41 -15 626 441 ;
-C 245 ; WX 600 ; N dotlessi ; B 95 0 515 426 ;
-C 248 ; WX 600 ; N lslash ; B 95 0 583 629 ;
-C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ;
-C 250 ; WX 600 ; N oe ; B 54 -15 615 441 ;
-C 251 ; WX 600 ; N germandbls ; B 48 -15 617 629 ;
-C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 731 ;
-C -1 ; WX 600 ; N logicalnot ; B 155 108 591 369 ;
-C -1 ; WX 600 ; N minus ; B 129 232 580 283 ;
-C -1 ; WX 600 ; N merge ; B 187 -15 503 436 ;
-C -1 ; WX 600 ; N degree ; B 214 269 576 622 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 593 227 ;
-C -1 ; WX 600 ; N ll ; B 33 0 616 629 ;
-C -1 ; WX 600 ; N IJ ; B 32 -18 702 562 ;
-C -1 ; WX 600 ; N Eacute ; B 53 0 668 793 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 775 ;
-C -1 ; WX 600 ; N ucircumflex ; B 101 -15 572 654 ;
-C -1 ; WX 600 ; N left ; B 114 68 580 348 ;
-C -1 ; WX 600 ; N threesuperior ; B 213 240 501 622 ;
-C -1 ; WX 600 ; N up ; B 223 0 503 437 ;
-C -1 ; WX 600 ; N multiply ; B 103 43 607 470 ;
-C -1 ; WX 600 ; N Scaron ; B 76 -20 673 805 ;
-C -1 ; WX 600 ; N tab ; B 19 0 641 562 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 125 -18 702 775 ;
-C -1 ; WX 600 ; N divide ; B 136 48 573 467 ;
-C -1 ; WX 600 ; N Acircumflex ; B 3 0 607 775 ;
-C -1 ; WX 600 ; N eacute ; B 106 -15 612 672 ;
-C -1 ; WX 600 ; N uacute ; B 101 -15 602 672 ;
-C -1 ; WX 600 ; N Aacute ; B 3 0 658 793 ;
-C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N twosuperior ; B 230 249 535 622 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 53 0 660 775 ;
-C -1 ; WX 600 ; N ntilde ; B 26 0 629 606 ;
-C -1 ; WX 600 ; N down ; B 187 -15 467 426 ;
-C -1 ; WX 600 ; N center ; B 103 14 623 580 ;
-C -1 ; WX 600 ; N onesuperior ; B 231 249 491 622 ;
-C -1 ; WX 600 ; N ij ; B 37 -157 630 657 ;
-C -1 ; WX 600 ; N edieresis ; B 106 -15 598 595 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ;
-C -1 ; WX 600 ; N odieresis ; B 102 -15 588 595 ;
-C -1 ; WX 600 ; N Ograve ; B 94 -18 625 793 ;
-C -1 ; WX 600 ; N threequarters ; B 73 -56 659 666 ;
-C -1 ; WX 600 ; N plusminus ; B 96 44 594 558 ;
-C -1 ; WX 600 ; N prescription ; B 27 -15 617 562 ;
-C -1 ; WX 600 ; N eth ; B 102 -15 639 629 ;
-C -1 ; WX 600 ; N largebullet ; B 315 220 395 297 ;
-C -1 ; WX 600 ; N egrave ; B 106 -15 598 672 ;
-C -1 ; WX 600 ; N ccedilla ; B 106 -151 614 441 ;
-C -1 ; WX 600 ; N notegraphic ; B 143 -15 564 572 ;
-C -1 ; WX 600 ; N Udieresis ; B 125 -18 702 731 ;
-C -1 ; WX 600 ; N Gcaron ; B 83 -18 645 805 ;
-C -1 ; WX 600 ; N arrowdown ; B 152 -15 520 608 ;
-C -1 ; WX 600 ; N format ; B -28 -157 185 607 ;
-C -1 ; WX 600 ; N Otilde ; B 94 -18 656 732 ;
-C -1 ; WX 600 ; N Idieresis ; B 96 0 623 731 ;
-C -1 ; WX 600 ; N adieresis ; B 76 -15 570 595 ;
-C -1 ; WX 600 ; N ecircumflex ; B 106 -15 598 654 ;
-C -1 ; WX 600 ; N Eth ; B 43 0 645 562 ;
-C -1 ; WX 600 ; N onequarter ; B 65 -57 674 665 ;
-C -1 ; WX 600 ; N LL ; B 8 0 647 562 ;
-C -1 ; WX 600 ; N agrave ; B 76 -15 569 672 ;
-C -1 ; WX 600 ; N Zcaron ; B 86 0 643 805 ;
-C -1 ; WX 600 ; N Scedilla ; B 76 -151 650 580 ;
-C -1 ; WX 600 ; N Idot ; B 96 0 623 716 ;
-C -1 ; WX 600 ; N Iacute ; B 96 0 638 793 ;
-C -1 ; WX 600 ; N indent ; B 108 68 574 348 ;
-C -1 ; WX 600 ; N Ugrave ; B 125 -18 702 793 ;
-C -1 ; WX 600 ; N scaron ; B 78 -15 614 669 ;
-C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ;
-C -1 ; WX 600 ; N Aring ; B 3 0 607 753 ;
-C -1 ; WX 600 ; N Ccedilla ; B 93 -151 658 580 ;
-C -1 ; WX 600 ; N Igrave ; B 96 0 623 793 ;
-C -1 ; WX 600 ; N brokenbar ; B 238 -175 469 675 ;
-C -1 ; WX 600 ; N Oacute ; B 94 -18 638 793 ;
-C -1 ; WX 600 ; N otilde ; B 102 -15 629 606 ;
-C -1 ; WX 600 ; N Yacute ; B 133 0 695 793 ;
-C -1 ; WX 600 ; N lira ; B 118 -21 621 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 96 0 623 775 ;
-C -1 ; WX 600 ; N Atilde ; B 3 0 656 732 ;
-C -1 ; WX 600 ; N Uacute ; B 125 -18 702 793 ;
-C -1 ; WX 600 ; N Ydieresis ; B 133 0 695 731 ;
-C -1 ; WX 600 ; N ydieresis ; B -4 -157 683 595 ;
-C -1 ; WX 600 ; N idieresis ; B 95 0 540 595 ;
-C -1 ; WX 600 ; N Adieresis ; B 3 0 607 731 ;
-C -1 ; WX 600 ; N mu ; B 72 -157 572 426 ;
-C -1 ; WX 600 ; N trademark ; B 75 263 742 562 ;
-C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ;
-C -1 ; WX 600 ; N acircumflex ; B 76 -15 581 654 ;
-C -1 ; WX 600 ; N Agrave ; B 3 0 607 793 ;
-C -1 ; WX 600 ; N return ; B 79 0 700 562 ;
-C -1 ; WX 600 ; N atilde ; B 76 -15 629 606 ;
-C -1 ; WX 600 ; N square ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ;
-C -1 ; WX 600 ; N stop ; B 19 0 700 562 ;
-C -1 ; WX 600 ; N udieresis ; B 101 -15 572 595 ;
-C -1 ; WX 600 ; N arrowup ; B 209 0 577 623 ;
-C -1 ; WX 600 ; N igrave ; B 95 0 515 672 ;
-C -1 ; WX 600 ; N Edieresis ; B 53 0 660 731 ;
-C -1 ; WX 600 ; N zcaron ; B 99 0 624 669 ;
-C -1 ; WX 600 ; N arrowboth ; B 36 115 692 483 ;
-C -1 ; WX 600 ; N gcaron ; B 61 -157 657 669 ;
-C -1 ; WX 600 ; N arrowleft ; B 40 115 693 483 ;
-C -1 ; WX 600 ; N aacute ; B 76 -15 612 672 ;
-C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ;
-C -1 ; WX 600 ; N scedilla ; B 78 -151 584 441 ;
-C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ;
-C -1 ; WX 600 ; N onehalf ; B 65 -57 669 665 ;
-C -1 ; WX 600 ; N ugrave ; B 101 -15 572 672 ;
-C -1 ; WX 600 ; N Ntilde ; B 7 -13 712 732 ;
-C -1 ; WX 600 ; N iacute ; B 95 0 612 672 ;
-C -1 ; WX 600 ; N arrowright ; B 34 115 688 483 ;
-C -1 ; WX 600 ; N Thorn ; B 79 0 606 562 ;
-C -1 ; WX 600 ; N Egrave ; B 53 0 660 793 ;
-C -1 ; WX 600 ; N thorn ; B -24 -157 605 629 ;
-C -1 ; WX 600 ; N aring ; B 76 -15 569 627 ;
-C -1 ; WX 600 ; N yacute ; B -4 -157 683 672 ;
-C -1 ; WX 600 ; N icircumflex ; B 95 0 551 654 ;
-EndCharMetrics
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 46 121 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 121 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -1 136 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -4 121 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 12 126 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 27 126 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 121 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 121 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 29 136 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 121 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 29 136 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 121 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 121 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 29 136 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 121 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 27 126 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 121 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 121 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 29 136 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 121 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 27 126 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 59 136 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 121 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 121 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 29 136 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 121 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 121 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 29 136 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 29 136 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Courier.afm b/blt3.0/library/AFM/Courier.afm
deleted file mode 100644
index e65ecdf..0000000
--- a/blt3.0/library/AFM/Courier.afm
+++ /dev/null
@@ -1,345 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Tue Sep 17 07:47:21 1991
-Comment UniqueID 36347
-Comment VMusage 31037 39405
-FontName Courier
-FullName Courier
-FamilyName Courier
-Weight Medium
-ItalicAngle 0
-IsFixedPitch true
-FontBBox -28 -250 628 805
-UnderlinePosition -100
-UnderlineThickness 50
-Version 002.004
-Notice Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 562
-XHeight 426
-Ascender 629
-Descender -157
-StartCharMetrics 260
-C 32 ; WX 600 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ;
-C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ;
-C 35 ; WX 600 ; N numbersign ; B 93 -32 507 639 ;
-C 36 ; WX 600 ; N dollar ; B 105 -126 496 662 ;
-C 37 ; WX 600 ; N percent ; B 81 -15 518 622 ;
-C 38 ; WX 600 ; N ampersand ; B 63 -15 538 543 ;
-C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ;
-C 40 ; WX 600 ; N parenleft ; B 269 -108 440 622 ;
-C 41 ; WX 600 ; N parenright ; B 160 -108 331 622 ;
-C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ;
-C 43 ; WX 600 ; N plus ; B 80 44 520 470 ;
-C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ;
-C 45 ; WX 600 ; N hyphen ; B 103 231 497 285 ;
-C 46 ; WX 600 ; N period ; B 229 -15 371 109 ;
-C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ;
-C 48 ; WX 600 ; N zero ; B 106 -15 494 622 ;
-C 49 ; WX 600 ; N one ; B 96 0 505 622 ;
-C 50 ; WX 600 ; N two ; B 70 0 471 622 ;
-C 51 ; WX 600 ; N three ; B 75 -15 466 622 ;
-C 52 ; WX 600 ; N four ; B 78 0 500 622 ;
-C 53 ; WX 600 ; N five ; B 92 -15 497 607 ;
-C 54 ; WX 600 ; N six ; B 111 -15 497 622 ;
-C 55 ; WX 600 ; N seven ; B 82 0 483 607 ;
-C 56 ; WX 600 ; N eight ; B 102 -15 498 622 ;
-C 57 ; WX 600 ; N nine ; B 96 -15 489 622 ;
-C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ;
-C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ;
-C 60 ; WX 600 ; N less ; B 41 42 519 472 ;
-C 61 ; WX 600 ; N equal ; B 80 138 520 376 ;
-C 62 ; WX 600 ; N greater ; B 66 42 544 472 ;
-C 63 ; WX 600 ; N question ; B 129 -15 492 572 ;
-C 64 ; WX 600 ; N at ; B 77 -15 533 622 ;
-C 65 ; WX 600 ; N A ; B 3 0 597 562 ;
-C 66 ; WX 600 ; N B ; B 43 0 559 562 ;
-C 67 ; WX 600 ; N C ; B 41 -18 540 580 ;
-C 68 ; WX 600 ; N D ; B 43 0 574 562 ;
-C 69 ; WX 600 ; N E ; B 53 0 550 562 ;
-C 70 ; WX 600 ; N F ; B 53 0 545 562 ;
-C 71 ; WX 600 ; N G ; B 31 -18 575 580 ;
-C 72 ; WX 600 ; N H ; B 32 0 568 562 ;
-C 73 ; WX 600 ; N I ; B 96 0 504 562 ;
-C 74 ; WX 600 ; N J ; B 34 -18 566 562 ;
-C 75 ; WX 600 ; N K ; B 38 0 582 562 ;
-C 76 ; WX 600 ; N L ; B 47 0 554 562 ;
-C 77 ; WX 600 ; N M ; B 4 0 596 562 ;
-C 78 ; WX 600 ; N N ; B 7 -13 593 562 ;
-C 79 ; WX 600 ; N O ; B 43 -18 557 580 ;
-C 80 ; WX 600 ; N P ; B 79 0 558 562 ;
-C 81 ; WX 600 ; N Q ; B 43 -138 557 580 ;
-C 82 ; WX 600 ; N R ; B 38 0 588 562 ;
-C 83 ; WX 600 ; N S ; B 72 -20 529 580 ;
-C 84 ; WX 600 ; N T ; B 38 0 563 562 ;
-C 85 ; WX 600 ; N U ; B 17 -18 583 562 ;
-C 86 ; WX 600 ; N V ; B -4 -13 604 562 ;
-C 87 ; WX 600 ; N W ; B -3 -13 603 562 ;
-C 88 ; WX 600 ; N X ; B 23 0 577 562 ;
-C 89 ; WX 600 ; N Y ; B 24 0 576 562 ;
-C 90 ; WX 600 ; N Z ; B 86 0 514 562 ;
-C 91 ; WX 600 ; N bracketleft ; B 269 -108 442 622 ;
-C 92 ; WX 600 ; N backslash ; B 118 -80 482 629 ;
-C 93 ; WX 600 ; N bracketright ; B 158 -108 331 622 ;
-C 94 ; WX 600 ; N asciicircum ; B 94 354 506 622 ;
-C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ;
-C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ;
-C 97 ; WX 600 ; N a ; B 53 -15 559 441 ;
-C 98 ; WX 600 ; N b ; B 14 -15 575 629 ;
-C 99 ; WX 600 ; N c ; B 66 -15 529 441 ;
-C 100 ; WX 600 ; N d ; B 45 -15 591 629 ;
-C 101 ; WX 600 ; N e ; B 66 -15 548 441 ;
-C 102 ; WX 600 ; N f ; B 114 0 531 629 ; L i fi ; L l fl ;
-C 103 ; WX 600 ; N g ; B 45 -157 566 441 ;
-C 104 ; WX 600 ; N h ; B 18 0 582 629 ;
-C 105 ; WX 600 ; N i ; B 95 0 505 657 ;
-C 106 ; WX 600 ; N j ; B 82 -157 410 657 ;
-C 107 ; WX 600 ; N k ; B 43 0 580 629 ;
-C 108 ; WX 600 ; N l ; B 95 0 505 629 ;
-C 109 ; WX 600 ; N m ; B -5 0 605 441 ;
-C 110 ; WX 600 ; N n ; B 26 0 575 441 ;
-C 111 ; WX 600 ; N o ; B 62 -15 538 441 ;
-C 112 ; WX 600 ; N p ; B 9 -157 555 441 ;
-C 113 ; WX 600 ; N q ; B 45 -157 591 441 ;
-C 114 ; WX 600 ; N r ; B 60 0 559 441 ;
-C 115 ; WX 600 ; N s ; B 80 -15 513 441 ;
-C 116 ; WX 600 ; N t ; B 87 -15 530 561 ;
-C 117 ; WX 600 ; N u ; B 21 -15 562 426 ;
-C 118 ; WX 600 ; N v ; B 10 -10 590 426 ;
-C 119 ; WX 600 ; N w ; B -4 -10 604 426 ;
-C 120 ; WX 600 ; N x ; B 20 0 580 426 ;
-C 121 ; WX 600 ; N y ; B 7 -157 592 426 ;
-C 122 ; WX 600 ; N z ; B 99 0 502 426 ;
-C 123 ; WX 600 ; N braceleft ; B 182 -108 437 622 ;
-C 124 ; WX 600 ; N bar ; B 275 -250 326 750 ;
-C 125 ; WX 600 ; N braceright ; B 163 -108 418 622 ;
-C 126 ; WX 600 ; N asciitilde ; B 63 197 540 320 ;
-C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ;
-C 162 ; WX 600 ; N cent ; B 96 -49 500 614 ;
-C 163 ; WX 600 ; N sterling ; B 84 -21 521 611 ;
-C 164 ; WX 600 ; N fraction ; B 92 -57 509 665 ;
-C 165 ; WX 600 ; N yen ; B 26 0 574 562 ;
-C 166 ; WX 600 ; N florin ; B 4 -143 539 622 ;
-C 167 ; WX 600 ; N section ; B 113 -78 488 580 ;
-C 168 ; WX 600 ; N currency ; B 73 58 527 506 ;
-C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ;
-C 170 ; WX 600 ; N quotedblleft ; B 143 328 471 562 ;
-C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ;
-C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ;
-C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ;
-C 174 ; WX 600 ; N fi ; B 3 0 597 629 ;
-C 175 ; WX 600 ; N fl ; B 3 0 597 629 ;
-C 177 ; WX 600 ; N endash ; B 75 231 525 285 ;
-C 178 ; WX 600 ; N dagger ; B 141 -78 459 580 ;
-C 179 ; WX 600 ; N daggerdbl ; B 141 -78 459 580 ;
-C 180 ; WX 600 ; N periodcentered ; B 222 189 378 327 ;
-C 182 ; WX 600 ; N paragraph ; B 50 -78 511 562 ;
-C 183 ; WX 600 ; N bullet ; B 172 130 428 383 ;
-C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ;
-C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ;
-C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ;
-C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ;
-C 188 ; WX 600 ; N ellipsis ; B 37 -15 563 111 ;
-C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ;
-C 191 ; WX 600 ; N questiondown ; B 108 -157 471 430 ;
-C 193 ; WX 600 ; N grave ; B 151 497 378 672 ;
-C 194 ; WX 600 ; N acute ; B 242 497 469 672 ;
-C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ;
-C 196 ; WX 600 ; N tilde ; B 105 489 503 606 ;
-C 197 ; WX 600 ; N macron ; B 120 525 480 565 ;
-C 198 ; WX 600 ; N breve ; B 153 501 447 609 ;
-C 199 ; WX 600 ; N dotaccent ; B 249 477 352 580 ;
-C 200 ; WX 600 ; N dieresis ; B 148 492 453 595 ;
-C 202 ; WX 600 ; N ring ; B 218 463 382 627 ;
-C 203 ; WX 600 ; N cedilla ; B 224 -151 362 10 ;
-C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ;
-C 206 ; WX 600 ; N ogonek ; B 227 -151 370 0 ;
-C 207 ; WX 600 ; N caron ; B 124 492 476 669 ;
-C 208 ; WX 600 ; N emdash ; B 0 231 600 285 ;
-C 225 ; WX 600 ; N AE ; B 3 0 550 562 ;
-C 227 ; WX 600 ; N ordfeminine ; B 156 249 442 580 ;
-C 232 ; WX 600 ; N Lslash ; B 47 0 554 562 ;
-C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ;
-C 234 ; WX 600 ; N OE ; B 7 0 567 562 ;
-C 235 ; WX 600 ; N ordmasculine ; B 157 249 443 580 ;
-C 241 ; WX 600 ; N ae ; B 19 -15 570 441 ;
-C 245 ; WX 600 ; N dotlessi ; B 95 0 505 426 ;
-C 248 ; WX 600 ; N lslash ; B 95 0 505 629 ;
-C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ;
-C 250 ; WX 600 ; N oe ; B 19 -15 559 441 ;
-C 251 ; WX 600 ; N germandbls ; B 48 -15 588 629 ;
-C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 731 ;
-C -1 ; WX 600 ; N logicalnot ; B 87 108 513 369 ;
-C -1 ; WX 600 ; N minus ; B 80 232 520 283 ;
-C -1 ; WX 600 ; N merge ; B 160 -15 440 436 ;
-C -1 ; WX 600 ; N degree ; B 123 269 477 622 ;
-C -1 ; WX 600 ; N dectab ; B 18 0 582 227 ;
-C -1 ; WX 600 ; N ll ; B 18 0 567 629 ;
-C -1 ; WX 600 ; N IJ ; B 32 -18 583 562 ;
-C -1 ; WX 600 ; N Eacute ; B 53 0 550 793 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 775 ;
-C -1 ; WX 600 ; N ucircumflex ; B 21 -15 562 654 ;
-C -1 ; WX 600 ; N left ; B 70 68 530 348 ;
-C -1 ; WX 600 ; N threesuperior ; B 155 240 406 622 ;
-C -1 ; WX 600 ; N up ; B 160 0 440 437 ;
-C -1 ; WX 600 ; N multiply ; B 87 43 515 470 ;
-C -1 ; WX 600 ; N Scaron ; B 72 -20 529 805 ;
-C -1 ; WX 600 ; N tab ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N Ucircumflex ; B 17 -18 583 775 ;
-C -1 ; WX 600 ; N divide ; B 87 48 513 467 ;
-C -1 ; WX 600 ; N Acircumflex ; B 3 0 597 775 ;
-C -1 ; WX 600 ; N eacute ; B 66 -15 548 672 ;
-C -1 ; WX 600 ; N uacute ; B 21 -15 562 672 ;
-C -1 ; WX 600 ; N Aacute ; B 3 0 597 793 ;
-C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N twosuperior ; B 177 249 424 622 ;
-C -1 ; WX 600 ; N Ecircumflex ; B 53 0 550 775 ;
-C -1 ; WX 600 ; N ntilde ; B 26 0 575 606 ;
-C -1 ; WX 600 ; N down ; B 160 -15 440 426 ;
-C -1 ; WX 600 ; N center ; B 40 14 560 580 ;
-C -1 ; WX 600 ; N onesuperior ; B 172 249 428 622 ;
-C -1 ; WX 600 ; N ij ; B 37 -157 490 657 ;
-C -1 ; WX 600 ; N edieresis ; B 66 -15 548 595 ;
-C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ;
-C -1 ; WX 600 ; N odieresis ; B 62 -15 538 595 ;
-C -1 ; WX 600 ; N Ograve ; B 43 -18 557 793 ;
-C -1 ; WX 600 ; N threequarters ; B 8 -56 593 666 ;
-C -1 ; WX 600 ; N plusminus ; B 87 44 513 558 ;
-C -1 ; WX 600 ; N prescription ; B 27 -15 577 562 ;
-C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ;
-C -1 ; WX 600 ; N largebullet ; B 261 220 339 297 ;
-C -1 ; WX 600 ; N egrave ; B 66 -15 548 672 ;
-C -1 ; WX 600 ; N ccedilla ; B 66 -151 529 441 ;
-C -1 ; WX 600 ; N notegraphic ; B 136 -15 464 572 ;
-C -1 ; WX 600 ; N Udieresis ; B 17 -18 583 731 ;
-C -1 ; WX 600 ; N Gcaron ; B 31 -18 575 805 ;
-C -1 ; WX 600 ; N arrowdown ; B 116 -15 484 608 ;
-C -1 ; WX 600 ; N format ; B 5 -157 56 607 ;
-C -1 ; WX 600 ; N Otilde ; B 43 -18 557 732 ;
-C -1 ; WX 600 ; N Idieresis ; B 96 0 504 731 ;
-C -1 ; WX 600 ; N adieresis ; B 53 -15 559 595 ;
-C -1 ; WX 600 ; N ecircumflex ; B 66 -15 548 654 ;
-C -1 ; WX 600 ; N Eth ; B 30 0 574 562 ;
-C -1 ; WX 600 ; N onequarter ; B 0 -57 600 665 ;
-C -1 ; WX 600 ; N LL ; B 8 0 592 562 ;
-C -1 ; WX 600 ; N agrave ; B 53 -15 559 672 ;
-C -1 ; WX 600 ; N Zcaron ; B 86 0 514 805 ;
-C -1 ; WX 600 ; N Scedilla ; B 72 -151 529 580 ;
-C -1 ; WX 600 ; N Idot ; B 96 0 504 716 ;
-C -1 ; WX 600 ; N Iacute ; B 96 0 504 793 ;
-C -1 ; WX 600 ; N indent ; B 70 68 530 348 ;
-C -1 ; WX 600 ; N Ugrave ; B 17 -18 583 793 ;
-C -1 ; WX 600 ; N scaron ; B 80 -15 513 669 ;
-C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ;
-C -1 ; WX 600 ; N Aring ; B 3 0 597 753 ;
-C -1 ; WX 600 ; N Ccedilla ; B 41 -151 540 580 ;
-C -1 ; WX 600 ; N Igrave ; B 96 0 504 793 ;
-C -1 ; WX 600 ; N brokenbar ; B 275 -175 326 675 ;
-C -1 ; WX 600 ; N Oacute ; B 43 -18 557 793 ;
-C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ;
-C -1 ; WX 600 ; N Yacute ; B 24 0 576 793 ;
-C -1 ; WX 600 ; N lira ; B 73 -21 521 611 ;
-C -1 ; WX 600 ; N Icircumflex ; B 96 0 504 775 ;
-C -1 ; WX 600 ; N Atilde ; B 3 0 597 732 ;
-C -1 ; WX 600 ; N Uacute ; B 17 -18 583 793 ;
-C -1 ; WX 600 ; N Ydieresis ; B 24 0 576 731 ;
-C -1 ; WX 600 ; N ydieresis ; B 7 -157 592 595 ;
-C -1 ; WX 600 ; N idieresis ; B 95 0 505 595 ;
-C -1 ; WX 600 ; N Adieresis ; B 3 0 597 731 ;
-C -1 ; WX 600 ; N mu ; B 21 -157 562 426 ;
-C -1 ; WX 600 ; N trademark ; B -23 263 623 562 ;
-C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ;
-C -1 ; WX 600 ; N acircumflex ; B 53 -15 559 654 ;
-C -1 ; WX 600 ; N Agrave ; B 3 0 597 793 ;
-C -1 ; WX 600 ; N return ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N atilde ; B 53 -15 559 606 ;
-C -1 ; WX 600 ; N square ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ;
-C -1 ; WX 600 ; N stop ; B 19 0 581 562 ;
-C -1 ; WX 600 ; N udieresis ; B 21 -15 562 595 ;
-C -1 ; WX 600 ; N arrowup ; B 116 0 484 623 ;
-C -1 ; WX 600 ; N igrave ; B 95 0 505 672 ;
-C -1 ; WX 600 ; N Edieresis ; B 53 0 550 731 ;
-C -1 ; WX 600 ; N zcaron ; B 99 0 502 669 ;
-C -1 ; WX 600 ; N arrowboth ; B -28 115 628 483 ;
-C -1 ; WX 600 ; N gcaron ; B 45 -157 566 669 ;
-C -1 ; WX 600 ; N arrowleft ; B -24 115 624 483 ;
-C -1 ; WX 600 ; N aacute ; B 53 -15 559 672 ;
-C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ;
-C -1 ; WX 600 ; N scedilla ; B 80 -151 513 441 ;
-C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ;
-C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ;
-C -1 ; WX 600 ; N ugrave ; B 21 -15 562 672 ;
-C -1 ; WX 600 ; N Ntilde ; B 7 -13 593 732 ;
-C -1 ; WX 600 ; N iacute ; B 95 0 505 672 ;
-C -1 ; WX 600 ; N arrowright ; B -24 115 624 483 ;
-C -1 ; WX 600 ; N Thorn ; B 79 0 538 562 ;
-C -1 ; WX 600 ; N Egrave ; B 53 0 550 793 ;
-C -1 ; WX 600 ; N thorn ; B -6 -157 555 629 ;
-C -1 ; WX 600 ; N aring ; B 53 -15 559 627 ;
-C -1 ; WX 600 ; N yacute ; B 7 -157 592 672 ;
-C -1 ; WX 600 ; N icircumflex ; B 94 0 505 654 ;
-EndCharMetrics
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 20 121 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 121 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -30 136 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave -30 121 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring -15 126 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 126 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 121 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 121 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 136 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 121 ;
-CC Gcaron 2 ; PCC G 0 0 ; PCC caron 0 136 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 121 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 121 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 136 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 121 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 126 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 121 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 121 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 136 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 121 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 126 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 30 136 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 121 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 121 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 136 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 121 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 121 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 136 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 136 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ;
-CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Bold.afm b/blt3.0/library/AFM/Helvetica-Bold.afm
deleted file mode 100644
index f428198..0000000
--- a/blt3.0/library/AFM/Helvetica-Bold.afm
+++ /dev/null
@@ -1,571 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 09:43:00 1990
-Comment UniqueID 28357
-Comment VMusage 26878 33770
-FontName Helvetica-Bold
-FullName Helvetica Bold
-FamilyName Helvetica
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -170 -228 1003 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ;
-C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ;
-C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ;
-C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ;
-C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ;
-C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ;
-C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ;
-C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ;
-C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ;
-C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ;
-C 43 ; WX 584 ; N plus ; B 40 0 544 506 ;
-C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ;
-C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ;
-C 46 ; WX 278 ; N period ; B 64 0 214 146 ;
-C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ;
-C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ;
-C 49 ; WX 556 ; N one ; B 69 0 378 710 ;
-C 50 ; WX 556 ; N two ; B 26 0 511 710 ;
-C 51 ; WX 556 ; N three ; B 27 -19 516 710 ;
-C 52 ; WX 556 ; N four ; B 27 0 526 710 ;
-C 53 ; WX 556 ; N five ; B 27 -19 516 698 ;
-C 54 ; WX 556 ; N six ; B 31 -19 520 710 ;
-C 55 ; WX 556 ; N seven ; B 25 0 528 698 ;
-C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ;
-C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ;
-C 58 ; WX 333 ; N colon ; B 92 0 242 512 ;
-C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ;
-C 60 ; WX 584 ; N less ; B 38 -8 546 514 ;
-C 61 ; WX 584 ; N equal ; B 40 87 544 419 ;
-C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ;
-C 63 ; WX 611 ; N question ; B 60 0 556 727 ;
-C 64 ; WX 975 ; N at ; B 118 -19 856 737 ;
-C 65 ; WX 722 ; N A ; B 20 0 702 718 ;
-C 66 ; WX 722 ; N B ; B 76 0 669 718 ;
-C 67 ; WX 722 ; N C ; B 44 -19 684 737 ;
-C 68 ; WX 722 ; N D ; B 76 0 685 718 ;
-C 69 ; WX 667 ; N E ; B 76 0 621 718 ;
-C 70 ; WX 611 ; N F ; B 76 0 587 718 ;
-C 71 ; WX 778 ; N G ; B 44 -19 713 737 ;
-C 72 ; WX 722 ; N H ; B 71 0 651 718 ;
-C 73 ; WX 278 ; N I ; B 64 0 214 718 ;
-C 74 ; WX 556 ; N J ; B 22 -18 484 718 ;
-C 75 ; WX 722 ; N K ; B 87 0 722 718 ;
-C 76 ; WX 611 ; N L ; B 76 0 583 718 ;
-C 77 ; WX 833 ; N M ; B 69 0 765 718 ;
-C 78 ; WX 722 ; N N ; B 69 0 654 718 ;
-C 79 ; WX 778 ; N O ; B 44 -19 734 737 ;
-C 80 ; WX 667 ; N P ; B 76 0 627 718 ;
-C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ;
-C 82 ; WX 722 ; N R ; B 76 0 677 718 ;
-C 83 ; WX 667 ; N S ; B 39 -19 629 737 ;
-C 84 ; WX 611 ; N T ; B 14 0 598 718 ;
-C 85 ; WX 722 ; N U ; B 72 -19 651 718 ;
-C 86 ; WX 667 ; N V ; B 19 0 648 718 ;
-C 87 ; WX 944 ; N W ; B 16 0 929 718 ;
-C 88 ; WX 667 ; N X ; B 14 0 653 718 ;
-C 89 ; WX 667 ; N Y ; B 15 0 653 718 ;
-C 90 ; WX 611 ; N Z ; B 25 0 586 718 ;
-C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ;
-C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ;
-C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ;
-C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ;
-C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ;
-C 97 ; WX 556 ; N a ; B 29 -14 527 546 ;
-C 98 ; WX 611 ; N b ; B 61 -14 578 718 ;
-C 99 ; WX 556 ; N c ; B 34 -14 524 546 ;
-C 100 ; WX 611 ; N d ; B 34 -14 551 718 ;
-C 101 ; WX 556 ; N e ; B 23 -14 528 546 ;
-C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B 40 -217 553 546 ;
-C 104 ; WX 611 ; N h ; B 65 0 546 718 ;
-C 105 ; WX 278 ; N i ; B 69 0 209 725 ;
-C 106 ; WX 278 ; N j ; B 3 -214 209 725 ;
-C 107 ; WX 556 ; N k ; B 69 0 562 718 ;
-C 108 ; WX 278 ; N l ; B 69 0 209 718 ;
-C 109 ; WX 889 ; N m ; B 64 0 826 546 ;
-C 110 ; WX 611 ; N n ; B 65 0 546 546 ;
-C 111 ; WX 611 ; N o ; B 34 -14 578 546 ;
-C 112 ; WX 611 ; N p ; B 62 -207 578 546 ;
-C 113 ; WX 611 ; N q ; B 34 -207 552 546 ;
-C 114 ; WX 389 ; N r ; B 64 0 373 546 ;
-C 115 ; WX 556 ; N s ; B 30 -14 519 546 ;
-C 116 ; WX 333 ; N t ; B 10 -6 309 676 ;
-C 117 ; WX 611 ; N u ; B 66 -14 545 532 ;
-C 118 ; WX 556 ; N v ; B 13 0 543 532 ;
-C 119 ; WX 778 ; N w ; B 10 0 769 532 ;
-C 120 ; WX 556 ; N x ; B 15 0 541 532 ;
-C 121 ; WX 556 ; N y ; B 10 -214 539 532 ;
-C 122 ; WX 500 ; N z ; B 20 0 480 532 ;
-C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ;
-C 124 ; WX 280 ; N bar ; B 84 -19 196 737 ;
-C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ;
-C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ;
-C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ;
-C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ;
-C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ;
-C 165 ; WX 556 ; N yen ; B -9 0 565 698 ;
-C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ;
-C 167 ; WX 556 ; N section ; B 34 -184 522 727 ;
-C 168 ; WX 556 ; N currency ; B -3 76 559 636 ;
-C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ;
-C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ;
-C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ;
-C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ;
-C 174 ; WX 611 ; N fi ; B 10 0 542 727 ;
-C 175 ; WX 611 ; N fl ; B 10 0 542 727 ;
-C 177 ; WX 556 ; N endash ; B 0 227 556 333 ;
-C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ;
-C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ;
-C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ;
-C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ;
-C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ;
-C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ;
-C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ;
-C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ;
-C 193 ; WX 333 ; N grave ; B -23 604 225 750 ;
-C 194 ; WX 333 ; N acute ; B 108 604 356 750 ;
-C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ;
-C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ;
-C 197 ; WX 333 ; N macron ; B -6 604 339 678 ;
-C 198 ; WX 333 ; N breve ; B -2 604 335 750 ;
-C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ;
-C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ;
-C 202 ; WX 333 ; N ring ; B 59 568 275 776 ;
-C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ;
-C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ;
-C 207 ; WX 333 ; N caron ; B -10 604 343 750 ;
-C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ;
-C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 22 276 347 737 ;
-C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ;
-C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ;
-C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 6 276 360 737 ;
-C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ;
-C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ;
-C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ;
-C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ;
-C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ;
-C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ;
-C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ;
-C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ;
-C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ;
-C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ;
-C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ;
-C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ;
-C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ;
-C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ;
-C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ;
-C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ;
-C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ;
-C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ;
-C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ;
-C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ;
-C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ;
-C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ;
-C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ;
-C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ;
-C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ;
-C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ;
-C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ;
-C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ;
-C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ;
-C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ;
-C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ;
-C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ;
-C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ;
-C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ;
-C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ;
-C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ;
-C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ;
-C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ;
-C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ;
-C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ;
-C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ;
-C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ;
-C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ;
-C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ;
-C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ;
-C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ;
-C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ;
-C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ;
-C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ;
-C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ;
-C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ;
-C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ;
-C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ;
-C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ;
-C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ;
-C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ;
-C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ;
-C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ;
-C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ;
-C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ;
-C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ;
-C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ;
-C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ;
-C -1 ; WX 584 ; N minus ; B 40 197 544 309 ;
-C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ;
-C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ;
-C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ;
-C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ;
-C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ;
-C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ;
-C -1 ; WX 400 ; N degree ; B 57 426 343 712 ;
-C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ;
-C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ;
-C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ;
-C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ;
-C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ;
-C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ;
-C -1 ; WX 280 ; N brokenbar ; B 84 -19 196 737 ;
-C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -30
-KPX A w -30
-KPX A v -40
-KPX A u -30
-KPX A Y -110
-KPX A W -60
-KPX A V -80
-KPX A U -50
-KPX A T -90
-KPX A Q -40
-KPX A O -40
-KPX A G -50
-KPX A C -40
-
-KPX B U -10
-KPX B A -30
-
-KPX D period -30
-KPX D comma -30
-KPX D Y -70
-KPX D W -40
-KPX D V -40
-KPX D A -40
-
-KPX F period -100
-KPX F comma -100
-KPX F a -20
-KPX F A -80
-
-KPX J u -20
-KPX J period -20
-KPX J comma -20
-KPX J A -20
-
-KPX K y -40
-KPX K u -30
-KPX K o -35
-KPX K e -15
-KPX K O -30
-
-KPX L y -30
-KPX L quoteright -140
-KPX L quotedblright -140
-KPX L Y -120
-KPX L W -80
-KPX L V -110
-KPX L T -90
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -50
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -50
-
-KPX P period -120
-KPX P o -40
-KPX P e -30
-KPX P comma -120
-KPX P a -30
-KPX P A -100
-
-KPX Q period 20
-KPX Q comma 20
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -40
-KPX R V -50
-KPX R U -20
-KPX R T -20
-KPX R O -20
-
-KPX T y -60
-KPX T w -60
-KPX T u -90
-KPX T semicolon -40
-KPX T r -80
-KPX T period -80
-KPX T o -80
-KPX T hyphen -120
-KPX T e -60
-KPX T comma -80
-KPX T colon -40
-KPX T a -80
-KPX T O -40
-KPX T A -90
-
-KPX U period -30
-KPX U comma -30
-KPX U A -50
-
-KPX V u -60
-KPX V semicolon -40
-KPX V period -120
-KPX V o -90
-KPX V hyphen -80
-KPX V e -50
-KPX V comma -120
-KPX V colon -40
-KPX V a -60
-KPX V O -50
-KPX V G -50
-KPX V A -80
-
-KPX W y -20
-KPX W u -45
-KPX W semicolon -10
-KPX W period -80
-KPX W o -60
-KPX W hyphen -40
-KPX W e -35
-KPX W comma -80
-KPX W colon -10
-KPX W a -40
-KPX W O -20
-KPX W A -60
-
-KPX Y u -100
-KPX Y semicolon -50
-KPX Y period -100
-KPX Y o -100
-KPX Y e -80
-KPX Y comma -100
-KPX Y colon -50
-KPX Y a -90
-KPX Y O -70
-KPX Y A -110
-
-KPX a y -20
-KPX a w -15
-KPX a v -15
-KPX a g -10
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b l -10
-
-KPX c y -10
-KPX c l -20
-KPX c k -20
-KPX c h -10
-
-KPX colon space -40
-
-KPX comma space -40
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX d y -15
-KPX d w -15
-KPX d v -15
-KPX d d -10
-
-KPX e y -15
-KPX e x -15
-KPX e w -15
-KPX e v -15
-KPX e period 20
-KPX e comma 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -10
-KPX f o -20
-KPX f e -10
-KPX f comma -10
-
-KPX g g -10
-KPX g e 10
-
-KPX h y -20
-
-KPX k o -15
-
-KPX l y -15
-KPX l w -15
-
-KPX m y -30
-KPX m u -20
-
-KPX n y -20
-KPX n v -40
-KPX n u -10
-
-KPX o y -20
-KPX o x -30
-KPX o w -15
-KPX o v -20
-
-KPX p y -15
-
-KPX period space -40
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblright space -80
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright v -20
-KPX quoteright space -80
-KPX quoteright s -60
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright l -20
-KPX quoteright d -80
-
-KPX r y 10
-KPX r v 10
-KPX r t 20
-KPX r s -15
-KPX r q -20
-KPX r period -60
-KPX r o -20
-KPX r hyphen -20
-KPX r g -15
-KPX r d -20
-KPX r comma -60
-KPX r c -20
-
-KPX s w -15
-
-KPX semicolon space -40
-
-KPX space quoteleft -60
-KPX space quotedblleft -80
-KPX space Y -120
-KPX space W -80
-KPX space V -80
-KPX space T -100
-
-KPX v period -80
-KPX v o -30
-KPX v comma -80
-KPX v a -20
-
-KPX w period -40
-KPX w o -20
-KPX w comma -40
-
-KPX x e -10
-
-KPX y period -80
-KPX y o -25
-KPX y e -10
-KPX y comma -80
-KPX y a -30
-
-KPX z e 10
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 195 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-BoldOblique.afm b/blt3.0/library/AFM/Helvetica-BoldOblique.afm
deleted file mode 100644
index 0df5aaf..0000000
--- a/blt3.0/library/AFM/Helvetica-BoldOblique.afm
+++ /dev/null
@@ -1,571 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 10:44:33 1990
-Comment UniqueID 28371
-Comment VMusage 7614 43068
-FontName Helvetica-BoldOblique
-FullName Helvetica Bold Oblique
-FamilyName Helvetica
-Weight Bold
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -174 -228 1114 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ;
-C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ;
-C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ;
-C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ;
-C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ;
-C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ;
-C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ;
-C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ;
-C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ;
-C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ;
-C 43 ; WX 584 ; N plus ; B 82 0 610 506 ;
-C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ;
-C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ;
-C 46 ; WX 278 ; N period ; B 64 0 245 146 ;
-C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ;
-C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ;
-C 49 ; WX 556 ; N one ; B 173 0 529 710 ;
-C 50 ; WX 556 ; N two ; B 26 0 619 710 ;
-C 51 ; WX 556 ; N three ; B 65 -19 608 710 ;
-C 52 ; WX 556 ; N four ; B 60 0 598 710 ;
-C 53 ; WX 556 ; N five ; B 64 -19 636 698 ;
-C 54 ; WX 556 ; N six ; B 85 -19 619 710 ;
-C 55 ; WX 556 ; N seven ; B 125 0 676 698 ;
-C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ;
-C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ;
-C 58 ; WX 333 ; N colon ; B 92 0 351 512 ;
-C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ;
-C 60 ; WX 584 ; N less ; B 82 -8 655 514 ;
-C 61 ; WX 584 ; N equal ; B 58 87 633 419 ;
-C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ;
-C 63 ; WX 611 ; N question ; B 165 0 671 727 ;
-C 64 ; WX 975 ; N at ; B 186 -19 954 737 ;
-C 65 ; WX 722 ; N A ; B 20 0 702 718 ;
-C 66 ; WX 722 ; N B ; B 76 0 764 718 ;
-C 67 ; WX 722 ; N C ; B 107 -19 789 737 ;
-C 68 ; WX 722 ; N D ; B 76 0 777 718 ;
-C 69 ; WX 667 ; N E ; B 76 0 757 718 ;
-C 70 ; WX 611 ; N F ; B 76 0 740 718 ;
-C 71 ; WX 778 ; N G ; B 108 -19 817 737 ;
-C 72 ; WX 722 ; N H ; B 71 0 804 718 ;
-C 73 ; WX 278 ; N I ; B 64 0 367 718 ;
-C 74 ; WX 556 ; N J ; B 60 -18 637 718 ;
-C 75 ; WX 722 ; N K ; B 87 0 858 718 ;
-C 76 ; WX 611 ; N L ; B 76 0 611 718 ;
-C 77 ; WX 833 ; N M ; B 69 0 918 718 ;
-C 78 ; WX 722 ; N N ; B 69 0 807 718 ;
-C 79 ; WX 778 ; N O ; B 107 -19 823 737 ;
-C 80 ; WX 667 ; N P ; B 76 0 738 718 ;
-C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ;
-C 82 ; WX 722 ; N R ; B 76 0 778 718 ;
-C 83 ; WX 667 ; N S ; B 81 -19 718 737 ;
-C 84 ; WX 611 ; N T ; B 140 0 751 718 ;
-C 85 ; WX 722 ; N U ; B 116 -19 804 718 ;
-C 86 ; WX 667 ; N V ; B 172 0 801 718 ;
-C 87 ; WX 944 ; N W ; B 169 0 1082 718 ;
-C 88 ; WX 667 ; N X ; B 14 0 791 718 ;
-C 89 ; WX 667 ; N Y ; B 168 0 806 718 ;
-C 90 ; WX 611 ; N Z ; B 25 0 737 718 ;
-C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ;
-C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ;
-C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ;
-C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ;
-C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ;
-C 97 ; WX 556 ; N a ; B 55 -14 583 546 ;
-C 98 ; WX 611 ; N b ; B 61 -14 645 718 ;
-C 99 ; WX 556 ; N c ; B 79 -14 599 546 ;
-C 100 ; WX 611 ; N d ; B 82 -14 704 718 ;
-C 101 ; WX 556 ; N e ; B 70 -14 593 546 ;
-C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B 38 -217 666 546 ;
-C 104 ; WX 611 ; N h ; B 65 0 629 718 ;
-C 105 ; WX 278 ; N i ; B 69 0 363 725 ;
-C 106 ; WX 278 ; N j ; B -42 -214 363 725 ;
-C 107 ; WX 556 ; N k ; B 69 0 670 718 ;
-C 108 ; WX 278 ; N l ; B 69 0 362 718 ;
-C 109 ; WX 889 ; N m ; B 64 0 909 546 ;
-C 110 ; WX 611 ; N n ; B 65 0 629 546 ;
-C 111 ; WX 611 ; N o ; B 82 -14 643 546 ;
-C 112 ; WX 611 ; N p ; B 18 -207 645 546 ;
-C 113 ; WX 611 ; N q ; B 80 -207 665 546 ;
-C 114 ; WX 389 ; N r ; B 64 0 489 546 ;
-C 115 ; WX 556 ; N s ; B 63 -14 584 546 ;
-C 116 ; WX 333 ; N t ; B 100 -6 422 676 ;
-C 117 ; WX 611 ; N u ; B 98 -14 658 532 ;
-C 118 ; WX 556 ; N v ; B 126 0 656 532 ;
-C 119 ; WX 778 ; N w ; B 123 0 882 532 ;
-C 120 ; WX 556 ; N x ; B 15 0 648 532 ;
-C 121 ; WX 556 ; N y ; B 42 -214 652 532 ;
-C 122 ; WX 500 ; N z ; B 20 0 583 532 ;
-C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ;
-C 124 ; WX 280 ; N bar ; B 80 -19 353 737 ;
-C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ;
-C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ;
-C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ;
-C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ;
-C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ;
-C 165 ; WX 556 ; N yen ; B 60 0 713 698 ;
-C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ;
-C 167 ; WX 556 ; N section ; B 61 -184 598 727 ;
-C 168 ; WX 556 ; N currency ; B 27 76 680 636 ;
-C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ;
-C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ;
-C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ;
-C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ;
-C 174 ; WX 611 ; N fi ; B 87 0 696 727 ;
-C 175 ; WX 611 ; N fl ; B 87 0 695 727 ;
-C 177 ; WX 556 ; N endash ; B 48 227 627 333 ;
-C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ;
-C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ;
-C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ;
-C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ;
-C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ;
-C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ;
-C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ;
-C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ;
-C 193 ; WX 333 ; N grave ; B 136 604 353 750 ;
-C 194 ; WX 333 ; N acute ; B 236 604 515 750 ;
-C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ;
-C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ;
-C 197 ; WX 333 ; N macron ; B 122 604 483 678 ;
-C 198 ; WX 333 ; N breve ; B 156 604 494 750 ;
-C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ;
-C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ;
-C 202 ; WX 333 ; N ring ; B 200 568 420 776 ;
-C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ;
-C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ;
-C 207 ; WX 333 ; N caron ; B 149 604 502 750 ;
-C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ;
-C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 92 276 465 737 ;
-C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ;
-C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ;
-C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 92 276 485 737 ;
-C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ;
-C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ;
-C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ;
-C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ;
-C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ;
-C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ;
-C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ;
-C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ;
-C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ;
-C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ;
-C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ;
-C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ;
-C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ;
-C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ;
-C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ;
-C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ;
-C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ;
-C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ;
-C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ;
-C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ;
-C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ;
-C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ;
-C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ;
-C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ;
-C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ;
-C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ;
-C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ;
-C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ;
-C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ;
-C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ;
-C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ;
-C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ;
-C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ;
-C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ;
-C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ;
-C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ;
-C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ;
-C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ;
-C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ;
-C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ;
-C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ;
-C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ;
-C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ;
-C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ;
-C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ;
-C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ;
-C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ;
-C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ;
-C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ;
-C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ;
-C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ;
-C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ;
-C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ;
-C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ;
-C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ;
-C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ;
-C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ;
-C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ;
-C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ;
-C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ;
-C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ;
-C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ;
-C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ;
-C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ;
-C -1 ; WX 584 ; N minus ; B 82 197 610 309 ;
-C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ;
-C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ;
-C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ;
-C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ;
-C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ;
-C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ;
-C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ;
-C -1 ; WX 400 ; N degree ; B 175 426 467 712 ;
-C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ;
-C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ;
-C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ;
-C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ;
-C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ;
-C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ;
-C -1 ; WX 280 ; N brokenbar ; B 80 -19 353 737 ;
-C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -30
-KPX A w -30
-KPX A v -40
-KPX A u -30
-KPX A Y -110
-KPX A W -60
-KPX A V -80
-KPX A U -50
-KPX A T -90
-KPX A Q -40
-KPX A O -40
-KPX A G -50
-KPX A C -40
-
-KPX B U -10
-KPX B A -30
-
-KPX D period -30
-KPX D comma -30
-KPX D Y -70
-KPX D W -40
-KPX D V -40
-KPX D A -40
-
-KPX F period -100
-KPX F comma -100
-KPX F a -20
-KPX F A -80
-
-KPX J u -20
-KPX J period -20
-KPX J comma -20
-KPX J A -20
-
-KPX K y -40
-KPX K u -30
-KPX K o -35
-KPX K e -15
-KPX K O -30
-
-KPX L y -30
-KPX L quoteright -140
-KPX L quotedblright -140
-KPX L Y -120
-KPX L W -80
-KPX L V -110
-KPX L T -90
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -50
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -50
-
-KPX P period -120
-KPX P o -40
-KPX P e -30
-KPX P comma -120
-KPX P a -30
-KPX P A -100
-
-KPX Q period 20
-KPX Q comma 20
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -40
-KPX R V -50
-KPX R U -20
-KPX R T -20
-KPX R O -20
-
-KPX T y -60
-KPX T w -60
-KPX T u -90
-KPX T semicolon -40
-KPX T r -80
-KPX T period -80
-KPX T o -80
-KPX T hyphen -120
-KPX T e -60
-KPX T comma -80
-KPX T colon -40
-KPX T a -80
-KPX T O -40
-KPX T A -90
-
-KPX U period -30
-KPX U comma -30
-KPX U A -50
-
-KPX V u -60
-KPX V semicolon -40
-KPX V period -120
-KPX V o -90
-KPX V hyphen -80
-KPX V e -50
-KPX V comma -120
-KPX V colon -40
-KPX V a -60
-KPX V O -50
-KPX V G -50
-KPX V A -80
-
-KPX W y -20
-KPX W u -45
-KPX W semicolon -10
-KPX W period -80
-KPX W o -60
-KPX W hyphen -40
-KPX W e -35
-KPX W comma -80
-KPX W colon -10
-KPX W a -40
-KPX W O -20
-KPX W A -60
-
-KPX Y u -100
-KPX Y semicolon -50
-KPX Y period -100
-KPX Y o -100
-KPX Y e -80
-KPX Y comma -100
-KPX Y colon -50
-KPX Y a -90
-KPX Y O -70
-KPX Y A -110
-
-KPX a y -20
-KPX a w -15
-KPX a v -15
-KPX a g -10
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b l -10
-
-KPX c y -10
-KPX c l -20
-KPX c k -20
-KPX c h -10
-
-KPX colon space -40
-
-KPX comma space -40
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX d y -15
-KPX d w -15
-KPX d v -15
-KPX d d -10
-
-KPX e y -15
-KPX e x -15
-KPX e w -15
-KPX e v -15
-KPX e period 20
-KPX e comma 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -10
-KPX f o -20
-KPX f e -10
-KPX f comma -10
-
-KPX g g -10
-KPX g e 10
-
-KPX h y -20
-
-KPX k o -15
-
-KPX l y -15
-KPX l w -15
-
-KPX m y -30
-KPX m u -20
-
-KPX n y -20
-KPX n v -40
-KPX n u -10
-
-KPX o y -20
-KPX o x -30
-KPX o w -15
-KPX o v -20
-
-KPX p y -15
-
-KPX period space -40
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblright space -80
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright v -20
-KPX quoteright space -80
-KPX quoteright s -60
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright l -20
-KPX quoteright d -80
-
-KPX r y 10
-KPX r v 10
-KPX r t 20
-KPX r s -15
-KPX r q -20
-KPX r period -60
-KPX r o -20
-KPX r hyphen -20
-KPX r g -15
-KPX r d -20
-KPX r comma -60
-KPX r c -20
-
-KPX s w -15
-
-KPX semicolon space -40
-
-KPX space quoteleft -60
-KPX space quotedblleft -80
-KPX space Y -120
-KPX space W -80
-KPX space V -80
-KPX space T -100
-
-KPX v period -80
-KPX v o -30
-KPX v comma -80
-KPX v a -20
-
-KPX w period -40
-KPX w o -20
-KPX w comma -40
-
-KPX x e -10
-
-KPX y period -80
-KPX y o -25
-KPX y e -10
-KPX y comma -80
-KPX y a -30
-
-KPX z e 10
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 235 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 235 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 235 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 235 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 235 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 235 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 207 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 207 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 207 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 207 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 13 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 13 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 13 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 13 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 235 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 263 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 263 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 263 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 263 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 263 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 207 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 235 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 235 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 235 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 207 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 207 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Condensed-Bold.afm b/blt3.0/library/AFM/Helvetica-Condensed-Bold.afm
deleted file mode 100644
index 4f0c660..0000000
--- a/blt3.0/library/AFM/Helvetica-Condensed-Bold.afm
+++ /dev/null
@@ -1,419 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Wed Sep  4 17:42:59 1991
-Comment UniqueID 36188
-Comment VMusage 27402 34294
-FontName Helvetica-Condensed-Bold
-FullName Helvetica Condensed Bold
-FamilyName Helvetica
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -169 -250 1091 991
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 750
-XHeight 564
-Ascender 750
-Descender -189
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 101 0 232 750 ;
-C 34 ; WX 333 ; N quotedbl ; B 16 468 318 739 ;
-C 35 ; WX 500 ; N numbersign ; B 31 0 469 738 ;
-C 36 ; WX 500 ; N dollar ; B 35 -124 466 803 ;
-C 37 ; WX 833 ; N percent ; B 31 -15 803 750 ;
-C 38 ; WX 667 ; N ampersand ; B 63 -18 615 768 ;
-C 39 ; WX 278 ; N quoteright ; B 81 479 202 750 ;
-C 40 ; WX 333 ; N parenleft ; B 52 -198 281 768 ;
-C 41 ; WX 333 ; N parenright ; B 52 -198 281 768 ;
-C 42 ; WX 500 ; N asterisk ; B 79 412 422 738 ;
-C 43 ; WX 500 ; N plus ; B 26 0 475 492 ;
-C 44 ; WX 333 ; N comma ; B 101 -145 233 132 ;
-C 45 ; WX 333 ; N hyphen ; B 48 255 286 370 ;
-C 46 ; WX 333 ; N period ; B 101 0 233 132 ;
-C 47 ; WX 278 ; N slash ; B -11 -94 312 750 ;
-C 48 ; WX 500 ; N zero ; B 48 -15 453 753 ;
-C 49 ; WX 500 ; N one ; B 44 0 353 750 ;
-C 50 ; WX 500 ; N two ; B 32 0 453 753 ;
-C 51 ; WX 500 ; N three ; B 28 -15 453 753 ;
-C 52 ; WX 500 ; N four ; B 23 0 470 738 ;
-C 53 ; WX 500 ; N five ; B 37 -15 458 738 ;
-C 54 ; WX 500 ; N six ; B 42 -15 459 753 ;
-C 55 ; WX 500 ; N seven ; B 32 0 454 738 ;
-C 56 ; WX 500 ; N eight ; B 41 -15 460 753 ;
-C 57 ; WX 500 ; N nine ; B 42 -15 459 753 ;
-C 58 ; WX 278 ; N colon ; B 73 0 205 556 ;
-C 59 ; WX 278 ; N semicolon ; B 73 -145 205 556 ;
-C 60 ; WX 500 ; N less ; B 42 -24 459 527 ;
-C 61 ; WX 500 ; N equal ; B 26 96 475 401 ;
-C 62 ; WX 500 ; N greater ; B 42 -24 459 527 ;
-C 63 ; WX 500 ; N question ; B 51 0 440 768 ;
-C 64 ; WX 833 ; N at ; B 38 -18 795 768 ;
-C 65 ; WX 556 ; N A ; B 9 0 547 750 ;
-C 66 ; WX 556 ; N B ; B 65 0 506 750 ;
-C 67 ; WX 556 ; N C ; B 55 -18 512 768 ;
-C 68 ; WX 611 ; N D ; B 72 0 550 750 ;
-C 69 ; WX 500 ; N E ; B 64 0 458 750 ;
-C 70 ; WX 500 ; N F ; B 73 0 470 750 ;
-C 71 ; WX 611 ; N G ; B 55 -18 542 768 ;
-C 72 ; WX 611 ; N H ; B 68 0 544 750 ;
-C 73 ; WX 278 ; N I ; B 69 0 209 750 ;
-C 74 ; WX 444 ; N J ; B 7 -18 384 750 ;
-C 75 ; WX 556 ; N K ; B 68 0 547 750 ;
-C 76 ; WX 500 ; N L ; B 68 0 468 750 ;
-C 77 ; WX 778 ; N M ; B 67 0 712 750 ;
-C 78 ; WX 611 ; N N ; B 68 0 543 750 ;
-C 79 ; WX 611 ; N O ; B 61 -18 551 768 ;
-C 80 ; WX 556 ; N P ; B 68 0 529 750 ;
-C 81 ; WX 611 ; N Q ; B 61 -71 587 768 ;
-C 82 ; WX 611 ; N R ; B 66 0 567 750 ;
-C 83 ; WX 556 ; N S ; B 49 -18 508 768 ;
-C 84 ; WX 500 ; N T ; B 17 0 484 750 ;
-C 85 ; WX 611 ; N U ; B 68 -18 544 750 ;
-C 86 ; WX 556 ; N V ; B 21 0 536 750 ;
-C 87 ; WX 833 ; N W ; B 24 0 810 750 ;
-C 88 ; WX 556 ; N X ; B 11 0 545 750 ;
-C 89 ; WX 556 ; N Y ; B 12 0 545 750 ;
-C 90 ; WX 500 ; N Z ; B 33 0 468 750 ;
-C 91 ; WX 333 ; N bracketleft ; B 81 -94 280 750 ;
-C 92 ; WX 250 ; N backslash ; B -89 0 340 750 ;
-C 93 ; WX 333 ; N bracketright ; B 53 -94 252 750 ;
-C 94 ; WX 500 ; N asciicircum ; B 10 326 490 750 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 76 495 197 766 ;
-C 97 ; WX 500 ; N a ; B 42 -15 440 579 ;
-C 98 ; WX 500 ; N b ; B 64 -15 444 750 ;
-C 99 ; WX 444 ; N c ; B 49 -15 403 579 ;
-C 100 ; WX 500 ; N d ; B 53 -15 433 750 ;
-C 101 ; WX 500 ; N e ; B 53 -15 443 579 ;
-C 102 ; WX 278 ; N f ; B 21 0 257 750 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 53 -190 433 579 ;
-C 104 ; WX 500 ; N h ; B 61 0 440 750 ;
-C 105 ; WX 278 ; N i ; B 74 0 204 750 ;
-C 106 ; WX 278 ; N j ; B 31 -192 210 750 ;
-C 107 ; WX 444 ; N k ; B 48 0 443 750 ;
-C 108 ; WX 278 ; N l ; B 74 0 204 750 ;
-C 109 ; WX 778 ; N m ; B 66 0 712 579 ;
-C 110 ; WX 500 ; N n ; B 61 0 440 579 ;
-C 111 ; WX 500 ; N o ; B 53 -15 447 579 ;
-C 112 ; WX 500 ; N p ; B 58 -189 438 579 ;
-C 113 ; WX 500 ; N q ; B 50 -188 430 579 ;
-C 114 ; WX 333 ; N r ; B 60 0 319 574 ;
-C 115 ; WX 444 ; N s ; B 28 -15 407 579 ;
-C 116 ; WX 278 ; N t ; B 14 -7 252 719 ;
-C 117 ; WX 500 ; N u ; B 58 -15 431 564 ;
-C 118 ; WX 444 ; N v ; B 10 0 434 564 ;
-C 119 ; WX 667 ; N w ; B 11 0 645 564 ;
-C 120 ; WX 444 ; N x ; B 8 0 436 564 ;
-C 121 ; WX 444 ; N y ; B 5 -195 429 564 ;
-C 122 ; WX 389 ; N z ; B 23 0 367 564 ;
-C 123 ; WX 274 ; N braceleft ; B -32 -92 240 750 ;
-C 124 ; WX 250 ; N bar ; B 75 -250 175 750 ;
-C 125 ; WX 274 ; N braceright ; B 34 -94 306 750 ;
-C 126 ; WX 500 ; N asciitilde ; B 26 153 475 359 ;
-C 161 ; WX 333 ; N exclamdown ; B 102 -170 232 579 ;
-C 162 ; WX 500 ; N cent ; B 72 -122 428 671 ;
-C 163 ; WX 500 ; N sterling ; B 35 -15 487 768 ;
-C 164 ; WX 167 ; N fraction ; B -169 0 331 738 ;
-C 165 ; WX 500 ; N yen ; B -18 0 518 750 ;
-C 166 ; WX 500 ; N florin ; B 9 -185 492 763 ;
-C 167 ; WX 500 ; N section ; B 37 -183 463 768 ;
-C 168 ; WX 500 ; N currency ; B 9 58 492 560 ;
-C 169 ; WX 250 ; N quotesingle ; B 66 468 185 739 ;
-C 170 ; WX 500 ; N quotedblleft ; B 87 495 405 766 ;
-C 171 ; WX 500 ; N guillemotleft ; B 74 62 419 447 ;
-C 172 ; WX 278 ; N guilsinglleft ; B 58 62 215 447 ;
-C 173 ; WX 278 ; N guilsinglright ; B 63 62 220 447 ;
-C 174 ; WX 500 ; N fi ; B 10 0 446 750 ;
-C 175 ; WX 500 ; N fl ; B 10 0 443 750 ;
-C 177 ; WX 500 ; N endash ; B 0 259 500 369 ;
-C 178 ; WX 500 ; N dagger ; B 37 -155 463 768 ;
-C 179 ; WX 500 ; N daggerdbl ; B 35 -161 466 768 ;
-C 180 ; WX 333 ; N periodcentered ; B 101 183 233 315 ;
-C 182 ; WX 550 ; N paragraph ; B 23 -116 526 750 ;
-C 183 ; WX 420 ; N bullet ; B 22 186 398 562 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 87 -138 207 132 ;
-C 185 ; WX 500 ; N quotedblbase ; B 96 -138 413 132 ;
-C 186 ; WX 500 ; N quotedblright ; B 95 479 413 750 ;
-C 187 ; WX 500 ; N guillemotright ; B 81 62 426 447 ;
-C 188 ; WX 1000 ; N ellipsis ; B 101 0 899 132 ;
-C 189 ; WX 1111 ; N perthousand ; B 21 -18 1091 748 ;
-C 191 ; WX 500 ; N questiondown ; B 60 -190 449 579 ;
-C 193 ; WX 333 ; N grave ; B 1 629 250 775 ;
-C 194 ; WX 333 ; N acute ; B 83 629 332 775 ;
-C 195 ; WX 333 ; N circumflex ; B -10 644 343 790 ;
-C 196 ; WX 333 ; N tilde ; B -16 636 350 764 ;
-C 197 ; WX 333 ; N macron ; B -6 666 340 740 ;
-C 198 ; WX 333 ; N breve ; B -1 635 335 780 ;
-C 199 ; WX 333 ; N dotaccent ; B 103 644 230 759 ;
-C 200 ; WX 333 ; N dieresis ; B 5 644 328 759 ;
-C 202 ; WX 333 ; N ring ; B 60 632 273 845 ;
-C 203 ; WX 333 ; N cedilla ; B 39 -228 275 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -17 634 447 780 ;
-C 206 ; WX 333 ; N ogonek ; B 88 -205 278 0 ;
-C 207 ; WX 333 ; N caron ; B -10 634 343 780 ;
-C 208 ; WX 1000 ; N emdash ; B 0 259 1000 369 ;
-C 225 ; WX 778 ; N AE ; B -22 0 750 750 ;
-C 227 ; WX 300 ; N ordfeminine ; B 22 412 281 768 ;
-C 232 ; WX 500 ; N Lslash ; B 0 0 474 750 ;
-C 233 ; WX 611 ; N Oslash ; B 36 -38 578 779 ;
-C 234 ; WX 833 ; N OE ; B 61 -18 792 768 ;
-C 235 ; WX 300 ; N ordmasculine ; B 22 412 278 768 ;
-C 241 ; WX 722 ; N ae ; B 44 -15 672 579 ;
-C 245 ; WX 278 ; N dotlessi ; B 74 0 204 564 ;
-C 248 ; WX 278 ; N lslash ; B 2 0 272 750 ;
-C 249 ; WX 500 ; N oslash ; B 7 -58 492 617 ;
-C 250 ; WX 722 ; N oe ; B 46 -15 678 579 ;
-C 251 ; WX 500 ; N germandbls ; B 60 -15 445 768 ;
-C -1 ; WX 500 ; N ecircumflex ; B 53 -15 443 770 ;
-C -1 ; WX 500 ; N edieresis ; B 53 -15 443 759 ;
-C -1 ; WX 500 ; N aacute ; B 42 -15 440 775 ;
-C -1 ; WX 830 ; N registered ; B 22 -18 808 768 ;
-C -1 ; WX 278 ; N icircumflex ; B -47 0 306 770 ;
-C -1 ; WX 500 ; N udieresis ; B 58 -15 431 759 ;
-C -1 ; WX 500 ; N ograve ; B 53 -15 447 775 ;
-C -1 ; WX 500 ; N uacute ; B 58 -15 431 775 ;
-C -1 ; WX 500 ; N ucircumflex ; B 58 -15 431 780 ;
-C -1 ; WX 556 ; N Aacute ; B 9 0 547 961 ;
-C -1 ; WX 278 ; N igrave ; B -26 0 223 775 ;
-C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 956 ;
-C -1 ; WX 444 ; N ccedilla ; B 49 -228 403 579 ;
-C -1 ; WX 500 ; N adieresis ; B 42 -15 440 759 ;
-C -1 ; WX 500 ; N Ecircumflex ; B 64 0 458 956 ;
-C -1 ; WX 444 ; N scaron ; B 28 -15 407 760 ;
-C -1 ; WX 500 ; N thorn ; B 58 -189 438 750 ;
-C -1 ; WX 860 ; N trademark ; B 1 346 774 750 ;
-C -1 ; WX 500 ; N egrave ; B 53 -15 443 775 ;
-C -1 ; WX 300 ; N threesuperior ; B 12 290 288 751 ;
-C -1 ; WX 389 ; N zcaron ; B 18 0 371 760 ;
-C -1 ; WX 500 ; N atilde ; B 42 -15 440 744 ;
-C -1 ; WX 500 ; N aring ; B 42 -15 440 835 ;
-C -1 ; WX 500 ; N ocircumflex ; B 53 -15 447 770 ;
-C -1 ; WX 500 ; N Edieresis ; B 64 0 458 945 ;
-C -1 ; WX 750 ; N threequarters ; B 12 0 739 751 ;
-C -1 ; WX 444 ; N ydieresis ; B 5 -195 429 759 ;
-C -1 ; WX 444 ; N yacute ; B 5 -195 429 775 ;
-C -1 ; WX 278 ; N iacute ; B 56 0 305 775 ;
-C -1 ; WX 556 ; N Acircumflex ; B 9 0 547 956 ;
-C -1 ; WX 611 ; N Uacute ; B 68 -18 544 961 ;
-C -1 ; WX 500 ; N eacute ; B 53 -15 443 775 ;
-C -1 ; WX 611 ; N Ograve ; B 61 -18 551 961 ;
-C -1 ; WX 500 ; N agrave ; B 42 -15 440 775 ;
-C -1 ; WX 611 ; N Udieresis ; B 68 -18 544 945 ;
-C -1 ; WX 500 ; N acircumflex ; B 42 -15 440 770 ;
-C -1 ; WX 278 ; N Igrave ; B -26 0 223 961 ;
-C -1 ; WX 300 ; N twosuperior ; B 13 300 287 752 ;
-C -1 ; WX 611 ; N Ugrave ; B 68 -18 544 961 ;
-C -1 ; WX 750 ; N onequarter ; B 20 0 729 750 ;
-C -1 ; WX 611 ; N Ucircumflex ; B 68 -18 544 956 ;
-C -1 ; WX 556 ; N Scaron ; B 49 -18 508 946 ;
-C -1 ; WX 278 ; N Idieresis ; B -22 0 301 945 ;
-C -1 ; WX 278 ; N idieresis ; B -22 0 301 759 ;
-C -1 ; WX 500 ; N Egrave ; B 64 0 458 961 ;
-C -1 ; WX 611 ; N Oacute ; B 61 -18 551 961 ;
-C -1 ; WX 500 ; N divide ; B 26 6 475 492 ;
-C -1 ; WX 556 ; N Atilde ; B 9 0 547 930 ;
-C -1 ; WX 556 ; N Aring ; B 9 0 547 991 ;
-C -1 ; WX 611 ; N Odieresis ; B 61 -18 551 945 ;
-C -1 ; WX 556 ; N Adieresis ; B 9 0 547 945 ;
-C -1 ; WX 611 ; N Ntilde ; B 68 0 543 930 ;
-C -1 ; WX 500 ; N Zcaron ; B 33 0 468 946 ;
-C -1 ; WX 556 ; N Thorn ; B 68 0 529 750 ;
-C -1 ; WX 278 ; N Iacute ; B 56 0 305 961 ;
-C -1 ; WX 500 ; N plusminus ; B 26 -15 475 513 ;
-C -1 ; WX 500 ; N multiply ; B 26 22 475 476 ;
-C -1 ; WX 500 ; N Eacute ; B 64 0 458 961 ;
-C -1 ; WX 556 ; N Ydieresis ; B 12 0 545 945 ;
-C -1 ; WX 300 ; N onesuperior ; B 50 300 251 750 ;
-C -1 ; WX 500 ; N ugrave ; B 58 -15 431 775 ;
-C -1 ; WX 500 ; N logicalnot ; B 26 105 475 401 ;
-C -1 ; WX 500 ; N ntilde ; B 61 0 440 744 ;
-C -1 ; WX 611 ; N Otilde ; B 61 -18 551 930 ;
-C -1 ; WX 500 ; N otilde ; B 53 -15 447 744 ;
-C -1 ; WX 556 ; N Ccedilla ; B 55 -228 512 768 ;
-C -1 ; WX 556 ; N Agrave ; B 9 0 547 961 ;
-C -1 ; WX 750 ; N onehalf ; B 12 0 739 750 ;
-C -1 ; WX 611 ; N Eth ; B 20 0 550 750 ;
-C -1 ; WX 400 ; N degree ; B 50 450 350 750 ;
-C -1 ; WX 556 ; N Yacute ; B 12 0 545 961 ;
-C -1 ; WX 611 ; N Ocircumflex ; B 61 -18 551 956 ;
-C -1 ; WX 500 ; N oacute ; B 53 -15 447 775 ;
-C -1 ; WX 500 ; N mu ; B 58 -189 431 564 ;
-C -1 ; WX 500 ; N minus ; B 26 194 475 304 ;
-C -1 ; WX 500 ; N eth ; B 53 -15 447 779 ;
-C -1 ; WX 500 ; N odieresis ; B 53 -15 447 759 ;
-C -1 ; WX 830 ; N copyright ; B 22 -18 808 768 ;
-C -1 ; WX 250 ; N brokenbar ; B 75 -175 175 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 88
-
-KPX A y -18
-KPX A w -18
-KPX A v -18
-KPX A quoteright -55
-KPX A Y -55
-KPX A W -37
-KPX A V -37
-KPX A T -55
-
-KPX F period -111
-KPX F comma -111
-KPX F A -37
-
-KPX L y -37
-KPX L quoteright -92
-KPX L Y -92
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -37
-
-KPX R Y -18
-KPX R T -18
-
-KPX T y -55
-KPX T w -74
-KPX T u -74
-KPX T semicolon -74
-KPX T s -74
-KPX T r -74
-KPX T period -92
-KPX T o -74
-KPX T i -18
-KPX T hyphen -55
-KPX T e -74
-KPX T comma -92
-KPX T colon -74
-KPX T c -74
-KPX T a -74
-KPX T A -55
-
-KPX V u -18
-KPX V semicolon -18
-KPX V r -18
-KPX V period -92
-KPX V o -18
-KPX V hyphen -18
-KPX V e -18
-KPX V comma -92
-KPX V colon -18
-KPX V a -18
-KPX V A -37
-
-KPX W period -74
-KPX W o -18
-KPX W hyphen -18
-KPX W e -18
-KPX W comma -74
-KPX W a -18
-KPX W A -18
-
-KPX Y v -18
-KPX Y u -37
-KPX Y semicolon -37
-KPX Y q -55
-KPX Y period -111
-KPX Y p -37
-KPX Y o -55
-KPX Y i -18
-KPX Y hyphen -74
-KPX Y e -55
-KPX Y comma -111
-KPX Y colon -37
-KPX Y a -55
-KPX Y A -55
-
-KPX f quoteright 18
-
-KPX quoteleft quoteleft -18
-
-KPX quoteright s -55
-KPX quoteright quoteright -18
-
-KPX r z 20
-KPX r y 18
-KPX r x 20
-KPX r w 18
-KPX r v 18
-KPX r period -74
-KPX r hyphen -37
-KPX r comma -74
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -37
-KPX w comma -37
-
-KPX y period -55
-KPX y comma -55
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 112 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 102 166 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 112 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 112 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 112 146 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 112 166 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 84 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 84 166 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 84 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 84 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 166 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 139 166 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 139 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 139 166 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 139 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 139 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 139 166 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 166 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 139 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 139 166 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 139 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 139 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 112 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 112 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 84 166 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 -20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 84 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 69 -10 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 -20 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 84 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 84 -20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 84 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 84 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -37 -20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 -20 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 -20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 -20 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 46 -20 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 -10 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 56 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 -20 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Condensed-BoldObl.afm b/blt3.0/library/AFM/Helvetica-Condensed-BoldObl.afm
deleted file mode 100644
index 08c7c21..0000000
--- a/blt3.0/library/AFM/Helvetica-Condensed-BoldObl.afm
+++ /dev/null
@@ -1,419 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Wed Sep  4 17:46:28 1991
-Comment UniqueID 36191
-Comment VMusage 8125 43764
-FontName Helvetica-Condensed-BoldObl
-FullName Helvetica Condensed Bold Oblique
-FamilyName Helvetica
-Weight Bold
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -169 -250 1141 991
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 750
-XHeight 564
-Ascender 750
-Descender -189
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 102 0 390 750 ;
-C 34 ; WX 333 ; N quotedbl ; B 115 468 475 739 ;
-C 35 ; WX 500 ; N numbersign ; B 81 0 580 738 ;
-C 36 ; WX 500 ; N dollar ; B 68 -124 576 803 ;
-C 37 ; WX 833 ; N percent ; B 138 -15 853 750 ;
-C 38 ; WX 667 ; N ampersand ; B 101 -18 676 768 ;
-C 39 ; WX 278 ; N quoteright ; B 183 479 361 750 ;
-C 40 ; WX 333 ; N parenleft ; B 91 -198 442 768 ;
-C 41 ; WX 333 ; N parenright ; B 12 -198 363 768 ;
-C 42 ; WX 500 ; N asterisk ; B 203 412 546 738 ;
-C 43 ; WX 500 ; N plus ; B 67 0 540 492 ;
-C 44 ; WX 333 ; N comma ; B 70 -145 261 132 ;
-C 45 ; WX 333 ; N hyphen ; B 102 255 365 370 ;
-C 46 ; WX 333 ; N period ; B 101 0 261 132 ;
-C 47 ; WX 278 ; N slash ; B -31 -94 471 750 ;
-C 48 ; WX 500 ; N zero ; B 82 -15 576 753 ;
-C 49 ; WX 500 ; N one ; B 155 0 512 750 ;
-C 50 ; WX 500 ; N two ; B 32 0 577 753 ;
-C 51 ; WX 500 ; N three ; B 61 -15 563 753 ;
-C 52 ; WX 500 ; N four ; B 55 0 563 738 ;
-C 53 ; WX 500 ; N five ; B 72 -15 581 738 ;
-C 54 ; WX 500 ; N six ; B 83 -15 575 753 ;
-C 55 ; WX 500 ; N seven ; B 126 0 611 738 ;
-C 56 ; WX 500 ; N eight ; B 76 -15 570 753 ;
-C 57 ; WX 500 ; N nine ; B 84 -15 575 753 ;
-C 58 ; WX 278 ; N colon ; B 73 0 323 556 ;
-C 59 ; WX 278 ; N semicolon ; B 42 -145 323 556 ;
-C 60 ; WX 500 ; N less ; B 85 -24 571 527 ;
-C 61 ; WX 500 ; N equal ; B 46 96 560 401 ;
-C 62 ; WX 500 ; N greater ; B 37 -24 523 527 ;
-C 63 ; WX 500 ; N question ; B 147 0 569 768 ;
-C 64 ; WX 833 ; N at ; B 109 -18 897 768 ;
-C 65 ; WX 556 ; N A ; B 9 0 547 750 ;
-C 66 ; WX 556 ; N B ; B 65 0 615 750 ;
-C 67 ; WX 556 ; N C ; B 99 -18 630 768 ;
-C 68 ; WX 611 ; N D ; B 72 0 662 750 ;
-C 69 ; WX 500 ; N E ; B 64 0 617 750 ;
-C 70 ; WX 500 ; N F ; B 73 0 629 750 ;
-C 71 ; WX 611 ; N G ; B 99 -18 664 768 ;
-C 72 ; WX 611 ; N H ; B 68 0 703 750 ;
-C 73 ; WX 278 ; N I ; B 69 0 368 750 ;
-C 74 ; WX 444 ; N J ; B 36 -18 543 750 ;
-C 75 ; WX 556 ; N K ; B 68 0 697 750 ;
-C 76 ; WX 500 ; N L ; B 68 0 491 750 ;
-C 77 ; WX 778 ; N M ; B 67 0 871 750 ;
-C 78 ; WX 611 ; N N ; B 68 0 702 750 ;
-C 79 ; WX 611 ; N O ; B 105 -18 664 768 ;
-C 80 ; WX 556 ; N P ; B 68 0 651 750 ;
-C 81 ; WX 611 ; N Q ; B 105 -71 664 768 ;
-C 82 ; WX 611 ; N R ; B 66 0 671 750 ;
-C 83 ; WX 556 ; N S ; B 85 -18 613 768 ;
-C 84 ; WX 500 ; N T ; B 153 0 643 750 ;
-C 85 ; WX 611 ; N U ; B 105 -18 703 750 ;
-C 86 ; WX 556 ; N V ; B 180 0 695 750 ;
-C 87 ; WX 833 ; N W ; B 167 0 969 750 ;
-C 88 ; WX 556 ; N X ; B 11 0 698 750 ;
-C 89 ; WX 556 ; N Y ; B 171 0 704 750 ;
-C 90 ; WX 500 ; N Z ; B 33 0 618 750 ;
-C 91 ; WX 333 ; N bracketleft ; B 61 -94 439 750 ;
-C 92 ; WX 250 ; N backslash ; B 70 0 340 750 ;
-C 93 ; WX 333 ; N bracketright ; B 33 -94 411 750 ;
-C 94 ; WX 500 ; N asciicircum ; B 89 326 569 750 ;
-C 95 ; WX 500 ; N underscore ; B -27 -125 484 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 181 495 360 766 ;
-C 97 ; WX 500 ; N a ; B 68 -15 525 579 ;
-C 98 ; WX 500 ; N b ; B 64 -15 534 750 ;
-C 99 ; WX 444 ; N c ; B 79 -15 496 579 ;
-C 100 ; WX 500 ; N d ; B 83 -15 592 750 ;
-C 101 ; WX 500 ; N e ; B 88 -15 530 579 ;
-C 102 ; WX 278 ; N f ; B 71 0 416 750 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 44 -190 553 579 ;
-C 104 ; WX 500 ; N h ; B 61 0 539 750 ;
-C 105 ; WX 278 ; N i ; B 74 0 363 750 ;
-C 106 ; WX 278 ; N j ; B -9 -192 368 750 ;
-C 107 ; WX 444 ; N k ; B 48 0 563 750 ;
-C 108 ; WX 278 ; N l ; B 74 0 363 750 ;
-C 109 ; WX 778 ; N m ; B 66 0 812 579 ;
-C 110 ; WX 500 ; N n ; B 61 0 539 579 ;
-C 111 ; WX 500 ; N o ; B 88 -15 531 579 ;
-C 112 ; WX 500 ; N p ; B 18 -189 528 579 ;
-C 113 ; WX 500 ; N q ; B 80 -188 550 579 ;
-C 114 ; WX 333 ; N r ; B 60 0 441 574 ;
-C 115 ; WX 444 ; N s ; B 56 -15 498 579 ;
-C 116 ; WX 278 ; N t ; B 83 -7 372 719 ;
-C 117 ; WX 500 ; N u ; B 78 -15 551 564 ;
-C 118 ; WX 444 ; N v ; B 130 0 554 564 ;
-C 119 ; WX 667 ; N w ; B 127 0 765 564 ;
-C 120 ; WX 444 ; N x ; B 8 0 553 564 ;
-C 121 ; WX 444 ; N y ; B 36 -195 549 564 ;
-C 122 ; WX 389 ; N z ; B 23 0 487 564 ;
-C 123 ; WX 274 ; N braceleft ; B 37 -92 399 750 ;
-C 124 ; WX 250 ; N bar ; B 22 -250 334 750 ;
-C 125 ; WX 274 ; N braceright ; B 14 -94 375 750 ;
-C 126 ; WX 500 ; N asciitilde ; B 74 153 536 359 ;
-C 161 ; WX 333 ; N exclamdown ; B 66 -170 355 579 ;
-C 162 ; WX 500 ; N cent ; B 103 -122 521 671 ;
-C 163 ; WX 500 ; N sterling ; B 52 -15 603 768 ;
-C 164 ; WX 167 ; N fraction ; B -169 0 488 738 ;
-C 165 ; WX 500 ; N yen ; B 89 0 677 750 ;
-C 166 ; WX 500 ; N florin ; B -28 -185 651 763 ;
-C 167 ; WX 500 ; N section ; B 48 -183 572 768 ;
-C 168 ; WX 500 ; N currency ; B 38 58 594 560 ;
-C 169 ; WX 250 ; N quotesingle ; B 165 468 342 739 ;
-C 170 ; WX 500 ; N quotedblleft ; B 192 495 568 766 ;
-C 171 ; WX 500 ; N guillemotleft ; B 117 62 514 447 ;
-C 172 ; WX 278 ; N guilsinglleft ; B 101 62 310 447 ;
-C 173 ; WX 278 ; N guilsinglright ; B 76 62 285 447 ;
-C 174 ; WX 500 ; N fi ; B 60 0 605 750 ;
-C 175 ; WX 500 ; N fl ; B 60 0 602 750 ;
-C 177 ; WX 500 ; N endash ; B 55 259 578 369 ;
-C 178 ; WX 500 ; N dagger ; B 127 -155 577 768 ;
-C 179 ; WX 500 ; N daggerdbl ; B 51 -161 579 768 ;
-C 180 ; WX 333 ; N periodcentered ; B 140 183 300 315 ;
-C 182 ; WX 550 ; N paragraph ; B 139 -116 685 750 ;
-C 183 ; WX 420 ; N bullet ; B 97 186 482 562 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 58 -138 235 132 ;
-C 185 ; WX 500 ; N quotedblbase ; B 67 -138 441 132 ;
-C 186 ; WX 500 ; N quotedblright ; B 197 479 572 750 ;
-C 187 ; WX 500 ; N guillemotright ; B 94 62 491 447 ;
-C 188 ; WX 1000 ; N ellipsis ; B 101 0 927 132 ;
-C 189 ; WX 1111 ; N perthousand ; B 128 -18 1141 748 ;
-C 191 ; WX 500 ; N questiondown ; B 54 -190 476 579 ;
-C 193 ; WX 333 ; N grave ; B 166 629 384 775 ;
-C 194 ; WX 333 ; N acute ; B 217 629 497 775 ;
-C 195 ; WX 333 ; N circumflex ; B 127 644 480 790 ;
-C 196 ; WX 333 ; N tilde ; B 119 636 512 764 ;
-C 197 ; WX 333 ; N macron ; B 136 666 497 740 ;
-C 198 ; WX 333 ; N breve ; B 161 635 501 780 ;
-C 199 ; WX 333 ; N dotaccent ; B 240 644 391 759 ;
-C 200 ; WX 333 ; N dieresis ; B 142 644 489 759 ;
-C 202 ; WX 333 ; N ring ; B 215 632 432 845 ;
-C 203 ; WX 333 ; N cedilla ; B -4 -228 248 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 118 634 613 780 ;
-C 206 ; WX 333 ; N ogonek ; B 63 -205 256 0 ;
-C 207 ; WX 333 ; N caron ; B 156 634 509 780 ;
-C 208 ; WX 1000 ; N emdash ; B 55 259 1078 369 ;
-C 225 ; WX 778 ; N AE ; B -22 0 909 750 ;
-C 227 ; WX 300 ; N ordfeminine ; B 127 412 421 768 ;
-C 232 ; WX 500 ; N Lslash ; B 49 0 497 750 ;
-C 233 ; WX 611 ; N Oslash ; B 34 -38 736 779 ;
-C 234 ; WX 833 ; N OE ; B 111 -18 951 768 ;
-C 235 ; WX 300 ; N ordmasculine ; B 133 412 417 768 ;
-C 241 ; WX 722 ; N ae ; B 69 -15 762 579 ;
-C 245 ; WX 278 ; N dotlessi ; B 74 0 324 564 ;
-C 248 ; WX 278 ; N lslash ; B 68 0 391 750 ;
-C 249 ; WX 500 ; N oslash ; B 2 -58 616 617 ;
-C 250 ; WX 722 ; N oe ; B 81 -15 763 579 ;
-C 251 ; WX 500 ; N germandbls ; B 60 -15 561 768 ;
-C -1 ; WX 500 ; N ecircumflex ; B 88 -15 560 770 ;
-C -1 ; WX 500 ; N edieresis ; B 88 -15 573 759 ;
-C -1 ; WX 500 ; N aacute ; B 68 -15 581 775 ;
-C -1 ; WX 830 ; N registered ; B 93 -18 897 768 ;
-C -1 ; WX 278 ; N icircumflex ; B 74 0 439 770 ;
-C -1 ; WX 500 ; N udieresis ; B 78 -15 573 759 ;
-C -1 ; WX 500 ; N ograve ; B 88 -15 531 775 ;
-C -1 ; WX 500 ; N uacute ; B 78 -15 581 775 ;
-C -1 ; WX 500 ; N ucircumflex ; B 78 -15 562 780 ;
-C -1 ; WX 556 ; N Aacute ; B 9 0 648 961 ;
-C -1 ; WX 278 ; N igrave ; B 74 0 357 775 ;
-C -1 ; WX 278 ; N Icircumflex ; B 69 0 488 956 ;
-C -1 ; WX 444 ; N ccedilla ; B 66 -228 496 579 ;
-C -1 ; WX 500 ; N adieresis ; B 68 -15 573 759 ;
-C -1 ; WX 500 ; N Ecircumflex ; B 64 0 617 956 ;
-C -1 ; WX 444 ; N scaron ; B 56 -15 551 760 ;
-C -1 ; WX 500 ; N thorn ; B 18 -189 529 750 ;
-C -1 ; WX 860 ; N trademark ; B 144 346 933 750 ;
-C -1 ; WX 500 ; N egrave ; B 88 -15 530 775 ;
-C -1 ; WX 300 ; N threesuperior ; B 96 290 416 751 ;
-C -1 ; WX 389 ; N zcaron ; B 23 0 533 760 ;
-C -1 ; WX 500 ; N atilde ; B 68 -15 592 744 ;
-C -1 ; WX 500 ; N aring ; B 68 -15 525 835 ;
-C -1 ; WX 500 ; N ocircumflex ; B 88 -15 560 770 ;
-C -1 ; WX 500 ; N Edieresis ; B 64 0 617 945 ;
-C -1 ; WX 750 ; N threequarters ; B 96 0 816 751 ;
-C -1 ; WX 444 ; N ydieresis ; B 36 -195 549 759 ;
-C -1 ; WX 444 ; N yacute ; B 36 -195 553 775 ;
-C -1 ; WX 278 ; N iacute ; B 74 0 470 775 ;
-C -1 ; WX 556 ; N Acircumflex ; B 9 0 617 956 ;
-C -1 ; WX 611 ; N Uacute ; B 105 -18 703 961 ;
-C -1 ; WX 500 ; N eacute ; B 88 -15 581 775 ;
-C -1 ; WX 611 ; N Ograve ; B 105 -18 664 961 ;
-C -1 ; WX 500 ; N agrave ; B 68 -15 525 775 ;
-C -1 ; WX 611 ; N Udieresis ; B 105 -18 703 945 ;
-C -1 ; WX 500 ; N acircumflex ; B 68 -15 560 770 ;
-C -1 ; WX 278 ; N Igrave ; B 69 0 396 961 ;
-C -1 ; WX 300 ; N twosuperior ; B 77 300 425 752 ;
-C -1 ; WX 611 ; N Ugrave ; B 105 -18 703 961 ;
-C -1 ; WX 750 ; N onequarter ; B 131 0 788 750 ;
-C -1 ; WX 611 ; N Ucircumflex ; B 105 -18 703 956 ;
-C -1 ; WX 556 ; N Scaron ; B 85 -18 656 946 ;
-C -1 ; WX 278 ; N Idieresis ; B 69 0 502 945 ;
-C -1 ; WX 278 ; N idieresis ; B 74 0 462 759 ;
-C -1 ; WX 500 ; N Egrave ; B 64 0 617 961 ;
-C -1 ; WX 611 ; N Oacute ; B 105 -18 675 961 ;
-C -1 ; WX 500 ; N divide ; B 67 6 540 492 ;
-C -1 ; WX 556 ; N Atilde ; B 9 0 660 930 ;
-C -1 ; WX 556 ; N Aring ; B 9 0 575 991 ;
-C -1 ; WX 611 ; N Odieresis ; B 105 -18 668 945 ;
-C -1 ; WX 556 ; N Adieresis ; B 9 0 641 945 ;
-C -1 ; WX 611 ; N Ntilde ; B 68 0 702 930 ;
-C -1 ; WX 500 ; N Zcaron ; B 33 0 628 946 ;
-C -1 ; WX 556 ; N Thorn ; B 68 0 625 750 ;
-C -1 ; WX 278 ; N Iacute ; B 69 0 509 961 ;
-C -1 ; WX 500 ; N plusminus ; B 23 -15 556 513 ;
-C -1 ; WX 500 ; N multiply ; B 48 22 560 476 ;
-C -1 ; WX 500 ; N Eacute ; B 64 0 620 961 ;
-C -1 ; WX 556 ; N Ydieresis ; B 171 0 704 945 ;
-C -1 ; WX 300 ; N onesuperior ; B 180 300 410 750 ;
-C -1 ; WX 500 ; N ugrave ; B 78 -15 551 775 ;
-C -1 ; WX 500 ; N logicalnot ; B 88 105 560 401 ;
-C -1 ; WX 500 ; N ntilde ; B 61 0 592 744 ;
-C -1 ; WX 611 ; N Otilde ; B 105 -18 687 930 ;
-C -1 ; WX 500 ; N otilde ; B 88 -15 592 744 ;
-C -1 ; WX 556 ; N Ccedilla ; B 99 -228 630 768 ;
-C -1 ; WX 556 ; N Agrave ; B 9 0 547 961 ;
-C -1 ; WX 750 ; N onehalf ; B 108 0 813 750 ;
-C -1 ; WX 611 ; N Eth ; B 72 0 662 750 ;
-C -1 ; WX 400 ; N degree ; B 174 450 481 750 ;
-C -1 ; WX 556 ; N Yacute ; B 171 0 704 961 ;
-C -1 ; WX 611 ; N Ocircumflex ; B 105 -18 664 956 ;
-C -1 ; WX 500 ; N oacute ; B 88 -15 581 775 ;
-C -1 ; WX 500 ; N mu ; B 18 -189 551 564 ;
-C -1 ; WX 500 ; N minus ; B 67 194 540 304 ;
-C -1 ; WX 500 ; N eth ; B 88 -15 540 779 ;
-C -1 ; WX 500 ; N odieresis ; B 88 -15 573 759 ;
-C -1 ; WX 830 ; N copyright ; B 93 -18 897 768 ;
-C -1 ; WX 250 ; N brokenbar ; B 38 -175 318 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 88
-
-KPX A y -18
-KPX A w -18
-KPX A v -18
-KPX A quoteright -55
-KPX A Y -55
-KPX A W -37
-KPX A V -37
-KPX A T -55
-
-KPX F period -111
-KPX F comma -111
-KPX F A -37
-
-KPX L y -37
-KPX L quoteright -92
-KPX L Y -92
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -37
-
-KPX R Y -18
-KPX R T -18
-
-KPX T y -55
-KPX T w -74
-KPX T u -74
-KPX T semicolon -74
-KPX T s -74
-KPX T r -74
-KPX T period -92
-KPX T o -74
-KPX T i -18
-KPX T hyphen -55
-KPX T e -74
-KPX T comma -92
-KPX T colon -74
-KPX T c -74
-KPX T a -74
-KPX T A -55
-
-KPX V u -18
-KPX V semicolon -18
-KPX V r -18
-KPX V period -92
-KPX V o -18
-KPX V hyphen -18
-KPX V e -18
-KPX V comma -92
-KPX V colon -18
-KPX V a -18
-KPX V A -37
-
-KPX W period -74
-KPX W o -18
-KPX W hyphen -18
-KPX W e -18
-KPX W comma -74
-KPX W a -18
-KPX W A -18
-
-KPX Y v -18
-KPX Y u -37
-KPX Y semicolon -37
-KPX Y q -55
-KPX Y period -111
-KPX Y p -37
-KPX Y o -55
-KPX Y i -18
-KPX Y hyphen -74
-KPX Y e -55
-KPX Y comma -111
-KPX Y colon -37
-KPX Y a -55
-KPX Y A -55
-
-KPX f quoteright 18
-
-KPX quoteleft quoteleft -18
-
-KPX quoteright s -55
-KPX quoteright quoteright -18
-
-KPX r z 20
-KPX r y 18
-KPX r x 20
-KPX r w 18
-KPX r v 18
-KPX r period -74
-KPX r hyphen -37
-KPX r comma -74
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -37
-KPX w comma -37
-
-KPX y period -55
-KPX y comma -55
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 152 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 137 166 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 152 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 152 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 143 146 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 147 166 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 124 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 119 166 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 124 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 124 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 13 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 8 166 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 13 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 13 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 174 166 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 179 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 174 166 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 179 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 179 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 174 166 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 147 166 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 179 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 174 166 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 179 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 179 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 152 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 152 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 119 166 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 80 -20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 84 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 67 -10 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 80 -20 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 84 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 80 -20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 84 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 84 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -41 -20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 80 -20 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 80 -20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 80 -20 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 42 -20 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 82 -10 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 56 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 24 -20 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Condensed-Oblique.afm b/blt3.0/library/AFM/Helvetica-Condensed-Oblique.afm
deleted file mode 100644
index 44da649..0000000
--- a/blt3.0/library/AFM/Helvetica-Condensed-Oblique.afm
+++ /dev/null
@@ -1,421 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Wed Sep  4 17:59:46 1991
-Comment UniqueID 36200
-Comment VMusage 7672 41967
-FontName Helvetica-Condensed-Oblique
-FullName Helvetica Condensed Oblique
-FamilyName Helvetica
-Weight Medium
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -174 -250 1118 990
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.003
-Notice Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 750
-XHeight 556
-Ascender 750
-Descender -188
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 121 0 371 750 ;
-C 34 ; WX 250 ; N quotedbl ; B 153 513 364 739 ;
-C 35 ; WX 500 ; N numbersign ; B 33 0 621 750 ;
-C 36 ; WX 500 ; N dollar ; B 69 -116 569 815 ;
-C 37 ; WX 833 ; N percent ; B 164 -15 803 750 ;
-C 38 ; WX 667 ; N ampersand ; B 111 -18 648 750 ;
-C 39 ; WX 222 ; N quoteright ; B 171 504 317 750 ;
-C 40 ; WX 333 ; N parenleft ; B 115 -215 443 750 ;
-C 41 ; WX 333 ; N parenright ; B 3 -215 331 750 ;
-C 42 ; WX 500 ; N asterisk ; B 229 455 537 750 ;
-C 43 ; WX 500 ; N plus ; B 91 0 518 505 ;
-C 44 ; WX 250 ; N comma ; B 49 -146 192 100 ;
-C 45 ; WX 333 ; N hyphen ; B 103 275 364 358 ;
-C 46 ; WX 250 ; N period ; B 80 0 192 100 ;
-C 47 ; WX 278 ; N slash ; B -19 -27 450 750 ;
-C 48 ; WX 500 ; N zero ; B 98 -15 563 750 ;
-C 49 ; WX 500 ; N one ; B 190 0 476 750 ;
-C 50 ; WX 500 ; N two ; B 44 0 562 750 ;
-C 51 ; WX 500 ; N three ; B 73 -15 552 750 ;
-C 52 ; WX 500 ; N four ; B 68 0 543 750 ;
-C 53 ; WX 500 ; N five ; B 75 -15 575 735 ;
-C 54 ; WX 500 ; N six ; B 91 -15 566 750 ;
-C 55 ; WX 500 ; N seven ; B 116 0 612 735 ;
-C 56 ; WX 500 ; N eight ; B 83 -15 559 750 ;
-C 57 ; WX 500 ; N nine ; B 91 -15 566 750 ;
-C 58 ; WX 250 ; N colon ; B 80 0 287 547 ;
-C 59 ; WX 250 ; N semicolon ; B 49 -146 287 547 ;
-C 60 ; WX 500 ; N less ; B 89 -10 569 518 ;
-C 61 ; WX 500 ; N equal ; B 70 124 539 384 ;
-C 62 ; WX 500 ; N greater ; B 40 -10 520 518 ;
-C 63 ; WX 500 ; N question ; B 169 0 586 750 ;
-C 64 ; WX 800 ; N at ; B 106 -15 863 750 ;
-C 65 ; WX 556 ; N A ; B 11 0 546 750 ;
-C 66 ; WX 556 ; N B ; B 80 0 610 750 ;
-C 67 ; WX 556 ; N C ; B 106 -18 624 765 ;
-C 68 ; WX 611 ; N D ; B 82 0 653 750 ;
-C 69 ; WX 500 ; N E ; B 74 0 608 750 ;
-C 70 ; WX 444 ; N F ; B 74 0 585 750 ;
-C 71 ; WX 611 ; N G ; B 109 -18 646 765 ;
-C 72 ; WX 611 ; N H ; B 79 0 691 750 ;
-C 73 ; WX 278 ; N I ; B 98 0 340 750 ;
-C 74 ; WX 444 ; N J ; B 52 -15 527 750 ;
-C 75 ; WX 556 ; N K ; B 79 0 698 750 ;
-C 76 ; WX 500 ; N L ; B 83 0 488 750 ;
-C 77 ; WX 778 ; N M ; B 76 0 861 750 ;
-C 78 ; WX 611 ; N N ; B 77 0 693 750 ;
-C 79 ; WX 611 ; N O ; B 116 -18 658 765 ;
-C 80 ; WX 556 ; N P ; B 86 0 641 750 ;
-C 81 ; WX 611 ; N Q ; B 116 -34 659 765 ;
-C 82 ; WX 611 ; N R ; B 86 0 655 750 ;
-C 83 ; WX 556 ; N S ; B 86 -18 611 765 ;
-C 84 ; WX 500 ; N T ; B 158 0 645 750 ;
-C 85 ; WX 611 ; N U ; B 114 -18 690 750 ;
-C 86 ; WX 556 ; N V ; B 170 0 704 750 ;
-C 87 ; WX 833 ; N W ; B 176 0 975 750 ;
-C 88 ; WX 556 ; N X ; B 17 0 692 750 ;
-C 89 ; WX 556 ; N Y ; B 170 0 705 750 ;
-C 90 ; WX 500 ; N Z ; B 28 0 627 750 ;
-C 91 ; WX 333 ; N bracketleft ; B 56 -209 434 750 ;
-C 92 ; WX 250 ; N backslash ; B 128 0 281 750 ;
-C 93 ; WX 333 ; N bracketright ; B 14 -209 392 750 ;
-C 94 ; WX 500 ; N asciicircum ; B 141 333 502 750 ;
-C 95 ; WX 500 ; N underscore ; B -27 -125 484 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 175 521 321 767 ;
-C 97 ; WX 444 ; N a ; B 55 -15 465 571 ;
-C 98 ; WX 500 ; N b ; B 75 -15 525 750 ;
-C 99 ; WX 444 ; N c ; B 85 -15 488 571 ;
-C 100 ; WX 500 ; N d ; B 88 -15 583 750 ;
-C 101 ; WX 444 ; N e ; B 86 -15 476 571 ;
-C 102 ; WX 278 ; N f ; B 93 0 418 752 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 53 -189 544 571 ;
-C 104 ; WX 500 ; N h ; B 73 0 524 750 ;
-C 105 ; WX 222 ; N i ; B 72 0 310 750 ;
-C 106 ; WX 222 ; N j ; B -27 -190 313 750 ;
-C 107 ; WX 444 ; N k ; B 69 0 552 750 ;
-C 108 ; WX 222 ; N l ; B 72 0 310 750 ;
-C 109 ; WX 778 ; N m ; B 76 0 799 571 ;
-C 110 ; WX 500 ; N n ; B 73 0 524 571 ;
-C 111 ; WX 500 ; N o ; B 96 -15 524 571 ;
-C 112 ; WX 500 ; N p ; B 32 -188 524 571 ;
-C 113 ; WX 500 ; N q ; B 100 -184 544 571 ;
-C 114 ; WX 333 ; N r ; B 81 0 441 563 ;
-C 115 ; WX 444 ; N s ; B 68 -15 473 571 ;
-C 116 ; WX 278 ; N t ; B 101 0 375 707 ;
-C 117 ; WX 500 ; N u ; B 99 -15 542 556 ;
-C 118 ; WX 444 ; N v ; B 131 0 549 556 ;
-C 119 ; WX 667 ; N w ; B 137 0 767 556 ;
-C 120 ; WX 444 ; N x ; B 9 0 548 556 ;
-C 121 ; WX 444 ; N y ; B -13 -190 543 556 ;
-C 122 ; WX 389 ; N z ; B 24 0 482 556 ;
-C 123 ; WX 274 ; N braceleft ; B 77 -95 425 750 ;
-C 124 ; WX 250 ; N bar ; B 40 -250 316 750 ;
-C 125 ; WX 274 ; N braceright ; B -12 -95 337 750 ;
-C 126 ; WX 500 ; N asciitilde ; B 89 166 520 345 ;
-C 161 ; WX 333 ; N exclamdown ; B 83 -179 333 571 ;
-C 162 ; WX 500 ; N cent ; B 94 -137 499 667 ;
-C 163 ; WX 500 ; N sterling ; B 40 -15 589 750 ;
-C 164 ; WX 167 ; N fraction ; B -174 0 500 750 ;
-C 165 ; WX 500 ; N yen ; B 88 0 677 750 ;
-C 166 ; WX 500 ; N florin ; B -28 -192 645 750 ;
-C 167 ; WX 500 ; N section ; B 51 -208 552 750 ;
-C 168 ; WX 500 ; N currency ; B 51 50 576 553 ;
-C 169 ; WX 250 ; N quotesingle ; B 208 513 308 739 ;
-C 170 ; WX 389 ; N quotedblleft ; B 173 521 490 767 ;
-C 171 ; WX 500 ; N guillemotleft ; B 145 125 520 495 ;
-C 172 ; WX 278 ; N guilsinglleft ; B 124 125 320 495 ;
-C 173 ; WX 278 ; N guilsinglright ; B 90 125 286 495 ;
-C 174 ; WX 500 ; N fi ; B 93 0 584 752 ;
-C 175 ; WX 500 ; N fl ; B 93 0 584 752 ;
-C 177 ; WX 500 ; N endash ; B 58 275 573 345 ;
-C 178 ; WX 500 ; N dagger ; B 137 -176 573 750 ;
-C 179 ; WX 500 ; N daggerdbl ; B 50 -176 572 750 ;
-C 180 ; WX 250 ; N periodcentered ; B 123 204 236 304 ;
-C 182 ; WX 440 ; N paragraph ; B 113 -116 550 750 ;
-C 183 ; WX 333 ; N bullet ; B 91 222 401 529 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 33 -146 179 100 ;
-C 185 ; WX 389 ; N quotedblbase ; B 31 -146 348 100 ;
-C 186 ; WX 389 ; N quotedblright ; B 169 504 486 750 ;
-C 187 ; WX 500 ; N guillemotright ; B 112 125 487 495 ;
-C 188 ; WX 1000 ; N ellipsis ; B 121 0 899 100 ;
-C 189 ; WX 1111 ; N perthousand ; B 157 -16 1118 750 ;
-C 191 ; WX 500 ; N questiondown ; B 33 -190 450 559 ;
-C 193 ; WX 333 ; N grave ; B 198 624 366 765 ;
-C 194 ; WX 333 ; N acute ; B 233 624 461 765 ;
-C 195 ; WX 333 ; N circumflex ; B 154 624 446 765 ;
-C 196 ; WX 333 ; N tilde ; B 132 633 496 749 ;
-C 197 ; WX 333 ; N macron ; B 150 657 475 715 ;
-C 198 ; WX 333 ; N breve ; B 172 629 484 765 ;
-C 199 ; WX 250 ; N dotaccent ; B 224 650 324 750 ;
-C 200 ; WX 333 ; N dieresis ; B 190 650 440 750 ;
-C 202 ; WX 250 ; N ring ; B 169 593 377 796 ;
-C 203 ; WX 333 ; N cedilla ; B 23 -224 255 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 194 624 603 765 ;
-C 206 ; WX 333 ; N ogonek ; B -23 -191 188 13 ;
-C 207 ; WX 333 ; N caron ; B 184 624 476 765 ;
-C 208 ; WX 1000 ; N emdash ; B 58 275 1073 345 ;
-C 225 ; WX 833 ; N AE ; B 0 0 944 750 ;
-C 227 ; WX 300 ; N ordfeminine ; B 129 413 392 765 ;
-C 232 ; WX 500 ; N Lslash ; B 39 0 488 750 ;
-C 233 ; WX 611 ; N Oslash ; B 25 -43 738 796 ;
-C 234 ; WX 833 ; N OE ; B 113 -18 946 765 ;
-C 235 ; WX 300 ; N ordmasculine ; B 138 413 413 765 ;
-C 241 ; WX 667 ; N ae ; B 50 -15 711 571 ;
-C 245 ; WX 222 ; N dotlessi ; B 72 0 269 556 ;
-C 248 ; WX 222 ; N lslash ; B 59 0 347 750 ;
-C 249 ; WX 500 ; N oslash ; B 19 -46 591 582 ;
-C 250 ; WX 722 ; N oe ; B 81 -15 758 571 ;
-C 251 ; WX 500 ; N germandbls ; B 71 -5 548 765 ;
-C -1 ; WX 444 ; N ecircumflex ; B 86 -15 502 765 ;
-C -1 ; WX 444 ; N edieresis ; B 86 -15 496 750 ;
-C -1 ; WX 444 ; N aacute ; B 55 -15 517 765 ;
-C -1 ; WX 800 ; N registered ; B 79 -18 881 765 ;
-C -1 ; WX 222 ; N icircumflex ; B 72 0 391 765 ;
-C -1 ; WX 500 ; N udieresis ; B 99 -15 542 750 ;
-C -1 ; WX 500 ; N ograve ; B 96 -15 524 765 ;
-C -1 ; WX 500 ; N uacute ; B 99 -15 545 765 ;
-C -1 ; WX 500 ; N ucircumflex ; B 99 -15 542 765 ;
-C -1 ; WX 556 ; N Aacute ; B 11 0 614 959 ;
-C -1 ; WX 222 ; N igrave ; B 72 0 311 765 ;
-C -1 ; WX 278 ; N Icircumflex ; B 98 0 460 959 ;
-C -1 ; WX 444 ; N ccedilla ; B 79 -224 488 571 ;
-C -1 ; WX 444 ; N adieresis ; B 55 -15 496 750 ;
-C -1 ; WX 500 ; N Ecircumflex ; B 74 0 608 959 ;
-C -1 ; WX 444 ; N scaron ; B 68 -15 532 765 ;
-C -1 ; WX 500 ; N thorn ; B 32 -188 523 750 ;
-C -1 ; WX 750 ; N trademark ; B 147 329 878 750 ;
-C -1 ; WX 444 ; N egrave ; B 86 -15 476 765 ;
-C -1 ; WX 300 ; N threesuperior ; B 102 291 409 750 ;
-C -1 ; WX 389 ; N zcaron ; B 24 0 504 765 ;
-C -1 ; WX 444 ; N atilde ; B 55 -15 552 749 ;
-C -1 ; WX 444 ; N aring ; B 55 -15 465 826 ;
-C -1 ; WX 500 ; N ocircumflex ; B 96 -15 530 765 ;
-C -1 ; WX 500 ; N Edieresis ; B 74 0 608 944 ;
-C -1 ; WX 750 ; N threequarters ; B 106 0 831 750 ;
-C -1 ; WX 444 ; N ydieresis ; B -13 -190 543 750 ;
-C -1 ; WX 444 ; N yacute ; B -13 -190 543 765 ;
-C -1 ; WX 222 ; N iacute ; B 72 0 406 765 ;
-C -1 ; WX 556 ; N Acircumflex ; B 11 0 599 959 ;
-C -1 ; WX 611 ; N Uacute ; B 114 -18 690 959 ;
-C -1 ; WX 444 ; N eacute ; B 86 -15 517 765 ;
-C -1 ; WX 611 ; N Ograve ; B 116 -18 658 959 ;
-C -1 ; WX 444 ; N agrave ; B 55 -15 465 765 ;
-C -1 ; WX 611 ; N Udieresis ; B 114 -18 690 944 ;
-C -1 ; WX 444 ; N acircumflex ; B 55 -15 502 765 ;
-C -1 ; WX 278 ; N Igrave ; B 98 0 380 959 ;
-C -1 ; WX 300 ; N twosuperior ; B 83 300 413 750 ;
-C -1 ; WX 611 ; N Ugrave ; B 114 -18 690 959 ;
-C -1 ; WX 750 ; N onequarter ; B 143 0 817 750 ;
-C -1 ; WX 611 ; N Ucircumflex ; B 114 -18 690 959 ;
-C -1 ; WX 556 ; N Scaron ; B 86 -18 629 959 ;
-C -1 ; WX 278 ; N Idieresis ; B 98 0 455 944 ;
-C -1 ; WX 222 ; N idieresis ; B 72 0 385 750 ;
-C -1 ; WX 500 ; N Egrave ; B 74 0 608 959 ;
-C -1 ; WX 611 ; N Oacute ; B 116 -18 658 959 ;
-C -1 ; WX 500 ; N divide ; B 91 3 518 505 ;
-C -1 ; WX 556 ; N Atilde ; B 11 0 649 943 ;
-C -1 ; WX 556 ; N Aring ; B 11 0 571 990 ;
-C -1 ; WX 611 ; N Odieresis ; B 116 -18 658 944 ;
-C -1 ; WX 556 ; N Adieresis ; B 11 0 594 944 ;
-C -1 ; WX 611 ; N Ntilde ; B 77 0 693 943 ;
-C -1 ; WX 500 ; N Zcaron ; B 28 0 627 959 ;
-C -1 ; WX 556 ; N Thorn ; B 86 0 618 750 ;
-C -1 ; WX 278 ; N Iacute ; B 98 0 475 959 ;
-C -1 ; WX 500 ; N plusminus ; B 44 0 531 505 ;
-C -1 ; WX 500 ; N multiply ; B 65 48 544 461 ;
-C -1 ; WX 500 ; N Eacute ; B 74 0 608 959 ;
-C -1 ; WX 556 ; N Ydieresis ; B 170 0 705 944 ;
-C -1 ; WX 300 ; N onesuperior ; B 200 300 392 750 ;
-C -1 ; WX 500 ; N ugrave ; B 99 -15 542 765 ;
-C -1 ; WX 500 ; N logicalnot ; B 111 117 539 384 ;
-C -1 ; WX 500 ; N ntilde ; B 73 0 580 749 ;
-C -1 ; WX 611 ; N Otilde ; B 116 -18 676 943 ;
-C -1 ; WX 500 ; N otilde ; B 96 -15 580 749 ;
-C -1 ; WX 556 ; N Ccedilla ; B 106 -224 624 765 ;
-C -1 ; WX 556 ; N Agrave ; B 11 0 546 959 ;
-C -1 ; WX 750 ; N onehalf ; B 91 0 777 750 ;
-C -1 ; WX 611 ; N Eth ; B 82 0 650 750 ;
-C -1 ; WX 400 ; N degree ; B 174 450 481 750 ;
-C -1 ; WX 556 ; N Yacute ; B 170 0 705 959 ;
-C -1 ; WX 611 ; N Ocircumflex ; B 116 -18 658 959 ;
-C -1 ; WX 500 ; N oacute ; B 96 -15 545 765 ;
-C -1 ; WX 500 ; N mu ; B 35 -189 540 556 ;
-C -1 ; WX 500 ; N minus ; B 91 219 518 289 ;
-C -1 ; WX 500 ; N eth ; B 96 -15 525 831 ;
-C -1 ; WX 500 ; N odieresis ; B 96 -15 524 750 ;
-C -1 ; WX 800 ; N copyright ; B 79 -18 880 765 ;
-C -1 ; WX 250 ; N brokenbar ; B 56 -175 300 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 90
-
-KPX A y -18
-KPX A w -18
-KPX A v -18
-KPX A quoteright -55
-KPX A Y -55
-KPX A W -37
-KPX A V -37
-KPX A T -55
-
-KPX F period -111
-KPX F comma -111
-KPX F A -37
-
-KPX L y -37
-KPX L quoteright -92
-KPX L Y -92
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -37
-
-KPX R Y -18
-KPX R T -18
-
-KPX T y -55
-KPX T w -74
-KPX T u -74
-KPX T semicolon -74
-KPX T s -74
-KPX T r -74
-KPX T period -92
-KPX T o -74
-KPX T i -18
-KPX T hyphen -55
-KPX T e -74
-KPX T comma -92
-KPX T colon -74
-KPX T c -74
-KPX T a -74
-KPX T A -55
-
-KPX V u -18
-KPX V semicolon -18
-KPX V r -18
-KPX V period -92
-KPX V o -18
-KPX V hyphen -18
-KPX V e -18
-KPX V comma -92
-KPX V colon -18
-KPX V a -18
-KPX V A -37
-
-KPX W period -74
-KPX W o -18
-KPX W hyphen -18
-KPX W e -18
-KPX W comma -74
-KPX W a -18
-KPX W A -18
-
-KPX Y v -18
-KPX Y u -37
-KPX Y semicolon -37
-KPX Y q -55
-KPX Y period -111
-KPX Y p -37
-KPX Y o -55
-KPX Y i -18
-KPX Y hyphen -74
-KPX Y e -55
-KPX Y comma -111
-KPX Y colon -37
-KPX Y a -55
-KPX Y A -55
-
-KPX f quoteright 18
-
-KPX quoteleft quoteleft -18
-
-KPX quoteright s -55
-KPX quoteright quoteright -18
-
-KPX r z 20
-KPX r y 18
-KPX r x 20
-KPX r w 18
-KPX r v 18
-KPX r period -74
-KPX r hyphen -37
-KPX r f 20
-KPX r comma -74
-KPX r c -20
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -37
-KPX w comma -37
-
-KPX y period -55
-KPX y comma -55
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 153 194 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 153 194 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 153 194 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 153 194 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 194 194 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 153 194 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 125 194 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 125 194 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 125 194 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 125 194 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 194 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 194 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 194 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 194 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 180 194 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 180 194 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 180 194 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 180 194 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 180 194 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 180 194 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 153 194 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 180 194 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 180 194 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 180 194 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 180 194 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 153 194 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 153 194 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 125 194 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 56 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 56 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 88 30 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -55 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -55 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -55 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -55 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 56 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 56 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Condensed.afm b/blt3.0/library/AFM/Helvetica-Condensed.afm
deleted file mode 100644
index f22040c..0000000
--- a/blt3.0/library/AFM/Helvetica-Condensed.afm
+++ /dev/null
@@ -1,421 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Wed Sep  4 17:26:31 1991
-Comment UniqueID 36179
-Comment VMusage 26415 33307
-FontName Helvetica-Condensed
-FullName Helvetica Condensed Medium
-FamilyName Helvetica
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -174 -250 1071 990
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.003
-Notice Copyright (c) 1985, 1987, 1991 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 750
-XHeight 556
-Ascender 750
-Descender -188
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 121 0 212 750 ;
-C 34 ; WX 250 ; N quotedbl ; B 44 513 207 739 ;
-C 35 ; WX 500 ; N numbersign ; B 5 0 495 750 ;
-C 36 ; WX 500 ; N dollar ; B 35 -116 465 815 ;
-C 37 ; WX 833 ; N percent ; B 55 -15 756 750 ;
-C 38 ; WX 667 ; N ampersand ; B 75 -18 620 750 ;
-C 39 ; WX 222 ; N quoteright ; B 64 504 158 750 ;
-C 40 ; WX 333 ; N parenleft ; B 76 -215 289 750 ;
-C 41 ; WX 333 ; N parenright ; B 44 -215 257 750 ;
-C 42 ; WX 500 ; N asterisk ; B 96 455 405 750 ;
-C 43 ; WX 500 ; N plus ; B 44 0 457 505 ;
-C 44 ; WX 250 ; N comma ; B 80 -146 171 100 ;
-C 45 ; WX 333 ; N hyphen ; B 45 275 288 358 ;
-C 46 ; WX 250 ; N period ; B 80 0 171 100 ;
-C 47 ; WX 278 ; N slash ; B -13 -27 291 750 ;
-C 48 ; WX 500 ; N zero ; B 46 -15 455 750 ;
-C 49 ; WX 500 ; N one ; B 74 0 317 750 ;
-C 50 ; WX 500 ; N two ; B 44 0 447 750 ;
-C 51 ; WX 500 ; N three ; B 38 -15 447 750 ;
-C 52 ; WX 500 ; N four ; B 28 0 451 750 ;
-C 53 ; WX 500 ; N five ; B 43 -15 446 735 ;
-C 54 ; WX 500 ; N six ; B 43 -15 458 750 ;
-C 55 ; WX 500 ; N seven ; B 44 0 456 735 ;
-C 56 ; WX 500 ; N eight ; B 46 -15 454 750 ;
-C 57 ; WX 500 ; N nine ; B 43 -15 458 750 ;
-C 58 ; WX 250 ; N colon ; B 80 0 171 547 ;
-C 59 ; WX 250 ; N semicolon ; B 80 -146 171 547 ;
-C 60 ; WX 500 ; N less ; B 42 -10 459 518 ;
-C 61 ; WX 500 ; N equal ; B 44 124 457 384 ;
-C 62 ; WX 500 ; N greater ; B 42 -10 459 518 ;
-C 63 ; WX 500 ; N question ; B 60 0 462 750 ;
-C 64 ; WX 800 ; N at ; B 36 -15 764 750 ;
-C 65 ; WX 556 ; N A ; B 11 0 546 750 ;
-C 66 ; WX 556 ; N B ; B 80 0 503 750 ;
-C 67 ; WX 556 ; N C ; B 53 -18 503 765 ;
-C 68 ; WX 611 ; N D ; B 82 0 548 750 ;
-C 69 ; WX 500 ; N E ; B 74 0 451 750 ;
-C 70 ; WX 444 ; N F ; B 74 0 426 750 ;
-C 71 ; WX 611 ; N G ; B 54 -18 532 765 ;
-C 72 ; WX 611 ; N H ; B 79 0 532 750 ;
-C 73 ; WX 278 ; N I ; B 98 0 181 750 ;
-C 74 ; WX 444 ; N J ; B 21 -15 368 750 ;
-C 75 ; WX 556 ; N K ; B 79 0 546 750 ;
-C 76 ; WX 500 ; N L ; B 83 0 472 750 ;
-C 77 ; WX 778 ; N M ; B 76 0 702 750 ;
-C 78 ; WX 611 ; N N ; B 77 0 534 750 ;
-C 79 ; WX 611 ; N O ; B 59 -18 553 765 ;
-C 80 ; WX 556 ; N P ; B 86 0 519 750 ;
-C 81 ; WX 611 ; N Q ; B 59 -34 582 765 ;
-C 82 ; WX 611 ; N R ; B 86 0 565 750 ;
-C 83 ; WX 556 ; N S ; B 51 -18 505 765 ;
-C 84 ; WX 500 ; N T ; B 15 0 486 750 ;
-C 85 ; WX 611 ; N U ; B 81 -18 531 750 ;
-C 86 ; WX 556 ; N V ; B 11 0 545 750 ;
-C 87 ; WX 833 ; N W ; B 17 0 816 750 ;
-C 88 ; WX 556 ; N X ; B 17 0 539 750 ;
-C 89 ; WX 556 ; N Y ; B 11 0 546 750 ;
-C 90 ; WX 500 ; N Z ; B 28 0 473 750 ;
-C 91 ; WX 333 ; N bracketleft ; B 100 -209 275 750 ;
-C 92 ; WX 250 ; N backslash ; B -31 0 281 750 ;
-C 93 ; WX 333 ; N bracketright ; B 58 -209 233 750 ;
-C 94 ; WX 500 ; N asciicircum ; B 70 333 431 750 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 64 521 158 767 ;
-C 97 ; WX 444 ; N a ; B 31 -15 417 571 ;
-C 98 ; WX 500 ; N b ; B 75 -15 447 750 ;
-C 99 ; WX 444 ; N c ; B 44 -15 405 571 ;
-C 100 ; WX 500 ; N d ; B 48 -15 424 750 ;
-C 101 ; WX 444 ; N e ; B 43 -15 395 571 ;
-C 102 ; WX 278 ; N f ; B 12 0 259 752 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 45 -189 426 571 ;
-C 104 ; WX 500 ; N h ; B 73 0 428 750 ;
-C 105 ; WX 222 ; N i ; B 72 0 151 750 ;
-C 106 ; WX 222 ; N j ; B 13 -190 154 750 ;
-C 107 ; WX 444 ; N k ; B 69 0 439 750 ;
-C 108 ; WX 222 ; N l ; B 72 0 151 750 ;
-C 109 ; WX 778 ; N m ; B 76 0 703 571 ;
-C 110 ; WX 500 ; N n ; B 73 0 428 571 ;
-C 111 ; WX 500 ; N o ; B 51 -15 449 571 ;
-C 112 ; WX 500 ; N p ; B 72 -188 447 571 ;
-C 113 ; WX 500 ; N q ; B 55 -184 426 571 ;
-C 114 ; WX 333 ; N r ; B 81 0 322 563 ;
-C 115 ; WX 444 ; N s ; B 43 -15 400 571 ;
-C 116 ; WX 278 ; N t ; B 9 0 257 707 ;
-C 117 ; WX 500 ; N u ; B 77 -15 424 556 ;
-C 118 ; WX 444 ; N v ; B 13 0 431 556 ;
-C 119 ; WX 667 ; N w ; B 19 0 649 556 ;
-C 120 ; WX 444 ; N x ; B 9 0 436 556 ;
-C 121 ; WX 444 ; N y ; B 5 -190 425 556 ;
-C 122 ; WX 389 ; N z ; B 24 0 366 556 ;
-C 123 ; WX 274 ; N braceleft ; B 7 -95 266 750 ;
-C 124 ; WX 250 ; N bar ; B 93 -250 157 750 ;
-C 125 ; WX 274 ; N braceright ; B 8 -95 267 750 ;
-C 126 ; WX 500 ; N asciitilde ; B 44 166 457 345 ;
-C 161 ; WX 333 ; N exclamdown ; B 121 -179 212 571 ;
-C 162 ; WX 500 ; N cent ; B 58 -137 418 667 ;
-C 163 ; WX 500 ; N sterling ; B 30 -15 485 750 ;
-C 164 ; WX 167 ; N fraction ; B -174 0 341 750 ;
-C 165 ; WX 500 ; N yen ; B -17 0 518 750 ;
-C 166 ; WX 500 ; N florin ; B 10 -192 488 750 ;
-C 167 ; WX 500 ; N section ; B 35 -208 466 750 ;
-C 168 ; WX 500 ; N currency ; B 24 50 475 553 ;
-C 169 ; WX 250 ; N quotesingle ; B 99 513 151 739 ;
-C 170 ; WX 389 ; N quotedblleft ; B 62 521 327 767 ;
-C 171 ; WX 500 ; N guillemotleft ; B 85 125 415 495 ;
-C 172 ; WX 278 ; N guilsinglleft ; B 64 125 215 495 ;
-C 173 ; WX 278 ; N guilsinglright ; B 63 125 214 495 ;
-C 174 ; WX 500 ; N fi ; B 12 0 427 752 ;
-C 175 ; WX 500 ; N fl ; B 12 0 425 752 ;
-C 177 ; WX 500 ; N endash ; B 0 275 500 345 ;
-C 178 ; WX 500 ; N dagger ; B 40 -176 461 750 ;
-C 179 ; WX 500 ; N daggerdbl ; B 39 -176 462 750 ;
-C 180 ; WX 250 ; N periodcentered ; B 80 204 171 304 ;
-C 182 ; WX 440 ; N paragraph ; B 0 -116 391 750 ;
-C 183 ; WX 333 ; N bullet ; B 15 222 318 529 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 64 -146 158 100 ;
-C 185 ; WX 389 ; N quotedblbase ; B 62 -146 327 100 ;
-C 186 ; WX 389 ; N quotedblright ; B 62 504 327 750 ;
-C 187 ; WX 500 ; N guillemotright ; B 85 125 415 495 ;
-C 188 ; WX 1000 ; N ellipsis ; B 121 0 878 100 ;
-C 189 ; WX 1111 ; N perthousand ; B 47 -16 1071 750 ;
-C 191 ; WX 500 ; N questiondown ; B 38 -190 440 559 ;
-C 193 ; WX 333 ; N grave ; B 35 624 233 765 ;
-C 194 ; WX 333 ; N acute ; B 100 624 298 765 ;
-C 195 ; WX 333 ; N circumflex ; B 21 624 313 765 ;
-C 196 ; WX 333 ; N tilde ; B -3 633 337 749 ;
-C 197 ; WX 333 ; N macron ; B 10 657 323 715 ;
-C 198 ; WX 333 ; N breve ; B 12 629 321 765 ;
-C 199 ; WX 250 ; N dotaccent ; B 86 650 165 750 ;
-C 200 ; WX 333 ; N dieresis ; B 52 650 281 750 ;
-C 202 ; WX 250 ; N ring ; B 23 593 227 796 ;
-C 203 ; WX 333 ; N cedilla ; B 66 -224 281 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 61 624 440 765 ;
-C 206 ; WX 333 ; N ogonek ; B 0 -191 208 13 ;
-C 207 ; WX 333 ; N caron ; B 21 624 313 765 ;
-C 208 ; WX 1000 ; N emdash ; B 0 275 1000 345 ;
-C 225 ; WX 833 ; N AE ; B 0 0 785 750 ;
-C 227 ; WX 300 ; N ordfeminine ; B 25 413 276 765 ;
-C 232 ; WX 500 ; N Lslash ; B -13 0 472 750 ;
-C 233 ; WX 611 ; N Oslash ; B 29 -43 573 796 ;
-C 234 ; WX 833 ; N OE ; B 56 -18 787 765 ;
-C 235 ; WX 300 ; N ordmasculine ; B 20 413 279 765 ;
-C 241 ; WX 667 ; N ae ; B 26 -15 630 571 ;
-C 245 ; WX 222 ; N dotlessi ; B 72 0 151 556 ;
-C 248 ; WX 222 ; N lslash ; B -8 0 231 750 ;
-C 249 ; WX 500 ; N oslash ; B 25 -46 472 582 ;
-C 250 ; WX 722 ; N oe ; B 40 -15 676 571 ;
-C 251 ; WX 500 ; N germandbls ; B 71 -5 445 765 ;
-C -1 ; WX 444 ; N ecircumflex ; B 43 -15 395 765 ;
-C -1 ; WX 444 ; N edieresis ; B 43 -15 395 750 ;
-C -1 ; WX 444 ; N aacute ; B 31 -15 417 765 ;
-C -1 ; WX 800 ; N registered ; B 8 -18 792 765 ;
-C -1 ; WX 222 ; N icircumflex ; B -34 0 258 765 ;
-C -1 ; WX 500 ; N udieresis ; B 77 -15 424 750 ;
-C -1 ; WX 500 ; N ograve ; B 51 -15 449 765 ;
-C -1 ; WX 500 ; N uacute ; B 77 -15 424 765 ;
-C -1 ; WX 500 ; N ucircumflex ; B 77 -15 424 765 ;
-C -1 ; WX 556 ; N Aacute ; B 11 0 546 959 ;
-C -1 ; WX 222 ; N igrave ; B -20 0 178 765 ;
-C -1 ; WX 278 ; N Icircumflex ; B -6 0 286 959 ;
-C -1 ; WX 444 ; N ccedilla ; B 44 -224 405 571 ;
-C -1 ; WX 444 ; N adieresis ; B 31 -15 417 750 ;
-C -1 ; WX 500 ; N Ecircumflex ; B 74 0 451 959 ;
-C -1 ; WX 444 ; N scaron ; B 43 -15 400 765 ;
-C -1 ; WX 500 ; N thorn ; B 72 -188 447 750 ;
-C -1 ; WX 750 ; N trademark ; B 0 329 719 750 ;
-C -1 ; WX 444 ; N egrave ; B 43 -15 395 765 ;
-C -1 ; WX 300 ; N threesuperior ; B 17 291 283 750 ;
-C -1 ; WX 389 ; N zcaron ; B 24 0 366 765 ;
-C -1 ; WX 444 ; N atilde ; B 31 -15 417 749 ;
-C -1 ; WX 444 ; N aring ; B 31 -15 417 826 ;
-C -1 ; WX 500 ; N ocircumflex ; B 51 -15 449 765 ;
-C -1 ; WX 500 ; N Edieresis ; B 74 0 451 944 ;
-C -1 ; WX 750 ; N threequarters ; B 21 0 730 750 ;
-C -1 ; WX 444 ; N ydieresis ; B 5 -190 425 750 ;
-C -1 ; WX 444 ; N yacute ; B 5 -190 425 765 ;
-C -1 ; WX 222 ; N iacute ; B 45 0 243 765 ;
-C -1 ; WX 556 ; N Acircumflex ; B 11 0 546 959 ;
-C -1 ; WX 611 ; N Uacute ; B 81 -18 531 959 ;
-C -1 ; WX 444 ; N eacute ; B 43 -15 395 765 ;
-C -1 ; WX 611 ; N Ograve ; B 59 -18 553 959 ;
-C -1 ; WX 444 ; N agrave ; B 31 -15 417 765 ;
-C -1 ; WX 611 ; N Udieresis ; B 81 -18 531 944 ;
-C -1 ; WX 444 ; N acircumflex ; B 31 -15 417 765 ;
-C -1 ; WX 278 ; N Igrave ; B 8 0 206 959 ;
-C -1 ; WX 300 ; N twosuperior ; B 19 300 281 750 ;
-C -1 ; WX 611 ; N Ugrave ; B 81 -18 531 959 ;
-C -1 ; WX 750 ; N onequarter ; B 34 0 716 750 ;
-C -1 ; WX 611 ; N Ucircumflex ; B 81 -18 531 959 ;
-C -1 ; WX 556 ; N Scaron ; B 51 -18 505 959 ;
-C -1 ; WX 278 ; N Idieresis ; B 25 0 254 944 ;
-C -1 ; WX 222 ; N idieresis ; B -3 0 226 750 ;
-C -1 ; WX 500 ; N Egrave ; B 74 0 451 959 ;
-C -1 ; WX 611 ; N Oacute ; B 59 -18 553 959 ;
-C -1 ; WX 500 ; N divide ; B 44 3 457 505 ;
-C -1 ; WX 556 ; N Atilde ; B 11 0 546 943 ;
-C -1 ; WX 556 ; N Aring ; B 11 0 546 990 ;
-C -1 ; WX 611 ; N Odieresis ; B 59 -18 553 944 ;
-C -1 ; WX 556 ; N Adieresis ; B 11 0 546 944 ;
-C -1 ; WX 611 ; N Ntilde ; B 77 0 534 943 ;
-C -1 ; WX 500 ; N Zcaron ; B 28 0 473 959 ;
-C -1 ; WX 556 ; N Thorn ; B 86 0 519 750 ;
-C -1 ; WX 278 ; N Iacute ; B 73 0 271 959 ;
-C -1 ; WX 500 ; N plusminus ; B 44 0 457 505 ;
-C -1 ; WX 500 ; N multiply ; B 44 48 457 461 ;
-C -1 ; WX 500 ; N Eacute ; B 74 0 451 959 ;
-C -1 ; WX 556 ; N Ydieresis ; B 11 0 546 944 ;
-C -1 ; WX 300 ; N onesuperior ; B 67 300 233 750 ;
-C -1 ; WX 500 ; N ugrave ; B 77 -15 424 765 ;
-C -1 ; WX 500 ; N logicalnot ; B 44 117 457 384 ;
-C -1 ; WX 500 ; N ntilde ; B 73 0 428 749 ;
-C -1 ; WX 611 ; N Otilde ; B 59 -18 553 943 ;
-C -1 ; WX 500 ; N otilde ; B 51 -15 449 749 ;
-C -1 ; WX 556 ; N Ccedilla ; B 53 -224 503 765 ;
-C -1 ; WX 556 ; N Agrave ; B 11 0 546 959 ;
-C -1 ; WX 750 ; N onehalf ; B 42 0 709 750 ;
-C -1 ; WX 611 ; N Eth ; B 9 0 548 750 ;
-C -1 ; WX 400 ; N degree ; B 50 450 350 750 ;
-C -1 ; WX 556 ; N Yacute ; B 11 0 546 959 ;
-C -1 ; WX 611 ; N Ocircumflex ; B 59 -18 553 959 ;
-C -1 ; WX 500 ; N oacute ; B 51 -15 449 765 ;
-C -1 ; WX 500 ; N mu ; B 75 -189 422 556 ;
-C -1 ; WX 500 ; N minus ; B 44 219 457 289 ;
-C -1 ; WX 500 ; N eth ; B 51 -15 449 831 ;
-C -1 ; WX 500 ; N odieresis ; B 51 -15 449 750 ;
-C -1 ; WX 800 ; N copyright ; B 8 -18 792 765 ;
-C -1 ; WX 250 ; N brokenbar ; B 93 -175 157 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 90
-
-KPX A y -18
-KPX A w -18
-KPX A v -18
-KPX A quoteright -55
-KPX A Y -55
-KPX A W -37
-KPX A V -37
-KPX A T -55
-
-KPX F period -111
-KPX F comma -111
-KPX F A -37
-
-KPX L y -37
-KPX L quoteright -92
-KPX L Y -92
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -37
-
-KPX R Y -18
-KPX R T -18
-
-KPX T y -55
-KPX T w -74
-KPX T u -74
-KPX T semicolon -74
-KPX T s -74
-KPX T r -74
-KPX T period -92
-KPX T o -74
-KPX T i -18
-KPX T hyphen -55
-KPX T e -74
-KPX T comma -92
-KPX T colon -74
-KPX T c -74
-KPX T a -74
-KPX T A -55
-
-KPX V u -18
-KPX V semicolon -18
-KPX V r -18
-KPX V period -92
-KPX V o -18
-KPX V hyphen -18
-KPX V e -18
-KPX V comma -92
-KPX V colon -18
-KPX V a -18
-KPX V A -37
-
-KPX W period -74
-KPX W o -18
-KPX W hyphen -18
-KPX W e -18
-KPX W comma -74
-KPX W a -18
-KPX W A -18
-
-KPX Y v -18
-KPX Y u -37
-KPX Y semicolon -37
-KPX Y q -55
-KPX Y period -111
-KPX Y p -37
-KPX Y o -55
-KPX Y i -18
-KPX Y hyphen -74
-KPX Y e -55
-KPX Y comma -111
-KPX Y colon -37
-KPX Y a -55
-KPX Y A -55
-
-KPX f quoteright 18
-
-KPX quoteleft quoteleft -18
-
-KPX quoteright s -55
-KPX quoteright quoteright -18
-
-KPX r z 20
-KPX r y 18
-KPX r x 20
-KPX r w 18
-KPX r v 18
-KPX r period -74
-KPX r hyphen -37
-KPX r f 20
-KPX r comma -74
-KPX r c -20
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -37
-KPX w comma -37
-
-KPX y period -55
-KPX y comma -55
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 112 194 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 112 194 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 112 194 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 112 194 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 153 194 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 112 194 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 84 194 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 84 194 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 84 194 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 84 194 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 194 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 194 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 194 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 194 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 139 194 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 139 194 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 139 194 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 139 194 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 139 194 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 139 194 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 194 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 139 194 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 139 194 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 139 194 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 139 194 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 112 194 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 112 194 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 84 194 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 56 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 56 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 82 30 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -55 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -55 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -55 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -55 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 56 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 56 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Narrow-Bold.afm b/blt3.0/library/AFM/Helvetica-Narrow-Bold.afm
deleted file mode 100644
index 3fdd6ef..0000000
--- a/blt3.0/library/AFM/Helvetica-Narrow-Bold.afm
+++ /dev/null
@@ -1,571 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 11:47:27 1990
-Comment UniqueID 28398
-Comment VMusage 7614 43068
-FontName Helvetica-Narrow-Bold
-FullName Helvetica Narrow Bold
-FamilyName Helvetica
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -139 -228 822 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 228 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 273 ; N exclam ; B 74 0 200 718 ;
-C 34 ; WX 389 ; N quotedbl ; B 80 447 308 718 ;
-C 35 ; WX 456 ; N numbersign ; B 15 0 441 698 ;
-C 36 ; WX 456 ; N dollar ; B 25 -115 429 775 ;
-C 37 ; WX 729 ; N percent ; B 23 -19 706 710 ;
-C 38 ; WX 592 ; N ampersand ; B 44 -19 575 718 ;
-C 39 ; WX 228 ; N quoteright ; B 57 445 171 718 ;
-C 40 ; WX 273 ; N parenleft ; B 29 -208 257 734 ;
-C 41 ; WX 273 ; N parenright ; B 16 -208 244 734 ;
-C 42 ; WX 319 ; N asterisk ; B 22 387 297 718 ;
-C 43 ; WX 479 ; N plus ; B 33 0 446 506 ;
-C 44 ; WX 228 ; N comma ; B 52 -168 175 146 ;
-C 45 ; WX 273 ; N hyphen ; B 22 215 251 345 ;
-C 46 ; WX 228 ; N period ; B 52 0 175 146 ;
-C 47 ; WX 228 ; N slash ; B -27 -19 255 737 ;
-C 48 ; WX 456 ; N zero ; B 26 -19 430 710 ;
-C 49 ; WX 456 ; N one ; B 57 0 310 710 ;
-C 50 ; WX 456 ; N two ; B 21 0 419 710 ;
-C 51 ; WX 456 ; N three ; B 22 -19 423 710 ;
-C 52 ; WX 456 ; N four ; B 22 0 431 710 ;
-C 53 ; WX 456 ; N five ; B 22 -19 423 698 ;
-C 54 ; WX 456 ; N six ; B 25 -19 426 710 ;
-C 55 ; WX 456 ; N seven ; B 20 0 433 698 ;
-C 56 ; WX 456 ; N eight ; B 26 -19 430 710 ;
-C 57 ; WX 456 ; N nine ; B 25 -19 428 710 ;
-C 58 ; WX 273 ; N colon ; B 75 0 198 512 ;
-C 59 ; WX 273 ; N semicolon ; B 75 -168 198 512 ;
-C 60 ; WX 479 ; N less ; B 31 -8 448 514 ;
-C 61 ; WX 479 ; N equal ; B 33 87 446 419 ;
-C 62 ; WX 479 ; N greater ; B 31 -8 448 514 ;
-C 63 ; WX 501 ; N question ; B 49 0 456 727 ;
-C 64 ; WX 800 ; N at ; B 97 -19 702 737 ;
-C 65 ; WX 592 ; N A ; B 16 0 576 718 ;
-C 66 ; WX 592 ; N B ; B 62 0 549 718 ;
-C 67 ; WX 592 ; N C ; B 36 -19 561 737 ;
-C 68 ; WX 592 ; N D ; B 62 0 562 718 ;
-C 69 ; WX 547 ; N E ; B 62 0 509 718 ;
-C 70 ; WX 501 ; N F ; B 62 0 481 718 ;
-C 71 ; WX 638 ; N G ; B 36 -19 585 737 ;
-C 72 ; WX 592 ; N H ; B 58 0 534 718 ;
-C 73 ; WX 228 ; N I ; B 52 0 175 718 ;
-C 74 ; WX 456 ; N J ; B 18 -18 397 718 ;
-C 75 ; WX 592 ; N K ; B 71 0 592 718 ;
-C 76 ; WX 501 ; N L ; B 62 0 478 718 ;
-C 77 ; WX 683 ; N M ; B 57 0 627 718 ;
-C 78 ; WX 592 ; N N ; B 57 0 536 718 ;
-C 79 ; WX 638 ; N O ; B 36 -19 602 737 ;
-C 80 ; WX 547 ; N P ; B 62 0 514 718 ;
-C 81 ; WX 638 ; N Q ; B 36 -52 604 737 ;
-C 82 ; WX 592 ; N R ; B 62 0 555 718 ;
-C 83 ; WX 547 ; N S ; B 32 -19 516 737 ;
-C 84 ; WX 501 ; N T ; B 11 0 490 718 ;
-C 85 ; WX 592 ; N U ; B 59 -19 534 718 ;
-C 86 ; WX 547 ; N V ; B 16 0 531 718 ;
-C 87 ; WX 774 ; N W ; B 13 0 762 718 ;
-C 88 ; WX 547 ; N X ; B 11 0 535 718 ;
-C 89 ; WX 547 ; N Y ; B 12 0 535 718 ;
-C 90 ; WX 501 ; N Z ; B 20 0 481 718 ;
-C 91 ; WX 273 ; N bracketleft ; B 52 -196 253 722 ;
-C 92 ; WX 228 ; N backslash ; B -27 -19 255 737 ;
-C 93 ; WX 273 ; N bracketright ; B 20 -196 221 722 ;
-C 94 ; WX 479 ; N asciicircum ; B 51 323 428 698 ;
-C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ;
-C 96 ; WX 228 ; N quoteleft ; B 57 454 171 727 ;
-C 97 ; WX 456 ; N a ; B 24 -14 432 546 ;
-C 98 ; WX 501 ; N b ; B 50 -14 474 718 ;
-C 99 ; WX 456 ; N c ; B 28 -14 430 546 ;
-C 100 ; WX 501 ; N d ; B 28 -14 452 718 ;
-C 101 ; WX 456 ; N e ; B 19 -14 433 546 ;
-C 102 ; WX 273 ; N f ; B 8 0 261 727 ; L i fi ; L l fl ;
-C 103 ; WX 501 ; N g ; B 33 -217 453 546 ;
-C 104 ; WX 501 ; N h ; B 53 0 448 718 ;
-C 105 ; WX 228 ; N i ; B 57 0 171 725 ;
-C 106 ; WX 228 ; N j ; B 2 -214 171 725 ;
-C 107 ; WX 456 ; N k ; B 57 0 461 718 ;
-C 108 ; WX 228 ; N l ; B 57 0 171 718 ;
-C 109 ; WX 729 ; N m ; B 52 0 677 546 ;
-C 110 ; WX 501 ; N n ; B 53 0 448 546 ;
-C 111 ; WX 501 ; N o ; B 28 -14 474 546 ;
-C 112 ; WX 501 ; N p ; B 51 -207 474 546 ;
-C 113 ; WX 501 ; N q ; B 28 -207 453 546 ;
-C 114 ; WX 319 ; N r ; B 52 0 306 546 ;
-C 115 ; WX 456 ; N s ; B 25 -14 426 546 ;
-C 116 ; WX 273 ; N t ; B 8 -6 253 676 ;
-C 117 ; WX 501 ; N u ; B 54 -14 447 532 ;
-C 118 ; WX 456 ; N v ; B 11 0 445 532 ;
-C 119 ; WX 638 ; N w ; B 8 0 631 532 ;
-C 120 ; WX 456 ; N x ; B 12 0 444 532 ;
-C 121 ; WX 456 ; N y ; B 8 -214 442 532 ;
-C 122 ; WX 410 ; N z ; B 16 0 394 532 ;
-C 123 ; WX 319 ; N braceleft ; B 39 -196 299 722 ;
-C 124 ; WX 230 ; N bar ; B 69 -19 161 737 ;
-C 125 ; WX 319 ; N braceright ; B 20 -196 280 722 ;
-C 126 ; WX 479 ; N asciitilde ; B 50 163 429 343 ;
-C 161 ; WX 273 ; N exclamdown ; B 74 -186 200 532 ;
-C 162 ; WX 456 ; N cent ; B 28 -118 430 628 ;
-C 163 ; WX 456 ; N sterling ; B 23 -16 444 718 ;
-C 164 ; WX 137 ; N fraction ; B -139 -19 276 710 ;
-C 165 ; WX 456 ; N yen ; B -7 0 463 698 ;
-C 166 ; WX 456 ; N florin ; B -8 -210 423 737 ;
-C 167 ; WX 456 ; N section ; B 28 -184 428 727 ;
-C 168 ; WX 456 ; N currency ; B -2 76 458 636 ;
-C 169 ; WX 195 ; N quotesingle ; B 57 447 138 718 ;
-C 170 ; WX 410 ; N quotedblleft ; B 52 454 358 727 ;
-C 171 ; WX 456 ; N guillemotleft ; B 72 76 384 484 ;
-C 172 ; WX 273 ; N guilsinglleft ; B 68 76 205 484 ;
-C 173 ; WX 273 ; N guilsinglright ; B 68 76 205 484 ;
-C 174 ; WX 501 ; N fi ; B 8 0 444 727 ;
-C 175 ; WX 501 ; N fl ; B 8 0 444 727 ;
-C 177 ; WX 456 ; N endash ; B 0 227 456 333 ;
-C 178 ; WX 456 ; N dagger ; B 30 -171 426 718 ;
-C 179 ; WX 456 ; N daggerdbl ; B 30 -171 426 718 ;
-C 180 ; WX 228 ; N periodcentered ; B 48 172 180 334 ;
-C 182 ; WX 456 ; N paragraph ; B -7 -191 442 700 ;
-C 183 ; WX 287 ; N bullet ; B 8 194 279 524 ;
-C 184 ; WX 228 ; N quotesinglbase ; B 57 -146 171 127 ;
-C 185 ; WX 410 ; N quotedblbase ; B 52 -146 358 127 ;
-C 186 ; WX 410 ; N quotedblright ; B 52 445 358 718 ;
-C 187 ; WX 456 ; N guillemotright ; B 72 76 384 484 ;
-C 188 ; WX 820 ; N ellipsis ; B 75 0 745 146 ;
-C 189 ; WX 820 ; N perthousand ; B -2 -19 822 710 ;
-C 191 ; WX 501 ; N questiondown ; B 45 -195 452 532 ;
-C 193 ; WX 273 ; N grave ; B -19 604 184 750 ;
-C 194 ; WX 273 ; N acute ; B 89 604 292 750 ;
-C 195 ; WX 273 ; N circumflex ; B -8 604 281 750 ;
-C 196 ; WX 273 ; N tilde ; B -14 610 287 737 ;
-C 197 ; WX 273 ; N macron ; B -5 604 278 678 ;
-C 198 ; WX 273 ; N breve ; B -2 604 275 750 ;
-C 199 ; WX 273 ; N dotaccent ; B 85 614 189 729 ;
-C 200 ; WX 273 ; N dieresis ; B 5 614 268 729 ;
-C 202 ; WX 273 ; N ring ; B 48 568 225 776 ;
-C 203 ; WX 273 ; N cedilla ; B 5 -228 201 0 ;
-C 205 ; WX 273 ; N hungarumlaut ; B 7 604 399 750 ;
-C 206 ; WX 273 ; N ogonek ; B 58 -228 249 0 ;
-C 207 ; WX 273 ; N caron ; B -8 604 281 750 ;
-C 208 ; WX 820 ; N emdash ; B 0 227 820 333 ;
-C 225 ; WX 820 ; N AE ; B 4 0 782 718 ;
-C 227 ; WX 303 ; N ordfeminine ; B 18 276 285 737 ;
-C 232 ; WX 501 ; N Lslash ; B -16 0 478 718 ;
-C 233 ; WX 638 ; N Oslash ; B 27 -27 610 745 ;
-C 234 ; WX 820 ; N OE ; B 30 -19 788 737 ;
-C 235 ; WX 299 ; N ordmasculine ; B 5 276 295 737 ;
-C 241 ; WX 729 ; N ae ; B 24 -14 704 546 ;
-C 245 ; WX 228 ; N dotlessi ; B 57 0 171 532 ;
-C 248 ; WX 228 ; N lslash ; B -15 0 243 718 ;
-C 249 ; WX 501 ; N oslash ; B 18 -29 483 560 ;
-C 250 ; WX 774 ; N oe ; B 28 -14 748 546 ;
-C 251 ; WX 501 ; N germandbls ; B 57 -14 475 731 ;
-C -1 ; WX 501 ; N Zcaron ; B 20 0 481 936 ;
-C -1 ; WX 456 ; N ccedilla ; B 28 -228 430 546 ;
-C -1 ; WX 456 ; N ydieresis ; B 8 -214 442 729 ;
-C -1 ; WX 456 ; N atilde ; B 24 -14 432 737 ;
-C -1 ; WX 228 ; N icircumflex ; B -30 0 259 750 ;
-C -1 ; WX 273 ; N threesuperior ; B 7 271 267 710 ;
-C -1 ; WX 456 ; N ecircumflex ; B 19 -14 433 750 ;
-C -1 ; WX 501 ; N thorn ; B 51 -208 474 718 ;
-C -1 ; WX 456 ; N egrave ; B 19 -14 433 750 ;
-C -1 ; WX 273 ; N twosuperior ; B 7 283 266 710 ;
-C -1 ; WX 456 ; N eacute ; B 19 -14 433 750 ;
-C -1 ; WX 501 ; N otilde ; B 28 -14 474 737 ;
-C -1 ; WX 592 ; N Aacute ; B 16 0 576 936 ;
-C -1 ; WX 501 ; N ocircumflex ; B 28 -14 474 750 ;
-C -1 ; WX 456 ; N yacute ; B 8 -214 442 750 ;
-C -1 ; WX 501 ; N udieresis ; B 54 -14 447 729 ;
-C -1 ; WX 684 ; N threequarters ; B 13 -19 655 710 ;
-C -1 ; WX 456 ; N acircumflex ; B 24 -14 432 750 ;
-C -1 ; WX 592 ; N Eth ; B -4 0 562 718 ;
-C -1 ; WX 456 ; N edieresis ; B 19 -14 433 729 ;
-C -1 ; WX 501 ; N ugrave ; B 54 -14 447 750 ;
-C -1 ; WX 820 ; N trademark ; B 36 306 784 718 ;
-C -1 ; WX 501 ; N ograve ; B 28 -14 474 750 ;
-C -1 ; WX 456 ; N scaron ; B 25 -14 426 750 ;
-C -1 ; WX 228 ; N Idieresis ; B -17 0 246 915 ;
-C -1 ; WX 501 ; N uacute ; B 54 -14 447 750 ;
-C -1 ; WX 456 ; N agrave ; B 24 -14 432 750 ;
-C -1 ; WX 501 ; N ntilde ; B 53 0 448 737 ;
-C -1 ; WX 456 ; N aring ; B 24 -14 432 776 ;
-C -1 ; WX 410 ; N zcaron ; B 16 0 394 750 ;
-C -1 ; WX 228 ; N Icircumflex ; B -30 0 259 936 ;
-C -1 ; WX 592 ; N Ntilde ; B 57 0 536 923 ;
-C -1 ; WX 501 ; N ucircumflex ; B 54 -14 447 750 ;
-C -1 ; WX 547 ; N Ecircumflex ; B 62 0 509 936 ;
-C -1 ; WX 228 ; N Iacute ; B 52 0 270 936 ;
-C -1 ; WX 592 ; N Ccedilla ; B 36 -228 561 737 ;
-C -1 ; WX 638 ; N Odieresis ; B 36 -19 602 915 ;
-C -1 ; WX 547 ; N Scaron ; B 32 -19 516 936 ;
-C -1 ; WX 547 ; N Edieresis ; B 62 0 509 915 ;
-C -1 ; WX 228 ; N Igrave ; B -41 0 175 936 ;
-C -1 ; WX 456 ; N adieresis ; B 24 -14 432 729 ;
-C -1 ; WX 638 ; N Ograve ; B 36 -19 602 936 ;
-C -1 ; WX 547 ; N Egrave ; B 62 0 509 936 ;
-C -1 ; WX 547 ; N Ydieresis ; B 12 0 535 915 ;
-C -1 ; WX 604 ; N registered ; B -9 -19 613 737 ;
-C -1 ; WX 638 ; N Otilde ; B 36 -19 602 923 ;
-C -1 ; WX 684 ; N onequarter ; B 21 -19 628 710 ;
-C -1 ; WX 592 ; N Ugrave ; B 59 -19 534 936 ;
-C -1 ; WX 592 ; N Ucircumflex ; B 59 -19 534 936 ;
-C -1 ; WX 547 ; N Thorn ; B 62 0 514 718 ;
-C -1 ; WX 479 ; N divide ; B 33 -42 446 548 ;
-C -1 ; WX 592 ; N Atilde ; B 16 0 576 923 ;
-C -1 ; WX 592 ; N Uacute ; B 59 -19 534 936 ;
-C -1 ; WX 638 ; N Ocircumflex ; B 36 -19 602 936 ;
-C -1 ; WX 479 ; N logicalnot ; B 33 108 446 419 ;
-C -1 ; WX 592 ; N Aring ; B 16 0 576 962 ;
-C -1 ; WX 228 ; N idieresis ; B -17 0 246 729 ;
-C -1 ; WX 228 ; N iacute ; B 57 0 270 750 ;
-C -1 ; WX 456 ; N aacute ; B 24 -14 432 750 ;
-C -1 ; WX 479 ; N plusminus ; B 33 0 446 506 ;
-C -1 ; WX 479 ; N multiply ; B 33 1 447 505 ;
-C -1 ; WX 592 ; N Udieresis ; B 59 -19 534 915 ;
-C -1 ; WX 479 ; N minus ; B 33 197 446 309 ;
-C -1 ; WX 273 ; N onesuperior ; B 21 283 194 710 ;
-C -1 ; WX 547 ; N Eacute ; B 62 0 509 936 ;
-C -1 ; WX 592 ; N Acircumflex ; B 16 0 576 936 ;
-C -1 ; WX 604 ; N copyright ; B -9 -19 614 737 ;
-C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ;
-C -1 ; WX 501 ; N odieresis ; B 28 -14 474 729 ;
-C -1 ; WX 501 ; N oacute ; B 28 -14 474 750 ;
-C -1 ; WX 328 ; N degree ; B 47 426 281 712 ;
-C -1 ; WX 228 ; N igrave ; B -41 0 171 750 ;
-C -1 ; WX 501 ; N mu ; B 54 -207 447 532 ;
-C -1 ; WX 638 ; N Oacute ; B 36 -19 602 936 ;
-C -1 ; WX 501 ; N eth ; B 28 -14 474 737 ;
-C -1 ; WX 592 ; N Adieresis ; B 16 0 576 915 ;
-C -1 ; WX 547 ; N Yacute ; B 12 0 535 936 ;
-C -1 ; WX 230 ; N brokenbar ; B 69 -19 161 737 ;
-C -1 ; WX 684 ; N onehalf ; B 21 -19 651 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -24
-KPX A w -24
-KPX A v -32
-KPX A u -24
-KPX A Y -89
-KPX A W -48
-KPX A V -65
-KPX A U -40
-KPX A T -73
-KPX A Q -32
-KPX A O -32
-KPX A G -40
-KPX A C -32
-
-KPX B U -7
-KPX B A -24
-
-KPX D period -24
-KPX D comma -24
-KPX D Y -56
-KPX D W -32
-KPX D V -32
-KPX D A -32
-
-KPX F period -81
-KPX F comma -81
-KPX F a -15
-KPX F A -65
-
-KPX J u -15
-KPX J period -15
-KPX J comma -15
-KPX J A -15
-
-KPX K y -32
-KPX K u -24
-KPX K o -28
-KPX K e -11
-KPX K O -24
-
-KPX L y -24
-KPX L quoteright -114
-KPX L quotedblright -114
-KPX L Y -97
-KPX L W -65
-KPX L V -89
-KPX L T -73
-
-KPX O period -32
-KPX O comma -32
-KPX O Y -56
-KPX O X -40
-KPX O W -40
-KPX O V -40
-KPX O T -32
-KPX O A -40
-
-KPX P period -97
-KPX P o -32
-KPX P e -24
-KPX P comma -97
-KPX P a -24
-KPX P A -81
-
-KPX Q period 16
-KPX Q comma 16
-KPX Q U -7
-
-KPX R Y -40
-KPX R W -32
-KPX R V -40
-KPX R U -15
-KPX R T -15
-KPX R O -15
-
-KPX T y -48
-KPX T w -48
-KPX T u -73
-KPX T semicolon -32
-KPX T r -65
-KPX T period -65
-KPX T o -65
-KPX T hyphen -97
-KPX T e -48
-KPX T comma -65
-KPX T colon -32
-KPX T a -65
-KPX T O -32
-KPX T A -73
-
-KPX U period -24
-KPX U comma -24
-KPX U A -40
-
-KPX V u -48
-KPX V semicolon -32
-KPX V period -97
-KPX V o -73
-KPX V hyphen -65
-KPX V e -40
-KPX V comma -97
-KPX V colon -32
-KPX V a -48
-KPX V O -40
-KPX V G -40
-KPX V A -65
-
-KPX W y -15
-KPX W u -36
-KPX W semicolon -7
-KPX W period -65
-KPX W o -48
-KPX W hyphen -32
-KPX W e -28
-KPX W comma -65
-KPX W colon -7
-KPX W a -32
-KPX W O -15
-KPX W A -48
-
-KPX Y u -81
-KPX Y semicolon -40
-KPX Y period -81
-KPX Y o -81
-KPX Y e -65
-KPX Y comma -81
-KPX Y colon -40
-KPX Y a -73
-KPX Y O -56
-KPX Y A -89
-
-KPX a y -15
-KPX a w -11
-KPX a v -11
-KPX a g -7
-
-KPX b y -15
-KPX b v -15
-KPX b u -15
-KPX b l -7
-
-KPX c y -7
-KPX c l -15
-KPX c k -15
-KPX c h -7
-
-KPX colon space -32
-
-KPX comma space -32
-KPX comma quoteright -97
-KPX comma quotedblright -97
-
-KPX d y -11
-KPX d w -11
-KPX d v -11
-KPX d d -7
-
-KPX e y -11
-KPX e x -11
-KPX e w -11
-KPX e v -11
-KPX e period 16
-KPX e comma 8
-
-KPX f quoteright 25
-KPX f quotedblright 25
-KPX f period -7
-KPX f o -15
-KPX f e -7
-KPX f comma -7
-
-KPX g g -7
-KPX g e 8
-
-KPX h y -15
-
-KPX k o -11
-
-KPX l y -11
-KPX l w -11
-
-KPX m y -24
-KPX m u -15
-
-KPX n y -15
-KPX n v -32
-KPX n u -7
-
-KPX o y -15
-KPX o x -24
-KPX o w -11
-KPX o v -15
-
-KPX p y -11
-
-KPX period space -32
-KPX period quoteright -97
-KPX period quotedblright -97
-
-KPX quotedblright space -65
-
-KPX quoteleft quoteleft -37
-
-KPX quoteright v -15
-KPX quoteright space -65
-KPX quoteright s -48
-KPX quoteright r -32
-KPX quoteright quoteright -37
-KPX quoteright l -15
-KPX quoteright d -65
-
-KPX r y 8
-KPX r v 8
-KPX r t 16
-KPX r s -11
-KPX r q -15
-KPX r period -48
-KPX r o -15
-KPX r hyphen -15
-KPX r g -11
-KPX r d -15
-KPX r comma -48
-KPX r c -15
-
-KPX s w -11
-
-KPX semicolon space -32
-
-KPX space quoteleft -48
-KPX space quotedblleft -65
-KPX space Y -97
-KPX space W -65
-KPX space V -65
-KPX space T -81
-
-KPX v period -65
-KPX v o -24
-KPX v comma -65
-KPX v a -15
-
-KPX w period -32
-KPX w o -15
-KPX w comma -32
-
-KPX x e -7
-
-KPX y period -65
-KPX y o -20
-KPX y e -7
-KPX y comma -65
-KPX y a -24
-
-KPX z e 8
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 160 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 160 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 160 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 160 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 137 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 137 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 137 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 137 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -22 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -22 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -22 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -22 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 160 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 183 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 183 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 183 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 183 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 183 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 137 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 160 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 160 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 160 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 137 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 137 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 114 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 92 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 108 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 114 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 114 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 114 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 114 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 114 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 114 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 92 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 114 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 114 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 114 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 114 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 92 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 92 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Narrow-BoldOblique.afm b/blt3.0/library/AFM/Helvetica-Narrow-BoldOblique.afm
deleted file mode 100644
index ff859b3..0000000
--- a/blt3.0/library/AFM/Helvetica-Narrow-BoldOblique.afm
+++ /dev/null
@@ -1,571 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Thu Mar 15 12:08:57 1990
-Comment UniqueID 28407
-Comment VMusage 7614 43068
-FontName Helvetica-Narrow-BoldOblique
-FullName Helvetica Narrow Bold Oblique
-FamilyName Helvetica
-Weight Bold
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -143 -228 913 962
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 532
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 228 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 273 ; N exclam ; B 77 0 325 718 ;
-C 34 ; WX 389 ; N quotedbl ; B 158 447 433 718 ;
-C 35 ; WX 456 ; N numbersign ; B 49 0 528 698 ;
-C 36 ; WX 456 ; N dollar ; B 55 -115 510 775 ;
-C 37 ; WX 729 ; N percent ; B 112 -19 739 710 ;
-C 38 ; WX 592 ; N ampersand ; B 73 -19 600 718 ;
-C 39 ; WX 228 ; N quoteright ; B 137 445 297 718 ;
-C 40 ; WX 273 ; N parenleft ; B 62 -208 385 734 ;
-C 41 ; WX 273 ; N parenright ; B -21 -208 302 734 ;
-C 42 ; WX 319 ; N asterisk ; B 120 387 394 718 ;
-C 43 ; WX 479 ; N plus ; B 67 0 500 506 ;
-C 44 ; WX 228 ; N comma ; B 23 -168 201 146 ;
-C 45 ; WX 273 ; N hyphen ; B 60 215 311 345 ;
-C 46 ; WX 228 ; N period ; B 52 0 201 146 ;
-C 47 ; WX 228 ; N slash ; B -30 -19 383 737 ;
-C 48 ; WX 456 ; N zero ; B 71 -19 506 710 ;
-C 49 ; WX 456 ; N one ; B 142 0 434 710 ;
-C 50 ; WX 456 ; N two ; B 21 0 508 710 ;
-C 51 ; WX 456 ; N three ; B 54 -19 499 710 ;
-C 52 ; WX 456 ; N four ; B 50 0 490 710 ;
-C 53 ; WX 456 ; N five ; B 53 -19 522 698 ;
-C 54 ; WX 456 ; N six ; B 70 -19 507 710 ;
-C 55 ; WX 456 ; N seven ; B 102 0 555 698 ;
-C 56 ; WX 456 ; N eight ; B 57 -19 505 710 ;
-C 57 ; WX 456 ; N nine ; B 64 -19 504 710 ;
-C 58 ; WX 273 ; N colon ; B 75 0 288 512 ;
-C 59 ; WX 273 ; N semicolon ; B 46 -168 288 512 ;
-C 60 ; WX 479 ; N less ; B 67 -8 537 514 ;
-C 61 ; WX 479 ; N equal ; B 48 87 519 419 ;
-C 62 ; WX 479 ; N greater ; B 30 -8 500 514 ;
-C 63 ; WX 501 ; N question ; B 135 0 550 727 ;
-C 64 ; WX 800 ; N at ; B 152 -19 782 737 ;
-C 65 ; WX 592 ; N A ; B 16 0 576 718 ;
-C 66 ; WX 592 ; N B ; B 62 0 626 718 ;
-C 67 ; WX 592 ; N C ; B 88 -19 647 737 ;
-C 68 ; WX 592 ; N D ; B 62 0 637 718 ;
-C 69 ; WX 547 ; N E ; B 62 0 620 718 ;
-C 70 ; WX 501 ; N F ; B 62 0 606 718 ;
-C 71 ; WX 638 ; N G ; B 89 -19 670 737 ;
-C 72 ; WX 592 ; N H ; B 58 0 659 718 ;
-C 73 ; WX 228 ; N I ; B 52 0 301 718 ;
-C 74 ; WX 456 ; N J ; B 49 -18 522 718 ;
-C 75 ; WX 592 ; N K ; B 71 0 703 718 ;
-C 76 ; WX 501 ; N L ; B 62 0 501 718 ;
-C 77 ; WX 683 ; N M ; B 57 0 752 718 ;
-C 78 ; WX 592 ; N N ; B 57 0 661 718 ;
-C 79 ; WX 638 ; N O ; B 88 -19 675 737 ;
-C 80 ; WX 547 ; N P ; B 62 0 605 718 ;
-C 81 ; WX 638 ; N Q ; B 88 -52 675 737 ;
-C 82 ; WX 592 ; N R ; B 62 0 638 718 ;
-C 83 ; WX 547 ; N S ; B 66 -19 588 737 ;
-C 84 ; WX 501 ; N T ; B 114 0 615 718 ;
-C 85 ; WX 592 ; N U ; B 96 -19 659 718 ;
-C 86 ; WX 547 ; N V ; B 141 0 656 718 ;
-C 87 ; WX 774 ; N W ; B 138 0 887 718 ;
-C 88 ; WX 547 ; N X ; B 11 0 648 718 ;
-C 89 ; WX 547 ; N Y ; B 137 0 661 718 ;
-C 90 ; WX 501 ; N Z ; B 20 0 604 718 ;
-C 91 ; WX 273 ; N bracketleft ; B 17 -196 379 722 ;
-C 92 ; WX 228 ; N backslash ; B 101 -19 252 737 ;
-C 93 ; WX 273 ; N bracketright ; B -14 -196 347 722 ;
-C 94 ; WX 479 ; N asciicircum ; B 107 323 484 698 ;
-C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ;
-C 96 ; WX 228 ; N quoteleft ; B 136 454 296 727 ;
-C 97 ; WX 456 ; N a ; B 45 -14 478 546 ;
-C 98 ; WX 501 ; N b ; B 50 -14 529 718 ;
-C 99 ; WX 456 ; N c ; B 65 -14 491 546 ;
-C 100 ; WX 501 ; N d ; B 67 -14 577 718 ;
-C 101 ; WX 456 ; N e ; B 58 -14 486 546 ;
-C 102 ; WX 273 ; N f ; B 71 0 385 727 ; L i fi ; L l fl ;
-C 103 ; WX 501 ; N g ; B 31 -217 546 546 ;
-C 104 ; WX 501 ; N h ; B 53 0 516 718 ;
-C 105 ; WX 228 ; N i ; B 57 0 298 725 ;
-C 106 ; WX 228 ; N j ; B -35 -214 298 725 ;
-C 107 ; WX 456 ; N k ; B 57 0 549 718 ;
-C 108 ; WX 228 ; N l ; B 57 0 297 718 ;
-C 109 ; WX 729 ; N m ; B 52 0 746 546 ;
-C 110 ; WX 501 ; N n ; B 53 0 516 546 ;
-C 111 ; WX 501 ; N o ; B 67 -14 527 546 ;
-C 112 ; WX 501 ; N p ; B 15 -207 529 546 ;
-C 113 ; WX 501 ; N q ; B 66 -207 545 546 ;
-C 114 ; WX 319 ; N r ; B 52 0 401 546 ;
-C 115 ; WX 456 ; N s ; B 52 -14 479 546 ;
-C 116 ; WX 273 ; N t ; B 82 -6 346 676 ;
-C 117 ; WX 501 ; N u ; B 80 -14 540 532 ;
-C 118 ; WX 456 ; N v ; B 103 0 538 532 ;
-C 119 ; WX 638 ; N w ; B 101 0 723 532 ;
-C 120 ; WX 456 ; N x ; B 12 0 531 532 ;
-C 121 ; WX 456 ; N y ; B 34 -214 535 532 ;
-C 122 ; WX 410 ; N z ; B 16 0 478 532 ;
-C 123 ; WX 319 ; N braceleft ; B 77 -196 425 722 ;
-C 124 ; WX 230 ; N bar ; B 66 -19 289 737 ;
-C 125 ; WX 319 ; N braceright ; B -14 -196 333 722 ;
-C 126 ; WX 479 ; N asciitilde ; B 94 163 473 343 ;
-C 161 ; WX 273 ; N exclamdown ; B 41 -186 290 532 ;
-C 162 ; WX 456 ; N cent ; B 65 -118 491 628 ;
-C 163 ; WX 456 ; N sterling ; B 41 -16 520 718 ;
-C 164 ; WX 137 ; N fraction ; B -143 -19 399 710 ;
-C 165 ; WX 456 ; N yen ; B 49 0 585 698 ;
-C 166 ; WX 456 ; N florin ; B -41 -210 548 737 ;
-C 167 ; WX 456 ; N section ; B 50 -184 491 727 ;
-C 168 ; WX 456 ; N currency ; B 22 76 558 636 ;
-C 169 ; WX 195 ; N quotesingle ; B 135 447 263 718 ;
-C 170 ; WX 410 ; N quotedblleft ; B 132 454 482 727 ;
-C 171 ; WX 456 ; N guillemotleft ; B 111 76 468 484 ;
-C 172 ; WX 273 ; N guilsinglleft ; B 106 76 289 484 ;
-C 173 ; WX 273 ; N guilsinglright ; B 81 76 264 484 ;
-C 174 ; WX 501 ; N fi ; B 71 0 571 727 ;
-C 175 ; WX 501 ; N fl ; B 71 0 570 727 ;
-C 177 ; WX 456 ; N endash ; B 40 227 514 333 ;
-C 178 ; WX 456 ; N dagger ; B 97 -171 513 718 ;
-C 179 ; WX 456 ; N daggerdbl ; B 38 -171 515 718 ;
-C 180 ; WX 228 ; N periodcentered ; B 90 172 226 334 ;
-C 182 ; WX 456 ; N paragraph ; B 80 -191 564 700 ;
-C 183 ; WX 287 ; N bullet ; B 68 194 345 524 ;
-C 184 ; WX 228 ; N quotesinglbase ; B 34 -146 194 127 ;
-C 185 ; WX 410 ; N quotedblbase ; B 29 -146 380 127 ;
-C 186 ; WX 410 ; N quotedblright ; B 132 445 483 718 ;
-C 187 ; WX 456 ; N guillemotright ; B 85 76 443 484 ;
-C 188 ; WX 820 ; N ellipsis ; B 75 0 770 146 ;
-C 189 ; WX 820 ; N perthousand ; B 62 -19 851 710 ;
-C 191 ; WX 501 ; N questiondown ; B 44 -195 459 532 ;
-C 193 ; WX 273 ; N grave ; B 112 604 290 750 ;
-C 194 ; WX 273 ; N acute ; B 194 604 423 750 ;
-C 195 ; WX 273 ; N circumflex ; B 97 604 387 750 ;
-C 196 ; WX 273 ; N tilde ; B 92 610 415 737 ;
-C 197 ; WX 273 ; N macron ; B 100 604 396 678 ;
-C 198 ; WX 273 ; N breve ; B 128 604 405 750 ;
-C 199 ; WX 273 ; N dotaccent ; B 192 614 316 729 ;
-C 200 ; WX 273 ; N dieresis ; B 112 614 395 729 ;
-C 202 ; WX 273 ; N ring ; B 164 568 344 776 ;
-C 203 ; WX 273 ; N cedilla ; B -30 -228 180 0 ;
-C 205 ; WX 273 ; N hungarumlaut ; B 113 604 529 750 ;
-C 206 ; WX 273 ; N ogonek ; B 33 -228 216 0 ;
-C 207 ; WX 273 ; N caron ; B 123 604 412 750 ;
-C 208 ; WX 820 ; N emdash ; B 40 227 878 333 ;
-C 225 ; WX 820 ; N AE ; B 4 0 902 718 ;
-C 227 ; WX 303 ; N ordfeminine ; B 75 276 381 737 ;
-C 232 ; WX 501 ; N Lslash ; B 28 0 501 718 ;
-C 233 ; WX 638 ; N Oslash ; B 29 -27 733 745 ;
-C 234 ; WX 820 ; N OE ; B 81 -19 913 737 ;
-C 235 ; WX 299 ; N ordmasculine ; B 75 276 398 737 ;
-C 241 ; WX 729 ; N ae ; B 46 -14 757 546 ;
-C 245 ; WX 228 ; N dotlessi ; B 57 0 264 532 ;
-C 248 ; WX 228 ; N lslash ; B 33 0 334 718 ;
-C 249 ; WX 501 ; N oslash ; B 18 -29 575 560 ;
-C 250 ; WX 774 ; N oe ; B 67 -14 801 546 ;
-C 251 ; WX 501 ; N germandbls ; B 57 -14 539 731 ;
-C -1 ; WX 501 ; N Zcaron ; B 20 0 604 936 ;
-C -1 ; WX 456 ; N ccedilla ; B 65 -228 491 546 ;
-C -1 ; WX 456 ; N ydieresis ; B 34 -214 535 729 ;
-C -1 ; WX 456 ; N atilde ; B 45 -14 507 737 ;
-C -1 ; WX 228 ; N icircumflex ; B 57 0 364 750 ;
-C -1 ; WX 273 ; N threesuperior ; B 75 271 361 710 ;
-C -1 ; WX 456 ; N ecircumflex ; B 58 -14 486 750 ;
-C -1 ; WX 501 ; N thorn ; B 15 -208 529 718 ;
-C -1 ; WX 456 ; N egrave ; B 58 -14 486 750 ;
-C -1 ; WX 273 ; N twosuperior ; B 57 283 368 710 ;
-C -1 ; WX 456 ; N eacute ; B 58 -14 514 750 ;
-C -1 ; WX 501 ; N otilde ; B 67 -14 529 737 ;
-C -1 ; WX 592 ; N Aacute ; B 16 0 615 936 ;
-C -1 ; WX 501 ; N ocircumflex ; B 67 -14 527 750 ;
-C -1 ; WX 456 ; N yacute ; B 34 -214 535 750 ;
-C -1 ; WX 501 ; N udieresis ; B 80 -14 540 729 ;
-C -1 ; WX 684 ; N threequarters ; B 82 -19 688 710 ;
-C -1 ; WX 456 ; N acircumflex ; B 45 -14 478 750 ;
-C -1 ; WX 592 ; N Eth ; B 51 0 637 718 ;
-C -1 ; WX 456 ; N edieresis ; B 58 -14 487 729 ;
-C -1 ; WX 501 ; N ugrave ; B 80 -14 540 750 ;
-C -1 ; WX 820 ; N trademark ; B 146 306 909 718 ;
-C -1 ; WX 501 ; N ograve ; B 67 -14 527 750 ;
-C -1 ; WX 456 ; N scaron ; B 52 -14 504 750 ;
-C -1 ; WX 228 ; N Idieresis ; B 52 0 405 915 ;
-C -1 ; WX 501 ; N uacute ; B 80 -14 540 750 ;
-C -1 ; WX 456 ; N agrave ; B 45 -14 478 750 ;
-C -1 ; WX 501 ; N ntilde ; B 53 0 529 737 ;
-C -1 ; WX 456 ; N aring ; B 45 -14 478 776 ;
-C -1 ; WX 410 ; N zcaron ; B 16 0 481 750 ;
-C -1 ; WX 228 ; N Icircumflex ; B 52 0 397 936 ;
-C -1 ; WX 592 ; N Ntilde ; B 57 0 661 923 ;
-C -1 ; WX 501 ; N ucircumflex ; B 80 -14 540 750 ;
-C -1 ; WX 547 ; N Ecircumflex ; B 62 0 620 936 ;
-C -1 ; WX 228 ; N Iacute ; B 52 0 433 936 ;
-C -1 ; WX 592 ; N Ccedilla ; B 88 -228 647 737 ;
-C -1 ; WX 638 ; N Odieresis ; B 88 -19 675 915 ;
-C -1 ; WX 547 ; N Scaron ; B 66 -19 588 936 ;
-C -1 ; WX 547 ; N Edieresis ; B 62 0 620 915 ;
-C -1 ; WX 228 ; N Igrave ; B 52 0 301 936 ;
-C -1 ; WX 456 ; N adieresis ; B 45 -14 487 729 ;
-C -1 ; WX 638 ; N Ograve ; B 88 -19 675 936 ;
-C -1 ; WX 547 ; N Egrave ; B 62 0 620 936 ;
-C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 915 ;
-C -1 ; WX 604 ; N registered ; B 45 -19 684 737 ;
-C -1 ; WX 638 ; N Otilde ; B 88 -19 675 923 ;
-C -1 ; WX 684 ; N onequarter ; B 108 -19 661 710 ;
-C -1 ; WX 592 ; N Ugrave ; B 96 -19 659 936 ;
-C -1 ; WX 592 ; N Ucircumflex ; B 96 -19 659 936 ;
-C -1 ; WX 547 ; N Thorn ; B 62 0 588 718 ;
-C -1 ; WX 479 ; N divide ; B 67 -42 500 548 ;
-C -1 ; WX 592 ; N Atilde ; B 16 0 608 923 ;
-C -1 ; WX 592 ; N Uacute ; B 96 -19 659 936 ;
-C -1 ; WX 638 ; N Ocircumflex ; B 88 -19 675 936 ;
-C -1 ; WX 479 ; N logicalnot ; B 86 108 519 419 ;
-C -1 ; WX 592 ; N Aring ; B 16 0 576 962 ;
-C -1 ; WX 228 ; N idieresis ; B 57 0 373 729 ;
-C -1 ; WX 228 ; N iacute ; B 57 0 400 750 ;
-C -1 ; WX 456 ; N aacute ; B 45 -14 514 750 ;
-C -1 ; WX 479 ; N plusminus ; B 33 0 512 506 ;
-C -1 ; WX 479 ; N multiply ; B 47 1 520 505 ;
-C -1 ; WX 592 ; N Udieresis ; B 96 -19 659 915 ;
-C -1 ; WX 479 ; N minus ; B 67 197 500 309 ;
-C -1 ; WX 273 ; N onesuperior ; B 121 283 318 710 ;
-C -1 ; WX 547 ; N Eacute ; B 62 0 620 936 ;
-C -1 ; WX 592 ; N Acircumflex ; B 16 0 579 936 ;
-C -1 ; WX 604 ; N copyright ; B 46 -19 685 737 ;
-C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ;
-C -1 ; WX 501 ; N odieresis ; B 67 -14 527 729 ;
-C -1 ; WX 501 ; N oacute ; B 67 -14 537 750 ;
-C -1 ; WX 328 ; N degree ; B 143 426 383 712 ;
-C -1 ; WX 228 ; N igrave ; B 57 0 268 750 ;
-C -1 ; WX 501 ; N mu ; B 18 -207 540 532 ;
-C -1 ; WX 638 ; N Oacute ; B 88 -19 675 936 ;
-C -1 ; WX 501 ; N eth ; B 67 -14 549 737 ;
-C -1 ; WX 592 ; N Adieresis ; B 16 0 588 915 ;
-C -1 ; WX 547 ; N Yacute ; B 137 0 661 936 ;
-C -1 ; WX 230 ; N brokenbar ; B 66 -19 289 737 ;
-C -1 ; WX 684 ; N onehalf ; B 108 -19 704 710 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 209
-
-KPX A y -30
-KPX A w -30
-KPX A v -40
-KPX A u -30
-KPX A Y -110
-KPX A W -60
-KPX A V -80
-KPX A U -50
-KPX A T -90
-KPX A Q -40
-KPX A O -40
-KPX A G -50
-KPX A C -40
-
-KPX B U -10
-KPX B A -30
-
-KPX D period -30
-KPX D comma -30
-KPX D Y -70
-KPX D W -40
-KPX D V -40
-KPX D A -40
-
-KPX F period -100
-KPX F comma -100
-KPX F a -20
-KPX F A -80
-
-KPX J u -20
-KPX J period -20
-KPX J comma -20
-KPX J A -20
-
-KPX K y -40
-KPX K u -30
-KPX K o -35
-KPX K e -15
-KPX K O -30
-
-KPX L y -30
-KPX L quoteright -140
-KPX L quotedblright -140
-KPX L Y -120
-KPX L W -80
-KPX L V -110
-KPX L T -90
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -50
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -50
-
-KPX P period -120
-KPX P o -40
-KPX P e -30
-KPX P comma -120
-KPX P a -30
-KPX P A -100
-
-KPX Q period 20
-KPX Q comma 20
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -40
-KPX R V -50
-KPX R U -20
-KPX R T -20
-KPX R O -20
-
-KPX T y -60
-KPX T w -60
-KPX T u -90
-KPX T semicolon -40
-KPX T r -80
-KPX T period -80
-KPX T o -80
-KPX T hyphen -120
-KPX T e -60
-KPX T comma -80
-KPX T colon -40
-KPX T a -80
-KPX T O -40
-KPX T A -90
-
-KPX U period -30
-KPX U comma -30
-KPX U A -50
-
-KPX V u -60
-KPX V semicolon -40
-KPX V period -120
-KPX V o -90
-KPX V hyphen -80
-KPX V e -50
-KPX V comma -120
-KPX V colon -40
-KPX V a -60
-KPX V O -50
-KPX V G -50
-KPX V A -80
-
-KPX W y -20
-KPX W u -45
-KPX W semicolon -10
-KPX W period -80
-KPX W o -60
-KPX W hyphen -40
-KPX W e -35
-KPX W comma -80
-KPX W colon -10
-KPX W a -40
-KPX W O -20
-KPX W A -60
-
-KPX Y u -100
-KPX Y semicolon -50
-KPX Y period -100
-KPX Y o -100
-KPX Y e -80
-KPX Y comma -100
-KPX Y colon -50
-KPX Y a -90
-KPX Y O -70
-KPX Y A -110
-
-KPX a y -20
-KPX a w -15
-KPX a v -15
-KPX a g -10
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b l -10
-
-KPX c y -10
-KPX c l -20
-KPX c k -20
-KPX c h -10
-
-KPX colon space -40
-
-KPX comma space -40
-KPX comma quoteright -120
-KPX comma quotedblright -120
-
-KPX d y -15
-KPX d w -15
-KPX d v -15
-KPX d d -10
-
-KPX e y -15
-KPX e x -15
-KPX e w -15
-KPX e v -15
-KPX e period 20
-KPX e comma 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -10
-KPX f o -20
-KPX f e -10
-KPX f comma -10
-
-KPX g g -10
-KPX g e 10
-
-KPX h y -20
-
-KPX k o -15
-
-KPX l y -15
-KPX l w -15
-
-KPX m y -30
-KPX m u -20
-
-KPX n y -20
-KPX n v -40
-KPX n u -10
-
-KPX o y -20
-KPX o x -30
-KPX o w -15
-KPX o v -20
-
-KPX p y -15
-
-KPX period space -40
-KPX period quoteright -120
-KPX period quotedblright -120
-
-KPX quotedblright space -80
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright v -20
-KPX quoteright space -80
-KPX quoteright s -60
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright l -20
-KPX quoteright d -80
-
-KPX r y 10
-KPX r v 10
-KPX r t 20
-KPX r s -15
-KPX r q -20
-KPX r period -60
-KPX r o -20
-KPX r hyphen -20
-KPX r g -15
-KPX r d -20
-KPX r comma -60
-KPX r c -20
-
-KPX s w -15
-
-KPX semicolon space -40
-
-KPX space quoteleft -60
-KPX space quotedblleft -80
-KPX space Y -120
-KPX space W -80
-KPX space V -80
-KPX space T -100
-
-KPX v period -80
-KPX v o -30
-KPX v comma -80
-KPX v a -20
-
-KPX w period -40
-KPX w o -20
-KPX w comma -40
-
-KPX x e -10
-
-KPX y period -80
-KPX y o -25
-KPX y e -10
-KPX y comma -80
-KPX y a -30
-
-KPX z e 10
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 192 186 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 192 186 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 192 186 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 192 186 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 192 186 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 192 186 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 169 186 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 169 186 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 169 186 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 169 186 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 10 186 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 10 186 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 10 186 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 10 186 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 192 186 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 215 186 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 215 186 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 215 186 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 215 186 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 186 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 169 186 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 192 186 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 192 186 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 192 186 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 192 186 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 169 186 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 169 186 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 146 186 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 92 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 108 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 114 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 114 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 114 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 114 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 114 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 114 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 92 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 114 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 114 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 114 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 114 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 92 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 92 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Narrow-Oblique.afm b/blt3.0/library/AFM/Helvetica-Narrow-Oblique.afm
deleted file mode 100644
index 0a8cb32..0000000
--- a/blt3.0/library/AFM/Helvetica-Narrow-Oblique.afm
+++ /dev/null
@@ -1,613 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 11:25:48 1990
-Comment UniqueID 28389
-Comment VMusage 7572 42473
-FontName Helvetica-Narrow-Oblique
-FullName Helvetica Narrow Oblique
-FamilyName Helvetica
-Weight Medium
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -139 -225 915 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 228 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 228 ; N exclam ; B 74 0 278 718 ;
-C 34 ; WX 291 ; N quotedbl ; B 138 463 359 718 ;
-C 35 ; WX 456 ; N numbersign ; B 60 0 517 688 ;
-C 36 ; WX 456 ; N dollar ; B 57 -115 506 775 ;
-C 37 ; WX 729 ; N percent ; B 120 -19 729 703 ;
-C 38 ; WX 547 ; N ampersand ; B 63 -15 530 718 ;
-C 39 ; WX 182 ; N quoteright ; B 124 463 254 718 ;
-C 40 ; WX 273 ; N parenleft ; B 89 -207 372 733 ;
-C 41 ; WX 273 ; N parenright ; B -7 -207 276 733 ;
-C 42 ; WX 319 ; N asterisk ; B 135 431 389 718 ;
-C 43 ; WX 479 ; N plus ; B 70 0 497 505 ;
-C 44 ; WX 228 ; N comma ; B 46 -147 175 106 ;
-C 45 ; WX 273 ; N hyphen ; B 77 232 293 322 ;
-C 46 ; WX 228 ; N period ; B 71 0 175 106 ;
-C 47 ; WX 228 ; N slash ; B -17 -19 370 737 ;
-C 48 ; WX 456 ; N zero ; B 77 -19 499 703 ;
-C 49 ; WX 456 ; N one ; B 170 0 417 703 ;
-C 50 ; WX 456 ; N two ; B 21 0 506 703 ;
-C 51 ; WX 456 ; N three ; B 61 -19 500 703 ;
-C 52 ; WX 456 ; N four ; B 50 0 472 703 ;
-C 53 ; WX 456 ; N five ; B 55 -19 509 688 ;
-C 54 ; WX 456 ; N six ; B 74 -19 504 703 ;
-C 55 ; WX 456 ; N seven ; B 112 0 549 688 ;
-C 56 ; WX 456 ; N eight ; B 60 -19 497 703 ;
-C 57 ; WX 456 ; N nine ; B 67 -19 499 703 ;
-C 58 ; WX 228 ; N colon ; B 71 0 247 516 ;
-C 59 ; WX 228 ; N semicolon ; B 46 -147 247 516 ;
-C 60 ; WX 479 ; N less ; B 77 11 526 495 ;
-C 61 ; WX 479 ; N equal ; B 52 115 515 390 ;
-C 62 ; WX 479 ; N greater ; B 41 11 490 495 ;
-C 63 ; WX 456 ; N question ; B 132 0 500 727 ;
-C 64 ; WX 832 ; N at ; B 176 -19 791 737 ;
-C 65 ; WX 547 ; N A ; B 11 0 536 718 ;
-C 66 ; WX 547 ; N B ; B 61 0 583 718 ;
-C 67 ; WX 592 ; N C ; B 88 -19 640 737 ;
-C 68 ; WX 592 ; N D ; B 66 0 626 718 ;
-C 69 ; WX 547 ; N E ; B 71 0 625 718 ;
-C 70 ; WX 501 ; N F ; B 71 0 603 718 ;
-C 71 ; WX 638 ; N G ; B 91 -19 655 737 ;
-C 72 ; WX 592 ; N H ; B 63 0 655 718 ;
-C 73 ; WX 228 ; N I ; B 75 0 279 718 ;
-C 74 ; WX 410 ; N J ; B 39 -19 476 718 ;
-C 75 ; WX 547 ; N K ; B 62 0 662 718 ;
-C 76 ; WX 456 ; N L ; B 62 0 455 718 ;
-C 77 ; WX 683 ; N M ; B 60 0 749 718 ;
-C 78 ; WX 592 ; N N ; B 62 0 655 718 ;
-C 79 ; WX 638 ; N O ; B 86 -19 677 737 ;
-C 80 ; WX 547 ; N P ; B 71 0 604 718 ;
-C 81 ; WX 638 ; N Q ; B 86 -56 677 737 ;
-C 82 ; WX 592 ; N R ; B 72 0 634 718 ;
-C 83 ; WX 547 ; N S ; B 74 -19 584 737 ;
-C 84 ; WX 501 ; N T ; B 122 0 615 718 ;
-C 85 ; WX 592 ; N U ; B 101 -19 653 718 ;
-C 86 ; WX 547 ; N V ; B 142 0 656 718 ;
-C 87 ; WX 774 ; N W ; B 138 0 886 718 ;
-C 88 ; WX 547 ; N X ; B 16 0 647 718 ;
-C 89 ; WX 547 ; N Y ; B 137 0 661 718 ;
-C 90 ; WX 501 ; N Z ; B 19 0 607 718 ;
-C 91 ; WX 228 ; N bracketleft ; B 17 -196 331 722 ;
-C 92 ; WX 228 ; N backslash ; B 115 -19 239 737 ;
-C 93 ; WX 228 ; N bracketright ; B -11 -196 302 722 ;
-C 94 ; WX 385 ; N asciicircum ; B 35 264 442 688 ;
-C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ;
-C 96 ; WX 182 ; N quoteleft ; B 135 470 265 725 ;
-C 97 ; WX 456 ; N a ; B 50 -15 458 538 ;
-C 98 ; WX 456 ; N b ; B 48 -15 479 718 ;
-C 99 ; WX 410 ; N c ; B 61 -15 454 538 ;
-C 100 ; WX 456 ; N d ; B 69 -15 534 718 ;
-C 101 ; WX 456 ; N e ; B 69 -15 474 538 ;
-C 102 ; WX 228 ; N f ; B 71 0 341 728 ; L i fi ; L l fl ;
-C 103 ; WX 456 ; N g ; B 34 -220 500 538 ;
-C 104 ; WX 456 ; N h ; B 53 0 470 718 ;
-C 105 ; WX 182 ; N i ; B 55 0 252 718 ;
-C 106 ; WX 182 ; N j ; B -49 -210 252 718 ;
-C 107 ; WX 410 ; N k ; B 55 0 492 718 ;
-C 108 ; WX 182 ; N l ; B 55 0 252 718 ;
-C 109 ; WX 683 ; N m ; B 53 0 699 538 ;
-C 110 ; WX 456 ; N n ; B 53 0 470 538 ;
-C 111 ; WX 456 ; N o ; B 68 -14 479 538 ;
-C 112 ; WX 456 ; N p ; B 11 -207 479 538 ;
-C 113 ; WX 456 ; N q ; B 69 -207 496 538 ;
-C 114 ; WX 273 ; N r ; B 63 0 365 538 ;
-C 115 ; WX 410 ; N s ; B 52 -15 434 538 ;
-C 116 ; WX 228 ; N t ; B 84 -7 302 669 ;
-C 117 ; WX 456 ; N u ; B 77 -15 492 523 ;
-C 118 ; WX 410 ; N v ; B 98 0 495 523 ;
-C 119 ; WX 592 ; N w ; B 103 0 673 523 ;
-C 120 ; WX 410 ; N x ; B 9 0 487 523 ;
-C 121 ; WX 410 ; N y ; B 12 -214 492 523 ;
-C 122 ; WX 410 ; N z ; B 25 0 468 523 ;
-C 123 ; WX 274 ; N braceleft ; B 75 -196 365 722 ;
-C 124 ; WX 213 ; N bar ; B 74 -19 265 737 ;
-C 125 ; WX 274 ; N braceright ; B 0 -196 291 722 ;
-C 126 ; WX 479 ; N asciitilde ; B 91 180 476 326 ;
-C 161 ; WX 273 ; N exclamdown ; B 63 -195 267 523 ;
-C 162 ; WX 456 ; N cent ; B 78 -115 479 623 ;
-C 163 ; WX 456 ; N sterling ; B 40 -16 520 718 ;
-C 164 ; WX 137 ; N fraction ; B -139 -19 396 703 ;
-C 165 ; WX 456 ; N yen ; B 67 0 573 688 ;
-C 166 ; WX 456 ; N florin ; B -43 -207 537 737 ;
-C 167 ; WX 456 ; N section ; B 63 -191 479 737 ;
-C 168 ; WX 456 ; N currency ; B 49 99 530 603 ;
-C 169 ; WX 157 ; N quotesingle ; B 129 463 233 718 ;
-C 170 ; WX 273 ; N quotedblleft ; B 113 470 378 725 ;
-C 171 ; WX 456 ; N guillemotleft ; B 120 108 454 446 ;
-C 172 ; WX 273 ; N guilsinglleft ; B 112 108 279 446 ;
-C 173 ; WX 273 ; N guilsinglright ; B 91 108 257 446 ;
-C 174 ; WX 410 ; N fi ; B 71 0 481 728 ;
-C 175 ; WX 410 ; N fl ; B 71 0 479 728 ;
-C 177 ; WX 456 ; N endash ; B 42 240 510 313 ;
-C 178 ; WX 456 ; N dagger ; B 110 -159 510 718 ;
-C 179 ; WX 456 ; N daggerdbl ; B 43 -159 511 718 ;
-C 180 ; WX 228 ; N periodcentered ; B 106 190 211 315 ;
-C 182 ; WX 440 ; N paragraph ; B 103 -173 533 718 ;
-C 183 ; WX 287 ; N bullet ; B 74 202 339 517 ;
-C 184 ; WX 182 ; N quotesinglbase ; B 17 -149 147 106 ;
-C 185 ; WX 273 ; N quotedblbase ; B -5 -149 260 106 ;
-C 186 ; WX 273 ; N quotedblright ; B 102 463 367 718 ;
-C 187 ; WX 456 ; N guillemotright ; B 98 108 433 446 ;
-C 188 ; WX 820 ; N ellipsis ; B 94 0 744 106 ;
-C 189 ; WX 820 ; N perthousand ; B 72 -19 844 703 ;
-C 191 ; WX 501 ; N questiondown ; B 70 -201 438 525 ;
-C 193 ; WX 273 ; N grave ; B 139 593 276 734 ;
-C 194 ; WX 273 ; N acute ; B 203 593 390 734 ;
-C 195 ; WX 273 ; N circumflex ; B 121 593 359 734 ;
-C 196 ; WX 273 ; N tilde ; B 102 606 402 722 ;
-C 197 ; WX 273 ; N macron ; B 117 627 384 684 ;
-C 198 ; WX 273 ; N breve ; B 137 595 391 731 ;
-C 199 ; WX 273 ; N dotaccent ; B 204 604 297 706 ;
-C 200 ; WX 273 ; N dieresis ; B 138 604 363 706 ;
-C 202 ; WX 273 ; N ring ; B 175 572 330 756 ;
-C 203 ; WX 273 ; N cedilla ; B 2 -225 191 0 ;
-C 205 ; WX 273 ; N hungarumlaut ; B 129 593 463 734 ;
-C 206 ; WX 273 ; N ogonek ; B 35 -225 204 0 ;
-C 207 ; WX 273 ; N caron ; B 145 593 384 734 ;
-C 208 ; WX 820 ; N emdash ; B 42 240 875 313 ;
-C 225 ; WX 820 ; N AE ; B 7 0 899 718 ;
-C 227 ; WX 303 ; N ordfeminine ; B 82 304 368 737 ;
-C 232 ; WX 456 ; N Lslash ; B 34 0 455 718 ;
-C 233 ; WX 638 ; N Oslash ; B 35 -19 730 737 ;
-C 234 ; WX 820 ; N OE ; B 80 -19 915 737 ;
-C 235 ; WX 299 ; N ordmasculine ; B 82 304 384 737 ;
-C 241 ; WX 729 ; N ae ; B 50 -15 746 538 ;
-C 245 ; WX 228 ; N dotlessi ; B 78 0 241 523 ;
-C 248 ; WX 182 ; N lslash ; B 34 0 284 718 ;
-C 249 ; WX 501 ; N oslash ; B 24 -22 531 545 ;
-C 250 ; WX 774 ; N oe ; B 68 -15 791 538 ;
-C 251 ; WX 501 ; N germandbls ; B 55 -15 539 728 ;
-C -1 ; WX 501 ; N Zcaron ; B 19 0 607 929 ;
-C -1 ; WX 410 ; N ccedilla ; B 61 -225 454 538 ;
-C -1 ; WX 410 ; N ydieresis ; B 12 -214 492 706 ;
-C -1 ; WX 456 ; N atilde ; B 50 -15 486 722 ;
-C -1 ; WX 228 ; N icircumflex ; B 78 0 337 734 ;
-C -1 ; WX 273 ; N threesuperior ; B 74 270 358 703 ;
-C -1 ; WX 456 ; N ecircumflex ; B 69 -15 474 734 ;
-C -1 ; WX 456 ; N thorn ; B 11 -207 479 718 ;
-C -1 ; WX 456 ; N egrave ; B 69 -15 474 734 ;
-C -1 ; WX 273 ; N twosuperior ; B 52 281 368 703 ;
-C -1 ; WX 456 ; N eacute ; B 69 -15 481 734 ;
-C -1 ; WX 456 ; N otilde ; B 68 -14 494 722 ;
-C -1 ; WX 547 ; N Aacute ; B 11 0 560 929 ;
-C -1 ; WX 456 ; N ocircumflex ; B 68 -14 479 734 ;
-C -1 ; WX 410 ; N yacute ; B 12 -214 492 734 ;
-C -1 ; WX 456 ; N udieresis ; B 77 -15 492 706 ;
-C -1 ; WX 684 ; N threequarters ; B 106 -19 706 703 ;
-C -1 ; WX 456 ; N acircumflex ; B 50 -15 458 734 ;
-C -1 ; WX 592 ; N Eth ; B 57 0 626 718 ;
-C -1 ; WX 456 ; N edieresis ; B 69 -15 474 706 ;
-C -1 ; WX 456 ; N ugrave ; B 77 -15 492 734 ;
-C -1 ; WX 820 ; N trademark ; B 152 306 866 718 ;
-C -1 ; WX 456 ; N ograve ; B 68 -14 479 734 ;
-C -1 ; WX 410 ; N scaron ; B 52 -15 453 734 ;
-C -1 ; WX 228 ; N Idieresis ; B 75 0 375 901 ;
-C -1 ; WX 456 ; N uacute ; B 77 -15 492 734 ;
-C -1 ; WX 456 ; N agrave ; B 50 -15 458 734 ;
-C -1 ; WX 456 ; N ntilde ; B 53 0 486 722 ;
-C -1 ; WX 456 ; N aring ; B 50 -15 458 756 ;
-C -1 ; WX 410 ; N zcaron ; B 25 0 468 734 ;
-C -1 ; WX 228 ; N Icircumflex ; B 75 0 371 929 ;
-C -1 ; WX 592 ; N Ntilde ; B 62 0 655 917 ;
-C -1 ; WX 456 ; N ucircumflex ; B 77 -15 492 734 ;
-C -1 ; WX 547 ; N Ecircumflex ; B 71 0 625 929 ;
-C -1 ; WX 228 ; N Iacute ; B 75 0 401 929 ;
-C -1 ; WX 592 ; N Ccedilla ; B 88 -225 640 737 ;
-C -1 ; WX 638 ; N Odieresis ; B 86 -19 677 901 ;
-C -1 ; WX 547 ; N Scaron ; B 74 -19 584 929 ;
-C -1 ; WX 547 ; N Edieresis ; B 71 0 625 901 ;
-C -1 ; WX 228 ; N Igrave ; B 75 0 288 929 ;
-C -1 ; WX 456 ; N adieresis ; B 50 -15 458 706 ;
-C -1 ; WX 638 ; N Ograve ; B 86 -19 677 929 ;
-C -1 ; WX 547 ; N Egrave ; B 71 0 625 929 ;
-C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 901 ;
-C -1 ; WX 604 ; N registered ; B 44 -19 687 737 ;
-C -1 ; WX 638 ; N Otilde ; B 86 -19 677 917 ;
-C -1 ; WX 684 ; N onequarter ; B 123 -19 658 703 ;
-C -1 ; WX 592 ; N Ugrave ; B 101 -19 653 929 ;
-C -1 ; WX 592 ; N Ucircumflex ; B 101 -19 653 929 ;
-C -1 ; WX 547 ; N Thorn ; B 71 0 584 718 ;
-C -1 ; WX 479 ; N divide ; B 70 -19 497 524 ;
-C -1 ; WX 547 ; N Atilde ; B 11 0 573 917 ;
-C -1 ; WX 592 ; N Uacute ; B 101 -19 653 929 ;
-C -1 ; WX 638 ; N Ocircumflex ; B 86 -19 677 929 ;
-C -1 ; WX 479 ; N logicalnot ; B 87 108 515 390 ;
-C -1 ; WX 547 ; N Aring ; B 11 0 536 931 ;
-C -1 ; WX 228 ; N idieresis ; B 78 0 341 706 ;
-C -1 ; WX 228 ; N iacute ; B 78 0 367 734 ;
-C -1 ; WX 456 ; N aacute ; B 50 -15 481 734 ;
-C -1 ; WX 479 ; N plusminus ; B 32 0 507 506 ;
-C -1 ; WX 479 ; N multiply ; B 41 0 526 506 ;
-C -1 ; WX 592 ; N Udieresis ; B 101 -19 653 901 ;
-C -1 ; WX 479 ; N minus ; B 70 216 497 289 ;
-C -1 ; WX 273 ; N onesuperior ; B 136 281 305 703 ;
-C -1 ; WX 547 ; N Eacute ; B 71 0 625 929 ;
-C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ;
-C -1 ; WX 604 ; N copyright ; B 44 -19 687 737 ;
-C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ;
-C -1 ; WX 456 ; N odieresis ; B 68 -14 479 706 ;
-C -1 ; WX 456 ; N oacute ; B 68 -14 481 734 ;
-C -1 ; WX 328 ; N degree ; B 138 411 384 703 ;
-C -1 ; WX 228 ; N igrave ; B 78 0 254 734 ;
-C -1 ; WX 456 ; N mu ; B 20 -207 492 523 ;
-C -1 ; WX 638 ; N Oacute ; B 86 -19 677 929 ;
-C -1 ; WX 456 ; N eth ; B 67 -15 506 737 ;
-C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ;
-C -1 ; WX 547 ; N Yacute ; B 137 0 661 929 ;
-C -1 ; WX 213 ; N brokenbar ; B 74 -19 265 737 ;
-C -1 ; WX 684 ; N onehalf ; B 93 -19 688 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -40
-KPX A w -40
-KPX A v -40
-KPX A u -30
-KPX A Y -100
-KPX A W -50
-KPX A V -70
-KPX A U -50
-KPX A T -120
-KPX A Q -30
-KPX A O -30
-KPX A G -30
-KPX A C -30
-
-KPX B period -20
-KPX B comma -20
-KPX B U -10
-
-KPX C period -30
-KPX C comma -30
-
-KPX D period -70
-KPX D comma -70
-KPX D Y -90
-KPX D W -40
-KPX D V -70
-KPX D A -40
-
-KPX F r -45
-KPX F period -150
-KPX F o -30
-KPX F e -30
-KPX F comma -150
-KPX F a -50
-KPX F A -80
-
-KPX J u -20
-KPX J period -30
-KPX J comma -30
-KPX J a -20
-KPX J A -20
-
-KPX K y -50
-KPX K u -30
-KPX K o -40
-KPX K e -40
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -160
-KPX L quotedblright -140
-KPX L Y -140
-KPX L W -70
-KPX L V -110
-KPX L T -110
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -60
-KPX O W -30
-KPX O V -50
-KPX O T -40
-KPX O A -20
-
-KPX P period -180
-KPX P o -50
-KPX P e -50
-KPX P comma -180
-KPX P a -40
-KPX P A -120
-
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -30
-KPX R V -50
-KPX R U -40
-KPX R T -30
-KPX R O -20
-
-KPX S period -20
-KPX S comma -20
-
-KPX T y -120
-KPX T w -120
-KPX T u -120
-KPX T semicolon -20
-KPX T r -120
-KPX T period -120
-KPX T o -120
-KPX T hyphen -140
-KPX T e -120
-KPX T comma -120
-KPX T colon -20
-KPX T a -120
-KPX T O -40
-KPX T A -120
-
-KPX U period -40
-KPX U comma -40
-KPX U A -40
-
-KPX V u -70
-KPX V semicolon -40
-KPX V period -125
-KPX V o -80
-KPX V hyphen -80
-KPX V e -80
-KPX V comma -125
-KPX V colon -40
-KPX V a -70
-KPX V O -40
-KPX V G -40
-KPX V A -80
-
-KPX W y -20
-KPX W u -30
-KPX W period -80
-KPX W o -30
-KPX W hyphen -40
-KPX W e -30
-KPX W comma -80
-KPX W a -40
-KPX W O -20
-KPX W A -50
-
-KPX Y u -110
-KPX Y semicolon -60
-KPX Y period -140
-KPX Y o -140
-KPX Y i -20
-KPX Y hyphen -140
-KPX Y e -140
-KPX Y comma -140
-KPX Y colon -60
-KPX Y a -140
-KPX Y O -85
-KPX Y A -110
-
-KPX a y -30
-KPX a w -20
-KPX a v -20
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b period -40
-KPX b l -20
-KPX b comma -40
-KPX b b -10
-
-KPX c k -20
-KPX c comma -15
-
-KPX colon space -50
-
-KPX comma quoteright -100
-KPX comma quotedblright -100
-
-KPX e y -20
-KPX e x -30
-KPX e w -20
-KPX e v -30
-KPX e period -15
-KPX e comma -15
-
-KPX f quoteright 50
-KPX f quotedblright 60
-KPX f period -30
-KPX f o -30
-KPX f e -30
-KPX f dotlessi -28
-KPX f comma -30
-KPX f a -30
-
-KPX g r -10
-
-KPX h y -30
-
-KPX k o -20
-KPX k e -20
-
-KPX m y -15
-KPX m u -10
-
-KPX n y -15
-KPX n v -20
-KPX n u -10
-
-KPX o y -30
-KPX o x -30
-KPX o w -15
-KPX o v -15
-KPX o period -40
-KPX o comma -40
-
-KPX oslash z -55
-KPX oslash y -70
-KPX oslash x -85
-KPX oslash w -70
-KPX oslash v -70
-KPX oslash u -55
-KPX oslash t -55
-KPX oslash s -55
-KPX oslash r -55
-KPX oslash q -55
-KPX oslash period -95
-KPX oslash p -55
-KPX oslash o -55
-KPX oslash n -55
-KPX oslash m -55
-KPX oslash l -55
-KPX oslash k -55
-KPX oslash j -55
-KPX oslash i -55
-KPX oslash h -55
-KPX oslash g -55
-KPX oslash f -55
-KPX oslash e -55
-KPX oslash d -55
-KPX oslash comma -95
-KPX oslash c -55
-KPX oslash b -55
-KPX oslash a -55
-
-KPX p y -30
-KPX p period -35
-KPX p comma -35
-
-KPX period space -60
-KPX period quoteright -100
-KPX period quotedblright -100
-
-KPX quotedblright space -40
-
-KPX quoteleft quoteleft -57
-
-KPX quoteright space -70
-KPX quoteright s -50
-KPX quoteright r -50
-KPX quoteright quoteright -57
-KPX quoteright d -50
-
-KPX r y 30
-KPX r v 30
-KPX r u 15
-KPX r t 40
-KPX r semicolon 30
-KPX r period -50
-KPX r p 30
-KPX r n 25
-KPX r m 25
-KPX r l 15
-KPX r k 15
-KPX r i 15
-KPX r comma -50
-KPX r colon 30
-KPX r a -10
-
-KPX s w -30
-KPX s period -15
-KPX s comma -15
-
-KPX semicolon space -50
-
-KPX space quoteleft -60
-KPX space quotedblleft -30
-KPX space Y -90
-KPX space W -40
-KPX space V -50
-KPX space T -50
-
-KPX v period -80
-KPX v o -25
-KPX v e -25
-KPX v comma -80
-KPX v a -25
-
-KPX w period -60
-KPX w o -10
-KPX w e -10
-KPX w comma -60
-KPX w a -15
-
-KPX x e -30
-
-KPX y period -100
-KPX y o -20
-KPX y e -20
-KPX y comma -100
-KPX y a -20
-
-KPX z o -15
-KPX z e -15
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 171 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 171 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 171 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 171 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 167 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 171 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 160 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 171 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 171 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 171 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 171 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 12 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 12 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 12 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 12 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 202 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 217 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 217 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 217 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 217 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 217 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 171 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 171 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 171 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 148 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 92 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 92 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 92 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 92 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 92 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 69 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 92 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 92 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 92 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 92 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 69 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 69 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Narrow.afm b/blt3.0/library/AFM/Helvetica-Narrow.afm
deleted file mode 100644
index 2afeb75..0000000
--- a/blt3.0/library/AFM/Helvetica-Narrow.afm
+++ /dev/null
@@ -1,613 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 11:04:57 1990
-Comment UniqueID 28380
-Comment VMusage 7572 42473
-FontName Helvetica-Narrow
-FullName Helvetica Narrow
-FamilyName Helvetica
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -136 -225 820 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 228 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 228 ; N exclam ; B 74 0 153 718 ;
-C 34 ; WX 291 ; N quotedbl ; B 57 463 234 718 ;
-C 35 ; WX 456 ; N numbersign ; B 23 0 434 688 ;
-C 36 ; WX 456 ; N dollar ; B 26 -115 426 775 ;
-C 37 ; WX 729 ; N percent ; B 32 -19 697 703 ;
-C 38 ; WX 547 ; N ampersand ; B 36 -15 529 718 ;
-C 39 ; WX 182 ; N quoteright ; B 43 463 129 718 ;
-C 40 ; WX 273 ; N parenleft ; B 56 -207 245 733 ;
-C 41 ; WX 273 ; N parenright ; B 28 -207 217 733 ;
-C 42 ; WX 319 ; N asterisk ; B 32 431 286 718 ;
-C 43 ; WX 479 ; N plus ; B 32 0 447 505 ;
-C 44 ; WX 228 ; N comma ; B 71 -147 157 106 ;
-C 45 ; WX 273 ; N hyphen ; B 36 232 237 322 ;
-C 46 ; WX 228 ; N period ; B 71 0 157 106 ;
-C 47 ; WX 228 ; N slash ; B -14 -19 242 737 ;
-C 48 ; WX 456 ; N zero ; B 30 -19 426 703 ;
-C 49 ; WX 456 ; N one ; B 83 0 294 703 ;
-C 50 ; WX 456 ; N two ; B 21 0 416 703 ;
-C 51 ; WX 456 ; N three ; B 28 -19 428 703 ;
-C 52 ; WX 456 ; N four ; B 20 0 429 703 ;
-C 53 ; WX 456 ; N five ; B 26 -19 421 688 ;
-C 54 ; WX 456 ; N six ; B 31 -19 425 703 ;
-C 55 ; WX 456 ; N seven ; B 30 0 429 688 ;
-C 56 ; WX 456 ; N eight ; B 31 -19 424 703 ;
-C 57 ; WX 456 ; N nine ; B 34 -19 421 703 ;
-C 58 ; WX 228 ; N colon ; B 71 0 157 516 ;
-C 59 ; WX 228 ; N semicolon ; B 71 -147 157 516 ;
-C 60 ; WX 479 ; N less ; B 39 11 440 495 ;
-C 61 ; WX 479 ; N equal ; B 32 115 447 390 ;
-C 62 ; WX 479 ; N greater ; B 39 11 440 495 ;
-C 63 ; WX 456 ; N question ; B 46 0 403 727 ;
-C 64 ; WX 832 ; N at ; B 121 -19 712 737 ;
-C 65 ; WX 547 ; N A ; B 11 0 536 718 ;
-C 66 ; WX 547 ; N B ; B 61 0 514 718 ;
-C 67 ; WX 592 ; N C ; B 36 -19 558 737 ;
-C 68 ; WX 592 ; N D ; B 66 0 553 718 ;
-C 69 ; WX 547 ; N E ; B 71 0 505 718 ;
-C 70 ; WX 501 ; N F ; B 71 0 478 718 ;
-C 71 ; WX 638 ; N G ; B 39 -19 577 737 ;
-C 72 ; WX 592 ; N H ; B 63 0 530 718 ;
-C 73 ; WX 228 ; N I ; B 75 0 154 718 ;
-C 74 ; WX 410 ; N J ; B 14 -19 351 718 ;
-C 75 ; WX 547 ; N K ; B 62 0 544 718 ;
-C 76 ; WX 456 ; N L ; B 62 0 440 718 ;
-C 77 ; WX 683 ; N M ; B 60 0 624 718 ;
-C 78 ; WX 592 ; N N ; B 62 0 530 718 ;
-C 79 ; WX 638 ; N O ; B 32 -19 606 737 ;
-C 80 ; WX 547 ; N P ; B 71 0 510 718 ;
-C 81 ; WX 638 ; N Q ; B 32 -56 606 737 ;
-C 82 ; WX 592 ; N R ; B 72 0 561 718 ;
-C 83 ; WX 547 ; N S ; B 40 -19 508 737 ;
-C 84 ; WX 501 ; N T ; B 11 0 490 718 ;
-C 85 ; WX 592 ; N U ; B 65 -19 528 718 ;
-C 86 ; WX 547 ; N V ; B 16 0 531 718 ;
-C 87 ; WX 774 ; N W ; B 13 0 761 718 ;
-C 88 ; WX 547 ; N X ; B 16 0 531 718 ;
-C 89 ; WX 547 ; N Y ; B 11 0 535 718 ;
-C 90 ; WX 501 ; N Z ; B 19 0 482 718 ;
-C 91 ; WX 228 ; N bracketleft ; B 52 -196 205 722 ;
-C 92 ; WX 228 ; N backslash ; B -14 -19 242 737 ;
-C 93 ; WX 228 ; N bracketright ; B 23 -196 176 722 ;
-C 94 ; WX 385 ; N asciicircum ; B -11 264 396 688 ;
-C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ;
-C 96 ; WX 182 ; N quoteleft ; B 53 470 139 725 ;
-C 97 ; WX 456 ; N a ; B 30 -15 435 538 ;
-C 98 ; WX 456 ; N b ; B 48 -15 424 718 ;
-C 99 ; WX 410 ; N c ; B 25 -15 391 538 ;
-C 100 ; WX 456 ; N d ; B 29 -15 409 718 ;
-C 101 ; WX 456 ; N e ; B 33 -15 423 538 ;
-C 102 ; WX 228 ; N f ; B 11 0 215 728 ; L i fi ; L l fl ;
-C 103 ; WX 456 ; N g ; B 33 -220 409 538 ;
-C 104 ; WX 456 ; N h ; B 53 0 403 718 ;
-C 105 ; WX 182 ; N i ; B 55 0 127 718 ;
-C 106 ; WX 182 ; N j ; B -13 -210 127 718 ;
-C 107 ; WX 410 ; N k ; B 55 0 411 718 ;
-C 108 ; WX 182 ; N l ; B 55 0 127 718 ;
-C 109 ; WX 683 ; N m ; B 53 0 631 538 ;
-C 110 ; WX 456 ; N n ; B 53 0 403 538 ;
-C 111 ; WX 456 ; N o ; B 29 -14 427 538 ;
-C 112 ; WX 456 ; N p ; B 48 -207 424 538 ;
-C 113 ; WX 456 ; N q ; B 29 -207 405 538 ;
-C 114 ; WX 273 ; N r ; B 63 0 272 538 ;
-C 115 ; WX 410 ; N s ; B 26 -15 380 538 ;
-C 116 ; WX 228 ; N t ; B 11 -7 211 669 ;
-C 117 ; WX 456 ; N u ; B 56 -15 401 523 ;
-C 118 ; WX 410 ; N v ; B 7 0 403 523 ;
-C 119 ; WX 592 ; N w ; B 11 0 581 523 ;
-C 120 ; WX 410 ; N x ; B 9 0 402 523 ;
-C 121 ; WX 410 ; N y ; B 9 -214 401 523 ;
-C 122 ; WX 410 ; N z ; B 25 0 385 523 ;
-C 123 ; WX 274 ; N braceleft ; B 34 -196 239 722 ;
-C 124 ; WX 213 ; N bar ; B 77 -19 137 737 ;
-C 125 ; WX 274 ; N braceright ; B 34 -196 239 722 ;
-C 126 ; WX 479 ; N asciitilde ; B 50 180 429 326 ;
-C 161 ; WX 273 ; N exclamdown ; B 97 -195 176 523 ;
-C 162 ; WX 456 ; N cent ; B 42 -115 421 623 ;
-C 163 ; WX 456 ; N sterling ; B 27 -16 442 718 ;
-C 164 ; WX 137 ; N fraction ; B -136 -19 273 703 ;
-C 165 ; WX 456 ; N yen ; B 2 0 453 688 ;
-C 166 ; WX 456 ; N florin ; B -9 -207 411 737 ;
-C 167 ; WX 456 ; N section ; B 35 -191 420 737 ;
-C 168 ; WX 456 ; N currency ; B 23 99 433 603 ;
-C 169 ; WX 157 ; N quotesingle ; B 48 463 108 718 ;
-C 170 ; WX 273 ; N quotedblleft ; B 31 470 252 725 ;
-C 171 ; WX 456 ; N guillemotleft ; B 80 108 376 446 ;
-C 172 ; WX 273 ; N guilsinglleft ; B 72 108 201 446 ;
-C 173 ; WX 273 ; N guilsinglright ; B 72 108 201 446 ;
-C 174 ; WX 410 ; N fi ; B 11 0 356 728 ;
-C 175 ; WX 410 ; N fl ; B 11 0 354 728 ;
-C 177 ; WX 456 ; N endash ; B 0 240 456 313 ;
-C 178 ; WX 456 ; N dagger ; B 35 -159 421 718 ;
-C 179 ; WX 456 ; N daggerdbl ; B 35 -159 421 718 ;
-C 180 ; WX 228 ; N periodcentered ; B 63 190 166 315 ;
-C 182 ; WX 440 ; N paragraph ; B 15 -173 408 718 ;
-C 183 ; WX 287 ; N bullet ; B 15 202 273 517 ;
-C 184 ; WX 182 ; N quotesinglbase ; B 43 -149 129 106 ;
-C 185 ; WX 273 ; N quotedblbase ; B 21 -149 242 106 ;
-C 186 ; WX 273 ; N quotedblright ; B 21 463 242 718 ;
-C 187 ; WX 456 ; N guillemotright ; B 80 108 376 446 ;
-C 188 ; WX 820 ; N ellipsis ; B 94 0 726 106 ;
-C 189 ; WX 820 ; N perthousand ; B 6 -19 815 703 ;
-C 191 ; WX 501 ; N questiondown ; B 75 -201 432 525 ;
-C 193 ; WX 273 ; N grave ; B 11 593 173 734 ;
-C 194 ; WX 273 ; N acute ; B 100 593 262 734 ;
-C 195 ; WX 273 ; N circumflex ; B 17 593 256 734 ;
-C 196 ; WX 273 ; N tilde ; B -3 606 276 722 ;
-C 197 ; WX 273 ; N macron ; B 8 627 265 684 ;
-C 198 ; WX 273 ; N breve ; B 11 595 263 731 ;
-C 199 ; WX 273 ; N dotaccent ; B 99 604 174 706 ;
-C 200 ; WX 273 ; N dieresis ; B 33 604 240 706 ;
-C 202 ; WX 273 ; N ring ; B 61 572 212 756 ;
-C 203 ; WX 273 ; N cedilla ; B 37 -225 212 0 ;
-C 205 ; WX 273 ; N hungarumlaut ; B 25 593 335 734 ;
-C 206 ; WX 273 ; N ogonek ; B 60 -225 235 0 ;
-C 207 ; WX 273 ; N caron ; B 17 593 256 734 ;
-C 208 ; WX 820 ; N emdash ; B 0 240 820 313 ;
-C 225 ; WX 820 ; N AE ; B 7 0 780 718 ;
-C 227 ; WX 303 ; N ordfeminine ; B 20 304 284 737 ;
-C 232 ; WX 456 ; N Lslash ; B -16 0 440 718 ;
-C 233 ; WX 638 ; N Oslash ; B 32 -19 607 737 ;
-C 234 ; WX 820 ; N OE ; B 30 -19 791 737 ;
-C 235 ; WX 299 ; N ordmasculine ; B 20 304 280 737 ;
-C 241 ; WX 729 ; N ae ; B 30 -15 695 538 ;
-C 245 ; WX 228 ; N dotlessi ; B 78 0 150 523 ;
-C 248 ; WX 182 ; N lslash ; B -16 0 198 718 ;
-C 249 ; WX 501 ; N oslash ; B 23 -22 440 545 ;
-C 250 ; WX 774 ; N oe ; B 29 -15 740 538 ;
-C 251 ; WX 501 ; N germandbls ; B 55 -15 468 728 ;
-C -1 ; WX 501 ; N Zcaron ; B 19 0 482 929 ;
-C -1 ; WX 410 ; N ccedilla ; B 25 -225 391 538 ;
-C -1 ; WX 410 ; N ydieresis ; B 9 -214 401 706 ;
-C -1 ; WX 456 ; N atilde ; B 30 -15 435 722 ;
-C -1 ; WX 228 ; N icircumflex ; B -5 0 234 734 ;
-C -1 ; WX 273 ; N threesuperior ; B 4 270 266 703 ;
-C -1 ; WX 456 ; N ecircumflex ; B 33 -15 423 734 ;
-C -1 ; WX 456 ; N thorn ; B 48 -207 424 718 ;
-C -1 ; WX 456 ; N egrave ; B 33 -15 423 734 ;
-C -1 ; WX 273 ; N twosuperior ; B 3 281 265 703 ;
-C -1 ; WX 456 ; N eacute ; B 33 -15 423 734 ;
-C -1 ; WX 456 ; N otilde ; B 29 -14 427 722 ;
-C -1 ; WX 547 ; N Aacute ; B 11 0 536 929 ;
-C -1 ; WX 456 ; N ocircumflex ; B 29 -14 427 734 ;
-C -1 ; WX 410 ; N yacute ; B 9 -214 401 734 ;
-C -1 ; WX 456 ; N udieresis ; B 56 -15 401 706 ;
-C -1 ; WX 684 ; N threequarters ; B 37 -19 664 703 ;
-C -1 ; WX 456 ; N acircumflex ; B 30 -15 435 734 ;
-C -1 ; WX 592 ; N Eth ; B 0 0 553 718 ;
-C -1 ; WX 456 ; N edieresis ; B 33 -15 423 706 ;
-C -1 ; WX 456 ; N ugrave ; B 56 -15 401 734 ;
-C -1 ; WX 820 ; N trademark ; B 38 306 740 718 ;
-C -1 ; WX 456 ; N ograve ; B 29 -14 427 734 ;
-C -1 ; WX 410 ; N scaron ; B 26 -15 380 734 ;
-C -1 ; WX 228 ; N Idieresis ; B 11 0 218 901 ;
-C -1 ; WX 456 ; N uacute ; B 56 -15 401 734 ;
-C -1 ; WX 456 ; N agrave ; B 30 -15 435 734 ;
-C -1 ; WX 456 ; N ntilde ; B 53 0 403 722 ;
-C -1 ; WX 456 ; N aring ; B 30 -15 435 756 ;
-C -1 ; WX 410 ; N zcaron ; B 25 0 385 734 ;
-C -1 ; WX 228 ; N Icircumflex ; B -5 0 234 929 ;
-C -1 ; WX 592 ; N Ntilde ; B 62 0 530 917 ;
-C -1 ; WX 456 ; N ucircumflex ; B 56 -15 401 734 ;
-C -1 ; WX 547 ; N Ecircumflex ; B 71 0 505 929 ;
-C -1 ; WX 228 ; N Iacute ; B 75 0 239 929 ;
-C -1 ; WX 592 ; N Ccedilla ; B 36 -225 558 737 ;
-C -1 ; WX 638 ; N Odieresis ; B 32 -19 606 901 ;
-C -1 ; WX 547 ; N Scaron ; B 40 -19 508 929 ;
-C -1 ; WX 547 ; N Edieresis ; B 71 0 505 901 ;
-C -1 ; WX 228 ; N Igrave ; B -11 0 154 929 ;
-C -1 ; WX 456 ; N adieresis ; B 30 -15 435 706 ;
-C -1 ; WX 638 ; N Ograve ; B 32 -19 606 929 ;
-C -1 ; WX 547 ; N Egrave ; B 71 0 505 929 ;
-C -1 ; WX 547 ; N Ydieresis ; B 11 0 535 901 ;
-C -1 ; WX 604 ; N registered ; B -11 -19 617 737 ;
-C -1 ; WX 638 ; N Otilde ; B 32 -19 606 917 ;
-C -1 ; WX 684 ; N onequarter ; B 60 -19 620 703 ;
-C -1 ; WX 592 ; N Ugrave ; B 65 -19 528 929 ;
-C -1 ; WX 592 ; N Ucircumflex ; B 65 -19 528 929 ;
-C -1 ; WX 547 ; N Thorn ; B 71 0 510 718 ;
-C -1 ; WX 479 ; N divide ; B 32 -19 447 524 ;
-C -1 ; WX 547 ; N Atilde ; B 11 0 536 917 ;
-C -1 ; WX 592 ; N Uacute ; B 65 -19 528 929 ;
-C -1 ; WX 638 ; N Ocircumflex ; B 32 -19 606 929 ;
-C -1 ; WX 479 ; N logicalnot ; B 32 108 447 390 ;
-C -1 ; WX 547 ; N Aring ; B 11 0 536 931 ;
-C -1 ; WX 228 ; N idieresis ; B 11 0 218 706 ;
-C -1 ; WX 228 ; N iacute ; B 78 0 239 734 ;
-C -1 ; WX 456 ; N aacute ; B 30 -15 435 734 ;
-C -1 ; WX 479 ; N plusminus ; B 32 0 447 506 ;
-C -1 ; WX 479 ; N multiply ; B 32 0 447 506 ;
-C -1 ; WX 592 ; N Udieresis ; B 65 -19 528 901 ;
-C -1 ; WX 479 ; N minus ; B 32 216 447 289 ;
-C -1 ; WX 273 ; N onesuperior ; B 35 281 182 703 ;
-C -1 ; WX 547 ; N Eacute ; B 71 0 505 929 ;
-C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ;
-C -1 ; WX 604 ; N copyright ; B -11 -19 617 737 ;
-C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ;
-C -1 ; WX 456 ; N odieresis ; B 29 -14 427 706 ;
-C -1 ; WX 456 ; N oacute ; B 29 -14 427 734 ;
-C -1 ; WX 328 ; N degree ; B 44 411 284 703 ;
-C -1 ; WX 228 ; N igrave ; B -11 0 151 734 ;
-C -1 ; WX 456 ; N mu ; B 56 -207 401 523 ;
-C -1 ; WX 638 ; N Oacute ; B 32 -19 606 929 ;
-C -1 ; WX 456 ; N eth ; B 29 -15 428 737 ;
-C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ;
-C -1 ; WX 547 ; N Yacute ; B 11 0 535 929 ;
-C -1 ; WX 213 ; N brokenbar ; B 77 -19 137 737 ;
-C -1 ; WX 684 ; N onehalf ; B 35 -19 634 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -32
-KPX A w -32
-KPX A v -32
-KPX A u -24
-KPX A Y -81
-KPX A W -40
-KPX A V -56
-KPX A U -40
-KPX A T -97
-KPX A Q -24
-KPX A O -24
-KPX A G -24
-KPX A C -24
-
-KPX B period -15
-KPX B comma -15
-KPX B U -7
-
-KPX C period -24
-KPX C comma -24
-
-KPX D period -56
-KPX D comma -56
-KPX D Y -73
-KPX D W -32
-KPX D V -56
-KPX D A -32
-
-KPX F r -36
-KPX F period -122
-KPX F o -24
-KPX F e -24
-KPX F comma -122
-KPX F a -40
-KPX F A -65
-
-KPX J u -15
-KPX J period -24
-KPX J comma -24
-KPX J a -15
-KPX J A -15
-
-KPX K y -40
-KPX K u -24
-KPX K o -32
-KPX K e -32
-KPX K O -40
-
-KPX L y -24
-KPX L quoteright -130
-KPX L quotedblright -114
-KPX L Y -114
-KPX L W -56
-KPX L V -89
-KPX L T -89
-
-KPX O period -32
-KPX O comma -32
-KPX O Y -56
-KPX O X -48
-KPX O W -24
-KPX O V -40
-KPX O T -32
-KPX O A -15
-
-KPX P period -147
-KPX P o -40
-KPX P e -40
-KPX P comma -147
-KPX P a -32
-KPX P A -97
-
-KPX Q U -7
-
-KPX R Y -40
-KPX R W -24
-KPX R V -40
-KPX R U -32
-KPX R T -24
-KPX R O -15
-
-KPX S period -15
-KPX S comma -15
-
-KPX T y -97
-KPX T w -97
-KPX T u -97
-KPX T semicolon -15
-KPX T r -97
-KPX T period -97
-KPX T o -97
-KPX T hyphen -114
-KPX T e -97
-KPX T comma -97
-KPX T colon -15
-KPX T a -97
-KPX T O -32
-KPX T A -97
-
-KPX U period -32
-KPX U comma -32
-KPX U A -32
-
-KPX V u -56
-KPX V semicolon -32
-KPX V period -102
-KPX V o -65
-KPX V hyphen -65
-KPX V e -65
-KPX V comma -102
-KPX V colon -32
-KPX V a -56
-KPX V O -32
-KPX V G -32
-KPX V A -65
-
-KPX W y -15
-KPX W u -24
-KPX W period -65
-KPX W o -24
-KPX W hyphen -32
-KPX W e -24
-KPX W comma -65
-KPX W a -32
-KPX W O -15
-KPX W A -40
-
-KPX Y u -89
-KPX Y semicolon -48
-KPX Y period -114
-KPX Y o -114
-KPX Y i -15
-KPX Y hyphen -114
-KPX Y e -114
-KPX Y comma -114
-KPX Y colon -48
-KPX Y a -114
-KPX Y O -69
-KPX Y A -89
-
-KPX a y -24
-KPX a w -15
-KPX a v -15
-
-KPX b y -15
-KPX b v -15
-KPX b u -15
-KPX b period -32
-KPX b l -15
-KPX b comma -32
-KPX b b -7
-
-KPX c k -15
-KPX c comma -11
-
-KPX colon space -40
-
-KPX comma quoteright -81
-KPX comma quotedblright -81
-
-KPX e y -15
-KPX e x -24
-KPX e w -15
-KPX e v -24
-KPX e period -11
-KPX e comma -11
-
-KPX f quoteright 41
-KPX f quotedblright 49
-KPX f period -24
-KPX f o -24
-KPX f e -24
-KPX f dotlessi -22
-KPX f comma -24
-KPX f a -24
-
-KPX g r -7
-
-KPX h y -24
-
-KPX k o -15
-KPX k e -15
-
-KPX m y -11
-KPX m u -7
-
-KPX n y -11
-KPX n v -15
-KPX n u -7
-
-KPX o y -24
-KPX o x -24
-KPX o w -11
-KPX o v -11
-KPX o period -32
-KPX o comma -32
-
-KPX oslash z -44
-KPX oslash y -56
-KPX oslash x -69
-KPX oslash w -56
-KPX oslash v -56
-KPX oslash u -44
-KPX oslash t -44
-KPX oslash s -44
-KPX oslash r -44
-KPX oslash q -44
-KPX oslash period -77
-KPX oslash p -44
-KPX oslash o -44
-KPX oslash n -44
-KPX oslash m -44
-KPX oslash l -44
-KPX oslash k -44
-KPX oslash j -44
-KPX oslash i -44
-KPX oslash h -44
-KPX oslash g -44
-KPX oslash f -44
-KPX oslash e -44
-KPX oslash d -44
-KPX oslash comma -77
-KPX oslash c -44
-KPX oslash b -44
-KPX oslash a -44
-
-KPX p y -24
-KPX p period -28
-KPX p comma -28
-
-KPX period space -48
-KPX period quoteright -81
-KPX period quotedblright -81
-
-KPX quotedblright space -32
-
-KPX quoteleft quoteleft -46
-
-KPX quoteright space -56
-KPX quoteright s -40
-KPX quoteright r -40
-KPX quoteright quoteright -46
-KPX quoteright d -40
-
-KPX r y 25
-KPX r v 25
-KPX r u 12
-KPX r t 33
-KPX r semicolon 25
-KPX r period -40
-KPX r p 25
-KPX r n 21
-KPX r m 21
-KPX r l 12
-KPX r k 12
-KPX r i 12
-KPX r comma -40
-KPX r colon 25
-KPX r a -7
-
-KPX s w -24
-KPX s period -11
-KPX s comma -11
-
-KPX semicolon space -40
-
-KPX space quoteleft -48
-KPX space quotedblleft -24
-KPX space Y -73
-KPX space W -32
-KPX space V -40
-KPX space T -40
-
-KPX v period -65
-KPX v o -20
-KPX v e -20
-KPX v comma -65
-KPX v a -20
-
-KPX w period -48
-KPX w o -7
-KPX w e -7
-KPX w comma -48
-KPX w a -11
-
-KPX x e -24
-
-KPX y period -81
-KPX y o -15
-KPX y e -15
-KPX y comma -81
-KPX y a -15
-
-KPX z o -11
-KPX z e -11
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 137 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 137 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 137 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 137 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 137 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 137 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 160 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 137 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 137 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 137 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 137 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -22 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -22 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -22 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -22 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 168 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 183 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 183 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 183 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 183 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 183 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 137 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 160 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 160 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 160 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 137 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 137 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 114 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 92 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 92 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 92 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 92 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 92 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 69 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 92 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 92 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 92 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 92 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 69 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 69 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica-Oblique.afm b/blt3.0/library/AFM/Helvetica-Oblique.afm
deleted file mode 100644
index 4f0476f..0000000
--- a/blt3.0/library/AFM/Helvetica-Oblique.afm
+++ /dev/null
@@ -1,613 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 10:24:18 1990
-Comment UniqueID 28362
-Comment VMusage 7572 42473
-FontName Helvetica-Oblique
-FullName Helvetica Oblique
-FamilyName Helvetica
-Weight Medium
-ItalicAngle -12
-IsFixedPitch false
-FontBBox -170 -225 1116 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ;
-C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ;
-C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ;
-C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ;
-C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ;
-C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ;
-C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ;
-C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ;
-C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ;
-C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ;
-C 43 ; WX 584 ; N plus ; B 85 0 606 505 ;
-C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ;
-C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ;
-C 46 ; WX 278 ; N period ; B 87 0 214 106 ;
-C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ;
-C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ;
-C 49 ; WX 556 ; N one ; B 207 0 508 703 ;
-C 50 ; WX 556 ; N two ; B 26 0 617 703 ;
-C 51 ; WX 556 ; N three ; B 75 -19 610 703 ;
-C 52 ; WX 556 ; N four ; B 61 0 576 703 ;
-C 53 ; WX 556 ; N five ; B 68 -19 621 688 ;
-C 54 ; WX 556 ; N six ; B 91 -19 615 703 ;
-C 55 ; WX 556 ; N seven ; B 137 0 669 688 ;
-C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ;
-C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ;
-C 58 ; WX 278 ; N colon ; B 87 0 301 516 ;
-C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ;
-C 60 ; WX 584 ; N less ; B 94 11 641 495 ;
-C 61 ; WX 584 ; N equal ; B 63 115 628 390 ;
-C 62 ; WX 584 ; N greater ; B 50 11 597 495 ;
-C 63 ; WX 556 ; N question ; B 161 0 610 727 ;
-C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ;
-C 65 ; WX 667 ; N A ; B 14 0 654 718 ;
-C 66 ; WX 667 ; N B ; B 74 0 712 718 ;
-C 67 ; WX 722 ; N C ; B 108 -19 782 737 ;
-C 68 ; WX 722 ; N D ; B 81 0 764 718 ;
-C 69 ; WX 667 ; N E ; B 86 0 762 718 ;
-C 70 ; WX 611 ; N F ; B 86 0 736 718 ;
-C 71 ; WX 778 ; N G ; B 111 -19 799 737 ;
-C 72 ; WX 722 ; N H ; B 77 0 799 718 ;
-C 73 ; WX 278 ; N I ; B 91 0 341 718 ;
-C 74 ; WX 500 ; N J ; B 47 -19 581 718 ;
-C 75 ; WX 667 ; N K ; B 76 0 808 718 ;
-C 76 ; WX 556 ; N L ; B 76 0 555 718 ;
-C 77 ; WX 833 ; N M ; B 73 0 914 718 ;
-C 78 ; WX 722 ; N N ; B 76 0 799 718 ;
-C 79 ; WX 778 ; N O ; B 105 -19 826 737 ;
-C 80 ; WX 667 ; N P ; B 86 0 737 718 ;
-C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ;
-C 82 ; WX 722 ; N R ; B 88 0 773 718 ;
-C 83 ; WX 667 ; N S ; B 90 -19 713 737 ;
-C 84 ; WX 611 ; N T ; B 148 0 750 718 ;
-C 85 ; WX 722 ; N U ; B 123 -19 797 718 ;
-C 86 ; WX 667 ; N V ; B 173 0 800 718 ;
-C 87 ; WX 944 ; N W ; B 169 0 1081 718 ;
-C 88 ; WX 667 ; N X ; B 19 0 790 718 ;
-C 89 ; WX 667 ; N Y ; B 167 0 806 718 ;
-C 90 ; WX 611 ; N Z ; B 23 0 741 718 ;
-C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ;
-C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ;
-C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ;
-C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ;
-C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ;
-C 97 ; WX 556 ; N a ; B 61 -15 559 538 ;
-C 98 ; WX 556 ; N b ; B 58 -15 584 718 ;
-C 99 ; WX 500 ; N c ; B 74 -15 553 538 ;
-C 100 ; WX 556 ; N d ; B 84 -15 652 718 ;
-C 101 ; WX 556 ; N e ; B 84 -15 578 538 ;
-C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 42 -220 610 538 ;
-C 104 ; WX 556 ; N h ; B 65 0 573 718 ;
-C 105 ; WX 222 ; N i ; B 67 0 308 718 ;
-C 106 ; WX 222 ; N j ; B -60 -210 308 718 ;
-C 107 ; WX 500 ; N k ; B 67 0 600 718 ;
-C 108 ; WX 222 ; N l ; B 67 0 308 718 ;
-C 109 ; WX 833 ; N m ; B 65 0 852 538 ;
-C 110 ; WX 556 ; N n ; B 65 0 573 538 ;
-C 111 ; WX 556 ; N o ; B 83 -14 585 538 ;
-C 112 ; WX 556 ; N p ; B 14 -207 584 538 ;
-C 113 ; WX 556 ; N q ; B 84 -207 605 538 ;
-C 114 ; WX 333 ; N r ; B 77 0 446 538 ;
-C 115 ; WX 500 ; N s ; B 63 -15 529 538 ;
-C 116 ; WX 278 ; N t ; B 102 -7 368 669 ;
-C 117 ; WX 556 ; N u ; B 94 -15 600 523 ;
-C 118 ; WX 500 ; N v ; B 119 0 603 523 ;
-C 119 ; WX 722 ; N w ; B 125 0 820 523 ;
-C 120 ; WX 500 ; N x ; B 11 0 594 523 ;
-C 121 ; WX 500 ; N y ; B 15 -214 600 523 ;
-C 122 ; WX 500 ; N z ; B 31 0 571 523 ;
-C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ;
-C 124 ; WX 260 ; N bar ; B 90 -19 324 737 ;
-C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ;
-C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ;
-C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ;
-C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ;
-C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ;
-C 165 ; WX 556 ; N yen ; B 81 0 699 688 ;
-C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ;
-C 167 ; WX 556 ; N section ; B 76 -191 584 737 ;
-C 168 ; WX 556 ; N currency ; B 60 99 646 603 ;
-C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ;
-C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ;
-C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ;
-C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ;
-C 174 ; WX 500 ; N fi ; B 86 0 587 728 ;
-C 175 ; WX 500 ; N fl ; B 86 0 585 728 ;
-C 177 ; WX 556 ; N endash ; B 51 240 623 313 ;
-C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ;
-C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ;
-C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ;
-C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ;
-C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ;
-C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ;
-C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ;
-C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ;
-C 193 ; WX 333 ; N grave ; B 170 593 337 734 ;
-C 194 ; WX 333 ; N acute ; B 248 593 475 734 ;
-C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ;
-C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ;
-C 197 ; WX 333 ; N macron ; B 143 627 468 684 ;
-C 198 ; WX 333 ; N breve ; B 167 595 476 731 ;
-C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ;
-C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ;
-C 202 ; WX 333 ; N ring ; B 214 572 402 756 ;
-C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ;
-C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ;
-C 207 ; WX 333 ; N caron ; B 177 593 468 734 ;
-C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ;
-C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 100 304 449 737 ;
-C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ;
-C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ;
-C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 100 304 468 737 ;
-C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ;
-C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ;
-C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ;
-C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ;
-C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ;
-C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ;
-C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ;
-C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ;
-C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ;
-C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ;
-C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ;
-C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ;
-C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ;
-C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ;
-C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ;
-C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ;
-C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ;
-C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ;
-C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ;
-C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ;
-C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ;
-C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ;
-C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ;
-C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ;
-C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ;
-C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ;
-C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ;
-C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ;
-C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ;
-C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ;
-C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ;
-C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ;
-C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ;
-C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ;
-C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ;
-C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ;
-C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ;
-C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ;
-C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ;
-C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ;
-C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ;
-C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ;
-C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ;
-C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ;
-C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ;
-C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ;
-C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ;
-C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ;
-C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ;
-C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ;
-C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ;
-C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ;
-C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ;
-C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ;
-C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ;
-C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ;
-C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ;
-C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ;
-C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ;
-C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ;
-C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ;
-C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ;
-C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ;
-C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ;
-C -1 ; WX 584 ; N minus ; B 85 216 606 289 ;
-C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ;
-C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ;
-C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ;
-C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ;
-C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ;
-C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ;
-C -1 ; WX 400 ; N degree ; B 169 411 468 703 ;
-C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ;
-C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ;
-C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ;
-C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ;
-C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ;
-C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ;
-C -1 ; WX 260 ; N brokenbar ; B 90 -19 324 737 ;
-C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -40
-KPX A w -40
-KPX A v -40
-KPX A u -30
-KPX A Y -100
-KPX A W -50
-KPX A V -70
-KPX A U -50
-KPX A T -120
-KPX A Q -30
-KPX A O -30
-KPX A G -30
-KPX A C -30
-
-KPX B period -20
-KPX B comma -20
-KPX B U -10
-
-KPX C period -30
-KPX C comma -30
-
-KPX D period -70
-KPX D comma -70
-KPX D Y -90
-KPX D W -40
-KPX D V -70
-KPX D A -40
-
-KPX F r -45
-KPX F period -150
-KPX F o -30
-KPX F e -30
-KPX F comma -150
-KPX F a -50
-KPX F A -80
-
-KPX J u -20
-KPX J period -30
-KPX J comma -30
-KPX J a -20
-KPX J A -20
-
-KPX K y -50
-KPX K u -30
-KPX K o -40
-KPX K e -40
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -160
-KPX L quotedblright -140
-KPX L Y -140
-KPX L W -70
-KPX L V -110
-KPX L T -110
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -60
-KPX O W -30
-KPX O V -50
-KPX O T -40
-KPX O A -20
-
-KPX P period -180
-KPX P o -50
-KPX P e -50
-KPX P comma -180
-KPX P a -40
-KPX P A -120
-
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -30
-KPX R V -50
-KPX R U -40
-KPX R T -30
-KPX R O -20
-
-KPX S period -20
-KPX S comma -20
-
-KPX T y -120
-KPX T w -120
-KPX T u -120
-KPX T semicolon -20
-KPX T r -120
-KPX T period -120
-KPX T o -120
-KPX T hyphen -140
-KPX T e -120
-KPX T comma -120
-KPX T colon -20
-KPX T a -120
-KPX T O -40
-KPX T A -120
-
-KPX U period -40
-KPX U comma -40
-KPX U A -40
-
-KPX V u -70
-KPX V semicolon -40
-KPX V period -125
-KPX V o -80
-KPX V hyphen -80
-KPX V e -80
-KPX V comma -125
-KPX V colon -40
-KPX V a -70
-KPX V O -40
-KPX V G -40
-KPX V A -80
-
-KPX W y -20
-KPX W u -30
-KPX W period -80
-KPX W o -30
-KPX W hyphen -40
-KPX W e -30
-KPX W comma -80
-KPX W a -40
-KPX W O -20
-KPX W A -50
-
-KPX Y u -110
-KPX Y semicolon -60
-KPX Y period -140
-KPX Y o -140
-KPX Y i -20
-KPX Y hyphen -140
-KPX Y e -140
-KPX Y comma -140
-KPX Y colon -60
-KPX Y a -140
-KPX Y O -85
-KPX Y A -110
-
-KPX a y -30
-KPX a w -20
-KPX a v -20
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b period -40
-KPX b l -20
-KPX b comma -40
-KPX b b -10
-
-KPX c k -20
-KPX c comma -15
-
-KPX colon space -50
-
-KPX comma quoteright -100
-KPX comma quotedblright -100
-
-KPX e y -20
-KPX e x -30
-KPX e w -20
-KPX e v -30
-KPX e period -15
-KPX e comma -15
-
-KPX f quoteright 50
-KPX f quotedblright 60
-KPX f period -30
-KPX f o -30
-KPX f e -30
-KPX f dotlessi -28
-KPX f comma -30
-KPX f a -30
-
-KPX g r -10
-
-KPX h y -30
-
-KPX k o -20
-KPX k e -20
-
-KPX m y -15
-KPX m u -10
-
-KPX n y -15
-KPX n v -20
-KPX n u -10
-
-KPX o y -30
-KPX o x -30
-KPX o w -15
-KPX o v -15
-KPX o period -40
-KPX o comma -40
-
-KPX oslash z -55
-KPX oslash y -70
-KPX oslash x -85
-KPX oslash w -70
-KPX oslash v -70
-KPX oslash u -55
-KPX oslash t -55
-KPX oslash s -55
-KPX oslash r -55
-KPX oslash q -55
-KPX oslash period -95
-KPX oslash p -55
-KPX oslash o -55
-KPX oslash n -55
-KPX oslash m -55
-KPX oslash l -55
-KPX oslash k -55
-KPX oslash j -55
-KPX oslash i -55
-KPX oslash h -55
-KPX oslash g -55
-KPX oslash f -55
-KPX oslash e -55
-KPX oslash d -55
-KPX oslash comma -95
-KPX oslash c -55
-KPX oslash b -55
-KPX oslash a -55
-
-KPX p y -30
-KPX p period -35
-KPX p comma -35
-
-KPX period space -60
-KPX period quoteright -100
-KPX period quotedblright -100
-
-KPX quotedblright space -40
-
-KPX quoteleft quoteleft -57
-
-KPX quoteright space -70
-KPX quoteright s -50
-KPX quoteright r -50
-KPX quoteright quoteright -57
-KPX quoteright d -50
-
-KPX r y 30
-KPX r v 30
-KPX r u 15
-KPX r t 40
-KPX r semicolon 30
-KPX r period -50
-KPX r p 30
-KPX r n 25
-KPX r m 25
-KPX r l 15
-KPX r k 15
-KPX r i 15
-KPX r comma -50
-KPX r colon 30
-KPX r a -10
-
-KPX s w -30
-KPX s period -15
-KPX s comma -15
-
-KPX semicolon space -50
-
-KPX space quoteleft -60
-KPX space quotedblleft -30
-KPX space Y -90
-KPX space W -40
-KPX space V -50
-KPX space T -50
-
-KPX v period -80
-KPX v o -25
-KPX v e -25
-KPX v comma -80
-KPX v a -25
-
-KPX w period -60
-KPX w o -10
-KPX w e -10
-KPX w comma -60
-KPX w a -15
-
-KPX x e -30
-
-KPX y period -100
-KPX y o -20
-KPX y e -20
-KPX y comma -100
-KPX y a -20
-
-KPX z o -15
-KPX z e -15
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 208 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 208 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 208 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 208 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 204 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 208 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 208 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 208 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 208 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 208 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 246 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 264 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 264 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 264 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 264 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 264 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 208 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 236 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 236 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 236 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 236 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 208 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 208 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 180 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Helvetica.afm b/blt3.0/library/AFM/Helvetica.afm
deleted file mode 100644
index 80d8cff..0000000
--- a/blt3.0/library/AFM/Helvetica.afm
+++ /dev/null
@@ -1,613 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Thu Mar 15 08:58:00 1990
-Comment UniqueID 28352
-Comment VMusage 26389 33281
-FontName Helvetica
-FullName Helvetica
-FamilyName Helvetica
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -166 -225 1000 931
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 718
-XHeight 523
-Ascender 718
-Descender -207
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ;
-C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ;
-C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ;
-C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ;
-C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ;
-C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ;
-C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ;
-C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ;
-C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ;
-C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ;
-C 43 ; WX 584 ; N plus ; B 39 0 545 505 ;
-C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ;
-C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ;
-C 46 ; WX 278 ; N period ; B 87 0 191 106 ;
-C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ;
-C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ;
-C 49 ; WX 556 ; N one ; B 101 0 359 703 ;
-C 50 ; WX 556 ; N two ; B 26 0 507 703 ;
-C 51 ; WX 556 ; N three ; B 34 -19 522 703 ;
-C 52 ; WX 556 ; N four ; B 25 0 523 703 ;
-C 53 ; WX 556 ; N five ; B 32 -19 514 688 ;
-C 54 ; WX 556 ; N six ; B 38 -19 518 703 ;
-C 55 ; WX 556 ; N seven ; B 37 0 523 688 ;
-C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ;
-C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ;
-C 58 ; WX 278 ; N colon ; B 87 0 191 516 ;
-C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ;
-C 60 ; WX 584 ; N less ; B 48 11 536 495 ;
-C 61 ; WX 584 ; N equal ; B 39 115 545 390 ;
-C 62 ; WX 584 ; N greater ; B 48 11 536 495 ;
-C 63 ; WX 556 ; N question ; B 56 0 492 727 ;
-C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ;
-C 65 ; WX 667 ; N A ; B 14 0 654 718 ;
-C 66 ; WX 667 ; N B ; B 74 0 627 718 ;
-C 67 ; WX 722 ; N C ; B 44 -19 681 737 ;
-C 68 ; WX 722 ; N D ; B 81 0 674 718 ;
-C 69 ; WX 667 ; N E ; B 86 0 616 718 ;
-C 70 ; WX 611 ; N F ; B 86 0 583 718 ;
-C 71 ; WX 778 ; N G ; B 48 -19 704 737 ;
-C 72 ; WX 722 ; N H ; B 77 0 646 718 ;
-C 73 ; WX 278 ; N I ; B 91 0 188 718 ;
-C 74 ; WX 500 ; N J ; B 17 -19 428 718 ;
-C 75 ; WX 667 ; N K ; B 76 0 663 718 ;
-C 76 ; WX 556 ; N L ; B 76 0 537 718 ;
-C 77 ; WX 833 ; N M ; B 73 0 761 718 ;
-C 78 ; WX 722 ; N N ; B 76 0 646 718 ;
-C 79 ; WX 778 ; N O ; B 39 -19 739 737 ;
-C 80 ; WX 667 ; N P ; B 86 0 622 718 ;
-C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ;
-C 82 ; WX 722 ; N R ; B 88 0 684 718 ;
-C 83 ; WX 667 ; N S ; B 49 -19 620 737 ;
-C 84 ; WX 611 ; N T ; B 14 0 597 718 ;
-C 85 ; WX 722 ; N U ; B 79 -19 644 718 ;
-C 86 ; WX 667 ; N V ; B 20 0 647 718 ;
-C 87 ; WX 944 ; N W ; B 16 0 928 718 ;
-C 88 ; WX 667 ; N X ; B 19 0 648 718 ;
-C 89 ; WX 667 ; N Y ; B 14 0 653 718 ;
-C 90 ; WX 611 ; N Z ; B 23 0 588 718 ;
-C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ;
-C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ;
-C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ;
-C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ;
-C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ;
-C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ;
-C 97 ; WX 556 ; N a ; B 36 -15 530 538 ;
-C 98 ; WX 556 ; N b ; B 58 -15 517 718 ;
-C 99 ; WX 500 ; N c ; B 30 -15 477 538 ;
-C 100 ; WX 556 ; N d ; B 35 -15 499 718 ;
-C 101 ; WX 556 ; N e ; B 40 -15 516 538 ;
-C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 40 -220 499 538 ;
-C 104 ; WX 556 ; N h ; B 65 0 491 718 ;
-C 105 ; WX 222 ; N i ; B 67 0 155 718 ;
-C 106 ; WX 222 ; N j ; B -16 -210 155 718 ;
-C 107 ; WX 500 ; N k ; B 67 0 501 718 ;
-C 108 ; WX 222 ; N l ; B 67 0 155 718 ;
-C 109 ; WX 833 ; N m ; B 65 0 769 538 ;
-C 110 ; WX 556 ; N n ; B 65 0 491 538 ;
-C 111 ; WX 556 ; N o ; B 35 -14 521 538 ;
-C 112 ; WX 556 ; N p ; B 58 -207 517 538 ;
-C 113 ; WX 556 ; N q ; B 35 -207 494 538 ;
-C 114 ; WX 333 ; N r ; B 77 0 332 538 ;
-C 115 ; WX 500 ; N s ; B 32 -15 464 538 ;
-C 116 ; WX 278 ; N t ; B 14 -7 257 669 ;
-C 117 ; WX 556 ; N u ; B 68 -15 489 523 ;
-C 118 ; WX 500 ; N v ; B 8 0 492 523 ;
-C 119 ; WX 722 ; N w ; B 14 0 709 523 ;
-C 120 ; WX 500 ; N x ; B 11 0 490 523 ;
-C 121 ; WX 500 ; N y ; B 11 -214 489 523 ;
-C 122 ; WX 500 ; N z ; B 31 0 469 523 ;
-C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ;
-C 124 ; WX 260 ; N bar ; B 94 -19 167 737 ;
-C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ;
-C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ;
-C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ;
-C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ;
-C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ;
-C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ;
-C 165 ; WX 556 ; N yen ; B 3 0 553 688 ;
-C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ;
-C 167 ; WX 556 ; N section ; B 43 -191 512 737 ;
-C 168 ; WX 556 ; N currency ; B 28 99 528 603 ;
-C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ;
-C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ;
-C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ;
-C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ;
-C 174 ; WX 500 ; N fi ; B 14 0 434 728 ;
-C 175 ; WX 500 ; N fl ; B 14 0 432 728 ;
-C 177 ; WX 556 ; N endash ; B 0 240 556 313 ;
-C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ;
-C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ;
-C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ;
-C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ;
-C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ;
-C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ;
-C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ;
-C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ;
-C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ;
-C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ;
-C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ;
-C 193 ; WX 333 ; N grave ; B 14 593 211 734 ;
-C 194 ; WX 333 ; N acute ; B 122 593 319 734 ;
-C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ;
-C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ;
-C 197 ; WX 333 ; N macron ; B 10 627 323 684 ;
-C 198 ; WX 333 ; N breve ; B 13 595 321 731 ;
-C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ;
-C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ;
-C 202 ; WX 333 ; N ring ; B 75 572 259 756 ;
-C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ;
-C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ;
-C 207 ; WX 333 ; N caron ; B 21 593 312 734 ;
-C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ;
-C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ;
-C 227 ; WX 370 ; N ordfeminine ; B 24 304 346 737 ;
-C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ;
-C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ;
-C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ;
-C 235 ; WX 365 ; N ordmasculine ; B 25 304 341 737 ;
-C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ;
-C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ;
-C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ;
-C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ;
-C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ;
-C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ;
-C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ;
-C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ;
-C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ;
-C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ;
-C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ;
-C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ;
-C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ;
-C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ;
-C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ;
-C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ;
-C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ;
-C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ;
-C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ;
-C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ;
-C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ;
-C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ;
-C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ;
-C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ;
-C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ;
-C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ;
-C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ;
-C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ;
-C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ;
-C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ;
-C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ;
-C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ;
-C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ;
-C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ;
-C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ;
-C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ;
-C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ;
-C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ;
-C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ;
-C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ;
-C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ;
-C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ;
-C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ;
-C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ;
-C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ;
-C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ;
-C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ;
-C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ;
-C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ;
-C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ;
-C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ;
-C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ;
-C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ;
-C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ;
-C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ;
-C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ;
-C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ;
-C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ;
-C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ;
-C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ;
-C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ;
-C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ;
-C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ;
-C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ;
-C -1 ; WX 584 ; N minus ; B 39 216 545 289 ;
-C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ;
-C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ;
-C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ;
-C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ;
-C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ;
-C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ;
-C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ;
-C -1 ; WX 400 ; N degree ; B 54 411 346 703 ;
-C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ;
-C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ;
-C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ;
-C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ;
-C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ;
-C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ;
-C -1 ; WX 260 ; N brokenbar ; B 94 -19 167 737 ;
-C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 250
-
-KPX A y -40
-KPX A w -40
-KPX A v -40
-KPX A u -30
-KPX A Y -100
-KPX A W -50
-KPX A V -70
-KPX A U -50
-KPX A T -120
-KPX A Q -30
-KPX A O -30
-KPX A G -30
-KPX A C -30
-
-KPX B period -20
-KPX B comma -20
-KPX B U -10
-
-KPX C period -30
-KPX C comma -30
-
-KPX D period -70
-KPX D comma -70
-KPX D Y -90
-KPX D W -40
-KPX D V -70
-KPX D A -40
-
-KPX F r -45
-KPX F period -150
-KPX F o -30
-KPX F e -30
-KPX F comma -150
-KPX F a -50
-KPX F A -80
-
-KPX J u -20
-KPX J period -30
-KPX J comma -30
-KPX J a -20
-KPX J A -20
-
-KPX K y -50
-KPX K u -30
-KPX K o -40
-KPX K e -40
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -160
-KPX L quotedblright -140
-KPX L Y -140
-KPX L W -70
-KPX L V -110
-KPX L T -110
-
-KPX O period -40
-KPX O comma -40
-KPX O Y -70
-KPX O X -60
-KPX O W -30
-KPX O V -50
-KPX O T -40
-KPX O A -20
-
-KPX P period -180
-KPX P o -50
-KPX P e -50
-KPX P comma -180
-KPX P a -40
-KPX P A -120
-
-KPX Q U -10
-
-KPX R Y -50
-KPX R W -30
-KPX R V -50
-KPX R U -40
-KPX R T -30
-KPX R O -20
-
-KPX S period -20
-KPX S comma -20
-
-KPX T y -120
-KPX T w -120
-KPX T u -120
-KPX T semicolon -20
-KPX T r -120
-KPX T period -120
-KPX T o -120
-KPX T hyphen -140
-KPX T e -120
-KPX T comma -120
-KPX T colon -20
-KPX T a -120
-KPX T O -40
-KPX T A -120
-
-KPX U period -40
-KPX U comma -40
-KPX U A -40
-
-KPX V u -70
-KPX V semicolon -40
-KPX V period -125
-KPX V o -80
-KPX V hyphen -80
-KPX V e -80
-KPX V comma -125
-KPX V colon -40
-KPX V a -70
-KPX V O -40
-KPX V G -40
-KPX V A -80
-
-KPX W y -20
-KPX W u -30
-KPX W period -80
-KPX W o -30
-KPX W hyphen -40
-KPX W e -30
-KPX W comma -80
-KPX W a -40
-KPX W O -20
-KPX W A -50
-
-KPX Y u -110
-KPX Y semicolon -60
-KPX Y period -140
-KPX Y o -140
-KPX Y i -20
-KPX Y hyphen -140
-KPX Y e -140
-KPX Y comma -140
-KPX Y colon -60
-KPX Y a -140
-KPX Y O -85
-KPX Y A -110
-
-KPX a y -30
-KPX a w -20
-KPX a v -20
-
-KPX b y -20
-KPX b v -20
-KPX b u -20
-KPX b period -40
-KPX b l -20
-KPX b comma -40
-KPX b b -10
-
-KPX c k -20
-KPX c comma -15
-
-KPX colon space -50
-
-KPX comma quoteright -100
-KPX comma quotedblright -100
-
-KPX e y -20
-KPX e x -30
-KPX e w -20
-KPX e v -30
-KPX e period -15
-KPX e comma -15
-
-KPX f quoteright 50
-KPX f quotedblright 60
-KPX f period -30
-KPX f o -30
-KPX f e -30
-KPX f dotlessi -28
-KPX f comma -30
-KPX f a -30
-
-KPX g r -10
-
-KPX h y -30
-
-KPX k o -20
-KPX k e -20
-
-KPX m y -15
-KPX m u -10
-
-KPX n y -15
-KPX n v -20
-KPX n u -10
-
-KPX o y -30
-KPX o x -30
-KPX o w -15
-KPX o v -15
-KPX o period -40
-KPX o comma -40
-
-KPX oslash z -55
-KPX oslash y -70
-KPX oslash x -85
-KPX oslash w -70
-KPX oslash v -70
-KPX oslash u -55
-KPX oslash t -55
-KPX oslash s -55
-KPX oslash r -55
-KPX oslash q -55
-KPX oslash period -95
-KPX oslash p -55
-KPX oslash o -55
-KPX oslash n -55
-KPX oslash m -55
-KPX oslash l -55
-KPX oslash k -55
-KPX oslash j -55
-KPX oslash i -55
-KPX oslash h -55
-KPX oslash g -55
-KPX oslash f -55
-KPX oslash e -55
-KPX oslash d -55
-KPX oslash comma -95
-KPX oslash c -55
-KPX oslash b -55
-KPX oslash a -55
-
-KPX p y -30
-KPX p period -35
-KPX p comma -35
-
-KPX period space -60
-KPX period quoteright -100
-KPX period quotedblright -100
-
-KPX quotedblright space -40
-
-KPX quoteleft quoteleft -57
-
-KPX quoteright space -70
-KPX quoteright s -50
-KPX quoteright r -50
-KPX quoteright quoteright -57
-KPX quoteright d -50
-
-KPX r y 30
-KPX r v 30
-KPX r u 15
-KPX r t 40
-KPX r semicolon 30
-KPX r period -50
-KPX r p 30
-KPX r n 25
-KPX r m 25
-KPX r l 15
-KPX r k 15
-KPX r i 15
-KPX r comma -50
-KPX r colon 30
-KPX r a -10
-
-KPX s w -30
-KPX s period -15
-KPX s comma -15
-
-KPX semicolon space -50
-
-KPX space quoteleft -60
-KPX space quotedblleft -30
-KPX space Y -90
-KPX space W -40
-KPX space V -50
-KPX space T -50
-
-KPX v period -80
-KPX v o -25
-KPX v e -25
-KPX v comma -80
-KPX v a -25
-
-KPX w period -60
-KPX w o -10
-KPX w e -10
-KPX w comma -60
-KPX w a -15
-
-KPX x e -30
-
-KPX y period -100
-KPX y o -20
-KPX y e -20
-KPX y comma -100
-KPX y a -20
-
-KPX z o -15
-KPX z e -15
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 195 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 195 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 195 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 195 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 167 175 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 195 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 195 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 195 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 195 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 195 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 195 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 195 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 195 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 195 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 205 195 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 195 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 195 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 195 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 195 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 195 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 195 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 195 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 195 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 195 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 195 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 195 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 195 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 195 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Makefile.in b/blt3.0/library/AFM/Makefile.in
deleted file mode 100644
index edc17be..0000000
--- a/blt3.0/library/AFM/Makefile.in
+++ /dev/null
@@ -1,78 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for AFM files.
-# ------------------------------------------------------------------------
-
-datadir =	@datadir@
-datarootdir = 	@datarootdir@
-exec_prefix =	@exec_prefix@
-libdir =	@libdir@
-prefix =	@prefix@
-srcdir =	@srcdir@
-
-version =	@BLT_VERSION@
-so_prefix =	@BLT_SO_PREFIX@
-so_ext =	@BLT_SO_EXT@
-lib_suffix =	@BLT_LIB_SUFFIX@
-pkgdir =	@BLT_LIBRARY@
-afmdir =	$(pkgdir)/afm
-
-INSTALL =	@INSTALL@
-INSTALL_DATA =  @INSTALL_DATA@
-RM =		rm -f
-SHELL =		/bin/sh
-MKDIR_P =	@MKDIR_P@
-
-afmFiles = \
-	AvantGarde-Book.afm \
-	AvantGarde-BookOblique.afm \
-	AvantGarde-Demi.afm \
-	AvantGarde-DemiOblique.afm \
-	Bookman-Demi.afm \
-	Bookman-DemiItalic.afm \
-	Bookman-Light.afm \
-	Bookman-LightItalic.afm \
-	Courier-Bold.afm \
-	Courier-BoldOblique.afm \
-	Courier-Oblique.afm \
-	Courier.afm \
-	Helvetica-Bold.afm \
-	Helvetica-BoldOblique.afm \
-	Helvetica-Condensed-Bold.afm \
-	Helvetica-Condensed-BoldObl.afm \
-	Helvetica-Condensed-Oblique.afm \
-	Helvetica-Condensed.afm \
-	Helvetica-Narrow-Bold.afm \
-	Helvetica-Narrow-BoldOblique.afm \
-	Helvetica-Narrow-Oblique.afm \
-	Helvetica-Narrow.afm \
-	Helvetica-Oblique.afm \
-	Helvetica.afm \
-	NewCenturySchlbk-Bold.afm \
-	NewCenturySchlbk-BoldItalic.afm \
-	NewCenturySchlbk-Italic.afm \
-	NewCenturySchlbk-Roman.afm \
-	Palatino-Bold.afm \
-	Palatino-BoldItalic.afm \
-	Palatino-Italic.afm \
-	Palatino-Roman.afm \
-	Symbol.afm \
-	Times-Bold.afm \
-	Times-BoldItalic.afm \
-	Times-Italic.afm \
-	Times-Roman.afm \
-	ZapfChancery-MediumItalic.afm \
-	ZapfDingbats.afm 
-
-all: 
-
-install: mkdirs 
-	for i in $(afmFiles) ; do \
-	    $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(afmdir) ; \
-	done 
-mkdirs:
-	$(MKDIR_P) $(DESTDIR)$(afmdir)
-
-clean:
-
-distclean: clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* Makefile
diff --git a/blt3.0/library/AFM/NewCenturySchlbk-Bold.afm b/blt3.0/library/AFM/NewCenturySchlbk-Bold.afm
deleted file mode 100644
index 6438f86..0000000
--- a/blt3.0/library/AFM/NewCenturySchlbk-Bold.afm
+++ /dev/null
@@ -1,473 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1988, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue May 28 16:48:12 1991
-Comment UniqueID 35031
-Comment VMusage 30773 37665
-FontName NewCenturySchlbk-Bold
-FullName New Century Schoolbook Bold
-FamilyName New Century Schoolbook
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -165 -250 1000 988
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.009
-Notice Copyright (c) 1985, 1987, 1988, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 722
-XHeight 475
-Ascender 737
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 287 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 296 ; N exclam ; B 53 -15 243 737 ;
-C 34 ; WX 333 ; N quotedbl ; B 0 378 333 737 ;
-C 35 ; WX 574 ; N numbersign ; B 36 0 538 690 ;
-C 36 ; WX 574 ; N dollar ; B 25 -141 549 810 ;
-C 37 ; WX 833 ; N percent ; B 14 -15 819 705 ;
-C 38 ; WX 852 ; N ampersand ; B 34 -15 818 737 ;
-C 39 ; WX 241 ; N quoteright ; B 22 378 220 737 ;
-C 40 ; WX 389 ; N parenleft ; B 77 -117 345 745 ;
-C 41 ; WX 389 ; N parenright ; B 44 -117 312 745 ;
-C 42 ; WX 500 ; N asterisk ; B 54 302 446 737 ;
-C 43 ; WX 606 ; N plus ; B 50 0 556 506 ;
-C 44 ; WX 278 ; N comma ; B 40 -184 238 175 ;
-C 45 ; WX 333 ; N hyphen ; B 42 174 291 302 ;
-C 46 ; WX 278 ; N period ; B 44 -15 234 175 ;
-C 47 ; WX 278 ; N slash ; B -42 -15 320 737 ;
-C 48 ; WX 574 ; N zero ; B 27 -15 547 705 ;
-C 49 ; WX 574 ; N one ; B 83 0 491 705 ;
-C 50 ; WX 574 ; N two ; B 19 0 531 705 ;
-C 51 ; WX 574 ; N three ; B 23 -15 531 705 ;
-C 52 ; WX 574 ; N four ; B 19 0 547 705 ;
-C 53 ; WX 574 ; N five ; B 32 -15 534 705 ;
-C 54 ; WX 574 ; N six ; B 27 -15 547 705 ;
-C 55 ; WX 574 ; N seven ; B 45 -15 547 705 ;
-C 56 ; WX 574 ; N eight ; B 27 -15 548 705 ;
-C 57 ; WX 574 ; N nine ; B 27 -15 547 705 ;
-C 58 ; WX 278 ; N colon ; B 44 -15 234 485 ;
-C 59 ; WX 278 ; N semicolon ; B 40 -184 238 485 ;
-C 60 ; WX 606 ; N less ; B 50 -9 556 515 ;
-C 61 ; WX 606 ; N equal ; B 50 103 556 403 ;
-C 62 ; WX 606 ; N greater ; B 50 -9 556 515 ;
-C 63 ; WX 500 ; N question ; B 23 -15 477 737 ;
-C 64 ; WX 747 ; N at ; B -2 -15 750 737 ;
-C 65 ; WX 759 ; N A ; B -19 0 778 737 ;
-C 66 ; WX 778 ; N B ; B 19 0 739 722 ;
-C 67 ; WX 778 ; N C ; B 39 -15 723 737 ;
-C 68 ; WX 833 ; N D ; B 19 0 794 722 ;
-C 69 ; WX 759 ; N E ; B 19 0 708 722 ;
-C 70 ; WX 722 ; N F ; B 19 0 697 722 ;
-C 71 ; WX 833 ; N G ; B 39 -15 818 737 ;
-C 72 ; WX 870 ; N H ; B 19 0 851 722 ;
-C 73 ; WX 444 ; N I ; B 29 0 415 722 ;
-C 74 ; WX 648 ; N J ; B 6 -15 642 722 ;
-C 75 ; WX 815 ; N K ; B 19 0 822 722 ;
-C 76 ; WX 722 ; N L ; B 19 0 703 722 ;
-C 77 ; WX 981 ; N M ; B 10 0 971 722 ;
-C 78 ; WX 833 ; N N ; B 5 -10 828 722 ;
-C 79 ; WX 833 ; N O ; B 39 -15 794 737 ;
-C 80 ; WX 759 ; N P ; B 24 0 735 722 ;
-C 81 ; WX 833 ; N Q ; B 39 -189 808 737 ;
-C 82 ; WX 815 ; N R ; B 19 -15 815 722 ;
-C 83 ; WX 667 ; N S ; B 51 -15 634 737 ;
-C 84 ; WX 722 ; N T ; B 16 0 706 722 ;
-C 85 ; WX 833 ; N U ; B 14 -15 825 722 ;
-C 86 ; WX 759 ; N V ; B -19 -10 778 722 ;
-C 87 ; WX 981 ; N W ; B 7 -10 974 722 ;
-C 88 ; WX 722 ; N X ; B -12 0 734 722 ;
-C 89 ; WX 722 ; N Y ; B -12 0 734 722 ;
-C 90 ; WX 667 ; N Z ; B 28 0 639 722 ;
-C 91 ; WX 389 ; N bracketleft ; B 84 -109 339 737 ;
-C 92 ; WX 606 ; N backslash ; B 122 -15 484 737 ;
-C 93 ; WX 389 ; N bracketright ; B 50 -109 305 737 ;
-C 94 ; WX 606 ; N asciicircum ; B 66 325 540 690 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 241 ; N quoteleft ; B 22 378 220 737 ;
-C 97 ; WX 611 ; N a ; B 40 -15 601 485 ;
-C 98 ; WX 648 ; N b ; B 4 -15 616 737 ;
-C 99 ; WX 556 ; N c ; B 32 -15 524 485 ;
-C 100 ; WX 667 ; N d ; B 32 -15 644 737 ;
-C 101 ; WX 574 ; N e ; B 32 -15 542 485 ;
-C 102 ; WX 389 ; N f ; B 11 0 461 737 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B 30 -205 623 535 ;
-C 104 ; WX 685 ; N h ; B 17 0 662 737 ;
-C 105 ; WX 370 ; N i ; B 26 0 338 737 ;
-C 106 ; WX 352 ; N j ; B -86 -205 271 737 ;
-C 107 ; WX 667 ; N k ; B 17 0 662 737 ;
-C 108 ; WX 352 ; N l ; B 17 0 329 737 ;
-C 109 ; WX 963 ; N m ; B 17 0 940 485 ;
-C 110 ; WX 685 ; N n ; B 17 0 662 485 ;
-C 111 ; WX 611 ; N o ; B 32 -15 579 485 ;
-C 112 ; WX 667 ; N p ; B 17 -205 629 485 ;
-C 113 ; WX 648 ; N q ; B 32 -205 638 485 ;
-C 114 ; WX 519 ; N r ; B 17 0 516 485 ;
-C 115 ; WX 500 ; N s ; B 48 -15 476 485 ;
-C 116 ; WX 426 ; N t ; B 21 -15 405 675 ;
-C 117 ; WX 685 ; N u ; B 17 -15 668 475 ;
-C 118 ; WX 611 ; N v ; B 12 -10 599 475 ;
-C 119 ; WX 889 ; N w ; B 16 -10 873 475 ;
-C 120 ; WX 611 ; N x ; B 12 0 599 475 ;
-C 121 ; WX 611 ; N y ; B 12 -205 599 475 ;
-C 122 ; WX 537 ; N z ; B 38 0 499 475 ;
-C 123 ; WX 389 ; N braceleft ; B 36 -109 313 737 ;
-C 124 ; WX 606 ; N bar ; B 249 -250 357 750 ;
-C 125 ; WX 389 ; N braceright ; B 76 -109 353 737 ;
-C 126 ; WX 606 ; N asciitilde ; B 72 160 534 346 ;
-C 161 ; WX 296 ; N exclamdown ; B 53 -205 243 547 ;
-C 162 ; WX 574 ; N cent ; B 32 -102 528 572 ;
-C 163 ; WX 574 ; N sterling ; B 16 -15 558 705 ;
-C 164 ; WX 167 ; N fraction ; B -165 -15 332 705 ;
-C 165 ; WX 574 ; N yen ; B -10 0 584 690 ;
-C 166 ; WX 574 ; N florin ; B 14 -205 548 737 ;
-C 167 ; WX 500 ; N section ; B 62 -86 438 737 ;
-C 168 ; WX 574 ; N currency ; B 27 84 547 605 ;
-C 169 ; WX 241 ; N quotesingle ; B 53 378 189 737 ;
-C 170 ; WX 481 ; N quotedblleft ; B 22 378 459 737 ;
-C 171 ; WX 500 ; N guillemotleft ; B 46 79 454 397 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 62 79 271 397 ;
-C 173 ; WX 333 ; N guilsinglright ; B 62 79 271 397 ;
-C 174 ; WX 685 ; N fi ; B 11 0 666 737 ;
-C 175 ; WX 685 ; N fl ; B 11 0 666 737 ;
-C 177 ; WX 500 ; N endash ; B 0 184 500 292 ;
-C 178 ; WX 500 ; N dagger ; B 39 -101 461 737 ;
-C 179 ; WX 500 ; N daggerdbl ; B 39 -89 461 737 ;
-C 180 ; WX 278 ; N periodcentered ; B 53 200 225 372 ;
-C 182 ; WX 747 ; N paragraph ; B 96 -71 631 722 ;
-C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ;
-C 184 ; WX 241 ; N quotesinglbase ; B 22 -184 220 175 ;
-C 185 ; WX 481 ; N quotedblbase ; B 22 -184 459 175 ;
-C 186 ; WX 481 ; N quotedblright ; B 22 378 459 737 ;
-C 187 ; WX 500 ; N guillemotright ; B 46 79 454 397 ;
-C 188 ; WX 1000 ; N ellipsis ; B 72 -15 928 175 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -15 993 705 ;
-C 191 ; WX 500 ; N questiondown ; B 23 -205 477 547 ;
-C 193 ; WX 333 ; N grave ; B 2 547 249 737 ;
-C 194 ; WX 333 ; N acute ; B 84 547 331 737 ;
-C 195 ; WX 333 ; N circumflex ; B -10 547 344 725 ;
-C 196 ; WX 333 ; N tilde ; B -24 563 357 705 ;
-C 197 ; WX 333 ; N macron ; B -6 582 339 664 ;
-C 198 ; WX 333 ; N breve ; B 9 547 324 714 ;
-C 199 ; WX 333 ; N dotaccent ; B 95 552 237 694 ;
-C 200 ; WX 333 ; N dieresis ; B -12 552 345 694 ;
-C 202 ; WX 333 ; N ring ; B 58 545 274 761 ;
-C 203 ; WX 333 ; N cedilla ; B 17 -224 248 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -16 547 431 737 ;
-C 206 ; WX 333 ; N ogonek ; B 168 -163 346 3 ;
-C 207 ; WX 333 ; N caron ; B -10 547 344 725 ;
-C 208 ; WX 1000 ; N emdash ; B 0 184 1000 292 ;
-C 225 ; WX 981 ; N AE ; B -29 0 963 722 ;
-C 227 ; WX 367 ; N ordfeminine ; B 1 407 393 705 ;
-C 232 ; WX 722 ; N Lslash ; B 19 0 703 722 ;
-C 233 ; WX 833 ; N Oslash ; B 39 -53 794 775 ;
-C 234 ; WX 1000 ; N OE ; B 0 0 982 722 ;
-C 235 ; WX 367 ; N ordmasculine ; B 1 407 366 705 ;
-C 241 ; WX 870 ; N ae ; B 32 -15 838 485 ;
-C 245 ; WX 370 ; N dotlessi ; B 26 0 338 475 ;
-C 248 ; WX 352 ; N lslash ; B 17 0 329 737 ;
-C 249 ; WX 611 ; N oslash ; B 32 -103 579 573 ;
-C 250 ; WX 907 ; N oe ; B 32 -15 875 485 ;
-C 251 ; WX 611 ; N germandbls ; B -2 -15 580 737 ;
-C -1 ; WX 574 ; N ecircumflex ; B 32 -15 542 725 ;
-C -1 ; WX 574 ; N edieresis ; B 32 -15 542 694 ;
-C -1 ; WX 611 ; N aacute ; B 40 -15 601 737 ;
-C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ;
-C -1 ; WX 370 ; N icircumflex ; B 9 0 363 725 ;
-C -1 ; WX 685 ; N udieresis ; B 17 -15 668 694 ;
-C -1 ; WX 611 ; N ograve ; B 32 -15 579 737 ;
-C -1 ; WX 685 ; N uacute ; B 17 -15 668 737 ;
-C -1 ; WX 685 ; N ucircumflex ; B 17 -15 668 725 ;
-C -1 ; WX 759 ; N Aacute ; B -19 0 778 964 ;
-C -1 ; WX 370 ; N igrave ; B 21 0 338 737 ;
-C -1 ; WX 444 ; N Icircumflex ; B 29 0 415 952 ;
-C -1 ; WX 556 ; N ccedilla ; B 32 -224 524 485 ;
-C -1 ; WX 611 ; N adieresis ; B 40 -15 601 694 ;
-C -1 ; WX 759 ; N Ecircumflex ; B 19 0 708 952 ;
-C -1 ; WX 500 ; N scaron ; B 48 -15 476 725 ;
-C -1 ; WX 667 ; N thorn ; B 17 -205 629 737 ;
-C -1 ; WX 1000 ; N trademark ; B 6 317 982 722 ;
-C -1 ; WX 574 ; N egrave ; B 32 -15 542 737 ;
-C -1 ; WX 344 ; N threesuperior ; B -3 273 355 705 ;
-C -1 ; WX 537 ; N zcaron ; B 38 0 499 725 ;
-C -1 ; WX 611 ; N atilde ; B 40 -15 601 705 ;
-C -1 ; WX 611 ; N aring ; B 40 -15 601 761 ;
-C -1 ; WX 611 ; N ocircumflex ; B 32 -15 579 725 ;
-C -1 ; WX 759 ; N Edieresis ; B 19 0 708 921 ;
-C -1 ; WX 861 ; N threequarters ; B 15 -15 838 705 ;
-C -1 ; WX 611 ; N ydieresis ; B 12 -205 599 694 ;
-C -1 ; WX 611 ; N yacute ; B 12 -205 599 737 ;
-C -1 ; WX 370 ; N iacute ; B 26 0 350 737 ;
-C -1 ; WX 759 ; N Acircumflex ; B -19 0 778 952 ;
-C -1 ; WX 833 ; N Uacute ; B 14 -15 825 964 ;
-C -1 ; WX 574 ; N eacute ; B 32 -15 542 737 ;
-C -1 ; WX 833 ; N Ograve ; B 39 -15 794 964 ;
-C -1 ; WX 611 ; N agrave ; B 40 -15 601 737 ;
-C -1 ; WX 833 ; N Udieresis ; B 14 -15 825 921 ;
-C -1 ; WX 611 ; N acircumflex ; B 40 -15 601 725 ;
-C -1 ; WX 444 ; N Igrave ; B 29 0 415 964 ;
-C -1 ; WX 344 ; N twosuperior ; B -3 282 350 705 ;
-C -1 ; WX 833 ; N Ugrave ; B 14 -15 825 964 ;
-C -1 ; WX 861 ; N onequarter ; B 31 -15 838 705 ;
-C -1 ; WX 833 ; N Ucircumflex ; B 14 -15 825 952 ;
-C -1 ; WX 667 ; N Scaron ; B 51 -15 634 952 ;
-C -1 ; WX 444 ; N Idieresis ; B 29 0 415 921 ;
-C -1 ; WX 370 ; N idieresis ; B 7 0 364 694 ;
-C -1 ; WX 759 ; N Egrave ; B 19 0 708 964 ;
-C -1 ; WX 833 ; N Oacute ; B 39 -15 794 964 ;
-C -1 ; WX 606 ; N divide ; B 50 -40 556 546 ;
-C -1 ; WX 759 ; N Atilde ; B -19 0 778 932 ;
-C -1 ; WX 759 ; N Aring ; B -19 0 778 988 ;
-C -1 ; WX 833 ; N Odieresis ; B 39 -15 794 921 ;
-C -1 ; WX 759 ; N Adieresis ; B -19 0 778 921 ;
-C -1 ; WX 833 ; N Ntilde ; B 5 -10 828 932 ;
-C -1 ; WX 667 ; N Zcaron ; B 28 0 639 952 ;
-C -1 ; WX 759 ; N Thorn ; B 24 0 735 722 ;
-C -1 ; WX 444 ; N Iacute ; B 29 0 415 964 ;
-C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ;
-C -1 ; WX 606 ; N multiply ; B 65 15 541 491 ;
-C -1 ; WX 759 ; N Eacute ; B 19 0 708 964 ;
-C -1 ; WX 722 ; N Ydieresis ; B -12 0 734 921 ;
-C -1 ; WX 344 ; N onesuperior ; B 31 282 309 705 ;
-C -1 ; WX 685 ; N ugrave ; B 17 -15 668 737 ;
-C -1 ; WX 606 ; N logicalnot ; B 50 103 556 403 ;
-C -1 ; WX 685 ; N ntilde ; B 17 0 662 705 ;
-C -1 ; WX 833 ; N Otilde ; B 39 -15 794 932 ;
-C -1 ; WX 611 ; N otilde ; B 32 -15 579 705 ;
-C -1 ; WX 778 ; N Ccedilla ; B 39 -224 723 737 ;
-C -1 ; WX 759 ; N Agrave ; B -19 0 778 964 ;
-C -1 ; WX 861 ; N onehalf ; B 31 -15 838 705 ;
-C -1 ; WX 833 ; N Eth ; B 19 0 794 722 ;
-C -1 ; WX 400 ; N degree ; B 57 419 343 705 ;
-C -1 ; WX 722 ; N Yacute ; B -12 0 734 964 ;
-C -1 ; WX 833 ; N Ocircumflex ; B 39 -15 794 952 ;
-C -1 ; WX 611 ; N oacute ; B 32 -15 579 737 ;
-C -1 ; WX 685 ; N mu ; B 17 -205 668 475 ;
-C -1 ; WX 606 ; N minus ; B 50 199 556 307 ;
-C -1 ; WX 611 ; N eth ; B 32 -15 579 737 ;
-C -1 ; WX 611 ; N odieresis ; B 32 -15 579 694 ;
-C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ;
-C -1 ; WX 606 ; N brokenbar ; B 249 -175 357 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 128
-
-KPX A y -18
-KPX A w -18
-KPX A v -18
-KPX A quoteright -74
-KPX A quotedblright -74
-KPX A Y -91
-KPX A W -74
-KPX A V -74
-KPX A U -18
-KPX A T -55
-
-KPX C period -18
-KPX C comma -18
-
-KPX D period -25
-KPX D comma -25
-
-KPX F r -18
-KPX F period -125
-KPX F o -55
-KPX F i -18
-KPX F e -55
-KPX F comma -125
-KPX F a -74
-
-KPX J u -18
-KPX J period -55
-KPX J o -18
-KPX J e -18
-KPX J comma -55
-KPX J a -18
-KPX J A -18
-
-KPX K y -25
-KPX K u -18
-
-KPX L y -25
-KPX L quoteright -100
-KPX L quotedblright -100
-KPX L Y -74
-KPX L W -74
-KPX L V -100
-KPX L T -100
-
-KPX N period -18
-KPX N comma -18
-
-KPX O period -25
-KPX O comma -25
-KPX O T 10
-
-KPX P period -150
-KPX P o -55
-KPX P e -55
-KPX P comma -150
-KPX P a -55
-KPX P A -74
-
-KPX S period -18
-KPX S comma -18
-
-KPX T u -18
-KPX T r -18
-KPX T period -100
-KPX T o -74
-KPX T i -18
-KPX T hyphen -125
-KPX T e -74
-KPX T comma -100
-KPX T a -74
-KPX T O 10
-KPX T A -55
-
-KPX U period -25
-KPX U comma -25
-KPX U A -18
-
-KPX V u -55
-KPX V semicolon -37
-KPX V period -125
-KPX V o -74
-KPX V i -18
-KPX V hyphen -100
-KPX V e -74
-KPX V comma -125
-KPX V colon -37
-KPX V a -74
-KPX V A -74
-
-KPX W y -25
-KPX W u -37
-KPX W semicolon -55
-KPX W period -100
-KPX W o -74
-KPX W i -18
-KPX W hyphen -100
-KPX W e -74
-KPX W comma -100
-KPX W colon -55
-KPX W a -74
-KPX W A -74
-
-KPX Y u -55
-KPX Y semicolon -25
-KPX Y period -100
-KPX Y o -100
-KPX Y i -18
-KPX Y hyphen -125
-KPX Y e -100
-KPX Y comma -100
-KPX Y colon -25
-KPX Y a -100
-KPX Y A -91
-
-KPX colon space -18
-
-KPX comma space -18
-KPX comma quoteright -18
-KPX comma quotedblright -18
-
-KPX f quoteright 75
-KPX f quotedblright 75
-
-KPX period space -18
-KPX period quoteright -18
-KPX period quotedblright -18
-
-KPX quotedblleft A -74
-
-KPX quotedblright space -18
-
-KPX quoteleft A -74
-
-KPX quoteright s -25
-KPX quoteright d -25
-
-KPX r period -74
-KPX r comma -74
-
-KPX semicolon space -18
-
-KPX space quoteleft -18
-KPX space quotedblleft -18
-KPX space Y -18
-KPX space W -18
-KPX space V -18
-KPX space T -18
-KPX space A -18
-
-KPX v period -100
-KPX v comma -100
-
-KPX w period -100
-KPX w comma -100
-
-KPX y period -100
-KPX y comma -100
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 213 227 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 213 227 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 213 227 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 213 227 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 213 227 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 213 227 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 213 227 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 213 227 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 213 227 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 213 227 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 56 227 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 56 227 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 56 227 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 56 227 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 250 227 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 227 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 227 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 227 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 227 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 227 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 227 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 250 227 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 250 227 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 250 227 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 250 227 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 195 227 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 195 227 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 227 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 139 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 139 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 139 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 139 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 139 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 139 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 121 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 121 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 121 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 121 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 19 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 19 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 19 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 19 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 176 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 176 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 176 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 176 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 176 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 139 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 139 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 102 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/NewCenturySchlbk-BoldItalic.afm b/blt3.0/library/AFM/NewCenturySchlbk-BoldItalic.afm
deleted file mode 100644
index 41611c7..0000000
--- a/blt3.0/library/AFM/NewCenturySchlbk-BoldItalic.afm
+++ /dev/null
@@ -1,603 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue May 28 16:56:07 1991
-Comment UniqueID 35034
-Comment VMusage 31030 37922
-FontName NewCenturySchlbk-BoldItalic
-FullName New Century Schoolbook Bold Italic
-FamilyName New Century Schoolbook
-Weight Bold
-ItalicAngle -16
-IsFixedPitch false
-FontBBox -205 -250 1147 991
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 722
-XHeight 477
-Ascender 737
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 287 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 0 -15 333 737 ;
-C 34 ; WX 400 ; N quotedbl ; B 66 388 428 737 ;
-C 35 ; WX 574 ; N numbersign ; B 30 0 544 690 ;
-C 36 ; WX 574 ; N dollar ; B 9 -120 565 810 ;
-C 37 ; WX 889 ; N percent ; B 54 -28 835 727 ;
-C 38 ; WX 889 ; N ampersand ; B 32 -15 823 737 ;
-C 39 ; WX 259 ; N quoteright ; B 48 388 275 737 ;
-C 40 ; WX 407 ; N parenleft ; B 72 -117 454 745 ;
-C 41 ; WX 407 ; N parenright ; B -70 -117 310 745 ;
-C 42 ; WX 500 ; N asterisk ; B 58 301 498 737 ;
-C 43 ; WX 606 ; N plus ; B 50 0 556 506 ;
-C 44 ; WX 287 ; N comma ; B -57 -192 170 157 ;
-C 45 ; WX 333 ; N hyphen ; B 2 177 263 299 ;
-C 46 ; WX 287 ; N period ; B -20 -15 152 157 ;
-C 47 ; WX 278 ; N slash ; B -41 -15 320 737 ;
-C 48 ; WX 574 ; N zero ; B 21 -15 553 705 ;
-C 49 ; WX 574 ; N one ; B 25 0 489 705 ;
-C 50 ; WX 574 ; N two ; B -38 -3 538 705 ;
-C 51 ; WX 574 ; N three ; B -7 -15 536 705 ;
-C 52 ; WX 574 ; N four ; B -13 0 544 705 ;
-C 53 ; WX 574 ; N five ; B 0 -15 574 705 ;
-C 54 ; WX 574 ; N six ; B 31 -15 574 705 ;
-C 55 ; WX 574 ; N seven ; B 64 -15 593 705 ;
-C 56 ; WX 574 ; N eight ; B 0 -15 552 705 ;
-C 57 ; WX 574 ; N nine ; B 0 -15 543 705 ;
-C 58 ; WX 287 ; N colon ; B -20 -15 237 477 ;
-C 59 ; WX 287 ; N semicolon ; B -57 -192 237 477 ;
-C 60 ; WX 606 ; N less ; B 50 -9 556 515 ;
-C 61 ; WX 606 ; N equal ; B 50 103 556 403 ;
-C 62 ; WX 606 ; N greater ; B 50 -8 556 514 ;
-C 63 ; WX 481 ; N question ; B 79 -15 451 737 ;
-C 64 ; WX 747 ; N at ; B -4 -15 751 737 ;
-C 65 ; WX 741 ; N A ; B -75 0 716 737 ;
-C 66 ; WX 759 ; N B ; B -50 0 721 722 ;
-C 67 ; WX 759 ; N C ; B 37 -15 759 737 ;
-C 68 ; WX 833 ; N D ; B -47 0 796 722 ;
-C 69 ; WX 741 ; N E ; B -41 0 730 722 ;
-C 70 ; WX 704 ; N F ; B -41 0 730 722 ;
-C 71 ; WX 815 ; N G ; B 37 -15 805 737 ;
-C 72 ; WX 870 ; N H ; B -41 0 911 722 ;
-C 73 ; WX 444 ; N I ; B -41 0 485 722 ;
-C 74 ; WX 667 ; N J ; B -20 -15 708 722 ;
-C 75 ; WX 778 ; N K ; B -41 0 832 722 ;
-C 76 ; WX 704 ; N L ; B -41 0 670 722 ;
-C 77 ; WX 944 ; N M ; B -44 0 988 722 ;
-C 78 ; WX 852 ; N N ; B -61 -10 913 722 ;
-C 79 ; WX 833 ; N O ; B 37 -15 796 737 ;
-C 80 ; WX 741 ; N P ; B -41 0 730 722 ;
-C 81 ; WX 833 ; N Q ; B 37 -189 796 737 ;
-C 82 ; WX 796 ; N R ; B -41 -15 749 722 ;
-C 83 ; WX 685 ; N S ; B 1 -15 666 737 ;
-C 84 ; WX 722 ; N T ; B 41 0 759 722 ;
-C 85 ; WX 833 ; N U ; B 88 -15 900 722 ;
-C 86 ; WX 741 ; N V ; B 32 -10 802 722 ;
-C 87 ; WX 944 ; N W ; B 40 -10 1000 722 ;
-C 88 ; WX 741 ; N X ; B -82 0 801 722 ;
-C 89 ; WX 704 ; N Y ; B 13 0 775 722 ;
-C 90 ; WX 704 ; N Z ; B -33 0 711 722 ;
-C 91 ; WX 407 ; N bracketleft ; B 1 -109 464 737 ;
-C 92 ; WX 606 ; N backslash ; B 161 -15 445 737 ;
-C 93 ; WX 407 ; N bracketright ; B -101 -109 362 737 ;
-C 94 ; WX 606 ; N asciicircum ; B 66 325 540 690 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 259 ; N quoteleft ; B 47 388 274 737 ;
-C 97 ; WX 667 ; N a ; B 6 -15 636 477 ;
-C 98 ; WX 611 ; N b ; B 29 -15 557 737 ;
-C 99 ; WX 537 ; N c ; B 0 -15 482 477 ;
-C 100 ; WX 667 ; N d ; B 0 -15 660 737 ;
-C 101 ; WX 519 ; N e ; B 0 -15 479 477 ;
-C 102 ; WX 389 ; N f ; B -48 -205 550 737 ; L i fi ; L l fl ;
-C 103 ; WX 611 ; N g ; B -63 -205 604 528 ;
-C 104 ; WX 685 ; N h ; B 0 -15 639 737 ;
-C 105 ; WX 389 ; N i ; B 32 -15 345 737 ;
-C 106 ; WX 370 ; N j ; B -205 -205 347 737 ;
-C 107 ; WX 648 ; N k ; B -11 -15 578 737 ;
-C 108 ; WX 389 ; N l ; B 32 -15 375 737 ;
-C 109 ; WX 944 ; N m ; B 0 -15 909 477 ;
-C 110 ; WX 685 ; N n ; B 0 -15 639 477 ;
-C 111 ; WX 574 ; N o ; B 0 -15 530 477 ;
-C 112 ; WX 648 ; N p ; B -119 -205 590 477 ;
-C 113 ; WX 630 ; N q ; B 0 -205 587 477 ;
-C 114 ; WX 519 ; N r ; B 0 0 527 486 ;
-C 115 ; WX 481 ; N s ; B 0 -15 435 477 ;
-C 116 ; WX 407 ; N t ; B 24 -15 403 650 ;
-C 117 ; WX 685 ; N u ; B 30 -15 635 477 ;
-C 118 ; WX 556 ; N v ; B 30 -15 496 477 ;
-C 119 ; WX 833 ; N w ; B 30 -15 773 477 ;
-C 120 ; WX 574 ; N x ; B -46 -15 574 477 ;
-C 121 ; WX 519 ; N y ; B -66 -205 493 477 ;
-C 122 ; WX 519 ; N z ; B -19 -15 473 477 ;
-C 123 ; WX 407 ; N braceleft ; B 52 -109 408 737 ;
-C 124 ; WX 606 ; N bar ; B 249 -250 357 750 ;
-C 125 ; WX 407 ; N braceright ; B -25 -109 331 737 ;
-C 126 ; WX 606 ; N asciitilde ; B 72 160 534 346 ;
-C 161 ; WX 333 ; N exclamdown ; B -44 -205 289 547 ;
-C 162 ; WX 574 ; N cent ; B 30 -144 512 578 ;
-C 163 ; WX 574 ; N sterling ; B -18 -15 566 705 ;
-C 164 ; WX 167 ; N fraction ; B -166 -15 333 705 ;
-C 165 ; WX 574 ; N yen ; B 17 0 629 690 ;
-C 166 ; WX 574 ; N florin ; B -43 -205 575 737 ;
-C 167 ; WX 500 ; N section ; B -30 -146 515 737 ;
-C 168 ; WX 574 ; N currency ; B 27 84 547 605 ;
-C 169 ; WX 287 ; N quotesingle ; B 112 388 250 737 ;
-C 170 ; WX 481 ; N quotedblleft ; B 54 388 521 737 ;
-C 171 ; WX 481 ; N guillemotleft ; B -35 69 449 407 ;
-C 172 ; WX 278 ; N guilsinglleft ; B -25 69 244 407 ;
-C 173 ; WX 278 ; N guilsinglright ; B -26 69 243 407 ;
-C 174 ; WX 685 ; N fi ; B -70 -205 641 737 ;
-C 175 ; WX 685 ; N fl ; B -70 -205 671 737 ;
-C 177 ; WX 500 ; N endash ; B -47 189 479 287 ;
-C 178 ; WX 500 ; N dagger ; B 48 -146 508 737 ;
-C 179 ; WX 500 ; N daggerdbl ; B -60 -150 508 737 ;
-C 180 ; WX 287 ; N periodcentered ; B 57 200 229 372 ;
-C 182 ; WX 650 ; N paragraph ; B 25 -131 681 722 ;
-C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ;
-C 184 ; WX 259 ; N quotesinglbase ; B -57 -192 170 157 ;
-C 185 ; WX 481 ; N quotedblbase ; B -57 -192 412 157 ;
-C 186 ; WX 481 ; N quotedblright ; B 43 388 510 737 ;
-C 187 ; WX 481 ; N guillemotright ; B -31 69 453 407 ;
-C 188 ; WX 1000 ; N ellipsis ; B 81 -15 919 157 ;
-C 189 ; WX 1167 ; N perthousand ; B 20 -28 1147 727 ;
-C 191 ; WX 481 ; N questiondown ; B 0 -205 372 547 ;
-C 193 ; WX 333 ; N grave ; B 74 538 294 722 ;
-C 194 ; WX 333 ; N acute ; B 123 538 372 722 ;
-C 195 ; WX 333 ; N circumflex ; B 23 533 365 705 ;
-C 196 ; WX 333 ; N tilde ; B 28 561 398 690 ;
-C 197 ; WX 333 ; N macron ; B 47 573 404 649 ;
-C 198 ; WX 333 ; N breve ; B 67 535 390 698 ;
-C 199 ; WX 333 ; N dotaccent ; B 145 546 289 690 ;
-C 200 ; WX 333 ; N dieresis ; B 33 546 393 690 ;
-C 202 ; WX 333 ; N ring ; B 111 522 335 746 ;
-C 203 ; WX 333 ; N cedilla ; B -21 -220 225 3 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 15 538 480 722 ;
-C 206 ; WX 333 ; N ogonek ; B 68 -155 246 -10 ;
-C 207 ; WX 333 ; N caron ; B 60 531 403 705 ;
-C 208 ; WX 1000 ; N emdash ; B -47 189 979 287 ;
-C 225 ; WX 889 ; N AE ; B -86 0 915 722 ;
-C 227 ; WX 412 ; N ordfeminine ; B 47 407 460 705 ;
-C 232 ; WX 704 ; N Lslash ; B -41 0 670 722 ;
-C 233 ; WX 833 ; N Oslash ; B 35 -68 798 790 ;
-C 234 ; WX 963 ; N OE ; B 29 0 989 722 ;
-C 235 ; WX 356 ; N ordmasculine ; B 42 407 394 705 ;
-C 241 ; WX 815 ; N ae ; B -18 -15 775 477 ;
-C 245 ; WX 389 ; N dotlessi ; B 32 -15 345 477 ;
-C 248 ; WX 389 ; N lslash ; B 5 -15 390 737 ;
-C 249 ; WX 574 ; N oslash ; B 0 -121 530 583 ;
-C 250 ; WX 852 ; N oe ; B -6 -15 812 477 ;
-C 251 ; WX 574 ; N germandbls ; B -91 -205 540 737 ;
-C -1 ; WX 519 ; N ecircumflex ; B 0 -15 479 705 ;
-C -1 ; WX 519 ; N edieresis ; B 0 -15 486 690 ;
-C -1 ; WX 667 ; N aacute ; B 6 -15 636 722 ;
-C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ;
-C -1 ; WX 389 ; N icircumflex ; B 21 -15 363 698 ;
-C -1 ; WX 685 ; N udieresis ; B 30 -15 635 690 ;
-C -1 ; WX 574 ; N ograve ; B 0 -15 530 722 ;
-C -1 ; WX 685 ; N uacute ; B 30 -15 635 722 ;
-C -1 ; WX 685 ; N ucircumflex ; B 30 -15 635 705 ;
-C -1 ; WX 741 ; N Aacute ; B -75 0 716 947 ;
-C -1 ; WX 389 ; N igrave ; B 32 -15 345 715 ;
-C -1 ; WX 444 ; N Icircumflex ; B -41 0 485 930 ;
-C -1 ; WX 537 ; N ccedilla ; B 0 -220 482 477 ;
-C -1 ; WX 667 ; N adieresis ; B 6 -15 636 690 ;
-C -1 ; WX 741 ; N Ecircumflex ; B -41 0 730 930 ;
-C -1 ; WX 481 ; N scaron ; B 0 -15 477 705 ;
-C -1 ; WX 648 ; N thorn ; B -119 -205 590 737 ;
-C -1 ; WX 950 ; N trademark ; B 42 317 1017 722 ;
-C -1 ; WX 519 ; N egrave ; B 0 -15 479 722 ;
-C -1 ; WX 344 ; N threesuperior ; B 3 273 361 705 ;
-C -1 ; WX 519 ; N zcaron ; B -19 -15 473 695 ;
-C -1 ; WX 667 ; N atilde ; B 6 -15 636 690 ;
-C -1 ; WX 667 ; N aring ; B 6 -15 636 746 ;
-C -1 ; WX 574 ; N ocircumflex ; B 0 -15 530 705 ;
-C -1 ; WX 741 ; N Edieresis ; B -41 0 730 915 ;
-C -1 ; WX 861 ; N threequarters ; B 35 -15 789 705 ;
-C -1 ; WX 519 ; N ydieresis ; B -66 -205 493 690 ;
-C -1 ; WX 519 ; N yacute ; B -66 -205 493 722 ;
-C -1 ; WX 389 ; N iacute ; B 32 -15 370 715 ;
-C -1 ; WX 741 ; N Acircumflex ; B -75 0 716 930 ;
-C -1 ; WX 833 ; N Uacute ; B 88 -15 900 947 ;
-C -1 ; WX 519 ; N eacute ; B 0 -15 479 722 ;
-C -1 ; WX 833 ; N Ograve ; B 37 -15 796 947 ;
-C -1 ; WX 667 ; N agrave ; B 6 -15 636 722 ;
-C -1 ; WX 833 ; N Udieresis ; B 88 -15 900 915 ;
-C -1 ; WX 667 ; N acircumflex ; B 6 -15 636 705 ;
-C -1 ; WX 444 ; N Igrave ; B -41 0 485 947 ;
-C -1 ; WX 344 ; N twosuperior ; B -17 280 362 705 ;
-C -1 ; WX 833 ; N Ugrave ; B 88 -15 900 947 ;
-C -1 ; WX 861 ; N onequarter ; B 17 -15 789 705 ;
-C -1 ; WX 833 ; N Ucircumflex ; B 88 -15 900 930 ;
-C -1 ; WX 685 ; N Scaron ; B 1 -15 666 930 ;
-C -1 ; WX 444 ; N Idieresis ; B -41 0 509 915 ;
-C -1 ; WX 389 ; N idieresis ; B 31 -15 391 683 ;
-C -1 ; WX 741 ; N Egrave ; B -41 0 730 947 ;
-C -1 ; WX 833 ; N Oacute ; B 37 -15 796 947 ;
-C -1 ; WX 606 ; N divide ; B 50 -40 556 546 ;
-C -1 ; WX 741 ; N Atilde ; B -75 0 716 915 ;
-C -1 ; WX 741 ; N Aring ; B -75 0 716 991 ;
-C -1 ; WX 833 ; N Odieresis ; B 37 -15 796 915 ;
-C -1 ; WX 741 ; N Adieresis ; B -75 0 716 915 ;
-C -1 ; WX 852 ; N Ntilde ; B -61 -10 913 915 ;
-C -1 ; WX 704 ; N Zcaron ; B -33 0 711 930 ;
-C -1 ; WX 741 ; N Thorn ; B -41 0 690 722 ;
-C -1 ; WX 444 ; N Iacute ; B -41 0 488 947 ;
-C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ;
-C -1 ; WX 606 ; N multiply ; B 65 15 541 491 ;
-C -1 ; WX 741 ; N Eacute ; B -41 0 730 947 ;
-C -1 ; WX 704 ; N Ydieresis ; B 13 0 775 915 ;
-C -1 ; WX 344 ; N onesuperior ; B 19 282 326 705 ;
-C -1 ; WX 685 ; N ugrave ; B 30 -15 635 722 ;
-C -1 ; WX 606 ; N logicalnot ; B 50 103 556 403 ;
-C -1 ; WX 685 ; N ntilde ; B 0 -15 639 690 ;
-C -1 ; WX 833 ; N Otilde ; B 37 -15 796 915 ;
-C -1 ; WX 574 ; N otilde ; B 0 -15 530 690 ;
-C -1 ; WX 759 ; N Ccedilla ; B 37 -220 759 737 ;
-C -1 ; WX 741 ; N Agrave ; B -75 0 716 947 ;
-C -1 ; WX 861 ; N onehalf ; B 17 -15 798 705 ;
-C -1 ; WX 833 ; N Eth ; B -47 0 796 722 ;
-C -1 ; WX 400 ; N degree ; B 86 419 372 705 ;
-C -1 ; WX 704 ; N Yacute ; B 13 0 775 947 ;
-C -1 ; WX 833 ; N Ocircumflex ; B 37 -15 796 930 ;
-C -1 ; WX 574 ; N oacute ; B 0 -15 530 722 ;
-C -1 ; WX 685 ; N mu ; B -89 -205 635 477 ;
-C -1 ; WX 606 ; N minus ; B 50 199 556 307 ;
-C -1 ; WX 574 ; N eth ; B 0 -15 530 752 ;
-C -1 ; WX 574 ; N odieresis ; B 0 -15 530 690 ;
-C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ;
-C -1 ; WX 606 ; N brokenbar ; B 249 -175 357 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 239
-
-KPX A y -33
-KPX A w -25
-KPX A v -10
-KPX A u -15
-KPX A quoteright -95
-KPX A quotedblright -95
-KPX A Y -70
-KPX A W -84
-KPX A V -100
-KPX A U -32
-KPX A T 5
-KPX A Q 5
-KPX A O 5
-KPX A G 5
-KPX A C 5
-
-KPX B period 15
-KPX B comma 15
-KPX B U 15
-KPX B A -11
-
-KPX C A -5
-
-KPX D period -11
-KPX D comma -11
-KPX D Y 6
-KPX D W -11
-KPX D V -18
-
-KPX F r -27
-KPX F period -91
-KPX F o -47
-KPX F i -41
-KPX F e -41
-KPX F comma -91
-KPX F a -47
-KPX F A -79
-
-KPX J u -39
-KPX J period -74
-KPX J o -40
-KPX J e -33
-KPX J comma -74
-KPX J a -40
-KPX J A -30
-
-KPX K y -48
-KPX K u -4
-KPX K o -4
-KPX K e 18
-
-KPX L y -30
-KPX L quoteright -100
-KPX L quotedblright -100
-KPX L Y -55
-KPX L W -69
-KPX L V -97
-KPX L T -75
-
-KPX N period -49
-KPX N comma -49
-
-KPX O period -18
-KPX O comma -18
-KPX O X -18
-KPX O W -15
-KPX O V -24
-KPX O A -5
-
-KPX P period -100
-KPX P o -40
-KPX P e -33
-KPX P comma -100
-KPX P a -40
-KPX P A -80
-
-KPX R W -14
-KPX R V -24
-
-KPX S period -18
-KPX S comma -18
-
-KPX T y -30
-KPX T w -30
-KPX T u -22
-KPX T r -9
-KPX T period -55
-KPX T o -40
-KPX T i -22
-KPX T hyphen -75
-KPX T h -9
-KPX T e -33
-KPX T comma -55
-KPX T a -40
-KPX T O 11
-KPX T A -60
-
-KPX U period -25
-KPX U comma -25
-KPX U A -42
-
-KPX V u -70
-KPX V semicolon 6
-KPX V period -94
-KPX V o -71
-KPX V i -35
-KPX V hyphen -94
-KPX V e -66
-KPX V comma -94
-KPX V colon -49
-KPX V a -55
-KPX V O -19
-KPX V G -12
-KPX V A -100
-
-KPX W y -41
-KPX W u -25
-KPX W semicolon -22
-KPX W period -86
-KPX W o -33
-KPX W i -27
-KPX W hyphen -61
-KPX W h 5
-KPX W e -39
-KPX W comma -86
-KPX W colon -22
-KPX W a -33
-KPX W O -11
-KPX W A -66
-
-KPX Y u -58
-KPX Y semicolon -55
-KPX Y period -91
-KPX Y o -77
-KPX Y i -22
-KPX Y hyphen -91
-KPX Y e -71
-KPX Y comma -91
-KPX Y colon -55
-KPX Y a -77
-KPX Y A -79
-
-KPX a y -8
-KPX a w -8
-KPX a v 6
-
-KPX b y -6
-KPX b v 8
-KPX b period 6
-KPX b comma 6
-
-KPX c y -20
-KPX c period -8
-KPX c l -13
-KPX c k -8
-KPX c h -18
-KPX c comma -8
-
-KPX colon space -18
-
-KPX comma space -18
-KPX comma quoteright -18
-KPX comma quotedblright -18
-
-KPX d y -15
-KPX d w -15
-
-KPX e y -15
-KPX e x -5
-KPX e w -15
-KPX e p -11
-KPX e g -4
-KPX e b -8
-
-KPX f quoteright 105
-KPX f quotedblright 105
-KPX f period -28
-KPX f o 7
-KPX f l 7
-KPX f i 7
-KPX f e 14
-KPX f dotlessi 7
-KPX f comma -28
-KPX f a 8
-
-KPX g y -11
-KPX g r 11
-KPX g period -5
-KPX g comma -5
-
-KPX h y -20
-
-KPX i v 7
-
-KPX k y -15
-KPX k o -22
-KPX k e -16
-
-KPX l y -7
-KPX l w -7
-
-KPX m y -20
-KPX m u -11
-
-KPX n y -20
-KPX n v -7
-KPX n u -11
-
-KPX o y -11
-KPX o w -8
-KPX o v 6
-
-KPX p y -4
-KPX p period 8
-KPX p comma 8
-
-KPX period space -18
-KPX period quoteright -18
-KPX period quotedblright -18
-
-KPX quotedblleft quoteleft 20
-KPX quotedblleft A -60
-
-KPX quotedblright space -18
-
-KPX quoteleft A -80
-
-KPX quoteright v -16
-KPX quoteright t -22
-KPX quoteright s -46
-KPX quoteright r -9
-KPX quoteright l -22
-KPX quoteright d -41
-
-KPX r y -20
-KPX r v -7
-KPX r u -11
-KPX r t -11
-KPX r semicolon 9
-KPX r s -20
-KPX r quoteright 9
-KPX r period -90
-KPX r p -17
-KPX r o -11
-KPX r l -14
-KPX r k 9
-KPX r i -14
-KPX r hyphen -16
-KPX r g -11
-KPX r e -7
-KPX r d -7
-KPX r comma -90
-KPX r colon 9
-KPX r a -11
-
-KPX s period 11
-KPX s comma 11
-
-KPX semicolon space -18
-
-KPX space quotedblleft -18
-KPX space Y -18
-KPX space W -33
-KPX space V -24
-KPX space T -18
-KPX space A -22
-
-KPX v period -11
-KPX v o -6
-KPX v comma -11
-KPX v a -6
-
-KPX w period -17
-KPX w o -14
-KPX w e -8
-KPX w comma -17
-KPX w a -14
-
-KPX x e 5
-
-KPX y period -25
-KPX y o 8
-KPX y e 15
-KPX y comma -25
-KPX y a 8
-
-KPX z e 4
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 259 225 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 259 225 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 259 225 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 259 225 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 229 245 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 259 225 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 296 225 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 296 225 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 296 225 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 296 225 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 116 225 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 116 225 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 116 225 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 116 225 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 326 225 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 315 225 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 315 225 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 315 225 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 315 225 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 315 225 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 206 225 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 340 225 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 340 225 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 340 225 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 340 225 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 246 225 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 236 225 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 226 225 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 167 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 167 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 167 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 167 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 167 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 167 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 93 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 93 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 93 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 93 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -2 -7 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -2 -7 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -2 -7 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -2 -7 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 176 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 121 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 121 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 121 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 121 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 121 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 74 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 176 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 176 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 176 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 176 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 93 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 93 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 63 -10 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/NewCenturySchlbk-Italic.afm b/blt3.0/library/AFM/NewCenturySchlbk-Italic.afm
deleted file mode 100644
index 09d2bff..0000000
--- a/blt3.0/library/AFM/NewCenturySchlbk-Italic.afm
+++ /dev/null
@@ -1,537 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue May 28 16:40:04 1991
-Comment UniqueID 35028
-Comment VMusage 31423 38315
-FontName NewCenturySchlbk-Italic
-FullName New Century Schoolbook Italic
-FamilyName New Century Schoolbook
-Weight Medium
-ItalicAngle -16
-IsFixedPitch false
-FontBBox -166 -250 994 958
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.006
-Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 722
-XHeight 466
-Ascender 737
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 17 -15 303 737 ;
-C 34 ; WX 400 ; N quotedbl ; B 127 463 363 737 ;
-C 35 ; WX 556 ; N numbersign ; B 28 0 528 690 ;
-C 36 ; WX 556 ; N dollar ; B 4 -142 536 808 ;
-C 37 ; WX 833 ; N percent ; B 43 -15 790 705 ;
-C 38 ; WX 852 ; N ampersand ; B 24 -15 773 737 ;
-C 39 ; WX 204 ; N quoteright ; B 39 463 229 737 ;
-C 40 ; WX 333 ; N parenleft ; B 53 -117 411 745 ;
-C 41 ; WX 333 ; N parenright ; B -93 -117 265 745 ;
-C 42 ; WX 500 ; N asterisk ; B 80 318 500 737 ;
-C 43 ; WX 606 ; N plus ; B 50 0 556 506 ;
-C 44 ; WX 278 ; N comma ; B -39 -165 151 109 ;
-C 45 ; WX 333 ; N hyphen ; B 32 202 259 274 ;
-C 46 ; WX 278 ; N period ; B 17 -15 141 109 ;
-C 47 ; WX 606 ; N slash ; B 132 -15 474 737 ;
-C 48 ; WX 556 ; N zero ; B 30 -15 526 705 ;
-C 49 ; WX 556 ; N one ; B 50 0 459 705 ;
-C 50 ; WX 556 ; N two ; B -37 0 506 705 ;
-C 51 ; WX 556 ; N three ; B -2 -15 506 705 ;
-C 52 ; WX 556 ; N four ; B -8 0 512 705 ;
-C 53 ; WX 556 ; N five ; B 4 -15 540 705 ;
-C 54 ; WX 556 ; N six ; B 36 -15 548 705 ;
-C 55 ; WX 556 ; N seven ; B 69 -15 561 705 ;
-C 56 ; WX 556 ; N eight ; B 6 -15 526 705 ;
-C 57 ; WX 556 ; N nine ; B 8 -15 520 705 ;
-C 58 ; WX 278 ; N colon ; B 17 -15 229 466 ;
-C 59 ; WX 278 ; N semicolon ; B -39 -165 229 466 ;
-C 60 ; WX 606 ; N less ; B 36 -8 542 514 ;
-C 61 ; WX 606 ; N equal ; B 50 117 556 389 ;
-C 62 ; WX 606 ; N greater ; B 64 -8 570 514 ;
-C 63 ; WX 444 ; N question ; B 102 -15 417 737 ;
-C 64 ; WX 747 ; N at ; B -2 -15 750 737 ;
-C 65 ; WX 704 ; N A ; B -87 0 668 737 ;
-C 66 ; WX 722 ; N B ; B -33 0 670 722 ;
-C 67 ; WX 722 ; N C ; B 40 -15 712 737 ;
-C 68 ; WX 778 ; N D ; B -33 0 738 722 ;
-C 69 ; WX 722 ; N E ; B -33 0 700 722 ;
-C 70 ; WX 667 ; N F ; B -33 0 700 722 ;
-C 71 ; WX 778 ; N G ; B 40 -15 763 737 ;
-C 72 ; WX 833 ; N H ; B -33 0 866 722 ;
-C 73 ; WX 407 ; N I ; B -33 0 435 722 ;
-C 74 ; WX 611 ; N J ; B -14 -15 651 722 ;
-C 75 ; WX 741 ; N K ; B -33 0 816 722 ;
-C 76 ; WX 667 ; N L ; B -33 0 627 722 ;
-C 77 ; WX 944 ; N M ; B -33 0 977 722 ;
-C 78 ; WX 815 ; N N ; B -51 -15 866 722 ;
-C 79 ; WX 778 ; N O ; B 40 -15 738 737 ;
-C 80 ; WX 667 ; N P ; B -33 0 667 722 ;
-C 81 ; WX 778 ; N Q ; B 40 -190 738 737 ;
-C 82 ; WX 741 ; N R ; B -45 -15 692 722 ;
-C 83 ; WX 667 ; N S ; B -6 -15 638 737 ;
-C 84 ; WX 685 ; N T ; B 40 0 725 722 ;
-C 85 ; WX 815 ; N U ; B 93 -15 867 722 ;
-C 86 ; WX 704 ; N V ; B 36 -10 779 722 ;
-C 87 ; WX 926 ; N W ; B 53 -10 978 722 ;
-C 88 ; WX 704 ; N X ; B -75 0 779 722 ;
-C 89 ; WX 685 ; N Y ; B 31 0 760 722 ;
-C 90 ; WX 667 ; N Z ; B -25 0 667 722 ;
-C 91 ; WX 333 ; N bracketleft ; B -55 -109 388 737 ;
-C 92 ; WX 606 ; N backslash ; B 132 -15 474 737 ;
-C 93 ; WX 333 ; N bracketright ; B -77 -109 366 737 ;
-C 94 ; WX 606 ; N asciicircum ; B 89 325 517 690 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 204 ; N quoteleft ; B 39 463 229 737 ;
-C 97 ; WX 574 ; N a ; B 2 -15 524 466 ;
-C 98 ; WX 556 ; N b ; B 32 -15 488 737 ;
-C 99 ; WX 444 ; N c ; B 2 -15 394 466 ;
-C 100 ; WX 611 ; N d ; B 2 -15 585 737 ;
-C 101 ; WX 444 ; N e ; B -6 -15 388 466 ;
-C 102 ; WX 333 ; N f ; B -68 -205 470 737 ; L i fi ; L l fl ;
-C 103 ; WX 537 ; N g ; B -79 -205 523 497 ;
-C 104 ; WX 611 ; N h ; B 14 -15 562 737 ;
-C 105 ; WX 333 ; N i ; B 29 -15 282 715 ;
-C 106 ; WX 315 ; N j ; B -166 -205 318 715 ;
-C 107 ; WX 556 ; N k ; B 0 -15 497 737 ;
-C 108 ; WX 333 ; N l ; B 14 -15 292 737 ;
-C 109 ; WX 889 ; N m ; B 14 -15 840 466 ;
-C 110 ; WX 611 ; N n ; B 14 -15 562 466 ;
-C 111 ; WX 500 ; N o ; B 2 -15 450 466 ;
-C 112 ; WX 574 ; N p ; B -101 -205 506 466 ;
-C 113 ; WX 556 ; N q ; B 2 -205 500 466 ;
-C 114 ; WX 444 ; N r ; B 10 0 434 466 ;
-C 115 ; WX 444 ; N s ; B 2 -15 394 466 ;
-C 116 ; WX 352 ; N t ; B 24 -15 328 619 ;
-C 117 ; WX 611 ; N u ; B 44 -15 556 466 ;
-C 118 ; WX 519 ; N v ; B 31 -15 447 466 ;
-C 119 ; WX 778 ; N w ; B 31 -15 706 466 ;
-C 120 ; WX 500 ; N x ; B -33 -15 471 466 ;
-C 121 ; WX 500 ; N y ; B -83 -205 450 466 ;
-C 122 ; WX 463 ; N z ; B -33 -15 416 466 ;
-C 123 ; WX 333 ; N braceleft ; B 38 -109 394 737 ;
-C 124 ; WX 606 ; N bar ; B 267 -250 339 750 ;
-C 125 ; WX 333 ; N braceright ; B -87 -109 269 737 ;
-C 126 ; WX 606 ; N asciitilde ; B 72 184 534 322 ;
-C 161 ; WX 333 ; N exclamdown ; B -22 -205 264 547 ;
-C 162 ; WX 556 ; N cent ; B 62 -144 486 580 ;
-C 163 ; WX 556 ; N sterling ; B -13 -15 544 705 ;
-C 164 ; WX 167 ; N fraction ; B -134 -15 301 705 ;
-C 165 ; WX 556 ; N yen ; B 40 0 624 690 ;
-C 166 ; WX 556 ; N florin ; B -58 -205 569 737 ;
-C 167 ; WX 500 ; N section ; B -10 -147 480 737 ;
-C 168 ; WX 556 ; N currency ; B 26 93 530 597 ;
-C 169 ; WX 278 ; N quotesingle ; B 151 463 237 737 ;
-C 170 ; WX 389 ; N quotedblleft ; B 39 463 406 737 ;
-C 171 ; WX 426 ; N guillemotleft ; B -15 74 402 402 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 40 74 259 402 ;
-C 173 ; WX 333 ; N guilsinglright ; B 40 74 259 402 ;
-C 174 ; WX 611 ; N fi ; B -68 -205 555 737 ;
-C 175 ; WX 611 ; N fl ; B -68 -205 587 737 ;
-C 177 ; WX 500 ; N endash ; B -27 208 487 268 ;
-C 178 ; WX 500 ; N dagger ; B 51 -147 506 737 ;
-C 179 ; WX 500 ; N daggerdbl ; B -54 -147 506 737 ;
-C 180 ; WX 278 ; N periodcentered ; B 71 238 207 374 ;
-C 182 ; WX 650 ; N paragraph ; B 48 -132 665 722 ;
-C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ;
-C 184 ; WX 204 ; N quotesinglbase ; B -78 -165 112 109 ;
-C 185 ; WX 389 ; N quotedblbase ; B -78 -165 289 109 ;
-C 186 ; WX 389 ; N quotedblright ; B 39 463 406 737 ;
-C 187 ; WX 426 ; N guillemotright ; B -15 74 402 402 ;
-C 188 ; WX 1000 ; N ellipsis ; B 59 -15 849 109 ;
-C 189 ; WX 1000 ; N perthousand ; B 6 -15 994 705 ;
-C 191 ; WX 444 ; N questiondown ; B -3 -205 312 547 ;
-C 193 ; WX 333 ; N grave ; B 71 518 262 690 ;
-C 194 ; WX 333 ; N acute ; B 132 518 355 690 ;
-C 195 ; WX 333 ; N circumflex ; B 37 518 331 690 ;
-C 196 ; WX 333 ; N tilde ; B 52 547 383 649 ;
-C 197 ; WX 333 ; N macron ; B 52 560 363 610 ;
-C 198 ; WX 333 ; N breve ; B 69 518 370 677 ;
-C 199 ; WX 333 ; N dotaccent ; B 146 544 248 646 ;
-C 200 ; WX 333 ; N dieresis ; B 59 544 359 646 ;
-C 202 ; WX 333 ; N ring ; B 114 512 314 712 ;
-C 203 ; WX 333 ; N cedilla ; B 3 -215 215 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 32 518 455 690 ;
-C 206 ; WX 333 ; N ogonek ; B 68 -215 254 0 ;
-C 207 ; WX 333 ; N caron ; B 73 518 378 690 ;
-C 208 ; WX 1000 ; N emdash ; B -27 208 987 268 ;
-C 225 ; WX 870 ; N AE ; B -87 0 888 722 ;
-C 227 ; WX 422 ; N ordfeminine ; B 72 416 420 705 ;
-C 232 ; WX 667 ; N Lslash ; B -33 0 627 722 ;
-C 233 ; WX 778 ; N Oslash ; B 16 -68 748 780 ;
-C 234 ; WX 981 ; N OE ; B 40 0 975 722 ;
-C 235 ; WX 372 ; N ordmasculine ; B 66 416 370 705 ;
-C 241 ; WX 722 ; N ae ; B -18 -15 666 466 ;
-C 245 ; WX 333 ; N dotlessi ; B 29 -15 282 466 ;
-C 248 ; WX 333 ; N lslash ; B -25 -15 340 737 ;
-C 249 ; WX 500 ; N oslash ; B 2 -121 450 549 ;
-C 250 ; WX 778 ; N oe ; B 2 -15 722 466 ;
-C 251 ; WX 556 ; N germandbls ; B -76 -205 525 737 ;
-C -1 ; WX 444 ; N ecircumflex ; B -6 -15 388 690 ;
-C -1 ; WX 444 ; N edieresis ; B -6 -15 415 646 ;
-C -1 ; WX 574 ; N aacute ; B 2 -15 524 690 ;
-C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ;
-C -1 ; WX 333 ; N icircumflex ; B 29 -15 331 690 ;
-C -1 ; WX 611 ; N udieresis ; B 44 -15 556 646 ;
-C -1 ; WX 500 ; N ograve ; B 2 -15 450 690 ;
-C -1 ; WX 611 ; N uacute ; B 44 -15 556 690 ;
-C -1 ; WX 611 ; N ucircumflex ; B 44 -15 556 690 ;
-C -1 ; WX 704 ; N Aacute ; B -87 0 668 946 ;
-C -1 ; WX 333 ; N igrave ; B 29 -15 282 690 ;
-C -1 ; WX 407 ; N Icircumflex ; B -33 0 435 946 ;
-C -1 ; WX 444 ; N ccedilla ; B 2 -215 394 466 ;
-C -1 ; WX 574 ; N adieresis ; B 2 -15 524 646 ;
-C -1 ; WX 722 ; N Ecircumflex ; B -33 0 700 946 ;
-C -1 ; WX 444 ; N scaron ; B 2 -15 434 690 ;
-C -1 ; WX 574 ; N thorn ; B -101 -205 506 737 ;
-C -1 ; WX 950 ; N trademark ; B 32 318 968 722 ;
-C -1 ; WX 444 ; N egrave ; B -6 -15 388 690 ;
-C -1 ; WX 333 ; N threesuperior ; B 22 273 359 705 ;
-C -1 ; WX 463 ; N zcaron ; B -33 -15 443 690 ;
-C -1 ; WX 574 ; N atilde ; B 2 -15 524 649 ;
-C -1 ; WX 574 ; N aring ; B 2 -15 524 712 ;
-C -1 ; WX 500 ; N ocircumflex ; B 2 -15 450 690 ;
-C -1 ; WX 722 ; N Edieresis ; B -33 0 700 902 ;
-C -1 ; WX 834 ; N threequarters ; B 22 -15 782 705 ;
-C -1 ; WX 500 ; N ydieresis ; B -83 -205 450 646 ;
-C -1 ; WX 500 ; N yacute ; B -83 -205 450 690 ;
-C -1 ; WX 333 ; N iacute ; B 29 -15 355 690 ;
-C -1 ; WX 704 ; N Acircumflex ; B -87 0 668 946 ;
-C -1 ; WX 815 ; N Uacute ; B 93 -15 867 946 ;
-C -1 ; WX 444 ; N eacute ; B -6 -15 411 690 ;
-C -1 ; WX 778 ; N Ograve ; B 40 -15 738 946 ;
-C -1 ; WX 574 ; N agrave ; B 2 -15 524 690 ;
-C -1 ; WX 815 ; N Udieresis ; B 93 -15 867 902 ;
-C -1 ; WX 574 ; N acircumflex ; B 2 -15 524 690 ;
-C -1 ; WX 407 ; N Igrave ; B -33 0 435 946 ;
-C -1 ; WX 333 ; N twosuperior ; B 0 282 359 705 ;
-C -1 ; WX 815 ; N Ugrave ; B 93 -15 867 946 ;
-C -1 ; WX 834 ; N onequarter ; B 34 -15 782 705 ;
-C -1 ; WX 815 ; N Ucircumflex ; B 93 -15 867 946 ;
-C -1 ; WX 667 ; N Scaron ; B -6 -15 638 946 ;
-C -1 ; WX 407 ; N Idieresis ; B -33 0 456 902 ;
-C -1 ; WX 333 ; N idieresis ; B 29 -15 359 646 ;
-C -1 ; WX 722 ; N Egrave ; B -33 0 700 946 ;
-C -1 ; WX 778 ; N Oacute ; B 40 -15 738 946 ;
-C -1 ; WX 606 ; N divide ; B 50 -22 556 528 ;
-C -1 ; WX 704 ; N Atilde ; B -87 0 668 905 ;
-C -1 ; WX 704 ; N Aring ; B -87 0 668 958 ;
-C -1 ; WX 778 ; N Odieresis ; B 40 -15 738 902 ;
-C -1 ; WX 704 ; N Adieresis ; B -87 0 668 902 ;
-C -1 ; WX 815 ; N Ntilde ; B -51 -15 866 905 ;
-C -1 ; WX 667 ; N Zcaron ; B -25 0 667 946 ;
-C -1 ; WX 667 ; N Thorn ; B -33 0 627 722 ;
-C -1 ; WX 407 ; N Iacute ; B -33 0 452 946 ;
-C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ;
-C -1 ; WX 606 ; N multiply ; B 74 24 532 482 ;
-C -1 ; WX 722 ; N Eacute ; B -33 0 700 946 ;
-C -1 ; WX 685 ; N Ydieresis ; B 31 0 760 902 ;
-C -1 ; WX 333 ; N onesuperior ; B 34 282 311 705 ;
-C -1 ; WX 611 ; N ugrave ; B 44 -15 556 690 ;
-C -1 ; WX 606 ; N logicalnot ; B 50 108 556 389 ;
-C -1 ; WX 611 ; N ntilde ; B 14 -15 562 649 ;
-C -1 ; WX 778 ; N Otilde ; B 40 -15 738 905 ;
-C -1 ; WX 500 ; N otilde ; B 2 -15 467 649 ;
-C -1 ; WX 722 ; N Ccedilla ; B 40 -215 712 737 ;
-C -1 ; WX 704 ; N Agrave ; B -87 0 668 946 ;
-C -1 ; WX 834 ; N onehalf ; B 34 -15 776 705 ;
-C -1 ; WX 778 ; N Eth ; B -33 0 738 722 ;
-C -1 ; WX 400 ; N degree ; B 86 419 372 705 ;
-C -1 ; WX 685 ; N Yacute ; B 31 0 760 946 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 40 -15 738 946 ;
-C -1 ; WX 500 ; N oacute ; B 2 -15 450 690 ;
-C -1 ; WX 611 ; N mu ; B -60 -205 556 466 ;
-C -1 ; WX 606 ; N minus ; B 50 217 556 289 ;
-C -1 ; WX 500 ; N eth ; B 2 -15 450 737 ;
-C -1 ; WX 500 ; N odieresis ; B 2 -15 450 646 ;
-C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ;
-C -1 ; WX 606 ; N brokenbar ; B 267 -175 339 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 181
-
-KPX A y -55
-KPX A w -18
-KPX A v -18
-KPX A u -18
-KPX A quoteright -125
-KPX A quotedblright -125
-KPX A Y -55
-KPX A W -74
-KPX A V -74
-KPX A U -37
-KPX A T -30
-KPX A Q -18
-KPX A O -18
-KPX A G -18
-KPX A C -18
-
-KPX B period -50
-KPX B comma -50
-
-KPX C period -50
-KPX C comma -50
-
-KPX D period -50
-KPX D comma -50
-KPX D Y -18
-KPX D W -18
-KPX D V -18
-
-KPX F r -55
-KPX F period -125
-KPX F o -55
-KPX F i -10
-KPX F e -55
-KPX F comma -125
-KPX F a -55
-KPX F A -35
-
-KPX G period -50
-KPX G comma -50
-
-KPX J u -18
-KPX J period -100
-KPX J o -37
-KPX J e -37
-KPX J comma -100
-KPX J a -37
-KPX J A -18
-
-KPX L y -50
-KPX L quoteright -125
-KPX L quotedblright -125
-KPX L Y -100
-KPX L W -100
-KPX L V -100
-KPX L T -100
-
-KPX N period -60
-KPX N comma -60
-
-KPX O period -50
-KPX O comma -50
-KPX O Y -18
-KPX O X -18
-KPX O V -18
-KPX O T 18
-
-KPX P period -125
-KPX P o -55
-KPX P e -55
-KPX P comma -125
-KPX P a -55
-KPX P A -50
-
-KPX Q period -20
-KPX Q comma -20
-
-KPX R Y -18
-KPX R W -18
-KPX R V -18
-KPX R U -18
-
-KPX S period -50
-KPX S comma -50
-
-KPX T y -50
-KPX T w -50
-KPX T u -50
-KPX T semicolon -50
-KPX T r -50
-KPX T period -100
-KPX T o -74
-KPX T i -18
-KPX T hyphen -100
-KPX T h -25
-KPX T e -74
-KPX T comma -100
-KPX T colon -50
-KPX T a -74
-KPX T O 18
-
-KPX U period -100
-KPX U comma -100
-KPX U A -18
-
-KPX V u -75
-KPX V semicolon -75
-KPX V period -100
-KPX V o -75
-KPX V i -50
-KPX V hyphen -100
-KPX V e -75
-KPX V comma -100
-KPX V colon -75
-KPX V a -75
-KPX V A -37
-
-KPX W y -55
-KPX W u -55
-KPX W semicolon -75
-KPX W period -100
-KPX W o -55
-KPX W i -20
-KPX W hyphen -75
-KPX W h -20
-KPX W e -55
-KPX W comma -100
-KPX W colon -75
-KPX W a -55
-KPX W A -55
-
-KPX Y u -100
-KPX Y semicolon -75
-KPX Y period -100
-KPX Y o -100
-KPX Y i -25
-KPX Y hyphen -100
-KPX Y e -100
-KPX Y comma -100
-KPX Y colon -75
-KPX Y a -100
-KPX Y A -55
-
-KPX b period -50
-KPX b comma -50
-KPX b b -10
-
-KPX c period -50
-KPX c k -18
-KPX c h -18
-KPX c comma -50
-
-KPX colon space -37
-
-KPX comma space -37
-KPX comma quoteright -37
-KPX comma quotedblright -37
-
-KPX e period -37
-KPX e comma -37
-
-KPX f quoteright 75
-KPX f quotedblright 75
-KPX f period -75
-KPX f o -10
-KPX f comma -75
-
-KPX g period -50
-KPX g comma -50
-
-KPX l y -10
-
-KPX o period -50
-KPX o comma -50
-
-KPX p period -50
-KPX p comma -50
-
-KPX period space -37
-KPX period quoteright -37
-KPX period quotedblright -37
-
-KPX quotedblleft A -75
-
-KPX quotedblright space -37
-
-KPX quoteleft quoteleft -37
-KPX quoteleft A -75
-
-KPX quoteright s -25
-KPX quoteright quoteright -37
-KPX quoteright d -37
-
-KPX r semicolon -25
-KPX r s -10
-KPX r period -125
-KPX r k -18
-KPX r hyphen -75
-KPX r comma -125
-KPX r colon -25
-
-KPX s period -50
-KPX s comma -50
-
-KPX semicolon space -37
-
-KPX space quoteleft -37
-KPX space quotedblleft -37
-KPX space Y -37
-KPX space W -37
-KPX space V -37
-KPX space T -37
-KPX space A -37
-
-KPX v period -75
-KPX v comma -75
-
-KPX w period -75
-KPX w comma -75
-
-KPX y period -75
-KPX y comma -75
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 246 256 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 246 256 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 231 256 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 246 256 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 216 246 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 231 256 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 255 256 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 255 256 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 255 256 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 255 256 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 97 256 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 97 256 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 97 256 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 97 256 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 301 256 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 283 256 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 283 256 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 283 256 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 283 256 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 283 256 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 227 256 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 301 256 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 301 256 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 301 256 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 301 256 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 256 256 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 236 256 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 227 256 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 121 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 121 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 121 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 121 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 121 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 121 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 56 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 65 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/NewCenturySchlbk-Roman.afm b/blt3.0/library/AFM/NewCenturySchlbk-Roman.afm
deleted file mode 100644
index 80e9221..0000000
--- a/blt3.0/library/AFM/NewCenturySchlbk-Roman.afm
+++ /dev/null
@@ -1,525 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue May 28 16:31:51 1991
-Comment UniqueID 35025
-Comment VMusage 30420 37312
-FontName NewCenturySchlbk-Roman
-FullName New Century Schoolbook Roman
-FamilyName New Century Schoolbook
-Weight Roman
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -195 -250 1000 965
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated.  All Rights Reserved.
-EncodingScheme AdobeStandardEncoding
-CapHeight 722
-XHeight 464
-Ascender 737
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 296 ; N exclam ; B 86 -15 210 737 ;
-C 34 ; WX 389 ; N quotedbl ; B 61 443 328 737 ;
-C 35 ; WX 556 ; N numbersign ; B 28 0 528 690 ;
-C 36 ; WX 556 ; N dollar ; B 45 -138 511 813 ;
-C 37 ; WX 833 ; N percent ; B 43 -15 790 705 ;
-C 38 ; WX 815 ; N ampersand ; B 51 -15 775 737 ;
-C 39 ; WX 204 ; N quoteright ; B 25 443 179 737 ;
-C 40 ; WX 333 ; N parenleft ; B 40 -117 279 745 ;
-C 41 ; WX 333 ; N parenright ; B 54 -117 293 745 ;
-C 42 ; WX 500 ; N asterisk ; B 57 306 443 737 ;
-C 43 ; WX 606 ; N plus ; B 50 0 556 506 ;
-C 44 ; WX 278 ; N comma ; B 62 -185 216 109 ;
-C 45 ; WX 333 ; N hyphen ; B 42 199 291 277 ;
-C 46 ; WX 278 ; N period ; B 77 -15 201 109 ;
-C 47 ; WX 278 ; N slash ; B -32 -15 310 737 ;
-C 48 ; WX 556 ; N zero ; B 42 -15 514 705 ;
-C 49 ; WX 556 ; N one ; B 100 0 496 705 ;
-C 50 ; WX 556 ; N two ; B 35 0 505 705 ;
-C 51 ; WX 556 ; N three ; B 42 -15 498 705 ;
-C 52 ; WX 556 ; N four ; B 28 0 528 705 ;
-C 53 ; WX 556 ; N five ; B 46 -15 502 705 ;
-C 54 ; WX 556 ; N six ; B 41 -15 515 705 ;
-C 55 ; WX 556 ; N seven ; B 59 -15 508 705 ;
-C 56 ; WX 556 ; N eight ; B 42 -15 514 705 ;
-C 57 ; WX 556 ; N nine ; B 41 -15 515 705 ;
-C 58 ; WX 278 ; N colon ; B 77 -15 201 474 ;
-C 59 ; WX 278 ; N semicolon ; B 62 -185 216 474 ;
-C 60 ; WX 606 ; N less ; B 50 -8 556 514 ;
-C 61 ; WX 606 ; N equal ; B 50 117 556 389 ;
-C 62 ; WX 606 ; N greater ; B 50 -8 556 514 ;
-C 63 ; WX 444 ; N question ; B 29 -15 415 737 ;
-C 64 ; WX 737 ; N at ; B -8 -15 744 737 ;
-C 65 ; WX 722 ; N A ; B -8 0 730 737 ;
-C 66 ; WX 722 ; N B ; B 29 0 669 722 ;
-C 67 ; WX 722 ; N C ; B 45 -15 668 737 ;
-C 68 ; WX 778 ; N D ; B 29 0 733 722 ;
-C 69 ; WX 722 ; N E ; B 29 0 663 722 ;
-C 70 ; WX 667 ; N F ; B 29 0 638 722 ;
-C 71 ; WX 778 ; N G ; B 45 -15 775 737 ;
-C 72 ; WX 833 ; N H ; B 29 0 804 722 ;
-C 73 ; WX 407 ; N I ; B 38 0 369 722 ;
-C 74 ; WX 556 ; N J ; B 5 -15 540 722 ;
-C 75 ; WX 778 ; N K ; B 29 0 803 722 ;
-C 76 ; WX 667 ; N L ; B 29 0 644 722 ;
-C 77 ; WX 944 ; N M ; B 29 0 915 722 ;
-C 78 ; WX 815 ; N N ; B 24 -15 791 722 ;
-C 79 ; WX 778 ; N O ; B 45 -15 733 737 ;
-C 80 ; WX 667 ; N P ; B 29 0 650 722 ;
-C 81 ; WX 778 ; N Q ; B 45 -190 748 737 ;
-C 82 ; WX 722 ; N R ; B 29 -15 713 722 ;
-C 83 ; WX 630 ; N S ; B 47 -15 583 737 ;
-C 84 ; WX 667 ; N T ; B 19 0 648 722 ;
-C 85 ; WX 815 ; N U ; B 16 -15 799 722 ;
-C 86 ; WX 722 ; N V ; B -8 -10 730 722 ;
-C 87 ; WX 981 ; N W ; B 5 -10 976 722 ;
-C 88 ; WX 704 ; N X ; B -8 0 712 722 ;
-C 89 ; WX 704 ; N Y ; B -11 0 715 722 ;
-C 90 ; WX 611 ; N Z ; B 24 0 576 722 ;
-C 91 ; WX 333 ; N bracketleft ; B 126 -109 315 737 ;
-C 92 ; WX 606 ; N backslash ; B 132 -15 474 737 ;
-C 93 ; WX 333 ; N bracketright ; B 18 -109 207 737 ;
-C 94 ; WX 606 ; N asciicircum ; B 89 325 517 690 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 204 ; N quoteleft ; B 25 443 179 737 ;
-C 97 ; WX 556 ; N a ; B 44 -15 542 479 ;
-C 98 ; WX 556 ; N b ; B 10 -15 522 737 ;
-C 99 ; WX 444 ; N c ; B 34 -15 426 479 ;
-C 100 ; WX 574 ; N d ; B 34 -15 552 737 ;
-C 101 ; WX 500 ; N e ; B 34 -15 466 479 ;
-C 102 ; WX 333 ; N f ; B 18 0 437 737 ; L i fi ; L l fl ;
-C 103 ; WX 537 ; N g ; B 23 -205 542 494 ;
-C 104 ; WX 611 ; N h ; B 7 0 592 737 ;
-C 105 ; WX 315 ; N i ; B 18 0 286 722 ;
-C 106 ; WX 296 ; N j ; B -86 -205 216 722 ;
-C 107 ; WX 593 ; N k ; B 10 0 589 737 ;
-C 108 ; WX 315 ; N l ; B 18 0 286 737 ;
-C 109 ; WX 889 ; N m ; B 26 0 863 479 ;
-C 110 ; WX 611 ; N n ; B 22 0 589 479 ;
-C 111 ; WX 500 ; N o ; B 34 -15 466 479 ;
-C 112 ; WX 574 ; N p ; B 22 -205 540 479 ;
-C 113 ; WX 556 ; N q ; B 34 -205 552 479 ;
-C 114 ; WX 444 ; N r ; B 18 0 434 479 ;
-C 115 ; WX 463 ; N s ; B 46 -15 417 479 ;
-C 116 ; WX 389 ; N t ; B 18 -15 371 666 ;
-C 117 ; WX 611 ; N u ; B 22 -15 589 464 ;
-C 118 ; WX 537 ; N v ; B -6 -10 515 464 ;
-C 119 ; WX 778 ; N w ; B 1 -10 749 464 ;
-C 120 ; WX 537 ; N x ; B 8 0 529 464 ;
-C 121 ; WX 537 ; N y ; B 4 -205 533 464 ;
-C 122 ; WX 481 ; N z ; B 42 0 439 464 ;
-C 123 ; WX 333 ; N braceleft ; B 54 -109 279 737 ;
-C 124 ; WX 606 ; N bar ; B 267 -250 339 750 ;
-C 125 ; WX 333 ; N braceright ; B 54 -109 279 737 ;
-C 126 ; WX 606 ; N asciitilde ; B 72 184 534 322 ;
-C 161 ; WX 296 ; N exclamdown ; B 86 -205 210 547 ;
-C 162 ; WX 556 ; N cent ; B 74 -141 482 584 ;
-C 163 ; WX 556 ; N sterling ; B 18 -15 538 705 ;
-C 164 ; WX 167 ; N fraction ; B -195 -15 362 705 ;
-C 165 ; WX 556 ; N yen ; B -1 0 557 690 ;
-C 166 ; WX 556 ; N florin ; B 0 -205 538 737 ;
-C 167 ; WX 500 ; N section ; B 55 -147 445 737 ;
-C 168 ; WX 556 ; N currency ; B 26 93 530 597 ;
-C 169 ; WX 204 ; N quotesingle ; B 59 443 145 737 ;
-C 170 ; WX 389 ; N quotedblleft ; B 25 443 364 737 ;
-C 171 ; WX 426 ; N guillemotleft ; B 39 78 387 398 ;
-C 172 ; WX 259 ; N guilsinglleft ; B 39 78 220 398 ;
-C 173 ; WX 259 ; N guilsinglright ; B 39 78 220 398 ;
-C 174 ; WX 611 ; N fi ; B 18 0 582 737 ;
-C 175 ; WX 611 ; N fl ; B 18 0 582 737 ;
-C 177 ; WX 556 ; N endash ; B 0 208 556 268 ;
-C 178 ; WX 500 ; N dagger ; B 42 -147 458 737 ;
-C 179 ; WX 500 ; N daggerdbl ; B 42 -149 458 737 ;
-C 180 ; WX 278 ; N periodcentered ; B 71 238 207 374 ;
-C 182 ; WX 606 ; N paragraph ; B 60 -132 546 722 ;
-C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ;
-C 184 ; WX 204 ; N quotesinglbase ; B 25 -185 179 109 ;
-C 185 ; WX 389 ; N quotedblbase ; B 25 -185 364 109 ;
-C 186 ; WX 389 ; N quotedblright ; B 25 443 364 737 ;
-C 187 ; WX 426 ; N guillemotright ; B 39 78 387 398 ;
-C 188 ; WX 1000 ; N ellipsis ; B 105 -15 895 109 ;
-C 189 ; WX 1000 ; N perthousand ; B 6 -15 994 705 ;
-C 191 ; WX 444 ; N questiondown ; B 29 -205 415 547 ;
-C 193 ; WX 333 ; N grave ; B 17 528 242 699 ;
-C 194 ; WX 333 ; N acute ; B 91 528 316 699 ;
-C 195 ; WX 333 ; N circumflex ; B 10 528 323 695 ;
-C 196 ; WX 333 ; N tilde ; B 1 553 332 655 ;
-C 197 ; WX 333 ; N macron ; B 10 568 323 623 ;
-C 198 ; WX 333 ; N breve ; B 25 528 308 685 ;
-C 199 ; WX 333 ; N dotaccent ; B 116 543 218 645 ;
-C 200 ; WX 333 ; N dieresis ; B 16 543 317 645 ;
-C 202 ; WX 333 ; N ring ; B 66 522 266 722 ;
-C 203 ; WX 333 ; N cedilla ; B 29 -215 237 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -9 528 416 699 ;
-C 206 ; WX 333 ; N ogonek ; B 68 -215 254 0 ;
-C 207 ; WX 333 ; N caron ; B 10 528 323 695 ;
-C 208 ; WX 1000 ; N emdash ; B 0 208 1000 268 ;
-C 225 ; WX 1000 ; N AE ; B 0 0 962 722 ;
-C 227 ; WX 334 ; N ordfeminine ; B -4 407 338 705 ;
-C 232 ; WX 667 ; N Lslash ; B 29 0 644 722 ;
-C 233 ; WX 778 ; N Oslash ; B 45 -56 733 778 ;
-C 234 ; WX 1000 ; N OE ; B 21 0 979 722 ;
-C 235 ; WX 300 ; N ordmasculine ; B 4 407 296 705 ;
-C 241 ; WX 796 ; N ae ; B 34 -15 762 479 ;
-C 245 ; WX 315 ; N dotlessi ; B 18 0 286 464 ;
-C 248 ; WX 315 ; N lslash ; B 18 0 286 737 ;
-C 249 ; WX 500 ; N oslash ; B 34 -97 466 561 ;
-C 250 ; WX 833 ; N oe ; B 34 -15 799 479 ;
-C 251 ; WX 574 ; N germandbls ; B 30 -15 537 737 ;
-C -1 ; WX 500 ; N ecircumflex ; B 34 -15 466 695 ;
-C -1 ; WX 500 ; N edieresis ; B 34 -15 466 645 ;
-C -1 ; WX 556 ; N aacute ; B 44 -15 542 699 ;
-C -1 ; WX 737 ; N registered ; B -8 -15 744 737 ;
-C -1 ; WX 315 ; N icircumflex ; B 1 0 314 695 ;
-C -1 ; WX 611 ; N udieresis ; B 22 -15 589 645 ;
-C -1 ; WX 500 ; N ograve ; B 34 -15 466 699 ;
-C -1 ; WX 611 ; N uacute ; B 22 -15 589 699 ;
-C -1 ; WX 611 ; N ucircumflex ; B 22 -15 589 695 ;
-C -1 ; WX 722 ; N Aacute ; B -8 0 730 937 ;
-C -1 ; WX 315 ; N igrave ; B 8 0 286 699 ;
-C -1 ; WX 407 ; N Icircumflex ; B 38 0 369 933 ;
-C -1 ; WX 444 ; N ccedilla ; B 34 -215 426 479 ;
-C -1 ; WX 556 ; N adieresis ; B 44 -15 542 645 ;
-C -1 ; WX 722 ; N Ecircumflex ; B 29 0 663 933 ;
-C -1 ; WX 463 ; N scaron ; B 46 -15 417 695 ;
-C -1 ; WX 574 ; N thorn ; B 22 -205 540 737 ;
-C -1 ; WX 1000 ; N trademark ; B 32 318 968 722 ;
-C -1 ; WX 500 ; N egrave ; B 34 -15 466 699 ;
-C -1 ; WX 333 ; N threesuperior ; B 18 273 315 705 ;
-C -1 ; WX 481 ; N zcaron ; B 42 0 439 695 ;
-C -1 ; WX 556 ; N atilde ; B 44 -15 542 655 ;
-C -1 ; WX 556 ; N aring ; B 44 -15 542 732 ;
-C -1 ; WX 500 ; N ocircumflex ; B 34 -15 466 695 ;
-C -1 ; WX 722 ; N Edieresis ; B 29 0 663 883 ;
-C -1 ; WX 834 ; N threequarters ; B 28 -15 795 705 ;
-C -1 ; WX 537 ; N ydieresis ; B 4 -205 533 645 ;
-C -1 ; WX 537 ; N yacute ; B 4 -205 533 699 ;
-C -1 ; WX 315 ; N iacute ; B 18 0 307 699 ;
-C -1 ; WX 722 ; N Acircumflex ; B -8 0 730 933 ;
-C -1 ; WX 815 ; N Uacute ; B 16 -15 799 937 ;
-C -1 ; WX 500 ; N eacute ; B 34 -15 466 699 ;
-C -1 ; WX 778 ; N Ograve ; B 45 -15 733 937 ;
-C -1 ; WX 556 ; N agrave ; B 44 -15 542 699 ;
-C -1 ; WX 815 ; N Udieresis ; B 16 -15 799 883 ;
-C -1 ; WX 556 ; N acircumflex ; B 44 -15 542 695 ;
-C -1 ; WX 407 ; N Igrave ; B 38 0 369 937 ;
-C -1 ; WX 333 ; N twosuperior ; B 14 282 319 705 ;
-C -1 ; WX 815 ; N Ugrave ; B 16 -15 799 937 ;
-C -1 ; WX 834 ; N onequarter ; B 39 -15 795 705 ;
-C -1 ; WX 815 ; N Ucircumflex ; B 16 -15 799 933 ;
-C -1 ; WX 630 ; N Scaron ; B 47 -15 583 933 ;
-C -1 ; WX 407 ; N Idieresis ; B 38 0 369 883 ;
-C -1 ; WX 315 ; N idieresis ; B 7 0 308 645 ;
-C -1 ; WX 722 ; N Egrave ; B 29 0 663 937 ;
-C -1 ; WX 778 ; N Oacute ; B 45 -15 733 937 ;
-C -1 ; WX 606 ; N divide ; B 50 -22 556 528 ;
-C -1 ; WX 722 ; N Atilde ; B -8 0 730 893 ;
-C -1 ; WX 722 ; N Aring ; B -8 0 730 965 ;
-C -1 ; WX 778 ; N Odieresis ; B 45 -15 733 883 ;
-C -1 ; WX 722 ; N Adieresis ; B -8 0 730 883 ;
-C -1 ; WX 815 ; N Ntilde ; B 24 -15 791 893 ;
-C -1 ; WX 611 ; N Zcaron ; B 24 0 576 933 ;
-C -1 ; WX 667 ; N Thorn ; B 29 0 650 722 ;
-C -1 ; WX 407 ; N Iacute ; B 38 0 369 937 ;
-C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ;
-C -1 ; WX 606 ; N multiply ; B 74 24 532 482 ;
-C -1 ; WX 722 ; N Eacute ; B 29 0 663 937 ;
-C -1 ; WX 704 ; N Ydieresis ; B -11 0 715 883 ;
-C -1 ; WX 333 ; N onesuperior ; B 39 282 294 705 ;
-C -1 ; WX 611 ; N ugrave ; B 22 -15 589 699 ;
-C -1 ; WX 606 ; N logicalnot ; B 50 108 556 389 ;
-C -1 ; WX 611 ; N ntilde ; B 22 0 589 655 ;
-C -1 ; WX 778 ; N Otilde ; B 45 -15 733 893 ;
-C -1 ; WX 500 ; N otilde ; B 34 -15 466 655 ;
-C -1 ; WX 722 ; N Ccedilla ; B 45 -215 668 737 ;
-C -1 ; WX 722 ; N Agrave ; B -8 0 730 937 ;
-C -1 ; WX 834 ; N onehalf ; B 39 -15 820 705 ;
-C -1 ; WX 778 ; N Eth ; B 29 0 733 722 ;
-C -1 ; WX 400 ; N degree ; B 57 419 343 705 ;
-C -1 ; WX 704 ; N Yacute ; B -11 0 715 937 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 45 -15 733 933 ;
-C -1 ; WX 500 ; N oacute ; B 34 -15 466 699 ;
-C -1 ; WX 611 ; N mu ; B 22 -205 589 464 ;
-C -1 ; WX 606 ; N minus ; B 50 217 556 289 ;
-C -1 ; WX 500 ; N eth ; B 34 -15 466 752 ;
-C -1 ; WX 500 ; N odieresis ; B 34 -15 466 645 ;
-C -1 ; WX 737 ; N copyright ; B -8 -15 744 737 ;
-C -1 ; WX 606 ; N brokenbar ; B 267 -175 339 675 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 169
-
-KPX A y -37
-KPX A w -25
-KPX A v -37
-KPX A quoteright -74
-KPX A quotedblright -74
-KPX A Y -75
-KPX A W -50
-KPX A V -75
-KPX A U -30
-KPX A T -18
-
-KPX B period -37
-KPX B comma -37
-KPX B A -18
-
-KPX C period -37
-KPX C comma -37
-KPX C A -18
-
-KPX D period -37
-KPX D comma -37
-KPX D Y -18
-KPX D V -18
-
-KPX F r -10
-KPX F period -125
-KPX F o -55
-KPX F i -10
-KPX F e -55
-KPX F comma -125
-KPX F a -65
-KPX F A -50
-
-KPX G period -37
-KPX G comma -37
-
-KPX J u -25
-KPX J period -74
-KPX J o -25
-KPX J e -25
-KPX J comma -74
-KPX J a -25
-KPX J A -18
-
-KPX K y -25
-KPX K o 10
-KPX K e 10
-
-KPX L y -25
-KPX L quoteright -100
-KPX L quotedblright -100
-KPX L Y -74
-KPX L W -74
-KPX L V -91
-KPX L T -75
-
-KPX N period -55
-KPX N comma -55
-
-KPX O period -37
-KPX O comma -37
-KPX O Y -18
-KPX O V -18
-KPX O T 10
-
-KPX P period -125
-KPX P o -37
-KPX P e -37
-KPX P comma -125
-KPX P a -37
-KPX P A -55
-
-KPX Q period -25
-KPX Q comma -25
-
-KPX S period -37
-KPX S comma -37
-
-KPX T semicolon -37
-KPX T period -125
-KPX T o -55
-KPX T hyphen -100
-KPX T e -55
-KPX T comma -125
-KPX T colon -37
-KPX T a -55
-KPX T O 10
-KPX T A -18
-
-KPX U period -100
-KPX U comma -100
-KPX U A -30
-
-KPX V u -75
-KPX V semicolon -75
-KPX V period -125
-KPX V o -75
-KPX V i -18
-KPX V hyphen -100
-KPX V e -75
-KPX V comma -125
-KPX V colon -75
-KPX V a -85
-KPX V O -18
-KPX V A -74
-
-KPX W y -55
-KPX W u -55
-KPX W semicolon -100
-KPX W period -125
-KPX W o -60
-KPX W i -18
-KPX W hyphen -100
-KPX W e -60
-KPX W comma -125
-KPX W colon -100
-KPX W a -75
-KPX W A -50
-
-KPX Y u -91
-KPX Y semicolon -75
-KPX Y period -100
-KPX Y o -100
-KPX Y i -18
-KPX Y hyphen -125
-KPX Y e -100
-KPX Y comma -100
-KPX Y colon -75
-KPX Y a -100
-KPX Y O -18
-KPX Y A -75
-
-KPX a y -10
-KPX a w -10
-KPX a v -10
-
-KPX b period -18
-KPX b comma -18
-
-KPX c period -18
-KPX c l -7
-KPX c k -7
-KPX c h -7
-KPX c comma -18
-
-KPX colon space -37
-
-KPX comma space -37
-KPX comma quoteright -37
-KPX comma quotedblright -37
-
-KPX e period -18
-KPX e comma -18
-
-KPX f quoteright 100
-KPX f quotedblright 100
-KPX f period -37
-KPX f comma -37
-
-KPX g period -25
-KPX g comma -25
-
-KPX o period -18
-KPX o comma -18
-
-KPX p period -18
-KPX p comma -18
-
-KPX period space -37
-KPX period quoteright -37
-KPX period quotedblright -37
-
-KPX quotedblleft A -74
-
-KPX quotedblright space -37
-
-KPX quoteleft quoteleft -25
-KPX quoteleft A -74
-
-KPX quoteright s -25
-KPX quoteright quoteright -25
-KPX quoteright d -37
-
-KPX r period -100
-KPX r hyphen -37
-KPX r comma -100
-
-KPX s period -25
-KPX s comma -25
-
-KPX semicolon space -37
-
-KPX space quoteleft -37
-KPX space quotedblleft -37
-KPX space Y -37
-KPX space W -37
-KPX space V -37
-KPX space T -37
-KPX space A -37
-
-KPX v period -125
-KPX v comma -125
-
-KPX w period -125
-KPX w comma -125
-KPX w a -18
-
-KPX y period -125
-KPX y comma -125
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 238 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 238 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 238 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 238 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 195 243 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 238 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 195 238 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 195 238 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 195 238 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 195 238 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 37 238 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 37 238 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 37 238 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 37 238 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 241 238 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 238 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 238 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 238 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 238 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 238 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 149 238 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 241 238 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 241 238 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 241 238 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 241 238 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 216 238 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 186 238 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 238 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 112 10 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 84 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 84 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 84 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 84 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -9 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -9 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -9 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -9 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 65 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 102 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 102 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 74 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Palatino-Bold.afm b/blt3.0/library/AFM/Palatino-Bold.afm
deleted file mode 100644
index de147f7..0000000
--- a/blt3.0/library/AFM/Palatino-Bold.afm
+++ /dev/null
@@ -1,435 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Jul  2 22:26:30 1990
-Comment UniqueID 31793
-Comment VMusage 36031 46923
-FontName Palatino-Bold
-FullName Palatino Bold
-FamilyName Palatino
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -152 -266 1000 924
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.005
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 471
-Ascender 720
-Descender -258
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 63 -12 219 688 ;
-C 34 ; WX 402 ; N quotedbl ; B 22 376 380 695 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 496 673 ;
-C 36 ; WX 500 ; N dollar ; B 28 -114 472 721 ;
-C 37 ; WX 889 ; N percent ; B 61 -9 828 714 ;
-C 38 ; WX 833 ; N ampersand ; B 52 -17 813 684 ;
-C 39 ; WX 278 ; N quoteright ; B 29 405 249 695 ;
-C 40 ; WX 333 ; N parenleft ; B 65 -104 305 723 ;
-C 41 ; WX 333 ; N parenright ; B 28 -104 268 723 ;
-C 42 ; WX 444 ; N asterisk ; B 44 332 399 695 ;
-C 43 ; WX 606 ; N plus ; B 51 0 555 505 ;
-C 44 ; WX 250 ; N comma ; B -6 -166 227 141 ;
-C 45 ; WX 333 ; N hyphen ; B 16 195 317 305 ;
-C 46 ; WX 250 ; N period ; B 47 -12 203 144 ;
-C 47 ; WX 296 ; N slash ; B -9 -17 305 720 ;
-C 48 ; WX 500 ; N zero ; B 33 -17 468 660 ;
-C 49 ; WX 500 ; N one ; B 35 -3 455 670 ;
-C 50 ; WX 500 ; N two ; B 25 -3 472 660 ;
-C 51 ; WX 500 ; N three ; B 22 -17 458 660 ;
-C 52 ; WX 500 ; N four ; B 12 -3 473 672 ;
-C 53 ; WX 500 ; N five ; B 42 -17 472 656 ;
-C 54 ; WX 500 ; N six ; B 37 -17 469 660 ;
-C 55 ; WX 500 ; N seven ; B 46 -3 493 656 ;
-C 56 ; WX 500 ; N eight ; B 34 -17 467 660 ;
-C 57 ; WX 500 ; N nine ; B 31 -17 463 660 ;
-C 58 ; WX 250 ; N colon ; B 47 -12 203 454 ;
-C 59 ; WX 250 ; N semicolon ; B -6 -166 227 454 ;
-C 60 ; WX 606 ; N less ; B 49 -15 558 519 ;
-C 61 ; WX 606 ; N equal ; B 51 114 555 396 ;
-C 62 ; WX 606 ; N greater ; B 49 -15 558 519 ;
-C 63 ; WX 444 ; N question ; B 43 -12 411 687 ;
-C 64 ; WX 747 ; N at ; B 42 -12 704 681 ;
-C 65 ; WX 778 ; N A ; B 24 -3 757 686 ;
-C 66 ; WX 667 ; N B ; B 39 -3 611 681 ;
-C 67 ; WX 722 ; N C ; B 44 -17 695 695 ;
-C 68 ; WX 833 ; N D ; B 35 -3 786 681 ;
-C 69 ; WX 611 ; N E ; B 39 -4 577 681 ;
-C 70 ; WX 556 ; N F ; B 28 -3 539 681 ;
-C 71 ; WX 833 ; N G ; B 47 -17 776 695 ;
-C 72 ; WX 833 ; N H ; B 36 -3 796 681 ;
-C 73 ; WX 389 ; N I ; B 39 -3 350 681 ;
-C 74 ; WX 389 ; N J ; B -11 -213 350 681 ;
-C 75 ; WX 778 ; N K ; B 39 -3 763 681 ;
-C 76 ; WX 611 ; N L ; B 39 -4 577 681 ;
-C 77 ; WX 1000 ; N M ; B 32 -10 968 681 ;
-C 78 ; WX 833 ; N N ; B 35 -16 798 681 ;
-C 79 ; WX 833 ; N O ; B 47 -17 787 695 ;
-C 80 ; WX 611 ; N P ; B 39 -3 594 681 ;
-C 81 ; WX 833 ; N Q ; B 47 -184 787 695 ;
-C 82 ; WX 722 ; N R ; B 39 -3 708 681 ;
-C 83 ; WX 611 ; N S ; B 57 -17 559 695 ;
-C 84 ; WX 667 ; N T ; B 17 -3 650 681 ;
-C 85 ; WX 778 ; N U ; B 26 -17 760 681 ;
-C 86 ; WX 778 ; N V ; B 20 -3 763 681 ;
-C 87 ; WX 1000 ; N W ; B 17 -3 988 686 ;
-C 88 ; WX 667 ; N X ; B 17 -3 650 695 ;
-C 89 ; WX 667 ; N Y ; B 15 -3 660 695 ;
-C 90 ; WX 667 ; N Z ; B 24 -3 627 681 ;
-C 91 ; WX 333 ; N bracketleft ; B 73 -104 291 720 ;
-C 92 ; WX 606 ; N backslash ; B 72 0 534 720 ;
-C 93 ; WX 333 ; N bracketright ; B 42 -104 260 720 ;
-C 94 ; WX 606 ; N asciicircum ; B 52 275 554 678 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 29 405 249 695 ;
-C 97 ; WX 500 ; N a ; B 40 -17 478 471 ;
-C 98 ; WX 611 ; N b ; B 10 -17 556 720 ;
-C 99 ; WX 444 ; N c ; B 37 -17 414 471 ;
-C 100 ; WX 611 ; N d ; B 42 -17 577 720 ;
-C 101 ; WX 500 ; N e ; B 42 -17 461 471 ;
-C 102 ; WX 389 ; N f ; B 34 -3 381 720 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 26 -266 535 471 ;
-C 104 ; WX 611 ; N h ; B 24 -3 587 720 ;
-C 105 ; WX 333 ; N i ; B 34 -3 298 706 ;
-C 106 ; WX 333 ; N j ; B 3 -266 241 706 ;
-C 107 ; WX 611 ; N k ; B 21 -3 597 720 ;
-C 108 ; WX 333 ; N l ; B 24 -3 296 720 ;
-C 109 ; WX 889 ; N m ; B 24 -3 864 471 ;
-C 110 ; WX 611 ; N n ; B 24 -3 587 471 ;
-C 111 ; WX 556 ; N o ; B 40 -17 517 471 ;
-C 112 ; WX 611 ; N p ; B 29 -258 567 471 ;
-C 113 ; WX 611 ; N q ; B 52 -258 589 471 ;
-C 114 ; WX 389 ; N r ; B 30 -3 389 471 ;
-C 115 ; WX 444 ; N s ; B 39 -17 405 471 ;
-C 116 ; WX 333 ; N t ; B 22 -17 324 632 ;
-C 117 ; WX 611 ; N u ; B 25 -17 583 471 ;
-C 118 ; WX 556 ; N v ; B 11 -3 545 459 ;
-C 119 ; WX 833 ; N w ; B 13 -3 820 471 ;
-C 120 ; WX 500 ; N x ; B 20 -3 483 471 ;
-C 121 ; WX 556 ; N y ; B 10 -266 546 459 ;
-C 122 ; WX 500 ; N z ; B 16 -3 464 459 ;
-C 123 ; WX 310 ; N braceleft ; B 5 -117 288 725 ;
-C 124 ; WX 606 ; N bar ; B 260 0 346 720 ;
-C 125 ; WX 310 ; N braceright ; B 22 -117 305 725 ;
-C 126 ; WX 606 ; N asciitilde ; B 51 155 555 342 ;
-C 161 ; WX 278 ; N exclamdown ; B 59 -227 215 471 ;
-C 162 ; WX 500 ; N cent ; B 73 -106 450 554 ;
-C 163 ; WX 500 ; N sterling ; B -2 -19 501 676 ;
-C 164 ; WX 167 ; N fraction ; B -152 0 320 660 ;
-C 165 ; WX 500 ; N yen ; B 17 -3 483 695 ;
-C 166 ; WX 500 ; N florin ; B 11 -242 490 703 ;
-C 167 ; WX 500 ; N section ; B 30 -217 471 695 ;
-C 168 ; WX 500 ; N currency ; B 32 96 468 533 ;
-C 169 ; WX 227 ; N quotesingle ; B 45 376 181 695 ;
-C 170 ; WX 500 ; N quotedblleft ; B 34 405 466 695 ;
-C 171 ; WX 500 ; N guillemotleft ; B 36 44 463 438 ;
-C 172 ; WX 389 ; N guilsinglleft ; B 82 44 307 438 ;
-C 173 ; WX 389 ; N guilsinglright ; B 82 44 307 438 ;
-C 174 ; WX 611 ; N fi ; B 10 -3 595 720 ;
-C 175 ; WX 611 ; N fl ; B 17 -3 593 720 ;
-C 177 ; WX 500 ; N endash ; B 0 208 500 291 ;
-C 178 ; WX 500 ; N dagger ; B 29 -6 472 682 ;
-C 179 ; WX 500 ; N daggerdbl ; B 32 -245 468 682 ;
-C 180 ; WX 250 ; N periodcentered ; B 47 179 203 335 ;
-C 182 ; WX 641 ; N paragraph ; B 19 -161 599 683 ;
-C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 56 -160 276 130 ;
-C 185 ; WX 500 ; N quotedblbase ; B 34 -160 466 130 ;
-C 186 ; WX 500 ; N quotedblright ; B 34 405 466 695 ;
-C 187 ; WX 500 ; N guillemotright ; B 37 44 464 438 ;
-C 188 ; WX 1000 ; N ellipsis ; B 89 -12 911 144 ;
-C 189 ; WX 1000 ; N perthousand ; B 33 -9 982 724 ;
-C 191 ; WX 444 ; N questiondown ; B 33 -231 401 471 ;
-C 193 ; WX 333 ; N grave ; B 18 506 256 691 ;
-C 194 ; WX 333 ; N acute ; B 78 506 316 691 ;
-C 195 ; WX 333 ; N circumflex ; B -2 506 335 681 ;
-C 196 ; WX 333 ; N tilde ; B -16 535 349 661 ;
-C 197 ; WX 333 ; N macron ; B 1 538 332 609 ;
-C 198 ; WX 333 ; N breve ; B 15 506 318 669 ;
-C 199 ; WX 333 ; N dotaccent ; B 100 537 234 671 ;
-C 200 ; WX 333 ; N dieresis ; B -8 537 341 671 ;
-C 202 ; WX 333 ; N ring ; B 67 500 267 700 ;
-C 203 ; WX 333 ; N cedilla ; B 73 -225 300 -7 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -56 506 390 691 ;
-C 206 ; WX 333 ; N ogonek ; B 60 -246 274 -17 ;
-C 207 ; WX 333 ; N caron ; B -2 510 335 685 ;
-C 208 ; WX 1000 ; N emdash ; B 0 208 1000 291 ;
-C 225 ; WX 1000 ; N AE ; B 12 -4 954 681 ;
-C 227 ; WX 438 ; N ordfeminine ; B 77 367 361 660 ;
-C 232 ; WX 611 ; N Lslash ; B 16 -4 577 681 ;
-C 233 ; WX 833 ; N Oslash ; B 32 -20 808 698 ;
-C 234 ; WX 1000 ; N OE ; B 43 -17 985 695 ;
-C 235 ; WX 488 ; N ordmasculine ; B 89 367 399 660 ;
-C 241 ; WX 778 ; N ae ; B 46 -17 731 471 ;
-C 245 ; WX 333 ; N dotlessi ; B 34 -3 298 471 ;
-C 248 ; WX 333 ; N lslash ; B -4 -3 334 720 ;
-C 249 ; WX 556 ; N oslash ; B 23 -18 534 471 ;
-C 250 ; WX 833 ; N oe ; B 48 -17 799 471 ;
-C 251 ; WX 611 ; N germandbls ; B 30 -17 565 720 ;
-C -1 ; WX 667 ; N Zcaron ; B 24 -3 627 909 ;
-C -1 ; WX 444 ; N ccedilla ; B 37 -225 414 471 ;
-C -1 ; WX 556 ; N ydieresis ; B 10 -266 546 691 ;
-C -1 ; WX 500 ; N atilde ; B 40 -17 478 673 ;
-C -1 ; WX 333 ; N icircumflex ; B -2 -3 335 701 ;
-C -1 ; WX 300 ; N threesuperior ; B 9 261 292 667 ;
-C -1 ; WX 500 ; N ecircumflex ; B 42 -17 461 701 ;
-C -1 ; WX 611 ; N thorn ; B 17 -258 563 720 ;
-C -1 ; WX 500 ; N egrave ; B 42 -17 461 711 ;
-C -1 ; WX 300 ; N twosuperior ; B 5 261 295 660 ;
-C -1 ; WX 500 ; N eacute ; B 42 -17 461 711 ;
-C -1 ; WX 556 ; N otilde ; B 40 -17 517 673 ;
-C -1 ; WX 778 ; N Aacute ; B 24 -3 757 915 ;
-C -1 ; WX 556 ; N ocircumflex ; B 40 -17 517 701 ;
-C -1 ; WX 556 ; N yacute ; B 10 -266 546 711 ;
-C -1 ; WX 611 ; N udieresis ; B 25 -17 583 691 ;
-C -1 ; WX 750 ; N threequarters ; B 15 -2 735 667 ;
-C -1 ; WX 500 ; N acircumflex ; B 40 -17 478 701 ;
-C -1 ; WX 833 ; N Eth ; B 10 -3 786 681 ;
-C -1 ; WX 500 ; N edieresis ; B 42 -17 461 691 ;
-C -1 ; WX 611 ; N ugrave ; B 25 -17 583 711 ;
-C -1 ; WX 998 ; N trademark ; B 38 274 961 678 ;
-C -1 ; WX 556 ; N ograve ; B 40 -17 517 711 ;
-C -1 ; WX 444 ; N scaron ; B 39 -17 405 693 ;
-C -1 ; WX 389 ; N Idieresis ; B 20 -3 369 895 ;
-C -1 ; WX 611 ; N uacute ; B 25 -17 583 711 ;
-C -1 ; WX 500 ; N agrave ; B 40 -17 478 711 ;
-C -1 ; WX 611 ; N ntilde ; B 24 -3 587 673 ;
-C -1 ; WX 500 ; N aring ; B 40 -17 478 700 ;
-C -1 ; WX 500 ; N zcaron ; B 16 -3 464 693 ;
-C -1 ; WX 389 ; N Icircumflex ; B 26 -3 363 905 ;
-C -1 ; WX 833 ; N Ntilde ; B 35 -16 798 885 ;
-C -1 ; WX 611 ; N ucircumflex ; B 25 -17 583 701 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 39 -4 577 905 ;
-C -1 ; WX 389 ; N Iacute ; B 39 -3 350 915 ;
-C -1 ; WX 722 ; N Ccedilla ; B 44 -225 695 695 ;
-C -1 ; WX 833 ; N Odieresis ; B 47 -17 787 895 ;
-C -1 ; WX 611 ; N Scaron ; B 57 -17 559 909 ;
-C -1 ; WX 611 ; N Edieresis ; B 39 -4 577 895 ;
-C -1 ; WX 389 ; N Igrave ; B 39 -3 350 915 ;
-C -1 ; WX 500 ; N adieresis ; B 40 -17 478 691 ;
-C -1 ; WX 833 ; N Ograve ; B 47 -17 787 915 ;
-C -1 ; WX 611 ; N Egrave ; B 39 -4 577 915 ;
-C -1 ; WX 667 ; N Ydieresis ; B 15 -3 660 895 ;
-C -1 ; WX 747 ; N registered ; B 26 -17 720 695 ;
-C -1 ; WX 833 ; N Otilde ; B 47 -17 787 885 ;
-C -1 ; WX 750 ; N onequarter ; B 19 -2 735 665 ;
-C -1 ; WX 778 ; N Ugrave ; B 26 -17 760 915 ;
-C -1 ; WX 778 ; N Ucircumflex ; B 26 -17 760 905 ;
-C -1 ; WX 611 ; N Thorn ; B 39 -3 574 681 ;
-C -1 ; WX 606 ; N divide ; B 51 0 555 510 ;
-C -1 ; WX 778 ; N Atilde ; B 24 -3 757 885 ;
-C -1 ; WX 778 ; N Uacute ; B 26 -17 760 915 ;
-C -1 ; WX 833 ; N Ocircumflex ; B 47 -17 787 905 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 114 555 396 ;
-C -1 ; WX 778 ; N Aring ; B 24 -3 757 924 ;
-C -1 ; WX 333 ; N idieresis ; B -8 -3 341 691 ;
-C -1 ; WX 333 ; N iacute ; B 34 -3 316 711 ;
-C -1 ; WX 500 ; N aacute ; B 40 -17 478 711 ;
-C -1 ; WX 606 ; N plusminus ; B 51 0 555 505 ;
-C -1 ; WX 606 ; N multiply ; B 72 21 534 483 ;
-C -1 ; WX 778 ; N Udieresis ; B 26 -17 760 895 ;
-C -1 ; WX 606 ; N minus ; B 51 212 555 298 ;
-C -1 ; WX 300 ; N onesuperior ; B 14 261 287 665 ;
-C -1 ; WX 611 ; N Eacute ; B 39 -4 577 915 ;
-C -1 ; WX 778 ; N Acircumflex ; B 24 -3 757 905 ;
-C -1 ; WX 747 ; N copyright ; B 26 -17 720 695 ;
-C -1 ; WX 778 ; N Agrave ; B 24 -3 757 915 ;
-C -1 ; WX 556 ; N odieresis ; B 40 -17 517 691 ;
-C -1 ; WX 556 ; N oacute ; B 40 -17 517 711 ;
-C -1 ; WX 400 ; N degree ; B 50 360 350 660 ;
-C -1 ; WX 333 ; N igrave ; B 18 -3 298 711 ;
-C -1 ; WX 611 ; N mu ; B 25 -225 583 471 ;
-C -1 ; WX 833 ; N Oacute ; B 47 -17 787 915 ;
-C -1 ; WX 556 ; N eth ; B 40 -17 517 720 ;
-C -1 ; WX 778 ; N Adieresis ; B 24 -3 757 895 ;
-C -1 ; WX 667 ; N Yacute ; B 15 -3 660 915 ;
-C -1 ; WX 606 ; N brokenbar ; B 260 0 346 720 ;
-C -1 ; WX 750 ; N onehalf ; B 9 -2 745 665 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 101
-
-KPX A y -70
-KPX A w -70
-KPX A v -70
-KPX A space -18
-KPX A quoteright -92
-KPX A Y -111
-KPX A W -90
-KPX A V -129
-KPX A T -92
-
-KPX F period -111
-KPX F comma -111
-KPX F A -55
-
-KPX L y -74
-KPX L space -18
-KPX L quoteright -74
-KPX L Y -92
-KPX L W -92
-KPX L V -92
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -74
-
-KPX R y -30
-KPX R Y -55
-KPX R W -37
-KPX R V -74
-KPX R T -55
-
-KPX T y -90
-KPX T w -90
-KPX T u -129
-KPX T semicolon -74
-KPX T s -111
-KPX T r -111
-KPX T period -92
-KPX T o -111
-KPX T i -55
-KPX T hyphen -92
-KPX T e -111
-KPX T comma -92
-KPX T colon -74
-KPX T c -129
-KPX T a -111
-KPX T A -92
-
-KPX V y -90
-KPX V u -92
-KPX V semicolon -74
-KPX V r -111
-KPX V period -129
-KPX V o -111
-KPX V i -55
-KPX V hyphen -92
-KPX V e -111
-KPX V comma -129
-KPX V colon -74
-KPX V a -111
-KPX V A -129
-
-KPX W y -74
-KPX W u -74
-KPX W semicolon -37
-KPX W r -74
-KPX W period -37
-KPX W o -74
-KPX W i -37
-KPX W hyphen -37
-KPX W e -74
-KPX W comma -92
-KPX W colon -37
-KPX W a -74
-KPX W A -90
-
-KPX Y v -74
-KPX Y u -74
-KPX Y semicolon -55
-KPX Y q -92
-KPX Y period -74
-KPX Y p -74
-KPX Y o -74
-KPX Y i -55
-KPX Y hyphen -74
-KPX Y e -74
-KPX Y comma -74
-KPX Y colon -55
-KPX Y a -74
-KPX Y A -55
-
-KPX f quoteright 37
-KPX f f -18
-
-KPX one one -37
-
-KPX quoteleft quoteleft -55
-
-KPX quoteright t -18
-KPX quoteright space -55
-KPX quoteright s -55
-KPX quoteright quoteright -55
-
-KPX r quoteright 55
-KPX r period -55
-KPX r hyphen -18
-KPX r comma -55
-
-KPX v period -111
-KPX v comma -111
-
-KPX w period -92
-KPX w comma -92
-
-KPX y period -92
-KPX y comma -92
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 223 224 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 211 224 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 223 224 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 215 224 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 223 224 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 223 224 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 224 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 224 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 224 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 224 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 224 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 224 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 224 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 224 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 250 224 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 224 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 224 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 224 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 224 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 224 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 139 224 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 235 224 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 235 224 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 224 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 223 224 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 211 224 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 199 224 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 224 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 20 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 20 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 84 20 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 12 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 84 20 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 96 20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 20 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 84 20 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 20 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 20 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 20 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 12 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 20 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 20 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 20 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 12 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 56 8 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 151 20 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 20 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 20 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 131 20 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 144 20 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 124 20 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 8 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Palatino-BoldItalic.afm b/blt3.0/library/AFM/Palatino-BoldItalic.afm
deleted file mode 100644
index 44c7b2c..0000000
--- a/blt3.0/library/AFM/Palatino-BoldItalic.afm
+++ /dev/null
@@ -1,442 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Jul  2 22:48:39 1990
-Comment UniqueID 31799
-Comment VMusage 37656 48548
-FontName Palatino-BoldItalic
-FullName Palatino Bold Italic
-FamilyName Palatino
-Weight Bold
-ItalicAngle -10
-IsFixedPitch false
-FontBBox -170 -271 1073 926
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.005
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 681
-XHeight 469
-Ascender 726
-Descender -271
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 58 -17 322 695 ;
-C 34 ; WX 500 ; N quotedbl ; B 137 467 493 720 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 496 673 ;
-C 36 ; WX 500 ; N dollar ; B 20 -108 477 737 ;
-C 37 ; WX 889 ; N percent ; B 56 -17 790 697 ;
-C 38 ; WX 833 ; N ampersand ; B 74 -17 811 695 ;
-C 39 ; WX 278 ; N quoteright ; B 76 431 302 720 ;
-C 40 ; WX 333 ; N parenleft ; B 58 -129 368 723 ;
-C 41 ; WX 333 ; N parenright ; B -12 -129 298 723 ;
-C 42 ; WX 444 ; N asterisk ; B 84 332 439 695 ;
-C 43 ; WX 606 ; N plus ; B 50 -5 556 501 ;
-C 44 ; WX 250 ; N comma ; B -33 -164 208 147 ;
-C 45 ; WX 389 ; N hyphen ; B 37 198 362 300 ;
-C 46 ; WX 250 ; N period ; B 48 -17 187 135 ;
-C 47 ; WX 315 ; N slash ; B 1 -17 315 720 ;
-C 48 ; WX 500 ; N zero ; B 42 -17 490 683 ;
-C 49 ; WX 500 ; N one ; B 41 -3 434 678 ;
-C 50 ; WX 500 ; N two ; B 1 -3 454 683 ;
-C 51 ; WX 500 ; N three ; B 8 -17 450 683 ;
-C 52 ; WX 500 ; N four ; B 3 -3 487 683 ;
-C 53 ; WX 500 ; N five ; B 14 -17 481 675 ;
-C 54 ; WX 500 ; N six ; B 39 -17 488 683 ;
-C 55 ; WX 500 ; N seven ; B 69 -3 544 674 ;
-C 56 ; WX 500 ; N eight ; B 26 -17 484 683 ;
-C 57 ; WX 500 ; N nine ; B 27 -17 491 683 ;
-C 58 ; WX 250 ; N colon ; B 38 -17 236 452 ;
-C 59 ; WX 250 ; N semicolon ; B -33 -164 247 452 ;
-C 60 ; WX 606 ; N less ; B 49 -21 558 517 ;
-C 61 ; WX 606 ; N equal ; B 51 106 555 390 ;
-C 62 ; WX 606 ; N greater ; B 48 -21 557 517 ;
-C 63 ; WX 444 ; N question ; B 91 -17 450 695 ;
-C 64 ; WX 833 ; N at ; B 82 -12 744 681 ;
-C 65 ; WX 722 ; N A ; B -35 -3 685 683 ;
-C 66 ; WX 667 ; N B ; B 8 -3 629 681 ;
-C 67 ; WX 685 ; N C ; B 69 -17 695 695 ;
-C 68 ; WX 778 ; N D ; B 0 -3 747 682 ;
-C 69 ; WX 611 ; N E ; B 11 -3 606 681 ;
-C 70 ; WX 556 ; N F ; B -6 -3 593 681 ;
-C 71 ; WX 778 ; N G ; B 72 -17 750 695 ;
-C 72 ; WX 778 ; N H ; B -12 -3 826 681 ;
-C 73 ; WX 389 ; N I ; B -1 -3 412 681 ;
-C 74 ; WX 389 ; N J ; B -29 -207 417 681 ;
-C 75 ; WX 722 ; N K ; B -10 -3 746 681 ;
-C 76 ; WX 611 ; N L ; B 26 -3 578 681 ;
-C 77 ; WX 944 ; N M ; B -23 -17 985 681 ;
-C 78 ; WX 778 ; N N ; B -2 -3 829 681 ;
-C 79 ; WX 833 ; N O ; B 76 -17 794 695 ;
-C 80 ; WX 667 ; N P ; B 11 -3 673 681 ;
-C 81 ; WX 833 ; N Q ; B 76 -222 794 695 ;
-C 82 ; WX 722 ; N R ; B 4 -3 697 681 ;
-C 83 ; WX 556 ; N S ; B 50 -17 517 695 ;
-C 84 ; WX 611 ; N T ; B 56 -3 674 681 ;
-C 85 ; WX 778 ; N U ; B 83 -17 825 681 ;
-C 86 ; WX 667 ; N V ; B 67 -3 745 681 ;
-C 87 ; WX 1000 ; N W ; B 67 -3 1073 689 ;
-C 88 ; WX 722 ; N X ; B -9 -3 772 681 ;
-C 89 ; WX 611 ; N Y ; B 54 -3 675 695 ;
-C 90 ; WX 667 ; N Z ; B 1 -3 676 681 ;
-C 91 ; WX 333 ; N bracketleft ; B 45 -102 381 723 ;
-C 92 ; WX 606 ; N backslash ; B 72 0 534 720 ;
-C 93 ; WX 333 ; N bracketright ; B -21 -102 315 723 ;
-C 94 ; WX 606 ; N asciicircum ; B 63 275 543 678 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 65 431 291 720 ;
-C 97 ; WX 556 ; N a ; B 44 -17 519 470 ;
-C 98 ; WX 537 ; N b ; B 44 -17 494 726 ;
-C 99 ; WX 444 ; N c ; B 32 -17 436 469 ;
-C 100 ; WX 556 ; N d ; B 38 -17 550 726 ;
-C 101 ; WX 444 ; N e ; B 28 -17 418 469 ;
-C 102 ; WX 333 ; N f ; B -130 -271 449 726 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B -50 -271 529 469 ;
-C 104 ; WX 556 ; N h ; B 22 -17 522 726 ;
-C 105 ; WX 333 ; N i ; B 26 -17 312 695 ;
-C 106 ; WX 333 ; N j ; B -64 -271 323 695 ;
-C 107 ; WX 556 ; N k ; B 34 -17 528 726 ;
-C 108 ; WX 333 ; N l ; B 64 -17 318 726 ;
-C 109 ; WX 833 ; N m ; B 19 -17 803 469 ;
-C 110 ; WX 556 ; N n ; B 17 -17 521 469 ;
-C 111 ; WX 556 ; N o ; B 48 -17 502 469 ;
-C 112 ; WX 556 ; N p ; B -21 -271 516 469 ;
-C 113 ; WX 537 ; N q ; B 32 -271 513 469 ;
-C 114 ; WX 389 ; N r ; B 20 -17 411 469 ;
-C 115 ; WX 444 ; N s ; B 25 -17 406 469 ;
-C 116 ; WX 389 ; N t ; B 42 -17 409 636 ;
-C 117 ; WX 556 ; N u ; B 22 -17 521 469 ;
-C 118 ; WX 556 ; N v ; B 19 -17 513 469 ;
-C 119 ; WX 833 ; N w ; B 27 -17 802 469 ;
-C 120 ; WX 500 ; N x ; B -8 -17 500 469 ;
-C 121 ; WX 556 ; N y ; B 13 -271 541 469 ;
-C 122 ; WX 500 ; N z ; B 31 -17 470 469 ;
-C 123 ; WX 333 ; N braceleft ; B 18 -105 334 720 ;
-C 124 ; WX 606 ; N bar ; B 259 0 347 720 ;
-C 125 ; WX 333 ; N braceright ; B -1 -105 315 720 ;
-C 126 ; WX 606 ; N asciitilde ; B 51 151 555 346 ;
-C 161 ; WX 333 ; N exclamdown ; B 2 -225 259 479 ;
-C 162 ; WX 500 ; N cent ; B 52 -105 456 547 ;
-C 163 ; WX 500 ; N sterling ; B 21 -5 501 683 ;
-C 164 ; WX 167 ; N fraction ; B -170 0 338 683 ;
-C 165 ; WX 500 ; N yen ; B 11 -3 538 695 ;
-C 166 ; WX 500 ; N florin ; B 8 -242 479 690 ;
-C 167 ; WX 556 ; N section ; B 47 -151 497 695 ;
-C 168 ; WX 500 ; N currency ; B 32 96 468 533 ;
-C 169 ; WX 250 ; N quotesingle ; B 127 467 293 720 ;
-C 170 ; WX 500 ; N quotedblleft ; B 65 431 511 720 ;
-C 171 ; WX 500 ; N guillemotleft ; B 35 43 458 446 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 60 43 292 446 ;
-C 173 ; WX 333 ; N guilsinglright ; B 35 40 267 443 ;
-C 174 ; WX 611 ; N fi ; B -130 -271 588 726 ;
-C 175 ; WX 611 ; N fl ; B -130 -271 631 726 ;
-C 177 ; WX 500 ; N endash ; B -12 214 512 282 ;
-C 178 ; WX 556 ; N dagger ; B 67 -3 499 685 ;
-C 179 ; WX 556 ; N daggerdbl ; B 33 -153 537 693 ;
-C 180 ; WX 250 ; N periodcentered ; B 67 172 206 324 ;
-C 182 ; WX 556 ; N paragraph ; B 14 -204 629 681 ;
-C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ;
-C 184 ; WX 250 ; N quotesinglbase ; B -3 -144 220 145 ;
-C 185 ; WX 500 ; N quotedblbase ; B -18 -144 424 145 ;
-C 186 ; WX 500 ; N quotedblright ; B 73 431 519 720 ;
-C 187 ; WX 500 ; N guillemotright ; B 35 40 458 443 ;
-C 188 ; WX 1000 ; N ellipsis ; B 91 -17 896 135 ;
-C 189 ; WX 1000 ; N perthousand ; B 65 -17 912 691 ;
-C 191 ; WX 444 ; N questiondown ; B -12 -226 347 479 ;
-C 193 ; WX 333 ; N grave ; B 110 518 322 699 ;
-C 194 ; WX 333 ; N acute ; B 153 518 392 699 ;
-C 195 ; WX 333 ; N circumflex ; B 88 510 415 684 ;
-C 196 ; WX 333 ; N tilde ; B 82 535 441 654 ;
-C 197 ; WX 333 ; N macron ; B 76 538 418 608 ;
-C 198 ; WX 333 ; N breve ; B 96 518 412 680 ;
-C 199 ; WX 333 ; N dotaccent ; B 202 537 325 668 ;
-C 200 ; WX 333 ; N dieresis ; B 90 537 426 668 ;
-C 202 ; WX 556 ; N ring ; B 277 514 477 714 ;
-C 203 ; WX 333 ; N cedilla ; B 12 -218 248 5 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -28 518 409 699 ;
-C 206 ; WX 333 ; N ogonek ; B 32 -206 238 -17 ;
-C 207 ; WX 333 ; N caron ; B 113 510 445 684 ;
-C 208 ; WX 1000 ; N emdash ; B -12 214 1012 282 ;
-C 225 ; WX 944 ; N AE ; B -29 -3 927 681 ;
-C 227 ; WX 333 ; N ordfeminine ; B 47 391 355 684 ;
-C 232 ; WX 611 ; N Lslash ; B 6 -3 578 681 ;
-C 233 ; WX 833 ; N Oslash ; B 57 -54 797 730 ;
-C 234 ; WX 944 ; N OE ; B 39 -17 961 695 ;
-C 235 ; WX 333 ; N ordmasculine ; B 51 391 346 683 ;
-C 241 ; WX 738 ; N ae ; B 44 -17 711 469 ;
-C 245 ; WX 333 ; N dotlessi ; B 26 -17 293 469 ;
-C 248 ; WX 333 ; N lslash ; B 13 -17 365 726 ;
-C 249 ; WX 556 ; N oslash ; B 14 -50 522 506 ;
-C 250 ; WX 778 ; N oe ; B 48 -17 755 469 ;
-C 251 ; WX 556 ; N germandbls ; B -131 -271 549 726 ;
-C -1 ; WX 667 ; N Zcaron ; B 1 -3 676 896 ;
-C -1 ; WX 444 ; N ccedilla ; B 32 -218 436 469 ;
-C -1 ; WX 556 ; N ydieresis ; B 13 -271 541 688 ;
-C -1 ; WX 556 ; N atilde ; B 44 -17 553 666 ;
-C -1 ; WX 333 ; N icircumflex ; B 26 -17 403 704 ;
-C -1 ; WX 300 ; N threesuperior ; B 23 263 310 683 ;
-C -1 ; WX 444 ; N ecircumflex ; B 28 -17 471 704 ;
-C -1 ; WX 556 ; N thorn ; B -21 -271 516 726 ;
-C -1 ; WX 444 ; N egrave ; B 28 -17 418 719 ;
-C -1 ; WX 300 ; N twosuperior ; B 26 271 321 683 ;
-C -1 ; WX 444 ; N eacute ; B 28 -17 448 719 ;
-C -1 ; WX 556 ; N otilde ; B 48 -17 553 666 ;
-C -1 ; WX 722 ; N Aacute ; B -35 -3 685 911 ;
-C -1 ; WX 556 ; N ocircumflex ; B 48 -17 515 704 ;
-C -1 ; WX 556 ; N yacute ; B 13 -271 541 719 ;
-C -1 ; WX 556 ; N udieresis ; B 22 -17 538 688 ;
-C -1 ; WX 750 ; N threequarters ; B 18 -2 732 683 ;
-C -1 ; WX 556 ; N acircumflex ; B 44 -17 527 704 ;
-C -1 ; WX 778 ; N Eth ; B 0 -3 747 682 ;
-C -1 ; WX 444 ; N edieresis ; B 28 -17 482 688 ;
-C -1 ; WX 556 ; N ugrave ; B 22 -17 521 719 ;
-C -1 ; WX 1000 ; N trademark ; B 38 274 961 678 ;
-C -1 ; WX 556 ; N ograve ; B 48 -17 502 719 ;
-C -1 ; WX 444 ; N scaron ; B 25 -17 489 692 ;
-C -1 ; WX 389 ; N Idieresis ; B -1 -3 454 880 ;
-C -1 ; WX 556 ; N uacute ; B 22 -17 521 719 ;
-C -1 ; WX 556 ; N agrave ; B 44 -17 519 719 ;
-C -1 ; WX 556 ; N ntilde ; B 17 -17 553 666 ;
-C -1 ; WX 556 ; N aring ; B 44 -17 519 714 ;
-C -1 ; WX 500 ; N zcaron ; B 31 -17 517 692 ;
-C -1 ; WX 389 ; N Icircumflex ; B -1 -3 443 896 ;
-C -1 ; WX 778 ; N Ntilde ; B -2 -3 829 866 ;
-C -1 ; WX 556 ; N ucircumflex ; B 22 -17 521 704 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 11 -3 606 896 ;
-C -1 ; WX 389 ; N Iacute ; B -1 -3 420 911 ;
-C -1 ; WX 685 ; N Ccedilla ; B 69 -218 695 695 ;
-C -1 ; WX 833 ; N Odieresis ; B 76 -17 794 880 ;
-C -1 ; WX 556 ; N Scaron ; B 50 -17 557 896 ;
-C -1 ; WX 611 ; N Edieresis ; B 11 -3 606 880 ;
-C -1 ; WX 389 ; N Igrave ; B -1 -3 412 911 ;
-C -1 ; WX 556 ; N adieresis ; B 44 -17 538 688 ;
-C -1 ; WX 833 ; N Ograve ; B 76 -17 794 911 ;
-C -1 ; WX 611 ; N Egrave ; B 11 -3 606 911 ;
-C -1 ; WX 611 ; N Ydieresis ; B 54 -3 675 880 ;
-C -1 ; WX 747 ; N registered ; B 26 -17 720 695 ;
-C -1 ; WX 833 ; N Otilde ; B 76 -17 794 866 ;
-C -1 ; WX 750 ; N onequarter ; B 18 -2 732 683 ;
-C -1 ; WX 778 ; N Ugrave ; B 83 -17 825 911 ;
-C -1 ; WX 778 ; N Ucircumflex ; B 83 -17 825 896 ;
-C -1 ; WX 667 ; N Thorn ; B 11 -3 644 681 ;
-C -1 ; WX 606 ; N divide ; B 50 -5 556 501 ;
-C -1 ; WX 722 ; N Atilde ; B -35 -3 685 866 ;
-C -1 ; WX 778 ; N Uacute ; B 83 -17 825 911 ;
-C -1 ; WX 833 ; N Ocircumflex ; B 76 -17 794 896 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 107 555 390 ;
-C -1 ; WX 722 ; N Aring ; B -35 -3 685 926 ;
-C -1 ; WX 333 ; N idieresis ; B 26 -17 426 688 ;
-C -1 ; WX 333 ; N iacute ; B 26 -17 392 719 ;
-C -1 ; WX 556 ; N aacute ; B 44 -17 519 719 ;
-C -1 ; WX 606 ; N plusminus ; B 50 0 556 501 ;
-C -1 ; WX 606 ; N multiply ; B 72 17 534 479 ;
-C -1 ; WX 778 ; N Udieresis ; B 83 -17 825 880 ;
-C -1 ; WX 606 ; N minus ; B 51 204 555 292 ;
-C -1 ; WX 300 ; N onesuperior ; B 41 271 298 680 ;
-C -1 ; WX 611 ; N Eacute ; B 11 -3 606 911 ;
-C -1 ; WX 722 ; N Acircumflex ; B -35 -3 685 896 ;
-C -1 ; WX 747 ; N copyright ; B 26 -17 720 695 ;
-C -1 ; WX 722 ; N Agrave ; B -35 -3 685 911 ;
-C -1 ; WX 556 ; N odieresis ; B 48 -17 538 688 ;
-C -1 ; WX 556 ; N oacute ; B 48 -17 504 719 ;
-C -1 ; WX 400 ; N degree ; B 50 383 350 683 ;
-C -1 ; WX 333 ; N igrave ; B 26 -17 322 719 ;
-C -1 ; WX 556 ; N mu ; B -15 -232 521 469 ;
-C -1 ; WX 833 ; N Oacute ; B 76 -17 794 911 ;
-C -1 ; WX 556 ; N eth ; B 48 -17 546 726 ;
-C -1 ; WX 722 ; N Adieresis ; B -35 -3 685 880 ;
-C -1 ; WX 611 ; N Yacute ; B 54 -3 675 911 ;
-C -1 ; WX 606 ; N brokenbar ; B 259 0 347 720 ;
-C -1 ; WX 750 ; N onehalf ; B 14 -2 736 683 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 108
-
-KPX A y -55
-KPX A w -37
-KPX A v -55
-KPX A space -55
-KPX A quoteright -55
-KPX A Y -74
-KPX A W -74
-KPX A V -74
-KPX A T -55
-
-KPX F space -18
-KPX F period -111
-KPX F comma -111
-KPX F A -74
-
-KPX L y -37
-KPX L space -18
-KPX L quoteright -55
-KPX L Y -74
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P space -55
-KPX P period -129
-KPX P comma -129
-KPX P A -92
-
-KPX R y -20
-KPX R Y -37
-KPX R W -55
-KPX R V -55
-KPX R T -37
-
-KPX T y -80
-KPX T w -50
-KPX T u -92
-KPX T semicolon -55
-KPX T s -92
-KPX T r -92
-KPX T period -55
-KPX T o -111
-KPX T i -74
-KPX T hyphen -92
-KPX T e -111
-KPX T comma -55
-KPX T colon -55
-KPX T c -92
-KPX T a -111
-KPX T O -18
-KPX T A -55
-
-KPX V y -50
-KPX V u -50
-KPX V semicolon -37
-KPX V r -74
-KPX V period -111
-KPX V o -74
-KPX V i -50
-KPX V hyphen -37
-KPX V e -74
-KPX V comma -111
-KPX V colon -37
-KPX V a -92
-KPX V A -74
-
-KPX W y -30
-KPX W u -30
-KPX W semicolon -18
-KPX W r -30
-KPX W period -55
-KPX W o -55
-KPX W i -30
-KPX W e -55
-KPX W comma -55
-KPX W colon -28
-KPX W a -74
-KPX W A -74
-
-KPX Y v -30
-KPX Y u -50
-KPX Y semicolon -55
-KPX Y q -92
-KPX Y period -55
-KPX Y p -74
-KPX Y o -111
-KPX Y i -54
-KPX Y hyphen -55
-KPX Y e -92
-KPX Y comma -55
-KPX Y colon -55
-KPX Y a -111
-KPX Y A -55
-
-KPX f quoteright 37
-KPX f f -37
-
-KPX one one -55
-
-KPX quoteleft quoteleft -55
-
-KPX quoteright t -18
-KPX quoteright space -37
-KPX quoteright s -37
-KPX quoteright quoteright -55
-
-KPX r quoteright 55
-KPX r q -18
-KPX r period -55
-KPX r o -18
-KPX r h -18
-KPX r g -18
-KPX r e -18
-KPX r comma -55
-KPX r c -18
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -55
-KPX w comma -55
-
-KPX y period -37
-KPX y comma -37
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 212 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 212 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 212 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 212 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 83 212 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 212 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 212 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 212 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 212 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 212 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 212 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 212 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 212 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 212 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 223 212 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 212 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 212 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 212 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 212 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 212 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 212 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 223 212 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 223 212 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 223 212 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 211 212 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 151 212 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 212 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 212 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 112 20 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 20 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 112 20 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 12 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 20 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 20 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 20 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 20 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -12 20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 20 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 20 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 12 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 112 20 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 100 20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 20 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 112 20 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 12 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 44 8 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 20 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 100 20 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 20 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 20 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 112 20 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 20 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 72 8 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Palatino-Italic.afm b/blt3.0/library/AFM/Palatino-Italic.afm
deleted file mode 100644
index 46c2eb5..0000000
--- a/blt3.0/library/AFM/Palatino-Italic.afm
+++ /dev/null
@@ -1,440 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Jul  2 22:37:33 1990
-Comment UniqueID 31796
-Comment VMusage 37415 48307
-FontName Palatino-Italic
-FullName Palatino Italic
-FamilyName Palatino
-Weight Medium
-ItalicAngle -10
-IsFixedPitch false
-FontBBox -170 -276 1010 918
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.005
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 692
-XHeight 482
-Ascender 733
-Descender -276
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 76 -8 292 733 ;
-C 34 ; WX 500 ; N quotedbl ; B 140 508 455 733 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 495 692 ;
-C 36 ; WX 500 ; N dollar ; B 15 -113 452 733 ;
-C 37 ; WX 889 ; N percent ; B 74 -7 809 710 ;
-C 38 ; WX 778 ; N ampersand ; B 47 -18 766 692 ;
-C 39 ; WX 278 ; N quoteright ; B 78 488 258 733 ;
-C 40 ; WX 333 ; N parenleft ; B 54 -106 331 733 ;
-C 41 ; WX 333 ; N parenright ; B 2 -106 279 733 ;
-C 42 ; WX 389 ; N asterisk ; B 76 368 400 706 ;
-C 43 ; WX 606 ; N plus ; B 51 0 555 504 ;
-C 44 ; WX 250 ; N comma ; B 8 -143 203 123 ;
-C 45 ; WX 333 ; N hyphen ; B 19 223 304 281 ;
-C 46 ; WX 250 ; N period ; B 53 -5 158 112 ;
-C 47 ; WX 296 ; N slash ; B -40 -119 392 733 ;
-C 48 ; WX 500 ; N zero ; B 36 -11 480 699 ;
-C 49 ; WX 500 ; N one ; B 54 -3 398 699 ;
-C 50 ; WX 500 ; N two ; B 12 -3 437 699 ;
-C 51 ; WX 500 ; N three ; B 22 -11 447 699 ;
-C 52 ; WX 500 ; N four ; B 15 -3 478 699 ;
-C 53 ; WX 500 ; N five ; B 14 -11 491 693 ;
-C 54 ; WX 500 ; N six ; B 49 -11 469 699 ;
-C 55 ; WX 500 ; N seven ; B 53 -3 502 692 ;
-C 56 ; WX 500 ; N eight ; B 36 -11 469 699 ;
-C 57 ; WX 500 ; N nine ; B 32 -11 468 699 ;
-C 58 ; WX 250 ; N colon ; B 44 -5 207 458 ;
-C 59 ; WX 250 ; N semicolon ; B -9 -146 219 456 ;
-C 60 ; WX 606 ; N less ; B 53 -6 554 516 ;
-C 61 ; WX 606 ; N equal ; B 51 126 555 378 ;
-C 62 ; WX 606 ; N greater ; B 53 -6 554 516 ;
-C 63 ; WX 500 ; N question ; B 114 -8 427 706 ;
-C 64 ; WX 747 ; N at ; B 27 -18 718 706 ;
-C 65 ; WX 722 ; N A ; B -19 -3 677 705 ;
-C 66 ; WX 611 ; N B ; B 26 -6 559 692 ;
-C 67 ; WX 667 ; N C ; B 45 -18 651 706 ;
-C 68 ; WX 778 ; N D ; B 28 -3 741 692 ;
-C 69 ; WX 611 ; N E ; B 30 -3 570 692 ;
-C 70 ; WX 556 ; N F ; B 0 -3 548 692 ;
-C 71 ; WX 722 ; N G ; B 50 -18 694 706 ;
-C 72 ; WX 778 ; N H ; B -3 -3 800 692 ;
-C 73 ; WX 333 ; N I ; B 7 -3 354 692 ;
-C 74 ; WX 333 ; N J ; B -35 -206 358 692 ;
-C 75 ; WX 667 ; N K ; B 13 -3 683 692 ;
-C 76 ; WX 556 ; N L ; B 16 -3 523 692 ;
-C 77 ; WX 944 ; N M ; B -19 -18 940 692 ;
-C 78 ; WX 778 ; N N ; B 2 -11 804 692 ;
-C 79 ; WX 778 ; N O ; B 53 -18 748 706 ;
-C 80 ; WX 611 ; N P ; B 9 -3 594 692 ;
-C 81 ; WX 778 ; N Q ; B 53 -201 748 706 ;
-C 82 ; WX 667 ; N R ; B 9 -3 639 692 ;
-C 83 ; WX 556 ; N S ; B 42 -18 506 706 ;
-C 84 ; WX 611 ; N T ; B 53 -3 635 692 ;
-C 85 ; WX 778 ; N U ; B 88 -18 798 692 ;
-C 86 ; WX 722 ; N V ; B 75 -8 754 692 ;
-C 87 ; WX 944 ; N W ; B 71 -8 980 700 ;
-C 88 ; WX 722 ; N X ; B 20 -3 734 692 ;
-C 89 ; WX 667 ; N Y ; B 52 -3 675 705 ;
-C 90 ; WX 667 ; N Z ; B 20 -3 637 692 ;
-C 91 ; WX 333 ; N bracketleft ; B 18 -100 326 733 ;
-C 92 ; WX 606 ; N backslash ; B 81 0 513 733 ;
-C 93 ; WX 333 ; N bracketright ; B 7 -100 315 733 ;
-C 94 ; WX 606 ; N asciicircum ; B 51 283 554 689 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 78 488 258 733 ;
-C 97 ; WX 444 ; N a ; B 4 -11 406 482 ;
-C 98 ; WX 463 ; N b ; B 37 -11 433 733 ;
-C 99 ; WX 407 ; N c ; B 25 -11 389 482 ;
-C 100 ; WX 500 ; N d ; B 17 -11 483 733 ;
-C 101 ; WX 389 ; N e ; B 15 -11 374 482 ;
-C 102 ; WX 278 ; N f ; B -162 -276 413 733 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B -37 -276 498 482 ;
-C 104 ; WX 500 ; N h ; B 10 -9 471 733 ;
-C 105 ; WX 278 ; N i ; B 34 -9 264 712 ;
-C 106 ; WX 278 ; N j ; B -70 -276 265 712 ;
-C 107 ; WX 444 ; N k ; B 8 -9 449 733 ;
-C 108 ; WX 278 ; N l ; B 36 -9 251 733 ;
-C 109 ; WX 778 ; N m ; B 24 -9 740 482 ;
-C 110 ; WX 556 ; N n ; B 24 -9 514 482 ;
-C 111 ; WX 444 ; N o ; B 17 -11 411 482 ;
-C 112 ; WX 500 ; N p ; B -7 -276 465 482 ;
-C 113 ; WX 463 ; N q ; B 24 -276 432 482 ;
-C 114 ; WX 389 ; N r ; B 26 -9 384 482 ;
-C 115 ; WX 389 ; N s ; B 9 -11 345 482 ;
-C 116 ; WX 333 ; N t ; B 41 -9 310 646 ;
-C 117 ; WX 556 ; N u ; B 32 -11 512 482 ;
-C 118 ; WX 500 ; N v ; B 21 -11 477 482 ;
-C 119 ; WX 722 ; N w ; B 21 -11 699 482 ;
-C 120 ; WX 500 ; N x ; B 9 -11 484 482 ;
-C 121 ; WX 500 ; N y ; B -8 -276 490 482 ;
-C 122 ; WX 444 ; N z ; B -1 -11 416 482 ;
-C 123 ; WX 333 ; N braceleft ; B 15 -100 319 733 ;
-C 124 ; WX 606 ; N bar ; B 275 0 331 733 ;
-C 125 ; WX 333 ; N braceright ; B 14 -100 318 733 ;
-C 126 ; WX 606 ; N asciitilde ; B 51 168 555 339 ;
-C 161 ; WX 333 ; N exclamdown ; B 15 -276 233 467 ;
-C 162 ; WX 500 ; N cent ; B 56 -96 418 551 ;
-C 163 ; WX 500 ; N sterling ; B 2 -18 479 708 ;
-C 164 ; WX 167 ; N fraction ; B -170 0 337 699 ;
-C 165 ; WX 500 ; N yen ; B 35 -3 512 699 ;
-C 166 ; WX 500 ; N florin ; B 5 -276 470 708 ;
-C 167 ; WX 500 ; N section ; B 14 -220 463 706 ;
-C 168 ; WX 500 ; N currency ; B 14 115 486 577 ;
-C 169 ; WX 333 ; N quotesingle ; B 140 508 288 733 ;
-C 170 ; WX 500 ; N quotedblleft ; B 98 488 475 733 ;
-C 171 ; WX 500 ; N guillemotleft ; B 57 70 437 440 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 57 70 270 440 ;
-C 173 ; WX 333 ; N guilsinglright ; B 63 70 276 440 ;
-C 174 ; WX 528 ; N fi ; B -162 -276 502 733 ;
-C 175 ; WX 545 ; N fl ; B -162 -276 520 733 ;
-C 177 ; WX 500 ; N endash ; B -10 228 510 278 ;
-C 178 ; WX 500 ; N dagger ; B 48 0 469 692 ;
-C 179 ; WX 500 ; N daggerdbl ; B 10 -162 494 692 ;
-C 180 ; WX 250 ; N periodcentered ; B 53 195 158 312 ;
-C 182 ; WX 500 ; N paragraph ; B 33 -224 611 692 ;
-C 183 ; WX 500 ; N bullet ; B 86 182 430 526 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 27 -122 211 120 ;
-C 185 ; WX 500 ; N quotedblbase ; B 43 -122 424 120 ;
-C 186 ; WX 500 ; N quotedblright ; B 98 488 475 733 ;
-C 187 ; WX 500 ; N guillemotright ; B 63 70 443 440 ;
-C 188 ; WX 1000 ; N ellipsis ; B 102 -5 873 112 ;
-C 189 ; WX 1000 ; N perthousand ; B 72 -6 929 717 ;
-C 191 ; WX 500 ; N questiondown ; B 57 -246 370 467 ;
-C 193 ; WX 333 ; N grave ; B 86 518 310 687 ;
-C 194 ; WX 333 ; N acute ; B 122 518 346 687 ;
-C 195 ; WX 333 ; N circumflex ; B 56 510 350 679 ;
-C 196 ; WX 333 ; N tilde ; B 63 535 390 638 ;
-C 197 ; WX 333 ; N macron ; B 74 538 386 589 ;
-C 198 ; WX 333 ; N breve ; B 92 518 393 677 ;
-C 199 ; WX 333 ; N dotaccent ; B 175 537 283 645 ;
-C 200 ; WX 333 ; N dieresis ; B 78 537 378 637 ;
-C 202 ; WX 333 ; N ring ; B 159 508 359 708 ;
-C 203 ; WX 333 ; N cedilla ; B -9 -216 202 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 46 518 385 730 ;
-C 206 ; WX 333 ; N ogonek ; B 38 -207 196 -18 ;
-C 207 ; WX 333 ; N caron ; B 104 510 409 679 ;
-C 208 ; WX 1000 ; N emdash ; B -10 228 1010 278 ;
-C 225 ; WX 941 ; N AE ; B -4 -3 902 692 ;
-C 227 ; WX 333 ; N ordfeminine ; B 60 404 321 699 ;
-C 232 ; WX 556 ; N Lslash ; B -16 -3 523 692 ;
-C 233 ; WX 778 ; N Oslash ; B 32 -39 762 721 ;
-C 234 ; WX 1028 ; N OE ; B 56 -18 989 706 ;
-C 235 ; WX 333 ; N ordmasculine ; B 66 404 322 699 ;
-C 241 ; WX 638 ; N ae ; B 1 -11 623 482 ;
-C 245 ; WX 278 ; N dotlessi ; B 34 -9 241 482 ;
-C 248 ; WX 278 ; N lslash ; B -10 -9 302 733 ;
-C 249 ; WX 444 ; N oslash ; B -18 -24 460 510 ;
-C 250 ; WX 669 ; N oe ; B 17 -11 654 482 ;
-C 251 ; WX 500 ; N germandbls ; B -160 -276 488 733 ;
-C -1 ; WX 667 ; N Zcaron ; B 20 -3 637 907 ;
-C -1 ; WX 407 ; N ccedilla ; B 25 -216 389 482 ;
-C -1 ; WX 500 ; N ydieresis ; B -8 -276 490 657 ;
-C -1 ; WX 444 ; N atilde ; B 4 -11 446 650 ;
-C -1 ; WX 278 ; N icircumflex ; B 29 -9 323 699 ;
-C -1 ; WX 300 ; N threesuperior ; B 28 273 304 699 ;
-C -1 ; WX 389 ; N ecircumflex ; B 15 -11 398 699 ;
-C -1 ; WX 500 ; N thorn ; B -39 -276 433 733 ;
-C -1 ; WX 389 ; N egrave ; B 15 -11 374 707 ;
-C -1 ; WX 300 ; N twosuperior ; B 13 278 290 699 ;
-C -1 ; WX 389 ; N eacute ; B 15 -11 394 707 ;
-C -1 ; WX 444 ; N otilde ; B 17 -11 446 650 ;
-C -1 ; WX 722 ; N Aacute ; B -19 -3 677 897 ;
-C -1 ; WX 444 ; N ocircumflex ; B 17 -11 411 699 ;
-C -1 ; WX 500 ; N yacute ; B -8 -276 490 707 ;
-C -1 ; WX 556 ; N udieresis ; B 32 -11 512 657 ;
-C -1 ; WX 750 ; N threequarters ; B 35 -2 715 699 ;
-C -1 ; WX 444 ; N acircumflex ; B 4 -11 406 699 ;
-C -1 ; WX 778 ; N Eth ; B 19 -3 741 692 ;
-C -1 ; WX 389 ; N edieresis ; B 15 -11 406 657 ;
-C -1 ; WX 556 ; N ugrave ; B 32 -11 512 707 ;
-C -1 ; WX 1000 ; N trademark ; B 52 285 951 689 ;
-C -1 ; WX 444 ; N ograve ; B 17 -11 411 707 ;
-C -1 ; WX 389 ; N scaron ; B 9 -11 419 687 ;
-C -1 ; WX 333 ; N Idieresis ; B 7 -3 418 847 ;
-C -1 ; WX 556 ; N uacute ; B 32 -11 512 707 ;
-C -1 ; WX 444 ; N agrave ; B 4 -11 406 707 ;
-C -1 ; WX 556 ; N ntilde ; B 24 -9 514 650 ;
-C -1 ; WX 444 ; N aring ; B 4 -11 406 728 ;
-C -1 ; WX 444 ; N zcaron ; B -1 -11 447 687 ;
-C -1 ; WX 333 ; N Icircumflex ; B 7 -3 390 889 ;
-C -1 ; WX 778 ; N Ntilde ; B 2 -11 804 866 ;
-C -1 ; WX 556 ; N ucircumflex ; B 32 -11 512 699 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 30 -3 570 889 ;
-C -1 ; WX 333 ; N Iacute ; B 7 -3 406 897 ;
-C -1 ; WX 667 ; N Ccedilla ; B 45 -216 651 706 ;
-C -1 ; WX 778 ; N Odieresis ; B 53 -18 748 847 ;
-C -1 ; WX 556 ; N Scaron ; B 42 -18 539 907 ;
-C -1 ; WX 611 ; N Edieresis ; B 30 -3 570 847 ;
-C -1 ; WX 333 ; N Igrave ; B 7 -3 354 897 ;
-C -1 ; WX 444 ; N adieresis ; B 4 -11 434 657 ;
-C -1 ; WX 778 ; N Ograve ; B 53 -18 748 897 ;
-C -1 ; WX 611 ; N Egrave ; B 30 -3 570 897 ;
-C -1 ; WX 667 ; N Ydieresis ; B 52 -3 675 847 ;
-C -1 ; WX 747 ; N registered ; B 11 -18 736 706 ;
-C -1 ; WX 778 ; N Otilde ; B 53 -18 748 866 ;
-C -1 ; WX 750 ; N onequarter ; B 31 -2 715 699 ;
-C -1 ; WX 778 ; N Ugrave ; B 88 -18 798 897 ;
-C -1 ; WX 778 ; N Ucircumflex ; B 88 -18 798 889 ;
-C -1 ; WX 611 ; N Thorn ; B 9 -3 570 692 ;
-C -1 ; WX 606 ; N divide ; B 51 0 555 504 ;
-C -1 ; WX 722 ; N Atilde ; B -19 -3 677 866 ;
-C -1 ; WX 778 ; N Uacute ; B 88 -18 798 897 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 53 -18 748 889 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 118 555 378 ;
-C -1 ; WX 722 ; N Aring ; B -19 -3 677 918 ;
-C -1 ; WX 278 ; N idieresis ; B 34 -9 351 657 ;
-C -1 ; WX 278 ; N iacute ; B 34 -9 331 707 ;
-C -1 ; WX 444 ; N aacute ; B 4 -11 414 707 ;
-C -1 ; WX 606 ; N plusminus ; B 51 0 555 504 ;
-C -1 ; WX 606 ; N multiply ; B 83 36 523 474 ;
-C -1 ; WX 778 ; N Udieresis ; B 88 -18 798 847 ;
-C -1 ; WX 606 ; N minus ; B 51 224 555 280 ;
-C -1 ; WX 300 ; N onesuperior ; B 61 278 285 699 ;
-C -1 ; WX 611 ; N Eacute ; B 30 -3 570 897 ;
-C -1 ; WX 722 ; N Acircumflex ; B -19 -3 677 889 ;
-C -1 ; WX 747 ; N copyright ; B 11 -18 736 706 ;
-C -1 ; WX 722 ; N Agrave ; B -19 -3 677 897 ;
-C -1 ; WX 444 ; N odieresis ; B 17 -11 434 657 ;
-C -1 ; WX 444 ; N oacute ; B 17 -11 414 707 ;
-C -1 ; WX 400 ; N degree ; B 90 389 390 689 ;
-C -1 ; WX 278 ; N igrave ; B 34 -9 271 707 ;
-C -1 ; WX 556 ; N mu ; B 15 -226 512 482 ;
-C -1 ; WX 778 ; N Oacute ; B 53 -18 748 897 ;
-C -1 ; WX 444 ; N eth ; B 17 -11 478 733 ;
-C -1 ; WX 722 ; N Adieresis ; B -19 -3 677 847 ;
-C -1 ; WX 667 ; N Yacute ; B 52 -3 675 897 ;
-C -1 ; WX 606 ; N brokenbar ; B 275 0 331 733 ;
-C -1 ; WX 750 ; N onehalf ; B 31 -2 721 699 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 106
-
-KPX A y -55
-KPX A w -37
-KPX A v -37
-KPX A space -37
-KPX A quoteright -55
-KPX A Y -55
-KPX A W -55
-KPX A V -74
-KPX A T -55
-
-KPX F period -111
-KPX F comma -111
-KPX F A -111
-
-KPX L y -37
-KPX L space -18
-KPX L quoteright -37
-KPX L Y -74
-KPX L W -74
-KPX L V -74
-KPX L T -74
-
-KPX P period -129
-KPX P comma -129
-KPX P A -129
-
-KPX R y -37
-KPX R Y -55
-KPX R W -55
-KPX R V -74
-KPX R T -55
-
-KPX T y -92
-KPX T w -92
-KPX T u -111
-KPX T semicolon -74
-KPX T s -111
-KPX T r -111
-KPX T period -74
-KPX T o -111
-KPX T i -55
-KPX T hyphen -55
-KPX T e -111
-KPX T comma -74
-KPX T colon -74
-KPX T c -111
-KPX T a -111
-KPX T O -18
-KPX T A -92
-
-KPX V y -74
-KPX V u -74
-KPX V semicolon -37
-KPX V r -92
-KPX V period -129
-KPX V o -74
-KPX V i -74
-KPX V hyphen -55
-KPX V e -92
-KPX V comma -129
-KPX V colon -37
-KPX V a -74
-KPX V A -210
-
-KPX W y -20
-KPX W u -20
-KPX W semicolon -18
-KPX W r -20
-KPX W period -55
-KPX W o -20
-KPX W i -20
-KPX W hyphen -18
-KPX W e -20
-KPX W comma -55
-KPX W colon -18
-KPX W a -20
-KPX W A -92
-
-KPX Y v -74
-KPX Y u -92
-KPX Y semicolon -74
-KPX Y q -92
-KPX Y period -92
-KPX Y p -74
-KPX Y o -111
-KPX Y i -55
-KPX Y hyphen -74
-KPX Y e -111
-KPX Y comma -92
-KPX Y colon -74
-KPX Y a -92
-KPX Y A -92
-
-KPX f quoteright 55
-
-KPX one one -55
-
-KPX quoteleft quoteleft -74
-
-KPX quoteright t -37
-KPX quoteright space -55
-KPX quoteright s -55
-KPX quoteright quoteright -74
-
-KPX r quoteright 37
-KPX r q -18
-KPX r period -74
-KPX r o -18
-KPX r h -18
-KPX r g -18
-KPX r e -18
-KPX r comma -74
-KPX r c -18
-
-KPX v period -55
-KPX v comma -55
-
-KPX w period -55
-KPX w comma -55
-
-KPX y period -37
-KPX y comma -37
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 271 210 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 261 210 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 255 210 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 235 210 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 235 210 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 255 228 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 199 210 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 179 210 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 179 210 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 210 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 60 210 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 40 210 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 40 210 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 210 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 263 228 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 283 210 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 263 210 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 255 210 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 251 210 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 263 228 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 130 228 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 277 210 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 255 210 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 210 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 235 210 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 227 210 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 187 210 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 228 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 68 20 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 20 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 44 20 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 36 20 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 12 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 37 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 48 20 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 48 20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 28 20 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 16 20 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -15 20 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 20 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -39 20 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 12 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 68 20 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 56 20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 56 20 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 36 20 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 56 12 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 10 8 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 124 20 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 20 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 20 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 100 20 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 96 20 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 20 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 38 8 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Palatino-Roman.afm b/blt3.0/library/AFM/Palatino-Roman.afm
deleted file mode 100644
index c7b7aff..0000000
--- a/blt3.0/library/AFM/Palatino-Roman.afm
+++ /dev/null
@@ -1,446 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Mon Jul  2 22:14:17 1990
-Comment UniqueID 31790
-Comment VMusage 36445 47337
-FontName Palatino-Roman
-FullName Palatino Roman
-FamilyName Palatino
-Weight Roman
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -166 -283 1021 927
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.005
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 692
-XHeight 469
-Ascender 726
-Descender -281
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 278 ; N exclam ; B 81 -5 197 694 ;
-C 34 ; WX 371 ; N quotedbl ; B 52 469 319 709 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 495 684 ;
-C 36 ; WX 500 ; N dollar ; B 30 -116 471 731 ;
-C 37 ; WX 840 ; N percent ; B 39 -20 802 709 ;
-C 38 ; WX 778 ; N ampersand ; B 43 -20 753 689 ;
-C 39 ; WX 278 ; N quoteright ; B 45 446 233 709 ;
-C 40 ; WX 333 ; N parenleft ; B 60 -215 301 726 ;
-C 41 ; WX 333 ; N parenright ; B 32 -215 273 726 ;
-C 42 ; WX 389 ; N asterisk ; B 32 342 359 689 ;
-C 43 ; WX 606 ; N plus ; B 51 7 555 512 ;
-C 44 ; WX 250 ; N comma ; B 16 -155 218 123 ;
-C 45 ; WX 333 ; N hyphen ; B 17 215 312 287 ;
-C 46 ; WX 250 ; N period ; B 67 -5 183 111 ;
-C 47 ; WX 606 ; N slash ; B 87 -119 519 726 ;
-C 48 ; WX 500 ; N zero ; B 29 -20 465 689 ;
-C 49 ; WX 500 ; N one ; B 60 -3 418 694 ;
-C 50 ; WX 500 ; N two ; B 16 -3 468 689 ;
-C 51 ; WX 500 ; N three ; B 15 -20 462 689 ;
-C 52 ; WX 500 ; N four ; B 2 -3 472 694 ;
-C 53 ; WX 500 ; N five ; B 13 -20 459 689 ;
-C 54 ; WX 500 ; N six ; B 32 -20 468 689 ;
-C 55 ; WX 500 ; N seven ; B 44 -3 497 689 ;
-C 56 ; WX 500 ; N eight ; B 30 -20 464 689 ;
-C 57 ; WX 500 ; N nine ; B 20 -20 457 689 ;
-C 58 ; WX 250 ; N colon ; B 66 -5 182 456 ;
-C 59 ; WX 250 ; N semicolon ; B 16 -153 218 456 ;
-C 60 ; WX 606 ; N less ; B 57 0 558 522 ;
-C 61 ; WX 606 ; N equal ; B 51 136 555 386 ;
-C 62 ; WX 606 ; N greater ; B 48 0 549 522 ;
-C 63 ; WX 444 ; N question ; B 43 -5 395 694 ;
-C 64 ; WX 747 ; N at ; B 24 -20 724 694 ;
-C 65 ; WX 778 ; N A ; B 15 -3 756 700 ;
-C 66 ; WX 611 ; N B ; B 26 -3 576 692 ;
-C 67 ; WX 709 ; N C ; B 22 -20 670 709 ;
-C 68 ; WX 774 ; N D ; B 22 -3 751 692 ;
-C 69 ; WX 611 ; N E ; B 22 -3 572 692 ;
-C 70 ; WX 556 ; N F ; B 22 -3 536 692 ;
-C 71 ; WX 763 ; N G ; B 22 -20 728 709 ;
-C 72 ; WX 832 ; N H ; B 22 -3 810 692 ;
-C 73 ; WX 337 ; N I ; B 22 -3 315 692 ;
-C 74 ; WX 333 ; N J ; B -15 -194 311 692 ;
-C 75 ; WX 726 ; N K ; B 22 -3 719 692 ;
-C 76 ; WX 611 ; N L ; B 22 -3 586 692 ;
-C 77 ; WX 946 ; N M ; B 16 -13 926 692 ;
-C 78 ; WX 831 ; N N ; B 17 -20 813 692 ;
-C 79 ; WX 786 ; N O ; B 22 -20 764 709 ;
-C 80 ; WX 604 ; N P ; B 22 -3 580 692 ;
-C 81 ; WX 786 ; N Q ; B 22 -176 764 709 ;
-C 82 ; WX 668 ; N R ; B 22 -3 669 692 ;
-C 83 ; WX 525 ; N S ; B 24 -20 503 709 ;
-C 84 ; WX 613 ; N T ; B 18 -3 595 692 ;
-C 85 ; WX 778 ; N U ; B 12 -20 759 692 ;
-C 86 ; WX 722 ; N V ; B 8 -9 706 692 ;
-C 87 ; WX 1000 ; N W ; B 8 -9 984 700 ;
-C 88 ; WX 667 ; N X ; B 14 -3 648 700 ;
-C 89 ; WX 667 ; N Y ; B 9 -3 654 704 ;
-C 90 ; WX 667 ; N Z ; B 15 -3 638 692 ;
-C 91 ; WX 333 ; N bracketleft ; B 79 -184 288 726 ;
-C 92 ; WX 606 ; N backslash ; B 81 0 512 726 ;
-C 93 ; WX 333 ; N bracketright ; B 45 -184 254 726 ;
-C 94 ; WX 606 ; N asciicircum ; B 51 283 554 689 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 278 ; N quoteleft ; B 45 446 233 709 ;
-C 97 ; WX 500 ; N a ; B 32 -12 471 469 ;
-C 98 ; WX 553 ; N b ; B -15 -12 508 726 ;
-C 99 ; WX 444 ; N c ; B 26 -20 413 469 ;
-C 100 ; WX 611 ; N d ; B 35 -12 579 726 ;
-C 101 ; WX 479 ; N e ; B 26 -20 448 469 ;
-C 102 ; WX 333 ; N f ; B 23 -3 341 728 ; L i fi ; L l fl ;
-C 103 ; WX 556 ; N g ; B 32 -283 544 469 ;
-C 104 ; WX 582 ; N h ; B 6 -3 572 726 ;
-C 105 ; WX 291 ; N i ; B 21 -3 271 687 ;
-C 106 ; WX 234 ; N j ; B -40 -283 167 688 ;
-C 107 ; WX 556 ; N k ; B 21 -12 549 726 ;
-C 108 ; WX 291 ; N l ; B 21 -3 271 726 ;
-C 109 ; WX 883 ; N m ; B 16 -3 869 469 ;
-C 110 ; WX 582 ; N n ; B 6 -3 572 469 ;
-C 111 ; WX 546 ; N o ; B 32 -20 514 469 ;
-C 112 ; WX 601 ; N p ; B 8 -281 554 469 ;
-C 113 ; WX 560 ; N q ; B 35 -281 560 469 ;
-C 114 ; WX 395 ; N r ; B 21 -3 374 469 ;
-C 115 ; WX 424 ; N s ; B 30 -20 391 469 ;
-C 116 ; WX 326 ; N t ; B 22 -12 319 621 ;
-C 117 ; WX 603 ; N u ; B 18 -12 581 469 ;
-C 118 ; WX 565 ; N v ; B 6 -7 539 459 ;
-C 119 ; WX 834 ; N w ; B 6 -7 808 469 ;
-C 120 ; WX 516 ; N x ; B 20 -3 496 469 ;
-C 121 ; WX 556 ; N y ; B 12 -283 544 459 ;
-C 122 ; WX 500 ; N z ; B 16 -3 466 462 ;
-C 123 ; WX 333 ; N braceleft ; B 58 -175 289 726 ;
-C 124 ; WX 606 ; N bar ; B 275 0 331 726 ;
-C 125 ; WX 333 ; N braceright ; B 44 -175 275 726 ;
-C 126 ; WX 606 ; N asciitilde ; B 51 176 555 347 ;
-C 161 ; WX 278 ; N exclamdown ; B 81 -225 197 469 ;
-C 162 ; WX 500 ; N cent ; B 61 -101 448 562 ;
-C 163 ; WX 500 ; N sterling ; B 12 -13 478 694 ;
-C 164 ; WX 167 ; N fraction ; B -166 0 337 689 ;
-C 165 ; WX 500 ; N yen ; B 5 -3 496 701 ;
-C 166 ; WX 500 ; N florin ; B 0 -262 473 706 ;
-C 167 ; WX 500 ; N section ; B 26 -219 465 709 ;
-C 168 ; WX 500 ; N currency ; B 30 96 470 531 ;
-C 169 ; WX 208 ; N quotesingle ; B 61 469 147 709 ;
-C 170 ; WX 500 ; N quotedblleft ; B 51 446 449 709 ;
-C 171 ; WX 500 ; N guillemotleft ; B 50 71 450 428 ;
-C 172 ; WX 331 ; N guilsinglleft ; B 66 71 265 428 ;
-C 173 ; WX 331 ; N guilsinglright ; B 66 71 265 428 ;
-C 174 ; WX 605 ; N fi ; B 23 -3 587 728 ;
-C 175 ; WX 608 ; N fl ; B 23 -3 590 728 ;
-C 177 ; WX 500 ; N endash ; B 0 219 500 277 ;
-C 178 ; WX 500 ; N dagger ; B 34 -5 466 694 ;
-C 179 ; WX 500 ; N daggerdbl ; B 34 -249 466 694 ;
-C 180 ; WX 250 ; N periodcentered ; B 67 203 183 319 ;
-C 182 ; WX 628 ; N paragraph ; B 39 -150 589 694 ;
-C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ;
-C 184 ; WX 278 ; N quotesinglbase ; B 22 -153 210 110 ;
-C 185 ; WX 500 ; N quotedblbase ; B 51 -153 449 110 ;
-C 186 ; WX 500 ; N quotedblright ; B 51 446 449 709 ;
-C 187 ; WX 500 ; N guillemotright ; B 50 71 450 428 ;
-C 188 ; WX 1000 ; N ellipsis ; B 109 -5 891 111 ;
-C 189 ; WX 1144 ; N perthousand ; B 123 -20 1021 709 ;
-C 191 ; WX 444 ; N questiondown ; B 43 -231 395 469 ;
-C 193 ; WX 333 ; N grave ; B 31 506 255 677 ;
-C 194 ; WX 333 ; N acute ; B 78 506 302 677 ;
-C 195 ; WX 333 ; N circumflex ; B 11 510 323 677 ;
-C 196 ; WX 333 ; N tilde ; B 2 535 332 640 ;
-C 197 ; WX 333 ; N macron ; B 11 538 323 591 ;
-C 198 ; WX 333 ; N breve ; B 26 506 308 664 ;
-C 199 ; WX 250 ; N dotaccent ; B 75 537 175 637 ;
-C 200 ; WX 333 ; N dieresis ; B 17 537 316 637 ;
-C 202 ; WX 333 ; N ring ; B 67 496 267 696 ;
-C 203 ; WX 333 ; N cedilla ; B 96 -225 304 -10 ;
-C 205 ; WX 380 ; N hungarumlaut ; B 3 506 377 687 ;
-C 206 ; WX 313 ; N ogonek ; B 68 -165 245 -20 ;
-C 207 ; WX 333 ; N caron ; B 11 510 323 677 ;
-C 208 ; WX 1000 ; N emdash ; B 0 219 1000 277 ;
-C 225 ; WX 944 ; N AE ; B -10 -3 908 692 ;
-C 227 ; WX 333 ; N ordfeminine ; B 24 422 310 709 ;
-C 232 ; WX 611 ; N Lslash ; B 6 -3 586 692 ;
-C 233 ; WX 833 ; N Oslash ; B 30 -20 797 709 ;
-C 234 ; WX 998 ; N OE ; B 22 -20 962 709 ;
-C 235 ; WX 333 ; N ordmasculine ; B 10 416 323 709 ;
-C 241 ; WX 758 ; N ae ; B 30 -20 732 469 ;
-C 245 ; WX 287 ; N dotlessi ; B 21 -3 271 469 ;
-C 248 ; WX 291 ; N lslash ; B -14 -3 306 726 ;
-C 249 ; WX 556 ; N oslash ; B 16 -23 530 474 ;
-C 250 ; WX 827 ; N oe ; B 32 -20 800 469 ;
-C 251 ; WX 556 ; N germandbls ; B 23 -9 519 731 ;
-C -1 ; WX 667 ; N Zcaron ; B 15 -3 638 908 ;
-C -1 ; WX 444 ; N ccedilla ; B 26 -225 413 469 ;
-C -1 ; WX 556 ; N ydieresis ; B 12 -283 544 657 ;
-C -1 ; WX 500 ; N atilde ; B 32 -12 471 652 ;
-C -1 ; WX 287 ; N icircumflex ; B -12 -3 300 697 ;
-C -1 ; WX 300 ; N threesuperior ; B 1 266 299 689 ;
-C -1 ; WX 479 ; N ecircumflex ; B 26 -20 448 697 ;
-C -1 ; WX 601 ; N thorn ; B -2 -281 544 726 ;
-C -1 ; WX 479 ; N egrave ; B 26 -20 448 697 ;
-C -1 ; WX 300 ; N twosuperior ; B 0 273 301 689 ;
-C -1 ; WX 479 ; N eacute ; B 26 -20 448 697 ;
-C -1 ; WX 546 ; N otilde ; B 32 -20 514 652 ;
-C -1 ; WX 778 ; N Aacute ; B 15 -3 756 908 ;
-C -1 ; WX 546 ; N ocircumflex ; B 32 -20 514 697 ;
-C -1 ; WX 556 ; N yacute ; B 12 -283 544 697 ;
-C -1 ; WX 603 ; N udieresis ; B 18 -12 581 657 ;
-C -1 ; WX 750 ; N threequarters ; B 15 -3 735 689 ;
-C -1 ; WX 500 ; N acircumflex ; B 32 -12 471 697 ;
-C -1 ; WX 774 ; N Eth ; B 14 -3 751 692 ;
-C -1 ; WX 479 ; N edieresis ; B 26 -20 448 657 ;
-C -1 ; WX 603 ; N ugrave ; B 18 -12 581 697 ;
-C -1 ; WX 979 ; N trademark ; B 40 285 939 689 ;
-C -1 ; WX 546 ; N ograve ; B 32 -20 514 697 ;
-C -1 ; WX 424 ; N scaron ; B 30 -20 391 685 ;
-C -1 ; WX 337 ; N Idieresis ; B 19 -3 318 868 ;
-C -1 ; WX 603 ; N uacute ; B 18 -12 581 697 ;
-C -1 ; WX 500 ; N agrave ; B 32 -12 471 697 ;
-C -1 ; WX 582 ; N ntilde ; B 6 -3 572 652 ;
-C -1 ; WX 500 ; N aring ; B 32 -12 471 716 ;
-C -1 ; WX 500 ; N zcaron ; B 16 -3 466 685 ;
-C -1 ; WX 337 ; N Icircumflex ; B 13 -3 325 908 ;
-C -1 ; WX 831 ; N Ntilde ; B 17 -20 813 871 ;
-C -1 ; WX 603 ; N ucircumflex ; B 18 -12 581 697 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 22 -3 572 908 ;
-C -1 ; WX 337 ; N Iacute ; B 22 -3 315 908 ;
-C -1 ; WX 709 ; N Ccedilla ; B 22 -225 670 709 ;
-C -1 ; WX 786 ; N Odieresis ; B 22 -20 764 868 ;
-C -1 ; WX 525 ; N Scaron ; B 24 -20 503 908 ;
-C -1 ; WX 611 ; N Edieresis ; B 22 -3 572 868 ;
-C -1 ; WX 337 ; N Igrave ; B 22 -3 315 908 ;
-C -1 ; WX 500 ; N adieresis ; B 32 -12 471 657 ;
-C -1 ; WX 786 ; N Ograve ; B 22 -20 764 908 ;
-C -1 ; WX 611 ; N Egrave ; B 22 -3 572 908 ;
-C -1 ; WX 667 ; N Ydieresis ; B 9 -3 654 868 ;
-C -1 ; WX 747 ; N registered ; B 11 -18 736 706 ;
-C -1 ; WX 786 ; N Otilde ; B 22 -20 764 883 ;
-C -1 ; WX 750 ; N onequarter ; B 30 -3 727 692 ;
-C -1 ; WX 778 ; N Ugrave ; B 12 -20 759 908 ;
-C -1 ; WX 778 ; N Ucircumflex ; B 12 -20 759 908 ;
-C -1 ; WX 604 ; N Thorn ; B 32 -3 574 692 ;
-C -1 ; WX 606 ; N divide ; B 51 10 555 512 ;
-C -1 ; WX 778 ; N Atilde ; B 15 -3 756 871 ;
-C -1 ; WX 778 ; N Uacute ; B 12 -20 759 908 ;
-C -1 ; WX 786 ; N Ocircumflex ; B 22 -20 764 908 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 120 551 386 ;
-C -1 ; WX 778 ; N Aring ; B 15 -3 756 927 ;
-C -1 ; WX 287 ; N idieresis ; B -6 -3 293 657 ;
-C -1 ; WX 287 ; N iacute ; B 21 -3 279 697 ;
-C -1 ; WX 500 ; N aacute ; B 32 -12 471 697 ;
-C -1 ; WX 606 ; N plusminus ; B 51 0 555 512 ;
-C -1 ; WX 606 ; N multiply ; B 83 36 523 474 ;
-C -1 ; WX 778 ; N Udieresis ; B 12 -20 759 868 ;
-C -1 ; WX 606 ; N minus ; B 51 233 555 289 ;
-C -1 ; WX 300 ; N onesuperior ; B 31 273 269 692 ;
-C -1 ; WX 611 ; N Eacute ; B 22 -3 572 908 ;
-C -1 ; WX 778 ; N Acircumflex ; B 15 -3 756 908 ;
-C -1 ; WX 747 ; N copyright ; B 11 -18 736 706 ;
-C -1 ; WX 778 ; N Agrave ; B 15 -3 756 908 ;
-C -1 ; WX 546 ; N odieresis ; B 32 -20 514 657 ;
-C -1 ; WX 546 ; N oacute ; B 32 -20 514 697 ;
-C -1 ; WX 400 ; N degree ; B 50 389 350 689 ;
-C -1 ; WX 287 ; N igrave ; B 8 -3 271 697 ;
-C -1 ; WX 603 ; N mu ; B 18 -236 581 469 ;
-C -1 ; WX 786 ; N Oacute ; B 22 -20 764 908 ;
-C -1 ; WX 546 ; N eth ; B 32 -20 504 728 ;
-C -1 ; WX 778 ; N Adieresis ; B 15 -3 756 868 ;
-C -1 ; WX 667 ; N Yacute ; B 9 -3 654 908 ;
-C -1 ; WX 606 ; N brokenbar ; B 275 0 331 726 ;
-C -1 ; WX 750 ; N onehalf ; B 15 -3 735 692 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 111
-
-KPX A y -74
-KPX A w -74
-KPX A v -92
-KPX A space -55
-KPX A quoteright -74
-KPX A Y -111
-KPX A W -74
-KPX A V -111
-KPX A T -74
-
-KPX F period -92
-KPX F comma -92
-KPX F A -74
-
-KPX L y -55
-KPX L space -37
-KPX L quoteright -74
-KPX L Y -92
-KPX L W -74
-KPX L V -92
-KPX L T -74
-
-KPX P space -18
-KPX P period -129
-KPX P comma -129
-KPX P A -92
-
-KPX R y -37
-KPX R Y -37
-KPX R W -37
-KPX R V -55
-KPX R T -37
-
-KPX T y -90
-KPX T w -90
-KPX T u -90
-KPX T semicolon -55
-KPX T s -90
-KPX T r -90
-KPX T period -74
-KPX T o -92
-KPX T i -55
-KPX T hyphen -55
-KPX T e -92
-KPX T comma -74
-KPX T colon -55
-KPX T c -111
-KPX T a -92
-KPX T O -18
-KPX T A -74
-
-KPX V y -92
-KPX V u -92
-KPX V semicolon -55
-KPX V r -92
-KPX V period -129
-KPX V o -111
-KPX V i -55
-KPX V hyphen -74
-KPX V e -111
-KPX V comma -129
-KPX V colon -55
-KPX V a -92
-KPX V A -111
-
-KPX W y -50
-KPX W u -50
-KPX W semicolon -18
-KPX W r -74
-KPX W period -92
-KPX W o -92
-KPX W i -55
-KPX W hyphen -55
-KPX W e -92
-KPX W comma -92
-KPX W colon -18
-KPX W a -92
-KPX W A -92
-
-KPX Y v -90
-KPX Y u -90
-KPX Y space -18
-KPX Y semicolon -74
-KPX Y q -90
-KPX Y period -111
-KPX Y p -111
-KPX Y o -92
-KPX Y i -55
-KPX Y hyphen -92
-KPX Y e -92
-KPX Y comma -111
-KPX Y colon -74
-KPX Y a -92
-KPX Y A -92
-
-KPX f quoteright 55
-KPX f f -18
-
-KPX one one -55
-
-KPX quoteleft quoteleft -37
-
-KPX quoteright quoteright -37
-
-KPX r u -8
-KPX r quoteright 74
-KPX r q -18
-KPX r period -74
-KPX r o -18
-KPX r hyphen -18
-KPX r h -18
-KPX r g -18
-KPX r e -18
-KPX r d -18
-KPX r comma -74
-KPX r c -18
-
-KPX space Y -18
-KPX space A -37
-
-KPX v period -111
-KPX v comma -111
-
-KPX w period -92
-KPX w comma -92
-
-KPX y period -111
-KPX y comma -111
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 229 231 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 223 231 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 223 231 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 215 231 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 223 231 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 223 231 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 188 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 231 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 231 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 231 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 231 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 2 231 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 2 231 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 2 231 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 2 231 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 249 231 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 227 231 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 227 231 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 227 231 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 227 231 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 227 243 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 96 231 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 255 231 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 247 231 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 223 231 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 223 231 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 203 231 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 191 231 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 231 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 20 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 72 20 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 72 20 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 60 20 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 72 20 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 72 12 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 97 20 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 85 20 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 73 20 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 73 20 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -23 20 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -23 20 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -23 20 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -23 20 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 113 12 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 107 20 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 107 20 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 107 20 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 95 20 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 107 12 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 46 8 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 159 20 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 135 20 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 135 20 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 20 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 144 20 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 20 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 8 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Symbol.afm b/blt3.0/library/AFM/Symbol.afm
deleted file mode 100644
index 6f07472..0000000
--- a/blt3.0/library/AFM/Symbol.afm
+++ /dev/null
@@ -1,210 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Wed Jan 17 21:48:26 1990
-Comment UniqueID 27004
-Comment VMusage 28489 37622
-FontName Symbol
-FullName Symbol
-FamilyName Symbol
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -180 -293 1090 1010
-UnderlinePosition -98
-UnderlineThickness 54
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All rights reserved.
-EncodingScheme FontSpecific
-StartCharMetrics 189
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ;
-C 34 ; WX 713 ; N universal ; B 31 0 681 705 ;
-C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ;
-C 36 ; WX 549 ; N existential ; B 25 0 478 707 ;
-C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ;
-C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ;
-C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ;
-C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ;
-C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ;
-C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ;
-C 43 ; WX 549 ; N plus ; B 10 0 539 533 ;
-C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ;
-C 45 ; WX 549 ; N minus ; B 11 233 535 288 ;
-C 46 ; WX 250 ; N period ; B 69 -17 181 95 ;
-C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ;
-C 48 ; WX 500 ; N zero ; B 23 -17 471 685 ;
-C 49 ; WX 500 ; N one ; B 117 0 390 673 ;
-C 50 ; WX 500 ; N two ; B 25 0 475 686 ;
-C 51 ; WX 500 ; N three ; B 39 -17 435 685 ;
-C 52 ; WX 500 ; N four ; B 16 0 469 685 ;
-C 53 ; WX 500 ; N five ; B 29 -17 443 685 ;
-C 54 ; WX 500 ; N six ; B 36 -17 467 685 ;
-C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ;
-C 56 ; WX 500 ; N eight ; B 54 -18 440 685 ;
-C 57 ; WX 500 ; N nine ; B 31 -18 460 685 ;
-C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ;
-C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ;
-C 60 ; WX 549 ; N less ; B 26 0 523 522 ;
-C 61 ; WX 549 ; N equal ; B 11 141 537 390 ;
-C 62 ; WX 549 ; N greater ; B 26 0 523 522 ;
-C 63 ; WX 444 ; N question ; B 70 -17 412 686 ;
-C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ;
-C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ;
-C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ;
-C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ;
-C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ;
-C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ;
-C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ;
-C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ;
-C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ;
-C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ;
-C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ;
-C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ;
-C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ;
-C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ;
-C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ;
-C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ;
-C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ;
-C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ;
-C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ;
-C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ;
-C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ;
-C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ;
-C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ;
-C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ;
-C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ;
-C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ;
-C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ;
-C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ;
-C 92 ; WX 863 ; N therefore ; B 163 0 701 478 ;
-C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ;
-C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ;
-C 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ;
-C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ;
-C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ;
-C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ;
-C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ;
-C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ;
-C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ;
-C 102 ; WX 521 ; N phi ; B 27 -224 490 671 ;
-C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ;
-C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ;
-C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ;
-C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ;
-C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ;
-C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ;
-C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ;
-C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ;
-C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ;
-C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ;
-C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ;
-C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ;
-C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ;
-C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ;
-C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ;
-C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ;
-C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ;
-C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ;
-C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ;
-C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ;
-C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ;
-C 124 ; WX 200 ; N bar ; B 65 -177 135 673 ;
-C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ;
-C 126 ; WX 549 ; N similar ; B 17 203 529 307 ;
-C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ;
-C 162 ; WX 247 ; N minute ; B 27 459 228 735 ;
-C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ;
-C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ;
-C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ;
-C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ;
-C 167 ; WX 753 ; N club ; B 86 -26 660 533 ;
-C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ;
-C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ;
-C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ;
-C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ;
-C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ;
-C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ;
-C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ;
-C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ;
-C 176 ; WX 400 ; N degree ; B 50 385 350 685 ;
-C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ;
-C 178 ; WX 411 ; N second ; B 20 459 413 737 ;
-C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ;
-C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ;
-C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ;
-C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ;
-C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ;
-C 184 ; WX 549 ; N divide ; B 10 71 536 456 ;
-C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ;
-C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ;
-C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ;
-C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ;
-C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ;
-C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ;
-C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ;
-C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ;
-C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ;
-C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ;
-C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ;
-C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ;
-C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ;
-C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ;
-C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ;
-C 200 ; WX 768 ; N union ; B 40 -17 732 492 ;
-C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ;
-C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ;
-C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ;
-C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ;
-C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ;
-C 206 ; WX 713 ; N element ; B 45 0 505 468 ;
-C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ;
-C 208 ; WX 768 ; N angle ; B 26 0 738 673 ;
-C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ;
-C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ;
-C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ;
-C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ;
-C 213 ; WX 823 ; N product ; B 25 -101 803 751 ;
-C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ;
-C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ;
-C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ;
-C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ;
-C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ;
-C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ;
-C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ;
-C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ;
-C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ;
-C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ;
-C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ;
-C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ;
-C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ;
-C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ;
-C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ;
-C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ;
-C 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ;
-C 231 ; WX 384 ; N parenleftex ; B 40 -85 92 925 ;
-C 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 926 ;
-C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 341 926 ;
-C 234 ; WX 384 ; N bracketleftex ; B 0 -79 55 925 ;
-C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 340 926 ;
-C 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 926 ;
-C 237 ; WX 494 ; N braceleftmid ; B 14 -85 255 935 ;
-C 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ;
-C 239 ; WX 494 ; N braceex ; B 201 -80 255 935 ;
-C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ;
-C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ;
-C 243 ; WX 686 ; N integraltp ; B 332 -83 715 921 ;
-C 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ;
-C 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ;
-C 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ;
-C 247 ; WX 384 ; N parenrightex ; B 398 -85 450 925 ;
-C 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 926 ;
-C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 360 926 ;
-C 250 ; WX 384 ; N bracketrightex ; B 305 -79 360 925 ;
-C 251 ; WX 384 ; N bracketrightbt ; B 20 -80 360 926 ;
-C 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 926 ;
-C 253 ; WX 494 ; N bracerightmid ; B 201 -85 442 935 ;
-C 254 ; WX 494 ; N bracerightbt ; B 17 -70 255 926 ;
-C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ;
-EndCharMetrics
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Times-Bold.afm b/blt3.0/library/AFM/Times-Bold.afm
deleted file mode 100644
index 6ee7ef6..0000000
--- a/blt3.0/library/AFM/Times-Bold.afm
+++ /dev/null
@@ -1,649 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 12:17:14 1990
-Comment UniqueID 28417
-Comment VMusage 30458 37350
-FontName Times-Bold
-FullName Times Bold
-FamilyName Times
-Weight Bold
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -168 -218 1000 935
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 676
-XHeight 461
-Ascender 676
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ;
-C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ;
-C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ;
-C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ;
-C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ;
-C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ;
-C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ;
-C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ;
-C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ;
-C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ;
-C 43 ; WX 570 ; N plus ; B 33 0 537 506 ;
-C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ;
-C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ;
-C 46 ; WX 250 ; N period ; B 41 -13 210 156 ;
-C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ;
-C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ;
-C 49 ; WX 500 ; N one ; B 65 0 442 688 ;
-C 50 ; WX 500 ; N two ; B 17 0 478 688 ;
-C 51 ; WX 500 ; N three ; B 16 -14 468 688 ;
-C 52 ; WX 500 ; N four ; B 19 0 475 688 ;
-C 53 ; WX 500 ; N five ; B 22 -8 470 676 ;
-C 54 ; WX 500 ; N six ; B 28 -13 475 688 ;
-C 55 ; WX 500 ; N seven ; B 17 0 477 676 ;
-C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ;
-C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ;
-C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ;
-C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ;
-C 60 ; WX 570 ; N less ; B 31 -8 539 514 ;
-C 61 ; WX 570 ; N equal ; B 33 107 537 399 ;
-C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ;
-C 63 ; WX 500 ; N question ; B 57 -13 445 689 ;
-C 64 ; WX 930 ; N at ; B 108 -19 822 691 ;
-C 65 ; WX 722 ; N A ; B 9 0 689 690 ;
-C 66 ; WX 667 ; N B ; B 16 0 619 676 ;
-C 67 ; WX 722 ; N C ; B 49 -19 687 691 ;
-C 68 ; WX 722 ; N D ; B 14 0 690 676 ;
-C 69 ; WX 667 ; N E ; B 16 0 641 676 ;
-C 70 ; WX 611 ; N F ; B 16 0 583 676 ;
-C 71 ; WX 778 ; N G ; B 37 -19 755 691 ;
-C 72 ; WX 778 ; N H ; B 21 0 759 676 ;
-C 73 ; WX 389 ; N I ; B 20 0 370 676 ;
-C 74 ; WX 500 ; N J ; B 3 -96 479 676 ;
-C 75 ; WX 778 ; N K ; B 30 0 769 676 ;
-C 76 ; WX 667 ; N L ; B 19 0 638 676 ;
-C 77 ; WX 944 ; N M ; B 14 0 921 676 ;
-C 78 ; WX 722 ; N N ; B 16 -18 701 676 ;
-C 79 ; WX 778 ; N O ; B 35 -19 743 691 ;
-C 80 ; WX 611 ; N P ; B 16 0 600 676 ;
-C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ;
-C 82 ; WX 722 ; N R ; B 26 0 715 676 ;
-C 83 ; WX 556 ; N S ; B 35 -19 513 692 ;
-C 84 ; WX 667 ; N T ; B 31 0 636 676 ;
-C 85 ; WX 722 ; N U ; B 16 -19 701 676 ;
-C 86 ; WX 722 ; N V ; B 16 -18 701 676 ;
-C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ;
-C 88 ; WX 722 ; N X ; B 16 0 699 676 ;
-C 89 ; WX 722 ; N Y ; B 15 0 699 676 ;
-C 90 ; WX 667 ; N Z ; B 28 0 634 676 ;
-C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ;
-C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ;
-C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ;
-C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ;
-C 97 ; WX 500 ; N a ; B 25 -14 488 473 ;
-C 98 ; WX 556 ; N b ; B 17 -14 521 676 ;
-C 99 ; WX 444 ; N c ; B 25 -14 430 473 ;
-C 100 ; WX 556 ; N d ; B 25 -14 534 676 ;
-C 101 ; WX 444 ; N e ; B 25 -14 426 473 ;
-C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 28 -206 483 473 ;
-C 104 ; WX 556 ; N h ; B 16 0 534 676 ;
-C 105 ; WX 278 ; N i ; B 16 0 255 691 ;
-C 106 ; WX 333 ; N j ; B -57 -203 263 691 ;
-C 107 ; WX 556 ; N k ; B 22 0 543 676 ;
-C 108 ; WX 278 ; N l ; B 16 0 255 676 ;
-C 109 ; WX 833 ; N m ; B 16 0 814 473 ;
-C 110 ; WX 556 ; N n ; B 21 0 539 473 ;
-C 111 ; WX 500 ; N o ; B 25 -14 476 473 ;
-C 112 ; WX 556 ; N p ; B 19 -205 524 473 ;
-C 113 ; WX 556 ; N q ; B 34 -205 536 473 ;
-C 114 ; WX 444 ; N r ; B 29 0 434 473 ;
-C 115 ; WX 389 ; N s ; B 25 -14 361 473 ;
-C 116 ; WX 333 ; N t ; B 20 -12 332 630 ;
-C 117 ; WX 556 ; N u ; B 16 -14 537 461 ;
-C 118 ; WX 500 ; N v ; B 21 -14 485 461 ;
-C 119 ; WX 722 ; N w ; B 23 -14 707 461 ;
-C 120 ; WX 500 ; N x ; B 12 0 484 461 ;
-C 121 ; WX 500 ; N y ; B 16 -205 480 461 ;
-C 122 ; WX 444 ; N z ; B 21 0 420 461 ;
-C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ;
-C 124 ; WX 220 ; N bar ; B 66 -19 154 691 ;
-C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ;
-C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ;
-C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ;
-C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ;
-C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ;
-C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ;
-C 165 ; WX 500 ; N yen ; B -64 0 547 676 ;
-C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ;
-C 167 ; WX 500 ; N section ; B 57 -132 443 691 ;
-C 168 ; WX 500 ; N currency ; B -26 61 526 613 ;
-C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ;
-C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ;
-C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ;
-C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ;
-C 174 ; WX 556 ; N fi ; B 14 0 536 691 ;
-C 175 ; WX 556 ; N fl ; B 14 0 536 691 ;
-C 177 ; WX 500 ; N endash ; B 0 181 500 271 ;
-C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ;
-C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ;
-C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ;
-C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ;
-C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ;
-C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ;
-C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ;
-C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ;
-C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ;
-C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ;
-C 193 ; WX 333 ; N grave ; B 8 528 246 713 ;
-C 194 ; WX 333 ; N acute ; B 86 528 324 713 ;
-C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ;
-C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ;
-C 197 ; WX 333 ; N macron ; B 1 565 331 637 ;
-C 198 ; WX 333 ; N breve ; B 15 528 318 691 ;
-C 199 ; WX 333 ; N dotaccent ; B 103 537 230 667 ;
-C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ;
-C 202 ; WX 333 ; N ring ; B 60 527 273 740 ;
-C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ;
-C 206 ; WX 333 ; N ogonek ; B 90 -173 319 44 ;
-C 207 ; WX 333 ; N caron ; B -2 528 335 704 ;
-C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ;
-C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ;
-C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ;
-C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ;
-C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ;
-C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ;
-C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ;
-C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ;
-C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ;
-C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ;
-C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ;
-C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ;
-C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ;
-C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ;
-C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ;
-C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ;
-C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ;
-C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ;
-C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ;
-C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ;
-C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ;
-C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ;
-C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ;
-C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ;
-C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ;
-C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ;
-C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ;
-C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ;
-C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ;
-C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ;
-C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ;
-C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ;
-C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ;
-C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ;
-C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ;
-C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ;
-C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ;
-C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ;
-C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ;
-C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ;
-C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ;
-C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ;
-C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ;
-C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ;
-C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ;
-C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ;
-C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ;
-C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ;
-C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ;
-C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ;
-C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ;
-C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ;
-C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ;
-C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ;
-C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ;
-C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ;
-C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ;
-C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ;
-C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ;
-C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ;
-C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ;
-C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ;
-C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ;
-C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ;
-C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ;
-C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ;
-C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ;
-C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ;
-C -1 ; WX 278 ; N idieresis ; B -36 0 301 667 ;
-C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ;
-C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ;
-C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ;
-C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ;
-C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ;
-C -1 ; WX 570 ; N minus ; B 33 209 537 297 ;
-C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ;
-C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ;
-C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ;
-C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ;
-C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ;
-C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ;
-C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ;
-C -1 ; WX 400 ; N degree ; B 57 402 343 688 ;
-C -1 ; WX 278 ; N igrave ; B -26 0 255 713 ;
-C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ;
-C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ;
-C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ;
-C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ;
-C -1 ; WX 722 ; N Yacute ; B 15 0 699 928 ;
-C -1 ; WX 220 ; N brokenbar ; B 66 -19 154 691 ;
-C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -74
-KPX A w -90
-KPX A v -100
-KPX A u -50
-KPX A quoteright -74
-KPX A quotedblright 0
-KPX A p -25
-KPX A Y -100
-KPX A W -130
-KPX A V -145
-KPX A U -50
-KPX A T -95
-KPX A Q -45
-KPX A O -45
-KPX A G -55
-KPX A C -55
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -30
-
-KPX D period -20
-KPX D comma 0
-KPX D Y -40
-KPX D W -40
-KPX D V -40
-KPX D A -35
-
-KPX F r 0
-KPX F period -110
-KPX F o -25
-KPX F i 0
-KPX F e -25
-KPX F comma -92
-KPX F a -25
-KPX F A -90
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -15
-KPX J period -20
-KPX J o -15
-KPX J e -15
-KPX J comma 0
-KPX J a -15
-KPX J A -30
-
-KPX K y -45
-KPX K u -15
-KPX K o -25
-KPX K e -25
-KPX K O -30
-
-KPX L y -55
-KPX L quoteright -110
-KPX L quotedblright -20
-KPX L Y -92
-KPX L W -92
-KPX L V -92
-KPX L T -92
-
-KPX N period 0
-KPX N comma 0
-KPX N A -20
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -40
-
-KPX P period -110
-KPX P o -20
-KPX P e -20
-KPX P comma -92
-KPX P a -10
-KPX P A -74
-
-KPX Q period -20
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -35
-KPX R W -35
-KPX R V -55
-KPX R U -30
-KPX R T -40
-KPX R O -30
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -74
-KPX T w -74
-KPX T u -92
-KPX T semicolon -74
-KPX T r -74
-KPX T period -90
-KPX T o -92
-KPX T i -18
-KPX T hyphen -92
-KPX T h 0
-KPX T e -92
-KPX T comma -74
-KPX T colon -74
-KPX T a -92
-KPX T O -18
-KPX T A -90
-
-KPX U period -50
-KPX U comma -50
-KPX U A -60
-
-KPX V u -92
-KPX V semicolon -92
-KPX V period -145
-KPX V o -100
-KPX V i -37
-KPX V hyphen -74
-KPX V e -100
-KPX V comma -129
-KPX V colon -92
-KPX V a -92
-KPX V O -45
-KPX V G -30
-KPX V A -135
-
-KPX W y -60
-KPX W u -50
-KPX W semicolon -55
-KPX W period -92
-KPX W o -75
-KPX W i -18
-KPX W hyphen -37
-KPX W h 0
-KPX W e -65
-KPX W comma -92
-KPX W colon -55
-KPX W a -65
-KPX W O -10
-KPX W A -120
-
-KPX Y u -92
-KPX Y semicolon -92
-KPX Y period -92
-KPX Y o -111
-KPX Y i -37
-KPX Y hyphen -92
-KPX Y e -111
-KPX Y comma -92
-KPX Y colon -92
-KPX Y a -85
-KPX Y O -35
-KPX Y A -110
-
-KPX a y 0
-KPX a w 0
-KPX a v -25
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v -15
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b -10
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k 0
-KPX c h 0
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -55
-KPX comma quotedblright -45
-
-KPX d y 0
-KPX d w -15
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y 0
-KPX e x 0
-KPX e w 0
-KPX e v -15
-KPX e period 0
-KPX e p 0
-KPX e g 0
-KPX e comma 0
-KPX e b 0
-
-KPX f quoteright 55
-KPX f quotedblright 50
-KPX f period -15
-KPX f o -25
-KPX f l 0
-KPX f i -25
-KPX f f 0
-KPX f e 0
-KPX f dotlessi -35
-KPX f comma -15
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period -15
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a 0
-
-KPX h y -15
-
-KPX i v -10
-
-KPX k y -15
-KPX k o -15
-KPX k e -10
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y 0
-KPX o x 0
-KPX o w -10
-KPX o v -10
-KPX o g 0
-
-KPX p y 0
-
-KPX period quoteright -55
-KPX period quotedblright -55
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A -10
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -63
-KPX quoteleft A -10
-
-KPX quoteright v -20
-KPX quoteright t 0
-KPX quoteright space -74
-KPX quoteright s -37
-KPX quoteright r -20
-KPX quoteright quoteright -63
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -20
-
-KPX r y 0
-KPX r v -10
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q -18
-KPX r period -100
-KPX r p -10
-KPX r o -18
-KPX r n -15
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -37
-KPX r g -10
-KPX r e -18
-KPX r d 0
-KPX r comma -92
-KPX r c -18
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -55
-KPX space W -30
-KPX space V -45
-KPX space T -30
-KPX space A -55
-
-KPX v period -70
-KPX v o -10
-KPX v e -10
-KPX v comma -55
-KPX v a -10
-
-KPX w period -70
-KPX w o -10
-KPX w h 0
-KPX w e 0
-KPX w comma -55
-KPX w a 0
-
-KPX x e 0
-
-KPX y period -70
-KPX y o -25
-KPX y e -10
-KPX y comma -55
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 188 210 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 188 210 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 188 210 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 188 210 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 180 195 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 188 210 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 208 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 174 210 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 174 210 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 174 210 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 174 210 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 210 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 210 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 210 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 210 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 210 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 210 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 210 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 210 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 210 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 210 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 210 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 222 210 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 222 210 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 222 210 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 222 210 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 210 215 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 215 210 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 210 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 77 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 77 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 77 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 77 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 77 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 77 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 62 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 62 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 62 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 62 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 105 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 105 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 105 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 105 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Times-BoldItalic.afm b/blt3.0/library/AFM/Times-BoldItalic.afm
deleted file mode 100644
index d329ebb..0000000
--- a/blt3.0/library/AFM/Times-BoldItalic.afm
+++ /dev/null
@@ -1,649 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 13:14:55 1990
-Comment UniqueID 28425
-Comment VMusage 32721 39613
-FontName Times-BoldItalic
-FullName Times Bold Italic
-FamilyName Times
-Weight Bold
-ItalicAngle -15
-IsFixedPitch false
-FontBBox -200 -218 996 921
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.009
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 669
-XHeight 462
-Ascender 699
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ;
-C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ;
-C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ;
-C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ;
-C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ;
-C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ;
-C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ;
-C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ;
-C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ;
-C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ;
-C 43 ; WX 570 ; N plus ; B 33 0 537 506 ;
-C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ;
-C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ;
-C 46 ; WX 250 ; N period ; B -9 -13 139 135 ;
-C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ;
-C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ;
-C 49 ; WX 500 ; N one ; B 5 0 419 683 ;
-C 50 ; WX 500 ; N two ; B -27 0 446 683 ;
-C 51 ; WX 500 ; N three ; B -15 -13 450 683 ;
-C 52 ; WX 500 ; N four ; B -15 0 503 683 ;
-C 53 ; WX 500 ; N five ; B -11 -13 487 669 ;
-C 54 ; WX 500 ; N six ; B 23 -15 509 679 ;
-C 55 ; WX 500 ; N seven ; B 52 0 525 669 ;
-C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ;
-C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ;
-C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ;
-C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ;
-C 60 ; WX 570 ; N less ; B 31 -8 539 514 ;
-C 61 ; WX 570 ; N equal ; B 33 107 537 399 ;
-C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ;
-C 63 ; WX 500 ; N question ; B 79 -13 470 684 ;
-C 64 ; WX 832 ; N at ; B 63 -18 770 685 ;
-C 65 ; WX 667 ; N A ; B -67 0 593 683 ;
-C 66 ; WX 667 ; N B ; B -24 0 624 669 ;
-C 67 ; WX 667 ; N C ; B 32 -18 677 685 ;
-C 68 ; WX 722 ; N D ; B -46 0 685 669 ;
-C 69 ; WX 667 ; N E ; B -27 0 653 669 ;
-C 70 ; WX 667 ; N F ; B -13 0 660 669 ;
-C 71 ; WX 722 ; N G ; B 21 -18 706 685 ;
-C 72 ; WX 778 ; N H ; B -24 0 799 669 ;
-C 73 ; WX 389 ; N I ; B -32 0 406 669 ;
-C 74 ; WX 500 ; N J ; B -46 -99 524 669 ;
-C 75 ; WX 667 ; N K ; B -21 0 702 669 ;
-C 76 ; WX 611 ; N L ; B -22 0 590 669 ;
-C 77 ; WX 889 ; N M ; B -29 -12 917 669 ;
-C 78 ; WX 722 ; N N ; B -27 -15 748 669 ;
-C 79 ; WX 722 ; N O ; B 27 -18 691 685 ;
-C 80 ; WX 611 ; N P ; B -27 0 613 669 ;
-C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ;
-C 82 ; WX 667 ; N R ; B -29 0 623 669 ;
-C 83 ; WX 556 ; N S ; B 2 -18 526 685 ;
-C 84 ; WX 611 ; N T ; B 50 0 650 669 ;
-C 85 ; WX 722 ; N U ; B 67 -18 744 669 ;
-C 86 ; WX 667 ; N V ; B 65 -18 715 669 ;
-C 87 ; WX 889 ; N W ; B 65 -18 940 669 ;
-C 88 ; WX 667 ; N X ; B -24 0 694 669 ;
-C 89 ; WX 611 ; N Y ; B 73 0 659 669 ;
-C 90 ; WX 611 ; N Z ; B -11 0 590 669 ;
-C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ;
-C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ;
-C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ;
-C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ;
-C 97 ; WX 500 ; N a ; B -21 -14 455 462 ;
-C 98 ; WX 500 ; N b ; B -14 -13 444 699 ;
-C 99 ; WX 444 ; N c ; B -5 -13 392 462 ;
-C 100 ; WX 500 ; N d ; B -21 -13 517 699 ;
-C 101 ; WX 444 ; N e ; B 5 -13 398 462 ;
-C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B -52 -203 478 462 ;
-C 104 ; WX 556 ; N h ; B -13 -9 498 699 ;
-C 105 ; WX 278 ; N i ; B 2 -9 263 684 ;
-C 106 ; WX 278 ; N j ; B -189 -207 279 684 ;
-C 107 ; WX 500 ; N k ; B -23 -8 483 699 ;
-C 108 ; WX 278 ; N l ; B 2 -9 290 699 ;
-C 109 ; WX 778 ; N m ; B -14 -9 722 462 ;
-C 110 ; WX 556 ; N n ; B -6 -9 493 462 ;
-C 111 ; WX 500 ; N o ; B -3 -13 441 462 ;
-C 112 ; WX 500 ; N p ; B -120 -205 446 462 ;
-C 113 ; WX 500 ; N q ; B 1 -205 471 462 ;
-C 114 ; WX 389 ; N r ; B -21 0 389 462 ;
-C 115 ; WX 389 ; N s ; B -19 -13 333 462 ;
-C 116 ; WX 278 ; N t ; B -11 -9 281 594 ;
-C 117 ; WX 556 ; N u ; B 15 -9 492 462 ;
-C 118 ; WX 444 ; N v ; B 16 -13 401 462 ;
-C 119 ; WX 667 ; N w ; B 16 -13 614 462 ;
-C 120 ; WX 500 ; N x ; B -46 -13 469 462 ;
-C 121 ; WX 444 ; N y ; B -94 -205 392 462 ;
-C 122 ; WX 389 ; N z ; B -43 -78 368 449 ;
-C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ;
-C 124 ; WX 220 ; N bar ; B 66 -18 154 685 ;
-C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ;
-C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ;
-C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ;
-C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ;
-C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ;
-C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ;
-C 165 ; WX 500 ; N yen ; B 33 0 628 669 ;
-C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ;
-C 167 ; WX 500 ; N section ; B 36 -143 459 685 ;
-C 168 ; WX 500 ; N currency ; B -26 34 526 586 ;
-C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ;
-C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ;
-C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ;
-C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ;
-C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ;
-C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ;
-C 177 ; WX 500 ; N endash ; B -40 178 477 269 ;
-C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ;
-C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ;
-C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ;
-C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ;
-C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ;
-C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ;
-C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ;
-C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ;
-C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ;
-C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ;
-C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ;
-C 193 ; WX 333 ; N grave ; B 85 516 297 697 ;
-C 194 ; WX 333 ; N acute ; B 139 516 379 697 ;
-C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ;
-C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ;
-C 197 ; WX 333 ; N macron ; B 51 553 393 623 ;
-C 198 ; WX 333 ; N breve ; B 71 516 387 678 ;
-C 199 ; WX 333 ; N dotaccent ; B 163 525 293 655 ;
-C 200 ; WX 333 ; N dieresis ; B 55 525 397 655 ;
-C 202 ; WX 333 ; N ring ; B 127 516 340 729 ;
-C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ;
-C 206 ; WX 333 ; N ogonek ; B -40 -173 189 44 ;
-C 207 ; WX 333 ; N caron ; B 79 516 411 690 ;
-C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ;
-C 225 ; WX 944 ; N AE ; B -64 0 918 669 ;
-C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ;
-C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ;
-C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ;
-C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ;
-C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ;
-C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ;
-C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ;
-C 248 ; WX 278 ; N lslash ; B -13 -9 301 699 ;
-C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ;
-C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ;
-C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ;
-C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ;
-C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ;
-C -1 ; WX 444 ; N ydieresis ; B -94 -205 438 655 ;
-C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ;
-C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ;
-C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ;
-C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ;
-C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ;
-C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ;
-C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ;
-C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ;
-C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ;
-C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ;
-C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ;
-C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ;
-C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ;
-C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ;
-C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ;
-C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ;
-C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ;
-C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ;
-C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ;
-C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ;
-C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ;
-C -1 ; WX 389 ; N Idieresis ; B -32 0 445 862 ;
-C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ;
-C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ;
-C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ;
-C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ;
-C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ;
-C -1 ; WX 389 ; N Icircumflex ; B -32 0 420 897 ;
-C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ;
-C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ;
-C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ;
-C -1 ; WX 389 ; N Iacute ; B -32 0 412 904 ;
-C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ;
-C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ;
-C -1 ; WX 556 ; N Scaron ; B 2 -18 526 897 ;
-C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ;
-C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ;
-C -1 ; WX 500 ; N adieresis ; B -21 -14 471 655 ;
-C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ;
-C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ;
-C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ;
-C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ;
-C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ;
-C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ;
-C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ;
-C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ;
-C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ;
-C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ;
-C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ;
-C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ;
-C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ;
-C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ;
-C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ;
-C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ;
-C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ;
-C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ;
-C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ;
-C -1 ; WX 606 ; N minus ; B 51 209 555 297 ;
-C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ;
-C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ;
-C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ;
-C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ;
-C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ;
-C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ;
-C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ;
-C -1 ; WX 400 ; N degree ; B 83 397 369 683 ;
-C -1 ; WX 278 ; N igrave ; B 2 -9 260 697 ;
-C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ;
-C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ;
-C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ;
-C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ;
-C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ;
-C -1 ; WX 220 ; N brokenbar ; B 66 -18 154 685 ;
-C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -74
-KPX A w -74
-KPX A v -74
-KPX A u -30
-KPX A quoteright -74
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -70
-KPX A W -100
-KPX A V -95
-KPX A U -50
-KPX A T -55
-KPX A Q -55
-KPX A O -50
-KPX A G -60
-KPX A C -65
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -25
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -50
-KPX D W -40
-KPX D V -50
-KPX D A -25
-
-KPX F r -50
-KPX F period -129
-KPX F o -70
-KPX F i -40
-KPX F e -100
-KPX F comma -129
-KPX F a -95
-KPX F A -100
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -40
-KPX J period -10
-KPX J o -40
-KPX J e -40
-KPX J comma -10
-KPX J a -40
-KPX J A -25
-
-KPX K y -20
-KPX K u -20
-KPX K o -25
-KPX K e -25
-KPX K O -30
-
-KPX L y -37
-KPX L quoteright -55
-KPX L quotedblright 0
-KPX L Y -37
-KPX L W -37
-KPX L V -37
-KPX L T -18
-
-KPX N period 0
-KPX N comma 0
-KPX N A -30
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -40
-
-KPX P period -129
-KPX P o -55
-KPX P e -50
-KPX P comma -129
-KPX P a -40
-KPX P A -85
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -18
-KPX R W -18
-KPX R V -18
-KPX R U -40
-KPX R T -30
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -37
-KPX T w -37
-KPX T u -37
-KPX T semicolon -74
-KPX T r -37
-KPX T period -92
-KPX T o -95
-KPX T i -37
-KPX T hyphen -92
-KPX T h 0
-KPX T e -92
-KPX T comma -92
-KPX T colon -74
-KPX T a -92
-KPX T O -18
-KPX T A -55
-
-KPX U period 0
-KPX U comma 0
-KPX U A -45
-
-KPX V u -55
-KPX V semicolon -74
-KPX V period -129
-KPX V o -111
-KPX V i -55
-KPX V hyphen -70
-KPX V e -111
-KPX V comma -129
-KPX V colon -74
-KPX V a -111
-KPX V O -30
-KPX V G -10
-KPX V A -85
-
-KPX W y -55
-KPX W u -55
-KPX W semicolon -55
-KPX W period -74
-KPX W o -80
-KPX W i -37
-KPX W hyphen -50
-KPX W h 0
-KPX W e -90
-KPX W comma -74
-KPX W colon -55
-KPX W a -85
-KPX W O -15
-KPX W A -74
-
-KPX Y u -92
-KPX Y semicolon -92
-KPX Y period -74
-KPX Y o -111
-KPX Y i -55
-KPX Y hyphen -92
-KPX Y e -111
-KPX Y comma -92
-KPX Y colon -92
-KPX Y a -92
-KPX Y O -25
-KPX Y A -74
-
-KPX a y 0
-KPX a w 0
-KPX a v 0
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v 0
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b -10
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k -10
-KPX c h -10
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -95
-KPX comma quotedblright -95
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y 0
-KPX e x 0
-KPX e w 0
-KPX e v 0
-KPX e period 0
-KPX e p 0
-KPX e g 0
-KPX e comma 0
-KPX e b -10
-
-KPX f quoteright 55
-KPX f quotedblright 0
-KPX f period -10
-KPX f o -10
-KPX f l 0
-KPX f i 0
-KPX f f -18
-KPX f e -10
-KPX f dotlessi -30
-KPX f comma -10
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period 0
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a 0
-
-KPX h y 0
-
-KPX i v 0
-
-KPX k y 0
-KPX k o -10
-KPX k e -30
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y -10
-KPX o x -10
-KPX o w -25
-KPX o v -15
-KPX o g 0
-
-KPX p y 0
-
-KPX period quoteright -95
-KPX period quotedblright -95
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A 0
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -74
-KPX quoteleft A 0
-
-KPX quoteright v -15
-KPX quoteright t -37
-KPX quoteright space -74
-KPX quoteright s -74
-KPX quoteright r -15
-KPX quoteright quoteright -74
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -15
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q 0
-KPX r period -65
-KPX r p 0
-KPX r o 0
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen 0
-KPX r g 0
-KPX r e 0
-KPX r d 0
-KPX r comma -65
-KPX r c 0
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -70
-KPX space W -70
-KPX space V -70
-KPX space T 0
-KPX space A -37
-
-KPX v period -37
-KPX v o -15
-KPX v e -15
-KPX v comma -37
-KPX v a 0
-
-KPX w period -37
-KPX w o -15
-KPX w h 0
-KPX w e -10
-KPX w comma -37
-KPX w a -10
-
-KPX x e -10
-
-KPX y period -37
-KPX y o 0
-KPX y e 0
-KPX y comma -37
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 172 207 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 187 207 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 207 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 172 207 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 157 192 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 207 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 172 207 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 187 207 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 187 207 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 172 207 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 33 207 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 53 207 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 48 207 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 33 207 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 210 207 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 200 207 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 207 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 215 207 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 207 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 207 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 207 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 210 207 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 230 207 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 230 207 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 200 207 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 154 207 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 169 207 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 207 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 74 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 74 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 46 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -42 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -37 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -37 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 97 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 69 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 74 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 97 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 102 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 41 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 13 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Times-Italic.afm b/blt3.0/library/AFM/Times-Italic.afm
deleted file mode 100644
index 1db2cff..0000000
--- a/blt3.0/library/AFM/Times-Italic.afm
+++ /dev/null
@@ -1,649 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 13:14:56 1990
-Comment UniqueID 28427
-Comment VMusage 32912 39804
-FontName Times-Italic
-FullName Times Italic
-FamilyName Times
-Weight Medium
-ItalicAngle -15.5
-IsFixedPitch false
-FontBBox -169 -217 1010 883
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 653
-XHeight 441
-Ascender 683
-Descender -205
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ;
-C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ;
-C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ;
-C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ;
-C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ;
-C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ;
-C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ;
-C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ;
-C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ;
-C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ;
-C 43 ; WX 675 ; N plus ; B 86 0 590 506 ;
-C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ;
-C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ;
-C 46 ; WX 250 ; N period ; B 27 -11 138 100 ;
-C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ;
-C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ;
-C 49 ; WX 500 ; N one ; B 49 0 409 676 ;
-C 50 ; WX 500 ; N two ; B 12 0 452 676 ;
-C 51 ; WX 500 ; N three ; B 15 -7 465 676 ;
-C 52 ; WX 500 ; N four ; B 1 0 479 676 ;
-C 53 ; WX 500 ; N five ; B 15 -7 491 666 ;
-C 54 ; WX 500 ; N six ; B 30 -7 521 686 ;
-C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ;
-C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ;
-C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ;
-C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ;
-C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ;
-C 60 ; WX 675 ; N less ; B 84 -8 592 514 ;
-C 61 ; WX 675 ; N equal ; B 86 120 590 386 ;
-C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ;
-C 63 ; WX 500 ; N question ; B 132 -12 472 664 ;
-C 64 ; WX 920 ; N at ; B 118 -18 806 666 ;
-C 65 ; WX 611 ; N A ; B -51 0 564 668 ;
-C 66 ; WX 611 ; N B ; B -8 0 588 653 ;
-C 67 ; WX 667 ; N C ; B 66 -18 689 666 ;
-C 68 ; WX 722 ; N D ; B -8 0 700 653 ;
-C 69 ; WX 611 ; N E ; B -1 0 634 653 ;
-C 70 ; WX 611 ; N F ; B 8 0 645 653 ;
-C 71 ; WX 722 ; N G ; B 52 -18 722 666 ;
-C 72 ; WX 722 ; N H ; B -8 0 767 653 ;
-C 73 ; WX 333 ; N I ; B -8 0 384 653 ;
-C 74 ; WX 444 ; N J ; B -6 -18 491 653 ;
-C 75 ; WX 667 ; N K ; B 7 0 722 653 ;
-C 76 ; WX 556 ; N L ; B -8 0 559 653 ;
-C 77 ; WX 833 ; N M ; B -18 0 873 653 ;
-C 78 ; WX 667 ; N N ; B -20 -15 727 653 ;
-C 79 ; WX 722 ; N O ; B 60 -18 699 666 ;
-C 80 ; WX 611 ; N P ; B 0 0 605 653 ;
-C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ;
-C 82 ; WX 611 ; N R ; B -13 0 588 653 ;
-C 83 ; WX 500 ; N S ; B 17 -18 508 667 ;
-C 84 ; WX 556 ; N T ; B 59 0 633 653 ;
-C 85 ; WX 722 ; N U ; B 102 -18 765 653 ;
-C 86 ; WX 611 ; N V ; B 76 -18 688 653 ;
-C 87 ; WX 833 ; N W ; B 71 -18 906 653 ;
-C 88 ; WX 611 ; N X ; B -29 0 655 653 ;
-C 89 ; WX 556 ; N Y ; B 78 0 633 653 ;
-C 90 ; WX 556 ; N Z ; B -6 0 606 653 ;
-C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ;
-C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ;
-C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ;
-C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ;
-C 97 ; WX 500 ; N a ; B 17 -11 476 441 ;
-C 98 ; WX 500 ; N b ; B 23 -11 473 683 ;
-C 99 ; WX 444 ; N c ; B 30 -11 425 441 ;
-C 100 ; WX 500 ; N d ; B 15 -13 527 683 ;
-C 101 ; WX 444 ; N e ; B 31 -11 412 441 ;
-C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 8 -206 472 441 ;
-C 104 ; WX 500 ; N h ; B 19 -9 478 683 ;
-C 105 ; WX 278 ; N i ; B 49 -11 264 654 ;
-C 106 ; WX 278 ; N j ; B -124 -207 276 654 ;
-C 107 ; WX 444 ; N k ; B 14 -11 461 683 ;
-C 108 ; WX 278 ; N l ; B 41 -11 279 683 ;
-C 109 ; WX 722 ; N m ; B 12 -9 704 441 ;
-C 110 ; WX 500 ; N n ; B 14 -9 474 441 ;
-C 111 ; WX 500 ; N o ; B 27 -11 468 441 ;
-C 112 ; WX 500 ; N p ; B -75 -205 469 441 ;
-C 113 ; WX 500 ; N q ; B 25 -209 483 441 ;
-C 114 ; WX 389 ; N r ; B 45 0 412 441 ;
-C 115 ; WX 389 ; N s ; B 16 -13 366 442 ;
-C 116 ; WX 278 ; N t ; B 37 -11 296 546 ;
-C 117 ; WX 500 ; N u ; B 42 -11 475 441 ;
-C 118 ; WX 444 ; N v ; B 21 -18 426 441 ;
-C 119 ; WX 667 ; N w ; B 16 -18 648 441 ;
-C 120 ; WX 444 ; N x ; B -27 -11 447 441 ;
-C 121 ; WX 444 ; N y ; B -24 -206 426 441 ;
-C 122 ; WX 389 ; N z ; B -2 -81 380 428 ;
-C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ;
-C 124 ; WX 275 ; N bar ; B 105 -18 171 666 ;
-C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ;
-C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ;
-C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ;
-C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ;
-C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ;
-C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ;
-C 165 ; WX 500 ; N yen ; B 27 0 603 653 ;
-C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ;
-C 167 ; WX 500 ; N section ; B 53 -162 461 666 ;
-C 168 ; WX 500 ; N currency ; B -22 53 522 597 ;
-C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ;
-C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ;
-C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ;
-C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ;
-C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ;
-C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ;
-C 177 ; WX 500 ; N endash ; B -6 197 505 243 ;
-C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ;
-C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ;
-C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ;
-C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ;
-C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ;
-C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ;
-C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ;
-C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ;
-C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ;
-C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ;
-C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ;
-C 193 ; WX 333 ; N grave ; B 121 492 311 664 ;
-C 194 ; WX 333 ; N acute ; B 180 494 403 664 ;
-C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ;
-C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ;
-C 197 ; WX 333 ; N macron ; B 99 532 411 583 ;
-C 198 ; WX 333 ; N breve ; B 117 492 418 650 ;
-C 199 ; WX 333 ; N dotaccent ; B 207 508 305 606 ;
-C 200 ; WX 333 ; N dieresis ; B 107 508 405 606 ;
-C 202 ; WX 333 ; N ring ; B 155 492 355 691 ;
-C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ;
-C 206 ; WX 333 ; N ogonek ; B -20 -169 200 40 ;
-C 207 ; WX 333 ; N caron ; B 121 492 426 661 ;
-C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ;
-C 225 ; WX 889 ; N AE ; B -27 0 911 653 ;
-C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ;
-C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ;
-C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ;
-C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ;
-C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ;
-C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ;
-C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ;
-C 248 ; WX 278 ; N lslash ; B 37 -11 307 683 ;
-C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ;
-C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ;
-C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ;
-C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ;
-C -1 ; WX 444 ; N ccedilla ; B 26 -217 425 441 ;
-C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ;
-C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ;
-C -1 ; WX 278 ; N icircumflex ; B 34 -11 328 661 ;
-C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ;
-C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ;
-C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ;
-C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ;
-C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ;
-C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ;
-C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ;
-C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ;
-C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ;
-C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ;
-C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ;
-C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ;
-C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ;
-C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ;
-C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ;
-C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ;
-C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ;
-C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ;
-C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ;
-C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ;
-C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ;
-C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ;
-C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ;
-C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ;
-C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ;
-C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ;
-C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ;
-C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ;
-C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ;
-C -1 ; WX 333 ; N Iacute ; B -8 0 413 876 ;
-C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ;
-C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ;
-C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ;
-C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ;
-C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ;
-C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ;
-C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ;
-C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ;
-C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ;
-C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ;
-C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ;
-C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ;
-C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ;
-C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ;
-C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ;
-C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ;
-C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ;
-C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ;
-C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ;
-C -1 ; WX 278 ; N idieresis ; B 49 -11 353 606 ;
-C -1 ; WX 278 ; N iacute ; B 49 -11 356 664 ;
-C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ;
-C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ;
-C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ;
-C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ;
-C -1 ; WX 675 ; N minus ; B 86 220 590 286 ;
-C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ;
-C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ;
-C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ;
-C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ;
-C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ;
-C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ;
-C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ;
-C -1 ; WX 400 ; N degree ; B 101 390 387 676 ;
-C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ;
-C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ;
-C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ;
-C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ;
-C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ;
-C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ;
-C -1 ; WX 275 ; N brokenbar ; B 105 -18 171 666 ;
-C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -55
-KPX A w -55
-KPX A v -55
-KPX A u -20
-KPX A quoteright -37
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -55
-KPX A W -95
-KPX A V -105
-KPX A U -50
-KPX A T -37
-KPX A Q -40
-KPX A O -40
-KPX A G -35
-KPX A C -30
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -25
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -40
-KPX D W -40
-KPX D V -40
-KPX D A -35
-
-KPX F r -55
-KPX F period -135
-KPX F o -105
-KPX F i -45
-KPX F e -75
-KPX F comma -135
-KPX F a -75
-KPX F A -115
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u -35
-KPX J period -25
-KPX J o -25
-KPX J e -25
-KPX J comma -25
-KPX J a -35
-KPX J A -40
-
-KPX K y -40
-KPX K u -40
-KPX K o -40
-KPX K e -35
-KPX K O -50
-
-KPX L y -30
-KPX L quoteright -37
-KPX L quotedblright 0
-KPX L Y -20
-KPX L W -55
-KPX L V -55
-KPX L T -20
-
-KPX N period 0
-KPX N comma 0
-KPX N A -27
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -50
-KPX O V -50
-KPX O T -40
-KPX O A -55
-
-KPX P period -135
-KPX P o -80
-KPX P e -80
-KPX P comma -135
-KPX P a -80
-KPX P A -90
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -18
-KPX R W -18
-KPX R V -18
-KPX R U -40
-KPX R T 0
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -74
-KPX T w -74
-KPX T u -55
-KPX T semicolon -65
-KPX T r -55
-KPX T period -74
-KPX T o -92
-KPX T i -55
-KPX T hyphen -74
-KPX T h 0
-KPX T e -92
-KPX T comma -74
-KPX T colon -55
-KPX T a -92
-KPX T O -18
-KPX T A -50
-
-KPX U period -25
-KPX U comma -25
-KPX U A -40
-
-KPX V u -74
-KPX V semicolon -74
-KPX V period -129
-KPX V o -111
-KPX V i -74
-KPX V hyphen -55
-KPX V e -111
-KPX V comma -129
-KPX V colon -65
-KPX V a -111
-KPX V O -30
-KPX V G 0
-KPX V A -60
-
-KPX W y -70
-KPX W u -55
-KPX W semicolon -65
-KPX W period -92
-KPX W o -92
-KPX W i -55
-KPX W hyphen -37
-KPX W h 0
-KPX W e -92
-KPX W comma -92
-KPX W colon -65
-KPX W a -92
-KPX W O -25
-KPX W A -60
-
-KPX Y u -92
-KPX Y semicolon -65
-KPX Y period -92
-KPX Y o -92
-KPX Y i -74
-KPX Y hyphen -74
-KPX Y e -92
-KPX Y comma -92
-KPX Y colon -65
-KPX Y a -92
-KPX Y O -15
-KPX Y A -50
-
-KPX a y 0
-KPX a w 0
-KPX a v 0
-KPX a t 0
-KPX a p 0
-KPX a g -10
-KPX a b 0
-
-KPX b y 0
-KPX b v 0
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b 0
-
-KPX c y 0
-KPX c period 0
-KPX c l 0
-KPX c k -20
-KPX c h -15
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -140
-KPX comma quotedblright -140
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y -30
-KPX e x -20
-KPX e w -15
-KPX e v -15
-KPX e period -15
-KPX e p 0
-KPX e g -40
-KPX e comma -10
-KPX e b 0
-
-KPX f quoteright 92
-KPX f quotedblright 0
-KPX f period -15
-KPX f o 0
-KPX f l 0
-KPX f i -20
-KPX f f -18
-KPX f e 0
-KPX f dotlessi -60
-KPX f comma -10
-KPX f a 0
-
-KPX g y 0
-KPX g r 0
-KPX g period -15
-KPX g o 0
-KPX g i 0
-KPX g g -10
-KPX g e -10
-KPX g comma -10
-KPX g a 0
-
-KPX h y 0
-
-KPX i v 0
-
-KPX k y -10
-KPX k o -10
-KPX k e -10
-
-KPX l y 0
-KPX l w 0
-
-KPX m y 0
-KPX m u 0
-
-KPX n y 0
-KPX n v -40
-KPX n u 0
-
-KPX o y 0
-KPX o x 0
-KPX o w 0
-KPX o v -10
-KPX o g -10
-
-KPX p y 0
-
-KPX period quoteright -140
-KPX period quotedblright -140
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A 0
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -111
-KPX quoteleft A 0
-
-KPX quoteright v -10
-KPX quoteright t -30
-KPX quoteright space -111
-KPX quoteright s -40
-KPX quoteright r -25
-KPX quoteright quoteright -111
-KPX quoteright quotedblright 0
-KPX quoteright l 0
-KPX quoteright d -25
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s -10
-KPX r r 0
-KPX r q -37
-KPX r period -111
-KPX r p 0
-KPX r o -45
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -20
-KPX r g -37
-KPX r e -37
-KPX r d -37
-KPX r comma -111
-KPX r c -37
-KPX r a -15
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -75
-KPX space W -40
-KPX space V -35
-KPX space T -18
-KPX space A -18
-
-KPX v period -74
-KPX v o 0
-KPX v e 0
-KPX v comma -74
-KPX v a 0
-
-KPX w period -74
-KPX w o 0
-KPX w h 0
-KPX w e 0
-KPX w comma -74
-KPX w a 0
-
-KPX x e 0
-
-KPX y period -55
-KPX y o 0
-KPX y e 0
-KPX y comma -55
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 139 212 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 144 212 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 139 212 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 149 212 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 129 192 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 139 212 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 149 212 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 169 212 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 159 212 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 149 212 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 10 212 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 40 212 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 30 212 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 10 212 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 177 212 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 212 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 230 212 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 205 212 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 212 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 94 212 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 215 212 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 225 212 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 215 212 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 132 212 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 142 212 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 112 212 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 84 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -57 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -52 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 49 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 74 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 69 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 74 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 74 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 74 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 36 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 8 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/Times-Roman.afm b/blt3.0/library/AFM/Times-Roman.afm
deleted file mode 100644
index 58de46e..0000000
--- a/blt3.0/library/AFM/Times-Roman.afm
+++ /dev/null
@@ -1,649 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Tue Mar 20 12:15:44 1990
-Comment UniqueID 28416
-Comment VMusage 30487 37379
-FontName Times-Roman
-FullName Times Roman
-FamilyName Times
-Weight Roman
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -168 -218 1000 898
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries.
-EncodingScheme AdobeStandardEncoding
-CapHeight 662
-XHeight 450
-Ascender 683
-Descender -217
-StartCharMetrics 228
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ;
-C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ;
-C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ;
-C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ;
-C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ;
-C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ;
-C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ;
-C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ;
-C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ;
-C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ;
-C 43 ; WX 564 ; N plus ; B 30 0 534 506 ;
-C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ;
-C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ;
-C 46 ; WX 250 ; N period ; B 70 -11 181 100 ;
-C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ;
-C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ;
-C 49 ; WX 500 ; N one ; B 111 0 394 676 ;
-C 50 ; WX 500 ; N two ; B 30 0 475 676 ;
-C 51 ; WX 500 ; N three ; B 43 -14 431 676 ;
-C 52 ; WX 500 ; N four ; B 12 0 472 676 ;
-C 53 ; WX 500 ; N five ; B 32 -14 438 688 ;
-C 54 ; WX 500 ; N six ; B 34 -14 468 684 ;
-C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ;
-C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ;
-C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ;
-C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ;
-C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ;
-C 60 ; WX 564 ; N less ; B 28 -8 536 514 ;
-C 61 ; WX 564 ; N equal ; B 30 120 534 386 ;
-C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ;
-C 63 ; WX 444 ; N question ; B 68 -8 414 676 ;
-C 64 ; WX 921 ; N at ; B 116 -14 809 676 ;
-C 65 ; WX 722 ; N A ; B 15 0 706 674 ;
-C 66 ; WX 667 ; N B ; B 17 0 593 662 ;
-C 67 ; WX 667 ; N C ; B 28 -14 633 676 ;
-C 68 ; WX 722 ; N D ; B 16 0 685 662 ;
-C 69 ; WX 611 ; N E ; B 12 0 597 662 ;
-C 70 ; WX 556 ; N F ; B 12 0 546 662 ;
-C 71 ; WX 722 ; N G ; B 32 -14 709 676 ;
-C 72 ; WX 722 ; N H ; B 19 0 702 662 ;
-C 73 ; WX 333 ; N I ; B 18 0 315 662 ;
-C 74 ; WX 389 ; N J ; B 10 -14 370 662 ;
-C 75 ; WX 722 ; N K ; B 34 0 723 662 ;
-C 76 ; WX 611 ; N L ; B 12 0 598 662 ;
-C 77 ; WX 889 ; N M ; B 12 0 863 662 ;
-C 78 ; WX 722 ; N N ; B 12 -11 707 662 ;
-C 79 ; WX 722 ; N O ; B 34 -14 688 676 ;
-C 80 ; WX 556 ; N P ; B 16 0 542 662 ;
-C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ;
-C 82 ; WX 667 ; N R ; B 17 0 659 662 ;
-C 83 ; WX 556 ; N S ; B 42 -14 491 676 ;
-C 84 ; WX 611 ; N T ; B 17 0 593 662 ;
-C 85 ; WX 722 ; N U ; B 14 -14 705 662 ;
-C 86 ; WX 722 ; N V ; B 16 -11 697 662 ;
-C 87 ; WX 944 ; N W ; B 5 -11 932 662 ;
-C 88 ; WX 722 ; N X ; B 10 0 704 662 ;
-C 89 ; WX 722 ; N Y ; B 22 0 703 662 ;
-C 90 ; WX 611 ; N Z ; B 9 0 597 662 ;
-C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ;
-C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ;
-C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ;
-C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ;
-C 97 ; WX 444 ; N a ; B 37 -10 442 460 ;
-C 98 ; WX 500 ; N b ; B 3 -10 468 683 ;
-C 99 ; WX 444 ; N c ; B 25 -10 412 460 ;
-C 100 ; WX 500 ; N d ; B 27 -10 491 683 ;
-C 101 ; WX 444 ; N e ; B 25 -10 424 460 ;
-C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ;
-C 103 ; WX 500 ; N g ; B 28 -218 470 460 ;
-C 104 ; WX 500 ; N h ; B 9 0 487 683 ;
-C 105 ; WX 278 ; N i ; B 16 0 253 683 ;
-C 106 ; WX 278 ; N j ; B -70 -218 194 683 ;
-C 107 ; WX 500 ; N k ; B 7 0 505 683 ;
-C 108 ; WX 278 ; N l ; B 19 0 257 683 ;
-C 109 ; WX 778 ; N m ; B 16 0 775 460 ;
-C 110 ; WX 500 ; N n ; B 16 0 485 460 ;
-C 111 ; WX 500 ; N o ; B 29 -10 470 460 ;
-C 112 ; WX 500 ; N p ; B 5 -217 470 460 ;
-C 113 ; WX 500 ; N q ; B 24 -217 488 460 ;
-C 114 ; WX 333 ; N r ; B 5 0 335 460 ;
-C 115 ; WX 389 ; N s ; B 51 -10 348 460 ;
-C 116 ; WX 278 ; N t ; B 13 -10 279 579 ;
-C 117 ; WX 500 ; N u ; B 9 -10 479 450 ;
-C 118 ; WX 500 ; N v ; B 19 -14 477 450 ;
-C 119 ; WX 722 ; N w ; B 21 -14 694 450 ;
-C 120 ; WX 500 ; N x ; B 17 0 479 450 ;
-C 121 ; WX 500 ; N y ; B 14 -218 475 450 ;
-C 122 ; WX 444 ; N z ; B 27 0 418 450 ;
-C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ;
-C 124 ; WX 200 ; N bar ; B 67 -14 133 676 ;
-C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ;
-C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ;
-C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ;
-C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ;
-C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ;
-C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ;
-C 165 ; WX 500 ; N yen ; B -53 0 512 662 ;
-C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ;
-C 167 ; WX 500 ; N section ; B 70 -148 426 676 ;
-C 168 ; WX 500 ; N currency ; B -22 58 522 602 ;
-C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ;
-C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ;
-C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ;
-C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ;
-C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ;
-C 174 ; WX 556 ; N fi ; B 31 0 521 683 ;
-C 175 ; WX 556 ; N fl ; B 32 0 521 683 ;
-C 177 ; WX 500 ; N endash ; B 0 201 500 250 ;
-C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ;
-C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ;
-C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ;
-C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ;
-C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ;
-C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ;
-C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ;
-C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ;
-C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ;
-C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ;
-C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ;
-C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ;
-C 193 ; WX 333 ; N grave ; B 19 507 242 678 ;
-C 194 ; WX 333 ; N acute ; B 93 507 317 678 ;
-C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ;
-C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ;
-C 197 ; WX 333 ; N macron ; B 11 547 322 601 ;
-C 198 ; WX 333 ; N breve ; B 26 507 307 664 ;
-C 199 ; WX 333 ; N dotaccent ; B 118 523 216 623 ;
-C 200 ; WX 333 ; N dieresis ; B 18 523 315 623 ;
-C 202 ; WX 333 ; N ring ; B 67 512 266 711 ;
-C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ;
-C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ;
-C 206 ; WX 333 ; N ogonek ; B 64 -165 249 0 ;
-C 207 ; WX 333 ; N caron ; B 11 507 322 674 ;
-C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ;
-C 225 ; WX 889 ; N AE ; B 0 0 863 662 ;
-C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ;
-C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ;
-C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ;
-C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ;
-C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ;
-C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ;
-C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ;
-C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ;
-C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ;
-C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ;
-C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ;
-C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ;
-C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ;
-C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ;
-C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ;
-C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ;
-C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ;
-C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ;
-C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ;
-C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ;
-C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ;
-C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ;
-C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ;
-C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ;
-C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ;
-C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ;
-C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ;
-C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ;
-C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ;
-C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ;
-C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ;
-C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ;
-C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ;
-C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ;
-C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ;
-C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ;
-C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ;
-C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ;
-C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ;
-C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ;
-C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ;
-C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ;
-C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ;
-C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ;
-C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ;
-C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ;
-C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ;
-C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ;
-C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ;
-C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ;
-C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ;
-C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ;
-C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ;
-C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ;
-C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ;
-C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ;
-C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ;
-C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ;
-C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ;
-C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ;
-C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ;
-C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ;
-C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ;
-C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ;
-C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ;
-C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ;
-C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ;
-C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ;
-C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ;
-C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ;
-C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ;
-C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ;
-C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ;
-C -1 ; WX 564 ; N minus ; B 30 220 534 286 ;
-C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ;
-C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ;
-C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ;
-C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ;
-C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ;
-C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ;
-C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ;
-C -1 ; WX 400 ; N degree ; B 57 390 343 676 ;
-C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ;
-C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ;
-C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ;
-C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ;
-C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ;
-C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ;
-C -1 ; WX 200 ; N brokenbar ; B 67 -14 133 676 ;
-C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 283
-
-KPX A y -92
-KPX A w -92
-KPX A v -74
-KPX A u 0
-KPX A quoteright -111
-KPX A quotedblright 0
-KPX A p 0
-KPX A Y -105
-KPX A W -90
-KPX A V -135
-KPX A U -55
-KPX A T -111
-KPX A Q -55
-KPX A O -55
-KPX A G -40
-KPX A C -40
-
-KPX B period 0
-KPX B comma 0
-KPX B U -10
-KPX B A -35
-
-KPX D period 0
-KPX D comma 0
-KPX D Y -55
-KPX D W -30
-KPX D V -40
-KPX D A -40
-
-KPX F r 0
-KPX F period -80
-KPX F o -15
-KPX F i 0
-KPX F e 0
-KPX F comma -80
-KPX F a -15
-KPX F A -74
-
-KPX G period 0
-KPX G comma 0
-
-KPX J u 0
-KPX J period 0
-KPX J o 0
-KPX J e 0
-KPX J comma 0
-KPX J a 0
-KPX J A -60
-
-KPX K y -25
-KPX K u -15
-KPX K o -35
-KPX K e -25
-KPX K O -30
-
-KPX L y -55
-KPX L quoteright -92
-KPX L quotedblright 0
-KPX L Y -100
-KPX L W -74
-KPX L V -100
-KPX L T -92
-
-KPX N period 0
-KPX N comma 0
-KPX N A -35
-
-KPX O period 0
-KPX O comma 0
-KPX O Y -50
-KPX O X -40
-KPX O W -35
-KPX O V -50
-KPX O T -40
-KPX O A -35
-
-KPX P period -111
-KPX P o 0
-KPX P e 0
-KPX P comma -111
-KPX P a -15
-KPX P A -92
-
-KPX Q period 0
-KPX Q comma 0
-KPX Q U -10
-
-KPX R Y -65
-KPX R W -55
-KPX R V -80
-KPX R U -40
-KPX R T -60
-KPX R O -40
-
-KPX S period 0
-KPX S comma 0
-
-KPX T y -80
-KPX T w -80
-KPX T u -45
-KPX T semicolon -55
-KPX T r -35
-KPX T period -74
-KPX T o -80
-KPX T i -35
-KPX T hyphen -92
-KPX T h 0
-KPX T e -70
-KPX T comma -74
-KPX T colon -50
-KPX T a -80
-KPX T O -18
-KPX T A -93
-
-KPX U period 0
-KPX U comma 0
-KPX U A -40
-
-KPX V u -75
-KPX V semicolon -74
-KPX V period -129
-KPX V o -129
-KPX V i -60
-KPX V hyphen -100
-KPX V e -111
-KPX V comma -129
-KPX V colon -74
-KPX V a -111
-KPX V O -40
-KPX V G -15
-KPX V A -135
-
-KPX W y -73
-KPX W u -50
-KPX W semicolon -37
-KPX W period -92
-KPX W o -80
-KPX W i -40
-KPX W hyphen -65
-KPX W h 0
-KPX W e -80
-KPX W comma -92
-KPX W colon -37
-KPX W a -80
-KPX W O -10
-KPX W A -120
-
-KPX Y u -111
-KPX Y semicolon -92
-KPX Y period -129
-KPX Y o -110
-KPX Y i -55
-KPX Y hyphen -111
-KPX Y e -100
-KPX Y comma -129
-KPX Y colon -92
-KPX Y a -100
-KPX Y O -30
-KPX Y A -120
-
-KPX a y 0
-KPX a w -15
-KPX a v -20
-KPX a t 0
-KPX a p 0
-KPX a g 0
-KPX a b 0
-
-KPX b y 0
-KPX b v -15
-KPX b u -20
-KPX b period -40
-KPX b l 0
-KPX b comma 0
-KPX b b 0
-
-KPX c y -15
-KPX c period 0
-KPX c l 0
-KPX c k 0
-KPX c h 0
-KPX c comma 0
-
-KPX colon space 0
-
-KPX comma space 0
-KPX comma quoteright -70
-KPX comma quotedblright -70
-
-KPX d y 0
-KPX d w 0
-KPX d v 0
-KPX d period 0
-KPX d d 0
-KPX d comma 0
-
-KPX e y -15
-KPX e x -15
-KPX e w -25
-KPX e v -25
-KPX e period 0
-KPX e p 0
-KPX e g -15
-KPX e comma 0
-KPX e b 0
-
-KPX f quoteright 55
-KPX f quotedblright 0
-KPX f period 0
-KPX f o 0
-KPX f l 0
-KPX f i -20
-KPX f f -25
-KPX f e 0
-KPX f dotlessi -50
-KPX f comma 0
-KPX f a -10
-
-KPX g y 0
-KPX g r 0
-KPX g period 0
-KPX g o 0
-KPX g i 0
-KPX g g 0
-KPX g e 0
-KPX g comma 0
-KPX g a -5
-
-KPX h y -5
-
-KPX i v -25
-
-KPX k y -15
-KPX k o -10
-KPX k e -10
-
-KPX l y 0
-KPX l w -10
-
-KPX m y 0
-KPX m u 0
-
-KPX n y -15
-KPX n v -40
-KPX n u 0
-
-KPX o y -10
-KPX o x 0
-KPX o w -25
-KPX o v -15
-KPX o g 0
-
-KPX p y -10
-
-KPX period quoteright -70
-KPX period quotedblright -70
-
-KPX quotedblleft quoteleft 0
-KPX quotedblleft A -80
-
-KPX quotedblright space 0
-
-KPX quoteleft quoteleft -74
-KPX quoteleft A -80
-
-KPX quoteright v -50
-KPX quoteright t -18
-KPX quoteright space -74
-KPX quoteright s -55
-KPX quoteright r -50
-KPX quoteright quoteright -74
-KPX quoteright quotedblright 0
-KPX quoteright l -10
-KPX quoteright d -50
-
-KPX r y 0
-KPX r v 0
-KPX r u 0
-KPX r t 0
-KPX r s 0
-KPX r r 0
-KPX r q 0
-KPX r period -55
-KPX r p 0
-KPX r o 0
-KPX r n 0
-KPX r m 0
-KPX r l 0
-KPX r k 0
-KPX r i 0
-KPX r hyphen -20
-KPX r g -18
-KPX r e 0
-KPX r d 0
-KPX r comma -40
-KPX r c 0
-KPX r a 0
-
-KPX s w 0
-
-KPX space quoteleft 0
-KPX space quotedblleft 0
-KPX space Y -90
-KPX space W -30
-KPX space V -50
-KPX space T -18
-KPX space A -55
-
-KPX v period -65
-KPX v o -20
-KPX v e -15
-KPX v comma -65
-KPX v a -25
-
-KPX w period -65
-KPX w o -10
-KPX w h 0
-KPX w e 0
-KPX w comma -65
-KPX w a -10
-
-KPX x e -15
-
-KPX y period -65
-KPX y o 0
-KPX y e 0
-KPX y comma -65
-KPX y a 0
-
-KPX z o 0
-KPX z e 0
-EndKernPairs
-EndKernData
-StartComposites 58
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 212 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 212 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 212 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 212 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 185 187 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 212 ;
-CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 212 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 212 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 212 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 212 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 212 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 212 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 212 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 212 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 212 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 195 212 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 195 212 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 195 212 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 195 212 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 212 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 212 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 212 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 212 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 195 212 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 195 212 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 212 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 56 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 56 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 56 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 0 ;
-CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/ZapfChancery-MediumItalic.afm b/blt3.0/library/AFM/ZapfChancery-MediumItalic.afm
deleted file mode 100644
index 7a8df29..0000000
--- a/blt3.0/library/AFM/ZapfChancery-MediumItalic.afm
+++ /dev/null
@@ -1,481 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.
-Comment Creation Date: Fri Dec 28 16:35:46 1990
-Comment UniqueID 33936
-Comment VMusage 34559 41451
-FontName ZapfChancery-MediumItalic
-FullName ITC Zapf Chancery Medium Italic
-FamilyName ITC Zapf Chancery
-Weight Medium
-ItalicAngle -14
-IsFixedPitch false
-FontBBox -181 -314 1065 831
-UnderlinePosition -100
-UnderlineThickness 50
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated.  All Rights Reserved.ITC Zapf Chancery is a registered trademark of International Typeface Corporation.
-EncodingScheme AdobeStandardEncoding
-CapHeight 708
-XHeight 438
-Ascender 714
-Descender -314
-StartCharMetrics 228
-C 32 ; WX 220 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 280 ; N exclam ; B 119 -14 353 610 ;
-C 34 ; WX 220 ; N quotedbl ; B 120 343 333 610 ;
-C 35 ; WX 440 ; N numbersign ; B 83 0 521 594 ;
-C 36 ; WX 440 ; N dollar ; B 60 -144 508 709 ;
-C 37 ; WX 680 ; N percent ; B 132 -160 710 700 ;
-C 38 ; WX 780 ; N ampersand ; B 126 -16 915 610 ;
-C 39 ; WX 240 ; N quoteright ; B 168 343 338 610 ;
-C 40 ; WX 260 ; N parenleft ; B 96 -216 411 664 ;
-C 41 ; WX 220 ; N parenright ; B -13 -216 302 664 ;
-C 42 ; WX 420 ; N asterisk ; B 139 263 479 610 ;
-C 43 ; WX 520 ; N plus ; B 117 0 543 426 ;
-C 44 ; WX 220 ; N comma ; B 25 -140 213 148 ;
-C 45 ; WX 280 ; N hyphen ; B 69 190 334 248 ;
-C 46 ; WX 220 ; N period ; B 102 -14 228 128 ;
-C 47 ; WX 340 ; N slash ; B 74 -16 458 610 ;
-C 48 ; WX 440 ; N zero ; B 79 -16 538 610 ;
-C 49 ; WX 440 ; N one ; B 41 0 428 610 ;
-C 50 ; WX 440 ; N two ; B 17 -16 485 610 ;
-C 51 ; WX 440 ; N three ; B 1 -16 485 610 ;
-C 52 ; WX 440 ; N four ; B 77 -35 499 610 ;
-C 53 ; WX 440 ; N five ; B 60 -16 595 679 ;
-C 54 ; WX 440 ; N six ; B 90 -16 556 610 ;
-C 55 ; WX 440 ; N seven ; B 157 -33 561 645 ;
-C 56 ; WX 440 ; N eight ; B 65 -16 529 610 ;
-C 57 ; WX 440 ; N nine ; B 32 -16 517 610 ;
-C 58 ; WX 260 ; N colon ; B 98 -14 296 438 ;
-C 59 ; WX 240 ; N semicolon ; B 29 -140 299 438 ;
-C 60 ; WX 520 ; N less ; B 139 0 527 468 ;
-C 61 ; WX 520 ; N equal ; B 117 86 543 340 ;
-C 62 ; WX 520 ; N greater ; B 139 0 527 468 ;
-C 63 ; WX 380 ; N question ; B 150 -14 455 610 ;
-C 64 ; WX 700 ; N at ; B 127 -16 753 610 ;
-C 65 ; WX 620 ; N A ; B 13 -16 697 632 ;
-C 66 ; WX 600 ; N B ; B 85 -6 674 640 ;
-C 67 ; WX 520 ; N C ; B 93 -16 631 610 ;
-C 68 ; WX 700 ; N D ; B 86 -6 768 640 ;
-C 69 ; WX 620 ; N E ; B 91 -12 709 618 ;
-C 70 ; WX 580 ; N F ; B 120 -118 793 629 ;
-C 71 ; WX 620 ; N G ; B 148 -242 709 610 ;
-C 72 ; WX 680 ; N H ; B 18 -16 878 708 ;
-C 73 ; WX 380 ; N I ; B 99 0 504 594 ;
-C 74 ; WX 400 ; N J ; B -14 -147 538 594 ;
-C 75 ; WX 660 ; N K ; B 53 -153 844 610 ;
-C 76 ; WX 580 ; N L ; B 53 -16 657 610 ;
-C 77 ; WX 840 ; N M ; B 58 -16 1020 722 ;
-C 78 ; WX 700 ; N N ; B 85 -168 915 708 ;
-C 79 ; WX 600 ; N O ; B 94 -16 660 610 ;
-C 80 ; WX 540 ; N P ; B 42 0 658 628 ;
-C 81 ; WX 600 ; N Q ; B 84 -177 775 610 ;
-C 82 ; WX 600 ; N R ; B 58 -168 805 640 ;
-C 83 ; WX 460 ; N S ; B 45 -81 558 610 ;
-C 84 ; WX 500 ; N T ; B 63 0 744 667 ;
-C 85 ; WX 740 ; N U ; B 126 -16 792 617 ;
-C 86 ; WX 640 ; N V ; B 124 -16 810 714 ;
-C 87 ; WX 880 ; N W ; B 94 -16 1046 723 ;
-C 88 ; WX 560 ; N X ; B -30 -16 699 610 ;
-C 89 ; WX 560 ; N Y ; B 41 -168 774 647 ;
-C 90 ; WX 620 ; N Z ; B 42 -19 669 624 ;
-C 91 ; WX 240 ; N bracketleft ; B -13 -207 405 655 ;
-C 92 ; WX 480 ; N backslash ; B 140 -16 524 610 ;
-C 93 ; WX 320 ; N bracketright ; B -27 -207 391 655 ;
-C 94 ; WX 520 ; N asciicircum ; B 132 239 532 594 ;
-C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ;
-C 96 ; WX 240 ; N quoteleft ; B 169 343 339 610 ;
-C 97 ; WX 420 ; N a ; B 92 -15 485 438 ;
-C 98 ; WX 420 ; N b ; B 82 -23 492 714 ;
-C 99 ; WX 340 ; N c ; B 87 -14 406 438 ;
-C 100 ; WX 440 ; N d ; B 102 -14 651 714 ;
-C 101 ; WX 340 ; N e ; B 87 -14 403 438 ;
-C 102 ; WX 320 ; N f ; B -119 -314 547 714 ; L i fi ; L l fl ;
-C 103 ; WX 400 ; N g ; B -108 -314 503 438 ;
-C 104 ; WX 440 ; N h ; B 55 -14 524 714 ;
-C 105 ; WX 240 ; N i ; B 100 -14 341 635 ;
-C 106 ; WX 220 ; N j ; B -112 -314 332 635 ;
-C 107 ; WX 440 ; N k ; B 87 -184 628 714 ;
-C 108 ; WX 240 ; N l ; B 102 -14 480 714 ;
-C 109 ; WX 620 ; N m ; B 86 -14 704 438 ;
-C 110 ; WX 460 ; N n ; B 101 -14 544 438 ;
-C 111 ; WX 400 ; N o ; B 87 -14 449 438 ;
-C 112 ; WX 440 ; N p ; B -23 -314 484 432 ;
-C 113 ; WX 400 ; N q ; B 87 -300 490 510 ;
-C 114 ; WX 300 ; N r ; B 101 -14 424 438 ;
-C 115 ; WX 320 ; N s ; B 46 -14 403 438 ;
-C 116 ; WX 320 ; N t ; B 106 -14 426 539 ;
-C 117 ; WX 460 ; N u ; B 102 -14 528 438 ;
-C 118 ; WX 440 ; N v ; B 87 -14 533 488 ;
-C 119 ; WX 680 ; N w ; B 87 -14 782 488 ;
-C 120 ; WX 420 ; N x ; B 70 -195 589 438 ;
-C 121 ; WX 400 ; N y ; B -24 -314 483 438 ;
-C 122 ; WX 440 ; N z ; B 26 -14 508 445 ;
-C 123 ; WX 240 ; N braceleft ; B 55 -207 383 655 ;
-C 124 ; WX 520 ; N bar ; B 320 -16 378 714 ;
-C 125 ; WX 240 ; N braceright ; B -10 -207 318 655 ;
-C 126 ; WX 520 ; N asciitilde ; B 123 186 539 320 ;
-C 161 ; WX 280 ; N exclamdown ; B 72 -186 306 438 ;
-C 162 ; WX 440 ; N cent ; B 122 -134 476 543 ;
-C 163 ; WX 440 ; N sterling ; B -16 -52 506 610 ;
-C 164 ; WX 60 ; N fraction ; B -181 -16 320 610 ;
-C 165 ; WX 440 ; N yen ; B -1 -168 613 647 ;
-C 166 ; WX 440 ; N florin ; B -64 -314 582 610 ;
-C 167 ; WX 420 ; N section ; B 53 -215 514 610 ;
-C 168 ; WX 440 ; N currency ; B 50 85 474 509 ;
-C 169 ; WX 160 ; N quotesingle ; B 145 343 215 610 ;
-C 170 ; WX 340 ; N quotedblleft ; B 169 343 464 610 ;
-C 171 ; WX 340 ; N guillemotleft ; B 98 24 356 414 ;
-C 172 ; WX 240 ; N guilsinglleft ; B 98 24 258 414 ;
-C 173 ; WX 260 ; N guilsinglright ; B 106 24 266 414 ;
-C 174 ; WX 520 ; N fi ; B -124 -314 605 714 ;
-C 175 ; WX 520 ; N fl ; B -124 -314 670 714 ;
-C 177 ; WX 500 ; N endash ; B 51 199 565 239 ;
-C 178 ; WX 460 ; N dagger ; B 138 -37 568 610 ;
-C 179 ; WX 480 ; N daggerdbl ; B 138 -59 533 610 ;
-C 180 ; WX 220 ; N periodcentered ; B 139 208 241 310 ;
-C 182 ; WX 500 ; N paragraph ; B 105 -199 638 594 ;
-C 183 ; WX 600 ; N bullet ; B 228 149 524 445 ;
-C 184 ; WX 180 ; N quotesinglbase ; B 21 -121 191 146 ;
-C 185 ; WX 280 ; N quotedblbase ; B -14 -121 281 146 ;
-C 186 ; WX 360 ; N quotedblright ; B 158 343 453 610 ;
-C 187 ; WX 380 ; N guillemotright ; B 117 24 375 414 ;
-C 188 ; WX 1000 ; N ellipsis ; B 124 -14 916 128 ;
-C 189 ; WX 960 ; N perthousand ; B 112 -160 1005 700 ;
-C 191 ; WX 400 ; N questiondown ; B 82 -186 387 438 ;
-C 193 ; WX 220 ; N grave ; B 193 492 339 659 ;
-C 194 ; WX 300 ; N acute ; B 265 492 422 659 ;
-C 195 ; WX 340 ; N circumflex ; B 223 482 443 649 ;
-C 196 ; WX 440 ; N tilde ; B 243 543 522 619 ;
-C 197 ; WX 440 ; N macron ; B 222 544 465 578 ;
-C 198 ; WX 440 ; N breve ; B 253 522 501 631 ;
-C 199 ; WX 220 ; N dotaccent ; B 236 522 328 610 ;
-C 200 ; WX 360 ; N dieresis ; B 243 522 469 610 ;
-C 202 ; WX 300 ; N ring ; B 240 483 416 659 ;
-C 203 ; WX 300 ; N cedilla ; B 12 -191 184 6 ;
-C 205 ; WX 400 ; N hungarumlaut ; B 208 492 495 659 ;
-C 206 ; WX 280 ; N ogonek ; B 38 -191 233 6 ;
-C 207 ; WX 340 ; N caron ; B 254 492 474 659 ;
-C 208 ; WX 1000 ; N emdash ; B 51 199 1065 239 ;
-C 225 ; WX 740 ; N AE ; B -21 -16 799 594 ;
-C 227 ; WX 260 ; N ordfeminine ; B 111 338 386 610 ;
-C 232 ; WX 580 ; N Lslash ; B 49 -16 657 610 ;
-C 233 ; WX 660 ; N Oslash ; B 83 -78 751 672 ;
-C 234 ; WX 820 ; N OE ; B 63 -16 909 610 ;
-C 235 ; WX 260 ; N ordmasculine ; B 128 339 373 610 ;
-C 241 ; WX 540 ; N ae ; B 67 -14 624 468 ;
-C 245 ; WX 240 ; N dotlessi ; B 100 -14 306 438 ;
-C 248 ; WX 300 ; N lslash ; B 121 -14 515 714 ;
-C 249 ; WX 440 ; N oslash ; B 46 -64 540 488 ;
-C 250 ; WX 560 ; N oe ; B 78 -14 628 438 ;
-C 251 ; WX 420 ; N germandbls ; B -127 -314 542 714 ;
-C -1 ; WX 340 ; N ecircumflex ; B 87 -14 433 649 ;
-C -1 ; WX 340 ; N edieresis ; B 87 -14 449 610 ;
-C -1 ; WX 420 ; N aacute ; B 92 -15 492 659 ;
-C -1 ; WX 740 ; N registered ; B 137 -16 763 610 ;
-C -1 ; WX 240 ; N icircumflex ; B 100 -14 363 649 ;
-C -1 ; WX 460 ; N udieresis ; B 102 -14 528 610 ;
-C -1 ; WX 400 ; N ograve ; B 87 -14 449 659 ;
-C -1 ; WX 460 ; N uacute ; B 102 -14 528 659 ;
-C -1 ; WX 460 ; N ucircumflex ; B 102 -14 528 649 ;
-C -1 ; WX 620 ; N Aacute ; B 13 -16 702 821 ;
-C -1 ; WX 240 ; N igrave ; B 100 -14 306 659 ;
-C -1 ; WX 380 ; N Icircumflex ; B 99 0 504 821 ;
-C -1 ; WX 340 ; N ccedilla ; B 62 -191 406 438 ;
-C -1 ; WX 420 ; N adieresis ; B 92 -15 485 610 ;
-C -1 ; WX 620 ; N Ecircumflex ; B 91 -12 709 821 ;
-C -1 ; WX 320 ; N scaron ; B 46 -14 464 659 ;
-C -1 ; WX 440 ; N thorn ; B -38 -314 505 714 ;
-C -1 ; WX 1000 ; N trademark ; B 127 187 1046 594 ;
-C -1 ; WX 340 ; N egrave ; B 87 -14 403 659 ;
-C -1 ; WX 264 ; N threesuperior ; B 59 234 348 610 ;
-C -1 ; WX 440 ; N zcaron ; B 26 -14 514 659 ;
-C -1 ; WX 420 ; N atilde ; B 92 -15 522 619 ;
-C -1 ; WX 420 ; N aring ; B 92 -15 485 659 ;
-C -1 ; WX 400 ; N ocircumflex ; B 87 -14 453 649 ;
-C -1 ; WX 620 ; N Edieresis ; B 91 -12 709 762 ;
-C -1 ; WX 660 ; N threequarters ; B 39 -16 706 610 ;
-C -1 ; WX 400 ; N ydieresis ; B -24 -314 483 610 ;
-C -1 ; WX 400 ; N yacute ; B -24 -314 483 659 ;
-C -1 ; WX 240 ; N iacute ; B 100 -14 392 659 ;
-C -1 ; WX 620 ; N Acircumflex ; B 13 -16 697 821 ;
-C -1 ; WX 740 ; N Uacute ; B 126 -16 792 821 ;
-C -1 ; WX 340 ; N eacute ; B 87 -14 462 659 ;
-C -1 ; WX 600 ; N Ograve ; B 94 -16 660 821 ;
-C -1 ; WX 420 ; N agrave ; B 92 -15 485 659 ;
-C -1 ; WX 740 ; N Udieresis ; B 126 -16 792 762 ;
-C -1 ; WX 420 ; N acircumflex ; B 92 -15 485 649 ;
-C -1 ; WX 380 ; N Igrave ; B 99 0 504 821 ;
-C -1 ; WX 264 ; N twosuperior ; B 72 234 354 610 ;
-C -1 ; WX 740 ; N Ugrave ; B 126 -16 792 821 ;
-C -1 ; WX 660 ; N onequarter ; B 56 -16 702 610 ;
-C -1 ; WX 740 ; N Ucircumflex ; B 126 -16 792 821 ;
-C -1 ; WX 460 ; N Scaron ; B 45 -81 594 831 ;
-C -1 ; WX 380 ; N Idieresis ; B 99 0 519 762 ;
-C -1 ; WX 240 ; N idieresis ; B 100 -14 369 610 ;
-C -1 ; WX 620 ; N Egrave ; B 91 -12 709 821 ;
-C -1 ; WX 600 ; N Oacute ; B 94 -16 660 821 ;
-C -1 ; WX 520 ; N divide ; B 117 -14 543 440 ;
-C -1 ; WX 620 ; N Atilde ; B 13 -16 702 771 ;
-C -1 ; WX 620 ; N Aring ; B 13 -16 697 831 ;
-C -1 ; WX 600 ; N Odieresis ; B 94 -16 660 762 ;
-C -1 ; WX 620 ; N Adieresis ; B 13 -16 709 762 ;
-C -1 ; WX 700 ; N Ntilde ; B 85 -168 915 761 ;
-C -1 ; WX 620 ; N Zcaron ; B 42 -19 669 831 ;
-C -1 ; WX 540 ; N Thorn ; B 52 0 647 623 ;
-C -1 ; WX 380 ; N Iacute ; B 99 0 532 821 ;
-C -1 ; WX 520 ; N plusminus ; B 117 0 543 436 ;
-C -1 ; WX 520 ; N multiply ; B 133 16 527 410 ;
-C -1 ; WX 620 ; N Eacute ; B 91 -12 709 821 ;
-C -1 ; WX 560 ; N Ydieresis ; B 41 -168 774 762 ;
-C -1 ; WX 264 ; N onesuperior ; B 83 244 311 610 ;
-C -1 ; WX 460 ; N ugrave ; B 102 -14 528 659 ;
-C -1 ; WX 520 ; N logicalnot ; B 117 86 543 340 ;
-C -1 ; WX 460 ; N ntilde ; B 101 -14 544 619 ;
-C -1 ; WX 600 ; N Otilde ; B 94 -16 660 761 ;
-C -1 ; WX 400 ; N otilde ; B 87 -14 502 619 ;
-C -1 ; WX 520 ; N Ccedilla ; B 93 -191 631 610 ;
-C -1 ; WX 620 ; N Agrave ; B 13 -16 697 821 ;
-C -1 ; WX 660 ; N onehalf ; B 56 -16 702 610 ;
-C -1 ; WX 700 ; N Eth ; B 86 -6 768 640 ;
-C -1 ; WX 400 ; N degree ; B 171 324 457 610 ;
-C -1 ; WX 560 ; N Yacute ; B 41 -168 774 821 ;
-C -1 ; WX 600 ; N Ocircumflex ; B 94 -16 660 821 ;
-C -1 ; WX 400 ; N oacute ; B 87 -14 482 659 ;
-C -1 ; WX 460 ; N mu ; B 7 -314 523 438 ;
-C -1 ; WX 520 ; N minus ; B 117 184 543 242 ;
-C -1 ; WX 400 ; N eth ; B 87 -14 522 714 ;
-C -1 ; WX 400 ; N odieresis ; B 87 -14 479 610 ;
-C -1 ; WX 740 ; N copyright ; B 137 -16 763 610 ;
-C -1 ; WX 520 ; N brokenbar ; B 320 -16 378 714 ;
-EndCharMetrics
-StartKernData
-StartKernPairs 131
-
-KPX A quoteright -40
-KPX A quotedblright -40
-KPX A U -10
-KPX A T 10
-KPX A Q 10
-KPX A O 10
-KPX A G -30
-KPX A C 20
-
-KPX D period -30
-KPX D comma -20
-KPX D Y 10
-KPX D A -10
-
-KPX F period -40
-KPX F i 10
-KPX F comma -30
-
-KPX G period -20
-KPX G comma -10
-
-KPX J period -20
-KPX J comma -10
-
-KPX K u -20
-KPX K o -20
-KPX K e -20
-
-KPX L y -10
-KPX L quoteright -25
-KPX L quotedblright -25
-KPX L W -10
-KPX L V -20
-
-KPX O period -20
-KPX O comma -10
-KPX O Y 10
-KPX O T 20
-KPX O A -20
-
-KPX P period -50
-KPX P o -10
-KPX P e -10
-KPX P comma -40
-KPX P a -20
-KPX P A -10
-
-KPX Q U -10
-
-KPX R Y 10
-KPX R W 10
-KPX R T 20
-
-KPX T o -20
-KPX T i 20
-KPX T hyphen -20
-KPX T h 20
-KPX T e -20
-KPX T a -20
-KPX T O 30
-KPX T A 10
-
-KPX V period -100
-KPX V o -20
-KPX V e -20
-KPX V comma -90
-KPX V a -20
-KPX V O 10
-KPX V G -20
-
-KPX W period -50
-KPX W o -20
-KPX W i 10
-KPX W h 10
-KPX W e -20
-KPX W comma -40
-KPX W a -20
-KPX W O 10
-
-KPX Y u -20
-KPX Y period -50
-KPX Y o -50
-KPX Y i 10
-KPX Y e -40
-KPX Y comma -40
-KPX Y a -60
-
-KPX b period -30
-KPX b l -20
-KPX b comma -20
-KPX b b -20
-
-KPX c k -10
-
-KPX comma quoteright -70
-KPX comma quotedblright -70
-
-KPX d w -20
-KPX d v -10
-KPX d d -40
-
-KPX e y 10
-
-KPX f quoteright 30
-KPX f quotedblright 30
-KPX f period -50
-KPX f f -50
-KPX f e -10
-KPX f comma -40
-KPX f a -20
-
-KPX g y 10
-KPX g period -30
-KPX g i 10
-KPX g e 10
-KPX g comma -20
-KPX g a 10
-
-KPX k y 10
-KPX k o -10
-KPX k e -20
-
-KPX m y 10
-KPX m u 10
-
-KPX n y 20
-
-KPX o period -30
-KPX o comma -20
-
-KPX p period -30
-KPX p p -10
-KPX p comma -20
-
-KPX period quoteright -80
-KPX period quotedblright -80
-
-KPX quotedblleft quoteleft 20
-KPX quotedblleft A 10
-
-KPX quoteleft quoteleft -115
-KPX quoteleft A 10
-
-KPX quoteright v 30
-KPX quoteright t 20
-KPX quoteright s -25
-KPX quoteright r 30
-KPX quoteright quoteright -115
-KPX quoteright quotedblright 20
-KPX quoteright l 20
-
-KPX r period -50
-KPX r i 10
-KPX r comma -40
-
-KPX s period -20
-KPX s comma -10
-
-KPX v period -30
-KPX v comma -20
-
-KPX w period -30
-KPX w o 10
-KPX w h 20
-KPX w comma -20
-EndKernPairs
-EndKernData
-StartComposites 56
-CC Aacute 2 ; PCC A 0 0 ; PCC acute 280 162 ;
-CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 240 172 ;
-CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 240 152 ;
-CC Agrave 2 ; PCC A 0 0 ; PCC grave 250 162 ;
-CC Aring 2 ; PCC A 0 0 ; PCC ring 260 172 ;
-CC Atilde 2 ; PCC A 0 0 ; PCC tilde 180 152 ;
-CC Eacute 2 ; PCC E 0 0 ; PCC acute 230 162 ;
-CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 180 172 ;
-CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 170 152 ;
-CC Egrave 2 ; PCC E 0 0 ; PCC grave 220 162 ;
-CC Iacute 2 ; PCC I 0 0 ; PCC acute 110 162 ;
-CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 60 172 ;
-CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 50 152 ;
-CC Igrave 2 ; PCC I 0 0 ; PCC grave 100 162 ;
-CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 210 142 ;
-CC Oacute 2 ; PCC O 0 0 ; PCC acute 160 162 ;
-CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 130 172 ;
-CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 120 152 ;
-CC Ograve 2 ; PCC O 0 0 ; PCC grave 150 162 ;
-CC Otilde 2 ; PCC O 0 0 ; PCC tilde 90 142 ;
-CC Scaron 2 ; PCC S 0 0 ; PCC caron 120 172 ;
-CC Uacute 2 ; PCC U 0 0 ; PCC acute 310 162 ;
-CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 260 172 ;
-CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 260 152 ;
-CC Ugrave 2 ; PCC U 0 0 ; PCC grave 270 162 ;
-CC Yacute 2 ; PCC Y 0 0 ; PCC acute 220 162 ;
-CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 170 152 ;
-CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 130 172 ;
-CC aacute 2 ; PCC a 0 0 ; PCC acute 70 0 ;
-CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 20 0 ;
-CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 10 0 ;
-CC agrave 2 ; PCC a 0 0 ; PCC grave 80 0 ;
-CC aring 2 ; PCC a 0 0 ; PCC ring 60 0 ;
-CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ;
-CC eacute 2 ; PCC e 0 0 ; PCC acute 40 0 ;
-CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex -10 0 ;
-CC edieresis 2 ; PCC e 0 0 ; PCC dieresis -20 0 ;
-CC egrave 2 ; PCC e 0 0 ; PCC grave 30 0 ;
-CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -30 0 ;
-CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -80 0 ;
-CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -100 0 ;
-CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -40 0 ;
-CC ntilde 2 ; PCC n 0 0 ; PCC tilde 10 0 ;
-CC oacute 2 ; PCC o 0 0 ; PCC acute 60 0 ;
-CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 10 0 ;
-CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 10 0 ;
-CC ograve 2 ; PCC o 0 0 ; PCC grave 60 0 ;
-CC otilde 2 ; PCC o 0 0 ; PCC tilde -20 0 ;
-CC scaron 2 ; PCC s 0 0 ; PCC caron -10 0 ;
-CC uacute 2 ; PCC u 0 0 ; PCC acute 70 0 ;
-CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ;
-CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 20 0 ;
-CC ugrave 2 ; PCC u 0 0 ; PCC grave 50 0 ;
-CC yacute 2 ; PCC y 0 0 ; PCC acute 60 0 ;
-CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ;
-CC zcaron 2 ; PCC z 0 0 ; PCC caron 40 0 ;
-EndComposites
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/AFM/ZapfDingbats.afm b/blt3.0/library/AFM/ZapfDingbats.afm
deleted file mode 100644
index 24fd05e..0000000
--- a/blt3.0/library/AFM/ZapfDingbats.afm
+++ /dev/null
@@ -1,223 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated.  All rights reserved.
-Comment Creation Date: Fri Dec  1 12:57:42 1989
-Comment UniqueID 26200
-Comment VMusage 39281 49041
-FontName ZapfDingbats
-FullName ITC Zapf Dingbats
-FamilyName ITC Zapf Dingbats
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -1 -143 981 820
-UnderlinePosition -98
-UnderlineThickness 54
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated.  All rights reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
-EncodingScheme FontSpecific
-StartCharMetrics 202
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
-C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
-C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
-C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
-C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
-C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
-C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
-C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ;
-C 41 ; WX 690 ; N a117 ; B 35 138 655 553 ;
-C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
-C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
-C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
-C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
-C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
-C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
-C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
-C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
-C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ;
-C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ;
-C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
-C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
-C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
-C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
-C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ;
-C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
-C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
-C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
-C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
-C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
-C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
-C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
-C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
-C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
-C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
-C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
-C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
-C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
-C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ;
-C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ;
-C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
-C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
-C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
-C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
-C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
-C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
-C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
-C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
-C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
-C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
-C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
-C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
-C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
-C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
-C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
-C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
-C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
-C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
-C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
-C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ;
-C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
-C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
-C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
-C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
-C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
-C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
-C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
-C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
-C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
-C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
-C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
-C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
-C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
-C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
-C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
-C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
-C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
-C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
-C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
-C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
-C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
-C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
-C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
-C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
-C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
-C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
-C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
-C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
-C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
-C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
-C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
-C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
-C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
-C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
-C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
-C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
-C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
-C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
-C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
-C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
-C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
-C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
-C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
-C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
-C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
-C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
-C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
-C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
-C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
-C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
-C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
-C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
-C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
-C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
-C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
-C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
-C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
-C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
-C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
-C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
-C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
-C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
-C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
-C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
-C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
-C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
-C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
-C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
-C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
-C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
-C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
-C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
-C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
-C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
-C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
-C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
-C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
-C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
-C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
-C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
-C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
-C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
-C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
-C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
-C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
-C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
-C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
-C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ;
-C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ;
-C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
-C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
-C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
-C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
-C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ;
-C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
-C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
-C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
-C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
-C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
-C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
-C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
-C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ;
-C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
-C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
-C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
-C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
-C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
-C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
-C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
-C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
-C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
-C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
-C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
-C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
-C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
-C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
-C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
-C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
-C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
-C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
-C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
-C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
-C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
-C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
-C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
-C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
-C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
-C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
-C -1 ; WX 410 ; N a86 ; B 35 0 375 692 ;
-C -1 ; WX 509 ; N a85 ; B 35 0 475 692 ;
-C -1 ; WX 334 ; N a95 ; B 35 0 299 692 ;
-C -1 ; WX 509 ; N a205 ; B 35 0 475 692 ;
-C -1 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
-C -1 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
-C -1 ; WX 276 ; N a91 ; B 35 0 242 692 ;
-C -1 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
-C -1 ; WX 410 ; N a206 ; B 35 0 375 692 ;
-C -1 ; WX 317 ; N a94 ; B 35 0 283 692 ;
-C -1 ; WX 317 ; N a93 ; B 35 0 283 692 ;
-C -1 ; WX 276 ; N a92 ; B 35 0 242 692 ;
-C -1 ; WX 334 ; N a96 ; B 35 0 299 692 ;
-C -1 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
-EndCharMetrics
-EndFontMetrics
-
\ No newline at end of file
diff --git a/blt3.0/library/Makefile.in b/blt3.0/library/Makefile.in
deleted file mode 100644
index 8ad49b2..0000000
--- a/blt3.0/library/Makefile.in
+++ /dev/null
@@ -1,88 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for library files and directories of BLT library
-# ------------------------------------------------------------------------
-
-datadir =	@datadir@
-datarootdir = 	@datarootdir@
-exec_prefix =	@exec_prefix@
-libdir =	@libdir@
-prefix =	@prefix@
-srcdir =	@srcdir@
-
-version =	@BLT_VERSION@
-so_prefix =	@BLT_SO_PREFIX@
-so_ext =	@BLT_SO_EXT@
-lib_suffix =	@BLT_LIB_SUFFIX@
-pkgdir =	@BLT_LIBRARY@
-
-INSTALL =	@INSTALL@
-INSTALL_DATA =  @INSTALL_DATA@
-RM =		rm -f
-SHELL =		/bin/sh
-MKDIR_P =	@MKDIR_P@
-
-cursors = 	treeview.xbm \
-		treeview_m.xbm
-
-WIN32 = 	@WIN32@
-ifneq ("$(WIN32)", "")
-cursors += 	treeview.cur
-endif
-
-libraryFiles = \
-		bltCanvEps.pro \
-		bltGraph.pro \
-		combobutton.tcl \
-		comboentry.tcl \
-		combomenu.tcl \
-		combotree.tcl \
-		dnd.tcl \
-		dragdrop.tcl \
-		drawer.tcl \
-		filmstrip.tcl \
-		graph.tcl \
-		paneset.tcl \
-		scrollbar.tcl \
-		scrollset.tcl \
-		tabset.tcl \
-		treeview.tcl \
-		tclIndex \
-		$(cursors)
-
-ddFiles =       dd-color.tcl \
-		dd-file.tcl \
-		dd-number.tcl \
-		dd-text.tcl \
-		tclIndex
-
-all: pkgIndex
-
-pkgIndex: 
-	rm -f pkgIndex.tcl
-	sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \
-	sed -e 's/%SO_PREFIX%/$(so_prefix)/' | \
-	sed -e 's/%LIB_SUFFIX%/$(lib_suffix)/' | \
-	sed -e 's/%SO_EXT%/$(so_ext)/' | \
-	sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl
-
-
-install: mkdirs pkgIndex
-	for i in $(ddFiles) ; do \
-	    $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i \
-			$(DESTDIR)$(pkgdir)/dd_protocols ; \
-	done 
-	for i in $(libraryFiles) ; do \
-	    $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdir) ; \
-	done 
-	$(INSTALL_DATA) pkgIndex.tcl $(pkgdir)
-	$(MAKE) -C AFM install
-
-mkdirs:
-	$(MKDIR_P) $(DESTDIR)/$(pkgdir)
-	$(MKDIR_P) $(DESTDIR)/$(pkgdir)/dd_protocols
-
-clean:
-	$(RM) pkgIndex.tcl
-
-distclean: clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* Makefile
diff --git a/blt3.0/library/Makefile.vc b/blt3.0/library/Makefile.vc
deleted file mode 100644
index 0034233..0000000
--- a/blt3.0/library/Makefile.vc
+++ /dev/null
@@ -1,71 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for library files and directories of BLT library
-# ------------------------------------------------------------------------
-
-include ../vc.config
-srcdir = ../$(TOP)/library
-
-version =	$(BLT_MAJOR_VERSION).$(BLT_MINOR_VERSION)
-pkgdir =	$(libdir)/tcl$(v1)/blt$(version)
-
-cursors = 	treeview.cur
-
-miscFiles     = bltCanvEps.pro \
-		bltGraph.pro \
-		dnd.tcl \
-		dragdrop.tcl \
-		graph.tcl \
-		hierbox.tcl \
-		tabnotebook.tcl \
-		tabset.tcl \
-		treeview.tcl \
-		tclIndex \
-		$(cursors)
-
-ddFiles =	dd-color.tcl \
-		dd-file.tcl \
-		dd-number.tcl \
-		dd-text.tcl \
-		tclIndex
-
-instdirs =	$(prefix) $(exec_prefix) $(libdir) \
-		$(scriptdir) $(scriptdir)/dd_protocols $(libdir)/tcl$(v1) \
-		$(pkgdir)
-
-all: pkgIndex.tcl
-
-install: install-dirs install-ddfiles install-files install-pkgindex
-
-install-dirs:
-	@for i in $(instdirs) ; do \
-	    if test -d "$$i" ; then : ; else mkdir "$$i" ; fi ; \
-        done
-
-install-ddfiles: install-dirs
-	for i in $(ddFiles) ; do \
-	    $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i $(scriptdir)/dd_protocols ; \
-	done 
-
-install-files: install-dirs
-	for i in $(miscFiles) ; do \
-	    $(INSTALL_DATA) $(srcdir)/$$i $(scriptdir) ; \
-	done 
-
-
-pkgIndex.tcl: $(srcdir)/pkgIndex.tcl.in
-	rm -f pkgIndex.tcl
-	sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \
-	sed -e 's/%LIB_PREFIX%//' | \
-	sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl
-
-install-pkgindex: pkgIndex.tcl
-	$(INSTALL_DATA) pkgIndex.tcl $(scriptdir)
-	$(INSTALL_DATA) pkgIndex.tcl $(pkgdir)
-
-clean:
-	$(RM) pkgIndex.tcl
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* 
-
-distclean: clean
-	$(RM) Makefile
diff --git a/blt3.0/library/ZoomStack.itcl b/blt3.0/library/ZoomStack.itcl
deleted file mode 100644
index 09601d7..0000000
--- a/blt3.0/library/ZoomStack.itcl
+++ /dev/null
@@ -1,359 +0,0 @@
-import add itcl
-
-class ZoomStackGraph {
-
-    # The name of graph (nee the namespace path)
-    variable graph ""
-
-    # Indicates which corner of the rectangular zoom region 
-    # is currently being choosen.  
-    variable corner "first"
-
-    # Coordinates of the current zoom region. They represent the
-    # two corners of a rectangular area.  The two points are order 
-    # independent.
-    variable x1
-    variable y1
-    variable x2
-    variable y2
-
-    # A list of axis configuration commmands.  Acts as a stack to
-    # unzoom the graph back to previous axis limits.
-    variable stack {}
-
-    constructor { args } {
-	# This will need to change when we start using inheritance.
-	set graph [info namespace tail $this]
-
-	# What about collisions between the blt::graph instance
-	# command and the ZoomStackGraph instance command?
-	blt::graph $graph
-
-	if { [llength $args] > 0 } {
-	    $graph configure $args
-	}
-	# Set up the bindings to select/deselect the zoom region
-	bind $graph <1> [code $this SelectPoint %x %y]
-	bind $graph <3> [code $this ClearZoom]
-	# The particular mouse buttons should be configurable.
-    }
-    destructor {
-	if { [winfo exists $graph] } {
-	    destroy $graph
-	}
-    }
-
-    # These methods are used internally, within this class, to manage the
-    # zoom stack.
-    private method SaveCoords { x y } 
-    private method Zoom {}
-    private method Unzoom {}
-    private method Push { cmd }
-    private method Pop {}
-    private method MarkPoint { x y }
-    private method SetTitle { title }
-    private method DrawBox { } 
-
-    # These methods are called by "bind" and "after" from the Tk 
-    # event loop.  Is there any way of hiding them, so that it
-    # doesn't look to the user as part of the public interface?
-    method ClearZoom {}
-    method ClearTitle {}
-    method UpdateOutline { x y } 
-    method SelectPoint { x y }
-}
-
-# ----------------------------------------------------------------------
-# 
-# SaveCoords --
-#
-#	Given a point on the screen, transforms the point into graph 
-#	coordinates and saves it as one of the points representing a 
-#	corner of the zoom region. 
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::SaveCoords { x y } {
-
-    set coords [$graph invtransform $x $y]
-    set x [lindex $coords 0]
-    set y [lindex $coords 1]
-
-    scan [$graph xaxis limits] "%s %s" min max
-    if { $x > $max } { 
-	set x $max 
-    } elseif { $x < $min } { 
-	set x $min 
-    }
-
-    scan [$graph yaxis limits] "%s %s" min max
-    if { $y > $max } { 
-	set y $max 
-    } elseif { $y < $min } { 
-	set y $min 
-    }
-
-    if { $corner == "first" } {
-	set x1 $x ; set y1 $y 
-    } else {
-	set x2 $x ; set y2 $y
-    }
-}
-
-# ----------------------------------------------------------------------
-# 
-# MarkPoint --
-#
-#	Adds text around one of the corners of the zoom region.
-#	The text consists of the x,y graph coordinates of the 
-#	corner.
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::MarkPoint { x y } {
-
-    set marker "bltZoom_text_$corner"
-    set text [format "x=%.4g\ny=%.4g" $x $y] 
-
-    if [$graph marker exists $marker] {
-     	$graph marker configure $marker -coords { $x $y } -text $text 
-    } else {
-    	$graph marker create text -coords { $x $y } -name $marker \
-   	    -font *lucida*-r-*-10-* \
-	    -text $text -anchor center -bg {} -justify left
-    }
-}
-
-# ----------------------------------------------------------------------
-# 
-# Empty --
-#
-#	Indicates if the stack of axis configuration commands is
-#	empty.
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::Empty { } {
-    return [llength $stack]
-}
-
-
-# ----------------------------------------------------------------------
-# 
-# Push --
-#
-#	Appends a command on the list "stack" which can be used
-#	to return to previous graph x and y axis ranges.  
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::Push { cmd } {
-    lappend stack $cmd
-}
-
-# ----------------------------------------------------------------------
-# 
-# Pop --
-#
-#	Remove the last item pushed onto the stack and returns it.
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::Pop { } {
-    set cmd [lindex $stack end]
-    set stack [lreplace $stack end end]
-    return $cmd
-}
-
-# ----------------------------------------------------------------------
-# 
-# ClearTitle --
-#
-#	Clears the zoom title (displayed in the upper left corner
-#	of the graph).  This routine is called from the event queue 
-#	using "after".
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::ClearTitle {} {
-    $graph marker delete "bltZoom_title"
-}
-
-# ----------------------------------------------------------------------
-# 
-# Unzoom --
-#
-#	Reverts to a previous zoom.  Resets the x and y axis limits
-#	back to a previous setting.  First checks if there's anything
-#	to pop back to.  In addition, displays a title in the upper
-#	left corner showing the current zoom level.
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::Unzoom { } {
-
-    if ![Empty] {
-
-	# Reset the x and y axis limits, by invoking the saved graph
-	# command.
-	eval [Pop]
-
-	# Cheat:  Using "Empty" to get the number of entries on the stack.
-	set level [Empty]
-	if { $level > 0 } {
-	    SetTitle "Zoom #$level"
-	}
-
-	blt::busy hold $graph
-	update
-	if { $corner == "first" } {
-	    # Remember to remove the zoom title in a couple of seconds
-	    after 2000 [code $this ClearTitle]
-	}
-	blt::busy release $graph
-    } else {
-	$graph marker delete "bltZoom_title"
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# Zoom --
-# 
-#	Push the old axis limits on the stack and set them to the
-#	zoom region.
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::Zoom { } {
-    $graph marker delete "bltZoom_*" 
-
-    if { ($x1 == $x2) && ($y1 == $y2) } { 
-	# The first and last points of the zoom region are the same.
-	# Revert back to the start.
-	return
-    }
-
-    # Put a command on the stack that lets us revert back to the current 
-    # axis limits.
-    set cmd [format {
-	%s xaxis configure -min "%s" -max "%s"
-	%s yaxis configure -min "%s" -max "%s"
-    } $graph [$graph xaxis cget -min] [$graph xaxis cget -max] \
-		 $graph [$graph yaxis cget -min] [$graph yaxis cget -max] ]
-    Push $cmd
-
-    # The first and last corners of the zoom region don't have to be
-    # selected in ascending order.  So consider their relative positions
-    # when setting min and max axis limits.
-
-    if { $x1 > $x2 } { 
-	$graph xaxis configure -min $x2 -max $x1 
-    } elseif { $x1 < $x2 } {
-	$graph xaxis configure -min $x1 -max $x2
-    } 
-    if { $y1 > $y2 } { 
-	$graph yaxis configure -min $y2 -max $y1
-    } elseif { $y1 < $y2 } {
-	$graph yaxis configure -min $y1 -max $y2
-    } 
-
-    # Call "update" explicitly here after the graph is made busy.
-    # This prevents the user from inadvertantly selecting another zoom
-    # region when the graph is recalculating and redrawing itself.
-
-    blt::busy hold $graph
-    update
-    blt::busy release $graph
-}
-
-# ----------------------------------------------------------------------
-# 
-# ClearZoom --
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::ClearZoom { } {
-
-    $graph marker delete "bltZoom_*" 
-    if { $corner == "first" } {
-	# We're haven't started to select a zoom region, so assume
-	# that we want to revert back to a previous zoom level.
-	Unzoom
-    } else {
-	# Let the user re-pick the first corner again. So reset the
-	# indicator "corner" and turn off the <Motion> binding.
-	set corner "first"
-	bind $graph <Motion> {}
-    }
-}
-
-# ----------------------------------------------------------------------
-# 
-# SetTitle --
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::SetTitle { title } {
-
-    $graph marker create text -name "bltZoom_title" -text $title \
-	    -coords {-Inf Inf} -anchor nw -bg {} 
-}
-
-# ----------------------------------------------------------------------
-# 
-# UpdateOutline --
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::UpdateOutline { x y } {
-    SaveCoords $x $y
-    MarkPoint $x2 $y2
-    DrawBox
-}
-
-# ----------------------------------------------------------------------
-# 
-# SelectPoint --
-#
-#	Invoked from the binding to ButtonPress-1 events.  Saves
-#	a corner of zoom region.
-#
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::SelectPoint { x y } {
-
-    SaveCoords $x $y 
-    if { $corner == "first" } {
-	MarkPoint $x1 $y1
-
-	# Display a new title indicating zoom pick is active
-	set level [expr [llength $stack] + 1]
-	SetTitle "Zoom #$level"
-
-	# Start watching now for motion events, drawing an outline
-	bind $graph <Any-Motion> [code $this UpdateOutline %x %y]
-
-	# Indicate the next corner is the last 
-	set corner last
-    } else {
-
-	# Stop watching motion events
-	bind $graph <Any-Motion> {}
-
-	# Zoom into the new region defined by the outline
-	Zoom
-
-	# Reset to select the first corner, again
-	set corner first
-    }
-}
-
-# ----------------------------------------------------------------------
-# 
-# DrawBox --
-#
-# ----------------------------------------------------------------------
-body ZoomStackGraph::DrawBox { } {
-
-    set coords {
-	$x1 $y1 $x2 $y1 $x2 $y2 $x1 $y2 $x1 $y1
-    }
-    if [$graph marker exists "bltZoom_outline"] {
-	$graph marker configure "bltZoom_outline" -coords $coords
-    } else {
-	$graph marker create line -coords $coords -name "bltZoom_outline" \
-	    -dashes { 4 2 }
-    }
-    $graph marker before "bltZoom_outline"
-}
-
diff --git a/blt3.0/library/bltCanvEps.pro b/blt3.0/library/bltCanvEps.pro
deleted file mode 100644
index 7b275aa..0000000
--- a/blt3.0/library/bltCanvEps.pro
+++ /dev/null
@@ -1,78 +0,0 @@
-%
-% PostScript encapulator prolog file of the BLT "eps" canvas item.
-%
-% Copyright 1991-1997 Bell Labs Innovations for Lucent Technologies.
-%
-% Permission to use, copy, modify, and distribute this software and its
-% documentation for any purpose and without fee is hereby granted, provided
-% that the above copyright notice appear in all copies and that both that the
-% copyright notice and warranty disclaimer appear in supporting documentation,
-% and that the names of Lucent Technologies any of their entities not be used
-% in advertising or publicity pertaining to distribution of the software
-% without specific, written prior permission.
-%
-% Lucent Technologies disclaims all warranties with regard to this software,
-% including all implied warranties of merchantability and fitness.  In no event
-% shall Lucent Technologies be liable for any special, indirect or
-% consequential damages or any damages whatsoever resulting from loss of use,
-% data or profits, whether in an action of contract, negligence or other
-% tortuous action, arising out of or in connection with the use or performance
-% of this software.
-%
-
-%
-% The definitions of the next two macros are from Appendix H of 
-% Adobe's "PostScript Language Reference Manual" pp. 709-736.
-% 
-
-% Prepare for EPS file
-
-/BeginEPSF {				
-  /beforeInclusionState save def
-  /dictCount countdictstack def		% Save the # objects in the dictionary
-  /opCount count 1 sub def		% Count object on operator stack
-  userdict begin			% Make "userdict" the current 
-					% dictionary
-    /showpage {} def			% Redefine showpage to be null
-    0 setgray 
-    0 setlinecap
-    1 setlinewidth
-    0 setlinejoin
-    10 setmiterlimit
-    [] 0 setdash
-    newpath
-    /languagellevel where {
-      pop languagelevel 
-      1 ne {
-	false setstrokeadjust false setoverprint
-      } if
-    } if
-    % note: no "end"
-} bind def
-
-/EndEPSF { %def
-  count opCount sub {
-    pop
-  } repeat
-  countdictstack dictCount sub { 
-  end					% Clean up dictionary stack
-  } repeat
-  beforeInclusionState restore
-} bind def
-
-
-%
-% Set up a clip region based upon a bounding box (x1, y1, x2, y2).
-%
-/SetClipRegion {
-  % Stack: x1 y1 x2 y2
-  newpath
-  4 2 roll moveto
-  1 index 0 rlineto
-  0 exch rlineto
-  neg 0 rlineto
-  closepath
-  clip
-  newpath
-} def
-
diff --git a/blt3.0/library/bltGraph.pro b/blt3.0/library/bltGraph.pro
deleted file mode 100644
index 813d92a..0000000
--- a/blt3.0/library/bltGraph.pro
+++ /dev/null
@@ -1,472 +0,0 @@
-
-%%BeginProlog
-%
-% PostScript prolog file of the BLT graph widget.
-%
-% Copyright 1989-1992 Regents of the University of California.
-% Permission to use, copy, modify, and distribute this
-% software and its documentation for any purpose and without
-% fee is hereby granted, provided that the above copyright
-% notice appear in all copies.  The University of California
-% makes no representations about the suitability of this
-% software for any purpose.  It is provided "as is" without
-% express or implied warranty.
-%
-% Copyright 1991-1997 Bell Labs Innovations for Lucent Technologies.
-%
-% Permission to use, copy, modify, and distribute this software and its
-% documentation for any purpose and without fee is hereby granted, provided
-% that the above copyright notice appear in all copies and that both that the
-% copyright notice and warranty disclaimer appear in supporting documentation,
-% and that the names of Lucent Technologies any of their entities not be used
-% in advertising or publicity pertaining to distribution of the software
-% without specific, written prior permission.
-%
-% Lucent Technologies disclaims all warranties with regard to this software,
-% including all implied warranties of merchantability and fitness.  In no event
-% shall Lucent Technologies be liable for any special, indirect or
-% consequential damages or any damages whatsoever resulting from loss of use,
-% data or profits, whether in an action of contract, negligence or other
-% tortuous action, arising out of or in connection with the use or performance
-% of this software.
-%
-
-200 dict begin
-
-/BaseRatio 1.3467736870885982 def	% Ratio triangle base / symbol size
-/BgColorProc 0 def			% Background color routine (symbols)
-/DrawSymbolProc 0 def			% Routine to draw symbol outline/fill
-/StippleProc 0 def			% Stipple routine (bar segments)
-/DashesProc 0 def			% Dashes routine (line segments)
-  
-% Define the array ISOLatin1Encoding (which specifies how characters are 
-% encoded for ISO-8859-1 fonts), if it isn't already present (Postscript 
-% level 2 is supposed to define it, but level 1 doesn't). 
- 
-systemdict /ISOLatin1Encoding known not { 
-  /ISOLatin1Encoding [ 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /space /exclam /quotedbl /numbersign /dollar /percent /ampersand 
-    /quoteright 
-    /parenleft /parenright /asterisk /plus /comma /minus /period /slash 
-    /zero /one /two /three /four /five /six /seven 
-    /eight /nine /colon /semicolon /less /equal /greater /question 
-    /at /A /B /C /D /E /F /G 
-    /H /I /J /K /L /M /N /O 
-    /P /Q /R /S /T /U /V /W 
-    /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore 
-    /quoteleft /a /b /c /d /e /f /g 
-    /h /i /j /k /l /m /n /o 
-    /p /q /r /s /t /u /v /w 
-    /x /y /z /braceleft /bar /braceright /asciitilde /space 
-    /space /space /space /space /space /space /space /space 
-    /space /space /space /space /space /space /space /space 
-    /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent 
-    /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron 
-    /space /exclamdown /cent /sterling /currency /yen /brokenbar /section 
-    /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen 
-    /registered /macron 
-    /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph 
-    /periodcentered 
-    /cedillar /onesuperior /ordmasculine /guillemotright /onequarter 
-    /onehalf /threequarters /questiondown 
-    /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla 
-    /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex 
-    /Idieresis 
-    /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply 
-    /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn 
-    /germandbls 
-    /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla 
-    /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex 
-    /idieresis 
-    /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide 
-    /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn 
-    /ydieresis 
-  ] def 
-} if 
-
-% font ISOEncode font 
-% This procedure changes the encoding of a font from the default 
-% Postscript encoding to ISOLatin1.  It is typically invoked just 
-% before invoking "setfont".  The body of this procedure comes from 
-% Section 5.6.1 of the Postscript book. 
-
-/ISOEncode { 
-  dup length dict
-  begin 
-    {1 index /FID ne {def} {pop pop} ifelse} forall 
-    /Encoding ISOLatin1Encoding def 
-    currentdict 
-  end 
-
-  % I'm not sure why it's necessary to use "definefont" on this new 
-  % font, but it seems to be important; just use the name "Temporary" 
-  % for the font. 
-
-  /Temporary exch definefont 
-} bind def 
-
-/Stroke {
-  gsave
-    stroke
-  grestore
-} def
-
-/Fill {
-  gsave
-    fill
-  grestore
-} def
-
-/SetFont { 	
-  % Stack: pointSize fontName
-  findfont exch scalefont ISOEncode setfont
-} def
-
-/Box {
-  % Stack: x y width height
-  newpath
-    exch 4 2 roll moveto
-    dup 0 rlineto
-    exch 0 exch rlineto
-    neg 0 rlineto
-  closepath
-} def
-
-% The next two definitions are taken from "$tk_library/prolog.ps"
-
-% desiredSize EvenPixels closestSize
-%
-% The procedure below is used for stippling.  Given the optimal size
-% of a dot in a stipple pattern in the current user coordinate system,
-% compute the closest size that is an exact multiple of the device's
-% pixel size.  This allows stipple patterns to be displayed without
-% aliasing effects.
-
-/EvenPixels {
-  % Compute exact number of device pixels per stipple dot.
-  dup 0 matrix currentmatrix dtransform
-  dup mul exch dup mul add sqrt
-
-  % Round to an integer, make sure the number is at least 1, and compute
-  % user coord distance corresponding to this.
-  dup round dup 1 lt {pop 1} if
-  exch div mul
-} bind def
-
-% width height string filled StippleFill --
-%
-% Given a path and other graphics information already set up, this
-% procedure will fill the current path in a stippled fashion.  "String"
-% contains a proper image description of the stipple pattern and
-% "width" and "height" give its dimensions.  If "filled" is true then
-% it means that the area to be stippled is gotten by filling the
-% current path (e.g. the interior of a polygon); if it's false, the
-% area is gotten by stroking the current path (e.g. a wide line).
-% Each stipple dot is assumed to be about one unit across in the
-% current user coordinate system.
-
-% width height string StippleFill --
-%
-% Given a path already set up and a clipping region generated from
-% it, this procedure will fill the clipping region with a stipple
-% pattern.  "String" contains a proper image description of the
-% stipple pattern and "width" and "height" give its dimensions.  Each
-% stipple dot is assumed to be about one unit across in the current
-% user coordinate system.  This procedure trashes the graphics state.
-
-/StippleFill {
-    % The following code is needed to work around a NeWSprint bug.
-
-    /tmpstip 1 index def
-
-    % Change the scaling so that one user unit in user coordinates
-    % corresponds to the size of one stipple dot.
-    1 EvenPixels dup scale
-
-    % Compute the bounding box occupied by the path (which is now
-    % the clipping region), and round the lower coordinates down
-    % to the nearest starting point for the stipple pattern.  Be
-    % careful about negative numbers, since the rounding works
-    % differently on them.
-
-    pathbbox
-    4 2 roll
-    5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
-    6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
-
-    % Stack now: width height string y1 y2 x1 x2
-    % Below is a doubly-nested for loop to iterate across this area
-    % in units of the stipple pattern size, going up columns then
-    % across rows, blasting out a stipple-pattern-sized rectangle at
-    % each position
-
-    6 index exch {
-	2 index 5 index 3 index {
-	    % Stack now: width height string y1 y2 x y
-
-	    gsave
-	    1 index exch translate
-	    5 index 5 index true matrix tmpstip imagemask
-	    grestore
-	} for
-	pop
-    } for
-    pop pop pop pop pop
-} bind def
-
-
-/LS {	% Stack: x1 y1 x2 y2
-  newpath 
-    4 2 roll moveto 
-    lineto 
-  closepath
-  stroke
-} def
-
-/EndText {
-  %Stack :
-  grestore
-} def
-
-/BeginText {
-  %Stack :  w h theta centerX centerY
-  gsave
-    % Translate the origin to the center of bounding box and rotate
-    translate neg rotate
-    % Translate back to the origin of the text region
-    -0.5 mul exch -0.5 mul exch translate
-} def
-
-/DrawAdjText {
-  %Stack : str strWidth x y
-  moveto				% Go to the text position
-  exch dup dup 4 2 roll
-
-  % Adjust character widths to get desired overall string width
-  % adjust X = (desired width - real width)/#chars
-
-  stringwidth pop sub exch
-  length div
-  0 3 -1 roll
-
-  % Flip back the scale so that the string is not drawn in reverse
-
-  gsave
-    1 -1 scale
-    ashow
-  grestore
-} def
-
-/DrawBitmap {
-  % Stack: ?bgColorProc? boolean centerX centerY width height theta imageStr
-  gsave
-    6 -2 roll translate			% Translate to center of bounding box
-    4 1 roll neg rotate			% Rotate by theta
-    
-    % Find upperleft corner of bounding box
-    
-    2 copy -.5 mul exch -.5 mul exch translate
-    2 copy scale			% Make pixel unit scale
-    newpath
-      0 0 moveto 
-      0 1 lineto 
-      1 1 lineto 
-      1 0 lineto
-    closepath
-    
-    % Fill rectangle with background color
-    
-    4 -1 roll { 
-      gsave 
-	4 -1 roll exec fill 
-      grestore 
-    } if
-    
-    % Paint the image string into the unit rectangle
-    
-    2 copy true 3 -1 roll 0 0 5 -1 roll 0 0 6 array astore 5 -1 roll
-    imagemask
-  grestore
-} def
-
-% Symbols:
-
-% Skinny-cross
-/Sc {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate 45 rotate
-    0 0 3 -1 roll Sp
-  grestore
-} def
-
-% Skinny-plus
-/Sp {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    2 idiv
-    dup 2 copy
-    newpath 
-      neg 0 
-      moveto 0 
-      lineto
-    DrawSymbolProc
-    newpath 
-      neg 0 
-      exch moveto 0 
-      exch lineto
-    DrawSymbolProc
-  grestore
-} def
-
-% Cross
-/Cr {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate 45 rotate
-    0 0 3 -1 roll Pl
-  grestore
-} def
-
-% Plus
-/Pl {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    dup 2 idiv
-    exch 6 idiv
-
-    %
-    %          2   3		The plus/cross symbol is a
-    %				closed polygon of 12 points.
-    %      0   1   4    5	The diagram to the left
-    %           x,y		represents the positions of
-    %     11  10   7    6	the points which are computed
-    %				below.
-    %          9   8
-    %
-
-    newpath
-      2 copy exch neg exch neg moveto 
-      dup neg dup lineto
-      2 copy neg exch neg lineto
-      2 copy exch neg lineto
-      dup dup neg lineto 
-      2 copy neg lineto 2 copy lineto
-      dup dup lineto 
-      2 copy exch lineto 
-      2 copy neg exch lineto
-      dup dup neg exch lineto 
-      exch neg exch lineto
-    closepath
-    DrawSymbolProc
-  grestore
-} def
-
-% Circle
-/Ci {
-  % Stack: x y symbolSize
-  gsave
-    3 copy pop moveto 
-    newpath
-      2 div 0 360 arc
-    closepath 
-    DrawSymbolProc
-  grestore
-} def
-
-% Square
-/Sq {
-  % Stack: x y symbolSize
-  gsave
-    dup dup 2 div dup
-    6 -1 roll exch sub exch
-    5 -1 roll exch sub 4 -2 roll Box
-    DrawSymbolProc
-  grestore
-} def
-
-% Line
-/Li {
-  % Stack: x y symbolSize
-  gsave
-    3 1 roll exch 3 -1 roll 2 div 3 copy
-    newpath
-      sub exch moveto 
-      add exch lineto
-    closepath
-    stroke
-  grestore
-} def
-
-% Diamond
-/Di {
-  % Stack: x y symbolSize
-  gsave
-    3 1 roll translate 45 rotate 0 0 3 -1 roll Sq
-  grestore
-} def
-    
-% Triangle
-/Tr {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    BaseRatio mul 0.5 mul		% Calculate 1/2 base
-    dup 0 exch 30 cos mul		% h1 = height above center point
-    neg					% b2 0 -h1
-    newpath 
-      moveto				% point 1;  b2
-      dup 30 sin 30 cos div mul		% h2 = height below center point
-      2 copy lineto			% point 2;  b2 h2
-      exch neg exch lineto		% 
-    closepath
-    DrawSymbolProc
-  grestore
-} def
-
-% Arrow
-/Ar {
-  % Stack: x y symbolSize
-  gsave
-    3 -2 roll translate
-    BaseRatio mul 0.5 mul		% Calculate 1/2 base
-    dup 0 exch 30 cos mul		% h1 = height above center point
-					% b2 0 h1
-    newpath moveto			% point 1;  b2
-    dup 30 sin 30 cos div mul		% h2 = height below center point
-    neg					% -h2 b2
-    2 copy lineto			% point 2;  b2 h2
-    exch neg exch lineto		% 
-    closepath
-    DrawSymbolProc
-  grestore
-} def
-
-% Bitmap
-/Bm {
-  % Stack: x y symbolSize
-  gsave
-    3 1 roll translate pop DrawSymbolProc
-  grestore
-} def
-
-%%EndProlog
-
-%%BeginSetup
-gsave					% Save the graphics state
-
-% Default line/text style parameters
-
-1 setlinewidth				% width
-1 setlinejoin				% join
-0 setlinecap				% cap
-[] 0 setdash				% dashes
-
-0 0 0 setrgbcolor			% color
-
diff --git a/blt3.0/library/combobutton.tcl b/blt3.0/library/combobutton.tcl
deleted file mode 100644
index 6a2b872..0000000
--- a/blt3.0/library/combobutton.tcl
+++ /dev/null
@@ -1,249 +0,0 @@
-
-namespace eval blt::ComboButton {
-    variable privateData
-    array set privateData {
-	activeMenu  {}
-	posted      {}
-        activeItem  {}
-        cursor      {}
-        focus       {}
-        oldGrab     {}
-    }
-}
-
-bind ComboButton <Enter> {
-    %W activate yes
-}
-
-bind ComboButton <Leave> {
-    %W activate no
-}
-
-bind ComboButton <B1-Motion> {
-    puts stderr "ComboButton <B1-Motion> %W state=[%W cget -state]"
-    blt::ComboButton::NextButton %W %X %Y
-}
-
-bind ComboButton <B1-Leave> {
-    puts stderr "ComboButton <B1-Leave> state=[%W cget -state]"
-}
-
-# Standard Motif bindings:
-
-bind ComboButton <ButtonPress-1> {
-    puts stderr "ComboButton <ButtonPress-1> state=[%W cget -state]"
-    if { [%W cget -state] == "posted" } {
-	puts stderr "unpost"
-	%W unpost
-	blt::ComboButton::UnpostMenu %W
-    } else {
-	grab -global %W
-	blt::ComboButton::PostMenu %W
-    }
-}
-
-bind ComboButton <ButtonRelease-1> {
-    puts stderr "ComboButton <ButtonRelease-1> state=[%W cget -state]"
-    if { [winfo containing -display  %W %X %Y] == "%W" } {
-	puts stderr "invoke"
-	%W invoke
-    } else { 
-	%W activate off
-	puts stderr "unpost"
-	blt::ComboButton::UnpostMenu %W
-    }	
-}
-
-bind ComboButton <KeyPress-Down> {
-    if { [%W cget -state] != "disabled" } {
-	blt::ComboButton::PostMenu %W
-    }
-}
-
-# Ignore all Alt, Meta, and Control keypresses unless explicitly bound.
-# Otherwise, if a widget binding for one of these is defined, the
-# <KeyPress> class binding will also fire and insert the character,
-# which is wrong.  Ditto for Escape, Return, and Tab.
-
-bind ComboButton <Alt-KeyPress> {# nothing}
-bind ComboButton <Meta-KeyPress> { puts %K }
-bind ComboButton <Control-KeyPress> {# nothing}
-bind ComboButton <Escape> {# nothing}
-#bind ComboButton <KP_Enter> {# nothing}
-bind ComboButton <Tab> {# nothing}
-if {[string equal [tk windowingsystem] "classic"] || 
-    [string equal [tk windowingsystem] "aqua"]} {
-    bind ComboButton <Command-KeyPress> {# nothing}
-}
-
-
-proc blt::ComboButton::SaveGrab { w } {
-    variable privateData
-
-    set grab [grab current $w]
-    set privateData(oldGrab) ""
-    if { $grab != "" } {
-	set type [grab status $grab]
-	if { $type == "global" } {
-	    #set privateData(oldGrab) [list grab set -global $grab]
-	} else {
-	    #set privateData(oldGrab) [list grab set $grab]
-	}	    
-    } 
-}
-
-# ::blt::ComboButton::RestoreOldGrab --
-# Restores the grab to what it was before TkSaveGrabInfo was called.
-#
-
-proc ::blt::ComboButton::RestoreOldGrab {} {
-    variable privateData
-
-    if { $privateData(oldGrab) != "" } {
-    	# Be careful restoring the old grab, since it's window may not be
-    	# visible anymore.
-	catch $privateData(oldGrab)
-	set privateData(oldGrab) ""
-    }
-}
-
-# ::blt::ComboButton::PostMenu --
-# Given a menubutton, this procedure does all the work of posting
-# its associated menu and unposting any other menu that is currently
-# posted.
-#
-# Arguments:
-# w -			The name of the menubutton widget whose menu
-#			is to be posted.
-# x, y -		Root coordinates of cursor, used for positioning
-#			option menus.  If not specified, then the center
-#			of the menubutton is used for an option menu.
-
-proc ::blt::ComboButton::PostMenu { cbutton } {
-    variable privateData
-
-    puts stderr "proc ComboButton::PostMenu $cbutton, state=[$cbutton cget -state]"
-    if { [$cbutton cget -state] == "disabled" } {
-	return
-    }
-    if { [$cbutton cget -state] == "posted" } {
-	UnpostMenu $cbutton
-	return
-    } 
-    set menu [$cbutton cget -menu]
-    if { $menu == "" } {
-	return
-    }
-    set last $privateData(posted)
-    if { $last != "" } {
-	UnpostMenu $last
-    }
-    set privateData(cursor) [$cbutton cget -cursor]
-    $cbutton configure -cursor arrow
-    
-    set privateData(posted) $cbutton
-    set privateData(focus) [focus]
-    $menu activate none
-    GenerateMenuSelect $menu
-
-    # If this looks like an option menubutton then post the menu so
-    # that the current entry is on top of the mouse.  Otherwise post
-    # the menu just below the menubutton, as for a pull-down.
-
-    update idletasks
-    if { [catch { $cbutton post } msg] != 0 } {
-	# Error posting menu (e.g. bogus -postcommand). Unpost it and
-	# reflect the error.
-	global errorInfo
-	set savedInfo $errorInfo
-	#
-	UnpostMenu $cbutton 
-	error $msg $savedInfo
-    }
-
-    focus $menu
-    if { [winfo viewable $menu] } {
-	SaveGrab $menu
-	puts stderr "setting global grab on $menu"
-	#grab -global $menu
-    }
-}
-
-# ::blt::ComboButton::UnpostMenu --
-# This procedure unposts a given menu, plus all of its ancestors up
-# to (and including) a menubutton, if any.  It also restores various
-# values to what they were before the menu was posted, and releases
-# a grab if there's a menubutton involved.  Special notes:
-# 1. It's important to unpost all menus before releasing the grab, so
-#    that any Enter-Leave events (e.g. from menu back to main
-#    application) have mode NotifyGrab.
-# 2. Be sure to enclose various groups of commands in "catch" so that
-#    the procedure will complete even if the menubutton or the menu
-#    or the grab window has been deleted.
-#
-# Arguments:
-# menu -		Name of a menu to unpost.  Ignored if there
-#			is a posted menubutton.
-
-proc ::blt::ComboButton::UnpostMenu { cbutton } {
-    variable privateData
-
-    puts stderr "proc ComboButton::UnpostMenu $cbutton"
-
-    # Restore focus right away (otherwise X will take focus away when the
-    # menu is unmapped and under some window managers (e.g. olvwm) we'll
-    # lose the focus completely).
-    catch { focus $privateData(focus) }
-    set privateData(focus) ""
-
-    # Unpost menu(s) and restore some stuff that's dependent on what was
-    # posted.
-    puts stderr "unposting $cbutton"
-    $cbutton unpost
-    set privateData(posted) {}
-    if { [info exists privateData(cursor)] } {
-	$cbutton configure -cursor $privateData(cursor)
-    }
-    if { [$cbutton cget -state] != "disabled" } {
-	#$cbutton configure -state normal
-    }
-    set menu [$cbutton cget -menu]
-    puts MENU=$menu
-    puts GRAB=[grab current $menu]
-    # Release grab, if any, and restore the previous grab, if there
-    # was one.
-    if { $menu != "" } {
-	set grab [grab current $menu]
-	if { $grab != "" } {
-	    grab release $grab
-	}
-    }
-    RestoreOldGrab
-}
-
-proc blt::ComboButton::GenerateMenuSelect {menu} {
-    variable privateData
-
-    set item [$menu index active]
-    if { $privateData(activeMenu) != $menu || 
-	 $privateData(activeItem) != $item } {
-	set privateData(activeMenu) $menu
-	set privateData(activeItem) $item
-	event generate $menu <<MenuSelect>>
-    }
-}
-
-proc blt::ComboButton::NextButton { cbutton rootx rooty } {
-    variable privateData
-
-    set next [winfo containing -display $cbutton $rootx $rooty]
-    if { $next == "" || $next == $privateData(posted) || 
-	 [winfo class $next] != "ComboButton" } {
-	return
-    }
-    # Release the current combobutton, including removing the grab.
-    event generate $cbutton <ButtonRelease-1>
-    grab -global $next
-    # Simulate pressing the new combobutton widget.
-    event generate $next <ButtonPress-1>
-}
diff --git a/blt3.0/library/comboentry.tcl b/blt3.0/library/comboentry.tcl
deleted file mode 100644
index 1d9f0d8..0000000
--- a/blt3.0/library/comboentry.tcl
+++ /dev/null
@@ -1,674 +0,0 @@
-
-namespace eval ::blt::ComboEntry {
-    variable _private
-    array set _private {
-	activeItem      {}
-	afterId		-1
-	b1		""
-	lastFocus       {}
-	mouseMoved      0
-	oldGrab         {}
-	postingButton   {}
-	arrowRelief	raised
-	trace		0
-	lastX		-1
-    }
-    proc trace { mesg } {
-	variable _private
-	if { $_private(trace) } {
-	    puts stderr $mesg
-	}
-    }
-}
-
-bind ComboEntry <Enter> {
-    # Do nothing
-}
-
-bind ComboEntry <Leave> {
-    %W activate off
-}
-
-# Standard Motif bindings:
-
-bind ComboEntry <Motion> {
-    if { [%W identify %x %y] == "arrow" } {
-	%W activate yes
-    } else {
-	%W activate no
-    }
-}
-
-bind ComboEntry <ButtonPress-1> {
-    ::blt::ComboEntry::ButtonPress %W %x %y
-}
-
-bind ComboEntry <ButtonRelease-1> {
-    blt::ComboEntry::trace "ComboEntry %W at %X,%Y <ButtonRelease-1> state=[%W cget -state], grab=[grab current]"
-    after cancel $blt::ComboEntry::_private(afterId)
-    if { [%W identify -root %X %Y] == "arrow" } {
-	blt::ComboEntry::trace "invoke"
-	%W invoke
-    } else { 
-	blt::ComboEntry::trace "unpost"
-	blt::ComboEntry::UnpostMenu %W
-    }	
-    if { [info exists blt::ComboEntry::_private(arrowRelief)] } {
-	%W configure -arrowrelief $blt::ComboEntry::_private(arrowRelief)
-    }
-}
-bind ComboEntry <B1-Motion> {
-    if { $blt::ComboEntry::_private(b1) != "arrow" } {
-	%W selection to [%W closest %x]
-    }
-}
-bind ComboEntry <B1-Enter> {
-    after cancel $blt::ComboEntry::_private(afterId)
-    set blt::ComboEntry::_private(afterId) -1
-}
-bind ComboEntry <B1-Leave> {
-    blt::ComboEntry::trace "ComboEntry B1-Leave"
-    if { $blt::ComboEntry::_private(b1) == "text" } {
-	set blt::ComboEntry::_private(lastX) %x
-	blt::ComboEntry::AutoScan %W
-    }
-}
-bind ComboEntry <KeyPress-Down> {
-    if { [%W cget -state] != "disabled" } {
-	grab %W
-	::blt::ComboEntry::PostMenu %W
-    }
-}
-bind ComboEntry <Double-1> {
-    blt::ComboEntry::trace "Double-1"
-    if { [%W identify %x %y] == "arrow" } {
-	::blt::ComboEntry::ButtonPress %W %x %y
-    } else {
-	%W icursor [%W closest %x]
-	%W selection range \
-	    [string wordstart [%W get] [%W index previous]] \
-	    [string wordend   [%W get] [%W index insert]]
-	%W icursor sel.last
-	%W see insert
-    }
-}
-bind ComboEntry <Triple-1> {
-    blt::ComboEntry::trace "Triple-1"
-    if { [%W identify %x %y] != "arrow" } {
-	%W selection range 0 end
-	%W icursor sel.last
-    }
-}
-bind ComboEntry <Shift-1> {
-    %W selection adjust @%x
-}
-bind ComboEntry <ButtonPress-2> {
-    %W scan mark %x
-}
-bind ComboEntry <ButtonRelease-2> {
-    if { abs([%W scan mark] - %x) <= 3 } {
-	catch { 
-	    %W insert insert [selection get]
-	    %W see insert
-	}
-    }
-}
-bind ComboEntry <B2-Motion> {
-    %W scan dragto %x
-}
-bind ComboEntry <Control-1> {
-    %W icursor @%x
-}
-bind ComboEntry <KeyPress-Left> {
-    if { [%W selection present] } {
-	%W icursor sel.last
-	%W selection clear
-    } 
-    %W icursor previous
-    %W see insert
-}
-bind ComboEntry <KeyPress-Right> {
-    if { [%W selection present] } {
-	%W icursor sel.last
-	%W selection clear
-    } 
-    %W icursor next
-    %W see insert
-}
-
-bind ComboEntry <Shift-Left> {
-    if {![%W selection present]} {
-	%W selection range previous insert 
-    } else {
-	%W selection adjust previous
-    }
-    %W icursor previous
-    %W see insert
-}
-
-bind ComboEntry <Shift-Right> {
-    if {![%W selection present]} {
-	%W selection range insert next
-    } else {
-	%W selection adjust next
-    }
-    %W icursor next
-    %W see insert
-}
-
-bind ComboEntry <Shift-Control-Left> {
-    set previous [string wordstart [%W get] [%W index previous]]
-    if {![%W selection present]} {
-	%W selection range $previous insert 
-    } else {
-	%W selection adjust $previous
-    }
-    %W icursor $previous
-    %W see insert
-}
-
-bind ComboEntry <Shift-Control-Right> {
-    set next [string wordend [%W get] [%W index insert]]
-    if {![%W selection present]} {
-	%W selection range insert $next
-    } else {
-	%W selection adjust $next
-    }
-    %W icursor $next
-    %W see insert
-}
-
-bind ComboEntry <Home> {
-    %W icursor 0
-    %W see insert
-}
-
-bind ComboEntry <Shift-Home> {
-    if {![%W selection present]} {
-	%W selection range 0 insert
-    } else {
-	%W selection adjust 0
-    }
-    %W icursor 0
-    %W see insert
-}
-
-bind ComboEntry <End> {
-    %W icursor end
-    %W see insert
-}
-
-bind ComboEntry <Shift-End> {
-    if {![%W selection present]} {
-	%W selection range insert end
-    } else {
-	%W selection adjust end
-    }
-    %W icursor end
-    %W see insert
-}
-
-bind ComboEntry <Delete> {
-    if {[%W selection present]} {
-	%W delete sel.first sel.last
-    } else {
-	%W delete insert next
-    }
-}
-
-bind ComboEntry <BackSpace> {
-    if {[%W selection present]} {
-	%W delete sel.first sel.last
-    } else {
-	%W delete previous insert 
-	%W see insert
-    }
-}
-
-bind ComboEntry <Control-space> {
-    %W selection from insert
-}
-
-bind ComboEntry <Select> {
-    %W selection from insert
-}
-
-bind ComboEntry <Control-Shift-space> {
-    %W selection adjust insert
-}
-
-bind ComboEntry <Shift-Select> {
-    %W selection adjust insert
-}
-
-bind ComboEntry <Control-slash> {
-    %W selection range 0 end
-}
-
-bind ComboEntry <Control-backslash> {
-    %W selection clear
-}
-
-bind ComboEntry <Control-z> {
-    %W undo
-    %W see insert
-}
-
-bind ComboEntry <Control-Z> {
-    %W redo
-    %W see insert
-}
-
-bind ComboEntry <Control-y> {
-    %W redo
-    %W see insert
-}
-
-bind ComboEntry <<Cut>> {
-    if { [%W selection present] } {
-	clipboard clear -displayof %W
-	clipboard append -displayof %W [selection get]
-	%W delete sel.first sel.last
-    }
-}
-
-bind ComboEntry <<Copy>> {
-    if { [%W selection present] } {
-	clipboard clear -displayof %W
-	clipboard append -displayof %W [selection get]
-    }
-}
-
-bind ComboEntry <<Paste>> {
-    %W insert insert [selection get]
-    %W see insert
-}
-
-bind ComboEntry <<Clear>> {
-    %W delete sel.first sel.last
-}
-
-
-bind Entry <<PasteSelection>> {
-    if { $tk_strictMotif || 
-	 ![info exists tk::ComboEntry::_private(mouseMoved)] || 
-	 !$tk::ComboEntry::_private(mouseMoved)} {
-	tk::EntryPaste %W %x
-    }
-}
-
-# Paste
-bind ComboEntry <Control-v> {
-    %W insert insert [selection get]
-}
-
-# Cut
-bind ComboEntry <Control-x> {
-    if { [%W selection present] } {
-	clipboard clear -displayof %W
-	clipboard append -displayof %W [selection get]
-	%W delete sel.first sel.last
-    }
-}
-# Copy
-bind ComboEntry <Control-c> {
-    if { [%W selection present] } {
-	clipboard clear -displayof %W
-	clipboard append -displayof %W [selection get]
-    }
-}
-
-bind ComboEntry <Return> {
-    %W invoke 
-}
-
-bind ComboEntry <KeyPress> {
-    if { [string compare %A {}] == 0 } {
-	continue
-    }
-    if { [%W selection present] } {
-	%W delete sel.first sel.last
-    }
-    %W insert insert %A
-    %W see insert
-}
-
-# Additional emacs-like bindings:
-
-bind ComboEntry <Control-a> {
-    %W icursor 0
-    %W see insert
-}
-
-bind ComboEntry <Control-b> {
-    %W icursor previous 
-    %W see insert
-}
-
-bind ComboEntry <Control-d> {
-    if { [%W selection present] } {
-	%W delete sel.first sel.last
-    } else {
-	%W delete insert next
-    }
-}
-
-bind ComboEntry <Control-e> {
-    %W icursor end
-    %W see insert
-}
-
-bind ComboEntry <Control-f> {
-    %W icursor next
-    %W see insert
-}
-
-bind ComboEntry <Control-h> {
-    if { [%W selection present] } {
-	%W delete sel.first sel.last
-    } else {
-	%W delete previous insert 
-	%W see insert
-    }
-}
-
-bind ComboEntry <Control-k> {
-    %W delete insert end
-}
-
-bind ComboEntry <Control-t> {
-    set index [%W index insert]
-    if { $index != 0 && $index != [%W index end] } {
-	set a [string index [%W get] [%W index previous]]
-	set b [string index [%W get] [%W index insert]]
-	%W delete previous next
-	%W insert insert "$b$a"
-    }
-}
-
-bind ComboEntry <Alt-b> {
-    %W icursor [string wordstart [%W get] [%W index previous]]
-    %W see insert
-}
-
-bind ComboEntry <Alt-d> {
-    %W delete insert [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-bind ComboEntry <Alt-f> {
-    %W icursor [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-bind ComboEntry <Alt-BackSpace> {
-    %W delete [string wordstart [%W get] [%W index previous]] insert
-    %W see insert
-}
-
-bind ComboEntry <Alt-Delete> {
-    %W delete insert [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-####
-bind ComboEntry <Meta-b> {
-    %W icursor [string wordstart [%W get] [%W index previous]]
-    %W see insert
-}
-
-bind ComboEntry <Meta-d> {
-    %W delete insert [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-bind ComboEntry <Meta-f> {
-    %W icursor [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-bind ComboEntry <Meta-BackSpace> {
-    %W delete [string wordstart [%W get] [%W index previous]] insert
-    %W see insert
-}
-
-bind ComboEntry <Meta-Delete> {
-    %W delete insert [string wordend [%W get] [%W index insert]]
-    %W see insert
-}
-
-
-# Ignore all Alt, Meta, and Control keypresses unless explicitly bound.
-# Otherwise, if a widget binding for one of these is defined, the
-# <KeyPress> class binding will also fire and insert the character,
-# which is wrong.  Ditto for Escape, Return, and Tab.
-
-bind ComboEntry <Alt-KeyPress> {
-    # Do nothing.
-}
-bind ComboEntry <Meta-KeyPress> { 
-    blt::ComboEntry::trace %K 
-}
-bind ComboEntry <Control-KeyPress> {
-    # Do nothing.
-}
-bind ComboEntry <Escape> {
-    # Do nothing.
-}
-bind ComboEntry <KP_Enter> {
-    # Do nothing.
-}
-bind ComboEntry <Tab> {
-    # Do nothing.
-}
-switch -- [tk windowingsystem] {
-    "classic" - "aqua"  {
-	bind ComboEntry <Command-KeyPress> {
-	    # Do nothing.
-	}
-    }
-}
-
-proc ::blt::ComboEntry::AutoScan {w} {
-    variable _private
-
-    set x $_private(lastX)
-    if { ![winfo exists $w] } {
-	return
-    }
-    if { $x >= [winfo width $w] } {
-	$w xview scroll 2 units
-    } elseif { $x < 0 } {
-	$w xview scroll -2 units
-    }
-    set _private(afterId) [after 50 [list blt::ComboEntry::AutoScan $w]]
-}
-
-proc ::blt::ComboEntry::SaveGrab { w } {
-    variable _private
-
-    set grab [grab current $w]
-    set _private(oldGrab) ""
-    if { $grab != "" } {
-	set type [grab status $grab]
-	if { $type == "global" } {
-	    #set _private(oldGrab) [list grab set -global $grab]
-	} else {
-	    #set _private(oldGrab) [list grab set $grab]
-	}	    
-    } 
-}
-
-# ::blt::ComboEntry::RestoreOldGrab --
-# Restores the grab to what it was before TkSaveGrabInfo was called.
-
-proc ::blt::ComboEntry::RestoreOldGrab {} {
-    variable _private
-
-    if { $_private(oldGrab) != "" } {
-    	# Be careful restoring the old grab, since it's window may not
-	# be visible anymore.
-	catch $_private(oldGrab)
-	set _private(oldGrab) ""
-    }
-}
-
-# ::blt::ComboEntry::PostMenu --
-#
-# Given a menubutton, this procedure does all the work of posting
-# its associated menu and unposting any other menu that is currently
-# posted.
-#
-# Arguments:
-# w -			The name of the menubutton widget whose menu
-#			is to be posted.
-# x, y -		Root coordinates of cursor, used for positioning
-#			option menus.  If not specified, then the center
-#			of the menubutton is used for an option menu.
-
-proc ::blt::ComboEntry::PostMenu { w } {
-    variable _private
-
-    trace "proc PostMenu $w, state=[$w cget -state]"
-    if { [$w cget -state] == "disabled" } {
-	return
-    }
-    if { [$w cget -state] == "posted" } {
-	UnpostMenu $w
-	return
-    } 
-    set menu [$w cget -menu]
-    if { $menu == "" } {
-	return
-    }
-    set cur $_private(postingButton)
-    if { $cur != "" } {
-	#
-	UnpostMenu $cur
-    }
-    set _private(cursor) [$w cget -cursor]
-    $w configure -cursor arrow
-    
-    set _private(postingButton) $w
-    set _private(lastFocus) [focus]
-    $menu activate none
-    blt::ComboEntry::GenerateMenuSelect $menu
-
-
-    # If this looks like an option menubutton then post the menu so
-    # that the current entry is on top of the mouse.  Otherwise post
-    # the menu just below the menubutton, as for a pull-down.
-
-    update idletasks
-    if { [catch { $w post } msg] != 0 } {
-	# Error posting menu (e.g. bogus -postcommand). Unpost it and
-	# reflect the error.
-	global errorInfo
-	set savedInfo $errorInfo
-	#
-	UnpostMenu $w 
-	error $msg $savedInfo
-    }
-
-    focus $menu
-    if { [winfo viewable $menu] } {
-	SaveGrab $menu
-	trace "setting global grab on $menu"
-	#grab -global $menu
-    }
-}
-
-# ::blt::ComboEntry::UnpostMenu --
-#
-# This procedure unposts a given menu, plus all of its ancestors up
-# to (and including) a menubutton, if any.  It also restores various
-# values to what they were before the menu was posted, and releases
-# a grab if there's a menubutton involved.  Special notes:
-# 1. It's important to unpost all menus before releasing the grab, so
-#    that any Enter-Leave events (e.g. from menu back to main
-#    application) have mode NotifyGrab.
-# 2. Be sure to enclose various groups of commands in "catch" so that
-#    the procedure will complete even if the menubutton or the menu
-#    or the grab window has been deleted.
-#
-# Arguments:
-# menu -		Name of a menu to unpost.  Ignored if there
-#			is a posted menubutton.
-
-proc ::blt::ComboEntry::UnpostMenu { w } {
-    variable _private
-
-    trace "proc UnpostMenu $w"
-    catch { 
-	# Restore focus right away (otherwise X will take focus away when the
-	# menu is unmapped and under some window managers (e.g. olvwm) we'll
-	# lose the focus completely).
-	focus $_private(lastFocus) 
-    }
-    set _private(lastFocus) ""
-
-    # Unpost menu(s) and restore some stuff that's dependent on what was
-    # posted.
-
-    $w unpost
-    set _private(postingButton) {}
-    if { [info exists _private(cursor)] } {
-	$w configure -cursor $_private(cursor)
-    }
-    if { [$w cget -state] != "disabled" } {
-	#$w configure -state normal
-    }
-    set menu [$w cget -menu]
-    trace MENU=$menu
-    trace GRAB=[grab current $menu]
-
-    # Release grab, if any, and restore the previous grab, if there
-    # was one.
-    if { $menu != "" } {
-	set grab [grab current $menu]
-	if { $grab != "" } {
-	    grab release $grab
-	}
-    }
-    RestoreOldGrab
-}
-
-proc ::blt::ComboEntry::GenerateMenuSelect {menu} {
-    if 0 {
-    variable _private
-    if { $_private(activeComboMenu) != $menu ||
-	 $_private(activeItem) != [$menu index active] } {
-	set _private(activeComboMenu) $menu
-	set _private(activeItem) [$menu index active]
-	event generate $menu <<MenuSelect>>
-    }
-    }
-}
-
-proc ::blt::ComboEntry::ButtonPress { w x y } {
-    variable _private
-
-    trace "blt::ComboEntry::ButtonPress $w state=[$w cget -state]"
-    set _private(b1) [$w identify $x $y]
-    trace "_private(b1) = \"$_private(b1)\""
-    if { [$w cget -state] == "posted" } {
-	trace "state = [$w cget -state]"
-	$w unpost
-	UnpostMenu $w
-    } elseif { $_private(b1) == "arrow" } {
-	set _private(arrowRelief) [$w cget -arrowrelief]
-	trace "relief=$_private(arrowRelief)"
-	if { [$w cget -state] != "disabled" } {
-	    $w configure -arrowrelief sunken
-	}
-	grab -global $w
-	PostMenu $w
-    } else {
-	trace "else: priv(v1)=$_private(b1) state=[$w cget -state]"
-	focus $w
-	$w icursor [$w closest $x]
-	$w selection clear
-	$w selection from insert
-	$w configure -arrowrelief $_private(arrowRelief)
-    }
-}
\ No newline at end of file
diff --git a/blt3.0/library/combomenu.tcl b/blt3.0/library/combomenu.tcl
deleted file mode 100644
index f4d3eb2..0000000
--- a/blt3.0/library/combomenu.tcl
+++ /dev/null
@@ -1,532 +0,0 @@
-
-namespace eval ::blt::ComboMenu {
-    variable _private
-    array set _private {
-        activeComboMenu {}
-        activeItem      {}
-        afterId         -1
-        b1              {}
-        lastFocus	{}
-        menuBar         {}
-        oldGrab         {}
-        popup           {}
-        postingMenu     {}
-        trace           1
-    }
-    proc trace { mesg } {
-	variable _private 
-	if { $_private(trace) } {
-	    puts stderr $mesg
-	}
-    }
-}
-
-# -----------------------------------------------------------------------------
-
-# Must set focus when mouse enters a menu, in order to allow
-# mixed-mode processing using both the mouse and the keyboard.
-# Don't set the focus if the event comes from a grab release,
-# though:  such an event can happen after as part of unposting
-# a cascaded chain of menus, after the focus has already been
-# restored to wherever it was before menu selection started.
-
-bind ComboMenu <FocusIn> {}
-
-bind ComboMenu <Enter> { 
-    blt::ComboMenu::trace "ComboMenu %W <Enter>"
-    focus %W
-}
-
-bind ComboMenu <Leave> { 
-    blt::ComboMenu::trace "ComboMenu %W <Leave> %s"
-    if { %s == 0 } {
-	#%W activate none 
-    }
-}
-
-bind ComboMenu <Motion> { 
-    #blt::ComboMenu::trace "ComboMenu Motion %x,%y"
-    %W activate @%x,%y 
-    %W postcascade active
-}
-
-bind ComboMenu <ButtonRelease-1> { 
-    blt::ComboMenu::trace "ComboMenu %W at %x,%y ButtonRelease-1"
-    set index [%W index @%x,%y]
-    if { $index == -1 } {
-	blt::ComboMenu::trace "failed to find item in %W"
-	blt::ComboMenu::SimulateButtonRelease 
-    } else {
-	%W activate $index
-	blt::ComboMenu::trace "activated $index"
-	if { [%W type active] == "cascade" } {
-	    blt::ComboMenu::trace "posting cascade for $index"
-	    %W postcascade active
-	    blt::ComboMenu::PostMenu %W active
-	} else {
-	    blt::ComboMenu::trace "%W invoke active ($index)"
-	    %W invoke active
-	    blt::ComboMenu::SimulateButtonRelease 
-	}
-    }
-}
-
-bind ComboMenu <ButtonPress-1> { 
-    blt::ComboMenu::trace "ComboMenu ButtonPress-1"
-}
-
-bind ComboMenu <ButtonPress-2> { 
-    set w [grab current]
-    $w configure -cursor diamond_cross
-    update
-    %W scan mark %x %y
-}
-bind ComboMenu <B2-Motion> { 
-    %W scan dragto %x %y
-}
-
-bind ComboMenu <ButtonRelease-2> { 
-    set w [grab current]
-    $w configure -cursor arrow
-}
-
-bind ComboMenu <KeyPress-space> {
-    if { [%W type active] == "cascade" } {
-	%W postcascade active
-	blt::ComboMenu::PostMenu %W active
-    } else {
-	%W invoke active
-	blt::ComboMenu::SimulateButtonRelease 
-    }
-}
-
-bind ComboMenu <KeyRelease> {
-    if { [string compare %A {}] == 0 } {
-	continue
-    }
-    set index [%W find "%A" -underline]
-    if { $index >= 0 } {
-	%W activate $index
-	%W see $index
-    }
-}
-
-# KeyPress-Return -- 
-#
-#	If the menu item selected is a cascade menu, then post the cascade.
-#	Otherwise tell the combobutton or comboentry that we've selected 
-#	something by simulating a button release.  This will unpost all the
-#	posted menus. Set the root coordinates of the event to be offscreen 
-#	so that we don't inadvertantly lie over the arrow of the button.
-#
-bind ComboMenu <KeyPress-Return> {
-    if { [%W type active] == "cascade" } {
-	%W postcascade active
-	blt::ComboMenu::PostMenu %W active
-    } else {
-	%W invoke active
-	blt::ComboMenu::SimulateButtonRelease 
-    }
-}
-
-bind ComboMenu <Escape> {
-    blt::ComboMenu::SimulateButtonRelease 
-}
-
-bind ComboMenu <Left> {
-    set menu [winfo parent %W]
-    if { [winfo class $menu] == "ComboMenu" } {
-	$menu postcascade none
-	focus $menu
-    }
-}
-
-bind ComboMenu <Right> {
-    if { [%W type active] == "cascade" } {
-	%W postcascade active
-	set menu [%W item cget active -menu]
-	focus $menu
-    }
-}
-
-bind ComboMenu <KeyPress-Up> {
-    %W activate previous
-    %W see active
-}
-
-bind ComboMenu <KeyPress-Down> {
-    %W activate next
-    %W see active
-}
-
-bind ComboMenu <KeyPress-Home> {
-    %W activate first
-    %W see active
-}
-
-bind ComboMenu <KeyPress-End> {
-    %W activate end
-    %W see active
-}
-
-bind ComboMenu <KeyPress-Prior> {
-    %W yview scroll -1 page
-    %W activate view.top
-    %W see active
-}
-
-bind ComboMenu <KeyPress-Next> {
-    %W yview scroll 1 page
-    %W activate view.bottom
-    %W see active
-}
-
-# The following bindings apply to all windows, and are used to
-# implement keyboard menu traversal.
-
-if { [tk windowingsystem] == "x11" } {
-    bind all <Alt-KeyPress> {
-	blt::ComboMenu::Traverse %W %A
-    }
-    bind all <F10> {
-	blt::ComboMenu::FirstItem %W
-    }
-} else {
-    bind ComboMenubutton <Alt-KeyPress> {
-	blt::ComboMenu::Traverse %W %A
-    }
-
-    bind ComboMenubutton <F10> {
-	blt::ComboMenu::First %W
-    }
-}
-
-if { [tk windowingsystem] == "x11" } {
-    bind ComboMenu <4> {
-	%W yview scroll -5 units
-    }
-    bind ComboMenu <5> {
-	%W yview scroll 5 units
-    }
-} else {
-    bind ComboMenu <MouseWheel> {
-	%W yview scroll [expr {- (%D / 120) * 4}] units
-    }
-}
-
-# ::blt::ComboMenu::UnpostMenu --
-#
-# This procedure unposts a given menu, plus all of its ancestors up
-# to (and including) a menubutton, if any.  It also restores various
-# values to what they were before the menu was posted, and releases
-# a grab if there's a menubutton involved.  Special notes:
-# 1. It's important to unpost all menus before releasing the grab, so
-#    that any Enter-Leave events (e.g. from menu back to main
-#    application) have mode NotifyGrab.
-# 2. Be sure to enclose various groups of commands in "catch" so that
-#    the procedure will complete even if the menubutton or the menu
-#    or the grab window has been deleted.
-#
-# Arguments:
-# menu -		Name of a menu to unpost.  Ignored if there
-#			is a posted menubutton.
-
-proc ::blt::ComboMenu::UnpostMenu menu {
-    variable _private
-
-    set mb $_private(postingMenu)
-    set mb ""
-
-    # Restore focus right away (otherwise X will take focus away when
-    # the menu is unmapped and under some window managers (e.g. olvwm)
-    # we'll lose the focus completely).
-
-    catch {focus $_private(lastFocus)}
-    set _private(lastFocus) ""
-
-    # Unpost menu(s) and restore some stuff that's dependent on
-    # what was posted.
-
-    catch {
-	if { $mb != "" } {
-	    set menu [$mb cget -menu]
-	    $menu unpost
-	    #set _private(postingMenu) {}
-	    $mb configure -cursor $_private(cursor)
-	    if  { [$mb cget -arrowrelief] == "sunken" } {
-		$mb configure -arrowrelief $_private(relief)
-	    }
-	} elseif { $_private(popup) != "" } {
-	    $_private(popup) unpost
-	    set _private(popup) {}
-	} else {
-	    # We're in a cascaded sub-menu from a torn-off menu or popup.
-	    # Unpost all the menus up to the toplevel one (but not
-	    # including the top-level torn-off one) and deactivate the
-	    # top-level torn off menu if there is one.
-
-	    while {1} {
-		set parent [winfo parent $menu]
-		if { [winfo class $parent] != "ComboMenu"] || 
-			![winfo ismapped $parent]} {
-		    break
-		}
-		$parent activate none
-		$parent postcascade none
-		ComboMenu::GenerateSelect $parent
-		set menu $parent
-	    }
-	    $menu unpost
-	}
-    }
-    if { $mb != "" && [$mb cget -state] != "disabled" } {
-	$mb configure -state normal
-    }
-
-    trace tearoff=$_private(tearoff)
-    trace menuBar=$_private(menuBar)
-    trace menu=$menu
-    trace grab=[grab current $menu]
-    if { $_private(tearoff) != 0 || $_private(menuBar) != ""} {
-    	# Release grab, if any, and restore the previous grab, if there
-    	# was one.
-	if { $menu !=  "" } {
-	    set grab [grab current $menu]
-	    if { $grab != "" } {
-		#grab release $grab
-	    }
-	}
-	RestoreOldGrab
-	if { $_private(menuBar) != "" } {
-	    $_private(menuBar) configure -cursor $_private(cursor)
-	    set _private(menuBar) {}
-	}
-	if { [tk windowingsystem] != "x11" } {
-	    set _private(tearoff) 0
-	}
-    }
-}
-
-proc ::blt::ComboMenu::SimulateButtonRelease {} {
-    set grab [grab current]
-    if { $grab != "%W" } {
-	event generate $grab <ButtonRelease-1> -rootx -1000 -rooty -1000
-    }
-}
-
-proc ::blt::ComboMenu::PostMenu { w item } {
-    variable _private
-
-    trace "proc ComboMenu::PostMenu $w, item=$item"
-    if { [$w item cget $item -state] == "disabled" } {
-	return
-    }
-
-    set menu [$w item cget $item -menu]
-    if { $menu == "" } {
-	return
-    }
-    #$menu activate none
-    set _private(lastFocus) [focus]
-    GenerateSelect $menu
-
-
-    # If this looks like an option menubutton then post the menu so
-    # that the current entry is on top of the mouse.  Otherwise post
-    # the menu just below the menubutton, as for a pull-down.
-
-    update idletasks
-    if { [catch { $w postcascade $item } msg] != 0 } {
-	# Error posting menu (e.g. bogus -postcommand). Unpost it and
-	# reflect the error.
-	global errorInfo
-	set savedInfo $errorInfo
-	#
-	#MbUnpost $w 
-	error $msg $savedInfo
-    }
-    focus $menu
-    $menu activate first
-    if { [winfo viewable $menu] } {
-	SaveGrab $menu
-	trace "setting global grab on $menu"
-	#grab -global $menu
-    }
-}
-
-# ::blt::xxxComboMenuUnpost --
-# This procedure unposts a given menu, plus all of its ancestors up
-# to (and including) a menubutton, if any.  It also restores various
-# values to what they were before the menu was posted, and releases
-# a grab if there's a menubutton involved.  Special notes:
-# 1. It's important to unpost all menus before releasing the grab, so
-#    that any Enter-Leave events (e.g. from menu back to main
-#    application) have mode NotifyGrab.
-# 2. Be sure to enclose various groups of commands in "catch" so that
-#    the procedure will complete even if the menubutton or the menu
-#    or the grab window has been deleted.
-#
-# Arguments:
-# menu -		Name of a menu to unpost.  Ignored if there
-#			is a posted menubutton.
-
-proc ::blt::xxxComboMenuUnpost { w } {
-    variable _private
-
-    trace "proc ComboMenuUnpost $w"
-    catch { 
-	# Restore focus right away (otherwise X will take focus away when the
-	# menu is unmapped and under some window managers (e.g. olvwm) we'll
-	# lose the focus completely).
-	focus $_private(lastFocus) 
-    }
-    set _private(lastFocus) ""
-
-    # Unpost menu(s) and restore some stuff that's dependent on what was
-    # posted.
-
-    $w unpost
-    #set _private(postingMenu) {}
-    $w configure -cursor $_private(cursor)
-
-    if { [$w cget -state] != "disabled" } {
-	#$w configure -state normal
-    }
-    set menu [$w cget -menu]
-    trace MENU=$menu
-    trace GRAB=[grab current $menu]
-    # Release grab, if any, and restore the previous grab, if there
-    # was one.
-    if { $menu != "" } {
-	set grab [grab current $menu]
-	if { $grab != "" } {
-	    #grab release $grab
-	}
-    }
-    RestoreOldGrab
-}
-
-# ::blt::SaveGrab --
-# Sets the variable blt::_private(oldGrab) to record
-# the state of any existing grab on the w's display.
-#
-# Arguments:
-# w -			Name of a window;  used to select the display
-#			whose grab information is to be recorded.
-
-proc blt::ComboMenu::SaveGrab { w } {
-    variable _private
-
-    set grab [grab current $w]
-    set _private(oldGrab) ""
-    if { $grab != "" } {
-	set type [grab status $grab]
-	if { $type == "global" } {
-	    #set _private(oldGrab) [list grab set -global $grab]
-	} else {
-	    #set _private(oldGrab) [list grab set $grab]
-	}	    
-    }
-}
-
-# ::blt::RestoreOldGrab --
-# Restores the grab to what it was before TkSaveGrabInfo was called.
-#
-
-proc ::blt::ComboMenu::RestoreOldGrab {} {
-    variable _private
-
-    trace "RestoreOldGrab: current grab=[grab current]"
-    if { [info exists $_private(oldGrab)] } {
-	trace "restore old=$_private(oldGrab)"
-    }
-    if { $_private(oldGrab) != "" } {
-    	# Be careful restoring the old grab, since it's window may not
-	# be visible anymore.
-	catch $_private(oldGrab)
-	set _private(oldGrab) ""
-    } else {
-	grab release [grab current]
-    }	
-}
-
-proc ::blt::xxxComboMenuSetFocus {menu} {
-    variable _private
-    if { $_private(lastFocus) == "" } {
-	set _private(lastFocus) [focus]
-    }
-    focus $menu
-}
-    
-proc ::blt::ComboMenu::GenerateSelect {menu} {
-    variable _private
-
-    if { $_private(activeComboMenu) == $menu &&  \
-	     $_private(activeItem) == [$menu index active] } {
-	return
-    }
-    set _private(activeComboMenu) $menu
-    set _private(activeItem) [$menu index active]
-    event generate $menu <<MenuSelect>>
-}
-
-
-bind ComboMenu <B1-Enter> {
-    after cancel $blt::ComboMenu::_private(afterId)
-    set blt::ComboMenu::_private(afterId) -1
-}
-
-bind ComboMenu <B1-Leave> {
-    blt::ComboMenu::trace "ComboMenu B1-Leave"
-    blt::ComboMenu::AutoScroll %W %x %y
-}
-
-bind ComboMenu <Unmap> {
-    after cancel $blt::ComboMenu::_private(afterId)
-    set blt::ComboMenu::_private(afterId) -1
-}
-
-proc ::blt::ComboMenu::AutoScroll {w x y} {
-    variable _private
-
-    trace "autoscan $w $y"
-    if { ![winfo exists $w] } {
-	return
-    }
-    set i -1
-    if { $y >= [winfo height $w] } {
-	set i [$w next view.bottom]
-    } elseif { $y < 0 } {
-	set i [$w previous view.top]
-    }
-    if { $i > 0 } {
-	trace $i
-	$w activate $i
-	$w see $i
-    }
-    set cmd [list blt::ComboMenu::AutoScroll $w $x $y]
-    set _private(afterId) [after 50 $cmd]
-}
-
-proc blt::ComboMenu::ConfigureScrollbars { menu } {
-    set ys [$menu cget -yscrollbar]
-    if { $ys != "" } {
-	if { [$menu cget -yscrollcommand] == "" } {
-	    $menu configure -yscrollcommand [list $ys set]
-	}
-	if { [$ys cget -command] == "" } {
-	    $ys configure -command [list $menu yview] -orient vertical \
-		-highlightthickness 0
-	}
-    }
-    set xs [$menu cget -xscrollbar]
-    if { $xs != "" } {
-	if { [$menu cget -xscrollcommand] == "" } {
-	    $menu configure -xscrollcommand [list $xs set]
-	}
-	if { [$xs cget -command] == "" } {
-	    $xs configure -command [list $menu xview] -orient horizontal \
-		-highlightthickness 0
-	}
-    }
-}
\ No newline at end of file
diff --git a/blt3.0/library/combotree.tcl b/blt3.0/library/combotree.tcl
deleted file mode 100644
index 4310984..0000000
--- a/blt3.0/library/combotree.tcl
+++ /dev/null
@@ -1,520 +0,0 @@
-
-# ======================================================================
-#
-# combotree.tcl
-#
-# ----------------------------------------------------------------------
-# Bindings for the BLT combotree widget
-# ----------------------------------------------------------------------
-#
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at lucent.com
-#            http://www.tcltk.com/blt
-#
-#      RCS:  $Id: combotree.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ----------------------------------------------------------------------
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-namespace eval blt::ComboTree {
-    array set _private {
-	afterId -1
-	scroll 0
-	column ""
-	space   off
-	x 0
-	y 0
-    }
-}
-
-image create picture ::blt::ComboTree::openIcon -data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-image create picture ::blt::ComboTree::closeIcon -data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-    nQkAOw==
-}
-
-
-# ----------------------------------------------------------------------
-#
-# Initialize --
-#
-#	Invoked by internally by Combotree_Init routine.  Initializes
-#	the default bindings for the combotree widget entries.  These
-#	are local to the widget, so they can't be set through the
-#	widget's class bind tags.
-#
-# ----------------------------------------------------------------------
-proc blt::ComboTree::Initialize { w } {
-    #
-    # Active entry bindings
-    #
-    $w bind Entry <Enter> { 
-	puts stderr "Entry <Enter> [%W index current]"
-	%W activate current
-	%W entry highlight current 
-    }
-    $w bind Entry <Leave> { 
-	puts stderr "Entry <Leave> [%W index current]"
-	%W activate none
-	%W entry highlight "" 
-    }
-
-    #
-    # Button bindings
-    #
-    $w button bind all <ButtonRelease-1> {
-	set index [%W nearest %x %y blt::ComboTree::_private(who)]
-	if { [%W index current] == $index && 
-	     $blt::ComboTree::_private(who) == "button" } {
-	    %W see -anchor nw current
-	    %W toggle current
-	}
-    }
-    $w button bind all <Enter> {
-	%W button highlight current
-    }
-    $w button bind all <B1-Enter> {
-	%W button highlight current
-    }
-    $w button bind all <Leave> {
-	%W button highlight ""
-    }
-
-    #
-    # ButtonPress-1
-    #
-    #	Performs the following operations:
-    #
-    #	1. Clears the previous selection.
-    #	2. Selects the current entry.
-    #	3. Sets the focus to this entry.
-    #	4. Scrolls the entry into view.
-    #	5. Sets the selection anchor to this entry, just in case
-    #	   this is "multiple" mode.
-    #
-    
-    #
-    # ButtonRelease-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w bind Entry <ButtonRelease-3> { 
-	puts stderr "Entry <ButtonRelease> [%W index current]"
-	%W invoke active
-	event generate [grab current] <ButtonRelease-1> 
-	after cancel $blt::ComboTree::_private(afterId)
-	set blt::ComboTree::_private(afterId) -1
-	set blt::ComboTree::_private(scroll) 0
-    }
-    $w bind Entry <ButtonRelease-1> { 
-	puts stderr "Entry <ButtonRelease-1> [%W index current]"
-	%W invoke active
-	event generate [grab current] <ButtonRelease-1> 
-	after cancel $blt::ComboTree::_private(afterId)
-	set blt::ComboTree::_private(afterId) -1
-	set blt::ComboTree::_private(scroll) 0
-    }
-
-    $w bind Entry <Double-ButtonPress-1> {
-	%W see -anchor nw active
-	%W toggle active
-    }
-
-    #
-    # Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.
-    #
-
-    $w bind Entry <Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    set index [%W index anchor]
-	    %W selection clearall
-	    %W selection set $index current
-	} else {
-	    blt::ComboTree::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Shift-B1-Motion> { 
-	# do nothing
-    }
-    $w bind Entry <Shift-ButtonRelease-1> { 
-	after cancel $blt::ComboTree::_private(afterId)
-	set blt::ComboTree::_private(afterId) -1
-	set blt::ComboTree::_private(scroll) 0
-    }
-
-    #
-    # Control-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w bind Entry <Control-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    set index [%W index current]
-	    %W selection toggle $index
-	    %W selection anchor $index
-	} else {
-	    blt::ComboTree::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Control-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Control-B1-Motion> { 
-	# do nothing
-    }
-    $w bind Entry <Control-ButtonRelease-1> { 
-	after cancel $blt::ComboTree::_private(afterId)
-	set blt::ComboTree::_private(afterId) -1
-	set blt::ComboTree::_private(scroll) 0
-    }
-
-    $w bind Entry <Control-Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    if { [%W selection includes anchor] } {
-		%W selection set anchor current
-	    } else {
-		%W selection clear anchor current
-		%W selection set current
-	    }
-	} else {
-	    blt::ComboTree::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Control-Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Control-Shift-B1-Motion> { 
-	# do nothing
-    }
-
-    $w bind Entry <Shift-ButtonPress-3> { 
-	puts stderr "entry bind buttonpress-3 %W %X %Y"
-	blt::ComboTree::EditColumn %W %X %Y
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# AutoScroll --
-#
-#	Invoked when the user is selecting elements in a combotree
-#	widget and drags the mouse pointer outside of the widget.
-#	Scrolls the view in the direction of the pointer.
-#
-# ----------------------------------------------------------------------
-proc blt::ComboTree::AutoScroll { w } {
-    variable _private
-
-    if { ![winfo exists $w] } {
-	return
-    }
-    set x $_private(x)
-    set y $_private(y)
-
-    set index [$w nearest $x $y]
-
-    if {$y >= [winfo height $w]} {
-	$w yview scroll 1 units
-	set neighbor down
-    } elseif {$y < 0} {
-	$w yview scroll -1 units
-	set neighbor up
-    } else {
-	set neighbor $index
-    }
-    SetSelectionAnchor $w $neighbor
-    set _private(afterId) [after 50 blt::ComboTree::AutoScroll $w]
-}
-
-proc blt::ComboTree::SetSelectionAnchor { w tagOrId } {
-    set index [$w index $tagOrId]
-    # If the anchor hasn't changed, don't do anything
-    if { $index != [$w index anchor] } {
-	#$w selection clearall
-	$w see $index
-	#$w focus $index
-	#$w selection set $index
-	#$w selection anchor $index
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# MoveFocus --
-#
-#	Invoked by KeyPress bindings.  Moves the active selection to
-#	the entry <where>, which is an index such as "up", "down",
-#	"prevsibling", "nextsibling", etc.
-#
-# ----------------------------------------------------------------------
-proc blt::ComboTree::MoveFocus { w index } {
-    $w activate $index
-    $w see active
-}
-
-# ----------------------------------------------------------------------
-#
-# MovePage --
-#
-#	Invoked by KeyPress bindings.  Pages the current view up or
-#	down.  The <where> argument should be either "top" or
-#	"bottom".
-#
-# ----------------------------------------------------------------------
-proc blt::ComboTree::MovePage { w where } {
-
-    # If the focus is already at the top/bottom of the window, we want
-    # to scroll a page. It's really one page minus an entry because we
-    # want to see the last entry on the next/last page.
-    if { [$w index focus] == [$w index view.$where] } {
-        if {$where == "top"} {
-	    $w yview scroll -1 pages
-	    $w yview scroll 1 units
-        } else {
-	    $w yview scroll 1 pages
-	    $w yview scroll -1 units
-        }
-    }
-    update
-
-    # Adjust the entry focus and the view.  Also activate the entry.
-    # just in case the mouse point is not in the widget.
-    $w entry highlight view.$where
-    $w focus view.$where
-    $w see view.$where
-    if { [$w cget -selectmode] == "single" } {
-        $w selection clearall
-        $w selection set focus
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# NextMatch --
-#
-#	Invoked by KeyPress bindings.  Searches for an entry that
-#	starts with the letter <char> and makes that entry active.
-#
-# ----------------------------------------------------------------------
-proc blt::ComboTree::NextMatch { w key } {
-    if {[string match {[ -~]} $key]} {
-	set last [$w index focus]
-	set next [$w index next]
-	while { $next != $last } {
-	    set label [$w entry cget $next -label]
-	    set label [string index $label 0]
-	    if { [string tolower $label] == [string tolower $key] } {
-		break
-	    }
-	    set next [$w index -at $next next]
-	}
-	$w focus $next
-	if {[$w cget -selectmode] == "single"} {
-	    $w selection clearall
-	    $w selection set focus
-	}
-	$w see focus
-    }
-}
-
-# 
-# ButtonPress assignments
-#
-#	B1-Enter	start auto-scrolling
-#	B1-Leave	stop auto-scrolling
-#	ButtonPress-2	start scan
-#	B2-Motion	adjust scan
-#	ButtonRelease-2 stop scan
-#
-
-bind ComboTree <ButtonPress-2> {
-    set blt::ComboTree::_private(cursor) [%W cget -cursor]
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind ComboTree <B2-Motion> {
-    %W scan dragto %x %y
-}
-
-bind ComboTree <ButtonRelease-2> {
-    %W configure -cursor $blt::ComboTree::_private(cursor)
-}
-
-bind ComboTree <B1-Leave> {
-    if { $blt::ComboTree::_private(scroll) } {
-	blt::ComboTree::AutoScroll %W 
-    }
-}
-
-bind ComboTree <B1-Enter> {
-    after cancel $blt::ComboTree::_private(afterId)
-    set blt::ComboTree::_private(afterId) -1
-}
-
-# 
-# KeyPress assignments
-#
-#	Up			
-#	Down
-#	Shift-Up
-#	Shift-Down
-#	Prior (PageUp)
-#	Next  (PageDn)
-#	Left
-#	Right
-#	space		Start selection toggle of entry currently with focus.
-#	Return		Start selection toggle of entry currently with focus.
-#	Home
-#	End
-#	F1
-#	F2
-#	ASCII char	Go to next open entry starting with character.
-#
-# KeyRelease
-#
-#	space		Stop selection toggle of entry currently with focus.
-#	Return		Stop selection toggle of entry currently with focus.
-
-
-bind ComboTree <KeyPress-Up> {
-    %W activate up
-    %W see active
-}
-
-bind ComboTree <KeyPress-Down> {
-    %W activate down
-    %W see active
-}
-
-bind ComboTree <Shift-KeyPress-Up> {
-    %W activate prevsibling
-    %W see active
-}
-
-bind ComboTree <Shift-KeyPress-Down> {
-    %W activate nextsibling
-    %W see active
-}
-
-bind ComboTree <KeyPress-Prior> {
-    %W activate top
-    %W see active
-}
-
-bind ComboTree <KeyPress-Next> {
-    %W activate bottom
-    %W see active
-}
-
-bind ComboTree <KeyPress-Left> {
-    %W close active
-}
-
-bind ComboTree <KeyPress-Right> {
-    %W open active
-    %W see active
-}
-
-bind ComboTree <KeyPress-space> {
-    %W invoke active
-}
-
-bind ComboTree <KeyPress-Return> {
-    %W invoke active
-}
-
-bind ComboTree <KeyPress> {
-    blt::ComboTree::NextMatch %W %A
-}
-
-bind ComboTree <KeyPress-Home> {
-    %W open top
-    %W see active -anchor w
-}
-
-bind ComboTree <KeyPress-End> {
-    blt::ComboTree::MoveFocus %W bottom
-}
-
-bind ComboTree <KeyPress-F1> {
-    %W open -recurse root
-}
-
-bind ComboTree <KeyPress-F2> {
-    eval %W close -r [%W entry children root] 
-}
-
-if {[string equal "x11" [tk windowingsystem]]} {
-    bind ComboTree <4> {
-	%W yview scroll -5 units
-    }
-    bind ComboTree <5> {
-	%W yview scroll 5 units
-    }
-} else {
-    bind ComboTree <MouseWheel> {
-	%W yview scroll [expr {- (%D / 120) * 4}] units
-    }
-}
-
-
-proc blt::ComboTree::ConfigureScrollbars { menu } {
-    set ys [$menu cget -yscrollbar]
-    if { $ys != "" } {
-	if { [$menu cget -yscrollcommand] == "" } {
-	    $menu configure -yscrollcommand [list $ys set]
-	}
-	if { [$ys cget -command] == "" } {
-	    $ys configure -command [list $menu yview] -orient vertical \
-		-highlightthickness 0
-	}
-    }
-    set xs [$menu cget -xscrollbar]
-    if { $xs != "" } {
-	if { [$menu cget -xscrollcommand] == "" } {
-	    $menu configure -xscrollcommand [list $xs set]
-	}
-	if { [$xs cget -command] == "" } {
-	    $xs configure -command [list $menu xview] -orient horizontal \
-		-highlightthickness 0
-	}
-    }
-}
\ No newline at end of file
diff --git a/blt3.0/library/dd_protocols/dd-color.tcl b/blt3.0/library/dd_protocols/dd-color.tcl
deleted file mode 100644
index 02ba488..0000000
--- a/blt3.0/library/dd_protocols/dd-color.tcl
+++ /dev/null
@@ -1,51 +0,0 @@
-# ----------------------------------------------------------------------
-#  PURPOSE:  drag&drop send routine for "color" data
-#
-#  Widgets that are to participate in drag&drop operations for
-#  "color" data should be registered as follows:
-#
-#      drag&drop .win source handler color dd_send_color
-#      drag&drop .win target handler color my_color_handler
-#
-#      proc my_color_handler {} {
-#          global DragDrop
-#
-#          set data $DragDrop(color)
-#            .
-#            .  do something with $data
-#            .
-#      }
-#
-#   AUTHOR:  Michael J. McLennan       Phone: (215)770-2842
-#            AT&T Bell Laboratories   E-mail: aluxpo!mmc at att.com
-#
-#     SCCS:  %W% (%G%)
-# ----------------------------------------------------------------------
-#            Copyright (c) 1993  AT&T  All Rights Reserved
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# COMMAND: dd_send_color <interp> <ddwin> <data>
-#
-#   INPUTS
-#     <interp> = interpreter for target application
-#      <ddwin> = pathname for target drag&drop window
-#       <data> = data returned from -tokencmd
-#
-#   RETURNS
-#     ""
-#
-#   SIDE-EFFECTS
-#     Sends data to remote application DragDrop(color), and then
-#     invokes the "color" handler for the drag&drop target.
-# ----------------------------------------------------------------------
-proc dd_send_color {interp ddwin data} {
-	send $interp "
-		foreach color [list $data] {
-			winfo rgb . \$color
-		}
-		global DragDrop
-		set DragDrop(color) [list $data]
-	"
-	send $interp "drag&drop target $ddwin handle color"
-}
diff --git a/blt3.0/library/dd_protocols/dd-file.tcl b/blt3.0/library/dd_protocols/dd-file.tcl
deleted file mode 100644
index d49c6f9..0000000
--- a/blt3.0/library/dd_protocols/dd-file.tcl
+++ /dev/null
@@ -1,53 +0,0 @@
-# ----------------------------------------------------------------------
-#  PURPOSE:  drag&drop send routine for "file" data
-#
-#  Widgets that are to participate in drag&drop operations for
-#  "file" data should be registered as follows:
-#
-#      drag&drop .win source handler text dd_send_file
-#      drag&drop .win target handler text my_file_handler
-#
-#      proc my_file_handler {} {
-#          global DragDrop
-#
-#          set data $DragDrop(file)
-#            .
-#            .  do something with $data
-#            .
-#      }
-#
-#   AUTHOR:  Michael J. McLennan       Phone: (215)770-2842
-#            AT&T Bell Laboratories   E-mail: aluxpo!mmc at att.com
-#
-#     SCCS:  %W% (%G%)
-# ----------------------------------------------------------------------
-#            Copyright (c) 1993  AT&T  All Rights Reserved
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# COMMAND: dd_send_file <interp> <ddwin> <data>
-#
-#   INPUTS
-#     <interp> = interpreter for target application
-#      <ddwin> = pathname for target drag&drop window
-#       <data> = data returned from -tokencmd
-#
-#   RETURNS
-#     ""
-#
-#   SIDE-EFFECTS
-#     Sends data to remote application DragDrop(file), and then
-#     invokes the "file" handler for the drag&drop target.
-# ----------------------------------------------------------------------
-proc dd_send_file {interp ddwin data} {
-	send $interp "
-		foreach file [list $data] {
-			if {!\[file exists \$file\]} {
-				error \"not a file: \$file\"
-			}
-		}
-		global DragDrop
-		set DragDrop(file) [list $data]
-	"
-	send $interp "drag&drop target $ddwin handle file"
-}
diff --git a/blt3.0/library/dd_protocols/dd-number.tcl b/blt3.0/library/dd_protocols/dd-number.tcl
deleted file mode 100644
index 0cee537..0000000
--- a/blt3.0/library/dd_protocols/dd-number.tcl
+++ /dev/null
@@ -1,51 +0,0 @@
-# ----------------------------------------------------------------------
-#  PURPOSE:  drag&drop send routine for "number" data
-#
-#  Widgets that are to participate in drag&drop operations for
-#  "number" data should be registered as follows:
-#
-#      drag&drop .win source handler number dd_send_number
-#      drag&drop .win target handler number my_number_handler
-#
-#      proc my_number_handler {} {
-#          global DragDrop
-#
-#          set data $DragDrop(number)
-#            .
-#            .  do something with $data
-#            .
-#      }
-#
-#   AUTHOR:  Michael J. McLennan       Phone: (215)770-2842
-#            AT&T Bell Laboratories   E-mail: aluxpo!mmc at att.com
-#
-#     SCCS:  %W% (%G%)
-# ----------------------------------------------------------------------
-#            Copyright (c) 1993  AT&T  All Rights Reserved
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# COMMAND: dd_send_number <interp> <ddwin> <data>
-#
-#   INPUTS
-#     <interp> = interpreter for target application
-#      <ddwin> = pathname for target drag&drop window
-#       <data> = data returned from -tokencmd
-#
-#   RETURNS
-#     ""
-#
-#   SIDE-EFFECTS
-#     Sends data to remote application DragDrop(number), and then
-#     invokes the "number" handler for the drag&drop target.
-# ----------------------------------------------------------------------
-proc dd_send_number {interp ddwin data} {
-	send $interp "
-		foreach num [list $data] {
-			expr \$num*1
-		}
-		global DragDrop
-		set DragDrop(number) [list $data]
-    "
-	send $interp "drag&drop target $ddwin handle number"
-}
diff --git a/blt3.0/library/dd_protocols/dd-text.tcl b/blt3.0/library/dd_protocols/dd-text.tcl
deleted file mode 100644
index eedbd48..0000000
--- a/blt3.0/library/dd_protocols/dd-text.tcl
+++ /dev/null
@@ -1,48 +0,0 @@
-# ----------------------------------------------------------------------
-#  PURPOSE:  drag&drop send routine for "text" data
-#
-#  Widgets that are to participate in drag&drop operations for
-#  "text" data should be registered as follows:
-#
-#      drag&drop .win source handler text dd_send_text
-#      drag&drop .win target handler text my_text_handler
-#
-#      proc my_text_handler {} {
-#          global DragDrop
-#
-#          set data $DragDrop(text)
-#            .
-#            .  do something with $data
-#            .
-#      }
-#
-#   AUTHOR:  Michael J. McLennan       Phone: (215)770-2842
-#            AT&T Bell Laboratories   E-mail: aluxpo!mmc at att.com
-#
-#     SCCS:  %W% (%G%)
-# ----------------------------------------------------------------------
-#            Copyright (c) 1993  AT&T  All Rights Reserved
-# ======================================================================
-
-# ----------------------------------------------------------------------
-# COMMAND: dd_send_text <interp> <ddwin> <data>
-#
-#   INPUTS
-#     <interp> = interpreter for target application
-#      <ddwin> = pathname for target drag&drop window
-#       <data> = data returned from -tokencmd
-#
-#   RETURNS
-#     ""
-#
-#   SIDE-EFFECTS
-#     Sends data to remote application DragDrop(text), and then
-#     invokes the "text" handler for the drag&drop target.
-# ----------------------------------------------------------------------
-proc dd_send_text {interp ddwin data} {
-	send $interp "
-		global DragDrop
-		set DragDrop(text) [list $data]
-	"
-	send $interp "drag&drop target $ddwin handle text"
-}
diff --git a/blt3.0/library/dd_protocols/tclIndex b/blt3.0/library/dd_protocols/tclIndex
deleted file mode 100644
index d3ca831..0000000
--- a/blt3.0/library/dd_protocols/tclIndex
+++ /dev/null
@@ -1,12 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands.  Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(dd_send_file) "source $dir/dd-file.tcl"
-set auto_index(dd_send_text) "source $dir/dd-text.tcl"
-set auto_index(dd_send_number) "source $dir/dd-number.tcl"
-set auto_index(dd_send_color) "source $dir/dd-color.tcl"
diff --git a/blt3.0/library/dnd.tcl b/blt3.0/library/dnd.tcl
deleted file mode 100644
index c8fb68d..0000000
--- a/blt3.0/library/dnd.tcl
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# dnd.tcl
-#
-# ----------------------------------------------------------------------
-# Bindings for the BLT drag&drop command
-# ----------------------------------------------------------------------
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at bell-labs.com
-#            http://www.tcltk.com/blt
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ======================================================================
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-if { $tcl_version >= 8.0 } {
-    set cmd blt::dnd
-} else {
-    set cmd dnd
-}
-for { set i 1 } { $i <= 5 } { incr i } {
-    bind BltDndButton$i <ButtonPress-$i>  [list $cmd select %W %X %Y %t]
-    bind BltDndButton$i <B$i-Motion>	  [list $cmd drag %W %X %Y]
-    bind BltDndButton$i <ButtonRelease-$i> [list $cmd drop %W %X %Y]
-}
-
-# ----------------------------------------------------------------------
-#
-# DndInit --
-#
-#	Invoked from C whenever a new drag&drop source is created.
-#	Sets up the default bindings for the drag&drop source.
-#
-#	<ButtonPress-?>	 Starts the drag operation.
-#	<B?-Motion>	 Updates the drag.
-#	<ButtonRelease-?> Drop the data on the target.
-#
-# Arguments:	
-#	widget		source widget
-#	button		Mouse button used to activate drag.
-#	cmd		"dragdrop" or "blt::dragdrop"
-#
-# ----------------------------------------------------------------------
-
-proc blt::DndInit { widget button } {
-    set tagList {}
-    if { $button > 0 } {
-	lappend tagList BltDndButton$button
-    }
-    foreach tag [bindtags $widget] {
-	if { ![string match BltDndButton* $tag] } {
-	    lappend tagList $tag
-	}
-    }
-    bindtags $widget $tagList
-}
-
-proc blt::DndStdDrop { widget args } {
-    array set info $args
-    set fmt [lindex $info(formats) 0]
-    dnd pull $widget $fmt 
-    return 0
-}
-
-proc blt::PrintInfo { array } {
-    upvar $array state
-
-    parray state
-    if { $info(state) & 0x01 } {
-	puts "Shift-Drop"
-    }
-    if { $info(state) & 0x02 } {
-	puts "CapsLock-Drop"
-    }
-    if { $info(state) & 0x04 } {
-	puts "Control-Drop"
-    }
-    if { $info(state) & 0x08 } {
-	puts "Alt-Drop"
-    }
-    if { $info(state) & 0x10 } {
-	puts "NumLock-Drop"
-    }
-}
\ No newline at end of file
diff --git a/blt3.0/library/dragdrop.tcl b/blt3.0/library/dragdrop.tcl
deleted file mode 100644
index 04e1960..0000000
--- a/blt3.0/library/dragdrop.tcl
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# dragdrop.tcl
-#
-# ----------------------------------------------------------------------
-# Bindings for the BLT drag&drop command
-# ----------------------------------------------------------------------
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at bell-labs.com
-#            http://www.tcltk.com/blt
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ======================================================================
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-if { $tcl_version >= 8.0 } {
-    set cmd blt::drag&drop
-} else {
-    set cmd drag&drop
-}
-for { set i 1 } { $i <= 5 } { incr i } {
-    bind BltDrag&DropButton$i <ButtonPress-$i>  [list $cmd drag %W %X %Y]
-    bind BltDrag&DropButton$i <B$i-Motion>	  [list $cmd drag %W %X %Y]
-    bind BltDrag&DropButton$i <ButtonRelease-$i> [list $cmd drop %W %X %Y]
-}
-
-# ----------------------------------------------------------------------
-#
-# Drag&DropInit --
-#
-#	Invoked from C whenever a new drag&drop source is created.
-#	Sets up the default bindings for the drag&drop source.
-#
-#	<ButtonPress-?>	 Starts the drag operation.
-#	<B?-Motion>	 Updates the drag.
-#	<ButtonRelease-?> Drop the data on the target.
-#
-# Arguments:	
-#	widget		source widget
-#	button		Mouse button used to activate drag.
-#	cmd		"dragdrop" or "blt::dragdrop"
-#
-# ----------------------------------------------------------------------
-
-proc blt::Drag&DropInit { widget button } {
-    set tagList {}
-    if { $button > 0 } {
-	lappend tagList BltDrag&DropButton$button
-    }
-    foreach tag [bindtags $widget] {
-	if { ![string match BltDrag&DropButton* $tag] } {
-	    lappend tagList $tag
-	}
-    }
-    bindtags $widget $tagList
-}
-
diff --git a/blt3.0/library/drawer.tcl b/blt3.0/library/drawer.tcl
deleted file mode 100644
index 084062b..0000000
--- a/blt3.0/library/drawer.tcl
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace eval blt::Drawer {
-    set buttonPressed 0
-    proc Initialize {} {
-    }
-}
-
-bind DrawerHandle <Enter> { 
-    if { !$blt::Drawer::buttonPressed } { 
-	%W activate 
-    } 
-} 
-bind DrawerHandle <Leave> { 
-    if { !$blt::Drawer::buttonPressed } { 
-	%W deactivate
-    } 
-}
-bind DrawerHandle <KeyPress-Left> { 
-    %W move -10 0 
-}
-bind DrawerHandle <KeyPress-Right> { 
-    %W move 10  0 
-}
-bind DrawerHandle <KeyPress-Up> { 
-    %W move 0 -10 
-}
-bind DrawerHandle <KeyPress-Down> { 
-    %W move 0 10 
-}
-bind DrawerHandle <ButtonPress-1> { 
-    set blt::Drawer::buttonPressed 1
-    %W anchor %X %Y 
-}
-bind DrawerHandle <B1-Motion> { 
-    %W mark %X %Y 
-}
-bind DrawerHandle <ButtonRelease-1> { 
-    set blt::Drawer::buttonPressed 0
-    %W set %X %Y 
-}
-
diff --git a/blt3.0/library/filmstrip.tcl b/blt3.0/library/filmstrip.tcl
deleted file mode 100644
index f7a268c..0000000
--- a/blt3.0/library/filmstrip.tcl
+++ /dev/null
@@ -1,52 +0,0 @@
-namespace eval blt::Filmstrip {
-    set buttonPressed 0
-    proc Initialize {} {
-    }
-}
-
-bind FilmstripHandle <Enter> { 
-    if { !$blt::Filmstrip::buttonPressed } { 
-	%W activate 
-    } 
-} 
-bind FilmstripHandle <Leave> { 
-    if { !$blt::Filmstrip::buttonPressed } { 
-	%W deactivate
-    } 
-}
-bind FilmstripHandle <KeyPress-Left> { 
-    %W move -10 0 
-}
-bind FilmstripHandle <KeyPress-Right> { 
-    %W move 10  0 
-}
-bind FilmstripHandle <KeyPress-Up> { 
-    %W move 0 -10 
-}
-bind FilmstripHandle <KeyPress-Down> { 
-    %W move 0 10 
-}
-bind FilmstripHandle <Shift-KeyPress-Left> { 
-    %W move -100 0 
-}
-bind FilmstripHandle <Shift-KeyPress-Right> { 
-    %W move 100  0 
-}
-bind FilmstripHandle <Shift-KeyPress-Up> { 
-    %W move 0 -100 
-}
-bind FilmstripHandle <Shift-KeyPress-Down> { 
-    %W move 0 100
-}
-bind FilmstripHandle <ButtonPress-1> { 
-    set blt::Filmstrip::buttonPressed 1
-    %W anchor %X %Y 
-}
-bind FilmstripHandle <B1-Motion> { 
-    %W mark %X %Y 
-}
-bind FilmstripHandle <ButtonRelease-1> { 
-    set blt::Filmstrip::buttonPressed 0
-    %W set %X %Y 
-}
-
diff --git a/blt3.0/library/graph.tcl b/blt3.0/library/graph.tcl
deleted file mode 100644
index fd4a6d2..0000000
--- a/blt3.0/library/graph.tcl
+++ /dev/null
@@ -1,775 +0,0 @@
-
-namespace eval ::blt::legend {
-    variable _private 
-    array set _private {
-	afterId ""
-	set scroll 0
-	set space   off
-	set x 0
-	set y 0
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# Initialize --
-#
-#	Invoked by internally by Treeview_Init routine.  Initializes
-#	the default bindings for the treeview widget entries.  These
-#	are local to the widget, so they can't be set through the
-#	widget's class bind tags.
-#
-# ----------------------------------------------------------------------
-proc blt::LegendSelections { w } {
-    if 0 {
-    #
-    # Active entry bindings
-    #
-    $w legend bind all <Enter> { 
-	%W entry highlight current 
-    }
-    $w legend bind all <Leave> { 
-	%W entry highlight "" 
-    }
-    }
-
-    #
-    # ButtonPress-1
-    #
-    #	Performs the following operations:
-    #
-    #	1. Clears the previous selection.
-    #	2. Selects the current entry.
-    #	3. Sets the focus to this entry.
-    #	4. Scrolls the entry into view.
-    #	5. Sets the selection anchor to this entry, just in case
-    #	   this is "multiple" mode.
-    #
-    
-    $w legend bind all <ButtonPress-1> { 	
-	blt::legend::SetSelectionAnchor %W current
-	set blt::legend::_private(scroll) 1
-    }
-
-    #
-    # B1-Motion
-    #
-    #	For "multiple" mode only.  Saves the current location of the
-    #	pointer for auto-scrolling.  Resets the selection mark.  
-    #
-    $w legend bind all <B1-Motion> { 
-	set blt::legend::_private(x) %x
-	set blt::legend::_private(y) %y
-	set elem [%W legend get @%x,%y]
-	if { $elem != "" } {
-	    if { [%W legend cget -selectmode] == "multiple" } {
-		%W legend selection mark $elem
-	    } else {
-		blt::legend::SetSelectionAnchor %W $elem
-	    }
-	}
-    }
-
-    #
-    # ButtonRelease-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w legend bind all <ButtonRelease-1> { 
-	if { [%W legend cget -selectmode] == "multiple" } {
-	    %W legend selection anchor current
-	}
-	after cancel $blt::legend::_private(afterId)
-	set blt::legend::_private(scroll) 0
-    }
-
-    #
-    # Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.
-    #
-
-    $w legend bind all <Shift-ButtonPress-1> { 
-	if { [%W legend cget -selectmode] == "multiple" && 
-	     [%W legend selection present] } {
-	    if { [%W legend get anchor] == "" } {
-		%W legend selection anchor current
-	    }
-	    set elem [%W legend get anchor]
-	    %W legend selection clearall
-	    %W legend selection set $elem current
-	} else {
-	    blt::legend::SetSelectionAnchor %W current
-	}
-    }
-    $w legend bind all <Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w legend bind all <Shift-B1-Motion> { 
-	# do nothing
-    }
-    $w legend bind all <Shift-ButtonRelease-1> { 
-	after cancel $blt::legend::_private(afterId)
-	set blt::legend::_private(scroll) 0
-    }
-
-    #
-    # Control-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w legend bind all <Control-ButtonPress-1> { 
-	if { [%W legend cget -selectmode] == "multiple" } {
-	    set elem [%W legend get current]
-	    %W legend selection toggle $elem
-	    %W legend selection anchor $elem
-	} else {
-	    blt::legend::SetSelectionAnchor %W current
-	}
-    }
-    $w legend bind all <Control-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w legend bind all <Control-B1-Motion> { 
-	# do nothing
-    }
-    $w legend bind all <Control-ButtonRelease-1> { 
-	after cancel $blt::legend::_private(afterId)
-	set blt::legend::_private(scroll) 0
-    }
-
-    $w legend bind all <Control-Shift-ButtonPress-1> { 
-	if { [%W legend cget -selectmode] == "multiple" && 
-	     [%W legend selection present] } {
-	    if { [%W legend get anchor] == "" } {
-		%W selection anchor current
-	    }
-	    if { [%W legend selection includes anchor] } {
-		%W legend selection set anchor current
-	    } else {
-		%W legend selection clear anchor current
-		%W legend selection set current
-	    }
-	} else {
-	    blt::legend::SetSelectionAnchor %W current
-	}
-    }
-    $w legend bind all <Control-Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w legend bind all <Control-Shift-B1-Motion> { 
-	# do nothing
-    }
-    $w legend bind all <KeyPress-Up> {
-	blt::legend::MoveFocus %W previous.row
-	if { $blt::legend::_private(space) } {
-	    %W legend selection toggle focus
-	}
-    }
-    $w legend bind all <KeyPress-Down> {
-	blt::legend::MoveFocus %W next.row
-	if { $blt::legend::_private(space) } {
-	    %W legend selection toggle focus
-	}
-    }
-    $w legend bind all <KeyPress-Left> {
-	blt::legend::MoveFocus %W previous.column
-	if { $blt::legend::_private(space) } {
-	    %W legend selection toggle focus
-	}
-    }
-    $w legend bind all <KeyPress-Right> {
-	blt::legend::MoveFocus %W next.column
-	if { $blt::legend::_private(space) } {
-	    %W legend selection toggle focus
-	}
-    }
-    $w legend bind all <KeyPress-space> {
-	if { [%W legend cget -selectmode] == "single" } {
-	    if { [%W legend selection includes focus] } {
-		%W legend selection clearall
-	    } else {
-		%W legend selection clearall
-		%W legend selection set focus
-	    }
-	} else {
-	    %W legend selection toggle focus
-	}
-	set blt::legend::_private(space) on
-    }
-
-    $w legend bind all <KeyRelease-space> { 
-	set blt::legend::_private(space) off
-    }
-    $w legend bind all <KeyPress-Return> {
-	blt::legend::MoveFocus %W focus
-	set blt::legend::_private(space) on
-    }
-    $w legend bind all <KeyRelease-Return> { 
-	set blt::legend::_private(space) off
-    }
-    $w legend bind all <KeyPress-Home> {
-	blt::legend::MoveFocus %W first
-    }
-    $w legend bind all <KeyPress-End> {
-	blt::tv::MoveFocus %W last
-    }
-}
-
-proc blt::legend::SetSelectionAnchor { w tagOrId } {
-    set elem [$w legend get $tagOrId]
-    # If the anchor hasn't changed, don't do anything
-    if { $elem != [$w legend get anchor] } {
-	$w legend selection clearall
-	$w legend focus $elem
-	$w legend selection set $elem
-	$w legend selection anchor $elem
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# MoveFocus --
-#
-#	Invoked by KeyPress bindings.  Moves the active selection to
-#	the entry <where>, which is an index such as "up", "down",
-#	"prevsibling", "nextsibling", etc.
-#
-# ----------------------------------------------------------------------
-proc blt::legend::MoveFocus { w elem } {
-    catch {$w legend focus $elem} result
-    puts stderr "result=$result elem=$elem"
-    if { [$w legend cget -selectmode] == "single" } {
-        $w legend selection clearall
-        $w legend selection set focus
-	$w legend selection anchor focus
-    }
-}
-
-
-proc Blt_ActiveLegend { graph } {
-    $graph legend bind all <Enter> [list blt::ActivateLegend $graph ]
-    $graph legend bind all <Leave> [list blt::DeactivateLegend $graph]
-    $graph legend bind all <ButtonPress-1> [list blt::HighlightLegend $graph]
-}
-
-proc Blt_Crosshairs { graph } {
-    blt::Crosshairs $graph 
-}
-
-proc Blt_ResetCrosshairs { graph state } {
-    blt::Crosshairs $graph "Any-Motion" $state
-}
-
-proc Blt_ZoomStack { graph } {
-    blt::ZoomStack $graph
-}
-
-proc Blt_PrintKey { graph } {
-    blt::PrintKey $graph
-}
-
-proc Blt_ClosestPoint { graph } {
-    blt::ClosestPoint $graph
-}
-
-#
-# The following procedures that reside in the "blt" namespace are
-# supposed to be private.
-#
-
-proc blt::ActivateLegend { graph } {
-    set elem [$graph legend get current]
-    $graph legend activate $elem
-}
-proc blt::DeactivateLegend { graph } {
-    set elem [$graph legend get current]
-    $graph legend deactivate $elem
-}
-
-proc blt::HighlightLegend { graph } {
-    set elem [$graph legend get current]
-    if { $elem != ""  } {
-      set relief [$graph element cget $elem -labelrelief]
-      if { $relief == "flat" } {
-	$graph element configure $elem -labelrelief raised
-	$graph element activate $elem
-      } else {
-	$graph element configure $elem -labelrelief flat
-	$graph element deactivate $elem
-      }
-   }
-}
-
-proc blt::Crosshairs { graph {event "Any-Motion"} {state "on"}} {
-    $graph crosshairs $state
-    bind crosshairs-$graph <$event>   {
-	%W crosshairs configure -position @%x,%y 
-    }
-    bind crosshairs-$graph <Leave>   {
-	%W crosshairs off
-    }
-    bind crosshairs-$graph <Enter>   {
-	%W crosshairs on
-    }
-    $graph crosshairs configure -color red
-    if { $state == "on" } {
-	blt::AddBindTag $graph crosshairs-$graph
-    } elseif { $state == "off" } {
-	blt::RemoveBindTag $graph crosshairs-$graph
-    }
-}
-
-proc blt::InitStack { graph } {
-    global zoomInfo
-    set zoomInfo($graph,interval) 100
-    set zoomInfo($graph,afterId) 0
-    set zoomInfo($graph,A,x) {}
-    set zoomInfo($graph,A,y) {}
-    set zoomInfo($graph,B,x) {}
-    set zoomInfo($graph,B,y) {}
-    set zoomInfo($graph,stack) {}
-    set zoomInfo($graph,corner) A
-}
-
-proc blt::ZoomStack { graph {start "ButtonPress-1"} {reset "ButtonPress-3"} } {
-    global zoomInfo zoomMod
-    
-    blt::InitStack $graph
-    
-    if { [info exists zoomMod] } {
-	set modifier $zoomMod
-    } else {
-	set modifier ""
-    }
-    bind zoom-$graph <${modifier}${start}> { blt::SetZoomPoint %W %x %y }
-    bind zoom-$graph <${modifier}${reset}> { 
-	if { [%W inside %x %y] } { 
-	    blt::ResetZoom %W 
-	}
-    }
-    blt::AddBindTag $graph zoom-$graph
-}
-
-proc blt::PrintKey { graph {event "Shift-ButtonRelease-3"} } {
-    bind print-$graph <$event>  { Blt_PostScriptDialog %W }
-    blt::AddBindTag $graph print-$graph
-}
-
-proc blt::ClosestPoint { graph {event "Control-ButtonPress-2"} } {
-    bind closest-point-$graph <$event>  {
-	blt::FindElement %W %x %y
-    }
-    blt::AddBindTag $graph closest-point-$graph
-}
-
-proc blt::AddBindTag { widget tag } {
-    set oldTagList [bindtags $widget]
-    if { [lsearch $oldTagList $tag] < 0 } {
-	bindtags $widget [linsert $oldTagList 0  $tag]
-    }
-}
-
-proc blt::RemoveBindTag { widget tag } {
-    set oldTagList [bindtags $widget]
-    set index [lsearch $oldTagList $tag]
-    if { $index >= 0 } {
-	bindtags $widget [lreplace $oldTagList $index $index]
-    }
-}
-
-proc blt::FindElement { graph x y } {
-    array set info [$graph element closest $x $y -interpolate yes]
-    if { ![info exists info(name)] } {
-	beep
-	return
-    }
-    # --------------------------------------------------------------
-    # find(name)		- element Id
-    # find(index)		- index of closest point
-    # find(x) find(y)		- coordinates of closest point
-    #				  or closest point on line segment.
-    # find(dist)		- distance from sample coordinate
-    # --------------------------------------------------------------
-    set markerName "bltClosest_$info(name)"
-    catch { $graph marker delete $markerName }
-    $graph marker create text -coords { $info(x) $info(y) } \
-	-name $markerName \
-	-text "$info(name): $info(dist)\nindex $info(index)" \
-	-font "Arial 6" \
-	-anchor center -justify left \
-	-yoffset 0 -bg {} 
-
-    set coords [$graph invtransform $x $y]
-    set nx [lindex $coords 0]
-    set ny [lindex $coords 1]
-
-    $graph marker create line -coords "$nx $ny $info(x) $info(y)" \
-	-name line.$markerName 
-
-    blt::FlashPoint $graph $info(name) $info(index) 10
-    blt::FlashPoint $graph $info(name) [expr $info(index) + 1] 10
-}
-
-proc blt::FlashPoint { graph name index count } {
-    if { $count & 1 } {
-        $graph element deactivate $name 
-    } else {
-        $graph element activate $name $index
-    }
-    incr count -1
-    if { $count > 0 } {
-	after 200 blt::FlashPoint $graph $name $index $count
-	update
-    } else {
-	eval $graph marker delete [$graph marker names "bltClosest_*"]
-    }
-}
-
-proc blt::GetCoords { graph x y index } {
-    global zoomInfo
-    if { [$graph cget -invertxy] } {
-	set zoomInfo($graph,$index,x) $y
-	set zoomInfo($graph,$index,y) $x
-    } else {
-	set zoomInfo($graph,$index,x) $x
-	set zoomInfo($graph,$index,y) $y
-    }
-}
-
-proc blt::MarkPoint { graph index } {
-    global zoomInfo
-    if { [llength [$graph xaxis use]] > 0 } {
-	set x [$graph xaxis invtransform $zoomInfo($graph,$index,x)]
-    } else if { [llength [$graph x2axis use]] > 0 } {
-	set x [$graph x2axis invtransform $zoomInfo($graph,$index,x)]
-    }
-    if { [llength [$graph yaxis use]] > 0 } {
-	set y [$graph yaxis invtransform $zoomInfo($graph,$index,y)]
-    } else if { [llength [$graph y2axis use]] > 0 } {
-	set y [$graph y2axis invtransform $zoomInfo($graph,$index,y)]
-    }
-    set marker "zoomText_$index"
-    set text [format "x=%.4g\ny=%.4g" $x $y] 
-
-    if [$graph marker exists $marker] {
-     	$graph marker configure $marker -coords { $x $y } -text $text 
-    } else {
-    	$graph marker create text -coords { $x $y } -name $marker \
-   	    -font "mathmatica1 10" \
-	    -text $text -anchor center -bg {} -justify left
-    }
-}
-
-proc blt::DestroyZoomTitle { graph } {
-    global zoomInfo
-
-    if { $zoomInfo($graph,corner) == "A" } {
-	catch { $graph marker delete "zoomTitle" }
-    }
-}
-
-proc blt::PopZoom { graph } {
-    global zoomInfo
-
-    set zoomStack $zoomInfo($graph,stack)
-    if { [llength $zoomStack] > 0 } {
-	set cmd [lindex $zoomStack 0]
-	set zoomInfo($graph,stack) [lrange $zoomStack 1 end]
-	eval $cmd
-	blt::ZoomTitleLast $graph
-	busy hold $graph
-	update
-	busy release $graph
-	after 2000 "blt::DestroyZoomTitle $graph"
-    } else {
-	catch { $graph marker delete "zoomTitle" }
-    }
-}
-
-# Push the old axis limits on the stack and set the new ones
-
-proc blt::PushZoom { graph } {
-    global zoomInfo
-    eval $graph marker delete [$graph marker names "zoom*"]
-    if { [info exists zoomInfo($graph,afterId)] } {
-	after cancel $zoomInfo($graph,afterId)
-    }
-    set x1 $zoomInfo($graph,A,x)
-    set y1 $zoomInfo($graph,A,y)
-    set x2 $zoomInfo($graph,B,x)
-    set y2 $zoomInfo($graph,B,y)
-
-    if { ($x1 == $x2) || ($y1 == $y2) } { 
-	# No delta, revert to start
-	return
-    }
-    set cmd {}
-    foreach axis [$graph axis names] {
-	if { [$graph axis cget $axis -hide] } {
-	    continue
-	}
-	set min [$graph axis cget $axis -min] 
-	set max [$graph axis cget $axis -max]
-	set logscale  [$graph axis cget $axis -logscale]
-	# Save the current scale (log or linear) so that we can restore it.
-	# This is for the case where the user changes to logscale while
-	# zooming.  A previously pushed axis limit could be negative.  It
-	# seems better for popping the zoom stack to restore a previous view
-	# (not convert the ranges).
-	set c [list $graph axis configure $axis]
-	lappend c -min $min -max $max -logscale $logscale
-	append cmd "$c\n"
-    }
-
-    # This effectively pushes the command to reset the graph to the current
-    # zoom level onto the stack.  This is useful if the new axis ranges are
-    # bad and we need to reset the zoom stack.
-    set zoomInfo($graph,stack) [linsert $zoomInfo($graph,stack) 0 $cmd]
-    foreach axis [$graph axis names] {
-	if { [$graph axis cget $axis -hide] } {
-	    continue;			# Don't set zoom on axes not displayed.
-	}
-	set type [$graph axis type $axis]
-	if { $type  == "x" } {
-	    set min [$graph axis invtransform $axis $x1]
-	    set max [$graph axis invtransform $axis $x2]
-	} elseif { $type == "y" } {
-	    set min [$graph axis invtransform $axis $y1]
-	    set max [$graph axis invtransform $axis $y2]
-	} else {
-	    continue;			# Axis is not bound to any margin.
-	}
-	if { ![SetAxisRanges $graph $axis $min $max] } {
-	    blt::PopZoom $graph
-	    bell
-	    return
-	}
-    }
-    busy hold $graph 
-    update;				# This "update" redraws the graph
-    busy release $graph
-}
-
-proc blt::SetAxisRanges { graph axis min max } {
-    if { $min > $max } { 
-	set tmp $max; set max $min; set min $tmp
-    }
-    if { [catch { $graph axis configure $axis -min $min -max $max }] != 0 } {
-	return 0
-    }
-    return 1
-}
-
-#
-# This routine terminates either an existing zoom, or pops back to
-# the previous zoom level (if no zoom is in progress).
-#
-
-proc blt::ResetZoom { graph } {
-    global zoomInfo 
-
-    if { ![info exists zoomInfo($graph,corner)] } {
-	blt::InitStack $graph 
-    }
-    eval $graph marker delete [$graph marker names "zoom*"]
-
-    if { $zoomInfo($graph,corner) == "A" } {
-	# Reset the whole axis
-	blt::PopZoom $graph
-    } else {
-	global zoomMod
-
-	if { [info exists zoomMod] } {
-	    set modifier $zoomMod
-	} else {
-	    set modifier "Any-"
-	}
-	set zoomInfo($graph,corner) A
-	blt::RemoveBindTag $graph select-region-$graph
-    }
-}
-
-option add *zoomTitle.font	  "Arial 14"
-option add *zoomTitle.shadow	  yellow4
-option add *zoomTitle.foreground  yellow1
-option add *zoomTitle.coords	  "-Inf Inf"
-
-proc blt::ZoomTitleNext { graph } {
-    global zoomInfo
-    set level [expr [llength $zoomInfo($graph,stack)] + 1]
-    if { [$graph cget -invertxy] } {
-	set coords "-Inf -Inf"
-    } else {
-	set coords "-Inf Inf"
-    }
-    $graph marker create text -name "zoomTitle" -text "Zoom #$level" \
-	-coords $coords -bindtags "" -anchor nw
-}
-
-proc blt::ZoomTitleLast { graph } {
-    global zoomInfo
-
-    set level [llength $zoomInfo($graph,stack)]
-    if { $level > 0 } {
-     	$graph marker create text -name "zoomTitle" -anchor nw \
-	    -text "Zoom #$level" 
-    }
-}
-
-
-proc blt::SetZoomPoint { graph x y } {
-    global zoomInfo zoomMod
-    if { ![info exists zoomInfo($graph,corner)] } {
-	blt::InitStack $graph
-    }
-    blt::GetCoords $graph $x $y $zoomInfo($graph,corner)
-    if { [info exists zoomMod] } {
-	set modifier $zoomMod
-    } else {
-	set modifier "Any-"
-    }
-    bind select-region-$graph <${modifier}Motion> { 
-	blt::GetCoords %W %x %y B
-	#blt::MarkPoint $graph B
-	blt::Box %W
-    }
-    if { $zoomInfo($graph,corner) == "A" } {
-	if { ![$graph inside $x $y] } {
-	    return
-	}
-	# First corner selected, start watching motion events
-
-	#blt::MarkPoint $graph A
-	blt::ZoomTitleNext $graph 
-
-	blt::AddBindTag $graph select-region-$graph
-	set zoomInfo($graph,corner) B
-    } else {
-	# Delete the modal binding
-	blt::RemoveBindTag $graph select-region-$graph
-	blt::PushZoom $graph 
-	set zoomInfo($graph,corner) A
-    }
-}
-
-option add *zoomOutline.dashes		4	
-option add *zoomTitle.anchor		nw
-option add *zoomOutline.lineWidth	2
-option add *zoomOutline.xor		yes
-
-proc blt::MarchingAnts { graph offset } {
-    global zoomInfo
-
-    incr offset
-    # wrap the counter after 2^16
-    set offset [expr $offset & 0xFFFF]
-    if { [$graph marker exists zoomOutline] } {
-	$graph marker configure zoomOutline -dashoffset $offset 
-	set interval $zoomInfo($graph,interval)
-	set id [after $interval [list blt::MarchingAnts $graph $offset]]
-	set zoomInfo($graph,afterId) $id
-    }
-}
-
-proc blt::Box { graph } {
-    global zoomInfo
-
-    if { $zoomInfo($graph,A,x) > $zoomInfo($graph,B,x) } { 
-	set x1 [$graph xaxis invtransform $zoomInfo($graph,B,x)]
-	set y1 [$graph yaxis invtransform $zoomInfo($graph,B,y)]
-	set x2 [$graph xaxis invtransform $zoomInfo($graph,A,x)]
-	set y2 [$graph yaxis invtransform $zoomInfo($graph,A,y)]
-    } else {
-	set x1 [$graph xaxis invtransform $zoomInfo($graph,A,x)]
-	set y1 [$graph yaxis invtransform $zoomInfo($graph,A,y)]
-	set x2 [$graph xaxis invtransform $zoomInfo($graph,B,x)]
-	set y2 [$graph yaxis invtransform $zoomInfo($graph,B,y)]
-    }
-    set coords { $x1 $y1 $x2 $y1 $x2 $y2 $x1 $y2 $x1 $y1 }
-    if { [$graph marker exists "zoomOutline"] } {
-	$graph marker configure "zoomOutline" -coords $coords 
-    } else {
-	set X [lindex [$graph xaxis use] 0]
-	set Y [lindex [$graph yaxis use] 0]
-	$graph marker create line -coords $coords -name "zoomOutline" \
-	    -mapx $X -mapy $Y
-	set interval $zoomInfo($graph,interval)
-	set id [after $interval [list blt::MarchingAnts $graph 0]]
-	set zoomInfo($graph,afterId) $id
-    }
-}
-
-
-proc Blt_PostScriptDialog { graph } {
-    set top $graph.top
-    toplevel $top
-
-    foreach var { center landscape maxpect preview decorations padx 
-	pady paperwidth paperheight width height colormode } {
-	global $graph.$var
-	set $graph.$var [$graph postscript cget -$var]
-    }
-    set row 1
-    set col 0
-    label $top.title -text "PostScript Options"
-    blt::table $top $top.title -cspan 7
-    foreach bool { center landscape maxpect preview decorations } {
-	set w $top.$bool-label
-	label $w -text "-$bool" -font "courier 12"
-	blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
-	set w $top.$bool-yes
-	global $graph.$bool
-	radiobutton $w -text "yes" -variable $graph.$bool -value 1
-	blt::table $top $row,$col+1 $w -anchor w
-	set w $top.$bool-no
-	radiobutton $w -text "no" -variable $graph.$bool -value 0
-	blt::table $top $row,$col+2 $w -anchor w
-	incr row
-    }
-    label $top.modes -text "-colormode" -font "courier 12"
-    blt::table $top $row,0 $top.modes -anchor e  -pady { 2 0 } -padx { 0 4 }
-    set col 1
-    foreach m { color greyscale } {
-	set w $top.$m
-	radiobutton $w -text $m -variable $graph.colormode -value $m
-	blt::table $top $row,$col $w -anchor w
-	incr col
-    }
-    set row 1
-    frame $top.sep -width 2 -bd 1 -relief sunken
-    blt::table $top $row,3 $top.sep -fill y -rspan 6
-    set col 4
-    foreach value { padx pady paperwidth paperheight width height } {
-	set w $top.$value-label
-	label $w -text "-$value" -font "courier 12"
-	blt::table $top $row,$col $w -anchor e  -pady { 2 0 } -padx { 0 4 }
-	set w $top.$value-entry
-	global $graph.$value
-	entry $w -textvariable $graph.$value -width 8
-	blt::table $top $row,$col+1 $w -cspan 2 -anchor w -padx 8
-	incr row
-    }
-    blt::table configure $top c3 -width .125i
-    button $top.cancel -text "Cancel" -command "destroy $top"
-    blt::table $top $row,0 $top.cancel  -width 1i -pady 2 -cspan 3
-    button $top.reset -text "Reset" -command "destroy $top"
-    #blt::table $top $row,1 $top.reset  -width 1i
-    button $top.print -text "Print" -command "blt::ResetPostScript $graph"
-    blt::table $top $row,4 $top.print  -width 1i -pady 2 -cspan 2
-}
-
-proc blt::ResetPostScript { graph } {
-    foreach var { center landscape maxpect preview decorations padx 
-	pady paperwidth paperheight width height colormode } {
-	global $graph.$var
-	set old [$graph postscript cget -$var]
-	if { [catch {$graph postscript configure -$var [set $graph.$var]}] != 0 } {
-	    $graph postscript configure -$var $old
-	    set $graph.$var $old
-	}
-    }
-    $graph postscript output "out.ps"
-    puts stdout "wrote file \"out.ps\"."
-    flush stdout
-}
diff --git a/blt3.0/library/hierbox.tcl b/blt3.0/library/hierbox.tcl
deleted file mode 100644
index c1cb117..0000000
--- a/blt3.0/library/hierbox.tcl
+++ /dev/null
@@ -1,522 +0,0 @@
-#
-# hierbox.tcl
-# ----------------------------------------------------------------------
-# Bindings for the BLT hierbox widget
-# ----------------------------------------------------------------------
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at lucent.com
-#            http://www.tcltk.com/blt
-#
-#      RCS:  $Id: hierbox.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ======================================================================
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-array set bltHierbox {
-    afterId ""
-    scroll  0
-    space   off
-    x       0
-    y       0
-}
-
-catch { 
-    namespace eval blt::Hierbox {} 
-}
-
-# 
-# ButtonPress assignments
-#
-#	B1-Enter	start auto-scrolling
-#	B1-Leave	stop auto-scrolling
-#	ButtonPress-2	start scan
-#	B2-Motion	adjust scan
-#	ButtonRelease-2 stop scan
-#
-
-bind Hierbox <ButtonPress-2> {
-    set bltHierbox(cursor) [%W cget -cursor]
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind Hierbox <B2-Motion> {
-    %W scan dragto %x %y
-}
-
-bind Hierbox <ButtonRelease-2> {
-    %W configure -cursor $bltHierbox(cursor)
-}
-
-bind Hierbox <B1-Leave> {
-    if { $bltHierbox(scroll) } {
-	blt::Hierbox::AutoScroll %W 
-    }
-}
-
-bind Hierbox <B1-Enter> {
-    after cancel $bltHierbox(afterId)
-}
-
-
-# 
-# KeyPress assignments
-#
-#	Up			
-#	Down
-#	Shift-Up
-#	Shift-Down
-#	Prior (PageUp)
-#	Next  (PageDn)
-#	Left
-#	Right
-#	space		Start selection toggle of entry currently with focus.
-#	Return		Start selection toggle of entry currently with focus.
-#	Home
-#	End
-#	F1
-#	F2
-#	ASCII char	Go to next open entry starting with character.
-#
-# KeyRelease
-#
-#	space		Stop selection toggle of entry currently with focus.
-#	Return		Stop selection toggle of entry currently with focus.
-
-
-bind Hierbox <KeyPress-Up> {
-    blt::Hierbox::MoveFocus %W up
-    if { $bltHierbox(space) } {
-	%W selection toggle focus
-    }
-}
-
-bind Hierbox <KeyPress-Down> {
-    blt::Hierbox::MoveFocus %W down
-    if { $bltHierbox(space) } {
-	%W selection toggle focus
-    }
-}
-
-bind Hierbox <Shift-KeyPress-Up> {
-    blt::Hierbox::MoveFocus %W prevsibling
-}
-
-bind Hierbox <Shift-KeyPress-Down> {
-    blt::Hierbox::MoveFocus %W nextsibling
-}
-
-bind Hierbox <KeyPress-Prior> {
-    blt::Hierbox::MovePage %W top
-}
-
-bind Hierbox <KeyPress-Next> {
-    blt::Hierbox::MovePage %W bottom
-}
-
-bind Hierbox <KeyPress-Left> {
-    %W close focus
-}
-bind Hierbox <KeyPress-Right> {
-    %W open focus
-    %W see focus -anchor w
-}
-
-bind Hierbox <KeyPress-space> {
-    blt::HierboxToggle %W focus
-    set bltHierbox(space) on
-}
-
-bind Hierbox <KeyRelease-space> { 
-    set bltHierbox(space) off
-}
-
-bind Hierbox <KeyPress-Return> {
-    blt::HierboxToggle %W focus
-    set bltHierbox(space) on
-}
-
-bind Hierbox <KeyRelease-Return> { 
-    set bltHierbox(space) off
-}
-
-bind Hierbox <KeyPress> {
-    blt::Hierbox::NextMatchingEntry %W %A
-}
-
-bind Hierbox <KeyPress-Home> {
-    blt::Hierbox::MoveFocus %W root
-}
-
-bind Hierbox <KeyPress-End> {
-    blt::Hierbox::MoveFocus %W end
-}
-
-bind Hierbox <KeyPress-F1> {
-    %W open -r root
-}
-
-bind Hierbox <KeyPress-F2> {
-    eval %W close -r [%W entry children root 0 end] 
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::HierboxToggle <hierbox> <index>
-# Arguments:	hierbox		hierarchy widget
-#
-# Invoked when the user presses the space bar.  Toggles the selection
-# for the entry at <index>.
-# ----------------------------------------------------------------------
-proc blt::HierboxToggle { widget index } {
-    switch -- [$widget cget -selectmode] {
-        single {
-            if { [$widget selection includes $index] } {
-                $widget selection clearall
-            } else {
-		$widget selection set $index
-	    }
-        }
-        multiple {
-            $widget selection toggle $index
-        }
-    }
-}
-
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hierbox::MovePage <hierbox> <where>
-# Arguments:	hierbox		hierarchy widget
-#
-# Invoked by KeyPress bindings.  Pages the current view up or down.
-# The <where> argument should be either "top" or "bottom".
-# ----------------------------------------------------------------------
-
-proc blt::Hierbox::MovePage { widget where } {
-    # If the focus is already at the top/bottom of the window, we want
-    # to scroll a page. It's really one page minus an entry because we
-    # want to see the last entry on the next/last page.
-    if { [$widget index focus] == [$widget index view.$where] } {
-        if {$where == "top"} {
-	    $widget yview scroll -1 pages
-	    $widget yview scroll 1 units
-        } else {
-	    $widget yview scroll 1 pages
-	    $widget yview scroll -1 units
-        }
-    }
-    update
-
-    # Adjust the entry focus and the view.  Also activate the entry.
-    # just in case the mouse point is not in the widget.
-    $widget entry highlight view.$where
-    $widget focus view.$where
-    $widget see view.$where
-    if { [$widget cget -selectmode] == "single" } {
-        $widget selection clearall
-        $widget selection set focus
-    }
-}
-
-#
-#  Edit mode assignments
-#
-#	ButtonPress-3   Enables/disables edit mode on entry.  Sets focus to 
-#			entry.
-#
-#  KeyPress
-#
-#	Left		Move insertion position to previous.
-#	Right		Move insertion position to next.
-#	Up		Move insertion position up one line.
-#	Down		Move insertion position down one line.
-#	Return		End edit mode.
-#	Shift-Return	Line feed.
-#	Home		Move to first position.
-#	End		Move to last position.
-#	ASCII char	Insert character left of insertion point.
-#	Del		Delete character right of insertion point.
-#	Delete		Delete character left of insertion point.
-#	Ctrl-X		Cut
-#	Ctrl-V		Copy
-#	Ctrl-P		Paste
-#	
-#  KeyRelease
-#
-#  ButtonPress-1	Start selection if in entry, otherwise clear selection.
-#  B1-Motion		Extend/reduce selection.
-#  ButtonRelease-1      End selection if in entry, otherwise use last selection.
-#  B1-Enter		Disabled.
-#  B1-Leave		Disabled.
-#  ButtonPress-2	Same as above.
-#  B2-Motion		Same as above.
-#  ButtonRelease-2	Same as above.
-#	
-# All bindings in editting mode will "break" to override other bindings.
-#
-#
-
-bind Hierbox <ButtonPress-3> {
-    set node [%W nearest %x %y]
-    %W entry insert $node @%x,%y ""
-#    %W entry insert $node 2 ""
-}
-
-
-proc blt::Hierbox::Init { widget } {
-    #
-    # Active entry bindings
-    #
-    $widget bind Entry <Enter> { 
-	%W entry highlight current 
-    }
-    $widget bind Entry <Leave> { 
-	%W entry highlight "" 
-    }
-
-    #
-    # Button bindings
-    #
-    $widget button bind all <ButtonRelease-1> {
-	%W see -anchor nw current
-	%W toggle current
-    }
-    $widget button bind all <Enter> {
-	%W button highlight current
-    }
-    $widget button bind all <Leave> {
-	%W button highlight ""
-    }
-
-    #
-    # ButtonPress-1
-    #
-    #	Performs the following operations:
-    #
-    #	1. Clears the previous selection.
-    #	2. Selects the current entry.
-    #	3. Sets the focus to this entry.
-    #	4. Scrolls the entry into view.
-    #	5. Sets the selection anchor to this entry, just in case
-    #	   this is "multiple" mode.
-    #
-    
-    $widget bind Entry <ButtonPress-1> { 	
-	blt::Hierbox::SetSelectionAnchor %W current
-	set bltHierbox(scroll) 1
-    }
-
-    $widget bin Entry <Double-ButtonPress-1> {
-	%W toggle current
-    }
-
-    #
-    # B1-Motion
-    #
-    #	For "multiple" mode only.  Saves the current location of the
-    #	pointer for auto-scrolling.
-    #
-    $widget bind Entry <B1-Motion> { 
-	set bltHierbox(x) %x
-	set bltHierbox(y) %y
-	set index [%W nearest %x %y]
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection mark $index
-	} else {
-	    blt::Hierbox::SetSelectionAnchor %W $index
-	}	    
-    }
-
-    #
-    # ButtonRelease-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $widget bind Entry <ButtonRelease-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection anchor current
-	} 
-	after cancel $bltHierbox(afterId)
-	set bltHierbox(scroll) 0
-    }
-
-    #
-    # Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.
-    #
-    $widget bind Entry <Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] }  {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    set index [%W index anchor]
-	    %W selection clearall
-	    %W selection set $index current
-	} else {
-	    blt::Hierbox::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Shift-B1-Motion> { 
-	# do nothing
-    }
-    $widget bind Entry <Shift-ButtonRelease-1> { 
-	after cancel $bltHierbox(afterId)
-	set bltHierbox(scroll) 0
-    }
-
-    #
-    # Control-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $widget bind Entry <Control-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    set index [%W index current]
-	    %W selection toggle $index
-	    %W selection anchor $index
-	} else {
-	    blt::Hierbox::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Control-B1-Motion> { 
-	# do nothing
-    }
-    $widget bind Entry <Control-ButtonRelease-1> { 
-	after cancel $bltHierbox(afterId)
-	set bltHierbox(scroll) 0
-    }
-    #
-    # Control-Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $widget bind Entry <Control-Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    if { [%W selection includes anchor] } {
-		%W selection set anchor current
-	    } else {
-		%W selection clear anchor current
-		%W selection set current
-	    }
-	} else {
-	    blt::Hierbox::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Control-Shift-B1-Motion> { 
-	# do nothing
-    }
-}
-
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hierbox::AutoScroll <hierbox>
-#
-# Invoked when the user is selecting elements in a hierbox widget
-# and drags the mouse pointer outside of the widget.  Scrolls the
-# view in the direction of the pointer.
-#
-# Arguments:	hierbox		hierarchy widget
-#
-# ----------------------------------------------------------------------
-proc blt::Hierbox::AutoScroll { widget } {
-    global bltHierbox
-    if { ![winfo exists $widget] } {
-	return
-    }
-    set x $bltHierbox(x)
-    set y $bltHierbox(y)
-    set index [$widget nearest $x $y]
-    if { $y >= [winfo height $widget] } {
-	$widget yview scroll 1 units
-	set neighbor down
-    } elseif { $y < 0 } {
-	$widget yview scroll -1 units
-	set neighbor up
-    } else {
-	set neighbor $index
-    }
-    if { [$widget cget -selectmode] == "single" } {
-	blt::Hierbox::SetSelectionAnchor $widget $neighbor
-    } else {
-	$widget selection mark $index
-    }
-    set bltHierbox(afterId) [after 10 blt::Hierbox::AutoScroll $widget]
-}
-
-proc blt::Hierbox::SetSelectionAnchor { widget index } {
-    set index [$widget index $index]
-    $widget selection clearall
-    $widget see $index
-    $widget focus $index
-    $widget selection set $index
-    $widget selection anchor $index
-}
-
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hierbox::NextMatchingEntry <hierbox> <char>
-# Arguments:	hierbox		hierarchy widget
-#
-# Invoked by KeyPress bindings.  Searches for an entry that starts
-# with the letter <char> and makes that entry active.
-# ----------------------------------------------------------------------
-
-proc blt::Hierbox::NextMatchingEntry { widget key } {
-    if {[string match {[ -~]} $key]} {
-	set last [$widget index focus]
-	set next [$widget index next]
-	while { $next != $last } {
-	    set label [$widget entry cget $next -label]
-	    if { [string index $label 0] == $key } {
-		break
-	    }
-	    set next [$widget index -at $next next]
-	}
-	$widget focus $next
-        if {[$widget cget -selectmode] == "single"} {
-            $widget selection clearall
-            $widget selection set focus
-        }
-	$widget see focus
-    }
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hierbox::MoveFocus <hierbox> <where>
-#
-# Invoked by KeyPress bindings.  Moves the active selection to the
-# entry <where>, which is an index such as "up", "down", "prevsibling",
-# "nextsibling", etc.
-# ----------------------------------------------------------------------
-proc blt::Hierbox::MoveFocus { widget where } {
-    catch {$widget focus $where}
-    if { [$widget cget -selectmode] == "single" } {
-        $widget selection clearall
-        $widget selection set focus
-    }
-    $widget see focus
-}
diff --git a/blt3.0/library/hiertable.tcl b/blt3.0/library/hiertable.tcl
deleted file mode 100644
index be6994a..0000000
--- a/blt3.0/library/hiertable.tcl
+++ /dev/null
@@ -1,943 +0,0 @@
-# hiertable.tcl
-# ----------------------------------------------------------------------
-# Bindings for the BLT hiertable widget
-# ----------------------------------------------------------------------
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at lucent.com
-#            http://www.tcltk.com/blt
-#
-#      RCS:  $Id: hiertable.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ======================================================================
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-namespace eval blt::Hiertable {
-    set afterId ""
-    set scroll 0
-    set column ""
-    set space   off
-    set x 0
-    set y 0
-}
-
-# 
-# ButtonPress assignments
-#
-#	B1-Enter	start auto-scrolling
-#	B1-Leave	stop auto-scrolling
-#	ButtonPress-2	start scan
-#	B2-Motion	adjust scan
-#	ButtonRelease-2 stop scan
-#
-
-bind Hiertable <ButtonPress-2> {
-    set blt::Hiertable::cursor [%W cget -cursor]
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind Hiertable <B2-Motion> {
-    %W scan dragto %x %y
-}
-
-bind Hiertable <ButtonRelease-2> {
-    %W configure -cursor $blt::Hiertable::cursor
-}
-
-bind Hiertable <B1-Leave> {
-    if { $blt::Hiertable::scroll } {
-	blt::Hiertable::AutoScroll %W 
-    }
-}
-
-bind Hiertable <B1-Enter> {
-    after cancel $blt::Hiertable::afterId
-}
-
-# 
-# KeyPress assignments
-#
-#	Up			
-#	Down
-#	Shift-Up
-#	Shift-Down
-#	Prior (PageUp)
-#	Next  (PageDn)
-#	Left
-#	Right
-#	space		Start selection toggle of entry currently with focus.
-#	Return		Start selection toggle of entry currently with focus.
-#	Home
-#	End
-#	F1
-#	F2
-#	ASCII char	Go to next open entry starting with character.
-#
-# KeyRelease
-#
-#	space		Stop selection toggle of entry currently with focus.
-#	Return		Stop selection toggle of entry currently with focus.
-
-
-bind Hiertable <KeyPress-Up> {
-    blt::Hiertable::MoveFocus %W up
-    if { $blt::Hiertable::space } {
-	%W selection toggle focus
-    }
-}
-
-bind Hiertable <KeyPress-Down> {
-    blt::Hiertable::MoveFocus %W down
-    if { $blt::Hiertable::space } {
-	%W selection toggle focus
-    }
-}
-
-bind Hiertable <Shift-KeyPress-Up> {
-    blt::Hiertable::MoveFocus %W prevsibling
-}
-
-bind Hiertable <Shift-KeyPress-Down> {
-    blt::Hiertable::MoveFocus %W nextsibling
-}
-
-bind Hiertable <KeyPress-Prior> {
-    blt::Hiertable::MovePage %W top
-}
-
-bind Hiertable <KeyPress-Next> {
-    blt::Hiertable::MovePage %W bottom
-}
-
-bind Hiertable <KeyPress-Left> {
-    %W close focus
-}
-bind Hiertable <KeyPress-Right> {
-    %W open focus
-    %W see focus -anchor w
-}
-
-bind Hiertable <KeyPress-space> {
-    if { [%W cget -selectmode] == "single" } {
-	if { [%W selection includes focus] } {
-	    %W selection clearall
-	} else {
-	    %W selection clearall
-	    %W selection set focus
-	}
-    } else {
-	%W selection toggle focus
-    }
-    set blt::Hiertable::space on
-}
-
-bind Hiertable <KeyRelease-space> { 
-    set blt::Hiertable::space off
-}
-
-bind Hiertable <KeyPress-Return> {
-    blt::Hiertable::MoveFocus %W focus
-    set blt::Hiertable::space on
-}
-
-bind Hiertable <KeyRelease-Return> { 
-    set blt::Hiertable::space off
-}
-
-bind Hiertable <KeyPress> {
-    blt::Hiertable::NextMatchingEntry %W %A
-}
-
-bind Hiertable <KeyPress-Home> {
-    blt::Hiertable::MoveFocus %W top
-}
-
-bind Hiertable <KeyPress-End> {
-    blt::Hiertable::MoveFocus %W bottom
-}
-
-bind Hiertable <KeyPress-F1> {
-    %W open -r root
-}
-
-bind Hiertable <KeyPress-F2> {
-    eval %W close -r [%W entry children root] 
-}
-
-#
-# Differences between "current" and nearest.
-#
-#	set index [$widget index current]
-#	set index [$widget nearest $x $y]
-#
-#	o Nearest gives you the closest entry.
-#	o current is "" if
-#	   1) the pointer isn't over an entry.
-#	   2) the pointer is over a open/close button.
-#	   3) 
-#
-#
-# ----------------------------------------------------------------------
-#
-# USAGE: blt::Hiertable::Init <hiertable> 
-#
-# Invoked by internally by Hiertable_Init routine.  Initializes the 
-# default bindings for the hiertable widget entries.  These are local
-# to the widget, so they can't be set through the widget's class
-# bind tags.
-#
-# Arguments:	hiertable		hierarchy widget
-#
-# ----------------------------------------------------------------------
-proc blt::Hiertable::Init { widget } {
-    #
-    # Active entry bindings
-    #
-    $widget bind Entry <Enter> { 
-	%W entry highlight current 
-    }
-    $widget bind Entry <Leave> { 
-	%W entry highlight "" 
-    }
-
-    #
-    # Button bindings
-    #
-    $widget button bind all <ButtonRelease-1> {
-	%W see -anchor nw current
-	%W toggle current
-    }
-    $widget button bind all <Enter> {
-	%W button highlight current
-    }
-    $widget button bind all <Leave> {
-	%W button highlight ""
-    }
-
-    #
-    # ButtonPress-1
-    #
-    #	Performs the following operations:
-    #
-    #	1. Clears the previous selection.
-    #	2. Selects the current entry.
-    #	3. Sets the focus to this entry.
-    #	4. Scrolls the entry into view.
-    #	5. Sets the selection anchor to this entry, just in case
-    #	   this is "multiple" mode.
-    #
-    
-    $widget bind Entry <ButtonPress-1> { 	
-	blt::Hiertable::SetSelectionAnchor %W current
-	set blt::Hiertable::scroll 1
-    }
-
-    $widget bind Entry <Double-ButtonPress-1> {
-	%W toggle current
-    }
-
-    #
-    # B1-Motion
-    #
-    #	For "multiple" mode only.  Saves the current location of the
-    #	pointer for auto-scrolling.  Resets the selection mark.  
-    #
-    $widget bind Entry <B1-Motion> { 
-	set blt::Hiertable::x %x
-	set blt::Hiertable::y %y
-	set index [%W nearest %x %y]
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection mark $index
-	} else {
-	    blt::Hiertable::SetSelectionAnchor %W $index
-	}
-    }
-
-    #
-    # ButtonRelease-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $widget bind Entry <ButtonRelease-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection anchor current
-	}
-	after cancel $blt::Hiertable::afterId
-	set blt::Hiertable::scroll 0
-    }
-
-    #
-    # Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.
-    #
-
-    $widget bind Entry <Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    set index [%W index anchor]
-	    %W selection clearall
-	    %W selection set $index current
-	} else {
-	    blt::Hiertable::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Shift-Double-ButtonPress-1> {
-	puts <Shift-Double-ButtonPress-1> 
-	# do nothing
-    }
-    $widget bind Entry <Shift-B1-Motion> { 
-	# do nothing
-    }
-    $widget bind Entry <Shift-ButtonRelease-1> { 
-	after cancel $blt::Hiertable::afterId
-	set blt::Hiertable::scroll 0
-    }
-
-    #
-    # Control-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $widget bind Entry <Control-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    set index [%W index current]
-	    %W selection toggle $index
-	    %W selection anchor $index
-	} else {
-	    blt::Hiertable::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Control-Double-ButtonPress-1> {
-	puts <Control-Double-ButtonPress-1> 
-	# do nothing
-    }
-    $widget bind Entry <Control-B1-Motion> { 
-	# do nothing
-    }
-    $widget bind Entry <Control-ButtonRelease-1> { 
-	after cancel $blt::Hiertable::afterId
-	set blt::Hiertable::scroll 0
-    }
-
-    $widget bind Entry <Control-Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == "" } {
-		%W selection anchor current
-	    }
-	    if { [%W selection includes anchor] } {
-		%W selection set anchor current
-	    } else {
-		%W selection clear anchor current
-		%W selection set current
-	    }
-	} else {
-	    blt::Hiertable::SetSelectionAnchor %W current
-	}
-    }
-    $widget bind Entry <Control-Shift-Double-ButtonPress-1> {
-	puts <Control-Shift-Double-ButtonPress-1> 
-	# do nothing
-    }
-    $widget bind Entry <Control-Shift-B1-Motion> { 
-	# do nothing
-    }
-    $widget column bind all <Enter> {
-	%W column highlight [%W column current]
-    }
-    $widget column bind all <Leave> {
-	%W column highlight ""
-    }
-    $widget column bind Rule <Enter> {
-	%W column highlight [%W column current]
-	%W column resize activate [%W column current]
-    }
-    $widget column bind Rule <Leave> {
-	%W column highlight ""
-	%W column resize activate ""
-    }
-    $widget column bind Rule <ButtonPress-1> {
-	%W column resize anchor %x
-    }
-    $widget column bind Rule <B1-Motion> {
-	%W column resize mark %x
-    }
-    $widget column bind Rule <ButtonRelease-1> {
-	%W column configure [%W column current] -width [%W column resize set]
-    }
-    $widget column bind all <ButtonRelease-1> {
-	set column [%W column nearest %x %y]
-	if { $column != "" } {
-	    %W column invoke $column
-	}
-    }
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hiertable::AutoScroll <hiertable>
-#
-# Invoked when the user is selecting elements in a hiertable widget
-# and drags the mouse pointer outside of the widget.  Scrolls the
-# view in the direction of the pointer.
-#
-# Arguments:	hiertable		hierarchy widget
-#
-# ----------------------------------------------------------------------
-proc blt::Hiertable::AutoScroll { widget } {
-    if { ![winfo exists $widget] } {
-	return
-    }
-    set x $blt::Hiertable::x
-    set y $blt::Hiertable::y
-
-    set index [$widget nearest $x $y]
-
-    if {$y >= [winfo height $widget]} {
-	$widget yview scroll 1 units
-	set neighbor down
-    } elseif {$y < 0} {
-	$widget yview scroll -1 units
-	set neighbor up
-    } else {
-	set neighbor $index
-    }
-    if { [$widget cget -selectmode] == "single" } {
-	blt::Hiertable::SetSelectionAnchor $widget $neighbor
-    } else {
-	$widget selection mark $index
-    }
-    set ::blt::Hiertable::afterId [after 10 blt::Hiertable::AutoScroll $widget]
-}
-
-proc blt::Hiertable::SetSelectionAnchor { widget index } {
-    set index [$widget index $index]
-    # If the anchor hasn't changed, don't do anything
-    if { $index != [$widget index anchor] } {
-	$widget selection clearall
-	$widget see $index
-	$widget focus $index
-	$widget selection set $index
-	$widget selection anchor $index
-    }
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hiertable::MoveFocus <hiertable> <where>
-#
-# Invoked by KeyPress bindings.  Moves the active selection to the
-# entry <where>, which is an index such as "up", "down", "prevsibling",
-# "nextsibling", etc.
-# ----------------------------------------------------------------------
-proc blt::Hiertable::MoveFocus { widget where } {
-    catch {$widget focus $where}
-    if { [$widget cget -selectmode] == "single" } {
-        $widget selection clearall
-        $widget selection set focus
-    }
-    $widget see focus
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hiertable::MovePage <hiertable> <where>
-# Arguments:	hiertable		hierarchy widget
-#
-# Invoked by KeyPress bindings.  Pages the current view up or down.
-# The <where> argument should be either "top" or "bottom".
-# ----------------------------------------------------------------------
-
-proc blt::Hiertable::MovePage { widget where } {
-
-    # If the focus is already at the top/bottom of the window, we want
-    # to scroll a page. It's really one page minus an entry because we
-    # want to see the last entry on the next/last page.
-    if { [$widget index focus] == [$widget index view.$where] } {
-        if {$where == "top"} {
-	    $widget yview scroll -1 pages
-	    $widget yview scroll 1 units
-        } else {
-	    $widget yview scroll 1 pages
-	    $widget yview scroll -1 units
-        }
-    }
-    update
-
-    # Adjust the entry focus and the view.  Also activate the entry.
-    # just in case the mouse point is not in the widget.
-    $widget entry highlight view.$where
-    $widget focus view.$where
-    $widget see view.$where
-    if { [$widget cget -selectmode] == "single" } {
-        $widget selection clearall
-        $widget selection set focus
-    }
-}
-
-# ----------------------------------------------------------------------
-# USAGE: blt::Hiertable::NextMatchingEntry <hiertable> <char>
-# Arguments:	hiertable		hierarchy widget
-#
-# Invoked by KeyPress bindings.  Searches for an entry that starts
-# with the letter <char> and makes that entry active.
-# ----------------------------------------------------------------------
-
-proc blt::Hiertable::NextMatchingEntry { widget key } {
-    if {[string match {[ -~]} $key]} {
-	set last [$widget index focus]
-	set next [$widget index next]
-	while { $next != $last } {
-	    set label [$widget entry cget $next -label]
-	    if { [string index $label 0] == $key } {
-		break
-	    }
-	    set next [$widget index -at $next next]
-	}
-	$widget focus $next
-        if {[$widget cget -selectmode] == "single"} {
-            $widget selection clearall
-            $widget selection set focus
-        }
-	$widget see focus
-    }
-}
-
-#
-#  Edit mode assignments
-#
-#	ButtonPress-3   Enables/disables edit mode on entry.  Sets focus to 
-#			entry.
-#
-#  KeyPress
-#
-#	Left		Move insertion position to previous.
-#	Right		Move insertion position to next.
-#	Up		Move insertion position up one line.
-#	Down		Move insertion position down one line.
-#	Return		End edit mode.
-#	Shift-Return	Line feed.
-#	Home		Move to first position.
-#	End		Move to last position.
-#	ASCII char	Insert character left of insertion point.
-#	Del		Delete character right of insertion point.
-#	Delete		Delete character left of insertion point.
-#	Ctrl-X		Cut
-#	Ctrl-V		Copy
-#	Ctrl-P		Paste
-#	
-#  KeyRelease
-#
-#  ButtonPress-1	Start selection if in entry, otherwise clear selection.
-#  B1-Motion		Extend/reduce selection.
-#  ButtonRelease-1      End selection if in entry, otherwise use last selection.
-#  B1-Enter		Disabled.
-#  B1-Leave		Disabled.
-#  ButtonPress-2	Same as above.
-#  B2-Motion		Same as above.
-#  ButtonRelease-2	Same as above.
-#	
-# All bindings in editting mode will "break" to override other bindings.
-#
-#
-
-bind xEditor <ButtonPress-3> {
-    set node [%W nearest %x %y]
-    %W entry insert $node @%x,%y ""
-#    %W entry insert $node 2 ""
-}
-
-image create photo blt::Hiertable::CloseNormalFolder -format gif -data {
-R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-ZTKAsiCtWq0JADs=
-}
-image create photo blt::Hiertable::OpenNormalFolder -format gif -data {
-R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-nQkAOw==
-}
-image create photo blt::Hiertable::CloseActiveFolder -format gif -data {
-R0lGODlhEAANAMIAAAAAAH9/f/////+/AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-ZTKAsiCtWq0JADs=
-}
-image create photo blt::Hiertable::OpenActiveFolder -format gif -data {
-R0lGODlhEAANAMIAAAAAAH9/f/////+/AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-nQkAOw==
-}
-
-
-if { $tcl_platform(platform) == "windows" } {
-    if { $tk_version >= 8.3 } {
-	set cursor "@[file join $blt_library treeview.cur]"
-    } else {
-	set cursor "size_we"
-    }
-    option add *Hiertable.ResizeCursor [list $cursor]
-} else {
-    option add *Hiertable.ResizeCursor \
-	"@$blt_library/treeview.xbm $blt_library/treeview_m.xbm black white"
-}
-
-# Standard Motif bindings:
-
-bind HiertableEditor <ButtonPress-1> {
-    %W text icursor @%x,%y
-}
-
-bind HiertableEditor <Left> {
-    %W text icursor last
-}
-bind HiertableEditor <Right> {
-    %W text icursor next
-}
-bind HiertableEditor <Shift-Left> {
-    set new [expr {[%W text index insert] - 1}]
-    if {![%W text selection present]} {
-	%W text selection from insert
-	%W text selection to $new
-    } else {
-	%W text selection adjust $new
-    }
-    %W text icursor $new
-}
-bind HiertableEditor <Shift-Right> {
-    set new [expr {[%W text index insert] + 1}]
-    if {![%W text selection present]} {
-	%W text selection from insert
-	%W text selection to $new
-    } else {
-	%W text selection adjust $new
-    }
-    %W text icursor $new
-}
-
-bind HiertableEditor <Home> {
-    %W text icursor 0
-}
-bind HiertableEditor <Shift-Home> {
-    set new 0
-    if {![%W text selection present]} {
-	%W text selection from insert
-	%W text selection to $new
-    } else {
-	%W text selection adjust $new
-    }
-    %W text icursor $new
-}
-bind HiertableEditor <End> {
-    %W text icursor end
-}
-bind HiertableEditor <Shift-End> {
-    set new end
-    if {![%W text selection present]} {
-	%W text selection from insert
-	%W text selection to $new
-    } else {
-	%W text selection adjust $new
-    }
-    %W text icursor $new
-}
-
-bind HiertableEditor <Delete> {
-    if { [%W text selection present]} {
-	%W text delete sel.first sel.last
-    } else {
-	%W text delete insert
-    }
-}
-
-bind HiertableEditor <BackSpace> {
-    if { [%W text selection present] } {
-	%W text delete sel.first sel.last
-    } else {
-	set index [expr [%W text index insert] - 1]
-	if { $index >= 0 } {
-	    %W text delete $index $index
-	}
-    }
-}
-
-bind HiertableEditor <Control-space> {
-    %W text selection from insert
-}
-
-bind HiertableEditor <Select> {
-    %W text selection from insert
-}
-
-bind HiertableEditor <Control-Shift-space> {
-    %W text selection adjust insert
-}
-
-bind HiertableEditor <Shift-Select> {
-    %W text selection adjust insert
-}
-
-bind HiertableEditor <Control-slash> {
-    %W text selection range 0 end
-}
-
-bind HiertableEditor <Control-backslash> {
-    %W text selection clear
-}
-
-bind HiertableEditor <KeyPress> {
-    blt::Hiertable::Insert %W %A
-}
-
-# Ignore all Alt, Meta, and Control keypresses unless explicitly bound.
-# Otherwise, if a widget binding for one of these is defined, the
-# <KeyPress> class binding will also fire and insert the character,
-# which is wrong.  Ditto for Escape, Return, and Tab.
-
-bind HiertableEditor <Alt-KeyPress> {
-    # nothing
-}
-
-bind HiertableEditor <Meta-KeyPress> {
-    # nothing
-}
-
-bind HiertableEditor <Control-KeyPress> {
-    # nothing
-}
-
-bind HiertableEditor <Escape> { 
-    %W text cancel 
-    grab release %W
-}
-
-bind HiertableEditor <Return> { 
-    %W text apply 
-    grab release %W
-}
-
-bind HiertableEditor <Shift-Return> {
-    blt::Hiertable::Insert %W "\n"
-}
-
-bind HiertableEditor <KP_Enter> {
-    # nothing
-}
-
-bind HiertableEditor <Tab> {
-    # nothing
-}
-
-if {![string compare $tcl_platform(platform) "macintosh"]} {
-    bind HiertableEditor <Command-KeyPress> {
-	# nothing
-    }
-}
-
-# On Windows, paste is done using Shift-Insert.  Shift-Insert already
-# generates the <<Paste>> event, so we don't need to do anything here.
-if { [string compare $tcl_platform(platform) "windows"] != 0 } {
-    bind HiertableEditor <Insert> {
-	catch {blt::Hiertable::Insert %W [selection get -displayof %W]}
-    }
-}
-
-# Additional emacs-like bindings:
-bind HiertableEditor <ButtonPress-3> {
-    if { [winfo viewable %W] } {
-	grab release %W
-	%W text cancel
-    } 
-}
-
-bind HiertableEditor <Control-a> {
-    %W text icursor 0
-    %W text selection clear
-}
-
-bind HiertableEditor <Control-b> {
-    %W text icursor [expr {[%W index insert] - 1}]
-    %W text selection clear
-}
-
-bind HiertableEditor <Control-d> {
-    %W text delete insert
-}
-
-bind HiertableEditor <Control-e> {
-    %W text icursor end
-    %W text selection clear
-}
-
-bind HiertableEditor <Control-f> {
-    %W text icursor [expr {[%W index insert] + 1}]
-    %W text selection clear
-}
-
-bind HiertableEditor <Control-h> {
-    if {[%W text selection present]} {
-	%W text delete sel.first sel.last
-    } else {
-	set index [expr [%W text index insert] - 1]
-	if { $index >= 0 } {
-	    %W text delete $index $index
-	}
-    }
-}
-
-bind HiertableEditor <Control-k> {
-    %W text delete insert end
-}
-
-
-
-# blt::Hiertable::Insert --
-# Insert a string into an entry at the point of the insertion cursor.
-# If there is a selection in the entry, and it covers the point of the
-# insertion cursor, then delete the selection before inserting.
-#
-# Arguments:
-# w -		The entry window in which to insert the string
-# s -		The string to insert (usually just a single character)
-
-proc blt::Hiertable::Insert {w s} {
-    if {![string compare $s ""]} {
-	return
-    }
-    catch {
-	set insert [$w text index insert]
-	if {([$w text index sel.first] <= $insert)
-		&& ([$w text index sel.last] >= $insert)} {
-	    $w delete sel.first sel.last
-	}
-    }
-    $w text insert insert $s
-}
-
-# tkEntryTranspose -
-# This procedure implements the "transpose" function for entry widgets.
-# It tranposes the characters on either side of the insertion cursor,
-# unless the cursor is at the end of the line.  In this case it
-# transposes the two characters to the left of the cursor.  In either
-# case, the cursor ends up to the right of the transposed characters.
-#
-# Arguments:
-# w -		The entry window.
-
-proc HiertableTranspose w {
-    set i [$w text index insert]
-    if {$i < [$w text index end]} {
-	incr i
-    }
-    set first [expr {$i-2}]
-    if {$first < 0} {
-	return
-    }
-    set new [string index [$w get] [expr {$i-1}]][string index [$w get] $first]
-    $w delete $first $i
-    $w insert insert $new
-}
-
-# Hiertable::GetSelection --
-#
-# Returns the selected text of the entry with respect to the -show option.
-#
-# Arguments:
-# w -         The entry window from which the text to get
-
-proc blt::Hiertable::GetSelection {w} {
-    set entryString [string range [$w get] [$w index sel.first] \
-                       [expr [$w index sel.last] - 1]]
-    if {[$w cget -show] != ""} {
-      regsub -all . $entryString [string index [$w cget -show] 0] entryString
-    }
-    return $entryString
-}
-
-if 0 {
-    bind HiertableEditor <Control-t> {
-	tkEntryTranspose %W
-    }
-    bind HiertableEditor <Meta-b> {
-	%W text icursor [blt::Hiertable::PreviousWord %W insert]
-	%W text selection clear
-    }
-    bind HiertableEditor <Meta-d> {
-	%W delete insert [blt::Hiertable::NextWord %W insert]
-    }
-    bind HiertableEditor <Meta-f> {
-	%W text icursor [blt::Hiertable::NextWord %W insert]
-	%W text selection clear
-    }
-    bind HiertableEditor <Meta-BackSpace> {
-	%W delete [blt::Hiertable::PreviousWord %W insert] insert
-    }
-    bind HiertableEditor <Meta-Delete> {
-	%W delete [blt::Hiertable::PreviousWord %W insert] insert
-    }
-    # tkEntryNextWord -- Returns the index of the next word position
-    # after a given position in the entry.  The next word is platform
-    # dependent and may be either the next end-of-word position or the
-    # next start-of-word position after the next end-of-word position.
-    #
-    # Arguments:
-    # w -		The entry window in which the cursor is to move.
-    # start -	Position at which to start search.
-    
-    if {![string compare $tcl_platform(platform) "windows"]}  {
-	proc blt::Hiertable::NextWord {w start} {
-	    set pos [tcl_endOfWord [$w get] [$w index $start]]
-	    if {$pos >= 0} {
-		set pos [tcl_startOfNextWord [$w get] $pos]
-	    }
-	    if {$pos < 0} {
-		return end
-	    }
-	    return $pos
-	}
-    } else {
-	proc blt::Hiertable::NextWord {w start} {
-	    set pos [tcl_endOfWord [$w get] [$w index $start]]
-	    if {$pos < 0} {
-		return end
-	    }
-	    return $pos
-	}
-    }
-    
-    # blt::Hiertable::PreviousWord --
-    #
-    # Returns the index of the previous word position before a given
-    # position in the entry.
-    #
-    # Arguments:
-    # w -		The entry window in which the cursor is to move.
-    # start -	Position at which to start search.
-    
-    proc blt::Hiertable::PreviousWord {w start} {
-	set pos [tcl_startOfPreviousWord [$w get] [$w index $start]]
-	if {$pos < 0} {
-	    return 0
-	}
-	return $pos
-    }
-}
diff --git a/blt3.0/library/panes.tcl b/blt3.0/library/panes.tcl
deleted file mode 100644
index 0c48a45..0000000
--- a/blt3.0/library/panes.tcl
+++ /dev/null
@@ -1,213 +0,0 @@
-
-# panes.tcl --
-#
-# This file defines the default bindings for Tk panedwindow widgets and
-# provides procedures that help in implementing those bindings.
-#
-# RCS: @(#) $Id: panes.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-
-bind Panes <Button-1> { ::blt::panes::MarkSash %W %x %y 1 }
-bind Panes <Button-2> { ::blt::panes::MarkSash %W %x %y 0 }
-
-bind Panes <B1-Motion> { ::blt::panes::DragSash %W %x %y 1 }
-bind Panes <B2-Motion> { ::blt::panes::DragSash %W %x %y 0 }
-
-bind Panes <ButtonRelease-1> {::blt::panes::ReleaseSash %W 1}
-bind Panes <ButtonRelease-2> {::blt::panes::ReleaseSash %W 0}
-
-bind Panes <Motion> { 
-    %W sash activate %x %y
-}
-
-bind Panes <ButtonPress-1> { 
-    if { [%W sash activate] } {
-	%W sash anchor %x %y
-    }
-}
-bind Panes <B1-Motion> { 
-    %W sash mark %x %y
-}
-bind Panes <ButtonRelease-1> { 
-    %W sash set %x %y
-    %W sash activate %x %y
-}
-bind Panes <Leave> {
-    %W sash activate -1
-}
-bind Panes <B1-Leave> {
-    # do nothing
-}
-bind Panes <Enter> {
-    %W sash activate %x %y
-}
-
-bind Panes <Button-2> { ::blt::panes::MarkSash %W %x %y 0 }
-
-# Initialize namespace
-namespace eval ::blt::panes {}
-
-# ::blt::panes::MarkSash --
-#
-#   Handle marking the correct sash for possible dragging
-#
-# Arguments:
-#   w		the widget
-#   x		widget local x coord
-#   y		widget local y coord
-#   proxy	whether this should be a proxy sash
-# Results:
-#   None
-#
-proc ::tk::panedwindow::MarkSash {w x y proxy} {
-    if {[$w cget -opaqueresize]} { set proxy 0 }
-    set what [$w identify $x $y]
-    if { [llength $what] == 2 } {
-	foreach {index which} $what break
-	if { !$::tk_strictMotif || $which eq "handle" } {
-	    if {!$proxy} { $w sash mark $index $x $y }
-	    set ::tk::Priv(sash) $index
-	    foreach {sx sy} [$w sash coord $index] break
-	    set ::tk::Priv(dx) [expr {$sx-$x}]
-	    set ::tk::Priv(dy) [expr {$sy-$y}]
-	    # Do this to init the proxy location
-	    DragSash $w $x $y $proxy
-	}
-    }
-}
-
-# ::blt::panes::DragSash --
-#
-#   Handle dragging of the correct sash
-#
-# Arguments:
-#   w		the widget
-#   x		widget local x coord
-#   y		widget local y coord
-#   proxy	whether this should be a proxy sash
-# Results:
-#   Moves sash
-#
-proc ::blt::panes::DragSash {w x y proxy} {
-    if {[$w cget -opaqueresize]} { set proxy 0 }
-    if { [info exists ::tk::Priv(sash)] } {
-	if {$proxy} {
-	    $w proxy place \
-		    [expr {$x+$::tk::Priv(dx)}] [expr {$y+$::tk::Priv(dy)}]
-	} else {
-	    $w sash place $::tk::Priv(sash) \
-		    [expr {$x+$::tk::Priv(dx)}] [expr {$y+$::tk::Priv(dy)}]
-	}
-    }
-}
-
-# ::blt::panes::ReleaseSash --
-#
-#   Handle releasing of the sash
-#
-# Arguments:
-#   w		the widget
-#   proxy	whether this should be a proxy sash
-# Results:
-#   Returns ...
-#
-proc ::blt::panes::ReleaseSash {w proxy} {
-    if {[$w cget -opaqueresize]} { set proxy 0 }
-    if { [info exists ::tk::Priv(sash)] } {
-	if {$proxy} {
-	    foreach {x y} [$w proxy coord] break
-	    $w sash place $::tk::Priv(sash) $x $y
-	    $w proxy forget
-	}
-	unset ::tk::Priv(sash) ::tk::Priv(dx) ::tk::Priv(dy)
-    }
-}
-
-# ::blt::panes::Motion --
-#
-#   Handle motion on the widget.  This is used to change the cursor
-#   when the user moves over the sash area.
-#
-# Arguments:
-#   w		the widget
-#   x		widget local x coord
-#   y		widget local y coord
-# Results:
-#   May change the cursor.  Sets up a timer to verify that we are still
-#   over the widget.
-#
-proc ::blt::panes::Motion {w x y} {
-    variable ::tk::Priv
-    set id [$w identify $x $y]
-    if {([llength $id] == 2) && \
-	    (!$::tk_strictMotif || [lindex $id 1] eq "handle")} {
-	if { ![info exists Priv($w,panecursor)] } {
-	    set Priv($w,panecursor) [$w cget -cursor]
-	    if { [$w cget -sashcursor] eq "" } {
-		if { [$w cget -orient] eq "horizontal" } {
-		    $w configure -cursor sb_h_double_arrow
-		} else {
-		    $w configure -cursor sb_v_double_arrow
-		}
-	    } else {
-		$w configure -cursor [$w cget -sashcursor]
-	    }
-	    if {[info exists Priv($w,pwAfterId)]} {
-		after cancel $Priv($w,pwAfterId)
-	    }
-	    set Priv($w,pwAfterId) [after 150 \
-		    [list ::tk::panedwindow::Cursor $w]]
-	}
-	return
-    }
-    if { [info exists Priv($w,panecursor)] } {
-	$w configure -cursor $Priv($w,panecursor)
-	unset Priv($w,panecursor)
-    }
-}
-
-# ::blt::panes::Cursor --
-#
-#   Handles returning the normal cursor when we are no longer over the
-#   sash area.  This needs to be done this way, because the panedwindow
-#   won't see Leave events when the mouse moves from the sash to a
-#   paned child, although the child does receive an Enter event.
-#
-# Arguments:
-#   w		the widget
-# Results:
-#   May restore the default cursor, or schedule a timer to do it.
-#
-proc ::blt::panes::Cursor {w} {
-    variable ::tk::Priv
-    # Make sure to check window existence in case it is destroyed.
-    if {[info exists Priv($w,panecursor)] && [winfo exists $w]} {
-	if {[winfo containing [winfo pointerx $w] [winfo pointery $w]] eq $w} {
-	    set Priv($w,pwAfterId) [after 150 \
-		    [list ::tk::panedwindow::Cursor $w]]
-	} else {
-	    $w configure -cursor $Priv($w,panecursor)
-	    unset Priv($w,panecursor)
-	    if {[info exists Priv($w,pwAfterId)]} {
-		after cancel $Priv($w,pwAfterId)
-		unset Priv($w,pwAfterId)
-	    }
-	}
-    }
-}
-
-# ::blt::panes::Leave --
-#
-#   Return to default cursor when leaving the pw widget.
-#
-# Arguments:
-#   w		the widget
-# Results:
-#   Restores the default cursor
-#
-proc ::tk::panedwindow::Leave {w} {
-    if {[info exists ::tk::Priv($w,panecursor)]} {
-        $w configure -cursor $::tk::Priv($w,panecursor)
-        unset ::tk::Priv($w,panecursor)
-    }
-}
diff --git a/blt3.0/library/paneset.tcl b/blt3.0/library/paneset.tcl
deleted file mode 100644
index 0914838..0000000
--- a/blt3.0/library/paneset.tcl
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace eval blt::Paneset {
-    set buttonPressed 0
-    proc Initialize {} {
-    }
-}
-
-bind PanesetSash <Enter> { 
-    if { !$blt::Paneset::buttonPressed } { 
-	%W activate 
-    } 
-} 
-bind PanesetSash <Leave> { 
-    if { !$blt::Paneset::buttonPressed } { 
-	%W deactivate
-    } 
-}
-bind PanesetSash <KeyPress-Left> { 
-    %W move -10 0 
-}
-bind PanesetSash <KeyPress-Right> { 
-    %W move 10  0 
-}
-bind PanesetSash <KeyPress-Up> { 
-    %W move 0 -10 
-}
-bind PanesetSash <KeyPress-Down> { 
-    %W move 0 10 
-}
-bind PanesetSash <ButtonPress-1> { 
-    set blt::Paneset::buttonPressed 1
-    %W anchor %X %Y 
-}
-bind PanesetSash <B1-Motion> { 
-    %W mark %X %Y 
-}
-bind PanesetSash <ButtonRelease-1> { 
-    set blt::Paneset::buttonPressed 0
-    %W set %X %Y 
-}
diff --git a/blt3.0/library/pkgIndex.tcl.in b/blt3.0/library/pkgIndex.tcl.in
deleted file mode 100644
index 599ab42..0000000
--- a/blt3.0/library/pkgIndex.tcl.in
+++ /dev/null
@@ -1,109 +0,0 @@
-# Tcl package index file, version 1.0
-
-set version "%VERSION%"
-
-namespace eval blt${version} {}
-
-proc blt${version}::load_library { name version dir package } {
-
-    set prefix "%SO_PREFIX%"
-    set suffix "%LIB_SUFFIX%"
-    set so [info sharedlibextension]
-    regsub {\.} $version {} version_no_dots
-
-    set fullname ${prefix}${name}${version_no_dots}${suffix}${so}
-
-    global tcl_platform
-    if { $tcl_platform(platform) == "unix" } {
-	set library [file join $dir $fullname]
-	if { ![file exists $library] } {
-	    # Try the parent directory.
-	    set library [file join [file dirname $dir] $fullname]
-	}
-	if { ![file exists $library] } {
-	    # Default to the path generated at compilation.
-	    set library [file join "%LIB_DIR%" $fullname]
-	}
-    } else {
-	set library $fullname
-    }
-    load $library $package
-}
-
-package ifneeded BLT $version [subst -nocommands {
-    package require blt_core $version
-    if { [info commands tk] == "tk" } {
-	package require blt_extra $version
-    } 
-    package provide BLT $version
-}]
-
-# Core (tcl-only) and extra (Tk) packages 
-
-package ifneeded blt_core $version \
-    [list blt${version}::load_library "BLTCore" $version $dir "blt_core"]
-
-package ifneeded blt_extra $version [subst {
-    package require blt_core
-    blt${version}::load_library "BLTX" $version $dir "blt_x"
-}]
-
-# Data table data format packages
-
-package ifneeded blt_datatable_xml $version [subst {
-    package require blt_core
-    blt::datatable load xml $dir
-}]
-
-package ifneeded blt_datatable_mysql $version \
-	[list blt::datatable load mysql $dir]
-
-package ifneeded blt_datatable_tree $version \
-	[list blt::datatable load tree $dir]
-
-package ifneeded blt_datatable_vector $version \
-	[list blt::datatable load vector $dir]
-
-package ifneeded blt_datatable_csv $version \
-	[list blt::datatable load csv $dir]
-
-# Picture image format packages
-
-package ifneeded blt_picture_bmp $version [subst {
-    package require BLT
-    blt::picture load bmp $dir
-}]
-
-package ifneeded blt_picture_gif $version \
-	[list blt::picture load gif $dir]
-
-package ifneeded blt_picture_jpg $version \
-	[list blt::picture load jpg $dir]
-
-package ifneeded blt_picture_pbm $version \
-	[list blt::picture load pbm $dir]
-
-package ifneeded blt_picture_png $version \
-	[list blt::picture load png $dir]
-
-package ifneeded blt_picture_ps $version \
-	[list blt::picture load ps $dir]
-
-package ifneeded blt_picture_tif $version \
-	[list blt::picture load tif $dir]
-
-package ifneeded blt_picture_xbm $version \
-	[list blt::picture load xbm $dir]
-
-package ifneeded blt_picture_xpm $version \
-	[list blt::picture load xpm $dir]
-
-package ifneeded blt_picture_photo $version \
-	[list blt::picture load photo $dir]
-
-# Tree data format packages
-
-package ifneeded blt_tree_xml $version \
-	[list blt::tree load xml $dir]
-
-# End of package index file
diff --git a/blt3.0/library/pushbutton.tcl b/blt3.0/library/pushbutton.tcl
deleted file mode 100644
index 086350c..0000000
--- a/blt3.0/library/pushbutton.tcl
+++ /dev/null
@@ -1,686 +0,0 @@
-# button.tcl --
-#
-# This file defines the default bindings for Tk label, button,
-# checkbutton, and radiobutton widgets and provides procedures
-# that help in implementing those bindings.
-#
-# RCS: @(#) $Id: pushbutton.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# Copyright (c) 1992-1994 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-
-#-------------------------------------------------------------------------
-# The code below creates the default class bindings for buttons.
-#-------------------------------------------------------------------------
-
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
-    bind Radiobutton <Enter> {
-	tk::ButtonEnter %W
-    }
-    bind Radiobutton <1> {
-	tk::ButtonDown %W
-    }
-    bind Radiobutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-    bind Checkbutton <Enter> {
-	tk::ButtonEnter %W
-    }
-    bind Checkbutton <1> {
-	tk::ButtonDown %W
-    }
-    bind Checkbutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-    bind Pushbutton <Enter> {
-	tk::ButtonEnter %W
-    }
-    bind Pushbutton <1> {
-	tk::ButtonDown %W
-    }
-    bind Pushbutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-}
-
-if {"windows" eq $tcl_platform(platform)} {
-    bind Checkbutton <equal> {
-	tk::CheckRadioInvoke %W select
-    }
-    bind Checkbutton <plus> {
-	tk::CheckRadioInvoke %W select
-    }
-    bind Checkbutton <minus> {
-	tk::CheckRadioInvoke %W deselect
-    }
-    bind Checkbutton <1> {
-	tk::CheckRadioDown %W
-    }
-    bind Checkbutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-    bind Checkbutton <Enter> {
-	tk::CheckRadioEnter %W
-    }
-
-    bind Radiobutton <1> {
-	tk::CheckRadioDown %W
-    }
-    bind Radiobutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-    bind Radiobutton <Enter> {
-	tk::CheckRadioEnter %W
-    }
-
-    bind Pushbutton <equal> {
-	tk::CheckRadioInvoke %W select
-    }
-    bind Pushbutton <plus> {
-	tk::CheckRadioInvoke %W select
-    }
-    bind Pushbutton <minus> {
-	tk::CheckRadioInvoke %W deselect
-    }
-    bind Pushbutton <1> {
-	tk::CheckRadioDown %W
-    }
-    bind Pushbutton <ButtonRelease-1> {
-	tk::ButtonUp %W
-    }
-    bind Pushbutton <Enter> {
-	tk::CheckRadioEnter %W
-    }
-}
-if {"x11" eq [tk windowingsystem]} {
-    bind Checkbutton <Return> {
-	if {!$tk_strictMotif} {
-	    tk::CheckRadioInvoke %W
-	}
-    }
-    bind Radiobutton <Return> {
-	if {!$tk_strictMotif} {
-	    tk::CheckRadioInvoke %W
-	}
-    }
-    bind Pushbutton <Return> {
-	if {!$tk_strictMotif} {
-	    tk::CheckRadioInvoke %W
-	}
-    }
-    bind Checkbutton <1> {
-	tk::CheckRadioInvoke %W
-    }
-    bind Radiobutton <1> {
-	tk::CheckRadioInvoke %W
-    }
-    bind Pushbutton <1> {
-	tk::CheckRadioInvoke %W
-    }
-    bind Checkbutton <Enter> {
-	tk::ButtonEnter %W
-    }
-    bind Radiobutton <Enter> {
-	tk::ButtonEnter %W
-    }
-    bind Pushbutton <Enter> {
-	tk::ButtonEnter %W
-    }
-}
-
-bind Button <space> {
-    tk::ButtonInvoke %W
-}
-bind Checkbutton <space> {
-    tk::CheckRadioInvoke %W
-}
-bind Radiobutton <space> {
-    tk::CheckRadioInvoke %W
-}
-bind Pushbutton <space> {
-    tk::CheckRadioInvoke %W
-}
-
-bind Button <FocusIn> {}
-bind Button <Enter> {
-    tk::ButtonEnter %W
-}
-bind Button <Leave> {
-    tk::ButtonLeave %W
-}
-bind Button <1> {
-    tk::ButtonDown %W
-}
-bind Button <ButtonRelease-1> {
-    tk::ButtonUp %W
-}
-
-bind Checkbutton <FocusIn> {}
-bind Checkbutton <Leave> {
-    tk::ButtonLeave %W
-}
-
-bind Radiobutton <FocusIn> {}
-bind Radiobutton <Leave> {
-    tk::ButtonLeave %W
-}
-
-bind Pushbutton <FocusIn> {}
-bind Pushbutton <Leave> {
-    tk::ButtonLeave %W
-}
-
-
-if {"windows" eq $tcl_platform(platform)} {
-
-#########################
-# Windows implementation 
-#########################
-
-# ::tk::ButtonEnter --
-# The procedure below is invoked when the mouse pointer enters a
-# button widget.  It records the button we're in and changes the
-# state of the button to active unless the button is disabled.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonEnter w {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-
-	# If the mouse button is down, set the relief to sunken on entry.
-	# Overwise, if there's an -overrelief value, set the relief to that.
-
-	set Priv($w,relief) [$w cget -relief]
-	if {$Priv(buttonWindow) eq $w} {
-	    $w configure -relief sunken -state active
-	    set Priv($w,prelief) sunken
-	} elseif {[set over [$w cget -overrelief]] ne ""} {
-	    $w configure -relief $over
-	    set Priv($w,prelief) $over
-	}
-    }
-    set Priv(window) $w
-}
-
-# ::tk::ButtonLeave --
-# The procedure below is invoked when the mouse pointer leaves a
-# button widget.  It changes the state of the button back to inactive.
-# Restore any modified relief too.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonLeave w {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-	$w configure -state normal
-    }
-
-    # Restore the original button relief if it was changed by Tk.
-    # That is signaled by the existence of Priv($w,prelief).
-
-    if {[info exists Priv($w,relief)]} {
-	if {[info exists Priv($w,prelief)] && \
-		$Priv($w,prelief) eq [$w cget -relief]} {
-	    $w configure -relief $Priv($w,relief)
-	}
-	unset -nocomplain Priv($w,relief) Priv($w,prelief)
-    }
-
-    set Priv(window) ""
-}
-
-# ::tk::ButtonDown --
-# The procedure below is invoked when the mouse button is pressed in
-# a button widget.  It records the fact that the mouse is in the button,
-# saves the button's relief so it can be restored later, and changes
-# the relief to sunken.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonDown w {
-    variable ::tk::Priv
-
-    # Only save the button's relief if it does not yet exist.  If there
-    # is an overrelief setting, Priv($w,relief) will already have been set,
-    # and the current value of the -relief option will be incorrect.
-
-    if {![info exists Priv($w,relief)]} {
-	set Priv($w,relief) [$w cget -relief]
-    }
-
-    if {[$w cget -state] ne "disabled"} {
-	set Priv(buttonWindow) $w
-	$w configure -relief sunken -state active
-	set Priv($w,prelief) sunken
-
-	# If this button has a repeatdelay set up, get it going with an after
-	after cancel $Priv(afterId)
-	set delay [$w cget -repeatdelay]
-	set Priv(repeated) 0
-	if {$delay > 0} {
-	    set Priv(afterId) [after $delay [list tk::ButtonAutoInvoke $w]]
-	}
-    }
-}
-
-# ::tk::ButtonUp --
-# The procedure below is invoked when the mouse button is released
-# in a button widget.  It restores the button's relief and invokes
-# the command as long as the mouse hasn't left the button.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonUp w {
-    variable ::tk::Priv
-    if {$Priv(buttonWindow) eq $w} {
-	set Priv(buttonWindow) ""
-
-	# Restore the button's relief if it was cached.
-
-	if {[info exists Priv($w,relief)]} {
-	    if {[info exists Priv($w,prelief)] && \
-		    $Priv($w,prelief) eq [$w cget -relief]} {
-		$w configure -relief $Priv($w,relief)
-	    }
-	    unset -nocomplain Priv($w,relief) Priv($w,prelief)
-	}
-
-	# Clean up the after event from the auto-repeater
-	after cancel $Priv(afterId)
-
-	if {$Priv(window) eq $w && [$w cget -state] ne "disabled"} {
-	    $w configure -state normal
-
-	    # Only invoke the command if it wasn't already invoked by the
-	    # auto-repeater functionality
-	    if { $Priv(repeated) == 0 } {
-		uplevel #0 [list $w invoke]
-	    }
-	}
-    }
-}
-
-# ::tk::CheckRadioEnter --
-# The procedure below is invoked when the mouse pointer enters a
-# checkbutton or radiobutton widget.  It records the button we're in
-# and changes the state of the button to active unless the button is
-# disabled.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::CheckRadioEnter w {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-	if {$Priv(buttonWindow) eq $w} {
-	    $w configure -state active
-	}
-	if {[set over [$w cget -overrelief]] ne ""} {
-	    set Priv($w,relief)  [$w cget -relief]
-	    set Priv($w,prelief) $over
-	    $w configure -relief $over
-	}
-    }
-    set Priv(window) $w
-}
-
-# ::tk::CheckRadioDown --
-# The procedure below is invoked when the mouse button is pressed in
-# a button widget.  It records the fact that the mouse is in the button,
-# saves the button's relief so it can be restored later, and changes
-# the relief to sunken.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::CheckRadioDown w {
-    variable ::tk::Priv
-    if {![info exists Priv($w,relie)]} {
-	set Priv($w,relief) [$w cget -relief]
-    }
-    if {[$w cget -state] ne "disabled"} {
-	set Priv(buttonWindow) $w
-	set Priv(repeated) 0
-	$w configure -state active
-    }
-}
-
-}
-
-if {"x11" eq [tk windowingsystem]} {
-
-#####################
-# Unix implementation
-#####################
-
-# ::tk::ButtonEnter --
-# The procedure below is invoked when the mouse pointer enters a
-# button widget.  It records the button we're in and changes the
-# state of the button to active unless the button is disabled.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonEnter {w} {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-	# On unix the state is active just with mouse-over
-	$w configure -state active
-
-	# If the mouse button is down, set the relief to sunken on entry.
-	# Overwise, if there's an -overrelief value, set the relief to that.
-
-	set Priv($w,relief) [$w cget -relief]
-	if {$Priv(buttonWindow) eq $w} {
-	    $w configure -relief sunken
-	    set Priv($w,prelief) sunken
-	} elseif {[set over [$w cget -overrelief]] ne ""} {
-	    $w configure -relief $over
-	    set Priv($w,prelief) $over
-	}
-    }
-    set Priv(window) $w
-}
-
-# ::tk::ButtonLeave --
-# The procedure below is invoked when the mouse pointer leaves a
-# button widget.  It changes the state of the button back to inactive.
-# Restore any modified relief too.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonLeave w {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-	$w configure -state normal
-    }
-
-    # Restore the original button relief if it was changed by Tk.
-    # That is signaled by the existence of Priv($w,prelief).
-
-    if {[info exists Priv($w,relief)]} {
-	if {[info exists Priv($w,prelief)] && \
-		$Priv($w,prelief) eq [$w cget -relief]} {
-	    $w configure -relief $Priv($w,relief)
-	}
-	unset -nocomplain Priv($w,relief) Priv($w,prelief)
-    }
-
-    set Priv(window) ""
-}
-
-# ::tk::ButtonDown --
-# The procedure below is invoked when the mouse button is pressed in
-# a button widget.  It records the fact that the mouse is in the button,
-# saves the button's relief so it can be restored later, and changes
-# the relief to sunken.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonDown w {
-    variable ::tk::Priv
-
-    # Only save the button's relief if it does not yet exist.  If there
-    # is an overrelief setting, Priv($w,relief) will already have been set,
-    # and the current value of the -relief option will be incorrect.
-
-    if {![info exists Priv($w,relief)]} {
-	set Priv($w,relief) [$w cget -relief]
-    }
-
-    if {[$w cget -state] ne "disabled"} {
-	set Priv(buttonWindow) $w
-	$w configure -relief sunken
-	set Priv($w,prelief) sunken
-
-	# If this button has a repeatdelay set up, get it going with an after
-	after cancel $Priv(afterId)
-	set delay [$w cget -repeatdelay]
-	set Priv(repeated) 0
-	if {$delay > 0} {
-	    set Priv(afterId) [after $delay [list tk::ButtonAutoInvoke $w]]
-	}
-    }
-}
-
-# ::tk::ButtonUp --
-# The procedure below is invoked when the mouse button is released
-# in a button widget.  It restores the button's relief and invokes
-# the command as long as the mouse hasn't left the button.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonUp w {
-    variable ::tk::Priv
-    if {$w eq $Priv(buttonWindow)} {
-	set Priv(buttonWindow) ""
-
-	# Restore the button's relief if it was cached.
-
-	if {[info exists Priv($w,relief)]} {
-	    if {[info exists Priv($w,prelief)] && \
-		    $Priv($w,prelief) eq [$w cget -relief]} {
-		$w configure -relief $Priv($w,relief)
-	    }
-	    unset -nocomplain Priv($w,relief) Priv($w,prelief)
-	}
-
-	# Clean up the after event from the auto-repeater
-	after cancel $Priv(afterId)
-
-	if {$Priv(window) eq $w && [$w cget -state] ne "disabled"} {
-	    # Only invoke the command if it wasn't already invoked by the
-	    # auto-repeater functionality
-	    if { $Priv(repeated) == 0 } {
-		uplevel #0 [list $w invoke]
-	    }
-	}
-    }
-}
-
-}
-
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
-
-####################
-# Mac implementation
-####################
-
-# ::tk::ButtonEnter --
-# The procedure below is invoked when the mouse pointer enters a
-# button widget.  It records the button we're in and changes the
-# state of the button to active unless the button is disabled.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonEnter {w} {
-    variable ::tk::Priv
-    if {[$w cget -state] ne "disabled"} {
-
-	# If there's an -overrelief value, set the relief to that.
-
-	if {$Priv(buttonWindow) eq $w} {
-	    $w configure -state active
-	} elseif {[set over [$w cget -overrelief]] ne ""} {
-	    set Priv($w,relief)  [$w cget -relief]
-	    set Priv($w,prelief) $over
-	    $w configure -relief $over
-	}
-    }
-    set Priv(window) $w
-}
-
-# ::tk::ButtonLeave --
-# The procedure below is invoked when the mouse pointer leaves a
-# button widget.  It changes the state of the button back to
-# inactive.  If we're leaving the button window with a mouse button
-# pressed (Priv(buttonWindow) == $w), restore the relief of the
-# button too.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonLeave w {
-    variable ::tk::Priv
-    if {$w eq $Priv(buttonWindow)} {
-	$w configure -state normal
-    }
-
-    # Restore the original button relief if it was changed by Tk.
-    # That is signaled by the existence of Priv($w,prelief).
-
-    if {[info exists Priv($w,relief)]} {
-	if {[info exists Priv($w,prelief)] && \
-		$Priv($w,prelief) eq [$w cget -relief]} {
-	    $w configure -relief $Priv($w,relief)
-	}
-	unset -nocomplain Priv($w,relief) Priv($w,prelief)
-    }
-
-    set Priv(window) ""
-}
-
-# ::tk::ButtonDown --
-# The procedure below is invoked when the mouse button is pressed in
-# a button widget.  It records the fact that the mouse is in the button,
-# saves the button's relief so it can be restored later, and changes
-# the relief to sunken.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonDown w {
-    variable ::tk::Priv
-
-    if {[$w cget -state] ne "disabled"} {
-	set Priv(buttonWindow) $w
-	$w configure -state active
-
-	# If this button has a repeatdelay set up, get it going with an after
-	after cancel $Priv(afterId)
-	set Priv(repeated) 0
-	if { ![catch {$w cget -repeatdelay} delay] } {
-	    if {$delay > 0} {
-		set Priv(afterId) [after $delay [list tk::ButtonAutoInvoke $w]]
-	    }
-	}
-    }
-}
-
-# ::tk::ButtonUp --
-# The procedure below is invoked when the mouse button is released
-# in a button widget.  It restores the button's relief and invokes
-# the command as long as the mouse hasn't left the button.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonUp w {
-    variable ::tk::Priv
-    if {$Priv(buttonWindow) eq $w} {
-	set Priv(buttonWindow) ""
-	$w configure -state normal
-
-	# Restore the button's relief if it was cached.
-
-	if {[info exists Priv($w,relief)]} {
-	    if {[info exists Priv($w,prelief)] && \
-		    $Priv($w,prelief) eq [$w cget -relief]} {
-		$w configure -relief $Priv($w,relief)
-	    }
-	    unset -nocomplain Priv($w,relief) Priv($w,prelief)
-	}
-
-	# Clean up the after event from the auto-repeater
-	after cancel $Priv(afterId)
-
-	if {$Priv(window) eq $w && [$w cget -state] ne "disabled"} {
-	    # Only invoke the command if it wasn't already invoked by the
-	    # auto-repeater functionality
-	    if { $Priv(repeated) == 0 } {
-		uplevel #0 [list $w invoke]
-	    }
-	}
-    }
-}
-
-}
-
-##################
-# Shared routines
-##################
-
-# ::tk::ButtonInvoke --
-# The procedure below is called when a button is invoked through
-# the keyboard.  It simulate a press of the button via the mouse.
-#
-# Arguments:
-# w -		The name of the widget.
-
-proc ::tk::ButtonInvoke w {
-    if {[$w cget -state] ne "disabled"} {
-	set oldRelief [$w cget -relief]
-	set oldState [$w cget -state]
-	$w configure -state active -relief sunken
-	update idletasks
-	after 100
-	$w configure -state $oldState -relief $oldRelief
-	uplevel #0 [list $w invoke]
-    }
-}
-
-# ::tk::ButtonAutoInvoke --
-#
-#	Invoke an auto-repeating button, and set it up to continue to repeat.
-#
-# Arguments:
-#	w	button to invoke.
-#
-# Results:
-#	None.
-#
-# Side effects:
-#	May create an after event to call ::tk::ButtonAutoInvoke.
-
-proc ::tk::ButtonAutoInvoke {w} {
-    variable ::tk::Priv
-    after cancel $Priv(afterId)
-    set delay [$w cget -repeatinterval]
-    if {$Priv(window) eq $w} {
-	incr Priv(repeated)
-	uplevel #0 [list $w invoke]
-    }
-    if {$delay > 0} {
-	set Priv(afterId) [after $delay [list tk::ButtonAutoInvoke $w]]
-    }
-}
-
-# ::tk::CheckRadioInvoke --
-# The procedure below is invoked when the mouse button is pressed in
-# a checkbutton or radiobutton widget, or when the widget is invoked
-# through the keyboard.  It invokes the widget if it
-# isn't disabled.
-#
-# Arguments:
-# w -		The name of the widget.
-# cmd -		The subcommand to invoke (one of invoke, select, or deselect).
-
-proc ::tk::CheckRadioInvoke {w {cmd invoke}} {
-    if {[$w cget -state] ne "disabled"} {
-	uplevel #0 [list $w $cmd]
-    }
-}
diff --git a/blt3.0/library/scrollbar.tcl b/blt3.0/library/scrollbar.tcl
deleted file mode 100644
index faa5ce9..0000000
--- a/blt3.0/library/scrollbar.tcl
+++ /dev/null
@@ -1,461 +0,0 @@
-
-# scrollbar.tcl --
-#
-# This file defines the default bindings for Tk scrollbar widgets.
-# It also provides procedures that help in implementing the bindings.
-#
-# RCS: @(#) $Id: scrollbar.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# Copyright (c) 1994 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-
-#-------------------------------------------------------------------------
-# The code below creates the default class bindings for scrollbars.
-#-------------------------------------------------------------------------
-
-# Standard Motif bindings:
-
-namespace eval ::blt::TkScrollbar {
-    variable _private
-
-    array set _private {
-	activeBg	""
-	afterId		-1
-	border		1
-	initPos		0
-	initValues	""
-	x		0
-	y		0
-	relief		flat
-    }
-}
-
-bind TkScrollbar <Enter> {
-    if {$tk_strictMotif} {
-	set blt::TkScrollbar::_private(activeBg) [%W cget -activebackground]
-	%W configure -activebackground [%W cget -background]
-    }
-    %W activate [%W identify %x %y]
-}
-bind TkScrollbar <Motion> {
-    %W activate [%W identify %x %y]
-}
-
-# The "info exists" command in the following binding handles the
-# situation where a Leave event occurs for a scrollbar without the Enter
-# event.  This seems to happen on some systems (such as Solaris 2.4) for
-# unknown reasons.
-
-bind TkScrollbar <Leave> {
-    if {$tk_strictMotif && [info exists blt::TkScrollbar::_private(activeBg)]} {
-	%W configure -activebackground $blt::TkScrollbar::_private(activeBg)
-    }
-    %W activate {}
-}
-bind TkScrollbar <1> {
-    blt::TkScrollbar::ScrollButtonDown %W %x %y
-}
-bind TkScrollbar <B1-Motion> {
-    blt::TkScrollbar::ScrollDrag %W %x %y
-}
-bind TkScrollbar <B1-B2-Motion> {
-    blt::TkScrollbar::ScrollDrag %W %x %y
-}
-bind TkScrollbar <ButtonRelease-1> {
-    blt::TkScrollbar::ScrollButtonUp %W %x %y
-}
-bind TkScrollbar <B1-Leave> {
-    # Prevents <Leave> binding from being invoked.
-}
-bind TkScrollbar <B1-Enter> {
-    # Prevents <Enter> binding from being invoked.
-}
-bind TkScrollbar <2> {
-    blt::TkScrollbar::ScrollButton2Down %W %x %y
-}
-bind TkScrollbar <B1-2> {
-    # Do nothing, since button 1 is already down.
-}
-bind TkScrollbar <B2-1> {
-    # Do nothing, since button 2 is already down.
-}
-bind TkScrollbar <B2-Motion> {
-    blt::TkScrollbar::ScrollDrag %W %x %y
-}
-bind TkScrollbar <ButtonRelease-2> {
-    blt::TkScrollbar::ScrollButtonUp %W %x %y
-}
-bind TkScrollbar <B1-ButtonRelease-2> {
-    # Do nothing:  B1 release will handle it.
-}
-bind TkScrollbar <B2-ButtonRelease-1> {
-    # Do nothing:  B2 release will handle it.
-}
-bind TkScrollbar <B2-Leave> {
-    # Prevents <Leave> binding from being invoked.
-}
-bind TkScrollbar <B2-Enter> {
-    # Prevents <Enter> binding from being invoked.
-}
-bind TkScrollbar <Control-1> {
-    blt::TkScrollbar::ScrollTopBottom %W %x %y
-}
-bind TkScrollbar <Control-2> {
-    blt::TkScrollbar::ScrollTopBottom %W %x %y
-}
-
-bind TkScrollbar <Up> {
-    blt::TkScrollbar::ScrollByUnits %W v -1
-}
-bind TkScrollbar <Down> {
-    blt::TkScrollbar::ScrollByUnits %W v 1
-}
-bind TkScrollbar <Control-Up> {
-    blt::TkScrollbar::ScrollByPages %W v -1
-}
-bind TkScrollbar <Control-Down> {
-    blt::TkScrollbar::ScrollByPages %W v 1
-}
-bind TkScrollbar <Left> {
-    blt::TkScrollbar::ScrollByUnits %W h -1
-}
-bind TkScrollbar <Right> {
-    blt::TkScrollbar::ScrollByUnits %W h 1
-}
-bind TkScrollbar <Control-Left> {
-    blt::TkScrollbar::ScrollByPages %W h -1
-}
-bind TkScrollbar <Control-Right> {
-    blt::TkScrollbar::ScrollByPages %W h 1
-}
-bind TkScrollbar <Prior> {
-    blt::TkScrollbar::ScrollByPages %W hv -1
-}
-bind TkScrollbar <Next> {
-    blt::TkScrollbar::ScrollByPages %W hv 1
-}
-bind TkScrollbar <Home> {
-    blt::TkScrollbar::ScrollToPos %W 0
-}
-bind TkScrollbar <End> {
-    blt::TkScrollbar::ScrollToPos %W 1
-}
-
-
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
-    bind TkScrollbar <MouseWheel> {
-        blt::TkScrollbar::ScrollByUnits %W v [expr {- (%D)}]
-    }
-    bind TkScrollbar <Option-MouseWheel> {
-        blt::TkScrollbar::ScrollByUnits %W v [expr {-10 * (%D)}]
-    }
-    bind TkScrollbar <Shift-MouseWheel> {
-        blt::TkScrollbar::ScrollByUnits %W h [expr {- (%D)}]
-    }
-    bind TkScrollbar <Shift-Option-MouseWheel> {
-        blt::TkScrollbar::ScrollByUnits %W h [expr {-10 * (%D)}]
-    }
-}
-# blt::TkScrollbar::ScrollButtonDown --
-# This procedure is invoked when a button is pressed in a scrollbar.
-# It changes the way the scrollbar is displayed and takes actions
-# depending on where the mouse is.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# x, y -	Mouse coordinates.
-
-proc blt::TkScrollbar::ScrollButtonDown {w x y} {
-    variable _private
-
-    set _private(relief) [$w cget -activerelief]
-    set _private(border) [$w cget -activebackground]
-    $w configure -activerelief sunken
-    set element [$w identify $x $y]
-    $w select $element
-    if {$element eq "slider"} {
-	ScrollStartDrag $w $x $y
-    } else {
-	ScrollSelect $w $element initial
-    }
-}
-
-# ScrollButtonUp --
-# This procedure is invoked when a button is released in a scrollbar.
-# It cancels scans and auto-repeats that were in progress, and restores
-# the way the active element is displayed.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# x, y -	Mouse coordinates.
-
-proc ::blt::TkScrollbar::ScrollButtonUp {w x y} {
-    variable _private
-
-    CancelRepeat
-    if {[info exists _private(relief)]} {
-	# Avoid error due to spurious release events
-	$w configure -activerelief $_private(relief)
-	ScrollEndDrag $w $x $y
-	set element [$w identify $x $y]
-	$w activate [$w identify $x $y]
-	$w select {}
-    }
-}
-
-# ScrollSelect --
-# This procedure is invoked when a button is pressed over the scrollbar.
-# It invokes one of several scrolling actions depending on where in
-# the scrollbar the button was pressed.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# element -	The element of the scrollbar that was selected, such
-#		as "arrow1" or "trough2".  Shouldn't be "slider".
-# repeat -	Whether and how to auto-repeat the action:  "noRepeat"
-#		means don't auto-repeat, "initial" means this is the
-#		first action in an auto-repeat sequence, and "again"
-#		means this is the second repetition or later.
-
-proc ::blt::TkScrollbar::ScrollSelect {w element repeat} {
-    variable _private
-
-    if {![winfo exists $w]} {
-	return
-    }
-    switch -- $element {
-	"arrow1"	{ScrollByUnits $w hv -1}
-	"trough1"	{ScrollByPages $w hv -1}
-	"trough2"	{ScrollByPages $w hv 1}
-	"arrow2"	{ScrollByUnits $w hv 1}
-	default		{return}
-    }
-    set cmd [list blt::TkScrollbar::ScrollSelect $w $element again]
-    if {$repeat eq "again"} {
-	set _private(afterId) [after [$w cget -repeatinterval] $cmd]
-    } elseif {$repeat eq "initial"} {
-	set delay [$w cget -repeatdelay]
-	if {$delay > 0} {
-	    set _private(afterId) [after $delay $cmd]
-	}
-    }
-}
-
-# ScrollStartDrag --
-# This procedure is called to initiate a drag of the slider.  It just
-# remembers the starting position of the mouse and slider.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# x, y -	The mouse position at the start of the drag operation.
-
-proc ::blt::TkScrollbar::ScrollStartDrag {w x y} {
-    variable _private
-
-    if {[$w cget -command] eq ""} {
-	return
-    }
-    set _private(x) $x
-    set _private(y) $y
-    set _private(initValues) [$w get]
-    set iv0 [lindex $_private(initValues) 0]
-    if {[llength $_private(initValues)] == 2} {
-	set _private(initPos) $iv0
-    } elseif {$iv0 == 0} {
-	set _private(initPos) 0.0
-    } else {
-	set _private(initPos) [expr {(double([lindex $_private(initValues) 2])) \
-		/ [lindex $_private(initValues) 0]}]
-    }
-}
-
-# ScrollDrag --
-# This procedure is called for each mouse motion even when the slider
-# is being dragged.  It notifies the associated widget if we're not
-# jump scrolling, and it just updates the scrollbar if we are jump
-# scrolling.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# x, y -	The current mouse position.
-
-proc ::blt::TkScrollbar::ScrollDrag {w x y} {
-    variable _private
-
-    if {$_private(initPos) eq ""} {
-	return
-    }
-    set delta \
-	[$w delta [expr {$x - $_private(x)}] [expr {$y - $_private(y)}]]
-    if {[$w cget -jump]} {
-	if {[llength $_private(initValues)] == 2} {
-	    $w set [expr {[lindex $_private(initValues) 0] + $delta}] \
-		    [expr {[lindex $_private(initValues) 1] + $delta}]
-	} else {
-	    set delta [expr {round($delta * [lindex $_private(initValues) 0])}]
-	    eval [list $w] set [lreplace $_private(initValues) 2 3 \
-		    [expr {[lindex $_private(initValues) 2] + $delta}] \
-		    [expr {[lindex $_private(initValues) 3] + $delta}]]
-	}
-    } else {
-	ScrollToPos $w [expr {$_private(initPos) + $delta}]
-    }
-}
-
-# ScrollEndDrag --
-# This procedure is called to end an interactive drag of the slider.
-# It scrolls the window if we're in jump mode, otherwise it does nothing.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# x, y -	The mouse position at the end of the drag operation.
-
-proc ::blt::TkScrollbar::ScrollEndDrag {w x y} {
-    variable _private
-
-    if {$_private(initPos) eq ""} {
-	return
-    }
-    if {[$w cget -jump]} {
-	set delta [$w delta [expr {$x-$_private(x)}] [expr {$y-$_private(y)}]]
-	ScrollToPos $w [expr {$_private(initPos) + $delta}]
-    }
-    set _private(initPos) ""
-}
-
-# ScrollByUnits --
-# This procedure tells the scrollbar's associated widget to scroll up
-# or down by a given number of units.  It notifies the associated widget
-# in different ways for old and new command syntaxes.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# orient -	Which kinds of scrollbars this applies to:  "h" for
-#		horizontal, "v" for vertical, "hv" for both.
-# amount -	How many units to scroll:  typically 1 or -1.
-
-proc ::blt::TkScrollbar::ScrollByUnits {w orient amount} {
-    set cmd [$w cget -command]
-    if {$cmd eq "" || ([string first [string index [$w cget -orient] 0] $orient] < 0)} {
-	return
-    }
-    set info [$w get]
-    if {[llength $info] == 2} {
-	uplevel #0 $cmd scroll $amount units
-    } else {
-	uplevel #0 $cmd [expr {[lindex $info 2] + $amount}]
-    }
-}
-
-# ScrollByPages --
-# This procedure tells the scrollbar's associated widget to scroll up
-# or down by a given number of screenfuls.  It notifies the associated
-# widget in different ways for old and new command syntaxes.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# orient -	Which kinds of scrollbars this applies to:  "h" for
-#		horizontal, "v" for vertical, "hv" for both.
-# amount -	How many screens to scroll:  typically 1 or -1.
-
-proc ::blt::TkScrollbar::ScrollByPages {w orient amount} {
-    set cmd [$w cget -command]
-    if {$cmd eq "" || ([string first [string index [$w cget -orient] 0] $orient] < 0)} {
-	return
-    }
-    set info [$w get]
-    if {[llength $info] == 2} {
-	uplevel #0 $cmd scroll $amount pages
-    } else {
-	uplevel #0 $cmd [expr {[lindex $info 2] + $amount*([lindex $info 1] - 1)}]
-    }
-}
-
-# ScrollToPos --
-# This procedure tells the scrollbar's associated widget to scroll to
-# a particular location, given by a fraction between 0 and 1.  It notifies
-# the associated widget in different ways for old and new command syntaxes.
-#
-# Arguments:
-# w -		The scrollbar widget.
-# pos -		A fraction between 0 and 1 indicating a desired position
-#		in the document.
-
-proc ::blt::TkScrollbar::ScrollToPos {w pos} {
-    set cmd [$w cget -command]
-    if {$cmd eq ""} {
-	return
-    }
-    set info [$w get]
-    if {[llength $info] == 2} {
-	uplevel #0 $cmd moveto $pos
-    } else {
-	uplevel #0 $cmd [expr {round([lindex $info 0]*$pos)}]
-    }
-}
-
-#
-# ScrollTopBottom --
-#
-#	Scroll to the top or bottom of the document, depending on the mouse
-#	position.
-#
-# Arguments:
-#	w 	The scrollbar widget.
-#	x, y 	Mouse coordinates within the widget.
-#
-proc ::blt::TkScrollbar::ScrollTopBottom {w x y} {
-    variable _private
-
-    set element [$w identify $x $y]
-    if {[string match *1 $element]} {
-	ScrollToPos $w 0
-    } elseif {[string match *2 $element]} {
-	ScrollToPos $w 1
-    }
-    # Set _private(relief), since it's needed by ScrollButtonUp.
-    set _private(relief) [$w cget -activerelief]
-}
-
-#
-# ScrollButton2Down --
-#
-#	This procedure is invoked when button 2 is pressed over a scrollbar.
-#	If the button is over the trough or slider, it sets the scrollbar to
-#	the mouse position and starts a slider drag.  Otherwise it just
-#	behaves the same as button 1.
-#
-# Arguments:
-#	w 	The scrollbar widget.
-#	x, y 	Mouse coordinates within the widget.
-
-proc ::blt::TkScrollbar::ScrollButton2Down {w x y} {
-    variable _private
-
-    set element [$w identify $x $y]
-    if {[string match {arrow[12]} $element]} {
-	ScrollButtonDown $w $x $y
-	return
-    }
-    ScrollToPos $w [$w fraction $x $y]
-    set _private(relief) [$w cget -activerelief]
-
-    # Need the "update idletasks" below so that the widget calls us
-    # back to reset the actual scrollbar position before we start the
-    # slider drag.
-
-    update idletasks
-    $w configure -activerelief sunken 
-    $w activate slider
-    ScrollStartDrag $w $x $y
-}
-
-proc ::blt::TkScrollbar::CancelRepeat {} {
-    variable _private
-    after cancel $_private(afterId)
-    set _private(afterId) -1
-}
diff --git a/blt3.0/library/scrollset.tcl b/blt3.0/library/scrollset.tcl
deleted file mode 100644
index 95cf112..0000000
--- a/blt3.0/library/scrollset.tcl
+++ /dev/null
@@ -1,44 +0,0 @@
-
-namespace eval blt {
-    namespace eval Scrollset {
-	#empty
-    }
-}
-
-proc blt::Scrollset::ConfigureScrollbars { scrollset } {
-    set xscrollbar [$scrollset cget -xscrollbar]
-    set yscrollbar [$scrollset cget -yscrollbar]
-    set slave [$scrollset cget -window]
-    if { $slave != "" } {
-	set yscrollcmd [$scrollset cget -yscrollcommand]
-	if { $yscrollcmd == "" } {
-	    set yscrollcmd [list $slave yview]
-	}
-	if { [catch $yscrollcmd] == 0 } {
-	    $slave configure -yscrollcommand [list $scrollset set y] 
-	}
-	set xscrollcmd [$scrollset cget -xscrollcommand]
-	if { $xscrollcmd == "" } {
-	    set xscrollcmd [list $slave xview]
-	}
-	if { [catch $xscrollcmd] == 0 } {
-	    $slave configure -xscrollcommand [list $scrollset set x]
-	}
-    }
-    if { $xscrollbar != "" } {
-	$xscrollbar configure -command [list $scrollset xview] \
-	    -orient horizontal -highlightthickness 0
-    }
-    if { $yscrollbar != "" } {
-	$yscrollbar configure -command [list $scrollset yview] \
-	    -orient vertical  -highlightthickness 0
-    }
-}
-
-
-
-
-
-
-
-
diff --git a/blt3.0/library/tabset.tcl b/blt3.0/library/tabset.tcl
deleted file mode 100644
index d49c53b..0000000
--- a/blt3.0/library/tabset.tcl
+++ /dev/null
@@ -1,376 +0,0 @@
-
-#
-# tabset.tcl
-#
-# ----------------------------------------------------------------------
-# Bindings for the BLT tabset widget
-# ----------------------------------------------------------------------
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at bell-labs.com
-#            http://www.tcltk.com/blt
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ======================================================================
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-#
-# Indicates whether to activate (highlight) tabs when the mouse passes
-# over them.  This is turned off during scan operations.
-#
-
-namespace eval blt {
-    namespace eval Tabset {
-	variable privateData
-	set privateData(activate) yes
-    }
-}
-
-# ----------------------------------------------------------------------
-# 
-# ButtonPress assignments
-#
-#   <ButtonPress-2>	Starts scan mechanism (pushes the tabs)
-#   <B2-Motion>		Adjust scan
-#   <ButtonRelease-2>	Stops scan
-#   <ButtonPress-3>	Starts scan mechanism (pushes the tabs)
-#   <B3-Motion>		Adjust scan
-#   <ButtonRelease-3>	Stops scan
-#
-# ----------------------------------------------------------------------
-bind Tabset <B2-Motion> {
-    %W scan dragto %x %y
-}
-
-bind Tabset <ButtonPress-2> {
-    set blt::Tabset::privateData(cursor) [%W cget -cursor]
-    set blt::Tabset::privateData(activate) no
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind Tabset <ButtonRelease-2> {
-    %W configure -cursor $::blt::Tabset::privateData(cursor)
-    set blt::Tabset::privateData(activate) yes
-    %W activate @%x,%y
-}
-
-bind Tabset <B3-Motion> {
-    %W scan dragto %x %y
-}
-
-bind Tabset <ButtonPress-3> {
-    set blt::Tabset::privateData(cursor) [%W cget -cursor]
-    set blt::Tabset::privateData(activate) no
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind Tabset <ButtonRelease-3> {
-    %W configure -cursor $blt::Tabset::privateData(cursor)
-    set blt::Tabset::privateData(activate) yes
-    %W activate @%x,%y
-}
-
-# ----------------------------------------------------------------------
-# 
-# KeyPress assignments
-#
-#   <KeyPress-Up>	Moves focus to the tab immediately above the 
-#			current.
-#   <KeyPress-Down>	Moves focus to the tab immediately below the 
-#			current.
-#   <KeyPress-Left>	Moves focus to the tab immediately left of the 
-#			currently focused tab.
-#   <KeyPress-Right>	Moves focus to the tab immediately right of the 
-#			currently focused tab.
-#   <KeyPress-space>	Invokes the commands associated with the current
-#			tab.
-#   <KeyPress-Return>	Same as above.
-#   <KeyPress>		Go to next tab starting with the ASCII character.
-#   <KeyPress-End>	Moves focus to the last tab.
-#   <KeyPress-Home>	Moves focus to the last tab.
-#
-# ----------------------------------------------------------------------
-
-bind Tabset <KeyPress-Up> { 
-    blt::Tabset::Select %W "up" 
-}
-bind Tabset <KeyPress-Down> { 
-    blt::Tabset::Select %W "down" 
-}
-bind Tabset <KeyPress-Right> { 
-    blt::Tabset::Select %W "right" 
-}
-bind Tabset <KeyPress-Left> { 
-    blt::Tabset::Select %W "left" 
-}
-bind Tabset <KeyPress-Home> { 
-    blt::Tabset::Select %W "first" 
-}
-bind Tabset <KeyPress-End> { 
-    blt::Tabset::Select %W "last" 
-}
-bind Tabset <KeyPress-space> { 
-    %W invoke focus 
-}
-
-bind Tabset <KeyPress-Return> { 
-    %W invoke focus 
-}
-
-bind Tabset <KeyPress> {
-    if { [string match {[A-Za-z0-9]*} "%A"] } {
-	blt::Tabset::FindMatch %W %A
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# FindMatch --
-#
-#	Find the first tab (from the tab that currently has focus) 
-#	starting with the same first letter as the tab.  It searches
-#	in order of the tab positions and wraps around. If no tab
-#	matches, it stops back at the current tab.
-#
-# Arguments:	
-#	widget		Tabset widget.
-#	key		ASCII character of key pressed
-#
-# ----------------------------------------------------------------------
-proc blt::Tabset::FindMatch { w key } {
-    set key [string tolower $key]
-    set itab [$w index focus]
-    set numTabs [$w size]
-    for { set i 0 } { $i < $numTabs } { incr i } {
-	if { [incr itab] >= $numTabs } {
-	    set itab 0
-	}
-	set label [string tolower [$w tab cget $itab -text]]
-	if { [string index $label 0] == $key } {
-	    break
-	}
-    }
-    $w focus $itab
-    $w see focus
-}
-
-# ----------------------------------------------------------------------
-#
-# Select --
-#
-#	Invokes the command for the tab.  If the widget associated tab 
-#	is currently torn off, the tearoff is raised.
-#
-# Arguments:	
-#	widget		Tabset widget.
-#	x y		Unused.
-#
-# ----------------------------------------------------------------------
-proc blt::Tabset::Select { w tab } {
-    set index [$w index $tab]
-    if { $index != "" } {
-	$w select $index
-	$w focus $index
-	$w see $index
-	set tearoff [$w tearoff $index]
-	if { ($tearoff != "") && ($tearoff != "$w") } {
-	    raise [winfo toplevel $tearoff]
-	}
-	$w invoke $index
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# DestroyTearoff --
-#
-#	Destroys the toplevel window and the container tearoff 
-#	window holding the embedded widget.  The widget is placed
-#	back inside the tab.
-#
-# Arguments:	
-#	widget		Tabset widget.
-#	tab		Tab selected.
-#
-# ----------------------------------------------------------------------
-proc blt::Tabset::DestroyTearoff { w tab } {
-    set id [$w id $tab]
-    set top "$w.toplevel-$id"
-    if { [winfo exists $top] } {
-	wm withdraw $top
-	update
-	$w tearoff $tab $w
-	destroy $top
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# CreateTearoff --
-#
-#	Creates a new toplevel window and moves the embedded widget
-#	into it.  The toplevel is placed just below the tab.  The
-#	DELETE WINDOW property is set so that if the toplevel window 
-#	is requested to be deleted by the window manager, the embedded
-#	widget is placed back inside of the tab.  Note also that 
-#	if the tabset container is ever destroyed, the toplevel is
-#	also destroyed.  
-#
-# Arguments:	
-#	widget		Tabset widget.
-#	tab		Tab selected.
-#	x y		The coordinates of the mouse pointer.
-#
-# ----------------------------------------------------------------------
-
-proc blt::Tabset::CreateTearoff { w tab rootX rootY } {
-
-    # ------------------------------------------------------------------
-    # When reparenting the window contained in the tab, check if the
-    # window or any window in its hierarchy currently has focus.
-    # Since we're reparenting windows behind its back, Tk can
-    # mistakenly activate the keyboard focus when the mouse enters the
-    # old toplevel.  The simplest way to deal with this problem is to
-    # take the focus off the window and set it to the tabset widget
-    # itself.
-    # ------------------------------------------------------------------
-
-    set focus [focus]
-    set win [$w tab cget $tab -window]
-    set index [$w index $tab]
-    if { ($focus == $w) || ([string match  ${win}.* $focus]) } {
-	focus -force $w
-    }
-    set id [$w id $index]
-    set top "$w.toplevel-$id"
-    toplevel $top
-    $w tearoff $tab $top.container
-    blt::table $top 0,0 $top.container -fill both
-
-    incr rootX 10 ; incr rootY 10
-    wm geometry $top +$rootX+$rootY
-
-    set parent [winfo toplevel $w]
-    wm title $top "[wm title $parent]: [$w tab cget $index -text]"
-    #wm transient $top $parent
-
-    # If the user tries to delete the toplevel, put the window back
-    # into the tab folder.  
-
-    wm protocol $top WM_DELETE_WINDOW \
-	[list blt::Tabset::DestroyTearoff $w $tab]
-
-    # If the container is ever destroyed, automatically destroy the
-    # toplevel too.  
-
-    bind $top.container <Destroy> [list destroy $top]
-}
-
-# ----------------------------------------------------------------------
-#
-# ToggleTearoff --
-#
-#	Toggles the tab tearoff.  If the tab contains a embedded widget, 
-#	it is placed inside of a toplevel window.  If the widget has 
-#	already been torn off, the widget is replaced back in the tab.
-#
-# Arguments:	
-#	widget		tabset widget.
-#	x y		The coordinates of the mouse pointer.
-#
-# ----------------------------------------------------------------------
-
-proc blt::Tabset::ToggleTearoff { w index } {
-    set tab [$w index $index]
-    if { $tab == "" } {
-	return
-    }
-    $w invoke $tab
-    set win [$w tearoff $index]
-    if { $win == "$w" } {
-	foreach { x1 y1 x2 y2 } [$w extents $tab] break
-	CreateTearoff $w $tab $x1 $y1
-    } elseif { $win != "" } {
-	DestroyTearoff $w $tab
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# Init
-#
-#	Invoked from C whenever a new tabset widget is created.
-#	Sets up the default bindings for the all tab entries.  
-#	These bindings are local to the widget, so they can't be 
-#	set through the usual widget class bind tags mechanism.
-#
-#	<Enter>		Activates the tab.
-#	<Leave>		Deactivates all tabs.
-#	<ButtonPress-1>	Selects the tab and invokes its command.
-#	<Control-ButtonPress-1>	
-#			Toggles the tab tearoff.  If the tab contains
-#			a embedded widget, it is placed inside of a
-#			toplevel window.  If the widget has already
-#			been torn off, the widget is replaced back
-#			in the tab.
-#
-# Arguments:	
-#	widget		tabset widget
-#
-# ----------------------------------------------------------------------
-
-proc blt::Tabset::Init { w } {
-    $w bind all <Enter> { 
-	if { $::blt::Tabset::privateData(activate) } {
-	    %W activate current
-        }
-    }
-    $w bind all <Leave> { 
-        %W activate "" 
-    }
-    $w bind all <ButtonPress-1> { 
-	blt::Tabset::Select %W "current"
-    }
-    $w bind all <Control-ButtonPress-1> { 
-	blt::Tabset::ToggleTearoff %W active
-    }
-    $w configure -perforationcommand [list blt::Tabset::ToggleTearoff $w]
-    $w bind Perforation <Enter> { 
-	%W perforation activate on
-    }
-    $w bind Perforation <Leave> { 
-	%W perforation activate off
-    }
-    $w bind Perforation <ButtonRelease-1> { 
-	%W perforation invoke 
-    }
-    $w bind Button <Enter> { 
-	%W button activate on
-    }
-    $w bind Button <Leave> { 
-	%W button activate off
-    }
-    $w bind Button <ButtonRelease-1> { 
-	%W button invoke 
-    }
-}
diff --git a/blt3.0/library/tclIndex b/blt3.0/library/tclIndex
deleted file mode 100644
index 0b72d79..0000000
--- a/blt3.0/library/tclIndex
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands.  Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(Blt_ActiveLegend) [list source $dir/graph.tcl]
-set auto_index(Blt_Crosshairs) [list source $dir/graph.tcl]
-set auto_index(Blt_ZoomStack) [list source $dir/graph.tcl]
-set auto_index(Blt_PrintKey) [list source $dir/graph.tcl]
-set auto_index(Blt_ClosestPoint) [list source $dir/graph.tcl]
diff --git a/blt3.0/library/treeview.cur b/blt3.0/library/treeview.cur
deleted file mode 100644
index 040cf43..0000000
Binary files a/blt3.0/library/treeview.cur and /dev/null differ
diff --git a/blt3.0/library/treeview.tcl b/blt3.0/library/treeview.tcl
deleted file mode 100644
index fa97d2b..0000000
--- a/blt3.0/library/treeview.tcl
+++ /dev/null
@@ -1,1061 +0,0 @@
-
-# ======================================================================
-#
-# treeview.tcl
-#
-# ----------------------------------------------------------------------
-# Bindings for the BLT treeview widget
-# ----------------------------------------------------------------------
-#
-#   AUTHOR:  George Howlett
-#            Bell Labs Innovations for Lucent Technologies
-#            gah at lucent.com
-#            http://www.tcltk.com/blt
-#
-#      RCS:  $Id: treeview.tcl,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-#
-# ----------------------------------------------------------------------
-# Copyright (c) 1998  Lucent Technologies, Inc.
-# ----------------------------------------------------------------------
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies and that
-# both that the copyright notice and warranty disclaimer appear in
-# supporting documentation, and that the names of Lucent Technologies
-# any of their entities not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# Lucent Technologies disclaims all warranties with regard to this
-# software, including all implied warranties of merchantability and
-# fitness.  In no event shall Lucent be liable for any special, indirect
-# or consequential damages or any damages whatsoever resulting from loss
-# of use, data or profits, whether in an action of contract, negligence
-# or other tortuous action, arising out of or in connection with the use
-# or performance of this software.
-#
-# ======================================================================
-
-namespace eval ::blt::TreeView {
-    variable _privateData
-    array set _privateData {
-	afterId		-1
-	scroll 0
-	column ""
-	space   off
-	x 0
-	y 0
-    }
-}
-
-image create picture ::blt::TreeView::closeIcon -data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
-    ZTKAsiCtWq0JADs=
-}
-image create picture ::blt::TreeView::openIcon -data {
-    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
-    AAM1WBrM+rAEMigJ8c3Kb3OSII6kGABhp1JnaK1VGwjwKwtvHqNzzd263M3H4n2OH1QBwGw6
-    nQkAOw==
-}
-if { $tcl_platform(platform) == "windows" } {
-    if { $tk_version >= 8.3 } {
-	set cursor "@[file join $blt_library treeview.cur]"
-    } else {
-	set cursor "size_we"
-    }
-    option add *TreeView.ResizeCursor [list $cursor]
-} else {
-    option add *TreeView.ResizeCursor \
-	"@$blt_library/treeview.xbm $blt_library/treeview_m.xbm black white"
-}
-
-# ----------------------------------------------------------------------
-#
-# Initialize --
-#
-#	Invoked by internally by Treeview_Init routine.  Initializes
-#	the default bindings for the treeview widget entries.  These
-#	are local to the widget, so they can't be set through the
-#	widget's class bind tags.
-#
-# ----------------------------------------------------------------------
-proc blt::TreeView::Initialize { w } {
-    variable _privateData
-    #
-    # Active entry bindings
-    #
-    $w bind Entry <Enter> { 
-	%W entry highlight current 
-    }
-    $w bind Entry <Leave> { 
-	%W entry highlight "" 
-    }
-
-    #
-    # Button bindings
-    #
-    $w button bind all <ButtonRelease-1> {
-	set index [%W nearest %x %y blt::TreeView::_privateData(who)]
-	if { [%W index current] == $index && 
-	     $blt::TreeView::_privateData(who) == "button" } {
-	    %W see -anchor nw current
-	    %W toggle current
-	}
-    }
-    $w button bind all <Enter> {
-	%W button highlight current
-    }
-    $w button bind all <Leave> {
-	%W button highlight ""
-    }
-
-    #
-    # ButtonPress-1
-    #
-    #	Performs the following operations:
-    #
-    #	1. Clears the previous selection.
-    #	2. Selects the current entry.
-    #	3. Sets the focus to this entry.
-    #	4. Scrolls the entry into view.
-    #	5. Sets the selection anchor to this entry, just in case
-    #	   this is "multiple" mode.
-    #
-    
-    $w bind Entry <ButtonPress-1> { 	
-	blt::TreeView::SetSelectionAnchor %W current
-	set blt::TreeView::_privateData(scroll) 1
-    }
-
-    $w bind Entry <Double-ButtonPress-1> {
-	%W toggle current
-    }
-
-    #
-    # B1-Motion
-    #
-    #	For "multiple" mode only.  Saves the current location of the
-    #	pointer for auto-scrolling.  Resets the selection mark.  
-    #
-    $w bind Entry <B1-Motion> { 
-	set blt::TreeView::_privateData(x) %x
-	set blt::TreeView::_privateData(y) %y
-	set index [%W nearest %x %y]
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection mark $index
-	} else {
-	    blt::TreeView::SetSelectionAnchor %W $index
-	}
-    }
-
-    #
-    # ButtonRelease-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w bind Entry <ButtonRelease-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    %W selection anchor current
-	}
-	after cancel $blt::TreeView::_privateData(afterId)
-	set blt::TreeView::_privateData(afterId) -1
-	set blt::TreeView::_privateData(scroll) 0
-    }
-
-    #
-    # Shift-ButtonPress-1
-    #
-    #	For "multiple" mode only.
-    #
-
-    $w bind Entry <Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == -1 } {
-		%W selection anchor current
-	    }
-	    set index [%W index anchor]
-	    %W selection clearall
-	    %W selection set $index current
-	} else {
-	    blt::TreeView::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Shift-B1-Motion> { 
-	# do nothing
-    }
-    $w bind Entry <Shift-ButtonRelease-1> { 
-	after cancel $blt::TreeView::_privateData(afterId)
-	set blt::TreeView::_privateData(afterId) -1
-	set blt::TreeView::_privateData(scroll) 0
-    }
-
-    #
-    # Control-ButtonPress-1
-    #
-    #	For "multiple" mode only.  
-    #
-    $w bind Entry <Control-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" } {
-	    set index [%W index current]
-	    %W selection toggle $index
-	    %W selection anchor $index
-	} else {
-	    blt::TreeView::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Control-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Control-B1-Motion> { 
-	# do nothing
-    }
-    $w bind Entry <Control-ButtonRelease-1> { 
-	after cancel $blt::TreeView::_privateData(afterId)
-	set blt::TreeView::_privateData(afterId) -1
-	set blt::TreeView::_privateData(scroll) 0
-    }
-
-    $w bind Entry <Control-Shift-ButtonPress-1> { 
-	if { [%W cget -selectmode] == "multiple" && [%W selection present] } {
-	    if { [%W index anchor] == -1 } {
-		%W selection anchor current
-	    }
-	    if { [%W selection includes anchor] } {
-		%W selection set anchor current
-	    } else {
-		%W selection clear anchor current
-		%W selection set current
-	    }
-	} else {
-	    blt::TreeView::SetSelectionAnchor %W current
-	}
-    }
-    $w bind Entry <Control-Shift-Double-ButtonPress-1> {
-	# do nothing
-    }
-    $w bind Entry <Control-Shift-B1-Motion> { 
-	# do nothing
-    }
-
-    $w bind Entry <ButtonRelease-3> { 
-	blt::TreeView::EditColumn %W %X %Y
-    }
-
-    $w column bind all <Enter> {
-	%W column highlight [%W column current]
-    }
-    $w column bind all <Leave> {
-	%W column highlight ""
-    }
-    $w column bind Rule <Enter> {
-	%W column highlight [%W column current]
-	%W column resize activate [%W column current]
-    }
-    $w column bind Rule <Leave> {
-	%W column highlight ""
-	%W column resize activate ""
-    }
-    $w column bind Rule <ButtonPress-1> {
-	%W column resize anchor %x
-    }
-    $w column bind Rule <B1-Motion> {
-	%W column resize mark %x
-    }
-    $w column bind Rule <ButtonRelease-1> {
-	%W column configure [%W column current] -width [%W column resize set]
-    }
-    $w column bind all <ButtonPress-1> {
-	set blt::TreeView::_privateData(column) [%W column current]
-	%W column configure $blt::TreeView::_privateData(column) \
-	    -titlerelief sunken
-    }
-    $w column bind all <ButtonRelease-1> {
-	set column [%W column current]
-	if { $column != "" } {
-	    %W column invoke $column
-	}
-	%W column configure $blt::TreeView::_privateData(column) \
-	    -titlerelief raised
-    }
-#     $w bind TextBoxStyle <ButtonPress-3> { 
-# 	puts stderr "widget bind buttonpress-3 %W %X %Y"
-# 	if { [%W edit -root -test %X %Y] } {
-# 	    break
-# 	}
-#     }
-#     $w bind TextBoxStyle <ButtonRelease-3> { 
-# 	if { [%W edit -root -test %X %Y] } {
-# 	    blt::TreeView::EditColumn %W %X %Y
-# 	    break
-# 	}
-#     }
-    $w bind CheckBoxStyle <Enter> { 
-	if { [%W column cget [%W column current] -edit] } {
-	    %W style activate current [%W column current]
-	} 
-    }
-    $w bind CheckBoxStyle <Leave> { 
-	%W style activate ""
-    }
-    $w bind CheckBoxStyle <ButtonPress-1> { 
-	if { [%W column cget [%W column current] -edit] } {
-	    break
-	}
-    }
-    $w bind CheckBoxStyle <B1-Motion> { 
-	if { [%W column cget [%W column current] -edit] } {
-	    break
-	}
-    }
-    $w bind CheckBoxStyle <ButtonRelease-1> { 
-	if { [%W edit -root -test %X %Y] } {
-	    %W edit -root %X %Y
-	    break
-	}
-    }
-    $w bind ComboBoxStyle <Enter> { 
-	if { [%W column cget [%W column current] -edit] } {
-	    %W style activate current [%W column current]
-	} 
-    }
-    $w bind ComboBoxStyle <Leave> { 
-	%W style activate ""
-    }
-    $w bind ComboBoxStyle <ButtonPress-1> { 
-	if { [%W column cget [%W column current] -edit] } {
-	    break
-	}
-    }
-    $w bind ComboBoxStyle <ButtonRelease-1> { 
-	if { [%W edit -root -test %X %Y] } {
-	    %W edit -root %X %Y
-	    break
-	}
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# AutoScroll --
-#
-#	Invoked when the user is selecting elements in a treeview
-#	widget and drags the mouse pointer outside of the widget.
-#	Scrolls the view in the direction of the pointer.
-#
-# ----------------------------------------------------------------------
-proc blt::TreeView::AutoScroll { w } {
-    variable _privateData
-
-    if { ![winfo exists $w] } {
-	return
-    }
-    set x $_privateData(x)
-    set y $_privateData(y)
-
-    set index [$w nearest $x $y]
-    if {$y >= [winfo height $w]} {
-	$w yview scroll 1 units
-	set neighbor down
-    } elseif {$y < 0} {
-	$w yview scroll -1 units
-	set neighbor up
-    } else {
-	set neighbor $index
-    }
-    if { [$w cget -selectmode] == "single" } {
-	SetSelectionAnchor $w $neighbor
-    } else {
-	$w selection mark $index
-    }
-    set _privateData(afterId) [after 50 blt::TreeView::AutoScroll $w]
-}
-
-proc blt::TreeView::SetSelectionAnchor { w tagOrId } {
-    set index [$w index $tagOrId]
-    $w selection clearall
-    $w see $index
-    $w focus $index
-    $w selection set $index
-    $w selection anchor $index
-}
-
-# ----------------------------------------------------------------------
-#
-# MoveFocus --
-#
-#	Invoked by KeyPress bindings.  Moves the active selection to
-#	the entry <where>, which is an index such as "up", "down",
-#	"prevsibling", "nextsibling", etc.
-#
-# ----------------------------------------------------------------------
-proc blt::TreeView::MoveFocus { w tagOrId } {
-    catch {$w focus $tagOrId}
-    if { [$w cget -selectmode] == "single" } {
-        $w selection clearall
-        $w selection set focus
-	$w selection anchor focus
-    }
-    $w see focus
-}
-
-# ----------------------------------------------------------------------
-#
-# MovePage --
-#
-#	Invoked by KeyPress bindings.  Pages the current view up or
-#	down.  The <where> argument should be either "top" or
-#	"bottom".
-#
-# ----------------------------------------------------------------------
-proc blt::TreeView::MovePage { w where } {
-
-    # If the focus is already at the top/bottom of the window, we want
-    # to scroll a page. It's really one page minus an entry because we
-    # want to see the last entry on the next/last page.
-    if { [$w index focus] == [$w index view.$where] } {
-        if {$where == "top"} {
-	    $w yview scroll -1 pages
-	    $w yview scroll 1 units
-        } else {
-	    $w yview scroll 1 pages
-	    $w yview scroll -1 units
-        }
-    }
-    update
-
-    # Adjust the entry focus and the view.  Also activate the entry.
-    # just in case the mouse point is not in the widget.
-    $w entry highlight view.$where
-    $w focus view.$where
-    $w see view.$where
-    if { [$w cget -selectmode] == "single" } {
-        $w selection clearall
-        $w selection set focus
-    }
-}
-
-# ----------------------------------------------------------------------
-#
-# NextMatch --
-#
-#	Invoked by KeyPress bindings.  Searches for an entry that
-#	starts with the letter <char> and makes that entry active.
-#
-# ----------------------------------------------------------------------
-proc blt::TreeView::NextMatch { w key } {
-    if {[string match {[ -~]} $key]} {
-	set last [$w index focus]
-	if { $last == "" } {
-	    return;			# No focus. 
-	}
-	set next [$w index next]
-	if { $next == "" } {
-	    set next $last
-	}
-	while { $next != $last } {
-	    set label [$w entry cget $next -label]
-	    set label [string index $label 0]
-	    if { [string tolower $label] == [string tolower $key] } {
-		break
-	    }
-	    set next [$w index -at $next next]
-	}
-	$w focus $next
-	if {[$w cget -selectmode] == "single"} {
-	    $w selection clearall
-	    $w selection set focus
-	}
-	$w see focus
-    }
-}
-
-#------------------------------------------------------------------------
-#
-# InsertText --
-#
-#	Inserts a text string into an entry at the insertion cursor.  
-#	If there is a selection in the entry, and it covers the point 
-#	of the insertion cursor, then delete the selection before 
-#	inserting.
-#
-# Arguments:
-#	w 	Widget where to insert the text.
-#	text	Text string to insert (usually just a single character)
-#
-#------------------------------------------------------------------------
-proc blt::TreeView::InsertText { w text } {
-    if { [string length $text] > 0 } {
-	set index [$w index insert]
-	if { ($index >= [$w index sel.first]) && 
-	     ($index <= [$w index sel.last]) } {
-	    $w delete sel.first sel.last
-	}
-	$w insert $index $text
-    }
-}
-
-#------------------------------------------------------------------------
-#
-# Transpose -
-#
-#	This procedure implements the "transpose" function for entry
-#	widgets.  It tranposes the characters on either side of the
-#	insertion cursor, unless the cursor is at the end of the line.
-#	In this case it transposes the two characters to the left of
-#	the cursor.  In either case, the cursor ends up to the right
-#	of the transposed characters.
-#
-# Arguments:
-#	w 	The entry window.
-#
-#------------------------------------------------------------------------
-proc blt::TreeView::Transpose { w } {
-    set i [$w index insert]
-    if {$i < [$w index end]} {
-	incr i
-    }
-    set first [expr {$i-2}]
-    if {$first < 0} {
-	return
-    }
-    set new [string index [$w get] [expr {$i-1}]][string index [$w get] $first]
-    $w delete $first $i
-    $w insert insert $new
-}
-
-#------------------------------------------------------------------------
-#
-# GetSelection --
-#
-#	Returns the selected text of the entry with respect to the
-#	-show option.
-#
-# Arguments:
-#	w          Entry window from which the text to get
-#
-#------------------------------------------------------------------------
-
-proc blt::TreeView::GetSelection { w } {
-    set text [string range [$w get] [$w index sel.first] \
-                       [expr [$w index sel.last] - 1]]
-    if {[$w cget -show] != ""} {
-	regsub -all . $text [string index [$w cget -show] 0] text
-    }
-    return $text
-}
-
-proc blt::TreeView::EditColumn { w x y } {
-    $w see current
-    if { [winfo exists $w.edit] } {
-	destroy $w.edit
-	return
-    }
-    if { ![$w edit -root -test $x $y] } {
-	return
-    }
-    $w edit -root $x $y
-    update
-    if { [winfo exists $w.edit] } {
-	focus $w.edit
-	$w.edit selection range 0 end
-	grab set $w.edit
-	tkwait window $w.edit
-	grab release $w.edit
-    }
-}
-
-# 
-# ButtonPress assignments
-#
-#	B1-Enter	start auto-scrolling
-#	B1-Leave	stop auto-scrolling
-#	ButtonPress-2	start scan
-#	B2-Motion	adjust scan
-#	ButtonRelease-2 stop scan
-#
-
-bind TreeView <ButtonPress-2> {
-    set blt::TreeView::_privateData(cursor) [%W cget -cursor]
-    %W configure -cursor hand1
-    %W scan mark %x %y
-}
-
-bind TreeView <B2-Motion> {
-    %W scan dragto %x %y
-}
-
-bind TreeView <ButtonRelease-2> {
-    %W configure -cursor $blt::TreeView::_privateData(cursor)
-}
-
-bind TreeView <B1-Leave> {
-    if { $blt::TreeView::_privateData(scroll) } {
-	blt::TreeView::AutoScroll %W 
-    }
-}
-
-bind TreeView <B1-Enter> {
-    after cancel $blt::TreeView::_privateData(afterId)
-    set blt::TreeView::_privateData(afterId) -1
-}
-
-# 
-# KeyPress assignments
-#
-#	Up			
-#	Down
-#	Shift-Up
-#	Shift-Down
-#	Prior (PageUp)
-#	Next  (PageDn)
-#	Left
-#	Right
-#	space		Start selection toggle of entry currently with focus.
-#	Return		Start selection toggle of entry currently with focus.
-#	Home
-#	End
-#	F1
-#	F2
-#	ASCII char	Go to next open entry starting with character.
-#
-# KeyRelease
-#
-#	space		Stop selection toggle of entry currently with focus.
-#	Return		Stop selection toggle of entry currently with focus.
-
-
-bind TreeView <KeyPress-Up> {
-    blt::TreeView::MoveFocus %W up
-    if { $blt::TreeView::_privateData(space) } {
-	%W selection toggle focus
-    }
-}
-
-bind TreeView <KeyPress-Down> {
-    blt::TreeView::MoveFocus %W down
-    if { $blt::TreeView::_privateData(space) } {
-	%W selection toggle focus
-    }
-}
-
-bind TreeView <Shift-KeyPress-Up> {
-    blt::TreeView::MoveFocus %W prevsibling
-}
-
-bind TreeView <Shift-KeyPress-Down> {
-    blt::TreeView::MoveFocus %W nextsibling
-}
-
-bind TreeView <KeyPress-Prior> {
-    blt::TreeView::MovePage %W top
-}
-
-bind TreeView <KeyPress-Next> {
-    blt::TreeView::MovePage %W bottom
-}
-
-bind TreeView <KeyPress-Left> {
-    %W close focus
-}
-bind TreeView <KeyPress-Right> {
-    %W open focus
-    %W see focus -anchor w
-}
-
-bind TreeView <KeyPress-space> {
-    if { [%W cget -selectmode] == "single" } {
-	if { [%W selection includes focus] } {
-	    %W selection clearall
-	} else {
-	    %W selection clearall
-	    %W selection set focus
-	}
-    } else {
-	%W selection toggle focus
-    }
-    set blt::TreeView::_privateData(space) on
-}
-
-bind TreeView <KeyRelease-space> { 
-    set blt::TreeView::_privateData(space) off
-}
-
-bind TreeView <KeyPress-Return> {
-    blt::TreeView::MoveFocus %W focus
-    set blt::TreeView::_privateData(space) on
-}
-
-bind TreeView <KeyRelease-Return> { 
-    set blt::TreeView::_privateData(space) off
-}
-
-bind TreeView <KeyPress> {
-    blt::TreeView::NextMatch %W %A
-}
-
-bind TreeView <KeyPress-Home> {
-    blt::TreeView::MoveFocus %W top
-}
-
-bind TreeView <KeyPress-End> {
-    blt::TreeView::MoveFocus %W bottom
-}
-
-bind TreeView <KeyPress-F1> {
-    %W open -r root
-}
-
-bind TreeView <KeyPress-F2> {
-    eval %W close -r [%W entry children root] 
-}
-
-if {[string equal "x11" [tk windowingsystem]]} {
-    bind TreeView <4> {
-	%W yview scroll -5 units
-    }
-    bind TreeView <5> {
-	%W yview scroll 5 units
-    }
-} else {
-    bind TreeView <MouseWheel> {
-	%W yview scroll [expr {- (%D / 120) * 4}] units
-    }
-}
-
-
-#
-# Differences between id "current" and operation nearest.
-#
-#	set index [$w index current]
-#	set index [$w nearest $x $y]
-#
-#	o Nearest gives you the closest entry.
-#	o current is "" if
-#	   1) the pointer isn't over an entry.
-#	   2) the pointer is over a open/close button.
-#	   3) 
-#
-
-#
-#  Edit mode assignments
-#
-#	ButtonPress-3   Enables/disables edit mode on entry.  Sets focus to 
-#			entry.
-#
-#  KeyPress
-#
-#	Left		Move insertion position to previous.
-#	Right		Move insertion position to next.
-#	Up		Move insertion position up one line.
-#	Down		Move insertion position down one line.
-#	Return		End edit mode.
-#	Shift-Return	Line feed.
-#	Home		Move to first position.
-#	End		Move to last position.
-#	ASCII char	Insert character left of insertion point.
-#	Del		Delete character right of insertion point.
-#	Delete		Delete character left of insertion point.
-#	Ctrl-X		Cut
-#	Ctrl-V		Copy
-#	Ctrl-P		Paste
-#	
-#  KeyRelease
-#
-#	ButtonPress-1	Start selection if in entry, otherwise clear selection.
-#	B1-Motion	Extend/reduce selection.
-#	ButtonRelease-1 End selection if in entry, otherwise use last
-#			selection.
-#	B1-Enter	Disabled.
-#	B1-Leave	Disabled.
-#	ButtonPress-2	Same as above.
-#	B2-Motion	Same as above.
-#	ButtonRelease-2	Same as above.
-#	
-#
-
-
-# Standard Motif bindings:
-
-bind TreeViewEditor <ButtonPress-1> {
-    %W icursor @%x,%y
-    %W selection clear
-}
-
-bind TreeViewEditor <Left> {
-    %W icursor last
-    %W selection clear
-}
-
-bind TreeViewEditor <Right> {
-    %W icursor next
-    %W selection clear
-}
-
-bind TreeViewEditor <Shift-Left> {
-    set new [expr {[%W index insert] - 1}]
-    if {![%W selection present]} {
-	%W selection from insert
-	%W selection to $new
-    } else {
-	%W selection adjust $new
-    }
-    %W icursor $new
-}
-
-bind TreeViewEditor <Shift-Right> {
-    set new [expr {[%W index insert] + 1}]
-    if {![%W selection present]} {
-	%W selection from insert
-	%W selection to $new
-    } else {
-	%W selection adjust $new
-    }
-    %W icursor $new
-}
-
-bind TreeViewEditor <Home> {
-    %W icursor 0
-    %W selection clear
-}
-bind TreeViewEditor <Shift-Home> {
-    set new 0
-    if {![%W selection present]} {
-	%W selection from insert
-	%W selection to $new
-    } else {
-	%W selection adjust $new
-    }
-    %W icursor $new
-}
-bind TreeViewEditor <End> {
-    %W icursor end
-    %W selection clear
-}
-bind TreeViewEditor <Shift-End> {
-    set new end
-    if {![%W selection present]} {
-	%W selection from insert
-	%W selection to $new
-    } else {
-	%W selection adjust $new
-    }
-    %W icursor $new
-}
-
-bind TreeViewEditor <Delete> {
-    if { [%W selection present]} {
-	%W delete sel.first sel.last
-    } else {
-	%W delete insert
-    }
-}
-
-bind TreeViewEditor <BackSpace> {
-    if { [%W selection present] } {
-	%W delete sel.first sel.last
-    } else {
-	set index [expr [%W index insert] - 1]
-	if { $index >= 0 } {
-	    %W delete $index $index
-	}
-    }
-}
-
-bind TreeViewEditor <Control-space> {
-    %W selection from insert
-}
-
-bind TreeViewEditor <Select> {
-    %W selection from insert
-}
-
-bind TreeViewEditor <Control-Shift-space> {
-    %W selection adjust insert
-}
-
-bind TreeViewEditor <Shift-Select> {
-    %W selection adjust insert
-}
-
-bind TreeViewEditor <Control-slash> {
-    %W selection range 0 end
-}
-
-bind TreeViewEditor <Control-backslash> {
-    %W selection clear
-}
-
-bind TreeViewEditor <KeyPress> {
-    blt::TreeView::InsertText %W %A
-}
-
-# Ignore all Alt, Meta, and Control keypresses unless explicitly bound.
-# Otherwise, if a widget binding for one of these is defined, the
-# <KeyPress> class binding will also fire and insert the character,
-# which is wrong.  Ditto for Escape, Return, and Tab.
-
-bind TreeViewEditor <Alt-KeyPress> {
-    # nothing
-}
-
-bind TreeViewEditor <Meta-KeyPress> {
-    # nothing
-}
-
-bind TreeViewEditor <Control-KeyPress> {
-    # nothing
-}
-
-bind TreeViewEditor <Escape> { 
-    %W cancel 
-}
-
-bind TreeViewEditor <Return> { 
-    %W apply 
-}
-
-bind TreeViewEditor <Shift-Return> {
-    blt::TreeView::InsertText %W "\n"
-}
-
-bind TreeViewEditor <KP_Enter> {
-    # nothing
-}
-
-bind TreeViewEditor <Tab> {
-    # nothing
-}
-
-if {![string compare $tcl_platform(platform) "macintosh"]} {
-    bind TreeViewEditor <Command-KeyPress> {
-	# nothing
-    }
-}
-
-# On Windows, paste is done using Shift-Insert.  Shift-Insert already
-# generates the <<Paste>> event, so we don't need to do anything here.
-if { [string compare $tcl_platform(platform) "windows"] != 0 } {
-    bind TreeViewEditor <Insert> {
-	catch {blt::TreeView::InsertText %W [selection get -displayof %W]}
-    }
-}
-
-# Additional emacs-like bindings:
-bind TreeViewEditor <ButtonRelease-3> {
-    set parent [winfo parent %W]
-    %W cancel
-}
-
-bind TreeViewEditor <Control-a> {
-    %W icursor 0
-    %W selection clear
-}
-
-bind TreeViewEditor <Control-b> {
-    %W icursor [expr {[%W index insert] - 1}]
-    %W selection clear
-}
-
-bind TreeViewEditor <Control-d> {
-    %W delete insert
-}
-
-bind TreeViewEditor <Control-e> {
-    %W icursor end
-    %W selection clear
-}
-
-bind TreeViewEditor <Control-f> {
-    %W icursor [expr {[%W index insert] + 1}]
-    %W selection clear
-}
-
-bind TreeViewEditor <Control-h> {
-    if {[%W selection present]} {
-	%W delete sel.first sel.last
-    } else {
-	set index [expr [%W index insert] - 1]
-	if { $index >= 0 } {
-	    %W delete $index $index
-	}
-    }
-}
-
-bind TreeViewEditor <Control-k> {
-    %W delete insert end
-}
-
-if 0 {
-    bind TreeViewEditor <Control-t> {
-	blt::TreeView::Transpose %W
-    }
-    bind TreeViewEditor <Meta-b> {
-	%W icursor [blt::TreeView::PreviousWord %W insert]
-	%W selection clear
-    }
-    bind TreeViewEditor <Meta-d> {
-	%W delete insert [blt::TreeView::NextWord %W insert]
-    }
-    bind TreeViewEditor <Meta-f> {
-	%W icursor [blt::TreeView::NextWord %W insert]
-	%W selection clear
-    }
-    bind TreeViewEditor <Meta-BackSpace> {
-	%W delete [blt::TreeView::PreviousWord %W insert] insert
-    }
-    bind TreeViewEditor <Meta-Delete> {
-	%W delete [blt::TreeView::PreviousWord %W insert] insert
-    }
-    # tkEntryNextWord -- Returns the index of the next word position
-    # after a given position in the entry.  The next word is platform
-    # dependent and may be either the next end-of-word position or the
-    # next start-of-word position after the next end-of-word position.
-    #
-    # Arguments:
-    # w -		The entry window in which the cursor is to move.
-    # start -	Position at which to start search.
-    
-    if {![string compare $tcl_platform(platform) "windows"]}  {
-	proc blt::TreeView::NextWord {w start} {
-	    set pos [tcl_endOfWord [$w get] [$w index $start]]
-	    if {$pos >= 0} {
-		set pos [tcl_startOfNextWord [$w get] $pos]
-	    }
-	    if {$pos < 0} {
-		return end
-	    }
-	    return $pos
-	}
-    } else {
-	proc blt::TreeView::NextWord {w start} {
-	    set pos [tcl_endOfWord [$w get] [$w index $start]]
-	    if {$pos < 0} {
-		return end
-	    }
-	    return $pos
-	}
-    }
-    
-    # PreviousWord --
-    #
-    # Returns the index of the previous word position before a given
-    # position in the entry.
-    #
-    # Arguments:
-    # w -		The entry window in which the cursor is to move.
-    # start -	Position at which to start search.
-    
-    proc blt::TreeView::PreviousWord {w start} {
-	set pos [tcl_startOfPreviousWord [$w get] [$w index $start]]
-	if {$pos < 0} {
-	    return 0
-	}
-	return $pos
-    }
-}
-
diff --git a/blt3.0/library/treeview.xbm b/blt3.0/library/treeview.xbm
deleted file mode 100644
index 9bc935a..0000000
--- a/blt3.0/library/treeview.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define test_width 16
-#define test_height 16
-#define test_x_hot 7
-#define test_y_hot 7
-static unsigned char test_bits[] = {
-   0x00, 0x00, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x64, 0x26,
-   0x66, 0x66, 0x7f, 0xfe, 0x66, 0x66, 0x64, 0x26, 0x60, 0x06, 0x60, 0x06,
-   0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x00, 0x00};
diff --git a/blt3.0/library/treeview_m.xbm b/blt3.0/library/treeview_m.xbm
deleted file mode 100644
index 9ba8767..0000000
--- a/blt3.0/library/treeview_m.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define testm_width 16
-#define testm_height 16
-#define testm_x_hot 7
-#define testm_y_hot 7
-static unsigned char testm_bits[] = {
-   0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfe, 0x7f,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfc, 0x3f, 0xf0, 0x0f,
-   0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f};
diff --git a/blt3.0/man/BLT.mann b/blt3.0/man/BLT.mann
deleted file mode 100644
index 1593029..0000000
--- a/blt3.0/man/BLT.mann
+++ /dev/null
@@ -1,153 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-.so man.macros
-.TH intro n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-BLT \- Introduction to the BLT library
-.BE
-.SH DESCRIPTION
-BLT is a library of extensions to the Tk library.  It adds new
-commands and variables to the application's interpreter.
-.LP
-.SH COMMANDS
-The following commands are added to the interpreter from the BLT library:
-.TP 15
-\fBtable\fR 
-A table geometry manager for Tk.  You specify window placements as table 
-row,column positions and windows can also span multiple rows or columns. 
-It also has many options for setting and/or bounding window sizes.
-.TP 15
-\fBgraph\fR 
-A 2D plotting widget.  Plots two variable data in a window with an optional 
-legend and annotations.   It has of several components; coordinate axes, 
-crosshairs, a legend, and a collection of elements and tags.
-.TP 15
-\fBbarchart\fR 
-A barchart widget.  Plots two-variable data as rectangular bars in a 
-window.  The x-coordinate values designate the position of the bar along 
-the x-axis, while the y-coordinate values designate the magnitude.
-The \fBbarchart\fR widget has of several components; coordinate axes, 
-crosshairs, a legend, and a collection of elements and tags.
-.TP 15
-\fBvector\fR 
-Creates a vector of floating point values.  The vector's components
-can be manipulated in three ways: through a Tcl array variable, a Tcl
-command, or the C API.
-.TP
-\fBspline\fR
-Computes a spline fitting a set of data points (x and y vectors) and
-produces a vector of the interpolated images (y-coordinates) at a
-given set of x-coordinates.
-.TP 15
-\fBbgexec\fR 
-Like Tcl's \fBexec\fR command, \fBbgexec\fR runs a pipeline of Unix 
-commands in the background.  Unlike \fBexec\fR, the output of the last
-process is collected and a global Tcl variable is set upon its completion.
-\fBbgexec\fR can be used with \fBtkwait\fR to wait for Unix commands
-to finish while still handling expose events.  Intermediate output is
-also available while the pipeline is active.
-.TP 15
-\fBbusy\fR 
-Creates a "busy window" which prevents user-interaction when an
-application is busy.  The busy window also provides an easy way 
-to have temporary busy cursors (such as a watch or hourglass).
-.TP 15
-\fBbitmap\fR 
-Reads and writes bitmaps from Tcl.  New X bitmaps can be defined
-on-the-fly from Tcl, obviating the need to copy around bitmap files.  
-Other options query loaded X bitmap's dimensions and data.
-.TP 15
-\fBdrag&drop\fR 
-Provides a drag-and-drop facility for Tk.  Information (represented
-by a token window) can be dragged to and from any Tk window, including
-those of another Tk application.  \fBdrag&drop\fR acts as a 
-coordinator, directing Tk \fBsend\fR commands between (or within) TCL/Tk 
-applications. 
-.TP 15
-\fBhtext\fR 
-A simple hypertext widget.  Combines text and Tk widgets into a single
-scroll-able window.  Tcl commands can be embedded into text, which are
-invoked as the text is parsed.  In addition, Tk widgets can be
-appended to the window at the current point in the text.  \fBHtext\fR
-can be also used to create scrolled windows of Tk widgets.
-.TP 15
-\fBwinop\fR 
-Raise, lower, map, or, unmap any window.  The raise and lower functions
-are useful for stacking windows above or below "busy windows".
-.TP 15
-\fBwatch\fR 
-Arranges for Tcl procedures to be called before and/or after the execution
-of every Tcl command. This command
-may be used in the logging, profiling, or tracing of Tcl code.
-.TP 15
-\fBbltdebug\fR 
-A simple Tcl command tracing facility useful for debugging Tcl code.  
-Displays each Tcl command before and after substitution along its level 
-in the interpreter on standard error.
-.SH VARIABLES
-.PP
-The following Tcl variables are either set or used by BLT at various times
-in its execution:
-.TP 15
-\fBblt_library\fR
-This variable contains the name of a directory containing a library
-of Tcl scripts and other files related to BLT.  Currently, this 
-directory contains the \fBdrag&drop\fR protocol scripts and the 
-PostScript prolog
-used by \fBgraph\fR and \fBbarchart\fR.
-The value of this variable is taken from the BLT_LIBRARY environment
-variable, if one exists, or else from a default value compiled into
-the \fBBLT\fR library.
-.TP 15
-\fBblt_versions\fR 
-This variable is set in the interpreter for each application. It is an 
-array of the current version numbers for each 
-of the BLT commands in the form \fImajor\fR.\fIminor\fR.  \fIMajor\fR and
-\fIminor\fR are integers.  The major version number increases in
-any command that includes changes that are not backward compatible
-(i.e. whenever existing applications and scripts may have to change to
-work with the new release).  The minor version number increases with
-each new release of a command, except that it resets to zero whenever the
-major version number changes.  The array is indexed by the individual 
-command name.
-.SH ADDING BLT TO YOUR APPLICATIONS
-It's easy to add BLT to an existing Tk application.  BLT requires no 
-patches or edits to the Tcl or Tk libraries.  To add BLT, simply add the 
-following code snippet to your application's tkAppInit.c file.  
-.CS
-if (Blt_Init(interp) != TCL_OK) {
-    return TCL_ERROR;
-}
-.CE
-Recompile and link with the BLT library (libBLT.a) and that's it.
-.PP
-Alternately, you can dynamically load BLT, simply by invoking the
-command
-.CS
-package require BLT
-.CE
-from your Tcl script.
-.SH BUGS
-Send bug reports, requests, suggestions, etc. to 
-gah at siliconmetrics.com or ghowlett at grandecom.net
-.SH KEYWORDS
-BLT
diff --git a/blt3.0/man/Blt_Tree.man3 b/blt3.0/man/Blt_Tree.man3
deleted file mode 100644
index 22cf192..0000000
--- a/blt3.0/man/Blt_Tree.man3
+++ /dev/null
@@ -1,232 +0,0 @@
-'\"
-'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
-'\"
-'\" See the file "license.terms" for information on usage and redistribution
-'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\" 
-'\" RCS: @(#) $Id: Blt_Tree.man3,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-'\" 
-.so man.macros
-.TH Blt_Tree 3 BLT_VERSION BLT "Blt Library Procedures"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-Blt_Tree \- Tree data object.
-.SH SYNOPSIS
-.nf
-#include <bltTree.h>
-.sp
-struct Blt_Tree {
-\fBTcl_Alloc\fR(\fIsize\fR)
-.sp
-\fBTcl_Free\fR(\fIptr\fR)
-.sp
-char *
-\fBTcl_Realloc\fR(\fIptr, size\fR)
-.SH ARGUMENTS
-.AS char *size
-.AP int size in
-Size in bytes of the memory block to allocate.
-.AP char *ptr in
-Pointer to memory block to free or realloc.
-.BE
-
-.SH DESCRIPTION
-.PP
-These procedures provide a platform and compiler independent interface
-for memory allocation.  Programs that need to transfer ownership of
-memory blocks between Tcl and other modules should use these routines
-rather than the native \fBmalloc()\fR and \fBfree()\fR routines
-provided by the C run-time library.
-.PP
-\fBTcl_Alloc\fR returns a pointer to a block of at least \fIsize\fR
-bytes suitably aligned for any use.
-.PP
-\fBTcl_Free\fR makes the space referred to by \fIptr\fR available for
-further allocation.
-.PP
-\fBTcl_Realloc\fR changes the size of the block pointed to by
-\fIptr\fR to \fIsize\fR bytes and returns a pointer to the new block.
-The contents will be unchanged up to the lesser of the new and old
-sizes.  The returned location may be different from \fIptr\fR.
-.SH TREE OBJECT ROUTINES
-The following library routines allow you to create and destroy tree
-objects.  Each tree object has a name that uniquely identifies it.
-Tree objects can also be shared.  For example, the \fBtree\fR
-and \fBhiertable\fR commands may access the same tree data object.
-Each client grabs a token associated with the tree.  When all tokens
-are released the tree data object is automatically destroyed.
-.TP 2.0i 
-\fBBlt_TreeCreate\fR
-Create a tree data object and optionally obtains a token associated
-with it.
-.TP
-\fBBlt_TreeExists\fR
-Indicates if a tree by a given name exists.
-.TP
-\fBBlt_TreeGetToken\fR
-Obtains a token for an existing tree data object.
-.TP
-\fBBlt_TreeReleaseToken\fR
-Releases a token for a tree data object.  The tree object is deleted
-when all outstanding tokens have been released.
-.TP
-\fBBlt_TreeName\fR
-Returns the name of the tree object.
-.TP
-\fBBlt_TreeChangeRoot\fR
-Specifies a node as the new root to a tree.
-.SH TREENODE ROUTINES
-Tree objects initially contain only a root node. You can add or
-delete nodes with the following routines.
-.TP 2i
-\fBBlt_TreeCreateNode\fR
-Creates a new child node for a given parent in the tree.  
-.TP
-\fBBlt_TreeDeleteNode\fR
-Deletes a node and its children.
-.TP
-\fBBlt_TreeNodeId\fR
-Returns the unique node identifier for a node.
-.TP
-\fBBlt_TreeGetNode\fR
-Gets a node based upon its identifier.
-.TP
-\fBBlt_TreeFindChild\fR
-Searches for a child node given by its label in a parent node.
-.TP
-\fBBlt_TreeNodeLabel\fR
-Returns the current label for a node.
-.TP
-\fBBlt_TreeRelabelNode\fR
-Resets a node's label.
-.TP
-\fBBlt_TreeNodePath\fR
-Returns the fullpath to a node.
-.TP
-\fBBlt_TreeNodeDepth\fR
-Returns the depth of the node.  
-.TP
-\fBBlt_TreeNodeDegree\fR
-Returns the number of children for a node.
-.TP
-\fBBlt_TreeIsLeaf\fR
-Indicates if a node has no children.
-.TP
-\fBBlt_TreeIsBefore\fR
-Indicates if a node is before another node in depth-first search order.
-.TP
-\fBBlt_TreeIsAncestor\fR
-Indicates if a node is an ancestor or another.
-.TP
-\fBBlt_TreeSortNode\fR
-Sorts the children of a node.
-.TP
-\fBBlt_TreeSize\fR
-Returns the number of nodes in a node and its descendants.
-.TP
-\fBBlt_TreeMoveNode\fR
-.SH NODE NAVIGATION
-Each node can have zero or more children nodes.  These routines
-let you navigate the tree hierarchy.
-.TP 2i
-\fBBlt_TreeNodeParent\fR
-Returns the parent node. 
-.TP
-\fBBlt_TreeFirstChild\fR
-Returns the first child of a parent node.
-.TP
-\fBBlt_TreeLastChild\fR
-Returns the last child of a parent node.
-.TP
-\fBBlt_TreeNextSibling\fR
-Returns the next sibling node in the parent's list of children.
-.TP
-\fBBlt_TreePrevSibling\fR
-Returns the previous sibling node in the parent's list of children.
-.TP
-\fBBlt_TreeRootNode\fR
-Returns the root node of the tree.
-.TP
-\fBBlt_TreeNextNode\fR
-Returns the next node in depth-first order.
-.TP
-\fBBlt_TreePrevNode\fR 
-Returns the previous node in depth-first order.
-.TP
-\fBBlt_TreeEndNode\fR
-Returns the last node in the tree as determined by depth-first order.
-.TP
-\fBBlt_TreeApply\fR
-Walks through a node and all it descendants, applying a given
-callback procedure.
-.TP
-\fBBlt_TreeApplyDFS\fR
-Walks through a node and all it descendants in depth-first search
-order, applying a given callback procedure.
-.TP
-\fBBlt_TreeApplyBFS\fR
-Walks through a node and all it descendants in breadth-first search
-order, applying a given callback procedure.
-.SH NODE DATA VALUES
-Data values can be stored at any node.  Values have by both a string
-key and a Tcl_Obj value.  Data value keys do not have to be homogenous 
-across all nodes (i.e. nodes do not have to contain the same keys).  
-There is also a special node array data type.
-.TP 2i
-\fBBlt_TreeGetValue\fR
-Gets the node data value given by a key.
-.TP
-\fBBlt_TreeValueExists\fR
-Indicates if a node data value given by a key exists.
-.TP
-\fBBlt_TreeSetValue\fR
-Sets a node's value of a key.
-.TP
-\fBBlt_TreeUnsetValue\fR
-Remove the node data value and key.
-.TP
-\fBBlt_TreeGetArrayValue\fR 
-Gets the node data array value given by a key and an array index.
-.TP
-\fBBlt_TreeSetArrayValue\fR
-Sets the node data array value given by a key and an array index.
-.TP
-\fBBlt_TreeUnsetArrayValue\fR
-Remove the node data array value.
-.TP
-\fBBlt_TreeArrayValueExists\fR
-Determines if an array element by a given index exists.
-.TP
-\fBBlt_TreeFirstKey\fR
-Returns the key of the first value in the node. 
-.TP
-\fBBlt_TreeNextKey\fR
-Returns the key of the next value in the node.
-.TP
-\fBBlt_TreePrivateValue\fR
-Lock the value to current client, making it private.
-.TP
-\fBBlt_TreePublicValue\fR
-Unlock the value so that all clients can access it.
-.TP
-\fBBlt_TreeGetKey\fR 
-.SH NODE TRACES
-.TP 2i
-\fBBlt_TreeCreateTrace\fR
-Sets up a trace callback to be invoked when the node value is
-read, set, or unset.
-.TP 
-\fBBlt_TreeDeleteTrace\fR
-Deletes an existing trace.
-.SH NODE EVENTS
-.TP 2i
-\fBBlt_TreeCreateEventHandler\fR
-Sets up a callback to be invoked when events (create, delete, 
-relabel, etc) take place on a node.
-.TP
-\fBBlt_TreeDeleteEventHandler\fR 
-Deletes an existing node callback.
-.SH KEYWORDS
-alloc, allocation, free, malloc, memory, realloc
-
diff --git a/blt3.0/man/Blt_TreeCreate.man3 b/blt3.0/man/Blt_TreeCreate.man3
deleted file mode 100644
index fd45537..0000000
--- a/blt3.0/man/Blt_TreeCreate.man3
+++ /dev/null
@@ -1,100 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeCreate 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeCreate \- Create tree data object.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-int 
-\fBBlt_TreeCreate\fR(\fIinterp\fR, \fIname\fR, \fItokenPtr\fR)
-.SH ARGUMENTS
-.AS Tcl_Interp *interp
-.AP Tcl_Interp *interp in
-Interpreter to report results back to.  
-.AP "const char" *name  in
-Name of the new tree.  Can be qualified by a namespace.
-.AP Blt_Tree *tokenPtr out
-If not NULL, points to location to store the client tree token.
-.BE
-.SH DESCRIPTION
-.PP
-This procedure creates a C-based tree data object and optionally
-returns a token to it.  The arguments are as follows:
-.TP 1i
-\fIinterp\fR
-Interpreter to report results back to.  If an error occurs, then
-interp->result will contain an error message.
-.TP 1i
-\fIname\fR
-Name of the new tree object.  You can think of \fIname\fR as
-the memory address of the object.  It's a unique name that identifies
-the tree object.  No tree object \fIname\fR
-can already exist.  \fIName\fR can be qualified by a namespace such
-as \f(CWfred::myTree\fR.  If no namespace qualifier is used, the tree
-will be created in the current namespace, not the global namespace.
-If a qualifier is present, the namespace must already exist.
-.TP 1i
-\fItokenPtr\fR
-Holds the returned token.  \fITokenPtr\fR points to a location
-where it is stored. Tree tokens are used to work with the tree object.  
-If NULL, no token is allocated.  You can later use 
-\fBTcl_TreeGetToken\fR to obtain a token.
-.PP
-The new tree data object created will initially contain only a root
-node.  You can add new nodes with \fBBlt_TreeCreateNode\fR.
-.PP
-Optionally a token for the tree data object is returned.  Tree data
-objects can be shared.  For example, the \fBtree\fR and
-\fBhiertable\fR commands may be accessing the same tree data object.
-Each client grabs a token that is associated with the tree.  When all
-tokens are released (see \fBBlt_TreeReleaseToken\fR) the tree data
-object is automatically destroyed.
-.PP
-.SH RETURNS
-A standard Tcl result is returned.  If TCL_ERROR is returned, then
-\fIinterp->result\fR will contain an error message.  The following
-errors may occur:
-.IP \(bu 3
-There already exists a tree by the same name as \fIname\fR. You can
-use \fBTcl_TreeExists\fR to determine if a tree exists beforehand.
-.IP \(bu
-The tree name is prefixed by a namespace that doesn't exist.  If you
-qualified the tree name with a namespace, the namespace must exist.
-Unlike Tcl procs and variables, the namespace is not automatically
-created for you.
-.IP \(bu
-Memory can't be allocated for the tree or token.
-.SH EXAMPLE
-The following example creates a new 
-.CS
-Blt_Tree token;
-
-if (Blt_TreeCreate(interp, "myTree", &token) != TCL_OK) {
-    return TCL_ERROR;
-}
-printf("tree is %s\\n", Blt_TreeName(token));
-.CE
-.SH KEYWORDS
-Tcl_TreeGetToken, Tcl_TreeExists, Tcl_TreeReleaseToken
diff --git a/blt3.0/man/Blt_TreeCreateNode.man3 b/blt3.0/man/Blt_TreeCreateNode.man3
deleted file mode 100644
index 2e8b6bb..0000000
--- a/blt3.0/man/Blt_TreeCreateNode.man3
+++ /dev/null
@@ -1,95 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeCreateNode 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeCreateNode \- Creates a node in a tree data object.
-.SH SYNOPSIS
-.nf
-#include <bltTree.h>
-.sp
-Blt_TreeNode
-\fBBlt_TreeCreateNode\fR(\fItree\fR, \fIparent\fR, \fIname\fR, \fIposition\fR)
-.SH ARGUMENTS
-.AS Blt_TreeNode parent
-.AP Blt_Tree tree in
-Tree containing the parent node.
-.AP Blt_TreeNode parent in
-Node in which to insert the new child.
-.AP "const char" *name  in
-Node label.  If NULL, a label will automatically be generated.
-.AP int position in
-Position in the parent's list of children to insert the new node.
-.BE
-.SH DESCRIPTION
-.PP
-This procedure creates a new node is a tree data object.  The node
-is initially empty, but data values can be added with
-\fBBlt_TreeSetValue\fR.  Each node has a serial number that identifies it
-within the tree.  No two nodes in the same tree will ever have the
-same ID.  You can find a node's ID with \fBBlt_TreeNodeId\fR.
-.PP
-The arguments are as follows:
-.TP 1i
-\fItree\fR
-The tree containing the parent node.
-.TP 
-\fIparent\fR
-Node in which the new child will be inserted. 
-.TP 
-\fIname\fR
-Label of the new node.  If \fIname\fR is NULL, a label in the
-form "\f(CWnode0\fR", "\f(CWnode1\fR", etc. will automatically be
-generated.  \fIName\fR can be any string.  Labels are non-unique.  A
-parent can contain two nodes with the same label. Nodes can be
-relabeled using \fBBlt_TreeRelabelNode\fR.
-.TP 
-\fIposition\fR
-Position the parent's list of children to insert the new node.  For
-example, if \fIposition\fR is 0, then the new node is prepended to the
-beginning of the list.  If \fIposition\fR is -1, then the node is
-appended onto the end of the parent's list.  
-.PP
-.SH RETURNS
-The new node returned is of type \fBBlt_TreeNode\fR.  It's a token
-that can be used with other routines to add/delete data values or
-children nodes.
-.SH EXAMPLE
-The following example creates a new node from the root node.
-.CS
-Blt_Tree token;
-Blt_TreeNode root, node;
-
-if (Blt_TreeGetToken(interp, "myTree", &token) != TCL_OK) {
-    return TCL_ERROR;
-}
-root = Blt_TreeRootNode(token);
-node = Blt_TreeCreateNode(token, root, "myNode", -1);
-.CE
-.SH NOTIFICATIONS
-\fBBlt_TreeCreateNode\fR can trigger tree notify events.
-You can be notified whenever a node is created by using the 
-\fBBlt_TreeCreateNotifyHandler\fR.  A callback routine is registered
-that will be automatically invoked whenever a new node is added
-via \fBBlt_TreeCreateNode\fR to the tree.
-.SH KEYWORDS
-tree, token
diff --git a/blt3.0/man/Blt_TreeDeleteNode.man3 b/blt3.0/man/Blt_TreeDeleteNode.man3
deleted file mode 100644
index 565c5ec..0000000
--- a/blt3.0/man/Blt_TreeDeleteNode.man3
+++ /dev/null
@@ -1,75 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeDeleteNode 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeDeleteNode \- Deletes a node and its descendants.
-.SH SYNOPSIS
-.nf
-#include <bltTree.h>
-.sp
-Blt_TreeNode
-\fBBlt_TreeDeleteNode\fR(\fItree\fR, \fInode\fR)
-.SH ARGUMENTS
-.AS Blt_TreeNode node
-.AP Blt_Tree tree in
-Tree containing the node.
-.AP Blt_TreeNode node in
-Node to be deleted.
-.BE
-.SH DESCRIPTION
-This procedure deletes a given node and all it descendants from a tree
-data object.  
-.PP
-The arguments are as follows:
-.TP 1i
-\fItree\fR
-The tree containing the parent node.
-.TP 
-\fInode\fR
-Node to be deleted.  The node and its descendant nodes are deleted.
-Each node's data values are deleted also.   The reference count of
-the Tcl_Obj is decremented.
-.PP
-Since all tree objects must contain at least a root node, the root
-node itself can't be deleted unless the tree is released and
-destroyed. Therefore you can clear a tree by deleting its root, but
-the root node will remain until the tree is destroyed.
-.SH RETURNS
-Always returns TCL_OK.  Errors generated in a notification callbacks
-are backgrounded (see \fBTcl_TreeCreateNotifyHandler\fR).
-.SH EXAMPLE
-The following example deletes the root node.
-.CS
-Blt_TreeNode root;
-
-root = Blt_TreeRootNode(token);
-Blt_TreeDeleteNode(token, root);
-.CE
-.SH NOTIFICATIONS
-\fBBlt_TreeDeleteNode\fR can trigger tree notify events.
-You can be notified whenever a node is deleted by using the 
-\fBBlt_TreeCreateNotifyHandler\fR.  A callback routine is registered
-that will be automatically invoked whenever a node is deleted
-via \fBBlt_TreeDeleteNode\fR to the tree.
-.SH KEYWORDS
-tree, token
diff --git a/blt3.0/man/Blt_TreeExists.man3 b/blt3.0/man/Blt_TreeExists.man3
deleted file mode 100644
index 70b257a..0000000
--- a/blt3.0/man/Blt_TreeExists.man3
+++ /dev/null
@@ -1,66 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeExists 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeExists \- Indicates if a tree exists.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-int 
-\fBBlt_TreeExists\fR(\fIinterp\fR, \fIname\fR)
-.SH ARGUMENTS
-.AS Tcl_Interp *interp
-.AP Tcl_Interp *interp in
-Interpreter to determine current namespace context.
-.AP "const char" *name  in
-Name of an existing tree data object.  Can be qualified by a namespace.
-.BE
-.SH DESCRIPTION
-.PP
-This procedure determines if a C-based tree data object exists by
-a given name. The arguments are as follows:
-.TP 1i
-interp
-Used the determine the current namespace context.
-.TP 1i
-name 
-Name of an existing tree data object.  \fIName\fR can be qualified by
-a namespace such as \f(CWfred::myTree\fR.  If no namespace qualifier
-is used, the current namespace is searched, then the global namespace.
-.PP
-.SH RETURNS
-A boolean result is returned.  If the tree exists 1 is returned,
-0 otherwise.
-.SH EXAMPLE
-The following example checks if a tree "myTree" exists.
-.CS
-.ft CW
-if (!Blt_TreeExists(interp, "myTree")) {
-    fprintf(stderr, "can't find tree \\"myTree\\\\n");
-}
-.ft R
-.CE
-.SH KEYWORDS
-tree, token
-Tcl_TreeCreate, Tcl_TreeGetToken, Tcl_TreeReleaseToken
\ No newline at end of file
diff --git a/blt3.0/man/Blt_TreeGetNode.man3 b/blt3.0/man/Blt_TreeGetNode.man3
deleted file mode 100644
index 16be9c3..0000000
--- a/blt3.0/man/Blt_TreeGetNode.man3
+++ /dev/null
@@ -1,69 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeGetNode 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeGetNode \- Finds the node from the ID.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-Blt_TreeNode
-\fBBlt_TreeGetNode\fR(\fItree\fR, \fInumber\fR)
-.SH ARGUMENTS
-.AS "unsigned int" number
-.AP Blt_Tree tree in
-Tree containing the requested node.
-.AP "unsigned int" number in
-Serial number of the requested node.  
-.BE
-.SH DESCRIPTION
-This procedure returns a node in a tree object 
-based upon a give serial number.  
-The node is searched using the serial number.  
-.PP
-The arguments are as follows:
-.TP 1i
-\fItree\fR
-The tree containing the requested node.
-.TP 1i
-\fInumber\fR
-The serial number of the requested node.
-.SH RETURNS
-The node represented by the given serial number is returned.  If no
-node with that ID exists in \fItree\fR then NULL is returned.
-.SH EXAMPLE
-The following example gets the node from a serial number.
-.CS
-unsigned int number;
-Blt_TreeNode node;
-Blt_TreeToken token;
-...
-node = Blt_TreeGetNode(token, number);
-if (node == NULL) {
-    printf("no node with ID %d exists\\n", number);
-} else {
-    printf("node found: label is %s\\n", Blt_TreeNodeLabel(node));
-}
-.CE
-.SH KEYWORDS
-Tcl_TreeCreateNode, Tcl_TreeDeleteNode
diff --git a/blt3.0/man/Blt_TreeGetToken.man3 b/blt3.0/man/Blt_TreeGetToken.man3
deleted file mode 100644
index e685db9..0000000
--- a/blt3.0/man/Blt_TreeGetToken.man3
+++ /dev/null
@@ -1,88 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeGetToken 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeGetToken \- Grabs a token associated with existing tree data object.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-int 
-\fBBlt_TreeGetToken\fR(\fIinterp\fR, \fIname\fR, \fItokenPtr\fR)
-.SH ARGUMENTS
-.AS Tcl_Interp *interp
-.AP Tcl_Interp *interp in
-Interpreter to report results back to.  
-.AP "const char" *name  in
-Name of an existing tree data object.  Can be qualified by a namespace.
-.AP Blt_Tree *tokenPtr out
-Points to location to store the client tree token.
-.BE
-.SH DESCRIPTION
-.PP
-This procedure obtains a token to a C-based tree data object.  The
-arguments are as follows:
-.TP 1i
-\fIinterp\fR
-Interpreter to report results back to.  If an error occurs, then
-interp->result will contain an error message.
-.TP 1i
-\fIname\fR
-Name of an existing tree data object.  It's an error if a tree
-\fIname\fR doesn't already exist.  \fIName\fR can be qualified by 
-a namespace such as \f(CWfred::myTree\fR.  If no namespace qualifier 
-is used, the tree the current namespace is searched, then the global
-namespace. 
-.TP 1i
-\fItokenPtr\fR
-Points to the location where the returned token is stored. A tree
-token is used to work with the tree object.  
-.PP
-A token for the tree data object is returned.  Tree data objects can
-be shared.  For example, the \fBtree\fR and \fBhiertable\fR commands
-may be accessing the same tree data object.  Each client grabs a token
-that is associated with the tree.  When all tokens are released (see
-\fBBlt_TreeReleaseToken\fR) the tree data object is automatically
-destroyed.
-.PP
-.SH RETURNS
-A standard Tcl result is returned.  If TCL_ERROR is returned, then
-\fIinterp->result\fR will contain an error message.  The following errors
-may occur:
-.IP \(bu 3
-No tree exists as \fIname\fR. You can use \fBTcl_TreeExists\fR to
-determine if a tree exists beforehand.
-.IP \(bu
-Memory can't be allocated for the token.
-.SH EXAMPLE
-The following example allocated a token for an existing tree.
-.CS
-Blt_Tree token;
-
-if (Blt_TreeGetToken(interp, "myTree", &token) != TCL_OK) {
-    return TCL_ERROR;
-}
-printf("tree is %s\\n", Blt_TreeName(token));
-.CE
-.SH SEE ALSO
-Tcl_TreeCreate, Tcl_TreeExists, Tcl_TreeReleaseToken
diff --git a/blt3.0/man/Blt_TreeName.man3 b/blt3.0/man/Blt_TreeName.man3
deleted file mode 100644
index 04dca8d..0000000
--- a/blt3.0/man/Blt_TreeName.man3
+++ /dev/null
@@ -1,59 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeName 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeName \- Returns the name of the tree data object.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-char *
-\fBBlt_TreeName\fR(\fItree\fR)
-.SH ARGUMENTS
-.AS Blt_Tree tree 
-.AP Blt_Tree tree in
-Token for the tree object. 
-.BE
-.SH DESCRIPTION
-.PP
-This procedure returns the name of the C-based tree data object.
-The arguments are as follows:
-.TP 1i
-\fItree\fR
-Token for the tree object.  The token must have been previously 
-obtained via \fBBlt_TreeGetToken\fR or \fBBlt_TreeCreate\fR.
-.SH RETURNS
-The name of the tree object is returned.  The name will be fully
-qualified with a namespace context.
-.SH EXAMPLE
-The following example prints the name of the new tree. 
-.CS
-Blt_Tree token;
-
-if (Blt_TreeCreate(interp, NULL, &token) != TCL_OK) {
-    return TCL_ERROR;
-}
-printf("tree is %s\\n", Blt_TreeName(token));
-.CE
-.SH KEYWORDS
-Tcl_TreeGetToken, Tcl_TreeExists, Tcl_TreeReleaseToken
diff --git a/blt3.0/man/Blt_TreeNodeId.man3 b/blt3.0/man/Blt_TreeNodeId.man3
deleted file mode 100644
index 44fc4ef..0000000
--- a/blt3.0/man/Blt_TreeNodeId.man3
+++ /dev/null
@@ -1,58 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeNodeId 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeNodeId \- Returns the node serial number.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-unsigned int
-\fBBlt_TreeNodeId\fR(\fInode\fR)
-.SH ARGUMENTS
-.AS Blt_TreeNode node 
-.AP Blt_TreeNode node in
-Node whose ID is to be returned.  
-.BE
-.SH DESCRIPTION
-This procedure returns the node serial number.  The node serial number
-is useful for programs that export the tree data object to the Tcl
-programming level.  Since node labels (and therefore pathnames) are
-not unique, the ID can be used to uniquely identify a node.  
-.PP
-The arguments are as follows:
-.TP 1i
-\fInode\fR
-The node whose serial number is returned.  The serial number of 
-the root node for example is always 0.
-.SH RETURNS
-The serial number of the node.  Nodes are given a unique serial number
-when they are created.  You can use the ID to later retrieve the node
-using \fBBlt_TreeGetNode\fR.  
-.SH EXAMPLE
-The following example prints the ID of a node. 
-.CS
-printf("root ID is %s\\n", Blt_TreeNodeId(node));
-.CE
-.SH KEYWORDS
-Tcl_TreeCreateNode, Tcl_TreeDeleteNode
diff --git a/blt3.0/man/Blt_TreeReleaseToken.man3 b/blt3.0/man/Blt_TreeReleaseToken.man3
deleted file mode 100644
index e0bd7c3..0000000
--- a/blt3.0/man/Blt_TreeReleaseToken.man3
+++ /dev/null
@@ -1,64 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH Blt_TreeReleaseToken 3 BLT_VERSION BLT "BLT Library Procedures"
-.BS
-.SH NAME
-Blt_TreeReleaseToken \- Releases token associated with tree object.
-.SH SYNOPSIS
-.nf
-\fB#include <bltTree.h>\fR
-.sp
-int 
-\fBBlt_TreeReleaseToken\fR(\fItoken\fR)
-.SH ARGUMENTS
-.AS Blt_Tree token
-.AP Blt_Tree *token in
-Token of tree to be released.
-.BE
-.SH DESCRIPTION
-.PP
-This procedure releases the token associated with a C-based tree data
-object.  When all outstanding tokens for a tree data object have been
-released, then the data object itself will be freed.  The arguments
-are as follows:
-.TP 1i
-token
-Token of the tree data object to be released.  This token was 
-initialized either by \fBTcl_TreeGetToken\fI or \fIBlt_TreeCreate\fR
-earlier.
-.SH RETURNS
-Nothing.  
-.SH EXAMPLE
-The following example creates and then releases a new token.
-.CS
-Blt_Tree token;
-
-if (Blt_TreeCreate(interp, "myTree", &token) != TCL_OK) {
-    return TCL_ERROR;
-}
-printf("tree is %s\\n", Blt_TreeName(token));
-
-/* Tree will be destroyed when the token is released. */
-Blt_TreeReleaseToken(token);
-.CE
-.SH KEYWORDS
-tree, token
diff --git a/blt3.0/man/Makefile.in b/blt3.0/man/Makefile.in
deleted file mode 100644
index f7eacf6..0000000
--- a/blt3.0/man/Makefile.in
+++ /dev/null
@@ -1,75 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for manual page files 
-# ------------------------------------------------------------------------
-
-prefix =	@prefix@
-mandir =	@mandir@
-sectiondir =	$(mandir)/mann
-srcdir =	@srcdir@
-datadir =	@datadir@
-datarootdir =	@datarootdir@
-version =	@BLT_VERSION@
-
-instdirs =	$(mandir) $(mandir)/mann $(mandir)/man3
-
-MAN_N =		BLT.n barchart.n beep.n bgexec.n bitmap.n \
-		bltdebug.n busy.n container.n cutbuffer.n \
-		dragdrop.n eps.n graph.n hierbox.n  \
-		hiertable.n htext.n spline.n stripchart.n \
-	 	table.n tabset.n tile.n tree.n treeview.n vector.n \
-		watch.n winop.n
-
-MAN_3 =		Blt_Tree.3 Blt_TreeGetNode.3 \
-		Blt_TreeCreate.3 Blt_TreeGetToken.3 \
-		Blt_TreeCreateNode.3 Blt_TreeName.3 \
-		Blt_TreeDeleteNode.3 Blt_TreeNodeId.3 \
-		Blt_TreeExists.3 Blt_TreeReleaseToken.3
-
-MANPAGES =	$(MAN_N) $(MAN_3)
-
-INSTALL =	@INSTALL@
-INSTALL_DATA =	@INSTALL_DATA@
-SHELL =		/bin/sh
-RM =		rm -rf
-VPATH =		$(srcdir)
-
-all: man.macros $(MANPAGES)
-
-install: mkdirs install-mann install-man3
-
-install-mann: $(MAN_N)
-	for i in *.n ; do \
-		$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann; \
-	done
-
-install-man3: $(MAN_3)
-	for i in *.3 ; do \
-		$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3; \
-	done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(DESTDIR)$$i ; then \
-            : ; \
-          else \
-            echo " mkdir -p $(DESTDIR)$$i" ; \
-            mkdir -p $(DESTDIR)$$i ; \
-          fi ; \
-	done
-
-.SUFFIXES: .n .mann .3 .man3
-
-.man3.3: $(srcdir)/man.macros
-	$(RM) $@
-	sed -e "/man\.macros/r $(srcdir)/man.macros" -e '/man\.macros/d'  -e 's/BLT_VERSION/$(version)/' $< > $@
-
-.mann.n: $(srcdir)/man.macros
-	$(RM) $@
-	sed -e "/man\.macros/r $(srcdir)/man.macros" -e '/man\.macros/d' -e 's/BLT_VERSION/$(version)/' $< > $@
-
-clean:
-	$(RM) *.3 *.n
-
-distclean: clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* Makefile
-
diff --git a/blt3.0/man/barchart.mann b/blt3.0/man/barchart.mann
deleted file mode 100644
index ec2b5f4..0000000
--- a/blt3.0/man/barchart.mann
+++ /dev/null
@@ -1,2236 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Barchart widget created by Sani Nassif and George Howlett.
-'\"
-.so man.macros
-.TH barchart n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-barchart \-  Bar chart for plotting X-Y coordinate data.
-.SH SYNOPSIS
-\fBbarchart\fI \fIpathName \fR?\fIoption value\fR?...
-.BE
-.SH DESCRIPTION
-The \fBbarchart\fR command creates a bar chart for plotting
-two-dimensional data (X-Y coordinates). A bar chart is a graphic means
-of comparing numbers by displaying bars of lengths proportional to the
-y-coordinates of the points they represented.  The bar chart has many
-configurable components: coordinate axes, elements, legend, grid
-lines, cross hairs, etc.  They allow you to customize the look and
-feel of the graph.
-.SH INTRODUCTION
-The \fBbarchart\fR command creates a new window for plotting
-two-dimensional data (X-Y coordinates), using bars of
-various lengths to represent the data points.  The bars are drawn in a
-rectangular area displayed in the center of the new window.  This is the
-\fIplotting area\fR.  The coordinate axes are drawn in
-the margins surrounding the plotting area.  By default, the legend is
-drawn in the right margin.  The title is displayed in top margin.
-.PP
-A \fBbarchart\fR widget has several configurable components:
-coordinate axes, data elements, legend, grid, cross hairs, pens,
-postscript, and annotation markers.  Each component can be queried or
-modified.
-.TP 1i
-\f(CWaxis\fR 
-
-Up to four coordinate axes (two X\-coordinate and two Y\-coordinate
-axes) can be displayed, but you can create and use any number of
-axes. Axes control what region of data is displayed and how the data
-is scaled. Each axis consists of the axis line, title, major and minor
-ticks, and tick labels. Tick labels display the value at each major
-tick.
-.TP 1i
-\f(CWcrosshairs\fR 
-Cross hairs are used to position the mouse pointer relative to the X
-and Y coordinate axes. Two perpendicular lines, intersecting at the
-current location of the mouse, extend across the plotting area to the
-coordinate axes.
-.TP 1i
-\f(CWelement\fR 
-An element represents a set of data to be plotted.  It contains an x
-and y vector of values representing the data points.  Each
-data point is displayed as a bar where the length of the bar is
-proportional to the ordinate (Y-coordinate) of the data point.
-The appearance of the bar, such as its color, stipple, or relief
-is configurable.
-.sp
-A special case exists when two or more data points have the same
-abscissa (X-coordinate).  By default, the bars are overlayed, one on
-top of the other.  The bars are drawn in the order of the element
-display list.  But you can also configure the bars to be displayed in
-two other ways.  They may be displayed as a stack, where each bar
-(with the same abscissa) is stacked on the previous.  Or they can be
-drawn side-by-side as thin bars.  The width of each bar is a function
-of the number of data points with the same abscissa.
-.TP 1i
-\f(CWgrid\fR
-Extends the major and minor ticks of the X\-axis and/or Y\-axis across the 
-plotting area. 
-.TP 1i
-\f(CWlegend\fR 
-The legend displays the name and symbol of each data element. 
-The legend can be drawn in any margin or in the plotting area.
-.TP 1i
-\f(CWmarker\fR
-Markers are used annotate or highlight areas of the graph. For
-example, you could use a text marker to label a particular data
-point. Markers come in various forms: text strings, bitmaps, connected
-line segments, images, polygons, or embedded widgets.
-.TP 1i
-\f(CWpen\fR 
-Pens define attributes for elements.  Data elements use pens to
-specify how they should be drawn.  A data element may use many pens at
-once.  Here the particular pen used for a data point is determined
-from each element's weight vector (see the element's \fB\-weight\fR
-and \fB\-style\fR options).
-.TP 1i
-\f(CWpostscript\fR
-The widget can generate encapsulated PostScript output. This component
-has several options to configure how the PostScript is generated.
-.SH SYNTAX
-.DS
-\fBbarchart \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBbarchart\fR command creates a new window \fIpathName\fR and makes
-it into a \fBbarchart\fR widget.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.  Additional options may be specified on the
-command line or in the option database to configure aspects of the
-graph such as its colors and font.  See the \fBconfigure\fR operation
-below for the exact details about what \fIoption\fR and \fIvalue\fR
-pairs are valid.
-.PP
-If successful, \fBbarchart\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to invoke various operations that query or modify the graph.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for the graph are described in 
-the 
-.SB "BARCHART OPERATIONS"
-section.
-.PP
-The command can also be used to access components of the graph.
-.DS
-\fIpathName component operation\fR ?\fIarg\fR?...
-.DE
-The operation, now located after the name of the component, is the
-function to be performed on that component. Each component has its own
-set of operations that manipulate that component.  They will be
-described below in their own sections.
-.SH EXAMPLE
-The \fBbarchart\fR command creates a new bar chart.  
-.CS
-# Create a new bar chart.  Plotting area is black.
-barchart .b -plotbackground black
-.CE
-A new Tcl command \f(CW.b\fR is created.  This command can be used
-to query and modify the bar chart.  For
-example, to change the title of the graph to "My Plot", you use the
-new command and the \fBconfigure\fR operation.
-.CS
-# Change the title.
-\&.b configure -title "My Plot"
-.CE
-To add data elements, you use the command and the \fBelement\fR component.
-.CS
-# Create a new element named "e1"
-\&.b element create e1 \\
-	-xdata { 1 2 3 4 5 6 7 8 9 10 } \\
-	-ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 
-		155.85 166.60 175.38 }
-.CE
-The element's X-Y coordinates are specified using lists of
-numbers.  Alternately, BLT vectors could be used to hold the X-Y
-coordinates.
-.CS
-# Create two vectors and add them to the barchart.
-vector xVector yVector
-xVector set { 1 2 3 4 5 6 7 8 9 10 }
-yVector set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 
-	166.60 175.38 }
-\&n.b element create e1 -xdata xVector -ydata yVector
-.CE
-The advantage of using vectors is that when you modify one, the graph
-is automatically redrawn to reflect the new values.
-.CS
-# Change the y coordinate of the first point.
-set yVector(0) 25.18
-.CE
-An element named \f(CWe1\fR is now created in \f(CW.b\fR.  It 
-is automatically added to the display list of elements.  You can
-use this list to control in what order elements are displayed.
-To query or reset the element display list, you use the element's 
-\fBshow\fR operation.
-.CS
-# Get the current display list 
-set elemList [.b element show]
-# Remove the first element so it won't be displayed.
-\&.b element show [lrange $elemList 0 end]
-.CE
-The element will be displayed by as many bars as there are data points
-(in this case there are ten).  The bars will be drawn centered at the
-x-coordinate of the data point.  All the bars will have the same
-attributes (colors, stipple, etc).  The width of each bar is by
-default one unit.  You can change this with using the \fB\-barwidth\fR
-option.
-.CS
-# Change the scale of the x-coordinate data 
-xVector set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }
-# Make sure we change the bar width too.
-\&.b configure -barwidth 0.2
-.CE
-The height of each bar is proportional to the ordinate (Y-coordinate)
-of the data point.
-.PP
-If two or more data points have the same abscissa (X-coordinate
-value), the bars representing those data points may be drawn in 
-various ways.
-The default is to overlay the bars, one on top of the other.
-The ordering is determined from the of element display list.  If
-the stacked mode is selected (using the \fB\-barmode\fR configuration
-option), the bars are stacked, each bar above the previous.
-.CS
-# Display the elements as stacked.
-\&.b configure -barmode stacked
-.CE
-If the aligned mode is selected, the bars having the same
-x-coordinates are displayed side by side.  The width of each bar is a
-fraction of its normal width, based upon the number of bars with the
-same x-coordinate.
-.CS
-# Display the elements side-by-side.
-\&.b configure -barmode aligned
-.CE
-By default, the element's label in the legend will be also
-\f(CWe1\fR.  You can change the label, or specify no legend entry,
-again using the element's \fBconfigure\fR operation.
-.CS
-# Don't display "e1" in the legend.
-\&.b element configure e1 -label ""
-.CE
-You can configure more than just the element's label.  An element has
-many attributes such as stipple, foreground and background colors,
-relief, etc.
-.CS
-\&.b element configure e1 -fg red -bg pink \\
-	-stipple gray50
-.CE
-Four coordinate axes are automatically created: \f(CWx\fR, \f(CWx2\fR,
-\f(CWy\fR, and \f(CWy2\fR.  And by default, elements are mapped onto the
-axes \f(CWx\fR and \f(CWy\fR.  This can be changed with the \fB\-mapx\fR
-and \fB\-mapy\fR options.
-.CS
-# Map "e1" on the alternate y axis "y2".
-\&.b element configure e1 -mapy y2
-.CE
-Axes can be configured in many ways too.  For example, you change the
-scale of the Y\-axis from linear to log using the \fBaxis\fR component.
-.CS
-# Y-axis is log scale.
-\&.b axis configure y -logscale yes
-.CE
-One important way axes are used is to zoom in on a particular data
-region.  Zooming is done by simply specifying new axis limits using
-the \fB\-min\fR and \fB\-max\fR configuration options.
-.CS
-\&.b axis configure x \-min 1.0 \-max 1.5
-\&.b axis configure y \-min 12.0 \-max 55.15
-.CE
-To zoom interactively, you link the\fBaxis configure\fR operations with
-some user interaction (such as pressing the mouse button), using the
-\fBbind\fR command.  To convert between screen and graph coordinates,
-use the \fBinvtransform\fR operation.
-.CS
-# Click the button to set a new minimum 
-bind .b <ButtonPress-1> { 
-    %W axis configure x \-min [%W axis invtransform x %x]
-    %W axis configure x \-min [%W axis invtransform x %y]
-}
-.CE
-By default, the limits of the axis are determined from data values.
-To reset back to the default limits, set the \fB\-min\fR and
-\fB\-max\fR options to the empty value.
-.CS
-# Reset the axes to autoscale again.
-\&.b axis configure x \-min {} \-max {}
-\&.b axis configure y \-min {} \-max {}
-.CE
-By default, the legend is drawn in the right margin.  You can
-change this or any legend configuration options using the
-\fBlegend\fR component.
-.CS
-# Configure the legend font, color, and relief
-\&.b legend configure -position left -relief raised \\
-	-font fixed -fg blue
-.CE
-To prevent the legend from being displayed, turn on the \fB\-hide\fR
-option.
-.CS
-# Don't display the legend.
-\&.b legend configure \-hide yes\fR
-.CE
-The \fBbarchart\fR has simple drawing procedures called markers.  They can be
-used to highlight or annotate data in the graph. The types of markers
-available are bitmaps, polygons, lines, or windows.  Markers can be
-used, for example, to mark or brush points.  For example there may be
-a line marker which indicates some low-water value.  Markers are created
-using the \fBmarker\fR operation.
-.CS
-# Create a line represent the low water mark at 10.0
-\&.b marker create line -name "low_water" \\
-	-coords { -Inf 10.0 Inf 10.0 } \\
-	-dashes { 2 4 2 } -fg red -bg blue 
-.CE
-This creates a line marker named \f(CWlow_water\fR.  It will display a
-horizontal line stretching across the plotting area at the
-y-coordinate 10.0.  The coordinates "-Inf" and "Inf" indicate the
-relative minimum and maximum of the axis (in this case the x-axis).  By
-default, markers are drawn last, on top of the bars.  You can change this
-with the \fB\-under\fR option.
-.CS
-# Draw the marker before elements are drawn.
-\&.b marker configure low_water -under yes
-.CE
-You can add cross hairs or grid lines using the \fBcrosshairs\fR and
-\fBgrid\fR components.
-.CS
-# Display both cross hairs and grid lines.
-\&.b crosshairs configure -hide no -color red
-\&.b grid configure -hide no -dashes { 2 2 }
-.CE
-Finally, to get hardcopy of the graph, use the \fBpostscript\fR
-component.
-.CS
-# Print the bar chart into file "file.ps"
-\&.b postscript output file.ps -maxpect yes -decorations no
-.CE
-This generates a file \f(CWfile.ps\fR containing the encapsulated
-PostScript of the graph.  The option \fB\-maxpect\fR says to scale the
-plot to the size of the page.  Turning off the \fB\-decorations\fR
-option denotes that no borders or color backgrounds should be
-drawn (i.e. the background of the margins, legend, and plotting
-area will be white).
-.SH SYNTAX
-.DS
-\fBbarchart \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBbarchart\fR command creates a new window \fIpathName\fR and makes
-it into a barchart widget.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.  Additional options may may be specified on the
-command line or in the option database to configure aspects of the
-bar chart such as its colors and font.  See the \fBconfigure\fR operation
-below for the exact details as to what \fIoption\fR and \fIvalue\fR
-pairs are valid.
-.PP
-If successful, \fBbarchart\fR returns \fIpathName\fR. It also creates a
-new Tcl command \fIpathName\fR.  This command may be used to invoke
-various operations to query or modify the bar chart.  It has the general
-form:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for the bar chart are described in
-the following section.
-.SH "BARCHART OPERATIONS"
-.TP
-\fIpathName \fBbar \fIelemName \fR?\fIoption value\fR?...
-Creates a new barchart element \fIelemName\fR.  It's an
-error if an element \fIelemName\fR already exists.  
-See the manual for \fBbarchart\fR for details about
-what \fIoption\fR and \fIvalue\fR pairs are valid.
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBconfigure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options of the graph.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the option \fIoption\fR is set to \fIvalue\fR.
-The following options are valid.
-.RS
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color. This includes the margins and
-legend, but not the plotting area.
-.TP
-\fB\-barmode \fImode\fR 
-Indicates how related bar elements will be drawn.  Related elements
-have data points with the same abscissas (X-coordinates). \fIMode\fR
-indicates how those segments should be drawn. \fIMode\fR can be
-\f(CWinfront\fR, \f(CWaligned\fR, \f(CWoverlap\fR, or \f(CWstacked\fR.
-The default mode is \f(CWinfront\fR.
-.RS
-.TP 1i
-\f(CWinfront\fR
-Each successive segment is drawn in front of the previous. 
-.TP 1i
-\f(CWstacked\fR
-Each successive segment is stacked vertically on top of the previous.  
-.TP 1i
-\f(CWaligned\fR
-Segments is displayed aligned from right-to-left.  
-.TP 1i
-\f(CWoverlap\fR
-Like \f(CWaligned\fR but segments slightly overlap each other.  
-.RE
-.TP
-\fB\-barwidth \fIvalue\fR 
-Specifies the width of the bars.  This value can be overrided by the
-individual elements using their \fB\-barwidth\fR configuration option.
-\fIValue\fR is the width in terms of graph-coordinates.  The
-default width is \f(CW1.0\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-bottommargin \fIpixels\fR
-Specifies the size of the margin below the X\-coordinate axis.  If
-\fIpixels\fR is \f(CW0\fR, the size of the margin is selected automatically.
-The default is \f(CW0\fR.
-.TP
-\fB\-bufferelements \fIboolean\fR
-Indicates whether an internal pixmap to buffer the display of data
-elements should be used.  If \fIboolean\fR is true, data elements are
-drawn to an internal pixmap.  This option is especially useful when
-the graph is redrawn frequently while the remains data unchanged (for
-example, moving a marker across the plot).  See the
-.SB "SPEED TIPS"
-section.
-The default is \f(CW1\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CWcrosshair\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font of the graph title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-18-180-*\fR.
-.TP
-\fB\-halo \fIpixels\fR 
-Specifies a maximum distance to consider when searching for the
-closest data point (see the element's \fBclosest\fR operation below).
-Data points further than \fIpixels\fR away are ignored.  The default is
-\f(CW0.5i\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW4i\fR.
-.TP
-\fB\-invertxy \fIboolean\fR
-Indicates whether the placement X\-axis and Y\-axis should be inverted.  If
-\fIboolean\fR is true, the X and Y axes are swapped.  The default is
-\f(CW0\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the title should be justified.  This matters only when
-the title contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-leftmargin \fIpixels\fR
-Sets the size of the margin from the left edge of the window to 
-the Y\-coordinate axis.  If \fIpixels\fR is \f(CW0\fR, the size is
-calculated automatically.  The default is \f(CW0\fR.
-.TP
-\fB\-plotbackground \fIcolor\fR
-Specifies the background color of the plotting area.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-plotborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the plotting area.  The
-\fB\-plotrelief\fR option determines if a border is drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-plotpadx \fIpad\fR
-Sets the amount of padding to be added to the left and right sides of
-the plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the left side of the
-plotting area entry is padded by the first distance and the right side
-by the second.  If \fIpad\fR is just one distance, both the left and
-right sides are padded evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotpady \fIpad\fR
-Sets the amount of padding to be added to the top and bottom of the
-plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the top of the plotting
-area is padded by the first distance and the bottom by the second.  If
-\fIpad\fR is just one distance, both the top and bottom are padded
-evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotrelief \fIrelief\fR
-Specifies the 3-D effect for the plotting area.  \fIRelief\fR
-specifies how the interior of the plotting area should appear relative
-to rest of the graph; for example, \f(CWraised\fR means the plot should
-appear to protrude from the graph, relative to the surface of the
-graph.  The default is \f(CWsunken\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the barchart widget.  \fIRelief\fR
-specifies how the graph should appear relative to widget it is packed
-into; for example, \f(CWraised\fR means the graph should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-rightmargin \fIpixels\fR
-Sets the size of margin from the plotting area to the right edge of
-the window.  By default, the legend is drawn in this margin.  If
-\fIpixels\fR is than 1, the margin size is selected automatically.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW""\fR.
-.TP
-\fB\-tile \fIimage\fR 
-Specifies a tiled background for the widget.  If \fIimage\fR isn't
-\f(CW""\fR, the background is tiled using \fIimage\fR.
-Otherwise, the normal background color is drawn (see the
-\fB\-background\fR option).  \fIImage\fR must be an image created
-using the Tk \fBimage\fR command.  The default is \f(CW""\fR.
-.TP
-\fB\-title \fItext\fR 
-Sets the title to \fItext\fR. If \fItext\fR is \f(CW""\fR,
-no title will be displayed.
-.TP
-\fB\-topmargin \fIpixels\fR
-Specifies the size of the margin above the x2 axis.  If \fIpixels\fR
-is \f(CW0\fR, the margin size is calculated automatically.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the requested width of the widget.  The default is
-\f(CW5i\fR.
-.RE
-.TP
-\fIpathName \fBcrosshairs \fIoperation \fR?\fIarg\fR?
-See the 
-.SB "CROSSHAIRS COMPONENT"
-section.
-.TP
-\fIpathName \fBelement \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "ELEMENT COMPONENTS"
-section.
-.TP
-\fIpathName \fBextents \fIitem\fR 
-Returns the size of a particular item in the graph.  \fIItem\fR must
-be either \f(CWleftmargin\fR, \f(CWrightmargin\fR, \f(CWtopmargin\fR,
-\f(CWbottommargin\fR, \f(CWplotwidth\fR, or \f(CWplotheight\fR.
-.TP
-\fIpathName \fBgrid \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "GRID COMPONENT"
-section.
-.TP
-\fIpathName \fBinvtransform \fIwinX winY\fR 
-Performs an inverse coordinate transformation, mapping window
-coordinates back to graph-coordinates, using the standard X\-axis and Y\-axis.
-Returns a list of containing the X-Y graph-coordinates.
-.TP
-\fIpathName \fBinside \fIx y\fR
-Returns \f(CW1\fR is the designated screen-coordinate (\fIx\fR and \fIy\fR)
-is inside the plotting area and \f(CW0\fR otherwise.
-.TP
-\fIpathName \fBlegend \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "LEGEND COMPONENT"
-section.
-.TP
-\fIpathName \fBline\fB operation arg\fR...
-The operation is the same as \fBelement\fR.
-.TP
-\fIpathName \fBmarker \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "MARKER COMPONENTS"
-section.
-.TP
-\fIpathName\fR \fBmetafile\fR ?\fIfileName\fR?
-\fIThis operation is for Window platforms only\fR.  
-Creates a Windows enhanced metafile of the barchart.
-If present, \fIfileName\fR is the file name of the new metafile.
-Otherwise, the metafile is automatically added to the clipboard.
-.TP
-\fIpathName \fBpostscript \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "POSTSCRIPT COMPONENT"
-section.
-.TP
-\fIpathName \fBsnap \fIphotoName\fR
-Takes a snapshot of the graph and stores the contents in the photo
-image \fIphotoName\fR.  \fIPhotoName\fR is the name of a Tk photo
-image that must already exist.
-.TP
-\fIpathName \fBtransform \fIx y\fR 
-Performs a coordinate transformation, mapping graph-coordinates to
-window coordinates, using the standard X\-axis and Y\-axis.
-Returns a list containing the X\-Y screen-coordinates.
-.TP
-\fIpathName \fBxaxis \fIoperation\fR ?\fIarg\fR?...
-.TP
-\fIpathName \fBx2axis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fByaxis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fBy2axis \fIoperation\fR ?\fIarg\fR?... 
-See the 
-.SB "AXIS COMPONENTS"
-section.
-.SH "BARCHART COMPONENTS"
-A graph is composed of several components: coordinate axes, data
-elements, legend, grid, cross hairs, postscript, and annotation
-markers. Instead of one big set of configuration options and
-operations, the graph is partitioned, where each component has its own
-configuration options and operations that specifically control that
-aspect or part of the graph. 
-.SS "AXIS COMPONENTS"
-Four coordinate axes are automatically created: two X\-coordinate axes
-(\f(CWx\fR and \f(CWx2\fR) and two Y\-coordinate axes (\f(CWy\fR, and
-\f(CWy2\fR).  By default, the axis \f(CWx\fR is located in the bottom
-margin, \f(CWy\fR in the left margin, \f(CWx2\fR in the top margin, and
-\f(CWy2\fR in the right margin.
-.PP
-An axis consists of the axis line, title, major and minor ticks, and
-tick labels.  Major ticks are drawn at uniform intervals along the
-axis.  Each tick is labeled with its coordinate value.  Minor ticks
-are drawn at uniform intervals within major ticks.  
-.PP
-The range of the axis controls what region of data is plotted.
-Data points outside the minimum and maximum limits of the axis are
-not plotted.  By default, the minimum and maximum limits are
-determined from the data, but you can reset either limit.
-.PP
-You can create and use several axes. To create an axis, invoke
-the axis component and its create operation.
-.CS
-# Create a new axis called "temperature"
-\&.b axis create temperature
-.CE
-You map data elements to an axis using the element's \-mapy and \-mapx
-configuration options. They specify the coordinate axes an element
-is mapped onto.
-.CS
-# Now map the temperature data to this axis.
-\&.b element create "temp" \-xdata $x \-ydata $tempData \\
-    \-mapy temperature
-.CE
-While you can have many axes, only four axes can be displayed
-simultaneously.  They are drawn in each of the margins surrounding
-the plotting area.  The axes \f(CWx\fR and \f(CWy\fR are drawn in the
-bottom and left margins. The axes \f(CWx2\fR and \f(CWy2\fR are drawn in
-top and right margins.  Only \f(CWx\fR and \f(CWy\fR are shown by
-default. Note that the axes can have different scales.
-.PP
-To display a different axis, you invoke one of the following
-components: \fBxaxis\fR, \fByaxis\fR, \fBx2axis\fR, and \fBy2axis\fR.
-The \fBuse\fR operation designates the axis to be drawn in the
-corresponding margin: \fBxaxis\fR in the bottom, \fByaxis\fR in the left, 
-\fBx2axis\fR in the top, and \fBy2axis\fR in the right.
-.CS
-# Display the axis temperature in the left margin.
-\&.b yaxis use temperature
-.CE
-.PP
-You can configure axes in many ways. The axis scale can be linear or
-logarithmic.  The values along the axis can either monotonically
-increase or decrease.  If you need custom tick labels, you can specify
-a Tcl procedure to format the label any way you wish.  You can
-control how ticks are drawn, by changing the major tick interval
-or the number of minor ticks.  You can define non-uniform tick intervals,
-such as for time-series plots.
-.PP
-.TP
-\fIpathName \fBaxis \fBcget \fIaxisName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIaxisName\fR.  \fIOption\fR may be any option described below
-for the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBconfigure \fIaxisName \fR?\fIaxisName\fR?... ?\fIoption value\fR?...
-Queries or modifies the configuration options of \fIaxisName\fR.
-Several axes can be changed.  If \fIoption\fR isn't specified, a list
-describing all the current options for \fIaxisName\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-\fIoption\fR is returned.  If one or more \fIoption\fR and \fIvalue\fR
-pairs are specified, then for each pair, the axis option \fIoption\fR
-is set to \fIvalue\fR.  The following options are valid for axes.
-.RS
-.TP
-\fB\-autorange \fIrange\fR 
-Sets the range of values for the axis to \fIrange\fR.  The axis limits
-are automatically reset to display the most recent data points in this range.  
-If \fIrange\fR is 0.0, the range is
-determined from the limits of the data.  If \fB\-min\fR or \fB-max\fR
-are specified, they override this option.  The default is \f(CW0.0\fR.
-.TP
-\fB\-color \fIcolor\fR
-Sets the color of the axis and tick labels.
-The default is \f(CWblack\fR.
-.TP
-\fB\-command \fIprefix\fR
-Specifies a Tcl command to be invoked when formatting the axis tick
-labels. \fIPrefix\fR is a string containing the name of a Tcl proc and
-any extra arguments for the procedure.  This command is invoked for each
-major tick on the axis.  Two additional arguments are passed to the
-procedure: the pathname of the widget and the current the numeric
-value of the tick.  The procedure returns the formatted tick label.  If
-\f(CW""\fR is returned, no label will appear next to the tick.  You can
-get the standard tick labels again by setting \fIprefix\fR to
-\f(CW""\fR.  The default is \f(CW""\fR.
-.sp 1
-Please note that this procedure is invoked while the bar chart is redrawn.
-You may query the widget's configuration options.  But do not reset
-options, because this can have unexpected results.
-.TP
-\fB\-descending \fIboolean\fR 
-Indicates whether the values along the axis are monotonically increasing or
-decreasing.  If \fIboolean\fR is true, the axis values will be
-decreasing.  The default is \f(CW0\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the axis is displayed. 
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the axis title should be justified.  This matters only
-when the axis title contains more than one line of text. \fIJustify\fR
-must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-limits \fIformatStr\fR
-Specifies a printf-like description to format the minimum and maximum
-limits of the axis.  The limits are displayed at the top/bottom or
-left/right sides of the plotting area.  \fIFormatStr\fR is a list of
-one or two format descriptions.  If one description is supplied, both
-the minimum and maximum limits are formatted in the same way.  If two,
-the first designates the format for the minimum limit, the second for
-the maximum.  If \f(CW""\fR is given as either description, then 
-the that limit will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the axis and tick lines.  The default is \f(CW1\fR
-pixel.
-.TP
-\fB\-logscale \fIboolean\fR
-Indicates whether the scale of the axis is logarithmic or linear.  If
-\fIboolean\fR is true, the axis is logarithmic.  The default scale is
-linear.
-.TP
-\fB\-loose \fIboolean\fR
-Indicates whether the limits of the axis should fit the data points tightly,
-at the outermost data points, or loosely, at the outer tick intervals.
-This is relevant only when the axis limit is automatically calculated.
-If \fIboolean\fR is true, the axis range is "loose".
-The default is \f(CW0\fR.
-.TP
-\fB\-majorticks \fImajorList\fR
-Specifies where to display major axis ticks.  You can use this option
-to display ticks at non-uniform intervals.  \fIMajorList\fR is a list
-of axis coordinates designating the location of major ticks.  No
-minor ticks are drawn.  If \fImajorList\fR is \f(CW""\fR, 
-major ticks will be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-max \fIvalue\fR
-Sets the maximum limit of \fIaxisName\fR.  Any data point greater 
-than \fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR, 
-the maximum limit is calculated using the largest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-min \fIvalue\fR
-Sets the minimum limit of \fIaxisName\fR. Any data point less than 
-\fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR,
-the minimum limit is calculated using the smallest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-minorticks \fIminorList\fR
-Specifies where to display minor axis ticks.  You can use this option
-to display minor ticks at non-uniform intervals. \fIMinorList\fR is a
-list of real values, ranging from 0.0 to 1.0, designating the placement of
-a minor tick.  No minor ticks are drawn if the \fB\-majortick\fR
-option is also set.  If \fIminorList\fR is \f(CW""\fR, minor ticks will
-be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the how many degrees to rotate the axis tick labels.
-\fITheta\fR is a real value representing the number of degrees
-to rotate the tick labels.  The default is \f(CW0.0\fR degrees.
-.TP
-\fB\-shiftby \fIvalue\fR
-Specifies how much to automatically shift the range of the axis.
-When the new data exceeds the current axis maximum, the maximum
-is increased in increments of \fIvalue\fR.  You can use this
-option to prevent the axis limits from being recomputed
-at each new time point. If \fIvalue\fR is 0.0, then no automatic
-shifting is down. The default is \f(CW0.0\fR.
-.TP
-\fB\-showticks \fIboolean\fR
-Indicates whether axis ticks should be drawn. If \fIboolean\fR is
-true, ticks are drawn.  If false, only the
-axis line is drawn. The default is \f(CW1\fR.
-.TP
-\fB\-stepsize \fIvalue\fR
-Specifies the interval between major axis ticks.  If \fIvalue\fR isn't
-a valid interval (must be less than the axis range), 
-the request is ignored and the step size is automatically calculated.
-.TP
-\fB\-subdivisions \fInumber\fR 
-Indicates how many minor axis ticks are
-to be drawn.  For example, if \fInumber\fR is two, only one minor
-tick is drawn.  If \fInumber\fR is one, no minor ticks are
-displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-tickfont \fIfontName\fR 
-Specifies the font for axis tick labels. The default is
-\f(CW*-Courier-Bold-R-Normal-*-100-*\fR.
-.TP
-\fB\-ticklength \fIpixels\fR
-Sets the length of major and minor ticks (minor ticks are half the
-length of major ticks). If \fIpixels\fR is less than zero, the axis
-will be inverted with ticks drawn pointing towards the plot.  The
-default is \f(CW0.1i\fR.
-.TP
-\fB\-title \fItext\fR
-Sets the title of the axis. If \fItext\fR is 
-\f(CW""\fR, no axis title will be displayed.  
-.TP
-\fB\-titlecolor \fIcolor\fR
-Sets the color of the axis title. The default is \f(CWblack\fR.
-.TP
-\fB\-titlefont \fIfontName\fR 
-Specifies the font for axis title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-14-140-*\fR.
-.PP
-Axis configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWAxis\fR.  The resource names
-are the names of the axes (such as \f(CWx\fR or \f(CWx2\fR).
-.CS
-option add *Barchart.Axis.Color  blue
-option add *Barchart.x.LogScale  true
-option add *Barchart.x2.LogScale false
-.CE
-.RE
-.TP
-\fIpathName \fBaxis \fBcreate \fIaxisName \fR?\fIoption value\fR?...
-Creates a new axis by the name \fIaxisName\fR.  No axis by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBdelete \fR?\fIaxisName\fR?...
-Deletes the named axes. An axis is not really
-deleted until it is not longer in use, so it's safe to delete
-axes mapped to elements.
-.TP
-\fIpathName \fBaxis invtransform \fIaxisName value\fR
-Performs the inverse transformation, changing the screen-coordinate
-\fIvalue\fR to a graph-coordinate, mapping the value mapped to
-\fIaxisName\fR.  Returns the graph-coordinate.
-.TP
-\fIpathName \fBaxis limits \fIaxisName\fR
-Returns a list of the minimum and maximum limits for \fIaxisName\fR.  The order
-of the list is \f(CWmin max\fR.
-.TP
-\fIpathName \fBaxis names \fR?\fIpattern\fR?...
-Returns a list of axes matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all axes are returned.
-.TP
-\fIpathName \fBaxis transform \fIaxisName value\fR
-Transforms the coordinate \fIvalue\fR to a screen-coordinate by mapping
-the it to \fIaxisName\fR.  Returns the transformed screen-coordinate.
-.PP
-Only four axes can be displayed simultaneously.  By default, they are
-\f(CWx\fR, \f(CWy\fR, \f(CWx2\fR, and \f(CWy2\fR.  You can swap in a different
-axis with \fBuse\fR operation of the special axis components:
-\fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR.
-.CS
-\&.g create axis temp
-\&.g create axis time
-\&...
-\&.g xaxis use temp
-\&.g yaxis use time
-.CE
-Only the axes specified for use are displayed on the screen.
-.PP
-The \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR
-components operate on an axis location rather than a specific axis
-like the more general \fBaxis\fR component does.  The \fBxaxis\fR
-component manages the X-axis located in the bottom margin (whatever
-axis that happens to be).  Likewise, \fByaxis\fR uses the Y-axis in
-the left margin, \fBx2axis\fR the top X-axis, and \fBy2axis\fR the
-right Y-axis.
-.PP
-They implicitly control the axis that is currently using to that
-location.  By default, \fBxaxis\fR uses the \f(CWx\fR axis, \fByaxis\fR
-uses \f(CWy\fR, \fBx2axis\fR uses \f(CWx2\fR, and \fBy2axis\fR uses
-\f(CWy2\fR.  These components can be more convenient to use than always
-determining what axes are current being displayed by the graph.
-.PP
-The following operations are available for axes. They mirror exactly
-the operations of the \fBaxis\fR component.  The \fIaxis\fR argument
-must be \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, or \fBy2axis\fR.
-.TP
-\fIpathName \fIaxis \fBcget \fIoption\fR
-.TP
-\fIpathName \fIaxis \fBconfigure \fR?\fIoption value\fR?...
-.TP
-\fIpathName \fIaxis\fB invtransform \fIvalue\fR
-.TP
-\fIpathName \fIaxis \fBlimits\fR
-.TP
-\fIpathName \fIaxis\fB transform \fIvalue\fR
-.TP
-\fIpathName \fIaxis\fB use \fR?\fIaxisName\fR?  
-Designates the axis \fIaxisName\fR is to be displayed at this
-location.  \fIAxisName\fR can not be already in use at another location.  
-This command returns the name of the axis currently using this location.
-.SS "CROSSHAIRS COMPONENT"
-Cross hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position
-the mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives.
-This means that they can be quickly drawn and erased without redrawing
-the entire widget.
-.PP
-The following operations are available for cross hairs:
-.TP
-\fIpathName \fBcrosshairs cget \fIoption\fR
-Returns the current value of the cross hairs configuration option
-given by \fIoption\fR.  \fIOption\fR may be any option
-described below for the cross hairs \fBconfigure\fR operation.
-.TP
-\fIpathName \fBcrosshairs configure \fR?\fIoption value\fR?...  
-Queries or modifies the configuration options of the cross hairs.  If
-\fIoption\fR isn't specified, a list describing all the current
-options for the cross hairs is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the cross hairs option \fIoption\fR is set to
-\fIvalue\fR.
-The following options are available for cross hairs.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the cross hairs.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the cross hairs. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the cross hair lines.  Each number must be between 1 and
-255.  If \fIdashList\fR is \f(CW""\fR, the cross hairs will be solid
-lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether cross hairs are drawn. If \fIboolean\fR is true,
-cross hairs are not drawn.  The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the cross hair lines.  The default is \f(CW1\fR.
-.TP
-\fB\-position \fIpos\fR 
-Specifies the screen position where the cross hairs intersect.
-\fIPos\fR must be in the form "\fI at x,y\fR", where \fIx\fR and \fIy\fR
-are the window coordinates of the intersection.
-.PP
-Cross hairs configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWcrosshairs\fR and \f(CWCrosshairs\fR respectively.
-.CS
-option add *Barchart.Crosshairs.LineWidth 2
-option add *Barchart.Crosshairs.Color     red
-.CE
-.RE
-.TP
-\fIpathName \fBcrosshairs off\fR
-Turns off the cross hairs. 
-.TP
-\fIpathName \fBcrosshairs on\fR
-Turns on the display of the cross hairs.
-.TP
-\fIpathName \fBcrosshairs toggle\fR 
-Toggles the current state of the cross hairs, alternately mapping and
-unmapping the cross hairs.
-.SH "ELEMENTS"
-A data element represents a set of data.  It contains x and y vectors
-which are the coordinates of the data points.  Elements are displayed
-as bars where the length of the bar is proportional to the ordinate of
-the data point.  Elements also control the appearance of the data,
-such as the color, stipple, relief, etc.
-.PP
-When new data elements are created, they are automatically added to a
-list of displayed elements.   The display list controls what elements
-are drawn and in what order.  
-.PP
-The following operations are available for elements.
-.TP
-\fIpathName \fBelement activate \fIelemName \fR?\fIindex\fR?...
-Specifies the data points of element \fIelemName\fR to be drawn
-using active foreground and background colors.  \fIElemName\fR is the
-name of the element and \fIindex\fR is a number representing the index
-of the data point. If no indices are present then all data points
-become active.
-.TP
-\fIpathName \fBelement bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an element with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on graph elements, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBelement cget \fIelemName \fIoption\fR
-Returns the current value of the element configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any of the options described below
-for the element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement closest \fIx y\fR ?\fIoption value\fR?... ?\fIelemName\fR?...
-Finds the data point representing the bar closest to the window
-coordinates \fIx\fR and \fIy\fR in the element \fIelemName\fR.
-\fIElemName\fR is the name of an element, which must be currently displayed.  
-If no elements are specified, then all displayed elements are searched.  It
-returns a key-value list containing the name of the closest element, 
-the index of its closest point, and the graph-coordinates of the
-point. If no data point within the threshold distance can be found,
-\f(CW""\fR is returned.  The following \fIoption\fR-\fIvalue\fR pairs
-are available.
-.RS
-.TP
-\fB\-halo \fIpixels\fR
-Specifies a threshold distance where selected data points are ignored.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-If this option isn't specified, then it defaults to the value of the
-\fBbarchart\fR's \fB\-halo\fR option.
-.RE
-.TP
-\fIpathName \fBelement configure \fIelemName \fR?\fIelemName\fR... ?\fIoption value\fR?...
-Queries or modifies the configuration options for elements.  Several
-elements can be modified at the same time. If \fIoption\fR isn't
-specified, a list describing all the current options for
-\fIelemName\fR is returned.  If \fIoption\fR is specified, but not
-\fIvalue\fR, then a list describing the option \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the element option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for elements.
-.RS
-.TP
-\fB\-activepen \fIpenName\fR
-Specifies pen to use to draw active element.  If \fIpenName\fR is
-\f(CW""\fR, no active elements will be drawn.  The default is 
-\f(CWactiveLine\fR.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for the element.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events for elements.  Each tag in the list matching the current event
-sequence will have its Tcl command executed.  Implicitly the name of
-the element is always the first tag in the list.  The default value is
-\f(CWall\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the the color of the border around each bar.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-barwidth \fIvalue\fR 
-Specifies the width the bars drawn for the element.  \fIValue\fR is
-the width in X-coordinates.  If this option isn't
-specified, the width of each bar is the value of the widget's
-\fB\-barwidth\fR option.
-.TP
-\fB\-baseline \fIvalue\fR 
-Specifies the baseline of the bar segments.  This affects how bars are 
-drawn since bars are drawn from their respective y-coordinate the 
-baseline. By default the baseline is \f(CW0.0\fR.  
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the border width of the 3-D border drawn around the outside of
-each bar.  The \fB\-relief\fR option determines if such a border is
-drawn.  \fIPixels\fR must be a valid screen distance like \f(CW2\fR or
-\f(CW0.25i\fR. The default is \f(CW2\fR.
-.TP
-\fB\-data \fIcoordList\fR
-Specifies the X\-Y coordinates of the data.  \fICoordList\fR is a
-list of numeric expressions representing the X\-Y coordinate pairs
-of each data point.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the color of the interior of the bars.  
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the element is displayed.  The default is \f(CWno\fR.
-.TP
-\fB\-label \fItext\fR
-Sets the element's label in the legend.  If \fItext\fR
-is \f(CW""\fR, the element will have no entry in the legend.
-The default label is the element's name.
-.TP
-\fB\-mapx \fIxAxis\fR
-Selects the X\-axis to map the element's X\-coordinates onto.
-\fIXAxis\fR must be the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Selects the Y\-axis to map the element's Y\-coordinates onto.
-\fIYAxis\fR must be the name of an axis. The default is \f(CWy\fR.
-.TP
-\fB\-relief \fIstring\fR
-Specifies the 3-D effect desired for bars.  \fIRelief\fR indicates how
-the interior of the bar should appear relative to the surface of the
-chart; for example, \f(CWraised\fR means the bar should appear to
-protrude from the surface of the plotting area.  The default is
-\f(CWraised\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern with which to draw the bars.  If
-\fIbitmap\fR is \f(CW""\fR, then the bar is drawn in a solid fashion.
-.TP
-\fB\-xdata \fIxVector\fR 
-Specifies the x-coordinate vector of the data.
-\fIXVector\fR is the name of a BLT vector or a
-list of numeric expressions.  
-.TP
-\fB\-ydata \fIyVector\fR 
-Specifies the y-coordinate vector of the data.
-\fIYVector\fR is the name of a BLT vector or a list of
-numeric expressions.  
-.PP
-Element configuration options may also be set by the 
-\fBoption\fR command.  The resource names  in the option database 
-are prefixed by \f(CWelem\fR.
-.CS
-option add *Barchart.Element.background blue
-.CE
-.RE
-.TP
-\fIpathName \fBelement create \fIelemName\fR ?\fIoption value\fR?...
-Creates a new element \fIelemName\fR.  Element
-names must be unique, so an element \fIelemName\fR may not already
-exist.  If additional arguments are present, they specify any of the
-element options valid for element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement deactivate \fIpattern\fR...
-Deactivates all the elements matching \fIpattern\fR for the graph.  
-Elements whose names match any of the patterns given are redrawn 
-using their normal colors.  
-.TP
-\fIpathName \fBelement delete\fR ?\fIpattern\fR?...
-Deletes all the elements matching \fIpattern\fR for the graph.  
-Elements whose names match any of the patterns given are deleted. 
-The graph will be redrawn without the deleted elements.  
-.TP
-\fIpathName \fBelement exists \fIelemName\fR
-Returns \f(CW1\fR if an element \fIelemName\fR currently exists and
-\f(CW0\fR otherwise.
-.TP
-\fIpathName \fBelement names \fR?\fIpattern\fR?...  
-Returns the elements matching one or more pattern.  If no
-\fIpattern\fR is given, the names of all elements is returned.
-.TP
-\fIpathName \fBelement show\fR ?\fInameList\fR?  
-Queries or modifies the element display list.  The element display
-list designates the elements drawn and in what
-order. \fINameList\fR is a list of elements to be displayed in the
-order they are named.  If there is no \fInameList\fR argument,
-the current display list is returned.
-.TP
-\fIpathName \fBelement type\fR \fIelemName\fR
-Returns the type of \fIelemName\fR. 
-If the element is a bar element, the commands returns the string
-\f(CW"bar"\fR, otherwise it returns \f(CW"line"\fR.
-.CE
-.SS "GRID COMPONENT"
-Grid lines extend from the major and minor ticks of each axis
-horizontally or vertically across the plotting area.  The following
-operations are available for grid lines.
-.TP
-\fIpathName \fBgrid cget \fIoption\fR
-Returns the current value of the grid line configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any option described below
-for the grid \fBconfigure\fR operation.
-.TP
-\fIpathName \fBgrid configure\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for grid lines.  If
-\fIoption\fR isn't specified, a list describing all the current
-grid options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the grid line option \fIoption\fR is set to
-\fIvalue\fR.  The following options are valid for grid lines.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the grid lines.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the grid lines. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the grid lines.  Each number must be between 1 and 255.
-If \fIdashList\fR is \f(CW""\fR, the grid will be solid lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the grid should be drawn. If \fIboolean\fR
-is true, grid lines are not shown. The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of grid lines.  The default width is \f(CW1\fR.
-.TP
-\fB\-mapx \fIxAxis\fR
-Specifies the X\-axis to display grid lines.  \fIXAxis\fR
-must be the name of an axis or \f(CW""\fR for no grid lines.  
-The default is \f(CW""\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to display grid lines.  \fIYAxis\fR
-must be the name of an axis or \f(CW""\fR for no grid lines. 
-The default is \f(CWy\fR.
-.TP
-\fB\-minor \fIboolean\fR
-Indicates whether the grid lines should be drawn for minor ticks. 
-If \fIboolean\fR is true, the lines will appear at
-minor tick intervals.  The default is \f(CW1\fR.
-.PP
-Grid configuration options may also be set by the 
-\fBoption\fR command.  The resource name and class are \f(CWgrid\fR and 
-\f(CWGrid\fR respectively. 
-.CS
-option add *Barchart.grid.LineWidth 2
-option add *Barchart.Grid.Color     black
-.CE
-.RE
-.TP
-\fIpathName \fBgrid off\fR
-Turns off the display the grid lines.
-.TP
-\fIpathName \fBgrid on\fR
-Turns on the display the grid lines.
-.TP
-\fIpathName \fBgrid toggle\fR
-Toggles the display of the grid.  
-.SS "LEGEND COMPONENT"
-The legend displays a list of the data elements.  Each entry consists
-of the element's symbol and label.  The legend can appear in any
-margin (the default location is in the right margin).  It
-can also be positioned anywhere within the plotting area.
-.PP
-The following operations are valid for the legend.
-.TP
-\fIpathName \fBlegend activate \fIpattern\fR...
-Selects legend entries to be drawn using the active legend colors and relief.
-All entries whose element names match \fIpattern\fR  are selected.  To
-be selected, the element name must match only one \fIpattern\fR. 
-.TP
-\fIpathName \fBlegend bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a legend entry with this
-tag, \fIcommand\fR will be invoked.  Implicitly the element names
-in the entry are tags.  The syntax is similar to the 
-\fBbind\fR command except that it operates on legend entries, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBlegend cget \fIoption\fR
-Returns the current value of a legend configuration option.
-\fIOption\fR may be any option described below in the
-legend \fBconfigure\fR operation.
-.TP
-\fIpathName \fBlegend configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for the legend.  If
-\fIoption\fR isn't specified, a list describing the current
-legend options for \fIpathName\fR is returned.  If \fIoption\fR is
-specified, but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the legend option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for the legend.
-.RS
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active legend entries.  All legend
-entries marked active (see the legend \fBactivate\fR operation) are
-drawn using this background color.
-.TP
-\fB\-activeborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the active legend
-entries.  The default is \f(CW2\fR.
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color for active legend entries.  All legend
-entries marked as active (see the legend \fBactivate\fR operation) are
-drawn using this foreground color.
-.TP
-\fB\-activerelief \fIrelief\fR 
-Specifies the 3-D effect desired for active legend entries.
-\fIRelief\fR denotes how the interior of the entry should appear
-relative to the legend; for example, \f(CWraised\fR means the entry
-should appear to protrude from the legend, relative to the surface of
-the legend.  The default is \f(CWflat\fR.
-.TP
-\fB\-anchor \fIanchor\fR
-Tells how to position the legend relative to the positioning point for
-the legend.  This is dependent on the value of the \fB\-position\fR
-option.  The default is \f(CWcenter\fR.
-.RS
-.TP 1.25i
-\f(CWleft\fR or \f(CWright\fR
-The anchor describes how to position the legend vertically.  
-.TP
-\f(CWtop\fR or \f(CWbottom\fR
-The anchor describes how to position the legend horizontally.  
-.TP
-\f(CW at x,y\fR
-The anchor specifies how to position the legend relative to the
-positioning point. For example, if \fIanchor\fR is \f(CWcenter\fR then
-the legend is centered on the point; if \fIanchor\fR is \f(CWn\fR then
-the legend will be drawn such that the top center point of the
-rectangular region occupied by the legend will be at the positioning
-point.
-.TP
-\f(CWplotarea\fR
-The anchor specifies how to position the legend relative to the
-plotting area. For example, if \fIanchor\fR is \f(CWcenter\fR then the
-legend is centered in the plotting area; if \fIanchor\fR is \f(CWne\fR
-then the legend will be drawn such that occupies the upper right
-corner of the plotting area.
-.RE
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the legend. If \fIcolor\fR is \f(CW""\fR,
-the legend background with be transparent.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for legend entries.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events for legend entries.  Each tag in the list matching the current 
-event sequence will have its Tcl command executed. The default value 
-is \f(CWall\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the legend (if
-such border is being drawn; the \fBrelief\fR option determines this).
-The default is \f(CW2\fR pixels.
-.TP
-\fB\-font \fIfontName\fR 
-\fIFontName\fR specifies a font to use when drawing the labels of each
-element into the legend.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of the text drawn for the element's label.
-The default is \f(CWblack\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the legend should be displayed. If \fIboolean\fR is
-true, the legend will not be draw.  The default is \f(CWno\fR.
-.TP
-\fB\-ipadx \fIpad\fR 
-Sets the amount of internal padding to be added to the width of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the left side of the legend entry is
-padded by the first distance and the right side by the second.  If
-\fIpad\fR is just one distance, both the left and right sides are padded
-evenly.  The default is \f(CW2\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets an amount of internal padding to be added to the height of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the top of the entry is padded by the
-first distance and the bottom by the second.  If \fIpad\fR is just
-one distance, both the top and bottom of the entry are padded evenly.
-The default is \f(CW2\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the legend.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the legend is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the legend.  \fIPad\fR can be a list
-of one or two screen distances.  If \fIpad\fR has two elements, the area above
-the legend is padded by the first distance and the area below by the
-second.  If \fIpad\fR is just one distance, both the top and
-bottom areas are padded evenly.  The default is \f(CW0\fR.
-.TP
-\fB\-position \fIpos\fR
-Specifies where the legend is drawn. The
-\fB\-anchor\fR option also affects where the legend is positioned.  If
-\fIpos\fR is \f(CWleft\fR, \f(CWleft\fR, \f(CWtop\fR, or \f(CWbottom\fR, the
-legend is drawn in the specified margin.  If \fIpos\fR is
-\f(CWplotarea\fR, then the legend is drawn inside the plotting area at a
-particular anchor.  If \fIpos\fR is in the form "\fI at x,y\fR", where
-\fIx\fR and \fIy\fR are the window coordinates, the legend is drawn in
-the plotting area at the specified coordinates.  The default is
-\f(CWright\fR.
-.TP
-\fB\-raised \fIboolean\fR
-Indicates whether the legend is above or below the data elements.  This
-matters only if the legend is in the plotting area.  If \fIboolean\fR
-is true, the legend will be drawn on top of any elements that may
-overlap it. The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the border around the legend.
-\fIRelief\fR specifies how the interior of the legend should appear
-relative to the bar chart; for example, \f(CWraised\fR means the legend
-should appear to protrude from the bar chart, relative to the surface of
-the bar chart.  The default is \f(CWsunken\fR.
-.PP
-Legend configuration options may also be set by the \fBoption\fR
-command.  The resource name and class are \f(CWlegend\fR and
-\f(CWLegend\fR respectively.
-.CS
-option add *Barchart.legend.Foreground blue
-option add *Barchart.Legend.Relief     raised
-.CE
-.RE
-.TP
-\fIpathName \fBlegend deactivate \fIpattern\fR...
-Selects legend entries to be drawn using the normal legend colors and
-relief.  All entries whose element names match \fIpattern\fR are
-selected.  To be selected, the element name must match only one
-\fIpattern\fR.
-.TP
-\fIpathName \fBlegend get \fIpos\fR
-Returns the name of the element whose entry is at the screen position
-\fIpos\fR in the legend.  \fIPos\fR must be in the form "\fI at x,y\fR",
-where \fIx\fR and \fIy\fR are window coordinates.  If the given
-coordinates do not lie over a legend entry, \f(CW""\fR is returned.
-.SS "PEN COMPONENTS"
-Pens define attributes for elements.
-Pens mirror the configuration options of data elements that pertain to
-how symbols and lines are drawn.  Data elements use pens to determine
-how they are drawn.  A data element may use several pens at once.  In
-this case, the pen used for a particular data point is determined from
-each element's weight vector (see the element's \fB\-weight\fR and
-\fB\-style\fR options).
-.PP
-One pen, called \f(CWactiveBar\fR, is automatically created.
-It's used as the default active pen for elements. So you can change
-the active attributes for all elements by simply reconfiguring this
-pen.
-.CS
-\&.g pen configure "activeBar" -fg green -bg green4
-.CE
-You can create and use several pens. To create a pen, invoke
-the pen component and its create operation.
-.CS
-\&.g pen create myPen
-.CE
-You map pens to a data element using either the element's 
-\fB\-pen\fR or \fB\-activepen\fR options.
-.CS
-\&.g element create "e1" -xdata $x -ydata $tempData \\
-    -pen myPen
-.CE
-An element can use several pens at once. This is done by specifying
-the name of the pen in the element's style list (see the
-\fB\-styles\fR option).
-.CS
-\&.g element configure "e1" -styles { myPen 2.0 3.0 }
-.CE
-This says that any data point with a weight between 2.0 and 3.0
-is to be drawn using the pen \f(CWmyPen\fR.  All other points
-are drawn with the element's default attributes.
-.PP
-The following operations are available for pen components.
-.PP
-.TP
-\fIpathName \fBpen \fBcget \fIpenName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIpenName\fR.  \fIOption\fR may be any option described below
-for the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBconfigure \fIpenName \fR?\fIpenName\fR... ?\fIoption value\fR?...
-Queries or modifies the configuration options of
-\fIpenName\fR. Several pens can be modified at once.  If \fIoption\fR
-isn't specified, a list describing the current options for
-\fIpenName\fR is returned.  If \fIoption\fR is specified, but not
-\fIvalue\fR, then a list describing \fIoption\fR is returned.  If one
-or more \fIoption\fR and \fIvalue\fR pairs are specified, then for
-each pair, the pen option \fIoption\fR is set to \fIvalue\fR.  The
-following options are valid for pens.
-.RS
-.TP
-\fB\-background \fIcolor\fR
-Sets the the color of the border around each bar.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the border width of the 3-D border drawn around the outside of
-each bar.  The \fB\-relief\fR option determines if such a border is
-drawn.  \fIPixels\fR must be a valid screen distance like \f(CW2\fR or
-\f(CW0.25i\fR. The default is \f(CW2\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the color of the interior of the bars.  
-.TP
-\fB\-relief \fIstring\fR
-Specifies the 3-D effect desired for bars.  \fIRelief\fR indicates how
-the interior of the bar should appear relative to the surface of the
-chart; for example, \f(CWraised\fR means the bar should appear to
-protrude from the bar chart, relative to the surface of the plotting
-area.  The default is \f(CWraised\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern with which to draw the bars.  If
-\fIbitmap\fR is \f(CW""\fR, then the bar is drawn in a solid fashion.
-.TP
-\fB\-type \fIelemType\fR 
-Specifies the type of element the pen is to be used with.
-This option should only be employed when creating the pen.  This
-is for those that wish to mix different types of elements (bars and
-lines) on the same graph.  The default type is "bar".
-.PP
-Pen configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWPen\fR.  The resource names
-are the names of the pens.
-.CS
-option add *Barchart.Pen.Foreground	   blue
-option add *Barchart.activeBar.foreground  green
-.CE
-.RE
-.TP
-\fIpathName \fBpen \fBcreate \fIpenName \fR?\fIoption value\fR?...
-Creates a new pen by the name \fIpenName\fR.  No pen by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBdelete \fR?\fIpenName\fR?...
-Deletes the named pens. A pen is not really
-deleted until it is not longer in use, so it's safe to delete
-pens mapped to elements.
-.TP
-\fIpathName \fBpen names \fR?\fIpattern\fR?...
-Returns a list of pens matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all pens are returned.
-.SS "POSTSCRIPT COMPONENT"
-The barchart can generate encapsulated PostScript output.  There
-are several configuration options you can specify to control how the
-plot will be generated.  You can change the page dimensions and
-borders.  The plot itself can be scaled, centered, or rotated to
-landscape.  The PostScript output can be written directly to a file or
-returned through the interpreter.
-.PP
-The following postscript operations are available.
-.TP
-\fIpathName \fBpostscript cget \fIoption\fR 
-Returns the current value of the postscript option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the postscript \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpostscript configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for PostScript
-generation.  If \fIoption\fR isn't specified, a list describing 
-the current postscript options for \fIpathName\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-\fIoption\fR is returned.  If one or more \fIoption\fR and \fIvalue\fR
-pairs are specified, then for each pair, the postscript option
-\fIoption\fR is set to \fIvalue\fR.  The following postscript options
-are available.
-.RS
-.TP
-\fB\-center \fIboolean\fR
-Indicates whether the plot should be centered on the PostScript page.  If
-\fIboolean\fR is false, the plot will be placed in the upper left
-corner of the page.  The default is \f(CW1\fR.
-.TP
-\fB\-colormap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a color mapping from the X color name to PostScript.  Each
-element of \fIvarName\fR must consist of PostScript code to set a
-particular color value (e.g. ``\f(CW1.0 1.0 0.0 setrgbcolor\fR'').  When
-generating color information in PostScript, the array variable \fIvarName\fR
-is checked if an element of the name as the color exists. If so, it uses 
-its value as the PostScript
-command to set the color.  If this option hasn't been specified, or if
-there isn't an entry in \fIvarName\fR for a given color, then it uses
-the red, green, and blue intensities from the X color.
-.TP
-\fB\-colormode \fImode\fR
-Specifies how to output color information.  \fIMode\fR must be either
-\f(CWcolor\fR (for full color output), \f(CWgray\fR (convert all colors to
-their gray-scale equivalents) or \f(CWmono\fR (convert foreground colors
-to black and background colors to white).  The default mode is
-\f(CWcolor\fR. 
-.TP
-\fB\-fontmap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a font mapping from the X font name to PostScript.  Each
-element of \fIvarName\fR must consist of a Tcl list with one or two
-elements; the name and point size of a PostScript font.
-When outputting PostScript commands for a particular font, the array
-variable \fIvarName\fR is checked to see if an element by the 
-specified font exists.  If there is such an element, then the font
-information contained in that element is used in the PostScript
-output.  (If the point size is omitted from the list, the point size
-of the X font is used).  Otherwise the X font is examined in an
-attempt to guess what PostScript font to use.  This works only for
-fonts whose foundry property is \fIAdobe\fR (such as Times, Helvetica,
-Courier, etc.).  If all of this fails then the font defaults to
-\f(CWHelvetica-Bold\fR.
-.TP
-\fB\-decorations \fIboolean\fR
-Indicates whether PostScript commands to generate color backgrounds and 3-D
-borders will be output.  If \fIboolean\fR is false, the graph will
-background will be white and no 3-D borders will be generated. The
-default is \f(CW1\fR.
-.TP
-\fB\-height \fIpixels\fR
-Sets the height of the plot.  This lets you print the bar chart with a
-height different from the one drawn on the screen.  If
-\fIpixels\fR is 0, the height is the same as the widget's height.
-The default is \f(CW0\fR.
-.TP
-\fB\-landscape \fIboolean\fR
-If \fIboolean\fR is true, this specifies the printed area is to be
-rotated 90 degrees.  In non-rotated output the X\-axis of the printed
-area runs along the short dimension of the page (``portrait''
-orientation); in rotated output the X\-axis runs along the long
-dimension of the page (``landscape'' orientation).  Defaults to
-\f(CW0\fR.
-.TP
-\fB\-maxpect \fIboolean\fR
-Indicates to scale the plot so that it fills the PostScript page.
-The aspect ratio of the barchart is still retained.  The default is
-\f(CW0\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the horizontal padding for the left and right page borders.  The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the left border is padded
-by the first distance and the right border by the second.  If
-\fIpad\fR has just one distance, both the left and right borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-pady \fIpad\fR 
-Sets the vertical padding for the top and bottom page borders. The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the top border is padded
-by the first distance and the bottom border by the second.  If
-\fIpad\fR has just one distance, both the top and bottom borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-paperheight \fIpixels\fR
-Sets the height of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default height is
-\f(CW11.0i\fR.
-.TP
-\fB\-paperwidth \fIpixels\fR
-Sets the width of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default width is
-\f(CW8.5i\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the width of the plot.  This lets you generate a plot
-of a width different from that of the widget.  If \fIpixels\fR
-is 0, the width is the same as the widget's width.  The default is
-\f(CW0\fR.
-.PP
-Postscript configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWpostscript\fR and \f(CWPostscript\fR respectively.
-.CS
-option add *Barchart.postscript.Decorations false
-option add *Barchart.Postscript.Landscape   true
-.CE
-.RE
-.TP
-\fIpathName \fBpostscript output \fR?\fIfileName\fR? ?\fIoption value\fR?...
-Outputs a file of encapsulated PostScript.  If a
-\fIfileName\fR argument isn't present, the command returns the
-PostScript. If any \fIoption-value\fR pairs are present, they set
-configuration options controlling how the PostScript is generated.
-\fIOption\fR and \fIvalue\fR can be anything accepted by the
-postscript \fBconfigure\fR operation above.
-.SS "MARKER COMPONENTS"
-Markers are simple drawing procedures used to annotate or highlight
-areas of the graph.  Markers have various types: text strings,
-bitmaps, images, connected lines, windows, or polygons.  They can be
-associated with a particular element, so that when the element is
-hidden or un-hidden, so is the marker.  By default, markers are the
-last items drawn, so that data elements will appear in
-behind them.  You can change this by configuring the \fB\-under\fR
-option.
-.PP
-Markers, in contrast to elements, don't affect the scaling of the
-coordinate axes.  They can also have \fIelastic\fR coordinates
-(specified by \f(CW-Inf\fR and \f(CWInf\fR respectively) that translate
-into the minimum or maximum limit of the axis.  For example, you can
-place a marker so it always remains in the lower left corner of the
-plotting area, by using the coordinates \f(CW-Inf\fR,\f(CW-Inf\fR.
-.PP
-The following operations are available for markers.
-.TP
-\fIpathName \fBmarker after \fImarkerId\fR ?\fIafterId\fR?
-Changes the order of the markers, drawing the first
-marker after the second.  If no second \fIafterId\fR argument is
-specified, the marker is placed at the end of the display list.  This
-command can be used to control how markers are displayed since markers
-are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker before \fImarkerId\fR ?\fIbeforeId\fR?
-Changes the order of the markers, drawing the first
-marker before the second.  If no second \fIbeforeId\fR argument is
-specified, the marker is placed at the beginning of the display list.
-This command can be used to control how markers are displayed since
-markers are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a marker with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on graph markers, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBmarker cget \fIoption\fR
-Returns the current value of the marker configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below in the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBmarker configure \fImarkerId\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for markers.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fImarkerId\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the marker option \fIoption\fR is set to \fIvalue\fR.
-.sp
-The following options are valid for all markers.
-Each type of marker also has its own type-specific options.  
-They are described in the sections below.
-.RS
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for the marker.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events for markers are handled.  Each tag in the list matching the 
-current event sequence will have its Tcl command executed.  Implicitly 
-the name of the marker is always the first tag in the list.
-The default value is \f(CWall\fR.
-.TP
-\fB\-coords \fIcoordList\fR
-Specifies the coordinates of the marker.  \fICoordList\fR is 
-a list of graph-coordinates.  The number of coordinates required
-is dependent on the type of marker.  Text, image, and window markers
-need only two coordinates (an X\-Y coordinate).   Bitmap markers
-can take either two or four coordinates (if four, they represent the
-corners of the bitmap). Line markers
-need at least four coordinates, polygons at least six.
-If \fIcoordList\fR is \f(CW""\fR, the marker will not be displayed.
-The default is \f(CW""\fR.
-.TP
-\fB\-element \fIelemName\fR
-Links the marker with the element \fIelemName\fR.  The marker is
-drawn only if the element is also currently displayed (see the
-element's \fBshow\fR operation).  If \fIelemName\fR is \f(CW""\fR, the
-marker is always drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-hide \fIboolean\fR 
-Indicates whether the marker is drawn. If \fIboolean\fR is true,
-the marker is not drawn.  The default is \f(CWno\fR.
-.TP
-\fB\-mapx \fIxAxis\fR 
-Specifies the X\-axis to map the marker's X\-coordinates onto.
-\fIXAxis\fR must the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to map the marker's Y\-coordinates onto.
-\fIYAxis\fR must the name of an axis.  The default is \f(CWy\fR.
-.TP
-\fB\-name \fImarkerId\fR
-Changes the identifier for the marker.  The identifier \fImarkerId\fR 
-can not already be used by another marker.  If this option
-isn't specified, the marker's name is uniquely generated.
-.TP
-\fB\-under \fIboolean\fR
-Indicates whether the marker is drawn below/above data
-elements.  If \fIboolean\fR is true, the marker is be drawn
-underneath the data elements.  Otherwise, the marker is
-drawn on top of the element.  The default is \f(CW0\fR.
-.TP
-\fB\-xoffset \fIpixels\fR
-Specifies a screen distance to offset the marker horizontally. 
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.TP
-\fB\-yoffset \fIpixels\fR
-Specifies a screen distance to offset the markers vertically.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.PP
-Marker configuration options may also be set by the \fBoption\fR command.
-The resource class is either \f(CWBitmapMarker\fR,  \f(CWImageMarker\fR, 
-\f(CWLineMarker\fR, \f(CWPolygonMarker\fR, \f(CWTextMarker\fR, or \f(CWWindowMarker\fR,
-depending on the type of marker.  The resource name is the name of the
-marker.
-.CS
-option add *Barchart.TextMarker.Foreground white
-option add *Barchart.BitmapMarker.Foreground white
-option add *Barchart.m1.Background     blue
-.CE
-.RE
-.TP
-\fIpathName \fBmarker create \fItype\fR ?\fIoption value\fR?...
-Creates a marker of the selected type. \fIType\fR may be either
-\f(CWtext\fR, \f(CWline\fR, \f(CWbitmap\fR, \f(CWimage\fR, \f(CWpolygon\fR, or
-\f(CWwindow\fR.  This command returns the marker identifier, 
-used as the \fImarkerId\fR argument in the other marker-related
-commands.  If the \fB\-name\fR option is used, this overrides the
-normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old.
-.TP
-\fIpathName \fBmarker delete\fR ?\fIname\fR?...
-Removes one of more markers.  The graph will automatically be redrawn
-without the marker.\fR.  
-.TP
-\fIpathName \fBmarker exists \fImarkerId\fR 
-Returns \f(CW1\fR if the marker \fImarkerId\fR exists and \f(CW0\fR
-otherwise.
-.TP
-\fIpathName \fBmarker names\fR ?\fIpattern\fR?  
-Returns the names of all the markers that currently exist.  If
-\fIpattern\fR is supplied, only those markers whose names match it
-will be returned.
-.TP
-\fIpathName \fBmarker type \fImarkerId\fR 
-Returns the type of the marker given by \fImarkerId\fR, such as
-\f(CWline\fR or \f(CWtext\fR.  If \fImarkerId\fR is not a valid a marker
-identifier, \f(CW""\fR is returned.
-.SS "BITMAP MARKERS"
-A bitmap marker displays a bitmap.  The size of the
-bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the
-bitmap.  The bitmap retains its normal width and height.  If four
-coordinates, the first and second pairs of coordinates represent the
-corners of the bitmap.  The bitmap will be stretched or reduced as
-necessary to fit into the bounding rectangle.
-.PP
-Bitmap markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create bitmap \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, each 
-sets a configuration options for the marker.  These
-same \fIoption\fR\-\fIvalue\fR pairs may be used with the marker's
-\fBconfigure\fR operation.
-.PP
-The following options are specific to bitmap markers:
-.TP
-\fB\-background \fIcolor\fR
-Same as the \fB\-fill\fR option.
-.TP
-\fB\-bitmap \fIbitmap\fR
-Specifies the bitmap to be displayed.  If \fIbitmap\fR is \f(CW""\fR,
-the marker will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the bitmap.  If \fIcolor\fR is the empty
-string, no background will be transparent.  The default background color is
-\f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Same as the \fB\-outline\fR option.
-.TP
-\fB\-mask \fImask\fR
-Specifies a mask for the bitmap to be displayed. This mask is a bitmap
-itself, denoting the pixels that are transparent.  If \fImask\fR is
-\f(CW""\fR, all pixels of the bitmap will be drawn.  The default is
-\f(CW""\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the foreground color of the bitmap. The default value is \f(CWblack\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Sets the rotation of the bitmap.  \fITheta\fR is a real number
-representing the angle of rotation in degrees.  The marker is first
-rotated and then placed according to its anchor position.  The default
-rotation is \f(CW0.0\fR.
-.SS "IMAGE MARKERS"
-A image marker displays an image.  Image markers are
-created with the marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create image \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to image markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the image relative to the
-positioning point for the image. For example, if \fIanchor\fR
-is \f(CWcenter\fR then the image is centered on the point;  if
-\fIanchor\fR is \f(CWn\fR then the image will be drawn such that
-the top center point of the rectangular region occupied by the
-image will be at the positioning point.
-This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-image \fIimage\fR
-Specifies the image to be drawn.
-If \fIimage\fR is \f(CW""\fR, the marker will not be
-drawn.  The default is \f(CW""\fR.
-.SS "LINE MARKERS"
-A line marker displays one or more connected line segments.
-Line markers are created with marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create line \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to line markers:
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the line. \fIDashList\fR is a list of up to 11
-numbers that alternately represent the lengths of the dashes and gaps
-on the line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the marker line will be solid.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the line.  This color is used with
-striped lines (see the \fB\-fdashes\R option). If \fIcolor\fR is
-the empty string, no background color is drawn (the line will be
-dashed, not striped).  The default background color is \f(CW""\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the lines.
-The default width is \f(CW0\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the foreground color of the line. The default value is \f(CWblack\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern used to draw the line, rather than
-a solid line.
-\fIBitmap\fR specifies a bitmap to use as the stipple
-pattern.  If \fIbitmap\fR is \f(CW""\fR, then the
-line is drawn in a solid fashion. The default is \f(CW""\fR.
-.SS "POLYGON MARKERS"
-A polygon marker displays a closed region described as two or more
-connected line segments.  It is assumed the first and
-last points are connected.  Polygon markers are created using the
-marker \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create polygon \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the \fBmarker configure\fR command to change the marker's
-configuration.
-The following options are supported for polygon markers:
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the outline of the polygon. \fIDashList\fR is a
-list of up to 11 numbers that alternately represent the lengths of
-the dashes and gaps on the outline.  Each number must be between 1 and
-255. If \fIdashList\fR is \f(CW""\fR, the outline will be a solid line.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the fill color of the polygon.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the polygon is transparent.
-The default is \f(CWwhite\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the outline of the polygon. If \fIpixels\fR is zero, 
-no outline is drawn. The default is \f(CW0\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the color of the outline of the polygon.  If the polygon is
-stippled (see the \fB\-stipple\fR option), then this represents the
-foreground color of the stipple.  The default is \f(CWblack\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies that the polygon should be drawn with a stippled pattern
-rather than a solid color. \fIBitmap\fR specifies a bitmap to use as
-the stipple pattern.  If \fIbitmap\fR is \f(CW""\fR, then the polygon is
-filled with a solid color (if the \fB\-fill\fR option is set).  The
-default is \f(CW""\fR.
-.SS "TEXT MARKERS"
-A text marker displays a string of characters on one or more lines of
-text.  Embedded newlines cause line breaks.  They may be used to
-annotate regions of the graph.  Text markers are created with the
-\fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create text \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, 
-each sets a configuration option for the text marker.  
-These same \fIoption\fR\-\fIvalue\fR pairs may be used with the 
-marker's \fBconfigure\fR operation.  
-.PP
-The following options are specific to text markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the text relative to the
-positioning point for the text. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the text is centered on the point; if
-\fIanchor\fR is \f(CWn\fR then the text will be drawn such that the
-top center point of the rectangular region occupied by the text will
-be at the positioning point.  This default is \f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Same as the \fB\-fill\fR option.
-.TP
-\fB\-font \fIfontName\fR
-Specifies the font of the text.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-120-*\fR.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the text.  If \fIcolor\fR is the empty
-string, no background will be transparent.  The default background color is
-\f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR
-Same as the \fB\-outline\fR option.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the text should be justified.  This matters only when
-the marker contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the color of the text. The default value is \f(CWblack\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the text.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the text is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the text.  \fIPad\fR can be a list of
-one or two screen distances.  If \fIpad\fR has two elements, the area above the
-text is padded by the first distance and the area below by the second.
-If \fIpad\fR is just one distance, both the top and bottom areas
-are padded evenly.  The default is \f(CW4\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the number of degrees to rotate the text.  \fITheta\fR is a
-real number representing the angle of rotation.  The marker is first
-rotated along its center and is then drawn according to its anchor
-position. The default is \f(CW0.0\fR.
-.TP
-\fB\-text \fItext\fR
-Specifies the text of the marker.  The exact way the text is
-displayed may be affected by other options such as \fB\-anchor\fR or
-\fB\-rotate\fR.
-.SS "WINDOW MARKERS"
-A window marker displays a widget at a given position.
-Window markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create window \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR command.
-.PP
-The following options are specific to window markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the widget relative to the
-positioning point for the widget. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the widget is centered on the point; if \fIanchor\fR
-is \f(CWn\fR then the widget will be displayed such that the top center
-point of the rectangular region occupied by the widget will be at the
-positioning point.  This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the height to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever height the widget requests internally.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the width to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever width the widget requests internally.
-.TP
-\fB\-window \fIpathName\fR
-Specifies the widget to be managed by the barchart.  \fIPathName\fR must
-be a child of the \fBbarchart\fR widget.
-.SH "GRAPH COMPONENT BINDINGS"
-Specific barchart components, such as elements, markers and legend
-entries, can have a command trigger when event occurs in them, much
-like canvas items in Tk's canvas widget.  Not all event sequences are
-valid.  The only binding events that may be specified are those
-related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR,
-\fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR).
-.PP
-Only one element or marker can be picked during an event.  This means,
-that if the mouse is directly over both an element and a marker, only
-the uppermost component is selected.  This isn't true for legend entries.  
-Both a legend entry and an element (or marker) binding commands 
-will be invoked if both items are picked.
-.PP
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the
-element name and another is associated with one of the element's tags
-(see the \fB\-bindtags\fR option).  When this occurs, all of the 
-matching bindings are invoked.  A binding associated with the element
-name is invoked first, followed by one binding for each of the element's 
-bindtags.  If there are multiple matching bindings for a single tag, 
-then only the most specific binding is invoked.  A continue command 
-in a binding script terminates that script, and a break command 
-terminates that script and skips any remaining scripts for the event, 
-just as for the bind command.
-.PP
-The \fB\-bindtags\fR option for these components controls addition
-tag names which can be matched.  Implicitly elements and markers
-always have tags matching their names.  Setting the value of
-the \fB\-bindtags\fR option doesn't change this.
-.SH "C LANGUAGE API"
-You can manipulate data elements from the C language.  There
-may be situations where it is too expensive to translate the data
-values from ASCII strings.  Or you might want to read data in a
-special file format.
-.PP
-Data can manipulated from the C language using BLT vectors.
-You specify the X-Y data coordinates of an element as vectors and
-manipulate the vector from C.  The barchart will be redrawn automatically
-after the vectors are updated.
-.PP
-From Tcl, create the vectors and configure the element to use them.
-.CS
-vector X Y
-\&.g element configure line1 -xdata X -ydata Y
-.CE
-To set data points from C, you pass the values as arrays of doubles
-using the \fBBlt_ResetVector\fR call.  The vector is reset with the
-new data and at the next idle point (when Tk re-enters its event
-loop), the graph will be redrawn automatically.
-.CS
-#include <tcl.h>
-#include <blt.h>
-
-register int i;
-Blt_Vector *xVec, *yVec;
-double x[50], y[50];
-
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */
-if ((Blt_GetVector(interp, "X", 50, &xVec) != TCL_OK) ||
-    (Blt_GetVector(interp, "Y", 50, &yVec) != TCL_OK)) {
-    return TCL_ERROR;
-}
-
-for (i = 0; i < 50; i++) {
-    x[i] = i * 0.02;
-    y[i] = sin(x[i]);
-}	
-
-/* Put the data into BLT vectors */
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {
-   return TCL_ERROR;
-}
-.CE
-See the \fBvector\fR manual page for more details.
-.SH SPEED TIPS
-There may be cases where the bar chart needs to be drawn and updated as
-quickly as possible.  If drawing speed becomes a big
-problem, here are a few tips to speed up displays.
-.TP 2
-\(bu 
-Try to minimize the number of data points.  The more data points 
-looked at, the more work the bar chart must do.  
-.TP 2
-\(bu 
-If your data is generated as floating point values, the time required
-to convert the data values to and from ASCII strings can be
-significant, especially when there any many data points.  You can
-avoid the redundant string-to-decimal conversions using the C API to
-BLT vectors.
-.TP 2
-\(bu
-Don't stipple or dash the element.  Solid bars are much faster.
-.TP 2
-\(bu 
-If you update data elements frequently, try turning off the
-widget's \fB\-bufferelements\fR option.  When the bar chart is first
-displayed, it draws data elements into an internal pixmap.  The pixmap
-acts as a cache, so that when the bar chart needs to be redrawn again, and
-the data elements or coordinate axes haven't changed, the pixmap is
-simply copied to the screen.  This is especially useful when you are
-using markers to highlight points and regions on the bar chart.  But if
-the bar chart is updated frequently, changing either the element data or
-coordinate axes, the buffering becomes redundant.
-.SH LIMITATIONS
-Auto-scale routines do not use requested min/max limits
-as boundaries when the axis is logarithmically scaled.  
-.PP
-The PostScript output generated for polygons with more than 1500
-points may exceed the limits of some printers (See PostScript Language
-Reference Manual, page 568).  The work-around is to break the polygon
-into separate pieces.
-.SH KEYWORDS
-bar chart, widget
diff --git a/blt3.0/man/beep.mann b/blt3.0/man/beep.mann
deleted file mode 100644
index ced245c..0000000
--- a/blt3.0/man/beep.mann
+++ /dev/null
@@ -1,48 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-.so man.macros
-.TH beep n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-beep \- ring the bell
-.SH SYNOPSIS
-\fBbeep\fR ?\fIpercent\fR?
-.BE
-.SH DESCRIPTION
-The \fBbeep\fR command rings the keyboard bell.  \fIPercent\fR is
-relative to the base volume of the keyboard bell and can range from
--100 to 100 inclusive.
-.PP
-If \fIpercent\fR is nonnegative then the bell volume is:
-.CS
-base - [(base * \fIpercent\fR) / 100] + \fIpercent\fR
-.CE
-If \fIpercent\fR is negative then the bell volume is:
-.CS C
-base + [(base * \fIpercent\fR) / 100]
-.CE
-The default \fIpercent\fR is 50.
-.SH EXAMPLE
-.CS
-beep
-.CE
-.SH KEYWORDS
-bell, beep
diff --git a/blt3.0/man/bgexec.mann b/blt3.0/man/bgexec.mann
deleted file mode 100644
index 82d7a45..0000000
--- a/blt3.0/man/bgexec.mann
+++ /dev/null
@@ -1,309 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Bgexec command created by George Howlett.
-'\"
-.so man.macros
-.TH bgexec n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBbgexec\fR \- Run programs in the background while handling Tk events.
-.SH SYNOPSIS
-\fBblt::bgexec \fIvarName\fR ?\fIoption value\fR?... \fIprogram\fR ?\fIarg\fR?...
-.BE
-.SH DESCRIPTION
-.PP
-The \fBbgexec\fR command executes programs in the background,
-allowing Tk to handle events.  A global Tcl variable \fIvarName\fR is
-set when the program has completed.
-.SH INTRODUCTION
-Tcl's \fBexec\fR command is very useful for gathering information from
-the operating system.  It runs a program and returns the output as its 
-result.  This works well for Tcl-only applications. But
-for Tk applications, a problem occurs when the program takes time to
-process.  Let's say we want the get the disk usage of a
-directory.  We'll use the Unix program \f(CWdu\fR to get the summary.
-.CS
-set out [exec du -s $dir]
-puts "Disk usage for $dir is $out"
-.CE
-While \f(CWdu\fR is running, scrollbars won't respond.  None of the Tk
-widgets will be redrawn properly.  The \fBsend\fR command won't work.
-And the worst part is that the application appears hung up or dead.
-The problem is that while \fBexec\fR is waiting for \fIdu\fR to
-finish, Tk is not able to handle X events.
-.PP
-The \fBbgexec\fR command performs the same functions as \fBexec\fR,
-but also allows Tk to handle events.  You can execute a long-running
-program and the Tk widgets will behave normally.  When the
-program finishes, its output and the exit status are written to Tcl
-variables.  This makes it easy to monitor and save the output of a
-program.
-.SH EXAMPLE
-Here is the disk usage example again, this time using \fBbgexec\fR.
-The syntax to invoke "du" is exactly the same as the previous
-example, when we used \fBexec\fR.
-.CS
-global myStatus myOutput
-blt::bgexec myStatus -output myOutput du -s $dir
-puts "Disk usage for $dir is $myOutput"
-.CE
-Two global variables, \f(CWmyStatus\fR and \f(CWmyOutput\fR, will be set by
-\fBbgexec\fR when \f(CWdu\fR has completed. \f(CWMyStatus\fR
-will contain the program's exit status.  \f(CWMyOutput\fR, specified by the
-\fB\-output\fR option, will store the output of the program.
-.PP
-You can also terminate the program by setting the variable
-\f(CWmyStatus\fR.  If \f(CWmyStatus\fR is set before \f(CWdu\fR has
-completed, the process is killed. Under Unix, this is done sending by
-a configurable signal (by default it's SIGKILL). Under Win32, this
-is done by calling \fBTerminateProcess\fR. It makes no
-difference what \f(CWmyStatus\fR is set to.
-.CS
-set myStatus {}
-.CE
-There are several \fBbgexec\fR options to collect different types of
-information.
-.CS
-global myStatus myOutput myErrs
-blt::bgexec myStatus -output myOutput -error myErrs du -s $dir
-.CE
-The \fB\-error\fR option is similar to \fB\-output\fR.  It sets a global
-variable when the program completes.  The variable will contain
-any data written to stderr by the program.
-.PP
-The \fB\-output\fR and \fB\-error\fR variables are set only
-after the program completes.  But if the program takes a long time, to
-run you may want to receive its partial output.  You can gather data
-as it becomes available using the \fB\-onoutput\fR option.  It
-specifies a Tcl command prefix.  Whenever new data is available, this
-command is executed, with the data appended as an argument to the
-command.
-.CS
-proc GetInfo { data } {
-    puts $data
-}
-blt::bgexec myStatus -onoutput GetInfo du -s $dir
-.CE
-When output is available, the procedure \f(CWGetInfo\fR is called.
-The \fB\-onerror\fR option performs a similar function for the stderr
-data stream.
-.PP
-Like \fBexec\fR, \fBbgexec\fR returns an error if the exit code of the
-program is not zero.  If you think you may get a non-zero exit
-code, you might want to invoke \fBbgexec\fR from within a \fBcatch\fR.
-.CS
-catch { blt::bgexec myStatus -output myOutput du -s $dir }
-.CE
-By default, \fBbgexec\fR will wait for the program to finish.
-But you can detach the program making ampersand (&) the last
-argument on the command line.
-.CS
-global myStatus myOutput
-blt::bgexec myStatus -output myOutput du -s $dir &
-.CE
-\fBBgexec\fR will return immediately and its result will be a list of
-the spawned process ids.  If at some point you need to wait for the
-program to finish up, you can use \fBtkwait\fR.  When the program
-finishes, the variable \f(CWmyStatus\fR will be written to, breaking
-out the \fBtkwait\fR command.
-.CS
-global myStatus myOutput
-blt::bgexec myStatus -output myOutput du -s $dir &
-	...
-tkwait variable myStatus
-.CE
-.SH SYNTAX
-The \fBbgexec\fR command takes the following form:
-.sp
-\fB	blt::bgexec \fIvarName\fR ?\fIoption value\fR?... \fIprogram\fR ?\fIarg\fR?...
-.sp
-\fIVarName\fR is the name of a global variable which is set when 
-\fIprogram\fR has finished executing.  The exit status of
-will be stored in \fIvarName\fR.  The exit status is a
-list of a status token, the process-id of the program, the exit code,
-and a status message.  You can also prematurely terminate the program
-by setting \fIvarName\fR.  Under Unix, the program will be sent a signal to
-terminate it (by default the signal is a SIGKILL; see the
-\fB\-killsignal\fR option).
-.PP
-\fIProgram\fR is the name of the program to be executed and \fIargs\fR
-are any extra arguments for \fIprogram\fR.  The syntax of
-\fIprogram\fR and \fIargs\fR is the same as the \fBexec\fR command. So
-you can redirect I/O, execute pipelines, etc. (see the \fBexec\fR
-manual for further information) just like \fBexec\fR.  If the last
-argument is an ampersand (&), the program will be run detached, and
-\fBbgexec\fR will return immediately.  \fIVarName\fR will still be set
-with the return status when \fIprogram\fR completes.
-.SH OPTIONS
-\fIOption\fR refers to the switch name always beginning with a dash (\-).
-\fIValue\fR is the value of the option.  Option-value pairs are
-terminated either by the program name, or double dashes (\-\-).
-The following options are available for \fBbgexec\fR:
-.TP 
-\fB\-decodeerror \fIencodingName\fR 
-.br
-Specifies the encoding of the stderr channel.
-This affects only data returned to the Tcl interpreter.  No translation 
-is done on file redirection.
-.br
-For example if data is to be converted from Unicode for use in Tcl,
-you would use the "unicode" encoding. The default is that no 
-tranlation is performed.
-.TP 
-\fB\-decodeoutput \fIencodingName\fR 
-.br
-Specifies the encoding of the stdout channels.
-This affects only data returned to the Tcl interpreter.  No translation 
-is done on file redirection.
-.br
-For example if data is to be converted from Unicode for use in Tcl,
-you would use the "unicode" encoding. The default is that no 
-tranlation is performed.
-.TP 
-\fB\-error \fIvarName\fR 
-.br
-Specifies that a global variable \fIvarName\fR is to be set with the
-contents of stderr after the program has completed. 
-.TP 
-\fB\-keepnewline \fIboolean\fR
-Specifies that a trailing newline should be retained in the 
-output. If \fIboolean\fR is true, the trailing newline is truncated
-from the output of the \fB\-onoutput\fR and \fB\-output\fR variables.  
-The default value is \f(CWtrue\fR.
-.TP 
-\fB\-killsignal \fIsignal\fR
-Specifies the signal to be sent to the program when 
-terminating. This is available only under Unix. 
-\fISignal\fR can either be a number (typically 1-32) or
-a mnemonic (such as SIGINT). If \fIsignal\fR is the empty string, 
-then no signal is sent.  The default signal is \f(CW9\fR (SIGKILL).
-.TP 
-\fB\-lasterror \fIvarName\fR
-Specifies a variable \fIvarName\fR that is updated whenever data
-becomes available from standard error of the program.
-\fIVarName\fR is a global variable. Unlike the \fB\-error\fR option,
-data is available as soon as it arrives.
-.TP 
-\fB\-lastoutput \fIvarName\fR 
-Specifies a variable \fIvarName\fR that is updated whenever data
-becomes available from standard output of the program.
-\fIVarName\fR is a global variable. Unlike the \fB\-output\fR option,
-data is available as soon as it arrives.
-.TP 
-\fB\-linebuffered \fIboolean\fR
-Specifies that updates should be made on a line-by-line basis.
-Normally when new data is available \fBbgexec\fR will set the variable
-(\fB\-lastoutput\fR and \fB\-lasterror\fR options) or invoke the
-command (\fB\-onoutput\fR and \fB\-onerror\fR options) delivering all
-the new data currently available.  If \fIboolean\fR is true, only one
-line at a time will be delivered.  This can be useful when you want to
-process the output on a line-by-line basis.  
-The default value is
-\f(CWfalse\fR.
-.TP 
-\fB\-output \fIvarName\fR
-.br
-Specifies that a global variable \fIvarName\fR is to be set with the
-output of the program, once it has completed.  If this option 
-is not set, no output will be accumulated.
-.TP 
-\fB\-onerror \fIcommand\fR
-Specifies the start of a Tcl command that will be executed
-whenever new data is available from standard error. The data
-is appended to the command as an extra argument before it is
-executed.
-.TP 
-\fB\-onoutput \fIcommand\fR 
-Specifies the start of a Tcl command that will be executed
-whenever new data is available from standard output. The data
-is appended to the command as an extra argument before it is
-executed.
-.TP 
-\fB\-update \fIvarName\fR 
-Deprecated. This option is replaced by \fB\-lasterror\fR.
-.TP 
-\fB\-\|\-\fR
-This marks the end of the options.  The following argument will
-be considered the name of a program even if it starts with 
-a dash (\fB\-\fR).
-.SH PREEMPTION
-Because \fBbgexec\fR allows Tk to handle events while a program is
-running, it's possible for an application to preempt itself with
-further user-interactions.  Let's say your application has a button
-that runs the disk usage example.  And while the \f(CWdu\fR program is
-running, the user accidently presses the button again.  A second
-\fBbgexec\fR program will preempt the first.  What this means is that
-the first program can not finish until the second program has
-completed.
-.PP
-Care must be taken to prevent an application from preempting itself by
-blocking further user-interactions (such as button clicks).  The BLT
-\fBbusy\fR command is very useful for just these situations.
-See the \fBbusy\fR manual for details.
-.SH DIFFERENCES WITH FILEEVENT
-Since Tk 4.0, a subset of \fBbgexec\fR can be also achieved using the
-\fBfileevent\fR command.  The steps for running a program in the
-background are:
-.PP
-Execute the program with the \fBopen\fR command (using the "|"
-syntax) and save the file handle.
-.CS
-global fileId 
-set fileId [open "|du -s $dir" r]
-.CE
-Next register a Tcl code snippet with \fBfileevent\fR to be run
-whenever output is available on the file handle.  The code snippet
-will read from the file handle and save the output in a variable.
-.CS
-fileevent fileId readable { 
-    if { [gets $fileId line] < 0 } {
-	close $fileId
-	set output $temp
-	unset fileId temp
-    } else {
-	append temp $line
-    }
-}
-.CE
-.PP
-The biggest advantage of \fBbgexec\fR is that, unlike \fBfileevent\fR,
-it requires no additional Tcl code to run a program.  It's simpler and
-less error prone.  You don't have to worry about non-blocking I/O.
-It's handled tranparently for you.
-.PP
-\fBBgexec\fR runs programs that \fBfileevent\fR can not.
-\fBFileevent\fR assumes that the when stdout is closed the program has
-completed.  But some programs, like the Unix \f(CWcompress\fR program,
-reopen stdout, fooling \fBfileevent\fR into thinking the program has
-terminated.  In the example above, we assume that the program will
-write and flush its output line-by-line.  However running another
-program, your application may block in the \fBgets\fR command reading
-a partial line.
-.PP
-\fBBgexec\fR lets you get back the exit status of the program. It also
-allows you to collect data from both stdout and stderr simultaneously.
-Finally, since data collection is handled in C code, \fBbgexec\fR is
-faster. You get back to the Tk event loop more quickly, making your
-application seem more responsive.
-.SH SEE ALSO
-busy, exec, tkwait
-.SH KEYWORDS
-exec, background, busy
diff --git a/blt3.0/man/bitmap.mann b/blt3.0/man/bitmap.mann
deleted file mode 100644
index 437f84a..0000000
--- a/blt3.0/man/bitmap.mann
+++ /dev/null
@@ -1,219 +0,0 @@
-'\"
-'\" Copyright 1991-2001 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Bitmap command created by George Howlett.
-'\"
-.so man.macros
-.TH bitmap n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBbitmap\fR \- Define a new bitmap from a Tcl script
-.SH SYNOPSIS
-\fBblt::bitmap define \fIbitmapName data\fR ?\fIoption value\fR?...
-.sp
-\fBblt::bitmap compose \fIbitmapName text\fR ?\fIoption value\fR?...
-.sp
-\fBblt::bitmap exists \fIbitmapName\fR
-.sp
-\fBblt::bitmap source \fIbitmapName\fR
-.sp
-\fBblt::bitmap data \fIbitmapName\fR
-.sp
-\fBblt::bitmap height \fIbitmapName\fR
-.sp
-\fBblt::bitmap width \fIbitmapName\fR
-.BE
-.SH DESCRIPTION
-The \fBbitmap\fR command lets you create new bitmaps directly from your
-Tcl script.  The bitmap can be specified as a list of data or a text string
-which is converted into a bitmap.  You can arbitrarily scale
-or rotate the bitmap too.
-.SH INTRODUCTION
-Bitmaps are commonly used within Tk.  In label and button widgets, you
-display bitmaps them instead of text strings and in the canvas and
-text widgets, they're used for stippling.  But Tk let's you can create
-new bitmaps only by reading the bitmap data from a file.  This makes
-bitmaps cumbersome to manage, especially in packaging the program as a
-\fBwish\fR script, since each bitmap must be its own file.  It would
-be nicer if you could create new bitmaps directly from your Tcl script.
-.PP
-The \fBbitmap\fR command lets you do just that.  You can specify the
-bitmap as in various formats (such as the X11 bitmap format).  You can
-also compose a bitmap from a text string.  The \fBbitmap\fR command
-also lets you and arbitrarily rotate or scale the bitmap.  For example, you
-could use this to create button widgets with the text label rotated 90
-degrees.
-.SH EXAMPLE
-You can define a new bitmap with the \fBdefine\fR operation.  For
-example, let's say you are using the X11 bitmap "gray1".  Normally to
-use it, you would specify the location of the file.
-.CS
-label .l -bitmap @/usr/X11R6/include/X11/bitmaps/gray1
-.CE
-But you can simply cut and paste the contents of "gray1" into the 
-\fBbitmap\fR command.
-.CS
-blt::bitmap define gray1 {
-    #define gray1_width 2
-    #define gray1_height 2
-    static char gray1_bits[] = {
-       0x01, 0x02};
-}
-label .l -bitmap gray1
-.CE
-Tk will recognize "gray1" as a bitmap which can now be used with any
-widget that accepts bitmaps.
-.CS
-.barchart element configure elem1 -stipple gray1
-.CE
-The bitmap data can be specified in a mulitude of forms.
-The following commands are all equivalent.
-.CS
-blt::bitmap define gray1 {
-    #define gray1_width 2
-    #define gray1_height 2
-    static char gray1_bits[] = {
-       0x01, 0x02};
-}
-blt::bitmap define gray1 { { 2 2 } { 0x01, 0x02 } }
-blt::bitmap define gray1 { { 2 2 } { 0x01 0x02 } }
-blt::bitmap define gray1 { { 2 2 } { 1 2 } }
-.CE
-Either the data is in the standard X11 bitmap form, or it's a list of
-two lists. The first list contains the height and width of the bitmap.
-The second list is the bitmap source data.  Each element of that list
-is an hexadecimal number specifying which pixels are foreground (1)
-and which are background (0) of the bitmap.  Note that the format of
-the source data is exactly that of the XBM format. 
-.P
-You can scale or rotate the bitmap as you create it, by using the
-\fB-scale\fR or\fB-rotate\fR options.
-.CS
-blt::bitmap define gray1 {
-    #define gray1_width 2
-    #define gray1_height 2
-    static char gray1_bits[] = {
-       0x01, 0x02};
-} -scale 2.0 -rotate 90.0
-.CE
-In addition, you can compose bitmaps from text strings.  This makes it
-easy to create rotated buttons or labels.  The text string can have
-multi-line.  
-.CS
-blt::bitmap compose rot_text "This is rotated\\ntext" \\
-	-rotate 90.0 -font fixed
-.CE
-There are also a number of ways to query bitmaps.  This isn't limited
-to bitmaps that you create, but any bitmap.
-.CS
-blt::bitmap exists rot_text
-blt::bitmap width rot_text
-blt::bitmap height rot_text
-blt::bitmap data rot_text
-blt::bitmap source rot_text
-.CE
-The \fBexists\fR operation indicates if a bitmap by that name is
-defined.  You can query the dimensions of the bitmap using the
-\fBwidth\fR and \fBheight\fR operations. The \fBdata\fR operation
-returns the list of the data used to create the bitmap.  
-For example, you could query the data of a bitmap and \fBsend\fR 
-it across the network to another Tk application.
-.CS
-set data [blt::bitmap data @/usr/X11R6/include/X11/bitmaps/ghost.xbm]
-send {wish #2} blt::bitmap define ghost $data
-.CE
-.SH OPERATIONS
-The following operations are available for \fBbitmap\fR:
-.TP
-\fBblt::bitmap compose \fIbitmapName text \fR?\fIoption value\fR?...
-Creates a bitmap \fIbitmapName\fR from the text string \fItext\fR.
-A bitmap \fIbitmapName\fR can not already exist.  
-The following options are available.
-.RS
-.TP
-\fB\-font \fIfontName\fR 
-Specifies a font to use when drawing text into the bitmap.
-If this option isn't specified then \fIfontName\fR defaults to 
-\f(CW*-Helvetica-Bold-R-Normal-*-140-*\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the angle of rotation of the text in the bitmap.
-\fITheta\fR is a real number representing the angle in degrees.
-It defaults to \f(CW0.0\fR degrees.
-.TP
-\fB\-scale \fIvalue\fR
-Specifies the scale of the bitmap.
-\fIValue\fR is a real number representing the scale.  A scale
-of 1.0 indicates no scaling is necessary, while 2.0 would
-double the size of the bitmap.  There is no way to specify
-differents scales for the width and height of the bitmap.
-The default scale is \f(CW1.0\fR.
-.RE
-.TP
-\fBblt::bitmap data \fIbitmapName\fR 
-Returns a list of both the
-dimensions of the bitmap \fIbitmapName\fR and its source data.
-.TP
-\fBblt::bitmap define \fIbitmapName data\fR \fR?\fIoption value\fR?...
-Associates \fIbitmapName\fR with in-memory bitmap data so that
-\fIbitmapName\fR can be used in later calls to \fBTk_GetBitmap\fR.
-The \fIbitmapName\fR argument is the name of the bitmap; it must not
-previously have been defined in either a call to Tk_DefineBitmap or
-\fBbitmap\fR.  The argument \fIdata\fP describes the bitmap to
-be created.  It is either the X11 bitmap format (a C structure) or
-a list of two lists: the dimensions and source data.  The dimensions 
-are a list of two numbers which are the width
-and height of the bitmap.  The source data is a list of hexadecimal
-values in a format similar to the X11 or X10 bitmap format.  The
-values may be optionally separated by commas and do not need to be
-prefixed with "0x".  The following options are available.
-.RS
-.TP
-\fB\-rotate \fItheta\fR
-Specifies how many degrees to rotate the bitmap.
-\fITheta\fR is a real number representing the angle.
-The default is \f(CW0.0\fR degrees.
-.TP
-\fB\-scale \fIvalue\fR
-Specifies how to scale the bitmap.
-\fIValue\fR is a real number representing the scale.  A scale
-of 1.0 indicates no scaling is necessary, while 2.0 would
-double the size of the bitmap.  There is no way to specify
-differents scales for the width and height of the bitmap.
-The default scale is \f(CW1.0\fR.
-.RE
-.TP
-\fBblt::bitmap exists \fIbitmapName\fR 
-Returns \f(CW1\fR if a bitmap \fIbitmapName\fR exists, otherwise \f(CW0\fR. 
-.TP
-\fBblt::bitmap height \fIbitmapName\fR 
-Returns the height in pixels of the bitmap \fIbitmapName\fR.
-.TP
-\fBblt::bitmap source \fIbitmapName\fR 
-Returns the source data of the bitmap \fIbitmapName\fR. The source data is a 
-list of the hexadecimal values.  
-.TP
-\fBblt::bitmap width \fIbitmapName\fR 
-Returns the width in pixels of the bitmap \fIbitmapName\fR.
-.SH LIMITATIONS
-Tk currently offers no way of destroying bitmaps.  Once a bitmap is
-created, it exists until the application terminates.
-.SH KEYWORDS
-bitmap
diff --git a/blt3.0/man/bltdebug.mann b/blt3.0/man/bltdebug.mann
deleted file mode 100644
index ecb3f86..0000000
--- a/blt3.0/man/bltdebug.mann
+++ /dev/null
@@ -1,38 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-.so man.macros
-.TH bltdebug n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-bltdebug \- print Tcl commands before execution
-.SH SYNOPSIS
-\fBbltdebug\fR ?\fIlevel\fR?
-.BE
-.SH DESCRIPTION
-The \fBbltdebug\fR command is a simple tracing facility for Tcl commands.
-Each command line is printed before it is executed on standard error.
-The output consists of the command line both before and after
-substitutions have occurred.  \fILevel\fR indicates at what level to
-stop tracing commands.  If \fIlevel\fR is \f(CW0\fR, no tracing is
-performed. This is the default.  If no \fIlevel\fR argument is given,
-the current level is printed.
-.SH KEYWORDS
-debug
diff --git a/blt3.0/man/busy.mann b/blt3.0/man/busy.mann
deleted file mode 100644
index a29f209..0000000
--- a/blt3.0/man/busy.mann
+++ /dev/null
@@ -1,260 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Busy command created by George Howlett.
-'\"
-.so man.macros
-.TH busy n BLT_VERSION BLT "BLT Built-In Commands"
-.BS 
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBbusy\fR \- Make Tk widgets busy, temporarily blocking user interactions.
-.SH SYNOPSIS
-\fBblt::busy hold \fIwindow\fR ?\fIoption value\fR?...
-.sp
-\fBblt::busy release \fIwindow\fR ?\fIwindow\fR?...
-.sp
-\fBblt::busy configure \fIwindow\fR ?\fIoption value\fR?...
-.sp
-\fBblt::busy forget \fIwindow\fR ?\fIwindow\fR?...
-.sp
-\fBblt::busy isbusy \fR?\fIpattern\fR?
-.sp
-\fBblt::busy names \fR?\fIpattern\fR?
-.sp
-\fBblt::busy status \fIwindow\fR 
-.BE
-.SH DESCRIPTION
-.PP
-The \fBbusy\fR command provides a simple means to block
-keyboard, button, and pointer events from Tk widgets, while overriding
-the widget's cursor with a configurable busy cursor.
-.SH INTRODUCTION
-.PP
-There are many times in applications where you want to temporarily
-restrict what actions the user can take.  For example, an application
-could have a "run" button that when pressed causes some processing to
-occur.  But while the application is busy processing, you probably don't
-want the the user to be able to click the "run" button again.  You
-may also want restrict the user from other tasks such as clicking a
-"print" button.
-.PP
-The \fBbusy\fR command lets you make Tk widgets busy. This means
-that user interactions such as button clicks, moving the mouse, typing
-at the keyboard, etc. are ignored by the widget.  You can set a
-special cursor (like a watch) that overrides the widget's normal
-cursor, providing feedback that the application (widget) is
-temporarily busy.
-.PP
-When a widget is made busy, the widget and all of its descendents will
-ignore events.  It's easy to make an entire panel of widgets busy. You
-can simply make the toplevel widget (such as ".") busy.  This is
-easier and far much more efficient than recursively traversing the
-widget hierarchy, disabling each widget and re-configuring its cursor.
-.PP
-Often, the busy command can be used instead of Tk's \fBgrab\fR
-command.  Unlike \fBgrab\fR which restricts all user interactions to
-one widget, with the busy command you can have more than one widget
-active (for example, a "cancel" dialog and a "help" button).
-.SH EXAMPLE
-You can make several widgets busy by simply making its ancestor widget
-busy using the \fBhold\fR operation.
-.CS
-frame .top
-button .top.button; canvas .top.canvas
-pack .top.button .top.canvas
-pack .top
-  . . .
-blt::busy hold .top
-update
-.CE
-All the widgets within \f(CW.top\fR (including \f(CW.top\fR) are now busy.  
-Using \fBupdate\fR insures that \fBbusy\fR command will take effect before
-any other user events can occur.
-.PP
-When the application is no longer busy processing, you can allow user
-interactions again by the \fBrelease\fR operation.
-.nf
-
-\f(CW	blt::busy release .top \fR
-
-.fi
-The busy window has a configurable cursor.  You can change the busy
-cursor using the \fBconfigure\fR operation.
-.nf
-
-\f(CW	blt::busy configure .top -cursor "watch"\fR
-
-.fi
-Finally, when you no longer need to the busy window, 
-invoke the \fBforget\fR operation to free any resources it allocated.
-.nf
-
-\f(CW	blt::busy forget .top \fR
-
-.fi
-Destroying the widget will also clean up any resources allocated by
-the busy command.
-.PP
-.SH OPERATIONS
-The following operations are available for the \fBbusy\fR command:
-.TP
-\fBblt::busy hold \fIwindow\fR ?\fIoption value\fR?...
-Makes the widget \fIwindow\fR (and its descendants in the Tk window
-hierarchy) busy.  \fIWindow\fR must be a valid path name of a Tk
-widget.  The busy window is mapped the next time idle tasks are
-processed, and the widget and its descendants will be blocked from
-user interactions. All events in the widget window and its
-descendants are ignored.  Normally \fBupdate\fR should be called
-immediately afterward to insure that the \fBhold\fR operation is in
-effect \fIbefore\fR the application starts its processing. The
-following configuration options are valid:
-.RS
-.TP
-\fB\-cursor \fIcursorName\fR
-Specifies the cursor to be displayed when the widget is made busy.
-\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR.
-The default cursor is \f(CWwatch\fR.
-.RE
-.TP
-\fBblt::busy configure \fIwindow\fR ?\fIoption value\fR?...
-Queries or modifies the \fBbusy\fR command configuration options for 
-\fIwindow\fR. \fIWindow\fR must be the path name of a widget previously
-made busy by the \fBhold\fR operation.  If no options are
-specified, a list describing all of the available options for
-\fIwindow\fR (see \fBTk_ConfigureInfo\fR for information on the format
-of this list) is returned.  If \fIoption\fR is specified with no
-\fIvalue\fR, then the command returns a list describing the one named
-option (this list will be identical to the corresponding sublist of
-the value returned if no \fIoption\fR is specified).  If one or more
-\fIoption\-value\fR pairs are specified, then the command modifies the
-given widget option(s) to have the given value(s); in this case the
-command returns the empty string.  \fIOption\fR may have any of the
-values accepted by the \fBhold\fR operation.  
-.sp
-Please note that the
-option database is referenced through \fIwindow\fR.  For example, if 
-the widget \f(CW.frame\fR is to be made busy, the busy 
-cursor can be specified for it by either \fBoption\fR command:
-.nf
-
-	\f(CWoption add *frame.busyCursor gumby\fR
-	\f(CWoption add *Frame.BusyCursor gumby\fR
-
-.fi
-.TP
-\fBblt::busy forget \fIwindow\fR ?\fIwindow\fR?...
-Releases resources allocated by the busy command for \fIwindow\fR,
-including the busy window.  User events will again be received again 
-by \fIwindow\fR.  Resources are also released when \fIwindow\fR
-is destroyed. \fIWindow\fR must be the name of a widget specified 
-in the \fBhold\fR operation, otherwise an error is reported.
-.TP
-\fBblt::busy check \fIwindow\fR
-Checks if \fIwindow\fR or any of its ancestors are currently busy.  If
-\fIwindow\fR is presently busy (it can not receive user interactions)
-\f(CW1\fR is returned, otherwise \f(CW0\fR.
-.TP
-\fBblt::busy isbusy \fR?\fIpattern\fR?
-Returns the pathnames of all widgets that are currently busy.
-If a \fIpattern\fR is given, the path names of busy widgets 
-matching \fIpattern\fR are returned.
-.TP
-\fBblt::busy names \fR?\fIpattern\fR?
-Returns the pathnames of all widgets that have previously been
-made busy (i.e. a busy window is allocated and associated with the
-widget).  It makes no difference if the window is currently busy or
-not.  If a \fIpattern\fR is given, the path names of busy widgets
-matching \fIpattern\fR are returned.
-.TP
-\fBblt::busy release \fIwindow\fR ?\fIwindow\fR?...
-Restores user interactions to the widget \fIwindow\fR again. 
-This differs from the \fBforget\fR operation in that the busy window 
-is not destroyed, but simply unmapped.  
-\fIWindow\fR must be the name of a widget specified 
-in a \fBhold\fR operation, otherwise an error is reported.
-.TP
-\fBblt::busy status \fIwindow\fR
-Returns the status of a widget \fIwindow\fR previously made busy.
-An error is reported if \fIwindow\fR does not was never made busy, or
-the \fBforget\fR operation was invoked (i.e. does not currently have a
-busy window associated with it).  If \fIwindow\fR is presently can
-not receive user interactions, \f(CW1\fR is returned, otherwise \f(CW0\fR.
-.sp 1
-.SH BINDINGS
-The event blocking feature is implemented by creating and mapping a
-transparent window that completely covers the widget.  When the busy
-window is mapped, it invisibly shields the widget and its hierarchy
-from all events that may be sent.  Like Tk widgets, busy windows have
-widget names in the Tk window hierarchy.  This means that you can use
-the \fBbind\fR command, to handle events in the busy window.
-.CS
-blt::busy hold .frame.canvas
-bind .frame.canvas_Busy <Enter> { ... } 
-.CE
-.PP
-Normally the busy window is a sibling of the widget.  The
-name of the busy window is "\fIwidget\f(CW_Busy\fR" where \fIwidget\fR
-is the name of the widget to be made busy.  In the previous example, the
-pathname of the busy window is "\f(CW.frame.canvas_Busy\fR" The
-exception is when the widget is a toplevel widget (such as ".")  where
-the busy window can't be made a sibling.  The busy window is then a
-child of the widget named "\fIwidget\f(CW._Busy\fR" where \fIwidget\fR
-is the name of the toplevel widget.  In the following example, the
-pathname of the busy window is "\f(CW._Busy\fR"
-.CS
-blt::busy hold .
-bind ._Busy <Enter> { ... } 
-.CE
-.SH ENTER/LEAVE EVENTS
-Mapping and unmapping busy windows generates Enter/Leave events for
-all widgets they cover.  Please note this if you are tracking
-Enter/Leave events in widgets.
-.SH KEYBOARD EVENTS
-When a widget is made busy, the widget is prevented from gaining the
-keyboard focus by the busy window. But if the widget already had
-focus, it still may received keyboard events.  To prevent this, you
-must move focus to another window.
-.CS
-blt::busy hold .frame
-label .dummy
-focus .dummy
-update
-.CE
-The above example moves the focus from .frame immediately after
-invoking the \fBhold\fR so that no keyboard events will be sent to
-\f(CW.frame\fR or any of its descendants.
-.PP
-Tk's tab traversal mechanism should be also modified to check for busy
-windows. You can do this by adding a simple test to "tkFocusOK".  Here's
-an example.
-.CS
-tk_focusNext .
-rename tkFocusOK tkFocusOK.orig
-proc tkFocusOK { w }  {
-    if { [blt::busy check $w] } {
-	return 0
-    }
-    return [tkFocusOK.orig $w]
-}
-.CE
-.SH KEYWORDS
-busy, keyboard events, pointer events, window, cursor
-
-
diff --git a/blt3.0/man/container.mann b/blt3.0/man/container.mann
deleted file mode 100644
index 682fff3..0000000
--- a/blt3.0/man/container.mann
+++ /dev/null
@@ -1,303 +0,0 @@
-'\"
-'\" Copyright 1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Container widget created by George Howlett.
-'\"
-.so man.macros.in
-.TH container n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-container \- Widget to contain a foreign window.
-.BE
-.SH SYNOPSIS
-\fBcontainer\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBcontainer\fR widget lets you embed an X11 window from a foreign
-application into your Tk application.  The foreign window is
-reparented inside of the widget. You can then place and arrange the
-container just as you would any Tk widget.
-.SH INTRODUCTION
-Notebooks are a popular graphical paradigm.  They allow you to organize
-many windows in a single widget.  For example, you might have an
-application the displays several X-Y graphs at the same time.
-Typically, you can't pack the graphs into the same \fBframe\fR because
-they are too large.  The other alternative is to pack the graphs into
-several \fBtoplevel\fR widgets, allowing them to overlap on the
-screen.  The problem is that all the different toplevel windows
-clutter the screen and are difficult to manage.
-.PP
-The \fBcontainer\fR widget lets organize your application by displaying
-each graph as a page in a folder of a notebook.  Only one page is
-visible at a time. When you click on a tab, the folder (graph)
-corresponding to the tab is displayed in the \fBcontainer\fR widget.  The
-container also lets you temporarily tear pages out of the notebook into a
-separate toplevel widget, and put them back in the container later.  For
-example, you could compare two graphs side-by-side by tearing them
-out, and then replace them when you are finished.
-.PP
-A container may contain an unlimited number of folders.  If there are too
-many tabs to view, you can arrange them as multiple tiers or scroll
-the tabs. The container uses the conventional Tk scrollbar syntax, so you
-can attach a scrollbar too. 
-.SH EXAMPLE
-You create a container widget with the \fBcontainer\fR command.
-.CS
-# Create a new container
-container .c
-.CE
-A new Tcl command \f(CW.c\fR is also created.  This command can be
-used to query and modify the container.  For example, to change the
-default borderwidth, you use the new command and
-the container's \fBconfigure\fR operation.
-.CS
-# Change the default font.
-\&.c configure \-borderwidth 2
-.CE
-You can then add folders using the \fBinsert\fR operation.
-.CS
-# Create a new folder "f1"
-\&.c coinsert 0 "f1"
-.CE
-This inserts the new tab named "f1" into the container.  The index
-\f(CW0\fR indicates location to insert the new tab.  You can also use
-the index \f(CWend\fR to append a tab to the end of the container.  By
-default, the text of the tab is the name of the tab.  You can change
-this by configuring the \fB\-text\fR option.
-.CS
-# Change the label of "f1"
-\&.ts tab configure "f1" -label "Tab #1" 
-.CE
-The \fBinsert\fR operation lets you add one or more folders at a time.
-.CS
-\&.ts insert end "f2" -label "Tab #2" "f3" "f4" 
-.CE
-The tab on each folder contains a label.  A label may display both
-an image and a text string.  You can reconfigure the tab's attributes
-(foreground/background colors, font, rotation, etc) using the \fBtab
-configure\fR operation.
-.CS
-# Add an image to the label of "f1"
-set image [image create photo -file stopsign.gif]
-\&.ts tab configure "f1" -image $image
-\&.ts tab configure "f2" -rotate 90
-.CE
-Each folder may contain an embedded widget to represent its contents.
-The widget to be embedded must be a child of the container widget.  Using
-the \fB\-window\fR option, you specify the name of widget to be
-embedded.  But don't pack the widget, the container takes care of placing
-and arranging the widget for you.
-.CS
-graph .ts.graph
-\&.ts tab configure "f1" -window ".ts.graph" \\
-    -fill both -padx 0.25i -pady 0.25i
-.CE
-The size of the folder is determined the sizes of the Tk widgets
-embedded inside each folder.  The folder will be as wide as the widest
-widget in any folder. The tallest determines the height.  You can use
-the tab's \fB\-pagewidth\fR and \fB\-pageheight\fR options override this.
-.PP
-Other options control how the widget appears in the folder.  The
-\fB\-fill\fR option says that you wish to have the widget stretch to
-fill the available space in the folder.
-.CS
-\&.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i
-.CE
-.PP
-Now when you click the left mouse button on "f1", the
-graph will be displayed in the folder.  It will be automatically
-hidden when another folder is selected.  If you click on the right
-mouse button, the embedded widget will be moved into a toplevel widget 
-of its own.  Clicking again on the right mouse button puts it back into 
-the folder.
-.PP
-If you want to share a page between two different folders, the
-\fB\-command\fR option lets you specify a Tcl command to be invoked
-whenever the folder is selected.  You can reset the \fB\-window\fR
-option for the tab whenever it's clicked.
-.CS
-\&.ts tab configure "f2" -command { 
-    \&.ts tab configure "f2" -window ".ts.graph"
-}
-\&.ts tab configure "f1" -command { 
-    \&.ts tab configure "f1" -window ".ts.graph"
-}
-.CE
-If you have many folders, you may wish to stack tabs in multiple
-tiers.  The container's \fB\-tiers\fR option requests a maximum
-number of tiers.   The default is one tier.  
-.CS
-\&.ts configure -tiers 2
-.CE
-If the tabs can fit in less tiers, the widget will use that many.  
-Whenever there are more tabs than can be displayed in the maximum number
-of tiers, the container will automatically let you scroll the tabs.  You
-can even attach a scrollbar to the container.
-.CS
-\&.ts configure -scrollcommand { .sbar set }  -scrollincrement 20
-\&.sbar configure -orient horizontal -command { .ts view }
-.CE
-By default tabs are along the top of the container from left to right.  
-But tabs can be placed on any side of the container using the \fB\-side\fR
-option.
-.CS
-# Arrange tabs along the right side of the container. 
-\&.ts configure -side right -rotate 270
-.CE
-.SH SYNTAX
-The \fBcontainer\fR command creates a new window using the \fIpathName\fR
-argument and makes it into a container widget.
-.CS
-\fBcontainer \fIpathName \fR?\fIoption value\fR?...
-.CE
-Additional options may be specified on the command line or in the
-option database to configure aspects of the container such as its colors,
-font, text, and relief.  The \fBcontainer\fR command returns its
-\fIpathName\fR argument.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.
-.PP
-When first created, a new container contains no tabs.  Tabs are added or
-deleted using widget operations described below. It is not necessary
-for all the tabs to be displayed in the container window at once;
-commands described below may be used to change the view in the window.
-Containers allow scrolling of tabs using the \fB\-scrollcommand\fR
-option.  They also support scanning (see the \fBscan\fR operation).
-Tabs may be arranged along any side of the container window using the
-\fB\-side\fR option.
-.PP
-The size of the container window is determined the number of tiers of
-tabs and the sizes of the Tk widgets embedded inside each folder.
-The widest widget determines the width of the folder. The tallest
-determines the height.  If no folders contain an embedded widget, the
-size is detemined solely by the size of the tabs.  
-.PP
-You can override either dimension with the container's \fB\-width\fR
-and \fB\-height\fR options.
-.SH "CONTAINER OPERATIONS"
-All \fBcontainer\fR operations are invoked by specifying the widget's
-pathname, the operation, and any arguments that pertain to that
-operation.  The general form is:
-.sp
-.CS
-	\fIpathName operation \fR?\fIarg arg ...\fR?
-.CE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operations are available for container widgets:
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all 
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.RS
-.TP
-\fB\-background \fIcolor\fR
-Sets the border color of the container.  
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines how the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-command \fIpattern\fR
-Specifies to search for a window whose \f(CWWM_COMMAND\fR property matches
-the given pattern.  If no windows, or more than one window, matches
-the pattern, an error is generated.  If \fIpattern\fR is the empty
-string, then no command search is performed.
-The default is \f(CW""\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  If \fIpixels\fR is
-0, then the height is height the embedded window plus the specified 
-borderwidth. The default is \f(CW0\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Sets the color to display in the traversal highlight region when
-the container does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Sets the color to use for the traversal highlight rectangle that is
-drawn around the widget when it has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Sets the width of the highlight rectangle to draw around the outside of 
-the widget when it has the input focus. \fIPixels\fR is a non-negative 
-value and may have any of the forms acceptable to \fBTk_GetPixels\fR.
-If the value is zero, no focus highlight is drawn around the widget.
-The default is \f(CW2\fR.
-.TP
-\fB\-name \fIpattern\fR
-Specifies to search for a window whose \f(CWWM_NAME\fR property matches
-the given pattern.  If no windows, or more than one window, matches
-the pattern, an error is generated.  If \fIpattern\fR is the empty
-string, then no name search is performed.
-The default is \f(CW""\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the container widget.  \fIRelief\fR
-specifies how the container should appear relative to widget that
-it is packed into; for example, \f(CWraised\fR means the container should
-appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts decide whether to focus on the window.
-The default is \f(CW1\fR.
-.TP
-\fB\-width \fIpixels\fR 
-Specifies the requested width of the widget.  If \fIpixels\fR is 0,
-then the width is the width the embedded window and the specified
-borderwidth.  The default is \f(CW0\fR.
-.TP
-\fB\-window \fIid\fR
-Specifies the foreign embedded using its X window id.  
-.RE
-.TP
-\fIpathName \fBfind \fB\-command\fR|\fB\-name\fR \fIpattern\fR
-Searches for all windows that match the given pattern.  If the
-\fB\-command\fR switch is given, all windows whose \fCWWM_COMMAND\fR
-property match \fIpattern\fR are returned in a list.  If the
-\fB\-name\fR switch is given, all windows whose \fCWWM_NAME\fR
-property match \fIpattern\fR are returned in a list.  The list
-returned will contains pairs of the window id and the matching property.
-.SH KEYWORDS
-container, widget
diff --git a/blt3.0/man/cutbuffer.mann b/blt3.0/man/cutbuffer.mann
deleted file mode 100644
index ce06106..0000000
--- a/blt3.0/man/cutbuffer.mann
+++ /dev/null
@@ -1,54 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-.so man.macros
-.TH cutbuffer n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-cutbuffer \- Manipulate X cut buffer properties
-.SH SYNOPSIS
-\fBcutbuffer\fI get ?number?\fR
-.br
-\fBcutbuffer\fI rotate ?count?\fR
-.br
-\fBcutbuffer\fI set value ?number?\fR
-.BE
-.SH DESCRIPTION
-.PP
-The \fBcutbuffer\fR command allows you to read or modify the eight X cut
-buffer properties. You can also rotate the buffers properties.
-.SH OPERATIONS
-The following operations are available for the \fBcutbuffer\fR command:
-.TP
-\fBcutbuffer get \fI?number?\fR 
-Returns the value of a cutbuffer \fInumber\fR.  \fINumber\fR must be a
-number between 0 and 7.  The default is 0.  The cutbuffer is returned
-exactly, except that NUL bytes are converted to '@' characters.  If a
-cut buffer \fInumber\fR does not exist, then \f(CW""\fR is returned.
-.TP
-\fBcutbuffer rotate \fI?count?\fR 
-Rotates the cut buffers by \fIcount\fR. \fICount\fR must be a number
-between -7 and 7. The default is 1.
-.TP
-\fBcutbuffer set \fIvalue\fR ?\fInumber\fR?  
-Sets the cutbuffer \fInumber\fR to \fIvalue\fR.  \fINumber\fR must be a
-number between 0 and 7.  The default is 0.
-.SH KEYWORDS
-cut buffer, property
diff --git a/blt3.0/man/datatable.mann b/blt3.0/man/datatable.mann
deleted file mode 100644
index 747f327..0000000
--- a/blt3.0/man/datatable.mann
+++ /dev/null
@@ -1,1505 +0,0 @@
-
-'\"
-'\" Copyright 1991-1997 by Lucent Technologies, Inc.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Datatable command created by George Howlett.
-'\"
-.so man.macros
-.TH datatable n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBdatatable\fR \-  Create and manage table data objects.
-.SH SYNOPSIS
-\fBblt::datatable create \fR?\fItableName\fR?
-.sp
-\fBblt::datatable destroy\fR \fItableName\fR...
-.sp
-\fBblt::datatable names\fR \fR?\fIpattern\fR?
-.BE
-.SH DESCRIPTION
-The \fBdatatable\fR command creates table data objects.  A \fItable object\fR
-is general ordered tree of nodes.  Each node has both a label and a
-key-value list of data.  Data can be heterogeneous, since nodes do not
-have to contain the same data keys.  It is associated with a Tcl
-command that you can use to access and modify the its structure and
-data. Table objects can also be managed via a C API.
-.SH INTRODUCTION
-
-.SH EXAMPLE
-
-.SH SYNTAX
-.TP
-\fBblt::datatable create\fR ?\fItableName\fR?  
-Creates a new table object.  The name of the new table is returned.  If
-no \fItableName\fR argument is present, then the name of the table is
-automatically generated in the form "\f(CWdatatable0\fR", "\f(CWdatatable1\fR",
-etc.  If the substring "\f(CW#auto\fR" is found in \fItableName\fR, it
-is automatically substituted by a generated name.  For example, the
-name \f(CW.foo.#auto.bar\fR will be translated to \f(CW.foo.datatable0.bar\fR.
-.sp
-A new Tcl command (by the same name as the table) is also created.
-Another Tcl command or table object can not already exist as
-\fItableName\fR.  If the Tcl command is deleted, the table will also be
-freed.  The new table will contain no rows or columns.  Tables are by
-default, created in the current namespace, not the global namespace,
-unless \fItableName\fR contains a namespace qualifier, such as
-"\f(CWfred::myTable\fR".
-.TP
-\fBblt::datatable destroy\fR \fItableName\fR...
-Deletes one of more tables.  The Tcl command associated with
-\fItableName\fR is also removed.  If the table is currently shared
-(another client is using it),  the table data isn't destroyed until 
-no one else is using it.
-.TP
-\fBblt::datatable names \fR?\fIpattern\fR?
-Returns the names of all table objects.  if a \fIpattern\fR argument
-is given, then the only those tables whose name matches pattern will
-be listed.
-.SH ROW/COLUMN IDENTIFIERS
-Rows and columns in a table object may be identified by either an index,
-label, or tag.
-.SS INDEX
-An index is the position of the row/column.  Row/column indices start from
-one (not zero).  Indices may change if rows/columns are inserted, deleted, or
-sorted.
-.SS LABEL
-A label is a string of characters that identifies a row or column.  A label
-may reference more than one row or column.  It is up to the programmer to
-maintain unique labels.  For example, if two columns have the same label, only
-the first column may be accessed using that label.  Row and column labels are
-distinct.  Labels do not change if other rows/columns are inserted, deleted,
-or sorted. Labels can not start with a "-".
-.SS TAG
-A row/column may also have any number of tags associated with it.  A tag is
-just a string of characters, and it may take any form except that of
-an integer.  For example, "\f(CWx123\fR" is valid, but "\f(CW123\fR"
-isn't.  The same tag may be associated with many different rows/columns.
-This is commonly done to group rows/columns in various interesting ways.
-.sp
-There are two built-in tags: The tag \fBall\fR is implicitly
-associated with every row/column in the table.  It may be used to invoke
-operations on all the rows/columns in the table.  The tag \fBend\fR is
-managed automatically by the table object. It applies to the last row/column.
-.sp
-When specifying nodes in table object commands, if the specifier is an
-integer then it is assumed to refer to the single node with that id.
-If the specifier is not an integer, then it is assumed to refer to all
-of the nodes in the table that have a tag matching the specifier.  The
-symbol \fInode\fR is used below to indicate that an argument specifies
-either an id that selects a single node or a tag that selects zero or
-more nodes.  Many table commands only operate on a single node at a
-time; if \fInode\fR is specified in a way that names multiple items, then
-an error "refers to more than one node" is generated.
-.SH NODE MODIFIERS
-You can also specify node in relation to another node by appending one
-or more modifiers to the node id or tag.  A modifier refers to a node
-in relation to the specified node.  For example, 
-"\f(CWroot->firstchild\fR"
-selects the first subtree of the root node.
-.PP
-The following modifiers are available:
-.RS
-.TP 1i
-\fBfirstchild\fR 
-Selects the first child of the node.  
-.TP 1i
-\fBlastchild\fR 
-Selects the last child of the node.  
-.TP 1i
-\fBnext\fR 
-Selects the next node in preorder to the node.  
-.TP 1i
-\fBnextsibling\fR 
-Selects the next sibling of the node.  
-.TP 1i
-\fBparent\fR 
-Selects the parent of the node.  
-.TP 1i
-\fBprevious\fR 
-Selects the previous node in preorder to the node.  
-.TP 1i
-\fBprevsibling\fR 
-Selects the previous sibling of the node.  
-.TP 1i
-"\fIlabel\fR"
-Selects the node whose label is \fIlabel\fR.  Enclosing \fIlabel\fR in 
-quotes indicates to always search for a node by its label (for example, 
-even if the node is labeled "parent").
-.RE
-.sp
-It's an error the node can't be found.  For example,
-\fBlastchild\fR and \fBfirstchild\fR will generate errors if the node
-has no children.  The exception to this is the \fBindex\fR operation.
-You can use \fBindex\fR to test if a modifier is valid.
-.SH TABLE OPERATIONS
-Once you create a table object, you can use its Tcl command 
-to query or modify it.  The
-general form is
-.DS
-\fItableName\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tables are listed below.
-.TP
-\fItableName\fR \fBarray\fR \fBexists\fR \fIrow\fR \fIcol\fR \fIkey\fR 
-Indicates if \fIkey\fR exists in the array element located at the 
-given row and column position in the table. If \fIrow\fR is not a valid 
-row identifier, \fIcol\fR is not a valid column identifier, or \fIkey\fR 
-is not a valid key for the array, then \f(CW0\fR is returned, otherwise
-\f(CW1\fR. 
-.TP
-\fItableName\fR \fBarray\fR \fBget\fR \fIrow\fR \fIcol\fR \fIkey\fR ?\fIdefValue\fR?
-Returns the value associated with \fIkey\fR in the array located 
-at the given row and column position in the table.  It's normally an 
-error if \fIrow\fR is not a valid row identifier, \fIcol\fR is not a 
-valid column identifier, or \fIkey\fR is not a valid key for the array. 
-But if you provide a \fIdefValue\fR argument, this value is will be returned 
-instead.   This operation may trigger \fBread\fR traces.
-.TP
-\fItableName\fR \fBarray\fR \fBnames\fR \fIrow\fR \fIcol\fR
-Returns a list of the current keys in the array located at the 
-given row and column position in the table. It is an error \fIrow\fR 
-is not a valid row identifier or \fIcol\fR is not a valid column identifier.
-.TP
-\fItableName\fR \fBarray\fR \fBset\fR \fIrow\fR \fIcol\fR \fIkey\fR \fIvalue\fR
-Sets the value to the array element associated with \fIkey\fR located at the 
-given row and column position in the table.  If either \fIrow\fR or 
-\fIcolumn\fR do not exist, they will be automatically created (they must
-be a label or index).  If \fIkey\fR doesn't exist, a new entry in the array 
-be created.  This operation may trigger \fBwrite\fR traces.
-.TP
-\fItableName\fR \fBarray\fR \fBunset\fR \fIrow\fR \fIcol\fR \fIkey\fR...
-Unsets the value to the array element associated with \fIkey\fR located at the 
-given row and column position in the table.  It's an error if either 
-\fIrow\fR or \fIcolumn\fR do not exist.  
-This operation may trigger \fBunset\fR traces.
-.TP
-\fItableName\fR \fBapply\fR \fInode\fR ?\fIswitches\fR?
-Runs commands for all nodes matching the criteria given by
-\fIswitches\fR for the subtree designated by \fInode\fR.  By default
-all nodes match, but you can set switches to narrow the match.  This
-operation differs from \fBfind\fR in two ways: 1) Tcl commands can be
-invoked both pre- and post-traversal of a node and 2) the table is
-always traversed in depth first order.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The valid switches are listed
-below:
-.RS
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-If pattern matching is selected (using the \fB\-exact\fR,
-\fB\-glob\fR, or \fB\-regexp\fR switches), compare the values of the
-data field keyed by \fIkey\fR instead of the node's label.  If no
-pattern matching switches are set, then any node with this data key
-will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP 1i
-\fB\-path\fR
-Use the node's full path when comparing nodes.  The node's full
-path is a list of labels, starting from the root of each ancestor
-and the node itself.
-.TP 1i
-\fB\-precommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-postcommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP 1i
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItableName\fR \fBattach\fR \fItableObject\fR ?\fIswitches\fR?
-Attaches to an existing table object \fItableObject\fR.  
-The current table associated with \fItableName\fR is discarded.  
-In addition, the current set of tags, notifier events, and traces are 
-removed. The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-newtags\fR 
-By default, the table will share the tags of the attached table. If this
-flag is present, the table will start with an empty tag table.
-.RE
-.TP
-\fItableName\fR \fBchildren\fR \fInode\fR
-Returns a list of children for \fInode\fR.  If \fInode\fR is a leaf,
-then an empty string is returned.
-.TP
-\fItableName\fR \fBcopy\fR \fIparent\fR ?\fItable\fR? \fInode\fR ?\fIswitches\fR?
-Copies \fInode\fR into \fIparent\fR. Both nodes \fInode\fR and
-\fIparent\fR must already exist. The id of the new node is
-returned. You can also copy nodes from another table.  If a \fItable\fR 
-argument is present, it indicates the name of the source table.  
-The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-label\fR \fIstring\fR
-Label \fIdestNode\fR as \fIstring\fR.  By default, \fIdestNode\fR has
-the same label as \fIsrcNode\fR.
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.TP
-\fB\-recurse\fR
-Recursively copy all the subtables of \fIsrcNode\fR as well.  In this case,
-\fIsrcNode\fR can't be an ancestor of \fIdestNode\fR as it would result
-in a cyclic copy.
-.TP
-\fB\-tags\fR
-Copy tag inforation.  Normally the following node is copied: its 
-label and data fields.  This indicates to copy tags as well.
-.RE
-.TP
-\fItableName\fR \fBdegree\fR \fInode\fR 
-Returns the number of children of \fInode\fR.
-.TP
-\fItableName\fR \fBdelete\fR \fInode\fR...
-Recursively deletes one or more nodes from the table.  
-The node and all its descendants are removed.   The one exception
-is the root node.  In this case, only its descendants are removed.
-The root node will remain.  Any tags or 
-traces on the nodes are released.
-.TP
-\fItableName\fR \fBdepth\fR \fInode\fR 
-Returns the depth of the node.  The depth is the number of 
-steps from the node to the root of the table.  The depth of the
-root node is \f(CW0\fR.
-.TP
-\fItableName\fR \fBdump\fR \fInode\fR 
-Returns a list of the paths and respective data for \fInode\fR
-and its descendants.  The subtable designated by \fInode\fR is
-traversed returning the following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the table with the \fBrestore\fR operation.
-.TP
-\fItableName\fR \fBdumpfile\fR \fInode\fR \fIfileName\fR
-Writes a list of the paths and respective data for \fInode\fR
-and its descendants to the given file \fIfileName\fR.  
-The subtable designated by \fInode\fR is traversed returning the 
-following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the table with the \fBrestore\fR operation.
-.TP
-\fItableName\fR \fBexists\fR \fInode\fR ?\fIkey\fR?
-Indicates if \fInode\fR exists in the table.  If a \fIkey\fR argument
-is present then the command also indicates if the named data field 
-exists.
-.TP
-\fItableName\fR \fBfind\fR \fInode\fR ?\fIswitches\fR? 
-Finds for all nodes matching the criteria given by \fIswitches\fR 
-for the subtable designated by \fInode\fR.  A list of the selected 
-nodes is returned.  By default all nodes match, but you can set
-switches to narrow the match.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The order in 
-which the nodes are traversed is controlled by the  \fB\-order\fR switch.
-The possible orderings are \fBpreorder\fR, \fBpostorder\fR, \fBinorder\fR, 
-and \fBbreadthfirst\fR.  The default is \fBpostorder\fR.
-.sp
-The valid switches are listed
-below:
-.RS 
-.TP 1i
-\fB\-addtag\fR \fIstring\fR 
-Add the tag \fIstring\fR to each selected node.  
-.TP 1i
-\fB\-count\fR \fInumber\fR
-Stop processing after \fInumber\fR (a positive integer) matches. 
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-excludes\fR \fInodeList\fR
-Excludes any node in the list \fInodeList\fR from the search.  
-The subnodes of an excluded node are still examined.
-.TP 1i
-\fB\-exec\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtable and continues on the next.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-Compare the values of the data field keyed by \fIkey\fR instead of 
-the node's label. If no pattern is given (\fB\-exact\fR, \fB\-glob\fR, or 
-\fB\-regexp\fR switches), then any node with this data key will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP
-\fB\-order\fR \fIstring\fR 
-Traverse the table and process nodes according to \fIstring\fR. \fIString\fR
-can be one of the following:
-.RS
-.TP 1i
-\fBbreadthfirst\fR 
-Process the node and the subtables at each sucessive level. Each node
-on a level is processed before going to the next level.
-.TP 1i
-\fBinorder\fR 
-Recursively process the nodes of the first subtable, the node itself,
-and any the remaining subtables.
-.TP 1i
-\fBpostorder\fR 
-Recursively process all subtables before the node.
-.TP 1i
-\fBpreorder\fR 
-Recursively process the node first, then any subtables.
-.RE
-.TP
-\fB\-path\fR
-Use the node's full path when comparing nodes.
-.TP
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItableName\fR \fBfindchild\fR \fInode\fR \fIlabel\fR
-Searches for a child node \Ilabel\fR in \fInode\fR.  The id of the 
-child node is returned if found.  Otherwise \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBfirstchild\fR \fInode\fR 
-Returns the id of the first child in the \fInode\fR's list
-of subtables.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBget\fR \fInode\fR ?\fIkey\fR? ?\fIdefaultValue\fR?
-Returns a list of key-value pairs of data for the node.  If \fIkey\fR
-is present, then only the value for that particular data field is
-returned.  It's normally an error if \fInode\fR does not contain the
-data field \fIkey\fR.  But if you provide a \fIdefaultValue\fR
-argument, this value is returned instead (\fInode\fR will still not
-contain \fIkey\fR).  This feature can be used to access a data field of
-\fInode\fR without first testing if it exists.  This operation may
-trigger \fBread\fR data traces.
-.TP
-\fItableName\fR \fBindex\fR \fInode\fR
-Returns the id of \fInode\fR.  If \fInode\fR is a tag, it 
-can only specify one node.  If \fInode\fR does not represent a valid
-node id or tag, or has modifiers that are invalid, then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBinsert\fR \fIparent\fR ?\fIswitches\fR? 
-Inserts a new node into parent node \fIparent\fR.  
-The id of the new node is returned. The following switches 
-are available:
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts the node into \fIparent\fR's list of children at 
-position \fInumber\fR.  The default is to append \fInode\fR.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-data\fR \fIdataList\fR
-Sets the value for each data field in \fIdataList\fR for the 
-new node. \fIDataList\fR is a list of key-value pairs.
-.TP 1i
-\fB\-label\fR \fIstring\fR 
-Designates the labels of the node as \fIstring\fR.  By default, nodes
-are labeled as \f(CWnode0\fR, \f(CWnode1\fR, etc.
-.TP 1i
-\fB\-node\fR \fIid\fR 
-Designates the id for the node.  Normally new ids are automatically
-generated.  This allows you to create a node with a specific id.
-It is an error if the id is already used by another node in the table.
-.TP 1i
-\fB\-tags\fR \fItagList\fR
-Adds each tag in \fItagList\fR to the new node. \fITagList\fR is a list
-of tags, so be careful if a tag has embedded spaces.
-.RE
-.TP
-\fItableName\fR \fBis\fR \fIproperty\fR \fIargs\fR  
-Indicates the property of a node. Both \fIproperty\fR and \fIargs\fR
-determine the property being tested.  Returns \f(CW1\fR if true and
-\f(CW0\fR otherwise.  The following \fIproperty\fR and \fIargs\fR 
-are valid:
-.RS
-.TP 1i
-\fBancestor\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is an ancestor of \fInode2\fR. 
-.TP 1i
-\fBbefore\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is before \fInode2\fR in depth first traversal. 
-.TP 1i
-\fBleaf\fR \fInode\fR
-Indicates if \fInode\fR is a leaf (it has no subtables).
-.TP 1i
-\fBroot\fR \fInode\fR
-Indicates if \fInode\fR is the designated root.  This can be changed
-by the \fBroot\fR operation.
-.RE
-.TP
-\fItableName\fR \fBlabel\fR \fInode\fR ?\fInewLabel\fR?
-Returns the label of the node designated by \fInode\fR.  If \fInewLabel\fR
-is present, the node is relabeled using it as the new label.
-.TP
-\fItableName\fR \fBlastchild\fR \fInode\fR
-Returns the id of the last child in the \fInode\fR's list
-of subtables.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBmove\fR \fInode\fR \fInewParent\fR ?\fIswitches\fR?
-Moves \fInode\fR into \fInewParent\fR. \fINode\fR is appended to the
-list children of \fInewParent\fR.  \fINode\fR can not be an ancestor
-of \fInewParent\fR.  The valid flags for \fIswitches\fR are described below.
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts \fInode\fR into \fIparent\fR's list of children at 
-position \fInumber\fR. The default is to append the node.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.RE
-.TP
-\fItableName\fR \fBnext\fR \fInode\fR
-Returns the next node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the last node in the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBnextsibling\fR \fInode\fR
-Returns the node representing the next subtable from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the last child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBnotify\fR \fIargs\fR 
-Manages notification events that indicate that the table structure has 
-been changed.
-See the 
-.SB "NOTIFY OPERATIONS"
-section below.
-.TP
-\fItableName\fR \fBparent\fR \fInode\fR
-Returns the parent node of \fInode\fR.  If \fInode\fR is the root
-of the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBpath\fR \fInode\fR
-Returns the full path (from root) of \fInode\fR.
-.TP
-\fItableName\fR \fBposition\fR \fInode\fR
-Returns the position of the node in its parent's list of children.
-Positions are numbered from 0.
-The position of the root node is always 0.
-.TP
-\fItableName\fR \fBprevious\fR \fInode\fR
-Returns the previous node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the root of the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBprevsibling\fR \fInode\fR
-Returns the node representing the previous subtable from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the first child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBrestore\fR \fInode\fR \fIdataString\fR \fIswitches\fR
-Performs the inverse function of the \fBdump\fR operation, restoring
-nodes to the table. The format of \fIdataString\fR is exactly what is 
-returned by the \fBdump\fR operation.  It's a list containing information
-for each node to be restored.  The information consists of 1) the relative
-path of the node, 2) a sublist of key value pairs representing the 
-node's data, and 3) a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItableName\fR \fBrestorefile\fR \fInode\fR \fIfileName\fR \fIswitches\fR
-Performs the inverse function of the \fBdumpfile\fR operation, restoring
-nodes to the table from the file \fIfileName\fR. The format of 
-\fIfileName\fR is exactly what is returned by the \fBdumpfile\fR operation.  
-It's a list containing information for each node to be restored.  
-The information consists of 1) the relative path of the node, 2) 
-a sublist of key value pairs representing the node's data, and 3) 
-a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItableName\fR \fBroot\fR ?\fInode\fR?
-Returns the id of the root node.  Normally this is node \f(CW0\fR.  If
-a \fInode\fR argument is provided, it will become the new root of the
-table. This lets you temporarily work within a subset of the table.
-Changing root affects operations such as \fBnext\fR, \fBpath\fR,
-\fBprevious\fR, etc.
-.TP
-\fItableName\fR \fBset\fR \fInode\fR \fIkey value\fR ?\fIkey value\fR...?
-Sets one or more data fields in \fInode\fR. \fINode\fR may 
-be a tag that represents several nodes.  \fIKey\fR is the
-name of the data field to be set and \fIvalue\fR is its respective
-value.  This operation may trigger \fBwrite\fR and \fBcreate\fR data traces.
-.TP
-\fItableName\fR \fBsize\fR \fInode\fR
-Returns the number of nodes in the subtable. This includes the node
-and all its descendants.  The size of a leaf node is 1.
-.TP
-\fItableName\fR \fBsort\fR \fInode\fR ?\fIswitches\fR? 
-.RS
-.TP 1i
-\fB\-ascii\fR 
-Compare strings using the ASCII  collation order.
-.TP 1i
-\fB\-command\fR \fIstring\fR
-Use command \fIstring\fR as a comparison command.  To compare two
-elements, evaluate a Tcl script consisting of command with the two
-elements appended as additional arguments.  The script should return
-an integer less than, equal to, or greater than zero if the first
-element is to be considered less than, equal to, or greater than the
-second, respectively.
-.TP 1i
-\fB\-decreasing\fR
-Sort in decreasing order (largest items come first).
-.TP 1i
-\fB\-dictionary\fR
-Compare strings using a dictionary-style comparison.  This is the same 
-as \fB\-ascii\fR except (a) case is ignored except as a tie-breaker and (b) 
-if two strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, in \fB\-dictionary\fR mode, bigBoy sorts between
-bigbang and bigboy, and x10y sorts between x9y and x11y.
-.TP 1i
-\fB\-integer\fR
-Compare the nodes as integers.  
-.TP 1i
-\fB\-key\fR \fIstring\fR
-Sort based upon the node's data field keyed by \fIstring\fR. Normally
-nodes are sorted according to their label. 
-.TP 1i
-\fB\-path\fR
-Compare the full path of each node.  The default is to compare only its
-label.
-.TP 1i
-\fB\-real\fR
-Compare the nodes as real numbers.
-.TP 1i
-\fB\-recurse\fR
-Recursively sort the entire subtable rooted at \fInode\fR.
-.TP 1i
-\fB\-reorder\fR 
-Recursively sort subtables for each node.  \fBWarning\fR.  Unlike
-the normal flat sort, where a list of nodes is returned, this will
-reorder the table.  
-.RE
-.TP
-\fItableName\fR \fBtag\fR \fIargs\fR
-Manages tags for the table object.
-See the 
-.SH TABLE OPERATIONS
-Once you create a table object, you can use its Tcl command 
-to query or modify it.  The
-general form is
-.DS
-\fItableName\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tables are listed below.
-.TP
-\fItableName\fR \fBancestor\fR \fInode1\fR \fInode2\fR
-Returns the mutual ancestor of the two nodes \fInode1\fR and
-\fInode2\fR.  The ancestor can be one of the two nodes.  For example,
-if \fInode1\fR and \fInode2\fR are the same nodes, their ancestor is
-\fInode1\fR.
-.TP
-\fItableName\fR \fBapply\fR \fInode\fR ?\fIswitches\fR?
-Runs commands for all nodes matching the criteria given by
-\fIswitches\fR for the subtree designated by \fInode\fR.  By default
-all nodes match, but you can set switches to narrow the match.  This
-operation differs from \fBfind\fR in two ways: 1) Tcl commands can be
-invoked both pre- and post-traversal of a node and 2) the table is
-always traversed in depth first order.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The valid switches are listed
-below:
-.RS
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-If pattern matching is selected (using the \fB\-exact\fR,
-\fB\-glob\fR, or \fB\-regexp\fR switches), compare the values of the
-data field keyed by \fIkey\fR instead of the node's label.  If no
-pattern matching switches are set, then any node with this data key
-will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP 1i
-\fB\-path\fR
-Use the node's full path when comparing nodes.  The node's full
-path is a list of labels, starting from the root of each ancestor
-and the node itself.
-.TP 1i
-\fB\-precommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-postcommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP 1i
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItableName\fR \fBattach\fR \fItableObject\fR ?\fIswitches\fR?
-Attaches to an existing table object \fItableObject\fR.  
-The current table associated with \fItableName\fR is discarded.  
-In addition, the current set of tags, notifier events, and traces are 
-removed. The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-newtags\fR 
-By default, the table will share the tags of the attached table. If this
-flag is present, the table will start with an empty tag table.
-.RE
-.TP
-\fItableName\fR \fBchildren\fR \fInode\fR
-Returns a list of children for \fInode\fR.  If \fInode\fR is a leaf,
-then an empty string is returned.
-.TP
-\fItableName\fR \fBcopy\fR \fIparent\fR ?\fItable\fR? \fInode\fR ?\fIswitches\fR?
-Copies \fInode\fR into \fIparent\fR. Both nodes \fInode\fR and
-\fIparent\fR must already exist. The id of the new node is
-returned. You can also copy nodes from another table.  If a \fItable\fR 
-argument is present, it indicates the name of the source table.  
-The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-label\fR \fIstring\fR
-Label \fIdestNode\fR as \fIstring\fR.  By default, \fIdestNode\fR has
-the same label as \fIsrcNode\fR.
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.TP
-\fB\-recurse\fR
-Recursively copy all the subtables of \fIsrcNode\fR as well.  In this case,
-\fIsrcNode\fR can't be an ancestor of \fIdestNode\fR as it would result
-in a cyclic copy.
-.TP
-\fB\-tags\fR
-Copy tag inforation.  Normally the following node is copied: its 
-label and data fields.  This indicates to copy tags as well.
-.RE
-.TP
-\fItableName\fR \fBdegree\fR \fInode\fR 
-Returns the number of children of \fInode\fR.
-.TP
-\fItableName\fR \fBdelete\fR \fInode\fR...
-Recursively deletes one or more nodes from the table.  
-The node and all its descendants are removed.   The one exception
-is the root node.  In this case, only its descendants are removed.
-The root node will remain.  Any tags or 
-traces on the nodes are released.
-.TP
-\fItableName\fR \fBdepth\fR \fInode\fR 
-Returns the depth of the node.  The depth is the number of 
-steps from the node to the root of the table.  The depth of the
-root node is \f(CW0\fR.
-.TP
-\fItableName\fR \fBdump\fR \fInode\fR 
-Returns a list of the paths and respective data for \fInode\fR
-and its descendants.  The subtable designated by \fInode\fR is
-traversed returning the following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the table with the \fBrestore\fR operation.
-.TP
-\fItableName\fR \fBdumpfile\fR \fInode\fR \fIfileName\fR
-Writes a list of the paths and respective data for \fInode\fR
-and its descendants to the given file \fIfileName\fR.  
-The subtable designated by \fInode\fR is traversed returning the 
-following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the table with the \fBrestore\fR operation.
-.TP
-\fItableName\fR \fBexists\fR \fInode\fR ?\fIkey\fR?
-Indicates if \fInode\fR exists in the table.  If a \fIkey\fR argument
-is present then the command also indicates if the named data field 
-exists.
-.TP
-\fItableName\fR \fBfind\fR \fInode\fR ?\fIswitches\fR? 
-Finds for all nodes matching the criteria given by \fIswitches\fR 
-for the subtable designated by \fInode\fR.  A list of the selected 
-nodes is returned.  By default all nodes match, but you can set
-switches to narrow the match.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The order in 
-which the nodes are traversed is controlled by the  \fB\-order\fR switch.
-The possible orderings are \fBpreorder\fR, \fBpostorder\fR, \fBinorder\fR, 
-and \fBbreadthfirst\fR.  The default is \fBpostorder\fR.
-.sp
-The valid switches are listed
-below:
-.RS 
-.TP 1i
-\fB\-addtag\fR \fIstring\fR 
-Add the tag \fIstring\fR to each selected node.  
-.TP 1i
-\fB\-count\fR \fInumber\fR
-Stop processing after \fInumber\fR (a positive integer) matches. 
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-excludes\fR \fInodeList\fR
-Excludes any node in the list \fInodeList\fR from the search.  
-The subnodes of an excluded node are still examined.
-.TP 1i
-\fB\-exec\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtable and continues on the next.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-Compare the values of the data field keyed by \fIkey\fR instead of 
-the node's label. If no pattern is given (\fB\-exact\fR, \fB\-glob\fR, or 
-\fB\-regexp\fR switches), then any node with this data key will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP
-\fB\-order\fR \fIstring\fR 
-Traverse the table and process nodes according to \fIstring\fR. \fIString\fR
-can be one of the following:
-.RS
-.TP 1i
-\fBbreadthfirst\fR 
-Process the node and the subtables at each sucessive level. Each node
-on a level is processed before going to the next level.
-.TP 1i
-\fBinorder\fR 
-Recursively process the nodes of the first subtable, the node itself,
-and any the remaining subtables.
-.TP 1i
-\fBpostorder\fR 
-Recursively process all subtables before the node.
-.TP 1i
-\fBpreorder\fR 
-Recursively process the node first, then any subtables.
-.RE
-.TP
-\fB\-path\fR
-Use the node's full path when comparing nodes.
-.TP
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItableName\fR \fBfindchild\fR \fInode\fR \fIlabel\fR
-Searches for a child node \Ilabel\fR in \fInode\fR.  The id of the 
-child node is returned if found.  Otherwise \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBfirstchild\fR \fInode\fR 
-Returns the id of the first child in the \fInode\fR's list
-of subtables.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBget\fR \fInode\fR ?\fIkey\fR? ?\fIdefaultValue\fR?
-Returns a list of key-value pairs of data for the node.  If \fIkey\fR
-is present, then onlyx the value for that particular data field is
-returned.  It's normally an error if \fInode\fR does not contain the
-data field \fIkey\fR.  But if you provide a \fIdefaultValue\fR
-argument, this value is returned instead (\fInode\fR will still not
-contain \fIkey\fR).  This feature can be used to access a data field of
-\fInode\fR without first testing if it exists.  This operation may
-trigger \fBread\fR data traces.
-.TP
-\fItableName\fR \fBindex\fR \fInode\fR
-Returns the id of \fInode\fR.  If \fInode\fR is a tag, it 
-can only specify one node.  If \fInode\fR does not represent a valid
-node id or tag, or has modifiers that are invalid, then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBinsert\fR \fIparent\fR ?\fIswitches\fR? 
-Inserts a new node into parent node \fIparent\fR.  
-The id of the new node is returned. The following switches 
-are available:
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts the node into \fIparent\fR's list of children at 
-position \fInumber\fR.  The default is to append \fInode\fR.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-data\fR \fIdataList\fR
-Sets the value for each data field in \fIdataList\fR for the 
-new node. \fIDataList\fR is a list of key-value pairs.
-.TP 1i
-\fB\-label\fR \fIstring\fR 
-Designates the labels of the node as \fIstring\fR.  By default, nodes
-are labeled as \f(CWnode0\fR, \f(CWnode1\fR, etc.
-.TP 1i
-\fB\-node\fR \fIid\fR 
-Designates the id for the node.  Normally new ids are automatically
-generated.  This allows you to create a node with a specific id.
-It is an error if the id is already used by another node in the table.
-.TP 1i
-\fB\-tags\fR \fItagList\fR
-Adds each tag in \fItagList\fR to the new node. \fITagList\fR is a list
-of tags, so be careful if a tag has embedded spaces.
-.RE
-.TP
-\fItableName\fR \fBis\fR \fIproperty\fR \fIargs\fR  
-Indicates the property of a node. Both \fIproperty\fR and \fIargs\fR
-determine the property being tested.  Returns \f(CW1\fR if true and
-\f(CW0\fR otherwise.  The following \fIproperty\fR and \fIargs\fR 
-are valid:
-.RS
-.TP 1i
-\fBancestor\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is an ancestor of \fInode2\fR. 
-.TP 1i
-\fBbefore\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is before \fInode2\fR in depth first traversal. 
-.TP 1i
-\fBleaf\fR \fInode\fR
-Indicates if \fInode\fR is a leaf (it has no subtables).
-.TP 1i
-\fBroot\fR \fInode\fR
-Indicates if \fInode\fR is the designated root.  This can be changed
-by the \fBroot\fR operation.
-.RE
-.TP
-\fItableName\fR \fBlabel\fR \fInode\fR ?\fInewLabel\fR?
-Returns the label of the node designated by \fInode\fR.  If \fInewLabel\fR
-is present, the node is relabeled using it as the new label.
-.TP
-\fItableName\fR \fBlastchild\fR \fInode\fR
-Returns the id of the last child in the \fInode\fR's list
-of subtables.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBmove\fR \fInode\fR \fInewParent\fR ?\fIswitches\fR?
-Moves \fInode\fR into \fInewParent\fR. \fINode\fR is appended to the
-list children of \fInewParent\fR.  \fINode\fR can not be an ancestor
-of \fInewParent\fR.  The valid flags for \fIswitches\fR are described below.
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts \fInode\fR into \fIparent\fR's list of children at 
-position \fInumber\fR. The default is to append the node.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.RE
-.TP
-\fItableName\fR \fBnext\fR \fInode\fR
-Returns the next node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the last node in the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBnextsibling\fR \fInode\fR
-Returns the node representing the next subtable from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the last child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBnotify\fR \fIargs\fR 
-Manages notification events that indicate that the table structure has 
-been changed.
-See the 
-.SB "NOTIFY OPERATIONS"
-section below.
-.TP
-\fItableName\fR \fBparent\fR \fInode\fR
-Returns the parent node of \fInode\fR.  If \fInode\fR is the root
-of the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBpath\fR \fInode\fR
-Returns the full path (from root) of \fInode\fR.
-.TP
-\fItableName\fR \fBposition\fR \fInode\fR
-Returns the position of the node in its parent's list of children.
-Positions are numbered from 0.
-The position of the root node is always 0.
-.TP
-\fItableName\fR \fBprevious\fR \fInode\fR
-Returns the previous node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the root of the table, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBprevsibling\fR \fInode\fR
-Returns the node representing the previous subtable from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the first child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItableName\fR \fBrestore\fR \fInode\fR \fIdataString\fR \fIswitches\fR
-Performs the inverse function of the \fBdump\fR operation, restoring
-nodes to the table. The format of \fIdataString\fR is exactly what is 
-returned by the \fBdump\fR operation.  It's a list containing information
-for each node to be restored.  The information consists of 1) the relative
-path of the node, 2) a sublist of key value pairs representing the 
-node's data, and 3) a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItableName\fR \fBrestorefile\fR \fInode\fR \fIfileName\fR \fIswitches\fR
-Performs the inverse function of the \fBdumpfile\fR operation, restoring
-nodes to the table from the file \fIfileName\fR. The format of 
-\fIfileName\fR is exactly what is returned by the \fBdumpfile\fR operation.  
-It's a list containing information for each node to be restored.  
-The information consists of 1) the relative path of the node, 2) 
-a sublist of key value pairs representing the node's data, and 3) 
-a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItableName\fR \fBroot\fR ?\fInode\fR?
-Returns the id of the root node.  Normally this is node \f(CW0\fR.  If
-a \fInode\fR argument is provided, it will become the new root of the
-table. This lets you temporarily work within a subset of the table.
-Changing root affects operations such as \fBnext\fR, \fBpath\fR,
-\fBprevious\fR, etc.
-.TP
-\fItableName\fR \fBset\fR \fInode\fR \fIkey value\fR ?\fIkey value\fR...?
-Sets one or more data fields in \fInode\fR. \fINode\fR may 
-be a tag that represents several nodes.  \fIKey\fR is the
-name of the data field to be set and \fIvalue\fR is its respective
-value.  This operation may trigger \fBwrite\fR and \fBcreate\fR data traces.
-.TP
-\fItableName\fR \fBsize\fR \fInode\fR
-Returns the number of nodes in the subtable. This includes the node
-and all its descendants.  The size of a leaf node is 1.
-.TP
-\fItableName\fR \fBsort\fR \fInode\fR ?\fIswitches\fR? 
-.RS
-.TP 1i
-\fB\-ascii\fR 
-Compare strings using the ASCII  collation order.
-.TP 1i
-\fB\-command\fR \fIstring\fR
-Use command \fIstring\fR as a comparison command.  To compare two
-elements, evaluate a Tcl script consisting of command with the two
-elements appended as additional arguments.  The script should return
-an integer less than, equal to, or greater than zero if the first
-element is to be considered less than, equal to, or greater than the
-second, respectively.
-.TP 1i
-\fB\-decreasing\fR
-Sort in decreasing order (largest items come first).
-.TP 1i
-\fB\-dictionary\fR
-Compare strings using a dictionary-style comparison.  This is the same 
-as \fB\-ascii\fR except (a) case is ignored except as a tie-breaker and (b) 
-if two strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, in \fB\-dictionary\fR mode, bigBoy sorts between
-bigbang and bigboy, and x10y sorts between x9y and x11y.
-.TP 1i
-\fB\-integer\fR
-Compare the nodes as integers.  
-.TP 1i
-\fB\-key\fR \fIstring\fR
-Sort based upon the node's data field keyed by \fIstring\fR. Normally
-nodes are sorted according to their label. 
-.TP 1i
-\fB\-path\fR
-Compare the full path of each node.  The default is to compare only its
-label.
-.TP 1i
-\fB\-real\fR
-Compare the nodes as real numbers.
-.TP 1i
-\fB\-recurse\fR
-Recursively sort the entire subtable rooted at \fInode\fR.
-.TP 1i
-\fB\-reorder\fR 
-Recursively sort subtables for each node.  \fBWarning\fR.  Unlike
-the normal flat sort, where a list of nodes is returned, this will
-reorder the table.  
-.RE
-.TP
-\fItableName\fR \fBtag\fR \fIargs\fR
-Manages tags for the table object.
-See the 
-.SB "TAG OPERATIONS"
-section below.
-.TP
-\fItableName\fR \fBtrace\fR \fIargs\fR
-Manages traces for data fields in the table object.
-Traces cause Tcl commands to be executed whenever a data field of a
-node is created, read, written, or unset.  Traces can be set for a
-specific node or a tag, representing possibly many nodes.
-See the 
-.SB "TRACE OPERATIONS"
-section below.
-.TP
-\fItableName\fR \fBunset\fR \fInode\fR \fIkey\fR...
-Removes one or more data fields from \fInode\fR. \fINode\fR may 
-be a tag that represents several nodes.  \fIKey\fR is the
-name of the data field to be removed.  It's not an error is
-\fInode\fR does not contain \fIkey\fR.  
-This operation may trigger \fBunset\fR data traces.
-.RE
-.SH TAG OPERATIONS
-Tags are a general means of selecting and marking nodes in the table.
-A tag is just a string of characters, and it may take any form except
-that of an integer.  The same tag may be associated with many
-different nodes.  
-.sp
-There are two built-in tags: The tag \fBall\fR is implicitly
-associated with every node in the table.  It may be used to invoke
-operations on all the nodes in the table.  The tag \fBroot\fR is
-managed automatically by the table object.  It specifies the node
-that is currently set as the root of the table.
-.sp
-Most table operations use tags.  And several operations let you
-operate on multiple nodes at once.  For example, you can use the
-\fBset\fR operation with the tag \fBall\fR to set a data field in 
-for all nodes in the table.
-.PP
-Tags are invoked by the \fBtag\fR operation.  The
-general form is
-.DS
-\fItableName\fR \fBtag\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below.
-.TP
-\fItableName\fR \fBtag add\fR \fIstring\fR \fInode\fR...
-Adds the tag \fIstring\fR to one of more nodes.
-.TP
-\fItableName\fR \fBtag delete\fR \fIstring\fR \fInode\fR...
-Deletes the tag \fIstring\fR from one or more nodes.  
-.TP
-\fItableName\fR \fBtag forget\fR \fIstring\fR
-Removes the tag \fIstring\fR from all nodes.  It's not an error if no
-nodes are tagged as \fIstring\fR.
-.TP
-\fItableName\fR \fBtag get\fR \fInode\fR \fIpattern\fR...
-Returns the tag names for a given node.  If one of more pattern
-arguments are provided, then only those matching tags are returned.
-.TP
-\fItableName\fR \fBtag names\fR ?\fInode\fR?
-Returns a list of tags used by the table.  If a \fInode\fR argument
-is present, only those tags used by \fInode\fR are returned.
-.TP
-\fItableName\fR \fBtag nodes\fR \fIstring\fR
-Returns a list of nodes that have the tag \fIstring\fR.  If no node
-is tagged as \fIstring\fR, then an empty string is returned.
-.TP
-\fItableName\fR \fBtag set\fR \fInode\fR \fIstring\fR...
-Sets one or more tags for a given node.  Tag names can't start with a
-digit (to distinquish them from node ids) and can't be a reserved tag
-("root" or "all").
-.TP
-\fItableName\fR \fBtag unset\fR \fInode\fR \fIstring\fR...  
-Removes one or more tags from a given node. Tag names that don't exist 
-or are reserved ("root" or "all") are silently ignored.
-.SH TRACE OPERATIONS
-Data fields can be traced much in the same way that you can trace Tcl
-variables.  Data traces cause Tcl commands to be executed whenever a
-particular data field of a node is created, read, written, or unset.
-A trace can apply to one or more nodes.  You can trace a specific node
-by using its id, or a group of nodes by a their tag.
-.PP
-The table's \fBget\fR, \fBset\fR, and \fBunset\fR operations can 
-trigger various traces.  The \fBget\fR operation can cause 
-a \fIread\fR  trace to fire.  The \fBset\fR operation causes a \fIwrite\fR 
-trace to fire.  And if the data field is written for the first time, you
-will also get a \fIcreate\fR trace.
-The \fBunset\fR operation triggers \fIunset\fR traces.
-.PP
-Data traces are invoked by the \fBtrace\fR
-operation.  The general form is
-.DS
-\fItableName\fR \fBtrace\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for traces are listed below.
-.TP
-\fItableName\fR \fBtrace create\fR \fInode\fR \fIkey\fR \fIops\fR \fIcommand\fR
-Creates a trace for \fInode\fR on data field \fIkey\fR.  \fINode\fR
-can refer to more than one node (for example, the tag \fBall\fR). If
-\fInode\fR is a tag, any node with that tag can possibly trigger a trace,
-invoking \fIcommand\fR.  
-\fICommand\fR is command prefix, typically a procedure name.
-Whenever a trace is triggered, four arguments are appended to
-\fIcommand\fR before it is invoked: \fItableName\fR, id of the
-node, \fIkey\fR and, \fIops\fR.
-Note that no nodes need have the field \fIkey\fR.  
-A trace identifier in the form "\f(CWtrace0\fR", "\f(CWtrace1\fR", etc.
-is returned.  
-.sp
-\fIOps\fR indicates which operations are of
-interest, and consists of one or more of the following letters:
-.RS
-.TP
-\fBr\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is read. Both read and
-write traces are temporarily disabled when \fIcommand\fR is executed.
-.TP
-\fBw\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is written.  Both read and
-write traces are temporarily disabled when \fIcommand\fR is executed.
-.TP
-\fBc\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is created.
-.TP
-\fBu\fR 
-Invoke \fIcommand\fR whenever \fIkey\fR is unset.  Data fields are
-typically unset with the \fBunset\fR command.   Data fields are also 
-unset when the table is released, but all traces are disabled prior
-to that.
-.sp
-.RE
-.TP
-\fItableName\fR \fBtrace delete\fR \fItraceId\fR...
-Deletes one of more traces.  \fITraceId\fR is
-the trace identifier returned by the \fBtrace create\fR operation.
-.TP
-\fItableName\fR \fBtrace info\fR \fItraceId\fR 
-Returns information about the trace \fItraceId\fR.  \fITraceId\fR
-is a trace identifier previously returned by the \fBtrace create\fR operation.
-It's the same information specified for the \fBtrace create\fR operation.
-It consists of the node id or tag, data field key, a string of letters
-indicating the operations that are traced (it's in the same
-form as \fIops\fR) and, the command prefix.
-.TP
-\fItableName\fR \fBtrace names\fR
-Returns a list of identifers for all the current traces.
-.SH NOTIFY OPERATIONS
-Table objects can be shared among many clients, such as a
-\fBhiertable\fR widget.  Any client can create or delete nodes,
-sorting the table, etc.  You can request to be notified whenever these
-events occur.  Notify events cause Tcl commands to be executed
-whenever the table structure is changed.  
-.PP
-Notifications are handled by the \fBnotify\fR operation.  The
-general form is
-.DS
-\fItableName\fR \fBnotify\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for events are listed below.
-.TP
-\fItableName\fR \fBnotify create\fR ?\fIswitches\fR? \fIcommand\fR \fR?\fIargs\fR?...  
-Creates a notifier for the table.  A notify identifier in the form
-"\f(CWnotify0\fR", "\f(CWnotify1\fR", etc.  is returned.
-.sp
-\fICommand\fR and \fIargs\fR are saved and invoked whenever the table
-structure is changed (according to \fIswitches\fR). Two arguments are
-appended to \fIcommand\fR and \fIargs\fR before it's invoked: the id
-of the node and a string representing the type of event that occured.
-One of more switches can be set to indicate the events that are of
-interest.  The valid switches are as follows:
-.RS
-.TP 1i
-\fB\-create\fR 
-Invoke \fIcommand\fR whenever a new node has been added.
-.TP 1i
-\fB\-delete\fR
-Invoke \fIcommand\fR whenever a node has been deleted.
-.TP 1i
-\fB\-move\fR
-Invoke \fIcommand\fR whenever a node has been moved.
-.TP 1i
-\fB\-sort\fR
-Invoke \fIcommand\fR whenever the table has been sorted and reordered.
-.TP 1i
-\fB\-relabel\fR
-Invoke \fIcommand\fR whenever a node has been relabeled.
-.TP 1i
-\fB\-allevents\fR
-Invoke \fIcommand\fR whenever any of the above events occur.
-.TP 1i
-\fB\-whenidle\fR
-When an event occurs don't invoke \fIcommand\fR immediately, but
-queue it to be run the next time the event loop is entered and there 
-are no events to process.  If subsequent events occur before 
-the event loop is entered, \fIcommand\fR will still be 
-invoked only once.
-.RE
-.TP
-\fItableName\fR \fBnotify delete\fR \fInotifyId\fR 
-Deletes one or more notifiers from the table.  \fINotifyId\fR is the
-notifier identifier returned by the \fBnotify create\fR operation.
-.TP
-\fItableName\fR \fBnotify info\fR \fInotifyId\fR
-Returns information about the notify event \fInotifyId\fR.  \fINotifyId\fR
-is a notify identifier previously returned by the \fBnotify create\fR operation.
-It's the same information specified for the \fBnotify create\fR operation.
-It consists of the notify id, a sublist of event flags (it's in the same
-form as \fIflags\fR) and, the command prefix.
-.TP
-\fItableName\fR \fBnotify names\fR
-Returns a list of identifers for all the current notifiers.
-.SH C LANGUAGE API
-Blt_Dt_Apply, 
-Blt_Dt_ApplyBFS, 
-Blt_Dt_ApplyDFS, 
-Blt_Dt_ChangeRoot, 
-Blt_Dt_Create, 
-Blt_Dt_CreateEventHandler, 
-Blt_Dt_CreateNode, 
-Blt_Dt_CreateTrace, 
-Blt_Dt_DeleteEventHandler, 
-Blt_Dt_DeleteNode, 
-Blt_Dt_DeleteTrace, 
-Blt_Dt_Exists, 
-Blt_Dt_FindChild, 
-Blt_Dt_FirstChild, 
-Blt_Dt_FirstKey, 
-Blt_Dt_GetNode, 
-Blt_Dt_GetToken, 
-Blt_Dt_GetValue, 
-Blt_Dt_IsAncestor, 
-Blt_Dt_IsBefore, 
-Blt_Dt_IsLeaf, 
-Blt_Dt_LastChild, 
-Blt_Dt_MoveNode, 
-Blt_Dt_Name, 
-Blt_Dt_NextKey, 
-Blt_Dt_NextNode, 
-Blt_Dt_NextSibling, 
-Blt_Dt_NodeDegree, 
-Blt_Dt_NodeDepth, 
-Blt_Dt_NodeId, 
-Blt_Dt_NodeLabel, 
-Blt_Dt_NodeParent, 
-Blt_Dt_PrevNode, 
-Blt_Dt_PrevSibling, 
-Blt_Dt_RelabelNode, 
-Blt_Dt_ReleaseToken, 
-Blt_Dt_RootNode, 
-Blt_Dt_SetValue, 
-Blt_Dt_Size, 
-Blt_Dt_SortNode, and
-Blt_Dt_UnsetValue.
-.SH KEYWORDS
-table, hiertable, widget
diff --git a/blt3.0/man/dragdrop.mann b/blt3.0/man/dragdrop.mann
deleted file mode 100644
index 895e804..0000000
--- a/blt3.0/man/dragdrop.mann
+++ /dev/null
@@ -1,470 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH drag&drop n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-drag&drop \- facilities for handling drag&drop data transfers
-.SH SYNOPSIS
-\fBdrag&drop source
-.br
-\fBdrag&drop source \fIwindow \fR?\fIoptions\fR?
-.br
-\fBdrag&drop source \fIwindow \fBhandler \fR?\fIdataType\fR? ?\fIcommand arg arg...\fR?
-.sp
-\fBdrag&drop target
-.br
-\fBdrag&drop target \fIwindow \fBhandler \fR?\fIdataType command arg arg...\fR?
-.sp
-\fBdrag&drop target \fIwindow \fBhandle \fIdataType\fR ?\fIvalue\fR?
-.sp
-\fBdrag&drop token \fIwindow
-.sp
-\fBdrag&drop drag \fIwindow x y
-.br
-\fBdrag&drop drop \fIwindow x y
-.br
-\fBdrag&drop active
-.br
-\fBdrag&drop location \fR?\fIx y\fR?
-.BE
-
-.SH DESCRIPTION
-.PP
-The \fBdrag&drop\fR command provides access to a set of facilities
-for managing drag-and-drop data transfers.  Any of the usual Tk widgets can
-be registered to participate in the drag-and-drop process.  Widgets
-registered as a drag&drop \fIsource\fP can export data to other widgets
-registered as a drag&drop \fItarget\fP.  Note that a particular widget
-can be registered as a source, as a target, or as both.
-.PP
-The drag-and-drop process begins when the user clicks and holds a mouse
-button in a source window; a token window appears with an icon or message
-to represent the data being transferred.  As the user moves the mouse pointer,
-the token window follows along, acting as a movable packet of data.
-Whenever the mouse pointer falls on a valid target window, the border of the
-token window is changed to a raised (active) state.  When the mouse button is
-released over the target window, a Tcl routine is invoked to send the data
-to the desired application, and the target window is asked to "handle"
-the data.  If this communication process fails, a rejection symbol (a
-circle with a line through it) is displayed on the token window to
-indicate failure.
-.PP
-The details of the communication process are fully configurable by the
-application developer.  In the simplest case, the value that is sent
-to the target window is a simple string.  The target window is simply
-asked to "handle" that string value.  In general, the source window
-can have a special "handler" procedure to transfer a particular data
-type by issuing a series of "send" commands.  After this, the target
-window is again asked to "handle" the result.
-.PP
-Both sources and targets can have a list of "handlers" for different
-data types.  As a token window is dragged from its source to various
-targets, each target is checked to see if it recognizes a handler
-offered by the source.  If it does, it is treated as a valid target.
-Otherwise, it is ignored.  This scheme allows the same source to
-interact with many different kinds of targets.  For example, a source
-for RGB color samples might have "color" and "string" handlers.  This
-would allow it to communicate with "color" targets (sending RGB data)
-as well as entry widgets (sending strings of the form "#rrggbb").
-.PP
-This introduction was presented as a brief overview of the communication
-process; further details are presented below:
-.TP
-\fBdrag&drop source\fR 
-Returns a list of path names for widgets registered as drag&drop
-sources.  Returns an empty string if no widgets have been registered.
-.TP
-\fBdrag&drop source \fIwindow \fR?\fIoptions\fR?
-Registers a new drag&drop source window with the given options, or
-modifies the options for an existing window:
-.RS
-.LP
-.nf
-Name:	\fBbuttonBinding\fR
-Class:	\fBButtonBinding\fR
-Switch:	\fB\-button\fR \fIn\fR
-.fi
-.IP
-Specifies the mouse button (integer 1-5) that will invoke the drag&drop
-operation on the source window.  This causes the following bindings to
-be added to the widget:
-.sp
-.nf
-.RS
-\f(CWbind \fIwin\fP <ButtonPress-\fIn\fP> {drag&drop drag %W %X %Y}
-\f(CWbind \fIwin\fP <B\fIn\fP-Motion> {drag&drop drag %W %X %Y}
-\f(CWbind \fIwin\fP <ButtonRelease-\fIn\fP> {drag&drop drop %W %X %Y}\fR
-.RE
-.fi
-.sp
-The default value is button 3.  If the value "0" is specified, then no
-bindings are added; this enables the user to establish bindings
-manually.
-.LP
-.nf
-Name:	\fBpackageCommand\fR
-Class:	\fBCommand\fR
-Switch:	\fB\-packagecmd \fIcommand\fR
-.fi
-.IP
-Specifies a Tcl command used to establish the appearance of the token
-window at the start of each drag&drop operation.  This command is
-automatically invoked by the \fBdrag&drop drag\fP command whenever the
-token window is about to be mapped for a drag operation.  It should
-update the appearance of the token window to represent the data that
-is being moved.
-.PP
-The following substitutions are made in the \fIcommand\fR string
-before it is executed:
-.RS
-.TP
-\fB%t\fR
-Replaced with the window path name for the token which represents
-the data being dragged.
-.TP
-\fB%W\fR
-Replaced with the window path name for the drag&drop source.
-.RE
-.LP
-The return value from the package command represents the data being
-transferred.  If the package command returns an empty string, the
-drag operation is quietly aborted.  This can be used to disallow
-drag&drop operations from certain parts of a widget, if the drag
-position is inappropriate.
-.LP
-For example, the following package routine will select an item
-from a listbox and configure the token window to display the selected
-string.  It uses the \fBdrag&drop location\fR command to
-determine the entry in the listbox that the user has selected
-and it returns this as the data value:
-.sp
-.nf
-.RS
-\f(CWproc package_list_item {lbox token} {
-    set xy [drag&drop location]
-    set y  [expr [lindex $xy 1]-[winfo rooty $lbox]]
-
-    set str [$lbox get [$lbox nearest $y]]
-    $token.value configure -text $str
-    return $str
-}\fR
-.RE
-.fi
-.sp
-The return value is available later when the source and target
-communicate.  If the source has a command associated with its
-data handler, then this value is substituted in place of "%v"
-in the source handler.  Otherwise, it is substituted in place
-of "%v" in the target handler.
-.LP
-.nf
-Name:	\fBerrorCmd\fR
-Class:	\fBErrorCmd\fR
-Switch:	\fB\-errorcmd \fIproc\fR
-.fi
-.IP
-Specifies a Tcl \fIproc\fR used to handle errors encountered during
-drag&drop operations.  If a \fIproc\fR is not specified, this command
-returns the current error handler.  By default, all errors are sent
-to the usual \fBtkerror\fR command, and therefore appear in a dialog
-box to the user.  This behavior is quite useful when debugging
-communication protocols, but may not be desirable in a finished
-application.  Errors can be suppressed entirely (leaving the rejection
-symbol as the only error indicator) by specifying a null string in
-place of the \fIproc\fR name.
-.LP
-.nf
-Name:	\fBrejectBackground\fR
-Class:	\fBBackground\fR
-Switch:	\fB\-rejectbg \fIcolor\fR
-.fi
-.IP
-Specifies the color used to draw the background of the rejection symbol
-on the token window.  The rejection symbol (a circle with a line through
-it--the international "no") appears whenever communication fails.
-.LP
-.nf
-Name:	\fBrejectForeground\fR
-Class:	\fBForeground\fR
-Switch:	\fB\-rejectfg \fIcolor\fR
-.fi
-.IP
-Specifies the color used to draw the foreground of the rejection symbol
-on the token window.
-.LP
-.nf
-Name:	\fBrejectStipple\fR
-Class:	\fBStipple\fR
-Switch:	\fB\-rejectstipple \fIpattern\fR
-.fi
-.IP
-Specifies a stipple pattern used to draw the foreground of the rejection
-symbol on the token window.  Any of the forms acceptable to Tk_GetBitmap
-can be used.
-.LP
-.nf
-Name:	\fBselfTarget\fR
-Class:	\fBSelfTarget\fR
-Switch:	\fB\-selftarget \fIboolean\fR
-.fi
-.IP
-If the \fIboolean\fR value is true, and if a source widget is also
-registered as a compatible target, then the source will be able to transmit
-to itself during drag&drop operations.  This is primarily useful for
-complex sources such as a canvas widget, where items may be moved from
-place to place within the same widget.  By default, this option is disabled.
-.LP
-.nf
-Name:	\fBsend\fR
-Class:	\fBSend\fR
-Switch:	\fB\-send \fIlist\fR
-.fi
-.IP
-Specifies a \fIlist\fR of \fIdataTypes\fR enabled for communication.  Only
-\fIdataTypes\fR defined by commands of the form "\fBdrag&drop source
-\fIwindow \fBhandler \fR?\fIdataType\fR ?\fIcommand arg arg...\fR?" are
-allowed.  This list also determines the priority of the various
-\fIdataTypes\fR.
-When a token window is over a potential drag&drop target, this list is
-searched from start to finish for a \fIdataType\fR that is also recognized
-by the target.  The first matching \fIdataType\fR found determines the
-value that will be sent if the token is dropped.  If no matching \fIdataType\fR
-is found, then the target is incompatible, and is ignored.  By default,
-this option has the value "all", indicating that all \fIdataTypes\fR should
-be considered in the order that they were defined for the source.
-.LP
-Note that this option makes it easy to control a drag&drop source.  Setting
-the value to an empty string disables the source; setting the value back
-to "all" restores communication.
-.LP
-.nf
-Name:	\fBsiteCommand\fR
-Class:	\fBCommand\fR
-Switch:	\fB\-sitecmd \fIcommand\fR
-.fi
-.IP
-Specifies a Tcl command used to update the appearance of the token window.
-If specified, this command is automatically invoked by the
-\fBdrag&drop drag\fP command whenever the token window is over a
-compatible drag&drop target.
-.PP
-The following substitutions are made in the \fIcommand\fR string
-before it is executed:
-.RS
-.TP
-\fB%s\fR
-Replaced with "1" if the token window is over a compatible target,
-and "0" otherwise.
-.TP
-\fB%t\fR
-Replaced with the window path name for the token which represents
-the data being dragged.
-.RE
-.LP
-Regardless of this command, border of the token window will become
-raised whenever the token is over a valid target.  This command
-can be used to display other visual cues.
-.LP
-.nf
-Name:	\fBtokenAnchor\fR
-Class:	\fBAnchor\fR
-Switch:	\fB\-tokenanchor \fIanchor\fR
-.fi
-.IP
-Specifies how the token window is positioned relative to the mouse
-pointer coordinates passed to the \fBdrag&drop drag\fP command.
-Must be one of the values n, s, e, w, center, nw, ne, sw or se.
-For example, "nw" means to position the token such that its upper-left
-corner is at the mouse pointer.  The default value is "center".
-.LP
-.nf
-Name:	\fBtokenBackground\fR
-Class:	\fBBackground\fR
-Switch:	\fB\-tokenbg \fIcolor\fR
-.fi
-.IP
-Specifies the color used to draw the background of the token window.
-.LP
-.nf
-Name:	\fBtokenBorderWidth\fR
-Class:	\fBBorderWidth\fR
-Switch:	\fB\-tokenborderwidth \fIsize\fR
-.fi
-.IP
-Specifies the width in pixels of the border around the token window.
-This border becomes raised to indicate when the token is over a compatible
-drag&drop target site.  The value may have any of the forms acceptable
-to Tk_GetPixels.  The default value is "3".
-.LP
-.nf
-Name:	\fBtokenCursor\fR
-Class:	\fBCursor\fR
-Switch:	\fB\-tokencursor \fIcursor\fR
-.fi
-.IP
-Specifies the cursor used when a token window is active.  The value
-may have any of the forms acceptable to Tk_GetCursor.  The default
-value is "center_ptr".
-.RE
-.TP
-\fBdrag&drop source \fIwindow \fBhandler \fR?\fIdataType\fR? ?\fIcommand arg arg...\fR?
-With no extra arguments, this command returns a list of all \fIdataType\fR
-names that have been registered for the source \fIwindow\fR.  If only the
-\fIdataType\fR is specified, then the \fIdataType\fR is created if
-necessary, and the command associated with the \fIdataType\fR is returned.
-Otherwise, it concatenates the \fIcommand\fR and any extra \fIarg\fR strings,
-and registers a new \fIdataType\fR with this command.
-.PP
-The following substitutions are made in the \fIcommand\fR string
-before it is executed:
-.RS
-.TP
-\fB%i\fR
-Replaced with the name of the interpreter for the target application.
-.TP
-\fB%v\fR
-Replaced with the value returned from the "-packagecmd" command.
-.TP
-\fB%w\fR
-Replaced with the window path name for the target window.
-.RE
-.LP
-A typical source handler contains one or more "send" commands which
-transfer data to the remote application.  The target window is then
-asked to handle the new data.  Whatever value is returned by the
-source \fIcommand\fR handler is automatically substituted into the
-"%v" fields of the target handler.
-.LP
-This separation between the transfer and the handling of the data is
-important.  It allows the same source handler to transfer data for
-many different targets, and it allows each of the targets to handle
-the incoming data differently.  If an error is encountered during the
-communication process, the rejection symbol is posted on the token window
-to indicate failure.
-.RE
-.sp
-.TP
-\fBdrag&drop target\fR
-Returns a list of path names for widgets registered as drag&drop
-targets.  Returns an empty string if no widgets have been registered.
-.TP
-\fBdrag&drop target \fIwindow \fBhandler \fR?\fIdataType command arg arg...\fR?
-Registers a new drag&drop target window with a given handler, or
-modifies the handlers for an existing window.  If no \fIdataType\fR
-is specified, this command returns the current list of recognized
-\fIdataType\fR strings.  Each \fIdataType\fR is a symbolic name
-representing a form of data, and the corresponding \fIcommand\fR is
-a Tcl command that specifies how the target will make use of the data.
-This command is invoked indirectly after a source has transferred data
-to a target application.
-.PP
-The following substitutions are made in the \fIcommand\fR string
-before it is executed:
-.RS
-.TP
-\fB%v\fR
-In the simplest case, the source window does not have a handler command
-for the selected \fIdataType\fR, and this field is replaced with the
-result from the "-packagecmd" command.  When the source does have a
-handler command, the result from the "-packagecmd" command is substituted
-into its "%v" field, and the result from this command is substituted
-into this field in the target command.
-.TP
-\fB%W\fR
-Replaced with the window path name for the target window.
-.RE
-.TP
-\fBdrag&drop target \fIwindow \fRhandle \fIdataType\fR ?\fIvalue\fR?
-Searches for the given \fIdataType\fR name among the handlers registered
-for the target \fIwindow\fR, and invokes the appropriate \fIcommand\fR.
-If a \fIvalue\fR is specified, it is substituted into any "%v" fields
-in the handler command associated with the \fIdataType\fR.  If the
-\fIdataType\fR name is not recognized, this command returns an error.
-This command is invoked automatically by the drag&drop facility when
-data is being transferred from a source to a target.
-.TP
-\fBdrag&drop token \fIwindow\fR
-Returns the token window associated with a drag&drop source \fIwindow\fR.
-The token window is used to represent data as it is being dragged from
-the source to a target.  When a source is first established, its token
-window must be filled with widgets to display the source data.  For
-example,
-.sp
-.nf
-.RS
-\f(CWdrag&drop source .foo
-
-set win [drag&drop token .foo]
-label $win.label -text "Data"
-pack $win.label\fR
-.RE
-.fi
-.sp
-.TP
-\fBdrag&drop drag \fIwindow x y\fR
-Marks the start of (or movement during) a drag&drop operation.  If
-the token window is unmapped when this command is invoked, then the
-\fB\-packagecmd\fR for the source \fIwindow\fR is executed.  If this
-command is successful and returns a non-null string, the token window
-is mapped.  On subsequent calls, the token window is moved to the new
-\fIx y\fR location.  Unless the "\fB\-button 0\fR" option is specified for
-the source, this command is automatically bound to <ButtonPress-\fIn\fR>
-and <B\fIn\fR-Motion> events for "\fB\-button \fIn\fR" of the source widget.
-.TP
-\fBdrag&drop drop \fIwindow x y\fR
-Marks the end of a drag&drop operation.  If the mouse pointer is
-over a compatible target window, then the appropriate send handler for
-the first compatible \fIdataType\fR is invoked to handle the data transfer.
-If the data transfer is successful, then the token window is unmapped;
-otherwise, a rejection symbol is drawn on the token window, and the window
-is unmapped after a small delay.  Unless the "\fB\-button 0\fR" option is
-specified for the source, this command is automatically bound to the
-<ButtonRelease-\fIn\fR> event for "\fB\-button \fIn\fR" of the source widget.
-.TP
-\fBdrag&drop active\fR
-Returns "1" if a drag&drop operation is in progress, and "0" otherwise.
-A drag&drop operation officially starts after the package command has
-been executed successfully, and ends after the send handler has been
-executed (successfully or otherwise).
-.TP
-\fBdrag&drop errors \fR?\fIproc\fR?
-Specifies a Tcl \fIproc\fR used to handle errors encountered during
-drag&drop operations.  If a \fIproc\fR is not specified, this command
-returns the current error handler.  By default, all errors are sent
-to the usual \fBtkerror\fR command, and therefore appear in a dialog
-box to the user.  This behavior is quite useful when debugging
-communication protocols, but may not be desirable in a finished
-application.  Errors can be suppressed entirely (leaving the rejection
-symbol as the only error indicator) by specifying a null string in
-place of the \fIproc\fR name.
-.TP
-\fBdrag&drop location \fR?\fIx y\fR?
-Used to set or query the pointer location during a drag&drop operation.
-The \fIx y\fR arguments specify the current location; if these arguments
-are missing, then the last reported (x,y) location is returned as a list
-with two elements.  This command is issued automatically within the
-\fBdrag&drop drag\fR and \fBdrag&drop drop\fR commands, to
-keep track of pointer movement.
-
-.SH KEYWORDS
-drag&drop, send, bind, widget
diff --git a/blt3.0/man/eps.mann b/blt3.0/man/eps.mann
deleted file mode 100644
index 3f31d80..0000000
--- a/blt3.0/man/eps.mann
+++ /dev/null
@@ -1,163 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Graph widget created by Sani Nassif and George Howlett.
-'\"
-.so man.macros
-.TH eps n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-eps \-  Encapsulated PostScript canvas item.
-.SH SYNOPSIS
-\fIcanvas\fB create eps \fIx y \fR?\fIoption value\fR?...
-.BE
-.SH DESCRIPTION
-The \fBeps\fR canvas item lets you place encapulated PostScript (EPS)
-on a canvas, controlling its size and placement.  The EPS item is
-displayed either as a solid rectangle or a preview image.  The preview
-image is designated in one of two ways: 1) the EPS file
-contains an ASCII hexidecimal preview, or 2) a Tk photo image.  When
-the canvas generates PostScript output, the EPS will be inserted with
-the proper translation and scaling to match that of the EPS item. So
-can use the canvas widget as a page layout tool.
-.SH EXAMPLE
-Let's say you have for PostScript files of four graphs which you
-want to tile two-by-two on a single page.  Maybe you'd like
-to annotate the graphs by putting a caption at the bottom of
-each graph.
-.PP
-Normally, you would have to resort to an external tool or write your
-own PostScript program.  The \fBeps\fR canvas item lets you do this
-through Tk's canvas widget.  An \fBeps\fR item displays an
-image (or rectangle) representing the encapsulated PostScript file.
-It also scales and translates the EPS file when the canvas is printed.
-
-.SH SYNTAX
-.DS
-\fIcanvas \fBcreate eps \fIx y \fR?\fIoption value\fR?...
-.DE
-The \fBeps\fR item creates a new canvas item. \fICanvas\fR is the name
-of a \fBcanvas\fR widget.  You must supply the X-Y coordinate of
-the new eps item.  How the coordinate is exactly interpretered is 
-controlled by the \fB\-anchor\fR option (see below).
-.PP
-Additional options may be specified on the command line to configure
-aspects of the eps item such as its color, stipple, and font.  The
-following \fIoption\fR and \fIvalue\fR pairs are valid.
-.TP
-\fB\-anchor \fIanchor\fR
-Tells how to position the EPS item relative to its X-Y coordinate.
-The default is \f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the EPS rectangle.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the item.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-file \fIfileName\fR
-Specifies the name of the EPS file.  The first line of an
-EPS file must start with "%!PS" and contain a "EPS" version
-specification.  The other requirement is that there be a "%%BoundingBox:"
-entry which contains four integers representing the lower-left and
-upper-right coordinates of the area bounding the EPS.
-The default is \f(CW""\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font of the title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-18-180-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR
-Specifies the foreground color of the EPS rectangle.  The option
-matters only when the \fB\-stipple\fR option is set.
-The default is \f(CWwhite\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the height EPS item.  If \fIpixels\fR is \f(CW0\fR, then
-the height is determined from the PostScript "BoundingBox:" entry
-in the EPS file.
-The default is \f(CW0\fR.
-.TP
-\fB\-image \fIphoto\fR
-Specifies the name of a Tk photo image to be displayed as in
-the item as a preview image.  This option overrides any preview
-specification found in the EPS file.
-The default is \f(CW""\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the title should be justified.  This matters only when
-the title contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the EPS item.  \fIRelief\fR
-specifies how the item should appear relative to canvas; 
-for example, \f(CWraised\fR means the item should appear to 
-protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-shadowcolor \fIcolor\fR
-Specifies the color of the drop shadow used for the title.  The
-option with the \fB\-shadowoffset\fR option control how the
-title's drop shadow appears.
-The default is \f(CWgrey\fR.
-.TP
-\fB\-shadowoffset \fIpixels\fR
-Specifies the offset of the drop shadow from the title's text.
-If \fIpixels\fR is \f(CW0\fR, no shadow will be seen.
-The default is \f(CW0\fR.
-.TP
-\fB\-showimage \fIboolean\fR
-Indicates whether to display the image preview (if one exists), 
-or a simple rectangle.  
-The default is \f(CWyes\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a bitmap to used to stipple the rectangle representing
-the EPS item.  The default is \f(CW""\fR.
-.TP
-\fB\-title \fIstring\fR
-Sets the title of the EPS item.  If \fIstring\fR is \f(CW""\fR,
-then the title specified by the PostScript "Title:" entry
-is used.  You can set the string a single space to display
-no title.  The default is \f(CW""\fR.
-.TP
-\fB\-titleanchor \fIanchor\fR
-Tells how to position the title within EPS item.
-The default is \f(CWn\fR.
-.TP
-\fB\-titlecolor \fIcolor\fR
-Specifies the color of the title.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-titlerotate \fIdegrees\fR
-Sets the rotation of the title.  \fIDegrees\fR is a real number
-representing the angle of rotation.  
-The title is first rotated in space and then placed according to 
-the \fB\-titleanchor\fR position.  The default rotation is \f(CW0.0\fR.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the width EPS item.  If \fIpixels\fR is \f(CW0\fR, then
-the width is determined from the PostScript "BoundingBox:" entry
-in the EPS file.
-The default is \f(CW0\fR.
-\f(CW5i\fR.
diff --git a/blt3.0/man/graph.mann b/blt3.0/man/graph.mann
deleted file mode 100644
index c631975..0000000
--- a/blt3.0/man/graph.mann
+++ /dev/null
@@ -1,2397 +0,0 @@
-'\"
-'\" Copyright 1991-1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Graph widget created by Sani Nassif and George Howlett.
-'\"
-.so man.macros
-.TH graph n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-graph \-  2D graph for plotting X\-Y coordinate data.
-.SH SYNOPSIS
-\fBgraph\fI \fIpathName \fR?\fIoption value\fR?...
-.BE
-.SH DESCRIPTION
-The \fBgraph\fR command creates a graph for plotting
-two-dimensional data (X\-Y coordinates). It has many configurable
-components: coordinate axes, elements, legend, grid lines, cross
-hairs, etc.  They allow you to customize the look and feel of the
-graph.
-.SH INTRODUCTION
-The \fBgraph\fR command creates a new window for plotting
-two-dimensional data (X\-Y coordinates).  Data points are plotted in a
-rectangular area displayed in the center of the new window.  This is the
-\fIplotting area\fR.  The coordinate axes are drawn in the
-margins around the plotting area.  By default, the legend is displayed
-in the right margin.  The title is displayed in top margin.
-.PP
-The \fBgraph\fR widget is composed of several components: coordinate
-axes, data elements, legend, grid, cross hairs, pens, postscript, and
-annotation markers.
-.TP 1i
-\f(CWaxis\fR 
-The graph has four standard axes (\f(CWx\fR, \f(CWx2\fR,
-\f(CWy\fR, and \f(CWy2\fR), but you can create and display any number 
-of axes.  Axes control what region of data is
-displayed and how the data is scaled. Each axis consists of the axis
-line, title, major and minor ticks, and tick labels.  Tick labels
-display the value at each major tick.
-.TP 1i
-\f(CWcrosshairs\fR 
-Cross hairs are used to position the mouse pointer relative to the X
-and Y coordinate axes. Two perpendicular lines, intersecting at the
-current location of the mouse, extend across the plotting area to the
-coordinate axes.
-.TP 1i
-\f(CWelement\fR 
-An element represents a set of data points. Elements can be plotted 
-with a symbol at each data point and lines connecting the points. 
-The appearance of the element, such as its symbol, line width, and 
-color is configurable.
-.TP 1i
-\f(CWgrid\fR
-Extends the major and minor ticks of the X\-axis and/or Y\-axis across the 
-plotting area. 
-.TP 1i
-\f(CWlegend\fR 
-The legend displays the name and symbol of each data element. 
-The legend can be drawn in any margin or in the plotting area.
-.TP 1i
-\f(CWmarker\fR
-Markers are used annotate or highlight areas of the graph. For 
-example, you could use a polygon marker to fill an area under a 
-curve, or a text marker to label a particular data point. Markers 
-come in various forms: text strings, bitmaps, connected line 
-segments, images, polygons, or embedded widgets.
-.TP 1i
-\f(CWpen\fR 
-Pens define attributes (both symbol and line style) for elements. 
-Data elements use pens to specify how they should be drawn.  A data 
-element may use many pens at once.  Here, the particular pen 
-used for a data point is determined from each element's weight 
-vector (see the element's \fB\-weight\fR and \fB\-style\fR options).  
-.TP 1i
-\f(CWpostscript\fR
-The widget can generate encapsulated PostScript output. This component
-has several options to configure how the PostScript is generated.
-.SH SYNTAX
-.DS
-\fBgraph \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBgraph\fR command creates a new window \fIpathName\fR and makes
-it into a \fBgraph\fR widget.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.  Additional options may be specified on the
-command line or in the option database to configure aspects of the
-graph such as its colors and font.  See the \fBconfigure\fR operation
-below for the exact details about what \fIoption\fR and \fIvalue\fR
-pairs are valid.
-.PP
-If successful, \fBgraph\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to invoke various operations that query or modify the graph.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for the graph are described in 
-the 
-.SB "GRAPH OPERATIONS"
-section.
-.PP
-The command can also be used to access components of the graph.
-.DS
-\fIpathName component operation\fR ?\fIarg\fR?...
-.DE
-The operation, now located after the name of the component, is the
-function to be performed on that component. Each component has its own
-set of operations that manipulate that component.  They will be
-described below in their own sections.
-.SH EXAMPLE
-The \fBgraph\fR command creates a new graph.  
-.CS
-# Create a new graph.  Plotting area is black.
-graph .g \-plotbackground black
-.CE
-A new Tcl command \f(CW.g\fR is also created.  This command can be used
-to query and modify the graph.  For example, to change the title of
-the graph to "My Plot", you use the new command and the graph's
-\fBconfigure\fR operation.
-.CS
-# Change the title.
-\&.g configure \-title "My Plot"
-.CE
-A graph has several components. To access a particular component you
-use the component's name. For example, to add data elements, you use
-the new command and the \fBelement\fR component.
-.CS
-# Create a new element named "line1"
-\&.g element create line1 \\
-	\-xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \\
-	\-ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 
-		155.85 166.60 175.38 }
-.CE
-The element's X-Y coordinates are specified using lists of
-numbers.  Alternately, BLT vectors could be used to hold the X\-Y
-coordinates.
-.CS
-# Create two vectors and add them to the graph.
-vector xVec yVec
-xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }
-yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 
-	166.60 175.38 }
-\&.g element create line1 \-xdata xVec \-ydata yVec
-.CE
-The advantage of using vectors is that when you modify one, the graph
-is automatically redrawn to reflect the new values.
-.CS
-# Change the y coordinate of the first point.
-set yVector(0) 25.18
-.CE
-An element named \f(CWe1\fR is now created in \f(CW.b\fR.  It 
-is automatically added to the display list of elements.  You can
-use this list to control in what order elements are displayed.
-To query or reset the element display list, you use the element's 
-\fBshow\fR operation.
-.CS
-# Get the current display list 
-set elemList [.b element show]
-# Remove the first element so it won't be displayed.
-\&.b element show [lrange $elemList 0 end]
-.CE
-The element will be displayed by as many bars as there are data points
-(in this case there are ten).  The bars will be drawn centered at the
-x-coordinate of the data point.  All the bars will have the same
-attributes (colors, stipple, etc).  The width of each bar is by
-default one unit.  You can change this with using the \fB\-barwidth\fR
-option.
-.CS
-# Change the X\-Y coordinates of the first point.
-set xVec(0) 0.18
-set yVec(0) 25.18
-.CE
-An element named \f(CWline1\fR is now created in \f(CW.g\fR.  By
-default, the element's label in the legend will be also \f(CWline1\fR.
-You can change the label, or specify no legend entry, again using the
-element's \fBconfigure\fR operation.
-.CS
-# Don't display "line1" in the legend.
-\&.g element configure line1 \-label ""
-.CE
-You can configure more than just the element's label.  An element has
-many attributes such as symbol type and size, dashed or solid lines,
-colors, line width, etc.
-.CS
-\&.g element configure line1 \-symbol square \-color red \\
-	\-dashes { 2 4 2 } \-linewidth 2 \-pixels 2c
-.CE
-Four coordinate axes are automatically created: \f(CWx\fR, \f(CWx2\fR,
-\f(CWy\fR, and \f(CWy2\fR.  And by default, elements are mapped onto the
-axes \f(CWx\fR and \f(CWy\fR.  This can be changed with the \fB\-mapx\fR
-and \fB\-mapy\fR options.
-.CS
-# Map "line1" on the alternate Y\-axis "y2".
-\&.g element configure line1 \-mapy y2
-.CE
-Axes can be configured in many ways too.  For example, you change the
-scale of the Y\-axis from linear to log using the \fBaxis\fR component.
-.CS
-# Y\-axis is log scale.
-\&.g axis configure y \-logscale yes
-.CE
-One important way axes are used is to zoom in on a particular data
-region.  Zooming is done by simply specifying new axis limits using
-the \fB\-min\fR and \fB\-max\fR configuration options.
-.CS
-\&.g axis configure x \-min 1.0 \-max 1.5
-\&.g axis configure y \-min 12.0 \-max 55.15
-.CE
-To zoom interactively, you link the \fBaxis configure\fR operations with
-some user interaction (such as pressing the mouse button), using the
-\fBbind\fR command.  To convert between screen and graph coordinates,
-use the \fBinvtransform\fR operation.
-.CS
-# Click the button to set a new minimum 
-bind .g <ButtonPress-1> { 
-    %W axis configure x \-min [%W axis invtransform x %x]
-    %W axis configure x \-min [%W axis invtransform x %y]
-}
-.CE
-By default, the limits of the axis are determined from data values.
-To reset back to the default limits, set the \fB\-min\fR and
-\fB\-max\fR options to the empty value.
-.CS
-# Reset the axes to autoscale again.
-\&.g axis configure x \-min {} \-max {}
-\&.g axis configure y \-min {} \-max {}
-.CE
-By default, the legend is drawn in the right margin.  You can
-change this or any legend configuration options using the
-\fBlegend\fR component.
-.CS
-# Configure the legend font, color, and relief
-\&.g legend configure \-position left \-relief raised \\
-	\-font fixed \-fg blue
-.CE
-To prevent the legend from being displayed, turn on the \fB\-hide\fR
-option.
-.CS
-# Don't display the legend.
-\&.g legend configure \-hide yes\fR
-.CE
-The \fBgraph\fR widget has simple drawing procedures called markers.
-They can be used to highlight or annotate data in the graph. The types
-of markers available are bitmaps, images, polygons, lines, or windows.
-Markers can be used, for example, to mark or brush points.  In this
-example, is a text marker that labels the data first point.  Markers
-are created using the \fBmarker\fR component.
-.CS
-# Create a label for the first data point of "line1".
-\&.g marker create text \-name first_marker \-coords { 0.2 26.18 } \\
-	\-text "start" \-anchor se \-xoffset -10 \-yoffset -10
-.CE
-This creates a text marker named \f(CWfirst_marker\fR.  It will display
-the text "start" near the coordinates of the first data point.  The
-\fB\-anchor\fR, \fB\-xoffset\fR, and \fB\-yoffset\fR options are used
-to display the marker above and to the left of the data point, so that
-the data point isn't covered by the marker.  By default,
-markers are drawn last, on top of data.  You can change this with the
-\fB\-under\fR option.
-.CS
-# Draw the label before elements are drawn.
-\&.g marker configure first_marker \-under yes
-.CE
-You can add cross hairs or grid lines using the \fBcrosshairs\fR and
-\fBgrid\fR components.
-.CS
-# Display both cross hairs and grid lines.
-\&.g crosshairs configure \-hide no \-color red
-\&.g grid configure \-hide no \-dashes { 2 2 }
-# Set up a binding to reposition the crosshairs.
-bind .g <Motion> {
-    .g crosshairs configure -position @%x,%y
-}
-.CE
-The crosshairs are repositioned as the mouse pointer is moved
-in the graph.  The pointer X-Y coordinates define the center
-of the crosshairs.
-.PP
-Finally, to get hardcopy of the graph, use the \fBpostscript\fR
-component.
-.CS
-# Print the graph into file "file.ps"
-\&.g postscript output file.ps \-maxpect yes \-decorations no
-.CE
-This generates a file \f(CWfile.ps\fR containing the encapsulated
-PostScript of the graph.  The option \fB\-maxpect\fR says to scale the
-plot to the size of the page.  Turning off the \fB\-decorations\fR
-option denotes that no borders or color backgrounds should be
-drawn (i.e. the background of the margins, legend, and plotting
-area will be white).
-.SH "GRAPH OPERATIONS"
-.TP
-\fIpathName \fBaxis \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "AXIS COMPONENTS"
-section.
-.TP
-\fIpathName \fBbar \fIelemName \fR?\fIoption value\fR?...
-Creates a new barchart element \fIelemName\fR.  It's an
-error if an element \fIelemName\fR already exists.  
-See the manual for \fBbarchart\fR for details about
-what \fIoption\fR and \fIvalue\fR pairs are valid.
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBconfigure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options of the graph.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the option \fIoption\fR is set to \fIvalue\fR.
-The following options are valid.
-.RS
-.TP
-\fB\-aspect \fIwidth/height\fR
-Force a fixed aspect ratio of \fIwidth/height\fR, a floating point number.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color. This includes the margins and
-legend, but not the plotting area.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-bottommargin \fIpixels\fR
-If non-zero, overrides the computed size of the margin extending 
-below the X\-coordinate axis.
-If \fIpixels\fR is \f(CW0\fR, the automatically computed size is used.  
-The default is \f(CW0\fR.
-.TP
-\fB\-bufferelements \fIboolean\fR
-Indicates whether an internal pixmap to buffer the display of data
-elements should be used.  If \fIboolean\fR is true, data elements are
-drawn to an internal pixmap.  This option is especially useful when
-the graph is redrawn frequently while the remains data unchanged (for
-example, moving a marker across the plot).  See the
-.SB "SPEED TIPS"
-section.
-The default is \f(CW1\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CWcrosshair\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font of the graph title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-18-180-*\fR.
-.TP
-\fB\-halo \fIpixels\fR 
-Specifies a maximum distance to consider when searching for the
-closest data point (see the element's \fBclosest\fR operation below).
-Data points further than \fIpixels\fR away are ignored.  The default is
-\f(CW0.5i\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW4i\fR.
-.TP
-\fB\-invertxy \fIboolean\fR
-Indicates whether the placement X\-axis and Y\-axis should be inverted.  If
-\fIboolean\fR is true, the X and Y axes are swapped.  The default is
-\f(CW0\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the title should be justified.  This matters only when
-the title contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-leftmargin \fIpixels\fR
-If non-zero, overrides the computed size of the margin extending 
-from the left edge of the window to the Y\-coordinate axis.  
-If \fIpixels\fR is \f(CW0\fR, the automatically computed size is used.  
-The default is \f(CW0\fR.
-.TP
-\fB\-plotbackground \fIcolor\fR
-Specifies the background color of the plotting area.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-plotborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the plotting area.  The
-\fB\-plotrelief\fR option determines if a border is drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-plotpadx \fIpad\fR
-Sets the amount of padding to be added to the left and right sides of
-the plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the left side of the
-plotting area entry is padded by the first distance and the right side
-by the second.  If \fIpad\fR is just one distance, both the left and
-right sides are padded evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotpady \fIpad\fR
-Sets the amount of padding to be added to the top and bottom of the
-plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the top of the plotting
-area is padded by the first distance and the bottom by the second.  If
-\fIpad\fR is just one distance, both the top and bottom are padded
-evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotrelief \fIrelief\fR
-Specifies the 3-D effect for the plotting area.  \fIRelief\fR
-specifies how the interior of the plotting area should appear relative
-to rest of the graph; for example, \f(CWraised\fR means the plot should
-appear to protrude from the graph, relative to the surface of the
-graph.  The default is \f(CWsunken\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the graph widget.  \fIRelief\fR
-specifies how the graph should appear relative to widget it is packed
-into; for example, \f(CWraised\fR means the graph should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-rightmargin \fIpixels\fR
-If non-zero, overrides the computed size of the margin extending 
-from the plotting area to the right edge of
-the window. By default, the legend is drawn in this margin. 
-If \fIpixels\fR is \f(CW0\fR, the automatically computed size is used.  
-The default is \f(CW0\fR.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW""\fR.
-.TP
-\fB\-tile \fIimage\fR 
-Specifies a tiled background for the widget.  If \fIimage\fR isn't
-\f(CW""\fR, the background is tiled using \fIimage\fR.
-Otherwise, the normal background color is drawn (see the
-\fB\-background\fR option).  \fIImage\fR must be an image created
-using the Tk \fBimage\fR command.  The default is \f(CW""\fR.
-.TP
-\fB\-title \fItext\fR 
-Sets the title to \fItext\fR. If \fItext\fR is \f(CW""\fR,
-no title will be displayed.
-.TP
-\fB\-topmargin \fIpixels\fR 
-If non-zero, overrides the computed size of the margin above the x2
-axis.  If \fIpixels\fR is \f(CW0\fR, the automatically computed size
-is used.  The default is \f(CW0\fR.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the requested width of the widget.  The default is
-\f(CW5i\fR.
-.RE
-.TP
-\fIpathName \fBcrosshairs \fIoperation \fR?\fIarg\fR?
-See the 
-.SB "CROSSHAIRS COMPONENT"
-section.
-.TP
-\fIpathName \fBelement \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "ELEMENT COMPONENTS"
-section.
-.TP
-\fIpathName \fBextents \fIitem\fR 
-Returns the size of a particular item in the graph.  \fIItem\fR must
-be either \f(CWleftmargin\fR, \f(CWrightmargin\fR, \f(CWtopmargin\fR,
-\f(CWbottommargin\fR, \f(CWplotwidth\fR, or \f(CWplotheight\fR.
-.TP
-\fIpathName \fBgrid \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "GRID COMPONENT"
-section.
-.TP
-\fIpathName \fBinvtransform \fIwinX winY\fR 
-Performs an inverse coordinate transformation, mapping window
-coordinates back to graph coordinates, using the standard X\-axis and Y\-axis.
-Returns a list of containing the X-Y graph coordinates.
-.TP
-\fIpathName \fBinside \fIx y\fR
-Returns \f(CW1\fR is the designated screen coordinate (\fIx\fR and \fIy\fR)
-is inside the plotting area and \f(CW0\fR otherwise.
-.TP
-\fIpathName \fBlegend \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "LEGEND COMPONENT"
-section.
-.TP
-\fIpathName \fBline\fB operation arg\fR...
-The operation is the same as \fBelement\fR.
-.TP
-\fIpathName \fBmarker \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "MARKER COMPONENTS"
-section.
-.TP
-\fIpathName \fBpostscript \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "POSTSCRIPT COMPONENT"
-section.
-.TP
-\fIpathName \fBsnap \fR?\fIswitches\fR? \fIoutputName\fR
-Takes a snapshot of the graph, saving the output in \fIoutputName\fR.
-The following switches are available.
-.RS
-.TP 1i
-\fB\-format\fR \fIformat\fR
-Specifies how the snapshot is output. \fIFormat\fR may be one of 
-the following listed below.  The default is \f(CWphoto\fR. 
-.RS
-.TP 
-\f(CWphoto\fR
-Saves a Tk photo image. \fIOutputName\fR represents the name of a 
-Tk photo image that must already have been created.  
-.TP 
-\f(CWwmf\fR
-Saves an Aldus Placeable Metafile.  \fIOutputName\fR represents the
-filename where the metafile is written.  If \fIoutputName\fR is
-\f(CWCLIPBOARD\fR, then output is written directly to the Windows
-clipboard.  This format is available only under Microsoft Windows.
-.TP 
-\f(CWemf\fR
-Saves an Enhanced Metafile. \fIOutputName\fR represents the filename
-where the metafile is written.  If \fIoutputName\fR is
-\f(CWCLIPBOARD\fR, then output is written directly to the Windows
-clipboard.  This format is available only under Microsoft Windows.
-.RE
-.TP 1i
-\fB\-height\fR \fIsize\fR
-Specifies the height of the graph.  \fISize\fR is a screen distance.
-The graph will be redrawn using this dimension, rather than its
-current window height.
-.TP 1i
-\fB\-width\fR \fIsize\fR
-Specifies the width of the graph.  \fISize\fR is a screen distance.
-The graph will be redrawn using this dimension, rather than its
-current window width.
-.RE
-.TP
-\fIpathName \fBtransform \fIx y\fR 
-Performs a coordinate transformation, mapping graph coordinates to
-window coordinates, using the standard X\-axis and Y\-axis.
-Returns a list containing the X\-Y screen coordinates.
-.TP
-\fIpathName \fBxaxis \fIoperation\fR ?\fIarg\fR?...
-.TP
-\fIpathName \fBx2axis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fByaxis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fBy2axis \fIoperation\fR ?\fIarg\fR?... 
-See the 
-.SB "AXIS COMPONENTS"
-section.
-.SH "GRAPH COMPONENTS"
-A graph is composed of several components: coordinate axes, data
-elements, legend, grid, cross hairs, postscript, and annotation
-markers. Instead of one big set of configuration options and
-operations, the graph is partitioned, where each component has its own
-configuration options and operations that specifically control that
-aspect or part of the graph. 
-.SS "AXIS COMPONENTS"
-Four coordinate axes are automatically created: two X\-coordinate axes
-(\f(CWx\fR and \f(CWx2\fR) and two Y\-coordinate axes (\f(CWy\fR, and
-\f(CWy2\fR).  By default, the axis \f(CWx\fR is located in the bottom
-margin, \f(CWy\fR in the left margin, \f(CWx2\fR in the top margin, and
-\f(CWy2\fR in the right margin.
-.PP
-An axis consists of the axis line, title, major and minor ticks, and
-tick labels.  Major ticks are drawn at uniform intervals along the
-axis.  Each tick is labeled with its coordinate value.  Minor ticks
-are drawn at uniform intervals within major ticks.  
-.PP
-The range of the axis controls what region of data is plotted.
-Data points outside the minimum and maximum limits of the axis are
-not plotted.  By default, the minimum and maximum limits are
-determined from the data, but you can reset either limit.
-.PP
-You can have several axes. To create an axis, invoke
-the axis component and its create operation.
-.CS
-# Create a new axis called "tempAxis"
-\&.g axis create tempAxis
-.CE
-You map data elements to an axis using the element's \-mapy and \-mapx
-configuration options. They specify the coordinate axes an element
-is mapped onto.
-.CS
-# Now map the tempAxis data to this axis.
-\&.g element create "e1" \-xdata $x \-ydata $y \-mapy tempAxis
-.CE
-Any number of axes can be displayed simultaneously. They are drawn in
-the margins surrounding the plotting area.  The default axes \f(CWx\fR
-and \f(CWy\fR are drawn in the bottom and left margins. The axes
-\f(CWx2\fR and \f(CWy2\fR are drawn in top and right margins.  By
-default, only \f(CWx\fR and \f(CWy\fR are shown. Note that the axes
-can have different scales.
-.PP
-To display a different axis or more than one axis, you invoke one of
-the following components: \fBxaxis\fR, \fByaxis\fR, \fBx2axis\fR, and
-\fBy2axis\fR.  Each component has a \fBuse\fR operation that
-designates the axis (or axes) to be drawn in that corresponding
-margin: \fBxaxis\fR in the bottom, \fByaxis\fR in the left,
-\fBx2axis\fR in the top, and \fBy2axis\fR in the right.
-.CS
-# Display the axis tempAxis in the left margin.
-\&.g yaxis use tempAxis
-.CE
-The \fBuse\fR operation takes a list of axis names as its last
-argument.  This is the list of axes to be drawn in this margin.
-.PP
-You can configure axes in many ways. The axis scale can be linear or
-logarithmic.  The values along the axis can either monotonically
-increase or decrease.  If you need custom tick labels, you can specify
-a Tcl procedure to format the label any way you wish.  You can control
-how ticks are drawn, by changing the major tick interval or the number
-of minor ticks.  You can define non-uniform tick intervals, such as
-for time-series plots.
-.PP
-.TP
-\fIpathName \fBaxis bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an axis with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on graph axes, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBaxis \fBcget \fIaxisName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIaxisName\fR.  \fIOption\fR may be any option described below
-for the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBconfigure \fIaxisName \fR?\fIaxisName\fR?... ?\fIoption value\fR?...
-Queries or modifies the configuration options of \fIaxisName\fR.
-Several axes can be changed.  If \fIoption\fR isn't specified, a list
-describing all the current options for \fIaxisName\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-\fIoption\fR is returned.  If one or more \fIoption\fR and \fIvalue\fR
-pairs are specified, then for each pair, the axis option \fIoption\fR
-is set to \fIvalue\fR.  The following options are valid for axes.
-.RS
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for the axis.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events for axes are handled.  Each tag in the list matching the current event
-sequence will have its Tcl command executed.  Implicitly the name of
-the element is always the first tag in the list.  The default value is
-\f(CWall\fR.
-.TP
-\fB\-color \fIcolor\fR
-Sets the color of the axis and tick labels.
-The default is \f(CWblack\fR.
-.TP
-\fB\-command \fIprefix\fR
-Specifies a Tcl command to be invoked when formatting the axis tick
-labels. \fIPrefix\fR is a string containing the name of a Tcl proc and
-any extra arguments for the procedure.  This command is invoked for each
-major tick on the axis.  Two additional arguments are passed to the
-procedure: the pathname of the widget and the current the numeric
-value of the tick.  The procedure returns the formatted tick label.  If
-\f(CW""\fR is returned, no label will appear next to the tick.  You can
-get the standard tick labels again by setting \fIprefix\fR to
-\f(CW""\fR.  The default is \f(CW""\fR.
-.sp 1
-Please note that this procedure is invoked while the graph is redrawn.
-You may query configuration options.  But do not them, because this
-can have unexpected results.
-.TP
-\fB\-descending \fIboolean\fR 
-Indicates whether the values along the axis are monotonically increasing or
-decreasing.  If \fIboolean\fR is true, the axis values will be
-decreasing.  The default is \f(CW0\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates if the axis is displayed. If \fIboolean\fR is false the axis 
-will be displayed. Any element mapped to the axis is displayed regardless.
-The default value is \f(CW0\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the axis title should be justified.  This matters only
-when the axis title contains more than one line of text. \fIJustify\fR
-must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-limits \fIformatStr\fR
-Specifies a printf-like description to format the minimum and maximum
-limits of the axis.  The limits are displayed at the top/bottom or
-left/right sides of the plotting area.  \fIFormatStr\fR is a list of
-one or two format descriptions.  If one description is supplied, both
-the minimum and maximum limits are formatted in the same way.  If two,
-the first designates the format for the minimum limit, the second for
-the maximum.  If \f(CW""\fR is given as either description, then 
-the that limit will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the axis and tick lines.  The default is \f(CW1\fR
-pixel.
-.TP
-\fB\-logscale \fIboolean\fR
-Indicates whether the scale of the axis is logarithmic or linear.  If
-\fIboolean\fR is true, the axis is logarithmic.  The default scale is
-linear.
-.TP
-\fB\-loose \fIboolean\fR
-Indicates whether the limits of the axis should fit the data points tightly,
-at the outermost data points, or loosely, at the outer tick intervals.
-If the axis limit is set with the -min or -max option, the axes are
-displayed tightly.
-If \fIboolean\fR is true, the axis range is "loose".
-The default is \f(CW0\fR.
-.TP
-\fB\-majorticks \fImajorList\fR
-Specifies where to display major axis ticks.  You can use this option
-to display ticks at non-uniform intervals.  \fIMajorList\fR is a list
-of axis coordinates designating the location of major ticks.  No
-minor ticks are drawn.  If \fImajorList\fR is \f(CW""\fR, 
-major ticks will be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-max \fIvalue\fR
-Sets the maximum limit of \fIaxisName\fR.  Any data point greater 
-than \fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR, 
-the maximum limit is calculated using the largest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-min \fIvalue\fR
-Sets the minimum limit of \fIaxisName\fR. Any data point less than 
-\fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR,
-the minimum limit is calculated using the smallest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-minorticks \fIminorList\fR
-Specifies where to display minor axis ticks.  You can use this option
-to display minor ticks at non-uniform intervals. \fIMinorList\fR is a
-list of real values, ranging from 0.0 to 1.0, designating the placement of
-a minor tick.  No minor ticks are drawn if the \fB\-majortick\fR
-option is also set.  If \fIminorList\fR is \f(CW""\fR, minor ticks will
-be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the how many degrees to rotate the axis tick labels.
-\fITheta\fR is a real value representing the number of degrees
-to rotate the tick labels.  The default is \f(CW0.0\fR degrees.
-.TP
-\fB\-scrollcommand \fIcommand\fR
-Specify the prefix for a command used to communicate with scrollbars
-for this axis, such as \fI.sbar set\fP.
-.TP
-\fB\-scrollmax \fIvalue\fR
-Sets the maximum limit of the axis scroll region.  If \fIvalue\fR is
-\f(CW""\fR, the maximum limit is calculated using the largest data
-value.  The default is \f(CW""\fR.
-.TP
-\fB\-scrollmin \fIvalue\fR 
-Sets the minimum limit of axis scroll region.  If \fIvalue\fR is
-\f(CW""\fR, the minimum limit is calculated using the smallest data
-value.  The default is \f(CW""\fR.
-.TP
-\fB\-showticks \fIboolean\fR
-Indicates whether axis ticks should be drawn. If \fIboolean\fR is
-true, ticks are drawn.  If false, only the
-axis line is drawn. The default is \f(CW1\fR.
-.TP
-\fB\-stepsize \fIvalue\fR
-Specifies the interval between major axis ticks.  If \fIvalue\fR isn't
-a valid interval (must be less than the axis range), 
-the request is ignored and the step size is automatically calculated.
-.TP
-\fB\-subdivisions \fInumber\fR 
-Indicates how many minor axis ticks are
-to be drawn.  For example, if \fInumber\fR is two, only one minor
-tick is drawn.  If \fInumber\fR is one, no minor ticks are
-displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-tickfont \fIfontName\fR 
-Specifies the font for axis tick labels. The default is
-\f(CW*-Courier-Bold-R-Normal-*-100-*\fR.
-.TP
-\fB\-ticklength \fIpixels\fR
-Sets the length of major and minor ticks (minor ticks are half the
-length of major ticks). If \fIpixels\fR is less than zero, the axis
-will be inverted with ticks drawn pointing towards the plot.  The
-default is \f(CW0.1i\fR.
-.TP
-\fB\-title \fItext\fR
-Sets the title of the axis. If \fItext\fR is 
-\f(CW""\fR, no axis title will be displayed.  
-.TP
-\fB\-titlealternate \fIboolean\fR
-Indicates to display the axis title in its alternate location. 
-Normally the axis title is centered along the axis.  This option
-places the axis either to the right (horizontal axes) or above
-(vertical axes) the axis.  The default is \f(CW0\fR.
-.TP
-\fB\-titlecolor \fIcolor\fR
-Sets the color of the axis title. The default is \f(CWblack\fR.
-.TP
-\fB\-titlefont \fIfontName\fR 
-Specifies the font for axis title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-14-140-*\fR.
-.PP
-Axis configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWAxis\fR.  The resource names
-are the names of the axes (such as \f(CWx\fR or \f(CWx2\fR).
-.CS
-option add *Graph.Axis.Color  blue
-option add *Graph.x.LogScale  true
-option add *Graph.x2.LogScale false
-.CE
-.RE
-.TP
-\fIpathName \fBaxis \fBcreate \fIaxisName \fR?\fIoption value\fR?...
-Creates a new axis by the name \fIaxisName\fR.  No axis by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBdelete \fR?\fIaxisName\fR?...
-Deletes the named axes. An axis is not really
-deleted until it is not longer in use, so it's safe to delete
-axes mapped to elements.
-.TP
-\fIpathName \fBaxis invtransform \fIaxisName value\fR
-Performs the inverse transformation, changing the screen coordinate
-\fIvalue\fR to a graph coordinate, mapping the value mapped to
-\fIaxisName\fR.  Returns the graph coordinate.
-.TP
-\fIpathName \fBaxis limits \fIaxisName\fR
-Returns a list of the minimum and maximum limits for \fIaxisName\fR.  The order
-of the list is \f(CWmin max\fR.
-.TP
-\fIpathName \fBaxis names \fR?\fIpattern\fR?...
-Returns a list of axes matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all axes are returned.
-.TP
-\fIpathName \fBaxis transform \fIaxisName value\fR
-Transforms the coordinate \fIvalue\fR to a screen coordinate by mapping
-the it to \fIaxisName\fR.  Returns the transformed screen coordinate.
-.TP
-\fIpathName \fBaxis view \fIaxisName\fR
-Change the viewable area of this axis. Use as an argument to a scrollbar's "\fI\-command\fR".
-.PP
-The default axes are \f(CWx\fR, \f(CWy\fR, \f(CWx2\fR, and \f(CWy2\fR.
-But you can display more than four axes simultaneously.  You can also
-swap in a different axis with \fBuse\fR operation of the special axis
-components: \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR.
-.CS
-\&.g create axis temp
-\&.g create axis time
-\&...
-\&.g xaxis use temp
-\&.g yaxis use time
-.CE
-Only the axes specified for use are displayed on the screen.
-.PP
-The \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR
-components operate on an axis location rather than a specific axis
-like the more general \fBaxis\fR component does.  They implicitly
-control the axis that is currently using to that location.  By
-default, \fBxaxis\fR uses the \f(CWx\fR axis, \fByaxis\fR uses
-\f(CWy\fR, \fBx2axis\fR uses \f(CWx2\fR, and \fBy2axis\fR uses
-\f(CWy2\fR.  When more than one axis is displayed in a margin, it
-represents the first axis displayed.
-.PP
-The following operations are available for axes. They mirror exactly
-the operations of the \fBaxis\fR component.  The \fIaxis\fR argument
-must be \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, or \fBy2axis\fR.  This
-feature is deprecated since more than one axis can now be used a
-margin.  You should only use the \fBxaxis\fR, \fBx2axis\fR,
-\fByaxis\fR, and \fBy2axis\fR components with the \fBuse\fR operation.
-For all other operations, use the general \fBaxis\fR component
-instead.
-.TP
-\fIpathName \fIaxis \fBcget \fIoption\fR
-.TP
-\fIpathName \fIaxis \fBconfigure \fR?\fIoption value\fR?...
-.TP
-\fIpathName \fIaxis\fB invtransform \fIvalue\fR
-.TP
-\fIpathName \fIaxis \fBlimits\fR
-.TP
-\fIpathName \fIaxis\fB transform \fIvalue\fR
-.TP
-\fIpathName \fIaxis\fB use \fR?\fIaxisName\fR?  
-Designates the axis \fIaxisName\fR is to be displayed at this
-location.  \fIAxisName\fR can not be already in use at another location.  
-This command returns the name of the axis currently using this location.
-.SS "CROSSHAIRS COMPONENT"
-Cross hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position
-the mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives.
-This means that they can be quickly drawn and erased without redrawing
-the entire graph.
-.PP
-The following operations are available for cross hairs:
-.TP
-\fIpathName \fBcrosshairs cget \fIoption\fR
-Returns the current value of the cross hairs configuration option
-given by \fIoption\fR.  \fIOption\fR may be any option
-described below for the cross hairs \fBconfigure\fR operation.
-.TP
-\fIpathName \fBcrosshairs configure \fR?\fIoption value\fR?...  
-Queries or modifies the configuration options of the cross hairs.  If
-\fIoption\fR isn't specified, a list describing all the current
-options for the cross hairs is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the cross hairs option \fIoption\fR is set to
-\fIvalue\fR.
-The following options are available for cross hairs.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the cross hairs.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the cross hairs. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the cross hair lines.  Each number must be between 1 and
-255.  If \fIdashList\fR is \f(CW""\fR, the cross hairs will be solid
-lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether cross hairs are drawn. If \fIboolean\fR is true,
-cross hairs are not drawn.  The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the cross hair lines.  The default is \f(CW1\fR.
-.TP
-\fB\-position \fIpos\fR 
-Specifies the screen position where the cross hairs intersect.
-\fIPos\fR must be in the form "\fI at x,y\fR", where \fIx\fR and \fIy\fR
-are the window coordinates of the intersection.
-.PP
-Cross hairs configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWcrosshairs\fR and \f(CWCrosshairs\fR respectively.
-.CS
-option add *Graph.Crosshairs.LineWidth 2
-option add *Graph.Crosshairs.Color     red
-.CE
-.RE
-.TP
-\fIpathName \fBcrosshairs off\fR
-Turns off the cross hairs. 
-.TP
-\fIpathName \fBcrosshairs on\fR
-Turns on the display of the cross hairs.
-.TP
-\fIpathName \fBcrosshairs toggle\fR 
-Toggles the current state of the cross hairs, alternately mapping and
-unmapping the cross hairs.
-.SS "ELEMENT COMPONENTS"
-A data element represents a set of data.  It contains x and y vectors
-containing the coordinates of the data points.  Elements can be
-displayed with a symbol at each data point and lines connecting the
-points.  Elements also control the appearance of the data, such as the
-symbol type, line width, color etc.
-.PP
-When new data elements are created, they are automatically added to a
-list of displayed elements.   The display list controls what elements
-are drawn and in what order.  
-.PP
-The following operations are available for elements.
-.TP
-\fIpathName \fBelement activate \fIelemName \fR?\fIindex\fR?...
-Specifies the data points of element \fIelemName\fR to be drawn
-using active foreground and background colors.  \fIElemName\fR is the
-name of the element and \fIindex\fR is a number representing the index
-of the data point. If no indices are present then all data points
-become active.
-.TP
-\fIpathName \fBelement bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an element with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on graph elements, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBelement cget \fIelemName \fIoption\fR
-Returns the current value of the element configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any of the options described below
-for the element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement closest \fIx y\fR ?\fIoption value\fR?... ?\fIelemName\fR?...
-Searches for the data point closest to the window coordinates \fIx\fR
-and \fIy\fR.  By default, all elements are searched.  Hidden elements
-(see the \fB\-hide\fR option is false) are ignored.  You can limit the
-search by specifying only the elements you want to be considered. 
-\fIElemName\fR must be the name of an element that can not be hidden.
-It returns a key-value list containing the name of the closest element, 
-the index of the closest data point, and the graph-coordinates of the point. 
-Returns \f(CW""\fR, if no data point within the threshold distance 
-can be found. The following
-\fIoption\fR\-\fIvalue\fR pairs are available.
-.RS
-.TP
-\fB\-along \fIdirection\fR
-Search for the closest element using the following criteria:
-.RS
-.TP
-\f(CWx\fR
-Find closest element vertically from the given X-coordinate. 
-.TP
-\f(CWy\fR
-Find the closest element horizontally from the given Y-coordinate. 
-.TP
-\f(CWboth\fR
-Find the closest element for the given point (using both the X and Y
-coordinates).  
-.RE
-.TP
-\fB\-halo \fIpixels\fR
-Specifies a threshold distance where selected data points are ignored.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-If this option isn't specified, then it defaults to the value of the
-graph's \fB\-halo\fR option.
-.TP
-\fB\-interpolate \fIstring\fR
-Indicates whether to consider projections that lie along the line segments 
-connecting data points when searching for the closest point.
-The default value is \f(CW0\fR. The values for \fIstring\fR are
-described below.
-.RS
-.TP 1.25i
-\f(CWno\fR 
-Search only for the closest data point.
-.TP
-\f(CWyes\fR
-Search includes projections that lie along the
-line segments connecting the data points.  
-.RE
-.RE
-.TP
-\fIpathName \fBelement configure \fIelemName \fR?\fIelemName\fR... ?\fIoption value\fR?...
-Queries or modifies the configuration options for elements.  Several
-elements can be modified at the same time. If \fIoption\fR isn't
-specified, a list describing all the current options for
-\fIelemName\fR is returned.  If \fIoption\fR is specified, but not
-\fIvalue\fR, then a list describing the option \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the element option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for elements.
-.RS
-.TP
-\fB\-activepen \fIpenName\fR
-Specifies pen to use to draw active element.  If \fIpenName\fR is
-\f(CW""\fR, no active elements will be drawn.  The default is 
-\f(CWactiveLine\fR.
-.TP
-\fB\-areabackground \fIcolor\fR 
-Specifies the background color of the area under the curve. The
-background area color is drawn only for bitmaps (see the
-\fB\-areapattern\fR option).  If \fIcolor\fR is \f(CW""\fR, the
-background is transparent.  The default is \f(CWblack\fR.
-.TP
-\fB\-areaforeground \fIcolor\fR 
-Specifies the foreground color of the area under the curve. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-areapattern \fIpattern\fR 
-Specifies how to fill the area under the curve.  \fIPattern\fR may be
-the name of a Tk bitmap, \f(CWsolid\fR, or \f(CW""\fR.  If "solid",
-then the area under the curve is drawn with the color designated by
-the \fB\-areaforeground\fR option.  If a bitmap, then the bitmap is
-stippled across the area.  Here the bitmap colors are controlled by the
-\fB\-areaforeground\fR and \fB\-areabackground\fR options.  If
-\fIpattern\fR is \f(CW""\fR, no filled area is drawn.  The default is
-\f(CW""\fR.
-.TP
-\fB\-areatile \fIimage\fR 
-Specifies the name of a Tk image to be used to tile the area under the
-curve.  This option supersedes the \fB\-areapattern\fR option.
-\fIImage\fR must be a photo image.  If \fIimage\fR is \f(CW""\fR, no
-tiling is performed.  The default is \f(CW""\fR.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for the element.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events are handled for elements.  Each tag in the list matching the 
-current event
-sequence will have its Tcl command executed.  Implicitly the name of
-the element is always the first tag in the list.  The default value is
-\f(CWall\fR.
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the traces connecting the data points.  
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of element line. \fIDashList\fR is a list of up to
-11 numbers that alternately represent the lengths of the dashes and
-gaps on the element line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the lines will be solid.
-.TP
-\fB\-data \fIcoordList\fR
-Specifies the X\-Y coordinates of the data.  \fICoordList\fR is a
-list of numeric expressions representing the X\-Y coordinate pairs
-of each data point.
-.TP
-\fB\-fill \fIcolor\fR 
-Sets the interior color of symbols.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the symbol is transparent.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the element is displayed.  
-The default is \f(CWno\fR.
-.TP
-\fB\-label \fItext\fR
-Sets the element's label in the legend.  If \fItext\fR
-is \f(CW""\fR, the element will have no entry in the legend.
-The default label is the element's name. 
-.TP
-\fB\-linewidth \fIpixels\fR 
-Sets the width of the connecting lines between data points.  If
-\fIpixels\fR is \f(CW0\fR, no connecting lines will be drawn between
-symbols.  The default is \f(CW0\fR.
-.TP
-\fB\-mapx \fIxAxis\fR
-Selects the X\-axis to map the element's X\-coordinates onto.
-\fIXAxis\fR must be the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Selects the Y\-axis to map the element's Y\-coordinates onto.
-\fIYAxis\fR must be the name of an axis. The default is \f(CWy\fR.
-.TP
-\fB\-offdash \fIcolor\fR
-Sets the color of the stripes when traces are dashed (see the
-\fB\-dashes\fR option).  If \fIcolor\fR is \f(CW""\fR, then the "off"
-pixels will represent gaps instead of stripes.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-outline \fIcolor\fR 
-Sets the color or the outline around each symbol.  If \fIcolor\fR is
-\f(CW""\fR, then no outline is drawn. If \fIcolor\fR is \f(CWdefcolor\fR,
-then the color will be the same as the \fB\-color\fR option.  The
-default is \f(CWdefcolor\fR.
-.TP
-\fB\-pen \fIpenname\fR
-Set the pen to use for this element.
-.TP
-\fB\-outlinewidth \fIpixels\fR 
-Sets the width of the outline bordering each symbol.  If \fIpixels\fR
-is \f(CW0\fR, no outline will be drawn. The default is \f(CW1\fR.
-.TP
-\fB\-pixels \fIpixels\fR
-Sets the size of symbols.  If \fIpixels\fR is \f(CW0\fR, no symbols will
-be drawn.  The default is \f(CW0.125i\fR.
-.TP
-\fB\-scalesymbols \fIboolean\fR 
-If \fIboolean\fR is true, the size of the symbols
-drawn for \fIelemName\fR will change with scale of the X\-axis and Y\-axis.
-At the time this option is set, the current ranges of the axes are
-saved as the normalized scales (i.e scale factor is 1.0) and the
-element is drawn at its designated size (see the \fB\-pixels\fR
-option).  As the scale of the axes change, the symbol will be scaled
-according to the smaller of the X\-axis and Y\-axis scales.  If \fIboolean\fR
-is false, the element's symbols are drawn at the designated size,
-regardless of axis scales.  The default is \f(CW0\fR.
-.TP
-\fB\-smooth \fIsmooth\fR 
-Specifies how connecting line segments are drawn between data points.
-\fISmooth\fR can be either \f(CWlinear\fR, \f(CWstep\fR, \f(CWnatural\fR, or
-\f(CWquadratic\fR.  If \fIsmooth\fR is \f(CWlinear\fR, a single line
-segment is drawn, connecting both data points. When \fIsmooth\fR is
-\f(CWstep\fR, two line segments are drawn. The first is a horizontal
-line segment that steps the next X\-coordinate.  The second is a
-vertical line, moving to the next Y\-coordinate.  Both \fInatural\fR and
-\fIquadratic\fR generate multiple segments between data points.  If
-\fInatural\fR, the segments are generated using a cubic spline.  If
-\fIquadratic\fR, a quadratic spline is used.  The default is
-\fIlinear\fR.
-.TP
-\fB\-styles \fIstyleList\fR 
-Specifies what pen to use based on the range of weights given.
-\fIStyleList\fR is a list of style specifications. Each style
-specification, in turn, is a list consisting of a pen name, and
-optionally a minimum and maximum range.  Data points whose weight (see
-the \fB\-weight\fR option) falls in this range, are drawn with this
-pen.  If no range is specified it defaults to the index of the pen in
-the list.  Note that this affects only symbol attributes. Line
-attributes, such as line width, dashes, etc. are ignored.
-.TP
-\fB\-symbol \fIsymbol\fR 
-Specifies the symbol for data points.  \fISymbol\fR can be either
-\f(CWsquare\fR, \f(CWcircle\fR, \f(CWdiamond\fR, \f(CWplus\fR, \f(CWcross\fR,
-\f(CWsplus\fR, \f(CWscross\fR, \f(CWtriangle\fR, \f(CW""\fR (where no symbol
-is drawn), or a bitmap.  Bitmaps are specified as "\fIsource\fR
-?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
-\fImask\fR is the bitmap's optional mask.  The default is
-\f(CWcircle\fR.
-.TP
-\fB\-trace \fIdirection\fR 
-Indicates whether connecting lines between data points (whose
-X\-coordinate values are either increasing or decreasing) are drawn.  
-\fIDirection\fR
-must be \f(CWincreasing\fR, \f(CWdecreasing\fR, or \f(CWboth\fR.  For
-example, if \fIdirection\fR is \f(CWincreasing\fR, connecting lines will
-be drawn only between those data points where X\-coordinate values are
-monotonically increasing.  If \fIdirection\fR is \f(CWboth\fR,
-connecting lines will be draw between all data points.  The default is
-\f(CWboth\fR.
-.TP
-\fB\-weights \fIwVec\fR 
-Specifies the weights of the individual data points.  This, 
-with the list pen styles (see the \fB\-styles\fR option),
-controls how data points are drawn.  \fIWVec\fR is the name of a BLT
-vector or a list of numeric expressions representing the weights for
-each data point.
-.TP
-\fB\-xdata \fIxVec\fR 
-Specifies the X\-coordinates of the data.  \fIXVec\fR is the name of
-a BLT vector or a list of numeric expressions.
-.TP
-\fB\-ydata \fIyVec\fR 
-Specifies the Y\-coordinates of the data.  \fIYVec\fR is the name of
-a BLT vector or a list of numeric expressions.
-.PP
-Element configuration options may also be set by the \fBoption\fR
-command.  The resource class is \f(CWElement\fR. The resource name is
-the name of the element.
-.CS
-option add *Graph.Element.symbol line
-option add *Graph.e1.symbol line
-.CE
-.RE
-.TP
-\fIpathName \fBelement create \fIelemName\fR ?\fIoption value\fR?...
-Creates a new element \fIelemName\fR.  It's an error is
-an element \fIelemName\fR already exists.  If
-additional arguments are present, they specify options valid for 
-the element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement deactivate \fIelemName\fR ?\fIelemName\fR?...
-Deactivates all the elements matching \fIpattern\fR.
-Elements whose names match any of the patterns given are redrawn using
-their normal colors.
-.TP
-\fIpathName \fBelement delete\fR ?\fIelemName\fR?...
-Deletes all the named elements.  The graph is automatically redrawn.
-.TP
-\fIpathName \fBelement exists \fIelemName\fR
-Returns \f(CW1\fR if an element \fIelemName\fR currently exists and
-\f(CW0\fR otherwise.
-.TP
-\fIpathName \fBelement names \fR?\fIpattern\fR?...  
-Returns the elements matching one or more pattern.  If no
-\fIpattern\fR is given, the names of all elements is returned.
-.TP
-\fIpathName \fBelement show\fR ?\fInameList\fR?  
-Queries or modifies the element display list.  The element display
-list designates the elements drawn and in what
-order. \fINameList\fR is a list of elements to be displayed in the
-order they are named.  If there is no \fInameList\fR argument,
-the current display list is returned.
-.TP
-\fIpathName \fBelement type\fR \fIelemName\fR
-Returns the type of \fIelemName\fR. 
-If the element is a bar element, the commands returns the string
-\f(CW"bar"\fR, otherwise it returns \f(CW"line"\fR.
-.CE
-.SS "GRID COMPONENT"
-Grid lines extend from the major and minor ticks of each axis
-horizontally or vertically across the plotting area.  The following
-operations are available for grid lines.
-.TP
-\fIpathName \fBgrid cget \fIoption\fR
-Returns the current value of the grid line configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any option described below
-for the grid \fBconfigure\fR operation.
-.TP
-\fIpathName \fBgrid configure\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for grid lines.  If
-\fIoption\fR isn't specified, a list describing all the current
-grid options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the grid line option \fIoption\fR is set to
-\fIvalue\fR.  The following options are valid for grid lines.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the grid lines.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the grid lines. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the grid lines.  Each number must be between 1 and 255.
-If \fIdashList\fR is \f(CW""\fR, the grid will be solid lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the grid should be drawn. If \fIboolean\fR
-is true, grid lines are not shown. The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of grid lines.  The default width is \f(CW1\fR.
-.TP
-\fB\-mapx \fIxAxis\fR
-Specifies the X\-axis to display grid lines.  \fIXAxis\fR
-must be the name of an axis or \f(CW""\fR for no grid lines.  
-The default is \f(CW""\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to display grid lines.  \fIYAxis\fR
-must be the name of an axis or \f(CW""\fR for no grid lines. 
-The default is \f(CWy\fR.
-.TP
-\fB\-minor \fIboolean\fR
-Indicates whether the grid lines should be drawn for minor ticks. 
-If \fIboolean\fR is true, the lines will appear at
-minor tick intervals.  The default is \f(CW1\fR.
-.PP
-Grid configuration options may also be set by the 
-\fBoption\fR command.  The resource name and class are \f(CWgrid\fR and 
-\f(CWGrid\fR respectively. 
-.CS
-option add *Graph.grid.LineWidth 2
-option add *Graph.Grid.Color     black
-.CE
-.RE
-.TP
-\fIpathName \fBgrid off\fR
-Turns off the display the grid lines.
-.TP
-\fIpathName \fBgrid on\fR
-Turns on the display the grid lines.
-.TP
-\fIpathName \fBgrid toggle\fR
-Toggles the display of the grid.  
-.SS "LEGEND COMPONENT"
-The legend displays a list of the data elements.  Each entry consists
-of the element's symbol and label.  The legend can appear in any
-margin (the default location is in the right margin).  It
-can also be positioned anywhere within the plotting area.
-.PP
-The following operations are valid for the legend.
-.TP
-\fIpathName \fBlegend activate \fIpattern\fR...
-Selects legend entries to be drawn using the active legend colors and relief.
-All entries whose element names match \fIpattern\fR  are selected.  To
-be selected, the element name must match only one \fIpattern\fR. 
-.TP
-\fIpathName \fBlegend bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a legend entry with this
-tag, \fIcommand\fR will be invoked.  Implicitly the element names
-in the entry are tags.  The syntax is similar to the 
-\fBbind\fR command except that it operates on legend entries, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBlegend cget \fIoption\fR
-Returns the current value of a legend configuration option.
-\fIOption\fR may be any option described below in the
-legend \fBconfigure\fR operation.
-.TP
-\fIpathName \fBlegend configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for the legend.  If
-\fIoption\fR isn't specified, a list describing the current
-legend options for \fIpathName\fR is returned.  If \fIoption\fR is
-specified, but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the legend option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for the legend.
-.RS
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active legend entries.  All legend
-entries marked active (see the legend \fBactivate\fR operation) are
-drawn using this background color.
-.TP
-\fB\-activeborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the active legend
-entries.  The default is \f(CW2\fR.
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color for active legend entries.  All legend
-entries marked as active (see the legend \fBactivate\fR operation) are
-drawn using this foreground color.
-.TP
-\fB\-activerelief \fIrelief\fR 
-Specifies the 3-D effect desired for active legend entries.
-\fIRelief\fR denotes how the interior of the entry should appear
-relative to the legend; for example, \f(CWraised\fR means the entry
-should appear to protrude from the legend, relative to the surface of
-the legend.  The default is \f(CWflat\fR.
-.TP
-\fB\-anchor \fIanchor\fR
-Tells how to position the legend relative to the positioning point for
-the legend.  This is dependent on the value of the \fB\-position\fR
-option.  The default is \f(CWcenter\fR.
-.RS
-.TP 1.25i
-\f(CWleft\fR or \f(CWright\fR
-The anchor describes how to position the legend vertically.  
-.TP
-\f(CWtop\fR or \f(CWbottom\fR
-The anchor describes how to position the legend horizontally.  
-.TP
-\f(CW at x,y\fR
-The anchor specifies how to position the legend relative to the
-positioning point. For example, if \fIanchor\fR is \f(CWcenter\fR then
-the legend is centered on the point; if \fIanchor\fR is \f(CWn\fR then
-the legend will be drawn such that the top center point of the
-rectangular region occupied by the legend will be at the positioning
-point.
-.TP
-\f(CWplotarea\fR
-The anchor specifies how to position the legend relative to the
-plotting area. For example, if \fIanchor\fR is \f(CWcenter\fR then the
-legend is centered in the plotting area; if \fIanchor\fR is \f(CWne\fR
-then the legend will be drawn such that occupies the upper right
-corner of the plotting area.
-.RE
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the legend. If \fIcolor\fR is \f(CW""\fR,
-the legend background with be transparent.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for legend entries.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events are handled for legend entries.  Each tag in the list matching 
-the current event sequence will have its Tcl command executed. The 
-default value is \f(CWall\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the legend (if
-such border is being drawn; the \fBrelief\fR option determines this).
-The default is \f(CW2\fR pixels.
-.TP
-\fB\-font \fIfontName\fR 
-\fIFontName\fR specifies a font to use when drawing the labels of each
-element into the legend.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of the text drawn for the element's label.
-The default is \f(CWblack\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the legend should be displayed. If \fIboolean\fR is
-true, the legend will not be draw.  The default is \f(CWno\fR.
-.TP
-\fB\-ipadx \fIpad\fR 
-Sets the amount of internal padding to be added to the width of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the left side of the legend entry is
-padded by the first distance and the right side by the second.  If
-\fIpad\fR is just one distance, both the left and right sides are padded
-evenly.  The default is \f(CW2\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets an amount of internal padding to be added to the height of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the top of the entry is padded by the
-first distance and the bottom by the second.  If \fIpad\fR is just
-one distance, both the top and bottom of the entry are padded evenly.
-The default is \f(CW2\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the legend.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the legend is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the legend.  \fIPad\fR can be a list
-of one or two screen distances.  If \fIpad\fR has two elements, the area above
-the legend is padded by the first distance and the area below by the
-second.  If \fIpad\fR is just one distance, both the top and
-bottom areas are padded evenly.  The default is \f(CW0\fR.
-.TP
-\fB\-position \fIpos\fR
-Specifies where the legend is drawn. The
-\fB\-anchor\fR option also affects where the legend is positioned.  If
-\fIpos\fR is \f(CWleft\fR, \f(CWleft\fR, \f(CWtop\fR, or \f(CWbottom\fR, the
-legend is drawn in the specified margin.  If \fIpos\fR is
-\f(CWplotarea\fR, then the legend is drawn inside the plotting area at a
-particular anchor.  If \fIpos\fR is in the form "\fI at x,y\fR", where
-\fIx\fR and \fIy\fR are the window coordinates, the legend is drawn in
-the plotting area at the specified coordinates.  The default is
-\f(CWright\fR.
-.TP
-\fB\-raised \fIboolean\fR
-Indicates whether the legend is above or below the data elements.  This
-matters only if the legend is in the plotting area.  If \fIboolean\fR
-is true, the legend will be drawn on top of any elements that may
-overlap it. The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the border around the legend.
-\fIRelief\fR specifies how the interior of the legend should appear
-relative to the graph; for example, \f(CWraised\fR means the legend
-should appear to protrude from the graph, relative to the surface of
-the graph.  The default is \f(CWsunken\fR.
-.PP
-Legend configuration options may also be set by the \fBoption\fR
-command.  The resource name and class are \f(CWlegend\fR and
-\f(CWLegend\fR respectively.
-.CS
-option add *Graph.legend.Foreground blue
-option add *Graph.Legend.Relief     raised
-.CE
-.RE
-.TP
-\fIpathName \fBlegend deactivate \fIpattern\fR...
-Selects legend entries to be drawn using the normal legend colors and
-relief.  All entries whose element names match \fIpattern\fR are
-selected.  To be selected, the element name must match only one
-\fIpattern\fR.
-.TP
-\fIpathName \fBlegend get \fIpos\fR
-Returns the name of the element whose entry is at the screen position
-\fIpos\fR in the legend.  \fIPos\fR must be in the form "\fI at x,y\fR",
-where \fIx\fR and \fIy\fR are window coordinates.  If the given
-coordinates do not lie over a legend entry, \f(CW""\fR is returned.
-.SS "PEN COMPONENTS"
-Pens define attributes (both symbol and line style) for elements.
-Pens mirror the configuration options of data elements that pertain to
-how symbols and lines are drawn.  Data elements use pens to determine
-how they are drawn.  A data element may use several pens at once.  In
-this case, the pen used for a particular data point is determined from
-each element's weight vector (see the element's \fB\-weight\fR and
-\fB\-style\fR options).
-.PP
-One pen, called \f(CWactiveLine\fR, is automatically created.
-It's used as the default active pen for elements. So you can change
-the active attributes for all elements by simply reconfiguring this
-pen.
-.CS
-\&.g pen configure "activeLine" -color green
-.CE
-You can create and use several pens. To create a pen, invoke
-the pen component and its create operation.
-.CS
-\&.g pen create myPen
-.CE
-You map pens to a data element using either the element's 
-\fB\-pen\fR or \fB\-activepen\fR options.
-.CS
-\&.g element create "line1" -xdata $x -ydata $tempData \\
-    -pen myPen
-.CE
-An element can use several pens at once. This is done by specifying
-the name of the pen in the element's style list (see the
-\fB\-styles\fR option).
-.CS
-\&.g element configure "line1" -styles { myPen 2.0 3.0 }
-.CE
-This says that any data point with a weight between 2.0 and 3.0
-is to be drawn using the pen \f(CWmyPen\fR.  All other points
-are drawn with the element's default attributes.
-.PP
-The following operations are available for pen components.
-.PP
-.TP
-\fIpathName \fBpen \fBcget \fIpenName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIpenName\fR.  \fIOption\fR may be any option described below
-for the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBconfigure \fIpenName \fR?\fIpenName\fR... ?\fIoption value\fR?...
-Queries or modifies the configuration options of
-\fIpenName\fR. Several pens can be modified at once.  If \fIoption\fR
-isn't specified, a list describing the current options for
-\fIpenName\fR is returned.  If \fIoption\fR is specified, but not
-\fIvalue\fR, then a list describing \fIoption\fR is returned.  If one
-or more \fIoption\fR and \fIvalue\fR pairs are specified, then for
-each pair, the pen option \fIoption\fR is set to \fIvalue\fR.  The
-following options are valid for pens.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the traces connecting the data points.  
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of element line. \fIDashList\fR is a list of up to
-11 numbers that alternately represent the lengths of the dashes and
-gaps on the element line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the lines will be solid.
-.TP
-\fB\-fill \fIcolor\fR 
-Sets the interior color of symbols.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the symbol is transparent.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-linewidth \fIpixels\fR 
-Sets the width of the connecting lines between data points.  If
-\fIpixels\fR is \f(CW0\fR, no connecting lines will be drawn between
-symbols.  The default is \f(CW0\fR.
-.TP
-\fB\-offdash \fIcolor\fR
-Sets the color of the stripes when traces are dashed (see the
-\fB\-dashes\fR option).  If \fIcolor\fR is \f(CW""\fR, then the "off"
-pixels will represent gaps instead of stripes.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-outline \fIcolor\fR 
-Sets the color or the outline around each symbol.  If \fIcolor\fR is
-\f(CW""\fR, then no outline is drawn. If \fIcolor\fR is \f(CWdefcolor\fR,
-then the color will be the same as the \fB\-color\fR option.  The
-default is \f(CWdefcolor\fR.
-.TP
-\fB\-outlinewidth \fIpixels\fR 
-Sets the width of the outline bordering each symbol.  If \fIpixels\fR
-is \f(CW0\fR, no outline will be drawn. The default is \f(CW1\fR.
-.TP
-\fB\-pixels \fIpixels\fR
-Sets the size of symbols.  If \fIpixels\fR is \f(CW0\fR, no symbols will
-be drawn.  The default is \f(CW0.125i\fR.
-.TP
-\fB\-symbol \fIsymbol\fR 
-Specifies the symbol for data points.  \fISymbol\fR can be either
-\f(CWsquare\fR, \f(CWcircle\fR, \f(CWdiamond\fR, \f(CWplus\fR, \f(CWcross\fR,
-\f(CWsplus\fR, \f(CWscross\fR, \f(CWtriangle\fR, \f(CW""\fR (where no symbol
-is drawn), or a bitmap.  Bitmaps are specified as "\fIsource\fR
-?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
-\fImask\fR is the bitmap's optional mask.  The default is
-\f(CWcircle\fR.
-.TP
-\fB\-type \fIelemType\fR 
-Specifies the type of element the pen is to be used with.
-This option should only be employed when creating the pen.  This
-is for those that wish to mix different types of elements (bars and
-lines) on the same graph.  The default type is "line".
-.PP
-Pen configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWPen\fR.  The resource names
-are the names of the pens.
-.CS
-option add *Graph.Pen.Color  blue
-option add *Graph.activeLine.color  green
-.CE
-.RE
-.TP
-\fIpathName \fBpen \fBcreate \fIpenName \fR?\fIoption value\fR?...
-Creates a new pen by the name \fIpenName\fR.  No pen by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBdelete \fR?\fIpenName\fR?...
-Deletes the named pens. A pen is not really
-deleted until it is not longer in use, so it's safe to delete
-pens mapped to elements.
-.TP
-\fIpathName \fBpen names \fR?\fIpattern\fR?...
-Returns a list of pens matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all pens are returned.
-.SS "POSTSCRIPT COMPONENT"
-The graph can generate encapsulated PostScript output.  There
-are several configuration options you can specify to control how the
-plot will be generated.  You can change the page dimensions and
-borders.  The plot itself can be scaled, centered, or rotated to
-landscape.  The PostScript output can be written directly to a file or
-returned through the interpreter.
-.PP
-The following postscript operations are available.
-.TP
-\fIpathName \fBpostscript cget \fIoption\fR 
-Returns the current value of the postscript option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the postscript \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpostscript configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for PostScript
-generation.  If \fIoption\fR isn't specified, a list describing 
-the current postscript options for \fIpathName\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-\fIoption\fR is returned.  If one or more \fIoption\fR and \fIvalue\fR
-pairs are specified, then for each pair, the postscript option
-\fIoption\fR is set to \fIvalue\fR.  The following postscript options
-are available.
-.RS
-.TP
-\fB\-center \fIboolean\fR
-Indicates whether the plot should be centered on the PostScript page.  If
-\fIboolean\fR is false, the plot will be placed in the upper left
-corner of the page.  The default is \f(CW1\fR.
-.TP
-\fB\-colormap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a color mapping from the X color name to PostScript.  Each
-element of \fIvarName\fR must consist of PostScript code to set a
-particular color value (e.g. ``\f(CW1.0 1.0 0.0 setrgbcolor\fR'').  When
-generating color information in PostScript, the array variable \fIvarName\fR
-is checked if an element of the name as the color exists. If so, it uses 
-its value as the PostScript
-command to set the color.  If this option hasn't been specified, or if
-there isn't an entry in \fIvarName\fR for a given color, then it uses
-the red, green, and blue intensities from the X color.
-.TP
-\fB\-colormode \fImode\fR
-Specifies how to output color information.  \fIMode\fR must be either
-\f(CWcolor\fR (for full color output), \f(CWgray\fR (convert all colors to
-their gray-scale equivalents) or \f(CWmono\fR (convert foreground colors
-to black and background colors to white).  The default mode is
-\f(CWcolor\fR. 
-.TP
-\fB\-fontmap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a font mapping from the X font name to PostScript.  Each
-element of \fIvarName\fR must consist of a Tcl list with one or two
-elements; the name and point size of a PostScript font.
-When outputting PostScript commands for a particular font, the array
-variable \fIvarName\fR is checked to see if an element by the 
-specified font exists.  If there is such an element, then the font
-information contained in that element is used in the PostScript
-output.  (If the point size is omitted from the list, the point size
-of the X font is used).  Otherwise the X font is examined in an
-attempt to guess what PostScript font to use.  This works only for
-fonts whose foundry property is \fIAdobe\fR (such as Times, Helvetica,
-Courier, etc.).  If all of this fails then the font defaults to
-\f(CWHelvetica-Bold\fR.
-.TP
-\fB\-decorations \fIboolean\fR
-Indicates whether PostScript commands to generate color backgrounds and 3-D
-borders will be output.  If \fIboolean\fR is false, the background will be 
-white and no 3-D borders will be generated. The
-default is \f(CW1\fR.
-.TP
-\fB\-height \fIpixels\fR
-Sets the height of the plot.  This lets you print the graph with a
-height different from the one drawn on the screen.  If
-\fIpixels\fR is 0, the height is the same as the widget's height.
-The default is \f(CW0\fR.
-.TP
-\fB\-landscape \fIboolean\fR
-If \fIboolean\fR is true, this specifies the printed area is to be
-rotated 90 degrees.  In non-rotated output the X\-axis of the printed
-area runs along the short dimension of the page (``portrait''
-orientation); in rotated output the X\-axis runs along the long
-dimension of the page (``landscape'' orientation).  Defaults to
-\f(CW0\fR.
-.TP
-\fB\-maxpect \fIboolean\fR
-Indicates to scale the plot so that it fills the PostScript page.
-The aspect ratio of the graph is still retained.  The default is
-\f(CW0\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the horizontal padding for the left and right page borders.  The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the left border is padded
-by the first distance and the right border by the second.  If
-\fIpad\fR has just one distance, both the left and right borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-pady \fIpad\fR 
-Sets the vertical padding for the top and bottom page borders. The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the top border is padded
-by the first distance and the bottom border by the second.  If
-\fIpad\fR has just one distance, both the top and bottom borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-paperheight \fIpixels\fR
-Sets the height of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default height is
-\f(CW11.0i\fR.
-.TP
-\fB\-paperwidth \fIpixels\fR
-Sets the width of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default width is
-\f(CW8.5i\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the width of the plot.  This lets you generate a plot
-of a width different from that of the widget.  If \fIpixels\fR
-is 0, the width is the same as the widget's width.  The default is
-\f(CW0\fR.
-.PP
-Postscript configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWpostscript\fR and \f(CWPostscript\fR respectively.
-.CS
-option add *Graph.postscript.Decorations false
-option add *Graph.Postscript.Landscape   true
-.CE
-.RE
-.TP
-\fIpathName \fBpostscript output \fR?\fIfileName\fR? ?\fIoption value\fR?...
-Outputs a file of encapsulated PostScript.  If a
-\fIfileName\fR argument isn't present, the command returns the
-PostScript. If any \fIoption-value\fR pairs are present, they set
-configuration options controlling how the PostScript is generated.
-\fIOption\fR and \fIvalue\fR can be anything accepted by the
-postscript \fBconfigure\fR operation above.
-.SS "MARKER COMPONENTS"
-Markers are simple drawing procedures used to annotate or highlight
-areas of the graph.  Markers have various types: text strings,
-bitmaps, images, connected lines, windows, or polygons.  They can be
-associated with a particular element, so that when the element is
-hidden or un-hidden, so is the marker.  By default, markers are the
-last items drawn, so that data elements will appear in
-behind them.  You can change this by configuring the \fB\-under\fR
-option.
-.PP
-Markers, in contrast to elements, don't affect the scaling of the
-coordinate axes.  They can also have \fIelastic\fR coordinates
-(specified by \f(CW-Inf\fR and \f(CWInf\fR respectively) that translate
-into the minimum or maximum limit of the axis.  For example, you can
-place a marker so it always remains in the lower left corner of the
-plotting area, by using the coordinates \f(CW-Inf\fR,\f(CW-Inf\fR.
-.PP
-The following operations are available for markers.
-.TP
-\fIpathName \fBmarker after \fImarkerId\fR ?\fIafterId\fR?
-Changes the order of the markers, drawing the first
-marker after the second.  If no second \fIafterId\fR argument is
-specified, the marker is placed at the end of the display list.  This
-command can be used to control how markers are displayed since markers
-are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker before \fImarkerId\fR ?\fIbeforeId\fR?
-Changes the order of the markers, drawing the first
-marker before the second.  If no second \fIbeforeId\fR argument is
-specified, the marker is placed at the beginning of the display list.
-This command can be used to control how markers are displayed since
-markers are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker bind \fItagName\fR ?\fIsequence\fR?  ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a marker with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on graph markers, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBmarker cget \fIoption\fR
-Returns the current value of the marker configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below in the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBmarker configure \fImarkerId\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for markers.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fImarkerId\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the marker option \fIoption\fR is set to \fIvalue\fR.
-.sp
-The following options are valid for all markers.
-Each type of marker also has its own type-specific options.  
-They are described in the sections below.
-.RS
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for the marker.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events for markers are handled.  Each tag in the list matching the 
-current event sequence will have its Tcl command executed.  Implicitly 
-the name of the marker is always the first tag in the list.
-The default value is \f(CWall\fR.
-.TP
-\fB\-coords \fIcoordList\fR
-Specifies the coordinates of the marker.  \fICoordList\fR is 
-a list of graph coordinates.  The number of coordinates required
-is dependent on the type of marker.  Text, image, and window markers
-need only two coordinates (an X\-Y coordinate).   Bitmap markers
-can take either two or four coordinates (if four, they represent the
-corners of the bitmap). Line markers
-need at least four coordinates, polygons at least six.
-If \fIcoordList\fR is \f(CW""\fR, the marker will not be displayed.
-The default is \f(CW""\fR.
-.TP
-\fB\-element \fIelemName\fR
-Links the marker with the element \fIelemName\fR.  The marker is
-drawn only if the element is also currently displayed (see the
-element's \fBshow\fR operation).  If \fIelemName\fR is \f(CW""\fR, the
-marker is always drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-hide \fIboolean\fR 
-Indicates whether the marker is drawn. If \fIboolean\fR is true,
-the marker is not drawn.  The default is \f(CWno\fR.
-.TP
-\fB\-mapx \fIxAxis\fR 
-Specifies the X\-axis to map the marker's X\-coordinates onto.
-\fIXAxis\fR must the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to map the marker's Y\-coordinates onto.
-\fIYAxis\fR must the name of an axis.  The default is \f(CWy\fR.
-.TP
-\fB\-name \fImarkerId\fR
-Changes the identifier for the marker.  The identifier \fImarkerId\fR 
-can not already be used by another marker.  If this option
-isn't specified, the marker's name is uniquely generated.
-.TP
-\fB\-under \fIboolean\fR
-Indicates whether the marker is drawn below/above data
-elements.  If \fIboolean\fR is true, the marker is be drawn
-underneath the data element symbols and lines.  Otherwise, the marker is
-drawn on top of the element.  The default is \f(CW0\fR.
-.TP
-\fB\-xoffset \fIpixels\fR
-Specifies a screen distance to offset the marker horizontally. 
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.TP
-\fB\-yoffset \fIpixels\fR
-Specifies a screen distance to offset the markers vertically.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.PP
-Marker configuration options may also be set by the \fBoption\fR command.
-The resource class is either \f(CWBitmapMarker\fR,  \f(CWImageMarker\fR, 
-\f(CWLineMarker\fR, \f(CWPolygonMarker\fR, \f(CWTextMarker\fR, or \f(CWWindowMarker\fR,
-depending on the type of marker.  The resource name is the name of the
-marker.
-.CS
-option add *Graph.TextMarker.Foreground white
-option add *Graph.BitmapMarker.Foreground white
-option add *Graph.m1.Background     blue
-.CE
-.RE
-.TP
-\fIpathName \fBmarker create \fItype\fR ?\fIoption value\fR?...
-Creates a marker of the selected type. \fIType\fR may be either
-\f(CWtext\fR, \f(CWline\fR, \f(CWbitmap\fR, \f(CWimage\fR, \f(CWpolygon\fR, or
-\f(CWwindow\fR.  This command returns the marker identifier, 
-used as the \fImarkerId\fR argument in the other marker-related
-commands.  If the \fB\-name\fR option is used, this overrides the
-normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old.
-.TP
-\fIpathName \fBmarker delete\fR ?\fIname\fR?...
-Removes one of more markers.  The graph will automatically be redrawn
-without the marker.\fR.  
-.TP
-\fIpathName \fBmarker exists \fImarkerId\fR 
-Returns \f(CW1\fR if the marker \fImarkerId\fR exists and \f(CW0\fR
-otherwise.
-.TP
-\fIpathName \fBmarker names\fR ?\fIpattern\fR?  
-Returns the names of all the markers that currently exist.  If
-\fIpattern\fR is supplied, only those markers whose names match it
-will be returned.
-.TP
-\fIpathName \fBmarker type \fImarkerId\fR 
-Returns the type of the marker given by \fImarkerId\fR, such as
-\f(CWline\fR or \f(CWtext\fR.  If \fImarkerId\fR is not a valid a marker
-identifier, \f(CW""\fR is returned.
-.SS "BITMAP MARKERS"
-A bitmap marker displays a bitmap.  The size of the
-bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the
-bitmap.  The bitmap retains its normal width and height.  If four
-coordinates, the first and second pairs of coordinates represent the
-corners of the bitmap.  The bitmap will be stretched or reduced as
-necessary to fit into the bounding rectangle.
-.PP
-Bitmap markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create bitmap \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, each 
-sets a configuration options for the marker.  These
-same \fIoption\fR\-\fIvalue\fR pairs may be used with the marker's
-\fBconfigure\fR operation.
-.PP
-The following options are specific to bitmap markers:
-.TP
-\fB\-background \fIcolor\fR
-Same as the \fB\-fill\fR option.
-.TP
-\fB\-bitmap \fIbitmap\fR
-Specifies the bitmap to be displayed.  If \fIbitmap\fR is \f(CW""\fR,
-the marker will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the bitmap.  If \fIcolor\fR is the empty
-string, no background will be transparent.  The default background color is
-\f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Same as the \fB\-outline\fR option.
-.TP
-\fB\-mask \fImask\fR
-Specifies a mask for the bitmap to be displayed. This mask is a bitmap
-itself, denoting the pixels that are transparent.  If \fImask\fR is
-\f(CW""\fR, all pixels of the bitmap will be drawn.  The default is
-\f(CW""\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the foreground color of the bitmap. The default value is \f(CWblack\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Sets the rotation of the bitmap.  \fITheta\fR is a real number
-representing the angle of rotation in degrees.  The marker is first
-rotated and then placed according to its anchor position.  The default
-rotation is \f(CW0.0\fR.
-.SS "IMAGE MARKERS"
-A image marker displays an image.  Image markers are
-created with the marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create image \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to image markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the image relative to the
-positioning point for the image. For example, if \fIanchor\fR
-is \f(CWcenter\fR then the image is centered on the point;  if
-\fIanchor\fR is \f(CWn\fR then the image will be drawn such that
-the top center point of the rectangular region occupied by the
-image will be at the positioning point.
-This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-image \fIimage\fR
-Specifies the image to be drawn.
-If \fIimage\fR is \f(CW""\fR, the marker will not be
-drawn.  The default is \f(CW""\fR.
-.SS "LINE MARKERS"
-A line marker displays one or more connected line segments.
-Line markers are created with marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create line \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to line markers:
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the line. \fIDashList\fR is a list of up to 11
-numbers that alternately represent the lengths of the dashes and gaps
-on the line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the marker line will be solid.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the line.  This color is used with
-striped lines (see the \fB\-fdashes\fR option). If \fIcolor\fR is
-the empty string, no background color is drawn (the line will be
-dashed, not striped).  The default background color is \f(CW""\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the lines.
-The default width is \f(CW0\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the foreground color of the line. The default value is \f(CWblack\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern used to draw the line, rather than
-a solid line.
-\fIBitmap\fR specifies a bitmap to use as the stipple
-pattern.  If \fIbitmap\fR is \f(CW""\fR, then the
-line is drawn in a solid fashion. The default is \f(CW""\fR.
-.SS "POLYGON MARKERS"
-A polygon marker displays a closed region described as two or more
-connected line segments.  It is assumed the first and
-last points are connected.  Polygon markers are created using the
-marker \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create polygon \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the \fBmarker configure\fR command to change the marker's
-configuration.
-The following options are supported for polygon markers:
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the outline of the polygon. \fIDashList\fR is a
-list of up to 11 numbers that alternately represent the lengths of
-the dashes and gaps on the outline.  Each number must be between 1 and
-255. If \fIdashList\fR is \f(CW""\fR, the outline will be a solid line.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the fill color of the polygon.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the polygon is transparent.
-The default is \f(CWwhite\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the outline of the polygon. If \fIpixels\fR is zero, 
-no outline is drawn. The default is \f(CW0\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the color of the outline of the polygon.  If the polygon is
-stippled (see the \fB\-stipple\fR option), then this represents the
-foreground color of the stipple.  The default is \f(CWblack\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies that the polygon should be drawn with a stippled pattern
-rather than a solid color. \fIBitmap\fR specifies a bitmap to use as
-the stipple pattern.  If \fIbitmap\fR is \f(CW""\fR, then the polygon is
-filled with a solid color (if the \fB\-fill\fR option is set).  The
-default is \f(CW""\fR.
-.SS "TEXT MARKERS"
-A text marker displays a string of characters on one or more lines of
-text.  Embedded newlines cause line breaks.  They may be used to
-annotate regions of the graph.  Text markers are created with the
-\fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create text \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, 
-each sets a configuration option for the text marker.  
-These same \fIoption\fR\-\fIvalue\fR pairs may be used with the 
-marker's \fBconfigure\fR operation.  
-.PP
-The following options are specific to text markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the text relative to the
-positioning point for the text. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the text is centered on the point; if
-\fIanchor\fR is \f(CWn\fR then the text will be drawn such that the
-top center point of the rectangular region occupied by the text will
-be at the positioning point.  This default is \f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Same as the \fB\-fill\fR option.
-.TP
-\fB\-font \fIfontName\fR
-Specifies the font of the text.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-120-*\fR.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the background color of the text.  If \fIcolor\fR is the empty
-string, no background will be transparent.  The default background color is
-\f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR
-Same as the \fB\-outline\fR option.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the text should be justified.  This matters only when
-the marker contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the color of the text. The default value is \f(CWblack\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the text.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the text is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the text.  \fIPad\fR can be a list of
-one or two screen distances.  If \fIpad\fR has two elements, the area above the
-text is padded by the first distance and the area below by the second.
-If \fIpad\fR is just one distance, both the top and bottom areas
-are padded evenly.  The default is \f(CW4\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the number of degrees to rotate the text.  \fITheta\fR is a
-real number representing the angle of rotation.  The marker is first
-rotated along its center and is then drawn according to its anchor
-position. The default is \f(CW0.0\fR.
-.TP
-\fB\-text \fItext\fR
-Specifies the text of the marker.  The exact way the text is
-displayed may be affected by other options such as \fB\-anchor\fR or
-\fB\-rotate\fR.
-.SS "WINDOW MARKERS"
-A window marker displays a widget at a given position.
-Window markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create window \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR command.
-.PP
-The following options are specific to window markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the widget relative to the
-positioning point for the widget. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the widget is centered on the point; if \fIanchor\fR
-is \f(CWn\fR then the widget will be displayed such that the top center
-point of the rectangular region occupied by the widget will be at the
-positioning point.  This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the height to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever height the widget requests internally.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the width to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever width the widget requests internally.
-.TP
-\fB\-window \fIpathName\fR
-Specifies the widget to be managed by the graph.  \fIPathName\fR must
-be a child of the \fBgraph\fR widget.
-.SH "GRAPH COMPONENT BINDINGS"
-Specific graph components, such as elements, markers and legend
-entries, can have a command trigger when event occurs in them, much
-like canvas items in Tk's canvas widget.  Not all event sequences are
-valid.  The only binding events that may be specified are those
-related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR,
-\fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR).
-.PP
-Only one element or marker can be picked during an event.  This means,
-that if the mouse is directly over both an element and a marker, only
-the uppermost component is selected.  This isn't true for legend entries.  
-Both a legend entry and an element (or marker) binding commands 
-will be invoked if both items are picked.
-.PP
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the
-element name and another is associated with one of the element's tags
-(see the \fB\-bindtags\fR option).  When this occurs, all of the 
-matching bindings are invoked.  A binding associated with the element
-name is invoked first, followed by one binding for each of the element's 
-bindtags.  If there are multiple matching bindings for a single tag, 
-then only the most specific binding is invoked.  A continue command 
-in a binding script terminates that script, and a break command 
-terminates that script and skips any remaining scripts for the event, 
-just as for the bind command.
-.PP
-The \fB\-bindtags\fR option for these components controls addition
-tag names which can be matched.  Implicitly elements and markers
-always have tags matching their names.  Setting the value of
-the \fB\-bindtags\fR option doesn't change this.
-.SH "C LANGUAGE API"
-You can manipulate data elements from the C language.  There
-may be situations where it is too expensive to translate the data
-values from ASCII strings.  Or you might want to read data in a
-special file format.
-.PP
-Data can manipulated from the C language using BLT vectors.
-You specify the X-Y data coordinates of an element as vectors and
-manipulate the vector from C.  The graph will be redrawn automatically
-after the vectors are updated.
-.PP
-From Tcl, create the vectors and configure the element to use them.
-.CS
-vector X Y
-\&.g element configure line1 -xdata X -ydata Y
-.CE
-To set data points from C, you pass the values as arrays of doubles
-using the \fBBlt_ResetVector\fR call.  The vector is reset with the
-new data and at the next idle point (when Tk re-enters its event
-loop), the graph will be redrawn automatically.
-.CS
-#include <tcl.h>
-#include <blt.h>
-
-register int i;
-Blt_Vector *xVec, *yVec;
-double x[50], y[50];
-
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */
-if ((Blt_GetVector(interp, "X", &xVec) != TCL_OK) ||
-    (Blt_GetVector(interp, "Y", &yVec) != TCL_OK)) {
-    return TCL_ERROR;
-}
-
-for (i = 0; i < 50; i++) {
-    x[i] = i * 0.02;
-    y[i] = sin(x[i]);
-}	
-
-/* Put the data into BLT vectors */
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {
-   return TCL_ERROR;
-}
-.CE
-See the \fBvector\fR manual page for more details.
-.SH SPEED TIPS
-There may be cases where the graph needs to be drawn and updated as
-quickly as possible.  If drawing speed becomes a big
-problem, here are a few tips to speed up displays.
-.TP 2
-\(bu 
-Try to minimize the number of data points.  The more data points
-the looked at, the more work the graph must do.
-.TP 2
-\(bu 
-If your data is generated as floating point values, the time required
-to convert the data values to and from ASCII strings can be
-significant, especially when there any many data points.  You can
-avoid the redundant string-to-decimal conversions using the C API to
-BLT vectors.
-.TP 2
-\(bu
-Data elements without symbols are drawn faster than with symbols.
-Set the data element's \fB\-symbol\fR option to \f(CWnone\fR.  If you need to
-draw symbols, try using the simple symbols such as \f(CWsplus\fR and
-\f(CWscross\fR.
-.TP 2
-\(bu
-Don't stipple or dash the element.  Solid lines are much faster.
-.TP 2
-\(bu 
-If you update data elements frequently, try turning off the
-widget's \fB\-bufferelements\fR option.  When the graph is first
-displayed, it draws data elements into an internal pixmap.  The pixmap
-acts as a cache, so that when the graph needs to be redrawn again, and
-the data elements or coordinate axes haven't changed, the pixmap is
-simply copied to the screen.  This is especially useful when you are
-using markers to highlight points and regions on the graph.  But if
-the graph is updated frequently, changing either the element data or
-coordinate axes, the buffering becomes redundant.
-.SH LIMITATIONS
-Auto-scale routines do not use requested min/max limits as boundaries
-when the axis is logarithmically scaled.
-.PP
-The PostScript output generated for polygons with more than 1500
-points may exceed the limits of some printers (See PostScript Language
-Reference Manual, page 568).  The work-around is to break the polygon
-into separate pieces.
-.SH KEYWORDS
-graph, widget
diff --git a/blt3.0/man/hierbox.mann b/blt3.0/man/hierbox.mann
deleted file mode 100644
index 457bf18..0000000
--- a/blt3.0/man/hierbox.mann
+++ /dev/null
@@ -1,2261 +0,0 @@
-'\"
-'\" Copyright 2001-2 by Silicon Metrics Corporation.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Silicon Metrics or any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Silicon Metrics disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Silicon Metrics be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" The hierarchical table widget created by George Howlett.
-'\"
-.so man.macros
-.TH treeview n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-treeview \- Create and manipulate hierarchical table widgets
-.BE
-.SH SYNOPSIS
-\fBtreeview\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBtreeview\fR widget displays a tree of data.  It replaces both
-the \fBhiertable\fR and \fBhierbox\fR widgets.  The \fBtreeview\fR is
-100% syntax compatible with the \fBhiertable\fR widget.  The
-\fBhiertable\fR command is retained for sake of script-level
-compatibility.  This widget obsoletes the \fBhierbox\fR widget.  It
-does everything the old \fBhierbox\fR widget did, but also provides
-data sharing (via \fItree data objects\fR) and the ability to tag
-nodes.
-.SH INTRODUCTION
-The \fBtreeview\fR widget displays hierarchical data.  Data is
-represented as nodes in a general-ordered tree.  Each node may have
-sub-nodes and these nodes can in turn has their own children.
-.PP
-A node is displayed as a row entry in the widget.  Each entry has a
-text label and icon.  When a node has children, its entry is drawn
-with a small button to the left of the label.  Clicking the mouse over
-this button opens or closes the node.  When a node is \fIopen\fR, its
-children are exposed.  When it is \fIclosed\fR, the children and their
-descedants are hidden.  The button is normally a \f(CW+\fR or
-\f(CW\-\fR symbol (ala Windows Explorer), but can be replaced with a
-pair of Tk images (open and closed images).
-.PP
-If the node has data associated with it, they can be displayed in
-columns running vertically on either side the tree.  You can control
-the color, font, etc of each entry.  Any entry label or data field can
-be edited in-place.
-.SH "TREE DATA OBJECT"
-The tree is not stored inside the widget but in a tree data object
-(see the \fBtree\fR command for a further explanation).  Tree data
-objects can be shared among different clients, such as a
-\fBtreeview\fR widget or the \fBtree\fR command.  You can walk the
-tree and manage its data with the \fBtree\fR command tree, while
-displaying it with the \fBtreeview\fR widget.  Whenever the tree is
-updated, the \fBtreeview\fR widget is automatically redrawn.
-.PP
-By default, the \fBtreeview\fR widget creates its own tree object.
-The tree initially contains just a root node.  But you can also
-display trees created by the \fBtree\fR command using the \fB\-tree\fR
-configuration option.  \fBTreeview\fR widgets can share the same tree
-object, possibly displaying different views of the same data.
-.PP
-A tree object has both a Tcl and C API.  You can insert or delete
-nodes using \fBtreeview\fR widget or \fBtree\fR command operations,
-but also from C code.  For example, you can load the tree from your C
-code while still managing and displaying the tree from Tcl. The widget
-is automatically notified whenever the tree is modified via C or Tcl.
-.SH SYNTAX
-.DS
-\fBtreeview \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBtreeview\fR command creates a new window \fIpathName\fR and
-makes it into a \fBtreeview\fR widget.  At the time this command is
-invoked, there must not exist a window named \fIpathName\fR, but
-\fIpathName\fR's parent must exist.  Additional options may be
-specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the
-\fBconfigure\fR operation below for the exact details about what
-\fIoption\fR and \fIvalue\fR pairs are valid.
-.PP
-If successful, \fBtreeview\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to invoke various operations that query or modify the widget.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available are described in the
-.SB "TREEVIEW OPERATIONS"
-section.
-.SH "IDS AND TAGS"
-Nodes can be inserted into a tree using the \fBtreeview\fR widget 
-.CS
-blt::treeview .t
-set node [.t insert end root "one"]
-.CE
-or \fBtree\fR command. 
-.CS
-set tree [blt::tree create]
-set node [$tree insert root "one"]
-.CE
-In both cases, a number identifying the node is returned (the value of
-\f(CW$node\fR).  This serial number or \fIid\fR uniquely identifies
-the node.  Please note that you can't infer a location or position of
-a node from its id.  The only exception is that the root node is
-always id \f(CW0\fR. Since nodes may have the same labels or be moved
-within the tree, ids provide an convenient way to identify nodes.  If
-a tree is shared, the ids will be the same regardless if you are using
-by the \fBtreeview\fR widget or the \fBtree\fR command.  Ids are
-recycled when the node deleted.
-.PP
-A node may also have any number of \fItags\fR associated with it.  A
-tag is just a string of characters, and it may take any form except
-that of an integer.  For example, "\f(CWx123\fR" is valid, but
-"\f(CW123\fR" isn't.  The same tag may be associated with many
-different nodes.  This is typically done to associate a group of
-nodes.  Many operations in the \fBtreeview\fR widget take either node
-ids or tag names as arguments.  Using a tag says to apply the operation
-to all nodes with that tag.
-.PP
-The tag \fBall\fR is implicitly associated with every node in
-the tree.  It may be used to invoke operations on all the nodes in the
-tree. 
-.PP
-Tags may be shared, just like trees, between clients.  For example,
-you can use the tags created by the \fBtree\fR command with
-\fBtreeview\fR widgets.
-.SH SPECIAL NODE IDS
-There are also several special non-numeric ids.  Special ids differ
-from tags in that they are always translated to their numeric
-equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to
-the \fBtreeview\fR widget.
-.TP 15
-\fBactive\fR
-The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon 
-(see the \fB\-activeicon\fR option).
-The \fBactive\fR id is changed automatically by moving the mouse
-pointer over another node or by using the \fBentry activate\fR
-operation. Note that there can be only one active node at a time.
-.TP 15
-\fBanchor\fR
-The node representing the fixed end of the current selection.  
-The anchor is set by the \fBselection anchor\fR operation.
-.TP 15
-\fBcurrent\fR
-The node where the mouse pointer is currently located.
-But unlike \fBactive\fR, this id changes while the
-selection is dragged.  It is used to determine the
-current node during button drags.
-.TP 15
-\fBdown\fR
-The next open node from the current focus. The \fBdown\fR of
-the last open node is the same.
-.TP 15
-\fBend\fR
-The last open node (in depth-first order) on the tree.  
-.TP 15
-\fBfocus\fR
-The node that currently has focus.  When a node has focus,
-it receives key events.  To indicate focus, the node
-is drawn with a dotted line around its label.  You can change the 
-focus using the \fBfocus\fR operation.
-.TP 15
-\fBlast\fR
-The last open node from the current focus. But unlike \fBup\fR,
-when the focus is at root, \fBlast\fR wraps around to the last
-open node in the tree.
-.TP 15
-\fBmark\fR
-The node representing the non-fixed end of the current selection.  
-The mark is set by the \fBselection mark\fR operation.
-.TP 15
-\fBnext\fR
-The next open node from the current focus.  But unlike \fBdown\fR,
-when the focus is on last open node, \fBnext\fR wraps around to the 
-root node.
-.TP 15
-\fBnextsibling\fR
-The next sibling from the node with the current focus.  If the node
-is already the last sibling then it is the \fBnextsibling\fB.
-.TP 15
-\fBparent\fR
-The parent of the node with the current focus. The \fBparent\fR
-of the root is also the root.
-.TP 15
-\fBprevsibling\fR
-The previous sibling from the node with the current focus.  If the node
-is already the first sibling then it is the \fBprevsibling\fB.
-.TP 15
-\fBroot\fR
-The root node. You can also use id \f(CW0\fR to indicate
-the root.
-.TP 15
-\fBup\fR
-The last open node (in depth-first order) from the current focus. The
-\fBup\fR of the root node (i.e. the root has focus) is also the root.
-.TP 15
-\fBview.top\fR
-First node that's current visible in the widget.
-.TP 15
-\fBview.bottom\fR
-Last node that's current visible in the widget.
-.TP 15
-\fIpath\fR 
-Absolute path of a node.  Path names refer to the node name, not
-their entry labels. Paths don't have to start with a separator (see
-the \fB\-separator\fR configuration option), but component names must
-be separated by the designated separator.
-.TP 15
-\fB@\fIx\fB,\fIy\fR
-Indicates the node that covers the point in the treeview window
-specified by \fIx\fR and \fIy\fR (in pixel coordinates).  If no
-part of the entryd covers that point, then the closest node to that
-point is used.
-.PP
-A node may be specified as an id or tag. If the specifier is an
-integer then it is assumed to refer to the single node with that id.
-If the specifier is not an integer, it's checked to see if it's a
-special id (such as focus).  Otherwise, it's assumed to be tag.  Some
-operations only operate on a single node at a time; if a tag refers to
-more than one node, then an error is generated.
-.SH DATA FIELDS
-A node in the tree can have \fIdata fields\fR.  A data field is a
-name-value pair, used to represent arbitrary data in the node.  Nodes
-can contain different fields (they aren't required to contain the same
-fields).  You can optionally display these fields in the
-\fBtreeview\fR widget in columns running on either side of the
-displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a
-specific field is left blank.  Columns can be interactively resized,
-hidden, or, moved.
-.SH ENTRY BINDINGS
-You can bind Tcl commands to be invoked when events occur on nodes
-(much like Tk canvas items).  You can bind a node using its id or
-its \fIbindtags\fR.  Bindtags are simply names that associate a
-binding with one or more nodes.  There is a built-in tag \f(CWall\fR
-that all node entries automatically have.
-.SH "TREEVIEW OPERATIONS"
-The \fBtreeview\fR operations are the invoked by specifying
-the widget's pathname, the operation, and any arguments that pertain 
-to that operation.  The general form is:
-.sp
-.CS
-\fIpathName operation \fR?\fIarg arg ...\fR?
-.CE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operation are available for \fBtreeview\fR widgets:
-.TP
-\fIpathName \fBbbox\fR ?\fB-screen\fR? \fItagOrId...\fR
-Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more \fItagOrId\fR 
-arguments.  
-If the \fB\-screen\fR flag is given, then the x-y coordinates
-of the bounding box are returned as screen coordinates, not 
-virtual coordinates. Virtual coordinates start from \f(CW0\fR from the
-root node.
-The returned list contains the following values.
-.RS
-.TP 1.25i
-\fIx\fR 
-X-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIy\fR
-Y-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIwidth\fR
-Width of the bounding box.
-.TP
-\fIheight\fR
-Height of the bounding box.
-.RE
-.TP
-\fIpathName \fBbind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a node with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on \fBtreeview\fR entries, 
-rather than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton \fIoperation\fR ?\fIargs\fR?
-This command is used to control the button selectors within a 
-\fBtreeview\fR widget.  
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBbutton activate\fR \fItagOrId\fR
-Designates the node given by \fItagOrId\fR as active.  
-When a node is active it's entry is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active entry at a time.
-The special id \fBactive\fR indicates the currently active node.
-.TP
-\fIpathName \fBbutton bind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an button of a
-node entry with this tag, \fIcommand\fR will be invoked.  The syntax is
-similar to the \fBbind\fR command except that it operates on
-\fBtreeview\fR buttons, rather than widgets. See the \fBbind\fR
-manual entry for complete details on \fIsequence\fR and the
-substitutions performed on \fIcommand\fR before invoking it.
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBbutton configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "BUTTON OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBclose \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Closes the node specified by \fItagOrId\fR.  In addition, if a Tcl
-script was specified by the \fB\-closecommand\fR option, it is
-invoked.  If the node is already closed, this command has no effect.
-If the \fB\-recurse\fR flag is present, each child node is
-recursively closed.
-.TP
-\fIpathName \fBcolumn \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview columns.
-.RS
-.TP
-\fIpathName \fBcolumn activate\fR \fIcolumn\fR
-Sets the active column to \fIcolumn\fR.  \fIColumn\fR is the
-name of a column in the widget.
-When a column is active, it's drawn using its \fB\-activetitlebackground\fR
-and \fB\-activetitleforeground\fR options.  If \fIcolumn\fR is the \f(CW""\fR,
-then no column will be active.  If no column argument is provided, then
-the name of the currently active column is returned.
-.TP
-\fIpathName \fBcolumn cget\fR \fIname\fR \fIoption\fR
-Returns the current value of the column configuration option given
-by \fIoption\fR for \fIname\fR.  \fIName\fR is the name of column
-that corresponds to a data field.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBcolumn configure\fR \fIname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the column designated
-by \fIname\fR. \fIName\fR is the name of the column corresponding
-to a data field.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "COLUMN OPTIONS" 
-below.
-.TP
-\fIpathName \fBcolumn delete\fR \fIfield\fR ?\fIfield\fR...?
-Deletes one of more columns designated by \fIfield\fR.  Note
-that this does not delete the data fields themselves.
-.TP
-\fIpathName \fBcolumn insert\fR \fIposition\fR \fIfield\fR ?\fIoptions\fR...?
-Inserts one of more columns designated by \fIfield\fR.  A column displays
-each node's data field by the same name.  If the node doesn't
-have the given field, the cell is left blank.
-\fIPosition\fR
-indicates where in the list of columns to add the new column.  It may be
-either a number or \f(CWend\fR. 
-.TP
-\fIpathName \fBcolumn invoke\fR \fIfield\fR
-Invokes the Tcl command associated with the column \fIfield\fR, 
-if there is one (using the column's \fB\-command\fR option).  
-The command is ignored if the column's \fB\-state\fR option 
-set to \f(CWdisabled\fR.
-.TP
-\fIpathName \fBcolumn move \fIname\fR \fIdest\fR 
-Moves the column \fIname\fR to the destination position.  
-\fIDest\fR is the name of another column or a screen position
-in the form \f(CW@\fIx\f(CW,\fIy\fR.
-.TP
-\fIpathName \fBcolumn names\fR
-Returns a list of the names of all columns in the widget.
-The list is ordered as the columns are drawn from left-to-right.
-.TP
-\fIpathName \fBcolumn nearest\fR \fIx\fR ?\fIy\fR?
-Returns the name of the column closest to the given X-Y screen
-coordinate.  If you provide a \fIy\fR argument (it's optional),
-a name is returned only when if the point is over a column's title.
-.RE
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "TREEVIEW OPTIONS"
-below.
-.TP
-\fIpathName \fBcurselection\fR
-Returns a list containing the ids of all of the entries that are 
-currently selected.
-If there are no entries selected, then the empty string is returned.
-.TP
-\fIpathName \fBdelete \fItagOrId\fR...
-Deletes one or more entries given by \fItagOrId\fR and its children.
-.TP
-\fIpathName \fBentry \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview entries.
-.RS
-.TP
-\fIpathName \fBentry activate\fR \fItagOrId\fR
-Sets the active entry to the one specified by \fItagOrId\fR.  
-When an entry is active it is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active node at a time.
-The special id of the currently active node is \fBactive\fR.
-.TP
-\fIpathName \fBentry cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBentry children\fR \fItagOrId\fR  ?\fIfirst\fR? ?\fIlast\fR?
-Returns a list of ids for the given range of children of \fItagOrId\fR.  
-\fITagOrId\fR is the id or tag of the node to be examined.
-If only a \fIfirst\fR argument is present, then the id 
-of the that child at that numeric position is returned.  If both \fIfirst\fR 
-and \fIlast\fR arguments are given, then the ids of all the children
-in that range are returned.  Otherwise the ids of all children
-are returned.  
-.TP
-\fIpathName \fBentry configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.TP
-\fIpathName \fBentry delete\fR \fItagOrId\fR ?\fIfirst\fR ?\fIlast\fR?
-Deletes the one or more children nodes of the parent \fItagOrId\fR.
-If \fIfirst\fR and \fIlast\fR arguments are present, they are
-positions designating a range of children nodes to be deleted.
-.TP
-\fIpathName \fBentry isbefore \fItagOrId1\fR \fItagOrId2\fR
-Returns 1 if \fItagOrId1\fR is before \fItagOrId2\fR and 0 otherwise.
-.TP
-\fIpathName \fBentry ishidden \fItagOrId\fR
-Returns 1 if the node is currently hidden and 0 otherwise.  A node is
-also hidden if any of its ancestor nodes are closed or hidden.
-.TP
-\fIpathName \fBentry isopen \fItagOrId\fR
-Returns 1 if the node is currently open and 0 otherwise.
-.TP
-\fIpathName \fBentry size\fR \fB\-recurse\fR \fItagOrId\fR
-Returns the number of children for parent node \fItagOrId\fR.  
-If the \fB\-recurse\fR flag is set, the number of all 
-its descendants is returned.  The node itself is not counted.
-.RE
-.TP
-\fIpathName \fBfind \fR?\fIflags\fR? \fIfirst\fR \fIlast\fR
-Finds for all entries matching the criteria given by \fIflags\fR.  A
-list of ids for all matching nodes is returned. \fIFirst\fR and
-\fIlast\fR are ids designating the range of the search in
-depth-first order. If \fIlast\fR is before \fIfirst\fR, then nodes
-are searched in reverse order.  The valid flags are:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Patterns must match exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Pick entries that don't match.  
-.TP 1.25i
-\fB\-exec\fI string\fR
-Specifies a Tcl script to be invoked for each matching node.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP 1.25i
-\fB\-count\fI number\fR
-Stop searching after \fInumber\fR matches.
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBfocus \fR \fItagOrId\fR
-Sets the focus to the node given by \fItagOrId\fR.  When a node
-has focus, it can receive keyboard events.   
-The special id \fBfocus\fR designates the node that currently has focus.
-.TP
-\fIpathName \fBget \fR?\fB\-full\fR? \fItagOrId\fR \fItagOrId\fR...
-Translates one or more ids to their node entry names.  It returns a list of 
-names for all the ids specified.  If the \fB\-full\fR
-flag is set, then the full pathnames are returned.
-.TP 
-\fIpathName \fBhide \fR?\fBflags\fR? \fItagOrId\fR...
-Hides all nodes matching the criteria given by \fIflags\fR.  The
-search is performed recursively for each node given by \fItagOrId\fR.
-The valid flags are described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Hide nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBindex \fR?\fB\-at\fR \fItagOrId\fR? \fIstring\fR 
-Returns the id of the node specified by \fIstring\fR.  \fIString\fR
-may be a tag or node id.
-Some special ids are normally relative to the node that 
-has focus.  The \fB\-at\fR flag lets you select another node.
-.TP
-\fIpathName \fBinsert \fR?\fB\-at \fItagOrId\fR? \fIposition\fR \fIpath\fR ?\fIoptions...\fR? ?\fIpath\fR? ?\fIoptions...\fR? 
-Inserts one or more nodes at \fIposition\fR.  \fIPosition\fR is the
-location (number or \f(CWend\fR) where the new nodes are added to
-the parent node.  \fIPath\fR is the pathname of the new node.
-Pathnames can be formated either as a Tcl list (each element is a path
-component) or as a string separated by a special character sequence
-(using the \fB\-separator\fR option).  Pathnames are normally
-absolute, but the \fB\-at\fR switch lets you select a relative
-starting point.  Its value is the id of the starting node.  
-.sp
-All ancestors of the new node must already exist, unless the
-\fB\-autocreate\fR option is set.  It is also an error if a node
-already exists, unless the \fB\-allowduplicates\fR option is set.
-.sp
-\fIOption\fR and \fIvalue\fR may have any of the values accepted by the 
-\fBentry configure\fR operation described in the
-.SB "ENTRY OPERATIONS"
-section below.  This command returns a list of the ids of
-the new entries.
-.TP
-\fIpathName \fBmove \fItagOrId\fR \fIhow\fR \fIdestId\fR
-Moves the node given by \fItagOrId\fR to the destination node.  The
-node can not be an ancestor of the destination.  \fIDestId\fR is
-the id of the destination node and can not be the root of the
-tree.  In conjunction with \fIhow\fR, it describes how the move is
-performed.
-.RS
-.TP 8
-\f(CWbefore\fR
-Moves the node before the destination node.
-.TP 8
-\f(CWafter\fR
-Moves the node after the destination node.
-.TP 8
-\f(CWinto\fR
-Moves the node to the end of the destination's list of children.
-.RE
-.TP
-\fIpathName \fBnearest \fIx y\fR ?\fIvarName\fR?
-Returns the id of the node entry closest to the given X-Y screen
-coordinate.  The optional argument \fIvarName\fR is the name of
-variable which is set to either \f(CWbutton\fR or \f(CWselect\fR to
-indicate over what part of the node the coordinate lies.  
-If the coordinate is not directly over any node, then
-\fIvarName\fR will contain the empty string.
-.TP
-\fIpathName \fBopen \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Opens the one or more nodes specified by \fItagOrId\fR.  
-If a node is not already open, the Tcl script specified by the 
-\fB\-opencommand\fR option is invoked. If the \fB\-recurse\fR flag 
-is present, then each descendant is recursively opened.  
-.TP
-\fIpathName \fBrange\fR ?\fB-open\fR? \fIfirst last\fR
-Returns the ids in depth-first order of the nodes
-between the \fIfirst\fR and \fIlast\fR ids.  If the \fB\-open\fR
-flag is present, it indicates to consider only open nodes.
-If \fIlast\fR is before \fIfirst\fR, then the ids are
-returned in reverse order.
-.TP
-\fIpathName \fBscan\fR \fIoption args\fR
-This command implements scanning.  It has
-two forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBscan mark \fIx y\fR
-Records \fIx\fR and \fIy\fR and the current view in the treeview
-window;  used in conjunction with later \fBscan dragto\fR commands.
-Typically this command is associated with a mouse button press in
-the widget.  It returns an empty string.
-.TP
-\fIpathName \fBscan dragto \fIx y\fR.
-Computes the difference between its \fIx\fR and \fIy\fR
-arguments and the \fIx\fR and \fIy\fR arguments to the last
-\fBscan mark\fR command for the widget.
-It then adjusts the view by 10 times the
-difference in coordinates.  This command is typically associated
-with mouse motion events in the widget, to produce the effect of
-dragging the list at high speed through the window.  The return
-value is an empty string.
-.RE
-.TP
-\fIpathName \fBsee\fR ?\fB\-anchor \fIanchor\fR? \fItagOrId\fR
-Adjusts the view of entries so that the node given by \fItagOrId\fR is
-visible in the widget window.  It is an error if \fBtagOrId\fR is a
-tag that refers to more than one node.  By default the node's entry
-is displayed in the middle of the window.  This can changed using the
-\fB\-anchor\fR flag.  Its value is a Tk anchor position.
-.TP
-\fIpathName \fBselection \fIoption arg\fR
-This command is used to adjust the selection within a \fBtreeview\fR
-widget.  It has several forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBselection anchor \fItagOrId\fR
-Sets the selection anchor to the node given by \fItagOrId\fR.
-If \fItagOrId\fR refers to a non-existent node, then the closest
-node is used.
-The selection anchor is the end of the selection that is fixed
-while dragging out a selection with the mouse.
-The special id \fBanchor\fR may be used to refer to the anchor
-node.
-.TP
-\fIpathName \fBselection cancel\fR
-Clears the temporary selection of entries back to the
-current anchor.  Temporary selections are created by 
-the \fBselection mark\fR operation.
-.TP
-\fIpathName \fBselection clear \fIfirst \fR?\fIlast\fR?
-Removes the entries between \fIfirst\fR and \fIlast\fR
-(inclusive) from the selection.  Both \fIfirst\fR and 
-\fIlast\fR are ids representing a range of entries.
-If \fIlast\fR isn't given, then only \fIfirst\fR is deselected.
-Entries outside the selection are not affected.
-.TP
-\fIpathName \fBselection clearall\fR
-Clears the entire selection.  
-.TP
-\fIpathName \fBselection mark \fItagOrId\fR
-Sets the selection mark to the node given by \fItagOrId\fR.  This
-causes the range of entries between the anchor and the mark to be
-temporarily added to the selection.  The selection mark is the end of
-the selection that is fixed while dragging out a selection with the
-mouse.  The special id \fBmark\fR may be used to refer to the current 
-mark node.
-If \fItagOrId\fR refers to a non-existent node, then the mark
-is ignored.
-Resetting the mark will unselect
-the previous range.  Setting the anchor finalizes the range.
-.TP
-\fIpathName \fBselection includes \fItagOrId\fR
-Returns 1 if the node given by \fItagOrId\fR is currently
-selected, 0 if it isn't.
-.TP
-\fIpathName \fBselection present\fR
-Returns 1 if any nodes are currently selected and 0 otherwise.
-.TP
-\fIpathName \fBselection set \fIfirst \fR?\fIlast\fR?
-Selects all of the nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, without affecting
-the selection state of nodes outside that range.
-.TP
-\fIpathName \fBselection toggle \fIfirst \fR?\fIlast\fR?
-Selects/deselects nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and
-visa versa.
-.RE
-.TP 
-\fIpathName \fBshow \fR?\fBflags\fR? \fItagOrId\fR...
-Exposes all nodes matching the criteria given by \fIflags\fR.  This
-is the inverse of the \fBhide\fR operation.  The search is performed
-recursively for each node given by \fItagOrId\fR.  The valid flags are
-described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Expose nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBsort\fR ?\fIoperation\fR? \fIargs...\fR
-.RS
-.TP
-\fIpathName \fBsort auto\fR ?\fIboolean\fR
-Turns on/off automatic sorting of node entries.  If \fIboolean\fR is
-true, entries will be automatically sorted as they are opened,
-closed, inserted, or deleted.  If no \fIboolean\fR argument is
-provided, the current state is returned.
-.TP
-\fIpathName \fBsort cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBsort configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the sorting configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given sorting option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.RS
-.TP
-\fB\-column\fI string\fR
-Specifies the column to sort. Entries in the widget are rearranged
-according to this column.  If \fIcolumn\fR is \f(CW""\fR then
-no sort is performed.
-.TP
-\fB\-command\fI string\fR
-Specifies a Tcl procedure to be called when sorting nodes. 
-The procedure is called with three arguments: the pathname of the widget
-and the fields of two entries.  The procedure returns 1 if the first
-node is greater than the second, -1 is the second is greater, and 0
-if equal.  
-.TP
-\fB\-decreasing\fI boolean\fR
-Indicates to sort in ascending/descending order.  If \fIboolean\fR 
-is true, then the entries as in descending order. The default is 
-\f(CWno\fR.
-.TP
-\fB\-mode\fI string\fR
-Specifies how to compare entries when sorting. \fIString\fR
-may be one of the following:
-.RS 
-.TP 1.5i
-\f(CWascii\fR
-Use string comparison based upon the ASCII collation order.
-.TP 1.5i
-\f(CWdictionary\fR 
-Use dictionary-style comparison.  This is the same as \f(CWascii\fR
-except (a) case is ignored except as a tie-breaker and (b) if two
-strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, "bigBoy" sorts between
-"bigbang" and "bigboy", and "x10y" sorts between "x9y" and "x11y".
-.TP 1.5i
-\f(CWinteger\fR
-Compares fields as integers.
-.TP 1.5i
-\f(CWreal\fR
-Compares fields as floating point numbers.
-.TP 1.5i
-\f(CWcommand\fR
-Use the Tcl proc specified by the \fB\-command\fR option to compare entries 
-when sorting.   If no command is specified, the sort reverts to 
-\f(CWascii\fR sorting.
-.RE
-.RE
-.TP
-\fIpathName \fBsort once\fR ?\fIflags\fR? \fItagOrId...\fR
-Sorts the children for each entries specified by \fItagOrId\fR.  
-By default, entries are sorted by name, but you can specify a 
-Tcl proc to do your own comparisons.
-.RS
-.TP 1.5i
-\fB\-recurse\fR
-Recursively sort the entire branch, not just the children.
-.RE
-.RE
-.TP
-\fIpathName \fBtag \fIoperation args\fR
-Tags are a general means of selecting and marking nodes in the tree.
-A tag is just a string of characters, and it may take any form except
-that of an integer.  The same tag may be associated with many
-different nodes.  
-.sp
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below.
-.RS
-.TP
-\fIpathName\fR \fBtag add\fR \fIstring\fR \fIid\fR...
-Adds the tag \fIstring\fR to one of more entries.
-.TP
-\fIpathName\fR \fBtag delete\fR \fIstring\fR \fIid\fR...
-Deletes the tag \fIstring\fR from one or more entries.  
-.TP
-\fIpathName\fR \fBtag forget\fR \fIstring\fR
-Removes the tag \fIstring\fR from all entries.  It's not an error if no
-entries are tagged as \fIstring\fR.
-.TP
-\fIpathName\fR \fBtag names\fR ?\fIid\fR?
-Returns a list of tags used.  If an \fIid\fR argument
-is present, only those tags used by the node designated by \fIid\fR 
-are returned.
-.TP
-\fIpathName\fR \fBtag nodes\fR \fIstring\fR
-Returns a list of ids that have the tag \fIstring\fR.  If no node
-is tagged as \fIstring\fR, then an empty string is returned.
-.RE
-.TP
-\fIpathName \fBtext \fIoperation\fR ?\fIargs\fR?
-This operation is used to provide text editing for cells (data 
-fields in a column) or entry labels.
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBtext apply\fR
-Applies the edited buffer, replacing the entry label
-or data field. The edit window is hidden.
-.TP
-\fIpathName \fBtext cancel\fR
-Cancels the editing operation, reverting the entry label 
-or data value back to the previous value. The edit window is hidden.
-.TP
-\fIpathName \fBtext cget\fI value\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBtext configure\fR ?\fIoption value\fR?
-Query or modify the configuration options of the edit window.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "TEXT EDITING OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBtext delete\fI first last\fR
-Deletes the characters in the edit buffer between the two given
-character positions.  
-.TP
-\fIpathName \fBtext get\fR ?\fI\-root\fR? \fIx y\fR
-.TP
-\fIpathName \fBtext icursor\fI index\fR
-.TP
-\fIpathName \fBtext index\fI index\fR
-Returns the text index of given \fIindex\fR.
-.TP
-\fIpathName \fBtext insert\fI index string\fR
-Insert the text string \fIstring\fR into the edit buffer at the index 
-\fIindex\fR.  For example, the index 0 will prepend the buffer.
-.TP
-\fIpathName \fBtext selection\fI args\fR
-This operation controls the selection of the editing window.  Note
-that this differs from the selection of entries.
-It has the following forms:
-.RS
-.TP
-\fIpathName \fBtext selection adjust\fI index\fR
-Adjusts either the first or last index of the selection.
-.TP
-\fIpathName \fBtext selection clear\fR
-Clears the selection.
-.TP
-\fIpathName \fBtext selection from\fI index\fR
-Sets the anchor of the selection.
-.TP
-\fIpathName \fBtext selection present\fR
-Indicates if a selection is present.
-.TP
-\fIpathName \fBtext selection range\fI start end\fR
-Sets both the anchor and mark of the selection.
-.TP
-\fIpathName \fBtext selection to\fI index\fR
-Sets the unanchored end (mark) of the selection.
-.RE
-.TP
-\fIpathName \fBtoggle \fItagOrId\fR
-Opens or closes the node given by \fItagOrId\fR.  If the corresponding 
-\fB\-opencommand\fR or \fB\-closecommand\fR option is set, then that
-command is also invoked. 
-.TP
-\fIpathName \fBxview \fIargs\fR
-This command is used to query and change the horizontal position of the
-information in the widget's window.  It can take any of the following
-forms:
-.RS
-.TP
-\fIpathName \fBxview\fR
-Returns a list containing two elements.
-Each element is a real fraction between 0 and 1;  together they describe
-the horizontal span that is visible in the window.
-For example, if the first element is .2 and the second element is .6,
-20% of the \fBtreeview\fR widget's text is off-screen to the left, 
-the middle 40% is visible
-in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
-option.
-.TP
-\fIpathName \fBxview\fR \fItagOrId\fR
-Adjusts the view in the window so that the character position given by
-\fItagOrId\fR is displayed at the left edge of the window.
-Character positions are defined by the width of the character \fB0\fR.
-.TP
-\fIpathName \fBxview moveto\fI fraction\fR
-Adjusts the view in the window so that \fIfraction\fR of the
-total width of the \fBtreeview\fR widget's text is off-screen to the left.
-\fIfraction\fR must be a fraction between 0 and 1.
-.TP
-\fIpathName \fBxview scroll \fInumber what\fR
-This command shifts the view in the window left or right according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
-of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR character units (the width of the \fB0\fR character)
-on the display;  if it is \fBpages\fR then the view adjusts by
-\fInumber\fR screenfuls.
-If \fInumber\fR is negative then characters farther to the left
-become visible;  if it is positive then characters farther to the right
-become visible.
-.RE
-.TP
-\fIpathName \fByview \fI?args\fR?
-This command is used to query and change the vertical position of the
-text in the widget's window.
-It can take any of the following forms:
-.RS
-.TP
-\fIpathName \fByview\fR
-Returns a list containing two elements, both of which are real fractions
-between 0 and 1.
-The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means
-it is halfway through the treeview window, for example).
-The second element gives the position of the node just after
-the last one in the window, relative to the widget as a whole.
-These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
-option.
-.TP
-\fIpathName \fByview\fR \fItagOrId\fR
-Adjusts the view in the window so that the node given by
-\fItagOrId\fR is displayed at the top of the window.
-.TP
-\fIpathName \fByview moveto\fI fraction\fR
-Adjusts the view in the window so that the node given by \fIfraction\fR
-appears at the top of the window.
-\fIFraction\fR is a fraction between 0 and 1;  0 indicates the first
-node, 0.33 indicates the node one-third the
-way through the \fBtreeview\fR widget, and so on.
-.TP
-\fIpathName \fByview scroll \fInumber what\fR
-This command adjusts the view in the window up or down according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
-\fInumber\fR lines;  if it is \fBpages\fR then
-the view adjusts by \fInumber\fR screenfuls.
-If \fInumber\fR is negative then earlier nodes
-become visible;  if it is positive then later nodes
-become visible.
-.RE
-.SH "TREEVIEW OPTIONS"
-In addition to the \fBconfigure\fR operation, widget configuration
-options may also be set by the Tk \fBoption\fR command.  The class
-resource name is \f(CWTreeView\fR.
-.CS
-option add *TreeView.Foreground white
-option add *TreeView.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active entries.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of the active node.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed for an entry's icon
-when it is active. \fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-autocreate \fIboolean\fR
-If \fIboolean\fR is true, automatically create missing ancestor 
-nodes when inserting new nodes. Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-allowduplicates \fIboolean\fR
-If \fIboolean\fR is true, allow nodes with duplicate pathnames
-when inserting new nodes.  Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the widget.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is closed.  You can
-overrider this for individual entries using the entry's \fB\-closecommand\fR 
-option. The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-dashes \fInumber\fR
-Sets the dash style of the horizontal and vertical lines drawn connecting 
-entries. \fINumber\fR is the length in pixels of the dashes and gaps in
-the line. If \fInumber\fR is \f(CW0\fR, solid lines will 
-be drawn. The default is \f(CW1\fR (dotted).
-.TP
-\fB\-exportselection \fIboolean\fR 
-Indicates if the selection is exported.  If the widget is exporting its
-selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type \fBSTRING\fR;
-the value of the selection will be the label of the selected nodes,
-separated by newlines.  The default is \f(CWno\fR.
-.TP
-\fB\-flat \fIboolean\fR
-Indicates whether to display the tree as a flattened list. 
-If \fIboolean\fR is true, then the hierarchy will be a list of full
-paths for the nodes.  This option also has affect on sorting. 
-See the 
-.SB "SORT OPERATIONS"
-section for more information.
-The default is \f(CWno\fR.
-.TP
-\fB\-focusdashes \fIdashList\fR 
-Sets the dash style of the outline rectangle drawn around the entry
-label of the node that current has focus. \fINumber\fR is the length
-in pixels of the dashes and gaps in the line.  If
-\fInumber\fR is \f(CW0\fR, a solid line will be drawn. The default is
-\f(CW1\fR.
-.TP
-\fB\-focusforeground \fIcolor\fR 
-Sets the color of the focus rectangle. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font for entry labels.  You can override this for individual
-entries with the entry's \fB\-font\fR configuration option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of entry labels.  You can override this for individual
-entries with the entry's \fB\-foreground\fR configuration option.  
-The default is
-\f(CWblack\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW400\fR.
-.TP
-\fB\-hideroot \fIboolean\fR
-If \fIboolean\fR is true, it indicates that no entry for the root node 
-should be displayed.  The default is \f(CWno\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Specifies the normal color of the traversal highlight region when
-the widget does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Specifies the color of the traversal highlight rectangle when
-the widget has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Specifies the width of the highlight rectangle indicating when the
-widget has input focus. The value may have any of the forms acceptable
-to \fBTk_GetPixels\fR.  If the value is zero, no focus highlight will
-be displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images for the entry's icon.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-linecolor \fIcolor\fR
-Sets the color of the connecting lines drawn between entries.  
-The default is \f(CWblack\fR.
-.TP
-\fB\-linespacing \fIpixels\fR
-Sets the number of pixels spacing between entries.  
-The default is \f(CW0\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the lines drawn connecting entries.  If \fIpixels\fR
-is \f(CW0\fR, no vertical or horizontal lines are drawn. 
-The default is \f(CW1\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is open.  
-You can override this for individual entries with the entry's
-\fB\-opencommand\fR configuration option.  The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the widget.  \fIRelief\fR
-specifies how the \fBtreeview\fR widget should appear relative to widget 
-it is packed into; for example, \f(CWraised\fR means the \fBtreeview\fR widget 
-should appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-scrollmode \fImode\fR 
-Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is \f(CWhierbox\fR.
-.RS
-.TP 1.25i
-\f(CWlistbox\fR
-Like the \fBlistbox\fR widget, the last entry can always be
-scrolled to the top of the widget window.  This allows the scrollbar
-thumb to shrink as the last entry is scrolled upward.
-.TP 1.25i
-\f(CWhierbox\fR
-Like the \fBhierbox\fR widget, the last entry can only be
-viewed at the bottom of the widget window.  The scrollbar
-stays a constant size.  
-.TP 1.25i
-\f(CWcanvas\fR
-Like the \fBcanvas\fR widget, the entries are bound within
-the scrolling area. 
-.RE
-.TP 
-\fB\-selectbackground \fIcolor\fR
-Sets the background color selected node entries.
-The default is \f(CW#ffffea\fR.
-.TP 
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the raised 3-D border drawn around the labels 
-of selected entries. The default is \f(CW0\fR.
-\fB\-selectcommand \fIstring\fR
-Specifies a Tcl script to invoked when the set of selected
-nodes changes.
-The default is \f(CW""\fR.
-.TP
-\fB\-selectforeground \fIcolor\fB
-Sets the color of the labels of selected node entries. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-selectmode \fImode\fR
-Specifies the selection mode. If \fImode\fR is 
-\f(CWsingle\fR, only one node can be selected
-at a time.  If \f(CWmultiple\fR more than one
-node can be selected.
-The default is \f(CWsingle\fR.
-.TP
-\fB\-separator \fIstring\fR
-Specifies the character sequence to use when spliting the path components.  
-The separator may be several characters wide (such as "::")
-Consecutive separators in a pathname are treated as one.
-If \fIstring\fR is the empty string, the pathnames are Tcl lists. 
-Each element is a path component.   The default is \f(CW""\fR.
-.TP
-\fB\-showtitles \fIboolean\fR
-If \fIboolean\fR is false, column titles are not be displayed.  
-The default is \f(CWyes\fR.
-.TP 
-\fB\-sortselection \fIboolean\fR
-If \fIboolean\fR is true, nodes in the selection are ordered as they
-are currently displayed (depth-first or sorted), not in the order
-they were selected. The default is \f(CWno\fR.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW"1"\fR.
-.TP
-\fB\-trim \fIstring\fR
-Specifies a string leading characters to trim from entry pathnames 
-before parsing.  This only makes sense if the \fB\-separator\fR is also
-set.  The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the widget.  If \fIpixels\fR is 0, then
-the with is computed from the contents of the \fBtreeview\fR widget.
-The default is \f(CW200\fR.
-.TP 
-\fB\-xscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-xscrollincrement\fR \fIpixels\fR
-Sets the horizontal scrolling distance. The default is 20 pixels.
-.TP
-\fB\-yscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with vertical
-scrollbars.   Whenever the vertical view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-yscrollincrement\fR \fIpixels\fR
-Sets the vertical scrolling distance. The default is 20 pixels.
-.SH "ENTRY OPTIONS"
-Many widget configuration options have counterparts in entries.  For
-example, there is a \fB\-closecommand\fR configuration option for both
-widget itself and for individual entries.  Options set at the widget
-level are global for all entries.  If the entry configuration option
-is set, then it overrides the widget option.  This is done to avoid
-wasting memory by replicated options.  Most entries will have
-redundant options.
-.PP
-There is no resource class or name for entries.
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed as the entry's icon
-when it is active. This overrides the global \fB\-activeicons\fR
-configuration option for the specific entry.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for nodes.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events are handled for nodes.  Each tag in the list matching the current 
-event sequence will have its Tcl command executed.  The default value 
-is \f(CWall\fR.
-.TP
-\fB\-button \fIstring\fR
-Indicates whether a button should be displayed on the left side
-of the node entry.  \fIString\fR can be \f(CWyes\fR, \f(CWno\fR, 
-or \f(CWauto\fR.  If \f(CWauto\fR, then a button is automatically
-displayed if the node has children.  This is the default.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when the node is closed.  This
-overrides the global \fB\-closecommand\fR option for this entry.
-The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-data \fIstring\fR
-Sets data fields for the node.  \fIString\fR is a list of 
-name-value pairs to be set. The default is \f(CW""\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for entry labels.  This overrides the widget's
-\fB\-font\fR option for this node.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of the entry label.  This overrides the widget's
-\fB\-foreground\fR configuration option.  The default is \f(CW""\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images to be displayed for the entry's icon.
-This overrides the global \fB\-icons\fR configuration option.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-label \fIstring\fR
-Sets the text for the entry's label.  If not set, this 
-defaults to the name of the node. The default is \f(CW""\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when the entry is opened.  
-This overrides the widget's \fB\-opencommand\fR option for this node.  
-The default is \f(CW""\fR. 
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.SH "BUTTON OPTIONS"
-Button configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWButton\fR.   The resource name is always
-\f(CWbutton\fR.
-.CS
-option add *TreeView.Button.Foreground white
-option add *TreeView.button.Background blue
-.CE
-The following are the configuration options available for buttons.
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the button.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the button.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-closerelief \fIrelief\fR
-Specifies the 3-D effect for the closed button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Sets the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of buttons. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-images \fIimages\fR
-Specifies images to be displayed for the button.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the button is open, the
-second when it is closed.  If the \fIimages\fR is the empty string,
-then a plus/minus gadget is drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-openrelief \fIrelief\fR
-Specifies the 3-D effect of the open button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-size \fIpixels\fR
-Sets the requested size of the button.  
-The default is \f(CW0\fR.
-.RE
-.SH "COLUMN OPTIONS"
-Column configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWColumn\fR.   The resource name is the 
-name of the column.
-.CS
-option add *TreeView.Column.Foreground white
-option add *TreeView.treeView.Background blue
-.CE
-The following configuration options are available for columns.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the column.  This overrides
-the widget's \fB\-background\fR option. The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border of the column.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-edit \fIboolean\fR
-Indicates if the column's data fields can be edited. If \fIboolean\fR is 
-false, the data fields in the column may not be edited.
-The default is \f(CWyes\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Specifies the foreground color of the column. 
-You can override this for individual entries with the entry's 
-\fB\-foreground\fR option.
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for a column.  You can override this for individual entries
-with the entry's \fB\-font\fR option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-hide \fIboolean\fR
-If \fIboolean\fR is true, the column is not displayed.
-The default is \f(CWyes\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the column data fields title should be justified within
-the column.  This matters only when the column is wider than the 
-data field to be display.
-\fIJustify\fR must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  
-The default is \f(CWleft\fR.
-.TP
-\fB\-pad \fIpad\fR
-Specifies how much padding for the left and right sides of the column.
-\fIPad\fR is a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the column is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW2\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the column.  \fIRelief\fR
-specifies how the column should appear relative to the widget; 
-for example, \f(CWraised\fR means the column should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-state \fIstate\fR
-Sets the state of the column. If \fIstate\fR is \f(CWdisable\fR then
-the column title can not be activated nor invoked.
-The default is \f(CWnormal\fR.
-.TP
-\fB\-text \fIstring\fR
-Sets the title for the column.
-The default is \f(CW""\fR.
-.TP
-\fB\-titleforeground \fIcolor\fR 
-Sets the foreground color of the column title. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-titleshadow \fIcolor\fR 
-Sets the color of the drop shadow of the column title.  
-The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the column.  This overrides
-the computed with of the column.  If \fIpixels\fR is 0,
-the width is computed as from the contents of the column. The
-default is \f(CW0\fR.
-.RE
-.SH "TEXT EDITING OPTIONS"
-Text edit window configuration options may also be set by the 
-\fBoption\fR command. The resource class is \f(CWTreeViewEditor\fR.
-The resource name is always \f(CWedit\fR.
-.CS
-option add *TreeViewEditor.Foreground white
-option add *edit.Background blue
-.CE
-The following are the configuration options available for the
-text editing window.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the text edit window.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the edit window.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-exportselection \fIboolean\fR
-Indicates if the text selection is exported.  If the edit window is 
-exporting its selection then it will observe the standard X11 protocols 
-for handling the selection.  Selections are available as type \fBSTRING\fR.
-The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the edit window.  \fIRelief\fR
-indicates how the background should appear relative to the edit
-window; for example, \f(CWraised\fR means the background should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-selectbackground \fIcolor\fR
-Sets the background of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the selected text in the 
-edit window.  The \fB\-selectrelief\fR option determines if a border 
-is to be drawn.  The default is \f(CW1\fR.
-.TP
-\fB\-selectforeground \fIcolor\fR
-Sets the foreground of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectrelief \fIrelief\fR
-Specifies the 3-D effect of the selected text in the edit window.  
-\fIRelief\fR indicates how the text should appear relative to the edit
-window; for example, \f(CWraised\fR means the text should
-appear to protrude.  The default is \f(CWflat\fR.
-.RE
-.SH "DEFAULT BINDINGS"
-Tk automatically creates class bindings for treeviews that give them
-Motif-like behavior.  Much of the behavior of a \fBtreeview\fR widget is determined
-by its \fB\-selectmode\fR option, which selects one of two ways
-of dealing with the selection.
-.PP
-If the selection mode is \fBsingle\fR, only one node can be 
-selected at a time.
-Clicking button 1 on an node selects
-it and deselects any other selected item.
-.PP
-If the selection mode is \fBmultiple\fR,
-any number of entries may be selected at once, including discontiguous
-ranges.  Clicking Control-Button-1 on a node entry
-toggles its selection state without affecting any other entries.
-Pressing Shift-Button-1 on a node entry selects
-it, extends the selection.
-.IP [1]
-In \fBextended\fR mode, the selected range can be adjusted by pressing
-button 1 with the Shift key down:  this modifies the selection to
-consist of the entries between the anchor and the entry under
-the mouse, inclusive.
-The un-anchored end of this new selection can also be dragged with
-the button down.
-.IP [2]
-In \fBextended\fR mode, pressing button 1 with the Control key down
-starts a toggle operation: the anchor is set to the entry under
-the mouse, and its selection state is reversed.  The selection state
-of other entries isn't changed.
-If the mouse is dragged with button 1 down, then the selection state
-of all entries between the anchor and the entry under the mouse
-is set to match that of the anchor entry;  the selection state of
-all other entries remains what it was before the toggle operation
-began.
-.IP [3]
-If the mouse leaves the treeview window with button 1 down, the window
-scrolls away from the mouse, making information visible that used
-to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the
-button is released, or the end of the hierarchy is reached.
-.IP [4]
-Mouse button 2 may be used for scanning.
-If it is pressed and dragged over the \fBtreeview\fR widget, the contents of
-the hierarchy drag at high speed in the direction the mouse moves.
-.IP [5]
-If the Up or Down key is pressed, the location cursor (active
-entry) moves up or down one entry.
-If the selection mode is \fBbrowse\fR or \fBextended\fR then the
-new active entry is also selected and all other entries are
-deselected.
-In \fBextended\fR mode the new active entry becomes the
-selection anchor.
-.IP [6]
-In \fBextended\fR mode, Shift-Up and Shift-Down move the location
-cursor (active entry) up or down one entry and also extend
-the selection to that entry in a fashion similar to dragging
-with mouse button 1.
-.IP [7]
-The Left and Right keys scroll the \fBtreeview\fR widget view left and right
-by the width of the character \fB0\fR.
-Control-Left and Control-Right scroll the \fBtreeview\fR widget view left and
-right by the width of the window.
-Control-Prior and Control-Next also scroll left and right by
-the width of the window.
-.IP [8]
-The Prior and Next keys scroll the \fBtreeview\fR widget view up and down
-by one page (the height of the window).
-.IP [9]
-The Home and End keys scroll the \fBtreeview\fR widget horizontally to
-the left and right edges, respectively.
-.IP [10]
-Control-Home sets the location cursor to the the first entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [11]
-Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [12]
-In \fBextended\fR mode, Control-Shift-Home extends the selection
-to the first entry and Control-Shift-End extends
-the selection to the last entry.
-.IP [13]
-In \fBmultiple\fR mode, Control-Shift-Home moves the location cursor
-to the first entry and Control-Shift-End moves
-the location cursor to the last entry.
-.IP [14]
-The space and Select keys make a selection at the location cursor
-(active entry) just as if mouse button 1 had been pressed over
-this entry.
-.IP [15]
-In \fBextended\fR mode, Control-Shift-space and Shift-Select
-extend the selection to the active entry just as if button 1
-had been pressed with the Shift key down.
-.IP [16]
-In \fBextended\fR mode, the Escape key cancels the most recent
-selection and restores all the entries in the selected range
-to their previous selection state.
-.IP [17]
-Control-slash selects everything in the widget, except in
-\fBsingle\fR and \fBbrowse\fR modes, in which case it selects
-the active entry and deselects everything else.
-.IP [18]
-Control-backslash deselects everything in the widget, except in
-\fBbrowse\fR mode where it has no effect.
-.IP [19]
-The F16 key (labelled Copy on many Sun workstations) or Meta-w
-copies the selection in the widget to the clipboard, if there is
-a selection.
-.PP
-The behavior of \fBtreeview\fR widgets can be changed by defining new bindings 
-for individual widgets or by redefining the class bindings.
-.SS WIDGET BINDINGS
-In addition to the above behavior, the following additional behavior
-is defined by the default widget class (TreeView) bindings.
-.IP \f(CW<ButtonPress-2>\fR 
-Starts scanning. 
-.IP \f(CW<B2-Motion>\fR 
-Adjusts the scan.
-.IP \f(CW<ButtonRelease-2>\fR
-Stops scanning.
-.IP \f(CW<B1-Leave>\fR 
-Starts auto-scrolling.
-.IP \f(CW<B1-Enter>\fR
-Starts auto-scrolling 
-.IP \f(CW<KeyPress-Up>\fR 
-Moves the focus to the previous entry.
-.IP \f(CW<KeyPress-Down>\fR 
-Moves the focus to the next entry.
-.IP \f(CW<Shift-KeyPress-Up>\fR
-Moves the focus to the previous sibling.
-.IP \f(CW<Shift-KeyPress-Down>\fR
-Moves the focus to the next sibling.
-.IP \f(CW<KeyPress-Prior>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Next>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Left>\fR 
-Closes the entry.  It is not an error if the entry has no children.
-.IP \f(CW<KeyPress-Right>\fR 
-Opens the entry, displaying its children.  It is not an
-error if the entry has no children.
-.IP \f(CW<KeyPress-space>\fR 
-In "single" select mode this selects the entry.  In "multiple" mode,
-it toggles the entry (if it was previous selected, it is not
-deselected).
-.IP \f(CW<KeyRelease-space>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress-Return>\fR 
-Sets the focus to the current entry.
-.IP \f(CW<KeyRelease-Return>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress>\fR 
-Moves to the next entry whose label starts with the letter typed.
-.IP \f(CW<KeyPress-Home>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-End>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-F1>\fR 
-Opens all entries.
-.IP \f(CW<KeyPress-F2>\fR
-Closes all entries (except root).
-.SS BUTTON BINDINGS
-Buttons have bindings.  There are associated with the "all" bindtag
-(see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the button of the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the button back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Adjust the view so that the current entry is visible.
-.SS ENTRY BINDINGS
-Entries have default bindings.  There are associated with the "all"
-bindtag (see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to modify them.
-.IP \f(CW<Enter>\fR 
-Highlights the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the entry back to its normal state.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the selection anchor the current entry.
-.IP \f(CW<Double-ButtonPress-1>\fR
-Toggles the selection of the current entry.
-.IP \f(CW<B1-Motion>\fR
-For "multiple" mode only.  Saves the current location of the
-pointer for auto-scrolling.  Resets the selection mark.  
-.IP \f(CW<ButtonRelease-1>\fR
-For "multiple" mode only.  Sets the selection anchor to the 
-current entry.
-.IP \f(CW<Shift-ButtonPress-1>\fR
-For "multiple" mode only. Extends the selection.
-.IP \f(CW<Shift-Double-ButtonPress-1>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-ButtonRelease-1>\fR 
-Stop auto-scrolling.
-.IP \f(CW<Control-ButtonPress-1>\fR 
-For "multiple" mode only.  Toggles and extends the selection.
-.IP \f(CW<Control-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Control-ButtonRelease-1>\fR 
-Stops auto-scrolling.
-.IP \f(CW<Control-Shift-ButtonPress-1>\fR 
-???
-.IP \f(CW<Control-Shift-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.SS COLUMN BINDINGS
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the
-\fBcolumn bind\fR operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the current column title.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Invokes the command (see the column's -command option) if one
-if specified.  
-.SS COLUMN RULE BINDINGS
-.IP \f(CW<Enter>\fR 
-Highlights the current and activates the ruler.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state. Deactivates the
-ruler.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the resize anchor for the column.
-.IP \f(CW<B1-Motion>\fR 
-Sets the resize mark for the column.
-.IP \f(CW<ButtonRelease-1>\fR 
-Adjust the size of the column, based upon the resize anchor and mark
-positions.
-.SH EXAMPLE
-The \fBtreeview\fR command creates a new widget.  
-.CS
-treeview .h \-bg white
-.CE
-A new Tcl command \f(CW.h\fR is also created.  This command can be used
-to query and modify the \fBtreeview\fR widget.  For example, to change the 
-background
-color of the table to "green", you use the new command and the widget's
-\fBconfigure\fR operation.
-.CS
-# Change the background color.
-\&.h configure \-background "green"
-.CE
-By default, the \fBtreeview\fR widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the
-widget.  Above, the new tree object name is ".h".  But you can use the
-\fB\-tree\fR option to specify the name of another tree.
-.CS
-# View the tree "myTree".
-\&.h configure \-tree "myTree"
-.CE
-When a new tree is created, it contains only a root node.  The node
-is automatically opened.  The id of the root node is always
-\f(CW0\fR (you can use also use the special id \f(CWroot\fR). The
-\fBinsert\fR operation lets you insert one or more new entries into
-the tree.  The last argument is the node's \fIpathname\fR.  
-.CS
-# Create a new entry named "myEntry"
-set id [\&.h insert end "myEntry"]
-.CE
-This appends a new node named "myEntry".  It will positioned as the
-last child of the root of the tree (using the position "end").  You
-can supply another position to order the node within its siblings.
-.CS
-# Prepend "fred".
-set id [\&.h insert 0 "fred"]
-.CE
-Entry names do not need to be unique.  By default, the node's label
-is its name.  To supply a different text label, add the \fB\-label\fR
-option.
-.CS
-# Create a new node named "fred"
-set id [\&.h insert end "fred" -label "Fred Flintstone"]
-.CE
-The \fBinsert\fR operation returns the id of the new node.  You can
-also use the \fBindex\fR operation to get this information.
-.CS
-# Get the id of "fred"
-\&.h index "fred"
-.CE
-To insert a node somewhere other than root, use the \fB\-at\fR switch.
-It takes the id of the node where the new child will be added.
-.CS
-# Create a new node "barney" in "fred".
-\&.h insert -at $id end "barney" 
-.CE
-A pathname describes the path to an entry in the hierarchy.  It's a
-list of entry names that compose the path in the tree.  Therefore, you
-can also add "barney" to "fred" as follows.
-.CS
-# Create a new sub-entry of "fred"
-\&.h insert end "fred barney" 
-.CE
-Every name in the list is ancestor of the next.  All ancestors must
-already exist.  That means that an entry "fred" is an ancestor of
-"barney" and must already exist.  But you can use the
-\fB\-autocreate\fR configuration option to force the creation of
-ancestor nodes.
-.CS
-# Force the creation of ancestors.
-\&.h configure -autocreate yes 
-\&.h insert end "fred barney wilma betty" 
-.CE
-Sometimes the pathname is already separated by a character sequence
-rather than formed as a list.  A file name is a good example of this.
-You can use the \fB\-separator\fR option to specify a separator string
-to split the path into its components.  Each pathname inserted is
-automatically split using the separator string as a separator.
-Multiple separators are treated as one.
-.CS
-\&.h configure -separator /
-\&.h insert end "/usr/local/tcl/bin" 
-.CE
-If the path is prefixed by extraneous characters, you can
-automatically trim it off using the \fB\-trim\fR option.  It removed
-the string from the path before it is parsed.
-.CS
-\&.h configure -trim C:/windows -separator /
-\&.h insert end "C:/window/system" 
-.CE
-You can insert more than one entry at a time with the \fBinsert\fR
-operation.  This can be much faster than looping over a list of names.
-.CS
-# The slow way
-foreach f [glob $dir/*] {
-    \&.h insert end $f
-}
-# The fast way
-eval .h insert end [glob $dir/*]
-.CE
-In this case, the \fBinsert\fR operation will return a list of ids
-of the new entries.
-.PP
-You can delete entries with the \fBdelete\fR operation.  It takes one or
-more tags of ids as its argument. It deletes the entry and all its
-children.
-.CS
-\&.h delete $id
-.CE
-Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the \fB\-label\fR
-option that sets the entry's text label.   The \fBentry configure\fR
-operation lets you set or modify an entry's configuration options.
-.CS
-\&.h entry configure $id -color red -font fixed
-.CE
-You can hide an entry and its children using the \fB\-hide\fR option.
-.CS
-\&.h entry configure $id -hide yes
-.CE
-More that one entry can be configured at once.  All entries specified
-are configured with the same options.
-.CS
-\&.h entry configure $i1 $i2 $i3 $i4 -color brown 
-.CE
-An icon is displayed for each entry.  It's a Tk image drawn to the
-left of the label.  You can set the icon with the entry's
-\fB\-icons\fR option.  It takes a list of two image names: one to
-represent the open entry, another when it is closed.
-.CS
-set im1 [image create photo -file openfolder.gif]
-set im2 [image create photo -file closefolder.gif]
-\&.h entry configure $id -icons "$im1 $im2"
-.CE
-If \fB\-icons\fR is set to the empty string, no icons are display.
-.PP
-If an entry has children, a button is displayed to the left of the
-icon. Clicking the mouse on this button opens or closes the
-sub-hierarchy.  The button is normally a \f(CW+\fR or \f(CW\-\fR
-symbol, but can be configured in a variety of ways using the \fBbutton
-configure\fR operation.  For example, the \f(CW+\fR and \f(CW\-\fR
-symbols can be replaced with Tk images.
-.CS
-set im1 [image create photo -file closefolder.gif]
-set im2 [image create photo -file downarrow.gif]
-\&.h button configure $id -images "$im1 $im2" \\
-    -openrelief raised -closerelief raised
-.CE
-Entries can contain an arbitrary number of \fIdata fields\fR.  Data
-fields are name-value pairs.  Both the value and name are strings.
-The entry's \fB\-data\fR option lets you set data fields.
-.CS
-\&.h entry configure $id -data {mode 0666 group users}
-.CE
-The \fB\-data\fR takes a list of name-value pairs.  
-.PP
-You can display these data fields as \fIcolumns\fR in the
-\fBtreeview\fR widget.  You can create and configure columns with
-the \fBcolumn\fR operation.  For example, to add a new column to the
-widget, use the \fBcolumn insert\fR operation.  The last argument is
-the name of the data field that you want to display.
-.CS
-\&.h column insert end "mode"
-.CE
-The column title is displayed at the top of the column.  By default,
-it's is the field name.  You can override this using the column's
-\fB\-text\fR option.
-.CS
-\&.h column insert end "mode" -text "File Permissions"
-.CE
-Columns have several configuration options.  The \fBcolumn
-configure\fR operation lets you query or modify column options.
-.CS
-\&.h column configure "mode" -justify left
-.CE
-The \fB\-justify\fR option says how the data is justified within in
-the column.  The \fB\-hide\fR option indicates whether the column is
-displayed.
-.CS
-\&.h column configure "mode" -hide yes
-.CE
-Entries can be selected by clicking on the mouse.  Selected entries
-are drawn using the colors specified by the \fB\-selectforeground\fR 
-and \fB\-selectbackground\fR configuration options.
-The selection itself is managed by the \fBselection\fR operation.
-.CS
-# Clear all selections
-\&.h selection clear 0 end
-# Select the root node
-\&.h selection set 0 
-.CE
-The \fBcurselection\fR operation returns a list of ids of
-all the selected entries.
-.CS
-set ids [\&.h curselection]
-.CE
-You can use the \fBget\fR operation to convert the ids to 
-their pathnames.
-.CS
-set names [eval .h get -full $ids]
-.CE
-If a treeview is exporting its selection (using the
-\fB\-exportselection\fR option), then it will observe the standard X11
-protocols for handling the selection.  Treeview selections are
-available as type \fBSTRING\fR; the value of the selection will be the
-pathnames of the selected entries, separated by newlines.
-.PP
-The \fBtreeview\fR supports two modes of selection: \f(CWsingle\fR
-and \f(CWmultiple\fR.  In single select mode, only one entry can be
-selected at a time, while multiple select mode allows several entries
-to be selected.  The mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -selectmode "multiple"
-.CE
-You can be notified when the list of selected entries changes.  The widget's
-\fB\-selectcommand\fR specifies a Tcl procedure that is called whenever
-the selection changes.
-.CS
-proc SelectNotify { widget } {
-   set ids [\&$widget curselection]
-}
-\&.h configure -selectcommand "SelectNotify .h"
-.CE
-The widget supports the standard Tk scrolling and scanning operations.
-The \fBtreeview\fR can be both horizontally and vertically. You can
-attach scrollbars to the \fBtreeview\fR the same way as the listbox
-or canvas widgets.
-.CS
-scrollbar .xbar -orient horizontal -command ".h xview"
-scrollbar .ybar -orient vertical -command ".h yview"
-\&.h configure -xscrollcommand ".xbar set" \\
-    -yscrollcommand ".ybar set"
-.CE
-There are three different modes of scrolling: \f(CWlistbox\fR,
-\f(CWcanvas\fR, and \f(CWhierbox\fR.  In \f(CWlistbox\fR mode, the last
-entry can always be scrolled to the top of the widget.  In \f(CWhierbox\fR
-mode, the last entry is always drawn at the bottom of the widget.
-The scroll mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -scrollmode "listbox"
-.CE
-Entries can be programmatically opened or closed using the \fBopen\fR
-and \fBclose\fR operations respectively.  
-.CS
-\&.h open $id
-\&.h close $id
-.CE
-When an entry is opened, a Tcl procedure can be automatically invoked.
-The \fB\-opencommand\fR option specifies this procedure.  This
-procedure can lazily insert entries as needed.
-.CS
-proc AddEntries { dir } {
-   eval .h insert end [glob -nocomplain $dir/*] 
-}
-\&.h configure -opencommand "AddEntries %P"
-.CE
-Now when an entry is opened, the procedure \f(CWAddEntries\fR is
-called and adds children to the entry.  Before the command is invoked,
-special "%" substitutions (like \fBbind\fR) are performed. Above,
-\f(CW%P\fR is translated to the pathname of the entry.
-.PP
-The same feature exists when an entry is closed.  The
-\fB\-closecommand\fR option specifies the procedure.
-.CS
-proc DeleteEntries { id } {
-   .h entry delete $id 0 end
-}
-\&.h configure -closecommand "DeleteEntries %#"
-.CE
-When an entry is closed, the procedure \f(CWDeleteEntries\fR is called
-and deletes the entry's children using the \fBentry delete\fR operation
-(\f(CW%#\fR is the id of entry).
-.SH KEYWORDS
-treeview, widget
diff --git a/blt3.0/man/hiertable.mann b/blt3.0/man/hiertable.mann
deleted file mode 100644
index 457bf18..0000000
--- a/blt3.0/man/hiertable.mann
+++ /dev/null
@@ -1,2261 +0,0 @@
-'\"
-'\" Copyright 2001-2 by Silicon Metrics Corporation.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Silicon Metrics or any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Silicon Metrics disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Silicon Metrics be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" The hierarchical table widget created by George Howlett.
-'\"
-.so man.macros
-.TH treeview n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-treeview \- Create and manipulate hierarchical table widgets
-.BE
-.SH SYNOPSIS
-\fBtreeview\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBtreeview\fR widget displays a tree of data.  It replaces both
-the \fBhiertable\fR and \fBhierbox\fR widgets.  The \fBtreeview\fR is
-100% syntax compatible with the \fBhiertable\fR widget.  The
-\fBhiertable\fR command is retained for sake of script-level
-compatibility.  This widget obsoletes the \fBhierbox\fR widget.  It
-does everything the old \fBhierbox\fR widget did, but also provides
-data sharing (via \fItree data objects\fR) and the ability to tag
-nodes.
-.SH INTRODUCTION
-The \fBtreeview\fR widget displays hierarchical data.  Data is
-represented as nodes in a general-ordered tree.  Each node may have
-sub-nodes and these nodes can in turn has their own children.
-.PP
-A node is displayed as a row entry in the widget.  Each entry has a
-text label and icon.  When a node has children, its entry is drawn
-with a small button to the left of the label.  Clicking the mouse over
-this button opens or closes the node.  When a node is \fIopen\fR, its
-children are exposed.  When it is \fIclosed\fR, the children and their
-descedants are hidden.  The button is normally a \f(CW+\fR or
-\f(CW\-\fR symbol (ala Windows Explorer), but can be replaced with a
-pair of Tk images (open and closed images).
-.PP
-If the node has data associated with it, they can be displayed in
-columns running vertically on either side the tree.  You can control
-the color, font, etc of each entry.  Any entry label or data field can
-be edited in-place.
-.SH "TREE DATA OBJECT"
-The tree is not stored inside the widget but in a tree data object
-(see the \fBtree\fR command for a further explanation).  Tree data
-objects can be shared among different clients, such as a
-\fBtreeview\fR widget or the \fBtree\fR command.  You can walk the
-tree and manage its data with the \fBtree\fR command tree, while
-displaying it with the \fBtreeview\fR widget.  Whenever the tree is
-updated, the \fBtreeview\fR widget is automatically redrawn.
-.PP
-By default, the \fBtreeview\fR widget creates its own tree object.
-The tree initially contains just a root node.  But you can also
-display trees created by the \fBtree\fR command using the \fB\-tree\fR
-configuration option.  \fBTreeview\fR widgets can share the same tree
-object, possibly displaying different views of the same data.
-.PP
-A tree object has both a Tcl and C API.  You can insert or delete
-nodes using \fBtreeview\fR widget or \fBtree\fR command operations,
-but also from C code.  For example, you can load the tree from your C
-code while still managing and displaying the tree from Tcl. The widget
-is automatically notified whenever the tree is modified via C or Tcl.
-.SH SYNTAX
-.DS
-\fBtreeview \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBtreeview\fR command creates a new window \fIpathName\fR and
-makes it into a \fBtreeview\fR widget.  At the time this command is
-invoked, there must not exist a window named \fIpathName\fR, but
-\fIpathName\fR's parent must exist.  Additional options may be
-specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the
-\fBconfigure\fR operation below for the exact details about what
-\fIoption\fR and \fIvalue\fR pairs are valid.
-.PP
-If successful, \fBtreeview\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to invoke various operations that query or modify the widget.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available are described in the
-.SB "TREEVIEW OPERATIONS"
-section.
-.SH "IDS AND TAGS"
-Nodes can be inserted into a tree using the \fBtreeview\fR widget 
-.CS
-blt::treeview .t
-set node [.t insert end root "one"]
-.CE
-or \fBtree\fR command. 
-.CS
-set tree [blt::tree create]
-set node [$tree insert root "one"]
-.CE
-In both cases, a number identifying the node is returned (the value of
-\f(CW$node\fR).  This serial number or \fIid\fR uniquely identifies
-the node.  Please note that you can't infer a location or position of
-a node from its id.  The only exception is that the root node is
-always id \f(CW0\fR. Since nodes may have the same labels or be moved
-within the tree, ids provide an convenient way to identify nodes.  If
-a tree is shared, the ids will be the same regardless if you are using
-by the \fBtreeview\fR widget or the \fBtree\fR command.  Ids are
-recycled when the node deleted.
-.PP
-A node may also have any number of \fItags\fR associated with it.  A
-tag is just a string of characters, and it may take any form except
-that of an integer.  For example, "\f(CWx123\fR" is valid, but
-"\f(CW123\fR" isn't.  The same tag may be associated with many
-different nodes.  This is typically done to associate a group of
-nodes.  Many operations in the \fBtreeview\fR widget take either node
-ids or tag names as arguments.  Using a tag says to apply the operation
-to all nodes with that tag.
-.PP
-The tag \fBall\fR is implicitly associated with every node in
-the tree.  It may be used to invoke operations on all the nodes in the
-tree. 
-.PP
-Tags may be shared, just like trees, between clients.  For example,
-you can use the tags created by the \fBtree\fR command with
-\fBtreeview\fR widgets.
-.SH SPECIAL NODE IDS
-There are also several special non-numeric ids.  Special ids differ
-from tags in that they are always translated to their numeric
-equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to
-the \fBtreeview\fR widget.
-.TP 15
-\fBactive\fR
-The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon 
-(see the \fB\-activeicon\fR option).
-The \fBactive\fR id is changed automatically by moving the mouse
-pointer over another node or by using the \fBentry activate\fR
-operation. Note that there can be only one active node at a time.
-.TP 15
-\fBanchor\fR
-The node representing the fixed end of the current selection.  
-The anchor is set by the \fBselection anchor\fR operation.
-.TP 15
-\fBcurrent\fR
-The node where the mouse pointer is currently located.
-But unlike \fBactive\fR, this id changes while the
-selection is dragged.  It is used to determine the
-current node during button drags.
-.TP 15
-\fBdown\fR
-The next open node from the current focus. The \fBdown\fR of
-the last open node is the same.
-.TP 15
-\fBend\fR
-The last open node (in depth-first order) on the tree.  
-.TP 15
-\fBfocus\fR
-The node that currently has focus.  When a node has focus,
-it receives key events.  To indicate focus, the node
-is drawn with a dotted line around its label.  You can change the 
-focus using the \fBfocus\fR operation.
-.TP 15
-\fBlast\fR
-The last open node from the current focus. But unlike \fBup\fR,
-when the focus is at root, \fBlast\fR wraps around to the last
-open node in the tree.
-.TP 15
-\fBmark\fR
-The node representing the non-fixed end of the current selection.  
-The mark is set by the \fBselection mark\fR operation.
-.TP 15
-\fBnext\fR
-The next open node from the current focus.  But unlike \fBdown\fR,
-when the focus is on last open node, \fBnext\fR wraps around to the 
-root node.
-.TP 15
-\fBnextsibling\fR
-The next sibling from the node with the current focus.  If the node
-is already the last sibling then it is the \fBnextsibling\fB.
-.TP 15
-\fBparent\fR
-The parent of the node with the current focus. The \fBparent\fR
-of the root is also the root.
-.TP 15
-\fBprevsibling\fR
-The previous sibling from the node with the current focus.  If the node
-is already the first sibling then it is the \fBprevsibling\fB.
-.TP 15
-\fBroot\fR
-The root node. You can also use id \f(CW0\fR to indicate
-the root.
-.TP 15
-\fBup\fR
-The last open node (in depth-first order) from the current focus. The
-\fBup\fR of the root node (i.e. the root has focus) is also the root.
-.TP 15
-\fBview.top\fR
-First node that's current visible in the widget.
-.TP 15
-\fBview.bottom\fR
-Last node that's current visible in the widget.
-.TP 15
-\fIpath\fR 
-Absolute path of a node.  Path names refer to the node name, not
-their entry labels. Paths don't have to start with a separator (see
-the \fB\-separator\fR configuration option), but component names must
-be separated by the designated separator.
-.TP 15
-\fB@\fIx\fB,\fIy\fR
-Indicates the node that covers the point in the treeview window
-specified by \fIx\fR and \fIy\fR (in pixel coordinates).  If no
-part of the entryd covers that point, then the closest node to that
-point is used.
-.PP
-A node may be specified as an id or tag. If the specifier is an
-integer then it is assumed to refer to the single node with that id.
-If the specifier is not an integer, it's checked to see if it's a
-special id (such as focus).  Otherwise, it's assumed to be tag.  Some
-operations only operate on a single node at a time; if a tag refers to
-more than one node, then an error is generated.
-.SH DATA FIELDS
-A node in the tree can have \fIdata fields\fR.  A data field is a
-name-value pair, used to represent arbitrary data in the node.  Nodes
-can contain different fields (they aren't required to contain the same
-fields).  You can optionally display these fields in the
-\fBtreeview\fR widget in columns running on either side of the
-displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a
-specific field is left blank.  Columns can be interactively resized,
-hidden, or, moved.
-.SH ENTRY BINDINGS
-You can bind Tcl commands to be invoked when events occur on nodes
-(much like Tk canvas items).  You can bind a node using its id or
-its \fIbindtags\fR.  Bindtags are simply names that associate a
-binding with one or more nodes.  There is a built-in tag \f(CWall\fR
-that all node entries automatically have.
-.SH "TREEVIEW OPERATIONS"
-The \fBtreeview\fR operations are the invoked by specifying
-the widget's pathname, the operation, and any arguments that pertain 
-to that operation.  The general form is:
-.sp
-.CS
-\fIpathName operation \fR?\fIarg arg ...\fR?
-.CE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operation are available for \fBtreeview\fR widgets:
-.TP
-\fIpathName \fBbbox\fR ?\fB-screen\fR? \fItagOrId...\fR
-Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more \fItagOrId\fR 
-arguments.  
-If the \fB\-screen\fR flag is given, then the x-y coordinates
-of the bounding box are returned as screen coordinates, not 
-virtual coordinates. Virtual coordinates start from \f(CW0\fR from the
-root node.
-The returned list contains the following values.
-.RS
-.TP 1.25i
-\fIx\fR 
-X-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIy\fR
-Y-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIwidth\fR
-Width of the bounding box.
-.TP
-\fIheight\fR
-Height of the bounding box.
-.RE
-.TP
-\fIpathName \fBbind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a node with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on \fBtreeview\fR entries, 
-rather than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton \fIoperation\fR ?\fIargs\fR?
-This command is used to control the button selectors within a 
-\fBtreeview\fR widget.  
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBbutton activate\fR \fItagOrId\fR
-Designates the node given by \fItagOrId\fR as active.  
-When a node is active it's entry is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active entry at a time.
-The special id \fBactive\fR indicates the currently active node.
-.TP
-\fIpathName \fBbutton bind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an button of a
-node entry with this tag, \fIcommand\fR will be invoked.  The syntax is
-similar to the \fBbind\fR command except that it operates on
-\fBtreeview\fR buttons, rather than widgets. See the \fBbind\fR
-manual entry for complete details on \fIsequence\fR and the
-substitutions performed on \fIcommand\fR before invoking it.
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBbutton configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "BUTTON OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBclose \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Closes the node specified by \fItagOrId\fR.  In addition, if a Tcl
-script was specified by the \fB\-closecommand\fR option, it is
-invoked.  If the node is already closed, this command has no effect.
-If the \fB\-recurse\fR flag is present, each child node is
-recursively closed.
-.TP
-\fIpathName \fBcolumn \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview columns.
-.RS
-.TP
-\fIpathName \fBcolumn activate\fR \fIcolumn\fR
-Sets the active column to \fIcolumn\fR.  \fIColumn\fR is the
-name of a column in the widget.
-When a column is active, it's drawn using its \fB\-activetitlebackground\fR
-and \fB\-activetitleforeground\fR options.  If \fIcolumn\fR is the \f(CW""\fR,
-then no column will be active.  If no column argument is provided, then
-the name of the currently active column is returned.
-.TP
-\fIpathName \fBcolumn cget\fR \fIname\fR \fIoption\fR
-Returns the current value of the column configuration option given
-by \fIoption\fR for \fIname\fR.  \fIName\fR is the name of column
-that corresponds to a data field.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBcolumn configure\fR \fIname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the column designated
-by \fIname\fR. \fIName\fR is the name of the column corresponding
-to a data field.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "COLUMN OPTIONS" 
-below.
-.TP
-\fIpathName \fBcolumn delete\fR \fIfield\fR ?\fIfield\fR...?
-Deletes one of more columns designated by \fIfield\fR.  Note
-that this does not delete the data fields themselves.
-.TP
-\fIpathName \fBcolumn insert\fR \fIposition\fR \fIfield\fR ?\fIoptions\fR...?
-Inserts one of more columns designated by \fIfield\fR.  A column displays
-each node's data field by the same name.  If the node doesn't
-have the given field, the cell is left blank.
-\fIPosition\fR
-indicates where in the list of columns to add the new column.  It may be
-either a number or \f(CWend\fR. 
-.TP
-\fIpathName \fBcolumn invoke\fR \fIfield\fR
-Invokes the Tcl command associated with the column \fIfield\fR, 
-if there is one (using the column's \fB\-command\fR option).  
-The command is ignored if the column's \fB\-state\fR option 
-set to \f(CWdisabled\fR.
-.TP
-\fIpathName \fBcolumn move \fIname\fR \fIdest\fR 
-Moves the column \fIname\fR to the destination position.  
-\fIDest\fR is the name of another column or a screen position
-in the form \f(CW@\fIx\f(CW,\fIy\fR.
-.TP
-\fIpathName \fBcolumn names\fR
-Returns a list of the names of all columns in the widget.
-The list is ordered as the columns are drawn from left-to-right.
-.TP
-\fIpathName \fBcolumn nearest\fR \fIx\fR ?\fIy\fR?
-Returns the name of the column closest to the given X-Y screen
-coordinate.  If you provide a \fIy\fR argument (it's optional),
-a name is returned only when if the point is over a column's title.
-.RE
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "TREEVIEW OPTIONS"
-below.
-.TP
-\fIpathName \fBcurselection\fR
-Returns a list containing the ids of all of the entries that are 
-currently selected.
-If there are no entries selected, then the empty string is returned.
-.TP
-\fIpathName \fBdelete \fItagOrId\fR...
-Deletes one or more entries given by \fItagOrId\fR and its children.
-.TP
-\fIpathName \fBentry \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview entries.
-.RS
-.TP
-\fIpathName \fBentry activate\fR \fItagOrId\fR
-Sets the active entry to the one specified by \fItagOrId\fR.  
-When an entry is active it is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active node at a time.
-The special id of the currently active node is \fBactive\fR.
-.TP
-\fIpathName \fBentry cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBentry children\fR \fItagOrId\fR  ?\fIfirst\fR? ?\fIlast\fR?
-Returns a list of ids for the given range of children of \fItagOrId\fR.  
-\fITagOrId\fR is the id or tag of the node to be examined.
-If only a \fIfirst\fR argument is present, then the id 
-of the that child at that numeric position is returned.  If both \fIfirst\fR 
-and \fIlast\fR arguments are given, then the ids of all the children
-in that range are returned.  Otherwise the ids of all children
-are returned.  
-.TP
-\fIpathName \fBentry configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.TP
-\fIpathName \fBentry delete\fR \fItagOrId\fR ?\fIfirst\fR ?\fIlast\fR?
-Deletes the one or more children nodes of the parent \fItagOrId\fR.
-If \fIfirst\fR and \fIlast\fR arguments are present, they are
-positions designating a range of children nodes to be deleted.
-.TP
-\fIpathName \fBentry isbefore \fItagOrId1\fR \fItagOrId2\fR
-Returns 1 if \fItagOrId1\fR is before \fItagOrId2\fR and 0 otherwise.
-.TP
-\fIpathName \fBentry ishidden \fItagOrId\fR
-Returns 1 if the node is currently hidden and 0 otherwise.  A node is
-also hidden if any of its ancestor nodes are closed or hidden.
-.TP
-\fIpathName \fBentry isopen \fItagOrId\fR
-Returns 1 if the node is currently open and 0 otherwise.
-.TP
-\fIpathName \fBentry size\fR \fB\-recurse\fR \fItagOrId\fR
-Returns the number of children for parent node \fItagOrId\fR.  
-If the \fB\-recurse\fR flag is set, the number of all 
-its descendants is returned.  The node itself is not counted.
-.RE
-.TP
-\fIpathName \fBfind \fR?\fIflags\fR? \fIfirst\fR \fIlast\fR
-Finds for all entries matching the criteria given by \fIflags\fR.  A
-list of ids for all matching nodes is returned. \fIFirst\fR and
-\fIlast\fR are ids designating the range of the search in
-depth-first order. If \fIlast\fR is before \fIfirst\fR, then nodes
-are searched in reverse order.  The valid flags are:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Patterns must match exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Pick entries that don't match.  
-.TP 1.25i
-\fB\-exec\fI string\fR
-Specifies a Tcl script to be invoked for each matching node.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP 1.25i
-\fB\-count\fI number\fR
-Stop searching after \fInumber\fR matches.
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBfocus \fR \fItagOrId\fR
-Sets the focus to the node given by \fItagOrId\fR.  When a node
-has focus, it can receive keyboard events.   
-The special id \fBfocus\fR designates the node that currently has focus.
-.TP
-\fIpathName \fBget \fR?\fB\-full\fR? \fItagOrId\fR \fItagOrId\fR...
-Translates one or more ids to their node entry names.  It returns a list of 
-names for all the ids specified.  If the \fB\-full\fR
-flag is set, then the full pathnames are returned.
-.TP 
-\fIpathName \fBhide \fR?\fBflags\fR? \fItagOrId\fR...
-Hides all nodes matching the criteria given by \fIflags\fR.  The
-search is performed recursively for each node given by \fItagOrId\fR.
-The valid flags are described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Hide nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBindex \fR?\fB\-at\fR \fItagOrId\fR? \fIstring\fR 
-Returns the id of the node specified by \fIstring\fR.  \fIString\fR
-may be a tag or node id.
-Some special ids are normally relative to the node that 
-has focus.  The \fB\-at\fR flag lets you select another node.
-.TP
-\fIpathName \fBinsert \fR?\fB\-at \fItagOrId\fR? \fIposition\fR \fIpath\fR ?\fIoptions...\fR? ?\fIpath\fR? ?\fIoptions...\fR? 
-Inserts one or more nodes at \fIposition\fR.  \fIPosition\fR is the
-location (number or \f(CWend\fR) where the new nodes are added to
-the parent node.  \fIPath\fR is the pathname of the new node.
-Pathnames can be formated either as a Tcl list (each element is a path
-component) or as a string separated by a special character sequence
-(using the \fB\-separator\fR option).  Pathnames are normally
-absolute, but the \fB\-at\fR switch lets you select a relative
-starting point.  Its value is the id of the starting node.  
-.sp
-All ancestors of the new node must already exist, unless the
-\fB\-autocreate\fR option is set.  It is also an error if a node
-already exists, unless the \fB\-allowduplicates\fR option is set.
-.sp
-\fIOption\fR and \fIvalue\fR may have any of the values accepted by the 
-\fBentry configure\fR operation described in the
-.SB "ENTRY OPERATIONS"
-section below.  This command returns a list of the ids of
-the new entries.
-.TP
-\fIpathName \fBmove \fItagOrId\fR \fIhow\fR \fIdestId\fR
-Moves the node given by \fItagOrId\fR to the destination node.  The
-node can not be an ancestor of the destination.  \fIDestId\fR is
-the id of the destination node and can not be the root of the
-tree.  In conjunction with \fIhow\fR, it describes how the move is
-performed.
-.RS
-.TP 8
-\f(CWbefore\fR
-Moves the node before the destination node.
-.TP 8
-\f(CWafter\fR
-Moves the node after the destination node.
-.TP 8
-\f(CWinto\fR
-Moves the node to the end of the destination's list of children.
-.RE
-.TP
-\fIpathName \fBnearest \fIx y\fR ?\fIvarName\fR?
-Returns the id of the node entry closest to the given X-Y screen
-coordinate.  The optional argument \fIvarName\fR is the name of
-variable which is set to either \f(CWbutton\fR or \f(CWselect\fR to
-indicate over what part of the node the coordinate lies.  
-If the coordinate is not directly over any node, then
-\fIvarName\fR will contain the empty string.
-.TP
-\fIpathName \fBopen \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Opens the one or more nodes specified by \fItagOrId\fR.  
-If a node is not already open, the Tcl script specified by the 
-\fB\-opencommand\fR option is invoked. If the \fB\-recurse\fR flag 
-is present, then each descendant is recursively opened.  
-.TP
-\fIpathName \fBrange\fR ?\fB-open\fR? \fIfirst last\fR
-Returns the ids in depth-first order of the nodes
-between the \fIfirst\fR and \fIlast\fR ids.  If the \fB\-open\fR
-flag is present, it indicates to consider only open nodes.
-If \fIlast\fR is before \fIfirst\fR, then the ids are
-returned in reverse order.
-.TP
-\fIpathName \fBscan\fR \fIoption args\fR
-This command implements scanning.  It has
-two forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBscan mark \fIx y\fR
-Records \fIx\fR and \fIy\fR and the current view in the treeview
-window;  used in conjunction with later \fBscan dragto\fR commands.
-Typically this command is associated with a mouse button press in
-the widget.  It returns an empty string.
-.TP
-\fIpathName \fBscan dragto \fIx y\fR.
-Computes the difference between its \fIx\fR and \fIy\fR
-arguments and the \fIx\fR and \fIy\fR arguments to the last
-\fBscan mark\fR command for the widget.
-It then adjusts the view by 10 times the
-difference in coordinates.  This command is typically associated
-with mouse motion events in the widget, to produce the effect of
-dragging the list at high speed through the window.  The return
-value is an empty string.
-.RE
-.TP
-\fIpathName \fBsee\fR ?\fB\-anchor \fIanchor\fR? \fItagOrId\fR
-Adjusts the view of entries so that the node given by \fItagOrId\fR is
-visible in the widget window.  It is an error if \fBtagOrId\fR is a
-tag that refers to more than one node.  By default the node's entry
-is displayed in the middle of the window.  This can changed using the
-\fB\-anchor\fR flag.  Its value is a Tk anchor position.
-.TP
-\fIpathName \fBselection \fIoption arg\fR
-This command is used to adjust the selection within a \fBtreeview\fR
-widget.  It has several forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBselection anchor \fItagOrId\fR
-Sets the selection anchor to the node given by \fItagOrId\fR.
-If \fItagOrId\fR refers to a non-existent node, then the closest
-node is used.
-The selection anchor is the end of the selection that is fixed
-while dragging out a selection with the mouse.
-The special id \fBanchor\fR may be used to refer to the anchor
-node.
-.TP
-\fIpathName \fBselection cancel\fR
-Clears the temporary selection of entries back to the
-current anchor.  Temporary selections are created by 
-the \fBselection mark\fR operation.
-.TP
-\fIpathName \fBselection clear \fIfirst \fR?\fIlast\fR?
-Removes the entries between \fIfirst\fR and \fIlast\fR
-(inclusive) from the selection.  Both \fIfirst\fR and 
-\fIlast\fR are ids representing a range of entries.
-If \fIlast\fR isn't given, then only \fIfirst\fR is deselected.
-Entries outside the selection are not affected.
-.TP
-\fIpathName \fBselection clearall\fR
-Clears the entire selection.  
-.TP
-\fIpathName \fBselection mark \fItagOrId\fR
-Sets the selection mark to the node given by \fItagOrId\fR.  This
-causes the range of entries between the anchor and the mark to be
-temporarily added to the selection.  The selection mark is the end of
-the selection that is fixed while dragging out a selection with the
-mouse.  The special id \fBmark\fR may be used to refer to the current 
-mark node.
-If \fItagOrId\fR refers to a non-existent node, then the mark
-is ignored.
-Resetting the mark will unselect
-the previous range.  Setting the anchor finalizes the range.
-.TP
-\fIpathName \fBselection includes \fItagOrId\fR
-Returns 1 if the node given by \fItagOrId\fR is currently
-selected, 0 if it isn't.
-.TP
-\fIpathName \fBselection present\fR
-Returns 1 if any nodes are currently selected and 0 otherwise.
-.TP
-\fIpathName \fBselection set \fIfirst \fR?\fIlast\fR?
-Selects all of the nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, without affecting
-the selection state of nodes outside that range.
-.TP
-\fIpathName \fBselection toggle \fIfirst \fR?\fIlast\fR?
-Selects/deselects nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and
-visa versa.
-.RE
-.TP 
-\fIpathName \fBshow \fR?\fBflags\fR? \fItagOrId\fR...
-Exposes all nodes matching the criteria given by \fIflags\fR.  This
-is the inverse of the \fBhide\fR operation.  The search is performed
-recursively for each node given by \fItagOrId\fR.  The valid flags are
-described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Expose nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBsort\fR ?\fIoperation\fR? \fIargs...\fR
-.RS
-.TP
-\fIpathName \fBsort auto\fR ?\fIboolean\fR
-Turns on/off automatic sorting of node entries.  If \fIboolean\fR is
-true, entries will be automatically sorted as they are opened,
-closed, inserted, or deleted.  If no \fIboolean\fR argument is
-provided, the current state is returned.
-.TP
-\fIpathName \fBsort cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBsort configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the sorting configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given sorting option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.RS
-.TP
-\fB\-column\fI string\fR
-Specifies the column to sort. Entries in the widget are rearranged
-according to this column.  If \fIcolumn\fR is \f(CW""\fR then
-no sort is performed.
-.TP
-\fB\-command\fI string\fR
-Specifies a Tcl procedure to be called when sorting nodes. 
-The procedure is called with three arguments: the pathname of the widget
-and the fields of two entries.  The procedure returns 1 if the first
-node is greater than the second, -1 is the second is greater, and 0
-if equal.  
-.TP
-\fB\-decreasing\fI boolean\fR
-Indicates to sort in ascending/descending order.  If \fIboolean\fR 
-is true, then the entries as in descending order. The default is 
-\f(CWno\fR.
-.TP
-\fB\-mode\fI string\fR
-Specifies how to compare entries when sorting. \fIString\fR
-may be one of the following:
-.RS 
-.TP 1.5i
-\f(CWascii\fR
-Use string comparison based upon the ASCII collation order.
-.TP 1.5i
-\f(CWdictionary\fR 
-Use dictionary-style comparison.  This is the same as \f(CWascii\fR
-except (a) case is ignored except as a tie-breaker and (b) if two
-strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, "bigBoy" sorts between
-"bigbang" and "bigboy", and "x10y" sorts between "x9y" and "x11y".
-.TP 1.5i
-\f(CWinteger\fR
-Compares fields as integers.
-.TP 1.5i
-\f(CWreal\fR
-Compares fields as floating point numbers.
-.TP 1.5i
-\f(CWcommand\fR
-Use the Tcl proc specified by the \fB\-command\fR option to compare entries 
-when sorting.   If no command is specified, the sort reverts to 
-\f(CWascii\fR sorting.
-.RE
-.RE
-.TP
-\fIpathName \fBsort once\fR ?\fIflags\fR? \fItagOrId...\fR
-Sorts the children for each entries specified by \fItagOrId\fR.  
-By default, entries are sorted by name, but you can specify a 
-Tcl proc to do your own comparisons.
-.RS
-.TP 1.5i
-\fB\-recurse\fR
-Recursively sort the entire branch, not just the children.
-.RE
-.RE
-.TP
-\fIpathName \fBtag \fIoperation args\fR
-Tags are a general means of selecting and marking nodes in the tree.
-A tag is just a string of characters, and it may take any form except
-that of an integer.  The same tag may be associated with many
-different nodes.  
-.sp
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below.
-.RS
-.TP
-\fIpathName\fR \fBtag add\fR \fIstring\fR \fIid\fR...
-Adds the tag \fIstring\fR to one of more entries.
-.TP
-\fIpathName\fR \fBtag delete\fR \fIstring\fR \fIid\fR...
-Deletes the tag \fIstring\fR from one or more entries.  
-.TP
-\fIpathName\fR \fBtag forget\fR \fIstring\fR
-Removes the tag \fIstring\fR from all entries.  It's not an error if no
-entries are tagged as \fIstring\fR.
-.TP
-\fIpathName\fR \fBtag names\fR ?\fIid\fR?
-Returns a list of tags used.  If an \fIid\fR argument
-is present, only those tags used by the node designated by \fIid\fR 
-are returned.
-.TP
-\fIpathName\fR \fBtag nodes\fR \fIstring\fR
-Returns a list of ids that have the tag \fIstring\fR.  If no node
-is tagged as \fIstring\fR, then an empty string is returned.
-.RE
-.TP
-\fIpathName \fBtext \fIoperation\fR ?\fIargs\fR?
-This operation is used to provide text editing for cells (data 
-fields in a column) or entry labels.
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBtext apply\fR
-Applies the edited buffer, replacing the entry label
-or data field. The edit window is hidden.
-.TP
-\fIpathName \fBtext cancel\fR
-Cancels the editing operation, reverting the entry label 
-or data value back to the previous value. The edit window is hidden.
-.TP
-\fIpathName \fBtext cget\fI value\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBtext configure\fR ?\fIoption value\fR?
-Query or modify the configuration options of the edit window.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "TEXT EDITING OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBtext delete\fI first last\fR
-Deletes the characters in the edit buffer between the two given
-character positions.  
-.TP
-\fIpathName \fBtext get\fR ?\fI\-root\fR? \fIx y\fR
-.TP
-\fIpathName \fBtext icursor\fI index\fR
-.TP
-\fIpathName \fBtext index\fI index\fR
-Returns the text index of given \fIindex\fR.
-.TP
-\fIpathName \fBtext insert\fI index string\fR
-Insert the text string \fIstring\fR into the edit buffer at the index 
-\fIindex\fR.  For example, the index 0 will prepend the buffer.
-.TP
-\fIpathName \fBtext selection\fI args\fR
-This operation controls the selection of the editing window.  Note
-that this differs from the selection of entries.
-It has the following forms:
-.RS
-.TP
-\fIpathName \fBtext selection adjust\fI index\fR
-Adjusts either the first or last index of the selection.
-.TP
-\fIpathName \fBtext selection clear\fR
-Clears the selection.
-.TP
-\fIpathName \fBtext selection from\fI index\fR
-Sets the anchor of the selection.
-.TP
-\fIpathName \fBtext selection present\fR
-Indicates if a selection is present.
-.TP
-\fIpathName \fBtext selection range\fI start end\fR
-Sets both the anchor and mark of the selection.
-.TP
-\fIpathName \fBtext selection to\fI index\fR
-Sets the unanchored end (mark) of the selection.
-.RE
-.TP
-\fIpathName \fBtoggle \fItagOrId\fR
-Opens or closes the node given by \fItagOrId\fR.  If the corresponding 
-\fB\-opencommand\fR or \fB\-closecommand\fR option is set, then that
-command is also invoked. 
-.TP
-\fIpathName \fBxview \fIargs\fR
-This command is used to query and change the horizontal position of the
-information in the widget's window.  It can take any of the following
-forms:
-.RS
-.TP
-\fIpathName \fBxview\fR
-Returns a list containing two elements.
-Each element is a real fraction between 0 and 1;  together they describe
-the horizontal span that is visible in the window.
-For example, if the first element is .2 and the second element is .6,
-20% of the \fBtreeview\fR widget's text is off-screen to the left, 
-the middle 40% is visible
-in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
-option.
-.TP
-\fIpathName \fBxview\fR \fItagOrId\fR
-Adjusts the view in the window so that the character position given by
-\fItagOrId\fR is displayed at the left edge of the window.
-Character positions are defined by the width of the character \fB0\fR.
-.TP
-\fIpathName \fBxview moveto\fI fraction\fR
-Adjusts the view in the window so that \fIfraction\fR of the
-total width of the \fBtreeview\fR widget's text is off-screen to the left.
-\fIfraction\fR must be a fraction between 0 and 1.
-.TP
-\fIpathName \fBxview scroll \fInumber what\fR
-This command shifts the view in the window left or right according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
-of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR character units (the width of the \fB0\fR character)
-on the display;  if it is \fBpages\fR then the view adjusts by
-\fInumber\fR screenfuls.
-If \fInumber\fR is negative then characters farther to the left
-become visible;  if it is positive then characters farther to the right
-become visible.
-.RE
-.TP
-\fIpathName \fByview \fI?args\fR?
-This command is used to query and change the vertical position of the
-text in the widget's window.
-It can take any of the following forms:
-.RS
-.TP
-\fIpathName \fByview\fR
-Returns a list containing two elements, both of which are real fractions
-between 0 and 1.
-The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means
-it is halfway through the treeview window, for example).
-The second element gives the position of the node just after
-the last one in the window, relative to the widget as a whole.
-These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
-option.
-.TP
-\fIpathName \fByview\fR \fItagOrId\fR
-Adjusts the view in the window so that the node given by
-\fItagOrId\fR is displayed at the top of the window.
-.TP
-\fIpathName \fByview moveto\fI fraction\fR
-Adjusts the view in the window so that the node given by \fIfraction\fR
-appears at the top of the window.
-\fIFraction\fR is a fraction between 0 and 1;  0 indicates the first
-node, 0.33 indicates the node one-third the
-way through the \fBtreeview\fR widget, and so on.
-.TP
-\fIpathName \fByview scroll \fInumber what\fR
-This command adjusts the view in the window up or down according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
-\fInumber\fR lines;  if it is \fBpages\fR then
-the view adjusts by \fInumber\fR screenfuls.
-If \fInumber\fR is negative then earlier nodes
-become visible;  if it is positive then later nodes
-become visible.
-.RE
-.SH "TREEVIEW OPTIONS"
-In addition to the \fBconfigure\fR operation, widget configuration
-options may also be set by the Tk \fBoption\fR command.  The class
-resource name is \f(CWTreeView\fR.
-.CS
-option add *TreeView.Foreground white
-option add *TreeView.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active entries.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of the active node.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed for an entry's icon
-when it is active. \fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-autocreate \fIboolean\fR
-If \fIboolean\fR is true, automatically create missing ancestor 
-nodes when inserting new nodes. Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-allowduplicates \fIboolean\fR
-If \fIboolean\fR is true, allow nodes with duplicate pathnames
-when inserting new nodes.  Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the widget.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is closed.  You can
-overrider this for individual entries using the entry's \fB\-closecommand\fR 
-option. The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-dashes \fInumber\fR
-Sets the dash style of the horizontal and vertical lines drawn connecting 
-entries. \fINumber\fR is the length in pixels of the dashes and gaps in
-the line. If \fInumber\fR is \f(CW0\fR, solid lines will 
-be drawn. The default is \f(CW1\fR (dotted).
-.TP
-\fB\-exportselection \fIboolean\fR 
-Indicates if the selection is exported.  If the widget is exporting its
-selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type \fBSTRING\fR;
-the value of the selection will be the label of the selected nodes,
-separated by newlines.  The default is \f(CWno\fR.
-.TP
-\fB\-flat \fIboolean\fR
-Indicates whether to display the tree as a flattened list. 
-If \fIboolean\fR is true, then the hierarchy will be a list of full
-paths for the nodes.  This option also has affect on sorting. 
-See the 
-.SB "SORT OPERATIONS"
-section for more information.
-The default is \f(CWno\fR.
-.TP
-\fB\-focusdashes \fIdashList\fR 
-Sets the dash style of the outline rectangle drawn around the entry
-label of the node that current has focus. \fINumber\fR is the length
-in pixels of the dashes and gaps in the line.  If
-\fInumber\fR is \f(CW0\fR, a solid line will be drawn. The default is
-\f(CW1\fR.
-.TP
-\fB\-focusforeground \fIcolor\fR 
-Sets the color of the focus rectangle. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font for entry labels.  You can override this for individual
-entries with the entry's \fB\-font\fR configuration option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of entry labels.  You can override this for individual
-entries with the entry's \fB\-foreground\fR configuration option.  
-The default is
-\f(CWblack\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW400\fR.
-.TP
-\fB\-hideroot \fIboolean\fR
-If \fIboolean\fR is true, it indicates that no entry for the root node 
-should be displayed.  The default is \f(CWno\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Specifies the normal color of the traversal highlight region when
-the widget does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Specifies the color of the traversal highlight rectangle when
-the widget has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Specifies the width of the highlight rectangle indicating when the
-widget has input focus. The value may have any of the forms acceptable
-to \fBTk_GetPixels\fR.  If the value is zero, no focus highlight will
-be displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images for the entry's icon.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-linecolor \fIcolor\fR
-Sets the color of the connecting lines drawn between entries.  
-The default is \f(CWblack\fR.
-.TP
-\fB\-linespacing \fIpixels\fR
-Sets the number of pixels spacing between entries.  
-The default is \f(CW0\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the lines drawn connecting entries.  If \fIpixels\fR
-is \f(CW0\fR, no vertical or horizontal lines are drawn. 
-The default is \f(CW1\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is open.  
-You can override this for individual entries with the entry's
-\fB\-opencommand\fR configuration option.  The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the widget.  \fIRelief\fR
-specifies how the \fBtreeview\fR widget should appear relative to widget 
-it is packed into; for example, \f(CWraised\fR means the \fBtreeview\fR widget 
-should appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-scrollmode \fImode\fR 
-Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is \f(CWhierbox\fR.
-.RS
-.TP 1.25i
-\f(CWlistbox\fR
-Like the \fBlistbox\fR widget, the last entry can always be
-scrolled to the top of the widget window.  This allows the scrollbar
-thumb to shrink as the last entry is scrolled upward.
-.TP 1.25i
-\f(CWhierbox\fR
-Like the \fBhierbox\fR widget, the last entry can only be
-viewed at the bottom of the widget window.  The scrollbar
-stays a constant size.  
-.TP 1.25i
-\f(CWcanvas\fR
-Like the \fBcanvas\fR widget, the entries are bound within
-the scrolling area. 
-.RE
-.TP 
-\fB\-selectbackground \fIcolor\fR
-Sets the background color selected node entries.
-The default is \f(CW#ffffea\fR.
-.TP 
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the raised 3-D border drawn around the labels 
-of selected entries. The default is \f(CW0\fR.
-\fB\-selectcommand \fIstring\fR
-Specifies a Tcl script to invoked when the set of selected
-nodes changes.
-The default is \f(CW""\fR.
-.TP
-\fB\-selectforeground \fIcolor\fB
-Sets the color of the labels of selected node entries. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-selectmode \fImode\fR
-Specifies the selection mode. If \fImode\fR is 
-\f(CWsingle\fR, only one node can be selected
-at a time.  If \f(CWmultiple\fR more than one
-node can be selected.
-The default is \f(CWsingle\fR.
-.TP
-\fB\-separator \fIstring\fR
-Specifies the character sequence to use when spliting the path components.  
-The separator may be several characters wide (such as "::")
-Consecutive separators in a pathname are treated as one.
-If \fIstring\fR is the empty string, the pathnames are Tcl lists. 
-Each element is a path component.   The default is \f(CW""\fR.
-.TP
-\fB\-showtitles \fIboolean\fR
-If \fIboolean\fR is false, column titles are not be displayed.  
-The default is \f(CWyes\fR.
-.TP 
-\fB\-sortselection \fIboolean\fR
-If \fIboolean\fR is true, nodes in the selection are ordered as they
-are currently displayed (depth-first or sorted), not in the order
-they were selected. The default is \f(CWno\fR.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW"1"\fR.
-.TP
-\fB\-trim \fIstring\fR
-Specifies a string leading characters to trim from entry pathnames 
-before parsing.  This only makes sense if the \fB\-separator\fR is also
-set.  The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the widget.  If \fIpixels\fR is 0, then
-the with is computed from the contents of the \fBtreeview\fR widget.
-The default is \f(CW200\fR.
-.TP 
-\fB\-xscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-xscrollincrement\fR \fIpixels\fR
-Sets the horizontal scrolling distance. The default is 20 pixels.
-.TP
-\fB\-yscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with vertical
-scrollbars.   Whenever the vertical view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-yscrollincrement\fR \fIpixels\fR
-Sets the vertical scrolling distance. The default is 20 pixels.
-.SH "ENTRY OPTIONS"
-Many widget configuration options have counterparts in entries.  For
-example, there is a \fB\-closecommand\fR configuration option for both
-widget itself and for individual entries.  Options set at the widget
-level are global for all entries.  If the entry configuration option
-is set, then it overrides the widget option.  This is done to avoid
-wasting memory by replicated options.  Most entries will have
-redundant options.
-.PP
-There is no resource class or name for entries.
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed as the entry's icon
-when it is active. This overrides the global \fB\-activeicons\fR
-configuration option for the specific entry.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for nodes.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events are handled for nodes.  Each tag in the list matching the current 
-event sequence will have its Tcl command executed.  The default value 
-is \f(CWall\fR.
-.TP
-\fB\-button \fIstring\fR
-Indicates whether a button should be displayed on the left side
-of the node entry.  \fIString\fR can be \f(CWyes\fR, \f(CWno\fR, 
-or \f(CWauto\fR.  If \f(CWauto\fR, then a button is automatically
-displayed if the node has children.  This is the default.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when the node is closed.  This
-overrides the global \fB\-closecommand\fR option for this entry.
-The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-data \fIstring\fR
-Sets data fields for the node.  \fIString\fR is a list of 
-name-value pairs to be set. The default is \f(CW""\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for entry labels.  This overrides the widget's
-\fB\-font\fR option for this node.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of the entry label.  This overrides the widget's
-\fB\-foreground\fR configuration option.  The default is \f(CW""\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images to be displayed for the entry's icon.
-This overrides the global \fB\-icons\fR configuration option.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-label \fIstring\fR
-Sets the text for the entry's label.  If not set, this 
-defaults to the name of the node. The default is \f(CW""\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when the entry is opened.  
-This overrides the widget's \fB\-opencommand\fR option for this node.  
-The default is \f(CW""\fR. 
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.SH "BUTTON OPTIONS"
-Button configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWButton\fR.   The resource name is always
-\f(CWbutton\fR.
-.CS
-option add *TreeView.Button.Foreground white
-option add *TreeView.button.Background blue
-.CE
-The following are the configuration options available for buttons.
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the button.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the button.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-closerelief \fIrelief\fR
-Specifies the 3-D effect for the closed button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Sets the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of buttons. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-images \fIimages\fR
-Specifies images to be displayed for the button.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the button is open, the
-second when it is closed.  If the \fIimages\fR is the empty string,
-then a plus/minus gadget is drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-openrelief \fIrelief\fR
-Specifies the 3-D effect of the open button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-size \fIpixels\fR
-Sets the requested size of the button.  
-The default is \f(CW0\fR.
-.RE
-.SH "COLUMN OPTIONS"
-Column configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWColumn\fR.   The resource name is the 
-name of the column.
-.CS
-option add *TreeView.Column.Foreground white
-option add *TreeView.treeView.Background blue
-.CE
-The following configuration options are available for columns.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the column.  This overrides
-the widget's \fB\-background\fR option. The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border of the column.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-edit \fIboolean\fR
-Indicates if the column's data fields can be edited. If \fIboolean\fR is 
-false, the data fields in the column may not be edited.
-The default is \f(CWyes\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Specifies the foreground color of the column. 
-You can override this for individual entries with the entry's 
-\fB\-foreground\fR option.
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for a column.  You can override this for individual entries
-with the entry's \fB\-font\fR option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-hide \fIboolean\fR
-If \fIboolean\fR is true, the column is not displayed.
-The default is \f(CWyes\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the column data fields title should be justified within
-the column.  This matters only when the column is wider than the 
-data field to be display.
-\fIJustify\fR must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  
-The default is \f(CWleft\fR.
-.TP
-\fB\-pad \fIpad\fR
-Specifies how much padding for the left and right sides of the column.
-\fIPad\fR is a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the column is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW2\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the column.  \fIRelief\fR
-specifies how the column should appear relative to the widget; 
-for example, \f(CWraised\fR means the column should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-state \fIstate\fR
-Sets the state of the column. If \fIstate\fR is \f(CWdisable\fR then
-the column title can not be activated nor invoked.
-The default is \f(CWnormal\fR.
-.TP
-\fB\-text \fIstring\fR
-Sets the title for the column.
-The default is \f(CW""\fR.
-.TP
-\fB\-titleforeground \fIcolor\fR 
-Sets the foreground color of the column title. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-titleshadow \fIcolor\fR 
-Sets the color of the drop shadow of the column title.  
-The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the column.  This overrides
-the computed with of the column.  If \fIpixels\fR is 0,
-the width is computed as from the contents of the column. The
-default is \f(CW0\fR.
-.RE
-.SH "TEXT EDITING OPTIONS"
-Text edit window configuration options may also be set by the 
-\fBoption\fR command. The resource class is \f(CWTreeViewEditor\fR.
-The resource name is always \f(CWedit\fR.
-.CS
-option add *TreeViewEditor.Foreground white
-option add *edit.Background blue
-.CE
-The following are the configuration options available for the
-text editing window.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the text edit window.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the edit window.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-exportselection \fIboolean\fR
-Indicates if the text selection is exported.  If the edit window is 
-exporting its selection then it will observe the standard X11 protocols 
-for handling the selection.  Selections are available as type \fBSTRING\fR.
-The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the edit window.  \fIRelief\fR
-indicates how the background should appear relative to the edit
-window; for example, \f(CWraised\fR means the background should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-selectbackground \fIcolor\fR
-Sets the background of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the selected text in the 
-edit window.  The \fB\-selectrelief\fR option determines if a border 
-is to be drawn.  The default is \f(CW1\fR.
-.TP
-\fB\-selectforeground \fIcolor\fR
-Sets the foreground of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectrelief \fIrelief\fR
-Specifies the 3-D effect of the selected text in the edit window.  
-\fIRelief\fR indicates how the text should appear relative to the edit
-window; for example, \f(CWraised\fR means the text should
-appear to protrude.  The default is \f(CWflat\fR.
-.RE
-.SH "DEFAULT BINDINGS"
-Tk automatically creates class bindings for treeviews that give them
-Motif-like behavior.  Much of the behavior of a \fBtreeview\fR widget is determined
-by its \fB\-selectmode\fR option, which selects one of two ways
-of dealing with the selection.
-.PP
-If the selection mode is \fBsingle\fR, only one node can be 
-selected at a time.
-Clicking button 1 on an node selects
-it and deselects any other selected item.
-.PP
-If the selection mode is \fBmultiple\fR,
-any number of entries may be selected at once, including discontiguous
-ranges.  Clicking Control-Button-1 on a node entry
-toggles its selection state without affecting any other entries.
-Pressing Shift-Button-1 on a node entry selects
-it, extends the selection.
-.IP [1]
-In \fBextended\fR mode, the selected range can be adjusted by pressing
-button 1 with the Shift key down:  this modifies the selection to
-consist of the entries between the anchor and the entry under
-the mouse, inclusive.
-The un-anchored end of this new selection can also be dragged with
-the button down.
-.IP [2]
-In \fBextended\fR mode, pressing button 1 with the Control key down
-starts a toggle operation: the anchor is set to the entry under
-the mouse, and its selection state is reversed.  The selection state
-of other entries isn't changed.
-If the mouse is dragged with button 1 down, then the selection state
-of all entries between the anchor and the entry under the mouse
-is set to match that of the anchor entry;  the selection state of
-all other entries remains what it was before the toggle operation
-began.
-.IP [3]
-If the mouse leaves the treeview window with button 1 down, the window
-scrolls away from the mouse, making information visible that used
-to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the
-button is released, or the end of the hierarchy is reached.
-.IP [4]
-Mouse button 2 may be used for scanning.
-If it is pressed and dragged over the \fBtreeview\fR widget, the contents of
-the hierarchy drag at high speed in the direction the mouse moves.
-.IP [5]
-If the Up or Down key is pressed, the location cursor (active
-entry) moves up or down one entry.
-If the selection mode is \fBbrowse\fR or \fBextended\fR then the
-new active entry is also selected and all other entries are
-deselected.
-In \fBextended\fR mode the new active entry becomes the
-selection anchor.
-.IP [6]
-In \fBextended\fR mode, Shift-Up and Shift-Down move the location
-cursor (active entry) up or down one entry and also extend
-the selection to that entry in a fashion similar to dragging
-with mouse button 1.
-.IP [7]
-The Left and Right keys scroll the \fBtreeview\fR widget view left and right
-by the width of the character \fB0\fR.
-Control-Left and Control-Right scroll the \fBtreeview\fR widget view left and
-right by the width of the window.
-Control-Prior and Control-Next also scroll left and right by
-the width of the window.
-.IP [8]
-The Prior and Next keys scroll the \fBtreeview\fR widget view up and down
-by one page (the height of the window).
-.IP [9]
-The Home and End keys scroll the \fBtreeview\fR widget horizontally to
-the left and right edges, respectively.
-.IP [10]
-Control-Home sets the location cursor to the the first entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [11]
-Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [12]
-In \fBextended\fR mode, Control-Shift-Home extends the selection
-to the first entry and Control-Shift-End extends
-the selection to the last entry.
-.IP [13]
-In \fBmultiple\fR mode, Control-Shift-Home moves the location cursor
-to the first entry and Control-Shift-End moves
-the location cursor to the last entry.
-.IP [14]
-The space and Select keys make a selection at the location cursor
-(active entry) just as if mouse button 1 had been pressed over
-this entry.
-.IP [15]
-In \fBextended\fR mode, Control-Shift-space and Shift-Select
-extend the selection to the active entry just as if button 1
-had been pressed with the Shift key down.
-.IP [16]
-In \fBextended\fR mode, the Escape key cancels the most recent
-selection and restores all the entries in the selected range
-to their previous selection state.
-.IP [17]
-Control-slash selects everything in the widget, except in
-\fBsingle\fR and \fBbrowse\fR modes, in which case it selects
-the active entry and deselects everything else.
-.IP [18]
-Control-backslash deselects everything in the widget, except in
-\fBbrowse\fR mode where it has no effect.
-.IP [19]
-The F16 key (labelled Copy on many Sun workstations) or Meta-w
-copies the selection in the widget to the clipboard, if there is
-a selection.
-.PP
-The behavior of \fBtreeview\fR widgets can be changed by defining new bindings 
-for individual widgets or by redefining the class bindings.
-.SS WIDGET BINDINGS
-In addition to the above behavior, the following additional behavior
-is defined by the default widget class (TreeView) bindings.
-.IP \f(CW<ButtonPress-2>\fR 
-Starts scanning. 
-.IP \f(CW<B2-Motion>\fR 
-Adjusts the scan.
-.IP \f(CW<ButtonRelease-2>\fR
-Stops scanning.
-.IP \f(CW<B1-Leave>\fR 
-Starts auto-scrolling.
-.IP \f(CW<B1-Enter>\fR
-Starts auto-scrolling 
-.IP \f(CW<KeyPress-Up>\fR 
-Moves the focus to the previous entry.
-.IP \f(CW<KeyPress-Down>\fR 
-Moves the focus to the next entry.
-.IP \f(CW<Shift-KeyPress-Up>\fR
-Moves the focus to the previous sibling.
-.IP \f(CW<Shift-KeyPress-Down>\fR
-Moves the focus to the next sibling.
-.IP \f(CW<KeyPress-Prior>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Next>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Left>\fR 
-Closes the entry.  It is not an error if the entry has no children.
-.IP \f(CW<KeyPress-Right>\fR 
-Opens the entry, displaying its children.  It is not an
-error if the entry has no children.
-.IP \f(CW<KeyPress-space>\fR 
-In "single" select mode this selects the entry.  In "multiple" mode,
-it toggles the entry (if it was previous selected, it is not
-deselected).
-.IP \f(CW<KeyRelease-space>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress-Return>\fR 
-Sets the focus to the current entry.
-.IP \f(CW<KeyRelease-Return>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress>\fR 
-Moves to the next entry whose label starts with the letter typed.
-.IP \f(CW<KeyPress-Home>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-End>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-F1>\fR 
-Opens all entries.
-.IP \f(CW<KeyPress-F2>\fR
-Closes all entries (except root).
-.SS BUTTON BINDINGS
-Buttons have bindings.  There are associated with the "all" bindtag
-(see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the button of the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the button back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Adjust the view so that the current entry is visible.
-.SS ENTRY BINDINGS
-Entries have default bindings.  There are associated with the "all"
-bindtag (see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to modify them.
-.IP \f(CW<Enter>\fR 
-Highlights the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the entry back to its normal state.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the selection anchor the current entry.
-.IP \f(CW<Double-ButtonPress-1>\fR
-Toggles the selection of the current entry.
-.IP \f(CW<B1-Motion>\fR
-For "multiple" mode only.  Saves the current location of the
-pointer for auto-scrolling.  Resets the selection mark.  
-.IP \f(CW<ButtonRelease-1>\fR
-For "multiple" mode only.  Sets the selection anchor to the 
-current entry.
-.IP \f(CW<Shift-ButtonPress-1>\fR
-For "multiple" mode only. Extends the selection.
-.IP \f(CW<Shift-Double-ButtonPress-1>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-ButtonRelease-1>\fR 
-Stop auto-scrolling.
-.IP \f(CW<Control-ButtonPress-1>\fR 
-For "multiple" mode only.  Toggles and extends the selection.
-.IP \f(CW<Control-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Control-ButtonRelease-1>\fR 
-Stops auto-scrolling.
-.IP \f(CW<Control-Shift-ButtonPress-1>\fR 
-???
-.IP \f(CW<Control-Shift-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.SS COLUMN BINDINGS
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the
-\fBcolumn bind\fR operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the current column title.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Invokes the command (see the column's -command option) if one
-if specified.  
-.SS COLUMN RULE BINDINGS
-.IP \f(CW<Enter>\fR 
-Highlights the current and activates the ruler.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state. Deactivates the
-ruler.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the resize anchor for the column.
-.IP \f(CW<B1-Motion>\fR 
-Sets the resize mark for the column.
-.IP \f(CW<ButtonRelease-1>\fR 
-Adjust the size of the column, based upon the resize anchor and mark
-positions.
-.SH EXAMPLE
-The \fBtreeview\fR command creates a new widget.  
-.CS
-treeview .h \-bg white
-.CE
-A new Tcl command \f(CW.h\fR is also created.  This command can be used
-to query and modify the \fBtreeview\fR widget.  For example, to change the 
-background
-color of the table to "green", you use the new command and the widget's
-\fBconfigure\fR operation.
-.CS
-# Change the background color.
-\&.h configure \-background "green"
-.CE
-By default, the \fBtreeview\fR widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the
-widget.  Above, the new tree object name is ".h".  But you can use the
-\fB\-tree\fR option to specify the name of another tree.
-.CS
-# View the tree "myTree".
-\&.h configure \-tree "myTree"
-.CE
-When a new tree is created, it contains only a root node.  The node
-is automatically opened.  The id of the root node is always
-\f(CW0\fR (you can use also use the special id \f(CWroot\fR). The
-\fBinsert\fR operation lets you insert one or more new entries into
-the tree.  The last argument is the node's \fIpathname\fR.  
-.CS
-# Create a new entry named "myEntry"
-set id [\&.h insert end "myEntry"]
-.CE
-This appends a new node named "myEntry".  It will positioned as the
-last child of the root of the tree (using the position "end").  You
-can supply another position to order the node within its siblings.
-.CS
-# Prepend "fred".
-set id [\&.h insert 0 "fred"]
-.CE
-Entry names do not need to be unique.  By default, the node's label
-is its name.  To supply a different text label, add the \fB\-label\fR
-option.
-.CS
-# Create a new node named "fred"
-set id [\&.h insert end "fred" -label "Fred Flintstone"]
-.CE
-The \fBinsert\fR operation returns the id of the new node.  You can
-also use the \fBindex\fR operation to get this information.
-.CS
-# Get the id of "fred"
-\&.h index "fred"
-.CE
-To insert a node somewhere other than root, use the \fB\-at\fR switch.
-It takes the id of the node where the new child will be added.
-.CS
-# Create a new node "barney" in "fred".
-\&.h insert -at $id end "barney" 
-.CE
-A pathname describes the path to an entry in the hierarchy.  It's a
-list of entry names that compose the path in the tree.  Therefore, you
-can also add "barney" to "fred" as follows.
-.CS
-# Create a new sub-entry of "fred"
-\&.h insert end "fred barney" 
-.CE
-Every name in the list is ancestor of the next.  All ancestors must
-already exist.  That means that an entry "fred" is an ancestor of
-"barney" and must already exist.  But you can use the
-\fB\-autocreate\fR configuration option to force the creation of
-ancestor nodes.
-.CS
-# Force the creation of ancestors.
-\&.h configure -autocreate yes 
-\&.h insert end "fred barney wilma betty" 
-.CE
-Sometimes the pathname is already separated by a character sequence
-rather than formed as a list.  A file name is a good example of this.
-You can use the \fB\-separator\fR option to specify a separator string
-to split the path into its components.  Each pathname inserted is
-automatically split using the separator string as a separator.
-Multiple separators are treated as one.
-.CS
-\&.h configure -separator /
-\&.h insert end "/usr/local/tcl/bin" 
-.CE
-If the path is prefixed by extraneous characters, you can
-automatically trim it off using the \fB\-trim\fR option.  It removed
-the string from the path before it is parsed.
-.CS
-\&.h configure -trim C:/windows -separator /
-\&.h insert end "C:/window/system" 
-.CE
-You can insert more than one entry at a time with the \fBinsert\fR
-operation.  This can be much faster than looping over a list of names.
-.CS
-# The slow way
-foreach f [glob $dir/*] {
-    \&.h insert end $f
-}
-# The fast way
-eval .h insert end [glob $dir/*]
-.CE
-In this case, the \fBinsert\fR operation will return a list of ids
-of the new entries.
-.PP
-You can delete entries with the \fBdelete\fR operation.  It takes one or
-more tags of ids as its argument. It deletes the entry and all its
-children.
-.CS
-\&.h delete $id
-.CE
-Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the \fB\-label\fR
-option that sets the entry's text label.   The \fBentry configure\fR
-operation lets you set or modify an entry's configuration options.
-.CS
-\&.h entry configure $id -color red -font fixed
-.CE
-You can hide an entry and its children using the \fB\-hide\fR option.
-.CS
-\&.h entry configure $id -hide yes
-.CE
-More that one entry can be configured at once.  All entries specified
-are configured with the same options.
-.CS
-\&.h entry configure $i1 $i2 $i3 $i4 -color brown 
-.CE
-An icon is displayed for each entry.  It's a Tk image drawn to the
-left of the label.  You can set the icon with the entry's
-\fB\-icons\fR option.  It takes a list of two image names: one to
-represent the open entry, another when it is closed.
-.CS
-set im1 [image create photo -file openfolder.gif]
-set im2 [image create photo -file closefolder.gif]
-\&.h entry configure $id -icons "$im1 $im2"
-.CE
-If \fB\-icons\fR is set to the empty string, no icons are display.
-.PP
-If an entry has children, a button is displayed to the left of the
-icon. Clicking the mouse on this button opens or closes the
-sub-hierarchy.  The button is normally a \f(CW+\fR or \f(CW\-\fR
-symbol, but can be configured in a variety of ways using the \fBbutton
-configure\fR operation.  For example, the \f(CW+\fR and \f(CW\-\fR
-symbols can be replaced with Tk images.
-.CS
-set im1 [image create photo -file closefolder.gif]
-set im2 [image create photo -file downarrow.gif]
-\&.h button configure $id -images "$im1 $im2" \\
-    -openrelief raised -closerelief raised
-.CE
-Entries can contain an arbitrary number of \fIdata fields\fR.  Data
-fields are name-value pairs.  Both the value and name are strings.
-The entry's \fB\-data\fR option lets you set data fields.
-.CS
-\&.h entry configure $id -data {mode 0666 group users}
-.CE
-The \fB\-data\fR takes a list of name-value pairs.  
-.PP
-You can display these data fields as \fIcolumns\fR in the
-\fBtreeview\fR widget.  You can create and configure columns with
-the \fBcolumn\fR operation.  For example, to add a new column to the
-widget, use the \fBcolumn insert\fR operation.  The last argument is
-the name of the data field that you want to display.
-.CS
-\&.h column insert end "mode"
-.CE
-The column title is displayed at the top of the column.  By default,
-it's is the field name.  You can override this using the column's
-\fB\-text\fR option.
-.CS
-\&.h column insert end "mode" -text "File Permissions"
-.CE
-Columns have several configuration options.  The \fBcolumn
-configure\fR operation lets you query or modify column options.
-.CS
-\&.h column configure "mode" -justify left
-.CE
-The \fB\-justify\fR option says how the data is justified within in
-the column.  The \fB\-hide\fR option indicates whether the column is
-displayed.
-.CS
-\&.h column configure "mode" -hide yes
-.CE
-Entries can be selected by clicking on the mouse.  Selected entries
-are drawn using the colors specified by the \fB\-selectforeground\fR 
-and \fB\-selectbackground\fR configuration options.
-The selection itself is managed by the \fBselection\fR operation.
-.CS
-# Clear all selections
-\&.h selection clear 0 end
-# Select the root node
-\&.h selection set 0 
-.CE
-The \fBcurselection\fR operation returns a list of ids of
-all the selected entries.
-.CS
-set ids [\&.h curselection]
-.CE
-You can use the \fBget\fR operation to convert the ids to 
-their pathnames.
-.CS
-set names [eval .h get -full $ids]
-.CE
-If a treeview is exporting its selection (using the
-\fB\-exportselection\fR option), then it will observe the standard X11
-protocols for handling the selection.  Treeview selections are
-available as type \fBSTRING\fR; the value of the selection will be the
-pathnames of the selected entries, separated by newlines.
-.PP
-The \fBtreeview\fR supports two modes of selection: \f(CWsingle\fR
-and \f(CWmultiple\fR.  In single select mode, only one entry can be
-selected at a time, while multiple select mode allows several entries
-to be selected.  The mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -selectmode "multiple"
-.CE
-You can be notified when the list of selected entries changes.  The widget's
-\fB\-selectcommand\fR specifies a Tcl procedure that is called whenever
-the selection changes.
-.CS
-proc SelectNotify { widget } {
-   set ids [\&$widget curselection]
-}
-\&.h configure -selectcommand "SelectNotify .h"
-.CE
-The widget supports the standard Tk scrolling and scanning operations.
-The \fBtreeview\fR can be both horizontally and vertically. You can
-attach scrollbars to the \fBtreeview\fR the same way as the listbox
-or canvas widgets.
-.CS
-scrollbar .xbar -orient horizontal -command ".h xview"
-scrollbar .ybar -orient vertical -command ".h yview"
-\&.h configure -xscrollcommand ".xbar set" \\
-    -yscrollcommand ".ybar set"
-.CE
-There are three different modes of scrolling: \f(CWlistbox\fR,
-\f(CWcanvas\fR, and \f(CWhierbox\fR.  In \f(CWlistbox\fR mode, the last
-entry can always be scrolled to the top of the widget.  In \f(CWhierbox\fR
-mode, the last entry is always drawn at the bottom of the widget.
-The scroll mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -scrollmode "listbox"
-.CE
-Entries can be programmatically opened or closed using the \fBopen\fR
-and \fBclose\fR operations respectively.  
-.CS
-\&.h open $id
-\&.h close $id
-.CE
-When an entry is opened, a Tcl procedure can be automatically invoked.
-The \fB\-opencommand\fR option specifies this procedure.  This
-procedure can lazily insert entries as needed.
-.CS
-proc AddEntries { dir } {
-   eval .h insert end [glob -nocomplain $dir/*] 
-}
-\&.h configure -opencommand "AddEntries %P"
-.CE
-Now when an entry is opened, the procedure \f(CWAddEntries\fR is
-called and adds children to the entry.  Before the command is invoked,
-special "%" substitutions (like \fBbind\fR) are performed. Above,
-\f(CW%P\fR is translated to the pathname of the entry.
-.PP
-The same feature exists when an entry is closed.  The
-\fB\-closecommand\fR option specifies the procedure.
-.CS
-proc DeleteEntries { id } {
-   .h entry delete $id 0 end
-}
-\&.h configure -closecommand "DeleteEntries %#"
-.CE
-When an entry is closed, the procedure \f(CWDeleteEntries\fR is called
-and deletes the entry's children using the \fBentry delete\fR operation
-(\f(CW%#\fR is the id of entry).
-.SH KEYWORDS
-treeview, widget
diff --git a/blt3.0/man/htext.mann b/blt3.0/man/htext.mann
deleted file mode 100644
index 4b8be49..0000000
--- a/blt3.0/man/htext.mann
+++ /dev/null
@@ -1,384 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Hypertext widget created by George Howlett.
-'\"
-.so man.macros
-.TH htext n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-htext \- Create and manipulate hypertext widgets
-.SH SYNOPSIS
-\fBhtext\fP \fIpathName \fR?\fIoption value\fR?...
-.BE
-.SH DESCRIPTION
-.PP
-The \fBhtext\fR command creates a new window (given by the 
-\fIpathName\fR argument) and makes it into a \fBhtext\fP widget.
-Additional options, described above, may be specified on the command line
-or in the option database to configure aspects of the widget such as its 
-color and font.  At the time this command is invoked, there must not 
-exist a window named \fIpathName\fR, but \fIpathName\fR's parent must exist.
-The \fBhtext\fR command returns its \fIpathName\fR.   
-.PP
-The \fBhtext\fP widget is hybrid of a non-editable text widget and
-a geometry manager (e.g. the packer).  It displays text (optionally read
-from file) in a window.  Text can be scrolled either horizontally or
-vertically using the \fBhtext\fR window as a viewport.
-In addition, Tcl commands can be embedded into 
-the text which are evaluated as the text is parsed.  Text between special
-double characters (percent signs "%%") is immediately passed to the Tcl 
-interpreter for evaluation.  
-.PP
-Furthermore, any widget or widget hierarchy can be packed in-line and made 
-to appear on the current line of the text.  Widgets are packed using the 
-\fBhtext append\fP command.  All widgets must be children of the 
-\fBhtext\fP window and must already exist before packing. 
-Once a widget has been packed it cannot be moved to a different
-position within the text.  Widgets can be resized but they will remain 
-at the same position within the text.
-.PP
-Before a file or text string is parsed by the \fBhtext\fR widget,
-all the widget's current children are destroyed.  You can reload files or text 
-without worrying about unmapping or destroying each child window beforehand.
-.PP
-Setting the either the \fB\-filename\fR or \fB\-text\fR configuration option 
-will adjust the value of the other.  If both options are set, the file 
-takes precedence.  When a new file is read using the \fB\-filename\fR option,
-the value of the \fB\-text\fR option is reset to the empty string.  Likewise, 
-when the \fB\-text\fR option is set, the string representing the 
-\fB\-filename\fR option is cleared.
-.SH FILE FORMAT
-The format of \fBhtext\fP text file is typically ASCII text.  
-Text enclosed by special double characters (by default, percent signs '%%') 
-is interpreted and executed as Tcl commands.  
-The special character  may be specified by the \fB\-specialchar\fP option. 
-In the following example of a \fBhtext\fP file,  a button widget 
-is appended to the text between  the words "\f(CWa\fP" and "\f(CWwhich\fP".  
-The \fIpathName\fR of the \fBhtext\fP widget is "\f(CW.ht\fP".
-.CS
-\f(CWThis will be displayed as normal text. 
-But this will become a %% 
-  button .ht.button -text "button" -fg red
-  .ht append .ht.button 
-%% which can invoke a Tcl command.\fR
-.CE
-.LP
-.SH INDICES
-.PP
-Some of the widget operations (\fBselection\fR, \fRgotoline\fR, 
-\fBsearch\fR, etc.) take one or more indices as arguments.
-An index is a string used to indicate a particular place within
-the text, such as the first and last characters in a range to be
-selected. 
-.LP
-An index must have one of the following forms:
-.TP 12
-\fIline\fB.\fIchar\fR
-Indicates \fIchar\fR'th character on line \fIline\fR.
-Both lines and characters are number from 0, so "0.0" is the
-first beginning of the text.  \fIChar\fR may be undesignated.  In
-this case a character position of 0 is assumed.
-.TP 12
-\fB@\fIx\fB,\fIy\fR
-Indicates the character that covers the pixel whose x and y coordinates
-within the text's window are \fIx\fR and \fIy\fR.
-.TP 12
-\fBend\fR
-Indicates the end of the text.
-.TP 12
-\fBanchor\fR
-Indicates the anchor point for the selection, which is set with the
-\fBselection\fR operation.
-.TP 12
-\fBsel.first\fR
-Indicates the first character in the selection.  It is an error to
-use this form if the selection isn't in the entry window.
-.TP 12
-\fBsel.last\fR
-.VS
-Indicates the character just after the last one in the selection.
-.VE
-It is an error to use this form if the selection isn't in the
-entry window.
-.SH "VARIABLES"
-.PP
-The following global Tcl variables are maintained when an 
-\fBhtext\fR file is parsed.  
-.TP
-\fBhtext(widget)\fR 
-is the pathname of the \fBhtext\fP widget.
-.TP
-\fBhtext(file)\fR 
-is the name of the file the \fBhtext\fP widget is currently parsing.  
-It is the empty string when the \fB\-text\fP option is used.
-.TP
-\fBhtext(line)\fR 
-is the current line number in the text.  
-.PP
-This information might be used to construct hyper links 
-between different files and/or lines.
-.LP
-.SH "SYNTAX"
-The \fBhtext\fP command creates a new Tcl command whose
-name is \fIpathName\fR.  This command may be used to invoke various
-operations on the widget.  It has the following general form:
-.DS
-\fIpathName oper \fR?\fIargs\fR?
-.DE
-\fIOper\fR and \fIargs\fR determine the exact behavior of the command.
-.PP
-.SH "OPERATIONS"
-The following operations are available for \fBhtext\fP widgets:
-.TP
-\fIpathName \fBappend \fIwindow \fR?\fIoption value\fR?...  
-Embeds the widget \fIwindow\fP into the htext widget.  \fIWindow\fP is
-the pathname of the widget to be embedded which must be a child of
-\fIpathName\fR.  \fIWindow\fR will be positioned in the htext widget
-at the current location of the text. If \fIoption\fR and \fIvalue\fR
-pairs are present, they configure various aspects how \fIwindow\fR
-appears in \fIpathName\fR.  The following options are available.
-.RS
-.TP
-\fB\-anchor \fIanchorPos\fR
-Specifies how \fIwindow\fR will be arranged if there is any extra
-space in the cavity surrounding the window.  For example, if
-\fIanchorPos\fR is \fBcenter\fR then the window is centered in the
-cavity; if \fIanchorPos\fR is \fBw\fR then the window will be drawn
-such it touches the leftmost edge of the cavity. The default
-is \f(CWcenter\fR.
-.TP
-\fB\-fill \fIstyle\fR
-Specifies how the \fIwindow\fR should be stretched to occupy the extra
-space in the cavity surrounding it (if any exists).  \fIStyle\fR is
-\f(CWnone\fR, \f(CWx\fR, \f(CWy\fR, \f(CWboth\fR.  If \fIstyle\fR is \f(CWx\fR,
-the width of \fIwindow\fR is expanded to fill the cavity.  If
-\fIstyle\fR is \fBy\fR, the height is expanded.  The default is
-\f(CWnone\fR.
-.TP
-\fB\-height \fIpixels\fR
-Sets the height of the cavity surrounding \fIwindow\fR.  If
-\fIpixels\fP is zero, the height of the cavity will be the same as the
-requested height of \fIwindow\fR.  If \fIpixels\fR is less than the 
-requested height of \fIwindow\fR, \fIwindow\fR will be reduced to fit
-the cavity.  The default is \f(CW0\fR.
-.TP
-\fB\-ipadx \fIpad\fR
-Sets the amount of internal padding to be added to the width
-\fIwindow\fR.  \fIPad\fR can be a list of one or two numbers.  If
-\fIpad\fR has two elements, the left side of \fIwindow\fR is extended
-by the first value and the right side by the second value.  If
-\fIpad\fR is just one value, both the left and right sides are padded
-by evenly by the value.  The default is \f(CW0\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets an amount of internal padding to be added to the height of
-\fIwindow\fR.  \fIPad\fR can be a list of one or two numbers.  If
-\fIpad\fR has two elements, the top of \fIwindow\fR is padded by the
-first value and the bottom by the second value.  If \fIpad\fR is just
-one number, both the top and bottom are padded evenly by the value.
-The default is \f(CW0\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Justifies \fIwindow\fR vertically within the cavity containing it
-in relation to the line of text. \fIJustify\fR is \fBtop\fP, 
-\fBbottom\fR, or  \fBcenter\fR.  If \fIjustify\fR is \f(CWcenter\fR the
-widget is centered along the baseline of the line of text.  The 
-default is \f(CWcenter\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding on the left and right sides of \fIwindow\fR.
-\fIPad\fR can be a list of one or two numbers.  If \fIpad\fR has two
-elements, the left side of \fIwindow\fR is padded by the first value
-and the right side by the second value.  If \fIpad\fR has just one
-value, both the left and right sides are padded evenly by the value.
-The default is \f(CW0\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below \fIwindow\fR.  \fIPad\fR can be a
-list of one or two numbers.  If \fIpad\fR has two elements, the area
-above \fIwindow\fR is padded by the first value and the area below by
-the second value.  If \fIpad\fR is just one number, both the top and
-bottom are padded by the value.  The default is \f(CW0\fR.
-.TP
-\fB\-relheight \fIvalue\fR
-Specifies the height of the cavity containing \fIwindow\fR relative to 
-the height of \fIpathName\fR.  \fIValue\fP is real number indicating
-the ratio of the height of the cavity to the height of \fIpathName\fR.  
-As the height of \fIpathName\fR changes, so will the height of \fIwindow\fR.
-If \fIvalue\fR is 0.0 or less, the height of the cavity is the requested 
-height \fIwindow\fR.  The default is \f(CW0.0\fR.
-.TP
-\fB\-relwidth \fIvalue\fR
-Specifies the width of the cavity containing \fIwindow\fR relative to
-the width of \fIpathName\fR.  \fIValue\fP is real number indicating
-the ratio of the width of the cavity to the width of \IpathName\fR.
-As the height of \fIpathName\fR changes, so will the height of \fIwindow\fR.
-If \fIvalue\fR is 0.0 or less, the width of the cavity is the
-requested width of \fIwindow\fR.   The default is \f(CW0.0\fR.
-.TP
-\fB\-width \fIvalue\fR
-Species the width of the cavity containing the child window.  
-\fIValue\fP must be in a form accepted by \fBTk_GetPixels\fR.
-If \fIvalue\fP is greater than zero, the cavity is resized to that width.  
-If the requested window width is greater than the cavity's width, the
-window will be reduced to fit the cavity.
-By default, the cavity is requested width of the child window. 
-.RE
-.TP
-\fIpathName \fBconfigure\fR ?\fIwindow\fR? ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Queries or modifies the configuration options of the text widget or one 
-of its embedded widgets.  If no \fIwindow\fR argument is present, 
-the htext widget itself is configured.  Otherwise \fIwindow\fR
-is the pathname of a widget already embedded into the htext widget.
-Then this command configure the options for the embedded widget.
-.PP
-If \fIoption\fR isn't specified, a list describing all of the current
-options for \fIpathName\fR or \fIwindow\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-the option \fIoption\fR is returned.  If one or more \fIoption\fR and
-\fIvalue\fR pairs are specified, then for each pair, the htext or embedded 
-window option \fIoption\fR is set to \fIvalue\fR.
-.PP
-The following options are valid for the htext widget.
-.RS
-.TP
-\fB\-background\fR \fIcolor\fI
-Sets the background of the htext widget to \fIcolor\fR.  This default is
-\f(CWwhite\fR.
-.TP
-\fB\-cursor\fR \fIcursor\fR
-Specifies the cursor for the htext widget.  The default cursor is 
-\f(CWpencil\fR.
-.TP
-\fB\-filename\fR \fIfileName\fR
-Specifies a \fBhtext\fP file to be displayed in the window. 
-If the value is the empty string, the \fB\-text\fR option is used instead.
-See the section 
-.SB FILE FORMAT
-for a description of the \fBhtext\fP 
-file format.
-.TP
-\fB\-font\fR \fIfontName\fR 
-Sets the font of the text in the htext widget to \fIfontName\fR. The
-default is \f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground\fR \fIcolor\fR
-Sets the foreground of the htext widget to \fIcolor\fR.  This is
-the color of the text.  This default is \f(CWblack\fR.
-.TP
-\fB\-height\fR \fIpixels\fR
-Specifies the height of the htext widget window. 
-.TP
-\fB\-linespacing\fR \fIpixels\fR
-Specifies the spacing between each line of text.  The value must be in
-a form accepted by \fBTk_GetPixels\fR. The default value is 1 pixel.
-.TP
-\fB\-specialchar\fR \fInumber\fR
-Specifies the ASCII value of the special double character delimiters.
-In \fBhtext\fP files, the text between these special characters is 
-evaluated as a block of Tcl commands. The default special character 
-is the \f(CW0x25\fR  (percent sign).
-.TP
-\fB\-text\fR \fItext\fR
-Specifies the text to be displayed in the htext widget.  \fIText\fR
-can be any valid string of characters. See
-.SB "FILE FORMAT"
-for a description.
-.TP
-\fB\-xscrollcommand\fR \fIstring\fR 
-Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  When the view in the htext widget's window changes (or
-whenever anything else occurs that could change the display in a
-scrollbar, such as a change in the total size of the widget's
-contents), the widget invoke \fIstring\fR concatenated by two numbers.
-Each of the numbers is a fraction between 0 and 1, which indicates a
-position in the document.  If this option is not specified, then no
-command will be executed.
-.TP
-\fB\-yscrollcommand\fR \fIstring\fR
-Specifies the prefix for a command used to communicate with vertical
-scrollbars.  When the view in the htext widget's window changes (or
-whenever anything else occurs that could change the display in a
-scrollbar, such as a change in the total size of the widget's
-contents), the widget invoke \fIstring\fR concatenated by two numbers.
-Each of the numbers is a fraction between 0 and 1, which indicates a
-position in the document.  If this option is not specified, then no
-command will be executed.
-.TP
-\fB\-width\fR \fIpixels\fR
-Specifies the desired width of the viewport window.  If the
-\fIpixels\fR is less than one, the window will grow to accommodate the
-widest line of text.  
-.TP
-\fB\-xscrollunits\fR \fIpixels\fR
-Specifies the horizontal scrolling distance. The default is 10 pixels.
-.TP
-\fB\-yscrollunits\fR \fIpixels\fR
-Specifies the vertical scrolling distance. The default is 10 pixels.
-.RE
-.TP
-\fIpathName \fBgotoline \fR?\fIindex\fR?
-Sets the top line of the text to \fIindex\fP. \fIIndex\fP must be
-a valid text index (the character offset is ignored).  
-If an \fIindex\fP isn't provided, the current line number is 
-returned.
-.TP
-\fIpathName \fBscan mark \fIposition\fR
-Records \fIposition\fR and the current view in the text window;  used in
-conjunction with later \fBscan dragto\fR commands.  \fIPosition\fR must 
-be in the form "\fI at x,y\fR, where \fIx\fR and \fIy\fR are window coordinates.
-Typically this
-command is associated with a mouse button press in the widget.  It
-returns an empty string.
-.TP
-\fIpathName \fBscan dragto \fIposition\fR
-Computes the difference between \fIposition\fR and the position registered
-in the last \fBscan mark\fR command for the widget.  
-The view is then adjusted
-up or down by 10 times the difference in coordinates.  This command is 
-can be associated with mouse motion events to produce the effect of
-dragging the text at high speed through the window.  
-\fIPosition\fR must be in the form "\fI at x,y\fR, where \fIx\fR and 
-\fIy\fR are window coordinates. The command returns an empty string.
-.TP
-\fIpathName \fBsearch \fIpattern\fR ?\fIfrom\fR? ?\fIto\fR?
-Returns the number of the next line matching \fIpattern\fR.  \fIPattern\fR is
-a string which obeys the matching rules of \fBTcl_StringMatch\fR. 
-\fIFrom\fR and \fIto\fR are text line numbers (inclusive) which 
-bound the search.  
-If no match for \fIpattern\fR can be found, \fB-1\fR is returned.
-.TP
-\fIpathName \fBxview \fR?\fIposition\fR?
-Moves the viewport horizontally to the new text x-coordinate position.  
-\fIPosition\fR is the offset from the left side of the text to the current 
-position and must be in a form accepted by \fBTk_GetPixels\fR. If \fIposition\fR
-is not present, the current text position is returned.
-.TP
-\fIpathName \fByview \fR?\fIposition\fR?
-Moves the viewport vertically to the new text y-coordinate position.  
-\fIPosition\fR is the offset from the top of the text to the current 
-position and must be in a form accepted by \fBTk_GetPixels\fR. If \fIposition\fR
-is not present, the current text position is returned.
-.SH BUGS
-Text with embedded tabs can be obscured by child windows when scrolled 
-horizontally.
-.SH KEYWORDS
-hypertext, widget
diff --git a/blt3.0/man/man.macros b/blt3.0/man/man.macros
deleted file mode 100644
index 0da1a54..0000000
--- a/blt3.0/man/man.macros
+++ /dev/null
@@ -1,240 +0,0 @@
-'\" The definitions below are for supplemental macros used in Tcl/Tk
-'\" manual entries.
-'\"
-'\" .AP type name in/out ?indent?
-'\"	Start paragraph describing an argument to a library procedure.
-'\"	type is type of argument (int, etc.), in/out is either "in", "out",
-'\"	or "in/out" to describe whether procedure reads or modifies arg,
-'\"	and indent is equivalent to second arg of .IP (shouldn't ever be
-'\"	needed;  use .AS below instead)
-'\"
-'\" .AS ?type? ?name?
-'\"	Give maximum sizes of arguments for setting tab stops.  Type and
-'\"	name are examples of largest possible arguments that will be passed
-'\"	to .AP later.  If args are omitted, default tab stops are used.
-'\"
-'\" .BS
-'\"	Start box enclosure.  From here until next .BE, everything will be
-'\"	enclosed in one large box.
-'\"
-'\" .BE
-'\"	End of box enclosure.
-'\"
-'\" .CS
-'\"	Begin code excerpt.
-'\"
-'\" .CE
-'\"	End code excerpt.
-'\"
-'\" .VS ?version? ?br?
-'\"	Begin vertical sidebar, for use in marking newly-changed parts
-'\"	of man pages.  The first argument is ignored and used for recording
-'\"	the version when the .VS was added, so that the sidebars can be
-'\"	found and removed when they reach a certain age.  If another argument
-'\"	is present, then a line break is forced before starting the sidebar.
-'\"
-'\" .VE
-'\"	End of vertical sidebar.
-'\"
-'\" .DS
-'\"	Begin an indented unfilled display.
-'\"
-'\" .DE
-'\"	End of indented unfilled display.
-'\"
-'\" .SO
-'\"	Start of list of standard options for a Tk widget.  The
-'\"	options follow on successive lines, in four columns separated
-'\"	by tabs.
-'\"
-'\" .SE
-'\"	End of list of standard options for a Tk widget.
-'\"
-'\" .OP cmdName dbName dbClass
-'\"	Start of description of a specific option.  cmdName gives the
-'\"	option's name as specified in the class command, dbName gives
-'\"	the option's name in the option database, and dbClass gives
-'\"	the option's class in the option database.
-'\"
-'\" .UL arg1 arg2
-'\"	Print arg1 underlined, then print arg2 normally.
-'\"
-'\" RCS: @(#) $Id: man.macros,v 1.1.1.1 2010/06/01 17:42:59 joye Exp $
-'\"
-'\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
-.if t .wh -1.3i ^B
-.nr ^l \n(.l
-.ad b
-'\"	# Start an argument description
-.de AP
-.ie !"\\$4"" .TP \\$4
-.el \{\
-.   ie !"\\$2"" .TP \\n()Cu
-.   el          .TP 15
-.\}
-.ta \\n()Au \\n()Bu
-.ie !"\\$3"" \{\
-\&\\$1	\\fI\\$2\\fP	(\\$3)
-.\".b
-.\}
-.el \{\
-.br
-.ie !"\\$2"" \{\
-\&\\$1	\\fI\\$2\\fP
-.\}
-.el \{\
-\&\\fI\\$1\\fP
-.\}
-.\}
-..
-'\"	# define tabbing values for .AP
-.de AS
-.nr )A 10n
-.if !"\\$1"" .nr )A \\w'\\$1'u+3n
-.nr )B \\n()Au+15n
-.\"
-.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
-.nr )C \\n()Bu+\\w'(in/out)'u+2n
-..
-.AS Tcl_Interp Tcl_CreateInterp in/out
-'\"	# BS - start boxed text
-'\"	# ^y = starting y location
-'\"	# ^b = 1
-.de BS
-.br
-.mk ^y
-.nr ^b 1u
-.if n .nf
-.if n .ti 0
-.if n \l'\\n(.lu\(ul'
-.if n .fi
-..
-'\"	# BE - end boxed text (draw box now)
-.de BE
-.nf
-.ti 0
-.mk ^t
-.ie n \l'\\n(^lu\(ul'
-.el \{\
-.\"	Draw four-sided box normally, but don't draw top of
-.\"	box if the box started on an earlier page.
-.ie !\\n(^b-1 \{\
-\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
-.\}
-.el \}\
-\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
-.\}
-.\}
-.fi
-.br
-.nr ^b 0
-..
-'\"	# VS - start vertical sidebar
-'\"	# ^Y = starting y location
-'\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
-.de VS
-.if !"\\$2"" .br
-.mk ^Y
-.ie n 'mc \s12\(br\s0
-.el .nr ^v 1u
-..
-'\"	# VE - end of vertical sidebar
-.de VE
-.ie n 'mc
-.el \{\
-.ev 2
-.nf
-.ti 0
-.mk ^t
-\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
-.sp -1
-.fi
-.ev
-.\}
-.nr ^v 0
-..
-'\"	# Special macro to handle page bottom:  finish off current
-'\"	# box/sidebar if in box/sidebar mode, then invoked standard
-'\"	# page bottom macro.
-.de ^B
-.ev 2
-'ti 0
-'nf
-.mk ^t
-.if \\n(^b \{\
-.\"	Draw three-sided box if this is the box's first page,
-.\"	draw two sides but no top otherwise.
-.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
-.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
-.\}
-.if \\n(^v \{\
-.nr ^x \\n(^tu+1v-\\n(^Yu
-\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
-.\}
-.bp
-'fi
-.ev
-.if \\n(^b \{\
-.mk ^y
-.nr ^b 2
-.\}
-.if \\n(^v \{\
-.mk ^Y
-.\}
-..
-'\"	# DS - begin display
-.de DS
-.RS
-.nf
-.sp
-..
-'\"	# DE - end display
-.de DE
-.fi
-.RE
-.sp
-..
-'\"	# SO - start of list of standard options
-.de SO
-.SH "STANDARD OPTIONS"
-.LP
-.nf
-.ta 4c 8c 12c
-.ft B
-..
-'\"	# SE - end of list of standard options
-.de SE
-.fi
-.ft R
-.LP
-See the \\fBoptions\\fR manual entry for details on the standard options.
-..
-'\"	# OP - start of full description for a single option
-.de OP
-.LP
-.nf
-.ta 4c
-Command-Line Name:	\\fB\\$1\\fR
-Database Name:	\\fB\\$2\\fR
-Database Class:	\\fB\\$3\\fR
-.fi
-.IP
-..
-'\"	# CS - begin code excerpt
-.de CS
-.RS
-.nf
-.ta .25i .5i .75i 1i
-.ft CW
-.sp
-..
-'\"	# CE - end code excerpt
-.de CE
-.fi
-.RE
-.ft R
-.sp
-..
-.de UL
-\\$1\l'|0\(ul'\\$2
-..
diff --git a/blt3.0/man/scrollset.mann b/blt3.0/man/scrollset.mann
deleted file mode 100644
index 5af8797..0000000
--- a/blt3.0/man/scrollset.mann
+++ /dev/null
@@ -1,763 +0,0 @@
-
-'\"
-'\" Copyright 1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Scrollset widget created by George Howlett.
-'\"
-.so man.macros
-.TH scrollset n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-scrollset \- Create and manipulate scrollset widgets
-.BE
-.SH SYNOPSIS
-\fBscrollset\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBscrollset\fR manages a widget and two scrollbars, displaying
-the scrollbars only when they are needed to scroll the widget. 
-The embedded widget may be any type of widget.  If the widget
-doesn't have native scrolling capabilities (i.e. a "xview" or "yview" operation)
-the widget is by changing the scrollset viewport over the widget. 
-.PP
-There's no limit to the number of folders.  Tabs can be tiered (more than 
-one row).  If there are more tabs than can be displayed, tabs can also 
-be scrolled.  Any folder can also be torn off, when the contents (the Tk widget
-contained by it) is temporarily moved into another toplevel widget.
-A scrollset may used as just a set of tabs, without a displaying any pages.  
-You can bind events to individual tabs, so it's easy to add features like
-"balloon help".
-.SH SYNTAX
-The \fBscrollset\fR command creates a new window using the \fIpathName\fR
-argument and makes it into a scrollset widget.
-.DS
-\fBscrollset \fIpathName \fR?\fIoption value\fR?...
-.DE
-Additional options may be specified on the command line or in the
-option database to configure aspects of the scrollset such as its background
-color, scrollbars, or embedded widget. The \fBscrollset\fR command returns its
-\fIpathName\fR argument.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.
-.PP
-The scrollbars and embedded widget must be children of the scrollset 
-widget.  The scrollbars and embedded widget may be designated 
-in the \fBscrollset\fR widget before they exist.  The normal size of
-of \fBscrollset\fR is the requested width and height of the embedded widget
-(where no scrollbars are necessary).  You can override the embedded widget's
-requested size by setting the scrollset's \fB\-reqwidth\fR and 
-\fB\-reqheight\fR options respectively.
-.SH "OPERATIONS"
-All \fBscrollset\fR operations are invoked by specifying the widget's
-pathname, the operation, and any arguments that pertain to that
-operation.  The general form is:
-.sp
-.DS
-	\fIpathName operation \fR?\fIarg arg ...\fR?
-.DE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operations are available for scrollset widgets:
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described in the section
-.SB "WIDGET OPTIONS" 
-below.
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all 
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "WIDGET OPTIONS" 
-below.
-.TP
-\fIpathName \fBset \fBx\fR|\fBy\fIfirst\fR \fIlast\fR
-Scrolls the scrollset so that the tab
-\fItab\fR is visible in the widget's window.
-.TP
-\fIpathName \fBsize\fR
-Returns the number of tabs in the scrollset.
-.TP
-\fIpathName \fBtab \fIoperation\fR ?\fIargs\fR?
-.RS
-.TP
-\fIpathName \fBtab cget\fR \fItab\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR for tab \fItab\fR.
-\fIOption\fR may have any of the values accepted by the \fBtab configure\fR
-operation described in the section 
-.SB "TAB OPTIONS"
-below.
-.TP
-\fIpathName \fBtab configure\fR \fItab\fR \fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of one or more tabs.
- More than one tab can be configured if \fItab\fR refers to multiple tabs.
-If no \fIoption\fR is specified, this operation returns a list 
-describing all the available options for \fItab\fR.  
-.sp
-If \fIoption\fR is specified, but not \fIvalue\fR, then a list describing the
-one named option is returned.  If  one or more \fIoption\-value\fR pairs 
-are specified, then each named tab (specified by \fInameOrIndex\fR) will
-have its configurations option(s) set the given value(s).  In
-this last case, the empty string is returned.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "TAB OPTIONS"
-below.
-.TP
-\fIpathName \fBtab names\fR ?\fIpattern\fR?
-Returns the names of all the tabs matching the given pattern. If
-no \fIpattern\fR argument is provided, then all tab names are returned.
-.TP
-\fIpathName \fBtab tearoff \fItab\fR ?\fIwindow\fR?
-Moves the widget embedded the folder \fItab\fR (see the \fB-window\fR option), 
-placing it inside of \fIwindow\fR.  \fIWindow\fR is either the name of
-an new widget that will contain the embedded widget or the name
-of the \fBscrollset\fR widget.  It the last case, the embedded widget
-is put back into the folder.
-.sp
-If no \fIwindow\fR argument is provided, then the name of the current
-parent of the embedded widget is returned.
-.RE
-.TP
-\fIpathName \fBview \fIargs\fR
-This command queries or changes the position of the
-scrollset in the widget's window.  It can take any of the following
-forms:
-.RS
-.TP
-\fIpathName \fBview\fR 
-Returns a list of two numbers between 0.0 and
-1.0 that describe the amount and position of the scrollset that is
-visible in the window.  For example, if \fIview\fR is "0.2 0.6", 20%
-of the scrollset's text is off-screen to the left, 40% is visible in the
-window, and 40% of the scrollset is off-screen to the right.  These are
-the same values passed to scrollbars via the \fB\-scrollcommand\fR
-option.
-.TP
-\fIpathName \fBview moveto\fI fraction\fR
-Adjusts the view in the window so that \fIfraction\fR of the
-total width of the scrollset text is off-screen to the left.
-\fIfraction\fR must be a number between 0.0 and 1.0.
-.TP
-\fIpathName \fBview scroll \fInumber what\fR 
-This command shifts the view in the window (left/top or right/bottom)
-according to \fInumber\fR and \fIwhat\fR.  \fINumber\fR must be an
-integer. \fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
-abbreviation of these.  If \fIwhat\fR is \fBunits\fR, the view adjusts
-left or right by \fInumber\fR scroll units (see the
-\fB\-scrollincrement\fR option).  ; if it is \fBpages\fR then the view
-adjusts by \fInumber\fR widget windows.  If \fInumber\fR is negative
-then tabs farther to the left become visible; if it is positive then
-tabs farther to the right become visible.
-.RE
-.SH "WIDGET OPTIONS"
-Widget configuration options may be set either by the \fBconfigure\fR 
-operation or the Tk \fBoption\fR command.  The resource class
-is \f(CWScrollset\fR.  The resource name is the name of the widget.
-.CS
-option add *Scrollset.Foreground white
-option add *Scrollset.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the default active background color for tabs.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the 
-tab's \fB\-activebackground\fR option. 
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the default active foreground color for tabs.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the
-tab's \fB\-activeforeground\fR option.
-.TP
-\fB\-background \fIcolor\fR
-Sets the default background color of folders.  Individual tabs can
-override this with their own \fBR-background\fR option.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around tabs and folders. The
-\fB\-relief\fR option determines how the border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for both tabs and folders.  \fIRelief\fR
-specifies how the tabs should appear relative to background of the 
-widget; for example, \f(CWraised\fR means the tab should
-appear to protrude.  The default is \f(CWraised\fR.
-.TP
-\fB\-troughbackground \fIcolor\fR
-Sets the background color of the trough under the tabs.  
-.TP
-\fB\-outerborderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines how the border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-outerpad \fIpixels\fR
-Sets the amount of padding between the highlight ring on the 
-outer edge of the scrollset and the folder.  
-The default is \f(CW0\fR.
-.TP
-\fB\-outerrelief \fIrelief\fR
-Specifies the 3-D effect for the scrollset widget.  \fIRelief\fR
-specifies how the scrollset should appear relative to widget that
-it is packed into; for example, \f(CWraised\fR means the scrollset should
-appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the focus outline.  When a tab has the widget's
-focus, it is drawn with a dashed outline around its label.  
-\fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the cross hair lines.  Each number must be between 1 and
-255.  If \fIdashList\fR is \f(CW""\fR, the outline will be a solid
-line.  The default value is \f(CW5 2\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the default font for the text in tab labels.  Individual tabs may
-override this by setting the tab's \fB\-font\fR option.  The default value is
-\f(CW*Arial 9\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the default color of tab labels.  Individual tabs may
-override this option by setting the tab's \fB\-foreground\fR option.  
-The default value is \f(CWblack\fR.
-.TP 
-\fB\-gap \fIsize\fR
-Sets the gap (in pixels) between tabs.  The default value is \f(CW2\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  If \fIpixels\fR is
-0, then the height of the widget will be calculated based on
-the size the tabs and their pages.
-The default is \f(CW0\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Sets the color to display in the traversal highlight region when
-the scrollset does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Sets the color to use for the traversal highlight rectangle that is
-drawn around the widget when it has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Sets the width of the highlight rectangle to draw around the outside of 
-the widget when it has the input focus. \fIPixels\fR is a non-negative 
-value and may have any of the forms acceptable to \fBTk_GetPixels\fR.
-If the value is zero, no focus highlight is drawn around the widget.
-The default is \f(CW2\fR.
-.TP
-\fB\-pageheight \fIpixels\fR
-Sets the requested height of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum height of all embedded tab windows is used.  
-The default is \f(CW0\fR.
-.TP
-\fB\-pagewidth \fIpixels\fR
-Sets the requested width of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum width of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.TP
-\fB\-perforationcommand\fR \fIstring\fR
-Specifies a Tcl script to be invoked to tear off the current
-page in the scrollset. This command is typically invoked when 
-left mouse button is released over the tab perforation.  The default
-action is to tear-off the page and place it into a new toplevel 
-window.
-.TP
-\fB\-rotate \fIangle\fR
-Specifies the degrees to rotate text in tab labels.
-\fIAngle\fR is a real value representing the number of degrees
-to rotate the text labels.  The default is \f(CW0.0\fR degrees.
-.TP 
-\fB\-tabwidth \fIwidth\fR
-Indicates the width of each tab.  \fIWidth\fR can be one of the
-following:
-.RS
-.TP 1i
-\f(CWvariable\fR
-The width of the tab is determined by its text and image.
-.TP 1i
-\f(CWsame\fR
-The width of every tab is the maximum size.
-.TP 1i
-\f(CWpixels\fR
-The width of the tab is set to \fIpixels\R. 
-\fIPixels\fR is a positive screen distance.
-.RE
-The default is \f(CWsame\fR.
-.TP 
-\fB\-scrollcommand \fIstring\fR
-Specifies the prefix for a command for communicating with 
-scrollbars.  Whenever the view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed. 
-.TP 
-\fB\-scrollincrement \fIpixels\fR
-Sets the smallest number of pixels to scroll the tabs. 
-If \fIpixels\fR is greater than 0, this sets the units for 
-scrolling (e.g.,  when you the change the view by clicking
-on the left and right arrows of a scrollbar).
-.TP
-\fB\-selectbackground \fIcolor\fR
-Sets the color to use when displaying background of the selected
-tab. Individual tabs can override this option by setting the tab's 
-\fB\-selectbackground\fR option.
-'\".TP 
-'\" \fB\-selectborderwidth \fIpixels\fR
-'\" Sets the width of the raised 3-D border to draw around the label of 
-'\" the selected tab.  \fIPixels\fR must be a non-negative value.
-'\" The default value is \f(CW1\fR.
-.TP
-\fB\-selectcommand \fIstring\fR
-Specifies a default Tcl script to be associated with tabs.  This
-command is typically invoked when left mouse button is released over 
-the tab.  Individual tabs may override this with the tab's
-\fB\-command\fR option. The default value is \f(CW""\fR.
-.TP
-\fB\-selectforeground \fIcolor\fB
-Sets the default color of the selected tab's text label. 
-Individual tabs can override this option by setting the tab's 
-\fB\-selectforeground\fR option. The default value is \f(CWblack\fR.
-.TP
-\fB\-selectpad \fIpixels\fB
-Specifies extra padding to be displayed around the selected tab. 
-The default value is \f(CW3\fR.
-.TP
-\fB\-side \fIside\fB
-Specifies the side of the widget to place tabs. The following
-values are valid for \fIside\fR. The default value is \f(CWtop\fR.
-.RS
-.TP 1i
-\f(CWtop\fR
-Tabs are drawn along the top.
-.TP 1i
-\f(CWleft\fR
-Tabs are drawn along the left side.
-.TP 1i
-\f(CWright\fR
-Tabs are drawn along the right side.
-.TP 1i
-\f(CWboth\fR
-Tabs are drawn along the bottom side.
-.RE
-.TP 
-\fB\-slant \fIslant\fR
-Specifies if the tabs should be slanted 45 degrees on the left and/or 
-right sides. The following values are valid for \fIslant\fR. The default 
-is \f(CWnone\fR.
-.RS
-.TP 1i
-\f(CWnone\fR
-Tabs are drawn as a rectangle.  
-.TP 1i
-\f(CWleft\fR
-The left side of the tab is slanted.  
-.TP 1i
-\f(CWright\fR
-The right side of the tab is slanted.  
-.TP 1i
-\f(CWboth\fR
-Boths sides of the tab are slanted.
-.RE
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts decide whether to focus on the window.
-The default is \f(CW1\fR.
-.TP
-\fB\-tearoff \fIboolean\fR
-.TP
-\fB\-textside \fIside\fB
-If both images and text are specified for a tab, this option determines on
-which side of the tab the text is to be displayed. The 
-valid sides are \f(CWleft\fR, \f(CWright\fR, \f(CWtop\fR, and
-\f(CWbottom\fR.  The default value is \f(CWleft\fR.
-.TP
-\fB\-tiers \fInumber\fB
-Specifies the maximum number of tiers to use to display the tabs.
-The default value is \f(CW1\fR.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the requested width of the widget.  If \fIpixels\fR is
-0, then the width of the widget will be calculated based on
-the size the tabs and their pages.
-The default is \f(CW0\fR.
-.SH "TAB OPTIONS"
-In addition to the \fBconfigure\fR operation, widget configuration
-options may also be set by the Tk \fBoption\fR command.  The class
-resource name is \f(CWTab\fR.
-.CS
-option add *Scrollset.Tab.Foreground white
-option add *Scrollset.name.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the active background color for \fInameOrIndex\fR.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  This overrides the widget's \fB-activebackground\fR 
-option. 
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the default active foreground color \fInameOrIndex\fR.  A tab is "active"
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the
-tab's \fB-activeforeground\fR option.
-.TP
-\fB\-anchor \fIanchor\fR 
-Anchors the tab's embedded widget to a particular edge of the folder.
-This option has effect only if the space in the folder surrounding the 
-embedded widget is larger than the widget itself. \fIAnchor\fR specifies
-how the widget will be positioned in the extra space.  For example, if
-\fIanchor\fR is \f(CWcenter\fR then the window is centered in the folder
-; if \fIanchor\fR is \f(CWw\fR then the window will
-be aligned with the leftmost edge of the folder. The default value is
-\f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color for \fInameOrIndex\fR.  Setting this option overides the 
-widget's \fB\-tabbackground\fR option.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for this tab.  \fITagList\fR is a list of
-binding tag names.  The tags and their order will determine how
-commands for events in tabs are invoked.  Each tag in the list matching 
-the event sequence will have its Tcl command executed.  Implicitly the 
-name of the tab is always the first tag in the list.  The default value is
-\f(CWall\fR.
-.TP
-\fB\-command \fIstring\fR
-Specifies a Tcl script to be associated with \fInameOrIndex\fR.  This
-command is typically invoked when left mouse button is released over 
-the tab.  Setting this option overrides the widget's
-\fB\-selectcommand\fR option. 
-.TP
-\fB\-data \fIstring\fR
-Specifies a string to be associated with \fInameOrIndex\fR.
-This value isn't used in the widget code.  It may be used in Tcl bindings 
-to associate extra data (other than the image or text) with the
-tab. The default value is \f(CW""\fR.
-.TP
-\fB\-fill \fIfill\fR
-If the space in the folder surrounding the tab's embedded widget is 
-larger than the widget, then \fIfill\fR indicates if the embedded widget 
-should be stretched to occupy the extra space.  \fIFill\fR is either 
-\f(CWnone\fR,
-\f(CWx\fR, \f(CWy\fR, \f(CWboth\fR.  For example, if \fIfill\fR is \f(CWx\fR,
-then the widget is stretched horizontally.  If \fIfill\fR is \f(CWy\fR,
-the widget is stretched vertically.  The default is \f(CWnone\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for the text in tab labels.  If \fIfontName\fR is not
-the empty string, this overrides the scrollset's \fB\-font\fR option.
-The default value is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the color of the label for \fInameOrIndex\fR.  If \fIcolor\fR
-is not the empty string, this overrides the widget's \fB\-tabforeground\fR 
-option.  The default value is \f(CW""\fR.
-.TP 
-\fB\-image \fIimageName\fR
-Specifies the image to be drawn in label for \fInameOrIndex\fR.
-If \fIimage\fR is \f(CW""\fR, no image will be drawn.  Both text and
-images may be displayed at the same time in tab labels.
-The default value is \f(CW""\fR.
-.TP
-\fB\-ipadx \fIpad\fR
-Sets the padding to the left and right of the label.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the label is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets the padding to the top and bottom of the label.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the top of the label is padded by the first
-distance and the bottom by the second.  If \fIpad\fR has just one
-distance, both the top and bottom sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding around the left and right of the embedded widget, if 
-one exists.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the widget is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding around the top and bottom of the embedded widget, if
-one exists.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the top of the widget is padded by the first
-distance and the bottom by the second.  If \fIpad\fR has just one
-distance, both the top and bottom sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP 
-\fB\-selectbackground \fIcolor\fR
-Sets the color to use when displaying background of the selected
-tab. If \fIcolor\fR is not the empty string, this overrides the
-widget's \fB\-selectbackground\fR option. The default value is
-\f(CW""\fR.
-.TP 
-\fB\-shadow \fIcolor\fR
-Sets the shadow color for the text in the tab's label. Drop shadows
-are useful when both the foreground and background of the tab
-have similar color intensities.
-If \fIcolor\fR is the empty string, no shadow is drawn.
-The default value is \f(CW""\fR.
-.TP
-\fB\-state \fIstate\fR
-Sets the state of the tab. If \fIstate\fR is \f(CWdisable\fR the
-text of the tab is drawn as engraved and operations on the tab
-(such as \fBinvoke\fR and \fBtab tearoff\fR) are ignored.
-The default is \f(CWnormal\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern to use for the background of the folder
-when the window is torn off.
-\fIBitmap\fR specifies a bitmap to use as the stipple
-pattern. The default is \f(CWBLT\fR.
-.TP
-\fB\-text \fItext\fR
-Specifies the text of the tab's label.  The exact way the text is
-drawn may be affected by other options such as \fB\-state\fR or
-\fB\-rotate\fR.
-.TP
-\fB\-window \fIpathName\fR
-Specifies the widget to be embedded into the tab.  \fIPathName\fR must
-be a child of the \fBscrollset\fR widget.  The scrollset will "pack" and
-manage the size and placement of \fIpathName\fR.  The default value
-is \f(CW""\fR.
-.TP
-\fB\-windowheight \fIpixels\fR
-Sets the requested height of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum height of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.TP
-\fB\-windowwidth \fIpixels\fR
-Sets the requested width of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum width of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.SH "DEFAULT BINDINGS"
-.PP
-BLT automatically generates class bindings that supply scrollsets their
-default behaviors. The following event sequences are set by default 
-for scrollsets (via the class bind tag \f(CWScrollset\fR):
-.IP \fB<ButtonPress-2>\fR
-.IP \fB<B2-Motion>\fR
-.IP \fB<ButtonRelease-2>\fR
-Mouse button 2 may be used for scanning.
-If it is pressed and dragged over the scrollset, the contents of
-the scrollset drag at high speed in the direction the mouse moves.
-.IP \fB<KeyPress-Up>\fR
-.IP \fB<KeyPress-Down>\fR
-The up and down arrow keys move the focus to the tab immediately above
-or below the current focus tab.  The tab with focus is drawn
-with the a dashed outline around the tab label.
-.IP \fB<KeyPress-Left>\fR
-.IP \fB<KeyPress-Right>\fR
-The left and right arrow keys move the focus to the tab immediately to the left
-or right of the current focus tab.  The tab with focus is drawn
-with the a dashed outline around the tab label.
-.IP \fB<KeyPress-space>\fR
-.IP \fB<KeyPress-Return>\fR
-The space and return keys select the current tab given focus.
-When a folder is selected, it's command is invoked and the 
-embedded widget is mapped.
-.PP
-Each tab, by default, also has a set of bindings (via the tag
-\f(CWall\fR).  These bindings may be reset using the scrollset's 
-\fBbind\fR operation.
-.IP \fB<Enter>\fR
-.IP \fB<Leave>\fR
-When the mouse pointer enters a tab, it is activated (i.e. drawn in
-its active colors) and when the pointer leaves, it is redrawn in
-its normal colors.
-.IP \fB<ButtonRelease-1>\fR
-Clicking with the left mouse button on a tab causes the tab to be
-selected and its Tcl script (see the \fB\-command\fR or
-\fB\-selectcommand\fR options) to be invoked.  The folder and any embedded
-widget (if one is specified) is automatically mapped.
-.IP \fB<ButtonRelease-3>\fR
-.IP \fB<Control-ButtonRelease-1>\fR
-Clicking on the right mouse button (or the left mouse button with the
-Control key held down) tears off the current page into its own toplevel
-widget. The embedded widget is re-packed into a new toplevel and 
-an outline of the widget is drawn in the folder.  Clicking again
-(toggling) will reverse this operation and replace the page back in
-the folder.
-.SH "BIND TAGS"
-You can bind commands to tabs that are triggered when a particular
-event sequence occurs in them, much like canvas items in Tk's 
-canvas widget.  Not all event sequences are valid.  The only binding 
-events that may be specified are those related to the mouse and 
-keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButtonPress\fR, 
-\fBMotion\fR, and \fBKeyPress\fR).
-.PP
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the
-tab name and another is associated with the tab's tags
-(see the \fB\-bindtags\fR option).  When this occurs, all the 
-matching bindings are invoked.  A binding associated with the tab
-name is invoked first, followed by one binding for each of the tab's 
-bindtags.  If there are multiple matching bindings for a single tag, 
-then only the most specific binding is invoked.  A continue command 
-in a binding script terminates that script, and a break command 
-terminates that script and skips any remaining scripts for the event, 
-just as for the bind command.
-.PP
-The \fB\-bindtags\fR option for tabs controls addition tag names that
-can be matched.  Implicitly the first tag for each tab is its name.
-Setting the value of the \fB\-bindtags\fR option doesn't change this.
-.SH EXAMPLE
-You create a scrollset widget with the \fBscrollset\fR command.
-.CS
-# Create a new scrollset
-scrollset .ts -relief sunken -borderwidth 2 
-.CE
-A new Tcl command \f(CW.ts\fR is also created.  This command can be
-used to query and modify the scrollset.  For example, to change the
-default font used by all the tab labels, you use the new command and
-the scrollset's \fBconfigure\fR operation.
-.CS
-# Change the default font.
-\&.ts configure \-font "fixed"
-.CE
-You can then add folders using the \fBinsert\fR operation.
-.CS
-# Create a new folder "f1"
-\&.ts insert 0 "f1"
-.CE
-This inserts the new tab named "f1" into the scrollset.  The index
-\f(CW0\fR indicates location to insert the new tab.  You can also use
-the index \f(CWend\fR to append a tab to the end of the scrollset.  By
-default, the text of the tab is the name of the tab.  You can change
-this by configuring the \fB\-text\fR option.
-.CS
-# Change the label of "f1"
-\&.ts tab configure "f1" -text "Tab #1" 
-.CE
-The \fBinsert\fR operation lets you add one or more folders at a time.
-.CS
-\&.ts insert end "f2" -text "Tab #2" "f3" "f4" 
-.CE
-The tab on each folder contains a label.  A label may display both
-an image and a text string.  You can reconfigure the tab's attributes
-(foreground/background colors, font, rotation, etc) using the \fBtab
-configure\fR operation.
-.CS
-# Add an image to the label of "f1"
-set image [image create photo -file stopsign.gif]
-\&.ts tab configure "f1" -image $image
-\&.ts tab configure "f2" -rotate 90
-.CE
-Each folder may contain an embedded widget to represent its contents.
-The widget to be embedded must be a child of the scrollset widget.  Using
-the \fB\-window\fR option, you specify the name of widget to be
-embedded.  But don't pack the widget, the scrollset takes care of placing
-and arranging the widget for you.
-.CS
-graph .ts.graph
-\&.ts tab configure "f1" -window ".ts.graph" \\
-    -fill both -padx 0.25i -pady 0.25i
-.CE
-The size of the folder is determined the sizes of the Tk widgets
-embedded inside each folder.  The folder will be as wide as the widest
-widget in any folder. The tallest determines the height.  You can use
-the tab's \fB\-pagewidth\fR and \fB\-pageheight\fR options override this.
-.PP
-Other options control how the widget appears in the folder.  The
-\fB\-fill\fR option says that you wish to have the widget stretch to
-fill the available space in the folder.
-.CS
-\&.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i
-.CE
-.PP
-Now when you click the left mouse button on "f1", the
-graph will be displayed in the folder.  It will be automatically
-hidden when another folder is selected.  If you click on the right
-mouse button, the embedded widget will be moved into a toplevel widget 
-of its own.  Clicking again on the right mouse button puts it back into 
-the folder.
-.PP
-If you want to share a page between two different folders, the
-\fB\-command\fR option lets you specify a Tcl command to be invoked
-whenever the folder is selected.  You can reset the \fB\-window\fR
-option for the tab whenever it's clicked.
-.CS
-\&.ts tab configure "f2" -command { 
-    \&.ts tab configure "f2" -window ".ts.graph"
-}
-\&.ts tab configure "f1" -command { 
-    \&.ts tab configure "f1" -window ".ts.graph"
-}
-.CE
-If you have many folders, you may wish to stack tabs in multiple
-tiers.  The scrollset's \fB\-tiers\fR option requests a maximum
-number of tiers.   The default is one tier.  
-.CS
-\&.ts configure -tiers 2
-.CE
-If the tabs can fit in less tiers, the widget will use that many.  
-Whenever there are more tabs than can be displayed in the maximum number
-of tiers, the scrollset will automatically let you scroll the tabs.  You
-can even attach a scrollbar to the scrollset.
-.CS
-\&.ts configure -scrollcommand { .sbar set }  -scrollincrement 20
-\&.sbar configure -orient horizontal -command { .ts view }
-.CE
-By default tabs are along the top of the scrollset from left to right.  
-But tabs can be placed on any side of the scrollset using the \fB\-side\fR
-option.
-.CS
-# Arrange tabs along the right side of the scrollset. 
-\&.ts configure -side right -rotate 270
-.CE
-.SH KEYWORDS
-scrollset, widget
diff --git a/blt3.0/man/spline.mann b/blt3.0/man/spline.mann
deleted file mode 100644
index 4fcca80..0000000
--- a/blt3.0/man/spline.mann
+++ /dev/null
@@ -1,181 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Spline command created by George Howlett.
-'\"
-.so man.macros
-.TH spline n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBspline\fR \-  Fit curves with spline interpolation
-.SH SYNOPSIS
-.sp
-\fBblt::spline natural \fIx y sx sy\fR
-.sp
-\fBblt::spline quadratic \fIx y sx sy\fR
-.BE
-.SH DESCRIPTION
-The \fBspline\fR command computes a spline fitting a set of data
-points (x and y vectors) and produces a vector of the interpolated
-images (y-coordinates) at a given set of x-coordinates.
-.SH INTRODUCTION
-Curve fitting has many applications.  In graphs, curve fitting can
-be useful for displaying curves which are aesthetically pleasing to the
-eye.  Another advantage is that you can quickly generate arbitrary points 
-on the curve from a small set of data points.
-.PP
-A spline is a device used in drafting to produce smoothed curves.  The
-points of the curve, known as \fIknots\fR, are fixed and the
-\fIspline\fR, typically a thin strip of wood or metal, is bent around
-the knots to create the smoothed curve.  Spline interpolation is the
-mathematical equivalent.  The curves between adjacent knots are
-piecewise functions such that the resulting spline runs exactly
-through all the knots.  The order and coefficients of the polynominal
-determine the "looseness" or "tightness" of the curve fit from the
-line segments formed by the knots.
-.PP
-The \fBspline\fR command performs spline interpolation using cubic
-("natural") or quadratic polynomial functions.  It computes the spline
-based upon the knots, which are given as x and y vectors.  The
-interpolated new points are determined by another vector which
-represents the abscissas (x-coordinates) or the new points.  The
-ordinates (y-coordinates) are interpolated using the spline and 
-written to another vector.
-.SH EXAMPLE
-Before we can use the \fBspline\fR command, we need to create two BLT
-vectors which will represent the knots (x and y coordinates) of the
-data that we're going to fit.  Obviously, both vectors must be the
-same length.
-.CS
-# Create sample data of ten points. 
-blt::vector x(10) y(10)
-
-for {set i 10} {$i > 0} {incr i -1} {
-    set x($i-1) [expr $i*$i]
-    set y($i-1) [expr sin($i*$i*$i)]
-}
-.CE
-We now have two vectors \f(CWx\fR and \f(CWy\fR representing the ten data
-points we're trying to fit.  The order of the values of \f(CWx\fR must
-be monotonically increasing.  We can use the vector's \fBsort\fR operation 
-to sort the vectors.
-.CS
-x sort y
-.CE
-The components of \f(CWx\fR are sorted in increasing order.  The
-components of \f(CWy\fR are rearranged so that the original x,y
-coordinate pairings are retained.
-.PP
-A third vector is needed to indicate the abscissas (x-coordinates) of
-the new points to be interpolated by the spline.  Like the x vector,
-the vector of abscissas must be monotonically increasing.  All the
-abscissas must lie between the first and last knots (x vector)
-forming the spline.
-.PP
-How the abscissas are picked is arbitrary.  But if we are going to
-plot the spline, we will want to include the knots too.  Since both
-the quadratic and natural splines preserve the knots (an abscissa from
-the x vector will always produce the corresponding ordinate from the y
-vector), we can simply make the new vector a superset of \f(CWx\fR.
-It will contain the same coordinates as \f(CWx\fR, but also the
-abscissas of the new points we want interpolated.  A simple way is to
-use the vector's \fBpopulate\fR operation.
-.CS
-x populate sx 10
-.CE
-This creates a new vector \f(CWsx\fR.  It contains the abscissas of
-\f(CWx\fR, but in addition \f(CWsx\fR will have ten evenly distributed
-values between each abscissa.  You can interpolate any points you
-wish, simply by setting the vector values.
-.PP
-Finally, we generate the ordinates (the images of the spline) using
-the \fBspline\fR command.  The ordinates are stored in a fourth
-vector.
-.CS
-blt::spline natural x y sx sy
-.CE
-This creates a new vector \f(CWsy\fR.  It will have the same length as
-\f(CWsx\fR.  The vectors \f(CWsx\fR and \f(CWsy\fR represent the smoothed
-curve which we can now plot.
-.CS 
-blt::graph .graph
-\&.graph element create original -x x -y x -color blue
-\&.graph element create spline -x sx -y sy -color red
-blt::table . .graph
-.CE
-The \fBnatural\fR operation employs a cubic interpolant when forming
-the spline.  In terms of the draftmen's spline, a \fInatural spline\fR
-requires the least amount of energy to bend the spline (strip of
-wood), while still passing through each knot.  In mathematical terms,
-the second derivatives of the first and last points are zero.
-.PP
-Alternatively, you can generate a spline using the \fBquadratic\fR
-operation.  Quadratic interpolation produces a spline which follows 
-the line segments of the data points much more closely.  
-.CS
-blt::spline quadratic x y sx sy 
-.CE
-.SH OPERATIONS
-.TP
-\fBblt::spline natural \fIx y sx sy\fR 
-Computes a cubic spline from the data points represented by the
-vectors \fIx\fR and \fIy\fR and interpolates new points using vector
-\fIsx\fR as the x-coordinates.  The resulting y-coordinates are
-written to a new vector \fIsy\fR. The vectors \fIx\fR and \fIy\fR must
-be the same length and contain at least three components.  The order
-of the components of \fIx\fR must be monotonically increasing.
-\fISx\fR is the vector containing the x-coordinates of the points to
-be interpolated.  No component of \fIsx\fR can be less than first
-component of \fIx\fR or greater than the last component.  The order
-of the components of \fIsx\fR must be monotonically increasing.
-\fISy\fR is the name of the vector where the calculated y-coordinates
-will be stored.  If \fIsy\fR does not already exist, a new vector will be
-created.
-.TP
-\fBblt::spline quadratic \fIx y sx sy\fR 
-Computes a quadratic spline from the data points represented by the
-vectors \fIx\fR and \fIy\fR and interpolates new points using vector
-\fIsx\fR as the x-coordinates.  The resulting y-coordinates are
-written to a new vector \fIsy\fR.  The vectors \fIx\fR and \fIy\fR must
-be the same length and contain at least three components.  The order
-of the components of \fIx\fR must be monotonically increasing.
-\fISx\fR is the vector containing the x-coordinates of the points to
-be interpolated. No component of \fIsx\fR can be less than first
-component of \fIx\fR or greater than the last component.  The order of
-the components of \fIsx\fR must be monotonically increasing.  \fISy\fR
-is the name of the vector where the calculated y-coordinates are
-stored.  If \fIsy\fR does not already exist, a new vector will be
-created.
-.SH REFERENCES
-.nf
-.sp
-Numerical Analysis
-by R. Burden, J. Faires and A. Reynolds.	
-Prindle, Weber & Schmidt, 1981, pp. 112
-.sp
-Shape Preserving Quadratic Splines 
-by D.F.Mcallister & J.A.Roulier
-Coded by S.L.Dodd & M.Roulier N.C.State University.
-.sp
-.fi
-The original code for the quadratric spline can be found in TOMS #574.
-.SH KEYWORDS
-spline, vector, graph
-
diff --git a/blt3.0/man/stripchart.mann b/blt3.0/man/stripchart.mann
deleted file mode 100644
index 1553647..0000000
--- a/blt3.0/man/stripchart.mann
+++ /dev/null
@@ -1,2168 +0,0 @@
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Stripchart widget created by Sani Nassif and George Howlett.
-'\"
-.so man.macros
-.TH stripchart n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-stripchart \-  2D strip chart for plotting x and y coordinate data.
-.SH SYNOPSIS
-\fBstripchart\fI \fIpathName \fR?\fIoption value\fR?...
-.BE
-.SH DESCRIPTION
-The \fBstripchart\fR command creates a strip chart for plotting
-two-dimensional data (x,y coordinates). It has many configurable
-components: coordinate axes, elements, legend, grid lines, cross
-hairs, etc.  They allow you to customize the look and feel of the
-strip chart.
-.PP
-The \fBstripchart\fR is essentially the same as the \fBgraph\fR
-widget.  It works almost exactly the very same way.  
-.PP
-The use of a strip chart differs in that the X-axis typically refers
-to time points.  Data values are added at intervals.  The strip chart
-lets you automatically maintain a view of the most recent time points.
-The axis options \fB\-shiftby\fR and \fB\-autorange\fR control this.
-You can specify different line styles for data points (see the 
-\fB\-styles\fR option).  
-.SH INTRODUCTION
-The \fBstripchart\fR command creates a new window for plotting
-two-dimensional data (x,y coordinates).  Data points are plotted in a
-box displayed in the center of the new window.  This is the
-\fIplotting area\fR.  The coordinate axes are displayed in the
-margins around the plotting area.  By default, the legend is displayed
-in the right margin.  The title is displayed in top margin.
-.PP
-A strip chart is composed of several components: coordinate axes, data
-elements, legend, grid, cross hairs, pens, postscript, and annotation
-markers. 
-.TP 1i
-\f(CWaxis\fR 
-The stripchart widget can display up to four coordinate axes (two
-X-coordinate and two Y-coordinate axes), but you can create and use
-any number of axes. Axes control what region of data is displayed and
-how the data is scaled. Each axis consists of the axis line, title,
-major and minor ticks, and tick labels. Tick labels display the value
-of each major tick.
-.TP 1i
-\f(CWcrosshairs\fR
-Cross hairs are used to finely position the mouse pointer in relation
-to the coordinate axes. Two perpendicular lines are drawn across the
-plotting area, intersecting at the current location of the mouse
-pointer.
-.TP 1i
-\f(CWelement\fR 
-An element represents a set of data points. Elements can be plotted 
-with a symbol at each data point and lines connecting the points. 
-The appearance of the element, such as its symbol, line width, and 
-color is configurable.
-.TP 1i
-\f(CWgrid\fR
-Extends the major and minor ticks of the X\-axis and/or Y\-axis across the 
-plotting area. 
-.TP 1i
-\f(CWlegend\fR 
-The legend displays the name and symbol of each data element. 
-The legend can be drawn in any margin or in the plotting area.
-.TP 1i
-\f(CWmarker\fR
-Markers are used annotate or highlight areas of the graph. For 
-example, you could use a polygon marker to fill an area under a 
-curve, or a text marker to label a particular data point. Markers 
-come in various forms: text strings, bitmaps, connected line 
-segments, images, polygons, or embedded widgets.
-.TP 1i
-\f(CWpen\fR 
-Pens define attributes (both symbol and line style) for elements. 
-Data elements use pens to specify how they should be drawn.  A data 
-element may use many pens at once.  Here, the particular pen 
-used for a data point is determined from each element's weight 
-vector (see the element's \fB\-weight\fR and \fB\-style\fR options).  
-.TP 1i
-\f(CWpostscript\fR
-The widget can generate encapsulated PostScript output. This component
-has several options to configure how the PostScript is generated.
-.SH SYNTAX
-.DS
-\fBstripchart \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBstripchart\fR command creates a new window \fIpathName\fR and makes
-it into a \fBstripchart\fR widget.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.  Additional options may may be specified on the
-command line or in the option database to configure aspects of the
-strip chart such as its colors and font.  See the \fBconfigure\fR operation
-below for the exact details as to what \fIoption\fR and \fIvalue\fR
-pairs are valid.
-.PP
-If successful, \fBstripchart\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to perform various operations that query or modify the graph.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for the strip chart are described in 
-the 
-.SB "STRIPCHART OPERATIONS"
-section.
-.PP
-The command can also be used to access components of the strip chart.
-.DS
-\fIpathName component operation\fR ?\fIarg\fR?...
-.DE
-The operation, now located after the name of the component, is the
-function to be performed on that component. Each component has its own
-set of operations that manipulate that component.  They will be
-described below in their own sections.
-.SH EXAMPLE
-The \fBstripchart\fR command creates a new strip chart.  
-.CS
-# Create a new strip chart.  Plotting area is black.
-stripchart .s -plotbackground black
-.CE
-A new Tcl command \f(CW.s\fR is also created.  This command can be used
-to query and modify the strip chart.  For example, to change the title of
-the strip chart to "My Plot", you use the new command and the widget's
-\fBconfigure\fR operation.
-.CS
-# Change the title.
-\&.s configure \-title "My Plot"
-.CE
-A strip chart has several components. To access a particular component you
-use the component's name. For example, to add data elements, you use 
-the new command and the \fBelement\fR component.
-.CS
-# Create a new element named "line1"
-\&.s element create line1 \\
-	\-xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \\
-	\-ydata { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 
-		155.85 166.60 175.38 }
-.CE
-The element's X and Y coordinates are specified using lists of
-numbers.  Alternately, BLT vectors could be used to hold the X\-Y
-coordinates.
-.CS
-# Create two vectors and add them to the strip chart.
-vector xVec yVec
-xVec set { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 }
-yVec set { 26.18 50.46 72.85 93.31 111.86 128.47 143.14 155.85 
-	166.60 175.38 }
-\&.s element create line1 \-xdata xVec \-ydata yVec
-.CE
-The advantage of using vectors is that when you modify one, the graph
-is automatically redrawn to display the new values.
-.CS
-# Change the X\-Y coordinates of the first point.
-set xVec(0) 0.18
-set yVec(0) 25.18
-.CE
-An element named \f(CWline1\fR is now created in \f(CW.s\fR.  By
-default, the element's label in the legend will be also \f(CWline1\fR.
-You can change the label, or specify no legend entry, again using the
-element's \fBconfigure\fR operation.
-.CS
-# Don't display "line1" in the legend.
-\&.s element configure line1 -label ""
-.CE
-You can configure more than just the element's label.  An element has
-many attributes such as symbol type and size, dashed or solid lines,
-colors, line width, etc.
-.CS
-\&.s element configure line1 -symbol square -color red \\
-	-dashes { 2 4 2 } -linewidth 2 -pixels 2c
-.CE
-Four coordinate axes are automatically created: \f(CWx\fR, \f(CWx2\fR,
-\f(CWy\fR, and \f(CWy2\fR.  And by default, elements are mapped onto the
-axes \f(CWx\fR and \f(CWy\fR.  This can be changed with the \fB\-mapx\fR
-and \fB\-mapy\fR options.
-.CS
-# Map "line1" on the alternate Y-axis "y2".
-\&.s element configure line1 -mapy y2
-.CE
-Axes can be configured in many ways too.  For example, you change the
-scale of the Y-axis from linear to log using the \fBaxis\fR operation.
-.CS
-# Y-axis is log scale.
-\&.s axis configure y -logscale yes
-.CE
-Axis limits are reset by simply specifying new axis
-limits using the \fB\-min\fR and \fB\-max\fR configuration options.
-.CS
-\&.s axis configure x -min 1.0 -max 1.5
-\&.s axis configure y -min 12.0 -max 55.15
-.CE
-By default, the limits of the axis are determined from data values.
-To reset back to the default limits, set the \fB\-min\fR and
-\fB\-max\fR options to the empty value.
-.CS
-# Reset the axes to autoscale again.
-\&.s axis configure x -min {} -max {}
-\&.s axis configure y -min {} -max {}
-.CE
-It's common with strip charts to automatically maintain a view of
-the most recent time points.  You can do this my setting the 
-\fB\-autorange\fR option.
-.CS
-\&.s axis configure x -autorange 20.0
-.CE
-If the time points are added in X-coordinates 1.0 unit, only the last
-twenty time points will be displayed.  As more data
-is added, the view will march along.
-.PP
-Sometimes the rate of data is so high that changing the axis limits
-with each additional time point is prohibitive.  You can use the
-\fB\-shiftby\fR option to define an increment to shift the view
-when needed.  
-.CS
-\&.s axis configure x -shiftby 15.0
-.CE
-When the view is shifted, it will allow a range of 15
-new time points to be added until the axis limits are recomputed.
-.PP
-By default, the legend is displayed in the right margin.  You can
-change this or any other legend configuration options using the
-\fBlegend\fR component.
-.CS
-# Configure the legend font, color, and relief
-\&.s legend configure -position left -relief raised \\
-	-font fixed -fg blue
-.CE
-To prevent the legend from being displayed, turn on the \fB\-hide\fR
-option.
-.CS
-# Don't display the legend.
-\&.s legend configure -hide yes\fR
-.CE
-The \fBstripchart\fR widget has simple drawing procedures called markers.
-They can be used to highlight or annotate data in the strip chart. The types
-of markers available are bitmaps, images, polygons, lines, or windows.
-Markers can be used, for example, to mark or brush points.  Here 
-is a text marker which labels the data first point.  Markers
-are created using the \fBmarker\fR operation.
-.CS
-# Create a label for the first data point of "line1".
-\&.s marker create text \-name first_marker \-coords { 0.2 26.18 } \\
-	\-text "start" \-anchor se \-xoffset -10 \-yoffset -10
-.CE
-This creates a text marker named \f(CWfirst_marker\fR.  It will display
-the text "start" near the coordinates of the first data point.  The
-\fB\-anchor\fR, \fB\-xoffset\fR, and \fB\-yoffset\fR options are used
-to display the marker above and to the left of the data point, so that
-the actual data point isn't covered by the marker.  By default,
-markers are drawn last, on top of data.  You can change this with the
-\fB\-under\fR option.
-.CS
-# Draw the label before elements are drawn.
-\&.s marker configure first_marker -under yes
-.CE
-You can add cross hairs or grid lines using the \fBcrosshairs\fR and
-\fBgrid\fR operations.
-.CS
-# Display both cross hairs and grid lines.
-\&.s crosshairs configure \-hide no \-color red
-\&.s grid configure \-hide no \-dashes { 2 2 }
-.CE
-Finally, to get hardcopy of the strip chart, use the \fBpostscript\fR
-operation.
-.CS
-# Print the strip chart into file "file.ps"
-\&.s postscript output file.ps \-maxpect yes \-decorations no
-.CE
-This generates a file \f(CWfile.ps\fR containing the encapsulated
-PostScript of the strip chart.  The option \fB\-maxpect\fR says to scale the
-plot to the size of the page.  Turning off the \fB\-decorations\fR
-option indicates that no borders or color backgrounds should be
-displayed (i.e. the background of the margins, legend, and plotting
-area will be white).
-.SH "STRIPCHART OPERATIONS"
-.TP
-\fIpathName \fBaxis \fIoperation\fR ?\fIarg\fR?...
-See the 
-.SB "AXIS COMPONENTS"
-section.
-.TP
-\fIpathName \fBbar \fIelemName \fR?\fIoption value\fR?...
-Creates a new barchart element \fIelemName\fR.  It's an
-error if an element \fIelemName\fR already exists.  
-See the manual for \fBbarchart\fR for details about
-what \fIoption\fR and \fIvalue\fR pairs are valid.
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the stripchart configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBconfigure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options of the strip chart.  If
-\fIoption\fR isn't specified, a list describing all of the current
-options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the stripchart option \fIoption\fR is set to \fIvalue\fR.
-The following options are valid for the stripchart.
-.RS
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color. This includes the margins and
-legend, but not the plotting area.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-bottommargin \fIpixels\fR
-Specifies the size of the margin below the X\-coordinate axis.  If
-\fIpixels\fR is \f(CW0\fR, the size of the margin is selected automatically.
-The default is \f(CW0\fR.
-.TP
-\fB\-bufferelements \fIboolean\fR
-Indicates whether to draw elements into a pixmap before displaying
-them on the screen.  The advantage of buffering elements is when markers
-are used heavily.  Markers can be moved and redrawn without requiring
-every element to be redrawn again.  The disadvantage is that it takes
-slightly longer to draw the graph. If \fIboolean\fR is true, data elements are
-drawn to an internal pixmap.  The option should be turned off if the plot
-is updated frequently. See the
-.SB "SPEED TIPS"
-section.
-The default is \f(CW1\fR.
-.TP
-\fB\-buffergraph \fIboolean\fR
-Indicates whether to draw the graph into a pixmap first.
-If \fIboolean\fR is true, the entire graph is drawn into a pixmap and then
-copied onto the screen.  This reduces flashing.  If false, the graph is 
-drawn directly into the window.  Especially under Windows, turning off the 
-option can be helpful when the stripchart is updated frequently.  Turning 
-off this option also turns \fB\-bufferelements\fR off. See the
-.SB "SPEED TIPS"
-section.
-The default is \f(CW1\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default
-cursor is \f(CWcrosshair\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the title font. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-18-180-*\fR.
-.TP
-\fB\-halo \fIpixels\fR 
-Specifies a maximum distance to consider when searching for the
-closest data point (see the element's \fBclosest\fR operation below).
-Data points further than \fIpixels\fR away are ignored.  The default is
-\f(CW0.5i\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW4i\fR.
-.TP
-\fB\-invertxy \fIboolean\fR
-Indicates whether the placement X\-axis and Y\-axis should be inverted.  If
-\fIboolean\fR is true, the X and Y axes are swapped.  The default is
-\f(CW0\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the title should be justified.  This matters only when
-the title contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-leftmargin \fIpixels\fR
-Sets the size of the margin from the left edge of the window to 
-the Y\-coordinate axis.  If \fIpixels\fR is \f(CW0\fR, the size is
-calculated automatically.  The default is \f(CW0\fR.
-.TP
-\fB\-plotbackground \fIcolor\fR
-Specifies the background color of the plotting area.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-plotborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the plotting area.  The
-\fB\-plotrelief\fR option determines if a border is drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-plotpadx \fIpad\fR
-Sets the amount of padding to be added to the left and right sides of
-the plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the left side of the
-plotting area entry is padded by the first distance and the right side
-by the second.  If \fIpad\fR is just one distance, both the left and
-right sides are padded evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotpady \fIpad\fR
-Sets the amount of padding to be added to the top and bottom of the
-plotting area.  \fIPad\fR can be a list of one or two screen
-distances.  If \fIpad\fR has two elements, the top of the plotting
-area is padded by the first distance and the bottom by the second.  If
-\fIpad\fR is just one distance, both the top and bottom are padded
-evenly.  The default is \f(CW8\fR.
-.TP
-\fB\-plotrelief \fIrelief\fR
-Specifies the 3-D effect for the plotting area.  \fIRelief\fR
-indicates how the interior of the plotting area should appear relative
-to rest of the strip chart; for example, \f(CWraised\fR means the plot should
-appear to protrude from the strip chart, relative to the surface of the
-strip chart.  The default is \f(CWsunken\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the widget.  \fIRelief\fR
-indicates how the strip chart should appear relative to widget it is packed
-into; for example, \f(CWraised\fR means the strip chart should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-rightmargin \fIpixels\fR
-Sets the size of margin from the plotting area to the right edge of
-the window.  By default, the legend is displayed in this margin.  If
-\fIpixels\fR is than 1, the margin size is selected automatically.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW""\fR.
-.TP
-\fB\-tile \fIimage\fR 
-Specifies a tiled background.  If \fIimage\fR isn't
-\f(CW""\fR, the background is tiled using \fIimage\fR.
-Otherwise, the normal background color is drawn (see the
-\fB\-background\fR option).  \fIImage\fR must be an image created
-using the Tk \fBimage\fR command.  The default is \f(CW""\fR.
-.TP
-\fB\-title \fItext\fR 
-Sets the title to \fItext\fR. If \fItext\fR is \f(CW""\fR,
-no title will be displayed.
-.TP
-\fB\-topmargin \fIpixels\fR
-Specifies the size of the margin above the x2 axis.  If \fIpixels\fR
-is \f(CW0\fR, the margin size is calculated automatically.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the requested width of the widget.  The default is
-\f(CW5i\fR.
-.RE
-.TP
-\fIpathName \fBcrosshairs \fIoperation \fR?\fIarg\fR?
-See the 
-.SB "CROSSHAIRS COMPONENT"
-section.
-.TP
-\fIpathName \fBelement \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "ELEMENT COMPONENTS"
-section.
-.TP
-\fIpathName \fBextents \fIitem\fR 
-Returns the size of a particular item in the strip chart.  \fIItem\fR must
-be either \f(CWleftmargin\fR, \f(CWrightmargin\fR, \f(CWtopmargin\fR,
-\f(CWbottommargin\fR, \f(CWplotwidth\fR, or \f(CWplotheight\fR.
-.TP
-\fIpathName \fBgrid \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "GRID COMPONENT"
-section.
-.TP
-\fIpathName \fBinvtransform \fIwinX winY\fR 
-Performs an inverse coordinate transformation, mapping window
-coordinates back to graph coordinates, using the standard X\-axis and Y\-axis.
-Returns a list of containing the graph coordinates.
-.TP
-\fIpathName \fBlegend \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "LEGEND COMPONENT"
-section.
-.TP
-\fIpathName \fBline \fIelemName\fR ?\fIoption value\fR?...
-The operation is the same as \fBelement\fR.
-.TP
-\fIpathName \fBmarker \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "MARKER COMPONENTS"
-section.
-.TP
-\fIpathName\fR \fBmetafile\fR ?\fIfileName\fR?
-\fIThis operation is for Window platforms only\fR.  
-Creates a Windows enhanced metafile of the stripchart.
-If present, \fIfileName\fR is the file name of the new metafile.
-Otherwise, the metafile is automatically added to the clipboard.
-.TP
-\fIpathName \fBpostscript \fIoperation \fR?\fIarg\fR?...
-See the 
-.SB "POSTSCRIPT COMPONENT"
-section.
-.TP
-\fIpathName \fBsnap \fIphotoName\fR
-Takes a snapshot of the strip chart and stores the contents in the photo
-image \fIphotoName\fR.  \fIPhotoName\fR is the name of a Tk photo
-image that must already exist.
-.TP
-\fIpathName \fBtransform \fIx y\fR 
-Performs a coordinate transformation, mapping graph coordinates to
-window coordinates, using the standard X\-axis and Y\-axis.
-Returns a list containing the X\-Y screen coordinates.
-.TP
-\fIpathName \fBxaxis \fIoperation\fR ?\fIarg\fR?...
-.TP
-\fIpathName \fBx2axis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fByaxis \fIoperation\fR ?\fIarg\fR?... 
-.TP
-\fIpathName \fBy2axis \fIoperation\fR ?\fIarg\fR?... 
-See the 
-.SB "AXIS COMPONENTS"
-section.
-.SH "STRIPCHART COMPONENTS"
-A strip chart is composed of several components: coordinate axes, data
-elements, legend, grid, cross hairs, postscript, and annotation
-markers. Instead of one big set of configuration options and
-operations, the strip chart is partitioned, where each component has its own
-configuration options and operations that specifically control that
-aspect or part of the strip chart. 
-.SS "AXIS COMPONENTS"
-Four coordinate axes are automatically created: two X\-coordinate axes
-(\f(CWx\fR and \f(CWx2\fR) and two Y\-coordinate axes (\f(CWy\fR, and
-\f(CWy2\fR).  By default, the axis \f(CWx\fR is located in the bottom
-margin, \f(CWy\fR in the left margin, \f(CWx2\fR in the top margin, and
-\f(CWy2\fR in the right margin.
-.PP
-An axis consists of the axis line, title, major and minor ticks, and
-tick labels.  Major ticks are drawn at uniform intervals along the
-axis.  Each tick is labeled with its coordinate value.  Minor ticks
-are drawn at uniform intervals within major ticks.  
-.PP
-The range of the axis controls what region of data is plotted.
-Data points outside the minimum and maximum limits of the axis are
-not plotted.  By default, the minimum and maximum limits are
-determined from the data, but you can reset either limit.
-.PP
-You can create and use several axes. To create an axis, invoke
-the axis component and its create operation.
-.CS
-# Create a new axis called "temperature"
-\&.s axis create temperature
-.CE
-You map data elements to an axis using the element's \-mapy and \-mapx
-configuration options. They specify the coordinate axes an element
-is mapped onto.
-.CS
-# Now map the temperature data to this axis.
-\&.s element create "temp" \-xdata $x \-ydata $tempData \\
-    \-mapy temperature
-.CE
-While you can have many axes, only four axes can be displayed
-simultaneously.  They are drawn in each of the margins surrounding the
-plotting area.  The axes x and y are drawn in the bottom and left
-margins. The axes x2 and y2 are drawn in top and right margins.
-Only x and y are shown by default. Note that the axes can have
-different scales.
-.PP
-To display a different axis, you invoke one of the following
-components: \fBxaxis\fR, \fByaxis\fR, \fBx2axis\fR, and \fBy2axis\fR.
-The \fBuse\fR operation designates the axis to be drawn in the
-corresponding margin: \fBxaxis\fR in the bottom, \fByaxis\fR in the left, 
-\fBx2axis\fR in the top, and \fBy2axis\fR in the right.
-.CS
-# Display the axis temperature in the left margin.
-\&.s yaxis use temperature
-.CE
-.PP
-You can configure axes in many ways. The axis scale can be linear or
-logarithmic.  The values along the axis can either monotonically
-increase or decrease.  If you need custom tick labels, you can specify
-a Tcl procedure to format the label as you wish.  You can
-control how ticks are drawn, by changing the major tick interval
-or the number of minor ticks.  You can define non-uniform tick intervals,
-such as for time-series plots.
-.PP
-.TP
-\fIpathName \fBaxis \fBcget \fIaxisName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIaxisName\fR.  \fIOption\fR may be any option described below
-for the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBconfigure \fIaxisName \fR?\fIoption value\fR?...
-Queries or modifies the configuration options of \fIaxisName\fR.  If
-\fIoption\fR isn't specified, a list describing all the current
-options for \fIaxisName\fR is returned.  If \fIoption\fR is specified, but
-not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the axis option \fIoption\fR is set to
-\fIvalue\fR.  
-The following options are valid for axes.
-.RS
-.TP
-\fB\-autorange \fIrange\fR 
-Sets the range of values for the axis to \fIrange\fR.  The axis limits
-are automatically reset  to display the most recent data points in this range.  
-If \fIrange\fR is 0.0, the range is
-determined from the limits of the data.  If \fB\-min\fR or \fB-max\fR
-are specified, they override this option.  The default is \f(CW0.0\fR.
-.TP
-\fB\-color \fIcolor\fR
-Sets the color of the axis and tick labels.
-The default is \f(CWblack\fR.
-.TP
-\fB\-command \fIprefix\fR
-Specifies a Tcl command to be invoked when formatting the axis tick
-labels. \fIPrefix\fR is a string containing the name of a Tcl proc and
-any extra arguments for the procedure.  This command is invoked for each
-major tick on the axis.  Two additional arguments are passed to the
-procedure: the pathname of the widget and the current the numeric
-value of the tick.  The procedure returns the formatted tick label.  If
-\f(CW""\fR is returned, no label will appear next to the tick.  You can
-get the standard tick labels again by setting \fIprefix\fR to
-\f(CW""\fR.  The default is \f(CW""\fR.
-.sp 1
-Please note that this procedure is invoked while the strip chart is redrawn.
-You may query the configuration options.  But do not reset them, because 
-this can have unexpected results.
-.TP
-\fB\-descending \fIboolean\fR 
-Indicates whether the values along the axis are monotonically increasing or
-decreasing.  If \fIboolean\fR is true, the axis values will be
-decreasing.  The default is \f(CW0\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the axis is displayed. 
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the axis title should be justified.  This matters only
-when the axis title contains more than one line of text. \fIJustify\fR
-must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-limits \fIformatStr\fR
-Specifies a printf-like description to format the minimum and maximum
-limits of the axis.  The limits are displayed at the top/bottom or
-left/right sides of the plotting area.  \fIFormatStr\fR is a list of
-one or two format descriptions.  If one description is supplied, both
-the minimum and maximum limits are formatted in the same way.  If two,
-the first designates the format for the minimum limit, the second for
-the maximum.  If \f(CW""\fR is given as either description, then 
-the that limit will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the axis and tick lines.  The default is \f(CW1\fR
-pixel.
-.TP
-\fB\-logscale \fIboolean\fR
-Indicates whether the scale of the axis is logarithmic or linear.  If
-\fIboolean\fR is true, the axis is logarithmic.  The default scale is
-linear.
-.TP
-\fB\-loose \fIboolean\fR
-Indicates whether the limits of the axis should fit the data points tightly,
-at the outermost data points, or loosely, at the outer tick intervals.
-This is relevant only when the axis limit is automatically calculated.
-If \fIboolean\fR is true, the axis range is "loose".
-The default is \f(CW0\fR.
-.TP
-\fB\-majorticks \fImajorList\fR
-Specifies where to display major axis ticks.  You can use this option
-to display ticks at non-uniform intervals.  \fIMajorList\fR is a list
-of axis coordinates designating the location of major ticks.  No
-minor ticks are drawn.  If \fImajorList\fR is \f(CW""\fR, 
-major ticks will be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-max \fIvalue\fR
-Sets the maximum limit of \fIaxisName\fR.  Any data point greater 
-than \fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR, 
-the maximum limit is calculated using the largest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-min \fIvalue\fR
-Sets the minimum limit of \fIaxisName\fR. Any data point less than 
-\fIvalue\fR is not displayed.  If \fIvalue\fR is \f(CW""\fR,
-the minimum limit is calculated using the smallest data value.
-The default is \f(CW""\fR.
-.TP
-\fB\-minorticks \fIminorList\fR
-Specifies where to display minor axis ticks.  You can use this option
-to display minor ticks at non-uniform intervals. \fIMinorList\fR is a
-list of real values, ranging from 0.0 to 1.0, designating the placement of
-a minor tick.  No minor ticks are drawn if the \fB\-majortick\fR
-option is also set.  If \fIminorList\fR is \f(CW""\fR, minor ticks will
-be automatically computed. The default is \f(CW""\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the how many degrees to rotate the axis tick labels.
-\fITheta\fR is a real value representing the number of degrees
-to rotate the tick labels.  The default is \f(CW0.0\fR degrees.
-.TP
-\fB\-shiftby \fIvalue\fR
-Specifies how much to automatically shift the range of the axis.
-When the new data exceeds the current axis maximum, the maximum
-is increased in increments of \fIvalue\fR.  You can use this
-option to prevent the axis limits from being recomputed
-at each new time point. If \fIvalue\fR is 0.0, then no automatic
-shifting is done. The default is \f(CW0.0\fR.
-.TP
-\fB\-showticks \fIboolean\fR
-Indicates whether axis ticks should be drawn. If \fIboolean\fR is
-true, ticks are drawn.  If false, only the
-axis line is drawn. The default is \f(CW1\fR.
-.TP
-\fB\-stepsize \fIvalue\fR
-Specifies the interval between major axis ticks.  If \fIvalue\fR isn't
-a valid interval (must be less than the axis range), 
-the request is ignored and the step size is automatically calculated.
-.TP
-\fB\-subdivisions \fInumber\fR 
-Indicates how many minor axis ticks are
-to be drawn.  For example, if \fInumber\fR is two, only one minor
-tick is drawn.  If \fInumber\fR is one, no minor ticks are
-displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-tickfont \fIfontName\fR 
-Specifies the font for axis tick labels. The default is
-\f(CW*-Courier-Bold-R-Normal-*-100-*\fR.
-.TP
-\fB\-ticklength \fIpixels\fR
-Sets the length of major and minor ticks (minor ticks are half the
-length of major ticks). If \fIpixels\fR is less than zero, the axis
-will be inverted with ticks drawn pointing towards the plot.  The
-default is \f(CW0.1i\fR.
-.TP
-\fB\-title \fItext\fR
-Sets the title of the axis. If \fItext\fR is 
-\f(CW""\fR, no axis title will be displayed.  
-.TP
-\fB\-titlecolor \fIcolor\fR
-Sets the color of the axis title. The default is \f(CWblack\fR.
-.TP
-\fB\-titlefont \fIfontName\fR 
-Specifies the font for axis title. The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-14-140-*\fR.
-.PP
-Axis configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWAxis\fR.  The resource names
-are the names of the axes (such as \f(CWx\fR or \f(CWx2\fR).
-.CS
-option add *Stripchart.Axis.Color  blue
-option add *Stripchart.x.LogScale  true
-option add *Stripchart.x2.LogScale false
-.CE
-.RE
-.TP
-\fIpathName \fBaxis \fBcreate \fIaxisName \fR?\fIoption value\fR?...
-Creates a new axis by the name \fIaxisName\fR.  No axis by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the axis \fBconfigure\fR operation.
-.TP
-\fIpathName \fBaxis \fBdelete \fR?\fIaxisName\fR?...
-Deletes the named axes. An axis is not really
-deleted until it is not longer in use, so it's safe to delete
-axes mapped to elements.
-.TP
-\fIpathName \fBaxis invtransform \fIaxisName value\fR
-Performs the inverse transformation, changing the screen coordinate
-\fIvalue\fR to a graph coordinate, mapping the value mapped to
-\fIaxisName\fR.  Returns the graph coordinate.
-.TP
-\fIpathName \fBaxis limits \fIaxisName\fR
-Returns a list of the minimum and maximum limits for \fIaxisName\fR.  The order
-of the list is \f(CWmin max\fR.
-.TP
-\fIpathName \fBaxis names \fR?\fIpattern\fR?...
-Returns a list of axes matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all axes are returned.
-.TP
-\fIpathName \fBaxis transform \fIaxisName value\fR
-Transforms the coordinate \fIvalue\fR to a screen coordinate by mapping
-the it to \fIaxisName\fR.  Returns the transformed screen coordinate.
-.PP
-Only four axes can be displayed simultaneously.  By default, they are
-\f(CWx\fR, \f(CWy\fR, \f(CWx2\fR, and \f(CWy2\fR.  You can swap in a different
-axis with \fBuse\fR operation of the special axis components:
-\fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR.
-.CS
-\&.g create axis temp
-\&.g create axis time
-\&...
-\&.g xaxis use temp
-\&.g yaxis use time
-.CE
-Only the axes specified for use are displayed on the screen.
-.PP
-The \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, and \fBy2axis\fR
-components operate on an axis location rather than a specific axis
-like the more general \fBaxis\fR component does.  The \fBxaxis\fR
-component manages the X-axis located in the bottom margin (whatever
-axis that happens to be).  Likewise, \fByaxis\fR uses the Y-axis in
-the left margin, \fBx2axis\fR the top X-axis, and \fBy2axis\fR the
-right Y-axis.
-.PP
-They implicitly control the axis that is currently using to that
-location.  By default, \fBxaxis\fR uses the \f(CWx\fR axis, \fByaxis\fR
-uses \f(CWy\fR, \fBx2axis\fR uses \f(CWx2\fR, and \fBy2axis\fR uses
-\f(CWy2\fR.  These components can be more convenient to use than always
-determining what axes are current being displayed by the graph.
-.PP
-The following operations are available for axes. They mirror exactly
-the operations of the \fBaxis\fR component.  The \fIaxis\fR argument
-must be \fBxaxis\fR, \fBx2axis\fR, \fByaxis\fR, or \fBy2axis\fR.
-.TP
-\fIpathName \fIaxis \fBcget \fIoption\fR
-.TP
-\fIpathName \fIaxis \fBconfigure \fR?\fIoption value\fR?...
-.TP
-\fIpathName \fIaxis\fB invtransform \fIvalue\fR
-.TP
-\fIpathName \fIaxis \fBlimits\fR
-.TP
-\fIpathName \fIaxis\fB transform \fIvalue\fR
-.TP
-\fIpathName \fIaxis\fB use \fR?\fIaxisName\fR?  
-Designates the axis \fIaxisName\fR is to be displayed at this
-location.  \fIAxisName\fR can not be already in use at another location.  
-This command returns the name of the axis currently using this location.
-.SS "CROSSHAIRS COMPONENT"
-Cross hairs consist of two intersecting lines (one vertical and one horizontal)
-drawn completely across the plotting area.  They are used to position
-the mouse in relation to the coordinate axes.  Cross hairs differ from line
-markers in that they are implemented using XOR drawing primitives.
-This means that they can be quickly drawn and erased without redrawing
-the entire strip chart.
-.PP
-The following operations are available for cross hairs:
-.TP
-\fIpathName \fBcrosshairs cget \fIoption\fR
-Returns the current value of the cross hairs configuration option
-given by \fIoption\fR.  \fIOption\fR may be any option
-described below for the cross hairs \fBconfigure\fR operation.
-.TP
-\fIpathName \fBcrosshairs configure \fR?\fIoption value\fR?...  
-Queries or modifies the configuration options of the cross hairs.  If
-\fIoption\fR isn't specified, a list describing all the current
-options for the cross hairs is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the cross hairs option \fIoption\fR is set to
-\fIvalue\fR.
-The following options are available for cross hairs.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the cross hairs.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the cross hairs. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the cross hair lines.  Each number must be between 1 and
-255.  If \fIdashList\fR is \f(CW""\fR, the cross hairs will be solid
-lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether cross hairs are drawn. If \fIboolean\fR is true,
-cross hairs are not drawn.  The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the cross hair lines.  The default is \f(CW1\fR.
-.TP
-\fB\-position \fIpos\fR 
-Specifies the screen position where the cross hairs intersect.
-\fIPos\fR must be in the form "\fI at x,y\fR", where \fIx\fR and \fIy\fR
-are the window coordinates of the intersection.
-.PP
-Cross hairs configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWcrosshairs\fR and \f(CWCrosshairs\fR respectively.
-.CS
-option add *Stripchart.Crosshairs.LineWidth 2
-option add *Stripchart.Crosshairs.Color     red
-.CE
-.RE
-.TP
-\fIpathName \fBcrosshairs off\fR
-Turns of the cross hairs. 
-.TP
-\fIpathName \fBcrosshairs on\fR
-Turns on the display of the cross hairs.
-.TP
-\fIpathName \fBcrosshairs toggle\fR 
-Toggles the current state of the cross hairs, alternately mapping and
-unmapping the cross hairs.
-.SS "ELEMENT COMPONENTS"
-A data element represents a set of data.  It contains x and y vectors
-containing the coordinates of the data points.  Elements can be
-displayed with a symbol at each data point and lines connecting the
-points.  Elements also control the appearance of the data, such as the
-symbol type, line width, color etc.
-.PP
-When new data elements are created, they are automatically added to a
-list of displayed elements.   The display list controls what elements
-are drawn and in what order.  
-.PP
-The following operations are available for elements.
-.TP
-\fIpathName \fBelement activate \fIelemName \fR?\fIindex\fR?...
-Specifies the data points of element \fIelemName\fR to be drawn
-using active foreground and background colors.  \fIElemName\fR is the
-name of the element and \fIindex\fR is a number representing the index
-of the data point. If no indices are present then all data points
-become active.
-.TP
-\fIpathName \fBelement cget \fIelemName \fIoption\fR
-Returns the current value of the element configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any option described below
-for the element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement closest \fIx y\fR \fIvarName\fR ?\fIoption value\fR?... ?\fIelemName\fR?...
-Finds the data point closest to the window coordinates \fIx\fR and
-\fIy\fR in the element \fIelemName\fR.  \fIElemName\fR is the name of
-an element, that must not be hidden.  If no elements are specified,
-then all visible elements are searched.  It returns via the array
-variable \fIvarName\fR the name of the closest element, the index of
-its closest point, and the graph coordinates of the point. Returns
-\f(CW0\fR, if no data point within the threshold distance can be found,
-otherwise \f(CW1\fR is returned.  The following
-\fIoption\fR\-\fIvalue\fR pairs are available.
-.RS
-.TP
-\fB\-halo \fIpixels\fR
-Specifies a threshold distance where selected data points are ignored.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-If this option isn't specified, then it defaults to the value of the
-stripchart's \fB\-halo\fR option.
-.TP
-\fB\-interpolate \fIboolean\fR
-Indicates that both the data points and interpolated points along
-the line segment formed should be considered.  If \fIboolean\fR 
-is true, the closest line segment will be selected instead of the
-closest point. If this option isn't specified, \fIboolean\fR defaults 
-to \f(CW0\fR.
-.RE
-.TP
-\fIpathName \fBelement configure \fIelemName \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for elements.  If
-\fIoption\fR isn't specified, a list describing all the current
-options for \fIelemName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing the option \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the element option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for elements.
-.RS
-.TP
-\fB\-activepen \fIpenName\fR
-Specifies pen to use to draw active element.  If \fIpenName\fR is
-\f(CW""\fR, no active elements will be drawn.  The default is 
-\f(CWactiveLine\fR.
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the traces connecting the data points.  
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of element line. \fIDashList\fR is a list of up to
-11 numbers that alternately represent the lengths of the dashes and
-gaps on the element line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the lines will be solid.
-.TP
-\fB\-data \fIcoordList\fR
-Specifies the X\-Y coordinates of the data.  \fICoordList\fR is a
-list of numeric expressions representing the X\-Y coordinate pairs
-of each data point.
-.TP
-\fB\-fill \fIcolor\fR 
-Sets the interior color of symbols.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the symbol is transparent.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the element is displayed.  The default is \f(CWno\fR.
-.TP
-\fB\-label \fItext\fR
-Sets the element's label in the legend.  If \fItext\fR
-is \f(CW""\fR, the element will have no entry in the legend.
-The default label is the element's name.
-.TP
-\fB\-linewidth \fIpixels\fR 
-Sets the width of the connecting lines between data points.  If
-\fIpixels\fR is \f(CW0\fR, no connecting lines will be drawn between
-symbols.  The default is \f(CW0\fR.
-.TP
-\fB\-mapx \fIxAxis\fR
-Selects the X\-axis to map the element's X\-coordinates onto.
-\fIXAxis\fR must be the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Selects the Y\-axis to map the element's Y\-coordinates onto.
-\fIYAxis\fR must be the name of an axis. The default is \f(CWy\fR.
-.TP
-\fB\-offdash \fIcolor\fR
-Sets the color of the stripes when traces are dashed (see the
-\fB\-dashes\fR option).  If \fIcolor\fR is \f(CW""\fR, then the "off"
-pixels will represent gaps instead of stripes.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-outline \fIcolor\fR 
-Sets the color or the outline around each symbol.  If \fIcolor\fR is
-\f(CW""\fR, then no outline is drawn. If \fIcolor\fR is \f(CWdefcolor\fR,
-then the color will be the same as the \fB\-color\fR option.  The
-default is \f(CWdefcolor\fR.
-.TP
-\fB\-outlinewidth \fIpixels\fR 
-Sets the width of the outline bordering each symbol.  If \fIpixels\fR
-is \f(CW0\fR, no outline will be drawn. The default is \f(CW1\fR.
-.TP
-\fB\-pixels \fIpixels\fR
-Sets the size of symbols.  If \fIpixels\fR is \f(CW0\fR, no symbols will
-be drawn.  The default is \f(CW0.125i\fR.
-.TP
-\fB\-scalesymbols \fIboolean\fR 
-If \fIboolean\fR is true, the size of the symbols
-drawn for \fIelemName\fR will change with scale of the X\-axis and Y\-axis.
-At the time this option is set, the current ranges of the axes are
-saved as the normalized scales (i.e scale factor is 1.0) and the
-element is drawn at its designated size (see the \fB\-pixels\fR
-option).  As the scale of the axes change, the symbol will be scaled
-according to the smaller of the X\-axis and Y\-axis scales.  If \fIboolean\fR
-is false, the element's symbols are drawn at the designated size,
-regardless of axis scales.  The default is \f(CW0\fR.
-.TP
-\fB\-smooth \fIsmooth\fR 
-Specifies how connecting line segments are drawn between data points.
-\fISmooth\fR can be either \f(CWlinear\fR, \f(CWstep\fR, \f(CWnatural\fR, or
-\f(CWquadratic\fR.  If \fIsmooth\fR is \f(CWlinear\fR, a single line
-segment is drawn, connecting both data points. When \fIsmooth\fR is
-\f(CWstep\fR, two line segments are drawn. The first is a horizontal
-line segment which steps the next x-coordinate.  The second is a
-vertical line, moving to the next y-coordinate.  Both \fInatural\fR and
-\fIquadratic\fR generate multiple segments between data points.  If
-\fInatural\fR, the segments are generated using a cubic spline.  If
-\fIquadratic\fR, a quadratic spline is used.  The default is
-\fIlinear\fR.
-.TP
-\fB\-styles \fIstyleList\fR 
-Specifies what pen to use based upon the range of weights given.
-\fIStyleList\fR is a list of style specifications. Each style
-specification, in turn, is a list consisting of a pen name, and
-optionally a minimum and maximum range.  Data points whose weight (see
-the \fB\-weight\fR option) falls in this range, are drawn with this
-pen.  If no range is specified it defaults to the number of the pen in
-the list. 
-.TP
-\fB\-symbol \fIsymbol\fR 
-Specifies the symbol for data points.  \fISymbol\fR can be either
-\f(CWsquare\fR, \f(CWcircle\fR, \f(CWdiamond\fR, \f(CWplus\fR, \f(CWcross\fR,
-\f(CWsplus\fR, \f(CWscross\fR, \f(CWtriangle\fR, \f(CW""\fR (where no symbol
-is drawn), or a bitmap.  Bitmaps are specified as "\fIsource\fR
-?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
-\fImask\fR is the bitmap's optional mask.  The default is
-\f(CWcircle\fR.
-.TP
-\fB\-weights \fIwVec\fR 
-Specifies the weights of the individual data points.  This, in
-conjunction with the list pen styles (see the \fB\-styles\fR option)
-controls how data points are drawn.  \fIWVec\fR is the name of a BLT
-vector or a list of numeric expressions representing the weights for
-each data point.
-.TP
-\fB\-xdata \fIxVec\fR 
-Specifies the x-coordinates of the data.  \fIXVec\fR is the name of
-a BLT vector or a list of numeric expressions.
-.TP
-\fB\-ydata \fIyVec\fR 
-Specifies the y-coordinates of the data.  \fIYVec\fR is the name of
-a BLT vector or a list of numeric expressions.
-.PP
-Element configuration options may also be set by the \fBoption\fR
-command.  The resource class is \f(CWElement\fR. The resource name is
-the name of the element.
-.CS
-option add *Stripchart.Element.symbol line
-option add *Stripchart.e1.symbol line
-.CE
-.RE
-.TP
-\fIpathName \fBelement create \fIelemName\fR ?\fIoption value\fR?...
-Creates a new element \fIelemName\fR.  It's an error is
-an element \fIelemName\fR already exists.  If
-additional arguments are present, they specify options valid for 
-element \fBconfigure\fR operation.
-.TP
-\fIpathName \fBelement deactivate \fIelemName\fR ?\fIelemName\fR?...
-Deactivates all the elements matching \fIpattern\fR.
-Elements whose names match any of the patterns given are redrawn using
-their normal colors.
-.TP
-\fIpathName \fBelement delete\fR ?\fIelemName\fR?...
-Deletes all the named elements.  The graph is automatically redrawn.
-.TP
-\fIpathName \fBelement exists \fIelemName\fR
-Returns \f(CW1\fR if an element \fIelemName\fR currently exists and \f(CW0\fR otherwise.
-.TP
-\fIpathName \fBelement names \fR?\fIpattern\fR?...  
-Returns the elements matching one or more pattern.  If no
-\fIpattern\fR is given, the names of all elements is returned.
-.TP
-\fIpathName \fBelement show\fR ?\fInameList\fR?  
-Queries or modifies the element display list.  The element display
-list designates the elements drawn and in what
-order. \fINameList\fR is a list of elements to be displayed in the
-order they are named.  If there is no \fInameList\fR argument,
-the current display list is returned.
-.TP
-\fIpathName \fBelement type\fR \fIelemName\fR
-Returns the type of \fIelemName\fR. 
-If the element is a bar element, the commands returns the string
-\f(CW"bar"\fR, otherwise it returns \f(CW"line"\fR.
-.CE
-.SS "GRID COMPONENT"
-Grid lines extend from the major and minor ticks of each axis
-horizontally or vertically across the plotting area.  The following
-operations are available for grid lines.
-.TP
-\fIpathName \fBgrid cget \fIoption\fR
-Returns the current value of the grid line configuration option given by 
-\fIoption\fR.  \fIOption\fR may be any option described below
-for the grid \fBconfigure\fR operation.
-.TP
-\fIpathName \fBgrid configure\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for grid lines.  If
-\fIoption\fR isn't specified, a list describing all the current
-grid options for \fIpathName\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the grid line option \fIoption\fR is set to
-\fIvalue\fR.  The following options are valid for grid lines.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the grid lines.  The default is \f(CWblack\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the grid lines. \fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the grid lines.  Each number must be between 1 and 255.
-If \fIdashList\fR is \f(CW""\fR, the grid will be solid lines.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the grid should be drawn. If \fIboolean\fR
-is true, grid lines are not shown. The default is \f(CWyes\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of grid lines.  The default width is \f(CW1\fR.
-.TP
-\fB\-mapx \fIxAxis\fR
-Specifies the X\-axis to display grid lines.  \fIXAxis\fR
-must be the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to display grid lines.  \fIYAxis\fR
-must be the name of an axis. The default is \f(CWy\fR.
-.TP
-\fB\-minor \fIboolean\fR
-Indicates whether the grid lines should be drawn for minor ticks. 
-If \fIboolean\fR is true, the lines will appear at
-minor tick intervals.  The default is \f(CW1\fR.
-.PP
-Grid configuration options may also be set by the 
-\fBoption\fR command.  The resource name and class are \f(CWgrid\fR and 
-\f(CWGrid\fR respectively. 
-.CS
-option add *Stripchart.grid.LineWidth 2
-option add *Stripchart.Grid.Color     black
-.CE
-.RE
-.TP
-\fIpathName \fBgrid off\fR
-Turns off the display the grid lines.
-.TP
-\fIpathName \fBgrid on\fR
-Turns on the display the grid lines.
-.TP
-\fIpathName \fBgrid toggle\fR
-Toggles the display of the grid.  
-.SS "LEGEND COMPONENT"
-The legend displays a list of the data elements.  Each entry consists
-of the element's symbol and label.  The legend can appear in any
-margin (the default location is in the right margin).  It
-can also be positioned anywhere within the plotting area.
-.PP
-The following operations are valid for the legend.
-.TP
-\fIpathName \fBlegend activate \fIpattern\fR...
-Selects legend entries to be drawn using the active legend colors and relief.
-All entries whose element names match \fIpattern\fR  are selected.  To
-be selected, the element name must match only one \fIpattern\fR. 
-.TP
-\fIpathName \fBlegend cget \fIoption\fR
-Returns the current value of a legend configuration option.
-\fIOption\fR may be any option described below in the
-legend \fBconfigure\fR operation.
-.TP
-\fIpathName \fBlegend configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for the legend.  If
-\fIoption\fR isn't specified, a list describing the current
-legend options for \fIpathName\fR is returned.  If \fIoption\fR is
-specified, but not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the legend option \fIoption\fR is set
-to \fIvalue\fR.  The following options are valid for the legend.
-.RS
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active legend entries.  All legend
-entries marked active (see the legend \fBactivate\fR operation) are
-drawn using this background color.
-.TP
-\fB\-activeborderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the active legend
-entries.  The default is \f(CW2\fR.
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color for active legend entries.  All legend
-entries marked as active (see the legend \fBactivate\fR operation) are
-drawn using this foreground color.
-.TP
-\fB\-activerelief \fIrelief\fR 
-Specifies the 3-D effect desired for active legend entries.
-\fIRelief\fR denotes how the interior of the entry should appear
-relative to the legend; for example, \f(CWraised\fR means the entry
-should appear to protrude from the legend, relative to the surface of
-the legend.  The default is \f(CWflat\fR.
-.TP
-\fB\-anchor \fIanchor\fR
-Tells how to position the legend relative to the positioning point for
-the legend.  This is dependent on the value of the \fB\-position\fR
-option.  The default is \f(CWcenter\fR.
-.RS
-.TP 1.25i
-\f(CWleft\fR or \f(CWright\fR
-The anchor describes how to position the legend vertically.  
-.TP
-\f(CWtop\fR or \f(CWbottom\fR
-The anchor describes how to position the legend horizontally.  
-.TP
-\f(CW at x,y\fR
-The anchor specifies how to position the legend relative to the
-positioning point. For example, if \fIanchor\fR is \f(CWcenter\fR then
-the legend is centered on the point; if \fIanchor\fR is \f(CWn\fR then
-the legend will be drawn such that the top center point of the
-rectangular region occupied by the legend will be at the positioning
-point.
-.TP
-\f(CWplotarea\fR
-The anchor specifies how to position the legend relative to the
-plotting area. For example, if \fIanchor\fR is \f(CWcenter\fR then the
-legend is centered in the plotting area; if \fIanchor\fR is \f(CWne\fR
-then the legend will be drawn such that occupies the upper right
-corner of the plotting area.
-.RE
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the legend. If \fIcolor\fR is \f(CW""\fR,
-the legend background with be transparent.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3-D border around the outside edge of the legend (if
-such border is being drawn; the \fBrelief\fR option determines this).
-The default is \f(CW2\fR pixels.
-.TP
-\fB\-font \fIfontName\fR 
-\fIFontName\fR specifies a font to use when drawing the labels of each
-element into the legend.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of the text drawn for the element's label.
-The default is \f(CWblack\fR.
-.TP
-\fB\-hide \fIboolean\fR
-Indicates whether the legend should be displayed. If \fIboolean\fR is
-true, the legend will not be draw.  The default is \f(CWno\fR.
-.TP
-\fB\-ipadx \fIpad\fR 
-Sets the amount of internal padding to be added to the width of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the left side of the legend entry is
-padded by the first distance and the right side by the second.  If
-\fIpad\fR is just one distance, both the left and right sides are padded
-evenly.  The default is \f(CW2\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets an amount of internal padding to be added to the height of each
-legend entry.  \fIPad\fR can be a list of one or two screen distances.  If
-\fIpad\fR has two elements, the top of the entry is padded by the
-first distance and the bottom by the second.  If \fIpad\fR is just
-one distance, both the top and bottom of the entry are padded evenly.
-The default is \f(CW2\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the legend.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the legend is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the legend.  \fIPad\fR can be a list
-of one or two screen distances.  If \fIpad\fR has two elements, the area above
-the legend is padded by the first distance and the area below by the
-second.  If \fIpad\fR is just one distance, both the top and
-bottom areas are padded evenly.  The default is \f(CW0\fR.
-.TP
-\fB\-position \fIpos\fR
-Specifies where the legend is drawn. The
-\fB\-anchor\fR option also affects where the legend is positioned.  If
-\fIpos\fR is \f(CWleft\fR, \f(CWleft\fR, \f(CWtop\fR, or \f(CWbottom\fR, the
-legend is drawn in the specified margin.  If \fIpos\fR is
-\f(CWplotarea\fR, then the legend is drawn inside the plotting area at a
-particular anchor.  If \fIpos\fR is in the form "\fI at x,y\fR", where
-\fIx\fR and \fIy\fR are the window coordinates, the legend is drawn in
-the plotting area at the specified coordinates.  The default is
-\f(CWright\fR.
-.TP
-\fB\-raised \fIboolean\fR
-Indicates whether the legend is above or below the data elements.  This
-matters only if the legend is in the plotting area.  If \fIboolean\fR
-is true, the legend will be drawn on top of any elements that may
-overlap it. The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the border around the legend.
-\fIRelief\fR specifies how the interior of the legend should appear
-relative to the strip chart; for example, \f(CWraised\fR means the legend
-should appear to protrude from the strip chart, relative to the surface of
-the strip chart.  The default is \f(CWsunken\fR.
-.PP
-Legend configuration options may also be set by the \fBoption\fR
-command.  The resource name and class are \f(CWlegend\fR and
-\f(CWLegend\fR respectively.
-.CS
-option add *Stripchart.legend.Foreground blue
-option add *Stripchart.Legend.Relief     raised
-.CE
-.RE
-.TP
-\fIpathName \fBlegend deactivate \fIpattern\fR...
-Selects legend entries to be drawn using the normal legend colors and
-relief.  All entries whose element names match \fIpattern\fR are
-selected.  To be selected, the element name must match only one
-\fIpattern\fR.
-.TP
-\fIpathName \fBlegend get \fIpos\fR
-Returns the name of the element whose entry is at the screen position
-\fIpos\fR in the legend.  \fIPos\fR must be in the form "\fI at x,y\fR",
-where \fIx\fR and \fIy\fR are window coordinates.  If the given
-coordinates do not lie over a legend entry, \f(CW""\fR is returned.
-.SS "PEN COMPONENTS"
-Pens define attributes (both symbol and line style) for elements.
-Pens mirror the configuration options of data elements that pertain to
-how symbols and lines are drawn.  Data elements use pens to determine
-how they are drawn.  A data element may use several pens at once.  In
-this case, the pen used for a particular data point is determined from
-each element's weight vector (see the element's \fB\-weight\fR and
-\fB\-style\fR options).
-.PP
-One pen, called \f(CWactiveLine\fR, is automatically created.
-It's used as the default active pen for elements. So you can change
-the active attributes for all elements by simply reconfiguring this
-pen.
-.CS
-\&.s pen configure "activeLine" -color green
-.CE
-You can create and use any number of pens. To create a pen, invoke
-the pen component and its create operation.
-.CS
-\&.s pen create myPen
-.CE
-You map pens to a data element using either the element's 
-\fB\-pen\fR or \fB\-activepen\fR options.
-.CS
-\&.s element create "line1" -xdata $x -ydata $tempData \\
-    -pen myPen
-.CE
-An element can use several pens at once. This is done by specifying
-the name of the pen in the element's style list (see the
-\fB\-styles\fR option).
-.CS
-\&.s element configure "line1" -styles { myPen 2.0 3.0 }
-.CE
-This says that any data point with a weight between 2.0 and 3.0
-is to be drawn using the pen \f(CWmyPen\fR.  All other points
-are drawn with the element's default attributes.
-.PP
-The following operations are available for pen components.
-.PP
-.TP
-\fIpathName \fBpen \fBcget \fIpenName \fIoption\fR
-Returns the current value of the option given by \fIoption\fR for
-\fIpenName\fR.  \fIOption\fR may be any option described below
-for the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBconfigure \fIpenName \fR?\fIoption value\fR?...
-Queries or modifies the configuration options of \fIpenName\fR.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fIpenName\fR is returned.  If \fIoption\fR is specified, but
-not \fIvalue\fR, then a list describing \fIoption\fR is
-returned.  If one or more \fIoption\fR and \fIvalue\fR pairs are
-specified, then for each pair, the pen option \fIoption\fR is set to
-\fIvalue\fR.  
-The following options are valid for pens.
-.RS
-.TP
-\fB\-color \fIcolor\fR 
-Sets the color of the traces connecting the data points.  
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of element line. \fIDashList\fR is a list of up to
-11 numbers that alternately represent the lengths of the dashes and
-gaps on the element line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the lines will be solid.
-.TP
-\fB\-fill \fIcolor\fR 
-Sets the interior color of symbols.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the symbol is transparent.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-linewidth \fIpixels\fR 
-Sets the width of the connecting lines between data points.  If
-\fIpixels\fR is \f(CW0\fR, no connecting lines will be drawn between
-symbols.  The default is \f(CW0\fR.
-.TP
-\fB\-offdash \fIcolor\fR
-Sets the color of the stripes when traces are dashed (see the
-\fB\-dashes\fR option).  If \fIcolor\fR is \f(CW""\fR, then the "off"
-pixels will represent gaps instead of stripes.  If \fIcolor\fR is
-\f(CWdefcolor\fR, then the color will be the same as the \fB\-color\fR
-option.  The default is \f(CWdefcolor\fR.
-.TP
-\fB\-outline \fIcolor\fR 
-Sets the color or the outline around each symbol.  If \fIcolor\fR is
-\f(CW""\fR, then no outline is drawn. If \fIcolor\fR is \f(CWdefcolor\fR,
-then the color will be the same as the \fB\-color\fR option.  The
-default is \f(CWdefcolor\fR.
-.TP
-\fB\-outlinewidth \fIpixels\fR 
-Sets the width of the outline bordering each symbol.  If \fIpixels\fR
-is \f(CW0\fR, no outline will be drawn. The default is \f(CW1\fR.
-.TP
-\fB\-pixels \fIpixels\fR
-Sets the size of symbols.  If \fIpixels\fR is \f(CW0\fR, no symbols will
-be drawn.  The default is \f(CW0.125i\fR.
-.TP
-\fB\-symbol \fIsymbol\fR 
-Specifies the symbol for data points.  \fISymbol\fR can be either
-\f(CWsquare\fR, \f(CWcircle\fR, \f(CWdiamond\fR, \f(CWplus\fR, \f(CWcross\fR,
-\f(CWsplus\fR, \f(CWscross\fR, \f(CWtriangle\fR, \f(CW""\fR (where no symbol
-is drawn), or a bitmap.  Bitmaps are specified as "\fIsource\fR
-?\fImask\fR?", where \fIsource\fR is the name of the bitmap, and
-\fImask\fR is the bitmap's optional mask.  The default is
-\f(CWcircle\fR.
-.TP
-\fB\-type \fIelemType\fR 
-Specifies the type of element the pen is to be used with.
-This option should only be employed when creating the pen.  This
-is for those that wish to mix different types of elements (bars and
-lines) on the same graph.  The default type is "line".
-.PP
-Pen configuration options may be also be set by the \fBoption\fR
-command.  The resource class is \f(CWPen\fR.  The resource names
-are the names of the pens.
-.CS
-option add *Stripchart.Pen.Color  blue
-option add *Stripchart.activeLine.color  green
-.CE
-.RE
-.TP
-\fIpathName \fBpen \fBcreate \fIpenName \fR?\fIoption value\fR?...
-Creates a new pen by the name \fIpenName\fR.  No pen by the same
-name can already exist. \fIOption\fR and \fIvalue\fR are described 
-in above in the pen \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpen \fBdelete \fR?\fIpenName\fR?...
-Deletes the named pens. A pen is not really
-deleted until it is not longer in use, so it's safe to delete
-pens mapped to elements.
-.TP
-\fIpathName \fBpen names \fR?\fIpattern\fR?...
-Returns a list of pens matching zero or more patterns.  If no
-\fIpattern\fR argument is give, the names of all pens are returned.
-.SS "POSTSCRIPT COMPONENT"
-The strip chart can generate encapsulated PostScript output.  There
-are several configuration options you can specify to control how the
-plot is generated.  You can change the page dimensions and
-borders.  The plot itself can be scaled, centered, or rotated to
-landscape.  The PostScript output can be written directly to a file or
-returned through the interpreter.
-.PP
-The following postscript operations are available.
-.TP
-\fIpathName \fBpostscript cget \fIoption\fR 
-Returns the current value of the postscript option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below for the postscript \fBconfigure\fR operation.
-.TP
-\fIpathName \fBpostscript configure \fR?\fIoption value\fR?...
-Queries or modifies the configuration options for PostScript
-generation.  If \fIoption\fR isn't specified, a list describing 
-the current postscript options for \fIpathName\fR is returned.  If
-\fIoption\fR is specified, but not \fIvalue\fR, then a list describing
-\fIoption\fR is returned.  If one or more \fIoption\fR and \fIvalue\fR
-pairs are specified, then for each pair, the postscript option
-\fIoption\fR is set to \fIvalue\fR.  The following postscript options
-are available.
-.RS
-.TP
-\fB\-center \fIboolean\fR
-Indicates whether the plot should be centered on the PostScript page.  If
-\fIboolean\fR is false, the plot will be placed in the upper left
-corner of the page.  The default is \f(CW1\fR.
-.TP
-\fB\-colormap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a color mapping from the X color name to PostScript.  Each
-element of \fIvarName\fR must consist of PostScript code to set a
-particular color value (e.g. ``\f(CW1.0 1.0 0.0 setrgbcolor\fR'').  When
-outputting color information in PostScript, the array variable \fIvarName\fR 
-is checked to see if an element of the name of the color exists. If so, 
-it uses the value of the element as the PostScript
-command to set the color.  If this option hasn't been specified, or if
-there isn't an entry in \fIvarName\fR for a given color, then it uses
-the red, green, and blue intensities from the X color.
-.TP
-\fB\-colormode \fImode\fR
-Specifies how to output color information.  \fIMode\fR must be either
-\f(CWcolor\fR (for full color output), \f(CWgray\fR (convert all colors to
-their gray-scale equivalents) or \f(CWmono\fR (convert foreground colors
-to black and background colors to white).  The default mode is
-\f(CWcolor\fR. 
-.TP
-\fB\-fontmap \fIvarName\fR
-\fIVarName\fR must be the name of a global array variable that
-specifies a font mapping from the X font name to PostScript.  Each
-element of \fIvarName\fR must consist of a Tcl list with one or two
-elements, which are the name and point size of a PostScript font.
-When outputting PostScript commands for a particular font, the 
-array variable \fIvarName\fR is checked to see an element of the specified 
-font exists.  If there is such an element, then the font
-information contained in that element is used in the PostScript
-output.  (If the point size is omitted from the list, the point size
-of the X font is used).  Otherwise the X font is examined in an
-attempt to guess what PostScript font to use.  This works only for
-fonts whose foundry property is \fIAdobe\fR (such as Times, Helvetica,
-Courier, etc.).  If all of this fails then the font defaults to
-\f(CWHelvetica-Bold\fR.
-.TP
-\fB\-decorations \fIboolean\fR
-Indicates if PostScript commands to generate color backgrounds and 3-D
-borders should be output.  If \fIboolean\fR is false, the background will 
-be white and no 3-D borders will be generated. The
-default is \f(CW1\fR.
-.TP
-\fB\-height \fIpixels\fR
-Sets the height of the plot.  This lets you plot the stripchart with a
-height different from the one displayed on the screen.  If
-\fIpixels\fR is 0, the height is the same as the displayed height.
-The default is \f(CW0\fR.
-.TP
-\fB\-landscape \fIboolean\fR
-If \fIboolean\fR is true, this specifies the printed area is to be
-rotated 90 degrees.  In non-rotated output the X-axis of the printed
-area runs along the short dimension of the page (``portrait''
-orientation); in rotated output the X-axis runs along the long
-dimension of the page (``landscape'' orientation).  Defaults to
-\f(CW0\fR.
-.TP
-\fB\-maxpect \fIboolean\fR
-Indicates to scale the the plot so that it fills the PostScript page.
-The aspect ratio of the strip chart is still retained.  The default is
-\f(CW0\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the horizontal padding for the left and right page borders.  The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the left border is padded
-by the first distance and the right border by the second.  If
-\fIpad\fR has just one distance, both the left and right borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-pady \fIpad\fR 
-Sets the vertical padding for the top and bottom page borders. The
-borders are exterior to the plot.  \fIPad\fR can be a list of one or
-two screen distances.  If \fIpad\fR has two elements, the top border is padded
-by the first distance and the bottom border by the second.  If
-\fIpad\fR has just one distance, both the top and bottom borders are
-padded evenly.  The default is \f(CW1i\fR.
-.TP
-\fB\-paperheight \fIpixels\fR
-Sets the height of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default height is
-\f(CW11.0i\fR.
-.TP
-\fB\-paperwidth \fIpixels\fR
-Sets the width of the postscript page.  This can be used to select
-between different page sizes (letter, A4, etc).  The default width is
-\f(CW8.5i\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the width of the plot.  This lets you plot the strip chart with a
-width different from the one drawn on the screen.  If \fIpixels\fR
-is 0, the width is the same as the widget's width.  The default is
-\f(CW0\fR.
-.PP
-Postscript configuration options may be also be set by the
-\fBoption\fR command.  The resource name and class are
-\f(CWpostscript\fR and \f(CWPostscript\fR respectively.
-.CS
-option add *Stripchart.postscript.Decorations false
-option add *Stripchart.Postscript.Landscape   true
-.CE
-.RE
-.TP
-\fIpathName \fBpostscript output \fR?\fIfileName\fR? ?\fIoption value\fR?...
-Outputs a file of encapsulated PostScript.  If a
-\fIfileName\fR argument isn't present, the command returns the
-PostScript. If any \fIoption-value\fR pairs are present, they set
-configuration options controlling how the PostScript is generated.
-\fIOption\fR and \fIvalue\fR can be anything accepted by the
-postscript \fBconfigure\fR operation above.
-.SS "MARKER COMPONENTS"
-Markers are simple drawing procedures used to annotate or highlight
-areas of the strip chart.  Markers have various types: text strings,
-bitmaps, images, connected lines, windows, or polygons.  They can be
-associated with a particular element, so that when the element is
-hidden or un-hidden, so is the marker.  By default, markers are the
-last items drawn, so that data elements will appear in
-behind them.  You can change this by configuring the \fB\-under\fR
-option.
-.PP
-Markers, in contrast to elements, don't affect the scaling of the
-coordinate axes.  They can also have \fIelastic\fR coordinates
-(specified by \f(CW-Inf\fR and \f(CWInf\fR respectively) that translate
-into the minimum or maximum limit of the axis.  For example, you can
-place a marker so it always remains in the lower left corner of the
-plotting area, by using the coordinates \f(CW-Inf\fR,\f(CW-Inf\fR.
-.PP
-The following operations are available for markers.
-.TP
-\fIpathName \fBmarker after \fImarkerId\fR ?\fIafterId\fR?
-Changes the order of the markers, drawing the first
-marker after the second.  If no second \fIafterId\fR argument is
-specified, the marker is placed at the end of the display list.  This
-command can be used to control how markers are displayed since markers
-are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker before \fImarkerId\fR ?\fIbeforeId\fR?
-Changes the order of the markers, drawing the first
-marker before the second.  If no second \fIbeforeId\fR argument is
-specified, the marker is placed at the beginning of the display list.
-This command can be used to control how markers are displayed since
-markers are drawn in the order of this display list.
-.TP
-\fIpathName \fBmarker cget \fIoption\fR
-Returns the current value of the marker configuration option given by
-\fIoption\fR.  \fIOption\fR may be any option described
-below in the \fBconfigure\fR operation.
-.TP
-\fIpathName \fBmarker configure \fImarkerId\fR ?\fIoption value\fR?...
-Queries or modifies the configuration options for markers.  If
-\fIoption\fR isn't specified, a list describing the current
-options for \fImarkerId\fR is returned.  If \fIoption\fR is specified,
-but not \fIvalue\fR, then a list describing \fIoption\fR is returned.
-If one or more \fIoption\fR and \fIvalue\fR pairs are specified, then
-for each pair, the marker option \fIoption\fR is set to \fIvalue\fR.
-.sp
-The following options are valid for all markers.
-Each type of marker also has its own type-specific options.  
-They are described in the sections below.
-.RS
-.TP
-\fB\-coords \fIcoordList\fR
-Specifies the coordinates of the marker.  \fICoordList\fR is 
-a list of graph coordinates.  The number of coordinates required
-is dependent on the type of marker.  Text, image, and window markers
-need only two coordinates (an X\-Y coordinate).   Bitmap markers
-can take either two or four coordinates (if four, they represent the
-corners of the bitmap). Line markers
-need at least four coordinates, polygons at least six.
-If \fIcoordList\fR is \f(CW""\fR, the marker will not be displayed.
-The default is \f(CW""\fR.
-.TP
-\fB\-element \fIelemName\fR
-Links the marker with the element \fIelemName\fR.  The marker is
-drawn only if the element is also currently displayed (see the
-element's \fBshow\fR operation).  If \fIelemName\fR is \f(CW""\fR, the
-marker is always drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-hide \fIboolean\fR 
-Indicates whether the marker is drawn. If \fIboolean\fR is true,
-the marker is not drawn.  The default is \f(CWno\fR.
-.TP
-\fB\-mapx \fIxAxis\fR 
-Specifies the X\-axis to map the marker's X\-coordinates onto.
-\fIXAxis\fR must the name of an axis.  The default is \f(CWx\fR.
-.TP
-\fB\-mapy \fIyAxis\fR
-Specifies the Y\-axis to map the marker's Y\-coordinates onto.
-\fIYAxis\fR must the name of an axis.  The default is \f(CWy\fR.
-.TP
-\fB\-name \fImarkerId\fR
-Changes the identifier for the marker.  The identifier \fImarkerId\fR 
-can not already be used by another marker.  If this option
-isn't specified, the marker's name is uniquely generated.
-.TP
-\fB\-under \fIboolean\fR
-Indicates whether the marker is drawn below/above data
-elements.  If \fIboolean\fR is true, the marker is be drawn
-underneath the data element symbols and lines.  Otherwise, the marker is
-drawn on top of the element.  The default is \f(CW0\fR.
-.TP
-\fB\-xoffset \fIpixels\fR
-Specifies a screen distance to offset the marker horizontally. 
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.TP
-\fB\-yoffset \fIpixels\fR
-Specifies a screen distance to offset the markers vertically.
-\fIPixels\fR is a valid screen distance, such as \f(CW2\fR or \f(CW1.2i\fR.
-The default is \f(CW0\fR.
-.PP
-Marker configuration options may also be set by the \fBoption\fR command.
-The resource class is either \f(CWBitmapMarker\fR,  \f(CWImageMarker\fR, 
-\f(CWLineMarker\fR, \f(CWPolygonMarker\fR, \f(CWTextMarker\fR, or \f(CWWindowMarker\fR,
-depending on the type of marker.  The resource name is the name of the
-marker.
-.CS
-option add *Stripchart.TextMarker.Foreground white
-option add *Stripchart.BitmapMarker.Foreground white
-option add *Stripchart.m1.Background     blue
-.CE
-.RE
-.TP
-\fIpathName \fBmarker create \fItype\fR ?\fIoption value\fR?...
-Creates a marker of the selected type. \fIType\fR may be either
-\f(CWtext\fR, \f(CWline\fR, \f(CWbitmap\fR, \f(CWimage\fR, \f(CWpolygon\fR, or
-\f(CWwindow\fR.  This command returns the marker identifier, 
-used as the \fImarkerId\fR argument in the other marker-related
-commands.  If the \fB\-name\fR option is used, this overrides the
-normal marker identifier.  If the name provided is already used for
-another marker, the new marker will replace the old.
-.TP
-\fIpathName \fBmarker delete\fR ?\fIname\fR?...
-Removes one of more markers.  The graph will automatically be redrawn
-without the marker.\fR.  
-.TP
-\fIpathName \fBmarker exists \fImarkerId\fR 
-Returns \f(CW1\fR if the marker \fImarkerId\fR exists and \f(CW0\fR
-otherwise.
-.TP
-\fIpathName \fBmarker names\fR ?\fIpattern\fR?  
-Returns the names of all the markers that currently exist.  If
-\fIpattern\fR is supplied, only those markers whose names match it
-will be returned.
-.TP
-\fIpathName \fBmarker type \fImarkerId\fR 
-Returns the type of the marker given by \fImarkerId\fR, such as
-\f(CWline\fR or \f(CWtext\fR.  If \fImarkerId\fR is not a valid a marker
-identifier, \f(CW""\fR is returned.
-.SS "BITMAP MARKERS"
-A bitmap marker displays a bitmap.  The size of the
-bitmap is controlled by the number of coordinates specified.  If two
-coordinates, they specify the position of the top-left corner of the
-bitmap.  The bitmap retains its normal width and height.  If four
-coordinates, the first and second pairs of coordinates represent the
-corners of the bitmap.  The bitmap will be stretched or reduced as
-necessary to fit into the bounding rectangle.
-.PP
-Bitmap markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create bitmap \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, each 
-sets a configuration options for the marker.  These
-same \fIoption\fR\-\fIvalue\fR pairs may be used with the marker's
-\fBconfigure\fR operation.
-.PP
-The following options are specific to bitmap markers:
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the bitmap.  If \fIcolor\fR is \f(CW""\fR,
-the background color will be transparent.  The default background
-color is \f(CWwhite\fR.
-.TP
-\fB\-bitmap \fIbitmap\fR
-Specifies the bitmap to be displayed.  If \fIbitmap\fR is \f(CW""\fR,
-the marker will not be displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of the bitmap.  The default foreground color
-is \f(CWblack\fR.
-.TP
-\fB\-mask \fImask\fR
-Specifies a mask for the bitmap to be displayed. This mask is a bitmap
-itself, denoting the pixels that are transparent.  If \fImask\fR is
-\f(CW""\fR, all pixels of the bitmap will be drawn.  The default is
-\f(CW""\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Sets the rotation of the bitmap.  \fITheta\fR is a real number
-representing the angle of rotation in degrees.  The marker is first
-rotated and then placed according to its anchor position.  The default
-rotation is \f(CW0.0\fR.
-.SS "IMAGE MARKERS"
-A image marker displays an image.  Image markers are
-created with the marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create image \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to image markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the image relative to the
-positioning point for the image. For example, if \fIanchor\fR
-is \f(CWcenter\fR then the image is centered on the point;  if
-\fIanchor\fR is \f(CWn\fR then the image will be drawn such that
-the top center point of the rectangular region occupied by the
-image will be at the positioning point.
-This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-image \fIimage\fR
-Specifies the image to be drawn.
-If \fIimage\fR is \f(CW""\fR, the marker will not be
-drawn.  The default is \f(CW""\fR.
-.SS "LINE MARKERS"
-A line marker displays one or more connected line segments.
-Line markers are created with marker's \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create line \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR operation.
-.PP
-The following options are specific to line markers:
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the line.
-The option is affects the line color only when the \fB\-stipple\fR option 
-is set.  
-If this option isn't specified then it defaults to \f(CWwhite\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the line. \fIDashList\fR is a list of up to 11
-numbers that alternately represent the lengths of the dashes and gaps
-on the line.  Each number must be between 1 and 255.  If
-\fIdashList\fR is \f(CW""\fR, the marker line will be solid.
-.TP
-\fB\-foreground \fIcolor\fR
-Sets the foreground color.  The default foreground color is \f(CWblack\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the lines.
-The default width is \f(CW0\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern used to draw the line, rather than
-a solid line.
-\fIBitmap\fR specifies a bitmap to use as the stipple
-pattern.  If \fIbitmap\fR is \f(CW""\fR, then the
-line is drawn in a solid fashion. The default is \f(CW""\fR.
-.SS "POLYGON MARKERS"
-A polygon marker displays a closed region described as two or more
-connected line segments.  It is assumed the first and
-last points are connected.  Polygon markers are created using the
-marker \fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create polygon \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the \fBmarker configure\fR command to change the marker's
-configuration.
-The following options are supported for polygon markers:
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the outline of the polygon. \fIDashList\fR is a
-list of up to 11 numbers that alternately represent the lengths of
-the dashes and gaps on the outline.  Each number must be between 1 and
-255. If \fIdashList\fR is \f(CW""\fR, the outline will be a solid line.
-.TP
-\fB\-fill \fIcolor\fR
-Sets the fill color of the polygon.  If \fIcolor\fR is \f(CW""\fR, then
-the interior of the polygon is transparent.
-The default is \f(CWwhite\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Sets the width of the outline of the polygon. If \fIpixels\fR is zero, 
-no outline is drawn. The default is \f(CW0\fR.
-.TP
-\fB\-outline \fIcolor\fR
-Sets the color of the outline of the polygon.  If the polygon is
-stippled (see the \fB\-stipple\fR option), then this represents the
-foreground color of the stipple.  The default is \f(CWblack\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies that the polygon should be drawn with a stippled pattern
-rather than a solid color. \fIBitmap\fR specifies a bitmap to use as
-the stipple pattern.  If \fIbitmap\fR is \f(CW""\fR, then the polygon is
-filled with a solid color (if the \fB\-fill\fR option is set).  The
-default is \f(CW""\fR.
-.SS "TEXT MARKERS"
-A text marker displays a string of characters on one or more lines of
-text.  Embedded newlines cause line breaks.  They may be used to
-annotate regions of the strip chart.  Text markers are created with the
-\fBcreate\fR operation in the form:
-.DS
-\fIpathName \fBmarker create text \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR pairs, 
-each sets a configuration option for the text marker.  
-These same \fIoption\fR\-\fIvalue\fR pairs may be used with the 
-marker's \fBconfigure\fR operation.  
-.PP
-The following options are specific to text markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the text relative to the
-positioning point for the text. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the text is centered on the point; if
-\fIanchor\fR is \f(CWn\fR then the text will be drawn such that the
-top center point of the rectangular region occupied by the text will
-be at the positioning point.  This default is \f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the text string.  If \fIcolor\fR is
-\f(CW""\fR, the background will be transparent.  The default is
-\f(CWwhite\fR.
-.TP
-\fB\-font \fIfontName\fR
-Specifies the font of the text.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR
-Sets the foreground color of the text.  The default is \f(CWblack\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the text should be justified.  This matters only when
-the marker contains more than one line of text. \fIJustify\fR must be
-\f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  The default is
-\f(CWcenter\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right exteriors of the text.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the text is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW4\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the text.  \fIPad\fR can be a list of
-one or two screen distances.  If \fIpad\fR has two elements, the area above the
-text is padded by the first distance and the area below by the second.
-If \fIpad\fR is just one distance, both the top and bottom areas
-are padded evenly.  The default is \f(CW4\fR.
-.TP
-\fB\-rotate \fItheta\fR
-Specifies the number of degrees to rotate the text.  \fITheta\fR is a
-real number representing the angle of rotation.  The marker is first
-rotated along its center and is then drawn according to its anchor
-position. The default is \f(CW0.0\fR.
-.TP
-\fB\-text \fItext\fR
-Specifies the text of the marker.  The exact way the text is
-displayed may be affected by other options such as \fB\-anchor\fR or
-\fB\-rotate\fR.
-.SS "WINDOW MARKERS"
-A window marker displays a widget at a given position.
-Window markers are created with the marker's \fBcreate\fR operation in
-the form:
-.DS
-\fIpathName \fBmarker create window \fR?\fIoption value\fR?...
-.DE
-There may be many \fIoption\fR-\fIvalue\fR
-pairs, each sets a configuration option
-for the marker.  These same \fIoption\fR\-\fIvalue\fR pairs may be
-used with the marker's \fBconfigure\fR command.
-.PP
-The following options are specific to window markers:
-.TP
-\fB\-anchor \fIanchor\fR
-\fIAnchor\fR tells how to position the widget relative to the
-positioning point for the widget. For example, if \fIanchor\fR is
-\f(CWcenter\fR then the widget is centered on the point; if \fIanchor\fR
-is \f(CWn\fR then the widget will be displayed such that the top center
-point of the rectangular region occupied by the widget will be at the
-positioning point.  This option defaults to \f(CWcenter\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the height to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever height the widget requests internally.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the width to assign to the marker's window.  If this option
-isn't specified, or if it is specified as \f(CW""\fR, then the window is
-given whatever width the widget requests internally.
-.TP
-\fB\-window \fIpathName\fR
-Specifies the widget to be managed.  \fIPathName\fR must
-be a child of the \fBstripchart\fR widget.
-.SH "GRAPH COMPONENT BINDINGS"
-Specific stripchart components, such as elements, markers and legend
-entries, can have a command trigger when event occurs in them, much
-like canvas items in Tk's canvas widget.  Not all event sequences are
-valid.  The only binding events that may be specified are those
-related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR,
-\fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR).
-.sp
-Only one element or marker can be picked during an event.  This means,
-that if the mouse is directly over both an element and a marker, only
-the uppermost component is selected.  This isn't true for legend entries.  
-Both a legend entry and an element (or marker) binding commands 
-will be invoked if both items are picked.
-.sp
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the
-element name and another is associated with one of the element's tags
-(see the \fB\-bindtags\fR option).  When this occurs, all of the 
-matching bindings are invoked.  A binding associated with the element
-name is invoked first, followed by one binding for each of the element's 
-bindtags.  If there are multiple matching bindings for a single tag, 
-then only the most specific binding is invoked.  A continue command 
-in a binding script terminates that script, and a break command 
-terminates that script and skips any remaining scripts for the event, 
-just as for the bind command.
-.sp
-The \fB\-bindtags\R option for these components controls addition
-tag names which can be matched.  Implicitly elements and markers
-always have tags matching their names.  Setting the value of
-the \fB\-bindtags\fR option doesn't change this.
-.SH "C LANGUAGE API"
-You can manipulate data elements from the C language.  There
-may be situations where it is too expensive to translate the data
-values from ASCII strings.  Or you might want to read data in a
-special file format.
-.PP
-Data can manipulated from the C language using BLT vectors.
-You specify the x and y data coordinates of an element as vectors and
-manipulate the vector from C.  The strip chart will be redrawn automatically
-after the vectors are updated.
-.PP
-From Tcl, create the vectors and configure the element to use them.
-.CS
-vector X Y
-\&.s element configure line1 -xdata X -ydata Y
-.CE
-To set data points from C, you pass the values as arrays of doubles
-using the \fBBlt_ResetVector\fR call.  The vector is reset with the
-new data and at the next idle point (when Tk re-enters its event
-loop), the strip chart will be redrawn automatically.
-.CS
-#include <tcl.h>
-#include <blt.h>
-
-register int i;
-Blt_Vector *xVec, *yVec;
-double x[50], y[50];
-
-/* Get the BLT vectors "X" and "Y" (created above from Tcl) */
-if ((Blt_GetVector(interp, "X", 50, &xVec) != TCL_OK) ||
-    (Blt_GetVector(interp, "Y", 50, &yVec) != TCL_OK)) {
-    return TCL_ERROR;
-}
-
-for (i = 0; i < 50; i++) {
-    x[i] = i * 0.02;
-    y[i] = sin(x[i]);
-}	
-
-/* Put the data into BLT vectors */
-if ((Blt_ResetVector(xVec, x, 50, 50, TCL_VOLATILE) != TCL_OK) ||
-    (Blt_ResetVector(yVec, y, 50, 50, TCL_VOLATILE) != TCL_OK)) {
-   return TCL_ERROR;
-}
-.CE
-See the \fBvector\fR manual page for more details.
-.SH SPEED TIPS
-There may be cases where the strip chart needs to be drawn and updated as
-quickly as possible.  If drawing speed becomes a big
-problem, here are a few tips to speed up displays.
-.TP 2
-\(bu 
-Try to minimize the number of data points.  The more data points
-the looked at, the more work the strip chart must do.
-.TP 2
-\(bu 
-If your data is generated as floating point values, the time required
-to convert the data values to and from ASCII strings can be
-significant, especially when there any many data points.  You can
-avoid the redundant string-to-decimal conversions using the C API to
-BLT vectors.
-.TP 2
-\(bu
-Data elements without symbols are drawn faster than with symbols.
-Set the data element's \fB\-symbol\fR option to \f(CWnone\fR.  If you need to
-draw symbols, try using the simple symbols such as \f(CWsplus\fR and
-\f(CWscross\fR.
-.TP 2
-\(bu
-Don't stipple or dash the element.  Solid lines are much faster.
-.TP 2
-\(bu 
-If you update data elements frequently, try turning off the
-widget's \fB\-bufferelements\fR option.  When the strip chart is first
-displayed, it draws data elements into an internal pixmap.  The pixmap
-acts as a cache, so that when the strip chart needs to be redrawn again, and
-the data elements or coordinate axes haven't changed, the pixmap is
-simply copied to the screen.  This is especially useful when you are
-using markers to highlight points and regions on the strip chart.  But if
-the strip chart is updated frequently, changing either the element data or
-coordinate axes, the buffering becomes redundant.
-.SH LIMITATIONS
-Auto-scale routines do not use requested min/max limits as boundaries
-when the axis is logarithmically scaled.
-.PP
-The PostScript output generated for polygons with more than 1500
-points may exceed the limits of some printers (See PostScript Language
-Reference Manual, page 568).  The work-around is to break the polygon
-into separate pieces.
-.SH "FUTURE INCOMPATIBILITY"
-The \fB\-mapped\fR options are obsoleted and will be removed.  You can
-achieve the same results using the \fB\-hide\fR option instead.
-.CS
-# Works for now.
-\&.s legend configure -mapped no
-
-# Instead use this.
-\&.s legend configure -hide yes    
-.CE 
-.SH KEYWORDS
-stripchart, graph, widget
diff --git a/blt3.0/man/table.mann b/blt3.0/man/table.mann
deleted file mode 100644
index 76372f1..0000000
--- a/blt3.0/man/table.mann
+++ /dev/null
@@ -1,757 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" The table geometry manager created by George Howlett.
-'\"
-.so man.macros
-.TH table n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-table \- Arranges widgets in a table
-.SH SYNOPSIS
-\fBtable \fIcontainer\fR ?\fIwidget index option value\fR?...
-.sp
-\fBtable arrange\fR \fIcontainer\fR
-.sp
-\fBtable cget \fIcontainer\fR ?\fIitem\fR? \fIoption\fR
-.sp
-\fBtable configure \fIcontainer\fR ?\fIitem\fR?... ?\fIoption value\fR?...
-.sp
-\fBtable extents \fIcontainer\fR \fIitem\fR
-.sp
-\fBtable forget \fIwidget\fR ?\fIwidget\fR?...
-.sp
-\fBtable info \fIcontainer\fR \fIitem\fR
-.sp
-\fBtable locate \fIcontainer\fR \fIx y\fR
-.sp
-\fBtable containers \fR?\fIswitch\fR? ?\fIarg\fR?
-.sp
-\fBtable save \fIcontainer\fR 
-.sp
-\fBtable search \fIcontainer\fR ?\fIswitch arg\fR?...
-.BE
-.SH DESCRIPTION
-The \fBtable\fR command arranges widgets in a table.  The alignment of
-widgets is detemined by their row and column positions and the number
-of rows or columns that they span.
-.SH INTRODUCTION
-Probably the most painstaking aspect of building a graphical
-application is getting the placement and size of the widgets just right.
-It usually takes many iterations to align widgets and adjust their spacing.
-That's because managing the geometry of widgets is simply not a
-packing problem, but also graphical design problem.  Attributes
-such as alignment, symmetry, and balance are more important than
-minimizing the amount of space used for packing.
-.PP
-The \fBtable\fR geometry manager arranges widgets in a table.  It's
-easy to align widgets (horizontally and vertically) or to create empty
-space to balance the arrangement of the widgets.  Widgets (called
-\fIslaves\fR in the Tk parlance) are arranged inside a containing
-widget (called the \fImaster\fR).  Widgets are positioned at
-row,column locations and may span any number of rows or columns.  More
-than one widget can occupy a single location.
-.PP
-The placement of widget windows determines both the size and
-arrangement of the table.  The table queries the requested size of
-each widget.  The \fIrequested size\fR of a widget is the natural size
-of the widget (before the widget is shrunk or expanded).  The height
-of each row and the width of each column is the largest widget spanning
-that row or column.  The size of the table is in turn the sum of the
-row and column sizes.  This is the table's \fInormal size\fR.
-.PP
-The total number of rows and columns in a table is determined from the
-indices specified.  The table grows dynamically as windows are added
-at larger indices.
-.SH EXAMPLE
-The table geometry manager is created by invoking the \fBtable\fR command.
-.CS
-# Create a table in the root window
-table .
-.CE
-The window \f(CW.\fR is now the \fIcontainer\fR of the table.  Widgets
-are packed into the table and displayed within the confines of the
-container.
-.PP
-You add widgets to the table by row and column location.  Row and
-column indices start from zero.
-.CS
-label .title -text "This is a title"
-
-# Add a label to the table
-table . .title 0,0 
-.CE
-The label \f(CW.title\fR is added to the table.  We can add more widgets
-in the same way.
-.CS
-button .ok -text "Ok"
-button .cancel -text "Cancel"
-
-# Add two buttons
-table . .ok 1,0
-table . .cancel 1,1
-.CE
-Two buttons \f(CW.ok\fR and \f(CW.cancel\fR are now packed into the second
-row of the table.  They each occupy one cell of the table.  By
-default, widgets span only a single row and column.
-.PP
-The first column contains two widgets, \f(CW.title\fR and \f(CW.ok\fR.  By
-default, the widest of the two widgets will define the width of the
-column.  However, we want \f(CW.title\fR to be centered horizontally
-along the top of the table.  We can make \f(CW.title\fR span two columns
-using the \fBconfigure\fR operation.
-.CS
-# Make the label span both columns
-table configure . .title -cspan 2
-.CE
-The label \f(CW.title\fR will now be centered along the top row of the
-table.  
-.PP
-In the above example, we've create and arranged the layout for the
-table invoking the \fBtable\fR command several times.  Alternately, we
-could have used a single \fBtable\fR command.
-.CS
-label .title -text "This is a title"
-button .ok -text "Ok"
-button .cancel -text "Cancel"
-
-# Create and pack the table
-table . \\
-    .title  0,0 -cspan 2 \\
-    .ok     1,0 \\
-    .cancel 1,1
-.CE
-The table will override the requested width and height of the container
-so that the window fits the table exactly.  This also means
-that any change to the size of table will be propagated up through the
-Tk window hierarchy.  This feature can be turned off using the
-\fBconfigure\fR operation again.
-.CS
-table configure . -propagate no
-.CE
-You can also set the width of height of the table to a specific
-value. This supersedes the calculated table size.
-.CS
-# Make the container 4 inches wide, 3 inches high
-table configure . -reqwidth 4i -reqheight 3i
-.CE
-If a widget is smaller than the cell(s) it occupies, the widget will
-float within the extra space.  By default, the widget will be centered
-within the space, but you can anchor the widget to any side of cell
-using the \fB\-anchor\fR configuration option.
-.CS
-table configure . .ok -anchor w
-.CE
-The \fB\-fill\fR option expands the widget to fill the 
-extra space either vertically or horizontally (or both).
-.CS
-# Make the title label fill the entire top row
-table configure . .title -cspan 2 -fill x 
-
-# Each button will be as height of the 2nd row.
-table configure . .ok .cancel -fill y
-.CE
-The width of \f(CW.title\fR will be the combined widths of both columns.
-Both \f(CW.ok\fR and \f(CW.cancel\fR will become as tall as the second row.  
-.PP
-The \fB\-padx\fR and \fB\-pady\fR options control the amount of padding 
-around the widget.  Both options take a list of one or two values.
-.CS
-# Pad the title by two pixels above and below.
-table configure . .title -pady 2
-
-# Pad each button 2 pixels on the left, and 4 on the right.
-table configure . .ok .cancel -padx { 2 4 }
-.CE
-If the list has only one value, then both exterior sides (top and bottom
-or left and right) of the widget are padded by that amount.  If the
-list has two elements, the first specifies padding for the top or left
-side and the second for the bottom or right side.
-.PP
-Like the container, you can also override the requested widths and
-heights of widgets using the \fB\-reqwidth\fR and
-\fB\-reqheight\fR options.  This is especially useful with
-character-based widgets (such as buttons, labels, text, listbox, etc)
-that let you specify their size only in units of characters and lines,
-instead of pixels.
-.CS
-# Make all buttons one inch wide
-table configure . .ok .cancel -reqwidth 1i
-.CE
-.PP
-Each row and column of the table can be configured, again using the
-\fBconfigure\fR operation.  Rows are and columns are designated by
-\f(CWR\fIi\fR and \f(CWC\fIi\fR respectively, where \fIi\fR is the index
-of the row or column.
-.PP
-For example, you can set the size of a row or column.
-.CS
-# Make the 1st column 2 inches wide
-table configure . c0 -width 2.0i
-
-# Make the 2nd row 1/2 inch high.
-table configure . r1 -height 0.5i
-.CE
-The new size for the row or column overrides its calculated size.  If
-no widgets span the row or column, its height or width is zero.
-So you can use the \fB\-width\fR and \fB\-height\fR options to create
-empty spaces in the table.
-.CS
-# Create an empty row and column
-table configure . r2 c2 -width 1i
-.CE
-The \fB\-pady\fR option lets you add padding to the top and bottom
-sides of rows.  The \fB\-padx\fR option adds padding to the left and
-right sides of columns.  Both options take a list of one or two
-values.
-.CS
-# Pad above the title by two pixels 
-table configure . r0 -pady { 2 0 }
-
-# Pad each column 4 pixels on the left, and 2 on the right.
-table configure . c* -padx { 2 4 }
-.CE
-.PP
-Notice that you can configure all the rows and columns using either
-\f(CWR*\fR or \f(CWC*\fR.
-.PP
-When the container is resized, the rows and columns of the table are
-also resized.  Only the rows or columns that contain widgets (a widget
-spans the row or column) grow or shrink.  The \fB\-resize\fR option
-indicates whether the row or column can be shrunk or stretched.  If
-the value is \f(CWshrink\fR, the row or column can only be resized
-smaller.  If \f(CWexpand\fR, it can only be resized larger.  If
-\f(CWnone\fR, the row or column is frozen at its requested size.
-.CS
-# Let the 1st column get smaller, but not bigger
-table configure . c0 -resize shrink
-
-# Let the 2nd column get bigger, not smaller
-table configure . c1 -resize expand
-
-# Don't resize the first row 
-table configure . r0 -resize none
-.CE
-The following example packs a canvas, two scrollbars, and a title.
-The rows and columns containing the scrollbars are frozen at their
-requested size, so that even if the frame is resized, the scrollbars will
-remain the same width.
-.CS
-table . \\
-    .title   0,0 -cspan 3 \\
-    .canvas  1,1 -fill both \\
-    .vscroll 1,2 -fill y \\
-    .hscroll 2,1 -fill x
-
-# Don't let the scrollbars resize
-table configure . c2 r2 -resize none
-
-# Create an empty space to balance the scrollbar
-table configure . c0 -width .vscroll
-.CE
-Note that the value of the \fB\-width\fR option is the name of a widget
-window.  This indicates that the width of the column should be the
-same as the requested width of \f(CW.vscroll\fR.
-.PP
-Finally, the \fBforget\fR operation removes widgets from the table.
-.CS
-# Remove the windows from the table
-table forget .quit .frame
-.CE
-It's not necessary to specify the container.  The \fBtable\fR
-command determines the container from the widget name.
-.SH OPERATIONS
-The following operations are available for the \fBtable\fR:
-.TP
-\fBtable \fIcontainer\fR ?\fIwidget index option value\fR?...  
-Adds the widget \fIwidget\fR to the table at \fIindex\fR.  \fIIndex\fR
-is a row,column position in the table.  It must be in the form
-\fIrow\fR,\fIcolumn\fR where \fIrow\fR and \fIcolumn\fR are the
-respective row and column numbers, starting from zero (0,0 is the
-upper leftmost position).  \fIRow\fR and \fIcolumn\fR may also be
-numeric expressions that are recursively evaluated.  If a table
-doesn't exist for \fIcontainer\fR, one is created.  \fIWidget\fR is the
-path name of the window, that must already exist, to be arranged
-inside of \fIcontainer\fR. \fIOption\fR and \fIvalue\fR are described
-in the 
-.SB WIDGET OPTIONS
-section.
-.TP
-\fBtable arrange\fR \fIcontainer\fR
-Forces the table to compute its layout immediately.  Normally, the
-table geometry manager will wait until the next idle point, before
-calculating the size of its rows and columns.  This is useful for
-collecting the \fInormal\fR sizes of rows and columns, that are
-based upon the requested widget sizes.
-.TP
-\fBtable cget\fR \fIcontainer \fR?\fIitem\fR?\fI option\fR
-Returns the current value of the configuration option specific to
-\fIitem\fR given by \fIoption\fR.  \fIItem\fR is either a row or
-column index, or the path name of a widget.  \fIItem\fR can be
-in any form describe in the \fBconfigure\fR operation below. If no
-\fIitem\fR argument is provided, then the configuration option is
-for the table itself.  \fIOption\fR may be any one of the options
-described in the appropiate section for \fIitem\fR.
-.TP
-\fBtable configure\fR \fIcontainer item\fR... ?\fIoption value\fR?... 
-Queries or modifies the configuration options specific to \fIitem\fR.
-If no \fIoption\fR is specified, this command returns a list
-describing all of the available options for \fIitem\fR 
-If the argument \fIitem\fR is omitted, then the specified 
-configuration options are for the table itself.  Otherwise
-\fIitem\fR must be either a row or column specification, or the path
-name of a widget.  
-The following \fIitem\fR types are available.
-.RS
-.TP 
-\f(CWC\fIi\fR
-Specifies the column of \fIcontainer\fR to be configured.  \fIItem\fR
-must be in the form \f(CWC\fIn\fR, where \fIi\fR is the index of 
-the column.  See the 
-.SB COLUMN OPTIONS
-section.
-.TP
-\f(CWR\fIi\fR
-Specifies the row of \fIcontainer\fR to be configured. \fIItem\fR must be
-in the form \f(CWR\fIi\fR, where \fIi\fR is the index of the row.  See
-the
-.SB ROW OPTIONS
-section.
-.TP 
-\fIwidget\fR 
-Specifies a widget of \fIcontainer\fR to be queried.  \fIWidget\fR
-is the path name of a widget packed in \fIcontainer\fR.  See the
-.SB WIDGET OPTIONS
-section.
-.TP 
-No argument
-Specifies that the table itself is to be queried.  
-See the
-.SB TABLE OPTIONS
-section for a description of the option-value pairs for the table.
-.RE
-.RS
-.sp
-The \fIoption\fI and \fIvalue\fR pairs are specific to \fIitem\fR.  If
-\fIoption\fR is specified with no \fIvalue\fR, then the command
-returns a list describing the one named option (this list will be
-identical to the corresponding sublist of the value returned if no
-\fIoption\fR is specified).  If one or more \fIoption\-value\fR pairs
-are specified, then the command modifies the given option(s) to have
-the given value(s); in this case the command returns the empty string.
-.RE
-.TP
-\fBtable extents \fIcontainer\fR \fIindex\fR 
-Queries the location and dimensions of row and columns in the table.
-\fIIndex\fR can be either a row or column index or a table index.
-Returns a list of the x,y coordinates (upperleft corner) and
-dimensions (width and height) of the cell, row, or column.
-.TP
-\fBtable forget \fIwidget\fR ?\fIwidget\fR?...
-Requests that \fIwidget\fR no longer have its geometry managed.
-\fIWidget\fR is the pathname of the window currently 
-managed by some table. The window will be unmapped so that it no longer 
-appears on the screen.  If \fIwidget\fR is not currently managed by any table, 
-an error message is returned, otherwise the empty string.
-.TP
-\fBtable info \fIcontainer\fR \fIitem\fR 
-Returns a list of the current configuration options for \fIitem\fR.  
-The list returned is exactly in the form that might be specified to the
-\fBtable\fR command.  It can be used to save and reset table 
-configurations. \fIItem\fR must be one of the following.
-.RS
-.TP .75i
-\f(CWC\fIi\fR
-Specifies the column of \fIcontainer\fR to be queried.  \fIItem\fR
-must be in the form \f(CWC\fIn\fR, where \fIn\fR is the index of 
-the column.  
-.TP
-\f(CWR\fIi\fR 
-Specifies the row of \fIcontainer\fR to be queried. \fIItem\fR must be
-in the form \f(CWR\fIi\fR, where \fIi\fR is the index of the row.  
-.TP 
-\fIwidget\fR 
-Specifies a widget of \fIcontainer\fR to be queried.
-\fIWidget\fR is the path name of a widget packed in \fIcontainer\fR.
-.TP 
-No argument
-Specifies that the table itself is to be queried. 
-.RE
-.TP
-\fBtable locate \fIcontainer\fR \fIx y\fR
-Returns the table index (row,column) of the cell containing the given
-screen coordinates.  The \fIx\fR and \fIy\fR arguments represent
-the x and y coordinates of the sample point to be tested.
-.TP
-\fBtable containers \fR?\fIswitch arg\fR?
-Returns a list of all container windows matching a given criteria (using
-\fIswitch\fR and \fIarg\fR).  If no \fIswitch\fR and \fIarg\fR
-arguments are given, the names of all container windows (only those using
-the \fBtable\fR command) are returned.  The following are valid
-switches:
-.RS
-.TP 
-\fB\-pattern\fR \fIpattern\fR
-Returns a list of pathnames of all container windows matching \fIpattern\fR.
-.TP 
-\fB\-slave\fR \fIwindow\fR
-Returns the name of the container window of table managing \fIwindow\fR.
-\fIWindow\fR must be the path name of widget.  If \fIwindow\fR is not
-managed by any table, the empty string is returned.
-.RE
-.TP
-\fBtable search \fIcontainer\fR ?\fIswitch arg\fR?...
-Returns the names of all the widgets in \fIcontainer\fR matching
-the criteria given by \fIswitch\fR and \fIarg\fR.  \fIContainer\fR is
-name of the container window associated with the table to be searched.
-The name of the widget is returned if any one
-\fIswitch\fR-\fIarg\fR criteria matches. If no \fIswitch\fR-\fIarg\fR
-arguments are given, the names of all widgets managed by
-\fIcontainer\fR are returned.  The following are switches are available:
-.RS
-.TP 
-\fB\-pattern\fR \fIpattern\fR
-Returns the names of any names of the widgets matching
-\fIpattern\fR.  
-.TP 
-\fB\-span\fR \fIindex\fR 
-Returns the names of widgets that span \fIindex\fR. A widget
-does not need to start at \fIindex\fR to be included.
-\fIIndex\fR must be in the form \fIrow\fR,\fIcolumn\fR, where
-\fIrow\fR and \fIcolumn\fR are valid row and column numbers.
-.TP 
-\fB\-start\fR \fIindex\fR
-Returns the names of widgets that start at \fIindex\fR.
-\fIIndex\fR must be in the form \fIrow\fR,\fIcolumn\fR, where
-\fIrow\fR and \fIcolumn\fR are valid row and column numbers.
-.RE
-.SH TABLE OPTIONS
-To configure the table itself, you omit the \fIitem\fR argument 
-when invoking the \fBconfigure\fR operation.
-.CS
-\fBtable configure\fR \fIcontainer\fR ?\fIoption value\fR?...
-.CE
-The following options are available for the table:
-.RS
-.TP 
-\fB\-padx \fIpad\fR
-Sets how much padding to add to the left and right exteriors of the table.
-\fIPad\fR can be a list of one or two numbers.  If \fIpad\fR
-has two elements, the left side of the table is padded by the first
-value and the right side by the second value.  If \fIpad\fR has just
-one value, both the left and right sides are padded evenly by the
-value.  The default is \f(CW0\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets how much padding to add to the top and bottom exteriors of the table.
-\fIPad\fR can be a list of one or two numbers.  If
-\fIpad\fR has two elements, the area above the table is padded by
-the first value and the area below by the second value.  If \fIpad\fR
-is just one number, both the top and bottom areas are padded by the
-value.  The default is \f(CW0\fR.
-.TP
-\fB\-propagate \fIboolean\fR 
-Indicates if the table should override the requested width and height
-of the \fIcontainer\fR window.  If \fIboolean\fR is false, \fIcontainer\fR
-will not be resized.  \fIContainer\fR will be its requested size.  The
-default is \f(CW1\fR.
-.RE
-.SH WIDGET OPTIONS
-widgets are configured by specifying the name of the widget
-when invoking the \fBconfigure\fR operation.  
-.DS
-\fBtable configure\fR \fIcontainer \fIwidget\fR ?\fIoption value\fR?...
-.DE
-\fIWidget\fR must be the path name of a window already packed in
-the table associated with \fIcontainer\fR.  The following options
-are available for widgets:
-.RS
-.TP
-\fB\-anchor \fIanchor\fR 
-Anchors \fIwidget\fR to a particular edge of the cell(s) it resides.
-This option has effect only if the space of the spans surrounding
-\fIwidget\fR is larger than \fIwidget\fR. \fIAnchor\fR specifies
-how \fIwidget\fR will be positioned in the space.  For example, if
-\fIanchor\fR is \f(CWcenter\fR then the window is centered in the rows
-and columns it spans; if \fIanchor\fR is \f(CWw\fR then the window will
-be aligned with the leftmost edge of the span. The default is
-\f(CWcenter\fR.
-.TP
-\fB\-columnspan \fInumber\fR
-Sets the number of columns \fIwidget\fR will span.
-The default is \f(CW1\fR.
-.TP
-\fB\-columncontrol \fIcontrol\fR
-Specifies how the width of \fIwidget\fR should control the
-width of the columns it spans. \fIControl\fR is 
-either \f(CWnormal\fR, \f(CWnone\fR, or \f(CWfull\fR.  
-The default is \f(CWnormal\fR.
-.RS
-.TP 1i 
-\f(CWnone\fR
-The width of \fIwidget\fR is not considered.   
-.TP 1i
-\f(CWfull\fR
-Only the width of \fIwidget\fR will be considered when computing the
-widths of the columns. 
-.TP 1i
-\f(CWnormal\fR
-Indicates that the widest widget spanning the column will determine 
-the width of the span.
-.RE
-.TP
-\fB\-fill \fIfill\fR
-Specifies if \fIwidget\fR should be stretched to fill any free space
-in the span surrounding \fIwidget\fR. \fIFill\fR is either \f(CWnone\fR,
-\f(CWx\fR, \f(CWy\fR, \f(CWboth\fR.  The default is \f(CWnone\fR.
-.RS
-.TP 1i
-\f(CWx\fR
-The widget can grow horizontally.  
-.TP 1i
-\f(CWy\fR
-The widget can grow vertically.  
-.TP 1i
-\f(CWboth\fR
-The widget can grow both vertically and horizontally.  
-.TP 1i
-\f(CWnone\fR
-The widget does not grow along with the span.  
-.RE
-.TP
-\fB\-ipadx \fIpixels\fR 
-Sets how much horizontal padding to add internally on the left and
-right sides of \fIwidget\fR.  \fIPixels\fR must be a valid screen distance
-like \f(CW2\fR or \f(CW0.3i\fR.  The default is \f(CW0\fR.
-.TP
-\fB\-ipady \fIpixels\fR
-Sets how much vertical padding to add internally on the top and bottom
-of \fIwidget\fR.  \fIPixels\fR must be a valid screen distance
-like \f(CW2\fR or \f(CW0.3i\fR.  The default is \f(CW0\fR.
-.TP 
-\fB\-padx \fIpad\fR
-Sets how much padding to add to the left and right exteriors of \fIwidget\fR.
-\fIPad\fR can be a list of one or two numbers.  If \fIpad\fR
-has two elements, the left side of \fIwidget\fR is padded by the first
-value and the right side by the second value.  If \fIpad\fR has just
-one value, both the left and right sides are padded evenly by the
-value.  The default is \f(CW0\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets how much padding to add to the top and bottom exteriors of
-\fIwidget\fR.  \fIPad\fR can be a list of one or two numbers.  If
-\fIpad\fR has two elements, the area above \fIwidget\fR is padded by
-the first value and the area below by the second value.  If \fIpad\fR
-is just one number, both the top and bottom areas are padded by the
-value.  The default is \f(CW0\fR.
-.TP
-\fB\-reqheight \fIheight\fR
-Specifies the limits of the requested height for \fIwidget\fR.
-\fIHeight\fR is a list of bounding values.  See the 
-.SB BOUNDING SIZES
-section for a description of this list.  By default, the height of
-\fIwidget\fR is its requested height with its internal padding
-(see the \fB\-ipady\fR option).  The bounds specified by \fIheight\fR
-either override the height completely, or bound the height between two sizes.
-The default is \f(CW""\fR.
-.TP
-\fB\-reqwidth \fIwidth\fR
-Specifies the limits of the requested width for \fIwidget\fR.
-\fIWidth\fR is a list of bounding values.  See the 
-.SB BOUNDING SIZES
-section for a description of this list.  By default, the width of
-\fIwidget\fR is its requested width with its internal padding
-(set the \fB\-ipadx\fR option).  The bounds specified by \fIwidth\fR
-either override the width completely, or bound the height between two sizes.
-The default is \f(CW""\fR.
-.TP
-\fB\-rowspan \fInumber\fR
-Sets the number of rows \fIwidget\fR will span. The default is \f(CW1\fR.
-.TP
-\fB\-rowcontrol \fIcontrol\fR
-Specifies how the height of \fIwidget\fR should control the
-height of the rows it spans. \fIControl\fR is 
-either \f(CWnormal\fR, \f(CWnone\fR, or \f(CWfull\fR.  
-The default is \f(CWnormal\fR.
-.RS
-.TP 1i 
-\f(CWnone\fR
-The height of \fIwidget\fR is not considered.   
-.TP 1i
-\f(CWfull\fR
-Only the height of \fIwidget\fR will be considered when computing the
-heights of the rows. 
-.TP 1i
-\f(CWnormal\fR
-Indicates that the tallest widget spanning the row will determine 
-the height of the span.
-.RE
-.RE
-.SH COLUMN OPTIONS
-To configure a column in the table, specify the column index as
-\f(CWC\fIi\fR, where \fIi\fR is the index of the column to be
-configured.
-.DS
-\fBtable configure\fR \fIcontainer \f(CWC\fIi\fR ?\fIoption value\fR?...
-.DE
-If the index is specified as \f(CWC*\fR, then all columns of the table
-will be configured.  The following options are available for table
-columns.
-.RS
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding to the left and right of the column.
-\fIPad\fR can be a list of one or two numbers.  If \fIpad\fR has two
-elements, the left side of the column is padded by the first value and
-the right side by the second value.  If \fIpad\fR has just one value,
-both the left and right sides are padded evenly by the value.  The
-default is \f(CW0\fR.
-.TP
-\fB\-resize \fImode\fR
-Indicates that the column can expand or shrink from its requested width 
-when the table is resized.
-\fIMode\fR must be one of the following:
-\f(CWnone\fR, \f(CWexpand\fR, \f(CWshrink\fR, or \f(CWboth\fR.  If \fImode\fR is 
-\f(CWexpand\fR the width of the column is expanded if there is extra space
-in the container window. If \fImode\fR is \f(CWshrink\fR its width may be
-reduced beyond its requested width if there is not enough space in the container.
-The default is \f(CWnone\fR.
-.TP
-\fB\-width \fIwidth\fR
-Specifies the limits within that the width of the column may expand
-or shrink.  \fIWidth\fR is a list of bounding values.  See the section
-.SB BOUNDING SIZES
-for a description of this list.
-By default there are no constraints.
-.RE
-.SH ROW OPTIONS
-To configure a row in the table, specify the row index as \f(CWR\fIi\fR,
-where \fIi\fR is the index of the row to be configured.
-.DS
-\fBtable configure\fR \fIcontainer \f(CWR\fIi\fR ?\fIoption value\fR?...
-.DE
-If the index is specified as \f(CWR*\fR, then all rows of the table will
-be configured.  The following options are available for table rows.
-.RS
-.TP
-\fB\-height \fIheight\fR
-Specifies the limits of the height that the row may expand or shrink to. 
-\fIHeight\fR is a list of bounding values.  See the section 
-.SB BOUNDING SIZES
-for a description of this list.
-By default there are no constraints.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding above and below the row.  \fIPad\fR can be a list
-of one or two numbers.  If \fIpad\fR has two elements, the area above
-the row is padded by the first value and the area below by the
-second value.  If \fIpad\fR is just one number, both the top and
-bottom areas are padded by the value.  The default is \f(CW0\fR.
-.TP
-\fB\-resize \fImode\fR
-Indicates that the row can expand or shrink from its requested height 
-when the table is resized.
-\fIMode\fR must be one of the following:
-\f(CWnone\fR, \f(CWexpand\fR, \f(CWshrink\fR, or \f(CWboth\fR.  If \fImode\fR is 
-\f(CWexpand\fR the height of the row is expanded if there is extra space
-in the container. If \fImode\fR is \f(CWshrink\fR its height may be
-reduced beyond its requested height if there is not enough space in 
-the container. The default is \f(CWnone\fR.
-.RE
-.SH BOUNDING SIZES
-Sometimes it's more useful to limit resizes to an acceptable range,
-than to fix the size to a particular value or disallow resizing
-altogether.  Similar to the way the \fBwm\fR command lets you specify
-a \fBminsize\fR and \fBmaxsize\fR for a toplevel window, you can bound
-the sizes the container, a widget, row, or column may take.
-The \fB\-width\fR, \fB\-height\fR, \fB\-reqwidth\fR, and
-\fB\-reqheight\fR options, take a list of one, two, or three values.
-We can take a previous example and instead preventing resizing,
-bound the size of the scrollbars between two values.
-.CS
-table . \\
-    .title   0,0 -cspan 3 \\
-    .canvas  1,1 -fill both \\
-    .vscroll 1,2 -fill y \\
-    .hscroll 2,1 -fill x
-
-# Bound the scrollbars between 1/8 and 1/2 inch
-table configure . c2 -width { 0.125 0.5 }
-table configure . r2 -height { 0.125 0.5 }
-table configure . vscroll .hscroll -fill both
-.CE
-The scrollbars will get no smaller than 1/8 of an inch, or bigger
-than 1/2 inch.  The initial size will be their requested size,
-so long as it is within the specified bounds.
-.PP
-How the elements of the list are interpreted is dependent upon the
-number of elements in the list.  
-.RS
-.TP 1i
-{\fI\fR}
-Empty list. No bounds are set. The default sizing is performed.
-.TP 
-{\fI x \fR} 
-Fixes the size to \fIx\fR.  The window or partition cannot grow or
-shrink.
-.TP 
-{\fI min max \fR}
-Sets up minimum and maximum limits for the size of the window or
-partition.  The window or partition can be reduced less than
-\fImin\fR, nor can it be stretched beyond \fImax\fR.
-.TP 
-{\fI min max nom \fR}
-Specifies minimum and maximum size limits, but also specifies a
-nominal size \fInom\fR.  This overrides the calculated size of the
-window or partition.
-.RE
-.SH MISCELLANEOUS
-Another feature is that you can put two widgets in the
-same cell of the table.  This is useful when you want to add
-decorations around a widget.
-.CS
-frame .frame -bd 1 -relief sunken
-button .quit -text "Quit"
-
-# Put both the frame and the button in the same cell.
-table . \\
-    .quit  1,0 -padx 2 -pady 2 \\
-    .frame 1,0 -fill both
-.CE
-.SH LIMITATIONS
-A long standing bug in Tk (circa 1993), there is no way to detect if a
-window is already a container of a different geometry manager. This
-is usually done by accident, such as the following where all three
-widgets are arranged in the same container ".", but using different
-geometry managers.
-.CS
-    table .f1
-	...
-    pack .f2
-	...
-    grid .f3
-.CE
-This leads to bizarre window resizing, as each geometry manager
-applies its own brand of layout policies.  When the container is a top
-level window (such as "."), your window manager may become locked
-as it responds to the never-ending stream of resize requests.  
-.SH KEYWORDS
-frame, geometry manager, location, table, size
-
diff --git a/blt3.0/man/tabset.mann b/blt3.0/man/tabset.mann
deleted file mode 100644
index 3081688..0000000
--- a/blt3.0/man/tabset.mann
+++ /dev/null
@@ -1,942 +0,0 @@
-
-'\"
-'\" Copyright 1998 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Tabset widget created by George Howlett.
-'\"
-.so man.macros
-.TH tabset n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-tabset \- Create and manipulate tabset widgets
-.BE
-.SH SYNOPSIS
-\fBtabset\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBtabset\fR widget displays a series of tabbed folders
-where only one folder at a time is displayed. A folder can contain 
-a Tk widget that is displayed when the folder is displayed.
-.PP
-There's no limit to the number of folders.  Tabs can be tiered (more than 
-one row).  If there are more tabs than can be displayed, tabs can also 
-be scrolled.  Any folder can also be torn off, when the contents (the Tk widget
-contained by it) is temporarily moved into another toplevel widget.
-A tabset may used as just a set of tabs, without a displaying any pages.  
-You can bind events to individual tabs, so it's easy to add features like
-"balloon help".
-.SH SYNTAX
-The \fBtabset\fR command creates a new window using the \fIpathName\fR
-argument and makes it into a tabset widget.
-.DS
-\fBtabset \fIpathName \fR?\fIoption value\fR?...
-.DE
-Additional options may be specified on the command line or in the
-option database to configure aspects of the tabset such as its colors,
-font, text, and relief.  The \fBtabset\fR command returns its
-\fIpathName\fR argument.  At the time this command is invoked, there
-must not exist a window named \fIpathName\fR, but \fIpathName\fR's
-parent must exist.
-.PP
-When first created the new tabset widget contains no tabs.  Tabs are 
-added using the \fBinsert\fR operation described below. 
-The size of the tabset window is determined the number of tiers of
-tabs requested and the sizes of the Tk widgets embedded inside each folder.
-The widest embedded widget determines the width of all folders. The tallest
-determines the height.  If no folders contain an embedded widget, the
-size is detemined solely by the size of the tabs.  You can override 
-either dimension with the tabset's \fB\-width\fR
-and \fB\-height\fR options.
-.PP
-Tabs may be scrolled using the \fB\-scrollcommand\fR option.  They also
-support scanning (see the \fBscan\fR operation).  Tabs also may be arranged
-along any side of the tabset window using the \fB\-side\fR option.
-.PP
-An individual tabs/folders in the tabset may be described by its index, 
-name, tag or text label.  
-.SS "INDICES"
-An index is the order of the tab in the tabset.  Indices start from zero.
-In addition to numeric indices, there are additional special indices.
-They are described below:
-.TP 12
-\fInumber\fR 
-Unique node id of the tab.
-.TP 12
-\fB@\fIx\fB,\fIy\fR
-Tab that covers the point in the tabset window
-specified by \fIx\fR and \fIy\fR (in screen coordinates).  If no
-tab covers that point, then the index is ignored.
-.TP 12
-\fBselected\fR 
-The currently selected tab.  The \fBselected\fR index is 
-typically changed by either clicking on the tab with the left mouse 
-button or using the widget's \fBinvoke\fR operation.
-.TP 12
-\fBactive\fR 
-The tab where the mouse pointer is currently located.  The label 
-is drawn using its active colors (see the \fB\-activebackground\fR and
-\fB\-activeforeground\fR options).  The \fBactive\fR index is typically
-changed by moving the mouse pointer over a tab or using the widget's
-\fBactivate\fR operation. There can be only one active tab at a time.
-If there is no tab located under the mouse pointer, the index
-is ignored.
-.TP 12
-\fBfocus\fR 
-Tab that currently has the widget's focus.
-This tab is displayed with a dashed line around its label.  You can
-change this using the \fBfocus\fR operation. If no tab has focus,
-then the index is ignored.
-.TP 12
-\fBdown\fR 
-Tab immediately below the tab that currently has focus,
-if there is one. If there is no tab below, the current 
-tab is returned.
-.TP 12
-\fBleft\fR
-Tab immediately to the left the tab that currently has focus,
-if there is one.  If there is no tab to the left, the current 
-tab is returned.
-.TP 12
-\fBright\fR 
-Tab immediately to the right the tab that currently has focus, if
-there is one. If there is no tab to the right, the current tab is
-returned.
-.TP 12
-\fBup\fR 
-Tab immediately above, if there is one, to the tab that currently has
-focus. If there is no tab above, the current tab is returned.
-.TP 12
-\fBend\fR
-Last tab in the tabset.  If there are no tabs in the tabset then the
-index is ignored.
-.LP
-Some indices may not always be available.  For example, if the mouse
-is not over any tab, "active" does not have an index.  For most
-tabset operations this is harmless and ignored.  
-.SH "NAMES"
-
-.SH "OPERATIONS"
-All \fBtabset\fR operations are invoked by specifying the widget's
-pathname, the operation, and any arguments that pertain to that
-operation.  The general form is:
-.sp
-.DS
-	\fIpathName operation \fR?\fIarg arg ...\fR?
-.DE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operations are available for tabset widgets:
-.TP
-\fIpathName \fBactivate\fR \fItab\fR 
-Sets the active tab to the one indicated by \fIindex\fR.  The
-active tab is drawn with its \fIactive\fR colors (see the
-\fB\-activebackground\fR and \fB\-activeforeground\fR options) and may
-be retrieved with the index \fBactive\fR.  Only one tab may be active
-at a time.  If \fIindex\fR is the empty string, then all tabs will
-be drawn with their normal foreground and background colors.
-.TP
-\fIpathName \fBbind\fR \fItagName\fR ?\fIsequence\fR? ?\fIcommand\fR? 
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a tab with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on tabs, rather 
-than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described in the section
-.SB "WIDGET OPTIONS" 
-below.
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all 
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "WIDGET OPTIONS" 
-below.
-.TP
-\fIpathName \fBdelete \fItab...\fR?
-Deletes one or more tabs from the tabset.  \fITab\fR may be 
-an index, tag, name, or label referring to one or more tabs.
-.TP
-\fIpathName \fBfocus \fItab\fR
-Specifies the tab to get the widget's focus.  The tab is displayed 
-with a dashed line around its label. 
-.TP
-\fIpathName \fBget\fR \fItab\fR
-Returns the name of the tab.  The value of \fIindex\fR may
-be in any form described in the section
-.SB "INDICES".
-.TP
-\fIpathName \fBindex\fR ?\fIflag\fR? \fIstring\fR 
-Returns the node id of the tab specified by \fIstring\fR.  If
-\fIflag\fR is \fB\-name\fR, then \fIstring\fR is the name of a tab.
-If \fIflag\fR is \fB\-index\fR, \fIstring\fR is an index such as
-"active" or "focus".  If \fIflag\fR isn't specified, it defaults to
-\fB\-index\fR.
-.TP
-\fIpathName \fBinsert\fR \fIposition\fR ?\fIname\fR? ?\fIoption value\fR?...
-Inserts a new tab into the tabset.  The new tab is inserted before the
-tab given by \fIposition\fR.  \fIPosition\fR may be either a number,
-indicating where in the list the new tab should be added, or \fBend\fR,
-indicating that the new tab is to be added the end of the list.  
-\fIName\fR is the name of the tab. If \fIname\fR isn't given,
-then a name is generated in the form "tabN".  Returns the name of the
-new tab.
-.TP
-\fIpathName \fBinvoke \fItab\fR
-Selects the folder given by \fItab\fR, displaying it in the tabset.
-It also invokes the Tcl command associated with the tab \
-(see the tabset's \fB\-selectcommand\fR option or the tab's \fB\-command\fR 
-option), if there is one.  
-It returns the return value from the Tcl command, or an empty
-string  if there  is  no  command  associated with the tab.
-This command is ignored if the  tab's state (see the \fB\-state\fR option)
-is disabled.
-.TP
-\fIpathName \fBmove\fR \fItab\fR \fBbefore\fR|\fBafter\fR \fItab\fR
-Moves the tab \fItab\fR to a new position in the tabset.
-.TP
-\fIpathName \fBnearest\fR \fIx\fR \fIy\fR
-Returns the name of the tab nearest to given X-Y screen coordinate.
-.TP
-\fIpathName \fBperforation \fIoperation\fR ?\fIargs\fR?
-This operation controls the perforation on the tab label.
-.RS
-.TP
-\fIpathName \fBperforation highlight\fR \fItab\fR \fIboolean\fR
-.TP
-\fIpathName \fBperforation invoke\fR \fItab\fR
-Invokes the command specified for perforations (see the 
-\fB\-perforationcommand\fR widget option). Typically this command
-places the page into a top level widget. The name of the toplevel
-is the concatonation of the \fIpathName\fR, "-",  and the \fItabName\fR.
-The return value is the return value from the Tcl command, or an empty
-string  if there  is  no  command  associated with the tab.
-This command is ignored if the  tab's state (see the \fB\-state\fR option)
-is disabled.
-.RE
-.TP
-\fIpathName \fBscan\fR \fIoption args\fR
-This command implements scanning on tabsets.  It has
-two forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBscan mark \fIx y\fR
-Records \fIx\fR and \fIy\fR and the current view in the tabset
-window;  used with later \fBscan dragto\fR commands.
-Typically this command is associated with a mouse button press in
-the widget.  It returns an empty string.
-.TP
-\fIpathName \fBscan dragto \fIx y\fR.
-This command computes the difference between its \fIx\fR and \fIy\fR
-arguments and the \fIx\fR and \fIy\fR arguments to the last
-\fBscan mark\fR command for the widget.
-It then adjusts the view by 10 times the
-difference in coordinates.  This command is typically associated
-with mouse motion events in the widget, to produce the effect of
-dragging the list at high speed through the window.  The return
-value is an empty string.
-.RE
-.TP
-\fIpathName \fBsee \fItab\fR 
-Scrolls the tabset so that the tab
-\fItab\fR is visible in the widget's window.
-.TP
-\fIpathName \fBsize\fR
-Returns the number of tabs in the tabset.
-.TP
-\fIpathName \fBtab \fIoperation\fR ?\fIargs\fR?
-.RS
-.TP
-\fIpathName \fBtab cget\fR \fItab\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR for tab \fItab\fR.
-\fIOption\fR may have any of the values accepted by the \fBtab configure\fR
-operation described in the section 
-.SB "TAB OPTIONS"
-below.
-.TP
-\fIpathName \fBtab configure\fR \fItab\fR \fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of one or more tabs.
- More than one tab can be configured if \fItab\fR refers to multiple tabs.
-If no \fIoption\fR is specified, this operation returns a list 
-describing all the available options for \fItab\fR.  
-.sp
-If \fIoption\fR is specified, but not \fIvalue\fR, then a list describing the
-one named option is returned.  If  one or more \fIoption\-value\fR pairs 
-are specified, then each named tab (specified by \fInameOrIndex\fR) will
-have its configurations option(s) set the given value(s).  In
-this last case, the empty string is returned.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "TAB OPTIONS"
-below.
-.TP
-\fIpathName \fBtab names\fR ?\fIpattern\fR?
-Returns the names of all the tabs matching the given pattern. If
-no \fIpattern\fR argument is provided, then all tab names are returned.
-.TP
-\fIpathName \fBtab tearoff \fItab\fR ?\fIwindow\fR?
-Moves the widget embedded the folder \fItab\fR (see the \fB-window\fR option), 
-placing it inside of \fIwindow\fR.  \fIWindow\fR is either the name of
-an new widget that will contain the embedded widget or the name
-of the \fBtabset\fR widget.  It the last case, the embedded widget
-is put back into the folder.
-.sp
-If no \fIwindow\fR argument is provided, then the name of the current
-parent of the embedded widget is returned.
-.RE
-.TP
-\fIpathName \fBview \fIargs\fR
-This command queries or changes the position of the
-tabset in the widget's window.  It can take any of the following
-forms:
-.RS
-.TP
-\fIpathName \fBview\fR 
-Returns a list of two numbers between 0.0 and
-1.0 that describe the amount and position of the tabset that is
-visible in the window.  For example, if \fIview\fR is "0.2 0.6", 20%
-of the tabset's text is off-screen to the left, 40% is visible in the
-window, and 40% of the tabset is off-screen to the right.  These are
-the same values passed to scrollbars via the \fB\-scrollcommand\fR
-option.
-.TP
-\fIpathName \fBview moveto\fI fraction\fR
-Adjusts the view in the window so that \fIfraction\fR of the
-total width of the tabset text is off-screen to the left.
-\fIfraction\fR must be a number between 0.0 and 1.0.
-.TP
-\fIpathName \fBview scroll \fInumber what\fR 
-This command shifts the view in the window (left/top or right/bottom)
-according to \fInumber\fR and \fIwhat\fR.  \fINumber\fR must be an
-integer. \fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
-abbreviation of these.  If \fIwhat\fR is \fBunits\fR, the view adjusts
-left or right by \fInumber\fR scroll units (see the
-\fB\-scrollincrement\fR option).  ; if it is \fBpages\fR then the view
-adjusts by \fInumber\fR widget windows.  If \fInumber\fR is negative
-then tabs farther to the left become visible; if it is positive then
-tabs farther to the right become visible.
-.RE
-.SH "WIDGET OPTIONS"
-Widget configuration options may be set either by the \fBconfigure\fR 
-operation or the Tk \fBoption\fR command.  The resource class
-is \f(CWTabset\fR.  The resource name is the name of the widget.
-.CS
-option add *Tabset.Foreground white
-option add *Tabset.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the default active background color for tabs.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the 
-tab's \fB\-activebackground\fR option. 
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the default active foreground color for tabs.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the
-tab's \fB\-activeforeground\fR option.
-.TP
-\fB\-background \fIcolor\fR
-Sets the default background color of folders.  Individual tabs can
-override this with their own \fBR-background\fR option.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around tabs and folders. The
-\fB\-relief\fR option determines how the border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for both tabs and folders.  \fIRelief\fR
-specifies how the tabs should appear relative to background of the 
-widget; for example, \f(CWraised\fR means the tab should
-appear to protrude.  The default is \f(CWraised\fR.
-.TP
-\fB\-troughbackground \fIcolor\fR
-Sets the background color of the trough under the tabs.  
-.TP
-\fB\-outerborderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines how the border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-outerpad \fIpixels\fR
-Sets the amount of padding between the highlight ring on the 
-outer edge of the tabset and the folder.  
-The default is \f(CW0\fR.
-.TP
-\fB\-outerrelief \fIrelief\fR
-Specifies the 3-D effect for the tabset widget.  \fIRelief\fR
-specifies how the tabset should appear relative to widget that
-it is packed into; for example, \f(CWraised\fR means the tabset should
-appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-dashes \fIdashList\fR
-Sets the dash style of the focus outline.  When a tab has the widget's
-focus, it is drawn with a dashed outline around its label.  
-\fIDashList\fR is a list of up
-to 11 numbers that alternately represent the lengths of the dashes
-and gaps on the cross hair lines.  Each number must be between 1 and
-255.  If \fIdashList\fR is \f(CW""\fR, the outline will be a solid
-line.  The default value is \f(CW5 2\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the default font for the text in tab labels.  Individual tabs may
-override this by setting the tab's \fB\-font\fR option.  The default value is
-\f(CW*Arial 9\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the default color of tab labels.  Individual tabs may
-override this option by setting the tab's \fB\-foreground\fR option.  
-The default value is \f(CWblack\fR.
-.TP 
-\fB\-gap \fIsize\fR
-Sets the gap (in pixels) between tabs.  The default value is \f(CW2\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  If \fIpixels\fR is
-0, then the height of the widget will be calculated based on
-the size the tabs and their pages.
-The default is \f(CW0\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Sets the color to display in the traversal highlight region when
-the tabset does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Sets the color to use for the traversal highlight rectangle that is
-drawn around the widget when it has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Sets the width of the highlight rectangle to draw around the outside of 
-the widget when it has the input focus. \fIPixels\fR is a non-negative 
-value and may have any of the forms acceptable to \fBTk_GetPixels\fR.
-If the value is zero, no focus highlight is drawn around the widget.
-The default is \f(CW2\fR.
-.TP
-\fB\-pageheight \fIpixels\fR
-Sets the requested height of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum height of all embedded tab windows is used.  
-The default is \f(CW0\fR.
-.TP
-\fB\-pagewidth \fIpixels\fR
-Sets the requested width of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum width of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.TP
-\fB\-perforationcommand\fR \fIstring\fR
-Specifies a Tcl script to be invoked to tear off the current
-page in the tabset. This command is typically invoked when 
-left mouse button is released over the tab perforation.  The default
-action is to tear-off the page and place it into a new toplevel 
-window.
-.TP
-\fB\-rotate \fIangle\fR
-Specifies the degrees to rotate text in tab labels.
-\fIAngle\fR is a real value representing the number of degrees
-to rotate the text labels.  The default is \f(CW0.0\fR degrees.
-.TP 
-\fB\-tabwidth \fIwidth\fR
-Indicates the width of each tab.  \fIWidth\fR can be one of the
-following:
-.RS
-.TP 1i
-\f(CWvariable\fR
-The width of the tab is determined by its text and image.
-.TP 1i
-\f(CWsame\fR
-The width of every tab is the maximum size.
-.TP 1i
-\f(CWpixels\fR
-The width of the tab is set to \fIpixels\R. 
-\fIPixels\fR is a positive screen distance.
-.RE
-The default is \f(CWsame\fR.
-.TP 
-\fB\-scrollcommand \fIstring\fR
-Specifies the prefix for a command for communicating with 
-scrollbars.  Whenever the view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed. 
-.TP 
-\fB\-scrollincrement \fIpixels\fR
-Sets the smallest number of pixels to scroll the tabs. 
-If \fIpixels\fR is greater than 0, this sets the units for 
-scrolling (e.g.,  when you the change the view by clicking
-on the left and right arrows of a scrollbar).
-.TP
-\fB\-selectbackground \fIcolor\fR
-Sets the color to use when displaying background of the selected
-tab. Individual tabs can override this option by setting the tab's 
-\fB\-selectbackground\fR option.
-'\".TP 
-'\" \fB\-selectborderwidth \fIpixels\fR
-'\" Sets the width of the raised 3-D border to draw around the label of 
-'\" the selected tab.  \fIPixels\fR must be a non-negative value.
-'\" The default value is \f(CW1\fR.
-.TP
-\fB\-selectcommand \fIstring\fR
-Specifies a default Tcl script to be associated with tabs.  This
-command is typically invoked when left mouse button is released over 
-the tab.  Individual tabs may override this with the tab's
-\fB\-command\fR option. The default value is \f(CW""\fR.
-.TP
-\fB\-selectforeground \fIcolor\fB
-Sets the default color of the selected tab's text label. 
-Individual tabs can override this option by setting the tab's 
-\fB\-selectforeground\fR option. The default value is \f(CWblack\fR.
-.TP
-\fB\-selectpad \fIpixels\fB
-Specifies extra padding to be displayed around the selected tab. 
-The default value is \f(CW3\fR.
-.TP
-\fB\-side \fIside\fB
-Specifies the side of the widget to place tabs. The following
-values are valid for \fIside\fR. The default value is \f(CWtop\fR.
-.RS
-.TP 1i
-\f(CWtop\fR
-Tabs are drawn along the top.
-.TP 1i
-\f(CWleft\fR
-Tabs are drawn along the left side.
-.TP 1i
-\f(CWright\fR
-Tabs are drawn along the right side.
-.TP 1i
-\f(CWboth\fR
-Tabs are drawn along the bottom side.
-.RE
-.TP 
-\fB\-slant \fIslant\fR
-Specifies if the tabs should be slanted 45 degrees on the left and/or 
-right sides. The following values are valid for \fIslant\fR. The default 
-is \f(CWnone\fR.
-.RS
-.TP 1i
-\f(CWnone\fR
-Tabs are drawn as a rectangle.  
-.TP 1i
-\f(CWleft\fR
-The left side of the tab is slanted.  
-.TP 1i
-\f(CWright\fR
-The right side of the tab is slanted.  
-.TP 1i
-\f(CWboth\fR
-Boths sides of the tab are slanted.
-.RE
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts decide whether to focus on the window.
-The default is \f(CW1\fR.
-.TP
-\fB\-tearoff \fIboolean\fR
-.TP
-\fB\-textside \fIside\fB
-If both images and text are specified for a tab, this option determines on
-which side of the tab the text is to be displayed. The 
-valid sides are \f(CWleft\fR, \f(CWright\fR, \f(CWtop\fR, and
-\f(CWbottom\fR.  The default value is \f(CWleft\fR.
-.TP
-\fB\-tiers \fInumber\fB
-Specifies the maximum number of tiers to use to display the tabs.
-The default value is \f(CW1\fR.
-.TP
-\fB\-width \fIpixels\fR
-Specifies the requested width of the widget.  If \fIpixels\fR is
-0, then the width of the widget will be calculated based on
-the size the tabs and their pages.
-The default is \f(CW0\fR.
-.SH "TAB OPTIONS"
-In addition to the \fBconfigure\fR operation, widget configuration
-options may also be set by the Tk \fBoption\fR command.  The class
-resource name is \f(CWTab\fR.
-.CS
-option add *Tabset.Tab.Foreground white
-option add *Tabset.name.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the active background color for \fInameOrIndex\fR.  A tab is active
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  This overrides the widget's \fB-activebackground\fR 
-option. 
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the default active foreground color \fInameOrIndex\fR.  A tab is "active"
-when the mouse is positioned over it or set by the \fBactivate\fR
-operation.  Individual tabs may override this option by setting the
-tab's \fB-activeforeground\fR option.
-.TP
-\fB\-anchor \fIanchor\fR 
-Anchors the tab's embedded widget to a particular edge of the folder.
-This option has effect only if the space in the folder surrounding the 
-embedded widget is larger than the widget itself. \fIAnchor\fR specifies
-how the widget will be positioned in the extra space.  For example, if
-\fIanchor\fR is \f(CWcenter\fR then the window is centered in the folder
-; if \fIanchor\fR is \f(CWw\fR then the window will
-be aligned with the leftmost edge of the folder. The default value is
-\f(CWcenter\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color for \fInameOrIndex\fR.  Setting this option overides the 
-widget's \fB\-tabbackground\fR option.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for this tab.  \fITagList\fR is a list of
-binding tag names.  The tags and their order will determine how
-commands for events in tabs are invoked.  Each tag in the list matching 
-the event sequence will have its Tcl command executed.  Implicitly the 
-name of the tab is always the first tag in the list.  The default value is
-\f(CWall\fR.
-.TP
-\fB\-command \fIstring\fR
-Specifies a Tcl script to be associated with \fInameOrIndex\fR.  This
-command is typically invoked when left mouse button is released over 
-the tab.  Setting this option overrides the widget's
-\fB\-selectcommand\fR option. 
-.TP
-\fB\-data \fIstring\fR
-Specifies a string to be associated with \fInameOrIndex\fR.
-This value isn't used in the widget code.  It may be used in Tcl bindings 
-to associate extra data (other than the image or text) with the
-tab. The default value is \f(CW""\fR.
-.TP
-\fB\-fill \fIfill\fR
-If the space in the folder surrounding the tab's embedded widget is 
-larger than the widget, then \fIfill\fR indicates if the embedded widget 
-should be stretched to occupy the extra space.  \fIFill\fR is either 
-\f(CWnone\fR,
-\f(CWx\fR, \f(CWy\fR, \f(CWboth\fR.  For example, if \fIfill\fR is \f(CWx\fR,
-then the widget is stretched horizontally.  If \fIfill\fR is \f(CWy\fR,
-the widget is stretched vertically.  The default is \f(CWnone\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for the text in tab labels.  If \fIfontName\fR is not
-the empty string, this overrides the tabset's \fB\-font\fR option.
-The default value is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the color of the label for \fInameOrIndex\fR.  If \fIcolor\fR
-is not the empty string, this overrides the widget's \fB\-tabforeground\fR 
-option.  The default value is \f(CW""\fR.
-.TP 
-\fB\-image \fIimageName\fR
-Specifies the image to be drawn in label for \fInameOrIndex\fR.
-If \fIimage\fR is \f(CW""\fR, no image will be drawn.  Both text and
-images may be displayed at the same time in tab labels.
-The default value is \f(CW""\fR.
-.TP
-\fB\-ipadx \fIpad\fR
-Sets the padding to the left and right of the label.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the label is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-ipady \fIpad\fR
-Sets the padding to the top and bottom of the label.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the top of the label is padded by the first
-distance and the bottom by the second.  If \fIpad\fR has just one
-distance, both the top and bottom sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-padx \fIpad\fR
-Sets the padding around the left and right of the embedded widget, if 
-one exists.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the widget is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP
-\fB\-pady \fIpad\fR
-Sets the padding around the top and bottom of the embedded widget, if
-one exists.
-\fIPad\fR can be a list of one or two screen distances.  If \fIpad\fR
-has two elements, the top of the widget is padded by the first
-distance and the bottom by the second.  If \fIpad\fR has just one
-distance, both the top and bottom sides are padded evenly.  The
-default value is \f(CW0\fR.
-.TP 
-\fB\-selectbackground \fIcolor\fR
-Sets the color to use when displaying background of the selected
-tab. If \fIcolor\fR is not the empty string, this overrides the
-widget's \fB\-selectbackground\fR option. The default value is
-\f(CW""\fR.
-.TP 
-\fB\-shadow \fIcolor\fR
-Sets the shadow color for the text in the tab's label. Drop shadows
-are useful when both the foreground and background of the tab
-have similar color intensities.
-If \fIcolor\fR is the empty string, no shadow is drawn.
-The default value is \f(CW""\fR.
-.TP
-\fB\-state \fIstate\fR
-Sets the state of the tab. If \fIstate\fR is \f(CWdisable\fR the
-text of the tab is drawn as engraved and operations on the tab
-(such as \fBinvoke\fR and \fBtab tearoff\fR) are ignored.
-The default is \f(CWnormal\fR.
-.TP
-\fB\-stipple \fIbitmap\fR
-Specifies a stipple pattern to use for the background of the folder
-when the window is torn off.
-\fIBitmap\fR specifies a bitmap to use as the stipple
-pattern. The default is \f(CWBLT\fR.
-.TP
-\fB\-text \fItext\fR
-Specifies the text of the tab's label.  The exact way the text is
-drawn may be affected by other options such as \fB\-state\fR or
-\fB\-rotate\fR.
-.TP
-\fB\-window \fIpathName\fR
-Specifies the widget to be embedded into the tab.  \fIPathName\fR must
-be a child of the \fBtabset\fR widget.  The tabset will "pack" and
-manage the size and placement of \fIpathName\fR.  The default value
-is \f(CW""\fR.
-.TP
-\fB\-windowheight \fIpixels\fR
-Sets the requested height of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum height of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.TP
-\fB\-windowwidth \fIpixels\fR
-Sets the requested width of the page.  The page is the area under the
-tab used to display the page contents.  If \fIpixels\fR is \f(CW0\fR,
-the maximum width of all embedded tab windows is used.  The default
-is \f(CW0\fR.
-.SH "DEFAULT BINDINGS"
-.PP
-BLT automatically generates class bindings that supply tabsets their
-default behaviors. The following event sequences are set by default 
-for tabsets (via the class bind tag \f(CWTabset\fR):
-.IP \fB<ButtonPress-2>\fR
-.IP \fB<B2-Motion>\fR
-.IP \fB<ButtonRelease-2>\fR
-Mouse button 2 may be used for scanning.
-If it is pressed and dragged over the tabset, the contents of
-the tabset drag at high speed in the direction the mouse moves.
-.IP \fB<KeyPress-Up>\fR
-.IP \fB<KeyPress-Down>\fR
-The up and down arrow keys move the focus to the tab immediately above
-or below the current focus tab.  The tab with focus is drawn
-with the a dashed outline around the tab label.
-.IP \fB<KeyPress-Left>\fR
-.IP \fB<KeyPress-Right>\fR
-The left and right arrow keys move the focus to the tab immediately to the left
-or right of the current focus tab.  The tab with focus is drawn
-with the a dashed outline around the tab label.
-.IP \fB<KeyPress-space>\fR
-.IP \fB<KeyPress-Return>\fR
-The space and return keys select the current tab given focus.
-When a folder is selected, it's command is invoked and the 
-embedded widget is mapped.
-.PP
-Each tab, by default, also has a set of bindings (via the tag
-\f(CWall\fR).  These bindings may be reset using the tabset's 
-\fBbind\fR operation.
-.IP \fB<Enter>\fR
-.IP \fB<Leave>\fR
-When the mouse pointer enters a tab, it is activated (i.e. drawn in
-its active colors) and when the pointer leaves, it is redrawn in
-its normal colors.
-.IP \fB<ButtonRelease-1>\fR
-Clicking with the left mouse button on a tab causes the tab to be
-selected and its Tcl script (see the \fB\-command\fR or
-\fB\-selectcommand\fR options) to be invoked.  The folder and any embedded
-widget (if one is specified) is automatically mapped.
-.IP \fB<ButtonRelease-3>\fR
-.IP \fB<Control-ButtonRelease-1>\fR
-Clicking on the right mouse button (or the left mouse button with the
-Control key held down) tears off the current page into its own toplevel
-widget. The embedded widget is re-packed into a new toplevel and 
-an outline of the widget is drawn in the folder.  Clicking again
-(toggling) will reverse this operation and replace the page back in
-the folder.
-.SH "BIND TAGS"
-You can bind commands to tabs that are triggered when a particular
-event sequence occurs in them, much like canvas items in Tk's 
-canvas widget.  Not all event sequences are valid.  The only binding 
-events that may be specified are those related to the mouse and 
-keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButtonPress\fR, 
-\fBMotion\fR, and \fBKeyPress\fR).
-.PP
-It is possible for multiple bindings to match a particular event.
-This could occur, for example, if one binding is associated with the
-tab name and another is associated with the tab's tags
-(see the \fB\-bindtags\fR option).  When this occurs, all the 
-matching bindings are invoked.  A binding associated with the tab
-name is invoked first, followed by one binding for each of the tab's 
-bindtags.  If there are multiple matching bindings for a single tag, 
-then only the most specific binding is invoked.  A continue command 
-in a binding script terminates that script, and a break command 
-terminates that script and skips any remaining scripts for the event, 
-just as for the bind command.
-.PP
-The \fB\-bindtags\fR option for tabs controls addition tag names that
-can be matched.  Implicitly the first tag for each tab is its name.
-Setting the value of the \fB\-bindtags\fR option doesn't change this.
-.SH EXAMPLE
-You create a tabset widget with the \fBtabset\fR command.
-.CS
-# Create a new tabset
-tabset .ts -relief sunken -borderwidth 2 
-.CE
-A new Tcl command \f(CW.ts\fR is also created.  This command can be
-used to query and modify the tabset.  For example, to change the
-default font used by all the tab labels, you use the new command and
-the tabset's \fBconfigure\fR operation.
-.CS
-# Change the default font.
-\&.ts configure \-font "fixed"
-.CE
-You can then add folders using the \fBinsert\fR operation.
-.CS
-# Create a new folder "f1"
-\&.ts insert 0 "f1"
-.CE
-This inserts the new tab named "f1" into the tabset.  The index
-\f(CW0\fR indicates location to insert the new tab.  You can also use
-the index \f(CWend\fR to append a tab to the end of the tabset.  By
-default, the text of the tab is the name of the tab.  You can change
-this by configuring the \fB\-text\fR option.
-.CS
-# Change the label of "f1"
-\&.ts tab configure "f1" -text "Tab #1" 
-.CE
-The \fBinsert\fR operation lets you add one or more folders at a time.
-.CS
-\&.ts insert end "f2" -text "Tab #2" "f3" "f4" 
-.CE
-The tab on each folder contains a label.  A label may display both
-an image and a text string.  You can reconfigure the tab's attributes
-(foreground/background colors, font, rotation, etc) using the \fBtab
-configure\fR operation.
-.CS
-# Add an image to the label of "f1"
-set image [image create photo -file stopsign.gif]
-\&.ts tab configure "f1" -image $image
-\&.ts tab configure "f2" -rotate 90
-.CE
-Each folder may contain an embedded widget to represent its contents.
-The widget to be embedded must be a child of the tabset widget.  Using
-the \fB\-window\fR option, you specify the name of widget to be
-embedded.  But don't pack the widget, the tabset takes care of placing
-and arranging the widget for you.
-.CS
-graph .ts.graph
-\&.ts tab configure "f1" -window ".ts.graph" \\
-    -fill both -padx 0.25i -pady 0.25i
-.CE
-The size of the folder is determined the sizes of the Tk widgets
-embedded inside each folder.  The folder will be as wide as the widest
-widget in any folder. The tallest determines the height.  You can use
-the tab's \fB\-pagewidth\fR and \fB\-pageheight\fR options override this.
-.PP
-Other options control how the widget appears in the folder.  The
-\fB\-fill\fR option says that you wish to have the widget stretch to
-fill the available space in the folder.
-.CS
-\&.ts tab configure "f1" -fill both -padx 0.25i -pady 0.25i
-.CE
-.PP
-Now when you click the left mouse button on "f1", the
-graph will be displayed in the folder.  It will be automatically
-hidden when another folder is selected.  If you click on the right
-mouse button, the embedded widget will be moved into a toplevel widget 
-of its own.  Clicking again on the right mouse button puts it back into 
-the folder.
-.PP
-If you want to share a page between two different folders, the
-\fB\-command\fR option lets you specify a Tcl command to be invoked
-whenever the folder is selected.  You can reset the \fB\-window\fR
-option for the tab whenever it's clicked.
-.CS
-\&.ts tab configure "f2" -command { 
-    \&.ts tab configure "f2" -window ".ts.graph"
-}
-\&.ts tab configure "f1" -command { 
-    \&.ts tab configure "f1" -window ".ts.graph"
-}
-.CE
-If you have many folders, you may wish to stack tabs in multiple
-tiers.  The tabset's \fB\-tiers\fR option requests a maximum
-number of tiers.   The default is one tier.  
-.CS
-\&.ts configure -tiers 2
-.CE
-If the tabs can fit in less tiers, the widget will use that many.  
-Whenever there are more tabs than can be displayed in the maximum number
-of tiers, the tabset will automatically let you scroll the tabs.  You
-can even attach a scrollbar to the tabset.
-.CS
-\&.ts configure -scrollcommand { .sbar set }  -scrollincrement 20
-\&.sbar configure -orient horizontal -command { .ts view }
-.CE
-By default tabs are along the top of the tabset from left to right.  
-But tabs can be placed on any side of the tabset using the \fB\-side\fR
-option.
-.CS
-# Arrange tabs along the right side of the tabset. 
-\&.ts configure -side right -rotate 270
-.CE
-.SH KEYWORDS
-tabset, widget
diff --git a/blt3.0/man/tile.mann b/blt3.0/man/tile.mann
deleted file mode 100644
index d8717ca..0000000
--- a/blt3.0/man/tile.mann
+++ /dev/null
@@ -1,108 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Tile command created by George Howlett.
-'\"
-.so man.macros
-.TH tile n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-tile \-  Tiling versions of Tk widgets
-.SH SYNOPSIS
-.sp
-\fBtile::button \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::checkbutton \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::frame \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::label \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::radiobutton \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::scrollbar \fIpathName\fR \fIoption value\fR...
-.sp
-\fBtile::toplevel \fIpathName\fR \fIoption value\fR...
-.sp
-.BE
-.SH DESCRIPTION
-The tile widgets let you create textured backgrounds.  The texture is
-a Tk image which is tiled over the entire background of the widget.
-.SH INTRODUCTION
-With the advent of Tk 4.0, images are now easy to create and use in
-applications.  Images add interest to applications and they convey
-more information.  But one area where Tk hasn't taken advantage of
-images is using images as textures for widgets.  Since tiling is a
-standard feature of windowing systems, it's very easy to use images 
-as textures.
-.PP
-The tile widgets take the standard Tk 4.0 widgets and add tiling
-configuration options to them.  Textures are specified by the name 
-of the image you wish to be tiled across the background of the widget.  
-.SH EXAMPLE
-To add tiling to a widget, you simply create an image using 
-Tk's \fBimage\fR command and use the image name as the value for
-the \fB\-tile\fR configuration option of the widget.
-.CS
-image create photo my_texture -file tan_paper.gif
-blt::tile::frame .f -tile my_texture
-.CE
-The image \f(CWmy_texture\fR is added to the frame.  
-If \f(CWmy_texture\fR is updated, so will the widget background.
-.CS
-image create photo my_texture -file rain.gif
-.CE
-The tile widget commands reside in the "blt::tile" namespace, so
-as not to collide with the normal Tk widgets.
-An easy way to add tiling to existing programs is to import
-the tile widget commands into the global namespace.
-.CS
-image create photo my_texture -file tan_paper.gif
-namespace import -force blt::tile::*
-frame .f -tile my_texture
-.CE
-To use one image for all texturing, you can use the "Tile" option
-class name to specify the same image for all tile widgets.
-.CS
-image create photo my_texture -file tan_paper.gif
-option add *Tile my_texture
-.CE
-.SH OPTIONS
-The following configurations options are added to the widgets. If
-a \fB\-tile\fB or \fB\-activetile\fR option is specified, it overrides
-the background color of the widget.
-.TP
-\fB\-activetile \fIimage\fR 
-Specifies a textured background to display when the widget is active.
-This option is available for the \fBtilebutton\fR,
-\fBtilecheckbutton\fR, \fBtileradiobutton\fR, and \fBtilescrollbar\fR
-widgets.  \fIImage\fR is the name an image created using Tk's
-\fBimage\fR command.  The background of the widget is tiled with
-\fIimage\fR.  If \fIimage\fR is \f(CW""\fR, then the active background
-color is displayed.  The default is \f(CW""\fR.
-.TP
-\fB\-tile \fIimage\fR 
-Specifies a textured background to display for the widget.
-\fIImage\fR is the name an image created using Tk's \fBimage\fR
-command.  The background of the widget is tiled with \fIimage\fR.  If
-\fIimage\fR is \f(CW""\fR, then the normal background color is
-displayed.  The default is \f(CW""\fR.
-.SH KEYWORDS
-tile, texture, button, label, radiobutton, checkbutton, scrollbar, frame, toplevel
diff --git a/blt3.0/man/tree.mann b/blt3.0/man/tree.mann
deleted file mode 100644
index 93e1836..0000000
--- a/blt3.0/man/tree.mann
+++ /dev/null
@@ -1,933 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Lucent Technologies, Inc.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Tree command created by George Howlett.
-'\"
-.so man.macros
-.TH tree n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBtree\fR \-  Create and manage tree data objects.
-.SH SYNOPSIS
-\fBblt::tree create \fR?\fItreeName\fR?
-.sp
-\fBblt::tree destroy\fR \fItreeName\fR...
-.sp
-\fBblt::tree names\fR \fR?\fIpattern\fR?
-.BE
-.SH DESCRIPTION
-The \fBtree\fR command creates tree data objects.  A \fItree object\fR
-is general ordered tree of nodes.  Each node has both a label and a
-key-value list of data.  Data can be heterogeneous, since nodes do not
-have to contain the same data keys.  It is associated with a Tcl
-command that you can use to access and modify the its structure and
-data. Tree objects can also be managed via a C API.
-.SH INTRODUCTION
-
-.SH EXAMPLE
-
-.SH SYNTAX
-.TP
-\fBblt::tree create\fR ?\fItreeName\fR?  
-Creates a new tree object.  The name of the new tree is returned.  If
-no \fItreeName\fR argument is present, then the name of the tree is
-automatically generated in the form "\f(CWtree0\fR", "\f(CWtree1\fR",
-etc.  If the substring "\f(CW#auto\fR" is found in \fItreeName\fR, it
-is automatically substituted by a generated name.  For example, the
-name \f(CW.foo.#auto.bar\fR will be translated to \f(CW.foo.tree0.bar\fR.
-.sp
-A new Tcl command (by the same name as the tree) is also created.
-Another Tcl command or tree object can not already exist as
-\fItreeName\fR.  If the Tcl command is deleted, the tree will also be
-freed.  The new tree will contain just the root node.  Trees are by
-default, created in the current namespace, not the global namespace,
-unless \fItreeName\fR contains a namespace qualifier, such as
-"\f(CWfred::myTree\fR".
-.TP
-\fBblt::tree destroy\fR \fItreeName\fR...
-Releases one of more trees.  The Tcl command associated with
-\fItreeName\fR is also removed.  Trees are reference counted.  The
-internal tree data object isn't destroyed until no one else is using
-the tree.
-.TP
-\fBblt::tree names \fR?\fIpattern\fR?
-Returns the names of all tree objects.  if a \fIpattern\fR argument
-is given, then the only those trees whose name matches pattern will
-be listed.
-.SH NODE IDS AND TAGS
-Nodes in a tree object may be referred in either of two ways: by id or by
-tag.  Each node has a unique serial number or id that is assigned to that
-node when it's created. The id of an node never changes and id numbers
-are not re-used.
-.PP
-A node may also have any number of tags associated with it.  A tag is
-just a string of characters, and it may take any form except that of
-an integer.  For example, "\f(CWx123\fR" is valid, but "\f(CW123\fR"
-isn't.  The same tag may be associated with many different nodes.
-This is commonly done to group nodes in various interesting ways.
-.sp
-There are two built-in tags: The tag \fBall\fR is implicitly
-associated with every node in the tree.  It may be used to invoke
-operations on all the nodes in the tree.  The tag \fBroot\fR is
-managed automatically by the tree object. It applies to the node
-currently set as root.
-.sp
-When specifying nodes in tree object commands, if the specifier is an
-integer then it is assumed to refer to the single node with that id.
-If the specifier is not an integer, then it is assumed to refer to all
-of the nodes in the tree that have a tag matching the specifier.  The
-symbol \fInode\fR is used below to indicate that an argument specifies
-either an id that selects a single node or a tag that selects zero or
-more nodes.  Many tree commands only operate on a single node at a
-time; if \fInode\fR is specified in a way that names multiple items, then
-an error "refers to more than one node" is generated.
-.SH NODE MODIFIERS
-You can also specify node in relation to another node by appending one
-or more modifiers to the node id or tag.  A modifier refers to a node
-in relation to the specified node.  For example, 
-"\f(CWroot->firstchild\fR"
-selects the first subtree of the root node.
-.PP
-The following modifiers are available:
-.RS
-.TP 1i
-\fBfirstchild\fR 
-Selects the first child of the node.  
-.TP 1i
-\fBlastchild\fR 
-Selects the last child of the node.  
-.TP 1i
-\fBnext\fR 
-Selects the next node in preorder to the node.  
-.TP 1i
-\fBnextsibling\fR 
-Selects the next sibling of the node.  
-.TP 1i
-\fBparent\fR 
-Selects the parent of the node.  
-.TP 1i
-\fBprevious\fR 
-Selects the previous node in preorder to the node.  
-.TP 1i
-\fBprevsibling\fR 
-Selects the previous sibling of the node.  
-.TP 1i
-"\fIlabel\fR"
-Selects the node whose label is \fIlabel\fR.  Enclosing \fIlabel\fR in 
-quotes indicates to always search for a node by its label (for example, 
-even if the node is labeled "parent").
-.RE
-.sp
-It's an error the node can't be found.  For example,
-\fBlastchild\fR and \fBfirstchild\fR will generate errors if the node
-has no children.  The exception to this is the \fBindex\fR operation.
-You can use \fBindex\fR to test if a modifier is valid.
-.SH TREE OPERATIONS
-Once you create a tree object, you can use its Tcl command 
-to query or modify it.  The
-general form is
-.DS
-\fItreeName\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for trees are listed below.
-.TP
-\fItreeName\fR \fBancestor\fR \fInode1\fR \fInode2\fR
-Returns the mutual ancestor of the two nodes \fInode1\fR and
-\fInode2\fR.  The ancestor can be one of the two nodes.  For example,
-if \fInode1\fR and \fInode2\fR are the same nodes, their ancestor is
-\fInode1\fR.
-.TP
-\fItreeName\fR \fBapply\fR \fInode\fR ?\fIswitches\fR?
-Runs commands for all nodes matching the criteria given by
-\fIswitches\fR for the subtree designated by \fInode\fR.  By default
-all nodes match, but you can set switches to narrow the match.  This
-operation differs from \fBfind\fR in two ways: 1) Tcl commands can be
-invoked both pre- and post-traversal of a node and 2) the tree is
-always traversed in depth first order.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The valid switches are listed
-below:
-.RS
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-If pattern matching is selected (using the \fB\-exact\fR,
-\fB\-glob\fR, or \fB\-regexp\fR switches), compare the values of the
-data field keyed by \fIkey\fR instead of the node's label.  If no
-pattern matching switches are set, then any node with this data key
-will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP 1i
-\fB\-path\fR
-Use the node's full path when comparing nodes.  The node's full
-path is a list of labels, starting from the root of each ancestor
-and the node itself.
-.TP 1i
-\fB\-precommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-postcommand\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP 1i
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItreeName\fR \fBattach\fR \fItreeObject\fR ?\fIswitches\fR?
-Attaches to an existing tree object \fItreeObject\fR.  
-The current tree associated with \fItreeName\fR is discarded.  
-In addition, the current set of tags, notifier events, and traces are 
-removed. The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-newtags\fR 
-By default, the tree will share the tags of the attached tree. If this
-flag is present, the tree will start with an empty tag table.
-.RE
-.TP
-\fItreeName\fR \fBchildren\fR \fInode\fR
-Returns a list of children for \fInode\fR.  If \fInode\fR is a leaf,
-then an empty string is returned.
-.TP
-\fItreeName\fR \fBcopy\fR \fIparent\fR ?\fItree\fR? \fInode\fR ?\fIswitches\fR?
-Copies \fInode\fR into \fIparent\fR. Both nodes \fInode\fR and
-\fIparent\fR must already exist. The id of the new node is
-returned. You can also copy nodes from another tree.  If a \fItree\fR 
-argument is present, it indicates the name of the source tree.  
-The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-label\fR \fIstring\fR
-Label \fIdestNode\fR as \fIstring\fR.  By default, \fIdestNode\fR has
-the same label as \fIsrcNode\fR.
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.TP
-\fB\-recurse\fR
-Recursively copy all the subtrees of \fIsrcNode\fR as well.  In this case,
-\fIsrcNode\fR can't be an ancestor of \fIdestNode\fR as it would result
-in a cyclic copy.
-.TP
-\fB\-tags\fR
-Copy tag inforation.  Normally the following node is copied: its 
-label and data fields.  This indicates to copy tags as well.
-.RE
-.TP
-\fItreeName\fR \fBdegree\fR \fInode\fR 
-Returns the number of children of \fInode\fR.
-.TP
-\fItreeName\fR \fBdelete\fR \fInode\fR...
-Recursively deletes one or more nodes from the tree.  
-The node and all its descendants are removed.   The one exception
-is the root node.  In this case, only its descendants are removed.
-The root node will remain.  Any tags or 
-traces on the nodes are released.
-.TP
-\fItreeName\fR \fBdepth\fR \fInode\fR 
-Returns the depth of the node.  The depth is the number of 
-steps from the node to the root of the tree.  The depth of the
-root node is \f(CW0\fR.
-.TP
-\fItreeName\fR \fBdump\fR \fInode\fR 
-Returns a list of the paths and respective data for \fInode\fR
-and its descendants.  The subtree designated by \fInode\fR is
-traversed returning the following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the tree with the \fBrestore\fR operation.
-.TP
-\fItreeName\fR \fBdumpfile\fR \fInode\fR \fIfileName\fR
-Writes a list of the paths and respective data for \fInode\fR
-and its descendants to the given file \fIfileName\fR.  
-The subtree designated by \fInode\fR is traversed returning the 
-following information for each node: 1) the node's
-path relative to \fInode\fR, 2) a sublist key value pairs
-representing the node's data fields, and 3) a sublist of tags.  
-This list returned can be used
-later to copy or restore the tree with the \fBrestore\fR operation.
-.TP
-\fItreeName\fR \fBexists\fR \fInode\fR ?\fIkey\fR?
-Indicates if \fInode\fR exists in the tree.  If a \fIkey\fR argument
-is present then the command also indicates if the named data field 
-exists.
-.TP
-\fItreeName\fR \fBfind\fR \fInode\fR ?\fIswitches\fR? 
-Finds for all nodes matching the criteria given by \fIswitches\fR 
-for the subtree designated by \fInode\fR.  A list of the selected 
-nodes is returned.  By default all nodes match, but you can set
-switches to narrow the match.
-.sp
-The \fB\-exact\fR, \fB\-glob\fR, 
-and \fB\-regexp\fR switches indicate both what kind of pattern matching
-to perform and the pattern.  By default each pattern will be compared
-with the node label.  You can set more than one of these switches.  If 
-any of the patterns match (logical or), the node matches.  
-If the \fB\-key\fR switch is
-used, it designates the data field to be matched.  
-.sp
-The order in 
-which the nodes are traversed is controlled by the  \fB\-order\fR switch.
-The possible orderings are \fBpreorder\fR, \fBpostorder\fR, \fBinorder\fR, 
-and \fBbreadthfirst\fR.  The default is \fBpostorder\fR.
-.sp
-The valid switches are listed
-below:
-.RS 
-.TP 1i
-\fB\-addtag\fR \fIstring\fR 
-Add the tag \fIstring\fR to each selected node.  
-.TP 1i
-\fB\-count\fR \fInumber\fR
-Stop processing after \fInumber\fR (a positive integer) matches. 
-.TP 1i
-\fB\-depth\fR \fInumber\fR
-Descend at most \fInumber\fR (a non-negative integer) levels
-If \fInumber\fR is \f(CW1\fR this means only apply the tests
-to the children of \fInode\fR.
-.TP 1i
-\fB\-exact\fR \fIstring\fR
-Matches each node using \fIstring\fR.  The node must match \fIstring\fR
-exactly.
-.TP 1i
-\fB\-excludes\fR \fInodeList\fR
-Excludes any node in the list \fInodeList\fR from the search.  
-The subnodes of an excluded node are still examined.
-.TP 1i
-\fB\-exec\fR \fIcommand\fR
-Invoke \fIcommand\fR for each matching node.  Before \fIcommand\fR is
-invoked, the id of the node is appended.  You can control 
-processing by the return value of \fIcommand\fR.  If \fIcommand\fR 
-generates an error, processing stops and the \fBfind\fR operation 
-returns an error.  But if \fIcommand\fR returns \fBbreak\fR, then 
-processing stops, no error is generated.  If \fIcommand\fR returns 
-\fBcontinue\fR, then processing
-stops on that subtree and continues on the next.
-.TP 1i
-\fB\-glob\fR \fIstring\fR
-Test each node to \fIstring\fR using global pattern
-matching.  Matching is done in a fashion similar to that used by the
-C-shell.
-.TP 1i
-\fB\-invert\fR
-Select non-matching nodes.  Any node that \fIdoesn't\fR match
-the given criteria will be selected.
-.TP 1i
-\fB\-key\fR \fIkey\fR
-Compare the values of the data field keyed by \fIkey\fR instead of 
-the node's label. If no pattern is given (\fB\-exact\fR, \fB\-glob\fR, or 
-\fB\-regexp\fR switches), then any node with this data key will match.
-.TP 1i
-\fB\-leafonly\fR
-Only test nodes with no children.
-.TP 1i
-\fB\-nocase\fR
-Ignore case when matching patterns.
-.TP
-\fB\-order\fR \fIstring\fR 
-Traverse the tree and process nodes according to \fIstring\fR. \fIString\fR
-can be one of the following:
-.RS
-.TP 1i
-\fBbreadthfirst\fR 
-Process the node and the subtrees at each sucessive level. Each node
-on a level is processed before going to the next level.
-.TP 1i
-\fBinorder\fR 
-Recursively process the nodes of the first subtree, the node itself,
-and any the remaining subtrees.
-.TP 1i
-\fBpostorder\fR 
-Recursively process all subtrees before the node.
-.TP 1i
-\fBpreorder\fR 
-Recursively process the node first, then any subtrees.
-.RE
-.TP
-\fB\-path\fR
-Use the node's full path when comparing nodes.
-.TP
-\fB\-regexp\fR \fIstring\fR
-Test each node using \fIstring\fR as a regular expression pattern.
-.TP
-\fB\-tag\fR \fIstring\fR
-Only test nodes that have the tag \fIstring\fR.
-.RE
-.TP
-\fItreeName\fR \fBfindchild\fR \fInode\fR \fIlabel\fR
-Searches for a child node \Ilabel\fR in \fInode\fR.  The id of the 
-child node is returned if found.  Otherwise \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBfirstchild\fR \fInode\fR 
-Returns the id of the first child in the \fInode\fR's list
-of subtrees.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBget\fR \fInode\fR ?\fIkey\fR? ?\fIdefaultValue\fR?
-Returns a list of key-value pairs of data for the node.  If \fIkey\fR
-is present, then onlyx the value for that particular data field is
-returned.  It's normally an error if \fInode\fR does not contain the
-data field \fIkey\fR.  But if you provide a \fIdefaultValue\fR
-argument, this value is returned instead (\fInode\fR will still not
-contain \fIkey\fR).  This feature can be used to access a data field of
-\fInode\fR without first testing if it exists.  This operation may
-trigger \fBread\fR data traces.
-.TP
-\fItreeName\fR \fBindex\fR \fInode\fR
-Returns the id of \fInode\fR.  If \fInode\fR is a tag, it 
-can only specify one node.  If \fInode\fR does not represent a valid
-node id or tag, or has modifiers that are invalid, then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBinsert\fR \fIparent\fR ?\fIswitches\fR? 
-Inserts a new node into parent node \fIparent\fR.  
-The id of the new node is returned. The following switches 
-are available:
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts the node into \fIparent\fR's list of children at 
-position \fInumber\fR.  The default is to append \fInode\fR.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fIparent\fR.
-.TP 1i
-\fB\-data\fR \fIdataList\fR
-Sets the value for each data field in \fIdataList\fR for the 
-new node. \fIDataList\fR is a list of key-value pairs.
-.TP 1i
-\fB\-label\fR \fIstring\fR 
-Designates the labels of the node as \fIstring\fR.  By default, nodes
-are labeled as \f(CWnode0\fR, \f(CWnode1\fR, etc.
-.TP 1i
-\fB\-node\fR \fIid\fR 
-Designates the id for the node.  Normally new ids are automatically
-generated.  This allows you to create a node with a specific id.
-It is an error if the id is already used by another node in the tree.
-.TP 1i
-\fB\-tags\fR \fItagList\fR
-Adds each tag in \fItagList\fR to the new node. \fITagList\fR is a list
-of tags, so be careful if a tag has embedded spaces.
-.RE
-.TP
-\fItreeName\fR \fBis\fR \fIproperty\fR \fIargs\fR  
-Indicates the property of a node. Both \fIproperty\fR and \fIargs\fR
-determine the property being tested.  Returns \f(CW1\fR if true and
-\f(CW0\fR otherwise.  The following \fIproperty\fR and \fIargs\fR 
-are valid:
-.RS
-.TP 1i
-\fBancestor\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is an ancestor of \fInode2\fR. 
-.TP 1i
-\fBbefore\fR \fInode1\fR \fInode2\fR
-Indicates if \fInode1\fR is before \fInode2\fR in depth first traversal. 
-.TP 1i
-\fBleaf\fR \fInode\fR
-Indicates if \fInode\fR is a leaf (it has no subtrees).
-.TP 1i
-\fBroot\fR \fInode\fR
-Indicates if \fInode\fR is the designated root.  This can be changed
-by the \fBroot\fR operation.
-.RE
-.TP
-\fItreeName\fR \fBlabel\fR \fInode\fR ?\fInewLabel\fR?
-Returns the label of the node designated by \fInode\fR.  If \fInewLabel\fR
-is present, the node is relabeled using it as the new label.
-.TP
-\fItreeName\fR \fBlastchild\fR \fInode\fR
-Returns the id of the last child in the \fInode\fR's list
-of subtrees.  If \fInode\fR is a leaf (has no children), 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBmove\fR \fInode\fR \fInewParent\fR ?\fIswitches\fR?
-Moves \fInode\fR into \fInewParent\fR. \fINode\fR is appended to the
-list children of \fInewParent\fR.  \fINode\fR can not be an ancestor
-of \fInewParent\fR.  The valid flags for \fIswitches\fR are described below.
-.RS
-.TP 1i
-\fB\-after\fR \fIchild\fR 
-Position \fInode\fR after \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.TP 1i
-\fB\-at\fR \fInumber\fR 
-Inserts \fInode\fR into \fIparent\fR's list of children at 
-position \fInumber\fR. The default is to append the node.
-.TP 1i
-\fB\-before\fR \fIchild\fR 
-Position \fInode\fR before \fIchild\fR.  The node \fIchild\fR must be a 
-child of \fInewParent\fR.
-.RE
-.TP
-\fItreeName\fR \fBnext\fR \fInode\fR
-Returns the next node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the last node in the tree, 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBnextsibling\fR \fInode\fR
-Returns the node representing the next subtree from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the last child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBnotify\fR \fIargs\fR 
-Manages notification events that indicate that the tree structure has 
-been changed.
-See the 
-.SB "NOTIFY OPERATIONS"
-section below.
-.TP
-\fItreeName\fR \fBparent\fR \fInode\fR
-Returns the parent node of \fInode\fR.  If \fInode\fR is the root
-of the tree, 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBpath\fR \fInode\fR
-Returns the full path (from root) of \fInode\fR.
-.TP
-\fItreeName\fR \fBposition\fR \fInode\fR
-Returns the position of the node in its parent's list of children.
-Positions are numbered from 0.
-The position of the root node is always 0.
-.TP
-\fItreeName\fR \fBprevious\fR \fInode\fR
-Returns the previous node from \fInode\fR in a preorder traversal.
-If \fInode\fR is the root of the tree, 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBprevsibling\fR \fInode\fR
-Returns the node representing the previous subtree from \fInode\fR
-in its parent's list of children.  If \fInode\fR is the first child, 
-then \f(CW-1\fR is returned.
-.TP
-\fItreeName\fR \fBrestore\fR \fInode\fR \fIdataString\fR \fIswitches\fR
-Performs the inverse function of the \fBdump\fR operation, restoring
-nodes to the tree. The format of \fIdataString\fR is exactly what is 
-returned by the \fBdump\fR operation.  It's a list containing information
-for each node to be restored.  The information consists of 1) the relative
-path of the node, 2) a sublist of key value pairs representing the 
-node's data, and 3) a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItreeName\fR \fBrestorefile\fR \fInode\fR \fIfileName\fR \fIswitches\fR
-Performs the inverse function of the \fBdumpfile\fR operation, restoring
-nodes to the tree from the file \fIfileName\fR. The format of 
-\fIfileName\fR is exactly what is returned by the \fBdumpfile\fR operation.  
-It's a list containing information for each node to be restored.  
-The information consists of 1) the relative path of the node, 2) 
-a sublist of key value pairs representing the node's data, and 3) 
-a list of tags for the node.  Nodes are created 
-starting from \fInode\fR. Nodes can be listed in any order.  If a node's 
-path describes ancestor nodes that do not already exist, they are 
-automatically created.  The valid \fIswitches\fR are listed below:
-.RS
-.TP
-\fB\-overwrite\fR
-Overwrite nodes that already exist.  Normally nodes are always
-created, even if there already exists a node by the same name.  This
-switch indicates to add or overwrite the node's data fields.
-.RE
-.TP
-\fItreeName\fR \fBroot\fR ?\fInode\fR?
-Returns the id of the root node.  Normally this is node \f(CW0\fR.  If
-a \fInode\fR argument is provided, it will become the new root of the
-tree. This lets you temporarily work within a subset of the tree.
-Changing root affects operations such as \fBnext\fR, \fBpath\fR,
-\fBprevious\fR, etc.
-.TP
-\fItreeName\fR \fBset\fR \fInode\fR \fIkey value\fR ?\fIkey value\fR...?
-Sets one or more data fields in \fInode\fR. \fINode\fR may 
-be a tag that represents several nodes.  \fIKey\fR is the
-name of the data field to be set and \fIvalue\fR is its respective
-value.  This operation may trigger \fBwrite\fR and \fBcreate\fR data traces.
-.TP
-\fItreeName\fR \fBsize\fR \fInode\fR
-Returns the number of nodes in the subtree. This includes the node
-and all its descendants.  The size of a leaf node is 1.
-.TP
-\fItreeName\fR \fBsort\fR \fInode\fR ?\fIswitches\fR? 
-.RS
-.TP 1i
-\fB\-ascii\fR 
-Compare strings using the ASCII  collation order.
-.TP 1i
-\fB\-command\fR \fIstring\fR
-Use command \fIstring\fR as a comparison command.  To compare two
-elements, evaluate a Tcl script consisting of command with the two
-elements appended as additional arguments.  The script should return
-an integer less than, equal to, or greater than zero if the first
-element is to be considered less than, equal to, or greater than the
-second, respectively.
-.TP 1i
-\fB\-decreasing\fR
-Sort in decreasing order (largest items come first).
-.TP 1i
-\fB\-dictionary\fR
-Compare strings using a dictionary-style comparison.  This is the same 
-as \fB\-ascii\fR except (a) case is ignored except as a tie-breaker and (b) 
-if two strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, in \fB\-dictionary\fR mode, bigBoy sorts between
-bigbang and bigboy, and x10y sorts between x9y and x11y.
-.TP 1i
-\fB\-integer\fR
-Compare the nodes as integers.  
-.TP 1i
-\fB\-key\fR \fIstring\fR
-Sort based upon the node's data field keyed by \fIstring\fR. Normally
-nodes are sorted according to their label. 
-.TP 1i
-\fB\-path\fR
-Compare the full path of each node.  The default is to compare only its
-label.
-.TP 1i
-\fB\-real\fR
-Compare the nodes as real numbers.
-.TP 1i
-\fB\-recurse\fR
-Recursively sort the entire subtree rooted at \fInode\fR.
-.TP 1i
-\fB\-reorder\fR 
-Recursively sort subtrees for each node.  \fBWarning\fR.  Unlike
-the normal flat sort, where a list of nodes is returned, this will
-reorder the tree.  
-.RE
-.TP
-\fItreeName\fR \fBtag\fR \fIargs\fR
-Manages tags for the tree object.
-See the 
-.SB "TAG OPERATIONS"
-section below.
-.TP
-\fItreeName\fR \fBtrace\fR \fIargs\fR
-Manages traces for data fields in the tree object.
-Traces cause Tcl commands to be executed whenever a data field of a
-node is created, read, written, or unset.  Traces can be set for a
-specific node or a tag, representing possibly many nodes.
-See the 
-.SB "TRACE OPERATIONS"
-section below.
-.TP
-\fItreeName\fR \fBunset\fR \fInode\fR \fIkey\fR...
-Removes one or more data fields from \fInode\fR. \fINode\fR may 
-be a tag that represents several nodes.  \fIKey\fR is the
-name of the data field to be removed.  It's not an error is
-\fInode\fR does not contain \fIkey\fR.  
-This operation may trigger \fBunset\fR data traces.
-.RE
-.SH TAG OPERATIONS
-Tags are a general means of selecting and marking nodes in the tree.
-A tag is just a string of characters, and it may take any form except
-that of an integer.  The same tag may be associated with many
-different nodes.  
-.sp
-There are two built-in tags: The tag \fBall\fR is implicitly
-associated with every node in the tree.  It may be used to invoke
-operations on all the nodes in the tree.  The tag \fBroot\fR is
-managed automatically by the tree object.  It specifies the node
-that is currently set as the root of the tree.
-.sp
-Most tree operations use tags.  And several operations let you
-operate on multiple nodes at once.  For example, you can use the
-\fBset\fR operation with the tag \fBall\fR to set a data field in 
-for all nodes in the tree.
-.PP
-Tags are invoked by the \fBtag\fR operation.  The
-general form is
-.DS
-\fItreeName\fR \fBtag\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below.
-.TP
-\fItreeName\fR \fBtag add\fR \fIstring\fR \fInode\fR...
-Adds the tag \fIstring\fR to one of more nodes.
-.TP
-\fItreeName\fR \fBtag delete\fR \fIstring\fR \fInode\fR...
-Deletes the tag \fIstring\fR from one or more nodes.  
-.TP
-\fItreeName\fR \fBtag forget\fR \fIstring\fR
-Removes the tag \fIstring\fR from all nodes.  It's not an error if no
-nodes are tagged as \fIstring\fR.
-.TP
-\fItreeName\fR \fBtag get\fR \fInode\fR \fIpattern\fR...
-Returns the tag names for a given node.  If one of more pattern
-arguments are provided, then only those matching tags are returned.
-.TP
-\fItreeName\fR \fBtag names\fR ?\fInode\fR?
-Returns a list of tags used by the tree.  If a \fInode\fR argument
-is present, only those tags used by \fInode\fR are returned.
-.TP
-\fItreeName\fR \fBtag nodes\fR \fIstring\fR
-Returns a list of nodes that have the tag \fIstring\fR.  If no node
-is tagged as \fIstring\fR, then an empty string is returned.
-.TP
-\fItreeName\fR \fBtag set\fR \fInode\fR \fIstring\fR...
-Sets one or more tags for a given node.  Tag names can't start with a
-digit (to distinquish them from node ids) and can't be a reserved tag
-("root" or "all").
-.TP
-\fItreeName\fR \fBtag unset\fR \fInode\fR \fIstring\fR...  
-Removes one or more tags from a given node. Tag names that don't exist 
-or are reserved ("root" or "all") are silently ignored.
-.SH TRACE OPERATIONS
-Data fields can be traced much in the same way that you can trace Tcl
-variables.  Data traces cause Tcl commands to be executed whenever a
-particular data field of a node is created, read, written, or unset.
-A trace can apply to one or more nodes.  You can trace a specific node
-by using its id, or a group of nodes by a their tag.
-.PP
-The tree's \fBget\fR, \fBset\fR, and \fBunset\fR operations can 
-trigger various traces.  The \fBget\fR operation can cause 
-a \fIread\fR  trace to fire.  The \fBset\fR operation causes a \fIwrite\fR 
-trace to fire.  And if the data field is written for the first time, you
-will also get a \fIcreate\fR trace.
-The \fBunset\fR operation triggers \fIunset\fR traces.
-.PP
-Data traces are invoked by the \fBtrace\fR
-operation.  The general form is
-.DS
-\fItreeName\fR \fBtrace\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for traces are listed below.
-.TP
-\fItreeName\fR \fBtrace create\fR \fInode\fR \fIkey\fR \fIops\fR \fIcommand\fR
-Creates a trace for \fInode\fR on data field \fIkey\fR.  \fINode\fR
-can refer to more than one node (for example, the tag \fBall\fR). If
-\fInode\fR is a tag, any node with that tag can possibly trigger a trace,
-invoking \fIcommand\fR.  
-\fICommand\fR is command prefix, typically a procedure name.
-Whenever a trace is triggered, four arguments are appended to
-\fIcommand\fR before it is invoked: \fItreeName\fR, id of the
-node, \fIkey\fR and, \fIops\fR.
-Note that no nodes need have the field \fIkey\fR.  
-A trace identifier in the form "\f(CWtrace0\fR", "\f(CWtrace1\fR", etc.
-is returned.  
-.sp
-\fIOps\fR indicates which operations are of
-interest, and consists of one or more of the following letters:
-.RS
-.TP
-\fBr\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is read. Both read and
-write traces are temporarily disabled when \fIcommand\fR is executed.
-.TP
-\fBw\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is written.  Both read and
-write traces are temporarily disabled when \fIcommand\fR is executed.
-.TP
-\fBc\fR
-Invoke \fIcommand\fR whenever \fIkey\fR is created.
-.TP
-\fBu\fR 
-Invoke \fIcommand\fR whenever \fIkey\fR is unset.  Data fields are
-typically unset with the \fBunset\fR command.   Data fields are also 
-unset when the tree is released, but all traces are disabled prior
-to that.
-.sp
-.RE
-.TP
-\fItreeName\fR \fBtrace delete\fR \fItraceId\fR...
-Deletes one of more traces.  \fITraceId\fR is
-the trace identifier returned by the \fBtrace create\fR operation.
-.TP
-\fItreeName\fR \fBtrace info\fR \fItraceId\fR 
-Returns information about the trace \fItraceId\fR.  \fITraceId\fR
-is a trace identifier previously returned by the \fBtrace create\fR operation.
-It's the same information specified for the \fBtrace create\fR operation.
-It consists of the node id or tag, data field key, a string of letters
-indicating the operations that are traced (it's in the same
-form as \fIops\fR) and, the command prefix.
-.TP
-\fItreeName\fR \fBtrace names\fR
-Returns a list of identifers for all the current traces.
-.SH NOTIFY OPERATIONS
-Tree objects can be shared among many clients, such as a
-\fBhiertable\fR widget.  Any client can create or delete nodes,
-sorting the tree, etc.  You can request to be notified whenever these
-events occur.  Notify events cause Tcl commands to be executed
-whenever the tree structure is changed.  
-.PP
-Notifications are handled by the \fBnotify\fR operation.  The
-general form is
-.DS
-\fItreeName\fR \fBnotify\fR \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for events are listed below.
-.TP
-\fItreeName\fR \fBnotify create\fR ?\fIswitches\fR? \fIcommand\fR \fR?\fIargs\fR?...  
-Creates a notifier for the tree.  A notify identifier in the form
-"\f(CWnotify0\fR", "\f(CWnotify1\fR", etc.  is returned.
-.sp
-\fICommand\fR and \fIargs\fR are saved and invoked whenever the tree
-structure is changed (according to \fIswitches\fR). Two arguments are
-appended to \fIcommand\fR and \fIargs\fR before it's invoked: the id
-of the node and a string representing the type of event that occured.
-One of more switches can be set to indicate the events that are of
-interest.  The valid switches are as follows:
-.RS
-.TP 1i
-\fB\-create\fR 
-Invoke \fIcommand\fR whenever a new node has been added.
-.TP 1i
-\fB\-delete\fR
-Invoke \fIcommand\fR whenever a node has been deleted.
-.TP 1i
-\fB\-move\fR
-Invoke \fIcommand\fR whenever a node has been moved.
-.TP 1i
-\fB\-sort\fR
-Invoke \fIcommand\fR whenever the tree has been sorted and reordered.
-.TP 1i
-\fB\-relabel\fR
-Invoke \fIcommand\fR whenever a node has been relabeled.
-.TP 1i
-\fB\-allevents\fR
-Invoke \fIcommand\fR whenever any of the above events occur.
-.TP 1i
-\fB\-whenidle\fR
-When an event occurs don't invoke \fIcommand\fR immediately, but
-queue it to be run the next time the event loop is entered and there 
-are no events to process.  If subsequent events occur before 
-the event loop is entered, \fIcommand\fR will still be 
-invoked only once.
-.RE
-.TP
-\fItreeName\fR \fBnotify delete\fR \fInotifyId\fR 
-Deletes one or more notifiers from the tree.  \fINotifyId\fR is the
-notifier identifier returned by the \fBnotify create\fR operation.
-.TP
-\fItreeName\fR \fBnotify info\fR \fInotifyId\fR
-Returns information about the notify event \fInotifyId\fR.  \fINotifyId\fR
-is a notify identifier previously returned by the \fBnotify create\fR operation.
-It's the same information specified for the \fBnotify create\fR operation.
-It consists of the notify id, a sublist of event flags (it's in the same
-form as \fIflags\fR) and, the command prefix.
-.TP
-\fItreeName\fR \fBnotify names\fR
-Returns a list of identifers for all the current notifiers.
-.SH C LANGUAGE API
-Blt_TreeApply, 
-Blt_TreeApplyBFS, 
-Blt_TreeApplyDFS, 
-Blt_TreeChangeRoot, 
-Blt_TreeCreate, 
-Blt_TreeCreateEventHandler, 
-Blt_TreeCreateNode, 
-Blt_TreeCreateTrace, 
-Blt_TreeDeleteEventHandler, 
-Blt_TreeDeleteNode, 
-Blt_TreeDeleteTrace, 
-Blt_TreeExists, 
-Blt_TreeFindChild, 
-Blt_TreeFirstChild, 
-Blt_TreeFirstKey, 
-Blt_TreeGetNode, 
-Blt_TreeGetToken, 
-Blt_TreeGetValue, 
-Blt_TreeIsAncestor, 
-Blt_TreeIsBefore, 
-Blt_TreeIsLeaf, 
-Blt_TreeLastChild, 
-Blt_TreeMoveNode, 
-Blt_TreeName, 
-Blt_TreeNextKey, 
-Blt_TreeNextNode, 
-Blt_TreeNextSibling, 
-Blt_TreeNodeDegree, 
-Blt_TreeNodeDepth, 
-Blt_TreeNodeId, 
-Blt_TreeNodeLabel, 
-Blt_TreeNodeParent, 
-Blt_TreePrevNode, 
-Blt_TreePrevSibling, 
-Blt_TreeRelabelNode, 
-Blt_TreeReleaseToken, 
-Blt_TreeRootNode, 
-Blt_TreeSetValue, 
-Blt_TreeSize, 
-Blt_TreeSortNode, and
-Blt_TreeUnsetValue.
-.SH KEYWORDS
-tree, hiertable, widget
diff --git a/blt3.0/man/treeview.mann b/blt3.0/man/treeview.mann
deleted file mode 100644
index f172f37..0000000
--- a/blt3.0/man/treeview.mann
+++ /dev/null
@@ -1,2264 +0,0 @@
-'\"
-'\" Copyright 2001-2 by Silicon Metrics Corporation.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Silicon Metrics or any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Silicon Metrics disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Silicon Metrics be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" The hierarchical table widget created by George Howlett.
-'\"
-.so man.macros
-.TH treeview n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBtreeview\fR \- Create and manipulate hierarchical table widgets
-.BE
-.SH SYNOPSIS
-\fBblt::treeview\fR \fIpathName \fR?\fIoptions\fR?
-.SH DESCRIPTION
-The \fBtreeview\fR widget displays a tree of data.  It replaces both
-the \fBhiertable\fR and \fBhierbox\fR widgets.  The \fBtreeview\fR is
-100% syntax compatible with the \fBhiertable\fR widget.  The
-\fBhiertable\fR command is retained for sake of script-level
-compatibility.  This widget obsoletes the \fBhierbox\fR widget.  It
-does everything the old \fBhierbox\fR widget did, but also provides
-data sharing (via \fItree data objects\fR) and the ability to tag
-nodes.
-.SH INTRODUCTION
-The \fBtreeview\fR widget displays hierarchical data.  Data is
-represented as nodes in a general-ordered tree.  Each node may have
-sub-nodes and these nodes can in turn has their own children.
-.PP
-A node is displayed as a row entry in the widget.  Each entry has a
-text label and icon.  When a node has children, its entry is drawn
-with a small button to the left of the label.  Clicking the mouse over
-this button opens or closes the node.  When a node is \fIopen\fR, its
-children are exposed.  When it is \fIclosed\fR, the children and their
-descedants are hidden.  The button is normally a \f(CW+\fR or
-\f(CW\-\fR symbol (ala Windows Explorer), but can be replaced with a
-pair of Tk images (open and closed images).
-.PP
-If the node has data associated with it, they can be displayed in
-columns running vertically on either side the tree.  You can control
-the color, font, etc of each entry.  Any entry label or data field can
-be edited in-place.
-.SH "TREE DATA OBJECT"
-The tree is not stored inside the widget but in a tree data object
-(see the \fBtree\fR command for a further explanation).  Tree data
-objects can be shared among different clients, such as a
-\fBtreeview\fR widget or the \fBtree\fR command.  You can walk the
-tree and manage its data with the \fBtree\fR command tree, while
-displaying it with the \fBtreeview\fR widget.  Whenever the tree is
-updated, the \fBtreeview\fR widget is automatically redrawn.
-.PP
-By default, the \fBtreeview\fR widget creates its own tree object.
-The tree initially contains just a root node.  But you can also
-display trees created by the \fBtree\fR command using the \fB\-tree\fR
-configuration option.  \fBTreeview\fR widgets can share the same tree
-object, possibly displaying different views of the same data.
-.PP
-A tree object has both a Tcl and C API.  You can insert or delete
-nodes using \fBtreeview\fR widget or \fBtree\fR command operations,
-but also from C code.  For example, you can load the tree from your C
-code while still managing and displaying the tree from Tcl. The widget
-is automatically notified whenever the tree is modified via C or Tcl.
-.SH SYNTAX
-.DS
-\fBblt::treeview \fIpathName \fR?\fIoption value\fR?...
-.DE
-The \fBtreeview\fR command creates a new window \fIpathName\fR and
-makes it into a \fBtreeview\fR widget.  At the time this command is
-invoked, there must not exist a window named \fIpathName\fR, but
-\fIpathName\fR's parent must exist.  Additional options may be
-specified on the command line or in the option database to configure
-aspects of the widget such as its colors and font.  See the
-\fBconfigure\fR operation below for the exact details about what
-\fIoption\fR and \fIvalue\fR pairs are valid.
-.PP
-If successful, \fBtreeview\fR returns the path name of the widget.  It
-also creates a new Tcl command by the same name.  You can use this
-command to invoke various operations that query or modify the widget.
-The general form is:
-.DS
-\fIpathName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available are described in the
-.SB "TREEVIEW OPERATIONS"
-section.
-.SH "IDS AND TAGS"
-Nodes can be inserted into a tree using the \fBtreeview\fR widget 
-.CS
-blt::treeview .t
-set node [.t insert end root "one"]
-.CE
-or \fBtree\fR command. 
-.CS
-set tree [blt::tree create]
-set node [$tree insert root "one"]
-.CE
-In both cases, a number identifying the node is returned (the value of
-\f(CW$node\fR).  This serial number or \fIid\fR uniquely identifies
-the node.  Please note that you can't infer a location or position of
-a node from its id.  The only exception is that the root node is
-always id \f(CW0\fR. Since nodes may have the same labels or be moved
-within the tree, ids provide an convenient way to identify nodes.  If
-a tree is shared, the ids will be the same regardless if you are using
-by the \fBtreeview\fR widget or the \fBtree\fR command.  Ids are
-recycled when the node deleted.
-.PP
-A node may also have any number of \fItags\fR associated with it.  A
-tag is just a string of characters, and it may take any form except
-that of an integer.  For example, "\f(CWx123\fR" is valid, but
-"\f(CW123\fR" isn't.  The same tag may be associated with many
-different nodes.  This is typically done to associate a group of
-nodes.  Many operations in the \fBtreeview\fR widget take either node
-ids or tag names as arguments.  Using a tag says to apply the operation
-to all nodes with that tag.
-.PP
-The tag \fBall\fR is implicitly associated with every node in
-the tree.  It may be used to invoke operations on all the nodes in the
-tree. 
-.PP
-Tags may be shared, just like trees, between clients.  For example,
-you can use the tags created by the \fBtree\fR command with
-\fBtreeview\fR widgets.
-.SH SPECIAL NODE IDS
-There are also several special non-numeric ids.  Special ids differ
-from tags in that they are always translated to their numeric
-equivalent.  They also take precedence over tags.  For example, you
-can't use a tag name that is a special id.  These ids are specific to
-the \fBtreeview\fR widget.
-.TP 15
-\fBactive\fR
-The node where the mouse pointer is currently located.
-When a node is active, it is drawn using its active icon 
-(see the \fB\-activeicon\fR option).
-The \fBactive\fR id is changed automatically by moving the mouse
-pointer over another node or by using the \fBentry activate\fR
-operation. Note that there can be only one active node at a time.
-.TP 15
-\fBanchor\fR
-The node representing the fixed end of the current selection.  
-The anchor is set by the \fBselection anchor\fR operation.
-.TP 15
-\fBcurrent\fR
-The node where the mouse pointer is currently located.
-But unlike \fBactive\fR, this id changes while the
-selection is dragged.  It is used to determine the
-current node during button drags.
-.TP 15
-\fBdown\fR
-The next open node from the current focus. The \fBdown\fR of
-the last open node is the same.
-.TP 15
-\fBend\fR
-The last open node (in depth-first order) on the tree.  
-.TP 15
-\fBfocus\fR
-The node that currently has focus.  When a node has focus,
-it receives key events.  To indicate focus, the node
-is drawn with a dotted line around its label.  You can change the 
-focus using the \fBfocus\fR operation.
-.TP 15
-\fBlast\fR
-The last open node from the current focus. But unlike \fBup\fR,
-when the focus is at root, \fBlast\fR wraps around to the last
-open node in the tree.
-.TP 15
-\fBmark\fR
-The node representing the non-fixed end of the current selection.  
-The mark is set by the \fBselection mark\fR operation.
-.TP 15
-\fBnext\fR
-The next open node from the current focus.  But unlike \fBdown\fR,
-when the focus is on last open node, \fBnext\fR wraps around to the 
-root node.
-.TP 15
-\fBnextsibling\fR
-The next sibling from the node with the current focus.  If the node
-is already the last sibling then it is the \fBnextsibling\fB.
-.TP 15
-\fBparent\fR
-The parent of the node with the current focus. The \fBparent\fR
-of the root is also the root.
-.TP 15
-\fBprevsibling\fR
-The previous sibling from the node with the current focus.  If the node
-is already the first sibling then it is the \fBprevsibling\fB.
-.TP 15
-\fBroot\fR
-The root node. You can also use id \f(CW0\fR to indicate
-the root.
-.TP 15
-\fBup\fR
-The last open node (in depth-first order) from the current focus. The
-\fBup\fR of the root node (i.e. the root has focus) is also the root.
-.TP 15
-\fBview.top\fR
-First node that's current visible in the widget.
-.TP 15
-\fBview.bottom\fR
-Last node that's current visible in the widget.
-.TP 15
-\fB@\fIx\fB,\fIy\fR
-Indicates the node that covers the point in the treeview window
-specified by \fIx\fR and \fIy\fR (in pixel coordinates).  If no
-part of the entryd covers that point, then the closest node to that
-point is used.
-.PP
-A node may be specified as an id or tag. If the specifier is an
-integer then it is assumed to refer to the single node with that id.
-If the specifier is not an integer, it's checked to see if it's a
-special id (such as focus).  Otherwise, it's assumed to be tag.  Some
-operations only operate on a single node at a time; if a tag refers to
-more than one node, then an error is generated.
-.SH DATA FIELDS
-A node in the tree can have \fIdata fields\fR.  A data field is a
-name-value pair, used to represent arbitrary data in the node.  Nodes
-can contain different fields (they aren't required to contain the same
-fields).  You can optionally display these fields in the
-\fBtreeview\fR widget in columns running on either side of the
-displayed tree.  A node's value for the field is drawn in the column
-along side its node in the hierarchy.  Any node that doesn't have a
-specific field is left blank.  Columns can be interactively resized,
-hidden, or, moved.
-.SH ENTRY BINDINGS
-You can bind Tcl commands to be invoked when events occur on nodes
-(much like Tk canvas items).  You can bind a node using its id or
-its \fIbindtags\fR.  Bindtags are simply names that associate a
-binding with one or more nodes.  There is a built-in tag \f(CWall\fR
-that all node entries automatically have.
-.SH "TREEVIEW OPERATIONS"
-The \fBtreeview\fR operations are the invoked by specifying
-the widget's pathname, the operation, and any arguments that pertain 
-to that operation.  The general form is:
-.sp
-.CS
-\fIpathName operation \fR?\fIarg arg ...\fR?
-.CE
-.sp
-\fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
-command.  The following operation are available for \fBtreeview\fR widgets:
-.TP
-\fIpathName \fBbbox\fR ?\fB-screen\fR? \fItagOrId...\fR
-Returns a list of 4 numbers, representing a bounding box of around
-the specified entries. The entries is given by one or more \fItagOrId\fR 
-arguments.  
-If the \fB\-screen\fR flag is given, then the x-y coordinates
-of the bounding box are returned as screen coordinates, not 
-virtual coordinates. Virtual coordinates start from \f(CW0\fR from the
-root node.
-The returned list contains the following values.
-.RS
-.TP 1.25i
-\fIx\fR 
-X-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIy\fR
-Y-coordinate of the upper-left corner of the bounding box.
-.TP
-\fIwidth\fR
-Width of the bounding box.
-.TP
-\fIheight\fR
-Height of the bounding box.
-.RE
-.TP
-\fIpathName \fBbind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for a node with this
-tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
-\fBbind\fR command except that it operates on \fBtreeview\fR entries, 
-rather than widgets. See the \fBbind\fR manual entry for
-complete details on \fIsequence\fR and the substitutions performed on 
-\fIcommand\fR before invoking it.  
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton \fIoperation\fR ?\fIargs\fR?
-This command is used to control the button selectors within a 
-\fBtreeview\fR widget.  
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBbutton activate\fR \fItagOrId\fR
-Designates the node given by \fItagOrId\fR as active.  
-When a node is active it's entry is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active entry at a time.
-The special id \fBactive\fR indicates the currently active node.
-.TP
-\fIpathName \fBbutton bind\fR \fItagName\fR ?\fIsequence command\fR?
-Associates \fIcommand\fR with \fItagName\fR such that whenever the
-event sequence given by \fIsequence\fR occurs for an button of a
-node entry with this tag, \fIcommand\fR will be invoked.  The syntax is
-similar to the \fBbind\fR command except that it operates on
-\fBtreeview\fR buttons, rather than widgets. See the \fBbind\fR
-manual entry for complete details on \fIsequence\fR and the
-substitutions performed on \fIcommand\fR before invoking it.
-.sp
-If all arguments are specified then a new binding is created, replacing 
-any existing binding for the same \fIsequence\fR and \fItagName\fR.
-If the first character of \fIcommand\fR is \f(CW+\fR then \fIcommand\fR 
-augments an existing binding rather than replacing it. 
-If no \fIcommand\fR argument is provided then the command currently
-associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
-if there's no such binding) is returned.  If both \fIcommand\fR and 
-\fIsequence\fR are missing then a list of all the event sequences for 
-which bindings have been defined for \fItagName\fR. 
-.TP
-\fIpathName \fBbutton cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBbutton configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "BUTTON OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBcget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBclose \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Closes the node specified by \fItagOrId\fR.  In addition, if a Tcl
-script was specified by the \fB\-closecommand\fR option, it is
-invoked.  If the node is already closed, this command has no effect.
-If the \fB\-recurse\fR flag is present, each child node is
-recursively closed.
-.TP
-\fIpathName \fBcolumn \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview columns.
-.RS
-.TP
-\fIpathName \fBcolumn activate\fR \fIcolumn\fR
-Sets the active column to \fIcolumn\fR.  \fIColumn\fR is the
-name of a column in the widget.
-When a column is active, it's drawn using its \fB\-activetitlebackground\fR
-and \fB\-activetitleforeground\fR options.  If \fIcolumn\fR is the \f(CW""\fR,
-then no column will be active.  If no column argument is provided, then
-the name of the currently active column is returned.
-.TP
-\fIpathName \fBcolumn cget\fR \fIname\fR \fIoption\fR
-Returns the current value of the column configuration option given
-by \fIoption\fR for \fIname\fR.  \fIName\fR is the name of column
-that corresponds to a data field.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBcolumn configure\fR \fIname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the column designated
-by \fIname\fR. \fIName\fR is the name of the column corresponding
-to a data field.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "COLUMN OPTIONS" 
-below.
-.TP
-\fIpathName \fBcolumn delete\fR \fIfield\fR ?\fIfield\fR...?
-Deletes one of more columns designated by \fIfield\fR.  Note
-that this does not delete the data fields themselves.
-.TP
-\fIpathName \fBcolumn insert\fR \fIposition\fR \fIfield\fR ?\fIoptions\fR...?
-Inserts one of more columns designated by \fIfield\fR.  A column displays
-each node's data field by the same name.  If the node doesn't
-have the given field, the cell is left blank.
-\fIPosition\fR
-indicates where in the list of columns to add the new column.  It may be
-either a number or \f(CWend\fR. 
-.TP
-\fIpathName \fBcolumn invoke\fR \fIfield\fR
-Invokes the Tcl command associated with the column \fIfield\fR, 
-if there is one (using the column's \fB\-command\fR option).  
-The command is ignored if the column's \fB\-state\fR option 
-set to \f(CWdisabled\fR.
-.TP
-\fIpathName \fBcolumn move \fIname\fR \fIdest\fR 
-Moves the column \fIname\fR to the destination position.  
-\fIDest\fR is the name of another column or a screen position
-in the form \f(CW@\fIx\f(CW,\fIy\fR.
-.TP
-\fIpathName \fBcolumn names\fR
-Returns a list of the names of all columns in the widget.
-The list is ordered as the columns are drawn from left-to-right.
-.TP
-\fIpathName \fBcolumn nearest\fR \fIx\fR ?\fIy\fR?
-Returns the name of the column closest to the given X-Y screen
-coordinate.  If you provide a \fIy\fR argument (it's optional),
-a name is returned only when if the point is over a column's title.
-.RE
-.TP
-\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section
-.SB "TREEVIEW OPTIONS"
-below.
-.TP
-\fIpathName \fBcurselection\fR
-Returns a list containing the ids of all of the entries that are 
-currently selected.
-If there are no entries selected, then the empty string is returned.
-.TP
-\fIpathName \fBdelete \fItagOrId\fR...
-Deletes one or more entries given by \fItagOrId\fR and its children.
-.TP
-\fIpathName \fBentry \fIoperation\fR ?\fIargs\fR?
-The following operations are available for treeview entries.
-.RS
-.TP
-\fIpathName \fBentry activate\fR \fItagOrId\fR
-Sets the active entry to the one specified by \fItagOrId\fR.  
-When an entry is active it is drawn using its active icon 
-(see the \fB\-activeicon\fR option). 
-Note that there can be only one active node at a time.
-The special id of the currently active node is \fBactive\fR.
-.TP
-\fIpathName \fBentry cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBentry children\fR \fItagOrId\fR  ?\fIfirst\fR? ?\fIlast\fR?
-Returns a list of ids for the given range of children of \fItagOrId\fR.  
-\fITagOrId\fR is the id or tag of the node to be examined.
-If only a \fIfirst\fR argument is present, then the id 
-of the that child at that numeric position is returned.  If both \fIfirst\fR 
-and \fIlast\fR arguments are given, then the ids of all the children
-in that range are returned.  Otherwise the ids of all children
-are returned.  
-.TP
-\fIpathName \fBentry configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.TP
-\fIpathName \fBentry delete\fR \fItagOrId\fR ?\fIfirst\fR ?\fIlast\fR?
-Deletes the one or more children nodes of the parent \fItagOrId\fR.
-If \fIfirst\fR and \fIlast\fR arguments are present, they are
-positions designating a range of children nodes to be deleted.
-.TP
-\fIpathName \fBentry isbefore \fItagOrId1\fR \fItagOrId2\fR
-Returns 1 if \fItagOrId1\fR is before \fItagOrId2\fR and 0 otherwise.
-.TP
-\fIpathName \fBentry ishidden \fItagOrId\fR
-Returns 1 if the node is currently hidden and 0 otherwise.  A node is
-also hidden if any of its ancestor nodes are closed or hidden.
-.TP
-\fIpathName \fBentry isopen \fItagOrId\fR
-Returns 1 if the node is currently open and 0 otherwise.
-.TP
-\fIpathName \fBentry size\fR \fB\-recurse\fR \fItagOrId\fR
-Returns the number of children for parent node \fItagOrId\fR.  
-If the \fB\-recurse\fR flag is set, the number of all 
-its descendants is returned.  The node itself is not counted.
-.RE
-.TP
-\fIpathName \fBfind \fR?\fIflags\fR? \fIfirst\fR \fIlast\fR
-Finds for all entries matching the criteria given by \fIflags\fR.  A
-list of ids for all matching nodes is returned. \fIFirst\fR and
-\fIlast\fR are ids designating the range of the search in
-depth-first order. If \fIlast\fR is before \fIfirst\fR, then nodes
-are searched in reverse order.  The valid flags are:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Patterns must match exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Pick entries that don't match.  
-.TP 1.25i
-\fB\-exec\fI string\fR
-Specifies a Tcl script to be invoked for each matching node.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP 1.25i
-\fB\-count\fI number\fR
-Stop searching after \fInumber\fR matches.
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBfocus \fR \fItagOrId\fR
-Sets the focus to the node given by \fItagOrId\fR.  When a node
-has focus, it can receive keyboard events.   
-The special id \fBfocus\fR designates the node that currently has focus.
-.TP
-\fIpathName \fBget \fR?\fB\-full\fR? \fItagOrId\fR \fItagOrId\fR...
-Translates one or more ids to their node entry names.  It returns a list of 
-names for all the ids specified.  If the \fB\-full\fR
-flag is set, then the full pathnames are returned.  
-.sp
-Note: If the \fB\-separator\fR option is the empty string (the default), 
-the result is always a list of lists, even if there is only one node
-specified.
-.TP 
-\fIpathName \fBhide \fR?\fBflags\fR? \fItagOrId\fR...
-Hides all nodes matching the criteria given by \fIflags\fR.  The
-search is performed recursively for each node given by \fItagOrId\fR.
-The valid flags are described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the node entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Hide nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBindex \fR?\fB\-at\fR ?\fB\-path\fR? \fItagOrId\fR? \fIstring\fR 
-Returns the id of the node specified by \fIstring\fR.  \fIString\fR
-may be a tag or node id.
-Some special ids are normally relative to the node that 
-has focus.  The \fB\-at\fR flag lets you select another node.
-.TP
-\fIpathName \fBinsert \fR?\fB\-at \fItagOrId\fR? \fIposition\fR \fIpath\fR ?\fIoptions...\fR? ?\fIpath\fR? ?\fIoptions...\fR? 
-Inserts one or more nodes at \fIposition\fR.  \fIPosition\fR is the
-location (number or \f(CWend\fR) where the new nodes are added to
-the parent node.  \fIPath\fR is the pathname of the new node.
-Pathnames can be formated either as a Tcl list (each element is a path
-component) or as a string separated by a special character sequence
-(using the \fB\-separator\fR option).  Pathnames are normally
-absolute, but the \fB\-at\fR switch lets you select a relative
-starting point.  Its value is the id of the starting node.  
-.sp
-All ancestors of the new node must already exist, unless the
-\fB\-autocreate\fR option is set.  It is also an error if a node
-already exists, unless the \fB\-allowduplicates\fR option is set.
-.sp
-\fIOption\fR and \fIvalue\fR may have any of the values accepted by the 
-\fBentry configure\fR operation described in the
-.SB "ENTRY OPERATIONS"
-section below.  This command returns a list of the ids of
-the new entries.
-.TP
-\fIpathName \fBmove \fItagOrId\fR \fIhow\fR \fIdestId\fR
-Moves the node given by \fItagOrId\fR to the destination node.  The
-node can not be an ancestor of the destination.  \fIDestId\fR is
-the id of the destination node and can not be the root of the
-tree.  In conjunction with \fIhow\fR, it describes how the move is
-performed.
-.RS
-.TP 8
-\f(CWbefore\fR
-Moves the node before the destination node.
-.TP 8
-\f(CWafter\fR
-Moves the node after the destination node.
-.TP 8
-\f(CWinto\fR
-Moves the node to the end of the destination's list of children.
-.RE
-.TP
-\fIpathName \fBnearest \fIx y\fR ?\fIvarName\fR?
-Returns the id of the node entry closest to the given X-Y screen
-coordinate.  If the coordinate is not directly over any node, then the
-empty string is returned.  If the argument \fIvarName\fR is present,
-this is a Tcl variable that is set to either \f(CWbutton\fR,
-\f(CWlabel\fR, \f(CWlabel\fR, or \f(CW""\fR depending what part of the
-entry the coordinate lies.
-.TP
-\fIpathName \fBopen \fR?\fB\-recurse\fR? \fItagOrId...\fR
-Opens the one or more nodes specified by \fItagOrId\fR.  
-If a node is not already open, the Tcl script specified by the 
-\fB\-opencommand\fR option is invoked. If the \fB\-recurse\fR flag 
-is present, then each descendant is recursively opened.  
-.TP
-\fIpathName \fBrange\fR ?\fB-open\fR? \fIfirst last\fR
-Returns the ids in depth-first order of the nodes
-between the \fIfirst\fR and \fIlast\fR ids.  If the \fB\-open\fR
-flag is present, it indicates to consider only open nodes.
-If \fIlast\fR is before \fIfirst\fR, then the ids are
-returned in reverse order.
-.TP
-\fIpathName \fBscan\fR \fIoption args\fR
-This command implements scanning.  It has
-two forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBscan mark \fIx y\fR
-Records \fIx\fR and \fIy\fR and the current view in the treeview
-window;  used in conjunction with later \fBscan dragto\fR commands.
-Typically this command is associated with a mouse button press in
-the widget.  It returns an empty string.
-.TP
-\fIpathName \fBscan dragto \fIx y\fR.
-Computes the difference between its \fIx\fR and \fIy\fR
-arguments and the \fIx\fR and \fIy\fR arguments to the last
-\fBscan mark\fR command for the widget.
-It then adjusts the view by 10 times the
-difference in coordinates.  This command is typically associated
-with mouse motion events in the widget, to produce the effect of
-dragging the list at high speed through the window.  The return
-value is an empty string.
-.RE
-.TP
-\fIpathName \fBsee\fR ?\fB\-anchor \fIanchor\fR? \fItagOrId\fR
-Adjusts the view of entries so that the node given by \fItagOrId\fR is
-visible in the widget window.  It is an error if \fBtagOrId\fR is a
-tag that refers to more than one node.  By default the node's entry
-is displayed in the middle of the window.  This can changed using the
-\fB\-anchor\fR flag.  Its value is a Tk anchor position.
-.TP
-\fIpathName \fBselection \fIoption arg\fR
-This command is used to adjust the selection within a \fBtreeview\fR
-widget.  It has several forms, depending on \fIoption\fR:
-.RS
-.TP
-\fIpathName \fBselection anchor \fItagOrId\fR
-Sets the selection anchor to the node given by \fItagOrId\fR.
-If \fItagOrId\fR refers to a non-existent node, then the closest
-node is used.
-The selection anchor is the end of the selection that is fixed
-while dragging out a selection with the mouse.
-The special id \fBanchor\fR may be used to refer to the anchor
-node.
-.TP
-\fIpathName \fBselection cancel\fR
-Clears the temporary selection of entries back to the
-current anchor.  Temporary selections are created by 
-the \fBselection mark\fR operation.
-.TP
-\fIpathName \fBselection clear \fIfirst \fR?\fIlast\fR?
-Removes the entries between \fIfirst\fR and \fIlast\fR
-(inclusive) from the selection.  Both \fIfirst\fR and 
-\fIlast\fR are ids representing a range of entries.
-If \fIlast\fR isn't given, then only \fIfirst\fR is deselected.
-Entries outside the selection are not affected.
-.TP
-\fIpathName \fBselection clearall\fR
-Clears the entire selection.  
-.TP
-\fIpathName \fBselection mark \fItagOrId\fR
-Sets the selection mark to the node given by \fItagOrId\fR.  This
-causes the range of entries between the anchor and the mark to be
-temporarily added to the selection.  The selection mark is the end of
-the selection that is fixed while dragging out a selection with the
-mouse.  The special id \fBmark\fR may be used to refer to the current 
-mark node.
-If \fItagOrId\fR refers to a non-existent node, then the mark
-is ignored.
-Resetting the mark will unselect
-the previous range.  Setting the anchor finalizes the range.
-.TP
-\fIpathName \fBselection includes \fItagOrId\fR
-Returns 1 if the node given by \fItagOrId\fR is currently
-selected, 0 if it isn't.
-.TP
-\fIpathName \fBselection present\fR
-Returns 1 if any nodes are currently selected and 0 otherwise.
-.TP
-\fIpathName \fBselection set \fIfirst \fR?\fIlast\fR?
-Selects all of the nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, without affecting
-the selection state of nodes outside that range.
-.TP
-\fIpathName \fBselection toggle \fIfirst \fR?\fIlast\fR?
-Selects/deselects nodes in the range between
-\fIfirst\fR and \fIlast\fR, inclusive, from the selection.
-If a node is currently selected, it becomes deselected, and
-visa versa.
-.RE
-.TP 
-\fIpathName \fBshow \fR?\fBflags\fR? \fItagOrId\fR...
-Exposes all nodes matching the criteria given by \fIflags\fR.  This
-is the inverse of the \fBhide\fR operation.  The search is performed
-recursively for each node given by \fItagOrId\fR.  The valid flags are
-described below:
-.RS
-.TP 1.25i
-\fB\-name\fI pattern\fR
-Specifies pattern to match against node names.
-.TP 1.25i
-\fB\-full\fI pattern\fR
-Specifies pattern to match against node pathnames.
-.TP 1.25i
-\fB\-\fIoption\fI pattern\fR
-Specifies pattern to match against the entry's configuration option.
-.TP 1.25i
-\fB\-exact\fR
-Match patterns exactly.  The is the default.
-.TP 1.25i
-\fB\-glob\fR
-\fB\-glob\fR
-Use global pattern matching.  Matching is done in a fashion
-similar to that used by the C-shell.  For  the  two
-strings  to match, their contents must be identical
-except that the  following  special  sequences  may
-appear in pattern:
-.RS 
-.TP 5
-\f(CW*\fR
-Matches  any  sequence  of  characters in
-string, including a null string.
-.TP 5
-\f(CW?\fR
-Matches any single character in string.
-.TP 5
-\f(CW[\fIchars\f(CW]\fR
-Matches any character in the set given by \fIchars\fR. If a sequence of the
-form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
-\fIx\fR and \fIy\fR,
-inclusive, will match.
-.TP 5
-\f(CW\\\fIx\fR
-Matches  the  single  character  \fIx\fR.  This
-provides a way of  avoiding  the  special
-interpretation of the characters \f(CW*?[]\\\fR in
-the pattern.
-.RE
-.TP 1.25i
-\fB\-regexp\fR
-Use regular expression pattern matching (i.e. the same as implemented
-by the \fBregexp\fR command).  
-.TP 1.25i
-\fB\-nonmatching\fR
-Expose nodes that don't match.  
-.TP 1.25i
-\fB\-\-\fR
-Indicates the end of flags.
-.RE
-.TP
-\fIpathName \fBsort\fR ?\fIoperation\fR? \fIargs...\fR
-.RS
-.TP
-\fIpathName \fBsort auto\fR ?\fIboolean\fR
-Turns on/off automatic sorting of node entries.  If \fIboolean\fR is
-true, entries will be automatically sorted as they are opened,
-closed, inserted, or deleted.  If no \fIboolean\fR argument is
-provided, the current state is returned.
-.TP
-\fIpathName \fBsort cget\fR \fIoption\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBsort configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
-Query or modify the sorting configuration options of the widget.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given sorting option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described below:
-.RS
-.TP
-\fB\-column\fI string\fR
-Specifies the column to sort. Entries in the widget are rearranged
-according to this column.  If \fIcolumn\fR is \f(CW""\fR then
-no sort is performed.
-.TP
-\fB\-command\fI string\fR
-Specifies a Tcl procedure to be called when sorting nodes. 
-The procedure is called with three arguments: the pathname of the widget
-and the fields of two entries.  The procedure returns 1 if the first
-node is greater than the second, -1 is the second is greater, and 0
-if equal.  
-.TP
-\fB\-decreasing\fI boolean\fR
-Indicates to sort in ascending/descending order.  If \fIboolean\fR 
-is true, then the entries as in descending order. The default is 
-\f(CWno\fR.
-.TP
-\fB\-mode\fI string\fR
-Specifies how to compare entries when sorting. \fIString\fR
-may be one of the following:
-.RS 
-.TP 1.5i
-\f(CWascii\fR
-Use string comparison based upon the ASCII collation order.
-.TP 1.5i
-\f(CWdictionary\fR 
-Use dictionary-style comparison.  This is the same as \f(CWascii\fR
-except (a) case is ignored except as a tie-breaker and (b) if two
-strings contain embedded numbers, the numbers compare as integers, not
-characters.  For example, "bigBoy" sorts between
-"bigbang" and "bigboy", and "x10y" sorts between "x9y" and "x11y".
-.TP 1.5i
-\f(CWinteger\fR
-Compares fields as integers.
-.TP 1.5i
-\f(CWreal\fR
-Compares fields as floating point numbers.
-.TP 1.5i
-\f(CWcommand\fR
-Use the Tcl proc specified by the \fB\-command\fR option to compare entries 
-when sorting.   If no command is specified, the sort reverts to 
-\f(CWascii\fR sorting.
-.RE
-.RE
-.TP
-\fIpathName \fBsort once\fR ?\fIflags\fR? \fItagOrId...\fR
-Sorts the children for each entries specified by \fItagOrId\fR.  
-By default, entries are sorted by name, but you can specify a 
-Tcl proc to do your own comparisons.
-.RS
-.TP 1.5i
-\fB\-recurse\fR
-Recursively sort the entire branch, not just the children.
-.RE
-.RE
-.TP
-\fIpathName \fBtag \fIoperation args\fR
-Tags are a general means of selecting and marking nodes in the tree.
-A tag is just a string of characters, and it may take any form except
-that of an integer.  The same tag may be associated with many
-different nodes.  
-.sp
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for tags are listed below.
-.RS
-.TP
-\fIpathName\fR \fBtag add\fR \fIstring\fR \fIid\fR...
-Adds the tag \fIstring\fR to one of more entries.
-.TP
-\fIpathName\fR \fBtag delete\fR \fIstring\fR \fIid\fR...
-Deletes the tag \fIstring\fR from one or more entries.  
-.TP
-\fIpathName\fR \fBtag forget\fR \fIstring\fR
-Removes the tag \fIstring\fR from all entries.  It's not an error if no
-entries are tagged as \fIstring\fR.
-.TP
-\fIpathName\fR \fBtag names\fR ?\fIid\fR?
-Returns a list of tags used.  If an \fIid\fR argument
-is present, only those tags used by the node designated by \fIid\fR 
-are returned.
-.TP
-\fIpathName\fR \fBtag nodes\fR \fIstring\fR
-Returns a list of ids that have the tag \fIstring\fR.  If no node
-is tagged as \fIstring\fR, then an empty string is returned.
-.RE
-.TP
-\fIpathName \fBtext \fIoperation\fR ?\fIargs\fR?
-This operation is used to provide text editing for cells (data 
-fields in a column) or entry labels.
-It has several forms, depending on \fIoperation\fR:
-.RS
-.TP
-\fIpathName \fBtext apply\fR
-Applies the edited buffer, replacing the entry label
-or data field. The edit window is hidden.
-.TP
-\fIpathName \fBtext cancel\fR
-Cancels the editing operation, reverting the entry label 
-or data value back to the previous value. The edit window is hidden.
-.TP
-\fIpathName \fBtext cget\fI value\fR
-Returns the current value of the configuration option given
-by \fIoption\fR.
-\fIOption\fR may have any of the values accepted by the \fBconfigure\fR
-operation described below.
-.TP
-\fIpathName \fBtext configure\fR ?\fIoption value\fR?
-Query or modify the configuration options of the edit window.
-If no \fIoption\fR is specified, returns a list describing all of
-the available options (see \fBTk_ConfigureInfo\fR for
-information on the format of this list).  If \fIoption\fR is specified
-with no \fIvalue\fR, then the command returns a list describing the
-one named option (this list will be identical to the corresponding
-sublist of the value returned if no \fIoption\fR is specified).  If
-one or more \fIoption\-value\fR pairs are specified, then the command
-modifies the given widget option(s) to have the given value(s);  in
-this case the command returns an empty string.
-\fIOption\fR and \fIvalue\fR are described in the section 
-.SB "TEXT EDITING OPTIONS" 
-below.
-.RE
-.TP
-\fIpathName \fBtext delete\fI first last\fR
-Deletes the characters in the edit buffer between the two given
-character positions.  
-.TP
-\fIpathName \fBtext get\fR ?\fI\-root\fR? \fIx y\fR
-.TP
-\fIpathName \fBtext icursor\fI index\fR
-.TP
-\fIpathName \fBtext index\fI index\fR
-Returns the text index of given \fIindex\fR.
-.TP
-\fIpathName \fBtext insert\fI index string\fR
-Insert the text string \fIstring\fR into the edit buffer at the index 
-\fIindex\fR.  For example, the index 0 will prepend the buffer.
-.TP
-\fIpathName \fBtext selection\fI args\fR
-This operation controls the selection of the editing window.  Note
-that this differs from the selection of entries.
-It has the following forms:
-.RS
-.TP
-\fIpathName \fBtext selection adjust\fI index\fR
-Adjusts either the first or last index of the selection.
-.TP
-\fIpathName \fBtext selection clear\fR
-Clears the selection.
-.TP
-\fIpathName \fBtext selection from\fI index\fR
-Sets the anchor of the selection.
-.TP
-\fIpathName \fBtext selection present\fR
-Indicates if a selection is present.
-.TP
-\fIpathName \fBtext selection range\fI start end\fR
-Sets both the anchor and mark of the selection.
-.TP
-\fIpathName \fBtext selection to\fI index\fR
-Sets the unanchored end (mark) of the selection.
-.RE
-.TP
-\fIpathName \fBtoggle \fItagOrId\fR
-Opens or closes the node given by \fItagOrId\fR.  If the corresponding 
-\fB\-opencommand\fR or \fB\-closecommand\fR option is set, then that
-command is also invoked. 
-.TP
-\fIpathName \fBxview \fIargs\fR
-This command is used to query and change the horizontal position of the
-information in the widget's window.  It can take any of the following
-forms:
-.RS
-.TP
-\fIpathName \fBxview\fR
-Returns a list containing two elements.
-Each element is a real fraction between 0 and 1;  together they describe
-the horizontal span that is visible in the window.
-For example, if the first element is .2 and the second element is .6,
-20% of the \fBtreeview\fR widget's text is off-screen to the left, 
-the middle 40% is visible
-in the window, and 40% of the text is off-screen to the right.
-These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
-option.
-.TP
-\fIpathName \fBxview\fR \fItagOrId\fR
-Adjusts the view in the window so that the character position given by
-\fItagOrId\fR is displayed at the left edge of the window.
-Character positions are defined by the width of the character \fB0\fR.
-.TP
-\fIpathName \fBxview moveto\fI fraction\fR
-Adjusts the view in the window so that \fIfraction\fR of the
-total width of the \fBtreeview\fR widget's text is off-screen to the left.
-\fIfraction\fR must be a fraction between 0 and 1.
-.TP
-\fIpathName \fBxview scroll \fInumber what\fR
-This command shifts the view in the window left or right according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
-of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR character units (the width of the \fB0\fR character)
-on the display;  if it is \fBpages\fR then the view adjusts by
-\fInumber\fR screenfuls.
-If \fInumber\fR is negative then characters farther to the left
-become visible;  if it is positive then characters farther to the right
-become visible.
-.RE
-.TP
-\fIpathName \fByview \fI?args\fR?
-This command is used to query and change the vertical position of the
-text in the widget's window.
-It can take any of the following forms:
-.RS
-.TP
-\fIpathName \fByview\fR
-Returns a list containing two elements, both of which are real fractions
-between 0 and 1.
-The first element gives the position of the node at the
-top of the window, relative to the widget as a whole (0.5 means
-it is halfway through the treeview window, for example).
-The second element gives the position of the node just after
-the last one in the window, relative to the widget as a whole.
-These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
-option.
-.TP
-\fIpathName \fByview\fR \fItagOrId\fR
-Adjusts the view in the window so that the node given by
-\fItagOrId\fR is displayed at the top of the window.
-.TP
-\fIpathName \fByview moveto\fI fraction\fR
-Adjusts the view in the window so that the node given by \fIfraction\fR
-appears at the top of the window.
-\fIFraction\fR is a fraction between 0 and 1;  0 indicates the first
-node, 0.33 indicates the node one-third the
-way through the \fBtreeview\fR widget, and so on.
-.TP
-\fIpathName \fByview scroll \fInumber what\fR
-This command adjusts the view in the window up or down according to
-\fInumber\fR and \fIwhat\fR.
-\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
-\fInumber\fR lines;  if it is \fBpages\fR then
-the view adjusts by \fInumber\fR screenfuls.
-If \fInumber\fR is negative then earlier nodes
-become visible;  if it is positive then later nodes
-become visible.
-.RE
-.SH "TREEVIEW OPTIONS"
-In addition to the \fBconfigure\fR operation, widget configuration
-options may also be set by the Tk \fBoption\fR command.  The class
-resource name is \f(CWTreeView\fR.
-.CS
-option add *TreeView.Foreground white
-option add *TreeView.Background blue
-.CE
-The following widget options are available:
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color for active entries.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of the active node.  A node
-is active when the mouse passes over it's entry or using the 
-\fBactivate\fR operation.  
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed for an entry's icon
-when it is active. \fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-autocreate \fIboolean\fR
-If \fIboolean\fR is true, automatically create missing ancestor 
-nodes when inserting new nodes. Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-allowduplicates \fIboolean\fR
-If \fIboolean\fR is true, allow nodes with duplicate pathnames
-when inserting new nodes.  Otherwise flag an error.
-The default is \f(CWno\fR.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the widget.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the outside edge of the widget.  The
-\fB\-relief\fR option determines if the border is to be drawn.  The
-default is \f(CW2\fR.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is closed.  You can
-overrider this for individual entries using the entry's \fB\-closecommand\fR 
-option. The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-cursor \fIcursor\fR
-Specifies the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-dashes \fInumber\fR
-Sets the dash style of the horizontal and vertical lines drawn connecting 
-entries. \fINumber\fR is the length in pixels of the dashes and gaps in
-the line. If \fInumber\fR is \f(CW0\fR, solid lines will 
-be drawn. The default is \f(CW1\fR (dotted).
-.TP
-\fB\-exportselection \fIboolean\fR 
-Indicates if the selection is exported.  If the widget is exporting its
-selection then it will observe the standard X11 protocols for handling
-the selection.  Selections are available as type \fBSTRING\fR;
-the value of the selection will be the label of the selected nodes,
-separated by newlines.  The default is \f(CWno\fR.
-.TP
-\fB\-flat \fIboolean\fR
-Indicates whether to display the tree as a flattened list. 
-If \fIboolean\fR is true, then the hierarchy will be a list of full
-paths for the nodes.  This option also has affect on sorting. 
-See the 
-.SB "SORT OPERATIONS"
-section for more information.
-The default is \f(CWno\fR.
-.TP
-\fB\-focusdashes \fIdashList\fR 
-Sets the dash style of the outline rectangle drawn around the entry
-label of the node that current has focus. \fINumber\fR is the length
-in pixels of the dashes and gaps in the line.  If
-\fInumber\fR is \f(CW0\fR, a solid line will be drawn. The default is
-\f(CW1\fR.
-.TP
-\fB\-focusforeground \fIcolor\fR 
-Sets the color of the focus rectangle. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Specifies the font for entry labels.  You can override this for individual
-entries with the entry's \fB\-font\fR configuration option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of entry labels.  You can override this for individual
-entries with the entry's \fB\-foreground\fR configuration option.  
-The default is
-\f(CWblack\fR.
-.TP
-\fB\-height \fIpixels\fR
-Specifies the requested height of widget.  The default is
-\f(CW400\fR.
-.TP
-\fB\-hideroot \fIboolean\fR
-If \fIboolean\fR is true, it indicates that no entry for the root node 
-should be displayed.  The default is \f(CWno\fR.
-.TP 
-\fB\-highlightbackground  \fIcolor\fR
-Specifies the normal color of the traversal highlight region when
-the widget does not have the input focus.  
-.TP 
-\fB\-highlightcolor \fIcolor\fR
-Specifies the color of the traversal highlight rectangle when
-the widget has the input focus. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-highlightthickness \fIpixels\fR
-Specifies the width of the highlight rectangle indicating when the
-widget has input focus. The value may have any of the forms acceptable
-to \fBTk_GetPixels\fR.  If the value is zero, no focus highlight will
-be displayed.  The default is \f(CW2\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images for the entry's icon.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-linecolor \fIcolor\fR
-Sets the color of the connecting lines drawn between entries.  
-The default is \f(CWblack\fR.
-.TP
-\fB\-linespacing \fIpixels\fR
-Sets the number of pixels spacing between entries.  
-The default is \f(CW0\fR.
-.TP
-\fB\-linewidth \fIpixels\fR
-Set the width of the lines drawn connecting entries.  If \fIpixels\fR
-is \f(CW0\fR, no vertical or horizontal lines are drawn. 
-The default is \f(CW1\fR.
-.TP
-\fB\-newtags \fIboolean\fR 
-If \fIboolean\fR is true, when sharing a tree object (see the
-\fB\-tree\fR option), don't share its tags too.  
-The default is \f(CW0\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when a node is open.  
-You can override this for individual entries with the entry's
-\fB\-opencommand\fR configuration option.  The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect for the widget.  \fIRelief\fR
-specifies how the \fBtreeview\fR widget should appear relative to widget 
-it is packed into; for example, \f(CWraised\fR means the \fBtreeview\fR widget 
-should appear to protrude.  The default is \f(CWsunken\fR.
-.TP
-\fB\-scrollmode \fImode\fR 
-Specifies the style of scrolling to be used.  The following
-styles are valid.  This is the default is \f(CWhierbox\fR.
-.RS
-.TP 1.25i
-\f(CWlistbox\fR
-Like the \fBlistbox\fR widget, the last entry can always be
-scrolled to the top of the widget window.  This allows the scrollbar
-thumb to shrink as the last entry is scrolled upward.
-.TP 1.25i
-\f(CWhierbox\fR
-Like the \fBhierbox\fR widget, the last entry can only be
-viewed at the bottom of the widget window.  The scrollbar
-stays a constant size.  
-.TP 1.25i
-\f(CWcanvas\fR
-Like the \fBcanvas\fR widget, the entries are bound within
-the scrolling area. 
-.RE
-.TP 
-\fB\-selectbackground \fIcolor\fR
-Sets the background color selected node entries.
-The default is \f(CW#ffffea\fR.
-.TP 
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the raised 3-D border drawn around the labels 
-of selected entries. The default is \f(CW0\fR.
-\fB\-selectcommand \fIstring\fR
-Specifies a Tcl script to invoked when the set of selected
-nodes changes.
-The default is \f(CW""\fR.
-.TP
-\fB\-selectforeground \fIcolor\fB
-Sets the color of the labels of selected node entries. 
-The default is \f(CWblack\fR.
-.TP 
-\fB\-selectmode \fImode\fR
-Specifies the selection mode. If \fImode\fR is 
-\f(CWsingle\fR, only one node can be selected
-at a time.  If \f(CWmultiple\fR more than one
-node can be selected.
-The default is \f(CWsingle\fR.
-.TP
-\fB\-separator \fIstring\fR
-Specifies the character sequence to use when spliting the path components.  
-The separator may be several characters wide (such as "::")
-Consecutive separators in a pathname are treated as one.
-If \fIstring\fR is the empty string, the pathnames are Tcl lists. 
-Each element is a path component.   The default is \f(CW""\fR.
-.TP
-\fB\-showtitles \fIboolean\fR
-If \fIboolean\fR is false, column titles are not be displayed.  
-The default is \f(CWyes\fR.
-.TP 
-\fB\-sortselection \fIboolean\fR
-If \fIboolean\fR is true, nodes in the selection are ordered as they
-are currently displayed (depth-first or sorted), not in the order
-they were selected. The default is \f(CWno\fR.
-.TP
-\fB\-takefocus\fR \fIfocus\fR 
-Provides information used when moving the focus from window to window
-via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
-\f(CW0\fR, this means that this window should be skipped entirely during
-keyboard traversal.  \f(CW1\fR means that the this window should always
-receive the input focus.  An empty value means that the traversal
-scripts make the decision whether to focus on the window.
-The default is \f(CW"1"\fR.
-.TP
-\fB\-trim \fIstring\fR
-Specifies a string leading characters to trim from entry pathnames 
-before parsing.  This only makes sense if the \fB\-separator\fR is also
-set.  The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the widget.  If \fIpixels\fR is 0, then
-the with is computed from the contents of the \fBtreeview\fR widget.
-The default is \f(CW200\fR.
-.TP 
-\fB\-xscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with horizontal
-scrollbars.  Whenever the horizontal view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-xscrollincrement\fR \fIpixels\fR
-Sets the horizontal scrolling distance. The default is 20 pixels.
-.TP
-\fB\-yscrollcommand \fIstring\fR
-Specifies the prefix for a command used to communicate with vertical
-scrollbars.   Whenever the vertical view in the widget's window 
-changes, the widget will generate a Tcl command by concatenating the 
-scroll command and two numbers.  If this option is not specified, then 
-no command will be executed.
-.TP
-\fB\-yscrollincrement\fR \fIpixels\fR
-Sets the vertical scrolling distance. The default is 20 pixels.
-.SH "ENTRY OPTIONS"
-Many widget configuration options have counterparts in entries.  For
-example, there is a \fB\-closecommand\fR configuration option for both
-widget itself and for individual entries.  Options set at the widget
-level are global for all entries.  If the entry configuration option
-is set, then it overrides the widget option.  This is done to avoid
-wasting memory by replicated options.  Most entries will have
-redundant options.
-.PP
-There is no resource class or name for entries.
-.TP
-\fB\-activeicons \fIimages\fR
-Specifies images to be displayed as the entry's icon
-when it is active. This overrides the global \fB\-activeicons\fR
-configuration option for the specific entry.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-bindtags \fItagList\fR
-Specifies the binding tags for nodes.  \fITagList\fR is a list
-of binding tag names.  The tags and their order will determine how
-events are handled for nodes.  Each tag in the list matching the current 
-event sequence will have its Tcl command executed.  The default value 
-is \f(CWall\fR.
-.TP
-\fB\-button \fIstring\fR
-Indicates whether a button should be displayed on the left side
-of the node entry.  \fIString\fR can be \f(CWyes\fR, \f(CWno\fR, 
-or \f(CWauto\fR.  If \f(CWauto\fR, then a button is automatically
-displayed if the node has children.  This is the default.
-.TP
-\fB\-closecommand \fIstring\fR
-Specifies a Tcl script to be invoked when the node is closed.  This
-overrides the global \fB\-closecommand\fR option for this entry.
-The default is \f(CW""\fR.
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.TP
-\fB\-data \fIstring\fR
-Sets data fields for the node.  \fIString\fR is a list of 
-name-value pairs to be set. The default is \f(CW""\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for entry labels.  This overrides the widget's
-\fB\-font\fR option for this node.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the text color of the entry label.  This overrides the widget's
-\fB\-foreground\fR configuration option.  The default is \f(CW""\fR.
-.TP
-\fB\-icons \fIimages\fR
-Specifies images to be displayed for the entry's icon.
-This overrides the global \fB\-icons\fR configuration option.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the node is open, the
-second when it is closed.
-.TP
-\fB\-label \fIstring\fR
-Sets the text for the entry's label.  If not set, this 
-defaults to the name of the node. The default is \f(CW""\fR.
-.TP
-\fB\-opencommand \fIstring\fR
-Specifies a Tcl script to be invoked when the entry is opened.  
-This overrides the widget's \fB\-opencommand\fR option for this node.  
-The default is \f(CW""\fR. 
-Percent substitutions are performed on \fIstring\fR before 
-it is executed.  The following substitutions are valid:
-.RS 
-.TP 5
-\f(CW%W\fR
-The pathname of the widget.
-.TP 5
-\f(CW%p\fR
-The name of the node.
-.TP 5
-\f(CW%P\fR
-The full pathname of the node.
-.TP 5
-\f(CW%#\fR
-The id of the node.
-.TP 5
-\f(CW%%\fR
-Translates to a single percent.
-.RE
-.SH "BUTTON OPTIONS"
-Button configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWButton\fR.   The resource name is always
-\f(CWbutton\fR.
-.CS
-option add *TreeView.Button.Foreground white
-option add *TreeView.button.Background blue
-.CE
-The following are the configuration options available for buttons.
-.TP
-\fB\-activebackground \fIcolor\fR
-Sets the background color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-activeforeground \fIcolor\fR
-Sets the foreground color of active buttons.  A button
-is made active when the mouse passes over it or by the 
-\fBbutton activate\fR operation.  
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the button.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the button.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-closerelief \fIrelief\fR
-Specifies the 3-D effect for the closed button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-cursor \fIcursor\fR
-Sets the widget's cursor.  The default cursor is \f(CW""\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Sets the foreground color of buttons. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-images \fIimages\fR
-Specifies images to be displayed for the button.
-\fIImages\fR is a list of two Tk images: 
-the first image is displayed when the button is open, the
-second when it is closed.  If the \fIimages\fR is the empty string,
-then a plus/minus gadget is drawn.  The default is \f(CW""\fR.
-.TP
-\fB\-openrelief \fIrelief\fR
-Specifies the 3-D effect of the open button.  \fIRelief\fR
-indicates how the button should appear relative to the widget; 
-for example, \f(CWraised\fR means the button should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-size \fIpixels\fR
-Sets the requested size of the button.  
-The default is \f(CW0\fR.
-.RE
-.SH "COLUMN OPTIONS"
-Column configuration options may also be set by the \fBoption\fR command.
-The resource subclass is \f(CWColumn\fR.   The resource name is the 
-name of the column.
-.CS
-option add *TreeView.Column.Foreground white
-option add *TreeView.treeView.Background blue
-.CE
-The following configuration options are available for columns.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background color of the column.  This overrides
-the widget's \fB\-background\fR option. The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border of the column.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW0\fR.
-.TP
-\fB\-edit \fIboolean\fR
-Indicates if the column's data fields can be edited. If \fIboolean\fR is 
-false, the data fields in the column may not be edited.
-The default is \f(CWyes\fR.
-.TP
-\fB\-foreground \fIcolor\fR 
-Specifies the foreground color of the column. 
-You can override this for individual entries with the entry's 
-\fB\-foreground\fR option.
-The default is \f(CWblack\fR.
-.TP
-\fB\-font \fIfontName\fR 
-Sets the font for a column.  You can override this for individual entries
-with the entry's \fB\-font\fR option.  The default is
-\f(CW*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
-.TP
-\fB\-hide \fIboolean\fR
-If \fIboolean\fR is true, the column is not displayed.
-The default is \f(CWyes\fR.
-.TP
-\fB\-justify \fIjustify\fR
-Specifies how the column data fields title should be justified within
-the column.  This matters only when the column is wider than the 
-data field to be display.
-\fIJustify\fR must be \f(CWleft\fR, \f(CWright\fR, or \f(CWcenter\fR.  
-The default is \f(CWleft\fR.
-.TP
-\fB\-pad \fIpad\fR
-Specifies how much padding for the left and right sides of the column.
-\fIPad\fR is a list of one or two screen distances.  If \fIpad\fR
-has two elements, the left side of the column is padded by the first
-distance and the right side by the second.  If \fIpad\fR has just one
-distance, both the left and right sides are padded evenly.  The
-default is \f(CW2\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the column.  \fIRelief\fR
-specifies how the column should appear relative to the widget; 
-for example, \f(CWraised\fR means the column should
-appear to protrude.  The default is \f(CWflat\fR.
-.TP
-\fB\-state \fIstate\fR
-Sets the state of the column. If \fIstate\fR is \f(CWdisable\fR then
-the column title can not be activated nor invoked.
-The default is \f(CWnormal\fR.
-.TP
-\fB\-title \fIstring\fR
-Sets the title for the column.
-The default is \f(CW""\fR.
-.TP
-\fB\-titleforeground \fIcolor\fR 
-Sets the foreground color of the column title. 
-The default is \f(CWblack\fR.
-.TP
-\fB\-titleshadow \fIcolor\fR 
-Sets the color of the drop shadow of the column title.  
-The default is \f(CW""\fR.
-.TP
-\fB\-width \fIpixels\fR
-Sets the requested width of the column.  This overrides
-the computed with of the column.  If \fIpixels\fR is 0,
-the width is computed as from the contents of the column. The
-default is \f(CW0\fR.
-.RE
-.SH "TEXT EDITING OPTIONS"
-Text edit window configuration options may also be set by the 
-\fBoption\fR command. The resource class is \f(CWTreeViewEditor\fR.
-The resource name is always \f(CWedit\fR.
-.CS
-option add *TreeViewEditor.Foreground white
-option add *edit.Background blue
-.CE
-The following are the configuration options available for the
-text editing window.
-.TP
-\fB\-background \fIcolor\fR
-Sets the background of the text edit window.  The default is \f(CWwhite\fR.
-.TP
-\fB\-borderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the edit window.  
-The \fB\-relief\fR option determines if a border is to be drawn.  The
-default is \f(CW1\fR.
-.TP
-\fB\-exportselection \fIboolean\fR
-Indicates if the text selection is exported.  If the edit window is 
-exporting its selection then it will observe the standard X11 protocols 
-for handling the selection.  Selections are available as type \fBSTRING\fR.
-The default is \f(CWno\fR.
-.TP
-\fB\-relief \fIrelief\fR
-Specifies the 3-D effect of the edit window.  \fIRelief\fR
-indicates how the background should appear relative to the edit
-window; for example, \f(CWraised\fR means the background should
-appear to protrude.  The default is \f(CWsolid\fR.
-.TP
-\fB\-selectbackground \fIcolor\fR
-Sets the background of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectborderwidth \fIpixels\fR
-Sets the width of the 3\-D border around the selected text in the 
-edit window.  The \fB\-selectrelief\fR option determines if a border 
-is to be drawn.  The default is \f(CW1\fR.
-.TP
-\fB\-selectforeground \fIcolor\fR
-Sets the foreground of the selected text in the edit window.  
-The default is \f(CWwhite\fR.
-.TP
-\fB\-selectrelief \fIrelief\fR
-Specifies the 3-D effect of the selected text in the edit window.  
-\fIRelief\fR indicates how the text should appear relative to the edit
-window; for example, \f(CWraised\fR means the text should
-appear to protrude.  The default is \f(CWflat\fR.
-.RE
-.SH "DEFAULT BINDINGS"
-Tk automatically creates class bindings for treeviews that give them
-Motif-like behavior.  Much of the behavior of a \fBtreeview\fR widget is determined
-by its \fB\-selectmode\fR option, which selects one of two ways
-of dealing with the selection.
-.PP
-If the selection mode is \fBsingle\fR, only one node can be 
-selected at a time.
-Clicking button 1 on an node selects
-it and deselects any other selected item.
-.PP
-If the selection mode is \fBmultiple\fR,
-any number of entries may be selected at once, including discontiguous
-ranges.  Clicking Control-Button-1 on a node entry
-toggles its selection state without affecting any other entries.
-Pressing Shift-Button-1 on a node entry selects
-it, extends the selection.
-.IP [1]
-In \fBextended\fR mode, the selected range can be adjusted by pressing
-button 1 with the Shift key down:  this modifies the selection to
-consist of the entries between the anchor and the entry under
-the mouse, inclusive.
-The un-anchored end of this new selection can also be dragged with
-the button down.
-.IP [2]
-In \fBextended\fR mode, pressing button 1 with the Control key down
-starts a toggle operation: the anchor is set to the entry under
-the mouse, and its selection state is reversed.  The selection state
-of other entries isn't changed.
-If the mouse is dragged with button 1 down, then the selection state
-of all entries between the anchor and the entry under the mouse
-is set to match that of the anchor entry;  the selection state of
-all other entries remains what it was before the toggle operation
-began.
-.IP [3]
-If the mouse leaves the treeview window with button 1 down, the window
-scrolls away from the mouse, making information visible that used
-to be off-screen on the side of the mouse.
-The scrolling continues until the mouse re-enters the window, the
-button is released, or the end of the hierarchy is reached.
-.IP [4]
-Mouse button 2 may be used for scanning.
-If it is pressed and dragged over the \fBtreeview\fR widget, the contents of
-the hierarchy drag at high speed in the direction the mouse moves.
-.IP [5]
-If the Up or Down key is pressed, the location cursor (active
-entry) moves up or down one entry.
-If the selection mode is \fBbrowse\fR or \fBextended\fR then the
-new active entry is also selected and all other entries are
-deselected.
-In \fBextended\fR mode the new active entry becomes the
-selection anchor.
-.IP [6]
-In \fBextended\fR mode, Shift-Up and Shift-Down move the location
-cursor (active entry) up or down one entry and also extend
-the selection to that entry in a fashion similar to dragging
-with mouse button 1.
-.IP [7]
-The Left and Right keys scroll the \fBtreeview\fR widget view left and right
-by the width of the character \fB0\fR.
-Control-Left and Control-Right scroll the \fBtreeview\fR widget view left and
-right by the width of the window.
-Control-Prior and Control-Next also scroll left and right by
-the width of the window.
-.IP [8]
-The Prior and Next keys scroll the \fBtreeview\fR widget view up and down
-by one page (the height of the window).
-.IP [9]
-The Home and End keys scroll the \fBtreeview\fR widget horizontally to
-the left and right edges, respectively.
-.IP [10]
-Control-Home sets the location cursor to the the first entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [11]
-Control-End sets the location cursor to the the last entry, 
-selects that entry, and deselects everything else
-in the widget.
-.IP [12]
-In \fBextended\fR mode, Control-Shift-Home extends the selection
-to the first entry and Control-Shift-End extends
-the selection to the last entry.
-.IP [13]
-In \fBmultiple\fR mode, Control-Shift-Home moves the location cursor
-to the first entry and Control-Shift-End moves
-the location cursor to the last entry.
-.IP [14]
-The space and Select keys make a selection at the location cursor
-(active entry) just as if mouse button 1 had been pressed over
-this entry.
-.IP [15]
-In \fBextended\fR mode, Control-Shift-space and Shift-Select
-extend the selection to the active entry just as if button 1
-had been pressed with the Shift key down.
-.IP [16]
-In \fBextended\fR mode, the Escape key cancels the most recent
-selection and restores all the entries in the selected range
-to their previous selection state.
-.IP [17]
-Control-slash selects everything in the widget, except in
-\fBsingle\fR and \fBbrowse\fR modes, in which case it selects
-the active entry and deselects everything else.
-.IP [18]
-Control-backslash deselects everything in the widget, except in
-\fBbrowse\fR mode where it has no effect.
-.IP [19]
-The F16 key (labelled Copy on many Sun workstations) or Meta-w
-copies the selection in the widget to the clipboard, if there is
-a selection.
-.PP
-The behavior of \fBtreeview\fR widgets can be changed by defining new bindings 
-for individual widgets or by redefining the class bindings.
-.SS WIDGET BINDINGS
-In addition to the above behavior, the following additional behavior
-is defined by the default widget class (TreeView) bindings.
-.IP \f(CW<ButtonPress-2>\fR 
-Starts scanning. 
-.IP \f(CW<B2-Motion>\fR 
-Adjusts the scan.
-.IP \f(CW<ButtonRelease-2>\fR
-Stops scanning.
-.IP \f(CW<B1-Leave>\fR 
-Starts auto-scrolling.
-.IP \f(CW<B1-Enter>\fR
-Starts auto-scrolling 
-.IP \f(CW<KeyPress-Up>\fR 
-Moves the focus to the previous entry.
-.IP \f(CW<KeyPress-Down>\fR 
-Moves the focus to the next entry.
-.IP \f(CW<Shift-KeyPress-Up>\fR
-Moves the focus to the previous sibling.
-.IP \f(CW<Shift-KeyPress-Down>\fR
-Moves the focus to the next sibling.
-.IP \f(CW<KeyPress-Prior>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Next>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-Left>\fR 
-Closes the entry.  It is not an error if the entry has no children.
-.IP \f(CW<KeyPress-Right>\fR 
-Opens the entry, displaying its children.  It is not an
-error if the entry has no children.
-.IP \f(CW<KeyPress-space>\fR 
-In "single" select mode this selects the entry.  In "multiple" mode,
-it toggles the entry (if it was previous selected, it is not
-deselected).
-.IP \f(CW<KeyRelease-space>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress-Return>\fR 
-Sets the focus to the current entry.
-.IP \f(CW<KeyRelease-Return>\fR 
-Turns off select mode.
-.IP \f(CW<KeyPress>\fR 
-Moves to the next entry whose label starts with the letter typed.
-.IP \f(CW<KeyPress-Home>\fR 
-Moves the focus to first entry.  Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-End>\fR 
-Move the focus to the last entry. Closed or hidden entries
-are ignored.
-.IP \f(CW<KeyPress-F1>\fR 
-Opens all entries.
-.IP \f(CW<KeyPress-F2>\fR
-Closes all entries (except root).
-.SS BUTTON BINDINGS
-Buttons have bindings.  There are associated with the "all" bindtag
-(see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the button of the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the button back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Adjust the view so that the current entry is visible.
-.SS ENTRY BINDINGS
-Entries have default bindings.  There are associated with the "all"
-bindtag (see the entry's -bindtag option).  You can use the \fBbind\fR
-operation to modify them.
-.IP \f(CW<Enter>\fR 
-Highlights the current entry.
-.IP \f(CW<Leave>\fR 
-Returns the entry back to its normal state.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the selection anchor the current entry.
-.IP \f(CW<Double-ButtonPress-1>\fR
-Toggles the selection of the current entry.
-.IP \f(CW<B1-Motion>\fR
-For "multiple" mode only.  Saves the current location of the
-pointer for auto-scrolling.  Resets the selection mark.  
-.IP \f(CW<ButtonRelease-1>\fR
-For "multiple" mode only.  Sets the selection anchor to the 
-current entry.
-.IP \f(CW<Shift-ButtonPress-1>\fR
-For "multiple" mode only. Extends the selection.
-.IP \f(CW<Shift-Double-ButtonPress-1>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Shift-ButtonRelease-1>\fR 
-Stop auto-scrolling.
-.IP \f(CW<Control-ButtonPress-1>\fR 
-For "multiple" mode only.  Toggles and extends the selection.
-.IP \f(CW<Control-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-B1-Motion>\fR 
-Place holder. Does nothing.
-.IP \f(CW<Control-ButtonRelease-1>\fR 
-Stops auto-scrolling.
-.IP \f(CW<Control-Shift-ButtonPress-1>\fR 
-???
-.IP \f(CW<Control-Shift-Double-ButtonPress-1>\fR
-Place holder. Does nothing.
-.IP \f(CW<Control-Shift-B1-Motion>\fR 
-Place holder. Does nothing.
-.SS COLUMN BINDINGS
-Columns have bindings too.  They are associated with the column's
-"all" bindtag (see the column -bindtag option).  You can use the
-\fBcolumn bind\fR operation to change them.
-.IP \f(CW<Enter>\fR 
-Highlights the current column title.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state.
-.IP \f(CW<ButtonRelease-1>\fR
-Invokes the command (see the column's -command option) if one
-if specified.  
-.SS COLUMN RULE BINDINGS
-.IP \f(CW<Enter>\fR 
-Highlights the current and activates the ruler.
-.IP \f(CW<Leave>\fR 
-Returns the column back to its normal state. Deactivates the
-ruler.
-.IP \f(CW<ButtonPress-1>\fR 
-Sets the resize anchor for the column.
-.IP \f(CW<B1-Motion>\fR 
-Sets the resize mark for the column.
-.IP \f(CW<ButtonRelease-1>\fR 
-Adjust the size of the column, based upon the resize anchor and mark
-positions.
-.SH EXAMPLE
-The \fBtreeview\fR command creates a new widget.  
-.CS
-treeview .h \-bg white
-.CE
-A new Tcl command \f(CW.h\fR is also created.  This command can be used
-to query and modify the \fBtreeview\fR widget.  For example, to change the 
-background
-color of the table to "green", you use the new command and the widget's
-\fBconfigure\fR operation.
-.CS
-# Change the background color.
-\&.h configure \-background "green"
-.CE
-By default, the \fBtreeview\fR widget will automatically create a new tree object
-to contain the data.  The name of the new tree is the pathname of the
-widget.  Above, the new tree object name is ".h".  But you can use the
-\fB\-tree\fR option to specify the name of another tree.
-.CS
-# View the tree "myTree".
-\&.h configure \-tree "myTree"
-.CE
-When a new tree is created, it contains only a root node.  The node
-is automatically opened.  The id of the root node is always
-\f(CW0\fR (you can use also use the special id \f(CWroot\fR). The
-\fBinsert\fR operation lets you insert one or more new entries into
-the tree.  The last argument is the node's \fIpathname\fR.  
-.CS
-# Create a new entry named "myEntry"
-set id [\&.h insert end "myEntry"]
-.CE
-This appends a new node named "myEntry".  It will positioned as the
-last child of the root of the tree (using the position "end").  You
-can supply another position to order the node within its siblings.
-.CS
-# Prepend "fred".
-set id [\&.h insert 0 "fred"]
-.CE
-Entry names do not need to be unique.  By default, the node's label
-is its name.  To supply a different text label, add the \fB\-label\fR
-option.
-.CS
-# Create a new node named "fred"
-set id [\&.h insert end "fred" -label "Fred Flintstone"]
-.CE
-The \fBinsert\fR operation returns the id of the new node.  You can
-also use the \fBindex\fR operation to get this information.
-.CS
-# Get the id of "fred"
-\&.h index "fred"
-.CE
-To insert a node somewhere other than root, use the \fB\-at\fR switch.
-It takes the id of the node where the new child will be added.
-.CS
-# Create a new node "barney" in "fred".
-\&.h insert -at $id end "barney" 
-.CE
-A pathname describes the path to an entry in the hierarchy.  It's a
-list of entry names that compose the path in the tree.  Therefore, you
-can also add "barney" to "fred" as follows.
-.CS
-# Create a new sub-entry of "fred"
-\&.h insert end "fred barney" 
-.CE
-Every name in the list is ancestor of the next.  All ancestors must
-already exist.  That means that an entry "fred" is an ancestor of
-"barney" and must already exist.  But you can use the
-\fB\-autocreate\fR configuration option to force the creation of
-ancestor nodes.
-.CS
-# Force the creation of ancestors.
-\&.h configure -autocreate yes 
-\&.h insert end "fred barney wilma betty" 
-.CE
-Sometimes the pathname is already separated by a character sequence
-rather than formed as a list.  A file name is a good example of this.
-You can use the \fB\-separator\fR option to specify a separator string
-to split the path into its components.  Each pathname inserted is
-automatically split using the separator string as a separator.
-Multiple separators are treated as one.
-.CS
-\&.h configure -separator /
-\&.h insert end "/usr/local/tcl/bin" 
-.CE
-If the path is prefixed by extraneous characters, you can
-automatically trim it off using the \fB\-trim\fR option.  It removed
-the string from the path before it is parsed.
-.CS
-\&.h configure -trim C:/windows -separator /
-\&.h insert end "C:/window/system" 
-.CE
-You can insert more than one entry at a time with the \fBinsert\fR
-operation.  This can be much faster than looping over a list of names.
-.CS
-# The slow way
-foreach f [glob $dir/*] {
-    \&.h insert end $f
-}
-# The fast way
-eval .h insert end [glob $dir/*]
-.CE
-In this case, the \fBinsert\fR operation will return a list of ids
-of the new entries.
-.PP
-You can delete entries with the \fBdelete\fR operation.  It takes one or
-more tags of ids as its argument. It deletes the entry and all its
-children.
-.CS
-\&.h delete $id
-.CE
-Entries have several configuration options.  They control the appearance
-of the entry's icon and label.  We have already seen the \fB\-label\fR
-option that sets the entry's text label.   The \fBentry configure\fR
-operation lets you set or modify an entry's configuration options.
-.CS
-\&.h entry configure $id -color red -font fixed
-.CE
-You can hide an entry and its children using the \fB\-hide\fR option.
-.CS
-\&.h entry configure $id -hide yes
-.CE
-More that one entry can be configured at once.  All entries specified
-are configured with the same options.
-.CS
-\&.h entry configure $i1 $i2 $i3 $i4 -color brown 
-.CE
-An icon is displayed for each entry.  It's a Tk image drawn to the
-left of the label.  You can set the icon with the entry's
-\fB\-icons\fR option.  It takes a list of two image names: one to
-represent the open entry, another when it is closed.
-.CS
-set im1 [image create photo -file openfolder.gif]
-set im2 [image create photo -file closefolder.gif]
-\&.h entry configure $id -icons "$im1 $im2"
-.CE
-If \fB\-icons\fR is set to the empty string, no icons are display.
-.PP
-If an entry has children, a button is displayed to the left of the
-icon. Clicking the mouse on this button opens or closes the
-sub-hierarchy.  The button is normally a \f(CW+\fR or \f(CW\-\fR
-symbol, but can be configured in a variety of ways using the \fBbutton
-configure\fR operation.  For example, the \f(CW+\fR and \f(CW\-\fR
-symbols can be replaced with Tk images.
-.CS
-set im1 [image create photo -file closefolder.gif]
-set im2 [image create photo -file downarrow.gif]
-\&.h button configure $id -images "$im1 $im2" \\
-    -openrelief raised -closerelief raised
-.CE
-Entries can contain an arbitrary number of \fIdata fields\fR.  Data
-fields are name-value pairs.  Both the value and name are strings.
-The entry's \fB\-data\fR option lets you set data fields.
-.CS
-\&.h entry configure $id -data {mode 0666 group users}
-.CE
-The \fB\-data\fR takes a list of name-value pairs.  
-.PP
-You can display these data fields as \fIcolumns\fR in the
-\fBtreeview\fR widget.  You can create and configure columns with
-the \fBcolumn\fR operation.  For example, to add a new column to the
-widget, use the \fBcolumn insert\fR operation.  The last argument is
-the name of the data field that you want to display.
-.CS
-\&.h column insert end "mode"
-.CE
-The column title is displayed at the top of the column.  By default,
-it's is the field name.  You can override this using the column's
-\fB\-title\fR option.
-.CS
-\&.h column insert end "mode" -title "File Permissions"
-.CE
-Columns have several configuration options.  The \fBcolumn
-configure\fR operation lets you query or modify column options.
-.CS
-\&.h column configure "mode" -justify left
-.CE
-The \fB\-justify\fR option says how the data is justified within in
-the column.  The \fB\-hide\fR option indicates whether the column is
-displayed.
-.CS
-\&.h column configure "mode" -hide yes
-.CE
-Entries can be selected by clicking on the mouse.  Selected entries
-are drawn using the colors specified by the \fB\-selectforeground\fR 
-and \fB\-selectbackground\fR configuration options.
-The selection itself is managed by the \fBselection\fR operation.
-.CS
-# Clear all selections
-\&.h selection clear 0 end
-# Select the root node
-\&.h selection set 0 
-.CE
-The \fBcurselection\fR operation returns a list of ids of
-all the selected entries.
-.CS
-set ids [\&.h curselection]
-.CE
-You can use the \fBget\fR operation to convert the ids to 
-their pathnames.
-.CS
-set names [eval .h get -full $ids]
-.CE
-If a treeview is exporting its selection (using the
-\fB\-exportselection\fR option), then it will observe the standard X11
-protocols for handling the selection.  Treeview selections are
-available as type \fBSTRING\fR; the value of the selection will be the
-pathnames of the selected entries, separated by newlines.
-.PP
-The \fBtreeview\fR supports two modes of selection: \f(CWsingle\fR
-and \f(CWmultiple\fR.  In single select mode, only one entry can be
-selected at a time, while multiple select mode allows several entries
-to be selected.  The mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -selectmode "multiple"
-.CE
-You can be notified when the list of selected entries changes.  The widget's
-\fB\-selectcommand\fR specifies a Tcl procedure that is called whenever
-the selection changes.
-.CS
-proc SelectNotify { widget } {
-   set ids [\&$widget curselection]
-}
-\&.h configure -selectcommand "SelectNotify .h"
-.CE
-The widget supports the standard Tk scrolling and scanning operations.
-The \fBtreeview\fR can be both horizontally and vertically. You can
-attach scrollbars to the \fBtreeview\fR the same way as the listbox
-or canvas widgets.
-.CS
-scrollbar .xbar -orient horizontal -command ".h xview"
-scrollbar .ybar -orient vertical -command ".h yview"
-\&.h configure -xscrollcommand ".xbar set" \\
-    -yscrollcommand ".ybar set"
-.CE
-There are three different modes of scrolling: \f(CWlistbox\fR,
-\f(CWcanvas\fR, and \f(CWhierbox\fR.  In \f(CWlistbox\fR mode, the last
-entry can always be scrolled to the top of the widget.  In \f(CWhierbox\fR
-mode, the last entry is always drawn at the bottom of the widget.
-The scroll mode is set by the widget's \fB\-selectmode\fR
-option.
-.CS
-\&.h configure -scrollmode "listbox"
-.CE
-Entries can be programmatically opened or closed using the \fBopen\fR
-and \fBclose\fR operations respectively.  
-.CS
-\&.h open $id
-\&.h close $id
-.CE
-When an entry is opened, a Tcl procedure can be automatically invoked.
-The \fB\-opencommand\fR option specifies this procedure.  This
-procedure can lazily insert entries as needed.
-.CS
-proc AddEntries { dir } {
-   eval .h insert end [glob -nocomplain $dir/*] 
-}
-\&.h configure -opencommand "AddEntries %P"
-.CE
-Now when an entry is opened, the procedure \f(CWAddEntries\fR is
-called and adds children to the entry.  Before the command is invoked,
-special "%" substitutions (like \fBbind\fR) are performed. Above,
-\f(CW%P\fR is translated to the pathname of the entry.
-.PP
-The same feature exists when an entry is closed.  The
-\fB\-closecommand\fR option specifies the procedure.
-.CS
-proc DeleteEntries { id } {
-   .h entry delete $id 0 end
-}
-\&.h configure -closecommand "DeleteEntries %#"
-.CE
-When an entry is closed, the procedure \f(CWDeleteEntries\fR is called
-and deletes the entry's children using the \fBentry delete\fR operation
-(\f(CW%#\fR is the id of entry).
-.SH KEYWORDS
-treeview, widget
diff --git a/blt3.0/man/vector.mann b/blt3.0/man/vector.mann
deleted file mode 100644
index da7abf2..0000000
--- a/blt3.0/man/vector.mann
+++ /dev/null
@@ -1,1130 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Lucent Technologies, Inc.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Vector command created by George Howlett.
-'\"
-.so man.macros
-.TH blt::vector n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-\fBvector\fR \-  Vector data type for Tcl
-.SH SYNOPSIS
-\fBblt::vector create \fIvecName \fR?\fIvecName\fR...? ?\fIswitches\fR? 
-.sp
-\fBblt::vector destroy \fIvecName \fR?\fIvecName\fR...?
-.sp
-\fBblt::vector expr \fIexpression\fR
-.sp
-\fBblt::vector names \fR?\fIpattern\fR...?
-.BE
-.SH DESCRIPTION
-The \fBvector\fR command creates an array of floating point
-values.  The vector's components can be manipulated in three ways:
-through a Tcl array variable, a Tcl command, or the C API.
-.SH INTRODUCTION
-A vector is an ordered set of real numbers.  The components of a
-vector are indexed by integers.
-.PP
-Vectors are common data structures for many applications.  For
-example, a graph may use two vectors to represent the X-Y
-coordinates of the data plotted.  The graph will automatically
-be redrawn when the vectors are updated or changed. By using vectors, 
-you can separate
-data analysis from the graph widget.  This makes it easier, for
-example, to add data transformations, such as splines.  It's possible
-to plot the same data to in multiple graphs, where each graph presents
-a different view or scale of the data.
-.PP
-You could try to use Tcl's associative arrays as vectors.  Tcl arrays
-are easy to use.  You can access individual elements randomly by
-specifying the index, or the set the entire array by providing a list
-of index and value pairs for each element.  The disadvantages of 
-associative arrays as vectors lie in the fact they are implemented as
-hash tables.
-.TP 2
-\(bu 
-There's no implied ordering to the associative arrays.  If you used
-vectors for plotting, you would want to insure the second component
-comes after the first, an so on.  This isn't possible since arrays
-are actually hash tables.  For example, you can't get a range of
-values between two indices.  Nor can you sort an array.
-.TP 2
-\(bu
-Arrays consume lots of memory when the number of elements becomes
-large (tens of thousands).  This is because each element's index and
-value are stored as strings in the hash table.
-.TP 2
-\(bu 
-The C programming interface is unwieldy.  Normally with vectors, you
-would like to view the Tcl array as you do a C array, as an array of
-floats or doubles.  But with hash tables, you must convert both the
-index and value to and from decimal strings, just to access
-an element in the array.  This makes it cumbersome to perform operations on
-the array as a whole.
-.PP
-The \fBvector\fR command tries to overcome these disadvantages while
-still retaining the ease of use of Tcl arrays.  The \fBvector\fR
-command creates both a new Tcl command and associate array which are
-linked to the vector components.  You can randomly access vector
-components though the elements of array.  Not have all indices are
-generated for the array, so printing the array (using the \fBparray\fR
-procedure) does not print out all the component values.  You can use
-the Tcl command to access the array as a whole.  You can copy, append,
-or sort vector using its command.  If you need greater performance, or
-customized behavior, you can write your own C code to manage vectors.
-.SH EXAMPLE
-You create vectors using the \fBvector\fR command and its \fBcreate\fR
-operation.
-.CS
-# Create a new vector. 
-blt::vector create y(50)
-.CE
-This creates a new vector named \f(CWy\fR.  It has fifty components, by
-default, initialized to \f(CW0.0\fR.  In addition, both a Tcl command
-and array variable, both named \f(CWy\fR, are created.  You can use
-either the command or variable to query or modify components of the
-vector.
-.CS
-# Set the first value. 
-set y(0) 9.25
-puts "y has [y length] components"
-.CE
-The array \f(CWy\fR can be used to read or set individual components of
-the vector.  Vector components are indexed from zero.  The array index
-must be a number less than the number of components.  For example,
-it's an error if you try to set the 51st element of \f(CWy\fR.
-.CS
-# This is an error. The vector only has 50 components.
-set y(50) 0.02
-.CE
-You can also specify a range of indices using a colon (:) to separate
-the first and last indices of the range.
-.CS
-# Set the first six components of y 
-set y(0:5) 25.2
-.CE
-If you don't include an index, then it will default to the first
-and/or last component of the vector.
-.CS
-# Print out all the components of y 
-puts "y = $y(:)"
-.CE
-There are special non-numeric indices.  The index \f(CWend\fR, specifies
-the last component of the vector.  It's an error to use this index if
-the vector is empty (length is zero).  The index \f(CW++end\fR can be
-used to extend the vector by one component and initialize it to a specific 
-value.  You can't read from the array using this index, though.
-.CS
-# Extend the vector by one component.
-set y(++end) 0.02
-.CE
-The other special indices are \f(CWmin\fR and \f(CWmax\fR.  They return the
-current smallest and largest components of the vector.  
-.CS
-# Print the bounds of the vector
-puts "min=$y(min) max=$y(max)"
-.CE
-To delete components from a vector, simply unset the corresponding
-array element. In the following example, the first component of
-\f(CWy\fR is deleted.  All the remaining components of \f(CWy\fR will be
-moved down by one index as the length of the vector is reduced by
-one.
-.CS
-# Delete the first component
-unset y(0)
-puts "new first element is $y(0)"
-.CE
-The vector's Tcl command can also be used to query or set the vector.
-.CS
-# Create and set the components of a new vector
-blt::vector create x
-x set { 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 }
-.CE
-Here we've created a vector \f(CWx\fR without a initial length specification.
-In this case, the length is zero.  The \fBset\fR operation resets the vector,
-extending it and setting values for each new component.  
-.PP
-There are several operations for vectors.  The \fBrange\fR operation
-lists the components of a vector between two indices.
-.CS
-# List the components 
-puts "x = [x range 0 end]"
-.CE
-You can search for a particular value using the \fBsearch\fR
-operation.  It returns a list of indices of the components with the
-same value.  If no component has the same value, it returns \f(CW""\fR.
-.CS
-# Find the index of the biggest component
-set indices [x search $x(max)]
-.CE
-Other operations copy, append, or sort vectors.  You can append
-vectors or new values onto an existing vector with the \fBappend\fR
-operation.
-.CS
-# Append assorted vectors and values to x
-x append x2 x3 { 2.3 4.5 } x4
-.CE
-The \fBsort\fR operation sorts the vector.  If any additional vectors
-are specified, they are rearranged in the same order as the vector.
-For example, you could use it to sort data points represented by x and
-y vectors.
-.CS
-# Sort the data points
-x sort y
-.CE
-The vector \f(CWx\fR is sorted while the components of \f(CWy\fR are 
-rearranged so that the original x,y coordinate pairs are retained.
-.PP
-The \fBexpr\fR operation lets you perform arithmetic on vectors.  
-The result is stored in the vector.
-.CS
-# Add the two vectors and a scalar
-x expr { x + y }
-x expr { x * 2 }
-.CE
-When a vector is modified, resized, or deleted, it may trigger
-call-backs to notify the clients of the vector.  For example, when a
-vector used in the \fBgraph\fR widget is updated, the vector
-automatically notifies the widget that it has changed.  The graph can
-then redrawn itself at the next idle point.  By default, the
-notification occurs when Tk is next idle.  This way you can modify the
-vector many times without incurring the penalty of the graph redrawing
-itself for each change.  You can change this behavior using the
-\fBnotify\fR operation.
-.CS
-# Make vector x notify after every change
-x notify always
-	...
-# Never notify
-x notify never
-	...
-# Force notification now
-x notify now
-.CE
-To delete a vector, use the \fBvector delete\fR command.  
-Both the vector and its corresponding Tcl command are destroyed.
-.CS
-# Remove vector x
-blt::vector destroy x
-.CE
-.SH SYNTAX
-Vectors are created using the \fBvector create\fR operation.  
-Th \fBcreate\fR operation can be invoked in one of three forms:
-.TP
-\fBblt::vector create \fIvecName\fR
-This creates a new vector \fIvecName\fR which initially has no components.
-.TP
-\fBblt::vector create \fIvecName\fR(\fIsize\fR)
-This second form creates a new vector which will contain \fIsize\fR
-number of components.  The components will be indexed starting from
-zero (0). The default value for the components is \f(CW0.0\fR.
-.TP
-\fBblt::vector create \fIvecName\fR(\fIfirst\fR:\fIlast\fR)
-The last form creates a new vector of indexed \fIfirst\fR through
-\fIlast\fR.  \fIFirst\fR and \fIlast\fR can be any integer value
-so long as \fIfirst\fR is less than \fIlast\fR.
-.PP
-Vector names must start with a letter and consist of letters, digits,
-or underscores.  
-.CS
-# Error: must start with letter
-blt::vector create 1abc
-.CE
-You can automatically generate vector names using the
-"\f(CW#auto\fR" vector name.  The \fBcreate\fR operation will generate a 
-unique vector name.
-.CS
-set vec [blt::vector create #auto]
-puts "$vec has [$vec length] components"
-.CE
-.SS VECTOR INDICES
-Vectors are indexed by integers.  You can access the individual vector
-components via its array variable or Tcl command.  The string
-representing the index can be an integer, a numeric expression, a
-range, or a special keyword.
-.PP
-The index must lie within the current range of the vector, otherwise
-an an error message is returned.  Normally the indices of a vector
-are start from 0.  But you can use the \fBoffset\fR operation to
-change a vector's indices on-the-fly.
-.CS
-puts $vecName(0)
-vecName offset -5
-puts $vecName(-5)
-.CE
-You can also use numeric expressions as indices.  The result
-of the expression must be an integer value.  
-.CS
-set n 21
-set vecName($n+3) 50.2
-.CE
-The following special non-numeric indices are available: \f(CWmin\fR, \f(CWmax\fR, \f(CWend\fR, and
-\f(CW++end\fR.  
-.CS
-puts "min = $vecName($min)"
-set vecName(end) -1.2
-.CE
-The indices \f(CWmin\fR and \f(CWmax\fR will return the minimum and maximum
-values of the vector.  The index \f(CWend\fR returns the value of the 
-last component in the vector.  The index \f(CW++end\fR is used to append
-new value onto the vector.  It automatically extends the vector by
-one component and sets its value.
-.CS
-# Append an new component to the end
-set vecName(++end) 3.2
-.CE
-A range of indices can be indicated by a colon (:).  
-.CS
-# Set the first six components to 1.0
-set vecName(0:5) 1.0
-.CE
-If no index is supplied the first or last component is assumed.
-.CS
-# Print the values of all the components
-puts $vecName(:)
-.CE
-.SH VECTOR OPERATIONS
-.TP
-\fBblt::vector create \fIvecName\fR?(\fIsize\fR)?... \fR?\fIswitches\fR? 
-The \fBcreate\fR operation creates a new vector \fIvecName\fR.  Both a
-Tcl command and array variable \fIvecName\fR are also created.  The
-name \fIvecName\fR must be unique, so another Tcl command or array
-variable can not already exist in that scope.  You can access the
-components of the vector using its variable.  If you change a value in
-the array, or unset an array element, the vector is updated to reflect
-the changes.  When the variable \fIvecName\fR is unset, the vector and
-its Tcl command are also destroyed.
-.sp
-The vector has optional switches that affect how the vector is created. They
-are as follows:
-.RS
-.TP
-\fB\-variable \fIvarName\fR
-Specifies the name of a Tcl variable to be mapped to the vector. If
-the variable already exists, it is first deleted, then recreated. 
-If \fIvarName\fR is the empty string, then no variable will be mapped.
-You can always map a variable back to the vector using the vector's 
-\fBvariable\fR operation.
-.TP
-\fB\-command \fIcmdName\fR
-Maps a Tcl command to the vector. The vector can be accessed using 
-\fIcmdName\fR and one of the vector instance operations.  
-A Tcl command by that name cannot already exist.
-If \fIcmdName\fR is the empty string, no command mapping
-will be made.
-.TP
-\fB\-watchunset \fIboolean\fR
-Indicates that the vector should automatically delete itself if
-the variable associated with the vector is unset.  By default,
-the vector will not be deleted.  This is different from previous
-releases.  Set \fIboolean\fR to "true" to get the old behavior.
-.RE
-.TP
-\fBblt::vector destroy \fIvecName\fR \fR?\fIvecName...\fR?
-Deletes one or more vectors.  Both the Tcl command and array variable
-are removed also.
-.TP
-\fBblt::vector expr \fIexpression\fR
-.RS
-All binary operators take vectors as operands (remember that numbers
-are treated as one-component vectors).  The exact action of binary
-operators depends upon the length of the second operand.  If the
-second operand has only one component, then each element of the first
-vector operand is computed by that value.  For example, the expression
-"x * 2" multiples all elements of the vector x by 2.  If the second
-operand has more than one component, both operands must be the same
-length.  Each pair of corresponding elements are computed.  So "x + y"
-adds the the first components of x and y together, the second, and so on.
-.sp
-The valid operators are listed below, grouped in decreasing order
-of precedence:
-.TP 20
-\fB\-\0\0!\fR
-Unary minus and logical NOT.  The unary minus flips the sign of each
-component in the vector.  The logical not operator returns a vector of
-whose values are 0.0 or 1.0.  For each non-zero component 1.0 is returned,
-0.0 otherwise.
-.TP 20
-\fB^\fR
-Exponentiation.  
-.TP 20
-\fB*\0\0/\0\0%\fR
-Multiply, divide, remainder.  
-.TP 20
-\fB+\0\0\-\fR
-Add and subtract.  
-.TP 20
-\fB<<\0\0>>\fR
-Left and right shift.  Circularly shifts the values of the vector 
-(not implemented yet).
-.TP 20
-\fB<\0\0>\0\0<=\0\0>=\fR
-Boolean less, greater, less than or equal, and greater than or equal.
-Each operator returns a vector of ones and zeros.  If the condition is true, 
-1.0 is the component value, 0.0 otherwise.
-.TP 20
-\fB==\0\0!=\fR
-Boolean equal and not equal.
-Each operator returns a vector of ones and zeros.  If the condition is true, 
-1.0 is the component value, 0.0 otherwise.
-.TP 20
-\fB|\fR
-Bit-wise OR.  (Not implemented).
-.TP 20
-\fB&&\fR
-Logical AND.  Produces a 1 result if both operands are non-zero, 0 otherwise.
-.TP 20
-\fB||\fR
-Logical OR.  Produces a 0 result if both operands are zero, 1 otherwise.
-.TP 20
-\fIx\fB?\fIy\fB:\fIz\fR
-If-then-else, as in C.  (Not implemented yet).
-.LP
-See the C manual for more details on the results produced by each
-operator.  All of the binary operators group left-to-right within the
-same precedence level.  
-.sp
-Several mathematical functions are supported for vectors.  Each of
-the following functions invokes the math library function of the same name;
-see the manual entries for the library functions for details on what
-they do.  The operation is applied to all elements of the vector
-returning the results. 
-.CS
-.ta 3c 6c 9c
-\fBacos\fR	\fBcos\fR	\fBhypot\fR	\fBsinh\fR 
-\fBasin\fR	\fBcosh\fR	\fBlog\fR	\fBsqrt\fR 
-\fBatan\fR	\fBexp\fR	\fBlog10\fR	\fBtan\fR  
-\fBceil\fR	\fBfloor\fR	\fBsin\fR	\fBtanh\fR 
-.CE
-Additional functions are:
-.TP 1i
-\fBabs\fR
-Returns the absolute value of each component.
-.TP 1i
-\fBrandom\fR
-Returns a vector of non-negative values uniformly distributed 
-between [0.0, 1.0) using \fIdrand48\fR.
-The seed comes from the internal clock of the machine or may be 
-set manual with the srandom function.
-.TP 1i
-\fBround\fR
-Rounds each component of the vector.
-.TP 1i
-\fBsrandom\fR
-Initializes the random number generator using \fIsrand48\fR.
-The high order 32-bits are set using the integral portion of the first 
-vector component. All other components are ignored.  The low order 16-bits 
-are set to an arbitrary value.
-.PP
-The following functions return a single value.
-.TP 1i
-\fBadev\fR 
-Returns the average deviation (defined as the sum of the absolute values 
-of the differences between component and the mean, divided by the length
-of the vector).
-.TP 1i
-\fBkurtosis\fR
-Returns the degree of peakedness (fourth moment) of the vector.
-.TP 1i
-\fBlength\fR
-Returns the number of components in the vector.
-.TP 1i
-\fBmax\fR
-Returns the vector's maximum value.
-.TP 1i
-\fBmean\fR
-Returns the mean value of the vector.
-.TP 1i
-\fBmedian\fR
-Returns the median of the vector.
-.TP 1i
-\fBmin\fR
-Returns the vector's minimum value.
-.TP 1i
-\fBq1\fR
-Returns the first quartile of the vector.
-.TP 1i
-\fBq3\fR
-Returns the third quartile of the vector.
-.TP 1i
-\fBprod\fR 
-Returns the product of the components.
-.TP 1i
-\fBsdev\fR 
-Returns the standard deviation (defined as the square root of the variance)
-of the vector.
-.TP 1i
-\fBskew\fR 
-Returns the skewness (or third moment) of the vector.  This characterizes
-the degree of asymmetry of the vector about the mean.
-.TP 1i
-\fBsum\fR 
-Returns the sum of the components.
-.TP 1i
-\fBvar\fR
-Returns the variance of the vector. The sum of the squared differences 
-between each component and the mean is computed.  The variance is 
-the sum divided by the length of the vector minus 1.
-.PP
-The last set returns a vector of the same length as the argument.
-.TP 1i
-\fBnorm\fR 
-Scales the values of the vector to lie in the range [0.0..1.0].
-.TP 1i
-\fBsort\fR
-Returns the vector components sorted in ascending order.
-.RE
-.TP
-\fBvector names \fR?\fIpattern\fR?
-.SH INSTANCE OPERATIONS
-You can also use the vector's Tcl command to query or modify it.  The
-general form is
-.DS
-\fIvecName \fIoperation\fR \fR?\fIarg\fR?...
-.DE
-Both \fIoperation\fR and its arguments determine the exact behavior of
-the command.  The operations available for vectors are listed below.
-.TP
-\fIvecName \fBappend\fR \fIitem\fR ?\fIitem\fR?...
-Appends the component values from \fIitem\fR to \fIvecName\fR.
-\fIItem\fR can be either the name of a vector or a list of numeric
-values.
-.TP
-\fIvecName \fBbinread\fR \fIchannel\fR ?\fIlength\fR? ?\fIswitches\fR? 
-Reads binary values from a Tcl channel. Values are either appended
-to the end of the vector or placed at a given index (using the
-\fB\-at\fR option), overwriting existing values.  Data is read until EOF
-is found on the channel or a specified number of values \fIlength\fR 
-are read (note that this is not necessarily the same as the number of 
-bytes). The following switches are supported:
-.RS
-.TP
-\fB\-swap\fR
-Swap bytes and words.  The default endian is the host machine.
-.TP
-\fB\-at \fIindex\fR
-New values will start at vector index \fIindex\fR.  This will
-overwrite any current values.
-.TP
-\fB\-format\fR \fIformat\fR
-Specifies the format of the data.  \fIFormat\fR can be one of the
-following: "i1", "i2", "i4", "i8", "u1, "u2", "u4", "u8", "r4",
-"r8", or "r16".  The number indicates the number of bytes
-required for each value.  The letter indicates the type: "i" for signed,
-"u" for unsigned, "r" or real.  The default format is "r16".
-.RE
-.TP
-\fIvecName \fBclear\fR 
-Clears the element indices from the array variable associated with
-\fIvecName\fR.  This doesn't affect the components of the vector.  By
-default, the number of entries in the Tcl array doesn't match the
-number of components in the vector.  This is because its too expensive
-to maintain decimal strings for both the index and value for each
-component.  Instead, the index and value are saved only when you read
-or write an element with a new index.  This command removes the index
-and value strings from the array.  This is useful when the vector is
-large.
-.TP
-\fIvecName \fBdelete\fR \fIindex\fR ?\fIindex\fR?...
-Deletes the \fIindex\fRth component from the vector \fIvecName\fR.
-\fIIndex\fR is the index of the element to be deleted.  This is the
-same as unsetting the array variable element \fIindex\fR.  The vector
-is compacted after all the indices have been deleted.
-.TP
-\fIvecName \fBdup\fR \fIdestName\fR 
-Copies \fIvecName\fR to \fIdestName\fR. \fIDestName\fR is the name of a
-destination vector.  If a vector \fIdestName\fR already exists, it is
-overwritten with the components of \fIvecName\fR.  Otherwise a 
-new vector is created.
-.TP
-\fIvecName \fBexpr\fR \fIexpression\fR
-Computes the expression and resets the values of the vector accordingly.
-Both scalar and vector math operations are allowed.  All values in
-expressions are either real numbers or names of vectors.  All numbers
-are treated as one component vectors.
-.TP
-\fIvecName \fBlength\fR ?\fInewSize\fR?
-Queries or resets the number of components in \fIvecName\fR.
-\fINewSize\fR is a number specifying the new size of the vector.  If
-\fInewSize\fR is smaller than the current size of \fIvecName\fR,
-\fIvecName\fR is truncated.  If \fInewSize\fR is greater, the vector
-is extended and the new components are initialized to \f(CW0.0\fR.  If
-no \fInewSize\fR argument is present, the current length of the vector
-is returned.
-.TP
-\fIvecName \fBmerge\fR \fIsrcName\fR ?\fIsrcName\fR?...
-Merges the named vectors into a single vector.  The resulting 
-vector is formed by merging the components of each source vector 
-one index at a time.
-.TP
-\fIvecName \fBnotify\fR \fIkeyword\fR
-Controls how vector clients are notified of changes to the vector.  
-The exact behavior is determined by \fIkeyword\fR.
-.RS
-.TP 0.75i
-\f(CWalways\fR 
-Indicates that clients are to be notified immediately whenever the
-vector is updated.
-.TP
-\f(CWnever\fR
-Indicates that no clients are to be notified.
-.TP
-\f(CWwhenidle\fR
-Indicates that clients are to be notified at the next idle point
-whenever the vector is updated.
-.TP
-\f(CWnow\fR
-If any client notifications is currently pending, they are notified
-immediately.
-.TP
-\f(CWcancel\fR
-Cancels pending notifications of clients using the vector.
-.TP
-\f(CWpending\fR
-Returns \f(CW1\fR if a client notification is pending, and \f(CW0\fR otherwise.
-.RE
-.TP
-\fIvecName \fBoffset\fR ?\fIvalue\fR?
-Shifts the indices of the vector by the amount specified by \fIvalue\fR.
-\fIValue\fR is an integer number.  If no \fIvalue\fR argument is 
-given, the current offset is returned.
-.TP
-\fIvecName \fBpopulate\fR \fIdestName\fR ?\fIdensity\fR?
-Creates a vector \fIdestName\fR which is a superset of \fIvecName\fR.
-\fIDestName\fR will include all the components of \fIvecName\fR, in
-addition the interval between each of the original components will
-contain a \fIdensity\fR number of new components, whose values are
-evenly distributed between the original components values.  This is
-useful for generating abscissas to be interpolated along a spline.
-.TP
-\fIvecName \fBrange\fR \fIfirstIndex\fR ?\fIlastIndex\fR?...
-Returns a list of numeric values representing the vector components
-between two indices. Both \fIfirstIndex\fR and \fIlastIndex\fR are 
-indices representing the range of components to be returned. If 
-\fIlastIndex\fR is less than \fIfirstIndex\fR, the components are
-listed in reverse order.
-.TP
-\fIvecName \fBsearch\fR \fIvalue\fR ?\fIvalue\fR?  
-Searches for a value or range of values among the components of
-\fIvecName\fR.  If one \fIvalue\fR argument is given, a list of
-indices of the components which equal \fIvalue\fR is returned.  If a
-second \fIvalue\fR is also provided, then the indices of all
-components which lie within the range of the two values are returned.
-If no components are found, then \f(CW""\fR is returned.
-.TP
-\fIvecName \fBset\fR \fIitem\fR
-Resets the components of the vector to \fIitem\fR. \fIItem\fR can
-be either a list of numeric expressions or another vector.
-.TP
-\fIvecName \fBseq\fR \fIstart\fR ?\fIfinish\fR? ?\fIstep\fR?
-Generates a sequence of values starting with the value \fIstart\fR.
-\fIFinish\fR indicates the terminating value of the sequence.  
-The vector is automatically resized to contain just the sequence.
-If three arguments are present, \fIstep\fR designates the interval.  
-.sp
-With only two arguments (no \fIfinish\fR argument), the sequence will
-continue until the vector is filled.  With one argument, the interval 
-defaults to 1.0.
-.TP
-\fIvecName \fBsort\fR ?\fB-reverse\fR? ?\fIargName\fR?...  
-Sorts the vector \fIvecName\fR in increasing order.  If the
-\fB-reverse\fR flag is present, the vector is sorted in decreasing
-order.  If other arguments \fIargName\fR are present, they are the
-names of vectors which will be rearranged in the same manner as
-\fIvecName\fR.  Each vector must be the same length as \fIvecName\fR.
-You could use this to sort the x vector of a graph, while still
-retaining the same x,y coordinate pairs in a y vector.
-.TP
-\fIvecName \fBvariable\fR \fIvarName\fR
-Maps a Tcl variable to the vector, creating another means for 
-accessing the vector.  The variable \fIvarName\fR can't already 
-exist. This overrides any current variable mapping the vector
-may have.
-.RE
-.SH C LANGUAGE API
-You can create, modify, and destroy vectors from C code, using 
-library routines.  
-You need to include the header file \f(CWblt.h\fR. It contains the
-definition of the structure \fBBlt_Vector\fR, which represents the
-vector.  It appears below.
-.CS
-\fRtypedef struct {
-    double *\fIvalueArr\fR; 
-    int \fInumValues\fR;    
-    int \fIarraySize\fR;    
-    double \fImin\fR, \fImax\fR;  
-} \fBBlt_Vector\fR;
-.CE
-The field \fIvalueArr\fR points to memory holding the vector
-components.  The components are stored in a double precision array,
-whose size size is represented by \fIarraySize\fR.  \fINumValues\fR is
-the length of vector.  The size of the array is always equal to or
-larger than the length of the vector.  \fIMin\fR and \fImax\fR are
-minimum and maximum component values.
-.SH LIBRARY ROUTINES
-The following routines are available from C to manage vectors.
-Vectors are identified by the vector name.
-.PP
-\fBBlt_CreateVector\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS 
-int \fBBlt_CreateVector\fR (\fIinterp\fR, \fIvecName\fR, \fIlength\fR, \fIvecPtrPtr\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-char *\fIvecName\fR;
-int \fIlength\fR;
-Blt_Vector **\fIvecPtrPtr\fR;
-.RE
-.CE
-.TP
-Description:
-Creates a new vector \fIvecName\fR\fR with a length of \fIlength\fR.
-\fBBlt_CreateVector\fR creates both a new Tcl command and array 
-variable \fIvecName\fR.  Neither a command nor variable named 
-\fIvecName\fR can already exist.  A pointer to the vector is 
-placed into \fIvecPtrPtr\fR.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully created.  If
-\fIlength\fR is negative, a Tcl variable or command \fIvecName\fR
-already exists, or memory cannot be allocated for the vector, then
-\f(CWTCL_ERROR\fR is returned and \fIinterp->result\fR will contain an
-error message.
-.RE
-.sp
-.PP
-\fBBlt_DeleteVectorByName\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_DeleteVectorByName\fR (\fIinterp\fR, \fIvecName\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-char *\fIvecName\fR;
-.RE
-.CE
-.TP 1i
-Description:
-Removes the vector \fIvecName\fR.  \fIVecName\fR is the name of a vector
-which must already exist.  Both the Tcl command and array variable
-\fIvecName\fR are destroyed.  All clients of the vector will be notified
-immediately that the vector has been destroyed.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully deleted.  If
-\fIvecName\fR is not the name a vector, then \f(CWTCL_ERROR\fR is returned
-and \fIinterp->result\fR will contain an error message.
-.RE
-.sp
-.PP
-\fBBlt_DeleteVector\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_DeleteVector\fR (\fIvecPtr\fR)
-.RS 1.25i
-Blt_Vector *\fIvecPtr\fR;
-.RE
-.CE
-.TP 1i
-Description:
-Removes the vector pointed to by \fIvecPtr\fR.  \fIVecPtr\fR is a
-pointer to a vector, typically set by \fBBlt_GetVector\fR or
-\fBBlt_CreateVector\fR.  Both the Tcl command and array variable of
-the vector are destroyed.  All clients of the vector will be notified
-immediately that the vector has been destroyed.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully deleted.  If
-\fIvecName\fR is not the name a vector, then \f(CWTCL_ERROR\fR is returned
-and \fIinterp->result\fR will contain an error message.
-.RE
-.sp
-.PP
-\fBBlt_GetVector\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_GetVector\fR (\fIinterp\fR, \fIvecName\fR, \fIvecPtrPtr\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-char *\fIvecName\fR;
-Blt_Vector **\fIvecPtrPtr\fR;
-.RE
-.CE
-.TP 1i
-Description:
-Retrieves the vector \fIvecName\fR.  \fIVecName\fR is the name of a
-vector which must already exist.  \fIVecPtrPtr\fR will point be set to
-the address of the vector.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully retrieved.  If
-\fIvecName\fR is not the name of a vector, then \f(CWTCL_ERROR\fR is
-returned and \fIinterp->result\fR will contain an error message.
-.RE
-.sp
-.PP
-\fBBlt_ResetVector\fR 
-.PP
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_ResetVector\fR (\fIvecPtr\fR, \fIdataArr\fR, 
-	\fInumValues\fR, \fIarraySize\fR, \fIfreeProc\fR)
-.RS 1.25i
-Blt_Vector *\fIvecPtr\fR;
-double *\fIdataArr\fR;
-int *\fInumValues\fR;
-int *\fIarraySize\fR;
-Tcl_FreeProc *\fIfreeProc\fR;
-.RE
-.CE
-.TP
-Description: 
-Resets the components of the vector pointed to by \fIvecPtr\fR.
-Calling \fBBlt_ResetVector\fR will trigger the vector to dispatch
-notifications to its clients. \fIDataArr\fR is the array of doubles
-which represents the vector data. \fINumValues\fR is the number of
-elements in the array. \fIArraySize\fR is the actual size of the array
-(the array may be bigger than the number of values stored in
-it). \fIFreeProc\fP indicates how the storage for the vector component
-array (\fIdataArr\fR) was allocated.  It is used to determine how to
-reallocate memory when the vector is resized or destroyed.  It must be
-\f(CWTCL_DYNAMIC\fR, \f(CWTCL_STATIC\fR, \f(CWTCL_VOLATILE\fR, or a pointer
-to a function to free the memory allocated for the vector array. If
-\fIfreeProc\fR is \f(CWTCL_VOLATILE\fR, it indicates that \fIdataArr\fR
-must be copied and saved.  If \fIfreeProc\fR is \f(CWTCL_DYNAMIC\fR, it
-indicates that \fIdataArr\fR was dynamically allocated and that Tcl
-should free \fIdataArr\fR if necessary.  \f(CWStatic\fR indicates that
-nothing should be done to release storage for \fIdataArr\fR.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully resized.  If
-\fInewSize\fR is negative, a vector \fIvecName\fR does not exist, or
-memory cannot be allocated for the vector, then \f(CWTCL_ERROR\fR is
-returned and \fIinterp->result\fR will contain an error message.
-.RE
-.sp
-.PP
-\fBBlt_ResizeVector\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_ResizeVector\fR (\fIvecPtr\fR, \fInewSize\fR)
-.RS 1.25i
-Blt_Vector *\fIvecPtr\fR;
-int \fInewSize\fR;
-.RE
-.CE
-.TP
-Description:
-Resets the length of the vector pointed to by \fIvecPtr\fR to
-\fInewSize\fR.  If \fInewSize\fR is smaller than the current size of
-the vector, it is truncated.  If \fInewSize\fR is greater, the vector
-is extended and the new components are initialized to \f(CW0.0\fR.
-Calling \fBBlt_ResetVector\fR will trigger the vector to dispatch
-notifications.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully resized.  If
-\fInewSize\fR is negative or memory can not be allocated for the vector, 
-then \f(CWTCL_ERROR\fR is returned and \fIinterp->result\fR will contain 
-an error message.
-.sp
-.PP
-\fBBlt_VectorExists\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_VectorExists\fR (\fIinterp\fR, \fIvecName\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-char *\fIvecName\fR;
-.RE
-.CE
-.TP
-Description:
-Indicates if a vector named \fIvecName\fR exists in \fIinterp\fR.
-.TP
-Results:
-Returns \f(CW1\fR if a vector \fIvecName\fR exists and \f(CW0\fR otherwise.
-.RE
-.sp
-.PP
-If your application needs to be notified when a vector changes, it can
-allocate a unique \fIclient identifier\fR for itself.  Using this
-identifier, you can then register a call-back to be made whenever the
-vector is updated or destroyed.  By default, the call-backs are made at
-the next idle point.  This can be changed to occur at the time the
-vector is modified.  An application can allocate more than one
-identifier for any vector.  When the client application is done with
-the vector, it should free the identifier.
-.PP
-The call-back routine must of the following type.
-.CS
-.RS
-.sp
-typedef void (\fBBlt_VectorChangedProc\fR) (Tcl_Interp *\fIinterp\fR, 
-.RS .25i
-ClientData \fIclientData\fR, Blt_VectorNotify \fInotify\fR);
-.RE
-.sp
-.RE
-.CE
-.fi
-\fIClientData\fR is passed to this routine whenever it is called.  You
-can use this to pass information to the call-back.  The \fInotify\fR 
-argument indicates whether the vector has been updated of destroyed. It
-is an enumerated type.
-.CS
-.RS
-.sp
-typedef enum {
-    \f(CWBLT_VECTOR_NOTIFY_UPDATE\fR=1,
-    \f(CWBLT_VECTOR_NOTIFY_DESTROY\fR=2
-} \fBBlt_VectorNotify\fR;
-.sp
-.RE
-.CE
-.PP
-\fBBlt_AllocVectorId\fR
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-Blt_VectorId \fBBlt_AllocVectorId\fR (\fIinterp\fR, \fIvecName\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-char *\fIvecName\fR;
-.RE
-.CE
-.TP
-Description:
-Allocates an client identifier for with the vector \fIvecName\fR.
-This identifier can be used to specify a call-back which is triggered
-when the vector is updated or destroyed.
-.TP
-Results:
-Returns a client identifier if successful.  If \fIvecName\fR is not
-the name of a vector, then \f(CWNULL\fR is returned and
-\fIinterp->result\fR will contain an error message.
-.RE
-.sp
-.PP
-\fBBlt_GetVectorById\fR 
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-int \fBBlt_GetVector\fR (\fIinterp\fR, \fIclientId\fR, \fIvecPtrPtr\fR)
-.RS 1.25i
-Tcl_Interp *\fIinterp\fR;
-Blt_VectorId \fIclientId\fR;
-Blt_Vector **\fIvecPtrPtr\fR;
-.RE
-.CE
-.TP 1i
-Description:
-Retrieves the vector used by \fIclientId\fR.  \fIClientId\fR is a valid
-vector client identifier allocated by \fBBlt_AllocVectorId\fR.
-\fIVecPtrPtr\fR will point be set to the address of the vector.
-.TP
-Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully retrieved.  
-.RE
-.sp
-.PP
-\fBBlt_SetVectorChangedProc\fR
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-void \fBBlt_SetVectorChangedProc\fR (\fIclientId\fR, \fIproc\fR, \fIclientData\fR);
-.RS 1.25i
-Blt_VectorId \fIclientId\fR;
-Blt_VectorChangedProc *\fIproc\fR;
-ClientData *\fIclientData\fR;
-.RE
-.CE
-.TP
-Description: 
-Specifies a call-back routine to be called whenever the vector
-associated with \fIclientId\fR is updated or deleted.  \fIProc\fR is a
-pointer to call-back routine and must be of the type
-\fBBlt_VectorChangedProc\fR.  \fIClientData\fR is a one-word value to
-be passed to the routine when it is invoked. If \fIproc\fR is
-\f(CWNULL\fR, then the client is not notified.
-.TP
-Results:
-The designated call-back procedure will be invoked when the vector is 
-updated or destroyed.
-.RE
-.sp
-.PP
-\fBBlt_FreeVectorId\fR
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-void \fBBlt_FreeVectorId\fR (\fIclientId\fR);
-.RS 1.25i
-Blt_VectorId \fIclientId\fR;
-.RE
-.CE
-.TP
-Description: 
-Frees the client identifier.  Memory allocated for the identifier 
-is released.  The client will no longer be notified when the
-vector is modified.
-.TP
-Results:
-The designated call-back procedure will be no longer be invoked when
-the vector is updated or destroyed.
-.RE
-.sp
-.PP
-\fBBlt_NameOfVectorId\fR
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-char *\fBBlt_NameOfVectorId\fR (\fIclientId\fR);
-.RS 1.25i
-Blt_VectorId \fIclientId\fR;
-.RE
-.CE
-.TP
-Description: 
-Retrieves the name of the vector associated with the client identifier
-\fIclientId\fR.  
-.TP
-Results:
-Returns the name of the vector associated with \fIclientId\fR.  If
-\fIclientId\fR is not an identifier or the vector has been destroyed, 
-\f(CWNULL\fR is returned.
-.RE
-.sp
-.PP
-\fBBlt_InstallIndexProc\fR
-.RS .25i
-.TP 1i
-Synopsis:
-.CS
-void \fBBlt_InstallIndexProc\fR (\fIindexName\fR, \fIprocPtr\fR)
-.RS 1.25i
-char *\fIindexName\fR;
-Blt_VectorIndexProc *\fIprocPtr\fR;
-.RE
-.CE
-.TP
-Description: 
-Registers a function to be called to retrieved the index \fIindexName\fR
-from the vector's array variable.  
-.sp
-typedef double Blt_VectorIndexProc(Vector *vecPtr);
-.sp
-The function will be passed a pointer to the vector.  The function must
-return a double representing the value at the index.
-.TP
-Results:
-The new index is installed into the vector.
-.RE
-.RE
-.SH C API EXAMPLE
-The following example opens a file of binary data and stores it in an
-array of doubles. The array size is computed from the size of the
-file. If the vector "data" exists, calling \fBBlt_VectorExists\fR,
-\fBBlt_GetVector\fR is called to get the pointer to the vector.
-Otherwise the routine \fBBlt_CreateVector\fR is called to create a new
-vector and returns a pointer to it. Just like the Tcl interface, both
-a new Tcl command and array variable are created when a new vector is
-created. It doesn't make any difference what the initial size of the
-vector is since it will be reset shortly. The vector is updated when
-\fBlt_ResetVector\fR is called.  Blt_ResetVector makes the changes
-visible to the Tcl interface and other vector clients (such as a graph
-widget).
-.sp
-.CS
-#include <tcl.h>
-#include <blt.h>				
-...
-Blt_Vector *vecPtr;
-double *newArr;
-FILE *f;
-struct stat statBuf;
-int numBytes, numValues;
-
-f = fopen("binary.dat", "r");
-fstat(fileno(f), &statBuf);
-numBytes = (int)statBuf.st_size;
-
-/* Allocate an array big enough to hold all the data */
-newArr = (double *)malloc(numBytes);
-numValues = numBytes / sizeof(double);
-fread((void *)newArr, numValues, sizeof(double), f);
-fclose(f);
-
-if (Blt_VectorExists(interp, "data"))  {
-    if (Blt_GetVector(interp, "data", &vecPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-} else {
-   if (Blt_CreateVector(interp, "data", 0, &vecPtr) != TCL_OK) {
-	return TCL_ERROR;
-   }
-}
-/* 
- * Reset the vector. Clients will be notified when Tk is idle. 
- * TCL_DYNAMIC tells the vector to free the memory allocated 
- * if it needs to reallocate or destroy the vector.
- */
-if (Blt_ResetVector(vecPtr, newArr, numValues, numValues, 
-	TCL_DYNAMIC) != TCL_OK) {
-    return TCL_ERROR;
-}
-.CE
-.SH "INCOMPATIBILITIES"
-In previous versions, if the array variable isn't global 
-(i.e. local to a Tcl procedure), the vector is automatically 
-destroyed when the procedure returns.
-.CS
-proc doit {} {
-    # Temporary vector x
-    vector x(10)
-    set x(9) 2.0
-      ...
-}
-.CE
-.PP
-This has changed.  Variables are not automatically destroyed when
-their variable is unset.  You can restore the old behavior by
-setting the "-watchunset" switch.
-.CE
-.SH KEYWORDS
-vector, graph, widget
diff --git a/blt3.0/man/watch.mann b/blt3.0/man/watch.mann
deleted file mode 100644
index 5080943..0000000
--- a/blt3.0/man/watch.mann
+++ /dev/null
@@ -1,137 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\"
-.so man.macros
-.TH watch n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-.SH NAME
-watch \- call Tcl procedures before and after each command
-.SH SYNOPSIS
-\fBwatch create\fR \fIwatchName\fR ?\fIoptions\fR?
-.sp
-\fBwatch activate\fR \fIwatchName\fR
-.sp
-\fBwatch deactivate\fR \fIwatchName\fR
-.sp
-\fBwatch delete\fR \fIwatchName\fR
-.sp
-\fBwatch configure\fR \fIwatchName\fR ?\fIoptions\fR
-.sp
-\fBwatch info\fR \fIwatchName\fR
-.sp
-\fBwatch names\fR 
-.BE
-.SH DESCRIPTION
-The \fBwatch\fR command arranges for Tcl procedures to be invoked
-before and after the execution of each Tcl command.
-.SH INTRODUCTION
-When an error occurs in Tcl, the global variable \fIerrorInfo\fR will
-contain a stack-trace of the active procedures when the error occured.
-Sometimes, however, the stack trace is insufficient.  You may need to
-know exactly where in the program's execution the error occured.  In
-cases like this, a more general tracing facility would be useful.
-.PP
-The \fBwatch\fR command lets you designate Tcl procedures to be
-invoked before and after the execution of each Tcl command.  This
-means you can display the command line and its results for each
-command as it executes.  Another use is to profile your Tcl commands.
-You can profile any Tcl command (like \fBif\fR and \fBset\fR), not just
-Tcl procedures.
-.SH EXAMPLE
-The following example use \fBwatch\fR to trace Tcl commands 
-(printing to standard error) both before and after they are executed. 
-.CS 
-proc preCmd { level command argv } {
-    set name [lindex $argv 0]
-    puts stderr "$level $name => $command"
-}
-
-proc postCmd { level command argv retcode results } {
-    set name [lindex $argv 0]
-    puts stderr "$level $name => $argv\n<= ($retcode) $results"
-}
-watch create trace \\
-	-postcmd postCmd -precmd preCmd
-.CE
-.SH "OPERATIONS"
-The following operations are available for the \fBwatch\fR command:
-.TP
-\fBwatch activate \fIwatchName\fR 
-Activates the watch, causing Tcl commands the be traced to the
-maximum depth selected.
-.TP
-\fBwatch create \fIwatchName\fR ?\fIoptions\fR?...
-Creates a new watch \fIwatchName\fR. It's an error if another watch 
-\fIwatchName\fR already exists and an error message will be returned.
-\fIOptions\fR may have any of the values accepted by the 
-\fBwatch configure\fR command.
-This command returns the empty string.  
-.TP
-\fBwatch configure \fIwatchName\fR ?\fIoptions...\fR?
-Queries or modifies the configuration options of the watch \fIwatchName\fR.
-\fIWatchName\fR is the name of a watch.
-\fIOptions\fR may have any of the following values:
-.RS
-.TP
-\fB\-active \fIboolean\fR
-Specifies if the watch is active.
-By default, watches are active when created.
-.TP
-\fB\-postcmd \fIstring\fR
-Specifies a Tcl procedure to be called immediately after each Tcl
-command.  \fIString\fR is name of a Tcl procedure and any extra
-arguments to be passed to it.  Before \fIstring\fR is invoked, five
-more arguments are appended: 1) the current level 2) the current
-command line 3) a list containing the command after substitutions and
-split into words 4) the return code of the command, and 5) the results
-of the command.  The return status of the postcmd procedure is always
-ignored.
-.TP
-\fB\-precmd \fIstring\fR 
-Specifies a Tcl procedure to be called immediately before each Tcl
-command.  \fIString\fR is name of a Tcl procedure and any extra
-arguments to be passed to it.  Before \fIstring\fR is invoked, three
-arguments are appended: 1) the current level 2) the current command
-line, and 3) a list containing the command after substitutions and
-split into words.  The return status of the \fB\-precmd\fR procedure
-is always ignored.
-.TP
-\fB\-maxlevel \fInumber\fR
-Specifies the maximum evaluation depth to watch Tcl commands.
-The default maximum level is 10000.
-.RE
-.TP
-\fBwatch deactivate \fIwatchName\fR 
-Deactivates the watch.  The \fB\-precmd\fR and \fB\-postcmd\fR procedures
-will no longer be invoked.
-.TP
-\fBwatch info \fIwatchName\fR 
-Returns the configuration information associated with the 
-watch \fIwatchName\fR.  \fIWatchName\fR is the name of a watch.
-.TP
-\fBwatch names\fR ?\fIstate\fR?
-Lists the names of the watches for a given state.  \fIState\fR may be
-one of the following: \f(CWactive\fR, \f(CWidle\fR, or \f(CWignore\fR.  If a
-\fIstate\fR argument isn't specified,
- all watches are
-listed.
-.RE
-.SH KEYWORDS
-debug, profile
diff --git a/blt3.0/man/winop.mann b/blt3.0/man/winop.mann
deleted file mode 100644
index 189680d..0000000
--- a/blt3.0/man/winop.mann
+++ /dev/null
@@ -1,131 +0,0 @@
-'\"
-'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies.
-'\"
-'\" Permission to use, copy, modify, and distribute this software and its
-'\" documentation for any purpose and without fee is hereby granted, provided
-'\" that the above copyright notice appear in all copies and that both that the
-'\" copyright notice and warranty disclaimer appear in supporting documentation,
-'\" and that the names of Lucent Technologies any of their entities not be used
-'\" in advertising or publicity pertaining to distribution of the software
-'\" without specific, written prior permission.
-'\"
-'\" Lucent Technologies disclaims all warranties with regard to this software,
-'\" including all implied warranties of merchantability and fitness.  In no event
-'\" shall Lucent Technologies be liable for any special, indirect or
-'\" consequential damages or any damages whatsoever resulting from loss of use,
-'\" data or profits, whether in an action of contract, negligence or other
-'\" tortuous action, arising out of or in connection with the use or performance
-'\" of this software.  
-'\"
-'\" Window command created by George Howlett.
-'\"
-.so man.macros
-.TH winop n BLT_VERSION BLT "BLT Built-In Commands"
-.BS
-'\" Note:  do not modify the .SH NAME line immediately below!
-.SH NAME
-winop \- Perform assorted window operations
-.SH SYNOPSIS
-\fBwinop lower\fR ?\fIwindow\fR?...
-.sp
-\fBwinop map\fR ?\fIwindow\fR?...
-.sp
-\fBwinop move \fIwindow x y\fR
-.sp
-\fBwinop raise\fR ?\fIwindow\fR?...
-.sp
-\fBwinop snap \fIwindow photoName\fR
-.sp
-\fBwinop unmap\fR ?\fIwindow\fR?...
-.sp
-\fBwinop warpto\fR ?\fIwindow\fR?
-.BE
-.SH DESCRIPTION
-The \fBwinop\fR command performs various window operations on Tk
-windows using low-level Xlib function calls to work around window
-manager pecularities.
-.SH INTRODUCTION
-Tk has several commands for manipulating its windows: \fBraise\fR,
-\fBlower\fR, \fBwm\fR, etc.  These commands ask the window manager to
-perform operations on Tk windows.  In some cases, a particular window
-manager won't perform the operation as expected.
-.PP
-For example, if you positioned a toplevel window using \fBwm geometry\fR,
-the window may not actually be at those particular coordinates.  The
-position of the window may be offset by dimensions of the title bar added
-by the window manager.  
-.PP
-In situations like these, the \fBwinop\fR command can be used to
-workaround these difficulties.  Instead, it makes low-level Xlib
-(such \fBXRaiseWindow\fR and \fBXMapWindow\fR) calls to perform these
-operations.
-.CS
-toplevel .top
-wm withdraw .top
-
-# Set the geometry to make the window manager 
-# place the window.
-wm geometry .top +100+100
-
-# Move the window to the desired location
-# and "update" to force the window manager
-# to recognize it.
-winop move .top 100 100
-update 
-
-wm deiconify .top
-winop move .top 100 100
-.CE
-.SH OPERATIONS
-The following operations are available for the \fBwinop\fR command:
-.TP
-\fBwinop lower\fR ?\fIwindow\fR?...
-Lowers \fIwindow\fR to the bottom of the X window stack.  \fIWindow\fR is
-the path name of a Tk window.  
-.TP
-\fBwinop map\fR ?\fIwindow\fR?...
-Maps \fIwindow\fR on the screen.  \fIWindow\fR
-is the path name of a Tk window. If \fIwindow\fR is already mapped,
-this command has no effect.  
-.TP
-\fBwinop move \fIwindow x y\fR
-Move \fIwindow\fR to the screen location specified by \fIx\fR
-and \fIy\fR. \fIWindow\fR is the path name of a Tk window, while
-\fIx\fR and \fIy\fR are screen coordinates.  This command returns 
-the empty string.
-.TP
-\fBwinop raise\fR ?\fIwindow\fR?...
-Raises \fIwindow\fR to the top of the X window stack. \fIWindow\fR must be
-a valid path name of a Tk window.  This command returns the empty string.
-.TP
-\fBwinop snap \fIwindow photoName\fR
-Takes a snapshot of the \fIwindow\fR and stores the contents in the
-photo image \fIphotoName\fR. \fIWindow\fR is the valid path name of a
-Tk window which must be totally visible (unobscured).  \fIPhotoName\fR
-is the name of a Tk photo image which must already exist.  This command
-can fail if the window is obscured in any fashion, such as covered by 
-another window or partially offscreen.  In that case, an error message
-is returned.
-.TP
-\fBwinop unmap\fR ?\fIwindow\fR?...
-Unmaps \fIwindow\fR from the screen. \fIWindow\fR is the path name of a Tk
-window. 
-.TP
-\fBwinop warpto\fR ?\fIwindow\fR?
-Warps the pointer to \fIwindow\fR. \fIWindow\fR is the path name of a Tk window
-which must be mapped. If \fIwindow\fR is in the form \fI at x,y\fR, where
-\fIx\fR and \fIy\fR are root screen coordinates, the pointer is warped to
-that location on the screen.
-.sp
-[\fII've never heard a good case for warping the pointer in an
-application.  It can be useful for testing, but in applications, it's
-always a bad idea.  Simply stated, the user owns the pointer, not the
-application.  If you have an application that needs it, I'd like to
-hear about it.\fR]
-.sp
-If no \fIwindow\fR argument is present the current location of the
-pointer is returned. The location is returned as a list in the form
-"\fIx y\fR", where \fIx\fR and \fIy\fR are the current coordinates of
-the pointer.
-.SH KEYWORDS
-window, map, raise, lower, pointer, warp
diff --git a/blt3.0/src/Makefile-cyg.in b/blt3.0/src/Makefile-cyg.in
deleted file mode 100644
index 3b01f38..0000000
--- a/blt3.0/src/Makefile-cyg.in
+++ /dev/null
@@ -1,661 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for static version of BLT library
-# ------------------------------------------------------------------------
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-BLT_LIBRARY =		@BLT_LIBRARY@
-CC =			@CC@
-CFLAGS =		@CFLAGS@ 
-DEFINES =		@DEFINES@
-EXTRA_CFLAGS =		@GCCFLAGS@ $(SO_CFLAGS) 
-LDFLAGS =		@LDFLAGS@ @LD_RUN_PATH@
-LIB_PREFIX =		@LIB_PREFIX@
-TCLLIBPATH   =		@TCL_LIB_DIR@/tcl at TCL_VERSION@
-TCL_DBG =		@TCL_DBGX@
-
-SO_CFLAGS =		@BLT_SO_CFLAGS@
-LIB_SUFFIX =		@BLT_LIB_SUFFIX@
-SO_EXT =		@BLT_SO_EXT@
-SO_PREFIX =		@BLT_SO_PREFIX@
-SO_LD =			@BLT_SO_LD@
-SO_LD_FLAGS =		@BLT_SO_LD_FLAGS@ @LD_RUN_PATH@
-
-IMPLIB_PREFIX =		@IMPLIB_PREFIX@
-IMPLIB_EXT =		@IMPLIB_EXT@
-
-EXPAT_INC_SPEC =	@EXPAT_INC_SPEC@
-EXPAT_LIB_SPEC =	@EXPAT_LIB_SPEC@
-FT2_INC_SPEC =		@FT2_INC_SPEC@
-FT2_LIB_SPEC =		@FT2_LIB_SPEC@
-JPG_INC_SPEC =		@JPG_INC_SPEC@
-JPG_LIB_SPEC =		@JPG_LIB_SPEC@
-MYSQL_INC_SPEC =	@MYSQL_INC_SPEC@
-MYSQL_LIB_SPEC =	@MYSQL_LIB_SPEC@
-PNG_INC_SPEC =		@PNG_INC_SPEC@
-PNG_LIB_SPEC =		@PNG_LIB_SPEC@ $(Z_LIB_SPEC)
-TCL_INC_SPEC =		@TCL_INC_SPEC@
-TCL_LIB_SPEC =		@TCL_LIB_SPEC@
-TCL_STUBS_SPEC =	@TCL_STUBS_SPEC@
-TIF_INC_SPEC =		@TIF_INC_SPEC@
-TIF_LIB_SPEC =		@TIF_LIB_SPEC@
-TK_INC_SPEC =		@TK_INC_SPEC@
-TK_LIB_SPEC =		@TK_LIB_SPEC@
-TK_STUBS_SPEC =		@TK_STUBS_SPEC@
-X11_INC_SPEC =		@X11_INC_SPEC@
-X11_LIB_SPEC =		@X11_LIB_SPEC@
-XFT_INC_SPEC =		@XFT_INC_SPEC@
-XFT_LIB_SPEC =		@XFT_LIB_SPEC@
-XPM_INC_SPEC =		@XPM_INC_SPEC@
-XPM_LIB_SPEC =		@XPM_LIB_SPEC@
-FTCFG_LIB_SPEC =	@FTCFG_LIB_SPEC@
-Z_LIB_SPEC =		@Z_LIB_SPEC@
-
-version =		@BLT_MAJOR_VERSION@@BLT_MINOR_VERSION@
-
-# ------------------------------------------------------------------------
-# 	Source and targer installation directories 
-# ------------------------------------------------------------------------
-
-bindir =		$(exec_prefix)/bin
-datadir =		@datadir@
-datarootdir =		@datarootdir@
-exec_prefix =		@exec_prefix@
-incdir =		$(prefix)/include
-includedir =		@includedir@
-libdir =		@libdir@
-prefix =		@prefix@
-scriptdir =		$(exec_prefix)/lib
-srcdir =		@srcdir@
-pkgdir =		@BLT_LIBRARY@
-
-instdirs =		$(prefix) \
-			$(exec_prefix) \
-			$(bindir) \
-			$(libdir) \
-			$(incdir) \
-			$(pkgdir) \
-			$(scriptdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-INCLUDES =		-I. \
-			-I$(srcdir) \
-			-I$(srcdir)/../win \
-			$(TK_INC_SPEC) \
-			$(TCL_INC_SPEC) \
-			@INCLUDES@
-
-# ------------------------------------------------------------------------
-#       Libraries directives for Tcl, Tk, X11, and BLT
-# ------------------------------------------------------------------------
-
-EXTRA_CORE_LIBS =	@LIBS@ @EXTRA_LIBS@ 
-
-EXTRA_X_LIBS =		$(EXTRA_CORE_LIBS) 
-
-BLT_X_SO_LIBS =		$(XFT_LIB_SPEC) \
-			$(FTCFG_LIB_SPEC) \
-			$(FT2_LIB_SPEC) 
-
-BLT_X_A_LIBS =		$(BLT_X_SO_LIBS) \
-			$(JPG_LIB_SPEC) \
-			$(PNG_LIB_SPEC) \
-			$(TIF_LIB_SPEC) \
-			$(XPM_LIB_SPEC) 
-
-BLT_CORE_SO_LIBS =	
-
-BLT_CORE_A_LIBS =	$(BLT_CORE_SO_LIBS) \
-			$(MYSQL_LIB_SPEC) \
-			$(EXPAT_LIB_SPEC) 
-
-blt_core_a =		lib$(blt_core_name).a
-blt_core_implib = 	$(IMPLIB_PREFIX)$(blt_core_name)$(IMPLIB_EXT)
-blt_core_name =		BLTCore$(version)$(LIB_SUFFIX)
-blt_core_so =		$(SO_PREFIX)$(blt_core_name)$(SO_EXT)
-
-blt_x_a =		lib$(blt_x_name).a
-blt_x_implib =		$(IMPLIB_PREFIX)$(blt_x_name)$(IMPLIB_EXT)
-blt_x_name =		BLTX$(version)$(LIB_SUFFIX)
-blt_x_so =		$(SO_PREFIX)$(blt_x_name)$(SO_EXT)
-
-blt_dt_csv_implib =	$(IMPLIB_PREFIX)$(blt_dt_csv_name)$(IMPLIB_EXT)
-blt_dt_csv_name =       DataTableCsv$(version)$(LIB_SUFFIX)
-blt_dt_csv_so =		$(blt_dt_csv_name)$(SO_EXT)
-
-blt_dt_mysql_implib =   $(IMPLIB_PREFIX)$(blt_dt_mysql_name)$(IMPLIB_EXT)
-blt_dt_mysql_name =     DataTableMysql$(version)$(LIB_SUFFIX)
-blt_dt_mysql_so =       $(blt_dt_mysql_name)$(SO_EXT)
-
-blt_dt_tree_implib =	$(IMPLIB_PREFIX)$(blt_dt_tree_name)$(IMPLIB_EXT)
-blt_dt_tree_name =      DataTableTree$(version)$(LIB_SUFFIX)
-blt_dt_tree_so =	$(blt_dt_tree_name)$(SO_EXT)
-
-blt_dt_vec_implib =	$(IMPLIB_PREFIX)$(blt_dt_vec_name)$(IMPLIB_EXT)
-blt_dt_vec_name =       DataTableVector$(version)$(LIB_SUFFIX)
-blt_dt_vec_so =		$(blt_dt_vec_name)$(SO_EXT)
-
-blt_dt_xml_implib =	$(IMPLIB_PREFIX)$(blt_dt_xml_name)$(IMPLIB_EXT)
-blt_dt_xml_name =       DataTableXml$(version)$(LIB_SUFFIX)
-blt_dt_xml_so =		$(blt_dt_xml_name)$(SO_EXT)
-
-blt_pict_bmp_implib =	$(IMPLIB_PREFIX)$(blt_pict_bmp_name)$(IMPLIB_EXT)
-blt_pict_bmp_name =     PictureBmp$(version)$(LIB_SUFFIX)
-blt_pict_bmp_so =	$(blt_pict_bmp_name)$(SO_EXT)
-
-blt_pict_gif_implib =	$(IMPLIB_PREFIX)$(blt_pict_gif_name)$(IMPLIB_EXT)
-blt_pict_gif_name =     PictureGif$(version)$(LIB_SUFFIX)
-blt_pict_gif_so =	$(blt_pict_gif_name)$(SO_EXT)
-
-blt_pict_jpg_implib =	$(IMPLIB_PREFIX)$(blt_pict_jpg_name)$(IMPLIB_EXT)
-blt_pict_jpg_name =     PictureJpg$(version)$(LIB_SUFFIX)
-blt_pict_jpg_so =	$(blt_pict_jpg_name)$(SO_EXT)
-
-blt_pict_pbm_implib =	$(IMPLIB_PREFIX)$(blt_pict_pbm_name)$(IMPLIB_EXT)
-blt_pict_pbm_name =     PicturePbm$(version)$(LIB_SUFFIX)
-blt_pict_pbm_so =	$(blt_pict_pbm_name)$(SO_EXT)
-
-blt_pict_photo_implib = $(IMPLIB_PREFIX)$(blt_pict_photo_name)$(IMPLIB_EXT)
-blt_pict_photo_name =   PicturePhoto$(version)$(LIB_SUFFIX)
-blt_pict_photo_so =     $(blt_pict_photo_name)$(SO_EXT)
-
-blt_pict_png_implib =	$(IMPLIB_PREFIX)$(blt_pict_png_name)$(IMPLIB_EXT)
-blt_pict_png_name =     PicturePng$(version)$(LIB_SUFFIX)
-blt_pict_png_so =	$(blt_pict_png_name)$(SO_EXT)
-
-blt_pict_ps_implib =	$(IMPLIB_PREFIX)$(blt_pict_ps_name)$(IMPLIB_EXT)
-blt_pict_ps_name =      PicturePs$(version)$(LIB_SUFFIX)
-blt_pict_ps_so =	$(blt_pict_ps_name)$(SO_EXT)
-
-blt_pict_tif_implib =	$(IMPLIB_PREFIX)$(blt_pict_tif_name)$(IMPLIB_EXT)
-blt_pict_tif_name =     PictureTif$(version)$(LIB_SUFFIX)
-blt_pict_tif_so =	$(blt_pict_tif_name)$(SO_EXT)
-
-blt_pict_xbm_implib =	$(IMPLIB_PREFIX)$(blt_pict_xbm_name)$(IMPLIB_EXT)
-blt_pict_xbm_name =     PictureXbm$(version)$(LIB_SUFFIX)
-blt_pict_xbm_so =	$(blt_pict_xbm_name)$(SO_EXT)
-
-blt_pict_xpm_implib =	$(IMPLIB_PREFIX)$(blt_pict_xpm_name)$(IMPLIB_EXT)
-blt_pict_xpm_name =     PictureXpm$(version)$(LIB_SUFFIX)
-blt_pict_xpm_so =	$(blt_pict_xpm_name)$(SO_EXT)
-
-blt_tree_xml_implib =	$(IMPLIB_PREFIX)$(blt_tree_xml_name)$(IMPLIB_EXT)
-blt_tree_xml_name =	TreeXml$(version)$(LIB_SUFFIX)
-blt_tree_xml_so =	$(blt_tree_xml_name)$(SO_EXT)
-
-blt_core_pkgs_so =	$(blt_dt_csv_so) \
-			$(blt_dt_tree_so) \
-			$(blt_dt_vec_so) 
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-ifneq ("$(MYSQL_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_mysql_so) 
-endif
-
-blt_x_pkgs_so =		$(blt_pict_gif_so) \
-			$(blt_pict_xbm_so) \
-			$(blt_pict_bmp_so) \
-			$(blt_pict_pbm_so) \
-			$(blt_pict_ps_so) \
-			$(blt_pict_photo_so)
-ifneq ("$(JPG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_jpg_so) 
-endif
-ifneq ("$(PNG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_png_so) 
-endif
-ifneq ("$(XPM_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_xpm_so) 
-endif
-ifneq ("$(XPM_TIF_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_tif_so) 
-endif
-
-ifneq ("$(TCL_STUBS_SPEC)", "")
-  tcl_lib_spec=$(TCL_STUBS_SPEC)
-else
-  tcl_lib_spec=$(TCL_LIB_SPEC)
-endif
-
-ifneq ("$(TK_STUBS_SPEC)", "")
-  tk_lib_spec=$(TK_STUBS_SPEC)
-else
-  tk_lib_spec=$(TK_LIB_SPEC)
-endif
-
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS =		bltTed.o
-V3_OBJS =		bltTri.o bltGrMt.o 
-
-TK_OBJS =		tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =		bltGrAxis.o \
-			bltGrBar.o \
-			bltGrElem.o \
-			bltGrHairs.o \
-			bltGrLegd.o \
-			bltGrLine.o \
-			bltGrMarker.o \
-			bltGrMisc.o \
-			bltGrPen.o \
-			bltGrPs.o \
-			bltGraph.o 
-
-TREEVIEW_OBJS =		bltTreeView.o \
-			bltTvCmd.o \
-			bltTvCol.o \
-			bltTvEdit.o \
-			bltTvStyle.o 
-
-PICTURE_OBJS =		bltPicture.o \
-			bltPictCmd.o \
-			bltPictDraw.o \
-			bltPictMmx.o 
-
-PICTURE_PKG_OBJS =	bltPictBmp.o \
-			bltPictGif.o \
-			bltPictJpg.o \
-			bltPictPbm.o \
-			bltPictPhoto.o \
-			bltPictPng.o \
-			bltPictPs.o \
-			bltPictTif.o \
-			bltPictXbm.o \
-			bltPictXpm.o 
-
-TREE_OBJS =		bltTree.o \
-			bltTreeCmd.o \
-
-TREE_PKG_OBJS =		bltTreeXml.o 
-
-DATATABLE_OBJS =	bltDataTable.o \
-			bltDtCmd.o \
-
-DATATABLE_PKG_OBJS =	bltDtCsv.o \
-			bltDtMysql.o \
-			bltDtTree.o \
-			bltDtVec.o \
-			bltDtXml.o 
-
-BLT_CORE_SO_OBJS =	bltAlloc.o \
-			bltArrayObj.o \
-			bltBase64.o \
-			bltBgexec.o \
-			bltChain.o \
-			bltCrc32.o \
-			bltCsv.o \
-			$(DATATABLE_OBJS) \
-			bltDebug.o \
-			bltHash.o \
-			bltInit.o \
-			bltList.o \
-			bltNsUtil.o \
-			bltParse.o \
-			bltPool.o \
-			bltDBuffer.o \
-			bltSpline.o \
-			bltSwitch.o \
-			$(TREE_OBJS) \
-			bltUtil.o \
-			bltVar.o \
-			bltVecCmd.o \
-			bltVecMath.o \
-			bltVector.o \
-			bltWatch.o \
-			bltWinDde.o \
-			bltWinPipe.o \
-			bltWinUtil.o \
-			bltCoreInit.o \
-			pure_api.o 
-
-BLT_CORE_A_OBJS =	$(BLT_CORE_SO_OBJS) \
-			$(TREE_PKG_OBJS) \
-			$(DATATABLE_PKG_OBJS) 
-
-BLT_X_SO_OBJS =		$(GRAPH_OBJS) \
-			$(PICTURE_OBJS) \
-			$(TREEVIEW_OBJS) \
-			bltBeep.o \
-			bltBgStyle.o \
-			bltBind.o \
-			bltBitmap.o \
-			bltBusy.o \
-			bltCanvEps.o \
-			bltComboBtn.o \
-			bltComboEntry.o \
-			bltComboMenu.o \
-			bltComboTree.o \
-			bltConfig.o \
-			bltContainer.o \
-			bltCutbuffer.o \
-			bltDragdrop.o \
-			bltHtext.o \
-			bltImage.o \
-			bltOldConfig.o \
-			bltPs.o \
-			bltTable.o \
-			bltTabnotebook.o \
-			bltTabset.o \
-			bltText.o \
-			bltTile.o \
-			bltWinBitmap.o \
-			bltWinDraw.o \
-			bltWinFont.o \
-			bltWinPainter.o \
-			bltWinPrnt.o \
-			bltWinWindow.o \
-			bltWindow.o \
-			bltWinop.o  \
-			bltExtInit.o \
-			$(TK_OBJS) $(N_OBJS) 
-
-
-BLT_X_A_OBJS =		$(BLT_X_SO_OBJS) \
-			$(PICTURE_PKG_OBJS) 
-
-
-BLT_SO_OBJS =		$(BLT_CORE_SO_OBJS) \
-			$(BLT_X_SO_OBJS) 
-
-BLT_A_OBJS =		$(BLT_CORE_A_OBJS) \
-			$(BLT_X_A_OBJS) 
-
-# GNU Make-specific macro
-SRCS =			$(patsubst %.o,$(srcdir)/%.c,$(BLT_A_OBJS)) 
-
-bltwish =		bltwish$(version).exe
-bltsh =			bltsh$(version).exe
-
-# Public headers to be installed
-headers =		$(srcdir)/blt.h \
-			$(srcdir)/bltBind.h \
-			$(srcdir)/bltChain.h \
-			bltHash.h \
-			$(srcdir)/bltList.h \
-			$(srcdir)/bltPool.h \
-			$(srcdir)/bltTree.h \
-			$(srcdir)/bltVector.h 
-
-CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-MAIN_CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-INSTALL =		@INSTALL@
-INSTALL_DATA =		@INSTALL_DATA@
-INSTALL_ROOT =  
-RANLIB =		@RANLIB@
-SHELL =			/bin/sh
-AR =			ar rc
-RM =			rm -f
-LINT =			splint
-LINTFLAGS =		#-axhbns
-XREF =			cxref
-XREFFLAGS =		-dltR
-LN_S =			@LN_S@
-VPATH =			$(srcdir)
-
-all: build_libs build_demos
-
-build_demos: $(bltsh) $(bltwish) 
-build_libs: build_ at BLT_TARGET@
-
-build_shared: $(blt_core_so) $(blt_x_so) build_core_pkgs build_x_pkgs
-build_static: $(blt_core_a) $(blt_x_a)
-build_core_pkgs: $(blt_core_pkgs_so) 
-build_x_pkgs:  $(blt_x_pkgs_so)
-
-$(bltwish): $(blt_core_a) $(blt_x_a) $(srcdir)/bltWinMain.c $(srcdir)/tkConsole.o
-	$(RM) $(bltwish)
-	$(CC) $(MAIN_CC_OPTS) $(LDFLAGS) -o $(bltwish) \
-		-DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltWinMain.c $(srcdir)/tkConsole.c \
-		$(blt_x_a) $(blt_core_a) \
-		$(TK_LIB_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_X_A_LIBS) $(BLT_CORE_A_LIBS) \
-		$(EXTRA_X_LIBS) -mwindows 
-
-$(bltsh): $(blt_core_a) $(srcdir)/bltWinMain.c
-	$(RM) $(bltsh)
-	$(CC) $(CC_OPTS) $(LDFLAGS) -o $(bltsh) \
-		-DTCL_ONLY -DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltWinMain.c \
-		$(blt_core_a) \
-		$(TCL_STUBS_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_CORE_A_LIBS) \
-		$(EXTRA_CORE_LIBS) -mconsole
-
-$(blt_core_a):  $(BLT_CORE_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_CORE_A_OBJS) 
-	$(RANLIB) $@
-
-$(blt_x_a):  $(BLT_X_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_X_A_OBJS)
-	$(RANLIB) $@
-
-$(blt_core_so):  $(BLT_CORE_SO_OBJS)
-	$(RM) $@
-	$(CC) -shared -Wl,--dll -o $(blt_core_so) \
-	    -Wl,--out-implib=$(blt_core_implib) \
-	    $(BLT_CORE_SO_OBJS) $(BLT_CORE_SO_LIBS) $(tcl_lib_spec) \
-	    -mconsole
-
-$(blt_x_so):  $(BLT_X_SO_OBJS) bltExtInit.o $(blt_core_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_x_so) \
-	    -Wl,--out-implib=$(blt_x_implib) \
-	    $(BLT_X_SO_OBJS) $(blt_core_so) \
-	    $(BLT_X_SO_LIBS) $(BLT_CORE_SO_LIBS) \
-	    $(tcl_lib_spec) $(tk_lib_spec) \
-	    -mwindows -lwinspool
-
-$(blt_dt_mysql_so): bltDtMysql.o $(blt_core_implib)
-	$(RM) $@
-	$(CC) -shared -o $(blt_dt_mysql_so) \
-	    -Wl,--out-implib=$(blt_dt_mysql_implib) bltDtMysql.o \
-	    $(blt_core_so) $(tcl_lib_spec) $(MYSQL_LIB_SPEC)
-
-$(blt_dt_xml_so): bltDtXml.o $(blt_core_implib)
-	$(RM) $@
-	$(CC) -shared -o $(blt_dt_xml_so) \
-	    -Wl,--out-implib=$(blt_dt_xml_implib) bltDtXml.o \
-	    $(blt_core_so) $(tcl_lib_spec) $(EXPAT_LIB_SPEC)
-
-$(blt_dt_csv_so): bltDtCsv.o $(blt_core_implib)
-	$(RM) $@
-	$(CC) -shared -Wl,--dll -o $(blt_dt_csv_so) \
-	    -Wl,--out-implib=$(blt_dt_csv_implib) bltDtCsv.o \
-	    $(blt_core_so) $(tcl_lib_spec) 
-
-$(blt_dt_vec_so): bltDtVec.o $(blt_core_implib)
-	$(RM) $@
-	$(CC) -shared -o $(blt_dt_vec_so) \
-	    -Wl,--out-implib=$(blt_dt_vec_implib) bltDtVec.o \
-	    $(blt_core_so) $(tcl_lib_spec) 
-
-$(blt_dt_tree_so): bltDtTree.o $(blt_core_implib)
-	$(RM) $@
-	$(CC) -shared -o $(blt_dt_tree_so) \
-	    -Wl,--out-implib=$(blt_dt_tree_implib) bltDtTree.o \
-	    $(blt_core_so) $(tcl_lib_spec) 
-
-$(blt_tree_xml_so): bltTreeXml.o $(blt_core_implib) 
-	$(RM) $@
-	$(CC) -shared -o $(blt_tree_xml_so) \
-	    -Wl,--out-implib=$(blt_tree_xml_implib) bltTreeXml.o \
-	    $(blt_core_so) $(tcl_lib_spec) $(EXPAT_LIB_SPEC)
-
-$(blt_pict_bmp_so): bltPictBmp.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_bmp_so) \
-	    -Wl,--out-implib=$(blt_pict_bmp_implib) bltPictBmp.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec)
-
-$(blt_pict_gif_so): bltPictGif.o $(blt_core_so)  $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_gif_so) \
-	    -Wl,--out-implib=$(blt_pict_gif_implib) bltPictGif.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec)
-
-
-$(blt_pict_jpg_so): bltPictJpg.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_jpg_so) \
-	    -Wl,--out-implib=$(blt_pict_jpg_implib) bltPictJpg.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) $(JPG_LIB_SPEC)
-
-$(blt_pict_png_so): bltPictPng.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_png_so) \
-	    -Wl,--out-implib=$(blt_pict_png_implib) bltPictPng.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) $(PNG_LIB_SPEC)
-
-
-$(blt_pict_pbm_so): bltPictPbm.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_pbm_so) \
-	    -Wl,--out-implib=$(blt_pict_pbm_implib) bltPictPbm.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) 
-
-$(blt_pict_tif_so): bltPictTif.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_tif_so) \
-	    -Wl,--out-implib=$(blt_pict_tif_implib) bltPictTif.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) $(TIF_LIB_SPEC)
-
-$(blt_pict_xbm_so): bltPictXbm.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_xbm_so) \
-	    -Wl,--out-implib=$(blt_pict_xbm_implib) bltPictXbm.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) 
-
-$(blt_pict_xpm_so): bltPictXpm.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_xpm_so) \
-	    -Wl,--out-implib=$(blt_pict_xpm_implib) bltPictXpm.o  \
-	    $(blt_core_so) $(blt_x_so) $(tcl_lib_spec) $(XPM_LIB_SPEC)
-
-$(blt_pict_ps_so): bltPictPs.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_ps_so) \
-	    -Wl,--out-implib=$(blt_pict_ps_implib) bltPictPs.o  \
-	    $(blt_core_so) $(blt_x_so) $(tk_lib_spec) $(tcl_lib_spec) 
-
-$(blt_pict_photo_so): bltPictPhoto.o $(blt_core_so) $(blt_x_so)
-	$(RM) $@
-	$(CC) -shared -o $(blt_pict_photo_so) \
-	    -Wl,--out-implib=$(blt_pict_photo_implib) bltPictPhoto.o  \
-	    $(blt_core_so) $(blt_x_so) $(tk_lib_spec) $(tcl_lib_spec) 
-
-
-install: mkdirs install-demos install-libs install-headers 
-
-install-libs: install- at BLT_TARGET@ 
-
-install-demos: $(bltwish) $(bltsh)
-	$(INSTALL) -m 0755 $(bltwish) $(INSTALL_ROOT)$(bindir)
-	$(INSTALL) -m 0755 $(bltsh) $(INSTALL_ROOT)$(bindir)
-
-install-shared: $(blt_core_so) $(blt_x_so) install-pkgs install-static 
-	$(INSTALL) -m 0755 $(blt_core_so) $(INSTALL_ROOT)$(bindir)
-	$(INSTALL) -m 0755 $(blt_x_so) $(INSTALL_ROOT)$(bindir)
-
-install-static: $(blt_core_a) $(blt_x_a) 
-	$(INSTALL_DATA) $(blt_core_a) $(INSTALL_ROOT)$(libdir)
-	$(INSTALL_DATA) $(blt_x_a) $(INSTALL_ROOT)$(libdir)
-
-install-implib: $(blt_core_implib) $(blt_x_implib)
-	$(INSTALL_DATA) $(blt_core_implib) $(INSTALL_ROOT)$(libdir)
-	$(INSTALL_DATA) $(blt_x_implib) $(INSTALL_ROOT)$(libdir)
-
-install-pkgs: $(blt_core_pkgs_so) $(blt_x_pkgs_so)
-	for i in $(blt_core_pkgs_so) $(blt_x_pkgs_so) ; do \
-	  echo $(RM) $(INSTALL_ROOT)$(libdir)/$$i ; \
-	  $(RM) $(INSTALL_ROOT)$(libdir)/$$i ; \
-	  echo $(INSTALL) -m 0755 $$i $(INSTALL_ROOT)$(pkgdir) ; \
-	  $(INSTALL) -m 0755 $$i $(INSTALL_ROOT)$(pkgdir) ; \
-        done
-
-install-headers:
-	@for i in $(headers) ; do \
-	    echo "installing $$i..." ; \
-	    $(INSTALL_DATA) -m 0444 $$i $(INSTALL_ROOT)$(incdir) ; \
-	done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(INSTALL_ROOT)$$i ; then \
-            : ; \
-          else \
-            echo " mkdir $(INSTALL_ROOT)$$i" ; \
-            $(INSTALL) -d $(INSTALL_ROOT)$$i ; \
-          fi ; \
-        done
-
-
-lint:
-	$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-xref:
-	$(XREF) $(XREFFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-clean: clean-objs clean-libs clean-demos 
-clean-libs: clean- at BLT_TARGET@ 
-clean-objs:
-	$(RM) $(BLT_A_OBJS) 
-clean-demos:
-	$(RM) $(bltsh)* $(bltwish)* *pure* .pure*
-clean-static: 
-	$(RM) $(blt_core_a) $(blt_x_a) 
-clean-implib: 
-	$(RM) $(blt_core_implib) $(blt_x_implib)
-clean-pkgs:
-	$(RM) $(blt_core_pkgs_so) $(blt_x_pkgs_so) 
-clean-shared: clean-pkgs clean-static clean-implib
-	$(RM) $(blt_core_so) $(blt_x_so) 
-
-distclean:	clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*  Makefile
-	$(RM) config.h bltHash.h Makefile TAGS
-
-bltDtMysql.o: $(srcdir)/bltDtMysql.c
-	$(CC) -c $(CC_OPTS) $(MYSQL_INC_SPEC) $?
-
-bltDtXml.o: $(srcdir)/bltDtXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltTree.o: $(srcdir)/bltTree.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltTreeXml.o: $(srcdir)/bltTreeXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltPictDraw.o: $(srcdir)/bltPictDraw.c $(srcdir)/bltPaintDraw.c
-	$(CC) -c $(CC_OPTS) $(FT2_INC_SPEC) $<
-bltPictJpg.o: $(srcdir)/bltPictJpg.c       
-	$(CC) -c $(CC_OPTS) $(JPG_INC_SPEC) $?
-bltPictTif.o: $(srcdir)/bltPictTif.c       
-	$(CC) -c $(CC_OPTS) $(TIF_INC_SPEC) $?
-bltPictPng.o: $(srcdir)/bltPictPng.c       
-	$(CC) -c $(CC_OPTS) $(PNG_INC_SPEC) $?
-bltPictXpm.o: $(srcdir)/bltPictXpm.c       
-	$(CC) -c $(CC_OPTS) $(XPM_INC_SPEC) $?
-bltCoreInit.o: $(srcdir)/bltCoreInit.c       
-	$(CC) -c $(CC_OPTS) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		$(srcdir)/bltCoreInit.c
-.c.o:
-	$(CC) -c $(CC_OPTS) $<
-
diff --git a/blt3.0/src/Makefile-macosx.in b/blt3.0/src/Makefile-macosx.in
deleted file mode 100644
index ce93bdc..0000000
--- a/blt3.0/src/Makefile-macosx.in
+++ /dev/null
@@ -1,594 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for static version of BLT library
-# ------------------------------------------------------------------------
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-BLT_LIBRARY =		@BLT_LIBRARY@
-CC =			@CC@
-CFLAGS =		@CFLAGS@ 
-DEFINES =		@DEFINES@
-EXTRA_CFLAGS =		@GCCFLAGS@ $(SO_CFLAGS) 
-LDFLAGS =		@LDFLAGS@ @LD_RUN_PATH@
-LIB_PREFIX =		@LIB_PREFIX@
-TCLLIBPATH   =		@TCL_LIB_DIR@/tcl at TCL_VERSION@
-TCL_DBG =		@TCL_DBGX@
-
-SO_CFLAGS =		@BLT_SO_CFLAGS@
-LIB_SUFFIX =		@BLT_LIB_SUFFIX@
-SO_EXT =		@BLT_SO_EXT@
-SO_PREFIX =		@BLT_SO_PREFIX@
-SO_LD =			@BLT_SO_LD@
-SO_LDFLAGS =		@BLT_SO_LDFLAGS@ @LD_RUN_PATH@
-
-EXPAT_INC_SPEC =	@EXPAT_INC_SPEC@
-EXPAT_LIB_SPEC =	@EXPAT_LIB_SPEC@
-FT2_INC_SPEC =		@FT2_INC_SPEC@
-FT2_LIB_SPEC =		@FT2_LIB_SPEC@
-JPG_INC_SPEC =		@JPG_INC_SPEC@
-JPG_LIB_SPEC =		@JPG_LIB_SPEC@
-MYSQL_INC_SPEC =	@MYSQL_INC_SPEC@
-MYSQL_LIB_SPEC =	@MYSQL_LIB_SPEC@
-PNG_INC_SPEC =		@PNG_INC_SPEC@
-PNG_LIB_SPEC =		@PNG_LIB_SPEC@ $(Z_LIB_SPEC)
-TCL_INC_SPEC =		@TCL_INC_SPEC@
-TCL_LIB_SPEC =		@TCL_LIB_SPEC@
-TCL_STUBS_SPEC =	@TCL_STUBS_SPEC@
-TIF_INC_SPEC =		@TIF_INC_SPEC@
-TIF_LIB_SPEC =		@TIF_LIB_SPEC@
-TK_INC_SPEC =		@TK_INC_SPEC@
-TK_LIB_SPEC =		@TK_LIB_SPEC@
-TK_STUBS_SPEC =		@TK_STUBS_SPEC@
-X11_INC_SPEC =		@X11_INC_SPEC@
-X11_LIB_SPEC =		@X11_LIB_SPEC@
-XFT_INC_SPEC =		@XFT_INC_SPEC@
-XFT_LIB_SPEC =		@XFT_LIB_SPEC@
-XPM_INC_SPEC =		@XPM_INC_SPEC@
-XPM_LIB_SPEC =		@XPM_LIB_SPEC@
-XAU_LIB_SPEC =		@XAU_LIB_SPEC@
-XRANDR_LIB_SPEC =	@XRANDR_LIB_SPEC@
-XRENDER_LIB_SPEC =	@XRENDER_LIB_SPEC@
-FTCFG_LIB_SPEC =	@FTCFG_LIB_SPEC@
-XDMCP_LIB_SPEC =	@XDMCP_LIB_SPEC@
-Z_LIB_SPEC =		@Z_LIB_SPEC@
-
-version =		@BLT_MAJOR_VERSION@@BLT_MINOR_VERSION@
-
-# ------------------------------------------------------------------------
-# 	Source and targer installation directories 
-# ------------------------------------------------------------------------
-
-bindir =		$(exec_prefix)/bin
-datadir =		@datadir@
-datarootdir =		@datarootdir@
-exec_prefix =		@exec_prefix@
-incdir =		$(prefix)/include
-includedir =		@includedir@
-libdir =		@libdir@
-prefix =		@prefix@
-scriptdir =		$(exec_prefix)/lib
-srcdir =		@srcdir@
-pkgdir =		@BLT_LIBRARY@
-
-instdirs =		$(prefix) \
-			$(exec_prefix) \
-			$(bindir) \
-			$(libdir) \
-			$(incdir) \
-			$(pkgdir) \
-			$(scriptdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-INCLUDES =		-I. -I$(srcdir) \
-			@INCLUDES@
-
-# ------------------------------------------------------------------------
-#       Libraries directives for Tcl, Tk, X11, and BLT
-# ------------------------------------------------------------------------
-
-EXTRA_CORE_LIBS =	@LIBS@ @EXTRA_LIBS@ 
-
-EXTRA_X_LIBS =		@TK_XLIBSW@ \
-	     		$(X11_LIB_SPEC) \
-			$(XAU_LIB_SPEC) \
-			$(XDMCP_LIB_SPEC) \
-			$(XRANDR_LIB_SPEC) \
-			$(XRENDER_LIB_SPEC) \
-			$(EXTRA_CORE_LIBS) 
-
-BLT_X_SO_LIBS =		$(XFT_LIB_SPEC) \
-			$(FTCFG_LIB_SPEC) \
-			$(FT2_LIB_SPEC) \
-
-BLT_X_A_LIBS =		$(BLT_X_SO_LIBS) \
-			$(JPG_LIB_SPEC) \
-			$(PNG_LIB_SPEC) \
-			$(TIF_LIB_SPEC) \
-			$(XPM_LIB_SPEC) 
-
-BLT_CORE_SO_LIBS =	
-
-BLT_CORE_A_LIBS =	$(BLT_CORE_SO_LIBS) \
-			$(MYSQL_LIB_SPEC) \
-			$(EXPAT_LIB_SPEC) 
-
-blt_core_name =		BLTCore$(version)$(LIB_SUFFIX)
-blt_x_name =		BLTX$(version)$(LIB_SUFFIX)
-
-blt_core_so =		lib$(blt_core_name)$(SO_EXT)
-blt_core_a =		lib$(blt_core_name).a
-
-blt_x_so =		lib$(blt_x_name)$(SO_EXT)
-blt_x_a =		lib$(blt_x_name).a
-
-blt_dt_csv_name =       DataTableCsv$(version)$(LIB_SUFFIX)
-blt_dt_mysql_name =     DataTableMysql$(version)$(LIB_SUFFIX)
-blt_dt_tree_name =      DataTableTree$(version)$(LIB_SUFFIX)
-blt_dt_vec_name =       DataTableVector$(version)$(LIB_SUFFIX)
-blt_dt_xml_name =       DataTableXml$(version)$(LIB_SUFFIX)
-
-blt_dt_csv_so =		$(blt_dt_csv_name)$(SO_EXT)
-blt_dt_mysql_so =       $(blt_dt_mysql_name)$(SO_EXT)
-blt_dt_tree_so =	$(blt_dt_tree_name)$(SO_EXT)
-blt_dt_vec_so =		$(blt_dt_vec_name)$(SO_EXT)
-blt_dt_xml_so =		$(blt_dt_xml_name)$(SO_EXT)
-
-blt_pict_bmp_name =     PictureBmp$(version)$(LIB_SUFFIX)
-blt_pict_gif_name =     PictureGif$(version)$(LIB_SUFFIX)
-blt_pict_jpg_name =     PictureJpg$(version)$(LIB_SUFFIX)
-blt_pict_pbm_name =     PicturePbm$(version)$(LIB_SUFFIX)
-blt_pict_photo_name =   PicturePhoto$(version)$(LIB_SUFFIX)
-blt_pict_png_name =     PicturePng$(version)$(LIB_SUFFIX)
-blt_pict_ps_name =      PicturePs$(version)$(LIB_SUFFIX)
-blt_pict_tif_name =     PictureTif$(version)$(LIB_SUFFIX)
-blt_pict_xbm_name =     PictureXbm$(version)$(LIB_SUFFIX)
-blt_pict_xpm_name =     PictureXpm$(version)$(LIB_SUFFIX)
-
-blt_pict_bmp_so =	$(blt_pict_bmp_name)$(SO_EXT)
-blt_pict_gif_so =	$(blt_pict_gif_name)$(SO_EXT)
-blt_pict_jpg_so =	$(blt_pict_jpg_name)$(SO_EXT)
-blt_pict_pbm_so =	$(blt_pict_pbm_name)$(SO_EXT)
-blt_pict_photo_so =     $(blt_pict_photo_name)$(SO_EXT)
-blt_pict_png_so =	$(blt_pict_png_name)$(SO_EXT)
-blt_pict_ps_so =	$(blt_pict_ps_name)$(SO_EXT)
-blt_pict_tif_so =	$(blt_pict_tif_name)$(SO_EXT)
-blt_pict_xbm_so =	$(blt_pict_xbm_name)$(SO_EXT)
-blt_pict_xpm_so =	$(blt_pict_xpm_name)$(SO_EXT)
-
-blt_tree_xml_name =	TreeXml$(version)$(LIB_SUFFIX)
-
-blt_tree_xml_so =	$(blt_tree_xml_name)$(SO_EXT)
-
-blt_core_pkgs_so =	$(blt_dt_csv_so) \
-			$(blt_dt_tree_so) \
-			$(blt_dt_vec_so) 
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-ifneq ("$(MYSQL_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_mysql_so) 
-endif
-
-blt_x_pkgs_so =		$(blt_pict_gif_so) \
-			$(blt_pict_xbm_so) \
-			$(blt_pict_bmp_so) \
-			$(blt_pict_pbm_so) \
-			$(blt_pict_ps_so) \
-			$(blt_pict_photo_so)
-ifneq ("$(JPG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_jpg_so) 
-endif
-ifneq ("$(PNG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_png_so) 
-endif
-ifneq ("$(XPM_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_xpm_so) 
-endif
-ifneq ("$(XPM_TIF_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_tif_so) 
-endif
-
-ifneq ("$(TCL_STUBS_SPEC)", "")
-  tcl_lib_spec=$(TCL_STUBS_SPEC)
-else
-  tcl_lib_spec=$(TCL_LIB_SPEC)
-endif
-
-ifneq ("$(TK_STUBS_SPEC)", "")
-  tk_lib_spec=$(TK_STUBS_SPEC)
-else
-  tk_lib_spec=$(TK_LIB_SPEC)
-endif
-
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS =		bltTed.o
-V3_OBJS =		bltTri.o bltGrMt.o 
-
-TK_OBJS =		tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =		bltGrAxis.o \
-			bltGrBar.o \
-			bltGrElem.o \
-			bltGrHairs.o \
-			bltGrLegd.o \
-			bltGrLine.o \
-			bltGrMarker.o \
-			bltGrMisc.o \
-			bltGrPen.o \
-			bltGrPs.o \
-			bltGraph.o 
-
-TREEVIEW_OBJS =		bltTreeView.o \
-			bltTvCmd.o \
-			bltTvCol.o \
-			bltTvEdit.o \
-			bltTvStyle.o 
-
-PICTURE_OBJS =		bltPicture.o \
-			bltPictCmd.o \
-			bltPictDraw.o \
-			bltPictMmx.o 
-
-PICTURE_PKG_OBJS =	bltPictBmp.o \
-			bltPictGif.o \
-			bltPictJpg.o \
-			bltPictPbm.o \
-			bltPictPdf.o \
-			bltPictPhoto.o \
-			bltPictPng.o \
-			bltPictPs.o \
-			bltPictTif.o \
-			bltPictXbm.o \
-			bltPictXpm.o 
-
-TREE_OBJS =		bltTree.o \
-			bltTreeCmd.o \
-
-TREE_PKG_OBJS =		bltTreeXml.o 
-
-DATATABLE_OBJS =	bltDataTable.o \
-			bltDtCmd.o \
-
-DATATABLE_PKG_OBJS =	bltDtCsv.o \
-			bltDtMysql.o \
-			bltDtTree.o \
-			bltDtVec.o \
-			bltDtXml.o 
-
-BLT_CORE_SO_OBJS =	bltAlloc.o \
-			bltArrayObj.o \
-			bltBase64.o \
-			bltBgexec.o \
-			bltChain.o \
-			bltCrc32.o \
-			bltCsv.o \
-			$(DATATABLE_OBJS) \
-			bltDebug.o \
-			bltHash.o \
-			bltInit.o \
-			bltList.o \
-			bltNsUtil.o \
-			bltParse.o \
-			bltPool.o \
-			bltDBuffer.o \
-			bltSpline.o \
-			bltSwitch.o \
-			$(TREE_OBJS) \
-			bltUtil.o \
-			bltVar.o \
-			bltVecCmd.o \
-			bltVecMath.o \
-			bltVector.o \
-			bltWatch.o \
-			bltUnixPipe.o \
-			bltCoreInit.o 
-
-BLT_CORE_A_OBJS =	$(BLT_CORE_SO_OBJS) \
-			$(TREE_PKG_OBJS) \
-			$(DATATABLE_PKG_OBJS) 
-
-BLT_X_SO_OBJS =		$(GRAPH_OBJS) \
-			$(PICTURE_OBJS) \
-			$(TREEVIEW_OBJS) \
-			bltBeep.o \
-			bltBgStyle.o \
-			bltBind.o \
-			bltBitmap.o \
-			bltBusy.o \
-			bltCanvEps.o \
-			bltComboBtn.o \
-			bltComboEntry.o \
-			bltComboMenu.o \
-			bltComboTree.o \
-			bltConfig.o \
-			bltContainer.o \
-			bltCutbuffer.o \
-			bltDragdrop.o \
-			bltHtext.o \
-			bltImage.o \
-			bltOldConfig.o \
-			bltPaneset.o \
-			bltPs.o \
-			bltPsAfm.o \
-			bltScrollset.o \
-			bltTable.o \
-			bltTabset.o \
-			bltText.o \
-			bltTile.o \
-			bltUnixBitmap.o \
-			bltUnixDnd.o \
-			bltUnixFont.o \
-			bltUnixPainter.o \
-			bltUnixWindow.o \
-			bltWindow.o \
-			bltWinop.o  \
-			bltExtInit.o \
-			$(TK_OBJS) $(N_OBJS) 
-
-
-BLT_X_A_OBJS =		$(BLT_X_SO_OBJS) \
-			$(PICTURE_PKG_OBJS) 
-
-
-BLT_SO_OBJS =		$(BLT_CORE_SO_OBJS) \
-			$(BLT_X_SO_OBJS) 
-
-BLT_A_OBJS =		$(BLT_CORE_A_OBJS) \
-			$(BLT_X_A_OBJS) 
-
-# GNU Make-specific macro
-SRCS =			$(patsubst %.o,$(srcdir)/%.c,$(BLT_A_OBJS)) 
-
-bltwish =		bltwish$(version)
-bltsh =			bltsh$(version)
-
-# Public headers to be installed
-headers =		$(srcdir)/blt.h \
-			$(srcdir)/bltBind.h \
-			$(srcdir)/bltChain.h \
-			bltHash.h \
-			$(srcdir)/bltList.h \
-			$(srcdir)/bltPool.h \
-			$(srcdir)/bltTree.h \
-			$(srcdir)/bltVector.h 
-
-CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-MAIN_CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-INSTALL =		@INSTALL@
-INSTALL_DATA =		@INSTALL_DATA@
-RANLIB =		@RANLIB@
-SHELL =			/bin/sh
-AR =			ar rc
-RM =			rm -f
-LINT =			splint
-LINTFLAGS =		#-axhbns
-XREF =			cxref
-XREFFLAGS =		-dltR
-LN_S =			@LN_S@
-VPATH =			$(srcdir)
-
-all: build_libs build_demos
-
-build_demos: $(bltsh) $(bltwish) 
-build_libs: build_ at BLT_TARGET@
-
-build_shared: $(blt_core_so) $(blt_x_so) build_core_pkgs build_x_pkgs
-build_static: $(blt_core_a) $(blt_x_a)
-build_core_pkgs: $(blt_core_so) $(blt_core_pkgs_so) 
-build_x_pkgs:  $(blt_x_so) $(blt_x_pkgs_so)
-
-$(bltwish): $(blt_core_a) $(blt_x_a) $(srcdir)/bltUnixMain.c
-	$(RM) $(bltwish)
-	$(CC) $(MAIN_CC_OPTS) $(LDFLAGS) -o $(bltwish) \
-		-DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltUnixMain.c \
-		$(blt_x_a) $(blt_core_a) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_X_A_LIBS) $(BLT_CORE_A_LIBS) $(EXTRA_X_LIBS)
-
-$(bltsh): $(blt_core_a) $(srcdir)/bltUnixMain.c
-	$(RM) $(bltsh)
-	$(CC) $(CC_OPTS) $(LDFLAGS) -o $(bltsh) \
-		-DTCL_ONLY -DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltUnixMain.c \
-		$(blt_core_a) $(TCL_STUBS_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_CORE_A_LIBS) $(EXTRA_CORE_LIBS)
-
-$(blt_core_a):  $(BLT_CORE_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_CORE_A_OBJS) 
-	$(RANLIB) $@
-
-$(blt_x_a):  $(BLT_X_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_X_A_OBJS)
-	$(RANLIB) $@
-
-$(blt_core_so):  $(BLT_CORE_SO_OBJS)
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ $(BLT_CORE_SO_OBJS) $(BLT_CORE_SO_LIBS) \
-		$(core_lib_spec)
-
-$(blt_x_so):  $(BLT_X_SO_OBJS) 
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ $(BLT_X_SO_OBJS) $(BLT_X_SO_LIBS) \
-		$(BLT_CORE_SO_LIBS) $(tcl_lib_spec) 
-
-$(blt_dt_mysql_so): bltDtMysql.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtMysql.o $(MYSQL_LIB_SPEC)
-
-$(blt_dt_xml_so): bltDtXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtXml.o $(EXPAT_LIB_SPEC)
-
-$(blt_dt_csv_so): bltDtCsv.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtCsv.o 
-
-$(blt_dt_vec_so): bltDtVec.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtVec.o 
-
-$(blt_dt_tree_so): bltDtTree.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtTree.o 
-
-$(blt_pict_bmp_so): bltPictBmp.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictBmp.o 
-
-$(blt_pict_gif_so): bltPictGif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictGif.o 
-
-$(blt_pict_jpg_so): bltPictJpg.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictJpg.o $(JPG_LIB_SPEC)
-
-$(blt_pict_png_so): bltPictPng.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPng.o $(PNG_LIB_SPEC)
-
-$(blt_pict_pbm_so): bltPictPbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPbm.o 
-
-$(blt_pict_tif_so): bltPictTif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictTif.o $(TIF_LIB_SPEC)
-
-$(blt_pict_xbm_so): bltPictXbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictXbm.o 
-
-$(blt_pict_xpm_so): bltPictXpm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictXpm.o \
-		$(X11_LIB_SPEC) $(XPM_LIB_SPEC)
-
-$(blt_pict_pdf_so): bltPictPdf.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPdf.o 
-
-$(blt_pict_ps_so): bltPictPs.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPs.o 
-
-$(blt_pict_photo_so): bltPictPhoto.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPhoto.o 
-
-$(blt_tree_xml_so): bltTreeXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltTreeXml.o $(EXPAT_LIB_SPEC)
-
-
-install: mkdirs install-demos install-libs install-headers 
-
-install-libs: install- at BLT_TARGET@ 
-
-install-demos: $(bltwish) $(bltsh)
-	$(INSTALL) -m 0755 $(bltwish) $(DESTDIR)$(bindir)
-	$(INSTALL) -m 0755 $(bltsh) $(DESTDIR)$(bindir)
-
-install-shared: $(blt_core_so) $(blt_x_so) install-pkgs install-static 
-	$(INSTALL) -m 0755 $(blt_core_so) $(DESTDIR)$(libdir)
-	$(INSTALL) -m 0755 $(blt_x_so) $(DESTDIR)$(libdir)
-
-install-static: $(blt_core_a) $(blt_x_a) 
-	$(INSTALL_DATA) $(blt_core_a) $(DESTDIR)$(libdir)
-	$(RANLIB) $(DESTDIR)$(libdir)/$(blt_core_a)
-	$(INSTALL_DATA) $(blt_x_a) $(DESTDIR)$(libdir)
-	$(RANLIB) $(DESTDIR)$(libdir)/$(blt_x_a)
-
-install-pkgs: $(blt_core_pkgs_so) $(blt_x_pkgs_so)
-	for i in $(blt_core_pkgs_so) $(blt_x_pkgs_so) ; do \
-	  echo $(RM) $(DESTDIR)$(libdir)/$$i ; \
-	  $(RM) $(DESTDIR)$(libdir)/$$i ; \
-	  echo $(INSTALL) -m 0755 $$i $(DESTDIR)$(pkgdir) ; \
-	  $(INSTALL) -m 0755 $$i $(DESTDIR)$(pkgdir) ; \
-        done
-
-install-headers:
-	@for i in $(headers) ; do \
-	    echo "installing $$i..." ; \
-	    $(INSTALL_DATA) -m 0444 $$i $(DESTDIR)$(incdir) ; \
-	done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(DESTDIR)$$i ; then \
-            : ; \
-          else \
-            echo " mkdir $(DESTDIR)$$i" ; \
-            $(INSTALL) -d $(DESTDIR)$$i ; \
-          fi ; \
-        done
-
-
-lint:
-	$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-xref:
-	$(XREF) $(XREFFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-clean: clean-objs clean-libs clean-demos 
-clean-libs: clean- at BLT_TARGET@
-clean-objs:
-	$(RM) $(BLT_A_OBJS) 
-clean-demos:
-	$(RM) $(bltsh)* $(bltwish)* *pure* .pure*
-clean-static: 
-	$(RM) $(blt_core_a) $(blt_x_a) 
-clean-pkgs:
-	$(RM) $(blt_core_pkgs_so) $(blt_x_pkgs_so) 
-clean-shared: clean-pkgs clean-static
-	$(RM) $(blt_core_so) $(blt_x_so) 
-
-distclean:	clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*  Makefile
-	$(RM) config.h bltHash.h Makefile TAGS
-
-bltDtMysql.o: $(srcdir)/bltDtMysql.c
-	$(CC) -c $(CC_OPTS) $(MYSQL_INC_SPEC) $?
-bltDtXml.o: $(srcdir)/bltDtXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltTree.o: $(srcdir)/bltTree.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-bltTreeXml.o: $(srcdir)/bltTreeXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltUnixFont.o: $(srcdir)/bltUnixFont.c
-	$(CC) -c $(CC_OPTS) $(FT2_INC_SPEC) $?
-
-bltPictDraw.o: $(srcdir)/bltPictDraw.c $(srcdir)/bltPaintDraw.c
-	$(CC) -c $(CC_OPTS) $(FT2_INC_SPEC) $<
-bltPictJpg.o: $(srcdir)/bltPictJpg.c       
-	$(CC) -c $(CC_OPTS) $(JPG_INC_SPEC) $?
-bltPictTif.o: $(srcdir)/bltPictTif.c       
-	$(CC) -c $(CC_OPTS) $(TIF_INC_SPEC) $?
-bltPictPng.o: $(srcdir)/bltPictPng.c       
-	$(CC) -c $(CC_OPTS) $(PNG_INC_SPEC) $?
-bltPictXpm.o: $(srcdir)/bltPictXpm.c       
-	$(CC) -c $(CC_OPTS) $(XPM_INC_SPEC) $?
-
-bltCoreInit.o: $(srcdir)/bltCoreInit.c       
-	$(CC) -c $(CC_OPTS) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		$(srcdir)/bltCoreInit.c
-.c.o:
-	$(CC) -c $(CC_OPTS) $<
-
diff --git a/blt3.0/src/Makefile.bc b/blt3.0/src/Makefile.bc
deleted file mode 100644
index 17576b8..0000000
--- a/blt3.0/src/Makefile.bc
+++ /dev/null
@@ -1,341 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for BLT library using BCC55.
-# ------------------------------------------------------------------------
-
-.SUFFIXES: .obj .c
-
-!include     ..\win\makedefs
-
-prefix =	C:\Program Files\Tcl
-exec_prefix =	$(prefix)
-includedir =	$(prefix)\include
-bindir =	$(prefix)\bin
-libdir =	$(prefix)\lib
-scriptdir =	$(libdir)\blt$(BLT_VERSION)
-BLT_LIBRARY =	$(libdir)\blt$(BLT_VERSION)
-TCLLIBPATH =	$(libdir)\tcl$(v1)
-
-SHLIB_SUFFIX =	.dll
-
-SHELL =		bash.exe
-RM =		-del
-
-TOOLS32       =	c:\Borland\BCC55
-
-AR            =	$(TOOLS32)\bin\implib.exe
-LD            =	$(TOOLS32)\bin\ilink32.exe
-CC            =	$(TOOLS32)\bin\bcc32.exe
-rc32          =	$(TOOLS32)\bin\rc.exe
-
-!if ($(WITH_JPEG) == 0)
-EXTRA_DEFINES = 
-!endif
-!if ($(WITH_JPEG) == 1)
-EXTRA_DEFINES = -DHAVE_JPEGLIB_H=1
-JPEGDIR       =	$(srcdir)\..\..\jpeg-6b
-JPEGLIB =	$(JPEGDIR)\libjpeg.lib
-JPEGINC	      = $(JPEGDIR)
-!endif
-!if ($(WITH_JPEG) == 2)
-EXTRA_DEFINES = -DHAVE_IJL_H=1 
-JPEGDIR       =	c:\Program\ Files\Intel\IJL
-JPEGLIB	      =	$(JPEGDIR)\lib\ijl15l.lib
-JPEGINC	      = $(JPEGDIR)\Include
-!endif
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-DEFINES       =	-D__STDC__ -DWIN32 -DCONSOLE -D_MT -DNO_STRICT -D_NO_VCL \
-		$(DEBUG_DEFINES) $(SHLIB_DEFINES) $(EXTRA_DEFINES) 
-
-!if ($(SHARED) == 1)
-SHLIB_DEFINES =	-D_DLL  
-SHLIB_TARGET  =	build-dll
-LIBS          =	$(COMMON_LIBS) $(EXTRA_LIBS)
-!else
-SHLIB_CFLAGS  = 
-SHLIB_DEFINES =	
-LIBS          =	$(COMMON_LIBS) $(EXTRA_LIBS)
-!endif
-
-!if ($(DEBUG) == 1)
-#   -Od		Disable all optimizations.
-#   -k		Turn on standard stack frame.
-#   -r-		Disable use of registers.
-#   -v		Turn on source debugging.
-#   -vG		All code guard options on.
-#   -vi-	Turn off expansion of inline functions.
-#   -y		Debug line numbers on.
-DEBUG_CFLAGS  =	-v -k -Od -vi- -y -r- -lv -tW -tWM
-#   -v		Turn on source debugging.
-DEBUG_LDFLAGS =	-v
-DEBUG_DEFINES = -DUSE_TCLALLOC=0
-DEBUG_DEFINES = 
-TK_LIB        =	$(TKDIR)\win\Debug\tk$(v2)d.lib
-TCL_LIB       =	$(TCLDIR)\win\Debug\tcl$(v2)d.lib
-MSVCRT        =	
-!else
-#   -v-		Turn off source debugging.
-#   -vi-	Turn off expansion of inline functions.
-#   -O2		Generate fastest code possible.
-DEBUG_CFLAGS  =	-v- -vi- -O2 -D_DEBUG
-DEBUG_LDFLAGS =	
-TK_LIB        =	$(TKDIR)\win\Release\tk$(v2).lib
-TCL_LIB       =	$(TCLDIR)\win\Release\tcl$(v2).lib
-MSVCRT        =	
-!endif
-
-# Turn off the following bcc warnings:
-#   -w-pro	Call to function with no prototype
-#   -w-par	Parameter is never used.
-#   -w-sus 	Suspicious pointer conversion (bltCanvEps.c).
-#   -w-eff	Code has no effect (pure_api.c).
-#
-WARNINGS      =	-w-pro -w-par -w-eff -w-sus 
-
-#   -q		Suppress compiler identification banner.
-#   -g1		Stop after the first warning.
-#   -tWC	Target is a Windows console application.
-#   -X		Disable compiler autodependency output.
-#   -ps		Use stdcall calling convention.
-
-EXTRA_CFLAGS  =	-q -g1 -tWC -X 
-
-CFLAGS	      = $(WARNINGS) $(DEBUG_CFLAGS) $(SHLIB_CFLAGS) $(EXTRA_CFLAGS)
-
-# ------------------------------------------------------------------------
-# 	Linker flags and options 
-# ------------------------------------------------------------------------
-
-#   -D		Save specified description.
-#   -w		Turn on warnings.
-#   -c		Treate case as significant in symbols.
-#   -x 	        
-#   -Gi		Generate .lib file.
-#   -r		Verbose linking.
-#   -x		Suppresses map creation.
-COMMON_LDFLAGS = -D"" -w -c -x $(DEBUG_LDFLAGS) -L$(TOOLS32)\lib
-
-SHLIB_LDFLAGS  = $(COMMON_LDFLAGS) -x -Gi -Tpd $(TOOLS32)\lib\c0d32
-
-LDFLAGS =	$(COMMON_LDFLAGS) -x -Tpe -S:2400000
-
-COMMON_LIBS   =	$(TK_LIB) $(TCL_LIB) import32 cw32
-
-EXTRA_LIBS    =	$(OLELIB) \
-		$(JPEGLIB) 
-
-TCL_ONLY_COMMON_LIBS = $(TCL_LIB) import32 cw32
-TCL_ONLY_LIBS =	$(TCL_ONLY_COMMON_LIBS) $(EXTRA_LIBS)
-
-# ------------------------------------------------------------------------
-# 	Source and target installation directories 
-# ------------------------------------------------------------------------
-
-srcdir        =	.
-instdirs      =	$(prefix) $(exec_prefix) $(bindir) $(libdir) $(includedir)
-instdirs      =	$(exec_prefix) $(prefix) $(libdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-TCLDIR        =	$(srcdir)\..\..\tcl$(v3)
-TKDIR         =	$(srcdir)\..\..\tk$(v3)
-INCLUDES      =	-I. -I$(srcdir) \
-		-I$(TOOLS32)\include \
-		-I$(JPEGINC) \
-		-I$(TCLDIR)\win -I$(TCLDIR)\generic \
-		-I$(TKDIR)\win -I$(TKDIR)\generic -I$(TKDIR)\xlib \
-
-SHLIB_LD_LIBS =	$(COMMON_LIBS) $(EXTRA_LIBS)
-SHLIB_TCL_ONLY_LIBS =	$(COMMON_LIBS) $(EXTRA_LIBS)
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS       =	bltTed.obj
-V3_OBJS       =	bltTri.obj bltGrMt.obj 
-
-TK_OBJS       =	tkButton.obj tkFrame.obj bltScrollbar.obj 
-
-GRAPH_OBJS =	bltGrAxis.obj \
-		bltGrBar.obj \
-		bltGrElem.obj \
-		bltGrHairs.obj \
-		bltGrLegd.obj \
-		bltGrLine.obj \
-		bltGrMarker.obj \
-		bltGrMisc.obj \
-		bltGrPen.obj \
-		bltGrPs.obj \
-		bltGraph.obj 
-
-TCL_ONLY_OBJS =	bltAlloc.obj \
-		bltArrayObj.obj \
-		bltBgexec.obj \
-		bltChain.obj \
-		bltDebug.obj \
-		bltHash.obj \
-		bltList.obj \
-		bltNsUtil.obj \
-		bltParse.obj \
-		bltPool.obj \
-		bltSpline.obj \
-		bltSwitch.obj \
-		bltTree.obj \
-		bltTreeCmd.obj \
-		bltUtil.obj \
-		bltVecCmd.obj \
-		bltVecMath.obj \
-		bltVector.obj \
-		bltWatch.obj  \
-		bltWinPipe.obj \
-		bltWinUtil.obj \
-		bltWinDde.obj \
-		pure_api.obj
-
-DEMO_OBJS     =	tkConsole.obj bltWinMain.obj
-
-OBJS =		$(GRAPH_OBJS) \
-		$(TCL_ONLY_OBJS) \
-		bltBeep.obj \
-		bltBind.obj \
-		bltBitmap.obj \
-		bltBusy.obj \
-		bltCanvEps.obj \
-		bltConfig.obj \
-		bltContainer.obj \
-		bltDragdrop.obj \
-		bltHtext.obj \
-		bltImage.obj \
-		bltOldConfig.obj \
-		bltPs.obj \
-		bltTable.obj \
-		bltTabnotebook.obj \
-		bltTabset.obj \
-		bltText.obj \
-		bltTile.obj \
-		bltTreeView.obj \
-		bltTreeViewCmd.obj \
-		bltTreeViewColumn.obj \
-		bltTreeViewEdit.obj \
-		bltTreeViewStyle.obj \
-		bltWinDraw.obj \
-		bltWinImage.obj \
-		bltWinPrnt.obj \
-		bltWindow.obj \
-		bltWinop.obj \
-		$(TK_OBJS) $(N_OBJS) 
-
-NOT_YET       =	bltContainer.obj bltCutBuffer.obj bltColor.obj
-
-HEADERS       =	blt.h bltChain.h bltVector.h bltTree.h bltPool.h bltHash.h
-
-# GNU Make-specific macro
-SRCS          =	$(patsubst %.obj,$(srcdir)\%.c,$(OBJS)) 
-
-shell_name    = bltwish
-version       =	$(BLT_MAJOR_VERSION)$(BLT_MINOR_VERSION)
-bltwish =	bltwish.exe
-bltsh =		bltsh.exe
-
-lib_name =	BLT$(version)
-lib_a =		BLT$(version).lib
-lib_so =	BLT$(version).dll		
-tcl_only_lib_a = BLTlite$(version).lib
-tcl_only_lib_so = BLTlite$(version).dll		
-
-CC_SWITCHES   =	$(CFLAGS) $(DEFINES) $(INCLUDES)
-VPATH         =	$(srcdir)
-
-all: build-library build-demos
-
-build-demos: $(bltsh) $(bltwish) 
-
-build-library: $(lib_a) $(tcl_only_lib_a)
-
-build-dll: build-library $(lib_so) $(tcl_only_lib_so)
-
-$(bltwish): $(lib_a) tkConsole.obj  bltWinMain.c
-	-del $(bltwish) 2>nul
-	$(CC) -c $(CC_SWITCHES) -DTCLLIBPATH="\"$(TCLLIBPATH)\"" \
-		-obltWinMain.obj $(srcdir)\bltWinMain.c
-	$(LD) $(LDFLAGS) -aa $(TOOLS32)\lib\c0w32 \
-		tkConsole.obj bltWinMain.obj, \
-		$(bltwish),, $(lib_a) $(LIBS) 
-
-$(bltsh): $(tcl_only_lib_a) bltWinMain.c
-	-del $(bltsh) 2>nul 
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY \
-		-DTCLLIBPATH="\"$(TCLLIBPATH)\"" \
-		-obltWinMain.obj $(srcdir)\bltWinMain.c
-	$(LD) $(LDFLAGS) -ap $(TOOLS32)\lib\c0x32 bltWinMain.obj, \
-		$(bltsh),, $(tcl_only_lib_a) $(TCL_ONLY_LIBS) 
-
-$(lib_a):  $(lib_so) bltHash.h $(OBJS) bltInit.c
-	-del bltInit.obj 2>nul
-	$(CC) -c $(CC_SWITCHES)  -DBLT_LIBRARY="\"$(BLT_LIBRARY)\"" \
-		-obltInit.obj $(srcdir)\bltInit.c
-	-del $@ 2>nul
-	$(AR) $@ $(lib_so)
-
-$(lib_so): $(OBJS) bltInit.c
-	-del bltInit.obj 2>nul
-	$(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY="\"$(BLT_LIBRARY)\"" \
-		-obltInit.obj $(srcdir)\bltInit.c
-	-del $@ 2>nul
-	$(LD) $(SHLIB_LDFLAGS) bltInit.obj $(OBJS), $@,, $(LIBS) 
-
-$(tcl_only_lib_a):  $(tcl_only_lib_so) bltHash.h $(TCL_ONLY_OBJS) bltInit.c
-	-del bltInit.obj 2>nul
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY="\"$(BLT_LIBRARY)\"" \
-		-obltInit.obj $(srcdir)\bltInit.c
-	-del $@ 2>nul
-	$(AR) $@ $(tcl_only_lib_so)
-
-$(tcl_only_lib_so): $(TCL_ONLY_OBJS) bltInit.c
-	-del bltInit.obj 2>nul
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY="\"$(BLT_LIBRARY)\"" \
-		-obltInit.obj $(srcdir)\bltInit.c
-	-del $@ 2>nul
-	$(LD) $(SHLIB_LDFLAGS) bltInit.obj $(TCL_ONLY_OBJS), $@, -x, \
-		$(TCL_ONLY_LIBS),,
-
-bltHash.h: bltHash.h.in
-	sed -e 's/@SIZEOF_VOID_P@/4/' \
-	    -e 's/@SIZEOF_INT@/4/' \
-	    -e 's/@SIZEOF_LONG@/4/' \
-	    -e 's/@SIZEOF_LONG_LONG@/8/' \
-	    -e 's/@HAVE_INTTYPES_H@/0/' \
-	    bltHash.h.in > bltHash.h
-
-clean:
-	-del *.obj 2>nul
-	-del *.pdb 2>nul
-	-del *.exp 2>nul
-	-del $(lib_a) 2>nul
-	-del $(lib_so) 2>nul
-	-del $(tcl_only_lib_a) 2>nul
-	-del $(tcl_only_lib_so) 2>nul
-	-del $(bltwish) 2>nul
-	-del $(bltsh) 2>nul
-	-del $(srcdir)\*.bak 2>nul
-	-del $(srcdir)\*~ 2>nul 
-	-del $(srcdir)\"#"* 2>nul
-	-del *.pdb 2>nul
-	-del *.ilf 2>nul
-	-del *.ils 2>nul
-	-del *.ilc 2>nul
-	-del *.ild 2>nul
-	-del *.tds 2>nul
-	-del *.td2 2>nul
-	-del *.TR2 2>nul
-
-.c.obj:
-	$(CC) -c $(CC_SWITCHES) $<
-
diff --git a/blt3.0/src/Makefile.in b/blt3.0/src/Makefile.in
deleted file mode 100644
index baa05b6..0000000
--- a/blt3.0/src/Makefile.in
+++ /dev/null
@@ -1,599 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for static version of BLT library
-# ------------------------------------------------------------------------
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-BLT_LIBRARY =		@BLT_LIBRARY@
-CC =			@CC@
-CFLAGS =		@CFLAGS@ 
-DEFINES =		@DEFINES@
-EXTRA_CFLAGS =		@GCCFLAGS@ $(SO_CFLAGS) 
-LDFLAGS =		@LDFLAGS@ @LD_RUN_PATH@
-LIB_PREFIX =		@LIB_PREFIX@
-TCLLIBPATH   =		@TCL_LIB_DIR@/tcl at TCL_VERSION@
-TCL_DBG =		@TCL_DBGX@
-
-SO_CFLAGS =		@BLT_SO_CFLAGS@
-LIB_SUFFIX =		@BLT_LIB_SUFFIX@
-SO_EXT =		@BLT_SO_EXT@
-SO_PREFIX =		@BLT_SO_PREFIX@
-SO_LD =			@BLT_SO_LD@
-SO_LDFLAGS =		@BLT_SO_LDFLAGS@ @LD_RUN_PATH@
-
-EXPAT_INC_SPEC =	@EXPAT_INC_SPEC@
-EXPAT_LIB_SPEC =	@EXPAT_LIB_SPEC@
-FT2_INC_SPEC =		@FT2_INC_SPEC@
-FT2_LIB_SPEC =		@FT2_LIB_SPEC@
-JPG_INC_SPEC =		@JPG_INC_SPEC@
-JPG_LIB_SPEC =		@JPG_LIB_SPEC@
-MYSQL_INC_SPEC =	@MYSQL_INC_SPEC@
-MYSQL_LIB_SPEC =	@MYSQL_LIB_SPEC@
-PNG_INC_SPEC =		@PNG_INC_SPEC@
-PNG_LIB_SPEC =		@PNG_LIB_SPEC@ $(Z_LIB_SPEC)
-TCL_INC_SPEC =		@TCL_INC_SPEC@
-TCL_LIB_SPEC =		@TCL_LIB_SPEC@
-TCL_STUBS_SPEC =	@TCL_STUBS_SPEC@
-TIF_INC_SPEC =		@TIF_INC_SPEC@
-TIF_LIB_SPEC =		@TIF_LIB_SPEC@
-TK_INC_SPEC =		@TK_INC_SPEC@
-TK_LIB_SPEC =		@TK_LIB_SPEC@
-TK_STUBS_SPEC =		@TK_STUBS_SPEC@
-X11_INC_SPEC =		@X11_INC_SPEC@
-X11_LIB_SPEC =		@X11_LIB_SPEC@
-XFT_INC_SPEC =		@XFT_INC_SPEC@
-XFT_LIB_SPEC =		@XFT_LIB_SPEC@
-XPM_INC_SPEC =		@XPM_INC_SPEC@
-XPM_LIB_SPEC =		@XPM_LIB_SPEC@
-XAU_LIB_SPEC =		@XAU_LIB_SPEC@
-XRANDR_LIB_SPEC =	@XRANDR_LIB_SPEC@
-XRENDER_LIB_SPEC =	@XRENDER_LIB_SPEC@
-FTCFG_LIB_SPEC =	@FTCFG_LIB_SPEC@
-XDMCP_LIB_SPEC =	@XDMCP_LIB_SPEC@
-Z_LIB_SPEC =		@Z_LIB_SPEC@
-
-version =		@BLT_MAJOR_VERSION@@BLT_MINOR_VERSION@
-
-# ------------------------------------------------------------------------
-# 	Source and targer installation directories 
-# ------------------------------------------------------------------------
-
-bindir =		$(exec_prefix)/bin
-datadir =		@datadir@
-datarootdir =		@datarootdir@
-exec_prefix =		@exec_prefix@
-incdir =		$(prefix)/include
-includedir =		@includedir@
-libdir =		@libdir@
-prefix =		@prefix@
-scriptdir =		$(exec_prefix)/lib
-srcdir =		@srcdir@
-pkgdir =		@BLT_LIBRARY@
-
-instdirs =		$(prefix) \
-			$(exec_prefix) \
-			$(bindir) \
-			$(libdir) \
-			$(incdir) \
-			$(pkgdir) \
-			$(scriptdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-INCLUDES =		-I. -I$(srcdir) \
-			@INCLUDES@
-
-# ------------------------------------------------------------------------
-#       Libraries directives for Tcl, Tk, X11, and BLT
-# ------------------------------------------------------------------------
-
-EXTRA_CORE_LIBS =	@LIBS@ @EXTRA_LIBS@ 
-
-EXTRA_X_LIBS =		@TK_XLIBSW@ \
-			$(X11_LIB_SPEC) \
-			$(XAU_LIB_SPEC) \
-			$(XDMCP_LIB_SPEC) \
-			$(XRANDR_LIB_SPEC) \
-			$(XRENDER_LIB_SPEC) \
-			$(EXTRA_CORE_LIBS) 
-
-BLT_X_SO_LIBS =		$(XFT_LIB_SPEC) \
-			$(FTCFG_LIB_SPEC) \
-			$(XRANDR_LIB_SPEC) \
-			$(FT2_LIB_SPEC) 
-
-BLT_X_A_LIBS =		$(BLT_X_SO_LIBS) \
-			$(JPG_LIB_SPEC) \
-			$(PNG_LIB_SPEC) \
-			$(TIF_LIB_SPEC) \
-			$(XPM_LIB_SPEC) 
-
-BLT_CORE_SO_LIBS =	
-
-BLT_CORE_A_LIBS =	$(BLT_CORE_SO_LIBS) \
-			$(MYSQL_LIB_SPEC) \
-			$(EXPAT_LIB_SPEC) 
-
-blt_core_name =		BLTCore$(version)$(LIB_SUFFIX)
-blt_x_name =		BLTX$(version)$(LIB_SUFFIX)
-
-blt_core_so =		lib$(blt_core_name)$(SO_EXT)
-blt_core_a =		lib$(blt_core_name).a
-
-blt_x_so =		lib$(blt_x_name)$(SO_EXT)
-blt_x_a =		lib$(blt_x_name).a
-
-blt_dt_csv_name =       DataTableCsv$(version)$(LIB_SUFFIX)
-blt_dt_mysql_name =     DataTableMysql$(version)$(LIB_SUFFIX)
-blt_dt_tree_name =      DataTableTree$(version)$(LIB_SUFFIX)
-blt_dt_vec_name =       DataTableVector$(version)$(LIB_SUFFIX)
-blt_dt_xml_name =       DataTableXml$(version)$(LIB_SUFFIX)
-
-blt_dt_csv_so =		$(blt_dt_csv_name)$(SO_EXT)
-blt_dt_mysql_so =       $(blt_dt_mysql_name)$(SO_EXT)
-blt_dt_tree_so =	$(blt_dt_tree_name)$(SO_EXT)
-blt_dt_vec_so =		$(blt_dt_vec_name)$(SO_EXT)
-blt_dt_xml_so =		$(blt_dt_xml_name)$(SO_EXT)
-
-blt_pict_bmp_name =     PictureBmp$(version)$(LIB_SUFFIX)
-blt_pict_gif_name =     PictureGif$(version)$(LIB_SUFFIX)
-blt_pict_jpg_name =     PictureJpg$(version)$(LIB_SUFFIX)
-blt_pict_pbm_name =     PicturePbm$(version)$(LIB_SUFFIX)
-blt_pict_pdf_name =     PicturePdf$(version)$(LIB_SUFFIX)
-blt_pict_photo_name =   PicturePhoto$(version)$(LIB_SUFFIX)
-blt_pict_png_name =     PicturePng$(version)$(LIB_SUFFIX)
-blt_pict_ps_name =      PicturePs$(version)$(LIB_SUFFIX)
-blt_pict_tif_name =     PictureTif$(version)$(LIB_SUFFIX)
-blt_pict_xbm_name =     PictureXbm$(version)$(LIB_SUFFIX)
-blt_pict_xpm_name =     PictureXpm$(version)$(LIB_SUFFIX)
-
-blt_pict_bmp_so =	$(blt_pict_bmp_name)$(SO_EXT)
-blt_pict_gif_so =	$(blt_pict_gif_name)$(SO_EXT)
-blt_pict_jpg_so =	$(blt_pict_jpg_name)$(SO_EXT)
-blt_pict_pbm_so =	$(blt_pict_pbm_name)$(SO_EXT)
-blt_pict_pdf_so =	$(blt_pict_pdf_name)$(SO_EXT)
-blt_pict_photo_so =     $(blt_pict_photo_name)$(SO_EXT)
-blt_pict_png_so =	$(blt_pict_png_name)$(SO_EXT)
-blt_pict_ps_so =	$(blt_pict_ps_name)$(SO_EXT)
-blt_pict_tif_so =	$(blt_pict_tif_name)$(SO_EXT)
-blt_pict_xbm_so =	$(blt_pict_xbm_name)$(SO_EXT)
-blt_pict_xpm_so =	$(blt_pict_xpm_name)$(SO_EXT)
-
-blt_tree_xml_name =	TreeXml$(version)$(LIB_SUFFIX)
-
-blt_tree_xml_so =	$(blt_tree_xml_name)$(SO_EXT)
-
-blt_core_pkgs_so =	$(blt_dt_csv_so) \
-			$(blt_dt_tree_so) \
-			$(blt_dt_vec_so) 
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-ifneq ("$(MYSQL_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_mysql_so) 
-endif
-
-blt_x_pkgs_so =		$(blt_pict_gif_so) \
-			$(blt_pict_xbm_so) \
-			$(blt_pict_bmp_so) \
-			$(blt_pict_pbm_so) \
-			$(blt_pict_pdf_so) \
-			$(blt_pict_ps_so) \
-			$(blt_pict_photo_so)
-ifneq ("$(JPG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_jpg_so) 
-endif
-ifneq ("$(PNG_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_png_so) 
-endif
-ifneq ("$(XPM_LIB_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_xpm_so) 
-endif
-ifneq ("$(XPM_TIF_SPEC)", "")
-   blt_x_pkgs_so += $(blt_pict_tif_so) 
-endif
-
-ifneq ("$(TCL_STUBS_SPEC)", "")
-  tcl_lib_spec=$(TCL_STUBS_SPEC)
-else
-  tcl_lib_spec=$(TCL_LIB_SPEC)
-endif
-
-ifneq ("$(TK_STUBS_SPEC)", "")
-  tk_lib_spec=$(TK_STUBS_SPEC)
-else
-  tk_lib_spec=$(TK_LIB_SPEC)
-endif
-
-ifneq ("$(EXPAT_LIB_SPEC)", "")
-   blt_core_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS =		bltTed.o
-V3_OBJS =		bltTri.o bltGrMt.o 
-
-TK_OBJS =		tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =		bltGrAxis.o \
-			bltGrBar.o \
-			bltGrElem.o \
-			bltGrHairs.o \
-			bltGrLegd.o \
-			bltGrLine.o \
-			bltGrMarker.o \
-			bltGrMisc.o \
-			bltGrPen.o \
-			bltGrPs.o \
-			bltGraph.o 
-
-TREEVIEW_OBJS =		bltTreeView.o \
-			bltTvCmd.o \
-			bltTvCol.o \
-			bltTvEdit.o \
-			bltTvStyle.o 
-
-PICTURE_OBJS =		bltPicture.o \
-			bltPictCmd.o \
-			bltPictDraw.o \
-			bltPictMmx.o 
-
-PICTURE_PKG_OBJS =	bltPictBmp.o \
-			bltPictGif.o \
-			bltPictJpg.o \
-			bltPictPbm.o \
-			bltPictPdf.o \
-			bltPictPhoto.o \
-			bltPictPng.o \
-			bltPictPs.o \
-			bltPictTif.o \
-			bltPictXbm.o \
-			bltPictXpm.o 
-
-TREE_OBJS =		bltTree.o \
-			bltTreeCmd.o \
-
-TREE_PKG_OBJS =		bltTreeXml.o 
-
-DATATABLE_OBJS =	bltDataTable.o \
-			bltDtCmd.o \
-
-DATATABLE_PKG_OBJS =	bltDtCsv.o \
-			bltDtMysql.o \
-			bltDtTree.o \
-			bltDtVec.o \
-			bltDtXml.o 
-
-BLT_CORE_SO_OBJS =	bltAlloc.o \
-			bltArrayObj.o \
-			bltBase64.o \
-			bltBgexec.o \
-			bltChain.o \
-			bltCrc32.o \
-			bltCsv.o \
-			$(DATATABLE_OBJS) \
-			bltDebug.o \
-			bltHash.o \
-			bltInit.o \
-			bltList.o \
-			bltNsUtil.o \
-			bltParse.o \
-			bltPool.o \
-			bltDBuffer.o \
-			bltSpline.o \
-			bltSwitch.o \
-			$(TREE_OBJS) \
-			bltUtil.o \
-			bltVar.o \
-			bltVecCmd.o \
-			bltVecMath.o \
-			bltVector.o \
-			bltWatch.o \
-			bltTri.o \
-			bltUnixPipe.o \
-			bltCoreInit.o 
-
-BLT_CORE_A_OBJS =	$(BLT_CORE_SO_OBJS) \
-			$(TREE_PKG_OBJS) \
-			$(DATATABLE_PKG_OBJS) 
-
-BLT_X_SO_OBJS =		$(GRAPH_OBJS) \
-			$(PICTURE_OBJS) \
-			$(TREEVIEW_OBJS) \
-			bltBeep.o \
-			bltBgStyle.o \
-			bltBind.o \
-			bltBitmap.o \
-			bltBusy.o \
-			bltCanvEps.o \
-			bltComboBtn.o \
-			bltComboEntry.o \
-			bltComboMenu.o \
-			bltComboTree.o \
-			bltConfig.o \
-			bltContainer.o \
-			bltCutbuffer.o \
-			bltDragdrop.o \
-			bltHtext.o \
-			bltImage.o \
-			bltMenubar.o \
-			bltOldConfig.o \
-			bltPaneset.o \
-			bltPs.o \
-			bltPsAfm.o \
-			bltScrollset.o \
-			bltTable.o \
-			bltTabset.o \
-			bltText.o \
-			bltUnixBitmap.o \
-			bltUnixDnd.o \
-			bltUnixFont.o \
-			bltUnixPainter.o \
-			bltUnixWindow.o \
-			bltWindow.o \
-			bltWinop.o  \
-			bltExtInit.o \
-			$(TK_OBJS) $(N_OBJS) 
-
-
-BLT_X_A_OBJS =		$(BLT_X_SO_OBJS) \
-			$(PICTURE_PKG_OBJS) 
-
-
-BLT_SO_OBJS =		$(BLT_CORE_SO_OBJS) \
-			$(BLT_X_SO_OBJS) 
-
-BLT_A_OBJS =		$(BLT_CORE_A_OBJS) \
-			$(BLT_X_A_OBJS) 
-
-# GNU Make-specific macro
-SRCS =			$(patsubst %.o,$(srcdir)/%.c,$(BLT_A_OBJS)) 
-
-bltwish =		bltwish$(version)
-bltsh =			bltsh$(version)
-
-# Public headers to be installed
-headers =		$(srcdir)/blt.h \
-			$(srcdir)/bltBind.h \
-			$(srcdir)/bltChain.h \
-			bltHash.h \
-			$(srcdir)/bltList.h \
-			$(srcdir)/bltPool.h \
-			$(srcdir)/bltTree.h \
-			$(srcdir)/bltVector.h 
-
-CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-MAIN_CC_OPTS =		$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-INSTALL =		@INSTALL@
-INSTALL_DATA =		@INSTALL_DATA@
-RANLIB =		@RANLIB@
-SHELL =			/bin/sh
-AR =			ar rc
-RM =			rm -f
-LINT =			splint
-LINTFLAGS =		#-axhbns
-XREF =			cxref
-XREFFLAGS =		-dltR
-LN_S =			@LN_S@
-VPATH =			$(srcdir)
-
-all: build_libs build_demos
-
-build_demos: $(bltsh) $(bltwish) 
-build_libs: build_ at BLT_TARGET@
-
-build_shared: $(blt_core_so) $(blt_x_so) build_core_pkgs build_x_pkgs
-build_static: $(blt_core_a) $(blt_x_a)
-build_core_pkgs: $(blt_core_so) $(blt_core_pkgs_so) 
-build_x_pkgs:  $(blt_x_so) $(blt_x_pkgs_so)
-
-$(bltwish): $(blt_core_a) $(blt_x_a) $(srcdir)/bltUnixMain.c
-	$(RM) $(bltwish)
-	$(CC) $(MAIN_CC_OPTS) $(LDFLAGS) -o $(bltwish) \
-		-DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltUnixMain.c \
-		$(blt_x_a) $(blt_core_a) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_X_A_LIBS) $(BLT_CORE_A_LIBS) $(EXTRA_X_LIBS)
-
-$(bltsh): $(blt_core_a) $(srcdir)/bltUnixMain.c
-	$(RM) $(bltsh)
-	$(CC) $(CC_OPTS) $(LDFLAGS) -o $(bltsh) \
-		-DTCL_ONLY -DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		$(srcdir)/bltUnixMain.c \
-		$(blt_core_a) $(TCL_STUBS_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_CORE_A_LIBS) $(EXTRA_CORE_LIBS)
-
-$(blt_core_a):  $(BLT_CORE_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_CORE_A_OBJS) 
-	$(RANLIB) $@
-
-$(blt_x_a):  $(BLT_X_A_OBJS) 
-	$(RM) $@
-	$(AR) $@ $(BLT_X_A_OBJS)
-	$(RANLIB) $@
-
-$(blt_core_so):  $(BLT_CORE_SO_OBJS)
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ $(BLT_CORE_SO_OBJS) $(BLT_CORE_SO_LIBS) \
-		$(core_lib_spec)
-
-$(blt_x_so):  $(BLT_X_SO_OBJS) 
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ $(BLT_X_SO_OBJS) $(BLT_X_SO_LIBS) \
-		$(BLT_CORE_SO_LIBS) $(tcl_lib_spec) 
-
-$(blt_dt_mysql_so): bltDtMysql.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtMysql.o $(MYSQL_LIB_SPEC)
-
-$(blt_dt_xml_so): bltDtXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtXml.o $(EXPAT_LIB_SPEC)
-
-$(blt_dt_csv_so): bltDtCsv.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtCsv.o 
-
-$(blt_dt_vec_so): bltDtVec.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtVec.o 
-
-$(blt_dt_tree_so): bltDtTree.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltDtTree.o 
-
-$(blt_pict_bmp_so): bltPictBmp.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictBmp.o 
-
-$(blt_pict_gif_so): bltPictGif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictGif.o 
-
-$(blt_pict_jpg_so): bltPictJpg.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictJpg.o $(JPG_LIB_SPEC)
-
-$(blt_pict_png_so): bltPictPng.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPng.o $(PNG_LIB_SPEC)
-
-$(blt_pict_pbm_so): bltPictPbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPbm.o 
-
-$(blt_pict_tif_so): bltPictTif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictTif.o $(TIF_LIB_SPEC)
-
-$(blt_pict_xbm_so): bltPictXbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictXbm.o 
-
-$(blt_pict_xpm_so): bltPictXpm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictXpm.o \
-		$(X11_LIB_SPEC) $(XPM_LIB_SPEC)
-
-$(blt_pict_pdf_so): bltPictPdf.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPdf.o 
-
-$(blt_pict_ps_so): bltPictPs.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPs.o 
-
-$(blt_pict_photo_so): bltPictPhoto.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltPictPhoto.o 
-
-$(blt_tree_xml_so): bltTreeXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LDFLAGS) -o $@ bltTreeXml.o $(EXPAT_LIB_SPEC)
-
-
-install: mkdirs install-demos install-libs install-headers 
-
-install-libs: install- at BLT_TARGET@ 
-
-install-demos: $(bltwish) $(bltsh)
-	$(INSTALL) -m 0755 $(bltwish) $(DESTDIR)$(bindir)
-	$(INSTALL) -m 0755 $(bltsh) $(DESTDIR)$(bindir)
-
-install-shared: $(blt_core_so) $(blt_x_so) install-pkgs install-static 
-	$(INSTALL) -m 0755 $(blt_core_so) $(DESTDIR)$(libdir)
-	$(INSTALL) -m 0755 $(blt_x_so) $(DESTDIR)$(libdir)
-
-install-static: $(blt_core_a) $(blt_x_a) 
-	$(INSTALL_DATA) $(blt_core_a) $(DESTDIR)$(libdir)
-	$(RANLIB) $(DESTDIR)$(libdir)/$(blt_core_a)
-	$(INSTALL_DATA) $(blt_x_a) $(DESTDIR)$(libdir)
-	$(RANLIB) $(DESTDIR)$(libdir)/$(blt_x_a)
-
-install-pkgs: $(blt_core_pkgs_so) $(blt_x_pkgs_so)
-	for i in $(blt_core_pkgs_so) $(blt_x_pkgs_so) ; do \
-	  echo $(RM) $(DESTDIR)$(libdir)/$$i ; \
-	  $(RM) $(DESTDIR)$(libdir)/$$i ; \
-	  echo $(INSTALL) -m 0755 $$i $(DESTDIR)$(pkgdir) ; \
-	  $(INSTALL) -m 0755 $$i $(DESTDIR)$(pkgdir) ; \
-        done
-
-install-headers:
-	@for i in $(headers) ; do \
-	    echo "installing $$i..." ; \
-	    $(INSTALL_DATA) -m 0444 $$i $(DESTDIR)$(incdir) ; \
-	done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(DESTDIR)$$i ; then \
-            : ; \
-          else \
-            echo " mkdir $(DESTDIR)$$i" ; \
-            $(INSTALL) -d $(DESTDIR)$$i ; \
-          fi ; \
-        done
-
-
-lint:
-	$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-xref:
-	$(XREF) $(XREFFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-clean: clean-objs clean-libs clean-demos 
-clean-libs: clean- at BLT_TARGET@
-clean-objs:
-	$(RM) $(BLT_A_OBJS) 
-clean-demos:
-	$(RM) $(bltsh)* $(bltwish)* *pure* .pure*
-clean-static: 
-	$(RM) $(blt_core_a) $(blt_x_a) 
-clean-pkgs:
-	$(RM) $(blt_core_pkgs_so) $(blt_x_pkgs_so) 
-clean-shared: clean-pkgs clean-static
-	$(RM) $(blt_core_so) $(blt_x_so) 
-
-distclean:	clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*  Makefile
-	$(RM) config.h bltHash.h Makefile TAGS
-
-bltDtMysql.o: $(srcdir)/bltDtMysql.c
-	$(CC) -c $(CC_OPTS) $(MYSQL_INC_SPEC) $?
-bltDtXml.o: $(srcdir)/bltDtXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltTree.o: $(srcdir)/bltTree.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-bltTreeXml.o: $(srcdir)/bltTreeXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-
-bltUnixFont.o: $(srcdir)/bltUnixFont.c
-	$(CC) -c $(CC_OPTS) $(FT2_INC_SPEC) $?
-
-bltPictDraw.o: $(srcdir)/bltPictDraw.c $(srcdir)/bltPaintDraw.c
-	$(CC) -c $(CC_OPTS) $(FT2_INC_SPEC) $<
-bltPictJpg.o: $(srcdir)/bltPictJpg.c       
-	$(CC) -c $(CC_OPTS) $(JPG_INC_SPEC) $?
-bltPictTif.o: $(srcdir)/bltPictTif.c       
-	$(CC) -c $(CC_OPTS) $(TIF_INC_SPEC) $?
-bltPictPng.o: $(srcdir)/bltPictPng.c       
-	$(CC) -c $(CC_OPTS) $(PNG_INC_SPEC) $?
-bltPictXpm.o: $(srcdir)/bltPictXpm.c       
-	$(CC) -c $(CC_OPTS) $(XPM_INC_SPEC) $?
-
-bltCoreInit.o: $(srcdir)/bltCoreInit.c       
-	$(CC) -c $(CC_OPTS) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		$(srcdir)/bltCoreInit.c
-.c.o:
-	$(CC) -c $(CC_OPTS) $<
-
diff --git a/blt3.0/src/Makefile.vc b/blt3.0/src/Makefile.vc
deleted file mode 100644
index 79f3ada..0000000
--- a/blt3.0/src/Makefile.vc
+++ /dev/null
@@ -1,775 +0,0 @@
-
-# ------------------------------------------------------------------------
-# 	Makefile for BLT library using VC++.
-# ------------------------------------------------------------------------
-
-include ../vc.config
-srcdir = ../$(TOP)/src
-libsrcdir =   $(srcdir)/../..
-TOOLS32 =	C:\Program Files\Microsoft Visual Studio 8\Vc
-BIN =		C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/Vc/bin
-AR =		lib.exe -link50compat
-LD =		link.exe
-CC =		cl.exe
-rc32 =		rc.exe
-MT =		mt.exe
-SDK = C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2
-mslibs = $(TOOLS32)\lib;$(SDK)\lib;.
-
-ifeq ($(WITH_JPG),1)
-JPG_DEFINES =	-DHAVE_LIBJPG
-endif	# WITH_JPG
-
-ifeq ($(WITH_PNG),1)
-PNG_DEFINES =	-DHAVE_LIBPNG
-endif	# WITH_PNG
-
-ifeq ($(WITH_PNG),1)
-PNGDEF        = -DHAVE_PNG_H -DHAVE_LIBPNG
-PNGDIR        =	$(libsrcdir)/libpng-1.2.5
-ZLIBDIR	      = $(libsrcdir)/zlib-1.2.1
-PNGLIB        =	$(PNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib
-PNGINC	      = -I$(PNGDIR) -I$(ZLIBDIR)
-endif	# WITH_PNG
-
-ifeq ($(WITH_TIF),1)
-TIFDEF        = -DHAVE_TIFF_H -DHAVE_LIBTIFF
-TIFDIR        =	$(libsrcdir)/tiff-v3.4beta037/libtiff
-TIFLIB        =	$(TIFDIR)/libtiff.lib
-TIFINC	      = -I$(TIFDIR)
-endif	# WITH_TIF
-
-ifeq ($(WITH_EXPAT),1)
-EXPAT_DEFINES =		-DHAVE_EXPAT_H -DHAVE_LIBEXPAT
-endif
-
-ifeq ($(WITH_FT2),1)
-FT2_DEFINES        = -DHAVE_FT2BUILD_H -DHAVE_LIBFT2 $(FT2_INC_SPEC)
-endif
-
-PICTURE_DEFINES = $(JPGDEF) $(PNGDEF) $(TIFDEF) 
-PICTURE_INCLUDES = $(JPGINC) $(PNGINC) $(TIFINC)
-
-TCL_STUBS_SPEC = 
-TK_STUBS_SPEC  = 
-STUB_DEFINES  =
-
-ifeq ($(ENABLE_STUBS),1)
-STUB_DEFINES  = -DUSE_TCL_STUBS -DUSE_TK_STUBS
-endif	# ENABLE_STUBS
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-DEFINES       =	-D_X86_=1 -D__STDC__ -DWIN32 -DCONSOLE -D_MT \
-		$(DEBUG_DEFINES) $(STUB_DEFINES) $(SO_DEFINES) $(EXTRA_DEFINES)
-
-LIB_DEFINES =	-DBLT_LIB_SUFFIX=\"$(DBG)\" -DBLT_SO_PREFIX=\"\" \
-		-DBLT_SO_EXT=\".dll\"
-
-ifeq ($(ENABLE_SHARED),1)
-SO_DEFINES =	-D_DLL
-SO_TARGET  =	build-dll
-LIBS          =	$(COMMON_LIBS) 
-else
-SO_DEFINES =	-D_CTYPE_DISABLE_MACROS
-LIBS          =	$(COMMON_LIBS) $(EXTRA_LIBS)
-endif 	# ENABLE_SHARED
-
-ifeq ($(ENABLE_SYMBOLS),1)
-CFLAGS        =	-Z7 -Od
-DEBUG_LDFLAGS =	-debug:full -debugtype:cv  
-DEBUG_DEFINES = -DUSE_TCLALLOC=0
-TK_LIB_SPEC   =	$(TKDIR)/lib/tk$(v2).lib  
-TCL_LIB_SPEC  =	$(TCLDIR)/lib/tcl$(v2).lib 
-MSVCRT        =	msvcrt.lib
-
-TCL_STUBS_SPEC = $(TCLDIR)/lib/tclstub$(v2).lib  
-TK_STUBS_SPEC =	$(TKDIR)/lib/tkstub$(v2).lib  
-
-else
-
-CFLAGS        =	-Ox -GB -GD 
-DEBUG_LDFLAGS =	-debug:full -debugtype:cv  
-TK_LIB_SPEC   =	$(TKDIR)/lib/tk$(v2).lib  
-TCL_LIB_SPEC  =	$(TCLDIR)/lib/tcl$(v2).lib 
-MSVCRT        =	msvcrt.lib
-
-TCL_STUBS_SPEC =	$(TCLDIR)/lib/tclstub$(v2).lib  
-TK_STUBS_SPEC =	$(TKDIR)/lib/tkstub$(v2).lib  
-
-endif 	# ENABLE_SYMBOLS
-
-ifeq ($(ENABLE_STUBS), 1)
-  tcl_lib_spec=$(TCL_STUBS_SPEC)
-  tk_lib_spec=$(TK_STUBS_SPEC)
-else
-  tcl_lib_spec=$(TCL_LIB_SPEC)
-  tk_lib_spec=$(TK_LIB_SPEC)
-endif
-
-EXTRA_CFLAGS  =	-nologo -W3 
-
-# ------------------------------------------------------------------------
-# 	Linker flags and options 
-# ------------------------------------------------------------------------
-#-align:0x1000 
-COMMON_LDFLAGS = -nodefaultlib -release -nologo -warn:3 \
-		-machine:IX86 \
-		$(DEBUG_LDFLAGS) 
-
-#		-opt:ref -opt:icf,3 -opt:nowin98
-
-DLLENTRY      =	@12
-SO_LDFLAGS = $(COMMON_LDFLAGS) \
-		-subsystem:console -entry:mainCRTStartup \
-		-subsystem:windows -entry:WinMainCRTStartup \
-		-entry:_DllMainCRTStartup$(DLLENTRY) -dll  
-
-
-BLT_TCL_SO_LDFLAGS = $(COMMON_LDFLAGS) \
-		-subsystem:console -entry:mainCRTStartup \
-		-entry:_DllMainCRTStartup$(DLLENTRY) -dll  
-
-BLT_TCL_SO_LDFLAGS = $(COMMON_LDFLAGS) -dll 
-
-BLT_TK_SO_LDFLAGS = $(COMMON_LDFLAGS) \
-		-subsystem:windows -entry:WinMainCRTStartup \
-		-entry:_DllMainCRTStartup$(DLLENTRY) -dll  
-
-BLT_TK_SO_LDFLAGS = $(COMMON_LDFLAGS) -dll 
-
-LDFLAGS       =	$(COMMON_LDFLAGS) \
-		-fixed:NO -stack:2300000 
-
-COMMON_LIBS   = $(MSVCRT) \
-		kernel32.lib user32.lib advapi32.lib 
-
-EXTRA_LIBS    =	$(OLELIB) \
-		$(JPG_LIB_SPEC) $(PNG_LIB_SPEC) $(TIFLIB) \
-		gdi32.lib \
-		oldnames.lib \
-		advapi32.lib \
-		winspool.lib \
-		comdlg32.lib
-
-BLT_TCL_LIBS = $(MSVCRT)  \
-		kernel32.lib user32.lib advapi32.lib 
-
-BLT_TK_LIBS =   $(OLELIB) \
-		$(JPG_LIB_SPEC) $(PNG_LIB_SPEC) $(TIF_LIB_SPEC) \
-		$(FT2_LIB_SPEC) \
-		$(MSVCRT) \
-		kernel32.lib user32.lib \
-		gdi32.lib oldnames.lib advapi32.lib winspool.lib \
-		comdlg32.lib 
-
-
-# ------------------------------------------------------------------------
-# 	Source and target installation directories 
-# ------------------------------------------------------------------------
-
-instdirs      =	$(prefix) $(exec_prefix) $(bindir) $(libdir) \
-			$(includedir)
-instdirs      =	$(exec_prefix) $(prefix) $(libdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-INCLUDES      =	-I. -I$(srcdir) -I$(srcdir)/win \
-		-I'$(TOOLS32)/include' \
-		-I$(TCLDIR)/include -I$(TKDIR)/include 
-
-#-I$(TCLROOT)/include
-
-SO_LD_LIBS =	$(COMMON_LIBS) $(EXTRA_LIBS)
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-blt_dt_csv_name =       BltDataTableCsv$(version)$(DBG)
-blt_dt_mysql_name =     BltDataTableMysql$(version)$(DBG)
-blt_dt_tree_name =      BltDataTableTree$(version)$(DBG)
-blt_dt_vec_name =       BltDataTableVector$(version)$(DBG)
-blt_dt_xml_name =       BltDataTableXml$(version)$(DBG)
-
-blt_dt_xml_so =		$(blt_dt_xml_name).dll
-blt_dt_mysql_so =       $(blt_dt_mysql_name).dll
-blt_dt_tree_so =	$(blt_dt_tree_name).dll
-blt_dt_vec_so =		$(blt_dt_vec_name).dll
-blt_dt_csv_so =		$(blt_dt_csv_name).dll
-
-blt_dt_xml_implib =	$(blt_dt_xml_name).lib
-blt_dt_mysql_implib =   $(blt_dt_mysql_name).lib
-blt_dt_tree_implib =	$(blt_dt_tree_name).lib
-blt_dt_vec_implib =	$(blt_dt_vec_name).lib
-blt_dt_csv_implib =	$(blt_dt_csv_name).lib
-
-blt_pict_gif_name =     BltPictureGif$(version)$(DBG)
-blt_pict_jpg_name =     BltPictureJpg$(version)$(DBG)
-blt_pict_photo_name =   BltPicturePhoto$(version)$(DBG)
-blt_pict_png_name =     BltPicturePng$(version)$(DBG)
-blt_pict_tif_name =     BltPictureTif$(version)$(DBG)
-blt_pict_xbm_name =     BltPictureXbm$(version)$(DBG)
-blt_pict_xpm_name =     BltPictureXpm$(version)$(DBG)
-
-blt_pict_gif_so =	$(blt_pict_gif_name).dll
-blt_pict_jpg_so =	$(blt_pict_jpg_name).dll
-blt_pict_png_so =	$(blt_pict_png_name).dll
-blt_pict_tif_so =	$(blt_pict_tif_name).dll
-blt_pict_xbm_so =	$(blt_pict_xbm_name).dll
-blt_pict_xpm_so =	$(blt_pict_xpm_name).dll
-blt_pict_photo_so =     $(blt_pict_photo_name).dll
-
-blt_pict_gif_implib =	$(blt_pict_gif_name).lib
-blt_pict_jpg_implib =	$(blt_pict_jpg_name).lib
-blt_pict_png_implib =	$(blt_pict_png_name).lib
-blt_pict_tif_implib =	$(blt_pict_tif_name).lib
-blt_pict_xbm_implib =	$(blt_pict_xbm_name).lib
-blt_pict_xpm_implib =	$(blt_pict_xpm_name).lib
-blt_pict_photo_implib = $(blt_pict_photo_name).lib
-
-blt_tree_xml_name =	BltTreeXml$(version)$(DBG)
-
-blt_tree_xml_so =	$(blt_tree_xml_name).dll
-blt_tree_xml_implib =	$(blt_tree_xml_name).lib
-
-blt_tcl_pkgs_so =	$(blt_dt_csv_so) \
-			$(blt_dt_tree_so) \
-			$(blt_dt_vec_so) 
-ifeq ($(WITH_EXPAT), 1)
-   blt_tcl_pkgs_so += $(blt_dt_xml_so) $(blt_tree_xml_so)
-endif
-ifneq ($(WITH_MYSQL), 1)
-   blt_tcl_pkgs_so += $(blt_dt_mysql_so) 
-endif
-
-blt_tk_pkgs_so =	$(blt_pict_gif_so) \
-			$(blt_pict_xbm_so) \
-			$(blt_pict_photo_so)
-ifneq ($(WITH_JPG), 1)
-   blt_tk_pkgs_so += $(blt_pict_jpg_so) 
-endif
-ifneq ("$(PNG_LIB_SPEC)", "")
-   blt_tk_pkgs_so += $(blt_pict_png_so) 
-endif
-ifneq ("$(XPM_LIB_SPEC)", "")
-   blt_tk_pkgs_so += $(blt_pict_xpm_so) 
-endif
-ifneq ("$(XPM_TIF_SPEC)", "")
-   blt_tk_pkgs_so += $(blt_pict_tif_so) 
-endif
-
-
-N_OBJS =		bltTed.o
-V3_OBJS =		bltTri.o bltGrMt.o 
-
-TK_OBJS =		tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =		bltGrAxis.o \
-			bltGrBar.o \
-			bltGrElem.o \
-			bltGrHairs.o \
-			bltGrLegd.o \
-			bltGrLine.o \
-			bltGrMarker.o \
-			bltGrMisc.o \
-			bltGrPen.o \
-			bltGrPs.o \
-			bltGraph.o 
-
-TREEVIEW_OBJS =		bltTreeView.o \
-			bltTvCmd.o \
-			bltTvCol.o \
-			bltTvEdit.o \
-			bltTvStyle.o 
-
-PICTURE_OBJS =		bltPicture.o \
-			bltPictCmd.o \
-			bltPictDraw.o \
-			bltPictMmx.o 
-
-PICTURE_PKG_OBJS =	bltPictGif.o \
-			bltPictJpg.o \
-			bltPictPhoto.o \
-			bltPictPng.o \
-			bltPictTif.o \
-			bltPictXbm.o \
-			bltPictXpm.o 
-
-
-TREE_OBJS =		bltTree.o \
-			bltTreeCmd.o \
-
-TREE_PKG_OBJS =		bltTreeXml.o 
-
-DATATABLE_OBJS =	bltDataTable.o \
-			bltDtCmd.o \
-
-DATATABLE_PKG_OBJS =	bltDtCsv.o \
-			bltDtMysql.o \
-			bltDtTree.o \
-			bltDtVec.o \
-			bltDtXml.o 
-
-BLT_TCL_SO_OBJS =	bltAlloc.o \
-			bltArrayObj.o \
-			bltBase64.o \
-			bltBgexec.o \
-			bltChain.o \
-			bltCrc32.o \
-			bltCsv.o \
-			$(DATATABLE_OBJS) \
-			bltDebug.o \
-			bltHash.o \
-			bltInit.o \
-			bltList.o \
-			bltNsUtil.o \
-			bltParse.o \
-			bltPool.o \
-			bltDBuffer.o \
-			bltSpline.o \
-			bltSwitch.o \
-			$(TREE_OBJS) \
-			bltUtil.o \
-			bltVar.o \
-			bltVecCmd.o \
-			bltVecMath.o \
-			bltVector.o \
-			bltWatch.o \
-			bltWinDde.o \
-			bltWinPipe.o \
-			bltWinUtil.o \
-			pure_api.o
-
-
-BLT_TCL_A_OBJS =	$(BLT_TCL_SO_OBJS) \
-			$(TREE_PKG_OBJS) \
-			$(DATATABLE_PKG_OBJS) 
-
-BLT_TK_SO_OBJS =	$(GRAPH_OBJS) \
-			$(PICTURE_OBJS) \
-			$(TREEVIEW_OBJS) \
-			bltBeep.o \
-			bltBgStyle.o \
-			bltBind.o \
-			bltBitmap.o \
-			bltBusy.o \
-			bltCanvEps.o \
-			bltComboBtn.o \
-			bltComboEntry.o \
-			bltComboMenu.o \
-			bltComboTree.o \
-			bltConfig.o \
-			bltContainer.o \
-			bltCutbuffer.o \
-			bltDragdrop.o \
-			bltHtext.o \
-			bltImage.o \
-			bltOldConfig.o \
-			bltPs.o \
-			bltTable.o \
-			bltTabnotebook.o \
-			bltTabset.o \
-			bltText.o \
-			bltTile.o \
-			bltWinBitmap.o \
-			bltWinDraw.o \
-			bltWinFont.o \
-			bltWinPainter.o \
-			bltWinPrnt.o \
-			bltWinWindow.o \
-			bltWindow.o \
-			bltWinop.o  \
-			$(TK_OBJS) $(N_OBJS) 
-
-
-BLT_TK_A_OBJS =		$(BLT_TK_SO_OBJS) \
-			$(PICTURE_PKG_OBJS) 
-
-BLT_SO_OBJS =		$(BLT_TCL_SO_OBJS) \
-			$(BLT_TK_SO_OBJS) 
-
-BLT_A_OBJS =		$(BLT_TCL_A_OBJS) \
-			$(BLT_TK_A_OBJS) 
-
-DEMO_OBJS =		tkConsole.o bltWinMain.o
-
-NOT_YET       =	bltContainer.o bltCutBuffer.o bltColor.o
-
-# GNU Make-specific macro
-SRCS =			$(patsubst %.o,$(srcdir)/%.c,$(OBJS)) 
-
-
-HEADERS   =	blt.h bltChain.h bltVector.h bltTree.h bltPool.h 
-GENERATED_HEADERS  = bltHash.h
-
-# GNU Make-specific macro
-SRCS          =	$(patsubst %.o,$(srcdir)/%.c,$(BLT_A_OBJS)) 
-
-shell_name    = bltwish
-version       =	$(BLT_MAJOR_VERSION)$(BLT_MINOR_VERSION)
-bltwish =	bltwish.exe
-bltsh =		bltsh.exe
-bltwish2 =	bltwish$(version).exe
-bltsh2 =	bltsh$(version).exe
-
-blt_tcl_name =	BltTcl$(version)$(DBG)
-blt_tk_name =	BltTk$(version)$(DBG)
-
-blt_tcl_spec =	-L. -l$(blt_tcl_name)
-blt_tk_spec =	-L. -l$(blt_tcl_name)
-
-blt_tcl_so =	$(blt_tcl_name).dll
-blt_tcl_a =	$(blt_tcl_name).a
-blt_tcl_implib = $(blt_tcl_name).lib
-
-blt_tk_so =	$(blt_tk_name).dll
-blt_tk_a =	$(blt_tk_name).a
-blt_tk_implib =	$(blt_tk_name).lib
-
-CC_OPTS       = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
-MAIN_CC_OPTS  = $(CC_OPTS) $(JPG_DEFINES) $(PNG_DEFINES) 
-
-VPATH         =	$(srcdir)
-
-all: bltHash.h build-library $(SO_TARGET) build-demos
-
-install: all install-dirs install-headers install-binaries install-demos
-
-build-demos: $(SO_TARGET) $(bltsh) $(bltwish) 
-
-build-library: $(blt_tcl_so) $(blt_tcl_a) $(blt_tk_so) $(blt_tk_a) 
-
-build-dll: build-library $(blt_tcl_so) $(blt_tk_so) 
-
-build_tcl_pkgs: $(blt_tcl_pkgs_so) 
-build_tk_pkgs:  $(blt_tk_pkgs_so)
-
-$(bltwish): $(blt_tcl_so) $(blt_tk_so) tkConsole.o $(srcdir)/bltWinMain.c
-	$(RM) $(bltwish) 
-	$(CC) -c $(MAIN_CC_OPTS) -DSTATIC_PKGS -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		-FobltWinMain.o $(srcdir)/bltWinMain.c 
-	$(LD) $(LDFLAGS) tkConsole.o bltWinMain.o -out:$(bltwish) \
-		-subsystem:windows -entry:WinMainCRTStartup \
-		$(blt_tk_a) $(blt_tcl_a) \
-		$(TK_STUBS_SPEC) $(TK_LIB_SPEC) \
-		$(TCL_STUBS_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_TK_LIBS)
-	if test -r "$(bltwish).manifest" ; then \
-	    $(MT) -nologo -manifest $(bltwish).manifest \
-		-outputresource:$(bltwish)\;1 ; \
-	fi
-
-$(bltsh): $(blt_tcl_so) $(srcdir)/bltWinMain.c
-	$(RM) $(bltsh) 
-	$(CC) -c $(MAIN_CC_OPTS) -DTCL_ONLY -DSTATIC_PKGS \
-		-DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		-FobltWinMain.o $(srcdir)/bltWinMain.c
-	$(LD) $(LDFLAGS) bltWinMain.o -out:$(bltsh) \
-		-subsystem:console -entry:mainCRTStartup \
-		$(blt_tcl_a) \
-		$(TCL_STUBS_SPEC) $(TCL_LIB_SPEC) \
-		$(BLT_TCL_LIBS) 
-	if test -r "$(bltsh).manifest" ; then \
-	    $(MT) -nologo -manifest $(bltsh).manifest \
-		-outputresource:$(bltsh)\;1 ; \
-	fi
-
-$(blt_tk_a):  $(BLT_TK_A_OBJS) bltTkInit.c
-	$(RM) bltTkInit.o
-	$(CC) -c $(CC_OPTS) -FobltTkInit.o $(srcdir)/bltTkInit.c 
-	$(RM) $@
-	$(AR) -out:$@ bltTkInit.o $(BLT_TK_A_OBJS)
-
-$(blt_tk_so): $(blt_tcl_a) $(BLT_TK_SO_OBJS) bltTkInit.c
-	$(RM) bltTkInit.o
-	$(CC) -c $(CC_OPTS) -DUSE_DLL -FobltTkInit.o $(srcdir)/bltTkInit.c 
-	$(RM) $@
-	$(LD) $(BLT_TK_SO_LDFLAGS) -out:$@ bltTkInit.o $(BLT_TK_SO_OBJS) \
-		$(blt_tcl_implib) $(tk_lib_spec) $(tcl_lib_spec) \
-		$(BLT_TK_LIBS)
-	if test -r "$(blt_tk_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_tk_so).manifest \
-		-outputresource:$(blt_tk_so)\;2 ; \
-	fi
-
-
-$(blt_tcl_a):  bltHash.h $(BLT_TCL_A_OBJS) bltTclInit.c
-	$(RM) bltTclInit.o
-	$(CC) -c $(CC_OPTS) -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltTclInit.o $(srcdir)/bltTclInit.c 
-	$(RM) $@
-	$(AR) -out:$@ bltTclInit.o $(BLT_TCL_A_OBJS) 
-
-$(blt_tcl_so): $(blt_tcl_a) $(BLT_TCL_SO_OBJS)  bltTkInit.c
-	$(RM) bltTclInit.o
-	$(CC) -c $(CC_OPTS) -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" -DUSE_DLL \
-		-FobltTclInit.o $(srcdir)/bltTclInit.c 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltTclInit.o $(BLT_TCL_SO_OBJS) \
-		$(tcl_lib_spec) $(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_tcl_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_tcl_so).manifest \
-		-outputresource:$(blt_tcl_so)\;2 ; \
-	fi
-
-$(blt_dt_mysql_so): bltDtMysql.o
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) $(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_dt_xml_so): bltDtXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtXml.o $(EXPAT_LIB_SPEC)
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtXml.o $(EXPAT_LIB_SPEC) \
-		$(blt_tcl_implib) $(tcl_lib_spec) $(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_xml_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_xml_so).manifest \
-		-outputresource:$(blt_dt_xml_so)\;2 ; \
-	fi
-
-$(blt_dt_csv_so): bltDtCsv.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtCsv.o 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_dt_vec_so): bltDtVec.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtVec.o 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_dt_tree_so): bltDtTree.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtTree.o 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_gif_so): bltPictGif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictGif.o 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_jpg_so): bltPictJpg.o
-	$(RM) $@
-	$(LD) $(BLT_TK_SO_LDFLAGS) -out:$@  bltPictJpg.o $(JPG_LIB_SPEC) \
-		$(blt_tcl_implib) $(tcl_lib_spec) $(LIBS) 
-	if test -r "$(blt_pict_jpg_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_pict_jpg_so).manifest \
-		-outputresource:$(blt_pict_jpg_so)\;2 ; \
-	fi
-
-$(blt_pict_png_so): bltPictPng.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictPng.o $(PNG_LIB_SPEC)
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_tif_so): bltPictTif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictTif.o $(TIF_LIB_SPEC)
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_xbm_so): bltPictXbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictXbm.o 
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_xpm_so): bltPictXpm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictXpm.o \
-		$(X11_LIB_SPEC) $(XPM_LIB_SPEC)
-	$(RM) $@
-	$(LD) $(BLT_TK_SO_LDFLAGS) -out:$@  bltDtMysql.o \
-		$(blt_tcl_implib) $(tcl_lib_spec) $(tk_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_dt_mysql_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_dt_mysql_so).manifest \
-		-outputresource:$(blt_dt_mysql_so)\;2 ; \
-	fi
-
-$(blt_pict_photo_so): bltPictPhoto.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictPhoto.o 
-	$(RM) $@
-	$(LD) $(BLT_TK_SO_LDFLAGS) -out:$@  bltPictPhoto.o \
-		$(blt_tk_implib) $(blt_tcl_implib) \
-		$(tk_lib_spec) $(tcl_lib_spec) \
-		$(BLT_TK_LIBS) $(LIBS) 
-	if test -r "$(blt_pict_photo_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_pict_photo_so).manifest \
-		-outputresource:$(blt_pict_photo_so)\;2 ; \
-	fi
-
-$(blt_tree_xml_so): bltTreeXml.o
-	$(RM) $@
-	$(LD) $(BLT_TCL_SO_LDFLAGS) -out:$@  bltTreeXml.o $(EXPAT_LIB_SPEC) \
-		$(blt_tcl_implib) $(tcl_lib_spec) \
-		$(BLT_TCL_LIBS) $(LIBS) 
-	if test -r "$(blt_tree_xml_so).manifest" ; then \
-	    $(MT) -nologo -manifest $(blt_tree_xml_so).manifest \
-		-outputresource:$(blt_tree_xml_so)\;2 ; \
-	fi
-
-bltWinMain.o: $(srcdir)/bltWinMain.c 
-	$(CC) -c $(CC_OPTS) -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		-FobltWinMain.o $(srcdir)/bltWinMain.c 
-
-bltPictureDraw.o: $(srcdir)/bltPictureDraw.c
-	$(CC) -c $(CC_OPTS) $(FREETYPE2_INC_SPEC)  \
-		-FobltPictureDraw.o $(srcdir)/bltPictureDraw.c 
-
-bltDtMysql.o: $(srcdir)/bltDtMysql.c
-	$(CC) -c $(CC_OPTS) $(MYSQL_DEFINES) $(MYSQL_INC_SPEC)  \
-		-FobltDtMysql.o $(srcdir)/bltDtMysql.c 
-
-bltDtXml.o: $(srcdir)/bltDtXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_DEFINES) $(EXPAT_INC_SPEC)  \
-		-FobltDtXml.o $(srcdir)/bltDtXml.c 
-
-bltTreeXml.o: $(srcdir)/bltTreeXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_DEFINES) $(EXPAT_INC_SPEC)  \
-		-FobltTreeXml.o $(srcdir)/bltTreeXml.c 
-
-bltPictJpg.o: $(srcdir)/bltPictJpg.c
-	$(CC) -c $(CC_OPTS) $(JPG_DEFINES) $(JPG_INC_SPEC)  \
-		-FobltPictJpg.o $(srcdir)/bltPictJpg.c 
-
-bltPictPng.o: $(srcdir)/bltPictPng.c
-	$(CC) -c $(CC_OPTS) $(PNG_DEFINES) $(PNG_INC_SPEC)  \
-		-FobltPictPng.o $(srcdir)/bltPictPng.c 
-
-bltPictureFormats.o: $(srcdir)/bltPictureFormats.c
-	$(CC) -c $(CC_OPTS) $(PICTURE_DEFINES) \
-		$(FREETYPE2_INC_SPEC) $(PICTURE_INCLUDES) \
-		-FobltPictureFormats.o $(srcdir)/bltPictureFormats.c 
-
-bltPictureImage.o: $(srcdir)/bltPictureImage.c
-	$(CC) -c $(CC_OPTS) $(PICTURE_DEFINES) \
-		-FobltPictureImage.o $(srcdir)/bltPictureImage.c 
-
-bltHash.h: $(srcdir)/bltHash.h.in
-	sed -e 's/@SIZEOF_VOID_P@/4/' \
-	    -e 's/@SIZEOF_INT@/4/' \
-	    -e 's/@SIZEOF_LONG@/4/' \
-	    -e 's/@SIZEOF_LONG_LONG@/8/' \
-	    -e 's/@HAVE_INTTYPES_H@/0/' \
-	    $(srcdir)/bltHash.h.in > bltHash.h
-
-bltHash.c: bltHash.h
-
-install-dirs:
-	@for i in $(instdirs) ; do \
-	    if test ! -d "$$i" ; then \
-		echo " mkdir $$i" ; \
-		mkdir "$$i" ; \
-	    fi ; \
-        done
-
-install-binaries: install-lib install-demos 
-
-install-demos: build-demos
-	$(INSTALL) $(bltwish) $(bindir)/$(bltwish)
-	$(INSTALL) $(bltwish) $(bindir)/$(bltwish2)
-	$(INSTALL) $(bltsh) $(bindir)/$(bltsh)
-	$(INSTALL) $(bltsh) $(bindir)/$(bltsh2)
-
-install-lib: $(blt_tcl_so) $(blt_tk_so) $(blt_tcl_a) $(blt_tk_a)
-	$(INSTALL) $(blt_tcl_so) $(bindir)
-	$(INSTALL) $(blt_tk_so) $(bindir)
-	$(INSTALL_DATA) $(blt_tcl_a) $(libdir)
-	$(INSTALL_DATA) $(blt_tk_a) $(libdir)
-
-install-headers: bltHash.h
-	for i in $(HEADERS) ; do \
-	    $(INSTALL_DATA) "$(srcdir)/$$i" $(includedir) ; \
-	done
-	$(INSTALL_DATA) bltHash.h $(includedir) 
-
-lint:
-	$(LINT) $(LINTFLAGS) $(DEFINES) $(INCLUDES) $(SRCS)
-
-clean:
-	$(RM) *.o *.pdb *.exp *.manifest *.lib \
-		$(blt_tcl_a) $(blt_tcl_so) \
-		$(blt_tk_a) $(blt_tk_so) \
-		$(bltwish) $(bltsh) $(bltwish2) $(bltsh2)
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*  
-
-distclean: clean
-	$(RM) Makefile
-
-bltTclInit.o: bltTclInit.c
-	$(CC) -c $(CC_OPTS) -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltTclInit.o $(srcdir)/bltTclInit.c
-
-bltPictCmd.o: $(srcdir)/bltPictCmd.c
-	$(CC) -c $(CC_OPTS) $(LIB_DEFINES) -Fo$@ $(srcdir)/bltPictCmd.c
-
-bltDtCmd.o: $(srcdir)/bltDtCmd.c
-	$(CC) -c $(CC_OPTS) $(LIB_DEFINES) -Fo$@ $(srcdir)/bltDtCmd.c
-
-bltTreeCmd.o: $(srcdir)/bltTreeCmd.c
-	$(CC) -c $(CC_OPTS) $(LIB_DEFINES) -Fo$@ $(srcdir)/bltTreeCmd.c
-
-bltPictDraw.o: $(srcdir)/bltPictDraw.c
-	$(CC) -c $(CC_OPTS) $(FT2_DEFINES) -Fo$@ $(srcdir)/bltPictDraw.c
-
-.c.o:
-	$(CC) -c $(CC_OPTS) -Fo$@ $<
-
diff --git a/blt3.0/src/TODO b/blt3.0/src/TODO
deleted file mode 100644
index aa858f2..0000000
--- a/blt3.0/src/TODO
+++ /dev/null
@@ -1,175 +0,0 @@
-
-To do:
-
-bgexec (Windows)
-  1. (BUG) Convert collected data to UTF before passing to the interpreter.
-
-container (Unix)
-  1. (done) Add timeout option to control how long to search for application 
-            window.
-
-debug  
-  1. (done) Recent versions of Tcl swamp Tcl_CommandTrace.  
-            Add line cutoff option (default is 6).
-
-dnd (Unix)
-  1. (DOC) Create manual page for "dnd" command. 
-  2. (Feature) Add Motif drag-and-drop capabilities.  
-
-eps
-  1. (DOC) Update manual page for eps canvas item.  
-  2. (FEATURE) Read Windows EPS files with embedded TIFF images.
-
-graph
-  1. (done) Fix zooming graph procedure to handle multiple axes.
-  2. (BUG) Windows printing commands "print1" and "print2" need to use 
-     postscript options like -maxpect, -pad, etc. to control graph
-     size.
-  3. (BUG) No PostScript generated for polygon tiling.
-  4. (BUG) Clip background polygon for text/bitmap markers.
-  5. (FEATURE) Add -mask option for bitmap marker.
-  6. (FEATURE) Allow rotated image markers.
-  7. (FEATURE) Add oval and rectangle markers.
-  8. (FEATURE) Add arrowheads to line markers.
-  9. (BUG) Finish adding error bars.
- 10. (DOC) Review and update documentation for new typos, new features.
- 11. (BUG) Store converted screen coordinates in floating point. Can't
-	   use integer coordinates for higher resolution PostScript
-	   devices. How do Windows' print devices handle this?
-
-hierbox
-  1. (CHANGE) Hierbox to use tree object for data.  The -data option will 
-              be a field in the tree.
-  2. (FEATURE) Add edit bindings for entries.
-  3. (DOCUMENTATION) Create real hierbox manual page.
-
-hiertable
-  1. (done) -tree option dumps core.
-  2. (done) Sorting tree view affects all other hiertables using the tree.  
-            Is separate data structure needed for non-flattened sorts?  What
-            about moves? 
-  3. (done) Call tree update procedure when tree object is sorted.  This
-            is only when a tree is shared between more than one hiertable.
-            It goes out-of-sync with actual tree positions.
-  4. (CHANGE) "column resize set" should change the width of the active
-            column automatically.
-  5a.(FEATURE) XOR outline for entry move operation.
-  5b.(FEATURE) XOR outline for entry resize operation.
-  6a.(done) XOR outline for column resize operation.
-  6b.(FEATURE) XOR outline for column move operation.
-  7. (???) Update procedure isn't called for moved nodes.  Call global
-           update routine (like sort) or selected node update procedures?
-  8. (DOC) Explain selection modes ("single" and "multiple") 
-           in manual page.
-  9. (BUG) Multi-line entry editting is broken.
- 10. (BUG) Add default bindings for entry editting. Need to set grab
-     on edit window.
- 11. (BUG) Add standard keyboard bindings.
- 12. (FEATURE) Images in column title.  
- 13. (PERFORMANCE) Don't redraw entire widget for scrolling.  Copy 
-                   portions of pixmap and redraw only changed areas.  
-	           This will affect lots of code.
- 14. (PERFORMANCE) Don't redraw entire widget for selections.  Draw
-	           only changed entries.  
- 15. (???) Add checkbox column entries.
- 16. (BUG) "column resize" reports incorrect width of column.
-
-printer (Windows)
-  1. (DOC) Create manual page for "printer" command.
-  2. (FEATURE) Add operation to print text and canvas widgets.
-  3. (FEATURE) Create sample print dialog.
-  4. (BUG) Needs print job abort handler.
-
-tabset
-  1. (done) Add perforation gizmo for tearoffs.  
-  2. (FEATURE) Allow alternatative tearout styles.
-
-tree 
-  1. (done) Create Tcl interface.
-  2. (DOC) Create manuals for both Tcl and C APIs.
-
-vector
-  1. (FEATURE) Add Tcl-based notification callbacks.  
-
-gradient
-  1. (FEATURE) Create gradient command that interfaces with tiling.
-
-all (Mac)
-
----------------------
-
-barchart - Anti-aliased lines for bars?  
-barchart - Clip bars properly.
-barchart - Store bars with floating point coordinates
-barchart - Fix PostScript, fix translucent bars.
-graph    - Fix PostScript, fix translucent symbols
-graph    - Fix PostScript font stringwidth using AFM files
-graph    - Simple markup (subscript/superscript, font size color, greek symbols)
-graph    - PDF output.
-picture  - Add gradient paint operations
-picture  - Wide lines
-picture  - shadows.
-picture  - Fix text operations. Single glyph 
-picture  - PDF output
-picture  - convolve
-bgpattern - tile and gradient polygons
-table widget - 
-contour widget - 
-
-macosx   - build
-	 - busy, ?
-
-dataarray:
-
-1. Reference counted vectors.  Don't require master to delete.
-   Can attach like trees and tables.
-2. No variable interface.
-3. Tcl notifier interface.
-4. Connect to table columns.
-5. Use Blt_Objs
-6. No #auto.
-7. Test harness.
-8. Use Tcl_Objs instead of double array.  Allow strings, images, arrays, etc.
-
-
----------------------------------------------
-
-Paneset --
-
-  Fix modes.  
-  Leave room for sash when shrinking window.
-
-Graph --
-
-  Constrain size of symbols.
-  Fix axis line with solid plot lines.
-
-Barchart --
-
-  Clip bar segments against plot area.
-
-Scrollset --
-
-  Fix manual.
-
-Treeview --
-
-  Fix combobox style to support combomenus.
-  Add automatic scrollbars.
-  Change scrolling to use XCopyArea.
-  
-Combomenu --
-
-  Better icon for radiobuttons.
-
-Comboentry --
-
-Combotree --
-
-  Fix background.
-
-Combobutton --
-
-Menubar --
-
-
diff --git a/blt3.0/src/blt.h b/blt3.0/src/blt.h
deleted file mode 100644
index d57c007..0000000
--- a/blt3.0/src/blt.h
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/*
- * blt.h --
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_H
-#define _BLT_H
-
-#define BLT_MAJOR_VERSION 	3
-#define BLT_MINOR_VERSION 	0
-#define BLT_VERSION		"3.0"
-#define BLT_PATCH_LEVEL		"3.0a"
-#define BLT_RELEASE_SERIAL	0
-
-#define BLT_STORAGE_CLASS	
-
-#ifdef __cplusplus
-#  define BLT_EXTERN BLT_STORAGE_CLASS extern "C" 
-#else
-#  define BLT_EXTERN BLT_STORAGE_CLASS extern 
-#endif	/* __cplusplus */
-
-#define _VERSION(a,b,c)	    (((a) << 16) + ((b) << 8) + (c))
-
-#ifndef _ANSI_ARGS_
-#   define _ANSI_ARGS_(x)       ()
-#endif
-
-#endif /*_BLT_H*/
diff --git a/blt3.0/src/blt.mak b/blt3.0/src/blt.mak
deleted file mode 100644
index 91dd6fa..0000000
--- a/blt3.0/src/blt.mak
+++ /dev/null
@@ -1,321 +0,0 @@
-
-# ------------------------------------------------------------------------
-#
-# 	Nmakefile for BLT library using VC++.
-#
-#  	Please note this file may or may not be up-to-date.  
-#
-#	You can compare it with "Makefile.vc" in this directory.  That's 
-#	what I use to build BLT (so it should be current).  It builds BLT
-#	with VC++ 6.0 and the cygwin32 tool suite from 
-#
-#		http://sourceware.cygnus.com
-#
-# ------------------------------------------------------------------------
-
-!INCLUDE ../win/makedefs
-
-TOOLS32       =	C:/Program Files/Microsoft Visual Studio/Vc98
-prefix        =	C:/Program Files/Tcl
-
-AR            =	lib.exe
-LD            =	link.exe
-CC            =	cl.exe
-rc32          =	rc.exe
-RM	      = -del
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-DEFINES       =	-D_X86_=1 -D__STDC__ -DWIN32 -DCONSOLE -D_MT \
-			$(DEBUG_DEFINES) $(SHLIB_DEFINES)
-EXTRA_CFLAGS  =	-nologo -W3 
-
-!IF "$(SHARED)" == "1"
-SHLIB_DEFINES = -D_DLL
-SHLIB_TARGET  =	build-dll
-LIBS =		$(COMMON_LIBS) 
-!ELSE
-SHLIB_DEFINES = -D_CTYPE_DISABLE_MACROS
-LIBS          =	$(COMMON_LIBS) $(EXTRA_LIBS)
-!ENDIF
-
-!IF "$(DEBUG)" == "1"
-CFLAGS        =	-Z7 -Od
-DEBUG_LDFLAGS =	-debug:full -debugtype:cv  
-D             =	d
-builddir      =	.\Debug
-!ELSE
-CFLAGS        =	-Ox -GB -GD 
-DEBUG_LDFLAGS =	-debug:full -debugtype:cv  
-D             =
-builddir      =	.\Release
-!ENDIF
-
-
-MSVCRT        =	msvcrt$(DBG).lib
-TK_LIB        =	$(TKDIR)/win/$(builddir)/tk$(v2)$(D).lib  
-TCL_LIB       =	$(TCLDIR)/win/$(builddir)/tcl$(v2)$(D).lib 
-
-# ------------------------------------------------------------------------
-# 	Linker flags and options 
-# ------------------------------------------------------------------------
-
-JPEGLIB       =	$(JPEGDIR)/libjpeg.lib
-
-COMMON_LDFLAGS =	-nodefaultlib -release -nologo -warn:3 \
-		-machine:IX86 -align:0x1000 \
-		$(DEBUG_LDFLAGS)
-
-DLLENTRY      =	@12
-SHLIB_LDFLAGS = $(COMMON_LDFLAGS) \
-		-subsystem:console -entry:mainCRTStartup \
-		-subsystem:windows -entry:WinMainCRTStartup \
-		-entry:_DllMainCRTStartup$(DLLENTRY) -dll  
-
-LDFLAGS       =	$(COMMON_LDFLAGS) \
-		-fixed:NO -stack:2300000 
-
-COMMON_LIBS   =	$(TK_LIB) $(TCL_LIB) \
-		$(MSVCRT) \
-		kernel32.lib user32.lib 
-
-EXTRA_LIBS    =	$(OLELIB) \
-		$(JPEGLIB) \
-		gdi32.lib \
-		oldnames.lib \
-		advapi32.lib \
-		winspool.lib 
-
-TCL_ONLY_LIBS = $(TCL_LIB) $(MSVCRT)  kernel32.lib user32.lib advapi32.lib 
-
-# ------------------------------------------------------------------------
-# 	Source and target directories 
-# ------------------------------------------------------------------------
-
-srcdir        =	.
-instdirs      =	$(prefix) $(exec_prefix) $(bindir) $(libdir) \
-		$(includedir)
-instdirs      =	$(exec_prefix) $(prefix) $(libdir)
-
-# ------------------------------------------------------------------------
-# 	Directories containing Tcl and Tk include files and libraries
-# ------------------------------------------------------------------------
-
-JPEGDIR       =	$(srcdir)/../../jpeg-6b
-TCLDIR        =	$(srcdir)/../../tcl$(v3)
-TKDIR         =	$(srcdir)/../../tk$(v3)
-INCLUDES      =	-I. -I$(srcdir) \
-		-I"$(TOOLS32)/include" \
-		-I$(TCLDIR)/win \
-		-I$(TCLDIR)/generic \
-		-I$(TKDIR)/win \
-		-I$(TKDIR)/generic \
-		-I$(TKDIR)/xlib \
-		-I$(JPEGDIR) 
-SHLIB_LD_LIBS =	$(COMMON_LIBS) $(EXTRA_LIBS)
-
-# ------------------------------------------------------------------------
-# 	You don't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS =	bltTed.o
-V3_OBJS =	bltTri.o bltGrMt.o 
-
-TK_OBJS =	tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =	bltGrAxis.o \
-		bltGrBar.o \
-		bltGrElem.o \
-		bltGrHairs.o \
-		bltGrLegd.o \
-		bltGrLine.o \
-		bltGrMarker.o \
-		bltGrMisc.o \
-		bltGrPen.o \
-		bltGrPs.o \
-		bltGraph.o 
-
-TCL_ONLY_OBJS =	bltAlloc.o \
-		bltArrayObj.o \
-		bltBgexec.o \
-		bltChain.o \
-		bltDebug.o \
-		bltHash.o \
-		bltList.o \
-		bltNsUtil.o \
-		bltParse.o \
-		bltPool.o \
-		bltSpline.o \
-		bltSwitch.o \
-		bltTree.o \
-		bltTreeCmd.o \
-		bltUtil.o \
-		bltVecCmd.o \
-		bltVecMath.o \
-		bltVector.o \
-		bltWatch.o  
-		bltWinPipe.o \
-
-OBJS =		$(GRAPH_OBJS) \
-		$(TCL_ONLY_OBJS) \
-		bltBeep.o \
-		bltBind.o \
-		bltBitmap.o \
-		bltBusy.o \
-		bltCanvEps.o \
-		bltConfig.o \
-		bltContainer.o \
-		bltDragdrop.o \
-		bltHtext.o \
-		bltImage.o \
-		bltOldConfig.o \
-		bltPainter.o \
-		bltPicture.o \
-		bltPictureFormats.o \
-		bltPictureImage.o \
-		bltPictureMMX.o \
-		bltPs.o \
-		bltTable.o \
-		bltTabnotebook.o \
-		bltTabset.o \
-		bltText.o \
-		bltTile.o \
-		bltTreeView.o \
-		bltTreeViewCmd.o \
-		bltTreeViewColumn.o \
-		bltTreeViewEdit.o \
-		bltTreeViewStyle.o \
-		bltWinBitmap.o \
-		bltWinDraw.o \
-		bltWinPainter.o \
-		bltWinPrnt.o \
-		bltWinWindow.o \
-		bltWindow.o \
-		bltWinop.o \
-		$(TK_OBJS) $(N_OBJS) 
-
-bltwish =	bltwish.exe
-bltsh =		bltsh.exe
-headers =	$(srcdir)/blt.h \
-		$(srcdir)/bltBind.h \
-		$(srcdir)/bltChain.h \
-		bltHash.h \
-		$(srcdir)/bltList.h \
-		$(srcdir)/bltPool.h \
-		$(srcdir)/bltTree.h \
-		$(srcdir)/bltVector.h 
-
-version       =	$(BLT_MAJOR_VERSION)$(BLT_MINOR_VERSION)
-bltwish2 =	bltwish$(version).exe
-bltsh2 =	bltsh$(version).exe
-
-lib_name =	BLT$(version)
-lib_a =		BLT$(version).lib
-lib_so =	BLT$(version).dll		
-tcl_only_lib_a = BLTlite$(version).lib
-tcl_only_lib_so = BLTlite$(version).dll		
-
-CC_SWITCHES   =	$(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
-VPATH         =	$(srcdir)
-
-all: build-library $(SHLIB_TARGET) build-demos
-
-build-demos: $(SHLIB_TARGET) $(bltwish) $(bltsh)
-
-build-library: $(BLT_LIB)
-
-build-library: $(lib_a) $(tcl_only_lib_a)
-
-build-dll: build-library $(lib_so) $(tcl_only_lib_so)
-
-$(bltwish): $(lib_a) tkConsole.o  bltWinMain.c
-	$(RM) $(bltwish) 
-	$(CC) -c $(CC_SWITCHES) -DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		-FobltWinMain.o $(srcdir)/bltWinMain.c
-	LIB=$(TOOLS32)/lib \
-	$(LD) $(LDFLAGS) tkConsole.o bltWinMain.o -out:$(bltwish) \
-		$(lib_a) $(LIBS) 
-
-$(bltsh): $(tcl_only_lib_a) bltWinMain.c
-	$(RM) $(bltsh) 
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY \
-		-DTCLLIBPATH=\"$(TCLLIBPATH)\" \
-		-FobltWinMain.o $(srcdir)/bltWinMain.c
-	LIB=$(TOOLS32)/lib \
-	$(LD) $(LDFLAGS) bltWinMain.o -out:$(bltsh) \
-		$(tcl_only_lib_a) $(TCL_ONLY_LIBS) 
-
-$(lib_a):  bltHash.h $(OBJS) bltInit.c
-	$(RM) bltInit.o
-	$(CC) -c $(CC_SWITCHES)  -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltInit.o $(srcdir)/bltInit.c
-	$(RM) $@
-	$(AR) -out:$@ bltInit.o $(OBJS)
-
-$(lib_so): $(lib_a) $(OBJS) bltInit.c
-	$(RM) bltInit.o
-	$(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltInit.o $(srcdir)/bltInit.c
-	$(RM) $@
-	LIB=$(TOOLS32)/lib \
-	$(LD) $(SHLIB_LDFLAGS) -out:$@ bltInit.o $(OBJS) $(SHLIB_LD_LIBS)
-
-$(tcl_only_lib_a):  bltHash.h $(TCL_ONLY_OBJS) bltInit.c
-	$(RM) bltInit.o
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltInit.o $(srcdir)/bltInit.c
-	$(RM) $@
-	$(AR) -out:$@ bltInit.o $(TCL_ONLY_OBJS) 
-
-$(tcl_only_lib_so): $(tcl_only_lib_a) $(TCL_ONLY_OBJS) bltInit.c
-	$(RM) bltInit.o
-	$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \
-		-FobltInit.o $(srcdir)/bltInit.c
-	$(RM) $@
-	LIB=$(TOOLS32)/lib \
-	$(LD) $(SHLIB_LDFLAGS) -out:$@ bltInit.o $(TCL_ONLY_OBJS) \
-		$(TCL_ONLY_LIBS) 
-
-bltHash.h: bltHash.h.in
-	sed -e 's/@SIZEOF_VOID_P@/4/' \
-	    -e 's/@SIZEOF_INT@/4/' \
-	    -e 's/@SIZEOF_LONG@/4/' \
-	    -e 's/@SIZEOF_LONG_LONG@/8/' \
-	    -e 's/@HAVE_INTTYPES_H@/0/' \
-	    bltHash.h.in > bltHash.h
-
-clean:
-	-del *.o 2>nul
-	-del *.pdb 2>nul
-	-del *.exp 2>nul
-	-del $(lib_name).* 2>nul
-	-del $(bltwish) 2>nul
-	-del $(bltsh) 2>nul
-	-del $(srcdir)\*.bak 2>nul
-	-del $(srcdir)\*~ 2>nul 
-	-del $(srcdir)\"#"* 2>nul
-
-bltPictureDraw.o: $(srcdir)/bltPictureDraw.c
-	$(CC) -c $(CC_OPTS) $(FT_INC_SPEC)  \
-		-FobltPictureDraw.o $(srcdir)/bltPictureDraw.c 
-
-bltPictureFormats.o: $(srcdir)/bltPictureFormats.c
-	$(CC) -c $(CC_OPTS) \
-		$(FT_INC_SPEC) \
-		$(JPEG_INC_SPEC) $(TIFF_INC_SPEC) $(PNG_INC_SPEC) \
-		$(XPM_INC_SPEC)$(PICTURE_INCLUDES) \
-		-FobltPictureFormats.o $(srcdir)/bltPictureFormats.c 
-
-{$(srcdir)}.c.o:
-	$(CC) -c $(CC_SWITCHES) -Fo$*.o $<
-
-
-
-
-
-
-
-
-
diff --git a/blt3.0/src/bltAlloc.c b/blt3.0/src/bltAlloc.c
deleted file mode 100644
index 266544c..0000000
--- a/blt3.0/src/bltAlloc.c
+++ /dev/null
@@ -1,229 +0,0 @@
-#include "bltInt.h"
-
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif /* HAVE_MALLOC_H */
-
-/*
- *	Memory allocation/deallocation in BLT is performed via the global
- *	variables bltMallocPtr, bltFreePtr, and bltReallocPtr.  By default,
- *	they point to the same routines that TCL uses.  The routine
- *	Blt_AllocInit allows you to specify your own memory allocation and
- *	deallocation routines for BLT on a library-wide basis.
- */
-#ifdef WIN32
-
-#ifdef __GNUC__
-#ifndef USE_TCL_STUBS
-EXTERN char *Tcl_Alloc(unsigned int size);
-EXTERN void Tcl_Free(char * ptr);
-EXTERN char *Tcl_Realloc(char *ptr, unsigned int size);
-#endif
-#endif /*__GNUC__*/
-
-#else
-
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-#ifndef USE_TCL_STUBS
-BLT_EXTERN Blt_MallocProc TclpAlloc;
-BLT_EXTERN Blt_FreeProc TclpFree;
-BLT_EXTERN Blt_ReallocProc TclpRealloc;
-#endif
-#else
-#if !HAVE_DECL_FREE
-BLT_EXTERN void free (void *);
-#endif
-#endif /* >= 8.1.0 */
-#endif /* WIN32 */
-
-static Blt_MallocProc *bltMallocPtr;
-static Blt_ReallocProc *bltReallocPtr;
-static Blt_FreeProc *bltFreePtr;
-
-void *
-Blt_Malloc(size_t size) 
-{
-    return (*bltMallocPtr)(size);
-}
-
-
-void
-Blt_Free(const void *mem)
-{
-    (*bltFreePtr)((void *)mem);
-}
-
-void *
-Blt_Realloc(void *ptr, size_t size)
-{
-    return (*bltReallocPtr)(ptr, size);
-}
-
-void *
-Blt_Calloc(size_t nElem, size_t elemSize)
-{
-    void *ptr;
-    size_t size;
-
-    size = nElem * elemSize;
-    ptr = (*bltMallocPtr)(size);
-    if (ptr != NULL) {
-	memset(ptr, 0, size);
-    }
-    return ptr;
-}
-
-void *
-Blt_MallocAbortOnError(size_t size, const char *fileName, int lineNum) 
-{
-    void *ptr;
-
-    ptr = (*bltMallocPtr)(size);
-    if (ptr == NULL) {
-#ifdef WINDEBUG
-	PurifyPrintf("line %d of %s: can't allocate %lu bytes of memory\n", 
-		lineNum, fileName, (unsigned long)size);
-#endif
-	fprintf(stderr, "line %d of %s: can't allocate %lu bytes of memory\n", 
-		lineNum, fileName, (unsigned long)size);
-
-	fflush(stderr);
-	abort();
-    }
-    return ptr;
-}
-
-void *
-Blt_CallocAbortOnError(size_t nElem, size_t elemSize, const char *fileName, 
-		       int lineNum)
-{
-    void *ptr;
-    size_t size;
-
-    size = nElem * elemSize;
-    ptr = (*bltMallocPtr)(size);
-    if (ptr == NULL) {
-#ifdef WINDEBUG
-	PurifyPrintf(
-		"line %d of %s: can't allocate %lu item(s) of size %lu each\n",
-		lineNum, fileName, (unsigned long)nElem, 
-		(unsigned long)elemSize);
-#endif
-	fprintf(stderr, 
-		"line %d of %s: can't allocate %lu item(s) of size %lu each\n", 
-		lineNum, fileName, (unsigned long)nElem, 
-		(unsigned long)elemSize);
-	fflush(stderr);
-	abort();
-    }
-    memset(ptr, 0, size);
-    return ptr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Strdup --
- *
- *      Create a copy of the string from heap storage.
- *
- * Results:
- *      Returns a pointer to the need string copy.
- *
- *---------------------------------------------------------------------------
- */
-char *
-Blt_Strdup(const char *string)
-{
-    size_t size;
-    char *ptr;
-
-    size = strlen(string) + 1;
-    ptr = (*bltMallocPtr)(size * sizeof(char));
-    if (ptr != NULL) {
-	strcpy(ptr, string);
-    }
-    return ptr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_StrdupAbortOnError --
- *
- *      Create a copy of the string from heap storage.
- *
- * Results:
- *      Returns a pointer to the need string copy.
- *
- *---------------------------------------------------------------------------
- */
-char *
-Blt_StrdupAbortOnError(const char *string, const char *fileName, int lineNum)
-{
-    size_t size;
-    char *ptr;
-
-    size = strlen(string) + 1;
-    ptr = (*bltMallocPtr)(size * sizeof(char));
-    if (ptr == NULL) {
-#ifdef WINDEBUG
-	PurifyPrintf("line %d of %s: can't allocate string of %lu bytes\n",
-		     lineNum, fileName, (unsigned long)size);
-#endif
-	fprintf(stderr, "line %d of %s: can't allocate string of %lu bytes\n",
-		lineNum, fileName, (unsigned long)size);
-	fflush(stderr);
-	abort();
-    }
-    strcpy(ptr, string);
-    return ptr;
-}
-
-void
-Blt_AllocInit(
-    Blt_MallocProc *mallocProc,
-    Blt_ReallocProc *reallocProc,
-    Blt_FreeProc *freeProc)
-{
-    Blt_MallocProc *defMallocProc;
-    Blt_FreeProc *defFreeProc;
-    Blt_ReallocProc *defReallocProc;
-    
-    /* 
-     * Try to use the same memory allocator/deallocator that TCL is
-     * using. Before 8.1 it used malloc/free.
-     */
-#ifdef WIN32
-    defMallocProc = (Blt_MallocProc *)Tcl_Alloc;
-    defFreeProc = (Blt_FreeProc *)Tcl_Free; 
-    defReallocProc = (Blt_ReallocProc *)Tcl_Realloc; 
-#else
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    /* 
-     * We're pointing to the private TclpAlloc/TclpFree instead of public
-     * Tcl_Alloc/Tcl_Free routines because they don't automatically trigger a
-     * panic when not enough memory is available. There are cases (such as
-     * allocating a very large vector) where an out-of-memory error is
-     * recoverable.
-     */
-    defMallocProc = (Blt_MallocProc *)TclpAlloc;
-    defFreeProc = (Blt_FreeProc *)TclpFree; 
-    defReallocProc = (Blt_ReallocProc *)TclpRealloc; 
-#else 
-    defMallocProc = malloc;
-    defFreeProc = free; 
-    defReallocProc = realloc;
-#endif /* >= 8.1.0 */
-#endif /* WIN32 */
-    if (bltMallocPtr == NULL) {
-	bltMallocPtr = (mallocProc != NULL) ? mallocProc : defMallocProc;
-    }
-    if (bltFreePtr == NULL) {
-	bltFreePtr = (freeProc != NULL) ? freeProc : defFreeProc;
-    }
-    if (bltReallocPtr == NULL) {
-	bltReallocPtr = (reallocProc != NULL) ? reallocProc : defReallocProc;
-    }
-}
-
diff --git a/blt3.0/src/bltAlloc.h b/blt3.0/src/bltAlloc.h
deleted file mode 100644
index 2aec31a..0000000
--- a/blt3.0/src/bltAlloc.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/*
- *	Memory allocation/deallocation in BLT is performed via the
- *	global variables bltMallocPtr, bltFreePtr, and bltReallocPtr.
- *	By default, they point to the same routines that TCL uses.
- *	The routine Blt_AllocInit allows you to specify your own
- *	memory allocation/deallocation routines for BLT on a
- *	library-wide basis.
- */
-
-#ifndef _BLT_ALLOC_H
-#define _BLT_ALLOC_H
-
-#include <assert.h>
-
-typedef void *(Blt_MallocProc) (size_t size);
-typedef void *(Blt_ReallocProc) (void *ptr, size_t size);
-typedef void (Blt_FreeProc) (const void *ptr);
-
-BLT_EXTERN void Blt_AllocInit(Blt_MallocProc *mallocProc, 
-	Blt_ReallocProc *reallocProc, Blt_FreeProc *freeProc);
-
-BLT_EXTERN void *Blt_Malloc(size_t size);
-BLT_EXTERN void *Blt_Realloc(void *ptr, size_t size);
-BLT_EXTERN void Blt_Free(const void *ptr);
-BLT_EXTERN void *Blt_Calloc(size_t nElem, size_t size);
-BLT_EXTERN char *Blt_Strdup(const char *string);
-
-BLT_EXTERN void *Blt_MallocAbortOnError(size_t size, const char *file,int line);
-
-BLT_EXTERN void *Blt_CallocAbortOnError(size_t nElem, size_t size, 
-	const char *file, int line);
-BLT_EXTERN char *Blt_StrdupAbortOnError(const char *ptr, const char *file, 
-	int line);
-
-#define Blt_AssertCalloc(n,s) (Blt_CallocAbortOnError(n,s,__FILE__, __LINE__))
-#define Blt_AssertMalloc(s) (Blt_MallocAbortOnError(s,__FILE__, __LINE__))
-#define Blt_AssertStrdup(s) (Blt_StrdupAbortOnError(s,__FILE__, __LINE__))
-
-#endif /* _BLT_ALLOC_H */
diff --git a/blt3.0/src/bltArrayObj.c b/blt3.0/src/bltArrayObj.c
deleted file mode 100644
index 5e8499e..0000000
--- a/blt3.0/src/bltArrayObj.c
+++ /dev/null
@@ -1,232 +0,0 @@
-
-/*
- * bltArrayObj.c --
- *
- * This file implements an array-based Tcl_Obj.
- *
- *	Copyright (c) 2000 George A. Howlett
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltArrayObj.h"
-#include "bltHash.h"
-
-static Tcl_DupInternalRepProc DupArrayInternalRep;
-static Tcl_FreeInternalRepProc FreeArrayInternalRep;
-static Tcl_UpdateStringProc UpdateStringOfArray;
-static Tcl_SetFromAnyProc SetArrayFromAny;
-
-static Tcl_ObjType arrayObjType = {
-    (char *)"array",
-    FreeArrayInternalRep,	/* Called when an object is freed. */
-    DupArrayInternalRep,	/* Copies an internal representation from one
-				 * object to another. */
-    UpdateStringOfArray,	/* Creates string representation from an
-				 * object's internal representation. */
-    SetArrayFromAny,		/* Creates valid internal representation from
-				 * an object's string representation. */
-};
-
-static int
-SetArrayFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Blt_HashTable *tablePtr;
-    Tcl_ObjType *oldTypePtr = objPtr->typePtr;
-    const char **argv, *string;
-    int argc, i;
-
-    if (objPtr->typePtr == &arrayObjType) {
-	return TCL_OK;
-    }
-    /* Get the string representation. Make it up-to-date if necessary. */
-    string = Tcl_GetString(objPtr);
-    if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-    Blt_InitHashTable(tablePtr, BLT_STRING_KEYS);
-    for (i = 0; i < argc; i += 2) {
-	Blt_HashEntry *hPtr;
-	Tcl_Obj *elemObjPtr;
-	int isNew;
-
-	hPtr = Blt_CreateHashEntry(tablePtr, argv[i], &isNew);
-	elemObjPtr = Tcl_NewStringObj(argv[i + 1], -1);
-	Blt_SetHashValue(hPtr, elemObjPtr);
-
-	/* Make sure we increment the reference count */
-	Tcl_IncrRefCount(elemObjPtr);
-    }
-    
-    if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
-	oldTypePtr->freeIntRepProc(objPtr);
-    }
-    objPtr->internalRep.otherValuePtr = (VOID *)tablePtr;
-    objPtr->typePtr = &arrayObjType;
-    Blt_Free(argv);
-    return TCL_OK;
-}
-
-static void
-DupArrayInternalRep(
-    Tcl_Obj *srcPtr,		/* Object with internal rep to copy. */
-    Tcl_Obj *destPtr)		/* Object with internal rep to set. */
-{
-    Blt_HashEntry *hp;
-    Blt_HashSearch iter;
-    Blt_HashTable *srcTablePtr, *destTablePtr;
-
-    srcTablePtr = (Blt_HashTable *)srcPtr->internalRep.otherValuePtr;
-    destTablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-    Blt_InitHashTable(destTablePtr, BLT_STRING_KEYS);
-    for (hp = Blt_FirstHashEntry(srcTablePtr, &iter); hp != NULL;
-	 hp = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *valueObjPtr;
-	const char *key;
-	int isNew;
-
-	key = Blt_GetHashKey(srcTablePtr, hp);
-	Blt_CreateHashEntry(destTablePtr, key, &isNew);
-	valueObjPtr = Blt_GetHashValue(hp);
-	Blt_SetHashValue(hp, valueObjPtr);
-
-	/* Make sure we increment the reference count now that both array
-	 * objects are using the same elements. */
-	Tcl_IncrRefCount(valueObjPtr);
-    }
-    Tcl_InvalidateStringRep(destPtr);
-    destPtr->internalRep.otherValuePtr = (VOID *)destTablePtr;
-    destPtr->typePtr = &arrayObjType;
-}
-
-static void
-UpdateStringOfArray(Tcl_Obj *objPtr) /* Array object w/ string rep to update. */
-{
-    Tcl_DString dString;
-    Blt_HashTable *tablePtr;
-    Blt_HashEntry *hp;
-    Blt_HashSearch iter;
-
-    tablePtr = (Blt_HashTable *)objPtr->internalRep.otherValuePtr;
-    Tcl_DStringInit(&dString);
-    for (hp = Blt_FirstHashEntry(tablePtr, &iter); hp != NULL;
-	 hp = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *elemObjPtr;
-
-	elemObjPtr = Blt_GetHashValue(hp);
-	Tcl_DStringAppendElement(&dString, Blt_GetHashKey(tablePtr, hp));
-	Tcl_DStringAppendElement(&dString, Tcl_GetString(elemObjPtr));
-    }
-    objPtr->bytes = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-    objPtr->length = strlen(Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-}
-
-static void
-FreeArrayInternalRep(Tcl_Obj *objPtr) /* Array object to release. */
-{
-    Blt_HashEntry *hp;
-    Blt_HashSearch iter;
-    Blt_HashTable *tablePtr;
-    
-    Tcl_InvalidateStringRep(objPtr);
-    tablePtr = (Blt_HashTable *)objPtr->internalRep.otherValuePtr;
-    for (hp = Blt_FirstHashEntry(tablePtr, &iter); hp != NULL;
-	 hp = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *elemObjPtr;
-
-	elemObjPtr = Blt_GetHashValue(hp);
-	Tcl_DecrRefCount(elemObjPtr);
-    }
-    Blt_DeleteHashTable(tablePtr);
-    Blt_Free(tablePtr);
-}
-
-int
-Blt_GetArrayFromObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    Blt_HashTable **tablePtrPtr)
-{
-    if (objPtr->typePtr == &arrayObjType) {
-	*tablePtrPtr = (Blt_HashTable *)objPtr->internalRep.otherValuePtr;
-	return TCL_OK;
-    }
-    if (SetArrayFromAny(interp, objPtr) == TCL_OK) {
-	*tablePtrPtr = (Blt_HashTable *)objPtr->internalRep.otherValuePtr;
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-    
-Tcl_Obj *
-Blt_NewArrayObj(int objc, Tcl_Obj **objv)
-{
-    Blt_HashTable *tablePtr;
-    Tcl_Obj *arrayObjPtr;
-    int i;
-
-    tablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-    Blt_InitHashTable(tablePtr, BLT_STRING_KEYS);
-
-    for (i = 0; i < objc; i += 2) {
-	Blt_HashEntry *hp;
-	Tcl_Obj *objPtr;
-	int isNew;
-
-	hp = Blt_CreateHashEntry(tablePtr, Tcl_GetString(objv[i]), &isNew);
-	objPtr = ((i + 1) == objc) ? Blt_EmptyStringObj() : objv[i+1];
-	Tcl_IncrRefCount(objPtr);
-	if (!isNew) {
-	    Tcl_Obj *oldObjPtr;
-
-	    oldObjPtr = Blt_GetHashValue(hp);
-	    Tcl_DecrRefCount(oldObjPtr);
-	}
-	Blt_SetHashValue(hp, objPtr);
-    }
-    arrayObjPtr = Tcl_NewObj(); 
-    /* 
-     * Reference counts for entry objects are initialized to 0. They are
-     * incremented as they are inserted into the tree via the Blt_Tree_SetValue
-     * call.
-     */
-    arrayObjPtr->refCount = 0;	
-    arrayObjPtr->internalRep.otherValuePtr = (VOID *)tablePtr;
-    arrayObjPtr->bytes = NULL;
-    arrayObjPtr->length = 0; 
-    arrayObjPtr->typePtr = &arrayObjType;
-    return arrayObjPtr;
-}
-
-int
-Blt_IsArrayObj(Tcl_Obj *objPtr)
-{
-    return (objPtr->typePtr == &arrayObjType);
-}
-
-/*ARGSUSED*/
-void
-Blt_RegisterArrayObj(void)
-{
-    Tcl_RegisterObjType(&arrayObjType);
-}
diff --git a/blt3.0/src/bltArrayObj.h b/blt3.0/src/bltArrayObj.h
deleted file mode 100644
index 7490fd8..0000000
--- a/blt3.0/src/bltArrayObj.h
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/*
- * bltArrayObj.h --
- *
- * This file implements an array-based Tcl_Obj.
- *
- *	Copyright (c) 2000 George A. Howlett
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_ARRAY_OBJ_H
-#define _BLT_ARRAY_OBJ_H
-
-#include "bltHash.h"
-
-BLT_EXTERN int Blt_GetArrayFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_HashTable **tablePtrPtr);
-BLT_EXTERN Tcl_Obj *Blt_NewArrayObj(int objc, Tcl_Obj *objv[]);
-BLT_EXTERN void Blt_RegisterArrayObj(void);
-BLT_EXTERN int Blt_IsArrayObj(Tcl_Obj *obj);
-
-#endif /* _BLT_ARRAY_OBJ_H */
diff --git a/blt3.0/src/bltAssert.h b/blt3.0/src/bltAssert.h
deleted file mode 100644
index aea6feb..0000000
--- a/blt3.0/src/bltAssert.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _BLT_ASSERT_H
-#define _BLT_ASSERT_H
-
-/*
- * Since the Tcl/Tk distribution doesn't perform any asserts, dynamic
- * loading can fail to find the __assert function.  As a workaround,
- * we'll include our own.
- */
-#undef	assert
-
-#ifdef	NDEBUG
-#  define	assert(EX) ((void)0)
-#else
-
-BLT_EXTERN void Blt_Assert(const char *expr, const char *file, int line);
-
-#ifdef __STDC__
-#  define assert(EX) (void)((EX) || (Blt_Assert(#EX, __FILE__, __LINE__), 0))
-#else
-#  define assert(EX) (void)((EX) || (Blt_Assert("EX", __FILE__, __LINE__), 0))
-#endif /* __STDC__ */
-
-#endif /* NDEBUG */
-
-#endif /* _BLT_ASSERT_H */
diff --git a/blt3.0/src/bltBase64.c b/blt3.0/src/bltBase64.c
deleted file mode 100644
index 2449ba9..0000000
--- a/blt3.0/src/bltBase64.c
+++ /dev/null
@@ -1,351 +0,0 @@
-
-/*
- * bltBase64.c --
- *
- * This module implements base64 processing procedures for the BLT toolkit.
- *
- *	Copyright 1991-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltDBuffer.h"
-
-/*
- * Table for encoding base64.  
- */
-static char encode64[64] = {
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
-};
-
-/*
- * Table for decoding base64.  
- *
- * Note that NUL and '=' also return 0.  This is so we can blindly decode 4
- * octets without requiring special handing of left-over bytes (i.e. when the
- * encoded buffer did not end on a 3-byte boundary).
- */
-#define NA	127
-
-static char decode64[256] = {
-    0 /* '\0' */, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    62  /* + */, 
-    NA, NA, NA, 
-    63  /* / */,
-    52  /* 0 */, 53  /* 1 */, 54  /* 2 */, 55  /* 3 */, 56  /* 4 */, 
-    57  /* 5 */, 58  /* 6 */, 59  /* 7 */, 60  /* 8 */, 61  /* 9 */, 
-    NA, NA, NA, 
-    0 /* = */, 
-    NA, NA, NA, 
-    0   /* A */, 1   /* B */, 2   /* C */, 3   /* D */, 4   /* E */, 
-    5   /* F */, 6   /* G */, 7   /* H */, 8   /* I */, 9   /* J */, 
-    10  /* K */, 11  /* L */, 12  /* M */, 13  /* N */, 14  /* O */, 
-    15  /* P */, 16  /* Q */, 17  /* R */, 18  /* S */, 19  /* T */, 
-    20  /* U */, 21  /* V */, 22  /* W */, 23  /* X */, 24  /* Y */, 
-    25  /* Z */, 
-    NA, NA, NA, NA, NA, NA, 
-    26  /* a */, 27  /* b */, 28  /* c */, 29  /* d */, 30  /* e */, 
-    31  /* f */, 32  /* g */, 33  /* h */, 34  /* i */, 35  /* j */, 
-    36  /* k */, 37  /* l */, 38  /* m */, 39  /* n */, 40  /* o */, 
-    41  /* p */, 42  /* q */, 43  /* r */, 44  /* s */, 45  /* t */, 
-    46  /* u */, 47  /* v */, 48  /* w */, 49  /* x */, 50  /* y */, 
-    51  /* z */, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
-    NA, NA, NA, NA, NA
-};
-
-int
-Blt_IsBase64(const unsigned char *bytes, size_t nBytes)
-{
-    const unsigned char *bp, *bend;
-
-    for (bp = bytes, bend = bp + nBytes; bp < bend; bp++) {
-	unsigned int byte;
-
-	byte = *bp;
-	if ((decode64[byte] == NA) && (!isspace(byte))) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-static INLINE unsigned char
-NextChar(const unsigned char **bp, const unsigned char *lastPtr) 
-{
-    char c;
-
-    /* Skip whitespace and invalid characters. Let's see if being fault-tolerant
-     * is better than erroring out here.*/
-    while ((decode64[(size_t)(**bp)] == NA) && ((*bp) < lastPtr)) {
-	(*bp)++;
-    }
-    c = ((*bp) < lastPtr) ? **bp : 0;
-    if ((c != '\0') && (c != '=')) {
-	(*bp)++;
-    }
-    return c;				/* Valid symbol */
-}
-
-unsigned char *
-Blt_Base64_Decode(Tcl_Interp *interp, const char *string, size_t *lengthPtr)
-{
-    size_t nBytes;
-    unsigned char *bp;
-    unsigned char *buffer;
-    const unsigned char *p, *pend;
-    nBytes = *lengthPtr;
-
-    /* 
-     * Assuming that the string contains no padding or whitespace, allocate a
-     * buffer with a worst-case length.
-     */
-    nBytes = ((nBytes + 1) * 3)  / 4; 
-    buffer = Blt_Malloc(nBytes);
-    if (buffer == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Blt_Itoa(nBytes), 
-			 " for buffer", (char *)NULL);
-	return NULL;
-    }
-    bp = buffer;
-    for (p = (unsigned char *)string, pend = p + *lengthPtr; p < pend; 
-	 /*empty*/) {
-	unsigned char a, b, c, d;
-	unsigned int u1, u2, u3;
-
-	a = NextChar(&p, pend);
-	b = NextChar(&p, pend);
-	c = NextChar(&p, pend);
-	d = NextChar(&p, pend);
-
-	if (d == '\0') {
-	    if (a != '\0') {
-		Tcl_AppendResult(interp, "premature end of base64 data",
-			(char *)NULL);
-		Blt_Free(buffer);
-		return NULL;
-	    }
-	    break;
-        }
-
-	/*
-	 * in:     a      b      c     d
-	 *       ------.......-------......
-	 *      |54321054|32105432|10543210|
-	 * out:    u1       u2       u3
-	 */
-
-	/* a = [543210xx] | [xxxxxx54] >> 4 */
-	u1 = (decode64[a] << 2) | ((decode64[b] & 0x30) >> 4);
-	/* b = [3210xxxx] | [xxxx5432]  */
-	u2 = ((decode64[b] & 0x0F) << 4) |((decode64[c] & 0x3C) >> 2);
-	/* c = [10xxxxxx] | [xx543210]  */
-	u3 = ((decode64[c] & 0x03) << 6) | decode64[d];
-
-	if (d == '=') {
-	    if ((a == '=') || (b == '=')) {
-		break;			/* This should not be possible. */
-	    }
-	    if (c == '=') {
-		*bp++ = (unsigned char)u1;
-	    } else {
-		*bp++ = (unsigned char)u1;
-		*bp++ = (unsigned char)u2;
-	    }
-	    break;
-	}
-	bp[0] = (unsigned char)u1;
-	bp[1] = (unsigned char)u2;
-	bp[2] = (unsigned char)u3;
-	bp += 3;
-    }
-    nBytes = bp - buffer;
-    /* Reset the fill point to the number of bytes processed. */
-    *lengthPtr = nBytes;
-    return buffer;
-}
-
-char *
-Blt_Base64_Encode(Tcl_Interp *interp, const unsigned char *buffer, 
-		  size_t bufsize) 
-{
-    char *dest, *dp;
-    int count, remainder;
-    size_t length;
-    const unsigned char *sp, *send;
-
-    /* Compute worst-case length. */
-    length = (((bufsize + 1) * 4) + 2) / 3; 
-    length += (length + 59) / 60;	/* Add space for newlines. */
-    length++;				/* NUL byte */
-
-    dest = Blt_Malloc(sizeof(char) * length);
-    if (dest == NULL) {
-	Tcl_AppendResult(interp, "can't allocate \"", Blt_Itoa(length), 
-		"\" bytes for buffer", (char *)NULL);
-	return NULL;
-    }
-    count = 0;
-    remainder = bufsize % 3;
-    send = buffer + (bufsize - remainder);
-    dp = dest;
-    for (sp = buffer; sp < send; sp += 3) {
-	int a, b, c, d;
-
-	/*
-	 * in:        0        1        2
-	 *       |76543210|76543210|76543210|
-	 *        ------.......-------......
-	 * out:     a      b      c     d
-	 */
-	/* a = [xx765432] */
-	a = sp[0] >> 2;
-	/* b = [xx10xxxx] | [xxxx7654]  */
-	b = ((sp[0] & 0x03) << 4) | ((sp[1] & 0xF0) >> 4);
-	/* c = [xx3210xx] | [xxxxxx76]  */
-	c = ((sp[1] & 0x0F) << 2) | ((sp[2] & 0xC0) >> 6);
-	/* d = [xx543210]  */
-	d = (sp[2] & 0x3F);
-
-	dp[0] = encode64[a];
-	dp[1] = encode64[b];
-	dp[2] = encode64[c];
-	dp[3] = encode64[d];
-
-	dp += 4;
-	count += 4;
-	if (count > 60) {
-	    *dp++ = '\n';
-	    count = 0;
-	}
-    }
-
-    if (remainder > 0) {
-	int a, b, c;
-
-	/* 
-	 * Handle the two cases where the input buffer doesn't end on a 3-byte
-	 * boundary.
-	 */
-	if (remainder == 2) {
-	    a = sp[0] >> 2;
-	    b = ((sp[0] & 0x03) << 4) | ((sp[1] & 0xF0) >> 4);
-	    c = ((sp[1] & 0x0F) << 2);
-	    dp[0] = encode64[a];
-	    dp[1] = encode64[b];
-	    dp[2] = encode64[c];
-	    dp[3] = '=';
-	} else if (remainder == 1) {
-	    a = sp[0] >> 2;
-	    b = ((sp[0] & 0x03) << 4);
-	    dp[0] = encode64[a];
-	    dp[1] = encode64[b];
-	    dp[2] = dp[3] = '=';
-	}
-	dp += 4;
-	count += 4;
-	if (count > 60) {
-	    *dp++ = '\n';
-	}
-    }
-    assert((size_t)(dp - dest) < length);
-    *dp = '\0';
-    return dest;
-}
-
-
-
-/*ARGSUSED*/
-static int
-Base64Cmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    int option;
-    static const char *args[] = {
-	"decode", "encode",  NULL,
-    };
-
-    if (objc != 3) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), "encode|decode bytes\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIndexFromObj(interp, objv[1], args, "qualifier", TCL_EXACT,
-	    &option) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switch (option) {
-    case 0:				/* decode */
-	{
-	    int length;
-	    size_t nBytes;		/* # bytes in decoded string. */
-	    unsigned char *bp;
-	    const char *in;
-
-	    in = Tcl_GetStringFromObj(objv[2], &length);
-	    nBytes = (size_t)length;
-	    bp = Blt_Base64_Decode(interp, in, &nBytes); 
-	    if (bp == NULL) {
-		return TCL_ERROR;
-	    }
-	    Tcl_SetByteArrayObj(Tcl_GetObjResult(interp), bp, nBytes);
-	}
-	break;
-    case 1:				/* encode */
-	{
-	    int length;
-	    unsigned char *bp;
-	    const char *out;
-
-	    bp = Tcl_GetByteArrayFromObj(objv[2], &length);
-	    out = Blt_Base64_Encode(interp, bp, length);
-	    if (out == NULL) {
-		return TCL_ERROR;
-	    }
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), out, -1);
-	}
-	break;
-    default:
-	Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]), 
-			 "\": should be encode or decode", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Base64CmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "base64", Base64Cmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
diff --git a/blt3.0/src/bltBeep.c b/blt3.0/src/bltBeep.c
deleted file mode 100644
index 432706f..0000000
--- a/blt3.0/src/bltBeep.c
+++ /dev/null
@@ -1,90 +0,0 @@
-
-/*
- * bltBeep.c --
- *
- *	Copyright 1993-2003 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_BEEP
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BeepCmd --
- *
- *	This procedure is invoked to process the "beep" command.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static Tcl_ObjCmdProc BeepCmd;
-
-/* ARGSUSED */
-static int
-BeepCmd(
-    ClientData clientData,	/* Main window associated with interpreter.*/
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    int percent;
-
-    if (objc > 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-		 Tcl_GetString(objv[0]), " ?volumePercent?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    percent = 50;		/* Default setting */
-    if (objc == 2) {
-	if (Tcl_GetIntFromObj(interp, objv[1], &percent) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (percent < -100) {
-	    percent = -100;
-	} else if (percent > 100) {
-	    percent = 100;
-	}
-    }
-    XBell(Tk_Display(Tk_MainWindow(interp)), percent);
-    return TCL_OK;
-}
-
-int
-Blt_BeepCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "beep", BeepCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_BEEP */
diff --git a/blt3.0/src/bltBgStyle.c b/blt3.0/src/bltBgStyle.c
deleted file mode 100644
index 76c1876..0000000
--- a/blt3.0/src/bltBgStyle.c
+++ /dev/null
@@ -1,3244 +0,0 @@
-
-/*
- * bltBgPattern.c --
- *
- * This module creates background patterns for the BLT toolkit.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltChain.h"
-#include "bltHash.h"
-#include "bltImage.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include "bltBgStyle.h"
-
-#define BG_PATTERN_THREAD_KEY	"BLT Background Pattern Data"
-
-/* 
-   bgpattern create pattern 
-	-image $image
-	-color $color
-	-darkcolor $color
-	-lightcolor $color
-	-resamplefilter $filter
-	-opacity $alpha
-	-xorigin $x
-	-yorigin $y
-	-tile yes
-	-center yes
-	-scale no
-	-relativeto self|toplevel|window
-	-mask image|bitmap
-
-  bgpattern create tile 
-	-relativeto self|toplevel|window
-	-image $image
-	-bg $color
-  bgpattern create picture 
-        -image $image
-	-filter $filterName
-	-bg $color
-  bgpattern create gradient 
-	-type radial|xlinear|ylinear|diagonal
-	-low $color
-	-high $color
-	-bg $color
-  bgpattern create border 
-	-bg $color
-	-alpha $color 
-
-  bgpattern create texture -type metal|wind|??? 
-	-bg $color
-
-  bgpattern names
-  bgpattern configure $tile
-  bgpattern delete $tile
-*/
-
-
-enum PatternTypes {
-    PATTERN_GRADIENT,			/* Color gradient. */
-    PATTERN_TILE,			/* Tiled or resizable color picture. */
-    PATTERN_SOLID,			/* General pattern. */
-    PATTERN_TEXTURE,			/* Procedural texture. */
-};
-
-
-static const char *patternTypes[] = {
-    "gradient",
-    "tile",
-    "solid",
-    "texture"
-};
-
-enum ReferenceTypes {
-    REFERENCE_SELF,			/* Current window. */
-    REFERENCE_TOPLEVEL,			/* Toplevel of current window. */
-    REFERENCE_WINDOW,			/* Specifically named window. */
-    REFERENCE_NONE,		        /* Don't use reference
-					 * window. Background region will be
-					 * defined by user. */
-};
-
-typedef struct {
-    int x, y;
-    unsigned int w, h;
-    Tk_Window tkwin;
-} Reference;
-
-typedef struct {
-    int x, y, width, height;
-} BgRegion;
-
-typedef struct {
-    Blt_HashTable patternTable;		/* Hash table of pattern structures
-					 * keyed by the name of the image. */
-    Tcl_Interp *interp;			/* Interpreter associated with this set
-					 * of background patterns. */
-    int nextId;				/* Serial number of the identifier to be
-					 * used for next background pattern
-					 * created.  */
-} BackgroundInterpData;
-
-typedef struct _Pattern Pattern;
-
-typedef void (DestroyPatternProc)(Pattern *patternPtr);
-typedef int (ConfigurePatternProc)(Tcl_Interp *interp, Pattern *patternPtr,
-	int objc, Tcl_Obj *const *objv, unsigned int flags);
-typedef void (DrawRectangleProc)(Tk_Window tkwin, Drawable drawable, 
-	Pattern *patternPtr, int x, int y, int w, int h);
-typedef void (DrawPolygonProc)(Tk_Window tkwin, Drawable drawable, 
-	Pattern *patternPtr, int nPoints, XPoint *points);
-
-typedef struct {
-    enum PatternTypes type;		/* Type of pattern style: solid, tile,
-					 * texture, or gradient. */
-    Blt_ConfigSpec *configSpecs;
-    DestroyPatternProc *destroyProc;
-    ConfigurePatternProc *configProc;
-    DrawRectangleProc *drawRectangleProc;
-    DrawPolygonProc *drawPolygonProc;
-} PatternClass;
-
-
-struct _Pattern {
-    const char *name;			/* Generated name of background
-					 * pattern. */
-    PatternClass *classPtr;
-    BackgroundInterpData *dataPtr;
-    Tk_Window tkwin;			/* Main window. Used to query background
-					 * pattern options. */
-    Display *display;			/* Display of this background
-					 * pattern. */
-    unsigned int flags;			/* See definitions below. */
-    Blt_HashEntry *hashPtr;		/* Hash entry in pattern table. */
-    Blt_Chain chain;			/* List of pattern tokens.  Used to
-					 * register callbacks for each client of
-					 * the background pattern. */
-    Blt_ChainLink link;			/* Background token that is associated
-					 * with the pattern creation "bgpattern
-					 * create...". */
-    Tk_3DBorder border;			/* 3D Border.  May be used for all
-					 * background types. */
-    Tk_Window refWindow;		/* Refer to coordinates in this window
-					 * when determining the tile/gradient
-					 * origin. */
-    BgRegion refRegion;
-    Blt_HashTable pictTable;		/* Table of pictures cached for each
-					 * pattern reference. */
-    int reference;			/* "self", "toplevel", or "window". */
-    int xOrigin, yOrigin;
-};
-
-typedef struct {
-    const char *name;			/* Generated name of background
-					 * pattern. */
-    PatternClass *classPtr;
-    BackgroundInterpData *dataPtr;
-    Tk_Window tkwin;			/* Main window. Used to query background
-					 * pattern options. */
-    Display *display;			/* Display of this background
-					 * pattern. */
-    unsigned int flags;			/* See definitions below. */
-    Blt_HashEntry *hashPtr;		/* Link to original client. */
-    Blt_Chain chain;			/* List of pattern tokens.  Used to
-					 * register callbacks for each client of
-					 * the background pattern. */
-    Blt_ChainLink link;			/* Background token that is associated
-					 * with the pattern creation "bgpattern
-					 * create...". */
-    Tk_3DBorder border;			/* 3D Border.  May be used for all
-					 * pattern types. */
-    Tk_Window refWindow;		/* Refer to coordinates in this window
-					 * when determining the tile/gradient
-					 * origin. */
-    BgRegion refRegion;
-    Blt_HashTable pictTable;		/* Table of pictures cached for each
-					 * pattern reference. */
-    int reference;			/* "self", "toplevel", or "window". */
-    int xOrigin, yOrigin;
-
-    /* Solid pattern specific fields. */
-    int alpha;				/* Transparency value. */
-} SolidPattern;
-
-typedef struct {
-    const char *name;			/* Generated name of background
-					 * pattern. */
-    PatternClass *classPtr;
-    BackgroundInterpData *dataPtr;
-    Tk_Window tkwin;			/* Main window. Used to query background
-					 * pattern options. */
-    Display *display;			/* Display of this background
-					 * pattern. */
-    unsigned int flags;			/* See definitions below. */
-    Blt_HashEntry *hashPtr;		/* Link to original client. */
-    Blt_Chain chain;			/* List of pattern tokens.  Used to
-					 * register callbacks for each client of
-					 * the background pattern. */
-    Blt_ChainLink link;			/* Background token that is associated
-					 * with the pattern creation "bgpattern
-					 * create...". */
-    Tk_3DBorder border;			/* 3D Border.  May be used for all
-					 * pattern types. */
-    Tk_Window refWindow;		/* Refer to coordinates in this window
-					 * when determining the tile/gradient
-					 * origin. */
-    BgRegion refRegion;
-    Blt_HashTable pictTable;		/* Table of pictures cached for each
-					 * pattern reference. */
-    int reference;			/* "self", "toplevel", or "window". */
-    int xOrigin, yOrigin;
-    /* Image pattern specific fields. */
-    Tk_Image tkImage;			/* Original image (before
-					 * resampling). */
-    Blt_ResampleFilter filter;		/* 1-D image filter to use to when
-					 * resizing the original picture. */
-} TilePattern;
-
-typedef struct {
-    const char *name;			/* Generated name of background
-					 * pattern. */
-    PatternClass *classPtr;
-    BackgroundInterpData *dataPtr;
-    Tk_Window tkwin;			/* Main window. Used to query background
-					 * pattern options. */
-    Display *display;			/* Display of this background
-					 * pattern. */
-    unsigned int flags;			/* See definitions below. */
-    Blt_HashEntry *hashPtr;		/* Link to original client. */
-    Blt_Chain chain;			/* List of pattern tokens.  Used to
-					 * register callbacks for each client of
-					 * the background pattern. */
-    Blt_ChainLink link;			/* Background token that is associated
-					 * with the pattern creation "bgpattern
-					 * create...". */
-    Tk_3DBorder border;			/* 3D Border.  May be used for all
-					 * pattern types. */
-    Tk_Window refWindow;		/* Refer to coordinates in this window
-					 * when determining the tile/gradient
-					 * origin. */
-    BgRegion refRegion;
-    Blt_HashTable pictTable;		/* Table of pictures cached for each
-					 * pattern reference. */
-    int reference;			/* "self", "toplevel", or "window". */
-    int xOrigin, yOrigin;
-    /* Gradient pattern specific fields. */
-    Blt_Gradient gradient;
-    Blt_Pixel low, high;		/* Texture or gradient colors. */
-    int alpha;				/* Transparency value. */
-} GradientPattern;
-
-typedef struct {
-    const char *name;			/* Generated name of background
-					 * pattern. */
-    PatternClass *classPtr;
-    BackgroundInterpData *dataPtr;
-    Tk_Window tkwin;			/* Main window. Used to query background
-					 * pattern options. */
-    Display *display;			/* Display of this background
-					 * pattern. */
-    unsigned int flags;			/* See definitions below. */
-    Blt_HashEntry *hashPtr;		/* Link to original client. */
-    Blt_Chain chain;			/* List of pattern tokens.  Used to
-					 * register callbacks for each client of
-					 * the background pattern. */
-    Blt_ChainLink link;			/* Background token that is associated
-					 * with the pattern creation "bgpattern
-					 * create...". */
-    Tk_3DBorder border;			/* 3D Border.  May be used for all
-					 * pattern types. */
-    Tk_Window refWindow;		/* Refer to coordinates in this window
-					 * when determining the tile/gradient
-					 * origin. */
-    BgRegion refRegion;
-    Blt_HashTable pictTable;		/* Table of pictures cached for each
-					 * pattern reference. */
-    int reference;			/* "self", "toplevel", or "window". */
-    int xOrigin, yOrigin;
-
-    /* Texture pattern specific fields. */
-    Blt_Pixel low, high;		/* Texture colors. */
-    int alpha;				/* Transparency value. */
-} TexturePattern;
-
-struct _Blt_Background {
-    Pattern *corePtr;			/* Pointer to master background pattern
-					 * object. */
-    Blt_BackgroundChangedProc *notifyProc;
-    ClientData clientData;		/* Data to be passed on notifier
-					 * callbacks.  */
-    Blt_ChainLink link;			/* Entry in notifier list. */
-};
-
-#define DELETE_PENDING		(1<<0)
-#define BG_CENTER		(1<<2)
-#define BG_SCALE		(1<<3)
-
-typedef struct _Blt_Background Background;
-
-#define DEF_OPACITY		"100.0"
-#define DEF_ORIGIN_X		"0"
-#define DEF_ORIGIN_Y		"0"
-#define DEF_BORDER		STD_NORMAL_BACKGROUND
-#define DEF_GRADIENT_PATH	"y"
-#define DEF_GRADIENT_HIGH	"grey90"
-#define DEF_GRADIENT_JITTER	"no"
-#define DEF_GRADIENT_LOGSCALE	"yes"
-#define DEF_GRADIENT_LOW	"grey50"
-#define DEF_GRADIENT_MODE	"xlinear"
-#define DEF_GRADIENT_SHAPE	"linear"
-#define DEF_REFERENCE		"toplevel"
-#define DEF_RESAMPLE_FILTER	"box"
-#define DEF_SCALE		"no"
-#define DEF_CENTER		"no"
-#define DEF_TILE		"no"
-
-static Blt_OptionParseProc ObjToImageProc;
-static Blt_OptionPrintProc ImageToObjProc;
-static Blt_OptionFreeProc FreeImageProc;
-static Blt_CustomOption imageOption =
-{
-    ObjToImageProc, ImageToObjProc, FreeImageProc, (ClientData)0
-};
-
-extern Blt_CustomOption bltFilterOption;
-
-static Blt_OptionParseProc ObjToReferenceProc;
-static Blt_OptionPrintProc ReferenceToObjProc;
-static Blt_CustomOption referenceToOption =
-{
-    ObjToReferenceProc, ReferenceToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToShapeProc;
-static Blt_OptionPrintProc ShapeToObjProc;
-static Blt_CustomOption shapeOption =
-{
-    ObjToShapeProc, ShapeToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToPathProc;
-static Blt_OptionPrintProc PathToObjProc;
-static Blt_CustomOption pathOption =
-{
-    ObjToPathProc, PathToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToOpacityProc;
-static Blt_OptionPrintProc OpacityToObjProc;
-static Blt_CustomOption opacityOption =
-{
-    ObjToOpacityProc, OpacityToObjProc, NULL, (ClientData)0
-};
-
-static Blt_ConfigSpec solidConfigSpecs[] =
-{
-    {BLT_CONFIG_SYNONYM, "-background", "color", (char *)NULL, (char *)NULL, 
-        0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "color", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_BORDER, "-color", "color", "Color", DEF_BORDER, 
-	Blt_Offset(SolidPattern, border), 0},
-    {BLT_CONFIG_CUSTOM, "-opacity", "opacity", "Opacity", "100.0", 
-	Blt_Offset(SolidPattern, alpha), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&opacityOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec tileConfigSpecs[] =
-{
-    {BLT_CONFIG_BITMASK, "-center", "center", "Center", DEF_CENTER,
-        Blt_Offset(TilePattern, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)BG_CENTER},
-    {BLT_CONFIG_BORDER, "-color", "color", "Color", DEF_BORDER, 
-	Blt_Offset(TilePattern, border), 0},
-    {BLT_CONFIG_BORDER, "-darkcolor", "darkColor", "DarkColor", DEF_BORDER, 
-	Blt_Offset(TilePattern, border), 0},
-    {BLT_CONFIG_CUSTOM, "-filter", "filter", "Filter", DEF_RESAMPLE_FILTER, 
-	Blt_Offset(TilePattern, filter), 0, &bltFilterOption},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", (char *)NULL,
-        Blt_Offset(TilePattern, tkImage), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&imageOption},
-    {BLT_CONFIG_BORDER, "-lightcolor", "lightColor", "LightColor", DEF_BORDER, 
-	Blt_Offset(TilePattern, border), 0},
-    {BLT_CONFIG_CUSTOM, "-relativeto", "relativeTo", "RelativeTo", 
-	DEF_REFERENCE, Blt_Offset(TilePattern, reference), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &referenceToOption},
-    {BLT_CONFIG_BITMASK, "-scale", "scale", "scale", DEF_SCALE,
-        Blt_Offset(TilePattern, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)BG_SCALE},
-    {BLT_CONFIG_PIXELS, "-xorigin", "xOrigin", "XOrigin", DEF_ORIGIN_X,
-        Blt_Offset(TilePattern, xOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yorigin", "yOrigin", "YOrigin", DEF_ORIGIN_Y,
-        Blt_Offset(TilePattern, yOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec gradientConfigSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-background", "background", "Background", DEF_BORDER,
-	Blt_Offset(GradientPattern, border), 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-direction", "direction", "Direction", 
-	DEF_GRADIENT_PATH, Blt_Offset(GradientPattern, gradient.path), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &pathOption},
-    {BLT_CONFIG_PIX32, "-high", "high", "High", DEF_GRADIENT_HIGH,
-        Blt_Offset(GradientPattern, high), 0},
-    {BLT_CONFIG_BOOLEAN, "-jitter", "jitter", "Jitter", 
-	DEF_GRADIENT_JITTER, Blt_Offset(GradientPattern, gradient.jitter), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-logscale", "logscale", "Logscale", 
-	DEF_GRADIENT_LOGSCALE, Blt_Offset(GradientPattern,gradient.logScale),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIX32, "-low", "low", "Low", DEF_GRADIENT_LOW,
-        Blt_Offset(GradientPattern, low), 0},
-    {BLT_CONFIG_CUSTOM, "-opacity", "opacity", "Opacity", "100.0", 
-	Blt_Offset(GradientPattern, alpha), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&opacityOption},
-    {BLT_CONFIG_CUSTOM, "-relativeto", "relativeTo", "RelativeTo", 
-	DEF_REFERENCE, Blt_Offset(GradientPattern, reference), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &referenceToOption},
-    {BLT_CONFIG_CUSTOM, "-shape", "shape", "Shape", DEF_GRADIENT_SHAPE, 
-	Blt_Offset(GradientPattern, gradient.shape), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &shapeOption},
-    {BLT_CONFIG_PIXELS, "-xorigin", "xOrigin", "XOrigin", DEF_ORIGIN_X,
-        Blt_Offset(GradientPattern, xOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yorigin", "yOrigin", "YOrigin", DEF_ORIGIN_Y,
-        Blt_Offset(GradientPattern, yOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec textureConfigSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-background", "background", "Background", DEF_BORDER,
-	Blt_Offset(TexturePattern, border), 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIX32, "-high", "high", "High", DEF_GRADIENT_HIGH,
-        Blt_Offset(TexturePattern, high), 0},
-    {BLT_CONFIG_PIX32, "-low", "low", "Low", DEF_GRADIENT_LOW,
-        Blt_Offset(TexturePattern, low), 0},
-    {BLT_CONFIG_CUSTOM, "-relativeto", "relativeTo", "RelativeTo", 
-	DEF_REFERENCE, Blt_Offset(TexturePattern, reference), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &referenceToOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static void NotifyClients(Pattern *corePtr);
-
-static Blt_Picture
-ImageToPicture(TilePattern *patternPtr, int *isFreePtr)
-{
-    Blt_Picture picture;
-
-    picture = NULL;
-    *isFreePtr = FALSE;
-    if (Blt_IsPicture(patternPtr->tkImage)) {
-	picture = Blt_GetPictureFromImage(patternPtr->tkImage);
-    } else {
-	Tk_PhotoHandle photo;
-
-	photo = Tk_FindPhoto(patternPtr->dataPtr->interp, 
-			     Blt_Image_Name(patternPtr->tkImage));
-	if (photo != NULL) {
-	    picture = Blt_PhotoToPicture(photo);
-	    *isFreePtr = TRUE;
-	}
-    }
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y, int width, int height, /* Not used. */
-    int imageWidth, int imageHeight)	 /* Not used. */
-{
-    Pattern *corePtr = clientData;
-
-    /* Propagate the change in the image to all the clients. */
-    NotifyClients(corePtr);
-}
-
-/*ARGSUSED*/
-static void
-FreeImageProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    TilePattern *patternPtr = (TilePattern *)(widgRec);
-
-    if (patternPtr->tkImage != NULL) {
-	Tk_FreeImage(patternPtr->tkImage);
-	patternPtr->tkImage = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToImageProc --
- *
- *	Given an image name, get the Tk image associated with it.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToImageProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TilePattern *patternPtr = (TilePattern *)(widgRec);
-    Tk_Image tkImage;
-
-    tkImage = Tk_GetImage(interp, patternPtr->tkwin, Tcl_GetString(objPtr), 
-	ImageChangedProc, patternPtr);
-    if (tkImage == NULL) {
-	return TCL_ERROR;
-    }
-    patternPtr->tkImage = tkImage;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageToObjProc --
- *
- *	Convert the image name into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the image is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ImageToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TilePattern *patternPtr = (TilePattern *)(widgRec);
-
-    if (patternPtr->tkImage == NULL) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(Blt_Image_Name(patternPtr->tkImage), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToReference --
- *
- *	Given a string name, get the resample filter associated with it.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToReferenceProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Pattern *patternPtr = (Pattern *)(widgRec);
-    int *referencePtr = (int *)(widgRec + offset);
-    const char *string;
-    char c;
-    int refType;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 's') && (strncmp(string, "self", length) == 0)) {
-	refType = REFERENCE_SELF;
-    } else if ((c == 't') && (strncmp(string, "toplevel", length) == 0)) {
-	refType = REFERENCE_TOPLEVEL;
-    } else if ((c == 'n') && (strncmp(string, "none", length) == 0)) {
-	refType = REFERENCE_NONE;
-    } else if (c == '.') {
-	Tk_Window tkwin, tkMain;
-
-	tkMain = Tk_MainWindow(interp);
-	tkwin = Tk_NameToWindow(interp, string, tkMain);
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	refType = REFERENCE_WINDOW;
-	patternPtr->refWindow = tkwin;
-    } else {
-	Tcl_AppendResult(interp, "unknown reference type \"", string, "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    *referencePtr = refType;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReferenceToObjProc --
- *
- *	Convert the picture filter into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the filter is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ReferenceToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int reference = *(int *)(widgRec + offset);
-    const char *string;
-
-    switch (reference) {
-    case REFERENCE_SELF:
-	string = "self";
-	break;
-
-    case REFERENCE_TOPLEVEL:
-	string = "toplevel";
-	break;
-
-    case REFERENCE_NONE:
-	string = "none";
-	break;
-
-    case REFERENCE_WINDOW:
-	{
-	    Pattern *patternPtr = (Pattern *)(widgRec);
-
-	    string = Tk_PathName(patternPtr->refWindow);
-	}
-	break;
-
-    default:
-	string = "???";
-	break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToShapeProc --
- *
- *	Translate the given string to the gradient shape is represents.  Value
- *	shapes are "linear", "bilinear", "radial", and "rectangular".
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToShapeProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_GradientShape *shapePtr = (Blt_GradientShape *)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "linear") == 0) {
-	*shapePtr = BLT_GRADIENT_SHAPE_LINEAR;
-    } else if (strcmp(string, "bilinear") == 0) {
-	*shapePtr = BLT_GRADIENT_SHAPE_BILINEAR;
-    } else if (strcmp(string, "radial") == 0) {
-	*shapePtr = BLT_GRADIENT_SHAPE_RADIAL;
-    } else if (strcmp(string, "rectangular") == 0) {
-	*shapePtr = BLT_GRADIENT_SHAPE_RECTANGULAR;
-    } else {
-	Tcl_AppendResult(interp, "unknown gradient type \"", string, "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShapeToObjProc --
- *
- *	Returns the string representing the current gradiant shape.
- *
- * Results:
- *	The string representation of the shape is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ShapeToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_GradientShape shape = *(Blt_GradientShape *)(widgRec + offset);
-    const char *string;
-    
-    switch (shape) {
-    case BLT_GRADIENT_SHAPE_LINEAR:
-	string = "linear";
-	break;
-
-    case BLT_GRADIENT_SHAPE_BILINEAR:
-	string = "bilinear";
-	break;
-
-    case BLT_GRADIENT_SHAPE_RADIAL:
-	string = "radial";
-	break;
-
-    case BLT_GRADIENT_SHAPE_RECTANGULAR:
-	string = "rectangular";
-	break;
-
-    default:
-	string = "???";
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPathProc --
- *
- *	Translates the given string to the gradient path it represents.  Valid
- *	paths are "x", "y", "xy", and "yx".
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPathProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_GradientPath *pathPtr = (Blt_GradientPath *)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "x") == 0) {
-	*pathPtr = BLT_GRADIENT_PATH_X;
-    } else if (strcmp(string, "y") == 0) {
-	*pathPtr = BLT_GRADIENT_PATH_Y;
-    } else if (strcmp(string, "xy") == 0) {
-	*pathPtr = BLT_GRADIENT_PATH_XY;
-    } else if (strcmp(string, "yx") == 0) {
-	*pathPtr = BLT_GRADIENT_PATH_YX;
-    } else {
-	Tcl_AppendResult(interp, "unknown gradient path \"", string, "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PathToObjProc --
- *
- *	Convert the picture filter into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the filter is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PathToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_GradientPath path = *(Blt_GradientPath *)(widgRec + offset);
-    const char *string;
-
-    switch (path) {
-    case BLT_GRADIENT_PATH_X:
-	string = "x";
-	break;
-
-    case BLT_GRADIENT_PATH_Y:
-	string = "y";
-	break;
-
-    case BLT_GRADIENT_PATH_XY:
-	string = "xy";
-	break;
-
-    case BLT_GRADIENT_PATH_YX:
-	string = "yx";
-	break;
-
-    default:
-	string = "?? unknown path ??";
-	break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToOpacity --
- *
- *	Given a string name, get the resample filter associated with it.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToOpacityProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int *alphaPtr = (int *)(widgRec + offset);
-    double opacity;
-
-    if (Tcl_GetDoubleFromObj(interp, objPtr, &opacity) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((opacity < 0.0) || (opacity > 100.0)) {
-	Tcl_AppendResult(interp, "invalid percent opacity \"", 
-		Tcl_GetString(objPtr), "\" should be 0 to 100", (char *)NULL);
-	return TCL_ERROR;
-    }
-    opacity = (opacity / 100.0) * 255.0;
-    *alphaPtr = ROUND(opacity);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpacityToObj --
- *
- *	Convert the picture filter into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the filter is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-OpacityToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int *alphaPtr = (int *)(widgRec + offset);
-    double opacity;
-
-    opacity = (*alphaPtr / 255.0) * 100.0;
-    return Tcl_NewDoubleObj(opacity);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyClients --
- *
- *	Notify each client that the background pattern has changed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-NotifyClients(Pattern *patternPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(patternPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Background *bgPtr;
-
-	/* Notify each client that the background pattern has changed. The
-	 * client should schedule itself for redrawing.  */
-	bgPtr = Blt_Chain_GetValue(link);
-	if (bgPtr->notifyProc != NULL) {
-	    (*bgPtr->notifyProc)(bgPtr->clientData);
-	}
-    }
-}
-
-static const char *
-NameOfPattern(Pattern *patternPtr) 
-{
-    return patternTypes[patternPtr->classPtr->type];
-}
-
-static int 
-GetPatternTypeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *typePtr)
-{
-    const char *string;
-    char c;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 't') && (length > 1) && (strncmp(string, "tile", length) == 0)) {
-	*typePtr = PATTERN_TILE;
-    } else if ((c == 'g') && (strncmp(string, "gradient", length) == 0)) {
-	*typePtr = PATTERN_GRADIENT;
-    } else if ((c == 's') && (strncmp(string, "solid", length) == 0)) {
-	*typePtr = PATTERN_SOLID;
-    } else if ((c == 't') && (length > 1)  &&
-	       (strncmp(string, "texture", length) == 0)) {
-	*typePtr = PATTERN_TEXTURE;
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown background pattern \"", string, 
-		"\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-ClearCache(Pattern *corePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&corePtr->pictTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_Picture picture;
-
-	picture = Blt_GetHashValue(hPtr);
-	Blt_FreePicture(picture);
-    }
-}
-
-static void 
-GetTileOffsets(Tk_Window tkwin, Pattern *patternPtr, Blt_Picture picture, 
-	       int x, int y, int *xOffsetPtr, int *yOffsetPtr)
-{
-    int dx, dy;
-    int x0, y0;
-    int tw, th;
-    Tk_Window refWindow;
-
-    if (patternPtr->reference == REFERENCE_SELF) {
-	refWindow = tkwin;
-    } else if (patternPtr->reference == REFERENCE_TOPLEVEL) {
-	refWindow = Blt_Toplevel(tkwin);
-    } else if (patternPtr->reference == REFERENCE_WINDOW) {
-	refWindow = patternPtr->refWindow;
-    } else if (patternPtr->reference == REFERENCE_NONE) {
-	refWindow = NULL;
-    } else {
-	return;		/* Unknown reference window. */
-    }
-    if ((patternPtr->reference == REFERENCE_WINDOW) ||
-	(patternPtr->reference == REFERENCE_TOPLEVEL)) {
-	Tk_Window tkwin2;
-	
-	tkwin2 = tkwin;
-	while ((tkwin2 != refWindow) && (tkwin2 != NULL)) {
-	    x += Tk_X(tkwin2) + Tk_Changes(tkwin2)->border_width;
-	    y += Tk_Y(tkwin2) + Tk_Changes(tkwin2)->border_width;
-	    tkwin2 = Tk_Parent(tkwin2);
-	}
-	if (tkwin2 == NULL) {
-	    /* 
-	     * The window associated with the background pattern isn't an
-	     * ancestor of the current window. That means we can't use the
-	     * reference window as a guide to the size of the picture.  Simply
-	     * convert to a self reference.
-	     */
-	    patternPtr->reference = REFERENCE_SELF;
-	    refWindow = tkwin;
-	    abort();
-	}
-    }
-
-    x0 = patternPtr->xOrigin;
-    y0 = patternPtr->yOrigin;
-    tw = Blt_PictureWidth(picture);
-    th = Blt_PictureHeight(picture);
-
-    /* Compute the starting x and y offsets of the tile/gradient from the
-     * coordinates of the origin. */
-    dx = (x0 - x) % tw;
-    if (dx > 0) {
-	dx = (tw - dx);
-    } else if (dx < 0) {
-	dx = x - x0;
-    } 
-    dy = (y0 - y) % th;
-    if (dy > 0) {
-	dy = (th - dy);
-    } else if (dy < 0) {
-	dy = y - y0;
-    }
-    *xOffsetPtr = dx % tw;
-    *yOffsetPtr = dy % th;
-#ifdef notdef
-    fprintf(stderr, "Tile offsets x0=%d y0=%d x=%d,y=%d sx=%d,sy=%d\n",
-	    x0, y0, x, y, *xOffsetPtr, *yOffsetPtr);
-#endif
-}
-
-
-static void
-Tile(
-    Tk_Window tkwin,
-    Drawable drawable,
-    Pattern *patternPtr,
-    Blt_Picture picture,		/* Picture used as the tile. */
-    int x, int y, int w, int h)		/* Region of destination picture to be
-					 * tiled. */
-{
-    Blt_Painter painter;
-    int xOffset, yOffset;		/* Starting upper left corner of
-					 * region. */
-    int tileWidth, tileHeight;		/* Tile dimensions. */
-    int right, bottom, left, top;
-
-    tileWidth = Blt_PictureWidth(picture);
-    tileHeight = Blt_PictureHeight(picture);
-    GetTileOffsets(tkwin, patternPtr, picture, x, y, &xOffset, &yOffset);
-
-#ifdef notdef
-    fprintf(stderr, "tile is (xo=%d,yo=%d,tw=%d,th=%d)\n", 
-	patternPtr->xOrigin, patternPtr->yOrigin, tileWidth, tileHeight);
-    fprintf(stderr, "region is (x=%d,y=%d,w=%d,h=%d)\n", x, y, w, h);
-    fprintf(stderr, "starting offsets at sx=%d,sy=%d\n", xOffset, yOffset);
-#endif
-
-    left = x;
-    top = y;
-    right = x + w;
-    bottom = y + h;
-    
-    painter = Blt_GetPainter(tkwin, 1.0);
-    for (y = (top - yOffset); y < bottom; y += tileHeight) {
-	int sy, dy, ih;
-
-	if (y < top) {
-	    dy = top;
-	    ih = MIN(tileHeight - yOffset, bottom - top);
-	    sy = yOffset;
-	} else {
-	    dy = y;
-	    ih = MIN(tileHeight, bottom - y);
-	    sy = 0;
-	}
-
-	for (x = (left - xOffset); x < right; x += tileWidth) {
-	    int sx, dx, iw;	
-
-	    if (x < left) {
-		dx = left;
-		iw = MIN(tileWidth - xOffset, right - left);
-		sx = xOffset;
-	    } else {
-		dx = x;
-		iw = MIN(tileWidth, right - x);
-		sx = 0;
-	    }
-
-	    Blt_PaintPicture(painter, drawable, picture, sx, sy, iw, ih, 
-			     dx, dy, /*flags*/0);
-#ifdef notdef
-	    fprintf(stderr, "drawing pattern (sx=%d,sy=%d,iw=%d,ih=%d) at dx=%d,dy=%d\n",
-		    sx, sy, iw, ih, dx, dy);
-#endif
-	}
-    }
-}
-
-static void
-GetPolygonBBox(XPoint *points, int n, int *leftPtr, int *rightPtr, int *topPtr, 
-	       int *bottomPtr)
-{
-    XPoint *p, *pend;
-    int left, right, bottom, top;
-
-    /* Determine the bounding box of the polygon. */
-    left = right = points[0].x;
-    top = bottom = points[0].y;
-    for (p = points, pend = p + n; p < pend; p++) {
-	if (p->x < left) {
-	    left = p->x;
-	} 
-	if (p->x > right) {
-	    right = p->x;
-	}
-	if (p->y < top) {
-	    top = p->y;
-	} 
-	if (p->y > bottom) {
-	    bottom = p->y;
-	}
-    }
-    if (leftPtr != NULL) {
-	*leftPtr = left;
-    }
-    if (rightPtr != NULL) {
-	*rightPtr = right;
-    }
-    if (topPtr != NULL) {
-	*topPtr = top;
-    }
-    if (bottomPtr != NULL) {
-	*bottomPtr = bottom;
-    }
-}
-
-/* 
- * The following routines are directly from tk3d.c.  
- *
- *       tk3d.c --
- *
- *	This module provides procedures to draw borders in
- *	the three-dimensional Motif style.
- *
- *      Copyright (c) 1990-1994 The Regents of the University of California.
- *      Copyright (c) 1994-1997 Sun Microsystems, Inc.
- *
- *      See the file "license.terms" for information on usage and redistribution
- *      of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- *  They fix a problem in the Intersect procedure when the polygon is big (e.q
- *  1600x1200).  The computation overflows the 32-bit integers used.
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShiftLine --
- *
- *	Given two points on a line, compute a point on a new line that is
- *	parallel to the given line and a given distance away from it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ShiftLine(
-    XPoint *p,				/* First point on line. */
-    XPoint *q,				/* Second point on line. */
-    int distance,			/* New line is to be this many units
-					 * to the left of original line, when
-					 * looking from p1 to p2.  May be
-					 * negative. */
-    XPoint *r)				/* Store coords of point on new line
-					 * here. */
-{
-    int dx, dy, dxNeg, dyNeg;
-
-    /*
-     * The table below is used for a quick approximation in computing the new
-     * point.  An index into the table is 128 times the slope of the original
-     * line (the slope must always be between 0 and 1).  The value of the
-     * table entry is 128 times the amount to displace the new line in y for
-     * each unit of perpendicular distance.  In other words, the table maps
-     * from the tangent of an angle to the inverse of its cosine.  If the
-     * slope of the original line is greater than 1, then the displacement is
-     * done in x rather than in y.
-     */
-    static int shiftTable[129];
-
-    /*
-     * Initialize the table if this is the first time it is
-     * used.
-     */
-
-    if (shiftTable[0] == 0) {
-	int i;
-	double tangent, cosine;
-
-	for (i = 0; i <= 128; i++) {
-	    tangent = i/128.0;
-	    cosine = 128/cos(atan(tangent)) + .5;
-	    shiftTable[i] = (int) cosine;
-	}
-    }
-
-    *r = *p;
-    dx = q->x - p->x;
-    dy = q->y - p->y;
-    if (dy < 0) {
-	dyNeg = 1;
-	dy = -dy;
-    } else {
-	dyNeg = 0;
-    }
-    if (dx < 0) {
-	dxNeg = 1;
-	dx = -dx;
-    } else {
-	dxNeg = 0;
-    }
-    if (dy <= dx) {
-	dy = ((distance * shiftTable[(dy<<7)/dx]) + 64) >> 7;
-	if (!dxNeg) {
-	    dy = -dy;
-	}
-	r->y += dy;
-    } else {
-	dx = ((distance * shiftTable[(dx<<7)/dy]) + 64) >> 7;
-	if (dyNeg) {
-	    dx = -dx;
-	}
-	r->x += dx;
-    }
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Intersect --
- *
- *	Find the intersection point between two lines.
- *
- * Results:
- *	Under normal conditions 0 is returned and the point at *iPtr is filled
- *	in with the intersection between the two lines.  If the two lines are
- *	parallel, then -1 is returned and *iPtr isn't modified.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------------
- */
-static int
-Intersect(a1Ptr, a2Ptr, b1Ptr, b2Ptr, iPtr)
-    XPoint *a1Ptr;		/* First point of first line. */
-    XPoint *a2Ptr;		/* Second point of first line. */
-    XPoint *b1Ptr;		/* First point of second line. */
-    XPoint *b2Ptr;		/* Second point of second line. */
-    XPoint *iPtr;		/* Filled in with intersection point. */
-{
-    float dxadyb, dxbdya, dxadxb, dyadyb, p, q;
-
-    /*
-     * The code below is just a straightforward manipulation of two
-     * equations of the form y = (x-x1)*(y2-y1)/(x2-x1) + y1 to solve
-     * for the x-coordinate of intersection, then the y-coordinate.
-     */
-
-    dxadyb = (a2Ptr->x - a1Ptr->x)*(b2Ptr->y - b1Ptr->y);
-    dxbdya = (b2Ptr->x - b1Ptr->x)*(a2Ptr->y - a1Ptr->y);
-    dxadxb = (a2Ptr->x - a1Ptr->x)*(b2Ptr->x - b1Ptr->x);
-    dyadyb = (a2Ptr->y - a1Ptr->y)*(b2Ptr->y - b1Ptr->y);
-
-    if (dxadyb == dxbdya) {
-	return -1;
-    }
-    p = (a1Ptr->x*dxbdya - b1Ptr->x*dxadyb + (b1Ptr->y - a1Ptr->y)*dxadxb);
-    q = dxbdya - dxadyb;
-    if (q < 0) {
-	p = -p;
-	q = -q;
-    }
-    if (p < 0) {
-	iPtr->x = - ((-p + q/2)/q);
-    } else {
-	iPtr->x = (p + q/2)/q;
-    }
-    p = (a1Ptr->y*dxadyb - b1Ptr->y*dxbdya + (b1Ptr->x - a1Ptr->x)*dyadyb);
-    q = dxadyb - dxbdya;
-    if (q < 0) {
-	p = -p;
-	q = -q;
-    }
-    if (p < 0) {
-	iPtr->y = (int)(- ((-p + q/2)/q));
-    } else {
-	iPtr->y = (int)((p + q/2)/q);
-    }
-    return 0;
-}
-
-/*
- *--------------------------------------------------------------
- *
- * Draw3DPolygon --
- *
- *	Draw a border with 3-D appearance around the edge of a given polygon.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information is drawn in "drawable" in the form of a 3-D border
- *	borderWidth units width wide on the left of the trajectory given by
- *	pointPtr and n (or -borderWidth units wide on the right side,
- *	if borderWidth is negative).
- *
- *--------------------------------------------------------------
- */
-
-static void
-Draw3DPolygon(
-    Tk_Window tkwin,			/* Window for which border was
-					   allocated. */
-    Drawable drawable,			/* X window or pixmap in which to
-					 * draw. */
-    Tk_3DBorder border,			/* Token for border to draw. */
-    XPoint *points,			/* Array of points describing polygon.
-					 * All points must be absolute
-					 * (CoordModeOrigin). */
-    int n,				/* Number of points at *points. */
-    int borderWidth,			/* Width of border, measured in
-					 * pixels to the left of the polygon's
-					 * trajectory.   May be negative. */
-    int leftRelief)			/* TK_RELIEF_RAISED or
-					 * TK_RELIEF_SUNKEN: indicates how 
-					 * stuff to left of trajectory looks 
-					 * relative to stuff on right. */
-{
-    XPoint poly[4], b1, b2, newB1, newB2;
-    XPoint perp, c, shift1, shift2;	/* Used for handling parallel lines. */
-    XPoint *p, *q;
-    GC gc;
-    int i, lightOnLeft, dx, dy, parallel, pointsSeen;
-
-    /* Handle grooves and ridges with recursive calls. */
-    if ((leftRelief == TK_RELIEF_GROOVE) || (leftRelief == TK_RELIEF_RIDGE)) {
-	int halfWidth, relief;
-
-	halfWidth = borderWidth / 2;
-	relief = (leftRelief == TK_RELIEF_GROOVE) 
-	    ? TK_RELIEF_RAISED : TK_RELIEF_SUNKEN;
-	Draw3DPolygon(tkwin, drawable, border, points, n, halfWidth, relief);
-	Draw3DPolygon(tkwin, drawable, border, points, n, -halfWidth, relief);
-	return;
-    }
-    /*
-     * If the polygon is already closed, drop the last point from it
-     * (we'll close it automatically).
-     */
-    p = points + (n-1);
-    q = points;
-    if ((p->x == q->x) && (p->y == q->y)) {
-	n--;
-    }
-
-    /*
-     * The loop below is executed once for each vertex in the polgon.
-     * At the beginning of each iteration things look like this:
-     *
-     *          poly[1]       /
-     *             *        /
-     *             |      /
-     *             b1   * poly[0] (points[i-1])
-     *             |    |
-     *             |    |
-     *             |    |
-     *             |    |
-     *             |    |
-     *             |    | *p            *q
-     *             b2   *--------------------*
-     *             |
-     *             |
-     *             x-------------------------
-     *
-     * The job of this iteration is to do the following:
-     * (a) Compute x (the border corner corresponding to
-     *     points[i]) and put it in poly[2].  As part of
-     *	   this, compute a new b1 and b2 value for the next
-     *	   side of the polygon.
-     * (b) Put points[i] into poly[3].
-     * (c) Draw the polygon given by poly[0..3].
-     * (d) Advance poly[0], poly[1], b1, and b2 for the
-     *     next side of the polygon.
-     */
-
-    /*
-     * The above situation doesn't first come into existence until two points
-     * have been processed; the first two points are used to "prime the pump",
-     * so some parts of the processing are ommitted for these points.  The
-     * variable "pointsSeen" keeps track of the priming process; it has to be
-     * separate from i in order to be able to ignore duplicate points in the
-     * polygon.
-     */
-    pointsSeen = 0;
-    for (i = -2, p = points + (n-2), q = p+1; i < n; i++, p = q, q++) {
-	if ((i == -1) || (i == n-1)) {
-	    q = points;
-	}
-	if ((q->x == p->x) && (q->y == p->y)) {
-	    /*
-	     * Ignore duplicate points (they'd cause core dumps in
-	     * ShiftLine calls below).
-	     */
-	    continue;
-	}
-	ShiftLine(p, q, borderWidth, &newB1);
-	newB2.x = newB1.x + (q->x - p->x);
-	newB2.y = newB1.y + (q->y - p->y);
-	poly[3] = *p;
-	parallel = 0;
-	if (pointsSeen >= 1) {
-	    parallel = Intersect(&newB1, &newB2, &b1, &b2, &poly[2]);
-
-	    /*
-	     * If two consecutive segments of the polygon are parallel,
-	     * then things get more complex.  Consider the following
-	     * diagram:
-	     *
-	     * poly[1]
-	     *    *----b1-----------b2------a
-	     *                                \
-	     *                                  \
-	     *         *---------*----------*    b
-	     *        poly[0]  *q   *p  /
-	     *                                /
-	     *              --*--------*----c
-	     *              newB1    newB2
-	     *
-	     * Instead of using x and *p for poly[2] and poly[3], as
-	     * in the original diagram, use a and b as above.  Then instead
-	     * of using x and *p for the new poly[0] and poly[1], use
-	     * b and c as above.
-	     *
-	     * Do the computation in three stages:
-	     * 1. Compute a point "perp" such that the line p-perp
-	     *    is perpendicular to p-q.
-	     * 2. Compute the points a and c by intersecting the lines
-	     *    b1-b2 and newB1-newB2 with p-perp.
-	     * 3. Compute b by shifting p-perp to the right and
-	     *    intersecting it with p-q.
-	     */
-
-	    if (parallel) {
-		perp.x = p->x + (q->y - p->y);
-		perp.y = p->y - (q->x - p->x);
-		Intersect(p, &perp, &b1, &b2, &poly[2]);
-		Intersect(p, &perp, &newB1, &newB2, &c);
-		ShiftLine(p, &perp, borderWidth, &shift1);
-		shift2.x = shift1.x + (perp.x - p->x);
-		shift2.y = shift1.y + (perp.y - p->y);
-		Intersect(p, q, &shift1, &shift2, &poly[3]);
-	    }
-	}
-	if (pointsSeen >= 2) {
-	    dx = poly[3].x - poly[0].x;
-	    dy = poly[3].y - poly[0].y;
-	    if (dx > 0) {
-		lightOnLeft = (dy <= dx);
-	    } else {
-		lightOnLeft = (dy < dx);
-	    }
-	    if (lightOnLeft ^ (leftRelief == TK_RELIEF_RAISED)) {
-		gc = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
-	    } else {
-		gc = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
-	    }   
-	    XFillPolygon(Tk_Display(tkwin), drawable, gc, poly, 4, Convex,
-			 CoordModeOrigin);
-	}
-	b1.x = newB1.x;
-	b1.y = newB1.y;
-	b2.x = newB2.x;
-	b2.y = newB2.y;
-	poly[0].x = poly[3].x;
-	poly[0].y = poly[3].y;
-	if (parallel) {
-	    poly[1].x = c.x;
-	    poly[1].y = c.y;
-	} else if (pointsSeen >= 1) {
-	    poly[1].x = poly[2].x;
-	    poly[1].y = poly[2].y;
-	}
-	pointsSeen++;
-    }
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DestroySolidPattern --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroySolidPattern(Pattern *patternPtr)
-{
-}
-#endif
-
-static int
-ConfigureSolidPattern(Tcl_Interp *interp, Pattern *corePtr, int objc, 
-	Tcl_Obj *const *objv, unsigned int flags)
-{
-    SolidPattern *patternPtr = (SolidPattern *)corePtr;
-
-    if (Blt_ConfigureWidgetFromObj(interp, patternPtr->tkwin, 
-	patternPtr->classPtr->configSpecs, objc, objv, (char *)patternPtr, 
-	flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSolidRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawSolidRectangle(Tk_Window tkwin, Drawable drawable, Pattern *corePtr,
-		 int x, int y, int w, int h)
-{
-    SolidPattern *patternPtr = (SolidPattern *)corePtr;
-
-    if ((h <= 0) || (w <= 0)) {
-	return;
-    }
-    if (patternPtr->alpha == 0xFF) {
-	Tk_Fill3DRectangle(tkwin, drawable, patternPtr->border, x, y, w, h,
-		0, TK_RELIEF_FLAT);
-    } else if (patternPtr->alpha != 0x00) {
-	Blt_Picture picture;
-	Blt_Painter painter;
-	Blt_Pixel color;
-	
-	picture = Blt_DrawableToPicture(tkwin, drawable, x, y, w, h, 1.0);
-	if (picture == NULL) {
-	    return;			/* Background is obscured. */
-	}
-	color = Blt_XColorToPixel(Tk_3DBorderColor(patternPtr->border));
-	color.Alpha = patternPtr->alpha;
-	Blt_PaintRectangle(picture, 0, 0, w, h, 0, 0, &color);
-	painter = Blt_GetPainter(tkwin, 1.0);
-	Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x, y, 0);
-	Blt_FreePicture(picture);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSolidRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawSolidPolygon(Tk_Window tkwin, Drawable drawable, Pattern *corePtr, int n, 
-		 XPoint *points)
-{
-    SolidPattern *patternPtr = (SolidPattern *)corePtr;
-
-    if (n < 3) {
-	return;				/* Not enough points for polygon */
-    }
-    if (patternPtr->alpha == 0xFF) {
-	XFillPolygon(Tk_Display(tkwin), drawable, 
-		     Tk_3DBorderGC(tkwin, patternPtr->border, TK_3D_FLAT_GC),
-		     points, n, Complex, CoordModeOrigin);
-    } else if (patternPtr->alpha != 0x00) {
-	Blt_Picture picture;
-	Blt_Painter painter;
-	Blt_Pixel color;
-	int x1, x2, y1, y2;
-	int i;
-	Point2f *vertices;
-	int w, h;
-
-	/* Get polygon bounding box. */
-	GetPolygonBBox(points, n, &x1, &x2, &y1, &y2);
-	vertices = Blt_AssertMalloc(n * sizeof(Point2f));
-	/* Translate the polygon */
-	for (i = 0; i < n; i++) {
-	    vertices[i].x = (float)(points[i].x - x1);
-	    vertices[i].y = (float)(points[i].y - y1);
-	}
-	w = x2 - x1 + 1;
-	h = y2 - y1 + 1;
-	picture = Blt_DrawableToPicture(tkwin, drawable, x1, y1, w, h, 1.0);
-	if (picture == NULL) {
-	    return;			/* Background is obscured. */
-	}
-	color = Blt_XColorToPixel(Tk_3DBorderColor(patternPtr->border));
-	color.Alpha = patternPtr->alpha;
-	Blt_PaintPolygon(picture, n, vertices, &color);
-	Blt_Free(vertices);
-	painter = Blt_GetPainter(tkwin, 1.0);
-	Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x1, y1, 0);
-	Blt_FreePicture(picture);
-    }
-}
-
-static PatternClass solidPatternClass = {
-    PATTERN_SOLID,
-    solidConfigSpecs,
-    NULL,				/* DestroySolidPattern */
-    ConfigureSolidPattern,
-    DrawSolidRectangle,
-    DrawSolidPolygon
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateSolidPattern --
- *
- *	Creates a new solid background pattern.
- *
- * Results:
- *	Returns pointer to the new background pattern.
- *
- *---------------------------------------------------------------------------
- */
-static Pattern *
-CreateSolidPattern(void)
-{
-    SolidPattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(SolidPattern));
-    if (patternPtr == NULL) {
-	return NULL;
-    }
-    patternPtr->classPtr = &solidPatternClass;
-    patternPtr->alpha = 0xFF;
-    return (Pattern *)patternPtr;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTilePattern --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTilePattern(Pattern *corePtr)
-{
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawTileRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawTileRectangle(Tk_Window tkwin, Drawable drawable, Pattern *corePtr,
-	int x, int y, int w, int h)
-{
-    TilePattern *patternPtr = (TilePattern *)corePtr;
-    Blt_Painter painter;
-    Tk_Window refWindow;
-
-    if ((h <= 0) || (w <= 0)) {
-	return;
-    }
-    if (patternPtr->tkImage == NULL) {
-	/* No image so draw solid color background using border. */
-	Tk_Fill3DRectangle(tkwin, drawable, patternPtr->border, x, y, w, h,
-		0, TK_RELIEF_FLAT);
-	return;
-    }
-    if (patternPtr->flags & BG_SCALE) {
-	Blt_Picture picture;
-	int refWidth, refHeight;
-	Blt_HashEntry *hPtr;
-
-	hPtr = NULL;
-	picture = NULL;
-	refWidth = w, refHeight = h;
-	if (patternPtr->reference != REFERENCE_NONE) {
-	    int isNew;
-
-	    /* See if a picture has previously been generated. There will be a
-	     * picture for each reference window. */
-	    hPtr = Blt_CreateHashEntry(&patternPtr->pictTable, 
-		(char *)refWindow, &isNew);
-	    if (!isNew) {
-		picture = Blt_GetHashValue(hPtr);
-	    } 
-	    refWidth = Tk_Width(refWindow);
-	    refHeight = Tk_Height(refWindow);
-	}
-	if ((picture == NULL) || 
-	    (Blt_PictureWidth(picture) != refWidth) ||
-	    (Blt_PictureHeight(picture) != refHeight)) {
-	    Blt_Picture original;
-	    int isNew;
-	    
-	    /* 
-	     * Either the size of the reference window has changed or one of
-	     * the background pattern options has been reset. Resize the
-	     * picture if necessary and regenerate the background.
-	     */
-	    if (picture == NULL) {
-		picture = Blt_CreatePicture(refWidth, refHeight);
-		if (hPtr != NULL) {
-		    Blt_SetHashValue(hPtr, picture);
-		}
-	    } else {
-		Blt_ResizePicture(picture, refWidth, refHeight);
-	    }
-	    original = ImageToPicture(patternPtr, &isNew);
-	    if (original != NULL) {
-		Blt_ResamplePicture(picture, original, patternPtr->filter, 
-				    patternPtr->filter);
-		if (isNew) {
-		    Blt_FreePicture(original);
-		}
-	    }
-	}
-	Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x, y, 0);
-    } else {
-	int isNew;
-	Blt_Picture picture;
-
-	picture = ImageToPicture(patternPtr, &isNew);
-	Tile(tkwin, drawable, corePtr, picture, x, y, w, h);
-	if (isNew) {
-	    Blt_FreePicture(picture);
-	}
-    }
-}
-
-static int
-ConfigureTilePattern(Tcl_Interp *interp, Pattern *corePtr, int objc, 
-	Tcl_Obj *const *objv, unsigned int flags)
-{
-    TilePattern *patternPtr = (TilePattern *)corePtr;
-
-    if (Blt_ConfigureWidgetFromObj(interp, patternPtr->tkwin, 
-	patternPtr->classPtr->configSpecs, objc, objv, (char *)patternPtr, 
-	flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static PatternClass tilePatternClass = {
-    PATTERN_TILE,
-    tileConfigSpecs,
-    NULL,				/* DestroyTilePattern, */
-    ConfigureTilePattern,
-    DrawTileRectangle,
-    DrawSolidPolygon
-
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTilePattern --
- *
- *	Creates a new image background pattern.
- *
- * Results:
- *	Returns pointer to the new background pattern.
- *
- *---------------------------------------------------------------------------
- */
-static Pattern *
-CreateTilePattern(void)
-{
-    TilePattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(TilePattern));
-    if (patternPtr == NULL) {
-	return NULL;
-    }
-    patternPtr->classPtr = &tilePatternClass;
-    patternPtr->reference = REFERENCE_TOPLEVEL;
-    return (Pattern *)patternPtr;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyGradientPattern --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyGradientPattern(Pattern *patternPtr)
-{
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawGradientRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawGradientRectangle(Tk_Window tkwin, Drawable drawable, Pattern *corePtr, 
-	int x, int y, int w, int h)
-{
-    GradientPattern *patternPtr = (GradientPattern *)corePtr;
-    int sx, sy;
-    Tk_Window refWindow;
-    Blt_Picture picture;
-    int refWidth, refHeight;
-    Blt_HashEntry *hPtr;
-
-    if ((h <= 0) || (w <= 0)) {
-	return;
-    }
-    if (patternPtr->reference == REFERENCE_SELF) {
-	refWindow = tkwin;
-    } else if (patternPtr->reference == REFERENCE_TOPLEVEL) {
-	refWindow = Blt_Toplevel(tkwin);
-    } else if (patternPtr->reference == REFERENCE_WINDOW) {
-	refWindow = patternPtr->refWindow;
-    } else if (patternPtr->reference == REFERENCE_NONE) {
-	refWindow = NULL;
-    } else {
-	return;				/* Unknown reference window. */
-    }
-
-    hPtr = NULL;
-    picture = NULL;
-    refWidth = w, refHeight = h;
-    sx = x, sy = y;
-    if (patternPtr->reference != REFERENCE_NONE) {
-	int isNew;
-	    
-	if ((patternPtr->reference == REFERENCE_WINDOW) ||
-	    (patternPtr->reference == REFERENCE_TOPLEVEL)) {
-	    Tk_Window tkwin2;
-	    
-	    tkwin2 = tkwin;
-	    while ((tkwin2 != refWindow) && (tkwin2 != NULL)) {
-		sx += Tk_X(tkwin2) + Tk_Changes(tkwin2)->border_width;
-		sy += Tk_Y(tkwin2) + Tk_Changes(tkwin2)->border_width;
-		tkwin2 = Tk_Parent(tkwin2);
-	    }
-	    if (tkwin2 == NULL) {
-		/* 
-		 * The window associated with the background pattern isn't an
-		 * ancestor of the current window. That means we can't use the
-		 * reference window as a guide to the size of the picture.
-		 * Simply convert to a self reference.
-		 */
-		patternPtr->reference = REFERENCE_SELF;
-		refWindow = tkwin;
-		sx = x, sy = y;	
-	    }
-	}
-	/* See if a picture has previously been generated. There will be a
-	 * picture for each reference window. */
-	hPtr = Blt_CreateHashEntry(&patternPtr->pictTable, (char *)refWindow, 
-		&isNew);
-	if (!isNew) {
-	    picture = Blt_GetHashValue(hPtr);
-	} 
-	refWidth = Tk_Width(refWindow);
-	refHeight = Tk_Height(refWindow);
-    }
-    if (patternPtr->reference == REFERENCE_SELF) {
-	refWidth = Tk_Width(refWindow);
-	refHeight = Tk_Height(refWindow);
-	sx = x, sy = y;
-    }
-    if ((picture == NULL) || 
-	(Blt_PictureWidth(picture) != refWidth) ||
-	(Blt_PictureHeight(picture) != refHeight)) {
-	/* 
-	 * Either the size of the reference window has changed or one of the
-	 * background pattern options has been reset. Resize the picture if
-	 * necessary and regenerate the background.
-	 */
-	if (picture == NULL) {
-	    picture = Blt_CreatePicture(refWidth, refHeight);
-	    if (hPtr != NULL) {
-		Blt_SetHashValue(hPtr, picture);
-	    }
-	} else {
-	    Blt_ResizePicture(picture, refWidth, refHeight);
-	}
-	Blt_GradientPicture(picture, &patternPtr->high, &patternPtr->low, 
-		&patternPtr->gradient);
-    }
-    Tile(tkwin, drawable, corePtr, picture, x, y, w, h);
-#ifdef notdef
-    painter = Blt_GetPainter(tkwin, 1.0);
-    Blt_PaintPicture(painter, drawable, picture, sx, sy, w, h, x, y, 0);
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawGradientRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawGradientPolygon(Tk_Window tkwin, Drawable drawable, Pattern *corePtr, 
-		    int n, XPoint *points)
-{
-    GradientPattern *patternPtr = (GradientPattern *)corePtr;
-    Tk_Window refWindow;
-
-    if (patternPtr->reference == REFERENCE_SELF) {
-	refWindow = tkwin;
-    } else if (patternPtr->reference == REFERENCE_TOPLEVEL) {
-	refWindow = Blt_Toplevel(tkwin);
-    } else if (patternPtr->reference == REFERENCE_WINDOW) {
-	refWindow = patternPtr->refWindow;
-    } else if (patternPtr->reference == REFERENCE_NONE) {
-	refWindow = NULL;
-    } else {
-	return;				/* Unknown reference window. */
-    }
-    if (n < 3) {
-	return;				/* Not enough points for polygon */
-    }
-    if (patternPtr->alpha == 0xFF) {
-	XFillPolygon(Tk_Display(tkwin), drawable, 
-		     Tk_3DBorderGC(tkwin, patternPtr->border, TK_3D_FLAT_GC),
-		     points, n, Complex, CoordModeOrigin);
-    } else if (patternPtr->alpha != 0x00) {
-	Blt_Picture picture;
-	Blt_Painter painter;
-	Blt_Pixel color;
-	int x1, x2, y1, y2;
-	int i;
-	Point2f *vertices;
-	int w, h;
-
-	/* Get polygon bounding box. */
-	GetPolygonBBox(points, n, &x1, &x2, &y1, &y2);
-	vertices = Blt_AssertMalloc(n * sizeof(Point2f));
-	/* Translate the polygon */
-	for (i = 0; i < n; i++) {
-	    vertices[i].x = (float)(points[i].x - x1);
-	    vertices[i].y = (float)(points[i].y - y1);
-	}
-	w = x2 - x1 + 1;
-	h = y2 - y1 + 1;
-	picture = Blt_DrawableToPicture(tkwin, drawable, x1, y1, w, h, 1.0);
-	if (picture == NULL) {
-	    return;			/* Background is obscured. */
-	}
-	color = Blt_XColorToPixel(Tk_3DBorderColor(patternPtr->border));
-	color.Alpha = patternPtr->alpha;
-	Blt_PaintPolygon(picture, n, vertices, &color);
-	Blt_Free(vertices);
-	painter = Blt_GetPainter(tkwin, 1.0);
-	Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x1, y1, 0);
-	Blt_FreePicture(picture);
-    }
-}
-
-static int
-ConfigureGradientPattern(Tcl_Interp *interp, Pattern *corePtr, int objc, 
-	Tcl_Obj *const *objv, unsigned int flags)
-{
-    GradientPattern *patternPtr = (GradientPattern *)corePtr;
-
-    if (Blt_ConfigureWidgetFromObj(interp, patternPtr->tkwin, 
-	patternPtr->classPtr->configSpecs, objc, objv, (char *)patternPtr, 
-	flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (patternPtr->alpha != 0xFF) {
-	patternPtr->low.Alpha = patternPtr->alpha;
-	patternPtr->high.Alpha = patternPtr->alpha;
-    }
-    return TCL_OK;
-}
-
-
-static PatternClass gradientPatternClass = {
-    PATTERN_GRADIENT,
-    gradientConfigSpecs,
-    NULL, /* DestroyGradientPattern, */
-    ConfigureGradientPattern, 
-    DrawGradientRectangle,
-    DrawGradientPolygon,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateGradientPattern --
- *
- *	Creates a new solid background pattern.
- *
- * Results:
- *	Returns pointer to the new background pattern.
- *
- *---------------------------------------------------------------------------
- */
-static Pattern *
-CreateGradientPattern(void)
-{
-    GradientPattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(GradientPattern));
-    if (patternPtr == NULL) {
-	return NULL;
-    }
-    patternPtr->classPtr = &gradientPatternClass;
-    patternPtr->reference = REFERENCE_TOPLEVEL;
-    patternPtr->gradient.shape = BLT_GRADIENT_SHAPE_LINEAR;
-    patternPtr->gradient.path = BLT_GRADIENT_PATH_Y;
-    patternPtr->gradient.jitter = FALSE;
-    patternPtr->gradient.logScale = TRUE;
-    patternPtr->alpha = 255;
-    return (Pattern *)patternPtr;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTexturePattern --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTexturePattern(Pattern *patternPtr)
-{
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawTextureRectangle --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawTextureRectangle(Tk_Window tkwin, Drawable drawable, Pattern *corePtr, 
-	int x, int y, int w, int h)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-    TexturePattern *patternPtr = (TexturePattern *)corePtr;
-    Tk_Window refWindow;
-    int refWidth, refHeight;
-    Blt_HashEntry *hPtr;
-
-    if ((h <= 0) || (w <= 0)) {
-	return;
-    }
-    if (patternPtr->reference == REFERENCE_SELF) {
-	refWindow = tkwin;
-    } else if (patternPtr->reference == REFERENCE_TOPLEVEL) {
-	refWindow = Blt_Toplevel(tkwin);
-    } else if (patternPtr->reference == REFERENCE_WINDOW) {
-	refWindow = patternPtr->refWindow;
-    } else if (patternPtr->reference == REFERENCE_NONE) {
-	refWindow = NULL;
-    } else {
-	return;				/* Unknown reference window. */
-    }
-    painter = Blt_GetPainter(tkwin, 1.0);
-
-    picture = NULL;
-    refWidth = w, refHeight = h;
-    if (patternPtr->reference != REFERENCE_NONE) {
-	int isNew;
-	    
-	/* See if a picture has previously been generated. There will be a
-	 * picture for each reference window. */
-	hPtr = Blt_CreateHashEntry(&patternPtr->pictTable, (char *)refWindow, 
-				   &isNew);
-	if (!isNew) {
-	    picture = Blt_GetHashValue(hPtr);
-	} 
-	refWidth = Tk_Width(refWindow);
-	refHeight = Tk_Height(refWindow);
-    }
-    if ((picture == NULL) || 
-	(Blt_PictureWidth(picture) != refWidth) ||
-	(Blt_PictureHeight(picture) != refHeight)) {
-	
-	/* 
-	 * Either the size of the reference window has changed or one of the
-	 * background pattern options has been reset. Resize the picture if
-	 * necessary and regenerate the background.
-	 */
-	if (picture == NULL) {
-	    picture = Blt_CreatePicture(refWidth, refHeight);
-	    if (hPtr != NULL) {
-		Blt_SetHashValue(hPtr, picture);
-	    }
-	} else {
-	    Blt_ResizePicture(picture, refWidth, refHeight);
-	}
-	Blt_TexturePicture(picture, &patternPtr->high, &patternPtr->low, 0);
-    }
-    Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x, y, 0);
-}
-
-static int
-ConfigureTexturePattern(Tcl_Interp *interp, Pattern *corePtr, int objc, 
-	Tcl_Obj *const *objv, unsigned int flags)
-{
-    TexturePattern *patternPtr = (TexturePattern *)corePtr;
-
-    if (Blt_ConfigureWidgetFromObj(interp, patternPtr->tkwin, 
-	patternPtr->classPtr->configSpecs, objc, objv, (char *)patternPtr, 
-	flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static PatternClass texturePatternClass = {
-    PATTERN_TEXTURE,
-    textureConfigSpecs,
-    NULL,				/* DestroyTexturePattern, */
-    ConfigureTexturePattern,
-    DrawTextureRectangle,
-    DrawSolidPolygon
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTexturePattern --
- *
- *	Creates a new texture background pattern.
- *
- * Results:
- *	Returns pointer to the new background pattern.
- *
- *---------------------------------------------------------------------------
- */
-static Pattern *
-CreateTexturePattern()
-{
-    TexturePattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(TexturePattern));
-    if (patternPtr == NULL) {
-	return NULL;
-    }
-    patternPtr->classPtr = &texturePatternClass;
-    patternPtr->reference = REFERENCE_TOPLEVEL;
-    return (Pattern *)patternPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreatePattern --
- *
- *	Creates a new background pattern.
- *
- * Results:
- *	Returns pointer to the new background pattern.
- *
- *---------------------------------------------------------------------------
- */
-static Pattern *
-CreatePattern(BackgroundInterpData *dataPtr, Tcl_Interp *interp, int type)
-{
-    Pattern *patternPtr;
-
-    switch (type) {
-    case PATTERN_SOLID:
-	patternPtr = CreateSolidPattern();
-	break;
-    case PATTERN_TILE:
-	patternPtr = CreateTilePattern();
-	break;
-    case PATTERN_GRADIENT:
-	patternPtr = CreateGradientPattern();
-	break;
-    case PATTERN_TEXTURE:
-	patternPtr = CreateTexturePattern();
-	break;
-    default:
-	abort();
-	break;
-    }
-    if (patternPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate background pattern", 
-		(char *)NULL);
-	return NULL;
-    }
-    patternPtr->dataPtr = dataPtr;
-    Blt_InitHashTable(&patternPtr->pictTable, BLT_ONE_WORD_KEYS);
-    patternPtr->chain = Blt_Chain_Create();
-    patternPtr->tkwin = Tk_MainWindow(interp);
-    patternPtr->display = Tk_Display(patternPtr->tkwin);
-    return patternPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyPattern --
- *
- *	Removes the client from the servers's list of clients and memory used
- *	by the client token is released.  When the last client is deleted, the
- *	server is also removed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyPattern(Pattern *patternPtr)
-{
-    Blt_FreeOptions(patternPtr->classPtr->configSpecs, (char *)patternPtr, 
-	patternPtr->display, 0);
-    if (patternPtr->classPtr->destroyProc != NULL) {
-	(*patternPtr->classPtr->destroyProc)(patternPtr);
-    }
-    if (patternPtr->border != NULL) {
-	Tk_Free3DBorder(patternPtr->border);
-    }
-    if (patternPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&patternPtr->dataPtr->patternTable, 
-		patternPtr->hashPtr);
-    }
-    ClearCache(patternPtr);
-    Blt_Chain_Destroy(patternPtr->chain);
-    Blt_DeleteHashTable(&patternPtr->pictTable);
-    Blt_Free(patternPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyBackground --
- *
- *	Removes the client from the servers's list of clients and memory used
- *	by the client token is released.  When the last client is deleted, the
- *	server is also removed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyBackground(Background *bgPtr)
-{
-    Pattern *patternPtr = bgPtr->corePtr;
-
-    Blt_Chain_DeleteLink(patternPtr->chain, bgPtr->link);
-    if (Blt_Chain_GetLength(patternPtr->chain) <= 0) {
-	DestroyPattern(patternPtr);
-    }
-    Blt_Free(bgPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPatternFromObj --
- *
- *	Retrieves the background pattern named by the given the Tcl_Obj.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetPatternFromObj(Tcl_Interp *interp, BackgroundInterpData *dataPtr,
-		  Tcl_Obj *objPtr, Pattern **patternPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&dataPtr->patternTable, string);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(dataPtr->interp, "can't find background pattern \"", 
-		string, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *patternPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- * bgpattern create type ?option values?...
- */
-static int
-CreateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Background *bgPtr;
-    BackgroundInterpData *dataPtr = clientData;
-    Pattern *patternPtr;
-    int type;
-
-    if (GetPatternTypeFromObj(interp, objv[2], &type) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    patternPtr = CreatePattern(dataPtr, interp, type);
-    if (patternPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if ((*patternPtr->classPtr->configProc)(interp, patternPtr, 
-		objc - 3, objv + 3, 0) != TCL_OK) {
-	DestroyPattern(patternPtr);
-	return TCL_ERROR;
-    }
-    /* Create the container for the pattern. */
-    bgPtr = Blt_Calloc(1, sizeof(Background));
-    if (bgPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate background.", (char *)NULL);
-	DestroyPattern(patternPtr);
-	return TCL_ERROR;
-    }
-    /* Generate a unique name for the pattern.  */
-    {
-	int isNew;
-	char name[200];
-	Blt_HashEntry *hPtr;
-
-	do {
-	    sprintf_s(name, 200, "bgpattern%d", dataPtr->nextId++);
-	    hPtr = Blt_CreateHashEntry(&dataPtr->patternTable, name, &isNew);
-	} while (!isNew);
-	assert(hPtr != NULL);
-	assert(patternPtr != NULL);
-	Blt_SetHashValue(hPtr, patternPtr);
-	patternPtr->hashPtr = hPtr;
-	patternPtr->name = Blt_GetHashKey(&dataPtr->patternTable, hPtr);
-    }
-
-    /* Add the container to the pattern's list. */
-    bgPtr->link = Blt_Chain_Append(patternPtr->chain, bgPtr);
-    patternPtr->link = bgPtr->link;
-    bgPtr->corePtr = patternPtr;
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), patternPtr->name, -1);
-    return TCL_OK;
-}    
-
-/*
- * bgpattern cget $pattern ?option?...
- */
-static int
-CgetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    BackgroundInterpData *dataPtr = clientData;
-    Pattern *patternPtr;
-
-    if (GetPatternFromObj(interp, dataPtr, objv[2], &patternPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, patternPtr->tkwin, 
-	patternPtr->classPtr->configSpecs, (char *)patternPtr, objv[3], 0);
-}
-
-/*
- * bgpattern configure $pattern ?option?...
- */
-static int
-ConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    BackgroundInterpData *dataPtr = clientData;
-    Pattern *patternPtr;
-    int flags;
-
-    if (GetPatternFromObj(interp, dataPtr, objv[2], &patternPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, patternPtr->tkwin, 
-		patternPtr->classPtr->configSpecs, (char *)patternPtr, 
-		(Tcl_Obj *)NULL, flags);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, patternPtr->tkwin, 
-		patternPtr->classPtr->configSpecs, (char *)patternPtr, objv[3], 
-		flags);
-    } else {
-	if ((*patternPtr->classPtr->configProc)(interp, patternPtr, 
-		objc-3, objv+3, flags) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	ClearCache(patternPtr);
-	NotifyClients(patternPtr);
-	return TCL_OK;
-    }
-}
-
-/*
- * bgpattern delete $pattern... 
- */
-static int
-DeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    BackgroundInterpData *dataPtr = clientData;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	Pattern *patternPtr;
-	const char *name;
-
-	name = Tcl_GetString(objv[i]);
-	hPtr = Blt_FindHashEntry(&dataPtr->patternTable, name);
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find background pattern \"",
-			     name, "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	patternPtr = Blt_GetHashValue(hPtr);
-	assert(patternPtr->hashPtr == hPtr);
-
-	/* FIXME: Assuming that the first background token is always
-	 * associated with the command. Need to known when pattern was created
-	 * by bgpattern command.  Does bgpattern delete #ffffff make sense? */
-	/* 
-	 * Look up clientData from command hash table. If it's found it
-	 * represents a command?
-	 */
-	if (patternPtr->link != NULL) {
-	    Background *bgPtr;
-
-	    bgPtr = Blt_Chain_GetValue(patternPtr->link);
-	    assert(patternPtr->link == bgPtr->link);
-	    /* Take the pattern entry out of the hash table.  */
-	    Blt_DeleteHashEntry(&patternPtr->dataPtr->patternTable, 
-				patternPtr->hashPtr);
-	    patternPtr->name = NULL;
-	    patternPtr->hashPtr = NULL;
-	    patternPtr->link = NULL;	/* Disconnect pattern. */
-	    DestroyBackground(bgPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- * bgpattern type $pattern
- */
-static int
-TypeOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    BackgroundInterpData *dataPtr = clientData;
-    Pattern *patternPtr;
-
-    if (GetPatternFromObj(interp, dataPtr, objv[2], &patternPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), NameOfPattern(patternPtr), -1);
-    return TCL_OK;
-}
-
-static Blt_OpSpec patternOps[] =
-{
-    {"cget",      2, CgetOp,      4, 4, "pattern option",},
-    {"configure", 2, ConfigureOp, 3, 0, "pattern ?option value?...",},
-    {"create",    2, CreateOp,    3, 0, "type ?args?",},
-    {"delete",    1, DeleteOp,    2, 0, "pattern...",},
-    {"type",      1, TypeOp,      3, 3, "pattern",},
-};
-static int nPatternOps = sizeof(patternOps) / sizeof(Blt_OpSpec);
-
-static int
-BgPatternCmdProc(ClientData clientData, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPatternOps, patternOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-static void
-BgPatternDeleteCmdProc(ClientData clientData) 
-{
-    BackgroundInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->patternTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Pattern *patternPtr;
-	Blt_ChainLink link, next;
-
-	patternPtr = Blt_GetHashValue(hPtr);
-	patternPtr->hashPtr = NULL;
-	for (link = Blt_Chain_FirstLink(patternPtr->chain); link != NULL; 
-	     link = next) {
-	    Background *bgPtr;
-
-	    next = Blt_Chain_NextLink(link);
-	    bgPtr = Blt_Chain_GetValue(link);
-	    DestroyBackground(bgPtr);
-	}
-    }
-    Blt_DeleteHashTable(&dataPtr->patternTable);
-    Tcl_DeleteAssocData(dataPtr->interp, BG_PATTERN_THREAD_KEY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBackgroundInterpData --
- *
- *---------------------------------------------------------------------------
- */
-static BackgroundInterpData *
-GetBackgroundInterpData(Tcl_Interp *interp)
-{
-    BackgroundInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (BackgroundInterpData *)
-	Tcl_GetAssocData(interp, BG_PATTERN_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(BackgroundInterpData));
-	dataPtr->interp = interp;
-	dataPtr->nextId = 1;
-
-
-	/* FIXME: Create interp delete proc to teardown the hash table and
-	 * data entry.  Must occur after all the widgets have been destroyed
-	 * (clients of the background pattern). */
-
-	Tcl_SetAssocData(interp, BG_PATTERN_THREAD_KEY, 
-		(Tcl_InterpDeleteProc *)NULL, dataPtr);
-	Blt_InitHashTable(&dataPtr->patternTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-
-/*LINTLIBRARY*/
-int
-Blt_BgPatternCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {
-	"bgpattern", BgPatternCmdProc, BgPatternDeleteCmdProc,
-    };
-    cmdSpec.clientData = GetBackgroundInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetBackground
- *
- *	Creates a new background from the given pattern description.  The
- *	background structure returned is a token for the client to use the
- *	background.  If the pattern isn't a solid pattern (i.e. a solid color
- *	that Tk_Get3DBorder will accept) then the pattern must already exist.
- *	Solid patterns are the exception to this rule.  This lets "-background
- *	#ffffff" work without already having allocated a background pattern
- *	"#ffffff".
- *
- * Results:
- *	Returns a background pattern token.
- *
- * Side Effects:
- *	Memory is allocated for the new token.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Background
-Blt_GetBackground(Tcl_Interp *interp, Tk_Window tkwin, const char *name)
-{
-    Pattern *patternPtr;
-    BackgroundInterpData *dataPtr;
-    Background *bgPtr;		/* Pattern container. */
-    Blt_HashEntry *hPtr;
-    int isNew;
-    
-    /* Create new token for the background. */
-    bgPtr = Blt_Calloc(1, sizeof(Background));
-    if (bgPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate background \"", name, "\".", 
-		(char *)NULL);
-	return NULL;
-    }
-    dataPtr = GetBackgroundInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->patternTable, name, &isNew);
-    if (isNew) {
-	Tk_3DBorder border;
-
-	/* Pattern doesn't already exist, see if it's a color name
-	 * (i.e. something that Tk_Get3DBorder will accept). */
-	border = Tk_Get3DBorder(interp, tkwin, name);
-	if (border == NULL) {
-	    goto error;			/* Nope. It's an error. */
-	} 
-	patternPtr = CreatePattern(dataPtr, interp, PATTERN_SOLID);
-	if (patternPtr == NULL) {
-	    Tk_Free3DBorder(border);
-	    goto error;			/* Can't allocate new pattern. */
-	}
-	patternPtr->border = border;
-	patternPtr->hashPtr = hPtr;
-	patternPtr->name = Blt_GetHashKey(&dataPtr->patternTable, hPtr);
-	patternPtr->link = NULL;
-	Blt_SetHashValue(hPtr, patternPtr);
-    } else {
-	patternPtr = Blt_GetHashValue(hPtr);
-	assert(patternPtr != NULL);
-    }
-    /* Add the new background to the pattern's list of clients. */
-    bgPtr->link = Blt_Chain_Append(patternPtr->chain, bgPtr);
-    bgPtr->corePtr = patternPtr;
-    return bgPtr;
- error:
-    Blt_Free(bgPtr);
-    Blt_DeleteHashEntry(&dataPtr->patternTable, hPtr);
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetBackgroundFromObj
- *
- *	Retrieves a new token of a background pattern from the named background
- *	pattern.
- *
- * Results:
- *	Returns a background pattern token.
- *
- * Side Effects:
- *	Memory is allocated for the new token.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Background
-Blt_GetBackgroundFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    return Blt_GetBackground(interp, tkwin, Tcl_GetString(objPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SetBackgroundChangedProc
- *
- *	Sets the routine to called when an image changes.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The designated routine will be called the next time the image
- *	associated with the tile changes.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_SetBackgroundChangedProc(
-    Background *bgPtr,			/* Background to register callback
-					 * with. */
-    Blt_BackgroundChangedProc *notifyProc, /* Function to call when pattern
-					    * has changed. NULL indicates to
-					    * unset the callback.*/
-    ClientData clientData)
-{
-    bgPtr->notifyProc = notifyProc;
-    bgPtr->clientData = clientData;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeBackground
- *
- *	Removes the background pattern token.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Memory is freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreeBackground(Background *bgPtr)
-{
-    Pattern *patternPtr = bgPtr->corePtr;
-
-    assert(patternPtr != NULL);
-    DestroyBackground(bgPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetBackgroundOrigin
- *
- *	Returns the coordinates of the origin of the background pattern
- *	referenced by the token.
- *
- * Results:
- *	Returns the coordinates of the origin.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_GetBackgroundOrigin(Background *bgPtr, int *xPtr, int *yPtr)
-{
-    *xPtr = bgPtr->corePtr->xOrigin;
-    *yPtr = bgPtr->corePtr->yOrigin;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SetBackgroundOrigin
- *
- *	Sets the origin of the background pattern referenced by the token.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_SetBackgroundOrigin(Tk_Window tkwin, Background *bgPtr, int x, int y)
-{
-    Pattern *patternPtr = bgPtr->corePtr;
-    patternPtr->xOrigin = x;
-    patternPtr->yOrigin = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NameOfBackground
- *
- *	Returns the name of the core background pattern referenced by the
- *	token.
- *
- * Results:
- *	Return the name of the background pattern.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_NameOfBackground(Background *bgPtr)
-{
-    if (bgPtr->corePtr->name == NULL) {
-	return "";
-    }
-    return bgPtr->corePtr->name;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BackgroundBorderColor
- *
- *	Returns the border color of the background pattern referenced by the
- *	token.
- *
- * Results:
- *	Returns the XColor representing the border color of the pattern.
- *
- *---------------------------------------------------------------------------
- */
-XColor *
-Blt_BackgroundBorderColor(Background *bgPtr)
-{
-    return Tk_3DBorderColor(bgPtr->corePtr->border);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BackgroundBorder
- *
- *	Returns the border of the background pattern referenced by the token.
- *
- * Results:
- *	Return the border of the background pattern.
- *
- *---------------------------------------------------------------------------
- */
-Tk_3DBorder
-Blt_BackgroundBorder(Background *bgPtr)
-{
-    return bgPtr->corePtr->border;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawBackgroundRectangle
- *
- *	Draws the background pattern in the designated window.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawBackgroundRectangle(Tk_Window tkwin, Drawable drawable, 
-			    Background *bgPtr, int x, int y, int w, int h, 
-			    int borderWidth, int relief)
-{
-    Tk_Draw3DRectangle(tkwin, drawable, bgPtr->corePtr->border, x, y, w, h, 
-	borderWidth, relief);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FillBackgroundRectangle
- *
- *	Draws the background pattern in the designated window.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FillBackgroundRectangle(Tk_Window tkwin, Drawable drawable, 
-			    Background *bgPtr, int x, int y, int w, int h, 
-			    int borderWidth, int relief)
-{
-    Pattern *patternPtr;
-
-    if ((h < 1) || (w < 1)) {
-	return;
-    }
-    patternPtr = bgPtr->corePtr;
-    (*patternPtr->classPtr->drawRectangleProc)(tkwin, drawable, patternPtr, 
-	x, y, w, h);
-    if ((relief != TK_RELIEF_FLAT) && (borderWidth > 0)) {
-	Tk_Draw3DRectangle(tkwin, drawable, patternPtr->border, x, y, w, h,
-		borderWidth, relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawBackgroundPolygon
- *
- *	Draws the background pattern in the designated window.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawBackgroundPolygon(Tk_Window tkwin, Drawable drawable, Background *bgPtr,
-			  XPoint *points, int n, int borderWidth, int relief)
-{
-    Pattern *patternPtr;
-
-#ifdef notdef
-    if (n < 3) {
-	return;
-    }
-#endif
-    patternPtr = bgPtr->corePtr;
-    Draw3DPolygon(tkwin, drawable, patternPtr->border, points, n,
-	borderWidth, relief);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FillBackgroundPolygon
- *
- *	Draws the background pattern in the designated window.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FillBackgroundPolygon(Tk_Window tkwin, Drawable drawable, Background *bgPtr,
-			  XPoint *points, int n, int borderWidth, int relief)
-{
-    Pattern *patternPtr;
-
-    if (n < 3) {
-	return;
-    }
-    patternPtr = bgPtr->corePtr;
-    (*patternPtr->classPtr->drawPolygonProc)(tkwin, drawable, patternPtr, 
-	n, points);
-    if ((relief != TK_RELIEF_FLAT) && (borderWidth != 0)) {
-	Draw3DPolygon(tkwin, drawable, patternPtr->border, points, n,
-		borderWidth, relief);
-    }
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FillPictureBackground
- *
- *	Draws the background pattern in the designated picture.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FillPictureBackground(
-    Tk_Window tkwin, 
-    Blt_Picture dest,
-    Background *bgPtr, 
-    int x, int y, int w, int h, 
-    int borderWidth, int relief)
-{
-    Pattern *patternPtr;
-    Blt_Picture picture;
-    int sx, sy;
-
-    patternPtr = bgPtr->corePtr;
-    if (patternPtr->classPtr->pattern == PATTERN_BORDER) {
-	return;
-    } 
-    picture = GetBackgroundPicture(patternPtr, tkwin, x, y, &sx, &sy);
-    if (picture == NULL) {
-	return;
-    }
-    Blt_CopyPictureBits(dest, picture, sx, sy, w, h, x, y);
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawFocusBackground
- *
- *	Draws the background pattern in the designated picture.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawFocusBackground(Tk_Window tkwin, Background *bgPtr, 
-			int highlightThickness, Drawable drawable)
-{
-    Pattern *patternPtr = (Pattern *)bgPtr->corePtr;
-    int w, h;
-
-    w = Tk_Width(tkwin);
-    h = Tk_Height(tkwin);
-    /* Top */
-    (*patternPtr->classPtr->drawRectangleProc)(tkwin, drawable, patternPtr, 
-	0, 0, w, highlightThickness);
-    /* Bottom */
-    (*patternPtr->classPtr->drawRectangleProc)(tkwin, drawable, patternPtr, 
-	0, h - highlightThickness, w, highlightThickness);
-    /* Left */
-    (*patternPtr->classPtr->drawRectangleProc)(tkwin, drawable, patternPtr,
-	0, highlightThickness, highlightThickness, h - 2 * highlightThickness);
-    /* Right */
-    (*patternPtr->classPtr->drawRectangleProc)(tkwin, drawable, patternPtr,
-	w - highlightThickness, highlightThickness, highlightThickness, 
-	h - 2 * highlightThickness);
-}
-
-
-#ifdef notdef
-static void 
-Draw3DRectangle(Tk_Window tkwin, Drawable drawable, Background *bgPtr, 
-		int x, int y, int w, int h, int borderWidth, int relief)
-{
-    int nSegments;
-    XSegment *segments, *sp;
-    int i;
-
-    nSegments = borderWidth + borderWidth;
-    segments = Blt_AssertMalloc(sizeof(XSegment) * nSegments);
-    sp = segments;
-    for (i = 0; i < borderWidth; i++) {
-	sp->x1 = x + i;
-	sp->y1 = y + i;
-	sp->x2 = x + (w - 1) - i;
-	sp->y2 = y + i;
-	sp++;
-	sp->x1 = x + i;
-	sp->y1 = y + i;
-	sp->x2 = x + i;
-	sp->y2 = y + (h - 1) - i;
-	sp++;
-    }
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_LIGHT_GC);
-    XDrawSegments(Tk_Display(tkwin), drawable, gc, segments, nSegments);
-
-    sp = segments;
-    for (i = 0; i < borderWidth; i++) {
-	sp->x1 = x + i;
-	sp->y1 = y + (h - 1) - i;
-	sp->x2 = x + (w - 1) - i;
-	sp->y2 = y + (h - 1) - i;
-	sp++;
-	sp->x1 = x + (w - 1 ) - i;
-	sp->y1 = y + i;
-	sp->x2 = x + (w - 1) - i;
-	sp->y2 = y + (h - 1) - i;
-	sp++;
-    }
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_DARK_GC);
-    XDrawSegments(Tk_Display(tkwin), drawable, gc, segments, nSegments);
-}
-#endif
-
-#ifdef notdef
-void
-Blt_SetBackgroundRegion(Background *bgPtr, int x, int y, int w, int h)
-{
-    if (bgPtr->corePtr->reference == REFERENCE_NONE) {
-	bgPtr->corePtr->refRegion.x = x;
-	bgPtr->corePtr->refRegion.y = y;
-	bgPtr->corePtr->refRegion.width = w;
-	bgPtr->corePtr->refRegion.height = h;
-    }
-}
-#endif
-
-void
-Blt_SetBackgroundFromBackground(Tk_Window tkwin, Background *bgPtr)
-{
-    Tk_SetBackgroundFromBorder(tkwin, bgPtr->corePtr->border);
-}
-
-GC
-Blt_BackgroundBorderGC(Tk_Window tkwin, Background *bgPtr, int which)
-{
-    return Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, which);
-}
-
-void
-Blt_SetBackgroundClipRectangles(Tk_Window tkwin, Background *bgPtr, 
-				int originX, int originY, XRectangle rects[], 
-				int n, int ordering)
-{
-    Blt_Painter painter;
-    Display *display;
-    GC gc;
-
-    display = Tk_Display(tkwin);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_LIGHT_GC);
-    XSetClipRectangles(display, gc, originX, originY, rects, n, ordering);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_DARK_GC);
-    XSetClipRectangles(display, gc, originX, originY, rects, n, ordering);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_FLAT_GC);
-    XSetClipRectangles(display, gc, originX, originY, rects, n, ordering);
-    painter = Blt_GetPainter(tkwin, 1.0);
-    gc = Blt_PainterGC(painter);
-    XSetClipRectangles(display, gc, originX, originY, rects, n, ordering);
-}
-
-
-void
-Blt_UnsetBackgroundClipRegion(Tk_Window tkwin, Background *bgPtr)
-{
-    Blt_Painter painter;
-    Display *display;
-    GC gc;
-
-    display = Tk_Display(tkwin);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_LIGHT_GC);
-    XSetClipMask(display, gc, None);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_DARK_GC);
-    XSetClipMask(display, gc, None);
-    gc = Tk_3DBorderGC(tkwin, bgPtr->corePtr->border, TK_3D_FLAT_GC);
-    XSetClipMask(display, gc, None);
-    painter = Blt_GetPainter(tkwin, 1.0);
-    gc = Blt_PainterGC(painter);
-    XSetClipMask(display, gc, None);
-}
diff --git a/blt3.0/src/bltBgStyle.h b/blt3.0/src/bltBgStyle.h
deleted file mode 100644
index 0ef5593..0000000
--- a/blt3.0/src/bltBgStyle.h
+++ /dev/null
@@ -1,87 +0,0 @@
-
-/*
- * bltBgPattern.h --
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_BGPATTERN_H
-#define _BLT_BGPATTERN_H
-
-typedef struct _Blt_Background *Blt_Background;
-
-typedef void Blt_BackgroundChangedProc(ClientData clientData);
-
-BLT_EXTERN Blt_Background Blt_GetBackground(Tcl_Interp *interp, Tk_Window tkwin,
-	const char *styleName);
-
-BLT_EXTERN Blt_Background Blt_GetBackgroundFromObj(Tcl_Interp *interp, 
-	Tk_Window tkwin, Tcl_Obj *objPtr);
-
-BLT_EXTERN XColor *Blt_BackgroundBorderColor(Blt_Background bg);
-
-BLT_EXTERN Tk_3DBorder Blt_BackgroundBorder(Blt_Background bg);
-
-BLT_EXTERN const char *Blt_NameOfBackground(Blt_Background bg);
-
-BLT_EXTERN void Blt_FreeBackground(Blt_Background bg);
-
-BLT_EXTERN void Blt_DrawBackgroundRectangle(Tk_Window tkwin, Drawable drawable,
-	Blt_Background bg, int x, int y, int width, int height, int borderWidth,
-	int relief);
-
-BLT_EXTERN void Blt_FillBackgroundRectangle(Tk_Window tkwin, Drawable drawable,
-	Blt_Background bg, int x, int y, int width, int height, 
-	int borderWidth, int relief);
-
-BLT_EXTERN void Blt_DrawBackgroundPolygon(Tk_Window tkwin, Drawable drawable, 
-	Blt_Background bg, XPoint *points, int nPoints, int borderWidth, 
-	int leftRelief);
-
-BLT_EXTERN void Blt_FillBackgroundPolygon(Tk_Window tkwin, Drawable drawable, 
-	Blt_Background bg, XPoint *points, int nPoints, int borderWidth, 
-	int leftRelief);
-
-BLT_EXTERN void Blt_GetBackgroundOrigin(Blt_Background bg, int *xPtr,int *yPtr);
-
-BLT_EXTERN void Blt_SetBackgroundChangedProc(Blt_Background bg, 
-	Blt_BackgroundChangedProc *notifyProc, ClientData clientData);
-
-BLT_EXTERN void Blt_SetBackgroundOrigin(Tk_Window tkwin, Blt_Background bg, 
-	int x, int y);
-
-BLT_EXTERN void Blt_DrawFocusBackground(Tk_Window tkwin, Blt_Background bg, 
-	int highlightWidth, Drawable drawable);
-
-BLT_EXTERN GC Blt_BackgroundBorderGC(Tk_Window tkwin, Blt_Background bg, 
-	int which);
-
-BLT_EXTERN void Blt_SetBackgroundFromBackground(Tk_Window tkwin, 
-	Blt_Background bg);
-
-BLT_EXTERN void Blt_UnsetBackgroundClipRegion(Tk_Window tkwin, 
-	Blt_Background bg);
-
-BLT_EXTERN void Blt_SetBackgroundClipRectangles(Tk_Window tkwin, 
-	Blt_Background bg, int x, int y, XRectangle *rects, int n, int order);
-
-#endif /* BLT_BGPATTERN_H */
diff --git a/blt3.0/src/bltBgexec.c b/blt3.0/src/bltBgexec.c
deleted file mode 100644
index c08891f..0000000
--- a/blt3.0/src/bltBgexec.c
+++ /dev/null
@@ -1,1997 +0,0 @@
-
-/*
- * bltBgexec.c --
- *
- * This module implements a background "exec" command for the BLT toolkit.
- *
- *	Copyright 1993-1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_BGEXEC
-
-#include <fcntl.h>
-#include <signal.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-
-#include "bltWait.h"
-#include "bltSwitch.h"
-#include "bltChain.h"
-
-static Tcl_ObjCmdProc BgexecCmd;
-
-#define WINDEBUG	0
-
-#if (_TCL_VERSION <  _VERSION(8,1,0)) 
-typedef void *Tcl_Encoding;	/* Make up dummy type for encoding.  */
-#endif
-
-#define ENCODING_ASCII		((Tcl_Encoding)NULL)
-#define ENCODING_BINARY		((Tcl_Encoding)1)
-
-/*
- *  This module creates a replacement of the old Tcl_CreatePipeline call in
- *  the TCL C library.  The prescribed workaround is Tcl_OpenCommandChannel.
- *  But it hides the pids of the pipeline away (unless of course you pry open
- *  the undocumented structure PipeStatus as clientData).  The bigger problem
- *  is that I couldn't figure any way to make one side of the pipe to be
- *  non-blocking.
- */
-
-#ifdef WIN32
-#define read(fd, buf, size)	Blt_AsyncRead((fd),(buf),(size))
-#define close(fd)		CloseHandle((HANDLE)fd)
-#define Tcl_CreateFileHandler	Blt_CreateFileHandler
-#define Tcl_DeleteFileHandler	Blt_DeleteFileHandler
-#define kill			KillProcess
-#define waitpid			WaitProcess
-#endif
-
-#define BGEXEC_THREAD_KEY	"BLT Bgexec Data"
-
-#define READ_AGAIN	(0)
-#define READ_EOF	(-1)
-#define READ_ERROR	(-2)
-
-/* The wait-related definitions are taken from tclUnix.h */
-
-#define TRACE_FLAGS (TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_GLOBAL_ONLY)
-
-#define BLOCK_SIZE	1024		/* Size of allocation blocks for
-					 * buffer */
-#define DEF_BUFFER_SIZE	(BLOCK_SIZE * 8)
-#define MAX_READS       100		/* Maximum number of successful reads
-					 * before stopping to let TCL catch up
-					 * on events */
-
-#ifndef NSIG
-#define NSIG 		32		/* Number of signals available */
-#endif /*NSIG*/
-
-#ifndef SIGINT
-#define SIGINT		2
-#endif /* SIGINT */
-
-#ifndef SIGQUIT
-#define SIGQUIT		3
-#endif /* SIGQUIT */
-
-#ifndef SIGKILL
-#define SIGKILL		9
-#endif /* SIGKILL */
-
-#ifndef SIGTERM
-#define SIGTERM		14
-#endif /* SIGTERM */
-
-typedef struct {
-    int number;
-    const char *name;
-} SignalToken;
-
-static SignalToken signalTokens[] =
-{
-#ifdef SIGABRT
-    {SIGABRT, "SIGABRT"},
-#endif
-#ifdef SIGALRM
-    {SIGALRM, "SIGALRM"},
-#endif
-#ifdef SIGBUS
-    {SIGBUS, "SIGBUS"},
-#endif
-#ifdef SIGCHLD
-    {SIGCHLD, "SIGCHLD"},
-#endif
-#if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD))
-    {SIGCLD, "SIGCLD"},
-#endif
-#ifdef SIGCONT
-    {SIGCONT, "SIGCONT"},
-#endif
-#if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU))
-    {SIGEMT, "SIGEMT"},
-#endif
-#ifdef SIGFPE
-    {SIGFPE, "SIGFPE"},
-#endif
-#ifdef SIGHUP
-    {SIGHUP, "SIGHUP"},
-#endif
-#ifdef SIGILL
-    {SIGILL, "SIGILL"},
-#endif
-#ifdef SIGINT
-    {SIGINT, "SIGINT"},
-#endif
-#ifdef SIGIO
-    {SIGIO, "SIGIO"},
-#endif
-#if defined(SIGIOT) && (!defined(SIGABRT) || (SIGIOT != SIGABRT))
-    {SIGIOT, "SIGIOT"},
-#endif
-#ifdef SIGKILL
-    {SIGKILL, "SIGKILL"},
-#endif
-#if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG))
-    {SIGLOST, "SIGLOST"},
-#endif
-#ifdef SIGPIPE
-    {SIGPIPE, "SIGPIPE"},
-#endif
-#if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO))
-    {SIGPOLL, "SIGPOLL"},
-#endif
-#ifdef SIGPROF
-    {SIGPROF, "SIGPROF"},
-#endif
-#if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ))
-    {SIGPWR, "SIGPWR"},
-#endif
-#ifdef SIGQUIT
-    {SIGQUIT, "SIGQUIT"},
-#endif
-#ifdef SIGSEGV
-    {SIGSEGV, "SIGSEGV"},
-#endif
-#ifdef SIGSTOP
-    {SIGSTOP, "SIGSTOP"},
-#endif
-#ifdef SIGSYS
-    {SIGSYS, "SIGSYS"},
-#endif
-#ifdef SIGTERM
-    {SIGTERM, "SIGTERM"},
-#endif
-#ifdef SIGTRAP
-    {SIGTRAP, "SIGTRAP"},
-#endif
-#ifdef SIGTSTP
-    {SIGTSTP, "SIGTSTP"},
-#endif
-#ifdef SIGTTIN
-    {SIGTTIN, "SIGTTIN"},
-#endif
-#ifdef SIGTTOU
-    {SIGTTOU, "SIGTTOU"},
-#endif
-#if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO))
-    {SIGURG, "SIGURG"},
-#endif
-#if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO))
-    {SIGUSR1, "SIGUSR1"},
-#endif
-#if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG))
-    {SIGUSR2, "SIGUSR2"},
-#endif
-#ifdef SIGVTALRM
-    {SIGVTALRM, "SIGVTALRM"},
-#endif
-#ifdef SIGWINCH
-    {SIGWINCH, "SIGWINCH"},
-#endif
-#ifdef SIGXCPU
-    {SIGXCPU, "SIGXCPU"},
-#endif
-#ifdef SIGXFSZ
-    {SIGXFSZ, "SIGXFSZ"},
-#endif
-    {-1, "unknown signal"},
-};
-
-#ifdef TCL_THREADS
-static Tcl_Mutex *mutexPtr = NULL;
-#endif
-static Blt_Chain activePipelines;	/* List of active pipelines and their
-					 * bgexec structures. */
-
-/*
- * Sink buffer:
- *   ____________________
- *  |                    |  "size"	current allocated length of buffer.
- *  |                    |
- *  |--------------------|  "fill"      fill point (# characters in buffer).
- *  |  Raw               |
- *  |--------------------|  "mark"      Marks end of cooked characters.
- *  |                    |
- *  |  Cooked            |
- *  |                    |
- *  |                    |
- *  |--------------------|  "lastMark"  Mark end of processed characters.
- *  |                    |
- *  |                    |
- *  |  Processed         |
- *  |                    |
- *  |____________________| 0
- */
-typedef struct {
-    const char *name;			/* Name of the sink */
-    const char *doneVar;		/* Name of a TCL variable (malloc'ed)
-					 * set to the collected data of the
-					 * last UNIX * subprocess. */
-    const char *updateVar;		/* Name of a TCL variable (malloc'ed)
-					 * updated as data is read from the
-					 * pipe. */
-    char **updateCmd;			/* Start of a TCL command executed
-					 * whenever data is read from the
-					 * pipe. */
-    Tcl_Obj **objv;			/* Vector or Tcl_Obj representing
-					 * arguments from the above update
-					 * command. */
-    int objc;				/* # of arguments in vector. */
-    int flags;			
-    Tcl_Encoding encoding;		/* Decoding scheme to use when
-					 * translating data. */
-    int fd;				/* File descriptor of the pipe. */
-    int status;
-    int echo;				/* Indicates if the pipeline's stderr
-					 * stream should be echoed */
-
-    unsigned char *bytes;		/* Stores pipeline output (malloc-ed):
-					 * Initially points to static
-					 * storage */
-    int size;				/* Size of dynamically allocated
-					 * buffer. */
-
-    int fill;				/* # of bytes read into the
-					 * buffer. Marks the current fill
-					 * point of the buffer. */
-
-    int mark;				/* # of bytes translated (cooked). */
-    int lastMark;			/* # of bytes as of the last read. This
-					 * indicates the start of the new data
-					 * in the buffer since the last time
-					 * the "update" variable was set. */
-    unsigned char staticSpace[DEF_BUFFER_SIZE];	/* Static space */
-
-} Sink;
-
-#define SINK_BUFFERED		(1<<0)
-#define SINK_KEEP_NL		(1<<1)
-#define SINK_NOTIFY		(1<<2)
-
-typedef struct {
-    const char *statVar;		/* Name of a TCL variable set to the
-					 * exit status of the last
-					 * process. Setting this variable
-					 * triggers the termination of all
-					 * subprocesses (regardless whether
-					 * they have already completed) */
-    int signalNum;			/* If non-zero, indicates the signal
-					 * to send subprocesses when cleaning
-					 * up.*/
-    unsigned int flags;			/* Various bit flags: see below. */
-    int interval;			/* Interval to poll for the exiting
-					 * processes */
-    /* Private */
-    Tcl_Interp *interp;			/* Interpreter containing variables */
-    int nProcs;				/* # of processes in pipeline */
-    ProcessId *procIds;			/* Array of process tokens from
-					 * pipeline.  Under Unix, tokens are
-					 * pid_t, while for Win32 they're
-					 * handles. */
-    Tcl_TimerToken timerToken;		/* Token for timer handler which polls
-					 * for the exit status of each
-					 * sub-process. If zero, there's no
-					 * timer handler queued. */
-    int *exitCodePtr;			/* Pointer to a memory location to
-					 * contain the last process' exit
-					 * code. */
-    int *donePtr;
-    Sink err, out;			/* Data sinks for pipeline's output
-					 * and error channels. */
-    Blt_ChainLink link;
-} Bgexec;
-
-#define KEEPNEWLINE	(1<<0)		/* Indicates to set TCL output
-					 * variables with trailing newlines
-					 * intact */
-#define LINEBUFFERED	(1<<1)		/* Indicates to provide data to update
-					 * variable and update proc on a
-					 * line-by-line * basis. */
-#define IGNOREEXITCODE	(1<<2)		/* Don't check for 0 exit status of
-					 * the pipeline.  */
-#define TRACED		(1<<3)		/* Indicates that the status variable
-					 * is currently being traced. */
-#define DETACHED	(1<<4)		/* Indicates that the pipeline is
-					 * detached from standard I/O, running
-					 * in the background. */
-
-static Blt_SwitchParseProc ObjToSignalProc;
-static Blt_SwitchCustom killSignalSwitch =
-{
-    ObjToSignalProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc ObjToEncodingProc;
-static Blt_SwitchFreeProc FreeEncodingProc;
-static Blt_SwitchCustom encodingSwitch =
-{
-    ObjToEncodingProc, FreeEncodingProc, (ClientData)0,
-};
-
-static Blt_SwitchSpec switchSpecs[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-decodeoutput",  "encoding",
-	Blt_Offset(Bgexec, out.encoding),  0, 0, &encodingSwitch}, 
-    {BLT_SWITCH_CUSTOM,  "-decodeerror",   "encoding",
-	 Blt_Offset(Bgexec, err.encoding),  0, 0, &encodingSwitch},
-    {BLT_SWITCH_BOOLEAN, "-echo",           "bool", 
-         Blt_Offset(Bgexec, err.echo),	 0},
-    {BLT_SWITCH_STRING,  "-error",          "variable",
-	Blt_Offset(Bgexec, err.doneVar),   0},
-    {BLT_SWITCH_STRING,  "-update",         "variable",
-	 Blt_Offset(Bgexec, out.updateVar), 0},
-    {BLT_SWITCH_STRING,  "-output",         "variable",
-	Blt_Offset(Bgexec, out.doneVar),   0},
-    {BLT_SWITCH_STRING,  "-lasterror",      "variable",
-	Blt_Offset(Bgexec, err.updateVar), 0},
-    {BLT_SWITCH_STRING,  "-lastoutput",     "variable",
-	Blt_Offset(Bgexec, out.updateVar), 0},
-    {BLT_SWITCH_LIST,    "-onerror",        "command",
-	Blt_Offset(Bgexec, err.updateCmd), 0},
-    {BLT_SWITCH_LIST,    "-onoutput",       "command",
-	Blt_Offset(Bgexec, out.updateCmd), 0},
-    {BLT_SWITCH_BOOLEAN, "-keepnewline",    "bool",
-	Blt_Offset(Bgexec, flags),	   0,	KEEPNEWLINE}, 
-    {BLT_SWITCH_INT,	 "-check",          "interval",
-	Blt_Offset(Bgexec, interval),      0},
-    {BLT_SWITCH_CUSTOM,  "-killsignal",     "signal",
-	Blt_Offset(Bgexec, signalNum),     0,   0, &killSignalSwitch},
-    {BLT_SWITCH_BOOLEAN, "-linebuffered",   "bool",
-	Blt_Offset(Bgexec, flags),	   0,	LINEBUFFERED},
-    {BLT_SWITCH_BOOLEAN, "-ignoreexitcode", "bool",
-	Blt_Offset(Bgexec, flags),	   0,	IGNOREEXITCODE},
-    {BLT_SWITCH_END}
-};
-
-static Tcl_VarTraceProc VariableProc;
-static Tcl_TimerProc TimerProc;
-static Tcl_FileProc StdoutProc, StderrProc;
-static Tcl_ExitProc BgexecExitProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSignalProc --
- *
- *	Convert a Tcl_Obj representing a signal number into its integer
- *	value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSignalProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Intrepreter to return results */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* Value representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    char *string;
-    int *signalPtr = (int *)(record + offset);
-    int signalNum;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	*signalPtr = 0;
-	return TCL_OK;
-    }
-    if (isdigit(UCHAR(string[0]))) {
-	if (Tcl_GetIntFromObj(interp, objPtr, &signalNum) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	char *name;
-	SignalToken *sp;
-
-	name = string;
-
-	/*  Clip off any "SIG" prefix from the signal name */
-	if ((name[0] == 'S') && (name[1] == 'I') && (name[2] == 'G')) {
-	    name += 3;
-	}
-	signalNum = -1;
-	for (sp = signalTokens; sp->number > 0; sp++) {
-	    if (strcmp(sp->name + 3, name) == 0) {
-		signalNum = sp->number;
-		break;
-	    }
-	}
-	if (signalNum < 0) {
-	    Tcl_AppendResult(interp, "unknown signal \"", string, "\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if ((signalNum < 0) || (signalNum > NSIG)) {
-	/* Outside range of signals */
-	Tcl_AppendResult(interp, "signal number \"", string,
-	    "\" is out of range", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *signalPtr = signalNum;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToEncodingProc --
- *
- *	Convert a Tcl_Obj representing a encoding into a Tcl_Encoding.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToEncodingProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Intrepreter to return results */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* Value representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Tcl_Encoding *encodingPtr = (Tcl_Encoding *)(record + offset);
-    Tcl_Encoding encoding;
-    const char *name;
-
-    name = Tcl_GetString(objPtr);
-    encoding = ENCODING_ASCII;
-    if (name != NULL) {
-	if (strcmp(name, "binary") == 0) {
-	    encoding = ENCODING_BINARY;
-	} else {
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-	    encoding = Tcl_GetEncoding(interp, name);
-	    if (encoding == NULL) {
-		return TCL_ERROR;
-	    }
-#endif
-	}
-    }
-    if ((*encodingPtr != ENCODING_BINARY) && (*encodingPtr != ENCODING_ASCII)) {
-	Tcl_FreeEncoding(*encodingPtr);
-    }
-    *encodingPtr = encoding;
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static void
-FreeEncodingProc(char *record, int offset, int flags)
-{
-    Tcl_Encoding *encodingPtr = (Tcl_Encoding *)(record + offset);
-
-    if ((*encodingPtr != ENCODING_BINARY) && (*encodingPtr != ENCODING_ASCII)) {
-	Tcl_FreeEncoding(*encodingPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetSinkData --
- *
- *	Returns the data currently saved in the buffer
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetSinkData(Sink *sinkPtr, unsigned char **dataPtr, int *lengthPtr)
-{
-    int length;
-
-    sinkPtr->bytes[sinkPtr->mark] = '\0';
-    length = sinkPtr->mark;
-    if ((sinkPtr->mark > 0) && (sinkPtr->encoding != ENCODING_BINARY)) {
-	unsigned char *last;
-
-	last = sinkPtr->bytes + (sinkPtr->mark - 1);
-	if (((sinkPtr->flags & SINK_KEEP_NL) == 0) && (*last == '\n')) {
-	    length--;
-	}
-    }
-    *dataPtr = sinkPtr->bytes;
-    *lengthPtr = length;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextBlock --
- *
- *	Returns the next block of data since the last time this routine was
- *	called.
- *
- *---------------------------------------------------------------------------
- */
-static unsigned char *
-NextBlock(Sink *sinkPtr, int *lengthPtr)
-{
-    unsigned char *string;
-    int length;
-
-    string = sinkPtr->bytes + sinkPtr->lastMark;
-    length = sinkPtr->mark - sinkPtr->lastMark;
-    sinkPtr->lastMark = sinkPtr->mark;
-    if (length > 0) {
-	if ((!(sinkPtr->flags & SINK_KEEP_NL)) && (string[length-1] == '\n')) {
-	    length--;
-	}
-	*lengthPtr = length;
-	return string;
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextLine --
- *
- *	Returns the next line of data.
- *
- *---------------------------------------------------------------------------
- */
-static unsigned char *
-NextLine(Sink *sinkPtr, int *lengthPtr)
-{
-    if (sinkPtr->mark > sinkPtr->lastMark) {
-	unsigned char *string;
-	int newBytes;
-	int i;
-
-	string = sinkPtr->bytes + sinkPtr->lastMark;
-	newBytes = sinkPtr->mark - sinkPtr->lastMark;
-	for (i = 0; i < newBytes; i++) {
-	    if (string[i] == '\n') {
-		int length;
-		
-		length = i + 1;
-		sinkPtr->lastMark += length;
-		if (!(sinkPtr->flags & SINK_KEEP_NL)) {
-		    length--;		/* Backup over the newline. */
-		}
-		*lengthPtr = length;
-		return string;
-	    }
-	}
-	/* Newline not found.  On errors or EOF, also return a partial line. */
-	if (sinkPtr->status < 0) {
-	    *lengthPtr = newBytes;
-	    sinkPtr->lastMark = sinkPtr->mark;
-	    return string;
-	}
-    }
-    return NULL;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * ResetSink --
- *
- *	Removes the bytes already processed from the buffer, possibly
- *	resetting it to empty.  This used when we don't care about keeping all
- *	the data collected from the channel (no -output flag and the process
- *	is detached).
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetSink(Sink *sinkPtr)
-{ 
-    if ((sinkPtr->flags & SINK_BUFFERED) && 
-	(sinkPtr->fill > sinkPtr->lastMark)) {
-	int i, j;
-
-	/* There may be bytes remaining in the buffer, awaiting another read
-	 * before we see the next newline.  So move the bytes to the front of
-	 * the array. */
-
- 	for (i = 0, j = sinkPtr->lastMark; j < sinkPtr->fill; i++, j++) {
-	    sinkPtr->bytes[i] = sinkPtr->bytes[j];
-	}
-	/* Move back the fill point and processed point. */
-	sinkPtr->fill -= sinkPtr->lastMark;
-	sinkPtr->mark -= sinkPtr->lastMark;
-    } else {
-	sinkPtr->mark = sinkPtr->fill = 0;
-    }
-    sinkPtr->lastMark = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InitSink --
- *
- *	Initializes the buffer's storage.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Storage is cleared.
- *
- *---------------------------------------------------------------------------
- */
-static void
-InitSink(Bgexec *bgPtr, Sink *sinkPtr, const char *name)
-{
-    sinkPtr->name = name;
-    sinkPtr->echo = FALSE;
-    sinkPtr->fd = -1;
-    sinkPtr->bytes = sinkPtr->staticSpace;
-    sinkPtr->size = DEF_BUFFER_SIZE;
-
-    if (bgPtr->flags & KEEPNEWLINE) {
-	sinkPtr->flags |= SINK_KEEP_NL;
-    }
-    if (bgPtr->flags & LINEBUFFERED) {
-	sinkPtr->flags |= SINK_BUFFERED;
-    }	
-    if ((sinkPtr->updateCmd != NULL) || 
-	(sinkPtr->updateVar != NULL) ||
-	(sinkPtr->echo)) {
-	sinkPtr->flags |= SINK_NOTIFY;
-    }
-    if (sinkPtr->updateCmd != NULL) {
-	Tcl_Obj **objv;
-	char **p;
-	int objc;
-	int i;
-
-	objc = 0;
-	for (p = sinkPtr->updateCmd; *p != NULL; p++) {
-	    objc++;
-	}
-	objv = Blt_AssertMalloc((objc + 1) * sizeof(Tcl_Obj *));
-	for (i = 0; i < objc; i++) {
-	    objv[i] = Tcl_NewStringObj(sinkPtr->updateCmd[i], -1);
-	    Tcl_IncrRefCount(objv[i]);
-	}
-	sinkPtr->objv = objv;
-	sinkPtr->objc = objc + 1;
-    }
-    ResetSink(sinkPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeSinkBuffer --
- *
- *	Frees the buffer's storage, freeing any malloc'ed space.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeSinkBuffer(Sink *sinkPtr)
-{
-    if (sinkPtr->bytes != sinkPtr->staticSpace) {
-	Blt_Free(sinkPtr->bytes);
-    }
-    sinkPtr->fd = -1;
-    if (sinkPtr->objv != NULL) {
-	int i;
-
-	for (i = 0; i < sinkPtr->objc - 1; i++) {
-	    Tcl_DecrRefCount(sinkPtr->objv[i]);
-	}
-	Blt_Free(sinkPtr->objv);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExtendSinkBuffer --
- *
- *	Doubles the size of the current buffer.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ExtendSinkBuffer(Sink *sinkPtr)
-{
-    unsigned char *bytes;
-    /*
-     * Allocate a new array, double the old size
-     */
-    sinkPtr->size += sinkPtr->size;
-    bytes = Blt_Malloc(sizeof(unsigned char) * sinkPtr->size);
-    if (bytes != NULL) {
-	unsigned char *sp, *dp, *send;
-
-	dp = bytes;
-	for (sp = sinkPtr->bytes, send = sp + sinkPtr->fill; sp < send; 
-	     /*empty*/) {
-	    *dp++ = *sp++;
-	}
-	if (sinkPtr->bytes != sinkPtr->staticSpace) {
-	    Blt_Free(sinkPtr->bytes);
-	}
-	sinkPtr->bytes = bytes;
-	return (sinkPtr->size - sinkPtr->fill); /* Return bytes left. */
-    }
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadBytes --
- *
- *	Reads and appends any available data from a given file descriptor
- *	to the buffer.
- *
- * Results:
- *	Returns TCL_OK when EOF is found, TCL_RETURN if reading data would
- *	block, and TCL_ERROR if an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReadBytes(Sink *sinkPtr)
-{
-    int i;
-    int nBytes;
-
-    /*
-     * 	Worry about indefinite postponement.
-     *
-     * 	Typically we want to stay in the read loop as long as it takes to
-     * 	collect all the data that's currently available.  But if it's coming
-     * 	in at a constant high rate, we need to arbitrarily break out at some
-     * 	point. This allows for both setting the update variable and the Tk
-     * 	program to handle idle events.
-     */
-    nBytes = 0;
-    for (i = 0; i < MAX_READS; i++) {
-	int bytesLeft;
-	unsigned char *array;
-
-	/* Allocate a larger buffer when the number of remaining bytes is
-	 * below the threshold BLOCK_SIZE.  */
-
-	bytesLeft = sinkPtr->size - sinkPtr->fill;
-
-	if (bytesLeft < BLOCK_SIZE) {
-	    bytesLeft = ExtendSinkBuffer(sinkPtr);
-	    if (bytesLeft < 0) {
-		errno = ENOMEM;
-		sinkPtr->status = READ_ERROR;
-		return;
-	    }
-	}
-	array = sinkPtr->bytes + sinkPtr->fill;
-
-	/* Read into a buffer but make sure we leave room for a trailing NUL
-	 * byte. */
-	nBytes = read(sinkPtr->fd, array, bytesLeft - 1);
-	if (nBytes == 0) {	/* EOF: break out of loop. */
-	    sinkPtr->status = READ_EOF;
-	    return;
-	}
-	if (nBytes < 0) {
-#ifdef O_NONBLOCK
-#define BLOCKED		EAGAIN
-#else
-#define BLOCKED		EWOULDBLOCK
-#endif /*O_NONBLOCK*/
-	    /* Either an error has occurred or no more data is currently
-	     * available to read.  */
-	    if (errno == BLOCKED) {
-		sinkPtr->status = READ_AGAIN;
-		return;
-	    }
-	    sinkPtr->bytes[0] = '\0';
-	    sinkPtr->status = READ_ERROR;
-	    return;
-	}
-	sinkPtr->fill += nBytes;
-	sinkPtr->bytes[sinkPtr->fill] = '\0';
-    }
-    sinkPtr->status = nBytes;
-}
-
-#define SINKOPEN(sinkPtr)  ((sinkPtr)->fd != -1)
-
-static void
-CloseSink(Tcl_Interp *interp, Sink *sinkPtr)
-{
-    if (SINKOPEN(sinkPtr)) {
-	close(sinkPtr->fd);
-	Tcl_DeleteFileHandler(sinkPtr->fd);
-	sinkPtr->fd = -1;
-
-#if WINDEBUG
-	PurifyPrintf("CloseSink: set done var %s\n", sinkPtr->name);
-#endif
-	if (sinkPtr->doneVar != NULL) {
-	    unsigned char *data;
-	    int length;
-	    /* 
-	     * If data is to be collected, set the "done" variable with the
-	     * contents of the buffer.
-	     */
-	    GetSinkData(sinkPtr, &data, &length);
-#if (_TCL_VERSION <  _VERSION(8,1,0)) 
-	    data[length] = '\0';
-	    if (Tcl_SetVar(interp, sinkPtr->doneVar, data, 
-			   TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		Tcl_BackgroundError(interp);
-	    }
-#else
-	    if (Tcl_SetVar2Ex(interp, sinkPtr->doneVar, NULL, 
-			Tcl_NewByteArrayObj(data, (int)length),
-			TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		Tcl_BackgroundError(interp);
-	    }
-#endif
-	}
-#if WINDEBUG
-	PurifyPrintf("CloseSink %s: done\n", sinkPtr->name);
-#endif
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CookSink --
- *
- *	For Windows, translate CR/NL combinations to NL alone.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the byte array may shrink and array contents shifted as
- *	carriage returns are found and removed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CookSink(Tcl_Interp *interp, Sink *sinkPtr)
-{
-    unsigned char *srcPtr, *endPtr;
-#ifdef WIN32
-    int oldMark;
-
-    oldMark = sinkPtr->mark;
-#endif
-    if (sinkPtr->encoding == ENCODING_BINARY) { /* binary */
-	/* No translation needed. */
-	sinkPtr->mark = sinkPtr->fill; 
-    } else if (sinkPtr->encoding == ENCODING_ASCII) { /* ascii */
-#if (_TCL_VERSION <  _VERSION(8,1,0)) 
-	/* Convert NUL bytes to question marks. */
-	srcPtr = sinkPtr->bytes + sinkPtr->mark;
-	endPtr = sinkPtr->bytes + sinkPtr->fill;
-	while (srcPtr < endPtr) {
-	    if (*srcPtr == '\0') {
-		*srcPtr = '?';
-	    }
-	    srcPtr++;
-	}
-#endif /* < 8.1.0 */
-	/* One-to-one translation. mark == fill. */
-	sinkPtr->mark = sinkPtr->fill;
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    } else { /* unicode. */
-	int nSrcCooked, nCooked;
-	int result;
-	int cookedSize, spaceLeft, needed;
-	int nRaw, nLeftOver;
-	unsigned char *destPtr;
-	unsigned char *raw, *cooked;
-	unsigned char leftover[100];
-	
-	raw = sinkPtr->bytes + sinkPtr->mark;
-	nRaw = sinkPtr->fill - sinkPtr->mark;
-	/* Ideally, the cooked buffer size should be smaller */
-	cookedSize = nRaw * TCL_UTF_MAX + 1;
-	cooked = Blt_AssertMalloc(cookedSize);
-	result = Tcl_ExternalToUtf(interp, sinkPtr->encoding, 
-			(char *)raw, nRaw, 0, NULL, (char *)cooked, 
-			cookedSize, &nSrcCooked, &nCooked, NULL);
-	nLeftOver = 0;
-	if (result == TCL_CONVERT_MULTIBYTE) {
-	    /* 
-	     * Last multibyte sequence wasn't completed.  Save the extra
-	     * characters in a temporary buffer.
-	     */
-	    nLeftOver = (nRaw - nSrcCooked);
-	    srcPtr = sinkPtr->bytes + (sinkPtr->mark + nSrcCooked); 
-	    endPtr = srcPtr + nLeftOver;
-	    destPtr = leftover;
-	    while (srcPtr < endPtr) {
-		*destPtr++ = *srcPtr++;
-	    }
-	} 
-	/*
-	 * Create a bigger sink.
-	 */
-						 
-	needed = nLeftOver + nCooked;
-	spaceLeft = sinkPtr->size - sinkPtr->mark;
-	if (spaceLeft >= needed) {
-	    spaceLeft = ExtendSinkBuffer(sinkPtr);
-	}
-	assert(spaceLeft > needed);
-	/* 
-	 * Replace the characters from the mark with the translated
-	 * characters.
-	 */
-	srcPtr = cooked;
-	endPtr = cooked + nCooked;
-	destPtr = sinkPtr->bytes + sinkPtr->mark;
-	while (srcPtr < endPtr) {
-	    *destPtr++ = *srcPtr++;
-	}
-	/* Add the number of newly translated characters to the mark */
-	sinkPtr->mark += nCooked;
-	
-	srcPtr = leftover;
-	endPtr = leftover + nLeftOver;
-	while (srcPtr < endPtr) {
-	    *destPtr++ = *srcPtr++;
-	}
-	sinkPtr->fill = sinkPtr->mark + nLeftOver;
-#endif /* >= 8.1.0  */
-    }
-#ifdef WIN32
-    /* 
-     * Translate CRLF character sequences to LF characters.  We have to do
-     * this after converting the string to UTF from UNICODE.
-     */
-    if (sinkPtr->encoding != ENCODING_BINARY) {
-	int count;
-	unsigned char *destPtr;
-
-	destPtr = srcPtr = sinkPtr->bytes + oldMark;
-	endPtr = sinkPtr->bytes + sinkPtr->fill;
-	*endPtr = '\0';
-	count = 0;
-	for (endPtr--; srcPtr < endPtr; srcPtr++) {
-	    if ((*srcPtr == '\r') && (*(srcPtr + 1) == '\n')) {
-		count++;
-		continue;		/* Skip the CR in CR/LF sequences. */
-	    }
-	    if (srcPtr != destPtr) {
-		*destPtr = *srcPtr;	/* Collapse the string, overwriting
-					 * the \r's encountered. */
-	    }
-	    destPtr++;
-	}
-	sinkPtr->mark -= count;
-	sinkPtr->fill -= count;
-	*destPtr = *srcPtr;		/* Copy the last byte */
-	if (*destPtr == '\r') {
-	    sinkPtr->mark--;
-	}
-    }
-#endif /* WIN32 */
-}
-
-#ifdef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * WaitProcess --
- *
- *	Emulates the waitpid system call under the Win32 API.
- *
- * Results:
- *	Returns 0 if the process is still alive, -1 on an error, or the pid on
- *	a clean close.
- *
- * Side effects:
- *	Unless WNOHANG is set and the wait times out, the process information
- *	record will be deleted and the process handle will be closed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-WaitProcess(
-    ProcessId child,
-    int *statusPtr,
-    int flags)
-{
-    DWORD status, exitCode;
-    int result;
-    int timeout;
-
-#if WINDEBUG
-    PurifyPrintf("WAITPID(%x)\n", child.hProcess);
-#endif
-    *statusPtr = 0;
-    if (child.hProcess == INVALID_HANDLE_VALUE) {
-	errno = EINVAL;
-	return -1;
-    }
-#if WINDEBUG
-    PurifyPrintf("WAITPID: waiting for 0x%x\n", child.hProcess);
-#endif
-    timeout = (flags & WNOHANG) ? 0 : INFINITE;
-    status = WaitForSingleObject(child.hProcess, timeout);
-				 
-#if WINDEBUG
-    PurifyPrintf("WAITPID: wait status is %d\n", status);
-#endif
-    switch (status) {
-    case WAIT_FAILED:
-	errno = ECHILD;
-	*statusPtr = ECHILD;
-	result = -1;
-	break;
-
-    case WAIT_TIMEOUT:
-	if (timeout == 0) {
-	    return 0;			/* Try again */
-	}
-	result = 0;
-	break;
-
-    default:
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-	GetExitCodeProcess(child.hProcess, &exitCode);
-	*statusPtr = ((exitCode << 8) & 0xff00);
-#if WINDEBUG
-	PurifyPrintf("WAITPID: exit code of %d is %d (%x)\n", child.hProcess,
-	    *statusPtr, exitCode);
-#endif
-	result = child.pid;
-	assert(result != -1);
-	break;
-    }
-    CloseHandle(child.hProcess);
-    return result;
-}
-
-static BOOL CALLBACK
-EnumWindowsProc(HWND hWnd, LPARAM lParam)
-{
-    DWORD pid = 0;
-    ProcessId *procPtr = (ProcessId *)lParam;
-
-    GetWindowThreadProcessId(hWnd, &pid);
-    if (pid == procPtr->pid) {
-	PostMessage(hWnd, WM_CLOSE, 0, 0);
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * KillProcess --
- *
- *	Emulates the UNIX kill system call under Win32 API.
- *
- * Results:
- *	Returns 0 if the process is killed, -1 on an error.
- *
- * Side effects:
- *	Process is terminated.
- *
- *---------------------------------------------------------------------------
- */
-static int
-KillProcess(ProcessId proc, int signal)
-{
-    DWORD status;
-
-    if ((proc.hProcess == NULL) || (proc.hProcess == INVALID_HANDLE_VALUE)) {
-	errno = EINVAL;
-	return -1;
-    }
-
-    EnumWindows(EnumWindowsProc, (LPARAM)&proc);
-
-    /* 
-     * Wait on the handle. If it signals, great. If it times out, then call
-     * TerminateProcess on it.
-     *
-     * On Windows 95/98 this also has the added benefit of stopping
-     * KERNEL32.dll from dumping.  The 2 second number is arbitrary (1 second
-     * seems to fail intermittently).
-     */
-    status = WaitForSingleObject(proc.hProcess, 2000);
-    if (status == WAIT_OBJECT_0) {
-	return 0;
-    }
-    if (!TerminateProcess(proc.hProcess, 1)) {
-#if WINDEBUG
-	PurifyPrintf("can't terminate process (handle=%d): %s\n",
-		     proc.hProcess, Blt_LastError());
-#endif /* WINDEBUG */
-	return -1;
-    }
-    return 0;
-}
-
-#endif /* WIN32 */
-
-#if (_TCL_VERSION < _VERSION(8,1,0)) 
-
-static void
-NotifyOnUpdate(Tcl_Interp *interp, Sink *sinkPtr, unsigned char *data, 
-	       int nBytes)
-{
-    char save;
-
-#if WINDEBUG
-    PurifyPrintf("read %s\n", data);
-#endif
-    if (data[0] == '\0') {
-	return;
-    }
-    save = data[nBytes];
-    data[nBytes] = '\0';
-    if (sinkPtr->echo) {
-	Tcl_Channel channel;
-	
-	channel = Tcl_GetStdChannel(TCL_STDERR);
-	if (channel == NULL) {
-	    Tcl_AppendResult(interp, "can't get stderr channel", (char *)NULL);
-	    Tcl_BackgroundError(interp);
-	    sinkPtr->echo = FALSE;
-	} else {
-	    Tcl_Write(channel, data, nBytes);
-	    if (save == '\n') {
-		Tcl_Write(channel, "\n", 1);
-	    }
-	    Tcl_Flush(channel);
-	}
-    }
-    if (sinkPtr->updateCmd != NULL) {
-	Tcl_DString dString;
-	char **p;
-	int result;
-
-	Tcl_DStringInit(&dString);
-	for (p = sinkPtr->updateCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&dString, *p);
-	}
-	Tcl_DStringAppendElement(&dString, data);
-	result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-	if (result != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    if (sinkPtr->updateVar != NULL) {
-	if (Tcl_SetVar(interp, sinkPtr->updateVar, data, 
-		       TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    data[nBytes] = save;
-}
-
-#else 
-
-static void
-NotifyOnUpdate(Tcl_Interp *interp, Sink *sinkPtr, unsigned char *data, 
-	       int nBytes)
-{
-    Tcl_Obj *objPtr;
-
-#if WINDEBUG
-    PurifyPrintf("read %s\n", data);
-#endif
-    if ((nBytes == 0) || (data[0] == '\0')) {
-	return;
-    }
-    if (sinkPtr->echo) {
-	Tcl_Channel channel;
-	
-	channel = Tcl_GetStdChannel(TCL_STDERR);
-	if (channel == NULL) {
-	    Tcl_AppendResult(interp, "can't get stderr channel", (char *)NULL);
-	    Tcl_BackgroundError(interp);
-	    sinkPtr->echo = FALSE;
-	} else {
-	    if (data[nBytes] == '\n') {
-		objPtr = Tcl_NewByteArrayObj(data, nBytes + 1);
-	    } else {
-		objPtr = Tcl_NewByteArrayObj(data, nBytes);
-	    }
-	    Tcl_WriteObj(channel, objPtr);
-	    Tcl_Flush(channel);
-	}
-    }
-
-    objPtr = Tcl_NewByteArrayObj(data, nBytes);
-    Tcl_IncrRefCount(objPtr);
-    if (sinkPtr->objv != NULL) {
-	int result;
-
-	sinkPtr->objv[sinkPtr->objc - 1] = objPtr;
-	result = Tcl_EvalObjv(interp, sinkPtr->objc, sinkPtr->objv, 0);
-	if (result != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    if (sinkPtr->updateVar != NULL) {
-	if (Tcl_SetVar2Ex(interp, sinkPtr->updateVar, NULL, objPtr, 
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    Tcl_DecrRefCount(objPtr);
-}
-
-#endif /* < 8.1.0 */
-
-static int
-CollectData(Bgexec *bgPtr, Sink *sinkPtr)
-{
-    if ((bgPtr->flags & DETACHED) && (sinkPtr->doneVar == NULL)) {
-	ResetSink(sinkPtr);
-    }
-    ReadBytes(sinkPtr);
-    CookSink(bgPtr->interp, sinkPtr);
-    if ((sinkPtr->mark > sinkPtr->lastMark) && (sinkPtr->flags & SINK_NOTIFY)) {
-	if (sinkPtr->flags & SINK_BUFFERED) {
-	    int length;
-	    unsigned char *data;
-
-	    /* For line-by-line updates, call NotifyOnUpdate for each new
-	     * complete line.  */
-	    while ((data = NextLine(sinkPtr, &length)) != NULL) {
-		NotifyOnUpdate(bgPtr->interp, sinkPtr, data, length);
- 	    }
-	} else {
-	    int length;
-	    unsigned char *data;
-
-	    length = 0;			/* Suppress compiler warning. */
-	    data = NextBlock(sinkPtr, &length);
-	    NotifyOnUpdate(bgPtr->interp, sinkPtr, data, length);
-	}
-    }
-    if (sinkPtr->status >= 0) {
-	return TCL_OK;
-    }
-    if (sinkPtr->status == READ_ERROR) {
-	Tcl_AppendResult(bgPtr->interp, "can't read data from ", sinkPtr->name,
-	    ": ", Tcl_PosixError(bgPtr->interp), (char *)NULL);
-	Tcl_BackgroundError(bgPtr->interp);
-	return TCL_ERROR;
-    }
-#if WINDEBUG
-    PurifyPrintf("CollectData %s: done\n", sinkPtr->name);
-#endif
-    return TCL_RETURN;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateSinkHandler --
- *
- *	Creates a file handler for the given sink.  The file descriptor is
- *	also set for non-blocking I/O.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The memory allocated to the Bgexec structure released.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateSinkHandler(Bgexec *bgPtr, Sink *sinkPtr, Tcl_FileProc *proc)
-{
-#ifndef WIN32
-    int flags;
-
-    flags = fcntl(sinkPtr->fd, F_GETFL);
-#ifdef O_NONBLOCK
-    flags |= O_NONBLOCK;
-#else
-    flags |= O_NDELAY;
-#endif
-    if (fcntl(sinkPtr->fd, F_SETFL, flags) < 0) {
-	Tcl_AppendResult(bgPtr->interp, "can't set file descriptor ",
-	    Blt_Itoa(sinkPtr->fd), " to non-blocking:",
-	    Tcl_PosixError(bgPtr->interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-#endif /* WIN32 */
-    Tcl_CreateFileHandler(sinkPtr->fd, TCL_READABLE, proc, bgPtr);
-    return TCL_OK;
-}
-
-static void
-DisableTriggers(Bgexec *bgPtr) /* Background info record. */
-{
-    if (bgPtr->flags & TRACED) {
-	Tcl_UntraceVar(bgPtr->interp, bgPtr->statVar, TRACE_FLAGS, 
-		VariableProc, bgPtr);
-	bgPtr->flags &= ~TRACED;
-    }
-    if (SINKOPEN(&bgPtr->out)) {
-	CloseSink(bgPtr->interp, &bgPtr->out);
-    }
-    if (SINKOPEN(&bgPtr->err)) {
-	CloseSink(bgPtr->interp, &bgPtr->err);
-    }
-    if (bgPtr->timerToken != (Tcl_TimerToken) 0) {
-	Tcl_DeleteTimerHandler(bgPtr->timerToken);
-	bgPtr->timerToken = 0;
-    }
-    if (bgPtr->donePtr != NULL) {
-	*bgPtr->donePtr = TRUE;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeBgexec --
- *
- *	Releases the memory allocated for the backgrounded process.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeBgexec(Bgexec *bgPtr)
-{
-    Blt_FreeSwitches(switchSpecs, (char *)bgPtr, 0);
-    if (bgPtr->statVar != NULL) {
-	Blt_Free(bgPtr->statVar);
-    }
-    if (bgPtr->procIds != NULL) {
-	Blt_Free(bgPtr->procIds);
-    }
-    if (bgPtr->link != NULL) {
-	Tcl_MutexLock(mutexPtr);
-	Blt_Chain_DeleteLink(activePipelines, bgPtr->link);
-	Tcl_MutexUnlock(mutexPtr);
-    }
-    Blt_Free(bgPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * KillProcesses --
- *
- * 	Cleans up background execution processes and memory.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The memory allocated to the Bgexec structure released.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-KillProcesses(Bgexec *bgPtr)		/* Background info record. */
-{
-    if (bgPtr->procIds != NULL) {
-	int i;
-
-	for (i = 0; i < bgPtr->nProcs; i++) {
-	    Tcl_Pid tclPid;
-
-	    if (bgPtr->signalNum > 0) {
-		kill(bgPtr->procIds[i], bgPtr->signalNum);
-	    }
-#ifdef WIN32
-	    tclPid = (Tcl_Pid)bgPtr->procIds[i].pid;
-#else
-	    {
-	    	unsigned long pid;
-
-	    	pid = (long)bgPtr->procIds[i];
-	    	tclPid = (Tcl_Pid)pid;
-            }
-#endif /* WIN32 */
-	    Tcl_DetachPids(1, &tclPid);
-	}
-    }
-    Tcl_ReapDetachedProcs();
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyBgexec --
- *
- * 	Cleans up background execution processes and memory.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The memory allocated to the Bgexec structure released.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-DestroyBgexec(Bgexec *bgPtr)		/* Background info record. */
-{
-    DisableTriggers(bgPtr);
-    FreeSinkBuffer(&bgPtr->err);
-    FreeSinkBuffer(&bgPtr->out);
-    KillProcesses(bgPtr);
-    FreeBgexec(bgPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VariableProc --
- *
- *	Kills all currently running subprocesses (given the specified
- *	signal). This procedure is called when the user sets the status
- *	variable associated with this group of child subprocesses.
- *
- * Results:
- *	Always returns NULL.  Only called from a variable trace.
- *
- * Side effects:
- *	The subprocesses are signaled for termination using the specified kill
- *	signal.  Additionally, any resources allocated to track the
- *	subprocesses is released.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static char *
-VariableProc(
-    ClientData clientData,	/* File output information. */
-    Tcl_Interp *interp,		/* Not used. */
-    const char *part1,		/* Not used. */
-    const char *part2,		/* Not Used. */
-    int flags)
-{
-    if (flags & TRACE_FLAGS) {
-	Bgexec *bgPtr = clientData;
-
-	/* Kill all child processes that remain alive. */
-	KillProcesses(bgPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TimerProc --
- *
- *	This is a timer handler procedure which gets called periodically to
- *	reap any of the sub-processes if they have terminated.  After the last
- *	process has terminated, the contents of standard output are stored in
- *	the output variable, which triggers the cleanup proc (using a variable
- *	trace). The status the last process to exit is written to the status
- *	variable.
- *
- * Results:
- *	None.  Called from the TCL event loop.
- *
- * Side effects:
- *	Many. The contents of procIds is shifted, leaving only those
- *	sub-processes which have not yet terminated.  If there are still
- *	subprocesses left, this procedure is placed in the timer queue
- *	again. Otherwise the output and possibly the status variables are
- *	updated.  The former triggers the cleanup routine which will destroy
- *	the information and resources associated with these background
- *	processes.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TimerProc(ClientData clientData)
-{
-    enum PROCESS_STATUS { 
-	PROCESS_EXITED, PROCESS_STOPPED, PROCESS_KILLED, PROCESS_UNKNOWN
-    } pcode;
-    static const char *tokens[] = { 
-	"EXITED", "KILLED", "STOPPED", "UNKNOWN"
-    };
-    Bgexec *bgPtr = clientData;
-    Tcl_Obj *listObjPtr, *objPtr;
-    Tcl_Interp *interp;
-    WAIT_STATUS_TYPE waitStatus, lastStatus;
-    char string[200];
-    const char *mesg;
-    int code;
-    int i;
-    int nLeft;				/* # of processes still not reaped */
-    unsigned int lastPid;
-
-    interp = bgPtr->interp;
-    lastPid = (unsigned int)-1;
-    *((int *)&waitStatus) = 0;
-    *((int *)&lastStatus) = 0;
-
-    nLeft = 0;
-    for (i = 0; i < bgPtr->nProcs; i++) {
-	int pid;
-
-#ifdef WIN32
-	pid = WaitProcess(bgPtr->procIds[i], (int *)&waitStatus, WNOHANG);
-#else
-	pid = waitpid(bgPtr->procIds[i], (int *)&waitStatus, WNOHANG);
-#endif
-	if (pid == 0) {			/*  Process has not terminated yet */
-	    if (nLeft < i) {
-		bgPtr->procIds[nLeft] = bgPtr->procIds[i];
-	    }
-	    nLeft++;			/* Count the # of processes left */
-	} else if (pid != -1) {
-	    /*
-	     * Save the status information associated with the subprocess.
-	     * We'll use it only if this is the last subprocess to be reaped.
-	     */
-	    lastStatus = waitStatus;
-	    lastPid = (unsigned int)pid;
-	}
-    }
-    bgPtr->nProcs = nLeft;
-
-    if ((nLeft > 0) || (SINKOPEN(&bgPtr->out)) || 
-	(SINKOPEN(&bgPtr->err))) {
-	/* Keep polling for the status of the children that are left */
-	bgPtr->timerToken = Tcl_CreateTimerHandler(bgPtr->interval, TimerProc,
-	   bgPtr);
-#if WINDEBUG
-	PurifyPrintf("schedule TimerProc(nProcs=%d)\n", nLeft);
-#endif
-	return;
-    }
-
-    /*
-     * All child processes have completed.  Set the status variable with the
-     * status of the last process reaped.  The status is a list of an error
-     * token, the exit status, and a message.
-     */
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    code = WEXITSTATUS(lastStatus);
-    if (WIFEXITED(lastStatus)) {
-	pcode = PROCESS_EXITED;
-    } else if (WIFSIGNALED(lastStatus)) {
-	pcode = PROCESS_KILLED;
-	code = -1;
-    } else if (WIFSTOPPED(lastStatus)) {
-	pcode = PROCESS_STOPPED;
-	code = -1;
-    } else {
-	pcode = PROCESS_UNKNOWN;
-    }
-    objPtr = Tcl_NewStringObj(tokens[pcode], -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewLongObj(lastPid);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    switch(pcode) {
-    case PROCESS_EXITED:
-	mesg = "child completed normally";
-	break;
-    case PROCESS_KILLED:
-	mesg = Tcl_SignalMsg((int)(WTERMSIG(lastStatus)));
-	break;
-    case PROCESS_STOPPED:
-	mesg = Tcl_SignalMsg((int)(WSTOPSIG(lastStatus)));
-	break;
-    case PROCESS_UNKNOWN:
-	sprintf_s(string, 200, "child completed with unknown status 0x%x",
-	    *((int *)&lastStatus));
-	mesg = string;
-	break;
-    }
-    objPtr = Tcl_NewStringObj(mesg, -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    if (bgPtr->exitCodePtr != NULL) {
-	*bgPtr->exitCodePtr = code;
-    }
-    DisableTriggers(bgPtr);
-    if (Tcl_SetVar2Ex(interp, bgPtr->statVar, NULL, listObjPtr, 
-		      TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-	Tcl_BackgroundError(interp);
-    }
-    if (bgPtr->flags & DETACHED) {
-	DestroyBgexec(bgPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Stdoutproc --
- *
- *	This procedure is called when output from the detached pipeline is
- *	available.  The output is read and saved in a buffer in the Bgexec
- *	structure.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Data is stored in the buffer.  This character array may be increased
- *	as more space is required to contain the output of the pipeline.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-StdoutProc(ClientData clientData, int mask)
-{
-    Bgexec *bgPtr = clientData;
-
-    if (CollectData(bgPtr, &bgPtr->out) == TCL_OK) {
-	return;
-    }
-    /*
-     * Either EOF or an error has occurred.  In either case, close the
-     * sink. Note that closing the sink will also remove the file handler, so
-     * this routine will not be called again.
-     */
-    CloseSink(bgPtr->interp, &bgPtr->out);
-
-    /*
-     * If both sinks (stdout and stderr) are closed, this doesn't necessarily
-     * mean that the process has terminated.  Set up a timer handler to
-     * periodically poll for the exit status of each process.  Initially check
-     * at the next idle interval.
-     */
-    if (!SINKOPEN(&bgPtr->err)) {
-	bgPtr->timerToken = Tcl_CreateTimerHandler(0, TimerProc, clientData);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StderrProc --
- *
- *	This procedure is called when error from the detached pipeline is
- *	available.  The error is read and saved in a buffer in the Bgexec
- *	structure.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Data is stored in the buffer.  This character array may be increased
- *	as more space is required to contain the stderr of the pipeline.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-StderrProc(ClientData clientData, int mask)
-{
-    Bgexec *bgPtr = clientData;
-
-    if (CollectData(bgPtr, &bgPtr->err) == TCL_OK) {
-	return;
-    }
-    /*
-     * Either EOF or an error has occurred.  In either case, close the
-     * sink. Note that closing the sink will also remove the file handler, so
-     * this routine will not be called again.
-     */
-    CloseSink(bgPtr->interp, &bgPtr->err);
-
-    /*
-     * If both sinks (stdout and stderr) are closed, this doesn't necessarily
-     * mean that the process has terminated.  Set up a timer handler to
-     * periodically poll for the exit status of each process.  Initially check
-     * at the next idle interval.
-     */
-    if (!SINKOPEN(&bgPtr->out)) {
-	bgPtr->timerToken = Tcl_CreateTimerHandler(0, TimerProc, clientData);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BgexecCmd --
- *
- *	This procedure is invoked to process the "bgexec" TCL command.  See
- *	the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-BgexecCmd(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    Bgexec *bgPtr;
-    ProcessId *pidPtr;
-    char *lastArg;
-    int *outFdPtr, *errFdPtr;
-    int isDetached;
-    int i;
-    int nProcs;
-
-    if (objc < 3) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " varName ?options? command ?arg...?\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Check if the command line is to be run detached (the last argument is
-     * "&") */
-    lastArg = Tcl_GetString(objv[objc - 1]);
-    isDetached = ((lastArg[0] == '&') && (lastArg[1] == '\0'));
-    if (isDetached) {
-	objc--;				/* Remove the '&' argument */
-    }
-    bgPtr = Blt_AssertCalloc(1, sizeof(Bgexec));
-    /* Initialize the background information record */
-    bgPtr->interp = interp;
-    bgPtr->signalNum = SIGTERM;
-    bgPtr->nProcs = -1;
-    bgPtr->interval = 1000;
-    if (isDetached) {
-	bgPtr->flags |= DETACHED;
-    }
-    bgPtr->statVar = Blt_AssertStrdup(Tcl_GetString(objv[1]));
-    Tcl_MutexLock(mutexPtr);
-    bgPtr->link = Blt_Chain_Append(activePipelines, bgPtr);
-    Tcl_MutexUnlock(mutexPtr);
-    bgPtr->out.encoding = ENCODING_ASCII;
-    bgPtr->err.encoding = ENCODING_ASCII;
-
-    /* Try to clean up any detached processes */
-    Tcl_ReapDetachedProcs();
-
-    i = Blt_ParseSwitches(interp, switchSpecs, objc - 2, objv + 2, bgPtr, 
-		BLT_SWITCH_OBJV_PARTIAL);
-    if (i < 0) {
-	FreeBgexec(bgPtr);
-	return TCL_ERROR;
-    }
-    i += 2;
-    /* Must be at least one argument left as the command to execute. */
-    if (objc <= i) {
-	Tcl_AppendResult(interp, "missing command to execute: should be \"",
-	    Tcl_GetString(objv[0]), " varName ?options? command ?arg...?\"", 
-		(char *)NULL);
-	FreeBgexec(bgPtr);
-	return TCL_ERROR;
-    }
-
-    /* Put a trace on the exit status variable.  The will also allow the user
-     * to terminate the pipeline by simply setting the variable.  */
-    Tcl_TraceVar(interp, bgPtr->statVar, TRACE_FLAGS, VariableProc, bgPtr);
-    bgPtr->flags |= TRACED;
-
-    InitSink(bgPtr, &bgPtr->out, "stdout");
-    InitSink(bgPtr, &bgPtr->err, "stderr");
-
-    outFdPtr = errFdPtr = (int *)NULL;
-#ifdef WIN32
-    if ((!isDetached) || (bgPtr->out.doneVar != NULL) || 
-	(bgPtr->out.updateVar != NULL) || (bgPtr->out.updateCmd != NULL)) {
-	outFdPtr = &bgPtr->out.fd;
-    }
-#else
-    outFdPtr = &bgPtr->out.fd;
-#endif
-    if ((bgPtr->err.doneVar != NULL) || (bgPtr->err.updateVar != NULL) ||
-	(bgPtr->err.updateCmd != NULL) || (bgPtr->err.echo)) {
-	errFdPtr = &bgPtr->err.fd;
-    }
-    nProcs = Blt_CreatePipeline(interp, objc - i, objv + i, &pidPtr, 
-	(int *)NULL, outFdPtr, errFdPtr);
-    if (nProcs < 0) {
-	goto error;
-    }
-    bgPtr->procIds = pidPtr;
-    bgPtr->nProcs = nProcs;
-    if (bgPtr->out.fd == -1) {
-	/* 
-	 * If output has been redirected, start polling immediately for the
-	 * exit status of each process.  Normally, this is done only after
-	 * stdout has been closed by the last process, but here stdout has
-	 * been redirected. The default polling interval is every 1 second.
-	 */
-	bgPtr->timerToken = Tcl_CreateTimerHandler(bgPtr->interval, TimerProc,
-	   bgPtr);
-
-    } else if (CreateSinkHandler(bgPtr, &bgPtr->out, StdoutProc) != TCL_OK) {
-	goto error;
-    }
-    if ((bgPtr->err.fd != -1) &&
-	(CreateSinkHandler(bgPtr, &bgPtr->err, StderrProc) != TCL_OK)) {
- 	goto error;
-    }
-    if (isDetached) {	
-	Tcl_Obj *listObjPtr;
-	/* If detached, return a list of the child process ids instead of the
-	 * output of the pipeline. */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (i = 0; i < nProcs; i++) {
-	    Tcl_Obj *objPtr;
-#ifdef WIN32
-	    objPtr = Tcl_NewLongObj((unsigned int)bgPtr->procIds[i].pid);
-#else 
-	    objPtr = Tcl_NewLongObj(bgPtr->procIds[i]);
-#endif
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	int exitCode;
-	int done;
-
-	bgPtr->exitCodePtr = &exitCode;
-	bgPtr->donePtr = &done;
-
-	exitCode = done = 0;
-	while (!done) {
-	    Tcl_DoOneEvent(0);
-	}
-	DisableTriggers(bgPtr);
-	if ((bgPtr->flags & IGNOREEXITCODE) || (exitCode == 0)) {
-	    if (bgPtr->out.doneVar == NULL) {
-		unsigned char *data;
-		int length;
-		
-		/* Return the output of the pipeline. */
-		GetSinkData(&bgPtr->out, &data, &length);
-		assert(length <= UINT_MAX);
-#if (_TCL_VERSION <  _VERSION(8,1,0)) 
-		data[length] = '\0';
-		Tcl_SetObjResult(interp, Tcl_NewStringObj(data, (int)length));
-#else
-		Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(data,(int)length));
-#endif
-	    }
-	} else {
-	    DestroyBgexec(bgPtr);
-	    Tcl_AppendResult(interp, "child process exited abnormally",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	DestroyBgexec(bgPtr);
-    }
-    return TCL_OK;
-  error:
-    DestroyBgexec(bgPtr);
-    return TCL_ERROR;
-}
-
-
-
-static void
-BgexecExitProc(ClientData clientData)
-{
-    Blt_ChainLink link, next;
-
-    Tcl_MutexLock(mutexPtr);
-    for (link = Blt_Chain_FirstLink(activePipelines); link != NULL; link = next){
-	next = Blt_Chain_NextLink(link);
-	Bgexec *bgPtr;
-
-	bgPtr = Blt_Chain_GetValue(link);
-	bgPtr->link = NULL;
-	KillProcesses(bgPtr);
-    }
-    Blt_Chain_Destroy(activePipelines);
-    Tcl_MutexUnlock(mutexPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BgexecCmdInitProc --
- *
- *	This procedure is invoked to initialize the "bgexec" TCL command.  See
- *	the user documentation for details on what it does.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_BgexecCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "bgexec", BgexecCmd, };
-
-    if (activePipelines == NULL) {
-#ifdef TCL_THREADS
-	mutexPtr = Tcl_GetAllocMutex();
-#endif
-	activePipelines = Blt_Chain_Create();
-	Tcl_CreateExitHandler(BgexecExitProc, activePipelines);
-    }
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_BGEXEC */
diff --git a/blt3.0/src/bltBind.c b/blt3.0/src/bltBind.c
deleted file mode 100644
index 7b288f7..0000000
--- a/blt3.0/src/bltBind.c
+++ /dev/null
@@ -1,1825 +0,0 @@
-
-/*
- * bltBind.c --
- *
- *	This module implements object binding procedures for the BLT toolkit.
- *
- *	Copyright 1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltBind.h"
-#include <bltList.h>
-
-static Tk_EventProc BindProc;
-
-typedef struct _Blt_BindTable BindTable;
-
-/* Make button presses on objects have implicit grab. */
-#define FULLY_SIMULATE_GRAB	1
-
-/*
- * Binding table procedures.
- */
-#define REPICK_IN_PROGRESS (1<<0)
-#define LEFT_GRABBED_ITEM  (1<<1)
-
-#define ALL_BUTTONS_MASK \
-	(Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask)
-
-#ifndef VirtualEventMask
-#define VirtualEventMask    (1L << 30)
-#endif
-
-#define ALL_VALID_EVENTS_MASK \
-	(ButtonMotionMask | Button1MotionMask | Button2MotionMask | \
-	 Button3MotionMask | Button4MotionMask | Button5MotionMask | \
-	 ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \
-	 LeaveWindowMask | KeyPressMask | KeyReleaseMask | \
-	 PointerMotionMask | VirtualEventMask)
-
-static int buttonMasks[] =
-{
-    0,				/* No buttons pressed */
-    Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask,
-};
-
-
-/*
- * How to make drag&drop work?
- *
- *	Right now we generate pseudo <Enter> <Leave> events within button grab
- *	on an object.  They're marked NotifyVirtual instead of NotifyAncestor.
- *	A better solution: generate new-style virtual <<DragEnter>>
- *	<<DragMotion>> <<DragLeave>> events.  These virtual events don't have
- *	to exist as "real" event sequences, like virtual events do now.
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoEvent --
- *
- *	This procedure is called to invoke binding processing for a new event
- *	that is associated with the current item for a legend.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Depends on the bindings for the legend.  A binding script could delete
- *	an entry, so callers should protect themselves with Tcl_Preserve and
- *	Tcl_Release.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DoEvent(
-    BindTable *bindPtr,		/* Binding information for widget in which
-				 * event occurred. */
-    XEvent *eventPtr,		/* Real or simulated X event that is to be
-				 * processed. */
-    ClientData item,		/* Item picked. */
-    ClientData context)		/* Context of item.  */
-{
-    Blt_List tagList;
-
-    if ((bindPtr->tkwin == NULL) || (bindPtr->bindingTable == NULL)) {
-	return;
-    }
-    if ((eventPtr->type == KeyPress) || (eventPtr->type == KeyRelease)) {
-	item = bindPtr->focusItem;
-	context = bindPtr->focusContext;
-    }
-    if (item == NULL) {
-	return;
-    }
-    /*
-     * Invoke the binding system.
-     */
-    tagList = Blt_List_Create(BLT_ONE_WORD_KEYS);
-    if (bindPtr->tagProc == NULL) {
-	Blt_List_Append(tagList, Tk_GetUid("all"), 0);
-	Blt_List_Append(tagList, (char *)item, 0);
-    } else {
-	(*bindPtr->tagProc) (bindPtr, item, context, tagList);
-    }
-    if (Blt_List_GetLength(tagList) > 0) {
-	int nTags;
-	ClientData *tagArray;
-#define MAX_STATIC_TAGS	64
-	ClientData staticTags[MAX_STATIC_TAGS];
-	Blt_ListNode node;
-	
-	tagArray = staticTags;
-	nTags = Blt_List_GetLength(tagList);
-	if (nTags >= MAX_STATIC_TAGS) {
-	    tagArray = Blt_AssertMalloc(sizeof(ClientData) * nTags);
-	    
-	} 
-	nTags = 0;
-	for (node = Blt_List_FirstNode(tagList); node != NULL;
-	     node = Blt_List_NextNode(node)) {
-	    tagArray[nTags++] = (ClientData)Blt_List_GetKey(node);
-	}
-	Tk_BindEvent(bindPtr->bindingTable, eventPtr, bindPtr->tkwin, nTags, 
-		tagArray);
-	if (tagArray != staticTags) {
-	    Blt_Free(tagArray);
-	}
-    }
-    Blt_List_Destroy(tagList);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PickCurrentItem --
- *
- *	Find the topmost item in a legend that contains a given location and
- *	mark the the current item.  If the current item has changed, generate
- *	a fake exit event on the old current item and a fake enter event on
- *	the new current item.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The current item may change.  If it does, then the commands associated
- *	with item entry and exit could do just about anything.  A binding
- *	script could delete the legend, so callers should protect themselves
- *	with Tcl_Preserve and Tcl_Release.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PickCurrentItem(
-    BindTable *bindPtr,		/* Binding table information. */
-    XEvent *eventPtr)		/* Event describing location of mouse cursor.
-				 * Must be EnterWindow, LeaveWindow,
-				 * ButtonRelease, or MotionNotify. */
-{
-    int buttonDown;
-    ClientData newItem, oldItem;
-    ClientData newContext;
-
-    /*
-     * Check whether or not a button is down.  If so, we'll log entry and exit
-     * into and out of the current item, but not entry into any other item.
-     * This implements a form of grabbing equivalent to what the X server does
-     * for windows.
-     */
-    buttonDown = (bindPtr->state & ALL_BUTTONS_MASK);
-    if (!buttonDown) {
-	bindPtr->flags &= ~LEFT_GRABBED_ITEM;
-    }
-
-    /*
-     * Save information about this event in the widget.  The event in the
-     * widget is used for two purposes:
-     *
-     * 1. Event bindings: if the current item changes, fake events are
-     *    generated to allow item-enter and item-leave bindings to trigger.
-     * 2. Reselection: if the current item gets deleted, can use the
-     *    saved event to find a new current item.
-     * Translate MotionNotify events into EnterNotify events, since that's
-     * what gets reported to item handlers.
-     */
-
-    if (eventPtr != &bindPtr->pickEvent) {
-	if ((eventPtr->type == MotionNotify) ||
-	    (eventPtr->type == ButtonRelease)) {
-	    bindPtr->pickEvent.xcrossing.type = EnterNotify;
-	    bindPtr->pickEvent.xcrossing.serial = eventPtr->xmotion.serial;
-	    bindPtr->pickEvent.xcrossing.send_event =
-		eventPtr->xmotion.send_event;
-	    bindPtr->pickEvent.xcrossing.display = eventPtr->xmotion.display;
-	    bindPtr->pickEvent.xcrossing.window = eventPtr->xmotion.window;
-	    bindPtr->pickEvent.xcrossing.root = eventPtr->xmotion.root;
-	    bindPtr->pickEvent.xcrossing.subwindow = None;
-	    bindPtr->pickEvent.xcrossing.time = eventPtr->xmotion.time;
-	    bindPtr->pickEvent.xcrossing.x = eventPtr->xmotion.x;
-	    bindPtr->pickEvent.xcrossing.y = eventPtr->xmotion.y;
-	    bindPtr->pickEvent.xcrossing.x_root = eventPtr->xmotion.x_root;
-	    bindPtr->pickEvent.xcrossing.y_root = eventPtr->xmotion.y_root;
-	    bindPtr->pickEvent.xcrossing.mode = NotifyNormal;
-	    bindPtr->pickEvent.xcrossing.detail = NotifyNonlinear;
-	    bindPtr->pickEvent.xcrossing.same_screen
-		= eventPtr->xmotion.same_screen;
-	    bindPtr->pickEvent.xcrossing.focus = False;
-	    bindPtr->pickEvent.xcrossing.state = eventPtr->xmotion.state;
-	} else {
-	    bindPtr->pickEvent = *eventPtr;
-	}
-    }
-    bindPtr->activePick = TRUE;
-
-    /*
-     * If this is a recursive call (there's already a partially completed call
-     * pending on the stack; it's in the middle of processing a Leave event
-     * handler for the old current item) then just return; the pending call
-     * will do everything that's needed.
-     */
-    if (bindPtr->flags & REPICK_IN_PROGRESS) {
-	return;
-    }
-    /*
-     * A LeaveNotify event automatically means that there's no current item,
-     * so the check for closest item can be skipped.
-     */
-    newContext = NULL;
-    if (bindPtr->pickEvent.type != LeaveNotify) {
-	int x, y;
-
-	x = bindPtr->pickEvent.xcrossing.x;
-	y = bindPtr->pickEvent.xcrossing.y;
-	newItem = (*bindPtr->pickProc) (bindPtr->clientData, x, y, &newContext);
-    } else {
-	newItem = NULL;
-    }
-    if (((newItem == bindPtr->currentItem) && 
-	 (newContext == bindPtr->currentContext)) && 
-	((bindPtr->flags & LEFT_GRABBED_ITEM) == 0)) {
-	/*
-	 * Nothing to do:  the current item hasn't changed.
-	 */
-	return;
-    }
-#if FULLY_SIMULATE_GRAB
-    if (((newItem != bindPtr->currentItem) || 
-	 (newContext != bindPtr->currentContext)) && 
-	(buttonDown)) {
-	bindPtr->flags |= LEFT_GRABBED_ITEM;
-#ifdef notdef
-	fprintf(stderr, "pickcurrentitem: simulate grab.\n");
-#endif
-	return;
-    }
-#endif
-    /*
-     * Simulate a LeaveNotify event on the previous current item and an
-     * EnterNotify event on the new current item.  Remove the "current" tag
-     * from the previous current item and place it on the new current item.
-     */
-    oldItem = bindPtr->currentItem;
-    Tcl_Preserve(oldItem);
-    Tcl_Preserve(newItem);
-
-    if ((bindPtr->currentItem != NULL) &&
-	((newItem != bindPtr->currentItem) || 
-	 (newContext != bindPtr->currentContext)) && 
-	((bindPtr->flags & LEFT_GRABBED_ITEM) == 0)) {
-	XEvent event;
-
-	event = bindPtr->pickEvent;
-	event.type = LeaveNotify;
-	/*
-	 * If the event's detail happens to be NotifyInferior the binding
-	 * mechanism will discard the event.  To be consistent, always use
-	 * NotifyAncestor.
-	 */
-	event.xcrossing.detail = NotifyAncestor;
-
-	bindPtr->flags |= REPICK_IN_PROGRESS;
-	DoEvent(bindPtr, &event, bindPtr->currentItem, bindPtr->currentContext);
-	bindPtr->flags &= ~REPICK_IN_PROGRESS;
-
-	/*
-	 * Note: during DoEvent above, it's possible that bindPtr->newItem got
-	 * reset to NULL because the item was deleted.
-	 */
-    }
-    if (((newItem != bindPtr->currentItem) || 
-	 (newContext != bindPtr->currentContext)) && 
-	(buttonDown)) {
-	XEvent event;
-
-	bindPtr->flags |= LEFT_GRABBED_ITEM;
-	event = bindPtr->pickEvent;
-	if ((newItem != bindPtr->newItem) || 
-	    (newContext != bindPtr->newContext)) {
-	    ClientData savedItem;
-	    ClientData savedContext;
-
-	    /*
-	     * Generate <Enter> and <Leave> events for objects during button
-	     * grabs.  This isn't standard. But for example, it allows one to
-	     * provide balloon help on the individual entries of the Hierbox
-	     * widget.
-	     */
-	    savedItem = bindPtr->currentItem;
-	    savedContext = bindPtr->currentContext;
-	    if (bindPtr->newItem != NULL) {
-		event.type = LeaveNotify;
-		event.xcrossing.detail = NotifyVirtual /* Ancestor */ ;
-		bindPtr->currentItem = bindPtr->newItem;
-		DoEvent(bindPtr, &event, bindPtr->newItem, bindPtr->newContext);
-	    }
-	    bindPtr->newItem = newItem;
-	    bindPtr->newContext = newContext;
-	    if (newItem != NULL) {
-		event.type = EnterNotify;
-		event.xcrossing.detail = NotifyVirtual /* Ancestor */ ;
-		bindPtr->currentItem = newItem;
-		DoEvent(bindPtr, &event, newItem, newContext);
-	    }
-	    bindPtr->currentItem = savedItem;
-	    bindPtr->currentContext = savedContext;
-	}
-	goto done;
-    }
-    /*
-     * Special note:  it's possible that
-     *		bindPtr->newItem == bindPtr->currentItem
-     * here.  This can happen, for example, if LEFT_GRABBED_ITEM was set.
-     */
-
-    bindPtr->flags &= ~LEFT_GRABBED_ITEM;
-    bindPtr->currentItem = bindPtr->newItem = newItem;
-    bindPtr->currentContext = bindPtr->newContext = newContext;
-    if (bindPtr->currentItem != NULL) {
-	XEvent event;
-
-	event = bindPtr->pickEvent;
-	event.type = EnterNotify;
-	event.xcrossing.detail = NotifyAncestor;
-	DoEvent(bindPtr, &event, newItem, newContext);
-#ifdef notdef
-	if ((eventPtr->type == MotionNotify) ||
-	    (eventPtr->type == ButtonRelease)) {
-	    fprintf(stderr, "pickcurrentitem: DoEvent Button buttondown=%d.\n",
-		    buttonDown);
-	    event.type = eventPtr->type;
-	    event.xbutton.button = eventPtr->xbutton.button;
-	    DoEvent(bindPtr, &event, newItem, newContext);
-	    fprintf(stderr, "pickcurrentitem: done.\n");
-	}
-#endif
-    }
- done:
-    Tcl_Release(newItem);
-    Tcl_Release(oldItem);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindProc --
- *
- *	This procedure is invoked by the Tk dispatcher to handle events
- *	associated with bindings on items.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Depends on the command invoked as part of the binding
- *	(if there was any).
- *
- *---------------------------------------------------------------------------
- */
-static void
-BindProc(
-    ClientData clientData,	/* Pointer to widget structure. */
-    XEvent *eventPtr)		/* Pointer to X event that just happened. */
-{
-    BindTable *bindPtr = clientData;
-    int mask;
-
-    Tcl_Preserve(bindPtr->clientData);
-    /*
-     * This code below keeps track of the current modifier state in
-     * bindPtr->state.  This information is used to defer repicks of the
-     * current item while buttons are down.
-     */
-    switch (eventPtr->type) {
-    case ButtonPress:
-    case ButtonRelease:
-	mask = 0;
-	if ((eventPtr->xbutton.button >= Button1) &&
-	    (eventPtr->xbutton.button <= Button5)) {
-	    mask = buttonMasks[eventPtr->xbutton.button];
-	}
-	/*
-	 * For button press events, repick the current item using the button
-	 * state before the event, then process the event.  For button release
-	 * events, first process the event, then repick the current item using
-	 * the button state *after* the event (the button has logically gone
-	 * up before we change the current item).
-	 */
-	if (eventPtr->type == ButtonPress) {
-
-	    /*
-	     * On a button press, first repick the current item using the
-	     * button state before the event, the process the event.
-	     */
-
-	    bindPtr->state = eventPtr->xbutton.state;
-	    PickCurrentItem(bindPtr, eventPtr);
-	    bindPtr->state ^= mask;
-	    DoEvent(bindPtr, eventPtr, bindPtr->currentItem, 
-		bindPtr->currentContext);
-
-	} else {
-
-	    /*
-	     * Button release: first process the event, with the button still
-	     * considered to be down.  Then repick the current item under the
-	     * assumption that the button is no longer down.
-	     */
-	    bindPtr->state = eventPtr->xbutton.state;
-	    DoEvent(bindPtr, eventPtr, bindPtr->currentItem, 
-		bindPtr->currentContext);
-	    eventPtr->xbutton.state ^= mask;
-	    bindPtr->state = eventPtr->xbutton.state;
-	    PickCurrentItem(bindPtr, eventPtr);
-	    eventPtr->xbutton.state ^= mask;
-	}
-	break;
-
-    case EnterNotify:
-    case LeaveNotify:
-	bindPtr->state = eventPtr->xcrossing.state;
-	PickCurrentItem(bindPtr, eventPtr);
-	break;
-
-    case MotionNotify:
-	bindPtr->state = eventPtr->xmotion.state;
-	PickCurrentItem(bindPtr, eventPtr);
-	DoEvent(bindPtr, eventPtr, bindPtr->currentItem, 
-		bindPtr->currentContext);
-	break;
-
-    case KeyPress:
-    case KeyRelease:
-	bindPtr->state = eventPtr->xkey.state;
-	PickCurrentItem(bindPtr, eventPtr);
-	DoEvent(bindPtr, eventPtr, bindPtr->currentItem, 
-		bindPtr->currentContext);
-	break;
-    }
-    Tcl_Release(bindPtr->clientData);
-}
-
-int
-Blt_ConfigureBindings(
-    Tcl_Interp *interp,
-    BindTable *bindPtr,
-    ClientData item,
-    int argc,
-    const char **argv)
-{
-    const char *command;
-    unsigned long mask;
-    const char *seq;
-
-    if (argc == 0) {
-	Tk_GetAllBindings(interp, bindPtr->bindingTable, item);
-	return TCL_OK;
-    }
-    if (argc == 1) {
-	command = Tk_GetBinding(interp, bindPtr->bindingTable, item, argv[0]);
-	if (command == NULL) {
-	    Tcl_AppendResult(interp, "can't find event \"", argv[0], "\"",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), command, -1);
-	return TCL_OK;
-    }
-
-    seq = argv[0];
-    command = argv[1];
-
-    if (command[0] == '\0') {
-	return Tk_DeleteBinding(interp, bindPtr->bindingTable, item, seq);
-    }
-
-    if (command[0] == '+') {
-	mask = Tk_CreateBinding(interp, bindPtr->bindingTable, item, seq,
-		command + 1, TRUE);
-    } else {
-	mask = Tk_CreateBinding(interp, bindPtr->bindingTable, item, seq,
-		command, FALSE);
-    }
-    if (mask == 0) {
-	Tcl_AppendResult(interp, "event mask can't be zero for \"", item, "\"",
-			     (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (mask & (unsigned)~ALL_VALID_EVENTS_MASK) {
-	Tk_DeleteBinding(interp, bindPtr->bindingTable, item, seq);
-	Tcl_ResetResult(interp);
-	Tcl_AppendResult(interp, "requested illegal events; ",
-		 "only key, button, motion, enter, leave, and virtual ",
-		 "events may be used", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-int
-Blt_ConfigureBindingsFromObj(
-    Tcl_Interp *interp,
-    BindTable *bindPtr,
-    ClientData item,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    const char *command;
-    unsigned long mask;
-    const char *seq;
-    const char *string;
-
-    if (objc == 0) {
-	Tk_GetAllBindings(interp, bindPtr->bindingTable, item);
-	return TCL_OK;
-    }
-    string = Tcl_GetString(objv[0]);
-    if (objc == 1) {
-	command = Tk_GetBinding(interp, bindPtr->bindingTable, item, string);
-	if (command == NULL) {
-	    Tcl_ResetResult(interp);
-	    Tcl_AppendResult(interp, "invalid binding event \"", string, "\"", 
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), command, -1);
-	return TCL_OK;
-    }
-
-    seq = string;
-    command = Tcl_GetString(objv[1]);
-
-    if (command[0] == '\0') {
-	return Tk_DeleteBinding(interp, bindPtr->bindingTable, item, seq);
-    }
-
-    if (command[0] == '+') {
-	mask = Tk_CreateBinding(interp, bindPtr->bindingTable, item, seq,
-		command + 1, TRUE);
-    } else {
-	mask = Tk_CreateBinding(interp, bindPtr->bindingTable, item, seq,
-		command, FALSE);
-    }
-    if (mask == 0) {
-	return TCL_ERROR;
-    }
-    if (mask & (unsigned)~ALL_VALID_EVENTS_MASK) {
-	Tk_DeleteBinding(interp, bindPtr->bindingTable, item, seq);
-	Tcl_ResetResult(interp);
-	Tcl_AppendResult(interp, "requested illegal events; ",
-		 "only key, button, motion, enter, leave, and virtual ",
-		 "events may be used", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-Blt_BindTable
-Blt_CreateBindingTable(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    ClientData clientData,
-    Blt_BindPickProc *pickProc,
-    Blt_BindTagProc *tagProc)
-{
-    unsigned int mask;
-    BindTable *bindPtr;
-
-    bindPtr = Blt_AssertCalloc(1, sizeof(BindTable));
-    bindPtr->bindingTable = Tk_CreateBindingTable(interp);
-    bindPtr->clientData = clientData;
-    bindPtr->tkwin = tkwin;
-    bindPtr->pickProc = pickProc;
-    bindPtr->tagProc = tagProc;
-    mask = (KeyPressMask | KeyReleaseMask | ButtonPressMask |
-	ButtonReleaseMask | EnterWindowMask | LeaveWindowMask |
-	PointerMotionMask);
-    Tk_CreateEventHandler(tkwin, mask, BindProc, bindPtr);
-    return bindPtr;
-}
-
-void
-Blt_DestroyBindingTable(BindTable *bindPtr)
-{
-    unsigned int mask;
-
-    Tk_DeleteBindingTable(bindPtr->bindingTable);
-    mask = (KeyPressMask | KeyReleaseMask | ButtonPressMask |
-	ButtonReleaseMask | EnterWindowMask | LeaveWindowMask |
-	PointerMotionMask);
-    Tk_DeleteEventHandler(bindPtr->tkwin, mask, BindProc, bindPtr);
-    Blt_Free(bindPtr);
-}
-
-void
-Blt_PickCurrentItem(BindTable *bindPtr)
-{
-    if (bindPtr->activePick) {
-	PickCurrentItem(bindPtr, &bindPtr->pickEvent);
-    }
-}
-
-void
-Blt_DeleteBindings(
-    BindTable *bindPtr,
-    ClientData object)
-{
-    Tk_DeleteAllBindings(bindPtr->bindingTable, object);
-
-    /*
-     * If this is the object currently picked, we need to repick one.
-     */
-    if (bindPtr->currentItem == object) {
-	bindPtr->currentItem = NULL;
-	bindPtr->currentContext = NULL;
-    }
-    if (bindPtr->newItem == object) {
-	bindPtr->newItem = NULL;
-	bindPtr->newContext = NULL;
-    }
-    if (bindPtr->focusItem == object) {
-	bindPtr->focusItem = NULL;
-	bindPtr->focusContext = NULL;
-    }
-}
-
-void
-Blt_MoveBindingTable(
-    BindTable *bindPtr,
-    Tk_Window tkwin)
-{
-    unsigned int mask;
-
-    mask = (KeyPressMask | KeyReleaseMask | ButtonPressMask |
-	ButtonReleaseMask | EnterWindowMask | LeaveWindowMask |
-	PointerMotionMask);
-    if (bindPtr->tkwin != NULL) {
-	Tk_DeleteEventHandler(bindPtr->tkwin, mask, BindProc, bindPtr);
-    }
-    Tk_CreateEventHandler(tkwin, mask, BindProc, bindPtr);
-    bindPtr->tkwin = tkwin;
-}
-
-/*
- * The following union is used to hold the detail information from an
- * XEvent (including Tk's XVirtualEvent extension).
- */
-typedef union {
-    KeySym	keySym;	    /* KeySym that corresponds to xkey.keycode. */
-    int		button;	    /* Button that was pressed (xbutton.button). */
-    Tk_Uid	name;	    /* Tk_Uid of virtual event. */
-    ClientData	clientData; /* Used when type of Detail is unknown, and to
-			     * ensure that all bytes of Detail are initialized
-			     * when this structure is used in a hash key. */
-} Detail;
-
-
-/*
- * The following structure defines a pattern, which is matched against X
- * events as part of the process of converting X events into TCL commands.
- */
-typedef struct {
-    int eventType;		/* Type of X event, e.g. ButtonPress. */
-    int needMods;		/* Mask of modifiers that must be
-				 * present (0 means no modifiers are
-				 * required). */
-    Detail detail;		/* Additional information that must
-				 * match event.  Normally this is 0,
-				 * meaning no additional information
-				 * must match.  For KeyPress and
-				 * KeyRelease events, a keySym may
-				 * be specified to select a
-				 * particular keystroke (0 means any
-				 * keystrokes).  For button events,
-				 * specifies a particular button (0
-				 * means any buttons are OK).  For virtual
-				 * events, specifies the Tk_Uid of the
-				 * virtual event name (never 0). */
-} Pattern;
-
-typedef struct {
-    const char *name;		/* Name of modifier. */
-    int mask;			/* Button/modifier mask value, such as
-				 * Button1Mask. */
-    int flags;			/* Various flags; see below for
-				 * definitions. */
-} EventModifier;
-
-/*
- * Flags for EventModifier structures:
- *
- * DOUBLE -		Non-zero means duplicate this event,
- *			e.g. for double-clicks.
- * TRIPLE -		Non-zero means triplicate this event,
- *			e.g. for triple-clicks.
- * QUADRUPLE -		Non-zero means quadruple this event,
- *			e.g. for 4-fold-clicks.
- * MULT_CLICKS -	Combination of all of above.
- */
-
-#define DOUBLE		(1<<0)
-#define TRIPLE		(1<<1)
-#define QUADRUPLE	(1<<2)
-#define MULT_CLICKS	(DOUBLE|TRIPLE|QUADRUPLE)
-
-#define META_MASK	(AnyModifier<<1)
-#define ALT_MASK	(AnyModifier<<2)
-
-static EventModifier eventModifiers[] = {
-    {"Alt",		ALT_MASK,	0},
-    {"Any",		0,		0},	/* Ignored: historical relic. */
-    {"B1",		Button1Mask,	0},
-    {"B2",		Button2Mask,	0},
-    {"B3",		Button3Mask,	0},
-    {"B4",		Button4Mask,	0},
-    {"B5",		Button5Mask,	0},
-    {"Button1",		Button1Mask,	0},
-    {"Button2",		Button2Mask,	0},
-    {"Button3",		Button3Mask,	0},
-    {"Button4",		Button4Mask,	0},
-    {"Button5",		Button5Mask,	0},
-    {"Command",		Mod1Mask,	0},
-    {"Control",		ControlMask,	0},
-    {"Double",		0,		DOUBLE},
-    {"Lock",		LockMask,	0},
-    {"M",		META_MASK,	0},
-    {"M1",		Mod1Mask,	0},
-    {"M2",		Mod2Mask,	0},
-    {"M3",		Mod3Mask,	0},
-    {"M4",		Mod4Mask,	0},
-    {"M5",		Mod5Mask,	0},
-    {"Meta",		META_MASK,	0},
-    {"Mod1",		Mod1Mask,	0},
-    {"Mod2",		Mod2Mask,	0},
-    {"Mod3",		Mod3Mask,	0},
-    {"Mod4",		Mod4Mask,	0},
-    {"Mod5",		Mod5Mask,	0},
-    {"Option",		Mod2Mask,	0},
-    {"Quadruple",	0,		QUADRUPLE},
-    {"Shift",		ShiftMask,	0},
-    {"Triple",		0,		TRIPLE},
-};
-
-typedef struct {
-    const char *name;		/* Name of event. */
-    int type;			/* Event type for X, such as
-				 * ButtonPress. */
-    int eventMask;		/* Mask bits (for XSelectInput)
-				 * for this event type. */
-} EventInfo;
-
-/*
- * Note:  some of the masks below are an OR-ed combination of
- * several masks.  This is necessary because X doesn't report
- * up events unless you also ask for down events.  Also, X
- * doesn't report button state in motion events unless you've
- * asked about button events.
- */
-
-static EventInfo events[] = {
-    {"Activate",	ActivateNotify,		ActivateMask},
-    {"Button",		ButtonPress,		ButtonPressMask},
-    {"ButtonPress",	ButtonPress,		ButtonPressMask},
-    {"ButtonRelease",	ButtonRelease, ButtonPressMask|ButtonReleaseMask},
-    {"Circulate",	CirculateNotify,	StructureNotifyMask},
-    {"CirculateRequest", CirculateRequest,	SubstructureRedirectMask},
-    {"Colormap",	ColormapNotify,		ColormapChangeMask},
-    {"Configure",	ConfigureNotify,	StructureNotifyMask},
-    {"ConfigureRequest", ConfigureRequest,	SubstructureRedirectMask},
-    {"Create",		CreateNotify,		SubstructureNotifyMask},
-    {"Deactivate",	DeactivateNotify,	ActivateMask},
-    {"Destroy",		DestroyNotify,		StructureNotifyMask},
-    {"Enter",		EnterNotify,		EnterWindowMask},
-    {"Expose",		Expose,			ExposureMask},
-    {"FocusIn",		FocusIn,		FocusChangeMask},
-    {"FocusOut",	FocusOut,		FocusChangeMask},
-    {"Gravity",		GravityNotify,		StructureNotifyMask},
-    {"Key",		KeyPress,		KeyPressMask},
-    {"KeyPress",	KeyPress,		KeyPressMask},
-    {"KeyRelease",	KeyRelease,		KeyPressMask|KeyReleaseMask},
-    {"Leave",		LeaveNotify,		LeaveWindowMask},
-    {"Map",		MapNotify,		StructureNotifyMask},
-    {"MapRequest",	MapRequest,             SubstructureRedirectMask},
-    {"Motion",		MotionNotify, ButtonPressMask|PointerMotionMask},
-    {"MouseWheel",	MouseWheelEvent,	MouseWheelMask},
-    {"Property",	PropertyNotify,		PropertyChangeMask},
-    {"Reparent",	ReparentNotify,		StructureNotifyMask},
-    {"ResizeRequest",	ResizeRequest,		ResizeRedirectMask},
-    {"Unmap",		UnmapNotify,		StructureNotifyMask},
-    {"Visibility",	VisibilityNotify,	VisibilityChangeMask},
-};
-
-/*
- * The defines and table below are used to classify events into
- * various groups.  The reason for this is that logically identical
- * fields (e.g. "state") appear at different places in different
- * types of events.  The classification masks can be used to figure
- * out quickly where to extract information from events.
- */
-
-#define KEY			0x1
-#define BUTTON			0x2
-#define MOTION			0x4
-#define CROSSING		0x8
-#define FOCUS			0x10
-#define EXPOSE			0x20
-#define VISIBILITY		0x40
-#define CREATE			0x80
-#define DESTROY			0x100
-#define UNMAP			0x200
-#define MAP			0x400
-#define REPARENT		0x800
-#define CONFIG			0x1000
-#define GRAVITY			0x2000
-#define CIRC			0x4000
-#define PROP			0x8000
-#define COLORMAP		0x10000
-#define VIRTUAL			0x20000
-#define ACTIVATE		0x40000
-#define	MAPREQ			0x80000
-#define	CONFIGREQ		0x100000
-#define	RESIZEREQ		0x200000
-#define CIRCREQ			0x400000
-
-#define KEY_BUTTON_MOTION_VIRTUAL	(KEY|BUTTON|MOTION|VIRTUAL)
-#define KEY_BUTTON_MOTION_CROSSING	(KEY|BUTTON|MOTION|CROSSING|VIRTUAL)
-
-static int flagArray[TK_LASTEVENT+1] = {
-   /* Not used */		0,
-   /* Not used */		0,
-   /* KeyPress */		KEY,
-   /* KeyRelease */		KEY,
-   /* ButtonPress */		BUTTON,
-   /* ButtonRelease */		BUTTON,
-   /* MotionNotify */		MOTION,
-   /* EnterNotify */		CROSSING,
-   /* LeaveNotify */		CROSSING,
-   /* FocusIn */		FOCUS,
-   /* FocusOut */		FOCUS,
-   /* KeymapNotify */		0,
-   /* Expose */			EXPOSE,
-   /* GraphicsExpose */		EXPOSE,
-   /* NoExpose */		0,
-   /* VisibilityNotify */	VISIBILITY,
-   /* CreateNotify */		CREATE,
-   /* DestroyNotify */		DESTROY,
-   /* UnmapNotify */		UNMAP,
-   /* MapNotify */		MAP,
-   /* MapRequest */		MAPREQ,
-   /* ReparentNotify */		REPARENT,
-   /* ConfigureNotify */	CONFIG,
-   /* ConfigureRequest */	CONFIGREQ,
-   /* GravityNotify */		GRAVITY,
-   /* ResizeRequest */		RESIZEREQ,
-   /* CirculateNotify */	CIRC,
-   /* CirculateRequest */	0,
-   /* PropertyNotify */		PROP,
-   /* SelectionClear */		0,
-   /* SelectionRequest */	0,
-   /* SelectionNotify */	0,
-   /* ColormapNotify */		COLORMAP,
-   /* ClientMessage */		0,
-   /* MappingNotify */		0,
-#ifdef GenericEvent
-   /* GenericEvent */		0,
-#endif
-   /* VirtualEvent */		VIRTUAL,
-   /* Activate */		ACTIVATE,	    
-   /* Deactivate */		ACTIVATE,
-   /* MouseWheel */		KEY
-};
-
-
-static EventModifier *
-FindModifier(const char *string)
-{
-    int high, low;
-    char c;
-
-    low = 0;
-    high = (sizeof(eventModifiers) / sizeof(EventModifier)) - 1;
-    c = string[0];
-    while (low <= high) {
-	EventModifier *modPtr;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	modPtr = eventModifiers + median;
-
-	/* Test the first character */
-	compare = c - modPtr->name[0];
-	if (compare == 0) {
-	    compare = strcmp(string, modPtr->name);
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return modPtr;	/* Modifier found. */
-	}
-    }
-    return NULL;		/* Can't find modifier */
-}
-
-static EventInfo *
-FindEvent(const char *string)
-{
-    int high, low;
-    char c;
-
-    low = 0;
-    high = (sizeof(events) / sizeof(EventInfo)) - 1;
-    c = string[0];
-    while (low <= high) {
-	EventInfo *infoPtr;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	infoPtr = events + median;
-
-	/* Test the first character */
-	compare = c - infoPtr->name[0];
-	if (compare == 0) {
-	    compare = strcmp(string, infoPtr->name);
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return infoPtr;	/* Event found. */
-	}
-    }
-    return NULL;		/* Can't find event. */
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * GetField --
- *
- *	Used to parse pattern descriptions.  Copies up to
- *	size characters from p to copy, stopping at end of
- *	string, space, "-", ">", or whenever size is
- *	exceeded.
- *
- * Results:
- *	The return value is a pointer to the character just
- *	after the last one copied (usually "-" or space or
- *	">", but could be anything if size was exceeded).
- *	Also places NULL-terminated string (up to size
- *	character, including NULL), at copy.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-static char *
-GetField(p, copy, size)
-    char *p;			/* Pointer to part of pattern. */
-    char *copy;			/* Place to copy field. */
-    int size;			/* Maximum number of characters to
-				 * copy. */
-{
-    while ((*p != '\0') && !isspace(UCHAR(*p)) && (*p != '>')
-	    && (*p != '-') && (size > 1)) {
-	*copy = *p;
-	p++;
-	copy++;
-	size--;
-    }
-    *copy = '\0';
-    return p;
-}
-
-static int
-ParseEventDescription(Tcl_Interp *interp, const char **eventStringPtr,
-		      Pattern *patPtr, unsigned long *eventMaskPtr)
-{
-    char *p;
-    unsigned long eventMask;
-    int count, eventFlags;
-#define FIELD_SIZE 48
-    char field[FIELD_SIZE];
-    EventInfo *infoPtr;
-
-    Tcl_DString copy;
-    Tcl_DStringInit(&copy);
-    p = Tcl_DStringAppend(&copy, *eventStringPtr, -1);
-
-    patPtr->eventType = -1;
-    patPtr->needMods = 0;
-    patPtr->detail.clientData = 0;
-
-    eventMask = 0;
-    count = 1;
-    
-    /*
-     * Handle simple ASCII characters.
-     */
-
-    if (*p != '<') {
-	char string[2];
-
-	patPtr->eventType = KeyPress;
-	eventMask = KeyPressMask;
-	string[0] = *p;
-	string[1] = 0;
-	patPtr->detail.keySym = XStringToKeysym(string);
-	if (patPtr->detail.keySym == NoSymbol) {
-	    if (isprint(UCHAR(*p))) {
-		patPtr->detail.keySym = *p;
-	    } else {
-		char buf[64];
-		
-		sprintf(buf, "bad ASCII character 0x%x", (unsigned char) *p);
-		Tcl_SetResult(interp, buf, TCL_VOLATILE);
-		count = 0;
-		goto done;
-	    }
-	}
-	p++;
-	goto end;
-    }
-
-    /*
-     * A physical event description consists of:
-     *
-     * 1. open angle bracket.
-     * 2. any number of modifiers, each followed by spaces
-     *    or dashes.
-     * 3. an optional event name.
-     * 4. an option button or keysym name.  Either this or
-     *    item 3 *must* be present;  if both are present
-     *    then they are separated by spaces or dashes.
-     * 5. a close angle bracket.
-     */
-
-    p++;
-
-    while (1) {
-	EventModifier *modPtr;
-	p = GetField(p, field, FIELD_SIZE);
-	if (*p == '>') {
-	    /*
-	     * This solves the problem of, e.g., <Control-M> being
-	     * misinterpreted as Control + Meta + missing keysym
-	     * instead of Control + KeyPress + M.
-	     */
-	     break;
-	}
-	modPtr = FindModifier(field);
-	if (modPtr == NULL) {
-	    break;
-	}
-	patPtr->needMods |= modPtr->mask;
-	if (modPtr->flags & (MULT_CLICKS)) {
-	    int i = modPtr->flags & MULT_CLICKS;
-	    count = 2;
-	    while (i >>= 1) count++;
-	}
-	while ((*p == '-') || isspace(UCHAR(*p))) {
-	    p++;
-	}
-    }
-
-    eventFlags = 0;
-    infoPtr = FindEvent(field);
-    if (infoPtr != NULL) {
-	patPtr->eventType = infoPtr->type;
-	eventFlags = flagArray[infoPtr->type];
-	eventMask = infoPtr->eventMask;
-	while ((*p == '-') || isspace(UCHAR(*p))) {
-	    p++;
-	}
-	p = GetField(p, field, FIELD_SIZE);
-    }
-    if (*field != '\0') {
-	if ((*field >= '1') && (*field <= '5') && (field[1] == '\0')) {
-	    if (eventFlags == 0) {
-		patPtr->eventType = ButtonPress;
-		eventMask = ButtonPressMask;
-	    } else if (eventFlags & KEY) {
-		goto getKeysym;
-	    } else if ((eventFlags & BUTTON) == 0) {
-		Tcl_AppendResult(interp, "specified button \"", field,
-			"\" for non-button event", (char *) NULL);
-		count = 0;
-		goto done;
-	    }
-	    patPtr->detail.button = (*field - '0');
-	} else {
-	    getKeysym:
-	    patPtr->detail.keySym = XStringToKeysym(field);
-	    if (patPtr->detail.keySym == NoSymbol) {
-		Tcl_AppendResult(interp, "bad event type or keysym \"",
-			field, "\"", (char *)NULL);
-		count = 0;
-		goto done;
-	    }
-	    if (eventFlags == 0) {
-		patPtr->eventType = KeyPress;
-		eventMask = KeyPressMask;
-	    } else if ((eventFlags & KEY) == 0) {
-		Tcl_AppendResult(interp, "specified keysym \"", field,
-			"\" for non-key event", (char *)NULL);
-		count = 0;
-		goto done;
-	    }
-	}
-    } else if (eventFlags == 0) {
-	Tcl_AppendResult(interp, "no event type or button # or keysym", 
-			 (char *)NULL);
-	count = 0;
-	goto done;
-    }
-
-    while ((*p == '-') || isspace(UCHAR(*p))) {
-	p++;
-    }
-    if (*p != '>') {
-	while (*p != '\0') {
-	    p++;
-	    if (*p == '>') {
-		Tcl_AppendResult(interp, 
-				 "extra characters after detail in binding",
-				 (char *)NULL);
-		count = 0;
-		goto done;
-	    }
-	}
-	Tcl_AppendResult(interp, "missing \">\" in binding", (char *)NULL);
-	count = 0;
-	goto done;
-    }
-    p++;
-
-end:
-    *eventStringPtr += (p - Tcl_DStringValue(&copy));
-    *eventMaskPtr |= eventMask;
-done:
-    Tcl_DStringFree(&copy);
-    return count;
-}
-
-typedef struct {
-    int numKey;			/* Integer representation of a value. */
-    const char *strKey;		/* String representation of a value. */
-} TkStateMap;
-
-static TkStateMap notifyMode[] = {
-    {NotifyNormal,		"NotifyNormal"},
-    {NotifyGrab,		"NotifyGrab"},
-    {NotifyUngrab,		"NotifyUngrab"},
-    {NotifyWhileGrabbed,	"NotifyWhileGrabbed"},
-    {-1, NULL}
-};
-
-static TkStateMap notifyDetail[] = {
-    {NotifyAncestor,		"NotifyAncestor"},
-    {NotifyVirtual,		"NotifyVirtual"},
-    {NotifyInferior,		"NotifyInferior"},
-    {NotifyNonlinear,		"NotifyNonlinear"},
-    {NotifyNonlinearVirtual,	"NotifyNonlinearVirtual"},
-    {NotifyPointer,		"NotifyPointer"},
-    {NotifyPointerRoot,		"NotifyPointerRoot"},
-    {NotifyDetailNone,		"NotifyDetailNone"},
-    {-1, NULL}
-};
-
-static TkStateMap circPlace[] = {
-    {PlaceOnTop,		"PlaceOnTop"},
-    {PlaceOnBottom,		"PlaceOnBottom"},
-    {-1, NULL}
-};
-
-static TkStateMap visNotify[] = {
-    {VisibilityUnobscured,	    "VisibilityUnobscured"},
-    {VisibilityPartiallyObscured,   "VisibilityPartiallyObscured"},
-    {VisibilityFullyObscured,	    "VisibilityFullyObscured"},
-    {-1, NULL}
-};
-
-static TkStateMap configureRequestDetail[] = {
-    {None,		"None"},
-    {Above,		"Above"},
-    {Below,		"Below"},
-    {BottomIf,		"BottomIf"},
-    {TopIf,		"TopIf"},
-    {Opposite,		"Opposite"},
-    {-1, NULL}
-};
-
-static TkStateMap propNotify[] = {
-    {PropertyNewValue,	"NewValue"},
-    {PropertyDelete,	"Delete"},
-    {-1, NULL}
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleEventGenerate --
- *
- *	Helper function for the "event generate" command.  Generate and
- *	process an XEvent, constructed from information parsed from the
- *	event description string and its optional arguments.
- *
- *	argv[0] contains name of the target window.
- *	argv[1] contains pattern string for one event (e.g, <Control-v>).
- *	argv[2..argc-1] contains -field/option pairs for specifying
- *		        additional detail in the generated event.
- *
- *	Either virtual or physical events can be generated this way.
- *	The event description string must contain the specification
- *	for only one event.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When constructing the event, 
- *	 event.xany.serial is filled with the current X serial number.
- *	 event.xany.window is filled with the target window.
- *	 event.xany.display is filled with the target window's display.
- *	Any other fields in eventPtr which are not specified by the pattern
- *	string or the optional arguments, are set to 0.
- *
- *	The event may be handled sychronously or asynchronously, depending
- *	on the value specified by the optional "-when" option.  The
- *	default setting is synchronous.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SendEventCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    XEvent event;    
-    CONST char *p;
-    char *name;
-    Window window;
-    Display *display;
-    Tk_Window tkwin;
-    int count, flags, synch, i, number, warp;
-    Tcl_QueuePosition pos;
-    Pattern pat;
-    unsigned long eventMask;
-    static CONST char *fieldStrings[] = {
-	"-when",	"-above",	"-borderwidth",	"-button",
-	"-count",	"-delta",	"-detail",	"-focus",
-	"-height",
-	"-keycode",	"-keysym",	"-mode",	"-override",
-	"-place",	"-root",	"-rootx",	"-rooty",
-	"-sendevent",	"-serial",	"-state",	"-subwindow",
-	"-time",	"-warp",	"-width",	"-window",
-	"-x",		"-y",	NULL
-    };
-    enum field {
-	EVENT_WHEN,	EVENT_ABOVE,	EVENT_BORDER,	EVENT_BUTTON,
-	EVENT_COUNT,	EVENT_DELTA,	EVENT_DETAIL,	EVENT_FOCUS,
-	EVENT_HEIGHT,
-	EVENT_KEYCODE,	EVENT_KEYSYM,	EVENT_MODE,	EVENT_OVERRIDE,
-	EVENT_PLACE,	EVENT_ROOT,	EVENT_ROOTX,	EVENT_ROOTY,
-	EVENT_SEND,	EVENT_SERIAL,	EVENT_STATE,	EVENT_SUBWINDOW,
-	EVENT_TIME,	EVENT_WARP,	EVENT_WIDTH,	EVENT_WINDOW,
-	EVENT_X,	EVENT_Y
-    };
-    tkwin = Tk_MainWindow(interp);
-    if (Blt_GetWindowFromObj(interp, objv[1], &window) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    name = Tcl_GetStringFromObj(objv[2], NULL);
-
-    display = Tk_Display(tkwin);
-    p = name;
-    eventMask = 0;
-    count = ParseEventDescription(interp, &p, &pat, &eventMask);
-    if (count == 0) {
-	return TCL_ERROR;
-    }
-    if (count != 1) {
-	Tcl_AppendResult(interp, "Double or Triple modifier not allowed",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (*p != '\0') {
-	Tcl_AppendResult(interp, "only one event specification allowed",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    memset((VOID *) &event, 0, sizeof(event));
-    event.xany.type = pat.eventType;
-    event.xany.serial = NextRequest(display);
-    event.xany.send_event = False;
-    event.xany.window = window;
-    event.xany.display = display;
-
-    flags = flagArray[event.xany.type];
-    if (flags & DESTROY) {
-	/*
-	 * Event DestroyNotify should be generated by destroying 
-	 * the window.
-	 */
-	XDestroyWindow(display, window);
-	return TCL_OK;
-    }
-    if (flags & (KEY_BUTTON_MOTION_VIRTUAL)) {
-	event.xkey.state = pat.needMods;
-	if ((flags & KEY) && (event.xany.type != MouseWheelEvent)) {
-	    TkpSetKeycodeAndState(tkwin, pat.detail.keySym, &event);
-	} else if (flags & BUTTON) {
-	    event.xbutton.button = pat.detail.button;
-	} else if (flags & VIRTUAL) {
-	    ((XVirtualEvent *) &event)->name = pat.detail.name;
-	}
-    }
-    if (flags & (CREATE|UNMAP|MAP|REPARENT|CONFIG|GRAVITY|CIRC)) {
-	event.xcreatewindow.window = event.xany.window;
-    }
-
-    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-	event.xkey.x_root = -1;
-	event.xkey.y_root = -1;
-    }
-
-    /*
-     * Process the remaining arguments to fill in additional fields
-     * of the event.
-     */
-
-    synch = 1;
-    warp = 0;
-    pos = TCL_QUEUE_TAIL;
-    for (i = 3; i < objc; i += 2) {
-	Tcl_Obj *optionPtr, *valuePtr;
-	int index;
-	
-	optionPtr = objv[i];
-	valuePtr = objv[i + 1];
-
-	if (Tcl_GetIndexFromObj(interp, optionPtr, fieldStrings, "option",
-		TCL_EXACT, &index) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((objc & 1) == 0) {
-	    /*
-	     * This test occurs after Tcl_GetIndexFromObj() so that
-	     * "event generate <Button> -xyz" will return the error message
-	     * that "-xyz" is a bad option, rather than that the value
-	     * for "-xyz" is missing.
-	     */
-
-	    Tcl_AppendResult(interp, "value for \"",
-		    Tcl_GetStringFromObj(optionPtr, NULL), "\" missing",
-		    (char *)NULL);
-	    return TCL_ERROR;
-	}
-
-	switch ((enum field) index) {
-	case EVENT_WARP: {
-	    if (Tcl_GetBooleanFromObj(interp, valuePtr, &warp) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (!(flags & (KEY_BUTTON_MOTION_VIRTUAL))) {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_WHEN: {
-#ifdef notdef
-	    pos = (Tcl_QueuePosition) TkFindStateNumObj(interp, optionPtr, 
-		queuePosition, valuePtr);
-	    if ((int) pos < -1) {
-		return TCL_ERROR;
-	    }
-	    synch = 0;
-	    if ((int) pos == -1) {
-		synch = 1;
-	    }
-#endif
-	    break;
-	}
-	case EVENT_ABOVE: {
-	    Window window2;
-
-	    if (Blt_GetWindowFromObj(interp, valuePtr, &window2) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & CONFIG) {
-		event.xconfigure.above = window2;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_BORDER: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (CREATE|CONFIG)) {
-		event.xcreatewindow.border_width = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_BUTTON: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & BUTTON) {
-		event.xbutton.button = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_COUNT: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & EXPOSE) {
-		event.xexpose.count = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_DELTA: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if ((flags & KEY) && (event.xkey.type == MouseWheelEvent)) {
-		event.xkey.keycode = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_DETAIL: {
-	    number = TkFindStateNumObj(interp, optionPtr, notifyDetail, 
-				       valuePtr);
-	    if (number < 0) {
-		return TCL_ERROR;
-	    }
-	    if (flags & FOCUS) {
-		event.xfocus.detail = number;
-	    } else if (flags & CROSSING) {
-		event.xcrossing.detail = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_FOCUS: {
-	    if (Tcl_GetBooleanFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & CROSSING) {
-		event.xcrossing.focus = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_HEIGHT: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & EXPOSE) {
-		event.xexpose.height = number;
-	    } else if (flags & CONFIG) {
-		event.xconfigure.height = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_KEYCODE: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if ((flags & KEY) && (event.xkey.type != MouseWheelEvent)) {
-		event.xkey.keycode = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_KEYSYM: {
-	    KeySym keysym;
-	    char *value;
-	    
-	    value = Tcl_GetStringFromObj(valuePtr, NULL);
-	    keysym = TkStringToKeysym(value);
-	    if (keysym == NoSymbol) {
-		Tcl_AppendResult(interp, "unknown keysym \"", value, "\"",
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    
-	    TkpSetKeycodeAndState(tkwin, keysym, &event);
-	    if (event.xkey.keycode == 0) {
-		Tcl_AppendResult(interp, "no keycode for keysym \"", value,
-				 "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    if (!(flags & KEY) || (event.xkey.type == MouseWheelEvent)) {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_MODE: {
-	    number = TkFindStateNumObj(interp, optionPtr, notifyMode,
-				       valuePtr);
-	    if (number < 0) {
-		return TCL_ERROR;
-	    }
-	    if (flags & CROSSING) {
-		event.xcrossing.mode = number;
-	    } else if (flags & FOCUS) {
-		event.xfocus.mode = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_OVERRIDE: {
-	    if (Tcl_GetBooleanFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & CREATE) {
-		event.xcreatewindow.override_redirect = number;
-	    } else if (flags & MAP) {
-		event.xmap.override_redirect = number;
-	    } else if (flags & REPARENT) {
-		event.xreparent.override_redirect = number;
-	    } else if (flags & CONFIG) {
-		event.xconfigure.override_redirect = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_PLACE: {
-	    number = TkFindStateNumObj(interp, optionPtr, circPlace,
-				       valuePtr);
-	    if (number < 0) {
-		return TCL_ERROR;
-	    }
-	    if (flags & CIRC) {
-		event.xcirculate.place = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_ROOT: {
-	    Window window2;
-
-	    if (Blt_GetWindowFromObj(interp, valuePtr, &window2) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		event.xkey.root = window2;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_ROOTX: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		event.xkey.x_root = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_ROOTY: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		event.xkey.y_root = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_SEND: {
-	    CONST char *value;
-	    
-	    value = Tcl_GetStringFromObj(valuePtr, NULL);
-	    if (isdigit(UCHAR(value[0]))) {
-		/*
-		 * Allow arbitrary integer values for the field; they
-		 * are needed by a few of the tests in the Tk test suite.
-		 */
-		
-		if (Tcl_GetIntFromObj(interp, valuePtr, &number)
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    } else {
-		if (Tcl_GetBooleanFromObj(interp, valuePtr, &number)
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	    event.xany.send_event = number;
-	    break;
-	}
-	case EVENT_SERIAL: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    event.xany.serial = number;
-	    break;
-	}
-	case EVENT_STATE: {
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		if (Tcl_GetIntFromObj(interp, valuePtr, &number)
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		if (flags & (KEY_BUTTON_MOTION_VIRTUAL)) {
-		    event.xkey.state = number;
-		} else {
-		    event.xcrossing.state = number;
-		}
-	    } else if (flags & VISIBILITY) {
-		number = TkFindStateNumObj(interp, optionPtr, visNotify,
-					   valuePtr);
-		if (number < 0) {
-		    return TCL_ERROR;
-		}
-		event.xvisibility.state = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_SUBWINDOW: {
-	    Window window2;
-
-	    if (Blt_GetWindowFromObj(interp, valuePtr, &window2) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		event.xkey.subwindow = window2;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_TIME: {
-	    if (Tcl_GetIntFromObj(interp, valuePtr, &number) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		event.xkey.time = (Time) number;
-	    } else if (flags & PROP) {
-		event.xproperty.time = (Time) number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_WIDTH: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number)
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & EXPOSE) {
-		event.xexpose.width = number;
-	    } else if (flags & (CREATE|CONFIG)) {
-		event.xcreatewindow.width = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_WINDOW: {
-	    Window window2;
-
-	    if (Blt_GetWindowFromObj(interp, valuePtr, &window2) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (CREATE|UNMAP|MAP|REPARENT|CONFIG
-			 |GRAVITY|CIRC)) {
-		event.xcreatewindow.window = window2;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_X: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number)
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {	
-		event.xkey.x = number;
-		/*
-		 * Only modify rootx as well if it hasn't been changed.
-		 */
-		if (event.xkey.x_root == -1) {
-		    int rootX, rootY;
-		    
-		    Tk_GetRootCoords(tkwin, &rootX, &rootY);
-		    event.xkey.x_root = rootX + number;
-		}
-	    } else if (flags & EXPOSE) {
-		event.xexpose.x = number;
-	    } else if (flags & (CREATE|CONFIG|GRAVITY)) { 
-		event.xcreatewindow.x = number;
-	    } else if (flags & REPARENT) {		
-		event.xreparent.x = number;
-	    } else {
-		goto badopt;
-	    }
-	    break;
-	}
-	case EVENT_Y: {
-	    if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number)
-			!= TCL_OK) {
-		    return TCL_ERROR;
-		}
-		if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) {
-		    event.xkey.y = number;
-		    /*
-		     * Only modify rooty as well if it hasn't been changed.
-		     */
-		    if (event.xkey.y_root == -1) {
-			int rootX, rootY;
-
-			Tk_GetRootCoords(tkwin, &rootX, &rootY);
-			event.xkey.y_root = rootY + number;
-		    }
-		} else if (flags & EXPOSE) {
-		    event.xexpose.y = number;
-		} else if (flags & (CREATE|CONFIG|GRAVITY)) {
-		    event.xcreatewindow.y = number;
-		} else if (flags & REPARENT) {
-		    event.xreparent.y = number;
-		} else {
-		    goto badopt;
-		}
-		break;
-	    }
-	}
-	continue;
-	
-	badopt:
-	Tcl_AppendResult(interp, name, " event doesn't accept \"",
-		Tcl_GetStringFromObj(optionPtr, NULL), "\" option", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (!XSendEvent(display, window, False, pat.eventType, &event)) {
-	fprintf(stderr, "synthethic event failed\n");
-    }
-    return TCL_OK;
-}
-
-int
-Blt_SendEventCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { 
-	"sendevent", SendEventCmd, 
-    };
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltBind.h b/blt3.0/src/bltBind.h
deleted file mode 100644
index 2e2c5cb..0000000
--- a/blt3.0/src/bltBind.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * bltBind.h --
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_BIND_H
-#define _BLT_BIND_H
-
-#include <bltList.h>
-
-typedef struct _Blt_BindTable *Blt_BindTable;
-
-typedef ClientData (Blt_BindPickProc)(ClientData clientData, int x, int y, 
-	ClientData *contextPtr);
-
-typedef void (Blt_BindTagProc)(Blt_BindTable bindTable, ClientData object, 
-	ClientData context, Blt_List list);
-
-
-/*
- *  Binding structure information:
- */
-
-struct _Blt_BindTable {
-    unsigned int flags;
-    Tk_BindingTable bindingTable;
-				/* Table of all bindings currently defined.
-				 * NULL means that no bindings exist, so the
-				 * table hasn't been created.  Each "object"
-				 * used for this table is either a Tk_Uid for
-				 * a tag or the address of an item named by
-				 * id. */
-
-    ClientData currentItem;	/* The item currently containing the mouse
-				 * pointer, or NULL if none. */
-    ClientData currentContext;	/* One word indicating what kind of object was
-				 * picked. */
-
-    ClientData newItem;		/* The item that is about to become the
-				 * current one, or NULL.  This field is used
-				 * to detect deletions of the new current item
-				 * pointer that occur during Leave processing
-				 * of the previous current tab.  */
-    ClientData newContext;	/* One-word indicating what kind of object was
-				 * just picked. */
-
-    ClientData focusItem;
-    ClientData focusContext;
-
-    XEvent pickEvent;		/* The event upon which the current choice of
-				 * the current tab is based.  Must be saved so
-				 * that if the current item is deleted, we can
-				 * pick another. */
-    int activePick;		/* The pick event has been initialized so that
-				 * we can repick it */
-
-    int state;			/* Last known modifier state.  Used to defer
-				 * picking a new current object while buttons
-				 * are down. */
-
-    ClientData clientData;
-    Tk_Window tkwin;
-    Blt_BindPickProc *pickProc;	/* Routine to report the item the mouse is
-				 * currently over. */
-    Blt_BindTagProc *tagProc;	/* Routine to report tags picked items. */
-};
-
-BLT_EXTERN void Blt_DestroyBindingTable(Blt_BindTable table);
-
-BLT_EXTERN Blt_BindTable Blt_CreateBindingTable(Tcl_Interp *interp, 
-	Tk_Window tkwin, ClientData clientData, Blt_BindPickProc *pickProc,
-	Blt_BindTagProc *tagProc);
-
-BLT_EXTERN int Blt_ConfigureBindings(Tcl_Interp *interp, Blt_BindTable table, 
-	ClientData item, int argc, const char **argv);
-
-BLT_EXTERN int Blt_ConfigureBindingsFromObj(Tcl_Interp *interp, 
-	Blt_BindTable table, ClientData item, int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN void Blt_PickCurrentItem(Blt_BindTable table);
-
-BLT_EXTERN void Blt_DeleteBindings(Blt_BindTable table, ClientData object);
-
-BLT_EXTERN void Blt_MoveBindingTable(Blt_BindTable table, Tk_Window tkwin);
-
-#define Blt_SetFocusItem(bindPtr, object, context) \
-	((bindPtr)->focusItem = (ClientData)(object),\
-	 (bindPtr)->focusContext = (ClientData)(context))
-
-#define Blt_SetCurrentItem(bindPtr, object, context) \
-	((bindPtr)->currentItem = (ClientData)(object),\
-	 (bindPtr)->currentContext = (ClientData)(context))
-
-#define Blt_GetCurrentItem(bindPtr)  ((bindPtr)->currentItem)
-#define Blt_GetCurrentContext(bindPtr)  ((bindPtr)->currentContext)
-#define Blt_GetLatestItem(bindPtr)  ((bindPtr)->newItem)
-
-#define Blt_GetBindingData(bindPtr)  ((bindPtr)->clientData)
-
-#endif /*_BLT_BIND_H*/
diff --git a/blt3.0/src/bltBitmap.c b/blt3.0/src/bltBitmap.c
deleted file mode 100644
index 7417f63..0000000
--- a/blt3.0/src/bltBitmap.c
+++ /dev/null
@@ -1,1415 +0,0 @@
-
-/*
- * bltBitmap.c --
- *
- * This module implements TCL bitmaps for the Tk toolkit.
- *
- *	Copyright 1993-1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Much of the code is taken from XRdBitF.c and XWrBitF.c from the MIT
- * X11R5 distribution.
- *
- *	Copyright, 1987, Massachusetts Institute of Technology
- *	Permission to use, copy, modify, distribute, and sell this
- *	software and its documentation for any purpose is hereby
- *	granted without fee, provided that the above copyright notice
- *	appear in all copies and that both that copyright notice and
- *	this permission notice appear in supporting documentation, and
- *	that the name of M.I.T. not be used in advertising or
- *	publicity pertaining to distribution of the software without
- *	specific, written prior permission.  M.I.T. makes no
- *	representations about the suitability of this software for any
- *	purpose.  It is provided "as is" without express or implied
- *	warranty.
- */
-
-/*
-  Predefined table holds bitmap info (source width, height)
-  Name table holds bitmap names  
-  Id table hold bitmap ids
-  Both id and name tables get you the actual bitmap.
- */
-#include "bltInt.h"
-
-#ifndef NO_BITMAP
-#include "bltOp.h"
-#include "bltHash.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include <X11/Xutil.h>
-
-#define BITMAP_THREAD_KEY	"BLT Bitmap Data"
-
-/* 
- * BitmapInterpData --
- *
- *	Tk's routine to create a bitmap, Tk_DefineBitmap, assumes that
- *	the source (bit array) is always statically allocated.  This
- *	isn't true here (we dynamically allocate the arrays), so we have 
- *	to save them in a hashtable and cleanup after the interpreter 
- *	is deleted.
- */
-typedef struct {
-    Blt_HashTable bitmapTable;	/* Hash table of bitmap data keyed by 
-				 * the name of the bitmap. */
-    Tcl_Interp *interp;
-    Display *display;		/* Display of interpreter. */
-    Tk_Window tkMain;		/* Main window of interpreter. */
-} BitmapInterpData;
-
-#define MAX_SIZE 255
-
-/* 
- * BitmapInfo --
- */
-typedef struct {
-    float angle;		/* Rotation of text string */
-    float scale;		/* Scaling factor */
-    Blt_Font font;		/* Font pointer */
-    Tk_Justify justify;		/* Justify text */
-    Blt_Pad xPad, yPad;		/* Padding around the text */
-} BitmapInfo;
-
-/* 
- * BitmapData --
- */
-typedef struct {
-    int width, height;		/* Dimension of image */
-    unsigned char *bits;	/* Data array for bitmap image */
-} BitmapData;
-
-#define DEF_BITMAP_FONT		STD_FONT
-#define DEF_BITMAP_PAD		"4"
-#define DEF_BITMAP_ANGLE	"0.0"
-#define DEF_BITMAP_SCALE	"1.0"
-#define DEF_BITMAP_JUSTIFY	"center"
-
-#define ROTATE_0	0
-#define ROTATE_90	1
-#define ROTATE_180	2
-#define ROTATE_270	3
-
-
-static Blt_ConfigSpec composeConfigSpecs[] =
-{
-    {BLT_CONFIG_FONT, "-font", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_FONT, Blt_Offset(BitmapInfo, font), 0},
-    {BLT_CONFIG_JUSTIFY, "-justify", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_JUSTIFY, Blt_Offset(BitmapInfo, justify),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-padx", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_PAD, Blt_Offset(BitmapInfo, xPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_PAD, Blt_Offset(BitmapInfo, yPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-rotate", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_ANGLE, Blt_Offset(BitmapInfo, angle),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-scale", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_SCALE, Blt_Offset(BitmapInfo, scale),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static Blt_ConfigSpec defineConfigSpecs[] =
-{
-    {BLT_CONFIG_FLOAT, "-rotate", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_ANGLE, Blt_Offset(BitmapInfo, angle),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-scale", (char *)NULL, (char *)NULL,
-	DEF_BITMAP_SCALE, Blt_Offset(BitmapInfo, scale),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/* Shared data for the image read/parse logic */
-static unsigned char hexTable[256];	/* conversion value */
-static int initialized = 0;	/* easier to fill in at run time */
-
-#define blt_width 40
-#define blt_height 40
-static unsigned char blt_bits[] =
-{
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x04,
-    0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0xe4, 0x33, 0x3f,
-    0x01, 0x00, 0x64, 0x36, 0x0c, 0x01, 0x00, 0x64, 0x36, 0x8c, 0x00, 0x00,
-    0xe4, 0x33, 0x8c, 0x00, 0x00, 0x64, 0x36, 0x8c, 0x00, 0x00, 0x64, 0x36,
-    0x0c, 0x01, 0x00, 0xe4, 0xf3, 0x0d, 0x01, 0x00, 0x04, 0x00, 0x00, 0x02,
-    0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x0c,
-    0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xf8, 0xff,
-    0x03, 0x80, 0xed, 0x07, 0x00, 0x04, 0xe0, 0x0c, 0x00, 0x20, 0x09, 0x10,
-    0x0c, 0x00, 0x00, 0x12, 0x10, 0x0c, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00,
-    0x00, 0x19, 0xd0, 0x03, 0x00, 0x00, 0x14, 0xb0, 0xfe, 0xff, 0xff, 0x1b,
-    0x50, 0x55, 0x55, 0x55, 0x0d, 0xe8, 0xaa, 0xaa, 0xaa, 0x16, 0xe4, 0xff,
-    0xff, 0xff, 0x2f, 0xf4, 0xff, 0xff, 0xff, 0x27, 0xd8, 0xae, 0xaa, 0xbd,
-    0x2d, 0x6c, 0x5f, 0xd5, 0x67, 0x1b, 0xbc, 0xf3, 0x7f, 0xd0, 0x36, 0xf8,
-    0x01, 0x10, 0xcc, 0x1f, 0xe0, 0x45, 0x8e, 0x92, 0x0f, 0xb0, 0x32, 0x41,
-    0x43, 0x0b, 0xd0, 0xcf, 0x3c, 0x7c, 0x0d, 0xb0, 0xaa, 0xc2, 0xab, 0x0a,
-    0x60, 0x55, 0x55, 0x55, 0x05, 0xc0, 0xff, 0xab, 0xaa, 0x03, 0x00, 0x00,
-    0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-#define bigblt_width 64
-#define bigblt_height 64
-static unsigned char bigblt_bits[] =
-{
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00,
-    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00,
-    0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00,
-    0x00, 0x00, 0xe2, 0x0f, 0xc7, 0xff, 0x10, 0x00, 0x00, 0x00, 0xe2, 0x1f,
-    0xc7, 0xff, 0x10, 0x00, 0x00, 0x00, 0xe2, 0x38, 0x07, 0x1c, 0x08, 0x00,
-    0x00, 0x00, 0xe2, 0x38, 0x07, 0x1c, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x38,
-    0x07, 0x1c, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x1f, 0x07, 0x1c, 0x04, 0x00,
-    0x00, 0x00, 0xe2, 0x1f, 0x07, 0x1c, 0x04, 0x00, 0x00, 0x00, 0xe2, 0x38,
-    0x07, 0x1c, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x38, 0x07, 0x1c, 0x08, 0x00,
-    0x00, 0x00, 0xe2, 0x38, 0x07, 0x1c, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x1f,
-    0xff, 0x1c, 0x10, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0xff, 0x1c, 0x10, 0x00,
-    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00,
-    0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00,
-    0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x06, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0xff, 0xff, 0x07, 0x00,
-    0x00, 0xe0, 0xf6, 0x3f, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x06, 0x00,
-    0x00, 0x00, 0xc0, 0x00, 0x80, 0x03, 0x06, 0x00, 0x00, 0xc0, 0x08, 0x03,
-    0x40, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x06, 0x00,
-    0x00, 0x00, 0x40, 0x04, 0x40, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04,
-    0x40, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x0c, 0x06, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-    0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x40, 0x55, 0xff, 0xff,
-    0xff, 0xff, 0x7f, 0x05, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x06,
-    0x80, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x03, 0x40, 0xab, 0xaa, 0xaa,
-    0xaa, 0xaa, 0xaa, 0x01, 0x70, 0x57, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x04,
-    0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0xd8, 0xff, 0xff, 0xff,
-    0xff, 0xff, 0xff, 0x14, 0xd0, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13,
-    0xf0, 0xda, 0xbf, 0xaa, 0xba, 0xfd, 0xd6, 0x0b, 0x70, 0xed, 0x77, 0x55,
-    0x57, 0xe5, 0xad, 0x07, 0xb8, 0xf7, 0xab, 0xaa, 0xaa, 0xd2, 0x5b, 0x0f,
-    0xf8, 0xfb, 0x54, 0x55, 0x75, 0x94, 0xf7, 0x1e, 0xf0, 0x7b, 0xfa, 0xff,
-    0x9f, 0xa9, 0xef, 0x1f, 0xc0, 0xbf, 0x00, 0x20, 0x40, 0x54, 0xfe, 0x0f,
-    0x00, 0x1f, 0x92, 0x00, 0x04, 0xa9, 0xfc, 0x01, 0xc0, 0x5f, 0x41, 0xf9,
-    0x04, 0x21, 0xfd, 0x00, 0xc0, 0x9b, 0x28, 0x04, 0xd8, 0x0a, 0x9a, 0x03,
-    0x40, 0x5d, 0x08, 0x40, 0x44, 0x44, 0x62, 0x03, 0xc0, 0xaa, 0x67, 0xe2,
-    0x03, 0x64, 0xba, 0x02, 0x40, 0x55, 0xd5, 0x55, 0xfd, 0xdb, 0x55, 0x03,
-    0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x01, 0x00, 0x57, 0x55, 0x55,
-    0x55, 0x55, 0xd5, 0x00, 0x00, 0xac, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a, 0x00,
-    0x00, 0xf0, 0xff, 0x57, 0x55, 0x55, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xf8,
-    0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static Tcl_ObjCmdProc BitmapCmd;
-static Tcl_InterpDeleteProc BitmapInterpDeleteProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetHexValue --
- *
- *	Converts the hexadecimal string into an unsigned integer
- *	value.  The hexadecimal string need not have a leading "0x".
- *
- * Results:
- *	Returns a standard TCL result. If the conversion was
- *	successful, TCL_OK is returned, otherwise TCL_ERROR.
- *
- * Side Effects:
- * 	If the conversion fails, interp->result is filled with an
- *	error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetHexValue(Tcl_Interp *interp, const char *string, int *valuePtr)
-{
-    const char *s;
-    int value;
-
-    s = string;
-    if ((s[0] == '0') && ((s[1] == 'x') || (s[1] == 'X'))) {
-	s += 2;
-    }
-    if (s[0] == '\0') {
-	Tcl_AppendResult(interp, "expecting hex value: got \"", string, "\"",
-	    (char *)NULL);
-	return TCL_ERROR;	/* Only found "0x"  */
-    }
-    value = 0;
-    for ( /*empty*/ ; *s != '\0'; s++) {
-	unsigned char byte;
-
-	/* Trim high bits, check type and accumulate */
-	byte = hexTable[(int)*s];
-	if (byte == 0xFF) {
-	    Tcl_AppendResult(interp, "expecting hex value: got \"", string,
-		"\"", (char *)NULL);
-	    return TCL_ERROR;	/* Not a hexadecimal number */
-	}
-	value = (value << 4) | byte;
-    }
-    *valuePtr = value;
-    return TCL_OK;
-}
-
-#ifdef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapToData --
- *
- *	Converts a bitmap into an data array.
- *
- * Results:
- *	Returns the number of bytes in an data array representing the bitmap.
- *
- * Side Effects:
- *	Memory is allocated for the data array. Caller must free
- *	array later.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BitmapToData(
-    Tk_Window tkwin,		/* Main window of interpreter */
-    Pixmap bitmap,		/* Bitmap to be queried */
-    int width, int height,	/* Dimensions of the bitmap */
-    unsigned char **bitsPtr)	/* Pointer to converted array of data */
-{
-    int y;
-    int count;
-    int nBytes, bytes_per_line;
-    unsigned char *bits;
-    unsigned char *srcBits;
-    int bytesPerRow;
-
-    *bitsPtr = NULL;
-    srcBits = Blt_GetBitmapData(Tk_Display(tkwin), bitmap, width, height,
-	&bytesPerRow);
-    if (srcBits == NULL) {
-        OutputDebugString("BitmapToData: Can't get bitmap data");
-	return 0;
-    }
-    bytes_per_line = (width + 7) / 8;
-    nBytes = height * bytes_per_line;
-    bits = Blt_AssertMalloc(sizeof(unsigned char) * nBytes);
-    count = 0;
-    for (y = height - 1; y >= 0; y--) {
-	unsigned char *srcPtr;
-	int value, bitMask;
-	int x;
-
-	srcPtr = srcBits + (bytesPerRow * y);
-	value = 0, bitMask = 1;
-	for (x = 0; x < width; /* empty */ ) {
-	    unsigned long pixel;
-
-	    pixel = (*srcPtr & (0x80 >> (x % 8)));
-	    if (pixel) {
-		value |= bitMask;
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		bits[count++] = (unsigned char)value;
-		value = 0, bitMask = 1;
-		srcPtr++;
-	    }
-	}
-	if (x & 7) {
-	    bits[count++] = (unsigned char)value;
-	}
-    }
-    *bitsPtr = bits;
-    return count;
-}
-
-#else
-
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapToData --
- *
- *	Converts a bitmap into an data array.
- *
- * Results:
- *	Returns the number of bytes in an data array representing the bitmap.
- *
- * Side Effects:
- *	Memory is allocated for the data array. Caller must free
- *	array later.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BitmapToData(
-    Tk_Window tkwin,		/* Main window of interpreter */
-    Pixmap bitmap,		/* Bitmap to be queried */
-    int width, int height,	/* Dimensions of the bitmap */
-    unsigned char **bitsPtr)	/* Pointer to converted array of data */
-{
-    int y;
-    int count;
-    int nBytes, bytes_per_line;
-    Display *display;
-    XImage *imagePtr;
-    unsigned char *bits;
-
-    display = Tk_Display(tkwin);
-    /* Convert the bitmap to an X image */
-    imagePtr = XGetImage(display, bitmap, 0, 0, width, height, 1L, XYPixmap);
-    /*
-     * The slow but robust brute force method of converting an X image:
-     */
-    bytes_per_line = (width + 7) / 8;
-    nBytes = height * bytes_per_line;
-    bits = Blt_AssertMalloc(sizeof(unsigned char) * nBytes);
-    count = 0;
-    for (y = 0; y < height; y++) {
-	int value, bitMask;
-	int x;
-
-	value = 0, bitMask = 1;
-	for (x = 0; x < width; /*empty*/ ) {
-	    unsigned long pixel;
-
-	    pixel = XGetPixel(imagePtr, x, y);
-	    if (pixel) {
-		value |= bitMask;
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		bits[count++] = (unsigned char)value;
-		value = 0, bitMask = 1;
-	    }
-	}
-	if (x & 7) {
-	    bits[count++] = (unsigned char)value;
-	}
-    }
-    XDestroyImage(imagePtr);
-    *bitsPtr = bits;
-    return count;
-}
-
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * AsciiToData --
- *
- *	Converts a TCL list of ASCII values into a data array.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- * 	If an error occurs while processing the data, interp->result
- * 	is filled with a corresponding error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AsciiToData(
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    char *elemList,		/* List of of hex numbers representing
-				 * bitmap data */
-    int width, int height,	/* Dimension of bitmap. */
-    unsigned char **bitsPtr)	/* data array (output) */
-{
-    int nBytes;			/* Number of bytes of data */
-    int value;			/* from an input line */
-    int padding;		/* to handle alignment */
-    int bytesPerLine;		/* per scanline of data */
-    unsigned char *bits;
-    int count;
-    enum Formats {
-	V10, V11
-    } format;
-    int i;		/*  */
-    const char **valueArr;
-    int nValues;
-
-    /* First time through initialize the ascii->hex translation table */
-    if (!initialized) {
-	Blt_InitHexTable(hexTable);
-	initialized = 1;
-    }
-    if (Tcl_SplitList(interp, elemList, &nValues, &valueArr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bytesPerLine = (width + 7) / 8;
-    nBytes = bytesPerLine * height;
-    if (nValues == nBytes) {
-	format = V11;
-    } else if (nValues == (nBytes / 2)) {
-	format = V10;
-    } else {
-	Tcl_AppendResult(interp, "bitmap has wrong # of data values",
-	    (char *)NULL);
-	goto error;
-    }
-    padding = 0;
-    if (format == V10) {
-	padding = ((width % 16) && ((width % 16) < 9));
-	if (padding) {
-	    bytesPerLine = (width + 7) / 8 + padding;
-	    nBytes = bytesPerLine * height;
-	}
-    }
-    bits = Blt_Calloc(nBytes, sizeof(unsigned char));
-    if (bits == NULL) {
-	Tcl_AppendResult(interp, "can't allocate memory for bitmap",
-	    (char *)NULL);
-	goto error;
-    }
-    count = 0;
-    for (i = 0; i < nValues; i++) {
-	if (GetHexValue(interp, valueArr[i], &value) != TCL_OK) {
-	    Blt_Free(bits);
-	    goto error;
-	}
-	bits[count++] = (unsigned char)value;
-	if (format == V10) {
-	    if ((!padding) || (((i * 2) + 2) % bytesPerLine)) {
-		bits[count++] = value >> 8;
-	    }
-	}
-    }
-    Blt_Free(valueArr);
-    *bitsPtr = bits;
-    return TCL_OK;
-  error:
-    Blt_Free(valueArr);
-    return TCL_ERROR;
-}
-
-static int
-ParseListData(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    int *widthPtr,
-    int *heightPtr,
-    unsigned char **bitsPtr)
-{
-    char *p;
-    int width, height;
-    char *string;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 2) {
-	Tcl_Obj **dims;
-	int nDims;
-	
-	if (Tcl_ListObjGetElements(interp, objv[0], &nDims, &dims) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (nDims != 2) {
-	    Tcl_AppendResult(interp, "wrong # of bitmap dimensions: ",
-			     "should be \"width height\"", (char *)NULL);
-	    return TCL_ERROR;
-	} 
-	if ((Tcl_GetIntFromObj(interp, dims[0], &width) != TCL_OK) ||
-	    (Tcl_GetIntFromObj(interp, dims[1], &height) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetString(objv[1]);
-    } else if (objc == 3) {
-	if ((Tcl_GetIntFromObj(interp, objv[0], &width) != TCL_OK) ||
-	    (Tcl_GetIntFromObj(interp, objv[1], &height) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetString(objv[2]);
-    } else {
-	Tcl_AppendResult(interp, "wrong # of bitmap data components: ",
-			 "should be \"dimensions sourceData\"", (char *)NULL);
-	return TCL_ERROR;;
-    }
-    if ((width < 1) || (height < 1)) {
-	Tcl_AppendResult(interp, "bad bitmap dimensions", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Convert commas to blank spaces */
-    string = Blt_AssertStrdup(string);
-    for (p = string; *p != '\0'; p++) {
-	if (*p == ',') {
-	    *p = ' ';
-	}
-    }
-    if (AsciiToData(interp, string, width, height, bitsPtr) != TCL_OK) {
-	Blt_Free(string);
-	return TCL_ERROR;
-    }
-    *widthPtr = width;
-    *heightPtr = height;
-    return TCL_OK;
-}
-
-/*
- * Parse the lines that define the dimensions of the bitmap,
- * plus the first line that defines the bitmap data (it declares
- * the name of a data variable but doesn't include any actual
- * data).  These lines look something like the following:
- *
- *		#define foo_width 16
- *		#define foo_height 16
- *		#define foo_x_hot 3
- *		#define foo_y_hot 3
- *		static char foo_bits[] = {
- *
- * The x_hot and y_hot lines may or may not be present.  It's
- * important to check for "char" in the last line, in order to
- * reject old X10-style bitmaps that used shorts.
- */
-
-static int
-ParseStructData(Tcl_Interp *interp, Tcl_Obj *objPtr, int *widthPtr, 
-		int *heightPtr, unsigned char **bitsPtr)
-{
-    int width, height;
-    int hotX, hotY;
-    char *line, *nextline;
-    char *data;
-    char *string;
-
-    width = height = 0;
-    hotX = hotY = -1;
-    data = NULL;
-    {
-	char *p;
-
-	/* Skip leading spaces. */
-	for (p = Tcl_GetString(objPtr); isspace(UCHAR(*p)); p++) {
-	    /*empty*/
-	}
-	string = Blt_AssertStrdup(p);
-    }
-    nextline = string;
-    for (line = string; nextline != NULL; line = nextline + 1) {
-	Tcl_RegExp re;
-
-	nextline = strchr(line, '\n');
-	if ((nextline == NULL) || (line == nextline)) {
-	    continue;		/* Empty line */
-	}
-	*nextline = '\0';
-	re = Tcl_RegExpCompile(interp, " *# *define +");
-	if (Tcl_RegExpExec(interp, re, line, line)) {
-	    const char *start, *end;
-	    const char *name, *value;
-	    size_t len;
-
-	    Tcl_RegExpRange(re, 0, &start, &end);
-	    name = strtok((char *)end, " \t"); 
-	    value = strtok(NULL, " \t");
-	    if ((name == NULL) || (value == NULL)) {
-		Tcl_AppendResult(interp, "what's the error?", (char *)NULL);
-		goto error;
-	    }
-	    len = strlen(name);
-	    if ((len >= 6) && (name[len-6] == '_') && 
-		(strcmp(name+len-6, "_width") == 0)) {
-		if (Tcl_GetInt(interp, value, &width) != TCL_OK) {
-		    goto error;
-		}
-	    } else if ((len >= 7) && (name[len-7] == '_') && 
-		       (strcmp(name+len-7, "_height") == 0)) {
-		if (Tcl_GetInt(interp, value, &height) != TCL_OK) {
-		    goto error;
-		}
-	    } else if ((len >= 6) && (name[len-6] == '_') && 
-		       (strcmp(name+len-6, "_x_hot") == 0)) {
-		if (Tcl_GetInt(interp, value, &hotX) != TCL_OK) {
-		    goto error;
-		}
-	    } else if ((len >= 6) && (name[len-6] == '_') && 
-		       (strcmp(name+len-6, "_y_hot") == 0)) {
-		if (Tcl_GetInt(interp, value, &hotY) != TCL_OK) {
-		    goto error;
-		}
-	    } 
-	} else {
-	    re = Tcl_RegExpCompile(interp, " *static +.*char +");
-	    if (Tcl_RegExpExec(interp, re, line, line)) {
-		char *p;
-
-		/* Find the { */
-	        /* Repair the string so we can search the entire string. */
- 	        *nextline = ' ';   
-		p = strchr(line, '{');
-		if (p == NULL) {
-		    goto error;
-		}
-		data = p + 1;
-		break;
-	    } else {
-		Tcl_AppendResult(interp, "unknown bitmap format \"", line, 
-		     "\": obsolete X10 bitmap file?", (char *)NULL);
-		goto error;
-	    }
-	}
-    }
-    /*
-     * Now we've read everything but the data.  Allocate an array
-     * and read in the data.
-     */
-    if ((width <= 0) || (height <= 0)) {
-	Tcl_AppendResult(interp, "invalid bitmap dimensions \"", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(width), " x ", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(height), "\"", (char *)NULL);
-	goto error;
-    }
-    {
-	char *p;
-
-	for (p = data; *p != '\0'; p++) {
-	    if ((*p == ',') || (*p == ';') || (*p == '}')) {
-		*p = ' ';
-	    }
-	}
-    }
-    if (AsciiToData(interp, data, width, height, bitsPtr) != TCL_OK) {
-	goto error;
-    }
-    *widthPtr = width;
-    *heightPtr = height;
-    Blt_Free(string);
-    return TCL_OK;
- error:
-    Blt_Free(string);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScaleRotateData --
- *
- *	Creates a new data array of the rotated and scaled bitmap.
- *
- * Results:
- *	A standard TCL result. If the bitmap data is rotated
- *	successfully, TCL_OK is returned.  But if memory could not be
- *	allocated for the new data array, TCL_ERROR is returned and an
- *	error message is left in interp->result.
- *
- * Side Effects:
- *	Memory is allocated for rotated, scaled data array. Caller
- *	must free array later.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ScaleRotateData(
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    BitmapData *srcPtr,		/* Source bitmap to transform. */
-    float angle,		/* Number of degrees to rotate the bitmap. */
-    float scale,		/* Factor to scale the bitmap. */
-    BitmapData *destPtr)	/* Destination bitmap. */
-{
-    int x, y;
-    double srcX, srcY, destX, destY;	/* Origins of source and destination
-					 * bitmaps */
-    double sinTheta, cosTheta;
-    double rotWidth, rotHeight;
-    double radians;
-    unsigned char *bits;
-    int nBytes;
-    int srcBytesPerLine, destBytesPerLine;
-
-    srcBytesPerLine = (srcPtr->width + 7) / 8;
-    Blt_GetBoundingBox(srcPtr->width, srcPtr->height, angle, &rotWidth, 
-	&rotHeight, (Point2d *)NULL);
-    destPtr->width = (int)(rotWidth * scale + 0.5) ;
-    destPtr->height = (int)(rotHeight * scale + 0.5);
-
-    destBytesPerLine = (destPtr->width + 7) / 8;
-    nBytes = destPtr->height * destBytesPerLine;
-    bits = Blt_Calloc(nBytes, sizeof(unsigned char));
-    if (bits == NULL) {
-	Tcl_AppendResult(interp, "can't allocate bitmap data array",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    scale = 1.0 / scale;
-    destPtr->bits = bits;
-
-    radians = (angle / 180.0) * M_PI;
-    sinTheta = sin(radians);
-    cosTheta = cos(radians);
-
-    /*
-     * Coordinates of the centers of the source and destination rectangles
-     */
-    srcX = srcPtr->width * 0.5;
-    srcY = srcPtr->height * 0.5;
-    destX = rotWidth * 0.5;
-    destY = rotHeight * 0.5;
-
-    /*
-     * Rotate each pixel of dest image, placing results in source X image
-     */
-    for (y = 0; y < destPtr->height; y++) {
-	for (x = 0; x < destPtr->width; x++) {
-	    double sxd, syd;	
-	    int sx, sy;
-	    int pixel, ipixel;
-	    
-	    sxd = scale * (double)x;
-	    syd = scale * (double)y;
-	    if (angle == 270.0) {
-		sx = (int)syd, sy = (int)(rotWidth - sxd) - 1;
-	    } else if (angle == 180.0) {
-		sx = (int)(rotWidth - sxd) - 1, sy = (int)(rotHeight - syd) - 1;
-	    } else if (angle == 90.0) {
-		sx = (int)(rotHeight - syd) - 1, sy = (int)sxd;
-	    } else if (angle == 0.0) {
-		sx = (int)sxd, sy = (int)syd;
-	    } else {
-		double tx, ty, rx, ry;
-		/* Translate origin to center of destination X image */
-
-		tx = sxd - destX;
-		ty = syd - destY;
-
-		/* Rotate the coordinates about the origin */
-
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source X image */
-		rx += srcX;
-		ry += srcY;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination X image
-		 * can be bigger than the source.
-		 */
-
-		if ((sx >= srcPtr->width) || (sx < 0) ||
-		    (sy >= srcPtr->height) || (sy < 0)) {
-		    continue;
-		}
-	    }
-	    ipixel = (srcBytesPerLine * sy) + (sx / 8);
-	    pixel = srcPtr->bits[ipixel] & (1 << (sx % 8));
-	    if (pixel) {
-		ipixel = (destBytesPerLine * y) + (x / 8);
-		bits[ipixel] |= (1 << (x % 8));
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapDataToString --
- *
- *	Returns a list of hex values corresponding to the data
- *	bits of the bitmap given.
- *
- *	Converts the unsigned character value into a two character
- *	hexadecimal string.  A separator is also added, which may
- *	either a newline or space according the the number of bytes
- *	already output.
- *
- * Results:
- *	Returns TCL_ERROR if a data array can't be generated
- *	from the bitmap (memory allocation failure), otherwise TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BitmapDataToString(
-    Tk_Window tkwin,		/* Main window of interpreter */
-    Pixmap bitmap,		/* Bitmap to be queried */
-    Tcl_DString *resultPtr)	/* Dynamic string to output results to */
-{
-    unsigned char *bits;
-    int nBytes;
-    int i;
-    int width, height;
-
-    /* Get the dimensions of the bitmap */
-    Tk_SizeOfBitmap(Tk_Display(tkwin), bitmap, &width, &height);
-    nBytes = BitmapToData(tkwin, bitmap, width, height, &bits);
-#define BYTES_PER_OUTPUT_LINE 24
-    for (i = 0; i < nBytes; i++) {
-	const char *separator;
-	char string[200];
-
-	separator = (i % BYTES_PER_OUTPUT_LINE) ? " " : "\n    ";
-	sprintf_s(string, 200, "%s%02x", separator, bits[i]);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if (bits != NULL) {
-        Blt_Free(bits);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComposeOp --
- *
- *	Converts the text string into an internal bitmap.
- *
- *	There's a lot of extra (read unnecessary) work going on here,
- *	but I don't (right now) think that it matters much.  The
- *	rotated bitmap (formerly an X image) is converted back to an
- *	image just so we can convert it to a data array for
- *	Tk_DefineBitmap.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- * 	If an error occurs while processing the data, interp->result
- * 	is filled with a corresponding error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ComposeOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const *objv)	/* Argument list */
-{
-    BitmapInfo bi;		/* Text rotation and font information */
-    BitmapInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Pixmap bitmap;		/* Text bitmap */
-    TextLayout *textPtr;
-    TextStyle ts;
-    char *string;
-    float angle;
-    int nBytes;
-    int isNew;
-    int result;
-    int width, height;		/* Dimensions of bitmap */
-    unsigned char *bits;	/* Data array derived from text bitmap */
-
-    bitmap = Tk_AllocBitmapFromObj((Tcl_Interp *)NULL, dataPtr->tkMain, 
-	objv[2]);
-    if (bitmap != None) {
-	Tk_FreeBitmap(dataPtr->display, bitmap);
-	return TCL_OK;
-    }
-    /* Initialize info and process flags */
-    bi.justify = TK_JUSTIFY_CENTER;
-    bi.angle = 0.0f;		/* No rotation or scaling by default */
-    bi.scale = 1.0f;
-    bi.padLeft = bi.padRight = 0;
-    bi.padTop = bi.padBottom = 0;
-    bi.font = (Blt_Font)NULL;	/* Initialized by Blt_ConfigureWidget */
-    if (Blt_ConfigureWidgetFromObj(interp, dataPtr->tkMain, composeConfigSpecs,
-	    objc - 4, objv + 4, (char *)&bi, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    angle = FMOD(bi.angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    Blt_Ts_InitStyle(ts);
-    Blt_Ts_SetFont(ts, bi.font);
-    Blt_Ts_SetJustify(ts, bi.justify);
-    Blt_Ts_SetPadding(ts, bi.xPad.side1, bi.yPad.side2, bi.yPad.side1, 
-	bi.yPad.side2);
-
-    string = Tcl_GetStringFromObj(objv[3], &nBytes);
-    textPtr = Blt_Ts_CreateLayout(string, nBytes, &ts);
-    bitmap = Blt_Ts_Bitmap(dataPtr->tkMain, textPtr, &ts, &width, &height, -1);
-    Blt_Free(textPtr);
-    if (bitmap == None) {
-	Tcl_AppendResult(interp, "can't create bitmap", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Free the font structure, since we don't need it anymore */
-    Blt_FreeOptions(composeConfigSpecs, (char *)&bi, dataPtr->display, 0);
-
-    /* Convert bitmap back to a data array */
-    nBytes = BitmapToData(dataPtr->tkMain, bitmap, width, height, &bits);
-    Tk_FreePixmap(dataPtr->display, bitmap);
-    if (nBytes == 0) {
-	Tcl_AppendResult(interp, "can't get bitmap data", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* If bitmap is to be rotated or scaled, do it here */
-    if ((angle != 0.0) || (bi.scale != 1.0f)) {
-	BitmapData srcData, destData;
-
-	srcData.bits = bits;
-	srcData.width = width;
-	srcData.height = height;
-
-	result = ScaleRotateData(interp, &srcData, angle, bi.scale, &destData);
-	Blt_Free(bits);		/* Free the un-transformed data array. */
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	bits = destData.bits;
-	width = destData.width;
-	height = destData.height;
-    }
-    /* Create the bitmap again, this time using Tk's bitmap facilities */
-    string = Tcl_GetString(objv[2]);
-    result = Tk_DefineBitmap(interp, Tk_GetUid(string), (char *)bits,
-	width, height);
-    if (result != TCL_OK) {
-	Blt_Free(bits);
-    }
-    hPtr = Blt_CreateHashEntry(&dataPtr->bitmapTable, string, &isNew);
-    Blt_SetHashValue(hPtr, bits);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DefineOp --
- *
- *	Converts the dataList into an internal bitmap.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- * 	If an error occurs while processing the data, interp->result
- *	is filled with a corresponding error message.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-DefineOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const *objv)	/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    int width, height;		/* Dimensions of bitmap */
-    unsigned char *bits;	/* working variable */
-    char *p;
-    BitmapInfo bi;
-    int result;
-    float angle;
-    Pixmap bitmap;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    char *string;
-
-    bitmap = Tk_AllocBitmapFromObj((Tcl_Interp *)NULL, dataPtr->tkMain, objv[2]);
-    if (bitmap != None) {
-	Tk_FreeBitmap(dataPtr->display, bitmap);
-	return TCL_OK;
-    }
-    /* Initialize info and then process flags */
-    bi.angle = 0.0f;		/* No rotation by default */
-    bi.scale = 1.0f;		/* No scaling by default */
-    if (Blt_ConfigureWidgetFromObj(interp, dataPtr->tkMain, defineConfigSpecs,
-	    objc - 4, objv + 4, (char *)&bi, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bits = NULL;
-    /* Skip leading spaces. */
-    for (p = Tcl_GetString(objv[3]); isspace(UCHAR(*p)); p++) {
-	/*empty*/
-    }
-    width = height = 0;		/* Suppress compiler warning. */
-    if (*p == '#') {
-	result = ParseStructData(interp, objv[3], &width, &height, &bits);
-    } else {
-	result = ParseListData(interp, objv[3], &width, &height, &bits);
-    }
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    angle = FMOD(bi.angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    /* If bitmap is to be rotated or scale, do it here */
-    if ((angle != 0.0) || (bi.scale != 1.0f)) { 
-	BitmapData srcData, destData;
-
-	srcData.bits = bits;
-	srcData.width = width;
-	srcData.height = height;
-
-	result = ScaleRotateData(interp, &srcData, angle, bi.scale, &destData);
-	Blt_Free(bits);		/* Free the array of un-transformed data. */
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	bits = destData.bits;
-	width = destData.width;
-	height = destData.height;
-    }
-    string = Tcl_GetString(objv[2]);
-    result = Tk_DefineBitmap(interp, Tk_GetUid(string), (char *)bits, width, 
-	height);
-    if (result != TCL_OK) {
-	Blt_Free(bits);
-    }
-    hPtr = Blt_CreateHashEntry(&dataPtr->bitmapTable, string, &isNew);
-    Blt_SetHashValue(hPtr, bits);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExistOp --
- *
- *	Indicates if the named bitmap exists.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ExistsOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    Pixmap bitmap;
-
-    bitmap = Tk_AllocBitmapFromObj((Tcl_Interp *)NULL, dataPtr->tkMain, objv[2]);
-    if (bitmap != None) {
-	Tk_FreeBitmap(dataPtr->display, bitmap);
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (bitmap != None));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HeightOp --
- *
- *	Returns the height of the named bitmap.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HeightOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    int width, height;
-    Pixmap bitmap;
-    
-    bitmap = Tk_AllocBitmapFromObj(interp, dataPtr->tkMain, objv[2]);
-    if (bitmap == None) {
-	return TCL_ERROR;
-    }
-    Tk_SizeOfBitmap(dataPtr->display, bitmap, &width, &height);
-    Tk_FreeBitmap(dataPtr->display, bitmap);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), height);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidthOp --
- *
- *	Returns the width of the named bitmap.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-WidthOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    int width, height;
-    Pixmap bitmap;
-
-    bitmap = Tk_AllocBitmapFromObj(interp, dataPtr->tkMain, objv[2]);
-    if (bitmap == None) {
-	return TCL_ERROR;
-    }
-    Tk_SizeOfBitmap(dataPtr->display, bitmap, &width, &height);
-    Tk_FreeBitmap(dataPtr->display, bitmap);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), width);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SourceOp --
- *
- *	Returns the data array (excluding width and height)
- *	of the named bitmap.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SourceOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    Pixmap bitmap;
-    Tcl_DString dString;
-
-    bitmap = Tk_AllocBitmapFromObj(interp, dataPtr->tkMain, objv[2]);
-    if (bitmap == None) {
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    BitmapDataToString(dataPtr->tkMain, bitmap, &dString);
-    Tk_FreeBitmap(dataPtr->display, bitmap);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DataOp --
- *
- *	Returns the data array, including width and height,
- *	of the named bitmap.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DataOp(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument list */
-{
-    BitmapInterpData *dataPtr = clientData;
-    Pixmap bitmap;
-    int width, height;
-    Tcl_DString dString;
-
-    bitmap = Tk_AllocBitmapFromObj(interp, dataPtr->tkMain, objv[2]);
-    if (bitmap == None) {
-	return TCL_ERROR;
-    }
-    Tk_SizeOfBitmap(dataPtr->display, bitmap, &width, &height);
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(width));
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(height));
-    Tcl_DStringStartSublist(&dString);
-    BitmapDataToString(dataPtr->tkMain, bitmap, &dString);
-    Tcl_DStringEndSublist(&dString);
-    Tk_FreeBitmap(dataPtr->display, bitmap);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BLT Sub-command specification:
- *
- *	- Name of the sub-command.
- *	- Minimum number of characters needed to unambiguously
- *        recognize the sub-command.
- *	- Pointer to the function to be called for the sub-command.
- *	- Minimum number of arguments accepted.
- *	- Maximum number of arguments accepted.
- *	- String to be displayed for usage.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec bitmapOps[] =
-{
-    {"compose", 1, ComposeOp, 4, 0, "bitmapName text ?flags?",},
-    {"data",    2, DataOp,    3, 3, "bitmapName",},
-    {"define",  2, DefineOp,  4, 0, "bitmapName data ?flags?",},
-    {"exists",  1, ExistsOp,  3, 3, "bitmapName",},
-    {"height",  1, HeightOp,  3, 3, "bitmapName",},
-    {"source",  1, SourceOp,  3, 3, "bitmapName",},
-    {"width",   1, WidthOp,   3, 3, "bitmapName",},
-};
-static int nBitmapOps = sizeof(bitmapOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapCmd --
- *
- *	This procedure is invoked to process the TCL command
- *	that corresponds to bitmaps managed by this module.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BitmapCmd(
-    ClientData clientData,	/* Thread-specific data for bitmaps. */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nBitmapOps, bitmapOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapInterpDeleteProc --
- *
- *	This is called when the interpreter is deleted.  All the bitmaps
- *	specific to that interpreter are destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys the bitmap table.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-BitmapInterpDeleteProc(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp)
-{
-    BitmapInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->bitmapTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	unsigned char *bits;
-
-	bits = Blt_GetHashValue(hPtr);
-	Blt_Free(bits);
-    }
-    Blt_DeleteHashTable(&dataPtr->bitmapTable);
-    Tcl_DeleteAssocData(interp, BITMAP_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-static BitmapInterpData *
-GetBitmapInterpData(Tcl_Interp *interp)
-{
-    BitmapInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (BitmapInterpData *)
-	Tcl_GetAssocData(interp, BITMAP_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(BitmapInterpData));
-	dataPtr->interp = interp;
-	dataPtr->tkMain = Tk_MainWindow(interp);
-	dataPtr->display = Tk_Display(dataPtr->tkMain);
-	Tcl_SetAssocData(interp, BITMAP_THREAD_KEY, BitmapInterpDeleteProc, 
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->bitmapTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BitmapCmdInitProc --
- *
- *	This procedure is invoked to initialize the bitmap command.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Adds the command to the interpreter and sets an array variable
- *	which its version number.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_BitmapCmdInitProc(Tcl_Interp *interp)
-{
-    BitmapInterpData *dataPtr;
-    static Blt_InitCmdSpec cmdSpec = {"bitmap", BitmapCmd };
-
-    /* Define the BLT logo bitmaps */
-
-    dataPtr = GetBitmapInterpData(interp);
-    cmdSpec.clientData = dataPtr;
-    Tk_DefineBitmap(interp, Tk_GetUid("bigBLT"), (char *)bigblt_bits,
-	bigblt_width, bigblt_height);
-    Tk_DefineBitmap(interp, Tk_GetUid("BLT"), (char *)blt_bits,
-	blt_width, blt_height);
-    Tcl_ResetResult(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_BITMAP */
diff --git a/blt3.0/src/bltBitmap.h b/blt3.0/src/bltBitmap.h
deleted file mode 100644
index 7da86ca..0000000
--- a/blt3.0/src/bltBitmap.h
+++ /dev/null
@@ -1,14 +0,0 @@
-
-BLT_EXTERN Pixmap Blt_PhotoImageMask(Tk_Window tkwin, Tk_PhotoImageBlock src);
-
-BLT_EXTERN Pixmap Blt_ScaleBitmap(Tk_Window tkwin, Pixmap srcBitmap, int srcWidth, 
-	int srcHeight, int destWidth, int destHeight);
-
-BLT_EXTERN Pixmap Blt_RotateBitmap(Tk_Window tkwin, Pixmap srcBitmap, 
-	int srcWidth, int srcHeight, float angle, int *destWidthPtr, 
-	int *destHeightPtr);
-
-BLT_EXTERN Pixmap Blt_ScaleRotateBitmapArea(Tk_Window tkwin, Pixmap srcBitmap,
-	unsigned int srcWidth, unsigned int srcHeight, int regionX, int regionY,
-	unsigned int regionWidth, unsigned int regionHeight, 
-	unsigned int destWidth, unsigned int destHeight, float angle);
diff --git a/blt3.0/src/bltBusy.c b/blt3.0/src/bltBusy.c
deleted file mode 100644
index 51ef2a2..0000000
--- a/blt3.0/src/bltBusy.c
+++ /dev/null
@@ -1,1249 +0,0 @@
-
-/*
- * bltBusy.c --
- *
- * This module implements busy windows for the BLT toolkit.
- *
- *	Copyright 1993-2009 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_BUSY
-#include "bltOp.h"
-#include "bltHash.h"
-#include "tkDisplay.h"
-#define BUSYDEBUG 0
-
-#ifndef TK_REPARENTED
-#define TK_REPARENTED 0
-#endif
-
-#define BUSY_THREAD_KEY	"BLT Busy Data"
-
-typedef struct {
-    Display *display;		/* Display of busy window */
-    Tcl_Interp *interp;		/* Interpreter where "busy" command was
-				 * created. It's used to key the searches in the
-				 * window hierarchy. See the "windows"
-				 * command. */
-
-    Tk_Window tkBusy;		/* Busy window: Transparent window used to block
-				 * delivery of events to windows underneath
-				 * it. */
-
-    Tk_Window tkParent;		/* Parent window of the busy window. It may be
-				 * the reference window (if the reference is a
-				 * toplevel) or a mutual ancestor of the
-				 * reference window */
-
-    Tk_Window tkRef;		/* Reference window of the busy window.  It's is
-				 * used to manage the size and position of the
-				 * busy window. */
-
-
-    int x, y;			/* Position of the reference window */
-
-    int width, height;		/* Size of the reference window. Retained to
-				 * know if the reference window has been
-				 * reconfigured to a new size. */
-
-    int isBusy;			/* Indicates whether the transparent window
-				 * should be displayed. This can be different
-				 * from what Tk_IsMapped says because the a
-				 * sibling reference window may be unmapped,
-				 * forcing the busy window to be also hidden. */
-
-    int menuBar;		/* Menu bar flag. */
-    Tk_Cursor cursor;		/* Cursor for the busy window. */
-
-    Blt_HashEntry *hashPtr;	/* Used the delete the busy window entry out of
-				 * the global hash table. */
-    Blt_HashTable *tablePtr;
-} Busy;
-
-#ifdef WIN32
-#define DEF_BUSY_CURSOR "wait"
-#else
-#define DEF_BUSY_CURSOR "watch"
-#endif
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_CURSOR, "-cursor", "busyCursor", "BusyCursor",
-	DEF_BUSY_CURSOR, Blt_Offset(Busy, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-typedef struct {
-    Blt_HashTable busyTable;	/* Hash table of busy window structures keyed
-				 * by the address of the reference Tk
-				 * window */
-    Tk_Window tkMain;
-    Tcl_Interp *interp;
-} BusyInterpData;
-
-static Tk_GeomRequestProc BusyGeometryProc;
-static Tk_GeomLostSlaveProc BusyCustodyProc;
-static Tk_GeomMgr busyMgrInfo =
-{
-    (char *)"busy",		/* Name of geometry manager used by winfo */
-    BusyGeometryProc,		/* Procedure to for new geometry requests */
-    BusyCustodyProc,		/* Procedure when window is taken away */
-};
-
-/* Forward declarations */
-static Tcl_FreeProc DestroyBusy;
-static Tk_EventProc BusyEventProc;
-static Tk_EventProc RefWinEventProc;
-static Tcl_ObjCmdProc BusyCmd;
-static Tcl_InterpDeleteProc BusyInterpDeleteProc;
-
-static void
-ShowBusyWindow(Busy *busyPtr)
-{
-    if (busyPtr->tkBusy != NULL) {
-	Tk_MapWindow(busyPtr->tkBusy);
-	/* 
-	 * Always raise the busy window just in case new sibling windows have
-	 * been created in the meantime. Can't use Tk_RestackWindow because it
-	 * doesn't work under Win32.
-	 */
-	XRaiseWindow(busyPtr->display, Tk_WindowId(busyPtr->tkBusy));
-    }
-#ifdef WIN32
-    {
-	POINT point;
-	/*
-	 * In Win32 cursors aren't associated with windows.  Tk fakes this by
-	 * watching <Motion> events on its windows.  Tk will automatically
-	 * change the cursor when the pointer enters the Busy window.  But
-	 * Windows doesn't immediately change the cursor; it waits for the
-	 * cursor position to change or a system call.  We need to change the
-	 * cursor before the application starts processing, so set the cursor
-	 * position redundantly back to the current position.
-	 */
-	GetCursorPos(&point);
-	SetCursorPos(point.x, point.y);
-    }
-#endif /* WIN32 */
-    XFlush(busyPtr->display);
-}
-
-static void
-HideBusyWindow(Busy *busyPtr)
-{
-    if (busyPtr->tkBusy != NULL) {
-	Tk_UnmapWindow(busyPtr->tkBusy); 
-    }
-#ifdef WIN32
-    {
-	POINT point;
-	/*
-	 * Under Win32, cursors aren't associated with windows.  Tk fakes this
-	 * by watching Motion events on its windows.  So Tk will automatically
-	 * change the cursor when the pointer enters the Busy window.  But
-	 * Windows doesn't immediately change the cursor: it waits for the
-	 * cursor position to change or a system call.  We need to change the
-	 * cursor before the application starts processing, so set the cursor
-	 * position redundantly back to the current position.
-	 */
-	GetCursorPos(&point);
-	SetCursorPos(point.x, point.y);
-    }
-#endif /* WIN32 */
-    XFlush(busyPtr->display);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for events on the busy
- *	window itself.  We're only concerned with destroy events.
- *
- *	It might be necessary (someday) to watch resize events.  Right now, I
- *	don't think there's any point in it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When a busy window is destroyed, all internal structures associated
- *	with it released at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BusyEventProc(
-    ClientData clientData,		/* Busy window record */
-    XEvent *eventPtr)			/* Event which triggered call to
-					 * routine */
-{
-    Busy *busyPtr = clientData;
-
-    if (eventPtr->type == DestroyNotify) {
-	busyPtr->tkBusy = NULL;
-	Tcl_EventuallyFree(busyPtr, DestroyBusy);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyCustodyProc --
- *
- *	This procedure is invoked when the busy window has been stolen by
- *	another geometry manager.  The information and memory associated with
- *	the busy window is released. I don't know why anyone would try to pack
- *	a busy window, but this should keep everything sane, if it is.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The Busy structure is freed at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-BusyCustodyProc(
-    ClientData clientData,		/* Information about the busy window. */
-    Tk_Window tkwin)			/* Not used. */
-{
-    Busy *busyPtr = clientData;
-
-    Tk_DeleteEventHandler(busyPtr->tkBusy, StructureNotifyMask, BusyEventProc, 
-	busyPtr);
-    HideBusyWindow(busyPtr);
-    busyPtr->tkBusy = NULL;
-    Tcl_EventuallyFree(busyPtr, DestroyBusy);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for busy windows.
- *	Busy windows never request geometry, so it's unlikely that this
- *	routine will ever be called.  The routine exists simply as a place
- *	holder for the GeomProc in the Geometry Manager structure.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-BusyGeometryProc(
-    ClientData clientData,		/* Information about window that got new
-					 * preferred geometry.  */
-    Tk_Window tkwin)			/* Other Tk-related information about
-					 * the window. */
-{
-    /* Should never get here */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RefWinEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for the following events
- *	on the reference window.  If the reference and parent windows are the
- *	same, only the first event is important.
- *
- *	   1) ConfigureNotify  - The reference window has been resized or
- *				 moved.  Move and resize the busy window
- *				 to be the same size and position of the
- *				 reference window.
- *
- *	   2) DestroyNotify    - The reference window was destroyed. Destroy
- *				 the busy window and the free resources
- *				 used.
- *
- *	   3) MapNotify	       - The reference window was (re)shown. Map the
- *				 busy window again.
- *
- *	   4) UnmapNotify      - The reference window was hidden. Unmap the
- *				 busy window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the reference window gets deleted, internal structures get cleaned
- *	up.  When it gets resized, the busy window is resized accordingly. If
- *	it's displayed, the busy window is displayed. And when it's hidden, the
- *	busy window is unmapped.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RefWinEventProc(
-    ClientData clientData,		/* Busy window record */
-    XEvent *eventPtr)			/* Event that triggered the call to this
-					 * routine */
-{
-    Busy *busyPtr = clientData;
-
-    switch (eventPtr->type) {
-    case ReparentNotify:
-    case DestroyNotify:
-
-	/*
-	 * Arrange for the busy structure to be removed at a proper time.
-	 */
-	Tcl_EventuallyFree(busyPtr, DestroyBusy);
-	break;
-
-    case ConfigureNotify:
-	if ((busyPtr->width != Tk_Width(busyPtr->tkRef)) ||
-	    (busyPtr->height != Tk_Height(busyPtr->tkRef)) ||
-	    (busyPtr->x != Tk_X(busyPtr->tkRef)) ||
-	    (busyPtr->y != Tk_Y(busyPtr->tkRef))) {
-	    int x, y;
-
-	    busyPtr->width = Tk_Width(busyPtr->tkRef);
-	    busyPtr->height = Tk_Height(busyPtr->tkRef);
-	    busyPtr->x = Tk_X(busyPtr->tkRef);
-	    busyPtr->y = Tk_Y(busyPtr->tkRef);
-
-	    x = y = 0;
-
-	    if (busyPtr->tkParent != busyPtr->tkRef) {
-		Tk_Window tkwin;
-
-		for (tkwin = busyPtr->tkRef; (tkwin != NULL) &&
-			 (!Tk_IsTopLevel(tkwin)); tkwin = Tk_Parent(tkwin)) {
-		    if (tkwin == busyPtr->tkParent) {
-			break;
-		    }
-		    x += Tk_X(tkwin) + Tk_Changes(tkwin)->border_width;
-		    y += Tk_Y(tkwin) + Tk_Changes(tkwin)->border_width;
-		}
-	    }
-#if BUSYDEBUG
-	    PurifyPrintf("menubar2: width=%d, height=%d\n", 
-		busyPtr->width, busyPtr->height);
-#endif
-	    if (busyPtr->tkBusy != NULL) {
-#if BUSYDEBUG
-		fprintf(stderr, "busy window %s is at %d,%d %dx%d\n", 
-			Tk_PathName(busyPtr->tkBusy),
-			x, y, busyPtr->width, busyPtr->height);
-#endif
-		Tk_MoveResizeWindow(busyPtr->tkBusy, x, y, busyPtr->width,
-		    busyPtr->height);
-		if (busyPtr->isBusy) {
-		    ShowBusyWindow(busyPtr);
-		}
-	    }
-	}
-	break;
-
-    case MapNotify:
-	if ((busyPtr->tkParent != busyPtr->tkRef) && (busyPtr->isBusy)) {
-	    ShowBusyWindow(busyPtr);
-	}
-	break;
-
-    case UnmapNotify:
-	if (busyPtr->tkParent != busyPtr->tkRef) {
-	    HideBusyWindow(busyPtr);
-	}
-	break;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureBusy --
- *
- *	This procedure is called from the Tk event dispatcher. It releases X
- *	resources and memory used by the busy window and updates the internal
- *	hash table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory and resources are released and the Tk event handler is removed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureBusy(
-    Tcl_Interp *interp,
-    Busy *busyPtr,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tk_Cursor oldCursor;
-
-    oldCursor = busyPtr->cursor;
-    if (Blt_ConfigureWidgetFromObj(interp, busyPtr->tkRef, configSpecs, 
-	objc, objv, (char *)busyPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (busyPtr->cursor != oldCursor) {
-	if (busyPtr->cursor == None) {
-	    Tk_UndefineCursor(busyPtr->tkBusy);
-	} else {
-	    Tk_DefineCursor(busyPtr->tkBusy, busyPtr->cursor);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateBusy --
- *
- *	Creates a child transparent window that obscures its parent window
- *	thereby effectively blocking device events.  The size and position of
- *	the busy window is exactly that of the reference window.
- *
- *	We want to create sibling to the window to be blocked.  If the busy
- *	window is a child of the window to be blocked, Enter/Leave events can
- *	sneak through.  Futhermore under WIN32, messages of transparent
- *	windows are sent directly to the parent.  The only exception to this
- *	are toplevels, since we can't make a sibling.  Fortunately, toplevel
- *	windows rarely receive events that need blocking.
- *
- * Results:
- *	Returns a pointer to the new busy window structure.
- *
- * Side effects:
- *	When the busy window is eventually displayed, it will screen device
- *	events (in the area of the reference window) from reaching its parent
- *	window and its children.  User feed back can be achieved by changing
- *	the cursor.
- *
- *---------------------------------------------------------------------------
- */
-static Busy *
-CreateBusy(
-    Tcl_Interp *interp,			/* Interpreter to report error to */
-    Tk_Window tkRef)			/* Window hosting the busy window */
-{
-    Busy *busyPtr;
-    int length;
-    const char *fmt;
-    char *name;
-    Tk_Window tkBusy;
-    Window parent;
-    Tk_Window tkChild, tkParent;
-    Tk_FakeWin *winPtr;
-    int x, y;
-
-    busyPtr = Blt_AssertCalloc(1, sizeof(Busy));
-    x = y = 0;
-    length = strlen(Tk_Name(tkRef));
-    name = Blt_AssertMalloc(length + 6);
-    if (Tk_IsTopLevel(tkRef)) {
-	fmt = "_Busy";		/* Child */
-	tkParent = tkRef;
-    } else {
-	Tk_Window tkwin;
-
-	fmt = "%s_Busy";	/* Sibling */
-	tkParent = Tk_Parent(tkRef);
-	for (tkwin = tkRef; (tkwin != NULL) && (!Tk_IsTopLevel(tkwin)); 
-	     tkwin = Tk_Parent(tkwin)) {
-	    if (tkwin == tkParent) {
-		break;
-	    }
-	    x += Tk_X(tkwin) + Tk_Changes(tkwin)->border_width;
-	    y += Tk_Y(tkwin) + Tk_Changes(tkwin)->border_width;
-	}
-    }
-    for (tkChild = Blt_FirstChild(tkParent); tkChild != NULL; 
-	 tkChild = Blt_NextChild(tkChild)) {
-	Tk_MakeWindowExist(tkChild);
-    }
-    sprintf_s(name, length + 6, fmt, Tk_Name(tkRef));
-    tkBusy = Tk_CreateWindow(interp, tkParent, name, (char *)NULL);
-    Blt_Free(name);
-
-    if (tkBusy == NULL) {
-	return NULL;
-    }
-    Tk_MakeWindowExist(tkRef);
-    busyPtr->display = Tk_Display(tkRef);
-    busyPtr->interp = interp;
-    busyPtr->tkRef = tkRef;
-    busyPtr->tkParent = tkParent;
-    busyPtr->tkBusy = tkBusy;
-    busyPtr->width = Tk_Width(tkRef);
-    busyPtr->height = Tk_Height(tkRef);
-    busyPtr->x = Tk_X(tkRef);
-    busyPtr->y = Tk_Y(tkRef);
-    busyPtr->cursor = None;
-    busyPtr->isBusy = FALSE;
-    Tk_SetClass(tkBusy, "Busy");
-    Blt_SetWindowInstanceData(tkBusy, busyPtr);
-
-    winPtr = (Tk_FakeWin *) tkRef;
-    if (winPtr->flags & TK_REPARENTED) {
-	/*
-	 * This works around a bug in the implementation of menubars for
-	 * non-MacIntosh window systems (Win32 and X11).  Tk doesn't reset the
-	 * pointers to the parent window when the menu is reparented
-	 * (winPtr->parentPtr points to the wrong window). We get around this
-	 * by determining the parent via the native API calls.
-	 */
-#ifdef WIN32
-	{
-	    HWND hWnd;
-	    RECT rect;
-
-	    hWnd = Tk_GetHWND(Tk_WindowId(tkRef));
-	    hWnd = GetParent(hWnd);
-	    parent = (Window) hWnd;
-	    if (GetWindowRect(hWnd, &rect)) {
-		busyPtr->width = rect.right - rect.left;
-		busyPtr->height = rect.bottom - rect.top;
-#if BUSYDEBUG
-		PurifyPrintf("menubar: width=%d, height=%d\n",
-		    busyPtr->width, busyPtr->height);
-#endif
-	    }
-	}
-#else
-	parent = Blt_GetParentWindow(busyPtr->display, Tk_WindowId(tkRef));
-#endif
-    } else {
-	parent = Tk_WindowId(tkParent);
-#ifdef WIN32
-	parent = (Window) Tk_GetHWND(parent);
-#endif
-    }
-    Blt_MakeTransparentWindowExist(tkBusy, parent, TRUE);
-
-#if BUSYDEBUG
-    PurifyPrintf("menubar1: width=%d, height=%d\n", busyPtr->width, 
-	busyPtr->height);
-    fprintf(stderr, "busy window %s is at %d,%d %dx%d\n", Tk_PathName(tkBusy),
-	    x, y, busyPtr->width, busyPtr->height);
-#endif
-    Tk_MoveResizeWindow(tkBusy, x, y, busyPtr->width, busyPtr->height);
-
-    /* Only worry if the busy window is destroyed.  */
-    Tk_CreateEventHandler(tkBusy, StructureNotifyMask, BusyEventProc, busyPtr);
-    /*
-     * Indicate that the busy window's geometry is being managed.  This will
-     * also notify us if the busy window is ever packed.
-     */
-    Tk_ManageGeometry(tkBusy, &busyMgrInfo, busyPtr);
-    if (busyPtr->cursor != None) {
-	Tk_DefineCursor(tkBusy, busyPtr->cursor);
-    }
-    /* Track the reference window to see if it is resized or destroyed.  */
-    Tk_CreateEventHandler(tkRef, StructureNotifyMask, RefWinEventProc, busyPtr);
-    return busyPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyBusy --
- *
- *	This procedure is called from the Tk event dispatcher. It releases X
- *	resources and memory used by the busy window and updates the internal
- *	hash table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory and resources are released and the Tk event handler is removed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyBusy(DestroyData data)		/* Busy window structure record */
-{
-    Busy *busyPtr = (Busy *)data;
-
-    Blt_FreeOptions(configSpecs, (char *)busyPtr, busyPtr->display, 0);
-    if (busyPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(busyPtr->tablePtr, busyPtr->hashPtr);
-    }
-    Tk_DeleteEventHandler(busyPtr->tkRef, StructureNotifyMask, 
-	RefWinEventProc, busyPtr);
-    if (busyPtr->tkBusy != NULL) {
-	Tk_DeleteEventHandler(busyPtr->tkBusy, StructureNotifyMask,
-	    BusyEventProc, busyPtr);
-	Tk_ManageGeometry(busyPtr->tkBusy, NULL, busyPtr);
-	Tk_DestroyWindow(busyPtr->tkBusy);
-    }
-    Blt_Free(busyPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBusy --
- *
- *	Returns the busy window structure associated with the reference
- *	window, keyed by its path name.  The clientData argument is the main
- *	window of the interpreter, used to search for the reference window in
- *	its own window hierarchy.
- *
- * Results:
- *	If path name represents a reference window with a busy window, a
- *	pointer to the busy window structure is returned. Otherwise, NULL is
- *	returned and an error message is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetBusy(
-    BusyInterpData *dataPtr,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to. If
-					 * NULL, indicates not to generate error
-					 * message. */
-    Tcl_Obj *objPtr,
-    Busy **busyPtrPtr)		        /* Will contain address of busy window
-					 * if found. */
-{
-    Blt_HashEntry *hPtr;
-    Tk_Window tkwin;
-    const char *pathName;		/* Path name of parent window */
-
-    pathName = Tcl_GetString(objPtr);
-    tkwin = Tk_NameToWindow(dataPtr->interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->busyTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find busy window \"", pathName, 
-		"\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *busyPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HoldBusy --
- *
- *	Creates (if necessary) and maps a busy window, thereby preventing
- *	device events from being be received by the parent window and its
- *	children.
- *
- * Results:
- *	Returns a standard TCL result. If path name represents a busy window,
- *	it is unmapped and TCL_OK is returned. Otherwise, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side effects:
- *	The busy window is created and displayed, blocking events from the
- *	parent window and its children.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HoldBusy(
-    BusyInterpData *dataPtr,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)		/* Window name and option pairs */
-{
-    Tk_Window tkwin;
-    Blt_HashEntry *hPtr;
-    Busy *busyPtr;
-    int isNew;
-    int result;
-
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[0]), dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(&dataPtr->busyTable, (char *)tkwin, &isNew);
-    if (isNew) {
-	busyPtr = (Busy *)CreateBusy(interp, tkwin);
-	if (busyPtr == NULL) {
-	    return TCL_ERROR;
-	}
-	Blt_SetHashValue(hPtr, (char *)busyPtr);
-	busyPtr->hashPtr = hPtr;
-    } else {
-	busyPtr = Blt_GetHashValue(hPtr);
-    }
-    busyPtr->tablePtr = &dataPtr->busyTable;
-    result = ConfigureBusy(interp, busyPtr, objc - 1, objv + 1);
-
-    /* 
-     * Don't map the busy window unless the reference window is also currently
-     * displayed.
-     */
-    if (Tk_IsMapped(busyPtr->tkRef)) {
-	ShowBusyWindow(busyPtr);
-    } else {
-	HideBusyWindow(busyPtr);
-    }
-    busyPtr->isBusy = TRUE;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StatusOp --
- *
- *	Returns the status of the busy window; whether it's blocking events or
- *	not.
- *
- * Results:
- *	Returns a standard TCL result. If path name represents a busy window,
- *	the status is returned via interp->result and TCL_OK is
- *	returned. Otherwise, TCL_ERROR is returned and an error message is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StatusOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report error to */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    BusyInterpData *dataPtr = clientData;
-    Busy *busyPtr;
-
-    if (GetBusy(dataPtr, interp, objv[2], &busyPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), busyPtr->isBusy);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ForgetOp --
- *
- *	Destroys the busy window associated with the reference window and
- *	arranges for internal resources to the released when they're not being
- *	used anymore.
- *
- * Results:
- *	Returns a standard TCL result. If path name represents a busy window,
- *	it is destroyed and TCL_OK is returned. Otherwise, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side effects:
- *	The busy window is removed.  Other related memory and resources are
- *	eventually released by the Tk dispatcher.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ForgetOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    BusyInterpData *dataPtr = clientData;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Busy *busyPtr;
-
-	if (GetBusy(dataPtr, (Tcl_Interp *)NULL, objv[i], &busyPtr) == TCL_OK) {
-	    /* Unmap the window even though it will be soon destroyed */
-	    HideBusyWindow(busyPtr);
-	    Tcl_EventuallyFree(busyPtr, DestroyBusy);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReleaseOp --
- *
- *	Unmaps the busy window, thereby permitting device events to be
- *	received by the parent window and its children.
- *
- * Results:
- *	Returns a standard TCL result. If path name represents a busy window,
- *	it is unmapped and TCL_OK is returned. Otherwise, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side effects:
- *	The busy window is hidden, allowing the parent window and its children
- *	to receive events again.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ReleaseOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    BusyInterpData *dataPtr = clientData;
-    Busy *busyPtr;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	if (GetBusy(dataPtr, (Tcl_Interp *)NULL, objv[i], &busyPtr) == TCL_OK) {
-	    HideBusyWindow(busyPtr);
-	    busyPtr->isBusy = FALSE;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Reports the names of all widgets with busy windows attached to them,
- *	matching a given pattern.  If no pattern is given, all busy widgets
- *	are listed.
- *
- * Results:
- *	Returns a TCL list of the names of the widget with busy windows
- *	attached to them, regardless if the widget is currently busy or not.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    BusyInterpData *dataPtr = clientData;
-    Tcl_Obj *listObjPtr;
-    const char *pattern;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    pattern = (objc > 2) ? Tcl_GetString(objv[2]) : NULL;
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->busyTable, &iter);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Busy *busyPtr;
-
-	busyPtr = Blt_GetHashValue(hPtr);
-	if ((pattern == NULL) ||
-	    (Tcl_StringMatch(Tk_PathName(busyPtr->tkRef), pattern))) {
-	    Tcl_Obj *objPtr;
-	    objPtr = Tcl_NewStringObj(Tk_PathName(busyPtr->tkRef), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyOp --
- *
- *	Reports the names of all widgets with busy windows attached to them,
- *	matching a given pattern.  If no pattern is given, all busy widgets
- *	are listed.
- *
- * Results:
- *	Returns a TCL list of the names of the widget with busy windows
- *	attached to them, regardless if the widget is currently busy or not.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BusyOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    BusyInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-    const char *pattern;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    pattern = (objc > 2) ? Tcl_GetString(objv[2]) : NULL;
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->busyTable, &iter);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Busy *busyPtr;
-
-	busyPtr = Blt_GetHashValue(hPtr);
-	if (!busyPtr->isBusy) {
-	    continue;
-	}
-	if ((pattern == NULL) || 
-	    (Tcl_StringMatch(Tk_PathName(busyPtr->tkRef), pattern))) {
-	    Tcl_Obj *objPtr;
-	    objPtr = Tcl_NewStringObj(Tk_PathName(busyPtr->tkRef), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CheckOp --
- *
- *	Checks if the named window is currently busy.  This also includes
- *	windows whose ancestors are currently busy.
- *
- * Results:
- *	Returns 1 a TCL list of the names of the widget with busy windows
- *	attached to them, regardless if the widget is currently busy or not.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CheckOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    BusyInterpData *dataPtr = clientData;
-    Tk_Window tkwin;
-    const char *pathName;
-
-    pathName = Tcl_GetString(objv[2]);
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    do {
-	hPtr = Blt_FindHashEntry(&dataPtr->busyTable, (char *)tkwin);
-	if (hPtr != NULL) {
-	    Busy *busyPtr;
-
-	    /* Found a busy window, is it on? */
-	    busyPtr = Blt_GetHashValue(hPtr);
-	    if (busyPtr->isBusy) {
-		Tcl_SetBooleanObj(Tcl_GetObjResult(interp), 1);
-		return TCL_OK;
-	    }
-	}
-	tkwin = Tk_Parent(tkwin);
-    } while(tkwin != NULL);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HoldOp --
- *
- *	Creates (if necessary) and maps a busy window, thereby preventing
- *	device events from being be received by the parent window and its
- *	children. The argument vector may contain option-value pairs of
- *	configuration options to be set.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- * Side effects:
- *	The busy window is created and displayed, blocking events from the
- *	parent window and its children.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HoldOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)		/* Window name and option pairs */
-{
-    BusyInterpData *dataPtr = clientData;
-    int i;
-    const char *string;
-
-    string = Tcl_GetString(objv[1]);
-    if ((string[0] == 'h') && (strcmp(string, "hold") == 0)) {
-	objc--, objv++;			/* Command used "hold" keyword */
-    }
-    for (i = 1; i < objc; i++) {
-	int count;
-	/*
-	 * Find the end of the option-value pairs for this window.
-	 */
-	for (count = i + 1; count < objc; count += 2) {
-	    string = Tcl_GetString(objv[count]);
-	    if (string[0] != '-') {
-		break;
-	    }
-	}
-	if (count > objc) {
-	    count = objc;
-	}
-	if (HoldBusy(dataPtr, interp, count - i, objv + i) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	i = count;
-    }
-    return TCL_OK;
-}
-
-/* ARGSUSED*/
-static int
-CgetOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)		/* Widget pathname and option switch */
-{
-    BusyInterpData *dataPtr = clientData;
-    Busy *busyPtr;
-    int result;
-
-    if (GetBusy(dataPtr, interp, objv[2], &busyPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(busyPtr);
-    result = Blt_ConfigureValueFromObj(interp, busyPtr->tkRef, configSpecs,
-	(char *)busyPtr, objv[3], 0);
-    Tcl_Release(busyPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	This procedure is called to process an objv/objc list in order to
- *	configure (or reconfigure) a busy window.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information get set for busyPtr; old resources get
- *	freed, if there were any.  The busy window destroyed and recreated in
- *	a new parent window.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)		/* Reference window path name and
-					 * options */
-{
-    BusyInterpData *dataPtr = clientData;
-    Busy *busyPtr;
-    int result;
-
-    if (GetBusy(dataPtr, interp, objv[2], &busyPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	result = Blt_ConfigureInfoFromObj(interp, busyPtr->tkRef, configSpecs,
-	    (char *)busyPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	result = Blt_ConfigureInfoFromObj(interp, busyPtr->tkRef, configSpecs,
-	    (char *)busyPtr, objv[3], 0);
-    } else {
-	Tcl_Preserve(busyPtr);
-	result = ConfigureBusy(interp, busyPtr, objc - 3, objv + 3);
-	Tcl_Release(busyPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "busy" command is
- *	destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys all the hash table managing the busy windows.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-BusyInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    BusyInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->busyTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Busy *busyPtr;
-
-	busyPtr = Blt_GetHashValue(hPtr);
-	busyPtr->hashPtr = NULL;
-	DestroyBusy((DestroyData)busyPtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->busyTable);
-    Tcl_DeleteAssocData(interp, BUSY_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Busy Sub-command specification:
- *
- *	- Name of the sub-command.
- *	- Minimum number of characters needed to unambiguously
- *        recognize the sub-command.
- *	- Pointer to the function to be called for the sub-command.
- *	- Minimum number of arguments accepted.
- *	- Maximum number of arguments accepted.
- *	- String to be displayed for usage (arguments only).
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec busyOps[] =
-{
-    {"cget", 2, CgetOp, 4, 4, "window option",},
-    {"check", 1, CheckOp, 3, 3, "window",},
-    {"configure", 2, ConfigureOp, 3, 0, "window ?options?...",},
-    {"forget", 1, ForgetOp, 2, 0, "?window?...",},
-    {"hold", 3, HoldOp, 3, 0, 
-	"window ?options?... ?window options?...",},
-    {"isbusy", 1, BusyOp, 2, 3, "?pattern?",},
-    {"names", 1, NamesOp, 2, 3, "?pattern?",},
-    {"release", 1, ReleaseOp, 2, 0, "?window?...",},
-    {"status", 1, StatusOp, 3, 3, "window",},
-    {"windows", 1, NamesOp, 2, 3, "?pattern?",},
-};
-static int nBusyOps = sizeof(busyOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * BusyCmd --
- *
- *	This procedure is invoked to process the "busy" TCL command.  See the
- *	user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BusyCmd(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,			/* Interpreter associated with
-					 * command */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-    
-    if (objc > 1) {
-	const char *string;
-
-	string = Tcl_GetString(objv[1]);
-	if (string[0] == '.') {
-	    return HoldOp(clientData, interp, objc, objv);
-	}
-    }
-    proc = Blt_GetOpFromObj(interp, nBusyOps, busyOps, BLT_OP_ARG1, objc, objv,
-	    0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-static BusyInterpData *
-GetBusyInterpData(Tcl_Interp *interp)
-{
-    BusyInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (BusyInterpData *)
-	Tcl_GetAssocData(interp, BUSY_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(BusyInterpData));
-	Tcl_SetAssocData(interp, BUSY_THREAD_KEY, BusyInterpDeleteProc, 
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->busyTable, BLT_ONE_WORD_KEYS);
-	dataPtr->interp = interp;
-	dataPtr->tkMain = Tk_MainWindow(interp);
-    }
-    return dataPtr;
-}
-
-int
-Blt_BusyCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"busy", BusyCmd, };
-
-    cmdSpec.clientData = GetBusyInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-#endif /* NO_BUSY */
-
diff --git a/blt3.0/src/bltCanvEps.c b/blt3.0/src/bltCanvEps.c
deleted file mode 100644
index f941e4b..0000000
--- a/blt3.0/src/bltCanvEps.c
+++ /dev/null
@@ -1,1835 +0,0 @@
-
-/*
- * bltCanvEps.c --
- *
- * This file implements an Encapsulated PostScript item for canvas
- * widgets.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * To do:
- *
- *	1. Add -rotate option.  Allow arbitrary rotation of image and EPS.
- *	2. Draw pictures instead of photos. This will eliminate the need
- *	   to create hidden photo images.
- *	3. Create a spiffy demo that lets you edit your page description.
- */
-#define USE_OLD_CANVAS	1
-
-#include "bltInt.h"
-#include "bltPs.h"
-#include "bltImage.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-
-#ifdef HAVE_TIFF_H
-#include "tiff.h"
-#endif
-#include <fcntl.h>
-
-#if defined(_MSC_VER) || defined(__BORLANDC__) 
-#include <io.h>
-#define open _open
-#define close _close
-#define write _write
-#define unlink _unlink
-#define lseek _lseek
-#define fdopen _fdopen
-#define fcntl _fcntl
-#ifdef _MSC_VER
-#define O_RDWR	_O_RDWR 
-#define O_CREAT	_O_CREAT
-#define O_TRUNC	_O_TRUNC
-#define O_EXCL	_O_EXCL
-#endif /* _MSC_VER */
-#endif /* _MSC_VER || __BORLANDC__ */
-
-#define DEBUG_READER 0
-#ifndef WIN32
-#define PurifyPrintf printf
-#endif
-#define PS_PREVIEW_EPSI	0
-#define PS_PREVIEW_WMF	1
-#define PS_PREVIEW_TIFF	2
-
-#define MAX_EPS_LINE_LENGTH 255	/* Maximum line length for a EPS file */
-
-/*
- * ParseInfo --
- *
- *	This structure is used to pass PostScript file information around to
- *	various routines while parsing the EPS file.
- */
-typedef struct {
-    int maxBytes;		/* Maximum length of PostScript code.  */
-    int lineNumber;		/* Current line number of EPS file */
-    char line[MAX_EPS_LINE_LENGTH + 1];
-				/* Buffer to contain a single line from
-				 * the PostScript file. */
-    unsigned char hexTable[256]; /* Table for converting ASCII hex digits to
-				 * values */
-
-    char *nextPtr;		/* Pointer to the next character to process on
-				 * the current line.  If NULL (or if nextPtr
-				 * points a NULL byte), this indicates the
-				 * the next line needs to be read. */
-    FILE *f;			/*  */
-} ParseInfo;
-
-#define DEF_EPS_ANCHOR		"nw"
-#define DEF_EPS_OUTLINE_COLOR	RGB_BLACK
-#define DEF_EPS_BORDERWIDTH	STD_BORDERWIDTH
-#define DEF_EPS_FILE_NAME	(char *)NULL
-#define DEF_EPS_FONT		STD_FONT
-#define DEF_EPS_FILL_COLOR     	STD_NORMAL_FOREGROUND
-#define DEF_EPS_HEIGHT		"0"
-#define DEF_EPS_IMAGE_NAME	(char *)NULL
-#define DEF_EPS_JUSTIFY		"center"
-#define DEF_EPS_QUICK_RESIZE	"no"
-#define DEF_EPS_RELIEF		"sunken"
-#define DEF_EPS_SHOW_IMAGE	"yes"
-#define DEF_EPS_STIPPLE		(char *)NULL
-#define DEF_EPS_TAGS		(char *)NULL
-#define DEF_EPS_TITLE		(char *)NULL
-#define DEF_EPS_TITLE_ANCHOR	"center"
-#define DEF_EPS_TITLE_COLOR	RGB_BLACK
-#define DEF_EPS_WIDTH		"0"
-
-/*
- * Information used for parsing configuration specs:
- */
-
-static Tk_CustomOption tagsOption;
-
-BLT_EXTERN Tk_CustomOption bltDistanceOption;
-
-/*
- * The structure below defines the record for each EPS item.
- */
-typedef struct {
-    Tk_Item item;		/* Generic stuff that's the same for all
-				 * types.  MUST BE FIRST IN STRUCTURE. */
-    Tk_Canvas canvas;		/* Canvas containing the EPS item. */
-
-    int lastWidth, lastHeight;	/* Last known dimensions of the EPS item.
-				 * This is used to know if the picture preview
-				 * needs to be resized. */
-
-    Tcl_Interp *interp;
-
-    FILE *psFile;		/* File pointer to Encapsulated PostScript
-				 * file. We'll hold this as long as the EPS
-				 * item is using this file. */
-    unsigned int psStart;	/* File offset of PostScript code. */
-    unsigned int psLength;	/* Length of PostScript code. If zero,
-				 * indicates to read to EOF. */
-    unsigned int wmfStart;	/* File offset of Windows Metafile
-				 * preview.  */
-    unsigned int wmfLength;     /* Length of WMF portion in bytes. If zero,
-				 * indicates there is no WMF preview. */
-    unsigned int tiffStart;	/* File offset of TIFF preview. */
-    unsigned int tiffLength;    /* Length of TIFF portion in bytes. If zero,
-				 * indicates there is no TIFF preview. */
-    const char *previewImageName;
-    int previewFormat;
-
-    Tk_Image preview;		/* A Tk photo image provided as a preview of
-				 * the EPS contents. This image supersedes any
-				 * EPS preview embedded PostScript preview
-				 * (EPSI). */
-
-    Blt_Painter painter;
-    Blt_Picture original;	/* The original photo or PostScript preview
-				 * image converted to a picture. */
-    int origFromPicture;
-
-    Blt_Picture picture;	/* Holds resized preview image.  Created and
-				 * deleted internally. */
-
-    int firstLine, lastLine; 
-				/* First and last line numbers of the
-				 * PostScript preview.  They are used to skip
-				 * over the preview when encapsulating
-				 * PostScript for the canvas item. */
-
-    GC fillGC;			/* Graphics context to fill background of
-				 * image outline if no preview image was
-				 * present. */
-
-    int llx, lly, urx, ury;	/* Lower left and upper right coordinates of
-				 * PostScript bounding box, retrieved from
-				 * file's "BoundingBox:" field. */
-
-    char *title;		/* Title, retrieved from the file's "Title:"
-				 * field, to be displayed over the top of the
-				 * EPS preview (malloc-ed).  */
-
-    Tcl_DString dString;	/* Contains the encapsulated PostScript. */
-
-    /* User configurable fields */
-
-    double x, y;		/* Requested anchor in canvas coordinates of
-				 * the item */
-    Tk_Anchor anchor;
-
-    Region2d bb;
-
-    char *fileName;		/* Name of the encapsulated PostScript file.
-				 * If NULL, indicates that no EPS file has be
-				 * successfully loaded yet. */
-
-    char *reqTitle;		/* Title to be displayed in the EPS item.
-				 * Supersedes the title found in the EPS
-				 * file. If NULL, indicates that the title
-				 * found in the EPS file should be used. */
-
-    int width, height;		/* Requested dimension of EPS item in canvas
-				 * coordinates.  If non-zero, this overrides
-				 * the dimension computed from the
-				 * "%%BoundingBox:" specification in the EPS
-				 * file used. */
-
-    int showImage;		/* Indicates if the image or the outline
-				 * rectangle should be displayed */
-
-    int quick;
-    unsigned int flags;
-
-    XColor *fillColor;		/* Fill color of the image outline. */
-
-    Tk_3DBorder border;		/* Outline color */
-
-    int borderWidth;
-    int relief;
-
-    TextStyle titleStyle;	/* Font, color, etc. for title */
-    Blt_Font font;		
-    Pixmap stipple;		/* Stipple for image fill */
-
-    ClientData tiffPtr;
-#ifdef WIN32
-    HENHMETAFILE *hMetaFile;	/* Windows metafile. */
-#endif
-} Eps;
-
-static int StringToFont(ClientData clientData, Tcl_Interp *interp,
-	Tk_Window tkwin, const char *string, char *widgRec, int offset);
-static char *FontToString (ClientData clientData, Tk_Window tkwin, 
-	char *widgRec, int offset, Tcl_FreeProc **proc);
-
-static Tk_CustomOption bltFontOption =
-{
-    StringToFont, FontToString, (ClientData)0
-};
-
-
-static Tk_ConfigSpec configSpecs[] =
-{
-    {TK_CONFIG_ANCHOR, (char *)"-anchor", (char *)NULL, (char *)NULL,
-	DEF_EPS_ANCHOR, Blt_Offset(Eps, anchor),
-	TK_CONFIG_DONT_SET_DEFAULT},
-    {TK_CONFIG_SYNONYM, (char *)"-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 0},
-    {TK_CONFIG_CUSTOM, (char *)"-borderwidth", "borderWidth", (char *)NULL,
-	DEF_EPS_BORDERWIDTH, Blt_Offset(Eps, borderWidth),
-	TK_CONFIG_DONT_SET_DEFAULT, &bltDistanceOption},
-    {TK_CONFIG_STRING, (char *)"-file", (char *)NULL, (char *)NULL,
-	DEF_EPS_FILE_NAME, Blt_Offset(Eps, fileName), TK_CONFIG_NULL_OK},
-    {TK_CONFIG_CUSTOM, (char *)"-font", "font", "Font",
-        DEF_EPS_FONT, Blt_Offset(Eps, font), 0, &bltFontOption},
-    {TK_CONFIG_COLOR, (char *)"-fill", "fill", (char *)NULL,
-	DEF_EPS_FILL_COLOR, Blt_Offset(Eps, fillColor), 0},
-    {TK_CONFIG_CUSTOM, (char *)"-height", (char *)NULL, (char *)NULL,
-	DEF_EPS_HEIGHT, Blt_Offset(Eps, height),
-	TK_CONFIG_DONT_SET_DEFAULT, &bltDistanceOption},
-    {TK_CONFIG_STRING, (char *)"-image", (char *)NULL, (char *)NULL,
-	DEF_EPS_IMAGE_NAME, Blt_Offset(Eps, previewImageName),
-	TK_CONFIG_NULL_OK},
-    {TK_CONFIG_JUSTIFY, (char *)"-justify", "justify", "Justify",
-	DEF_EPS_JUSTIFY, Blt_Offset(Eps, titleStyle.justify),
-	TK_CONFIG_DONT_SET_DEFAULT},
-    {TK_CONFIG_BORDER, (char *)"-outline", "outline", (char *)NULL,
-	DEF_EPS_OUTLINE_COLOR, Blt_Offset(Eps, border),
-	TK_CONFIG_NULL_OK},
-    {TK_CONFIG_BOOLEAN, (char *)"-quick", "quick", "Quick",
-	DEF_EPS_QUICK_RESIZE, Blt_Offset(Eps, quick),
-	TK_CONFIG_DONT_SET_DEFAULT},
-    {TK_CONFIG_RELIEF, (char *)"-relief", (char *)NULL, (char *)NULL,
-	DEF_EPS_RELIEF, Blt_Offset(Eps, relief),
-	TK_CONFIG_DONT_SET_DEFAULT},
-    {TK_CONFIG_BOOLEAN, (char *)"-showimage", "showImage", "ShowImage",
-	DEF_EPS_SHOW_IMAGE, Blt_Offset(Eps, showImage),
-	TK_CONFIG_DONT_SET_DEFAULT},
-    {TK_CONFIG_BITMAP, (char *)"-stipple", (char *)NULL, (char *)NULL,
-	DEF_EPS_STIPPLE, Blt_Offset(Eps, stipple), TK_CONFIG_NULL_OK},
-    {TK_CONFIG_CUSTOM, (char *)"-tags", (char *)NULL, (char *)NULL,
-	DEF_EPS_TAGS, 0, TK_CONFIG_NULL_OK, &tagsOption},
-    {TK_CONFIG_STRING, (char *)"-title", (char *)NULL, (char *)NULL,
-	DEF_EPS_TITLE, Blt_Offset(Eps, reqTitle), TK_CONFIG_NULL_OK},
-    {TK_CONFIG_ANCHOR, (char *)"-titleanchor", (char *)NULL, (char *)NULL,
-	DEF_EPS_TITLE_ANCHOR, Blt_Offset(Eps, titleStyle.anchor), 0},
-    {TK_CONFIG_COLOR, (char *)"-titlecolor", (char *)NULL, (char *)NULL,
-	DEF_EPS_TITLE_COLOR, Blt_Offset(Eps, titleStyle.color), 0},
-    {TK_CONFIG_CUSTOM, (char *)"-width", (char *)NULL, (char *)NULL,
-	DEF_EPS_WIDTH, Blt_Offset(Eps, width),
-	TK_CONFIG_DONT_SET_DEFAULT, &bltDistanceOption},
-    {TK_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/* Prototypes for procedures defined in this file: */
-static Tk_ImageChangedProc ImageChangedProc;
-static Tk_ItemCoordProc EpsCoords;
-static Tk_ItemAreaProc EpsToArea;
-static Tk_ItemPointProc EpsToPoint;
-static Tk_ItemConfigureProc ConfigureEps;
-static Tk_ItemCreateProc CreateEps;
-static Tk_ItemDeleteProc DeleteEps;
-static Tk_ItemDisplayProc DisplayEps;
-static Tk_ItemScaleProc ScaleEps;
-static Tk_ItemTranslateProc TranslateEps;
-static Tk_ItemPostscriptProc EpsToPostScript;
-
-static void ComputeEpsBbox(Tk_Canvas canvas, Eps *imgPtr);
-static int ReadPostScript(Tcl_Interp *interp, Eps *epsPtr);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToFont --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StringToFont(
-    ClientData clientData,	/* Indicated how to check distance */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    const char *string,		/* Pixel value string */
-    char *widgRec,		/* Widget record */
-    int offset)			/* Offset of pixel size in record */
-{
-    Blt_Font *fontPtr = (Blt_Font *)(widgRec + offset);
-    Blt_Font font;
-
-    font = Blt_GetFont(interp, tkwin, string);
-    if (font == NULL) {
-	return TCL_ERROR;
-    }
-    *fontPtr = font;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FontToString --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static char *
-FontToString(
-    ClientData clientData,	/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget structure record */
-    int offset,			/* Offset in widget record */
-    Tcl_FreeProc **freeProcPtr)	/* Not used. */
-{
-    Blt_Font font = *(Blt_Font *)(widgRec + offset);
-    const char *string;
-
-    string = Blt_NameOfFont(font);
-    *freeProcPtr = (Tcl_FreeProc *)TCL_STATIC;
-    return (char *)string;
-}
-
-static char *
-SkipBlanks(ParseInfo *piPtr)
-{
-    char *s;
-
-    for (s = piPtr->line; isspace(UCHAR(*s)); s++) {
-	/*empty*/
-    }
-    return s;
-}
-
-static int
-ReadPsLine(ParseInfo *piPtr)
-{
-    int nBytes;
-
-    nBytes = 0;
-    if (ftell(piPtr->f) < piPtr->maxBytes) {
-	char *cp;
-
-	cp = piPtr->line;
-	while ((*cp = fgetc(piPtr->f)) != EOF) {
-	    if (*cp == '\r') {
-		continue;
-	    }
-	    nBytes++;
-	    if ((*cp == '\n') || (nBytes >= MAX_EPS_LINE_LENGTH)) {
-		break;
-	    }
-	    cp++;
-	}
-	if (*cp == '\n') {
-	    piPtr->lineNumber++;
-	}
-	*cp = '\0';
-    }
-    return nBytes;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReverseBits --
- *
- *	Convert a byte from a X image into PostScript image order.  This
- *	requires not only the nybbles to be reversed but also their bit
- *	values.
- *
- * Results:
- *	The converted byte is returned.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static unsigned char
-ReverseBits(unsigned char byte)
-{
-    byte = ((byte >> 1) & 0x55) | ((byte << 1) & 0xaa);
-    byte = ((byte >> 2) & 0x33) | ((byte << 2) & 0xcc);
-    byte = ((byte >> 4) & 0x0f) | ((byte << 4) & 0xf0);
-    return byte;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetHexValue --
- *
- *	Reads the next ASCII hex value from EPS preview image and converts it.
- *
- * Results:
- *	One of three TCL return values is possible.
- *
- *	TCL_OK		the next byte was successfully parsed.
- *	TCL_ERROR	an error occurred processing the next hex value.
- *	TCL_RETURN	"%%EndPreview" line was detected.
- *
- *	The converted hex value is returned via "bytePtr".
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetHexValue(ParseInfo *piPtr, unsigned char *bytePtr)
-{
-    char *p;
-    unsigned int byte;
-    unsigned char a, b;
-
-    p = piPtr->nextPtr;
-    if (p == NULL) {
-
-      nextLine:
-	if (!ReadPsLine(piPtr)) {
-#if DEBUG_READER
-	    PurifyPrintf("short file\n");
-#endif
-	    return TCL_ERROR;	/* Short file */
-	}
-	if (piPtr->line[0] != '%') {
-#if DEBUG_READER
-	    PurifyPrintf("line doesn't start with %% (%s)\n", piPtr->line);
-#endif
-	    return TCL_ERROR;
-	}
-	if ((piPtr->line[1] == '%') &&
-	    (strncmp(piPtr->line + 2, "EndPreview", 10) == 0)) {
-#if DEBUG_READER
-	    PurifyPrintf("end of preview (%s)\n", piPtr->line);
-#endif
-	    return TCL_RETURN;
-	}
-	p = piPtr->line + 1;
-    }
-    while (isspace((int)*p)) {
-	p++;			/* Skip spaces */
-    }
-    if (*p == '\0') {
-	goto nextLine;
-    }
-
-    a = piPtr->hexTable[(int)p[0]];
-    b = piPtr->hexTable[(int)p[1]];
-
-    if ((a == 0xFF) || (b == 0xFF)) {
-#if DEBUG_READER
-	PurifyPrintf("not a hex digit (%s)\n", piPtr->line);
-#endif
-	return TCL_ERROR;
-    }
-    byte = (a << 4) | b;
-    p += 2;
-    piPtr->nextPtr = p;
-    *bytePtr = byte;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadEPSI --
- *
- *	Reads the EPS preview image from the PostScript file, converting it
- *	into a picture.  If an error occurs when parsing the preview, the
- *	preview is silently ignored.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReadEPSI(Eps *epsPtr, ParseInfo *piPtr)
-{
-    Blt_Picture picture;
-    int width, height, bitsPerPixel, nLines;
-    char *dscBeginPreview;
-
-    dscBeginPreview = piPtr->line + 16;
-    if (sscanf(dscBeginPreview, "%d %d %d %d", &width, &height, &bitsPerPixel, 
-	&nLines) != 4) {
-#if DEBUG_READER
-	PurifyPrintf("bad %%BeginPreview (%s) format\n", dscBeginPreview);
-#endif
-	return;
-    }
-    if (((bitsPerPixel != 1) && (bitsPerPixel != 8)) || (width < 1) ||
-	(width > SHRT_MAX) || (height < 1) || (height > SHRT_MAX)) {
-#if DEBUG_READER
-	PurifyPrintf("Bad %%BeginPreview (%s) values\n", dscBeginPreview);
-#endif
-	return;			/* Bad "%%BeginPreview:" information */
-    }
-    epsPtr->firstLine = piPtr->lineNumber;
-    Blt_InitHexTable(piPtr->hexTable);
-    piPtr->nextPtr = NULL;
-    picture = Blt_CreatePicture(width, height);
-
-    if (bitsPerPixel == 8) {
-	Blt_Pixel *destRowPtr;
-	int y;
-
-	destRowPtr = Blt_PictureBits(picture) + 
-	    (height - 1) * Blt_PictureStride(picture);
-	for (y = height - 1; y >= 0; y--) {
-	    Blt_Pixel *dp;
-	    int x;
-
-	    dp = destRowPtr;
-	    for (x = 0; x < width; x++, dp++) {
-		int result;
-		unsigned char byte;
-
-		result = GetHexValue(piPtr, &byte);
-		if (result == TCL_ERROR) {
-		    goto error;
-		}
-		if (result == TCL_RETURN) {
-		    goto done;
-		}
-		dp->Red = dp->Green = dp->Blue = ~byte;
-		dp->Alpha = ALPHA_OPAQUE;
-	    }
-	    destRowPtr -= Blt_PictureStride(picture);
-	}
-    } else if (bitsPerPixel == 1) {
-	Blt_Pixel *destRowPtr;
-	int y;
-
-	destRowPtr = Blt_PictureBits(picture);
-	for (y = 0; y < height; y++) {
-	    Blt_Pixel *dp, *dend;
-	    int bit;
-	    unsigned char byte;
-
-	    bit = 8;
-	    byte = 0; 		/* Suppress compiler warning. */
-	    for (dp = destRowPtr, dend = dp + width; dp < dend; dp++) {
-		if (bit == 8) {
-		    int result;
-
-		    result = GetHexValue(piPtr, &byte);
-		    if (result == TCL_ERROR) {
-			goto error;
-		    }
-		    if (result == TCL_RETURN) {
-			goto done;
-		    }
-		    byte = ReverseBits(byte);
-		    bit = 0;
-		}
-		if (((byte >> bit) & 0x01) == 0) {
-		    dp->u32 = 0xFFFFFFFF;
-		}
-		bit++;
-	    }
-	    destRowPtr += Blt_PictureStride(picture);
-	}
-    } else {
-	fprintf(stderr, "unknown EPSI bitsPerPixel (%d)\n", bitsPerPixel);
-    }
-  done:
-    epsPtr->original = picture;
-    epsPtr->origFromPicture = FALSE;
-    epsPtr->lastWidth = Blt_PictureWidth(picture);
-    epsPtr->lastHeight = Blt_PictureHeight(picture);
-    epsPtr->lastLine = piPtr->lineNumber + 1;
-    return;
-
-  error:
-    epsPtr->firstLine = epsPtr->lastLine = -1;
-    if (picture != NULL) {
-	Blt_FreePicture(picture);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadPostScript --
- *
- *	This routine reads and parses the few fields we need out of an EPS
- *	file.
- *
- *	The EPS standards are outlined from Appendix H of the "PostScript
- *	Language Reference Manual" pp. 709-736.
- *
- *	Mandatory fields:
- *
- *	- Starts with "%!PS*"
- *	- Contains "%%BoundingBox: llx lly urx ury"
- *
- *	Optional fields for EPS item:
- *	- "%%BeginPreview: w h bpp #lines"
- *		Preview is in hexadecimal. Each line must start with "%"
- *      - "%%EndPreview"
- *	- "%%Title: (string)"
- *
- *---------------------------------------------------------------------------
- */
-static int
-ReadPostScript(Tcl_Interp *interp, Eps *epsPtr)
-{
-    char *field;
-    char *dscTitle, *dscBoundingBox;
-    char *dscEndComments;
-    ParseInfo pi;
-
-    pi.line[0] = '\0';
-    pi.maxBytes = epsPtr->psLength;
-    pi.lineNumber = 0;
-    pi.f = epsPtr->psFile;
-
-    Tcl_DStringInit(&epsPtr->dString);
-    if (pi.maxBytes == 0) {
-	pi.maxBytes = INT_MAX;
-    }
-    if (epsPtr->psStart > 0) {
-	if (fseek(epsPtr->psFile, epsPtr->psStart, 0) != 0) {
-	    Tcl_AppendResult(interp, 
-			     "can't seek to start of PostScript code in \"", 
-			     epsPtr->fileName, "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (!ReadPsLine(&pi)) {
-	Tcl_AppendResult(interp, "file \"", epsPtr->fileName, "\" is empty?",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (strncmp(pi.line, "%!PS", 4) != 0) {
-	Tcl_AppendResult(interp, "file \"", epsPtr->fileName,
-	    "\" doesn't start with \"%!PS\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /*
-     * Initialize field flags to NULL. We want to look only at the first
-     * appearance of these comment fields.  The file itself may have another
-     * EPS file embedded into it.
-     */
-    dscBoundingBox = dscTitle = dscEndComments = NULL;
-    pi.lineNumber = 1;
-    while (ReadPsLine(&pi)) {
-	pi.lineNumber++;
-	if ((pi.line[0] == '%') && (pi.line[1] == '%')) { /* Header comment */
-	    field = pi.line + 2;
-	    if (field[0] == 'B') {
-		if (strncmp(field, "BeginSetup", 8) == 0) {
-		    break;	/* Done */
-		}
-		if (strncmp(field, "BeginProlog", 8) == 0) {
-		    break;	/* Done */
-		}
-		if ((strncmp(field, "BoundingBox:", 12) == 0) &&
-		    (dscBoundingBox == NULL)) {
-		    int nFields;
-		    
-		    dscBoundingBox = field + 12;
-		    nFields = sscanf(dscBoundingBox, "%d %d %d %d",
-				     &epsPtr->llx, &epsPtr->lly,
-				     &epsPtr->urx, &epsPtr->ury);
-		    if (nFields != 4) {
-			Tcl_AppendResult(interp,
-					 "bad \"%%BoundingBox\" values: \"",
-					 dscBoundingBox, "\"", (char *)NULL);
-			goto error;
-		    }
-		}
-	    } else if ((field[0] == 'T') &&
-		(strncmp(field, "Title:", 6) == 0)) {
-		if (dscTitle == NULL) {
-		    char *lp, *rp;
-
-		    lp = strchr(field + 6, '(');
-		    if (lp != NULL) {
-			rp = strrchr(field + 6, ')');
-			if (rp != NULL) {
-			    *rp = '\0';
-			}
-			dscTitle = Blt_AssertStrdup(lp + 1);
-		    } else {
-			dscTitle = Blt_AssertStrdup(field + 6);
-		    }
-		}
-	    } else if (field[0] == 'E') {
-		if (strncmp(field, "EndComments", 11) == 0) {
-		    dscEndComments = field;
-		    break;	/* Done */
-		}
-	    }
-	}			/* %% */
-    }
-    if (dscBoundingBox == NULL) {
-	Tcl_AppendResult(interp, "no \"%%BoundingBox:\" found in \"",
-			 epsPtr->fileName, "\"", (char *)NULL);
-	goto error;
-    }
-    if (dscEndComments != NULL) {
-	/* Check if a "%%BeginPreview" immediately follows */
-	while (ReadPsLine(&pi)) {
-	    field = SkipBlanks(&pi);
-	    if (field[0] != '\0') {
-		break;
-	    }
-	}
-	if (strncmp(pi.line, "%%BeginPreview:", 15) == 0) {
-	    ReadEPSI(epsPtr, &pi);
-	}
-    }
-    if (dscTitle != NULL) {
-	epsPtr->title = dscTitle;
-    }
-    /* Finally save the PostScript into a dynamic string. */
-    while (ReadPsLine(&pi)) {
-	Tcl_DStringAppend(&epsPtr->dString, pi.line, -1);
-	Tcl_DStringAppend(&epsPtr->dString, "\n", 1);
-    }
-    return TCL_OK;
- error:
-    if (dscTitle != NULL) {
-	Blt_Free(dscTitle);
-    }
-    return TCL_ERROR;	/* BoundingBox: is required. */
-}
-
-static int
-OpenEpsFile(Tcl_Interp *interp, Eps *epsPtr)
-{
-    FILE *f;
-#ifdef WIN32
-    DOSEPSHEADER dosHeader;
-    int nBytes;
-#endif
-
-    f = Blt_OpenFile(interp, epsPtr->fileName, "rb");
-    if (f == NULL) {
-	Tcl_AppendResult(epsPtr->interp, "can't open \"", epsPtr->fileName,
-	    "\": ", Tcl_PosixError(epsPtr->interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    epsPtr->psFile = f;
-    epsPtr->psStart = epsPtr->psLength = 0L;
-    epsPtr->wmfStart = epsPtr->wmfLength = 0L;
-    epsPtr->tiffStart = epsPtr->tiffLength = 0L;
-    
-#ifdef WIN32
-    nBytes = fread(&dosHeader, sizeof(DOSEPSHEADER), 1, f);
-    if ((nBytes == sizeof(DOSEPSHEADER)) &&
-	(dosHeader.magic[0] == 0xC5) && (dosHeader.magic[1] == 0xD0) &&
-	(dosHeader.magic[2] == 0xD3) && (dosHeader.magic[3] == 0xC6)) {
-
-	/* DOS EPS file */
-	epsPtr->psStart = dosHeader.psStart;
-	epsPtr->wmfStart = dosHeader.wmfStart;
-	epsPtr->wmfLength = dosHeader.wmfLength;
-	epsPtr->tiffStart = dosHeader.tiffStart;
-	epsPtr->tiffLength = dosHeader.tiffLength;
-	epsPtr->previewFormat = PS_PREVIEW_EPSI;
-#ifdef HAVE_TIFF_H
-	if (epsPtr->tiffLength > 0) {
-	    epsPtr->previewFormat = PS_PREVIEW_TIFF;
-	}	    
-#endif /* HAVE_TIFF_H */
-	if (epsPtr->wmfLength > 0) {
-	    epsPtr->previewFormat = PS_PREVIEW_WMF;
-	}
-    }
-    fseek(f, 0, 0);
-#endif /* WIN32 */
-    return ReadPostScript(interp, epsPtr);
-}
-
-static void
-CloseEpsFile(Eps *epsPtr)
-{
-    if (epsPtr->psFile != NULL) {
-	fclose(epsPtr->psFile);
-	epsPtr->psFile = NULL;
-    }
-}
-
-#ifdef WIN32
-#ifdef HAVE_TIFF_H
-static void
-ReadTiffPreview(Eps *epsPtr)
-{
-    unsigned int width, height;
-    Blt_Picture picture;
-    Blt_Pixel *dataPtr;
-    FILE *f;
-    int n;
-
-    TIFFGetField(epsPtr->tiffPtr, TIFFTAG_IMAGEWIDTH, &width);
-    TIFFGetField(epsPtr->tiffPtr, TIFFTAG_IMAGELENGTH, &height);
-    picture = Blt_CreatePicture(width, height);
-    dataPtr = Blt_PictureBits(picture);
-    if (!TIFFReadRGBAImage(epsPtr->tiffPtr, width, height, dataPtr, 0)) {
-	Blt_FreePicture(picture);
-	return;
-    }
-    /* Reverse the order of the components for each pixel. */
-    /* ... */
-    epsPtr->origFromPicture = FALSE;
-    epsPtr->picture = picture;
-}
-#endif
-
-#ifdef notdef
-ReadWMF(f, epsPtr, headerPtr)
-    FILE *f;
-{
-    HANDLE hMem;
-    Tk_Window tkwin;
-
-    if (fseek(f, headerPtr->wmfStart, 0) != 0) {
-	Tcl_AppendResult(interp, "can't seek in \"", epsPtr->fileName, 
-			 "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    hMem = GlobalAlloc(GHND, size);
-    if (hMem == NULL) {
-	Tcl_AppendResult(graphPtr->interp, "can't allocate global memory:", 
-			 Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    buffer = (LPVOID)GlobalLock(hMem);
-    /* Read the header and see what kind of meta file it is. */
-    fread(buffer, sizeof(unsigned char), headerPtr->wmfLength, f);
-    mfp.mm = 0;
-    mfp.xExt = epsPtr->width;
-    mfp.yExt = epsPtr->height;
-    mfp.hMF = hMetaFile;
-    tkwin = Tk_CanvasTkwin(epsPtr->canvas);
-    hRefDC = TkWinGetDrawableDC(Tk_Display(tkwin), Tk_WindowId(tkwin), &state);
-    hDC = CreateEnhMetaFile(hRefDC, NULL, NULL, NULL);
-    mfp.hMF = CloseEnhMetaFile(hDC);
-    hMetaFile = SetWinMetaFileBits(size, buffer, MM_ANISOTROPIC, &picture);
-	Tcl_AppendResult(graphPtr->interp, "can't get metafile data:", 
-		Blt_LastError(), (char *)NULL);
-	goto error;
-}
-#endif
-#endif /* WIN32 */
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteEps --
- *
- *	This procedure is called to clean up the data structure associated
- *	with a EPS item.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Resources associated with itemPtr are released.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-DeleteEps( 
-    Tk_Canvas canvas,		/* Info about overall canvas widget. */
-    Tk_Item *itemPtr,		/* Item that is being deleted. */
-    Display *display)		/* Display containing window for canvas. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-
-    Tk_FreeOptions(configSpecs, (char *)epsPtr, display, 0);
-    CloseEpsFile(epsPtr);
-    if ((!epsPtr->origFromPicture) && (epsPtr->original != NULL)) {
-	Blt_FreePicture(epsPtr->original);
-    }
-    if (epsPtr->picture != NULL) {
-	Blt_FreePicture(epsPtr->picture);
-    }
-    if (epsPtr->painter != NULL) {
-	Blt_FreePainter(epsPtr->painter);
-    }
-    if (epsPtr->preview != NULL) {
-	Tk_FreeImage(epsPtr->preview);
-    }
-    if (epsPtr->previewImageName != NULL) {
-	Blt_Free(epsPtr->previewImageName);
-    }
-    if (epsPtr->stipple != None) {
-	Tk_FreePixmap(display, epsPtr->stipple);
-    }
-    if (epsPtr->fillGC != NULL) {
-	Tk_FreeGC(display, epsPtr->fillGC);
-    }
-    Blt_Ts_FreeStyle(display, &epsPtr->titleStyle);
-
-    if (epsPtr->title != NULL) {
-	Blt_Free(epsPtr->title);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEps --
- *
- *	This procedure is invoked to create a new EPS item in a canvas.
- *
- * Results:
- *	A standard TCL return value.  If an error occurred in creating the
- *	item, then an error message is left in interp->result; in this case
- *	itemPtr is left uninitialized, so it can be safely freed by the
- *	caller.
- *
- * Side effects:
- *	A new EPS item is created.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateEps(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Tk_Canvas canvas,		/* Canvas to hold new item. */
-    Tk_Item *itemPtr,		/* Record to hold new item; header has been
-				 * initialized by caller. */
-    int argc,			/* Number of arguments in argv. */
-    char **argv)		/* Arguments describing rectangle. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-    Tk_Window tkwin;
-    double x, y;
-
-    tkwin = Tk_CanvasTkwin(canvas);
-    if (argc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-	    Tk_PathName(tkwin), " create ", itemPtr->typePtr->name,
-	    " x1 y1 ?options?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Initialize the item's record by hand (bleah). */
-    epsPtr->anchor = TK_ANCHOR_NW;
-    epsPtr->border = NULL;
-    epsPtr->borderWidth = 0;
-    epsPtr->canvas = canvas;
-    epsPtr->fileName = NULL;
-    epsPtr->psFile = NULL;
-    epsPtr->fillGC = NULL;
-    epsPtr->fillColor = NULL;
-    epsPtr->painter = NULL;
-    epsPtr->original = NULL;
-    epsPtr->origFromPicture = FALSE;
-    epsPtr->previewImageName = NULL;
-    epsPtr->preview = NULL;
-    epsPtr->interp = interp;
-    epsPtr->picture = NULL;
-    epsPtr->firstLine = epsPtr->lastLine = -1;
-    epsPtr->relief = TK_RELIEF_SUNKEN;
-    epsPtr->reqTitle = NULL;
-    epsPtr->stipple = None;
-    epsPtr->showImage = TRUE;
-    epsPtr->quick = FALSE;
-    epsPtr->title = NULL;
-    epsPtr->lastWidth = epsPtr->lastHeight = 0;
-    epsPtr->width = epsPtr->height = 0;
-    epsPtr->x = epsPtr->y = 0.0; 
-    epsPtr->llx = epsPtr->lly = epsPtr->urx = epsPtr->ury = 0;
-    epsPtr->bb.left = epsPtr->bb.right = epsPtr->bb.top = epsPtr->bb.bottom = 0;
-    Tcl_DStringInit(&epsPtr->dString);
-    Blt_Ts_InitStyle(epsPtr->titleStyle);
-#define PAD	8
-    Blt_Ts_SetPadding(epsPtr->titleStyle, PAD, PAD, PAD, PAD);
-
-    /* Process the arguments to fill in the item record. */
-    if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &x) != TCL_OK) ||
-	(Tk_CanvasGetCoord(interp, canvas, argv[1], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    epsPtr->x = x;
-    epsPtr->y = y;
-    if (ConfigureEps(interp, canvas, itemPtr, argc - 2, argv + 2, 0) 
-	!= TCL_OK) {
-	DeleteEps(canvas, itemPtr, Tk_Display(tkwin));
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- *	The image is over-written each time the EPS item is resized.  So we
- *	only worry if the image is deleted.
- *
- *	We always resample from the picture we saved when the photo image was
- *	specified (-image option).
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y, int width, int height, /* Not used. */
-    int imageWidth, int imageHeight)	 /* Not used. */
-{
-    Eps *epsPtr = clientData;
-
-    if ((epsPtr->preview == NULL) || (Blt_Image_IsDeleted(epsPtr->preview))) {
-	epsPtr->preview = NULL;
-	if (epsPtr->previewImageName != NULL) {
-	    Blt_Free(epsPtr->previewImageName);
-	    epsPtr->previewImageName = NULL;
-	}
-	Tk_CanvasEventuallyRedraw(epsPtr->canvas, epsPtr->item.x1, 
-		epsPtr->item.y1, epsPtr->item.x2, epsPtr->item.y2);
-    }
-    if (epsPtr->preview != NULL) {
-	int result;
-
-	if ((!epsPtr->origFromPicture) && (epsPtr->original != NULL)) {
-	    Blt_FreePicture(epsPtr->original);
-	}
-	result = Blt_GetPicture(epsPtr->interp, epsPtr->previewImageName, 
-				&epsPtr->original);
-	if (result == TCL_OK) {
-	    epsPtr->origFromPicture = TRUE;
-	} else {
-	    Tk_PhotoHandle photo;	/* Photo handle to Tk image. */
-	    
-	    photo = Tk_FindPhoto(epsPtr->interp, epsPtr->previewImageName);
-	    if (photo == NULL) {
-		fprintf(stderr, "image \"%s\" isn't a picture or photo image\n",
-			epsPtr->previewImageName);
-		return;
-	    }
-	    epsPtr->original = Blt_PhotoToPicture(photo);
-	    epsPtr->origFromPicture = FALSE;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureEps --
- *
- *	This procedure is invoked to configure various aspects of an EPS item,
- *	such as its background color.
- *
- * Results:
- *	A standard TCL result code.  If an error occurs, then an error message
- *	is left in interp->result.
- *
- * Side effects:
- *	Configuration information may be set for itemPtr.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureEps(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Tk_Canvas canvas,		/* Canvas containing itemPtr. */
-    Tk_Item *itemPtr,		/* EPS item to reconfigure. */
-    int argc,			/* Number of elements in argv.  */
-    char **argv,		/* Arguments describing things to configure. */
-    int flags)			/* Flags to pass to Tk_ConfigureWidget. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-    Tk_Window tkwin;
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-    int width, height;
-    Blt_Painter painter;
-
-    tkwin = Tk_CanvasTkwin(canvas);
-    if (Tk_ConfigureWidget(interp, tkwin, configSpecs, argc, (const char**)argv,
-		(char *)epsPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    painter = Blt_GetPainter(tkwin, 1.0);
-    if (epsPtr->painter != NULL) {
-	Blt_FreePainter(epsPtr->painter);
-    }
-    epsPtr->painter = painter;
-    /* Determine the size of the EPS item */
-    /*
-     * Check for a "-image" option specifying an image to be displayed
-     * representing the EPS canvas item.
-     */
-    if (Blt_OldConfigModified(configSpecs, "-image", (char *)NULL)) {
-	if (epsPtr->preview != NULL) {
-	    Tk_FreeImage(epsPtr->preview);	/* Release old Tk image */
-	    if ((!epsPtr->origFromPicture) && (epsPtr->original != NULL)) {
-		Blt_FreePicture(epsPtr->original);
-	    }
-	    epsPtr->original = NULL;
-	    if (epsPtr->picture != NULL) {
-		Blt_FreePicture(epsPtr->picture);
-	    }
-	    epsPtr->picture = NULL;
-	    epsPtr->preview = NULL;
-	    epsPtr->origFromPicture = FALSE;
-	}
-	if (epsPtr->previewImageName != NULL) {
-	    int result;
-
-	    /* Allocate a new image, if one was named. */
-	    epsPtr->preview = Tk_GetImage(interp, tkwin, 
-			epsPtr->previewImageName, ImageChangedProc, epsPtr);
-	    if (epsPtr->preview == NULL) {
-		Tcl_AppendResult(interp, "can't find an image \"",
-		    epsPtr->previewImageName, "\"", (char *)NULL);
-		Blt_Free(epsPtr->previewImageName);
-		epsPtr->previewImageName = NULL;
-		return TCL_ERROR;
-	    }
-	    result = Blt_GetPicture(interp, epsPtr->previewImageName, 
-				    &epsPtr->original);
-	    if (result == TCL_OK) {
-		epsPtr->origFromPicture = TRUE;
-	    } else {
-		Tk_PhotoHandle photo;	/* Photo handle to Tk image. */
-
-		photo = Tk_FindPhoto(interp, epsPtr->previewImageName);
-		if (photo == NULL) {
-		    Tcl_AppendResult(interp, "image \"", 
-			epsPtr->previewImageName,
-			"\" is not a picture or photo image", (char *)NULL);
-		    return TCL_ERROR;
-		}
-		epsPtr->original = Blt_PhotoToPicture(photo);
-		epsPtr->origFromPicture = FALSE;
-	    }
-	}
-    }
-    if (Blt_OldConfigModified(configSpecs, "-file", (char *)NULL)) {
-	CloseEpsFile(epsPtr);
-	if ((!epsPtr->origFromPicture) && (epsPtr->original != NULL)) {
-	    Blt_FreePicture(epsPtr->original);
-	    epsPtr->original = NULL;
-	}
-	if (epsPtr->picture != NULL) {
-	    Blt_FreePicture(epsPtr->picture);
-	    epsPtr->picture = NULL;
-	}
-	epsPtr->firstLine = epsPtr->lastLine = -1;
-	if (epsPtr->fileName != NULL) {
-	    if (OpenEpsFile(interp, epsPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    /* Compute the normal width and height of the item, but let the
-     * user-requested dimensions override them. */
-    width = height = 0;
-    if (epsPtr->preview != NULL) {
-	/* Default dimension is the size of the image. */
-	Tk_SizeOfImage(epsPtr->preview, &width, &height);
-    }
-    if (epsPtr->fileName != NULL) {
-	/* Use dimensions provided by the BoundingBox. */
-	width = (epsPtr->urx - epsPtr->llx); 
-	height = (epsPtr->ury - epsPtr->lly); 
-    }
-    if (epsPtr->width == 0) {
-	epsPtr->width = width;
-    }
-    if (epsPtr->height == 0) {
-	epsPtr->height = height;
-    }
-
-    if (Blt_OldConfigModified(configSpecs, "-quick", (char *)NULL)) {
-	epsPtr->lastWidth = epsPtr->lastHeight = 0;
-    }
-    /* Fill color GC */
-
-    newGC = NULL;
-    if (epsPtr->fillColor != NULL) {
-	gcMask = GCForeground;
-	gcValues.foreground = epsPtr->fillColor->pixel;
-	if (epsPtr->stipple != None) {
-	    gcMask |= (GCStipple | GCFillStyle);
-	    gcValues.stipple = epsPtr->stipple;
-	    if (epsPtr->border != NULL) {
-		gcValues.foreground = Tk_3DBorderColor(epsPtr->border)->pixel;
-		gcValues.background = epsPtr->fillColor->pixel;
-		gcMask |= GCBackground;
-		gcValues.fill_style = FillOpaqueStippled;
-	    } else {
-		gcValues.fill_style = FillStippled;
-	    }
-	}
-	newGC = Tk_GetGC(tkwin, gcMask, &gcValues);
-    }
-    if (epsPtr->fillGC != NULL) {
-	Tk_FreeGC(Tk_Display(tkwin), epsPtr->fillGC);
-    }
-    epsPtr->fillGC = newGC;
-    CloseEpsFile(epsPtr);
-    ComputeEpsBbox(canvas, epsPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EpsCoords --
- *
- *	This procedure is invoked to process the "coords" widget command on
- *	EPS items.  See the user documentation for details on what it does.
- *
- * Results:
- *	Returns TCL_OK or TCL_ERROR, and sets interp->result.
- *
- * Side effects:
- *	The coordinates for the given item may be changed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EpsCoords(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Tk_Canvas canvas,		/* Canvas containing item. */
-    Tk_Item *itemPtr,		/* Item whose coordinates are to be read or
-				 * modified. */
-    int argc,			/* Number of coordinates supplied in argv. */
-    char **argv)		/* Array of coordinates: x1, y1, x2, y2,
-				 * ... */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-
-    if ((argc != 0) && (argc != 2)) {
-	Tcl_AppendResult(interp, "wrong # coordinates: expected 0 or 2, got ",
-	    Blt_Itoa(argc), (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (argc == 2) {
-	double x, y;		/* Don't overwrite old coordinates on errors */
-
-	if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &x) != TCL_OK) ||
-	    (Tk_CanvasGetCoord(interp, canvas, argv[1], &y) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	epsPtr->x = x;
-	epsPtr->y = y;
-	ComputeEpsBbox(canvas, epsPtr);
-	return TCL_OK;
-    }
-    Tcl_AppendElement(interp, Blt_Dtoa(interp, epsPtr->x));
-    Tcl_AppendElement(interp, Blt_Dtoa(interp, epsPtr->y));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeEpsBbox --
- *
- *	This procedure is invoked to compute the bounding box of all the
- *	pixels that may be drawn as part of a EPS item.  This procedure is
- *	where the preview image's placement is computed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The fields x1, y1, x2, and y2 are updated in the item for itemPtr.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-ComputeEpsBbox(
-    Tk_Canvas canvas,		/* Canvas that contains item. */
-    Eps *epsPtr)		/* Item whose bbox is to be recomputed. */
-{
-    Point2d anchorPos;
-
-    /* Translate the coordinates wrt the anchor. */
-    anchorPos = Blt_AnchorPoint(epsPtr->x, epsPtr->y, (double)epsPtr->width, 
-	(double)epsPtr->height, epsPtr->anchor);
-    /*
-     * Note: The right and bottom are exterior to the item.  
-     */
-    epsPtr->bb.left = anchorPos.x;
-    epsPtr->bb.top = anchorPos.y;
-    epsPtr->bb.right = epsPtr->bb.left + epsPtr->width;
-    epsPtr->bb.bottom = epsPtr->bb.top + epsPtr->height;
-
-    epsPtr->item.x1 = ROUND(epsPtr->bb.left);
-    epsPtr->item.y1 = ROUND(epsPtr->bb.top);
-    epsPtr->item.x2 = ROUND(epsPtr->bb.right);
-    epsPtr->item.y2 = ROUND(epsPtr->bb.bottom);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayEps --
- *
- *	This procedure is invoked to draw the EPS item in a given drawable.
- *	The EPS item may be drawn as either a solid rectangle or a pixmap of
- *	the preview image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	ItemPtr is drawn in drawable using the transformation information in
- *	canvas.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayEps(
-    Tk_Canvas canvas,		/* Canvas that contains item. */
-    Tk_Item *itemPtr,		/* Item to be displayed. */
-    Display *display,		/* Display on which to draw item. */
-    Drawable drawable,		/* Pixmap or window in which to draw item. */
-    int rx, int ry, 
-    int rw, int rh)		/* Describes region of canvas that must be
-				 * redisplayed (not used). */
-{
-    Blt_Picture picture;
-    Eps *epsPtr = (Eps *)itemPtr;
-    Tk_Window tkwin;
-    char *title;
-    int width, height;
-    short int drawX, drawY;
-
-    width = (int)(epsPtr->bb.right - epsPtr->bb.left);
-    height = (int)(epsPtr->bb.bottom - epsPtr->bb.top);
-    if ((width < 1) || (height < 1)) {
-	return;
-    }
-    tkwin = Tk_CanvasTkwin(canvas);
-    if (epsPtr->original != NULL) {
-	if ((epsPtr->lastWidth != width) || (epsPtr->lastHeight != height)) {
-	    if (epsPtr->quick) {
-		picture = Blt_ScalePicture(epsPtr->original, 0, 0,
-			Blt_PictureWidth(epsPtr->original),
-			Blt_PictureHeight(epsPtr->original), width, height);
-	    } else {
-		fprintf(stderr, "orig=%dx%d new=width=%dx%d last=%dx%d\n", 
-			Blt_PictureWidth(epsPtr->original),
-			Blt_PictureHeight(epsPtr->original),
-			width, height,
-			epsPtr->lastWidth, epsPtr->lastHeight);
-		picture = Blt_CreatePicture(width, height);
-		Blt_ResamplePicture(picture, epsPtr->original, bltBoxFilter, 
-			bltBoxFilter);
-	    }
-	    if (epsPtr->picture != NULL) {
-		Blt_FreePicture(epsPtr->picture);
-	    }
-	    epsPtr->picture = picture;
-	    epsPtr->lastHeight = height;
-	    epsPtr->lastWidth = width;
-	} 
-    }
-    picture = epsPtr->picture;
-    if (picture == NULL) {
-	picture = epsPtr->original;
-    }
-
-    /*
-     * Translate the coordinates to those of the EPS item, then redisplay it.
-     */
-    Tk_CanvasDrawableCoords(canvas, epsPtr->bb.left, epsPtr->bb.top, 
-			    &drawX, &drawY);
-
-    title = epsPtr->title;
-
-    if (epsPtr->reqTitle != NULL) {
-	title = epsPtr->reqTitle;
-    }
-    if ((epsPtr->showImage) && (picture != NULL)) {
-	struct region {
-	    short int left, right, top, bottom;
-	} p, r;
-	short int destX, destY;
-
-	/* The eps item may only partially exposed. Be careful to clip the
-	 * unexposed portions. */
-
-	/* Convert everything to screen coordinates since the origin of the
-	 * item is only available in */
-
-	p.left = drawX, p.top = drawY;
-	Tk_CanvasDrawableCoords(canvas, epsPtr->bb.right, epsPtr->bb.bottom,
-		&p.right, &p.bottom);
-	Tk_CanvasDrawableCoords(canvas, (double)rx, (double)ry, 
-		&r.left, &r.top);
-	Tk_CanvasDrawableCoords(canvas,(double)(rx+rw), (double)(ry+rh), 
-		&r.right, &r.bottom);
-	destX = (int)drawX, destY = (int)drawY;
-	if (p.left < r.left) {
-	    p.left = r.left;
-	}
-	if (p.top < r.top) {
-	    p.top = r.top;
-	}
-	if (p.right > r.right) {
-	    p.right = r.right;
-	}
-	if (p.bottom > r.bottom) {
-	    p.bottom = r.bottom;
-	}
-	if (destX < r.left) {
-	    destX = r.left;
-	}
-	if (destY < r.top) {
-	    destY = r.top;
-	}
-	p.left -= drawX, p.right -= drawX;
-	p.top -= drawY, p.bottom -= drawY;;
-	if (0 /* epsPtr->quick */) {
-	    Blt_Picture fade;
-
-	    fade = Blt_CreatePicture(Blt_PictureWidth(picture), 
-				     Blt_PictureHeight(picture));
-	    Blt_FadePicture(fade, picture, 0, 0, Blt_PictureWidth(picture), 
-		Blt_PictureHeight(picture), 0, 0, 150);
-	    Blt_PaintPicture(epsPtr->painter, drawable, fade, 
-		(int)p.left, (int)p.top, (int)(p.right - p.left), 
-		(int)(p.bottom - p.top), destX, destY, FALSE);
-	    Blt_FreePicture(fade);
-	} else {
-	    Blt_PaintPicture(epsPtr->painter, drawable, picture, (int)p.left, 
-		(int)p.top, (int)(p.right - p.left), (int)(p.bottom - p.top), 
-		destX, destY, FALSE);
-	}
-    } else {
-	if (epsPtr->fillGC != NULL) {
-	    XSetTSOrigin(display, epsPtr->fillGC, drawX, drawY);
-	    XFillRectangle(display, drawable, epsPtr->fillGC, drawX, drawY,
-		epsPtr->width, epsPtr->height);
-	    XSetTSOrigin(display, epsPtr->fillGC, 0, 0);
-	}
-    }
-
-    if (title != NULL) {
-	TextLayout *textPtr;
-	double rotWidth, rotHeight;
-	int destWidth, destHeight;
-
-	/* Translate the title to an anchor position within the EPS item */
-	epsPtr->titleStyle.font = epsPtr->font;
-	textPtr = Blt_Ts_CreateLayout(title, -1, &epsPtr->titleStyle);
-	Blt_GetBoundingBox(textPtr->width, textPtr->height, 
-	     epsPtr->titleStyle.angle, &rotWidth, &rotHeight, (Point2d *)NULL);
-	destWidth = (int)ceil(rotWidth);
-	destHeight = (int)ceil(rotHeight);
-	if ((destWidth <= width) && (destHeight <= height)) {
-	    int titleX, titleY;
-
-	    Blt_TranslateAnchor(drawX, drawY, width, height, 
-		epsPtr->titleStyle.anchor, &titleX, &titleY);
-	    if (picture == NULL) {
-		titleX += epsPtr->borderWidth;
-		titleY += epsPtr->borderWidth;
-	    }
-	    Blt_Ts_DrawLayout(tkwin, drawable, textPtr, &epsPtr->titleStyle, 
-		titleX, titleY, -1);
-	}
-	Blt_Free(textPtr);
-    }
-    if ((picture == NULL) && (epsPtr->border != NULL) && 
-	(epsPtr->borderWidth > 0)) {
-	Blt_Draw3DRectangle(tkwin, drawable, epsPtr->border, drawX, drawY,
-	    epsPtr->width, epsPtr->height, epsPtr->borderWidth, epsPtr->relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EpsToPoint --
- *
- *	Computes the distance from a given point to a given rectangle, in
- *	canvas units.
- *
- * Results:
- *	The return value is 0 if the point whose x and y coordinates are
- *	coordPtr[0] and coordPtr[1] is inside the EPS item.  If the point
- *	isn't inside the item then the return value is the distance from the
- *	point to the EPS item.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static double
-EpsToPoint(
-    Tk_Canvas canvas,		/* Canvas containing item. */
-    Tk_Item *itemPtr,		/* Item to check against point. */
-    double *pts)		/* Array of x and y coordinates. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-    double x, y, dx, dy;
-
-    x = pts[0], y = pts[1];
-
-    /*
-     * Check if point is outside the bounding rectangle and compute the
-     * distance to the closest side.
-     */
-    dx = dy = 0;
-    if (x < epsPtr->item.x1) {
-	dx = epsPtr->item.x1 - x;
-    } else if (x > epsPtr->item.x2) {
-	dx = x - epsPtr->item.x2;
-    }
-    if (y < epsPtr->item.y1) {
-	dy = epsPtr->item.y1 - y;
-    } else if (y > epsPtr->item.y2) {
-	dy = y - epsPtr->item.y2;
-    }
-    return hypot(dx, dy);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EpsToArea --
- *
- *	This procedure is called to determine whether an item lies entirely
- *	inside, entirely outside, or overlapping a given rectangle.
- *
- * Results:
- *	-1 is returned if the item is entirely outside the area given by
- *	rectPtr, 0 if it overlaps, and 1 if it is entirely inside the given
- *	area.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EpsToArea(
-    Tk_Canvas canvas,		/* Canvas containing the item. */
-    Tk_Item *itemPtr,		/* Item to check against bounding rectangle. */
-    double pts[])		/* Array of four coordinates (x1, y1,
-				 * x2, y2) describing area.  */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-
-    if ((pts[2] <= epsPtr->bb.left) || (pts[0] >= epsPtr->bb.right) ||
-	(pts[3] <= epsPtr->bb.top) || (pts[1] >= epsPtr->bb.bottom)) {
-	return -1;		/* Outside. */
-    }
-    if ((pts[0] <= epsPtr->bb.left) && (pts[1] <= epsPtr->bb.top) &&
-	(pts[2] >= epsPtr->bb.right) && (pts[3] >= epsPtr->bb.bottom)) {
-	return 1;		/* Inside. */
-    }
-    return 0;			/* Overlap. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScaleEps --
- *
- *	This procedure is invoked to rescale an item.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The item referred to by itemPtr is rescaled so that the
- *	following transformation is applied to all point coordinates:
- *		x' = xOrigin + xScale*(x-xOrigin)
- *		y' = yOrigin + yScale*(y-yOrigin)
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScaleEps(
-    Tk_Canvas canvas,		/* Canvas containing rectangle. */
-    Tk_Item *itemPtr,		/* Rectangle to be scaled. */
-    double xOrigin, double yOrigin, /* Origin wrt scale rect. */
-    double xScale, double yScale)
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-
-    epsPtr->bb.left = xOrigin + xScale * (epsPtr->bb.left - xOrigin);
-    epsPtr->bb.right = xOrigin + xScale * (epsPtr->bb.right - xOrigin);
-    epsPtr->bb.top = yOrigin + yScale * (epsPtr->bb.top - yOrigin);
-    epsPtr->bb.bottom = yOrigin + yScale *(epsPtr->bb.bottom - yOrigin);
-
-    /* Reset the user-requested values to the newly scaled values. */
-    epsPtr->width = ROUND(epsPtr->bb.right - epsPtr->bb.left);
-    epsPtr->height = ROUND(epsPtr->bb.bottom - epsPtr->bb.top);
-    epsPtr->x = ROUND(epsPtr->bb.left);
-    epsPtr->y = ROUND(epsPtr->bb.top);
-
-    epsPtr->item.x1 = ROUND(epsPtr->bb.left);
-    epsPtr->item.y1 = ROUND(epsPtr->bb.top);
-    epsPtr->item.x2 = ROUND(epsPtr->bb.right);
-    epsPtr->item.y2 = ROUND(epsPtr->bb.bottom);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateEps --
- *
- *	This procedure is called to move an item by a given amount.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The position of the item is offset by (dx, dy), and the bounding box
- *	is updated in the generic part of the item structure.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TranslateEps(
-    Tk_Canvas canvas,		/* Canvas containing item. */
-    Tk_Item *itemPtr,		/* Item that is being moved. */
-    double dx, double dy)	/* Amount by which item is to be moved. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-
-    epsPtr->bb.left += dx;
-    epsPtr->bb.right += dx;
-    epsPtr->bb.top += dy;
-    epsPtr->bb.bottom += dy;
-
-    epsPtr->x = epsPtr->bb.left;
-    epsPtr->y = epsPtr->bb.top;
-
-    epsPtr->item.x1 = ROUND(epsPtr->bb.left);
-    epsPtr->item.x2 = ROUND(epsPtr->bb.right);
-    epsPtr->item.y1 = ROUND(epsPtr->bb.top);
-    epsPtr->item.y2 = ROUND(epsPtr->bb.bottom);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EpsToPostScript --
- *
- *	This procedure is called to generate PostScript for EPS canvas items.
- *
- * Results:
- *	The return value is a standard TCL result.  If an error occurs in
- *	generating PostScript then an error message is left in interp->result,
- *	replacing whatever used to be there.  If no errors occur, then
- *	PostScript output for the item is appended to the interpreter result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-EpsToPostScript(
-    Tcl_Interp *interp,		/* Interpreter to hold generated PostScript
-				 * or reports errors back to. */
-    Tk_Canvas canvas,		/* Information about overall canvas. */
-    Tk_Item *itemPtr,		/* eps item. */
-    int prepass)		/* If 1, this is a prepass to collect
-				 * font information; 0 means final
-				 * PostScript is being created. */
-{
-    Eps *epsPtr = (Eps *)itemPtr;
-    Blt_Ps ps;
-    double xScale, yScale;
-    double x, y, width, height;
-    PageSetup setup;
-
-    if (prepass) {
-	return TCL_OK;		/* Don't worry about fonts. */
-    }
-    memset(&setup, 0, sizeof(setup));
-    ps = Blt_Ps_Create(interp, &setup);
-
-    /* Lower left corner of item on page. */
-    x = epsPtr->bb.left;
-    y = Tk_CanvasPsY(canvas, epsPtr->bb.bottom);
-    width = epsPtr->bb.right - epsPtr->bb.left;
-    height = epsPtr->bb.bottom - epsPtr->bb.top;
-
-    if (epsPtr->fileName == NULL) {
-	/* No PostScript file, generate PostScript of resized image instead. */
-	if (epsPtr->picture != NULL) {
-	    Blt_Ps_Format(ps, "gsave\n");
-	    /*
-	     * First flip the PostScript y-coordinate axis so that the origin
-	     * is the upper-left corner like our picture.
-	     */
-	    Blt_Ps_Format(ps, "  %g %g translate\n", x, y + height);
-	    Blt_Ps_Format(ps, "  1 -1 scale\n");
-
-	    Blt_Ps_DrawPicture(ps, epsPtr->picture, 0.0, 0.0);
-	    Blt_Ps_Format(ps, "grestore\n");
-
-	    Blt_Ps_SetInterp(ps, interp);
-	    Blt_Ps_Free(ps);
-	}
-	return TCL_OK;
-    }
-
-    /* Copy in the PostScript prolog for EPS encapsulation. */
-
-    if (Blt_Ps_IncludeFile(interp, ps, "bltCanvEps.pro") != TCL_OK) {
-	goto error;
-    }
-    Blt_Ps_Append(ps, "BeginEPSF\n");
-
-    xScale = width / (double)(epsPtr->urx - epsPtr->llx);
-    yScale = height / (double)(epsPtr->ury - epsPtr->lly);
-
-    /* Set up scaling and translation transformations for the EPS item */
-
-    Blt_Ps_Format(ps, "%g %g translate\n", x, y);
-    Blt_Ps_Format(ps, "%g %g scale\n", xScale, yScale);
-    Blt_Ps_Format(ps, "%d %d translate\n", -(epsPtr->llx), -(epsPtr->lly));
-
-    /* FIXME: Why clip against the old bounding box? */
-    Blt_Ps_Format(ps, "%d %d %d %d SetClipRegion\n", epsPtr->llx, 
-	epsPtr->lly, epsPtr->urx, epsPtr->ury);
-
-    Blt_Ps_VarAppend(ps, "%% including \"", epsPtr->fileName, "\"\n\n",
-	 (char *)NULL);
-
-    Blt_Ps_AppendBytes(ps, Tcl_DStringValue(&epsPtr->dString), 
-	Tcl_DStringLength(&epsPtr->dString));
-    Blt_Ps_Append(ps, "EndEPSF\n");
-    Blt_Ps_SetInterp(ps, interp);
-    Blt_Ps_Free(ps);
-    return TCL_OK;
-
-  error:
-    Blt_Ps_Free(ps);
-    return TCL_ERROR;
-}
-
-
-/*
- * The structures below defines the EPS item type in terms of procedures that
- * can be invoked by generic item code.
- */
-static Tk_ItemType itemType = {
-    (char *)"eps",		/* name */
-    sizeof(Eps),		/* itemSize */
-    CreateEps,			/* createProc */
-    configSpecs,		/* configSpecs */
-    ConfigureEps,		/* configureProc */
-    EpsCoords,			/* coordProc */
-    DeleteEps,			/* deleteProc */
-    DisplayEps,			/* displayProc */
-    0,				/* alwaysRedraw */
-    EpsToPoint,			/* pointProc */
-    EpsToArea,			/* areaProc */
-    EpsToPostScript,		/* postscriptProc */
-    ScaleEps,			/* scaleProc */
-    TranslateEps,		/* translateProc */
-    (Tk_ItemIndexProc *)NULL,	/* indexProc */
-    (Tk_ItemCursorProc *)NULL,	/* icursorProc */
-    (Tk_ItemSelectionProc *)NULL, /* selectionProc */
-    (Tk_ItemInsertProc *)NULL,	/* insertProc */
-    (Tk_ItemDCharsProc *)NULL,	/* dTextProc */
-    (Tk_ItemType *)NULL		/* nextPtr */
-};
-
-/*ARGSUSED*/
-void
-Blt_RegisterEpsCanvasItem(void)
-{
-    Tk_CreateItemType(&itemType);
-    /* Initialize custom canvas option routines. */
-    tagsOption.parseProc = Tk_CanvasTagsParseProc;
-    tagsOption.printProc = Tk_CanvasTagsPrintProc;
-}
diff --git a/blt3.0/src/bltChain.c b/blt3.0/src/bltChain.c
deleted file mode 100644
index 5a389f0..0000000
--- a/blt3.0/src/bltChain.c
+++ /dev/null
@@ -1,519 +0,0 @@
-
-/*
- * bltChain.c --
- *
- * The module implements a generic linked list package.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltChain.h"
-
-#ifndef ALIGN
-#define ALIGN(a) \
-	(((size_t)a + (sizeof(double) - 1)) & (~(sizeof(double) - 1)))
-#endif /* ALIGN */
-
-typedef struct _Blt_ChainLink ChainLink;
-typedef struct _Blt_Chain Chain;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Create --
- *
- *	Creates a new linked list (chain) structure and initializes its
- *	pointers;
- *
- * Results:
- *	Returns a pointer to the newly created chain structure.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Chain
-Blt_Chain_Create(void)
-{
-    Chain *chainPtr;
-
-    chainPtr = Blt_Malloc(sizeof(Chain));
-    if (chainPtr != NULL) {
-	Blt_Chain_Init(chainPtr);
-    }
-    return chainPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_AllocLink --
- *
- *	Creates a new chain link.  Unlink Blt_Chain_NewLink, this routine also
- *	allocates extra memory in the node for data.
- *
- * Results:
- *	The return value is the pointer to the newly created entry.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ChainLink
-Blt_Chain_AllocLink(size_t extraSize)
-{
-    ChainLink *linkPtr;
-    size_t linkSize;
-
-    linkSize = ALIGN(sizeof(ChainLink));
-    linkPtr = Blt_AssertCalloc(1, linkSize + extraSize);
-    if (extraSize > 0) {
-	/* Point clientData at the memory beyond the normal structure. */
-	linkPtr->clientData = (ClientData)((char *)linkPtr + linkSize);
-    }
-    return linkPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_InitLink --
- *
- *	Initializes the new link.  This routine is for applications that use
- *	their own memory allocation procedures to allocate links.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_InitLink(ChainLink *linkPtr)
-{
-    linkPtr->clientData = NULL;
-    linkPtr->next = linkPtr->prev = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_NewLink --
- *
- *	Creates a new link.
- *
- * Results:
- *	The return value is the pointer to the newly created link.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ChainLink
-Blt_Chain_NewLink(void)
-{
-    ChainLink *linkPtr;
-
-    linkPtr = Blt_AssertMalloc(sizeof(ChainLink));
-    linkPtr->clientData = NULL;
-    linkPtr->next = linkPtr->prev = NULL;
-    return linkPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Reset --
- *
- *	Removes all the links in the chain, freeing the memory used for each
- *	link.  Memory pointed to by the link (clientData) is not freed.  It's
- *	the caller's responsibility to deallocate it.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_Reset(Chain *chainPtr) /* Chain to clear */
-{
-    if (chainPtr != NULL) {
-	ChainLink *oldPtr;
-	ChainLink *linkPtr = chainPtr->head;
-
-	while (linkPtr != NULL) {
-	    oldPtr = linkPtr;
-	    linkPtr = linkPtr->next;
-	    Blt_Free(oldPtr);
-	}
-	Blt_Chain_Init(chainPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Destroy
- *
- *     Frees all the nodes in the chain and deallocates the memory used for
- *     the chain structure itself.  It's assumed that the chain was previously
- *     allocated by Blt_Chain_Create.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_Destroy(Chain *chainPtr)
-{
-    if (chainPtr != NULL) {
-	Blt_Chain_Reset(chainPtr);
-	Blt_Free(chainPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Init --
- *
- *	Initializes a linked list.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_Init(Chain *chainPtr)
-{
-    chainPtr->nLinks = 0;
-    chainPtr->head = chainPtr->tail = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_LinkAfter --
- *
- *	Inserts a link after another link.  If afterPtr is NULL, then the new
- *	link is prepended to the beginning of the chain.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_LinkAfter(Chain *chainPtr, ChainLink *linkPtr, ChainLink *afterPtr)
-{
-    if (chainPtr->head == NULL) {
-	chainPtr->tail = chainPtr->head = linkPtr;
-    } else {
-	if (afterPtr == NULL) {
-	    /* Append to the end of the chain. */
-	    linkPtr->next = NULL;
-	    linkPtr->prev = chainPtr->tail;
-	    chainPtr->tail->next = linkPtr;
-	    chainPtr->tail = linkPtr;
-	} else {
-	    linkPtr->next = afterPtr->next;
-	    linkPtr->prev = afterPtr;
-	    if (afterPtr == chainPtr->tail) {
-		chainPtr->tail = linkPtr;
-	    } else {
-		afterPtr->next->prev = linkPtr;
-	    }
-	    afterPtr->next = linkPtr;
-	}
-    }
-    chainPtr->nLinks++;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_LinkBefore --
- *
- *	Inserts a new link preceding a given link in a chain.  If beforePtr is
- *	NULL, then the new link is placed at the beginning of the list.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_LinkBefore(Chain *chainPtr, ChainLink *linkPtr, ChainLink *beforePtr)
-{
-    if (chainPtr->head == NULL) {
-	chainPtr->tail = chainPtr->head = linkPtr;
-    } else {
-	if (beforePtr == NULL) {
-	    /* Prepend to the front of the chain */
-	    linkPtr->next = chainPtr->head;
-	    linkPtr->prev = NULL;
-	    chainPtr->head->prev = linkPtr;
-	    chainPtr->head = linkPtr;
-	} else {
-	    linkPtr->prev = beforePtr->prev;
-	    linkPtr->next = beforePtr;
-	    if (beforePtr == chainPtr->head) {
-		chainPtr->head = linkPtr;
-	    } else {
-		beforePtr->prev->next = linkPtr;
-	    }
-	    beforePtr->prev = linkPtr;
-	}
-    }
-    chainPtr->nLinks++;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_UnlinkLink --
- *
- *	Unlinks a link from the chain. The link is not deallocated, but only
- *	removed from the chain.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_UnlinkLink(Chain *chainPtr, ChainLink *linkPtr)
-{
-    int unlinked;		/* Indicates if the link is actually removed
-				 * from the chain. */
-
-    unlinked = FALSE;
-    if (chainPtr->head == linkPtr) {
-	chainPtr->head = linkPtr->next;
-	unlinked = TRUE;
-    }
-    if (chainPtr->tail == linkPtr) {
-	chainPtr->tail = linkPtr->prev;
-	unlinked = TRUE;
-    }
-    if (linkPtr->next != NULL) {
-	linkPtr->next->prev = linkPtr->prev;
-	unlinked = TRUE;
-    }
-    if (linkPtr->prev != NULL) {
-	linkPtr->prev->next = linkPtr->next;
-	unlinked = TRUE;
-    }
-    if (unlinked) {
-	chainPtr->nLinks--;
-    }
-    linkPtr->prev = linkPtr->next = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_DeleteLink --
- *
- *	Unlinks and frees the given link from the chain.  It's assumed that
- *	the link belong to the chain. No error checking is performed to verify
- *	this.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_DeleteLink(Blt_Chain chain, Blt_ChainLink link)
-{
-    Blt_Chain_UnlinkLink(chain, link);
-    Blt_Free(link);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Append
- *
- *	Creates and new link with the given data and appends it to the end of
- *	the chain.
- *
- * Results:
- *	Returns a pointer to the link created.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ChainLink
-Blt_Chain_Append(Blt_Chain chain, ClientData clientData)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_NewLink();
-    Blt_Chain_LinkAfter(chain, link, (Blt_ChainLink)NULL);
-    Blt_Chain_SetValue(link, clientData);
-    return link;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Prepend
- *
- *	Creates and new link with the given data and prepends it to beginning
- *	of the chain.
- *
- * Results:
- *	Returns a pointer to the link created.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ChainLink 
-Blt_Chain_Prepend(Blt_Chain chain, ClientData clientData)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_NewLink();
-    Blt_Chain_LinkBefore(chain, link, (Blt_ChainLink)NULL);
-    Blt_Chain_SetValue(link, clientData);
-    return link;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_GetNthLink --
- *
- *	Find the link at the given position in the chain.
- *
- * Results:
- *	Returns the pointer to the link, if that numbered link
- *	exists. Otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ChainLink
-Blt_Chain_GetNthLink(Chain *chainPtr, long position)
-{
-    if (chainPtr != NULL) {
-	if (position < 0) {
-	    ChainLink *linkPtr;
-	    int i;
-
-	    position = -position;
-	    linkPtr = chainPtr->tail;
-	    for (i = 0; i < position; i++) {
-		linkPtr = linkPtr->prev;
-		if (linkPtr == NULL) {
-		    return NULL;
-		}
-	    }
-	    return linkPtr;
-	} else {
-	    ChainLink *linkPtr;
-	    int i;
-
-	    linkPtr = chainPtr->head;
-	    for (i = 0; i < position; i++) {
-		linkPtr = linkPtr->next;
-		if (linkPtr == NULL) {
-		    return NULL;
-		}
-	    }
-	    return linkPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_Sort --
- *
- *	Sorts the chain according to the given comparison routine.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The chain is reordered.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Chain_Sort(Chain *chainPtr, Blt_ChainCompareProc *proc)
-{
-    ChainLink **linkArr;
-    ChainLink *linkPtr;
-    long i;
-
-    if (chainPtr->nLinks < 2) {
-	return;
-    }
-    linkArr = Blt_Malloc(sizeof(Blt_ChainLink) * (chainPtr->nLinks + 1));
-    if (linkArr == NULL) {
-	return;			/* Out of memory. */
-    }
-    i = 0;
-    for (linkPtr = chainPtr->head; linkPtr != NULL; 
-	 linkPtr = linkPtr->next) { 
-	linkArr[i++] = linkPtr;
-    }
-    qsort((char *)linkArr, chainPtr->nLinks, sizeof(Blt_ChainLink),
-	(QSortCompareProc *)proc);
-
-    /* Rethread the chain. */
-    linkPtr = linkArr[0];
-    chainPtr->head = linkPtr;
-    linkPtr->prev = NULL;
-    for (i = 1; i < chainPtr->nLinks; i++) {
-	linkPtr->next = linkArr[i];
-	linkPtr->next->prev = linkPtr;
-	linkPtr = linkPtr->next;
-    }
-    chainPtr->tail = linkPtr;
-    linkPtr->next = NULL;
-    Blt_Free(linkArr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Chain_IsBefore --
- *
- *
- * Results:
- *	Return boolean value if the first link comes before the second.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Chain_IsBefore(ChainLink *firstPtr, ChainLink *lastPtr)
-{
-    ChainLink *linkPtr;
-
-    for (linkPtr = firstPtr; linkPtr != NULL; linkPtr = linkPtr->next) {
-	if (linkPtr == lastPtr) {
-	    return TRUE;
-	}
-    }
-    return FALSE;
-}
-
diff --git a/blt3.0/src/bltChain.h b/blt3.0/src/bltChain.h
deleted file mode 100644
index e0b0259..0000000
--- a/blt3.0/src/bltChain.h
+++ /dev/null
@@ -1,90 +0,0 @@
-
-/*
- * bltChain.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef _BLT_CHAIN_H
-#define _BLT_CHAIN_H
-
-typedef struct _Blt_Chain *Blt_Chain;
-typedef struct _Blt_ChainLink *Blt_ChainLink;
-
-/*
- * A Blt_ChainLink is the container structure for the Blt_Chain.
- */
-
-struct _Blt_ChainLink {
-    Blt_ChainLink prev;		/* Link to the previous link */
-    Blt_ChainLink next;		/* Link to the next link */
-    ClientData clientData;	/* Pointer to the data object */
-};
-
-typedef int (Blt_ChainCompareProc)(Blt_ChainLink *l1Ptr, Blt_ChainLink *l2Ptr);
-
-/*
- * A Blt_Chain is a doubly chained list structure.
- */
-struct _Blt_Chain {
-    Blt_ChainLink head;		/* Pointer to first element in chain */
-    Blt_ChainLink tail;		/* Pointer to last element in chain */
-    long nLinks;		/* Number of elements in chain */
-};
-
-BLT_EXTERN void Blt_Chain_Init(Blt_Chain chain);
-BLT_EXTERN Blt_Chain Blt_Chain_Create(void);
-BLT_EXTERN void Blt_Chain_Destroy(Blt_Chain chain);
-BLT_EXTERN Blt_ChainLink Blt_Chain_NewLink(void);
-BLT_EXTERN Blt_ChainLink Blt_Chain_AllocLink(size_t size);
-BLT_EXTERN Blt_ChainLink Blt_Chain_Append(Blt_Chain chain, 
-	ClientData clientData);
-BLT_EXTERN Blt_ChainLink Blt_Chain_Prepend(Blt_Chain chain, 
-	ClientData clientData);
-BLT_EXTERN void Blt_Chain_Reset(Blt_Chain chain);
-BLT_EXTERN void Blt_Chain_InitLink(Blt_ChainLink link);
-BLT_EXTERN void Blt_Chain_LinkAfter(Blt_Chain chain, Blt_ChainLink link, 
-	Blt_ChainLink after);
-BLT_EXTERN void Blt_Chain_LinkBefore(Blt_Chain chain, Blt_ChainLink link, 
-	Blt_ChainLink before);
-BLT_EXTERN void Blt_Chain_UnlinkLink(Blt_Chain chain, Blt_ChainLink link);
-BLT_EXTERN void Blt_Chain_DeleteLink(Blt_Chain chain, Blt_ChainLink link);
-BLT_EXTERN Blt_ChainLink Blt_Chain_GetNthLink(Blt_Chain chain, long position);
-BLT_EXTERN void Blt_Chain_Sort(Blt_Chain chain, Blt_ChainCompareProc *proc);
-BLT_EXTERN int Blt_Chain_IsBefore(Blt_ChainLink first, Blt_ChainLink last);
-
-#define Blt_Chain_GetLength(c)	(((c) == NULL) ? 0 : (c)->nLinks)
-#define Blt_Chain_FirstLink(c)	(((c) == NULL) ? NULL : (c)->head)
-#define Blt_Chain_LastLink(c)	(((c) == NULL) ? NULL : (c)->tail)
-#define Blt_Chain_PrevLink(l)	((l)->prev)
-#define Blt_Chain_NextLink(l) 	((l)->next)
-#define Blt_Chain_GetValue(l)  	((l)->clientData)
-#define Blt_Chain_FirstValue(c)	(((c)->head == NULL) ? NULL : (c)->head->clientData)
-#define Blt_Chain_SetValue(l, value) ((l)->clientData = (ClientData)(value))
-#define Blt_Chain_AppendLink(c, l) \
-	(Blt_Chain_LinkAfter((c), (l), (Blt_ChainLink)NULL))
-#define Blt_Chain_PrependLink(c, l) \
-	(Blt_Chain_LinkBefore((c), (l), (Blt_ChainLink)NULL))
-
-#endif /* _BLT_CHAIN_H */
diff --git a/blt3.0/src/bltComboBtn.c b/blt3.0/src/bltComboBtn.c
deleted file mode 100644
index 150ad1d..0000000
--- a/blt3.0/src/bltComboBtn.c
+++ /dev/null
@@ -1,2091 +0,0 @@
-
-/*
- * bltComboButton.c --
- *
- * This module implements a combo button widget for the BLT toolkit.
- *
- *	Copyright 2006 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltImage.h"
-#include "bltHash.h"
-#include "bltBgStyle.h"
-
-#define IPAD		2		/* Internal pad between components. */
-#define YPAD		2		/* External pad between components. */
-#define XPAD		2		/* External pad between border and
-					 * button. */
-#define ARROW_WIDTH	 13
-#define ARROW_HEIGHT 13
-
-#define STATE_NORMAL    (0)		/* Draw widget normally. */
-#define STATE_ACTIVE    (1<<0)		/* Widget is currently active. */
-#define STATE_DISABLED  (1<<1)		/* Widget is disabled. */
-#define STATE_POSTED    (1<<2)		/* Widget is currently posting its
-					 * menu. */
-#define STATE_MASK	(STATE_ACTIVE|STATE_DISABLED|STATE_POSTED)
-#define REDRAW_PENDING  (1<<3)		/* Widget is scheduled to be
-					 * redrawn. */
-#define LAYOUT_PENDING  (1<<4)		/* Widget layout needs to be
-					 * recomputed. */
-#define FOCUS           (1<<5)		/* Widget has focus. */
-
-#define ARROW_ON	(1<<8)
-#define TEXT_VAR_TRACED	(1<<16)
-#define ICON_VAR_TRACED	(1<<17)
-
-
-#define TRACE_VAR_FLAGS		(TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|\
-				 TCL_TRACE_UNSETS)
-
-#define DEF_ACTIVEBACKGROUND	STD_ACTIVE_BACKGROUND
-#define DEF_ACTIVEFOREGROUND	STD_ACTIVE_FOREGROUND
-#define DEF_BORDERWIDTH		"2"
-#define DEF_CMD			((char *)NULL)
-#define DEF_CURSOR		((char *)NULL)
-#define DEF_DIRECTION		((char *)NULL)
-#define DEF_DISABLED_BG		STD_DISABLED_BACKGROUND
-#define DEF_DISABLED_FG		STD_DISABLED_FOREGROUND
-#define DEF_ENTRY_BG		RGB_GREY90
-#define DEF_FONT		STD_FONT
-#define DEF_HEIGHT		"0"
-#define DEF_HIGHLIGHTBACKGROUND ""
-#define DEF_HIGHLIGHTCOLOR      "black"
-#define DEF_HIGHLIGHTTHICKNESS	"2"
-#define DEF_ICON		((char *)NULL)
-#define DEF_ICON_VARIABLE	((char *)NULL)
-#define DEF_IMAGE		((char *)NULL)
-#define DEF_ARROW_ON		"0"
-#define DEF_INDICTOR_ACTIVE_FG	STD_ACTIVE_FOREGROUND
-#define DEF_ARROW_BORDERWIDTH	"2"
-#define DEF_ARROW_DISABLED_FG	STD_DISABLED_FOREGROUND
-#define DEF_ARROW_POSTED_FG	STD_DISABLED_FOREGROUND
-#define DEF_ARROW_NORMAL_FG	STD_NORMAL_FOREGROUND
-#define DEF_ARROW_RELIEF	"flat"
-#define DEF_JUSTIFY		"left"
-#define DEF_MENU		((char *)NULL)
-#define DEF_MENU_ANCHOR		"sw"
-#define DEF_NORMAL_BG		STD_NORMAL_BACKGROUND
-#define DEF_NORMAL_FG		STD_NORMAL_FOREGROUND
-#define DEF_POSTED_BG		RGB_SKYBLUE4
-#define DEF_POSTED_FG		RGB_WHITE
-#define DEF_NORMAL_RELIEF	"raised"
-#define DEF_POSTED_RELIEF	"flat"
-#define DEF_ACTIVERELIEF	"raised"
-#define DEF_STATE		"normal"
-#define DEF_TAKE_FOCUS		"1"
-#define DEF_TEXT		((char *)NULL)
-#define DEF_TEXT_VARIABLE	((char *)NULL)
-#define DEF_TYPE		"button"
-#define DEF_UNDERLINE		"-1"
-#define DEF_WIDTH		"0"
-
-#define SCREEN_HEIGHT(w)	HeightOfScreen(Tk_Screen(w))
-#define SCREEN_WIDTH(w)		WidthOfScreen(Tk_Screen(w))
-
-static Tcl_VarTraceProc TextVarTraceProc;
-static Tcl_VarTraceProc IconVarTraceProc;
-
-static Blt_OptionFreeProc FreeTextProc;
-static Blt_OptionParseProc ObjToTextProc;
-static Blt_OptionPrintProc TextToObjProc;
-static Blt_CustomOption textOption = {
-    ObjToTextProc, TextToObjProc, FreeTextProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeIconProc;
-static Blt_OptionParseProc ObjToIconProc;
-static Blt_OptionPrintProc IconToObjProc;
-static Blt_CustomOption iconOption = {
-    ObjToIconProc, IconToObjProc, FreeIconProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeTextVarProc;
-static Blt_OptionParseProc ObjToTextVarProc;
-static Blt_OptionPrintProc TextVarToObjProc;
-static Blt_CustomOption textVarOption = {
-    ObjToTextVarProc, TextVarToObjProc, FreeTextVarProc, (ClientData)0
-};
-static Blt_OptionFreeProc FreeIconVarProc;
-static Blt_OptionParseProc ObjToIconVarProc;
-static Blt_OptionPrintProc IconVarToObjProc;
-static Blt_CustomOption iconVarOption = {
-    ObjToIconVarProc, IconVarToObjProc, FreeIconVarProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToStateProc;
-static Blt_OptionPrintProc StateToObjProc;
-static Blt_CustomOption stateOption = {
-    ObjToStateProc, StateToObjProc, NULL, (ClientData)0
-};
-
-static const char *emptyString = "";
-
-/*
- * Icon --
- *
- *	Since instances of the same Tk image can be displayed in different
- *	windows with possibly different color palettes, Tk internally stores
- *	each instance in a linked list.  But if the instances are used in the
- *	same widget and therefore use the same color palette, this adds a lot
- *	of overhead, especially when deleting instances from the linked list.
- *
- *	For the combobutton widget, we never need more than a single instance
- *	of an image, regardless of how many times it's used.  Cache the image,
- *	maintaining a reference count for each image used in the widget.  It's
- *	likely that the comboview widget will use many instances of the same
- *	image.
- */
-
-typedef struct Icon {
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    short int width, height;		/* Dimensions of the cached image. */
-} *Icon;
-
-#define IconHeight(i)	((i)->height)
-#define IconWidth(i)	((i)->width)
-#define IconImage(i)	((i)->tkImage)
-#define IconName(i)	(Blt_Image_Name((i)->tkImage))
-
-typedef struct  {
-    Tcl_Interp *interp;			/* Interpreter associated with
-					 * button. */
-    Tk_Window tkwin;			/* Window that embodies the combo
-					 * button. If NULL, indicates the
-					 * window has been destroyed but the
-					 * data structures haven't yet been
-					 * cleaned up.*/
-    Display *display;			/* Display containing widget.  Used,
-					 * among other things, so that
-					 * resources can be freed even after
-					 * tkwin has gone away. */
-    Tcl_Command cmdToken;		/* Token for widget command. */
-    int reqWidth, reqHeight;
-    int relief, postedRelief, activeRelief;
-    int borderWidth;
-    Blt_Background normalBg;
-    Blt_Background activeBg;
-    Blt_Background postedBg;
-    Blt_Background disabledBg;
-    Tcl_Obj *takeFocusObjPtr;		/* Value of -takefocus option; not
-					 * used in the C code, but used by
-					 * keyboard traversal scripts. */
-
-    /*
-     * In/Out Focus Highlight Ring:
-     */
-    XColor *highlightColor;
-    GC highlightGC;
-    XColor *highlightBgColor;
-    GC highlightBgGC;
-    int highlightWidth;
-
-    /* 
-     * The button contains an optional icon and text string. 
-     */
-    Icon icon;				/* If non-NULL, image to be displayed
-					 * in button. Its value may be
-					 * overridden by the -iconvariable
-					 * option. */
-
-    Tcl_Obj *iconVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable contains the name of
-					 * an image representing the icon.
-					 * This overrides the value of the
-					 * above field. */
-    Icon image;				/* If non-NULL, image to be displayed
-					 * instead of text in the button. */
-    const char *text;			/* Text string to be displayed in the
-					 * button if an image has no been
-					 * designated. Its value is overridden
-					 * by the -textvariable option. */
-    Tcl_Obj *textVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable contains the text
-					 * string to be displayed in the
-					 * button. This overrides the above
-					 * field. */
-    Blt_Font font;			/* Font of text to be display in
-					 * button. */
-    Tk_Justify justify;			/* Justification to use for text
-					 * within the button. */
-    int textLen;			/* # bytes of text. */
-    int underline;			/* Character index of character to be
-					 * underlined. If -1, no character is
-					 * underlined. */
-    XColor *textNormalColor;
-    XColor *textActiveColor;
-    XColor *textPostedColor;
-    XColor *textDisabledColor;
-
-    GC textActiveGC;
-    GC textNormalGC;
-    GC textPostedGC;
-    GC textDisabledGC;
-
-    /*  
-     * Arrow (button) Information:
-     *
-     * The arrow is a button with an optional 3D border.
-     */
-    int indBW;
-    int indRelief;
-
-    Tk_Cursor cursor;			/* Current cursor or * None. */
-    int prefWidth;			/* Desired width of window, measured
-					 * in average characters. */
-    int inset;
-    short int indWidth, indHeight;
-    short int iconWidth, iconHeight;
-    short int entryWidth, entryHeight;
-    short int textWidth, textHeight;
-    short int width, height;
-    Tcl_Obj *cmdObjPtr;			/* If non-NULL, command to be executed
-					 * when this menu is posted. */
-    Tcl_Obj *menuObjPtr;	
-    Tcl_Obj *postCmdObjPtr;		/* If non-NULL, command to be executed
-					 * when this menu is posted. */
-    int menuAnchor;
-    unsigned int flags;
-} ComboButton;
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_ACTIVEBACKGROUND, 
-	Blt_Offset(ComboButton, activeBg),0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"ActiveForeground", DEF_ACTIVEFOREGROUND, 
-	Blt_Offset(ComboButton, textActiveColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief", 
-	DEF_ACTIVERELIEF, Blt_Offset(ComboButton, activeRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-arrowon", "arrowOn", "ArrowOn", 
-	DEF_ARROW_ON, Blt_Offset(ComboButton, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)ARROW_ON},
-    {BLT_CONFIG_PIXELS_NNEG, "-arrowborderwidth", "arrowBorderWidth", 
-        "ArrowBorderWidth", DEF_ARROW_BORDERWIDTH, 
-	Blt_Offset(ComboButton, indBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-arrowrelief", "arrowRelief","ArrowRelief",
-	DEF_ARROW_RELIEF, Blt_Offset(ComboButton, indRelief), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_NORMAL_BG, Blt_Offset(ComboButton, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, Blt_Offset(ComboButton, borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-command", "command", "Command", 
-	DEF_CMD, Blt_Offset(ComboButton, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CURSOR, Blt_Offset(ComboButton, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-disabledbackground", "disabledBackground",
-	"DisabledBackground", DEF_DISABLED_BG, 
-	Blt_Offset(ComboButton, disabledBg), 0},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_DISABLED_FG, 
-	Blt_Offset(ComboButton, textDisabledColor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_FONT, 
-	Blt_Offset(ComboButton, font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_NORMAL_FG, Blt_Offset(ComboButton, textNormalColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(ComboButton, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground", 
-	"HighlightBackground", DEF_HIGHLIGHTBACKGROUND, 
-	Blt_Offset(ComboButton, highlightBgColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_HIGHLIGHTCOLOR, Blt_Offset(ComboButton, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_HIGHLIGHTTHICKNESS, 
-	Blt_Offset(ComboButton, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", DEF_ICON, 
-	Blt_Offset(ComboButton, icon), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_CUSTOM, "-iconvariable", "iconVariable", "IconVariable", 
-	DEF_TEXT_VARIABLE, Blt_Offset(ComboButton, iconVarObjPtr), 
-        BLT_CONFIG_NULL_OK, &iconVarOption},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", DEF_IMAGE, 
-	Blt_Offset(ComboButton, image), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_JUSTIFY, 
-	Blt_Offset(ComboButton, justify), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-menu", "menu", "Menu", DEF_MENU, 
-	Blt_Offset(ComboButton, menuObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-menuanchor", "menuAnchor", "MenuAnchor", 
-	DEF_MENU_ANCHOR, Blt_Offset(ComboButton, menuAnchor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-postcommand", "postCommand", "PostCommand", 
-	DEF_CMD, Blt_Offset(ComboButton, postCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-postedbackground", "postedBackground",
-        "PostedBackground", DEF_POSTED_BG, Blt_Offset(ComboButton, postedBg),0},
-    {BLT_CONFIG_COLOR, "-postedforeground", "postedForeground",
-	"PostedForeground", DEF_POSTED_FG, 
-	Blt_Offset(ComboButton, textPostedColor), 0},
-    {BLT_CONFIG_RELIEF, "-postedrelief", "postedRelief", "PostedRelief", 
-	DEF_POSTED_RELIEF, Blt_Offset(ComboButton, postedRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_NORMAL_RELIEF, 
-	Blt_Offset(ComboButton, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_STATE, 
-	Blt_Offset(ComboButton, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&stateOption},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus", DEF_TAKE_FOCUS, 
-	Blt_Offset(ComboButton, takeFocusObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-text", "text", "Text", DEF_TEXT, 
-	Blt_Offset(ComboButton, text), 0, &textOption},
-    {BLT_CONFIG_CUSTOM, "-textvariable", "textVariable", "TextVariable", 
-	DEF_TEXT_VARIABLE, Blt_Offset(ComboButton, textVarObjPtr), 
-        BLT_CONFIG_NULL_OK, &textVarOption},
-    {BLT_CONFIG_INT, "-underline", "underline", "Underline", DEF_UNDERLINE, 
-	Blt_Offset(ComboButton, underline), BLT_CONFIG_DONT_SET_DEFAULT },
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(ComboButton, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Tcl_IdleProc DisplayComboButton;
-static Tcl_FreeProc DestroyComboButton;
-static Tk_EventProc ComboButtonEventProc;
-static Tcl_ObjCmdProc ComboButtonInstCmdProc;
-static Tcl_CmdDeleteProc ComboButtonInstCmdDeletedProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the combobutton display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(ComboButton *comboPtr) 
-{
-    if ((comboPtr->tkwin != NULL) && ((comboPtr->flags & REDRAW_PENDING) == 0)){
-	comboPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayComboButton, comboPtr);
-    }
-}
-
-static int
-UpdateTextVar(Tcl_Interp *interp, ComboButton *comboPtr) 
-{
-    Tcl_Obj *resultObjPtr, *objPtr;
-	
-    objPtr = Tcl_NewStringObj(comboPtr->text, comboPtr->textLen);
-    Tcl_IncrRefCount(objPtr);
-    resultObjPtr = Tcl_ObjSetVar2(interp, comboPtr->textVarObjPtr, NULL, 
-	objPtr, TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-    Tcl_DecrRefCount(objPtr);
-    if (resultObjPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-UpdateIconVar(Tcl_Interp *interp, ComboButton *comboPtr) 
-{
-    Tcl_Obj *resultObjPtr, *objPtr;
-    
-    if (comboPtr->icon != NULL) {
-	objPtr = Tcl_NewStringObj(IconName(comboPtr->icon), -1);
-    } else {
-	objPtr = Tcl_NewStringObj("", -1);
-    }
-    Tcl_IncrRefCount(objPtr);
-    resultObjPtr = Tcl_ObjSetVar2(interp, comboPtr->iconVarObjPtr, NULL, 
-	objPtr, TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-    Tcl_DecrRefCount(objPtr);
-    if (resultObjPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-FreeIcon(ComboButton *comboPtr, Icon icon)
-{
-    Tk_FreeImage(IconImage(icon));
-    Blt_Free(icon);
-}
-
-static char *
-GetInterpResult(Tcl_Interp *interp)
-{
-#define MAX_ERR_MSG	1023
-    static char mesg[MAX_ERR_MSG+1];
-
-    strncpy(mesg, Tcl_GetStringResult(interp), MAX_ERR_MSG);
-    mesg[MAX_ERR_MSG] = '\0';
-    return mesg;
-}
-
-static void
-SetTextFromObj(ComboButton *comboPtr, Tcl_Obj *objPtr) 
-{
-    int nBytes;
-    const char *string;
-	    
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-    }
-    string = Tcl_GetStringFromObj(objPtr, &nBytes);
-    comboPtr->text = Blt_AssertMalloc(nBytes + 1);
-    strcpy((char *)comboPtr->text, string);
-    comboPtr->textLen = nBytes;
-    comboPtr->flags |= LAYOUT_PENDING;
-    comboPtr->underline = -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,		/* Not used. */
-    int imageWidth, int imageHeight)	/* Not used. */
-{
-    ComboButton *comboPtr = clientData;
-
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-}
-
-static int
-GetIconFromObj(
-    Tcl_Interp *interp, 
-    ComboButton *comboPtr, 
-    Tcl_Obj *objPtr, 
-    Icon *iconPtr)
-{
-    Tk_Image tkImage;
-    const char *iconName;
-
-    iconName = Tcl_GetString(objPtr);
-    if (iconName[0] == '\0') {
-	*iconPtr = NULL;
-	return TCL_OK;
-    }
-    tkImage = Tk_GetImage(interp, comboPtr->tkwin, iconName, IconChangedProc, 
-	comboPtr);
-    if (tkImage != NULL) {
-	struct Icon *ip;
-	int width, height;
-
-	ip = Blt_AssertMalloc(sizeof(struct Icon));
-	Tk_SizeOfImage(tkImage, &width, &height);
-	ip->tkImage = tkImage;
-	ip->width = width;
-	ip->height = height;
-	*iconPtr = ip;
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboButtonEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	combobutton widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboButtonEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ComboButton *comboPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(comboPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(comboPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    comboPtr->flags |= FOCUS;
-	} else {
-	    comboPtr->flags &= ~FOCUS;
-	}
-	EventuallyRedraw(comboPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (comboPtr->tkwin != NULL) {
-	    comboPtr->tkwin = NULL; 
-	}
-	if (comboPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayComboButton, comboPtr);
-	}
-	Tcl_EventuallyFree(comboPtr, DestroyComboButton);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * TextVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state variable
- *	associated with a combobutton.  
- *
- * Results:
- *	NULL is always returned.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-TextVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    ComboButton *comboPtr = clientData;
-
-    assert(comboPtr->textVarObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	if (flags & TCL_TRACE_DESTROYED) {
-	    Tcl_SetVar(interp, name1, comboPtr->text, TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, name1, TRACE_VAR_FLAGS, TextVarTraceProc, 
-		clientData);
-	    comboPtr->flags |= TEXT_VAR_TRACED;
-	}
-	return NULL;
-    }
-    if (flags & TCL_TRACE_WRITES) {
-	Tcl_Obj *valueObjPtr;
-
-	/*
-	 * Update the combobutton's text with the value of the variable,
-	 * unless the widget already has that value (this happens when the
-	 * variable changes value because we changed it because someone typed
-	 * in the entry).
-	 */
-	valueObjPtr = Tcl_ObjGetVar2(interp, comboPtr->textVarObjPtr, NULL, 
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-	if (valueObjPtr == NULL) {
-	    return GetInterpResult(interp);
-	} else {
-	    SetTextFromObj(comboPtr, valueObjPtr);
-	}
-	EventuallyRedraw(comboPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * IconVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state
- *	variable associated with combobutton. 
- *
- * Results:
- *	NULL is always returned.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-IconVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    ComboButton *comboPtr = clientData;
-
-    assert(comboPtr->iconVarObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	if (flags & TCL_TRACE_DESTROYED) {
-	    Tcl_SetVar(interp, name1, IconName(comboPtr->icon),TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, name1, TRACE_VAR_FLAGS, IconVarTraceProc, 
-		clientData);
-	    comboPtr->flags |= ICON_VAR_TRACED;
-	}
-	return NULL;
-    }
-    if (flags & TCL_TRACE_WRITES) {
-	Icon icon;
-	Tcl_Obj *valueObjPtr;
-
-	/*
-	 * Update the combobutton's icon with the image whose name is
-	 * stored in the variable.
-	 */
-	valueObjPtr = Tcl_ObjGetVar2(interp, comboPtr->iconVarObjPtr, NULL, 
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-	if (valueObjPtr == NULL) {
-	    return GetInterpResult(interp);
-	}
-	if (GetIconFromObj(interp, comboPtr, valueObjPtr, &icon) != TCL_OK) {
-	    return GetInterpResult(interp);
-	}
-	if (comboPtr->icon != NULL) {
-	    FreeIcon(comboPtr, comboPtr->icon);
-	}
-	comboPtr->icon = icon;
-	comboPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(comboPtr);
-    }
-    return NULL;
-}
-
-/*ARGSUSED*/
-static void
-FreeIconVarProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-
-    if (*objPtrPtr != NULL) {
-	ComboButton *comboPtr = (ComboButton *)widgRec;
-
-	Tcl_UntraceVar(comboPtr->interp, Tcl_GetString(*objPtrPtr), 
-		TRACE_VAR_FLAGS, IconVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconVarProc --
- *
- *	Convert the variable to a traced variable.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-    char *varName;
-    Tcl_Obj *valueObjPtr;
-
-    /* Remove the current trace on the variable. */
-    if (*objPtrPtr != NULL) {
-	Tcl_UntraceVar(interp, Tcl_GetString(*objPtrPtr), TRACE_VAR_FLAGS, 
-		       IconVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-
-    valueObjPtr = Tcl_ObjGetVar2(interp, objPtr, NULL, TCL_GLOBAL_ONLY);
-    if (valueObjPtr != NULL) {
-	Icon icon;
-
-	if (GetIconFromObj(interp, comboPtr, valueObjPtr, &icon) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (comboPtr->icon != NULL) {
-	    FreeIcon(comboPtr, comboPtr->icon);
-	}
-	comboPtr->icon = icon;
-    }
-    *objPtrPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, TRACE_VAR_FLAGS, IconVarTraceProc, comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconVarToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *objPtr = *(Tcl_Obj **)(widgRec + offset);
-
-    if (objPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } 
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeTextVarProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-
-    if (*objPtrPtr != NULL) {
-	ComboButton *comboPtr = (ComboButton *)(widgRec);
-	char *varName;
-
-	varName = Tcl_GetString(*objPtrPtr);
-	Tcl_UntraceVar(comboPtr->interp, varName, TRACE_VAR_FLAGS, 
-		TextVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTextVarProc --
- *
- *	Convert the variable to a traced variable.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTextVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-    char *varName;
-    Tcl_Obj *valueObjPtr;
-
-    /* Remove the current trace on the variable. */
-    if (*objPtrPtr != NULL) {
-	varName = Tcl_GetString(*objPtrPtr);
-	Tcl_UntraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc, 
-		comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-
-    valueObjPtr = Tcl_ObjGetVar2(interp, objPtr, NULL, TCL_GLOBAL_ONLY);
-    if (valueObjPtr != NULL) {
-	SetTextFromObj(comboPtr, valueObjPtr);
-	if (comboPtr->textVarObjPtr != NULL) {
-	    if (UpdateTextVar(interp, comboPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    *objPtrPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc, comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextVarToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TextVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *objPtr = *(Tcl_Obj **)(widgRec + offset);
-
-    if (objPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } 
-    return objPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStateProc --
- *
- *	Converts the string representing a state into a bitflag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStateProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing state. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    char *string;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "disabled") == 0) {
-	flag = STATE_DISABLED;
-    } else if (strcmp(string, "normal") == 0) {
-	flag = STATE_NORMAL;
-    } else if (strcmp(string, "active") == 0) {
-	flag = STATE_ACTIVE;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-	    "\": should be active, disabled, or normal.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (comboPtr->flags & flag) {
-	return TCL_OK;			/* State is already set to value. */
-    }
-    *flagsPtr &= ~STATE_MASK;
-    *flagsPtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StateToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StateToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int state = *(unsigned int *)(widgRec + offset);
-    const char *string;
-
-    switch (state & STATE_MASK) {
-    case STATE_NORMAL:		string = "normal";	break;
-    case STATE_ACTIVE:		string = "active";	break;
-    case STATE_POSTED:		string = "posted";	break;
-    case STATE_DISABLED:	string = "disabled";	break;
-    default:			string = Blt_Itoa(state & STATE_MASK);
-		break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeIconProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-
-    if (icon != NULL) {
-	ComboButton *comboPtr = (ComboButton *)widgRec;
-
-	FreeIcon(comboPtr, icon);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconProc --
- *
- *	Convert a image into a hashed icon.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)widgRec;
-    Icon *iconPtr = (Icon *)(widgRec + offset);
-    Icon icon;
-
-    if (GetIconFromObj(interp, comboPtr, objPtr, &icon) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (*iconPtr != NULL) {
-	FreeIcon(comboPtr, *iconPtr);
-    }
-    *iconPtr = icon;
-    if (comboPtr->iconVarObjPtr != NULL) {
-	if (UpdateIconVar(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObjProc --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (icon == NULL) {
-	objPtr = Tcl_NewStringObj("", 0);
-    } else {
-	objPtr =Tcl_NewStringObj(Blt_Image_Name(IconImage(icon)), -1);
-    }
-    return objPtr;
-}
-
-
-/*ARGSUSED*/
-static void
-FreeTextProc(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-	comboPtr->text = emptyString;
-	comboPtr->textLen = 0;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTextProc --
- *
- *	Save the text and add the item to the text hashtable.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTextProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-	comboPtr->text = emptyString;
-	comboPtr->textLen = 0;
-    }
-    SetTextFromObj(comboPtr, objPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	if (UpdateTextVar(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextToObjProc --
- *
- *	Return the text of the item.
- *
- * Results:
- *	The text is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TextToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboButton *comboPtr = (ComboButton *)(widgRec);
-
-    return Tcl_NewStringObj(comboPtr->text, comboPtr->textLen);
-}
-
-/* 
- *---------------------------------------------------------------------------
- *  H
- *  C
- *  L
- *  P
- *  max of icon/text/image/button
- *  P
- *  L
- *  C
- *  H
- *
- * |H|C|L|P| icon |P| text/image |P|L|B| button |B|C|H|
- * 
- * H = highlight thickness
- * C = combobutton borderwidth
- * L = label borderwidth
- * P = pad
- * I = icon
- * T = text or image
- *---------------------------------------------------------------------------
- */
-static void
-ComputeGeometry(ComboButton *comboPtr)
-{
-    int width, height;
-
-    /* Determine the height of the button.  It's the maximum height of all
-     * it's components: icon, label, and button. */
-    comboPtr->iconWidth = comboPtr->iconHeight = 0;
-    comboPtr->entryWidth = comboPtr->entryHeight = 0;
-    comboPtr->textWidth = comboPtr->textHeight = 0;
-    comboPtr->indWidth = comboPtr->indHeight = 0;
-    comboPtr->inset = comboPtr->indWidth + comboPtr->highlightWidth;
-    if (comboPtr->icon != NULL) {
-	comboPtr->iconWidth  = IconWidth(comboPtr->icon);
-	comboPtr->iconHeight = IconHeight(comboPtr->icon);
-    }
-    comboPtr->entryWidth += comboPtr->iconWidth;
-    if (comboPtr->entryHeight < comboPtr->iconHeight) {
-	comboPtr->entryHeight = comboPtr->iconHeight;
-    }
-    if (comboPtr->image != NULL) {
-	comboPtr->textWidth  = IconWidth(comboPtr->image);
-	comboPtr->textHeight = IconHeight(comboPtr->image);
-    } else if (comboPtr->text != NULL) {
-	unsigned int w, h;
-
-	if (comboPtr->text[0] == '\0') {
-	    Blt_FontMetrics fm;
-
-	    Blt_GetFontMetrics(comboPtr->font, &fm);
-	    comboPtr->textHeight = fm.linespace;
-	} else {
-	    fprintf(stderr, "combo text = %s\n", comboPtr->text);
-	    Blt_GetTextExtents(comboPtr->font, 0, comboPtr->text, 
-			       comboPtr->textLen, &w, &h);
-	    comboPtr->textWidth  = w + 2 * IPAD;
-	    comboPtr->textHeight = h;
-	}
-    }
-    comboPtr->entryWidth += comboPtr->textWidth + IPAD;
-    if (comboPtr->iconWidth == 0) {
-	comboPtr->entryWidth += IPAD;
-    }
-    if (comboPtr->entryHeight < comboPtr->textHeight) {
-	comboPtr->entryHeight = comboPtr->textHeight;
-    }
-    if (comboPtr->flags & ARROW_ON) {
-	comboPtr->indWidth  = ARROW_WIDTH  + 2 * comboPtr->indBW;
-	comboPtr->indHeight = ARROW_HEIGHT + 2 * comboPtr->indBW;
-	if (comboPtr->indHeight > comboPtr->entryHeight) {
-	    comboPtr->entryHeight = comboPtr->indHeight;
-	}
-    }
-    comboPtr->entryHeight += 2 * YPAD;
-    comboPtr->entryWidth += 2 * XPAD;
-    comboPtr->width = comboPtr->entryWidth + comboPtr->indWidth + 
-	2 * comboPtr->inset;
-    comboPtr->height = comboPtr->entryHeight + 2 * comboPtr->inset;
-    if (comboPtr->flags & ARROW_ON) {
-	comboPtr->width += comboPtr->borderWidth;
-    }
-    width = (comboPtr->reqWidth > 0) ? comboPtr->reqWidth : comboPtr->width;
-    height = (comboPtr->reqHeight > 0) ? comboPtr->reqHeight : comboPtr->height;
-    if ((width != Tk_ReqWidth(comboPtr->tkwin)) ||
-	(height != Tk_ReqHeight(comboPtr->tkwin))) {
-	Tk_GeometryRequest(comboPtr->tkwin, width, height);
-    }
-    comboPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static int
-ConfigureComboButton(
-    Tcl_Interp *interp,
-    ComboButton *comboPtr,
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC newGC;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, configSpecs, objc, 
-		objv, (char *)comboPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    gcMask = GCForeground | GCFont;
-    gcValues.font = Blt_FontId(comboPtr->font);
-    /* Text GCs. */
-    gcValues.foreground = comboPtr->textNormalColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textNormalGC);
-    }
-    comboPtr->textNormalGC = newGC;
-
-    gcValues.foreground = comboPtr->textActiveColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textActiveGC);
-    }
-    comboPtr->textActiveGC = newGC;
-
-    gcValues.foreground = comboPtr->textPostedColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textPostedGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textPostedGC);
-    }
-    comboPtr->textPostedGC = newGC;
-
-    gcValues.foreground = comboPtr->textDisabledColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textDisabledGC);
-    }
-    comboPtr->textDisabledGC = newGC;
-
-    /* Focus highlight GCs */
-    gcMask = GCForeground;
-    gcValues.foreground = comboPtr->highlightColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->highlightGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightGC);
-    }
-    comboPtr->highlightGC = newGC;
-    if (comboPtr->highlightBgColor != NULL) {
-	gcValues.foreground = comboPtr->highlightBgColor->pixel;
-	newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    } else {
-	newGC = NULL;
-    }
-    if (comboPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightBgGC);
-    }
-    comboPtr->highlightBgGC = newGC;
-    ComputeGeometry(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Activates
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb activate bool
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(ComboButton *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    int bool;
-
-    if (comboPtr->flags & (STATE_POSTED|STATE_DISABLED)) {
-	return TCL_OK;			/* Writing is currently disabled. */
-    }
-    if (Tcl_GetBooleanFromObj(interp, objv[2], &bool) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags &= ~STATE_ACTIVE;
-    if (bool) {
-	comboPtr->flags |= STATE_ACTIVE;
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb cget option
- *
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(ComboButton *comboPtr, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, configSpecs,
-	(char *)comboPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm configure ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(ComboButton *comboPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    int result;
-
-    iconOption.clientData = comboPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, configSpecs, 
-		(char *)comboPtr, (Tcl_Obj *)NULL,  BLT_CONFIG_OBJV_ONLY);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, configSpecs, 
-		(char *)comboPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-    }
-    Tcl_Preserve(comboPtr);
-    result = ConfigureComboButton(interp, comboPtr, objc - 2, objv + 2, 
-		BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(comboPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .cb invoke item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InvokeOp(ComboButton *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    int result;
-
-    if (comboPtr->flags & STATE_DISABLED) {
-	return TCL_OK;			/* Item is currently disabled. */
-    }
-    result = TCL_OK;
-    if (comboPtr->cmdObjPtr != NULL) {
-	Tcl_Preserve(comboPtr);
-	Tcl_IncrRefCount(comboPtr->cmdObjPtr);
-	result = Tcl_EvalObjEx(interp, comboPtr->cmdObjPtr, TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->cmdObjPtr);
-	Tcl_Release(comboPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostOp --
- *
- *	Posts the menu associated with this widget.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .ce post 
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostOp(ComboButton *comboPtr, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    char *menuName;
-    Tk_Window menuWin;
-    
-    if (comboPtr->flags & (STATE_POSTED|STATE_DISABLED)) {
-	return TCL_OK;			/* Button's menu is currently posted
-					 * or entry is disabled. */
-    }
-    if (comboPtr->menuObjPtr == NULL) {
-	return TCL_OK;
-    }
-    menuName = Tcl_GetString(comboPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	Tcl_AppendResult(interp, "can't post \"", Tk_PathName(menuWin), 
-		"\": it isn't a descendant of ", Tk_PathName(comboPtr->tkwin),
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (comboPtr->postCmdObjPtr) {
-	int result;
-
-	Tcl_Preserve(comboPtr);
-	Tcl_IncrRefCount(comboPtr->postCmdObjPtr);
-	result = Tcl_EvalObjEx(interp, comboPtr->postCmdObjPtr,TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->postCmdObjPtr);
-	Tcl_Release(comboPtr);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (Tk_IsMapped(comboPtr->tkwin)) {
-	Tcl_Obj *cmd[5];
-	int result;
-	int rootX, rootY;
-
-	Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-	cmd[0] = comboPtr->menuObjPtr;
-	cmd[1] = Tcl_NewStringObj("post", 4);
-	cmd[2] = Tcl_NewIntObj(rootX);
-	cmd[3] = Tcl_NewIntObj(rootY + Tk_Height(comboPtr->tkwin));
-	cmd[4] = Tcl_NewStringObj("left", 4);
-	Tcl_Preserve(comboPtr);
-	result = Blt_GlobalEvalObjv(interp, 5, cmd);
-	Tcl_Release(comboPtr);
-	if (result == TCL_OK) {
-	    comboPtr->flags &= ~STATE_MASK;
-	    comboPtr->flags |= STATE_POSTED;
-	}
-	EventuallyRedraw(comboPtr);
-	return result;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .ce unpost
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostOp(
-    ComboButton *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-#ifdef notdef
-    fprintf(stderr, "UnpostOp\n");
-    fprintf(stderr, "menuObjPtr=%x\n", comboPtr->menuObjPtr);
-    fprintf(stderr, "flags=Posted%d,Disabled%d\n", 
-	    comboPtr->flags & STATE_POSTED, comboPtr->flags & STATE_DISABLED);
-#endif
-    if ((comboPtr->menuObjPtr != NULL) && (comboPtr->flags & STATE_POSTED)) {
-	char *menuName;
-	Tk_Window menuWin;
-
-	comboPtr->flags &= ~STATE_MASK;
-	comboPtr->flags |= STATE_NORMAL;
-	menuName = Tcl_GetString(comboPtr->menuObjPtr);
-	menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-	if (menuWin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	    Tcl_AppendResult(interp, "can't unpost \"", Tk_PathName(menuWin), 
-			"\": it isn't a descendant of ", 
-			Tk_PathName(comboPtr->tkwin), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Tk_IsMapped(menuWin)) {
-	    Tk_UnmapWindow(menuWin);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyComboButton --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyComboButton(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    ComboButton *comboPtr = (ComboButton *)dataPtr;
-
-    iconOption.clientData = comboPtr;
-    Blt_FreeOptions(configSpecs, (char *)comboPtr, comboPtr->display, 0);
-    if (comboPtr->textNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textNormalGC);
-    }
-    if (comboPtr->textActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textActiveGC);
-    }
-    if (comboPtr->textDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textDisabledGC);
-    }
-    if (comboPtr->textPostedGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textPostedGC);
-    }
-    if (comboPtr->highlightGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightGC);
-    }
-    if (comboPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightBgGC);
-    }
-    Tcl_DeleteCommandFromToken(comboPtr->interp, comboPtr->cmdToken);
-    Blt_Free(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewComboButton --
- *
- *---------------------------------------------------------------------------
- */
-static ComboButton *
-NewComboButton(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    ComboButton *comboPtr;
-
-    comboPtr = Blt_AssertCalloc(1, sizeof(ComboButton));
-
-    comboPtr->borderWidth = 1;
-    comboPtr->display = Tk_Display(tkwin);
-    comboPtr->flags = (LAYOUT_PENDING | STATE_NORMAL);
-    comboPtr->highlightWidth = 2;
-    comboPtr->indBW = 2;
-    comboPtr->indRelief = TK_RELIEF_FLAT;
-    comboPtr->interp = interp;
-    comboPtr->menuAnchor = TK_ANCHOR_SW;
-    comboPtr->relief = TK_RELIEF_RAISED;
-    comboPtr->postedRelief = TK_RELIEF_FLAT;
-    comboPtr->activeRelief = TK_RELIEF_RAISED;
-    comboPtr->text = emptyString;
-    comboPtr->textLen = 0;
-    comboPtr->tkwin = tkwin;
-    comboPtr->underline = -1;
-    return comboPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboButtonCmd --
- *
- * 	This procedure is invoked to process the "combobutton" command.  See
- * 	the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec comboButtonOps[] =
-{
-    {"activate",  1, ActivateOp,  3, 3, "bool",},
-    {"cget",      2, CgetOp,      3, 3, "option",},
-    {"configure", 2, ConfigureOp, 2, 0, "?option value?...",},
-    {"invoke",    1, InvokeOp,    2, 2, "",},
-    {"post",      1, PostOp,      2, 2, "",},
-    {"unpost",    1, UnpostOp,    2, 2, "",},
-};
-
-static int nComboButtonOps = sizeof(comboButtonOps) / sizeof(Blt_OpSpec);
-
-typedef int (ComboInstOp)(ComboButton *comboPtr, Tcl_Interp *interp, int objc,
-	Tcl_Obj *const *objv);
-
-static int
-ComboButtonInstCmdProc(
-    ClientData clientData,		/* Information about the widget. */
-    Tcl_Interp *interp,			/* Interpreter to report errors. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument vector. */
-{
-    ComboInstOp *proc;
-    ComboButton *comboPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nComboButtonOps, comboButtonOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(comboPtr);
-    result = (*proc) (comboPtr, interp, objc, objv);
-    Tcl_Release(comboPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboButtonInstCmdDeletedProc --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboButtonInstCmdDeletedProc(ClientData clientData)
-{
-    ComboButton *comboPtr = clientData; /* Pointer to widget record. */
-
-    if (comboPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = comboPtr->tkwin;
-	comboPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboButtonCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ComboButtonCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    ComboButton *comboPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tk_Window tkwin;
-    char *path;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, set up procs and initialize various
-     * bindings for the widget.  If the proc doesn't already exist, source it
-     * from "$blt_library/comboentry.tcl".  We've deferred sourcing this file
-     * until now so that the user could reset the variable $blt_library from
-     * within her script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::ComboButton::PostMenu", &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library combobutton.tcl]";
-
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    comboPtr = NewComboButton(interp, tkwin);
-#define EVENT_MASK	(ExposureMask|StructureNotifyMask|FocusChangeMask)
-    Tk_CreateEventHandler(tkwin, EVENT_MASK, ComboButtonEventProc, comboPtr);
-    Tk_SetClass(tkwin, "ComboButton");
-    comboPtr->cmdToken = Tcl_CreateObjCommand(interp, path, 
-	ComboButtonInstCmdProc, comboPtr, ComboButtonInstCmdDeletedProc);
-    Blt_SetWindowInstanceData(tkwin, comboPtr);
-    if (ConfigureComboButton(interp, comboPtr, objc-2, objv+2, 0) != TCL_OK) {
-	Tk_DestroyWindow(comboPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-int
-Blt_ComboButtonInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "combobutton", ComboButtonCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawLabel --
- *
- * 	Draws the text associated with the label.  This is used when the
- * 	widget acts like a standard label.
- *
- * Results:
- *	Nothing.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawLabel(ComboButton *comboPtr, Drawable drawable, int x, int y, int w, int h) 
-{
-    if (comboPtr->image != NULL) {
-	int imgWidth, imgHeight;
-		
-	imgWidth = MIN(w, comboPtr->textWidth) - IPAD;
-	imgHeight = MIN(h, comboPtr->textHeight);
-	Tk_RedrawImage(IconImage(comboPtr->image), 0, 0, imgWidth, imgHeight, 
-		drawable, x + IPAD, y);
-    } else {
-	TextStyle ts;
-	TextLayout *layoutPtr;
-	GC gc;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, comboPtr->font);
-	Blt_Ts_SetAnchor(ts, TK_ANCHOR_NW);
-	Blt_Ts_SetJustify(ts, comboPtr->justify);
-	Blt_Ts_SetUnderline(ts, comboPtr->underline);
-	layoutPtr = Blt_Ts_CreateLayout(comboPtr->text, comboPtr->textLen, &ts);
-	if (comboPtr->flags & STATE_POSTED) {
-	    gc = comboPtr->textPostedGC;
-	} else if (comboPtr->flags & STATE_ACTIVE) {
-	    gc = comboPtr->textActiveGC;
-	} else if (comboPtr->flags & STATE_DISABLED) {
-	    gc = comboPtr->textDisabledGC;
-	} else {
-	    gc = comboPtr->textNormalGC;
-	}
-	Blt_DrawLayout(comboPtr->tkwin, drawable, gc, comboPtr->font, 
-		Tk_Depth(comboPtr->tkwin), 0.0f, x + IPAD, y, layoutPtr, w);
-	Blt_Free(layoutPtr);
-    }
-}
-
-static void
-DrawComboButton(ComboButton *comboPtr, Drawable drawable)
-{
-    Blt_Background bg;
-    int x, y;
-    int w, h;
-    int relief;
-
-    /* ComboButton background (just inside of focus highlight ring). */
-
-    if (comboPtr->flags & STATE_POSTED) {
-	bg = comboPtr->postedBg;
-    } else if (comboPtr->flags & STATE_ACTIVE) {
-	bg = comboPtr->activeBg;
-    } else if (comboPtr->flags & STATE_DISABLED) {
-	bg = comboPtr->disabledBg;
-    } else {
-	bg = comboPtr->normalBg;
-    }
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, 0, 0,
-	Tk_Width(comboPtr->tkwin), Tk_Height(comboPtr->tkwin),
-	comboPtr->borderWidth, TK_RELIEF_FLAT);
-
-    x = y = comboPtr->inset;
-    w  = Tk_Width(comboPtr->tkwin)  - (2 * comboPtr->inset);
-    h = Tk_Height(comboPtr->tkwin) - (2 * comboPtr->inset);
-
-    /* Label: includes icon and text. */
-    if (h > comboPtr->entryHeight) {
-	y += (h - comboPtr->entryHeight) / 2;
-    }
-    x += XPAD;
-    /* Draw Icon. */
-    if (comboPtr->icon != NULL) {
-	int ix, iy, iw, ih;
-	
-	ix = x;
-	iy = y;
-	if (comboPtr->iconHeight < comboPtr->entryHeight) {
-	    iy += (comboPtr->entryHeight - comboPtr->iconHeight) / 2;
-	}
-	iw = MIN(w, comboPtr->iconWidth);
-	ih = MIN(h, comboPtr->iconHeight);
-	Tk_RedrawImage(IconImage(comboPtr->icon), 0, 0, iw, ih,drawable, ix,iy);
-	x += comboPtr->iconWidth + IPAD;
-	w -= comboPtr->iconWidth + IPAD;
-    }
-    if ((w > 0) && (h > 0)) {
-	int tx, ty, tw, th;
-	
-	tx = x + IPAD;
-	ty = y;
-	if (comboPtr->entryHeight > comboPtr->textHeight) {
-	    ty += (comboPtr->entryHeight - comboPtr->textHeight) / 2;
-	}
-	tw = MIN(w, comboPtr->textWidth);
-	th = MIN(h, comboPtr->textHeight);
-	DrawLabel(comboPtr, drawable, tx, ty, tw, th);
-    }
-    /* Arrow button. */
-    if (comboPtr->flags & ARROW_ON) {
-	XColor *color;
-
-	x = Tk_Width(comboPtr->tkwin) - (comboPtr->inset + comboPtr->indWidth);
-	y = comboPtr->inset;
-	if (h > comboPtr->entryHeight) {
-	    y += (h - comboPtr->entryHeight) / 2;
-	}
-	if (x < 0) {
-	    x = comboPtr->inset;
-	}
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, 
-	    comboPtr->indWidth, comboPtr->entryHeight, comboPtr->indBW,
-            comboPtr->indRelief);
-	if (comboPtr->flags & STATE_POSTED) {
-	    color = comboPtr->textPostedColor;
-	} else if (comboPtr->flags & STATE_ACTIVE) {
-	    color = comboPtr->textActiveColor;
-	} else if (comboPtr->flags & STATE_DISABLED) {
-	    color = comboPtr->textDisabledColor;
-	} else {
-	    color = comboPtr->textNormalColor;
-	}
-	Blt_DrawArrow(comboPtr->display, drawable, color, x, y, 
-		comboPtr->indWidth, comboPtr->entryHeight,
-		comboPtr->indBW, ARROW_DOWN);
-    }
-    /* Draw focus highlight ring. */
-    if (comboPtr->highlightWidth > 0) {
-	if (comboPtr->flags & FOCUS) {
-	    Tk_DrawFocusHighlight(comboPtr->tkwin, comboPtr->highlightGC, 
-		comboPtr->highlightWidth, drawable);
-	} else {
-	    Blt_Background hiliteBg;
-
-	    if (comboPtr->flags & STATE_POSTED) {
-		hiliteBg = comboPtr->postedBg;
-	    } else if (comboPtr->flags & STATE_DISABLED) {
-		hiliteBg = comboPtr->disabledBg;
-	    } else {
-		hiliteBg = comboPtr->normalBg;
-	    }
-	    Blt_DrawFocusBackground(comboPtr->tkwin, hiliteBg,
-		comboPtr->highlightWidth, drawable);
-	}	    
-    }
-    if (comboPtr->flags & STATE_POSTED) {
-	relief = comboPtr->postedRelief;
-    } else if (comboPtr->flags & STATE_ACTIVE) {
-	relief = comboPtr->activeRelief;
-    } else {
-	relief = comboPtr->relief;
-    }
-    if (relief != TK_RELIEF_FLAT) {
-	Blt_DrawBackgroundRectangle(comboPtr->tkwin, drawable, bg, 
-		comboPtr->highlightWidth, comboPtr->highlightWidth,
-		Tk_Width(comboPtr->tkwin)  - 2 * comboPtr->highlightWidth,
-		Tk_Height(comboPtr->tkwin) - 2 * comboPtr->highlightWidth,
-		comboPtr->borderWidth, relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayComboButton --
- *
- *	This procedure is invoked to display a combobutton widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the button.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayComboButton(ClientData clientData)
-{
-    ComboButton *comboPtr = clientData;
-    Pixmap drawable;
-    int ww, wh;				/* Window width and height. */
-
-    comboPtr->flags &= ~REDRAW_PENDING;
-    if (comboPtr->tkwin == NULL) {
-	return;				/* Window destroyed (should not get
-					 * here) */
-    }
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayComboButton(%s)\n", 
-	    Tk_PathName(comboPtr->tkwin));
-#endif
-    ww = Tk_Width(comboPtr->tkwin);
-    wh = Tk_Height(comboPtr->tkwin);
-    if ((ww <= 1) || (wh <=1)) {
-	/* Don't bother computing the layout until the window size is
-	 * something reasonable. */
-	return;
-    }
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeGeometry(comboPtr);
-    }
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	/* The widget's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the combobutton's new layout.  */
-	return;
-    }
-
-    /*
-     * Create a pixmap the size of the window for double buffering.
-     */
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-		ww, wh, Tk_Depth(comboPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    DrawComboButton(comboPtr, drawable);
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin),
-	comboPtr->textNormalGC, 0, 0, ww, wh, 0, 0);
-    Tk_FreePixmap(comboPtr->display, drawable);
-}
diff --git a/blt3.0/src/bltComboEntry.c b/blt3.0/src/bltComboEntry.c
deleted file mode 100644
index 1db7483..0000000
--- a/blt3.0/src/bltComboEntry.c
+++ /dev/null
@@ -1,4041 +0,0 @@
-
-/*
- * bltComboEntry.c --
- *
- * This module implements a comboentry widget for the BLT toolkit.
- *
- *	Copyright 2006 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltImage.h"
-#include "bltHash.h"
-#include "bltBgStyle.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-static const char emptyString[] = "";
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-#define IPAD		4		/* Internal pad between components. */
-#define YPAD		0		/* Internal pad between components. */
-#define ICWIDTH		2		/* External pad between border and
-					 * button. */
-#define ARROW_WIDTH	13
-#define ARROW_HEIGHT	13
-
-#define EVENT_MASK	 (ExposureMask|StructureNotifyMask|FocusChangeMask)
-#define CHILD_EVENT_MASK (ExposureMask|StructureNotifyMask)
-
-#define REDRAW_PENDING   (1<<0)		/* Widget is scheduled to be
-					 * redrawn. */
-#define LAYOUT_PENDING   (1<<1)		/* Widget layout needs to be
-					 * recomputed. */
-#define ICURSOR		 (1<<2)		/* Insertion cursor is active. */
-#define SCROLL_PENDING   (1<<3)		/* Widget needs to be scrolled. */
-#define FOCUS		 (1<<4)		/* Widget has focus. */
-#define SELECT		 (1<<5)		/* Widget is scheduled to invoke a
-					 * command triggered by a change in
-					 * it's * selection. */
-#define INVOKE_PENDING  (1<<6)		/* Widget is scheduled to invoke a
-					 * command triggered by a change in
-					 * it's * selection. */
-#define CIPHER		 (1<<7)		/* Don't show the real text on the
-					 * screen. */
-#define READONLY	 (1<<8)		/* Widget's text cannot be changed. */
-#define ACTIVE		 (1<<9)		/* Arrow is currently active. */
-
-#define NORMAL		 (1<<10)	/* Draw widget normally. */
-#define DISABLED	 (1<<11)	/* Widget is disabled. */
-#define POSTED		 (1<<12)
-#define STATE_MASK	 ((DISABLED)|(NORMAL)|(POSTED))
-
-#define ICURSOR_ON	 (1<<13)	/* Insertion cursor is currently
-					 * visible on screen. */
-#define ARROW		 (1<<14)
-#define EXPORT_SELECTION (1<<15)
-#define IGNORE_VAR	 (1<<16)
-
-#define TEXT_VAR_TRACED	 (1<<17)
-#define ICON_VAR_TRACED	 (1<<18)
-
-#define TRACE_VAR_FLAGS (TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS)
-
-#define DEF_ARROW_ACTIVE_BG	STD_ACTIVE_BACKGROUND
-#define DEF_ARROW_ACTIVE_FG	STD_ACTIVE_FOREGROUND
-#define DEF_BORDERWIDTH		"0"
-#define DEF_ARROW		"1"
-#define DEF_ARROW_BORDERWIDTH	"2"
-#define DEF_ARROW_PAD		"0"
-#define DEF_ARROW_RELIEF	"raised"
-#define DEF_CIPHER		"0"
-#define DEF_CMD			((char *)NULL)
-#define DEF_CURSOR		((char *)NULL)
-#define DEF_DISABLED_BG		STD_DISABLED_BACKGROUND
-#define DEF_DISABLED_FG		STD_DISABLED_FOREGROUND
-#define DEF_EXPORT_SELECTION	"0"
-#define DEF_FONT		STD_FONT_SMALL
-#define DEF_HEIGHT		"0"
-#define DEF_HIGHLIGHT_BG_COLOR  ((char *)NULL)
-#define DEF_HIGHLIGHT_COLOR     "black"
-#define DEF_HIGHLIGHT_WIDTH	"2"
-#define DEF_ICON		((char *)NULL)
-#define DEF_ICON_VARIABLE	((char *)NULL)
-#define DEF_IMAGE		((char *)NULL)
-#define DEF_INSERT_COLOR	STD_NORMAL_FOREGROUND
-#define DEF_INSERT_OFFTIME	"300"
-#define DEF_INSERT_ONTIME	"600"
-#define DEF_JUSTIFY		"left"
-#define DEF_MENU		((char *)NULL)
-#define DEF_MENU_ANCHOR		"sw"
-#define DEF_NORMAL_BG		STD_NORMAL_BACKGROUND
-#define DEF_NORMAL_FG		STD_NORMAL_FOREGROUND
-#define DEF_EDITABLE		"1"
-#define DEF_RELIEF		"sunken"
-#define DEF_SCROLL_CMD		((char *)NULL)
-#define DEF_SCROLL_INCR		"2"
-#define DEF_SELECT_BORDERWIDTH	"0"
-#define DEF_SELECT_CMD		((char *)NULL)
-#define DEF_SELECT_FG		RGB_WHITE
-#define DEF_SELECT_BG		RGB_SKYBLUE4
-#define DEF_SELECT_RELIEF	"flat"
-#define DEF_STATE		"normal"
-#define DEF_TAKE_FOCUS		"1"
-#define DEF_TEXT		(char *)NULL
-#define DEF_TEXT_FOCUS_BG	RGB_WHITE
-#define DEF_TEXT_FOCUS_FG	RGB_BLACK
-#define DEF_TEXT_NORMAL_BG	RGB_WHITE
-#define DEF_TEXT_NORMAL_FG	RGB_BLACK
-#define DEF_TEXT_VARIABLE	((char *)NULL)
-#define DEF_UNDERLINE		"-1"
-#define DEF_WIDTH		"0"
-
-static Tcl_VarTraceProc TextVarTraceProc;
-static Tcl_VarTraceProc IconVarTraceProc;
-
-static Blt_OptionFreeProc FreeTextProc;
-static Blt_OptionParseProc ObjToTextProc;
-static Blt_OptionPrintProc TextToObjProc;
-static Blt_CustomOption textOption = {
-    ObjToTextProc, TextToObjProc, FreeTextProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeIconProc;
-static Blt_OptionParseProc ObjToIconProc;
-static Blt_OptionPrintProc IconToObjProc;
-static Blt_CustomOption iconOption = {
-    ObjToIconProc, IconToObjProc, FreeIconProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeTextVarProc;
-static Blt_OptionParseProc ObjToTextVarProc;
-static Blt_OptionPrintProc TextVarToObjProc;
-static Blt_CustomOption textVarOption = {
-    ObjToTextVarProc, TextVarToObjProc, FreeTextVarProc, (ClientData)0
-};
-static Blt_OptionFreeProc FreeIconVarProc;
-static Blt_OptionParseProc ObjToIconVarProc;
-static Blt_OptionPrintProc IconVarToObjProc;
-static Blt_CustomOption iconVarOption = {
-    ObjToIconVarProc, IconVarToObjProc, FreeIconVarProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToStateProc;
-static Blt_OptionPrintProc StateToObjProc;
-static Blt_CustomOption stateOption = {
-    ObjToStateProc, StateToObjProc, NULL, (ClientData)0
-};
-
-/*
- * Icon --
- *
- *	Since instances of the same Tk image can be displayed in different
- *	windows with possibly different color palettes, Tk internally stores
- *	each instance in a linked list.  But if the instances are used in the
- *	same widget and therefore use the same color palette, this adds a lot
- *	of overhead, especially when deleting instances from the linked list.
- *
- *	For the comboentry widget, we never need more than a single instance
- *	of an image, regardless of how many times it's used.  Cache the image,
- *	maintaining a reference count for each image used in the widget.  It's
- *	likely that the comboview widget will use many instances of the same
- *	image.
- */
-
-typedef struct Icon {
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    short int width, height;		/* Dimensions of the cached image. */
-} *Icon;
-
-#define IconHeight(i)	((i)->height)
-#define IconWidth(i)	((i)->width)
-#define IconImage(i)	((i)->tkImage)
-#define IconName(i)	(Blt_Image_Name((i)->tkImage))
-
-#define INSERT_OP	1
-#define DELETE_OP	2
-
-typedef struct _EditRecord {
-    struct _EditRecord *nextPtr;
-    short int type;
-    short int insertOffset;
-    short int offset;
-    short int textLen;
-    char text[1];
-} EditRecord;
-
-typedef struct  {
-    Tcl_Interp *interp;			/* Interpreter associated with
-					 * entry. */
-    Tk_Window tkwin;			/* Window that embodies the
-					 * comboentry. If NULL, indicates the
-					 * window has been destroyed but the
-					 * data structures haven't yet been
-					 * cleaned up.*/
-    Display *display;			/* Display containing widget.  Used,
-					 * among other things, so that
-					 * resources can be freed even after
-					 * tkwin has gone away. */
-    Tcl_Command cmdToken;		/* Token for comboentry's widget
-					 * command. */
-    Tk_Cursor cursor;			/* Current cursor for window or
-					 * None. */
-    int reqWidth, reqHeight;     
-    int relief;
-    int borderWidth;
-
-    Blt_Background inFocusBg;
-    Blt_Background outFocusBg;
-    Blt_Background normalBg;
-    Blt_Background activeBg;
-    Blt_Background disabledBg;
-
-    XColor *normalColor;
-    XColor *activeColor;
-    XColor *disabledColor;
-
-    Tcl_Obj *takeFocusObjPtr;		/* Value of -takefocus option; not
-					 * used in the C code, but used by
-					 * keyboard traversal scripts. */
-
-    /*
-     * Selection Information:
-     *
-     * The selection is the rectangle that contains selected text.  It is
-     * displayed as a solid colored entry with optionally a 3D border.
-     */
-    int selAnchor;			/* Fixed end of selection. Used to
-					 * extend the selection while
-					 * maintaining the * other end of the
-					 * selection. */
-    short int selFirst;			/* Byte offset of the 1st character in
-					 * the selection. */
-    short int selLast;			/* Byte offset of the last character
-					 * in the selection. */
-    int selRelief;			/* Relief of selected items. Currently
-					 * is always raised. */
-    int selBW;				/* Border width of a selected text.*/
-    XColor *selFgColor;			/* Text color of a selected text. */
-    GC selectGC;
-    Tcl_Obj *selCmdObjPtr;
-
-    Blt_Background selectBg;
-
-    /*
-     * Scanning Information:
-     */
-    int scanAnchor;			/* Scan anchor in screen
-					 * coordinates. */
-    int scanX;				/* x-offset of the start of the scan
-					 * in world coordinates.*/
-
-    /*
-     * Scrolling Information:
-     */
-    Tcl_Obj *scrollCmdObjPtr;		/* Command prefix for communicating
-					 * with scrollbars.  If NULL,
-					 * indicates no command to issue. */
-    int scrollUnits;			/* # of pixels per scroll unit. */
-    int scrollX;			/* x-offset of the start of visible
-					 * text in the viewport. */
-    int viewWidth;			/* Width of the viewport. */
-    
-    /*
-     * In/Out Focus Highlight Ring:
-     */
-    XColor *highlightColor;
-    XColor *highlightBgColor;
-    GC highlightBgGC;
-    GC highlightGC;
-    int highlightWidth;
-
-    /* 
-     * Entry entry:
-     *
-     * The entry contains optionally an icon and a text string. The rectangle
-     * surrounding an entry may have a 3D border.
-     */
-    Icon icon;				/* If non-NULL, image to be displayed
-					 * in entry. Its value may be
-					 * overridden by the -iconvariable
-					 * option. */
-    Tcl_Obj *iconVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable contains the name of
-					 * an image representing the icon.
-					 * This overrides the value of the
-					 * above field. */
-    Icon image;				/* If non-NULL, image to be displayed
-					 * instead of text in the entry. */
-    char *text;				/* Text string to be displayed in the
-					 * entry if an image has no been
-					 * designated. Its value is overridden
-					 * by the -textvariable option. */
-    char *screenText;			/* Text string to be displayed in the
-					 * entry if an image has no been
-					 * designated. Its value is overridden
-					 * by the -textvariable option. */
-    Tcl_Obj *textVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable contains the text
-					 * string to * be displayed in the
-					 * entry. This overrides the above
-					 * field. */
-    Blt_Font font;			/* Font of text to be display in
-					 * entry. */
-    XColor *textInFocusColor;
-    XColor *textOutFocusColor;
-    GC textInFocusGC;
-    GC textOutFocusGC;
-    int textLen;			/* # bytes of text. */
-    /*  
-     * Arrow Information:
-     */
-    int arrowBW;
-    int arrowRelief;
-    int arrowPad;
-
-    /*
-     * Insertion cursor information:
-     */
-    XColor *insertColor;		/* Color used to draw vertical bar for
-					 * insertion cursor. */
-    int insertOffTime;			/* Time in milliseconds cursor should
-					 * spend in "off" state for each
-					 * blink. */
-    int insertOnTime;			/* Time in milliseconds cursor should
-					 * spend in "off" state for each
-					 * blink. */
-    Tcl_TimerToken insertTimerToken;	/* Handle for a timer event called
-					 * periodically to blink the insertion
-					 * cursor. */
-
-    int insertWidth;			/* Total width of insert cursor. */
-    int insertOffset;			/* Byte offset of insertion cursor in
-					 * the text string. */
-    GC insertGC;
-    int prefTextWidth;			/* Desired width of text, measured in
-					 * average characters. */
-    int prefIconWidth;			/* Desired width of icon, measured in
-					 * pixels. */
-    int inset;
-    short int arrowWidth, arrowHeight;
-    short int iconWidth, iconHeight;
-    short int entryWidth, entryHeight;
-    short int textWidth, textHeight;
-    short int width, height;
-
-
-    short int firstOffset, lastOffset;	/* Byte offset of first and last
-					 * characters visible in viewport. */
-    int firstX, lastX;			/* x-coordinates of first and last
-					 * characters visible in viewport. */ 
-    Tcl_Obj *cmdObjPtr;			/* If non-NULL, command to be executed
-					 * when this menu is posted. */
-    Tcl_Obj *menuObjPtr;	
-    Tk_Window menuWin;
-    Tcl_Obj *postCmdObjPtr;		/* If non-NULL, command to be executed
-					 * when this menu is posted. */
-    int menuAnchor;
-    unsigned int flags;
-    EditRecord *undoPtr, *redoPtr;
-
-} ComboEntry;
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"ActiveBackground", DEF_ARROW_ACTIVE_BG, 
-	Blt_Offset(ComboEntry, activeBg),0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_ARROW_ACTIVE_FG, 
-	Blt_Offset(ComboEntry, activeColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-arrowborderwidth", "arrowBorderWidth", 
-        "ArrowBorderWidth", DEF_ARROW_BORDERWIDTH, 
-	Blt_Offset(ComboEntry, arrowBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-arrowpad", "arrowPad", "ArrowPad", 
-	DEF_ARROW_PAD, Blt_Offset(ComboEntry, arrowPad), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-arrowrelief", "arrowRelief","ArrowRelief",
-	DEF_ARROW_RELIEF, Blt_Offset(ComboEntry, arrowRelief), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background", 
-	DEF_NORMAL_BG, Blt_Offset(ComboEntry, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, Blt_Offset(ComboEntry, borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-cipher", "cipher", "Cipher", DEF_CIPHER, 
-	Blt_Offset(ComboEntry, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-	(Blt_CustomOption *)CIPHER},
-    {BLT_CONFIG_OBJ, "-command", "command", "Command", 
-	DEF_CMD, Blt_Offset(ComboEntry, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CURSOR, Blt_Offset(ComboEntry, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-disabledbackground", "disabledBackground", 
-	"DisabledBackground", DEF_DISABLED_BG, 
-	Blt_Offset(ComboEntry, disabledBg), 0},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_DISABLED_FG, 
-	Blt_Offset(ComboEntry, disabledColor), 0},
-    {BLT_CONFIG_BITMASK, "-exportselection", "exportSelection", 
-        "ExportSelection", DEF_EXPORT_SELECTION, Blt_Offset(ComboEntry, flags),
-        BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)EXPORT_SELECTION},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_FONT, 
-	Blt_Offset(ComboEntry, font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", 
-	DEF_NORMAL_FG, Blt_Offset(ComboEntry, normalColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(ComboEntry, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK_INVERT, "-hidearrow", "hideArrow", "HideArrow", 
-	DEF_ARROW, Blt_Offset(ComboEntry, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)ARROW},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground", 
-	"HighlightBackground", DEF_HIGHLIGHT_BG_COLOR, 
-	Blt_Offset(ComboEntry, highlightBgColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_HIGHLIGHT_COLOR, Blt_Offset(ComboEntry, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_HIGHLIGHT_WIDTH, 
-	Blt_Offset(ComboEntry, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", DEF_ICON, 
-	Blt_Offset(ComboEntry, icon), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_CUSTOM, "-iconvariable", "iconVariable", "IconVariable", 
-	DEF_TEXT_VARIABLE, Blt_Offset(ComboEntry, iconVarObjPtr), 
-        BLT_CONFIG_NULL_OK, &iconVarOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-iconwidth", "iconWidth", "IconWidth",
-	DEF_WIDTH, Blt_Offset(ComboEntry, prefIconWidth), 
-     BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", DEF_IMAGE, 
-	Blt_Offset(ComboEntry, image), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_COLOR, "-insertbackground", "insertBackground", 
-	"InsertBackground", DEF_INSERT_COLOR, 
-	Blt_Offset(ComboEntry, insertColor), 0},
-    {BLT_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime",
-	DEF_INSERT_OFFTIME, Blt_Offset(ComboEntry, insertOffTime), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime",
-	DEF_INSERT_ONTIME, Blt_Offset(ComboEntry, insertOnTime), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-menu", "menu", "Menu", DEF_MENU, 
-	Blt_Offset(ComboEntry, menuObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-menuanchor", "menuAnchor", "MenuAnchor", 
-	DEF_MENU_ANCHOR, Blt_Offset(ComboEntry, menuAnchor),BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-postcommand", "postCommand", "PostCommand", 
-	DEF_CMD, Blt_Offset(ComboEntry, postCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK_INVERT, "-editable", "editable", "Editable", 
-	DEF_EDITABLE, Blt_Offset(ComboEntry, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)READONLY},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_RELIEF, 
-	Blt_Offset(ComboEntry, relief), 0},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", DEF_SELECT_BG, Blt_Offset(ComboEntry, selectBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", 
-	"BorderWidth", DEF_SELECT_BORDERWIDTH, 
-	Blt_Offset(ComboEntry, selBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-selectcommand", "selectCommand", "SelectCommand",
-	DEF_SELECT_CMD, Blt_Offset(ComboEntry, selCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	DEF_SELECT_FG, Blt_Offset(ComboEntry, selFgColor), 0},
-    {BLT_CONFIG_RELIEF, "-selectrelief", "selectRelief", "Relief",
-	DEF_SELECT_RELIEF, Blt_Offset(ComboEntry, selRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_STATE, 
-	Blt_Offset(ComboEntry, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&stateOption},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus", DEF_TAKE_FOCUS, 
-	Blt_Offset(ComboEntry, takeFocusObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-text", "text", "Text", DEF_TEXT, 
-	Blt_Offset(ComboEntry, text), 0, &textOption},
-    {BLT_CONFIG_BACKGROUND, "-textbackground", "textBackground", "Background", 
-	DEF_TEXT_NORMAL_BG, Blt_Offset(ComboEntry, outFocusBg), 0},
-    {BLT_CONFIG_BACKGROUND, "-textfocusbackground", "textFocusBackground",
-	"FocusBackground", DEF_TEXT_FOCUS_BG, 
-	Blt_Offset(ComboEntry, inFocusBg), 0},
-    {BLT_CONFIG_COLOR, "-textfocusforeground", "textFocusForeground",
-	"focusForeground", DEF_TEXT_FOCUS_FG, 
-	Blt_Offset(ComboEntry, textInFocusColor), 0},
-    {BLT_CONFIG_COLOR, "-textforeground", "textForeground", "TextForeground",
-	DEF_TEXT_NORMAL_FG, Blt_Offset(ComboEntry, textOutFocusColor), 0},
-    {BLT_CONFIG_CUSTOM, "-textvariable", "textVariable", "TextVariable", 
-	DEF_TEXT_VARIABLE, Blt_Offset(ComboEntry, textVarObjPtr), 
-        BLT_CONFIG_NULL_OK, &textVarOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-textwidth", "textWidth", "TextWidth",
-	DEF_WIDTH, Blt_Offset(ComboEntry, prefTextWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width",
-	DEF_WIDTH, Blt_Offset(ComboEntry, reqWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-        DEF_SCROLL_CMD, Blt_Offset(ComboEntry, scrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-xscrollincrement", "xScrollIncrement",
-	"ScrollIncrement", DEF_SCROLL_INCR, 
-	Blt_Offset(ComboEntry, scrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Tcl_IdleProc DisplayComboEntry;
-static Tcl_IdleProc ComboEntrySelectCmdProc;
-static Tcl_IdleProc ComboEntryInvokeCmdProc;
-static Tcl_FreeProc FreeComboEntryProc;
-static Tk_EventProc ComboEntryEventProc;
-static Tcl_ObjCmdProc ComboEntryInstCmdProc;
-static Tcl_CmdDeleteProc ComboEntryInstCmdDeletedProc;
-static Tk_LostSelProc ComboEntryLostSelProc;
-static Tk_SelectionProc ComboEntrySelectionProc;
-static Tcl_TimerProc BlinkInsertCursorProc;
-
-typedef int (ComboEntryCmdProc)(ComboEntry *comboPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the comboentry display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(ComboEntry *comboPtr) 
-{
-    if ((comboPtr->tkwin != NULL) && ((comboPtr->flags & REDRAW_PENDING)==0)) {
-	comboPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayComboEntry, comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyInvokeSelectCmd --
- *
- *      Queues a request to execute the -selectcommand code associated with
- *      the widget at the next idle point.  Invoked whenever the selection
- *      changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyInvokeSelectCmd(ComboEntry *comboPtr) 
-{
-    if ((comboPtr->flags & SELECT) == 0) {
-	comboPtr->flags |= SELECT;
-	Tcl_DoWhenIdle(ComboEntrySelectCmdProc, comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyInvokeCmd --
- *
- *      Queues a request to execute the -selectcommand code associated with
- *      the widget at the next idle point.  Invoked whenever the selection
- *      changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyInvokeCmd(ComboEntry *comboPtr) 
-{
-    if ((comboPtr->flags & INVOKE_PENDING) == 0) {
-	comboPtr->flags |= INVOKE_PENDING;
-	Tcl_DoWhenIdle(ComboEntryInvokeCmdProc, comboPtr);
-    }
-}
-
-
-static int
-InvokeCommand(Tcl_Interp *interp, ComboEntry *comboPtr) 
-{
-    int result;
-
-    Tcl_Preserve(comboPtr);
-    Tcl_IncrRefCount(comboPtr->cmdObjPtr);
-    result = Tcl_EvalObjEx(interp, comboPtr->cmdObjPtr, TCL_EVAL_GLOBAL);
-    Tcl_DecrRefCount(comboPtr->cmdObjPtr);
-    Tcl_Release(comboPtr);
-    return result;
-}
-
-static int
-UpdateTextVariable(Tcl_Interp *interp, ComboEntry *comboPtr) 
-{
-    Tcl_Obj *resultObjPtr, *objPtr;
-    const char *varName;
-
-    objPtr = Tcl_NewStringObj(comboPtr->text, comboPtr->textLen);
-    varName = Tcl_GetString(comboPtr->textVarObjPtr); 
-    Tcl_UntraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc,comboPtr);
-    Tcl_IncrRefCount(objPtr);
-    resultObjPtr = Tcl_ObjSetVar2(interp, comboPtr->textVarObjPtr, NULL, 
-	objPtr, TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-    Tcl_DecrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc, comboPtr);
-    if (resultObjPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-FreeUndoRecords(ComboEntry *comboPtr)
-{
-    EditRecord *recPtr, *nextPtr;
-
-    for (recPtr = comboPtr->undoPtr; recPtr != NULL; recPtr = nextPtr) {
-	nextPtr = recPtr->nextPtr;
-	Blt_Free(recPtr);
-    }
-    comboPtr->undoPtr = NULL;
-}
-
-static void
-FreeRedoRecords(ComboEntry *comboPtr)
-{
-    EditRecord *recPtr, *nextPtr;
-
-    for (recPtr = comboPtr->redoPtr; recPtr != NULL; recPtr = nextPtr) {
-	nextPtr = recPtr->nextPtr;
-	Blt_Free(recPtr);
-    }
-    comboPtr->redoPtr = NULL;
-}
-
-static void
-RecordEdit(ComboEntry *comboPtr, int type, int offset, int textLen, 
-	   const char *text)
-{
-    EditRecord *recPtr;
-
-    recPtr = Blt_AssertMalloc(sizeof(EditRecord) + textLen);
-    recPtr->type = type;
-    recPtr->insertOffset = comboPtr->insertOffset;
-    recPtr->offset = offset;
-    recPtr->textLen = textLen;
-    memcpy(recPtr->text, text, textLen);
-    recPtr->nextPtr = comboPtr->undoPtr;
-    comboPtr->undoPtr = recPtr;
-}
-
-static void
-CleanText(ComboEntry *comboPtr)
-{
-    char *p, *q, *pend;
-
-    if (comboPtr->screenText != NULL) {
-	Blt_Free(comboPtr->screenText);
-    }
-    comboPtr->screenText = Blt_AssertMalloc(comboPtr->textLen + 1);
-    for (p = comboPtr->text, q = comboPtr->screenText, 
-	     pend = p + comboPtr->textLen; p < pend; p++, q++) {
-	if (comboPtr->flags & CIPHER) {
-	    *q = '*';
-	} else if ((*p == '\n') || (*p == '\t')) {
-	    *q = ' ';
-	} else {
-	    *q = *p;
-	}
-    }
-} 
-
-static void
-DeleteText(ComboEntry *comboPtr, int first, int last)
-{
-    int nBytes;
-    int i, j;
-
-    nBytes = last - first;
-    comboPtr->selFirst = comboPtr->selLast = -1;
-    if (comboPtr->insertOffset >= first) {
-	if (comboPtr->insertOffset >= last) {
-	    comboPtr->insertOffset -= nBytes;
-	} else {
-	    comboPtr->insertOffset = first;
-	}
-    }
-    for (i = first, j = last; j < comboPtr->textLen; i++, j++) {
-	comboPtr->text[i] = comboPtr->text[j];
-    }
-    comboPtr->text[i] = '\0';
-    comboPtr->textLen -= nBytes;
-    CleanText(comboPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	UpdateTextVariable(comboPtr->interp, comboPtr);
-    }
-    comboPtr->selFirst = comboPtr->selLast = -1;
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-}
-
-static int
-InsertText(ComboEntry *comboPtr, int offset, int nBytes, const char *insertText)
-{
-    char *text;
-
-    /* Create a larger buffer to hold the text. */
-    text = Blt_Malloc(comboPtr->textLen + nBytes);
-    if (text == NULL) {
-	return TCL_ERROR;
-    }
-    /* Copy the old + extra to the new text. */
-    memcpy(text, comboPtr->text, offset);
-    memcpy(text + offset, insertText, nBytes);
-    memcpy(text + offset + nBytes, comboPtr->text + offset, 
-	   comboPtr->textLen - offset);
-    comboPtr->textLen += nBytes;
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-    }
-    comboPtr->text = text;
-    if (comboPtr->insertOffset >= offset) {
-	comboPtr->insertOffset += nBytes;
-    }
-    comboPtr->selFirst = comboPtr->selLast = -1;
-    CleanText(comboPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	UpdateTextVariable(comboPtr->interp, comboPtr);
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    return TCL_OK;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *  H
- *  C
- *  L
- *  P
- *  max of icon/text/image/arrow
- *  P
- *  L
- *  C
- *  H
- *
- * |H|C|L|P| icon |P| text/image |P|L|B| arrow |B|C|H|
- * 
- * H = highlight thickness
- * C = comboentry borderwidth
- * L = label borderwidth
- * P = pad
- * I = icon
- * T = text or image
- *---------------------------------------------------------------------------
- */
-static void
-ComputeEntryGeometry(ComboEntry *comboPtr)
-{
-    /* Determine the height of the entry.  It's the maximum height of all it's
-     * components: icon, label, and arrow. */
-    comboPtr->iconWidth = comboPtr->iconHeight = 0;
-    comboPtr->entryWidth = comboPtr->entryHeight = 0;
-    comboPtr->textWidth = comboPtr->textHeight = 0;
-    comboPtr->arrowWidth = comboPtr->arrowHeight = 0;
-    comboPtr->inset = comboPtr->borderWidth + comboPtr->highlightWidth;
-    if (comboPtr->icon != NULL) {
-	comboPtr->iconWidth  = IconWidth(comboPtr->icon) + IPAD;
-	comboPtr->iconHeight = IconHeight(comboPtr->icon) + 2 * YPAD;
-    }
-    if (comboPtr->prefIconWidth > 0) {
-	comboPtr->iconWidth = comboPtr->prefIconWidth + IPAD;
-    }
-    comboPtr->entryWidth += comboPtr->iconWidth;
-    if (comboPtr->entryHeight < comboPtr->iconHeight) {
-	comboPtr->entryHeight = comboPtr->iconHeight;
-    }
-    if (comboPtr->image != NULL) {
-	comboPtr->textWidth  = IconWidth(comboPtr->image) + IPAD;
-	comboPtr->textHeight = IconHeight(comboPtr->image);
-    } else {
-	unsigned int w, h;
-
-	CleanText(comboPtr);
-	if (comboPtr->textLen == 0) {
-	    Blt_GetTextExtents(comboPtr->font, 0, "0", 1, &w, &h);
-	} else {
-	    Blt_GetTextExtents(comboPtr->font, 0, comboPtr->screenText, 
-		comboPtr->textLen, &w, &h);
-	}
-	comboPtr->textWidth  = w;
-	comboPtr->textHeight = h;
-	if (comboPtr->prefTextWidth > 0) {
-	    Blt_GetTextExtents(comboPtr->font, 0, "0", 1, &w, &h);
-	    comboPtr->entryWidth += comboPtr->prefTextWidth * w;
-	} else {
-	    comboPtr->entryWidth += comboPtr->textWidth;
-	}
-	comboPtr->entryWidth += IPAD;
-    } 
-    if (comboPtr->entryHeight < comboPtr->textHeight) {
-	comboPtr->entryHeight = comboPtr->textHeight;
-    }
-    if (comboPtr->flags & ARROW) {
-	comboPtr->arrowWidth  = ARROW_WIDTH + 2 * 
-	    (comboPtr->arrowBW + comboPtr->arrowPad);
-	comboPtr->arrowHeight = ARROW_HEIGHT + 2 * 
-	    (comboPtr->arrowBW + comboPtr->arrowPad);
-	if (comboPtr->arrowHeight > comboPtr->entryHeight) {
-	    comboPtr->entryHeight = comboPtr->arrowHeight;
-	}
-    }
-    comboPtr->width = comboPtr->entryWidth + comboPtr->arrowWidth + 
-	2 * comboPtr->inset + IPAD;
-    comboPtr->height = comboPtr->entryHeight + 2 * comboPtr->inset;
-    if (comboPtr->flags & ARROW) {
-	comboPtr->width += 2 * comboPtr->arrowPad;
-    }
-    {
-	int w, h;
-	w = (comboPtr->reqWidth > 0) ? comboPtr->reqWidth : comboPtr->width;
-	h = (comboPtr->reqHeight > 0) ? comboPtr->reqHeight : comboPtr->height;
-	if ((w != Tk_ReqWidth(comboPtr->tkwin)) || 
-	    (h != Tk_ReqHeight(comboPtr->tkwin))) {
-	    Tk_GeometryRequest(comboPtr->tkwin, w, h);
-	}
-    }
-    comboPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static int
-UpdateIconVariable(Tcl_Interp *interp, ComboEntry *comboPtr) 
-{
-    Tcl_Obj *resultObjPtr, *objPtr;
-    
-    if (comboPtr->icon != NULL) {
-	objPtr = Tcl_NewStringObj(IconName(comboPtr->icon), -1);
-    } else {
-	objPtr = Tcl_NewStringObj("", -1);
-    }
-    Tcl_IncrRefCount(objPtr);
-    resultObjPtr = Tcl_ObjSetVar2(interp, comboPtr->iconVarObjPtr, NULL, 
-	objPtr, TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-    Tcl_DecrRefCount(objPtr);
-    if (resultObjPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-FreeIcon(ComboEntry *comboPtr, Icon icon)
-{
-    Tk_FreeImage(IconImage(icon));
-    Blt_Free(icon);
-}
-
-static char *
-GetInterpResult(Tcl_Interp *interp)
-{
-#define MAX_ERR_MSG	1023
-    static char mesg[MAX_ERR_MSG+1];
-
-    strncpy(mesg, Tcl_GetStringResult(interp), MAX_ERR_MSG);
-    mesg[MAX_ERR_MSG] = '\0';
-    return mesg;
-}
-
-static void
-SetTextFromObj(ComboEntry *comboPtr, Tcl_Obj *objPtr) 
-{
-    int nBytes;
-    char *string;
-
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-    }
-    string = Tcl_GetStringFromObj(objPtr, &nBytes);
-    comboPtr->text = Blt_AssertMalloc(nBytes + 1);
-    memcpy(comboPtr->text, string, nBytes);
-    comboPtr->text[nBytes] = '\0';
-    comboPtr->textLen = nBytes;
-    CleanText(comboPtr);
-    comboPtr->flags |= (ICURSOR | SCROLL_PENDING | LAYOUT_PENDING);
-    comboPtr->scrollX = 0;
-    comboPtr->selFirst = comboPtr->selLast = -1;
-    comboPtr->insertOffset = nBytes;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,      /* Not used. */
-    int imageWidth, int imageHeight) /* Not used. */
-{
-    ComboEntry *comboPtr = clientData;
-
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-}
-
-static int
-GetIconFromObj(Tcl_Interp *interp, ComboEntry *comboPtr, Tcl_Obj *objPtr, 
-	       Icon *iconPtr)
-{
-    Tk_Image tkImage;
-    const char *iconName;
-
-    iconName = Tcl_GetString(objPtr);
-    if (iconName[0] == '\0') {
-	*iconPtr = NULL;
-	return TCL_OK;
-    }
-    tkImage = Tk_GetImage(interp, comboPtr->tkwin, iconName, IconChangedProc, 
-	comboPtr);
-    if (tkImage != NULL) {
-	struct Icon *ip;
-	int width, height;
-
-	ip = Blt_AssertMalloc(sizeof(struct Icon));
-	Tk_SizeOfImage(tkImage, &width, &height);
-	ip->tkImage = tkImage;
-	ip->width = width;
-	ip->height = height;
-	*iconPtr = ip;
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-
-static void
-BlinkCursor(ComboEntry *comboPtr)
-{
-    int time;
-
-    if (comboPtr->flags & ICURSOR_ON) {
-	comboPtr->flags &= ~ICURSOR_ON;
-	time = comboPtr->insertOffTime;
-    } else {
-	comboPtr->flags |= ICURSOR_ON;
-	time = comboPtr->insertOnTime;
-    }
-    comboPtr->insertTimerToken = Tcl_CreateTimerHandler(time, 
-	BlinkInsertCursorProc, comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlinkInsertCursorProc --
- *
- *	This procedure is called as a timer handler to blink the insertion
- *	cursor off and on.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The cursor gets turned on or off, redisplay gets invoked, and this
- *	procedure reschedules itself.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BlinkInsertCursorProc(ClientData clientData)
-{
-    ComboEntry *comboPtr = clientData;
-
-    if (((comboPtr->flags & FOCUS) == 0)||(comboPtr->insertOffTime == 0)) {
-	return;
-    }
-    if (comboPtr->flags & ICURSOR) {
-	BlinkCursor(comboPtr);
-	EventuallyRedraw(comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	comboentry widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboEntryEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ComboEntry *comboPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(comboPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	comboPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(comboPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    comboPtr->flags |= FOCUS;
-	} else {
-	    comboPtr->flags &= ~FOCUS;
-	}
-	if (comboPtr->insertTimerToken != NULL) {
-	    Tcl_DeleteTimerHandler(comboPtr->insertTimerToken);
-	    comboPtr->insertTimerToken = NULL;
-	}
-#ifndef notdef
-	if ((comboPtr->flags & (FOCUS|ICURSOR|READONLY))==(FOCUS|ICURSOR)) {
-	    if (comboPtr->flags & ICURSOR_ON) {
-		comboPtr->flags &= ~ICURSOR_ON;
-	    } else {
-		comboPtr->flags |= ICURSOR_ON;
-	    }
-	    if (comboPtr->insertOffTime != 0) {
-		BlinkCursor(comboPtr);
-	    }
-	}
-#else 
-	comboPtr->flags |= FOCUS | ICURSOR_ON;
-#endif
-	EventuallyRedraw(comboPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (comboPtr->tkwin != NULL) {
-	    comboPtr->tkwin = NULL; 
-	}
-	if (comboPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayComboEntry, comboPtr);
-	}
-	if (comboPtr->flags & SELECT) {
-	    Tcl_CancelIdleCall(ComboEntrySelectCmdProc, comboPtr);
-	}
-	if (comboPtr->flags & INVOKE_PENDING) {
-	    Tcl_CancelIdleCall(ComboEntryInvokeCmdProc, comboPtr);
-	}
-	if (comboPtr->insertTimerToken != NULL) {
-	    Tcl_DeleteTimerHandler(comboPtr->insertTimerToken);
-	}
-	Tcl_EventuallyFree(comboPtr, FreeComboEntryProc);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryLostSelProc --
- *
- *	This procedure is called back by Tk when the selection is grabbed away
- *	from the comboentry widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The existing selection is unhighlighted, and the window is marked as
- *	not containing a selection.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboEntryLostSelProc(ClientData clientData)
-{
-    ComboEntry *comboPtr = clientData;
-
-    if ((comboPtr->selFirst >= 0) && (comboPtr->flags & EXPORT_SELECTION)) {
-	comboPtr->selFirst = comboPtr->selLast = -1;
-	EventuallyRedraw(comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	sub-menus of comboentry widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ChildEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ComboEntry *comboPtr = clientData;
-
-    if ((eventPtr->type == UnmapNotify) || (eventPtr->type == DestroyNotify)) {
-	comboPtr->flags &= ~STATE_MASK;
-	comboPtr->flags |= NORMAL;
-    } else if (eventPtr->type == MapNotify) {
-	comboPtr->flags &= ~STATE_MASK;
-	comboPtr->flags |= POSTED;
-    } 
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryInvokeCmdProc --
- *
- *      Invoked at the next idle point whenever the current
- *      selection changes.  Executes some application-specific code
- *      in the -selectcommand option.  This provides a way for
- *      applications to handle selection changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboEntryInvokeCmdProc(ClientData clientData) 
-{
-    ComboEntry *comboPtr = clientData;
-
-    comboPtr->flags &= ~INVOKE_PENDING;
-    if (comboPtr->cmdObjPtr != NULL) {
-	if (InvokeCommand(comboPtr->interp, comboPtr) != TCL_OK) {
-	    Tcl_BackgroundError(comboPtr->interp);
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectText --
- *
- *	Modify the selection by moving its un-anchored end.  This could make
- *	the selection either larger or smaller.
- *
- *	  1) If index is before the anchor point, sets the selection to the
- *	     characters from index up to but not including the anchor point.
- *	  2) If index is the same as the anchor point, does nothing.
- *	  3) If index is after the anchor point, set the selection to the
- *	     characters from the anchor point up to but not including index.  
- *	     The anchor point is determined by the most recent select from 
- *	     or select adjust command in this widget.
- *	  4) If the selection isn't in this widget then a new selection is
- *	     created using the most recent anchor point specified for the 
- *	     widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is possibly redrawn with the new selection.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectText(ComboEntry *comboPtr, int offset)
-{
-    int selFirst, selLast;
-
-    /*
-     * Grab the selection if we don't own it already.
-     */
-    if ((comboPtr->flags & EXPORT_SELECTION) && (comboPtr->selFirst == -1)) {
-	Tk_OwnSelection(comboPtr->tkwin, XA_PRIMARY, ComboEntryLostSelProc, 
-		comboPtr);
-    }
-    /*  If the anchor hasn't been set yet, assume the beginning of the text*/
-    if (comboPtr->selAnchor < 0) {
-	comboPtr->selAnchor = 0;
-    }
-    if (comboPtr->selAnchor <= offset) {
-	selFirst = comboPtr->selAnchor;
-	selLast = offset;
-    } else {
-	selFirst = offset;
-	selLast = comboPtr->selAnchor;
-    }
-    if (((comboPtr->selFirst != selFirst) || (comboPtr->selLast != selLast)) &&
-	(selFirst != selLast)) {
-	comboPtr->selFirst = selFirst;
-	comboPtr->selLast = selLast;
-	EventuallyRedraw(comboPtr);
-	if (comboPtr->selCmdObjPtr != NULL) {
-	    EventuallyInvokeSelectCmd(comboPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntrySelectCmdProc --
- *
- *      Invoked at the next idle point whenever the current
- *      selection changes.  Executes some application-specific code
- *      in the -selectcommand option.  This provides a way for
- *      applications to handle selection changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboEntrySelectCmdProc(ClientData clientData) 
-{
-    ComboEntry *comboPtr = clientData;
-
-    if (comboPtr->selCmdObjPtr != NULL) {
-	int result;
-
-	comboPtr->flags &= ~SELECT;
-	Tcl_Preserve(comboPtr);
-	Tcl_IncrRefCount(comboPtr->selCmdObjPtr);
-	result = Tcl_EvalObjEx(comboPtr->interp, comboPtr->selCmdObjPtr, 
-		TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->selCmdObjPtr);
-	Tcl_Release(comboPtr);
-	if (result != TCL_OK) {
-	    Tcl_BackgroundError(comboPtr->interp);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntrySelectionProc --
- *
- *	This procedure is called back by Tk when the selection is requested by
- *	someone.  It returns part or all of the selection in a buffer provided
- *	by the caller.
- *
- * Results:
- *	The return value is the number of non-NULL bytes stored at buffer.
- *	Buffer is filled (or partially filled) with a NUL-terminated string
- *	containing part or all of the selection, as given by offset and
- *	maxBytes.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ComboEntrySelectionProc(
-    ClientData clientData,		/* Information about the widget. */
-    int offset,				/* Offset within the selection of the
-					 * first character to be returned. */
-    char *buffer,			/* Location in which to place
-					 * selection. */
-    int maxBytes)			/* Maximum number of bytes to place at
-					 * buffer, not including terminating
-					 * NULL character. */
-{
-    ComboEntry *comboPtr = clientData;
-    int size;
-
-    size = 0;
-    if (comboPtr->selFirst >= 0) {
-	size = comboPtr->selLast - comboPtr->selFirst - offset;
-	assert(size >= 0);
-	if (size > maxBytes) {
-	    size = maxBytes;
-	}
-	memcpy(buffer, comboPtr->text + comboPtr->selFirst + offset, size);
-	buffer[size] = '\0';
-    }
-    return size;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- * 
- * TextVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state variable
- *	associated with a comboentry entry.  The entry's selected state is set
- *	to match the value of the variable.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The comboentry entry may become selected or deselected.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-TextVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    ComboEntry *comboPtr = clientData;
-
-    assert(comboPtr->textVarObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	if (flags & TCL_TRACE_DESTROYED) {
-	    Tcl_SetVar(interp, name1, comboPtr->text, TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, name1, TRACE_VAR_FLAGS, TextVarTraceProc, 
-		clientData);
-	    comboPtr->flags |= TEXT_VAR_TRACED;
-	}
-	return NULL;
-    }
-    if (comboPtr->flags & DISABLED) {
-	return NULL;
-    }
-    if (flags & TCL_TRACE_WRITES) {
-	Tcl_Obj *valueObjPtr;
-
-	/*
-	 * Update the comboentry's text with the value of the variable, unless
-	 * the widget already has that value (this happens when the variable
-	 * changes value because we changed it because someone typed in the
-	 * entry).
-	 */
-	valueObjPtr = Tcl_ObjGetVar2(interp, comboPtr->textVarObjPtr, NULL, 
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-	if (valueObjPtr == NULL) {
-	    return GetInterpResult(interp);
-	} else {
-	    SetTextFromObj(comboPtr, valueObjPtr);
-	    if (comboPtr->cmdObjPtr != NULL) {
-		EventuallyInvokeCmd(comboPtr);
-	    }
-	}
-	EventuallyRedraw(comboPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * IconVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state variable
- *	associated with a comboentry entry.  The entry's selected state is set
- *	to match the value of the variable.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The comboentry entry may become selected or deselected.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-IconVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    ComboEntry *comboPtr = clientData;
-
-    assert(comboPtr->iconVarObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	if (flags & TCL_TRACE_DESTROYED) {
-	    Tcl_SetVar(interp, name1, IconName(comboPtr->icon),TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, name1, TRACE_VAR_FLAGS, IconVarTraceProc, 
-		clientData);
-	    comboPtr->flags |= ICON_VAR_TRACED;
-	}
-	return NULL;
-    }
-    if (comboPtr->flags & DISABLED) {
-	return NULL;
-    }
-    if (flags & TCL_TRACE_WRITES) {
-	Icon icon;
-	Tcl_Obj *valueObjPtr;
-
-	/*
-	 * Update the comboentry's icon with the image whose name is
-	 * stored in the variable.
-	 */
-	valueObjPtr = Tcl_ObjGetVar2(interp, comboPtr->iconVarObjPtr, NULL, 
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-	if (valueObjPtr == NULL) {
-	    return GetInterpResult(interp);
-	}
-	if (GetIconFromObj(interp, comboPtr, valueObjPtr, &icon) != TCL_OK) {
-	    return GetInterpResult(interp);
-	}
-	if (comboPtr->icon != NULL) {
-	    FreeIcon(comboPtr, comboPtr->icon);
-	}
-	comboPtr->icon = icon;
-	comboPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(comboPtr);
-    }
-    return NULL;
-}
-
-/*ARGSUSED*/
-static void
-FreeIconVarProc(ClientData clientData, Display *display, char *widgRec,
-		int offset)
-{
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-
-    if (*objPtrPtr != NULL) {
-	ComboEntry *comboPtr = (ComboEntry *)widgRec;
-
-	Tcl_UntraceVar(comboPtr->interp, Tcl_GetString(*objPtrPtr), 
-		TRACE_VAR_FLAGS, IconVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconVarProc --
- *
- *	Convert the variable to a traced variable.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-    char *varName;
-    Tcl_Obj *valueObjPtr;
-
-    /* Remove the current trace on the variable. */
-    if (*objPtrPtr != NULL) {
-	Tcl_UntraceVar(interp, Tcl_GetString(*objPtrPtr), TRACE_VAR_FLAGS, 
-		       IconVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-
-    valueObjPtr = Tcl_ObjGetVar2(interp, objPtr, NULL, TCL_GLOBAL_ONLY);
-    if (valueObjPtr != NULL) {
-	Icon icon;
-
-	if (GetIconFromObj(interp, comboPtr, valueObjPtr, &icon) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (comboPtr->icon != NULL) {
-	    FreeIcon(comboPtr, comboPtr->icon);
-	}
-	comboPtr->icon = icon;
-    }
-    *objPtrPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, TRACE_VAR_FLAGS, IconVarTraceProc, comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconVarToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *objPtr = *(Tcl_Obj **)(widgRec + offset);
-
-    if (objPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } 
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeTextVarProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-
-    if (*objPtrPtr != NULL) {
-	ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-	char *varName;
-
-	varName = Tcl_GetString(*objPtrPtr);
-	Tcl_UntraceVar(comboPtr->interp, varName, TRACE_VAR_FLAGS, 
-		TextVarTraceProc, comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTextVarProc --
- *
- *	Convert the variable to a traced variable.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTextVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-    Tcl_Obj **objPtrPtr = (Tcl_Obj **)(widgRec + offset);
-    char *varName;
-    Tcl_Obj *valueObjPtr;
-
-    /* Remove the current trace on the variable. */
-    if (*objPtrPtr != NULL) {
-	varName = Tcl_GetString(*objPtrPtr);
-	Tcl_UntraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc, 
-		comboPtr);
-	Tcl_DecrRefCount(*objPtrPtr);
-	*objPtrPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-
-    valueObjPtr = Tcl_ObjGetVar2(interp, objPtr, NULL, TCL_GLOBAL_ONLY);
-    if (valueObjPtr != NULL) {
-	SetTextFromObj(comboPtr, valueObjPtr);
-	if (comboPtr->textVarObjPtr != NULL) {
-	    if (UpdateTextVariable(interp, comboPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    *objPtrPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, TRACE_VAR_FLAGS, TextVarTraceProc, comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextVarToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TextVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *objPtr = *(Tcl_Obj **)(widgRec + offset);
-
-    if (objPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } 
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStateProc --
- *
- *	Converts the string represents an entry state into a bitflag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStateProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing state. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    char *string;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "normal") == 0) {
-	flag = NORMAL;
-    } else if (strcmp(string, "posted") == 0) {
-	flag = POSTED;
-    } else if (strcmp(string, "disabled") == 0) {
-	flag = DISABLED;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-		"\": should be active, disabled, normal, or posted.", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (comboPtr->flags & flag) {
-	return TCL_OK;			/* State is already set to value. */
-    }
-    *flagsPtr &= ~STATE_MASK;
-    *flagsPtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StateToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StateToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int state = *(unsigned int *)(widgRec + offset);
-    const char *string;
-
-    if (state & NORMAL) {
-	string = "normal";
-    } else if (state & DISABLED) {
-	string = "disabled";
-    } else if (state & POSTED) {
-	string = "posted";
-    } else {
-	string = "???";
-    } 
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeIconProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-
-    if (icon != NULL) {
-	ComboEntry *comboPtr = (ComboEntry *)widgRec;
-
-	FreeIcon(comboPtr, icon);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconProc --
- *
- *	Convert a image into a hashed icon.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)widgRec;
-    Icon *iconPtr = (Icon *)(widgRec + offset);
-    Icon icon;
-
-    if (GetIconFromObj(interp, comboPtr, objPtr, &icon) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (*iconPtr != NULL) {
-	FreeIcon(comboPtr, *iconPtr);
-    }
-    *iconPtr = icon;
-    if (comboPtr->iconVarObjPtr != NULL) {
-	if (UpdateIconVariable(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObjProc --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (icon == NULL) {
-	objPtr = Tcl_NewStringObj("", 0);
-    } else {
-	objPtr =Tcl_NewStringObj(Blt_Image_Name(IconImage(icon)), -1);
-    }
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeTextProc(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-	comboPtr->text = (char *)emptyString;
-	comboPtr->textLen = 0;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTextProc --
- *
- *	Save the text and add the item to the text hashtable.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTextProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing style. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-
-    if (comboPtr->text != emptyString) {
-	Blt_Free(comboPtr->text);
-	comboPtr->text = (char *)emptyString;
-	comboPtr->textLen = 0;
-    }
-    SetTextFromObj(comboPtr, objPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	if (UpdateTextVariable(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextToObjProc --
- *
- *	Returns the current text of the entry.
- *
- * Results:
- *	The text is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TextToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    ComboEntry *comboPtr = (ComboEntry *)(widgRec);
-
-    return Tcl_NewStringObj(comboPtr->text, comboPtr->textLen);
-}
-
-static  int
-PrevUtfOffset(const char *string)
-{
-    int i;
-
-    for (i = 1; i <= TCL_UTF_MAX; i++) {
-	unsigned char byte;
-
-	string--;
-	byte = *(unsigned char *)string;
-	if (byte < 0x80) {
-	    break;
-	}
-	if (byte >= 0xC0) {
-	    return i;
-	}
-    }
-    return i;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTextOffset --
- *
- *	Converts a string representing a item index into an item pointer.
- *	The index may be in one of the following forms:
- *
- *	 number		Specifies the character as a numerical index, 
- *			where 0 corresponds to the first character in 
- *			the string.
- *	 "anchor"	Indicates the anchor point for the selection, 
- *			which is set with the select from and select 
- *			adjust widget commands.
- *	 "end"		Indicates the character just after the last one  
- *			in the entry's string.  This is equivalent to 
- *			specifying a numerical index equal to the length 
- *			of the entry's string.
- *	 "insert"       Indicates the character adjacent to and immediately 
- *			following the insertion cursor.
- *	 "sel.first"    Indicates the first character in the selection.  
- *			It is an error to use this form if the selection 
- *			isn't in the entry window.
- *       "sel.last"	Indicates the character just  after the last one 
- *			in the selection.  It is an error to use this form 
- *			if  the  selection isn't in the entry window.
- *       @x             X-coordinate in the entry's window;  the character 
- *			spanning that x-coordinate is used.  For example, 
- *			"@0" indicates the left-most character in the window.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via itemPtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTextOffset(Tcl_Interp *interp, ComboEntry *comboPtr, Tcl_Obj *objPtr,
-	      int *offsetPtr)
-{
-    char *string;
-    char c;
-    int nChars, offset;
-
-    if (Tcl_GetIntFromObj((Tcl_Interp *)NULL, objPtr, &nChars) == TCL_OK) {
-	int nBytes, maxChars;
-
-	/* Convert the character index into a byte offset. */
-	if (comboPtr->text == NULL) {
-	    *offsetPtr = 0;
-	    return TCL_OK;
-	}
-	nBytes = comboPtr->textLen;
-	maxChars = Tcl_NumUtfChars(comboPtr->text, comboPtr->textLen);
-	if (nChars < 0) {
-	    nBytes = 0;
-	} else if (nChars <= maxChars) {
-	    nBytes = Tcl_UtfAtIndex(comboPtr->text, nChars) - comboPtr->text;
-	}
-	*offsetPtr = nBytes;
-	return TCL_OK;
-    }
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 'a') && (strcmp(string, "anchor") == 0)) {
-	if (comboPtr->selAnchor < 0) {
-	    Tcl_AppendResult(interp, "bad index \"", string, 
-			     "\": no selection present.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	*offsetPtr = comboPtr->selAnchor;
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	*offsetPtr = comboPtr->textLen;
-    } else if ((c == 'i') && (strcmp(string, "insert") == 0)) {
-	*offsetPtr = comboPtr->insertOffset;
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-	offset = comboPtr->insertOffset;
-	if (offset < comboPtr->textLen) {
-	    Tcl_UniChar dummy;
-	    int nBytes;
-
-	    nBytes = Tcl_UtfToUniChar(comboPtr->text + comboPtr->insertOffset,
-		&dummy);
-	    offset = comboPtr->insertOffset + nBytes;
-	}
-	*offsetPtr = offset;
-    } else if ((c == 'p') && (strcmp(string, "previous") == 0)) {
-	offset = comboPtr->insertOffset;
-	if (offset > 0) {
-	    int nBytes;
-
-	    nBytes = PrevUtfOffset(comboPtr->text + comboPtr->insertOffset);
-	    offset = comboPtr->insertOffset - nBytes;
-	}
-	*offsetPtr = offset;
-    } else if ((c == 's') && (strcmp(string, "sel.first") == 0)) {
-	*offsetPtr = (int)comboPtr->selFirst;
-    } else if ((c == 's') && (strcmp(string, "sel.last") == 0)) {
-	*offsetPtr = (int)comboPtr->selLast;
-    } else if (c == '@') {
-	int x, dummy;
-	if (Tcl_GetInt(interp, string+1, &x) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* Convert screen position to character index */
-	x -= comboPtr->inset + comboPtr->iconWidth;
-	x += comboPtr->scrollX;
-	*offsetPtr = Blt_MeasureChars(comboPtr->font, comboPtr->screenText, 
-		comboPtr->textLen, x, TK_PARTIAL_OK|TK_AT_LEAST_ONE, &dummy);
-    } else {
-	Tcl_AppendResult(interp, "unknown index \"", string, "\"",(char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-static int
-ConfigureComboEntry(Tcl_Interp *interp, ComboEntry *comboPtr, int objc,
-		    Tcl_Obj *const *objv, int flags)
-{
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC newGC;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, configSpecs, objc, 
-		objv, (char *)comboPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Text in/out focus GCs. */
-    gcMask = GCForeground | GCFont;
-    if (comboPtr->flags & DISABLED) {
-	gcValues.foreground = comboPtr->disabledColor->pixel;
-    } else {
-	gcValues.foreground = comboPtr->textInFocusColor->pixel;
-    }	
-    gcValues.font = Blt_FontId(comboPtr->font);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textInFocusGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textInFocusGC);
-    }
-    comboPtr->textInFocusGC = newGC;
-
-    gcMask = GCForeground | GCFont;
-    if (comboPtr->flags & DISABLED) {
-	gcValues.foreground = comboPtr->disabledColor->pixel;
-    } else {
-	gcValues.foreground = comboPtr->textOutFocusColor->pixel;
-    }	
-    gcValues.font = Blt_FontId(comboPtr->font);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->textOutFocusGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textOutFocusGC);
-    }
-    comboPtr->textOutFocusGC = newGC;
-
-    /* Selection foreground. */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = comboPtr->selFgColor->pixel;
-    gcValues.font = Blt_FontId(comboPtr->font);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->selectGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->selectGC);
-    }
-    comboPtr->selectGC = newGC;
-
-    /* Arrow. */
-    if (comboPtr->flags & ARROW) {
-	gcMask = GCForeground;
-	if (comboPtr->flags & ACTIVE) {
-	    gcValues.foreground = comboPtr->activeColor->pixel;
-	} else if (comboPtr->flags & NORMAL) {
-	    gcValues.foreground = comboPtr->normalColor->pixel;
-	} else if (comboPtr->flags & DISABLED) {
-	    gcValues.foreground = comboPtr->disabledColor->pixel;
-	}	
-	newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    } else {
-	newGC = NULL;
-    }
-
-    /* Focus highlight GCs */
-    gcMask = GCForeground;
-    gcValues.foreground = comboPtr->highlightColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->highlightGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightGC);
-    }
-    comboPtr->highlightGC = newGC;
-
-    if (comboPtr->highlightBgColor != NULL) {
-	gcMask = GCForeground;
-	gcValues.foreground = comboPtr->highlightBgColor->pixel;
-	newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    } else {
-	newGC = NULL;
-    }
-    if (comboPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightBgGC);
-    }
-    comboPtr->highlightBgGC = newGC;
-
-    /* Insert cursor. */
-    gcMask = GCForeground;
-    gcValues.foreground = comboPtr->insertColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->insertGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->insertGC);
-    }
-    comboPtr->insertGC = newGC;
-    ComputeEntryGeometry(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Activates
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb activate bool
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    int bool;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;			/* Writing is currently disabled. */
-    }
-    if (Tcl_GetBooleanFromObj(interp, objv[2], &bool) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags &= ~ACTIVE;
-    if (bool) {
-	comboPtr->flags |= ACTIVE;
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BboxOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb bentry option
- *
- *---------------------------------------------------------------------------
- */
-static int
-BboxOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, configSpecs,
-	(char *)comboPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb cget option
- *
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, configSpecs,
-	(char *)comboPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestOp --
- *
- *	Returns the index of the edge closest to the given x-coordinate.
- *
- * Results:
- *	A standard TCL result.  If the argument does not represent a valid
- *	index, then TCL_ERROR is returned and the interpreter result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ClosestOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    int offset;
-    int x;
-    
-    if (Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Convert screen position to character index */
-    x -= comboPtr->inset;
-    if (comboPtr->icon != NULL) {
-	x -= comboPtr->iconWidth;
-    }
-    x += comboPtr->scrollX;
-    if (x <= 0) {
-	offset = 0;
-    } else if (x >= comboPtr->textWidth) {
-	offset = comboPtr->textLen;
-    } else {
-	int prev;
-	int dummy, leftEdge, rightEdge, mid;
-
-	offset = Blt_MeasureChars(comboPtr->font, comboPtr->screenText, 
-		comboPtr->textLen, x, TK_PARTIAL_OK|TK_AT_LEAST_ONE, &dummy);
-	/* Get the previous character */
-	prev = offset - PrevUtfOffset(comboPtr->text + offset);
-	/* Measure the two strings. */
-	rightEdge = Blt_TextWidth(comboPtr->font, comboPtr->screenText, offset);
-	leftEdge = Blt_TextWidth(comboPtr->font, comboPtr->screenText, prev);
-	mid = (rightEdge + leftEdge + 1) / 2;
-	if (x <= mid) {
-	    offset = prev;
-	}
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), offset);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm configure ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    ComboEntry *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int result;
-
-    iconOption.clientData = comboPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, configSpecs, 
-		(char *)comboPtr, (Tcl_Obj *)NULL,  BLT_CONFIG_OBJV_ONLY);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, configSpecs, 
-		(char *)comboPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-    }
-    Tcl_Preserve(comboPtr);
-    result = ConfigureComboEntry(interp, comboPtr, objc - 2, objv + 2, 
-		BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(comboPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes one of more characters in the label's text label.  The range
- *	of characters is specified by the range first/last.  If no last
- *	argument is provided, then only the single character is deleted.
- *
- *	Tv\a
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *   .cb delete first ?last?
- *
- *---------------------------------------------------------------------------
- */
-static int
-DeleteOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    int first, last;
-
-    if (comboPtr->flags & (READONLY|DISABLED)) {
-	return TCL_OK;			/* Writing is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[2], &first) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	if (GetTextOffset(interp, comboPtr, objv[3], &last) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	last = first + 1;
-    }
-    if ((first == -1) || (last == -1)) {
-	return TCL_OK;
-    }
-    /* Record the delete for futher redo/undos.  */
-    RecordEdit(comboPtr, DELETE_OP, first, last - first, comboPtr->text+first);
-    DeleteText(comboPtr, first, last);
-    FreeRedoRecords(comboPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	if (UpdateTextVariable(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *	Returns the current text string in the widget.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb bentry option
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *objPtr;
-
-    objPtr = Tcl_NewStringObj(comboPtr->text, comboPtr->textLen);
-    Tcl_SetObjResult(interp, objPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Returns the actual character index of the index supplied.  This
- *	converts text indices such as "end" to the number of UTF characters in
- *	the text string.
- *
- *	It's an error if the index refers to a non-present selection.  Empty
- *	text strings always return an index of 0.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cb index index
- *
- *---------------------------------------------------------------------------
- */
-static int
-IndexOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    int offset, nChars;
-
-    if (GetTextOffset(interp, comboPtr, objv[2], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	nChars = -1;
-    } else {
-	/* Convert the Utf byte offset into an Unicode character index. */
-	nChars = Tcl_NumUtfChars(comboPtr->text, offset);
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), nChars);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IcursorOp --
- *
- *	Sets the cursor to a new location.
- *
- * Results:
- *	A standard TCL result.  If the argument does not represent a valid
- *	index, then TCL_ERROR is returned and the interpreter result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IcursorOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    int offset;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[2], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    comboPtr->insertOffset = offset;
-    comboPtr->flags |= ICURSOR;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IdentifyOp --
- *
- *	Returns the name of the element under the point given by x and y
- *	(such  as  arrow1), or an empty string if the point does not lie
- *	in any element of the comboentry.  X and Y must be pixel 
- *	coordinates relative to the widget.
- *
- * Results:
- *	A standard TCL result.  If the argument does not represent a valid
- *	index, then TCL_ERROR is returned and the interpreter result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IdentifyOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    int x, y, width, height;
-    int isRoot;
-    char *string;
-
-    isRoot = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    } 
-    if (objc < 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-		" ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-    if ((Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[2], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (isRoot) {
-	int rootX, rootY;
-
-	Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-	x -= rootX;
-	y -= rootY;
-    }
-    width = Tk_Width(comboPtr->tkwin);
-    height = Tk_Height(comboPtr->tkwin);
-    if ((x < 0) || (x >= width) || (y < 0) || (y >= height)) {
-	return TCL_OK;
-    }
-    if (height > comboPtr->entryHeight) {
-	y += (height - comboPtr->entryHeight) / 2;
-    }
-    if (comboPtr->icon) {
-	int iconX;
-	
-	iconX = comboPtr->inset;
-	if ((x >= iconX) && (x < (iconX + IconWidth(comboPtr->icon)))) {
-	    Tcl_SetObjResult(interp, Tcl_NewStringObj("icon", 4));
-	    return TCL_OK;
-	}
-    }
-    if (comboPtr->flags & ARROW) {
-	int arrowX;
-
-	arrowX = Tk_Width(comboPtr->tkwin) - 
-	    (comboPtr->inset + comboPtr->arrowWidth);
-	if (arrowX < 0) {
-	    arrowX = comboPtr->inset;
-	}
-	if ((x >= arrowX) && (x < (arrowX + comboPtr->arrowWidth))) {
-	    Tcl_SetObjResult(interp, Tcl_NewStringObj("arrow", 5));
-	    return TCL_OK;
-	}
-    }
-    {
-	int textX, textY;
-
-	textX = comboPtr->inset;
-	textY = y;
-	if (comboPtr->iconWidth > 0) {
-	    textX += comboPtr->iconWidth;
-	}
-	textY += (comboPtr->entryHeight - comboPtr->textHeight) / 2;
-	if ((x >= textX) && (x < (textX + comboPtr->textWidth))) {
-	    Tcl_SetObjResult(interp, Tcl_NewStringObj("text", 4));
-	    return TCL_OK;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .cb invoke item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InvokeOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    int result;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Item is currently disabled. */
-    }
-    result = TCL_OK;
-    if (comboPtr->cmdObjPtr != NULL) {
-	result = InvokeCommand(interp, comboPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Inserts a new item into the comboentry at the given index.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The comboentry gets a new item.
- *
- *   .cb insert index string
- *
- *---------------------------------------------------------------------------
- */
-static int
-InsertOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    int offset;
-    char *insertText;
-    int nBytes;
-
-    if (comboPtr->flags & (READONLY|DISABLED)) {
-	return TCL_OK;		/* Writing is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[2], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    insertText = Tcl_GetStringFromObj(objv[3], &nBytes);
-
-    /* Record the operation for future undo/redos. */
-    RecordEdit(comboPtr, INSERT_OP, offset, nBytes, insertText);
-
-    if (InsertText(comboPtr, offset, nBytes, insertText) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    FreeRedoRecords(comboPtr);
-    if (comboPtr->textVarObjPtr != NULL) {
-	if (UpdateTextVariable(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostOp --
- *
- *	Posts the menu associated with this widget.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .ce post
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    char *menuName;
-    Tk_Window menuWin;
-    
-    if (comboPtr->flags & (POSTED|DISABLED)) {
-	return TCL_OK;		/* Entry's menu is currently posted or entry
-				 * is disabled. */
-    }
-    if (comboPtr->menuObjPtr == NULL) {
-	return TCL_OK;
-    }
-    menuName = Tcl_GetString(comboPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-    comboPtr->menuWin = menuWin;
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	Tcl_AppendResult(interp, "can't post \"", Tk_PathName(menuWin), 
-		"\": it isn't a descendant of ", Tk_PathName(comboPtr->tkwin),
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (comboPtr->menuWin != NULL) {
-	Tk_DeleteEventHandler(comboPtr->menuWin, CHILD_EVENT_MASK, 
-		ChildEventProc, comboPtr);
-    } 
-    comboPtr->menuWin = menuWin;
-    Tk_CreateEventHandler(menuWin, CHILD_EVENT_MASK, ChildEventProc, comboPtr);
-    if (comboPtr->postCmdObjPtr) {
-	int result;
-
-	Tcl_Preserve(comboPtr);
-	Tcl_IncrRefCount(comboPtr->postCmdObjPtr);
-	result = Tcl_EvalObjEx(interp, comboPtr->postCmdObjPtr, 
-			       TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->postCmdObjPtr);
-	Tcl_Release(comboPtr);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    {
-	Tcl_Obj *cmd[5];
-	int result;
-	int rootX, rootY;
-
-	Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-	cmd[0] = comboPtr->menuObjPtr;
-	cmd[1] = Tcl_NewStringObj("post", 4);
-	cmd[2] = Tcl_NewIntObj(rootX + Tk_Width(comboPtr->tkwin));
-	cmd[3] = Tcl_NewIntObj(rootY + Tk_Height(comboPtr->tkwin));
-	cmd[4] = Tcl_NewStringObj("right", 5);
-	Tcl_Preserve(comboPtr);
-	result = Blt_GlobalEvalObjv(interp, 5, cmd);
-	Tcl_Release(comboPtr);
-	if (result == TCL_OK) {
-	    comboPtr->flags &= ~STATE_MASK;
-	    comboPtr->flags |= POSTED;
-	}
-	return result;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int oper;
-    int x;
-
-#define SCAN_MARK	1
-#define SCAN_DRAGTO	2
-    {
-	char *string;
-	char c;
-	int length;
-	
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	c = string[0];
-	if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	    oper = SCAN_MARK;
-	} else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	    oper = SCAN_DRAGTO;
-	} else {
-	    Tcl_AppendResult(interp, "bad scan operation \"", string,
-		"\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (objc == 3) {
-	if (oper == SCAN_MARK) {
-	    Tcl_SetIntObj(Tcl_GetObjResult(interp), comboPtr->scanAnchor);
-	}
-	return TCL_OK;
-    }
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (Blt_GetPixelsFromObj(interp, comboPtr->tkwin, objv[3], PIXELS_ANY, &x) 
-	 != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (oper == SCAN_MARK) {
-	comboPtr->scanAnchor = x;
-	comboPtr->scanX = comboPtr->scrollX;
-    } else {
-	int worldX, xMax;
-	int dx;
-
-	dx = comboPtr->scanAnchor - x;
-	worldX = comboPtr->scanX + (10 * dx);
-	xMax = comboPtr->viewWidth - ICWIDTH;
-
-	if (worldX < 0) {
-	    worldX = 0;
-	} else if ((worldX + xMax) >= comboPtr->textWidth) {
-	    worldX = comboPtr->textWidth - (8 * xMax / 10);
-	}
-	comboPtr->scrollX = worldX;
-	comboPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(comboPtr);
-    }
-    return TCL_OK;
-}
-
-static int
-SeeOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int offset;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[2], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    if ((offset <= comboPtr->firstOffset) || 
-	(offset >= (comboPtr->lastOffset-1))) {
-	int xMax, x;
-
-	x = Blt_TextWidth(comboPtr->font, comboPtr->screenText, offset);
-	xMax = comboPtr->viewWidth - ICWIDTH;
-	if (x >= xMax) {
-	    x -= xMax;
-	    if (offset <= comboPtr->firstOffset) {
-		x += 8 * xMax / 10;
-	    } else {
-		x += 2 * xMax / 10;
-	    }
-	} else {
-	    x = 0;
-	}
-	comboPtr->scrollX = x;
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionAdjustOp --
- *
- *	Locates the end of the selection nearest to the character given by
- *	index, and adjusts that end of the selection to be at index
- *	(i.e. including but not going beyond index).  The other end of the
- *	selection is made the anchor point for future select to commands.  If
- *	the selection isn't currently in the comboentry, then a new selection
- *	is created to include the characters between index and the most recent
- *	selection anchor point, inclusive.
- *
- *	This procedure is called back by Tk when the selection is requested by
- *	someone.  It returns part or all of the selection in a buffer provided
- *	by the caller.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The widget is possibly redrawn with the new selection.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionAdjustOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-		  Tcl_Obj *const *objv)
-{
-    int offset;
-    int half1, half2;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[3], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    half1 = (comboPtr->selFirst + comboPtr->selLast) / 2;
-    half2 = (comboPtr->selFirst + comboPtr->selLast + 1) / 2;
-    if (offset < half1) {
-	comboPtr->selAnchor = comboPtr->selLast;
-    } else if (offset > half2) {
-	comboPtr->selAnchor = comboPtr->selFirst;
-    }
-    return SelectText(comboPtr, offset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionClearOp --
- *
- *	Clears the selection.  
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The widget is possibly redrawn.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionClearOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (comboPtr->selFirst != -1) {
-	comboPtr->selFirst = comboPtr->selLast = -1;
-	EventuallyRedraw(comboPtr);
-	if (comboPtr->selCmdObjPtr != NULL) {
-	    EventuallyInvokeSelectCmd(comboPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionFromOp --
- *
- *	Sets the selection anchor point to just before the character
- *	designated by the given index.  Doesn't change the selection, just
- *	resets the anchor of the existing selection. Returns an empty string.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionFromOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    int offset;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[3], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    comboPtr->selAnchor = offset;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionPresentOp --
- *
- *	Indicates if there are characters selected in the comboentry.
- *
- * Results:
- *	Returns in the interpreter result, 1 if there is are characters 
- *	selected, 0 if nothing is selected.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionPresentOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-		   Tcl_Obj *const *objv)
-{
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (comboPtr->selFirst != -1));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionRangeOp --
- *
- *	Sets the selection to include the characters starting with the one
- *	indexed by start and ending with the one just before end.  If end
- *	refers to the same character as start or an earlier one, then the
- *	entry's selection is cleared.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionRangeOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    int selFirst, selLast;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[3], &selFirst) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetTextOffset(interp, comboPtr, objv[4], &selLast) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((selFirst == -1) || (selLast == -1)) {
-	return TCL_OK;
-    }
-    comboPtr->selAnchor = selFirst;
-    return SelectText(comboPtr, selLast);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionToOp --
- *
- *	Resets the selection depending upon the given new index.  Returns an
- *	empty string.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionToOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-	      Tcl_Obj *const *objv)
-{
-    int offset;
-
-    if (comboPtr->flags & DISABLED) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    if (GetTextOffset(interp, comboPtr, objv[3], &offset) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (offset == -1) {
-	return TCL_OK;
-    }
-    return SelectText(comboPtr, offset);
-}
-
-
-static Blt_OpSpec selectionOps[] =
-{
-    {"adjust",  1, SelectionAdjustOp,  4, 4, "index",},
-    {"clear",   1, SelectionClearOp,   3, 3, "",},
-    {"from",    1, SelectionFromOp,    4, 4, "index"},
-    {"present", 1, SelectionPresentOp, 3, 3, ""},
-    {"range",   1, SelectionRangeOp,   5, 5, "start end",},
-    {"to",      1, SelectionToOp,      4, 4, "index"},
-};
-
-static int nSelectionOps = sizeof(selectionOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionOp --
- *
- *	This procedure handles the individual options for text
- *	selections.  
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectionOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-	    Tcl_Obj *const *objv)
-{
-    ComboEntryCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSelectionOps, selectionOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * RedoOp --
- *
- *	Inserts a new item into the comboentry at the given index.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The comboentry gets a new item.
- *
- *   .cb insert index string
- *
- *---------------------------------------------------------------------------
- */
-static int
-RedoOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (comboPtr->flags & (READONLY|DISABLED)) {
-	return TCL_OK;		/* Writing is currently disabled. */
-    }
-    if (comboPtr->redoPtr != NULL) {
-	EditRecord *recPtr;
-
-	recPtr = comboPtr->redoPtr;
-	if (recPtr->type == INSERT_OP) {
-	    InsertText(comboPtr, recPtr->offset, recPtr->textLen, recPtr->text);
-	} else if (recPtr->type == DELETE_OP) {
-	    DeleteText(comboPtr, recPtr->offset, 
-		       recPtr->offset + recPtr->textLen);
-	} else {
-	    Tcl_AppendResult(interp, "unknown record type \"", 
-			     Blt_Itoa(recPtr->type), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	comboPtr->insertOffset = recPtr->insertOffset;
-	comboPtr->redoPtr = recPtr->nextPtr;
-	recPtr->nextPtr = comboPtr->undoPtr;
-	comboPtr->undoPtr = recPtr;
-	EventuallyRedraw(comboPtr);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * UndoOp --
- *
- *	Inserts a new item into the comboentry at the given index.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The comboentry gets a new item.
- *
- *   .cb insert index string
- *
- *---------------------------------------------------------------------------
- */
-static int
-UndoOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (comboPtr->flags & (READONLY|DISABLED)) {
-	return TCL_OK;		/* Writing is currently disabled. */
-    }
-    if (comboPtr->undoPtr != NULL) {
-	EditRecord *recPtr;
-
-	recPtr = comboPtr->undoPtr;
-	if (recPtr->type == INSERT_OP) {
-	    DeleteText(comboPtr, recPtr->offset, 
-		       recPtr->offset + recPtr->textLen);
-	} else if (recPtr->type == DELETE_OP) {
-	    InsertText(comboPtr, recPtr->offset, recPtr->textLen, recPtr->text);
-	} else {
-	    Tcl_AppendResult(interp, "unknown record type \"", 
-			     Blt_Itoa(recPtr->type), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	comboPtr->insertOffset = recPtr->insertOffset;
-	comboPtr->undoPtr = recPtr->nextPtr;
-	recPtr->nextPtr = comboPtr->redoPtr;
-	comboPtr->redoPtr = recPtr;
-	EventuallyRedraw(comboPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .ce unpost
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    if ((comboPtr->menuObjPtr != NULL) && 
-	((comboPtr->flags & (POSTED|DISABLED)) == POSTED)) {
-	char *menuName;
-	Tk_Window menuWin;
-
-	comboPtr->flags &= ~STATE_MASK;
-	comboPtr->flags |= NORMAL;
-
-	menuName = Tcl_GetString(comboPtr->menuObjPtr);
-	menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-	if (menuWin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	    Tcl_AppendResult(interp, "can't unpost \"", Tk_PathName(menuWin), 
-			"\": it isn't a descendant of ", 
-			Tk_PathName(comboPtr->tkwin), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Blt_UnmapToplevelWindow(menuWin);
-	if (Tk_IsMapped(menuWin)) {
-	    Tk_UnmapWindow(menuWin);
-	}
-    }
-    return TCL_OK;
-}
-    
-static int
-XviewOp(ComboEntry *comboPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    int width;
-
-    if (comboPtr->flags & (DISABLED|READONLY)) {
-	return TCL_OK;		/* Widget is currently disabled. */
-    }
-    width = comboPtr->viewWidth;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)comboPtr->scrollX / comboPtr->textWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	fract = (double)(comboPtr->scrollX + width) / comboPtr->textWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, 
-	&comboPtr->scrollX, comboPtr->textWidth, width, 
-	comboPtr->scrollUnits, BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeComboEntryProc --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeComboEntryProc(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    ComboEntry *comboPtr = (ComboEntry *)dataPtr;
-
-    iconOption.clientData = comboPtr;
-    Blt_FreeOptions(configSpecs, (char *)comboPtr, comboPtr->display, 0);
-    if (comboPtr->textInFocusGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textInFocusGC);
-    }
-    if (comboPtr->textOutFocusGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->textOutFocusGC);
-    }
-    FreeUndoRecords(comboPtr);
-    FreeRedoRecords(comboPtr);
-    if (comboPtr->screenText != NULL) {
-	Blt_Free(comboPtr->screenText);
-    }
-    if (comboPtr->selectGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->selectGC);
-    }
-    if (comboPtr->highlightGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightGC);
-    }
-    if (comboPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->highlightBgGC);
-    }
-    if (comboPtr->insertGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->insertGC);
-    }
-    if (comboPtr->insertTimerToken != NULL) {
-	Tcl_DeleteTimerHandler(comboPtr->insertTimerToken);
-    }
-    if (comboPtr->tkwin != NULL) {
-	Tk_DeleteSelHandler(comboPtr->tkwin, XA_PRIMARY, XA_STRING);
-	Tk_DeleteEventHandler(comboPtr->tkwin, EVENT_MASK, 
-		ComboEntryEventProc, comboPtr);
-    }
-    if (comboPtr->insertTimerToken != NULL) {
-	Tcl_DeleteTimerHandler(comboPtr->insertTimerToken);
-    }
-    Tcl_DeleteCommandFromToken(comboPtr->interp, comboPtr->cmdToken);
-    Blt_Free(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewComboEntry --
- *
- *---------------------------------------------------------------------------
- */
-static ComboEntry *
-NewComboEntry(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    ComboEntry *comboPtr;
-
-    comboPtr = Blt_AssertCalloc(1, sizeof(ComboEntry));
-
-    comboPtr->borderWidth = 2;
-    comboPtr->arrowBW = 2;
-    comboPtr->arrowRelief = TK_RELIEF_RAISED;
-    comboPtr->display = Tk_Display(tkwin);
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING | NORMAL | ARROW);
-    comboPtr->highlightWidth = 2;
-    comboPtr->insertOffTime = 300;
-    comboPtr->insertOffset = 0;
-    comboPtr->insertOnTime = 600;
-    comboPtr->interp = interp;
-    comboPtr->menuAnchor = TK_ANCHOR_SW;
-    comboPtr->relief = TK_RELIEF_SUNKEN;
-    comboPtr->scrollUnits = 2;
-    comboPtr->selAnchor = -1;
-    comboPtr->selFirst = -1;
-    comboPtr->selLast = -1;
-    comboPtr->text = (char *)emptyString;
-    comboPtr->textLen = 0;
-    comboPtr->tkwin = tkwin;
-    return comboPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryCmd --
- *
- * 	This procedure is invoked to process the "comboentry" command.  See
- * 	the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec comboEntryOps[] =
-{
-    {"activate",  1, ActivateOp,  3, 3, "bool",},
-    {"bbox",      1, BboxOp,      3, 3, "index",},
-    {"cget",      2, CgetOp,      3, 3, "option",},
-    {"closest",   2, ClosestOp,   3, 3, "x",},
-    {"configure", 2, ConfigureOp, 2, 0, "?option value?...",},
-    {"delete",    1, DeleteOp,    2, 0, "first ?last?",},
-    {"get",       1, GetOp,       2, 2, "",},
-    {"icursor",   2, IcursorOp,   3, 3, "index",},
-    {"identify",  2, IdentifyOp,  4, 5, "x y",},
-    {"index",     3, IndexOp,     3, 3, "index",},
-    {"insert",    3, InsertOp,    3, 0, "index string",},
-    {"invoke",    3, InvokeOp,    2, 2, "",},
-    {"post",      1, PostOp,      2, 2, "",},
-    {"redo",      2, RedoOp,      2, 2, "",},
-    {"scan",      2, ScanOp,      3, 4, "dragto|mark x",},
-    {"see",       3, SeeOp,       3, 3, "index",},
-    {"selection", 3, SelectionOp, 2, 0, "args",},
-    {"undo",      3, UndoOp,      2, 2, "",},
-    {"unpost",    3, UnpostOp,    2, 2, "",},
-#ifdef notdef
-    {"validate",  1, ValidateOp,  3, 3, "item",},
-#endif
-    {"xview",     1, XviewOp,     2, 5, "?moveto fract? ?scroll number what?",},
-};
-
-static int nComboEntryOps = sizeof(comboEntryOps) / sizeof(Blt_OpSpec);
-
-typedef int (ComboInstOp)(ComboEntry *comboPtr, Tcl_Interp *interp, int objc,
-	Tcl_Obj *const *objv);
-
-static int
-ComboEntryInstCmdProc(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument vector. */
-{
-    ComboInstOp *proc;
-    ComboEntry *comboPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nComboEntryOps, comboEntryOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(comboPtr);
-    result = (*proc) (comboPtr, interp, objc, objv);
-    Tcl_Release(comboPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryInstCmdDeletedProc --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboEntryInstCmdDeletedProc(ClientData clientData)
-{
-    ComboEntry *comboPtr = clientData; /* Pointer to widget record. */
-
-    if (comboPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = comboPtr->tkwin;
-	comboPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboEntryCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ComboEntryCmd(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    ComboEntry *comboPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tk_Window tkwin;
-    char *path;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, set up procs and initialize various
-     * bindings for the widget.  If the proc doesn't already exist, source it
-     * from "$blt_library/comboentry.tcl".  We've deferred sourcing this file
-     * until now so that the user could reset the variable $blt_library from
-     * within her script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::ComboEntry::PostMenu", &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library comboentry.tcl]";
-
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    comboPtr = NewComboEntry(interp, tkwin);
-    Tk_CreateEventHandler(tkwin, EVENT_MASK, ComboEntryEventProc, comboPtr);
-    Tk_CreateSelHandler(tkwin, XA_PRIMARY, XA_STRING, ComboEntrySelectionProc,
-	comboPtr, XA_STRING);
-    Tk_SetClass(tkwin, "ComboEntry");
-    comboPtr->cmdToken = Tcl_CreateObjCommand(interp, path, 
-	ComboEntryInstCmdProc, comboPtr, ComboEntryInstCmdDeletedProc);
-    Blt_SetWindowInstanceData(tkwin, comboPtr);
-    if (ConfigureComboEntry(interp, comboPtr, objc-2, objv+2, 0) != TCL_OK) {
-	Tk_DestroyWindow(comboPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-int
-Blt_ComboEntryInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "comboentry", ComboEntryCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawEntry --
- *
- * 	Draw the editable text associated with the entry.  The widget may be
- * 	scrolled so the text may be clipped.  We use a temporary pixmap to
- * 	draw the visible portion of the text.
- *
- *	We assume that text strings will be small for the most part.  The bad
- *	part of this is that we measure the text string 5 times.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawEntry(ComboEntry *comboPtr, Drawable drawable, int x, int y, int w, int h) 
-{
-    Blt_FontMetrics fm;
-    Pixmap pixmap;
-    int insertX;
-    int textX, textY;
-    Blt_Background bg;
-    GC gc;
-
-#define TEXT_FLAGS (TK_PARTIAL_OK | TK_AT_LEAST_ONE)
-    if (comboPtr->textHeight <= 0) {
-	return;
-    }
-    if (h > comboPtr->entryHeight) {
-	h = comboPtr->entryHeight;
-    }
-    if (comboPtr->image != NULL) {
-	int imgX, imgY, imgWidth, imgHeight;
-
-	imgWidth = comboPtr->textWidth;
-	if (comboPtr->scrollX < imgWidth) {
-	    imgX = comboPtr->scrollX;
-	    imgY = y;
-	    if (comboPtr->entryHeight > comboPtr->iconHeight) {
-		imgY += (comboPtr->entryHeight - comboPtr->iconHeight) / 2;
-	    }
-	    imgWidth -= comboPtr->scrollX;
-	    if (imgWidth > w) {
-		imgWidth = w;
-	    }
-	    imgHeight = MIN(h, comboPtr->iconHeight);
-	    Tk_RedrawImage(IconImage(comboPtr->image), imgX, 0, imgWidth, 
-		       imgHeight, drawable, x, y);
-	}
-	return;
-    }
-    Blt_GetFontMetrics(comboPtr->font, &fm);
-    textY = fm.ascent;
-    if (comboPtr->entryHeight > comboPtr->textHeight) {
-	textY += (comboPtr->entryHeight - comboPtr->textHeight) / 2;
-    }
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    /*
-     * Create a pixmap the size of visible text area. This will be used for
-     * clipping the scrolled text string.
-     */
-    pixmap = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-	w, h, Tk_Depth(comboPtr->tkwin));
-
-    if ((comboPtr->flags & (FOCUS|READONLY)) == FOCUS) {
-	bg = comboPtr->inFocusBg;
-	gc = comboPtr->textInFocusGC;
-    } else {
-	bg = comboPtr->outFocusBg;
-	gc = comboPtr->textOutFocusGC;
-    }
-    /* Text background. */
-    { 
-	int xOrigin, yOrigin;
-
-	Blt_GetBackgroundOrigin(bg, &xOrigin, &yOrigin);
-	Blt_SetBackgroundOrigin(comboPtr->tkwin, bg, xOrigin+x, yOrigin+y);
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, pixmap, bg, 0, 0, w, h, 
-		0, TK_RELIEF_FLAT);
-	Blt_SetBackgroundOrigin(comboPtr->tkwin, bg, xOrigin, yOrigin);
-    }	
-    if (comboPtr->flags & SCROLL_PENDING) {
-	int firstX, textWidth;
-
-	/* Find the range of visible characters in both bytes and pixels. */
-	comboPtr->firstOffset = comboPtr->lastOffset = 
-	    Blt_MeasureChars(comboPtr->font, comboPtr->screenText, 
-		comboPtr->textLen, comboPtr->scrollX, 0, &firstX);
-	comboPtr->lastOffset +=  Blt_MeasureChars(comboPtr->font, 
-		comboPtr->screenText + comboPtr->firstOffset, 
-		comboPtr->textLen - comboPtr->firstOffset,
-		w, TEXT_FLAGS, &textWidth);
-	if (comboPtr->lastOffset < comboPtr->textLen) {
-	    comboPtr->lastOffset++;
-	}
-	comboPtr->firstX = firstX;
-	comboPtr->lastX = textWidth + firstX;
-    }
-    /* 
-     * The viewport starts somewhere over the first visible character, but not
-     * necessarily at the start of the character.  Subtract the viewport
-     * offset from the start of the first character.  This is zero or a
-     * negative x-coordinate, indicating where start drawing the text so that
-     * it's properly clipped by the temporary pixmap. */
-    textX = comboPtr->firstX - comboPtr->scrollX;
-	
-    insertX = -1;
-    if (((comboPtr->flags & (FOCUS|ICURSOR_ON|DISABLED|READONLY)) 
-	 == (FOCUS|ICURSOR_ON)) && (comboPtr->selFirst == -1) && 
-	(comboPtr->insertOffset >= comboPtr->firstOffset) && 
-	(comboPtr->insertOffset <= comboPtr->lastOffset)) {
-	insertX = textX;
-	if (comboPtr->insertOffset > comboPtr->firstOffset) { 
-	    insertX += Blt_TextWidth(comboPtr->font, 
-		comboPtr->screenText + comboPtr->firstOffset, 
-		comboPtr->insertOffset - comboPtr->firstOffset);
-	}
-	if (insertX > (comboPtr->lastX - comboPtr->firstX)) {
-	    insertX = -1;
-	}
-    }
-
-    /*
-     *	Text is drawn in (up to) three segments.
-     *
-     *	  1) Any text before the start the selection.  2) The selected text
-     *	  (drawn with a flat border) 3) Any text following the selection.
-     *	  This step will draw the text string if there is no selection.
-     */
-
-    /* Step 1. Draw any text preceding the selection that's still visible in
-     *         the viewport. */
-    if (comboPtr->selFirst >= comboPtr->firstOffset) {
-	int nPixels, len, nBytes;
-	int selFirst;
-
-	selFirst = comboPtr->selFirst;
-	if (selFirst > comboPtr->lastOffset) {
-	    selFirst = comboPtr->lastOffset;
-	}
-	len = selFirst - comboPtr->firstOffset;
-	nBytes = Blt_MeasureChars(comboPtr->font, 
-		comboPtr->screenText + comboPtr->firstOffset, len, w, 
-		TEXT_FLAGS, &nPixels);
-	Blt_DrawChars(Tk_Display(comboPtr->tkwin), pixmap, gc, comboPtr->font, 
-		Tk_Depth(comboPtr->tkwin), 0.0f, 
-		comboPtr->screenText + comboPtr->firstOffset, nBytes, 
-		textX, textY);
-	textX += nPixels;
-    }
-    /* Step 2. Draw the selection itself, if it's visible in the
-     *         viewport. Otherwise step 1 drew as much as we need. */
-    if ((comboPtr->selFirst >= 0) && 
-	(comboPtr->selFirst <= comboPtr->lastOffset)) {	
-	Blt_Background bg;
-	int nBytes, nPixels;
-	int selFirst, selLast;
-
-	/* The background of the selection rectangle is different depending
-	 * whether the widget has focus or not. */
-	bg = comboPtr->selectBg;
-	selFirst = comboPtr->selFirst;
-	if (selFirst < comboPtr->firstOffset) {
-	    selFirst = comboPtr->firstOffset;
-	}
-	selLast = comboPtr->selLast;
-	if (selLast > comboPtr->lastOffset) {
-	    selLast = comboPtr->lastOffset;
-	}
-	nBytes = Blt_MeasureChars(comboPtr->font, 
-		comboPtr->screenText + selFirst, selLast - selFirst, w, 
-		TEXT_FLAGS, &nPixels);
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, pixmap, bg, textX, 0, 
-		nPixels, h, 0, TK_RELIEF_FLAT);
-	Blt_DrawChars(Tk_Display(comboPtr->tkwin), pixmap, comboPtr->selectGC, 
-		comboPtr->font, Tk_Depth(comboPtr->tkwin), 0.0f, 
-		comboPtr->screenText + selFirst, nBytes, textX, textY);
-	textX += nPixels;
-    }
-    /* Step 3.  Draw any text following the selection that's visible
-     *		in the viewport. In the case of no selection, we draw
-     *		the entire text string. */
-    if (comboPtr->selLast < comboPtr->lastOffset) {		
-	int selLast;
-
-	selLast = comboPtr->selLast;
-	if (selLast < comboPtr->firstOffset) {
-	    selLast = comboPtr->firstOffset;
-	}
-	Blt_DrawChars(Tk_Display(comboPtr->tkwin), pixmap, gc, 
-		comboPtr->font, Tk_Depth(comboPtr->tkwin), 0.0f, 
-		comboPtr->screenText + selLast, comboPtr->lastOffset - selLast,
-		textX, textY);
-    }
-    /* Draw the insertion cursor, if one is needed. */
-    if (insertX >= 0) {
-	int y1, y2;
-
-	y1 = 1;
-	y2 = h - 2;
-	XDrawLine(Tk_Display(comboPtr->tkwin), pixmap, comboPtr->insertGC, 
-		insertX, y1, insertX, y2);
-	XDrawLine(Tk_Display(comboPtr->tkwin), pixmap, comboPtr->insertGC, 
-		insertX + 1, y1, insertX + 1, y2);
-    }
-    XCopyArea(comboPtr->display, pixmap, drawable, gc, 0, 0, w, h, 
-	x, y);
-    Tk_FreePixmap(comboPtr->display, pixmap);
-}
-
-static void
-DrawComboEntry(ComboEntry *comboPtr, Drawable drawable, int width, int height)
-{
-    Blt_Background bg;
-    int x, y, w, h;
-
-    /* Background (just inside of focus highlight ring). */
-    x = y = comboPtr->inset;
-    w = width  - (2 * comboPtr->inset);
-    h = height - (2 * comboPtr->inset);
-    if (comboPtr->flags & FOCUS) {
-	bg = comboPtr->inFocusBg;
-    } else {
-	bg = comboPtr->outFocusBg;
-    }
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, w, h, 0, 
-	TK_RELIEF_FLAT);
-
-    /* Label: includes icon and text. */
-	
-    if (comboPtr->flags & ARROW) {
-	w -= comboPtr->arrowWidth;
-    }
-    if (h > comboPtr->entryHeight) {
-	y += (h - comboPtr->entryHeight) / 2;
-    }
-    /* Draw Icon. */
-    if (comboPtr->icon != NULL) {
-	int ix, iy, iw, ih;
-	
-	ix = x + IPAD;
-	iy = y + YPAD;
-	iw = MIN(w, comboPtr->iconWidth);
-	ih = MIN(h, comboPtr->iconHeight);
-	if (comboPtr->iconHeight < comboPtr->entryHeight) {
-	    iy += (comboPtr->entryHeight - comboPtr->iconHeight) / 2;
-	}
-	if ((Blt_IsPicture(IconImage(comboPtr->icon))) && 
-	    (comboPtr->flags & DISABLED)) {
-	    Blt_Picture picture;
-	    Blt_Painter painter;
-
-	    painter = Blt_GetPainter(comboPtr->tkwin, 1.0);
-	    picture = Blt_GetPictureFromImage(IconImage(comboPtr->icon));
-	    picture = Blt_GreyscalePicture(picture);
-	    Blt_PaintPicture(painter, drawable, picture, 0, 0, iw, ih,ix,iy,0);
-	    Blt_FreePicture(picture);
-	} else {
-	    Tk_RedrawImage(IconImage(comboPtr->icon), 0, 0, iw, ih, drawable, 
-		ix, iy);
-	}
-	x += comboPtr->iconWidth;
-	w -= comboPtr->iconWidth;
-    }
-    comboPtr->viewWidth = width;
-    if ((w > 0) && (h > 0)) {
-	DrawEntry(comboPtr, drawable, x + IPAD, y + YPAD + 1, w, h);
-	x += comboPtr->entryWidth;
-    }
-    if (comboPtr->flags & DISABLED) {
-	bg = comboPtr->disabledBg;
-    } else if (comboPtr->flags & ACTIVE) {
-	bg = comboPtr->activeBg;
-    } else {
-	bg = comboPtr->normalBg;
-    }
-    /* Arrow. */
-    if (comboPtr->flags & ARROW) {
-	XColor *color;
-
-	x = width - (comboPtr->inset + comboPtr->arrowWidth) + 
-	    comboPtr->arrowPad;
-	y = comboPtr->inset + comboPtr->arrowPad;
-	if (x < 0) {
-	    x = comboPtr->inset;
-	}
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, 
-		comboPtr->arrowWidth - 2 * comboPtr->arrowPad, 
-		h - 2 * comboPtr->arrowPad, comboPtr->arrowBW, 
-		comboPtr->arrowRelief);
-	if (comboPtr->flags & ACTIVE) {
-	    color = comboPtr->activeColor;
-	} else if (comboPtr->flags & DISABLED) {
-	    color = comboPtr->disabledColor;
-	} else {
-	    color = comboPtr->normalColor;
-	}
-	Blt_DrawArrow(comboPtr->display, drawable, color, 
-		      x + comboPtr->arrowPad, y + comboPtr->arrowPad, 
-		      comboPtr->arrowWidth - 2 * (comboPtr->arrowPad),
-		h - 2 * comboPtr->arrowPad, comboPtr->arrowBW + 1, ARROW_DOWN);
-    }
-    /* Draw focus highlight ring. */
-    if (comboPtr->highlightWidth > 0) {
-	GC gc;
-
-	if ((comboPtr->flags & (FOCUS|READONLY)) == FOCUS) {
-	    gc = comboPtr->highlightGC;
-	} else {
-	    gc = comboPtr->highlightBgGC;
-	}
-	if (gc == NULL) {
-	    Blt_DrawFocusBackground(comboPtr->tkwin, bg, 
-		comboPtr->highlightWidth, drawable);
-	} else {
-	    Tk_DrawFocusHighlight(comboPtr->tkwin, gc, comboPtr->highlightWidth,
-		 drawable);
-	}	    
-    }
-    if ((comboPtr->relief != TK_RELIEF_FLAT) && (comboPtr->borderWidth > 0)) {
-	Blt_DrawBackgroundRectangle(comboPtr->tkwin, drawable, 
-		comboPtr->normalBg, comboPtr->highlightWidth, 
-		comboPtr->highlightWidth, width - 2 * comboPtr->highlightWidth, 
-		height - 2 * comboPtr->highlightWidth, comboPtr->borderWidth, 
-		comboPtr->relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayComboEntry --
- *
- *	This procedure is invoked to display a comboentry widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the comboentry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayComboEntry(ClientData clientData)
-{
-    ComboEntry *comboPtr = clientData;
-    Pixmap drawable;
-    int w, h;			/* Window width and height. */
-
-    comboPtr->flags &= ~REDRAW_PENDING;
-    if (comboPtr->tkwin == NULL) {
-	return;			/* Window destroyed (should not get here) */
-    }
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayComboEntry(%s)\n", 
-	    Tk_PathName(comboPtr->tkwin));
-#endif
-    w = Tk_Width(comboPtr->tkwin);
-    h = Tk_Height(comboPtr->tkwin);
-    if ((w <= 1) || (h <=1)) {
-	/* Don't bother computing the layout until the window size is
-	 * something reasonable. */
-	return;
-    }
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeEntryGeometry(comboPtr);
-	comboPtr->flags |= SCROLL_PENDING;
-    }
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	/* The widget's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the comboentry's new layout.  */
-	return;
-    }
-    /*
-     * Create a pixmap the size of the window for double buffering.
-     */
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-		w, h, Tk_Depth(comboPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    DrawComboEntry(comboPtr, drawable, w, h);
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin),
-	comboPtr->textInFocusGC, 0, 0, w, h, 0, 0);
-    Tk_FreePixmap(comboPtr->display, drawable);
-
-    if (comboPtr->flags & SCROLL_PENDING) {
-	if (comboPtr->scrollCmdObjPtr != NULL) {
-	    Blt_UpdateScrollbar(comboPtr->interp, comboPtr->scrollCmdObjPtr,
-		comboPtr->scrollX, comboPtr->scrollX + comboPtr->viewWidth,
-		comboPtr->textWidth);
-	}
-	comboPtr->flags &= ~SCROLL_PENDING;
-    }
-}
diff --git a/blt3.0/src/bltComboMenu.c b/blt3.0/src/bltComboMenu.c
deleted file mode 100755
index a33e6f9..0000000
--- a/blt3.0/src/bltComboMenu.c
+++ /dev/null
@@ -1,6503 +0,0 @@
-
-/*
- * bltComboMenu.c --
- *
- * This module implements a combomenu widget for the BLT toolkit.
- *
- *	Copyright 2006 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltBind.h"
-#include "bltImage.h"
-#include "bltPicture.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltHash.h"
-#include "bltBgStyle.h"
-#include "bltPainter.h"
-#include "bltSwitch.h"
-
-static const char emptyString[] = "";
-
-#define MAXSCROLLBARTHICKNESS	100
-
-#define REDRAW_PENDING		(1<<0)
-#define LAYOUT_PENDING		(1<<1)
-#define UPDATE_PENDING		(1<<2)
-#define FOCUS			(1<<3)
-#define SCROLLX			(1<<4)
-#define SCROLLY			(1<<5)
-#define SCROLL_PENDING		(SCROLLX|SCROLLY)
-
-#define INSTALL_XSCROLLBAR	(1<<8)
-#define INSTALL_YSCROLLBAR	(1<<9)
-
-#define RESTRICT_MIN		(1<<10)
-#define RESTRICT_MAX		(1<<11)
-#define RESTRICT_NONE		(0)
-
-#define VAR_FLAGS (TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS)
-
-#define PIXMAPX(cm, wx)	((wx) - (cm)->xOffset)
-#define PIXMAPY(cm, wy)	((wy) - (cm)->yOffset)
-
-#define SCREENX(cm, wx)	((wx) - (cm)->xOffset + (cm)->borderWidth)
-#define SCREENY(cm, wy)	((wy) - (cm)->yOffset + (cm)->borderWidth)
-
-#define WORLDX(cm, sx)	((sx) - (cm)->borderWidth + (cm)->xOffset)
-#define WORLDY(cm, sy)	((sy) - (cm)->borderWidth + (cm)->yOffset)
-
-#define VPORTWIDTH(cm)	\
-    (Tk_Width((cm)->tkwin) - 2 * (cm)->borderWidth - (cm)->yScrollbarWidth)
-#define VPORTHEIGHT(cm) \
-    (Tk_Height((cm)->tkwin) - 2 * (cm)->borderWidth - (cm)->xScrollbarHeight)
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-#define CLAMP(x,min,max) ((((x) < (min)) ? (min) : ((x) > (max)) ? (max) : (x)))
-
-#define ITEM_IPAD	   3
-#define ITEM_XPAD	   2
-#define ITEM_YPAD	   1
-#define ITEM_SEP_HEIGHT	   6
-#define ITEM_L_IND_WIDTH  19
-#define ITEM_L_IND_HEIGHT 19
-#define ITEM_R_IND_WIDTH  13
-#define ITEM_R_IND_HEIGHT 13
-
-#define ITEM_MAP	  (1<<1)	/* Item needs to be remapped  */
-#define ITEM_REDRAW	  (1<<2)	/* Item needs to be redrawn. */
-#define ITEM_SELECTED	  (1<<4)	/* Radiobutton/checkbutton is
-					 * selected. */
-
-/* Item state. */
-#define ITEM_NORMAL	  (1<<5)	/* Draw item normally. */
-#define ITEM_DISABLED	  (1<<6)	/* Item is disabled. */
-#define ITEM_ACTIVE	  (1<<7)	/* Item is currently active. */
-#define ITEM_STATE_MASK   ((ITEM_DISABLED)|(ITEM_ACTIVE)|(ITEM_NORMAL))
-
-/* Item type. */
-#define ITEM_BUTTON	  (1<<9)	/* Item is command button. */
-#define ITEM_RADIOBUTTON  (1<<10)	/* Item is radiobutton. */
-#define ITEM_CHECKBUTTON  (1<<11)	/* Item is checkbutton. */
-#define ITEM_CASCADE	  (1<<12)	/* Item is cascade. */
-#define ITEM_SEPARATOR	  (1<<13)	/* Item is separator. */
-#define ITEM_TYPE_MASK    ((ITEM_BUTTON)|(ITEM_RADIOBUTTON)|(ITEM_CHECKBUTTON)|\
-			   (ITEM_CASCADE)|(ITEM_SEPARATOR))
-
-#define DEF_COMBO_BORDERWIDTH	    "1"
-#define DEF_COMBO_CURSOR            ((char *)NULL)
-#define DEF_COMBO_HEIGHT	    "0"
-#define DEF_COMBO_ICON_VARIABLE	    ((char *)NULL)
-#define DEF_COMBO_POST_CMD	    ((char *)NULL)
-#define DEF_COMBO_RELIEF	    "solid"
-#define DEF_COMBO_SCROLLBAR	    ((char *)NULL)
-#define DEF_COMBO_SCROLL_CMD	    ((char *)NULL)
-#define DEF_COMBO_SCROLL_INCR	    "2"
-#define DEF_COMBO_TAKE_FOCUS        "1"
-#define DEF_COMBO_TEXT_VARIABLE	    ((char *)NULL)
-#define DEF_COMBO_WIDTH             "0"
-#define	DEF_COMBO_CHECKBUTTON_FILL_COLOR	(char *)NULL
-#define	DEF_COMBO_CHECKBUTTON_OUTLINE_COLOR	(char *)NULL
-#define	DEF_COMBO_CHECKBUTTON_COLOR		RGB_RED
-#define DEF_COMBO_CHECKBUTTON_SIZE		"12"
-#define DEF_COMBO_RADIOBUTTON_FILL_COLOR	RGB_WHITE
-#define	DEF_COMBO_RADIOBUTTON_OUTLINE_COLOR	RGB_BLACK
-#define DEF_COMBO_RADIOBUTTON_COLOR		RGB_GREEN
-#define DEF_COMBO_RADIOBUTTON_SIZE		"12"
-
-#define DEF_ITEM_ACCELERATOR	    ((char *)NULL)
-#define DEF_ITEM_BITMAP             ((char *)NULL)
-#define DEF_ITEM_COMMAND	    ((char *)NULL)
-#define DEF_ITEM_DATA		    ((char *)NULL)
-#define DEF_ITEM_ICON               ((char *)NULL)
-#define DEF_ITEM_IMAGE              ((char *)NULL)
-#define DEF_ITEM_INDENT		    "0"
-#define DEF_ITEM_MENU               ((char *)NULL)
-#define DEF_ITEM_OFF_VALUE          "0"
-#define DEF_ITEM_ON_VALUE           "1"
-#define DEF_ITEM_STATE		    "normal"
-#define DEF_ITEM_STYLE		    "default"
-#define DEF_ITEM_TAGS		    ((char *)NULL)
-#define DEF_ITEM_TEXT               ((char *)NULL)
-#define DEF_ITEM_TIP		    ((char *)NULL)
-#define DEF_ITEM_TYPE		    "command"
-#define DEF_ITEM_UNDERLINE	    "-1"
-#define DEF_ITEM_VALUE              ((char *)NULL)
-#define DEF_ITEM_VARIABLE	    ((char *)NULL)
-#define DEF_STYLE_ACCEL_ACTIVE_FG   RGB_WHITE
-#define DEF_STYLE_ACCEL_FG	    RGB_BLACK
-#define DEF_STYLE_ACCEL_FONT	    STD_FONT_SMALL
-#define DEF_STYLE_ACTIVE_BG	    RGB_SKYBLUE4
-#define DEF_STYLE_ACTIVE_FG	    RGB_WHITE
-#define DEF_STYLE_ACTIVE_RELIEF	    "flat"
-#define DEF_STYLE_BG		    RGB_WHITE
-#define DEF_STYLE_BORDERWIDTH	    "0"
-#define DEF_STYLE_DISABLED_ACCEL_FG STD_DISABLED_FOREGROUND
-#define DEF_STYLE_DISABLED_BG       DISABLED_BACKGROUND
-#define DEF_STYLE_DISABLED_FG       DISABLED_FOREGROUND
-#define DEF_STYLE_FG                RGB_BLACK
-#define DEF_STYLE_FONT		    STD_FONT_SMALL
-#define DEF_STYLE_IND_FILL_COLOR    (char *)NULL
-#define DEF_STYLE_IND_OUTLINE_COLOR (char *)NULL
-#define DEF_STYLE_IND_COLOR	    (char *)NULL
-#define DEF_STYLE_IND_SIZE	    "12"
-#define DEF_STYLE_RELIEF	    "flat"
-#define DISABLED_BACKGROUND	    RGB_GREY90
-#define DISABLED_FOREGROUND         RGB_GREY82
-
-
-static Blt_OptionFreeProc FreeStyleProc;
-static Blt_OptionParseProc ObjToStyleProc;
-static Blt_OptionPrintProc StyleToObjProc;
-static Blt_CustomOption styleOption = {
-    ObjToStyleProc, StyleToObjProc, FreeStyleProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeTagsProc;
-static Blt_OptionParseProc ObjToTagsProc;
-static Blt_OptionPrintProc TagsToObjProc;
-static Blt_CustomOption tagsOption = {
-    ObjToTagsProc, TagsToObjProc, FreeTagsProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToTypeProc;
-static Blt_OptionPrintProc TypeToObjProc;
-static Blt_CustomOption typeOption = {
-    ObjToTypeProc, TypeToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeLabelProc;
-static Blt_OptionParseProc ObjToLabelProc;
-static Blt_OptionPrintProc LabelToObjProc;
-static Blt_CustomOption labelOption = {
-    ObjToLabelProc, LabelToObjProc, FreeLabelProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeIconProc;
-static Blt_OptionParseProc ObjToIconProc;
-static Blt_OptionPrintProc IconToObjProc;
-static Blt_CustomOption iconOption = {
-    ObjToIconProc, IconToObjProc, FreeIconProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeTraceVarProc;
-static Blt_OptionParseProc ObjToTraceVarProc;
-static Blt_OptionPrintProc TraceVarToObjProc;
-static Blt_CustomOption traceVarOption = {
-    ObjToTraceVarProc, TraceVarToObjProc, FreeTraceVarProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToStateProc;
-static Blt_OptionPrintProc StateToObjProc;
-static Blt_CustomOption stateOption = {
-    ObjToStateProc, StateToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToRestrictProc;
-static Blt_OptionPrintProc RestrictToObjProc;
-static Blt_CustomOption restrictOption = {
-    ObjToRestrictProc, RestrictToObjProc, NULL, (ClientData)0
-};
-
-extern Blt_CustomOption bltLimitsOption;
-
-typedef struct _ComboMenu ComboMenu;
-
-/*
- * Icon --
- *
- *	Since instances of the same Tk image can be displayed in different
- *	windows with possibly different color palettes, Tk internally stores
- *	each instance in a linked list.  But if the instances are used in the
- *	same widget and therefore use the same color palette, this adds a lot
- *	of overhead, especially when deleting instances from the linked list.
- *
- *	For the combomenu widget, we never need more than a single instance of
- *	an image, regardless of how many times it's used.  Cache the image,
- *	maintaining a reference count for each image used in the widget.  It's
- *	likely that the combomenu widget will use many instances of the same
- *	image.
- */
-
-typedef struct _Icon {
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    Blt_HashEntry *hPtr;		/* Hash table pointer to the image. */
-    int refCount;			/* Reference count for this image. */
-    short int width, height;		/* Dimensions of the cached image. */
-} *Icon;
-
-#define IconHeight(i)	((i)->height)
-#define IconWidth(i)	((i)->width)
-#define IconImage(i)	((i)->tkImage)
-#define IconName(i)	(Blt_Image_Name(IconImage(i)))
-
-typedef struct {
-    const char *name;
-    Blt_HashEntry *hPtr;
-    ComboMenu *comboPtr;
-    int refCount;			/* Indicates if the style is currently
-					 * in use in the combomenu. */
-    int borderWidth;
-    int relief;
-    int activeRelief;
-    int reqIndWidth;
-
-    Blt_Background normalBg;
-    Blt_Background activeBg;
-    Blt_Background disabledBg;
-
-    XColor *normalFgColor;
-    XColor *activeFgColor;
-    XColor *disabledFgColor;
-
-    Blt_Font accelFont;			/* Font of accelerator text. */
-    XColor *accelNormalColor;		/* Color of accelerator text. */
-    XColor *accelDisabledColor;		/* Color of accelerator text. */
-    XColor *accelActiveColor;		/* Color of accelerator background. */
-
-    Blt_Font labelFont;			/* Font of the label */
-    XColor *labelNormalColor;		/* Color of label text. */
-    XColor *labelDisabledColor;		/* Color of label background. */
-    XColor *labelActiveColor;		/* Color of label background. */
-
-    /* Radiobuttons, checkbuttons, and cascades. */
-    Blt_Picture radiobutton[3];
-    Blt_Picture checkbutton[3];
-
-    XColor *indOutlineColor;
-    XColor *indFillColor;
-    XColor *indColor;
-    
-    GC accelActiveGC;
-    GC accelDisabledGC;
-    GC accelNormalGC;
-    GC labelActiveGC;
-    GC labelDisabledGC;
-    GC labelNormalGC;
-} Style;
-
-static Blt_ConfigSpec styleConfigSpecs[] =
-{
-    {BLT_CONFIG_FONT, "-acceleratorfont", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_ACCEL_FONT, Blt_Offset(Style, accelFont), 0},
-    {BLT_CONFIG_COLOR, "-acceleratorforeground", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_ACCEL_FG, Blt_Offset(Style, accelNormalColor), 0},
-    {BLT_CONFIG_COLOR, "-activeacceleratorforeground", (char *)NULL, 
-	(char *)NULL, DEF_STYLE_ACCEL_ACTIVE_FG, 
-	Blt_Offset(Style, accelActiveColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-activebackground", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_ACTIVE_BG, Blt_Offset(Style, activeBg), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_ACTIVE_FG, Blt_Offset(Style, labelActiveColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_ACTIVE_RELIEF, Blt_Offset(Style, activeRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", (char *)NULL, (char *)NULL,
-	DEF_STYLE_BG, Blt_Offset(Style, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", (char *)NULL, (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", (char *)NULL, (char *)NULL,
-	DEF_STYLE_BORDERWIDTH, Blt_Offset(Style, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-disabledacceleratorforeground", (char *)NULL, 
-	(char *)NULL, DEF_STYLE_DISABLED_ACCEL_FG, 
-	Blt_Offset(Style, accelDisabledColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-disabledbackground", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_DISABLED_BG, Blt_Offset(Style, disabledBg), 0},
-    {BLT_CONFIG_COLOR, "-disabledforeground", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_DISABLED_FG, Blt_Offset(Style, labelDisabledColor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", (char *)NULL, (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", (char *)NULL, (char *)NULL, DEF_STYLE_FG, 
-	Blt_Offset(Style, labelNormalColor), 0},
-    {BLT_CONFIG_FONT, "-font", (char *)NULL, (char *)NULL, DEF_STYLE_FONT, 
-        Blt_Offset(Style, labelFont), 0},
-    {BLT_CONFIG_COLOR, "-indicatorfillcolor", (char *)NULL, (char *)NULL, 
-        DEF_STYLE_IND_FILL_COLOR, Blt_Offset(Style, indFillColor), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-indicatoroutlinecolor", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_IND_OUTLINE_COLOR, Blt_Offset(Style, indOutlineColor), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-indicatorcolor", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_IND_COLOR, Blt_Offset(Style, indColor), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-indicatorsize", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_IND_SIZE, Blt_Offset(Style, reqIndWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", (char *)NULL, (char *)NULL, 
-	DEF_STYLE_RELIEF, Blt_Offset(Style, relief), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-/*
- *
- *  [left indicator] [icon] [label] [right indicator/accel] [scrollbar]
- *   
- * left indicator:	checkbutton or radiobutton entries.
- * icon:		all entries.
- * label:		all entries.
- * accel:		checkbutton, radiobutton, or button entries.
- * right indicator:     cascade item only.
- */
-typedef struct  {
-    ComboMenu *comboPtr;		/* Combomenu containing this item. */
-    long index;				/* Index of the item (numbered from 0)*/
-    int xWorld, yWorld;			/* Upper left world-coordinate of item
-					 * in menu. */
-    Style *stylePtr;			/* Style used by this item. */
-    unsigned int flags;			/* Contains various bits of
-					 * information about the item, such as
-					 * type, state. */
-    Blt_ChainLink link;
-    int relief;
-    int underline;			/* Underlined character. */
-    int indent;				/* # of pixels to indent the icon. */
-    Icon image;				/* If non-NULL, image to be displayed
-					 * instead of text label. */
-    Icon icon;				/* Button, RadioButton, and
-					 * CheckButton entries. */
-    const char *label;			/* Label to be displayed. */
-    const char *accel;			/* Accelerator text. May be NULL.*/
-    Tcl_Obj *cmdObjPtr;			/* Command to be invoked when item is
-					 * clicked. */
-    Tcl_Obj *dataObjPtr;		/* User-data associated with this
-					 * item. */
-    Tcl_Obj *variableObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable will be set to the
-					 * value string of the selected
-					 * item. */
-    Tcl_Obj *valueObjPtr;		/* Radiobutton value. */
-
-    /* Checkbutton on and off values. */
-    Tcl_Obj *onValueObjPtr;		/* Checkbutton on-value. */
-    Tcl_Obj *offValueObjPtr;		/* Checkbutton off-value. */
-
-    /* Cascade menu. */
-    Tcl_Obj *menuObjPtr;		/* Name of the sub-menu. */
-
-    Tcl_Obj *tagsObjPtr;
-
-    Tcl_Obj *tipObjPtr;
-
-    short int labelWidth, labelHeight;
-    short int iconWidth, iconHeight;
-    short int leftIndWidth, leftIndHeight;
-    short int rightIndWidth, rightIndHeight;
-    short int width, height;
-
-} Item;
-
-static Blt_ConfigSpec itemConfigSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-accelerator", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_ACCELERATOR, Blt_Offset(Item, accel), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-command", (char *)NULL, (char *)NULL, DEF_ITEM_COMMAND, 
-	Blt_Offset(Item, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-data", (char *)NULL, (char *)NULL, DEF_ITEM_DATA, 
-	Blt_Offset(Item, dataObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-icon", (char *)NULL, (char *)NULL, DEF_ITEM_ICON, 
-	Blt_Offset(Item, icon), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_CUSTOM, "-image", (char *)NULL, (char *)NULL, DEF_ITEM_IMAGE, 
-	Blt_Offset(Item, image), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-indent", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_INDENT, Blt_Offset(Item, indent), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-menu", (char *)NULL, (char *)NULL, DEF_ITEM_MENU, 
-	Blt_Offset(Item, menuObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-offvalue", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_OFF_VALUE, Blt_Offset(Item, offValueObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-onvalue", (char *)NULL, (char *)NULL, DEF_ITEM_ON_VALUE, 
-	Blt_Offset(Item, onValueObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-state", (char *)NULL, (char *)NULL, DEF_ITEM_STATE, 
-	Blt_Offset(Item, flags), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption},
-    {BLT_CONFIG_CUSTOM, "-style", (char *)NULL, (char *)NULL, DEF_ITEM_STYLE, 
-	Blt_Offset(Item, stylePtr), 0, &styleOption},
-     {BLT_CONFIG_CUSTOM, "-tags", (char *)NULL, (char *)NULL,
-        DEF_ITEM_TAGS, 0, BLT_CONFIG_NULL_OK, &tagsOption},
-    {BLT_CONFIG_CUSTOM, "-text", (char *)NULL, (char *)NULL, DEF_ITEM_TEXT, 
-        Blt_Offset(Item, label), BLT_CONFIG_NULL_OK, &labelOption},
-    {BLT_CONFIG_OBJ, "-tooltip", (char *)NULL, (char *)NULL, DEF_ITEM_TIP, 
-         Blt_Offset(Item, tipObjPtr), BLT_CONFIG_NULL_OK},
-     {BLT_CONFIG_CUSTOM, "-type", (char *)NULL, (char *)NULL, DEF_ITEM_TYPE, 
-	Blt_Offset(Item, flags), BLT_CONFIG_DONT_SET_DEFAULT, &typeOption},
-    {BLT_CONFIG_INT, "-underline", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_UNDERLINE, Blt_Offset(Item, underline), 
-	BLT_CONFIG_DONT_SET_DEFAULT },
-    {BLT_CONFIG_OBJ, "-value", (char *)NULL, (char *)NULL, DEF_ITEM_VALUE, 
-         Blt_Offset(Item, valueObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-variable", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_VARIABLE, Blt_Offset(Item, variableObjPtr), BLT_CONFIG_NULL_OK,
-	&traceVarOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-struct _ComboMenu {
-
-    /*
-     * This works around a bug in the Tk API.  Under Win32, Tk tries to
-     * read the widget record of toplevel windows (TopLevel or Frame widget),
-     * to get its menu name field.  What this means is that we must carefully
-     * arrange the fields of this widget so that the menuName field is at the
-     * same offset in the structure.
-     */
-
-    Tk_Window tkwin;			/* Window that embodies the frame.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up. */
-    Display *display;			/* Display containing widget.  Used,
-					 * among other things, so that
-					 * resources can be freed even after
-					 * tkwin has gone away. */
-    Tcl_Interp *interp;			/* Interpreter associated with widget.
-					 * Used to delete widget command. */
-    Tcl_Command cmdToken;		/* Token for widget's command. */
-    Tcl_Obj *postCmdObjPtr;		/* If non-NULL, command to be executed
-					 * when this menu is posted. */
-    unsigned int flags;
-    Tcl_Obj *iconVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable will be set to the
-					 * name of the Tk image representing
-					 * the icon of the selected item.  */
-    Tcl_Obj *textVarObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable will be set to the
-					 * text string of the label of the
-					 * selected item. */
-    Tcl_Obj *takeFocusObjPtr;		/* Value of -takefocus option; not
-					 * used in the C code, but used by
-					 * keyboard * traversal scripts. */
-    char *menuName;			/* Textual description of menu to use
-					 * for menubar. Malloc-ed, may be
-					 * NULL. */
-    Tk_Cursor cursor;			/* Current cursor for window or None. */
-
-    Tk_Anchor anchor;
-
-    Blt_Limits reqWidth, reqHeight;     
-    int relief;
-    int borderWidth;
-
-    Style defStyle;			/* Default style. */
-
-    int parentWidth;
-    int normalWidth, normalHeight;
-
-    int xScrollUnits, yScrollUnits;
-
-    /* Names of scrollbars to embed into the widget window. */
-    Tcl_Obj *xScrollbarObjPtr, *yScrollbarObjPtr;
-
-    /* Commands to control horizontal and vertical scrollbars. */
-    Tcl_Obj *xScrollCmdObjPtr, *yScrollCmdObjPtr;
-
-    Blt_HashTable tagTable;		/* Table of tags. */
-    Blt_HashTable labelTable;		/* Table of labels. */
-    Blt_HashTable iconTable;		/* Table of icons. */
-
-    Blt_Chain chain;
-
-    Item *activePtr;			/* If non-NULL, item that is currently
-					 * active.  If a cascade item, a
-					 * submenu may be posted. */
-    Item *postedPtr;
-
-    Item *firstPtr, *lastPtr;		/* Defines the range of visible
-					 * items. */
-
-    int xOffset, yOffset;		/* Scroll offsets of viewport in
-					 * world. */ 
-    int worldWidth, worldHeight;	/* Dimension of entire menu. */
-
-    Tk_Window xScrollbar;		/* Horizontal scrollbar to be used if
-					 * necessary. If NULL, no x-scrollbar
-					 * is used. */
-    Tk_Window yScrollbar;		/* Vertical scrollbar to be used if
-					 * necessary. If NULL, no y-scrollbar
-					 * is used. */
-
-    short int yScrollbarWidth, xScrollbarHeight;
-    short int leftIndWidth, rightIndWidth;
-    short int labelWidth, iconWidth;
-
-    Blt_HashTable styleTable;		/* Table of styles used. */
-
-    Icon rbIcon;	
-    Icon cbIcon;	
-    Icon casIcon;	
-
-    XColor *checkButtonFillColor;
-    XColor *checkButtonOutlineColor;
-    XColor *checkButtonColor;
-    int checkButtonReqSize;
-
-    XColor *radioButtonFillColor;
-    XColor *radioButtonOutlineColor;
-    XColor *radioButtonColor;
-    int radioButtonReqSize;
-
-    /*
-     * Scanning Information:
-     */
-    int scanAnchorX;			/* Horizontal scan anchor in screen
-					 * x-coordinates. */
-    int scanX;				/* x-offset of the start of the
-					 * horizontal scan in world
-					 * coordinates.*/
-    int scanAnchorY;			/* Vertical scan anchor in screen
-					 * y-coordinates. */
-    int scanY;				/* y-offset of the start of the
-					 * vertical scan in world
-					 * coordinates.*/
-    short int width, height;
-    Blt_Painter painter;
-};
-
-static Blt_ConfigSpec comboConfigSpecs[] =
-{
-    {BLT_CONFIG_FONT, "-acceleratorfont", "acceleratorFont", "AcceleratorFont", 
-	DEF_STYLE_ACCEL_FONT, Blt_Offset(ComboMenu, defStyle.accelFont), 0},
-    {BLT_CONFIG_COLOR, "-acceleratorforeground", "acceleratorForeground", 
-	"AcceleratorForeground", DEF_STYLE_ACCEL_FG, 
-	Blt_Offset(ComboMenu, defStyle.accelNormalColor), 0},
-    {BLT_CONFIG_COLOR, "-activeacceleratorforeground", 
-	"activeAcceleratorForeground", "ActiveAcceleratorForeground", 
-	DEF_STYLE_ACCEL_ACTIVE_FG, 
-	Blt_Offset(ComboMenu, defStyle.accelActiveColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_STYLE_ACTIVE_BG, 
-	Blt_Offset(ComboMenu, defStyle.activeBg), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"ActiveForeground", DEF_STYLE_ACTIVE_FG, 
-	Blt_Offset(ComboMenu, defStyle.labelActiveColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "ActiveRelief", 
-	DEF_STYLE_ACTIVE_RELIEF, Blt_Offset(ComboMenu, defStyle.activeRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_STYLE_BG, Blt_Offset(ComboMenu, defStyle.normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_COMBO_BORDERWIDTH, Blt_Offset(ComboMenu, borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_COMBO_CURSOR, 
-	Blt_Offset(ComboMenu, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-disabledacceleratorforeground", 
-	"disabledAcceleratorForeground", "DisabledAcceleratorForeground", 
-	DEF_STYLE_DISABLED_ACCEL_FG, 
-	Blt_Offset(ComboMenu, defStyle.accelDisabledColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-disabledbackground", "disabledBackground",
-	"DisabledBackground", DEF_STYLE_DISABLED_BG, 
-        Blt_Offset(ComboMenu, defStyle.disabledBg), 0},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_STYLE_DISABLED_FG, 
-	Blt_Offset(ComboMenu, defStyle.labelDisabledColor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_STYLE_FG, Blt_Offset(ComboMenu, defStyle.labelNormalColor), 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_STYLE_FONT, 
-	Blt_Offset(ComboMenu, defStyle.labelFont), 0},
-    {BLT_CONFIG_CUSTOM, "-height", "height", "Height", DEF_COMBO_HEIGHT, 
-	Blt_Offset(ComboMenu, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT,
-	&bltLimitsOption},
-    {BLT_CONFIG_OBJ, "-iconvariable", "iconVariable", "IconVariable", 
-	DEF_COMBO_ICON_VARIABLE, Blt_Offset(ComboMenu, iconVarObjPtr), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-itemborderwidth", "itemBorderWidth", 
-	"ItemBorderWidth", DEF_STYLE_BORDERWIDTH, 
-	Blt_Offset(ComboMenu, defStyle.borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-postcommand", "postCommand", "PostCommand", 
-	DEF_COMBO_POST_CMD, Blt_Offset(ComboMenu, postCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_COMBO_RELIEF, 
-	Blt_Offset(ComboMenu, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-restrictwidth", "restrictWidth", "RestrictWidth", 
-	(char *)NULL, Blt_Offset(ComboMenu, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-	&restrictOption},
-    {BLT_CONFIG_OBJ, "-textvariable", "textVariable", "TextVariable", 
-	DEF_COMBO_TEXT_VARIABLE, Blt_Offset(ComboMenu, textVarObjPtr), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-xscrollbar", "xScrollbar", "Scrollbar", 
-	DEF_COMBO_SCROLLBAR, Blt_Offset(ComboMenu, xScrollbarObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-        DEF_COMBO_SCROLL_CMD, Blt_Offset(ComboMenu, xScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-xscrollincrement", "xScrollIncrement",
-	"ScrollIncrement", DEF_COMBO_SCROLL_INCR, 
-         Blt_Offset(ComboMenu, xScrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-yscrollbar", "yScrollbar", "Scrollbar", 
-	DEF_COMBO_SCROLLBAR, Blt_Offset(ComboMenu, yScrollbarObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
-        DEF_COMBO_SCROLL_CMD, Blt_Offset(ComboMenu, yScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-yscrollincrement", "yScrollIncrement",
-	"ScrollIncrement", DEF_COMBO_SCROLL_INCR, 
-         Blt_Offset(ComboMenu, yScrollUnits),BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_COMBO_TAKE_FOCUS, Blt_Offset(ComboMenu, takeFocusObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-width", "width", "Width", DEF_COMBO_WIDTH, 
-	Blt_Offset(ComboMenu, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT,
-	&bltLimitsOption},
-#ifdef notdef
-    {BLT_CONFIG_CUSTOM, "-radioimage", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_IMAGE, Blt_Offset(ComboMenu, rbIcon), BLT_CONFIG_NULL_OK, 
-        &iconOption},
-    {BLT_CONFIG_CUSTOM, "-checkimage", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_IMAGE, Blt_Offset(ComboMenu, cbIcon), BLT_CONFIG_NULL_OK, 
-        &iconOption},
-    {BLT_CONFIG_CUSTOM, "-cascadeimage", (char *)NULL, (char *)NULL, 
-	DEF_ITEM_IMAGE, Blt_Offset(ComboMenu, casIcon), BLT_CONFIG_NULL_OK,
-        &iconOption},
-#endif
-    {BLT_CONFIG_COLOR, "-checkbuttonfillcolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_CHECKBUTTON_FILL_COLOR, 
-        Blt_Offset(ComboMenu, checkButtonFillColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-checkbuttonoutlinecolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_CHECKBUTTON_OUTLINE_COLOR,
-	Blt_Offset(ComboMenu, checkButtonOutlineColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-checkbuttoncolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_CHECKBUTTON_COLOR, Blt_Offset(ComboMenu, checkButtonColor),0},
-    {BLT_CONFIG_PIXELS_NNEG, "-checkbuttonsize", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_CHECKBUTTON_SIZE, Blt_Offset(ComboMenu, checkButtonReqSize), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-radiobuttonfillcolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_RADIOBUTTON_FILL_COLOR, 
-        Blt_Offset(ComboMenu, radioButtonFillColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-radiobuttonoutlinecolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_RADIOBUTTON_OUTLINE_COLOR, 
-        Blt_Offset(ComboMenu, radioButtonOutlineColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-radiobuttoncolor", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_RADIOBUTTON_COLOR, Blt_Offset(ComboMenu, radioButtonColor),0},
-    {BLT_CONFIG_PIXELS_NNEG, "-radiobuttonsize", (char *)NULL, (char *)NULL, 
-	DEF_COMBO_RADIOBUTTON_SIZE, Blt_Offset(ComboMenu, radioButtonReqSize), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-/*
- * ItemIterator --
- *
- *	Items may be tagged with strings.  An item may have many tags.  The
- *	same tag may be used for many items.
- *	
- */
-
-typedef enum { 
-    ITER_SINGLE, ITER_ALL, ITER_TAG, ITER_TYPE, ITER_PATTERN
-} IteratorType;
-
-typedef struct _Iterator {
-    ComboMenu *comboPtr;		/* ComboMenu that we're iterating
-					 * over. */
-
-    IteratorType type;			/* Type of iteration:
-					 * ITER_TAG	By item tag.
-					 * ITER_ALL	By every item.
-					 * ITER_SINGLE	Single item: either 
-					 *		tag or index.
-					 * ITER_TYPE	Over a single item 
-					 *		type.
-					 */
-
-    Item *startPtr, *last;		/* Starting and ending item.  Starting
-					 * point of search, saved if iterator
-					 * is reused.  Used for ITER_ALL and
-					 * ITER_SINGLE searches. */
-    Item *endPtr;			/* Ending item (inclusive). */
-    Item *nextPtr;			/* Next item. */
-    int itemType;			/* For tag-based searches. */
-    char *tagName;			/* If non-NULL, is the tag that we are
-					 * currently iterating over. */
-
-    Blt_HashTable *tablePtr;		/* Pointer to tag hash table. */
-
-    Blt_HashSearch cursor;		/* Search iterator for tag hash
-					 * table. */
-    Blt_ChainLink link;
-} ItemIterator;
-
-static Tk_GeomRequestProc ScrollbarGeometryProc;
-static Tk_GeomLostSlaveProc ScrollbarCustodyProc;
-static Tk_GeomMgr comboMgrInfo = {
-    (char *)"combomenu",		/* Name of geometry manager used by
-					 * winfo. */
-    ScrollbarGeometryProc,		/* Procedure to for new geometry
-					 * requests. */
-    ScrollbarCustodyProc,		/* Procedure when scrollbar is taken
-					 * away. */
-};
-
-static Blt_SwitchParseProc TypeSwitch;
-static Blt_SwitchCustom typeSwitch = {
-    TypeSwitch, NULL, NULL,
-};
-static Blt_SwitchParseProc ItemSwitch;
-static Blt_SwitchCustom itemSwitch = {
-    ItemSwitch, NULL, NULL,
-};
-
-#define FIND_DECREASING	(1<<0)
-#define FIND_UNDERLINE	(1<<1)
-#define FIND_GLOB	1
-#define FIND_REGEXP	2
-
-typedef struct {
-    unsigned int mask;
-    int search;
-    int type;
-    Item *fromPtr;
-} FindSwitches;
-
-static Blt_SwitchSpec findSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-from", "item",
-	Blt_Offset(FindSwitches, fromPtr), 0, 0, &itemSwitch},
-    {BLT_SWITCH_BITMASK, "-decreasing", "",
-	Blt_Offset(FindSwitches, mask), 0, FIND_DECREASING},
-    {BLT_SWITCH_VALUE, "-glob", "",
-	Blt_Offset(FindSwitches, search), 0, FIND_GLOB},
-    {BLT_SWITCH_VALUE, "-regexp", "",
-	Blt_Offset(FindSwitches, search), 0, FIND_REGEXP},
-    {BLT_SWITCH_CUSTOM, "-type", "type",
-	Blt_Offset(FindSwitches, type), 0, 0, &typeSwitch},
-    {BLT_SWITCH_BITMASK, "-underline", "",
-	Blt_Offset(FindSwitches, mask), 0, FIND_UNDERLINE},
-    {BLT_SWITCH_END}
-};
-
-typedef int (ComboMenuCmdProc)(ComboMenu *comboPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-static int GetItemIterator(Tcl_Interp *interp, ComboMenu *comboPtr,
-	Tcl_Obj *objPtr, ItemIterator *iterPtr);
-static int GetItemFromObj(Tcl_Interp *interp, ComboMenu *comboPtr,
-	Tcl_Obj *objPtr, Item **itemPtrPtr);
-
-static Tcl_IdleProc ConfigureScrollbarsProc;
-static Tcl_IdleProc DisplayItem;
-static Tcl_IdleProc DisplayComboMenu;
-static Tcl_FreeProc DestroyComboMenu;
-static Tk_EventProc ScrollbarEventProc;
-static Tk_EventProc ComboMenuEventProc;
-static Tcl_ObjCmdProc ComboMenuInstCmdProc;
-static Tcl_CmdDeleteProc ComboMenuInstCmdDeletedProc;
-static Tcl_VarTraceProc ItemVarTraceProc;
-static Tk_ImageChangedProc IconChangedProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the combomenu display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(ComboMenu *comboPtr) 
-{
-    if ((comboPtr->tkwin != NULL) && !(comboPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayComboMenu, comboPtr);
-	comboPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedrawItem --
- *
- *	Tells the Tk dispatcher to call the combomenu display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedrawItem(Item *itemPtr) 
-{
-    ComboMenu *comboPtr;
-
-    comboPtr = itemPtr->comboPtr;
-    if ((comboPtr->tkwin != NULL) && 
-	((comboPtr->flags & REDRAW_PENDING) == 0) &&
-	((itemPtr->flags & ITEM_REDRAW) == 0)) {
-	Tcl_DoWhenIdle(DisplayItem, itemPtr);
-	itemPtr->flags |= ITEM_REDRAW;
-    }
-}
-
-static void
-ConfigureScrollbarsProc(ClientData clientData)
-{
-    ComboMenu *comboPtr = clientData;
-    Tcl_Interp *interp;
-
-    interp = comboPtr->interp;
-    /* 
-     * Execute the initialization procedure on this widget.
-     */
-    comboPtr->flags &= ~UPDATE_PENDING;
-    if (Tcl_VarEval(interp, "::blt::ComboMenu::ConfigureScrollbars ", 
-	Tk_PathName(comboPtr->tkwin), (char *)NULL) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReleaseTags --
- *
- *	Releases the tags used by this item.  
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReleaseTags(ComboMenu *comboPtr, Item *itemPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tagTablePtr;
-	Blt_HashEntry *h2Ptr;
-
-	tagTablePtr = Blt_GetHashValue(hPtr); 
-	h2Ptr = Blt_FindHashEntry(tagTablePtr, (char *)itemPtr->index);
-	if (h2Ptr != NULL) {
-	    Blt_DeleteHashEntry(tagTablePtr, h2Ptr);
-	}
-    }
-}
-
-static void
-DestroyItem(Item *itemPtr)
-{
-    ComboMenu *comboPtr = itemPtr->comboPtr;
-
-    ReleaseTags(comboPtr, itemPtr);
-    iconOption.clientData = comboPtr;
-    Blt_FreeOptions(itemConfigSpecs, (char *)itemPtr, comboPtr->display, 0);
-    if (itemPtr->link != NULL) {
-	Blt_Chain_DeleteLink(comboPtr->chain, itemPtr->link);
-    }
-}
-
-static void
-DestroyItems(ComboMenu *comboPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(comboPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	itemPtr->link = NULL;
-	DestroyItem(itemPtr);
-    }
-    Blt_Chain_Destroy(comboPtr->chain);
-}
-
-static Item *
-NewItem(ComboMenu *comboPtr)
-{
-    Item *itemPtr;
-    Blt_ChainLink link;
-
-    link = Blt_Chain_AllocLink(sizeof(Item));
-    itemPtr = Blt_Chain_GetValue(link);
-    itemPtr->comboPtr = comboPtr;
-    itemPtr->flags |= (ITEM_BUTTON | ITEM_NORMAL);
-    itemPtr->link = link;
-    itemPtr->index = Blt_Chain_GetLength(comboPtr->chain);
-    Blt_Chain_LinkAfter(comboPtr->chain, link, NULL);
-    itemPtr->label = (char *)emptyString;
-    itemPtr->underline = -1;
-    return itemPtr;
-}
-
-static INLINE Item *
-FindItemByIndex(ComboMenu *comboPtr, long index)
-{
-    Blt_ChainLink link;
-
-    if ((index < 1) || (index > Blt_Chain_GetLength(comboPtr->chain))) {
-	return NULL;
-    }
-    link = Blt_Chain_GetNthLink(comboPtr->chain, index - 1);
-    return Blt_Chain_GetValue(link);
-}
-
-static INLINE Item *
-FirstItem(ComboMenu *comboPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(comboPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & ITEM_DISABLED) == 0) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-static INLINE Item *
-LastItem(ComboMenu *comboPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(comboPtr->chain); link != NULL;
-	 link = Blt_Chain_PrevLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & ITEM_DISABLED) == 0) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-
-static Item *
-NextItem(Item *itemPtr)
-{
-    if (itemPtr != NULL) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_NextLink(itemPtr->link); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    itemPtr = Blt_Chain_GetValue(link);
-	    if ((itemPtr->flags & (ITEM_SEPARATOR|ITEM_DISABLED)) == 0) {
-		return itemPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-static INLINE Item *
-PrevItem(Item *itemPtr)
-{
-    if (itemPtr != NULL) {
-	Blt_ChainLink link;
-	
-	for (link = Blt_Chain_PrevLink(itemPtr->link); link != NULL; 
-	     link = Blt_Chain_PrevLink(link)) {
-	    itemPtr = Blt_Chain_GetValue(link);
-	    if ((itemPtr->flags & (ITEM_SEPARATOR|ITEM_DISABLED)) == 0) {
-		return itemPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-static INLINE Item *
-BeginItem(ComboMenu *comboPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_FirstLink(comboPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static INLINE Item *
-EndItem(ComboMenu *comboPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_LastLink(comboPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static Item *
-StepItem(Item *itemPtr)
-{
-    if (itemPtr != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_NextLink(itemPtr->link); 
-	if (link != NULL) {
-	    return Blt_Chain_GetValue(link);
-	}
-    }
-    return NULL;
-}
-
-static int
-SelectItem(Tcl_Interp *interp, ComboMenu *comboPtr, Item *itemPtr, int newState)
-{
-    int result;
-
-    if (itemPtr->flags & (ITEM_CASCADE|ITEM_SEPARATOR)) {
-	return TCL_OK;
-    }
-
-    result = TCL_OK;
-    if (newState == -1) {
-	newState = (itemPtr->flags & ITEM_SELECTED) == 0;
-    }
-    if ((comboPtr->iconVarObjPtr != NULL) && (itemPtr->icon != NULL)) {
-	Tcl_Obj *objPtr;
-	
-	objPtr = Tcl_NewStringObj(IconName(itemPtr->icon), -1);
-	if (Tcl_ObjSetVar2(interp, comboPtr->iconVarObjPtr, NULL, objPtr, 
-			   TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if ((comboPtr->textVarObjPtr != NULL) && (itemPtr->label != emptyString)) {
-	Tcl_Obj *objPtr;
-	
-	objPtr = Tcl_NewStringObj(itemPtr->label, -1);
-	if (Tcl_ObjSetVar2(interp, comboPtr->textVarObjPtr, NULL, objPtr, 
-			   TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (itemPtr->variableObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-	
-	objPtr = NULL;
-	if (itemPtr->flags & ITEM_CHECKBUTTON) {
-	    objPtr = (newState) ? 
-		itemPtr->onValueObjPtr : itemPtr->offValueObjPtr;
-	} else {
-	    objPtr = itemPtr->valueObjPtr;
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(itemPtr->label, -1);
-	    }
-	}
-	if (objPtr != NULL) {
-	    Tcl_IncrRefCount(objPtr);
-	    if (Tcl_ObjSetVar2(interp, itemPtr->variableObjPtr, NULL, objPtr, 
-			       TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-		result = TCL_ERROR;
-	    }
-	    Tcl_DecrRefCount(objPtr);
-	}
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateItem --
- *
- *	Marks the designated item as active.  The item is redrawn with its
- *	active colors.  The previously active item is deactivated.  If the new
- *	item is NULL, then this means that no new item is to be activated.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Menu items may be scheduled to be drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ActivateItem(ComboMenu *comboPtr, Item *itemPtr) 
-{
-    if ((comboPtr->activePtr == itemPtr) && (itemPtr != NULL)) {
-	return;		/* Item is already active. */
-    }
-    if (comboPtr->activePtr != NULL) {
-	comboPtr->activePtr->flags &= ~ITEM_STATE_MASK;
-	comboPtr->activePtr->flags |= ITEM_NORMAL;
-	EventuallyRedrawItem(comboPtr->activePtr);
-    }
-    comboPtr->activePtr = itemPtr;
-    if (itemPtr != NULL) {
-	itemPtr->flags &= ~ITEM_STATE_MASK;
-	itemPtr->flags |= ITEM_ACTIVE;
-	EventuallyRedrawItem(itemPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedWidth --
- *
- *	Bounds a given width value to the limits described in the limit
- *	structure.  The initial starting value may be overridden by the nominal
- *	value in the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetBoundedWidth(ComboMenu *comboPtr, int w)	
-{
-    /*
-     * Check widgets for requested width values;
-     */
-    if (comboPtr->reqWidth.flags & LIMITS_NOM_SET) {
-	w = comboPtr->reqWidth.nom;	/* Override initial value */
-    }
-    if (w < comboPtr->reqWidth.min) {
-	w = comboPtr->reqWidth.min;	/* Bounded by minimum value */
-    }
-    if (w > comboPtr->reqWidth.max) {
-	w = comboPtr->reqWidth.max;	/* Bounded by maximum value */
-    }
-    if (comboPtr->flags & (RESTRICT_MIN|RESTRICT_MAX)) {
-	Tk_Window parent;
-
-	parent = Tk_Parent(comboPtr->tkwin);
-	if ((comboPtr->flags & RESTRICT_MIN) && (w < Tk_Width(parent))) {
-	    w = Tk_Width(parent);
-	}
-	if ((comboPtr->flags & RESTRICT_MAX) && (w > Tk_Width(parent))) {
-	    w = Tk_Width(parent);
-	}
-    }
-    if (w > WidthOfScreen(Tk_Screen(comboPtr->tkwin))) {
-	w = WidthOfScreen(Tk_Screen(comboPtr->tkwin));
-    }
-    return w;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedHeight --
- *
- *	Bounds a given value to the limits described in the limit structure.
- *	The initial starting value may be overridden by the nominal value in
- *	the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetBoundedHeight(ComboMenu *comboPtr, int h)	
-{
-    /*
-     * Check widgets for requested height values;
-     */
-    if (comboPtr->reqHeight.flags & LIMITS_NOM_SET) {
-	h = comboPtr->reqHeight.nom;	/* Override initial value */
-    }
-    if (h < comboPtr->reqHeight.min) {
-	h = comboPtr->reqHeight.min;	/* Bounded by minimum value */
-    }
-    if (h > comboPtr->reqHeight.max) {
-	h = comboPtr->reqHeight.max;	/* Bounded by maximum value */
-    }
-    if (h > HeightOfScreen(Tk_Screen(comboPtr->tkwin))) {
-	h = HeightOfScreen(Tk_Screen(comboPtr->tkwin));
-    }
-    return h;
-}
-
-static void
-FixMenuCoords(ComboMenu *comboPtr, int *xPtr, int *yPtr)
-{
-    int x, y, w, h;
-    int screenWidth, screenHeight;
-    Tk_Window parent;
-
-    parent = Tk_Parent(comboPtr->tkwin);
-    screenWidth  = WidthOfScreen(Tk_Screen(comboPtr->tkwin));
-    screenHeight = HeightOfScreen(Tk_Screen(comboPtr->tkwin));
-
-    x = *xPtr, y = *yPtr;
-
-    /* Determine the size of the menu. */
-    w = Tk_ReqWidth(comboPtr->tkwin);
-    h = Tk_ReqHeight(comboPtr->tkwin);
-    if ((y + h) > screenHeight) {
-	y -= (Tk_Height(parent) + h); /* Flip to show menu above. */
-	if (y < 0) {
-	    y = 0;
-	}
-    }
-    if ((x + w) > screenWidth) {
-	x -= (Tk_Width(parent)); /* Flip to show menu on left side. */
-	if (x < 0) {
-	    x = 0;
-	}
-    }
-    *xPtr = x;
-    *yPtr = y;
-}
-
-static void
-ComputeItemGeometry(ComboMenu *comboPtr, Item *itemPtr)
-{
-
-    /* Determine the height of the item.  It's the maximum height of all it's
-     * components: left gadget (radiobutton or checkbutton), icon, label,
-     * right gadget (cascade), and accelerator. */
-    itemPtr->labelWidth = itemPtr->labelHeight = 0;
-    itemPtr->leftIndWidth = itemPtr->leftIndHeight = 0;
-    itemPtr->rightIndWidth = itemPtr->rightIndHeight = 0;
-    itemPtr->iconWidth = itemPtr->iconHeight = 0;
-    itemPtr->width = itemPtr->height = 0;
-    if (itemPtr->flags & ITEM_SEPARATOR) {
-	itemPtr->height = ITEM_SEP_HEIGHT;
-	itemPtr->width = 0;
-	if (itemPtr->image != NULL) {
-	    itemPtr->labelWidth = IconWidth(itemPtr->image);
-	    itemPtr->labelHeight = IconHeight(itemPtr->image);
-	    if (itemPtr->height < itemPtr->labelHeight) {
-		itemPtr->height = itemPtr->labelHeight;
-	    }
-	} else if (itemPtr->label != emptyString) {
-	    unsigned int w, h;
-	    
-	    Blt_GetTextExtents(itemPtr->stylePtr->labelFont, 0, itemPtr->label,
-		 -1, &w, &h);
-	    itemPtr->labelWidth = w;
-	    itemPtr->labelHeight = h;
-	    if (itemPtr->height < itemPtr->labelHeight) {
-		itemPtr->height = itemPtr->labelHeight;
-	    }
-	}
-	if (itemPtr->labelWidth > 0) {
-	    itemPtr->width += itemPtr->labelWidth + ITEM_IPAD;
-	}
-    } else {
-	if (itemPtr->flags & (ITEM_RADIOBUTTON | ITEM_CHECKBUTTON)) {
-	    Blt_FontMetrics fm;
-	    size_t reqSize;
-
-	    Blt_GetFontMetrics(itemPtr->stylePtr->labelFont, &fm);
-	    itemPtr->leftIndWidth = itemPtr->leftIndHeight =
-		(fm.linespace) + 4 * ITEM_YPAD;
-#ifdef notdef
-	    itemPtr->leftIndWidth = ITEM_L_IND_WIDTH;
-	    itemPtr->leftIndHeight = ITEM_L_IND_HEIGHT;
-#endif
-	    reqSize = itemPtr->stylePtr->reqIndWidth;
-	    if (reqSize == 0) { 
-		reqSize = (itemPtr->flags & ITEM_RADIOBUTTON) ?
-		    comboPtr->radioButtonReqSize : comboPtr->checkButtonReqSize;
-	    }
-	    if (reqSize > 0) {
-		itemPtr->leftIndWidth = itemPtr->leftIndHeight = 
-		    reqSize + 2*ITEM_YPAD;
-	    }
-	    if (itemPtr->height < itemPtr->leftIndHeight) {
-		itemPtr->height = itemPtr->leftIndHeight;
-	    }
-	    itemPtr->width += itemPtr->leftIndWidth + 2 * ITEM_IPAD;
-	}
-
-	if (itemPtr->icon != NULL) {
-	    itemPtr->iconWidth = IconWidth(itemPtr->icon);
-	    itemPtr->iconHeight = IconHeight(itemPtr->icon);
-	    if (itemPtr->height < IconHeight(itemPtr->icon)) {
-		itemPtr->height = IconHeight(itemPtr->icon);
-	    }
-	    itemPtr->width += itemPtr->iconWidth + ITEM_IPAD;
-	}
-
-	if (itemPtr->image != NULL) {
-	    itemPtr->labelWidth = IconWidth(itemPtr->image);
-	    itemPtr->labelHeight = IconHeight(itemPtr->image);
-	    if (itemPtr->height < itemPtr->labelHeight) {
-		itemPtr->height = itemPtr->labelHeight;
-	    }
-	} else if (itemPtr->label != emptyString) {
-	    unsigned int w, h;
-	    
-	    Blt_GetTextExtents(itemPtr->stylePtr->labelFont, 0, itemPtr->label,
-		 -1, &w, &h);
-	    itemPtr->labelWidth = w;
-	    itemPtr->labelHeight = h;
-	    if (itemPtr->height < itemPtr->labelHeight) {
-		itemPtr->height = itemPtr->labelHeight;
-	    }
-	}
-
-	if (itemPtr->labelWidth > 0) {
-	    itemPtr->width += itemPtr->labelWidth + ITEM_IPAD;
-	}
-
-	if (itemPtr->flags & ITEM_CASCADE) {
-	    itemPtr->rightIndWidth = ITEM_R_IND_WIDTH;
-	    itemPtr->rightIndHeight = ITEM_R_IND_HEIGHT;
-	} else if (itemPtr->accel != NULL) {
-	    unsigned int w, h;
-	    
-	    Blt_GetTextExtents(itemPtr->stylePtr->accelFont, 0, itemPtr->accel,
-		 -1, &w, &h);
-	    itemPtr->rightIndWidth = w;
-	    itemPtr->rightIndHeight = h;
-	}
-	if (itemPtr->height < itemPtr->rightIndHeight) {
-	    itemPtr->height = itemPtr->rightIndHeight;
-	}
-    }
-    itemPtr->width += 2 * itemPtr->stylePtr->borderWidth;
-    itemPtr->height += 2 * (ITEM_XPAD + itemPtr->stylePtr->borderWidth);
-#ifdef notdef
-    fprintf(stderr, "%s= w=%d,h=%d leftInd w=%d,h=%d icon w=%d,h=%d label w=%d,h=%d rightInd w=%d,h=%d\n", 
-	    itemPtr->label, itemPtr->width, itemPtr->height, 
-	    itemPtr->leftIndWidth, itemPtr->leftIndHeight, 
-	    itemPtr->iconWidth, itemPtr->iconHeight, itemPtr->labelWidth,
-	    itemPtr->labelHeight, itemPtr->rightIndWidth, 
-	    itemPtr->rightIndHeight);
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchForItem --
- *
- *	Performs a binary search for the item at the given y-offset in world
- *	coordinates.  The range of items is specified by menu indices (high
- *	and low).  The item must be (visible) in the viewport.
- *
- * Results:
- *	Returns 0 if no item is found, other the index of the item (menu
- *	indices start from 1).
- *
- *---------------------------------------------------------------------------
- */
-static Item *
-SearchForItem(ComboMenu *comboPtr, Item *firstPtr, Item *lastPtr, int yOffset)
-{
-    Blt_ChainLink first, last, link, next;
-
-    first = (firstPtr == NULL) ? 
-	Blt_Chain_FirstLink(comboPtr->chain): firstPtr->link;
-    last = (lastPtr == NULL) ? 
-	Blt_Chain_LastLink(comboPtr->chain) : lastPtr->link;
-
-    for (link = first; link != NULL; link = next) {
-	Item *itemPtr;
-
-	next = Blt_Chain_NextLink(link);
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((yOffset >= itemPtr->yWorld) && 
-	    (yOffset < (itemPtr->yWorld + itemPtr->height))) {
-	    return itemPtr;
-	}
-	if (link == last) {
-	    break;
-	}
-    }
-    return NULL;
-}
-
-static void
-ComputeVisibleItems(ComboMenu *comboPtr)
-{
-    Item *itemPtr;
-    int cavityWidth, cavityHeight;
-
-    if (Blt_Chain_GetLength(comboPtr->chain) == 0) {
-	comboPtr->firstPtr = comboPtr->lastPtr = NULL;
-	return;
-    }
-    cavityWidth = Tk_Width(comboPtr->tkwin);
-    cavityHeight = Tk_Height(comboPtr->tkwin);
-    comboPtr->xScrollbarHeight = comboPtr->yScrollbarWidth = 0;
-    if ((comboPtr->xScrollbar != NULL) && (comboPtr->worldWidth > cavityWidth)){
-	comboPtr->xScrollbarHeight = Tk_ReqHeight(comboPtr->xScrollbar);
-	if (comboPtr->xScrollbarHeight > MAXSCROLLBARTHICKNESS) {
-	    comboPtr->xScrollbarHeight = MAXSCROLLBARTHICKNESS;
-	}
-	cavityHeight -= comboPtr->xScrollbarHeight;
-    } 
-    if ((comboPtr->yScrollbar != NULL) && (comboPtr->worldHeight>cavityHeight)){
-	comboPtr->yScrollbarWidth = Tk_ReqWidth(comboPtr->yScrollbar);
-	if (comboPtr->yScrollbarWidth > MAXSCROLLBARTHICKNESS) {
-	    comboPtr->yScrollbarWidth = MAXSCROLLBARTHICKNESS;
-	}
-	cavityWidth -= comboPtr->yScrollbarWidth;
-    }
-    if ((comboPtr->xScrollbar != NULL) && (comboPtr->xScrollbarHeight == 0) && 
-	(comboPtr->worldWidth > cavityWidth)) {
-	comboPtr->xScrollbarHeight = Tk_ReqHeight(comboPtr->xScrollbar);
-	if (comboPtr->xScrollbarHeight > MAXSCROLLBARTHICKNESS) {
-	    comboPtr->xScrollbarHeight = MAXSCROLLBARTHICKNESS;
-	}
-	cavityHeight -= comboPtr->xScrollbarHeight;
-    }
-    if ((comboPtr->yScrollbar != NULL) && (comboPtr->yScrollbarWidth == 0) && 
-	(comboPtr->worldHeight > cavityHeight)) {
-	comboPtr->yScrollbarWidth = Tk_ReqWidth(comboPtr->yScrollbar);
-	if (comboPtr->yScrollbarWidth > MAXSCROLLBARTHICKNESS) {
-	    comboPtr->yScrollbarWidth = MAXSCROLLBARTHICKNESS;
-	}
-	cavityWidth -= comboPtr->yScrollbarWidth;
-    }
-    comboPtr->width = cavityWidth;
-    comboPtr->height = cavityHeight;
-    itemPtr = SearchForItem(comboPtr, NULL, NULL, comboPtr->yOffset);
-    if (itemPtr == NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_LastLink(comboPtr->chain);
-	comboPtr->firstPtr = comboPtr->lastPtr = Blt_Chain_GetValue(link);
-	return;
-    }
-    comboPtr->firstPtr = itemPtr;
-
-    itemPtr = SearchForItem(comboPtr, comboPtr->firstPtr, NULL, 
-			    comboPtr->yOffset + VPORTHEIGHT(comboPtr)); 
-    if (itemPtr == NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_LastLink(comboPtr->chain);
-	comboPtr->lastPtr = Blt_Chain_GetValue(link);
-	return;
-    } 
-    comboPtr->lastPtr = itemPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NearestItem --
- *
- *	Find the item closest to the x-y screen coordinate given.  The item
- *	must be (visible) in the viewport.
- *
- * Results:
- *	Returns the closest item.  If selectOne is set, then always returns an
- *	item (unless the menu is empty).  Otherwise, NULL is returned is the
- *	pointer is not over an item.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Item *
-NearestItem(ComboMenu *comboPtr, int x, int y, int selectOne)
-{
-    Item *itemPtr;
-
-    if (comboPtr->firstPtr == NULL) {
-	return NULL;			/* No visible entries. */
-    }
-    if ((x < 0) || (x >= Tk_Width(comboPtr->tkwin)) || 
-	(y < 0) || (y >= Tk_Height(comboPtr->tkwin))) {
-	return NULL;			/* Screen coordinates are outside of
-					 * menu. */
-    }
-    /*
-     * Item positions are saved in world coordinates. Convert the text point
-     * screen y-coordinate to a world coordinate.
-     */
-    itemPtr = SearchForItem(comboPtr, comboPtr->firstPtr, comboPtr->lastPtr, 
-	WORLDY(comboPtr, y));
-    if (itemPtr == NULL) {
-	if (!selectOne) {
-	    return NULL;
-	}
-	if (y < comboPtr->borderWidth) {
-	    return FirstItem(comboPtr);
-	}
-	return LastItem(comboPtr);
-    }
-    return itemPtr;
-}
-
-static void
-ComputeCascadeMenuCoords(ComboMenu *comboPtr, Item *itemPtr, Tk_Window menuWin, 
-			 int *xPtr, int *yPtr)
-{
-    int rootX, rootY, x, y;
-    int screenWidth, screenHeight;
-
-    x = Tk_Width(comboPtr->tkwin);
-    y = SCREENY(comboPtr, itemPtr->yWorld);
-    screenWidth = WidthOfScreen(Tk_Screen(menuWin));
-    screenHeight = HeightOfScreen(Tk_Screen(menuWin));
-    Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-    if (rootX < 0) {
-	rootX = 0;
-    }
-    if (rootY < 0) {
-	rootY = 0;
-    }
-    x += rootX, y += rootY;
-    if ((y + Tk_ReqHeight(menuWin)) > screenHeight) {
-	/* If we go offscreen on the bottom, raised the menu. */
-	y = screenHeight - Tk_ReqHeight(menuWin) - 10;
-	if (y < 0) {
-	    y = 0;
-	}
-    }
-    if ((x + Tk_ReqWidth(menuWin)) > screenWidth) {
-	/* If we go offscreen on the bottom, try the menu on the other side. */
-	x = rootX - Tk_ReqWidth(menuWin);
-	if (x < 0) {
-	    x = 0;
-	}
-    }
-    *xPtr = x;
-    *yPtr = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostCascade --
- *
- *	This procedure arranges for the currently active item's cascade menu
- *	to be unposted (i.e. the submenu is unmapped).  Only the active item
- *	can have it's submenu unposted.
- *
- * Results:
- *	A standard TCL return result.  Errors may occur in the TCL commands
- *	generated to unpost submenus.
- *
- * Side effects:
- *	The currently active item's submenu is unposted.
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostCascade(
-    Tcl_Interp *interp,			/* Used for invoking "unpost" commands
-					 * and reporting errors. */
-    ComboMenu *comboPtr)		/* Information about the menu. */
-{
-    Item *itemPtr = comboPtr->postedPtr;
-    char *menuName;
-    Tk_Window menuWin;
-
-    if ((itemPtr == NULL) || (itemPtr->menuObjPtr == NULL)) {
-	return TCL_OK;			/* No item currenly posted or no menu
-					 * designated for cascade item. */
-    }
-    comboPtr->postedPtr = NULL;
-    assert((itemPtr != NULL) && (itemPtr->flags & ITEM_CASCADE));
-    menuName = Tcl_GetString(itemPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't unpost \"", Tk_PathName(menuWin), 
-			"\": it isn't a descendant of ", 
-			Tk_PathName(comboPtr->tkwin), (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    Blt_UnmapToplevelWindow(menuWin);
-    /*
-     * Note: when unposting a submenu, we have to redraw the entire
-     * parent menu.  This is because of a combination of the following
-     * things:
-     * (a) the submenu partially overlaps the parent.
-     * (b) the submenu specifies "save under", which causes the X
-     *     server to make a copy of the information under it when it
-     *     is posted.  When the submenu is unposted, the X server
-     *     copies this data back and doesn't generate any Expose
-     *     events for the parent.
-     * (c) the parent may have redisplayed itself after the submenu
-     *     was posted, in which case the saved information is no
-     *     longer correct.
-     * The simplest solution is just force a complete redisplay of
-     * the parent.
-     */
-    
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostCascade --
- *
- *	This procedure arranges for the currently active item's cascade menu
- *	to be posted.  Only the active item can have it's submenu posted.
- *
- * Results:
- *	A standard TCL return result.  Errors may occur in the TCL commands
- *	generated to post submenus.
- *
- * Side effects:
- *	The new submenu is posted.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostCascade(
-    Tcl_Interp *interp,			/* Used for invoking "post" command
-					 * and reporting errors. */
-    ComboMenu *comboPtr,		/* Information about the menu. */
-    Item *itemPtr)			/* Cascade item   */
-{
-    char *menuName;
-    Tk_Window menuWin;
-
-    assert((itemPtr != NULL) && (itemPtr->flags & ITEM_CASCADE));
-    if (itemPtr->menuObjPtr == NULL) {
-	return TCL_OK;			/* No menu was designated for this
-					 * cascade item. */
-    }
-    if (comboPtr->postedPtr == itemPtr) {
-#ifdef notdef
-	fprintf(stderr, "postcascade: %s is already posted\n",
-		Tcl_GetString(itemPtr->menuObjPtr));
-#endif
-	return TCL_OK;			/* Item is already posted. */
-    }
-    menuName = Tcl_GetString(itemPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, comboPtr->tkwin);
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != comboPtr->tkwin) {
-	Tcl_AppendResult(interp, "can't post \"", Tk_PathName(menuWin), 
-		"\": it isn't a descendant of ", Tk_PathName(comboPtr->tkwin),
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tk_IsMapped(comboPtr->tkwin)) {
-	Tcl_Obj *objv[4];
-	int result, x, y;
-
-	/*
-	 * Position the cascade with its upper left corner slightly below and
-	 * to the left of the upper right corner of the menu entry (this is an
-	 * attempt to match Motif behavior).
-	 *
-	 * The menu has to redrawn so that the entry can change relief.
-	 */
-	ComputeCascadeMenuCoords(comboPtr, itemPtr, menuWin, &x, &y);
-	objv[0] = itemPtr->menuObjPtr;
-	objv[1] = Tcl_NewStringObj("post", 4);
-	objv[2] = Tcl_NewIntObj(x);
-	objv[3] = Tcl_NewIntObj(y);
-	result = Blt_GlobalEvalObjv(interp, 4, objv);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	EventuallyRedrawItem(itemPtr);
-    }
-    comboPtr->postedPtr = itemPtr;
-    return TCL_OK;
-}
-
-static void
-ComputeComboGeometry(ComboMenu *comboPtr)
-{
-    int xWorld, yWorld;
-    Blt_ChainLink link;
-    int w, h;
-    int reqWidth, reqHeight;
-
-    /* 
-     * Step 1.  Collect the maximum widths of the items in their individual
-     *		columns.
-     */
-    comboPtr->worldHeight = 0;
-    comboPtr->width = comboPtr->height = 0;
-    comboPtr->leftIndWidth = comboPtr->rightIndWidth = 0;
-    comboPtr->iconWidth = comboPtr->labelWidth = 0;
-    xWorld = yWorld = 0;
-    for (link = Blt_Chain_FirstLink(comboPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	ComputeItemGeometry(comboPtr, itemPtr);
-	if (itemPtr->leftIndWidth > comboPtr->leftIndWidth) {
-	    comboPtr->leftIndWidth = itemPtr->leftIndWidth;
-	}
-	if (itemPtr->iconWidth > comboPtr->iconWidth) {
-	    comboPtr->iconWidth = itemPtr->iconWidth;
-	}
-	if (itemPtr->labelWidth > comboPtr->labelWidth) {
-	    comboPtr->labelWidth = itemPtr->labelWidth;
-	}
-	if (itemPtr->rightIndWidth > comboPtr->rightIndWidth) {
-	    comboPtr->rightIndWidth = itemPtr->rightIndWidth;
-	}
-	comboPtr->worldHeight += itemPtr->height;
-	itemPtr->xWorld = xWorld, itemPtr->yWorld = yWorld;
-	yWorld += itemPtr->height;
-    }
-    comboPtr->worldWidth = comboPtr->leftIndWidth + comboPtr->iconWidth + 
-	comboPtr->labelWidth + comboPtr->rightIndWidth;
-    if (comboPtr->leftIndWidth > 0) {
-	comboPtr->worldWidth += ITEM_IPAD;
-    }
-    if (comboPtr->iconWidth > 0) {
-	comboPtr->worldWidth += ITEM_IPAD;
-    }
-    if (comboPtr->labelWidth > 0) {
-	comboPtr->worldWidth += ITEM_IPAD;
-    }
-    if (comboPtr->rightIndWidth > 0) {
-	comboPtr->worldWidth += 4 * ITEM_IPAD;
-    }
-    comboPtr->worldWidth += ITEM_IPAD;
-    comboPtr->xScrollbarHeight = comboPtr->yScrollbarWidth = 0;
-
-    /* Figure out the requested size of the widget.  This will also tell us if
-     * we need scrollbars. */
- 
-    reqWidth = comboPtr->worldWidth + 2 * comboPtr->borderWidth;
-    reqHeight = comboPtr->worldHeight + 2 * comboPtr->borderWidth;
-
-    w = GetBoundedWidth(comboPtr, reqWidth);
-    h = GetBoundedHeight(comboPtr, reqHeight);
-
-
-    if ((reqWidth > w) && (comboPtr->xScrollbar != NULL)) {
-	comboPtr->xScrollbarHeight = Tk_ReqHeight(comboPtr->xScrollbar);
-	h = GetBoundedHeight(comboPtr, reqHeight + comboPtr->xScrollbarHeight);
-    }
-    if ((reqHeight > h) && (comboPtr->yScrollbar != NULL)) {
-	comboPtr->yScrollbarWidth = Tk_ReqWidth(comboPtr->yScrollbar);
-	w = GetBoundedWidth(comboPtr, reqWidth + comboPtr->yScrollbarWidth);
-    }
-    /* Save the computed width so that we only override the menu width if the
-     * parent (combobutton/comboentry) width is greater than the normal size
-     * of the menu.  */
-    comboPtr->normalWidth = w;
-    comboPtr->normalHeight = h;
-    if (h < 20) {
-	h = 20;
-    }
-    if (w < comboPtr->parentWidth) {
-	w = comboPtr->parentWidth;
-    }
-    comboPtr->width = w;
-    comboPtr->height = h;
-#ifdef notdef
-    fprintf(stderr, "%s= w=%d leftInd w=%d icon w=%d label w=%d rightInd w=%d\n", 
-	    Tk_PathName(comboPtr->tkwin), comboPtr->width, 
-	    comboPtr->leftIndWidth, comboPtr->iconWidth, comboPtr->labelWidth,
-	    comboPtr->rightIndWidth);
-#endif
-    if (w != Tk_ReqWidth(comboPtr->tkwin)) {
-	comboPtr->xOffset = 0;
-    }
-    if (h != Tk_ReqHeight(comboPtr->tkwin)) {
-	comboPtr->yOffset = 0;
-    }
-
-    if ((w != Tk_ReqWidth(comboPtr->tkwin)) || 
-	(h != Tk_ReqHeight(comboPtr->tkwin))) {
-	Tk_GeometryRequest(comboPtr->tkwin, w, h);
-    }
-    comboPtr->flags |= SCROLL_PENDING | LAYOUT_PENDING;
-}
-
-static void
-DestroyStyle(Style *stylePtr)
-{
-    ComboMenu *comboPtr;
-    int i;
-
-    stylePtr->refCount--;
-    if (stylePtr->refCount > 0) {
-	return;
-    }
-    comboPtr = stylePtr->comboPtr;
-    iconOption.clientData = comboPtr;
-    Blt_FreeOptions(styleConfigSpecs, (char *)stylePtr, comboPtr->display, 0);
-    if (stylePtr->labelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelActiveGC);
-    }
-    if (stylePtr->labelDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelDisabledGC);
-    }
-    if (stylePtr->labelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelNormalGC);
-    }
-    if (stylePtr->accelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelActiveGC);
-    }
-    if (stylePtr->accelDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelDisabledGC);
-    }
-    if (stylePtr->accelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelNormalGC);
-    }
-    if (stylePtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(&stylePtr->comboPtr->styleTable, stylePtr->hPtr);
-    }
-    for (i = 0; i < 3; i++) {
-	if (stylePtr->radiobutton[i] != NULL) {
-	    Blt_FreePicture(stylePtr->radiobutton[i]);
-	}
-	if (stylePtr->checkbutton[i] != NULL) {
-	    Blt_FreePicture(stylePtr->checkbutton[i]);
-	}
-    }
-    if (stylePtr != &stylePtr->comboPtr->defStyle) {
-	Blt_Free(stylePtr);
-    }
-	
-}
-
-static Style *
-AddDefaultStyle(Tcl_Interp *interp, ComboMenu *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Style *stylePtr;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->styleTable, "default", &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "combomenu style \"", "default", 
-		"\" already exists.", (char *)NULL);
-	return NULL;
-    }
-    stylePtr = &comboPtr->defStyle;
-    assert(stylePtr);
-    stylePtr->refCount = 1;
-    stylePtr->name = Blt_GetHashKey(&comboPtr->styleTable, hPtr);
-    stylePtr->hPtr = hPtr;
-    stylePtr->comboPtr = comboPtr;
-    stylePtr->borderWidth = 0;
-    stylePtr->activeRelief = TK_RELIEF_FLAT;
-    Blt_SetHashValue(hPtr, stylePtr);
-    return TCL_OK;
-}
-
-static void
-DestroyStyles(ComboMenu *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->styleTable, &iter); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Style *stylePtr;
-
-	stylePtr = Blt_GetHashValue(hPtr);
-	stylePtr->hPtr = NULL;
-	stylePtr->refCount = 0;
-	DestroyStyle(stylePtr);
-    }
-    Blt_DeleteHashTable(&comboPtr->styleTable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetStyleFromObj --
- *
- *	Gets the style associated with the given name.  
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetStyleFromObj(Tcl_Interp *interp, ComboMenu *comboPtr, Tcl_Obj *objPtr,
-		Style **stylePtrPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->styleTable, Tcl_GetString(objPtr));
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find style \"", 
-		Tcl_GetString(objPtr), "\" in combomenu \"", 
-		Tk_PathName(comboPtr->tkwin), "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *stylePtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetTag --
- *
- *	Associates a tag with a given row.  Individual row tags are
- *	stored in hash tables keyed by the tag name.  Each table is in
- *	turn stored in a hash table keyed by the row location.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A tag is stored for a particular row.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetTag(Tcl_Interp *interp, Item *itemPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-    ComboMenu *comboPtr;
-    int isNew;
-    long dummy;
-    
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;			/* Don't need to create reserved
-					 * tags. */
-    }
-    if (tagName[0] == '\0') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be empty.", 
-		(char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (tagName[0] == '-') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, 
-		"\" can't start with a '-'.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (Tcl_GetLong(NULL, (char *)tagName, &dummy) == TCL_OK) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be a number.",
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    comboPtr = itemPtr->comboPtr;
-    hPtr = Blt_CreateHashEntry(&comboPtr->tagTable, tagName, &isNew);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't add tag \"", tagName, 
-			 "\": out of memory", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (isNew) {
-	tagTablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-	Blt_InitHashTable(tagTablePtr, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tagTablePtr);
-    } else {
-	tagTablePtr = Blt_GetHashValue(hPtr);
-    }
-    hPtr = Blt_CreateHashEntry(tagTablePtr, (char *)itemPtr->index, &isNew);
-    if (isNew) {
-	Blt_SetHashValue(hPtr, itemPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTagTable --
- *
- *	Returns the hash table containing row indices for a tag.
- *
- * Results:
- *	Returns a pointer to the hash table containing indices for the
- *	given tag.  If the row has no tags, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashTable *
-GetTagTable(ComboMenu *comboPtr, const char *tagName)		
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return NULL;			/* No tag by that name. */
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-static void
-UnmanageScrollbar(ComboMenu *comboPtr, Tk_Window scrollbar)
-{
-    if (scrollbar != NULL) {
-	Tk_DeleteEventHandler(scrollbar, StructureNotifyMask,
-	      ScrollbarEventProc, comboPtr);
-	Tk_ManageGeometry(scrollbar, (Tk_GeomMgr *)NULL, comboPtr);
-	if (Tk_IsMapped(scrollbar)) {
-	    Tk_UnmapWindow(scrollbar);
-	}
-    }
-}
-
-static void
-ManageScrollbar(ComboMenu *comboPtr, Tk_Window scrollbar)
-{
-    if (scrollbar != NULL) {
-	Tk_CreateEventHandler(scrollbar, StructureNotifyMask, 
-		ScrollbarEventProc, comboPtr);
-	Tk_ManageGeometry(scrollbar, &comboMgrInfo, comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InstallScrollbar --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-InstallScrollbar(
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    ComboMenu *comboPtr,
-    Tcl_Obj *objPtr,			/* String representing scrollbar
-					 * window. */
-    Tk_Window *tkwinPtr)
-{
-    Tk_Window tkwin;
-
-    if (objPtr == NULL) {
-	*tkwinPtr = NULL;
-	return;
-    }
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objPtr), comboPtr->tkwin);
-    if (tkwin == NULL) {
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    if (Tk_Parent(tkwin) != comboPtr->tkwin) {
-	Tcl_AppendResult(interp, "scrollbar \"", Tk_PathName(tkwin), 
-			 "\" must be a child of combomenu.", (char *)NULL);
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    ManageScrollbar(comboPtr, tkwin);
-    *tkwinPtr = tkwin;
-    return;
-}
-
-static void
-InstallXScrollbar(ClientData clientData)
-{
-    ComboMenu *comboPtr = clientData;
-
-    comboPtr->flags &= ~INSTALL_XSCROLLBAR;
-    InstallScrollbar(comboPtr->interp, comboPtr, comboPtr->xScrollbarObjPtr,
-		     &comboPtr->xScrollbar);
-}
-
-static void
-InstallYScrollbar(ClientData clientData)
-{
-    ComboMenu *comboPtr = clientData;
-
-    comboPtr->flags &= ~INSTALL_YSCROLLBAR;
-    InstallScrollbar(comboPtr->interp, comboPtr, comboPtr->yScrollbarObjPtr,
-		     &comboPtr->yScrollbar);
-}
-
-
-static int
-GetIconFromObj(Tcl_Interp *interp, ComboMenu *comboPtr, Tcl_Obj *objPtr, 
-	       Icon *iconPtr)
-{
-    Blt_HashEntry *hPtr;
-    struct _Icon *iPtr;
-    int isNew;
-    const char *iconName;
-
-    iconName = Tcl_GetString(objPtr);
-    if (iconName[0] == '\0') {
-	*iconPtr = NULL;
-	return TCL_OK;
-    }
-    hPtr = Blt_CreateHashEntry(&comboPtr->iconTable, iconName, &isNew);
-    if (isNew) {
-	Tk_Image tkImage;
-	int w, h;
-
-	tkImage = Tk_GetImage(interp, comboPtr->tkwin, (char *)iconName, 
-		IconChangedProc, comboPtr);
-	if (tkImage == NULL) {
-	    Blt_DeleteHashEntry(&comboPtr->iconTable, hPtr);
-	    return TCL_ERROR;
-	}
-	Tk_SizeOfImage(tkImage, &w, &h);
-	iPtr = Blt_AssertMalloc(sizeof(struct _Icon ));
-	iPtr->tkImage = tkImage;
-	iPtr->hPtr = hPtr;
-	iPtr->refCount = 1;
-	iPtr->width = w;
-	iPtr->height = h;
-	Blt_SetHashValue(hPtr, iPtr);
-    } else {
-	iPtr = Blt_GetHashValue(hPtr);
-	iPtr->refCount++;
-    }
-    *iconPtr = iPtr;
-    return TCL_OK;
-}
-
-static void
-FreeIcon(ComboMenu *comboPtr, struct _Icon *iPtr)
-{
-    iPtr->refCount--;
-    if (iPtr->refCount == 0) {
-	Blt_DeleteHashEntry(&comboPtr->iconTable, iPtr->hPtr);
-	Tk_FreeImage(iPtr->tkImage);
-	Blt_Free(iPtr);
-    }
-}
-
-static void
-DestroyIcons(ComboMenu *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->iconTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Icon icon;
-
-	icon = Blt_GetHashValue(hPtr);
-	Tk_FreeImage(IconImage(icon));
-	Blt_Free(icon);
-    }
-    Blt_DeleteHashTable(&comboPtr->iconTable);
-}
-
-static INLINE Item *
-FindItemByLabel(ComboMenu *comboPtr, const char *label)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->labelTable, label);
-    if (hPtr != NULL) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_GetHashValue(hPtr);
-	link = Blt_Chain_FirstLink(chain);
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static char *
-NewLabel(Item *itemPtr, const char *label)
-{
-    Blt_Chain chain;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    ComboMenu *comboPtr;
-
-    comboPtr = itemPtr->comboPtr;
-    hPtr = Blt_CreateHashEntry(&comboPtr->labelTable, label, &isNew);
-    if (isNew) {
-	chain = Blt_Chain_Create();
-	Blt_SetHashValue(hPtr, chain);
-    } else {
-	chain = Blt_GetHashValue(hPtr);
-    }
-    Blt_Chain_Append(chain, itemPtr);
-    return Blt_GetHashKey(&comboPtr->labelTable, hPtr);
-}
-
-static void
-RemoveLabel(ComboMenu *comboPtr, Item *itemPtr)
-{
-    Blt_HashEntry *hPtr;
-	
-    hPtr = Blt_FindHashEntry(&comboPtr->labelTable, itemPtr->label);
-    if (hPtr != NULL) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-	
-	chain = Blt_GetHashValue(hPtr);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Item *ip;
-	    
-	    ip = Blt_Chain_GetValue(link);
-	    if (ip == itemPtr) {
-		itemPtr->label = (char *)emptyString;
-		Blt_Chain_DeleteLink(chain, link);
-		if (Blt_Chain_GetLength(chain) == 0) {
-		    Blt_Chain_Destroy(chain);
-		    Blt_DeleteHashEntry(&comboPtr->labelTable, hPtr);
-		    return;
-		}
-	    }
-	}
-    }
-}
-
-static void
-DestroyLabels(ComboMenu *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->labelTable, &iter); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_Chain chain;
-	
-	chain = Blt_GetHashValue(hPtr);
-	Blt_Chain_Destroy(chain);
-    }
-    Blt_DeleteHashTable(&comboPtr->labelTable);
-}
-
-static void
-MoveItem(ComboMenu *comboPtr, Item *itemPtr, int dir, Item *wherePtr)
-{
-    if (Blt_Chain_GetLength(comboPtr->chain) == 1) {
-	return;				/* Can't rearrange one item. */
-    }
-    Blt_Chain_UnlinkLink(comboPtr->chain, itemPtr->link);
-    switch(dir) {
-    case 0:				/* After */
-	Blt_Chain_LinkAfter(comboPtr->chain, itemPtr->link, wherePtr->link);
-	break;
-    case 1:				/* At */
-	Blt_Chain_LinkAfter(comboPtr->chain, itemPtr->link, wherePtr->link);
-	break;
-    default:
-    case 2:				/* Before */
-	Blt_Chain_LinkBefore(comboPtr->chain, itemPtr->link, wherePtr->link);
-	break;
-    }
-    {
-	Blt_ChainLink link;
-	long count;
-
-	for (count = 0, link = Blt_Chain_FirstLink(comboPtr->chain); 
-	     link != NULL; link = Blt_Chain_NextLink(link), count++) {
-	    itemPtr = Blt_Chain_GetValue(link);
-	    itemPtr->index = count;
-	}
-    }
-}
-
-static int 
-GetTypeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *typePtr)
-{
-    char *string;
-    int length, flag;
-    char c;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'r') && (length > 1) && 
-	(strncmp(string, "radiobutton", length) == 0)) {
-	flag = ITEM_RADIOBUTTON;
-    } else if ((c == 'c') && (length > 1) && 
-	(strncmp(string, "command", length) == 0)) {
-	flag = ITEM_BUTTON;
-    } else if ((c == 'c') && (length > 1) && 
-	(strncmp(string, "cascade", length) == 0)) {
-	flag = ITEM_CASCADE;
-    } else if ((c == 'c') && (length > 1) && 
-	(strncmp(string, "checkbutton", length) == 0)) {
-	flag = ITEM_CHECKBUTTON;
-    } else if ((c == 's') && (length > 1) && 
-	(strncmp(string, "separator", length) == 0)) {
-	flag = ITEM_SEPARATOR;
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown item type \"", string, 
-			     "\": should be command, checkbutton, cascade, ",
-			     "radiobutton, or separator.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *typePtr = flag;
-    return TCL_OK;
-}
-
-
-static const char *
-NameOfType(unsigned int flags)
-{
-    if (flags & ITEM_BUTTON) {
-	return "command";
-    }
-    if (flags & ITEM_RADIOBUTTON) {
-	return "radiobutton";
-    }
-    if (flags & ITEM_CHECKBUTTON) {
-	return "checkbutton";
-    }
-    if (flags & ITEM_CASCADE) {
-	return "cascade";
-    }
-    if (flags & ITEM_SEPARATOR) {
-	return "separator";
-    }
-    return "???";
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextTaggedItem --
- *
- *	Returns the next item derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first item.  If no more rows can be
- *	found, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Item *
-NextTaggedItem(ItemIterator *iterPtr)
-{
-    Item *itemPtr;
-
-    switch (iterPtr->type) {
-    case ITER_TAG:
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	    if (hPtr != NULL) {
-		return Blt_GetHashValue(hPtr);
-	    }
-	}
-	break;
-    case ITER_TYPE:
-	itemPtr = iterPtr->nextPtr;
-	if (itemPtr == NULL) {
-	    return itemPtr;
-	}
-	while (itemPtr != iterPtr->endPtr) {
-	    if (itemPtr->flags & iterPtr->itemType) {
-		break;
-	    }
-	    itemPtr = StepItem(itemPtr);
-	}
-	if (itemPtr == iterPtr->endPtr) {
-	    iterPtr->nextPtr = NULL;
-	} else {
-	    iterPtr->nextPtr = StepItem(itemPtr);
-	}
-	return itemPtr;
-
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    itemPtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return itemPtr;
-	}
-	break;
-
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Item *itemPtr;
-		
-		itemPtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(itemPtr->label, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return itemPtr;
-		}
-	    }
-	    break;
-	}
-    default:
-	break;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstTaggedItem --
- *
- *	Returns the first item derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first item.  If no more rows can be
- *	found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Item *
-FirstTaggedItem(ItemIterator *iterPtr)
-{
-    Item *itemPtr;
-	    
-    switch (iterPtr->type) {
-    case ITER_TAG: 
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	    if (hPtr == NULL) {
-		return NULL;
-	    }
-	    return Blt_GetHashValue(hPtr);
-	}
-	break;
-
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    itemPtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return itemPtr;
-	}
-	break;
-
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Item *itemPtr;
-		
-		itemPtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(itemPtr->label, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return itemPtr;
-		}
-	    }
-	}
-	break;
-
-    case ITER_TYPE:
-	itemPtr = iterPtr->startPtr;
-	if (itemPtr == NULL) {
-	    return itemPtr;
-	}
-	while (itemPtr != iterPtr->endPtr) {
-	    if (itemPtr->flags & iterPtr->itemType) {
-		break;
-	    }
-	    itemPtr = StepItem(itemPtr);
-	}
-	if (itemPtr == iterPtr->endPtr) {
-	    iterPtr->nextPtr = NULL;
-	} else {
-	    iterPtr->nextPtr = StepItem(itemPtr);
-	}
-	return itemPtr;
-
-    case ITER_SINGLE:
-	itemPtr = iterPtr->startPtr;
-	iterPtr->nextPtr = NextTaggedItem(iterPtr);
-	return itemPtr;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetItemFromObj --
- *
- *	Get the item associated the given index, tag, or label.  This routine
- *	is used when you want only one item.  It's an error if more than one
- *	item is specified (e.g. "all" tag).  It's also an error if the tag is
- *	empty (no items are currently tagged).
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetItemFromObj(Tcl_Interp *interp, ComboMenu *comboPtr, Tcl_Obj *objPtr,
-	      Item **itemPtrPtr)
-{
-    ItemIterator iter;
-    Item *firstPtr;
-
-    if (GetItemIterator(interp, comboPtr, objPtr, &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    firstPtr = FirstTaggedItem(&iter);
-    if (firstPtr != NULL) {
-	Item *nextPtr;
-
-	nextPtr = NextTaggedItem(&iter);
-	if (nextPtr != NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "multiple items specified by \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *itemPtrPtr = firstPtr;
-    return TCL_OK;
-}
-
-static int
-GetItemByIndex(Tcl_Interp *interp, ComboMenu *comboPtr, const char *string, 
-	      int length, Item **itemPtrPtr)
-{
-    Item *itemPtr;
-    char c;
-    long pos;
-
-    itemPtr = NULL;
-    c = string[0];
-    if ((isdigit(c)) && (Tcl_GetLong(NULL, string, &pos) == TCL_OK)) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_GetNthLink(comboPtr->chain, pos);
-	if (link != NULL) {
-	    itemPtr = Blt_Chain_GetValue(link);
-	} 
-	if (itemPtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find item: bad index \"", 
-			string, "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-	itemPtr = NextItem(comboPtr->activePtr);
-	if (itemPtr == NULL) {
-	    itemPtr = comboPtr->activePtr;
-	}
-    } else if ((c == 'p') && (strcmp(string, "previous") == 0)) {
-	itemPtr = PrevItem(comboPtr->activePtr);
-	if (itemPtr == NULL) {
-	    itemPtr = comboPtr->activePtr;
-	}
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	itemPtr = LastItem(comboPtr);
-    } else if ((c == 'f') && (strcmp(string, "first") == 0)) {
-	itemPtr = FirstItem(comboPtr);
-    } else if ((c == 'l') && (strcmp(string, "last") == 0)) {
-	itemPtr = LastItem(comboPtr);
-    } else if ((c == 'v') && (strcmp(string, "view.top") == 0)) {
-	itemPtr = comboPtr->firstPtr;
-    } else if ((c == 'v') && (strcmp(string, "view.bottom") == 0)) {
-	itemPtr = comboPtr->lastPtr;
-    } else if ((c == 'n') && (strcmp(string, "none") == 0)) {
-	itemPtr = NULL;
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	itemPtr = comboPtr->activePtr;
-#ifdef notdef
-    } else if ((c == 'f') && (strcmp(string, "focus") == 0)) {
-	itemPtr = comboPtr->focusPtr;
-#endif
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(comboPtr->interp, comboPtr->tkwin, string, &x, &y) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	itemPtr = NearestItem(comboPtr, x, y, TRUE);
-	if ((itemPtr != NULL) && (itemPtr->flags & ITEM_DISABLED)) {
-	    itemPtr = NextItem(itemPtr);
-	}
-    } else {
-	return TCL_CONTINUE;
-    }
-    *itemPtrPtr = itemPtr;
-    return TCL_OK;
-}
-
-static Item *
-GetItemByLabel(ComboMenu *comboPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    
-    hPtr = Blt_FindHashEntry(&comboPtr->labelTable, string);
-    if (hPtr != NULL) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_GetHashValue(hPtr);
-	link = Blt_Chain_FirstLink(chain);
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetItemIterator --
- *
- *	Converts a string representing a item index into an item pointer.  The
- *	index may be in one of the following forms:
- *
- *	 number		Item at index in the list of items.
- *	 @x,y		Item closest to the specified X-Y screen coordinates.
- *	 "active"	Item where mouse pointer is located.
- *	 "posted"       Item is the currently posted cascade item.
- *	 "next"		Next item from the focus item.
- *	 "previous"	Previous item from the focus item.
- *	 "end"		Last item.
- *	 "none"		No item.
- *
- *	 number		Item at position in the list of items.
- *	 @x,y		Item closest to the specified X-Y screen coordinates.
- *	 "active"	Item mouse is located over.
- *	 "focus"	Item is the widget's focus.
- *	 "select"	Currently selected item.
- *	 "right"	Next item from the focus item.
- *	 "left"		Previous item from the focus item.
- *	 "up"		Next item from the focus item.
- *	 "down"		Previous item from the focus item.
- *	 "end"		Last item in list.
- *	"index:number"  Item at index number in list of items.
- *	"tag:string"	Item(s) tagged by "string".
- *	"label:pattern"	Item(s) with label matching "pattern".
- *	
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via itemPtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetItemIterator(Tcl_Interp *interp, ComboMenu *comboPtr, Tcl_Obj *objPtr,
-	       ItemIterator *iterPtr)
-{
-    Item *itemPtr, *startPtr, *endPtr;
-    Blt_HashTable *tablePtr;
-    char *string;
-    char c;
-    int nBytes;
-    int length;
-    int result;
-
-    iterPtr->comboPtr = comboPtr;
-    iterPtr->type = ITER_SINGLE;
-    iterPtr->tagName = Tcl_GetStringFromObj(objPtr, &nBytes);
-    iterPtr->nextPtr = NULL;
-    iterPtr->startPtr = iterPtr->endPtr = NULL;
-
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeComboGeometry(comboPtr);
-    }
-    if (comboPtr->flags & SCROLL_PENDING) {
-	ComputeVisibleItems(comboPtr);
-    } 
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    iterPtr->startPtr = iterPtr->endPtr = comboPtr->activePtr;
-    startPtr = endPtr = itemPtr = NULL;
-    if (c == '\0') {
-	startPtr = endPtr = NULL;
-    } 
-    iterPtr->type = ITER_SINGLE;
-    result = GetItemByIndex(interp, comboPtr, string, length, &itemPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    if (result == TCL_OK) {
-	iterPtr->startPtr = iterPtr->endPtr = itemPtr;
-	return TCL_OK;
-    }
-    if ((c == 'a') && (strcmp(iterPtr->tagName, "all") == 0)) {
-	iterPtr->type  = ITER_ALL;
-	iterPtr->link = Blt_Chain_FirstLink(comboPtr->chain);
-    } else if ((c == 'i') && (length > 6) && 
-	       (strncmp(string, "index:", 6) == 0)) {
-	if (GetItemByIndex(interp, comboPtr, string + 6, length - 6, &itemPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	iterPtr->startPtr = iterPtr->endPtr = itemPtr;
-    } else if ((c == 't') && (length > 4) && 
-	       (strncmp(string, "tag:", 4) == 0)) {
-	Blt_HashTable *tablePtr;
-
-	tablePtr = GetTagTable(comboPtr, string + 4);
-	if (tablePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tag \"", string + 5,
-			"\" in \"", Tk_PathName(comboPtr->tkwin), "\"",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->tagName = string + 4;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else if ((c == 'l') && (length > 6) && 
-	       (strncmp(string, "label:", 6) == 0)) {
-	iterPtr->link = Blt_Chain_FirstLink(comboPtr->chain);
-	iterPtr->tagName = string + 6;
-	iterPtr->type = ITER_PATTERN;
-    } else if ((itemPtr = GetItemByLabel(comboPtr, string)) != NULL) {
-	iterPtr->startPtr = iterPtr->endPtr = itemPtr;
-    } else if ((tablePtr = GetTagTable(comboPtr, string)) != NULL) {
-	iterPtr->tagName = string;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find item index, label, or tag \"", 
-		string, "\" in \"", Tk_PathName(comboPtr->tkwin), "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-    
-static int
-ConfigureItem(
-    Tcl_Interp *interp,
-    Item *itemPtr,
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    ComboMenu *comboPtr;
-
-    comboPtr = itemPtr->comboPtr;
-    iconOption.clientData = comboPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, itemConfigSpecs, 
-	objc, objv, (char *)itemPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    ComputeItemGeometry(comboPtr, itemPtr);
-    return TCL_OK;
-}
-
-static int
-ConfigureStyle(Tcl_Interp *interp, Style *stylePtr, int objc, 
-	       Tcl_Obj *const *objv, int flags)
-{
-    ComboMenu *comboPtr = stylePtr->comboPtr;
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC newGC;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, styleConfigSpecs, 
-	objc, objv, (char *)stylePtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Normal label */
-    gcMask = GCForeground | GCFont | GCLineWidth;
-    gcValues.line_width = 0;
-    gcValues.foreground = stylePtr->labelNormalColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->labelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->labelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelNormalGC);
-    }
-    stylePtr->labelNormalGC = newGC;
-	
-    /* Disabled label */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = stylePtr->labelDisabledColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->labelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->labelDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelDisabledGC);
-    }
-    stylePtr->labelDisabledGC = newGC;
-	
-    /* Active label */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = stylePtr->labelActiveColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->labelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->labelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelActiveGC);
-    }
-    stylePtr->labelActiveGC = newGC;
-
-    /* Normal accelerator */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = stylePtr->accelNormalColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->accelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->accelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelNormalGC);
-    }
-    stylePtr->accelNormalGC = newGC;
-	
-    /* Disabled accelerator */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = stylePtr->accelDisabledColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->accelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->accelDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelDisabledGC);
-    }
-    stylePtr->accelDisabledGC = newGC;
-	
-    /* Active accelerator */
-    gcMask = GCForeground | GCFont;
-    gcValues.foreground = stylePtr->accelActiveColor->pixel;
-    gcValues.font = Blt_FontId(stylePtr->accelFont);
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->accelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->accelActiveGC);
-    }
-    stylePtr->accelActiveGC = newGC;
-
-#ifdef notdef
-    if (itemPtr->flags & (ITEM_RADIOBUTTON | ITEM_CHECKBUTTON)) {
-	itemPtr->leftIndWidth = ITEM_L_IND_WIDTH + 2 * ITEM_IPAD;
-	itemPtr->leftIndHeight = ITEM_L_IND_HEIGHT;
-    }
-#endif
-    return TCL_OK;
-}
-
-static int
-ConfigureComboMenu(Tcl_Interp *interp, ComboMenu *comboPtr, int objc,
-		   Tcl_Obj *const *objv, int flags)
-{
-    int updateNeeded;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, comboConfigSpecs, 
-	objc, objv, (char *)comboPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (ConfigureStyle(interp, &comboPtr->defStyle, 0, NULL, 
-		       BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }	
-
-    updateNeeded = FALSE;
-    /* Install the embedded scrollbars as needed.  We defer installing the
-     * scrollbars so the scrollbar widgets don't have to exist when they are
-     * specified by the -xscrollbar and -yscrollbar options respectively. The
-     * down-side is that errors found in the scrollbar name will be
-     * backgrounded. */
-    if (Blt_ConfigModified(comboConfigSpecs, "-xscrollbar", (char *)NULL)) {
-	if (comboPtr->xScrollbar != NULL) {
-	    UnmanageScrollbar(comboPtr, comboPtr->xScrollbar);
-	    comboPtr->xScrollbar = NULL;
-	}
-	if ((comboPtr->flags & INSTALL_XSCROLLBAR) == 0) {
-	    Tcl_DoWhenIdle(InstallXScrollbar, comboPtr);
-	    comboPtr->flags |= INSTALL_XSCROLLBAR;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (Blt_ConfigModified(comboConfigSpecs, "-yscrollbar", (char *)NULL)) {
-	if (comboPtr->yScrollbar != NULL) {
-	    UnmanageScrollbar(comboPtr, comboPtr->yScrollbar);
-	    comboPtr->yScrollbar = NULL;
-	}
-	if ((comboPtr->flags & INSTALL_YSCROLLBAR) == 0) {
-	    Tcl_DoWhenIdle(InstallYScrollbar, comboPtr);
-	    comboPtr->flags |= INSTALL_YSCROLLBAR;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (updateNeeded) {
-	if ((comboPtr->flags & UPDATE_PENDING) == 0) {
-	    Tcl_DoWhenIdle(ConfigureScrollbarsProc, comboPtr);
-	    comboPtr->flags |= UPDATE_PENDING;
-	}	    
-    }
-    return TCL_OK;
-}
-
-/* Widget Callbacks */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboMenuEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	comboentry widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboMenuEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ComboMenu *comboPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(comboPtr);
-	}
-    } else if (eventPtr->type == UnmapNotify) {
-	if (comboPtr->lastPtr != NULL) {
-	    UnpostCascade((Tcl_Interp *)NULL, comboPtr);
-	    EventuallyRedraw(comboPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	comboPtr->flags |= (SCROLL_PENDING | LAYOUT_PENDING);
-	EventuallyRedraw(comboPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    comboPtr->flags |= FOCUS;
-	} else {
-	    comboPtr->flags &= ~FOCUS;
-	}
-	EventuallyRedraw(comboPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (comboPtr->tkwin != NULL) {
-	    comboPtr->tkwin = NULL; 
-	}
-	if (comboPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayComboMenu, comboPtr);
-	}
-	Tcl_EventuallyFree(comboPtr, DestroyComboMenu);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarEventProc --
- *
- *	This procedure is invoked by the Tk event handler when StructureNotify
- *	events occur in a scrollbar managed by the widget.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollbarEventProc(
-    ClientData clientData,		/* Pointer to Entry structure for
-					 * widget referred to by eventPtr. */
-    XEvent *eventPtr)			/* Describes what just happened. */
-{
-    ComboMenu *comboPtr = clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(comboPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (eventPtr->xany.window == Tk_WindowId(comboPtr->yScrollbar)) {
-	    comboPtr->yScrollbar = NULL;
-	} else if (eventPtr->xany.window == Tk_WindowId(comboPtr->xScrollbar)) {
-	    comboPtr->xScrollbar = NULL;
-	} 
-	comboPtr->flags |= LAYOUT_PENDING;;
-	EventuallyRedraw(comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarCustodyProc --
- *
- * 	This procedure is invoked when a scrollbar has been stolen by another
- * 	geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
-  *	Arranges for the combomenu to have its layout re-arranged at the next
- *	idle point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ScrollbarCustodyProc(
-    ClientData clientData,		/* Information about the combomenu. */
-    Tk_Window tkwin)			/* Scrollbar stolen by another geometry
-					 * manager. */
-{
-    ComboMenu *comboPtr = (ComboMenu *)clientData;
-
-    if (tkwin == comboPtr->yScrollbar) {
-	comboPtr->yScrollbar = NULL;
-	comboPtr->yScrollbarWidth = 0;
-    } else if (tkwin == comboPtr->xScrollbar) {
-	comboPtr->xScrollbar = NULL;
-	comboPtr->xScrollbarHeight = 0;
-    } else {
-	return;		
-    }
-    Tk_UnmaintainGeometry(tkwin, comboPtr->tkwin);
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for scrollbars managed
- *	by the combomenu.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the combomenu to have its layout re-computed and
- *	re-arranged at the next idle point.
- *
- * -------------------------------------------------------------------------- */
-/* ARGSUSED */
-static void
-ScrollbarGeometryProc(
-    ClientData clientData,		/* ComboMenu widget record.  */
-    Tk_Window tkwin)			/* Scrollbar whose geometry has
-					 * changed. */
-{
-    ComboMenu *comboPtr = (ComboMenu *)clientData;
-
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * ItemVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state variable
- *	associated with a radiobutton or checkbutton entry.  The entry's
- *	selected state is set to match the value of the variable.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The combobox entry may become selected or deselected.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-ItemVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    Item *itemPtr = clientData;
-    Tcl_Obj *objPtr;
-    int bool;
-
-    assert(itemPtr->variableObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	itemPtr->flags &= ~ITEM_SELECTED;
-	if (flags & TCL_TRACE_DESTROYED) {
-	    char *varName;
-
-	    varName = Tcl_GetString(itemPtr->variableObjPtr);
-	    Tcl_TraceVar(interp, varName, VAR_FLAGS, ItemVarTraceProc, 
-		clientData);
-	}
-	goto done;
-    }
-
-    if ((itemPtr->flags & (ITEM_RADIOBUTTON | ITEM_CHECKBUTTON)) == 0) {
-	return NULL;		       /* Not a radiobutton or checkbutton. */
-    }
-
-    /*
-     * Use the value of the variable to update the selected status of the
-     * item.
-     */
-    objPtr = Tcl_ObjGetVar2(interp, itemPtr->variableObjPtr, NULL, 
-			    TCL_GLOBAL_ONLY);
-    if (objPtr == NULL) {
-	return NULL;			/* Can't get value of variable. */
-    }
-    bool = 0;
-    if (itemPtr->flags & ITEM_RADIOBUTTON) {
-	const char *string;
-
-	if (itemPtr->valueObjPtr == NULL) {
-	    string = itemPtr->label;
-	} else {
-	    string = Tcl_GetString(itemPtr->valueObjPtr);
-	}
-	if (string == NULL) {
-	    return NULL;
-	}
-	bool = (strcmp(string, Tcl_GetString(objPtr)) == 0);
-    } else if (itemPtr->flags & ITEM_CHECKBUTTON) {
-	if (itemPtr->onValueObjPtr == NULL) {
-	    if (Tcl_GetBooleanFromObj(NULL, objPtr, &bool) != TCL_OK) {
-		return NULL;
-	    }
-	} else {
-	    bool =  (strcmp(Tcl_GetString(objPtr), 
-			    Tcl_GetString(itemPtr->onValueObjPtr)) == 0);
-	}
-    }
-    if (bool) {
-       if (itemPtr->flags & ITEM_SELECTED) {
-	   return NULL;			/* Already selected. */
-       }
-       itemPtr->flags |= ITEM_SELECTED;
-    } else if (itemPtr->flags & ITEM_SELECTED) {
-	itemPtr->flags &= ~ITEM_SELECTED;
-    } else {
-	return NULL;			/* Already deselected. */
-    }
- done:
-    EventuallyRedraw(itemPtr->comboPtr);
-    return NULL;			/* Done. */
-}
-
-/*ARGSUSED*/
-static void
-FreeTraceVarProc(ClientData clientData, Display *display, char *widgRec, 
-		 int offset)
-{
-    Item *itemPtr = (Item *)(widgRec);
-
-    if (itemPtr->variableObjPtr != NULL) {
-	const char *varName;
-	ComboMenu *comboPtr;
-
-	comboPtr = itemPtr->comboPtr;
-	varName = Tcl_GetString(itemPtr->variableObjPtr);
-	Tcl_UntraceVar(comboPtr->interp, varName, VAR_FLAGS, ItemVarTraceProc, 
-		itemPtr);
-	Tcl_DecrRefCount(itemPtr->variableObjPtr);
-	itemPtr->variableObjPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
-
- * ObjToTraceVarProc --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTraceVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    const char *varName;
-
-    /* Remove the current trace on the variable. */
-    if (itemPtr->variableObjPtr != NULL) {
-	varName = Tcl_GetString(itemPtr->variableObjPtr);
-	Tcl_UntraceVar(interp, varName, VAR_FLAGS, ItemVarTraceProc, itemPtr);
-	Tcl_DecrRefCount(itemPtr->variableObjPtr);
-	itemPtr->variableObjPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-    itemPtr->variableObjPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, VAR_FLAGS, ItemVarTraceProc, itemPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceVarToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TraceVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    Tcl_Obj *objPtr;
-
-    if (itemPtr->variableObjPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	objPtr = itemPtr->variableObjPtr;
-    }
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeStyleProc(ClientData clientData, Display *display, char *widgRec, 
-	      int offset)
-{
-    Style *stylePtr = *(Style **)(widgRec + offset);
-
-    if ((stylePtr != NULL) && (stylePtr != &stylePtr->comboPtr->defStyle)) {
-	DestroyStyle(stylePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStyleProc --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStyleProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboMenu *comboPtr;
-    Item *itemPtr = (Item *)widgRec;
-    Style **stylePtrPtr = (Style **)(widgRec + offset);
-    Style *stylePtr;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    comboPtr = itemPtr->comboPtr;
-    if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	stylePtr = NULL;
-    } else if (GetStyleFromObj(interp, comboPtr, objPtr, &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Release the old style. */
-    if ((*stylePtrPtr != NULL) && (*stylePtrPtr != &comboPtr->defStyle)) {
-	DestroyStyle(*stylePtrPtr);
-    }
-    stylePtr->refCount++;
-    *stylePtrPtr = stylePtr;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StyleToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Style *stylePtr = *(Style **)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (stylePtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	objPtr = Tcl_NewStringObj(stylePtr->name, -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToRestrictProc --
- *
- *	Convert the string representation of an item state into a flag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToRestrictProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing state. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    char *string;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "min") == 0) {
-	flag = RESTRICT_MIN;
-    } else if (strcmp(string, "max") == 0) {
-	flag = RESTRICT_MAX;
-    } else if (strcmp(string, "both") == 0) {
-	flag = RESTRICT_MIN|RESTRICT_MAX;
-    } else if (strcmp(string, "none") == 0) {
-	flag = 0;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-		"\": should be active, disabled, or normal.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *flagsPtr &= ~(RESTRICT_MIN|RESTRICT_MAX);
-    *flagsPtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestrictToObjProc --
- *
- *	Return the string representation of the restrict flags.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-RestrictToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    int restrict;
-
-    restrict = *flagsPtr & (RESTRICT_MIN|RESTRICT_MAX);
-    switch (restrict) {
-    case RESTRICT_MIN:
-	return Tcl_NewStringObj("min", -1);	
-    case RESTRICT_MAX:
-	return Tcl_NewStringObj("max", -1);
-    case (RESTRICT_MIN|RESTRICT_MAX):
-	return Tcl_NewStringObj("both", -1);
-    case RESTRICT_NONE:
-	return Tcl_NewStringObj("none", -1);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStateProc --
- *
- *	Convert the string representation of an item state into a flag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStateProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing state. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    char *string;
-    ComboMenu *comboPtr;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "active") == 0) {
-	flag = ITEM_ACTIVE;
-    } else if (strcmp(string, "disabled") == 0) {
-	flag = ITEM_DISABLED;
-    } else if (strcmp(string, "normal") == 0) {
-	flag = ITEM_NORMAL;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-		"\": should be active, disabled, or normal.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (itemPtr->flags & flag) {
-	return TCL_OK;			/* State is already set to value. */
-    }
-    comboPtr = itemPtr->comboPtr;
-    if (comboPtr->activePtr != itemPtr) {
-	ActivateItem(comboPtr, NULL);
-	comboPtr->activePtr = NULL;
-    }
-    *flagsPtr &= ~ITEM_STATE_MASK;
-    *flagsPtr |= flag;
-    if (flag == ITEM_ACTIVE) {
-	ActivateItem(comboPtr, itemPtr);
-	comboPtr->activePtr = itemPtr;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StateToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StateToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int state = *(unsigned int *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (state & ITEM_NORMAL) {
-	objPtr = Tcl_NewStringObj("normal", -1);
-    } else if (state & ITEM_ACTIVE) {
-	objPtr = Tcl_NewStringObj("active", -1);
-    } else if (state & ITEM_DISABLED) {
-	objPtr = Tcl_NewStringObj("disabled", -1);
-    } else {
-	objPtr = Tcl_NewStringObj("???", -1);
-    }
-    return objPtr;
-}
-
-
-/*ARGSUSED*/
-static void
-FreeTagsProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    ComboMenu *comboPtr;
-    Item *itemPtr = (Item *)widgRec;
-
-    comboPtr = itemPtr->comboPtr;
-    ReleaseTags(comboPtr, itemPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTagsProc --
- *
- *	Convert the string representation of a list of tags.
- *
- * Results:
- *	The return value is a standard TCL result.  The tags are
- *	save in the widget.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTagsProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboMenu *comboPtr;
-    Item *itemPtr = (Item *)widgRec;
-    int i;
-    char *string;
-    int objc;
-    Tcl_Obj **objv;
-
-    comboPtr = itemPtr->comboPtr;
-    ReleaseTags(comboPtr, itemPtr);
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	SetTag(interp, itemPtr, Tcl_GetString(objv[i]));
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagsToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TagsToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    ComboMenu *comboPtr;
-    Item *itemPtr = (Item *)widgRec;
-    Tcl_Obj *listObjPtr;
-
-    comboPtr = itemPtr->comboPtr;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tagTablePtr;
-	Blt_HashEntry *h2Ptr;
-
-	tagTablePtr = Blt_GetHashValue(hPtr); 
-	h2Ptr = Blt_FindHashEntry(tagTablePtr, (char *)itemPtr->index);
-	if (h2Ptr != NULL) {
-	    Tcl_Obj *objPtr;
-	    const char *name;
-
-	    name = Tcl_GetHashKey(&comboPtr->tagTable, hPtr);
-	    objPtr = Tcl_NewStringObj(name, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,		/* Not used. */
-    int imageWidth, int imageHeight)	/* Not used. */
-{
-    ComboMenu *comboPtr = clientData;
-
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconProc --
- *
- *	Convert a image into a hashed icon.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ComboMenu *comboPtr = clientData;
-    Icon *iconPtr = (Icon *)(widgRec + offset);
-    Icon icon;
-
-    if (GetIconFromObj(interp, comboPtr, objPtr, &icon) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (*iconPtr != NULL) {
-	FreeIcon(comboPtr, *iconPtr);
-    }
-    *iconPtr = icon;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObjProc --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (icon == NULL) {
-	objPtr = Tcl_NewStringObj("", 0);
-    } else {
-	objPtr =Tcl_NewStringObj(Blt_Image_Name(IconImage(icon)), -1);
-    }
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeIconProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Icon *iconPtr = (Icon *)(widgRec + offset);
-
-    if (*iconPtr != NULL) {
-	ComboMenu *comboPtr = clientData;
-
-	FreeIcon(comboPtr, *iconPtr);
-	*iconPtr = NULL;
-    }
-}
-
-/*ARGSUSED*/
-static void
-FreeLabelProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Item *itemPtr = (Item *)widgRec;
-
-    if (itemPtr->label != emptyString) {
-	RemoveLabel(itemPtr->comboPtr, itemPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLabelProc --
- *
- *	Save the label and add the item to the label hashtable.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLabelProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    char *string;
-
-    if (itemPtr->label != emptyString) {
-	RemoveLabel(itemPtr->comboPtr, itemPtr);
-    }
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-    itemPtr->label = NewLabel(itemPtr, string);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LabelToObjProc --
- *
- *	Return the label of the item.
- *
- * Results:
- *	The label is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LabelToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    Tcl_Obj *objPtr;
-
-    if (itemPtr->label == emptyString) {
-	objPtr = Blt_EmptyStringObj();
-    } else {
-	objPtr = Tcl_NewStringObj(itemPtr->label, -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTypeProc --
- *
- *	Convert the string representation of an item into a value.
- *
- * Results:
- *	A standard TCL result.  The type pointer is written into the
- *	widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTypeProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing type. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int *typePtr = (unsigned int *)(widgRec + offset);
-    int flag;
-
-    if (GetTypeFromObj(interp, objPtr, &flag) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *typePtr &= ~ITEM_TYPE_MASK;
-    *typePtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeToObjProc --
- *
- *	Return the name of the type.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TypeToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int type = *(int *)(widgRec + offset);
-    
-    return Tcl_NewStringObj(NameOfType(type), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeSwitch --
- *
- *	Convert a string representing an item type into its integer value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    unsigned int *typePtr = (unsigned int *)(record + offset);
-    int flag;
-
-    if (GetTypeFromObj(interp, objPtr, &flag) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *typePtr &= ~ITEM_TYPE_MASK;
-    *typePtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemSwitch --
- *
- *	Convert a string representing an item into its pointer.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ItemSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Item **itemPtrPtr = (Item **)(record + offset);
-    ComboMenu *comboPtr = clientData;
-    Item *itemPtr;
-
-    if (GetItemFromObj(NULL, comboPtr, objPtr, &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    *itemPtrPtr = itemPtr;
-    return TCL_OK;
-}
-
-
-/* Widget Operations */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm activate item
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    if (GetItemFromObj(NULL, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    if (comboPtr->activePtr == itemPtr) {
-	return TCL_OK;			/* Item is already active. */
-    }
-    ActivateItem(comboPtr, NULL);
-    comboPtr->activePtr = NULL;
-    if ((itemPtr != NULL) && 
-	((itemPtr->flags & (ITEM_DISABLED|ITEM_SEPARATOR)) == 0)) {
-	ActivateItem(comboPtr, itemPtr);
-	comboPtr->activePtr = itemPtr;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * AddOp --
- *
- *	Appends a new item to the combomenu.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The combomenu entry may become selected or deselected.
- *
- *   .cm add radiobutton -text "fred" -tags ""
- *
- *---------------------------------------------------------------------------
- */
-static int
-AddOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    itemPtr = NewItem(comboPtr);
-    if (ConfigureItem(interp, itemPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	DestroyItem(itemPtr);
-	return TCL_ERROR;		/* Error configuring the entry. */
-    }
-    EventuallyRedraw(comboPtr);
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), itemPtr->index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AddListOp --
- *
- *	Appends a list of items to the combomenu.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	New items are added to the combomenu.
- *
- *   .cm add labelList -type radiobutton -text "fred" -tags ""
- *
- *---------------------------------------------------------------------------
- */
-static int
-AddListOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    int i;
-    int iobjc;
-    Tcl_Obj **iobjv;
-    Tcl_Obj *listObjPtr;
-
-    if (Tcl_ListObjGetElements(interp, objv[2], &iobjc, &iobjv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (i = 0; i < iobjc; i++) {
-	Tcl_Obj *objPtr;
-	Item *itemPtr;
-
-	itemPtr = NewItem(comboPtr);
-	if (ConfigureItem(interp, itemPtr, objc - 3, objv + 3, 0) != TCL_OK) {
-	    DestroyItem(itemPtr);
-	    return TCL_ERROR;	
-	}
-	itemPtr->label = NewLabel(itemPtr, Tcl_GetString(iobjv[i]));
-	objPtr = Tcl_NewLongObj(itemPtr->index);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    EventuallyRedraw(comboPtr);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm configure ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    ComboMenu *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int result;
-
-    iconOption.clientData = comboPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		comboConfigSpecs, (char *)comboPtr, (Tcl_Obj *)NULL,  0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		comboConfigSpecs, (char *)comboPtr, objv[2], 0);
-    }
-    Tcl_Preserve(comboPtr);
-    result = ConfigureComboMenu(interp, comboPtr, objc - 2, objv + 2, 
-		BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(comboPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm cget option
- *
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(
-    ComboMenu *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, comboConfigSpecs,
-	(char *)comboPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm delete item...
- *
- *---------------------------------------------------------------------------
- */
-static int
-DeleteOp(
-    ComboMenu *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	ItemIterator iter;
-	Item *itemPtr, *nextPtr;
-
-	if (GetItemIterator(interp, comboPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (itemPtr = FirstTaggedItem(&iter); itemPtr != NULL; 
-	     itemPtr = nextPtr) {
-	    nextPtr = NextTaggedItem(&iter);
-	    DestroyItem(itemPtr);
-	}
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *	Search for an item according to the string given.
- *
- * Results:
- *	The index of the found item is returned.  If no item is found
- *	-1 is returned.
- *
- *    .cm find string -from active -previous -underline -type separator 
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    long index;
-    FindSwitches switches;
-    const char *pattern;
-
-    /* Process switches  */
-    pattern = Tcl_GetString(objv[2]);
-    switches.mask = 0;
-    switches.type = 0;
-    itemSwitch.clientData = comboPtr;
-
-    switches.fromPtr = comboPtr->activePtr;
-    if (Blt_ParseSwitches(interp, findSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    index = -1;
-    if (switches.mask & FIND_UNDERLINE) {
-	Tcl_UniChar want;
-	Item *itemPtr;
-	
-	itemPtr = switches.fromPtr;
-	itemPtr = (itemPtr == NULL) ? FirstItem(comboPtr) : NextItem(itemPtr);
-	want = Tcl_UniCharAtIndex(pattern, 0);
-	want = Tcl_UniCharToLower(want);
-	for (/*empty*/; itemPtr != NULL; itemPtr = NextItem(itemPtr)) {
-	    if (itemPtr->underline >= 0) {
-		Tcl_UniChar have;
-		
-		have = Tcl_UniCharAtIndex(itemPtr->label, itemPtr->underline);
-		have = Tcl_UniCharToLower(have);
-		if (want == have) {
-		    index = itemPtr->index;
-		    break;
-		}
-	    }
-	}
-	if (itemPtr == NULL) {
-	    for (itemPtr = FirstItem(comboPtr); itemPtr != NULL; 
-		 itemPtr = NextItem(itemPtr)) {
-		if (itemPtr->underline >= 0) {
-		    Tcl_UniChar have;
-		    
-		    have = Tcl_UniCharAtIndex(itemPtr->label, 
-					      itemPtr->underline);
-		    have = Tcl_UniCharToLower(have);
-		    if (want == have) {
-			index = itemPtr->index;
-			break;
-		    }
-		}
-		if (itemPtr == comboPtr->activePtr) {
-		    break;
-		}
-	    }
-	}
-    } else if (switches.mask & FIND_DECREASING) {
-	Item *itemPtr;
-
-	itemPtr = switches.fromPtr;
-	itemPtr = (itemPtr == NULL) ? LastItem(comboPtr) : PrevItem(itemPtr);
-	for (/*empty*/; itemPtr != NULL; itemPtr = PrevItem(itemPtr)) {
-	    int found;
-
-	    if ((switches.type > 0) && ((switches.type & itemPtr->flags)==0)) {
-		continue;
-	    }
-	    if (switches.mask & FIND_GLOB) {
-		found = Tcl_StringMatch(itemPtr->label, pattern);
-	    } else if (switches.mask & FIND_REGEXP) {
-		found = Tcl_RegExpMatch(NULL, itemPtr->label, pattern); 
-	    } else {
-		found = (strcmp(itemPtr->label, pattern) == 0);
-	    }
-	    if (found) {
-		index = itemPtr->index;
-		break;
-	    }
-	}
-    } else {
-	Blt_ChainLink link;
-	Item *itemPtr;
-
-	itemPtr = switches.fromPtr;
-	itemPtr = (itemPtr == NULL) ? FirstItem(comboPtr) : NextItem(itemPtr);
-	for (link = itemPtr->link; link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    int found;
-	    
-	    itemPtr = Blt_Chain_GetValue(link);
-	    if ((switches.type > 0) && ((switches.type & itemPtr->flags)==0)) {
-		continue;
-	    }
-	    if (switches.search == FIND_GLOB) {
-		found = Tcl_StringMatch(itemPtr->label, pattern);
-	    } else if (switches.search == FIND_REGEXP) {
-		found = Tcl_RegExpMatch(NULL, itemPtr->label, pattern); 
-	    } else {
-		found = (strcmp(itemPtr->label, pattern) == 0);
-	    }
-	    if (found) {
-		index = itemPtr->index;
-		break;
-	    }
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm index item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-IndexOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    int index;
-
-    index = -1;
-    if (GetItemFromObj(NULL, comboPtr, objv[2], &itemPtr) == TCL_OK) {
-	if (itemPtr != NULL) {
-	    index = itemPtr->index;
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .cm invoke item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InvokeOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    int result;
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((itemPtr == NULL) || (itemPtr->flags & ITEM_DISABLED)) {
-	return TCL_OK;		/* Item is currently disabled. */
-    }
-    result = TCL_OK;
-    Tcl_Preserve(itemPtr);
-    result = SelectItem(interp, comboPtr, itemPtr, -1);
-    /*
-     * We check nItems in addition to whether the item has a command because
-     * that goes to zero if the combomenu is deleted (e.g., during command
-     * evaluation).
-     */
-    if ((Blt_Chain_GetLength(comboPtr->chain) > 0) && (result == TCL_OK) && 
-	(itemPtr->cmdObjPtr != NULL)) {
-	Tcl_IncrRefCount(itemPtr->cmdObjPtr);
-	result = Tcl_EvalObjEx(interp, itemPtr->cmdObjPtr, TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(itemPtr->cmdObjPtr);
-    }
-    Tcl_Release(itemPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Inserts a new item into the combomenu at the given index.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The combomenu gets a new item.
- *
- *   .cm insert before 0 after 1 -text label 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InsertOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Item *itemPtr, *wherePtr;
-    int dir;
-    static const char *dirs[] = { "after", "at", "before" , NULL};
-
-    if (Tcl_GetIndexFromObj(interp, objv[2], dirs, "key", 0, &dir) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetItemFromObj(interp, comboPtr, objv[3], &wherePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (wherePtr == NULL) {
-	Tcl_AppendResult(interp, "can't insert item: no index \"", 
-			 Tcl_GetString(objv[3]), "\"", (char *)NULL);
-    	return TCL_ERROR;		/* No item. */
-    }
-    itemPtr = NewItem(comboPtr);
-    if (ConfigureItem(interp, itemPtr, objc - 4, objv + 4, 0) != TCL_OK) {
-	DestroyItem(itemPtr);
-	return TCL_ERROR;		/* Error configuring the entry. */
-    }
-    MoveItem(comboPtr, itemPtr, dir, wherePtr);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemConfigureOp --
- *
- *	This procedure handles item operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *	.cm item configure item ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ItemConfigureOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    ItemIterator iter;
-
-    if (GetItemIterator(interp, comboPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    iconOption.clientData = comboPtr;
-    for (itemPtr = FirstTaggedItem(&iter); itemPtr != NULL; 
-	 itemPtr = NextTaggedItem(&iter)) {
-	int result;
-	unsigned int flags;
-
-	flags = BLT_CONFIG_OBJV_ONLY;
-	if (objc == 4) {
-	    return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		itemConfigSpecs, (char *)itemPtr, (Tcl_Obj *)NULL, flags);
-	} else if (objc == 5) {
-	    return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		itemConfigSpecs, (char *)itemPtr, objv[4], flags);
-	}
-	Tcl_Preserve(itemPtr);
-	result = ConfigureItem(interp, itemPtr, objc - 4, objv + 4,  flags);
-	Tcl_Release(itemPtr);
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemCgetOp --
- *
- *	This procedure handles item operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *	.cm item cget item option
- *
- *---------------------------------------------------------------------------
- */
-static int
-ItemCgetOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, comboPtr, objv[3], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	Tcl_AppendResult(interp, "can't retrieve item \"", 
-			 Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, itemConfigSpecs,
-	(char *)itemPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemOp --
- *
- *	This procedure handles item operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec itemOps[] = {
-    {"cget",      2, ItemCgetOp,      5, 5, "item option",},
-    {"configure", 2, ItemConfigureOp, 4, 0, "item ?option value?...",},
-};
-    
-static int nItemOps = sizeof(itemOps) / sizeof(Blt_OpSpec);
-
-static int
-ItemOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ComboMenuCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nItemOps, itemOps, BLT_OP_ARG2, objc, objv, 
-		0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	.cm names pattern...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    int i;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (i = 2; i < objc; i++) {
-	const char *pattern;
-	Blt_ChainLink link;
-
-	pattern = Tcl_GetString(objv[i]);
-	for (link = Blt_Chain_FirstLink(comboPtr->chain); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Item *itemPtr;
-	    Tcl_Obj *objPtr;
-
-	    itemPtr = Blt_Chain_GetValue(link);
-	    if (Tcl_StringMatch(itemPtr->label, pattern)) {
-		if (itemPtr->label == emptyString) {
-		    objPtr = Blt_EmptyStringObj();
-		} else {
-		    objPtr = Tcl_NewStringObj(itemPtr->label, -1);
-		}
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-NearestOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    int x, y;			
-    int wx, wy;			
-    Item *itemPtr;
-    int isRoot;
-    char *string;
-
-    isRoot = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    } 
-    if (objc < 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-		" ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-    if ((Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[2], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (isRoot) {
-	int rootX, rootY;
-
-	Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-	x -= rootX;
-	y -= rootY;
-    }
-    itemPtr = NearestItem(comboPtr, x, y, TRUE);
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    x = WORLDX(comboPtr, x);
-    y = WORLDY(comboPtr, y);
-    wx = itemPtr->xWorld + ITEM_XPAD;
-    wy = itemPtr->xWorld + ITEM_XPAD;
-    if (objc > 4) {
-	const char *where;
-
-	where = "";
-	if (itemPtr->flags & (ITEM_RADIOBUTTON | ITEM_CHECKBUTTON)) {
-	    int bx, by, bw, bh;
-
-	    bx = wx;
-	    by = wy;
-	    if (itemPtr->flags & ITEM_RADIOBUTTON) {
-		bw = IconWidth(comboPtr->rbIcon);
-		bh = IconHeight(comboPtr->rbIcon);
-	    } else {
-		bw = IconWidth(comboPtr->cbIcon);
-		bh = IconHeight(comboPtr->cbIcon);
-	    }
-	    wx += comboPtr->leftIndWidth + ITEM_IPAD;
-	    if ((x >= bx) && (x < (bx + bw)) && (y >= by) && (y < (by + bh))) {
-		if (itemPtr->flags & ITEM_RADIOBUTTON) {
-		    where = "radiobutton";
-		} else {
-		    where = "checkbutton";
-		}		    
-		goto done;
-	    }
-	} 
-	if (itemPtr->icon != NULL) {
-	    int ix, iy, iw, ih;
-	    
-	    ih = IconHeight(itemPtr->icon);
-	    iw = IconWidth(itemPtr->icon);
-	    ix = wx;
-	    iy = wy;
-	    wx += comboPtr->iconWidth + ITEM_IPAD;
-	    if ((x >= ix) && (x <= (ix + iw)) && (y >= iy) && (y < (iy + ih))) {
-		where = "icon";
-		goto done;
-	    }
-	}
-	if ((itemPtr->label != emptyString) || (itemPtr->image != NULL)) {
-	    int lx, ly;
-
-	    lx = wx;
-	    ly = wy;
-
-	    wx += comboPtr->labelWidth + ITEM_IPAD;
-	    if ((x >= lx) && (x < (lx + itemPtr->labelWidth)) &&
-		(y >= ly) && (y < (ly + itemPtr->labelHeight))) {
-		where = "label";
-		goto done;
-	    }
-	}
-	if ((itemPtr->accel != NULL) || (itemPtr->flags & ITEM_CASCADE)) {
-	    int ax, ay, aw, ah;
-
-	    ax = wx;
-	    ay = wy;
-	    aw = itemPtr->rightIndWidth;
-	    ah = itemPtr->rightIndHeight;
-	    if ((x >= ax) && (x < (ax + aw)) && (y >= ay) && (y < (ay + ah))) {
-		if (itemPtr->flags & ITEM_CASCADE) {
-		    where = "cascade";
-		} else {
-		    where = "accelerator";
-		}
-		goto done;
-	    }
-
-	}
-    done:
-	if (Tcl_SetVar(interp, Tcl_GetString(objv[4]), where, 
-		TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), itemPtr->index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm next item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-NextOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    int index;
-
-    index = -1;
-    if (GetItemFromObj(NULL, comboPtr, objv[2], &itemPtr) == TCL_OK) {
-	itemPtr = NextItem(itemPtr);
-	if (itemPtr != NULL) {
-	    index = itemPtr->index;
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostOp --
- *
- *	Posts this menu at the given root screen coordinates.
- *
- *  .cm post ?switches?
- *
- *	-anchor ne -fill yes -width 80 -x -y 
- *	.cm post -x 0 -y 0 -reqwidth -reqheight -anchor -fill yes 
- *---------------------------------------------------------------------------
- */
-static int
-PostOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    Tk_Window parent;
-    int menuWidth;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) || 
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    parent = Tk_Parent(comboPtr->tkwin);
-    comboPtr->parentWidth = 0;
-    menuWidth = comboPtr->normalWidth;
-    if (menuWidth < Tk_Width(parent)) {
-	menuWidth = Tk_Width(parent);
-    }
-    if (objc == 5) {
-	const char *string;
-
-	string = Tcl_GetString(objv[4]);
-	if (strcmp(string, "left") == 0) {
-	    /* Do nothing. */
-	} else if (strcmp(string, "right") == 0) {
-	    x -= menuWidth;
-	} else if (strcmp(string, "center") == 0) {
-	    x -= menuWidth / 2;
-	} else {
-	    Tcl_AppendResult(interp, "bad alignment value \"", string, 
-		"\": should be left, right, or center.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	comboPtr->parentWidth = Tk_Width(parent);
-    }
-    fprintf(stderr, "Post %s pw=%d cw=%d mw=%d\n", 
-	    Tk_PathName(comboPtr->tkwin), Tk_Width(parent), 
-		Tk_Width(comboPtr->tkwin), menuWidth);
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeComboGeometry(comboPtr);
-    }
-    FixMenuCoords(comboPtr, &x, &y);
-    /*
-     * If there is a post command for the menu, execute it.  This may change
-     * the size of the menu, so be sure to recompute the menu's geometry if
-     * needed.
-     */
-    if (comboPtr->postCmdObjPtr != NULL) {
-	int result;
-
-	Tcl_IncrRefCount(comboPtr->postCmdObjPtr);
-	result = Tcl_EvalObjEx(interp, comboPtr->postCmdObjPtr,TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->postCmdObjPtr);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	/*
-	 * The post commands could have deleted the menu, which means we are
-	 * dead and should go away.
-	 */
-	if (comboPtr->tkwin == NULL) {
-	    return TCL_OK;
-	}
-	if (comboPtr->flags & LAYOUT_PENDING) {
-	    ComputeComboGeometry(comboPtr);
-	}
-    }
-
-    /*
-     * Adjust the position of the menu if necessary to keep it visible on the
-     * screen.  There are two special tricks to make this work right:
-     *
-     * 1. If a virtual root window manager is being used then
-     *    the coordinates are in the virtual root window of
-     *    menuPtr's parent;  since the menu uses override-redirect
-     *    mode it will be in the *real* root window for the screen,
-     *    so we have to map the coordinates from the virtual root
-     *    (if any) to the real root.  Can't get the virtual root
-     *    from the menu itself (it will never be seen by the wm)
-     *    so use its parent instead (it would be better to have an
-     *    an option that names a window to use for this...).
-     * 2. The menu may not have been mapped yet, so its current size
-     *    might be the default 1x1.  To compute how much space it
-     *    needs, use its requested size, not its actual size.
-     *
-     * Note that this code assumes square screen regions and all positive
-     * coordinates. This does not work on a Mac with multiple monitors. But
-     * then again, Tk has other problems with this.
-     */
-    {
-	int vx, vy, vw, vh;
-	int tmp;
-	Screen *screenPtr;
-
-	Tk_GetVRootGeometry(Tk_Parent(comboPtr->tkwin), &vx, &vy, &vw, &vh);
-	x += vx;
-	y += vy;
-	screenPtr = Tk_Screen(comboPtr->tkwin);
-	tmp = WidthOfScreen(screenPtr) - Tk_Width(comboPtr->tkwin);
-	if (x > tmp) {
-	    x = tmp;
-	}
-	if (x < 0) {
-	    x = 0;
-	}
-	tmp = HeightOfScreen(screenPtr) - Tk_Height(comboPtr->tkwin);
-	if (y > tmp) {
-	    y = tmp;
-	}
-	if (y < 0) {
-	    y = 0;
-	}
-	fprintf(stderr, "moving menu %s to x=%d,y=%d, menuWidth=%d\n", 
-		Tk_PathName(comboPtr->tkwin), x, y, menuWidth);
-	Tk_MoveToplevelWindow(comboPtr->tkwin, x, y);
-	if (!Tk_IsMapped(comboPtr->tkwin)) {
-	    Tk_MapWindow(comboPtr->tkwin);
-	}
-	Blt_MapToplevelWindow(comboPtr->tkwin);
-	Blt_RaiseToplevelWindow(comboPtr->tkwin);
-#ifdef notdef
-	TkWmRestackToplevel(comboPtr->tkwin, Above, NULL);
-#endif
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostCascadeOp --
- *
- *	Posts the menu of a cascade item.  If the item is a cascade menu, then
- *	the submenu is requested to be posted.
- *
- * Results: 
- *	A standard TCL result.
- *
- * Side effects:  
- *	The item's submenu may be posted.
- *
- *  .cm postcascade item
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostCascadeOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    if (GetItemFromObj(interp, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == comboPtr->postedPtr) {
-	return TCL_OK;			/* Nothing to do, submenu is already
-					 * posted. */
-    }
-    if (UnpostCascade(interp, comboPtr) != TCL_OK) {
-	return TCL_ERROR;		/* Error unposting submenu. */
-    }
-    if ((itemPtr != NULL) && (itemPtr->menuObjPtr != NULL) && 
-	((itemPtr->flags & (ITEM_CASCADE|ITEM_DISABLED)) == ITEM_CASCADE)) {
-	return PostCascade(interp, comboPtr, itemPtr);
-    }
-    return TCL_OK;			/* No menu to post. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PreviousOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm previous item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-PreviousOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    int index;
-
-    index = -1;
-    if (GetItemFromObj(NULL, comboPtr, objv[2], &itemPtr) == TCL_OK) {
-	itemPtr = PrevItem(itemPtr);
-	if (itemPtr != NULL) {
-	    index = itemPtr->index;
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int oper;
-    int x, y;
-
-#define SCAN_MARK	1
-#define SCAN_DRAGTO	2
-    {
-	char *string;
-	char c;
-	int length;
-	
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	c = string[0];
-	if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	    oper = SCAN_MARK;
-	} else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	    oper = SCAN_DRAGTO;
-	} else {
-	    Tcl_AppendResult(interp, "bad scan operation \"", string,
-		"\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if ((Blt_GetPixelsFromObj(interp, comboPtr->tkwin, objv[3], PIXELS_ANY, &x) 
-	 != TCL_OK) ||
-	(Blt_GetPixelsFromObj(interp, comboPtr->tkwin, objv[4], PIXELS_ANY, &y) 
-	 != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (oper == SCAN_MARK) {
-	comboPtr->scanAnchorX = x;
-	comboPtr->scanAnchorY = y;
-	comboPtr->scanX = comboPtr->xOffset;
-	comboPtr->scanY = comboPtr->yOffset;
-    } else {
-	int xWorld, yWorld;
-	int viewWidth, viewHeight;
-	int dx, dy;
-
-	dx = comboPtr->scanAnchorX - x;
-	dy = comboPtr->scanAnchorY - y;
-	xWorld = comboPtr->scanX + (10 * dx);
-	yWorld = comboPtr->scanY + (10 * dy);
-
-	viewWidth = VPORTWIDTH(comboPtr);
-	if (xWorld > (comboPtr->worldWidth - viewWidth)) {
-	    xWorld = comboPtr->worldWidth - viewWidth;
-	}
-	if (xWorld < 0) {
-	    xWorld = 0;
-	}
-	viewHeight = VPORTHEIGHT(comboPtr);
-	if (yWorld > (comboPtr->worldHeight - viewHeight)) {
-	    yWorld = comboPtr->worldHeight - viewHeight;
-	}
-	if (yWorld < 0) {
-	    yWorld = 0;
-	}
-	comboPtr->xOffset = xWorld;
-	comboPtr->yOffset = yWorld;
-	comboPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(comboPtr);
-    }
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-SeeOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    int x, y, w, h;
-    Tk_Anchor anchor;
-    int left, right, top, bottom;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    anchor = TK_ANCHOR_W;		/* Default anchor is West */
-    if ((string[0] == '-') && (strcmp(string, "-anchor") == 0)) {
-	if (objc == 3) {
-	    Tcl_AppendResult(interp, "missing \"-anchor\" argument",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Tk_GetAnchorFromObj(interp, objv[3], &anchor) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	objc -= 2, objv += 2;
-    }
-    if (objc == 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", objv[0],
-	    "see ?-anchor anchor? item\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetItemFromObj(interp, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-
-    w = VPORTWIDTH(comboPtr);
-    h = VPORTHEIGHT(comboPtr);
-
-    /*
-     * XVIEW:	If the entry is left or right of the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    left = comboPtr->xOffset;
-    right = comboPtr->xOffset + w;
-
-    switch (anchor) {
-    case TK_ANCHOR_W:
-    case TK_ANCHOR_NW:
-    case TK_ANCHOR_SW:
-	x = 0;
-	break;
-    case TK_ANCHOR_E:
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_SE:
-	x = itemPtr->xWorld + itemPtr->width - w;
-	break;
-    default:
-	if (itemPtr->xWorld < left) {
-	    x = itemPtr->xWorld;
-	} else if ((itemPtr->xWorld + itemPtr->width) > right) {
-	    x = itemPtr->xWorld + itemPtr->width - w;
-	} else {
-	    x = comboPtr->xOffset;
-	}
-	break;
-    }
-
-    /*
-     * YVIEW:	If the entry is above or below the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    top = comboPtr->yOffset;
-    bottom = comboPtr->yOffset + h;
-
-    switch (anchor) {
-    case TK_ANCHOR_N:
-	y = comboPtr->yOffset;
-	break;
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_NW:
-	y = itemPtr->yWorld - (h / 2);
-	break;
-    case TK_ANCHOR_S:
-    case TK_ANCHOR_SE:
-    case TK_ANCHOR_SW:
-	y = itemPtr->yWorld + itemPtr->height - h;
-	break;
-    default:
-	if (itemPtr->yWorld < top) {
-	    y = itemPtr->yWorld;
-	} else if ((itemPtr->yWorld + itemPtr->height) > bottom) {
-	    y = itemPtr->yWorld + itemPtr->height - h;
-	} else {
-	    y = comboPtr->yOffset;
-	}
-	break;
-    }
-    if ((y != comboPtr->yOffset) || (x != comboPtr->xOffset)) {
-	comboPtr->xOffset = x;
-	comboPtr->yOffset = y;
-	comboPtr->flags |= SCROLL_PENDING;
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .cm select item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-    const char *cmd;
-    int result;
-
-    if (GetItemFromObj(interp, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((itemPtr == NULL) || (itemPtr->flags & ITEM_DISABLED)) {
-	return TCL_OK;			/* Item is currently disabled. */
-    }
-    cmd = Tcl_GetString(objv[1]);
-    Tcl_Preserve(itemPtr);
-    result = SelectItem(interp, comboPtr, itemPtr, cmd[0] == 's');
-    Tcl_Release(itemPtr);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-SizeOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), 
-		   Blt_Chain_GetLength(comboPtr->chain));
-    return TCL_OK;
-}
-
-/* .m style create name option value option value */
-    
-static int
-StyleCreateOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->styleTable, Tcl_GetString(objv[3]),
-		&isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "combomenu style \"", Tcl_GetString(objv[3]),
-		"\" already exists.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    stylePtr = Blt_AssertCalloc(1, sizeof(Style));
-    stylePtr->name = Blt_GetHashKey(&comboPtr->styleTable, hPtr);
-    stylePtr->hPtr = hPtr;
-    stylePtr->comboPtr = comboPtr;
-    stylePtr->borderWidth = 0;
-    stylePtr->activeRelief = TK_RELIEF_RAISED;
-    Blt_SetHashValue(hPtr, stylePtr);
-    iconOption.clientData = comboPtr;
-    if (ConfigureStyle(interp, stylePtr, objc - 4, objv + 4, 0) != TCL_OK) {
-	DestroyStyle(stylePtr);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-StyleCgetOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    iconOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, styleConfigSpecs,
-	(char *)stylePtr, objv[4], 0);
-}
-
-static int
-StyleConfigureOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    int result, flags;
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    iconOption.clientData = comboPtr;
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		styleConfigSpecs, (char *)stylePtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		styleConfigSpecs, (char *)stylePtr, objv[2], flags);
-    }
-    Tcl_Preserve(stylePtr);
-    result = ConfigureStyle(interp, stylePtr, objc - 4, objv + 4, flags);
-    Tcl_Release(stylePtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-static int
-StyleDeleteOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (stylePtr->refCount > 0) {
-	Tcl_AppendResult(interp, "can't destroy combomenu style \"", 
-			 stylePtr->name, "\": style in use.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    DestroyStyle(stylePtr);
-    return TCL_OK;
-}
-
-static int
-StyleNamesOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->styleTable, &iter); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Style *stylePtr;
-	int found;
-	int i;
-
-	found = TRUE;
-	stylePtr = Blt_GetHashValue(hPtr);
-	for (i = 3; i < objc; i++) {
-	    const char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    found = Tcl_StringMatch(stylePtr->name, pattern);
-	    if (found) {
-		break;
-	    }
-	}
-	if (found) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(stylePtr->name, -1));
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec styleOps[] =
-{
-    {"cget",        2, StyleCgetOp,        5, 5, "name option",},
-    {"configure",   2, StyleConfigureOp,   4, 0, "name ?option value?...",},
-    {"create",      2, StyleCreateOp,      4, 0, "name ?option value?...",},
-    {"delete",      1, StyleDeleteOp,      3, 0, "?name...?",},
-    {"names",       1, StyleNamesOp,       3, 0, "?pattern...?",},
-};
-
-static int nStyleOps = sizeof(styleOps) / sizeof(Blt_OpSpec);
-
-static int
-StyleOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ComboMenuCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nStyleOps, styleOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-
-static int
-TypeOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, comboPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr != NULL) {
-	const char *name;
-
-	name = NameOfType(itemPtr->flags);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), name, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostOp --
- *
- *	Unposts this menu.
- *
- *  .cm post 
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	return TCL_OK;		/* This menu is already unposted. */
-    }
-    /* Deactivate the current item. */
-    if (comboPtr->postedPtr != NULL) {
-	if (UnpostCascade(interp, comboPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	comboPtr->postedPtr = NULL;
-    }
-    if (Tk_IsMapped(comboPtr->tkwin)) {
-	Tk_UnmapWindow(comboPtr->tkwin);
-    }
-#ifdef notdef
-    {
-	int result;
-
-	Tcl_Obj *cmd[2];
-	char *path;
-	
-	path = Tk_PathName(Tk_Parent(comboPtr->tkwin));
-	cmd[0] = Tcl_NewStringObj(path, -1);
-	cmd[1] = Tcl_NewStringObj("unpost", 6);
-	Tcl_IncrRefCount(cmd[0]);
-	Tcl_IncrRefCount(cmd[1]);
-	result = Tcl_EvalObjv(interp, 2, cmd, 0);
-	Tcl_DecrRefCount(cmd[1]);
-	Tcl_DecrRefCount(cmd[0]);
-	return result;
-    }
-#else
-    return TCL_OK;
-#endif
-}
-
-static int
-XpositionOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, comboPtr, objv[3], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	Tcl_AppendResult(interp, "can't get x-position of item: no item \"", 
-			 Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), itemPtr->xWorld-comboPtr->xOffset);
-    return TCL_OK;
-}
-
-static int
-XviewOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int w;
-
-    w = VPORTWIDTH(comboPtr);
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr, *objPtr;
-
-	/* Report first and last fractions */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)comboPtr->xOffset / (comboPtr->worldWidth+1);
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	fract = (double)(comboPtr->xOffset + w) / (comboPtr->worldWidth+1);
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &comboPtr->xOffset,
-	comboPtr->worldWidth, w, comboPtr->xScrollUnits, 
-	BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-static int
-YpositionOp(ComboMenu *comboPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, comboPtr, objv[3], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	Tcl_AppendResult(interp, "can't get y-position of item: such index \"", 
-			 Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), itemPtr->yWorld-comboPtr->yOffset);
-    return TCL_OK;
-}
-
-static int
-YviewOp(
-    ComboMenu *comboPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int height;
-
-    height = VPORTHEIGHT(comboPtr);
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr, *objPtr;
-
-	/* Report first and last fractions */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)comboPtr->yOffset / (comboPtr->worldHeight+1);
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	fract = (double)(comboPtr->yOffset + height) /(comboPtr->worldHeight+1);
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &comboPtr->yOffset,
-	comboPtr->worldHeight, height, comboPtr->yScrollUnits, 
-	BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyComboMenu --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyComboMenu(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    ComboMenu *comboPtr = (ComboMenu *)dataPtr;
-
-    DestroyItems(comboPtr);
-    DestroyStyles(comboPtr);
-    DestroyLabels(comboPtr);
-    Blt_DeleteHashTable(&comboPtr->tagTable);
-    DestroyIcons(comboPtr);
-    if (comboPtr->painter != NULL) {
-	Blt_FreePainter(comboPtr->painter);
-    }
-    iconOption.clientData = comboPtr;
-    Blt_FreeOptions(comboConfigSpecs, (char *)comboPtr, comboPtr->display, 0);
-    Tcl_DeleteCommandFromToken(comboPtr->interp, comboPtr->cmdToken);
-    Blt_Free(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewComboMenu --
- *
- *---------------------------------------------------------------------------
- */
-static ComboMenu *
-NewComboMenu(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    ComboMenu *comboPtr;
-
-    comboPtr = Blt_AssertCalloc(1, sizeof(ComboMenu));
-
-    Tk_SetClass(tkwin, "ComboMenu");
-
-    comboPtr->tkwin = tkwin;
-    comboPtr->display = Tk_Display(tkwin);
-    comboPtr->interp = interp;
-    comboPtr->flags |= LAYOUT_PENDING | SCROLL_PENDING;
-    comboPtr->relief = TK_RELIEF_SOLID;
-    comboPtr->xScrollUnits = 2;
-    comboPtr->yScrollUnits = 2;
-    comboPtr->borderWidth = 1;
-    comboPtr->chain = Blt_Chain_Create();
-    comboPtr->painter = Blt_GetPainter(tkwin, 1.0);
-    Blt_ResetLimits(&comboPtr->reqWidth);
-    Blt_ResetLimits(&comboPtr->reqHeight);
-    Blt_InitHashTable(&comboPtr->iconTable,  BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->labelTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->styleTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->tagTable, BLT_STRING_KEYS);
-    AddDefaultStyle(interp, comboPtr);
-    Blt_SetWindowInstanceData(tkwin, comboPtr);
-    return comboPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboMenuCmd --
- *
- * 	This procedure is invoked to process the "combomenu" command.  See the
- * 	user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec menuOps[] =
-{
-    {"activate",    2, ActivateOp,    3, 3, "item",},
-    {"add",         2, AddOp,         2, 0, "?option value?",},
-    {"cget",        2, CgetOp,        3, 3, "option",},
-    {"configure",   2, ConfigureOp,   2, 0, "?option value?...",},
-    {"delete",      3, DeleteOp,      2, 0, "items...",},
-    {"deselect",    3, SelectOp,      3, 3, "item",},
-    {"find",        1, FindOp,        3, 0, "string ?switches?",},
-    {"index",       3, IndexOp,       3, 3, "item",},
-    {"insert",      3, InsertOp,      3, 0, 
-	"after|at|before index ?option value?",},
-    {"invoke",      3, InvokeOp,      3, 3, "item",},
-    {"item",        2, ItemOp,        2, 0, "oper args",},
-    {"listadd",     1, AddListOp,     3, 0, "labelList ?option value?",},
-    {"names",       2, NamesOp,       2, 0, "?pattern...?",},
-    {"nearest",     3, NearestOp,     4, 4, "x y",},
-    {"next",        3, NextOp,        3, 3, "item",},
-    {"post",        4, PostOp,        4, 5, "x y ?align?",},
-    {"postcascade", 5, PostCascadeOp, 3, 3, "item",},
-    {"previous",    2, PreviousOp,    3, 3, "item",},
-    {"scan",        2, ScanOp,        5, 5, "dragto|mark x y",},
-    {"see",         3, SeeOp,         3, 5, "item",},
-    {"select",      3, SelectOp,      3, 3, "item",},
-    {"size",        2, SizeOp,        2, 2, "",},
-    {"style",       2, StyleOp,       2, 0, "op ?args...?",},
-    {"type",        1, TypeOp,        3, 3, "item",},
-    {"unpost",      1, UnpostOp,      2, 2, "",},
-    {"xposition",   2, XpositionOp,   3, 3, "item",},
-    {"xview",       2, XviewOp,       2, 5, 
-	"?moveto fract? ?scroll number what?",},
-    {"yposition",   2, YpositionOp,   3, 3, "item",},
-    {"yview",       2, YviewOp,       2, 5, 
-	"?moveto fract? ?scroll number what?",},
-};
-
-static int nMenuOps = sizeof(menuOps) / sizeof(Blt_OpSpec);
-
-typedef int (ComboInstOp)(ComboMenu *comboPtr, Tcl_Interp *interp, int objc,
-			  Tcl_Obj *const *objv);
-
-static int
-ComboMenuInstCmdProc(
-    ClientData clientData,		/* Information about the widget. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument vector. */
-{
-    ComboInstOp *proc;
-    ComboMenu *comboPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nMenuOps, menuOps, BLT_OP_ARG1, objc, objv,
-	0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(comboPtr);
-    result = (*proc) (comboPtr, interp, objc, objv);
-    Tcl_Release(comboPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboMenuInstCmdDeletedProc --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboMenuInstCmdDeletedProc(ClientData clientData)
-{
-    ComboMenu *comboPtr = clientData;	/* Pointer to widget record. */
-
-    if (comboPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = comboPtr->tkwin;
-	comboPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboMenuCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ComboMenuCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    ComboMenu *comboPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tk_Window tkwin;
-    XSetWindowAttributes attrs;
-    char *path;
-    unsigned int mask;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, invoke a procedure to initialize
-     * various bindings on the combomenu widget.  If the procedure doesn't
-     * already exist, source it from "$blt_library/combomenu.tcl".  We
-     * deferred sourcing the file until now so that the variable $blt_library
-     * could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::ComboMenu::PostMenu", &cmdInfo)) {
-	if (Tcl_GlobalEval(interp, 
-		"source [file join $blt_library combomenu.tcl]") != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    path = Tcl_GetString(objv[1]);
-#define TOP_LEVEL_SCREEN ""
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, 
-	TOP_LEVEL_SCREEN);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    comboPtr = NewComboMenu(interp, tkwin);
-    if (ConfigureComboMenu(interp, comboPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(comboPtr->tkwin);
-	return TCL_ERROR;
-    }
-    mask = (ExposureMask | StructureNotifyMask | FocusChangeMask);
-    Tk_CreateEventHandler(tkwin, mask, ComboMenuEventProc, comboPtr);
-    comboPtr->cmdToken = Tcl_CreateObjCommand(interp, path, 
-	ComboMenuInstCmdProc, comboPtr, ComboMenuInstCmdDeletedProc);
-
-    attrs.override_redirect = True;
-    attrs.backing_store = WhenMapped;
-    attrs.save_under = True;
-    mask = (CWOverrideRedirect | CWSaveUnder | CWBackingStore);
-    Tk_ChangeWindowAttributes(tkwin, mask, &attrs);
-
-    Tk_MakeWindowExist(tkwin);
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboViewCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ComboViewCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    ComboMenu *comboPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tk_Window tkwin;
-    char *path;
-    unsigned int mask;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, invoke a procedure to initialize
-     * various bindings on the combomenu widget.  If the procedure doesn't
-     * already exist, source it from "$blt_library/combomenu.tcl".  We
-     * deferred sourcing the file until now so that the variable $blt_library
-     * could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::ComboMenu::PostMenu", &cmdInfo)) {
-	if (Tcl_GlobalEval(interp, 
-		"source [file join $blt_library combomenu.tcl]") != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    comboPtr = NewComboMenu(interp, tkwin);
-    if (ConfigureComboMenu(interp, comboPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(comboPtr->tkwin);
-	return TCL_ERROR;
-    }
-    mask = (ExposureMask | StructureNotifyMask | FocusChangeMask);
-    Tk_CreateEventHandler(tkwin, mask, ComboMenuEventProc, comboPtr);
-    comboPtr->cmdToken = Tcl_CreateObjCommand(interp, path, 
-	ComboMenuInstCmdProc, comboPtr, ComboMenuInstCmdDeletedProc);
-
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-int
-Blt_ComboMenuInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec[2] = { 
-	{ "combomenu", ComboMenuCmd }, 
-	{ "comboview", ComboViewCmd }, 
-    };
-    return Blt_InitCmds(interp, "::blt", cmdSpec, 2);
-}
-
-
-static void
-DrawItemBackground(Item *itemPtr, Drawable drawable, int x, int y)
-{
-    Blt_Background bg;
-    Style *stylePtr;
-    ComboMenu *comboPtr;    
-    int relief;
-    int w, h;
-
-    stylePtr = itemPtr->stylePtr;
-    comboPtr = itemPtr->comboPtr;
-    relief = itemPtr->relief;
-    if ((itemPtr->flags & (ITEM_DISABLED|ITEM_SEPARATOR)) == ITEM_DISABLED) {
-	bg = stylePtr->disabledBg;
-    } else if (itemPtr->flags & ITEM_ACTIVE) {
-	bg = stylePtr->activeBg;
-	relief = stylePtr->activeRelief;
-    } else {
-	bg = stylePtr->normalBg;
-    }	    
-    w = VPORTWIDTH(comboPtr);
-    w = MAX(comboPtr->worldWidth, w);
-    h = itemPtr->height;
-#ifndef notdef
-    if (y == 0) {
-	int xOrigin, yOrigin;
-	int px, py;
-
-	px = PIXMAPX(comboPtr, itemPtr->xWorld);
-	py = PIXMAPY(comboPtr, itemPtr->yWorld);
-	Blt_GetBackgroundOrigin(bg, &xOrigin, &yOrigin);
-	Blt_SetBackgroundOrigin(comboPtr->tkwin, bg, px, py);
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, 
-		w, h, stylePtr->borderWidth, relief);
-	Blt_SetBackgroundOrigin(comboPtr->tkwin, bg, xOrigin, yOrigin);
-    } else {
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, 
-		w, h, stylePtr->borderWidth, relief);
-    }	
-#else
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, w, h,
-	stylePtr->borderWidth, relief);
-#endif
-}
-
-static void
-DrawSeparator(Item *itemPtr, Drawable drawable, int x, int y, int w, int h)
-{
-    XPoint points[2];
-    Tk_3DBorder border;
-    ComboMenu *comboPtr;    
-    Style *stylePtr;
-
-    comboPtr = itemPtr->comboPtr;
-    stylePtr = itemPtr->stylePtr;
-    border = Blt_BackgroundBorder(stylePtr->normalBg);
-    points[0].x = x + ITEM_XPAD;
-    points[0].y = y + h / 2;
-    points[1].x = w - 2 * ITEM_XPAD;
-    points[1].y = points[0].y;
-    Tk_Draw3DPolygon(comboPtr->tkwin, drawable, border, points, 2, 1, 
-		     TK_RELIEF_SUNKEN);
-}
-
-static void
-DrawCheckButton(Item *itemPtr, Drawable drawable, int x, int y, int w, int h)
-{
-    Style *stylePtr;
-    Display *display;
-    ComboMenu *comboPtr;
-    XColor *outlineColor, *fillColor, *checkColor;
-
-    comboPtr = itemPtr->comboPtr;
-    Blt_Picture picture;
-    int on;
-    stylePtr = itemPtr->stylePtr;
-    display = itemPtr->comboPtr->display;
-    on = (itemPtr->flags & ITEM_SELECTED);
-    fillColor = (stylePtr->indFillColor) 
-	? stylePtr->indFillColor : comboPtr->checkButtonFillColor;
-    outlineColor = (stylePtr->indOutlineColor) 
-	? stylePtr->indOutlineColor : comboPtr->checkButtonOutlineColor;
-    checkColor = (stylePtr->indColor) 
-	? stylePtr->indColor : comboPtr->checkButtonColor;
-    if (itemPtr->flags & ITEM_DISABLED) {
-	if (stylePtr->checkbutton[0] == NULL) {
-	    if (fillColor != NULL) {
-		fillColor = Blt_BackgroundBorderColor(stylePtr->disabledBg);
-	    }
-	    if (outlineColor != NULL) {
-		outlineColor = stylePtr->labelDisabledColor;
-	    }
-	    stylePtr->checkbutton[0] = 
-		Blt_PaintCheckbox(w, h, fillColor, outlineColor,
-			Blt_BackgroundBorderColor(stylePtr->disabledBg),
-			FALSE);
-	} 
-	picture = stylePtr->checkbutton[0];
-    } else {
-	Blt_Picture *picturePtr;
-
-	picturePtr = (on) ? stylePtr->checkbutton + 1 :
-	    stylePtr->checkbutton + 2;
-	if (*picturePtr == NULL) {
-	    *picturePtr = Blt_PaintCheckbox(w, h, fillColor, outlineColor, 
-		checkColor, on);
-	}
-	picture = *picturePtr;
-    }
-    Blt_PaintPicture(comboPtr->painter, drawable, picture, 0, 0, w, h, x, y, 0);
-}
-
-static void
-DrawRadioButton(Item *itemPtr, Drawable drawable, int x, int y, int w, int h)
-{
-    Style *stylePtr;
-    Display *display;
-    ComboMenu *comboPtr;
-    Blt_Picture picture;
-    int on;
-
-    comboPtr = itemPtr->comboPtr;
-    stylePtr = itemPtr->stylePtr;
-    display = itemPtr->comboPtr->display;
-
-    on = (itemPtr->flags & ITEM_SELECTED);
-    if (itemPtr->flags & ITEM_DISABLED) {
-	picture = stylePtr->radiobutton[0];
-	if (picture == NULL) {
-	    picture = Blt_PaintRadioButton(w, h, 
-		Blt_BackgroundBorderColor(stylePtr->disabledBg),
-		stylePtr->labelDisabledColor,
-		stylePtr->labelDisabledColor,
-		FALSE);
-	    stylePtr->radiobutton[0] = picture;
-	} 
-    } else {
-	Blt_Picture *picturePtr;
-
-	picturePtr = (on) ? stylePtr->radiobutton + 1 :
-	    stylePtr->radiobutton + 2;
-	if (*picturePtr == NULL) {
-	    XColor *fillColor, *circleColor, *outlineColor;
-
-	    fillColor = (stylePtr->indFillColor) 
-		? stylePtr->indFillColor : comboPtr->radioButtonFillColor;
-	    outlineColor = (stylePtr->indOutlineColor) 
-		? stylePtr->indOutlineColor : comboPtr->radioButtonOutlineColor;
-	    circleColor = (stylePtr->indColor) 
-		? stylePtr->indColor : comboPtr->radioButtonColor;
-	    *picturePtr = Blt_PaintRadioButton(w, h, fillColor, outlineColor, 
-		circleColor, on);
-	}
-	picture = *picturePtr;
-    }
-    Blt_PaintPicture(comboPtr->painter, drawable, picture, 0, 0, w, h, x, y, 0);
-}
-
-static void
-DrawItem(Item *itemPtr, Drawable drawable, int x, int y)
-{
-    ComboMenu *comboPtr;    
-    Style *stylePtr;
-    int x0, w, h;
-
-    itemPtr->flags &= ~ITEM_REDRAW;
-    stylePtr = itemPtr->stylePtr;
-    comboPtr = itemPtr->comboPtr;
-    x0 = x;
-    w = VPORTWIDTH(comboPtr) - 2 * stylePtr->borderWidth;
-    x += stylePtr->borderWidth + comboPtr->borderWidth;
-    h = itemPtr->height - 2 * stylePtr->borderWidth;
-    y += stylePtr->borderWidth;
-    if (itemPtr->flags & ITEM_SEPARATOR) {
-	DrawSeparator(itemPtr, drawable, x, y, w, h);
-	y += ITEM_SEP_HEIGHT;
-    } else {	    
-	x += ITEM_IPAD;
-	/* Radiobutton or checkbutton. */
-	if (itemPtr->flags & (ITEM_RADIOBUTTON | ITEM_CHECKBUTTON)) {
-	    if (itemPtr->flags & ITEM_RADIOBUTTON) {
-		DrawRadioButton(itemPtr, drawable, x,
-			  y + (h - itemPtr->leftIndHeight) / 2,
-			  itemPtr->leftIndWidth, itemPtr->leftIndHeight);
-	    } else if (itemPtr->flags & ITEM_CHECKBUTTON) {
-		DrawCheckButton(itemPtr, drawable, x, 
-			  y + (h - itemPtr->leftIndHeight) / 2,
-			  itemPtr->leftIndWidth, itemPtr->leftIndHeight);
-	    }		
-	}
-	x += itemPtr->indent;
-	if (comboPtr->leftIndWidth > 0) {
-	    x += comboPtr->leftIndWidth + ITEM_IPAD;
-	}
-	/* Icon. */
-	if (itemPtr->icon != NULL) {
-	    if ((Blt_IsPicture(IconImage(itemPtr->icon))) && 
-		(itemPtr->flags & ITEM_DISABLED)) {
-		Blt_Picture picture;
-		Blt_Painter painter;
-		
-		painter = Blt_GetPainter(comboPtr->tkwin, 1.0);
-		picture = Blt_GetPictureFromImage(IconImage(itemPtr->icon));
-		picture = Blt_GreyscalePicture(picture);
-		Blt_PaintPicture(painter, drawable, picture, 0, 0, 
-			IconWidth(itemPtr->icon), IconHeight(itemPtr->icon), 
-			x + (comboPtr->iconWidth - itemPtr->iconWidth) / 2, 
-			y + (h - IconHeight(itemPtr->icon)) / 2, 0);
-		Blt_FreePicture(picture);
-	    } else {
-		Tk_RedrawImage(IconImage(itemPtr->icon), 0, 0, 
-			IconWidth(itemPtr->icon), IconHeight(itemPtr->icon), 
-			drawable, 
-			x + (comboPtr->iconWidth - itemPtr->iconWidth) / 2, 
-			y + (h - IconHeight(itemPtr->icon)) / 2);
-	    }
-	    if (comboPtr->iconWidth > 0) {
-		x += comboPtr->iconWidth + ITEM_IPAD;
-	    }
-	}
-	/* Image or label. */
-	if (itemPtr->image != NULL) {
-	    Tk_RedrawImage(IconImage(itemPtr->image), 0, 0, 
-		IconWidth(itemPtr->image), IconHeight(itemPtr->image), 
-		drawable, x, y + (h - IconHeight(itemPtr->image)) / 2);
-	} else if (itemPtr->label != emptyString) {
-	    TextStyle ts;
-	    XColor *fg;
-	    
-	    if (itemPtr->flags & ITEM_DISABLED) {
-		fg = stylePtr->labelDisabledColor;
-	    } else if (itemPtr->flags & ITEM_ACTIVE) {
-		fg = stylePtr->labelActiveColor;
-	    } else {
-		fg = stylePtr->labelNormalColor;
-	    }
-	    Blt_Ts_InitStyle(ts);
-	    Blt_Ts_SetFont(ts, stylePtr->labelFont);
-	    Blt_Ts_SetForeground(ts, fg);
-	    Blt_Ts_SetAnchor(ts, TK_ANCHOR_NW);
-	    Blt_Ts_SetUnderline(ts, itemPtr->underline);
-	    Blt_Ts_SetJustify(ts, TK_JUSTIFY_LEFT);
-	    Blt_DrawText(comboPtr->tkwin, drawable, (char *)itemPtr->label, &ts,
-		x, y + (h - itemPtr->labelHeight) / 2);
-	}
-	x = x0 + MAX(comboPtr->worldWidth, VPORTWIDTH(comboPtr)) - 2*ITEM_IPAD;
-	/* Accelerator or submenu arrow. */
-	if (itemPtr->flags & ITEM_CASCADE) {
-	    XColor *color;
-
-	    if (itemPtr->flags & ITEM_DISABLED) {
-		color = stylePtr->labelDisabledColor;
-	    } else if (itemPtr->flags & ITEM_ACTIVE) {
-		color = stylePtr->labelActiveColor;
-	    } else {
-		color = stylePtr->labelNormalColor;
-	    }
-	    x -= ITEM_R_IND_WIDTH;
-	    Blt_DrawArrow(comboPtr->display, drawable, color, x + ITEM_IPAD, y, 
-		ITEM_R_IND_WIDTH, h, 1, ARROW_RIGHT);
-	} else if (itemPtr->accel != NULL) {
-	    TextStyle ts;
-	    XColor *fg;
-	    
-	    if (itemPtr->flags & ITEM_DISABLED) {
-		fg = stylePtr->accelDisabledColor;
-	    } else if (itemPtr->flags & ITEM_ACTIVE) {
-		fg = stylePtr->accelActiveColor;
-	    } else {
-		fg = stylePtr->accelNormalColor;
-	    }
-	    Blt_Ts_InitStyle(ts);
-	    Blt_Ts_SetForeground(ts, fg);
-	    Blt_Ts_SetFont(ts, stylePtr->accelFont);
-	    Blt_Ts_SetAnchor(ts, TK_ANCHOR_NW);
-	    Blt_Ts_SetJustify(ts, TK_JUSTIFY_LEFT);
-	    x -= itemPtr->rightIndWidth;
-	    Blt_DrawText(comboPtr->tkwin, drawable, (char *)itemPtr->accel, &ts,
-		x, y + (h - itemPtr->rightIndHeight) / 2);
-	}
-    }
-}
-
-    
-static void
-DrawComboMenu(ComboMenu *comboPtr, Drawable drawable)
-{
-    /* Draw each visible item. */
-    if (comboPtr->firstPtr != NULL) {
-	Blt_ChainLink first, last, link;
-
-	first = comboPtr->firstPtr->link;
-	last = comboPtr->lastPtr->link;
-	for (link = first; link != NULL; link = Blt_Chain_NextLink(link)) {
-	    int x, y;
-	    Item *itemPtr;
-
-	    itemPtr = Blt_Chain_GetValue(link);
-	    x = PIXMAPX(comboPtr, itemPtr->xWorld);
-	    y = PIXMAPY(comboPtr, itemPtr->yWorld);
-	    DrawItemBackground(itemPtr, drawable, x, y);
-	    DrawItem(itemPtr, drawable, x, y);
-	    if (link == last) {
-		break;
-	    }
-	}
-    }
-    /* Manage the geometry of the scrollbars. */
-    if (comboPtr->yScrollbarWidth > 0) {
-	int x, y;
-	int yScrollbarHeight;
-
-	x = Tk_Width(comboPtr->tkwin) - comboPtr->borderWidth -
-	    comboPtr->yScrollbarWidth;
-	y = comboPtr->borderWidth;
-	yScrollbarHeight = Tk_Height(comboPtr->tkwin) - 
-	    comboPtr->xScrollbarHeight - 2 * comboPtr->borderWidth;
-	if ((Tk_Width(comboPtr->yScrollbar) != comboPtr->yScrollbarWidth) ||
-	    (Tk_Height(comboPtr->yScrollbar) != yScrollbarHeight) ||
-	    (x != Tk_X(comboPtr->yScrollbar)) || 
-	    (y != Tk_Y(comboPtr->yScrollbar))) {
-	    Tk_MoveResizeWindow(comboPtr->yScrollbar, x, y, 
-		comboPtr->yScrollbarWidth, yScrollbarHeight);
-	}
-	if (!Tk_IsMapped(comboPtr->yScrollbar)) {
-	    Tk_MapWindow(comboPtr->yScrollbar);
-	}
-    } else if ((comboPtr->yScrollbar != NULL) &&
-	       (Tk_IsMapped(comboPtr->yScrollbar))) {
-	Tk_UnmapWindow(comboPtr->yScrollbar);
-    }
-    if (comboPtr->xScrollbarHeight > 0) {
-	int x, y;
-	int xScrollbarWidth;
-
-	x = comboPtr->borderWidth;
-	y = Tk_Height(comboPtr->tkwin) - comboPtr->xScrollbarHeight - 
-	    comboPtr->borderWidth;
-	xScrollbarWidth = Tk_Width(comboPtr->tkwin) - 
-	    comboPtr->yScrollbarWidth - 2 * comboPtr->borderWidth;
-	if ((Tk_Width(comboPtr->xScrollbar) != xScrollbarWidth) ||
-	    (Tk_Height(comboPtr->xScrollbar) != comboPtr->xScrollbarHeight) ||
-	    (x != Tk_X(comboPtr->xScrollbar)) || 
-	    (y != Tk_Y(comboPtr->xScrollbar))) {
-	    Tk_MoveResizeWindow(comboPtr->xScrollbar, x, y, xScrollbarWidth,
-		comboPtr->xScrollbarHeight);
-	}
-	if (!Tk_IsMapped(comboPtr->xScrollbar)) {
-	    Tk_MapWindow(comboPtr->xScrollbar);
-	}
-    } else if ((comboPtr->xScrollbar != NULL) && 
-	       (Tk_IsMapped(comboPtr->xScrollbar))) {
-	Tk_UnmapWindow(comboPtr->xScrollbar);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayItem --
- *
- *	This procedure is invoked to display an item in the combomenu widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the item.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayItem(ClientData clientData)
-{
-    Item *itemPtr = clientData;
-    int x, y, w, h, d, sy;
-    Pixmap drawable;
-    ComboMenu *comboPtr;
-
-    /*
-     * Create a pixmap the size of the item for double buffering.
-     */
-    comboPtr = itemPtr->comboPtr;
-    h = itemPtr->height;
-    w = VPORTWIDTH(comboPtr);
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-	w, h, Tk_Depth(comboPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    DrawItemBackground(itemPtr, drawable, -comboPtr->xOffset, 0);
-    DrawItem(itemPtr, drawable, -comboPtr->xOffset, 0);
-    x = PIXMAPX(comboPtr, itemPtr->xWorld) + comboPtr->borderWidth;
-    y = PIXMAPY(comboPtr, itemPtr->yWorld) + comboPtr->borderWidth;
-    sy = 0;
-    d = comboPtr->borderWidth - y;
-    if (d > 0) {
-	h -= d;
-	sy = d;
-	y += d;
-    }
-    d = (y + h) - (Tk_Height(comboPtr->tkwin) - comboPtr->borderWidth);
-    if (d > 0) {
-	h -= d;
-    }
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin),
-	comboPtr->defStyle.labelNormalGC, 0, sy, w, h, comboPtr->borderWidth,y);
-    Tk_FreePixmap(comboPtr->display, drawable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayComboMenu --
- *
- *	This procedure is invoked to display a combomenu widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the menu.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayComboMenu(ClientData clientData)
-{
-    ComboMenu *comboPtr = clientData;
-    Pixmap drawable;
-    int w, h;				/* Window width and height. */
-    Screen *screenPtr;
-
-    comboPtr->flags &= ~REDRAW_PENDING;
-    if (comboPtr->tkwin == NULL) {
-	return;				/* Window destroyed (should not get
-					 * here) */
-    }
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayComboMenu(%s) w=%d h=%d\n", 
-	    Tk_PathName(comboPtr->tkwin), Tk_Width(comboPtr->tkwin),
-	    Tk_Height(comboPtr->tkwin));
-#endif
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeComboGeometry(comboPtr);
-    }
-    if ((Tk_Width(comboPtr->tkwin) <= 1) || (Tk_Height(comboPtr->tkwin) <= 1)){
-	/* Don't bother computing the layout until the window size is
-	 * something reasonable. */
-	return;
-    }
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	/* The menu's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the combomenu's new layout.  */
-	return;
-    }
-    if (comboPtr->flags & SCROLL_PENDING) {
-	int vw, vh;			/* Viewport width and height. */
-	/* 
-	 * The view port has changed. The visible items need to be recomputed
-	 * and the scrollbars updated.
-	 */
-	ComputeVisibleItems(comboPtr);
-	vw = VPORTWIDTH(comboPtr);
-	vh = VPORTHEIGHT(comboPtr);
-	if ((comboPtr->xScrollCmdObjPtr != NULL) &&
-	    (comboPtr->flags & SCROLLX)) {
-	    Blt_UpdateScrollbar(comboPtr->interp, comboPtr->xScrollCmdObjPtr,
-		comboPtr->xOffset, comboPtr->xOffset + vw, comboPtr->worldWidth);
-	}
-	if ((comboPtr->yScrollCmdObjPtr != NULL) && 
-	    (comboPtr->flags & SCROLLY)) {
-	    Blt_UpdateScrollbar(comboPtr->interp, comboPtr->yScrollCmdObjPtr,
-		comboPtr->yOffset, comboPtr->yOffset+vh, comboPtr->worldHeight);
-	}
-	comboPtr->flags &= ~SCROLL_PENDING;
-    }
-    /*
-     * Create a pixmap the size of the window for double buffering.
-     */
-    w = Tk_Width(comboPtr->tkwin) - 2 * comboPtr->borderWidth - 
-	comboPtr->yScrollbarWidth;
-    h = Tk_Height(comboPtr->tkwin) - 2 * comboPtr->borderWidth - 
-	comboPtr->xScrollbarHeight;
-    screenPtr = Tk_Screen(comboPtr->tkwin);
-    w = CLAMP(w, 1, WidthOfScreen(screenPtr));
-    h = CLAMP(h, 1, HeightOfScreen(screenPtr));
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-			    w, h, Tk_Depth(comboPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    if (comboPtr->activePtr == NULL) {
-	ActivateItem(comboPtr, comboPtr->firstPtr);
-    }
-    /* 
-     * Shadowed menu.  Request window size slightly bigger than menu.  Get
-     * snapshot of background from root menu.
-     */
-    /* Background */
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, 
-	comboPtr->defStyle.normalBg, 0, 0, w, h, 0, TK_RELIEF_FLAT);
-    DrawComboMenu(comboPtr, drawable);
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin),
-	comboPtr->defStyle.labelNormalGC, 0, 0, w, h, 
-	      comboPtr->borderWidth, comboPtr->borderWidth);
-    Tk_FreePixmap(comboPtr->display, drawable);
-    if ((comboPtr->xScrollbarHeight > 0) && (comboPtr->yScrollbarWidth > 0)) {
-	/* Draw the empty corner. */
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, 
-		Tk_WindowId(comboPtr->tkwin), comboPtr->defStyle.disabledBg, 
-		w + comboPtr->borderWidth, h + comboPtr->borderWidth, 
-		comboPtr->yScrollbarWidth, comboPtr->xScrollbarHeight,
-		0, TK_RELIEF_FLAT);
-    }
-    Blt_DrawBackgroundRectangle(comboPtr->tkwin, Tk_WindowId(comboPtr->tkwin), 
-	comboPtr->defStyle.normalBg, 0, 0, Tk_Width(comboPtr->tkwin), 
-	Tk_Height(comboPtr->tkwin), comboPtr->borderWidth, comboPtr->relief);
-}
diff --git a/blt3.0/src/bltComboTree.c b/blt3.0/src/bltComboTree.c
deleted file mode 100644
index 37a2145..0000000
--- a/blt3.0/src/bltComboTree.c
+++ /dev/null
@@ -1,7148 +0,0 @@
-
-/*
- * bltComboTree.c --
- *
- * This module implements a combotree widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *
- * BUGS:
- *   1.  "open" operation should change scroll offset so that as many
- *	 new entries (up to half a screen) can be seen.
- *   2.  "open" needs to adjust the scrolloffset so that the same entry
- *	 is seen at the same place.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_COMBOTREE
-#include "bltOp.h"
-#include "bltImage.h"
-#include "bltHash.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltTree.h"
-#include "bltBind.h"
-#include "bltBgStyle.h"
-
-#define PICK_ENTRY		(ClientData)0
-#define PICK_BUTTON		(ClientData)1
-
-#if HAVE_UTF
-#else
-#define Tcl_NumUtfChars(s,n)	(((n) == -1) ? strlen((s)) : (n))
-#define Tcl_UtfAtIndex(s,i)	((s) + (i))
-#endif
-
-#define ODD(x)			((x) | 0x01)
-
-#define END			(-1)
-#define SEPARATOR_LIST		((char *)NULL)
-#define SEPARATOR_NONE		((char *)-1)
-
-#define SEARCH_Y		1
-
-#define ARROW_WIDTH 17
-#define ARROW_HEIGHT 17
-
-typedef const char *UID;
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-#define CHOOSE(default, override)	\
-	(((override) == NULL) ? (default) : (override))
-
-#define GETLABEL(e)		\
-	(((e)->labelUid != NULL) ? (e)->labelUid : Blt_Tree_NodeLabel((e)->node))
-
-/*
- * The macro below is used to modify a "char" value (e.g. by casting it to an
- * unsigned character) so that it can be used safely with macros such as
- * isspace.
- */
-#define UCHAR(c)	((unsigned char) (c))
-
-#define SCREENX(c, wx)	((wx) - (c)->xOffset + (c)->borderWidth)
-#define SCREENY(c, wy)	((wy) - (c)->yOffset + (c)->borderWidth)
-
-#define PIXMAPX(c, wx)	((wx) - (c)->xOffset)
-#define PIXMAPY(c, wy)	((wy) - (c)->yOffset)
-
-#define WORLDX(c, sx)	((sx) - (c)->borderWidth + (c)->xOffset)
-#define WORLDY(c, sy)	((sy) - (c)->borderWidth + (c)->yOffset)
-
-#define VPORTWIDTH(c)	\
-    (Tk_Width((c)->tkwin) - 2 * (c)->borderWidth - (c)->yScrollbarWidth)
-#define VPORTHEIGHT(c) \
-    (Tk_Height((c)->tkwin) - 2 * (c)->borderWidth - (c)->xScrollbarHeight)
-
-#define ICONWIDTH(d)	(comboPtr->levelInfo[(d)].iconWidth)
-#define LEVELX(d)	(comboPtr->levelInfo[(d)].x)
-#define DEPTH(h, n)	Blt_Tree_NodeDepth(n)
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Internal combotree widget flags:
- *
- *	LAYOUT_PENDING	The layout of the hierarchy needs to be recomputed.
- *
- *	REDRAW_PENDING	A redraw request is pending for the widget.
- *
- *	XSCROLL		X-scroll request is pending.
- *
- *	SCROLLY		Y-scroll request is pending.
- *
- *	SCROLL_PENDING	Both X-scroll and  Y-scroll requests are pending.
- *
- *	FOCUS		The widget is receiving keyboard events.
- *			Draw the focus highlight border around the widget.
- *
- *	DIRTY		The hierarchy has changed. It may invalidate
- *			the locations and pointers to entries.  The widget 
- *			will need to recompute its layout.
- *
- *	VIEWPORT	Indicates that the viewport has changed in some
- *			way: the size of the viewport, the location of 
- *			the viewport, or the contents of the viewport.
- *
- */
-
-#define LAYOUT_PENDING	(1<<0)
-#define REDRAW_PENDING	(1<<1)
-#define UPDATE_PENDING  (1<<2)
-#define SCROLLX		(1<<3)
-#define SCROLLY		(1<<4)
-#define SCROLL_PENDING	(SCROLLX | SCROLLY)
-#define FOCUS		(1<<5)
-#define DIRTY		(1<<6)
-#define VIEWPORT	(1<<7)
-#define REPOPULATE	(1<<8)
-#define INSTALL_SCROLLBAR_X	(1<<9)
-#define INSTALL_SCROLLBAR_Y	(1<<10)
-
-/*
- *  Miscellaneous flags:
- *
- *	HIDE_ROOT		Don't display the root entry.
- *
- *	HIDE_LEAVES		Don't display entries that are leaves.
- *
- *	NEW_TAGS		
- */
-#define HIDE_ROOT		(1<<23) 
-#define HIDE_LEAVES		(1<<24) 
-#define NEW_TAGS		(1<<27)
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Internal entry flags:
- *
- *	ENTRY_BUTTON		Indicates that a button is needed
- *				for this entry.
- *
- *	ENTRY_CLOSED		Indicates that the entry is closed and
- *				its subentries are not displayed.
- *
- *	ENTRY_HIDE		Indicates that the entry is hidden (i.e.
- *				can not be viewed by opening or scrolling).
- *
- *	ENTRY_BTN_AUTO
- *	ENTRY_BTN_SHOW
- *	ENTRY_BTN_MASK
- *
- *---------------------------------------------------------------------------
- */
-#define ENTRY_CLOSED		(1<<0)
-#define ENTRY_HIDE		(1<<1)
-#define ENTRY_MASK		(ENTRY_CLOSED | ENTRY_HIDE)
-#define ENTRY_NOT_LEAF		(1<<2)
-
-#define ENTRY_BUTTON		(1<<3)
-#define ENTRY_ICON		(1<<4)
-#define ENTRY_REDRAW		(1<<5)
-#define ENTRY_LAYOUT_PENDING	(1<<6)
-#define ENTRY_DATA_CHANGED	(1<<7)
-#define ENTRY_DIRTY		(ENTRY_DATA_CHANGED | ENTRY_LAYOUT_PENDING)
-
-#define ENTRY_BTN_AUTO		(1<<8)
-#define ENTRY_BTN_SHOW		(1<<9)
-#define ENTRY_BTN_MASK		(ENTRY_BTN_AUTO | ENTRY_BTN_SHOW)
-
-#define ENTRY_EDITABLE		(1<<10)
-
-#define COLUMN_RULE_PICKED	(1<<1)
-#define COLUMN_DIRTY		(1<<2)
-
-#define STYLE_TEXTBOX		(0)
-#define STYLE_COMBOBOX		(1)
-#define STYLE_CHECKBOX		(2)
-#define STYLE_TYPE		0x3
-
-#define STYLE_LAYOUT		(1<<3)
-#define STYLE_DIRTY		(1<<4)
-#define STYLE_HIGHLIGHT		(1<<5)
-#define STYLE_USER		(1<<6)
-
-#define STYLE_EDITABLE		(1<<10)
-
-typedef struct _Entry Entry;
-typedef struct _ComboTree ComboTree;
-typedef struct _Style Style;
-
-typedef int (CompareProc)(Tcl_Interp *interp, const char *name, 
-	const char *pattern);
-
-typedef Entry *(IterProc)(Entry *entryPtr, unsigned int mask);
-
-/*
- * Icon --
- *
- *	Since instances of the same Tk image can be displayed in
- *	different windows with possibly different color palettes, Tk
- *	internally stores each instance in a linked list.  But if
- *	the instances are used in the same widget and therefore use
- *	the same color palette, this adds a lot of overhead,
- *	especially when deleting instances from the linked list.
- *
- *	For the combotree widget, we never need more than a single
- *	instance of an image, regardless of how many times it's used.
- *	Cache the image, maintaining a reference count for each
- *	image used in the widget.  It's likely that the combotree
- *	widget will use many instances of the same image (for example
- *	the open/close icons).
- */
-
-typedef struct _Icon {
-    Tk_Image tkImage;		/* The Tk image being cached. */
-
-    int refCount;		/* Reference count for this image. */
-
-    short int width, height;	/* Dimensions of the cached image. */
-
-    Blt_HashEntry *hashPtr;	/* Hash table pointer to the image. */
-
-} *Icon;
-
-#define IconHeight(icon)	((icon)->height)
-#define IconWidth(icon)		((icon)->width)
-#define IconImage(icon)		((icon)->tkImage)
-#define IconName(icon)		(Blt_Image_Name((icon)->tkImage))
-
-struct _Style {
-    const char *name;			/* Instance name. */
-    Blt_HashEntry *hPtr;
-    ComboTree *comboPtr;
-    int refCount;			/* Indicates if the style is currently
-					 * in use in the combotree. */
-
-    unsigned int flags;			/* Bit field containing both the style
-					 * type and various flags. */
-
-    /* General style fields. */
-
-    int borderWidth;			/* Width of 3D border. */
-    int activeRelief;
-    int relief;
-
-    int gap;				/* # pixels gap between icon and
-					 * text. */
-    Blt_Font labelFont;
-    XColor *labelNormalColor;		/* Normal foreground color of cell. */
-    XColor *labelActiveColor;		/* Foreground color of cell when
-					 * active. */
-
-    Blt_Background normalBg;		/* Normal background color. */
-    Blt_Background altBg;		/* Alternate normal background
-					 * color. */
-    Blt_Background activeBg;		/* Active entry background color. */
-    Blt_Background disabledBg;		/* Disabled entry background color. */
-
-    GC labelNormalGC;
-    GC labelActiveGC;
-    GC labelDisabledGC;
-
-    Icon *icons;			/* Tk images displayed for the entry.
-					 * The first image is the icon
-					 * displayed to the left of the
-					 * entry's label. The second is icon
-					 * displayed when entry is "open". */
-};
-
-/*
- * Entry --
- *
- *	Contains data-specific information how to represent the data
- *	of a node of the hierarchy.
- *
- */
-struct _Entry {
-    Blt_TreeNode node;		/* Node containing entry */
-    int worldX, worldY;		/* X-Y position in world coordinates where the
-				 * entry is positioned. */
-
-    Blt_HashEntry *hPtr;
-
-    short int width, height;	/* Dimensions of the entry. This includes the
-				 * size of its columns. */
-
-    int reqHeight;		/* Requested height of the entry.  Overrides
-				 * computed height. */
-
-    int vertLineLength;		/* Length of the vertical line segment. */
-
-    short int lineHeight;	/* Height of first line of text. */
-
-    unsigned short int flags;	/* Flags for this entry. For the definitions
-				 * of the various bit fields see below. */
-
-    Tcl_Obj *tagsObjPtr;	/* List of binding tags for this entry. */
-    ComboTree *comboPtr;
-
-    Tcl_Obj *cmdObjPtr;		/* List of binding tags for this entry. */
-
-    UID openCmd, closeCmd;	/* TCL commands to invoke when entries are
-				 * opened or closed. They override those
-				 * specified globally. */
-    /*
-     * Button information:
-     */
-    short int buttonX, buttonY; /* X-Y coordinate offsets from to upper left
-				 * corner of the entry to the upper-left
-				 * corner of the button.  Used to pick the
-				 * button quickly */
-
-    short int iconWidth, iconHeight; 
-				/* Maximum dimensions for icons and buttons
-				 * for this entry. This is used to align the
-				 * button, icon, and text. */
-    /*
-     * Label information:
-     */
-    TextLayout *textPtr;
-
-    short int labelWidth, labelHeight;
-
-    UID labelUid;		/* Text displayed right of the icon. */
-
-    int seqNum;			/* Used to navigate to next/last entry when
-				 * the view is flat. */
-
-    Style *stylePtr;		/* Default style for entry. */
-};
-
-/*
- * Button --
- *
- *	A button is the open/close indicator at the far left of the entry.  It
- *	is displayed as a plus or minus in a solid colored box with optionally
- *	an border. It has both "active" and "normal" colors.
- */
-typedef struct {
-    XColor *fgColor;		/* Foreground color. */
-    XColor *activeFgColor;	/* Active foreground color. */
-
-    Blt_Background normalBg;	/* Normal button background. */
-    Blt_Background activeBg;	/* Active background color. */
-
-    GC normalGC;
-    GC activeGC;
-
-    int reqSize;
-
-    int borderWidth;
-
-    int openRelief, closeRelief;
-
-    int width, height;
-
-    Icon *icons;
-
-} Button;
-
-/*
- * LevelInfo --
- *
- */
-typedef struct {
-    int x;
-    int iconWidth;
-    int labelWidth;
-} LevelInfo;
-
-/*
- * ComboTree --
- *
- *	A ComboTree is a widget that displays an hierarchical table of one or
- *	more entries.
- *
- *	Entries are positioned in "world" coordinates, referring to the
- *	virtual combotree.  Coordinate 0,0 is the upper-left corner of the root
- *	entry and the bottom is the end of the last entry.  The widget's Tk
- *	window acts as view port into this virtual space. The combotree's
- *	xOffset and yOffset fields specify the location of the view port in
- *	the virtual world.  Scrolling the viewport is therefore simply
- *	changing the xOffset and/or yOffset fields and redrawing.
- *
- *	Note that world coordinates are integers, not signed short integers
- *	like X11 screen coordinates.  It's very easy to create a hierarchy
- *	taller than 0x7FFF pixels.
- */
-struct _ComboTree {
-
-    /*
-     * This works around a bug in the Tk API.  Under under Win32, Tk tries to
-     * read the widget record of toplevel windows (TopLevel or Frame widget),
-     * to get its menu name field.  What this means is that we must carefully
-     * arrange the fields of this widget so that the menuName field is at the
-     * same offset in the structure.
-     */
-
-    Tk_Window tkwin;		/* Window that embodies the frame.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up. */
-
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-
-    Tcl_Interp *interp;		/* Interpreter associated with widget.  Used
-				 * to delete widget command. */
-
-    Tcl_Command cmdToken;	/* Token for widget's command. */
-
-    Tcl_Obj *postCmdObjPtr;	/* If non-NULL, command to be executed when
-				 * this menu is posted. */
-
-    unsigned int flags;		/* For bitfield definitions, see below */
-
-    Tcl_Obj *iconVarObjPtr;	/* Name of TCL variable.  If non-NULL, this
-				 * variable will be set to the name of the Tk
-				 * image representing the icon of the selected
-				 * item.  */
-
-    Tcl_Obj *textVarObjPtr;	/* Name of TCL variable.  If non-NULL, this
-				 * variable will be set to the text string of
-				 * the label of the selected item. */
-
-    Tcl_Obj *takeFocusObjPtr;	/* Value of -takefocus option; not used in the
-				 * C code, but used by keyboard traversal
-				 * scripts. */
-
-    const char *menuName;	/* Textual description of menu to use for
-				 * menubar. Malloc-ed, may be NULL. */
-
-    Tk_Cursor cursor;		/* Current cursor for window or None. */
-
- /*------*/
-
-    Blt_Tree tree;		/* Handle representing the tree. */
-    const char *treeName;
-
-    Blt_HashEntry *hPtr;
-
-    /* ComboTree_ specific fields. */ 
-
-    Blt_HashTable entryTable;	/* Table of entry information, keyed by the
-				 * node pointer. */
-
-    int inset;			/* Total width of all borders, including
-				 * traversal highlight and 3-D border.
-				 * Indicates how much interior stuff must be
-				 * offset from outside edges to leave room for
-				 * borders. */
-
-    Style defStyle;
-
-    int borderWidth;		/* Width of 3D border. */
-
-    int relief;			/* 3D border relief. */
-
-    /*
-     * Entries are connected by horizontal and vertical lines. They may be
-     * drawn dashed or solid.
-     */
-    int lineWidth;		/* Width of lines connecting entries */
-
-    int dashes;			/* Dash on-off value. */
-
-    XColor *lineColor;		/* Color of connecting lines. */
-
-    /*
-     * Button Information:
-     *
-     * The button is the open/close indicator at the far left of the entry.
-     * It is usually displayed as a plus or minus in a solid colored box with
-     * optionally an border. It has both "active" and "normal" colors.
-     */
-    Button button;
-
-    int leader;			/* Number of pixels padding between
-				 * entries. */
-
-    int reqWidth, reqHeight;	/* Requested dimensions of the combotree
-				 * widget's window. */
-
-    GC lineGC;			/* GC for drawing dotted line between
-				 * entries. */
-
-    Entry *activePtr;		/* Last active entry. */ 
-
-    Entry *activeBtnPtr;	/* Pointer to last active button */
-
-    Entry *fromPtr;
-
-    /* Names of scrollbars to embed into the widget window. */
-    Tcl_Obj *xScrollbarObjPtr, *yScrollbarObjPtr;
-
-    /* Command strings to control horizontal and vertical scrollbars. */
-    Tcl_Obj *xScrollCmdObjPtr, *yScrollCmdObjPtr;
-
-    int xScrollUnits, yScrollUnits; /* # of pixels per scroll unit. */
-
-    /*
-     * Total size of all "open" entries. This represents the range of world
-     * coordinates.
-     */
-    int worldWidth, worldHeight;
-
-    int xOffset, yOffset;	/* Translation between view port and world
-				 * origin. */
-
-    LevelInfo *levelInfo;
-
-    /* Scanning information: */
-    int scanAnchorX, scanAnchorY; /* Scan anchor in screen coordinates. */
-
-    int scanX, scanY;		/* X-Y world coordinate where the scan
-				 * started. */
-
-
-    Blt_HashTable iconTable;	/* Table of Tk images */
-
-    Blt_HashTable uidTable;	/* Table of strings. */
-
-    Blt_HashTable styleTable;	/* Table of cell styles. */
-
-    Entry *rootPtr;		/* Root entry of tree. */
-
-    Entry **visibleEntries;	/* Array of visible entries */
-
-    int nVisible;		/* Number of entries in the above array */
-
-    int nEntries;		/* Number of entries in tree. */
-
-    int buttonFlags;		/* Global button indicator for all entries.
-				 * This may be overridden by the entry's
-				 * -button option. */
-
-    const char *openCmd;
-    const char *closeCmd;	/* TCL commands to invoke when entries are
-				 * opened or closed. */
-
-    const char *pathSep;		/* Pathname separators */
-
-    ClientData clientData;
-
-    Blt_BindTable bindTable;	/* Binding information for entries. */
-
-    Blt_HashTable entryBindTagTable;
-    Blt_HashTable buttonBindTagTable;
-
-    size_t depth;
-
-    int flatView;		/* Indicates if the view of the tree has been
-				 * flattened. */
-    Blt_Pool entryPool;
-
-    Tk_Window xScrollbar;	/* Horizontal scrollbar to be used if
-				 * necessary. If NULL, no x-scrollbar is
-				 * used. */
-    Tk_Window yScrollbar;	/* Vertical scrollbar to be used if
-				 * necessary. If NULL, no y-scrollbar is
-				 * used. */
-
-    short int yScrollbarWidth, xScrollbarHeight;
-
-    short int maxWidth;		/* Width of the widest entry. */
-    short int minHeight;	/* Minimum entry height. Used to to compute
-				 * what the y-scroll unit should be. */
-};
-
-/*
- * EntryIterator --
- *
- *	Entries may be tagged with strings.  An entry may have many tags.  The
- *	same tag may be used for many entries.
- *	
- */
-
-typedef enum { 
-    ITER_INDEX, ITER_ALL, ITER_TAG, 
-} IteratorType;
-
-typedef struct _Iterator {
-    ComboTree *comboPtr;	/* ComboTree that we're iterating over. */
-
-    IteratorType type;		/* Type of iteration:
-				 * ITER_TAG		By entry tag.
-				 * ITER_ALL		By every entry.
-				 * ITER_INDEX		Single entry: either 
-				 *			tag or index.
-				 */
-
-    Entry *first;		/* Starting point of search, saved if iterator
-				 * is reused.  Used for ITER_ALL and
-				 * ITER_INDEX searches. */
-    Entry *next;		/* Next entry. */
-
-				/* For tag-based searches. */
-    const char *tagName;	/* If non-NULL, is the tag that we are
-				 * currently iterating over. */
-
-    Blt_HashTable *tablePtr;	/* Pointer to tag hash table. */
-    Blt_HashSearch cursor;	/* Search iterator for tag hash table. */
-
-} EntryIterator;
-
-
-#define BUTTON_IPAD		1
-#define BUTTON_PAD		2
-#define BUTTON_SIZE		7
-#define COLUMN_PAD		2
-#define FOCUS_WIDTH		1
-#define ICON_HEIGHT		16
-#define ICON_PADX		2
-#define ICON_PADY		1
-#define ICON_WIDTH		16
-#define INSET_PAD		0
-#define LABEL_PADX		3
-#define LABEL_PADY		0
-
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-
-typedef ClientData (TagProc)(ComboTree *comboPtr, const char *string);
-typedef int (ApplyProc) (ComboTree *comboPtr, Entry *entryPtr);
-
-
-#define DEF_BTN_ACTIVE_BG		RGB_WHITE
-#define DEF_BTN_ACTIVE_FG		STD_ACTIVE_FOREGROUND
-#define DEF_BTN_BORDERWIDTH		"1"
-#define DEF_BTN_CLOSE_RELIEF		"solid"
-#define DEF_BTN_NORMAL_BG		RGB_WHITE
-#define DEF_BTN_NORMAL_FG		STD_NORMAL_FOREGROUND
-#define DEF_BTN_OPEN_RELIEF		"solid"
-#define DEF_BTN_SIZE			"7"
-
-#define DEF_COMBO_ACTIVE_STIPPLE	"gray25"
-#define DEF_COMBO_BORDERWIDTH		"1"
-#define DEF_COMBO_BUTTON		"auto"
-#define DEF_COMBO_DASHES		"dot"
-#define DEF_COMBO_HEIGHT		"400"
-#define DEF_COMBO_HIDE_LEAVES		"no"
-#define DEF_COMBO_HIDE_ROOT		"yes"
-#define DEF_COMBO_ICON_VARIABLE		((char *)NULL)
-#define DEF_COMBO_LINESPACING		"0"
-#define DEF_COMBO_LINEWIDTH		"1"
-#define DEF_COMBO_MAKE_PATH		"no"
-#define DEF_COMBO_NEWTAGS		"no"
-#define DEF_COMBO_RELIEF		"solid"
-#define DEF_COMBO_SCROLLBAR		((char *)NULL)
-#define DEF_COMBO_SCROLLINCREMENT	"20"
-#define DEF_COMBO_SHOW_ROOT		"yes"
-#define DEF_COMBO_TAKE_FOCUS		"1"
-#define DEF_COMBO_TEXT_VARIABLE		((char *)NULL)
-#define DEF_COMBO_LINECOLOR		RGB_GREY50
-#define DEF_COMBO_WIDTH			"0"
-#ifdef WIN32
-#define DEF_COMBO_SEPARATOR		"\\"
-#else
-#define DEF_COMBO_SEPARATOR		"/"
-#endif
-
-#define DEF_ENTRY_STYLE			"default"
-#define DEF_STYLE_ACTIVE_BG		RGB_SKYBLUE4
-#define DEF_STYLE_ACTIVE_FG		RGB_WHITE
-#define DEF_STYLE_ACTIVE_RELIEF		"flat"
-#define DEF_STYLE_ALT_BG		((char *)NULL)
-#define DEF_STYLE_BG			"white"
-#define DEF_STYLE_BORDERWIDTH		STD_BORDERWIDTH
-#define DEF_STYLE_FG			STD_NORMAL_FOREGROUND
-#define DEF_STYLE_FONT			"Courier 12"
-#define DEF_STYLE_ICONS			"::blt::ComboTree::openIcon ::blt::ComboTree::closeIcon"
-#define DEF_STYLE_NORMAL_BG		STD_NORMAL_BACKGROUND
-#define DEF_STYLE_RELIEF		"flat"
-
-static Blt_TreeApplyProc CreateApplyProc;
-
-static Blt_OptionParseProc ObjToIconsProc;
-static Blt_OptionPrintProc IconsToObjProc;
-static Blt_OptionFreeProc FreeIconsProc;
-static Blt_CustomOption iconsOption = {
-    ObjToIconsProc, IconsToObjProc, FreeIconsProc, NULL,
-};
-
-static Blt_OptionParseProc ObjToButtonProc;
-static Blt_OptionPrintProc ButtonToObjProc;
-static Blt_CustomOption buttonOption = {
-    ObjToButtonProc, ButtonToObjProc, NULL, NULL,
-};
-
-static Blt_OptionParseProc ObjToUidProc;
-static Blt_OptionPrintProc UidToObjProc;
-static Blt_OptionFreeProc FreeUidProc;
-static Blt_CustomOption uidOption = {
-    ObjToUidProc, UidToObjProc, FreeUidProc, NULL,
-};
-
-static Blt_OptionParseProc ObjToLabelProc;
-static Blt_OptionPrintProc LabelToObjProc;
-static Blt_OptionFreeProc FreeLabelProc;
-static Blt_CustomOption labelOption =
-{
-    ObjToLabelProc, LabelToObjProc, FreeLabelProc, NULL,
-};
-
-static Blt_OptionParseProc ObjToStyleProc;
-static Blt_OptionPrintProc StyleToObjProc;
-static Blt_OptionFreeProc FreeStyleProc;
-static Blt_CustomOption styleOption = {
-    ObjToStyleProc, StyleToObjProc, FreeStyleProc, NULL,
-};
-
-static Blt_ConfigSpec buttonSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"Background", DEF_BTN_ACTIVE_BG, 
-	Blt_Offset(ComboTree, button.activeBg), 0},
-    {BLT_CONFIG_SYNONYM, "-activebg", "activeBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-activefg", "activeForeground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", "Foreground",
-	DEF_BTN_ACTIVE_FG, 
-	Blt_Offset(ComboTree, button.activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BTN_NORMAL_BG, Blt_Offset(ComboTree, button.normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 
-	0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BTN_BORDERWIDTH, Blt_Offset(ComboTree, button.borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-closerelief", "closeRelief", "Relief",
-	DEF_BTN_CLOSE_RELIEF, Blt_Offset(ComboTree, button.closeRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_BTN_NORMAL_FG, Blt_Offset(ComboTree, button.fgColor), 0},
-    {BLT_CONFIG_CUSTOM, "-images", "images", "Icons", (char *)NULL, 
-	Blt_Offset(ComboTree, button.icons), BLT_CONFIG_NULL_OK, 
-	&iconsOption},
-    {BLT_CONFIG_RELIEF, "-openrelief", "openRelief", "Relief",
-	DEF_BTN_OPEN_RELIEF, Blt_Offset(ComboTree, button.openRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-size", "size", "Size", DEF_BTN_SIZE, 
-	Blt_Offset(ComboTree, button.reqSize), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static Blt_ConfigSpec entrySpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-bindtags", (char *)NULL, (char *)NULL, (char *)NULL, 
-	Blt_Offset(Entry, tagsObjPtr), BLT_CONFIG_NULL_OK, &uidOption},
-    {BLT_CONFIG_CUSTOM, "-button", (char *)NULL, (char *)NULL, DEF_COMBO_BUTTON,
-	Blt_Offset(Entry, flags), BLT_CONFIG_DONT_SET_DEFAULT, &buttonOption},
-    {BLT_CONFIG_CUSTOM, "-closecommand", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Entry, closeCmd), BLT_CONFIG_NULL_OK, 
-	&uidOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", (char *)NULL, (char *)NULL, 
-	(char *)NULL, Blt_Offset(Entry, reqHeight), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-label", (char *)NULL, (char *)NULL, (char *)NULL, 
-	Blt_Offset(Entry, labelUid), 0, &labelOption},
-    {BLT_CONFIG_CUSTOM, "-opencommand", (char *)NULL, (char *)NULL, 
-	(char *)NULL, Blt_Offset(Entry, openCmd), BLT_CONFIG_NULL_OK, 
-	&uidOption},
-    {BLT_CONFIG_CUSTOM, "-style", (char *)NULL, (char *)NULL, DEF_ENTRY_STYLE, 
-	Blt_Offset(Entry, stylePtr), 0, &styleOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Blt_ConfigSpec styleSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", (char *)NULL, (char *)NULL,
-	DEF_STYLE_ACTIVE_BG, Blt_Offset(Style, activeBg), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", (char *)NULL, (char *)NULL,
-	DEF_STYLE_ACTIVE_FG, Blt_Offset(Style, labelActiveColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
-	DEF_STYLE_ACTIVE_RELIEF, Blt_Offset(Style, activeRelief), 0},
-    {BLT_CONFIG_BACKGROUND, "-alternatebackground", "alternateBackground", 
-	"Background", DEF_STYLE_ALT_BG, Blt_Offset(Style, altBg), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_STYLE_BG, Blt_Offset(Style, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_STYLE_BORDERWIDTH, Blt_Offset(Style, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_STYLE_FONT, 
-	Blt_Offset(Style, labelFont), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_STYLE_FG,
-	 Blt_Offset(Style, labelNormalColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_CUSTOM, "-icons", (char *)NULL, (char *)NULL, DEF_STYLE_ICONS,
-	Blt_Offset(Style, icons), BLT_CONFIG_NULL_OK, &iconsOption},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_STYLE_RELIEF, 
-	Blt_Offset(Style, relief), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static Blt_ConfigSpec comboSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-       "ActiveBackground", DEF_STYLE_ACTIVE_BG, 
-	Blt_Offset(ComboTree, defStyle.activeBg), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_STYLE_ACTIVE_FG, 
-        Blt_Offset(ComboTree, defStyle.labelActiveColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-alternatebackground", "alternateBackground", 
-	"Background", DEF_STYLE_ALT_BG, Blt_Offset(ComboTree, defStyle.altBg), 
-	 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_STYLE_BG, Blt_Offset(ComboTree, defStyle.normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_COMBO_BORDERWIDTH, Blt_Offset(ComboTree, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-button", "button", "Button",
-	DEF_COMBO_BUTTON, Blt_Offset(ComboTree, buttonFlags),
-	BLT_CONFIG_DONT_SET_DEFAULT, &buttonOption},
-    {BLT_CONFIG_STRING, "-closecommand", "closeCommand", "CloseCommand",
-	(char *)NULL, Blt_Offset(ComboTree, closeCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	(char *)NULL, Blt_Offset(ComboTree, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", 	DEF_COMBO_DASHES, 
-	Blt_Offset(ComboTree, dashes), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_STYLE_FONT, 
-	Blt_Offset(ComboTree, defStyle.labelFont), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_STYLE_FG, Blt_Offset(ComboTree, defStyle.labelNormalColor), 
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_PIXELS, "-height", "height", "Height", DEF_COMBO_HEIGHT, 
-	Blt_Offset(ComboTree, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hideleaves", "hideLeaves", "HideLeaves",
-	DEF_COMBO_HIDE_LEAVES, Blt_Offset(ComboTree, flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)HIDE_LEAVES},
-    {BLT_CONFIG_BITMASK, "-hideroot", "hideRoot", "HideRoot",
-	DEF_COMBO_HIDE_ROOT, Blt_Offset(ComboTree, flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)HIDE_ROOT},
-    {BLT_CONFIG_OBJ, "-iconvariable", "iconVariable", "IconVariable", 
-	DEF_COMBO_ICON_VARIABLE, Blt_Offset(ComboTree, iconVarObjPtr), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-icons", "icons", "Icons", DEF_STYLE_ICONS, 
-	Blt_Offset(ComboTree, defStyle.icons), BLT_CONFIG_NULL_OK, 
-	&iconsOption},
-    {BLT_CONFIG_COLOR, "-linecolor", "lineColor", "LineColor",
-	DEF_COMBO_LINECOLOR, Blt_Offset(ComboTree, lineColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_PIXELS_NNEG, "-linespacing", "lineSpacing", "LineSpacing",
-	DEF_COMBO_LINESPACING, Blt_Offset(ComboTree, leader),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", 
-	DEF_COMBO_LINEWIDTH, Blt_Offset(ComboTree, lineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-newtags", "newTags", "NewTags", DEF_COMBO_NEWTAGS, 
-	Blt_Offset(ComboTree, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)NEW_TAGS},
-    {BLT_CONFIG_STRING, "-opencommand", "openCommand", "OpenCommand",
-	(char *)NULL, Blt_Offset(ComboTree, openCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_COMBO_RELIEF, Blt_Offset(ComboTree, relief), 0},
-    {BLT_CONFIG_STRING, "-separator", "separator", "Separator", 
-	DEF_COMBO_SEPARATOR, Blt_Offset(ComboTree, pathSep), 
-	BLT_CONFIG_NULL_OK, 0},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus", 
-	DEF_COMBO_TAKE_FOCUS, Blt_Offset(ComboTree, takeFocusObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-textvariable", "textVariable", "TextVariable", 
-	DEF_COMBO_TEXT_VARIABLE, Blt_Offset(ComboTree, textVarObjPtr), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-tree", "tree", "Tree", (char *)NULL, 
-	Blt_Offset(ComboTree, treeName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_COMBO_WIDTH, 
-	Blt_Offset(ComboTree, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-xscrollbar", "xScrollbar", "Scrollbar", 
-	DEF_COMBO_SCROLLBAR, Blt_Offset(ComboTree, xScrollbarObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(ComboTree, xScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-xscrollincrement", "xScrollIncrement", 
-	"ScrollIncrement", DEF_COMBO_SCROLLINCREMENT, 
-	Blt_Offset(ComboTree, xScrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-yscrollbar", "yScrollbar", "Scrollbar", 
-	DEF_COMBO_SCROLLBAR, Blt_Offset(ComboTree, yScrollbarObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(ComboTree, yScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-yscrollincrement", "yScrollIncrement", 
-	"ScrollIncrement", DEF_COMBO_SCROLLINCREMENT, 
-	Blt_Offset(ComboTree, yScrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/* Forward Declarations */
-static Tcl_IdleProc ConfigureScrollbarsProc;
-static Blt_BindPickProc PickEntry;
-static Blt_BindTagProc GetTags;
-static Blt_TreeNotifyEventProc TreeEventProc;
-static Tcl_CmdDeleteProc ComboTreeInstCmdDeleteProc;
-static Tcl_FreeProc DestroyComboTree;
-static Tcl_FreeProc DestroyEntry;
-static Tcl_IdleProc DisplayComboTree;
-static Tcl_IdleProc DisplayEntry;
-static Tcl_ObjCmdProc ComboTreeInstCmdProc;
-static Tcl_ObjCmdProc ComboTreeObjCmdProc;
-static Tk_EventProc ComboTreeEventProc;
-static Tk_EventProc ScrollbarEventProc;
-static Tk_ImageChangedProc IconChangedProc;
-
-static Tk_GeomRequestProc ScrollbarGeometryProc;
-static Tk_GeomLostSlaveProc ScrollbarCustodyProc;
-static Tk_GeomMgr comboMgrInfo = {
-    (char *)"combomenu",	/* Name of geometry manager used by winfo */
-    ScrollbarGeometryProc,	/* Procedure to for new geometry requests */
-    ScrollbarCustodyProc,	/* Procedure when scrollbar is taken away */
-};
-
-static int ComputeVisibleEntries(ComboTree *comboPtr);
-
-typedef int (ComboTreeCmdProc)(ComboTree *comboPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(ComboTree *comboPtr)
-{
-    if ((comboPtr->tkwin != NULL) && ((comboPtr->flags & REDRAW_PENDING)==0)) {
-	comboPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayComboTree, comboPtr);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedrawEntry --
- *
- *	Tells the Tk dispatcher to call the combomenu display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedrawEntry(Entry *entryPtr) 
-{
-    ComboTree *comboPtr;
-
-    comboPtr = entryPtr->comboPtr;
-    if ((comboPtr->tkwin != NULL) && ((comboPtr->flags & REDRAW_PENDING)==0) &&
-	((entryPtr->flags & ENTRY_REDRAW) == 0)) {
-	Tcl_DoWhenIdle(DisplayEntry, entryPtr);
-	entryPtr->flags |= ENTRY_REDRAW;
-    }
-}
-
-static void
-ConfigureScrollbarsProc(ClientData clientData)
-{
-    ComboTree *comboPtr = clientData;
-    Tcl_Interp *interp;
-
-    interp = comboPtr->interp;
-    /* 
-     * Execute the initialization procedure on this widget.
-     */
-    comboPtr->flags &= ~UPDATE_PENDING;
-    if (Tcl_VarEval(interp, "::blt::ComboTree::ConfigureScrollbars ", 
-	Tk_PathName(comboPtr->tkwin), (char *)NULL) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-}
-
-static void
-UnmanageScrollbar(ComboTree *comboPtr, Tk_Window tkwin)
-{
-    if (tkwin != NULL) {
-	Tk_DeleteEventHandler(tkwin, StructureNotifyMask,
-	      ScrollbarEventProc, comboPtr);
-	Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL, comboPtr);
-	if (Tk_IsMapped(tkwin)) {
-	    Tk_UnmapWindow(tkwin);
-	}
-    }
-}
-
-static void
-ManageScrollbar(ComboTree *comboPtr, Tk_Window tkwin)
-{
-    if (tkwin != NULL) {
-	Tk_CreateEventHandler(tkwin, StructureNotifyMask, ScrollbarEventProc, 
-		comboPtr);
-	Tk_ManageGeometry(tkwin, &comboMgrInfo, comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InstallScrollbar --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-InstallScrollbar(
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    ComboTree *comboPtr,
-    Tcl_Obj *objPtr,		/* String representing scrollbar window. */
-    Tk_Window *tkwinPtr)
-{
-    Tk_Window tkwin;
-
-    if (objPtr == NULL) {
-	*tkwinPtr = NULL;
-	return;
-    }
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objPtr), comboPtr->tkwin);
-    if (tkwin == NULL) {
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    if (Tk_Parent(tkwin) != comboPtr->tkwin) {
-	Tcl_AppendResult(interp, "scrollbar \"", Tk_PathName(tkwin), 
-			 "\" must be a child of combomenu.", (char *)NULL);
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    ManageScrollbar(comboPtr, tkwin);
-    *tkwinPtr = tkwin;
-    return;
-}
-
-static void
-InstallXScrollbar(ClientData clientData)
-{
-    ComboTree *comboPtr = clientData;
-
-    comboPtr->flags &= ~INSTALL_SCROLLBAR_X;
-    InstallScrollbar(comboPtr->interp, comboPtr, comboPtr->xScrollbarObjPtr,
-		     &comboPtr->xScrollbar);
-}
-
-static void
-InstallYScrollbar(ClientData clientData)
-{
-    ComboTree *comboPtr = clientData;
-
-    comboPtr->flags &= ~INSTALL_SCROLLBAR_Y;
-    InstallScrollbar(comboPtr->interp, comboPtr, comboPtr->yScrollbarObjPtr,
-		     &comboPtr->yScrollbar);
-}
-
-static Entry *
-NodeToEntry(ComboTree *comboPtr, Blt_TreeNode node)
-{
-    Blt_HashEntry *hPtr;
-
-    if (node == NULL) {
-	return NULL;
-    }
-    hPtr = Blt_FindHashEntry(&comboPtr->entryTable, (char *)node);
-    if (hPtr == NULL) {
-	fprintf(stderr, "NodeToEntry: can't find node %s\n", 
-		Blt_Tree_NodeLabel(node));
-	abort();
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-static Entry *
-ParentEntry(Entry *entryPtr)
-{
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-    Blt_TreeNode node;
-
-    if (entryPtr->node == Blt_Tree_RootNode(comboPtr->tree)) {
-	return NULL;
-    }
-    node = Blt_Tree_ParentNode(entryPtr->node);
-    if (node == NULL) {
-	return NULL;
-    }
-    return NodeToEntry(comboPtr, node);
-}
-
-static int
-EntryIsHidden(Entry *entryPtr)
-{
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    if ((comboPtr->flags & HIDE_LEAVES) && (Blt_Tree_IsLeaf(entryPtr->node))) {
-	return TRUE;
-    }
-    return (entryPtr->flags & ENTRY_HIDE) ? TRUE : FALSE;
-}
-
-static Entry *
-GetEntryFromNode(ComboTree *comboPtr, Blt_TreeNode node)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->entryTable, (char *)node);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-static Entry *
-FirstChild(Entry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    for (node = Blt_Tree_FirstChild(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_NextSibling(node)) {
-	entryPtr = NodeToEntry(comboPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) || (!EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-static Entry *
-LastChild(Entry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    for (node = Blt_Tree_LastChild(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_PrevSibling(node)) {
-	entryPtr = NodeToEntry(comboPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) || (!EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-static Entry *
-NextSibling(Entry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    for (node = Blt_Tree_NextSibling(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_NextSibling(node)) {
-	entryPtr = NodeToEntry(comboPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) || (!EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-static Entry *
-PrevSibling(Entry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    for (node = Blt_Tree_PrevSibling(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_PrevSibling(node)) {
-	entryPtr = NodeToEntry(comboPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) || (!EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrevEntry --
- *
- *	Returns the "previous" node in the tree.  This node (in 
- *	depth-first order) is its parent if the node has no siblings
- *	that are previous to it.  Otherwise it is the last descendant 
- *	of the last sibling.  In this case, descend the sibling's
- *	hierarchy, using the last child at any ancestor, until we
- *	we find a leaf.
- *
- *---------------------------------------------------------------------------
- */
-static Entry *
-PrevEntry(Entry *entryPtr, unsigned int mask)
-{
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-    Entry *prevPtr;
-
-    if (entryPtr->node == Blt_Tree_RootNode(comboPtr->tree)) {
-	return NULL;		/* The root is the first node. */
-    }
-    prevPtr = PrevSibling(entryPtr, mask);
-    if (prevPtr == NULL) {
-	/* There are no siblings previous to this one, so pick the parent. */
-	prevPtr = ParentEntry(entryPtr);
-    } else {
-	/*
-	 * Traverse down the right-most thread in order to select the
-	 * last entry.  Stop if we find a "closed" entry or reach a leaf.
-	 */
-	entryPtr = prevPtr;
-	while ((entryPtr->flags & mask) == 0) {
-	    entryPtr = LastChild(entryPtr, mask);
-	    if (entryPtr == NULL) {
-		break;		/* Found a leaf. */
-	    }
-	    prevPtr = entryPtr;
-	}
-    }
-    if (prevPtr == NULL) {
-	return NULL;
-    }
-    return prevPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextEntry --
- *
- *	Returns the "next" node in relation to the given node.  
- *	The next node (in depth-first order) is either the first 
- *	child of the given node the next sibling if the node has
- *	no children (the node is a leaf).  If the given node is the 
- *	last sibling, then try it's parent next sibling.  Continue
- *	until we either find a next sibling for some ancestor or 
- *	we reach the root node.  In this case the current node is 
- *	the last node in the tree.
- *
- *---------------------------------------------------------------------------
- */
-static Entry *
-NextEntry(Entry *entryPtr, unsigned int mask)
-{
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-    Entry *nextPtr;
-    int ignoreLeaf;
-
-    ignoreLeaf = ((comboPtr->flags & HIDE_LEAVES) && 
-	(Blt_Tree_IsLeaf(entryPtr->node)));
-
-    if ((!ignoreLeaf) && ((entryPtr->flags & mask) == 0)) {
-	nextPtr = FirstChild(entryPtr, mask); 
-	if (nextPtr != NULL) {
-	    return nextPtr;	/* Pick the first sub-node. */
-	}
-    }
-
-    /* 
-     * Back up until to a level where we can pick a "next sibling".  
-     * For the last entry we'll thread our way back to the root.
-     */
-
-    while (entryPtr != comboPtr->rootPtr) {
-	nextPtr = NextSibling(entryPtr, mask);
-	if (nextPtr != NULL) {
-	    return nextPtr;
-	}
-	entryPtr = ParentEntry(entryPtr);
-    }
-    return NULL;		/* At root, no next node. */
-}
-
-static Entry *
-LastEntry(ComboTree *comboPtr, Entry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode next;
-    Entry *nextPtr;
-
-    next = Blt_Tree_LastChild(entryPtr->node);
-    while (next != NULL) {
-	nextPtr = NodeToEntry(comboPtr, next);
-	if ((nextPtr->flags & mask) != mask) {
-	    break;
-	}
-	entryPtr = nextPtr;
-	next = Blt_Tree_LastChild(next);
-    }
-    return entryPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NearestEntry --
- *
- *	Finds the entry closest to the given screen X-Y coordinates
- *	in the viewport.
- *
- * Results:
- *	Returns the pointer to the closest node.  If no node is
- *	visible (nodes may be hidden), NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Entry *
-NearestEntry(ComboTree *comboPtr, int x, int y, int selectOne)
-{
-    Entry *lastPtr;
-    Entry **p;
-
-    /*
-     * We implicitly can pick only visible entries.  So make sure that
-     * the tree exists.
-     */
-    if (comboPtr->nVisible == 0) {
-	return NULL;
-    }
-    if (y < 0) {
-	return (selectOne) ? comboPtr->visibleEntries[0] : NULL;
-    }
-    /*
-     * Since the entry positions were previously computed in world
-     * coordinates, convert Y-coordinate from screen to world
-     * coordinates too.
-     */
-    y = WORLDY(comboPtr, y);
-    lastPtr = comboPtr->visibleEntries[0];
-    for (p = comboPtr->visibleEntries; *p != NULL; p++) {
-	Entry *entryPtr;
-
-	entryPtr = *p;
-	/*
-	 * If the start of the next entry starts beyond the point,
-	 * use the last entry.
-	 */
-	if (entryPtr->worldY > y) {
-	    return (selectOne) ? entryPtr : NULL;
-	}
-	if (y < (entryPtr->worldY + entryPtr->height)) {
-	    return entryPtr;	/* Found it. */
-	}
-	lastPtr = entryPtr;
-    }
-    return (selectOne) ? lastPtr : NULL;
-}
-
-
-static Entry *
-FindEntryByLabel(ComboTree *comboPtr, const char *string)
-{
-    Entry *entryPtr;
-
-    entryPtr = comboPtr->rootPtr;
-    if (comboPtr->activePtr != NULL) {
-	entryPtr = comboPtr->activePtr;
-    }
-    for (/*empty*/; entryPtr != NULL; 
-	entryPtr = NextEntry(entryPtr, ENTRY_MASK)){
-	if (strcmp(GETLABEL(entryPtr), string) == 0) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-static void
-DestroyEntry(DestroyData data)
-{
-    Entry *entryPtr = (Entry *)data;
-    ComboTree *comboPtr;
-    
-    comboPtr = entryPtr->comboPtr;
-    iconsOption.clientData = comboPtr;
-    uidOption.clientData = comboPtr;
-    labelOption.clientData = comboPtr;
-    Blt_FreeOptions(entrySpecs, (char *)entryPtr, comboPtr->display, 0);
-    if (!Blt_Tree_TagTableIsShared(comboPtr->tree)) {
-	/* Don't clear tags unless this client is the only one using
-	 * the tag table.*/
-	Blt_Tree_ClearTags(comboPtr->tree, entryPtr->node);
-    }
-    if (entryPtr->textPtr != NULL) {
-	Blt_Free(entryPtr->textPtr);
-    }
-    Blt_PoolFreeItem(comboPtr->entryPool, entryPtr);
-}
-
-
-static void
-FreeEntry(ComboTree *comboPtr, Entry *entryPtr)
-{
-    if (entryPtr == comboPtr->activePtr) {
-	comboPtr->activePtr = ParentEntry(entryPtr);
-    }
-    if (entryPtr == comboPtr->activeBtnPtr) {
-	comboPtr->activeBtnPtr = NULL;
-    }
-    Blt_DeleteBindings(comboPtr->bindTable, entryPtr);
-    if (entryPtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(&comboPtr->entryTable, entryPtr->hPtr);
-    }
-    entryPtr->node = NULL;
-
-    Tcl_EventuallyFree(entryPtr, DestroyEntry);
-    /*
-     * Indicate that the screen layout of the hierarchy may have changed
-     * because this node was deleted.  The screen positions of the nodes
-     * in comboPtr->visibleEntries are invalidated.
-     */
-    comboPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    EventuallyRedraw(comboPtr);
-}
-
-static void
-DestroyEntries(ComboTree *comboPtr) 
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    /* Release the current tree, removing any entry fields. */
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->entryTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Entry *entryPtr;
-
-	entryPtr = Blt_GetHashValue(hPtr);
-	entryPtr->hPtr = NULL;
-	FreeEntry(comboPtr, entryPtr);
-    }
-    Blt_DeleteHashTable(&comboPtr->entryTable);
-}
-
-static const char *
-GetFullName(
-    ComboTree *comboPtr,
-    Entry *entryPtr,
-    Tcl_DString *resultPtr)
-{
-    const char **names;		/* Used the stack the component names. */
-    const char *staticSpace[64+2];
-    int level;
-    int i;
-
-    level = Blt_Tree_NodeDepth(entryPtr->node);
-    if (GETLABEL(comboPtr->rootPtr) == NULL) {
-	level--;
-    }
-    if (level > 64) {
-	names = Blt_AssertMalloc((level + 2) * sizeof(char *));
-    } else {
-	names = staticSpace;
-    }
-    for (i = level; i >= 0; i--) {
-	Blt_TreeNode node;
-
-	/* Save the name of each ancestor in the name array. */
-	names[i] = GETLABEL(entryPtr);
-	node = Blt_Tree_ParentNode(entryPtr->node);
-	if (node != NULL) {
-	    entryPtr = NodeToEntry(comboPtr, node);
-	}
-    }
-    if (level >= 0) {
-	if (comboPtr->pathSep == NULL) {
-	    for (i = 0; i <= level; i++) {
-		Tcl_DStringAppendElement(resultPtr, names[i]);
-	    }
-	} else {
-	    Tcl_DStringAppend(resultPtr, names[0], -1);
-	    for (i = 1; i <= level; i++) {
-		Tcl_DStringAppend(resultPtr, comboPtr->pathSep, -1);
-		Tcl_DStringAppend(resultPtr, names[i], -1);
-	    }
-	}
-    } else {
-	if (comboPtr->pathSep != NULL) {
-	    Tcl_DStringAppend(resultPtr, comboPtr->pathSep, -1);
-	}
-    }
-    if (names != staticSpace) {
-	Blt_Free(names);
-    }
-    return Tcl_DStringValue(resultPtr);
-}
-
-
-/*
- * Preprocess the command string for percent substitution.
- */
-static void
-PercentSubst(
-    ComboTree *comboPtr,
-    Entry *entryPtr,
-    const char *command,
-    Tcl_DString *resultPtr)
-{
-    const char *last, *p;
-    const char *fullName;
-    Tcl_DString ds;
-
-    /*
-     * Get the full path name of the node, in case we need to substitute for
-     * it.
-     */
-    Tcl_DStringInit(&ds);
-    fullName = GetFullName(comboPtr, entryPtr, &ds);
-    Tcl_DStringInit(resultPtr);
-    /* Append the widget name and the node .t 0 */
-    for (last = p = command; *p != '\0'; p++) {
-	if (*p == '%') {
-	    const char *string;
-	    char buf[3];
-
-	    if (p > last) {
-		Tcl_DStringAppend(resultPtr, last, p - last);
-	    }
-	    switch (*(p + 1)) {
-	    case '%':		/* Percent sign */
-		string = "%";
-		break;
-	    case 'W':		/* Widget name */
-		string = Tk_PathName(comboPtr->tkwin);
-		break;
-	    case 'P':		/* Full pathname */
-		string = fullName;
-		break;
-	    case 'p':		/* Name of the node */
-		string = GETLABEL(entryPtr);
-		break;
-	    case '#':		/* Node identifier */
-		string = Blt_Tree_NodeIdAscii(entryPtr->node);
-		break;
-	    default:
-		if (*(p + 1) == '\0') {
-		    p--;
-		}
-		buf[0] = *p, buf[1] = *(p + 1), buf[2] = '\0';
-		string = buf;
-		break;
-	    }
-	    Tcl_DStringAppend(resultPtr, string, -1);
-	    p++;
-	    last = p + 1;
-	}
-    }
-    if (p > last) {
-	Tcl_DStringAppend(resultPtr, last, p-last);
-    }
-    Tcl_DStringFree(&ds);
-}
-
-static int
-CloseEntry(ComboTree *comboPtr, Entry *entryPtr)
-{
-    const char *cmd;
-
-    if (entryPtr->flags & ENTRY_CLOSED) {
-	return TCL_OK;		/* Entry is already closed. */
-    }
-    entryPtr->flags |= ENTRY_CLOSED;
-
-    /*
-     * Invoke the entry's "close" command, if there is one. Otherwise
-     * try the treeview's global "close" command.
-     */
-    cmd = CHOOSE(comboPtr->closeCmd, entryPtr->closeCmd);
-    if (cmd != NULL) {
-	Tcl_DString ds;
-	int result;
-
-	PercentSubst(comboPtr, entryPtr, cmd, &ds);
-	Tcl_Preserve(entryPtr);
-	result = Tcl_GlobalEval(comboPtr->interp, Tcl_DStringValue(&ds));
-	Tcl_Release(entryPtr);
-	Tcl_DStringFree(&ds);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    comboPtr->flags |= LAYOUT_PENDING;
-    return TCL_OK;
-}
-
-
-static int
-OpenEntry(ComboTree *comboPtr, Entry *entryPtr)
-{
-    const char *cmd;
-
-    if ((entryPtr->flags & ENTRY_CLOSED) == 0) {
-	return TCL_OK;		/* Entry is already open. */
-    }
-    entryPtr->flags &= ~ENTRY_CLOSED;
-    /*
-     * If there's a "open" command proc specified for the entry, use that
-     * instead of the more general "open" proc for the entire treeview.
-     */
-    cmd = CHOOSE(comboPtr->openCmd, entryPtr->openCmd);
-    if (cmd != NULL) {
-	Tcl_DString ds;
-	int result;
-
-	PercentSubst(comboPtr, entryPtr, cmd, &ds);
-	Tcl_Preserve(entryPtr);
-	result = Tcl_GlobalEval(comboPtr->interp, Tcl_DStringValue(&ds));
-	Tcl_Release(entryPtr);
-	Tcl_DStringFree(&ds);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    comboPtr->flags |= LAYOUT_PENDING;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateEntry --
- *
- *	Marks the designated entry as active.  The entry is redrawn with its
- *	active colors.  The previously active entry is deactivated.  If the
- *	new entry is NULL, then this means that no new entry is to be
- *	activated.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Individual entries entries may be scheduled to be drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ActivateEntry(ComboTree *comboPtr, Entry *entryPtr) 
-{
-    if ((comboPtr->activePtr == entryPtr) && (entryPtr != NULL)) {
-	return;		/* Entry is already active. */
-    }
-    if (comboPtr->activePtr != NULL) {
-	EventuallyRedrawEntry(comboPtr->activePtr);
-    }
-    comboPtr->activePtr = entryPtr;
-    if (entryPtr != NULL) {
-	EventuallyRedrawEntry(entryPtr);
-    }
-}
-
-static int
-ConfigureEntry(
-    ComboTree *comboPtr,
-    Entry *entryPtr,
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    iconsOption.clientData = comboPtr;
-    uidOption.clientData = comboPtr;
-    labelOption.clientData = comboPtr;
-    if (Blt_ConfigureWidgetFromObj(comboPtr->interp, comboPtr->tkwin, 
-	entrySpecs, objc, objv, (char *)entryPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    /* Assume all changes require a new layout. */
-    entryPtr->flags |= ENTRY_LAYOUT_PENDING;
-    comboPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewEntry --
- *
- *	Allocates and initializes a new entry.
- *
- * Results:
- *	Returns the entry.
- *
- *---------------------------------------------------------------------------
- */
-static Entry *
-NewEntry(ComboTree *comboPtr, Blt_TreeNode node)
-{
-    Entry *entryPtr;
-
-    entryPtr = Blt_PoolAllocItem(comboPtr->entryPool, sizeof(Entry));
-    memset(entryPtr, 0, sizeof(Entry));
-    entryPtr->flags = (unsigned short)(comboPtr->buttonFlags | ENTRY_CLOSED);
-    entryPtr->comboPtr = comboPtr;
-    entryPtr->labelUid = NULL;
-    entryPtr->node = node;
-    return entryPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEntry --
- *
- *	This procedure is called by the Tree object when a node is created and
- *	inserted into the tree.  It adds a new treeview entry field to the
- *	node.
- *
- * Results:
- *	Returns the entry.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateEntry(
-    ComboTree *comboPtr,
-    Blt_TreeNode node,		/* Node that has just been created. */
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    Entry *entryPtr;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->entryTable, (char *)node, &isNew);
-    if (isNew) {
-	entryPtr = NewEntry(comboPtr, node);
-	Blt_SetHashValue(hPtr, entryPtr);
-	entryPtr->hPtr = hPtr;
-    } else {
-	entryPtr = Blt_GetHashValue(hPtr);
-    }
-    if (ConfigureEntry(comboPtr, entryPtr, objc, objv, flags) != TCL_OK) {
-	FreeEntry(comboPtr, entryPtr);
-	return TCL_ERROR;	/* Error configuring the entry. */
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTagTable --
- *
- *	Returns the hash table containing row indices for a tag.
- *
- * Results:
- *	Returns a pointer to the hash table containing indices for the given
- *	tag.  If the row has no tags, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashTable *
-GetTagTable(ComboTree *comboPtr, const char *tagName)		
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->entryBindTagTable, tagName);
-    if (hPtr == NULL) {
-	return NULL;		/* No tag by that name. */
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEntryIterator --
- *
- *	Converts a string into node pointer.  The string may be in one of the
- *	following forms:
- *
- *	    NNN			- inode.
- *	    "active"		- Currently active node.
- *	    "anchor"		- anchor of selected region.
- *	    "current"		- Currently picked node in bindtable.
- *	    "focus"		- The node currently with focus.
- *	    "root"		- Root node.
- *	    "end"		- Last open node in the entire hierarchy.
- *	    "next"		- Next open node from the currently active
- *				  node. Wraps around back to top.
- *	    "last"		- Previous open node from the currently active
- *				  node. Wraps around back to bottom.
- *	    "up"		- Next open node from the currently active
- *				  node. Does not wrap around.
- *	    "down"		- Previous open node from the currently active
- *				  node. Does not wrap around.
- *	    "nextsibling"	- Next sibling of the current node.
- *	    "prevsibling"	- Previous sibling of the current node.
- *	    "parent"		- Parent of the current node.
- *	    "view.top"		- Top of viewport.
- *	    "view.bottom"	- Bottom of viewport.
- *	    @x,y		- Closest node to the specified X-Y position.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via nodePtr.  Otherwise, TCL_ERROR is
- *	returned and an error message is left in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetEntryIterator(
-    Tcl_Interp *interp, 
-    ComboTree *comboPtr, 
-    Tcl_Obj *objPtr, 
-    EntryIterator *iterPtr)
-{
-    Entry *entryPtr, *fromPtr;
-    char c;
-    const char *string;
-
-    iterPtr->first = NULL;
-    iterPtr->type = ITER_INDEX;
-    string = Tcl_GetString(objPtr);
-    iterPtr->tagName = Tcl_GetString(objPtr);
-    entryPtr = NULL;
-    fromPtr = comboPtr->activePtr;
-    if (fromPtr == NULL) {
-	fromPtr = comboPtr->rootPtr;
-    }
-    c = string[0];
-    if (isdigit(UCHAR(string[0]))) {    
-	Blt_TreeNode node;
-	long inode;
-
-	if (Tcl_GetLongFromObj(interp, objPtr, &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(comboPtr->tree, inode);
-	if (node != NULL) {
-	    iterPtr->first = NodeToEntry(comboPtr, node);
-	}
-	return TCL_OK;		/* Node Id. */
-    }
-    if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(interp, comboPtr->tkwin, string, &x, &y) == TCL_OK) {
-	    iterPtr->first = NearestEntry(comboPtr, x, y, TRUE);
-	}
-    } else if ((c == 'a') && (strcmp(string, "all") == 0)) {
-	iterPtr->first = comboPtr->rootPtr;
-	iterPtr->type = ITER_ALL;
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	iterPtr->first = comboPtr->activePtr;
-    } else if ((c == 'b') && (strcmp(string, "bottom") == 0)) {
-	iterPtr->first = LastEntry(comboPtr, comboPtr->rootPtr, ENTRY_MASK);
-    } else if ((c == 't') && (strcmp(string, "top") == 0)) {
-	entryPtr = comboPtr->rootPtr;
-	if (comboPtr->flags & HIDE_ROOT) {
-	    entryPtr = NextEntry(entryPtr, ENTRY_MASK);
-	}
-	iterPtr->first = entryPtr;
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	iterPtr->first = LastEntry(comboPtr, comboPtr->rootPtr, ENTRY_MASK);
-    } else if ((c == 'r') && (strcmp(string, "root") == 0)) {
-	iterPtr->first = comboPtr->rootPtr;
-    } else if ((c == 'p') && (strcmp(string, "parent") == 0)) {
-	if (fromPtr != comboPtr->rootPtr) {
-	    iterPtr->first = ParentEntry(fromPtr);
-	}
-    } else if ((c == 'c') && (strcmp(string, "current") == 0)) {
-	/* Can't trust picked entry, if entries have been added or deleted. */
-	if (!(comboPtr->flags & DIRTY)) {
-	    ClientData context;
-
-	    context = Blt_GetCurrentContext(comboPtr->bindTable);
-	    if ((context == PICK_ENTRY) || (context == PICK_BUTTON)) {
-		iterPtr->first = Blt_GetCurrentItem(comboPtr->bindTable);
-	    }
-	}
-    } else if ((c == 'u') && (strcmp(string, "up") == 0)) {
-	entryPtr = PrevEntry(fromPtr, ENTRY_MASK);
-	if (entryPtr == NULL) {
-	    entryPtr = fromPtr;
-	}
-	if ((entryPtr == comboPtr->rootPtr) && 
-	    (comboPtr->flags & HIDE_ROOT)) {
-	    entryPtr = NextEntry(entryPtr, ENTRY_MASK);
-	}
-	iterPtr->first = entryPtr;
-    } else if ((c == 'd') && (strcmp(string, "down") == 0)) {
-	entryPtr = NextEntry(fromPtr, ENTRY_MASK);
-	if (entryPtr == NULL) {
-	    entryPtr = fromPtr;
-	}
-	if ((entryPtr == comboPtr->rootPtr) && 
-	    (comboPtr->flags & HIDE_ROOT)) {
-	    entryPtr = NextEntry(entryPtr, ENTRY_MASK);
-	}
-	iterPtr->first = entryPtr;
-    } else if (((c == 'l') && (strcmp(string, "last") == 0)) ||
-	       ((c == 'p') && (strcmp(string, "prev") == 0))) {
-	entryPtr = PrevEntry(fromPtr, ENTRY_MASK);
-	if (entryPtr == NULL) {
-	    entryPtr = LastEntry(comboPtr, comboPtr->rootPtr, ENTRY_MASK);
-	}
-	if ((entryPtr == comboPtr->rootPtr) && 
-	    (comboPtr->flags & HIDE_ROOT)) {
-	    entryPtr = NextEntry(entryPtr, ENTRY_MASK);
-	}
-	iterPtr->first = entryPtr;
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-        entryPtr = NextEntry(fromPtr, ENTRY_MASK);
-	if (entryPtr == NULL) {
-	    if (comboPtr->flags & HIDE_ROOT) {
-		entryPtr = NextEntry(comboPtr->rootPtr,ENTRY_MASK);
-	    } else {
-		entryPtr = comboPtr->rootPtr;
-	    }
-	}
-	iterPtr->first = entryPtr;
-    } else if ((c == 'n') && (strcmp(string, "nextsibling") == 0)) {
-	iterPtr->first = NextSibling(fromPtr, ENTRY_MASK);
-    } else if ((c == 'n') && (strcmp(string, "none") == 0)) {
-	iterPtr->first = NULL;
-    } else if ((c == 'p') && (strcmp(string, "prevsibling") == 0)) {
-	iterPtr->first = PrevSibling(fromPtr, ENTRY_MASK);
-    } else if ((c == 'v') && (strcmp(string, "view.top") == 0)) {
-	if (comboPtr->nVisible > 0) {
-	    iterPtr->first = comboPtr->visibleEntries[0];
-	}
-    } else if ((c == 'v') && (strcmp(string, "view.bottom") == 0)) {
-	if (comboPtr->nVisible > 0) {
-	    iterPtr->first = comboPtr->visibleEntries[comboPtr->nVisible - 1];
-	} 
-    } else {
-	entryPtr = FindEntryByLabel(comboPtr, iterPtr->tagName);
-	if (entryPtr != NULL) {
-	    iterPtr->first = entryPtr;
-	} else {
-	    iterPtr->tablePtr = GetTagTable(comboPtr, iterPtr->tagName);
-	    if (iterPtr->tablePtr != NULL) {
-		iterPtr->type = ITER_TAG;
-		return TCL_OK;
-	    }
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find tag or entry \"", string,
-			"\" in \"", Tk_PathName(comboPtr->tkwin), "\"", 
-			(char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextTaggedEntry --
- *
- *	Returns the next entry derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first entry.  If no more rows can be
- *	found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Entry *
-NextTaggedEntry(EntryIterator *iterPtr)
-{
-    if (iterPtr->type == ITER_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	if (hPtr != NULL) {
-	    return Blt_GetHashValue(hPtr);
-	}
-    } else if (iterPtr->type == ITER_ALL) {
-	Entry *entryPtr;
-	
-	entryPtr = iterPtr->next;
-	if (entryPtr != NULL) {
-	    iterPtr->next = NextEntry(entryPtr, ENTRY_MASK);
-	}
-	return entryPtr;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstTaggedEntry --
- *
- *	Returns the first entry derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first entry.  If no more rows can be
- *	found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Entry *
-FirstTaggedEntry(EntryIterator *iterPtr)
-{
-    if (iterPtr->type == ITER_TAG) {
-	Blt_HashEntry *hPtr;
-	
-	hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	if (hPtr == NULL) {
-	    return NULL;
-	}
-	return Blt_GetHashValue(hPtr);
-    } else {
-	Entry *entryPtr;
-	
-	entryPtr = iterPtr->first;
-	iterPtr->next = NextTaggedEntry(iterPtr);
-	return entryPtr;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEntryFromObj --
- *
- *	Gets the entry associated the given index, tag, or label.  This
- *	routine is used when you want only one entry.  It's an error if more
- *	than one entry is specified (e.g. "all" tag or range "1:4").  It's
- *	also an error if the tag is empty (no entries are currently tagged).
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetEntryFromObj(
-    Tcl_Interp *interp, 
-    ComboTree *comboPtr,
-    Tcl_Obj *objPtr,
-    Entry **entryPtrPtr)
-{
-    EntryIterator iter;
-    Entry *firstPtr;
-
-    if (GetEntryIterator(interp, comboPtr, objPtr, &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    firstPtr = FirstTaggedEntry(&iter);
-    if (firstPtr != NULL) {
-	Entry *nextPtr;
-
-	nextPtr = NextTaggedEntry(&iter);
-	if (nextPtr != NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "multiple entries specified by \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *entryPtrPtr = firstPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEntry --
- *
- *	Returns an entry based upon its index.  This differs from
- *	GetEntryFromObj in that an non-existant entry (NULL) is treated
- *	an error.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via nodePtr.  Otherwise, TCL_ERROR is
- *	returned and an error message is left in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetEntry(ComboTree *comboPtr, Tcl_Obj *objPtr, Entry **entryPtrPtr)
-{
-    Entry *entryPtr;
-
-    if (GetEntryFromObj(comboPtr->interp, comboPtr, objPtr, &entryPtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (entryPtr == NULL) {
-	Tcl_ResetResult(comboPtr->interp);
-	Tcl_AppendResult(comboPtr->interp, "can't find entry \"", 
-		Tcl_GetString(objPtr), "\" in \"", Tk_PathName(comboPtr->tkwin),
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *entryPtrPtr = entryPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetUid --
- *
- *	Gets or creates a unique string identifier.  Strings are reference
- *	counted.  The string is placed into a hashed table local to the
- *	treeview.
- *
- * Results:
- *	Returns the pointer to the hashed string.
- *
- *---------------------------------------------------------------------------
- */
-static UID
-GetUid(ComboTree *comboPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    size_t refCount;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->uidTable, string, &isNew);
-    if (isNew) {
-	refCount = 1;
-    } else {
-	refCount = (size_t)Blt_GetHashValue(hPtr);
-	refCount++;
-    }
-    Blt_SetHashValue(hPtr, refCount);
-    return Blt_GetHashKey(&comboPtr->uidTable, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeUid --
- *
- *	Releases the uid.  Uids are reference counted, so only when the
- *	reference count is zero (i.e. no one else is using the string) is the
- *	entry removed from the hash table.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeUid(ComboTree *comboPtr, UID uid)
-{
-    Blt_HashEntry *hPtr;
-    size_t refCount;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->uidTable, uid);
-    assert(hPtr != NULL);
-    refCount = (size_t)Blt_GetHashValue(hPtr);
-    refCount--;
-    if (refCount > 0) {
-	Blt_SetHashValue(hPtr, refCount);
-    } else {
-	Blt_DeleteHashEntry(&comboPtr->uidTable, hPtr);
-    }
-}
-
-static Icon
-GetIcon(ComboTree *comboPtr, const char *iconName)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    struct _Icon *iconPtr;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->iconTable, iconName, &isNew);
-    if (isNew) {
-	Tk_Image tkImage;
-	int width, height;
-
-	tkImage = Tk_GetImage(comboPtr->interp, comboPtr->tkwin, 
-		(char *)iconName, IconChangedProc, comboPtr);
-	if (tkImage == NULL) {
-	    Blt_DeleteHashEntry(&comboPtr->iconTable, hPtr);
-	    return NULL;
-	}
-	Tk_SizeOfImage(tkImage, &width, &height);
-	iconPtr = Blt_AssertMalloc(sizeof(struct _Icon));
-	iconPtr->tkImage = tkImage;
-	iconPtr->hashPtr = hPtr;
-	iconPtr->refCount = 1;
-	iconPtr->width = width;
-	iconPtr->height = height;
-	Blt_SetHashValue(hPtr, iconPtr);
-    } else {
-	iconPtr = Blt_GetHashValue(hPtr);
-	iconPtr->refCount++;
-    }
-    return iconPtr;
-}
-
-static void
-FreeIcon(ComboTree *comboPtr, struct _Icon *iconPtr)
-{
-    iconPtr->refCount--;
-    if (iconPtr->refCount == 0) {
-	Blt_DeleteHashEntry(&comboPtr->iconTable, iconPtr->hashPtr);
-	Tk_FreeImage(iconPtr->tkImage);
-	Blt_Free(iconPtr);
-    }
-}
-
-static void
-DestroyIcons(ComboTree *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    struct _Icon *iconPtr;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->iconTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	iconPtr = Blt_GetHashValue(hPtr);
-	Tk_FreeImage(iconPtr->tkImage);
-	Blt_Free(iconPtr);
-    }
-    Blt_DeleteHashTable(&comboPtr->iconTable);
-}
-
-static void
-DestroyStyle(Style *stylePtr)
-{
-    ComboTree *comboPtr;
-
-    stylePtr->refCount--;
-    if (stylePtr->refCount > 0) {
-	return;
-    }
-    comboPtr = stylePtr->comboPtr;
-    iconsOption.clientData = comboPtr;
-    Blt_FreeOptions(styleSpecs, (char *)stylePtr, comboPtr->display, 0);
-    if (stylePtr->labelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelActiveGC);
-    }
-    if (stylePtr->labelDisabledGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelDisabledGC);
-    }
-    if (stylePtr->labelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelNormalGC);
-    }
-    if (stylePtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(&stylePtr->comboPtr->styleTable, stylePtr->hPtr);
-    }
-    if (stylePtr != &stylePtr->comboPtr->defStyle) {
-	Blt_Free(stylePtr);
-    }
-}
-
-static int
-AddDefaultStyle(Tcl_Interp *interp, ComboTree *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Style *stylePtr;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->styleTable, "default", &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "combotree style \"", "default", 
-		"\" already exists.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    stylePtr = &comboPtr->defStyle;
-    assert(stylePtr);
-    stylePtr->refCount = 1;
-    stylePtr->name = Blt_GetHashKey(&comboPtr->styleTable, hPtr);
-    stylePtr->hPtr = hPtr;
-    stylePtr->comboPtr = comboPtr;
-    stylePtr->relief = TK_RELIEF_FLAT;
-    stylePtr->activeRelief = TK_RELIEF_FLAT;
-    Blt_SetHashValue(hPtr, stylePtr);
-    return TCL_OK;
-}
-
-static void
-DestroyStyles(ComboTree *comboPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->styleTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Style *stylePtr;
-
-	stylePtr = Blt_GetHashValue(hPtr);
-	stylePtr->hPtr = NULL;
-	stylePtr->refCount = 0;
-	DestroyStyle(stylePtr);
-    }
-    Blt_DeleteHashTable(&comboPtr->styleTable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetStyleFromObj --
- *
- *	Gets the style associated with the given name.  
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetStyleFromObj(
-    Tcl_Interp *interp, 
-    ComboTree *comboPtr,
-    Tcl_Obj *objPtr,
-    Style **stylePtrPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&comboPtr->styleTable, Tcl_GetString(objPtr));
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find style \"", 
-		Tcl_GetString(objPtr), "\" in combomenu \"", 
-		Tk_PathName(comboPtr->tkwin), "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *stylePtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-
-
-static void
-MapEntry(Entry *entryPtr)
-{
-    ComboTree *comboPtr;
-    int entryWidth, entryHeight;
-
-    comboPtr = entryPtr->comboPtr;
-    /*
-     * FIXME: Use of DIRTY flag inconsistent.  When does it
-     *	      mean "dirty entry"? When does it mean "dirty column"?
-     *	      Does it matter? probably
-     */
-    if (entryPtr->flags & ENTRY_DIRTY) {
-	Blt_FontMetrics fontMetrics;
-	Style *stylePtr;
-	const char *label;
-	int textWidth, textHeight;
-
-	stylePtr = entryPtr->stylePtr;
-
-	entryPtr->iconWidth = entryPtr->iconHeight = 0;
-	if (stylePtr->icons != NULL) {
-	    int i;
-	    
-	    for (i = 0; i < 2; i++) {
-		if (stylePtr->icons[i] == NULL) {
-		    break;
-		}
-		if (entryPtr->iconWidth < IconWidth(stylePtr->icons[i])) {
-		    entryPtr->iconWidth = IconWidth(stylePtr->icons[i]);
-		}
-		if (entryPtr->iconHeight < IconHeight(stylePtr->icons[i])) {
-		    entryPtr->iconHeight = IconHeight(stylePtr->icons[i]);
-		}
-	    }
-	}
-	if ((stylePtr->icons == NULL) || (stylePtr->icons[0] == NULL)) {
-	    entryPtr->iconWidth = ICON_WIDTH;
-	    entryPtr->iconHeight = ICON_HEIGHT;
-	}
-	entryPtr->iconWidth += 2 * ICON_PADX;
-	entryPtr->iconHeight += 2 * ICON_PADY;
-	entryHeight = MAX(entryPtr->iconHeight, comboPtr->button.height);
-	
-	if (entryPtr->textPtr != NULL) {
-	    Blt_Free(entryPtr->textPtr);
-	    entryPtr->textPtr = NULL;
-	}
-	Blt_GetFontMetrics(stylePtr->labelFont, &fontMetrics);
-	entryPtr->lineHeight = fontMetrics.linespace;
-	entryPtr->lineHeight += 2 * LABEL_PADY + comboPtr->leader;
-	label = GETLABEL(entryPtr);
-	if (label[0] == '\0') {
-	    textWidth = textHeight = entryPtr->lineHeight;
-	} else {
-	    TextStyle ts;
-
-	    Blt_Ts_InitStyle(ts);
-	    Blt_Ts_SetFont(ts, stylePtr->labelFont);
-	    entryPtr->textPtr = Blt_Ts_CreateLayout(label, -1, &ts);
-	    textWidth = entryPtr->textPtr->width;
-	    textHeight = entryPtr->textPtr->height;
-	}
-	textWidth += 2 * LABEL_PADX;
-	textHeight += 2 * LABEL_PADY;
-	textWidth = ODD(textWidth);
-	if (entryPtr->reqHeight > textHeight) {
-	    textHeight = entryPtr->reqHeight;
-	} 
-	textHeight = ODD(textHeight);
-	entryWidth = textWidth;
-	if (entryHeight < textHeight) {
-	    entryHeight = textHeight;
-	}
-	entryPtr->labelWidth = textWidth;
-	entryPtr->labelHeight = textHeight;
-    } else {
-	entryHeight = entryPtr->labelHeight;
-	entryWidth = entryPtr->labelWidth;
-    }
-    /*  
-     * Find the maximum height of the data value entries. This also has the
-     * side effect of contributing the maximum width of the column.
-     */
-    entryPtr->width = entryWidth + COLUMN_PAD;
-    entryPtr->height = entryHeight + comboPtr->leader;
-    /*
-     * Force the height of the entry to an even number. This is to make the
-     * dots or the vertical line segments coincide with the start of the
-     * horizontal lines.
-     */
-    if (entryPtr->height & 0x01) {
-	entryPtr->height++;
-    }
-    entryPtr->flags &= ~ENTRY_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetCoordinates --
- *
- *	Determines the maximum height of all visible entries.
- *
- *	1. Sets the worldY coordinate for all mapped/open entries.
- *	2. Determines if entry needs a button.
- *	3. Collects the minimum height of open/mapped entries. (Do for all
- *	   entries upon insert).
- *	4. Figures out horizontal extent of each entry (will be width of 
- *	   tree view column).
- *	5. Collects maximum icon size for each level.
- *	6. The height of its vertical line
- *
- * Results:
- *	Returns 1 if beyond the last visible entry, 0 otherwise.
- *
- * Side effects:
- *	The array of visible nodes is filled.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetCoordinates(ComboTree *comboPtr, Entry *entryPtr, int *yPtr, int *numPtr)
-{
-    if ((entryPtr != comboPtr->rootPtr) && (EntryIsHidden(entryPtr))) {
-	entryPtr->worldY = -1;
-	entryPtr->vertLineLength = -1;
-	return;			/* If the entry is hidden, then do nothing. */
-    }
-    /* Set the world y-coordinate of the entry. Initialize the length of the
-     * dotted vertical line that runs from the entry downward with the current
-     * y-offset. */
-    entryPtr->worldY = *yPtr;
-    entryPtr->vertLineLength = -(*yPtr);
-    *yPtr += entryPtr->height;
-    entryPtr->seqNum = *numPtr;
-    (*numPtr)++;
-    {
-	int depth;
-	LevelInfo *infoPtr;
-
-	depth = Blt_Tree_NodeDepth(entryPtr->node) + 1;
-	infoPtr = comboPtr->levelInfo + depth;
-	if (infoPtr->labelWidth < entryPtr->labelWidth) {
-	    infoPtr->labelWidth = entryPtr->labelWidth;
-	}
-	if (infoPtr->iconWidth < entryPtr->iconWidth) {
-	    infoPtr->iconWidth = entryPtr->iconWidth;
-	}
-	infoPtr->iconWidth |= 0x01;
-    }
-    if ((entryPtr->flags & ENTRY_CLOSED) == 0) {
-	Entry *bottomPtr, *nextPtr;
-
-	bottomPtr = entryPtr;
-	for (nextPtr = FirstChild(entryPtr, ENTRY_HIDE); nextPtr != NULL; 
-	     nextPtr = NextSibling(nextPtr, ENTRY_HIDE)) {
-	    ResetCoordinates(comboPtr, nextPtr, yPtr, numPtr);
-	    bottomPtr = nextPtr;
-	}
-	entryPtr->vertLineLength += bottomPtr->worldY;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapTree --
- *
- *	Compute the layout when entries are opened/closed, inserted/deleted,
- *	or when text attributes change (such as font, linespacing).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The world coordinates are set for all the opened entries.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapTree(ComboTree *comboPtr)
-{
-    int y;
-    int index;
-
-    /* 
-     * Pass 1:	Reinitialize column sizes and loop through all nodes. 
-     *
-     *		1. Recalculate the size of each entry as needed. 
-     *		2. The maximum depth of the tree. 
-     *		3. Minimum height of an entry.  Dividing this by the
-     *		   height of the widget gives a rough estimate of the 
-     *		   maximum number of visible entries.
-     *		4. Build an array to hold level information to be filled
-     *		   in on pass 2.
-     */
-    if (comboPtr->flags & DIRTY) {
-	Entry *entryPtr;
-
-	comboPtr->minHeight = SHRT_MAX;
-	comboPtr->depth = 0;
-	for (entryPtr = comboPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = NextEntry(entryPtr, 0)){
-	    MapEntry(entryPtr);
-
-	    /* Get the height of the shortest entry.  */
-	    if (comboPtr->minHeight > entryPtr->height) {
-		comboPtr->minHeight = entryPtr->height;
-	    }
-
-	    /* 
-	     * Determine if the entry should display a button (indicating that
-	     * it has children) and mark the entry accordingly.
-	     */
-	    entryPtr->flags &= ~ENTRY_BUTTON;
-	    if (entryPtr->flags & ENTRY_BTN_SHOW) {
-		entryPtr->flags |= ENTRY_BUTTON;
-	    } else if (entryPtr->flags & ENTRY_BTN_AUTO) {
-		if (comboPtr->flags & HIDE_LEAVES) {
-		    /* Check that a non-leaf child exists */
-		    if (FirstChild(entryPtr, ENTRY_HIDE) != NULL) {
-			entryPtr->flags |= ENTRY_BUTTON;
-		    }
-		} else if (!Blt_Tree_IsLeaf(entryPtr->node)) {
-		    entryPtr->flags |= ENTRY_BUTTON;
-		}
-	    }
-
-	    /* Save the maximum depth of the tree. */
-	    if (comboPtr->depth < Blt_Tree_NodeDepth(entryPtr->node)) {
-		comboPtr->depth = Blt_Tree_NodeDepth(entryPtr->node);
-	    }
-	}
-
-	/* Create bookkeeping for each level of the tree. */
-	if (comboPtr->levelInfo != NULL) {
-	    Blt_Free(comboPtr->levelInfo);
-	}
-	comboPtr->levelInfo = Blt_AssertCalloc(comboPtr->depth + 2, 
-		sizeof(LevelInfo));
-	comboPtr->flags &= ~DIRTY;
-    }
-    { 
-	size_t i;
-
-	/* Reset the level bookkeeping. */
-	for (i = 0; i <= (comboPtr->depth + 1); i++) {
-	    comboPtr->levelInfo[i].labelWidth = comboPtr->levelInfo[i].x = 
-		comboPtr->levelInfo[i].iconWidth = 0;
-	}
-    }
-
-    /* 
-     * Pass 2:	Loop through all open/mapped nodes. 
-     *
-     *		1. Set world y-coordinates for entries. We must defer setting
-     *		   the x-coordinates until we know the maximum icon sizes at 
-     *		   each level.
-     *		2. Compute the maximum depth of the tree. 
-     *		3. Build an array to hold level information.
-     */
-    y = 0;
-    if (comboPtr->flags & HIDE_ROOT) {
-	/* If the root entry is to be hidden, cheat by offsetting the
-	 * y-coordinates by the height of the entry. */
-	y = -(comboPtr->rootPtr->height);
-    } 
-    index = 0;
-    ResetCoordinates(comboPtr, comboPtr->rootPtr, &y, &index);
-    comboPtr->worldHeight = y;	/* Set the scroll height of the hierarchy. */
-    if (comboPtr->worldHeight < 1) {
-	comboPtr->worldHeight = 1;
-    }
-    {
-	int maxX;
-	int sum;
-	size_t i;
-
-	sum = maxX = 0;
-	for (i = 0; i <= (comboPtr->depth + 1); i++) {
-	    int x;
-
-	    sum += comboPtr->levelInfo[i].iconWidth;
-	    if (i <= comboPtr->depth) {
-		comboPtr->levelInfo[i + 1].x = sum;
-	    }
-	    x = sum + comboPtr->levelInfo[i].labelWidth;
-	    if (x > maxX) {
-		maxX = x;
-	    }
-	}
-	comboPtr->worldWidth = maxX;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeComboGeometry --
- *
- *	Recompute the layout when entries are opened/closed, inserted/deleted,
- *	or when text attributes change (such as font, linespacing).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The world coordinates are set for all the opened entries.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeComboGeometry(ComboTree *comboPtr)
-{
-    int w, h;
-
-    MapTree(comboPtr);
-
-    comboPtr->xScrollbarHeight = comboPtr->yScrollbarWidth = 0;
-    if (comboPtr->reqWidth > 0) {
-	w = comboPtr->reqWidth;
-	fprintf(stderr, "%s rw=%d\n", Tk_PathName(comboPtr->tkwin), w);
-    } else if (comboPtr->reqWidth < 0) {
-	w = MIN(-comboPtr->reqWidth, comboPtr->worldWidth);
-	fprintf(stderr, "%s min(%d,%d)=%d\n", Tk_PathName(comboPtr->tkwin), 
-		-comboPtr->reqWidth, comboPtr->worldWidth, w);
-    } else {
-	w = Tk_Width(Tk_Parent(comboPtr->tkwin));
-	if (w <= 1) {
-	    w = Tk_ReqWidth(Tk_Parent(comboPtr->tkwin));
-	}
-	fprintf(stderr, "%s min(%d,%d)=%d\n", Tk_PathName(comboPtr->tkwin), 
-		WidthOfScreen(Tk_Screen(comboPtr->tkwin)),
-		comboPtr->worldWidth, w);
-    }
-    if ((comboPtr->worldWidth > w) && (comboPtr->xScrollbar != NULL)) {
-	comboPtr->xScrollbarHeight = Tk_ReqHeight(comboPtr->xScrollbar);
-    }
-    if (comboPtr->reqHeight > 0) {
-	h = comboPtr->reqHeight;
-    } else if (comboPtr->reqHeight < 0) {
-	h = MIN(-comboPtr->reqHeight, comboPtr->worldHeight);
-    } else {
-	h=MIN(HeightOfScreen(Tk_Screen(comboPtr->tkwin)),comboPtr->worldHeight);
-    }
-    if ((comboPtr->worldHeight > h) && (comboPtr->yScrollbar != NULL)) {
-	comboPtr->yScrollbarWidth = Tk_ReqWidth(comboPtr->yScrollbar);
-    }
-    if (comboPtr->reqWidth == 0) {
-#ifdef notdef
-	w += 2 * (comboPtr->borderWidth + 2 * ITEM_IPAD);
-	w += comboPtr->yScrollbarWidth;
-#endif
-    }
-    if (comboPtr->reqHeight == 0) {
-	h += comboPtr->xScrollbarHeight;
-	h += 2 * comboPtr->borderWidth;
-    }
-#ifdef notdef
-    comboPtr->width = w;
-    comboPtr->height = h;
-    fprintf(stderr, "%s= w=%d leftInd w=%d icon w=%d label w=%d rightInd w=%d\n", 
-	    Tk_PathName(comboPtr->tkwin), comboPtr->width, 
-	    comboPtr->leftIndWidth, comboPtr->iconWidth, comboPtr->labelWidth,
-	    comboPtr->rightIndWidth);
-#endif
-    if ((w != Tk_ReqWidth(comboPtr->tkwin)) || 
-	(h != Tk_ReqHeight(comboPtr->tkwin))) {
-	Tk_GeometryRequest(comboPtr->tkwin, w, h);
-    }
-    comboPtr->flags |= SCROLL_PENDING | LAYOUT_PENDING;
-}
-
-/* Converters for configuration options. */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToButtonProc --
- *
- *	Convert a string to one of three values.
- *		0 - false, no, off
- *		1 - true, yes, on
- *		2 - auto
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToButtonProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    const char *string;
-    int *flagsPtr = (int *)(widgRec + offset);
-
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == 'a') && (strcmp(string, "auto") == 0)) {
-	*flagsPtr &= ~ENTRY_BTN_MASK;
-	*flagsPtr |= ENTRY_BTN_AUTO;
-    } else {
-	int bool;
-
-	if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	*flagsPtr &= ~ENTRY_BTN_MASK;
-	if (bool) {
-	    *flagsPtr |= ENTRY_BTN_SHOW;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonToObjProc --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ButtonToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int bool;
-    unsigned int buttonFlags = *(int *)(widgRec + offset);
-
-    bool = (buttonFlags & ENTRY_BTN_MASK);
-    if (bool == ENTRY_BTN_AUTO) {
-	return Tcl_NewStringObj("auto", 4);
-    } else {
-	return Tcl_NewBooleanObj(bool);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLabelProc --
- *
- *	Convert the string representing the label. 
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLabelProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    UID *labelPtr = (UID *)(widgRec + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] != '\0') {
-	ComboTree *comboPtr = clientData;
-
-	*labelPtr = GetUid(comboPtr, string);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LabelToObjProc --
- *
- * Results:
- *	The string of the entry's label is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LabelToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    UID labelUid = *(UID *)(widgRec + offset);
-    const char *string;
-
-    if (labelUid == NULL) {
-	Entry *entryPtr  = (Entry *)widgRec;
-
-	string = Blt_Tree_NodeLabel(entryPtr->node);
-    } else {
-	string = labelUid;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeLabelProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    UID *labelPtr = (UID *)(widgRec + offset);
-
-    if (*labelPtr != NULL) {
-	ComboTree *comboPtr = clientData;
-
-	FreeUid(comboPtr, *labelPtr);
-	*labelPtr = NULL;
-    }
-}
-
-/*ARGSUSED*/
-static void
-FreeStyleProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Style *stylePtr = *(Style **)(widgRec + offset);
-
-    if ((stylePtr != NULL) && (stylePtr != &stylePtr->comboPtr->defStyle)) {
-	DestroyStyle(stylePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStyleProc --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStyleProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing style. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    ComboTree *comboPtr;
-    Entry *entryPtr = (Entry *)widgRec;
-    Style **stylePtrPtr = (Style **)(widgRec + offset);
-    Style *stylePtr;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    comboPtr = entryPtr->comboPtr;
-    if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	stylePtr = NULL;
-    } else if (GetStyleFromObj(interp, comboPtr, objPtr, &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Release the old style. */
-    if ((*stylePtrPtr != NULL) && (*stylePtrPtr != &comboPtr->defStyle)) {
-	DestroyStyle(*stylePtrPtr);
-    }
-    stylePtr->refCount++;
-    *stylePtrPtr = stylePtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StyleToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Style *stylePtr = *(Style **)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (stylePtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	objPtr = Tcl_NewStringObj(stylePtr->name, -1);
-    }
-    return objPtr;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToUidProc --
- *
- *	Converts the string to a Uid. Uid's are hashed, reference
- *	counted strings.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToUidProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    ComboTree *comboPtr = clientData;
-    UID *uidPtr = (UID *)(widgRec + offset);
-
-    *uidPtr = GetUid(comboPtr, Tcl_GetString(objPtr));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UidToObjProc --
- *
- *	Returns the uid as a string.
- *
- * Results:
- *	The fill style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-UidToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    UID uid = *(UID *)(widgRec + offset);
-
-    if (uid == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(uid, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeUid --
- *
- *	Free the UID from the widget record, setting it to NULL.
- *
- * Results:
- *	The UID in the widget record is set to NULL.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreeUidProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    UID *uidPtr = (UID *)(widgRec + offset);
-
-    if (*uidPtr != NULL) {
-	ComboTree *comboPtr = clientData;
-
-	FreeUid(comboPtr, *uidPtr);
-	*uidPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x,			/* Not used. */
-    int y,			/* Not used. */
-    int width,			/* Not used. */
-    int height,			/* Not used. */
-    int imageWidth, 		/* Not used. */
-    int imageHeight)		/* Not used. */
-{
-    ComboTree *comboPtr = clientData;
-
-    comboPtr->flags |= (DIRTY | LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconsProc --
- *
- *	Convert a list of image names into Tk images.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconsProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj **objv;
-    ComboTree *comboPtr = clientData;
-    Icon **iconPtrPtr = (Icon **)(widgRec + offset);
-    Icon *icons;
-    int objc;
-    int result;
-
-    result = TCL_OK;
-    icons = NULL;
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 0) {
-	int i;
-	
-	icons = Blt_AssertMalloc(sizeof(Icon *) * (objc + 1));
-	for (i = 0; i < objc; i++) {
-	    icons[i] = GetIcon(comboPtr, Tcl_GetString(objv[i]));
-	    if (icons[i] == NULL) {
-		result = TCL_ERROR;
-		break;
-	    }
-	}
-	icons[i] = NULL;
-    }
-    *iconPtrPtr = icons;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconsToObjProc --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconsToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Icon *icons = *(Icon **)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-    
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (icons != NULL) {
-	Icon *iconPtr;
-
-	for (iconPtr = icons; *iconPtr != NULL; iconPtr++) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(Blt_Image_Name((*iconPtr)->tkImage), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-	}
-    }
-    return listObjPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeIconsProc(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Icon **iconsPtr = (Icon **)(widgRec + offset);
-
-    if (*iconsPtr != NULL) {
-	Icon *ip;
-	ComboTree *comboPtr = clientData;
-
-	for (ip = *iconsPtr; *ip != NULL; ip++) {
-	    FreeIcon(comboPtr, *ip);
-	}
-	Blt_Free(*iconsPtr);
-	*iconsPtr = NULL;
-    }
-}
-
-static int
-Apply(
-    ComboTree *comboPtr,
-    Entry *entryPtr,		/* Root entry of subtree. */
-    ApplyProc *proc,	       /* Procedure to call for each entry. */
-    unsigned int flags)
-{
-    if ((flags & ENTRY_HIDE) && (EntryIsHidden(entryPtr))) {
-	return TCL_OK;		/* Hidden node. */
-    }
-    if ((flags & ENTRY_HIDE) && (entryPtr->flags & ENTRY_HIDE)) {
-	return TCL_OK;		/* Hidden node. */
-    }
-    if (((flags & ENTRY_CLOSED) == 0) || 
-	((entryPtr->flags & ENTRY_CLOSED) == 0)) {
-	Entry *childPtr;
-	Blt_TreeNode node, next;
-
-	for (node = Blt_Tree_FirstChild(entryPtr->node); node != NULL; 
-	     node = next) {
-	    next = Blt_Tree_NextSibling(node);
-	    /* 
-	     * Get the next child before calling Apply
-	     * recursively.  This is because the apply callback may
-	     * delete the node and its link.
-	     */
-	    childPtr = NodeToEntry(comboPtr, node);
-	    if (Apply(comboPtr, childPtr, proc, flags) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if ((*proc) (comboPtr, entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-#ifdef notdef
-int
-EntryIsMapped(Entry *entryPtr)
-{
-    ComboTree *comboPtr = entryPtr->comboPtr; 
-
-    /* Don't check if the entry itself is open, only that its
-     * ancestors are. */
-    if (EntryIsHidden(entryPtr)) {
-	return FALSE;
-    }
-    if (entryPtr == comboPtr->rootPtr) {
-	return TRUE;
-    }
-    entryPtr = ParentEntry(entryPtr);
-    while (entryPtr != comboPtr->rootPtr) {
-	if (entryPtr->flags & (ENTRY_CLOSED | ENTRY_HIDE)) {
-	    return FALSE;
-	}
-	entryPtr = ParentEntry(entryPtr);
-    }
-    return TRUE;
-}
-#endif
-
-
-static void
-ConfigureButtons(ComboTree *comboPtr)
-{
-    Button *btnPtr = &comboPtr->button;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcMask = GCForeground;
-    gcValues.foreground = btnPtr->fgColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (btnPtr->normalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, btnPtr->normalGC);
-    }
-    btnPtr->normalGC = newGC;
-
-    gcMask = GCForeground;
-    gcValues.foreground = btnPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (btnPtr->activeGC != NULL) {
-	Tk_FreeGC(comboPtr->display, btnPtr->activeGC);
-    }
-    btnPtr->activeGC = newGC;
-
-    btnPtr->width = btnPtr->height = ODD(btnPtr->reqSize);
-    if (btnPtr->icons != NULL) {
-	int i;
-
-	for (i = 0; i < 2; i++) {
-	    int width, height;
-
-	    if (btnPtr->icons[i] == NULL) {
-		break;
-	    }
-	    width = IconWidth(btnPtr->icons[i]);
-	    height = IconWidth(btnPtr->icons[i]);
-	    if (btnPtr->width < width) {
-		btnPtr->width = width;
-	    }
-	    if (btnPtr->height < height) {
-		btnPtr->height = height;
-	    }
-	}
-    }
-    btnPtr->width += 2 * btnPtr->borderWidth;
-    btnPtr->height += 2 * btnPtr->borderWidth;
-}
-
-static int
-ConfigureStyle(
-    Tcl_Interp *interp, 
-    Style *stylePtr,
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    ComboTree *comboPtr = stylePtr->comboPtr;
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC newGC;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, styleSpecs, 
-	objc, objv, (char *)stylePtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    gcMask = GCForeground | GCFont | GCLineWidth;
-    gcValues.font = Blt_FontId(stylePtr->labelFont);
-    gcValues.line_width = comboPtr->lineWidth;
-    if (comboPtr->dashes > 0) {
-	gcMask |= (GCLineStyle | GCDashList);
-	gcValues.line_style = LineOnOffDash;
-	gcValues.dashes = comboPtr->dashes;
-    }
-
-    /* Normal label */
-    gcValues.foreground = stylePtr->labelNormalColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->labelNormalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelNormalGC);
-    }
-    stylePtr->labelNormalGC = newGC;
-	
-    /* Active label */
-    gcValues.foreground = stylePtr->labelActiveColor->pixel;
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (stylePtr->labelActiveGC != NULL) {
-	Tk_FreeGC(comboPtr->display, stylePtr->labelActiveGC);
-    }
-    stylePtr->labelActiveGC = newGC;
-
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-CreateApplyProc(
-    Blt_TreeNode node,		/* Node that has just been created. */
-    ClientData clientData,
-    int order)			/* Not used. */
-{
-    ComboTree *comboPtr = clientData; 
-    return CreateEntry(comboPtr, node, 0, NULL, 0);
-}
-
-static int
-TreeEventProc(ClientData clientData, Blt_TreeNotifyEvent *eventPtr)
-{
-    Blt_TreeNode node;
-    ComboTree *comboPtr = clientData; 
-
-    node = Blt_Tree_GetNode(eventPtr->tree, eventPtr->inode);
-    switch (eventPtr->type) {
-    case TREE_NOTIFY_CREATE:
-	return CreateEntry(comboPtr, node, 0, NULL, 0);
-    case TREE_NOTIFY_DELETE:
-	/*  
-	 * Deleting the tree node triggers a call back to free the
-	 * treeview entry that is associated with it.
-	 */
-	if (node != NULL) {
-	    Entry *entryPtr;
-
-	    entryPtr = GetEntryFromNode(comboPtr, node);
-	    if (entryPtr != NULL) {
-		FreeEntry(comboPtr, entryPtr);
-	    }
-	}
-	break;
-    case TREE_NOTIFY_RELABEL:
-	if (node != NULL) {
-	    Entry *entryPtr;
-
-	    entryPtr = NodeToEntry(comboPtr, node);
-	    entryPtr->flags |= ENTRY_DIRTY;
-	}
-	/*FALLTHRU*/
-    case TREE_NOTIFY_MOVE:
-    case TREE_NOTIFY_SORT:
-	EventuallyRedraw(comboPtr);
-	comboPtr->flags |= (LAYOUT_PENDING | DIRTY);
-	break;
-    default:
-	/* empty */
-	break;
-    }	
-    return TCL_OK;
-}
-
-
-static ClientData
-EntryTag(ComboTree *comboPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;			/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->entryBindTagTable, string, &isNew);
-    return Blt_GetHashKey(&comboPtr->entryBindTagTable, hPtr);
-}
-
-static ClientData
-ButtonTag(ComboTree *comboPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;			/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->buttonBindTagTable, string, &isNew);
-    return Blt_GetHashKey(&comboPtr->buttonBindTagTable, hPtr);
-}
-
-static void
-AddIdsToList(ComboTree *comboPtr, Blt_List ids, Tcl_Obj *objPtr, 
-	TagProc *tagProc)
-{
-    int objc;
-    Tcl_Obj **objv;
-    
-    if (Tcl_ListObjGetElements(comboPtr->interp, objPtr, &objc, &objv) 
-	== TCL_OK) {
-	int i;
-
-	for (i = 0; i < objc; i++) {
-	    ClientData clientData;
-
-	    clientData = (*tagProc)(comboPtr, Tcl_GetString(objv[i]));
-	    Blt_List_Append(ids, clientData, 0);
-	}
-    }
-}
-
-static void
-GetTags(
-    Blt_BindTable table,
-    ClientData object,		/* Object picked. */
-    ClientData context,		/* Context of object. */
-    Blt_List ids)		/* (out) List of binding ids to be
-				 * applied for this object. */
-{
-    ComboTree *comboPtr;
-
-    comboPtr = Blt_GetBindingData(table);
-    if (context == (ClientData)PICK_BUTTON) {
-	Entry *entryPtr = object;
-
-	Blt_List_Append(ids, ButtonTag(comboPtr, "Button"), 0);
-	if (entryPtr->tagsObjPtr != NULL) {
-	    AddIdsToList(comboPtr, ids, entryPtr->tagsObjPtr, ButtonTag);
-	} else {
-	    Blt_List_Append(ids, ButtonTag(comboPtr, "Entry"), 0);
-	    Blt_List_Append(ids, ButtonTag(comboPtr, "all"), 0);
-	}
-    } else {
-	Entry *entryPtr = object;
-
-	Blt_List_Append(ids, (char *)entryPtr, 0);
-	if (entryPtr->tagsObjPtr != NULL) {
-	    AddIdsToList(comboPtr, ids, entryPtr->tagsObjPtr, EntryTag);
-	} else if (context == PICK_ENTRY){
-	    Blt_List_Append(ids, EntryTag(comboPtr, "Entry"), 0);
-	    Blt_List_Append(ids, EntryTag(comboPtr, "all"), 0);
-	}
-    }
-}
-
-/*ARGSUSED*/
-static ClientData
-PickEntry(
-    ClientData clientData,
-    int x, int y,		/* Screen coordinates of the test point. */
-    ClientData *contextPtr)	/* (out) Context of entry selected: should
-				 * be PICK_ENTRY or PICK_BUTTON. */
-{
-    ComboTree *comboPtr = clientData;
-    Entry *entryPtr;
-
-    if (contextPtr != NULL) {
-	*contextPtr = NULL;
-    }
-    if (comboPtr->flags & DIRTY) {
-	/* Can't trust the selected entry if nodes have been added or
-	 * deleted. So recompute the layout. */
-	if (comboPtr->flags & LAYOUT_PENDING) {
-	    ComputeComboGeometry(comboPtr);
-	} 
-	ComputeVisibleEntries(comboPtr);
-    }
-    if (comboPtr->nVisible == 0) {
-	return NULL;
-    }
-    entryPtr = NearestEntry(comboPtr, x, y, FALSE);
-    if (entryPtr == NULL) {
-	return NULL;
-    }
-    x = WORLDX(comboPtr, x);
-    y = WORLDY(comboPtr, y);
-    if (contextPtr != NULL) {
-	*contextPtr = PICK_ENTRY;
-	if (entryPtr->flags & ENTRY_BUTTON) {
-	    Button *btnPtr = &comboPtr->button;
-	    int left, right, top, bottom;
-	    
-	    left = entryPtr->worldX + entryPtr->buttonX - BUTTON_PAD;
-	    right = left + btnPtr->width + 2 * BUTTON_PAD;
-	    top = entryPtr->worldY + entryPtr->buttonY - BUTTON_PAD;
-	    bottom = top + btnPtr->height + 2 * BUTTON_PAD;
-	    if ((x >= left) && (x < right) && (y >= top) && (y < bottom)) {
-		*contextPtr = (ClientData)PICK_BUTTON;
-	    }
-	}
-    }
-    return entryPtr;
-}
-
-
-/*
- * TreeView Procedures
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewComboTree --
- *
- *---------------------------------------------------------------------------
- */
-static ComboTree *
-NewComboTree(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Tk_Window tkwin;
-    ComboTree *comboPtr;
-    const char *name;
-
-    name = Tcl_GetString(objPtr);
-#define TOP_LEVEL_SCREEN ""
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), name, 
-	TOP_LEVEL_SCREEN);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    Tk_SetClass(tkwin, "ComboTree");
-
-    comboPtr = Blt_AssertCalloc(1, sizeof(ComboTree));
-    comboPtr->tkwin = tkwin;
-    comboPtr->display = Tk_Display(tkwin);
-    comboPtr->interp = interp;
-    comboPtr->flags = (HIDE_ROOT | DIRTY | LAYOUT_PENDING | REPOPULATE);
-    comboPtr->leader = 0;
-    comboPtr->dashes = 1;
-    comboPtr->borderWidth = 1;
-    comboPtr->relief = TK_RELIEF_SUNKEN;
-    comboPtr->button.closeRelief = comboPtr->button.openRelief = TK_RELIEF_SOLID;
-    comboPtr->reqWidth = 0;
-    comboPtr->reqHeight = 0;
-    comboPtr->xScrollUnits = comboPtr->yScrollUnits = 20;
-    comboPtr->lineWidth = 1;
-    comboPtr->button.borderWidth = 1;
-    comboPtr->buttonFlags = ENTRY_BTN_AUTO;
-    Blt_InitHashTableWithPool(&comboPtr->entryTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&comboPtr->iconTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->uidTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->styleTable, BLT_STRING_KEYS);
-    comboPtr->bindTable = Blt_CreateBindingTable(interp, tkwin, comboPtr, 
-	PickEntry, GetTags);
-    Blt_InitHashTable(&comboPtr->entryBindTagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&comboPtr->buttonBindTagTable, BLT_STRING_KEYS);
-
-    comboPtr->entryPool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    Blt_SetWindowInstanceData(tkwin, comboPtr);
-    comboPtr->cmdToken = Tcl_CreateObjCommand(interp, 
-	Tk_PathName(comboPtr->tkwin), 
-	ComboTreeInstCmdProc, comboPtr, ComboTreeInstCmdDeleteProc);
-
-    /*
-     * By default create a tree. The name will be the same as the widget
-     * pathname.
-     */
-    comboPtr->tree = Blt_Tree_Open(interp, Tk_PathName(comboPtr->tkwin), 
-	TREE_CREATE);
-    if (comboPtr->tree == NULL) {
-	return NULL;
-    }
-    Tk_CreateEventHandler(comboPtr->tkwin, ExposureMask | StructureNotifyMask |
-	FocusChangeMask, ComboTreeEventProc, comboPtr);
-    if (AddDefaultStyle(interp, comboPtr) != TCL_OK) {
-	return NULL;
-    }
-    return comboPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyComboTree --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release
- *	to clean up the internal structure of a TreeView at a safe time
- *	(when no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyComboTree(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    ComboTree *comboPtr = (ComboTree *)dataPtr;
-    Button *btnPtr;
-
-    if (comboPtr->tree != NULL) {
-	Blt_Tree_Close(comboPtr->tree);
-    }
-    iconsOption.clientData = comboPtr;
-    Blt_FreeOptions(comboSpecs, (char *)comboPtr, comboPtr->display, 0);
-    Tcl_DeleteCommandFromToken(comboPtr->interp, comboPtr->cmdToken);
-    if (comboPtr->tkwin != NULL) {
-	Tk_DeleteSelHandler(comboPtr->tkwin, XA_PRIMARY, XA_STRING);
-    }
-    if (comboPtr->lineGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->lineGC);
-    }
-    if (comboPtr->visibleEntries != NULL) {
-	Blt_Free(comboPtr->visibleEntries);
-    }
-    if (comboPtr->levelInfo != NULL) {
-	Blt_Free(comboPtr->levelInfo);
-    }
-    btnPtr = &comboPtr->button;
-    if (btnPtr->activeGC != NULL) {
-	Tk_FreeGC(comboPtr->display, btnPtr->activeGC);
-    }
-    if (btnPtr->normalGC != NULL) {
-	Tk_FreeGC(comboPtr->display, btnPtr->normalGC);
-    }
-    Blt_DestroyBindingTable(comboPtr->bindTable);
-    Blt_DeleteHashTable(&comboPtr->entryBindTagTable);
-    Blt_DeleteHashTable(&comboPtr->buttonBindTagTable);
-
-    Blt_DeleteHashTable(&comboPtr->uidTable);
-    Blt_DeleteHashTable(&comboPtr->entryTable);
-
-    Blt_PoolDestroy(comboPtr->entryPool);
-    DestroyIcons(comboPtr);
-    DestroyStyles(comboPtr);
-    Blt_Free(comboPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarEventProc --
- *
- *	This procedure is invoked by the Tk event handler when StructureNotify
- *	events occur in a scrollbar managed by the widget.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollbarEventProc(
-    ClientData clientData,	/* Pointer to Entry structure for widget
-				 * referred to by eventPtr. */
-    XEvent *eventPtr)		/* Describes what just happened. */
-{
-    ComboTree *comboPtr = clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(comboPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (eventPtr->xany.window == Tk_WindowId(comboPtr->yScrollbar)) {
-	    comboPtr->yScrollbar = NULL;
-	} else if (eventPtr->xany.window == Tk_WindowId(comboPtr->xScrollbar)) {
-	    comboPtr->xScrollbar = NULL;
-	} 
-	comboPtr->flags |= LAYOUT_PENDING;;
-	EventuallyRedraw(comboPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarCustodyProc --
- *
- * 	This procedure is invoked when a scrollbar has been stolen by another
- * 	geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
-  *	Arranges for the combomenu to have its layout re-arranged at the next
- *	idle point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ScrollbarCustodyProc(
-    ClientData clientData,	/* Information about the combomenu. */
-    Tk_Window tkwin)		/* Scrollbar stolen by another geometry
-				 * manager. */
-{
-    ComboTree *comboPtr = (ComboTree *)clientData;
-
-    if (tkwin == comboPtr->yScrollbar) {
-	comboPtr->yScrollbar = NULL;
-	comboPtr->yScrollbarWidth = 0;
-    } else if (tkwin == comboPtr->xScrollbar) {
-	comboPtr->xScrollbar = NULL;
-	comboPtr->xScrollbarHeight = 0;
-    } else {
-	return;		
-    }
-    Tk_UnmaintainGeometry(tkwin, comboPtr->tkwin);
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for scrollbars managed
- *	by the combomenu.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the combomenu to have its layout re-computed and
- *	re-arranged at the next idle point.
- *
- * -------------------------------------------------------------------------- */
-/* ARGSUSED */
-static void
-ScrollbarGeometryProc(
-    ClientData clientData,	/* ComboTree widget record.  */
-    Tk_Window tkwin)		/* Scrollbar whose geometry has changed. */
-{
-    ComboTree *comboPtr = (ComboTree *)clientData;
-
-    comboPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(comboPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboTreeEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on treeview widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboTreeEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ComboTree *comboPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(comboPtr);
-	    Blt_PickCurrentItem(comboPtr->bindTable);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-	EventuallyRedraw(comboPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		comboPtr->flags |= FOCUS;
-	    } else {
-		comboPtr->flags &= ~FOCUS;
-	    }
-	    EventuallyRedraw(comboPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (comboPtr->tkwin != NULL) {
-	    comboPtr->tkwin = NULL;
-	}
-	if (comboPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayComboTree, comboPtr);
-	}
-	Tcl_EventuallyFree(comboPtr, DestroyComboTree);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboTreeInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If
- *	the widget isn't already in the process of being destroyed,
- *	this command destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComboTreeInstCmdDeleteProc(ClientData clientData)
-{
-    ComboTree *comboPtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin
-     * is NULL) or because the command was deleted, and then this
-     * procedure destroys the widget.
-     */
-    if (comboPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = comboPtr->tkwin;
-	comboPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureComboTree --
- *
- *	Updates the GCs and other information associated with the
- *	treeview widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- * 	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for comboPtr; old resources get freed, if there
- *	were any.  The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureComboTree(Tcl_Interp *interp, ComboTree *comboPtr, int objc, 
-		   Tcl_Obj *const *objv, int flags)	
-{
-    int updateNeeded;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    if (Blt_ConfigureWidgetFromObj(interp, comboPtr->tkwin, comboSpecs, 
-	objc, objv, (char *)comboPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (ConfigureStyle(interp, &comboPtr->defStyle, 0, NULL, 
-		       BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }	
-    /*
-     * GC for dotted vertical line.
-     */
-    gcMask = (GCForeground | GCLineWidth);
-    gcValues.foreground = comboPtr->lineColor->pixel;
-    gcValues.line_width = comboPtr->lineWidth;
-    if (comboPtr->dashes > 0) {
-	gcMask |= (GCLineStyle | GCDashList);
-	gcValues.line_style = LineOnOffDash;
-	gcValues.dashes = comboPtr->dashes;
-    }
-    newGC = Tk_GetGC(comboPtr->tkwin, gcMask, &gcValues);
-    if (comboPtr->lineGC != NULL) {
-	Tk_FreeGC(comboPtr->display, comboPtr->lineGC);
-    }
-    comboPtr->lineGC = newGC;
-
-    ConfigureButtons(comboPtr);
-    comboPtr->inset = comboPtr->borderWidth + INSET_PAD;
-
-    /*
-     * These options change the layout of the box.  Mark the widget for update.
-     */
-    if (Blt_ConfigModified(comboSpecs, "-font", "-linespacing", "-*width", 
-	"-height", "-hide*", "-tree", (char *)NULL)) {
-	comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    }
-    /*
-     * If the tree view was changed, mark all the nodes dirty (we'll be
-     * switching back to either the full path name or the label) and free the
-     * array representing the flattened view of the tree.
-     */
-    if (Blt_ConfigModified(comboSpecs, "-hideleaves", (char *)NULL)) {
-	Entry *ep;
-	
-	comboPtr->flags |= DIRTY;
-	/* Mark all entries dirty. */
-	for (ep = comboPtr->rootPtr; ep != NULL; ep = NextEntry(ep, 0)) {
-	    ep->flags |= ENTRY_DIRTY;
-	}
-    }
-    if ((comboPtr->reqHeight != Tk_ReqHeight(comboPtr->tkwin)) ||
-	(comboPtr->reqWidth != Tk_ReqWidth(comboPtr->tkwin))) {
-	Tk_GeometryRequest(comboPtr->tkwin, comboPtr->reqWidth, 
-		comboPtr->reqHeight);
-    }
-    if (Blt_ConfigModified(comboSpecs, "-tree", (char *)NULL)) {
-	DestroyEntries(comboPtr);
-	Blt_InitHashTableWithPool(&comboPtr->entryTable, BLT_ONE_WORD_KEYS);
-	if (Blt_Tree_Attach(interp, comboPtr->tree, comboPtr->treeName) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	comboPtr->flags |= REPOPULATE;
-    }	
-    /* If the tree object was changed, we need to setup the new one. */
-    if (comboPtr->flags & REPOPULATE) {
-	Blt_TreeNode root;
-
-	Blt_Tree_CreateEventHandler(comboPtr->tree, TREE_NOTIFY_ALL, 
-		TreeEventProc, comboPtr);
-	root = Blt_Tree_RootNode(comboPtr->tree);
-	/* Automatically add view-entry values to the new tree. */
-	Blt_Tree_Apply(root, CreateApplyProc, comboPtr);
-	comboPtr->rootPtr = NodeToEntry(comboPtr, root);
-	/* Automatically open the root node. */
-	if (OpenEntry(comboPtr, comboPtr->rootPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (comboPtr->flags & NEW_TAGS) {
-	    Blt_Tree_NewTagTable(comboPtr->tree);
-	}
-	comboPtr->flags &= ~REPOPULATE;
-    }
-
-    updateNeeded = FALSE;
-    /* Install the embedded scrollbars as needed.  We defer installing the
-     * scrollbars so the scrollbar widgets don't have to exist when they are
-     * specified by the -xscrollbar and -yscrollbar options respectively. The
-     * down-side is that errors found in the scrollbar name will be
-     * backgrounded. */
-    if (Blt_ConfigModified(comboSpecs, "-xscrollbar", (char *)NULL)) {
-	if (comboPtr->xScrollbar != NULL) {
-	    UnmanageScrollbar(comboPtr, comboPtr->xScrollbar);
-	    comboPtr->xScrollbar = NULL;
-	}
-	if ((comboPtr->flags & INSTALL_SCROLLBAR_X) == 0) {
-	    Tcl_DoWhenIdle(InstallXScrollbar, comboPtr);
-	    comboPtr->flags |= INSTALL_SCROLLBAR_X;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (Blt_ConfigModified(comboSpecs, "-yscrollbar", (char *)NULL)) {
-	if (comboPtr->yScrollbar != NULL) {
-	    UnmanageScrollbar(comboPtr, comboPtr->yScrollbar);
-	    comboPtr->yScrollbar = NULL;
-	}
-	if ((comboPtr->flags & INSTALL_SCROLLBAR_Y) == 0) {
-	    Tcl_DoWhenIdle(InstallYScrollbar, comboPtr);
-	    comboPtr->flags |= INSTALL_SCROLLBAR_Y;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (updateNeeded) {
-	if ((comboPtr->flags & UPDATE_PENDING) == 0) {
-	    Tcl_DoWhenIdle(ConfigureScrollbarsProc, comboPtr);
-	    comboPtr->flags |= UPDATE_PENDING;
-	}	    
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-
-#ifdef notdef
-static void
-PrintFlags(ComboTree *comboPtr, char *string)
-{    
-    fprintf(stderr, "%s: flags=", string);
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	fprintf(stderr, "layout ");
-    }
-    if (comboPtr->flags & REDRAW_PENDING) {
-	fprintf(stderr, "redraw ");
-    }
-    if (comboPtr->flags & SCROLLX) {
-	fprintf(stderr, "xscroll ");
-    }
-    if (comboPtr->flags & SCROLLY) {
-	fprintf(stderr, "yscroll ");
-    }
-    if (comboPtr->flags & FOCUS) {
-	fprintf(stderr, "focus ");
-    }
-    if (comboPtr->flags & DIRTY) {
-	fprintf(stderr, "dirty ");
-    }
-    if (comboPtr->flags & REDRAW_BORDERS) {
-	fprintf(stderr, "borders ");
-    }
-    if (comboPtr->flags & VIEWPORT) {
-	fprintf(stderr, "viewport ");
-    }
-    fprintf(stderr, "\n");
-}
-#endif
-
-static void
-FixMenuCoords(ComboTree *comboPtr, int *xPtr, int *yPtr)
-{
-    int x, y, w, h;
-    int screenWidth, screenHeight;
-    Tk_Window parent;
-
-    parent = Tk_Parent(comboPtr->tkwin);
-    screenWidth  = WidthOfScreen(Tk_Screen(comboPtr->tkwin));
-    screenHeight = HeightOfScreen(Tk_Screen(comboPtr->tkwin));
-
-    x = *xPtr, y = *yPtr;
-
-    /* Determine the size of the menu. */
-    w = Tk_Width(comboPtr->tkwin);
-    if (w <= 1) {
-	w = Tk_ReqWidth(comboPtr->tkwin);
-    }
-    h = Tk_Height(comboPtr->tkwin);
-    if (h <= 1) {
-	h = Tk_Height(comboPtr->tkwin);
-    }
-    if ((y + h) > screenHeight) {
-	y -= (Tk_Height(parent) + h); /* Flip to show menu above. */
-	if (y < 0) {
-	    y = 0;
-	}
-    }
-    if ((x + w) > screenWidth) {
-	x -= (Tk_Width(parent)); /* Flip to show menu on left side. */
-	if (x < 0) {
-	    x = 0;
-	}
-    }
-    *xPtr = x;
-    *yPtr = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeVisibleEntries --
- *
- *	The entries visible in the viewport (the widget's window) are
- *	inserted into the array of visible nodes.
- *
- * Results:
- *	Returns 1 if beyond the last visible entry, 0 otherwise.
- *
- * Side effects:
- *	The array of visible nodes is filled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ComputeVisibleEntries(ComboTree *comboPtr)
-{
-    int nSlots;
-    int maxX, maxY;
-    int xOffset, yOffset;
-    Entry *entryPtr;
-
-    xOffset = Blt_AdjustViewport(comboPtr->xOffset, comboPtr->worldWidth,
-	VPORTWIDTH(comboPtr), comboPtr->xScrollUnits, BLT_SCROLL_MODE_HIERBOX);
-    yOffset = Blt_AdjustViewport(comboPtr->yOffset, comboPtr->worldHeight, 
-	VPORTHEIGHT(comboPtr), comboPtr->yScrollUnits, BLT_SCROLL_MODE_HIERBOX);
-
-    if ((xOffset != comboPtr->xOffset) || (yOffset != comboPtr->yOffset)) {
-	comboPtr->yOffset = yOffset;
-	comboPtr->xOffset = xOffset;
-	comboPtr->flags |= VIEWPORT;
-    }
-    /* Allocate worst case number of slots for entry array. */
-    nSlots = (VPORTHEIGHT(comboPtr) / comboPtr->minHeight) + 3;
-    if (nSlots != comboPtr->nVisible) {
-	if (comboPtr->visibleEntries != NULL) {
-	    Blt_Free(comboPtr->visibleEntries);
-	}
-	comboPtr->visibleEntries = Blt_AssertCalloc(nSlots, sizeof(Entry *));
-    }
-    comboPtr->nVisible = 0;
-    comboPtr->visibleEntries[0] = NULL;
-
-    if (comboPtr->rootPtr->flags & ENTRY_HIDE) {
-	return TCL_OK;		/* Root node is hidden. */
-    }
-
-    /* Find the first node in the viewport. */
-    entryPtr = comboPtr->rootPtr;
-    while ((entryPtr->worldY + entryPtr->height) <= comboPtr->yOffset) {
-	for (entryPtr = LastChild(entryPtr, ENTRY_HIDE); entryPtr != NULL; 
-	     entryPtr = PrevSibling(entryPtr, ENTRY_HIDE)) {
-	    if (entryPtr->worldY <= comboPtr->yOffset) {
-		break;
-	    }
-	}
-	/*
-	 * If we can't find the starting node, then the view must be
-	 * scrolled down, but some nodes were deleted.  Reset the view
-	 * back to the top and try again.
-	 */
-	if (entryPtr == NULL) {
-	    if (comboPtr->yOffset == 0) {
-		return TCL_OK;	/* All entries are hidden. */
-	    }
-	    comboPtr->yOffset = 0;
-	    continue;
-	}
-    }
-
-    maxY = comboPtr->yOffset + VPORTHEIGHT(comboPtr);
-    maxX = 0;
-    while (entryPtr != NULL) {
-	int x;
-	int level;
-	
-	/*
-	 * Compute and save the entry's X-coordinate now that we know
-	 * the maximum level offset for the entire widget.
-	 */
-	level = Blt_Tree_NodeDepth(entryPtr->node);
-	entryPtr->worldX = LEVELX(level);
-	x = entryPtr->worldX + ICONWIDTH(level) + ICONWIDTH(level+1) + 
-	    entryPtr->width;
-	if (x > maxX) {
-	    maxX = x;
-	}
-	if (entryPtr->worldY >= maxY) {
-	    break;		/* Entry starts after viewport. */
-	}
-	comboPtr->visibleEntries[comboPtr->nVisible] = entryPtr;
-	comboPtr->nVisible++;
-	entryPtr = NextEntry(entryPtr, ENTRY_MASK);
-    }
-    comboPtr->visibleEntries[comboPtr->nVisible] = NULL;
-
-    /*
-     *-------------------------------------------------------------------------------
-     *
-     * Note:	It's assumed that the view port always starts at or over an 
-     *		entry.  Check that a change in the hierarchy (e.g. closing a
-     *		node) hasn't left the viewport beyond the last entry.  If so,
-     *		adjust the viewport to start on the last entry.
-     *
-     *-------------------------------------------------------------------------------
-     */
-    if (comboPtr->xOffset > (comboPtr->worldWidth - comboPtr->xScrollUnits)) {
-	comboPtr->xOffset = comboPtr->worldWidth - comboPtr->xScrollUnits;
-    }
-    if (comboPtr->yOffset > (comboPtr->worldHeight - comboPtr->yScrollUnits)) {
-	comboPtr->yOffset = comboPtr->worldHeight - comboPtr->yScrollUnits;
-    }
-    comboPtr->xOffset = Blt_AdjustViewport(comboPtr->xOffset, 
-	comboPtr->worldWidth, VPORTWIDTH(comboPtr), comboPtr->xScrollUnits, 
-	BLT_SCROLL_MODE_HIERBOX);
-    comboPtr->yOffset = Blt_AdjustViewport(comboPtr->yOffset,
-	comboPtr->worldHeight, VPORTHEIGHT(comboPtr), comboPtr->yScrollUnits,
-	BLT_SCROLL_MODE_HIERBOX);
-
-    comboPtr->flags &= ~DIRTY;
-    Blt_PickCurrentItem(comboPtr->bindTable);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEntryIcon --
- *
- * 	Selects the correct image for the entry's icon depending upon
- *	the current state of the entry: active/inactive normal/selected.  
- *
- *		active - normal
- *		active - selected
- *		inactive - normal
- *		inactive - selected
- *
- * Results:
- *	Returns the image for the icon.
- *
- *---------------------------------------------------------------------------
- */
-static Icon
-GetEntryIcon(ComboTree *comboPtr, Entry *entryPtr)
-{
-    Icon *icons;
-    Icon icon;
-
-    icons = entryPtr->stylePtr->icons;
-    icon = NULL;
-    if (icons != NULL) {	
-	icon = icons[0];	/* Open icon. */
-	if ((entryPtr->flags & ENTRY_CLOSED) && (icons[1] != NULL)) {
-	    icon = icons[1];	/* Closed icon. */
-	}
-    }
-    return icon;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * DrawButton --
- *
- * 	Draws a button for the given entry. The button is drawn
- * 	centered in the region immediately to the left of the origin
- * 	of the entry (computed in the layout routines). The height
- * 	and width of the button were previously calculated from the
- * 	average row height.
- *
- *		button height = entry height - (2 * some arbitrary padding).
- *		button width = button height.
- *
- *	The button may have a border.  The symbol (either a plus or
- *	minus) is slight smaller than the width or height minus the
- *	border.
- *
- *	    x,y origin of entry
- *
- *              +---+
- *              | + | icon label
- *              +---+
- *             closed
- *
- *           |----|----| horizontal offset
- *
- *              +---+
- *              | - | icon label
- *              +---+
- *              open
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawButton(
-    ComboTree *comboPtr,	/* Widget record containing the
-				 * attribute information for
-				 * buttons. */
-    Entry *entryPtr,		/* Entry. */
-    Drawable drawable,		/* Pixmap or window to draw into. */
-    int x, 
-    int y)
-{
-    Blt_Background bg;
-    Button *btnPtr = &comboPtr->button;
-    Icon icon;
-    int relief;
-    int width, height;
-
-    bg = (entryPtr == comboPtr->activeBtnPtr) 
-	? btnPtr->activeBg : btnPtr->normalBg;
-    relief = (entryPtr->flags & ENTRY_CLOSED) 
-	? btnPtr->closeRelief : btnPtr->openRelief;
-    if (relief == TK_RELIEF_SOLID) {
-	relief = TK_RELIEF_FLAT;
-    }
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y,
-	btnPtr->width, btnPtr->height, btnPtr->borderWidth, relief);
-
-    x += btnPtr->borderWidth;
-    y += btnPtr->borderWidth;
-    width = btnPtr->width - (2 * btnPtr->borderWidth);
-    height = btnPtr->height - (2 * btnPtr->borderWidth);
-
-    icon = NULL;
-    if (btnPtr->icons != NULL) {  /* Open or close button icon? */
-	icon = btnPtr->icons[0];
-	if (((entryPtr->flags & ENTRY_CLOSED) == 0) && 
-	    (btnPtr->icons[1] != NULL)) {
-	    icon = btnPtr->icons[1];
-	}
-    }
-    if (icon != NULL) {		/* Icon or rectangle? */
-	Tk_RedrawImage(IconImage(icon), 0, 0, width, height, drawable, x, y);
-    } else {
-	int top, bottom, left, right;
-	XSegment segments[6];
-	int count;
-	GC gc;
-
-	gc = (entryPtr == comboPtr->activeBtnPtr)
-	    ? btnPtr->activeGC : btnPtr->normalGC;
-	if (relief == TK_RELIEF_FLAT) {
-	    /* Draw the box outline */
-
-	    left = x - btnPtr->borderWidth;
-	    top = y - btnPtr->borderWidth;
-	    right = left + btnPtr->width - 1;
-	    bottom = top + btnPtr->height - 1;
-
-	    segments[0].x1 = left;
-	    segments[0].x2 = right;
-	    segments[0].y2 = segments[0].y1 = top;
-	    segments[1].x2 = segments[1].x1 = right;
-	    segments[1].y1 = top;
-	    segments[1].y2 = bottom;
-	    segments[2].x2 = segments[2].x1 = left;
-	    segments[2].y1 = top;
-	    segments[2].y2 = bottom;
-#ifdef WIN32
-	    segments[2].y2++;
-#endif
-	    segments[3].x1 = left;
-	    segments[3].x2 = right;
-	    segments[3].y2 = segments[3].y1 = bottom;
-#ifdef WIN32
-	    segments[3].x2++;
-#endif
-	}
-	top = y + height / 2;
-	left = x + BUTTON_IPAD;
-	right = x + width - BUTTON_IPAD;
-
-	segments[4].y1 = segments[4].y2 = top;
-	segments[4].x1 = left;
-	segments[4].x2 = right - 1;
-#ifdef WIN32
-	segments[4].x2++;
-#endif
-
-	count = 5;
-	if (entryPtr->flags & ENTRY_CLOSED) { /* Draw the vertical
-					       * line for the plus. */
-	    top = y + BUTTON_IPAD;
-	    bottom = y + height - BUTTON_IPAD;
-	    segments[5].y1 = top;
-	    segments[5].y2 = bottom - 1;
-	    segments[5].x1 = segments[5].x2 = x + width / 2;
-#ifdef WIN32
-	    segments[5].y2++;
-#endif
-	    count = 6;
-	}
-	XDrawSegments(comboPtr->display, drawable, gc, segments, count);
-    }
-}
-
-static int
-DrawComboIcon(ComboTree *comboPtr, Entry *entryPtr, Drawable drawable, int x, 
-	      int y)
-{
-    Icon icon;
-
-    icon = GetEntryIcon(comboPtr, entryPtr);
-    if (icon != NULL) {			/* Icon or default icon bitmap? */
-	int entryHeight;
-	int level;
-	int maxY;
-	int top, bottom;
-	int topInset, botInset;
-	int width, height;
-
-	level = Blt_Tree_NodeDepth(entryPtr->node);
-	entryHeight = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-		comboPtr->button.height);
-	height = IconHeight(icon);
-	width = IconWidth(icon);
-	if (comboPtr->flatView) {
-	    x += (ICONWIDTH(0) - width) / 2;
-	} else {
-	    x += (ICONWIDTH(level + 1) - width) / 2;
-	}	    
-	y += (entryHeight - height) / 2;
-	botInset = comboPtr->inset - INSET_PAD;
-	topInset = comboPtr->inset;
-	maxY = Tk_Height(comboPtr->tkwin) - botInset;
-	top = 0;
-	bottom = y + height;
-	if (y < topInset) {
-	    height += y - topInset;
-	    top = -y + topInset;
-	    y = topInset;
-	} else if (bottom >= maxY) {
-	    height = maxY - y;
-	}
-	Tk_RedrawImage(IconImage(icon), 0, top, width, height, drawable, x, y);
-    } 
-    return (icon != NULL);
-}
-
-static int
-DrawLabel(ComboTree *comboPtr, Entry *entryPtr, Drawable drawable, int x, int y,
-	  int maxLength)			
-{
-    const char *label;
-    int entryHeight;
-    int width, height;			/* Width and height of label. */
-
-    entryHeight = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-       comboPtr->button.height);
-
-    /* Includes padding, selection 3-D border, and focus outline. */
-    width = entryPtr->labelWidth;
-    height = entryPtr->labelHeight;
-
-    /* Center the label, if necessary, vertically along the entry row. */
-    if (height < entryHeight) {
-	y += (entryHeight - height) / 2;
-    }
-    x += LABEL_PADX;
-    y += LABEL_PADY;
-
-    label = GETLABEL(entryPtr);
-    if (label[0] != '\0') {
-	Style *stylePtr;
-	TextStyle ts;
-	XColor *color;
-
-	stylePtr = entryPtr->stylePtr;
-	if (entryPtr == comboPtr->activePtr) {
-	    color = stylePtr->labelActiveColor;
-	} else {
-	    color = stylePtr->labelNormalColor;
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, stylePtr->labelFont);
-	Blt_Ts_SetForeground(ts, color);
-	Blt_Ts_DrawLayout(comboPtr->tkwin, drawable, entryPtr->textPtr, &ts, 
-		x, y, maxLength);
-	if (entryPtr == comboPtr->activePtr) {
-	    Blt_Ts_UnderlineLayout(comboPtr->tkwin, drawable, entryPtr->textPtr,
-		&ts, x, y, maxLength);
-	}
-    }
-    return entryHeight;
-}
-
-static void
-DrawEntryBackground(
-    ComboTree *comboPtr, 
-    Entry *entryPtr, 
-    Drawable drawable,
-    int x, int y, int w, int h)
-{
-    Blt_Background bg;
-    Style *stylePtr;
-    int relief;
-
-    stylePtr = entryPtr->stylePtr;
-    if (entryPtr == comboPtr->activePtr) {
-	bg = stylePtr->activeBg;
-	relief = stylePtr->activeRelief;
-    } else if ((stylePtr->altBg != NULL) && (entryPtr->seqNum & 0x1)) {
-	bg = stylePtr->altBg;
-	relief = stylePtr->relief;
-    } else {
-	bg = stylePtr->normalBg;
-	relief = stylePtr->relief;
-    }
-    /* This also fills the background where there are no entries. */
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, w, h, 
-	stylePtr->borderWidth, relief);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawEntry --
- *
- * 	Draws a button for the given entry.  Note that buttons should only be
- * 	drawn if the entry has sub-entries to be opened or closed.  It's the
- * 	responsibility of the calling routine to ensure this.
- *
- *	The button is drawn centered in the region immediately to the left of
- *	the origin of the entry (computed in the layout routines). The height
- *	and width of the button were previously calculated from the average
- *	row height.
- *
- *		button height = entry height - (2 * some arbitrary padding).
- *		button width = button height.
- *
- *	The button has a border.  The symbol (either a plus or minus) is
- *	slight smaller than the width or height minus the border.
- *
- *	    x,y origin of entry
- *
- *              +---+
- *              | + | icon label
- *              +---+
- *             closed
- *
- *           |----|----| horizontal offset
- *
- *              +---+
- *              | - | icon label
- *              +---+
- *              open
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawEntry(ComboTree *comboPtr, Entry *entryPtr, Drawable drawable, 
-	  int x, int y, int w, int h)
-{
-    Button *btnPtr = &comboPtr->button;
-    int buttonY;
-    int level;
-    int xMax;
-    int x1, y1, x2, y2;
-    GC gc;
-
-    entryPtr->flags &= ~ENTRY_REDRAW;
-
-    if ((comboPtr->activePtr == entryPtr) && (y == 0)) {
-	gc = comboPtr->defStyle.labelActiveGC;
-    } else {
-	gc = comboPtr->lineGC;
-    }
-    level = Blt_Tree_NodeDepth(entryPtr->node);
-    w = ICONWIDTH(level);
-    h = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, btnPtr->height);
-
-    entryPtr->buttonX = (w - btnPtr->width) / 2;
-    entryPtr->buttonY = (h - btnPtr->height) / 2;
-
-    buttonY = y + entryPtr->buttonY;
-
-    x1 = x + (w / 2);
-    y1 = y2 = buttonY + (btnPtr->height / 2);
-    x2 = x1 + (ICONWIDTH(level) + ICONWIDTH(level + 1)) / 2;
-
-    if ((Blt_Tree_ParentNode(entryPtr->node) != NULL) && 
-	(comboPtr->lineWidth > 0)) {
-	/*
-	 * For every node except root, draw a horizontal line from the
-	 * vertical bar to the middle of the icon.
-	 */
-	XDrawLine(comboPtr->display, drawable, gc, x1, y1, x2, y2);
-    }
-    if (((entryPtr->flags & ENTRY_CLOSED) == 0) && (comboPtr->lineWidth > 0) &&
-	(entryPtr->vertLineLength > 0)) {
-	/*
-	 * Entry is open, draw vertical line.
-	 */
-	y2 = y1 + entryPtr->vertLineLength;
-	if (y2 > Tk_Height(comboPtr->tkwin)) {
-	    y2 = Tk_Height(comboPtr->tkwin); /* Clip line at window border. */
-	}
-	XDrawLine(comboPtr->display, drawable, gc, x2, y1, x2, y2);
-    }
-    if ((entryPtr->flags & ENTRY_BUTTON) && (entryPtr != comboPtr->rootPtr)) {
-	/*
-	 * Except for the root, draw a button for every entry that needs one.
-	 * The displayed button can be either an icon (Tk image) or a line
-	 * drawing (rectangle with plus or minus sign).
-	 */
-	DrawButton(comboPtr, entryPtr, drawable, x + entryPtr->buttonX,
-		y + entryPtr->buttonY);
-    }
-    x += ICONWIDTH(level);
-
-    if (!DrawComboIcon(comboPtr, entryPtr, drawable, x, y)) {
-	x -= (ICON_WIDTH * 2) / 3;
-    }
-    x += ICONWIDTH(level + 1) + 4;
-
-    /* Entry label. */
-    xMax = comboPtr->worldWidth;
-    DrawLabel(comboPtr, entryPtr, drawable, x, y, xMax - x);
-}
-
-static void
-DrawEntryBackgrounds(ComboTree *comboPtr, Drawable drawable)
-{
-    int x;
-    int width;
-    Entry **entryPtrPtr;
-
-    width = Tk_Width(comboPtr->tkwin);
-    x = comboPtr->inset;
-
-    /* This also fills the background where there are no entries. */
-    Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, 
-	comboPtr->defStyle.normalBg, x, 0, width, Tk_Height(comboPtr->tkwin), 
-	0, TK_RELIEF_FLAT);
-
-    for (entryPtrPtr = comboPtr->visibleEntries; *entryPtrPtr != NULL; 
-	 entryPtrPtr++) {
-	Blt_Background bg;
-	Style *stylePtr;
-	Entry *entryPtr;
-	int relief;
-	int y;
-
-	entryPtr = *entryPtrPtr;
-	stylePtr = entryPtr->stylePtr;
-	if (entryPtr == comboPtr->activePtr) {
-	    bg = stylePtr->activeBg;
-	    relief = stylePtr->activeRelief;
-	} else if ((stylePtr->altBg != NULL) && (entryPtr->seqNum & 0x1)) {
-	    bg = stylePtr->altBg;
-	    relief = stylePtr->relief;
-	} else {
-	    bg = stylePtr->normalBg;
-	    relief = stylePtr->relief;
-	}
-	y = SCREENY(comboPtr, entryPtr->worldY) - 1;
-	Blt_FillBackgroundRectangle(comboPtr->tkwin, drawable, bg, x, y, width, 
-		entryPtr->height + 1, stylePtr->borderWidth, relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawVerticals --
- *
- * 	Draws vertical lines for the ancestor nodes.  While the entry
- *	of the ancestor may not be visible, its vertical line segment
- *	does extent into the viewport.  So walk back up the hierarchy
- *	drawing lines until we get to the root.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Vertical lines are drawn for the ancestor nodes.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawVerticals(ComboTree *comboPtr, Entry *entryPtr, Drawable drawable,
-	      int xOffset, int yOffset)
-{ 
-    GC gc;
-
-    if ((comboPtr->activePtr == entryPtr) && (yOffset > 0)) {
-	gc = comboPtr->defStyle.labelActiveGC;
-    } else {
-	gc = comboPtr->lineGC;
-    }
-    while (entryPtr != comboPtr->rootPtr) {
-	entryPtr = ParentEntry(entryPtr);
-	if (entryPtr == NULL) {
-	    break;
-	}
-	if (entryPtr->vertLineLength > 0) {
-	    int level;
-	    int ax, ay, bx, by;
-	    int x, y;
-	    int height;
-
-	    /*
-	     * World X-coordinates aren't computed for entries that are
-	     * outside the view port.  So for each off-screen ancestor node
-	     * compute it here too.
-	     */
-	    level = Blt_Tree_NodeDepth(entryPtr->node);
-	    entryPtr->worldX = LEVELX(level);
-	    x = SCREENX(comboPtr, entryPtr->worldX) - xOffset;
-	    y = SCREENY(comboPtr, entryPtr->worldY) - yOffset;
-	    height = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-			  comboPtr->button.height);
-	    y += (height - comboPtr->button.height) / 2;
-	    ax = bx = x + ICONWIDTH(level) + ICONWIDTH(level + 1) / 2;
-	    ay = y + comboPtr->button.height / 2;
-	    by = ay + entryPtr->vertLineLength;
-	    if ((entryPtr == comboPtr->rootPtr) && 
-		(comboPtr->flags & HIDE_ROOT)) {
-		ay += entryPtr->height;
-	    }
-	    /*
-	     * Clip the line's Y-coordinates at the viewport's borders.
-	     */
-	    if (ay < 0) {
-		ay = (ay & 0x1);	/* Make sure the dotted line starts on 
-					 * the same even/odd pixel. */
-	    }
-	    if (by > Tk_Height(comboPtr->tkwin)) {
-		by = Tk_Height(comboPtr->tkwin);
-	    }
-	    if ((ay < Tk_Height(comboPtr->tkwin)) && (by > 0)) {
-		XDrawLine(comboPtr->display, drawable, gc, 
-			  ax, ay, bx, by);
-	    }
-	}
-    }
-}
-
-static void
-DrawComboTree(ComboTree *comboPtr, Drawable drawable)
-{
-    Entry **entryPtrPtr;
-
-    DrawEntryBackgrounds(comboPtr, drawable);
-
-    if ((comboPtr->lineWidth > 0) && (comboPtr->nVisible > 0)) { 
-	/* Draw all the vertical lines from topmost node. */
-	DrawVerticals(comboPtr, comboPtr->visibleEntries[0], drawable, 0, 0);
-    }
-    for (entryPtrPtr = comboPtr->visibleEntries; *entryPtrPtr != NULL; 
-	 entryPtrPtr++) {
-	int x, y, w, h;
-	Entry *entryPtr;
-
-	entryPtr = *entryPtrPtr;
-	x = SCREENX(comboPtr, entryPtr->worldX);
-	y = SCREENY(comboPtr, entryPtr->worldY);
-	w = ICONWIDTH(Blt_Tree_NodeDepth(entryPtr->node));
-	h = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-		 comboPtr->button.height);
-	DrawEntry(comboPtr, entryPtr, drawable, x, y, w, h);
-    }
-
-    /* Manage the geometry of the embedded scrollbars. */
-
-    if (comboPtr->yScrollbarWidth > 0) {
-	int x, y;
-	int yScrollbarHeight;
-
-	x = Tk_Width(comboPtr->tkwin) - comboPtr->borderWidth -
-	    comboPtr->yScrollbarWidth;
-	y = comboPtr->borderWidth;
-	yScrollbarHeight = Tk_Height(comboPtr->tkwin) - 
-	    comboPtr->xScrollbarHeight - 2 * comboPtr->borderWidth;
-	if ((Tk_Width(comboPtr->yScrollbar) != comboPtr->yScrollbarWidth) ||
-	    (Tk_Height(comboPtr->yScrollbar) != yScrollbarHeight) ||
-	    (x != Tk_X(comboPtr->yScrollbar)) || 
-	    (y != Tk_Y(comboPtr->yScrollbar))) {
-	    Tk_MoveResizeWindow(comboPtr->yScrollbar, x, y, 
-		comboPtr->yScrollbarWidth, yScrollbarHeight);
-	}
-	if (!Tk_IsMapped(comboPtr->yScrollbar)) {
-	    Tk_MapWindow(comboPtr->yScrollbar);
-	}
-    } else if ((comboPtr->yScrollbar != NULL) &&
-	       (Tk_IsMapped(comboPtr->yScrollbar))) {
-	Tk_UnmapWindow(comboPtr->yScrollbar);
-    }
-    if (comboPtr->xScrollbarHeight > 0) {
-	int x, y;
-	int xScrollbarWidth;
-
-	x = comboPtr->borderWidth;
-	y = Tk_Height(comboPtr->tkwin) - comboPtr->xScrollbarHeight - 
-	    comboPtr->borderWidth;
-	xScrollbarWidth = Tk_Width(comboPtr->tkwin) - 
-	    comboPtr->yScrollbarWidth - 2 * comboPtr->borderWidth;
-	if ((Tk_Width(comboPtr->xScrollbar) != xScrollbarWidth) ||
-	    (Tk_Height(comboPtr->xScrollbar) != comboPtr->xScrollbarHeight) ||
-	    (x != Tk_X(comboPtr->xScrollbar)) || 
-	    (y != Tk_Y(comboPtr->xScrollbar))) {
-	    Tk_MoveResizeWindow(comboPtr->xScrollbar, x, y, xScrollbarWidth,
-		comboPtr->xScrollbarHeight);
-	}
-	if (!Tk_IsMapped(comboPtr->xScrollbar)) {
-	    Tk_MapWindow(comboPtr->xScrollbar);
-	}
-    } else if ((comboPtr->xScrollbar != NULL) && 
-	       (Tk_IsMapped(comboPtr->xScrollbar))) {
-	Tk_UnmapWindow(comboPtr->xScrollbar);
-    }
-}
-
-static void
-DrawOuterBorders(ComboTree *comboPtr, Drawable drawable)
-{
-    /* Draw 3D border just inside of the focus highlight ring. */
-    if ((comboPtr->borderWidth > 0) && (comboPtr->relief != TK_RELIEF_FLAT)) {
-	Blt_DrawBackgroundRectangle(comboPtr->tkwin, drawable, 
-	    comboPtr->defStyle.normalBg, 0, 0, Tk_Width(comboPtr->tkwin),
-	   Tk_Height(comboPtr->tkwin), comboPtr->borderWidth, comboPtr->relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayEntry --
- *
- *	This procedure is invoked to display an entry in the combotree widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the entry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayEntry(ClientData clientData)
-{
-    Entry *entryPtr = clientData;
-    ComboTree *comboPtr;
-    Pixmap drawable;
-    int x, y, w, h, d, sy;
-
-#ifdef notdef
-    fprintf(stderr, "DisplayEntry (%s)\n", GETLABEL(entryPtr));
-#endif
-    comboPtr = entryPtr->comboPtr;
-
-    /* Create a pixmap the size of the window for double buffering. */
-    comboPtr = entryPtr->comboPtr;
-    w = VPORTWIDTH(comboPtr);
-    h = entryPtr->height;
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin),
-	w, h, Tk_Depth(comboPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    x = PIXMAPX(comboPtr, entryPtr->worldX);
-    y = PIXMAPY(comboPtr, entryPtr->worldY) + comboPtr->borderWidth;
-    DrawEntryBackground(comboPtr, entryPtr, drawable, 0, 0, w, h);
-    if ((comboPtr->lineWidth > 0) && (comboPtr->nVisible > 0)) { 
-	/* Draw all the vertical lines from topmost node. */
-	DrawVerticals(comboPtr, entryPtr, drawable, 
-		      comboPtr->borderWidth, 
-		      SCREENY(comboPtr, entryPtr->worldY));
-    }
-    DrawEntry(comboPtr, entryPtr, drawable, x, 0, w, h);
-    sy = 0;
-    d = comboPtr->borderWidth - y;
-    if (d > 0) {
-	h -= d;
-	sy = d;
-	y += d;
-    }
-    d = (y + h) - (Tk_Height(comboPtr->tkwin) - comboPtr->borderWidth);
-    if (d > 0) {
-	h -= d;
-    }
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin),
-	comboPtr->defStyle.labelNormalGC, 0, sy, w, h, comboPtr->borderWidth, y);
-    Tk_FreePixmap(comboPtr->display, drawable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Activate the specified entry (draw with active foreground/background).
- *	Only one entry may be active at one time, so the previously active
- *	entry is deactivated.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	The widget is eventually redraw.
- *
- *	.cm activate entry
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-
-    if (GetEntryFromObj(NULL, comboPtr, objv[2], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    if (comboPtr->activePtr == entryPtr) {
-	return TCL_OK;			/* Entry is already active. */
-    }
-    ActivateEntry(comboPtr, NULL);	/* Deactive the current active. */
-    if (entryPtr != NULL) {
-	ActivateEntry(comboPtr, entryPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	  .t bind entry sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ClientData object;
-    Entry *entryPtr;
-    const char *string;
-
-    /*
-     * Entries are selected by id only.  All other strings are interpreted as
-     * a binding tag.
-     */
-    string = Tcl_GetString(objv[2]);
-    if (isdigit(UCHAR(string[0]))) {
-	Blt_TreeNode node;
-	long inode;
-
-	if (Tcl_GetLongFromObj(comboPtr->interp, objv[2], &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(comboPtr->tree, inode);
-	object = NodeToEntry(comboPtr, node);
-    } else if (GetEntryFromObj(interp, comboPtr, objv[2], &entryPtr)==TCL_OK) {
-	if (entryPtr != NULL) {
-	    return TCL_OK;		/* Special id doesn't currently
-					 * exist. */
-	}
-	object = entryPtr;
-    } else {
-	/* Assume that this is a binding tag. */
-	object = EntryTag(comboPtr, string);
-    } 
-    return Blt_ConfigureBindingsFromObj(interp, comboPtr->bindTable, object, 
-	 objc - 3, objv + 3);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonActivateOp --
- *
- *	Selects the button to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonActivateOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Entry *oldPtr, *entryPtr;
-    const char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '\0') {
-	entryPtr = NULL;
-    } else if (GetEntryFromObj(interp, comboPtr, objv[3], &entryPtr) != TCL_OK){
-	return TCL_ERROR;
-    }
-    if ((entryPtr != NULL) && !(entryPtr->flags & ENTRY_BUTTON)) {
-	entryPtr = NULL;
-    }
-    oldPtr = comboPtr->activeBtnPtr;
-    comboPtr->activeBtnPtr = entryPtr;
-    if (!(comboPtr->flags & REDRAW_PENDING) && (entryPtr != oldPtr)) {
-	if ((oldPtr != NULL) && (oldPtr != comboPtr->rootPtr)) {
-#ifdef notdef
-	    DrawButton(comboPtr, oldPtr);
-#endif
-	}
-	if ((entryPtr != NULL) && (entryPtr != comboPtr->rootPtr)) {
-#ifdef notdef
-	    DrawButton(comboPtr, entryPtr);
-#endif
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonBindOp --
- *
- *	  .ct bind tag sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonBindOp(
-    ComboTree *comboPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    ClientData object;
-
-    /* Assume that this is a binding tag. */
-    object = ButtonTag(comboPtr, Tcl_GetString(objv[3]));
-    return Blt_ConfigureBindingsFromObj(interp, comboPtr->bindTable, object, 
-	objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonCgetOp(
-    ComboTree *comboPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, buttonSpecs, 
-	(char *)comboPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure the one of more entries in the
- * 	widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for comboPtr; old resources get freed, if there were any.  
- *
- *	  .ct button configure option value
- *
- *---------------------------------------------------------------------------
- */
-static int
-ButtonConfigureOp(
-    ComboTree *comboPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, buttonSpecs, 
-		(char *)comboPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, buttonSpecs, 
-		(char *)comboPtr, objv[3], 0);
-    }
-    iconsOption.clientData = comboPtr;
-    if (Blt_ConfigureWidgetFromObj(comboPtr->interp, comboPtr->tkwin, 
-	buttonSpecs, objc - 3, objv + 3, (char *)comboPtr, 
-	BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    ConfigureButtons(comboPtr);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonOp --
- *
- *	This procedure handles button operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec buttonOps[] =
-{
-    {"activate",  1, ButtonActivateOp,  4, 4, "entry",},
-    {"bind",      1, ButtonBindOp,      4, 6, "tagName ?sequence command?",},
-    {"cget",      2, ButtonCgetOp,      4, 4, "option",},
-    {"configure", 2, ButtonConfigureOp, 3, 0, "?option value?...",},
-    {"highlight", 1, ButtonActivateOp,  4, 4, "entry",},
-};
-
-static int nButtonOps = sizeof(buttonOps) / sizeof(Blt_OpSpec);
-
-static int
-ButtonOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    ComboTreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nButtonOps, buttonOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, comboSpecs,
-	(char *)comboPtr, objv[2], 0);
-}
-
-/*ARGSUSED*/
-static int
-CloseOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int recurse, result;
-    Entry *entryPtr;
-    EntryIterator iter;
-
-    recurse = FALSE;
-    if (objc > 2) {
-	const char *string;
-	int length;
-
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	if ((string[0] == '-') && (length > 1) && 
-	    (strncmp(string, "-recurse", length) == 0)) {
-	    objv++, objc--;
-	    recurse = TRUE;
-	}
-    }
-    if (GetEntryIterator(interp, comboPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	 entryPtr = NextTaggedEntry(&iter)) {
-	    
-	/*
-	 * Check if either the active entry is in this hierarchy.  Must move
-	 * it or disable it before we close the node.  Otherwise it may be
-	 * deleted by a TCL "close" script, and we'll be left pointing to a
-	 * bogus memory location.
-	 */
-	if ((comboPtr->activePtr != NULL) && 
-	    (Blt_Tree_IsAncestor(entryPtr->node, comboPtr->activePtr->node))) {
-	    comboPtr->activePtr = entryPtr;
-	}
-	if (recurse) {
-	    result = Apply(comboPtr, entryPtr, CloseEntry, 0);
-	} else {
-	    result = CloseEntry(comboPtr, entryPtr);
-	}
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}	
-    }
-    /* Closing a node may affect the visible entries and the the world layout
-     * of the entries. */
-    comboPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for comboPtr; old resources get freed, if there were any.  The
- *	widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, comboSpecs,
-		(char *)comboPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		comboSpecs, (char *)comboPtr, objv[2], 0);
-    } 
-    iconsOption.clientData = comboPtr;
-    if (ConfigureComboTree(interp, comboPtr, objc - 2, objv + 2, 
-	BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryActivateOp --
- *
- *	Selects the entry to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryActivateOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Entry *newPtr, *oldPtr;
-    const char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '\0') {
-	newPtr = NULL;
-    } else if (GetEntry(comboPtr, objv[3], &newPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    oldPtr = comboPtr->activePtr;
-    comboPtr->activePtr = newPtr;
-    if (((comboPtr->flags & REDRAW_PENDING) == 0) && (newPtr != oldPtr)) {
-	Drawable drawable;
-	int x, y;
-	
-	drawable = Tk_WindowId(comboPtr->tkwin);
-	if (oldPtr != NULL) {
-	    x = SCREENX(comboPtr, oldPtr->worldX) + 
-		ICONWIDTH(Blt_Tree_NodeDepth(oldPtr->node));
-	    y = SCREENY(comboPtr, oldPtr->worldY);
-	    oldPtr->flags |= ENTRY_ICON;
-	    DrawComboIcon(comboPtr, oldPtr, drawable, x, y);
-	}
-	if (newPtr != NULL) {
-	    x = SCREENX(comboPtr, newPtr->worldX) +
-		ICONWIDTH(Blt_Tree_NodeDepth(newPtr->node));
-	    y = SCREENY(comboPtr, newPtr->worldY);
-	    newPtr->flags |= ENTRY_ICON;
-	    DrawComboIcon(comboPtr, newPtr, drawable, x, y);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryCgetOp --
- *
- *	  .ct entry cget entry option
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryCgetOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-
-    if (GetEntry(comboPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, entrySpecs, 
-	(char *)entryPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure the one of more entries in the
- * 	widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for comboPtr; old resources get freed, if there were any.  The
- *	hypertext is redisplayed.
- *
- *	  .ct entry configure entry option value
- *
- *---------------------------------------------------------------------------
- */
-static int
-EntryConfigureOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    EntryIterator iter;
-    Entry *entryPtr;
-    
-    iconsOption.clientData = comboPtr;
-    uidOption.clientData = comboPtr;
-    
-    if (GetEntryIterator(interp, comboPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	 entryPtr = NextTaggedEntry(&iter)) {
-	if (objc == 4) {
-	    return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		entrySpecs, (char *)entryPtr, (Tcl_Obj *)NULL, 0);
-	} else if (objc == 5) {
-	    return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, 
-		entrySpecs, (char *)entryPtr, objv[4], 0);
-	} 
-	if (ConfigureEntry(comboPtr, entryPtr, objc, objv, 
-		BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    comboPtr->flags |= (DIRTY | LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryIsHiddenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryIsHiddenOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-    int bool;
-
-    if (GetEntry(comboPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = (entryPtr->flags & ENTRY_HIDE);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryIsOpenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryIsOpenOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-    int bool;
-
-    if (GetEntry(comboPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = ((entryPtr->flags & ENTRY_CLOSED) == 0);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryOp --
- *
- *	This procedure handles entry operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec entryOps[] =
-{
-    {"activate",  1, EntryActivateOp,  4, 4, "entry",},
-    {"cget",      2, EntryCgetOp,      5, 5, "entry option",},
-    {"configure", 2, EntryConfigureOp, 4, 0, 
-	"entry ?entry...? ?option value?...",},
-    {"highlight", 1, EntryActivateOp,  4, 4, "entry",},
-    {"ishidden",  3, EntryIsHiddenOp,  4, 4, "entry",},
-    {"isopen",    3, EntryIsOpenOp,    4, 4, "entry",},
-};
-static int nEntryOps = sizeof(entryOps) / sizeof(Blt_OpSpec);
-
-static int
-EntryOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ComboTreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nEntryOps, entryOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-ExactCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return (strcmp(name, pattern) == 0);
-}
-
-/*ARGSUSED*/
-static int
-GlobCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return Tcl_StringMatch(name, pattern);
-}
-
-static int
-RegexpCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return Tcl_RegExpMatch(interp, name, pattern);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *	Converts one or more node identifiers to its path component.  The path
- *	may be either the single entry name or the full path of the entry.
- *
- * Results:
- *	A standard TCL result.  The interpreter result will contain a list of
- *	the convert names.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int useFullName;
-    int i;
-    Tcl_DString d1, d2;
-    int count;
-
-    useFullName = FALSE;
-    if (objc > 2) {
-	const char *string;
-
-	string = Tcl_GetString(objv[2]);
-	if ((string[0] == '-') && (strcmp(string, "-full") == 0)) {
-	    useFullName = TRUE;
-	    objv++, objc--;
-	}
-    }
-    Tcl_DStringInit(&d1);	/* Result. */
-    Tcl_DStringInit(&d2);	/* Last element. */
-    count = 0;
-    for (i = 2; i < objc; i++) {
-	EntryIterator iter;
-	Entry *entryPtr;
-
-	if (GetEntryIterator(interp, comboPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = NextTaggedEntry(&iter)) {
-	    Tcl_DStringSetLength(&d2, 0);
-	    count++;
-	    if (entryPtr->node != NULL) {
-		if (useFullName) {
-		    GetFullName(comboPtr, entryPtr, &d2);
-		} else {
-		    Tcl_DStringAppend(&d2, Blt_Tree_NodeLabel(entryPtr->node),-1);
-		}
-		Tcl_DStringAppendElement(&d1, Tcl_DStringValue(&d2));
-	    }
-	}
-    }
-    /* This handles the single element list problem. */
-    if (count == 1) {
-	Tcl_DStringResult(interp, &d2);
-	Tcl_DStringFree(&d1);
-    } else {
-	Tcl_DStringResult(interp, &d1);
-	Tcl_DStringFree(&d2);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShowEntryApplyProc --
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ShowEntryApplyProc(ComboTree *comboPtr, Entry *entryPtr)
-{
-    entryPtr->flags &= ~ENTRY_HIDE;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HideEntryApplyProc --
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HideEntryApplyProc(ComboTree *comboPtr, Entry *entryPtr)
-{
-    entryPtr->flags |= ENTRY_HIDE;
-    return TCL_OK;
-}
-
-static void
-MapAncestors(ComboTree *comboPtr, Entry *entryPtr)
-{
-    while (entryPtr != comboPtr->rootPtr) {
-	entryPtr = ParentEntry(entryPtr);
-	if (entryPtr->flags & (ENTRY_CLOSED | ENTRY_HIDE)) {
-	    comboPtr->flags |= LAYOUT_PENDING;
-	    entryPtr->flags &= ~(ENTRY_CLOSED | ENTRY_HIDE);
-	} 
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapAncestorsApplyProc --
- *
- *	If a node in mapped, then all its ancestors must be mapped also.  This
- *	routine traverses upwards and maps each unmapped ancestor.  It's
- *	assumed that for any mapped ancestor, all it's ancestors will already
- *	be mapped too.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static int
-MapAncestorsApplyProc(ComboTree *comboPtr, Entry *entryPtr)
-{
-    /*
-     * Make sure that all the ancestors of this entry are mapped too.
-     */
-    while (entryPtr != comboPtr->rootPtr) {
-	entryPtr = ParentEntry(entryPtr);
-	if ((entryPtr->flags & (ENTRY_HIDE | ENTRY_CLOSED)) == 0) {
-	    break;		/* Assume ancestors are also mapped. */
-	}
-	entryPtr->flags &= ~(ENTRY_HIDE | ENTRY_CLOSED);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchAndApplyToTree --
- *
- *	Searches through the current tree and applies a procedure to matching
- *	nodes.  The search specification is taken from the following
- *	command-line arguments:
- *
- *      ?-exact? ?-glob? ?-regexp? ?-nonmatching?
- *      ?-data string?
- *      ?-name string?
- *      ?-full string?
- *      ?--?
- *      ?inode...?
- *
- * Results:
- *	A standard TCL result.  If the result is valid, and if the nonmatchPtr
- *	is specified, it returns a boolean value indicating whether or not the
- *	search was inverted.  This is needed to fix things properly for the
- *	"hide nonmatching" case.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SearchAndApplyToTree(ComboTree *comboPtr, Tcl_Interp *interp, int objc,
-		     Tcl_Obj *const *objv, ApplyProc *proc, int *nonMatchPtr)
-{
-    CompareProc *compareProc;
-    int invertMatch;		/* normal search mode (matching entries) */
-    const char *namePattern, *fullPattern;
-    int i;
-    int length;
-    int result;
-    const char *option, *pattern;
-    char c;
-    Blt_List options;
-    Entry *entryPtr;
-    Blt_ListNode node;
-    const char *string;
-    const char *withTag;
-    Tcl_Obj *objPtr;
-
-    options = Blt_List_Create(BLT_ONE_WORD_KEYS);
-    invertMatch = FALSE;
-    namePattern = fullPattern = NULL;
-    compareProc = ExactCompare;
-    withTag = NULL;
-
-    entryPtr = comboPtr->rootPtr;
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetStringFromObj(objv[i], &length);
-	if (string[0] != '-') {
-	    break;
-	}
-	option = string + 1;
-	length--;
-	c = option[0];
-	if ((c == 'e') && (strncmp(option, "exact", length) == 0)) {
-	    compareProc = ExactCompare;
-	} else if ((c == 'g') && (strncmp(option, "glob", length) == 0)) {
-	    compareProc = GlobCompare;
-	} else if ((c == 'r') && (strncmp(option, "regexp", length) == 0)) {
-	    compareProc = RegexpCompare;
-	} else if ((c == 'n') && (length > 1) &&
-	    (strncmp(option, "nonmatching", length) == 0)) {
-	    invertMatch = TRUE;
-	} else if ((c == 'f') && (strncmp(option, "full", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    fullPattern = Tcl_GetString(objv[i]);
-	} else if ((c == 'n') && (length > 1) && 
-		(strncmp(option, "name", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    namePattern = Tcl_GetString(objv[i]);
-	} else if ((c == 't') && (length > 1) && 
-		   (strncmp(option, "tag", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    withTag = Tcl_GetString(objv[i]);
-	} else if ((option[0] == '-') && (option[1] == '\0')) {
-	    break;
-	} else {
-	    /*
-	     * Verify that the switch is actually an entry configuration
-	     * option.
-	     */
-	    if (Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, entrySpecs, 
-		(char *)entryPtr, objv[i], 0) != TCL_OK) {
-		Tcl_ResetResult(interp);
-		Tcl_AppendResult(interp, "bad switch \"", string,
-	    "\": must be -exact, -glob, -regexp, -name, -full, or -nonmatching",
-		    (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    /* Save the option in the list of configuration options */
-	    node = Blt_List_GetNode(options, (char *)objv[i]);
-	    if (node == NULL) {
-		node = Blt_List_CreateNode(options, (char *)objv[i]);
-		Blt_List_AppendNode(options, node);
-	    }
-	    i++;
-	    Blt_List_SetValue(node, Tcl_GetString(objv[i]));
-	}
-    }
-
-    if ((namePattern != NULL) || (fullPattern != NULL) ||
-	(Blt_List_GetLength(options) > 0)) {
-	/*
-	 * Search through the tree and look for nodes that match the current
-	 * spec.  Apply the input procedure to each of the matching nodes.
-	 */
-	for (entryPtr = comboPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = NextEntry(entryPtr, 0)) {
-	    if (namePattern != NULL) {
-		result = (*compareProc) (interp, 
-			Blt_Tree_NodeLabel(entryPtr->node), namePattern);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    if (fullPattern != NULL) {
-		Tcl_DString ds;
-
-		GetFullName(comboPtr, entryPtr, &ds);
-		result = (*compareProc)(interp, Tcl_DStringValue(&ds), 
-			fullPattern);
-		Tcl_DStringFree(&ds);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    if (withTag != NULL) {
-		result = Blt_Tree_HasTag(comboPtr->tree, entryPtr->node, withTag);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    for (node = Blt_List_FirstNode(options); node != NULL;
-		node = Blt_List_NextNode(node)) {
-		objPtr = (Tcl_Obj *)Blt_List_GetKey(node);
-		Tcl_ResetResult(interp);
-		if (Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, 
-			entrySpecs, (char *)entryPtr, objPtr, 0) != TCL_OK) {
-		    return TCL_ERROR;	/* This shouldn't happen. */
-		}
-		pattern = Blt_List_GetValue(node);
-		objPtr = Tcl_GetObjResult(interp);
-		result = (*compareProc)(interp, Tcl_GetString(objPtr), pattern);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    /* Finally, apply the procedure to the node */
-	    (*proc)(comboPtr, entryPtr);
-	}
-	Tcl_ResetResult(interp);
-	Blt_List_Destroy(options);
-    }
-    /*
-     * Apply the procedure to nodes that have been specified individually.
-     */
-    for ( /*empty*/ ; i < objc; i++) {
-	EntryIterator iter;
-
-	if (GetEntryIterator(interp, comboPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = NextTaggedEntry(&iter)) {
-	    if ((*proc) (comboPtr, entryPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if (nonMatchPtr != NULL) {
-	*nonMatchPtr = invertMatch;	/* return "inverted search" status */
-    }
-    return TCL_OK;
-
-  missingArg:
-    Blt_List_Destroy(options);
-    Tcl_AppendResult(interp, "missing pattern for search option \"", objv[i],
-	"\"", (char *)NULL);
-    return TCL_ERROR;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HideOp --
- *
- *	Hides one or more nodes.  Nodes can be specified by their inode, or by
- *	matching a name or data value pattern.  By default, the patterns are
- *	matched exactly.  They can also be matched using glob-style and
- *	regular expression rules.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HideOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int status, nonmatching;
-
-    status = SearchAndApplyToTree(comboPtr, interp, objc, objv, 
-	HideEntryApplyProc, &nonmatching);
-
-    if (status != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * If this was an inverted search, scan back through the tree and make
-     * sure that the parents for all visible nodes are also visible.  After
-     * all, if a node is supposed to be visible, its parent can't be hidden.
-     */
-    if (nonmatching) {
-	Apply(comboPtr, comboPtr->rootPtr, MapAncestorsApplyProc, 0);
-    }
-
-    /* Hiding an entry only effects the visible nodes. */
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Converts one of more words representing indices of the entries in the
- *	treeview widget to their respective serial identifiers.
- *
- * Results:
- *	A standard TCL result.  Interp->result will contain the identifier of
- *	each inode found. If an inode could not be found, then the serial
- *	identifier will be the empty string.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-    long nodeId;
-
-    nodeId = -1;
-    if ((GetEntryFromObj(NULL, comboPtr, objv[2], &entryPtr) == TCL_OK) && 
-	(entryPtr != NULL)) {
-	nodeId = Blt_Tree_NodeId(entryPtr->node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), nodeId);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set.
- *
- *  .ct invoke entry 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InvokeOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int result;
-    Entry *entryPtr;
-
-    if (GetEntryFromObj(interp, comboPtr, objv[2], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (entryPtr == NULL) {
-	return TCL_OK;		/* Entry is currently disabled. */
-    }
-    result = TCL_OK;
-    Tcl_Preserve((ClientData)entryPtr);
-    if (comboPtr->iconVarObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-	Icon icon;
-
-	icon = GetEntryIcon(comboPtr, entryPtr);
-	objPtr = Tcl_NewStringObj(IconName(icon), -1);
-	if (Tcl_ObjSetVar2(interp, comboPtr->iconVarObjPtr, NULL, objPtr, 
-		TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (comboPtr->textVarObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-	Tcl_DString ds;
-
-	Tcl_DStringInit(&ds);
-	GetFullName(comboPtr, entryPtr, &ds);
-	objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), -1);
-	Tcl_DStringFree(&ds);
-	if (Tcl_ObjSetVar2(interp, comboPtr->textVarObjPtr, NULL, objPtr, 
-			   TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (entryPtr->cmdObjPtr != NULL) {
-	Tcl_IncrRefCount(entryPtr->cmdObjPtr);
-	result = Tcl_EvalObjEx(interp, entryPtr->cmdObjPtr, TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(entryPtr->cmdObjPtr);
-    }
-    Tcl_Release((ClientData)entryPtr);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-NearestOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Button *buttonPtr = &comboPtr->button;
-    int x, y;			/* Screen coordinates of the test point. */
-    Entry *entryPtr;
-    int isRoot;
-    const char *string;
-
-    isRoot = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    } 
-    if (objc < 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-		" ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-    if ((Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[2], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, comboPtr->tkwin, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (comboPtr->nVisible == 0) {
-	return TCL_OK;
-    }
-    if (isRoot) {
-	int rootX, rootY;
-
-	Tk_GetRootCoords(comboPtr->tkwin, &rootX, &rootY);
-	x -= rootX;
-	y -= rootY;
-    }
-    entryPtr = NearestEntry(comboPtr, x, y, TRUE);
-    if (entryPtr == NULL) {
-	return TCL_OK;
-    }
-    x = WORLDX(comboPtr, x);
-    y = WORLDY(comboPtr, y);
-    if (objc > 4) {
-	const char *where;
-	int labelX, labelY, depth;
-	Icon icon;
-
-	where = "";
-	if (entryPtr->flags & ENTRY_BUTTON) {
-	    int buttonX, buttonY;
-
-	    buttonX = entryPtr->worldX + entryPtr->buttonX;
-	    buttonY = entryPtr->worldY + entryPtr->buttonY;
-	    if ((x >= buttonX) && (x < (buttonX + buttonPtr->width)) &&
-		(y >= buttonY) && (y < (buttonY + buttonPtr->height))) {
-		where = "button";
-		goto done;
-	    }
-	} 
-	depth = Blt_Tree_NodeDepth(entryPtr->node);
-
-	icon = GetEntryIcon(comboPtr, entryPtr);
-	if (icon != NULL) {
-	    int iconWidth, iconHeight, entryHeight;
-	    int iconX, iconY;
-	    
-	    entryHeight = MAX(entryPtr->iconHeight, comboPtr->button.height);
-	    iconHeight = IconHeight(icon);
-	    iconWidth = IconWidth(icon);
-	    iconX = entryPtr->worldX + ICONWIDTH(depth);
-	    iconY = entryPtr->worldY;
-	    iconX += (ICONWIDTH(depth + 1) - iconWidth) / 2;
-	    iconY += (entryHeight - iconHeight) / 2;
-	    if ((x >= iconX) && (x <= (iconX + iconWidth)) &&
-		(y >= iconY) && (y < (iconY + iconHeight))) {
-		where = "icon";
-		goto done;
-	    }
-	}
-	labelX = entryPtr->worldX + ICONWIDTH(depth);
-	labelY = entryPtr->worldY;
-	if (!comboPtr->flatView) {
-	    labelX += ICONWIDTH(depth + 1) + 4;
-	}	    
-	if ((x >= labelX) && (x < (labelX + entryPtr->labelWidth)) &&
-	    (y >= labelY) && (y < (labelY + entryPtr->labelHeight))) {
-	    where = "label";
-	}
-    done:
-	if (Tcl_SetVar(interp, Tcl_GetString(objv[4]), where, 
-		TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeId(entryPtr->node));
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpenOp --
- *
- *	Returns the node identifiers in a given range.
- *
- * .ct open ?-recurse? $entry 
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OpenOp(
-    ComboTree *comboPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int recurse, result;
-    Entry *entryPtr;
-    EntryIterator iter;
-
-    recurse = FALSE;
-    if (objc > 2) {
-	int length;
-	const char *string;
-
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	if ((string[0] == '-') && (length > 1) && 
-	    (strncmp(string, "-recurse", length) == 0)) {
-	    objv++, objc--;
-	    recurse = TRUE;
-	}
-    }
-    if (GetEntryIterator(interp, comboPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	 entryPtr = NextTaggedEntry(&iter)) {
-	if (recurse) {
-	    result = Apply(comboPtr, entryPtr, OpenEntry, 0);
-	} else {
-	    result = OpenEntry(comboPtr, entryPtr);
-	}
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* Make sure ancestors of this node aren't hidden. */
-	MapAncestors(comboPtr, entryPtr);
-    }
-    /*FIXME: This is only for flattened entries.  */
-    comboPtr->flags |= (LAYOUT_PENDING | DIRTY | SCROLL_PENDING);
-
-    /* Can't trust the selected entry if nodes have been added or deleted. So
-     * recompute the layout. */
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeComboGeometry(comboPtr);
-    } 
-    ComputeVisibleEntries(comboPtr);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostOp --
- *
- *	Posts this menu at the given root screen coordinates.
- *
- *  .cm post ?x y?
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    Tk_Window parent;
-    int menuWidth;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) || 
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	ComputeComboGeometry(comboPtr);
-    }
-    menuWidth = Tk_ReqWidth(comboPtr->tkwin);
-    parent = Tk_Parent(comboPtr->tkwin);
-    if (Tk_Width(parent) > menuWidth) {
-	menuWidth = Tk_Width(parent);
-    }
-    if (objc == 5) {
-	const char *string;
-
-	string = Tcl_GetString(objv[4]);
-	if (strcmp(string, "left") == 0) {
-	    /* Do nothing. */
-	} else if (strcmp(string, "right") == 0) {
-	    x -= menuWidth;
-	} else if (strcmp(string, "center") == 0) {
-	    x -= menuWidth / 2;
-	} else {
-	    Tcl_AppendResult(interp, "bad alignment value \"", string, 
-		"\": should be left, right, or center.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    FixMenuCoords(comboPtr, &x, &y);
-#ifdef notdef
-    int x, y;
-
-    if (objc == 4) {
-	if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) || 
-	    (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	    return TCL_ERROR;
-	} 
-    } else if (objc == 2) {
-	if (comboPtr->flags & LAYOUT_PENDING) {
-	    ComputeComboGeometry(comboPtr);
-	}
-	ComputeMenuCoords(comboPtr, TK_ANCHOR_SE, &x, &y);
-    } else {
-	Tcl_AppendResult(interp, "wrong # of args: should be \"", 
-		Tcl_GetString(objv[0]), " post ?x y?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tk_IsMapped(comboPtr->tkwin)) {
-	return TCL_OK;		/* This menu is already posted. */
-    }
-#endif
-    /*
-     * If there is a post command for the menu, execute it.  This may change
-     * the size of the menu, so be sure to recompute the menu's geometry if
-     * needed.
-     */
-    if (comboPtr->postCmdObjPtr != NULL) {
-	int result;
-
-	Tcl_IncrRefCount(comboPtr->postCmdObjPtr);
-	result = Tcl_EvalObjEx(interp, comboPtr->postCmdObjPtr,TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(comboPtr->postCmdObjPtr);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	/*
-	 * The post commands could have deleted the menu, which means we are
-	 * dead and should go away.
-	 */
-	if (comboPtr->tkwin == NULL) {
-	    return TCL_OK;
-	}
-	if (comboPtr->flags & LAYOUT_PENDING) {
-	    ComputeComboGeometry(comboPtr);
-	}
-    }
-
-    /*
-     * Adjust the position of the menu if necessary to keep it visible on the
-     * screen.  There are two special tricks to make this work right:
-     *
-     * 1. If a virtual root window manager is being used then
-     *    the coordinates are in the virtual root window of
-     *    menuPtr's parent;  since the menu uses override-redirect
-     *    mode it will be in the *real* root window for the screen,
-     *    so we have to map the coordinates from the virtual root
-     *    (if any) to the real root.  Can't get the virtual root
-     *    from the menu itself (it will never be seen by the wm)
-     *    so use its parent instead (it would be better to have an
-     *    an option that names a window to use for this...).
-     * 2. The menu may not have been mapped yet, so its current size
-     *    might be the default 1x1.  To compute how much space it
-     *    needs, use its requested size, not its actual size.
-     *
-     * Note that this code assumes square screen regions and all positive
-     * coordinates. This does not work on a Mac with multiple monitors. But
-     * then again, Tk has other problems with this.
-     */
-    {
-	int vx, vy, vw, vh;
-	int tmp;
-	Screen *screenPtr;
-
-	Tk_GetVRootGeometry(Tk_Parent(comboPtr->tkwin), &vx, &vy, &vw, &vh);
-	x += vx;
-	y += vy;
-	screenPtr = Tk_Screen(comboPtr->tkwin);
-	tmp = WidthOfScreen(screenPtr) - Tk_ReqWidth(comboPtr->tkwin);
-	if (x > tmp) {
-	    x = tmp;
-	}
-	if (x < 0) {
-	    x = 0;
-	}
-	tmp = HeightOfScreen(screenPtr) - Tk_ReqHeight(comboPtr->tkwin);
-	if (y > tmp) {
-	    y = tmp;
-	}
-	if (y < 0) {
-	    y = 0;
-	}
-	Tk_MoveToplevelWindow(comboPtr->tkwin, x, y);
-	Blt_MapToplevelWindow(comboPtr->tkwin);
-	if (!Tk_IsMapped(comboPtr->tkwin)) {
-	    Tk_MapWindow(comboPtr->tkwin);
-	}
-	Blt_MapToplevelWindow(comboPtr->tkwin);
-	Blt_RaiseToplevelWindow(comboPtr->tkwin);
-#ifdef notdef
-	TkWmRestackToplevel(comboPtr->tkwin, Above, NULL);
-#endif
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    char c;
-    int length;
-    int oper;
-    const char *string;
-    Tk_Window tkwin;
-
-#define SCAN_MARK	1
-#define SCAN_DRAGTO	2
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    tkwin = comboPtr->tkwin;
-    if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	oper = SCAN_MARK;
-    } else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	oper = SCAN_DRAGTO;
-    } else {
-	Tcl_AppendResult(interp, "bad scan operation \"", string,
-	    "\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Blt_GetPixelsFromObj(interp, tkwin, objv[3], PIXELS_ANY, &x) 
-	 != TCL_OK) ||
-	(Blt_GetPixelsFromObj(interp, tkwin, objv[4], PIXELS_ANY, &y) 
-	 != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (oper == SCAN_MARK) {
-	comboPtr->scanAnchorX = x;
-	comboPtr->scanAnchorY = y;
-	comboPtr->scanX = comboPtr->xOffset;
-	comboPtr->scanY = comboPtr->yOffset;
-    } else {
-	int worldX, worldY;
-	int viewWidth, viewHeight;
-	int dx, dy;
-
-	dx = comboPtr->scanAnchorX - x;
-	dy = comboPtr->scanAnchorY - y;
-	worldX = comboPtr->scanX + (10 * dx);
-	worldY = comboPtr->scanY + (10 * dy);
-
-	viewWidth = VPORTWIDTH(comboPtr);
-	if (worldX > (comboPtr->worldWidth - viewWidth)) {
-	    worldX = comboPtr->worldWidth - viewWidth;
-	}
-	if (worldX < 0) {
-	    worldX = 0;
-	}
-	viewHeight = VPORTHEIGHT(comboPtr);
-	if (worldY > (comboPtr->worldHeight - viewHeight)) {
-	    worldY = comboPtr->worldHeight - viewHeight;
-	}
-	if (worldY < 0) {
-	    worldY = 0;
-	}
-	comboPtr->xOffset = worldX;
-	comboPtr->yOffset = worldY;
-	comboPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(comboPtr);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SeeOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-    int width, height;
-    int x, y;
-    Tk_Anchor anchor;
-    int left, right, top, bottom;
-    const char *string;
-
-    string = Tcl_GetString(objv[2]);
-    anchor = TK_ANCHOR_W;	/* Default anchor is West */
-    if ((string[0] == '-') && (strcmp(string, "-anchor") == 0)) {
-	if (objc == 3) {
-	    Tcl_AppendResult(interp, "missing \"-anchor\" argument",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Tk_GetAnchorFromObj(interp, objv[3], &anchor) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	objc -= 2, objv += 2;
-    }
-    if (objc == 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", objv[0],
-	    "see ?-anchor anchor? entry\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetEntryFromObj(interp, comboPtr, objv[2], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (entryPtr == NULL) {
-	return TCL_OK;
-    }
-    if (entryPtr->flags & ENTRY_HIDE) {
-	MapAncestors(comboPtr, entryPtr);
-	comboPtr->flags |= SCROLL_PENDING;
-	/*
-	 * If the entry wasn't previously exposed, its world coordinates
-	 * aren't likely to be valid.  So re-compute the layout before we try
-	 * to see the viewport to the entry's location.
-	 */
-	ComputeComboGeometry(comboPtr);
-    }
-    width = VPORTWIDTH(comboPtr);
-    height = VPORTHEIGHT(comboPtr);
-
-    /*
-     * XVIEW:	If the entry is left or right of the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    left = comboPtr->xOffset;
-    right = comboPtr->xOffset + width;
-
-    switch (anchor) {
-    case TK_ANCHOR_W:
-    case TK_ANCHOR_NW:
-    case TK_ANCHOR_SW:
-	x = 0;
-	break;
-    case TK_ANCHOR_E:
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_SE:
-	x = entryPtr->worldX + entryPtr->width + 
-	    ICONWIDTH(Blt_Tree_NodeDepth(entryPtr->node)) - width;
-	break;
-    default:
-	if (entryPtr->worldX < left) {
-	    x = entryPtr->worldX;
-	} else if ((entryPtr->worldX + entryPtr->width) > right) {
-	    x = entryPtr->worldX + entryPtr->width - width;
-	} else {
-	    x = comboPtr->xOffset;
-	}
-	break;
-    }
-    /*
-     * YVIEW:	If the entry is above or below the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    top = comboPtr->yOffset;
-    bottom = comboPtr->yOffset + height;
-
-    switch (anchor) {
-    case TK_ANCHOR_N:
-	y = comboPtr->yOffset;
-	break;
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_NW:
-	y = entryPtr->worldY - (height / 2);
-	break;
-    case TK_ANCHOR_S:
-    case TK_ANCHOR_SE:
-    case TK_ANCHOR_SW:
-	y = entryPtr->worldY + entryPtr->height - height;
-	break;
-    default:
-	if (entryPtr->worldY < top) {
-	    y = entryPtr->worldY;
-	} else if ((entryPtr->worldY + entryPtr->height) > bottom) {
-	    y = entryPtr->worldY + entryPtr->height - height;
-	} else {
-	    y = comboPtr->yOffset;
-	}
-	break;
-    }
-    if ((y != comboPtr->yOffset) || (x != comboPtr->xOffset)) {
-	/* comboPtr->xOffset = x; */
-	comboPtr->yOffset = y;
-	comboPtr->flags |= SCROLL_PENDING;
-    }
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShowOp --
- *
- *	Mark one or more nodes to be exposed.  Nodes can be specified by their
- *	inode, or by matching a name or data value pattern.  By default, the
- *	patterns are matched exactly.  They can also be matched using
- *	glob-style and regular expression rules.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ShowOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (SearchAndApplyToTree(comboPtr, interp, objc, objv, ShowEntryApplyProc,
-	    (int *)NULL) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/* .m style create name option value option value */
-    
-static int
-StyleCreateOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&comboPtr->styleTable, Tcl_GetString(objv[3]),
-		&isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "combomenu style \"", Tcl_GetString(objv[3]),
-		"\" already exists.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    stylePtr = Blt_AssertCalloc(1, sizeof(Style));
-    stylePtr->name = Blt_GetHashKey(&comboPtr->styleTable, hPtr);
-    stylePtr->hPtr = hPtr;
-    stylePtr->comboPtr = comboPtr;
-    stylePtr->activeRelief = TK_RELIEF_RAISED;
-    Blt_SetHashValue(hPtr, stylePtr);
-    iconsOption.clientData = comboPtr;
-    if (ConfigureStyle(interp, stylePtr, objc - 4, objv + 4, 0) != TCL_OK) {
-	DestroyStyle(stylePtr);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-StyleCgetOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    iconsOption.clientData = comboPtr;
-    return Blt_ConfigureValueFromObj(interp, comboPtr->tkwin, styleSpecs,
-	(char *)stylePtr, objv[4], 0);
-}
-
-static int
-StyleConfigureOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int result, flags;
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    iconsOption.clientData = comboPtr;
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, styleSpecs, 
-		(char *)stylePtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, comboPtr->tkwin, styleSpecs, 
-		(char *)stylePtr, objv[2], flags);
-    }
-    Tcl_Preserve(stylePtr);
-    result = ConfigureStyle(interp, stylePtr, objc - 4, objv + 4, flags);
-    Tcl_Release(stylePtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-static int
-StyleDeleteOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Style *stylePtr;
-
-    if (GetStyleFromObj(interp, comboPtr, objv[3], &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (stylePtr->refCount > 0) {
-	Tcl_AppendResult(interp, "can't destroy combotree style \"", 
-			 stylePtr->name, "\": style in use.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    DestroyStyle(stylePtr);
-    return TCL_OK;
-}
-
-static int
-StyleNamesOp(
-    ComboTree *comboPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&comboPtr->styleTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Style *stylePtr;
-	int found;
-	int i;
-
-	found = TRUE;
-	stylePtr = Blt_GetHashValue(hPtr);
-	for (i = 3; i < objc; i++) {
-	    const char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    found = Tcl_StringMatch(stylePtr->name, pattern);
-	    if (found) {
-		break;
-	    }
-	}
-	if (found) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(stylePtr->name, -1));
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec styleOps[] =
-{
-    {"cget",        2, StyleCgetOp,        5, 5, "name option",},
-    {"configure",   2, StyleConfigureOp,   4, 0, "name ?option value?...",},
-    {"create",      2, StyleCreateOp,      4, 0, "name ?option value?...",},
-    {"delete",      1, StyleDeleteOp,      3, 0, "?name...?",},
-    {"names",       1, StyleNamesOp,       3, 0, "?pattern...?",},
-};
-
-static int nStyleOps = sizeof(styleOps) / sizeof(Blt_OpSpec);
-
-static int
-StyleOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ComboTreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nStyleOps, styleOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (comboPtr, interp, objc, objv);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-ToggleOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Entry *entryPtr;
-    EntryIterator iter;
-
-    if (GetEntryIterator(interp, comboPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (entryPtr = FirstTaggedEntry(&iter); entryPtr != NULL; 
-	 entryPtr = NextTaggedEntry(&iter)) {
-	if (entryPtr->flags & ENTRY_CLOSED) {
-	    OpenEntry(comboPtr, entryPtr);
-	} else {
-	    CloseEntry(comboPtr, entryPtr);
-	}
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostOp --
- *
- *	Unposts this menu.
- *
- *  .cm unpost 
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	return TCL_OK;			/* This menu is already unposted. */
-    }
-    if (Tk_IsMapped(comboPtr->tkwin)) {
-	Tk_UnmapWindow(comboPtr->tkwin);
-    }
-    return TCL_OK;
-}
-
-static int
-XViewOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int w, worldWidth;
-
-    w = VPORTWIDTH(comboPtr);
-    worldWidth = comboPtr->worldWidth;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	fract = (double)comboPtr->xOffset / worldWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	fract = (double)(comboPtr->xOffset + w) / worldWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &comboPtr->xOffset,
-	    worldWidth, w, comboPtr->xScrollUnits, BLT_SCROLL_MODE_HIERBOX) 
-	    != TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= SCROLLX;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-static int
-YViewOp(ComboTree *comboPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int h, worldHeight;
-
-    h = VPORTHEIGHT(comboPtr);
-    worldHeight = comboPtr->worldHeight;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/* Report first and last fractions */
-	fract = (double)comboPtr->yOffset / worldHeight;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	fract = (double)(comboPtr->yOffset + h) / worldHeight;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &comboPtr->yOffset,
-	    worldHeight, h, comboPtr->yScrollUnits, BLT_SCROLL_MODE_HIERBOX)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    comboPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(comboPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboTreeInstCmdProc --
- *
- * 	This procedure is invoked to process commands on behalf of the
- * 	treeview widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec comboOps[] =
-{
-    {"activate",  1, ActivateOp,  3, 3, "entry",},
-    {"bind",      2, BindOp,      3, 5, "tagName ?sequence command?",}, 
-    {"button",    2, ButtonOp,    2, 0, "args",},
-    {"cget",      2, CgetOp,      3, 3, "option",}, 
-    {"close",     2, CloseOp,     2, 4, "?-recurse? entry",}, 
-    {"configure", 3, ConfigureOp, 2, 0, "?option value?...",},
-    {"entry",     2, EntryOp,     2, 0, "oper args",},
-    {"get",       1, GetOp,       2, 0, "?-full? entry ?entry...?",},
-    {"hide",      1, HideOp,      2, 0, "?-exact|-glob|-regexp? ?-nonmatching? ?-name string? ?-full string? ?-data string? ?--? ?entry...?",},
-    {"index",     3, IndexOp,     3, 3, "entry",},
-    {"invoke",    3, InvokeOp,    3, 3, "entry",},
-    {"nearest",   1, NearestOp,   4, 5, "x y ?varName?",}, 
-    {"open",      1, OpenOp,      2, 4, "?-recurse? entry",}, 
-    {"post",      1, PostOp,      4, 5, "x y ?align?",},
-    {"scan",      2, ScanOp,      5, 5, "dragto|mark x y",},
-    {"see",       2, SeeOp,       3, 0, "?-anchor anchor? entry",},
-    {"show",      2, ShowOp,      2, 0, "?-exact? ?-glob? ?-regexp? ?-nonmatching? ?-name string? ?-full string? ?-data string? ?--? ?entry...?",},
-    {"style",     2, StyleOp,	  2, 0, "args",},
-    {"toggle",    2, ToggleOp,    3, 3, "entry",},
-    {"unpost",    1, UnpostOp,    2, 2, "",},
-    {"xview",     1, XViewOp,     2, 5, "?moveto fract? ?scroll number what?",},
-    {"yview",     1, YViewOp,     2, 5, "?moveto fract? ?scroll number what?",},
-};
-
-static int nComboOps = sizeof(comboOps) / sizeof(Blt_OpSpec);
-
-static int
-ComboTreeInstCmdProc(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Vector of argument strings. */
-{
-    ComboTreeCmdProc *proc;
-    ComboTree *comboPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nComboOps, comboOps, BLT_OP_ARG1, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(comboPtr);
-    result = (*proc) (comboPtr, interp, objc, objv);
-    Tcl_Release(comboPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayComboTree --
- *
- * 	This procedure is invoked to display the widget.
- *
- *      Recompute the layout of the text if necessary. This is
- *	necessary if the world coordinate system has changed.
- *	Specifically, the following may have occurred:
- *
- *	  1.  a text attribute has changed (font, linespacing, etc.).
- *	  2.  an entry's option changed, possibly resizing the entry.
- *
- *      This is deferred to the display routine since potentially
- *      many of these may occur.
- *
- *	Set the vertical and horizontal scrollbars.  This is done
- *	here since the window width and height are needed for the
- *	scrollbar calculations.
- *
- * Results:
- *	None.
- *
- * Side effects:
- * 	The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayComboTree(ClientData clientData)	/* Information about widget. */
-{
-    ComboTree *comboPtr = clientData;
-    Pixmap drawable; 
-
-    comboPtr->flags &= ~REDRAW_PENDING;
-    if (comboPtr->tkwin == NULL) {
-	return;			/* Window has been destroyed. */
-    }
-    if (comboPtr->rootPtr == NULL) {
-	fprintf(stderr, "no root to tree \n");
-	return;
-    }
-    if (comboPtr->flags & LAYOUT_PENDING) {
-	/*
-	 * Recompute the layout when entries are opened/closed,
-	 * inserted/deleted, or when text attributes change (such as
-	 * font, linespacing).
-	 */
-	ComputeComboGeometry(comboPtr);
-    }
-    if (comboPtr->flags & (SCROLL_PENDING | DIRTY)) {
-	/* 
-	 * Scrolling means that the view port has changed and that the
-	 * visible entries need to be recomputed.
-	 */
-	ComputeVisibleEntries(comboPtr);
-	if ((comboPtr->flags & SCROLLX) && (comboPtr->xScrollCmdObjPtr!=NULL)) {
-	    int w;
-		
-	    w = VPORTWIDTH(comboPtr);
-	    Blt_UpdateScrollbar(comboPtr->interp, comboPtr->xScrollCmdObjPtr,
-		comboPtr->xOffset, comboPtr->xOffset + w, comboPtr->worldWidth);
-	}
-	if ((comboPtr->flags & SCROLLY) && (comboPtr->yScrollCmdObjPtr!=NULL)) {
-	    int h;
-
-	    h = VPORTHEIGHT(comboPtr);
-	    Blt_UpdateScrollbar(comboPtr->interp, comboPtr->yScrollCmdObjPtr,
-		comboPtr->yOffset, comboPtr->yOffset + h, comboPtr->worldHeight);
-	}
-	comboPtr->flags &= ~SCROLL_PENDING;
-    }
-#ifdef notdef
-    if (comboPtr->reqWidth == 0) {
-	/* 
-	 * The first time through this routine, set the requested
-	 * width to the computed width.  All we want is to
-	 * automatically set the width of the widget, not dynamically
-	 * grow/shrink it as attributes change.
-	 */
-	comboPtr->reqWidth = comboPtr->worldWidth + 2 * comboPtr->inset;
-	Tk_GeometryRequest(comboPtr->tkwin, comboPtr->reqWidth, 
-		comboPtr->reqHeight);
-    }
-#endif
-    if (!Tk_IsMapped(comboPtr->tkwin)) {
-	return;
-    }
-    drawable = Tk_GetPixmap(comboPtr->display, Tk_WindowId(comboPtr->tkwin), 
-	Tk_Width(comboPtr->tkwin), Tk_Height(comboPtr->tkwin), 
-	Tk_Depth(comboPtr->tkwin));
-
-    comboPtr->flags |= VIEWPORT;
-    /* Clear the column background. */
-    DrawComboTree(comboPtr, drawable);
-    DrawOuterBorders(comboPtr, drawable);
-
-    /* Now copy the new view to the window. */
-    XCopyArea(comboPtr->display, drawable, Tk_WindowId(comboPtr->tkwin), 
-	comboPtr->lineGC, 0, 0, Tk_Width(comboPtr->tkwin), 
-	Tk_Height(comboPtr->tkwin), 0, 0);
-    Tk_FreePixmap(comboPtr->display, drawable);
-    comboPtr->flags &= ~VIEWPORT;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComboTreeObjCmdProc --
- *
- * 	This procedure is invoked to process the TCL command that
- * 	corresponds to a widget managed by this module. See the user
- * 	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ComboTreeObjCmdProc(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    ComboTree *comboPtr;
-    Tcl_CmdInfo cmdInfo;
-    XSetWindowAttributes attrs;
-    unsigned int mask;
-    int result;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    comboPtr = NewComboTree(interp, objv[1]);
-    if (comboPtr == NULL) {
-	goto error;
-    }
-
-    /*
-     * Source in the initialization script for treeview entries from
-     * "$blt_library/treeview.tcl".  We deferred sourcing the file until now
-     * so that the variable $blt_library could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::ComboTree::Initialize", &cmdInfo)) {
-	static char cmd[] = { 
-	    "source [file join $blt_library combotree.tcl]" 
-	};
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    goto error;
-	}
-    }
-    /* 
-     * Initialize the widget's configuration options here. The options need to
-     * be set first, so that entry, column, and style components can use them
-     * for their own GCs.
-     */
-    iconsOption.clientData = comboPtr;
-    if (Blt_ConfigureComponentFromObj(interp, comboPtr->tkwin, "button", 
-	"Button", buttonSpecs, 0, (Tcl_Obj **)NULL, (char *)comboPtr, 0) 
-	!= TCL_OK) {
-	goto error;
-    }
-    /* 
-     * Rebuild the widget's GC and other resources that are predicated by the
-     * widget's configuration options.  Do the same for the default column.
-     */
-    if (ConfigureComboTree(interp, comboPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	goto error;
-    }
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     */
-    {
-	Tcl_Obj *cmd[2];
-
-	cmd[0] = Tcl_NewStringObj("::blt::ComboTree::Initialize", -1);
-	cmd[1] = objv[1];
-	Tcl_IncrRefCount(cmd[0]);
-	Tcl_IncrRefCount(cmd[1]);
-	result = Tcl_EvalObjv(interp, 2, cmd, TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(cmd[1]);
-	Tcl_DecrRefCount(cmd[0]);
-	if (result != TCL_OK) {
-	    goto error;
-	}
-    }
-
-    attrs.override_redirect = True;
-    attrs.backing_store = WhenMapped;
-    attrs.save_under = True;
-    mask = (CWOverrideRedirect | CWSaveUnder | CWBackingStore);
-    Tk_ChangeWindowAttributes(comboPtr->tkwin, mask, &attrs);
-    Tk_MakeWindowExist(comboPtr->tkwin);
-
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(comboPtr->tkwin),-1);
-    return TCL_OK;
-  error:
-    if (comboPtr != NULL) {
-	Tk_DestroyWindow(comboPtr->tkwin);
-    }
-    return TCL_ERROR;
-}
-
-int
-Blt_ComboTreeInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "combotree", ComboTreeObjCmdProc, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_COMBOTREE */
diff --git a/blt3.0/src/bltConfig.c b/blt3.0/src/bltConfig.c
deleted file mode 100644
index c5a862a..0000000
--- a/blt3.0/src/bltConfig.c
+++ /dev/null
@@ -1,2550 +0,0 @@
-
-/* 
- * bltConfig.c --
- *
- * This file contains a Tcl_Obj based replacement for the widget
- * configuration functions in Tk.
- *
- *	Copyright (c) 1990-1994 The Regents of the University of California.
- *	Copyright (c) 1994-1997 Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and redistribution
- *	of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * This is a Tcl_Obj based replacement for the widget configuration
- * functions in Tk.  
- *
- * What not use the new Tk_Option interface?
- *
- *	There were design changes in the new Tk_Option interface that
- *	make it unwieldy.  
- *
- *	o You have to dynamically allocate, store, and deallocate
- *	  your option table.  
- *      o The Tk_FreeConfigOptions routine requires a tkwin argument.
- *	  Unfortunately, most widgets save the display pointer and 
- *	  de-reference their tkwin when the window is destroyed.  
- *	o There's no TK_CONFIG_CUSTOM functionality.  This means that
- *	  save special options must be saved as strings by 
- *	  Tk_ConfigureWidget and processed later, thus losing the 
- *	  benefits of Tcl_Objs.  It also make error handling 
- *	  problematic, since you don't pick up certain errors like 
- *	  
- *	    .widget configure -myoption bad -myoption good
- *        
- *	  You will never see the first "bad" value.
- *	o Especially compared to the former Tk_ConfigureWidget calls,
- *	  the new interface is overly complex.  If there was a big
- *	  performance win, it might be worth the effort.  But let's 
- *	  face it, this biggest wins are in processing custom options
- *	  values with thousands of elements.  Most common resources 
- *	  (font, color, etc) have string tokens anyways.
- *
- *	On the other hand, the replacement functions in this file fell
- *	into place quite easily both from the aspect of API writer and
- *	user.  The biggest benefit is that you don't need to change lots
- *	of working code just to get the benefits of Tcl_Objs.
- * 
- */
-
-#include "bltInt.h"
-
-#include <stdarg.h>
-#include "bltFont.h"
-#include "bltPicture.h"
-#include "bltBgStyle.h"
-
-#if (_TK_VERSION < _VERSION(8,1,0))
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_GetAnchorFromObj --
- *
- *	Return a Tk_Anchor value based on the value of the objPtr.
- *
- * Results:
- *	The return value is a standard TCL result. If an error occurs during
- *	conversion, an error message is left in the interpreter's result
- *	unless "interp" is NULL.
- *
- * Side effects:
- *	The object gets converted by Tcl_GetIndexFromObj.
- *
- *---------------------------------------------------------------------------
- */
-int
-Tk_GetAnchorFromObj(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Tcl_Obj *objPtr,		/* The object we are trying to get the 
-				 * value from. */
-    Tk_Anchor *anchorPtr)	/* Where to place the Tk_Anchor that
-				 * corresponds to the string value of
-				 * objPtr. */
-{
-    return Tk_GetAnchor(interp, Tcl_GetString(objPtr), anchorPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_GetJustifyFromObj --
- *
- *	Return a Tk_Justify value based on the value of the objPtr.
- *
- * Results:
- *	The return value is a standard TCL result. If an error occurs during
- *	conversion, an error message is left in the interpreter's result
- *	unless "interp" is NULL.
- *
- * Side effects:
- *	The object gets converted by Tcl_GetIndexFromObj.
- *
- *---------------------------------------------------------------------------
- */
-int
-Tk_GetJustifyFromObj(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Tcl_Obj *objPtr,		/* The object we are trying to get the 
-				 * value from. */
-    Tk_Justify *justifyPtr)	/* Where to place the Tk_Justify that
-				 * corresponds to the string value of
-				 * objPtr. */
-{
-    return Tk_GetJustify(interp, Tcl_GetString(objPtr), justifyPtr);
-}
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_GetReliefFromObj --
- *
- *	Return an integer value based on the value of the objPtr.
- *
- * Results:
- *	The return value is a standard TCL result. If an error occurs during
- *	conversion, an error message is left in the interpreter's result
- *	unless "interp" is NULL.
- *
- * Side effects:
- *	The object gets converted by Tcl_GetIndexFromObj.
- *
- *---------------------------------------------------------------------------
- */
-int
-Tk_GetReliefFromObj(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Tcl_Obj *objPtr,		/* The object we are trying to get the 
-				 * value from. */
-    int *reliefPtr)		/* Where to place the answer. */
-{
-    return Tk_GetRelief(interp, Tcl_GetString(objPtr), reliefPtr);
-}
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_GetMMFromObj --
- *
- *	Attempt to return an mm value from the TCL object "objPtr". If the
- *	object is not already an mm value, an attempt will be made to convert
- *	it to one.
- *
- * Results:
- *	The return value is a standard TCL object result. If an error occurs
- *	during conversion, an error message is left in the interpreter's
- *	result unless "interp" is NULL.
- *
- * Side effects:
- *	If the object is not already a pixel, the conversion will free
- *	any old internal representation. 
- *
- *---------------------------------------------------------------------------
- */
-int
-Tk_GetMMFromObj(
-    Tcl_Interp *interp, 	/* Used for error reporting if not NULL. */
-    Tk_Window tkwin,
-    Tcl_Obj *objPtr,		/* The object from which to get mms. */
-    double *doublePtr)		/* Place to store resulting millimeters. */
-{
-    return Tk_GetScreenMM(interp, tkwin, Tcl_GetString(objPtr), doublePtr);
-}
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_GetPixelsFromObj --
- *
- *	Attempt to return a pixel value from the TCL object "objPtr". If the
- *	object is not already a pixel value, an attempt will be made to convert
- *	it to one.
- *
- * Results:
- *	The return value is a standard TCL object result. If an error occurs
- *	during conversion, an error message is left in the interpreter's
- *	result unless "interp" is NULL.
- *
- * Side effects:
- *	If the object is not already a pixel, the conversion will free
- *	any old internal representation. 
- *
- *---------------------------------------------------------------------------
- */
-int
-Tk_GetPixelsFromObj(
-    Tcl_Interp *interp, 	/* Used for error reporting if not NULL. */
-    Tk_Window tkwin,
-    Tcl_Obj *objPtr,		/* The object from which to get pixels. */
-    int *intPtr)		/* Place to store resulting pixels. */
-{
-    return Tk_GetPixels(interp, tkwin, Tcl_GetString(objPtr), intPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_Alloc3DBorderFromObj --
- *
- *	Given a Tcl_Obj *, map the value to a corresponding
- *	Tk_3DBorder structure based on the tkwin given.
- *
- * Results:
- *	The return value is a token for a data structure describing a
- *	3-D border.  This token may be passed to procedures such as
- *	Blt_Draw3DRectangle and Tk_Free3DBorder.  If an error prevented
- *	the border from being created then NULL is returned and an error
- *	message will be left in the interp's result.
- *
- * Side effects:
- *	The border is added to an internal database with a reference
- *	count. For each call to this procedure, there should eventually
- *	be a call to FreeBorderObjProc so that the database is
- *	cleaned up when borders aren't in use anymore.
- *
- *---------------------------------------------------------------------------
- */
-Tk_3DBorder
-Tk_Alloc3DBorderFromObj(
-    Tcl_Interp *interp,		/* Interp for error results. */
-    Tk_Window tkwin,		/* Need the screen the border is used on.*/
-    Tcl_Obj *objPtr)		/* Object giving name of color for window
-				 * background. */
-{
-    return Tk_Get3DBorder(interp, tkwin, Tcl_GetString(objPtr));
-}
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_AllocBitmapFromObj --
- *
- *	Given a Tcl_Obj *, map the value to a corresponding
- *	Pixmap structure based on the tkwin given.
- *
- * Results:
- *	The return value is the X identifer for the desired bitmap
- *	(i.e. a Pixmap with a single plane), unless string couldn't be
- *	parsed correctly.  In this case, None is returned and an error
- *	message is left in the interp's result.  The caller should never
- *	modify the bitmap that is returned, and should eventually call
- *	Tk_FreeBitmapFromObj when the bitmap is no longer needed.
- *
- * Side effects:
- *	The bitmap is added to an internal database with a reference count.
- *	For each call to this procedure, there should eventually be a call
- *	to Tk_FreeBitmapFromObj, so that the database can be cleaned up 
- *	when bitmaps aren't needed anymore.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Tk_AllocBitmapFromObj(
-    Tcl_Interp *interp,		/* Interp for error results. This may 
-				 * be NULL. */
-    Tk_Window tkwin,		/* Need the screen the bitmap is used on.*/
-    Tcl_Obj *objPtr)		/* Object describing bitmap; see manual
-				 * entry for legal syntax of string value. */
-{
-    return Tk_GetBitmap(interp, tkwin, Tcl_GetString(objPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_AllocFontFromObj -- 
- *
- *	Given a string description of a font, map the description to a
- *	corresponding Blt_Font that represents the font.
- *
- * Results:
- *	The return value is token for the font, or NULL if an error
- *	prevented the font from being created.  If NULL is returned, an
- *	error message will be left in interp's result object.
- *
- * Side effects:
- * 	The font is added to an internal database with a reference
- *	count.  For each call to this procedure, there should eventually
- *	be a call to Blt_FreeFont() or Blt_FreeFontFromObj() so that the
- *	database is cleaned up when fonts aren't in use anymore.
- *
- *---------------------------------------------------------------------------
- */
-Tk_Font
-Tk_AllocFontFromObj(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For screen on which font will be used. */
-    Tcl_Obj *objPtr)		/* Object describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    return Tk_GetFont(interp, tkwin, Tcl_GetString(objPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_AllocCursorFromObj --
- *
- *	Given a Tcl_Obj *, map the value to a corresponding
- *	Tk_Cursor structure based on the tkwin given.
- *
- * Results:
- *	The return value is the X identifer for the desired cursor,
- *	unless objPtr couldn't be parsed correctly.  In this case,
- *	None is returned and an error message is left in the interp's result.
- *	The caller should never modify the cursor that is returned, and
- *	should eventually call Tk_FreeCursorFromObj when the cursor is no 
- *	longer needed.
- *
- * Side effects:
- *	The cursor is added to an internal database with a reference count.
- *	For each call to this procedure, there should eventually be a call
- *	to Tk_FreeCursorFromObj, so that the database can be cleaned up 
- *	when cursors aren't needed anymore.
- *
- *---------------------------------------------------------------------------
- */
-Tk_Cursor
-Tk_AllocCursorFromObj(
-    Tcl_Interp *interp,		/* Interp for error results. */
-    Tk_Window tkwin,		/* Window in which the cursor will be used.*/
-    Tcl_Obj *objPtr)		/* Object describing cursor; see manual
-				 * entry for description of legal
-				 * syntax of this obj's string rep. */
-{
-    return Tk_GetCursor(interp, tkwin, Tcl_GetString(objPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_AllocColorFromObj --
- *
- *	Given a Tcl_Obj *, map the value to a corresponding
- *	XColor structure based on the tkwin given.
- *
- * Results:
- *	The return value is a pointer to an XColor structure that
- *	indicates the red, blue, and green intensities for the color
- *	given by the string in objPtr, and also specifies a pixel value 
- *	to use to draw in that color.  If an error occurs, NULL is 
- *	returned and an error message will be left in interp's result
- *	(unless interp is NULL).
- *
- * Side effects:
- *	The color is added to an internal database with a reference count.
- *	For each call to this procedure, there should eventually be a call
- *	to Tk_FreeColorFromObj so that the database is cleaned up when colors
- *	aren't in use anymore.
- *
- *---------------------------------------------------------------------------
- */
-XColor *
-Tk_AllocColorFromObj(
-    Tcl_Interp *interp,		/* Used only for error reporting.  If NULL,
-				 * then no messages are provided. */
-    Tk_Window tkwin,		/* Window in which the color will be used.*/
-    Tcl_Obj *objPtr)		/* Object that describes the color; string
-				 * value is a color name such as "red" or
-				 * "#ff0000".*/
-{
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    return Tk_GetColor(interp, tkwin, Tk_GetUid(string));
-}
-#endif
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPositionFromObj --
- *
- *	Convert a string representing a numeric position.
- *	A position can be in one of the following forms.
- *
- * 	  number	- number of the item in the hierarchy, indexed
- *			  from zero.
- *	  "end"		- last position in the hierarchy.
- *
- * Results:
- *	A standard TCL result.  If "string" is a valid index, then
- *	*indexPtr is filled with the corresponding numeric index.
- *	If "end" was selected then *indexPtr is set to -1.
- *	Otherwise an error message is left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetPositionFromObj(
-    Tcl_Interp *interp,		/* Interpreter to report results back
-				 * to. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representation of the index.
-				 * Can be an integer or "end" to refer
-				 * to the last index. */
-    long *indexPtr)		/* Holds the converted index. */
-{
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-	*indexPtr = -1;		/* Indicates last position in hierarchy. */
-    } else {
-	long position;
-
-	if (Tcl_GetLongFromObj(interp, objPtr, &position) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (position < 0) {
-	    Tcl_AppendResult(interp, "bad position \"", string, "\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	*indexPtr = position;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPixelsFromObj --
- *
- *	Like Tk_GetPixelsFromObj, but checks for negative, zero.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetPixelsFromObj(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    Tcl_Obj *objPtr,
-    int check,			/* Can be PIXELS_POS, PIXELS_NNEG,
-				 * or PIXELS_ANY, */
-    int *valuePtr)
-{
-    int length;
-
-    if (Tk_GetPixelsFromObj(interp, tkwin, objPtr, &length) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (length >= SHRT_MAX) {
-	Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), 
-		 "\": too big to represent", (char *)NULL);
-	return TCL_ERROR;
-    }
-    switch (check) {
-    case PIXELS_NNEG:
-	if (length < 0) {
-	    Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), 
-		     "\": can't be negative", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-
-    case PIXELS_POS:
-	if (length <= 0) {
-	    Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), 
-		     "\": must be positive", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-
-    case PIXELS_ANY:
-	break;
-    }
-    *valuePtr = length;
-    return TCL_OK;
-}
-
-int
-Blt_GetPadFromObj(
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    Tcl_Obj *objPtr,		/* Pixel value string */
-    Blt_Pad *padPtr)
-{
-    int side1, side2;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc < 1) || (objc > 2)) {
-	Tcl_AppendResult(interp, "wrong # elements in padding list",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_GetPixelsFromObj(interp, tkwin, objv[0], PIXELS_NNEG, 
-	     &side1) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    side2 = side1;
-    if ((objc > 1) && 
-	(Blt_GetPixelsFromObj(interp, tkwin, objv[1], PIXELS_NNEG, 
-	      &side2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    /* Don't update the pad structure until we know both values are okay. */
-    padPtr->side1 = side1;
-    padPtr->side2 = side2;
-    return TCL_OK;
-}
-
-int
-Blt_GetStateFromObj(
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tcl_Obj *objPtr,		/* Pixel value string */
-    int *statePtr)
-{
-    char c;
-    const char *string;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "normal", length) == 0)) {
-	*statePtr = STATE_NORMAL;
-    } else if ((c == 'd') && (strncmp(string, "disabled", length) == 0)) {
-	*statePtr = STATE_DISABLED;
-    } else if ((c == 'a') && (strncmp(string, "active", length) == 0)) {
-	*statePtr = STATE_ACTIVE;
-    } else {
-	Tcl_AppendResult(interp, "bad state \"", string,
-	    "\": should be normal, active, or disabled", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-const char *
-Blt_NameOfState(int state)
-{
-    switch (state) {
-    case STATE_ACTIVE:
-	return "active";
-    case STATE_DISABLED:
-	return "disabled";
-    case STATE_NORMAL:
-	return "normal";
-    default:
-	return "???";
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NameOfFill --
- *
- *	Converts the integer representing the fill style into a string.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_NameOfFill(int fill)
-{
-    switch (fill) {
-    case FILL_X:
-	return "x";
-    case FILL_Y:
-	return "y";
-    case FILL_NONE:
-	return "none";
-    case FILL_BOTH:
-	return "both";
-    default:
-	return "unknown value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetFillFromObj --
- *
- *	Converts the fill style string into its numeric representation.
- *
- *	Valid style strings are:
- *
- *	  "none"   Use neither plane.
- * 	  "x"	   X-coordinate plane.
- *	  "y"	   Y-coordinate plane.
- *	  "both"   Use both coordinate planes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_GetFillFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *fillPtr)
-{
-    char c;
-    const char *string;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "none", length) == 0)) {
-	*fillPtr = FILL_NONE;
-    } else if ((c == 'x') && (strncmp(string, "x", length) == 0)) {
-	*fillPtr = FILL_X;
-    } else if ((c == 'y') && (strncmp(string, "y", length) == 0)) {
-	*fillPtr = FILL_Y;
-    } else if ((c == 'b') && (strncmp(string, "both", length) == 0)) {
-	*fillPtr = FILL_BOTH;
-    } else {
-	Tcl_AppendResult(interp, "bad argument \"", string,
-	    "\": should be \"none\", \"x\", \"y\", or \"both\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NameOfResize --
- *
- *	Converts the resize value into its string representation.
- *
- * Results:
- *	Returns a pointer to the static name string.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_NameOfResize(int resize)
-{
-    switch (resize & RESIZE_BOTH) {
-    case RESIZE_NONE:
-	return "none";
-    case RESIZE_EXPAND:
-	return "expand";
-    case RESIZE_SHRINK:
-	return "shrink";
-    case RESIZE_BOTH:
-	return "both";
-    default:
-	return "unknown resize value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetResizeFromObj --
- *
- *	Converts the resize string into its numeric representation.
- *
- *	Valid style strings are:
- *
- *	  "none"   
- * 	  "expand" 
- *	  "shrink" 
- *	  "both"   
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_GetResizeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *resizePtr)
-{
-    char c;
-    const char *string;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "none", length) == 0)) {
-	*resizePtr = RESIZE_NONE;
-    } else if ((c == 'b') && (strncmp(string, "both", length) == 0)) {
-	*resizePtr = RESIZE_BOTH;
-    } else if ((c == 'e') && (strncmp(string, "expand", length) == 0)) {
-	*resizePtr = RESIZE_EXPAND;
-    } else if ((c == 's') && (strncmp(string, "shrink", length) == 0)) {
-	*resizePtr = RESIZE_SHRINK;
-    } else {
-	Tcl_AppendResult(interp, "bad resize argument \"", string,
-	    "\": should be \"none\", \"expand\", \"shrink\", or \"both\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetDashesFromObj --
- *
- *	Converts a TCL list of dash values into a dash list ready for
- *	use with XSetDashes.
- *
- * 	A valid list dash values can have zero through 11 elements
- *	(PostScript limit).  Values must be between 1 and 255. Although
- *	a list of 0 (like the empty string) means no dashes.
- *
- * Results:
- *	A standard TCL result. If the list represented a valid dash
- *	list TCL_OK is returned and *dashesPtr* will contain the
- *	valid dash list. Otherwise, TCL_ERROR is returned and
- *	interp->result will contain an error message.
- *
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetDashesFromObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    Blt_Dashes *dashesPtr)
-{
-    const char *string;
-    char c;
-
-    string = Tcl_GetString(objPtr);
-    if (string == NULL) {
-	dashesPtr->values[0] = 0;
-	return TCL_OK;
-    }
-    c = string[0];
-    if (c == '\0') {
-	dashesPtr->values[0] = 0;
-    } else if ((c == 'd') && (strcmp(string, "dot") == 0)) {	
-	/* 1 */
-	dashesPtr->values[0] = 1;
-	dashesPtr->values[1] = 0;
-    } else if ((c == 'd') && (strcmp(string, "dash") == 0)) {	
-	/* 5 2 */
-	dashesPtr->values[0] = 5;
-	dashesPtr->values[1] = 2;
-	dashesPtr->values[2] = 0;
-    } else if ((c == 'd') && (strcmp(string, "dashdot") == 0)) { 
-	/* 2 4 2 */
- 	dashesPtr->values[0] = 2;
-	dashesPtr->values[1] = 4;
-	dashesPtr->values[2] = 2;
-	dashesPtr->values[3] = 0;
-    } else if ((c == 'd') && (strcmp(string, "dashdotdot") == 0)) { 
-	/* 2 4 2 2 */
-	dashesPtr->values[0] = 2;
-	dashesPtr->values[1] = 4;
-	dashesPtr->values[2] = 2;
-	dashesPtr->values[3] = 2;
-	dashesPtr->values[4] = 0;
-    } else {
-	int objc;
-	Tcl_Obj **objv;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (objc > 11) {	/* This is the postscript limit */
-	    Tcl_AppendResult(interp, "too many values in dash list \"", 
-			     string, "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (i = 0; i < objc; i++) {
-	    int value;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i], &value) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    /*
-	     * Backward compatibility:
-	     * Allow list of 0 to turn off dashes
-	     */
-	    if ((value == 0) && (objc == 1)) {
-		break;
-	    }
-	    if ((value < 1) || (value > 255)) {
-		Tcl_AppendResult(interp, "dash value \"", 
-			 Tcl_GetString(objv[i]), "\" is out of range", 
-			 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    dashesPtr->values[i] = (unsigned char)value;
-	}
-	/* Make sure the array ends with a NUL byte  */
-	dashesPtr->values[i] = 0;
-    }
-    return TCL_OK;
-}
-
-const char *
-Blt_NameOfSide(int side)
-{
-    switch (side) {
-    case SIDE_LEFT:
-	return "left";
-    case SIDE_RIGHT:
-	return "right";
-    case SIDE_BOTTOM:
-	return "bottom";
-    case SIDE_TOP:
-	return "top";
-    }
-    return "unknown side value";
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetSideFromObj --
- *
- *	Converts the fill style string into its numeric representation.
- *
- *	Valid style strings are "left", "right", "top", or  "bottom".
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED */
-int
-Blt_GetSideFromObj(
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tcl_Obj *objPtr,		/* Value string */
-    int *sidePtr)		/* (out) Token representing side:
-				 * either SIDE_LEFT, SIDE_RIGHT,
-				 * SIDE_TOP, or SIDE_BOTTOM. */
-{
-    char c;
-    const char *string;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'l') && (strncmp(string, "left", length) == 0)) {
-	*sidePtr = SIDE_LEFT;
-    } else if ((c == 'r') && (strncmp(string, "right", length) == 0)) {
-	*sidePtr = SIDE_RIGHT;
-    } else if ((c == 't') && (strncmp(string, "top", length) == 0)) {
-	*sidePtr = SIDE_TOP;
-    } else if ((c == 'b') && (strncmp(string, "bottom", length) == 0)) {
-	*sidePtr = SIDE_BOTTOM;
-    } else {
-	Tcl_AppendResult(interp, "bad side \"", string,
-	    "\": should be left, right, top, or bottom", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResetLimits --
- *
- *	Resets the limits to their default values.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResetLimits(Blt_Limits *limitsPtr) /* Limits to be imposed on the value */
-{
-    limitsPtr->flags = 0;
-    limitsPtr->min = LIMITS_MIN;
-    limitsPtr->max = LIMITS_MAX;
-    limitsPtr->nom = LIMITS_NOM;
-}
-
-int 
-Blt_GetLimitsFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, 
-		     Blt_Limits *limitsPtr)
-{
-    int values[3];
-    int nValues;
-    int limitsFlags;
-
-    /* Initialize limits to default values */
-    values[2] = LIMITS_NOM;
-    values[1] = LIMITS_MAX;
-    values[0] = LIMITS_MIN;
-    limitsFlags = 0;
-    nValues = 0;
-    if (objPtr != NULL) {
-	Tcl_Obj **objv;
-	int objc;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (objc > 3) {
-	    Tcl_AppendResult(interp, "wrong # limits \"", Tcl_GetString(objPtr),
-			     "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (i = 0; i < objc; i++) {
-	    const char *string;
-	    int size;
-
-	    string = Tcl_GetString(objv[i]);
-	    if (string[0] == '\0') {
-		continue;		/* Empty string: use default value */
-	    }
-	    limitsFlags |= (1 << i);
-	    if (Tk_GetPixelsFromObj(interp, tkwin, objv[i], &size) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if ((size < LIMITS_MIN) || (size > LIMITS_MAX)) {
-		Tcl_AppendResult(interp, "bad limit \"", string, "\"",
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    values[i] = size;
-	}
-	nValues = objc;
-    }
-    /*
-     * Check the limits specified.  We can't check the requested size of
-     * widgets.
-     */
-    switch (nValues) {
-    case 1:
-	limitsFlags |= (LIMITS_MIN_SET | LIMITS_MAX_SET);
-	values[1] = values[0];		/* Set minimum and maximum to value */
-	break;
-
-    case 2:
-	if (values[1] < values[0]) {
-	    Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-		"\": min > max", (char *)NULL);
-	    return TCL_ERROR;		/* Minimum is greater than maximum */
-	}
-	break;
-
-    case 3:
-	if (values[1] < values[0]) {
-	    Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-			     "\": min > max", (char *)NULL);
-	    return TCL_ERROR;		/* Minimum is greater than maximum */
-	}
-	if ((values[2] < values[0]) || (values[2] > values[1])) {
-	    Tcl_AppendResult(interp, "nominal value \"", Tcl_GetString(objPtr),
-		"\" out of range", (char *)NULL);
-	    return TCL_ERROR;		/* Nominal is outside of range defined
-					 * by minimum and maximum */
-	}
-	break;
-    }
-    limitsPtr->min = values[0];
-    limitsPtr->max = values[1];
-    limitsPtr->nom = values[2];
-    limitsPtr->flags = limitsFlags;
-    return TCL_OK;
-}
-
-/* Configuration option helper routines */
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoConfig --
- *
- *	This procedure applies a single configuration option
- *	to a widget record.
- *
- * Results:
- *	A standard TCL return value.
- *
- * Side effects:
- *	WidgRec is modified as indicated by specPtr and value.
- *	The old value is recycled, if that is appropriate for
- *	the value type.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DoConfig(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Tk_Window tkwin,		/* Window containing widget (needed to
-				 * set up X resources). */
-    Blt_ConfigSpec *sp,		/* Specifier to apply. */
-    Tcl_Obj *objPtr,		/* Value to use to fill in widgRec. */
-    char *widgRec)		/* Record whose fields are to be
-				 * modified.  Values must be properly
-				 * initialized. */
-{
-    char *ptr;
-    int objIsEmpty;
-
-    objIsEmpty = FALSE;
-    if (objPtr == NULL) {
-	objIsEmpty = TRUE;
-    } else if (sp->specFlags & BLT_CONFIG_NULL_OK) {
-	int length;
-
-	if (objPtr->bytes != NULL) {
-	    length = objPtr->length;
-	} else {
-	    Tcl_GetStringFromObj(objPtr, &length);
-	}
-	objIsEmpty = (length == 0);
-    }
-    do {
-	ptr = widgRec + sp->offset;
-	switch (sp->type) {
-	case BLT_CONFIG_ANCHOR: 
-	    {
-		Tk_Anchor anchor;
-		
-		if (Tk_GetAnchorFromObj(interp, objPtr, &anchor) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(Tk_Anchor *)ptr = anchor;
-	    }
-	    break;
-
-	case BLT_CONFIG_BITMAP: 
-	    {
-		Pixmap bitmap;
-		
-		if (objIsEmpty) {
-		    bitmap = None;
-		} else {
-		    bitmap = Tk_AllocBitmapFromObj(interp, tkwin, objPtr);
-		    if (bitmap == None) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Pixmap *)ptr != None) {
-		    Tk_FreeBitmap(Tk_Display(tkwin), *(Pixmap *)ptr);
-		}
-		*(Pixmap *)ptr = bitmap;
-	    }
-	    break;
-
-	case BLT_CONFIG_BOOLEAN: 
-	    {
-		int bool;
-		
-		if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = bool;
-	    }
-	    break;
-
-	case BLT_CONFIG_BORDER: 
-	    {
-		Tk_3DBorder border;
-
-		if (objIsEmpty) {
-		    border = NULL;
-		} else {
-		    border = Tk_Alloc3DBorderFromObj(interp, tkwin, objPtr);
-		    if (border == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Tk_3DBorder *)ptr != NULL) {
-		    Tk_Free3DBorder(*(Tk_3DBorder *)ptr);
-		}
-		*(Tk_3DBorder *)ptr = border;
-	    }
-	    break;
-
-	case BLT_CONFIG_CAP_STYLE: 
-	    {
-		int cap;
-		Tk_Uid uid;
-		
-		uid = Tk_GetUid(Tcl_GetString(objPtr));
-		if (Tk_GetCapStyle(interp, uid, &cap) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = cap;
-	    }
-	    break;
-
-	case BLT_CONFIG_COLOR: 
-	    {
-		XColor *color;
-		
-		if (objIsEmpty) {
-		    color = NULL;
-		} else {
-		    color = Tk_GetColor(interp, tkwin, 
-			Tk_GetUid(Tcl_GetString(objPtr)));
-		    if (color == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(XColor **)ptr != NULL) {
-		    Tk_FreeColor(*(XColor **)ptr);
-		}
-		*(XColor **)ptr = color;
-	    }
-	    break;
-
-	case BLT_CONFIG_CURSOR:
-	case BLT_CONFIG_ACTIVE_CURSOR: 
-	    {
-		Tk_Cursor cursor;
-		
-		if (objIsEmpty) {
-		    cursor = None;
-		} else {
-		    cursor = Tk_AllocCursorFromObj(interp, tkwin, objPtr);
-		    if (cursor == None) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Tk_Cursor *)ptr != None) {
-		    Tk_FreeCursor(Tk_Display(tkwin), *(Tk_Cursor *)ptr);
-		}
-		*(Tk_Cursor *)ptr = cursor;
-		if (sp->type == BLT_CONFIG_ACTIVE_CURSOR) {
-		    Tk_DefineCursor(tkwin, cursor);
-		}
-	    }
-	    break;
-
-	case BLT_CONFIG_CUSTOM: 
-	    if ((*sp->customPtr->parseProc)(sp->customPtr->clientData, interp, 
-		tkwin, objPtr, widgRec, sp->offset, sp->specFlags) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_DOUBLE: 
-	    {
-		double value;
-		
-		if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(double *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_FONT: 
-	    {
-		Blt_Font font;
-		
-		if (objIsEmpty) {
-		    font = NULL;
-		} else {
-		    font = Blt_AllocFontFromObj(interp, tkwin, objPtr);
-		    if (font == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Blt_Font *)ptr != NULL) {
-		    Blt_FreeFont(*(Blt_Font *)ptr);
-		}
-		*(Blt_Font *)ptr = font;
-	    }
-	    break;
-
-	case BLT_CONFIG_TK_FONT: 
-	    {
-		Tk_Font font;
-		
-		if (objIsEmpty) {
-		    font = NULL;
-		} else {
-		    font = Tk_AllocFontFromObj(interp, tkwin, objPtr);
-		    if (font == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Tk_Font *)ptr != NULL) {
-		    Tk_FreeFont(*(Tk_Font *)ptr);
-		}
-		*(Tk_Font *)ptr = font;
-	    }
-	    break;
-
-	case BLT_CONFIG_INT: 
-	    {
-		int value;
-		
-		if (Tcl_GetIntFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_JOIN_STYLE: 
-	    {
-		int join;
-		Tk_Uid uid;
-
-		uid = Tk_GetUid(Tcl_GetString(objPtr));
-		if (Tk_GetJoinStyle(interp, uid, &join) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = join;
-	    }
-	    break;
-
-	case BLT_CONFIG_JUSTIFY: 
-	    {
-		Tk_Justify justify;
-		
-		if (Tk_GetJustifyFromObj(interp, objPtr, &justify) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(Tk_Justify *)ptr = justify;
-	    }
-	    break;
-
-	case BLT_CONFIG_MM: 
-	    {
-		double value;
-
-		if (Tk_GetMMFromObj(interp, tkwin, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(double *)ptr = value;
-	    }
-	    break;
-
-
-	case BLT_CONFIG_RELIEF: 
-	    {
-		int relief;
-		
-		if (Tk_GetReliefFromObj(interp, objPtr, &relief) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = relief;
-	    }
-	    break;
-
-	case BLT_CONFIG_STRING: 
-	    {
-		char *value;
-		
-		value = (objIsEmpty) ? NULL : 
-		    Blt_AssertStrdup(Tcl_GetString(objPtr));
-		if (*(char **)ptr != NULL) {
-		    Blt_Free(*(char **)ptr);
-		}
-		*(char **)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_UID: 
-	    if (*(Blt_Uid *)ptr != NULL) {
-		Blt_FreeUid(*(Blt_Uid *)ptr);
-	    }
-	    if (objIsEmpty) {
-		*(Blt_Uid *)ptr = NULL;
-	    } else {
-		*(Blt_Uid *)ptr = Blt_GetUid(Tcl_GetString(objPtr));
-	    }
-	    break;
-
-	case BLT_CONFIG_WINDOW: 
-	    {
-		Tk_Window tkwin2;
-
-		if (objIsEmpty) {
-		    tkwin2 = None;
-		} else {
-		    const char *path;
-
-		    path = Tcl_GetString(objPtr);
-		    tkwin2 = Tk_NameToWindow(interp, path, tkwin);
-		    if (tkwin2 == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		*(Tk_Window *)ptr = tkwin2;
-	    }
-	    break;
-
-	case BLT_CONFIG_BITMASK: 
-	    {
-		int bool;
-		unsigned long mask, flags;
-
-		if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		mask = (unsigned long)sp->customPtr;
-		flags = *(int *)ptr;
-		flags &= ~mask;
-		if (bool) {
-		    flags |= mask;
-		}
-		*(int *)ptr = flags;
-	    }
-	    break;
-
-	case BLT_CONFIG_BITMASK_INVERT: 
-	    {
-		int bool;
-		unsigned long mask, flags;
-
-		if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		mask = (unsigned long)sp->customPtr;
-		flags = *(int *)ptr;
-		flags &= ~mask;
-		if (!bool) {
-		    flags |= mask;
-		}
-		*(int *)ptr = flags;
-	    }
-	    break;
-
-	case BLT_CONFIG_DASHES:
-	    if (Blt_GetDashesFromObj(interp, objPtr, (Blt_Dashes *)ptr) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-
-	case BLT_CONFIG_FILL:
-	    if (Blt_GetFillFromObj(interp, objPtr, (int *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_RESIZE:
-	    if (Blt_GetResizeFromObj(interp, objPtr, (int *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_FLOAT: 
-	    {
-		double value;
-		
-		if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(float *)ptr = (float)value;
-	    }
-	    break;
-
-	case BLT_CONFIG_INT_NNEG: 
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_NNEG, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = (int)value;
-	    }
-	    break;
-
-
-	case BLT_CONFIG_INT_POS: 
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_POS, &value) 
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = (int)value;
-	    }
-	    break;
-
-
-	case BLT_CONFIG_LIST: 
-	    {
-		const char **argv;
-		int argc;
-		
-		if (Tcl_SplitList(interp, Tcl_GetString(objPtr), &argc, &argv) 
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		if (*(char ***)ptr != NULL) {
-		    Blt_Free(*(char ***)ptr);
-		}
-		*(const char ***)ptr = argv;
-	    }
-	    break;
-
-	case BLT_CONFIG_LONG: 
-	    {
-		long value;
-		
-		if (Tcl_GetLongFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(long *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_LONG_NNEG: 
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_NNEG, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(long *)ptr = value;
-	    }
-	    break;
-
-
-	case BLT_CONFIG_LONG_POS: 
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_POS, &value) 
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(long *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_OBJ: 
-	    {
-		Tcl_IncrRefCount(objPtr);
-		if (*(Tcl_Obj **)ptr != NULL) {
-		    Tcl_DecrRefCount(*(Tcl_Obj **)ptr);
-		}
-		*(Tcl_Obj **)ptr = objPtr;
-	    }
-	    break;
-
-	case BLT_CONFIG_PAD:
-	    if (Blt_GetPadFromObj(interp, tkwin, objPtr, (Blt_Pad *)ptr) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_PIXELS_NNEG: 
-	    {
-		int value;
-		
-		if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, 
-			PIXELS_NNEG, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_PIXELS: 
-	    {
-		int value;
-		
-		if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, PIXELS_ANY, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_PIXELS_POS: 
-	    {
-		int value;
-		
-		if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, PIXELS_POS,
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = value;
-	    }
-	    break;
-
-	case BLT_CONFIG_STATE: 
-	    if (Blt_GetStateFromObj(interp, objPtr, (int *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_SIDE:
-	    if (Blt_GetSideFromObj(interp, objPtr, (int *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_CONFIG_BACKGROUND: 
-	    {
-		Blt_Background style;
-		
-		if (objIsEmpty) {
-		    style = NULL;
-		} else {
-		    style = Blt_GetBackgroundFromObj(interp, tkwin, objPtr);
-		    if (style == NULL) {
-			return TCL_ERROR;
-		    }
-		}
-		if (*(Blt_Background *)ptr != NULL) {
-		    Blt_FreeBackground(*(Blt_Background *)ptr);
-		}
-		*(Blt_Background *)ptr = style;
-	    }
-	    break;
-
-	case BLT_CONFIG_PIX32: 
-	    if (Blt_GetPixelFromObj(interp, objPtr, (Blt_Pixel *)ptr)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	default: 
-	    Tcl_AppendResult(interp, "bad config table: unknown type ", 
-			     Blt_Itoa(sp->type), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	sp++;
-    } while ((sp->switchName == NULL) && (sp->type != BLT_CONFIG_END));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FormatConfigValue --
- *
- *	This procedure formats the current value of a configuration
- *	option.
- *
- * Results:
- *	The return value is the formatted value of the option given
- *	by specPtr and widgRec.  If the value is static, so that it
- *	need not be freed, *freeProcPtr will be set to NULL;  otherwise
- *	*freeProcPtr will be set to the address of a procedure to
- *	free the result, and the caller must invoke this procedure
- *	when it is finished with the result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Tcl_Obj *
-FormatConfigValue(
-    Tcl_Interp *interp,		/* Interpreter for use in real conversions. */
-    Tk_Window tkwin,		/* Window corresponding to widget. */
-    Blt_ConfigSpec *sp,		/* Pointer to information describing option.
-				 * Must not point to a synonym option. */
-    char *widgRec)		/* Pointer to record holding current
-				 * values of info for widget. */
-{
-    char *ptr;
-    const char *string;
-
-    ptr = widgRec + sp->offset;
-    string = "";
-    switch (sp->type) {
-    case BLT_CONFIG_ANCHOR:
-	string = Tk_NameOfAnchor(*(Tk_Anchor *)ptr);
-	break;
-
-    case BLT_CONFIG_BITMAP: 
-	if (*(Pixmap *)ptr != None) {
-	    string = Tk_NameOfBitmap(Tk_Display(tkwin), *(Pixmap *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_BOOLEAN: 
-	return Tcl_NewBooleanObj(*(int *)ptr);
-
-    case BLT_CONFIG_BORDER: 
-	if (*(Tk_3DBorder *)ptr != NULL) {
-	    string = Tk_NameOf3DBorder(*(Tk_3DBorder *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_CAP_STYLE:
-	string = Tk_NameOfCapStyle(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_COLOR: 
-	if (*(XColor **)ptr != NULL) {
-	    string = Tk_NameOfColor(*(XColor **)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_CURSOR:
-    case BLT_CONFIG_ACTIVE_CURSOR:
-	if (*(Tk_Cursor *)ptr != None) {
-	    string = Tk_NameOfCursor(Tk_Display(tkwin), *(Tk_Cursor *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_CUSTOM:
-	return (*sp->customPtr->printProc)
-		(sp->customPtr->clientData, interp, tkwin, widgRec, 
-		sp->offset, sp->specFlags);
-
-    case BLT_CONFIG_DOUBLE: 
-	return Tcl_NewDoubleObj(*(double *)ptr);
-
-    case BLT_CONFIG_FONT: 
-	if (*(Blt_Font *)ptr != NULL) {
-	    string = Blt_NameOfFont(*(Blt_Font *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_TK_FONT: 
-	if (*(Tk_Font *)ptr != NULL) {
-	    string = Tk_NameOfFont(*(Tk_Font *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_INT: 
-	return Tcl_NewIntObj(*(int *)ptr);
-
-    case BLT_CONFIG_JOIN_STYLE:
-	string = Tk_NameOfJoinStyle(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_JUSTIFY:
-	string = Tk_NameOfJustify(*(Tk_Justify *)ptr);
-	break;
-
-    case BLT_CONFIG_MM:
-	return Tcl_NewDoubleObj(*(double *)ptr);
-
-    case BLT_CONFIG_PIXELS: 
-    case BLT_CONFIG_PIXELS_POS: 
-    case BLT_CONFIG_PIXELS_NNEG: 
-	return Tcl_NewIntObj(*(int *)ptr);
-
-    case BLT_CONFIG_RELIEF: 
-	string = Tk_NameOfRelief(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_STRING: 
-    case BLT_CONFIG_UID:
-	if (*(char **)ptr != NULL) {
-	    string = *(char **)ptr;
-	}
-	break;
-
-    case BLT_CONFIG_BITMASK:
-	{
-	    unsigned long flag;
-
-	    flag = (*(unsigned long *)ptr) & (unsigned long)sp->customPtr;
-	    return Tcl_NewBooleanObj((flag != 0));
-	}
-
-    case BLT_CONFIG_BITMASK_INVERT:
-	{
-	    unsigned long flag;
-
-	    flag = (*(unsigned long *)ptr) & (unsigned long)sp->customPtr;
-	    return Tcl_NewBooleanObj((flag == 0));
-	}
-
-    case BLT_CONFIG_DASHES: 
-	{
-	    unsigned char *p;
-	    Tcl_Obj *listObjPtr;
-	    Blt_Dashes *dashesPtr = (Blt_Dashes *)ptr;
-	    
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    for(p = dashesPtr->values; *p != 0; p++) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(*p));
-	    }
-	    return listObjPtr;
-	}
-
-    case BLT_CONFIG_INT_NNEG:
-    case BLT_CONFIG_INT_POS:
-	return Tcl_NewIntObj(*(int *)ptr);
-
-    case BLT_CONFIG_FILL: 
-	string = Blt_NameOfFill(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_RESIZE: 
-	string = Blt_NameOfResize(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_FLOAT: 
-	{
-	    double x = *(float *)ptr;
-	    return Tcl_NewDoubleObj(x);
-	}
-
-    case BLT_CONFIG_LIST: 
-	{
-	    Tcl_Obj *objPtr, *listObjPtr;
-	    char *const *p;
-	    
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    for (p = *(char ***)ptr; *p != NULL; p++) {
-		objPtr = Tcl_NewStringObj(*p, -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	    return listObjPtr;
-	}
-
-    case BLT_CONFIG_LONG: 
-	return Tcl_NewLongObj(*(long *)ptr);
-
-    case BLT_CONFIG_LONG_NNEG:
-    case BLT_CONFIG_LONG_POS:
-	return Tcl_NewLongObj(*(long *)ptr);
-
-    case BLT_CONFIG_OBJ:
-	if (*(Tcl_Obj **)ptr != NULL) {
-	    return *(Tcl_Obj **)ptr;
-	}
-	break;
-
-    case BLT_CONFIG_PAD: 
-	{
-	    Blt_Pad *padPtr = (Blt_Pad *)ptr;
-	    Tcl_Obj *objPtr, *listObjPtr;
-	    
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    objPtr = Tcl_NewIntObj(padPtr->side1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Tcl_NewIntObj(padPtr->side2);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    return listObjPtr;
-	}
-
-    case BLT_CONFIG_STATE: 
-	string = Blt_NameOfState(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_SIDE: 
-	string = Blt_NameOfSide(*(int *)ptr);
-	break;
-
-    case BLT_CONFIG_BACKGROUND: 
-	if (*(Blt_Background *)ptr != NULL) {
-	    string = Blt_NameOfBackground(*(Blt_Background *)ptr);
-	}
-	break;
-
-    case BLT_CONFIG_PIX32: 
-	string = Blt_NameOfPixel((Blt_Pixel *)ptr);
-	break;
-
-    default: 
-	string = "?? unknown type ??";
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FormatConfigInfo --
- *
- *	Create a valid TCL list holding the configuration information
- *	for a single configuration option.
- *
- * Results:
- *	A TCL list, dynamically allocated.  The caller is expected to
- *	arrange for this list to be freed eventually.
- *
- * Side effects:
- *	Memory is allocated.
- *
- *---------------------------------------------------------------------------
- */
-static Tcl_Obj *
-FormatConfigInfo(
-    Tcl_Interp *interp,		/* Interpreter to use for things
-				 * like floating-point precision. */
-    Tk_Window tkwin,		/* Window corresponding to widget. */
-    Blt_ConfigSpec *sp,		/* Pointer to information describing
-				 * option. */
-    char *widgRec)		/* Pointer to record holding current
-				 * values of info for widget. */
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (sp->switchName != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(sp->switchName, -1));
-    }  else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (sp->dbName != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr,  
-		Tcl_NewStringObj(sp->dbName, -1));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (sp->type == BLT_CONFIG_SYNONYM) {
-	return listObjPtr;
-    } 
-    if (sp->dbClass != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(sp->dbClass, -1));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (sp->defValue != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(sp->defValue, -1));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-	FormatConfigValue(interp, tkwin, sp, widgRec));
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindConfigSpec --
- *
- *	Search through a table of configuration specs, looking for
- *	one that matches a given switchName.
- *
- * Results:
- *	The return value is a pointer to the matching entry, or NULL
- *	if nothing matched.  In that case an error message is left
- *	in the interp's result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_ConfigSpec *
-FindConfigSpec(
-    Tcl_Interp *interp,		/* Used for reporting errors. */
-    Blt_ConfigSpec *specs,	/* Pointer to table of configuration
-				 * specifications for a widget. */
-    Tcl_Obj *objPtr,		/* Name (suitable for use in a "config"
-				 * command) identifying particular option. */
-    int needFlags,		/* Flags that must be present in matching
-				 * entry. */
-    int hateFlags)		/* Flags that must NOT be present in
-				 * matching entry. */
-{
-    Blt_ConfigSpec *matchPtr;	/* Matching spec, or NULL. */
-    Blt_ConfigSpec *sp;
-    const char *string;
-    char c;			/* First character of current argument. */
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[1];
-    matchPtr = NULL;
-    for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	if (sp->switchName == NULL) {
-	    continue;
-	}
-	if ((sp->switchName[1] != c) || 
-	    (strncmp(sp->switchName, string, length) != 0)) {
-	    continue;
-	}
-	if (((sp->specFlags & needFlags) != needFlags) || 
-	    (sp->specFlags & hateFlags)) {
-	    continue;
-	}
-	if (sp->switchName[length] == 0) {
-	    matchPtr = sp;
-	    goto gotMatch;
-	}
-	if (matchPtr != NULL) {
-	    if (interp != NULL) {
-	        Tcl_AppendResult(interp, "ambiguous option \"", string, "\"", 
-			(char *)NULL);
-            }
-	    return (Blt_ConfigSpec *)NULL;
-	}
-	matchPtr = sp;
-    }
-
-    if (matchPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown option \"", string, "\"", 
-		(char *)NULL);
-	}
-	return (Blt_ConfigSpec *)NULL;
-    }
-
-    /*
-     * Found a matching entry.  If it's a synonym, then find the
-     * entry that it's a synonym for.
-     */
-
- gotMatch:
-    sp = matchPtr;
-    if (sp->type == BLT_CONFIG_SYNONYM) {
-	for (sp = specs; /*empty*/; sp++) {
-	    if (sp->type == BLT_CONFIG_END) {
-		if (interp != NULL) {
-   		    Tcl_AppendResult(interp, 
-			"couldn't find synonym for option \"", string, "\"", 
-			(char *)NULL);
-		}
-		return (Blt_ConfigSpec *) NULL;
-	    }
-	    if ((sp->dbName == matchPtr->dbName) && 
-		(sp->type != BLT_CONFIG_SYNONYM) && 
-		((sp->specFlags & needFlags) == needFlags) && 
-		!(sp->specFlags & hateFlags)) {
-		break;
-	    }
-	}
-    }
-    return sp;
-}
-
-/* Public routines */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigureWidgetFromObj --
- *
- *	Process command-line options and database options to
- *	fill in fields of a widget record with resources and
- *	other parameters.
- *
- * Results:
- *	A standard TCL return value.  In case of an error,
- *	the interp's result will hold an error message.
- *
- * Side effects:
- *	The fields of widgRec get filled in with information
- *	from argc/argv and the option database.  Old information
- *	in widgRec's fields gets recycled.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ConfigureWidgetFromObj(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Tk_Window tkwin,		/* Window containing widget (needed to
-				 * set up X resources). */
-    Blt_ConfigSpec *specs,	/* Describes legal options. */
-    int objc,			/* Number of elements in argv. */
-    Tcl_Obj *const *objv,	/* Command-line options. */
-    char *widgRec,		/* Record whose fields are to be
-				 * modified.  Values must be properly
-				 * initialized. */
-    int flags)			/* Used to specify additional flags
-				 * that must be present in config specs
-				 * for them to be considered.  Also,
-				 * may have BLT_CONFIG_OBJV_ONLY set. */
-{
-    Blt_ConfigSpec *sp;
-    int needFlags;		/* Specs must contain this set of flags
-				 * or else they are not considered. */
-    int hateFlags;		/* If a spec contains any bits here, it's
-				 * not considered. */
-    int result;
-
-    if (tkwin == NULL) {
-	/*
-	 * Either we're not really in Tk, or the main window was destroyed and
-	 * we're on our way out of the application
-	 */
-	Tcl_AppendResult(interp, "NULL main window", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    needFlags = flags & ~(BLT_CONFIG_USER_BIT - 1);
-    if (Tk_Depth(tkwin) <= 1) {
-	hateFlags = BLT_CONFIG_COLOR_ONLY;
-    } else {
-	hateFlags = BLT_CONFIG_MONO_ONLY;
-    }
-
-    /*
-     * Pass one:  scan through all the option specs, replacing strings
-     * with Tk_Uid structs (if this hasn't been done already) and
-     * clearing the BLT_CONFIG_OPTION_SPECIFIED flags.
-     */
-
-    for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	if (!(sp->specFlags & INIT) && (sp->switchName != NULL)) {
-	    if (sp->dbName != NULL) {
-		sp->dbName = Tk_GetUid(sp->dbName);
-	    }
-	    if (sp->dbClass != NULL) {
-		sp->dbClass = Tk_GetUid(sp->dbClass);
-	    }
-	    if (sp->defValue != NULL) {
-		sp->defValue = Tk_GetUid(sp->defValue);
-	    }
-	}
-	sp->specFlags = (sp->specFlags & ~BLT_CONFIG_OPTION_SPECIFIED) | INIT;
-    }
-
-    /*
-     * Pass two:  scan through all of the arguments, processing those
-     * that match entries in the specs.
-     */
-    while (objc > 0) {
-	sp = FindConfigSpec(interp, specs, objv[0], needFlags, hateFlags);
-	if (sp == NULL) {
-	    return TCL_ERROR;
-	}
-
-	/* Process the entry.  */
-	if (objc < 2) {
-	    Tcl_AppendResult(interp, "value for \"", Tcl_GetString(objv[0]),
-		    "\" missing", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (DoConfig(interp, tkwin, sp, objv[1], widgRec) != TCL_OK) {
-	    char msg[100];
-
-	    sprintf_s(msg, 100, "\n    (processing \"%.40s\" option)",
-		    sp->switchName);
-	    Tcl_AddErrorInfo(interp, msg);
-	    return TCL_ERROR;
-	}
-	sp->specFlags |= BLT_CONFIG_OPTION_SPECIFIED;
-	objc -= 2, objv += 2;
-    }
-
-    /*
-     * Pass three:  scan through all of the specs again;  if no
-     * command-line argument matched a spec, then check for info
-     * in the option database.  If there was nothing in the
-     * database, then use the default.
-     */
-
-    if ((flags & BLT_CONFIG_OBJV_ONLY) == 0) {
-	Tcl_Obj *objPtr;
-
-	for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	    if ((sp->specFlags & BLT_CONFIG_OPTION_SPECIFIED) || 
-		(sp->switchName == NULL) || (sp->type == BLT_CONFIG_SYNONYM)) {
-		continue;
-	    }
-	    if (((sp->specFlags & needFlags) != needFlags) || 
-		(sp->specFlags & hateFlags)) {
-		continue;
-	    }
-	    objPtr = NULL;
-	    if (sp->dbName != NULL) {
-		Tk_Uid value;
-
-		/* If a resource name was specified, check if there's
-		 * also a value was associated with it.  This
-		 * overrides the default value. */
-		value = Tk_GetOption(tkwin, sp->dbName, sp->dbClass);
-		if (value != NULL) {
-		    objPtr = Tcl_NewStringObj(value, -1);
-		}
-	    }
-
-	    if (objPtr != NULL) {
-		Tcl_IncrRefCount(objPtr);
-		result = DoConfig(interp, tkwin, sp, objPtr, widgRec);
-		Tcl_DecrRefCount(objPtr);
-		if (result != TCL_OK) {
-		    char msg[200];
-    
-		    sprintf_s(msg, 200, 
-			"\n    (%s \"%.50s\" in widget \"%.50s\")",
-			"database entry for", sp->dbName, Tk_PathName(tkwin));
-		    Tcl_AddErrorInfo(interp, msg);
-		    return TCL_ERROR;
-		}
-	    } else if ((sp->defValue != NULL) && 
-		((sp->specFlags & BLT_CONFIG_DONT_SET_DEFAULT) == 0)) {
-
-		/* No resource value is found, use the default value. */
-		objPtr = Tcl_NewStringObj(sp->defValue, -1);
-		Tcl_IncrRefCount(objPtr);
-		result = DoConfig(interp, tkwin, sp, objPtr, widgRec);
-		Tcl_DecrRefCount(objPtr);
-		if (result != TCL_OK) {
-		    char msg[200];
-		    
-		    sprintf_s(msg, 200, 
-			"\n    (%s \"%.50s\" in widget \"%.50s\")",
-			"default value for", sp->dbName, Tk_PathName(tkwin));
-		    Tcl_AddErrorInfo(interp, msg);
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigureInfoFromObj --
- *
- *	Return information about the configuration options
- *	for a window, and their current values.
- *
- * Results:
- *	Always returns TCL_OK.  The interp's result will be modified
- *	hold a description of either a single configuration option
- *	available for "widgRec" via "specs", or all the configuration
- *	options available.  In the "all" case, the result will
- *	available for "widgRec" via "specs".  The result will
- *	be a list, each of whose entries describes one option.
- *	Each entry will itself be a list containing the option's
- *	name for use on command lines, database name, database
- *	class, default value, and current value (empty string
- *	if none).  For options that are synonyms, the list will
- *	contain only two values:  name and synonym name.  If the
- *	"name" argument is non-NULL, then the only information
- *	returned is that for the named argument (i.e. the corresponding
- *	entry in the overall list is returned).
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_ConfigureInfoFromObj(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Tk_Window tkwin,		/* Window corresponding to widgRec. */
-    Blt_ConfigSpec *specs,	/* Describes legal options. */
-    char *widgRec,		/* Record whose fields contain current
-				 * values for options. */
-    Tcl_Obj *objPtr,		/* If non-NULL, indicates a single option
-				 * whose info is to be returned.  Otherwise
-				 * info is returned for all options. */
-    int flags)			/* Used to specify additional flags
-				 * that must be present in config specs
-				 * for them to be considered. */
-{
-    Blt_ConfigSpec *sp;
-    Tcl_Obj *listObjPtr, *valueObjPtr;
-    const char *string;
-    int needFlags, hateFlags;
-
-    needFlags = flags & ~(BLT_CONFIG_USER_BIT - 1);
-    if (Tk_Depth(tkwin) <= 1) {
-	hateFlags = BLT_CONFIG_COLOR_ONLY;
-    } else {
-	hateFlags = BLT_CONFIG_MONO_ONLY;
-    }
-
-    /*
-     * If information is only wanted for a single configuration
-     * spec, then handle that one spec specially.
-     */
-
-    Tcl_SetResult(interp, (char *)NULL, TCL_STATIC);
-    if (objPtr != NULL) {
-	sp = FindConfigSpec(interp, specs, objPtr, needFlags, hateFlags);
-	if (sp == NULL) {
-	    return TCL_ERROR;
-	}
-	valueObjPtr =  FormatConfigInfo(interp, tkwin, sp, widgRec);
-	Tcl_SetObjResult(interp, valueObjPtr);
-	return TCL_OK;
-    }
-
-    /*
-     * Loop through all the specs, creating a big list with all
-     * their information.
-     */
-    string = NULL;		/* Suppress compiler warning. */
-    if (objPtr != NULL) {
-	string = Tcl_GetString(objPtr);
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	if ((objPtr != NULL) && (sp->switchName != string)) {
-	    continue;
-	}
-	if (((sp->specFlags & needFlags) != needFlags) || 
-	    (sp->specFlags & hateFlags)) {
-	    continue;
-	}
-	if (sp->switchName == NULL) {
-	    continue;
-	}
-	valueObjPtr = FormatConfigInfo(interp, tkwin, sp, widgRec);
-	Tcl_ListObjAppendElement(interp, listObjPtr, valueObjPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigureValueFromObj --
- *
- *	This procedure returns the current value of a configuration
- *	option for a widget.
- *
- * Results:
- *	The return value is a standard TCL completion code (TCL_OK or
- *	TCL_ERROR).  The interp's result will be set to hold either the value
- *	of the option given by objPtr (if TCL_OK is returned) or
- *	an error message (if TCL_ERROR is returned).
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ConfigureValueFromObj(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Tk_Window tkwin,		/* Window corresponding to widgRec. */
-    Blt_ConfigSpec *specs,	/* Describes legal options. */
-    char *widgRec,		/* Record whose fields contain current
-				 * values for options. */
-    Tcl_Obj *objPtr,		/* Gives the command-line name for the
-				 * option whose value is to be returned. */
-    int flags)			/* Used to specify additional flags
-				 * that must be present in config specs
-				 * for them to be considered. */
-{
-    Blt_ConfigSpec *sp;
-    int needFlags, hateFlags;
-
-    needFlags = flags & ~(BLT_CONFIG_USER_BIT - 1);
-    if (Tk_Depth(tkwin) <= 1) {
-	hateFlags = BLT_CONFIG_COLOR_ONLY;
-    } else {
-	hateFlags = BLT_CONFIG_MONO_ONLY;
-    }
-    sp = FindConfigSpec(interp, specs, objPtr, needFlags, hateFlags);
-    if (sp == NULL) {
-	return TCL_ERROR;
-    }
-    objPtr = FormatConfigValue(interp, tkwin, sp, widgRec);
-    Tcl_SetObjResult(interp, objPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeOptions --
- *
- *	Free up all resources associated with configuration options.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Any resource in widgRec that is controlled by a configuration
- *	option (e.g. a Tk_3DBorder or XColor) is freed in the appropriate
- *	fashion.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreeOptions(
-    Blt_ConfigSpec *specs,	/* Describes legal options. */
-    char *widgRec,		/* Record whose fields contain current
-				 * values for options. */
-    Display *display,		/* X display; needed for freeing some
-				 * resources. */
-    int needFlags)		/* Used to specify additional flags
-				 * that must be present in config specs
-				 * for them to be considered. */
-{
-    Blt_ConfigSpec *sp;
-
-    for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	char *ptr;
-
-	if ((sp->specFlags & needFlags) != needFlags) {
-	    continue;
-	}
-	ptr = widgRec + sp->offset;
-	switch (sp->type) {
-	case BLT_CONFIG_STRING:
-	    if (*((char **) ptr) != NULL) {
-		Blt_Free(*((char **) ptr));
-		*((char **) ptr) = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_COLOR:
-	    if (*((XColor **) ptr) != NULL) {
-		Tk_FreeColor(*((XColor **) ptr));
-		*((XColor **) ptr) = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_FONT:
-	    if (*((Blt_Font *) ptr) != None) {
-	        Blt_FreeFont(*((Blt_Font *) ptr));
-  	        *((Blt_Font *) ptr) = NULL;
-            }
-	    break;
-
-	case BLT_CONFIG_TK_FONT:
-	    if (*((Tk_Font *) ptr) != None) {
-	        Tk_FreeFont(*((Tk_Font *) ptr));
-  	        *((Tk_Font *) ptr) = NULL;
-            }
-	    break;
-
-	case BLT_CONFIG_BITMAP:
-	    if (*((Pixmap *) ptr) != None) {
-		Tk_FreeBitmap(display, *((Pixmap *) ptr));
-		*((Pixmap *) ptr) = None;
-	    }
-	    break;
-
-	case BLT_CONFIG_BORDER:
-	    if (*((Tk_3DBorder *) ptr) != NULL) {
-		Tk_Free3DBorder(*((Tk_3DBorder *) ptr));
-		*((Tk_3DBorder *) ptr) = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_CURSOR:
-	case BLT_CONFIG_ACTIVE_CURSOR:
-	    if (*((Tk_Cursor *) ptr) != None) {
-		Tk_FreeCursor(display, *((Tk_Cursor *) ptr));
-		*((Tk_Cursor *) ptr) = None;
-	    }
-	    break;
-
-	case BLT_CONFIG_OBJ:
-	    if (*(Tcl_Obj **)ptr != NULL) {
-		Tcl_DecrRefCount(*(Tcl_Obj **)ptr);
-		*(Tcl_Obj **)ptr = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_LIST:
-	    if (*((char ***) ptr) != NULL) {
-		Blt_Free(*((char ***) ptr));
-		*((char ***) ptr) = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_UID:
-	    if (*(Blt_Uid *)ptr != NULL) {
-		Blt_FreeUid(*(Blt_Uid *)ptr);
-		*(Blt_Uid *)ptr = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_BACKGROUND:
-	    if (*((Blt_Background *)ptr) != NULL) {
-		Blt_FreeBackground(*((Blt_Background *)ptr));
-		*((Blt_Background *)ptr) = NULL;
-	    }
-	    break;
-
-	case BLT_CONFIG_CUSTOM:
-	    if ((sp->customPtr->freeProc != NULL) && (*(char **)ptr != NULL)) {
-		(*sp->customPtr->freeProc)(sp->customPtr->clientData,
-			display, widgRec, sp->offset);
-	    }
-	    break;
-
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigModified --
- *
- *      Given the configuration specifications and one or more option
- *	patterns (terminated by a NULL), indicate if any of the matching
- *	configuration options has been reset.
- *
- * Results:
- *      Returns 1 if one of the options has changed, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int 
-Blt_ConfigModified TCL_VARARGS_DEF(Blt_ConfigSpec *, arg1)
-{
-    va_list argList;
-    Blt_ConfigSpec *specs;
-    Blt_ConfigSpec *sp;
-    const char *option;
-
-    specs = TCL_VARARGS_START(Blt_ConfigSpec *, arg1, argList);
-    while ((option = va_arg(argList, const char *)) != NULL) {
-	for (sp = specs; sp->type != BLT_CONFIG_END; sp++) {
-	    if ((Tcl_StringMatch(sp->switchName, option)) &&
-		(sp->specFlags & BLT_CONFIG_OPTION_SPECIFIED)) {
-		va_end(argList);
-		return 1;
-	    }
-	}
-    }
-    va_end(argList);
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigureComponentFromObj --
- *
- *	Configures a component of a widget.  This is useful for
- *	widgets that have multiple components which aren't uniquely
- *	identified by a Tk_Window. It allows us, for example, set
- *	resources for axes of the graph widget. The graph really has
- *	only one window, but its convenient to specify components in a
- *	hierarchy of options.
- *
- *		*graph.x.logScale yes
- *		*graph.Axis.logScale yes
- *		*graph.temperature.scaleSymbols yes
- *		*graph.Element.scaleSymbols yes
- *
- *	This is really a hack to work around the limitations of the Tk
- *	resource database.  It creates a temporary window, needed to
- *	call Tk_ConfigureWidget, using the name of the component.
- *
- * Results:
- *      A standard TCL result.
- *
- * Side Effects:
- *	A temporary window is created merely to pass to Tk_ConfigureWidget.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ConfigureComponentFromObj(
-    Tcl_Interp *interp,
-    Tk_Window parent,		/* Window to associate with component */
-    const char *name,		/* Name of component */
-    const char *className,
-    Blt_ConfigSpec *sp,
-    int objc,
-    Tcl_Obj *const *objv,
-    char *widgRec,
-    int flags)
-{
-    Tk_Window tkwin;
-    int result;
-    char *tmpName;
-    int isTemporary = FALSE;
-
-    tmpName = Blt_AssertStrdup(name);
-
-    /* Window name can't start with an upper case letter */
-    tmpName[0] = tolower(name[0]);
-
-    /*
-     * Create component if a child window by the component's name
-     * doesn't already exist.
-     */
-    tkwin = Blt_FindChild(parent, tmpName);
-    if (tkwin == NULL) {
-	tkwin = Tk_CreateWindow(interp, parent, tmpName, (char *)NULL);
-	isTemporary = TRUE;
-    }
-    if (tkwin == NULL) {
-	Tcl_AppendResult(interp, "can't find window in \"", 
-			 Tk_PathName(parent), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    assert(Tk_Depth(tkwin) == Tk_Depth(parent));
-    Blt_Free(tmpName);
-
-    Tk_SetClass(tkwin, className);
-    result = Blt_ConfigureWidgetFromObj(interp, tkwin, sp, objc, objv, widgRec,
-	flags);
-    if (isTemporary) {
-	Tk_DestroyWindow(tkwin);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ObjIsOption --
- *
- *	Indicates whether objPtr is a valid configuration option 
- *	such as -background.
- *
- * Results:
- *	Returns 1 is a matching option is found and 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ObjIsOption(
-    Blt_ConfigSpec *specs,	/* Describes legal options. */
-    Tcl_Obj *objPtr,		/* Command-line option name. */
-    int flags)			/* Used to specify additional flags
-				 * that must be present in config specs
-				 * for them to be considered.  Also,
-				 * may have BLT_CONFIG_OBJV_ONLY set. */
-{
-    Blt_ConfigSpec *sp;
-    int needFlags;		/* Specs must contain this set of flags
-				 * or else they are not considered. */
-
-    needFlags = flags & ~(BLT_CONFIG_USER_BIT - 1);
-    sp = FindConfigSpec((Tcl_Interp *)NULL, specs, objPtr, needFlags, 0);
-    return (sp != NULL);
-}
diff --git a/blt3.0/src/bltConfig.h b/blt3.0/src/bltConfig.h
deleted file mode 100644
index 7a19e9d..0000000
--- a/blt3.0/src/bltConfig.h
+++ /dev/null
@@ -1,406 +0,0 @@
-
-/* 
- * bltConfig.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef BLT_CONFIG_H
-#define BLT_CONFIG_H
-
-#ifdef HAVE_STDDEF_H
-#  include <stddef.h>
-#endif /* HAVE_STDDEF_H */
-
-#ifndef Blt_Offset
-#ifdef offsetof
-#define Blt_Offset(type, field) ((int) offsetof(type, field))
-#else
-#define Blt_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
-#endif
-#endif /* Blt_Offset */
-
-
-typedef int (Blt_OptionParseProc)(ClientData clientData, Tcl_Interp *interp, 
-	Tk_Window tkwin, Tcl_Obj *objPtr, char *widgRec, int offset, int flags);
-typedef Tcl_Obj *(Blt_OptionPrintProc)(ClientData clientData, 
-	Tcl_Interp *interp, Tk_Window tkwin, char *widgRec, int offset, 
-	int flags);
-typedef void (Blt_OptionFreeProc)(ClientData clientData, Display *display, 
-	char *widgRec, int offset);
-
-typedef struct Blt_CustomOption {
-    Blt_OptionParseProc *parseProc;	/* Procedure to call to parse
-					 * an option and store it in
-					 * converted form. */
-
-    Blt_OptionPrintProc *printProc;	/* Procedure to return a
-					 * Tcl_Obj representing an
-					 * existing option value. */
-
-    Blt_OptionFreeProc *freeProc;	/* Procedure used to free the
-					 * value. */
-
-    ClientData clientData;		/* Arbitrary one-word value
-					 * used by option parser:
-					 * passed to parseProc and
-					 * printProc. */
-} Blt_CustomOption;
-
-/*
- * Structure used to specify information for Tk_ConfigureWidget.  Each
- * structure gives complete information for one option, including
- * how the option is specified on the command line, where it appears
- * in the option database, etc.
- */
-
-typedef struct {
-    int type;			/* Type of option, such as
-				 * BLT_CONFIG_COLOR; see definitions
-				 * below.  Last option in table must
-				 * have type BLT_CONFIG_END. */
-
-    const char *switchName;	/* Switch used to specify option in
-				 * argv.  NULL means this spec is part
-				 * of a group. */
-
-    Tk_Uid dbName;		/* Name for option in option
-				 * database. */
-
-    Tk_Uid dbClass;		/* Class for option in database. */
-
-    Tk_Uid defValue;		/* Default value for option if not
-				 * specified in command line or
-				 * database. */
-
-    int offset;			/* Where in widget record to store
-				 * value; use Blt_Offset macro to
-				 * generate values for this. */
-
-    int specFlags;		/* Any combination of the values
-				 * defined below; other bits are used
-				 * internally by tkConfig.c. */
-
-    Blt_CustomOption *customPtr; /* If type is BLT_CONFIG_CUSTOM then
-				 * this is a pointer to info about how
-				 * to parse and print the option.
-				 * Otherwise it is irrelevant. */
-} Blt_ConfigSpec;
-
-/*
- * Type values for Blt_ConfigSpec structures.  See the user
- * documentation for details.
- */
-typedef enum {
-    BLT_CONFIG_ACTIVE_CURSOR, 
-    BLT_CONFIG_ANCHOR, 
-    BLT_CONFIG_BITMAP,
-    BLT_CONFIG_BOOLEAN, 
-    BLT_CONFIG_BORDER, 
-    BLT_CONFIG_CAP_STYLE, 
-    BLT_CONFIG_COLOR, 
-    BLT_CONFIG_CURSOR, 
-    BLT_CONFIG_CUSTOM, 
-    BLT_CONFIG_DOUBLE, 
-    BLT_CONFIG_FONT, 
-    BLT_CONFIG_INT, 
-    BLT_CONFIG_JOIN_STYLE,
-    BLT_CONFIG_JUSTIFY, 
-    BLT_CONFIG_MM, 
-    BLT_CONFIG_RELIEF, 
-    BLT_CONFIG_STRING,
-    BLT_CONFIG_SYNONYM, 
-    BLT_CONFIG_UID, 
-    BLT_CONFIG_WINDOW, 
-
-    BLT_CONFIG_BITMASK,
-    BLT_CONFIG_BITMASK_INVERT,
-    BLT_CONFIG_DASHES,
-    BLT_CONFIG_FILL,
-    BLT_CONFIG_FLOAT, 
-    BLT_CONFIG_INT_NNEG,	/* 0..N */
-    BLT_CONFIG_INT_POS,		/* 1..N */
-    BLT_CONFIG_LIST,
-    BLT_CONFIG_LONG, 
-    BLT_CONFIG_LONG_NNEG,	/* 0..N */
-    BLT_CONFIG_LONG_POS,	/* 1..N */
-    BLT_CONFIG_OBJ,
-    BLT_CONFIG_PAD,
-    BLT_CONFIG_PIXELS_NNEG,	/* 1.1c 2m 3.2i excluding negative
-				   values. */
-    BLT_CONFIG_PIXELS_POS,	/* 1.1c 2m 3.2i excluding negative
-				 * values and zero. */
-    BLT_CONFIG_PIXELS,		/* 1.1c 2m 3.2i. */
-    BLT_CONFIG_RESIZE,
-    BLT_CONFIG_SIDE,
-    BLT_CONFIG_STATE, 
-    BLT_CONFIG_BACKGROUND,
-    BLT_CONFIG_PIX32, 
-
-    BLT_CONFIG_TK_FONT, 
-    BLT_CONFIG_END
-} Blt_ConfigTypes;
-
-/*
- * Possible values for flags argument to Tk_ConfigureWidget:
- */
-#define BLT_CONFIG_OBJV_ONLY	1
-
-/*
- * Possible flag values for Blt_ConfigSpec structures.  Any bits at or
- * above BLT_CONFIG_USER_BIT may be used by clients for selecting
- * certain entries.  Before changing any values here, coordinate with
- * tkOldConfig.c (internal-use-only flags are defined there).
- */
-/*
- * Values for "flags" field of Blt_ConfigSpec structures.  Be sure to
- * coordinate these values with those defined in tk.h
- * (BLT_CONFIG_COLOR_ONLY, etc.).  There must not be overlap!
- *
- * INIT -		Non-zero means (char *) things have been
- *			converted to Tk_Uid's.
- */
-#define INIT				(1<<0)
-#define BLT_CONFIG_NULL_OK		(1<<1)
-#define BLT_CONFIG_COLOR_ONLY		(1<<2)
-#define BLT_CONFIG_MONO_ONLY		(1<<3)
-#define BLT_CONFIG_DONT_SET_DEFAULT	(1<<4)
-#define BLT_CONFIG_OPTION_SPECIFIED	(1<<5)
-#define BLT_CONFIG_USER_BIT		(1<<8)
-
-
-#define SIDE_LEFT		(1<<0)
-#define SIDE_TOP		(1<<1)
-#define SIDE_RIGHT		(1<<2)
-#define SIDE_BOTTOM		(1<<3)
-
-#define STATE_NORMAL		(0)
-#define STATE_ACTIVE		(1<<0)
-#define STATE_DISABLED		(1<<1)
-#define STATE_EMPHASIS		(1<<2)
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Pad --
- *
- * 	Specifies vertical and horizontal padding.
- *
- *	Padding can be specified on a per side basis.  The fields
- *	side1 and side2 refer to the opposite sides, either
- *	horizontally or vertically.
- *
- *		side1	side2
- *              -----   -----
- *          x | left    right
- *	    y | top     bottom
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    unsigned short int side1, side2;
-} Blt_Pad;
-
-#define padLeft  	xPad.side1
-#define padRight  	xPad.side2
-#define padTop		yPad.side1
-#define padBottom	yPad.side2
-#define PADDING(x)	((x).side1 + (x).side2)
-
-/*
- *---------------------------------------------------------------------------
- *
- * The following enumerated values are used as bit flags.
- *	FILL_NONE		Neither coordinate plane is specified 
- *	FILL_X			Horizontal plane.
- *	FILL_Y			Vertical plane.
- *	FILL_BOTH		Both vertical and horizontal planes.
- *
- *---------------------------------------------------------------------------
- */
-#define FILL_NONE	0
-#define FILL_X		1
-#define FILL_Y		2
-#define FILL_BOTH	3
-
-/*
- * Resize --
- *
- *	These flags indicate in what ways each partition in a table can be
- *	resized from its default dimensions.  The normal size of a row/column
- *	is the minimum amount of space needed to hold the widgets that span
- *	it.  The table may then be stretched or shrunk depending if the
- *	container is larger or smaller than the table. This can occur if 1)
- *	the user resizes the toplevel widget, or 2) the container is in turn
- *	packed into a larger widget and the "fill" option is set.
- *
- * 	  RESIZE_NONE 	  - No resizing from normal size.
- *	  RESIZE_EXPAND   - Do not allow the size to decrease.
- *			    The size may increase however.
- *        RESIZE_SHRINK   - Do not allow the size to increase.
- *			    The size may decrease however.
- *	  RESIZE_BOTH     - Allow the size to increase or
- *			    decrease from the normal size.
- *	  RESIZE_VIRGIN   - Special case of the resize flag.  Used to
- *			    indicate the initial state of the flag.
- *			    Empty rows/columns are treated differently
- *			    if this row/column is set.
- */
-
-#define RESIZE_NONE	0
-#define RESIZE_EXPAND	(1<<0)
-#define RESIZE_SHRINK	(1<<1)
-#define RESIZE_BOTH	(RESIZE_EXPAND | RESIZE_SHRINK)
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Dashes --
- *
- * 	List of dash values (maximum 11 based upon PostScript limit).
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    unsigned char values[12];
-    int offset;
-} Blt_Dashes;
-
-#define LineIsDashed(d) ((d).values[0] != 0)
-
-/*
- * Blt_Limits --
- *
- * 	Defines the bounding of a size (width or height) in the paneset.  It may
- * 	be related to the widget, pane or paneset size.
- */
-typedef struct {
-    int flags;				/* Flags indicate whether using default
-					 * values for limits or not. See flags
-					 * below. */
-    int max, min;			/* Values for respective limits. */
-    int nom;				/* Nominal starting value. */
-} Blt_Limits;
-
-#define LIMITS_MIN_SET	(1<<0)
-#define LIMITS_MAX_SET	(1<<1)
-#define LIMITS_NOM_SET	(1<<2)
-
-#define LIMITS_MIN	0		/* Default minimum limit  */
-#define LIMITS_MAX	SHRT_MAX	/* Default maximum limit */
-#define LIMITS_NOM	-1000		/* Default nomimal value.  Indicates
-					 * if a pane has received any space
-					 * yet */
-
-BLT_EXTERN void Blt_SetDashes (Display *display, GC gc, Blt_Dashes *dashesPtr);
-BLT_EXTERN Blt_Dashes *Blt_GetDashes (GC gc);
-
-BLT_EXTERN void Blt_ResetLimits(Blt_Limits *limitsPtr);
-BLT_EXTERN int Blt_GetLimitsFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr, Blt_Limits *limitsPtr);
-
-BLT_EXTERN int Blt_ConfigureInfoFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Blt_ConfigSpec *specs, char *widgRec, Tcl_Obj *objPtr, int flags);
-
-BLT_EXTERN int Blt_ConfigureValueFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Blt_ConfigSpec *specs, char *widgRec, Tcl_Obj *objPtr, int flags);
-
-BLT_EXTERN int Blt_ConfigureWidgetFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Blt_ConfigSpec *specs, int objc, Tcl_Obj *const *objv, char *widgRec, 
-	int flags);
-
-BLT_EXTERN int Blt_ConfigureComponentFromObj(Tcl_Interp *interp, 
-	Tk_Window tkwin, const char *name, const char *className, 
-	Blt_ConfigSpec *specs, int objc, Tcl_Obj *const *objv, char *widgRec, 
-	int flags);
-
-BLT_EXTERN int Blt_ConfigModified TCL_VARARGS(Blt_ConfigSpec *, specs);
-
-BLT_EXTERN const char *Blt_NameOfState(int state);
-BLT_EXTERN const char *Blt_NameOfSide(int side);
-
-BLT_EXTERN void Blt_FreeOptions(Blt_ConfigSpec *specs, char *widgRec, 
-	Display *display, int needFlags);
-
-BLT_EXTERN int Blt_ObjIsOption(Blt_ConfigSpec *specs, Tcl_Obj *objPtr, 
-	int flags);
-
-BLT_EXTERN int Blt_GetSideFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *sidePtr);
-
-BLT_EXTERN int Blt_GetPositionFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	long *indexPtr);
-
-BLT_EXTERN int Blt_GetPixelsFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr, int flags, int *valuePtr);
-
-BLT_EXTERN int Blt_GetPadFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr, Blt_Pad *padPtr);
-
-BLT_EXTERN int Blt_GetStateFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *statePtr);
-
-BLT_EXTERN int Blt_GetFillFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *fillPtr);
-
-BLT_EXTERN int Blt_GetResizeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *fillPtr);
-
-BLT_EXTERN int Blt_GetDashesFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_Dashes *dashesPtr);
-
-#if (_TK_VERSION < _VERSION(8,1,0))
-BLT_EXTERN int Tk_GetAnchorFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Tk_Anchor *anchorPtr);
-
-BLT_EXTERN int Tk_GetJustifyFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Tk_Justify *justifyPtr);
-
-BLT_EXTERN int Tk_GetReliefFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *reliefPtr);
-
-BLT_EXTERN int Tk_GetMMFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr, double *doublePtr);
-
-BLT_EXTERN int Tk_GetPixelsFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr, int *intPtr);
-
-BLT_EXTERN Tk_3DBorder Tk_Alloc3DBorderFromObj(Tcl_Interp *interp, 
-	Tk_Window tkwin, Tcl_Obj *objPtr);
-
-BLT_EXTERN Pixmap Tk_AllocBitmapFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN Tk_Font Tk_AllocFontFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN Tk_Cursor Tk_AllocCursorFromObj(Tcl_Interp *interp, Tk_Window tkwin,
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN XColor *Tk_AllocColorFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr);
-#endif /* < 8.1 */
-
-#endif /* BLT_CONFIG_H */
diff --git a/blt3.0/src/bltContainer.c b/blt3.0/src/bltContainer.c
deleted file mode 100644
index aca8265..0000000
--- a/blt3.0/src/bltContainer.c
+++ /dev/null
@@ -1,2011 +0,0 @@
-
-/*
- * bltContainer.c --
- *
- * This module implements a container widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_CONTAINER
-#include "bltOp.h"
-#include "bltChain.h"
-#include "bltTree.h"
-#if !defined(WIN32) && !defined(MACOSX)
-#include <X11/Xatom.h>
-#include <X11/Xproto.h>
-#include <X11/Xutil.h>
-#endif
-#include "tkDisplay.h"
-#define XDEBUG
-
-#define SEARCH_TRIES	100	/* Maximum number of attempts to check for
-				 * a given window before failing. */
-#define SEARCH_INTERVAL 20	/* Number milliseconds to wait after each 
-				 * attempt to find a window. */
-
-#define SEARCH_TKWIN	(1<<0)	/* Search via Tk window pathname. */
-#define SEARCH_XID	(1<<1)	/* Search via an XID 0x0000000. */
-#define SEARCH_CMD	(1<<2)	/* Search via a command-line arguments. */
-#define SEARCH_NAME	(1<<3)	/* Search via the application name. */
-#define SEARCH_PROPERTY	(1<<4)	/* Search via the application name. */
-#define SEARCH_ALL	(SEARCH_TKWIN | SEARCH_XID | SEARCH_CMD | SEARCH_NAME)
-
-#define CONTAINER_REDRAW		(1<<1)
-#define CONTAINER_MAPPED		(1<<2)
-#define CONTAINER_FOCUS			(1<<4)
-#define CONTAINER_INIT			(1<<5)
-#define CONTAINER_MOVE			(1<<7)
-
-#define DEF_CONTAINER_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_CONTAINER_BORDERWIDTH	STD_BORDERWIDTH
-#define DEF_CONTAINER_COMMAND		(char *)NULL
-#define DEF_CONTAINER_CURSOR		(char *)NULL
-#define DEF_CONTAINER_HEIGHT		"0"
-#define DEF_CONTAINER_HIGHLIGHT_BACKGROUND STD_NORMAL_BACKGROUND
-#define DEF_CONTAINER_HIGHLIGHT_COLOR	RGB_BLACK
-#define DEF_CONTAINER_HIGHLIGHT_WIDTH	"2"
-#define DEF_CONTAINER_RELIEF		"sunken"
-#define DEF_CONTAINER_TAKE_FOCUS	"0"
-#define DEF_CONTAINER_TIMEOUT		"20"
-#define DEF_CONTAINER_WIDTH		"0"
-#define DEF_CONTAINER_WINDOW		(char *)NULL
-
-typedef struct _SearchInfo SearchInfo;
-typedef void (SearchProc)(Display *display, Window window, 
-	SearchInfo *searchPtr);
-
-struct _SearchInfo {
-    SearchProc *proc;
-    char *pattern;		/* Search pattern. */
-
-    Window window;		/* XID of last window that matches criteria. */
-    int nMatches;		/* Number of windows that match the pattern. */
-    int saveNames;		/* Indicates to save the names of the
-				 * window XIDs that match the search
-				 * criteria. */
-    Tcl_DString dString;	/* Will contain the strings of the
-				 * window XIDs matching the search
-				 * criteria. */
-    Atom atom;
-};
-
-typedef struct {
-    Tk_Window tkwin;		/* Window that embodies the widget.
-                                 * NULL means that the window has been
-                                 * destroyed but the data structures
-                                 * haven't yet been cleaned up.*/
-
-    Display *display;		/* Display containing widget; needed,
-                                 * among other things, to release
-                                 * resources after tkwin has already
-                                 * gone away. */
-
-    Tcl_Interp *interp;		/* Interpreter associated with widget. */
-
-    Tcl_Command cmdToken;	/* Token for widget's command. */
-
-    unsigned int flags;		/* For bit-field definitions, see above. */
-
-    int inset;			/* Total width of borders; focus
-				 * highlight and 3-D border. Indicates
-				 * the offset from outside edges to
-				 * leave room for borders. */
-
-    Tk_Cursor cursor;		/* X Cursor */
-
-    Tk_3DBorder border;		/* 3D border surrounding the adopted
-				 * window. */
-    int borderWidth;		/* Width of 3D border. */
-    int relief;			/* 3D border relief. */
-
-    Tk_Window tkToplevel;	/* Toplevel (wrapper) window of
-				 * container.  It's used to track the
-				 * location of the container. If it
-				 * moves we need to notify the
-				 * embedded application. */
-    /*
-     * Focus highlight ring
-     */
-    int highlightWidth;		/* Width in pixels of highlight to
-				 * draw around widget when it has the
-				 * focus.  <= 0 means don't draw a
-				 * highlight. */
-    XColor *highlightBgColor;	/* Color for drawing traversal
-				 * highlight area when highlight is
-				 * off. */
-    XColor *highlightColor;	/* Color for drawing traversal highlight. */
-
-    GC highlightGC;		/* GC for focus highlight. */
-
-    char *takeFocus;		/* Says whether to select this widget during
-				 * tab traveral operations.  This value isn't
-				 * used in C code, but for the widget's Tcl
-				 * bindings. */
-
-    int reqWidth, reqHeight;	/* Requested dimensions of the container
-				 * window. */
-
-    Window adopted;		/* X window Id or Win32 handle of adopted 
-				 * window contained by the widget.  If None, 
-				 * no window has been reparented. */
-    Tk_Window tkAdopted;	/* Non-NULL if this is a Tk window that's 
-				 * been adopted. */
-    int adoptedX, adoptedY;	/* Current position of the adopted window. */
-    int adoptedWidth;		/* Current width of the adopted window. */
-    int adoptedHeight;		/* Current height of the adopted window. */
-
-    int origX, origY;
-    int origWidth, origHeight;	/* Dimensions of the window when it
-				 * was adopted.  When the window is
-				 * released it's returned to it's
-				 * original dimensions. */
-
-    int timeout;
-    int nextId;
-} Container;
-
-
-static Blt_OptionParseProc ObjToXID;
-static Blt_OptionPrintProc XIDToObj;
-
-static Blt_CustomOption XIDOption = {
-    ObjToXID, XIDToObj, NULL, (ClientData)(SEARCH_TKWIN | SEARCH_XID),
-};
-
-#ifndef WIN32
-static Blt_CustomOption XIDNameOption = {
-    ObjToXID, XIDToObj, NULL, (ClientData)SEARCH_NAME,
-};
-
-static Blt_CustomOption XIDCmdOption = {
-    ObjToXID, XIDToObj, NULL, (ClientData)SEARCH_CMD,
-};
-static Blt_CustomOption XIDPropertyOption = {
-    ObjToXID, XIDToObj, NULL, (ClientData)SEARCH_PROPERTY,
-};
-#endif
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_CONTAINER_BACKGROUND, Blt_Offset(Container, border), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_CONTAINER_BORDERWIDTH, Blt_Offset(Container, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-#ifndef WIN32
-    {BLT_CONFIG_CUSTOM, "-command", "command", "Command",
-	DEF_CONTAINER_WINDOW, Blt_Offset(Container, adopted),
-	BLT_CONFIG_DONT_SET_DEFAULT, &XIDCmdOption},
-#endif
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CONTAINER_CURSOR, Blt_Offset(Container, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height",
-	DEF_CONTAINER_HEIGHT, Blt_Offset(Container, reqHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_CONTAINER_HIGHLIGHT_BACKGROUND, 
-	Blt_Offset(Container, highlightBgColor), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_CONTAINER_HIGHLIGHT_COLOR, 
-	Blt_Offset(Container, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness",
-	DEF_CONTAINER_HIGHLIGHT_WIDTH, Blt_Offset(Container, highlightWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-#ifndef WIN32
-    {BLT_CONFIG_CUSTOM, "-name", "name", "Name", DEF_CONTAINER_WINDOW, 
-	Blt_Offset(Container, adopted), BLT_CONFIG_DONT_SET_DEFAULT, &XIDNameOption},
-    {BLT_CONFIG_CUSTOM, "-property", "property", "Property", DEF_CONTAINER_WINDOW, 
-	Blt_Offset(Container, adopted), BLT_CONFIG_DONT_SET_DEFAULT, &XIDPropertyOption},
-#endif
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_CONTAINER_RELIEF, Blt_Offset(Container, relief), 0},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_CONTAINER_TAKE_FOCUS, Blt_Offset(Container, takeFocus),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_INT_POS, "-timeout", "timeout", "Timeout",
-	DEF_CONTAINER_TIMEOUT, Blt_Offset(Container, timeout),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width",
-	DEF_CONTAINER_WIDTH, Blt_Offset(Container, reqWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-window", "window", "Window",
-	DEF_CONTAINER_WINDOW, Blt_Offset(Container, adopted),
-	BLT_CONFIG_DONT_SET_DEFAULT, &XIDOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/* Forward Declarations */
-static Tcl_CmdDeleteProc ContainerInstCmdDeleteProc;
-static Tcl_FreeProc DestroyContainer;
-static Tcl_IdleProc DisplayContainer;
-static Tcl_ObjCmdProc ContainerCmd;
-static Tcl_ObjCmdProc ContainerInstCmd;
-static Tk_EventProc ContainerEventProc;
-static Tk_EventProc ToplevelEventProc;
-static Tk_GenericProc AdoptedWindowEventProc;
-
-static void EventuallyRedraw(Container *cntrPtr);
-
-typedef int (ContainerCmdProc)(Container *comboPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * GetWindowId --
- *
- *      Returns the XID for the Tk_Window given.  Starting in Tk 8.0,
- *      the toplevel widgets are wrapped by another window.
- *      Currently there's no way to get at that window, other than
- *      what is done here: query the X window hierarchy and grab the
- *      parent.
- *
- * Results:
- *      Returns the X Window ID of the widget.  If it's a toplevel, then
- *	the XID of the wrapper is returned.
- *
- *---------------------------------------------------------------------------
- */
-Window
-GetXID(Tk_Window tkwin)
-{
-    HWND hWnd;
-    TkWinWindow *twdPtr;
-
-    hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
-    if (Tk_IsTopLevel(tkwin)) {
-	hWnd = GetParent(hWnd);
-    }
-    twdPtr = Blt_AssertMalloc(sizeof(TkWinWindow));
-    twdPtr->handle = hWnd;
-    twdPtr->type = TWD_WINDOW;
-    twdPtr->winPtr = tkwin;
-    return (Window)twdPtr;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfId --
- *
- *	Returns a string representing the given XID.
- *
- * Results:
- *	A static string containing either the hexidecimal number or
- *	the pathname of a Tk window.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfId(
-    Display *display,		/* Display containing both the container widget
-				 * and the adopted window. */
-    Window window)		/* XID of the adopted window. */
-{
-    if (window != None) {
-	Tk_Window tkwin;
-	static char string[200];
-
-	/* See first if it's a window that Tk knows about.  */
-	/*
-	 * Note:  If the wrapper window is reparented, Tk pretends it's
-	 *        no longer connected to the toplevel, so if you look for
-	 *	  the child of the wrapper tkwin, it's NULL.  
-	 */
-	tkwin = Tk_IdToWindow(display, window); 
-	if ((tkwin != NULL) && (Tk_PathName(tkwin) != NULL)) {
-	    return Tk_PathName(tkwin); 
-	} 
-	sprintf_s(string, 200, "0x%lx", (unsigned long)window);
-	return string;
-    }
-    return "";			/* Return empty string if XID is None. */
-}
-
-#ifndef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * XGeometryErrorProc --
- *
- *	Flags errors generated from XGetGeometry calls to the X server.
- *
- * Results:
- *	Always returns 0.
- *
- * Side Effects:
- *	Sets a flag, indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-XGeometryErrorProc(
-    ClientData clientData,
-    XErrorEvent *eventPtr)	/* Not used. */
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetAdoptedWindowGeometry --
- *
- *	Computes the requested geometry of the container using the 
- *	size of adopted window as a reference.  
- *
- * Results:
- *	A standard TCL result. 
- *
- * Side Effects:
- *	Sets a flag, indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetAdoptedWindowGeometry(
-    Tcl_Interp *interp,
-    Container *cntrPtr)
-{
-    int x, y, width, height, borderWidth, depth;
-    int xOffset, yOffset;
-    Window root, dummy;
-    Tk_ErrorHandler handler;
-    int result;
-    int any = -1;
-    
-    width = height = 1;
-    xOffset = yOffset = 0;
-    if (cntrPtr->adopted != None) {
-	handler = Tk_CreateErrorHandler(cntrPtr->display, any, X_GetGeometry, 
-		any, XGeometryErrorProc, &result);
-	root = Tk_RootWindow(cntrPtr->tkwin);
-	XTranslateCoordinates(cntrPtr->display, cntrPtr->adopted,
-		      root, 0, 0, &xOffset, &yOffset, &dummy);
-	result = XGetGeometry(cntrPtr->display, cntrPtr->adopted, &root, 
-		&x, &y, (unsigned int *)&width, (unsigned int *)&height,
-	      (unsigned int *)&borderWidth, (unsigned int *)&depth);
-	Tk_DeleteErrorHandler(handler);
-	XSync(cntrPtr->display, False);
-	if (result == 0) {
-	    Tcl_AppendResult(interp, "can't get geometry for \"", 
-		     NameOfId(cntrPtr->display, cntrPtr->adopted), "\"", 
-		     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	cntrPtr->origX = xOffset;
-	cntrPtr->origY = yOffset;
-	cntrPtr->origWidth = width;
-	cntrPtr->origHeight = height;
-    } else {
-	cntrPtr->origX = cntrPtr->origY = 0;
-	cntrPtr->origWidth = cntrPtr->origHeight = 0;
-    }
-    cntrPtr->adoptedX = x;
-    cntrPtr->adoptedY = y;
-    cntrPtr->adoptedWidth = width;
-    cntrPtr->adoptedHeight = height;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetChildren --
- *
- *	Returns a chain of the child windows according to their stacking
- *	order.  The window ids are ordered from top to bottom.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-GetChildren(Display *display, Window window)
-{
-    Window *children;
-    unsigned int nChildren;
-    Window parent, root;
-
-    if (XQueryTree(display, window, &parent, &root, &children, &nChildren)) {
-	if (nChildren > 0) {
-	    Blt_Chain chain;
-	    size_t i;
-	    
-	    chain = Blt_Chain_Create();
-	    for (i = 0; i < nChildren; i++) {
-		/*
-		 *  XQuery returns windows in bottom to top order.  We'll
-		 *  reverse the order.
-		 */
-		Blt_Chain_Prepend(chain, (ClientData)children[i]);
-	    }
-	    XFree((char *)children);
-	    return chain;
-	}
-    }
-    return NULL;
-}
-
-static int
-GetMaxPropertySize(Display *display)
-{
-    int size;
-
-    size = Blt_MaxRequestSize(display, sizeof(char));
-    size -= 32;
-    return size;
-}
-
-static unsigned char *
-GetProperty(Display *display, Window window, Atom atom)
-{
-    unsigned char *data;
-    int result, format;
-    Atom typeAtom;
-    unsigned long nItems, bytesAfter;
-
-    if (window == None) {
-	return NULL;
-    }
-    data = NULL;
-    result = XGetWindowProperty(
-        display,		/* Display of window. */
-	window,			/* Window holding the property. */
-        atom,			/* Name of property. */
-        0,			/* Offset of data (for multiple reads). */
-	GetMaxPropertySize(display), /* Maximum number of items to read. */
-	False,			/* If true, delete the property. */
-        XA_STRING,		/* Desired type of property. */
-        &typeAtom,		/* (out) Actual type of the property. */
-        &format,		/* (out) Actual format of the property. */
-        &nItems,		/* (out) # of items in specified format. */
-        &bytesAfter,		/* (out) # of bytes remaining to be read. */
-	&data);
-    if ((result != Success) || (format != 8) /*|| (typeAtom != XA_STRING)*/) {
-	if ((result == Success) && (format != None)) {
-	    fprintf(stderr, "format=%d typeAtom=%d\n", format, (int)typeAtom);
-	}
-	if (data != NULL) {
-	    XFree((char *)data);
-	    data = NULL;
-	}
-    }
-    return data;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PropertySearch --
- *
- *	Traverses the entire window hierarchy, searching for windows 
- *	matching the name field in the SearchInfo structure. This 
- *	routine is recursively called for each successive level in 
- *	the window hierarchy.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The SearchInfo structure will track the number of windows that 
- *	match the given criteria.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-PropertySearch(Display *display, Window window, SearchInfo *searchPtr)
-{
-    Blt_Chain chain;
-    char *data;
-
-    data = (char *)GetProperty(display, window, searchPtr->atom);
-    if (data != NULL) {
-	/* Compare the name of the window to the search pattern. */
-	if (Tcl_StringMatch(data, searchPtr->pattern)) {
-	    fprintf(stderr, "window 0x%x matched %s property (%s) with %s\n", 
-		    (int)window, XGetAtomName(display, searchPtr->atom), data, 
-		    searchPtr->pattern);
-	    if (searchPtr->saveNames) { /* Record names of matching windows. */
-		Tcl_DStringAppendElement(&searchPtr->dString, 
-			 NameOfId(display, window));
-		Tcl_DStringAppendElement(&searchPtr->dString, data);
-	    }
-	    searchPtr->window = window;
-	    searchPtr->nMatches++;
-	}
-	XFree(data);
-    }
-    /* Process the window's descendants. */
-    chain = GetChildren(display, window);
-    if (chain != NULL) {
-	Blt_ChainLink link;
-	Window child;
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    child = (Window)Blt_Chain_GetValue(link);
-	    PropertySearch(display, child, searchPtr);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameSearch --
- *
- *	Traverses the entire window hierarchy, searching for windows 
- *	matching the name field in the SearchInfo structure. This 
- *	routine is recursively called for each successive level in 
- *	the window hierarchy.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The SearchInfo structure will track the number of windows that 
- *	match the given criteria.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-NameSearch(
-    Display *display,
-    Window window,
-    SearchInfo *searchPtr)
-{
-    Blt_Chain chain;
-    char *wmName;
-
-    if (XFetchName(display, window, &wmName)) {
-	/* Compare the name of the window to the search pattern. */
-	if (Tcl_StringMatch(wmName, searchPtr->pattern)) {
-	    if (searchPtr->saveNames) { /* Record names of matching windows. */
-		Tcl_DStringAppendElement(&searchPtr->dString, 
-			 NameOfId(display, window));
-		Tcl_DStringAppendElement(&searchPtr->dString, wmName);
-	    }
-	    searchPtr->window = window;
-	    searchPtr->nMatches++;
-	}
-	XFree(wmName);
-    }
-    /* Process the window's descendants. */
-    chain = GetChildren(display, window);
-    if (chain != NULL) {
-	Blt_ChainLink link;
-	Window child;
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    child = (Window)Blt_Chain_GetValue(link);
-	    NameSearch(display, child, searchPtr);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CmdSearch --
- *
- *	Traverses the entire window hierarchy, searching for windows 
- *	matching the command-line specified in the SearchInfo structure.  
- *	This routine is recursively called for each successive level
- *	in the window hierarchy.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The SearchInfo structure will track the number of windows that 
- *	match the given command-line.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-CmdSearch(
-    Display *display,
-    Window window,
-    SearchInfo *searchPtr)
-{
-    Blt_Chain chain;
-    int argc;
-    char **argv;
-
-    if (XGetCommand(display, window, &argv, &argc)) {
-	char *string;
-
-	string = Tcl_Merge(argc, (const char **)argv);
-	XFreeStringList(argv);
-	if (Tcl_StringMatch(string, searchPtr->pattern)) {
-	    if (searchPtr->saveNames) { /* Record names of matching windows. */
-		Tcl_DStringAppendElement(&searchPtr->dString, 
-			NameOfId(display, window));
-		Tcl_DStringAppendElement(&searchPtr->dString, string);
-	    }
-	    searchPtr->window = window;
-	    searchPtr->nMatches++;
-	}
-	Blt_Free(string);
-    }
-    /* Process the window's descendants. */
-    chain = GetChildren(display, window);
-    if (chain != NULL) {
-	Blt_ChainLink link;
-	Window child;
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    child = (Window)Blt_Chain_GetValue(link);
-	    CmdSearch(display, child, searchPtr);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TimeoutProc --
- *
- *	Procedure called when the timer event elapses.  Used to wait
- *	between attempts checking for the designated window.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Sets a flag, indicating the timeout occurred.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TimeoutProc(ClientData clientData)
-{
-    int *expirePtr = clientData;
-
-    *expirePtr = TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TestAndWaitForWindow --
- *
- *	Searches, possibly multiple times, for windows matching the
- *	criteria given, using the search proc also given.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Sets a flag, indicating the timeout occurred.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TestAndWaitForWindow(
-    Container *cntrPtr,		/* Container widget record. */
-    SearchInfo *searchPtr)	/* Search criteria. */
-{
-    Window root;
-    Tcl_TimerToken timerToken;
-    int expire;
-    int i;
-
-    /* Get the root window to start the search.  */
-    root = Tk_RootWindow(cntrPtr->tkwin);
-    timerToken = NULL;
-    for (i = 0; i < SEARCH_TRIES; i++) {
-	searchPtr->nMatches = 0;
-	(*searchPtr->proc)(cntrPtr->display, root, searchPtr);
-	if (searchPtr->nMatches > 0) {
-	    if (timerToken != NULL) {
-		Tcl_DeleteTimerHandler(timerToken);
-	    }
-	    return;
-	}
-	expire = FALSE;
-	/*   
-	 * If the X11 application associated with the adopted window
-	 * was just started (via "exec" or "bgexec"), the window may
-	 * not exist yet.  We have to wait a little bit for the program
-	 * to start up.  Create a timer event break us out of an wait 
-	 * loop.  We'll wait for a given interval for the adopted window
-	 * to appear.
-	 */
-	timerToken = Tcl_CreateTimerHandler(cntrPtr->timeout, TimeoutProc, 
-		&expire);
-	while (!expire) {
-	    /* Should file events be allowed? */
-	    Tcl_DoOneEvent(TCL_TIMER_EVENTS | TCL_WINDOW_EVENTS | 
-			   TCL_FILE_EVENTS);
-	}
-    }	
-}
-#else 
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetChildren --
- *
- *	Returns a chain of the child windows according to their stacking
- *	order.  The window ids are ordered from top to bottom.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-GetChildren(Display *display, Window window)
-{
-    Blt_Chain chain;
-    HWND hWnd;
-    HWND parent;
-
-    parent = Tk_GetHWND(window);
-    chain = Blt_Chain_Create();
-    for (hWnd = GetTopWindow(parent); hWnd != NULL;
-	hWnd = GetNextWindow(hWnd, GW_HWNDNEXT)) {
-	Blt_Chain_Append(chain, (ClientData)hWnd);
-    }
-    return chain;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetAdoptedWindowGeometry --
- *
- *	Computes the requested geometry of the container using the 
- *	size of adopted window as a reference.  
- *
- * Results:
- *	A standard TCL result. 
- *
- * Side Effects:
- *	Sets a flag, indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetAdoptedWindowGeometry(
-    Tcl_Interp *interp, 
-    Container *cntrPtr)
-{
-    int x, y, width, height;
-    int xOffset, yOffset;
-    Window root, dummy;
-    
-    width = height = 1;
-    xOffset = yOffset = 0;
-    x = y = 0;
-    if (cntrPtr->adopted != None) {
-	HWND hWnd;
-	RECT rect;
-
-	hWnd = Tk_GetHWND(cntrPtr->adopted);
-	if (GetWindowRect(hWnd, &rect)) {
-	    x = rect.left;
-	    y = rect.top;
-	    width = rect.right - rect.left + 1;
-	    height = rect.bottom - rect.top + 1;
-	} else {
-	    Tcl_AppendResult(interp, "can't get geometry for \"", 
-		     NameOfId(cntrPtr->display, cntrPtr->adopted), "\"", 
-		     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	root = Tk_RootWindow(cntrPtr->tkwin);
-	XTranslateCoordinates(cntrPtr->display, cntrPtr->adopted,
-		      root, 0, 0, &xOffset, &yOffset, &dummy);
-	cntrPtr->origX = xOffset;
-	cntrPtr->origY = yOffset;
-	cntrPtr->origWidth = width;
-	cntrPtr->origHeight = height;
-    } else {
-	cntrPtr->origX = cntrPtr->origY = 0;
-	cntrPtr->origWidth = cntrPtr->origHeight = 0;
-    }
-    cntrPtr->adoptedX = x;
-    cntrPtr->adoptedY = y;
-    cntrPtr->adoptedWidth = width;
-    cntrPtr->adoptedHeight = height;
-    return TCL_OK;
-}
-
-#endif /*WIN32*/
-
-/*
- *---------------------------------------------------------------------------
- *
- *  MapTree --
- *
- *	Maps each window in the hierarchy.  This is needed because 
- *
- *  Results:
- *	None.
- *
- *  Side Effects:
- *	Each window in the hierarchy is mapped.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapTree(
-    Display *display,
-    Window window)
-{
-    Blt_Chain chain;
-
-    XMapWindow(display, window);
-    chain = GetChildren(display, window);
-    if (chain != NULL) {
-	Blt_ChainLink link;
-	Window child;
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    child = (Window)Blt_Chain_GetValue(link);
-	    MapTree(display, child);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToXID --
- *
- *	Converts a string into an X window Id.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToXID(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window parent,		/* Parent window */
-    Tcl_Obj *objPtr,		/* String representation. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    unsigned long searchFlags = (unsigned long)clientData;
-    Container *cntrPtr = (Container *)widgRec;
-    Window *winPtr = (Window *) (widgRec + offset);
-    Tk_Window tkAdopted;
-    Window window;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    tkAdopted = NULL;
-    window = None;
-    if ((searchFlags & SEARCH_TKWIN) && (string[0] == '.')) {
-	Tk_Window tkwin;
-
-	tkwin = Tk_NameToWindow(interp, string, Tk_MainWindow(interp));
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (!Tk_IsTopLevel(tkwin)) {
-	    Tcl_AppendResult(interp, "can't reparent non-toplevel Tk windows",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	tkAdopted = tkwin;
-	Tk_MakeWindowExist(tkwin);
-	window = Blt_GetWindowId(tkwin);
-#ifndef WIN32
-    } else if ((searchFlags & SEARCH_XID) && (string[0] == '0') && 
-	       (string[1] == 'x')) {
-	int token;
-
-	/* Hexidecimal string specifying the Window token. */
-	if (Tcl_GetInt(interp, string, &token) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	window = token;
-    } else if ((string == NULL) || (string[0] == '\0')) {
-	window = None;
-    } else {
-	SearchInfo search;
-
-	memset(&search, 0, sizeof(search));
-	if (searchFlags & (SEARCH_NAME | SEARCH_CMD | SEARCH_PROPERTY)) {
-	    if (searchFlags & SEARCH_NAME) {
-		search.pattern = string;
-		search.proc = NameSearch;
-	    } else if (searchFlags & SEARCH_CMD) {
-		search.pattern = string;
-		search.proc = CmdSearch;
-	    } else if (searchFlags & SEARCH_PROPERTY) {
-		Tk_Window tkwin;
-		char *atomName;
-		int objc;
-		Tcl_Obj **objv;
-
-		if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		if (objc != 2) {
-		    return TCL_ERROR;
-		}
-		tkwin = Tk_MainWindow(interp);
-		atomName = Tcl_GetString(objv[0]);
-		string = search.pattern = Tcl_GetString(objv[1]);
-		search.atom = XInternAtom(Tk_Display(tkwin), atomName, False); 
-		search.proc = PropertySearch;
-	    }
-	    TestAndWaitForWindow(cntrPtr, &search);
-	    if (search.nMatches > 1) {
-		Tcl_AppendResult(interp, "more than one window matches \"", 
-				 search.pattern, "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	}
-	if (search.nMatches == 0) {
-	    Tcl_AppendResult(interp, "can't find window from pattern \"", 
-			     search.pattern, "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	window = search.window;
-#endif /*WIN32*/
-    }
-    if (*winPtr != None) {
-	Window root;
-
-	root = Tk_RootWindow(cntrPtr->tkwin);
-	if (Blt_ReparentWindow(cntrPtr->display, *winPtr, root, 
-		       cntrPtr->origX, cntrPtr->origY) 
-	    != TCL_OK) {
-	    Tcl_AppendResult(interp, "can't restore \"", 
-			 NameOfId(cntrPtr->display, *winPtr), 
-			"\" window to root", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	cntrPtr->flags &= ~CONTAINER_MAPPED;
-	if (cntrPtr->tkAdopted == NULL) {
-	    /* This wasn't a Tk window.  So deselect the event mask. */
-	    XSelectInput(cntrPtr->display, *winPtr, 0);
-	} else {
-	    MapTree(cntrPtr->display, *winPtr);
-	}
-	XMoveResizeWindow(cntrPtr->display, *winPtr, cntrPtr->origX,
-		  cntrPtr->origY, cntrPtr->origWidth, cntrPtr->origHeight);
-    }
-    cntrPtr->tkAdopted = tkAdopted;
-    *winPtr = window;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * XIDToString --
- *
- *	Converts the Tk window back to its string representation (i.e.
- *	its name).
- *
- * Results:
- *	The name of the window is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-XIDToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window parent,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Container *cntrPtr = (Container *) widgRec;
-    Window window = *(Window *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (cntrPtr->tkAdopted != NULL) {
-	objPtr = Tcl_NewStringObj(Tk_PathName(cntrPtr->tkAdopted), -1);
-    }  else {
-	objPtr = Tcl_NewStringObj(NameOfId(cntrPtr->display, window), -1);
-    }
-    return objPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(Container *cntrPtr)
-{
-    if ((cntrPtr->tkwin != NULL) && !(cntrPtr->flags & CONTAINER_REDRAW)) {
-	cntrPtr->flags |= CONTAINER_REDRAW;
-	Tcl_DoWhenIdle(DisplayContainer, cntrPtr);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * AdoptedWindowEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on the encapsulated window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets resized or exposed, it's redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AdoptedWindowEventProc(
-    ClientData clientData,	/* Information about the tab window. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    Container *cntrPtr = (Container *) clientData;
-
-    if ((eventPtr->type == CreateNotify) && (cntrPtr->adopted == None)) {
-	fprintf(stderr, "window found is %x\n", 
-		(unsigned int)eventPtr->xmaprequest.window);
-	if (Blt_ReparentWindow(cntrPtr->display, eventPtr->xmaprequest.window,
-		Tk_WindowId(cntrPtr->tkwin), cntrPtr->inset, cntrPtr->inset) 
-	    != TCL_OK) {
-	    fprintf(stderr, "can't adopt window \"%s\"\n", 
-		    NameOfId(cntrPtr->display, eventPtr->xmaprequest.window));
-	    return 0;
-	}
-	cntrPtr->adopted = eventPtr->xmaprequest.window;
-	XSelectInput(cntrPtr->display, cntrPtr->adopted, StructureNotifyMask);
-	XSelectInput(cntrPtr->display, Tk_RootWindow(cntrPtr->tkwin), 0);
-	return 1;
-    }
-    if (eventPtr->xany.window != cntrPtr->adopted) {
-        return 0;
-    }
-    if (eventPtr->type == DestroyNotify) {
-	cntrPtr->adopted = None;
-	EventuallyRedraw(cntrPtr);
-    }
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ContainerEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on container widgets.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ContainerEventProc(
-    ClientData clientData,	/* Information about window. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    Container *cntrPtr = clientData;
-
-    switch (eventPtr->type) {
-    case Expose:
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(cntrPtr);
-	}
-	break;
-
-    case FocusIn:
-    case FocusOut:
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		cntrPtr->flags |= CONTAINER_FOCUS;
-	    } else {
-		cntrPtr->flags &= ~CONTAINER_FOCUS;
-	    }
-	    EventuallyRedraw(cntrPtr);
-	}
-	break;
-
-    case ConfigureNotify:
-	EventuallyRedraw(cntrPtr);
-	break;
-
-    case DestroyNotify:
-	if (cntrPtr->tkwin != NULL) {
-	    cntrPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(cntrPtr->interp, cntrPtr->cmdToken);
-	}
-	if (cntrPtr->flags & CONTAINER_REDRAW) {
-	    Tcl_CancelIdleCall(DisplayContainer, cntrPtr);
-	}
-	Tcl_EventuallyFree(cntrPtr, DestroyContainer);
-	break;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ToplevelEventProc --
- *
- *	Some applications assume that they are always a toplevel
- *	window and play tricks accordingly.  For example, Netscape
- *	positions menus in relation to the toplevel.  But if the
- *	container's toplevel is moved, this positioning is wrong.  
- *	So watch if the toplevel is moved.  
- *
- *	[This would be easier and cleaner if Tk toplevels weren't so
- *	botched by the addition of menubars.  It's not enough to
- *	track the )
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ToplevelEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Container *cntrPtr = clientData;
-
-    if ((cntrPtr->adopted != None) && (cntrPtr->tkwin != NULL) &&
-	(eventPtr->type == ConfigureNotify)) {
-	cntrPtr->flags |= CONTAINER_MOVE;
-	EventuallyRedraw(cntrPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyContainer --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release
- * 	to clean up the internal structure of the widget at a safe
- * 	time (when no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyContainer(DestroyData dataPtr)
-{
-    Container *cntrPtr = (Container *) dataPtr;
-
-    if (cntrPtr->highlightGC != NULL) {
-	Tk_FreeGC(cntrPtr->display, cntrPtr->highlightGC);
-    }
-    if (cntrPtr->flags & CONTAINER_INIT) {
-	Tk_DeleteGenericHandler(AdoptedWindowEventProc, cntrPtr);
-    }
-    if (cntrPtr->tkToplevel != NULL) {
-	Tk_DeleteEventHandler(cntrPtr->tkToplevel, StructureNotifyMask, 
-		ToplevelEventProc, cntrPtr);
-    }
-    Blt_FreeOptions(configSpecs, (char *)cntrPtr, cntrPtr->display, 0);
-    Blt_Free(cntrPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureContainer --
- *
- * 	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or reconfigure)
- *	the widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- * 	returned, then interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for cntrPtr; old resources get freed, if there
- *	were any.  The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureContainer(
-    Tcl_Interp *interp,		/* Interpreter to report errors. */
-    Container *cntrPtr,		/* Information about widget; may or
-			         * may not already have values for
-			         * some fields. */
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-    int width, height;
-
-    if (Blt_ConfigureWidgetFromObj(interp, cntrPtr->tkwin, configSpecs, 
-	objc, objv, (char *)cntrPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    cntrPtr->inset = cntrPtr->borderWidth + cntrPtr->highlightWidth;
-    if (Tk_WindowId(cntrPtr->tkwin) == None) {
-	Tk_MakeWindowExist(cntrPtr->tkwin);
-    }
-    if (GetAdoptedWindowGeometry(interp, cntrPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_ConfigModified(configSpecs, "-window", "-name", "-command", 
-	   (char *)NULL)) {
-	cntrPtr->flags &= ~CONTAINER_MAPPED;
-	if (cntrPtr->adopted != None) {
-	    if (Blt_ReparentWindow(cntrPtr->display, cntrPtr->adopted,
-		    Tk_WindowId(cntrPtr->tkwin), cntrPtr->inset,
-		    cntrPtr->inset) != TCL_OK) {
-		Tcl_AppendResult(interp, "can't adopt window \"", 
-			 NameOfId(cntrPtr->display, cntrPtr->adopted), 
-			 "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    XSelectInput(cntrPtr->display, cntrPtr->adopted, 
-		 StructureNotifyMask);
-	    if ((cntrPtr->flags & CONTAINER_INIT) == 0) {
-		Tk_CreateGenericHandler(AdoptedWindowEventProc, cntrPtr);
-		cntrPtr->flags |= CONTAINER_INIT;
-	    }
-	}
-    }
-    /* Add the designated inset to the requested dimensions. */
-    width = cntrPtr->origWidth + 2 * cntrPtr->inset; 
-    height = cntrPtr->origHeight + 2 * cntrPtr->inset;
-
-    if (cntrPtr->reqWidth > 0) {
-	width = cntrPtr->reqWidth;
-    } 
-    if (cntrPtr->reqHeight > 0) {
-	height = cntrPtr->reqHeight;
-    } 
-    /* Set the requested width and height for the container. */
-    if ((Tk_ReqWidth(cntrPtr->tkwin) != width) ||
-	(Tk_ReqHeight(cntrPtr->tkwin) != height)) {
-	Tk_GeometryRequest(cntrPtr->tkwin, width, height);
-    }
-
-    /*
-     * GC for focus highlight.
-     */
-    gcMask = GCForeground;
-    gcValues.foreground = cntrPtr->highlightColor->pixel;
-    newGC = Tk_GetGC(cntrPtr->tkwin, gcMask, &gcValues);
-    if (cntrPtr->highlightGC != NULL) {
-	Tk_FreeGC(cntrPtr->display, cntrPtr->highlightGC);
-    }
-    cntrPtr->highlightGC = newGC;
-
-    EventuallyRedraw(cntrPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ContainerInstCmdDeleteProc --
- *
- *	This procedure can be called if the window was destroyed
- *	(tkwin will be NULL) and the command was deleted
- *	automatically.  In this case, we need to do nothing.
- *
- *	Otherwise this routine was called because the command was
- *	deleted.  Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ContainerInstCmdDeleteProc(
-    ClientData clientData)	/* Pointer to widget record for widget. */
-
-{
-    Container *cntrPtr = clientData;
-
-    if (cntrPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = cntrPtr->tkwin;
-	cntrPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ContainerCmd --
- *
- * 	This procedure is invoked to process the TCL command that
- * 	corresponds to a widget managed by this module. See the user
- * 	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ContainerCmd(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    Container *cntrPtr;
-    Tk_Window tkwin;
-    unsigned int mask;
-    char *path;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    tkwin = Tk_MainWindow(interp);
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, tkwin, path, (char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    cntrPtr = Blt_AssertCalloc(1, sizeof(Container));
-    cntrPtr->tkwin = tkwin;
-    cntrPtr->display = Tk_Display(tkwin);
-    cntrPtr->interp = interp;
-    cntrPtr->flags = 0;
-    cntrPtr->timeout = SEARCH_INTERVAL;
-    cntrPtr->borderWidth = cntrPtr->highlightWidth = 2;
-    cntrPtr->relief = TK_RELIEF_SUNKEN;
-    Tk_SetClass(tkwin, "Container");
-    Blt_SetWindowInstanceData(tkwin, cntrPtr);
-
-    if ((cntrPtr->flags & CONTAINER_INIT) == 0) {
-	Tk_CreateGenericHandler(AdoptedWindowEventProc, cntrPtr);
-	cntrPtr->flags |= CONTAINER_INIT;
-    }
-    {
-#ifdef notdef
-    	XSetWindowAttributes attr;
-	attr.event_mask = SubstructureRedirectMask | SubstructureNotifyMask;
-	    
-	XChangeWindowAttributes(cntrPtr->display, Tk_RootWindow(tkwin), 
-				CWEventMask, &attr);
-#endif
-	XSelectInput(cntrPtr->display, DefaultRootWindow(cntrPtr->display), 
-		     SubstructureNotifyMask | 
-		     StructureNotifyMask);
-    }
-    if (ConfigureContainer(interp, cntrPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(cntrPtr->tkwin);
-	return TCL_ERROR;
-    }
-    mask = (StructureNotifyMask | ExposureMask | FocusChangeMask);
-    Tk_CreateEventHandler(tkwin, mask, ContainerEventProc, cntrPtr);
-    cntrPtr->cmdToken = Tcl_CreateObjCommand(interp, path, ContainerInstCmd,
-	cntrPtr, ContainerInstCmdDeleteProc);
-
-    Tk_MakeWindowExist(tkwin);
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayContainer --
- *
- * 	This procedure is invoked to display the widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- * 	The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayContainer(ClientData clientData)
-{
-    Container *cntrPtr = clientData;
-    Drawable drawable;
-    int width, height;
-
-    cntrPtr->flags &= ~CONTAINER_REDRAW;
-    if (cntrPtr->tkwin == NULL) {
-	return;			/* Window has been destroyed. */
-    }
-    if (!Tk_IsMapped(cntrPtr->tkwin)) {
-	return;
-    }
-    drawable = Tk_WindowId(cntrPtr->tkwin);
-#ifndef WIN32
-    if (cntrPtr->tkToplevel == NULL) {
-	Window window;
-	Tk_Window tkToplevel;
-
-	/* Create an event handler for the toplevel of the container. */
-	tkToplevel = Blt_Toplevel(cntrPtr->tkwin);
-	window = Blt_GetWindowId(tkToplevel);
-	cntrPtr->tkToplevel = Tk_IdToWindow(cntrPtr->display, window); 
-	if (cntrPtr->tkToplevel != NULL) {
-	    Tk_CreateEventHandler(cntrPtr->tkToplevel, StructureNotifyMask, 
-		ToplevelEventProc, cntrPtr);
-	}
-    }
-#endif /* WIN32 */
-    if (cntrPtr->adopted != None) {
-#ifndef WIN32
-	if (cntrPtr->flags & CONTAINER_MOVE) {
-	    /* 
-	     * Some applications like Netscape cache its location to
-	     * position its popup menus. But when it's reparented, it
-	     * thinks it's always at the same position.  It doesn't
-	     * know when the container's moved.  The hack here is to
-	     * force the application to update its coordinates by
-	     * moving the adopted window (over by 1 pixel and
-	     * then back in case the application is comparing the last
-	     * location).  
-	     */
-	    XMoveWindow(cntrPtr->display, cntrPtr->adopted,
-			cntrPtr->inset + 1, cntrPtr->inset + 1);
-	    XMoveWindow(cntrPtr->display, cntrPtr->adopted,
-			cntrPtr->inset, cntrPtr->inset);
-	    cntrPtr->flags &= ~CONTAINER_MOVE;
-	}
-#endif /* WIN32 */
-	/* Compute the available space inside the container. */
-	width = Tk_Width(cntrPtr->tkwin) - (2 * cntrPtr->inset);
-	height = Tk_Height(cntrPtr->tkwin) - (2 * cntrPtr->inset);
-
-	if ((cntrPtr->adoptedX != cntrPtr->inset) || 
-	    (cntrPtr->adoptedY != cntrPtr->inset) ||
-	    (cntrPtr->adoptedWidth != width) || 
-	    (cntrPtr->adoptedHeight != height)) {
-	    /* Resize the window to the new size */
-	    if (width < 1) {
-		width = 1;
-	    }
-	    if (height < 1) {
-		height = 1;
-	    }
-	    XMoveResizeWindow(cntrPtr->display, cntrPtr->adopted,
-		cntrPtr->inset, cntrPtr->inset, width, height);
-	    cntrPtr->adoptedWidth = width;
-	    cntrPtr->adoptedHeight = height;
-	    cntrPtr->adoptedX = cntrPtr->adoptedY = cntrPtr->inset;
-	    if (cntrPtr->tkAdopted != NULL) {
-		Tk_ResizeWindow(cntrPtr->tkAdopted, width, height);
-	    }
-	}
-#ifndef WIN32
-	if (!(cntrPtr->flags & CONTAINER_MAPPED)) {
-	    XMapWindow(cntrPtr->display, cntrPtr->adopted);
-	    cntrPtr->flags |= CONTAINER_MAPPED;
-	}
-#endif
-	if (cntrPtr->borderWidth > 0) {
-	    Blt_Draw3DRectangle(cntrPtr->tkwin, drawable, cntrPtr->border,
-		cntrPtr->highlightWidth, cntrPtr->highlightWidth,
-		Tk_Width(cntrPtr->tkwin) - 2 * cntrPtr->highlightWidth,
-		Tk_Height(cntrPtr->tkwin) - 2 * cntrPtr->highlightWidth,
-		cntrPtr->borderWidth, cntrPtr->relief);
-	}
-    } else {
-	Blt_Fill3DRectangle(cntrPtr->tkwin, drawable, cntrPtr->border,
-	    cntrPtr->highlightWidth, cntrPtr->highlightWidth,
-	    Tk_Width(cntrPtr->tkwin) - 2 * cntrPtr->highlightWidth,
-	    Tk_Height(cntrPtr->tkwin) - 2 * cntrPtr->highlightWidth,
-	    cntrPtr->borderWidth, cntrPtr->relief);
-    }
-
-    /* Draw focus highlight ring. */
-    if (cntrPtr->highlightWidth > 0) {
-	XColor *color;
-	GC gc;
-
-	color = (cntrPtr->flags & CONTAINER_FOCUS)
-	    ? cntrPtr->highlightColor : cntrPtr->highlightBgColor;
-	gc = Tk_GCForColor(color, drawable);
-	Tk_DrawFocusHighlight(cntrPtr->tkwin, gc, cntrPtr->highlightWidth,
-	    drawable);
-    }
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * SendOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SendOp(cntrPtr, interp, objc, objv)
-    Container *cntrPtr;
-    Tcl_Interp *interp;
-    int objc;			/* Not used. */
-    Tcl_Obj *const *objv;
-{
-
-    if (cntrPtr->adopted != None) {
-	XEvent event;
-	char *p;
-	KeySym symbol;
-	int xid;
-	Window window;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &xid) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	window = (Window)xid;
-	event.xkey.type = KeyPress;
-	event.xkey.serial = 0;
-	event.xkey.display = cntrPtr->display;
-	event.xkey.window = event.xkey.subwindow = window;
-	event.xkey.time = CurrentTime;
-	event.xkey.x = event.xkey.x = 100;
-	event.xkey.root = Tk_RootWindow(cntrPtr->tkwin);	
-	event.xkey.x_root = Tk_X(cntrPtr->tkwin) + cntrPtr->inset;
-	event.xkey.x_root = Tk_Y(cntrPtr->tkwin) + cntrPtr->inset;
-	event.xkey.state = 0;
-	event.xkey.same_screen = TRUE;
-	
-	
-	for (p = Tcl_GetString(objv[3]); *p != '\0'; p++) {
-	    if (*p == '\r') {
-		symbol = XStringToKeysym("Return");
-	    } else if (*p == ' ') {
-		symbol = XStringToKeysym("space");
-	    } else {
-		char save;
-
-		save = *(p+1);
-		*(p+1) = '\0';
-		symbol = XStringToKeysym(p);
-		*(p+1) = save;
-	    }
-	    event.xkey.keycode = XKeysymToKeycode(cntrPtr->display, symbol);
-	    event.xkey.type = KeyPress;
-	    if (!XSendEvent(cntrPtr->display, window, False, KeyPress, &event)) {
-		fprintf(stderr, "send press event failed\n");
-	    }
-	    event.xkey.type = KeyRelease;
-	    if (!XSendEvent(cntrPtr->display, window, False, KeyRelease, 
-			    &event)) {
-		fprintf(stderr, "send release event failed\n");
-	    }
-	}
-    }
-    return TCL_OK;
-}
-#endif
-
-#ifndef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FindOp(
-    Container *cntrPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Window root;
-    SearchInfo search;
-    char *string;
-
-    memset(&search, 0, sizeof(search));
-    search.pattern = Tcl_GetString(objv[3]);
-    Tcl_DStringInit(&search.dString);
-    
-    search.saveNames = TRUE;	/* Indicates to record all matching XIDs. */
-    string = Tcl_GetString(objv[2]);
-    if (strcmp(string, "-name") == 0) {
-	search.proc = NameSearch;
-    } else if (strcmp(string, "-command") == 0) {
-	search.proc = CmdSearch;
-    } else {
-	Tcl_AppendResult(interp, "missing \"-name\" or \"-command\" switch",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    root = Tk_RootWindow(cntrPtr->tkwin);
-    (*search.proc)(cntrPtr->display, root, &search);
-    Tcl_DStringResult(interp, &search.dString);
-    return TCL_OK;
-}
-#endif /*WIN32*/
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(
-    Container *cntrPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, cntrPtr->tkwin, configSpecs,
-	(char *)cntrPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or reconfigure)
- *	the widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for cntrPtr; old resources get freed, if there
- *	were any.  The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    Container *cntrPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, cntrPtr->tkwin, configSpecs,
-	    (char *)cntrPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, cntrPtr->tkwin, configSpecs,
-	    (char *)cntrPtr, objv[2], 0);
-    }
-    if (ConfigureContainer(interp, cntrPtr, objc - 2, objv + 2,
-	    BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    EventuallyRedraw(cntrPtr);
-    return TCL_OK;
-}
-
-
-#ifndef WIN32
-static int
-IgnoreErrors(Display *display, XErrorEvent *eventPtr)
-{
-    return 0;
-}
-
-
-static int
-GetAtomName(Display *display, Atom atom, char **namePtr)
-{
-    char *atomName;
-    XErrorHandler handler;
-    static char name[200];
-    int result;
-
-    handler = XSetErrorHandler(IgnoreErrors);
-    atomName = XGetAtomName(display, atom);
-    XSetErrorHandler(handler);
-
-    name[0] = '\0';
-    if (atomName == NULL) {
-	sprintf(name, "undefined atom # 0x%lx", atom);
-	result = FALSE;
-    } else {
-	size_t length = strlen(atomName);
-
-	if (length > 200) {
-	    length = 200;
-	}
-	memcpy(name, atomName, length);
-	name[length] = '\0';
-	XFree(atomName);
-	result = TRUE;
-    }
-    *namePtr = name;
-    return result;
-}
-
-static void
-FillTree(Container *cntrPtr, Window window, Blt_Tree tree, Blt_TreeNode parent)
-{
-    char string[200];
-    Atom *atoms;
-    int i;
-    int nProps;
-    Blt_Chain chain;
-
-    /* Process the window's descendants. */
-    atoms = XListProperties(cntrPtr->display, window, &nProps);
-    for (i = 0; i < nProps; i++) {
-	char *name;
-
-	if (GetAtomName(cntrPtr->display, atoms[i], &name)) {
-	    char *data;
-	    int result, format;
-	    Atom typeAtom;
-	    unsigned long nItems, bytesAfter;
-	    
-	    result = XGetWindowProperty(
-		cntrPtr->display, /* Display of window. */
-		window,		/* Window holding the property. */
-		atoms[i],	/* Name of property. */
-	        0,		/* Offset of data (for multiple reads). */
-		GetMaxPropertySize(cntrPtr->display), 
-		/* Maximum number of items to read. */
-		False,		/* If true, delete the property. */
-	        XA_STRING,	/* Desired type of property. */
-	        &typeAtom,	/* (out) Actual type of the property. */
-	        &format,	/* (out) Actual format of the property. */
-	        &nItems,	/* (out) # of items in specified format. */
-	        &bytesAfter,	/* (out) # of bytes remaining to be read. */
-		(unsigned char **)&data);
-#ifdef notdef
-	    fprintf(stderr, "%x: property name is %s (format=%d(%d) type=%d result=%d)\n", window, name, format, nItems, typeAtom, result == Success);
-#endif
-	    if (result == Success) {
-		if (format == 8) {
-		    if (data != NULL) {
-			Blt_Tree_SetValue(cntrPtr->interp, tree, parent, name, 
-					  Tcl_NewStringObj(data, nItems));
-		    }
-		} else if (typeAtom == XA_WINDOW) {
-		    int *iPtr = (int *)&data;
-		    sprintf(string, "0x%x", *iPtr);
-		    Blt_Tree_SetValue(cntrPtr->interp, tree, parent, name, 
-					  Tcl_NewStringObj(string, -1));
-		} else {
-		    Blt_Tree_SetValue(cntrPtr->interp, tree, parent, name, 
-					  Tcl_NewStringObj("???", -1));
-		}
-		XFree(data);
-	    }
-	}
-    }	
-    if (atoms != NULL) {
-	XFree(atoms);
-    }
-    chain = GetChildren(cntrPtr->display, window);
-    if (chain != NULL) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Blt_TreeNode child;
-	    char *wmName;
-	    Window w;
-
-	    w = (Window)Blt_Chain_GetValue(link);
-	    sprintf(string, "0x%x", (int)w);
-	    if (XFetchName(cntrPtr->display, w, &wmName)) {
-		child = Blt_Tree_CreateNode(tree, parent, wmName, -1);
-		if (w == 0x220001c) {
-		    fprintf(stderr, "found xterm (%s)\n", wmName);
-		}
-		XFree(wmName);
-	    } else {
-		child = Blt_Tree_CreateNode(tree, parent, string, -1);
-	    }
-	    if (w == 0x220001c) {
-		fprintf(stderr, "found xterm (%s) node=%ld\n", string,
-			(long)Blt_Tree_NodeId(child));
-	    }
-	    Blt_Tree_SetValue(cntrPtr->interp, tree, child, "id", 
-			      Tcl_NewStringObj(string, -1));
-	    FillTree(cntrPtr, w, tree, child);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-
-}
-/*
- *---------------------------------------------------------------------------
- *
- * TreeOp --
- *
- * .c tree $tree
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeOp(
-    Container *cntrPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Window root;
-    Blt_TreeNode node;
-    char string[200];
-    Blt_Tree tree;
-
-    tree = Blt_Tree_Open(interp, Tcl_GetString(objv[2]), 0);
-    if (tree == NULL) {
-	return TCL_ERROR;
-    }
-    node = Blt_Tree_RootNode(tree);
-    Blt_Tree_RelabelNode(tree, node, "root");
-    root = Tk_RootWindow(cntrPtr->tkwin);
-    sprintf(string, "0x%ux", (unsigned int)root);
-    Blt_Tree_SetValue(interp, tree, node, "id", Tcl_NewStringObj(string, -1));
-    FillTree(cntrPtr, root, tree, node);
-    Blt_Tree_Close(tree);
-    return TCL_OK;
-}
-#endif /*WIN32*/
-
-/*
- *---------------------------------------------------------------------------
- *
- * ContainerCmd --
- *
- * 	This procedure is invoked to process the "container" command.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec opSpecs[] =
-{
-    {"cget", 2, CgetOp, 3, 3, "option",},
-    {"configure", 2, ConfigureOp, 2, 0, "?option value?...",},
-#ifndef WIN32
-    {"find", 1, FindOp, 3, 4, "?-command|-name? pattern",},
-#endif /*WIN32*/
-#ifdef notdef
-    {"send", 1, SendOp, 4, 4, "window string",},
-#endif
-#ifndef WIN32
-    {"tree", 1, TreeOp, 3, 3, "treeName",},
-#endif /*WIN32*/
-};
-
-static int nSpecs = sizeof(opSpecs) / sizeof(Blt_OpSpec);
-
-static int
-ContainerInstCmd(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Vector of argument strings. */
-{
-    ContainerCmdProc *proc;
-    Container *cntrPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSpecs, opSpecs, BLT_OP_ARG1, objc, objv, 
-	    0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(cntrPtr);
-    result = (*proc)(cntrPtr, interp, objc, objv);
-    Tcl_Release(cntrPtr);
-    return result;
-}
-
-int
-Blt_ContainerCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "container", ContainerCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_CONTAINER */
-
diff --git a/blt3.0/src/bltCoreInit.c b/blt3.0/src/bltCoreInit.c
deleted file mode 100644
index 4753eb1..0000000
--- a/blt3.0/src/bltCoreInit.c
+++ /dev/null
@@ -1,384 +0,0 @@
-
-/*
- * bltCoreInit.c --
- *
- * This module initials the non-Tk command of the BLT toolkit, registering the
- * commands with the TCL interpreter.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltNsUtil.h"
-#include "bltArrayObj.h"
-#include "bltMath.h"
-
-#ifndef BLT_LIBRARY
-#  ifdef WIN32
-#    define BLT_LIBRARY  "c:/Program Files/Tcl/lib/blt"##BLT_VERSION
-#  else
-#    define BLT_LIBRARY "unknown"
-#  endif
-#endif
-
-#if (_TCL_VERSION >= _VERSION(8,5,0)) 
-#define TCL_VERSION_LOADED	TCL_PATCH_LEVEL
-#else 
-#define TCL_VERSION_LOADED	TCL_VERSION
-#endif
-
-static double bltNaN;
-
-BLT_EXTERN Tcl_AppInitProc Blt_core_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_core_SafeInit;
-
-static Tcl_MathProc MinMathProc, MaxMathProc;
-static char libPath[1024] =
-{
-    BLT_LIBRARY
-};
-
-/*
- * Script to set the BLT library path in the variable global "blt_library"
- *
- * Checks the usual locations for a file (bltGraph.pro) from the BLT library.
- * The places searched in order are
- *
- *	$BLT_LIBRARY
- *	$BLT_LIBRARY/blt2.4
- *      $BLT_LIBRARY/..
- *      $BLT_LIBRARY/../blt2.4
- *	$blt_libPath
- *	$blt_libPath/blt2.4
- *      $blt_libPath/..
- *      $blt_libPath/../blt2.4
- *	$tcl_library
- *	$tcl_library/blt2.4
- *      $tcl_library/..
- *      $tcl_library/../blt2.4
- *	$env(TCL_LIBRARY)
- *	$env(TCL_LIBRARY)/blt2.4
- *      $env(TCL_LIBRARY)/..
- *      $env(TCL_LIBRARY)/../blt2.4
- *
- *  The TCL variable "blt_library" is set to the discovered path.  If the file
- *  wasn't found, no error is returned.  The actual usage of $blt_library is
- *  purposely deferred so that it can be set from within a script.
- */
-
-/* FIXME: Change this to a namespace procedure in 3.0 */
-
-static char initScript[] =
-{"\n\
-global blt_library blt_libPath blt_version tcl_library env\n\
-set blt_library {}\n\
-set path {}\n\
-foreach var { env(BLT_LIBRARY) blt_libPath tcl_library env(TCL_LIBRARY) } { \n\
-    if { ![info exists $var] } { \n\
-        continue \n\
-    } \n\
-    set path [set $var] \n\
-    if { [file readable [file join $path bltGraph.pro]] } { \n\
-        set blt_library $path\n\
-        break \n\
-    } \n\
-    set path [file join $path blt$blt_version ] \n\
-    if { [file readable [file join $path bltGraph.pro]] } { \n\
-        set blt_library $path\n\
-        break \n\
-    } \n\
-    set path [file dirname [set $var]] \n\
-    if { [file readable [file join $path bltGraph.pro]] } { \n\
-        set blt_library $path\n\
-        break \n\
-    } \n\
-    set path [file join $path blt$blt_version ] \n\
-    if { [file readable [file join $path bltGraph.pro]] } { \n\
-        set blt_library $path\n\
-        break \n\
-    } \n\
-} \n\
-if { $blt_library != \"\" } { \n\
-    global auto_path \n\
-    lappend auto_path $blt_library \n\
-}\n\
-unset var path\n\
-\n"
-};
-
-
-static Tcl_AppInitProc *cmdProcs[] =
-{
-#ifndef NO_BGEXEC
-    Blt_Base64CmdInitProc,
-#endif
-#ifndef NO_BGEXEC
-    Blt_BgexecCmdInitProc,
-#endif
-#ifndef NO_CRC32
-    Blt_Crc32CmdInitProc,
-#endif
-#ifndef NO_CSV
-    Blt_CsvCmdInitProc,
-#endif
-#ifndef NO_DATATABLE
-    Blt_TableCmdInitProc,
-#endif
-#ifndef NO_DDE
-    Blt_DdeCmdInitProc,
-#endif
-#ifndef NO_DEBUG
-    Blt_DebugCmdInitProc,
-#endif
-#ifndef NO_SPLINE
-    Blt_SplineCmdInitProc,
-#endif
-#ifndef NO_TREE
-    Blt_TreeCmdInitProc,
-#endif
-#ifndef NO_VECTOR
-    Blt_VectorCmdInitProc,
-#endif
-#ifndef NO_WATCH
-    Blt_WatchCmdInitProc,
-#endif
-    (Tcl_AppInitProc *) NULL
-};
-
-Tcl_Obj *
-Blt_EmptyStringObj(void) 
-{
-    static Tcl_Obj *emptyStringObjPtr;
-
-    if (emptyStringObjPtr == NULL) {
-	emptyStringObjPtr = Tcl_NewStringObj("", 0);
-    }
-    Tcl_IncrRefCount(emptyStringObjPtr);
-    return emptyStringObjPtr;
-}
-
-double 
-Blt_NaN(void)
-{
-    return bltNaN;
-}
-
-static double
-MakeNaN(void)
-{
-    union DoubleValue {
-	unsigned int words[2];
-	double value;
-    } result;
-
-#ifdef WORDS_BIGENDIAN
-    result.words[0] = 0x7ff80000;
-    result.words[1] = 0x00000000;
-#else
-    result.words[0] = 0x00000000;
-    result.words[1] = 0x7ff80000;
-#endif
-    return result.value;
-}
-
-/* ARGSUSED */
-static int
-MinMathProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tcl_Value *argsPtr,
-    Tcl_Value *resultPtr)
-{
-    Tcl_Value *op1Ptr, *op2Ptr;
-
-    op1Ptr = argsPtr, op2Ptr = argsPtr + 1;
-    if ((op1Ptr->type == TCL_INT) && (op2Ptr->type == TCL_INT)) {
-	resultPtr->intValue = MIN(op1Ptr->intValue, op2Ptr->intValue);
-	resultPtr->type = TCL_INT;
-    } else {
-	double a, b;
-
-	a = (op1Ptr->type == TCL_INT) 
-	    ? (double)op1Ptr->intValue : op1Ptr->doubleValue;
-	b = (op2Ptr->type == TCL_INT)
-	    ? (double)op2Ptr->intValue : op2Ptr->doubleValue;
-	resultPtr->doubleValue = MIN(a, b);
-	resultPtr->type = TCL_DOUBLE;
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-MaxMathProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tcl_Value *argsPtr,
-    Tcl_Value *resultPtr)
-{
-    Tcl_Value *op1Ptr, *op2Ptr;
-
-    op1Ptr = argsPtr, op2Ptr = argsPtr + 1;
-    if ((op1Ptr->type == TCL_INT) && (op2Ptr->type == TCL_INT)) {
-	resultPtr->intValue = MAX(op1Ptr->intValue, op2Ptr->intValue);
-	resultPtr->type = TCL_INT;
-    } else {
-	double a, b;
-
-	a = (op1Ptr->type == TCL_INT)
-	    ? (double)op1Ptr->intValue : op1Ptr->doubleValue;
-	b = (op2Ptr->type == TCL_INT)
-	    ? (double)op2Ptr->intValue : op2Ptr->doubleValue;
-	resultPtr->doubleValue = MAX(a, b);
-	resultPtr->type = TCL_DOUBLE;
-    }
-    return TCL_OK;
-}
-
-static int
-SetLibraryPath(Tcl_Interp *interp)
-{
-    Tcl_DString dString;
-    const char *value;
-
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppend(&dString, libPath, -1);
-#ifdef WIN32
-    {
-	HKEY key;
-	DWORD result;
-#  ifndef BLT_REGISTRY_KEY
-#    define BLT_REGISTRY_KEY "Software\\BLT\\" BLT_VERSION "\\" TCL_VERSION
-#  endif
-	result = RegOpenKeyEx(
-	      HKEY_LOCAL_MACHINE, /* Parent key. */
-	      BLT_REGISTRY_KEY,	/* Path to sub-key. */
-	      0,		/* Reserved. */
-	      KEY_READ,		/* Security access mask. */
-	      &key);		/* Resulting key.*/
-
-	if (result == ERROR_SUCCESS) {
-	    DWORD size;
-
-	    /* Query once to get the size of the string needed */
-	    result = RegQueryValueEx(key, "BLT_LIBRARY", NULL, NULL, NULL, 
-		     &size);
-	    if (result == ERROR_SUCCESS) {
-		Tcl_DStringSetLength(&dString, size);
-		/* And again to collect the string. */
-		RegQueryValueEx(key, "BLT_LIBRARY", NULL, NULL,
-				(LPBYTE)Tcl_DStringValue(&dString), &size);
-		RegCloseKey(key);
-	    }
-	}
-    }
-#endif /* WIN32 */
-    value = Tcl_SetVar(interp, "blt_libPath", Tcl_DStringValue(&dString),
-	TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG);
-    Tcl_DStringFree(&dString);
-    if (value == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-/*LINTLIBRARY*/
-int
-Blt_core_Init(Tcl_Interp *interp) /* Interpreter to add extra commands */
-{
-    Tcl_AppInitProc **p;
-    Tcl_Namespace *nsPtr;
-    Tcl_ValueType args[2];
-    const char *result;
-    const int isExact = 1;
-
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION_LOADED, isExact) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    Blt_AllocInit(NULL, NULL, NULL);
-
-    /*
-     * Check that the versions of TCL that have been loaded are the same ones
-     * that BLT was compiled against.
-     */
-    if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION_LOADED, isExact) == NULL) {
-	return TCL_ERROR;
-    }
-
-    /* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl
-     * variables. We'll use them in the following script. */
-
-    result = Tcl_SetVar(interp, "blt_version", BLT_VERSION, TCL_GLOBAL_ONLY);
-    if (result == NULL) {
-	return TCL_ERROR;
-    }
-    result = Tcl_SetVar(interp, "blt_patchLevel", BLT_PATCH_LEVEL, 
-			TCL_GLOBAL_ONLY);
-    if (result == NULL) {
-	return TCL_ERROR;
-    }
-    if (SetLibraryPath(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_Eval(interp, initScript) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-
-    nsPtr = Tcl_FindNamespace(interp, "::blt", (Tcl_Namespace *)NULL, 0);
-    if (nsPtr == NULL) {
-	nsPtr = Tcl_CreateNamespace(interp, "::blt", NULL, NULL);
-	if (nsPtr == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    /* Initialize the BLT commands that only require Tcl. */
-    for (p = cmdProcs; *p != NULL; p++) {
-	if ((**p) (interp) != TCL_OK) {
-	    Tcl_DeleteNamespace(nsPtr);
-	    return TCL_ERROR;
-	}
-    }
-    args[0] = args[1] = TCL_EITHER;
-    Tcl_CreateMathFunc(interp, "min", 2, args, MinMathProc, (ClientData)0);
-    Tcl_CreateMathFunc(interp, "max", 2, args, MaxMathProc, (ClientData)0);
-    Blt_RegisterArrayObj();
-    bltNaN = MakeNaN();
-    if (Tcl_PkgProvide(interp, "blt_core", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*LINTLIBRARY*/
-int
-Blt_core_SafeInit(Tcl_Interp *interp) /* Interpreter to add extra commands */
-{
-    return Blt_core_Init(interp);
-}
-
-#ifdef USE_DLL
-#  include "bltWinDll.c"
-#endif
diff --git a/blt3.0/src/bltCrc32.c b/blt3.0/src/bltCrc32.c
deleted file mode 100644
index 3ac2add..0000000
--- a/blt3.0/src/bltCrc32.c
+++ /dev/null
@@ -1,229 +0,0 @@
-
-/*
- * bltCrc32.c --
- *
- * This module implements a CRC32 procedure for the BLT toolkit.
- *
- *	Copyright 1991-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#include <stdio.h>
-
-/* open a file
- * calculate the CRC32 of the entire contents
- * return the CRC
- * if there is an error rdet the global variable Crcerror
- */
-
-/* -------------------------------------------------------------------------- */
-
-/* 
- * this is the CRC32 lookup table
- * thanks Gary S. Brown 
- * 64 lines of 4 values for a 256 dword table (1024 bytes)
- */
-static unsigned long crc32[256] =
-{				/* CRC polynomial 0xedb88320 */
-    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 
-    0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
-    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 
-    0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
-    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 
-    0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
-    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 
-    0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
-    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 
-    0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
-    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 
-    0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
-    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 
-    0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
-    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 
-    0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
-    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 
-    0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 
-    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 
-    0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 
-    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 
-    0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
-    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 
-    0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
-    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 
-    0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
-    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 
-    0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
-    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 
-    0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
-    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 
-    0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
-    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 
-    0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
-    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 
-    0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
-    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 
-    0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
-    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 
-    0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
-    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 
-    0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
-    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
-}; 
-
-#define CRC32(c, b) (crc32[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
-
-static int 
-Crc32FromObj(Tcl_Obj *objPtr, unsigned long *sumPtr)
-{
-    char *bp, *bend, *buffer;
-    int nBytes;
-    unsigned long sum;
-    
-    buffer = Tcl_GetStringFromObj(objPtr, &nBytes);
-    sum = *sumPtr;
-    for (bp = buffer, bend = bp + nBytes; bp < bend; bp++) {
-	sum = CRC32(sum, *bp);
-    }
-    *sumPtr = sum;
-    return TCL_OK;
-}
-
-static int 
-Crc32File(Tcl_Interp *interp, char *fileName, unsigned long *sumPtr)
-{
-    Tcl_Channel channel;
-    int closeChannel;
-    int done;
-    unsigned long sum;
-#define BUFFSIZE	8192
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-	if ((mode & TCL_WRITABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for writing", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (Tcl_SetChannelOption(interp, channel, "-translation", "binary") 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    done = FALSE;
-    sum = *sumPtr;
-    while (!done) {
-	char *bp, *bend;
-	int nBytes;
-#define BUFFSIZE	8192
-	char buffer[BUFFSIZE];
-
-	nBytes = Tcl_Read(channel, buffer, sizeof(char) * BUFFSIZE);
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "\nread error: ", Tcl_PosixError(interp),
-			     (char *)NULL);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return TCL_ERROR;
-	}
-	done = Tcl_Eof(channel);
-	for (bp = buffer, bend = bp + nBytes; bp < bend; bp++) {
-	    sum = CRC32(sum, *bp);
-	}
-    }
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    *sumPtr = sum;
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-Crc32Cmd(
-   ClientData clientData,	/* Not used. */
-   Tcl_Interp *interp, 
-   int objc, 
-   Tcl_Obj *const *objv)
-{
-    unsigned long crc;
-
-    crc = 0L;
-    crc = crc ^ 0xffffffffUL;
-    if (objc == 2) {
-	if (Crc32File(interp, Tcl_GetString(objv[1]), &crc) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else if (objc == 3) {
-	char *string;
-
-        string = Tcl_GetString(objv[1]);
-        if (strcmp(string, "-data") == 0) {
-	    if (Crc32FromObj(objv[2], &crc) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-         } else { 
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ?fileName? ?-data dataString?", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ?fileName? ?-data dataString?", 
-		(char *)NULL);
-	    return TCL_ERROR;
-    }
-    crc = crc ^ 0xffffffffUL;
-    {
-	char buf[200];
-
-	sprintf_s(buf, 200, "%lx", crc);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), buf, -1);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Crc32CmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"crc32", Crc32Cmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltCsv.c b/blt3.0/src/bltCsv.c
deleted file mode 100644
index 3ef33b7..0000000
--- a/blt3.0/src/bltCsv.c
+++ /dev/null
@@ -1,414 +0,0 @@
-
-/*
- * bltCsv.c --
- *
- * This module implements a CSV reader procedure for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-static int
-ParseCsvChannel(Tcl_Interp *interp, Tcl_Channel channel)
-{
-    int inQuotes, isQuoted, isPath;
-    char *fp, *field;
-    Tcl_DString dString;
-    Tcl_Obj *listObjPtr, *recordObjPtr;
-    int fieldSize;
-
-    isPath = isQuoted = inQuotes = FALSE;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    recordObjPtr = NULL;
-
-    Tcl_DStringInit(&dString);
-    fieldSize = 128;
-    Tcl_DStringSetLength(&dString, fieldSize + 1);
-    fp = field = Tcl_DStringValue(&dString);
-    for (;;) {
-	char *bp, *bend;
-#define BUFFSIZE	8191
-	char buffer[BUFFSIZE+1];
-	int nBytes;
-
-	nBytes = Tcl_Read(channel, buffer, sizeof(char) * BUFFSIZE);
-	for (bp = buffer, bend = bp + nBytes; bp < bend; bp++) {
-	    switch (*bp) {
-	    case '\t':
-	    case ' ':
-		/* 
-		 * Add whitespace only if it's not leading or we're inside of
-		 * quotes or a path.
-		 */
-		if ((fp != field) || (inQuotes) || (isPath)) {
-		    *fp++ = *bp; 
-		}
-		break;
-
-	    case '\\':
-		/* 
-		 * Handle special case CSV files that allow unquoted paths.
-		 * Example:  ...,\this\path " should\have been\quoted\,...
-		 */
-		if (fp == field) {
-		    isPath = TRUE; 
-		}
-		*fp++ = *bp;
-		break;
-
-	    case '"':
-		if (inQuotes) {
-		    if (*(bp+1) == '"') {
-			*fp++ = '"';
-			bp++;
-		    } else {
-			inQuotes = FALSE;
-		    }
-		} else {
-		    /* 
-		     * If the quote doesn't start a field, then treat all
-		     * quotes in the field as ordinary characters.
-		     */
-		    if (fp == field) {
-			isQuoted = inQuotes = TRUE; 
-		    } else {
-			*fp++ = *bp;
-		    }
-		}
-		break;
-
-	    case ',':
-	    case '\n':
-		if (inQuotes) {
-		    *fp++ = *bp;	/* Copy the comma or newline. */
-		} else {
-		    char *last;
-		    Tcl_Obj *objPtr;
-
-		    if ((isPath) && (*bp == ',') && (fp != field) && 
-			(*(fp - 1) != '\\')) {
-			*fp++ = *bp;	/* Copy the comma or newline. */
-			break;
-		    }    
-		    /* "last" points to the character after the last character
-		     * in the field. */
-		    last = fp;	
-
-		    /* Remove trailing spaces only if the field wasn't
-		     * quoted. */
-		    if ((!isQuoted) && (!isPath)) {
-			while ((last > field) && (isspace(*(last - 1)))) {
-			    last--;
-			}
-		    }
-		    if (recordObjPtr == NULL) {
-			if (*bp == '\n') {
-			    break;	/* Ignore empty lines. */
-			}
-			recordObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-		    }
-		    /* End of field. Append field to record. */
-		    objPtr = Tcl_NewStringObj(field, last - field);
-		    Tcl_ListObjAppendElement(interp, recordObjPtr, objPtr);
-		    if (*bp == '\n') {
-			/* On newlines append the record to the list. */
-			Tcl_ListObjAppendElement(interp, listObjPtr, 
-						 recordObjPtr);
-			recordObjPtr = NULL;
-		    }
-		    fp = field;
-		    isPath = isQuoted = FALSE;
-		}
-		break;
-
-	    default:
-		*fp++ = *bp;		/* Copy the character. */
-	    }
-	    if ((fp - field) >= fieldSize) {
-		int offset;
-
-		/* 
-		 * We've exceeded the current maximum size of the field.
-		 * Double the size of the field, but make sure to reset the
-		 * pointers (fp and field) to the (possibly) new memory
-		 * location.
-		 */
-		offset = fp - field;
-		fieldSize += fieldSize;
-		Tcl_DStringSetLength(&dString, fieldSize + 1);
-		field = Tcl_DStringValue(&dString);
-		fp = field + offset;
-	    }
-	}
-	if (nBytes < 1) {
-	    /* 
-	     * We're reached the end of input. But there may not have been a
-	     * final newline to trigger the final appends. So check if 1) a
-	     * last field is still needs appending the the last record and if
-	     * 2) a last record is still needs appending to the list.
-	     */
-	    if (fp != field) {
-		char *last;
-		Tcl_Obj *objPtr;
-
-		last = fp;
-		/* Remove trailing spaces */
-		while (isspace(*(last - 1))) {
-		    last--;
-		}
-		objPtr = Tcl_NewStringObj(field, last - field);
-		if (recordObjPtr == NULL) {
-		    recordObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-		}
-	    }		    
-	    if (recordObjPtr != NULL) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, recordObjPtr);
-	    }
-	    break;
-	}
-    }
-    Tcl_DStringFree(&dString);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static int
-ParseCsvData(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    int inQuotes, isQuoted, isPath;
-    char *fp, *field;
-    Tcl_DString dString;
-    Tcl_Obj *listObjPtr, *recordObjPtr;
-    int fieldSize;
-
-    isPath = isQuoted = inQuotes = FALSE;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    recordObjPtr = NULL;
-
-    Tcl_DStringInit(&dString);
-    fieldSize = 128;
-    Tcl_DStringSetLength(&dString, fieldSize + 1);
-    fp = field = Tcl_DStringValue(&dString);
-    {
-	char *bp, *bend;
-	char *buffer;
-	int nBytes;
-
-	buffer = Tcl_GetStringFromObj(objPtr, &nBytes);
-	for (bp = buffer, bend = bp + nBytes; bp < bend; bp++) {
-	    switch (*bp) {
-	    case '\t':
-	    case ' ':
-		/* 
-		 * Add whitespace only if it's not leading or we're inside of
-		 * quotes or a path.
-		 */
-		if ((fp != field) || (inQuotes) || (isPath)) {
-		    *fp++ = *bp; 
-		}
-		break;
-
-	    case '\\':
-		if (fp == field) {
-		    isPath = TRUE; 
-		}
-		*fp++ = *bp;
-		break;
-
-	    case '"':
-		if (inQuotes) {
-		    if (*(bp+1) == '"') {
-			*fp++ = '"';
-			bp++;
-		    } else {
-			inQuotes = FALSE;
-		    }
-		} else {
-		    /* 
-		     * If the quote doesn't start a field, then treat all
-		     * quotes in the field as ordinary characters.
-		     */
-		    if (fp == field) {
-			isQuoted = inQuotes = TRUE; 
-		    } else {
-			*fp++ = *bp;
-		    }
-		}
-		break;
-
-	    case ',':
-	    case '\n':
-		if (inQuotes) {
-		    *fp++ = *bp;	/* Copy the comma or newline. */
-		} else {
-		    char *last;
-		    Tcl_Obj *objPtr;
-
-		    if ((isPath) && (*bp == ',') && (fp != field) && 
-			(*(fp - 1) != '\\')) {
-			*fp++ = *bp;	/* Copy the comma or newline. */
-			break;
-		    }    
-		    /* "last" points to the character after the last character
-		     * in the field. */
-		    last = fp;	
-
-		    /* Remove trailing spaces only if the field wasn't
-		     * quoted. */
-		    if ((!isQuoted) && (!isPath)) {
-			while ((last > field) && (isspace(*(last - 1)))) {
-			    last--;
-			}
-		    }
-		    if (recordObjPtr == NULL) {
-			if (*bp == '\n') {
-			    break;	/* Ignore empty lines. */
-			}
-			recordObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-		    }
-		    /* End of field. Append field to record. */
-		    objPtr = Tcl_NewStringObj(field, last - field);
-		    Tcl_ListObjAppendElement(interp, recordObjPtr, objPtr);
-		    if (*bp == '\n') {
-			/* On newlines append the record to the list. */
-			Tcl_ListObjAppendElement(interp, listObjPtr, 
-						 recordObjPtr);
-			recordObjPtr = NULL;
-		    }
-		    fp = field;
-		    isPath = isQuoted = FALSE;
-		}
-		break;
-
-	    default:
-		*fp++ = *bp;		/* Copy the character. */
-	    }
-	    if ((fp - field) >= fieldSize) {
-		int offset;
-
-		/* 
-		 * We've exceeded the current maximum size of the field.
-		 * Double the size of the field, but make sure to reset the
-		 * pointers to the (possibly) new memory location.
-		 */
-		offset = fp - field;
-		fieldSize += fieldSize;
-		Tcl_DStringSetLength(&dString, fieldSize + 1);
-		field = Tcl_DStringValue(&dString);
-		fp = field + offset;
-	    }
-	}
-
-	/* 
-	 * We're reached the end of input. But there may not have been a final
-	 * newline to trigger the final appends. So check if 1) a last field
-	 * is still needs appending the the last record and if 2) a last
-	 * record is still needs appending to the list.
-	 */
-	if (fp != field) {
-	    char *last;
-	    Tcl_Obj *objPtr;
-	    
-	    last = fp;
-	    /* Remove trailing spaces */
-	    while (isspace(*(last - 1))) {
-		last--;
-	    }
-	    objPtr = Tcl_NewStringObj(field, last - field);
-	    if (recordObjPtr == NULL) {
-		recordObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    }
-	}		    
-	if (recordObjPtr != NULL) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, recordObjPtr);
-	}
-    }
-    Tcl_DStringFree(&dString);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static int
-ParseCsvFile(Tcl_Interp *interp, const char *fileName)
-{
-    int result;
-    int closeChannel;
-    Tcl_Channel channel;
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for reading", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return TCL_ERROR;		/* Can't open dump file. */
-	}
-    }
-    result = ParseCsvChannel(interp, channel);
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    return result;
-}
-
-static int
-CsvCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    if (objc == 2) {
-	return ParseCsvFile(interp, Tcl_GetString(objv[1]));
-    }
-    if (objc == 3) {
-	char *string;
-
-        string = Tcl_GetString(objv[1]);
-        if (strcmp(string, "-data") == 0) {
-	    return  ParseCsvData(interp, objv[2]);
-	} 
-    }
-    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		     Tcl_GetString(objv[0]), " ?fileName? ?-data dataString?", (char *)NULL);
-    return TCL_ERROR;
-}
-    
-int
-Blt_CsvCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"csv", CsvCmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltCutbuffer.c b/blt3.0/src/bltCutbuffer.c
deleted file mode 100644
index 58dc0df..0000000
--- a/blt3.0/src/bltCutbuffer.c
+++ /dev/null
@@ -1,256 +0,0 @@
-
-/*
- * bltCutbuffer.c --
- *
- *	Copyright 1993-1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_CUTBUFFER
-#include "bltOp.h"
-#ifndef WIN32
-#include <X11/Xproto.h>
-#endif
-
-static int
-GetCutNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *bufferPtr)
-{
-    int number;
-
-    if (Tcl_GetIntFromObj(interp, objPtr, &number) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((number < 0) || (number > 7)) {
-	Tcl_AppendResult(interp, "bad buffer # \"", Tcl_GetString(objPtr), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *bufferPtr = number;
-    return TCL_OK;
-}
-
-/* ARGSUSED */
-static int
-RotateErrorProc(ClientData clientData, XErrorEvent *errEventPtr)
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-static int
-GetOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tk_Window tkwin = clientData;
-    char *string;
-    int buffer;
-    int nBytes;
-
-    buffer = 0;
-    if (objc == 3) {
-	if (GetCutNumberFromObj(interp, objv[2], &buffer) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    string = XFetchBuffer(Tk_Display(tkwin), &nBytes, buffer);
-    if (string != NULL) {
-	int limit;
-	char *p;
-	int i;
-
-	if (string[nBytes - 1] == '\0') {
-	    limit = nBytes - 1;
-	} else {
-	    limit = nBytes;
-	}
-	for (p = string, i = 0; i < limit; i++, p++) {
-	    int c;
-
-	    c = (unsigned char)*p;
-	    if (c == 0) {
-		*p = ' ';	/* Convert embedded NUL bytes */
-	    }
-	}
-	if (limit == nBytes) {
-	    char *newPtr;
-
-	    /*
-	     * Need to copy the string into a bigger buffer so we can
-	     * add a NUL byte on the end.
-	     */
-	    newPtr = Blt_AssertMalloc(nBytes + 1);
-	    memcpy(newPtr, string, nBytes);
-	    newPtr[nBytes] = '\0';
-	    Blt_Free(string);
-	    string = newPtr;
-	}
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), string, nBytes);
-    }
-    return TCL_OK;
-}
-
-static int
-RotateOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tk_Window tkwin = clientData;
-    int count;
-    int result;
-    Tk_ErrorHandler handler;
-
-    count = 1;			/* Default: rotate one position */
-    if (objc == 3) {
-	if (Tcl_GetIntFromObj(interp, objv[2], &count) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((count < 0) || (count > 8)) {
-	    Tcl_AppendResult(interp, "bad rotate count \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    result = TCL_OK;
-    handler = Tk_CreateErrorHandler(Tk_Display(tkwin), BadMatch,
-	X_RotateProperties, -1, RotateErrorProc, &result);
-    XRotateBuffers(Tk_Display(tkwin), count);
-    Tk_DeleteErrorHandler(handler);
-    XSync(Tk_Display(tkwin), False);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't rotate cutbuffers unless all are set",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-static int
-SetOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tk_Window tkwin = clientData;
-    int buffer;
-    char *string;
-    int length;
-
-    buffer = 0;
-    if (objc == 4) {
-	if (GetCutNumberFromObj(interp, objv[3], &buffer) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    string = Tcl_GetStringFromObj(objv[2],  &length);
-    XStoreBuffer(Tk_Display(tkwin), string, length + 1, buffer);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BLT Sub-command specification:
- *
- *	- Name of the sub-command.
- *	- Minimum number of characters needed to unambiguously
- *        recognize the sub-command.
- *	- Pointer to the function to be called for the sub-command.
- *	- Minimum number of arguments accepted.
- *	- Maximum number of arguments accepted.
- *	- String to be displayed for usage.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec cbOps[] =
-{
-    {"get", 1, GetOp, 2, 3, "?buffer?",},
-    {"rotate", 1, RotateOp, 2, 3, "?count?",},
-    {"set", 1, SetOp, 3, 4, "value ?buffer?",},
-};
-static int numCbOps = sizeof(cbOps) / sizeof(Blt_OpSpec);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CutBufferCmd --
- *
- *	This procedure is invoked to process the "cutbuffer" Tcl
- *	command. See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-CutbufferCmd(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter.*/
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Tk_Window tkwin;
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, numCbOps, cbOps, BLT_OP_ARG1, 
-		    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    tkwin = Tk_MainWindow(interp);
-    result = (*proc) (tkwin, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CutbufferCmdInitProc --
- *
- *	This procedure is invoked to initialize the "cutbuffer" Tcl
- *	command. See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CutbufferCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"cutbuffer", CutbufferCmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_CUTBUFFER */
diff --git a/blt3.0/src/bltDBuffer.c b/blt3.0/src/bltDBuffer.c
deleted file mode 100644
index fddc2a3..0000000
--- a/blt3.0/src/bltDBuffer.c
+++ /dev/null
@@ -1,438 +0,0 @@
-
-/*
- * bltDBuffer.c --
- *
- * This module implements a dynamic buffer for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltDBuffer.h>
-
-typedef struct _Blt_DBuffer DBuffer;
-
-void
-Blt_DBuffer_Init(DBuffer *srcPtr)
-{
-    srcPtr->bytes = NULL;
-    srcPtr->cursor = srcPtr->count = srcPtr->nBytes = 0;
-    srcPtr->chunk = 64;
-}
-
-void
-Blt_DBuffer_Free(DBuffer *srcPtr)
-{
-    if ((srcPtr->bytes != NULL) && (srcPtr->nBytes > 0)) {
-	Blt_Free(srcPtr->bytes);
-    }
-    Blt_DBuffer_Init(srcPtr);
-}
-
-Blt_DBuffer
-Blt_DBuffer_Create(void)
-{
-    DBuffer *srcPtr;
-
-    srcPtr = Blt_AssertMalloc(sizeof(DBuffer));
-    Blt_DBuffer_Init(srcPtr);
-    return srcPtr;
-}
-
-void 
-Blt_DBuffer_Destroy(DBuffer *srcPtr) 
-{
-    Blt_DBuffer_Free(srcPtr);
-    Blt_Free(srcPtr);
-}
-
-int
-Blt_DBuffer_Resize(DBuffer *srcPtr, size_t nBytes)
-{
-    if (srcPtr->nBytes <= nBytes) {
-	size_t size, wanted;
-	unsigned char *bytes;
-
-	wanted = nBytes + 1;
-	size = srcPtr->chunk; 
-
-	/* 
-	 * Double the buffer size until we have enough room or hit 64K.  After
-	 * 64K, increase by multiples of 64K.
-	 */
-	while ((size <= wanted) && (size < (1<<16))) {
-	    size += size;
-	}    
-	srcPtr->chunk = size;
-	while (size <= wanted) {
-	    size += srcPtr->chunk;
-	}
-	if (srcPtr->bytes == NULL) {
- 	    bytes = Blt_Malloc(size);
- 	} else {
-	    bytes = Blt_Realloc(srcPtr->bytes, size);
-	}
-	if (bytes == NULL) {
-	    return FALSE;
- 	}
-	srcPtr->bytes = bytes;
-	srcPtr->nBytes = size;
-    }
-    return TRUE;
-}
-
-unsigned char *
-Blt_DBuffer_Extend(DBuffer *srcPtr, size_t nBytes) 
-{
-    unsigned char *bp;
-
-    if (!Blt_DBuffer_Resize(srcPtr, srcPtr->count + nBytes)) {
-	return NULL;
-    }
-    bp = srcPtr->bytes + srcPtr->count;
-    srcPtr->count += nBytes;
-    return bp;
-}
-
-void
-Blt_DBuffer_AppendByte(DBuffer *destPtr, unsigned char value)
-{
-    if (Blt_DBuffer_Resize(destPtr, destPtr->count + sizeof(value))) {
-	destPtr->bytes[destPtr->count] = value;
-	destPtr->count++;
-    }
-}
-
-void
-Blt_DBuffer_AppendShort(DBuffer *destPtr, unsigned short value)
-{
-    if (Blt_DBuffer_Resize(destPtr, destPtr->count + sizeof(value))) {
-	unsigned char *bp;
-
-	bp = destPtr->bytes + destPtr->count;
-#ifdef WORDS_BIGENDIAN
-	bp[0] = (value >> 8)  & 0xFF;
-	bp[1] = (value)       & 0xFF;
-#else
-	bp[0] = (value)       & 0xFF;
-	bp[1] = (value >> 8)  & 0xFF;
-#endif
-	destPtr->count += 2;
-    }
-}
-
-void
-Blt_DBuffer_AppendLong(DBuffer *destPtr, unsigned int value)
-{
-    if (Blt_DBuffer_Resize(destPtr, destPtr->count + sizeof(value))) {
-	unsigned char *bp;
-
-	bp = destPtr->bytes + destPtr->count;
-#ifdef WORDS_BIGENDIAN
-	bp[0] = (value >> 24) & 0xFF;
-	bp[1] = (value >> 16) & 0xFF;
-	bp[2] = (value >> 8)  & 0xFF;
-	bp[3] = (value)       & 0xFF;
-#else
-	bp[0] = (value)       & 0xFF;
-	bp[1] = (value >> 8)  & 0xFF;
-	bp[2] = (value >> 16) & 0xFF;
-	bp[3] = (value >> 24) & 0xFF;
-#endif
-	destPtr->count += 4;
-    }
-}
-
-Tcl_Obj *
-Blt_DBuffer_ByteArrayObj(DBuffer *srcPtr)
-{
-    return Tcl_NewByteArrayObj(srcPtr->bytes, srcPtr->count);
-}
-
-Tcl_Obj *
-Blt_DBuffer_StringObj(DBuffer *srcPtr)
-{
-    return Tcl_NewStringObj((char *)srcPtr->bytes, srcPtr->count);
-}
-
-int
-Blt_DBuffer_AppendData(DBuffer *srcPtr, const unsigned char *data, 
-		       size_t nBytes)
-{
-    unsigned char *bp;
-
-    bp = Blt_DBuffer_Extend(srcPtr, nBytes);
-    if (bp == NULL) {
-	return FALSE;
-    }
-    memcpy(bp, data, nBytes);
-    return TRUE;
-}
-
-void
-Blt_DBuffer_VarAppend
-TCL_VARARGS_DEF(DBuffer *, arg1)
-{
-    DBuffer *srcPtr;
-    va_list args;
-
-    srcPtr = TCL_VARARGS_START(DBuffer, arg1, args);
-    for (;;) {
-	const unsigned char *string;
-
-	string = va_arg(args, const unsigned char *);
-	if (string == NULL) {
-	    break;
-	}
-	Blt_DBuffer_AppendData(srcPtr, string, strlen((const char *)string));
-    }
-}
-
-void
-Blt_DBuffer_Print
-TCL_VARARGS_DEF(DBuffer *, arg1)
-{
-    DBuffer *srcPtr;
-    char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    srcPtr = TCL_VARARGS_START(DBuffer, arg1, args);
-    fmt = va_arg(args, char *);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    va_end(args);
-    Blt_DBuffer_AppendData(srcPtr, (unsigned char *)string, strlen(string));
-}
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef notdef
-int
-Blt_DBuffer_LoadFile(Tcl_Interp *interp, const char *fileName, 
-		     Blt_DBuffer dBuffer)
-{
-    FILE *f;
-    size_t nBytes, nRead;
-    struct stat sb;
-    unsigned char *bytes;
-
-#ifdef WIN32
-#define READ_MODE "rb"
-#else 
-#define READ_MODE "r"
-#endif
-    f = Blt_OpenFile(interp, fileName, READ_MODE);
-    if (f == NULL) {
-	return TCL_ERROR;
-    }
-    if (fstat(fileno(f), &sb)) {
-	Tcl_AppendResult(interp, "can't stat \"", fileName, "\": ",
-		Tcl_PosixError(interp), (char *)NULL);
-	return TCL_ERROR;
-    }	
-    Blt_DBuffer_Init(dBuffer);
-    nBytes = sb.st_size;	/* Size of buffer */
-    if (!Blt_DBuffer_Resize(dBuffer, nBytes)) {
-	fclose(f);
-	return TCL_ERROR;
-    }	
-    bytes = Blt_DBuffer_Bytes(dBuffer);
-    nRead = fread(bytes, sizeof(unsigned char), nBytes, f);
-    Blt_DBuffer_SetLength(dBuffer, nRead);
-    fclose(f);
-    if (nRead != nBytes) {
-	Tcl_AppendResult(interp, "short file \"", fileName, "\" : read ", 
-		Blt_Itoa(nBytes), " bytes.", (char *)NULL); 
-	Blt_DBuffer_Free(dBuffer);
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-
-#else
-
-int
-Blt_DBuffer_LoadFile(
-    Tcl_Interp *interp, 
-    const char *fileName, 
-    Blt_DBuffer dBuffer)
-{
-    int nBytes;
-    Tcl_Channel channel;
-
-    if (fileName[0] == '@') { 
-	int mode;
-
-	/* If the file name starts with a '@', then it represents the name of
-	 * a previously opened channel.  Verify that the channel was opened
-	 * for reading. */
-	fileName++;
-	channel = Tcl_GetChannel(interp, fileName, &mode);
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "can't read from \"", fileName, "\"",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-    }
-    if (channel == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_SetChannelOption(interp, channel, "-encoding", "binary")
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_SetChannelOption(interp, channel, "-translation", "binary") 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_DBuffer_Init(dBuffer);
-    nBytes = 0;
-    while (!Tcl_Eof(channel)) {
-	int nRead;
-#define BUFFER_SIZE (1<<16)
-	char *bp;
-
-	bp = (char *)Blt_DBuffer_Extend(dBuffer, BUFFER_SIZE);
-	nRead = Tcl_ReadRaw(channel, bp, BUFFER_SIZE);
-	if (nRead == -1) {
-	    Tcl_AppendResult(interp, "error reading ", fileName, ": ",
-			Tcl_PosixError(interp), (char *)NULL);
-	    Blt_DBuffer_Free(dBuffer);
-	    return TCL_ERROR;
-	}
-	nBytes += nRead;
-	Blt_DBuffer_SetLength(dBuffer, nBytes);
-    }
-    Tcl_Close(interp, channel);
-    return TCL_OK;
-}
-
-#endif
-
-int 
-Blt_DBuffer_SaveFile(Tcl_Interp *interp, const char *fileName, 
-		     Blt_DBuffer dBuffer)
-{
-    Tcl_Channel channel;
-    size_t nWritten, nBytes;
-    unsigned char *bytes;
-
-    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0660);
-    if (channel == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_SetChannelOption(interp, channel, "-translation", "binary");
-    Tcl_SetChannelOption(interp, channel, "-encoding", "binary");
-
-    nBytes = Blt_DBuffer_Length(dBuffer);
-    bytes = Blt_DBuffer_Bytes(dBuffer);
-    nWritten = Tcl_Write(channel, (char *)bytes, nBytes);
-    Tcl_Close(interp, channel);
-    if (nWritten != nBytes) {
-	Tcl_AppendResult(interp, "short file \"", fileName, (char *)NULL);
-	Tcl_AppendResult(interp, "\" : wrote ", Blt_Itoa(nWritten), " of ", 
-			 (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(nBytes), " bytes.", (char *)NULL); 
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-
-#ifdef notdef
-static int 
-ReadNextBlock(DBuffer *srcPtr)
-{
-    if (srcPtr->channel == NULL) {
-	return -1;
-    }
-    if (Tcl_Eof(srcPtr->channel)) {
-	return 0;
-    }
-    nRead = Tcl_ReadRaw(srcPtr->channel, srcPtr->bytes, BUFFER_SIZE);
-    if (nRead == -1) {
-	Tcl_AppendResult(interp, "error reading channel: ",
-			 Tcl_PosixError(interp), (char *)NULL);
-	return -1;
-    }
-    srcPtr->cursor = srcPtr->bytes;
-    srcPtr->count = nRead;
-    return 1;
-}
-
-int
-Blt_DBuffer_GetNext(DBuffer *srcPtr)
-{
-    int byte;
-
-    if ((srcPtr->cursor - srcPtr->bytes) >= srcPtr->count) {
-	int result;
-
-	result = 0;
-	if (srcPtr->channel != NULL) {
-	    result = ReadNextBlock(srcPtr);
-	}
-	if (result <= 0) {
-	    return result;
-	}
-    }
-    byte = *srcPtr->cursor;
-    srcPtr->cursor++;
-    return byte;
-}
-#endif
-
-int
-Blt_DBuffer_DecodeBase64(Tcl_Interp *interp, const char *string, size_t length,
-			 DBuffer *destPtr)
-{
-    unsigned char *bp;
-
-    bp = Blt_Base64_Decode(interp, string, &length);	
-    if (bp == NULL) {
-	return TCL_ERROR;
-    }
-    if (destPtr->bytes != NULL) {
-	Blt_Free(destPtr->bytes);
-    }
-    destPtr->bytes = bp;
-    destPtr->nBytes = destPtr->count = length;
-    destPtr->cursor = 0;
-    destPtr->chunk = 64;
-    return TCL_OK;
-}
-
-
-char *
-Blt_DBuffer_EncodeBase64(
-    Tcl_Interp *interp,		/* Interpreter to report errors to. */
-    DBuffer *srcPtr)		/* Input binary buffer. */
-{
-    return Blt_Base64_Encode(interp, srcPtr->bytes, srcPtr->count);
-}
-
diff --git a/blt3.0/src/bltDBuffer.h b/blt3.0/src/bltDBuffer.h
deleted file mode 100644
index bf62bb6..0000000
--- a/blt3.0/src/bltDBuffer.h
+++ /dev/null
@@ -1,95 +0,0 @@
-
-/*
- * bltDBuffer.h --
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_DBUFFER_H
-#define _BLT_DBUFFER_H
-
-typedef struct _Blt_DBuffer {
-    unsigned char *bytes;	/* Stores output (malloc-ed).*/
-    size_t nBytes;		/* Size of dynamically allocated buffer. */
-
-    size_t count;		/* # of bytes read into the buffer. Marks the
-				 * # current fill point of the buffer. */
-    size_t cursor;		/* Current position in buffer. */
-    size_t chunk;		/* Buffer growth size. */
-
-} *Blt_DBuffer;
-
-
-BLT_EXTERN void Blt_DBuffer_VarAppend TCL_VARARGS(Blt_DBuffer, buffer);
-
-BLT_EXTERN void Blt_DBuffer_Print TCL_VARARGS(Blt_DBuffer, buffer);
-
-BLT_EXTERN void Blt_DBuffer_Init(Blt_DBuffer buffer);
-BLT_EXTERN void Blt_DBuffer_Free(Blt_DBuffer buffer);
-BLT_EXTERN unsigned char *Blt_DBuffer_Extend(Blt_DBuffer buffer, size_t extra);
-BLT_EXTERN int Blt_DBuffer_AppendData(Blt_DBuffer buffer, 
-	const unsigned char *bytes, size_t extra);
-BLT_EXTERN int Blt_DBuffer_Resize(Blt_DBuffer buffer, size_t length);
-BLT_EXTERN Blt_DBuffer Blt_DBuffer_Create(void);
-BLT_EXTERN void Blt_DBuffer_Destroy(Blt_DBuffer buffer);
-
-BLT_EXTERN int Blt_DBuffer_LoadFile(Tcl_Interp *interp, const char *fileName, 
-	Blt_DBuffer buffer); 
-BLT_EXTERN int Blt_DBuffer_SaveFile(Tcl_Interp *interp, const char *fileName, 
-	Blt_DBuffer buffer); 
-
-BLT_EXTERN void Blt_DBuffer_AppendByte(Blt_DBuffer buffer, unsigned char byte);
-BLT_EXTERN void Blt_DBuffer_AppendShort(Blt_DBuffer buffer, 
-	unsigned short value);
-BLT_EXTERN void Blt_DBuffer_AppendLong(Blt_DBuffer buffer, unsigned int value);
-BLT_EXTERN Tcl_Obj *Blt_DBuffer_ByteArrayObj(Blt_DBuffer buffer);
-BLT_EXTERN Tcl_Obj *Blt_DBuffer_StringObj(Blt_DBuffer buffer);
-
-#define Blt_DBuffer_Bytes(s)		((s)->bytes)
-#define Blt_DBuffer_Size(s)		((s)->nBytes)
-
-#define Blt_DBuffer_BytesLeft(s)	((s)->count - (s)->cursor)
-#define Blt_DBuffer_NextByte(s)		((s)->bytes[(s)->cursor++])
-#define Blt_DBuffer_Pointer(s)		((s)->bytes + (s)->cursor)
-#define Blt_DBuffer_SetPointer(s,p)	((s)->cursor = (p) - (s)->bytes)
-
-#define Blt_DBuffer_ResetCursor(s)	((s)->cursor = 0)
-#define Blt_DBuffer_Cursor(s)		((s)->cursor)
-#define Blt_DBuffer_SetCursor(s,n)	((s)->cursor = (n))
-#define Blt_DBuffer_IncrCursor(s,i)	((s)->cursor += (i))
-
-#define Blt_DBuffer_End(s)		((s)->bytes + (s)->count)
-#define Blt_DBuffer_Length(s)		((s)->count)
-#define Blt_DBuffer_SetLengthFromPointer(s,p) \
-	((s)->count = ((p) - (s)->bytes))
-#define Blt_DBuffer_SetLength(s,i)    \
-	((s)->count = (i), (s)->bytes[(s)->count] = '\0')
-#define Blt_DBuffer_IncrLength(s,i)	((s)->count += (i))
-
-BLT_EXTERN int Blt_DBuffer_DecodeBase64(Tcl_Interp *interp, 
-	const char *string, size_t length, Blt_DBuffer buffer);
-BLT_EXTERN char *Blt_DBuffer_EncodeBase64(Tcl_Interp *interp, 
-	Blt_DBuffer buffer);
-
-BLT_EXTERN int Blt_IsBase64(const unsigned char *bytes, size_t length);
-
-#endif /*_BLT_DBUFFER_H*/
diff --git a/blt3.0/src/bltDataTable.c b/blt3.0/src/bltDataTable.c
deleted file mode 100644
index a993a79..0000000
--- a/blt3.0/src/bltDataTable.c
+++ /dev/null
@@ -1,5884 +0,0 @@
-
-/*
- *
- * bltDataTable.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <bltInt.h>
-#include <bltHash.h>
-#include <bltPool.h>
-#include <bltNsUtil.h>
-#include <bltArrayObj.h>
-#include <bltDataTable.h>
-
-/*
- * Row and Column Information Structures
- *
- *	Map:	Array of pointers to headers, representing the logical 
- *		view of row/column.  
- * 
- *	x = pointer to row/column header.
- *	y = row/column header.
- *		label
- *		index:  logical location of row/column.
- *		offset: physical location of row/column in table storage.
- *		type:   column type.
- *		flags:  
- *
- *	[x] [x] [x] [x] [x] [x] [x] [x] [ ] [ ] [ ]
- *	 |   |   |   |   |   |   |   |
- *       v   v   v   v   v   v   v   v 
- *      [y] [y] [y] [y] [y] [y] [y] [y]
- *
- *
- *	Free list:  Chain of free locations. Holds the physical offset
- *		    of next free row or column.  The offsets of deleted 
- *		    rows/columns are prepended to this list.
- *
- *	x = offset of free row/column in table storage.
- *
- *      [x]->[x]->[x]->[x]->[x]
- *
- *	Header pool: Pool of row/column headers.  Act as smart pointers
- *		     to row/column locations.  Will remain valid even if 
- *		     the logical view is changed (i.e. sorting) or physical 
- *		     storage is compacted.
- *
- *  Data Vectors.
- *	Vectors: array of Value arrays.  
- *
- *	    x = pointer to Value array.
- *	    y = array of Values.
- *
- *	Array of vectors: [x] [x] [x] [x] [x] [ ] [x] [x] [x] [ ] [ ] [ ]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [ ] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [ ] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [ ] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [y] [y] [y] [y] [y]     [y] [y] [y]
- *			  [ ] [ ] [ ] [ ] [ ]     [ ] [ ] [ ]
- *			  [ ] [ ] [ ] [ ] [ ]     [ ] [ ] [ ]
- *			  [ ] [ ] [ ] [ ] [ ]     [ ] [ ] [ ]
- *			  [ ] [ ] [ ] [ ] [ ]     [ ] [ ] [ ]
- *			  [ ] [ ] [ ] [ ] [ ]     [ ] [ ] [ ]
- *
- */
-
-#define NumColumnsAllocated(t)		((t)->corePtr->columns.nAllocated)
-#define NumRowsAllocated(t)		((t)->corePtr->rows.nAllocated)
-
-#define TABLE_THREAD_KEY		"BLT DataTable Data"
-#define TABLE_MAGIC			((unsigned int) 0xfaceface)
-#define TABLE_DESTROYED			(1<<0)
-
-#define TABLE_ALLOC_MAX_DOUBLE_SIZE	(1<<16)
-#define TABLE_ALLOC_MAX_CHUNK		(1<<16)
-#define TABLE_NOTIFY_ANY		(NULL)
-
-#define TABLE_KEYS_DIRTY		(1<<0)
-#define TABLE_KEYS_UNIQUE		(1<<1)
-
-/* Column flag. */
-#define TABLE_COLUMN_PRIMARY_KEY	(1<<0)
-
-typedef struct _Blt_TableValue Value;
-
-typedef struct {
-    unsigned int flags;
-    long nRows, nCols;
-    long mtime, ctime;
-    const char *fileName;
-    long nLines;
-    int argc;
-    const char **argv;
-    Blt_HashTable rowIndices, colIndices;
-} RestoreData;
-
-typedef struct _Blt_Table Table;
-typedef struct _Blt_TableTags Tags;
-typedef struct _Blt_TableTrace Trace;
-typedef struct _Blt_TableNotifier Notifier;
-
-const char *valueTypes[] = {
-    "string", "int", "double", "long", 
-};
-
-/*
- * _Blt_TableTags --
- *
- *	Structure representing tags used by a client of the table.
- *
- *	Table rows and columns may be tagged with strings.  A row may have
- *	many tags.  The same tag may be used for many rows.  Tags are used and
- *	stored by clients of a table.  Tags can also be shared between clients
- *	of the same table.
- *	
- *	Both rowTable and columnTable are hash tables keyed by the physical
- *	row or column location in the table respectively.  This is not the
- *	same as the client's view (the order of rows or columns as seen by the
- *	client).  This is so that clients (which may have different views) can
- *	share tags without sharing the same view.
- */
-struct _Blt_TableTags {
-    Blt_HashTable rowTable;		/* Table of row indices.  Each entry
-					 * is itself a hash table of tag
-					 * names. */
-    Blt_HashTable columnTable;		/* Table of column indices.  Each
-					 * entry is itself a hash table of tag
-					 * names. */
-    int refCount;			/* Tracks the number of clients
-					 * currently using these tags. If
-					 * refCount goes to zero, this means
-					 * the table can safely be freed. */
-};
-
-typedef struct {
-    Blt_HashTable clientTable;		/* Tracks all table clients. */
-    unsigned int nextId;
-    Tcl_Interp *interp;
-} InterpData;
-
-typedef struct _Blt_TableHeader Header;
-typedef struct _Blt_TableRow Row;
-typedef struct _Blt_TableColumn Column;
-typedef struct _Blt_TableCore TableObject;
-typedef struct _Blt_TableRowColumn RowColumn;
-
-typedef struct {
-    Blt_TableRow row;
-    Blt_TableColumn column;
-} RowColumnKey;
-
-static Blt_TableRowColumnClass rowClass = { 
-    "row", sizeof(struct _Blt_TableRow)
-};
-
-static Blt_TableRowColumnClass columnClass = { 
-    "column", sizeof(struct _Blt_TableColumn) 
-};
-
-static Tcl_InterpDeleteProc TableInterpDeleteProc;
-static void DestroyTable(Table *tablePtr);
-
-static void
-FreeRowColumn(RowColumn *rcPtr)
-{
-    Header **hpp, **hend;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(&rcPtr->labels, &cursor); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_Chain chain;
-	
-	chain = Blt_GetHashValue(hPtr);
-	Blt_Chain_Destroy(chain);
-    }
-    Blt_DeleteHashTable(&rcPtr->labels);
-    Blt_Chain_Destroy(rcPtr->freeList);
-
-    for (hpp = rcPtr->map, hend = hpp + rcPtr->nUsed; hpp < hend; hpp++) {
-	Blt_PoolFreeItem(rcPtr->headerPool, *hpp);
-    }
-    Blt_PoolDestroy(rcPtr->headerPool);
-    Blt_Free(rcPtr->map);
-}
-
-static void
-UnsetLabel(RowColumn *rcPtr, Header *headerPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    if (headerPtr->label == NULL) {
-	return;
-    }
-    hPtr = Blt_FindHashEntry(&rcPtr->labels, headerPtr->label);
-    if (hPtr != NULL) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-	
-	chain = Blt_GetHashValue(hPtr);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Header *oldPtr;
-	    
-	    oldPtr = Blt_Chain_GetValue(link);
-	    if (oldPtr == headerPtr) {
-		Blt_Chain_DeleteLink(chain, link);
-		break;
-	    }
-	}
-	if (Blt_Chain_GetLength(chain) == 0) {
-	    Blt_Chain_Destroy(chain);
-	    Blt_DeleteHashEntry(&rcPtr->labels, hPtr);
-	}
-    }	
-    headerPtr->label = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetLabel --
- *
- *	Changes the label for the row or column.  Labels aren't necessarily
- *	unique, it's not enforced.  The rationale is that it is convenient
- *	to be able to add rows/columns to a table, and then change the 
- *	labels.  For example, when importing table data from a file,
- *	you can't apriori change the labels.  We could add #n to make the 
- *	label unique, but changing them is a pain.
- *	
- *
- * Results:
- *	Returns a pointer to the new object is successful, NULL otherwise.  If
- *	a table object can't be generated, interp->result will contain an
- *	error message.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-SetLabel(RowColumn *rcPtr, Header *headerPtr, const char *newLabel)
-{
-    Blt_Chain chain;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    
-    if (headerPtr->label != NULL) {
-	UnsetLabel(rcPtr, headerPtr);
-    }
-    if (newLabel == NULL) {
-	return;
-    }
-    hPtr = Blt_CreateHashEntry(&rcPtr->labels, newLabel, &isNew);
-    chain = Blt_GetHashValue(hPtr);
-    if (chain == NULL) {
-	chain = Blt_Chain_Create();
-	Blt_SetHashValue(hPtr, chain);
-    }
-    headerPtr->label = Blt_GetHashKey(&rcPtr->labels, hPtr);
-    if (!isNew) {
-	Blt_ChainLink link;
-	
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Header *oldPtr;
-	    
-	    oldPtr = Blt_Chain_GetValue(link);
-	    if (oldPtr == headerPtr) {
-		return;		/* It's already there. */
-	    }
-	}
-    }
-    Blt_Chain_Append(chain, headerPtr);
-}
-
-static int
-CheckLabel(Tcl_Interp *interp, RowColumn *rcPtr, const char *label)
-{
-    long dummy;
-    char c;
-
-    c = label[0];
-    /* This is so we know where switches end. */
-    if (c == '-') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, rcPtr->classPtr->name, " label \"", 
-			label, "\" can't start with a '-'.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if ((isdigit(UCHAR(c))) && 
-	(Tcl_GetLong(NULL, (char *)label, &dummy) == TCL_OK)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, rcPtr->classPtr->name, " label \"", label, 
-		"\" can't be a number.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-SetHeaderLabel(Tcl_Interp *interp, RowColumn *rcPtr, Header *headerPtr, 
-	       const char *newLabel)
-{
-    if (CheckLabel(interp, rcPtr, newLabel) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    SetLabel(rcPtr, headerPtr, newLabel);
-    return TCL_OK;
-}
-
-#if (SIZEOF_VOID_P == 8)  
-#define LABEL_FMT	"%c%ld"
-#else
-#define LABEL_FMT	"%c%d" 
-#endif
-
-static void
-GetNextLabel(RowColumn *rcPtr, Header *headerPtr)
-{
-    char label[200];
-
-    for(;;) {
-	int isNew;
-	Blt_HashEntry *hPtr;
-
-	sprintf_s(label, 200, LABEL_FMT, rcPtr->classPtr->name[0], 
-		rcPtr->nextId++);
-	hPtr = Blt_CreateHashEntry(&rcPtr->labels, label, &isNew);
-	if (isNew) {
-	    SetLabel(rcPtr, headerPtr, label);
-	    return;
-	}
-    }
-}
-
-static long
-GetMapSize(long oldLen, long extra)
-{
-    long newLen, reqLen;
-
-    reqLen = oldLen + extra;
-    newLen = oldLen;
-    if (newLen == 0) {
-	newLen = 1;
-    }
-    if (reqLen < TABLE_ALLOC_MAX_DOUBLE_SIZE) {
-	while (newLen < reqLen) {
-	    newLen += newLen;
-	}
-    } else {
-	while (newLen < reqLen) {
-	    newLen += TABLE_ALLOC_MAX_CHUNK;
-	}
-    }
-    return newLen;
-}
-
-static int
-GrowHeaders(RowColumn *rcPtr, long extra)
-{
-    long newSize, oldSize;
-    Header **map;
-
-    newSize = GetMapSize(rcPtr->nAllocated, extra);
-    oldSize = rcPtr->nAllocated;
-    map = rcPtr->map;
-    if (map == NULL) {
-	map = Blt_Malloc(sizeof(Header *) * newSize);
-    } else {
-	map = Blt_Realloc(rcPtr->map, sizeof(Header *) * newSize);
-    }
-    if (map == NULL) {
-	return FALSE;
-    }
-    {
-	Header **mp;
-	long i;
-
-	/* Initialize the new extra header slots in the map to NULL and add
-	 * them the free list. */
-	for (i = oldSize, mp = map + oldSize; i < newSize; i++, mp++) {
-	    Blt_Chain_Append(rcPtr->freeList, (ClientData)i); 
-	    *mp = NULL;		/* Initialize new slots in the map.  */
-	}
-    }
-    rcPtr->map = map;
-    rcPtr->nAllocated = newSize;
-    return TRUE;
-}
-
-static int
-GrowColumns(Table *tablePtr, long extraCols)
-{
-    if (extraCols > 0) { 
-	long oldCols, newCols;
-	Value **data, **vp, **vend;
-
-	oldCols = NumColumnsAllocated(tablePtr);
-	if (!GrowHeaders(&tablePtr->corePtr->columns, extraCols)) {
-	    return FALSE;
-	}
-	newCols = NumColumnsAllocated(tablePtr);
-
-	/* Resize the vector array to have as many slots as columns. */
-	data = tablePtr->corePtr->data;
-	if (data == NULL) {
-	    data = Blt_Malloc(newCols * sizeof(Value *));
-	} else {
-	    data = Blt_Realloc(data, newCols * sizeof(Value *));
-	}
-	if (data == NULL) {
-	    return FALSE;
-	}
-	/* Initialize the new vector slots to NULL. */
-	for (vp = data + oldCols, vend = data + newCols; vp < vend; vp++) {
-	    *vp = NULL;
-	}
-	tablePtr->corePtr->data = data;
-    }
-    return TRUE;
-}
-
-static int
-GrowRows(Table *tablePtr, long extraRows)
-{
-    if (extraRows > 0) {
-	long oldRows, newRows;
-	Value **vpp, **vpend;
-
-	oldRows = NumRowsAllocated(tablePtr);
-	if (!GrowHeaders(&tablePtr->corePtr->rows, extraRows)) {
-	    return FALSE;
-	}
-	newRows = NumRowsAllocated(tablePtr);
-
-	/* Resize all the vectors. Leave the empty vectors alone.  They are
-	 * allocated when data is added to them. */
-	for (vpp = tablePtr->corePtr->data, 
-		 vpend = vpp + NumColumnsAllocated(tablePtr); 
-	     vpp < vpend; vpp++) {
-	    if (*vpp != NULL) {
-		Value *vector, *vp, *vend;
-		
-		vector = Blt_Realloc(*vpp, newRows * sizeof(Value));
-		for (vp = vector + oldRows, vend = vector + newRows; 
-		     vp < vend; vp++) {
-		    vp->string = NULL;
-		}
-		*vpp = vector;
-	    }
-	}
-    }
-    return TRUE;
-}
-
-static void
-ExtendHeaders(RowColumn *rcPtr, long n, Blt_Chain chain)
-{
-    Blt_ChainLink link;
-    long nextIndex;
-    long i;
-
-    /* 
-     * At this point we're guaranteed to have as many free rows/columns in
-     * the table as requested.
-     */
-    link = Blt_Chain_FirstLink(rcPtr->freeList);
-    nextIndex = rcPtr->nUsed; 
-    for (i = 0; i < n; i++) {
-	Blt_ChainLink next;
-	Header *headerPtr;
-
-	headerPtr = Blt_PoolAllocItem(rcPtr->headerPool, 
-		rcPtr->classPtr->headerSize);
-	memset(headerPtr, 0, rcPtr->classPtr->headerSize);
-	GetNextLabel(rcPtr, headerPtr);
-	headerPtr->offset = (long)Blt_Chain_GetValue(link);
-	rcPtr->map[nextIndex] = headerPtr;
-	nextIndex++;
-	headerPtr->index = nextIndex;
-
-	/* Remove the link the freelist and append it to the output chain. */
-	next = Blt_Chain_NextLink(link);
-	Blt_Chain_UnlinkLink(rcPtr->freeList, link);
-	Blt_Chain_AppendLink(chain, link);
-	Blt_Chain_SetValue(link, headerPtr);
-	link = next;
-    }
-    rcPtr->nUsed += n;
-}
-
-static int
-ExtendRows(Table *tablePtr, long n, Blt_Chain chain)
-{
-    long nFree;
-
-    nFree = Blt_Chain_GetLength(tablePtr->corePtr->rows.freeList);
-    if (n > nFree) {
-	long needed;
-
-	needed = n - nFree;
-	if (!GrowRows(tablePtr, needed)) {
-	    return FALSE;
-	}
-    }
-    ExtendHeaders(&tablePtr->corePtr->rows, n, chain);
-    tablePtr->flags |= TABLE_KEYS_DIRTY;
-    return TRUE;
-}
-
-static int
-ExtendColumns(Table *tablePtr, long n, Blt_Chain chain)
-{
-    long nFree;
-
-    nFree = Blt_Chain_GetLength(tablePtr->corePtr->columns.freeList);
-    if (n > nFree) {
-	if (!GrowColumns(tablePtr, n - nFree)) {
-	    return FALSE;
-	}
-    }
-    ExtendHeaders(&tablePtr->corePtr->columns, n, chain);
-    return TRUE;
-}
-
-Blt_TableColumnType
-Blt_Table_GetColumnType(const char *typeName)
-{
-    if (strcmp(typeName, "string") == 0) {
-	return TABLE_COLUMN_TYPE_STRING;
-    } else if (strcmp(typeName, "integer") == 0) {
-	return TABLE_COLUMN_TYPE_INT;
-    } else if (strcmp(typeName, "double") == 0) {
-	return TABLE_COLUMN_TYPE_DOUBLE;
-    } else if (strcmp(typeName, "long") == 0) {
-	return TABLE_COLUMN_TYPE_LONG;
-    } else {
-	return TABLE_COLUMN_TYPE_UNKNOWN;
-    }
-}
-
-static INLINE int
-IsEmpty(Value *valuePtr)
-{
-    return ((valuePtr == NULL) || (valuePtr->string == NULL));
-}
-
-static INLINE void
-FreeValue(Value *valuePtr)
-{
-    if (valuePtr->string != NULL) {
-	Blt_Free(valuePtr->string);
-    }
-    valuePtr->string = NULL;
-}
-
-
-static void
-FreeVector(Value *vector, long length)
-{
-    if (vector != NULL) {
-	Value *vp, *vend;
-
-	for (vp = vector, vend = vp + length; vp < vend; vp++) {
-	    FreeValue(vp);
-	}
-	Blt_Free(vector);
-    }
-}
-
-static Value *
-AllocateVector(Table *tablePtr, long offset)
-{
-    Value *vector;
-
-    vector = tablePtr->corePtr->data[offset];
-    if (vector == NULL) {
-
-	vector = Blt_Calloc(NumRowsAllocated(tablePtr), sizeof(Value));
-	if (vector == NULL) {
-	    return NULL;
-	}
-	tablePtr->corePtr->data[offset] = vector;
-    }
-    return vector;
-}
-
-static Value *
-GetValue(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *vector;
-
-    vector = tablePtr->corePtr->data[colPtr->offset];
-    if (vector == NULL) {
-	vector = AllocateVector(tablePtr, colPtr->offset);
-    }
-    return vector + rowPtr->offset;
-}
-
-static Tcl_Obj *
-GetObjFromValue(Tcl_Interp *interp, Blt_TableColumnType type, Value *valuePtr)
-{
-    Tcl_Obj *objPtr;
-
-    if (IsEmpty(valuePtr)) {
-	return NULL;
-    } 
-    switch (type) {
-    case TABLE_COLUMN_TYPE_UNKNOWN:
-    case TABLE_COLUMN_TYPE_STRING:	/* string */
-	objPtr = Tcl_NewStringObj(valuePtr->string, -1);
-	break;
-    case TABLE_COLUMN_TYPE_DOUBLE:	/* double */
-	objPtr = Tcl_NewDoubleObj(valuePtr->datum.d);
-	break;
-    case TABLE_COLUMN_TYPE_LONG:	/* long */
-	objPtr = Tcl_NewLongObj(valuePtr->datum.l);
-	break;
-    case TABLE_COLUMN_TYPE_INT:		/* int */
-	objPtr = Tcl_NewIntObj((int)valuePtr->datum.l);
-	break;
-    }
-    return objPtr;
-}
-
-static int
-SetValueFromObj(Tcl_Interp *interp, Blt_TableColumnType type, Tcl_Obj *objPtr, 
-	       Value *valuePtr)
-{
-    int length;
-    const char *s;
-
-    FreeValue(valuePtr);
-    if (objPtr == NULL) {
-	return TCL_OK;
-    }
-    switch (type) {
-    case TABLE_COLUMN_TYPE_DOUBLE:	/* double */
-	if (Tcl_GetDoubleFromObj(interp, objPtr, &valuePtr->datum.d)!=TCL_OK) {
-	    return TCL_ERROR;
-	}
-	break;
-    case TABLE_COLUMN_TYPE_LONG:	/* long */
-    case TABLE_COLUMN_TYPE_INT:		/* int */
-	if (Tcl_GetLongFromObj(interp, objPtr, &valuePtr->datum.l) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	break;
-    default:
-	break;
-    }
-    s = Tcl_GetStringFromObj(objPtr, &length);
-    valuePtr->string = Blt_AssertMalloc(length + 1);
-    strcpy(valuePtr->string, s);
-    return TCL_OK;
-}
-
-
-static int
-SetValueFromString(Tcl_Interp *interp, Blt_TableColumnType type, const char *s,
-		   int length, Value *valuePtr)
-{
-    double d;
-    long l;
-    char *string;
-
-    if (length < 0) {
-	length = strlen(s);
-    }
-    /* Make a copy of the string, eventually used for string rep.  */
-    string = Blt_AssertMalloc(length + 1);
-    strncpy(string, s, length);
-    string[length] = '\0';
-
-    switch (type) {
-    case TABLE_COLUMN_TYPE_DOUBLE:	/* double */
-	if (Tcl_GetDouble(interp, string, &d) != TCL_OK) {
-	    Blt_Free(string);
-	    return TCL_ERROR;
-	}
-	valuePtr->datum.d = d;
-	break;
-    case TABLE_COLUMN_TYPE_LONG:	/* long */
-    case TABLE_COLUMN_TYPE_INT:		/* int */
-	if (TclGetLong(interp, string, &l) != TCL_OK) {
-	    Blt_Free(string);
-	    return TCL_ERROR;
-	}
-	valuePtr->datum.l = l;
-	break;
-    default:
-	break;
-    }
-    FreeValue(valuePtr);
-    valuePtr->string = string;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTableObject --
- *
- *	Creates and initializes a new table object. 
- *
- * Results:
- *	Returns a pointer to the new object is successful, NULL otherwise.  If
- *	a table object can't be generated, interp->result will contain an
- *	error message.
- *
- * -------------------------------------------------------------------------- 
- */
-static TableObject *
-NewTableObject(void)
-{
-    TableObject *corePtr;
-
-    corePtr = Blt_Calloc(1, sizeof(TableObject));
-    if (corePtr == NULL) {
-	return NULL;
-    }
-    corePtr->clients = Blt_Chain_Create();
-
-    Blt_InitHashTableWithPool(&corePtr->columns.labels, BLT_STRING_KEYS);
-    Blt_InitHashTableWithPool(&corePtr->rows.labels, BLT_STRING_KEYS);
-    corePtr->columns.classPtr = &columnClass;
-    corePtr->columns.freeList = Blt_Chain_Create();
-    corePtr->columns.headerPool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    corePtr->columns.nextId = 1;
-    corePtr->rows.classPtr = &rowClass;
-    corePtr->rows.freeList = Blt_Chain_Create();
-    corePtr->rows.headerPool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    corePtr->rows.nextId = 1;
-    return corePtr;
-}
-
-static void
-DestroyTraces(Blt_Chain chain)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Trace *tp;
-	
-	tp = Blt_Chain_GetValue(link);
-	tp->link = NULL;
-	Blt_Table_DeleteTrace(tp);
-    }
-    Blt_Chain_Destroy(chain);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyIdleProc --
- *
- *	Used to invoke event handler routines at some idle point.  This
- *	routine is called from the TCL event loop.  Errors generated by the
- *	event handler routines are backgrounded.
- *	
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-NotifyIdleProc(ClientData clientData)
-{
-    Notifier *notifierPtr = clientData;
-    int result;
-
-    notifierPtr->flags &= ~TABLE_NOTIFY_PENDING;
-
-    /* Protect the notifier in case it's deleted by the callback. */
-    Tcl_Preserve(notifierPtr);
-    notifierPtr->flags |= TABLE_NOTIFY_ACTIVE;
-    result = (*notifierPtr->proc)(notifierPtr->clientData, &notifierPtr->event);
-    notifierPtr->flags &= ~TABLE_NOTIFY_ACTIVE;
-    if (result == TCL_ERROR) {
-	Tcl_BackgroundError(notifierPtr->interp);
-    }
-    Tcl_Release(notifierPtr);
-}
-
-static void
-FreeNotifier(Notifier *notifierPtr) 
-{
-    if (notifierPtr->tag != NULL) {
-	Blt_Free(notifierPtr->tag);
-    }
-    if (notifierPtr->link != NULL){
-	Blt_Chain_DeleteLink(notifierPtr->chain, notifierPtr->link);
-    }
-    Blt_Free(notifierPtr);
-}
-
-static void
-DestroyNotifiers(Blt_Chain chain)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Notifier *notifierPtr;
-
-	notifierPtr = Blt_Chain_GetValue(link);
-	notifierPtr->link = NULL;
-	Blt_Table_DeleteNotifier(notifierPtr);
-    }
-    Blt_Chain_Destroy(chain);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpTags --
- *
- *	Retrieves all tags for a given row or column into a tcl list.  
- *
- * Results:
- *	Returns the number of tags in the list.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DumpTags(Blt_HashTable *tagTablePtr, Header *headerPtr, Blt_Chain chain)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(tagTablePtr, &cursor); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_HashEntry *h2Ptr;
-	Blt_HashTable *tablePtr;
-
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)headerPtr);
-	if (h2Ptr != NULL) {
-	    Blt_Chain_Append(chain, Blt_GetHashKey(tagTablePtr, hPtr));
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClearTags --
- *
- *	Removes all tags for a given row or column.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *      All tags associcated with the row are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClearTags(Blt_HashTable *tagTablePtr, Header *headerPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(tagTablePtr, &cursor); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_HashEntry *h2Ptr;
-	Blt_HashTable *tablePtr;
-
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)headerPtr);
-	if (h2Ptr != NULL) {
-	    Blt_DeleteHashEntry(tablePtr, h2Ptr);
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTableObject --
- *
- *	Destroys the table object.  This is the final clean up of the object.
- *	The object's entry is removed from the hash table of tables.
- *
- * Results: 
- *	None.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-DestroyTableObject(TableObject *corePtr)
-{
-    corePtr->flags |= TABLE_DESTROYED;
-
-    assert(Blt_Chain_GetLength(corePtr->clients) == 0);
-    Blt_Chain_Destroy(corePtr->clients);
-
-    /* Free the headers containing row and column info. */
-    /* Free the data in each row. */
-    if (corePtr->data != NULL) {
-	Value **vp, **vend;
-	long i;
-
-	for (i = 0, vp = corePtr->data, vend = vp + corePtr->columns.nAllocated;
-	     vp < vend; vp++, i++) {
-	    if (*vp != NULL) {
-		Column *colPtr;
-	    
-	        colPtr = (Blt_TableColumn)corePtr->columns.map[i];
-		FreeVector(*vp, corePtr->rows.nAllocated);
-	    }
-	}
-	Blt_Free(corePtr->data);
-    }
-    FreeRowColumn(&corePtr->rows);
-    FreeRowColumn(&corePtr->columns);
-    Blt_Free(corePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the table object is
- *	deleted from the interpreter.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys all remaining tables and removes the hash table used to
- *	register table names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TableInterpDeleteProc(ClientData clientData, Tcl_Interp *interp)
-{
-    InterpData *dataPtr;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    dataPtr = clientData;
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->clientTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_Chain chain;
-	Blt_ChainLink link, next;
-
-	chain = Blt_GetHashValue(hPtr);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL; link = next) {
-	    Table *tablePtr;
-
-	    next = Blt_Chain_NextLink(link);
-	    tablePtr = Blt_Chain_GetValue(link);
-	    tablePtr->corePtr = NULL;
-	    tablePtr->link2 = NULL;
-	    DestroyTable(tablePtr);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-    Blt_DeleteHashTable(&dataPtr->clientTable);
-    Tcl_DeleteAssocData(interp, TABLE_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetInterpData --
- *
- *	Creates or retrieves data associated with tuple data objects for a
- *	particular interpreter.  
- *
- * Results:
- *	Returns a pointer to the tuple interpreter data.
- *
- * -------------------------------------------------------------------------- 
- */
-static InterpData *
-GetInterpData(Tcl_Interp *interp)
-{
-    Tcl_InterpDeleteProc *proc;
-    InterpData *dataPtr;
-
-    dataPtr = (InterpData *)
-	Tcl_GetAssocData(interp, TABLE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(InterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, TABLE_THREAD_KEY, TableInterpDeleteProc, 
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->clientTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-
-const char *
-Blt_Table_NameOfType(Blt_TableColumnType type)
-{
-    return valueTypes[type];
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTags --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_TableTags
-NewTags(void)
-{
-    Tags *tagsPtr;
-
-    tagsPtr = Blt_Malloc(sizeof(Tags));
-    if (tagsPtr != NULL) {
-	Blt_InitHashTable(&tagsPtr->rowTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&tagsPtr->columnTable, BLT_STRING_KEYS);
-	tagsPtr->refCount = 1;
-    }
-    return tagsPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindClientInNamespace --
- *
- *	Searches for a table client in a given namespace.
- *
- * Results:
- *	Returns a pointer to the table client if found, otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-static Table *
-FindClientInNamespace(InterpData *dataPtr, Blt_ObjectName *namePtr)
-{
-    Blt_Chain chain;
-    Blt_ChainLink link;
-    Blt_HashEntry *hPtr;
-    Tcl_DString ds;
-    const char *qualName;
-
-    qualName = Blt_MakeQualifiedName(namePtr, &ds);
-    hPtr = Blt_FindHashEntry(&dataPtr->clientTable, qualName);
-    Tcl_DStringFree(&ds);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    chain = Blt_GetHashValue(hPtr);
-    link = Blt_Chain_FirstLink(chain);
-    return Blt_Chain_GetValue(link);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTable --
- *
- *	Searches for the table client associated by the name given.
- *
- * Results:
- *	Returns a pointer to the table client if found, otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Table
-GetTable(InterpData *dataPtr, const char *name, unsigned int flags)
-{
-    Blt_ObjectName objName;
-    Blt_Table table;
-    Tcl_Interp *interp;
-
-    table = NULL;
-    interp = dataPtr->interp;
-    if (!Blt_ParseObjectName(interp, name, &objName, BLT_NO_DEFAULT_NS)) {
-	return NULL;
-    }
-    if (objName.nsPtr != NULL) { 
-	table = FindClientInNamespace(dataPtr, &objName);
-    } else { 
-	if (flags & NS_SEARCH_CURRENT) {
-	    /* Look first in the current namespace. */
-	    objName.nsPtr = Tcl_GetCurrentNamespace(interp);
-	    table = FindClientInNamespace(dataPtr, &objName);
-	}
-	if ((table == NULL) && (flags & NS_SEARCH_GLOBAL)) {
-	    objName.nsPtr = Tcl_GetGlobalNamespace(interp);
-	    table = FindClientInNamespace(dataPtr, &objName);
-	}
-    }
-    return table;
-}
-
-static void
-DestroyTable(Table *tablePtr)
-{
-    if (tablePtr->magic != TABLE_MAGIC) {
-	fprintf(stderr, "invalid table object token 0x%lx\n", 
-		(unsigned long)tablePtr);
-	return;
-    }
-    /* Remove any traces that were set by this client. */
-    DestroyTraces(tablePtr->traces);
-    /* Also remove all event handlers created by this client. */
-    DestroyNotifiers(tablePtr->rowNotifiers);
-    DestroyNotifiers(tablePtr->columnNotifiers);
-    Blt_Table_UnsetKeys(tablePtr);
-    if (tablePtr->tags != NULL) {
-	Blt_Table_ReleaseTags(tablePtr);
-    }
-    if ((tablePtr->corePtr != NULL) && (tablePtr->link != NULL)) {
-	TableObject *corePtr;
-
-	corePtr = tablePtr->corePtr;
-	/* Remove the client from the server's list */
-	Blt_Chain_DeleteLink(corePtr->clients, tablePtr->link);
-	if (Blt_Chain_GetLength(corePtr->clients) == 0) {
-	    DestroyTableObject(corePtr);
-	}
-    }
-    tablePtr->magic = 0;
-    Blt_Free(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTable --
- *
- *	Creates a new table client.  Clients shared a tuple data object.  They
- *	individually manage traces and events on tuple objects.  Returns a
- *	pointer to the malloc'ed structure.  This is passed to the client as a
- *	tuple token.
- *	
- * Results:
- *	A pointer to a Table is returned.  If one can't be allocated, NULL
- *	is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Table *
-NewTable(
-    InterpData *dataPtr, 
-    TableObject *corePtr,	/* Table object serving this client. */
-    const char *qualName)	/* Full namespace qualified name of table. */
-{
-    Blt_Chain chain;
-    Table *tablePtr;
-    int isNew;
-
-    tablePtr = Blt_Calloc(1, sizeof(Table));
-    if (tablePtr == NULL) {
-	return NULL;
-    }
-    tablePtr->magic = TABLE_MAGIC;
-    tablePtr->interp = dataPtr->interp;
-    /* Add client to table object's list of clients. */
-    tablePtr->link = Blt_Chain_Append(corePtr->clients, tablePtr);
-
-    /* By default, use own sets of tags. */
-    tablePtr->tags = NewTags();
-    tablePtr->rowTags = &tablePtr->tags->rowTable;
-    tablePtr->columnTags = &tablePtr->tags->columnTable;
-
-    tablePtr->tablePtr = &dataPtr->clientTable;
-    tablePtr->hPtr = Blt_CreateHashEntry(&dataPtr->clientTable, qualName, 
-		&isNew);
-    if (isNew) {
-	chain = Blt_Chain_Create();
-	Blt_SetHashValue(tablePtr->hPtr, chain);
-    } else {
-	chain = Blt_GetHashValue(tablePtr->hPtr);
-    }
-    tablePtr->name = Blt_GetHashKey(&dataPtr->clientTable, tablePtr->hPtr);
-    tablePtr->link2 = Blt_Chain_Append(chain, tablePtr);
-    tablePtr->rowNotifiers = Blt_Chain_Create();
-    tablePtr->columnNotifiers = Blt_Chain_Create();
-    tablePtr->traces = Blt_Chain_Create();
-
-    tablePtr->corePtr = corePtr;
-    return tablePtr;
-}
-
-static Header *
-FindLabel(RowColumn *rcPtr, const char *label)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&rcPtr->labels, label);
-    if (hPtr != NULL) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_GetHashValue(hPtr);
-	assert(chain);
-	link = Blt_Chain_FirstLink(chain);
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static int
-SetType(Table *tablePtr, struct _Blt_TableColumn *colPtr, 
-	Blt_TableColumnType type)
-{
-    int i;
-
-    if (type == colPtr->type) {
-	return TCL_OK;			/* Already the requested type. */
-    }
-    /* For each value in the column, try to convert it to the desired type. */
-    for (i = 1; i < Blt_Table_NumRows(tablePtr); i++) {
-	Row *rowPtr;
-	Value *valuePtr;
-
-	rowPtr = Blt_Table_Row(tablePtr, i);
-	valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-	if (!IsEmpty(valuePtr)) {
-	    Value value;
-
-	    memset(&value, 0, sizeof(Value));
-	    if (SetValueFromString(tablePtr->interp, type, valuePtr->string, -1,
-		&value) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    /* Now replace the column with the converted the values. */
-    for (i = 1; i < Blt_Table_NumRows(tablePtr); i++) {
-	Row *rowPtr;
-	Value *valuePtr;
-
-	rowPtr = Blt_Table_Row(tablePtr, i);
-	valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-	if (!IsEmpty(valuePtr)) {
-	    if (SetValueFromString(tablePtr->interp, type, valuePtr->string, -1,
-		valuePtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    colPtr->type = type;
-    return TCL_OK;
-}
-
-
-static void
-ResetMap(RowColumn *rcPtr)
-{
-    long i, j;
-
-    /* Reset the reverse lookup: from header to index. */
-    for (i = 0, j = 1; i < rcPtr->nUsed; i++, j++) {
-	rcPtr->map[i]->index = j;
-    }
-}
-
-static void
-DeleteHeader(RowColumn *rcPtr, Header *headerPtr)
-{
-    /* If there is a label is associated with the column, free it. */
-    if (headerPtr->label != NULL) {
-	UnsetLabel(rcPtr, headerPtr);
-    }
-    { 
-	long p, q;
-
-	/* Compress the index-to-offset map. */
-	for (q = headerPtr->index, p = q - 1; q < rcPtr->nUsed; p++, q++) {
-	    /* Update the index as we slide down the headers in the map. */
-	    rcPtr->map[p] = rcPtr->map[q];
-	    rcPtr->map[p]->index = q;
-	}
-	rcPtr->map[p] = NULL;
-    }
-    /* Finally free the header. */
-    Blt_PoolFreeItem(rcPtr->headerPool, headerPtr);
-    rcPtr->nUsed--;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClearRowNotifiers --
- *
- *	Removes all event handlers set for the designated row.  Note that this
- *	doesn't remove handlers triggered by row or column tags.  Row and
- *	column traces are stored in a chain.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClearRowNotifiers(Table *tablePtr, Row *rowPtr)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->rowNotifiers); link != NULL;
-	 link = next) {
-	Notifier *notifierPtr;
-
-	next = Blt_Chain_NextLink(link);
-	notifierPtr = Blt_Chain_GetValue(link);
-	if (notifierPtr->header == (Header *)rowPtr) {
-	    Blt_Table_DeleteNotifier(notifierPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClearColumnNotifiers --
- *
- *	Removes all event handlers set for the designated row.  Note that this
- *	doesn't remove handlers triggered by row or column tags.  Row and
- *	column traces are stored in a chain.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClearColumnNotifiers(Table *tablePtr, Column *colPtr)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->columnNotifiers); link != NULL; 
-	link = next) {
-	Notifier *notifierPtr;
-
-	next = Blt_Chain_NextLink(link);
-	notifierPtr = Blt_Chain_GetValue(link);
-	if (notifierPtr->header == (Header *)colPtr) {
-	    Blt_Table_DeleteNotifier(notifierPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoNotify --
- *
- *	Traverses the list of event callbacks for a client and checks if one
- *	matches the given event.  A client may trigger an action that causes
- *	the itself to be notified again.  This can be prevented by setting the
- *	TABLE_NOTIFY_FOREIGN_ONLY bit in the event handler.
- *
- *	If a matching handler is found, a callback may be called either
- *	immediately or at the next idle time depending upon the
- *	TABLE_NOTIFY_WHENIDLE bit.
- *
- *	Since a handler routine may trigger yet another call to itself,
- *	callbacks are ignored while the event handler is executing.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-DoNotify(Table *tablePtr, Blt_Chain chain, 
-	 Blt_TableNotifyEvent *eventPtr)
-{
-    Blt_ChainLink link;
-    unsigned int eventMask;
-
-    /* Check the client table for matching notifiers.  Issue callbacks
-     * indicating that the structure of the table has changed.  */
-    eventMask = eventPtr->type & TABLE_NOTIFY_MASK;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Notifier *notifierPtr;
-	int match;
-
-	notifierPtr = Blt_Chain_GetValue(link);
-	if ((notifierPtr->flags & eventMask) == 0) {
-	    continue;		/* Event type doesn't match */
-	}
-	if ((eventPtr->self) && (notifierPtr->flags&TABLE_NOTIFY_FOREIGN_ONLY)){
-	    continue;		/* Don't notify yourself. */
-	}
-	if (notifierPtr->flags & TABLE_NOTIFY_ACTIVE) {
-	    continue;		/* Ignore callbacks that are generated inside
-				 * of a notify handler routine. */
-	}
-	match = FALSE;
-	if (notifierPtr->tag != NULL) {
-	    if (notifierPtr->flags & TABLE_NOTIFY_ROW) {
-		if (Blt_Table_HasRowTag(tablePtr, 
-			(Row *)eventPtr->header, 
-			notifierPtr->tag)) {
-		    match++;
-		}
-	    } else {
-		if (Blt_Table_HasColumnTag(tablePtr, 
-			(Column *)eventPtr->header, 
-			notifierPtr->tag)) {
-		    match++;
-		}
-	    }
-	} else if (notifierPtr->header == eventPtr->header) {
-	    match++;		/* Offsets match. */
-	} else if (eventPtr->header == NULL) {
-	    match++;		/* Event matches any notifier offset. */
-	} else if (notifierPtr->header == NULL) {
-	    match++;		/* Notifier matches any event offset. */
-	}
-	if (!match) {
-	    continue;		/* Row or column doesn't match. */
-	}
-	if (notifierPtr->flags & TABLE_NOTIFY_WHENIDLE) {
-	    if ((notifierPtr->flags & TABLE_NOTIFY_PENDING) == 0) {
-		notifierPtr->flags |= TABLE_NOTIFY_PENDING;
-		notifierPtr->event = *eventPtr;
-		Tcl_DoWhenIdle(NotifyIdleProc, notifierPtr);
-	    }
-	} else {
-	    NotifyIdleProc(notifierPtr);
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyClients --
- *
- *	Traverses the list of event callbacks and checks if one matches the
- *	given event.  A client may trigger an action that causes the table
- *	object to notify it.  This can be prevented by setting the
- *	TABLE_NOTIFY_FOREIGN_ONLY bit in the event handler.
- *
- *	If a matching handler is found, a callback may be called either
- *	immediately or at the next idle time depending upon the
- *	TABLE_NOTIFY_WHENIDLE bit.
- *
- *	Since a handler routine may trigger yet another call to itself,
- *	callbacks are ignored while the event handler is executing.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-NotifyClients(Table *tablePtr, Blt_Chain chain, Header *header, 
-	      unsigned int flags)
-{
-    Blt_ChainLink link, next;
-    
-    for (link = Blt_Chain_FirstLink(tablePtr->corePtr->clients); link != NULL; 
-	 link = next) {
-	Blt_Table table;
-	Blt_TableNotifyEvent event;
-	
-	next = Blt_Chain_NextLink(link);
-	table = Blt_Chain_GetValue(link);
-	event.type = flags;
-	event.table = tablePtr;
-	event.header = header;
-	event.interp = tablePtr->interp;
-	event.self = (table == tablePtr);
-	DoNotify(table, chain, &event);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TriggerColumnNotifiers --
- *
- *	Traverses the list of event callbacks and checks if one matches the
- *	given event.  A client may trigger an action that causes the table
- *	object to notify it.  This can be prevented by setting the
- *	TABLE_NOTIFY_FOREIGN_ONLY bit in the event handler.
- *
- *	If a matching handler is found, a callback may be called either
- *	immediately or at the next idle time depending upon the
- *	TABLE_NOTIFY_WHENIDLE bit.
- *
- *	Since a handler routine may trigger yet another call to itself,
- *	callbacks are ignored while the event handler is executing.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-TriggerColumnNotifiers(Table *tablePtr, Column *colPtr, unsigned int flags)
-{
-    if (Blt_Chain_GetLength(tablePtr->columnNotifiers) == 0) {
-	return;			/* No notifiers registered. */
-    }
-    if (colPtr == NULL) {		/* Indicates to trigger notifications
-					 * for all columns. */
-	long i;
-
-	for (i = 1; i < Blt_Table_NumColumns(tablePtr); i++) {
-	    colPtr = Blt_Table_Column(tablePtr, i);
-	    NotifyClients(tablePtr, tablePtr->columnNotifiers, (Header *)colPtr,
-		flags | TABLE_NOTIFY_COLUMN);
-	} 
-    } else {
-	NotifyClients(tablePtr, tablePtr->columnNotifiers, (Header *)colPtr, 
-		flags | TABLE_NOTIFY_COLUMN);
-    }
-}
-
-	     
-/*
- *---------------------------------------------------------------------------
- *
- * TriggerRowNotifiers --
- *
- *	Traverses the list of event callbacks and checks if one matches the
- *	given event.  A client may trigger an action that causes the table
- *	object to notify it.  This can be prevented by setting the
- *	TABLE_NOTIFY_FOREIGN_ONLY bit in the event handler.
- *
- *	If a matching handler is found, a callback may be called either
- *	immediately or at the next idle time depending upon the
- *	TABLE_NOTIFY_WHENIDLE bit.
- *
- *	Since a handler routine may trigger yet another call to itself,
- *	callbacks are ignored while the event handler is executing.
- *	
- *---------------------------------------------------------------------------
- */
-static void
-TriggerRowNotifiers(Table *tablePtr, Row *rowPtr, unsigned int flags)
-{
-    if (Blt_Chain_GetLength(tablePtr->rowNotifiers) == 0) {
-	return;			/* No notifiers registered. */
-    }
-    if (rowPtr == TABLE_NOTIFY_ALL) {	
-	long i;
-
-	/* Trigger notifications for all rows. */
-	for (i = 1; i < Blt_Table_NumRows(tablePtr); i++) {
-	    rowPtr = Blt_Table_Row(tablePtr, i);
-	    NotifyClients(tablePtr, tablePtr->rowNotifiers, (Header *)rowPtr, 
-		flags | TABLE_NOTIFY_ROW);
-	} 
-    } else {
-	NotifyClients(tablePtr, tablePtr->rowNotifiers, (Header *)rowPtr, 
-		flags | TABLE_NOTIFY_ROW);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ClearRowTraces --
- *
- *	Removes all traces set for this row.  Note that this doesn't remove
- *	traces set for specific cells (row,column).  Row traces are stored in
- *	a chain, which in turn is held in a hash table, keyed by the row.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_ClearRowTraces(Table *tablePtr, Row *rowPtr)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->traces); link != NULL; 
-	 link = next) {
-	Trace *tracePtr;
-
-	next = Blt_Chain_NextLink(link);
-	tracePtr = Blt_Chain_GetValue(link);
-	if (tracePtr->row == rowPtr) {
-	    Blt_Table_DeleteTrace(tracePtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ClearColumnTraces --
- *
- *	Removes all traces set for this column.  Note that this doesn't remove
- *	traces set for specific cells (row,column).  Column traces are stored
- *	in a chain, which in turn is held in a hash table, keyed by the
- *	column.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_ClearColumnTraces(Table *tablePtr, Blt_TableColumn column)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->traces); link != NULL; 
-	 link = next) {
-	Trace *tracePtr;
-
-	next = Blt_Chain_NextLink(link);
-	tracePtr = Blt_Chain_GetValue(link);
-	if (tracePtr->column == column) {
-	    Blt_Table_DeleteTrace(tracePtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoTrace --
- *
- *	Fires a trace set by a client of the table object.  Trace procedures
- *	should return a standard TCL result.
- *
- *	   TCL_OK	procedure executed successfully.
- *	   TCL_ERROR	procedure failed.
- *	   TCL_BREAK	don't execute any further trace procedures.
- *	   TCL_CONTINUE	treat like TCL_OK.
- *
- *	A trace procedure can in turn trigger more traces.  Traces are
- *	prohibited from recursively reentering their own trace procedures.  A
- *	hash table in the trace structure tracks the cells currently actively
- *	traced.  If a cell is already being traced, the trace procedure is not
- *	called and TCL_OK is blindly returned.
- *
- * Results:
- *	Returns the result of trace procedure.  If the trace is already
- *	active, then TCL_OK is returned.
- *
- * Side Effects:
- *	Traces on the table location may be fired.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DoTrace(Trace *tracePtr, Blt_TableTraceEvent *eventPtr)
-{
-    int result;
-
-    /* 
-     * Check for individual traces on a cell.  Each trace has a hash table
-     * that tracks what cells are actively being traced. This is to prevent
-     * traces from triggering recursive callbacks.
-     */
-    Tcl_Preserve(tracePtr);
-    tracePtr->flags |= TABLE_TRACE_ACTIVE;
-    result = (*tracePtr->proc)(tracePtr->clientData, eventPtr);
-    tracePtr->flags &= ~TABLE_TRACE_ACTIVE;
-    Tcl_Release(tracePtr);
-
-    if (result == TCL_ERROR) {
-	fprintf(stderr, "error in trace callback: %s\n", 
-		Tcl_GetStringResult(eventPtr->interp));
-	Tcl_BackgroundError(eventPtr->interp);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CallTraces --
- *
- *	Examines the traces set for each client of the table object and fires
- *	any matching traces.
- *
- *	Traces match on row and column tag and indices and flags.
- *	Traces can match on
- *	     flag		type of trace (read, write, unset, create)
- *	     row index
- *	     column index
- *	     row tag
- *	     column tag
- *
- *	If the TABLE_TRACE_FOREIGN_ONLY is set in the handler, it means to
- *	ignore actions that are initiated by that client of the object.  Only
- *	actions by other clients are handled.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- * Side Effects:
- *	Traces on the tuple table location may be fired.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CallTraces(Table *tablePtr, Table *clientPtr, Row *rowPtr, 
-	   Column *colPtr, unsigned int flags)
-{
-    Blt_ChainLink link, next;
-    Blt_TableTraceEvent event;
-
-    /* Initialize trace event information. */
-    event.table = clientPtr;
-    event.row = rowPtr;
-    event.column = colPtr;
-    event.interp = clientPtr->interp;
-    if (tablePtr == clientPtr) {
-	flags |= TABLE_TRACE_SELF;
-    }
-    event.mask = flags;
-    for (link = Blt_Chain_FirstLink(clientPtr->traces); link != NULL; 
-	 link = next) {
-	Trace *tracePtr;
-	int rowMatch, colMatch;
-
-	next = Blt_Chain_NextLink(link);
-	tracePtr = Blt_Chain_GetValue(link);
-	if ((tracePtr->flags & flags) == 0) {
-	    continue;		/* Doesn't match trace flags. */
-	}
-	if (tracePtr->flags & TABLE_TRACE_ACTIVE) {
-	    continue;		/* Ignore callbacks that were triggered from
-				 * the active trace handler routine. */
-	}
-	rowMatch = colMatch = FALSE;
-	if (tracePtr->colTag != NULL) {
-	    if (Blt_Table_HasColumnTag(clientPtr, colPtr, 
-			tracePtr->colTag)) {
-		colMatch++;
-	    }
-	} else if ((tracePtr->column == colPtr) || (tracePtr->column == NULL)) {
-	    colMatch++;
-	}
-	if (tracePtr->rowTag != NULL) {
-	    if (Blt_Table_HasRowTag(clientPtr, rowPtr, tracePtr->rowTag)) {
-		rowMatch++;
-	    }
-	} else if ((tracePtr->row == rowPtr) || (tracePtr->row == NULL)) {
-	    rowMatch++;
-	}
-	if (!rowMatch || !colMatch) {
-	    continue;
-	}
-	if (DoTrace(tracePtr, &event) == TCL_BREAK) {
-	    return;		/* Don't complete traces on break. */
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CallClientTraces --
- *
- *	Examines the traces set for each client of the table object and fires
- *	any matching traces.
- *
- *	Traces match on row and column indices and flags.
- *	The order is 
- *	  1. column traces.
- *	  2. row traces.
- *	  3. cell (row,column) traces.
- *
- *	If no matching criteria is specified (no tag, key, or tuple address)
- *	then only the bit flag has to match.
- *
- *	If the TABLE_TRACE_FOREIGN_ONLY is set in the handler, it means to
- *	ignore actions that are initiated by that client of the object.  Only
- *	actions by other clients are handled.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- * Side Effects:
- *	Traces on the tuple table location may be fired.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CallClientTraces(Table *tablePtr, Row *rowPtr, Column *colPtr, 
-		 unsigned int flags)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->corePtr->clients); link != NULL; 
-	 link = next) {
-	Table *clientPtr;
-
-	next = Blt_Chain_NextLink(link);
-	clientPtr = Blt_Chain_GetValue(link);
-	CallTraces(tablePtr, clientPtr, rowPtr, colPtr, flags);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnsetValue --
- *
- *	Removes the value from the selected row, column location in the table.
- *	The row, column location must be within the actual table limits, but
- *	it's okay if there isn't a value there to remove.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The objPtr representing the value is released.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UnsetValue(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *valuePtr;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (!IsEmpty(valuePtr)) {
-	/* Indicate the keytables need to be regenerated. */
-	if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	    tablePtr->flags |= TABLE_KEYS_DIRTY;
-	}
-    }
-    FreeValue(valuePtr);
-}
-
-static void
-UnsetRowValues(Table *tablePtr, Row *rowPtr)
-{
-    long i;
-
-    for (i = 1; i <= Blt_Table_NumColumns(tablePtr); i++) {
-	Column *colPtr;
-
-	colPtr = Blt_Table_Column(tablePtr, i);
-	UnsetValue(tablePtr, rowPtr, colPtr);
-    }
-}
-
-static void
-UnsetColumnValues(Table *tablePtr, Column *colPtr)
-{
-    Value *vector;
-    long i;
-
-    for (i = 1; i <= Blt_Table_NumRows(tablePtr); i++) {
-	Row *rowPtr;
-
-	rowPtr = Blt_Table_Row(tablePtr, i);
-	UnsetValue(tablePtr, rowPtr, colPtr);
-    }
-    vector = tablePtr->corePtr->data[colPtr->offset];
-    if (vector != NULL) {
-	FreeVector(vector, tablePtr->corePtr->rows.nAllocated);
-	tablePtr->corePtr->data[colPtr->offset] = NULL;
-    }
-}
-
-static int
-CompareDictionaryStrings(ClientData clientData, Value *valuePtr1, 
-	Value *valuePtr2)
-{
-    if (IsEmpty(valuePtr1)) {
-	if (IsEmpty(valuePtr2)) {
-	    return 0;
-	}
-	return 1;
-    } else if (IsEmpty(valuePtr2)) {
-	return -1;
-    }
-    return Blt_DictionaryCompare(valuePtr1->string, valuePtr2->string);
-}
-
-static int
-CompareAsciiStrings(ClientData clientData, Value *valuePtr1, Value *valuePtr2)
-{
-    if (IsEmpty(valuePtr1)) {
-	if (IsEmpty(valuePtr2)) {
-	    return 0;
-	}
-	return 1;
-    } else if (IsEmpty(valuePtr2)) {
-	return -1;
-    }
-    return strcmp(valuePtr1->string, valuePtr2->string);
-}
-
-static int
-CompareIntegers(ClientData clientData, Value *valuePtr1, Value *valuePtr2)
-{
-    if (IsEmpty(valuePtr1)) {
-	if (IsEmpty(valuePtr2)) {
-	    return 0;
-	}
-	return 1;
-    } else if (IsEmpty(valuePtr2)) {
-	return -1;
-    }
-    return valuePtr1->datum.l - valuePtr2->datum.l;
-}
-
-static int
-CompareDoubles(ClientData clientData, Value *valuePtr1, Value *valuePtr2)
-{
-    if (IsEmpty(valuePtr1)) {
-	if (IsEmpty(valuePtr2)) {
-	    return 0;
-	}
-	return 1;
-    } else if (IsEmpty(valuePtr2)) {
-	return -1;
-    }
-    if (valuePtr1->datum.d < valuePtr2->datum.d) {
-	return -1;
-    } else if (valuePtr1->datum.d > valuePtr2->datum.d) {
-	return 1;
-    }
-    return 0;
-}
-
-typedef struct {
-    Blt_Table table;
-    Blt_TableSortOrder *order;
-    long nColumns;
-    unsigned int flags;
-} TableSortData;
-
-static TableSortData sortData;
-
-static int
-CompareRows(void *a, void *b)
-{
-    Table *tablePtr;
-    Blt_TableSortOrder *sp, *send;
-    Row *rowPtr1, *rowPtr2;
-    long result;
-
-    tablePtr = sortData.table;
- 
-    rowPtr1 = *(Row **)a;
-    rowPtr2 = *(Row **)b;
-    for (sp = sortData.order, send = sp + sortData.nColumns; sp < send; sp++) {
-	Column *colPtr;
-	Value *valuePtr1, *valuePtr2, *vector;
-
-	colPtr = sp->column;
-	valuePtr1 = valuePtr2 = NULL;
-	vector = tablePtr->corePtr->data[colPtr->offset];
-	if (vector != NULL) {
-	    valuePtr1 = vector + rowPtr1->offset;
-	    if (IsEmpty(valuePtr1)) {
-		valuePtr1 = NULL;
-	    }
-	    valuePtr2 = vector + rowPtr2->offset;
-	    if (IsEmpty(valuePtr2)) {
-		valuePtr2 = NULL;
-	    }
-	}
-	result = (*sp->sortProc)(sp->clientData, valuePtr1, valuePtr2);
-	if (result != 0) {
-	    return (sortData.flags & SORT_DECREASING) ? -result : result;
-	}
-    }
-    result = rowPtr1->index - rowPtr2->index;
-    return (sortData.flags & SORT_DECREASING) ? -result : result;
-}
-
-static void
-InitSortProcs(Table *tablePtr, Blt_TableSortOrder *order, size_t n, int flags)
-{
-    Blt_TableSortOrder *sp, *send;
-
-    for (sp = order, send = sp + n; sp < send; sp++) {
-	Column *colPtr;
-
-	sp->clientData = tablePtr;
-	colPtr = sp->column;
-	switch (colPtr->type) {
-	case TABLE_COLUMN_TYPE_INT:
-	case TABLE_COLUMN_TYPE_LONG:
-	    sp->sortProc = CompareIntegers;
-	    break;
-	case TABLE_COLUMN_TYPE_DOUBLE:
-	    sp->sortProc = CompareDoubles;
-	    break;
-	case TABLE_COLUMN_TYPE_STRING:
-	case TABLE_COLUMN_TYPE_UNKNOWN:
-	default:
-	    if (flags & SORT_ASCII) {
-		sp->sortProc = CompareAsciiStrings;
-	    } else {
-		sp->sortProc = CompareDictionaryStrings;
-	    }
-	    break;
-	}
-    }
-}
-
-static Header **
-SortHeaders(RowColumn *rcPtr, QSortCompareProc *proc)
-{
-    long i;
-    Header **map;
-
-    /* Make a copy of the current row map. */
-    map = Blt_Malloc(sizeof(Header *) * rcPtr->nAllocated);
-    if (map == NULL) {
-	return NULL;
-    }
-    for (i = 0; i < rcPtr->nAllocated; i++) {
-	map[i] = rcPtr->map[i];
-    }
-    /* Sort the map and return it. */
-    qsort((char *)map, rcPtr->nUsed, sizeof(Header *), proc);
-    return map;
-}
-
-
-static void
-ReplaceMap(RowColumn *rcPtr, Header **map)
-{
-    Blt_Free(rcPtr->map);
-    rcPtr->map = map;
-    ResetMap(rcPtr);
-}
-
-static int
-MoveIndices(
-    RowColumn *rcPtr,
-    Header *srcPtr,		/* Starting source index.  */
-    Header *destPtr,		/* Starting destination index. */
-    long count)			/* # of rows or columns to move. */
-{
-    Header **newMap;		/* Resulting reordered map. */
-    long src, dest;
-
-#ifdef notdef
-    fprintf(stderr, "src=%ld, dest=%ld, count=%d\n", srcPtr->index, 
-	destPtr->index, count);
-    fprintf(stderr, "%s nUsed=%d, nAllocated=%d\n", rcPtr->classPtr->name,
-	    rcPtr->nUsed, rcPtr->nAllocated);
-#endif
-    if (srcPtr == destPtr) {
-	return TRUE;
-    }
-    src = srcPtr->index, dest = destPtr->index;
-    src--; dest--;
-    newMap = Blt_Malloc(sizeof(Header *) * rcPtr->nAllocated);
-    if (newMap == NULL) {
-	return FALSE;
-    }
-    if (dest < src) {
-	long i, j;
-
-	/*
-	 *     dest   src
-	 *      v     v
-	 * | | | | | |x|x|x|x| |
-	 *  A A B B B C C C C D
-	 * | | |x|x|x|x| | | | |
-	 *
-	 * Section C is the selected region to move.
-	 */
-	/* Section A: copy everything from 0 to "dest" */
-	for (i = 0; i < dest; i++) {
-	    newMap[i] = rcPtr->map[i];
-	}
-	/* Section C: append the selected region. */
-	for (i = src, j = dest; i < (src + count); i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-	/* Section B: shift the preceding indices from "dest" to "src".  */
-	for (i = dest; i < src; i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-	/* Section D: append trailing indices until the end. */
-	for (i = src + count; i < rcPtr->nUsed; i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-    } else if (src < dest) {
-	long i, j;
-
-	/*
-	 *     src        dest
-	 *      v           v
-	 * | | |x|x|x|x| | | | |
-	 *  A A C C C C B B B D
-	 * | | | | | |x|x|x|x| |
-	 *
-	 * Section C is the selected region to move.
-	 */
-	/* Section A: copy everything from 0 to "src" */
-	for (j = 0; j < src; j++) {
-	    newMap[j] = rcPtr->map[j];
-	}
-	/* Section B: shift the trailing indices from "src" to "dest".  */
-	for (i = (src + count); j < dest; i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-	/* Section C: append the selected region. */
-	for (i = src; i < (src + count); i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-	/* Section D: append trailing indices until the end. */
-	for (i = dest + count; i < rcPtr->nUsed; i++, j++) {
-	    newMap[j] = rcPtr->map[i];
-	}
-    }
-    /* Reset the inverse offset-to-index map. */
-    ReplaceMap(rcPtr, newMap);
-    return TRUE;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseDumpRecord --
- *
- *	Gets the next full record in the dump string, returning the
- *	record as a list. Blank lines and comments are ignored.
- *
- * Results: 
- *	TCL_RETURN	The end of the string is reached.
- *	TCL_ERROR	An error occurred and an error message 
- *			is left in the interpreter result.  
- *	TCL_OK		The next record has been successfully parsed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseDumpRecord(
-    Tcl_Interp *interp,
-    char **stringPtr,		/* (in/out) points to current location
-				 * in in dump string. Updated after
-				 * parsing record. */
-    RestoreData *restorePtr)
-{
-    char *entry, *eol;
-    char saved;
-    int result;
-
-    entry = *stringPtr;
-    /* Get first line, ignoring blank lines and comments. */
-    for (;;) {
-	char *first;
-
-	first = NULL;
-	restorePtr->nLines++;
-	/* Find the end of the first line. */
-	for (eol = entry; (*eol != '\n') && (*eol != '\0'); eol++) {
-	    if ((first == NULL) && (!isspace(UCHAR(*eol)))) {
-		first = eol;	/* Track first non-whitespace
-				 * character. */
-	    }
-	}
-	if (first == NULL) {
-	    if (*eol == '\0') {
-		return TCL_RETURN;
-	    }
-	} else if (*first != '#') {
-	    break;		/* Not a comment or blank line. */
-	}
-	entry = eol + 1;
-    }
-    saved = *eol;
-    *eol = '\0';
-    while (!Tcl_CommandComplete(entry)) {
-	*eol = saved;
-	if (*eol == '\0') {
-	    Tcl_AppendResult(interp, "incomplete dump record: \"", entry, 
-		"\"", (char *)NULL);
-	    return TCL_ERROR;		/* Found EOF (incomplete
-					 * entry) or error. */
-	}
-	/* Get the next line. */
-	for (eol = eol + 1; (*eol != '\n') && (*eol != '\0'); eol++) {
-	    /*empty*/
-	}
-	restorePtr->nLines++;
-	saved = *eol;
-	*eol = '\0';
-    }
-    if (entry == eol) {
-	return TCL_RETURN;
-    }
-    result = Tcl_SplitList(interp, entry, &restorePtr->argc, &restorePtr->argv);
-    *eol = saved;
-    *stringPtr = eol + 1;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadDumpRecord --
- *
- *	Reads the next full record from the given channel, returning the
- *	record as a list. Blank lines and comments are ignored.
- *
- * Results: 
- *	TCL_RETURN	The end of the file has been reached.
- *	TCL_ERROR	A read error has occurred and an error message 
- *			is left in the interpreter result.  
- *	TCL_OK		The next record has been successfully parsed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ReadDumpRecord(Tcl_Interp *interp, Tcl_Channel channel, RestoreData *restorePtr)
-{
-    int result;
-    Tcl_DString ds;
-
-    Tcl_DStringInit(&ds);
-    /* Get first line, ignoring blank lines and comments. */
-    for (;;) {
-	const char *cp;
-	int nBytes;
-
-	Tcl_DStringSetLength(&ds, 0);
-	nBytes = Tcl_Gets(channel, &ds);
-	if (nBytes < 0) {
-	    if (Tcl_Eof(channel)) {
-		return TCL_RETURN;
-	    }
-	    return TCL_ERROR;
-	}
-	restorePtr->nLines++;
-	for (cp = Tcl_DStringValue(&ds); *cp != '\0'; cp++) {
-	    if (!isspace(UCHAR(*cp))) {
-		break;
-	    }
-	}
-	if ((*cp != '\0') && (*cp != '#')) {
-	    break;		/* Not a comment or blank line. */
-	}
-    }
-
-    Tcl_DStringAppend(&ds, "\n", 1);
-    while (!Tcl_CommandComplete(Tcl_DStringValue(&ds))) {
-	int nBytes;
-
-	/* Process additional lines if needed */
-	nBytes = Tcl_Gets(channel, &ds);
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "error reading file: ", 
-			     Tcl_PosixError(interp), (char *)NULL);
-	    Tcl_DStringFree(&ds);
-	    return TCL_ERROR;		/* Found EOF (incomplete
-					 * entry) or error. */
-	}
-	restorePtr->nLines++;
-	Tcl_DStringAppend(&ds, "\n", 1);
-    }
-    result = Tcl_SplitList(interp, Tcl_DStringValue(&ds), &restorePtr->argc, 
-			   &restorePtr->argv);
-    Tcl_DStringFree(&ds);
-    return result;
-}
-
-static void
-RestoreError(Tcl_Interp *interp, RestoreData *restorePtr)
-{
-    Tcl_DString ds;
-
-    Tcl_DStringInit(&ds);
-    Tcl_DStringGetResult(interp, &ds);
-    Tcl_AppendResult(interp, restorePtr->fileName, ":", 
-	Blt_Ltoa(restorePtr->nLines), ": error: ", Tcl_DStringValue(&ds), 
-	(char *)NULL);
-    Tcl_DStringFree(&ds);
-}
-
-static int
-RestoreHeader(Tcl_Interp *interp, Blt_Table table, RestoreData *restorePtr)
-{
-    long nCols, nRows;
-    long lval;
-
-    /* i rows columns ctime mtime */
-    if (restorePtr->argc != 5) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "wrong # elements in restore header.", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }	
-    if (Tcl_GetLong(interp, restorePtr->argv[1], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    if (lval < 1) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad # rows \"", restorePtr->argv[1], "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    nRows = lval;
-    if (Tcl_GetLong(interp, restorePtr->argv[2], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    if (lval < 1) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad # columns \"", restorePtr->argv[2], "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    nCols = lval;
-    if ((restorePtr->flags & TABLE_RESTORE_OVERWRITE) == 0) {
-	nRows += restorePtr->nRows;
-	nCols += restorePtr->nCols;
-    }
-    if (nCols > Blt_Table_NumColumns(table)) {
-	long n;
-
-	n = nCols - Blt_Table_NumColumns(table);
-	if (!GrowColumns(table, n)) {
-	    RestoreError(interp, restorePtr);
-	    Tcl_AppendResult(interp, "can't allocate \"", Blt_Ltoa(n),
-			"\"", " extra columns.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (nRows > Blt_Table_NumRows(table)) {
-	long n;
-
-	n = nRows - Blt_Table_NumRows(table);
-	if (!GrowRows(table, n)) {
-	    RestoreError(interp, restorePtr);
-	    Tcl_AppendResult(interp, "can't allocate \"", Blt_Ltoa(n), "\"", 
-		" extra rows.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (Tcl_GetLong(interp, restorePtr->argv[3], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    restorePtr->ctime = (unsigned long)lval;
-    if (Tcl_GetLong(interp, restorePtr->argv[4], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    restorePtr->mtime = (unsigned long)lval;
-    return TCL_OK;
-}
-
-static int
-RestoreColumn(Tcl_Interp *interp, Blt_Table table, RestoreData *restorePtr)
-{
-    long lval;
-    long n;
-    Column *colPtr;
-    int type;
-    const char *label;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    /* c index label type ?tagList? */
-    if ((restorePtr->argc < 4) || (restorePtr->argc > 5)) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "wrong # elements in restore column entry", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }	
-    if (Tcl_GetLong(interp, restorePtr->argv[1], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    if (lval < 1) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad column index \"", restorePtr->argv[1], 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    n = lval;
-    label = restorePtr->argv[2];
-    colPtr = Blt_Table_FindColumnByLabel(table, label);
-    if ((colPtr == NULL) || 
-	((restorePtr->flags & TABLE_RESTORE_OVERWRITE) == 0)) {
-	colPtr = Blt_Table_CreateColumn(interp, table, label);
-	if (colPtr == NULL) {
-	    RestoreError(interp, restorePtr);
-	    Tcl_AppendResult(interp, "can't append column \"", label, "\"",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    hPtr = Blt_CreateHashEntry(&restorePtr->colIndices, (char *)n, &isNew);
-    Blt_SetHashValue(hPtr, colPtr);
-
-    type = Blt_Table_GetColumnType(restorePtr->argv[3]);
-    if (type == TABLE_COLUMN_TYPE_UNKNOWN) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad column type \"", restorePtr->argv[3], 
-			 "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    colPtr->type = type;
-    if ((restorePtr->argc == 5) && 
-	((restorePtr->flags & TABLE_RESTORE_NO_TAGS) == 0)) {
-	int i, elc;
-	const char **elv;
-
-	if (Tcl_SplitList(interp, restorePtr->argv[4], &elc, &elv) != TCL_OK) {
-	    RestoreError(interp, restorePtr);
-	    return TCL_ERROR;
-	}
-	
-	for (i = 0; i < elc; i++) {
-	    if (Blt_Table_SetColumnTag(interp, table, colPtr, elv[i]) 
-		!= TCL_OK) {
-		Blt_Free(elv);
-		return TCL_ERROR;
-	    }
-	}
-	Blt_Free(elv);
-    }
-    return TCL_OK;
-}
-
-static int
-RestoreRow(Tcl_Interp *interp, Blt_Table table, RestoreData *restorePtr)
-{
-    Blt_TableRow row;
-    Blt_HashEntry *hPtr;
-    const char **elv;
-    const char *label;
-    int elc;
-    int isNew;
-    long lval;
-    long n;
-
-    /* r index label ?tagList? */
-    if ((restorePtr->argc < 3) || (restorePtr->argc > 4)) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "wrong # elements in restore row entry", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }	
-    if (Tcl_GetLong(interp, restorePtr->argv[1], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    if (lval < 1) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad row index \"", restorePtr->argv[1], "\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    n = lval;
-    label = restorePtr->argv[2];
-    row = Blt_Table_FindRowByLabel(table, label);
-    if ((row == NULL) || ((restorePtr->flags & TABLE_RESTORE_OVERWRITE) == 0)) {
-	row = Blt_Table_CreateRow(interp, table, label);
-	if (row == NULL) {
-	    RestoreError(interp, restorePtr);
-	    Tcl_AppendResult(interp, "can't append row \"", label, "\"",
-		     (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    hPtr = Blt_CreateHashEntry(&restorePtr->rowIndices, (char *)n, &isNew);
-    Blt_SetHashValue(hPtr, row);
-    if ((restorePtr->argc == 5) && 
-	((restorePtr->flags & TABLE_RESTORE_NO_TAGS) == 0)) {
-	int i;
-
-	if (Tcl_SplitList(interp, restorePtr->argv[3], &elc, &elv) != TCL_OK) {
-	    RestoreError(interp, restorePtr);
-	    return TCL_ERROR;
-	}
-	for (i = 0; i < elc; i++) {
-	    if (Blt_Table_SetRowTag(interp, table, row, elv[i]) != TCL_OK) {
-		Blt_Free(elv);
-		return TCL_ERROR;
-	    }
-	}
-	Blt_Free(elv);
-    }
-    return TCL_OK;
-}
-
-static int
-RestoreValue(Tcl_Interp *interp, Blt_Table table, RestoreData *restorePtr)
-{
-    Blt_HashEntry *hPtr;
-    int result;
-    Blt_TableRow row;
-    Blt_TableColumn col;
-    long lval;
-
-    /* d row column value */
-    if (restorePtr->argc != 4) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "wrong # elements in restore data entry", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }	
-    if (Tcl_GetLong(interp, restorePtr->argv[1], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&restorePtr->rowIndices, (char *)lval);
-    if (hPtr == NULL) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad row index \"", restorePtr->argv[1], "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    row = Blt_GetHashValue(hPtr);
-    if (Tcl_GetLong(interp, restorePtr->argv[2], &lval) != TCL_OK) {
-	RestoreError(interp, restorePtr);
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&restorePtr->colIndices, (char *)lval);
-    if (hPtr == NULL) {
-	RestoreError(interp, restorePtr);
-	Tcl_AppendResult(interp, "bad column index \"", restorePtr->argv[2], 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    col = Blt_GetHashValue(hPtr);
-
-    result = Blt_Table_SetString(table, row, col, restorePtr->argv[3], -1);
-    if (result != TCL_OK) {
-	RestoreError(interp, restorePtr);
-    }
-    return result;
-}
-
-Blt_TableRow *
-Blt_Table_RowMap(Table *tablePtr)  
-{
-    return (Blt_TableRow *)tablePtr->corePtr->rows.map;
-}
-
-Blt_TableColumn *
-Blt_Table_ColumnMap(Table *tablePtr)  
-{
-    return (Blt_TableColumn *)tablePtr->corePtr->columns.map;
-}
-
-Blt_HashEntry *
-Blt_Table_FirstRowTag(Table *tablePtr, Blt_HashSearch *cursorPtr)  
-{
-    return Blt_FirstHashEntry(tablePtr->rowTags, cursorPtr);
-}
-
-Blt_HashEntry *
-Blt_Table_FirstColumnTag(Table *tablePtr, Blt_HashSearch *cursorPtr)  
-{
-    return Blt_FirstHashEntry(tablePtr->columnTags, cursorPtr);
-}
-
-int 
-Blt_Table_SameTableObject(Table *tablePtr1, Table *tablePtr2)  
-{
-    return tablePtr1->corePtr == tablePtr2->corePtr;
-}
-
-Blt_Chain
-Blt_Table_RowTags(Table *tablePtr, Row *rowPtr)  
-{
-    Blt_Chain chain;
-
-    chain = Blt_Chain_Create();
-    DumpTags(tablePtr->rowTags, (Header *)rowPtr, chain);
-    return chain;
-}
-
-Blt_TableRow
-Blt_Table_FindRowByIndex(Table *tablePtr, long index)  
-{
-    if ((index > 0) && (index <= Blt_Table_NumRows(tablePtr))) {
-	return Blt_Table_Row(tablePtr, index);
-    }
-    return NULL;
-}
-
-Blt_TableColumn
-Blt_Table_FindColumnByIndex(Table *tablePtr, long index)  
-{
-    if ((index > 0) && (index <= Blt_Table_NumColumns(tablePtr))) {
-	return Blt_Table_Column(tablePtr, index);
-    }
-    return NULL;
-}
-
-Blt_Chain
-Blt_Table_ColumnTags(Table *tablePtr, Blt_TableColumn col)  
-{
-    Blt_Chain chain;
-
-    chain = Blt_Chain_Create();
-    DumpTags(tablePtr->columnTags, (Header *)col, chain);
-    return chain;
-}
-
-
-Blt_TableRowColumnSpec
-Blt_Table_RowSpec(Blt_Table table, Tcl_Obj *objPtr, const char **stringPtr)
-{
-    const char *string, *p;
-    long lval;
-    char c;
-
-    string = Tcl_GetString(objPtr);
-    *stringPtr = string;
-    c = string[0];
-    if ((isdigit(UCHAR(c))) && 
-	(Tcl_GetLongFromObj((Tcl_Interp *)NULL, objPtr, &lval) == TCL_OK)) {
-	return TABLE_SPEC_INDEX;
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	return TABLE_SPEC_TAG;
-    } else if ((c == 'a') && (strcmp(string, "all") == 0)) {
-	return TABLE_SPEC_TAG;
-    } else if ((c == 'r') && (strncmp(string, "range=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_RANGE;
-    } else if ((c == 'i') && (strncmp(string, "index=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_INDEX;
-    } else if ((c == 'l') && (strncmp(string, "label=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_LABEL;
-    } else if ((c == 't') && (strncmp(string, "tag=", 4) == 0)) {
-	*stringPtr = string + 4;
-	return TABLE_SPEC_TAG;
-    } else if (Blt_Table_FindRowByLabel(table, string) != NULL) {
-	return TABLE_SPEC_LABEL;
-    } else if (Blt_Table_FindRowTagTable(table, string) != NULL) {
-	return TABLE_SPEC_TAG;
-    }
-    p = strchr(string, '-');
-    if (p != NULL) {
-	Tcl_Obj *rangeObjPtr;
-	Blt_TableRow row;
-
-	rangeObjPtr = Tcl_NewStringObj(string, p - string);
-	row = Blt_Table_FindRow((Tcl_Interp *)NULL, table, rangeObjPtr);
-	Tcl_DecrRefCount(rangeObjPtr);
-        if (row != NULL) {
-	    rangeObjPtr = Tcl_NewStringObj(p + 1, -1);
-	    row = Blt_Table_FindRow((Tcl_Interp *)NULL, table, rangeObjPtr);
-	    Tcl_DecrRefCount(rangeObjPtr);
-	    if (row != NULL) {
-		return TABLE_SPEC_RANGE;
-	    }
-	}
-    } 
-    return TABLE_SPEC_UNKNOWN;
-}
-
-Blt_TableColumn
-Blt_Table_FirstColumn(Table *tablePtr)  
-{
-    if (tablePtr->corePtr->columns.nUsed == 0) {
-	return NULL;
-    }
-    return (Blt_TableColumn)tablePtr->corePtr->columns.map[0];
-}
-
-Blt_TableColumn
-Blt_Table_NextColumn(Table *tablePtr, Column *colPtr)  
-{
-    long index;
-
-    index = colPtr->index;
-    if (index >= tablePtr->corePtr->columns.nUsed) {
-	return NULL;
-    }
-    return (Blt_TableColumn)tablePtr->corePtr->columns.map[index];
-}
-
-Blt_TableRow
-Blt_Table_FirstRow(Table *tablePtr)  
-{
-    if (tablePtr->corePtr->rows.nUsed == 0) {
-	return NULL;
-    }
-    return (Blt_TableRow)tablePtr->corePtr->rows.map[0];
-}
-
-Blt_TableRow
-Blt_Table_NextRow(Table *tablePtr, Row *rowPtr)  
-{
-    long index;
-
-    index = rowPtr->index;
-    if (index >= tablePtr->corePtr->rows.nUsed) {
-	return NULL;
-    }
-    return (Blt_TableRow)tablePtr->corePtr->rows.map[index];
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_IterateRows --
- *
- *	Returns the id of the first row derived from the given tag,
- *	label or index represented in objPtr.  
- *
- * Results:
- *	Returns the row location of the first item.  If no row 
- *	can be found, then -1 is returned and an error message is
- *	left in the interpreter.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_IterateRows(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-		      Blt_TableIterator *iterPtr)
-{
-    Blt_TableRow row, from, to;
-    const char *tagName, *p;
-    int result;
-    Tcl_Obj *rangeObjPtr;
-    long lval;
-    Blt_TableRowColumnSpec spec;
-
-    memset(iterPtr, 0, sizeof(Blt_TableIterator));
-    iterPtr->table = table;
-    iterPtr->type = TABLE_ITERATOR_INDEX;
-
-    spec = Blt_Table_RowSpec(table, objPtr, &tagName);
-    switch (spec) {
-    case TABLE_SPEC_INDEX:
-	p = Tcl_GetString(objPtr);
-	if (p == tagName) {
-	    result = Tcl_GetLongFromObj((Tcl_Interp *)NULL, objPtr, &lval);
-	} else {
-	    result = Tcl_GetLong((Tcl_Interp *)NULL, (char *)tagName, &lval);
-	}
-	if (result != TCL_OK) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "badly formed row index \"", 
-			tagName, "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	if ((lval < 1) || (lval > Blt_Table_NumRows(table))) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad row index \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-	iterPtr->start = iterPtr->end = lval;
-	iterPtr->tagName = tagName;
-	return TCL_OK;
-
-    case TABLE_SPEC_LABEL:
-	row = Blt_Table_FindRowByLabel(table, tagName);
-	if (row == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find row label \"", tagName, 
-			     "\" in ", Blt_Table_TableName(table), (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	iterPtr->start = iterPtr->end = Blt_Table_RowIndex(row);
-	return TCL_OK;
-
-    case TABLE_SPEC_TAG:
-	if (strcmp(tagName, "all") == 0) {
-	    iterPtr->type = TABLE_ITERATOR_ALL;
-	    iterPtr->start = 1;
-	    iterPtr->end = Blt_Table_NumRows(table);
-	    iterPtr->tagName = tagName;
-	} else if (strcmp(tagName, "end") == 0) {
-	    iterPtr->tagName = tagName;
-	    iterPtr->start = iterPtr->end = Blt_Table_NumRows(table);
-	} else {
-	    iterPtr->tablePtr = Blt_Table_FindRowTagTable(iterPtr->table, 
-		tagName);
-	    if (iterPtr->tablePtr == NULL) {
-		if (interp != NULL) {
-		    Tcl_AppendResult(interp, "can't find row tag \"", tagName, 
-			"\" in ", Blt_Table_TableName(table), (char *)NULL);
-		}
-		return TCL_ERROR;
-	    }
-	    iterPtr->type = TABLE_ITERATOR_TAG;
-	    iterPtr->tagName = tagName;
-	}
-	return TCL_OK;
-
-    case TABLE_SPEC_RANGE:
-	p = strchr(tagName, '-');
-	if (p == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad range specification \"", tagName, 
-			"\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	rangeObjPtr = Tcl_NewStringObj(tagName, p - tagName);
-	from = Blt_Table_FindRow(interp, table, rangeObjPtr);
-	Tcl_DecrRefCount(rangeObjPtr);
-        if (from == NULL) {
-	    return TCL_ERROR;
-	}
-	rangeObjPtr = Tcl_NewStringObj(p + 1, -1);
-	to = Blt_Table_FindRow(interp, table, rangeObjPtr);
-	Tcl_DecrRefCount(rangeObjPtr);
-        if (to == NULL) {
-	    return TCL_ERROR;
-	}
-	iterPtr->start = Blt_Table_RowIndex(from);
-	iterPtr->end = Blt_Table_RowIndex(to);
-	iterPtr->type = TABLE_ITERATOR_RANGE;
-	iterPtr->tagName = tagName;
-	return TCL_OK;
-
-    default:
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown row specification \"", tagName, 
-		"\" in ", Blt_Table_TableName(table), (char *)NULL);
-	}
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FirstTaggedRow --
- *
- *	Returns the id of the next row derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first item.  If no more rows
- *	can be found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableRow
-Blt_Table_FirstTaggedRow(Blt_TableIterator *iterPtr)
-{
-    if (iterPtr->type == TABLE_ITERATOR_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	if (hPtr == NULL) {
-	    return NULL;
-	}
-	return Blt_GetHashValue(hPtr);
-    } else if (iterPtr->type == TABLE_ITERATOR_CHAIN) {
-	iterPtr->link = Blt_Chain_FirstLink(iterPtr->chain);
-	if (iterPtr->link != NULL) {
-	    return Blt_Chain_GetValue(iterPtr->link);
-	}
-    } else if (iterPtr->start <= iterPtr->end) {
-	Blt_TableRow row;
-	
-	row = Blt_Table_Row(iterPtr->table, iterPtr->start);
-	iterPtr->next = iterPtr->start + 1;
-	return row;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_NextTaggedRow --
- *
- *	Returns the id of the next row derived from the given tag.
- *
- * Results:
- *	Returns the row location of the first item.  If no more rows
- *	can be found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableRow
-Blt_Table_NextTaggedRow(Blt_TableIterator *iterPtr)
-{
-    if (iterPtr->type == TABLE_ITERATOR_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	if (hPtr != NULL) {
-	    return Blt_GetHashValue(hPtr);
-	}
-    } else if (iterPtr->type == TABLE_ITERATOR_CHAIN) {
-	iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	if (iterPtr->link != NULL) {
-	    return Blt_Chain_GetValue(iterPtr->link);
-	}
-    } else if (iterPtr->next <= iterPtr->end) {
-	Blt_TableRow row;
-	
-	row = Blt_Table_Row(iterPtr->table, iterPtr->next);
-	iterPtr->next++;
-	return row;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindRow --
- *
- *	Gets the row offset associated the given row index, tag, or
- *	label.  This routine is used when you want only one row index.
- *	It's an error if more than one row is specified (e.g. "all"
- *	tag or range "1:4").  It's also an error if the row tag is
- *	empty (no rows are currently tagged).
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableRow
-Blt_Table_FindRow(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr)
-{
-    Blt_TableIterator iter;
-    Blt_TableRow first, next;
-
-    if (Blt_Table_IterateRows(interp, table, objPtr, &iter) != TCL_OK) {
-	return NULL;
-    }
-    first = Blt_Table_FirstTaggedRow(&iter);
-    if (first == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "no rows specified by \"", 
-			     Tcl_GetString(objPtr), "\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    next = Blt_Table_NextTaggedRow(&iter);
-    if (next != NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "multiple rows specified by \"", 
-			     Tcl_GetString(objPtr), "\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    return first;
-}
-
-Blt_TableRowColumnSpec
-Blt_Table_ColumnSpec(Blt_Table table, Tcl_Obj *objPtr, const char **stringPtr)
-{
-    const char *string, *p;
-    long lval;
-    char c;
-
-    string = Tcl_GetString(objPtr);
-    *stringPtr = string;
-    c = string[0];
-    if ((isdigit(c)) && 
-	Tcl_GetLongFromObj((Tcl_Interp *)NULL, objPtr, &lval) == TCL_OK) {
-	return TABLE_SPEC_INDEX;
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	return TABLE_SPEC_TAG;
-    } else if ((c == 'a') && (strcmp(string, "all") == 0)) {
-	return TABLE_SPEC_TAG;
-    } else if ((c == 'r') && (strncmp(string, "range=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_RANGE;
-    } else if ((c == 'i') && (strncmp(string, "index=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_INDEX;
-    } else if ((c == 'l') && (strncmp(string, "label=", 6) == 0)) {
-	*stringPtr = string + 6;
-	return TABLE_SPEC_LABEL;
-    } else if ((c == 't') && (strncmp(string, "tag=", 4) == 0)) {
-	*stringPtr = string + 4;
-	return TABLE_SPEC_TAG;
-    } else if (Blt_Table_FindColumnTagTable(table, string) != NULL) {
-	return TABLE_SPEC_TAG;
-    } else if (Blt_Table_FindColumnByLabel(table, string) != NULL) {
-	return TABLE_SPEC_LABEL;
-    }
-    p = strchr(string, '-');
-    if (p != NULL) {
-	Tcl_Obj *objPtr;
-	Blt_TableColumn col;
-
-	objPtr = Tcl_NewStringObj(string, p - string);
-	Tcl_IncrRefCount(objPtr);
-	col = Blt_Table_FindColumn(NULL, table, objPtr);
-	Tcl_DecrRefCount(objPtr);
-        if (col != NULL) {
-	    objPtr = Tcl_NewStringObj(p + 1, -1);
-	    col = Blt_Table_FindColumn(NULL, table, objPtr);
-	    Tcl_DecrRefCount(objPtr);
-	    if (col != NULL) {
-		return TABLE_SPEC_RANGE;
-	    }
-	}
-    }
-    return TABLE_SPEC_UNKNOWN;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_IterateColumns --
- *
- *	Returns the id of the first column derived from the given tag,
- *	label or index represented in objPtr.  
- *
- * Results:
- *	Returns the column location of the first item.  If no column 
- *	can be found, then -1 is returned and an error message is
- *	left in the interpreter.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_IterateColumns(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-			 Blt_TableIterator *iterPtr)
-{
-    Blt_TableColumn col, from, to;
-    const char *tagName, *p;
-    int result;
-    Tcl_Obj *fromObjPtr, *toObjPtr;
-    long lval;
-    Blt_TableRowColumnSpec spec;
-
-    iterPtr->table = table;
-    iterPtr->type = TABLE_ITERATOR_INDEX;
-
-    spec = Blt_Table_ColumnSpec(table, objPtr, &tagName);
-    switch (spec) {
-    case TABLE_SPEC_INDEX:
-	p = Tcl_GetString(objPtr);
-	if (p == tagName) {
-	    result = Tcl_GetLongFromObj((Tcl_Interp *)NULL, objPtr, &lval);
-	} else {
-	    result = Tcl_GetLong((Tcl_Interp *)NULL, (char *)tagName, &lval);
-	}
-	if (result != TCL_OK) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "badly formed column index \"", 
-			tagName, "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	if ((lval < 1) || (lval > Blt_Table_NumColumns(table))) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad column index \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-	iterPtr->start = iterPtr->end = lval;
-	iterPtr->tagName = tagName;
-	return TCL_OK;
-
-    case TABLE_SPEC_LABEL:
-	col = Blt_Table_FindColumnByLabel(table, tagName);
-	if (col == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find column label \"", tagName, 
-			"\" in ", Blt_Table_TableName(table), (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	iterPtr->start = iterPtr->end = Blt_Table_ColumnIndex(col);
-	return TCL_OK;
-
-    case TABLE_SPEC_TAG:
-	if (strcmp(tagName, "all") == 0) {
-	    iterPtr->type = TABLE_ITERATOR_ALL;
-	    iterPtr->start = 1;
-	    iterPtr->end = Blt_Table_NumColumns(table);
-	    iterPtr->tagName = tagName;
-	} else if (strcmp(tagName, "end") == 0) {
-	    iterPtr->tagName = tagName;
-	    iterPtr->start = iterPtr->end = Blt_Table_NumColumns(table);
-	} else {
-	    iterPtr->tablePtr = Blt_Table_FindColumnTagTable(iterPtr->table,
-		tagName);
-	    if (iterPtr->tablePtr == NULL) {
-		if (interp != NULL) {
-		    Tcl_AppendResult(interp, "can't find column tag \"", 
-			tagName, "\" in ", Blt_Table_TableName(table), 
-			(char *)NULL);
-		}
-		return TCL_ERROR;
-	    }
-	    iterPtr->type = TABLE_ITERATOR_TAG;
-	    iterPtr->tagName = tagName;
-	}
-	return TCL_OK;
-
-    case TABLE_SPEC_RANGE:
-	p = strchr(tagName, '-');
-	if (p == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad range specification \"", tagName, 
-			"\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	fromObjPtr = Tcl_NewStringObj(tagName, p - tagName);
-	from = Blt_Table_FindColumn(interp, table, fromObjPtr);
-	Tcl_DecrRefCount(fromObjPtr);
-        if (from == NULL) {
-	    return TCL_ERROR;
-	}
-	toObjPtr = Tcl_NewStringObj(p + 1, -1);
-	to = Blt_Table_FindColumn(interp, table, toObjPtr);
-	Tcl_DecrRefCount(toObjPtr);
-        if (to == NULL) {
-	    return TCL_ERROR;
-	}
-	iterPtr->start = Blt_Table_ColumnIndex(from);
-	iterPtr->end   = Blt_Table_ColumnIndex(to);
-	iterPtr->type  = TABLE_ITERATOR_RANGE;
-	iterPtr->tagName = tagName;
-	return TCL_OK;
-
-    default:
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown column specification \"", 
-		tagName, "\" in ", Blt_Table_TableName(table),(char *)NULL);
-	}
-    }
-    return TCL_ERROR;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_IterateColumns --
- *
- *	Initials the table iterator to walk through the columns tagged by the
- *	given tag, label, or index, as represented in objPtr.
- *
- *	Notes: 
- *
- *	1) A tag doesn't need to point to any columns. It can be empty.  This
- *	routine does not check if a tag represents any columns, only that the
- *	tag itself exists.
- *
- *	2) If a column label and tag are the same string, the label always
- *	wins.
- *
- *	3) A range of columns can be represented by "from x to y" x:y x-y {x y}
- *
- * Results:
- *	A standard TCL result.  If there is an error parsing the index or tag,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_IterateColumns(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-			 Blt_TableIterator *iterPtr)
-{
-    long lval;
-    const char *p, *rp, *pend;
-    const char *tagName;
-    int nBytes;
-    int badrange;
-
-    iterPtr->table = table;
-    iterPtr->type = TABLE_ITERATOR_INDEX;
-    iterPtr->next = -1;
-
-    tagName = Tcl_GetStringFromObj(objPtr, &nBytes);
-    rp = NULL;
-    for (p = tagName, pend = p + nBytes; p < pend; p++) {
-	if (*p != '-') {
-	    continue;
-	}
-	if (rp != NULL) {
-	    /* Found more than one range specifier. We'll assume it's
-	     * not a range and try is as a regular index, tag, or
-	     * label. */
-	    rp = NULL;
-	    break;
-	}
-	rp = p;
-    } 
-    badrange = FALSE;
-    if ((rp != NULL) && (rp != tagName) && (rp != (pend - 1))) {
-	long length;
-	Tcl_Obj *objPtr1, *objPtr2;
-	Blt_TableColumn from, to;
-	int result;
-	
-	length = rp - tagName;
-	objPtr1 = Tcl_NewStringObj(tagName, length);
-	rp++;
-	objPtr2 = Tcl_NewStringObj(rp, pend - rp);
-	from = Blt_Table_FindColumn(interp, table, objPtr1);
-	if (from != NULL) {
-	    to = Blt_Table_FindColumn(interp, table, objPtr2);
-	}
-	Tcl_DecrRefCount(objPtr1);
-	Tcl_DecrRefCount(objPtr2);
-	if (to != NULL) {
-	    iterPtr->start = Blt_Table_ColumnIndex(from);
-	    iterPtr->end = Blt_Table_ColumnIndex(to);
-	    iterPtr->type = TABLE_ITERATOR_RANGE;
-	    return TCL_OK;
-	}
-	badrange = TRUE;
-    }
-    if (Tcl_GetLongFromObj((Tcl_Interp *)NULL, objPtr, &lval) == TCL_OK) {
-	if ((lval < 1) || (lval > Blt_Table_NumColumns(table))) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, 
-			"can't find column: bad column index \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-	iterPtr->start = iterPtr->end = lval;
-	return TCL_OK;
-    } else if (strcmp(tagName, "all") == 0) {
-	iterPtr->type = TABLE_ITERATOR_ALL;
-	iterPtr->start = 1;
-	iterPtr->end = Blt_Table_NumColumns(table);
-	return TCL_OK;
-    } else if (strcmp(tagName, "end") == 0) {
-	iterPtr->start = iterPtr->end = Blt_Table_NumColumns(table);
-	return TCL_OK;
-    } else {
-	Column *colPtr;
-
-	colPtr = Blt_Table_FindColumnByLabel(table, tagName);
-	if (colPtr != NULL) {
-	    iterPtr->start = iterPtr->end = colPtr->index;
-	    return TCL_OK;
-	}
-	iterPtr->tablePtr = Blt_Table_FindColumnTagTable(iterPtr->table, 
-		tagName);
-	if (iterPtr->tablePtr != NULL) {
-	    iterPtr->type = TABLE_ITERATOR_TAG;
-	    return TCL_OK;
-	}
-    }
-    if ((interp != NULL) && (!badrange)) {
-	Tcl_AppendResult(interp, "can't find column tag \"", tagName, 
-		"\" in ", Blt_Table_TableName(table), (char *)NULL);
-    }
-    return TCL_ERROR;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FirstTaggedColumn --
- *
- *	Returns the first column based upon given iterator.
- *
- * Results:
- *	Returns the column location of the first item.  If no more columns
- *	can be found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableColumn
-Blt_Table_FirstTaggedColumn(Blt_TableIterator *iterPtr)
-{
-    if (iterPtr->type == TABLE_ITERATOR_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	if (hPtr == NULL) {
-	    return NULL;
-	}
-	return Blt_GetHashValue(hPtr);
-    } else if (iterPtr->type == TABLE_ITERATOR_CHAIN) {
-	iterPtr->link = Blt_Chain_FirstLink(iterPtr->chain);
-	if (iterPtr->link != NULL) {
-	    return Blt_Chain_GetValue(iterPtr->link);
-	}
-    } else if (iterPtr->start <= iterPtr->end) {
-	Blt_TableColumn col;
-	
-	col = Blt_Table_Column(iterPtr->table, iterPtr->start);
-	iterPtr->next = iterPtr->start + 1;
-	return col;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_NextTaggedColumn --
- *
- *	Returns the column location of the next column using the given
- *	iterator.
- *
- * Results:
- *	Returns the column location of the next item.  If no more columns can
- *	be found, then -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableColumn
-Blt_Table_NextTaggedColumn(Blt_TableIterator *iterPtr)
-{
-    if (iterPtr->type == TABLE_ITERATOR_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	if (hPtr != NULL) {
-	    return Blt_GetHashValue(hPtr);
-	}
-    } else if (iterPtr->type == TABLE_ITERATOR_CHAIN) {
-	iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	if (iterPtr->link != NULL) {
-	    return Blt_Chain_GetValue(iterPtr->link);
-	}
-    } else if (iterPtr->next <= iterPtr->end) {
-	Blt_TableColumn col;
-	
-	col = Blt_Table_Column(iterPtr->table, iterPtr->next);
-	iterPtr->next++;
-	return col;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindColumn --
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableColumn
-Blt_Table_FindColumn(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr)
-{
-    Blt_TableIterator iter;
-    Blt_TableColumn first, next;
-
-    if (Blt_Table_IterateColumns(interp, table, objPtr, &iter) != TCL_OK) {
-	return NULL;
-    }
-    first = Blt_Table_FirstTaggedColumn(&iter);
-    if (first == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "no columns specified by \"", 
-			     Tcl_GetString(objPtr), "\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    next = Blt_Table_NextTaggedColumn(&iter);
-    if (next != NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "multiple columns specified by \"", 
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    return first;
-}
-
-
-int
-Blt_Table_ListColumns(Tcl_Interp *interp, Blt_Table table, int objc, 
-		      Tcl_Obj *const *objv, Blt_Chain chain)
-{
-    Blt_ChainLink link;
-    Blt_HashTable cols;
-    int i;
-
-    Blt_InitHashTableWithPool(&cols, BLT_ONE_WORD_KEYS);
-    /* Initialize the hash table with the existing entries. */
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	int isNew;
-	Blt_TableColumn col;
-
-	col = Blt_Chain_GetValue(link);
-	Blt_CreateHashEntry(&cols, (char *)col, &isNew);
-    }
-    /* Collect the columns into a hash table. */
-    for (i = 0; i < objc; i++) {
-	Blt_TableIterator iter;
-	Blt_TableColumn col;
-
-	if (Blt_Table_IterateColumns(interp, table, objv[i], &iter) 
-	    != TCL_OK) {
-	    Blt_DeleteHashTable(&cols);
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    int isNew;
-
-	    Blt_CreateHashEntry(&cols, (char *)col, &isNew);
-	    if (isNew) {
-		Blt_Chain_Append(chain, col);
-	    }
-	}
-    }
-    Blt_DeleteHashTable(&cols);
-    return TCL_OK;
-}
-
-int
-Blt_Table_ListRows(Tcl_Interp *interp, Blt_Table table, int objc, 
-		   Tcl_Obj *const *objv, Blt_Chain chain)
-{
-    Blt_ChainLink link;
-    Blt_HashTable rows;
-    int i;
-
-    Blt_InitHashTableWithPool(&rows, BLT_ONE_WORD_KEYS);
-    /* Initialize the hash table with the existing entries. */
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	int isNew;
-	Blt_TableRow row;
-
-	row = Blt_Chain_GetValue(link);
-	Blt_CreateHashEntry(&rows, (char *)row, &isNew);
-    }
-    for (i = 0; i < objc; i++) {
-	Blt_TableIterator iter;
-	Blt_TableRow row;
-
-	if (Blt_Table_IterateRows(interp, table, objv[i], &iter) != TCL_OK){
-	    Blt_DeleteHashTable(&rows);
-	    return TCL_ERROR;
-	}
-	/* Append the new rows onto the chain. */
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    int isNew;
-
-	    Blt_CreateHashEntry(&rows, (char *)row, &isNew);
-	    if (isNew) {
-		Blt_Chain_Append(chain, row);
-	    }
-	}
-    }
-    Blt_DeleteHashTable(&rows);
-    return TCL_OK;
-}
-
-int
-Blt_Table_IterateRowsObjv(Tcl_Interp *interp, Blt_Table table, int objc, 
-			  Tcl_Obj *const *objv, Blt_TableIterator *iterPtr)
-{
-    Blt_Chain chain;
-
-    chain = Blt_Chain_Create();
-    if (Blt_Table_ListRows(interp, table, objc, objv, chain) != TCL_OK) {
-	Blt_Chain_Destroy(chain);
-	return TCL_ERROR;
-    }
-    iterPtr->type = TABLE_ITERATOR_CHAIN;
-    iterPtr->start = 1;
-    iterPtr->end = 1;
-    iterPtr->chain = chain;
-    iterPtr->tagName = "";
-    return TCL_OK;
-}
-
-void
-Blt_Table_IterateAllRows(Blt_Table table, Blt_TableIterator *iterPtr)
-{
-    iterPtr->table = table;
-    iterPtr->type = TABLE_ITERATOR_ALL;
-    iterPtr->start = 1;
-    iterPtr->end = Blt_Table_NumRows(table);
-    iterPtr->tagName = "all";
-    iterPtr->chain = NULL;
-}
-
-int
-Blt_Table_IterateColumnsObjv(Tcl_Interp *interp, Blt_Table table, int objc, 
-			     Tcl_Obj *const *objv, Blt_TableIterator *iterPtr)
-{
-    Blt_Chain chain;
-
-    chain = Blt_Chain_Create();
-    if (Blt_Table_ListColumns(interp, table, objc, objv, chain) != TCL_OK) {
-	Blt_Chain_Destroy(chain);
-	return TCL_ERROR;
-    }
-    iterPtr->type = TABLE_ITERATOR_CHAIN;
-    iterPtr->start = 1;
-    iterPtr->end = 1;
-    iterPtr->chain = chain;
-    iterPtr->tagName = "";
-    return TCL_OK;
-}
-
-void
-Blt_Table_IterateAllColumns(Blt_Table table, Blt_TableIterator *iterPtr)
-{
-    iterPtr->table = table;
-    iterPtr->type = TABLE_ITERATOR_ALL;
-    iterPtr->start = 1;
-    iterPtr->end = Blt_Table_NumColumns(table);
-    iterPtr->tagName = "all";
-    iterPtr->chain = NULL;
-}
-
-void
-Blt_Table_FreeIteratorObjv(Blt_TableIterator *iterPtr)
-{
-    if ((iterPtr->type == TABLE_ITERATOR_CHAIN) && (iterPtr->chain != NULL)) {
-	Blt_Chain_Destroy(iterPtr->chain);
-	iterPtr->chain = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeTrace --
- *
- *	Memory is deallocated for the trace.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeTrace(Trace *tracePtr)
-{
-    if (tracePtr->rowTag != NULL) {
-	Blt_Free(tracePtr->rowTag);
-    }
-    if (tracePtr->colTag != NULL) {
-	Blt_Free(tracePtr->colTag);
-    }
-    if (tracePtr->link != NULL) {
-	Blt_Chain_DeleteLink(tracePtr->chain, tracePtr->link);
-    }
-    Blt_Free(tracePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_DeleteTrace --
- *
- *	Deletes a trace.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Memory is deallocated for the trace.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_DeleteTrace(Trace *tracePtr)
-{
-    if ((tracePtr->flags & TABLE_TRACE_DESTROYED) == 0) {
-	if (tracePtr->deleteProc != NULL) {
-	    (*tracePtr->deleteProc)(tracePtr->clientData);
-	}
-	/* 
-	 * This accomplishes two things.  
-	 * 1) It doesn't let it anything match the trace and 
-	 * 2) marks the trace as invalid. 
-	 */
-	tracePtr->flags = TABLE_TRACE_DESTROYED;	
-
-	Tcl_EventuallyFree(tracePtr, (Tcl_FreeProc *)FreeTrace);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_Traces --
- *	
- *	Returns the chain of traces for a particular client.
- *
- * Results:
- *	Returns a pointer to the chain containing the traces for the
- *	given row.  If the row has no traces, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Chain
-Blt_Table_Traces(Table *tablePtr)
-{
-    return tablePtr->traces;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateTrace --
- *
- *	Creates a trace for one or more tuples with one or more column keys.
- *	Whenever a matching action occurs in the table object, the specified
- *	procedure is executed.
- *
- * Results:
- *	Returns a token for the trace.
- *
- * Side Effects:
- *	Memory is allocated for the trace.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableTrace
-Blt_Table_CreateTrace(
-    Table *tablePtr,			/* Table to be traced. */
-    Row *rowPtr, 
-    Column *colPtr,			/* Cell in table. */
-    const char *rowTag, 
-    const char *colTag,
-    unsigned int flags,			/* Bit mask indicating what actions to
-					 * trace. */
-    Blt_TableTraceProc *proc,	        /* Callback procedure for the trace. */
-    Blt_TableTraceDeleteProc *deleteProc, 
-    ClientData clientData)		/* One-word of data passed along when
-					 * the callback is executed. */
-{
-    Trace *tracePtr;
-
-    tracePtr = Blt_Calloc(1, sizeof (Trace));
-    if (tracePtr == NULL) {
-	return NULL;
-    }
-    tracePtr->row = rowPtr;
-    tracePtr->column = colPtr;
-    if (rowTag != NULL) {
-	tracePtr->rowTag = Blt_AssertStrdup(rowTag);
-    }
-    if (colTag != NULL) {
-	tracePtr->colTag = Blt_AssertStrdup(colTag);
-    }
-    tracePtr->flags = flags;
-    tracePtr->proc = proc;
-    tracePtr->deleteProc = deleteProc;
-    tracePtr->clientData = clientData;
-    tracePtr->chain = tablePtr->traces;
-    tracePtr->link = Blt_Chain_Append(tablePtr->traces, tracePtr);
-    return tracePtr;
-}
-
-Blt_TableTrace
-Blt_Table_CreateColumnTrace(
-    Table *tablePtr,			/* Table to be traced. */
-    Column *colPtr,			/* Cell in table. */
-    unsigned int flags,			/* Bit mask indicating what actions to
-					 * trace. */
-    Blt_TableTraceProc *proc,	       /* Callback procedure for the trace. */
-    Blt_TableTraceDeleteProc *deleteProc, 
-    ClientData clientData)		/* One-word of data passed along when
-					 * the callback is executed. */
-{
-    return Blt_Table_CreateTrace(tablePtr, NULL, colPtr, NULL, NULL, flags,
-		proc, deleteProc, clientData);
-}
-
-Blt_TableTrace
-Blt_Table_CreateColumnTagTrace(
-    Table *tablePtr,			/* Table to be traced. */
-    const char *colTag,			/* Cell in table. */
-    unsigned int flags,			/* Bit mask indicating what actions to
-					 * trace. */
-    Blt_TableTraceProc *proc,	       /* Callback procedure for the trace. */
-    Blt_TableTraceDeleteProc *deleteProc, 
-    ClientData clientData)		/* One-word of data passed along when
-					 * the callback is executed. */
-{
-    return Blt_Table_CreateTrace(tablePtr, NULL, NULL, NULL, colTag, flags,
-		proc, deleteProc, clientData);
-}
-
-Blt_TableTrace
-Blt_Table_CreateRowTrace(
-    Table *tablePtr,			/* Table to be traced. */
-    Row *rowPtr,			/* Cell in table. */
-    unsigned int flags,			/* Bit mask indicating what actions to
-					 * trace. */
-    Blt_TableTraceProc *proc,	       /* Callback procedure for the trace. */
-    Blt_TableTraceDeleteProc *deleteProc, 
-    ClientData clientData)		/* One-word of data passed along when
-					 * the callback is executed. */
-{
-    return Blt_Table_CreateTrace(tablePtr, rowPtr, NULL, NULL, NULL, flags,
-		proc, deleteProc, clientData);
-}
-
-Blt_TableTrace
-Blt_Table_CreateRowTagTrace(
-    Table *tablePtr,			/* Table to be traced. */
-    const char *rowTag,			/* Cell in table. */
-    unsigned int flags,			/* Bit mask indicating what actions to
-					 * trace. */
-    Blt_TableTraceProc *proc,	        /* Callback procedure for the trace. */
-    Blt_TableTraceDeleteProc *deleteProc, 
-    ClientData clientData)		/* One-word of data passed along when
-					 * the callback is executed. */
-{
-    return Blt_Table_CreateTrace(tablePtr, NULL, NULL, rowTag, NULL, flags,
-		proc, deleteProc, clientData);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ReleaseTags --
- *
- *	Releases the tag table used by this client.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	If no client is using the table, then it is freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_ReleaseTags(Table *tablePtr)
-{
-    Tags *tagsPtr;
-
-    tagsPtr = tablePtr->tags;
-    tagsPtr->refCount--;
-    if (tagsPtr->refCount <= 0) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&tagsPtr->rowTable, &cursor); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_HashTable *tablePtr;
-
-	    tablePtr = Blt_GetHashValue(hPtr); 
-	    Blt_DeleteHashTable(tablePtr);
-	    Blt_Free(tablePtr);
-	}
-	Blt_DeleteHashTable(&tagsPtr->rowTable);
-	tablePtr->rowTags = NULL;
-	for (hPtr = Blt_FirstHashEntry(&tagsPtr->columnTable, &cursor); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_HashTable *tablePtr;
-
-	    tablePtr = Blt_GetHashValue(hPtr); 
-	    Blt_DeleteHashTable(tablePtr);
-	    Blt_Free(tablePtr);
-	}
-	Blt_DeleteHashTable(&tagsPtr->columnTable);
-	Blt_Free(tagsPtr);
-	tablePtr->columnTags = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TableTagsAreShared --
- *
- *	Returns whether the tag table is shared with another client.
- *
- * Results:
- *	Returns TRUE if the current tag table is shared with another
- *	client, FALSE otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_TagsAreShared(Table *tablePtr)
-{
-    return (tablePtr->tags->refCount > 1);
-}   
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindRowTagTable --
- *
- *	Returns the hash table containing row indices for a tag.
- *
- * Results:
- *	Returns a pointer to the hash table containing indices for the given
- *	tag.  If the row has no tags, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_HashTable *
-Blt_Table_FindRowTagTable(Table *tablePtr, const char *tagName)		
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(tablePtr->rowTags, tagName);
-    if (hPtr == NULL) {
-	return NULL;		/* Row isn't tagged. */
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindColumnTagTable --
- *
- *	Returns the hash table containing column indices for a tag.
- *
- * Results:
- *	Returns a pointer to the hash table containing indices for the given
- *	tag.  If the tag has no indices, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_HashTable *
-Blt_Table_FindColumnTagTable(Table *tablePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(tablePtr->columnTags, tagName);
-    if (hPtr == NULL) {
-	return NULL;		
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ForgetRowTag --
- *
- *	Removes a tag from the row tag table.  Row tags are contained in hash
- *	tables keyed by the tag name.  Each table is in turn hashed by the row
- *	index in the row tag table.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Entries for the given tag in the corresponding row in hash tables may
- *	be removed.
- *	
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_ForgetRowTag(Tcl_Interp *interp, Table *tablePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;		/* Can't forget reserved tags. */
-    }
-    hPtr = Blt_FindHashEntry(tablePtr->rowTags, tagName);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown row tag \"", tagName, "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;	/* No such row tag. */
-    }
-    tagTablePtr = Blt_GetHashValue(hPtr);
-    Blt_DeleteHashTable(tagTablePtr);
-    Blt_Free(tagTablePtr);
-    Blt_DeleteHashEntry(tablePtr->rowTags, hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ForgetColumnTag --
- *
- *	Removes a tag from the column tag table.  Column tags are contained in
- *	hash tables keyed by the tag name.  Each table is in turn hashed by
- *	the column offset in the column tag table.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Entries for the given tag in the corresponding column in hash tables
- *	may be removed.
- *	
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_ForgetColumnTag(Tcl_Interp *interp, Table *tablePtr, 
-			  const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;		/* Can't forget reserved tags. */
-    }
-    hPtr = Blt_FindHashEntry(tablePtr->columnTags, tagName);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown column tag \"", tagName, "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;	/* No such column tag. */
-    }
-    tagTablePtr = Blt_GetHashValue(hPtr);
-    Blt_DeleteHashTable(tagTablePtr);
-    Blt_Free(tagTablePtr);
-    Blt_DeleteHashEntry(tablePtr->columnTags, hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetRowTag --
- *
- *	Associates a tag with a given row.  Individual row tags are stored in
- *	hash tables keyed by the tag name.  Each table is in turn stored in a
- *	hash table keyed by the row location.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A tag is stored for a particular row.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetRowTag(Tcl_Interp *interp, Table *tablePtr, Row *rowPtr, 
-		    const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-    int isNew;
-    long dummy;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;		/* Don't need to create reserved tags. */
-    }
-    if (tagName[0] == '\0') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be empty.", 
-		(char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (tagName[0] == '-') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, 
-		"\" can't start with a '-'.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (Tcl_GetLong(NULL, (char *)tagName, &dummy) == TCL_OK) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be a number.",
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(tablePtr->rowTags, tagName, &isNew);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't add tag \"", tagName, 
-			 "\": out of memory", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (isNew) {
-	tagTablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-	Blt_InitHashTable(tagTablePtr, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tagTablePtr);
-    } else {
-	tagTablePtr = Blt_GetHashValue(hPtr);
-    }
-    hPtr = Blt_CreateHashEntry(tagTablePtr, (char *)rowPtr, &isNew);
-    if (isNew) {
-	Blt_SetHashValue(hPtr, rowPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetColumnTag --
- *
- *	Associates a tag with a given column.  Individual column tags
- *	are stored in hash tables keyed by the tag name.  Each table
- *	is in turn stored in a hash table keyed by the column
- *	location.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A tag is stored for a particular column.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetColumnTag(Tcl_Interp *interp, Table *tablePtr,
-		       Blt_TableColumn column, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-    int isNew;
-    long dummy;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;			/* Don't create reserved tags. */
-    }
-    if (tagName[0] == '\0') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be empty.", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (tagName[0] == '-') {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, 
-		"\" can't start with a '-'.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (Tcl_GetLong(NULL, (char *)tagName, &dummy) == TCL_OK) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "tag \"", tagName, "\" can't be a number.",
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(tablePtr->columnTags, tagName, &isNew);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't add tag \"", tagName, 
-			 "\": out of memory", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (isNew) {
-	tagTablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-	Blt_InitHashTable(tagTablePtr, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tagTablePtr);
-    } else {
-	tagTablePtr = Blt_GetHashValue(hPtr);
-    }
-    hPtr = Blt_CreateHashEntry(tagTablePtr, (char *)column, &isNew);
-    if (isNew) {
-	Blt_SetHashValue(hPtr, column);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_HasRowTag --
- *
- *	Checks if a tag is associated with the given row.  
- *
- * Results:
- *	Returns TRUE if the tag is found, FALSE otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_HasRowTag(Table *tablePtr, Row *rowPtr, const char *tagName)
-{
-    Blt_HashTable *tagTablePtr;
-    Blt_HashEntry *hPtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return TRUE;		/* "all" tags matches every row. */
-    }
-    if (strcmp(tagName, "end") == 0) {
-	return (Blt_Table_RowIndex(rowPtr) == 
-		Blt_Table_NumRows(tablePtr));
-    }
-    tagTablePtr = Blt_Table_FindRowTagTable(tablePtr, tagName);
-    if (tagTablePtr == NULL) {
-	return FALSE;
-    }
-    hPtr = Blt_FindHashEntry(tagTablePtr, (char *)rowPtr);
-    if (hPtr != NULL) {
-	return TRUE;		/* Found tag in row tag table. */
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_HasColumnTag --
- *
- *	Checks if a tag is associated with the given column.  
- *
- * Results:
- *	Returns TRUE if the tag is found, FALSE otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_HasColumnTag(Table *tablePtr, Column *colPtr, 
-			   const char *tagName)
-{
-    Blt_HashTable *tagTablePtr;
-    Blt_HashEntry *hPtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return TRUE;		/* "all" tags matches every column. */
-    }
-    if (strcmp(tagName, "end") == 0) {
-	return (Blt_Table_ColumnIndex(colPtr) == 
-		Blt_Table_NumColumns(tablePtr));
-    }
-    tagTablePtr = Blt_Table_FindColumnTagTable(tablePtr, tagName);
-    if (tagTablePtr == NULL) {
-	return FALSE;
-    }
-    hPtr = Blt_FindHashEntry(tagTablePtr, (char *)colPtr);
-    if (hPtr != NULL) {
-	return TRUE;		/* Found tag in column tag table. */
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_UnsetRowTag --
- *
- *	Removes a tag from a given row.  
- *
- * Results:
- *	A standard TCL result.  If an error occurred, TCL_ERROR
- *	is returned and the interpreter result contains the error
- *	message.
- *
- * Side Effects:
- *      The tag associated with the row is freed.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_UnsetRowTag(Tcl_Interp *interp, Table *tablePtr, Row *rowPtr, 
-		      const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;		/* Can't remove reserved tags. */
-    } 
-    tagTablePtr = Blt_Table_FindRowTagTable(tablePtr, tagName);
-    if (tagTablePtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown row tag \"", tagName, "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(tagTablePtr, (char *)rowPtr);
-    if (hPtr != NULL) {
-	Blt_DeleteHashEntry(tagTablePtr, hPtr);
-    }
-    return TCL_OK;
-}    
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_UnsetColumnTag --
- *
- *	Removes a tag from a given column.  
- *
- * Results:
- *	A standard TCL result.  If an error occurred, TCL_ERROR
- *	is returned and the interpreter result contains the error
- *	message.
- *
- * Side Effects:
- *      The tag associated with the column is freed.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_UnsetColumnTag(Tcl_Interp *interp, Table *tablePtr, Column *colPtr, 
-			 const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tagTablePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "end") == 0)) {
-	return TCL_OK;		/* Can't remove reserved tags. */
-    } 
-    tagTablePtr = Blt_Table_FindColumnTagTable(tablePtr, tagName);
-    if (tagTablePtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "unknown column tag \"", tagName, "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(tagTablePtr, (char *)colPtr);
-    if (hPtr != NULL) {
-	Blt_DeleteHashEntry(tagTablePtr, hPtr);
-    }
-    return TCL_OK;
-}    
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ClearRowTags --
- *
- *	Removes all tags for a given row.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *      All tags associated with the row are freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_ClearRowTags(Table *tablePtr, Row *rowPtr)
-{
-    ClearTags(tablePtr->rowTags, (Header *)rowPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ClearColumnTags --
- *
- *	Removes all tags for a given column.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *      All tags associated with the column are freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_ClearColumnTags(Table *tablePtr, Column *colPtr)
-{
-    ClearTags(tablePtr->columnTags, (Header *)colPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_GetValue --
- *
- *	Gets a scalar Tcl_Obj value from the table at the designated
- *	row, column location.  "Read" traces may be fired *before* the
- *	value is retrieved.  If no value exists at that location,
- *	*objPtrPtr is set to NULL.
- *
- * Results:
- *	A standard TCL result.  Returns TCL_OK if successful accessing
- *	the table location.  If an error occurs, TCL_ERROR is returned
- *	and an error message is left in the interpreter.
- *
- * -------------------------------------------------------------------------- 
- */
-Blt_TableValue
-Blt_Table_GetValue(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    return GetValue(tablePtr, rowPtr, colPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetValue --
- *
- *	Sets a scalar Tcl_Obj value in the table at the designated row and
- *	column.  "Write" and possibly "create" or "unset" traces may be fired
- *	*after* the value is set.  If valuePtr is NULL, this indicates to
- *	unset the old value.
- *
- * Results:
- *	A standard TCL result.  Returns TCL_OK if successful setting the value
- *	at the table location.  If an error occurs, TCL_ERROR is returned and
- *	an error message is left in the interpreter.
- *
- * -------------------------------------------------------------------------- 
- */
-int
-Blt_Table_SetValue(Table *tablePtr, Row *rowPtr, Column *colPtr, 
-		   Value *valuePtr)
-{
-    Value *oldValuePtr;
-    int flags;
-
-    oldValuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    flags = TABLE_TRACE_WRITES;
-    if (IsEmpty(valuePtr)) {		/* New value is empty. Effectively
-					 * unsetting the value. */
-	flags |= TABLE_TRACE_UNSETS;
-    } else if (IsEmpty(oldValuePtr)) {
-	flags |= TABLE_TRACE_CREATES;	/* Old value was empty. */
-    } 
-    FreeValue(valuePtr);
-    *oldValuePtr = *valuePtr;
-    valuePtr->string = Blt_AssertStrdup(valuePtr->string);
-    CallClientTraces(tablePtr, rowPtr, colPtr, flags);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_GetObj --
- *
- *	Gets a scalar Tcl_Obj value from the table at the designated
- *	row, column location.  "Read" traces may be fired *before* the
- *	value is retrieved.  If no value exists at that location,
- *	*objPtrPtr is set to NULL.
- *
- * Results:
- *	A standard TCL result.  Returns TCL_OK if successful accessing
- *	the table location.  If an error occurs, TCL_ERROR is returned
- *	and an error message is left in the interpreter.
- *
- * -------------------------------------------------------------------------- 
- */
-Tcl_Obj *
-Blt_Table_GetObj(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *valuePtr;
-
-    CallClientTraces(tablePtr, rowPtr, colPtr, TABLE_TRACE_READS);
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (IsEmpty(valuePtr)) {
-	return NULL;
-    }
-    return GetObjFromValue(tablePtr->interp, colPtr->type, valuePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetObj --
- *
- *	Sets a scalar Tcl_Obj value in the table at the designated row and
- *	column.  "Write" and possibly "create" or "unset" traces may be fired
- *	*after* the value is set.  If valueObjPtr is NULL, this indicates to
- *	unset the old value.
- *
- * Results:
- *	A standard TCL result.  Returns TCL_OK if successful setting the value
- *	at the table location.  If an error occurs, TCL_ERROR is returned and
- *	an error message is left in the interpreter.
- *
- * -------------------------------------------------------------------------- 
- */
-int
-Blt_Table_SetObj(Table *tablePtr, Row *rowPtr, Column *colPtr, 
-		      Tcl_Obj *objPtr)
-{
-    unsigned int flags;
-    Value *valuePtr;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    flags = TABLE_TRACE_WRITES;
-    if (objPtr == NULL) {		/* New value is empty. Effectively
-					 * unsetting the value. */
-	flags |= TABLE_TRACE_UNSETS;
-    } else if (IsEmpty(valuePtr)) {
-	flags |= TABLE_TRACE_CREATES;
-    } 
-    if (SetValueFromObj(tablePtr->interp, colPtr->type, objPtr, valuePtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    CallClientTraces(tablePtr, rowPtr, colPtr, flags);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_UnsetValue --
- *
- *	Unsets a scalar Tcl_Obj value in the table at the designated row,
- *	column location.  It's okay is there is presently no value at the
- *	location. Unset traces may be fired *before* the value is unset.
- *
- * Results:
- *	A standard TCL result.  Returns TCL_OK if successful unsetting the
- *	value at the table location.  If an error occurs, TCL_ERROR is
- *	returned and an error message is left in the interpreter.
- *
- * -------------------------------------------------------------------------- 
- */
-int
-Blt_Table_UnsetValue(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *valuePtr;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (!IsEmpty(valuePtr)) {
-	CallClientTraces(tablePtr, rowPtr, colPtr, TABLE_TRACE_UNSETS);
-	/* Indicate the keytables need to be regenerated. */
-	if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	    tablePtr->flags |= TABLE_KEYS_DIRTY;
-	}
-	FreeValue(valuePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateObject --
- *
- *	Creates a table object by the designated name.  It's an error if a
- *	table object already exists by that name.
- *
- * Results:
- *	A standard TCL result.  If successful, a new table object is created
- *	and TCL_OK is returned.  If an object already exists or the table
- *	object can't be allocated, then TCL_ERROR is returned and an error
- *	message is left in the interpreter.
- *
- * Side Effects:
- *	A new table object is created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_CreateTable(
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    const char *name,		/* Name of tuple in namespace.  Object must
-				 * not already exist. */
-    Table **tablePtrPtr)	/* (out) Client token of newly created table
-				 * object.  Releasing the token will free the
-				 * tuple.  If NULL, no token is generated. */
-{
-    InterpData *dataPtr;
-    TableObject *corePtr;
-    Blt_ObjectName objName;
-    Table *newClientPtr;
-    Tcl_DString ds;
-    char *qualName;
-    char string[200];
-
-    dataPtr = GetInterpData(interp);
-    if (name != NULL) {
-	/* Check if a client by this name already exist in the current
-	 * namespace. */
-	if (GetTable(dataPtr, name, NS_SEARCH_CURRENT) != NULL) {
-	    Tcl_AppendResult(interp, "a table object \"", name,
-		"\" already exists", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	/* Generate a unique name in the current namespace. */
-	do  {
-	    sprintf_s(string, 200, "datatable%d", dataPtr->nextId++);
-	} while (GetTable(dataPtr, name, NS_SEARCH_CURRENT) != NULL);
-	name = string;
-    } 
-    /* 
-     * Tear apart and put back together the namespace-qualified name of the
-     * object.  This is to ensure that naming is consistent.
-     */ 
-    if (!Blt_ParseObjectName(interp, name, &objName, 0)) {
-	return TCL_ERROR;
-    }
-    corePtr = NewTableObject();
-    if (corePtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate table object.", (char *)NULL);
-	Tcl_DStringFree(&ds);
-	return TCL_ERROR;
-    }
-    qualName = Blt_MakeQualifiedName(&objName, &ds);
-    newClientPtr = NewTable(dataPtr, corePtr, qualName);
-    Tcl_DStringFree(&ds);
-    if (newClientPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate table token", (char *)NULL);
-	return TCL_ERROR;
-    }
-    
-    if (tablePtrPtr != NULL) {
-	*tablePtrPtr = newClientPtr;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_Open --
- *
- *	Allocates a token for the table object designated by name.  It's an
- *	error if no table object exists by that name.  The token returned is
- *	passed to various routines to manipulate the object.  Traces and event
- *	notifications are also made through the token.
- *
- * Results:
- *	A new token is returned representing the table object.  
- *
- * Side Effects:
- *	If this is the remaining client, then the table object itself is
- *	freed.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_Open(
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    const char *name,		/* Name of table object in namespace. */
-    Table **tablePtrPtr)
-{
-    Table *tablePtr, *newClientPtr;
-    InterpData *dataPtr;
-
-    dataPtr = GetInterpData(interp);
-    tablePtr = GetTable(dataPtr, name, NS_SEARCH_BOTH);
-    if ((tablePtr == NULL) || (tablePtr->corePtr == NULL)) {
-	Tcl_AppendResult(interp, "can't find a table object \"", name, "\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    newClientPtr = NewTable(dataPtr, tablePtr->corePtr, name);
-    if (newClientPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate token for table \"", name, 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *tablePtrPtr = newClientPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_Close --
- *
- *	Releases the tuple token, indicating this the client is no longer
- *	using the object. The client is removed from the tuple object's client
- *	list.  If this is the last client, then the object itself is destroyed
- *	and memory is freed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	If this is the remaining client, then the table object itself
- *	is freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_Close(Table *tablePtr)
-{
-    Blt_Chain chain;
-
-    if (tablePtr->magic != TABLE_MAGIC) {
-	fprintf(stderr, "invalid table object token 0x%lx\n", 
-		(unsigned long)tablePtr);
-	return;
-    }
-    chain = Blt_GetHashValue(tablePtr->hPtr);
-    Blt_Chain_DeleteLink(chain, tablePtr->link2);
-    if (Blt_Chain_GetLength(chain) == 0) {
-	Blt_DeleteHashEntry(tablePtr->tablePtr, tablePtr->hPtr);
-    }
-    DestroyTable(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_TableExists --
- *
- *	Indicates if a table object by the given name exists in either the
- *	current or global namespace.
- *
- * Results:
- *	Returns 1 if a table object exists and 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_TableExists(Tcl_Interp *interp, const char *name)
-{
-    InterpData *dataPtr;
-
-    dataPtr = GetInterpData(interp);
-    return (GetTable(dataPtr, name, NS_SEARCH_BOTH) != NULL);
-}
-
-static Notifier *
-AppendNotifier(Tcl_Interp *interp, Blt_Chain chain, unsigned int mask,
-	       Header *headerPtr, const char *tag, 
-	       Blt_TableNotifyEventProc *proc,
-	       Blt_TableNotifierDeleteProc *deleteProc, 
-	       ClientData clientData)
-{
-    Notifier *notifierPtr;
-
-    notifierPtr = Blt_AssertMalloc(sizeof (Notifier));
-    notifierPtr->proc = proc;
-    notifierPtr->deleteProc = deleteProc;
-    notifierPtr->chain = chain;
-    notifierPtr->clientData = clientData;
-    notifierPtr->header = headerPtr;
-    notifierPtr->tag = (tag != NULL) ? Blt_AssertStrdup(tag) : NULL;
-    notifierPtr->flags = mask;
-    notifierPtr->interp = interp;
-    notifierPtr->link = Blt_Chain_Append(chain, notifierPtr);
-    return notifierPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateColumnNotifier --
- *
- *	Creates an event handler using the following three pieces of
- *	information: 
- *		1. C function pointer, 
- *		2. one-word of data passed on each call, and 
- *		3. event mask indicating which events are of interest.  
- *	If an event already exists matching all of the above criteria,
- *	it is repositioned on the end of the event handler list.  This
- *	means that it will be the last to fire.
- *
- * Results:
- *      Returns a pointer to the event handler.
- *
- * Side Effects:
- *	Memory for the event handler is possibly allocated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableNotifier
-Blt_Table_CreateColumnNotifier(Tcl_Interp *interp, Table *tablePtr,
-			    Blt_TableColumn col, unsigned int mask,
-			    Blt_TableNotifyEventProc *proc,
-			    Blt_TableNotifierDeleteProc *deletedProc,
-			    ClientData clientData)
-{
-    return AppendNotifier(interp, tablePtr->columnNotifiers, 
-		mask | TABLE_NOTIFY_COLUMN, (Header *)col, NULL, proc, 
-		deletedProc, clientData);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateColumnTagNotifier --
- *
- *	Creates an event handler using the following three pieces of
- *	information: 
- *		1. C function pointer, 
- *		2. one-word of data passed on each call, and 
- *		3. event mask indicating which events are of interest.  
- *	If an event already exists matching all of the above criteria,
- *	it is repositioned on the end of the event handler list.  This
- *	means that it will be the last to fire.
- *
- * Results:
- *      Returns a pointer to the event handler.
- *
- * Side Effects:
- *	Memory for the event handler is possibly allocated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableNotifier
-Blt_Table_CreateColumnTagNotifier(Tcl_Interp *interp, Table *tablePtr,
-				  const char *tag, unsigned int mask,
-				  Blt_TableNotifyEventProc *proc,
-				  Blt_TableNotifierDeleteProc *deletedProc,
-				  ClientData clientData)
-{
-    return AppendNotifier(interp, tablePtr->columnNotifiers,
-		mask | TABLE_NOTIFY_COLUMN, (Header *)NULL, tag, proc, 
-		deletedProc, clientData);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateRowNotifier --
- *
- *	Creates an event handler using the following three pieces of
- *	information: 
- *		1. C function pointer, 
- *		2. one-word of data passed on each call, and 
- *		3. event mask indicating which events are of interest.  
- *	If an event already exists matching all of the above criteria,
- *	it is repositioned on the end of the event handler list.  This
- *	means that it will be the last to fire.
- *
- * Results:
- *      Returns a pointer to the event handler.
- *
- * Side Effects:
- *	Memory for the event handler is possibly allocated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableNotifier
-Blt_Table_CreateRowNotifier(Tcl_Interp *interp, Table *tablePtr, 
-			    Blt_TableRow row, unsigned int mask,
-			    Blt_TableNotifyEventProc *proc,
-			    Blt_TableNotifierDeleteProc *deletedProc,
-			    ClientData clientData)
-{
-    return AppendNotifier(interp, tablePtr->rowNotifiers,
-	mask | TABLE_NOTIFY_ROW, (Header *)row, NULL, proc, deletedProc, 
-	clientData);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_CreateColumnTagNotifier --
- *
- *	Creates an event handler using the following three pieces of
- *	information: 
- *		1. C function pointer, 
- *		2. one-word of data passed on each call, and 
- *		3. event mask indicating which events are of interest.  
- *	If an event already exists matching all of the above criteria,
- *	it is repositioned on the end of the event handler list.  This
- *	means that it will be the last to fire.
- *
- * Results:
- *      Returns a pointer to the event handler.
- *
- * Side Effects:
- *	Memory for the event handler is possibly allocated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableNotifier
-Blt_Table_CreateRowTagNotifier(Tcl_Interp *interp, Table *tablePtr,
-			       const  char *tag, unsigned int mask,
-			       Blt_TableNotifyEventProc *proc,
-			       Blt_TableNotifierDeleteProc *deletedProc,
-			       ClientData clientData)
-{
-    return AppendNotifier(interp, tablePtr->rowNotifiers, 
-	mask | TABLE_NOTIFY_ROW, (Header *)NULL, tag, proc, deletedProc, 
-	clientData);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_DeleteNotifier --
- *
- *	Removes the event handler designated by following three pieces
- *	of information: 
- *	   1. C function pointer, 
- *	   2. one-word of data passed on each call, and 
- *	   3. event mask indicating which events are of interest.
- *
- * Results:
- *      Nothing.
- *
- * Side Effects:
- *	Memory for the event handler is freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Table_DeleteNotifier(Notifier *notifierPtr)
-{
-    /* Check if notifier is already being deleted. */
-    if ((notifierPtr->flags & TABLE_NOTIFY_DESTROYED) == 0) {
-	if (notifierPtr->deleteProc != NULL) {
-	    (*notifierPtr->deleteProc)(notifierPtr->clientData);
-	}
-	if (notifierPtr->flags & TABLE_NOTIFY_PENDING) {
-	    Tcl_CancelIdleCall(NotifyIdleProc, notifierPtr);
-	}
-	notifierPtr->flags = TABLE_NOTIFY_DESTROYED;
-	Tcl_EventuallyFree(notifierPtr, (Tcl_FreeProc *)FreeNotifier);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindRowByLabel --
- *
- *	Returns the offset of the row given its label.  If the row label is
- *	invalid, then -1 is returned.
- *
- * Results:
- *	Returns the offset of the row or -1 if not found.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableRow
-Blt_Table_FindRowByLabel(Table *tablePtr, const char *label)
-{
-    return (Blt_TableRow)FindLabel(&tablePtr->corePtr->rows, label);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FindColumnByLabel --
- *
- *	Returns the offset of the column given its label.  If the column label
- *	is invalid, then -1 is returned.
- *
- * Results:
- *	Returns the offset of the column or -1 if not found.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TableColumn
-Blt_Table_FindColumnByLabel(Table *tablePtr, const char *label)
-{
-    return (Blt_TableColumn)FindLabel(&tablePtr->corePtr->columns, label);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetRowLabel --
- *
- *	Returns the label of the row.  If the row offset is invalid or the row
- *	has no label, then NULL is returned.
- *
- * Results:
- *	Returns the label of the row.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetRowLabel(Tcl_Interp *interp, Table *tablePtr, 
-			  Row *rowPtr, const char *label)
-{
-    return SetHeaderLabel(interp, &tablePtr->corePtr->rows, (Header *)rowPtr,
-	label);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetColumnLabel --
- *
- *	Sets the label of the column.  If the column offset is invalid, then
- *	no label is set.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetColumnLabel(Tcl_Interp *interp, Table *tablePtr, Column *colPtr, 
-			 const char *label)
-{
-    return SetHeaderLabel(interp, &tablePtr->corePtr->columns, (Header *)colPtr,
-	label);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetColumnType --
- *
- *	Sets the type of the given column.  
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetColumnType(Table *tablePtr, Column *colPtr, 
-			Blt_TableColumnType type)
-{
-    return SetType(tablePtr, colPtr, type);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ValueExists --
- *
- *	Indicates if a value exists for a given row,column offset in the
- *	tuple.  Note that this routine does not fire read traces.
- *
- * Results:
- *	Returns 1 is a value exists, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_ValueExists(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    return !IsEmpty(GetValue(tablePtr, rowPtr, colPtr));
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ExtendRows --
- *
- *	Adds new rows to the table.  Rows are slots in an array of Rows.  The
- *	array grows by doubling its size, so there may be more slots than
- *	needed (# rows).
- *
- * Results:
- *	Returns TCL_OK is the tuple is resized and TCL_ERROR if an not enough
- *	memory was available.
- *
- * Side Effects:
- *	If more rows are needed, the array which holds the tuples is
- *	reallocated by doubling its size.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_ExtendRows(Tcl_Interp *interp, Blt_Table table, size_t n, Row **rows)
-{
-    size_t i;
-    Blt_Chain chain;
-    Blt_ChainLink link;
-
-    if (n == 0) {
-	return TCL_OK;
-    }
-    chain = Blt_Chain_Create();
-    if (!ExtendRows(table, n, chain)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't extend table by ", 
-		Blt_Ltoa(n), " rows: out of memory.", (char *)NULL);
-	}
-	Blt_Chain_Destroy(chain);
-	return TCL_ERROR;
-    }
-    for (i = 0, link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link), i++) {
-	Blt_TableRow row;
-
-	row = Blt_Chain_GetValue(link);
-	if (rows != NULL) {
-	    rows[i] = row;
-	}
-    }
-    TriggerColumnNotifiers(table, TABLE_NOTIFY_ALL, TABLE_NOTIFY_ROW_CREATED);
-    Blt_Chain_Destroy(chain);
-    return TCL_OK;
-}
-
-int
-Blt_Table_DeleteRow(Table *tablePtr, Row *rowPtr)
-{
-    DeleteHeader(&tablePtr->corePtr->rows, (Header *)rowPtr);
-    UnsetRowValues(tablePtr, rowPtr);
-    TriggerColumnNotifiers(tablePtr, TABLE_NOTIFY_ALL,TABLE_NOTIFY_ROW_DELETED);
-    TriggerRowNotifiers(tablePtr, rowPtr, TABLE_NOTIFY_ROW_DELETED);
-    Blt_Table_ClearRowTags(tablePtr, rowPtr);
-    Blt_Table_ClearRowTraces(tablePtr, rowPtr);
-    ClearRowNotifiers(tablePtr, rowPtr);
-    tablePtr->flags |= TABLE_KEYS_DIRTY;
-    return TCL_OK;
-}
-
-Blt_TableRow
-Blt_Table_CreateRow(Tcl_Interp *interp, Blt_Table table, const char *label)
-{
-    Row *rowPtr;
-
-    if (Blt_Table_ExtendRows(interp, table, 1, &rowPtr) != TCL_OK) {
-	return NULL;
-    }
-    if (label != NULL) {
-	if (Blt_Table_SetRowLabel(interp, table, rowPtr, label) != TCL_OK) {
-	    Blt_Table_DeleteRow(table, rowPtr);
-	    return NULL;
-	}
-    }
-    return rowPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_MoveRows --
- *
- *	Move one of more rows to a new location in the tuple.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_Table_MoveRows(Tcl_Interp *interp, Table *tablePtr, Row *srcPtr, 
-		   Row *destPtr, size_t count)
-{
-    if (srcPtr == destPtr) {
-	return TCL_OK;		/* Move to the same location. */
-    }
-    if (!MoveIndices(&tablePtr->corePtr->rows, (Header *)srcPtr, 
-		     (Header *)destPtr, count)) {
-	Tcl_AppendResult(interp, "can't allocate new map for \"", 
-		Blt_Table_TableName(tablePtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    TriggerColumnNotifiers(tablePtr, TABLE_NOTIFY_ALL, TABLE_NOTIFY_ROW_MOVED);
-    return TCL_OK;
-}
-
-void
-Blt_Table_SetRowMap(Table *tablePtr, Row **map)
-{
-    TriggerColumnNotifiers(tablePtr, TABLE_NOTIFY_ALL, TABLE_NOTIFY_ROW_MOVED);
-    ReplaceMap(&tablePtr->corePtr->rows, (Header **)map);
-}
-
-Blt_TableRow *
-Blt_Table_SortRows(Table *tablePtr, Blt_TableSortOrder *order, size_t nColumns,
-		   unsigned int flags)
-{
-    sortData.table = tablePtr;
-    sortData.order = order;
-    sortData.nColumns = nColumns;
-    sortData.flags = flags;
-    InitSortProcs(tablePtr, order, nColumns, flags);
-    return (Blt_TableRow *)SortHeaders(&tablePtr->corePtr->rows, 
-	(QSortCompareProc *)CompareRows);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_DeleteColumn --
- *
- *	Remove the designated column from the table.  The actual space
- *	contained by the column isn't freed.  The map is compressed.  Tcl_Objs
- *	stored as column values are released.  Traces and tags associated with
- *	the column are removed.
- *
- * Side Effects:
- *	Traces may fire when column values are unset.  Also notifier events
- *	may be triggered, indicating the column has been deleted.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_DeleteColumn(Table *tablePtr, Column *colPtr)
-{
-    /* If the deleted column is a primary key, the generated keytables
-     * are now invalid. So remove them. */
-    if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	Blt_Table_UnsetKeys(tablePtr);
-    }
-    UnsetColumnValues(tablePtr, colPtr);
-    TriggerColumnNotifiers(tablePtr, colPtr, TABLE_NOTIFY_COLUMN_DELETED);
-    TriggerRowNotifiers(tablePtr, TABLE_NOTIFY_ALL,TABLE_NOTIFY_COLUMN_DELETED);
-
-    Blt_Table_ClearColumnTraces(tablePtr, colPtr);
-    Blt_Table_ClearColumnTags(tablePtr, colPtr);
-    ClearColumnNotifiers(tablePtr, colPtr);
-    DeleteHeader(&tablePtr->corePtr->columns, (Header *)colPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ExtendColumns --
- *
- *	Adds new columns to the table.  Columns are slots in an array of
- *	Columns.  The array columns by doubling its size, so there may be more
- *	slots than needed (# columns).
- *
- * Results:
- *	Returns TCL_OK is the tuple is resized and TCL_ERROR if an
- *	not enough memory was available.
- *
- * Side Effects:
- *	If more columns are needed, the array which holds the tuples is
- *	reallocated by doubling its size.  
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_ExtendColumns(Tcl_Interp *interp, Blt_Table table, size_t n, 
-			Column **cols)
-{
-    size_t i;
-    Blt_Chain chain;
-    Blt_ChainLink link;
-
-    chain = Blt_Chain_Create();
-    if (!ExtendColumns(table, n, chain)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't extend table by ", 
-		Blt_Ltoa(n), " columns: out of memory.", (char *)NULL);
-	}
-	Blt_Chain_Destroy(chain);
-	return TCL_ERROR;
-    }
-    for (i = 0, link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link), i++) {
-	Column *colPtr;
-
-	colPtr = Blt_Chain_GetValue(link);
-	if (cols != NULL) {
-	    cols[i] = colPtr;
-	}
-	colPtr->type = TABLE_COLUMN_TYPE_STRING;
-    }
-    TriggerRowNotifiers(table, TABLE_NOTIFY_ALL, TABLE_NOTIFY_COLUMN_CREATED);
-    Blt_Chain_Destroy(chain);
-    return TCL_OK;
-}
-
-Blt_TableColumn
-Blt_Table_CreateColumn(Tcl_Interp *interp, Blt_Table table, const char *label)
-{
-    Column *colPtr;
-
-    if (Blt_Table_ExtendColumns(interp, table, 1, &colPtr) != TCL_OK) {
-	return NULL;
-    }
-    if (label != NULL) {
-	if (Blt_Table_SetColumnLabel(interp, table, colPtr, label) != TCL_OK) {
-	    Blt_Table_DeleteColumn(table, colPtr);
-	    return NULL;
-	}
-    }
-    return colPtr;
-}
-
-void
-Blt_Table_SetColumnMap(Table *tablePtr, Column **map)
-{
-    TriggerRowNotifiers(tablePtr, TABLE_NOTIFY_ALL, TABLE_NOTIFY_COLUMN_MOVED);
-    ReplaceMap(&tablePtr->corePtr->columns, (Header **)map);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_MoveColumns --
- *
- *	Move one of more rows to a new location in the tuple.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_Table_MoveColumns(Tcl_Interp *interp, Table *tablePtr, Column *srcPtr, 
-		      Column *destPtr, size_t count)
-{
-    if (srcPtr == destPtr) {
-	return TCL_OK;		/* Move to the same location. */
-    }
-    if (!MoveIndices(&tablePtr->corePtr->columns, (Header *)srcPtr, 
-		(Header *)destPtr, count)) {
-	Tcl_AppendResult(interp, "can't allocate new map for \"", 
-		Blt_Table_TableName(tablePtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    TriggerRowNotifiers(tablePtr, TABLE_NOTIFY_ALL, TABLE_NOTIFY_COLUMN_MOVED);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_Restore --
- *
- *	Restores data to the given table based upon the dump string.
- *	The dump string should have been generated by Blt_Table_Dump.
- *	Two bit flags may be set.
- *	
- *	TABLE_RESTORE_NO_TAGS	Don't restore tag information.
- *	TABLE_RESTORE_OVERWRITE	Look for row and columns with the 
- *				same label. Overwrite if necessary.
- *
- * Results:
- *	A standard TCL result.  If the restore was successful, TCL_OK
- *	is returned.  Otherwise, TCL_ERROR is returned and an error
- *	message is left in the interpreter result.
- *
- * Side Effects:
- *	New row and columns are created in the table and may possibly
- *	generate event notifier or trace callbacks.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_Restore(Tcl_Interp *interp, Blt_Table table, char *data, 
-		      unsigned int flags)
-{
-    RestoreData restore;
-    int result;
-
-    restore.argc = 0;
-    restore.mtime = restore.ctime = 0L;
-    restore.argv = NULL;
-    restore.fileName = "data string";
-    restore.nLines = 0;
-    restore.flags = flags;
-    restore.nCols = Blt_Table_NumColumns(table);
-    restore.nRows = Blt_Table_NumRows(table);
-    Blt_InitHashTableWithPool(&restore.rowIndices, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTableWithPool(&restore.colIndices, BLT_ONE_WORD_KEYS);
-    result = TCL_ERROR;		
-    /* Read dump information */
-    for (;;) {
-	char c1, c2;
-
-	result = ParseDumpRecord(interp, &data, &restore);
-	if (result != TCL_OK) {
-	    break;
-	}
-	if (restore.argc == 0) {
-	    continue;
-	}
-	c1 = restore.argv[0][0], c2 = restore.argv[0][1];
-	if ((c1 == 'i') && (c2 == '\0')) {
-	    result = RestoreHeader(interp, table, &restore);
-	} else if ((c1 == 'r') && (c2 == '\0')) {
-	    result = RestoreRow(interp, table, &restore);
-	} else if ((c1 == 'c') && (c2 == '\0')) {
-	    result = RestoreColumn(interp, table, &restore);
-	} else if ((c1 == 'd') && (c2 == '\0')) {
-	    result = RestoreValue(interp, table, &restore);
-	} else {
-	    Tcl_AppendResult(interp, restore.fileName, ":", 
-		Blt_Ltoa(restore.nLines), ": error: unknown entry \"", 
-		restore.argv[0], "\"", (char *)NULL);
-	    result = TCL_ERROR;
-	}
-	Blt_Free(restore.argv);
-	if (result != TCL_OK) {
-	    break;
-	}
-    }
-    Blt_DeleteHashTable(&restore.rowIndices);
-    Blt_DeleteHashTable(&restore.colIndices);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_FileRestore --
- *
- *	Restores data to the given table based upon the dump file
- *	provided. The dump file should have been generated by
- *	Blt_Table_Dump or Blt_Table_FileDump.  
- *
- *	If the filename starts with an '@', then it is the name of an
- *	already opened channel to be used. Two bit flags may be set.
- *	
- *	TABLE_RESTORE_NO_TAGS	Don't restore tag information.
- *	TABLE_RESTORE_OVERWRITE	Look for row and columns with 
- *				the same label. Overwrite if necessary.
- *
- * Results:
- *	A standard TCL result.  If the restore was successful, TCL_OK
- *	is returned.  Otherwise, TCL_ERROR is returned and an error
- *	message is left in the interpreter result.
- *
- * Side Effects:
- *	Row and columns are created in the table and may possibly
- *	generate trace or notifier event callbacks.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_FileRestore(Tcl_Interp *interp, Blt_Table table, const char *fileName,
-		      unsigned int flags)
-{
-    RestoreData restore;
-    Tcl_Channel channel;
-    int closeChannel;
-    int result;
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for reading", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return TCL_ERROR;	/* Can't open dump file. */
-	}
-    }
-    restore.argc = 0;
-    restore.mtime = restore.ctime = 0L;
-    restore.argv = NULL;
-    restore.fileName = fileName;
-    restore.nLines = 0;
-    restore.flags = flags;
-    restore.nCols = Blt_Table_NumColumns(table);
-    restore.nRows = Blt_Table_NumRows(table);
-    Blt_InitHashTableWithPool(&restore.rowIndices, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTableWithPool(&restore.colIndices, BLT_ONE_WORD_KEYS);
-
-    /* Process dump information record by record. */
-    result = TCL_ERROR;		
-    for (;;) {
-	char c1, c2;
-
-	result = ReadDumpRecord(interp, channel, &restore);
-	if (result != TCL_OK) {
-	    break;
-	}
-	if (restore.argc == 0) {
-	    continue;
-	}
-	c1 = restore.argv[0][0], c2 = restore.argv[0][1];
-	if ((c1 == 'i') && (c2 == '\0')) {
-	    result = RestoreHeader(interp, table, &restore);
-	} else if ((c1 == 'r') && (c2 == '\0')) {
-	    result = RestoreRow(interp, table, &restore);
-	} else if ((c1 == 'c') && (c2 == '\0')) {
-	    result = RestoreColumn(interp, table, &restore);
-	} else if ((c1 == 'd') && (c2 == '\0')) {
-	    result = RestoreValue(interp, table, &restore);
-	} else {
-	    Tcl_AppendResult(interp, fileName, ":", Blt_Ltoa(restore.nLines), 
-		": error: unknown entry \"", restore.argv[0], "\"", 
-		(char *)NULL);
-	    result = TCL_ERROR;
-	}
-	Blt_Free(restore.argv);
-	if (result != TCL_OK) {
-	    break;
-	}
-    }
-    Blt_DeleteHashTable(&restore.rowIndices);
-    Blt_DeleteHashTable(&restore.colIndices);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-FreePrimaryKeys(Table *tablePtr)
-{
-    Blt_ChainLink link;
-    
-    for (link = Blt_Chain_FirstLink(tablePtr->primaryKeys); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Column *columnPtr;
-	
-	columnPtr = Blt_Chain_GetValue(link);
-	columnPtr->flags &= ~TABLE_COLUMN_PRIMARY_KEY;
-    }
-    Blt_Chain_Destroy(tablePtr->primaryKeys);
-    tablePtr->primaryKeys = NULL;
-}
-
-static void
-FreeKeyTables(Table *tablePtr)
-{
-    long i;
-
-    for (i = 0; i < tablePtr->nKeys; i++) {
-	Blt_DeleteHashTable(tablePtr->keyTables + i);
-    }
-    if (tablePtr->keyTables != NULL) {
-	Blt_Free(tablePtr->keyTables);
-    }
-    if (tablePtr->masterKey != NULL) {
-	Blt_Free(tablePtr->masterKey);
-	Blt_DeleteHashTable(&tablePtr->masterKeyTable);
-    }
-    tablePtr->keyTables = NULL;
-    tablePtr->nKeys = 0;
-    tablePtr->masterKey = NULL;
-}
-
-void
-Blt_Table_UnsetKeys(Table *tablePtr)
-{
-    FreeKeyTables(tablePtr);
-    FreePrimaryKeys(tablePtr);
-    tablePtr->flags &= ~(TABLE_KEYS_DIRTY | TABLE_KEYS_UNIQUE);
-}
-
-Blt_Chain 
-Blt_Table_GetKeys(Table *tablePtr)
-{
-    return tablePtr->primaryKeys;
-}
-
-int
-Blt_Table_SetKeys(Table *tablePtr, Blt_Chain primaryKeys, int unique)
-{
-    Blt_ChainLink link;
-
-    if (tablePtr->primaryKeys != NULL) {
-	FreePrimaryKeys(tablePtr);
-    }
-    tablePtr->primaryKeys = primaryKeys;
-
-    /* Mark the designated columns as primary keys.  This flag is used to
-     * check if a primary column is deleted, it's rows are added or changed,
-     * or it's values set or unset.  The generated keytables are invalid and
-     * need to be regenerated. */
-    for (link = Blt_Chain_FirstLink(tablePtr->primaryKeys); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Column *columnPtr;
-	
-	columnPtr = Blt_Chain_GetValue(link);
-	columnPtr->flags |= TABLE_COLUMN_PRIMARY_KEY;
-    }
-    tablePtr->flags |= TABLE_KEYS_DIRTY;
-    if (unique) {
-	tablePtr->flags |= TABLE_KEYS_UNIQUE;
-    }
-    return TCL_OK;
-}
-
-static int
-MakeKeyTables(Tcl_Interp *interp, Table *tablePtr)
-{
-    size_t i;
-    size_t masterKeySize;
-    size_t nKeys;
-
-    FreeKeyTables(tablePtr);
-    tablePtr->flags &= ~TABLE_KEYS_DIRTY;
-
-    nKeys = Blt_Chain_GetLength(tablePtr->primaryKeys);
-
-    /* Create a hashtable for each key. */
-    tablePtr->keyTables = Blt_Malloc(sizeof(Blt_HashTable) * nKeys);
-    if (tablePtr->keyTables == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't allocated keytables for ",
-		Blt_Itoa(nKeys), " keys.", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    tablePtr->nKeys = nKeys;
-    for (i = 0; i < nKeys; i++) {
-	Blt_InitHashTable(tablePtr->keyTables + i, BLT_STRING_KEYS);
-    }
-    masterKeySize = sizeof(Blt_TableRow) * nKeys;
-    tablePtr->masterKey = Blt_AssertMalloc(masterKeySize);
-    Blt_InitHashTable(&tablePtr->masterKeyTable, masterKeySize / sizeof(int));
-
-    /* For each row, create hash entries the the individual key columns, but
-     * also for the combined keys for the row.  The hash of the combined keys
-     * must be unique. */
-    for (i = 1; i <= Blt_Table_NumRows(tablePtr); i++) {
-	Blt_ChainLink link;
-	Row *rowPtr;
-	size_t j;
-
-	rowPtr = Blt_Table_Row(tablePtr, i);
-	for (j = 0, link = Blt_Chain_FirstLink(tablePtr->primaryKeys); 
-	     link != NULL; link = Blt_Chain_NextLink(link), j++) {
-	    Column *colPtr;
-	    Blt_HashEntry *hPtr;
-	    int isNew;
-	    Value *valuePtr;
-
-	    colPtr = Blt_Chain_GetValue(link);
-	    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-	    if (IsEmpty(valuePtr)) {
-		break;		/* Skip this row since one of the key values
-				 * is empty. */
-	    }
-	    hPtr = Blt_CreateHashEntry(tablePtr->keyTables + j, 
-				       valuePtr->string, &isNew);
-	    if (isNew) {
-		Blt_SetHashValue(hPtr, rowPtr);
-	    }
-	    tablePtr->masterKey[j] = Blt_GetHashValue(hPtr);
-	}
-	if (j == nKeys) {
-	    Blt_HashEntry *hPtr;
-	    int isNew;
-
-	    /* If we created all the hashkeys necessary for this row, then
-	     * generate an entry for the row in the master key table. */
-	    hPtr = Blt_CreateHashEntry(&tablePtr->masterKeyTable, 
-		(char *)tablePtr->masterKey, &isNew);
-	    if (isNew) {
-		Blt_SetHashValue(hPtr, rowPtr);
-	    } else if (tablePtr->flags & TABLE_KEYS_UNIQUE) {
-		Blt_TableRow dupRow;
-		
-		dupRow = Blt_GetHashValue(hPtr);
-		if (interp != NULL) {
-
-		    dupRow = Blt_GetHashValue(hPtr);
-		    Tcl_AppendResult(interp, "primary keys are not unique:",
-			"rows \"", Blt_Table_RowLabel(dupRow), "\" and \"",
-			Blt_Table_RowLabel(rowPtr), 
-			"\" have the same keys.", (char *)NULL);
-		}
-		Blt_Table_UnsetKeys(tablePtr);
-		return TCL_ERROR; /* Bail out. Keys aren't unique. */
-	    }
-	}
-    }
-    tablePtr->flags &= ~TABLE_KEYS_UNIQUE;
-    return TCL_OK;
-}
-	    
-int
-Blt_Table_KeyLookup(Tcl_Interp *interp, Table *tablePtr, int objc, 
-		 Tcl_Obj *const *objv, Row **rowPtrPtr)
-{
-    long i;
-    Blt_HashEntry *hPtr;
-
-    *rowPtrPtr = NULL;
-    if (objc != Blt_Chain_GetLength(tablePtr->primaryKeys)) {
-	if (interp != NULL) {
-	    Blt_ChainLink link;
-
-	    Tcl_AppendResult(interp, "wrong # of values: should be ",
-		Blt_Itoa(tablePtr->nKeys), " value(s) of ", (char *)NULL);
-	    for (link = Blt_Chain_FirstLink(tablePtr->primaryKeys);
-		 link != NULL; link = Blt_Chain_NextLink(link)) {
-		Blt_TableColumn col;
-
-		col = Blt_Chain_GetValue(link);
-		Tcl_AppendResult(interp, Blt_Table_ColumnLabel(col), " ", 
-				 (char *)NULL);
-	    }
-	}
-	return TCL_ERROR;	/* Bad number of keys supplied. */
-    }
-    if (tablePtr->primaryKeys == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "no primary keys designated",
-			 (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if ((tablePtr->flags & TABLE_KEYS_DIRTY) && 
-	(MakeKeyTables(interp, tablePtr) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (tablePtr->nKeys == 0) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "failed to generate key tables",
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    for (i = 0; i < tablePtr->nKeys; i++) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	hPtr = Blt_FindHashEntry(tablePtr->keyTables + i, string);
-	if (hPtr == NULL) {
-	    return TCL_OK;	/* Can't find one of the keys, so
-				 * the whole search fails. */
-	}
-	tablePtr->masterKey[i] = Blt_GetHashValue(hPtr);
-    }
-    hPtr = Blt_FindHashEntry(&tablePtr->masterKeyTable, 
-			     (char *)tablePtr->masterKey);
-    if (hPtr == NULL) {
-	fprintf(stderr, "can't find master key\n");
-	return TCL_OK;
-    }
-    *rowPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetLong --
- *
- *	Sets the value of the selected row, column location in the table.  The
- *	row, column location must be within the actual table limits.
- *
- * Results:
- *	Returns the objPtr representing the old value.  If no previous value
- *	was present, the NULL is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetLong(Table *tablePtr, Row *rowPtr, Column *colPtr, long value)
-{
-    Value *valuePtr;
-    char string[200];
-
-    if (colPtr->type != TABLE_COLUMN_TYPE_LONG) {
-	Tcl_AppendResult(tablePtr->interp, "wrong column type \"",
-		Blt_Table_NameOfType(colPtr->type), "\": should be \"int\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    FreeValue(valuePtr);
-    valuePtr->datum.l = value;
-    sprintf(string, "%ld", value);
-    valuePtr->string = Blt_AssertStrdup(string);
-
-    /* Indicate the keytables need to be regenerated. */
-    if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	tablePtr->flags |= TABLE_KEYS_DIRTY;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_SetString --
- *
- *	Sets the value of the selected row, column location in the table.  The
- *	row, column location must be within the actual table limits.
- *
- * Results:
- *	Returns the objPtr representing the old value.  If no previous value
- *	was present, the NULL is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_SetString(Table *tablePtr, Row *rowPtr, Column *colPtr, 
-			 const char *string, int length)
-{
-    Value *valuePtr;
-
-    if (colPtr->type != TABLE_COLUMN_TYPE_STRING) {
-	return TCL_ERROR;
-    }
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    FreeValue(valuePtr);
-    if (SetValueFromString(tablePtr->interp, colPtr->type, string, length, 
-		valuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Indicate the keytables need to be regenerated. */
-    if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	tablePtr->flags |= TABLE_KEYS_DIRTY;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_AppendString --
- *
- *	Sets the value of the selected row, column location in the table.  The
- *	row, column location must be within the actual table limits.
- *
- * Results:
- *	Returns the objPtr representing the old value.  If no previous value
- *	was present, the NULL is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Table_AppendString(Tcl_Interp *interp, Table *tablePtr, Row *rowPtr, 
-		       Column *colPtr, const char *s, int length)
-{
-    Value *valuePtr;
-    char *string;
-    long l;
-    double d;
-    
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (IsEmpty(valuePtr)) {
-	string = Blt_AssertStrdup(s);
-    } else {
-	int oldLen;
-
-	oldLen = strlen(valuePtr->string);
-	string = Blt_AssertMalloc(oldLen + length + 1);
-	strcpy(string, valuePtr->string);
-	strncpy(string + oldLen, s, length);
-	string[oldLen + length] = '\0';
-    }
-    switch (colPtr->type) {
-    case TABLE_COLUMN_TYPE_DOUBLE:	/* double */
-	if (Tcl_GetDouble(interp, string, &d) != TCL_OK) {
-	    Blt_Free(string);
-	    return TCL_ERROR;
-	}
-	valuePtr->datum.d = d;
-	break;
-    case TABLE_COLUMN_TYPE_LONG:	/* long */
-    case TABLE_COLUMN_TYPE_INT:		/* int */
-	if (Tcl_GetLong(interp, string, &l) != TCL_OK) {
-	    Blt_Free(string);
-	    return TCL_ERROR;
-	}
-	valuePtr->datum.l = l;
-	break;
-    default:
-	break;
-    }
-    FreeValue(valuePtr);
-    valuePtr->string = string;
-
-    /* Indicate the keytables need to be regenerated. */
-    if (colPtr->flags & TABLE_COLUMN_PRIMARY_KEY) {
-	tablePtr->flags |= TABLE_KEYS_DIRTY;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_GetString --
- *
- *	Sets the value of the selected row, column location in the table.  The
- *	row, column location must be within the actual table limits.
- *
- * Results:
- *	Returns the objPtr representing the old value.  If no previous value
- *	was present, the NULL is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_Table_GetString(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *valuePtr;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (IsEmpty(valuePtr)) {
-	return NULL;
-    }
-    return valuePtr->string;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_GetDouble --
- *
- *	Gets the double value of the selected row, column location in the
- *	table.  The row, column location must be within the actual table
- *	limits.
- *
- * Results:
- *	Returns the objPtr representing the old value.  If no previous value
- *	was present, the NULL is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_Table_GetDouble(Table *tablePtr, Row *rowPtr, Column *colPtr)
-{
-    Value *valuePtr;
-    double d;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (IsEmpty(valuePtr)) {
-	return Blt_NaN();
-    }
-    if (colPtr->type == TABLE_COLUMN_TYPE_DOUBLE) {
-	return valuePtr->datum.d;
-    }
-    if (Tcl_GetDouble(tablePtr->interp, valuePtr->string, &d) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return d;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_GetLong --
- *
- *	Gets the double value of the selected row, column location in the
- *	table.  The row, column location must be within the actual table
- *	limits.
- *
- * Results:
- *	Returns a long value.  If the value is empty, the default value 
- *	is returned.
- *
- * Side Effects:
- *	New tuples may be allocated created.
- *
- *---------------------------------------------------------------------------
- */
-long
-Blt_Table_GetLong(Table *tablePtr, Row *rowPtr, Column *colPtr, long defVal)
-{
-    Value *valuePtr;
-    long l;
-
-    valuePtr = GetValue(tablePtr, rowPtr, colPtr);
-    if (IsEmpty(valuePtr)) {
-	return defVal;
-    }
-    if (colPtr->type == TABLE_COLUMN_TYPE_LONG) {
-	return valuePtr->datum.l;
-    }
-    if (Tcl_GetLong(tablePtr->interp, valuePtr->string, &l) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return l;
-}
diff --git a/blt3.0/src/bltDataTable.h b/blt3.0/src/bltDataTable.h
deleted file mode 100644
index 57eac70..0000000
--- a/blt3.0/src/bltDataTable.h
+++ /dev/null
@@ -1,729 +0,0 @@
-
-/*
- * bltDataTable.h --
- *
- *	Copyright 1998-2004 George A. Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_DATATABLE_H
-#define _BLT_DATATABLE_H
-
-#include <bltChain.h>
-#include <bltHash.h>
-
-typedef struct _Blt_TableTags *Blt_TableTags;
-
-typedef enum {
-    TABLE_COLUMN_TYPE_UNKNOWN=-1, 
-    TABLE_COLUMN_TYPE_STRING, 
-    TABLE_COLUMN_TYPE_INT, 
-    TABLE_COLUMN_TYPE_DOUBLE, 
-    TABLE_COLUMN_TYPE_LONG, 
-} Blt_TableColumnType;
-
-
-typedef struct _Blt_TableValue {
-    union {				
-	long l;
-	double d;
-	Tcl_WideInt w;
-    } datum;				/* Internal representation of data:
-					 * used to speed comparisons, sorting,
-					 * etc. */
-    char *string;			/* String representation of value.  If
-					 * NULL, indicates empty value. */
-} *Blt_TableValue;
-
-typedef struct _Blt_TableHeader {
-    const char *label;			/* Label of row or column. */
-    long index;				/* Reverse lookup offset-to-index. */
-    long offset;
-    unsigned int flags;
-} *Blt_TableHeader;
-
-typedef struct _Blt_TableRow {
-    const char *label;			/* Label of row or column. */
-    long index;				/* Reverse lookup offset-to-index. */
-    long offset;
-    unsigned int flags;
-} *Blt_TableRow;
-
-typedef struct _Blt_TableColumn {
-    const char *label;			/* Label of row or column. */
-    long index;				/* Reverse lookup offset-to-index. */
-    long offset;
-    unsigned short flags;
-    Blt_TableColumnType type;
-} *Blt_TableColumn;
-
-typedef struct {
-    const char *name;
-    long headerSize;
-} Blt_TableRowColumnClass;
-
-/*
- * Blt_TableRowColumn --
- *
- *	Structure representing a row or column in the table. 
- */
-typedef struct _Blt_TableRowColumn {
-    Blt_TableRowColumnClass *classPtr;
-    Blt_Pool headerPool;
-    long nAllocated;			/* Length of allocated array
-					 * below. May exceed the number of row
-					 * or column headers used. */
-    long nUsed;
-    Blt_TableHeader *map;		/* Array of row or column headers. */
-    Blt_Chain freeList;			/* Tracks free row or column
-					 * headers.  */
-    Blt_HashTable labels;		/* Hash table of labels. Maps labels
-					 * to table offsets. */
-    long nextId;			/* Used to generate default labels. */
-} Blt_TableRowColumn;
-
-/*
- * Blt_TableCore --
- *
- *	Structure representing a table object. 
- *
- *	The table object is an array of column vectors. Each vector is an
- *	array of Blt_TableValue's, representing the data for the column.
- *	Empty row entries are designated by 0 length values.  Column vectors are
- *	allocated when needed.  Every column in the table has the same length.
- *
- *	Rows and columns are indexed by a map of pointers to headers.  This
- *	map represents the order of the rows or columns.  A table object can
- *	be shared by several clients.  When a client wants to use a table
- *	object, it is given a token that represents the table.  The object
- *	tracks its clients by its token. When all clients have released their
- *	tokens, the tuple object is automatically destroyed.
- */
-typedef struct _Blt_TableCore {
-    Blt_TableRowColumn rows, columns;
-    Blt_TableValue *data;		/* Array of column vector pointers */
-    unsigned int flags;			/* Internal flags. See definitions
-					 * below. */
-    Blt_Chain clients;			/* List of clients using this table */
-    unsigned long mtime, ctime;
-    unsigned int notifyFlags;		/* Notification flags. See definitions
-					 * below. */
-    int notifyHold;
-} Blt_TableCore;
-
-/*
- * Blt_Table --
- *
- *	A client is uniquely identified by a combination of its name and the
- *	originating namespace.  Two table objects in the same interpreter can
- *	have similar names but must reside in different namespaces.
- *
- *	Two or more clients can share the same table object.  Each client
- *	structure which acts as a ticket for the underlying table object.
- *	Clients can designate notifier routines that are automatically invoked
- *	by the table object whenever the table is changed is specific ways by
- *	other clients.
- */
-typedef struct _Blt_Table {
-    unsigned int magic;			/* Magic value indicating whether a
-					 * generic pointer is really a
-					 * datatable token or not. */
-    const char *name;			/* Fully namespace-qualified name of
-					 * the client. */
-    Blt_TableCore *corePtr;		/* Pointer to the structure containing
-					 * the master information about the
-					 * table used by the client.  If NULL,
-					 * this indicates that the table has
-					 * been destroyed (but as of yet, this
-					 * client hasn't recognized it). */
-    Tcl_Interp *interp;
-    Blt_HashTable *tablePtr;		/* Interpreter-specific global hash
-					 * table of all datatable clients.
-					 * Each entry is a chain of clients
-					 * that are sharing the same core
-					 * datatable. */
-    Blt_HashEntry *hPtr;		/* This client's entry in the above
-					 * hash table. This is a list of
-					 * clients that * all using the core
-					 * datatable. */
-    Blt_ChainLink link2;		/* This client's entry in the list
-					 * found in the above list (hashtable
-					 * entry). */
-    Blt_ChainLink link;			/* Pointer into the server's chain of
-					 * clients. */
-
-    Blt_HashTable *rowTags;
-    Blt_HashTable *columnTags;
-
-    Blt_Chain traces;			/* Chain of traces. */
-    Blt_Chain columnNotifiers;		/* Chain of event handlers. */
-    Blt_Chain rowNotifiers;		/* Chain of event handlers. */
-    Blt_TableTags tags;
-
-    Blt_HashTable *keyTables;		/* Array of primary keys. */
-    long nKeys;				/* Length of the above array. */
-
-    Blt_TableRow *masterKey;		/* Master key entry. */
-    Blt_HashTable masterKeyTable;
-    Blt_Chain primaryKeys;
-    unsigned int flags;
-} *Blt_Table;
-
-BLT_EXTERN void Blt_Table_ReleaseTags(Blt_Table table);
-
-BLT_EXTERN int Blt_Table_TableExists(Tcl_Interp *interp, const char *name);
-BLT_EXTERN int Blt_Table_CreateTable(Tcl_Interp *interp, const char *name, 
-	Blt_Table *tablePtr);
-BLT_EXTERN int Blt_Table_Open(Tcl_Interp *interp, const char *name, 
-	Blt_Table *tablePtr);
-BLT_EXTERN void Blt_Table_Close(Blt_Table table);
-
-BLT_EXTERN int Blt_Table_SameTableObject(Blt_Table table1, Blt_Table table2);
-
-BLT_EXTERN const char *Blt_Table_Name(Blt_Table table);
-
-BLT_EXTERN Blt_TableRow Blt_Table_FindRowByLabel(Blt_Table table, 
-	const char *label);
-BLT_EXTERN Blt_TableColumn Blt_Table_FindColumnByLabel(Blt_Table table, 
-	const char *label);
-BLT_EXTERN Blt_TableRow Blt_Table_FindRowByIndex(Blt_Table table, long index);
-BLT_EXTERN Blt_TableColumn Blt_Table_FindColumnByIndex(Blt_Table table, 
-	long index);
-
-BLT_EXTERN int Blt_Table_SetRowLabel(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow row, const char *label);
-BLT_EXTERN int Blt_Table_SetColumnLabel(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableColumn column, const char *label);
-
-BLT_EXTERN Blt_TableColumnType Blt_Table_ColumnType(Blt_TableColumn column);
-BLT_EXTERN Blt_TableColumnType Blt_Table_GetColumnType(const char *typeName);
-BLT_EXTERN int Blt_Table_SetColumnType(Blt_Table table, Blt_TableColumn column,
-	Blt_TableColumnType type);
-BLT_EXTERN const char *Blt_Table_NameOfType(Blt_TableColumnType type);
-
-BLT_EXTERN int Blt_Table_SetColumnTag(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableColumn column, const char *tagName);
-BLT_EXTERN int Blt_Table_SetRowTag(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow row, const char *tagName);
-
-BLT_EXTERN Blt_TableRow Blt_Table_CreateRow(Tcl_Interp *interp, Blt_Table table,
-	const char *label);
-BLT_EXTERN Blt_TableColumn Blt_Table_CreateColumn(Tcl_Interp *interp, 
-	Blt_Table table, const char *label);
-
-BLT_EXTERN int Blt_Table_ExtendRows(Tcl_Interp *interp, Blt_Table table,
-	size_t n, Blt_TableRow *rows);
-BLT_EXTERN int Blt_Table_ExtendColumns(Tcl_Interp *interp, Blt_Table table, 
-	size_t n, Blt_TableColumn *columms);
-BLT_EXTERN int Blt_Table_DeleteRow(Blt_Table table, Blt_TableRow row);
-BLT_EXTERN int Blt_Table_DeleteColumn(Blt_Table table, Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_MoveRows(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow from, Blt_TableRow to, size_t n);
-BLT_EXTERN int Blt_Table_MoveColumns(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableColumn from, Blt_TableColumn to, size_t n);
-
-BLT_EXTERN Tcl_Obj *Blt_Table_GetObj(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_SetObj(Blt_Table table, Blt_TableRow row,
-	Blt_TableColumn column, Tcl_Obj *objPtr);
-
-BLT_EXTERN const char *Blt_Table_GetString(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_SetString(Blt_Table table, Blt_TableRow row,
-	Blt_TableColumn column, const char *string, int length);
-BLT_EXTERN int Blt_Table_AppendString(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow row, Blt_TableColumn column, const char *string, 
-	int length);
-
-BLT_EXTERN double Blt_Table_GetDouble(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_SetDouble(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column, double value);
-BLT_EXTERN long Blt_Table_GetLong(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column, long defValue);
-BLT_EXTERN int Blt_Table_SetLong(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column, long value);
-
-BLT_EXTERN Blt_TableValue Blt_Table_GetValue(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_SetValue(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column, Blt_TableValue value);
-BLT_EXTERN int Blt_Table_UnsetValue(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-BLT_EXTERN int Blt_Table_ValueExists(Blt_Table table, Blt_TableRow row, 
-	Blt_TableColumn column);
-
-BLT_EXTERN Blt_HashTable *Blt_Table_FindRowTagTable(Blt_Table table, 
-	const char *tagName);
-BLT_EXTERN Blt_HashTable *Blt_Table_FindColumnTagTable(Blt_Table table, 
-	const char *tagName);
-BLT_EXTERN Blt_Chain Blt_Table_RowTags(Blt_Table table, Blt_TableRow row);
-BLT_EXTERN Blt_Chain Blt_Table_ColumnTags(Blt_Table table, 
-	Blt_TableColumn column);
-
-BLT_EXTERN Blt_Chain Blt_Table_Traces(Blt_Table table);
-BLT_EXTERN int Blt_Table_TagsAreShared(Blt_Table table);
-
-BLT_EXTERN int Blt_Table_HasRowTag(Blt_Table table, Blt_TableRow row, 
-	const char *tagName);
-BLT_EXTERN int Blt_Table_HasColumnTag(Blt_Table table, Blt_TableColumn column, 
-	const char *tagName);
-BLT_EXTERN void Blt_Table_AddColumnTag(Blt_Table table, Blt_TableColumn column,
-	const char *tagName);
-BLT_EXTERN void Blt_Table_AddRowTag(Blt_Table table, Blt_TableRow row, 
-	const char *tagName);
-BLT_EXTERN int Blt_Table_ForgetRowTag(Tcl_Interp *interp, Blt_Table table, 
-	const char *tagName);
-BLT_EXTERN int Blt_Table_ForgetColumnTag(Tcl_Interp *interp, Blt_Table table, 
-	const char *tagName);
-BLT_EXTERN int Blt_Table_UnsetRowTag(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow row, const char *tagName);
-BLT_EXTERN int Blt_Table_UnsetColumnTag(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableColumn column, const char *tagName);
-BLT_EXTERN Blt_HashEntry *Blt_Table_FirstRowTag(Blt_Table table, 
-	Blt_HashSearch *cursorPtr);
-BLT_EXTERN Blt_HashEntry *Blt_Table_FirstColumnTag(Blt_Table table, 
-	Blt_HashSearch *cursorPtr);
-
-BLT_EXTERN Blt_TableColumn Blt_Table_FirstColumn(Blt_Table table);
-BLT_EXTERN Blt_TableColumn Blt_Table_NextColumn(Blt_Table table, 
-	Blt_TableColumn column);
-BLT_EXTERN Blt_TableRow Blt_Table_FirstRow(Blt_Table table);
-BLT_EXTERN Blt_TableRow Blt_Table_NextRow(Blt_Table table, Blt_TableRow row);
-
-typedef enum { 
-    TABLE_SPEC_UNKNOWN, 
-    TABLE_SPEC_INDEX, 
-    TABLE_SPEC_RANGE, 
-    TABLE_SPEC_LABEL, 
-    TABLE_SPEC_TAG, 
-} Blt_TableRowColumnSpec;
-
-BLT_EXTERN Blt_TableRowColumnSpec Blt_Table_RowSpec(Blt_Table table, 
-	Tcl_Obj *objPtr, const char **stringPtr);
-BLT_EXTERN Blt_TableRowColumnSpec Blt_Table_ColumnSpec(Blt_Table table, 
-	Tcl_Obj *objPtr, const char **stringPtr);
-
-/*
- * Blt_TableIterator --
- *
- *	Structure representing a trace used by a client of the table.
- *
- *	Table rows and columns may be tagged with strings.  A row may
- *	have many tags.  The same tag may be used for many rows.  Tags
- *	are used and stored by clients of a table.  Tags can also be
- *	shared between clients of the same table.
- *	
- *	Both rowTable and columnTable are hash tables keyed by the
- *	physical row or column location in the table respectively.
- *	This is not the same as the client's view (the order of rows
- *	or columns as seen by the client).  This is so that clients
- *	(which may have different views) can share tags without
- *	sharing the same view.
- */
-
-
-typedef enum { 
-    TABLE_ITERATOR_INDEX, 
-    TABLE_ITERATOR_LABEL, 
-    TABLE_ITERATOR_TAG, 
-    TABLE_ITERATOR_RANGE, 
-    TABLE_ITERATOR_ALL, 
-    TABLE_ITERATOR_CHAIN
-} Blt_TableIteratorType;
-
-typedef struct _Blt_TableIterator {
-    Blt_Table table;			/* Table that we're iterating over. */
-
-    Blt_TableIteratorType type;		/* Type of iteration:
-					 * TABLE_ITERATOR_TAG  by row or column tag.
-					 * TABLE_ITERATOR_ALL 
-					 *		by every row or column.
-					 * TABLE_ITERATOR_INDEX single item: either 
-					 *		    label or index.
-					 * TABLE_ITERATOR_RANGE over a consecutive 
-					 *		 range of indices.
-					 * TABLE_ITERATOR_CHAIN over an expanded,
-					 *		 non-overlapping
-					 *		 list of tags, labels,
-					 *		 and indices.
-					 */
-
-    const char *tagName;		/* Used by notification routines to
-					 * determine if a tag is being
-					 * used. */
-    long start;				/* Starting index.  Starting point of
-					 * search, saved if iterator is
-					 * reused.  Used for TABLE_ITERATOR_ALL and
-					 * TABLE_ITERATOR_INDEX searches. */
-    long end;				/* Ending index (inclusive). */
-
-    long next;				/* Next index. */
-
-    /* For tag-based searches. */
-    Blt_HashTable *tablePtr;		/* Pointer to tag hash table. */
-    Blt_HashSearch cursor;		/* Iterator for tag hash table. */
-
-    /* For chain-based searches (multiple tags). */
-    Blt_Chain chain;			/* This chain, unlike the above hash
-					 * table must be freed after its
-					 * use. */
-    Blt_ChainLink link;			/* Search iterator for chain. */
-} Blt_TableIterator;
-
-BLT_EXTERN int Blt_Table_IterateRows(Tcl_Interp *interp, Blt_Table table, 
-	Tcl_Obj *objPtr, Blt_TableIterator *iter);
-
-BLT_EXTERN int Blt_Table_IterateColumns(Tcl_Interp *interp, Blt_Table table, 
-	Tcl_Obj *objPtr, Blt_TableIterator *iter);
-
-BLT_EXTERN int Blt_Table_IterateRowsObjv(Tcl_Interp *interp, Blt_Table table, 
-	int objc, Tcl_Obj *const *objv, Blt_TableIterator *iterPtr);
-
-BLT_EXTERN int Blt_Table_IterateColumnsObjv(Tcl_Interp *interp, Blt_Table table,
-	int objc, Tcl_Obj *const *objv, Blt_TableIterator *iterPtr);
-
-BLT_EXTERN void Blt_Table_FreeIteratorObjv(Blt_TableIterator *iterPtr);
-
-BLT_EXTERN void Blt_Table_IterateAllRows(Blt_Table table, 
-	Blt_TableIterator *iterPtr);
-
-BLT_EXTERN void Blt_Table_IterateAllColumns(Blt_Table table, 
-	Blt_TableIterator *iterPtr);
-
-BLT_EXTERN Blt_TableRow Blt_Table_FirstTaggedRow(Blt_TableIterator *iter);
-
-BLT_EXTERN Blt_TableColumn Blt_Table_FirstTaggedColumn(Blt_TableIterator *iter);
-
-BLT_EXTERN Blt_TableRow Blt_Table_NextTaggedRow(Blt_TableIterator *iter);
-
-BLT_EXTERN Blt_TableColumn Blt_Table_NextTaggedColumn(Blt_TableIterator *iter);
-
-BLT_EXTERN Blt_TableRow Blt_Table_FindRow(Tcl_Interp *interp, Blt_Table table, 
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN Blt_TableColumn Blt_Table_FindColumn(Tcl_Interp *interp, 
-	Blt_Table table, Tcl_Obj *objPtr);
-
-BLT_EXTERN int Blt_Table_ListRows(Tcl_Interp *interp, Blt_Table table, 
-	int objc, Tcl_Obj *const *objv, Blt_Chain chain);
-
-BLT_EXTERN int Blt_Table_ListColumns(Tcl_Interp *interp, Blt_Table table, 
-	int objc, Tcl_Obj *const *objv, Blt_Chain chain);
-
-/*
- * Blt_TableTraceEvent --
- *
- *	Structure representing an event matching a trace set by a client of
- *	the table.
- *
- *	Table rows and columns may be tagged with strings.  A row may have
- *	many tags.  The same tag may be used for many rows.  Tags are used and
- *	stored by clients of a table.  Tags can also be shared between clients
- *	of the same table.
- *	
- *	Both rowTable and columnTable are hash tables keyed by the physical
- *	row or column location in the table respectively.  This is not the
- *	same as the client's view (the order of rows or columns as seen by the
- *	client).  This is so that clients (which may have different views) can
- *	share tags without sharing the same view.
- */
-typedef struct {
-    Tcl_Interp *interp;			/* Interpreter to report to */
-    Blt_Table table;			/* Table object client that received
-					 * the event. */
-    Blt_TableRow row;			/* Matching row and column. */
-    Blt_TableColumn column;
-    unsigned int mask;			/* Type of event received. */
-} Blt_TableTraceEvent;
-
-typedef int (Blt_TableTraceProc)(ClientData clientData, 
-	Blt_TableTraceEvent *eventPtr);
-
-typedef void (Blt_TableTraceDeleteProc)(ClientData clientData);
-
-/*
- * Blt_TableTrace --
- *
- *	Structure representing a trace used by a client of the table.
- *
- *	Table rows and columns may be tagged with strings.  A row may have
- *	many tags.  The same tag may be used for many rows.  Tags are used and
- *	stored by clients of a table.  Tags can also be shared between clients
- *	of the same table.
- *	
- *	Both rowTable and columnTable are hash tables keyed by the physical
- *	row or column location in the table respectively.  This is not the
- *	same as the client's view (the order of rows or columns as seen by the
- *	client).  This is so that clients (which may have different views) can
- *	share tags without sharing the same view.
- */
-typedef struct _Blt_TableTrace {
-    unsigned int flags;
-    const char *rowTag, *colTag;
-    Blt_TableRow row;
-    Blt_TableColumn column;
-    Blt_TableTraceProc *proc;
-    Blt_TableTraceDeleteProc *deleteProc;
-    ClientData clientData;
-    Blt_Chain chain;
-    Blt_ChainLink link;
-} *Blt_TableTrace;
-
-
-#define TABLE_TRACE_READS	(1<<0)
-#define TABLE_TRACE_CREATES	(1<<1)
-#define TABLE_TRACE_WRITES	(1<<2)
-#define TABLE_TRACE_UNSETS	(1<<3)
-#define TABLE_TRACE_ALL		(TABLE_TRACE_UNSETS | TABLE_TRACE_WRITES | \
-				 TABLE_TRACE_READS  | TABLE_TRACE_CREATES)
-#define TABLE_TRACE_MASK	(TRACE_ALL)
-
-#define TABLE_TRACE_FOREIGN_ONLY (1<<8)
-#define TABLE_TRACE_ACTIVE	(1<<9)
-#define TABLE_TRACE_SELF	(1<<10)
-#define TABLE_TRACE_DESTROYED	(1<<11)
-
-BLT_EXTERN void Blt_Table_ClearRowTags(Blt_Table table, Blt_TableRow row);
-
-BLT_EXTERN void Blt_Table_ClearColumnTags(Blt_Table table, 
-	Blt_TableColumn column);
-
-BLT_EXTERN void Blt_Table_ClearRowTraces(Blt_Table table, Blt_TableRow row);
-
-BLT_EXTERN void Blt_Table_ClearColumnTraces(Blt_Table table, 
-	Blt_TableColumn column);
-
-BLT_EXTERN Blt_TableTrace Blt_Table_CreateTrace(Blt_Table table, 
-	Blt_TableRow row, Blt_TableColumn column, const char *rowTag, 
-	const char *columnTag, unsigned int mask, Blt_TableTraceProc *proc, 
-	Blt_TableTraceDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN Blt_TableTrace Blt_Table_CreateColumnTrace(Blt_Table table, 
-	Blt_TableColumn column, unsigned int mask, Blt_TableTraceProc *proc, 
-	Blt_TableTraceDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN Blt_TableTrace Blt_Table_CreateColumnTagTrace(Blt_Table table, 
-	const char *tag, unsigned int mask, Blt_TableTraceProc *proc, 
-	Blt_TableTraceDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN Blt_TableTrace Blt_Table_CreateRowTrace(Blt_Table table,
-	Blt_TableRow row, unsigned int mask, Blt_TableTraceProc *proc, 
-	Blt_TableTraceDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN Blt_TableTrace Blt_Table_CreateRowTagTrace(Blt_Table table, 
-	const char *tag, unsigned int mask, Blt_TableTraceProc *proc, 
-	Blt_TableTraceDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN void Blt_Table_DeleteTrace(Blt_TableTrace trace);
-
-/*
- * Blt_TableNotifyEvent --
- *
- *	Structure representing a trace used by a client of the table.
- *
- *	Table rows and columns may be tagged with strings.  A row may have
- *	many tags.  The same tag may be used for many rows.  Tags are used and
- *	stored by clients of a table.  Tags can also be shared between clients
- *	of the same table.
- *	
- *	Both rowTable and columnTable are hash tables keyed by the physical
- *	row or column location in the table respectively.  This is not the
- *	same as the client's view (the order of rows or columns as seen by the
- *	client).  This is so that clients (which may have different views) can
- *	share tags without sharing the same view.
- */
-typedef struct {
-    Tcl_Interp *interp;			/* Interpreter to report results. */
-    Blt_Table table;			/* Table object client that received
-					 * the event. */
-    Blt_TableHeader header;		/* Matching row or column. */
-    int self;				/* Indicates if this table client
-					 * generated the event. */
-    int type;			        /* Indicates type of event
-					 * received. */
-} Blt_TableNotifyEvent;
-
-typedef int (Blt_TableNotifyEventProc)(ClientData clientData, 
-	Blt_TableNotifyEvent *eventPtr);
-
-typedef void (Blt_TableNotifierDeleteProc)(ClientData clientData);
-
-typedef struct _Blt_TableNotifier {
-    Blt_Table table;
-    Blt_ChainLink link;
-    Blt_Chain chain;
-    Blt_TableNotifyEvent event;
-    Blt_TableNotifyEventProc *proc;
-    Blt_TableNotifierDeleteProc *deleteProc;
-    ClientData clientData;
-    Tcl_Interp *interp;
-    Blt_TableHeader header;
-    char *tag;
-    unsigned int flags;
-} *Blt_TableNotifier;
-
-
-#define TABLE_NOTIFY_ROW_CREATED	(1<<0)
-#define TABLE_NOTIFY_COLUMN_CREATED	(1<<1)
-#define TABLE_NOTIFY_CREATE		(TABLE_NOTIFY_COLUMN_CREATED | \
-					 TABLE_NOTIFY_ROW_CREATED)
-#define TABLE_NOTIFY_ROW_DELETED	(1<<2)
-#define TABLE_NOTIFY_COLUMN_DELETED	(1<<3)
-#define TABLE_NOTIFY_DELETE		(TABLE_NOTIFY_COLUMN_DELETED | \
-					 TABLE_NOTIFY_ROW_DELETED)
-#define TABLE_NOTIFY_ROW_MOVED		(1<<4)
-#define TABLE_NOTIFY_COLUMN_MOVED	(1<<5)
-#define TABLE_NOTIFY_MOVE		(TABLE_NOTIFY_COLUMN_MOVED | \
-					 TABLE_NOTIFY_ROW_MOVED)
-#define TABLE_NOTIFY_COLUMN_CHANGED \
-	(TABLE_NOTIFY_COLUMN_CREATED | TABLE_NOTIFY_COLUMN_DELETED | \
-	 TABLE_NOTIFY_COLUMN_MOVED)
-#define TABLE_NOTIFY_ROW_CHANGED \
-	(TABLE_NOTIFY_ROW_CREATED | TABLE_NOTIFY_ROW_DELETED | \
-	 TABLE_NOTIFY_ROW_MOVED)
-    
-#define TABLE_NOTIFY_ALL_EVENTS (TABLE_NOTIFY_ROW_CHANGED | \
-				 TABLE_NOTIFY_COLUMN_CHANGED)
-#define TABLE_NOTIFY_ROW	(1<<6)
-#define TABLE_NOTIFY_COLUMN	(1<<7)
-#define TABLE_NOTIFY_TYPE_MASK	(TABLE_NOTIFY_ROW | TABLE_NOTIFY_COLUMN)
-
-#define TABLE_NOTIFY_EVENT_MASK	TABLE_NOTIFY_ALL_EVENTS
-#define TABLE_NOTIFY_MASK	(TABLE_NOTIFY_EVENT_MASK | \
-				 TABLE_NOTIFY_TYPE_MASK)
-
-#define TABLE_NOTIFY_WHENIDLE	(1<<10)
-#define TABLE_NOTIFY_FOREIGN_ONLY (1<<11)
-#define TABLE_NOTIFY_PENDING	(1<<12)
-#define TABLE_NOTIFY_ACTIVE	(1<<13)
-#define TABLE_NOTIFY_DESTROYED	(1<<14)
-
-#define TABLE_NOTIFY_ALL	(NULL)
-
-BLT_EXTERN Blt_TableNotifier Blt_Table_CreateRowNotifier(Tcl_Interp *interp, 
-	Blt_Table table, Blt_TableRow row, unsigned int mask, 
-	Blt_TableNotifyEventProc *proc, Blt_TableNotifierDeleteProc *deleteProc,
-	ClientData clientData);
-
-BLT_EXTERN Blt_TableNotifier Blt_Table_CreateRowTagNotifier(Tcl_Interp *interp,
-	Blt_Table table, const char *tag, unsigned int mask, 
-	Blt_TableNotifyEventProc *proc, Blt_TableNotifierDeleteProc *deleteProc,
-	ClientData clientData);
-
-BLT_EXTERN Blt_TableNotifier Blt_Table_CreateColumnNotifier(
-	Tcl_Interp *interp, Blt_Table table, Blt_TableColumn column, 
-	unsigned int mask, Blt_TableNotifyEventProc *proc, 
-	Blt_TableNotifierDeleteProc *deleteProc, ClientData clientData);
-
-BLT_EXTERN Blt_TableNotifier Blt_Table_CreateColumnTagNotifier(
-	Tcl_Interp *interp, Blt_Table table, const char *tag, 
-	unsigned int mask, Blt_TableNotifyEventProc *proc, 
-	Blt_TableNotifierDeleteProc *deleteProc, ClientData clientData);
-
-
-BLT_EXTERN void Blt_Table_DeleteNotifier(Blt_TableNotifier notifier);
-
-/*
- * Blt_TableSortOrder --
- *
- */
-typedef int (Blt_TableSortProc)(ClientData clientData, 
-	Blt_TableValue value1, Blt_TableValue value2);
-
-typedef struct {
-    int type;				/* Type of sort to be performed: see
-					 * flags below. */
-    Blt_TableSortProc *sortProc;	/* Procedures to be called to compare
-					 * two entries in the same row or
-					 * column. */
-    Blt_TableSortProc *userProc;	/* Procedures to be called to compare
-					 * two entries in the same row or
-					 * column. */
-    ClientData clientData;		/* One word of data passed to the sort
-					 * comparison procedure above. */
-    Blt_TableColumn column;		/* Column to be compared. */
-} Blt_TableSortOrder;
-
-
-#define SORT_DECREASING		(1<<0)
-#define SORT_LIST		(1<<1)
-
-#define SORT_TYPE_MASK		(3<<2)
-#define SORT_NONE		(0)
-#define SORT_ASCII		(1<<2)
-#define SORT_DICTIONARY		(2<<2)
-#define SORT_FREQUENCY		(3<<2)
-
-BLT_EXTERN Blt_TableRow *Blt_Table_SortRows(Blt_Table table, 
-	Blt_TableSortOrder *order, size_t nCompares, unsigned int flags);
-
-BLT_EXTERN Blt_TableRow *Blt_Table_RowMap(Blt_Table table);
-BLT_EXTERN Blt_TableColumn *Blt_Table_ColumnMap(Blt_Table table);
-
-BLT_EXTERN void Blt_Table_SetRowMap(Blt_Table table, Blt_TableRow *map);
-BLT_EXTERN void Blt_Table_SetColumnMap(Blt_Table table, Blt_TableColumn *map);
-
-#define TABLE_RESTORE_NO_TAGS	    (1<<0)
-#define TABLE_RESTORE_OVERWRITE	    (1<<1)
-
-BLT_EXTERN int Blt_Table_Restore(Tcl_Interp *interp, Blt_Table table, 
-	char *string, unsigned int flags);
-BLT_EXTERN int Blt_Table_FileRestore(Tcl_Interp *interp, Blt_Table table, 
-	const char *fileName, unsigned int flags);
-BLT_EXTERN int Blt_Table_Dump(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow *rowMap, Blt_TableColumn *colMap, Tcl_DString *dsPtr);
-BLT_EXTERN int Blt_Table_FileDump(Tcl_Interp *interp, Blt_Table table, 
-	Blt_TableRow *rowMap, Blt_TableColumn *colMap, const char *fileName);
-
-typedef int (Blt_TableImportProc)(Blt_Table table, Tcl_Interp *interp, int objc,
-	Tcl_Obj *const *objv);
-
-typedef int (Blt_TableExportProc)(Blt_Table table, Tcl_Interp *interp,
-	int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_Table_RegisterFormat(Tcl_Interp *interp, const char *name, 
-	Blt_TableImportProc *importProc, Blt_TableExportProc *exportProc);
-
-BLT_EXTERN void Blt_Table_UnsetKeys(Blt_Table table);
-BLT_EXTERN Blt_Chain Blt_Table_GetKeys(Blt_Table table);
-BLT_EXTERN int Blt_Table_SetKeys(Blt_Table table, Blt_Chain keys, int unique);
-BLT_EXTERN int Blt_Table_KeyLookup(Tcl_Interp *interp, Blt_Table table,
-	int objc, Tcl_Obj *const *objv, Blt_TableRow *rowPtr);
-
-
-#define Blt_Table_NumRows(t)	   ((t)->corePtr->rows.nUsed)
-#define Blt_Table_RowIndex(r)	   ((r)->index)
-#define Blt_Table_RowLabel(r)	   ((r)->label)
-#define Blt_Table_Row(t,i)  \
-    (Blt_TableRow)((t)->corePtr->rows.map[(i)-1])
-
-#define Blt_Table_NumColumns(t)	   ((t)->corePtr->columns.nUsed)
-#define Blt_Table_ColumnIndex(c)   ((c)->index)
-#define Blt_Table_ColumnLabel(c)   ((c)->label)
-#define Blt_Table_Column(t,i) \
-	(Blt_TableColumn)((t)->corePtr->columns.map[(i)-1])
-
-#define Blt_Table_TableName(t)	   ((t)->name)
-#define Blt_Table_EmptyValue(t)	   ((t)->emptyValue)
-#define Blt_Table_ColumnType(c)	   ((c)->type)
-
-#endif /* BLT_DATATABLE_H */
diff --git a/blt3.0/src/bltDebug.c b/blt3.0/src/bltDebug.c
deleted file mode 100644
index 7e2c7a6..0000000
--- a/blt3.0/src/bltDebug.c
+++ /dev/null
@@ -1,427 +0,0 @@
-
-/*
- * bltDebug.c --
- *
- *	Copyright 1993-1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_BLTDEBUG
-
-#define DEBUG_THREAD_KEY "BLT Debug Command Data"
-#define MAX_STACK 2048
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif /* HAVE_SYS_TIME_H */
-#endif /* TIME_WITH_SYS_TIME */
-
-#include "bltChain.h"
-
-static Tcl_CmdObjTraceProc DebugProc;
-static Tcl_ObjCmdProc DebugCmd;
-
-typedef struct {
-    const char *pattern;
-    Tcl_Obj *nameObjPtr;
-} Watch;
-
-typedef struct {
-    Blt_Chain chain; 	/* Chain of watches. */
-    Tcl_Interp *interp;
-    unsigned char *stack;
-} DebugCmdInterpData;
-
-#define SETBIT(i) \
-    dataPtr->stack[(i) >> 3] |= (1 << ((i) & 0x07))
-#define GETBIT(i) \
-    (dataPtr->stack[(i) >> 3] & (1 << ((i) & 0x07)))
-#define UNSETBIT(i) \
-    dataPtr->stack[(i) >> 3] &= ~(1 << ((i) & 0x07))
-
-/*
- *---------------------------------------------------------------------------
- *
- * DebugInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "debug" command
- *	is deleted.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Removes the hash table managing all debug names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-DebugInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    DebugCmdInterpData *dataPtr = clientData;
-
-    /* All debug instances should already have been destroyed when
-     * their respective TCL commands were deleted. */
-    Blt_Chain_Destroy(dataPtr->chain);
-    Tcl_DeleteAssocData(interp, DEBUG_THREAD_KEY);
-    Blt_Free(dataPtr->stack);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetDebugCmdInterpData --
- *
- *---------------------------------------------------------------------------
- */
-static DebugCmdInterpData *
-GetDebugCmdInterpData(Tcl_Interp *interp)
-{
-    DebugCmdInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (DebugCmdInterpData *)
-	Tcl_GetAssocData(interp, DEBUG_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(DebugCmdInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, DEBUG_THREAD_KEY, DebugInterpDeleteProc,
-		 dataPtr);
-	dataPtr->chain = Blt_Chain_Create();
-	dataPtr->stack = Blt_Malloc(MAX_STACK);
-    }
-    return dataPtr;
-}
-
-static Watch *
-GetWatch(DebugCmdInterpData *dataPtr, Tcl_Obj *objPtr)
-{
-    Blt_ChainLink link;
-    char c;
-    Watch *watchPtr;
-    char *name, *string;
-
-    name = Tcl_GetString(objPtr);
-    c = name[0];
-    for (link = Blt_Chain_FirstLink(dataPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	watchPtr = Blt_Chain_GetValue(link);
-	string = Tcl_GetString(watchPtr->nameObjPtr);
-	if ((string[0] == c) && (strcmp(name, string) == 0)) {
-	    return watchPtr;
-	}
-    }
-    link = Blt_Chain_AllocLink(sizeof(Watch));
-    watchPtr = Blt_Chain_GetValue(link);
-    watchPtr->nameObjPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    /* Prepend watch onto chain. */
-    Blt_Chain_LinkBefore(dataPtr->chain, link, (Blt_ChainLink)NULL);
-    return watchPtr;
-}
-
-static void
-DeleteWatch(DebugCmdInterpData *dataPtr, Tcl_Obj *objPtr)
-{
-    Blt_ChainLink link;
-    char c;
-    char *name;
-
-    name = Tcl_GetString(objPtr);
-    c = name[0];
-    for (link = Blt_Chain_FirstLink(dataPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Watch *watchPtr;
-	char *string;
-
-	watchPtr = Blt_Chain_GetValue(link);
-	string = Tcl_GetString(watchPtr->nameObjPtr);
-	if ((string[0] == c) && (strcmp(name, string) == 0)) {
-	    Tcl_DecrRefCount(watchPtr->nameObjPtr);
-	    Blt_Chain_DeleteLink(dataPtr->chain, link);
-	    return;
-	}
-    }
-}
-
-/*ARGSUSED*/
-static int
-DebugProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Not used. */
-    int level,			/* Current level */
-    const char *command,	/* Command before substitution */
-    Tcl_Command token,		/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)	/* Command after parsing, but before
-				 * evaluation */
-{
-    DebugCmdInterpData *dataPtr = clientData;
-    Tcl_Channel errChannel;
-    Tcl_DString dString;
-    const char *lineStart;
-    const char *string;
-    char prompt[200];
-    int count;
-    const char *p;
-    int i;
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    /* This is pretty crappy, but there's no way to trigger stack pops */
-    for (i = level + 1; i < MAX_STACK; i++) {
-	UNSETBIT(i);
-    }
-    if (Blt_Chain_GetLength(dataPtr->chain) > 0) {
-	int found;
-	Blt_ChainLink link;
-
-	found = FALSE;
-	for (link = Blt_Chain_FirstLink(dataPtr->chain); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Watch *watchPtr;
-	    const char *cmd, *pattern;
-
-	    watchPtr = Blt_Chain_GetValue(link);
-	    cmd = Tcl_GetString(objv[0]);
-	    pattern = Tcl_GetString(watchPtr->nameObjPtr);
-	    if (Tcl_StringMatch(cmd, pattern)) {
-		found = TRUE;
-		break;
-	    }
-	}
-	if ((found) && (level < MAX_STACK)) {
-	    SETBIT(level), SETBIT(level + 1);
-	}
-	if ((level >= MAX_STACK) || (!GETBIT(level))) {
-	    return TCL_OK;
-	}
-    }
-    /*
-     * Use stderr channel, for compatibility with systems that don't have a
-     * tty (like WIN32).  In reality, it doesn't make a difference since Tk's
-     * Win32 console can't handle large streams of data anyways.
-     */
-    errChannel = Tcl_GetStdChannel(TCL_STDERR);
-    if (errChannel == NULL) {
-	Tcl_AppendResult(interp, "can't get stderr channel", (char *)NULL);
-	Tcl_BackgroundError(interp);
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-
-    sprintf_s(prompt, 200, "%-2d-> ", level);
-    p = command;
-    /* Skip leading spaces in command line. */
-    while(isspace(UCHAR(*p))) {
-	p++;
-    }
-    lineStart = p;
-    count = 0;
-    while (*p != '\0') {
-	if (*p == '\n') {
-	    if (count > 0) {
-		Tcl_DStringAppend(&dString, "     ", -1);
-	    } else {
-		Tcl_DStringAppend(&dString, prompt, -1);
-	    }
-	    Tcl_DStringAppend(&dString, lineStart, p - lineStart);
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	    p++;
-	    lineStart = p;
-	    count++;
-	    if (count > 6) {
-		break;		/* Stop after 6 lines. */
-	    }
-	} else {
-	    p++;
-	}
-    }   
-    while (isspace(UCHAR(*lineStart))) {
-	lineStart++;
-    }
-    if (lineStart < p) {
-	if (count > 0) {
-	    Tcl_DStringAppend(&dString, "     ", -1);
-	} else {
-	    Tcl_DStringAppend(&dString, prompt, -1);
-	}
-	Tcl_DStringAppend(&dString, lineStart, p - lineStart);
-	if (count <= 6) {
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    }
-    if (count > 6) {
-	Tcl_DStringAppend(&dString, "     ...\n", -1);
-    }
-    listObjPtr = Tcl_NewListObj(objc, objv);
-    Tcl_IncrRefCount(listObjPtr);
-#ifdef notdef
-    objPtr = Tcl_SubstObj(interp, listObjPtr, TCL_SUBST_VARIABLES);
-#else
-    objPtr = NULL;
-#endif
-    if (objPtr == NULL) {
-	string = Tcl_GetString(listObjPtr);
-    } else {
-	Tcl_IncrRefCount(objPtr);
-	string = Tcl_GetString(objPtr);
-    }
-    lineStart = string;
-    sprintf_s(prompt, 200, "  <- ");
-    count = 0;
-    for (p = string; *p != '\0'; /* empty */) {
-	if (*p == '\n') {
-	    if (count > 0) {
-		Tcl_DStringAppend(&dString, "     ", -1);
-	    } else {
-		Tcl_DStringAppend(&dString, prompt, -1);
-	    }
-	    count++;
-	    Tcl_DStringAppend(&dString, lineStart, p - lineStart);
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	    p++;
-	    lineStart = p;
-	    if (count > 6) {
-		break;
-	    }
-	} else {
-	    p++;
-	}
-    }   
-    if (lineStart < p) {
-	if (count > 0) {
-	    Tcl_DStringAppend(&dString, "     ", -1);
-	} else {
-	    Tcl_DStringAppend(&dString, prompt, -1);
-	}
-	Tcl_DStringAppend(&dString, lineStart, p - lineStart);
-	if (count <= 6) {
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    }
-    if (count > 6) {
-	Tcl_DStringAppend(&dString, "      ...\n", -1);
-    }
-    Tcl_DStringAppend(&dString, "\n", -1);
-    Tcl_DecrRefCount(listObjPtr);
-    if (objPtr != NULL) {
-	Tcl_DecrRefCount(objPtr);
-    }
-    Tcl_Write(errChannel, (char *)Tcl_DStringValue(&dString), -1);
-    Tcl_Flush(errChannel);
-    Tcl_DStringFree(&dString);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-DebugCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link;
-    DebugCmdInterpData *dataPtr = clientData;
-    Tcl_Obj *listObjPtr;
-    Watch *watchPtr;
-    const char *string;
-    char c;
-    int newLevel;
-    int i;
-    int length;
-    static Tcl_Trace token;
-    static int level;
-
-    if (objc == 1) {
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), level);
-	return TCL_OK;
-    }
-    string = Tcl_GetStringFromObj(objv[1], &length);
-    c = string[0];
-    if ((c == 'w') && (strncmp(string, "watch", length) == 0)) {
-	/* Add patterns of command names to watch to the chain */
-	for (i = 2; i < objc; i++) {
-	    GetWatch(dataPtr, objv[i]);
-	}
-    } else if ((c == 'i') && (strncmp(string, "ignore", length) == 0)) {
-	for (i = 2; i < objc; i++) {
-	    DeleteWatch(dataPtr, objv[i]);
-	}
-    } else {
-	goto levelTest;
-    }
-    /* Return the current watch patterns */
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (link = Blt_Chain_FirstLink(dataPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	watchPtr = Blt_Chain_GetValue(link);
-	Tcl_ListObjAppendElement(interp, listObjPtr, watchPtr->nameObjPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-
-  levelTest:
-    if (Tcl_GetBooleanFromObj(interp, objv[1], &newLevel) == TCL_OK) {
-	if (newLevel > 0) {
-	    newLevel = 10000;	/* Max out the level */
-	}
-    } else if (Tcl_GetIntFromObj(interp, objv[1], &newLevel) == TCL_OK) {
-	if (newLevel < 0) {
-	    newLevel = 0;
-	}
-    } else {
-	return TCL_ERROR;
-    }
-    if (token != 0) {
-	Tcl_DeleteTrace(interp, token);
-    }
-    if (newLevel > 0) {
-	token = Tcl_CreateObjTrace(interp, newLevel, 0, DebugProc, 
-				   dataPtr, NULL);
-    }
-    level = newLevel;
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), level);
-    return TCL_OK;
-}
-
-int
-Blt_DebugCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"debug", DebugCmd,};
-
-    cmdSpec.clientData = GetDebugCmdInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_BLTDEBUG */
diff --git a/blt3.0/src/bltDragdrop.c b/blt3.0/src/bltDragdrop.c
deleted file mode 100644
index 79566d3..0000000
--- a/blt3.0/src/bltDragdrop.c
+++ /dev/null
@@ -1,2755 +0,0 @@
-
-/*
- * bltDragdrop.c --
- *
- * This module implements a drag-and-drop mechanism for the Tk Toolkit.
- * Allows widgets to be registered as drag&drop sources and targets for
- * handling "drag-and-drop" operations between Tcl/Tk applications.
- *
- * The "drag&drop" command was created by Michael J. McLennan.
- *
- *	Copyright 1993-1998 Lucent Technologies, Inc.
- *
- *	Permission to use, copy, modify, and distribute this software
- *	and its documentation for any purpose and without fee is
- *	hereby granted, provided that the above copyright notice
- *	appear in all copies and that both that the copyright notice
- *	and warranty disclaimer appear in supporting documentation,
- *	and that the names of Lucent Technologies any of their
- *	entities not be used in advertising or publicity pertaining to
- *	distribution of the software without specific, written prior
- *	permission.
- *
- *	Lucent Technologies disclaims all warranties with regard to
- *	this software, including all implied warranties of
- *	merchantability and fitness.  In no event shall Lucent
- *	Technologies be liable for any special, indirect or
- *	consequential damages or any damages whatsoever resulting from
- *	loss of use, data or profits, whether in an action of
- *	contract, negligence or other tortuous action, arising out of
- *	or in connection with the use or performance of this software.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-#include "bltInt.h"
-
-
-#ifndef NO_DRAGDROP
-#include "bltOp.h"
-#include "bltHash.h"
-#include "bltChain.h"
-#include <X11/Xatom.h>
-#include "tkDisplay.h"
-
-#define DRAGDROP_THREAD_KEY "BLT Dragdrop Command Data"
-
-#ifdef WIN32
-#define MAX_PROP_SIZE 255	/* Maximum size of property. */
-typedef HWND WINDOW;
-#else
-#define MAX_PROP_SIZE 1000	/* Maximum size of property. */
-typedef Window WINDOW;
-static Atom dndAtom;
-#endif
-
-/*
- *	Each "drag&drop" target widget is tagged with a "BltDrag&DropTarget" 
- *	property in XA_STRING format.  This property identifies the window 
- *	as a "drag&drop" target.  It's formated as a TCL list and contains
- *	the following information:
- *
- *	    "INTERP_NAME TARGET_NAME DATA_TYPE DATA_TYPE ..."
- *
- *	  INTERP_NAME	Name of the target application's interpreter.
- *	  TARGET_NAME	Path name of widget registered as the drop target.  
- *	  DATA_TYPE	One or more "types" handled by the target.
- *
- *	When the user invokes the "drag" operation, the window hierarchy
- *	is progressively examined.  Window information is cached during
- *	the operation, to minimize X server traffic. Windows carrying a
- *	"BltDrag&DropTarget" property are identified.  When the token is 
- *	dropped over a valid site, the drop information is sent to the 
- *	application 
- *	via the usual "send" command.  If communication fails, the drag&drop 
- *	facility automatically posts a rejection symbol on the token window.  
- */
-
-#define INTERP_NAME	0
-#define TARGET_NAME	1
-#define DATA_TYPE	2
-
-/* Error Proc used to report drag&drop background errors */
-#define DEF_ERROR_PROC              "bgerror"
-/*
- *  CONFIG PARAMETERS
- */
-#define DEF_DND_BUTTON_BACKGROUND		RGB_YELLOW
-#define DEF_DND_BUTTON_NUMBER		"3"
-#define DEF_DND_PACKAGE_COMMAND		(char *)NULL
-#define DEF_DND_SELF_TARGET		"no"
-#define DEF_DND_SEND			"all"
-#define DEF_DND_SITE_COMMAND		(char *)NULL
-#define DEF_TOKEN_ACTIVE_BACKGROUND	STD_ACTIVE_BACKGROUND
-#define DEF_TOKEN_ACTIVE_BORDERWIDTH	"3"
-#define DEF_TOKEN_ACTIVE_RELIEF		"sunken"
-#define DEF_TOKEN_ANCHOR		"se"
-#define DEF_TOKEN_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_TOKEN_BORDERWIDTH		"3"
-#define DEF_TOKEN_CURSOR		"arrow"
-#define DEF_TOKEN_OUTLINE_COLOR		RGB_BLACK
-#define DEF_TOKEN_REJECT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_TOKEN_REJECT_FOREGROUND	RGB_RED
-#define DEF_TOKEN_REJECT_STIPPLE_COLOR	(char *)NULL
-#define DEF_TOKEN_RELIEF		"raised"
-
-static char dragDropCmd[] = "::blt::drag&drop";
-
-static char className[] = "DragDropToken";	/* CLASS NAME of token window */
-static char propName[] = "BltDrag&DropTarget";	/* Property name */
-
-#ifndef WIN32
-static int initialized = FALSE;
-#endif
-
-typedef struct {
-    Blt_HashTable sourceTable;
-    Blt_HashTable targetTable;
-    int nActive;
-    int locX, locY;
-    Tcl_Interp *interp;
-    Tk_Window tkMain;		/* Main window of the interpreter. */
-} DragdropCmdInterpData;
-
-/*
- *  Percent substitutions
- */
-typedef struct {
-    char letter;		/* character like 'x' in "%x" */
-    const char *value;		/* value to be substituted in place of "%x" */
-} SubstDescriptors;
-
-
-/*
- *  AnyWindow --
- *
- *	This structure represents a window hierarchy examined during
- *	a single "drag" operation.  It's used to cache information
- *	to reduce the round-trip calls to the server needed to query
- *	window geometry information and grab the target property.
- */
-typedef struct _AnyWindow AnyWindow;
-
-struct _AnyWindow {
-    WINDOW nativeWindow;	/* Native window: HWINDOW (Win32) or 
-				 * Window (X11). */
-
-    int initialized;		/* If non-zero, the rest of this structure's
-				 * information had been previously built. */
-
-    int x1, y1, x2, y2;		/* Extents of the window (upper-left and
-				 * lower-right corners). */
-
-    AnyWindow *parentPtr;	/* Parent node. NULL if root. Used to
-				  * compute offset for X11 windows. */
-
-    Blt_Chain chain;		/* List of this window's children. If NULL,
-				 * there are no children. */
-
-    const char **targetInfo;	/* An array of target window drag&drop
-				 * information: target interpreter,
-				 * pathname, and optionally possible
-				 * type matches. NULL if the window is
-				 * not a drag&drop target or is not a
-				 * valid match for the drop source. */
-
-};
-
-/*
- *  Drag&Drop Registration Data
- */
-typedef struct {
-
-    /*
-     * This is a goof in the Tk API.  It assumes that only an official
-     * Tk "toplevel" widget will ever become a toplevel window (i.e. a
-     * window whose parent is the root window).  Because under Win32,
-     * Tk tries to use the widget record associated with the TopLevel
-     * as a Tk frame widget, to read its menu name.  What this means
-     * is that any widget that's going to be a toplevel, must also look
-     * like a frame. Therefore we've copied the frame widget structure
-     * fields into the token.
-     */
-
-    Tk_Window tkwin;		/* Window that embodies the frame.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up. */
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-    Tcl_Interp *interp;		/* Interpreter associated with widget.  Used
-				 * to delete widget command. */
-    Tcl_Command widgetCmd;	/* Token for frame's widget command. */
-    const char *className;	/* Class name for widget (from configuration
-				 * option).  Malloc-ed. */
-    int mask;			/* Either FRAME or TOPLEVEL;  used to select
-				 * which configuration options are valid for
-				 * widget. */
-    const char *screenName;    /* Screen on which widget is created.  Non-null
-				 * only for top-levels.  Malloc-ed, may be
-				 * NULL. */
-    const char *visualName;	/* Textual description of visual for window,
-				 * from -visual option.  Malloc-ed, may be
-				 * NULL. */
-    const char *colormapName;	/* Textual description of colormap for window,
-				 * from -colormap option.  Malloc-ed, may be
-				 * NULL. */
-    const char *menuName;	/* Textual description of menu to use for
-				 * menubar. Malloc-ed, may be NULL. */
-    Colormap colormap;		/* If not None, identifies a colormap
-				 * allocated for this window, which must be
-				 * freed when the window is deleted. */
-    Tk_3DBorder border;		/* Structure used to draw 3-D border and
-				 * background.  NULL means no background
-				 * or border. */
-    int borderWidth;		/* Width of 3-D border (if any). */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED etc. */
-    int highlightWidth;		/* Width in pixels of highlight to draw
-				 * around widget when it has the focus.
-				 * 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
-				/* Color for drawing traversal highlight
-				 * area when highlight is off. */
-    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
-    int width;			/* Width to request for window.  <= 0 means
-				 * don't request any size. */
-    int height;			/* Height to request for window.  <= 0 means
-				 * don't request any size. */
-    Tk_Cursor cursor;		/* Current cursor for window, or None. */
-    const char *takeFocus;	/* Value of -takefocus option;  not used in
-				 * the C code, but used by keyboard traversal
-				 * scripts.  Malloc'ed, but may be NULL. */
-    int isContainer;		/* 1 means this window is a container, 0 means
-				 * that it isn't. */
-    const char *useThis;	/* If the window is embedded, this points to
-				 * the name of the window in which it is
-				 * embedded (malloc'ed).  For non-embedded
-				 * windows this is NULL. */
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-
-    /* Token specific fields */
-
-    int lastX, lastY;		/* last position of token window */
-    int active;			/* non-zero => over target window */
-    Tcl_TimerToken timer;	/* token for routine to hide tokenwin */
-    GC rejectFgGC;		/* GC used to draw rejection fg: (\) */
-    GC rejectBgGC;		/* GC used to draw rejection bg: (\) */
-
-    /* User-configurable fields */
-
-    Tk_Anchor anchor;		/* Position of token win relative to mouse */
-    Tk_3DBorder outline;	/* Outline border around token window */
-    Tk_3DBorder normalBorder;	/* Border/background for token window */
-    Tk_3DBorder activeBorder;	/* Border/background for token window */
-    int activeRelief;
-    int activeBW;	/* Border width in pixels */
-    XColor *rejectFg;		/* Color used to draw rejection fg: (\) */
-    XColor *rejectBg;		/* Color used to draw rejection bg: (\) */
-    Pixmap rejectStipple;	/* Stipple used to draw rejection: (\) */
-} Token;
-
-typedef struct {
-    Tcl_Interp *interp;		/* Interpreter associated with the Tk source 
-				 * widget. */
-
-    Tk_Window tkwin;		/* Tk window registered as the drag&drop 
-				 * source. */
-
-    Display *display;		/* Drag&drop source window display */
-
-    Blt_HashTable handlerTable;	/* Table of data handlers (converters)
-				 * registered for this source. */
-
-    int button;			/* Button used to invoke drag operation. */
-
-    Token token;		/* Token used to provide special cursor. */
-    
-    int pkgCmdInProgress;	/* Indicates if a pkgCmd is currently active. */
-    const char *pkgCmd;		/* TCL command executed at start of "drag"
-				 * operation to gather information about 
-				 * the source data. */
-
-    const char *pkgCmdResult;	/* Result returned by the most recent 
-				 * pkgCmd. */
-
-    const char *siteCmd;	/* TCL command executed to update token 
-				 * window. */
-
-    AnyWindow *rootPtr;		/* Cached window information: Gathered
-				 * and used during the "drag" operation 
-				 * to see if the mouse pointer is over a 
-				 * valid target. */
-
-    int selfTarget;		/* Indicated if the source should drop onto 
-				 * itself. */
-
-    Tk_Cursor cursor;		/* cursor restored after dragging */
-
-    const char **sendTypes;	/* list of data handler names or "all" */
-
-    Blt_HashEntry *hashPtr;
-
-    AnyWindow *windowPtr;	/* Last target examined. If NULL, mouse 
-				 * pointer is not currently over a valid 
-				 * target. */
-    Tcl_Obj *errorCmdObjPtr;	
-    DragdropCmdInterpData *dataPtr;
-} Source;
-
-typedef struct {
-    Tcl_Interp *interp;
-    Tk_Window tkwin;		/* drag&drop target window */
-    Display *display;		/* drag&drop target window display */
-    Blt_HashTable handlerTable;	/* Table of data handlers (converters)
-				 * registered for this target. */
-    Blt_HashEntry *hashPtr;
-    DragdropCmdInterpData *dataPtr;
-} Target;
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_INT, "-button", "buttonBinding", "ButtonBinding",
-	DEF_DND_BUTTON_NUMBER, Blt_Offset(Source, button), 0},
-    {BLT_CONFIG_OBJ, "-errorcmd", "errorCommand", "ErrorCommand",
-	"bgerror", Blt_Offset(Source, errorCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-packagecmd", "packageCommand", "PackageCommand",
-	DEF_DND_PACKAGE_COMMAND, Blt_Offset(Source, pkgCmd), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-rejectbg", "rejectBackground", "Background",
-	DEF_TOKEN_REJECT_BACKGROUND, Blt_Offset(Source, token.rejectBg), 0},
-    {BLT_CONFIG_COLOR, "-rejectfg", "rejectForeground", "Foreground",
-	DEF_TOKEN_REJECT_FOREGROUND, Blt_Offset(Source, token.rejectFg), 0},
-    {BLT_CONFIG_BITMAP, "-rejectstipple", "rejectStipple", "Stipple",
-	DEF_TOKEN_REJECT_STIPPLE_COLOR, 
-	Blt_Offset(Source, token.rejectStipple), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-selftarget", "selfTarget", "SelfTarget",
-	DEF_DND_SELF_TARGET, Blt_Offset(Source, selfTarget), 0},
-    {BLT_CONFIG_LIST, "-send", "send", "Send", DEF_DND_SEND, 
-	Blt_Offset(Source, sendTypes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-sitecmd", "siteCommand", "Command",
-	DEF_DND_SITE_COMMAND, Blt_Offset(Source, siteCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-tokenanchor", "tokenAnchor", "Anchor",
-	DEF_TOKEN_ANCHOR, Blt_Offset(Source, token.anchor), 0},
-    {BLT_CONFIG_BORDER, "-tokenactivebackground", "tokenActiveBackground", 
-	"ActiveBackground", DEF_TOKEN_ACTIVE_BACKGROUND, 
-	Blt_Offset(Source, token.activeBorder), 0},
-    {BLT_CONFIG_BORDER, "-tokenbg", "tokenBackground", "Background",
-	DEF_TOKEN_BACKGROUND, Blt_Offset(Source, token.normalBorder), 0},
-    {BLT_CONFIG_BORDER, "-tokenoutline", "tokenOutline", "Outline",
-	DEF_TOKEN_OUTLINE_COLOR, Blt_Offset(Source, token.outline), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-tokenborderwidth", "tokenBorderWidth", 
-	"BorderWidth", DEF_TOKEN_BORDERWIDTH, 
-	Blt_Offset(Source, token.borderWidth), 0},
-    {BLT_CONFIG_CURSOR, "-tokencursor", "tokenCursor", "Cursor",
-	DEF_TOKEN_CURSOR, Blt_Offset(Source, token.cursor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0},
-};
-
-static Blt_ConfigSpec tokenConfigSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_TOKEN_ACTIVE_BACKGROUND, 
-	Blt_Offset(Token, activeBorder), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "activeRelief",
-	DEF_TOKEN_ACTIVE_RELIEF, Blt_Offset(Token, activeRelief), 0},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
-	DEF_TOKEN_ANCHOR, Blt_Offset(Token, anchor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-activeborderwidth", "activeBorderWidth",
-	"ActiveBorderWidth", DEF_TOKEN_ACTIVE_BORDERWIDTH, 
-	Blt_Offset(Token, activeBW), 0},
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_TOKEN_BACKGROUND, Blt_Offset(Token, normalBorder), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", 
-	DEF_TOKEN_BORDERWIDTH, Blt_Offset(Token, borderWidth), 0},
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_TOKEN_CURSOR, Blt_Offset(Token, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BORDER, "-outline", "outline", "Outline",
-	DEF_TOKEN_OUTLINE_COLOR, Blt_Offset(Token, outline), 0},
-    {BLT_CONFIG_COLOR, "-rejectbg", "rejectBackground", "Background",
-	DEF_TOKEN_REJECT_BACKGROUND, Blt_Offset(Token, rejectBg), 0},
-    {BLT_CONFIG_COLOR, "-rejectfg", "rejectForeground", "Foreground",
-	DEF_TOKEN_REJECT_FOREGROUND, Blt_Offset(Token, rejectFg), 0},
-    {BLT_CONFIG_BITMAP, "-rejectstipple", "rejectStipple", "Stipple",
-	DEF_TOKEN_REJECT_STIPPLE_COLOR, Blt_Offset(Token, rejectStipple),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_TOKEN_RELIEF, Blt_Offset(Token, relief), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0},
-};
-
-
-/*
- *  Forward Declarations
- */
-static Tcl_ObjCmdProc DragDropCmd;
-static Tk_EventProc TokenEventProc;
-static Tk_EventProc TargetEventProc;
-
-static void MoveToken(Source * srcPtr, Token *tokenPtr);
-static void UpdateToken(ClientData clientData);
-static void HideToken(Token *tokenPtr);
-static void RejectToken(Token *tokenPtr);
-
-static int GetSourceFromObj(DragdropCmdInterpData *dataPtr, Tcl_Interp *interp,
-	Tcl_Obj *objPtr, Source **srcPtrPtr);
-static Source *CreateSource(DragdropCmdInterpData *dataPtr, Tcl_Interp *interp,
-	Tcl_Obj *objPtr, int *newEntry);
-static void DestroySource(Source * srcPtr);
-static void SourceEventProc(ClientData clientData, XEvent *eventPtr);
-static int ConfigureSource(Tcl_Interp *interp, Source * srcPtr, int objc, 
-	Tcl_Obj *const *objv, int flags);
-static int ConfigureToken(Tcl_Interp *interp, Source * srcPtr, int objc, 
-	Tcl_Obj *const *objv);
-
-static Target *CreateTarget(DragdropCmdInterpData *dataPtr, Tcl_Interp *interp,
-	Tk_Window tkwin);
-static Target *FindTarget(DragdropCmdInterpData *dataPtr, Tk_Window tkwin);
-static void DestroyTarget(DestroyData data);
-static int OverTarget(Source * srcPtr, int x, int y);
-static void AddTargetProperty(Tcl_Interp *interp, Target *targetPtr);
-
-static void DndSend(Source *srcPtr);
-
-static void InitRoot(Source * srcPtr);
-static void RemoveWindow(AnyWindow *wr);
-static void QueryWindow(Display *display, AnyWindow * windowPtr);
-
-static const char *ExpandPercents(const char *str, SubstDescriptors *subs, 
-	int nsubs, Tcl_DString *resultPtr);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DragdropInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "dragdrop"
- *	command is deleted.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Removes the hash table managing all dragdrop names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-DragdropInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-
-    /* All dragdrop instances should already have been destroyed when
-     * their respective TCL commands were deleted. */
-    Blt_DeleteHashTable(&dataPtr->sourceTable);
-    Blt_DeleteHashTable(&dataPtr->targetTable);
-    Tcl_DeleteAssocData(interp, DRAGDROP_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetDragdropdCmdInterpData --
- *
- *---------------------------------------------------------------------------
- */
-static DragdropCmdInterpData *
-GetDragdropCmdInterpData(Tcl_Interp *interp)
-{
-    DragdropCmdInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (DragdropCmdInterpData *)
-	Tcl_GetAssocData(interp, DRAGDROP_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(DragdropCmdInterpData));
-	dataPtr->interp = interp;
-	dataPtr->tkMain = Tk_MainWindow(interp);
-	Tcl_SetAssocData(interp, DRAGDROP_THREAD_KEY, DragdropInterpDeleteProc,
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->sourceTable, BLT_ONE_WORD_KEYS);
-	Blt_InitHashTable(&dataPtr->targetTable, BLT_ONE_WORD_KEYS);
-	dataPtr->nActive = 0;
-	dataPtr->locX = dataPtr->locY = 0;
-    }
-    return dataPtr;
-}
-
-
-#ifdef	WIN32
-
-#if defined( _MSC_VER) || defined(__BORLANDC__)
-#include <tchar.h>
-#endif /* _MSC_VER || __BORLANDC__ */
-
-typedef struct {
-    const char *prefix;
-    int prefixSize;
-    const char *propReturn;
-} PropertyInfo;
-
-
-#ifdef notdef
-static BOOL CALLBACK
-GetEnumWindowsProc(HWND hWnd, LPARAM clientData)
-{
-    Blt_Chain chain = (Blt_Chain)clientData;
-
-    Blt_Chain_Append(chain, (ClientData)hWnd);
-    return TRUE;
-}
-#endif
-
-static WINDOW
-GetNativeWindow(Tk_Window tkwin)
-{
-    return (WINDOW) Tk_GetHWND(Tk_WindowId(tkwin));
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWindowZOrder --
- *
- *	Returns a list of the child windows according to their stacking
- *	order.  The window handles are ordered from top to bottom.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-GetWindowZOrder(Display *display, HWND parent)
-{
-    Blt_Chain chain;
-    HWND hWnd;
-
-    chain = Blt_Chain_Create();
-    for (hWnd = GetTopWindow(parent); hWnd != NULL;
-	hWnd = GetNextWindow(hWnd, GW_HWNDNEXT)) {
-	Blt_Chain_Append(chain, (ClientData)hWnd);
-    }
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetEnumPropsExProc --
- *
- *---------------------------------------------------------------------------
- */
-static BOOL CALLBACK
-GetEnumPropsExProc(
-    HWND hwnd, 
-    LPCTSTR atom, 
-    HANDLE hData, 
-    DWORD clientData)
-{
-    PropertyInfo *infoPtr = (PropertyInfo *) clientData;
-
-    if (strncmp(infoPtr->prefix, atom, infoPtr->prefixSize) == 0) {
-	assert(infoPtr->propReturn == NULL);
-	infoPtr->propReturn = (const char *)atom;
-	return FALSE;
-    }
-    return TRUE;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- *  GetPropData --
- *
- *	This is a bad Windows hack to pass property information between
- *	applications.  (Ab)Normally the property data (one-word value) is
- *	stored in the data handle.  But the data content is available only
- *	within the application.  The pointer value is meaningless outside
- *	of the current application address space.  Not really useful at all.
- *
- *	So the trick here is to encode the property name with all the
- *	necessary information and to loop through all the properties
- *	of a window, looking for one that starts with our property name
- *	prefix.  The downside is that the property name is limited to
- *	255 bytes.  But that should be enough.  It's also slower since
- *	we examine each property until we find ours.
- *
- *	We'll plug in the OLE stuff later.
- *
- *---------------------------------------------------------------------------
- */
-
-static const char *
-GetPropData(HWND hWnd, char *atom)
-{
-    PropertyInfo propInfo;
-    if (hWnd == NULL) {
-	return NULL;
-    }
-    propInfo.prefix = atom;
-    propInfo.prefixSize = strlen(atom);
-    propInfo.propReturn = NULL;
-    EnumPropsEx(hWnd, (PROPENUMPROCEX)GetEnumPropsExProc, (DWORD)&propInfo);
-    return propInfo.propReturn;
-}
-#endif
-
-static const unsigned char *
-GetProperty(Display *display, HWND hWnd)
-{
-    HANDLE handle;
-    
-    handle = GetProp(hWnd, propName);
-    if (handle != NULL) {
-	ATOM atom;
-	char buffer[MAX_PROP_SIZE + 1];
-	UINT nBytes;
-
-	atom = (ATOM)((int)handle);
-	nBytes = GlobalGetAtomName(atom, buffer, MAX_PROP_SIZE);
-	if (nBytes > 0) {
-	    buffer[nBytes] = '\0';
-	    return Blt_AssertStrdup(buffer);
-	}
-    }
-    return NULL;
-}
-
-static void
-SetProperty(Tk_Window tkwin, const char *data)
-{
-    HANDLE handle;
-    HWND hWnd;
-    ATOM atom;
-
-    hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
-    if (hWnd == NULL) {
-	return;
-    }
-    handle = GetProp(hWnd, propName);
-    atom = (ATOM)((int)handle);
-    if (atom != (ATOM)0) {
-	GlobalDeleteAtom(atom);
-    }
-    atom = GlobalAddAtom((unsigned char *)data);
-    if (atom != (ATOM)0) {
-	handle = (HANDLE)((int)atom);
-	SetProp(hWnd, propName, handle);
-    }
-}
-
-static void
-RemoveProperty(Tk_Window tkwin)
-{
-    HWND hWnd;
-    HANDLE handle;
-
-    hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
-    if (hWnd == NULL) {
-	return;
-    }
-    handle = GetProp(hWnd, propName);
-    if (handle != NULL) {
-	ATOM atom;
-
-	atom = (ATOM)((int)handle);
-	GlobalDeleteAtom(atom);
-    }
-    RemoveProp(hWnd, propName);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetWindowRegion --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GetWindowRegion(
-    Display *display,		/* Not used. */
-    HWND hWnd,
-    int *x1Ptr,
-    int *y1Ptr,
-    int *x2Ptr,
-    int *y2Ptr)
-{
-    RECT rect;
-
-    if (GetWindowRect(hWnd, &rect)) {
-	*x1Ptr = rect.left;
-	*y1Ptr = rect.top;
-	*x2Ptr = rect.right;
-	*y2Ptr = rect.bottom;
-	return IsWindowVisible(hWnd);
-    }
-    return FALSE;
-}
-
-#else
-
-static WINDOW
-GetNativeWindow(Tk_Window tkwin)
-{
-    return Tk_WindowId(tkwin);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWindowZOrder --
- *
- *	Returns a chain of the child windows according to their stacking
- *	order.  The window ids are ordered from top to bottom.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain 
-GetWindowZOrder(Display *display, Window window)
-{
-    Blt_Chain chain;
-    Window *winv;
-    unsigned int winc;
-    Window dummy;
-
-    chain = NULL;
-    if ((XQueryTree(display, window, &dummy, &dummy, &winv, &winc)) && 
-	(winc > 0)) {
-	unsigned int i;
-
-	chain = Blt_Chain_Create();
-	for (i = 0; i < winc; i++) {
-	    /*
-	     *  XQuery returns windows in bottom to top order.
-	     *  We only care about the top window.
-	     */
-	    Blt_Chain_Prepend(chain, (ClientData)winv[i]);
-	}
-	if (winv != NULL) {
-	    XFree((char *)winv);	/* done with list of kids */
-	}
-    }
-    return chain;
-}
-
-static const unsigned char *
-GetProperty(
-    Display *display,
-    Window window)
-{
-    unsigned char *data;
-    int result, actualFormat;
-    Atom actualType;
-    unsigned long nItems, bytesAfter;
-
-    if (window == None) {
-	return NULL;
-    }
-    data = NULL;
-    result = XGetWindowProperty(display, window, dndAtom, 0, MAX_PROP_SIZE,
-	False, XA_STRING, &actualType, &actualFormat, &nItems, &bytesAfter,
-	&data);
-    if ((result != Success) || (actualFormat != 8) ||
-	(actualType != XA_STRING)) {
-	if (data != NULL) {
-	    XFree(data);
-	    data = NULL;
-	}
-    }
-    return data;
-}
-
-static void
-SetProperty(Tk_Window tkwin, char *data)
-{
-    XChangeProperty(Tk_Display(tkwin), Tk_WindowId(tkwin), dndAtom, XA_STRING,
-	8, PropModeReplace, (unsigned char *)data, strlen(data) + 1);
-}
-
-static int
-GetWindowRegion(
-    Display *display,
-    Window window,
-    int *x1Ptr, int *y1Ptr, 
-    int *x2Ptr, int *y2Ptr)
-{
-    XWindowAttributes winAttrs;
-
-    if (XGetWindowAttributes(display, window, &winAttrs)) {
-	*x1Ptr = winAttrs.x;
-	*y1Ptr = winAttrs.y;
-	*x2Ptr = winAttrs.x + winAttrs.width - 1;
-	*y2Ptr = winAttrs.y + winAttrs.height - 1;
-    }
-    return (winAttrs.map_state == IsViewable);
-}
-
-#endif /* WIN32 */
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ChangeToken --
- *
- *---------------------------------------------------------------------------
- */
-static void
-ChangeToken(Token *tokenPtr, int active)
-{
-    int relief;
-    Tk_3DBorder border;
-    int borderWidth;
-
-    Blt_Fill3DRectangle(tokenPtr->tkwin, Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->outline, 0, 0, Tk_Width(tokenPtr->tkwin),
-	Tk_Height(tokenPtr->tkwin), 0, TK_RELIEF_FLAT);
-    if (active) {
-	relief = tokenPtr->activeRelief;
-	border = tokenPtr->activeBorder;
-	borderWidth = tokenPtr->activeBW;
-    } else {
-	relief = tokenPtr->relief;
-	border = tokenPtr->normalBorder;
-	borderWidth = tokenPtr->borderWidth;
-    }
-    Blt_Fill3DRectangle(tokenPtr->tkwin, Tk_WindowId(tokenPtr->tkwin), border, 
-	2, 2, Tk_Width(tokenPtr->tkwin) - 4, Tk_Height(tokenPtr->tkwin) - 4, 
-	borderWidth, relief);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenEventProc --
- *
- *	Invoked by the Tk dispatcher to handle widget events.
- *	Manages redraws for the drag&drop token window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TokenEventProc(
-    ClientData clientData,	/* data associated with widget */
-    XEvent *eventPtr)		/* information about event */
-{
-    Token *tokenPtr = clientData;
-
-    if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
-	if (tokenPtr->tkwin != NULL) {
-	    ChangeToken(tokenPtr, tokenPtr->active);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	tokenPtr->tkwin = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  HideToken --
- *
- *	Unmaps the drag&drop token.  Invoked directly at the end of a
- *	successful communication, or after a delay if the communication
- *	fails (allowing the user to see a graphical picture of failure).
- *
- *---------------------------------------------------------------------------
- */
-static void
-HideToken(Token *tokenPtr)
-{
-    if (tokenPtr->tkwin != NULL) {
-	Tk_UnmapWindow(tokenPtr->tkwin);
-    }
-    tokenPtr->timer = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  RaiseToken --
- *
- *---------------------------------------------------------------------------
- */
-static void
-RaiseToken(Token *tokenPtr)
-{
-    Blt_MapToplevelWindow(tokenPtr->tkwin);
-    Blt_RaiseToplevelWindow(tokenPtr->tkwin);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  MoveToken --
- *
- *	Invoked during "drag" operations to move a token window to its
- *	current "drag" coordinate.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MoveToken(
-    Source *srcPtr,		/* drag&drop source window data */
-    Token *tokenPtr)
-{
-    int x, y;
-    int maxX, maxY;
-    int vx, vy, vw, vh;
-    Screen *screenPtr;
-
-    /* Adjust current location for virtual root windows.  */
-    Tk_GetVRootGeometry(srcPtr->tkwin, &vx, &vy, &vw, &vh);
-    x = tokenPtr->lastX + vx - 3;
-    y = tokenPtr->lastY + vy - 3;
-
-    screenPtr = Tk_Screen(srcPtr->tkwin);
-    maxX = WidthOfScreen(screenPtr) - Tk_Width(tokenPtr->tkwin);
-    maxY = HeightOfScreen(screenPtr) - Tk_Height(tokenPtr->tkwin);
-    Blt_TranslateAnchor(x, y, Tk_Width(tokenPtr->tkwin),
-	Tk_Height(tokenPtr->tkwin), tokenPtr->anchor, &x, &y);
-    if (x > maxX) {
-	x = maxX;
-    } else if (x < 0) {
-	x = 0;
-    }
-    if (y > maxY) {
-	y = maxY;
-    } else if (y < 0) {
-	y = 0;
-    }
-    if ((x != Tk_X(tokenPtr->tkwin)) || (y != Tk_Y(tokenPtr->tkwin))) {
-	Tk_MoveToplevelWindow(tokenPtr->tkwin, x, y);
-    }
-    RaiseToken(tokenPtr);
-}
-
-static Tk_Cursor
-GetWidgetCursor(
-    Tcl_Interp *interp,
-    Tk_Window tkwin)
-{
-    const char *cursorName;
-    Tk_Cursor cursor;
-
-    cursor = None;
-    if (Tcl_VarEval(interp, Tk_PathName(tkwin), " cget -cursor",
-	    (char *)NULL) != TCL_OK) {
-	return None;
-    }
-    cursorName = Tcl_GetStringResult(interp);
-    if ((cursorName != NULL) && (cursorName[0] != '\0')) {
-	cursor = Tk_GetCursor(interp, tkwin, Tk_GetUid((char *)cursorName));
-    }
-    Tcl_ResetResult(interp);
-    return cursor;
-}
-
-static void
-Bgerror(Source *srcPtr)
-{
-    if (srcPtr->errorCmdObjPtr != NULL) {
-	Tcl_Obj *objv[2];
-
-	objv[0] = srcPtr->errorCmdObjPtr;
-	objv[1] = Tcl_GetObjResult(srcPtr->interp);
-	Tcl_IncrRefCount(objv[0]);
-	Tcl_IncrRefCount(objv[1]);
-	Tcl_EvalObjv(srcPtr->interp, 2, objv, 0);
-	Tcl_DecrRefCount(objv[1]);
-	Tcl_DecrRefCount(objv[0]);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  UpdateToken --
- *
- *	Invoked when the event loop is idle to determine whether or not
- *	the current drag&drop token position is over another drag&drop
- *	target.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UpdateToken(ClientData clientData)	/* widget data */
-{
-    Source *srcPtr = clientData;
-    Token *tokenPtr = &srcPtr->token;
-
-    ChangeToken(tokenPtr, tokenPtr->active);
-    /*
-     *  If the source has a site command, then invoke it to
-     *  modify the appearance of the token window.  Pass any
-     *  errors onto the drag&drop error handler.
-     */
-    if (srcPtr->siteCmd) {
-	char buffer[200];
-	Tcl_DString dString;
-	int result;
-	SubstDescriptors subs[2];
-	
-	sprintf_s(buffer, 200, "%d", tokenPtr->active);
-	subs[0].letter = 's';
-	subs[0].value = buffer;
-	subs[1].letter = 't';
-	subs[1].value = Tk_PathName(tokenPtr->tkwin);
-	
-	Tcl_DStringInit(&dString);
-	result = Tcl_Eval(srcPtr->interp, 
-			  ExpandPercents(srcPtr->siteCmd, subs, 2, &dString));
-	Tcl_DStringFree(&dString);
-	if (result != TCL_OK) {
-	    Bgerror(srcPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  RejectToken --
- *
- *	Draws a rejection mark on the current drag&drop token, and arranges
- *	for the token to be unmapped after a small delay.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RejectToken(Token *tokenPtr)
-{
-    int divisor = 6;		/* controls size of rejection symbol */
-    int w, h, lineWidth, x, y, margin;
-
-    margin = 2 * tokenPtr->borderWidth;
-    w = Tk_Width(tokenPtr->tkwin) - 2 * margin;
-    h = Tk_Height(tokenPtr->tkwin) - 2 * margin;
-    lineWidth = (w < h) ? w / divisor : h / divisor;
-    lineWidth = (lineWidth < 1) ? 1 : lineWidth;
-
-    w = h = lineWidth * (divisor - 1);
-    x = (Tk_Width(tokenPtr->tkwin) - w) / 2;
-    y = (Tk_Height(tokenPtr->tkwin) - h) / 2;
-
-    /*
-     *  Draw the rejection symbol background (\) on the token window...
-     */
-    XSetLineAttributes(Tk_Display(tokenPtr->tkwin), tokenPtr->rejectBgGC,
-	lineWidth + 4, LineSolid, CapButt, JoinBevel);
-
-    XDrawArc(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->rejectBgGC, x, y, w, h, 0, 23040);
-
-    XDrawLine(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->rejectBgGC, x + lineWidth, y + lineWidth, x + w - lineWidth,
-	y + h - lineWidth);
-
-    /*
-     *  Draw the rejection symbol foreground (\) on the token window...
-     */
-    XSetLineAttributes(Tk_Display(tokenPtr->tkwin), tokenPtr->rejectFgGC,
-	lineWidth, LineSolid, CapButt, JoinBevel);
-
-    XDrawArc(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->rejectFgGC, x, y, w, h, 0, 23040);
-
-    XDrawLine(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->rejectFgGC, x + lineWidth, y + lineWidth, x + w - lineWidth,
-	y + h - lineWidth);
-
-    /*
-     *  Arrange for token window to disappear eventually.
-     */
-    tokenPtr->timer = Tcl_CreateTimerHandler(1000, (Tcl_TimerProc *) HideToken,
-	     tokenPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ConfigureToken --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureToken(
-    Tcl_Interp *interp,
-    Source *srcPtr,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Token *tokenPtr;
-
-    tokenPtr = &srcPtr->token;
-    if (Blt_ConfigureWidgetFromObj(interp, srcPtr->tkwin, tokenConfigSpecs, 
-	objc, objv, (char *)tokenPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return ConfigureSource(interp, srcPtr, 0, (Tcl_Obj **)NULL,
-	BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateToken --
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateToken(
-    Tcl_Interp *interp,
-    Source *srcPtr)
-{
-    XSetWindowAttributes attrs;
-    Tk_Window tkwin;
-    char string[200];
-    static int nextTokenId = 0;
-    unsigned int mask;
-    Token *tokenPtr = &srcPtr->token;
-
-    sprintf_s(string, 200, "dd-token%d", ++nextTokenId);
-
-    /* Create toplevel on parent's screen. */
-    tkwin = Tk_CreateWindow(interp, srcPtr->tkwin, string, "");
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    Tk_SetClass(tkwin, className);
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	TokenEventProc, tokenPtr);
-
-    attrs.override_redirect = True;
-    attrs.backing_store = WhenMapped;
-    attrs.save_under = True;
-    mask = CWOverrideRedirect | CWSaveUnder | CWBackingStore;
-    Tk_ChangeWindowAttributes(tkwin, mask, &attrs);
-
-    Tk_SetInternalBorder(tkwin, tokenPtr->borderWidth + 2);
-    tokenPtr->tkwin = tkwin;
-#ifdef WIN32
-    {
-	Tk_FakeWin *winPtr = (Tk_FakeWin *) tkwin;
-	winPtr->dummy18 = tokenPtr;
-    }
-#endif /* WIN32 */
-    Tk_MakeWindowExist(tkwin);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateSource --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Creates a new record if the widget name is not already
- *	registered.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static Source *
-CreateSource(
-    DragdropCmdInterpData *dataPtr,
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,		/* widget pathname for desired record */
-    int *newPtr)		/* returns non-zero => new record created */
-{
-    char *pathName;		/* widget pathname for desired record */
-    Blt_HashEntry *hPtr;
-    Tk_Window tkwin;
-    Source *srcPtr;
-
-    pathName = Tcl_GetString(objPtr);
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    hPtr = Blt_CreateHashEntry(&dataPtr->sourceTable, (char *)tkwin, newPtr);
-    if (!(*newPtr)) {
-	return Blt_GetHashValue(hPtr);
-    }
-    srcPtr = Blt_AssertCalloc(1, sizeof(Source));
-    srcPtr->tkwin = tkwin;
-    srcPtr->display = Tk_Display(tkwin);
-    srcPtr->interp = interp;
-    srcPtr->token.anchor = TK_ANCHOR_SE;
-    srcPtr->token.relief = TK_RELIEF_RAISED;
-    srcPtr->token.activeRelief = TK_RELIEF_SUNKEN;
-    srcPtr->token.borderWidth = srcPtr->token.activeBW = 3;
-    srcPtr->hashPtr = hPtr;
-    srcPtr->dataPtr = dataPtr;
-    Blt_InitHashTable(&srcPtr->handlerTable, BLT_STRING_KEYS);
-    if (ConfigureSource(interp, srcPtr, 0, (Tcl_Obj **)NULL, 0) != TCL_OK) {
-	DestroySource(srcPtr);
-	return NULL;
-    }
-    Blt_SetHashValue(hPtr, srcPtr);
-    /*
-     *  Arrange for the window to unregister itself when it
-     *  is destroyed.
-     */
-    Tk_CreateEventHandler(tkwin, StructureNotifyMask, SourceEventProc, srcPtr);
-    return srcPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DestroySource --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Destroys the record if found.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroySource(Source *srcPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    Tcl_CancelIdleCall(UpdateToken, srcPtr);
-    if (srcPtr->token.timer) {
-	Tcl_DeleteTimerHandler(srcPtr->token.timer);
-    }
-    Blt_FreeOptions(configSpecs, (char *)srcPtr, srcPtr->display, 0);
-
-    if (srcPtr->token.rejectFgGC != NULL) {
-	Tk_FreeGC(srcPtr->display, srcPtr->token.rejectFgGC);
-    }
-    if (srcPtr->token.rejectBgGC != NULL) {
-	Tk_FreeGC(srcPtr->display, srcPtr->token.rejectBgGC);
-    }
-    if (srcPtr->pkgCmdResult) {
-	Blt_Free(srcPtr->pkgCmdResult);
-    }
-    if (srcPtr->rootPtr != NULL) {
-	RemoveWindow(srcPtr->rootPtr);
-    }
-    if (srcPtr->cursor != None) {
-	Tk_FreeCursor(srcPtr->display, srcPtr->cursor);
-    }
-    if (srcPtr->token.cursor != None) {
-	Tk_FreeCursor(srcPtr->display, srcPtr->token.cursor);
-    }
-    Blt_Free(srcPtr->sendTypes);
-
-    for (hPtr = Blt_FirstHashEntry(&srcPtr->handlerTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	const char *cmd;
-
-	cmd = Blt_GetHashValue(hPtr);
-	if (cmd != NULL) {
-	    Blt_Free(cmd);
-	}
-    }
-    Blt_DeleteHashTable(&srcPtr->handlerTable);
-    if (srcPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&srcPtr->dataPtr->sourceTable, srcPtr->hashPtr);
-    }
-    Blt_Free(srcPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetSourceFromObj --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetSourceFromObj(
-    DragdropCmdInterpData *dataPtr,
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,		/* widget pathname for desired record */
-    Source **srcPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    Tk_Window tkwin;
-    char *pathName;
-
-    pathName = Tcl_GetString(objPtr);
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->sourceTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "window \"", pathName,
-	     "\" has not been initialized as a drag&drop source", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *srcPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-static char *
-ConcatArgs(int objc, Tcl_Obj *const *objv)
-{
-    char *string;
-
-    if (objc == 1) {
-	string = Blt_AssertStrdup(Tcl_GetString(objv[0]));
-    } else {
-	Tcl_DString dString;
-	int i;
-
-	Tcl_DStringInit(&dString);
-	for(i = 0; i < objc; i++) {
-	    Tcl_DStringAppendElement(&dString, Tcl_GetString(objv[i]));
-	}
-	string = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-    }
-    return string;
-} 
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ConfigureSource --
- *
- *	Called to process an (objc,objv) list to configure (or
- *	reconfigure) a drag&drop source widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureSource(
-    Tcl_Interp *interp,		/* current interpreter */
-    Source *srcPtr,		/* drag&drop source widget record */
-    int objc,			/* number of arguments */
-    Tcl_Obj *const *objv,	/* argument strings */
-    int flags)			/* flags controlling interpretation */
-{
-    unsigned long gcMask;
-    XGCValues gcValues;
-    GC newGC;
-    Tcl_DString dString;
-    Tcl_CmdInfo cmdInfo;
-    int result;
-
-    /*
-     *  Handle the bulk of the options...
-     */
-    if (Blt_ConfigureWidgetFromObj(interp, srcPtr->tkwin, configSpecs, 
-		objc, objv, (char *)srcPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     *  Check the button binding for valid range (0 or 1-5)
-     */
-    if ((srcPtr->button < 0) || (srcPtr->button > 5)) {
-	Tcl_AppendResult(interp, 
-		 "button number must be 1-5, or 0 for no bindings",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     *  Set up the rejection foreground GC for the token window...
-     */
-    gcValues.foreground = srcPtr->token.rejectFg->pixel;
-    gcValues.subwindow_mode = IncludeInferiors;
-    gcValues.graphics_exposures = False;
-    gcMask = GCForeground | GCSubwindowMode | GCGraphicsExposures;
-
-    if (srcPtr->token.rejectStipple != None) {
-	gcValues.stipple = srcPtr->token.rejectStipple;
-	gcValues.fill_style = FillStippled;
-	gcMask |= GCForeground | GCStipple | GCFillStyle;
-    }
-    newGC = Tk_GetGC(srcPtr->tkwin, gcMask, &gcValues);
-
-    if (srcPtr->token.rejectFgGC != NULL) {
-	Tk_FreeGC(srcPtr->display, srcPtr->token.rejectFgGC);
-    }
-    srcPtr->token.rejectFgGC = newGC;
-
-    /*
-     *  Set up the rejection background GC for the token window...
-     */
-    gcValues.foreground = srcPtr->token.rejectBg->pixel;
-    gcValues.subwindow_mode = IncludeInferiors;
-    gcValues.graphics_exposures = False;
-    gcMask = GCForeground | GCSubwindowMode | GCGraphicsExposures;
-
-    newGC = Tk_GetGC(srcPtr->tkwin, gcMask, &gcValues);
-
-    if (srcPtr->token.rejectBgGC != NULL) {
-	Tk_FreeGC(srcPtr->display, srcPtr->token.rejectBgGC);
-    }
-    srcPtr->token.rejectBgGC = newGC;
-
-    /*
-     *  Reset the border width in case it has changed...
-     */
-    if (srcPtr->token.tkwin) {
-	Tk_SetInternalBorder(srcPtr->token.tkwin,
-	    srcPtr->token.borderWidth + 2);
-    }
-    if (!Tcl_GetCommandInfo(interp, "::blt::Drag&DropInit", &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library dragdrop.tcl]";
-
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    Tcl_AddErrorInfo(interp,
-		    "\n    (while loading bindings for blt::drag&drop)");
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_DStringInit(&dString);
-    Blt_DStringAppendElements(&dString, "::blt::Drag&DropInit",
-      Tk_PathName(srcPtr->tkwin), Blt_Itoa(srcPtr->button), (char *)NULL);
-    result = Tcl_Eval(interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SourceEventProc --
- *
- *	Invoked by Tk_HandleEvent whenever a DestroyNotify event is received
- *	on a registered drag&drop source widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SourceEventProc(
-    ClientData clientData,	/* drag&drop registration list */
-    XEvent *eventPtr)		/* event description */
-{
-    Source *srcPtr = (Source *) clientData;
-
-    if (eventPtr->type == DestroyNotify) {
-	DestroySource(srcPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  FindTarget --
- *
- *	Looks for a Target record in the hash table for drag&drop
- *	target widgets.  Creates a new record if the widget name is
- *	not already registered.  Returns a pointer to the desired
- *	record.
- *
- *---------------------------------------------------------------------------
- */
-static Target *
-FindTarget(
-    DragdropCmdInterpData *dataPtr,
-    Tk_Window tkwin)		/* Widget pathname for desired record */
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&dataPtr->targetTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateTarget --
- *
- *	Looks for a Target record in the hash table for drag&drop
- *	target widgets.  Creates a new record if the widget name is
- *	not already registered.  Returns a pointer to the desired
- *	record.
- *
- *---------------------------------------------------------------------------
- */
-static Target *
-CreateTarget(
-    DragdropCmdInterpData *dataPtr,
-    Tcl_Interp *interp,
-    Tk_Window tkwin)		/* Widget pathname for desired record */
-{
-    Target *targetPtr;
-    int isNew;
-
-    targetPtr = Blt_AssertCalloc(1, sizeof(Target));
-    targetPtr->display = Tk_Display(tkwin);
-    targetPtr->tkwin = tkwin;
-    targetPtr->dataPtr = dataPtr;
-    Blt_InitHashTable(&targetPtr->handlerTable, BLT_STRING_KEYS);
-    targetPtr->hashPtr = Blt_CreateHashEntry(&dataPtr->targetTable, 
-	(char *)tkwin, &isNew);
-    Blt_SetHashValue(targetPtr->hashPtr, targetPtr);
-
-    /* 
-     * Arrange for the target to removed if the host window is destroyed.  
-     */
-    Tk_CreateEventHandler(tkwin, StructureNotifyMask, TargetEventProc,
-	  targetPtr);
-    /*
-     *  If this is a new target, attach a property to identify
-     *  window as "drag&drop" target, and arrange for the window
-     *  to un-register itself when it is destroyed.
-     */
-    Tk_MakeWindowExist(targetPtr->tkwin);
-    AddTargetProperty(interp, targetPtr);
-    return targetPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DestroyTarget --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTarget(DestroyData data)
-{
-    Target *targetPtr = (Target *)data;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(&targetPtr->handlerTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	char *cmd;
-
-	cmd = Blt_GetHashValue(hPtr);
-	if (cmd != NULL) {
-	    Blt_Free(cmd);
-	}
-    }
-    Blt_DeleteHashTable(&targetPtr->handlerTable);
-    if (targetPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&targetPtr->dataPtr->targetTable, 
-		targetPtr->hashPtr);
-    }
-    Tk_DeleteEventHandler(targetPtr->tkwin, StructureNotifyMask,
-	  TargetEventProc, targetPtr);
-    Blt_Free(targetPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TargetEventProc --
- *
- *  Invoked by Tk_HandleEvent whenever a DestroyNotify event is received
- *  on a registered drag&drop target widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TargetEventProc(
-    ClientData clientData,	/* drag&drop registration list */
-    XEvent *eventPtr)		/* event description */
-{
-    Target *targetPtr = (Target *) clientData;
-
-    if (eventPtr->type == DestroyNotify) {
-#ifdef	WIN32
-	/*
-	 * Under Win32 the properties must be removed before the window
-	 * can be destroyed.
-	 */
-	RemoveProperty(targetPtr->tkwin);
-#endif
-	DestroyTarget((DestroyData)targetPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DndSend --
- *
- *	Invoked after a drop operation to send data to the drop
- *	application.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DndSend(Source *srcPtr)		/* drag&drop source record */
-{
-    int status;
-    SubstDescriptors subs[3];
-    Tcl_DString dString;
-    Blt_HashEntry *hPtr;
-    const char *dataType;
-    const char **targv;
-    char *cmd;
-
-    /* See if current position is over drop point.  */
-    if (!OverTarget(srcPtr, srcPtr->token.lastX, srcPtr->token.lastY)) {
-	return;
-    }
-    targv = srcPtr->windowPtr->targetInfo;
-    Tcl_DStringInit(&dString);
-    Blt_DStringAppendElements(&dString, "send", targv[INTERP_NAME],
-	dragDropCmd, "location", (char *)NULL);
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(srcPtr->token.lastX));
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(srcPtr->token.lastY));
-    status = Tcl_Eval(srcPtr->interp, Tcl_DStringValue(&dString));
-
-    Tcl_DStringFree(&dString);
-    if (status != TCL_OK) {
-	goto reject;
-    }
-    if (targv[DATA_TYPE] == NULL) {
-	Blt_HashSearch cursor;
-
-	hPtr = Blt_FirstHashEntry(&srcPtr->handlerTable, &cursor);
-	dataType = Blt_GetHashKey(&srcPtr->handlerTable, hPtr);
-    } else {
-	hPtr = Blt_FindHashEntry(&srcPtr->handlerTable, targv[DATA_TYPE]);
-	dataType = targv[DATA_TYPE];
-    }
-    /* Start building the command line here, before we invoke any Tcl
-     * commands. The is because the TCL command may let in another
-     * drag event and change the target property data. */
-    Tcl_DStringInit(&dString);
-    Blt_DStringAppendElements(&dString, "send", targv[INTERP_NAME],
-	dragDropCmd, "target", targv[TARGET_NAME], "handle", dataType, 
-	(char *)NULL);
-    cmd = NULL;
-    if (hPtr != NULL) {
-	cmd = Blt_GetHashValue(hPtr);
-    }
-    if (cmd != NULL) {
-	Tcl_DString cmdString;
-
-	subs[0].letter = 'i';
-	subs[0].value = targv[INTERP_NAME];
-	subs[1].letter = 'w';
-	subs[1].value = targv[TARGET_NAME];
-	subs[2].letter = 'v';
-	subs[2].value = srcPtr->pkgCmdResult;
-	
-	Tcl_DStringInit(&cmdString);
-	status = Tcl_Eval(srcPtr->interp, 
-		ExpandPercents(cmd, subs, 3, &cmdString));
-	Tcl_DStringFree(&cmdString);
-        if (status != TCL_OK) {
-	    goto reject;
-        }
-	Tcl_DStringAppendElement(&dString, Tcl_GetStringResult(srcPtr->interp));
-    } else {
-	Tcl_DStringAppendElement(&dString, srcPtr->pkgCmdResult);
-    }
-
-    /*
-     *  Part 2:	Now tell target application to handle the data.
-     */
-    status = Tcl_Eval(srcPtr->interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    if (status != TCL_OK) {
-	goto reject;
-    }
-    HideToken(&srcPtr->token);
-    return;
-  reject:
-    /*
-     * Give failure information to user.  If an error occurred and an
-     * error proc is defined, then use it to handle the error.
-     */
-    RejectToken(&srcPtr->token);
-    Bgerror(srcPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  InitRoot --
- *
- *	Invoked at the start of a "drag" operation to capture the
- *	positions of all windows on the current root.  Queries the
- *	entire window hierarchy and determines the placement of each
- *	window.  Queries the "BltDrag&DropTarget" property info where
- *	appropriate.  This information is used during the drag
- *	operation to determine when the drag&drop token is over a
- *	valid drag&drop target.
- *
- *  Results:
- *	Returns the record for the root window, which contains records
- *	for all other windows as children.
- *
- *---------------------------------------------------------------------------
- */
-static void
-InitRoot(Source *srcPtr)
-{
-    srcPtr->rootPtr = Blt_AssertCalloc(1, sizeof(AnyWindow));
-#ifdef WIN32
-    srcPtr->rootPtr->nativeWindow = GetDesktopWindow();
-#else
-    srcPtr->rootPtr->nativeWindow = DefaultRootWindow(srcPtr->display);
-#endif
-    srcPtr->windowPtr = NULL;
-    QueryWindow(srcPtr->display, srcPtr->rootPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  FindTopWindow --
- *
- *	Searches for the topmost window at a given pair of X-Y coordinates.
- *
- *  Results:
- *	Returns a pointer to the node representing the window containing
- *	the point.  If one can't be found, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static AnyWindow *
-FindTopWindow(
-    Source *srcPtr,
-    int x, int y)
-{
-    AnyWindow *rootPtr;
-    Blt_ChainLink link;
-    AnyWindow *windowPtr;
-    WINDOW nativeTokenWindow;
-
-    rootPtr = srcPtr->rootPtr;
-    if (!rootPtr->initialized) {
-	QueryWindow(srcPtr->display, rootPtr);
-    }
-    if ((x < rootPtr->x1) || (x > rootPtr->x2) ||
-	(y < rootPtr->y1) || (y > rootPtr->y2)) {
-	return NULL;		/* Point is not over window  */
-    }
-    windowPtr = rootPtr;
-
-    nativeTokenWindow = (WINDOW)Blt_GetWindowId(srcPtr->token.tkwin);
-    /*
-     * The window list is ordered top to bottom, so stop when we find
-     * the first child that contains the X-Y coordinate. It will be
-     * the topmost window in that hierarchy.  If none exists, then we
-     * already have the topmost window.
-     */
-  descend:
-    for (link = Blt_Chain_FirstLink(rootPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	rootPtr = Blt_Chain_GetValue(link);
-	if (!rootPtr->initialized) {
-	    QueryWindow(srcPtr->display, rootPtr);
-	}
-	if (rootPtr->nativeWindow == nativeTokenWindow) {
-	    continue;		/* Don't examine the token window. */
-	}
-	if ((x >= rootPtr->x1) && (x <= rootPtr->x2) &&
-	    (y >= rootPtr->y1) && (y <= rootPtr->y2)) {
-	    /*
-	     * Remember the last window containing the pointer and
-	     * descend into its window hierarchy. We'll look for a
-	     * child that also contains the pointer.
-	     */
-	    windowPtr = rootPtr;
-	    goto descend;
-	}
-    }
-    return windowPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  OverTarget --
- *
- *      Checks to see if a compatible drag&drop target exists at the
- *      given position.  A target is "compatible" if it is a drag&drop
- *      window, and if it has a handler that is compatible with the
- *      current source window.
- *
- *  Results:
- *	Returns a pointer to a structure describing the target, or NULL
- *	if no compatible target is found.
- *
- *---------------------------------------------------------------------------
- */
-static int
-OverTarget(
-    Source *srcPtr,		/* drag&drop source window */
-    int x, int y)		/* current drag&drop location
-				 * (in virtual coords) */
-{
-    int virtX, virtY;
-    int dummy;
-    AnyWindow *newPtr, *oldPtr;
-    const char **argv;
-    int argc;
-    const unsigned char *data;
-    int result;
-
-    /*
-     * If no window info has been been gathered yet for this target,
-     * then abort this call.  This probably means that the token is
-     * moved before it has been properly built.
-     */
-    if (srcPtr->rootPtr == NULL) {
-	return FALSE;
-    }
-    if (srcPtr->sendTypes == NULL) {
-	return FALSE;		/* Send is turned off. */
-    }
-
-    /* Adjust current location for virtual root windows.  */
-    Tk_GetVRootGeometry(srcPtr->tkwin, &virtX, &virtY, &dummy, &dummy);
-    x += virtX;
-    y += virtY;
-
-    oldPtr = srcPtr->windowPtr;
-    srcPtr->windowPtr = NULL;
-
-    newPtr = FindTopWindow(srcPtr, x, y);
-    if (newPtr == NULL) {
-	return FALSE;		/* Not over a window. */
-    }
-    if ((!srcPtr->selfTarget) &&
-	(GetNativeWindow(srcPtr->tkwin) == newPtr->nativeWindow)) {
-	return FALSE;		/* If the self-target flag isn't set,
-				 *  don't allow the source window to
-				 *  drop onto itself.  */
-    }
-    if (newPtr == oldPtr) {
-	srcPtr->windowPtr = oldPtr;
-	/* No need to collect the target information if we're still
-	 * over the same window. */
-	return (newPtr->targetInfo != NULL);
-    }
-
-    /* See if this window has a "BltDrag&DropTarget" property. */
-    data = GetProperty(srcPtr->display, newPtr->nativeWindow);
-    if (data == NULL) {
-	return FALSE;		/* No such property on window. */
-    }
-    result = Tcl_SplitList(srcPtr->interp, (char *)data, &argc, &argv);
-    XFree((char *)data);
-    if (result != TCL_OK) {
-	return FALSE;		/* Malformed property list. */
-    }
-    srcPtr->windowPtr = newPtr;
-    /* Interpreter name, target name, type1, type2, ... */
-    if (argc > 2) {
-	const char **s;
-	int count;
-	int i;
-
-	/*
-	 * The candidate target has a list of possible types.
-	 * Compare this with what types the source is willing to
-	 * transmit and compress the list down to just the matching
-	 * types.  It's up to the target to request the specific type
-	 * it wants.
-	 */
-	count = 2;
-	for (i = 2; i < argc; i++) {
-	    for (s = srcPtr->sendTypes; *s != NULL; s++) {
-		if (((**s == 'a') && (strcmp(*s, "all") == 0)) ||
-		    ((**s == argv[i][0]) && (strcmp(*s, argv[i]) == 0))) {
-		    argv[count++] = argv[i];
-		}
-	    }
-	}
-	if (count == 2) {
-	    Blt_Free(argv);
-	    fprintf(stderr, "source/target mismatch: No matching types\n");
-	    return FALSE;	/* No matching data type. */
-	}
-	argv[count] = NULL;
-    }
-    newPtr->targetInfo = argv;
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  RemoveWindow --
- *
- *---------------------------------------------------------------------------
- */
-static void
-RemoveWindow(AnyWindow *windowPtr) /* window rep to be freed */
-{
-    AnyWindow *childPtr;
-    Blt_ChainLink link;
-
-    /* Throw away leftover slots. */
-    for (link = Blt_Chain_FirstLink(windowPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	childPtr = Blt_Chain_GetValue(link);
-	RemoveWindow(childPtr);
-    }
-    Blt_Chain_Destroy(windowPtr->chain);
-    if (windowPtr->targetInfo != NULL) {
-	Blt_Free(windowPtr->targetInfo);
-    }
-    Blt_Free(windowPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  QueryWindow --
- *
- *	Invoked during "drag" operations. Digs into the root window
- *	hierarchy and caches the resulting information.
- *	If a point coordinate lies within an uninitialized AnyWindow,
- *	this routine is called to query window coordinates and
- *	drag&drop info.  If this particular window has any children,
- *	more uninitialized AnyWindow structures are allocated.
- *	Further queries will cause these structures to be initialized
- *	in turn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QueryWindow(
-    Display *display,
-    AnyWindow *winPtr)		/* window rep to be initialized */
-{
-    int visible;
-
-    if (winPtr->initialized) {
-	return;
-    }
-    /*
-     *  Query for the window coordinates.
-     */
-    visible = GetWindowRegion(display, winPtr->nativeWindow, 
-	&winPtr->x1, &winPtr->y1, &winPtr->x2, &winPtr->y2);
-    if (visible) {
-	Blt_ChainLink link;
-	Blt_Chain chain;
-	AnyWindow *childPtr;
-
-#ifndef WIN32
-	/* Add offset from parent's origin to coordinates */
-	if (winPtr->parentPtr != NULL) {
-	    winPtr->x1 += winPtr->parentPtr->x1;
-	    winPtr->y1 += winPtr->parentPtr->y1;
-	    winPtr->x2 += winPtr->parentPtr->x1;
-	    winPtr->y2 += winPtr->parentPtr->y1;
-	}
-#endif
-	/*
-	 * Collect a list of child windows, sorted in z-order.  The
-	 * topmost window will be first in the list.
-	 */
-	chain = GetWindowZOrder(display, winPtr->nativeWindow);
-
-	/* Add and initialize extra slots if needed. */
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    childPtr = Blt_AssertCalloc(1, sizeof(AnyWindow));
-	    childPtr->initialized = FALSE;
-	    childPtr->nativeWindow = (WINDOW)Blt_Chain_GetValue(link);
-	    childPtr->parentPtr = winPtr;
-	    Blt_Chain_SetValue(link, childPtr);
-	}
-	winPtr->chain = chain;
-    } else {
-	/* If it's not viewable don't bother doing anything else. */
-	winPtr->x1 = winPtr->y1 = winPtr->x2 = winPtr->y2 = -1;
-	winPtr->chain = NULL;
-    }
-    winPtr->initialized = TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  AddTargetProperty --
- *
- *	Attaches a drag&drop property to the given target window.
- *	This property allows us to recognize the window later as a
- *	valid target. It also stores important information including
- *	the interpreter managing the target and the pathname of the
- *	target window.  Usually this routine is called when the target
- *	is first registered or first exposed (so that the X-window
- *	really exists).
- *
- *---------------------------------------------------------------------------
- */
-static void
-AddTargetProperty(
-    Tcl_Interp *interp,
-    Target *targetPtr)		/* drag&drop target window data */
-{
-    Tcl_DString dString;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    if (targetPtr->tkwin == NULL) {
-	return;
-    }
-    Tcl_DStringInit(&dString);
-    /*
-     * Each target window's dnd property contains
-     *
-     *	1. name of the application (ie. the interpreter's name).
-     *	2. Tk path name of the target window.
-     *  3. List of all the data types that can be handled. If none
-     *     are listed, then all can be handled.
-     */
-    Tcl_DStringAppendElement(&dString, Tk_Name(Tk_MainWindow(interp)));
-    Tcl_DStringAppendElement(&dString, Tk_PathName(targetPtr->tkwin));
-    for (hPtr = Blt_FirstHashEntry(&targetPtr->handlerTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Tcl_DStringAppendElement(&dString,
-	    Blt_GetHashKey(&targetPtr->handlerTable, hPtr));
-    }
-    SetProperty(targetPtr->tkwin, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ExpandPercents --
- *
- *	Expands all percent substitutions found in the input "str"
- *	that match specifications in the "subs" list.  Any percent
- *	field that is not found in the "subs" list is left alone.
- *	Returns a string that remains valid until the next call to
- *	this routine.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-ExpandPercents(
-    const char *string,		/* Incoming command string */
-    SubstDescriptors *subsArr,	/* Array of known substitutions */
-    int nSubs,			/* Number of elements in subs array */
-    Tcl_DString *resultPtr)
-{
-    const char *chunk, *p;
-    char letter;
-    int i;
-
-    /*
-     *  Scan through the copy of the input string, look for
-     *  the next '%' character, and try to make the substitution.
-     *  Continue doing this to the end of the string.
-     */
-    chunk = p = string;
-    while ((p = strchr(p, '%')) != NULL) {
-
-	/* Copy up to the percent sign.  Repair the string afterwards */
-	Tcl_DStringAppend(resultPtr, chunk, p - chunk);
-
-	/* Search for a matching substitution rule */
-	letter = *(p + 1);
-	for (i = 0; i < nSubs; i++) {
-	    if (subsArr[i].letter == letter) {
-		break;
-	    }
-	}
-	if (i < nSubs) {
-	    /* Make the substitution */
-	    Tcl_DStringAppend(resultPtr, subsArr[i].value, -1);
-	} else {
-	    /* Copy in the %letter verbatim */
-	    char verbatim[3];
-
-	    verbatim[0] = '%';
-	    verbatim[1] = letter;
-	    verbatim[2] = '\0';
-	    Tcl_DStringAppend(resultPtr, verbatim, -1);
-	}
-	p += 2;			/* Skip % + letter */
-	if (letter == '\0') {
-	    p += 1;		/* Premature % substitution (end of string) */
-	}
-	chunk = p;
-    }
-    /* Pick up last chunk if a substition wasn't the last thing in the string */
-    if (*chunk != '\0') {
-	Tcl_DStringAppend(resultPtr, chunk, -1);
-    }
-    return Tcl_DStringValue(resultPtr);
-}
-
-
-/*ARGSUSED*/
-static int
-DragOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    int x, y;
-    Token *tokenPtr;
-    int status;
-    Source *srcPtr;
-    SubstDescriptors subst[2];
-    int active;
-    const char *result;
-
-    /*
-     *  HANDLE:  drag&drop drag <path> <x> <y>
-     */
-    if ((GetSourceFromObj(dataPtr, interp, objv[2], &srcPtr) != TCL_OK) || 
-	(Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    tokenPtr = &srcPtr->token;
-
-    tokenPtr->lastX = dataPtr->locX = x;	/* Save drag&drop location */
-    tokenPtr->lastY = dataPtr->locY = y;
-
-    /* If HideToken() is pending, then do it now!  */
-    if (tokenPtr->timer != 0) {
-	Tcl_DeleteTimerHandler(tokenPtr->timer);
-	HideToken(tokenPtr);
-    }
-
-    /*
-     *  If pkgCmd is in progress, then ignore subsequent calls
-     *  until it completes.  Only perform drag if pkgCmd
-     *  completed successfully and token window is mapped.
-     */
-    if ((!Tk_IsMapped(tokenPtr->tkwin)) && (!srcPtr->pkgCmdInProgress)) {
-	Tcl_DString dString;
-
-	/*
-	 *  No list of send handlers?  Then source is disabled.
-	 *  Abort drag quietly.
-	 */
-	if (srcPtr->sendTypes == NULL) {
-	    return TCL_OK;
-	}
-	/*
-	 *  No token command?  Then cannot build token.
-	 *  Signal error.
-	 */
-	if (srcPtr->pkgCmd == NULL) {
-	    Tcl_AppendResult(interp, "missing -packagecmd: ", objv[2],
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	/*
-	 *  Execute token command to initialize token window.
-	 */
-	srcPtr->pkgCmdInProgress = TRUE;
-	subst[0].letter = 'W';
-	subst[0].value = Tk_PathName(srcPtr->tkwin);
-	subst[1].letter = 't';
-	subst[1].value = Tk_PathName(tokenPtr->tkwin);
-
-	Tcl_DStringInit(&dString);
-	status = Tcl_Eval(srcPtr->interp,
-	    ExpandPercents(srcPtr->pkgCmd, subst, 2, &dString));
-	Tcl_DStringFree(&dString);
-
-	srcPtr->pkgCmdInProgress = FALSE;
-
-	result = Tcl_GetStringResult(interp);
-	/*
-	 *  Null string from the package command?
-	 *  Then quietly abort the drag&drop operation.
-	 */
-	if (result[0] == '\0') {
-	    return TCL_OK;
-	}
-
-	/* Save result of token command for send command.  */
-	if (srcPtr->pkgCmdResult != NULL) {
-	    Blt_Free(srcPtr->pkgCmdResult);
-	}
-	srcPtr->pkgCmdResult = Blt_AssertStrdup(result);
-	if (status != TCL_OK) {
-	    /*
-	     * Token building failed.  If an error handler is defined,
-	     * then signal the error.  Otherwise, abort quietly.
-	     */
-	    Bgerror(srcPtr);
-	    return TCL_OK;
-	}
-	/* Install token cursor.  */
-	if (tokenPtr->cursor != None) {
-	    Tk_Cursor cursor;
-
-	    /* Save the old cursor */
-	    cursor = GetWidgetCursor(srcPtr->interp, srcPtr->tkwin);
-	    if (srcPtr->cursor != None) {
-		Tk_FreeCursor(srcPtr->display, srcPtr->cursor);
-	    }
-	    srcPtr->cursor = cursor;
-	    /* Temporarily install the token cursor */
-	    Tk_DefineCursor(srcPtr->tkwin, tokenPtr->cursor);
-	}
-	/*
-	 *  Get ready to drag token window...
-	 *  1) Cache info for all windows on root
-	 *  2) Map token window to begin drag operation
-	 */
-	if (srcPtr->rootPtr != NULL) {
-	    RemoveWindow(srcPtr->rootPtr);
-	}
-	InitRoot(srcPtr);
-
-	dataPtr->nActive++;		/* One more drag&drop window active */
-
-	if (Tk_WindowId(tokenPtr->tkwin) == None) {
-	    Tk_MakeWindowExist(tokenPtr->tkwin);
-	}
-	if (!Tk_IsMapped(tokenPtr->tkwin)) {
-	    Tk_MapWindow(tokenPtr->tkwin);
-	}
-	RaiseToken(tokenPtr);
-    }
-
-    /* Arrange to update status of token window.  */
-    Tcl_CancelIdleCall(UpdateToken, srcPtr);
-
-    active = OverTarget(srcPtr, x, y);
-    if (tokenPtr->active != active) {
-	tokenPtr->active = active;
-	Tcl_DoWhenIdle(UpdateToken, srcPtr);
-    }
-    MoveToken(srcPtr, tokenPtr); /* Move token window to current drag point. */
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop drop <path> <x> <y>
- */
-/*ARGSUSED*/
-static int
-DropOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    Source *srcPtr;
-    Token *tokenPtr;
-    int x, y;
-
-    if ((GetSourceFromObj(dataPtr, interp, objv[2], &srcPtr) != TCL_OK)  ||
-	(Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    tokenPtr = &srcPtr->token;
-    tokenPtr->lastX = dataPtr->locX = x; /* Save drag&drop location */
-    tokenPtr->lastY = dataPtr->locY = y;
-    
-    /* Put the cursor back to its usual state.  */
-    if (srcPtr->cursor == None) {
-	Tk_UndefineCursor(srcPtr->tkwin);
-    } else {
-	Tk_DefineCursor(srcPtr->tkwin, srcPtr->cursor);
-    }
-    Tcl_CancelIdleCall(UpdateToken, srcPtr);
-
-    /*
-     *  Make sure that token window was not dropped before it
-     *  was either mapped or packed with info.
-     */
-    if ((Tk_IsMapped(tokenPtr->tkwin)) && (!srcPtr->pkgCmdInProgress)) {
-	int active;
-
-	active = OverTarget(srcPtr, tokenPtr->lastX, tokenPtr->lastY);
-	if (tokenPtr->active != active) {
-	    tokenPtr->active = active;
-	    UpdateToken(srcPtr);
-	}
-	if (srcPtr->sendTypes != NULL) {
-	    if (tokenPtr->active) {
-		DndSend(srcPtr);
-	    } else {
-		HideToken(tokenPtr);
-	    }
-	}
-	dataPtr->nActive--;		/* One less active token window. */
-    }
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop active
- */
-/*ARGSUSED*/
-static int
-ActiveOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (dataPtr->nActive > 0));
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop location ?<x> <y>?
- */
-static int
-LocationOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    Tcl_Obj *listObjPtr;
-
-    if ((objc != 2) && (objc != 4)) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " location ?x y?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	int x, y;
-
-	if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	    (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	dataPtr->locX = x;
-	dataPtr->locY = y;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(dataPtr->locX));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(dataPtr->locY));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop token <pathName>
- */
-static int
-TokenOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    Source *srcPtr;
-
-    if (GetSourceFromObj(dataPtr, interp, objv[2], &srcPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc > 3) && 
-	(ConfigureToken(interp, srcPtr, objc - 3, objv + 3) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-	Tk_PathName(srcPtr->token.tkwin), -1);
-    return TCL_OK;
-}
-
-static int
-HandlerOpOp(Source *srcPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    const char *cmd;
-    int isNew;
-
-    /*
-     *  HANDLE:  drag&drop source <pathName> handler \
-     *             ?<data>? ?<scmd>...?
-     */
-    if (objc == 4) {
-	/* Show source handler data types */
-	for (hPtr = Blt_FirstHashEntry(&srcPtr->handlerTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Tcl_AppendElement(interp,
-		Blt_GetHashKey(&srcPtr->handlerTable, hPtr));
-	}
-	return TCL_OK;
-    }
-    hPtr = Blt_CreateHashEntry(&srcPtr->handlerTable, Tcl_GetString(objv[4]),
-	&isNew);
-
-    /*
-     *  HANDLE:  drag&drop source <pathName> handler <data>
-     *
-     *    Create the new <data> type if it doesn't already
-     *    exist, and return the code associated with it.
-     */
-    if (objc == 5) {
-	cmd = Blt_GetHashValue(hPtr);
-	if (cmd == NULL) {
-	    cmd = "";
-	}
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), cmd, -1);
-	return TCL_OK;
-    }
-    /*
-     *  HANDLE:  drag&drop source <pathName> handler \
-     *               <data> <cmd> ?<arg>...?
-     *
-     *    Create the new <data> type and set its command
-     */
-    cmd = ConcatArgs(objc - 5, objv + 5);
-    Blt_SetHashValue(hPtr, cmd);
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop source
- *           drag&drop source <pathName> ?options...?
- *           drag&drop source <pathName> handler ?<data>? ?<scmd> <arg>...?
- */
-static int
-SourceOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    Source *srcPtr;
-    int isNew;
-    Token *tokenPtr;
-
-    if (objc == 2) {
-	Blt_HashSearch cursor;
-	Blt_HashEntry *hPtr;
-	Tk_Window tkwin;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->sourceTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    tkwin = (Tk_Window)Blt_GetHashKey(&dataPtr->sourceTable, hPtr);
-	    Tcl_AppendElement(interp, Tk_PathName(tkwin));
-	}
-	return TCL_OK;
-    }
-    /*
-     *  Find or create source info...
-     */
-    srcPtr = CreateSource(dataPtr, interp, objv[2], &isNew);
-    if (srcPtr == NULL) {
-	return TCL_ERROR;
-    }
-    tokenPtr = &srcPtr->token;
-    if (objc > 3) {
-	char c;
-	int length;
-	int status;
-	char *string;
-
-	/*
-	 *  HANDLE:  drag&drop source <pathName> ?options...?
-	 */
-	string = Tcl_GetStringFromObj(objv[3], &length);
-	c = string[0];
-
-	if (c == '-') {
-	    if (objc == 3) {
-		status = Blt_ConfigureInfoFromObj(interp, tokenPtr->tkwin, 
-			configSpecs, (char *)srcPtr, (Tcl_Obj *)NULL, 0);
-	    } else if (objc == 4) {
-		status = Blt_ConfigureInfoFromObj(interp, tokenPtr->tkwin, 
-			configSpecs, (char *)srcPtr, objv[3], 0);
-	    } else {
-		status = ConfigureSource(interp, srcPtr, objc - 3, objv + 3,
-		    BLT_CONFIG_OBJV_ONLY);
-	    }
-	    if (status != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	} else if ((c == 'h') && strncmp(string, "handler", length) == 0) {
-	    return HandlerOpOp(srcPtr, interp, objc, objv);
-	} else {
-	    Tcl_AppendResult(interp, "bad operation \"", string,
-		"\": must be \"handler\" or a configuration option",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (isNew) {
-	/*
-	 *  Create the window for the drag&drop token...
-	 */
-	if (CreateToken(interp, srcPtr) != TCL_OK) {
-	    DestroySource(srcPtr);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *  HANDLE:  drag&drop target ?<pathName>? ?handling info...?
- */
-static int
-TargetOp(
-    ClientData clientData, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    DragdropCmdInterpData *dataPtr = clientData;
-    SubstDescriptors subst[2];
-    Tk_Window tkwin;
-    Blt_HashEntry *hPtr;
-    Target *targetPtr;
-    int isNew;
-    char *string;
-
-    if (objc == 2) {
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->targetTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    tkwin = (Tk_Window)Blt_GetHashKey(&dataPtr->targetTable, hPtr);
-	    Tcl_AppendElement(interp, Tk_PathName(tkwin));
-	}
-	return TCL_OK;
-    }
-    string = Tcl_GetString(objv[2]);
-    tkwin = Tk_NameToWindow(interp, string, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    targetPtr = FindTarget(dataPtr, tkwin);
-    if (targetPtr == NULL) {
-	targetPtr = CreateTarget(dataPtr, interp, tkwin);
-    }
-    if (targetPtr == NULL) {
-	return TCL_ERROR;
-    }
-
-    if (objc >= 4) {
-	string = Tcl_GetString(objv[3]);
-	if (strcmp(string, "handler") == 0) {
-	    /*
-	     *  HANDLE: drag&drop target <pathName> handler drag&drop
-	     *  target <pathName> handler ?<data> <cmd> <arg>...?
-	     */
-	    
-	    if (objc == 4) {
-		Blt_HashSearch cursor;
-		
-		for (hPtr =Blt_FirstHashEntry(&targetPtr->handlerTable,&cursor);
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-		    Tcl_AppendElement(interp,
-			Blt_GetHashKey(&targetPtr->handlerTable, hPtr));
-		}
-		return TCL_OK;
-	    } else if (objc >= 6) {
-		char *cmd;
-		
-		/*
-		 *  Process handler definition
-		 */
-		hPtr = Blt_CreateHashEntry(&targetPtr->handlerTable, 
-			Tcl_GetString(objv[4]), &isNew);
-		cmd = ConcatArgs(objc - 5, objv + 5);
-		if (hPtr != NULL) {
-		    const char *oldCmd;
-		    
-		    oldCmd = Blt_GetHashValue(hPtr);
-		    if (oldCmd != NULL) {
-			Blt_Free(oldCmd);
-		    }
-		}
-		Blt_SetHashValue(hPtr, cmd);
-		/*
-		 * Update the target property on the window.
-		 */
-		AddTargetProperty(interp, targetPtr);
-		return TCL_OK;
-	    }
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-			     Tcl_GetString(objv[0]), " ", 
-			     Tcl_GetString(objv[1]), " ", 
-			     Tcl_GetString(objv[2]), " ", 
-			     Tcl_GetString(objv[3]), " data command ?arg arg...?", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	} else if (strcmp(string, "handle") == 0) {
-	    /*
-	     *  HANDLE:  drag&drop target <pathName> handle <data> ?<value>?
-	     */
-	    Tcl_DString dString;
-	    int result;
-	    char *cmd;
-	    
-	    if (objc < 5 || objc > 6) {
-		Tcl_AppendResult(interp, "wrong # args: should be \"",
-			Tcl_GetString(objv[0]), " ", 
-			Tcl_GetString(objv[1]), " ", 
-			Tcl_GetString(objv[2]), " handle data ?value?",
-			(char *)NULL);
-		return TCL_ERROR;
-	    }
-	    hPtr = Blt_FindHashEntry(&targetPtr->handlerTable, 
-		Tcl_GetString(objv[4]));
-	    if (hPtr == NULL) {
-		Tcl_AppendResult(interp, "target can't handle datatype: ",
-				 Tcl_GetString(objv[4]), (char *)NULL);
-		return TCL_ERROR;	/* no handler found */
-	    }
-	    cmd = Blt_GetHashValue(hPtr);
-	    if (cmd != NULL) {
-		subst[0].letter = 'W';
-		subst[0].value = Tk_PathName(targetPtr->tkwin);
-		subst[1].letter = 'v';
-		if (objc > 5) {
-		    subst[1].value = Tcl_GetString(objv[5]);
-		} else {
-		    subst[1].value = "";
-		}
-		Tcl_DStringInit(&dString);
-		result = Tcl_Eval(interp, 
-			  ExpandPercents(cmd, subst, 2, &dString));
-		Tcl_DStringFree(&dString);
-		return result;
-	    }
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "usage: ", Tcl_GetString(objv[0]), " target ", 
-	Tcl_GetString(objv[2]), " handler ?data command arg arg...?\n   or: ",
-	Tcl_GetString(objv[0]), " target ", 
-	Tcl_GetString(objv[2]), " handle <data>", (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DragDropCmd --
- *
- *  Invoked by TCL whenever the user issues a drag&drop command.
- *  Handles the following syntax:
- *
- *    drag&drop source
- *    drag&drop source <pathName> ?options...?
- *    drag&drop source <pathName> handler ?<dataType>? ?<cmd> <arg>...?
- *
- *    drag&drop target
- *    drag&drop target <pathName> handler ?<dataType> <cmd> <arg>...?
- *    drag&drop target <pathName> handle <dataType> ?<value>?
- *
- *    drag&drop token <pathName>
- *    drag&drop drag <pathName> <x> <y>
- *    drag&drop drop <pathName> <x> <y>
- *
- *    drag&drop active
- *    drag&drop location ?<x> <y>?
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec dndOps[] =
-{
-    {"active", 1, ActiveOp, 2, 2, "",},
-    {"drag", 2, DragOp, 5, 5, "pathname x y",},
-    {"drop", 2, DropOp, 5, 5, "pathname x y",},
-    {"location", 1, LocationOp, 2, 4, "?x y?",},
-    {"source", 1, SourceOp, 2, 0, "?pathname? ?options...?",},
-    {"target", 2, TargetOp, 2, 0, "?pathname? ?options...?",},
-    {"token", 2, TokenOp, 2, 0, "?option value?...",},
-};
-
-static int nDndOps = sizeof(dndOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-DragDropCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Current interpreter */
-    int objc,			/* # of arguments */
-    Tcl_Obj *const *objv)	/* Argument strings */
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nDndOps, dndOps, BLT_OP_ARG1, objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Blt_DragDropCmdInitProc --
- *
- *	Adds the drag&drop command to the given interpreter.  Should
- *	be invoked to properly install the command whenever a new
- *	interpreter is created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_DragDropCmdInitProc(Tcl_Interp *interp) /* interpreter to be updated */
-{
-    static Blt_InitCmdSpec cmdSpec = { "drag&drop", DragDropCmd, };
-
-    cmdSpec.clientData = GetDragdropCmdInterpData(interp);
-#ifndef WIN32
-    if (!initialized) {
-	dndAtom = XInternAtom(Tk_Display(Tk_MainWindow(interp)), propName, 
-		False);
-	initialized = TRUE;
-    }
-#endif
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-#endif /* NO_DRAGDROP */
diff --git a/blt3.0/src/bltDtCmd.c b/blt3.0/src/bltDtCmd.c
deleted file mode 100644
index 32eb80d..0000000
--- a/blt3.0/src/bltDtCmd.c
+++ /dev/null
@@ -1,7537 +0,0 @@
-
-/*
- *
- * bltDtCmd.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
-  blt::datatable create t0 t1 t2
-  blt::datatable names
-  t0 destroy
-     -or-
-  blt::datatable destroy t0
-  blt::datatable copy table at node table at node -recurse -tags
-
-  table move node after|before|into t2 at node
-
-  $t apply -recurse $root command arg arg			
-
-  $t attach tablename				
-
-  $t children $n
-  t0 copy node1 node2 node3 node4 node5 destName 
-  $t delete $n...				
-  $t delete 0 
-  $t delete 0 10
-  $t delete all
-  $t depth $n
-  $t dump 
-  $t dump -file fileName
-  $t dup $t2		
-  $t find $root -name pat -name pattern
-  $t firstchild $n
-  $t get $n $key
-  $t get $n $key(abc)
-  $t index $n
-  $t insert $parent $switches?
-  $t isancestor $n1 $n2
-  $t isbefore $n1 $n2
-  $t isleaf $n
-  $t lastchild $n
-  $t move $n1 after|before|into $n2
-  $t next $n
-  $t nextsibling $n
-  $t path $n1 $n2 $n3...
-  $t parent $n
-  $t previous $n
-  $t prevsibling $n
-  $t restore $root data -overwrite
-  $t root ?$n?
-
-  $t set $n $key $value ?$key $value?
-  $t size $n
-  $t slink $n $t2@$node				???
-  $t sort -recurse $root		
-
-  $t tag delete tag1 tag2 tag3...
-  $t tag names
-  $t tag nodes $tag
-  $t tag set $n tag1 tag2 tag3...
-  $t tag unset $n tag1 tag2 tag3...
-
-  $t trace create $n $key how command		
-  $t trace delete id1 id2 id3...
-  $t trace names
-  $t trace info $id
-
-  $t unset $n key1 key2 key3...
-  
-  $t row notify $row ?flags? command 
-  $t column notify $column ?flags? command arg arg arg 
-  $t notify create -oncreate -ondelete -onmove command 
-  $t notify create -oncreate -ondelete -onmove -onsort command arg arg arg 
-  $t notify delete id1 id2 id3
-  $t notify names
-  $t notify info id
-
-  for { set n [$t firstchild $node] } { $n >= 0 } { 
-        set n [$t nextsibling $n] } {
-  }
-  foreach n [$t children $node] { 
-	  
-  }
-  set n [$t next $node]
-  set n [$t previous $node]
-*/
-
-/*
- *
- *  datatable create ?name?
- *  datatable names
- *  datatable destroy $table
- *  
- *  $t column label ?newLabel?
- *  $t column labels ?index newLabel...?
- * 
- *  $t column index $c
- *  $t column indices $c
- *  $t column get $c
- *  $t column delete $r $r $r $r
- *  $t column extend label label label... 
- *  $t column get $column
- *  $t column insert $column "label"
- *  $t column select $expr
- *  $t column set {1 20} $list
- *  $t column set 1-20 $list
- *  $t column set 1:20 $list
- *  $t column trace $row rwu proc
- *  $t column unset $column
- *  $t copy fromTable
- *  $t copy newTable
- *  $t dup newTable -includerows $tag $tag $tag -excludecolumns $tag $tag 
- *  $t get $row $column $value ?$defValue?
- *  $t pack 
- *  $t row delete row row row row 
- *  $t row create -tags $tags -label $label -before -after 
- *  $t row extend 1
- *  $t row get $row -nolabels 
- *  $t row create $column "label" "label"
- *  $t row select $expr
- *  $t row set $row  $list -nolabels
- *  $t row trace $row  rwu proc
- *  $t row unset $row
- *  $t row tag add where expr 
- *  $t row tag forget $tag $tag
- *  $t row tag delete $tag $row $row $row
- *  $t row tag find $row ?pattern*?
- *  $t row tag add $row tag tag tag tag 
- *  $t row tag unset $row tag tag tag 
- *  $t row find $expr
- *  $t row unique $rowexpr
- *  $t select $expr
- *  $t set $row $column $value 
- *  $t trace $row $column rwu proc
- *  $t unset $row $column 
- *  $t column find $expr
- *  $t import -format {csv} -overwrite fileName
- *  $t export -format {csv,xml} fileName
- *  $t dumpdata -deftags -deflabels -columns "tags" -rows "tags" string
- *  $t dump -notags -nolabels -columns "tags" -rows "tags" fileName
- *  $t dup $destTable -notags -nolabels -columns "tags" -rows "tags"
- *  $t restore -overwrite -notags -nolabels string
- *  $t restoredata -overwrite -notags -nolabels -data string
- *  $t restore -overwrite -notags -nolabels fileName
- *
- *  $t row hide label
- *  $t row unhide label
- *
- *  $t emptyvalue ?value?
- *  $t key set ?key key key?
- *  $t key lookup ?key key key?
- */
-/* 
- * $t import -format tree {tree 10} 
- * $t import -format csv $fileName.csv
- *
- * $t import tree $tree 10 ?switches?
- * $t import csv ?switches? fileName.xml
- * $t importdata csv -separator , -quote " $fileName.csv
- * $t import csv -separator , -quote " -data string
- * $t exportdata xml ?switches? ?$fileName.xml?
- * $t export csv -separator \t -quote ' $fileName.csv
- * $t export csv -separator \t -quote ' 
- * $t export -format dbm $fileName.dbm
- * $t export -format db $fileName.db
- * $t export -format csv $fileName.csv
- */
-/*
- * $vector attach "$t c $column"
- * $vector detach 
- * $graph element create x -x "${table} column ${column}" \
- *		"table0 r abc"
- * $tree attach 0 $t
- */
-
-#include <bltInt.h>
-#include "bltOp.h"
-#include <bltNsUtil.h>
-#include <bltSwitch.h>
-#include <bltHash.h>
-#include <bltVar.h>
-
-#include <bltDataTable.h>
-
-#include <ctype.h>
-
-#define TABLE_THREAD_KEY "BLT DataTable Command Interface"
-
-/*
- * TableCmdInterpData --
- *
- *	Structure containing global data, used on a interpreter by interpreter
- *	basis.
- *
- *	This structure holds the hash table of instances of datatable commands
- *	associated with a particular interpreter.
- */
-typedef struct {
-    Blt_HashTable instTable;		/* Tracks tables in use. */
-    Tcl_Interp *interp;
-    Blt_HashTable fmtTable;
-    Blt_HashTable findTable;		/* Tracks temporary "find" search
-					 * information keyed by a specific
-					 * namespace. */
-} TableCmdInterpData;
-
-typedef struct {
-    long freq;				/* Frequency of value */
-    const char *value;			/* String representation of value. */
-} UniqueValue;
-
-/*
- * Cmd --
- *
- *	Structure representing the TCL command used to manipulate the
- *	underlying table object.
- *
- *	This structure acts as a shell for a table object.  A table object
- *	maybe shared by more than one client.  This shell provides Tcl
- *	commands to access and change values as well as the structure of the
- *	table itself.  It manages the traces and notifier events that it
- *	creates, providing a TCL interface to those facilities. It also
- *	provides a user-selectable value for empty-cell values.
- */
-typedef struct {
-    Tcl_Interp *interp;			/* Interpreter this command is
-					 * associated with. */
-    Blt_Table table;			/* Handle representing the client
-					 * table. */
-    Tcl_Command cmdToken;		/* Token for TCL command representing
-					 * this table. */
-    const char *emptyValue;		/* String representing an empty value in
-					 * the table. */
-    Blt_HashTable *tablePtr;		/* Pointer to hash table containing a
-					 * pointer to this structure.  Used to
-					 * delete * this table entry from the
-					 * table. */
-    Blt_HashEntry *hPtr;		/* Pointer to the hash table entry for
-					 * this table in the interpreter
-					 * specific hash table. */
-    int nextTraceId;			/* Used to generate trace id
-					 * strings.  */
-    Blt_HashTable traceTable;		/* Table of active traces. Maps trace
-					 * ids back to their TraceInfo
-					 * records. */
-    int nextNotifyId;			/* Used to generate notify id
-					 * strings. */
-    Blt_HashTable notifyTable;		/* Table of event handlers. Maps
-					 * notify ids back to their NotifyInfo
-					 * records. */
-} Cmd;
-
-typedef struct {
-    const char *name;			/* Name of format. */
-    int isLoaded;			
-    Blt_TableImportProc    *importProc;
-    Blt_TableExportProc    *exportProc;
-} DataFormat;
-
-
-typedef struct {
-    Tcl_Obj *cmd0;
-    Tcl_Interp *interp;
-} CompareData;
-
-/*
- * TraceInfo --
- *
- *	Structure containing information about a trace set from this command
- *	shell.
- *
- *	This auxillary structure houses data to be used for a callback to a
- *	Tcl procedure when a table object trace fires.  It is stored in a hash
- *	table in the Dt_Cmd structure to keep track of traces issued by this
- *	shell.
- */
-typedef struct {
-    Blt_TableTrace trace;
-    Cmd *cmdPtr;
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    int type;
-    int cmdc;
-    Tcl_Obj **cmdv;
-} TraceInfo;
-
-/*
- * NotifierInfo --
- *
- *	Structure containing information about a notifier set from
- *	this command shell.
- *
- *	This auxillary structure houses data to be used for a callback
- *	to a TCL procedure when a table object notify event fires.  It
- *	is stored in a hash table in the Dt_Cmd structure to keep
- *	track of notifiers issued by this shell.
- */
-typedef struct {
-    Blt_TableNotifier notifier;
-    Cmd *cmdPtr;
-    Blt_HashEntry *hPtr;
-    int cmdc;
-    Tcl_Obj **cmdv;
-} NotifierInfo;
-
-BLT_EXTERN Blt_SwitchFreeProc Blt_Table_ColumnIterFreeProc;
-BLT_EXTERN Blt_SwitchFreeProc Blt_Table_RowIterFreeProc;
-BLT_EXTERN Blt_SwitchParseProc Blt_Table_ColumnIterSwitchProc;
-BLT_EXTERN Blt_SwitchParseProc Blt_Table_RowIterSwitchProc;
-static Blt_SwitchParseProc TableSwitchProc;
-static Blt_SwitchFreeProc TableFreeProc;
-static Blt_SwitchParseProc PositionSwitch;
-static Blt_SwitchParseProc TypeSwitchProc;
-
-static Blt_SwitchCustom columnIterSwitch = {
-    Blt_Table_ColumnIterSwitchProc, Blt_Table_ColumnIterFreeProc, 0,
-};
-static Blt_SwitchCustom rowIterSwitch = {
-    Blt_Table_RowIterSwitchProc, Blt_Table_RowIterFreeProc, 0,
-};
-static Blt_SwitchCustom tableSwitch = {
-    TableSwitchProc, TableFreeProc, 0,
-};
-static Blt_SwitchCustom typeSwitch = {
-    TypeSwitchProc, NULL, 0,
-};
-
-#define INSERT_BEFORE	(ClientData)(1<<0)
-#define INSERT_AFTER	(ClientData)(1<<1)
-
-#define INSERT_ROW	(BLT_SWITCH_USER_BIT<<1)
-#define INSERT_COL	(BLT_SWITCH_USER_BIT<<2)
-
-static Blt_SwitchCustom beforeSwitch = {
-    PositionSwitch, NULL, INSERT_BEFORE,
-};
-static Blt_SwitchCustom afterSwitch = {
-    PositionSwitch, NULL, INSERT_AFTER,
-};
-
-typedef struct {
-    Cmd *cmdPtr;
-    Blt_TableRow row;			/* Index where to install new row or
-					 * column. */
-    Blt_TableColumn column;
-    const char *label;			/* New label. */
-    Tcl_Obj *tags;			/* List of tags to be applied to this
-					 * row or column. */
-    Blt_TableColumnType type;
-} InsertSwitches;
-
-static Blt_SwitchSpec insertSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-after",  "column",
-	Blt_Offset(InsertSwitches, column), INSERT_COL, 0, &afterSwitch},
-    {BLT_SWITCH_CUSTOM, "-after",  "row",
-	Blt_Offset(InsertSwitches, row),    INSERT_ROW, 0, &afterSwitch},
-    {BLT_SWITCH_CUSTOM, "-before", "column",
-	Blt_Offset(InsertSwitches, column), INSERT_COL, 0, &beforeSwitch},
-    {BLT_SWITCH_CUSTOM, "-before", "row",
-         Blt_Offset(InsertSwitches, row),   INSERT_ROW, 0, &beforeSwitch},
-    {BLT_SWITCH_STRING, "-label",  "string",
-	Blt_Offset(InsertSwitches, label),  INSERT_ROW | INSERT_COL},
-    {BLT_SWITCH_OBJ,    "-tags",   "tags",
-	Blt_Offset(InsertSwitches, tags),   INSERT_ROW | INSERT_COL},
-    {BLT_SWITCH_CUSTOM, "-type",   "type", 
-	Blt_Offset(InsertSwitches, type),    0, 0, &typeSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    unsigned int flags;
-    Blt_Table table;
-    const char *label;
-} CopySwitches;
-
-#define COPY_NOTAGS	(1<<1)
-#define COPY_LABEL	(1<<3)
-
-static Blt_SwitchSpec copySwitches[] = 
-{
-    {BLT_SWITCH_STRING, "-label", "string",
-	Blt_Offset(CopySwitches, label), 0, 0},
-    {BLT_SWITCH_BITMASK, "-notags", "",
-	Blt_Offset(CopySwitches, flags), 0, COPY_NOTAGS},
-    {BLT_SWITCH_CUSTOM, "-table", "desttable",
-	Blt_Offset(CopySwitches, table), 0, 0, &tableSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    /* Private data */
-    Tcl_Channel channel;
-    Tcl_DString *dsPtr;
-    unsigned int flags;
-
-    /* Public fields */
-    Blt_TableIterator ri, ci;
-    Tcl_Obj *fileObjPtr;
-} DumpSwitches;
-
-static Blt_SwitchSpec dumpSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-rows",    "rows",
-	Blt_Offset(DumpSwitches, ri),      0, 0, &rowIterSwitch},
-    {BLT_SWITCH_CUSTOM, "-columns", "columns",
-	Blt_Offset(DumpSwitches, ci),      0, 0, &columnIterSwitch},
-    {BLT_SWITCH_OBJ,    "-file",    "fileName",
-	Blt_Offset(DumpSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Blt_HashTable idTable;
-
-    Tcl_Obj *fileObjPtr;
-    Tcl_Obj *dataObjPtr;
-    unsigned int flags;
-} RestoreSwitches;
-
-static Blt_SwitchSpec restoreSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "string",
-	Blt_Offset(RestoreSwitches, dataObjPtr), 0, 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(RestoreSwitches, fileObjPtr), 0, 0},
-    {BLT_SWITCH_BITMASK, "-notags", "",
-	Blt_Offset(RestoreSwitches, flags), 0, TABLE_RESTORE_NO_TAGS},
-    {BLT_SWITCH_BITMASK, "-overwrite", "",
-	Blt_Offset(RestoreSwitches, flags), 0, TABLE_RESTORE_OVERWRITE},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    unsigned int flags;
-} SortSwitches;
-
-static Blt_SwitchSpec sortSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-decreasing", "",
-	Blt_Offset(SortSwitches, flags), 0, SORT_DECREASING},
-    {BLT_SWITCH_BITMASK, "-list", "",
-	Blt_Offset(SortSwitches, flags), 0, SORT_LIST},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    unsigned int flags;
-} NotifySwitches;
-
-static Blt_SwitchSpec notifySwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-allevents", "",
-	Blt_Offset(NotifySwitches, flags), 0, TABLE_NOTIFY_ALL_EVENTS},
-    {BLT_SWITCH_BITMASK, "-create", "",
-	Blt_Offset(NotifySwitches, flags), 0, TABLE_NOTIFY_CREATE},
-    {BLT_SWITCH_BITMASK, "-delete", "",
-	Blt_Offset(NotifySwitches, flags), 0, TABLE_NOTIFY_DELETE},
-    {BLT_SWITCH_BITMASK, "-move", "", 
-	Blt_Offset(NotifySwitches, flags), 0, TABLE_NOTIFY_MOVE},
-    {BLT_SWITCH_BITMASK, "-whenidle", "",
-	Blt_Offset(NotifySwitches, flags), 0, TABLE_NOTIFY_WHENIDLE},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Blt_Table table;			/* Table to be evaluated */
-    Blt_TableRow row;			/* Current row. */
-    Blt_HashTable varTable;		/* Variable cache. */
-    Blt_TableIterator iter;
-
-    /* Public values */
-    Tcl_Obj *emptyValueObjPtr;
-    const char *tag;
-    unsigned int flags;
-} FindSwitches;
-
-#define FIND_INVERT	(1<<0)
-
-static Blt_SwitchSpec findSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-rows",	"rows",
-	Blt_Offset(FindSwitches, iter),  0, 0, &rowIterSwitch},
-    {BLT_SWITCH_OBJ,     "-emptyvalue", "string",
-	Blt_Offset(FindSwitches, emptyValueObjPtr), 0},
-    {BLT_SWITCH_STRING,  "-addtag",	"tagName",
-	Blt_Offset(FindSwitches, tag),   0},
-    {BLT_SWITCH_BITMASK, "-invert",	"",
-	Blt_Offset(FindSwitches, flags), 0, FIND_INVERT},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int flags;
-} UniqueSwitches;
-
-static Blt_SwitchSpec uniqueSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK,   "-ascii",	"",
-	Blt_Offset(UniqueSwitches, flags),    0, SORT_ASCII},
-    {BLT_SWITCH_BITMASK, "-decreasing", "",
-	Blt_Offset(SortSwitches, flags),      0, SORT_DECREASING},
-    {BLT_SWITCH_BITMASK,   "-dictionary", "",
-	Blt_Offset(UniqueSwitches, flags),    0, SORT_DICTIONARY},
-    {BLT_SWITCH_BITMASK, "-freq",       "",
-	Blt_Offset(UniqueSwitches, flags),    0, SORT_FREQUENCY},
-    {BLT_SWITCH_END}
-};
-
-static Blt_TableTraceProc TraceProc;
-static Blt_TableTraceDeleteProc TraceDeleteProc;
-
-static Blt_TableNotifyEventProc NotifyProc;
-static Blt_TableNotifierDeleteProc NotifierDeleteProc;
-
-static Tcl_CmdDeleteProc TableInstDeleteProc;
-static Tcl_InterpDeleteProc TableInterpDeleteProc;
-static Tcl_ObjCmdProc TableInstObjCmd;
-static Tcl_ObjCmdProc TableObjCmd;
-
-typedef int (CmdProc)(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-#ifdef notdef
-static int
-FirstOption(int objc, Tcl_Obj *const *objv, int start)
-{
-    int i;
-
-    for (i = start; i < objc; i++) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-    }
-    return i;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * PositionSwitch --
- *
- *	Convert a Tcl_Obj representing an offset in the table.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PositionSwitch(
-    ClientData clientData,		/* Flag indicating if the node is
-					 * considered before or after the
-					 * insertion position. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Not used. */
-    int flags)				/* Indicates whether this is a row or
-					 * column index. */
-{
-    InsertSwitches *insertPtr = (InsertSwitches *)record;
-    Blt_Table table;
-
-    table = insertPtr->cmdPtr->table;
-    if (flags & INSERT_COL) {
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objPtr);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-	if (clientData == INSERT_AFTER) {
-	    col = Blt_Table_NextColumn(table, col);
-	}
-	insertPtr->column = col;
-    } else if (flags & INSERT_ROW) {
-	Blt_TableRow row;
-
-	row = Blt_Table_FindRow(interp, table, objPtr);
-	if (row == NULL) {
-	    return TCL_ERROR;
-	}
-	if (clientData == INSERT_AFTER) {
-	    row = Blt_Table_NextRow(table, row);
-	}
-	insertPtr->row = row;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ColumnIterFreeProc --
- *
- *	Free the storage associated with the -columns switch.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-void
-Blt_Table_ColumnIterFreeProc(char *record, int offset, int flags)
-{
-    Blt_TableIterator *iterPtr = (Blt_TableIterator *)(record + offset);
-
-    Blt_Table_FreeIteratorObjv(iterPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Table_ColumnIterSwitchProc --
- *
- *	Convert a Tcl_Obj representing an offset in the table.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_Table_ColumnIterSwitchProc(
-    ClientData clientData,		/* Flag indicating if the node is
-					 * considered before or after the
-					 * insertion position. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_TableIterator *iterPtr = (Blt_TableIterator *)(record + offset);
-    Blt_Table table;
-    Tcl_Obj **objv;
-    int objc;
-
-    table = clientData;
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_Table_IterateColumnsObjv(interp, table, objc, objv, iterPtr)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeRowIter --
- *
- *	Free the storage associated with the -rows switch.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-void
-Blt_Table_RowIterFreeProc(char *record, int offset, int flags)
-{
-    Blt_TableIterator *iterPtr = (Blt_TableIterator *)(record + offset);
-
-    Blt_Table_FreeIteratorObjv(iterPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowIterSwitch --
- *
- *	Convert a Tcl_Obj representing an offset in the table.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_Table_RowIterSwitchProc(
-    ClientData clientData,		/* Flag indicating if the node is
-					 * considered before or after the
-					 * insertion position. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_TableIterator *iterPtr = (Blt_TableIterator *)(record + offset);
-    Blt_Table table;
-    Tcl_Obj **objv;
-    int objc;
-
-    table = clientData;
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_Table_IterateRowsObjv(interp, table, objc, objv, iterPtr)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableSwitchProc --
- *
- *	Convert a Tcl_Obj representing an offset in the table.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TableSwitchProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report result. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_Table *tablePtr = (Blt_Table *)(record + offset);
-    Blt_Table table;
-
-    if (Blt_Table_Open(interp, Tcl_GetString(objPtr), &table) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *tablePtr = table;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableFreeProc --
- *
- *	Free the storage associated with the -table switch.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-TableFreeProc(char *record, int offset, int flags)
-{
-    Blt_Table table = *(Blt_Table *)(record + offset);
-
-    Blt_Table_Close(table);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeSwitchProc --
- *
- *	Convert a Tcl_Obj representing the type of the values in a table
- *	column.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeSwitchProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_TableColumnType *typePtr = (Blt_TableColumnType *)(record + offset);
-    Blt_TableColumnType type;
-
-    type = Blt_Table_GetColumnType(Tcl_GetString(objPtr));
-    if (type == TABLE_COLUMN_TYPE_UNKNOWN) {
-	Tcl_AppendResult(interp, "unknown table column type \"",
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_OK;
-    }
-    *typePtr = type;
-    return TCL_OK;
-}
-
-static int
-MakeRows(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr)
-{
-    const char *string;
-    Blt_TableRowColumnSpec spec;
-    long n;
-
-    spec = Blt_Table_RowSpec(table, objPtr, &string);
-    switch(spec) {
-    case TABLE_SPEC_UNKNOWN:
-    case TABLE_SPEC_LABEL:
-	Tcl_ResetResult(interp);
-	if (Blt_Table_CreateRow(interp, table, string) == NULL) {
-	    return TCL_ERROR;
-	}
-	break;
-    case TABLE_SPEC_INDEX:
-	Tcl_ResetResult(interp);
-	if (Tcl_GetLong(interp, string, &n) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	n -= Blt_Table_NumRows(table);
-	Blt_Table_ExtendRows(interp, table, n, NULL);
-	break;
-    default:
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-CompareValueFreq(const void *a, const void *b)
-{
-    const UniqueValue *fPtr1, *fPtr2;
-
-    fPtr1 = a; 
-    fPtr2 = b;
-    return (fPtr1->freq - fPtr2->freq);
-}
-
-static int
-CompareValueAscii(const void *a, const void *b)
-{
-    const UniqueValue *fPtr1, *fPtr2;
-
-    fPtr1 = a; 
-    fPtr2 = b;
-    return strcmp(fPtr1->value, fPtr2->value);
-}
-
-static int
-CompareValueDictionary(const void *a, const void *b)
-{
-    const UniqueValue *fPtr1, *fPtr2;
-
-    fPtr1 = a; 
-    fPtr2 = b;
-    return Blt_DictionaryCompare(fPtr1->value, fPtr2->value);
-}
-
-static Tcl_Obj *
-SortColumnValues(Tcl_Interp *interp, Blt_HashTable *tablePtr, int flags)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    QSortCompareProc *proc;
-    Tcl_Obj *listObjPtr;
-    UniqueValue *p, *pend, *array;
-    long i;
-
-    i = 0;
-    array = Blt_Malloc(tablePtr->numEntries * sizeof(UniqueValue));
-    if (array == NULL) {
-	return NULL;
-    }
-    p = array;
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	p->value = Blt_GetHashKey(tablePtr, hPtr);
-	p->freq = (long)Blt_GetHashValue(hPtr);
-	p++;
-    }
-    switch (flags & SORT_TYPE_MASK) {
-    case SORT_ASCII:
-	proc = CompareValueAscii;	break;
-    case SORT_FREQUENCY:
-	proc = CompareValueFreq;	break;
-
-    case SORT_DICTIONARY:
-	proc = CompareValueDictionary;	break;
-    case SORT_NONE:
-	proc = NULL;			break;
-    }
-    if (proc != NULL) {
-	qsort(array, tablePtr->numEntries, sizeof(UniqueValue), proc);
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (flags & SORT_DECREASING) {
-	for (p = array + tablePtr->numEntries, pend = array; p > pend;) {
-	    Tcl_Obj *objPtr;
-	    
-	    p--;
-	    objPtr = Tcl_NewStringObj(p->value, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	for (p = array, pend = p + tablePtr->numEntries; p < pend; p++) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewStringObj(p->value, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Blt_Free(array);
-    return listObjPtr;
-}
-
-
-static int
-IterateRows(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-	    Blt_TableIterator *iterPtr)
-{
-    if (Blt_Table_IterateRows(interp, table, objPtr, iterPtr) != TCL_OK) {
-	/* 
-	 * We could not parse the row descriptor. If the row specification is
-	 * a label or index that doesn't exist, create the new rows and try to
-	 * load the iterator again.
-	 */
-	if (MakeRows(interp, table, objPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Blt_Table_IterateRows(interp, table, objPtr, iterPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-MakeColumns(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr)
-{
-    const char *string;
-    Blt_TableRowColumnSpec spec;
-    long n;
-
-    spec = Blt_Table_ColumnSpec(table, objPtr, &string);
-    switch(spec) {
-    case TABLE_SPEC_UNKNOWN:
-    case TABLE_SPEC_LABEL:
-	Tcl_ResetResult(interp);
-	if (Blt_Table_CreateColumn(interp, table, string) == NULL) {
-	    return TCL_ERROR;
-	}
-	break;
-    case TABLE_SPEC_INDEX:
-	Tcl_ResetResult(interp);
-	if (Tcl_GetLong(interp, string, &n) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	n -= Blt_Table_NumColumns(table);
-	Blt_Table_ExtendColumns(interp, table, n, NULL);
-	break;
-    default:
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-IterateColumns(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-	       Blt_TableIterator *iterPtr)
-{
-    if (Blt_Table_IterateColumns(interp, table, objPtr, iterPtr) != TCL_OK) {
-	/* 
-	 * We could not parse column descriptor.  If the column specification
-	 * is a label that doesn't exist, create a new column with that label
-	 * and try to load the iterator again.
-	 */
-	if (MakeColumns(interp, table, objPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Blt_Table_IterateColumns(interp, table, objPtr, iterPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTableCmdInterpData --
- *
- *---------------------------------------------------------------------------
- */
-
-static TableCmdInterpData *
-GetTableCmdInterpData(Tcl_Interp *interp)
-{
-    TableCmdInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (TableCmdInterpData *)
-	Tcl_GetAssocData(interp, TABLE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(TableCmdInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, TABLE_THREAD_KEY, TableInterpDeleteProc, 
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->instTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&dataPtr->fmtTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&dataPtr->findTable, BLT_ONE_WORD_KEYS);
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTableCmd --
- *
- *	This is a helper routine used by TableCreateOp.  It create a
- *	new instance of a table command.  Memory is allocated for the
- *	command structure and a new TCL command is created (same as
- *	the instance name).  All table commands have hash table
- *	entries in a global (interpreter-specific) registry.
- *	
- * Results:
- *	Returns a pointer to the newly allocated table command structure.
- *
- * Side Effects:
- *	Memory is allocated for the structure and a hash table entry is
- *	added.  
- *
- *---------------------------------------------------------------------------
- */
-static Cmd *
-NewTableCmd(Tcl_Interp *interp, Blt_Table table, const char *name)
-{
-    Cmd *cmdPtr;
-    TableCmdInterpData *dataPtr;
-    int isNew;
-
-    cmdPtr = Blt_AssertCalloc(1, sizeof(Cmd));
-    cmdPtr->table = table;
-    cmdPtr->interp = interp;
-    cmdPtr->emptyValue = Blt_AssertStrdup("");
-
-    Blt_InitHashTable(&cmdPtr->traceTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&cmdPtr->notifyTable, BLT_STRING_KEYS);
-
-    cmdPtr->cmdToken = Tcl_CreateObjCommand(interp, name, TableInstObjCmd, 
-	cmdPtr, TableInstDeleteProc);
-
-    dataPtr = GetTableCmdInterpData(interp);
-    cmdPtr->tablePtr = &dataPtr->instTable;
-    cmdPtr->hPtr = Blt_CreateHashEntry(&dataPtr->instTable, name, &isNew);
-    Blt_SetHashValue(cmdPtr->hPtr, cmdPtr);
-    return cmdPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GenerateName --
- *
- *	Generates an unique table command name.  Table names are in the form
- *	"datatableN", where N is a non-negative integer. Check each name
- *	generated to see if it is already a table. We want to recycle names if
- *	possible.
- *	
- * Results:
- *	Returns the unique name.  The string itself is stored in the dynamic
- *	string passed into the routine.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-GenerateName(Tcl_Interp *interp, const char *prefix, const char *suffix,
-	     Tcl_DString *resultPtr)
-{
-
-    int n;
-    const char *instName;
-
-    /* 
-     * Parse the command and put back so that it's in a consistent format.
-     *
-     *	t1         <current namespace>::t1
-     *	n1::t1     <current namespace>::n1::t1
-     *	::t1	   ::t1
-     *  ::n1::t1   ::n1::t1
-     */
-    instName = NULL;			/* Suppress compiler warning. */
-    for (n = 0; n < INT_MAX; n++) {
-	Blt_ObjectName objName;
-	Tcl_CmdInfo cmdInfo;
-	Tcl_DString ds;
-	char string[200];
-
-	Tcl_DStringInit(&ds);
-	Tcl_DStringAppend(&ds, prefix, -1);
-	sprintf_s(string, 200, "datatable%d", n);
-	Tcl_DStringAppend(&ds, string, -1);
-	Tcl_DStringAppend(&ds, suffix, -1);
-	if (!Blt_ParseObjectName(interp, Tcl_DStringValue(&ds), 
-				 &objName, 0)) {
-	    return NULL;
-	}
-	instName = Blt_MakeQualifiedName(&objName, resultPtr);
-	Tcl_DStringFree(&ds);
-	/* 
-	 * Check if the command already exists. 
-	 */
-	if (Tcl_GetCommandInfo(interp, (char *)instName, &cmdInfo)) {
-	    continue;
-	}
-	if (!Blt_Table_TableExists(interp, instName)) {
-	    /* 
-	     * We want the name of the table command and the underlying table
-	     * object to be the same. Check that the free command name isn't
-	     * an already a table object name.
-	     */
-	    break;
-	}
-    }
-    return instName;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTableCmd --
- *
- *	Find the table command associated with the TCL command "string".
- *	
- *	We have to perform multiple lookups to get this right.  
- *
- *	The first step is to generate a canonical command name.  If an
- *	unqualified command name (i.e. no namespace qualifier) is given, we
- *	should search first the current namespace and then the global one.
- *	Most TCL commands (like Tcl_GetCmdInfo) look only at the global
- *	namespace.
- *
- *	Next check if the string is 
- *		a) a TCL command and 
- *		b) really is a command for a table object.  
- *	Tcl_GetCommandInfo will get us the objClientData field that should be
- *	a cmdPtr.  We verify that by searching our hashtable of cmdPtr
- *	addresses.
- *
- * Results:
- *	A pointer to the table command.  If no associated table command can be
- *	found, NULL is returned.  It's up to the calling routines to generate
- *	an error message.
- *
- *---------------------------------------------------------------------------
- */
-static Cmd *
-GetTableCmd(Tcl_Interp *interp, const char *name)
-{
-    Blt_HashEntry *hPtr;
-    Tcl_DString ds;
-    TableCmdInterpData *dataPtr;
-    Blt_ObjectName objName;
-    const char *qualName;
-
-    /* Put apart the table name and put is back together in a standard
-     * format. */
-    if (!Blt_ParseObjectName(interp, name, &objName, BLT_NO_ERROR_MSG)) {
-	return NULL;		/* No such parent namespace. */
-    }
-    /* Rebuild the fully qualified name. */
-    qualName = Blt_MakeQualifiedName(&objName, &ds);
-    dataPtr = GetTableCmdInterpData(interp);
-    hPtr = Blt_FindHashEntry(&dataPtr->instTable, qualName);
-    Tcl_DStringFree(&ds);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTraceFlags --
- *
- *	Parses a string representation of the trace bit flags and returns the
- *	mask.
- *
- * Results:
- *	The trace mask is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTraceFlags(const char *string)
-{
-    const char *p;
-    unsigned int flags;
-
-    flags = 0;
-    for (p = string; *p != '\0'; p++) {
-	switch (toupper(UCHAR(*p))) {
-	case 'R':
-	    flags |= TABLE_TRACE_READS;	break;
-	case 'W':
-	    flags |= TABLE_TRACE_WRITES;	break;
-	case 'U':
-	    flags |= TABLE_TRACE_UNSETS;	break;
-	case 'C':
-	    flags |= TABLE_TRACE_CREATES;	break;
-	default:
-	    return -1;
-	}
-    }
-    return flags;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrintTraceFlags --
- *
- *	Generates a string representation of the trace bit flags.  It's
- *	assumed that the provided string is at least 5 bytes.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The bitflag information is written to the provided string.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PrintTraceFlags(unsigned int flags, char *string)
-{
-    char *p;
-
-    p = string;
-    if (flags & TABLE_TRACE_READS) {
-	*p++ = 'r';
-    } 
-    if (flags & TABLE_TRACE_WRITES) {
-	*p++ = 'w';
-    } 
-    if (flags & TABLE_TRACE_UNSETS) {
-	*p++ = 'u';
-    } 
-    if (flags & TABLE_TRACE_CREATES) {
-	*p++ = 'c';
-    } 
-    *p = '\0';
-}
-
-static void
-PrintTraceInfo(Tcl_Interp *interp, TraceInfo *tiPtr, Tcl_Obj *listObjPtr)
-{
-    Tcl_Obj *objPtr;
-    int i;
-    char string[5];
-    struct _Blt_TableTrace *tracePtr;
-    Blt_Table table;
-
-    table = tiPtr->cmdPtr->table;
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("id", 2));
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-			     Tcl_NewStringObj(tiPtr->hPtr->key.string, -1));
-    tracePtr = tiPtr->trace;
-    if (tracePtr->rowTag != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj("row", 3));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj(tracePtr->rowTag, -1));
-    }
-    if (tracePtr->row != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj("row", 3));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewLongObj(Blt_Table_RowIndex(tracePtr->row)));
-    }
-    if (tracePtr->colTag != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj("column", 6));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj(tracePtr->colTag, -1));
-    }
-    if (tracePtr->column != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj("column", 6));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewLongObj(Blt_Table_ColumnIndex(tracePtr->column)));
-    }
-    PrintTraceFlags(tracePtr->flags, string);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("flags", 5));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(string, -1));
-
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-			     Tcl_NewStringObj("command", 7));
-    objPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (i = 0; i < tiPtr->cmdc; i++) {
-	Tcl_ListObjAppendElement(interp, objPtr, tiPtr->cmdv[i]);
-    }
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeNotifierInfo --
- *
- *	This is a helper routine used to delete notifiers.  It releases the
- *	Tcl_Objs used in the notification callback command and the actual
- *	table notifier.  Memory for the notifier is also freed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Memory is deallocated and the notitifer is no longer active.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeNotifierInfo(NotifierInfo *niPtr)
-{
-    int i;
-
-    for (i = 0; i < niPtr->cmdc; i++) {
-	Tcl_DecrRefCount(niPtr->cmdv[i]);
-    }
-    Blt_Table_DeleteNotifier(niPtr->notifier);
-    Blt_Free(niPtr->cmdv);
-    Blt_Free(niPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceProc(ClientData clientData, Blt_TableTraceEvent *eventPtr)
-{
-    TraceInfo *tracePtr = clientData; 
-    char string[5];
-    int result;
-    int i;
-
-    i = tracePtr->cmdc;		/* Add extra command arguments starting at
-				 * this index. */
-    tracePtr->cmdv[i+1]=Tcl_NewLongObj(Blt_Table_RowIndex(eventPtr->row));
-    tracePtr->cmdv[i+2]=Tcl_NewLongObj(Blt_Table_ColumnIndex(eventPtr->column));
-
-    PrintTraceFlags(eventPtr->mask, string);
-    tracePtr->cmdv[i+3] = Tcl_NewStringObj(string, -1);
-
-    Tcl_IncrRefCount(tracePtr->cmdv[i+1]);
-    Tcl_IncrRefCount(tracePtr->cmdv[i+2]);
-    Tcl_IncrRefCount(tracePtr->cmdv[i+3]);
-    result = Tcl_EvalObjv(eventPtr->interp, i + 4, tracePtr->cmdv, 0);
-    Tcl_DecrRefCount(tracePtr->cmdv[i+3]);
-    Tcl_DecrRefCount(tracePtr->cmdv[i+2]);
-    Tcl_DecrRefCount(tracePtr->cmdv[i+1]);
-    if (result != TCL_OK) {
-	Tcl_BackgroundError(eventPtr->interp);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceDeleteProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-TraceDeleteProc(ClientData clientData)
-{
-    TraceInfo *tiPtr = clientData; 
-    int i;
-
-    for (i = 0; i <= tiPtr->cmdc; i++) {
-	Tcl_DecrRefCount(tiPtr->cmdv[i]);
-    }
-    Blt_Free(tiPtr->cmdv);
-    if (tiPtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(tiPtr->tablePtr, tiPtr->hPtr);
-    }
-    Blt_Free(tiPtr);
-}
-
-static const char *
-GetEventName(int type)
-{
-    if (type & TABLE_NOTIFY_CREATE) {
-	return "-create";
-    } 
-    if (type & TABLE_NOTIFY_DELETE) {
-	return "-delete";
-    }
-    if (type & TABLE_NOTIFY_MOVE) {
-	return "-move";
-    }
-    return "???";
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifierDeleteProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-NotifierDeleteProc(ClientData clientData)
-{
-    NotifierInfo *niPtr; 
-
-    niPtr = clientData; 
-    FreeNotifierInfo(niPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-NotifyProc(ClientData clientData, Blt_TableNotifyEvent *eventPtr)
-{
-    NotifierInfo *niPtr; 
-    Tcl_Interp *interp;
-    int i, result;
-    long index;
-
-    niPtr = clientData; 
-    interp = niPtr->cmdPtr->interp;
-    i = niPtr->cmdc;
-    niPtr->cmdv[i] = Tcl_NewStringObj(GetEventName(eventPtr->type), -1);
-
-    if (eventPtr->type & TABLE_NOTIFY_ROW) {
-	index = Blt_Table_RowIndex(eventPtr->header);
-    } else {
-	index = Blt_Table_ColumnIndex(eventPtr->header);
-    }	
-    niPtr->cmdv[i+1] = Tcl_NewLongObj(index);
-    Tcl_IncrRefCount(niPtr->cmdv[i]);
-    Tcl_IncrRefCount(niPtr->cmdv[i+1]);
-    Tcl_IncrRefCount(niPtr->cmdv[i+2]);
-    result = Tcl_EvalObjv(interp, niPtr->cmdc + 3, niPtr->cmdv, 0);
-    Tcl_DecrRefCount(niPtr->cmdv[i+2]);
-    Tcl_DecrRefCount(niPtr->cmdv[i+1]);
-    Tcl_DecrRefCount(niPtr->cmdv[i]);
-    if (result != TCL_OK) {
-	Tcl_BackgroundError(interp);
-	return TCL_ERROR;
-    }
-    Tcl_ResetResult(interp);
-    return TCL_OK;
-}
-
-static int
-ColumnVarResolver(
-    Tcl_Interp *interp,			/* Current interpreter. */
-    const char *name,			/* Variable name being resolved. */
-    Tcl_Namespace *nsPtr,		/* Current namespace context. */
-    int flags,				/* TCL_LEAVE_ERR_MSG => leave error
-					 * message. */
-    Tcl_Var *varPtr)			/* (out) Resolved variable. */ 
-{
-    Blt_HashEntry *hPtr;
-    Blt_TableColumn col;
-    FindSwitches *findPtr;
-    TableCmdInterpData *dataPtr;
-    Tcl_Interp *errInterp;
-    Tcl_Obj *valueObjPtr, *nameObjPtr;
-
-    dataPtr = GetTableCmdInterpData(interp);
-    hPtr = Blt_FindHashEntry(&dataPtr->findTable, nsPtr);
-    if (hPtr == NULL) {
-	/* This should never happen.  We can't find in data associated with
-	 * the current namespace.  But this routine should never be called
-	 * unless we're in a namespace that with linked with this variable
-	 * resolver. */
-	return TCL_CONTINUE;	
-    }
-    findPtr = Blt_GetHashValue(hPtr);
-
-    if (flags & TCL_LEAVE_ERR_MSG) {
-	errInterp = interp;
-    } else {
-	errInterp = NULL;
-    }
-    /* Look up the column from the variable name given. */
-    nameObjPtr = Tcl_NewStringObj(name, -1);
-    col = Blt_Table_FindColumn(NULL, findPtr->table, nameObjPtr);
-    Tcl_DecrRefCount(nameObjPtr);
-
-    if (col == NULL) {
-	/* Variable name doesn't refer to any column. Pass it back to the Tcl
-	 * interpreter and let it resolve it normally. */
-	return TCL_CONTINUE;
-    }
-    valueObjPtr = Blt_Table_GetObj(findPtr->table, findPtr->row, col);
-    if (valueObjPtr == NULL) {
-	valueObjPtr = findPtr->emptyValueObjPtr;
-	if (valueObjPtr == NULL) {
-	    return TCL_CONTINUE;
-	}
-    }
-    Tcl_IncrRefCount(valueObjPtr);
-    *varPtr = Blt_GetCachedVar(&findPtr->varTable, name, valueObjPtr);
-    return TCL_OK;
-}
-
-static int
-EvaluateExpr(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *exprObjPtr, 
-	     FindSwitches *findPtr, int *boolPtr)
-{
-    Tcl_Obj *resultObjPtr;
-    int bool;
-
-    if (Tcl_ExprObj(interp, exprObjPtr, &resultObjPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetBooleanFromObj(interp, resultObjPtr, &bool) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (findPtr->flags & FIND_INVERT) {
-	bool = !bool;
-    }
-    if ((bool) && (findPtr->tag != NULL)) {
-	Blt_Table_SetRowTag(interp, table, findPtr->row, findPtr->tag);
-    }
-    Tcl_DecrRefCount(resultObjPtr);
-    *boolPtr = bool;
-    return TCL_OK;
-}
-
-static int
-FindRows(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *objPtr, 
-	 FindSwitches *findPtr)
-{
-    Blt_HashEntry *hPtr;
-    TableCmdInterpData *dataPtr;
-    Tcl_CallFrame frame;
-    Tcl_Namespace *nsPtr;
-    const char *name;
-    int isNew;
-    int result = TCL_OK;
-
-    name = Blt_Table_TableName(table);
-    nsPtr = Tcl_FindNamespace(interp, name, NULL, TCL_GLOBAL_ONLY);
-    if (nsPtr != NULL) {
-	/* This limits us to only one expression evaluated per table at a
-	 * time--no concurrent expressions in the same table.  Otherwise we
-	 * need to generate unique namespace names. That's a bit harder with
-	 * the current TCL namespace API. */
-	Tcl_AppendResult(interp, "can't evaluate expression: namespace \"",
-			 name, "\" exists.", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Create a namespace from which to evaluate the expression. */
-    nsPtr = Tcl_CreateNamespace(interp, name, NULL, NULL);
-    if (nsPtr == NULL) {
-	return TCL_ERROR;
-    }
-    /* Register our variable resolver in this namespace to link table values
-     * with TCL variables. */
-    Tcl_SetNamespaceResolvers(nsPtr, (Tcl_ResolveCmdProc*)NULL,
-        ColumnVarResolver, (Tcl_ResolveCompiledVarProc*)NULL);
-
-    /* Make this namespace the current one.  */
-    Tcl_PushCallFrame(interp, &frame, nsPtr, /* isProcCallFrame */ FALSE);
-
-    dataPtr = GetTableCmdInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->findTable, (char *)nsPtr, &isNew);
-    assert(isNew);
-    Blt_SetHashValue(hPtr, findPtr);
-
-    /* Now process each row, evaluating the expression. */
-    {
-	Blt_TableRow row;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (row = Blt_Table_FirstTaggedRow(&findPtr->iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&findPtr->iter)) {
-	    int bool;
-	    
-	    findPtr->row = row;
-	    result = EvaluateExpr(interp, table, objPtr, findPtr, &bool);
-	    if (result != TCL_OK) {
-		break;
-	    }
-	    if (bool) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewLongObj(Blt_Table_RowIndex(row)));
-	    }
-	}
-	if (result != TCL_OK) {
-	    Tcl_DecrRefCount(listObjPtr);
-	} else {
-	    Tcl_SetObjResult(interp, listObjPtr);
-	}
-    }
-    /* Clean up. */
-    Tcl_PopCallFrame(interp);
-    Tcl_DeleteNamespace(nsPtr);
-    Blt_DeleteHashEntry(&dataPtr->findTable, hPtr);
-    Blt_FreeCachedVars(&findPtr->varTable);
-    return result;
-}
-
-static int
-CopyColumn(Tcl_Interp *interp, Blt_Table srcTable, Blt_Table destTable,
-    Blt_TableColumn src,		/* Column in the source table. */
-    Blt_TableColumn dest)		/* Column in the destination table. */
-{
-    long i;
-
-    if ((Blt_Table_SameTableObject(srcTable, destTable)) && (src == dest)) {
-	return TCL_OK;		/* Source and destination are the same. */
-    }
-    if (Blt_Table_NumRows(srcTable) >  Blt_Table_NumRows(destTable)) {
-	long need;
-
-	need = (Blt_Table_NumRows(srcTable) - Blt_Table_NumRows(destTable));
-	if (Blt_Table_ExtendRows(interp, destTable, need, NULL) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    Blt_Table_SetColumnType(destTable, dest, Blt_Table_ColumnType(src));
-    for (i = 1; i <= Blt_Table_NumRows(srcTable); i++) {
-	Blt_TableRow row;
-	Blt_TableValue value;
-
-	row = Blt_Table_Row(srcTable, i);
-	value = Blt_Table_GetValue(srcTable, row, src);
-	row = Blt_Table_Row(destTable, i);
-	if (Blt_Table_SetValue(destTable, row, dest, value) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}	    
-
-static void
-CopyColumnTags(Blt_Table srcTable, Blt_Table destTable,
-	       Blt_TableColumn src,	/* Column in the source table. */
-	       Blt_TableColumn dest)	/* Column in the destination table. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    /* Find all tags for with this column index. */
-    for (hPtr = Blt_Table_FirstColumnTag(srcTable, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	Blt_HashEntry *h2Ptr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)src);
-	if (h2Ptr != NULL) {
-	    /* We know the tag tables are keyed by strings, so we don't need
-	     * to call Blt_GetHashKey or use the hash table pointer to
-	     * retrieve the key. */
-	    Blt_Table_SetColumnTag(NULL, destTable, dest, hPtr->key.string);
-	}
-    }
-}	    
-
-/************* Column Operations ****************/
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnCopyOp --
- *
- *	Copies the specified columns to the table.  A different table may be
- *	selected as the source.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$dest column copy $srccol $destcol ?-table srcTable?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnCopyOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CopySwitches switches;
-    Blt_Table srcTable, destTable;
-    int result;
-    Blt_TableColumn src, dest;
-
-    /* Process switches following the column names. */
-    switches.flags = 0;
-    switches.table = NULL;
-    result = TCL_ERROR;
-    if (Blt_ParseSwitches(interp, copySwitches, objc - 5, objv + 5, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    srcTable = destTable = cmdPtr->table;
-    if (switches.table != NULL) {
-	srcTable = switches.table;
-    }
-    src = Blt_Table_FindColumn(interp, srcTable, objv[3]);
-    if (src == NULL) {
-	goto error;
-    }
-    dest = Blt_Table_FindColumn(interp, destTable, objv[4]);
-    if (dest == NULL) {
-	dest = Blt_Table_CreateColumn(interp, destTable,Tcl_GetString(objv[4]));
-	if (dest == NULL) {
-	    goto error;
-	}
-    }
-    if (CopyColumn(interp, srcTable, destTable, src, dest) != TCL_OK) {
-	goto error;
-    }
-    if ((switches.flags & COPY_NOTAGS) == 0) {
-	CopyColumnTags(srcTable, destTable, src, dest);
-    }
-    result = TCL_OK;
- error:
-    Blt_FreeSwitches(copySwitches, &switches, 0);
-    return result;
-    
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnDeleteOp --
- *
- *	Deletes the columns designated.  One or more columns may be deleted
- *	using a tag.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column delete ?column?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Blt_TableColumn col;
-    int result;
-
-    result = TCL_ERROR;
-    if (Blt_Table_IterateColumnsObjv(interp, cmdPtr->table, objc - 3, objv + 3, 
-	&iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* 
-     * Walk through the list of column offsets, deleting each column.
-     */
-    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&iter)) {
-	if (Blt_Table_DeleteColumn(cmdPtr->table, col) != TCL_OK) {
-	    goto error;
-	}
-    }
-    result = TCL_OK;
- error:
-    Blt_Table_FreeIteratorObjv(&iter);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnDupOp --
- *
- *	Duplicates the specified columns in the table.  This differs from
- *	ColumnCopyOp, since the same table is the source and destination.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$dest column dup column... 
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnDupOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Tcl_Obj *listObjPtr;
-    Blt_TableIterator iter;
-    Blt_TableColumn src;
-
-    table = cmdPtr->table;
-    listObjPtr = NULL;
-    if (Blt_Table_IterateColumnsObjv(interp, table, objc - 3, objv + 3, &iter) 
-	!= TCL_OK) {
-	goto error;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (src = Blt_Table_FirstTaggedColumn(&iter); src != NULL; 
-	 src = Blt_Table_NextTaggedColumn(&iter)) {
-	long i;
-	Blt_TableColumn dest;
-
-	dest = Blt_Table_CreateColumn(interp, table,Blt_Table_ColumnLabel(src));
-	if (dest == NULL) {
-	    goto error;
-	}
-	if (CopyColumn(interp, table, table, src, dest) != TCL_OK) {
-	    goto error;
-	}
-	CopyColumnTags(table, table, src, dest);
-	i = Blt_Table_ColumnIndex(dest);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(i));
-    }
-    Blt_Table_FreeIteratorObjv(&iter);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
- error:
-    Blt_Table_FreeIteratorObjv(&iter);
-    if (listObjPtr != NULL) {
-	Tcl_DecrRefCount(listObjPtr);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnExistsOp --
- *
- *	Indicates is the given column exists.  The column description can be
- *	either an index, label, or single tag.
- *
- *	Problem: The Blt_Table_IterateColumns function checks both for
- *		 1) valid/invalid indices, labels, and tags and 2) 
- *		 syntax errors.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column exists n
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnExistsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableColumn col;
-    int bool;
-
-    col = Blt_Table_FindColumn(NULL, cmdPtr->table, objv[3]);
-    bool = (col != NULL);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnExtendOp --
- *
- *	Extends the table by the given number of columns.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column extend n 
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnExtendOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Tcl_Obj *listObjPtr;
-    Blt_TableColumn *cols;
-    long i, n;
-    int addLabels;
-
-    table = cmdPtr->table;
-    if (objc == 3) {
-	return TCL_OK;
-    }
-    n = 0;
-    addLabels = FALSE;
-    if (objc == 4) {
-	long lcount;
-
-	if (Tcl_GetLongFromObj(NULL, objv[3], &lcount) == TCL_OK) {
-	    if (lcount < 0) {
-		Tcl_AppendResult(interp, "bad count \"", Blt_Itoa(lcount), 
-			"\": # columns can't be negative.", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    n = lcount;
-	} else {
-	    addLabels = TRUE;
-	    n = 1;
-	} 
-    } else {
-	addLabels = TRUE;
-	n = objc - 3;
-    }	    
-    if (n == 0) {
-	return TCL_OK;
-    }
-    cols = Blt_AssertMalloc(n * sizeof(Blt_TableColumn));
-    if (Blt_Table_ExtendColumns(interp, table, n, cols) != TCL_OK) {
-	goto error;
-    }
-    if (addLabels) {
-	long j;
-
-	for (i = 0, j = 3; i < n; i++, j++) {
-	    if (Blt_Table_SetColumnLabel(interp, table, cols[i], 
-			Tcl_GetString(objv[j])) != TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (i = 0; i < n; i++) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewLongObj(Blt_Table_ColumnIndex(cols[i]));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    Blt_Free(cols);
-    return TCL_OK;
- error:
-    Blt_Free(cols);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnGetOp --
- *
- *	Retrieves a column of values.  The column argument can be either a
- *	tag, label, or column index.  If it is a tag, it must refer to exactly
- *	one column.  If row arguments exist they must refer to label or row.
- *	We always return the row label.
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the column index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t column get $c ?row...? 
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnGetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Tcl_Obj *listObjPtr;
-    Blt_TableColumn col;
-
-    table = cmdPtr->table;
-    col = Blt_Table_FindColumn(interp, cmdPtr->table, objv[3]);
-    if (col == NULL) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 4) {
-	Blt_TableRow row;
-
-	for (row = Blt_Table_FirstRow(cmdPtr->table); row != NULL;
-	     row = Blt_Table_NextRow(cmdPtr->table, row)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewLongObj(Blt_Table_RowIndex(row));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Blt_Table_GetObj(cmdPtr->table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_TableIterator iter;
-	Blt_TableRow row;
-
-	if (Blt_Table_IterateRowsObjv(interp, table, objc - 4, objv + 4, &iter) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewLongObj(Blt_Table_RowIndex(row));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Blt_Table_GetObj(cmdPtr->table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnIndexOp --
- *
- *	Returns the column index of the given column tag, label, or index.  A
- *	tag can't represent more than one column.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column index $column
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnIndexOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableColumn col;
-    long i;
-
-    i = -1;
-    col = Blt_Table_FindColumn(NULL, cmdPtr->table, objv[3]);
-    if (col != NULL) {
-	i = Blt_Table_ColumnIndex(col);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), i);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnIndicesOp --
- *
- *	Returns a list of indices for the given columns.  
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column indices $col $col
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnIndicesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_TableIterator iter;
-    Blt_TableColumn col;
-
-    if (Blt_Table_IterateColumnsObjv(interp, cmdPtr->table, objc - 3, objv + 3,
-		&iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&iter)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewLongObj(Blt_Table_ColumnIndex(col));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    Blt_Table_FreeIteratorObjv(&iter);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnCreateOp --
- *
- *	Creates a single new column in the table.  The location of the new
- *	column may be specified by -before or -after switches.  By default the
- *	new column is added to the end of the table.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column insert -before 0 -after 1 -label label
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnCreateOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    InsertSwitches switches;
-    Blt_TableColumn col;
-    unsigned int flags;
-
-    switches.column = NULL;
-    switches.label = NULL;
-    switches.tags = NULL;
-    switches.cmdPtr = cmdPtr;
-    switches.type = TABLE_COLUMN_TYPE_STRING;
-
-    flags = INSERT_COL;
-    if (Blt_ParseSwitches(interp, insertSwitches, objc - 3, objv + 3, 
-	&switches, flags) < 0) {
-	goto error;
-    }
-    col = Blt_Table_CreateColumn(interp, cmdPtr->table, switches.label);
-    if (col == NULL) {
-	goto error;
-    }
-    Blt_Table_SetColumnType(cmdPtr->table, col, switches.type);
-    if (switches.column != NULL) {
-	if (Blt_Table_MoveColumns(interp, cmdPtr->table, col, 
-		switches.column, 1) != TCL_OK) {
-	    goto error;
-	}
-    }
-    if (switches.tags != NULL) {
-	Tcl_Obj **elv;
-	int elc;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, switches.tags, &elc, &elv) 
-	    != TCL_OK) {
-	    goto error;
-	}
-	for (i = 0; i < elc; i++) {
-	    if (Blt_Table_SetColumnTag(interp, cmdPtr->table, col, 
-			Tcl_GetString(elv[i])) != TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, Tcl_NewLongObj(Blt_Table_ColumnIndex(col)));
-    Blt_FreeSwitches(insertSwitches, &switches, flags);
-    return TCL_OK;
- error:
-    Blt_FreeSwitches(insertSwitches, &switches, flags);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnLabelOp --
- *
- *	Gets/sets one or more column labels.  
- * 
- * Results:
- *	A standard TCL result.  If successful, the old column label is
- *	returned in the interpreter result.  If the column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *	
- * Example:
- *	$t column label column ?label? ?column label? 
- *	$t column label 1
- *	$t column label 1 newLabel 
- *	$t column label 1 lab1 2 lab2 3 lab3 5 lab5
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnLabelOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    if (objc == 4) {
-	const char *label;
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objv[3]);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-	label = Blt_Table_ColumnLabel(col);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), label, -1);
-    }  else {
-	int i;
-	
-	if ((objc - 3) & 1) {
-	    Tcl_AppendResult(interp,"odd # of column/label pairs: should be \"",
-		Tcl_GetString(objv[0]), " column label ?column label?...", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (i = 3; i < objc; i += 2) {
-	    Blt_TableColumn col;
-
-	    col = Blt_Table_FindColumn(interp, table, objv[i]);
-	    if (col == NULL) {
-		return TCL_ERROR;
-	    }
-	    if (Blt_Table_SetColumnLabel(interp, table, col, 
-			Tcl_GetString(objv[i+1])) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnLabelsOp --
- *
- *	Gets/sets all the column labels in the table.  
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  
- *	
- * Example:
- *	$t column labels ?labelList?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnLabelsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    if (objc == 4) {
-	Blt_TableColumn col;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (col = Blt_Table_FirstColumn(cmdPtr->table); col != NULL;
-	     col = Blt_Table_NextColumn(cmdPtr->table, col)) {
-	    const char *label;
-	    Tcl_Obj *objPtr;
-	    
-	    label = Blt_Table_ColumnLabel(col);
-	    objPtr = Tcl_NewStringObj(label, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	Tcl_Obj **elv;
-	int elc, n;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, objv[4], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	n = MIN(elc, Blt_Table_NumColumns(table));
-	for (i = 0; i < n; i++) {
-	    Blt_TableColumn col;
-
-	    col = Blt_Table_Column(table, i + 1);
-	    if (Blt_Table_SetColumnLabel(interp, table, col, 
-			Tcl_GetString(elv[i])) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnLengthOp --
- *
- *	Returns the number of columns the client sees.
- * 
- * Results:
- *	A standard TCL result.  If successful, the old column label is
- *	returned in the interpreter result.  If the column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *	
- * Example:
- *	$t column length 
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnLengthOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), 
-		   Blt_Table_NumColumns(cmdPtr->table));
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnMoveOp --
- *
- *	Moves the given number of columns to another location in the table.
- * 
- * Results:
- *	A standard TCL result. If the column index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t column move from to ?n?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnMoveOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableColumn from, to;
-    long count;
-
-    from = Blt_Table_FindColumn(interp, cmdPtr->table, objv[3]);
-    if (from == NULL) {
-	return TCL_ERROR;
-    }
-    to = Blt_Table_FindColumn(interp, cmdPtr->table, objv[4]);
-    if (to == NULL) {
-	return TCL_ERROR;
-    }
-    count = 1;
-    if (objc == 6) {
-	long lcount;
-
-	if (Tcl_GetLongFromObj(interp, objv[5], &lcount) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (lcount == 0) {
-	    return TCL_OK;
-	}
-	if (lcount < 0) {
-	    Tcl_AppendResult(interp, 
-			"can't move columns: # of columns can't be negative",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	count = lcount;
-    }
-    return Blt_Table_MoveColumns(interp, cmdPtr->table, from, to, count);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnNamesOp --
- *
- *	Reports the labels of all columns.  
- * 
- * Results:
- *	Always returns TCL_OK.  The interpreter result is a list of column
- *	labels.
- *	
- * Example:
- *	$t column names pattern 
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnNamesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_TableColumn col;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (col = Blt_Table_FirstColumn(cmdPtr->table); col != NULL;
-	 col = Blt_Table_NextColumn(cmdPtr->table, col)) {
-	const char *label;
-	int match;
-	int i;
-
-	label = Blt_Table_ColumnLabel(col);
-	match = (objc == 3);
-	for (i = 3; i < objc; i++) {
-	    char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    if (Tcl_StringMatch(label, pattern)) {
-		match = TRUE;
-		break;
-	    }
-	}
-	if (match) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(label, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnNotifyOp --
- *
- *	Creates a notifier for this instance.  Notifiers represent a bitmask
- *	of events and a command prefix to be invoked when a matching event
- *	occurs.
- *
- *	The command prefix is parsed and saved in an array of Tcl_Objs. Extra
- *	slots are allocated for the
- *
- * Results:
- *	A standard TCL result.  The name of the new notifier is returned in
- *	the interpreter result.  Otherwise, if it failed to parse a switch,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- * Example:
- *	table0 column notify col ?flags? command arg
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnNotifyOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableColumn col;
-    Blt_TableRowColumnSpec spec;
-    NotifierInfo *niPtr;
-    NotifySwitches switches;
-    const char *tag, *string;
-    int count, i;
-    int nArgs;
-
-    table = cmdPtr->table;
-    spec = Blt_Table_ColumnSpec(table, objv[3], &string);
-    col = NULL;
-    tag = NULL;
-    if (spec == TABLE_SPEC_TAG) {
-	tag = string;
-    } else {
-	col = Blt_Table_FindColumn(interp, table, objv[3]);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    count = 0;
-    for (i = 4; i < objc; i++) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] != '-') {
-	    break;
-	}
-	count++;
-    }
-    switches.flags = 0;
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, notifySwitches, count, objv + 4, &switches, 
-	0) < 0) {
-	return TCL_ERROR;
-    }
-    niPtr = Blt_AssertMalloc(sizeof(NotifierInfo));
-    niPtr->cmdPtr = cmdPtr;
-    if (tag == NULL) {
-	niPtr->notifier = Blt_Table_CreateColumnNotifier(interp, cmdPtr->table,
-		col, switches.flags, NotifyProc, NotifierDeleteProc, niPtr);
-    } else {
-	niPtr->notifier = Blt_Table_CreateColumnTagNotifier(interp, 
-		cmdPtr->table, tag, switches.flags, NotifyProc, 
-		NotifierDeleteProc, niPtr);
-    }	
-    nArgs = (objc - i) + 2;
-    /* Stash away the command in structure and pass that to the notifier. */
-    niPtr->cmdv = Blt_AssertMalloc(nArgs * sizeof(Tcl_Obj *));
-    for (count = 0; i < objc; i++, count++) {
-	Tcl_IncrRefCount(objv[i]);
-	niPtr->cmdv[count] = objv[i];
-    }
-    niPtr->cmdc = nArgs;
-    if (switches.flags == 0) {
-	switches.flags = TABLE_NOTIFY_ALL_EVENTS;
-    }
-    {
-	char notifyId[200];
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	sprintf_s(notifyId, 200, "notify%d", cmdPtr->nextNotifyId++);
-	hPtr = Blt_CreateHashEntry(&cmdPtr->notifyTable, notifyId, &isNew);
-	assert(isNew);
-	Blt_SetHashValue(hPtr, niPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), notifyId, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnSetOp --
- *
- *	Sets one of values in a column.  One or more columns may be set using
- *	a tag.  The row order is always the table's current view of the table.
- *	There may be less values than needed.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *	
- * Example:
- *	$t column set $column a 1 b 2 c 3
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnSetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Blt_TableColumn col;
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    /* May set more than one row with the same values. */
-    if (IterateColumns(interp, table, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	return TCL_OK;
-    }
-    if ((objc - 4) & 1) {
-	Tcl_AppendResult(interp, "odd # of row/value pairs: should be \"", 
-		Tcl_GetString(objv[0]), " column assign col row value...", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&iter)) {
-	long i;
-
-	/* The remaining arguments are index/value pairs. */
-	for (i = 4; i < objc; i += 2) {
-	    Blt_TableRow row;
-
-	    row = Blt_Table_FindRow(interp, table, objv[i]);
-	    if (row == NULL) {
-		/* Can't find the row. Create it and try to find it again. */
-		if (MakeRows(interp, table, objv[i]) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		row = Blt_Table_FindRow(interp, table, objv[i]);
-	    }
-#ifdef notdef
-	    fprintf(stderr, "setobjvalue %d,%d %s\n",
-		    Blt_Table_RowIndex(row), Blt_Table_ColumnIndex(col),
-		    Tcl_GetString(objv[i+1]));
-#endif
-	    if (Blt_Table_SetObj(table, row, col, objv[i+1]) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagAddOp --
- *
- *	Adds a given tag to one or more columns.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all" or "end").
- *
- *	.t column tag add tag ?column...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagAddOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-    const char *tagName;
-
-    table = cmdPtr->table;
-    tagName = Tcl_GetString(objv[4]);
-    for (i = 5; i < objc; i++) {
-	Blt_TableColumn col;
-	Blt_TableIterator iter;
-
-	if (Blt_Table_IterateColumns(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    if (Blt_Table_SetColumnTag(interp, table, col, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagDeleteOp --
- *
- *	Removes a given tag from one or more columns. If a tag doesn't exist or
- *	is a reserved tag ("all" or "end"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t column tag delete tag ?column...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-    const char *tagName;
-
-    table = cmdPtr->table;
-    tagName = Tcl_GetString(objv[4]);
-    for (i = 5; i < objc; i++) {
-	Blt_TableColumn col;
-	
-	if (Blt_Table_IterateColumns(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    if (Blt_Table_UnsetColumnTag(interp, table, col, tagName)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagExistsOp --
- *
- *	Returns the existence of a tag in the table.  If a column is 
- *	specified then the tag is search for for that column.
- *
- *	.t tag column exists tag ?column?
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnTagExistsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    int bool;
-    const char *tagName;
-    Blt_Table table;
-
-    tagName = Tcl_GetString(objv[3]);
-    table = cmdPtr->table;
-    bool = (Blt_Table_FindColumnTagTable(table, tagName) != NULL);
-    if (objc == 5) {
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objv[4]);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-	bool = Blt_Table_HasColumnTag(table, col, tagName);
-    } 
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagForgetOp --
- *
- *	Removes the given tags from all nodes.
- *
- * Example:
- *	$t column tag forget tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnTagForgetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 4; i < objc; i++) {
-	if (Blt_Table_ForgetColumnTag(interp, cmdPtr->table, 
-		Tcl_GetString(objv[i])) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagGetOp --
- *
- *	Returns the tag names for a given column.  If one of more pattern
- *	arguments are provided, then only those matching tags are returned.
- *
- *	.t column tag get column pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagGetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch hsearch;
-    Blt_HashTable tagTable;
-    Blt_Table table;
-    Blt_TableColumn col;
-    Blt_TableIterator iter;
-    Tcl_Obj *listObjPtr;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-
-    Blt_InitHashTable(&tagTable, BLT_STRING_KEYS);
-    
-    /* Collect all the tags into a hash table. */
-    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&iter)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_Table_ColumnTags(table, col);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    const char *tagName;
-	    int isNew;
-
-	    tagName = Blt_Chain_GetValue(link);
-	    Blt_CreateHashEntry(&tagTable, tagName, &isNew);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-    for (hPtr = Blt_FirstHashEntry(&tagTable, &hsearch); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&hsearch)) {
-	int match;
-	const char *tagName;
-
-	tagName = Blt_GetHashKey(&tagTable, hPtr);
-	match = TRUE;
-	if (objc > 5) {
-	    int i;
-
-	    match = FALSE;
-	    for (i = 5; i < objc; i++) {
-		if (Tcl_StringMatch(tagName, Tcl_GetString(objv[i]))) {
-		    match = TRUE;
-		}
-	    }
-	}
-	if (match) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Blt_DeleteHashTable(&tagTable);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagIndicesOp --
- *
- *	Returns column indices names for the given tags.  If one of more tag
- *	names are provided, then only those matching indices are returned.
- *
- * Example:
- *	.t column tag indices tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagIndicesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		   Tcl_Obj *const *objv)
-{
-    int i;
-    unsigned char *matches;
-    long nCols;
-
-    nCols = Blt_Table_NumColumns(cmdPtr->table);
-    matches = Blt_AssertCalloc(nCols + 1, sizeof(unsigned char));
-
-    /* Handle the reserved tags "all" or "end". */
-    for (i = 4; i < objc; i++) {
-	char *tagName;
-	long j;
-
-	tagName = Tcl_GetString(objv[i]);
-	if (strcmp("all", tagName) == 0) {
-	    for (j = 1; j <= nCols; j++) {
-		matches[j] = TRUE;
-	    }
-	    goto done;		/* Don't care other tags. */
-	} 
-	if (strcmp("end", tagName) == 0) {
-	    matches[nCols] = TRUE;
-	}
-    }
-    /* Now check user-defined tags. */
-    for (i = 4; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Blt_HashTable *tagTablePtr;
-	const char *tagName;
-	
-	tagName = Tcl_GetString(objv[i]);
-	if ((strcmp("all", tagName) == 0) || (strcmp("end", tagName) == 0)) {
-	    continue;
-	}
-	tagTablePtr = Blt_Table_FindColumnTagTable(cmdPtr->table, tagName);
-	if (tagTablePtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown column tag \"", tagName, "\"",
-		(char *)NULL);
-	    Blt_Free(matches);
-	    return TCL_ERROR;
-	}
-	for (hPtr = Blt_FirstHashEntry(tagTablePtr, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_TableColumn col;
-	    long j;
-
-	    col = Blt_GetHashValue(hPtr);
-	    j = Blt_Table_ColumnIndex(col);
-	    assert(j >= 0);
-	    matches[j] = TRUE;
-	}
-    }
-
- done:
-    {
-	Tcl_Obj *listObjPtr;
-	long j;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (j = 1; j <= nCols; j++) {
-	    if (matches[j]) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(j));
-	    }
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_Free(matches);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagRangeOp --
- *
- *	Adds one or more tags for a given column.  Tag names can't start with
- *	a digit (to distinquish them from node ids) and can't be a reserved
- *	tag ("all" or "end").
- *
- * Example:
- *	.t column tag range $from $to tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagRangeOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableColumn from, to;
-    int i;
-
-    table = cmdPtr->table;
-    from = Blt_Table_FindColumn(interp, table, objv[4]);
-    if (from == NULL) {
-	return TCL_ERROR;
-    }
-    to = Blt_Table_FindColumn(interp, table, objv[5]);
-    if (to == NULL) {
-	return TCL_ERROR;
-    }
-    if (Blt_Table_ColumnIndex(from) > Blt_Table_ColumnIndex(to)) {
-	Blt_TableColumn tmp;
-	tmp = to, to = from, from = tmp;
-    }
-    for (i = 6; i < objc; i++) {
-	const char *tagName;
-	long j;
-	
-	tagName = Tcl_GetString(objv[i]);
-	for (j = Blt_Table_ColumnIndex(from); j <= Blt_Table_ColumnIndex(to); 
-	     j++) {
-	    Blt_TableColumn col;
-
-	    col = Blt_Table_Column(table, j);
-	    if (Blt_Table_SetColumnTag(interp, table, col, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagSearchOp --
- *
- *	Returns tag names for a given column.  If one of more pattern
- *	arguments are provided, then only those matching tags are returned.
- *
- * Example:
- *	.t column tag find $column pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagSearchOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Tcl_Obj *listObjPtr;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_Table_FirstColumnTag(table, &cursor); hPtr != NULL; 
-	hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_HashTable *tablePtr;
-	Blt_TableColumn col;
-
-	tablePtr = Blt_GetHashValue(hPtr);
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    Blt_HashEntry *h2Ptr;
-	
-	    h2Ptr = Blt_FindHashEntry(tablePtr, (char *)col);
-	    if (h2Ptr != NULL) {
-		const char *tagName;
-		int match;
-		int i;
-
-		match = (objc == 5);
-		tagName = hPtr->key.string;
-		for (i = 5; i < objc; i++) {
-		    if (Tcl_StringMatch(tagName, Tcl_GetString(objv[i]))) {
-			match = TRUE;
-			break;	/* Found match. */
-		    }
-		}
-		if (match) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj(tagName, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;	/* Tag matches this column. Don't care if it
-				 * matches any other columns. */
-		}
-	    }
-	}
-    }
-
-    /* Handle reserved tags specially. */
-    {
-	int i;
-	int allMatch, endMatch;
-
-	endMatch = allMatch = (objc == 5);
-	for (i = 5; i < objc; i++) {
-	    if (Tcl_StringMatch("all", Tcl_GetString(objv[i]))) {
-		allMatch = TRUE;
-	    }
-	    if (Tcl_StringMatch("end", Tcl_GetString(objv[i]))) {
-		endMatch = TRUE;
-	    }
-	}
-	if (allMatch) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj("all", 3));
-	}
-	if (endMatch) {
-	    Blt_TableColumn col, lastCol;
-	    
-	    lastCol = Blt_Table_Column(table, Blt_Table_NumColumns(table));
-	    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-		 col = Blt_Table_NextTaggedColumn(&iter)) {
-		if (col == lastCol) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr,
-			Tcl_NewStringObj("end", 3));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagSetOp --
- *
- *	Adds one or more tags for a given column.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all" or "end").
- *
- *	.t column tag set $column tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagSetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 5; i < objc; i++) {
-	const char *tagName;
-	Blt_TableColumn col;
-
-	tagName = Tcl_GetString(objv[i]);
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    if (Blt_Table_SetColumnTag(interp, table, col, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagUnsetOp --
- *
- *	Removes one or more tags from a given column. If a tag doesn't exist or
- *	is a reserved tag ("all" or "end"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t column tag unset $column tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTagUnsetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 5; i < objc; i++) {
-	const char *tagName;
-	Blt_TableColumn col;
-	
-	tagName = Tcl_GetString(objv[i]);
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    if (Blt_Table_UnsetColumnTag(interp, table, col, tagName)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }    
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTagOp --
- *
- * 	This procedure is invoked to process tag operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec columnTagOps[] =
-{
-    {"add",     1, ColumnTagAddOp,     5, 0, "tag ?column...?",},
-    {"delete",  1, ColumnTagDeleteOp,  5, 0, "tag ?column...?",},
-    {"exists",  1, ColumnTagExistsOp,  4, 5, "tag ?column?",},
-    {"forget",  1, ColumnTagForgetOp,  4, 0, "?tag...?",},
-    {"get",     1, ColumnTagGetOp,     5, 0, "column ?pattern...?",},
-    {"indices", 1, ColumnTagIndicesOp, 4, 0, "?tag...?",},
-    {"range",   1, ColumnTagRangeOp,   6, 0, "from to ?tag...?",},
-    {"search",  3, ColumnTagSearchOp,  5, 6, "column ?pattern?",},
-    {"set",     3, ColumnTagSetOp,     5, 0, "column tag...",},
-    {"unset",   1, ColumnTagUnsetOp,   5, 0, "column tag...",},
-
-};
-
-static int nColumnTagOps = sizeof(columnTagOps) / sizeof(Blt_OpSpec);
-
-static int
-ColumnTagOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nColumnTagOps, columnTagOps, BLT_OP_ARG3,
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTraceOp --
- *
- *	Creates a trace for this instance.  Traces represent list of keys, a
- *	bitmask of trace flags, and a command prefix to be invoked when a
- *	matching trace event occurs.
- *
- *	The command prefix is parsed and saved in an array of Tcl_Objs. The
- *	qualified name of the instance is saved also.
- *
- * Results:
- *	A standard TCL result.  The name of the new trace is returned in the
- *	interpreter result.  Otherwise, if it failed to parse a switch, then
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column trace tag rwx proc 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnTraceOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Blt_TableTrace trace;
-    TraceInfo *tiPtr;
-    const char *tag;
-    int flags;
-    Blt_TableColumn col;
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = GetTraceFlags(Tcl_GetString(objv[4]));
-    if (flags < 0) {
-	Tcl_AppendResult(interp, "unknown flag in \"", Tcl_GetString(objv[4]), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    col = NULL;
-    tag = NULL;
-    if (iter.type == TABLE_ITERATOR_RANGE) {
-	Tcl_AppendResult(interp, "can't trace range of columns: use a tag", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((iter.type == TABLE_ITERATOR_INDEX) || 
-	(iter.type == TABLE_ITERATOR_LABEL)) {
-	col = Blt_Table_FirstTaggedColumn(&iter);
-    } else {
-	tag = iter.tagName;
-    } 
-    tiPtr = Blt_Malloc(sizeof(TraceInfo));
-    if (tiPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate trace: out of memory", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    trace = Blt_Table_CreateTrace(table, NULL, col, NULL, tag, flags, 
-	TraceProc, TraceDeleteProc, tiPtr);
-    if (trace == NULL) {
-	Tcl_AppendResult(interp, "can't create column trace: out of memory", 
-		(char *)NULL);
-	Blt_Free(tiPtr);
-	return TCL_ERROR;
-    }
-    /* Initialize the trace information structure. */
-    tiPtr->cmdPtr = cmdPtr;
-    tiPtr->trace = trace;
-    tiPtr->tablePtr = &cmdPtr->traceTable;
-    {
-	Tcl_Obj **elv, **cmdv;
-	int elc, i;
-
-	if (Tcl_ListObjGetElements(interp, objv[5], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	cmdv = Blt_AssertCalloc(elc + 1 + 3 + 1, sizeof(Tcl_Obj *));
-	for(i = 0; i < elc; i++) {
-	    cmdv[i] = elv[i];
-	    Tcl_IncrRefCount(cmdv[i]);
-	}
-	cmdv[i] = Tcl_NewStringObj(cmdPtr->hPtr->key.string, -1);
-	Tcl_IncrRefCount(cmdv[i]);
-	tiPtr->cmdc = elc;
-	tiPtr->cmdv = cmdv;
-    }
-    {
-	char traceId[200];
-	int isNew;
-
-	sprintf_s(traceId, 200, "trace%d", cmdPtr->nextTraceId++);
-	tiPtr->hPtr = Blt_CreateHashEntry(&cmdPtr->traceTable, traceId, &isNew);
-	Blt_SetHashValue(tiPtr->hPtr, tiPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), traceId, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnTypeOp --
- *
- *	Reports and/or sets the type of a column.  
- * 
- * Results:
- *	A standard TCL result.  If successful, the old column label is
- *	returned in the interpreter result.  If the column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *	
- * Example:
- *	$t column type column ?newType?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnTypeOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Tcl_Obj *listObjPtr;
-    Blt_TableColumn col;
-    Blt_Table table;
-    Blt_TableColumnType type;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateColumns(interp, table, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 5) {
-	type = Blt_Table_GetColumnType(Tcl_GetString(objv[4]));
-	if (type == TABLE_COLUMN_TYPE_UNKNOWN) {
-	    Tcl_AppendResult(interp, "unknown column type \"", 
-			     Tcl_GetString(objv[4]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&iter)) {
-	Tcl_Obj *objPtr;
-
-	if (objc == 5) {
-	    if (Blt_Table_SetColumnType(table, col, type) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	type = Blt_Table_ColumnType(col);
-	objPtr = Tcl_NewStringObj(Blt_Table_NameOfType(type), -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnUnsetOp --
- *
- *	Unsets one or more columns of values.  One or more columns may be
- *	unset (using tags or multiple arguments). It's an error if the column
- *	doesn't exist.
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *	
- * Example:
- *	$t column unset column ?column?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnUnsetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    for (i = 3; i < objc; i++) {
-	Blt_TableIterator iter;
-	Blt_TableColumn col;
-
-	if (Blt_Table_IterateColumns(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    Blt_TableRow row;
-
-	    for (row = Blt_Table_FirstRow(table); row != NULL;
-		 row = Blt_Table_NextRow(table, row)) {
-		if (Blt_Table_UnsetValue(table, row, col) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnUniqueOp --
- *
- *	Reports the unique values for a given column.  
- * 
- * Results:
- *	A standard TCL result. If the tag or column index is invalid,
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column unique column
- *	
- *---------------------------------------------------------------------------
- */
-static int
-ColumnUniqueOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashTable values;
-    Blt_Table table;
-    Tcl_Obj *listObjPtr;
-    Blt_TableColumn col;
-    Blt_TableRow row;
-    UniqueSwitches switches;
-
-    table = cmdPtr->table;
-    col = Blt_Table_FindColumn(interp, table, objv[3]);
-    if (col == NULL) {
-	return TCL_ERROR;
-    }
-    switches.flags = 0;
-    if (Blt_ParseSwitches(interp, uniqueSwitches, objc - 4, objv + 4, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    Blt_InitHashTableWithPool(&values, BLT_STRING_KEYS);
-    for (row = Blt_Table_FirstRow(table); row != NULL;
-	 row = Blt_Table_NextRow(table, row)) {
-	Blt_HashEntry *hPtr;
-	const char *string;
-	int isNew;
-	long refCount;
-	
-	string = Blt_Table_GetString(table, row, col);
-	if (string == NULL) {
-	    string = cmdPtr->emptyValue;
-	}
-	hPtr = Blt_CreateHashEntry(&values, string, &isNew);
-	if (isNew) {
-	    refCount = 0;
-	} else {
-	    refCount = (long)Blt_GetHashValue(hPtr);
-	}
-	refCount++;
-	Blt_SetHashValue(hPtr, (long)refCount);
-    }
-    listObjPtr = SortColumnValues(interp, &values, switches.flags);
-    Blt_DeleteHashTable(&values);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnValuesOp --
- *
- *	Retrieves a column of values.  The column argument can be either a
- *	tag, label, or column index.  If it is a tag, it must refer to exactly
- *	one column.
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the column index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t column values column ?valueList?
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnValuesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableColumn col;
-
-    table = cmdPtr->table;
-    col = Blt_Table_FindColumn(interp, cmdPtr->table, objv[3]);
-    if (col == NULL) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	Blt_TableRow row;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (row = Blt_Table_FirstRow(cmdPtr->table); row != NULL;
-	     row = Blt_Table_NextRow(cmdPtr->table, row)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Blt_Table_GetObj(cmdPtr->table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	Tcl_Obj **elv;
-	int elc;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, objv[4], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (elc > Blt_Table_NumRows(table)) {
-	    long needed;
-
-	    needed = elc - Blt_Table_NumRows(table);
-	    if (Blt_Table_ExtendRows(interp, table, needed, NULL) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	for (i = 0; i < elc; i++) {
-	    Blt_TableRow row;
-
-	    row = Blt_Table_Row(table, i + 1);
-	    if (Blt_Table_SetObj(table, row, col, elv[i]) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnOp --
- *
- *	Parses the given command line and calls one of several column-specific
- *	operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec columnOps[] =
-{
-    {"copy",   2, ColumnCopyOp,    4, 0, "src dest ?switches...?",},
-    {"create", 2, ColumnCreateOp,  3, 0, "?switches?",},
-    {"delete", 2, ColumnDeleteOp,  4, 0, "column...",},
-    {"dup",    2, ColumnDupOp,     3, 0, "column...",},
-    {"exists", 3, ColumnExistsOp,  4, 4, "column",},
-    {"extend", 3, ColumnExtendOp,  4, 0, "label ?label...?",},
-    {"get",    1, ColumnGetOp,     4, 0, "column ?switches?",},
-    {"index",  4, ColumnIndexOp,   4, 4, "column",},
-    {"indices",4, ColumnIndicesOp, 3, 0, "column ?column...?",},
-    {"label",  5, ColumnLabelOp,   4, 0, "column ?label?",},
-    {"labels", 6, ColumnLabelsOp,  3, 4, "?labelList?",},
-    {"length", 2, ColumnLengthOp,  3, 3, "",},
-    {"move",   1, ColumnMoveOp,    5, 6, "from to ?count?",},
-    {"names",  2, ColumnNamesOp,   3, 0, "?pattern...?",},
-    {"notify", 2, ColumnNotifyOp,  5, 0, "column ?flags? command",},
-    {"set",    2, ColumnSetOp,     5, 0, "column row value...",},
-    {"tag",    2, ColumnTagOp,     3, 0, "op args...",},
-    {"trace",  2, ColumnTraceOp,   6, 6, "column how command",},
-    {"type",   2, ColumnTypeOp,    4, 5, "column ?type?",},
-    {"unique", 3, ColumnUniqueOp,  4, 0, "column ?switches?",},
-    {"unset",  3, ColumnUnsetOp,   4, 0, "column...",},
-    {"values", 1, ColumnValuesOp,  4, 5, "column ?valueList?",},
-};
-
-static int nColumnOps = sizeof(columnOps) / sizeof(Blt_OpSpec);
-
-static int
-ColumnOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nColumnOps, columnOps, BLT_OP_ARG2, objc, 
-	objv, BLT_OP_LINEAR_SEARCH);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/************ Row Operations ***************/
-
-
-static int
-CopyRow(Tcl_Interp *interp, Blt_Table srcTable, Blt_Table destTable,
-    Blt_TableRow srcRow,		/* Row offset in the source table. */
-    Blt_TableRow destRow)		/* Row offset in the destination. */
-{
-    long i;
-
-    if ((Blt_Table_SameTableObject(srcTable, destTable)) && 
-	(srcRow == destRow)) {
-	return TCL_OK;		/* Source and destination are the same. */
-    }
-    if (Blt_Table_NumColumns(srcTable) > Blt_Table_NumColumns(destTable)) {
-	long needed;
-
-	needed = Blt_Table_NumColumns(srcTable) - 
-	    Blt_Table_NumColumns(destTable);
-	if (Blt_Table_ExtendColumns(interp, destTable, needed, NULL)!=TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    for (i = 1; i <= Blt_Table_NumColumns(srcTable); i++) {
-	Blt_TableColumn col;
-	Blt_TableValue value;
-
-	col = Blt_Table_Column(srcTable, i);
-	value = Blt_Table_GetValue(srcTable, srcRow, col);
-	col = Blt_Table_Column(destTable, i);
-	if (Blt_Table_SetValue(destTable, destRow, col, value)!= TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}	    
-
-static void
-CopyRowTags(Blt_Table srcTable, Blt_Table destTable,
-    Blt_TableRow srcRow,		/* Row offset in the source table. */
-    Blt_TableRow destRow)		/* Row offset in the destination. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    /* Find all tags for with this row index. */
-    for (hPtr = Blt_Table_FirstRowTag(srcTable, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	Blt_HashEntry *h2Ptr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)srcRow);
-	if (h2Ptr != NULL) {
-	    /* We know the tag tables are keyed by strings, so we don't need
-	     * to call Blt_GetHashKey and hence the hash table pointer to
-	     * retrieve the key. */
-	    Blt_Table_SetRowTag(NULL, destTable, destRow, hPtr->key.string);
-	}
-    }
-}	    
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowCopyOp --
- *
- *	Copies the specified rows to the table.  A different table may be
- *	selected as the source.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$dest row copy $srcrow $destrow ?-table srcTable?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowCopyOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CopySwitches switches;
-    Blt_Table srcTable, destTable;
-    int result;
-    Blt_TableRow src, dest;
-
-    /* Process switches following the row names. */
-    switches.flags = 0;
-    switches.table = NULL;
-    result = TCL_ERROR;
-    if (Blt_ParseSwitches(interp, copySwitches, objc - 5, objv + 5, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    srcTable = destTable = cmdPtr->table;
-    if (switches.table != NULL) {
-	srcTable = switches.table;
-    }
-    src = Blt_Table_FindRow(interp, srcTable, objv[3]);
-    if (src == NULL) {
-	goto error;
-    }
-    dest = Blt_Table_FindRow(interp, destTable, objv[4]);
-    if (dest == NULL) {
-	dest = Blt_Table_CreateRow(interp, destTable, Tcl_GetString(objv[4]));
-	if (dest == NULL) {
-	    goto error;
-	}
-    }
-    if (CopyRow(interp, srcTable, destTable, src, dest) != TCL_OK) {
-	goto error;
-    }
-    if ((switches.flags & COPY_NOTAGS) == 0) {
-	CopyRowTags(srcTable, destTable, src, dest);
-    }
-    result = TCL_OK;
- error:
-    Blt_FreeSwitches(copySwitches, &switches, 0);
-    return result;
-    
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowDeleteOp --
- *
- *	Deletes the rows designated.  One or more rows may be deleted using a
- *	tag.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row delete ?row?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Blt_TableRow row;
-    int result;
-
-    result = TCL_ERROR;
-    if (Blt_Table_IterateRowsObjv(interp, cmdPtr->table, objc - 3, objv + 3, 
-	&iter) != TCL_OK) {
-	goto error;
-    }
-    /* Walk through the list of row offsets, deleting each row. */
-    for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&iter)) {
-	if (Blt_Table_DeleteRow(cmdPtr->table, row) != TCL_OK) {
-	    goto error;
-	}
-    }
-    result = TCL_OK;
- error:
-    Blt_Table_FreeIteratorObjv(&iter);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowDupOp --
- *
- *	Duplicates the specified rows in the table.  This differs from
- *	RowCopyOp, since the same table is always the source and destination.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$dest row dup label ?label?... 
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowDupOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_TableIterator iter;
-    Blt_TableRow src;
-    int result;
-
-    if (Blt_Table_IterateRowsObjv(interp, cmdPtr->table, objc - 3, objv + 3, 
-	&iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (src = Blt_Table_FirstTaggedRow(&iter); src != NULL; 
-	 src = Blt_Table_NextTaggedRow(&iter)) {
-	const char *label;
-	long j;
-	Blt_TableRow dest;
-
-	label = Blt_Table_RowLabel(src);
-	dest = Blt_Table_CreateRow(interp, cmdPtr->table, label);
-	if (dest == NULL) {
-	    goto error;
-	}
-	if (CopyRow(interp, cmdPtr->table, cmdPtr->table, src, dest)!= TCL_OK) {
-	    goto error;
-	}
-	CopyRowTags(cmdPtr->table, cmdPtr->table, src, dest);
-	j = Blt_Table_RowIndex(dest);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(j));
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    result = TCL_OK;
- error:
-    Blt_Table_FreeIteratorObjv(&iter);
-    if (result != TCL_OK) {
-	Tcl_DecrRefCount(listObjPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowExistsOp --
- *
- *	Indicates is the given row exists.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row exists n
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RowExistsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int bool;
-    Blt_TableRow row;
-
-    row = Blt_Table_FindRow(NULL, cmdPtr->table, objv[3]);
-    bool = (row != NULL);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowExtendOp --
- *
- *	Extends the table by the given number of rows.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row extend n
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RowExtendOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_TableRow *rows;
-    long i, n;
-    int addLabels;
-
-    addLabels = FALSE;
-    if (objc == 3) {
-	return TCL_OK;
-    }
-    n = 0;
-    if ((objc > 4) || (Tcl_GetLongFromObj(NULL, objv[3], &n) != TCL_OK)) {
-	n = objc - 3;
-	addLabels = TRUE;
-    }	    
-    if (n == 0) {
-	return TCL_OK;
-    }
-    if (n < 0) {
-	Tcl_AppendResult(interp, "bad count \"", Blt_Itoa(n), 
-			 "\": # rows can't be negative.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    rows = Blt_AssertMalloc(n * sizeof(Blt_TableRow));
-    if (Blt_Table_ExtendRows(interp, cmdPtr->table, n, rows) != TCL_OK) {
-	Blt_Free(rows);
-	goto error;
-    }
-    if (addLabels) {
-	long j;
-
-	for (i = 0, j = 3; i < n; i++, j++) {
-	    if (Blt_Table_SetRowLabel(interp, cmdPtr->table, rows[i], 
-			Tcl_GetString(objv[j])) != TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (i = 0; i < n; i++) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewLongObj(Blt_Table_RowIndex(rows[i]));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    Blt_Free(rows);
-    return TCL_OK;
- error:
-    Blt_Free(rows);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowGetOp --
- *
- *	Retrieves the values from a given row.  The row argument can be either
- *	a tag, label, or row index.  If it is a tag, it must refer to exactly
- *	one row.  An optional argument specifies how to return empty values.
- *	By default, the global empty value representation is used.
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row get row ?col...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowGetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_TableRow row;
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    row = Blt_Table_FindRow(interp, table, objv[3]);
-    if (row == NULL) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 4) {
-	Blt_TableColumn col;
-
-	for (col = Blt_Table_FirstColumn(table); col != NULL;
-	     col = Blt_Table_NextColumn(table, col)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewLongObj(Blt_Table_ColumnIndex(col));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Blt_Table_GetObj(table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_TableIterator iter;
-	Blt_TableColumn col;
-
-	if (Blt_Table_IterateColumnsObjv(interp, table, objc - 4, objv + 4, 
-		&iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&iter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&iter)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewLongObj(Blt_Table_ColumnIndex(col));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Blt_Table_GetObj(table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowIndexOp --
- *
- *	Returns the row index of the given row tag, label, or index.  A tag
- *	can't represent more than one row.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row index $row
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RowIndexOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableRow row;
-    long i;
-
-    i = -1;
-    row = Blt_Table_FindRow(NULL, cmdPtr->table, objv[3]);
-    if (row != NULL) {
-	i = Blt_Table_RowIndex(row);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), i);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowIndicesOp --
- *
- *	Returns a list of indices for the given rows.  
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row indices $row $row
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RowIndicesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableIterator iter;
-    Blt_TableRow row;
-    Tcl_Obj *listObjPtr;
-
-    if (Blt_Table_IterateRowsObjv(interp, cmdPtr->table, objc - 3, objv + 3, 
-	&iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&iter)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewLongObj(Blt_Table_RowIndex(row));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    Blt_Table_FreeIteratorObjv(&iter);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowCreateOp --
- *
- *	Creates a single new row into the table.  The location of the new row
- *	may be specified by -before or -after switches.  By default the new
- *	row is added to to the end of the table.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *
- * Example:
- *	$t row create -before 0 -after 1 -label label
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RowCreateOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableRow row;
-    InsertSwitches switches;
-    unsigned int flags;
-    
-    switches.row = NULL;
-    switches.label = NULL;
-    switches.tags = NULL;
-    switches.cmdPtr = cmdPtr;
-    table = cmdPtr->table;
-
-    flags = INSERT_ROW;
-    if (Blt_ParseSwitches(interp, insertSwitches, objc - 3, objv + 3, 
-		&switches, flags) < 0) {
-	goto error;
-    }
-    row = Blt_Table_CreateRow(interp, table, switches.label);
-    if (row == NULL) {
-	goto error;
-    }
-    if (switches.row != NULL) {
-	if (Blt_Table_MoveRows(interp, table, row, switches.row, 1) != TCL_OK) {
-	    goto error;
-	}
-    }
-    if (switches.tags != NULL) {
-	Tcl_Obj **elv;
-	int elc;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, switches.tags, &elc, &elv) 
-	    != TCL_OK) {
-	    goto error;
-	}
-	for (i = 0; i < elc; i++) {
-	    if (Blt_Table_SetRowTag(interp, table, row, Tcl_GetString(elv[i])) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, Tcl_NewLongObj(Blt_Table_RowIndex(row)));
-    Blt_FreeSwitches(insertSwitches, &switches, flags);
-    return TCL_OK;
- error:
-    Blt_FreeSwitches(insertSwitches, &switches, flags);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowLabelOp --
- *
- *	Gets/sets a label for one or more rows.  
- * 
- * Results:
- *	A standard TCL result.  If successful, the old row label is returned
- *	in the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row label row ?label? ?row label? 
- *	$t row label 1
- *	$t row label 1 newLabel 
- *	$t row label 1 lab1 2 lab2 3 lab3 5 lab5
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowLabelOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    if (objc == 4) {
-	const char *label;
-	Blt_TableRow row;
-
-	row = Blt_Table_FindRow(interp, table, objv[3]);
-	if (row == NULL) {
-	    return TCL_ERROR;
-	}
-	label = Blt_Table_RowLabel(row);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), label, -1);
-    } else {
-	int i;
-	
-	if ((objc - 3) & 1) {
-	    Tcl_AppendResult(interp,"odd # of row/label pairs: should be \"",
-		Tcl_GetString(objv[0]), " row label ?row label?...", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (i = 3; i < objc; i += 2) {
-	    Blt_TableRow row;
-	    const char *label;
-
-	    row = Blt_Table_FindRow(interp, table, objv[i]);
-	    if (row == NULL) {
-		return TCL_ERROR;
-	    }
-	    label = Tcl_GetString(objv[i+1]);
-	    if (Blt_Table_SetRowLabel(interp, table, row, label) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowLabelsOp --
- *
- *	Gets/sets all the row label in the table.  
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row labels ?labelList?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowLabelsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-
-    table = cmdPtr->table;
-    if (objc == 4) {
-	Blt_TableRow row;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (row = Blt_Table_FirstRow(table); row != NULL;
-	     row = Blt_Table_NextRow(table, row)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewStringObj(Blt_Table_RowLabel(row), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else if (objc == 5) {
-	Tcl_Obj **elv;
-	int elc, n;
-	int i;
-	Blt_TableRow row;
-
-	if (Tcl_ListObjGetElements(interp, objv[4], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	n = MIN(elc, Blt_Table_NumRows(table));
-	for (i = 0, row = Blt_Table_FirstRow(table); (row != NULL) && (i < n); 
-	     row = Blt_Table_NextRow(table, row), i++) {
-	    const char *label;
-
-	    label = Tcl_GetString(elv[i]);
-	    if (Blt_Table_SetRowLabel(interp, table, row, label) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowLengthOp --
- *
- *	Returns the number of rows the client sees.
- * 
- * Results:
- *	A standard TCL result.  If successful, the old row label is returned
- *	in the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row label row ?newLabel?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowLengthOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Table_NumRows(cmdPtr->table));
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowMoveOp --
- *
- *	Moves the given number of rows to another location in the table.
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row move from to ?n?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowMoveOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TableRow from, to;
-    long count;
-
-    from = Blt_Table_FindRow(interp, cmdPtr->table, objv[3]);
-    if (from == NULL) {
-	return TCL_ERROR;
-    }
-    to = Blt_Table_FindRow(interp, cmdPtr->table, objv[4]);
-    if (to == NULL) {
-	return TCL_ERROR;
-    }
-    count = 1;
-    if (objc == 6) {
-	long lcount;
-
-	if (Tcl_GetLongFromObj(interp, objv[5], &lcount) != TCL_OK) {
-	    return TCL_ERROR;
-
-	}
-	if (lcount == 0) {
-	    return TCL_OK;
-	}
-	if (lcount < 0) {
-	    Tcl_AppendResult(interp, "# of rows can't be negative",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	count = lcount;
-    }
-    return Blt_Table_MoveRows(interp, cmdPtr->table, from, to, count);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowNamesOp --
- *
- *	Reports the labels of all rows.  
- * 
- * Results:
- *	Always returns TCL_OK.  The interpreter result is a list of row
- *	labels.
- *	
- * Example:
- *	$t row names pattern...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowNamesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Tcl_Obj *listObjPtr;
-    Blt_TableRow row;
-
-    table = cmdPtr->table;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (row = Blt_Table_FirstRow(table); row != NULL;
-	 row = Blt_Table_NextRow(table, row)) {
-	const char *label;
-	int match;
-	int i;
-
-	label = Blt_Table_RowLabel(row);
-	match = (objc == 3);
-	for (i = 3; i < objc; i++) {
-	    const char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    if (Tcl_StringMatch(label, pattern)) {
-		match = TRUE;
-		break;
-	    }
-	}
-	if (match) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(label, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowNotifyOp --
- *
- *	Creates a notifier for this instance.  Notifiers represent a bitmask
- *	of events and a command prefix to be invoked when a matching event
- *	occurs.
- *
- *	The command prefix is parsed and saved in an array of Tcl_Objs. Extra
- *	slots are allocated for the
- *
- * Results:
- *	A standard TCL result.  The name of the new notifier is returned in
- *	the interpreter result.  Otherwise, if it failed to parse a switch,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- * Example:
- *	table0 row notify row ?flags? command arg
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowNotifyOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    NotifierInfo *niPtr;
-    NotifySwitches switches;
-    const char *tag, *string;
-    int count;
-    int i;
-    int nArgs;
-    Blt_TableRow row;
-    Blt_TableRowColumnSpec spec;
-
-    table = cmdPtr->table;
-    spec = Blt_Table_RowSpec(table, objv[3], &string);
-    row = NULL;
-    tag = NULL;
-    if (spec == TABLE_SPEC_TAG) {
-	tag = string;
-    } else {
-	row = Blt_Table_FindRow(interp, table, objv[3]);
-	if (row == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    count = 0;
-    for (i = 4; i < objc; i++) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] != '-') {
-	    break;
-	}
-	count++;
-    }
-    switches.flags = 0;
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, notifySwitches, count, objv + 4, 
-	     &switches, 0) < 0) {
-	return TCL_ERROR;
-    }
-    niPtr = Blt_AssertMalloc(sizeof(NotifierInfo));
-    niPtr->cmdPtr = cmdPtr;
-    if (tag == NULL) {
-	niPtr->notifier = Blt_Table_CreateRowNotifier(interp, cmdPtr->table,
-		row, switches.flags, NotifyProc, NotifierDeleteProc, niPtr);
-    } else {
-	niPtr->notifier = Blt_Table_CreateRowTagNotifier(interp, 
-		cmdPtr->table, tag, switches.flags, NotifyProc, 
-		NotifierDeleteProc, niPtr);
-    }	
-    nArgs = (objc - i) + 2;
-    /* Stash away the command in structure and pass that to the notifier. */
-    niPtr->cmdv = Blt_AssertMalloc(nArgs * sizeof(Tcl_Obj *));
-    for (count = 0; i < objc; i++, count++) {
-	Tcl_IncrRefCount(objv[i]);
-	niPtr->cmdv[count] = objv[i];
-    }
-    niPtr->cmdc = nArgs;
-    if (switches.flags == 0) {
-	switches.flags = TABLE_NOTIFY_ALL_EVENTS;
-    }
-    {
-	char notifyId[200];
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	sprintf_s(notifyId, 200, "notify%d", cmdPtr->nextNotifyId++);
-	hPtr = Blt_CreateHashEntry(&cmdPtr->notifyTable, notifyId, &isNew);
-	assert(isNew);
-	Blt_SetHashValue(hPtr, niPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), notifyId, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowSetOp --
- *
- *	Sets a row of values.  One or more rows may be set using a tag.  The
- *	column order is always the table's current view of the table.  There
- *	may be less values than needed.
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row set row ?switches? ?column value?...
- *	$t row set row ?switches? ?column value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowSetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    long nCols;
-    Blt_TableRow row;
-
-    table = cmdPtr->table;
-    /* May set more than one row with the same values. */
-    if (IterateRows(interp, table, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	return TCL_OK;
-    }
-    nCols = objc - 4;
-    if (nCols & 1) {
-	Tcl_AppendResult(interp, "odd # of column/value pairs: should be \"", 
-		Tcl_GetString(objv[0]), " row set column value...", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&iter)) {
-	long i;
-
-	/* The remaining arguments are index/value pairs. */
-	for (i = 4; i < objc; i += 2) {
-	    Blt_TableColumn col;
-	    
-	    col = Blt_Table_FindColumn(interp, table, objv[i]);
-	    if (col == NULL) {
-		/* Can't find the column. Create it and try to find it
-		 * again. */
-		if (MakeColumns(interp, table, objv[i]) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		col = Blt_Table_FindColumn(interp, table, objv[i]);
-	    }
-	    if (Blt_Table_SetObj(table, row, col, objv[i+1]) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagAddOp --
- *
- *	Adds a given tag to one or more rows.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all" or "end").
- *
- *	.t row tag add tag ?row...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagAddOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-    const char *tagName;
-
-    table = cmdPtr->table;
-    tagName = Tcl_GetString(objv[4]);
-    for (i = 5; i < objc; i++) {
-	Blt_TableRow row;
-	Blt_TableIterator iter;
-
-	if (Blt_Table_IterateRows(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    if (Blt_Table_SetRowTag(interp, table, row, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagDeleteOp --
- *
- *	Removes a given tag from one or more rows. If a tag doesn't exist or
- *	is a reserved tag ("all" or "end"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t row tag delete tag ?row...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-    const char *tagName;
-
-    table = cmdPtr->table;
-    tagName = Tcl_GetString(objv[4]);
-    for (i = 5; i < objc; i++) {
-	Blt_TableRow row;
-	
-	if (Blt_Table_IterateRows(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    if (Blt_Table_UnsetRowTag(interp, table, row, tagName)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagExistsOp --
- *
- *	Returns the existence of a tag in the table.  If a row is specified
- *	then the tag is search for for that row.
- *
- *	.t tag row exists tag ?row?
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RowTagExistsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int bool;
-    const char *tagName;
-
-    tagName = Tcl_GetString(objv[3]);
-    bool = (Blt_Table_FindRowTagTable(cmdPtr->table, tagName) != NULL);
-    if (objc == 5) {
-	Blt_TableRow row;
-
-	row = Blt_Table_FindRow(interp, cmdPtr->table, objv[4]);
-	if (row == NULL) {
-	    return TCL_ERROR;
-	}
-	bool = Blt_Table_HasRowTag(cmdPtr->table, row, tagName);
-    } 
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagForgetOp --
- *
- *	Removes the given tags from all nodes.
- *
- *	$t row tag forget tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RowTagForgetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-
-    table = cmdPtr->table;
-    for (i = 4; i < objc; i++) {
-	if (Blt_Table_ForgetRowTag(interp, table, Tcl_GetString(objv[i])) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagGetOp --
- *
- *	Returns the tag names for a given row.  If one of more pattern
- *	arguments are provided, then only those matching tags are returned.
- *
- *	.t row tag get row pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagGetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch hsearch;
-    Blt_HashTable tagTable;
-    Blt_Table table;
-    Blt_TableIterator iter;
-    Blt_TableRow row;
-    Tcl_Obj *listObjPtr;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-
-    Blt_InitHashTable(&tagTable, BLT_STRING_KEYS);
-    
-    /* Collect all the tags into a hash table. */
-    for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&iter)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_Table_RowTags(table, row);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    const char *tagName;
-	    int isNew;
-
-	    tagName = Blt_Chain_GetValue(link);
-	    Blt_CreateHashEntry(&tagTable, tagName, &isNew);
-	}
-	Blt_Chain_Destroy(chain);
-    }
-    for (hPtr = Blt_FirstHashEntry(&tagTable, &hsearch); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&hsearch)) {
-	int match;
-	const char *tagName;
-
-	tagName = Blt_GetHashKey(&tagTable, hPtr);
-	match = TRUE;
-	if (objc > 5) {
-	    int i;
-
-	    match = FALSE;
-	    for (i = 5; i < objc; i++) {
-		if (Tcl_StringMatch(tagName, Tcl_GetString(objv[i]))) {
-		    match = TRUE;
-		}
-	    }
-	}
-	if (match) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Blt_DeleteHashTable(&tagTable);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagIndicesOp --
- *
- *	Returns row indices names for the given tags.  If one of more tag
- *	names are provided, then only those matching indices are returned.
- *
- *	.t row tag indices tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagIndicesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-    unsigned char *matches;
-    long nRows;
-
-    table = cmdPtr->table;
-    nRows = Blt_Table_NumRows(table);
-    matches = Blt_AssertCalloc(nRows + 1, sizeof(unsigned char));
-
-    /* Handle the reserved tags "all" or "end". */
-    for (i = 4; i < objc; i++) {
-	const char *tagName;
-	long j;
-
-	tagName = Tcl_GetString(objv[i]);
-	if (strcmp("all", tagName) == 0) {
-	    for (j = 1; j <= nRows; j++) {
-		matches[j] = TRUE;
-	    }
-	    goto done;		/* Don't care other tags. */
-	} 
-	if (strcmp("end", tagName) == 0) {
-	    matches[nRows] = TRUE;
-	}
-    }
-    /* Now check user-defined tags. */
-    for (i = 4; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Blt_HashTable *tagTablePtr;
-	const char *tagName;
-	
-	tagName = Tcl_GetString(objv[i]);
-	if ((strcmp("all", tagName) == 0) || (strcmp("end", tagName) == 0)) {
-	    continue;
-	}
-	tagTablePtr = Blt_Table_FindRowTagTable(table, tagName);
-	if (tagTablePtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown row tag \"", tagName, "\"",
-		(char *)NULL);
-	    Blt_Free(matches);
-	    return TCL_ERROR;
-	}
-	for (hPtr = Blt_FirstHashEntry(tagTablePtr, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_TableRow row;
-	    long j;
-
-	    row = Blt_GetHashValue(hPtr);
-	    j = Blt_Table_RowIndex(row);
-	    matches[j] = TRUE;
-	}
-    }
-
- done:
-    {
-	Tcl_Obj *listObjPtr;
-	long n;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (n = 1; n <= nRows; n++) {
-	    if (matches[n]) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(n));
-	    }
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_Free(matches);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagRangeOp --
- *
- *	Adds one or more tags for a given row.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all" or "end").
- *
- *	.t row tag range $from $to tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagRangeOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-    Blt_TableRow from, to;
-
-    table = cmdPtr->table;
-    from = Blt_Table_FindRow(interp, table, objv[4]);
-    if (from == NULL) {
-	return TCL_ERROR;
-    }
-    to = Blt_Table_FindRow(interp, table, objv[5]);
-    if (to == NULL) {
-	return TCL_ERROR;
-    }
-    if (Blt_Table_RowIndex(from) > Blt_Table_RowIndex(to)) {
-	Blt_TableRow tmp;
-	tmp = to, to = from, from = tmp;
-    }
-    for (i = 6; i < objc; i++) {
-	const char *tagName;
-	long j;
-	
-	tagName = Tcl_GetString(objv[i]);
-	for (j = Blt_Table_RowIndex(from); j <= Blt_Table_RowIndex(to); j++) {
-	    Blt_TableRow row;
-
-	    row = Blt_Table_Row(table, j);
-	    if (Blt_Table_SetRowTag(interp, table, row, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagSearchOp --
- *
- *	Returns tag names for a given row.  If one of more pattern arguments
- *	are provided, then only those matching tags are returned.
- *
- *	.t row tag find $row pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagSearchOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Blt_TableIterator iter;
-    Tcl_Obj *listObjPtr;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_Table_FirstRowTag(table, &cursor); hPtr != NULL; 
-	hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_HashTable *tablePtr;
-	Blt_TableRow row;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    Blt_HashEntry *h2Ptr;
-	
-	    h2Ptr = Blt_FindHashEntry(tablePtr, (char *)row);
-	    if (h2Ptr != NULL) {
-		const char *tagName;
-		int match;
-		int i;
-
-		match = (objc == 5);
-		tagName = hPtr->key.string;
-		for (i = 5; i < objc; i++) {
-		    if (Tcl_StringMatch(tagName, Tcl_GetString(objv[i]))) {
-			match = TRUE;
-			break;	/* Found match. */
-		    }
-		}
-		if (match) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj(tagName, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;	/* Tag matches this row. Don't care if it
-				 * matches any other rows. */
-		}
-	    }
-	}
-    }
-
-    /* Handle reserved tags specially. */
-    {
-	int i;
-	int allMatch, endMatch;
-
-	endMatch = allMatch = (objc == 5);
-	for (i = 5; i < objc; i++) {
-	    if (Tcl_StringMatch("all", Tcl_GetString(objv[i]))) {
-		allMatch = TRUE;
-	    }
-	    if (Tcl_StringMatch("end", Tcl_GetString(objv[i]))) {
-		endMatch = TRUE;
-	    }
-	}
-	if (allMatch) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj("all", 3));
-	}
-	if (endMatch) {
-	    Blt_TableRow row, lastRow;
-	    
-	    lastRow = Blt_Table_Row(table, Blt_Table_NumRows(table));
-	    for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-		 row = Blt_Table_NextTaggedRow(&iter)) {
-		if (row == lastRow) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr,
-			Tcl_NewStringObj("end", 3));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagSetOp --
- *
- *	Adds one or more tags for a given row.  
- *
- *	.t row tag set $row tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagSetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 5; i < objc; i++) {
-	const char *tagName;
-	Blt_TableRow row;
-
-	tagName = Tcl_GetString(objv[i]);
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    if (Blt_Table_SetRowTag(interp, table, row, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagUnsetOp --
- *
- *	Removes one or more tags from a given row. 
- *
- *	.t row tag unset $row tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowTagUnsetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    int i;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[4], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 5; i < objc; i++) {
-	const char *tagName;
-	Blt_TableRow row;
-	
-	tagName = Tcl_GetString(objv[i]);
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    if (Blt_Table_UnsetRowTag(interp, table, row, tagName)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }    
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTagOp --
- *
- * 	This procedure is invoked to process tag operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec rowTagOps[] =
-{
-    {"add",     1, RowTagAddOp,     5, 0, "tag ?row...?",},
-    {"delete",  1, RowTagDeleteOp,  5, 0, "tag ?row...?",},
-    {"exists",  1, RowTagExistsOp,  5, 6, "tag ?row?",},
-    {"forget",  1, RowTagForgetOp,  4, 0, "?tag...?",},
-    {"get",     1, RowTagGetOp,     5, 0, "row ?pattern...?",},
-    {"indices", 1, RowTagIndicesOp, 4, 0, "?tag...?",},
-    {"range",   1, RowTagRangeOp,   6, 0, "from to ?tag...?",},
-    {"search",  3, RowTagSearchOp,  5, 6, "row ?pattern?",},
-    {"set",     3, RowTagSetOp,     5, 0, "row tag...",},
-    {"unset",   1, RowTagUnsetOp,   5, 0, "row tag...",},
-};
-
-static int nRowTagOps = sizeof(rowTagOps) / sizeof(Blt_OpSpec);
-
-static int 
-RowTagOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nRowTagOps, rowTagOps, BLT_OP_ARG3, 
-			    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowTraceOp --
- *
- *	Creates a trace for this instance.  Traces represent list of keys, a
- *	bitmask of trace flags, and a command prefix to be invoked when a
- *	matching trace event occurs.
- *
- *	The command prefix is parsed and saved in an array of Tcl_Objs. The
- *	qualified name of the instance is saved also.
- *
- * Results:
- *	A standard TCL result.  The name of the new trace is returned in the
- *	interpreter result.  Otherwise, if it failed to parse a switch, then
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t column trace tag rwx proc 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RowTraceOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator iter;
-    Blt_TableTrace trace;
-    TraceInfo *tiPtr;
-    const char *tag;
-    int flags;
-    Blt_TableRow row;
-
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = GetTraceFlags(Tcl_GetString(objv[4]));
-    if (flags < 0) {
-	Tcl_AppendResult(interp, "unknown flag in \"", Tcl_GetString(objv[4]), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    row = NULL;
-    tag = NULL;
-    if (iter.type == TABLE_ITERATOR_RANGE) {
-	Tcl_AppendResult(interp, "can't trace range of rows: use a tag", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((iter.type == TABLE_ITERATOR_INDEX) || 
-	(iter.type == TABLE_ITERATOR_LABEL)) {
-	row = Blt_Table_FirstTaggedRow(&iter);
-    } else {
-	tag = iter.tagName;
-    }
-    tiPtr = Blt_Malloc(sizeof(TraceInfo));
-    if (tiPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate trace: out of memory", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    trace = Blt_Table_CreateTrace(table, row, NULL, tag, NULL, flags, 
-	TraceProc, TraceDeleteProc, tiPtr);
-    if (trace == NULL) {
-	Tcl_AppendResult(interp, "can't create row trace: out of memory", 
-		(char *)NULL);
-	Blt_Free(tiPtr);
-	return TCL_ERROR;
-    }
-    /* Initialize the trace information structure. */
-    tiPtr->cmdPtr = cmdPtr;
-    tiPtr->trace = trace;
-    tiPtr->tablePtr = &cmdPtr->traceTable;
-    {
-	Tcl_Obj **elv, **cmdv;
-	int elc, i;
-
-	if (Tcl_ListObjGetElements(interp, objv[5], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	cmdv = Blt_AssertCalloc(elc + 1 + 3 + 1, sizeof(Tcl_Obj *));
-	for(i = 0; i < elc; i++) {
-	    cmdv[i] = elv[i];
-	    Tcl_IncrRefCount(cmdv[i]);
-	}
-	cmdv[i] = Tcl_NewStringObj(cmdPtr->hPtr->key.string, -1);
-	Tcl_IncrRefCount(cmdv[i]);
-	tiPtr->cmdc = elc;
-	tiPtr->cmdv = cmdv;
-    }
-    {
-	char traceId[200];
-	int isNew;
-
-	sprintf_s(traceId, 200, "trace%d", cmdPtr->nextTraceId++);
-	tiPtr->hPtr = Blt_CreateHashEntry(&cmdPtr->traceTable, traceId, &isNew);
-	Blt_SetHashValue(tiPtr->hPtr, tiPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), traceId, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowUnsetOp --
- *
- *	Unsets one or more rows of values.  One or more rows may be unset
- *	(using tags or multiple arguments).
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row unset row ?row?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowUnsetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-
-    table = cmdPtr->table;
-    for (i = 3; i < objc; i++) {
-	Blt_TableIterator iter;
-	Blt_TableRow row;
-
-	if (Blt_Table_IterateRows(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    Blt_TableColumn col;
-
-	    for (col = Blt_Table_FirstColumn(table); col != NULL;
-		 col = Blt_Table_NextColumn(table, col)) {
-		if (Blt_Table_UnsetValue(table, row, col) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowUniqueOp --
- *
- *	Reports the unique values for a given row.  
- * 
- * Results:
- *	A standard TCL result. If the tag or row index is invalid, TCL_ERROR
- *	is returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row unique row
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowUniqueOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-    Blt_HashTable values;
-
-    table = cmdPtr->table;
-    Blt_InitHashTableWithPool(&values, BLT_STRING_KEYS);
-    for (i = 3; i < objc; i++) {
-	Blt_TableIterator iter;
-	Blt_TableRow row;
-
-	if (Blt_Table_IterateRows(interp, table, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (row = Blt_Table_FirstTaggedRow(&iter); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&iter)) {
-	    Blt_TableColumn col;
-
-	    for (col = Blt_Table_FirstColumn(table); col != NULL;
-		 col = Blt_Table_NextColumn(table, col)) {
-		const char *string;
-		Blt_HashEntry *hPtr;
-		int isNew;
-
-		string = Blt_Table_GetString(table, row, col);
-		if (string == NULL) {
-		    string = cmdPtr->emptyValue;
-		}
-		hPtr = Blt_CreateHashEntry(&values, string, &isNew);
-		if (hPtr == NULL) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&values, &iter); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Tcl_AppendElement(interp, Blt_GetHashKey(&values, hPtr));
-	}
-    }
-    Blt_DeleteHashTable(&values);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowValuesOp --
- *
- *	Retrieves a row of values.  The row argument can be either a tag,
- *	label, or row index.  If it is a tag, it must refer to exactly one
- *	row.
- * 
- * Results:
- *	A standard TCL result.  If successful, a list of values is returned in
- *	the interpreter result.  If the row index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t row listget row ?defValue?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RowValuesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableRow row;
-    Tcl_Obj *listObjPtr;
-
-    table = cmdPtr->table;
-    row = Blt_Table_FindRow(interp, cmdPtr->table, objv[3]);
-    if (row == NULL) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	Blt_TableColumn col;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (col = Blt_Table_FirstColumn(cmdPtr->table); col != NULL;
-	     col = Blt_Table_NextColumn(cmdPtr->table, col)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Blt_Table_GetObj(cmdPtr->table, row, col);
-	    if (objPtr == NULL) {
-		objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	Tcl_Obj **elv;
-	int elc;
-	long i, j;
-
-	if (Tcl_ListObjGetElements(interp, objv[4], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (elc > Blt_Table_NumColumns(table)) {
-	    long n;
-
-	    n = elc - Blt_Table_NumColumns(table);
-	    if (Blt_Table_ExtendColumns(interp, table, n, NULL) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	for (i = 0, j = 1; i < elc; i++, j++) {
-	    Blt_TableColumn col;
-
-	    col = Blt_Table_Column(table, j);
-	    if (Blt_Table_SetObj(table, row, col, elv[i]) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowOp --
- *
- *	Parses the given command line and calls one of several row-specific
- *	operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec rowOps[] =
-{
-    {"copy",    2, RowCopyOp,   4, 0, "src dest ?switches...?",},
-    {"create",  2, RowCreateOp, 3, 0, "?switches...?",},
-    {"delete",  2, RowDeleteOp, 4, 0, "row...",},
-    {"dup",     2, RowDupOp,    3, 0, "row...",},
-    {"exists",  3, RowExistsOp, 4, 4, "row",},
-    {"extend",  3, RowExtendOp, 4, 0, "label ?label...?",},
-    {"get",     1, RowGetOp,    4, 0, "row ?switches?",},
-    {"index",   4, RowIndexOp,  4, 4, "row",},
-    {"indices", 4, RowIndicesOp,3, 0, "row ?row...?",},
-    {"label",   5, RowLabelOp,  4, 0, "row ?label?",},
-    {"labels",  6, RowLabelsOp, 3, 4, "?labelList?",},
-    {"length",  2, RowLengthOp, 3, 3, "",},
-    {"move",    1, RowMoveOp,   5, 6, "from to ?count?",},
-    {"names",   2, RowNamesOp,  3, 0, "?pattern...?",},
-    {"notify",  2, RowNotifyOp, 5, 0, "row ?flags? command",},
-    {"set",     2, RowSetOp,    5, 0, "row column value...",},
-    {"tag",     2, RowTagOp,    3, 0, "op args...",},
-    {"trace",   2, RowTraceOp,  6, 6, "row how command",},
-    {"unique",  3, RowUniqueOp, 4, 4, "row",},
-    {"unset",   3, RowUnsetOp,  4, 0, "row...",},
-    {"values",  1, RowValuesOp, 4, 5, "row ?valueList?",},
-};
-
-static int nRowOps = sizeof(rowOps) / sizeof(Blt_OpSpec);
-
-static int
-RowOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nRowOps, rowOps, BLT_OP_ARG2, objc, 
-	objv, BLT_OP_LINEAR_SEARCH);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AppendOp --
- *
- *
- *	Appends one or more values to the current value at the given row,
- *	column location. If the column or row doesn't already exist, it will
- *	automatically be created.
- * 
- * Results:
- *	A standard TCL result. If the tag or index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t append $row $column $value ?value...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-AppendOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator ri, ci;
-    Blt_TableColumn col;
-    int i, extra;
-
-    table = cmdPtr->table;
-    if (IterateRows(interp, table, objv[2], &ri) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (IterateColumns(interp, table, objv[3], &ci) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    extra = 0;
-    for (i = 4; i < objc; i++) {
-	int length;
-
-	Tcl_GetStringFromObj(objv[i], &length);
-	extra += length;
-    }
-    if (extra == 0) {
-	return TCL_OK;
-    }
-    for (col = Blt_Table_FirstTaggedColumn(&ci); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&ci)) {
-	Blt_TableRow row;
-	
-	for (row = Blt_Table_FirstTaggedRow(&ri); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&ri)) {
-	    int i;
-
-	    for (i = 4; i < objc; i++) {
-		const char *s;
-		int length;
-		
-		s = Tcl_GetStringFromObj(objv[i], &length);
-		if (Blt_Table_AppendString(interp, table, row, col, s, length) 
-		    != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }	    
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExportOp --
- *
- *	Parses the given command line and calls one of several export-specific
- *	operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ExportOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TableCmdInterpData *dataPtr;
-
-    dataPtr = GetTableCmdInterpData(interp);
-    if (objc == 2) {
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->fmtTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    fmtPtr = Blt_GetHashValue(hPtr);
-	    if (fmtPtr->exportProc != NULL) {
-		Tcl_AppendElement(interp, fmtPtr->name);
-	    }
-	}
-	return TCL_OK;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, Tcl_GetString(objv[2]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't export \"", Tcl_GetString(objv[2]),
-			 "\": format not registered", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if (fmtPtr->exportProc == NULL) {
-	Tcl_AppendResult(interp, "no export procedure registered for \"", 
-			 fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return (*fmtPtr->exportProc) (cmdPtr->table, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * KeysOp --
- *
- * 	This procedure is invoked to process key operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- * Example:
- *	$t keys key key key key
- *	$t keys 
- *
- *---------------------------------------------------------------------------
- */
-static int
-KeysOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Chain keys;
-    Blt_Table table;
-    int i;
-
-    if (objc == 2) {
-	Tcl_Obj *listObjPtr;
-	Blt_ChainLink link;
-
-	keys = Blt_Table_GetKeys(cmdPtr->table);
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (link = Blt_Chain_FirstLink(keys); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Blt_TableColumn col;
-	    Tcl_Obj *objPtr;
-	    
-	    col = Blt_Chain_GetValue(link);
-	    objPtr = Tcl_NewStringObj(Blt_Table_ColumnLabel(col), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    table = cmdPtr->table;
-    keys = Blt_Chain_Create();
-    for (i = 2; i < objc; i++) {
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objv[i]);
-	if (col == NULL) {
-	    Blt_Chain_Destroy(keys);
-	    return TCL_ERROR;
-	}
-	Blt_Chain_Append(keys, col);
-    }
-    Blt_Table_SetKeys(table, keys, 0);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LappendOp --
- *
- *
- *	Appends one or more elements to the list at the given row, column
- *	location. If the column or row doesn't already exist, it will
- *	automatically be created.
- * 
- * Results:
- *	A standard TCL result. If the tag or index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t append $row $column $value ?value...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-LappendOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator ri, ci;
-    Blt_TableColumn col;
-
-    table = cmdPtr->table;
-    if (IterateRows(interp, table, objv[2], &ri) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (IterateColumns(interp, table, objv[3], &ci) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (col = Blt_Table_FirstTaggedColumn(&ci); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&ci)) {
-	Blt_TableRow row;
-	
-	for (row = Blt_Table_FirstTaggedRow(&ri); row != NULL; 
-	     row = Blt_Table_NextTaggedRow(&ri)) {
-	    Tcl_Obj *listObjPtr;
-	    int i, result;
-
-	    listObjPtr = Blt_Table_GetObj(table, row, col);
-	    if (listObjPtr == NULL) {
-		listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	    }
-	    Tcl_IncrRefCount(listObjPtr);
-	    for (i = 4; i < objc; i++) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, objv[i]);
-	    }
-	    result = Blt_Table_SetObj(table, row, col, listObjPtr);
-	    Tcl_DecrRefCount(listObjPtr);
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }	    
-    return TCL_OK;
-}
-
-static int
-LookupOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    long nKeys;
-    Blt_Chain keys;
-    Blt_TableRow row;
-    Blt_Table table;
-    long i;
-
-    keys = Blt_Table_GetKeys(cmdPtr->table);
-    nKeys = Blt_Chain_GetLength(keys);
-    if ((objc - 2) != nKeys) {
-	Blt_ChainLink link;
-
-	Tcl_AppendResult(interp, "wrong # of keys: should be \"", (char *)NULL);
-	for (link = Blt_Chain_FirstLink(keys); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Blt_TableColumn col;
-
-	    col = Blt_Chain_GetValue(link);
-	    Tcl_AppendResult(interp, Blt_Table_ColumnLabel(col), " ", 
-			     (char *)NULL);
-	}
-	Tcl_AppendResult(interp, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    table = cmdPtr->table;
-    if (Blt_Table_KeyLookup(interp, table, objc - 2, objv + 2, &row)!=TCL_OK) {
-	return TCL_ERROR;
-    }
-    i = (row == NULL) ? -1 : Blt_Table_RowIndex(row);
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), i);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImportOp --
- *
- *	Parses the given command line and calls one of several import-specific
- *	operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ImportOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TableCmdInterpData *dataPtr;
-
-    dataPtr = GetTableCmdInterpData(interp);
-    if (objc == 2) {
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->fmtTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    fmtPtr = Blt_GetHashValue(hPtr);
-	    if (fmtPtr->importProc != NULL) {
-		Tcl_AppendElement(interp, fmtPtr->name);
-	    }
-	}
-	return TCL_OK;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, Tcl_GetString(objv[2]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't import \"", Tcl_GetString(objv[2]),
-			 "\": format not registered", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if (fmtPtr->importProc == NULL) {
-	Tcl_AppendResult(interp, "no import procedure registered for \"", 
-		fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return (*fmtPtr->importProc) (cmdPtr->table, interp, objc, objv);
-}
-
-/**************** Notify Operations *******************/
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyDeleteOp --
- *
- *	Deletes one or more notifiers.  
- *
- * Results:
- *	A standard TCL result.  If a name given doesn't represent a notifier,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NotifyDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	NotifierInfo *niPtr;
-
-	hPtr = Blt_FindHashEntry(&cmdPtr->notifyTable, Tcl_GetString(objv[i]));
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown notifier id \"", 
-		Tcl_GetString(objv[i]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	niPtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashEntry(&cmdPtr->notifyTable, hPtr);
-	FreeNotifierInfo(niPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifierInfoOp --
- *
- *	Returns the details for a given notifier.  The string id of the
- *	notifier is passed as an argument.
- *
- * Results:
- *	A standard TCL result.  If the name given doesn't represent a
- *	notifier, then TCL_ERROR is returned and an error message is left in
- *	the interpreter result.  Otherwise the details of the notifier handler
- *	are returned as a list of three elements: notifier id, flags, and
- *	command.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NotifyInfoOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_HashEntry *hPtr;
-    NotifierInfo *niPtr;
-    const char *what;
-    Tcl_Obj *listObjPtr, *subListObjPtr, *objPtr;
-    int i;
-    struct _Blt_TableNotifier *notifierPtr;
-
-    table = cmdPtr->table;
-    hPtr = Blt_FindHashEntry(&cmdPtr->notifyTable, Tcl_GetString(objv[3]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown notifier id \"", 
-		Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    niPtr = Blt_GetHashValue(hPtr);
-    notifierPtr = niPtr->notifier;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objv[3]); /* Copy notify Id */
-
-    subListObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (notifierPtr->flags & TABLE_NOTIFY_CREATE) {
-	objPtr = Tcl_NewStringObj("-create", -1);
-	Tcl_ListObjAppendElement(interp, subListObjPtr, objPtr);
-    }
-    if (notifierPtr->flags & TABLE_NOTIFY_DELETE) {
-	objPtr = Tcl_NewStringObj("-delete", -1);
-	Tcl_ListObjAppendElement(interp, subListObjPtr, objPtr);
-    }
-    if (notifierPtr->flags & TABLE_NOTIFY_WHENIDLE) {
-	objPtr = Tcl_NewStringObj("-whenidle", -1);
-	Tcl_ListObjAppendElement(interp, subListObjPtr, objPtr);
-    }
-    Tcl_ListObjAppendElement(interp, listObjPtr, subListObjPtr);
-
-    what = (notifierPtr->flags & TABLE_NOTIFY_ROW) ? "row" : "column";
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(what, -1));
-    if (notifierPtr->tag != NULL) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewStringObj(notifierPtr->tag, -1));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-	    Tcl_NewLongObj(Blt_Table_RowIndex(notifierPtr->header)));
-    }
-    subListObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (i = 0; i < niPtr->cmdc; i++) {
-	Tcl_ListObjAppendElement(interp, subListObjPtr, niPtr->cmdv[i]);
-    }
-    Tcl_ListObjAppendElement(interp, listObjPtr, subListObjPtr);
-
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyNamesOp --
- *
- *	Returns the names of all the notifiers in use by this instance.
- *	Notifiers issues by other instances or object clients are not
- *	reported.
- *
- * Results:
- *	Always TCL_OK.  A list of notifier names is left in the interpreter
- *	result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NotifyNamesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *objPtr;
-	const char *name;
-
-	name = Blt_GetHashKey(&cmdPtr->notifyTable, hPtr);
-	objPtr = Tcl_NewStringObj(name, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyOp --
- *
- *	Parses the given command line and calls one of several notifier
- *	specific operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec notifyOps[] =
-{
-    {"delete", 1, NotifyDeleteOp, 3, 0, "notifyId...",},
-    {"info",   1, NotifyInfoOp,   4, 4, "notifyId",},
-    {"names",  1, NotifyNamesOp,  3, 3, "",},
-};
-
-static int nNotifyOps = sizeof(notifyOps) / sizeof(Blt_OpSpec);
-
-static int
-NotifyOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nNotifyOps, notifyOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortOp --
- *  
- *	$t sort -dictionary -decreasing -list -ascii a b c 
- *
- *---------------------------------------------------------------------------
- */
-static int
-SortOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableSortOrder *sp, *order;
-    SortSwitches switches;
-    int i;
-    int result;
-    long n;
-    Blt_TableRow *map;
-
-    table = cmdPtr->table;
-    result = TCL_ERROR;
-
-    /* Process switches  */
-    switches.flags = 0;
-    i = Blt_ParseSwitches(interp, sortSwitches, objc - 2, objv + 2, &switches, 
-		BLT_SWITCH_OBJV_PARTIAL);
-    if (i < 0) {
-	return TCL_ERROR;
-    }
-    n = objc - i;
-    sp = order = Blt_AssertCalloc(n, sizeof(Blt_TableSortOrder));
-    for (/*empty*/; i < objc; i++) {
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objv[i]);
-	if (col == NULL) {
-	    goto error;
-	}
-	sp->column = col;
-    }
-    map = Blt_Table_SortRows(table, order, sp - order, switches.flags);
-    if (map == NULL) {
-	Tcl_AppendResult(interp, "out of memory: can't allocate sort map",
-			 (char *)NULL);
-	goto error;
-    }
-    if (switches.flags & SORT_LIST) {
-	Tcl_Obj *listObjPtr;
-	Blt_TableRow *ip, *iend;
-	
-	/* Return the new row order as a list. */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (ip = map, iend = ip + Blt_Table_NumRows(table); ip < iend; ip++) {
-	    Tcl_Obj *objPtr;
-
-	    /* Convert the table offset back to a client index. */
-	    objPtr = Tcl_NewLongObj(Blt_Table_RowIndex(*ip));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	Blt_Free(map);
-    } else {
-	/* Make row order permanent. */
-	Blt_Table_SetRowMap(table, map);
-    }
-    result = TCL_OK;
- error:
-    Blt_Free(order);
-    return result;
-}
-
-
-/************* Trace Operations *****************/
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceCreateOp --
- *
- *	Creates a trace for this instance.  Traces represent list of keys, a
- *	bitmask of trace flags, and a command prefix to be invoked when a
- *	matching trace event occurs.
- *
- *	The command prefix is parsed and saved in an array of Tcl_Objs. The
- *	qualified name of the instance is saved also.
- *
- * Results:
- *	A standard TCL result.  The name of the new trace is returned in the
- *	interpreter result.  Otherwise, if it failed to parse a switch, then
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- * Example:
- *	$t trace create row column how command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceCreateOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    Blt_TableIterator ri, ci;
-    Blt_TableTrace trace;
-    TraceInfo *tiPtr;
-    const char *rowTag, *colTag;
-    int flags;
-    Blt_TableRow row;
-    Blt_TableColumn col;
-    
-    table = cmdPtr->table;
-    if (Blt_Table_IterateRows(interp, table, objv[3], &ri) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_Table_IterateColumns(interp, table, objv[4], &ci) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = GetTraceFlags(Tcl_GetString(objv[5]));
-    if (flags < 0) {
-	Tcl_AppendResult(interp, "unknown flag in \"", Tcl_GetString(objv[5]), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    row = NULL;
-    col = NULL;
-    colTag = rowTag = NULL;
-    if (ri.type == TABLE_ITERATOR_RANGE) {
-	Tcl_AppendResult(interp, "can't trace range of rows: use a tag", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (ci.type == TABLE_ITERATOR_RANGE) {
-	Tcl_AppendResult(interp, "can't trace range of columns: use a tag", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((ri.type == TABLE_ITERATOR_INDEX) || 
-	(ri.type == TABLE_ITERATOR_LABEL)) {
-	row = Blt_Table_FirstTaggedRow(&ri);
-    } else {
-	rowTag = ri.tagName;
-    }
-    if ((ci.type == TABLE_ITERATOR_INDEX) || 
-	(ci.type == TABLE_ITERATOR_LABEL)) {
-	col = Blt_Table_FirstTaggedColumn(&ci);
-    } else {
-	colTag = ci.tagName;
-    }
-    tiPtr = Blt_Malloc(sizeof(TraceInfo));
-    if (tiPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate trace: out of memory", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    trace = Blt_Table_CreateTrace(table, row, col, rowTag, colTag, 
-	flags, TraceProc, TraceDeleteProc, tiPtr);
-    if (trace == NULL) {
-	Tcl_AppendResult(interp, "can't create individual trace: out of memory",
-		(char *)NULL);
-	Blt_Free(tiPtr);
-	return TCL_ERROR;
-    }
-    /* Initialize the trace information structure. */
-    tiPtr->cmdPtr = cmdPtr;
-    tiPtr->trace = trace;
-    tiPtr->tablePtr = &cmdPtr->traceTable;
-    {
-	Tcl_Obj **elv, **cmdv;
-	int elc, i;
-
-	if (Tcl_ListObjGetElements(interp, objv[6], &elc, &elv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* 
-	 * Command + tableName + row + column + flags + NULL
-	 */
-	cmdv = Blt_AssertCalloc(elc + 1 + 3 + 1, sizeof(Tcl_Obj *));
-	for(i = 0; i < elc; i++) {
-	    cmdv[i] = elv[i];
-	    Tcl_IncrRefCount(cmdv[i]);
-	}
-	cmdv[i] = Tcl_NewStringObj(cmdPtr->hPtr->key.string, -1);
-	Tcl_IncrRefCount(cmdv[i]);
-	tiPtr->cmdc = elc;
-	tiPtr->cmdv = cmdv;
-    }
-    {
-	int isNew;
-	char traceId[200];
-	Blt_HashEntry *hPtr;
-
-	do {
-	    sprintf_s(traceId, 200, "trace%d", cmdPtr->nextTraceId++);
-	    hPtr = Blt_CreateHashEntry(&cmdPtr->traceTable, traceId, &isNew);
-	} while (!isNew);
-	tiPtr->hPtr = hPtr;
-	Blt_SetHashValue(hPtr, tiPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), traceId, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceDeleteOp --
- *
- *	Deletes one or more traces.  Can be any type of trace.
- *
- * Results:
- *	A standard TCL result.  If a name given doesn't represent a trace,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- * Example:
- *	$t trace delete $id...
- *---------------------------------------------------------------------------
- */
-static int
-TraceDeleteOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	TraceInfo *tiPtr;
-
-	hPtr = Blt_FindHashEntry(&cmdPtr->traceTable, Tcl_GetString(objv[i]));
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown trace \"", 
-			     Tcl_GetString(objv[i]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	tiPtr = Blt_GetHashValue(hPtr);
-	Blt_Table_DeleteTrace(tiPtr->trace);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceInfoOp --
- *
- *	Returns the details for a given trace.  The name of the trace is
- *	passed as an argument.  The details are returned as a list of
- *	key-value pairs: trace name, tag, row index, keys, flags, and the
- *	command prefix.
- *
- * Results:
- *	A standard TCL result.  If the name given doesn't represent a trace,
- *	then TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- * Example:
- *	$t trace info $trace
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceInfoOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    TraceInfo *tiPtr;
-    Tcl_Obj *listObjPtr;
-
-    hPtr = Blt_FindHashEntry(&cmdPtr->traceTable, Tcl_GetString(objv[3]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown trace \"", Tcl_GetString(objv[3]), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    tiPtr = Blt_GetHashValue(hPtr);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    PrintTraceInfo(interp, tiPtr, listObjPtr);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceNamesOp --
- *
- *	Returns the names of all the traces in use by this instance.  Traces
- *	created by other instances or object clients are not reported.
- *
- * Results:
- *	Always TCL_OK.  A list of trace names is left in the interpreter
- *	result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceNamesOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->traceTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewStringObj(Blt_GetHashKey(&cmdPtr->traceTable, hPtr),-1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceOp --
- *
- * 	This procedure is invoked to process trace operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec traceOps[] =
-{
-    {"create", 1, TraceCreateOp, 7, 7, "row column how command",},
-    {"delete", 1, TraceDeleteOp, 3, 0, "traceId...",},
-    {"info",   1, TraceInfoOp,   4, 4, "traceId",},
-    {"names",  1, TraceNamesOp,  3, 3, "",},
-};
-
-static int nTraceOps = sizeof(traceOps) / sizeof(Blt_OpSpec);
-
-static int
-TraceOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTraceOps, traceOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetOp --
- *
- *	Sets one or more key-value pairs for tables.  One or more tables may
- *	be set.  If any of the columns (keys) given don't already exist, the
- *	columns will be automatically created.  The same holds true for rows.
- *	If a row index is beyond the end of the table (tags are always in
- *	range), new rows are allocated.
- * 
- * Results:
- *	A standard TCL result. If the tag or index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t set $row $column $value ?row column value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-
-    if (((objc - 2) % 3) != 0) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), 
-		" set ?row column value?...\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    table = cmdPtr->table;
-    for (i = 2; i < objc; i += 3) {
-	Blt_TableIterator ri, ci;
-	Blt_TableColumn col;
-
-	if (IterateRows(interp, table, objv[i], &ri) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (IterateColumns(interp, table, objv[i + 1], &ci) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&ci); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&ci)) {
-	    Blt_TableRow row;
-
-	    for (row = Blt_Table_FirstTaggedRow(&ri); row != NULL; 
-		 row = Blt_Table_NextTaggedRow(&ri)) {
-		if (Blt_Table_SetObj(table, row, col, objv[i+2]) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}	    
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnsetOp --
- *
- *	$t unset row column ?row column?
- *
- *	Unsets one or more values.  One or more tables may be unset (using
- *	tags).  It's not an error if one of the key names (columns) doesn't
- *	exist.  The same holds true for rows.  If a row index is beyond the
- *	end of the table (tags are always in range), it is also ignored.
- * 
- * Results:
- *	A standard TCL result. If the tag or index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- *---------------------------------------------------------------------------
- */
-static int
-UnsetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    int i;
-
-    if ((objc - 2) & 1) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " unset ?row column?...", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    table = cmdPtr->table;
-    for (i = 2; i < objc; i += 2) {
-	Blt_TableIterator ri, ci;
-	Blt_TableColumn col;
-
-	if (Blt_Table_IterateRows(NULL, table, objv[i], &ri) != TCL_OK) {
-	    return TCL_OK;
-	}
-	if (Blt_Table_IterateColumns(NULL, table, objv[i+1], &ci) != TCL_OK) {
-	    return TCL_OK;
-	}
-	for (col = Blt_Table_FirstTaggedColumn(&ci); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&ci)) {
-	    Blt_TableRow row;
-
-	    for (row = Blt_Table_FirstTaggedRow(&ri); row != NULL; 
-		 row = Blt_Table_NextTaggedRow(&ri)) {
-
-		if (Blt_Table_UnsetValue(table, row, col) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}	    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestoreOp --
- *
- * $t restore $string -overwrite -notags
- * $t restorefile $fileName -overwrite -notags
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RestoreOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    RestoreSwitches switches;
-    int result;
-
-    memset((char *)&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, restoreSwitches, objc - 2, objv + 2, 
-		&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "can't set both -file and -data switches.",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (switches.dataObjPtr != NULL) {
-	result = Blt_Table_Restore(interp, cmdPtr->table, 
-		Tcl_GetString(switches.dataObjPtr), switches.flags);
-    } else if (switches.fileObjPtr != NULL) {
-	result = Blt_Table_FileRestore(interp, cmdPtr->table, 
-		Tcl_GetString(switches.fileObjPtr), switches.flags);
-    } else {
-	result = Blt_Table_FileRestore(interp, cmdPtr->table, "out.dump", 
-		switches.flags);
-    }
-    Blt_FreeSwitches(restoreSwitches, &switches, 0);
-    return result;
-}
-
-static int
-WriteRecord(Tcl_Channel channel, Tcl_DString *dsPtr)
-{
-    int length, nWritten;
-    char *line;
-
-    length = Tcl_DStringLength(dsPtr);
-    line = Tcl_DStringValue(dsPtr);
-#if HAVE_UTF
-#ifdef notdef
-    nWritten = Tcl_WriteChars(channel, line, length);
-#endif
-    nWritten = Tcl_Write(channel, line, length);
-#else
-    nWritten = Tcl_Write(channel, line, length);
-#endif
-    if (nWritten != length) {
-	return FALSE;
-    }
-    Tcl_DStringSetLength(dsPtr, 0);
-    return TRUE;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpHeader --
- *
- *	Prints the info associated with a column into a dynamic
- *	string.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DumpHeader(DumpSwitches *dumpPtr, long nRows, long nCols)
-{
-    /* i rows columns ctime mtime \n */
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, "i");
-
-    /* # of rows and columns may be a subset of the table. */
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(nRows));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(nCols));
-
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(0));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(0));
-    Tcl_DStringAppend(dumpPtr->dsPtr, "\n", 1);
-    if (dumpPtr->channel != NULL) {
-	return WriteRecord(dumpPtr->channel, dumpPtr->dsPtr);
-    }
-    return TRUE;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpValue --
- *
- *	Retrieves all tags for a given row or column into a tcl list.  
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DumpValue(Blt_Table table, DumpSwitches *dumpPtr, Blt_TableRow row, 
-	  Blt_TableColumn col)
-{
-    const char *string;
-
-    string = Blt_Table_GetString(table, row, col);
-    if (string == NULL) {
-	return TRUE;
-    }
-    /* d row column value \n */
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, "d");
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(Blt_Table_RowIndex(row)));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(Blt_Table_ColumnIndex(col)));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, string);
-    Tcl_DStringAppend(dumpPtr->dsPtr, "\n", 1);
-    if (dumpPtr->channel != NULL) {
-	return WriteRecord(dumpPtr->channel, dumpPtr->dsPtr);
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpColumn --
- *
- *	Prints the info associated with a column into a dynamic string.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DumpColumn(Blt_Table table, DumpSwitches *dumpPtr, Blt_TableColumn col)
-{
-    Blt_Chain colTags;
-    Blt_ChainLink link;
-    const char *name;
-
-    /* c index label type tags \n */
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, "c");
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(Blt_Table_ColumnIndex(col)));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Table_ColumnLabel(col));
-    name = Blt_Table_NameOfType(Blt_Table_ColumnType(col));
-    if (name == NULL) {
-	name = "";
-    }
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, name);
-
-    colTags = Blt_Table_ColumnTags(table, col);
-    Tcl_DStringStartSublist(dumpPtr->dsPtr);
-    for (link = Blt_Chain_FirstLink(colTags); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	const char *tagName;
-
-	tagName = Blt_Chain_GetValue(link);
-	Tcl_DStringAppendElement(dumpPtr->dsPtr, tagName);
-    }
-    Blt_Chain_Destroy(colTags);
-    Tcl_DStringEndSublist(dumpPtr->dsPtr);
-    Tcl_DStringAppend(dumpPtr->dsPtr, "\n", 1);
-    if (dumpPtr->channel != NULL) {
-	return WriteRecord(dumpPtr->channel, dumpPtr->dsPtr);
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpRow --
- *
- *	Prints the info associated with a row into a dynamic string.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DumpRow(Blt_Table table, DumpSwitches *dumpPtr, Blt_TableRow row)
-{
-    Blt_Chain rowTags;
-    Blt_ChainLink link;
-
-    /* r index label tags \n */
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, "r");
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, Blt_Ltoa(Blt_Table_RowIndex(row)));
-    Tcl_DStringAppendElement(dumpPtr->dsPtr, (char *)Blt_Table_RowLabel(row));
-    Tcl_DStringStartSublist(dumpPtr->dsPtr);
-    rowTags = Blt_Table_RowTags(table, row);
-    for (link = Blt_Chain_FirstLink(rowTags); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	const char *tagName;
-
-	tagName = Blt_Chain_GetValue(link);
-	Tcl_DStringAppendElement(dumpPtr->dsPtr, tagName);
-    }
-    Blt_Chain_Destroy(rowTags);
-    Tcl_DStringEndSublist(dumpPtr->dsPtr);
-    Tcl_DStringAppend(dumpPtr->dsPtr, "\n", 1);
-    if (dumpPtr->channel != NULL) {
-	return WriteRecord(dumpPtr->channel, dumpPtr->dsPtr);
-    }
-    return TRUE;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpTable --
- *
- *	Dumps data from the given table based upon the row and column maps
- *	provided which describe what rows and columns are to be dumped. The
- *	dump information is written to the file named. If the file name starts
- *	with an '@', then it is the name of an already opened channel to be
- *	used.
- *	
- * Results:
- *	A standard TCL result.  If the dump was successful, TCL_OK is
- *	returned.  Otherwise, TCL_ERROR is returned and an error message is
- *	left in the interpreter result.
- *
- * Side Effects:
- *	Dump information is written to the named file.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DumpTable(Blt_Table table, DumpSwitches *dumpPtr)
-{
-    int result;
-    long nCols, nRows;
-    Blt_TableColumn col;
-    Blt_TableRow row;
-
-    if (dumpPtr->ri.chain != NULL) {
-	nRows = Blt_Chain_GetLength(dumpPtr->ri.chain);
-    } else {
-	nRows = Blt_Table_NumRows(table);
-    }
-    if (dumpPtr->ci.chain != NULL) {
-	nCols = Blt_Chain_GetLength(dumpPtr->ci.chain);
-    } else {
-	nCols = Blt_Table_NumColumns(table);
-    }
-    result = DumpHeader(dumpPtr, nRows, nCols);
-    for (col = Blt_Table_FirstTaggedColumn(&dumpPtr->ci); 
-	 (result) && (col != NULL); 
-	 col = Blt_Table_NextTaggedColumn(&dumpPtr->ci)) {
-	result = DumpColumn(table, dumpPtr, col);
-    }
-    for (row = Blt_Table_FirstTaggedRow(&dumpPtr->ri); 
-	 (result) && (row != NULL); 
-	 row = Blt_Table_NextTaggedRow(&dumpPtr->ri)) {
-	result = DumpRow(table, dumpPtr, row);
-    }
-    for (col = Blt_Table_FirstTaggedColumn(&dumpPtr->ci); 
-	 (result) && (col != NULL); 
-	 col = Blt_Table_NextTaggedColumn(&dumpPtr->ci)) {
-	for (row = Blt_Table_FirstTaggedRow(&dumpPtr->ri); 
-	     (result) && (row != NULL); 
-	     row = Blt_Table_NextTaggedRow(&dumpPtr->ri)) {
-	    result = DumpValue(table, dumpPtr, row, col);
-	}
-    }
-    return (result) ? TCL_OK : TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpOp --
- *
- * set data [$t dump -rows {} -columns {}]
- * $t dump -file fileName -rows {} -columns {} 
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DumpOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Table table;
-    DumpSwitches switches;
-    int result;
-    Tcl_DString ds;
-    int closeChannel;
-    Tcl_Channel channel;
-
-    closeChannel = FALSE;
-    channel = NULL;
-    table = cmdPtr->table;
-    result = TCL_ERROR;
-    memset(&switches, 0, sizeof(switches));
-    switches.channel = channel;
-    switches.dsPtr = &ds;
-    rowIterSwitch.clientData = cmdPtr->table;
-    columnIterSwitch.clientData = cmdPtr->table;
-    Blt_Table_IterateAllRows(table, &switches.ri);
-    Blt_Table_IterateAllColumns(table, &switches.ci);
-    if (Blt_ParseSwitches(interp, dumpSwitches, objc - 2, objv + 2, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	const char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-
-	closeChannel = TRUE;
-	if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	    int mode;
-	    
-	    channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	    if ((mode & TCL_WRITABLE) == 0) {
-		Tcl_AppendResult(interp, "can't dump table: channel \"", 
-			fileName, "\" not opened for writing", (char *)NULL);
-		goto error;
-	    }
-	    closeChannel = FALSE;
-	} else {
-	    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	}
-	switches.channel = channel;
-    }
-    Tcl_DStringInit(&ds);
-    result = DumpTable(table, &switches);
-    if ((switches.channel == NULL) && (result == TCL_OK)) {
-	Tcl_DStringResult(interp, &ds);
-    }
-    Tcl_DStringFree(&ds);
- error:
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    Blt_FreeSwitches(dumpSwitches, &switches, 0);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmptyValueOp --
- *
- *	$t emptyvalue ?$value?
- *
- *---------------------------------------------------------------------------
- */
-static int
-EmptyValueOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), cmdPtr->emptyValue, -1);
-    if (objc == 3) {
-	if (cmdPtr->emptyValue != NULL) {
-	    Blt_Free(cmdPtr->emptyValue);
-	    cmdPtr->emptyValue = Blt_AssertStrdup(Tcl_GetString(objv[2]));
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExistsOp --
- *
- *	$t exists $row $column
- *
- *---------------------------------------------------------------------------
- */
-static int
-ExistsOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int bool;
-    Blt_TableRow row;
-    Blt_TableColumn col;
-
-    bool = FALSE;
-    row = Blt_Table_FindRow(NULL, cmdPtr->table, objv[2]);
-    col = Blt_Table_FindColumn(NULL, cmdPtr->table, objv[3]);
-    if ((row != NULL) && (col != NULL)) {
-	bool = Blt_Table_ValueExists(cmdPtr->table, row, col);
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *	Parses the given command line and calls one of several export-specific
- *	operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of operation called.
- *
- * Example:
- *	$t find expr ?switches?
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    FindSwitches switches;
-    int result;
-
-    memset(&switches, 0, sizeof(switches));
-    rowIterSwitch.clientData = cmdPtr->table;
-    Blt_Table_IterateAllRows(cmdPtr->table, &switches.iter);
-
-    if (Blt_ParseSwitches(interp, findSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    switches.table = cmdPtr->table;
-    Blt_InitHashTable(&switches.varTable, BLT_ONE_WORD_KEYS);
-    result = FindRows(interp, cmdPtr->table, objv[2], &switches);
-    Blt_FreeSwitches(findSwitches, &switches, 0);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *	Retrieves the value from a given table for a designated row,column
- *	location.
- *
- *	Normally it's an error if the column or row key is invalid or the data
- *	slot is empty (the Tcl_Obj is NULL). But if an extra argument is
- *	provided, then it is returned as a default value.
- * 
- * Results:
- *	A standard TCL result. If the tag or index is invalid, TCL_ERROR is
- *	returned and an error message is left in the interpreter result.
- *	
- * Example:
- *	$t get row column ?defValue?
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *objPtr;
-    Blt_TableRow row;
-    Blt_TableColumn col;
-
-    row = Blt_Table_FindRow(interp, cmdPtr->table, objv[2]);
-    if (row == NULL) {
-	if (objc == 5) {
-	    objPtr = objv[4];
-	    goto done;
-	}
-	return TCL_ERROR;
-    } 
-    col = Blt_Table_FindColumn(interp, cmdPtr->table, objv[3]);
-    if (col == NULL) {
-	if (objc == 5) {
-	    objPtr = objv[4];
-	    goto done;
-	}
-	return TCL_ERROR;
-    } 
-    objPtr = Blt_Table_GetObj(cmdPtr->table, row, col);
-    if (objPtr == NULL) {
-	if (objc == 5) {
-	    objPtr = objv[4];
-	} else {
-	    objPtr = Tcl_NewStringObj(cmdPtr->emptyValue, -1);
-	}
-    }
- done:
-    Tcl_SetObjResult(interp, objPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AttachOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-AttachOp(Cmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	const char *qualName;
-	Blt_ObjectName objName;
-	Blt_Table table;
-	Tcl_DString ds;
-	int result;
-
-	if (!Blt_ParseObjectName(interp, Tcl_GetString(objv[2]), &objName, 0)) {
-	    return TCL_ERROR;
-	}
-	qualName = Blt_MakeQualifiedName(&objName, &ds);
-	result = Blt_Table_Open(interp, qualName, &table);
-	Tcl_DStringFree(&ds);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (cmdPtr->table != NULL) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch iter;
-	    
-	    Blt_Table_Close(cmdPtr->table);
-	    /* Free the current set of tags, traces, and notifiers. */
-	    for (hPtr = Blt_FirstHashEntry(&cmdPtr->traceTable, &iter); 
-		 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		TraceInfo *tiPtr;
-
-		tiPtr = Blt_GetHashValue(hPtr);
-		Blt_Table_DeleteTrace(tiPtr->trace);
-	    }
-	    Blt_DeleteHashTable(&cmdPtr->traceTable);
-	    Blt_InitHashTable(&cmdPtr->traceTable, TCL_STRING_KEYS);
-	    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter); 
-		hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		NotifierInfo *niPtr;
-
-		niPtr = Blt_GetHashValue(hPtr);
-		FreeNotifierInfo(niPtr);
-	    }
-	    Blt_DeleteHashTable(&cmdPtr->notifyTable);
-	    Blt_InitHashTable(&cmdPtr->notifyTable, TCL_STRING_KEYS);
-	}
-	cmdPtr->table = table;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		     Blt_Table_TableName(cmdPtr->table), -1);
-    return TCL_OK;
-}
-
-static Blt_OpSpec tableOps[] =
-{
-    {"append",     2, AppendOp,     5, 0, "row column value ?value...?",},
-    {"attach",     2, AttachOp,     3, 0, "args...",},
-    {"column",     3, ColumnOp,     3, 0, "op args...",},
-#ifdef notdef
-    {"dup",        1, DupOp,        3, 0, "args...",},
-#endif
-    {"dump",       1, DumpOp,       2, 0, "?switches?",},
-    {"emptyvalue", 2, EmptyValueOp, 2, 3, "?newValue?",},
-    {"exists",     3, ExistsOp,     4, 4, "row column",},
-    {"export",     3, ExportOp,     2, 0, "format args...",},
-    {"find",	   1, FindOp,	    3, 0, "expr ?switches?",},
-    {"get",        1, GetOp,        4, 5, "row column ?defValue?",},
-    {"import",     1, ImportOp,     2, 0, "format args...",},
-    {"keys",       1, KeysOp,       2, 0, "?column...?",},
-    {"lappend",    2, LappendOp,    5, 0, "row column value ?value...?",},
-    {"lookup",     2, LookupOp,     2, 0, "?value...?",},
-    {"notify",     1, NotifyOp,     2, 0, "op args...",},
-    {"restore",    2, RestoreOp,    2, 0, "?switches?",},
-    {"row",        2, RowOp,        3, 0, "op args...",},
-    {"set",        2, SetOp,        3, 0, "?row column value?...",},
-    {"sort",       2, SortOp,       3, 0, "?flags...?",},
-    {"trace",      2, TraceOp,      2, 0, "op args...",},
-    {"unset",      1, UnsetOp,      4, 0, "row column ?row column?",},
-#ifdef notplanned
-    {"-apply",     1, ApplyOp,      3, 0, "first last ?switches?",},
-    {"copy",       2, CopyOp,       4, 0, 
-	"srcNode ?destTable? destNode ?switches?",},
-#endif
-};
-
-static int nTableOps = sizeof(tableOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableInstObjCmd --
- *
- * 	This procedure is invoked to process commands on behalf of * the
- * 	instance of the table-object.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableInstObjCmd(
-    ClientData clientData,		/* Pointer to the datatable command
-					 * structure. */
-    Tcl_Interp *interp,			/* Interpreter to report errors. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Vector of argument strings. */
-{
-    CmdProc *proc;
-    Cmd *cmdPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTableOps, tableOps, BLT_OP_ARG1, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(cmdPtr);
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    Tcl_Release(cmdPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableInstDeleteProc --
- *
- *	Deletes the command associated with the table.  This is called only
- *	when the command associated with the table is destroyed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The table object is released and bookkeeping data for traces and
- *	notifiers are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TableInstDeleteProc(ClientData clientData)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Cmd *cmdPtr = clientData;
-
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->traceTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	TraceInfo *tiPtr;
-
-	tiPtr = Blt_GetHashValue(hPtr);
-	Blt_Table_DeleteTrace(tiPtr->trace);
-    }
-    Blt_DeleteHashTable(&cmdPtr->traceTable);
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	NotifierInfo *niPtr;
-
-	niPtr = Blt_GetHashValue(hPtr);
-	FreeNotifierInfo(niPtr);
-    }
-    if (cmdPtr->emptyValue != NULL) {
-	Blt_Free(cmdPtr->emptyValue);
-    }
-    Blt_DeleteHashTable(&cmdPtr->notifyTable);
-    if (cmdPtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(cmdPtr->tablePtr, cmdPtr->hPtr);
-    }
-    Blt_Table_Close(cmdPtr->table);
-    Blt_Free(cmdPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableCreateOp --
- *
- *	Creates a new instance of a table object.  
- *
- *	This routine insures that instance and object names are the same.  For
- *	example, you can't create an instance with the name of an object that
- *	already exists.  And because each instance has a TCL command
- *	associated with it (used to access the object), we additionally check
- *	more that it's not an existing TCL command.
- *
- *	Instance names are namespace-qualified.  If the given name doesn't
- *	have a namespace qualifier, that instance will be created in the
- *	current namespace (not the global namespace).
- *	
- * Results:
- *	A standard TCL result.  If the instance is successfully created, the
- *	namespace-qualified name of the instance is returned. If not, then
- *	TCL_ERROR is returned and an error message is left in the interpreter
- *	result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TableCreateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    const char *instName;
-    Tcl_DString ds;
-    Blt_Table table;
-
-    instName = NULL;
-    if (objc == 3) {
-	instName = Tcl_GetString(objv[2]);
-    }
-    Tcl_DStringInit(&ds);
-    if (instName == NULL) {
-	instName = GenerateName(interp, "", "", &ds);
-    } else {
-	char *p;
-
-	p = strstr(instName, "#auto");
-	if (p != NULL) {
-	    *p = '\0';
-	    instName = GenerateName(interp, instName, p + 5, &ds);
-	    *p = '#';
-	} else {
-	    Blt_ObjectName objName;
-	    Tcl_CmdInfo cmdInfo;
-
-	    /* 
-	     * Parse the command and put back so that it's in a consistent
-	     * format.  
-	     *
-	     *	t1         <current namespace>::t1
-	     *	n1::t1     <current namespace>::n1::t1
-	     *	::t1	   ::t1
-	     *  ::n1::t1   ::n1::t1
-	     */
-	    if (!Blt_ParseObjectName(interp, instName, &objName, 0)) {
-		return TCL_ERROR;
-	    }
-	    instName = Blt_MakeQualifiedName(&objName, &ds);
-	    /* 
-	     * Check if the command already exists. 
-	     */
-	    if (Tcl_GetCommandInfo(interp, (char *)instName, &cmdInfo)) {
-		Tcl_AppendResult(interp, "a command \"", instName,
-				 "\" already exists", (char *)NULL);
-		goto error;
-	    }
-	    if (Blt_Table_TableExists(interp, instName)) {
-		Tcl_AppendResult(interp, "a table \"", instName, 
-			"\" already exists", (char *)NULL);
-		goto error;
-	    }
-	} 
-    } 
-    if (instName == NULL) {
-	goto error;
-    }
-    if (Blt_Table_CreateTable(interp, instName, &table) == TCL_OK) {
-	Cmd *cmdPtr;
-
-	cmdPtr = NewTableCmd(interp, table, instName);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), instName, -1);
-	Tcl_DStringFree(&ds);
-	return TCL_OK;
-    }
- error:
-    Tcl_DStringFree(&ds);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableDestroyOp --
- *
- *	Deletes one or more instances of table objects.  The deletion process
- *	is done by deleting the TCL command associated with the object.
- *	
- * Results:
- *	A standard TCL result.  If one of the names given doesn't represent an
- *	instance, TCL_ERROR is returned and an error message is left in the
- *	interpreter result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableDestroyOp(ClientData clientData, Tcl_Interp *interp, int objc,
-	       Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Cmd *cmdPtr;
-
-	cmdPtr = GetTableCmd(interp, Tcl_GetString(objv[i]));
-	if (cmdPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find table \"", 
-		Tcl_GetString(objv[i]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tcl_DeleteCommandFromToken(interp, cmdPtr->cmdToken);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableNamesOp --
- *
- *	Returns the names of all the table-object instances matching a given
- *	pattern.  If no pattern argument is provided, then all object names
- *	are returned.  The names returned are namespace qualified.
- *	
- * Results:
- *	Always returns TCL_OK.  The names of the matching objects is returned
- *	via the interpreter result.
- *
- * Example:
- *	$t names ?pattern?
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TableNamesOp(ClientData clientData, Tcl_Interp *interp, int objc,
-	     Tcl_Obj *const *objv)
-{
-    TableCmdInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->instTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	const char *name;
-	int match;
-	int i;
-
-	name = Blt_GetHashKey(&dataPtr->instTable, hPtr);
-	match = TRUE;
-	for (i = 2; i < objc; i++) {
-	    match = Tcl_StringMatch(name, Tcl_GetString(objv[i]));
-	    if (match) {
-		break;
-	    }
-	}
-	if (!match) {
-	    continue;
-	}
-	Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(name, -1));
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-TableLoadOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    TableCmdInterpData *dataPtr = clientData;
-    Tcl_DString libName;
-    const char *fmt;
-    char *safeProcName, *initProcName;
-    int result;
-    int length;
-
-    fmt = Tcl_GetStringFromObj(objv[2], &length);
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, fmt);
-    if (hPtr != NULL) {
-	return TCL_OK;		/* Converter is already loaded. */
-    }
-    Tcl_DStringInit(&libName);
-    {
-	Tcl_DString pathName;
-	const char *path;
-
-	Tcl_DStringInit(&pathName);
-	path = Tcl_TranslateFileName(interp, Tcl_GetString(objv[3]), &pathName);
-	if (path == NULL) {
-	    Tcl_DStringFree(&pathName);
-	    return TCL_ERROR;
-	}
-	Tcl_DStringAppend(&libName, path, -1);
-	Tcl_DStringFree(&pathName);
-    }
-    Tcl_DStringAppend(&libName, "/", -1);
-    Tcl_UtfToTitle((char *)fmt);
-    Tcl_DStringAppend(&libName, "Table", 9);
-    Tcl_DStringAppend(&libName, fmt, -1);
-    Tcl_DStringAppend(&libName, Blt_Itoa(BLT_MAJOR_VERSION), 1);
-    Tcl_DStringAppend(&libName, Blt_Itoa(BLT_MINOR_VERSION), 1);
-    Tcl_DStringAppend(&libName, BLT_LIB_SUFFIX, -1);
-    Tcl_DStringAppend(&libName, BLT_SO_EXT, -1);
-
-    initProcName = Blt_AssertMalloc(7 + length + 4 + 1);
-    sprintf_s(initProcName, 7 + length + 4 + 1, "Blt_Table_%sInit", fmt);
-    safeProcName = Blt_AssertMalloc(7 + length + 8 + 1);
-    sprintf_s(safeProcName, 7 + length + 8 + 1, "Blt_Table_%sSafeInit",fmt);
-
-    result = Blt_LoadLibrary(interp, Tcl_DStringValue(&libName), initProcName, 
-	safeProcName); 
-    Tcl_DStringFree(&libName);
-    if (safeProcName != NULL) {
-	Blt_Free(safeProcName);
-    }
-    if (initProcName != NULL) {
-	Blt_Free(initProcName);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableObjCmd --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tableCmdOps[] =
-{
-    {"create",  1, TableCreateOp,  2, 3, "?name?",},
-    {"destroy", 1, TableDestroyOp, 3, 0, "name...",},
-    {"load",    1, TableLoadOp,    4, 4, "name libpath",},
-    {"names",   1, TableNamesOp,   2, 3, "?pattern?...",},
-};
-
-static int nCmdOps = sizeof(tableCmdOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-TableObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    CmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nCmdOps, tableCmdOps, BLT_OP_ARG1, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableInterpDeleteProc --
- *
- *	This is called when the interpreter registering the "datatable"
- *	command is deleted.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Removes the hash table managing all table names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TableInterpDeleteProc(ClientData clientData, Tcl_Interp *interp)
-{
-    TableCmdInterpData *dataPtr = clientData;
-
-    /* All table instances should already have been destroyed when their
-     * respective TCL commands were deleted. */
-    Blt_DeleteHashTable(&dataPtr->instTable);
-    Blt_DeleteHashTable(&dataPtr->fmtTable);
-    Blt_DeleteHashTable(&dataPtr->findTable);
-    Tcl_DeleteAssocData(interp, TABLE_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TableCmdInitProc --
- *
- *	This procedure is invoked to initialize the "dtable" command.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Creates the new command and adds a new entry into a global Tcl
- *	associative array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TableCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "datatable", TableObjCmd, };
-
-    cmdSpec.clientData = GetTableCmdInterpData(interp);
-    if (Blt_InitCmd(interp, "::blt", &cmdSpec) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/* Dump table to dbm */
-/* Convert node data to datablock */
-
-int
-Blt_Table_RegisterFormat(Tcl_Interp *interp, const char *fmt, 
-			 Blt_TableImportProc *importProc, 
-			 Blt_TableExportProc *exportProc)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TableCmdInterpData *dataPtr;
-    int isNew;
-
-    dataPtr = GetTableCmdInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->fmtTable, fmt, &isNew);
-    if (isNew) {
-	fmtPtr = Blt_AssertMalloc(sizeof(DataFormat));
-	fmtPtr->name = Blt_AssertStrdup(fmt);
-	Blt_SetHashValue(hPtr, fmtPtr);
-    } else {
-	fmtPtr = Blt_GetHashValue(hPtr);
-    }
-    fmtPtr->isLoaded = TRUE;
-    fmtPtr->importProc = importProc;
-    fmtPtr->exportProc = exportProc;
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltDtCsv.c b/blt3.0/src/bltDtCsv.c
deleted file mode 100644
index 6ded93d..0000000
--- a/blt3.0/src/bltDtCsv.c
+++ /dev/null
@@ -1,676 +0,0 @@
-
-/*
- *
- * bltDtCsv.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#ifndef NO_DATATABLE
-
-#include "config.h"
-#include <tcl.h>
-#include <bltSwitch.h>
-#include <bltHash.h>
-#include <bltDataTable.h>
-#include <bltAlloc.h>
-
-#ifdef HAVE_CTYPE_H
-#  include <ctype.h>
-#endif /* HAVE_CTYPE_H */
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-DLLEXPORT extern Tcl_AppInitProc Blt_Table_CsvInit;
-
-#define TRUE 	1
-#define FALSE 	0
-
-/*
- * Format	Import		Export
- * csv		file/data	file/data
- * tree		data		data
- * vector	data		data
- * xml		file/data	file/data
- * sql		data		data
- *
- * $table import csv -file fileName -data dataString 
- * $table export csv -file defaultFileName 
- * $table import tree $treeName $node ?switches? 
- * $table export tree $treeName $node "label" "label" "label"
- * $table import vector $vecName label $vecName label...
- * $table export vector label $vecName label $vecName..
- * $table import xml -file fileName -data dataString ?switches?
- * $table export xml -file fileName -data dataString ?switches?
- * $table import sql -host $host -password $pw -db $db -port $port 
- */
-
-/*
- * ImportSwitches --
- */
-typedef struct {
-    unsigned int flags;
-    Tcl_Channel channel;		/* If non-NULL, channel to read
-					 * from. */
-    char *buffer;			/* Buffer to read data into. */
-    int nBytes;				/* # of bytes in the buffer. */
-    Tcl_Interp *interp;
-    Blt_HashTable dataTable;
-    Tcl_Obj *fileObjPtr;		/* Name of file representing the
-					 * channel used as the input
-					 * source. */
-    Tcl_Obj *dataObjPtr;		/* If non-NULL, data object to use as
-					 * input source. */
-    char *quote;			/* Quoted string delimiter. */
-    char *sep;				/* Separator character. */
-    int maxRows;			/* Stop processing after this many
-					 * rows have been found. */
-} ImportSwitches;
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ,	"-data",      "string",
-	Blt_Offset(ImportSwitches, dataObjPtr), 0, 0, NULL},
-    {BLT_SWITCH_OBJ,	"-file",      "fileName",
-	Blt_Offset(ImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_INT_NNEG, "-maxrows", "integer",
-	Blt_Offset(ImportSwitches, maxRows), 0},
-    {BLT_SWITCH_STRING, "-quote",     "char",
-	Blt_Offset(ImportSwitches, quote), 0},
-    {BLT_SWITCH_STRING, "-separator", "char",
-	Blt_Offset(ImportSwitches, sep), 0},
-    {BLT_SWITCH_END}
-};
-
-/*
- * ExportSwitches --
- */
-typedef struct {
-    Blt_TableIterator rIter, cIter;
-    unsigned int flags;
-    Tcl_Obj *fileObjPtr;
-    Tcl_Channel channel;	/* If non-NULL, channel to write output to. */
-    Tcl_DString *dsPtr;
-    int length;			/* Length of dynamic string. */
-    int count;			/* Number of fields in current record. */
-    Tcl_Interp *interp;
-    char *quote;		/* Quoted string delimiter. */
-    char *sep;			/* Separator character. */
-} ExportSwitches;
-
-extern Blt_SwitchFreeProc Blt_Table_ColumnIterFreeProc;
-extern Blt_SwitchFreeProc Blt_Table_RowIterFreeProc;
-extern Blt_SwitchParseProc Blt_Table_ColumnIterSwitchProc;
-extern Blt_SwitchParseProc Blt_Table_RowIterSwitchProc;
-
-static Blt_SwitchCustom columnIterSwitch = {
-    Blt_Table_ColumnIterSwitchProc, Blt_Table_ColumnIterFreeProc, 0,
-};
-static Blt_SwitchCustom rowIterSwitch = {
-    Blt_Table_RowIterSwitchProc, Blt_Table_RowIterFreeProc, 0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-columns",   "columns",
-	Blt_Offset(ExportSwitches, cIter),   0, 0, &columnIterSwitch},
-    {BLT_SWITCH_OBJ,    "-file",      "fileName",
-	Blt_Offset(ExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_STRING, "-quote",     "char",
-	Blt_Offset(ExportSwitches, quote),   0},
-    {BLT_SWITCH_CUSTOM, "-rows",      "rows",
-	Blt_Offset(ExportSwitches, rIter),   0, 0, &rowIterSwitch},
-    {BLT_SWITCH_STRING, "-separator", "char",
-	Blt_Offset(ExportSwitches, sep),     0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_TableImportProc ImportCsvProc;
-static Blt_TableExportProc ExportCsvProc;
-
-static void
-StartCsvRecord(ExportSwitches *exportPtr)
-{
-    if (exportPtr->channel != NULL) {
-	Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-	exportPtr->length = 0;
-    }
-    exportPtr->count = 0;
-}
-
-static int
-EndCsvRecord(ExportSwitches *exportPtr)
-{
-    int nWritten;
-    char *line;
-
-    Tcl_DStringAppend(exportPtr->dsPtr, "\n", 1);
-    exportPtr->length++;
-    line = Tcl_DStringValue(exportPtr->dsPtr);
-    if (exportPtr->channel != NULL) {
-	nWritten = Tcl_Write(exportPtr->channel, line, exportPtr->length);
-	if (nWritten != exportPtr->length) {
-	    Tcl_AppendResult(exportPtr->interp, "can't write csv record: ",
-			     Tcl_PosixError(exportPtr->interp), (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static void
-AppendCsvRecord(ExportSwitches *exportPtr, const char *field, int length, 
-		Blt_TableColumnType type)
-{
-    const char *fp;
-    char *p;
-    int extra, doQuote;
-
-    doQuote = (type == TABLE_COLUMN_TYPE_STRING);
-    extra = 0;
-    if (field == NULL) {
-	length = 0;
-    } else {
-	for (fp = field; *fp != '\0'; fp++) {
-	    if ((*fp == '\n') || (*fp == exportPtr->sep[0]) || 
-		(*fp == ' ') || (*fp == '\t')) {
-		doQuote = TRUE;
-	    } else if (*fp == exportPtr->quote[0]) {
-		doQuote = TRUE;
-		extra++;
-	    }
-	}
-	if (doQuote) {
-	    extra += 2;
-	}
-	if (length < 0) {
-	    length = fp - field;
-	}
-    }
-    if (exportPtr->count > 0) {
-	Tcl_DStringAppend(exportPtr->dsPtr, exportPtr->sep, 1);
-	exportPtr->length++;
-    }
-    length = length + extra + exportPtr->length;
-    Tcl_DStringSetLength(exportPtr->dsPtr, length);
-    p = Tcl_DStringValue(exportPtr->dsPtr) + exportPtr->length;
-    exportPtr->length = length;
-    if (field != NULL) {
-	if (doQuote) {
-	    *p++ = exportPtr->quote[0];
-	}
-	for (fp = field; *fp != '\0'; fp++) {
-	    if (*fp == exportPtr->quote[0]) {
-		*p++ = exportPtr->quote[0];
-	    }
-	    *p++ = *fp;
-	}
-	if (doQuote) {
-	    *p++ = exportPtr->quote[0];
-	}
-    }
-    exportPtr->count++;
-}
-
-static int
-ExportCsvRows(Blt_Table table, ExportSwitches *exportPtr)
-{
-    Blt_TableRow row;
-
-    for (row = Blt_Table_FirstTaggedRow(&exportPtr->rIter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&exportPtr->rIter)) {
-	Blt_TableColumn col;
-	const char *field;
-	    
-	StartCsvRecord(exportPtr);
-	field = Blt_Table_RowLabel(row);
-	AppendCsvRecord(exportPtr, field, -1, TABLE_COLUMN_TYPE_STRING);
-	for (col = Blt_Table_FirstTaggedColumn(&exportPtr->cIter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&exportPtr->cIter)) {
-	    const char *string;
-	    Blt_TableColumnType type;
-		
-	    type = Blt_Table_ColumnType(col);
-	    string = Blt_Table_GetString(table, row, col);
-	    AppendCsvRecord(exportPtr, string, -1, type);
-	}
-	if (EndCsvRecord(exportPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-ExportCsvColumns(ExportSwitches *exportPtr)
-{
-    Blt_TableColumn col;
-
-    StartCsvRecord(exportPtr);
-    AppendCsvRecord(exportPtr, "*BLT*", 5, TABLE_COLUMN_TYPE_STRING);
-    for (col = Blt_Table_FirstTaggedColumn(&exportPtr->cIter); col != NULL; 
-	 col = Blt_Table_NextTaggedColumn(&exportPtr->cIter)) {
-	AppendCsvRecord(exportPtr, Blt_Table_ColumnLabel(col), -1, 
-		TABLE_COLUMN_TYPE_STRING);
-    }
-    return EndCsvRecord(exportPtr);
-}
-
-/* 
- * $table exportfile fileName ?switches...?
- * $table exportdata ?switches...?
- */
-static int
-ExportCsvProc(Blt_Table table, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    ExportSwitches switches;
-    Tcl_Channel channel;
-    Tcl_DString ds;
-    int closeChannel;
-    int result;
-
-    closeChannel = FALSE;
-    channel = NULL;
-
-    Tcl_DStringInit(&ds);
-    memset(&switches, 0, sizeof(switches));
-    switches.sep = Blt_AssertStrdup(",");
-    switches.quote = Blt_AssertStrdup("\"");
-    rowIterSwitch.clientData = table;
-    columnIterSwitch.clientData = table;
-    Blt_Table_IterateAllRows(table, &switches.rIter);
-    Blt_Table_IterateAllColumns(table, &switches.cIter);
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if (switches.fileObjPtr != NULL) {
-	const char *fileName;
-
-	closeChannel = TRUE;
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	    int mode;
-	    
-	    channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	    if ((mode & TCL_WRITABLE) == 0) {
-		Tcl_AppendResult(interp, "channel \"", fileName, 
-				 "\" not opened for writing", (char *)NULL);
-		goto error;
-	    }
-	    closeChannel = FALSE;
-	} else {
-	    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	    if (channel == NULL) {
-		goto error;	/* Can't open export file. */
-	    }
-	}
-    }
-    switches.interp = interp;
-    switches.dsPtr = &ds;
-    switches.channel = channel;
-    result = ExportCsvColumns(&switches); 
-    if (result == TCL_OK) {
-	result = ExportCsvRows(table, &switches);
-    }
-    if ((switches.channel == NULL) && (result == TCL_OK)) {
-	Tcl_DStringResult(interp, &ds);
-    } 
- error:
-    Tcl_DStringFree(&ds);
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    return result;
-}
-
-static int
-ImportGetBuffer(Tcl_Interp *interp, ImportSwitches *importPtr, char **bufferPtr,
-		int *nBytesPtr)
-{
-    if (importPtr->channel != NULL) {
-	int nBytes;
-
-	if (Tcl_Eof(importPtr->channel)) {
-	    *nBytesPtr = -1;
-	    return TCL_OK;
-	}
-#define BUFFSIZE	8191
-	nBytes = Tcl_Read(importPtr->channel, importPtr->buffer, 
-		sizeof(char) * BUFFSIZE);
-	*nBytesPtr = nBytes;
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "error reading file: ", 
-			     Tcl_PosixError(interp), (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	*nBytesPtr =  importPtr->nBytes;
-	importPtr->nBytes = -1;
-    }
-    *bufferPtr = importPtr->buffer;
-    return TCL_OK;
-}
-
-static int
-ImportCsv(Tcl_Interp *interp, Blt_Table table, ImportSwitches *importPtr)
-{
-    Tcl_DString dString;
-    char *fp, *field;
-    int fieldSize;
-    int inQuotes, isQuoted, isPath;
-    int result;
-    size_t i;
-    Blt_TableRow row;
-    Blt_TableColumn col;
-    const char sep = importPtr->sep[0];
-    const char quote = importPtr->quote[0];
-
-    result = TCL_ERROR;
-    isPath = isQuoted = inQuotes = FALSE;
-    row = NULL;
-    i = 1;
-    Tcl_DStringInit(&dString);
-    fieldSize = 128;
-    Tcl_DStringSetLength(&dString, fieldSize + 1);
-    fp = field = Tcl_DStringValue(&dString);
-    for (;;) {
-	char *bp, *bend;
-	int nBytes;
-
-	result = ImportGetBuffer(interp, importPtr, &bp, &nBytes);
-	if (result != TCL_OK) {
-	    goto error;			/* I/O Error. */
-	}
-	if (nBytes < 0) {
-	    break;			/* EOF */
-	}
-	for (bend = bp + nBytes; bp < bend; bp++) {
-	    if ((*bp == ' ') || ((*bp == '\t') && (sep != '\t'))) {
-		/* 
-		 * Add whitespace only if it's not leading or we're inside of
-		 * quotes or a path.
-		 */
-		if ((fp != field) || (inQuotes) || (isPath)) {
-		    *fp++ = *bp; 
-		}
-#ifdef notdef
-	    } else if ((*bp == '#') && (fp == field) && (i == 1)) {
-		/* Skip comment lines. */
-		for (/*empty*/; (*bp != '\n') && (bp < bend); bp++) {
-		    /* empty */;
-		}
-#endif
-	    } else if (*bp == '\\') {
-		/* 
-		 * Handle special case CSV files that allow unquoted paths.
-		 * Example:  ...,\this\path " should\have been\quoted\,...
-		 */
-		if (fp == field) {
-		    isPath = TRUE; 
-		}
-		*fp++ = *bp;
-	    } else if (*bp == quote) {
-		if (inQuotes) {
-		    if (*(bp+1) == quote) {
-			*fp++ = quote;
-			bp++;
-		    } else {
-			inQuotes = FALSE;
-		    }
-		} else {
-		    /* 
-		     * If the quote doesn't start a field, then treat all
-		     * quotes in the field as ordinary characters.
-		     */
-		    if (fp == field) {
-			isQuoted = inQuotes = TRUE; 
-		    } else {
-			*fp++ = *bp;
-		    }
-		}
-	    } else if ((*bp == sep) || (*bp == '\n')) {
-		if (inQuotes) {
-		    *fp++ = *bp;	/* Copy the comma or newline. */
-		} else {
-		    Blt_TableColumn col;
-		    char *last;
-
-		    if ((isPath) && (*bp == sep) && (fp != field) && 
-			(*(fp - 1) != '\\')) {
-			*fp++ = *bp;	/* Copy the comma or newline. */
-			goto done;
-		    }    
-		    /* "last" points to the character after the last character
-		     * in the field. */
-		    last = fp;	
-
-		    /* Remove trailing spaces only if the field wasn't
-		     * quoted. */
-		    if ((!isQuoted) && (!isPath)) {
-			while ((last > field) && (isspace(*(last - 1)))) {
-			    last--;
-			}
-		    }
-		    if (row == NULL) {
-			if ((*bp == '\n') &&  (fp == field)) {
-			    goto done;	/* Ignore empty lines. */
-			}
-			if (Blt_Table_ExtendRows(interp, table, 1, &row) 
-			    != TCL_OK) {
-			    goto error;
-			}
-			if ((importPtr->maxRows > 0) && 
-			    (Blt_Table_NumRows(table) > importPtr->maxRows)) {
-			    bp = bend;
-			    goto done;
-			}
-		    }
-		    /* End of field. Append field to row. */
-		    col = Blt_Table_FindColumnByIndex(table, i);
-		    if (col == NULL) {
-			if (Blt_Table_ExtendColumns(interp, table, 1, &col) 
-			    != TCL_OK) {
-			    goto error;
-			}
-		    }			
-		    if ((last > field) || (isQuoted)) {
-			if (Blt_Table_SetString(table, row, col, field, 
-				last - field) != TCL_OK) {
-			    goto error;
-			}
-		    }
-		    i++;
-		    if (*bp == '\n') {
-			row = NULL;
-			i = 1;
-		    }
-		    fp = field;
-		    isPath = isQuoted = FALSE;
-		}
-	    done:
-		;
-	    } else {
-		*fp++ = *bp;	/* Copy the character. */
-	    }
-	    if ((fp - field) >= fieldSize) {
-		int offset;
-
-		/* 
-		 * We've exceeded the current maximum size of the field.
-		 * Double the size of the field, but make sure to reset the
-		 * pointers to the (possibly) new memory location.
-		 */
-		offset = fp - field;
-		fieldSize += fieldSize;
-		Tcl_DStringSetLength(&dString, fieldSize + 1);
-		field = Tcl_DStringValue(&dString);
-		fp = field + offset;
-	    }
-	}
-	if (nBytes < 1) {
-	    /* 
-	     * We're reached the end of input. But there may not have been a
-	     * final newline to trigger the final append. So check if a last
-	     * field is still needs appending the the last row.
-	     */
-	    if (fp != field) {
-		char *last;
-
-		last = fp;
-		/* Remove trailing spaces */
-		while (isspace(*(last - 1))) {
-		    last--;
-		}
-		if (row == NULL) {
-		    if (Blt_Table_ExtendRows(interp, table, 1, &row) 
-			!= TCL_OK) {
-			goto error;
-		    }
-		}
-		col = Blt_Table_FindColumnByIndex(table, i);
-		if (col == NULL) {
-		    if (Blt_Table_ExtendColumns(interp, table, 1, &col) 
-			!= TCL_OK) {
-			goto error;
-		    }
-		}			
-		if ((last > field) || (isQuoted)) {
-		    if (Blt_Table_SetString(table, row, col, field, 
-			last - field) != TCL_OK) {
-			goto error;
-		    }
-		}		
-	    }    
-	    break;
-	}
-    }
-    result = TCL_OK;
- error:
-    Tcl_DStringFree(&dString);
-    return result;
-}
-
-static int
-ImportCsvProc(Blt_Table table, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int result;
-    ImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.sep = Blt_AssertStrdup(",");
-    switches.quote = Blt_AssertStrdup("\"");
-    Blt_InitHashTable(&switches.dataTable, BLT_STRING_KEYS);
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3 , objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "can't set both -file and -data switches.",
-			 (char *)NULL);
-	goto error;
-    }
-    if (switches.dataObjPtr != NULL) {
-	int nBytes;
-
-	switches.channel = NULL;
-	switches.buffer = Tcl_GetStringFromObj(switches.dataObjPtr, &nBytes);
-	switches.nBytes = nBytes;
-	switches.fileObjPtr = NULL;
-	result = ImportCsv(interp, table, &switches);
-    } else {
-	int closeChannel;
-	Tcl_Channel channel;
-	const char *fileName;
-	char buffer[BUFFSIZE+1];
-
-	closeChannel = TRUE;
-	if (switches.fileObjPtr == NULL) {
-	    fileName = "out.csv";
-	} else {
-	    fileName = Tcl_GetString(switches.fileObjPtr);
-	}
-	if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	    int mode;
-	    
-	    channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	    if ((mode & TCL_READABLE) == 0) {
-		Tcl_AppendResult(interp, "channel \"", fileName, 
-				 "\" not opened for reading", (char *)NULL);
-		goto error;
-	    }
-	    closeChannel = FALSE;
-	} else {
-	    channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	}
-	switches.channel = channel;
-	switches.buffer = buffer;
-	result = ImportCsv(interp, table, &switches);
-	if (closeChannel) {
-	    Tcl_Close(interp, channel);
-	}
-    }
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DeleteHashTable(&switches.dataTable);
-    return result;
-}
-    
-int 
-Blt_Table_CsvInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_datatable_csv", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_Table_RegisterFormat(interp,
-        "csv",			/* Name of format. */
-	ImportCsvProc,		/* Import procedure. */
-	ExportCsvProc);		/* Export procedure. */
-
-}
-#endif /* NO_DATATABLE */
-
diff --git a/blt3.0/src/bltDtMysql.c b/blt3.0/src/bltDtMysql.c
deleted file mode 100644
index 64eff97..0000000
--- a/blt3.0/src/bltDtMysql.c
+++ /dev/null
@@ -1,445 +0,0 @@
-
-/*
- *
- * bltDtMysql.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#ifndef NO_DATATABLE
-
-#include "config.h"
-#ifdef HAVE_LIBMYSQL
-#include <tcl.h>
-#include <bltDataTable.h>
-#include <bltAlloc.h>
-#include <bltSwitch.h>
-#include <mysql/mysql.h>
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-DLLEXPORT extern Tcl_AppInitProc Blt_Table_MysqlInit;
-
-/*
- * Format	Import		Export
- * csv		file/data	file/data
- * tree		data		data
- * vector	data		data
- * xml		file/data	file/data
- * mysql	data		data
- *
- * $table import csv -file fileName -data dataString 
- * $table export csv -file defaultFileName 
- * $table import tree $treeName $node ?switches? 
- * $table export tree $treeName $node "label" "label" "label"
- * $table import vector $vecName label $vecName label...
- * $table export vector label $vecName label $vecName...
- * $table import xml -file fileName -data dataString ?switches?
- * $table export xml -file fileName -data dataString ?switches?
- * $table import mysql -host $host -password $pw -db $db -port $port 
- */
-/*
- * ImportSwitches --
- */
-typedef struct {
-    char *host;			/* If non-NULL, name of remote host of
-				 * MySql server.  Otherwise "localhost"
-				 * is used. */
-    char *user;			/* If non-NULL, name of user account
-				 * to access MySql server.  Otherwise
-				 * the current username is used. */
-    char *pw;			/* If non-NULL, is password to use to
-				 * access MySql server. */
-    char *db;			/* If non-NULL, name of MySql database
-				 * to access. */
-    Tcl_Obj *query;		/* If non-NULL, query to make. */
-    int port;			/* Port number to use. */
-
-    /* Private data. */
-    Tcl_Interp *interp;
-    unsigned int flags;
-    char *buffer;		/* Buffer to read data into. */
-    int nBytes;			/* # of bytes in the buffer. */
-} ImportSwitches;
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_STRING, "-db",       "dbName",
-	Blt_Offset(ImportSwitches, db), 0, 0},
-    {BLT_SWITCH_STRING, "-host",     "hostName",
-	Blt_Offset(ImportSwitches, host), 0, 0},
-    {BLT_SWITCH_STRING, "-user",     "userName",
-	Blt_Offset(ImportSwitches, user), 0, 0},
-    {BLT_SWITCH_STRING, "-password", "password",
-	Blt_Offset(ImportSwitches, pw), 0, 0},
-    {BLT_SWITCH_INT_NNEG, "-port",     "number",
-	Blt_Offset(ImportSwitches, port), 0, 0},
-    {BLT_SWITCH_OBJ,    "-query",    "string",
-	Blt_Offset(ImportSwitches, query), 0, 0},
-    {BLT_SWITCH_END}
-};
-
-#ifdef EXPORT_MYSQL
-/*
- * ExportSwitches --
- */
-typedef struct {
-    Blt_Chain rowChain;
-    Blt_Chain colChain;
-    Tcl_Obj *rows, *cols;	/* Selected rows and columns to export. */
-    unsigned int flags;
-    Tcl_Obj *fileObj;
-    Tcl_Channel channel;	/* If non-NULL, channel to write output to. */
-    Tcl_DString *dsPtr;
-    int length;			/* Length of dynamic string. */
-    int count;			/* Number of fields in current record. */
-    Tcl_Interp *interp;
-    char *quote;		/* Quoted string delimiter. */
-    char *sep;			/* Separator character. */
-} ExportSwitches;
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-columns", "columns",
-	Blt_Offset(ExportSwitches, cols), 0, 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(ExportSwitches, fileObj), 0, 0},
-    {BLT_SWITCH_STRING, "-quote", "char",
-	Blt_Offset(ExportSwitches, quote), 0, 0},
-    {BLT_SWITCH_OBJ, "-rows", "rows",
-	Blt_Offset(ExportSwitches, rows), 0, 0},
-    {BLT_SWITCH_STRING, "-separator", "char",
-	Blt_Offset(ExportSwitches, sep), 0, 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_TableExportProc ExportMysqlProc;
-#endif
-
-#define DEF_CLIENT_FLAGS (CLIENT_MULTI_STATEMENTS|CLIENT_MULTI_RESULTS)
-
-static Blt_TableImportProc ImportMysqlProc;
-
-static Blt_TableColumnType
-MySqlFieldToColumnType(int type) 
-{
-    switch (type) {
-    case FIELD_TYPE_LONG:
-    case FIELD_TYPE_LONGLONG:
-	return TABLE_COLUMN_TYPE_LONG;
-    case FIELD_TYPE_DECIMAL:
-    case FIELD_TYPE_TINY:
-    case FIELD_TYPE_SHORT:
-    case FIELD_TYPE_INT24:
-	return TABLE_COLUMN_TYPE_INT;
-    case FIELD_TYPE_FLOAT:
-    case FIELD_TYPE_DOUBLE:
-	return TABLE_COLUMN_TYPE_DOUBLE;
-    case FIELD_TYPE_TINY_BLOB:
-    case FIELD_TYPE_MEDIUM_BLOB:
-    case FIELD_TYPE_LONG_BLOB:
-    case FIELD_TYPE_BLOB:
-	return TABLE_COLUMN_TYPE_UNKNOWN;
-    case FIELD_TYPE_NULL:
-    case FIELD_TYPE_TIMESTAMP:
-    case FIELD_TYPE_DATE:
-    case FIELD_TYPE_TIME:
-    case FIELD_TYPE_DATETIME:
-    case FIELD_TYPE_YEAR:
-    case FIELD_TYPE_NEWDATE:
-    case FIELD_TYPE_ENUM:
-    case FIELD_TYPE_SET:
-    case FIELD_TYPE_VAR_STRING:
-    case FIELD_TYPE_STRING:
-    default:
-	return TABLE_COLUMN_TYPE_STRING;
-    }
-}
-
-static int
-MySqlImportLabels(Tcl_Interp *interp, Blt_Table table, MYSQL_RES *myResults, 
-		  size_t nCols, Blt_TableColumn *cols) 
-{
-    size_t i;
-
-    for (i = 0; i < nCols; i++) {
-	MYSQL_FIELD *fp;
-	Blt_TableColumnType type;
-
-	fp = mysql_fetch_field(myResults);
-	if (Blt_Table_SetColumnLabel(interp, table, cols[i], fp->name) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	type = MySqlFieldToColumnType(fp->type);
-	if (Blt_Table_SetColumnType(table, cols[i], type) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-MySqlImportRows(Tcl_Interp *interp, Blt_Table table, MYSQL_RES *myResults, 
-		size_t nCols, Blt_TableColumn *cols) 
-{
-    size_t nRows;
-    size_t i;
-
-    nRows = mysql_num_rows(myResults);
-    if (nRows > Blt_Table_NumRows(table)) {
-	size_t needed;
-
-	/* Add the number of rows needed */
-	needed = nRows - Blt_Table_NumRows(table);
-	if (Blt_Table_ExtendRows(interp, table, needed, NULL) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    for (i = 1; /*empty*/; i++) {
-	Blt_TableRow row;
-	size_t j;
-	MYSQL_ROW myRow;
-	unsigned long *fieldLengths;
-
-	myRow = mysql_fetch_row(myResults);
-	if (myRow == NULL) {
-	    if (i < nRows) {
-		Tcl_AppendResult(interp, "didn't complete fetching all rows",
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    break;
-	}
-	fieldLengths = mysql_fetch_lengths(myResults);
-	row = Blt_Table_FindRowByIndex(table, i);
-	for (j = 0; j < nCols; j++) {
-	    int result;
-	    Tcl_Obj *objPtr;
-
-	    if (myRow[j] == NULL) {
-		continue;		/* Empty value. */
-	    }
-	    objPtr = Tcl_NewByteArrayObj((unsigned char *)myRow[j], 
-					 (int)fieldLengths[j]);
-	    Tcl_IncrRefCount(objPtr);
-	    result = Blt_Table_SetObj(table, row, cols[j], objPtr);
-	    Tcl_DecrRefCount(objPtr);
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-static void
-MySqlDisconnect(MYSQL *cp) 
-{
-    mysql_close(cp);
-}
-
-static int
-MySqlQueryFromObj(Tcl_Interp *interp, MYSQL *cp, Tcl_Obj *objPtr) 
-{
-    int nBytes;
-    const char *query;
-    
-    query = Tcl_GetStringFromObj(objPtr, &nBytes);
-    if (mysql_real_query(cp, query, (unsigned long)nBytes) != 0) {
-	Tcl_AppendResult(interp, "error in query \"", query, "\": ", 
-			 mysql_error(cp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-MySqlFreeResults(MYSQL_RES *myResults)
-{
-    mysql_free_result (myResults);
-}
-
-static int
-MySqlResults(Tcl_Interp *interp, MYSQL *cp, MYSQL_RES **resultsPtr, 
-	     long *nFieldsPtr) 
-{
-    MYSQL_RES *results;
-
-    results = mysql_store_result(cp);
-    if (results != NULL) {
-	*nFieldsPtr = mysql_num_fields(results);
-    } else if (mysql_field_count(cp) == 0) {
-	*nFieldsPtr = 0;
-    } else {
-	Tcl_AppendResult(interp, "error collecting results: ", mysql_error(cp), 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    *resultsPtr = results;
-    return TCL_OK;
-}
-
-static int
-MySqlConnect(Tcl_Interp *interp, const char *host, const char *user, 
-	     const char *pw, const char *db, unsigned int port,
-	     unsigned long flags, MYSQL **cpPtr)			
-{
-    MYSQL  *cp;			/* Connection handler. */
-
-    cp = mysql_init(NULL); 
-    if (cp == NULL) {
-	Tcl_AppendResult(interp, "can't initialize mysql connection.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (host == NULL) {
-	host = "localhost";
-    }
-    cp->reconnect = 1;
-#if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 32200 /* 3.22 and up */
-    if (mysql_real_connect(cp, host, user, pw, db, port, NULL, flags) == NULL) {
-	Tcl_AppendResult(interp, "can't connect to mysql server on \"", host, 
-			"\": ", mysql_error(cp), (char *)NULL);
-	return TCL_ERROR;
-    }
-#else              /* pre-3.22 */
-    if (mysql_real_connect (cp, host, user, pw, port, NULL, flags) == NULL) {
-	Tcl_AppendResult(interp, "can't connect to mysql server on \"",
-			 host, "\": ", mysql_error(cp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (db != NULL) {
-	if (mysql_select_db(cp, db) != 0) {
-	    Tcl_AppendResult(interp, "can't select database \"", db, "\": ", 
-			     mysql_error(cp), (char *)NULL);
-            mysql_close(cp);
-	    cp = NULL;
-	    return TCL_ERROR;
-	}
-    }
-#endif
-    *cpPtr = cp;
-    return TCL_OK;
-}
-
-static int
-ImportMysqlProc(Blt_Table table, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    ImportSwitches switches;
-    MYSQL *cp;
-    MYSQL_RES *myResults;
-    long nCols;
-    Blt_TableColumn *cols;
-
-    myResults = NULL;
-    cp = NULL;
-    cols = NULL;
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-		&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (MySqlConnect(interp, switches.host, switches.user, switches.pw,
-	switches.db, switches.port, DEF_CLIENT_FLAGS, &cp) != TCL_OK) {
-	goto error;
-    }
-    if (switches.query == NULL) {
-	goto done;
-    }
-    if (MySqlQueryFromObj(interp, cp, switches.query) != TCL_OK) {
-	goto error;
-    }
-    if (MySqlResults(interp, cp, &myResults, &nCols) != TCL_OK) {
-	goto error;
-    }
-    /* Step 1. Create columns to hold the new values.  Label
-     *	       the columns using the title. */
-    cols = Blt_AssertMalloc(nCols * sizeof(Blt_TableColumn));
-    if (Blt_Table_ExtendColumns(interp, table, nCols, cols) != TCL_OK) {
-	goto error;
-    }
-    if (MySqlImportLabels(interp, table, myResults, nCols, cols) != TCL_OK) {
-	goto error;
-    }
-    if (MySqlImportRows(interp, table, myResults, nCols, cols) != TCL_OK) {
-	goto error;
-    }
-    Blt_Free(cols);
-    MySqlFreeResults(myResults);
- done:
-    MySqlDisconnect(cp);
-    Blt_FreeSwitches(importSwitches, &switches, 0);
-    return TCL_OK;
- error:
-    if (myResults != NULL) {
-	MySqlFreeResults(myResults);
-    }
-    if (cols != NULL) {
-	Blt_Free(cols);
-    }
-    if (cp != NULL) {
-	MySqlDisconnect(cp);
-    }
-    Blt_FreeSwitches(importSwitches, &switches, 0);
-    return TCL_ERROR;
-}
-
-#ifdef EXPORT_MYSQL
-static int
-ExportMysqlProc(Blt_Table table, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    return TCL_OK;
-}
-#endif
-
-int 
-Blt_Table_MysqlInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_datatable_mysql", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_Table_RegisterFormat(interp,
-        "mysql",		/* Name of format. */
-	ImportMysqlProc,	/* Import procedure. */
-	NULL);			/* Export procedure. */
-
-}
-#endif /* HAVE_LIBMYSQL */
-#endif /* NO_DATATABLE */
-
diff --git a/blt3.0/src/bltDtTree.c b/blt3.0/src/bltDtTree.c
deleted file mode 100644
index f4f0e37..0000000
--- a/blt3.0/src/bltDtTree.c
+++ /dev/null
@@ -1,315 +0,0 @@
-
-/*
- *
- * bltDtTree.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#include "config.h"
-#ifndef NO_DATATABLE
-
-#include <tcl.h>
-#include <bltDataTable.h>
-#include <bltTree.h>
-#include <bltSwitch.h>
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-/*
- * Format	Import		Export
- * csv		file/data	file/data
- * tree		data		data
- * vector	data		data
- * xml		file/data	file/data
- * sql		data		data
- *
- * $table import csv -file fileName -data dataString 
- * $table export csv -file defaultFileName 
- * $table import tree $treeName $node ?switches? 
- * $table export tree $treeName $node "label" "label" "label"
- * $table import vector $vecName label $vecName label...
- * $table export vector label $vecName label $vecName...
- * $table import xml -file fileName -data dataString ?switches?
- * $table export xml -file fileName -data dataString ?switches?
- * $table import sql -host $host -password $pw -db $db -port $port 
- */
-
-/*
- * ExportSwitches --
- */
-typedef struct {
-    /* Private data. */
-    Blt_TreeNode node;
-
-    /* Public fields */
-    Blt_TableIterator rIter, cIter;
-    Blt_TableIterator hIter;
-    Tcl_Obj *nodeObjPtr;
-} ExportSwitches;
-
-BLT_EXTERN Blt_SwitchFreeProc Blt_Table_ColumnIterFreeProc;
-BLT_EXTERN Blt_SwitchFreeProc Blt_Table_RowIterFreeProc;
-BLT_EXTERN Blt_SwitchParseProc Blt_Table_ColumnIterSwitchProc;
-BLT_EXTERN Blt_SwitchParseProc Blt_Table_RowIterSwitchProc;
-
-static Blt_SwitchCustom columnIterSwitch = {
-    Blt_Table_ColumnIterSwitchProc, Blt_Table_ColumnIterFreeProc, 0,
-};
-static Blt_SwitchCustom rowIterSwitch = {
-    Blt_Table_RowIterSwitchProc, Blt_Table_RowIterFreeProc, 0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-columns", "columns",
-	Blt_Offset(ExportSwitches, cIter), 0, 0, &columnIterSwitch},
-    {BLT_SWITCH_CUSTOM, "-hierarchy", "columns",
-	Blt_Offset(ExportSwitches, hIter), 0, 0, &columnIterSwitch},
-    {BLT_SWITCH_OBJ, "-node", "node",
-	Blt_Offset(ExportSwitches, nodeObjPtr), 0},
-    {BLT_SWITCH_CUSTOM, "-rows", "rows",
-        Blt_Offset(ExportSwitches, rIter), 0, 0, &rowIterSwitch},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_Table_TreeInit;
-
-static Blt_TableImportProc ImportTreeProc;
-static Blt_TableExportProc ExportTreeProc;
-
-static int
-ImportTree(Tcl_Interp *interp, Blt_Table table, Blt_Tree tree, 
-	   Blt_TreeNode top)
-{
-    Blt_TreeNode node;
-    int maxDepth, topDepth;
-    long iRow, nCols;
-
-    /* 
-     * Fill in the table data in 2 passes.  We need to know the
-     * maximum depth of the leaf nodes, to generate columns for each
-     * level of the hierarchy.  We have to do this before adding
-     * node data values.
-     */
-
-    /* Pass 1.  Create entries for all the nodes. Add entries for 
-     *          the node and it's ancestor's labels. */
-    maxDepth = topDepth = Blt_Tree_NodeDepth(top);
-    nCols = Blt_Table_NumColumns(table);
-    for (node = Blt_Tree_NextNode(top, top); node != NULL;
-	 node = Blt_Tree_NextNode(top, node)) {
-	Blt_TreeNode parent;
-	int depth;
-	Blt_TableRow row;
-	size_t iCol;
-
-	depth = Blt_Tree_NodeDepth(node);
-	if (depth > maxDepth) {
-	    Blt_TableColumn col;
-
-	    if (Blt_Table_ExtendColumns(interp, table, 1, &col) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    iCol = Blt_Table_ColumnIndex(col);
-	    maxDepth = depth;
-	} else {
-	    iCol = depth - topDepth;
-	}
-	if (Blt_Table_ExtendRows(interp, table, 1, &row) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (parent = node; parent != top; 
-	     parent = Blt_Tree_ParentNode(parent)){
-	    const char *label;
-	    Blt_TableColumn col;
-
-	    col = Blt_Table_FindColumnByIndex(table, iCol);
-	    label = Blt_Tree_NodeLabel(parent);
-	    if (Blt_Table_SetString(table, row, col, label, -1)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    iCol--;
-	}
-    }
-    /* Pass 2.  Fill in entries for all the data fields found. */
-    for (iRow = 1, node = Blt_Tree_NextNode(top, top); node != NULL;
-	 node = Blt_Tree_NextNode(top, node), iRow++) {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-	Blt_TableRow row;
-
-	row = Blt_Table_FindRowByIndex(table, iRow);
-	for (key = Blt_Tree_FirstKey(tree, node, &iter); key != NULL;
-	     key = Blt_Tree_NextKey(tree, &iter)) {
-	    Blt_TableColumn col;
-	    Tcl_Obj *objPtr;
-
-	    if (Blt_Tree_GetValue(interp, tree, node, key, &objPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    col = Blt_Table_FindColumnByLabel(table, key);
-	    if (col == NULL) {
-		col = Blt_Table_CreateColumn(interp, table, key);
-		if (col == NULL) {
-		    return TCL_ERROR;
-		}
-	    }
-	    if (Blt_Table_SetObj(table, row, col, objPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-ImportTreeProc(Blt_Table table, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Blt_Tree tree;
-    Blt_TreeNode node;
-
-    /* FIXME: 
-     *	 2. Export *GetNode tag parsing routines from bltTreeCmd.c,
-     *	    instead of using node id to select the top node.
-     */
-    tree = Blt_Tree_Open(interp, Tcl_GetString(objv[3]), 0);
-    if (tree == NULL) {
-	return TCL_ERROR;
-    }
-    if (objc == 5) {
-	long inode;
-
-	if (Tcl_GetLongFromObj(interp, objv[4], &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(tree, inode);
-	if (node == NULL) {
-	    return TCL_ERROR;
-	}
-    } else {
-	node = Blt_Tree_RootNode(tree);
-    }
-    return ImportTree(interp, table, tree, node);
-}
-
-static int
-ExportTree(Tcl_Interp *interp, Blt_Table table, Blt_Tree tree, 
-	   Blt_TreeNode parent, ExportSwitches *switchesPtr) 
-{
-    Blt_TableRow row;
-
-    for (row = Blt_Table_FirstTaggedRow(&switchesPtr->rIter); row != NULL;
-	 row = Blt_Table_NextTaggedRow(&switchesPtr->rIter)) {
-	Blt_TableColumn col;
-	Blt_TreeNode node;
-	const char *label;
-
-	label = Blt_Table_RowLabel(row);
-	node = Blt_Tree_CreateNode(tree, parent, label, -1);
-	for (col = Blt_Table_FirstTaggedColumn(&switchesPtr->cIter); col != NULL;
-	     col = Blt_Table_NextTaggedColumn(&switchesPtr->cIter)) {
-	    Tcl_Obj *objPtr;
-	    const char *key;
-
-	    objPtr = Blt_Table_GetObj(table, row, col);
-	    key = Blt_Table_ColumnLabel(col);
-	    if (Blt_Tree_SetValue(interp, tree, node, key, objPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }		
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-ExportTreeProc(Blt_Table table, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Blt_Tree tree;
-    Blt_TreeNode node;
-    ExportSwitches switches;
-    int result;
-
-    if (objc < 4) {
-	Tcl_AppendResult(interp, "wrong # arguments: should be \"", 
-		Tcl_GetString(objv[0]), " export tree treeName ?switches?\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    tree = Blt_Tree_Open(interp, Tcl_GetString(objv[3]), 0);
-    if (tree == NULL) {
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    rowIterSwitch.clientData = table;
-    columnIterSwitch.clientData = table;
-    Blt_Table_IterateAllRows(table, &switches.rIter);
-    Blt_Table_IterateAllColumns(table, &switches.cIter);
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 4, objv + 4, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.nodeObjPtr != NULL) {
-	long inode;
-
-	if (Tcl_GetLongFromObj(interp, switches.nodeObjPtr, &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(tree, inode);
-	if (node == NULL) {
-	    return TCL_ERROR;
-	}
-    } else {
-	node = Blt_Tree_RootNode(tree);
-    }
-    result = ExportTree(interp, table, tree, node, &switches);
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    return result;
-}
-
-int 
-Blt_Table_TreeInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_datatable_tree", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_Table_RegisterFormat(interp,
-        "tree",			/* Name of format. */
-	ImportTreeProc,		/* Import procedure. */
-	ExportTreeProc);	/* Export procedure. */
-
-}
-#endif /* NO_DATATABLE */
-
diff --git a/blt3.0/src/bltDtVec.c b/blt3.0/src/bltDtVec.c
deleted file mode 100644
index 4add0c6..0000000
--- a/blt3.0/src/bltDtVec.c
+++ /dev/null
@@ -1,242 +0,0 @@
-
-/*
- *
- * bltDtVec.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#include "config.h"
-#include <assert.h>
-#include <tcl.h>
-#include <bltSwitch.h>
-#include <bltDataTable.h>
-#include <bltVector.h>
-
-extern double Blt_NaN(void);
-
-DLLEXPORT extern Tcl_AppInitProc Blt_Table_VectorInit;
-
-/*
- * Format	Import		Export
- * csv		file/data	file/data
- * tree		data		data
- * vector	data		data
- * xml		file/data	file/data
- * sql		data		data
- *
- * $table import csv -file fileName -data dataString 
- * $table export csv -file defaultFileName 
- * $table import tree $treeName $node ?switches? 
- * $table export tree $treeName $node "label" "label" "label"
- * $table import vector $vecName label $vecName label...
- * $table export vector label $vecName label $vecName...
- * $table import xml -file fileName -data dataString ?switches?
- * $table export xml -file fileName -data dataString ?switches?
- * $table import sql -host $host -password $pw -db $db -port $port 
- */
-
-static Blt_TableImportProc ImportVecProc;
-static Blt_TableExportProc ExportVecProc;
-
-/* 
- * $table export vector -file fileName ?switches...?
- * $table export vector ?switches...?
- */
-static int
-ExportVecProc(Blt_Table table, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    long nRows;
-    
-    if ((objc - 3) & 1) {
-	Tcl_AppendResult(interp, "odd # of column/vector pairs: should be \"", 
-		Tcl_GetString(objv[0]), 
-		" export vector col vecName ?col vecName?...", (char *)NULL);
-	return TCL_ERROR;
-    }
-    nRows = Blt_Table_NumRows(table);
-    for (i = 3; i < objc; i += 2) {
-	Blt_Vector *vector;
-	size_t size;
-	double *array;
-	int k;
-	Blt_TableColumn col;
-
-	col = Blt_Table_FindColumn(interp, table, objv[i]);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Blt_GetVectorFromObj(interp, objv[i+1], &vector) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Blt_VecLength(vector) != nRows) {
-	    if (Blt_ResizeVector(vector, nRows) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	array = Blt_VecData(vector);
-	size = Blt_VecSize(vector);
-	for (k = 1; k <= Blt_VecLength(vector); k++) {
-	    Blt_TableRow row;
-	    Tcl_Obj *objPtr;
-
-	    row = Blt_Table_FindRowByIndex(table, k);
-	    assert(row != NULL);
-	    objPtr = Blt_Table_GetObj(table, row, col);
-	    if (objPtr == NULL) {
-		array[k-1] = Blt_NaN();
-	    } else {
-		double value;
-
-		if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		array[k-1] = value;
-	    }
-	}
-	if (Blt_ResetVector(vector, array, nRows, size, TCL_STATIC) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImportVecProc --
- *
- *	Parses the given command line and calls one of several
- *	export-specific operations.
- *	
- * Results:
- *	Returns a standard TCL result.  It is the result of 
- *	operation called.
- *
- *	$table import vector v1 col v2 col v3 col
- *
- *---------------------------------------------------------------------------
- */
-static int
-ImportVecProc(Blt_Table table, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int maxLen;
-    int i;
-
-    if ((objc - 3) & 1) {
-	Tcl_AppendResult(interp, "odd # of vector/column pairs: should be \"", 
-		Tcl_GetString(objv[0]), 
-		" import vector vecName col vecName col...", (char *)NULL);
-	return TCL_ERROR;
-    }
-    maxLen = 0;
-    for (i = 3; i < objc; i += 2) {
-	Blt_TableColumn col;
-	Blt_Vector *vector;
-	
-	if (Blt_GetVectorFromObj(interp, objv[i], &vector) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	col = Blt_Table_FindColumn(NULL, table, objv[i+1]);
-	if (col == NULL) {
-	    const char *label;
-
-	    label = Tcl_GetString(objv[i+1]);
-	    col = Blt_Table_CreateColumn(interp, table, label);
-	    if (col == NULL) {
-		return TCL_ERROR;
-	    }
-	    Blt_Table_SetColumnType(table, col, TABLE_COLUMN_TYPE_DOUBLE);
-	}
-	if (Blt_VecLength(vector) > maxLen) {
-	    maxLen = Blt_VecLength(vector);
-	}
-    }
-    if (maxLen > Blt_Table_NumRows(table)) {
-	size_t needed;
-
-	needed = maxLen - Blt_Table_NumRows(table);
-	if (Blt_Table_ExtendRows(interp, table, needed, NULL) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    for (i = 3; i < objc; i += 2) {
-	Blt_TableColumn col;
-	Blt_Vector *vector;
-	double *array;
-	size_t j, k;
-	size_t nElems;
-
-	if (Blt_GetVectorFromObj(interp, objv[i], &vector) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	col = Blt_Table_FindColumn(interp, table, objv[i+1]);
-	if (col == NULL) {
-	    return TCL_ERROR;
-	}
-	array = Blt_VecData(vector);
-	nElems = Blt_VecLength(vector);
-	for (j = 0, k = 1; j < nElems; j++, k++) {
-	    Blt_TableRow row;
-
-	    row = Blt_Table_FindRowByIndex(table, k);
-	    if (array[j] == Blt_NaN()) {
-		if (Blt_Table_UnsetValue(table, row, col) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    } else {
-		if (Blt_Table_SetObj(table, row, col, 
-			Tcl_NewDoubleObj(array[j])) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    return TCL_OK;
-}
-    
-int 
-Blt_Table_VectorInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_datatable_vector", BLT_VERSION) != TCL_OK){ 
-	return TCL_ERROR;
-    }
-    return Blt_Table_RegisterFormat(interp,
-        "vector",		/* Name of format. */
-	ImportVecProc,		/* Import procedure. */
-	ExportVecProc);		/* Export procedure. */
-}
-
diff --git a/blt3.0/src/bltDtXml.c b/blt3.0/src/bltDtXml.c
deleted file mode 100644
index e5f7b13..0000000
--- a/blt3.0/src/bltDtXml.c
+++ /dev/null
@@ -1,825 +0,0 @@
-
-/*
- *
- * bltDtXml.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#include "config.h"
-#define USE_NON_const	1
-#include <tcl.h>
-
-#include <bltSwitch.h>
-#include <bltDataTable.h>
-#include <bltTree.h>
-#include <bltList.h>
-#include <bltAlloc.h>
-#include <bltAssert.h>
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-DLLEXPORT extern Tcl_AppInitProc Blt_Table_XmlInit;
-
-extern const char *Blt_Itoa(int);
-
-#define TRUE 	1
-#define FALSE 	0
-
-static Blt_TableImportProc ImportXmlProc;
-static Blt_TableExportProc ExportXmlProc;
-
-/*
- * Format	Import		Export
- * csv		file/data	file/data
- * tree		data		data
- * vector	data		data
- * xml		file/data	file/data
- * sql		data		data
- *
- * $table import csv -file fileName -data dataString 
- * $table export csv -file defaultFileName 
- * $table import tree $treeName $node ?switches? 
- * $table export tree $treeName $node "label" "label" "label"
- * $table import vector $vecName label $vecName label...
- * $table export vector label $vecName label $vecName...
- * $table import xml -file fileName -data dataString ?switches?
- * $table export xml -file fileName -data dataString ?switches?
- * $table import sql -host $host -password $pw -db $db -port $port 
- */
-
-/*
- * ImportSwitches --
- */
-typedef struct {
-    Tcl_Obj *fileObj;	/* Name of file representing the channel. */
-    Tcl_Obj *dataObj;
-    Tcl_Interp *interp;
-    unsigned int flags;
-} ImportSwitches;
-
-#define IMPORT_ATTRIBUTES (1<<0)
-#define IMPORT_ELEMENTS	  (1<<1)
-#define IMPORT_CDATA	  (1<<2)
-#define IMPORT_MASK	  (IMPORT_ATTRIBUTES | IMPORT_CDATA | IMPORT_ELEMENTS)
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "string", 
-         Blt_Offset(ImportSwitches, dataObj), 0, 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(ImportSwitches, fileObj), 0, 0},
-    {BLT_SWITCH_BITMASK_INVERT,"-noattrs", "",
-	Blt_Offset(ImportSwitches, flags), 0, IMPORT_ATTRIBUTES},
-    {BLT_SWITCH_BITMASK_INVERT,"-noelems", "",
-	Blt_Offset(ImportSwitches, flags), 0, IMPORT_ELEMENTS},
-    {BLT_SWITCH_BITMASK_INVERT,"-nocdata", "",
-	Blt_Offset(ImportSwitches, flags), 0, IMPORT_CDATA},
-    {BLT_SWITCH_END}
-};
-
-/*
- * ExportSwitches --
- */
-typedef struct {
-    Blt_TableIterator rIter, cIter;
-    Tcl_Obj *fileObj;
-
-    /* Private fields. */
-    Tcl_Interp *interp;
-    unsigned int flags;
-    Tcl_Channel channel;	/* If non-NULL, channel to write output to. */
-    Tcl_DString *dsPtr;
-} ExportSwitches;
-
-extern Blt_SwitchFreeProc Blt_Table_ColumnIterFreeProc;
-extern Blt_SwitchFreeProc Blt_Table_RowIterFreeProc;
-extern Blt_SwitchParseProc Blt_Table_ColumnIterSwitchProc;
-extern Blt_SwitchParseProc Blt_Table_RowIterSwitchProc;
-
-static Blt_SwitchCustom columnIterSwitch = {
-    Blt_Table_ColumnIterSwitchProc, Blt_Table_ColumnIterFreeProc, 0,
-};
-static Blt_SwitchCustom rowIterSwitch = {
-    Blt_Table_RowIterSwitchProc, Blt_Table_RowIterFreeProc, 0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-columns", "columns",
-	Blt_Offset(ExportSwitches, cIter), 0, 0, &columnIterSwitch},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(ExportSwitches, fileObj), 0, 0},
-    {BLT_SWITCH_CUSTOM, "-rows", "rows",
-	Blt_Offset(ExportSwitches, rIter), 0, 0, &rowIterSwitch},
-    {BLT_SWITCH_END}
-};
-
-#ifdef HAVE_LIBEXPAT
-
-#include <expat.h>
-
-typedef struct {
-    Blt_TableRow row;
-    Blt_TableColumn col;
-    Blt_Table table;
-    Tcl_Interp *interp;
-    int flags;
-    Blt_HashTable attrTable;
-    Blt_HashTable elemTable;
-    Blt_HashTable stringTable;
-    Blt_List elemList;
-    Blt_ListNode node;
-} ImportData;
-
-static Tcl_Obj *
-GetStringObj(ImportData *importPtr, const char *string, size_t length)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    char *key;
-#define MAX_STATIC_STRING 1023
-    char store[MAX_STATIC_STRING+1];
-
-    if (length > MAX_STATIC_STRING) {
-	key = Blt_AssertMalloc(length + 1);
-    } else {
-	key = store;
-    }
-    memcpy(key, string, length);
-    key[length] = '\0';
-    hPtr = Blt_CreateHashEntry(&importPtr->stringTable, key, &isNew);
-    if (length > MAX_STATIC_STRING) {
-	Blt_Free(key);
-    }
-    if (isNew) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewStringObj(string, length);
-	Tcl_IncrRefCount(objPtr);
-	Blt_SetHashValue(hPtr, objPtr);
-	return objPtr;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static void
-DumpStringTable(Blt_HashTable *tablePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &cursor); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Blt_GetHashValue(hPtr);
-	Tcl_DecrRefCount(objPtr);
-    }
-    Blt_DeleteHashTable(tablePtr);
-}
-
-static void
-GetXmlCharacterData(void *userData, const XML_Char *string, int length) 
-{
-    ImportData *importPtr = userData;
-
-    assert(length >= 0);
-    if (importPtr->flags & IMPORT_CDATA) {
-	Tcl_Obj *objPtr;
-	Blt_ListNode node;
-
-	/* Replicate the data for each sub-element. */
-	objPtr = GetStringObj(importPtr, string, length);
-	assert(importPtr->node != NULL);
-	Blt_List_SetValue(importPtr->node, objPtr);
-	for (node = Blt_List_FirstNode(importPtr->elemList); node != NULL;
-	     node = Blt_List_NextNode(node)) {
-	    Blt_TableColumn col;
-
-	    objPtr = Blt_List_GetValue(node);
-	    col = (Blt_TableColumn)Blt_List_GetKey(node);
-	    if (Blt_Table_SetObj(importPtr->table, importPtr->row, col, 
-		objPtr) != TCL_OK) {
-		Tcl_BackgroundError(importPtr->interp);
-	    }
-	}
-    }
-}
-
-static void
-StartXmlTag(void *userData, const char *element, const char **attr) 
-{
-    Blt_Table table;
-    Blt_TableRow row;
-    ImportData *importPtr = userData;
-    Tcl_Interp *interp;
-
-    interp = importPtr->interp;
-    table = importPtr->table;
-    importPtr->node = NULL;
-    if (importPtr->flags & IMPORT_ELEMENTS) {
-	Blt_TableColumn col;
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	/* 
-	 * If this is the first time we're seeing this element, create a new
-	 * column labeled as the element.  This is different than the table's
-	 * set of labels, because the table may already have a label by the
-	 * same name.  We want to create a new column in this case.
-	 */
-	hPtr = Blt_CreateHashEntry(&importPtr->elemTable, element, &isNew);
-	if (isNew) {
-	    col = Blt_Table_CreateColumn(interp, table, element);
-	    if (col == NULL) {
-		goto error;
-	    }
-	    Blt_SetHashValue(hPtr, col);
-	} else {
-	    col = Blt_GetHashValue(hPtr);
-	}
-	importPtr->col = col;
-	importPtr->node = Blt_List_Append(importPtr->elemList, (char *)col,NULL);
-    }
-    if (Blt_Table_ExtendRows(interp, table, 1, &row) != TCL_OK) {
-	goto error;
-    }
-    importPtr->row = row;
-    if (importPtr->flags & IMPORT_ATTRIBUTES) {
-	const char **p;
-	
-	for (p = attr; *p != NULL; p += 2) {
-	    Blt_TableColumn col;
-	    Blt_HashEntry *hPtr;
-	    const char *name, *value;
-	    int isNew;
-
-	    name = *p, value = *(p+1);
-	    /* 
-	     * If this is the first time we're seeing this attribute, create a
-	     * new column labeled as the attribute.
-	     */
-	    hPtr = Blt_CreateHashEntry(&importPtr->attrTable, name, &isNew);
-	    if (isNew) {
-		col = Blt_Table_CreateColumn(interp, table, name);
-		if (col == NULL) {
-		    goto error;
-		}
-		Blt_SetHashValue(hPtr, col);
-	    } else {
-		col = Blt_GetHashValue(hPtr);
-	    }
-	    /* Set the attribute value as the cell value. */
-	    if (Blt_Table_SetString(table, row, col, value, -1)!=TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    return;
- error:
-    Tcl_BackgroundError(importPtr->interp);
-}
-
-static void
-EndXmlTag(void *userData, const char *element) 
-{
-    ImportData *importPtr = userData;
-
-    if (importPtr->node != NULL) {
-	Blt_ListNode prev;
-
-	/* Pop the tag from the stack. */
-	prev = Blt_List_PrevNode(importPtr->node);
-	Blt_List_DeleteNode(importPtr->node);
-	importPtr->node = prev;
-    }
-}
-
-static int
-ReadXmlFromFile(Tcl_Interp *interp, XML_Parser parser, const char *fileName)
-{
-    int closeChannel;
-    int done;
-    Tcl_Channel channel;
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return FALSE;
-	}
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for reading", (char *)NULL);
-	    return FALSE;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return FALSE;	/* Can't open dump file. */
-	}
-    }
-    done = FALSE;
-    while (!done) {
-	int length;
-#define BUFFSIZE	8192
-	char buffer[BUFFSIZE];
-	
-	length = Tcl_Read(channel, buffer, sizeof(char) * BUFFSIZE);
-	if (length < 0) {
-	    Tcl_AppendResult(interp, "\nread error: ", Tcl_PosixError(interp),
-			     (char *)NULL);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return FALSE;
-	}
-	done = Tcl_Eof(channel);
-	if (!XML_Parse(parser, buffer, length, done)) {
-	    Tcl_AppendResult(interp, "\n", fileName, ":",
-			Blt_Itoa(XML_GetCurrentLineNumber(parser)), ": ",
-			"error: ", 
-			XML_ErrorString(XML_GetErrorCode(parser)), 
-			(char *)NULL);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return FALSE;
-	}
-    }
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    return TRUE;
-}
-
-static int
-GetXmlExternalEntityRef(XML_Parser parser, const XML_Char *context,
-    const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
-{
-    ImportData *dataPtr;
-    Tcl_DString dString;
-    Tcl_Interp *interp;
-    XML_Parser newParser;
-    int result;
-
-    dataPtr = XML_GetUserData(parser);
-    assert(dataPtr != NULL);
-    interp = dataPtr->interp;
-    Tcl_DStringInit(&dString);
-    if ((base != NULL) && (Tcl_GetPathType(systemId) == TCL_PATH_RELATIVE)) {
-	const char **argv;
-	const char **baseArr, **sysIdArr;
-	int argc;
-	int i, j;
-	int nBase, nSysId;
-
-	Tcl_SplitPath(base, &nBase, &baseArr);
-	Tcl_SplitPath(systemId, &nSysId, &sysIdArr);
-	argc = nBase + nSysId;
-	argv = Blt_Malloc(sizeof(char *) * (argc + 1));
-	if (argv == NULL) {
-	    return FALSE;
-	}
-	for (i = 0; i < nBase; i++) {
-	    argv[i] = baseArr[i];
-	}
-	for (j = 0; j < nSysId; j++, i++) {
-	    argv[i] = sysIdArr[j];
-	}
-	argv[i] = NULL;
-	Tcl_JoinPath(argc, argv, &dString);
-	Blt_Free(baseArr);
-	Blt_Free(sysIdArr);
-	Blt_Free(argv);
-    } else {
-	Tcl_DStringAppend(&dString, systemId, -1);
-    }
-    newParser = XML_ExternalEntityParserCreate(parser, context, NULL);
-    if (newParser == NULL) {
-	Tcl_AppendResult(interp, "can't create external entity ref parser", 
-			 (char *)NULL);
-	return FALSE;
-    }
-    result = ReadXmlFromFile(interp, newParser, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    XML_ParserFree(newParser);
-    return result;
-}
-
-static int
-ImportXmlFile(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *fileObjPtr,
-	      unsigned int flags) 
-{
-    ImportData import;
-    XML_Parser parser;
-    int result;
-    char *fileName;
-
-    parser = XML_ParserCreate(NULL);
-    if (parser == NULL) {
-	Tcl_AppendResult(interp, "can't create XML parser", (char *)NULL);
-	return TCL_ERROR;
-    }
-    import.table = table;
-    import.row = NULL;
-    import.interp = interp;
-    import.flags = flags;
-    Blt_InitHashTable(&import.stringTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&import.attrTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&import.elemTable, BLT_STRING_KEYS);
-    import.elemList = Blt_List_Create(BLT_ONE_WORD_KEYS);
-
-    XML_SetUserData(parser, &import);
-
-    fileName = Tcl_GetString(fileObjPtr);
-    {
-	Tcl_DString dString;
-	int argc;
-	const char **argv;
-
-	Tcl_DStringInit(&dString);
-	Tcl_SplitPath(fileName, &argc, &argv);
-	Tcl_JoinPath(argc - 1, argv, &dString);
-	XML_SetBase(parser, Tcl_DStringValue(&dString));
-	Blt_Free(argv);
-	Tcl_DStringFree(&dString);
-    }
-    XML_SetElementHandler(parser, StartXmlTag, EndXmlTag);
-    XML_SetCharacterDataHandler(parser, GetXmlCharacterData);
-    XML_SetExternalEntityRefHandler(parser, GetXmlExternalEntityRef);
-    result = ReadXmlFromFile(interp, parser, fileName);
-    XML_ParserFree(parser);
-    Blt_DeleteHashTable(&import.attrTable);
-    Blt_DeleteHashTable(&import.elemTable);
-    DumpStringTable(&import.stringTable);
-    Blt_List_Destroy(import.elemList);
-    return (result) ? TCL_OK : TCL_ERROR;
-} 
-
-
-static int
-ImportXmlData(Tcl_Interp *interp, Blt_Table table, Tcl_Obj *dataObjPtr,
-	      unsigned int flags) 
-{
-    ImportData import;
-    XML_Parser parser;
-    char *string;
-    int length;
-    int result;
-
-    parser = XML_ParserCreate(NULL);
-    if (parser == NULL) {
-	Tcl_AppendResult(interp, "can't create parser", (char *)NULL);
-	return TCL_ERROR;
-    }
-    import.table = table;
-    import.row = NULL;
-    import.interp = interp;
-    import.flags = flags;
-    Blt_InitHashTable(&import.attrTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&import.elemTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&import.stringTable, BLT_STRING_KEYS);
-    import.elemList = Blt_List_Create(BLT_ONE_WORD_KEYS);
-
-    XML_SetUserData(parser, &import);
-    XML_SetElementHandler(parser, StartXmlTag, EndXmlTag);
-    XML_SetCharacterDataHandler(parser, GetXmlCharacterData);
-    string = Tcl_GetStringFromObj(dataObjPtr, &length);
-    result = XML_Parse(parser, string, length, 1);
-    if (!result) {
-	Tcl_AppendResult(interp, "\nparse error at line ",
-			 Blt_Itoa(XML_GetCurrentLineNumber(parser)), ":  ",
-			 XML_ErrorString(XML_GetErrorCode(parser)),
-			 (char *)NULL);
-    }
-    XML_ParserFree(parser);
-    Blt_DeleteHashTable(&import.attrTable);
-    Blt_DeleteHashTable(&import.elemTable);
-    DumpStringTable(&import.stringTable);
-    Blt_List_Destroy(import.elemList);
-    return (result) ? TCL_OK : TCL_ERROR;
-} 
-
-static int
-ImportXmlProc(Blt_Table table, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int result;
-    ImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.flags = IMPORT_MASK;
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if ((switches.dataObj != NULL) && (switches.fileObj != NULL)) {
-	Tcl_AppendResult(interp, "can't set both -file and -data switches.",
-			 (char *)NULL);
-	goto error;
-    }
-    if ((switches.flags & IMPORT_MASK) == 0) {
-	Tcl_AppendResult(interp, 
-		"can't set both -noelems and -noattrs switches.", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObj != NULL) {
-	result = ImportXmlFile(interp, table, switches.fileObj, switches.flags);
-    } else {
-	result = ImportXmlData(interp, table, switches.dataObj, switches.flags);
-    }
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return result;
-}
-
-#endif /* HAVE_LIBEXPAT */
-
-static int
-XmlFlush(ExportSwitches *exportPtr) 
-{
-    int nWritten;
-    char *line;
-    int length;
-
-    line = Tcl_DStringValue(exportPtr->dsPtr);
-    length = Tcl_DStringLength(exportPtr->dsPtr);
-    nWritten = Tcl_Write(exportPtr->channel, line, length);
-    if (nWritten != length) {
-	Tcl_AppendResult(exportPtr->interp, "can't write xml element: ",
-		Tcl_PosixError(exportPtr->interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-    return TCL_OK;
-}
-
-static void
-XmlPutEscapeString(const char *from, size_t length, ExportSwitches *exportPtr)
-{
-    const char *p, *pend;
-
-    for (p = from, pend = from + length; p < pend; /*empty*/) {
-	switch (*p) {
-	case '\'': 
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "'", 6);
-	    break;
-	case '&':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "&", 5);
-	    break;
-	case '>':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, ">", 4);
-	    break; 
-	case '<':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "<", 4);
-	    break; 
-	case '"':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, """, 6);
-	    break;
-	default:  
-	    p++;
-	    break;
-	}
-    }	
-    if (p > from) {
-	Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-    }
-}
-
-static int
-XmlStartTable(ExportSwitches *exportPtr, const char *tableName)
-{
-    Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-    Tcl_DStringAppend(exportPtr->dsPtr, "<", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, tableName, -1);
-    Tcl_DStringAppend(exportPtr->dsPtr, ">\n", 2);
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static int
-XmlEndTable(ExportSwitches *exportPtr, const char *tableName)
-{
-    Tcl_DStringAppend(exportPtr->dsPtr, "</", 2);
-    Tcl_DStringAppend(exportPtr->dsPtr, tableName, -1);
-    Tcl_DStringAppend(exportPtr->dsPtr, ">\n", 2);
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static void
-XmlStartElement(ExportSwitches *exportPtr, const char *elemName)
-{
-    if (exportPtr->channel != NULL) {
-	Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-    }
-    Tcl_DStringAppend(exportPtr->dsPtr, "  <", 3);
-    Tcl_DStringAppend(exportPtr->dsPtr, elemName, -1);
-}
-
-static int
-XmlEndElement(ExportSwitches *exportPtr)
-{
-    Tcl_DStringAppend(exportPtr->dsPtr, "/>\n", 3);
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static void
-XmlAppendAttrib(ExportSwitches *exportPtr, const char *attrName, 
-		const char *value, int length)
-{
-    size_t valueLen;
-
-    if (length < 0) {
-	valueLen = strlen(value);
-    } else {
-	valueLen = (size_t)length;
-    }
-    Tcl_DStringAppend(exportPtr->dsPtr, " ", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, attrName, -1);
-    Tcl_DStringAppend(exportPtr->dsPtr, "=", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, "\"", 1);
-    XmlPutEscapeString(value, valueLen, exportPtr);
-    Tcl_DStringAppend(exportPtr->dsPtr, "\"", 1);
-}
-
-static int
-XmlExport(Blt_Table table, ExportSwitches *exportPtr)
-{
-    Blt_TableRow row;
-
-    XmlStartTable(exportPtr, "root");
-    for (row = Blt_Table_FirstTaggedRow(&exportPtr->rIter); row != NULL; 
-	 row = Blt_Table_NextTaggedRow(&exportPtr->rIter)) {
-	Blt_TableColumn col;
-	const char *label;
-	    
-	XmlStartElement(exportPtr, "row");
-	label = Blt_Table_RowLabel(row);
-	XmlAppendAttrib(exportPtr, "name", label, -1);
-	for (col = Blt_Table_FirstTaggedColumn(&exportPtr->cIter); col != NULL; 
-	     col = Blt_Table_NextTaggedColumn(&exportPtr->cIter)) {
-	    const char *string;
-
-	    label = Blt_Table_ColumnLabel(col);
-	    string = Blt_Table_GetString(table, row, col);
-	    if (string != NULL) {
-		XmlAppendAttrib(exportPtr, label, string, -1);
-	    }
-	}
-	if (XmlEndElement(exportPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    XmlEndTable(exportPtr, "root");
-    return TCL_OK;
-}
-
-static int
-ExportXmlProc(Blt_Table table, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ExportSwitches switches;
-    Tcl_Channel channel;
-    Tcl_DString ds;
-    int closeChannel;
-    int result;
-
-    closeChannel = FALSE;
-    channel = NULL;
-
-    Tcl_DStringInit(&ds);
-    memset(&switches, 0, sizeof(switches));
-    rowIterSwitch.clientData = table;
-    columnIterSwitch.clientData = table;
-    Blt_Table_IterateAllRows(table, &switches.rIter);
-    Blt_Table_IterateAllColumns(table, &switches.cIter);
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if (switches.fileObj != NULL) {
-	char *fileName;
-
-	closeChannel = TRUE;
-	fileName = Tcl_GetString(switches.fileObj);
-	if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	    int mode;
-	    
-	    channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	    if ((mode & TCL_WRITABLE) == 0) {
-		Tcl_AppendResult(interp, "channel \"", fileName, 
-			"\" not opened for writing", (char *)NULL);
-		goto error;
-	    }
-	    closeChannel = FALSE;
-	} else {
-	    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	    if (channel == NULL) {
-		goto error;	/* Can't open export file. */
-	    }
-	}
-    }
-    switches.interp = interp;
-    switches.dsPtr = &ds;
-    switches.channel = channel;
-    result = XmlExport(table, &switches); 
-    if ((switches.channel == NULL) && (result == TCL_OK)) {
-	Tcl_DStringResult(interp, &ds);
-    } 
- error:
-    Tcl_DStringFree(&ds);
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    return result;
-}
-
-int 
-Blt_Table_XmlInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_datatable_xml", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_Table_RegisterFormat(interp,
-        "xml",			/* Name of format. */
-#ifdef HAVE_LIBEXPAT
-	ImportXmlProc,		/* Import procedure. */
-#else
-	NULL,			/* Import procedure. */
-#endif /* HAVE_LIBEXPAT */
-	ExportXmlProc);		/* Export procedure. */
-
-}
-
diff --git a/blt3.0/src/bltExtInit.c b/blt3.0/src/bltExtInit.c
deleted file mode 100644
index 654af39..0000000
--- a/blt3.0/src/bltExtInit.c
+++ /dev/null
@@ -1,209 +0,0 @@
-
-/*
- * BltExInit.c --
- *
- * This module initials the Tk-related commands of BLT toolkit, registering
- * the commands with the TCL interpreter.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltNsUtil.h"
-
-#if (_TCL_VERSION >= _VERSION(8,5,0)) 
-#define TCL_VERSION_LOADED	TCL_PATCH_LEVEL
-#else 
-#define TCL_VERSION_LOADED	TCL_VERSION
-#endif
-#if (_TK_VERSION >= _VERSION(8,5,0)) 
-#define TK_VERSION_LOADED	TK_PATCH_LEVEL
-#else 
-#define TK_VERSION_LOADED	TK_VERSION
-#endif
-
-
-BLT_EXTERN Tcl_AppInitProc Blt_x_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_x_SafeInit;
-BLT_EXTERN Tcl_AppInitProc Blt_core_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_Init;
-
-static Tcl_AppInitProc *cmdProcs[] =
-{
-    Blt_BgPatternCmdInitProc,
-#ifndef NO_GRAPH
-    Blt_GraphCmdInitProc,
-#endif
-#ifndef NO_PICTURE
-    Blt_PictureCmdInitProc,
-#endif
-#ifndef NO_TABLEMGR
-    Blt_TableMgrCmdInitProc,
-#endif
-#ifndef NO_TABSET
-    Blt_TabsetCmdInitProc,
-#endif
-#ifndef NO_HTEXT
-    Blt_HtextCmdInitProc,
-#endif
-#ifndef NO_BUSY
-    Blt_BusyCmdInitProc,
-#endif
-#ifndef NO_WINOP
-    Blt_WinopCmdInitProc,
-#endif
-#ifndef NO_BITMAP
-    Blt_BitmapCmdInitProc,
-#endif
-#ifndef NO_DRAGDROP
-    Blt_DragDropCmdInitProc,
-#endif
-#ifndef NO_DND
-    Blt_DndCmdInitProc,
-#endif
-#ifndef NO_CONTAINER
-    Blt_ContainerCmdInitProc,
-#endif
-#ifndef NO_BELL
-    Blt_BeepCmdInitProc,
-#endif
-#ifndef NO_CUTBUFFER
-    Blt_CutbufferCmdInitProc,
-#endif
-#ifndef NO_PRINTER
-    Blt_PrinterCmdInitProc,
-#endif
-#ifndef NO_TKFRAME
-    Blt_FrameCmdInitProc,
-#endif
-#ifndef NO_TKBUTTON
-    Blt_ButtonCmdInitProc,
-#endif
-#ifndef NO_TKSCROLLBAR
-    Blt_ScrollbarCmdInitProc,
-#endif
-#ifndef NO_SCROLLSET
-    Blt_ScrollsetCmdInitProc,
-#endif
-#ifndef NO_PANESET
-    Blt_PanesetCmdInitProc,
-#endif
-#ifndef NO_TREEVIEW
-    Blt_TreeViewCmdInitProc,
-#endif
-#if (BLT_MAJOR_VERSION > 3)
-#ifndef NO_MOUNTAIN
-    Blt_MountainCmdInitProc,
-#endif
-#endif
-#ifndef NO_TED
-    Blt_TedCmdInitProc,
-#endif
-#ifndef NO_TED
-    Blt_ComboButtonInitProc,
-    Blt_ComboEntryInitProc,
-    Blt_ComboMenuInitProc,
-    Blt_ComboTreeInitProc,
-#endif
-    Blt_AfmCmdInitProc,
-    Blt_SendEventCmdInitProc,
-    (Tcl_AppInitProc *) NULL
-};
-
-/*LINTLIBRARY*/
-int
-Blt_x_Init(Tcl_Interp *interp) /* Interpreter to add extra commands */
-{
-    Tcl_Namespace *nsPtr;
-    Tcl_AppInitProc **p;
-    const int isExact = 1;
-
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION_LOADED, isExact) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, isExact) == NULL) {
-	return TCL_ERROR;
-    }
-
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-#ifdef USE_TK_STUBS
-    if (Tk_InitStubs(interp, TK_VERSION_LOADED, isExact) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgPresent(interp, "Tk", TK_VERSION_LOADED, isExact) == NULL) {
-	return TCL_OK;
-    } 
-#else
-    if (Tcl_PkgRequire(interp, "Tk", TK_VERSION_LOADED, isExact) == NULL) {
-	Tcl_ResetResult(interp);
-	return TCL_OK;
-    } 
-#endif
-    nsPtr = Tcl_CreateNamespace(interp, "::blt::tk", NULL, NULL);
-    if (nsPtr == NULL) {
-	return TCL_ERROR;
-    }
-    nsPtr = Tcl_FindNamespace(interp, "::blt", NULL, TCL_LEAVE_ERR_MSG);
-    if (nsPtr == NULL) {
-	return TCL_ERROR;
-    }
-    Blt_RegisterPictureImageType(interp);
-    Blt_RegisterEpsCanvasItem();
-    
-    /* Initialize the BLT commands that only use Tk. */
-    for (p = cmdProcs; *p != NULL; p++) {
-	if ((**p) (interp) != TCL_OK) {
-	    Tcl_DeleteNamespace(nsPtr);
-	    return TCL_ERROR;
-	}
-    }
-    if (Tcl_PkgProvide(interp, "blt_extra", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*LINTLIBRARY*/
-int
-Blt_x_SafeInit(Tcl_Interp *interp) /* Interpreter to add extra commands */
-{
-    return Blt_x_Init(interp);
-}
-
-int
-Blt_Init(Tcl_Interp *interp) 
-{
-    if (Blt_core_Init(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_x_Init(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-#ifdef USE_DLL
-#  include "bltWinDll.c"
-#endif
diff --git a/blt3.0/src/bltFont.h b/blt3.0/src/bltFont.h
deleted file mode 100644
index ea0869b..0000000
--- a/blt3.0/src/bltFont.h
+++ /dev/null
@@ -1,137 +0,0 @@
-
-/*
- * bltFont.h --
- *
- *	Copyright 1993-2004 George A Howlett.v
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_FONT_H
-#define _BLT_FONT_H
-
-#define FONT_ITALIC	(1<<0)
-#define FONT_BOLD	(1<<1)
-
-typedef struct {
-    int ascent;			/* The amount in pixels that the tallest
-				 * letter sticks up above the baseline, plus
-				 * any extra blank space added by the designer
-				 * of the font. */
-    int descent;		/* The largest amount in pixels that any
-				 * letter sticks below the baseline, plus any
-				 * extra blank space added by the designer of
-				 * the font. */
-    int linespace;		/* The sum of the ascent and descent.  How
-				 * far apart two lines of text in the same
-				 * font should be placed so that none of the
-				 * characters in one line overlap any of the
-				 * characters in the other line. */
-    int tabWidth;		/* Width of tabs in this font (pixels). */
-    int	underlinePos;		/* Offset from baseline to origin of
-				 * underline bar (used for drawing underlines
-				 * on a non-underlined font). */
-    int underlineHeight;	/* Height of underline bar (used for drawing
-				 * underlines on a non-underlined font). */
-} Blt_FontMetrics;
-
-
-typedef struct _Blt_Font *Blt_Font;
-typedef struct Blt_FontClass Blt_FontClass;
-
-typedef const char *(Blt_NameOfFontProc)(Blt_Font font);
-typedef void (Blt_GetFontMetricsProc)(Blt_Font font, 
-	Blt_FontMetrics *metricsPtr);
-typedef Font (Blt_FontIdProc)(Blt_Font font);
-typedef int (Blt_TextStringWidthProc)(Blt_Font font, const char *string, 
-	int nBytes);
-typedef void (Blt_FreeFontProc)(Blt_Font font);
-typedef int (Blt_MeasureCharsProc)(Blt_Font font, const char *text, int nBytes, 
-	int maxLength, int flags, int *lengthPtr);
-typedef void (Blt_DrawCharsProc)(Display *display, Drawable drawable, GC gc, 
-	Blt_Font font, int depth, float angle, const char *text, int length, 
-	int x, int y);
-typedef int (Blt_PostscriptFontNameProc)(Blt_Font font, Tcl_DString *resultPtr);
-typedef const char *(Blt_FamilyOfFontProc)(Blt_Font font);
-typedef int (Blt_CanRotateFontProc)(Blt_Font font, float angle);
-typedef void (Blt_UnderlineCharsProc)(Display *display, Drawable drawable, 
-	GC gc, Blt_Font font, const char *string, int x, int y, int first, 
-	int last);
-
-struct Blt_FontClass {
-    int type;			/* Indicates the type of font used. */
-    Blt_NameOfFontProc *nameOfFont;
-    Blt_FamilyOfFontProc *familyOfFont;
-    Blt_FontIdProc *fontId;
-    Blt_GetFontMetricsProc *getFontMetrics;
-    Blt_MeasureCharsProc *measureChars;
-    Blt_TextStringWidthProc *textWidth;
-    Blt_CanRotateFontProc *canRotateFont;
-    Blt_DrawCharsProc *drawChars;
-    Blt_PostscriptFontNameProc *postscriptFontName;
-    Blt_FreeFontProc  *freeFont;
-    Blt_UnderlineCharsProc  *underlineChars;
-};
-
-struct _Blt_Font {
-    void *clientData;
-    Tcl_Interp *interp;
-    Display *display;
-    Blt_FontClass *classPtr;
-};
-
-#define Blt_NameOfFont(f) (*(f)->classPtr->nameOfFont)(f)
-#define Blt_FontId(f) (*(f)->classPtr->fontId)(f)
-#define Blt_MeasureChars(f,s,l,ml,fl,lp) \
-	(*(f)->classPtr->measureChars)(f,s,l,ml,fl,lp)
-#define Blt_DrawChars(d,w,gc,f,dp,a,t,l,x,y)		\
-	(*(f)->classPtr->drawChars)(d,w,gc,f,dp,a,t,l,x,y)
-#define Blt_PostscriptFontName(f,rp) (*(f)->classPtr->postscriptFontName)(f,rp)
-#define Blt_FamilyOfFont(f) (*(f)->classPtr->familyOfFont)(f)
-#define Blt_CanRotateFont(f,a) (*(f)->classPtr->canRotateFont)(f,a)
-#define Blt_FreeFont(f) (*(f)->classPtr->freeFont)(f)
-#define Blt_UnderlineChars(d,w,g,f,s,x,y,a,b) \
-	(*(f)->classPtr->underlineChars)(d,w,g,f,s,x,y,a,b)
-
-BLT_EXTERN Blt_Font Blt_GetFont(Tcl_Interp *interp, Tk_Window tkwin, 
-	const char *string);
-BLT_EXTERN Blt_Font Blt_AllocFontFromObj(Tcl_Interp *interp, Tk_Window tkwin, 
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN void Blt_DrawCharsWithEllipsis(Tk_Window tkwin, Drawable drawable,
-	GC gc, Blt_Font font, int depth, float angle, const char *string, 
-	int nBytes, int x, int y, int maxLength);
-
-BLT_EXTERN Blt_Font Blt_GetFontFromObj(Tcl_Interp *interp, Tk_Window tkwin,
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN void Blt_GetFontMetrics(Blt_Font font, Blt_FontMetrics *fmPtr);
-BLT_EXTERN int Blt_TextWidth(Blt_Font font, const char *string, int length);
-BLT_EXTERN Tcl_Interp *Blt_GetFontInterp(Blt_Font font);
-
-#ifdef _XFT_H_
-BLT_EXTERN XftFont *Blt_OpenXftFontFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
-BLT_EXTERN XftFont *Blt_OpenXftFont(Tcl_Interp *interp, const char *fontName);
-#endif /*_XFT_H_*/
-
-#endif /* _BLT_FONT_H */
diff --git a/blt3.0/src/bltGrAxis.c b/blt3.0/src/bltGrAxis.c
deleted file mode 100644
index 0d80c0c..0000000
--- a/blt3.0/src/bltGrAxis.c
+++ /dev/null
@@ -1,5440 +0,0 @@
-
-/*
- * bltGrAxis.c --
- *
- *	This module implements coordinate axes for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltGrElem.h"
-#include <X11/Xutil.h>
-
-#define MAXTICKS	10001
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-
-/*
- * Round x in terms of units
- */
-#define UROUND(x,u)		(Round((x)/(u))*(u))
-#define UCEIL(x,u)		(ceil((x)/(u))*(u))
-#define UFLOOR(x,u)		(floor((x)/(u))*(u))
-
-#define NUMDIGITS		15	/* Specifies the number of digits of
-					 * accuracy used when outputting axis
-					 * tick labels. */
-enum TickRange {
-    AXIS_TIGHT, AXIS_LOOSE, AXIS_ALWAYS_LOOSE
-};
-
-#define AXIS_PAD_TITLE		2	/* Padding for axis title. */
-
-/* Axis flags: */
-
-#define AXIS_AUTO_MAJOR		(1<<16) /* Auto-generate major ticks. */
-#define AXIS_AUTO_MINOR		(1<<17) /* Auto-generate minor ticks. */
-#define AXIS_USE		(1<<18)	/* Axis is displayed on the screen via
-					 * the "use" operation */
-#define AXIS_GRID		(1<<19)	/* Display grid lines. */
-#define AXIS_GRID_MINOR		(1<<20)	/* Display grid lines for minor ticks. */
-#define AXIS_SHOWTICKS		(1<<21)	/* Display axis ticks. */
-#define AXIS_EXTERIOR		(1<<22)	/* Axis is exterior to the plot. */
-#define AXIS_CHECK_LIMITS	(1<<23)	/* Validate user-defined axis limits. */
-
-#define HORIZMARGIN(m)	(!((m)->site & 0x1))	/* Even sites are horizontal */
-
-typedef struct {
-    int axis;				/* Length of the axis.  */
-    int t1;			        /* Length of a major tick (in
-					 * pixels). */
-    int t2;			        /* Length of a minor tick (in
-					 * pixels). */
-    int label;				/* Distance from axis to tick label. */
-} AxisInfo;
-
-typedef struct {
-    const char *name;
-    ClassId classId;
-    int margin, invertMargin;
-} AxisName;
-
-static AxisName axisNames[] = { 
-    { "x",  CID_AXIS_X, MARGIN_BOTTOM, MARGIN_LEFT   },
-    { "y",  CID_AXIS_Y, MARGIN_LEFT,   MARGIN_BOTTOM },
-    { "x2", CID_AXIS_X, MARGIN_TOP,    MARGIN_RIGHT  },
-    { "y2", CID_AXIS_Y, MARGIN_RIGHT,  MARGIN_TOP    }
-} ;
-static int nAxisNames = sizeof(axisNames) / sizeof(AxisName);
-
-static Blt_OptionParseProc ObjToLimitProc;
-static Blt_OptionPrintProc LimitToObjProc;
-static Blt_CustomOption limitOption = {
-    ObjToLimitProc, LimitToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionFreeProc  FreeTicksProc;
-static Blt_OptionParseProc ObjToTicksProc;
-static Blt_OptionPrintProc TicksToObjProc;
-static Blt_CustomOption majorTicksOption = {
-    ObjToTicksProc, TicksToObjProc, FreeTicksProc, (ClientData)AXIS_AUTO_MAJOR,
-};
-static Blt_CustomOption minorTicksOption = {
-    ObjToTicksProc, TicksToObjProc, FreeTicksProc, (ClientData)AXIS_AUTO_MINOR,
-};
-static Blt_OptionFreeProc  FreeAxisProc;
-static Blt_OptionPrintProc AxisToObjProc;
-static Blt_OptionParseProc ObjToAxisProc;
-Blt_CustomOption bltXAxisOption = {
-    ObjToAxisProc, AxisToObjProc, FreeAxisProc, (ClientData)CID_AXIS_X
-};
-Blt_CustomOption bltYAxisOption = {
-    ObjToAxisProc, AxisToObjProc, FreeAxisProc, (ClientData)CID_AXIS_Y
-};
-
-static Blt_OptionFreeProc  FreeFormatProc;
-static Blt_OptionParseProc ObjToFormatProc;
-static Blt_OptionPrintProc FormatToObjProc;
-static Blt_CustomOption formatOption = {
-    ObjToFormatProc, FormatToObjProc, FreeFormatProc, (ClientData)0,
-};
-static Blt_OptionParseProc ObjToLooseProc;
-static Blt_OptionPrintProc LooseToObjProc;
-static Blt_CustomOption looseOption = {
-    ObjToLooseProc, LooseToObjProc, NULL, (ClientData)0,
-};
-
-static Blt_OptionParseProc ObjToUseProc;
-static Blt_OptionPrintProc UseToObjProc;
-static Blt_CustomOption useOption = {
-    ObjToUseProc, UseToObjProc, NULL, (ClientData)0
-};
-
-#define DEF_AXIS_ACTIVE_BACKGROUND	STD_ACTIVE_BACKGROUND
-#define DEF_AXIS_ACTIVE_FOREGROUND	STD_ACTIVE_FOREGROUND
-#define DEF_AXIS_ACTIVE_RELIEF		"flat"
-#define DEF_AXIS_ANGLE			"0.0"
-#define DEF_AXIS_BACKGROUND		(char *)NULL
-#define DEF_AXIS_BORDERWIDTH		"0"
-#define DEF_AXIS_CHECKLIMITS		"0"
-#define DEF_AXIS_COMMAND		(char *)NULL
-#define DEF_AXIS_DESCENDING		"0"
-#define DEF_AXIS_FOREGROUND		RGB_BLACK
-#define DEF_AXIS_GRID_BARCHART		"1"
-#define DEF_AXIS_GRID_COLOR		RGB_GREY64
-#define DEF_AXIS_GRID_DASHES		"dot"
-#define DEF_AXIS_GRID_GRAPH		"0"
-#define DEF_AXIS_GRID_LINE_WIDTH	"0"
-#define DEF_AXIS_GRID_MINOR		"1"
-#define DEF_AXIS_GRID_MINOR_COLOR	RGB_GREY64
-#define DEF_AXIS_HIDE			"0"
-#define DEF_AXIS_JUSTIFY		"c"
-#define DEF_AXIS_LIMITS_FORMAT	        (char *)NULL
-#define DEF_AXIS_LINE_WIDTH		"1"
-#define DEF_AXIS_LOGSCALE		"0"
-#define DEF_AXIS_LOOSE			"0"
-#define DEF_AXIS_RANGE			"0.0"
-#define DEF_AXIS_RELIEF			"flat"
-#define DEF_AXIS_SCROLL_INCREMENT 	"10"
-#define DEF_AXIS_SHIFTBY		"0.0"
-#define DEF_AXIS_SHOWTICKS		"1"
-#define DEF_AXIS_STEP			"0.0"
-#define DEF_AXIS_STEP			"0.0"
-#define DEF_AXIS_SUBDIVISIONS		"2"
-#define DEF_AXIS_TAGS			"all"
-#define DEF_AXIS_EXTERIOR		"1"
-#define DEF_AXIS_TICK_ANCHOR		"c"
-#define DEF_AXIS_LIMITS_FONT		STD_FONT_NUMBERS
-#define DEF_AXIS_TICK_FONT_GRAPH	STD_FONT_NUMBERS
-#define DEF_AXIS_TICK_FONT_BARCHART	STD_FONT_SMALL
-#define DEF_AXIS_TICK_LENGTH		"4"
-#define DEF_AXIS_TICK_NUM		"10"
-#define DEF_AXIS_TITLE_ALTERNATE	"0"
-#define DEF_AXIS_TITLE_FG		RGB_BLACK
-#define DEF_AXIS_TITLE_FONT		"{Sans Serif} 10"
-#define DEF_AXIS_X_STEP_BARCHART	"1.0"
-#define DEF_AXIS_X_SUBDIVISIONS_BARCHART "0"
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"ActiveBackground", DEF_AXIS_ACTIVE_BACKGROUND, 
-	Blt_Offset(Axis, activeBg), ALL_GRAPHS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"ActiveForeground", DEF_AXIS_ACTIVE_FOREGROUND,
-	Blt_Offset(Axis, activeFgColor), ALL_GRAPHS}, 
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
-	DEF_AXIS_ACTIVE_RELIEF, Blt_Offset(Axis, activeRelief),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT}, 
-    {BLT_CONFIG_DOUBLE, "-autorange", "autoRange", "AutoRange",
-	DEF_AXIS_RANGE, Blt_Offset(Axis, windowSize),
-        ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT}, 
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_AXIS_BACKGROUND, Blt_Offset(Axis, normalBg),
-	ALL_GRAPHS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_AXIS_TAGS, 
-	Blt_Offset(Axis, obj.tags), ALL_GRAPHS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 
-	0, ALL_GRAPHS},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_AXIS_BORDERWIDTH, Blt_Offset(Axis, borderWidth),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-checklimits", "checkLimits", "CheckLimits", 
-	DEF_AXIS_CHECKLIMITS, Blt_Offset(Axis, flags), 
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT,
-	(Blt_CustomOption *)AXIS_CHECK_LIMITS},
-    {BLT_CONFIG_COLOR, "-color", "color", "Color",
-	DEF_AXIS_FOREGROUND, Blt_Offset(Axis, tickColor), ALL_GRAPHS},
-    {BLT_CONFIG_STRING, "-command", "command", "Command",
-	DEF_AXIS_COMMAND, Blt_Offset(Axis, formatCmd),
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS},
-    {BLT_CONFIG_BOOLEAN, "-descending", "descending", "Descending",
-	DEF_AXIS_DESCENDING, Blt_Offset(Axis, descending),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-exterior", "exterior", "exterior", DEF_AXIS_EXTERIOR, 
-	Blt_Offset(Axis, flags), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)AXIS_EXTERIOR},
-    {BLT_CONFIG_SYNONYM, "-fg", "color", (char *)NULL, 
-        (char *)NULL, 0, ALL_GRAPHS},
-    {BLT_CONFIG_SYNONYM, "-foreground", "color", (char *)NULL, 
-        (char *)NULL, 0, ALL_GRAPHS},
-    {BLT_CONFIG_BITMASK, "-grid", "grid", "Grid", DEF_AXIS_GRID_BARCHART, 
-	Blt_Offset(Axis, flags), BARCHART, (Blt_CustomOption *)AXIS_GRID},
-    {BLT_CONFIG_BITMASK, "-grid", "grid", "Grid", DEF_AXIS_GRID_GRAPH, 
-	Blt_Offset(Axis, flags), GRAPH | STRIPCHART, 
-	(Blt_CustomOption *)AXIS_GRID},
-    {BLT_CONFIG_COLOR, "-gridcolor", "gridColor", "GridColor", 
-	DEF_AXIS_GRID_COLOR, Blt_Offset(Axis, major.color), ALL_GRAPHS},
-    {BLT_CONFIG_DASHES, "-griddashes", "gridDashes", "GridDashes", 
-	DEF_AXIS_GRID_DASHES, Blt_Offset(Axis, major.dashes), 
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS},
-    {BLT_CONFIG_PIXELS_NNEG, "-gridlinewidth", "gridLineWidth", 
-	"GridLineWidth", DEF_AXIS_GRID_LINE_WIDTH, 
-	Blt_Offset(Axis, major.lineWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS},
-    {BLT_CONFIG_BITMASK, "-gridminor", "gridMinor", "GridMinor", 
-	DEF_AXIS_GRID_MINOR, Blt_Offset(Axis, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS, 
-	(Blt_CustomOption *)AXIS_GRID_MINOR},
-    {BLT_CONFIG_COLOR, "-gridminorcolor", "gridMinorColor", "GridColor", 
-	DEF_AXIS_GRID_MINOR_COLOR, Blt_Offset(Axis, minor.color), ALL_GRAPHS},
-    {BLT_CONFIG_DASHES, "-gridminordashes", "gridMinorDashes", "GridDashes", 
-	DEF_AXIS_GRID_DASHES, Blt_Offset(Axis, minor.dashes), 
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS},
-    {BLT_CONFIG_PIXELS_NNEG, "-gridminorlinewidth", "gridMinorLineWidth", 
-	"GridLineWidth", DEF_AXIS_GRID_LINE_WIDTH, 
-	Blt_Offset(Axis, minor.lineWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_AXIS_HIDE, 
-	Blt_Offset(Axis, flags), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT, 
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify",
-	DEF_AXIS_JUSTIFY, Blt_Offset(Axis, titleJustify),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-labeloffset", "labelOffset", "LabelOffset",
-        (char *)NULL, Blt_Offset(Axis, labelOffset), ALL_GRAPHS}, 
-    {BLT_CONFIG_COLOR, "-limitscolor", "limitsColor", "Color",
-	DEF_AXIS_FOREGROUND, Blt_Offset(Axis, limitsTextStyle.color), 
-	ALL_GRAPHS},
-    {BLT_CONFIG_FONT, "-limitsfont", "limitsFont", "Font", DEF_AXIS_LIMITS_FONT,
-	Blt_Offset(Axis, limitsTextStyle.font), ALL_GRAPHS},
-    {BLT_CONFIG_CUSTOM, "-limitsformat", "limitsFormat", "LimitsFormat",
-        (char *)NULL, Blt_Offset(Axis, limitsFormats),
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS, &formatOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-	DEF_AXIS_LINE_WIDTH, Blt_Offset(Axis, lineWidth),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-logscale", "logScale", "LogScale",
-	DEF_AXIS_LOGSCALE, Blt_Offset(Axis, logScale),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-loose", "loose", "Loose", DEF_AXIS_LOOSE, 0, 
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT, &looseOption},
-    {BLT_CONFIG_CUSTOM, "-majorticks", "majorTicks", "MajorTicks",
-	(char *)NULL, Blt_Offset(Axis, t1Ptr),
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS, &majorTicksOption},
-    {BLT_CONFIG_CUSTOM, "-max", "max", "Max", (char *)NULL, 
-	Blt_Offset(Axis, reqMax), ALL_GRAPHS, &limitOption},
-    {BLT_CONFIG_CUSTOM, "-min", "min", "Min", (char *)NULL, 
-	Blt_Offset(Axis, reqMin), ALL_GRAPHS, &limitOption},
-    {BLT_CONFIG_CUSTOM, "-minorticks", "minorTicks", "MinorTicks",
-	(char *)NULL, Blt_Offset(Axis, t2Ptr), 
-	BLT_CONFIG_NULL_OK | ALL_GRAPHS, &minorTicksOption},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_AXIS_RELIEF, Blt_Offset(Axis, relief), 
-        ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-rotate", "rotate", "Rotate", DEF_AXIS_ANGLE, 
-	Blt_Offset(Axis, tickAngle), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-scrollcommand", "scrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(Axis, scrollCmdObjPtr),
-	ALL_GRAPHS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-scrollincrement", "scrollIncrement", 
-	"ScrollIncrement", DEF_AXIS_SCROLL_INCREMENT, 
-	Blt_Offset(Axis, scrollUnits), ALL_GRAPHS|BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-scrollmax", "scrollMax", "ScrollMax", (char *)NULL, 
-	Blt_Offset(Axis, reqScrollMax),  ALL_GRAPHS, &limitOption},
-    {BLT_CONFIG_CUSTOM, "-scrollmin", "scrollMin", "ScrollMin", (char *)NULL, 
-	Blt_Offset(Axis, reqScrollMin), ALL_GRAPHS, &limitOption},
-    {BLT_CONFIG_DOUBLE, "-shiftby", "shiftBy", "ShiftBy",
-	DEF_AXIS_SHIFTBY, Blt_Offset(Axis, shiftBy),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-showticks", "showTicks", "ShowTicks",
-	DEF_AXIS_SHOWTICKS, Blt_Offset(Axis, flags), 
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT,
-	(Blt_CustomOption *)AXIS_SHOWTICKS},
-    {BLT_CONFIG_DOUBLE, "-stepsize", "stepSize", "StepSize",
-	DEF_AXIS_STEP, Blt_Offset(Axis, reqStep),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT, "-subdivisions", "subdivisions", "Subdivisions",
-	DEF_AXIS_SUBDIVISIONS, Blt_Offset(Axis, reqNumMinorTicks), ALL_GRAPHS},
-    {BLT_CONFIG_ANCHOR, "-tickanchor", "tickAnchor", "Anchor",
-	DEF_AXIS_TICK_ANCHOR, Blt_Offset(Axis, reqTickAnchor), ALL_GRAPHS},
-    {BLT_CONFIG_FONT, "-tickfont", "tickFont", "Font",
-	DEF_AXIS_TICK_FONT_GRAPH, Blt_Offset(Axis, tickFont), 
-	GRAPH | STRIPCHART},
-    {BLT_CONFIG_FONT, "-tickfont", "tickFont", "Font",
-	DEF_AXIS_TICK_FONT_BARCHART, Blt_Offset(Axis, tickFont), BARCHART},
-    {BLT_CONFIG_PIXELS_NNEG, "-ticklength", "tickLength", "TickLength",
-	DEF_AXIS_TICK_LENGTH, Blt_Offset(Axis, tickLength), 
-        ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT, "-tickdefault", "tickDefault", "TickDefault",
-	DEF_AXIS_TICK_NUM, Blt_Offset(Axis, reqNumMajorTicks),
-	ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-title", "title", "Title",
-	(char *)NULL, Blt_Offset(Axis, title),
-	BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK | ALL_GRAPHS},
-    {BLT_CONFIG_BOOLEAN, "-titlealternate", "titleAlternate", "TitleAlternate",
-	DEF_AXIS_TITLE_ALTERNATE, Blt_Offset(Axis, titleAlternate),
-	BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS},
-    {BLT_CONFIG_COLOR, "-titlecolor", "titleColor", "Color", 
-	DEF_AXIS_FOREGROUND, Blt_Offset(Axis, titleColor), 	
-	ALL_GRAPHS},
-    {BLT_CONFIG_FONT, "-titlefont", "titleFont", "Font", DEF_AXIS_TITLE_FONT, 
-	Blt_Offset(Axis, titleFont), ALL_GRAPHS},
-    {BLT_CONFIG_CUSTOM, "-use", "use", "Use", (char *)NULL, 0, ALL_GRAPHS, 
-	&useOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/* Forward declarations */
-static void DestroyAxis(Axis *axisPtr);
-static Tcl_FreeProc FreeAxis;
-static int GetAxisByClass(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr,
-	ClassId classId, Axis **axisPtrPtr);
-
-static int lastMargin;
-typedef int (GraphAxisProc)(Tcl_Interp *interp, Axis *axisPtr, int objc, 
-	Tcl_Obj *const *objv);
-typedef int (GraphVirtualAxisProc)(Tcl_Interp *interp, Graph *graphPtr, 
-	int objc, Tcl_Obj *const *objv);
-
-INLINE static double
-Clamp(double x) 
-{
-    return (x < 0.0) ? 0.0 : (x > 1.0) ? 1.0 : x;
-}
-
-INLINE static int
-Round(double x)
-{
-    return (int) (x + ((x < 0.0) ? -0.5 : 0.5));
-}
-
-static void
-SetAxisRange(AxisRange *rangePtr, double min, double max)
-{
-    rangePtr->min = min;
-    rangePtr->max = max;
-    rangePtr->range = max - min;
-    if (FABS(rangePtr->range) < DBL_EPSILON) {
-	rangePtr->range = 1.0;
-    }
-    rangePtr->scale = 1.0 / rangePtr->range;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InRange --
- *
- *	Determines if a value lies within a given range.
- *
- *	The value is normalized and compared against the interval [0..1],
- *	where 0.0 is the minimum and 1.0 is the maximum.  DBL_EPSILON is the
- *	smallest number that can be represented on the host machine, such that
- *	(1.0 + epsilon) != 1.0.
- *
- *	Please note, *max* can't equal *min*.
- *
- * Results:
- *	If the value is within the interval [min..max], 1 is returned; 0
- *	otherwise.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static int
-InRange(double x, AxisRange *rangePtr)
-{
-    if (rangePtr->range < DBL_EPSILON) {
-	return (FABS(rangePtr->max - x) >= DBL_EPSILON);
-    } else {
-	double norm;
-
-	norm = (x - rangePtr->min) * rangePtr->scale;
-	return ((norm >= -DBL_EPSILON) && ((norm - 1.0) < DBL_EPSILON));
-    }
-}
-
-INLINE static int
-AxisIsHorizontal(Axis *axisPtr)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    return ((axisPtr->obj.classId == CID_AXIS_Y) == graphPtr->inverted);
-}
-
-
-static void
-ReleaseAxis(Axis *axisPtr)
-{
-    if (axisPtr != NULL) {
-	axisPtr->refCount--;
-	assert(axisPtr->refCount >= 0);
-	if (axisPtr->refCount == 0) {
-	    axisPtr->flags |= DELETE_PENDING;
-	    Tcl_EventuallyFree(axisPtr, FreeAxis);
-	}
-    }
-}
-
-/*
- *-----------------------------------------------------------------------------
- * Custom option parse and print procedures
- *-----------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static void
-FreeAxisProc(
-    ClientData clientData,		/* Not used. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Axis **axisPtrPtr = (Axis **)(widgRec + offset);
-
-    if (*axisPtrPtr != NULL) {
-	ReleaseAxis(*axisPtrPtr);
-	*axisPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToAxisProc --
- *
- *	Converts the name of an axis to a pointer to its axis structure.
- *
- * Results:
- *	The return value is a standard TCL result.  The axis flags are written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToAxisProc(
-    ClientData clientData,		/* Class identifier of the type of
-					 * axis we are looking for. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Used to look up pointer to graph. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ClassId classId = (ClassId)clientData;
-    Axis **axisPtrPtr = (Axis **)(widgRec + offset);
-    Axis *axisPtr;
-    Graph *graphPtr;
-
-    if (flags & BLT_CONFIG_NULL_OK) {
-	const char *string;
-
-	string  = Tcl_GetString(objPtr);
-	if (string[0] == '\0') {
-	    ReleaseAxis(*axisPtrPtr);
-	    *axisPtrPtr = NULL;
-	    return TCL_OK;
-	}
-    }
-    graphPtr = Blt_GetGraphFromWindowData(tkwin);
-    assert(graphPtr);
-    if (GetAxisByClass(interp, graphPtr, objPtr, classId, &axisPtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    ReleaseAxis(*axisPtrPtr);
-    *axisPtrPtr = axisPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisToObjProc --
- *
- *	Convert the window coordinates into a string.
- *
- * Results:
- *	The string representing the coordinate position is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-AxisToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Pointer to structure record .*/
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = *(Axis **)(widgRec + offset);
-    const char *name;
-
-    name = (axisPtr == NULL) ? "" : axisPtr->obj.name;
-    return Tcl_NewStringObj(name, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeFormatProc(
-    ClientData clientData,		/* Not used. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-
-    if (axisPtr->limitsFormats != NULL) {
-	Blt_Free(axisPtr->limitsFormats);
-	axisPtr->limitsFormats = NULL;
-    }
-    axisPtr->nFormats = 0;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToFormatProc --
- *
- *	Convert the name of virtual axis to an pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The axis flags are written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToFormatProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-    const char **argv;
-    int argc;
-
-    if (Tcl_SplitList(interp, Tcl_GetString(objPtr), &argc, &argv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (argc > 2) {
-	Tcl_AppendResult(interp, "too many elements in limits format list \"",
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	Blt_Free(argv);
-	return TCL_ERROR;
-    }
-    if (axisPtr->limitsFormats != NULL) {
-	Blt_Free(axisPtr->limitsFormats);
-    }
-    axisPtr->limitsFormats = argv;
-    axisPtr->nFormats = argc;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FormatToObjProc --
- *
- *	Convert the window coordinates into a string.
- *
- * Results:
- *	The string representing the coordinate position is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-FormatToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-    Tcl_Obj *objPtr;
-
-    if (axisPtr->nFormats == 0) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	const char *string;
-
-	string = Tcl_Merge(axisPtr->nFormats, axisPtr->limitsFormats); 
-	objPtr = Tcl_NewStringObj(string, -1);
-	Blt_Free(string);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLimitProc --
- *
- *	Convert the string representation of an axis limit into its numeric
- *	form.
- *
- * Results:
- *	The return value is a standard TCL result.  The symbol type is written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLimitProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    double *limitPtr = (double *)(widgRec + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	*limitPtr = Blt_NaN();
-    } else if (Blt_ExprDoubleFromObj(interp, objPtr, limitPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LimitToObjProc --
- *
- *	Convert the floating point axis limits into a string.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LimitToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    double limit = *(double *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (DEFINED(limit)) {
-	objPtr = Tcl_NewDoubleObj(limit);
-    } else {
-	objPtr = Tcl_NewStringObj("", -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToUseProc --
- *
- *	Convert the string representation of the margin to use into its 
- *	numeric form.
- *
- * Results:
- *	The return value is a standard TCL result.  The use type is written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToUseProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-    AxisName *p, *pend;
-    Blt_Chain chain;
-    Graph *graphPtr;
-    const char *string;
-    int margin;
-
-    graphPtr = axisPtr->obj.graphPtr;
-    if (axisPtr->refCount == 0) {
-	/* Clear the axis class if it's not currently used by an element.*/
-	Blt_GraphSetObjectClass(&axisPtr->obj, CID_NONE);
-    }
-    /* Remove the axis from the margin's use list and clear its use flag. */
-    if (axisPtr->link != NULL) {
-	Blt_Chain_UnlinkLink(axisPtr->chain, axisPtr->link);
-    }
-    axisPtr->flags &= ~AXIS_USE;
-    string = Tcl_GetString(objPtr);
-    if ((string == NULL) || (string[0] == '\0')) {
-	goto done;
-    }
-    for (p = axisNames, pend = axisNames + nAxisNames; p < pend; p++) {
-	if (strcmp(p->name, string) == 0) {
-	    break;			/* Found the axis name. */
-	}
-    }
-    if (p == pend) {
-	Tcl_AppendResult(interp, "unknown axis type \"", string, "\": "
-			 "should be x, y, x1, y2, or \"\".", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Check the axis class. Can't use the axis if it's already being used as
-     * another type.  */
-    if (axisPtr->obj.classId == CID_NONE) {
-	Blt_GraphSetObjectClass(&axisPtr->obj, p->classId);
-    } else if (axisPtr->obj.classId != p->classId) {
-	Tcl_AppendResult(interp, "wrong type for axis \"", 
-		axisPtr->obj.name, "\": can't use ", 
-		axisPtr->obj.className, " type axis.", (char *)NULL); 
-	return TCL_ERROR;
-    }
-    margin = (graphPtr->inverted) ? p->invertMargin : p->margin;
-    chain = graphPtr->margins[margin].axes;
-    if (axisPtr->link != NULL) {
-	/* Move the axis from the old margin's "use" list to the new. */
-	Blt_Chain_AppendLink(chain, axisPtr->link);
-    } else {
-	axisPtr->link = Blt_Chain_Append(chain, axisPtr);
-    }
-    axisPtr->chain = chain;
-    axisPtr->flags |= AXIS_USE;
-    axisPtr->margin = margin;
- done:
-    graphPtr->flags |= (GET_AXIS_GEOMETRY | LAYOUT_NEEDED | RESET_AXES);
-    /* When any axis changes, we need to layout the entire graph.  */
-    graphPtr->flags |= (MAP_WORLD | REDRAW_WORLD);
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UseToObjProc --
- *
- *	Convert the floating point axis limits into a string.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-UseToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-    
-    if (axisPtr->margin == MARGIN_NONE) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(axisNames[axisPtr->margin].name, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeTicksProc(
-    ClientData clientData,		/* Either AXIS_AUTO_MAJOR or
-					 * AXIS_AUTO_MINOR. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Axis *axisPtr = (Axis *)widgRec;
-    Ticks **ticksPtrPtr = (Ticks **) (widgRec + offset);
-    unsigned long mask = (unsigned long)clientData;
-
-    axisPtr->flags |= mask;
-    if (*ticksPtrPtr != NULL) {
-	Blt_Free(*ticksPtrPtr);
-    }
-    *ticksPtrPtr = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTicksProc --
- *
- *
- * Results:
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTicksProc(
-    ClientData clientData,		/* Either AXIS_AUTO_MAJOR or
-					 * AXIS_AUTO_MINOR. */
-    Tcl_Interp *interp,		        /* Interpreter to send results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)widgRec;
-    Tcl_Obj **objv;
-    Ticks **ticksPtrPtr = (Ticks **) (widgRec + offset);
-    Ticks *ticksPtr;
-    int objc;
-    unsigned long mask = (unsigned long)clientData;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    axisPtr->flags |= mask;
-    ticksPtr = NULL;
-    if (objc > 0) {
-	int i;
-
-	ticksPtr = Blt_AssertMalloc(sizeof(Ticks) + (objc * sizeof(double)));
-	for (i = 0; i < objc; i++) {
-	    double value;
-
-	    if (Blt_ExprDoubleFromObj(interp, objv[i], &value) != TCL_OK) {
-		Blt_Free(ticksPtr);
-		return TCL_ERROR;
-	    }
-	    ticksPtr->values[i] = value;
-	}
-	ticksPtr->nTicks = objc;
-	axisPtr->flags &= ~mask;
-    }
-    FreeTicksProc(clientData, Tk_Display(tkwin), widgRec, offset);
-    *ticksPtrPtr = ticksPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TicksToObjProc --
- *
- *	Convert array of tick coordinates to a list.
- *
- * Results:
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TicksToObjProc(
-    ClientData clientData,		/* Either AXIS_AUTO_MAJOR or
-					 * AXIS_AUTO_MINOR. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr;
-    Tcl_Obj *listObjPtr;
-    Ticks *ticksPtr;
-    unsigned long mask;
-
-    axisPtr = (Axis *)widgRec;
-    ticksPtr = *(Ticks **) (widgRec + offset);
-    mask = (unsigned long)clientData;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if ((ticksPtr != NULL) && ((axisPtr->flags & mask) == 0)) {
-	unsigned int i;
-
-	for (i = 0; i < ticksPtr->nTicks; i++) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewDoubleObj(ticksPtr->values[i]);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLooseProc --
- *
- *	Convert a string to one of three values.
- *		0 - false, no, off
- *		1 - true, yes, on
- *		2 - always
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLooseProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing new value. */
-    char *widgRec,			/* Pointer to structure record. */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)(widgRec);
-    Tcl_Obj **objv;
-    int i;
-    int objc;
-    int values[2];
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc < 1) || (objc > 2)) {
-	Tcl_AppendResult(interp, "wrong # elements in loose value \"",
-	    Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if ((string[0] == 'a') && (strcmp(string, "always") == 0)) {
-	    values[i] = AXIS_ALWAYS_LOOSE;
-	} else {
-	    int bool;
-
-	    if (Tcl_GetBooleanFromObj(interp, objv[i], &bool) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    values[i] = bool;
-	}
-    }
-    axisPtr->looseMin = axisPtr->looseMax = values[0];
-    if (objc > 1) {
-	axisPtr->looseMax = values[1];
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LooseToObjProc --
- *
- * Results:
- *	The string representation of the auto boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LooseToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Axis *axisPtr = (Axis *)widgRec;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (axisPtr->looseMin == AXIS_TIGHT) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewBooleanObj(FALSE));
-    } else if (axisPtr->looseMin == AXIS_LOOSE) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewBooleanObj(TRUE));
-    } else if (axisPtr->looseMin == AXIS_ALWAYS_LOOSE) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("always", 6));
-    }
-    if (axisPtr->looseMin != axisPtr->looseMax) {
-	if (axisPtr->looseMax == AXIS_TIGHT) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewBooleanObj(FALSE));
-	} else if (axisPtr->looseMax == AXIS_LOOSE) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewBooleanObj(TRUE));
-	} else if (axisPtr->looseMax == AXIS_ALWAYS_LOOSE) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("always", 6));
-	}
-    }
-    return listObjPtr;
-}
-
-static void
-FreeTickLabels(Blt_Chain chain)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	TickLabel *labelPtr;
-
-	labelPtr = Blt_Chain_GetValue(link);
-	Blt_Free(labelPtr);
-    }
-    Blt_Chain_Reset(chain);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MakeLabel --
- *
- *	Converts a floating point tick value to a string to be used as its
- *	label.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Returns a new label in the string character buffer.  The formatted
- *	tick label will be displayed on the graph.
- *
- * -------------------------------------------------------------------------- 
- */
-static TickLabel *
-MakeLabel(Axis *axisPtr, double value)
-{
-#define TICK_LABEL_SIZE		200
-    char string[TICK_LABEL_SIZE + 1];
-    TickLabel *labelPtr;
-
-    /* Generate a default tick label based upon the tick value.  */
-    if (axisPtr->logScale) {
-	sprintf_s(string, TICK_LABEL_SIZE, "1E%d", ROUND(value));
-    } else {
-	sprintf_s(string, TICK_LABEL_SIZE, "%.*G", NUMDIGITS, value);
-    }
-
-    if (axisPtr->formatCmd != NULL) {
-	Graph *graphPtr;
-	Tcl_Interp *interp;
-	Tk_Window tkwin;
-	
-	graphPtr = axisPtr->obj.graphPtr;
-	interp = graphPtr->interp;
-	tkwin = graphPtr->tkwin;
-	/*
-	 * A TCL proc was designated to format tick labels. Append the path
-	 * name of the widget and the default tick label as arguments when
-	 * invoking it. Copy and save the new label from interp->result.
-	 */
-	Tcl_ResetResult(interp);
-	if (Tcl_VarEval(interp, axisPtr->formatCmd, " ", Tk_PathName(tkwin),
-		" ", string, (char *)NULL) != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	} else {
-	    /* 
-	     * The proc could return a string of any length, so arbitrarily
-	     * limit it to what will fit in the return string.
-	     */
-	    strncpy(string, Tcl_GetStringResult(interp), TICK_LABEL_SIZE);
-	    string[TICK_LABEL_SIZE] = '\0';
-	    
-	    Tcl_ResetResult(interp); /* Clear the interpreter's result. */
-	}
-    }
-    labelPtr = Blt_AssertMalloc(sizeof(TickLabel) + strlen(string));
-    strcpy(labelPtr->string, string);
-    labelPtr->anchorPos.x = labelPtr->anchorPos.y = DBL_MAX;
-    return labelPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InvHMap --
- *
- *	Maps the given screen coordinate back to a graph coordinate.  Called
- *	by the graph locater routine.
- *
- * Results:
- *	Returns the graph coordinate value at the given window
- *	y-coordinate.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_InvHMap(Axis *axisPtr, double x)
-{
-    double value;
-
-    x = (double)(x - axisPtr->screenMin) * axisPtr->screenScale;
-    if (axisPtr->descending) {
-	x = 1.0 - x;
-    }
-    value = (x * axisPtr->axisRange.range) + axisPtr->axisRange.min;
-    if (axisPtr->logScale) {
-	value = EXP10(value);
-    }
-    return value;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InvVMap --
- *
- *	Maps the given screen y-coordinate back to the graph coordinate
- *	value. Called by the graph locater routine.
- *
- * Results:
- *	Returns the graph coordinate value for the given screen
- *	coordinate.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_InvVMap(Axis *axisPtr, double y) /* Screen coordinate */
-{
-    double value;
-
-    y = (double)(y - axisPtr->screenMin) * axisPtr->screenScale;
-    if (axisPtr->descending) {
-	y = 1.0 - y;
-    }
-    value = ((1.0 - y) * axisPtr->axisRange.range) + axisPtr->axisRange.min;
-    if (axisPtr->logScale) {
-	value = EXP10(value);
-    }
-    return value;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_HMap --
- *
- *	Map the given graph coordinate value to its axis, returning a window
- *	position.
- *
- * Results:
- *	Returns a double precision number representing the window coordinate
- *	position on the given axis.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_HMap(Axis *axisPtr, double x)
-{
-    if ((axisPtr->logScale) && (x != 0.0)) {
-	x = log10(FABS(x));
-    }
-    /* Map graph coordinate to normalized coordinates [0..1] */
-    x = (x - axisPtr->axisRange.min) * axisPtr->axisRange.scale;
-    if (axisPtr->descending) {
-	x = 1.0 - x;
-    }
-    return (x * axisPtr->screenRange + axisPtr->screenMin);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_VMap --
- *
- *	Map the given graph coordinate value to its axis, returning a window
- *	position.
- *
- * Results:
- *	Returns a double precision number representing the window coordinate
- *	position on the given axis.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_VMap(Axis *axisPtr, double y)
-{
-    if ((axisPtr->logScale) && (y != 0.0)) {
-	y = log10(FABS(y));
-    }
-    /* Map graph coordinate to normalized coordinates [0..1] */
-    y = (y - axisPtr->axisRange.min) * axisPtr->axisRange.scale;
-    if (axisPtr->descending) {
-	y = 1.0 - y;
-    }
-    return ((1.0 - y) * axisPtr->screenRange + axisPtr->screenMin);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Map2D --
- *
- *	Maps the given graph x,y coordinate values to a window position.
- *
- * Results:
- *	Returns a XPoint structure containing the window coordinates of
- *	the given graph x,y coordinate.
- *
- *---------------------------------------------------------------------------
- */
-Point2d
-Blt_Map2D(
-    Graph *graphPtr,
-    double x, double y,			/* Graph x and y coordinates */
-    Axis2d *axesPtr)			/* Specifies which axes to use */
-{
-    Point2d point;
-
-    if (graphPtr->inverted) {
-	point.x = Blt_HMap(axesPtr->y, y);
-	point.y = Blt_VMap(axesPtr->x, x);
-    } else {
-	point.x = Blt_HMap(axesPtr->x, x);
-	point.y = Blt_VMap(axesPtr->y, y);
-    }
-    return point;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InvMap2D --
- *
- *	Maps the given window x,y coordinates to graph values.
- *
- * Results:
- *	Returns a structure containing the graph coordinates of the given
- *	window x,y coordinate.
- *
- *---------------------------------------------------------------------------
- */
-Point2d
-Blt_InvMap2D(
-    Graph *graphPtr,
-    double x, double y,			/* Window x and y coordinates */
-    Axis2d *axesPtr)			/* Specifies which axes to use */
-{
-    Point2d point;
-
-    if (graphPtr->inverted) {
-	point.x = Blt_InvVMap(axesPtr->x, y);
-	point.y = Blt_InvHMap(axesPtr->y, x);
-    } else {
-	point.x = Blt_InvHMap(axesPtr->x, x);
-	point.y = Blt_InvVMap(axesPtr->y, y);
-    }
-    return point;
-}
-
-
-static void
-GetDataLimits(Axis *axisPtr, double min, double max)
-{
-    if (axisPtr->valueRange.min > min) {
-	axisPtr->valueRange.min = min;
-    }
-    if (axisPtr->valueRange.max < max) {
-	axisPtr->valueRange.max = max;
-    }
-}
-
-static void
-FixAxisRange(Axis *axisPtr)
-{
-    double min, max;
-
-    /*
-     * When auto-scaling, the axis limits are the bounds of the element data.
-     * If no data exists, set arbitrary limits (wrt to log/linear scale).
-     */
-    min = axisPtr->valueRange.min;
-    max = axisPtr->valueRange.max;
-
-    /* Check the requested axis limits. Can't allow -min to be greater
-     * than -max, or have undefined log scale limits.  */
-    if (((DEFINED(axisPtr->reqMin)) && (DEFINED(axisPtr->reqMax))) &&
-	(axisPtr->reqMin >= axisPtr->reqMax)) {
-	axisPtr->reqMin = axisPtr->reqMax = Blt_NaN();
-    }
-    if (axisPtr->logScale) {
-	if ((DEFINED(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
-	    axisPtr->reqMin = Blt_NaN();
-	}
-	if ((DEFINED(axisPtr->reqMax)) && (axisPtr->reqMax <= 0.0)) {
-	    axisPtr->reqMax = Blt_NaN();
-	}
-    }
-
-    if (min == DBL_MAX) {
-	if (DEFINED(axisPtr->reqMin)) {
-	    min = axisPtr->reqMin;
-	} else {
-	    min = (axisPtr->logScale) ? 0.001 : 0.0;
-	}
-    }
-    if (max == -DBL_MAX) {
-	if (DEFINED(axisPtr->reqMax)) {
-	    max = axisPtr->reqMax;
-	} else {
-	    max = 1.0;
-	}
-    }
-    if (min >= max) {
-	/*
-	 * There is no range of data (i.e. min is not less than max), so
-	 * manufacture one.
-	 */
-	if (min == 0.0) {
-	    min = 0.0, max = 1.0;
-	} else {
-	    max = min + (FABS(min) * 0.1);
-	}
-    }
-    SetAxisRange(&axisPtr->valueRange, min, max);
-
-    /*   
-     * The axis limits are either the current data range or overridden by the
-     * values selected by the user with the -min or -max options.
-     */
-    axisPtr->min = min;
-    axisPtr->max = max;
-    if (DEFINED(axisPtr->reqMin)) {
-	axisPtr->min = axisPtr->reqMin;
-    }
-    if (DEFINED(axisPtr->reqMax)) { 
-	axisPtr->max = axisPtr->reqMax;
-    }
-    if (axisPtr->max < axisPtr->min) {
-	/*   
-	 * If the limits still don't make sense, it's because one limit
-	 * configuration option (-min or -max) was set and the other default
-	 * (based upon the data) is too small or large.  Remedy this by making
-	 * up a new min or max from the user-defined limit.
-	 */
-	if (!DEFINED(axisPtr->reqMin)) {
-	    axisPtr->min = axisPtr->max - (FABS(axisPtr->max) * 0.1);
-	}
-	if (!DEFINED(axisPtr->reqMax)) {
-	    axisPtr->max = axisPtr->min + (FABS(axisPtr->max) * 0.1);
-	}
-    }
-    /* 
-     * If a window size is defined, handle auto ranging by shifting the axis
-     * limits.
-     */
-    if ((axisPtr->windowSize > 0.0) && 
-	(!DEFINED(axisPtr->reqMin)) && (!DEFINED(axisPtr->reqMax))) {
-	if (axisPtr->shiftBy < 0.0) {
-	    axisPtr->shiftBy = 0.0;
-	}
-	max = axisPtr->min + axisPtr->windowSize;
-	if (axisPtr->max >= max) {
-	    if (axisPtr->shiftBy > 0.0) {
-		max = UCEIL(axisPtr->max, axisPtr->shiftBy);
-	    }
-	    axisPtr->min = max - axisPtr->windowSize;
-	}
-	axisPtr->max = max;
-    }
-    if ((axisPtr->max != axisPtr->prevMax) || 
-	(axisPtr->min != axisPtr->prevMin)) {
-	/* Indicate if the axis limits have changed */
-	axisPtr->flags |= DIRTY;
-	/* and save the previous minimum and maximum values */
-	axisPtr->prevMin = axisPtr->min;
-	axisPtr->prevMax = axisPtr->max;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NiceNum --
- *
- *	Reference: Paul Heckbert, "Nice Numbers for Graph Labels",
- *		   Graphics Gems, pp 61-63.  
- *
- *	Finds a "nice" number approximately equal to x.
- *
- *---------------------------------------------------------------------------
- */
-static double
-NiceNum(double x, int round)		/* If non-zero, round. Otherwise take
-					 * ceiling of value. */
-{
-    double expt;			/* Exponent of x */
-    double frac;			/* Fractional part of x */
-    double nice;			/* Nice, rounded fraction */
-
-    expt = floor(log10(x));
-    frac = x / EXP10(expt);		/* between 1 and 10 */
-    if (round) {
-	if (frac < 1.5) {
-	    nice = 1.0;
-	} else if (frac < 3.0) {
-	    nice = 2.0;
-	} else if (frac < 7.0) {
-	    nice = 5.0;
-	} else {
-	    nice = 10.0;
-	}
-    } else {
-	if (frac <= 1.0) {
-	    nice = 1.0;
-	} else if (frac <= 2.0) {
-	    nice = 2.0;
-	} else if (frac <= 5.0) {
-	    nice = 5.0;
-	} else {
-	    nice = 10.0;
-	}
-    }
-    return nice * EXP10(expt);
-}
-
-static Ticks *
-GenerateTicks(TickSweep *sweepPtr)
-{
-    Ticks *ticksPtr;
-
-    ticksPtr = Blt_AssertMalloc(sizeof(Ticks) + 
-	(sweepPtr->nSteps * sizeof(double)));
-    ticksPtr->nTicks = 0;
-
-    if (sweepPtr->step == 0.0) { 
-	/* Hack: A zero step indicates to use log values. */
-	int i;
-	/* Precomputed log10 values [1..10] */
-	static double logTable[] = {
-	    0.0, 
-	    0.301029995663981, 
-	    0.477121254719662, 
-	    0.602059991327962, 
-	    0.698970004336019, 
-	    0.778151250383644, 
-	    0.845098040014257,
-	    0.903089986991944, 
-	    0.954242509439325, 
-	    1.0
-	};
-	for (i = 0; i < sweepPtr->nSteps; i++) {
-	    ticksPtr->values[i] = logTable[i];
-	}
-    } else {
-	double value;
-	int i;
-    
-	value = sweepPtr->initial;	/* Start from smallest axis tick */
-	for (i = 0; i < sweepPtr->nSteps; i++) {
-	    value = UROUND(value, sweepPtr->step);
-	    ticksPtr->values[i] = value;
-	    value += sweepPtr->step;
-	}
-    }
-    ticksPtr->nTicks = sweepPtr->nSteps;
-    return ticksPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LogScaleAxis --
- *
- * 	Determine the range and units of a log scaled axis.
- *
- * 	Unless the axis limits are specified, the axis is scaled
- * 	automatically, where the smallest and largest major ticks encompass
- * 	the range of actual data values.  When an axis limit is specified,
- * 	that value represents the smallest(min)/largest(max) value in the
- * 	displayed range of values.
- *
- * 	Both manual and automatic scaling are affected by the step used.  By
- * 	default, the step is the largest power of ten to divide the range in
- * 	more than one piece.
- *
- *	Automatic scaling:
- *	Find the smallest number of units which contain the range of values.
- *	The minimum and maximum major tick values will be represent the
- *	range of values for the axis. This greatest number of major ticks
- *	possible is 10.
- *
- * 	Manual scaling:
- *   	Make the minimum and maximum data values the represent the range of
- *   	the values for the axis.  The minimum and maximum major ticks will be
- *   	inclusive of this range.  This provides the largest area for plotting
- *   	and the expected results when the axis min and max values have be set
- *   	by the user (.e.g zooming).  The maximum number of major ticks is 20.
- *
- *   	For log scale, there's the possibility that the minimum and
- *   	maximum data values are the same magnitude.  To represent the
- *   	points properly, at least one full decade should be shown.
- *   	However, if you zoom a log scale plot, the results should be
- *   	predictable. Therefore, in that case, show only minor ticks.
- *   	Lastly, there should be an appropriate way to handle numbers
- *   	<=0.
- *
- *          maxY
- *            |    units = magnitude (of least significant digit)
- *            |    high  = largest unit tick < max axis value
- *      high _|    low   = smallest unit tick > min axis value
- *            |
- *            |    range = high - low
- *            |    # ticks = greatest factor of range/units
- *           _|
- *        U   |
- *        n   |
- *        i   |
- *        t  _|
- *            |
- *            |
- *            |
- *       low _|
- *            |
- *            |_minX________________maxX__
- *            |   |       |      |       |
- *     minY  low                        high
- *           minY
- *
- *
- * 	numTicks = Number of ticks
- * 	min = Minimum value of axis
- * 	max = Maximum value of axis
- * 	range    = Range of values (max - min)
- *
- * 	If the number of decades is greater than ten, it is assumed
- *	that the full set of log-style ticks can't be drawn properly.
- *
- * Results:
- *	None
- *
- * -------------------------------------------------------------------------- */
-static void
-LogScaleAxis(Axis *axisPtr, double min, double max)
-{
-    double range;
-    double tickMin, tickMax;
-    double majorStep, minorStep;
-    int nMajor, nMinor;
-
-    nMajor = nMinor = 0;
-    /* Suppress compiler warnings. */
-    majorStep = minorStep = 0.0;
-    tickMin = tickMax = Blt_NaN();
-    if (min < max) {
-	min = (min != 0.0) ? log10(FABS(min)) : 0.0;
-	max = (max != 0.0) ? log10(FABS(max)) : 1.0;
-
-	tickMin = floor(min);
-	tickMax = ceil(max);
-	range = tickMax - tickMin;
-	
-	if (range > 10) {
-	    /* There are too many decades to display a major tick at every
-	     * decade.  Instead, treat the axis as a linear scale.  */
-	    range = NiceNum(range, 0);
-	    majorStep = NiceNum(range / axisPtr->reqNumMajorTicks, 1);
-	    tickMin = UFLOOR(tickMin, majorStep);
-	    tickMax = UCEIL(tickMax, majorStep);
-	    nMajor = (int)((tickMax - tickMin) / majorStep) + 1;
-	    minorStep = EXP10(floor(log10(majorStep)));
-	    if (minorStep == majorStep) {
-		nMinor = 4, minorStep = 0.2;
-	    } else {
-		nMinor = Round(majorStep / minorStep) - 1;
-	    }
-	} else {
-	    if (tickMin == tickMax) {
-		tickMax++;
-	    }
-	    majorStep = 1.0;
-	    nMajor = (int)(tickMax - tickMin + 1); /* FIXME: Check this. */
-	    
-	    minorStep = 0.0;		/* This is a special hack to pass
-					 * information to the GenerateTicks
-					 * routine. An interval of 0.0 tells 1)
-					 * this is a minor sweep and 2) the axis
-					 * is log scale. */
-	    nMinor = 10;
-	}
-	if ((axisPtr->looseMin == AXIS_TIGHT) || 
-	    ((axisPtr->looseMin == AXIS_LOOSE) && 
-	     (DEFINED(axisPtr->reqMin)))) {
-	    tickMin = min;
-	    nMajor++;
-	}
-	if ((axisPtr->looseMax == AXIS_TIGHT) || 
-	    ((axisPtr->looseMax == AXIS_LOOSE) &&
-	     (DEFINED(axisPtr->reqMax)))) {
-	    tickMax = max;
-	}
-    }
-    axisPtr->majorSweep.step = majorStep;
-    axisPtr->majorSweep.initial = floor(tickMin);
-    axisPtr->majorSweep.nSteps = nMajor;
-    axisPtr->minorSweep.initial = axisPtr->minorSweep.step = minorStep;
-    axisPtr->minorSweep.nSteps = nMinor;
-
-    SetAxisRange(&axisPtr->axisRange, tickMin, tickMax);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LinearScaleAxis --
- *
- * 	Determine the units of a linear scaled axis.
- *
- *	The axis limits are either the range of the data values mapped
- *	to the axis (autoscaled), or the values specified by the -min
- *	and -max options (manual).
- *
- *	If autoscaled, the smallest and largest major ticks will
- *	encompass the range of data values.  If the -loose option is
- *	selected, the next outer ticks are choosen.  If tight, the
- *	ticks are at or inside of the data limits are used.
- *
- * 	If manually set, the ticks are at or inside the data limits
- * 	are used.  This makes sense for zooming.  You want the
- * 	selected range to represent the next limit, not something a
- * 	bit bigger.
- *
- *	Note: I added an "always" value to the -loose option to force
- *	      the manually selected axes to be loose. It's probably
- *	      not a good idea.
- *
- *          maxY
- *            |    units = magnitude (of least significant digit)
- *            |    high  = largest unit tick < max axis value
- *      high _|    low   = smallest unit tick > min axis value
- *            |
- *            |    range = high - low
- *            |    # ticks = greatest factor of range/units
- *           _|
- *        U   |
- *        n   |
- *        i   |
- *        t  _|
- *            |
- *            |
- *            |
- *       low _|
- *            |
- *            |_minX________________maxX__
- *            |   |       |      |       |
- *     minY  low                        high
- *           minY
- *
- * 	numTicks = Number of ticks
- * 	min = Minimum value of axis
- * 	max = Maximum value of axis
- * 	range    = Range of values (max - min)
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The axis tick information is set.  The actual tick values will
- *	be generated later.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LinearScaleAxis(Axis *axisPtr, double min, double max)
-{
-    double step;
-    double tickMin, tickMax;
-    double axisMin, axisMax;
-    unsigned int nTicks;
-
-    nTicks = 0;
-    step = 1.0;
-    /* Suppress compiler warning. */
-    axisMin = axisMax = tickMin = tickMax = Blt_NaN();
-    if (min < max) {
-	double range;
-
-	range = max - min;
-	/* Calculate the major tick stepping. */
-	if (axisPtr->reqStep > 0.0) {
-	    /* An interval was designated by the user.  Keep scaling it until
-	     * it fits comfortably within the current range of the axis.  */
-	    step = axisPtr->reqStep;
-	    while ((2 * step) >= range) {
-		step *= 0.5;
-	    }
-	} else {
-	    range = NiceNum(range, 0);
-	    step = NiceNum(range / axisPtr->reqNumMajorTicks, 1);
-	}
-	
-	/* Find the outer tick values. Add 0.0 to prevent getting -0.0. */
-	axisMin = tickMin = floor(min / step) * step + 0.0;
-	axisMax = tickMax = ceil(max / step) * step + 0.0;
-	
-	nTicks = Round((tickMax - tickMin) / step) + 1;
-    } 
-    axisPtr->majorSweep.step = step;
-    axisPtr->majorSweep.initial = tickMin;
-    axisPtr->majorSweep.nSteps = nTicks;
-
-    /*
-     * The limits of the axis are either the range of the data ("tight") or at
-     * the next outer tick interval ("loose").  The looseness or tightness has
-     * to do with how the axis fits the range of data values.  This option is
-     * overridden when the user sets an axis limit (by either -min or -max
-     * option).  The axis limit is always at the selected limit (otherwise we
-     * assume that user would have picked a different number).
-     */
-    if ((axisPtr->looseMin == AXIS_TIGHT) || 
-	((axisPtr->looseMin == AXIS_LOOSE) &&
-	 (DEFINED(axisPtr->reqMin)))) {
-	axisMin = min;
-    }
-    if ((axisPtr->looseMax == AXIS_TIGHT) || 
-	((axisPtr->looseMax == AXIS_LOOSE) &&
-	 (DEFINED(axisPtr->reqMax)))) {
-	axisMax = max;
-    }
-    SetAxisRange(&axisPtr->axisRange, axisMin, axisMax);
-
-    /* Now calculate the minor tick step and number. */
-
-    if ((axisPtr->reqNumMinorTicks > 0) && (axisPtr->flags & AXIS_AUTO_MAJOR)) {
-	nTicks = axisPtr->reqNumMinorTicks - 1;
-	step = 1.0 / (nTicks + 1);
-    } else {
-	nTicks = 0;			/* No minor ticks. */
-	step = 0.5;			/* Don't set the minor tick interval to
-					 * 0.0. It makes the GenerateTicks
-					 * routine * create minor log-scale tick
-					 * marks.  */
-    }
-    axisPtr->minorSweep.initial = axisPtr->minorSweep.step = step;
-    axisPtr->minorSweep.nSteps = nTicks;
-}
-
-
-static void
-SweepTicks(Axis *axisPtr)
-{
-    if (axisPtr->flags & AXIS_AUTO_MAJOR) {
-	if (axisPtr->t1Ptr != NULL) {
-	    Blt_Free(axisPtr->t1Ptr);
-	}
-	axisPtr->t1Ptr = GenerateTicks(&axisPtr->majorSweep);
-    }
-    if (axisPtr->flags & AXIS_AUTO_MINOR) {
-	if (axisPtr->t2Ptr != NULL) {
-	    Blt_Free(axisPtr->t2Ptr);
-	}
-	axisPtr->t2Ptr = GenerateTicks(&axisPtr->minorSweep);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResetAxes --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResetAxes(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    /* FIXME: This should be called whenever the display list of
-     *	      elements change. Maybe yet another flag INIT_STACKS to
-     *	      indicate that the element display list has changed.
-     *	      Needs to be done before the axis limits are set.
-     */
-    Blt_InitBarSetTable(graphPtr);
-    if ((graphPtr->mode == BARS_STACKED) && (graphPtr->nBarGroups > 0)) {
-	Blt_ComputeBarStacks(graphPtr);
-    }
-    /*
-     * Step 1:  Reset all axes. Initialize the data limits of the axis to
-     *		impossible values.
-     */
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	axisPtr->min = axisPtr->valueRange.min = DBL_MAX;
-	axisPtr->max = axisPtr->valueRange.max = -DBL_MAX;
-    }
-
-    /*
-     * Step 2:  For each element that's to be displayed, get the smallest
-     *		and largest data values mapped to each X and Y-axis.  This
-     *		will be the axis limits if the user doesn't override them 
-     *		with -min and -max options.
-     */
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-	Region2d exts;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	(*elemPtr->procsPtr->extentsProc) (elemPtr, &exts);
-	GetDataLimits(elemPtr->axes.x, exts.left, exts.right);
-	GetDataLimits(elemPtr->axes.y, exts.top, exts.bottom);
-    }
-    /*
-     * Step 3:  Now that we know the range of data values for each axis,
-     *		set axis limits and compute a sweep to generate tick values.
-     */
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-	double min, max;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	FixAxisRange(axisPtr);
-
-	/* Calculate min/max tick (major/minor) layouts */
-	min = axisPtr->min;
-	max = axisPtr->max;
-	if ((DEFINED(axisPtr->scrollMin)) && (min < axisPtr->scrollMin)) {
-	    min = axisPtr->scrollMin;
-	}
-	if ((DEFINED(axisPtr->scrollMax)) && (max > axisPtr->scrollMax)) {
-	    max = axisPtr->scrollMax;
-	}
-	if (axisPtr->logScale) {
-	    LogScaleAxis(axisPtr, min, max);
-	} else {
-	    LinearScaleAxis(axisPtr, min, max);
-	}
-
-	if ((axisPtr->flags & (DIRTY|AXIS_USE)) == (DIRTY|AXIS_USE)) {
-	    graphPtr->flags |= CACHE_DIRTY;
-	}
-    }
-
-    graphPtr->flags &= ~RESET_AXES;
-
-    /*
-     * When any axis changes, we need to layout the entire graph.
-     */
-    graphPtr->flags |= (GET_AXIS_GEOMETRY | LAYOUT_NEEDED | MAP_ALL | 
-			REDRAW_WORLD);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetTextStyles --
- *
- *	Configures axis attributes (font, line width, label, etc) and
- *	allocates a new (possibly shared) graphics context.  Line cap style is
- *	projecting.  This is for the problem of when a tick sits directly at
- *	the end point of the axis.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *	Axis resources are allocated (GC, font). Axis layout is deferred until
- *	the height and width of the window are known.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetTextStyles(Axis *axisPtr)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    Blt_Ts_ResetStyle(graphPtr->tkwin, &axisPtr->limitsTextStyle);
-
-    gcMask = (GCForeground | GCLineWidth | GCCapStyle);
-    gcValues.foreground = axisPtr->tickColor->pixel;
-    gcValues.font = Blt_FontId(axisPtr->tickFont);
-    gcValues.line_width = LineWidth(axisPtr->lineWidth);
-    gcValues.cap_style = CapProjecting;
-
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (axisPtr->tickGC != NULL) {
-	Tk_FreeGC(graphPtr->display, axisPtr->tickGC);
-    }
-    axisPtr->tickGC = newGC;
-
-    /* Assuming settings from above GC */
-    gcValues.foreground = axisPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (axisPtr->activeTickGC != NULL) {
-	Tk_FreeGC(graphPtr->display, axisPtr->activeTickGC);
-    }
-    axisPtr->activeTickGC = newGC;
-
-    gcValues.background = gcValues.foreground = axisPtr->major.color->pixel;
-    gcValues.line_width = LineWidth(axisPtr->major.lineWidth);
-    gcMask = (GCForeground | GCBackground | GCLineWidth);
-    if (LineIsDashed(axisPtr->major.dashes)) {
-	gcValues.line_style = LineOnOffDash;
-	gcMask |= GCLineStyle;
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(axisPtr->major.dashes)) {
-	Blt_SetDashes(graphPtr->display, newGC, &axisPtr->major.dashes);
-    }
-    if (axisPtr->major.gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, axisPtr->major.gc);
-    }
-    axisPtr->major.gc = newGC;
-
-    gcValues.background = gcValues.foreground = axisPtr->minor.color->pixel;
-    gcValues.line_width = LineWidth(axisPtr->minor.lineWidth);
-    gcMask = (GCForeground | GCBackground | GCLineWidth);
-    if (LineIsDashed(axisPtr->minor.dashes)) {
-	gcValues.line_style = LineOnOffDash;
-	gcMask |= GCLineStyle;
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(axisPtr->minor.dashes)) {
-	Blt_SetDashes(graphPtr->display, newGC, &axisPtr->minor.dashes);
-    }
-    if (axisPtr->minor.gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, axisPtr->minor.gc);
-    }
-    axisPtr->minor.gc = newGC;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyAxis --
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Resources (font, color, gc, labels, etc.) associated with the axis are
- *	deallocated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyAxis(Axis *axisPtr)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    int flags;
-
-    flags = Blt_GraphType(graphPtr);
-    Blt_FreeOptions(configSpecs, (char *)axisPtr, graphPtr->display, flags);
-    if (graphPtr->bindTable != NULL) {
-	Blt_DeleteBindings(graphPtr->bindTable, axisPtr);
-    }
-    if (axisPtr->link != NULL) {
-	Blt_Chain_DeleteLink(axisPtr->chain, axisPtr->link);
-    }
-    if (axisPtr->obj.name != NULL) {
-	Blt_Free(axisPtr->obj.name);
-    }
-    if (axisPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&graphPtr->axes.table, axisPtr->hashPtr);
-    }
-    Blt_Ts_FreeStyle(graphPtr->display, &axisPtr->limitsTextStyle);
-
-    if (axisPtr->tickGC != NULL) {
-	Tk_FreeGC(graphPtr->display, axisPtr->tickGC);
-    }
-    if (axisPtr->activeTickGC != NULL) {
-	Tk_FreeGC(graphPtr->display, axisPtr->activeTickGC);
-    }
-    if (axisPtr->major.gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, axisPtr->major.gc);
-    }
-    if (axisPtr->minor.gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, axisPtr->minor.gc);
-    }
-    FreeTickLabels(axisPtr->tickLabels);
-    Blt_Chain_Destroy(axisPtr->tickLabels);
-    if (axisPtr->segments != NULL) {
-	Blt_Free(axisPtr->segments);
-    }
-    Blt_Free(axisPtr);
-}
-
-static void
-FreeAxis(DestroyData data)
-{
-    Axis *axisPtr = (Axis *)data;
-    DestroyAxis(axisPtr);
-}
-
-static double titleAngle[4] =		/* Rotation for each axis title */
-{
-    0.0, 90.0, 0.0, 270.0
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisOffsets --
- *
- *	Determines the sites of the axis, major and minor ticks, and title of
- *	the axis.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-AxisOffsets(
-    Axis *axisPtr,
-    int margin,
-    int offset,
-    AxisInfo *infoPtr)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    Margin *marginPtr;
-    int pad;				/* Offset of axis from interior
-					 * region. This includes a possible
-					 * border and the axis line width. */
-    int axisLine;
-    int t1, t2, labelOffset;
-    int tickLabel, axisPad;
-    int inset, mark;
-    int x, y;
-    float fangle;
-
-    axisPtr->titleAngle = titleAngle[margin];
-    marginPtr = graphPtr->margins + margin;
-
-    tickLabel = axisLine = t1 = t2 = 0;
-    labelOffset = AXIS_PAD_TITLE;
-    if (axisPtr->lineWidth > 0) {
-	if (axisPtr->flags & AXIS_SHOWTICKS) {
-	    t1 = axisPtr->tickLength;
-	    t2 = (t1 * 10) / 15;
-	}
-	labelOffset = t1 + AXIS_PAD_TITLE;
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    labelOffset += axisPtr->lineWidth;
-	}
-    }
-    axisPad = 0;
-    if (graphPtr->plotRelief != TK_RELIEF_SOLID) {
-	axisPad = 0;
-    }
-    /* Adjust offset for the interior border width and the line width */
-    pad = 1;
-    if (graphPtr->plotBW > 0) {
-	pad += graphPtr->plotBW + 1;
-    }
-    pad = 0;				/* FIXME: test */
-    /*
-     * Pre-calculate the x-coordinate positions of the axis, tick labels, and
-     * the individual major and minor ticks.
-     */
-    inset = pad + axisPtr->lineWidth / 2;
-    switch (margin) {
-    case MARGIN_TOP:
-	axisLine = graphPtr->top;
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    axisLine -= graphPtr->plotBW + axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = axisLine - 2;
-	    if (axisPtr->lineWidth > 0) {
-		tickLabel -= axisPtr->tickLength;
-	    }
-#ifdef notdef
-	    fprintf(stderr, "axisLine=%d, axisPad=%d plotBW=%d axisPtr->lineWidth/2=%d\n", axisLine, axisPad, graphPtr->plotBW, axisPtr->lineWidth /2 );
-#endif
-	} else {
-	    if (graphPtr->plotRelief == TK_RELIEF_SOLID) {
-		axisLine--;
-	    } 
-	    axisLine -= axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = graphPtr->top -  graphPtr->plotBW - 2;
-#ifdef notdef
-	    fprintf(stderr, "axisLine=%d, axisPad=%d plotBW=%d axisPtr->lineWidth/2=%d\n", axisLine, axisPad, graphPtr->plotBW, axisPtr->lineWidth /2 );
-#endif
-	}
-	mark = graphPtr->top - offset - pad;
-	axisPtr->tickAnchor = TK_ANCHOR_S;
-	axisPtr->left = axisPtr->screenMin - inset - 2;
-	axisPtr->right = axisPtr->screenMin + axisPtr->screenRange + inset - 1;
-	if (graphPtr->stackAxes) {
-	    axisPtr->top = mark - marginPtr->axesOffset;
-	} else {
-	    axisPtr->top = mark - axisPtr->height;
-	}
-	axisPtr->bottom = mark;
-	if (axisPtr->titleAlternate) {
-	    x = graphPtr->right + AXIS_PAD_TITLE;
-	    y = mark - (axisPtr->height  / 2);
-	    axisPtr->titleAnchor = TK_ANCHOR_W;
-	} else {
-	    x = (axisPtr->right + axisPtr->left) / 2;
-	    if (graphPtr->stackAxes) {
-		y = mark - marginPtr->axesOffset + AXIS_PAD_TITLE;
-	    } else {
-		y = mark - axisPtr->height + AXIS_PAD_TITLE;
-	    }
-	    axisPtr->titleAnchor = TK_ANCHOR_N;
-	}
-	axisPtr->titlePos.x = x;
-	axisPtr->titlePos.y = y;
-	break;
-
-    case MARGIN_BOTTOM:
-	/*
-	 *  ----------- bottom + plot borderwidth
-	 *      mark --------------------------------------------
-	 *          ===================== axisLine (linewidth)
-	 *                   tick
-	 *		    title
-	 *
-	 *          ===================== axisLine (linewidth)
-	 *  ----------- bottom + plot borderwidth
-	 *      mark --------------------------------------------
-	 *                   tick
-	 *		    title
-	 */
-	axisLine = graphPtr->bottom;
-	if (graphPtr->plotRelief == TK_RELIEF_SOLID) {
-	    axisLine++;
-	} 
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    axisLine += graphPtr->plotBW + axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = axisLine + 2;
-	    if (axisPtr->lineWidth > 0) {
-		tickLabel += axisPtr->tickLength;
-	    }
-	} else {
-	    axisLine -= axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = graphPtr->bottom +  graphPtr->plotBW + 2;
-	}
-	mark = graphPtr->bottom + offset;
-	fangle = FMOD(axisPtr->tickAngle, 90.0);
-	if (fangle == 0.0) {
-	    axisPtr->tickAnchor = TK_ANCHOR_N;
-	} else {
-	    int quadrant;
-
-	    quadrant = (int)(axisPtr->tickAngle / 90.0);
-	    if ((quadrant == 0) || (quadrant == 2)) {
-		axisPtr->tickAnchor = TK_ANCHOR_NE;
-	    } else {
-		axisPtr->tickAnchor = TK_ANCHOR_NW;
-	    }
-	}
-	axisPtr->left = axisPtr->screenMin - inset - 2;
-	axisPtr->right = axisPtr->screenMin + axisPtr->screenRange + inset - 1;
-	axisPtr->top = graphPtr->bottom + labelOffset - t1;
-	if (graphPtr->stackAxes) {
-	    axisPtr->bottom = mark + marginPtr->axesOffset - 1;
-	} else {
-	    axisPtr->bottom = mark + axisPtr->height - 1;
-	}
-	if (axisPtr->titleAlternate) {
-	    x = graphPtr->right + AXIS_PAD_TITLE;
-	    y = mark + (axisPtr->height / 2);
-	    axisPtr->titleAnchor = TK_ANCHOR_W; 
-	} else {
-	    x = (axisPtr->right + axisPtr->left) / 2;
-	    if (graphPtr->stackAxes) {
-		y = mark + marginPtr->axesOffset - AXIS_PAD_TITLE;
-	    } else {
-		y = mark + axisPtr->height - AXIS_PAD_TITLE;
-	    }
-	    axisPtr->titleAnchor = TK_ANCHOR_S; 
-	}
-	axisPtr->titlePos.x = x;
-	axisPtr->titlePos.y = y;
-	break;
-
-    case MARGIN_LEFT:
-	/*
-	 *                    mark
-	 *                  |  : 
-	 *                  |  :      
-	 *                  |  : 
-	 *                  |  :
-	 *                  |  : 
-	 *     axisLine
-	 */
-	/* 
-	 * Exterior axis 
-	 *     + plotarea right
-	 *     |A|B|C|D|E|F|G|H
-	 *           |right
-	 * A = plot pad 
-	 * B = plot border width
-	 * C = axis pad
-	 * D = axis line
-	 * E = tick length
-	 * F = tick label 
-	 * G = graph border width
-	 * H = highlight thickness
-	 */
-	/* 
-	 * Interior axis 
-	 *     + plotarea right
-	 *     |A|B|C|D|E|F|G|H
-	 *           |right
-	 * A = plot pad 
-	 * B = tick length
-	 * C = axis line width
-	 * D = axis pad
-	 * E = plot border width
-	 * F = tick label 
-	 * G = graph border width
-	 * H = highlight thickness
-	 */
-	axisLine = graphPtr->left;
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    axisLine -= graphPtr->plotBW + axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = axisLine - 2;
-	    if (axisPtr->lineWidth > 0) {
-		tickLabel -= axisPtr->tickLength;
-	    }
-	} else {
-	    if (graphPtr->plotRelief == TK_RELIEF_SOLID) {
-		axisLine--;
-	    } 
-	    axisLine += axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = graphPtr->left - graphPtr->plotBW - 2;
-	}
-	mark = graphPtr->left - offset;
-	axisPtr->tickAnchor = TK_ANCHOR_E;
-	if (graphPtr->stackAxes) {
-	    axisPtr->left = mark - marginPtr->axesOffset;
-	} else {
-	    axisPtr->left = mark - axisPtr->width;
-	}
-	axisPtr->right = mark - 3;
-	axisPtr->top = axisPtr->screenMin - inset - 2;
-	axisPtr->bottom = axisPtr->screenMin + axisPtr->screenRange + inset - 1;
-	if (axisPtr->titleAlternate) {
-	    x = mark - (axisPtr->width / 2);
-	    y = graphPtr->top - AXIS_PAD_TITLE;
-	    axisPtr->titleAnchor = TK_ANCHOR_SW; 
-	} else {
-	    if (graphPtr->stackAxes) {
-		x = mark - marginPtr->axesOffset;
-	    } else {
-		x = mark - axisPtr->width + AXIS_PAD_TITLE;
-	    }
-	    y = (axisPtr->bottom + axisPtr->top) / 2;
-	    axisPtr->titleAnchor = TK_ANCHOR_W; 
-	} 
-	axisPtr->titlePos.x = x;
-	axisPtr->titlePos.y = y;
-	break;
-
-    case MARGIN_RIGHT:
-	axisLine = graphPtr->right;
-	if (graphPtr->plotRelief == TK_RELIEF_SOLID) {
-	    axisLine++;			/* Draw axis line within solid plot
-					 * border. */
-	} 
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    axisLine += graphPtr->plotBW + axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = axisLine + 2;
-	    if (axisPtr->lineWidth > 0) {
-		tickLabel += axisPtr->tickLength;
-	    }
-	} else {
-	    axisLine -= axisPad + axisPtr->lineWidth / 2;
-	    tickLabel = graphPtr->right + graphPtr->plotBW + 2;
-	}
-	mark = graphPtr->right + offset + pad;
-	axisPtr->tickAnchor = TK_ANCHOR_W;
-	axisPtr->left = mark;
-	if (graphPtr->stackAxes) {
-	    axisPtr->right = mark + marginPtr->axesOffset - 1;
-	} else {
-	    axisPtr->right = mark + axisPtr->width - 1;
-	}
-	axisPtr->top = axisPtr->screenMin - inset - 2;
-	axisPtr->bottom = axisPtr->screenMin + axisPtr->screenRange + inset -1;
-	if (axisPtr->titleAlternate) {
-	    x = mark + (axisPtr->width / 2);
-	    y = graphPtr->top - AXIS_PAD_TITLE;
-	    axisPtr->titleAnchor = TK_ANCHOR_SE; 
-	} else {
-	    if (graphPtr->stackAxes) {
-		x = mark + marginPtr->axesOffset - AXIS_PAD_TITLE;
-	    } else {
-		x = mark + axisPtr->width - AXIS_PAD_TITLE;
-	    }
-	    y = (axisPtr->bottom + axisPtr->top) / 2;
-	    axisPtr->titleAnchor = TK_ANCHOR_E;
-	}
-	axisPtr->titlePos.x = x;
-	axisPtr->titlePos.y = y;
-	break;
-
-    case MARGIN_NONE:
-	axisLine = 0;
-	break;
-    }
-    if ((margin == MARGIN_LEFT) || (margin == MARGIN_TOP)) {
-	t1 = -t1, t2 = -t2;
-	labelOffset = -labelOffset;
-    }
-    infoPtr->axis = axisLine;
-    infoPtr->t1 = axisLine + t1;
-    infoPtr->t2 = axisLine + t2;
-    if (tickLabel > 0) {
-	infoPtr->label = tickLabel;
-    } else {
-	infoPtr->label = axisLine + labelOffset;
-    }
-    if ((axisPtr->flags & AXIS_EXTERIOR) == 0) {
-	/*infoPtr->label = axisLine + labelOffset - t1; */
-	infoPtr->t1 = axisLine - t1;
-	infoPtr->t2 = axisLine - t2;
-    } 
-}
-
-static void
-MakeAxisLine(Axis *axisPtr, int line, Segment2d *sp)
-{
-    double min, max;
-
-    min = axisPtr->axisRange.min;
-    max = axisPtr->axisRange.max;
-    if (axisPtr->logScale) {
-	min = EXP10(min);
-	max = EXP10(max);
-    }
-    if (AxisIsHorizontal(axisPtr)) {
-	sp->p.x = Blt_HMap(axisPtr, min);
-	sp->q.x = Blt_HMap(axisPtr, max);
-	sp->p.y = sp->q.y = line;
-    } else {
-	sp->q.x = sp->p.x = line;
-	sp->p.y = Blt_VMap(axisPtr, min);
-	sp->q.y = Blt_VMap(axisPtr, max);
-    }
-}
-
-
-static void
-MakeTick(Axis *axisPtr, double value, int tick, int line, Segment2d *sp)
-{
-    if (axisPtr->logScale) {
-	value = EXP10(value);
-    }
-    if (AxisIsHorizontal(axisPtr)) {
-	sp->p.x = sp->q.x = Blt_HMap(axisPtr, value);
-	sp->p.y = line;
-	sp->q.y = tick;
-    } else {
-	sp->p.x = line;
-	sp->p.y = sp->q.y = Blt_VMap(axisPtr, value);
-	sp->q.x = tick;
-    }
-}
-
-static void
-MakeSegments(Axis *axisPtr, AxisInfo *infoPtr)
-{
-    int arraySize;
-    int nMajorTicks, nMinorTicks;
-    Segment2d *segments;
-    Segment2d *sp;
-
-    if (axisPtr->segments != NULL) {
-	Blt_Free(axisPtr->segments);
-    }
-    nMajorTicks = nMinorTicks = 0;
-    if (axisPtr->t1Ptr != NULL) {
-	nMajorTicks = axisPtr->t1Ptr->nTicks;
-    }
-    if (axisPtr->t2Ptr != NULL) {
-	nMinorTicks = axisPtr->t2Ptr->nTicks;
-    }
-    arraySize = 1 + (nMajorTicks * (nMinorTicks + 1));
-    segments = Blt_AssertMalloc(arraySize * sizeof(Segment2d));
-    sp = segments;
-    if (axisPtr->lineWidth > 0) {
-	/* Axis baseline */
-	MakeAxisLine(axisPtr, infoPtr->axis, sp);
-	sp++;
-    }
-    if (axisPtr->flags & AXIS_SHOWTICKS) {
-	Blt_ChainLink link;
-	double labelPos;
-	int i;
-	int isHoriz;
-
-	isHoriz = AxisIsHorizontal(axisPtr);
-	for (i = 0; i < nMajorTicks; i++) {
-	    double t1, t2;
-	    int j;
-
-	    t1 = axisPtr->t1Ptr->values[i];
-	    /* Minor ticks */
-	    for (j = 0; j < nMinorTicks; j++) {
-		t2 = t1 + (axisPtr->majorSweep.step * 
-			   axisPtr->t2Ptr->values[j]);
-		if (InRange(t2, &axisPtr->axisRange)) {
-		    MakeTick(axisPtr, t2, infoPtr->t2, infoPtr->axis, sp);
-		    sp++;
-		}
-	    }
-	    if (!InRange(t1, &axisPtr->axisRange)) {
-		continue;
-	    }
-	    /* Major tick */
-	    MakeTick(axisPtr, t1, infoPtr->t1, infoPtr->axis, sp);
-	    sp++;
-	}
-
-	link = Blt_Chain_FirstLink(axisPtr->tickLabels);
-	labelPos = (double)infoPtr->label;
-
-	for (i = 0; i < nMajorTicks; i++) {
-	    double t1;
-	    TickLabel *labelPtr;
-	    Segment2d seg;
-
-	    t1 = axisPtr->t1Ptr->values[i];
-	    if (axisPtr->labelOffset) {
-		t1 += axisPtr->majorSweep.step * 0.5;
-	    }
-	    if (!InRange(t1, &axisPtr->axisRange)) {
-		continue;
-	    }
-	    labelPtr = Blt_Chain_GetValue(link);
-	    link = Blt_Chain_NextLink(link);
-	    MakeTick(axisPtr, t1, infoPtr->t1, infoPtr->axis, &seg);
-	    /* Save tick label X-Y position. */
-	    if (isHoriz) {
-		labelPtr->anchorPos.x = seg.p.x;
-		labelPtr->anchorPos.y = labelPos;
-	    } else {
-		labelPtr->anchorPos.x = labelPos;
-		labelPtr->anchorPos.y = seg.p.y;
-	    }
-	}
-    }
-    axisPtr->segments = segments;
-    axisPtr->nSegments = sp - segments;
-    assert(axisPtr->nSegments <= arraySize);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapAxis --
- *
- *	Pre-calculates positions of the axis, ticks, and labels (to be used
- *	later when displaying the axis).  Calculates the values for each major
- *	and minor tick and checks to see if they are in range (the outer ticks
- *	may be outside of the range of plotted values).
- *
- *	Line segments for the minor and major ticks are saved into one
- *	XSegment array so that they can be drawn by a single XDrawSegments
- *	call. The positions of the tick labels are also computed and saved.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Line segments and tick labels are saved and used later to draw the
- *	axis.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapAxis(Axis *axisPtr, int offset, int margin)
-{
-    AxisInfo info;
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    if (AxisIsHorizontal(axisPtr)) {
-	axisPtr->screenMin = graphPtr->hOffset;
-	axisPtr->width = graphPtr->right - graphPtr->left;
-	axisPtr->screenRange = graphPtr->hRange;
-    } else {
-	axisPtr->screenMin = graphPtr->vOffset;
-	axisPtr->height = graphPtr->bottom - graphPtr->top;
-	axisPtr->screenRange = graphPtr->vRange;
-    }
-    axisPtr->screenScale = 1.0 / axisPtr->screenRange;
-    AxisOffsets(axisPtr, margin, offset, &info);
-    MakeSegments(axisPtr, &info);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapStackedAxis --
- *
- *	Pre-calculates positions of the axis, ticks, and labels (to be used
- *	later when displaying the axis).  Calculates the values for each major
- *	and minor tick and checks to see if they are in range (the outer ticks
- *	may be outside of the range of plotted values).
- *
- *	Line segments for the minor and major ticks are saved into one XSegment
- *	array so that they can be drawn by a single XDrawSegments call. The
- *	positions of the tick labels are also computed and saved.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Line segments and tick labels are saved and used later to draw the
- *	axis.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapStackedAxis(Axis *axisPtr, int count, int margin)
-{
-    AxisInfo info;
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    unsigned int slice, w, h;
-
-    if (AxisIsHorizontal(axisPtr)) {
-	slice = graphPtr->hRange / graphPtr->margins[margin].axes->nLinks;
-	axisPtr->screenMin = graphPtr->hOffset;
-	axisPtr->width = slice;
-    } else {
-	slice = graphPtr->vRange / graphPtr->margins[margin].axes->nLinks;
-	axisPtr->screenMin = graphPtr->vOffset;
-	axisPtr->height = slice;
-    }
-#define AXIS_PAD 2
-    Blt_GetTextExtents(axisPtr->tickFont, 0, "0", 1, &w, &h);
-    axisPtr->screenMin += (slice * count) + AXIS_PAD + h / 2;
-    axisPtr->screenRange = slice - 2 * AXIS_PAD - h;
-    axisPtr->screenScale = 1.0f / axisPtr->screenRange;
-    AxisOffsets(axisPtr, margin, 0, &info);
-    MakeSegments(axisPtr, &info);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AdjustViewport --
- *
- *	Adjusts the offsets of the viewport according to the scroll mode.  This
- *	is to accommodate both "listbox" and "canvas" style scrolling.
- *
- *	"canvas"	The viewport scrolls within the range of world
- *			coordinates.  This way the viewport always displays
- *			a full page of the world.  If the world is smaller
- *			than the viewport, then (bizarrely) the world and
- *			viewport are inverted so that the world moves up
- *			and down within the viewport.
- *
- *	"listbox"	The viewport can scroll beyond the range of world
- *			coordinates.  Every entry can be displayed at the
- *			top of the viewport.  This also means that the
- *			scrollbar thumb weirdly shrinks as the last entry
- *			is scrolled upward.
- *
- * Results:
- *	The corrected offset is returned.
- *
- *---------------------------------------------------------------------------
- */
-static double
-AdjustViewport(double offset, double windowSize)
-{
-    /*
-     * Canvas-style scrolling allows the world to be scrolled within the window.
-     */
-    if (windowSize > 1.0) {
-	if (windowSize < (1.0 - offset)) {
-	    offset = 1.0 - windowSize;
-	}
-	if (offset > 0.0) {
-	    offset = 0.0;
-	}
-    } else {
-	if ((offset + windowSize) > 1.0) {
-	    offset = 1.0 - windowSize;
-	}
-	if (offset < 0.0) {
-	    offset = 0.0;
-	}
-    }
-    return offset;
-}
-
-static int
-GetAxisScrollInfo(
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv,
-    double *offsetPtr,
-    double windowSize,
-    double scrollUnits,
-    double scale)
-{
-    const char *string;
-    char c;
-    double offset;
-    int length;
-
-    offset = *offsetPtr;
-    string = Tcl_GetStringFromObj(objv[0], &length);
-    c = string[0];
-    scrollUnits *= scale;
-    if ((c == 's') && (strncmp(string, "scroll", length) == 0)) {
-	int count;
-	double fract;
-
-	assert(objc == 3);
-	/* Scroll number unit/page */
-	if (Tcl_GetIntFromObj(interp, objv[1], &count) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	c = string[0];
-	if ((c == 'u') && (strncmp(string, "units", length) == 0)) {
-	    fract = count * scrollUnits;
-	} else if ((c == 'p') && (strncmp(string, "pages", length) == 0)) {
-	    /* A page is 90% of the view-able window. */
-	    fract = (int)(count * windowSize * 0.9 + 0.5);
-	} else if ((c == 'p') && (strncmp(string, "pixels", length) == 0)) {
-	    fract = count * scale;
-	} else {
-	    Tcl_AppendResult(interp, "unknown \"scroll\" units \"", string,
-		"\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	offset += fract;
-    } else if ((c == 'm') && (strncmp(string, "moveto", length) == 0)) {
-	double fract;
-
-	assert(objc == 2);
-	/* moveto fraction */
-	if (Tcl_GetDoubleFromObj(interp, objv[1], &fract) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	offset = fract;
-    } else {
-	int count;
-	double fract;
-
-	/* Treat like "scroll units" */
-	if (Tcl_GetIntFromObj(interp, objv[0], &count) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	fract = (double)count * scrollUnits;
-	offset += fract;
-	/* CHECK THIS: return TCL_OK; */
-    }
-    *offsetPtr = AdjustViewport(offset, windowSize);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawAxis --
- *
- *	Draws the axis, ticks, and labels onto the canvas.
- *
- *	Initializes and passes text attribute information through TextStyle
- *	structure.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Axis gets drawn on window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawAxis(Axis *axisPtr, Drawable drawable)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    if (axisPtr->normalBg != NULL) {
-	Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, 
-		axisPtr->normalBg, 
-		axisPtr->left, axisPtr->top, 
-		axisPtr->right - axisPtr->left, 
-		axisPtr->bottom - axisPtr->top, axisPtr->borderWidth, 
-		axisPtr->relief);
-    }
-    if (axisPtr->title != NULL) {
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetAngle(ts, axisPtr->titleAngle);
-	Blt_Ts_SetFont(ts, axisPtr->titleFont);
-	Blt_Ts_SetPadding(ts, 1, 2, 0, 0);
-	Blt_Ts_SetAnchor(ts, axisPtr->titleAnchor);
-	Blt_Ts_SetJustify(ts, axisPtr->titleJustify);
-	if (axisPtr->flags & ACTIVE) {
-	    Blt_Ts_SetForeground(ts, axisPtr->activeFgColor);
-	} else {
-	    Blt_Ts_SetForeground(ts, axisPtr->titleColor);
-	}
-	Blt_Ts_SetForeground(ts, axisPtr->titleColor);
-	Blt_DrawText(graphPtr->tkwin, drawable, axisPtr->title, &ts, 
-		(int)axisPtr->titlePos.x, (int)axisPtr->titlePos.y);
-    }
-    if (axisPtr->scrollCmdObjPtr != NULL) {
-	double viewWidth, viewMin, viewMax;
-	double worldWidth, worldMin, worldMax;
-	double fract;
-	int isHoriz;
-
-	worldMin = axisPtr->valueRange.min;
-	worldMax = axisPtr->valueRange.max;
-	if (DEFINED(axisPtr->scrollMin)) {
-	    worldMin = axisPtr->scrollMin;
-	}
-	if (DEFINED(axisPtr->scrollMax)) {
-	    worldMax = axisPtr->scrollMax;
-	}
-	viewMin = axisPtr->min;
-	viewMax = axisPtr->max;
-	if (viewMin < worldMin) {
-	    viewMin = worldMin;
-	}
-	if (viewMax > worldMax) {
-	    viewMax = worldMax;
-	}
-	if (axisPtr->logScale) {
-	    worldMin = log10(worldMin);
-	    worldMax = log10(worldMax);
-	    viewMin = log10(viewMin);
-	    viewMax = log10(viewMax);
-	}
-	worldWidth = worldMax - worldMin;	
-	viewWidth = viewMax - viewMin;
-	isHoriz = AxisIsHorizontal(axisPtr);
-
-	if (isHoriz != axisPtr->descending) {
-	    fract = (viewMin - worldMin) / worldWidth;
-	} else {
-	    fract = (worldMax - viewMax) / worldWidth;
-	}
-	fract = AdjustViewport(fract, viewWidth / worldWidth);
-
-	if (isHoriz != axisPtr->descending) {
-	    viewMin = (fract * worldWidth);
-	    axisPtr->min = viewMin + worldMin;
-	    axisPtr->max = axisPtr->min + viewWidth;
-	    viewMax = viewMin + viewWidth;
-	    if (axisPtr->logScale) {
-		axisPtr->min = EXP10(axisPtr->min);
-		axisPtr->max = EXP10(axisPtr->max);
-	    }
-	    Blt_UpdateScrollbar(graphPtr->interp, axisPtr->scrollCmdObjPtr,
-		viewMin, viewMax, worldWidth);
-	} else {
-	    viewMax = (fract * worldWidth);
-	    axisPtr->max = worldMax - viewMax;
-	    axisPtr->min = axisPtr->max - viewWidth;
-	    viewMin = viewMax + viewWidth;
-	    if (axisPtr->logScale) {
-		axisPtr->min = EXP10(axisPtr->min);
-		axisPtr->max = EXP10(axisPtr->max);
-	    }
-	    Blt_UpdateScrollbar(graphPtr->interp, axisPtr->scrollCmdObjPtr,
-		viewMax, viewMin, worldWidth);
-	}
-    }
-    if (axisPtr->flags & AXIS_SHOWTICKS) {
-	Blt_ChainLink link;
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetAngle(ts, axisPtr->tickAngle);
-	Blt_Ts_SetFont(ts, axisPtr->tickFont);
-	Blt_Ts_SetPadding(ts, 2, 0, 0, 0);
-	Blt_Ts_SetAnchor(ts, axisPtr->tickAnchor);
-	if (axisPtr->flags & ACTIVE) {
-	    Blt_Ts_SetForeground(ts, axisPtr->activeFgColor);
-	} else {
-	    Blt_Ts_SetForeground(ts, axisPtr->tickColor);
-	}
-	for (link = Blt_Chain_FirstLink(axisPtr->tickLabels); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {	
-	    TickLabel *labelPtr;
-
-	    labelPtr = Blt_Chain_GetValue(link);
-	    /* Draw major tick labels */
-	    Blt_DrawText(graphPtr->tkwin, drawable, labelPtr->string, &ts, 
-		(int)labelPtr->anchorPos.x, (int)labelPtr->anchorPos.y);
-	}
-    }
-    if ((axisPtr->nSegments > 0) && (axisPtr->lineWidth > 0)) {	
-	GC gc;
-
-	if (axisPtr->flags & ACTIVE) {
-	    gc = axisPtr->activeTickGC;
-	} else {
-	    gc = axisPtr->tickGC;
-	}
-	/* Draw the tick marks and axis line. */
-	Blt_Draw2DSegments(graphPtr->display, drawable, gc, axisPtr->segments, 
-		axisPtr->nSegments);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisToPostScript --
- *
- *	Generates PostScript output to draw the axis, ticks, and labels.
- *
- *	Initializes and passes text attribute information through TextStyle
- *	structure.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	PostScript output is left in graphPtr->interp->result;
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-AxisToPostScript(Blt_Ps ps, Axis *axisPtr)
-{
-    Blt_Ps_Format(ps, "%% Axis \"%s\"\n", axisPtr->obj.name);
-    if (axisPtr->normalBg != NULL) {
-	Tk_3DBorder border;
-
-	border = Blt_BackgroundBorder(axisPtr->normalBg);
-	Blt_Ps_Fill3DRectangle(ps, border, 
-		(double)axisPtr->left, (double)axisPtr->top, 
-		axisPtr->right - axisPtr->left, axisPtr->bottom - axisPtr->top, 
-		axisPtr->borderWidth, axisPtr->relief);
-    }
-    if (axisPtr->title != NULL) {
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetAngle(ts, axisPtr->titleAngle);
-	Blt_Ts_SetFont(ts, axisPtr->titleFont);
-	Blt_Ts_SetPadding(ts, 1, 2, 0, 0);
-	Blt_Ts_SetAnchor(ts, axisPtr->titleAnchor);
-	Blt_Ts_SetJustify(ts, axisPtr->titleJustify);
-	Blt_Ts_SetForeground(ts, axisPtr->titleColor);
-	Blt_Ps_DrawText(ps, axisPtr->title, &ts, axisPtr->titlePos.x, 
-		axisPtr->titlePos.y);
-    }
-    if (axisPtr->flags & AXIS_SHOWTICKS) {
-	Blt_ChainLink link;
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetAngle(ts, axisPtr->tickAngle);
-	Blt_Ts_SetFont(ts, axisPtr->tickFont);
-	Blt_Ts_SetPadding(ts, 2, 0, 0, 0);
-	Blt_Ts_SetAnchor(ts, axisPtr->tickAnchor);
-	Blt_Ts_SetForeground(ts, axisPtr->tickColor);
-
-	for (link = Blt_Chain_FirstLink(axisPtr->tickLabels); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    TickLabel *labelPtr;
-
-	    labelPtr = Blt_Chain_GetValue(link);
-	    Blt_Ps_DrawText(ps, labelPtr->string, &ts, labelPtr->anchorPos.x, 
-		labelPtr->anchorPos.y);
-	}
-    }
-    if ((axisPtr->nSegments > 0) && (axisPtr->lineWidth > 0)) {
-	Blt_Ps_XSetLineAttributes(ps, axisPtr->tickColor, axisPtr->lineWidth, 
-		(Blt_Dashes *)NULL, CapButt, JoinMiter);
-	Blt_Ps_Draw2DSegments(ps, axisPtr->segments, axisPtr->nSegments);
-    }
-}
-
-static void
-MakeGridLine(Axis *axisPtr, double value, Segment2d *sp)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    if (axisPtr->logScale) {
-	value = EXP10(value);
-    }
-    /* Grid lines run orthogonally to the axis */
-    if (AxisIsHorizontal(axisPtr)) {
-	sp->p.y = graphPtr->top;
-	sp->q.y = graphPtr->bottom;
-	sp->p.x = sp->q.x = Blt_HMap(axisPtr, value);
-    } else {
-	sp->p.x = graphPtr->left;
-	sp->q.x = graphPtr->right;
-	sp->p.y = sp->q.y = Blt_VMap(axisPtr, value);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapGridlines --
- *
- *	Assembles the grid lines associated with an axis. Generates tick
- *	positions if necessary (this happens when the axis is not a logical axis
- *	too).
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapGridlines(Axis *axisPtr)
-{
-    Segment2d *s1, *s2;
-    Ticks *t1Ptr, *t2Ptr;
-    int needed;
-    int i;
-
-    if (axisPtr == NULL) {
-	return;
-    }
-    t1Ptr = axisPtr->t1Ptr;
-    if (t1Ptr == NULL) {
-	t1Ptr = GenerateTicks(&axisPtr->majorSweep);
-    }
-    t2Ptr = axisPtr->t2Ptr;
-    if (t2Ptr == NULL) {
-	t2Ptr = GenerateTicks(&axisPtr->minorSweep);
-    }
-    needed = t1Ptr->nTicks;
-    if (axisPtr->flags & AXIS_GRID_MINOR) {
-	needed += (t1Ptr->nTicks * t2Ptr->nTicks);
-    }
-    if (needed == 0) {
-	return;			
-    }
-    needed = t1Ptr->nTicks;
-    if (needed != axisPtr->major.nAllocated) {
-	if (axisPtr->major.segments != NULL) {
-	    Blt_Free(axisPtr->major.segments);
-	}
-	axisPtr->major.segments = Blt_AssertMalloc(sizeof(Segment2d) * needed);
-	axisPtr->major.nAllocated = needed;
-    }
-    needed = (t1Ptr->nTicks * t2Ptr->nTicks);
-    if (needed != axisPtr->minor.nAllocated) {
-	if (axisPtr->minor.segments != NULL) {
-	    Blt_Free(axisPtr->minor.segments);
-	}
-	axisPtr->minor.segments = Blt_AssertMalloc(sizeof(Segment2d) * needed);
-	axisPtr->minor.nAllocated = needed;
-    }
-    s1 = axisPtr->major.segments, s2 = axisPtr->minor.segments;
-    for (i = 0; i < t1Ptr->nTicks; i++) {
-	double value;
-
-	value = t1Ptr->values[i];
-	if (axisPtr->flags & AXIS_GRID_MINOR) {
-	    int j;
-
-	    for (j = 0; j < t2Ptr->nTicks; j++) {
-		double subValue;
-
-		subValue = value + (axisPtr->majorSweep.step * 
-				    t2Ptr->values[j]);
-		if (InRange(subValue, &axisPtr->axisRange)) {
-		    MakeGridLine(axisPtr, subValue, s2);
-		    s2++;
-		}
-	    }
-	}
-	if (InRange(value, &axisPtr->axisRange)) {
-	    MakeGridLine(axisPtr, value, s1);
-	    s1++;
-	}
-    }
-    if (t1Ptr != axisPtr->t1Ptr) {
-	Blt_Free(t1Ptr);		/* Free generated ticks. */
-    }
-    if (t2Ptr != axisPtr->t2Ptr) {
-	Blt_Free(t2Ptr);		/* Free generated ticks. */
-    }
-    axisPtr->major.nUsed = s1 - axisPtr->major.segments;
-    axisPtr->minor.nUsed = s2 - axisPtr->minor.segments;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetAxisGeometry --
- *
- * Results:
- *	None.
- *
- * Exterior axis:
- *                    l       r
- *  |a|b|c|d|e|f|g|h|i|   j   |i|h|g|f|e|d|c|d|a|
- *
- * Interior axis: 
- *                  l           r
- *  |a|b|c|d|h|g|f|e|     j     |e|f|g|h|d|c|b|a|
- *               i..             ..i 
- * a = highlight thickness
- * b = graph borderwidth
- * c = axis title
- * d = tick label 
- * e = tick 
- * f = axis line
- * g = 1 pixel pad
- * h = plot borderwidth
- * i = plot pad
- * j = plot area 
- *---------------------------------------------------------------------------
- */
-static void
-GetAxisGeometry(Graph *graphPtr, Axis *axisPtr)
-{
-    unsigned int y;
-
-    FreeTickLabels(axisPtr->tickLabels);
-    y = 0;
-
-    if ((axisPtr->flags & AXIS_EXTERIOR) && 
-	(graphPtr->plotRelief != TK_RELIEF_SOLID)) {
-	/* Leave room for axis baseline and padding */
-	y += axisPtr->lineWidth + 2;
-    }
-
-    if (axisPtr->flags & AXIS_SHOWTICKS) {
-	unsigned int pad;
-	unsigned int i, nLabels, nTicks;
-	unsigned int maxWidth, maxHeight;
-
-	SweepTicks(axisPtr);
-	
-	nTicks = 0;
-	if (axisPtr->t1Ptr != NULL) {
-	    nTicks = axisPtr->t1Ptr->nTicks;
-	}
-	assert(nTicks <= MAXTICKS);
-	
-	maxHeight = maxWidth = 0;
-	nLabels = 0;
-	for (i = 0; i < nTicks; i++) {
-	    TickLabel *labelPtr;
-	    double x, x2;
-	    unsigned int lw, lh;	/* Label width and height. */
-
-	    x2 = x = axisPtr->t1Ptr->values[i];
-	    if (axisPtr->labelOffset) {
-		x2 += axisPtr->majorSweep.step * 0.5;
-	    }
-	    if (!InRange(x2, &axisPtr->axisRange)) {
-		continue;
-	    }
-	    labelPtr = MakeLabel(axisPtr, x);
-	    Blt_Chain_Append(axisPtr->tickLabels, labelPtr);
-	    nLabels++;
-	    /* 
-	     * Get the dimensions of each tick label.  Remember tick labels
-	     * can be multi-lined and/or rotated.
-	     */
-	    Blt_GetTextExtents(axisPtr->tickFont, 0, labelPtr->string, -1, 
-		&lw, &lh);
-	    labelPtr->width  = lw;
-	    labelPtr->height = lh;
-
-	    if (axisPtr->tickAngle != 0.0f) {
-		double rlw, rlh;	/* Rotated label width and height. */
-		Blt_GetBoundingBox(lw, lh, axisPtr->tickAngle, &rlw, &rlh, NULL);
-		lw = ROUND(rlw), lh = ROUND(rlh);
-	    }
-	    if (maxWidth < lw) {
-		maxWidth = lw;
-	    }
-	    if (maxHeight < lh) {
-		maxHeight = lh;
-	    }
-	}
-	assert(nLabels <= nTicks);
-	
-	pad = 0;
-	if (axisPtr->flags & AXIS_EXTERIOR) {
-	    /* Because the axis cap style is "CapProjecting", we need to account
-	     * for an extra 1.5 linewidth at the end of each line.  */
-	    pad = ((axisPtr->lineWidth * 12) / 8);
-	}
-	if (AxisIsHorizontal(axisPtr)) {
-	    y += maxHeight + pad;
-	} else {
-	    y += maxWidth + pad;
-	    if (maxWidth > 0) {
-		y += 5;			/* Pad either size of label. */
-	    }  
-	}
-	y += 2 * AXIS_PAD_TITLE;
-	if ((axisPtr->lineWidth > 0) && (axisPtr->flags & AXIS_EXTERIOR)) {
-	    /* Distance from axis line to tick label. */
-	    y += axisPtr->tickLength;
-	}
-    }
-
-    if (axisPtr->title != NULL) {
-	if (axisPtr->titleAlternate) {
-	    if (y < axisPtr->titleHeight) {
-		y = axisPtr->titleHeight;
-	    }
-	} else {
-	    y += axisPtr->titleHeight + AXIS_PAD_TITLE;
-	}
-    }
-
-    /* Correct for orientation of the axis. */
-    if (AxisIsHorizontal(axisPtr)) {
-	axisPtr->height = y;
-    } else {
-	axisPtr->width = y;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetMarginGeometry --
- *
- *	Examines all the axes in the given margin and determines the area
- *	required to display them.
- *
- *	Note: For multiple axes, the titles are displayed in another
- *	      margin. So we must keep track of the widest title.
- *	
- * Results:
- *	Returns the width or height of the margin, depending if it runs
- *	horizontally along the graph or vertically.
- *
- * Side Effects:
- *	The area width and height set in the margin.  Note again that this may
- *	be corrected later (mulitple axes) to adjust for the longest title in
- *	another margin.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetMarginGeometry(Graph *graphPtr, Margin *marginPtr)
-{
-    Blt_ChainLink link;
-    unsigned int l, w, h;		/* Length, width, and height. */
-    int isHoriz;
-    unsigned int nVisible;
-
-    isHoriz = HORIZMARGIN(marginPtr);
-
-    /* Count the visible axes. */
-    nVisible = 0;
-    l = w = h = 0;
-    if (graphPtr->stackAxes) {
-	for (link = Blt_Chain_FirstLink(marginPtr->axes); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-	    
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (HIDE|AXIS_USE)) == AXIS_USE) {
-		nVisible++;
-		if (graphPtr->flags & GET_AXIS_GEOMETRY) {
-		    GetAxisGeometry(graphPtr, axisPtr);
-		}
-		if (isHoriz) {
-		    if (h < axisPtr->height) {
-			h = axisPtr->height;
-		    }
-		} else {
-		    if (w < axisPtr->width) {
-			w = axisPtr->width;
-		    }
-		}
-	    }
-	}
-    } else {
-	for (link = Blt_Chain_FirstLink(marginPtr->axes); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-	    
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (HIDE|AXIS_USE)) == AXIS_USE) {
-		nVisible++;
-		if (graphPtr->flags & GET_AXIS_GEOMETRY) {
-		    GetAxisGeometry(graphPtr, axisPtr);
-		}
-		if ((axisPtr->titleAlternate) && (l < axisPtr->titleWidth)) {
-		    l = axisPtr->titleWidth;
-		}
-		if (isHoriz) {
-		    h += axisPtr->height;
-		} else {
-		    w += axisPtr->width;
-		}
-	    }
-	}
-    }
-    /* Enforce a minimum size for margins. */
-    if (w < 3) {
-	w = 3;
-    }
-    if (h < 3) {
-	h = 3;
-    }
-    marginPtr->nAxes = nVisible;
-    marginPtr->axesTitleLength = l;
-    marginPtr->width = w;
-    marginPtr->height = h;
-    marginPtr->axesOffset = (isHoriz) ? h : w;
-    return marginPtr->axesOffset;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LayoutGraph --
- *
- *	Calculate the layout of the graph.  Based upon the data, axis limits,
- *	X and Y titles, and title height, determine the cavity left which is
- *	the plotting surface.  The first step get the data and axis limits for
- *	calculating the space needed for the top, bottom, left, and right
- *	margins.
- *
- * 	1) The LEFT margin is the area from the left border to the Y axis 
- *	   (not including ticks). It composes the border width, the width an 
- *	   optional Y axis label and its padding, and the tick numeric labels. 
- *	   The Y axis label is rotated 90 degrees so that the width is the 
- *	   font height.
- *
- * 	2) The RIGHT margin is the area from the end of the graph
- *	   to the right window border. It composes the border width,
- *	   some padding, the font height (this may be dubious. It
- *	   appears to provide a more even border), the max of the
- *	   legend width and 1/2 max X tick number. This last part is
- *	   so that the last tick label is not clipped.
- *
- *           Window Width
- *      ___________________________________________________________
- *      |          |                               |               |
- *      |          |   TOP  height of title        |               |
- *      |          |                               |               |
- *      |          |           x2 title            |               |
- *      |          |                               |               |
- *      |          |        height of x2-axis      |               |
- *      |__________|_______________________________|_______________|  W
- *      |          | -plotpady                     |               |  i
- *      |__________|_______________________________|_______________|  n
- *      |          | top                   right   |               |  d
- *      |          |                               |               |  o
- *      |   LEFT   |                               |     RIGHT     |  w
- *      |          |                               |               |
- *      | y        |     Free area = 104%          |      y2       |  H
- *      |          |     Plotting surface = 100%   |               |  e
- *      | t        |     Tick length = 2 + 2%      |      t        |  i
- *      | i        |                               |      i        |  g
- *      | t        |                               |      t  legend|  h
- *      | l        |                               |      l   width|  t
- *      | e        |                               |      e        |
- *      |    height|                               |height         |
- *      |       of |                               | of            |
- *      |    y-axis|                               |y2-axis        |
- *      |          |                               |               |
- *      |          |origin 0,0                     |               |
- *      |__________|_left_________________bottom___|_______________|
- *      |          |-plotpady                      |               |
- *      |__________|_______________________________|_______________|
- *      |          | (xoffset, yoffset)            |               |
- *      |          |                               |               |
- *      |          |       height of x-axis        |               |
- *      |          |                               |               |
- *      |          |   BOTTOM   x title            |               |
- *      |__________|_______________________________|_______________|
- *
- * 3) The TOP margin is the area from the top window border to the top
- *    of the graph. It composes the border width, twice the height of
- *    the title font (if one is given) and some padding between the
- *    title.
- *
- * 4) The BOTTOM margin is area from the bottom window border to the
- *    X axis (not including ticks). It composes the border width, the height
- *    an optional X axis label and its padding, the height of the font
- *    of the tick labels.
- *
- * The plotting area is between the margins which includes the X and Y axes
- * including the ticks but not the tick numeric labels. The length of the
- * ticks and its padding is 5% of the entire plotting area.  Hence the entire
- * plotting area is scaled as 105% of the width and height of the area.
- *
- * The axis labels, ticks labels, title, and legend may or may not be
- * displayed which must be taken into account.
- *
- * if reqWidth > 0 : set outer size
- * if reqPlotWidth > 0 : set plot size
- *---------------------------------------------------------------------------
- */
-void
-Blt_LayoutGraph(Graph *graphPtr)
-{
-    unsigned int titleY;
-    unsigned int left, right, top, bottom;
-    unsigned int plotWidth, plotHeight;
-    unsigned int inset, inset2;
-    int width, height;
-
-    width = graphPtr->width;
-    height = graphPtr->height;
-
-    /* 
-     * Step 1:  Compute the amount of space needed to display the axes
-     *		associated with each margin.  They can be overridden by 
-     *		-leftmargin, -rightmargin, -bottommargin, and -topmargin
-     *		graph options, respectively.
-     */
-    left   = GetMarginGeometry(graphPtr, &graphPtr->leftMargin);
-    right  = GetMarginGeometry(graphPtr, &graphPtr->rightMargin);
-    top    = GetMarginGeometry(graphPtr, &graphPtr->topMargin);
-    bottom = GetMarginGeometry(graphPtr, &graphPtr->bottomMargin);
-    if (graphPtr->leftMargin.reqSize > 0) {
-	left = graphPtr->leftMargin.reqSize;
-    }
-    if (graphPtr->rightMargin.reqSize > 0) {
-	right = graphPtr->rightMargin.reqSize;
-    }
-    if (graphPtr->topMargin.reqSize > 0) {
-	top = graphPtr->topMargin.reqSize;
-    }
-    if (graphPtr->bottomMargin.reqSize > 0) {
-	bottom = graphPtr->bottomMargin.reqSize;
-    }
-
-    /* 
-     * Step 2:  Add the graph title height to the top margin. 
-     */
-    if (graphPtr->title != NULL) {
-	top += graphPtr->titleHeight + 6;
-    }
-    inset = (graphPtr->inset + graphPtr->plotBW);
-    inset2 = 2 * inset;
-
-    /* 
-     * Step 3: Estimate the size of the plot area from the remaining
-     *	       space.  This may be overridden by the -plotwidth and
-     *	       -plotheight graph options.  We use this to compute the
-     *	       size of the legend. 
-     */
-    if (width == 0) {
-	width = 400;
-    }
-    if (height == 0) {
-	height = 400;
-    }
-    plotWidth  = (graphPtr->reqPlotWidth > 0) ? graphPtr->reqPlotWidth :
-	width - (inset2 + left + right);	/* Plot width. */
-    plotHeight = (graphPtr->reqPlotHeight > 0) ? graphPtr->reqPlotHeight : 
-	height - (inset2 + top + bottom);  /* Plot height. */
-    Blt_MapLegend(graphPtr, plotWidth, plotHeight);
-
-    /* 
-     * Step 2:  Add the legend to the appropiate margin. 
-     */
-    if (!Blt_Legend_IsHidden(graphPtr)) {
-	switch (Blt_Legend_Site(graphPtr)) {
-	case LEGEND_RIGHT:
-	    right += Blt_Legend_Width(graphPtr) + 2;
-	    break;
-	case LEGEND_LEFT:
-	    left += Blt_Legend_Width(graphPtr) + 2;
-	    break;
-	case LEGEND_TOP:
-	    top += Blt_Legend_Height(graphPtr) + 2;
-	    break;
-	case LEGEND_BOTTOM:
-	    bottom += Blt_Legend_Height(graphPtr) + 2;
-	    break;
-	case LEGEND_XY:
-	case LEGEND_PLOT:
-	case LEGEND_WINDOW:
-	    /* Do nothing. */
-	    break;
-	}
-    }
-
-    /* 
-     * Recompute the plotarea or graph size, now accounting for the legend. 
-     */
-    if (graphPtr->reqPlotWidth == 0) {
-	plotWidth = width  - (inset2 + left + right);
-	if (plotWidth < 1) {
-	    plotWidth = 1;
-	}
-    }
-    if (graphPtr->reqPlotHeight == 0) {
-	plotHeight = height - (inset2 + top + bottom);
-	if (plotHeight < 1) {
-	    plotHeight = 1;
-	}
-    }
-
-    /*
-     * Step 5: If necessary, correct for the requested plot area aspect
-     *	       ratio.
-     */
-    if ((graphPtr->reqPlotWidth == 0) && (graphPtr->reqPlotHeight == 0) && 
-	(graphPtr->aspect > 0.0f)) {
-	float ratio;
-
-	/* 
-	 * Shrink one dimension of the plotarea to fit the requested
-	 * width/height aspect ratio.
-	 */
-	ratio = (float)plotWidth / (float)plotHeight;
-	if (ratio > graphPtr->aspect) {
-	    int scaledWidth;
-
-	    /* Shrink the width. */
-	    scaledWidth = (int)(plotHeight * graphPtr->aspect);
-	    if (scaledWidth < 1) {
-		scaledWidth = 1;
-	    }
-	    /* Add the difference to the right margin. */
-	    /* CHECK THIS: w = scaledWidth; */
-	    right += (plotWidth - scaledWidth);
-	} else {
-	    int scaledHeight;
-
-	    /* Shrink the height. */
-	    scaledHeight = (int)(plotWidth / graphPtr->aspect);
-	    if (scaledHeight < 1) {
-		scaledHeight = 1;
-	    }
-	    /* Add the difference to the top margin. */
-	    /* CHECK THIS: h = scaledHeight; */
-	    top += (plotHeight - scaledHeight); 
-	}
-    }
-
-    /* 
-     * Step 6: If there's multiple axes in a margin, the axis titles will be
-     *	       displayed in the adjoining margins.  Make sure there's room 
-     *	       for the longest axis titles.
-     */
-
-    if (top < graphPtr->leftMargin.axesTitleLength) {
-	top = graphPtr->leftMargin.axesTitleLength;
-    }
-    if (right < graphPtr->bottomMargin.axesTitleLength) {
-	right = graphPtr->bottomMargin.axesTitleLength;
-    }
-    if (top < graphPtr->rightMargin.axesTitleLength) {
-	top = graphPtr->rightMargin.axesTitleLength;
-    }
-    if (right < graphPtr->topMargin.axesTitleLength) {
-	right = graphPtr->topMargin.axesTitleLength;
-    }
-
-    /* 
-     * Step 7: Override calculated values with requested margin sizes.
-     */
-    if (graphPtr->leftMargin.reqSize > 0) {
-	left = graphPtr->leftMargin.reqSize;
-    }
-    if (graphPtr->rightMargin.reqSize > 0) {
-	right = graphPtr->rightMargin.reqSize;
-    }
-    if (graphPtr->topMargin.reqSize > 0) {
-	top = graphPtr->topMargin.reqSize;
-    }
-    if (graphPtr->bottomMargin.reqSize > 0) {
-	bottom = graphPtr->bottomMargin.reqSize;
-    }
-    if (graphPtr->reqPlotWidth > 0) {	
-	int w;
-
-	/* 
-	 * Width of plotarea is constained.  If there's extra space, add it to
-	 * th left and/or right margins.  If there's too little, grow the
-	 * graph width to accomodate it.
-	 */
-	w = plotWidth + inset2 + left + right;
-	if (width > w) {		/* Extra space in window. */
-	    int extra;
-
-	    extra = (width - w) / 2;
-	    if (graphPtr->leftMargin.reqSize == 0) { 
-		left += extra;
-		if (graphPtr->rightMargin.reqSize == 0) { 
-		    right += extra;
-		} else {
-		    left += extra;
-		}
-	    } else if (graphPtr->rightMargin.reqSize == 0) {
-		right += extra + extra;
-	    }
-	} else if (width < w) {
-	    width = w;
-	}
-    } 
-    if (graphPtr->reqPlotHeight > 0) {	/* Constrain the plotarea height. */
-	int h;
-
-	/* 
-	 * Height of plotarea is constained.  If there's extra space, 
-	 * add it to th top and/or bottom margins.  If there's too little,
-	 * grow the graph height to accomodate it.
-	 */
-	h = plotHeight + inset2 + top + bottom;
-	if (height > h) {		/* Extra space in window. */
-	    int extra;
-
-	    extra = (height - h) / 2;
-	    if (graphPtr->topMargin.reqSize == 0) { 
-		top += extra;
-		if (graphPtr->bottomMargin.reqSize == 0) { 
-		    bottom += extra;
-		} else {
-		    top += extra;
-		}
-	    } else if (graphPtr->bottomMargin.reqSize == 0) {
-		bottom += extra + extra;
-	    }
-	} else if (height < h) {
-	    height = h;
-	}
-    }	
-    graphPtr->width  = width;
-    graphPtr->height = height;
-    graphPtr->left   = left + inset;
-    graphPtr->top    = top + inset;
-    graphPtr->right  = width - right - inset;
-    graphPtr->bottom = height - bottom - inset;
-
-    graphPtr->leftMargin.width    = left   + graphPtr->inset;
-    graphPtr->rightMargin.width   = right  + graphPtr->inset;
-    graphPtr->topMargin.height    = top    + graphPtr->inset;
-    graphPtr->bottomMargin.height = bottom + graphPtr->inset;
-	    
-    graphPtr->vOffset = graphPtr->top + graphPtr->padTop;
-    graphPtr->vRange  = plotHeight - PADDING(graphPtr->yPad);
-    graphPtr->hOffset = graphPtr->left + graphPtr->padLeft;
-    graphPtr->hRange  = plotWidth  - PADDING(graphPtr->xPad);
-
-    if (graphPtr->vRange < 1) {
-	graphPtr->vRange = 1;
-    }
-    if (graphPtr->hRange < 1) {
-	graphPtr->hRange = 1;
-    }
-    graphPtr->hScale = 1.0f / (float)graphPtr->hRange;
-    graphPtr->vScale = 1.0f / (float)graphPtr->vRange;
-
-    /*
-     * Calculate the placement of the graph title so it is centered within the
-     * space provided for it in the top margin
-     */
-    titleY = graphPtr->titleHeight;
-    graphPtr->titleY = 3 + graphPtr->inset;
-    graphPtr->titleX = (graphPtr->right + graphPtr->left) / 2;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureAxis --
- *
- *	Configures axis attributes (font, line width, label, etc).
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *	Axis layout is deferred until the height and width of the window are
- *	known.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureAxis(Axis *axisPtr)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    float angle;
-
-    /* Check the requested axis limits. Can't allow -min to be greater than
-     * -max.  Do this regardless of -checklimits option. We want to always 
-     * detect when the user has zoomed in beyond the precision of the data.*/
-    if (((DEFINED(axisPtr->reqMin)) && (DEFINED(axisPtr->reqMax))) &&
-	(axisPtr->reqMin >= axisPtr->reqMax)) {
-	char msg[200];
-	sprintf_s(msg, 200, 
-		  "impossible axis limits (-min %g >= -max %g) for \"%s\"",
-		  axisPtr->reqMin, axisPtr->reqMax, axisPtr->obj.name);
-	Tcl_AppendResult(graphPtr->interp, msg, (char *)NULL);
-	return TCL_ERROR;
-    }
-    axisPtr->scrollMin = axisPtr->reqScrollMin;
-    axisPtr->scrollMax = axisPtr->reqScrollMax;
-    if (axisPtr->logScale) {
-	if (axisPtr->flags & AXIS_CHECK_LIMITS) {
-	    /* Check that the logscale limits are positive.  */
-	    if ((DEFINED(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
-		Tcl_AppendResult(graphPtr->interp,"bad logscale -min limit \"", 
-			Blt_Dtoa(graphPtr->interp, axisPtr->reqMin), 
-			"\" for axis \"", axisPtr->obj.name, "\"", 
-			(char *)NULL);
-		return TCL_ERROR;
-	    }
-	}
-	if ((DEFINED(axisPtr->scrollMin)) && (axisPtr->scrollMin <= 0.0)) {
-	    axisPtr->scrollMin = Blt_NaN();
-	}
-	if ((DEFINED(axisPtr->scrollMax)) && (axisPtr->scrollMax <= 0.0)) {
-	    axisPtr->scrollMax = Blt_NaN();
-	}
-    }
-    if (axisPtr->reqNumMajorTicks <= 0) {
-	axisPtr->reqNumMajorTicks = 4;
-    }
-    angle = FMOD(axisPtr->tickAngle, 360.0);
-    if (angle < 0.0f) {
-	angle += 360.0f;
-    }
-    if (axisPtr->normalBg != NULL) {
-	Blt_SetBackgroundChangedProc(axisPtr->normalBg, Blt_UpdateGraph, 
-		graphPtr);
-    }
-    if (axisPtr->activeBg != NULL) {
-	Blt_SetBackgroundChangedProc(axisPtr->activeBg, Blt_UpdateGraph, 
-		graphPtr);
-    }
-    axisPtr->tickAngle = angle;
-    ResetTextStyles(axisPtr);
-
-    axisPtr->titleWidth = axisPtr->titleHeight = 0;
-    if (axisPtr->title != NULL) {
-	unsigned int w, h;
-
-	Blt_GetTextExtents(axisPtr->titleFont, 0, axisPtr->title, -1, &w, &h);
-	axisPtr->titleWidth = (unsigned short int)w;
-	axisPtr->titleHeight = (unsigned short int)h;
-    }
-
-    /* 
-     * Don't bother to check what configuration options have changed.  Almost
-     * every option changes the size of the plotting area (except for -color
-     * and -titlecolor), requiring the graph and its contents to be completely
-     * redrawn.
-     *
-     * Recompute the scale and offset of the axis in case -min, -max options
-     * have changed.
-     */
-    graphPtr->flags |= REDRAW_WORLD;
-    graphPtr->flags |= (MAP_WORLD | RESET_AXES | CACHE_DIRTY);
-    axisPtr->flags |= DIRTY;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewAxis --
- *
- *	Create and initialize a structure containing information to display
- *	a graph axis.
- *
- * Results:
- *	The return value is a pointer to an Axis structure.
- *
- *---------------------------------------------------------------------------
- */
-static Axis *
-NewAxis(Graph *graphPtr, const char *name, int margin)
-{
-    Axis *axisPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    if (name[0] == '-') {
-	Tcl_AppendResult(graphPtr->interp, "name of axis \"", name, 
-			 "\" can't start with a '-'", (char *)NULL);
-	return NULL;
-    }
-    hPtr = Blt_CreateHashEntry(&graphPtr->axes.table, name, &isNew);
-    if (!isNew) {
-	axisPtr = Blt_GetHashValue(hPtr);
-	if ((axisPtr->flags & DELETE_PENDING) == 0) {
-	    Tcl_AppendResult(graphPtr->interp, "axis \"", name,
-		"\" already exists in \"", Tk_PathName(graphPtr->tkwin), "\"",
-		(char *)NULL);
-	    return NULL;
-	}
-	axisPtr->flags &= ~DELETE_PENDING;
-    } else {
-	axisPtr = Blt_Calloc(1, sizeof(Axis));
-	if (axisPtr == NULL) {
-	    Tcl_AppendResult(graphPtr->interp, 
-		"can't allocate memory for axis \"", name, "\"", (char *)NULL);
-	    return NULL;
-	}
-	axisPtr->obj.name = Blt_AssertStrdup(name);
-	axisPtr->hashPtr = hPtr;
-	Blt_GraphSetObjectClass(&axisPtr->obj, CID_NONE);
-	axisPtr->obj.graphPtr = graphPtr;
-	axisPtr->looseMin = axisPtr->looseMax = AXIS_TIGHT;
-	axisPtr->reqNumMinorTicks = 2;
-	axisPtr->reqNumMajorTicks = 4 /*10*/;
-	axisPtr->margin = MARGIN_NONE;
-	axisPtr->tickLength = 8;
-	axisPtr->scrollUnits = 10;
-	axisPtr->reqMin = axisPtr->reqMax = Blt_NaN();
-	axisPtr->reqScrollMin = axisPtr->reqScrollMax = Blt_NaN();
-	axisPtr->flags = (AXIS_SHOWTICKS|AXIS_GRID_MINOR|AXIS_AUTO_MAJOR|
-			  AXIS_AUTO_MINOR | AXIS_EXTERIOR);
-	if (graphPtr->classId == CID_ELEM_BAR) {
-	    axisPtr->flags |= AXIS_GRID;
-	}
-	if ((graphPtr->classId == CID_ELEM_BAR) && 
-	    ((margin == MARGIN_TOP) || (margin == MARGIN_BOTTOM))) {
-	    axisPtr->reqStep = 1.0;
-	    axisPtr->reqNumMinorTicks = 0;
-	} 
-	if ((margin == MARGIN_RIGHT) || (margin == MARGIN_TOP)) {
-	    axisPtr->flags |= HIDE;
-	}
-	Blt_Ts_InitStyle(axisPtr->limitsTextStyle);
-	axisPtr->tickLabels = Blt_Chain_Create();
-	axisPtr->lineWidth = 1;
-	Blt_SetHashValue(hPtr, axisPtr);
-    }
-    return axisPtr;
-}
-
-static int
-GetAxisFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr, 
-	       Axis **axisPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    const char *name;
-
-    *axisPtrPtr = NULL;
-    name = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->axes.table, name);
-    if (hPtr != NULL) {
-	Axis *axisPtr;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	if ((axisPtr->flags & DELETE_PENDING) == 0) {
-	    *axisPtrPtr = axisPtr;
-	    return TCL_OK;
-	}
-    }
-    if (interp != NULL) {
-	Tcl_AppendResult(interp, "can't find axis \"", name, "\" in \"", 
-		Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-    }
-    return TCL_ERROR;
-}
-
-static int
-GetAxisByClass(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr,
-	       ClassId classId, Axis **axisPtrPtr)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objPtr, &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (classId != CID_NONE) {
-	if ((axisPtr->refCount == 0) || (axisPtr->obj.classId == CID_NONE)) {
-	    /* Set the axis type on the first use of it. */
-	    Blt_GraphSetObjectClass(&axisPtr->obj, classId);
-	} else if (axisPtr->obj.classId != classId) {
-	    if (interp != NULL) {
-  	        Tcl_AppendResult(interp, "axis \"", Tcl_GetString(objPtr),
-		    "\" is already in use on an opposite ", 
-			axisPtr->obj.className, "-axis", 
-			(char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	axisPtr->refCount++;
-    }
-    *axisPtrPtr = axisPtr;
-    return TCL_OK;
-}
-
-void
-Blt_DestroyAxes(Graph *graphPtr)
-{
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Axis *axisPtr;
-	    
-	    axisPtr = Blt_GetHashValue(hPtr);
-	    axisPtr->hashPtr = NULL;
-	    DestroyAxis(axisPtr);
-	}
-    }
-    Blt_DeleteHashTable(&graphPtr->axes.table);
-    {
-	int i;
-	
-	for (i = 0; i < 4; i++) {
-	    Blt_Chain_Destroy(graphPtr->axisChain[i]);
-	}
-    }
-    Blt_DeleteHashTable(&graphPtr->axes.tagTable);
-    Blt_Chain_Destroy(graphPtr->axes.displayList);
-}
-
-void
-Blt_ConfigureAxes(Graph *graphPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-	
-	axisPtr = Blt_GetHashValue(hPtr);
-	ConfigureAxis(axisPtr);
-    }
-}
-
-int
-Blt_DefaultAxes(Graph *graphPtr)
-{
-    int i;
-    int flags;
-
-    flags = Blt_GraphType(graphPtr);
-    for (i = 0; i < 4; i++) {
-	Blt_Chain chain;
-	Axis *axisPtr;
-
-	chain = Blt_Chain_Create();
-	graphPtr->axisChain[i] = chain;
-
-	/* Create a default axis for each chain. */
-	axisPtr = NewAxis(graphPtr, axisNames[i].name, i);
-	if (axisPtr == NULL) {
-	    return TCL_ERROR;
-	}
-	axisPtr->refCount = 1;	/* Default axes are assumed in use. */
-	axisPtr->margin = i;
-	axisPtr->flags |= AXIS_USE;
-	Blt_GraphSetObjectClass(&axisPtr->obj, axisNames[i].classId);
-	/*
-	 * Blt_ConfigureComponentFromObj creates a temporary child window 
-	 * by the name of the axis.  It's used so that the Tk routines
-	 * that access the X resource database can describe a single 
-	 * component and not the entire graph.
-	 */
- 	if (Blt_ConfigureComponentFromObj(graphPtr->interp, graphPtr->tkwin,
-		axisPtr->obj.name, "Axis", configSpecs, 0, (Tcl_Obj **)NULL,
-		(char *)axisPtr, flags) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (ConfigureAxis(axisPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	axisPtr->link = Blt_Chain_Append(chain, axisPtr);
-	axisPtr->chain = chain;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- * 	Activates the axis, drawing the axis with its -activeforeground,
- *	-activebackgound, -activerelief attributes.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new axis attributes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    const char *string;
-
-    string = Tcl_GetString(objv[2]);
-    if (string[0] == 'a') {
-	axisPtr->flags |= ACTIVE;
-    } else {
-	axisPtr->flags &= ~ACTIVE;
-    }
-    if ((axisPtr->flags & (AXIS_USE|HIDE)) == AXIS_USE) {
-	graphPtr->flags |= DRAW_MARGINS | CACHE_DIRTY;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    return TCL_OK;
-}
-
-/*-------------------------------------------------------------------------------
- *
- * BindOp --
- *
- *    .g axis bind axisName sequence command
- *
- *---------------------------------------------------------------------------
- */
-static int
-BindOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->bindTable,
-          Blt_MakeAxisTag(graphPtr, axisPtr->obj.name), objc, objv);
-}
-          
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Queries axis attributes (font, line width, label, etc).
- *
- * Results:
- *	Return value is a standard TCL result.  If querying configuration
- *	values, interp->result will contain the results.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-CgetOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    return Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, configSpecs,
-	(char *)axisPtr, objv[0], Blt_GraphType(graphPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Queries or resets axis attributes (font, line width, label, etc).
- *
- * Results:
- *	Return value is a standard TCL result.  If querying configuration
- *	values, interp->result will contain the results.
- *
- * Side Effects:
- *	Axis resources are possibly allocated (GC, font). Axis layout is
- *	deferred until the height and width of the window are known.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    int flags;
-
-    flags = BLT_CONFIG_OBJV_ONLY | Blt_GraphType(graphPtr);
-    if (objc == 0) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)axisPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)axisPtr, objv[0], flags);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-	objc, objv, (char *)axisPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (ConfigureAxis(axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (axisPtr->flags & AXIS_USE) {
-	if (!Blt_ConfigModified(configSpecs, "-*color", "-background", "-bg",
-				(char *)NULL)) {
-	    graphPtr->flags |= CACHE_DIRTY;
-	}
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LimitsOp --
- *
- *	This procedure returns a string representing the axis limits
- *	of the graph.  The format of the string is { left top right bottom}.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is
- *	a list of the graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-LimitsOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    Tcl_Obj *listObjPtr;
-    double min, max;
-
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    if (axisPtr->logScale) {
-	min = EXP10(axisPtr->axisRange.min);
-	max = EXP10(axisPtr->axisRange.max);
-    } else {
-	min = axisPtr->axisRange.min;
-	max = axisPtr->axisRange.max;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(min));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(max));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvTransformOp --
- *
- *	Maps the given window coordinate into an axis-value.
- *
- * Results:
- *	Returns a standard TCL result.  interp->result contains
- *	the axis value. If an error occurred, TCL_ERROR is returned
- *	and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InvTransformOp(Tcl_Interp *interp, Axis *axisPtr, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    double y;				/* Real graph coordinate */
-    int sy;				/* Integer window coordinate*/
-
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    if (Tcl_GetIntFromObj(interp, objv[0], &sy) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Is the axis vertical or horizontal?
-     *
-     * Check the site where the axis was positioned.  If the axis is
-     * virtual, all we have to go on is how it was mapped to an
-     * element (using either -mapx or -mapy options).  
-     */
-    if (AxisIsHorizontal(axisPtr)) {
-	y = Blt_InvHMap(axisPtr, (double)sy);
-    } else {
-	y = Blt_InvVMap(axisPtr, (double)sy);
-    }
-    Tcl_SetDoubleObj(Tcl_GetObjResult(interp), y);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * MarginOp --
- *
- *	This procedure returns a string representing the margin the axis
- *	resides.  The format of the string is { left top right bottom}.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is
- *	a list of the graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MarginOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    const char *marginName;
-
-    marginName = "";
-    if (axisPtr->flags & AXIS_USE) {
-	marginName = axisNames[axisPtr->margin].name;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), marginName, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TransformOp --
- *
- *	Maps the given axis-value to a window coordinate.
- *
- * Results:
- *	Returns a standard TCL result.  interp->result contains
- *	the window coordinate. If an error occurred, TCL_ERROR
- *	is returned and interp->result will contain an error
- *	message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TransformOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-    double x;
-
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    if (Blt_ExprDoubleFromObj(interp, objv[0], &x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (AxisIsHorizontal(axisPtr)) {
-	x = Blt_HMap(axisPtr, x);
-    } else {
-	x = Blt_VMap(axisPtr, x);
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), (int)x);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeOp --
- *
- *	This procedure returns a string representing the margin the axis
- *	resides.  The format of the string is "x", "y", or "".
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is the type of 
- *	axis.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    const char *typeName;
-
-    typeName = "";
-    if (axisPtr->flags & AXIS_USE) {
-	if (axisNames[axisPtr->margin].classId == CID_AXIS_X) {
-	    typeName = "x";
-	} else if (axisNames[axisPtr->margin].classId == CID_AXIS_Y) {
-	    typeName = "y";
-	}
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), typeName, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UseOp --
- *
- *	Sets the default axis for a margin.
- *
- * Results:
- *	A standard TCL result.  If the named axis doesn't exist
- *	an error message is put in interp->result.
- *
- * .g xaxis use "abc def gah"
- * .g xaxis use [lappend abc [.g axis use]]
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-UseOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr = (Graph *)axisPtr;
-    Blt_Chain chain;
-    Blt_ChainLink link;
-    Tcl_Obj **axisObjv;
-    ClassId classId;
-    int axisObjc;
-    int i;
-
-    chain = graphPtr->margins[lastMargin].axes;
-    if (objc == 0) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(axisPtr->obj.name, -1));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if ((lastMargin == MARGIN_BOTTOM) || (lastMargin == MARGIN_TOP)) {
-	classId = (graphPtr->inverted) ? CID_AXIS_Y : CID_AXIS_X;
-    } else {
-	classId = (graphPtr->inverted) ? CID_AXIS_X : CID_AXIS_Y;
-    }
-    if (Tcl_ListObjGetElements(interp, objv[0], &axisObjc, &axisObjv) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (link = Blt_Chain_FirstLink(chain); link!= NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Axis *axisPtr;
-
-	axisPtr = Blt_Chain_GetValue(link);
-	axisPtr->link = NULL;
-	axisPtr->flags &= ~AXIS_USE;
-	/* Clear the axis type if it's not currently used.*/
-	if (axisPtr->refCount == 0) {
-	    Blt_GraphSetObjectClass(&axisPtr->obj, CID_NONE);
-	}
-    }
-    Blt_Chain_Reset(chain);
-    for (i = 0; i < axisObjc; i++) {
-	Axis *axisPtr;
-
-	if (GetAxisFromObj(interp, graphPtr, axisObjv[i], &axisPtr) != TCL_OK){
-	    return TCL_ERROR;
-	}
-	if (axisPtr->obj.classId == CID_NONE) {
-	    Blt_GraphSetObjectClass(&axisPtr->obj, classId);
-	} else if (axisPtr->obj.classId != classId) {
-	    Tcl_AppendResult(interp, "wrong type axis \"", 
-		axisPtr->obj.name, "\": can't use ", 
-		axisPtr->obj.className, " type axis.", (char *)NULL); 
-	    return TCL_ERROR;
-	}
-	if (axisPtr->link != NULL) {
-	    /* Move the axis from the old margin's "use" list to the new. */
-	    Blt_Chain_UnlinkLink(axisPtr->chain, axisPtr->link);
-	    Blt_Chain_AppendLink(chain, axisPtr->link);
-	} else {
-	    axisPtr->link = Blt_Chain_Append(chain, axisPtr);
-	}
-	axisPtr->chain = chain;
-	axisPtr->flags |= AXIS_USE;
-    }
-    graphPtr->flags |= (GET_AXIS_GEOMETRY | LAYOUT_NEEDED | RESET_AXES);
-    /* When any axis changes, we need to layout the entire graph.  */
-    graphPtr->flags |= (MAP_WORLD | REDRAW_WORLD);
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-static int
-ViewOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
-{
-    Graph *graphPtr;
-    double axisOffset, axisScale;
-    double fract;
-    double viewMin, viewMax, worldMin, worldMax;
-    double viewWidth, worldWidth;
-
-    graphPtr = axisPtr->obj.graphPtr;
-    worldMin = axisPtr->valueRange.min;
-    worldMax = axisPtr->valueRange.max;
-    /* Override data dimensions with user-selected limits. */
-    if (DEFINED(axisPtr->scrollMin)) {
-	worldMin = axisPtr->scrollMin;
-    }
-    if (DEFINED(axisPtr->scrollMax)) {
-	worldMax = axisPtr->scrollMax;
-    }
-    viewMin = axisPtr->min;
-    viewMax = axisPtr->max;
-    /* Bound the view within scroll region. */ 
-    if (viewMin < worldMin) {
-	viewMin = worldMin;
-    } 
-    if (viewMax > worldMax) {
-	viewMax = worldMax;
-    }
-    if (axisPtr->logScale) {
-	worldMin = log10(worldMin);
-	worldMax = log10(worldMax);
-	viewMin  = log10(viewMin);
-	viewMax  = log10(viewMax);
-    }
-    worldWidth = worldMax - worldMin;
-    viewWidth  = viewMax - viewMin;
-
-    /* Unlike horizontal axes, vertical axis values run opposite of the
-     * scrollbar first/last values.  So instead of pushing the axis minimum
-     * around, we move the maximum instead. */
-    if (AxisIsHorizontal(axisPtr) != axisPtr->descending) {
-	axisOffset  = viewMin - worldMin;
-	axisScale = graphPtr->hScale;
-    } else {
-	axisOffset  = worldMax - viewMax;
-	axisScale = graphPtr->vScale;
-    }
-    if (objc == 4) {
-	Tcl_Obj *listObjPtr;
-	double first, last;
-
-	first = Clamp(axisOffset / worldWidth);
-	last = Clamp((axisOffset + viewWidth) / worldWidth);
-	listObjPtr = Tcl_NewListObj(0, NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(first));
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(last));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    fract = axisOffset / worldWidth;
-    if (GetAxisScrollInfo(interp, objc, objv, &fract, 
-	viewWidth / worldWidth, axisPtr->scrollUnits, axisScale) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (AxisIsHorizontal(axisPtr) != axisPtr->descending) {
-	axisPtr->reqMin = (fract * worldWidth) + worldMin;
-	axisPtr->reqMax = axisPtr->reqMin + viewWidth;
-    } else {
-	axisPtr->reqMax = worldMax - (fract * worldWidth);
-	axisPtr->reqMin = axisPtr->reqMax - viewWidth;
-    }
-    if (axisPtr->logScale) {
-	axisPtr->reqMin = EXP10(axisPtr->reqMin);
-	axisPtr->reqMax = EXP10(axisPtr->reqMax);
-    }
-    graphPtr->flags |= (GET_AXIS_GEOMETRY | LAYOUT_NEEDED | RESET_AXES);
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisCreateOp --
- *
- *	Creates a new axis.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AxisCreateOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-    int flags;
-
-    axisPtr = NewAxis(graphPtr, Tcl_GetString(objv[3]), MARGIN_NONE);
-    if (axisPtr == NULL) {
-	return TCL_ERROR;
-    }
-    flags = Blt_GraphType(graphPtr);
-    if ((Blt_ConfigureComponentFromObj(interp, graphPtr->tkwin, 
-	axisPtr->obj.name, "Axis", configSpecs, objc - 4, objv + 4, 
-	(char *)axisPtr, flags) != TCL_OK) || 
-	(ConfigureAxis(axisPtr) != TCL_OK)) {
-	DestroyAxis(axisPtr);
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), axisPtr->obj.name, -1);
-    return TCL_OK;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * AxisActivateOp --
- *
- * 	Activates the axis, drawing the axis with its -activeforeground,
- *	-activebackgound, -activerelief attributes.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new axis attributes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisActivateOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return ActivateOp(interp, axisPtr, objc, objv);
-}
-
-
-/*-------------------------------------------------------------------------------
- *
- * AxisBindOp --
- *
- *    .g axis bind axisName sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AxisBindOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.tagTable, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    const char *tagName;
-	    Tcl_Obj *objPtr;
-
-	    tagName = Blt_GetHashKey(&graphPtr->axes.tagTable, hPtr);
-	    objPtr = Tcl_NewStringObj(tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->bindTable, 
-	Blt_MakeAxisTag(graphPtr, Tcl_GetString(objv[3])), objc - 4, objv + 4);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisCgetOp --
- *
- *	Queries axis attributes (font, line width, label, etc).
- *
- * Results:
- *	Return value is a standard TCL result.  If querying configuration
- *	values, interp->result will contain the results.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-AxisCgetOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return CgetOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisConfigureOp --
- *
- *	Queries or resets axis attributes (font, line width, label, etc).
- *
- * Results:
- *	Return value is a standard TCL result.  If querying configuration
- *	values, interp->result will contain the results.
- *
- * Side Effects:
- *	Axis resources are possibly allocated (GC, font). Axis layout is
- *	deferred until the height and width of the window are known.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisConfigureOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Tcl_Obj *const *options;
-    int i;
-    int nNames, nOpts;
-
-    /* Figure out where the option value pairs begin */
-    objc -= 3;
-    objv += 3;
-    for (i = 0; i < objc; i++) {
-	Axis *axisPtr;
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-	if (GetAxisFromObj(interp, graphPtr, objv[i], &axisPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    nNames = i;				/* Number of pen names specified */
-    nOpts = objc - i;			/* Number of options specified */
-    options = objv + i;			/* Start of options in objv  */
-
-    for (i = 0; i < nNames; i++) {
-	Axis *axisPtr;
-
-	if (GetAxisFromObj(interp, graphPtr, objv[i], &axisPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (ConfigureOp(interp, axisPtr, nOpts, options) != TCL_OK) {
-	    break;
-	}
-    }
-    if (i < nNames) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisDeleteOp --
- *
- *	Deletes one or more axes.  The actual removal may be deferred until the
- *	axis is no longer used by any element. The axis can't be referenced by
- *	its name any longer and it may be recreated.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AxisDeleteOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Axis *axisPtr;
-
-	if (GetAxisFromObj(interp, graphPtr, objv[i], &axisPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	axisPtr->flags |= DELETE_PENDING;
-	if (axisPtr->refCount == 0) {
-	    Tcl_EventuallyFree(axisPtr, FreeAxis);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisFocusOp --
- *
- * 	Activates the axis, drawing the axis with its -activeforeground,
- *	-activebackgound, -activerelief attributes.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new axis attributes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisFocusOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    if (objc > 3) {
-	Axis *axisPtr;
-	const char *string;
-
-	axisPtr = NULL;
-	string = Tcl_GetString(objv[3]);
-	if ((string[0] != '\0') && 
-	    (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	graphPtr->focusPtr = NULL;
-	if ((axisPtr != NULL) && 
-	    ((axisPtr->flags & (AXIS_USE|HIDE)) == AXIS_USE)) {
-	    graphPtr->focusPtr = axisPtr;
-	}
-	Blt_SetFocusItem(graphPtr->bindTable, graphPtr->focusPtr, NULL);
-    }
-    /* Return the name of the axis that has focus. */
-    if (graphPtr->focusPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		graphPtr->focusPtr->obj.name, -1);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisGetOp --
- *
- *    Returns the name of the picked axis (using the axis bind operation).
- *    Right now, the only name accepted is "current".
- *
- * Results:
- *    A standard TCL result.  The interpreter result will contain the name of
- *    the axis.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AxisGetOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    axisPtr = Blt_GetCurrentItem(graphPtr->bindTable);
-    /* Report only on axes. */
-    if ((axisPtr != NULL) && 
-	((axisPtr->obj.classId == CID_AXIS_X) || 
-	 (axisPtr->obj.classId == CID_AXIS_Y) || 
-	 (axisPtr->obj.classId == CID_NONE))) {
-	char c;
-	char  *string;
-
-	string = Tcl_GetString(objv[3]);
-	c = string[0];
-	if ((c == 'c') && (strcmp(string, "current") == 0)) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), axisPtr->obj.name,-1);
-	} else if ((c == 'd') && (strcmp(string, "detail") == 0)) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), axisPtr->detail, -1);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisInvTransformOp --
- *
- *	Maps the given window coordinate into an axis-value.
- *
- * Results:
- *	Returns a standard TCL result.  interp->result contains
- *	the axis value. If an error occurred, TCL_ERROR is returned
- *	and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisInvTransformOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-		   Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return InvTransformOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisLimitsOp --
- *
- *	This procedure returns a string representing the axis limits of the
- *	graph.  The format of the string is { left top right bottom}.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is
- *	a list of the graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisLimitsOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return LimitsOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisMarginOp --
- *
- *	This procedure returns a string representing the axis limits of the
- *	graph.  The format of the string is { left top right bottom}.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is
- *	a list of the graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisMarginOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return MarginOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisNamesOp --
- *
- *	Return a list of the names of all the axes.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static int
-AxisNamesOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_GetHashValue(hPtr);
-	    if (axisPtr->flags & DELETE_PENDING) {
-		continue;
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		     Tcl_NewStringObj(axisPtr->obj.name, -1));
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Axis *axisPtr;
-	    int i;
-
-	    axisPtr = Blt_GetHashValue(hPtr);
-	    for (i = 3; i < objc; i++) {
-		const char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch(axisPtr->obj.name, pattern)) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewStringObj(axisPtr->obj.name, -1));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisTransformOp --
- *
- *	Maps the given axis-value to a window coordinate.
- *
- * Results:
- *	Returns the window coordinate via interp->result.  If an error occurred,
- *	TCL_ERROR is returned and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisTransformOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TransformOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisMarginOp --
- *
- *	This procedure returns a string representing the axis limits of the
- *	graph.  The format of the string is { left top right bottom}.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is
- *	a list of the graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AxisTypeOp(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TypeOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-
-static int
-AxisViewOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Axis *axisPtr;
-
-    if (GetAxisFromObj(interp, graphPtr, objv[3], &axisPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return ViewOp(interp, axisPtr, objc - 4, objv + 4);
-}
-
-static Blt_OpSpec virtAxisOps[] = {
-    {"activate",     1, AxisActivateOp,     4, 4, "axisName"},
-    {"bind",         1, AxisBindOp,         3, 6, "axisName sequence command"},
-    {"cget",         2, AxisCgetOp,         5, 5, "axisName option"},
-    {"configure",    2, AxisConfigureOp,    4, 0, "axisName ?axisName?... "
-	"?option value?..."},
-    {"create",       2, AxisCreateOp,       4, 0, "axisName ?option value?..."},
-    {"deactivate",   3, AxisActivateOp,     4, 4, "axisName"},
-    {"delete",       3, AxisDeleteOp,       3, 0, "?axisName?..."},
-    {"focus",        1, AxisFocusOp,        3, 4, "?axisName?"},
-    {"get",          1, AxisGetOp,          4, 4, "name"},
-    {"invtransform", 1, AxisInvTransformOp, 5, 5, "axisName value"},
-    {"limits",       1, AxisLimitsOp,       4, 4, "axisName"},
-    {"margin",       1, AxisMarginOp,       4, 4, "axisName"},
-    {"names",        1, AxisNamesOp,        3, 0, "?pattern?..."},
-    {"transform",    2, AxisTransformOp,    5, 5, "axisName value"},
-    {"type",         2, AxisTypeOp,       4, 4, "axisName"},
-    {"view",         1, AxisViewOp,         4, 7, "axisName ?moveto fract? "
-	"?scroll number what?"},
-};
-static int nVirtAxisOps = sizeof(virtAxisOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_VirtualAxisOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    GraphVirtualAxisProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nVirtAxisOps, virtAxisOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (interp, graphPtr, objc, objv);
-    return result;
-}
-
-static Blt_OpSpec axisOps[] = {
-    {"activate",     1, ActivateOp,     3, 3, "",},
-    {"bind",         1, BindOp,         2, 5, "sequence command",},
-    {"cget",         2, CgetOp,         4, 4, "option",},
-    {"configure",    2, ConfigureOp,    3, 0, "?option value?...",},
-    {"deactivate",   1, ActivateOp,     3, 3, "",},
-    {"invtransform", 1, InvTransformOp, 4, 4, "value",},
-    {"limits",       1, LimitsOp,       3, 3, "",},
-    {"transform",    1, TransformOp,    4, 4, "value",},
-    {"use",          1, UseOp,          3, 4, "?axisName?",},
-    {"view",         1, ViewOp,         3, 6, "?moveto fract? ",},
-};
-
-static int nAxisOps = sizeof(axisOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_AxisOp(Tcl_Interp *interp, Graph *graphPtr, int margin, int objc,
-	   Tcl_Obj *const *objv)
-{
-    int result;
-    GraphAxisProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nAxisOps, axisOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    if (proc == UseOp) {
-	lastMargin = margin;		/* Set global variable to the margin
-					 * in the argument list. Needed only
-					 * for UseOp. */
-	result = (*proc)(interp, (Axis *)graphPtr, objc - 3, objv + 3);
-    } else {
-	Axis *axisPtr;
-
-	axisPtr = Blt_GetFirstAxis(graphPtr->margins[margin].axes);
-	if (axisPtr == NULL) {
-	    return TCL_OK;
-	}
-	result = (*proc)(interp, axisPtr, objc - 3, objv + 3);
-    }
-    return result;
-}
-
-void
-Blt_MapAxes(Graph *graphPtr)
-{
-    int margin;
-    
-    for (margin = 0; margin < 4; margin++) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-	int count, offset;
-
-	chain = graphPtr->margins[margin].axes;
-	count = offset = 0;
-	for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (AXIS_USE|DELETE_PENDING)) != AXIS_USE) {
-		continue;
-	    }
-	    if (graphPtr->stackAxes) {
-		axisPtr->reqNumMajorTicks = 4;
-		MapStackedAxis(axisPtr, count, margin);
-	    } else {
-		axisPtr->reqNumMajorTicks = 10;
-		MapAxis(axisPtr, offset, margin);
-	    }
-	    if (axisPtr->flags & AXIS_GRID) {
-		MapGridlines(axisPtr);
-	    }
-	    offset += (AxisIsHorizontal(axisPtr)) 
-		? axisPtr->height : axisPtr->width;
-	    count++;
-	}
-    }
-}
-
-void
-Blt_DrawAxes(Graph *graphPtr, Drawable drawable)
-{
-    int i;
-
-    for (i = 0; i < 4; i++) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_LastLink(graphPtr->margins[i].axes); 
-	     link != NULL; link = Blt_Chain_PrevLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (DELETE_PENDING|HIDE|AXIS_USE)) == AXIS_USE) {
-		DrawAxis(axisPtr, drawable);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawGrids --
- *
- *	Draws the grid lines associated with each axis.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawGrids(Graph *graphPtr, Drawable drawable) 
-{
-    int i;
-
-    for (i = 0; i < 4; i++) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(graphPtr->margins[i].axes); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if (axisPtr->flags & (DELETE_PENDING|HIDE)) {
-		continue;
-	    }
-	    if ((axisPtr->flags & AXIS_USE) && (axisPtr->flags & AXIS_GRID)) {
-		Blt_Draw2DSegments(graphPtr->display, drawable, 
-				   axisPtr->major.gc, axisPtr->major.segments, 
-				   axisPtr->major.nUsed);
-		if (axisPtr->flags & AXIS_GRID_MINOR) {
-		    Blt_Draw2DSegments(graphPtr->display, drawable, 
-			axisPtr->minor.gc, axisPtr->minor.segments, 
-			axisPtr->minor.nUsed);
-		}
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GridsToPostScript --
- *
- *	Draws the grid lines associated with each axis.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_GridsToPostScript(Graph *graphPtr, Blt_Ps ps) 
-{
-    int i;
-
-    for (i = 0; i < 4; i++) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(graphPtr->margins[i].axes); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (DELETE_PENDING|HIDE|AXIS_USE|AXIS_GRID)) !=
-		(AXIS_GRID|AXIS_USE)) {
-		continue;
-	    }
-	    Blt_Ps_Format(ps, "%% Axis %s: grid line attributes\n",
-		axisPtr->obj.name);
-	    Blt_Ps_XSetLineAttributes(ps, axisPtr->major.color, 
-		axisPtr->major.lineWidth, &axisPtr->major.dashes, CapButt, 
-		JoinMiter);
-	    Blt_Ps_Format(ps, "%% Axis %s: major grid line segments\n",
-		axisPtr->obj.name);
-	    Blt_Ps_Draw2DSegments(ps, axisPtr->major.segments, 
-				  axisPtr->major.nUsed);
-	    if (axisPtr->flags & AXIS_GRID_MINOR) {
-		Blt_Ps_XSetLineAttributes(ps, axisPtr->minor.color, 
-		    axisPtr->minor.lineWidth, &axisPtr->minor.dashes, CapButt, 
-		    JoinMiter);
-		Blt_Ps_Format(ps, "%% Axis %s: minor grid line segments\n",
-			axisPtr->obj.name);
-		Blt_Ps_Draw2DSegments(ps, axisPtr->minor.segments, 
-			axisPtr->minor.nUsed);
-	    }
-	}
-    }
-}
-
-void
-Blt_AxesToPostScript(Graph *graphPtr, Blt_Ps ps) 
-{
-    Margin *mp, *mend;
-
-    for (mp = graphPtr->margins, mend = mp + 4; mp < mend; mp++) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(mp->axes); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Axis *axisPtr;
-
-	    axisPtr = Blt_Chain_GetValue(link);
-	    if ((axisPtr->flags & (DELETE_PENDING|HIDE|AXIS_USE)) == AXIS_USE) {
-		AxisToPostScript(ps, axisPtr);
-	    }
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawAxisLimits --
- *
- *	Draws the min/max values of the axis in the plotting area.  The text
- *	strings are formatted according to the "sprintf" format descriptors in
- *	the limitsFormats array.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws the numeric values of the axis limits into the outer regions of
- *	the plotting area.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawAxisLimits(Graph *graphPtr, Drawable drawable)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    char minString[200], maxString[200];
-    int vMin, hMin, vMax, hMax;
-
-#define SPACING 8
-    vMin = vMax = graphPtr->left + graphPtr->padLeft + 2;
-    hMin = hMax = graphPtr->bottom - graphPtr->padBottom - 2;	/* Offsets */
-
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-	Dim2D textDim;
-	const char *minFmt, *maxFmt;
-	char *minPtr, *maxPtr;
-	int isHoriz;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	if (axisPtr->flags & DELETE_PENDING) {
-	    continue;
-	} 
-	if (axisPtr->nFormats == 0) {
-	    continue;
-	}
-	isHoriz = AxisIsHorizontal(axisPtr);
-	minPtr = maxPtr = NULL;
-	minFmt = maxFmt = axisPtr->limitsFormats[0];
-	if (axisPtr->nFormats > 1) {
-	    maxFmt = axisPtr->limitsFormats[1];
-	}
-	if (minFmt[0] != '\0') {
-	    minPtr = minString;
-	    sprintf_s(minString, 200, minFmt, axisPtr->axisRange.min);
-	}
-	if (maxFmt[0] != '\0') {
-	    maxPtr = maxString;
-	    sprintf_s(maxString, 200, maxFmt, axisPtr->axisRange.max);
-	}
-	if (axisPtr->descending) {
-	    char *tmp;
-
-	    tmp = minPtr, minPtr = maxPtr, maxPtr = tmp;
-	}
-	if (maxPtr != NULL) {
-	    if (isHoriz) {
-		Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 90.0);
-		Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_SE);
-		Blt_DrawText2(graphPtr->tkwin, drawable, maxPtr,
-		    &axisPtr->limitsTextStyle, graphPtr->right, hMax, &textDim);
-		hMax -= (textDim.height + SPACING);
-	    } else {
-		Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 0.0);
-		Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_NW);
-		Blt_DrawText2(graphPtr->tkwin, drawable, maxPtr,
-		    &axisPtr->limitsTextStyle, vMax, graphPtr->top, &textDim);
-		vMax += (textDim.width + SPACING);
-	    }
-	}
-	if (minPtr != NULL) {
-	    Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_SW);
-	    if (isHoriz) {
-		Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 90.0);
-		Blt_DrawText2(graphPtr->tkwin, drawable, minPtr,
-		    &axisPtr->limitsTextStyle, graphPtr->left, hMin, &textDim);
-		hMin -= (textDim.height + SPACING);
-	    } else {
-		Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 0.0);
-		Blt_DrawText2(graphPtr->tkwin, drawable, minPtr,
-		    &axisPtr->limitsTextStyle, vMin, graphPtr->bottom, &textDim);
-		vMin += (textDim.width + SPACING);
-	    }
-	}
-    } /* Loop on axes */
-}
-
-void
-Blt_AxisLimitsToPostScript(Graph *graphPtr, Blt_Ps ps)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    double vMin, hMin, vMax, hMax;
-    char string[200];
-
-#define SPACING 8
-    vMin = vMax = graphPtr->left + graphPtr->padLeft + 2;
-    hMin = hMax = graphPtr->bottom - graphPtr->padBottom - 2;	/* Offsets */
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-	const char *minFmt, *maxFmt;
-	unsigned int textWidth, textHeight;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	if (axisPtr->flags & DELETE_PENDING) {
-	    continue;
-	} 
-	if (axisPtr->nFormats == 0) {
-	    continue;
-	}
-	minFmt = maxFmt = axisPtr->limitsFormats[0];
-	if (axisPtr->nFormats > 1) {
-	    maxFmt = axisPtr->limitsFormats[1];
-	}
-	if (*maxFmt != '\0') {
-	    sprintf_s(string, 200, maxFmt, axisPtr->axisRange.max);
-	    Blt_GetTextExtents(axisPtr->tickFont, 0, string, -1, &textWidth,
-		&textHeight);
-	    if ((textWidth > 0) && (textHeight > 0)) {
-		if (axisPtr->obj.classId == CID_AXIS_X) {
-		    Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 90.0);
-		    Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_SE);
-		    Blt_Ps_DrawText(ps, string, &axisPtr->limitsTextStyle, 
-			(double)graphPtr->right, hMax);
-		    hMax -= (textWidth + SPACING);
-		} else {
-		    Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 0.0);
-		    Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_NW);
-		    Blt_Ps_DrawText(ps, string, &axisPtr->limitsTextStyle,
-			vMax, (double)graphPtr->top);
-		    vMax += (textWidth + SPACING);
-		}
-	    }
-	}
-	if (*minFmt != '\0') {
-	    sprintf_s(string, 200, minFmt, axisPtr->axisRange.min);
-	    Blt_GetTextExtents(axisPtr->tickFont, 0, string, -1, &textWidth,
-		&textHeight);
-	    if ((textWidth > 0) && (textHeight > 0)) {
-		Blt_Ts_SetAnchor(axisPtr->limitsTextStyle, TK_ANCHOR_SW);
-		if (axisPtr->obj.classId == CID_AXIS_X) {
-		    Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 90.0);
-		    Blt_Ps_DrawText(ps, string, &axisPtr->limitsTextStyle, 
-			(double)graphPtr->left, hMin);
-		    hMin -= (textWidth + SPACING);
-		} else {
-		    Blt_Ts_SetAngle(axisPtr->limitsTextStyle, 0.0);
-		    Blt_Ps_DrawText(ps, string, &axisPtr->limitsTextStyle, 
-			vMin, (double)graphPtr->bottom);
-		    vMin += (textWidth + SPACING);
-		}
-	    }
-	}
-    }
-}
-
-Axis *
-Blt_GetFirstAxis(Blt_Chain chain)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_FirstLink(chain);
-    if (link == NULL) {
-	return NULL;
-    }
-    return Blt_Chain_GetValue(link);
-}
-
-Axis *
-Blt_NearestAxis(Graph *graphPtr, int x, int y)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->axes.table, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Axis *axisPtr;
-
-	axisPtr = Blt_GetHashValue(hPtr);
-	if ((axisPtr->flags & (DELETE_PENDING|HIDE|AXIS_USE)) != AXIS_USE) {
-	    continue;
-	}
-	if (axisPtr->flags & AXIS_SHOWTICKS) {
-	    Blt_ChainLink link;
-
-	    for (link = Blt_Chain_FirstLink(axisPtr->tickLabels); link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {	
-		TickLabel *labelPtr;
-		Point2d t;
-		double rw, rh;
-		Point2d bbox[5];
-
-		labelPtr = Blt_Chain_GetValue(link);
-		Blt_GetBoundingBox(labelPtr->width, labelPtr->height, 
-			axisPtr->tickAngle, &rw, &rh, bbox);
-		t = Blt_AnchorPoint(labelPtr->anchorPos.x, 
-			labelPtr->anchorPos.y, rw, rh, axisPtr->tickAnchor);
-		t.x = x - t.x - (rw * 0.5);
-		t.y = y - t.y - (rh * 0.5);
-
-		bbox[4] = bbox[0];
-		if (Blt_PointInPolygon(&t, bbox, 5)) {
-		    axisPtr->detail = "label";
-		    return axisPtr;
-		}
-	    }
-	}
-	if (axisPtr->title != NULL) {	/* and then the title string. */
-	    Point2d bbox[5];
-	    Point2d t;
-	    double rw, rh;
-	    unsigned int w, h;
-
-	    Blt_GetTextExtents(axisPtr->titleFont, 0, axisPtr->title,-1,&w,&h);
-	    Blt_GetBoundingBox(w, h, axisPtr->titleAngle, &rw, &rh, bbox);
-	    t = Blt_AnchorPoint(axisPtr->titlePos.x, axisPtr->titlePos.y, 
-		rw, rh, axisPtr->titleAnchor);
-	    /* Translate the point so that the 0,0 is the upper left 
-	     * corner of the bounding box.  */
-	    t.x = x - t.x - (rw * 0.5);
-	    t.y = y - t.y - (rh * 0.5);
-	    
-	    bbox[4] = bbox[0];
-	    if (Blt_PointInPolygon(&t, bbox, 5)) {
-		axisPtr->detail = "title";
-		return axisPtr;
-	    }
-	}
-	if (axisPtr->lineWidth > 0) {	/* Check for the axis region */
-	    if ((x <= axisPtr->right) && (x >= axisPtr->left) && 
-		(y <= axisPtr->bottom) && (y >= axisPtr->top)) {
-		axisPtr->detail = "line";
-		return axisPtr;
-	    }
-	}
-    }
-    return NULL;
-}
- 
-ClientData
-Blt_MakeAxisTag(Graph *graphPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&graphPtr->axes.tagTable, tagName, &isNew);
-    return Blt_GetHashKey(&graphPtr->axes.tagTable, hPtr);
-}
-
diff --git a/blt3.0/src/bltGrAxis.h b/blt3.0/src/bltGrAxis.h
deleted file mode 100644
index d370f4e..0000000
--- a/blt3.0/src/bltGrAxis.h
+++ /dev/null
@@ -1,330 +0,0 @@
-
-/*
- * bltGrAxis.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_GR_AXIS_H
-#define _BLT_GR_AXIS_H
-
-#include "bltList.h"
-
-/*
- *---------------------------------------------------------------------------
- *
- * Grid --
- *
- *	Contains attributes of describing how to draw grids (at major ticks)
- *	in the graph.  Grids may be mapped to either/both X and Y axis.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    Blt_Dashes dashes;		/* Dash style of the grid. This represents an
-				 * array of alternatingly drawn pixel
-				 * values. */
-    int lineWidth;		/* Width of the grid lines */
-    XColor *color;		/* Color of the grid lines */
-    GC gc;			/* Graphics context for the grid. */
-
-    Segment2d *segments;	/* Array of line segments representing the
-				 * grid lines */
-    int nUsed;			/* # of axis segments in use. */
-    int nAllocated;		/* # of axis segments allocated. */
-} Grid;
-
-/*
- *---------------------------------------------------------------------------
- *
- * AxisRange --
- *
- *	Designates a range of values by a minimum and maximum limit.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double min, max, range, scale;
-} AxisRange;
-
-/*
- *---------------------------------------------------------------------------
- *
- * TickLabel --
- *
- * 	Structure containing the X-Y screen coordinates of the tick
- * 	label (anchored at its center).
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    Point2d anchorPos;
-    unsigned int width, height;
-    char string[1];
-} TickLabel;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Ticks --
- *
- * 	Structure containing information where the ticks (major or
- *	minor) will be displayed on the graph.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    unsigned int nTicks;	/* # of ticks on axis */
-    double values[1];		/* Array of tick values (malloc-ed). */
-} Ticks;
-
-/*
- *---------------------------------------------------------------------------
- *
- * TickSweep --
- *
- * 	Structure containing information where the ticks (major or
- *	minor) will be displayed on the graph.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double initial;		/* Initial value */
-    double step;		/* Size of interval */
-    unsigned int nSteps;	/* Number of intervals. */
-} TickSweep;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Axis --
- *
- * 	Structure contains options controlling how the axis will be
- * 	displayed.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in axis. */
-
-    unsigned int flags;		
-
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to axes. */
-
-    const char *detail;
-
-    int refCount;			/* Number of elements referencing this
-					 * axis. */
-
-    int logScale;
-
-    int descending;			/* If non-zero, display the range of
-					 * values on the axis in descending
-					 * order, from high to low. */
-
-    int looseMin, looseMax;		/* If non-zero, axis range extends to
-					 * the outer major ticks, otherwise at
-					 * the limits of the data values. This
-					 * is overriddened by setting the -min
-					 * and -max options.  */
-
-    const char *title;			/* Title of the axis. */
-
-    int titleAlternate;			/* Indicates whether to position the
-					 * title above/left of the axis. */
-
-    Point2d titlePos;			/* Position of the title */
-
-    unsigned short int titleWidth, titleHeight;	
-
-
-    int lineWidth;			/* Width of lines representing axis
-					 * (including ticks).  If zero, then
-					 * no axis lines or ticks are
-					 * drawn. */
-
-    const char **limitsFormats;		/* One or two strings of sprintf-like
-					 * formats describing how to display
-					 * virtual axis limits. If NULL,
-					 * display no limits. */
-    int nFormats;
-
-    TextStyle limitsTextStyle;		/* Text attributes (color, font,
-					 * rotation, etc.)  of the limits. */
-
-    double windowSize;			/* Size of a sliding window of values
-					 * used to scale the axis
-					 * automatically as new data values
-					 * are added. The axis will always
-					 * display the latest values in this
-					 * range. */
-
-    double shiftBy;			/* Shift maximum by this interval. */
-
-    int tickLength;			/* Length of major ticks in pixels */
-
-    const char *formatCmd;		/* Specifies a TCL command, to be
-					 * invoked by the axis whenever it has
-					 * to generate tick labels. */
-
-    Tcl_Obj *scrollCmdObjPtr;
-    int scrollUnits;
-
-    double min, max;			/* The actual axis range. */
-
-    double reqMin, reqMax;		/* Requested axis bounds. Consult the
-					 * axisPtr->flags field for
-					 * AXIS_CONFIG_MIN and AXIS_CONFIG_MAX
-					 * to see if the requested bound have
-					 * been set.  They override the
-					 * computed range of the axis
-					 * (determined by auto-scaling). */
-
-    double reqScrollMin, reqScrollMax;
-
-    double scrollMin, scrollMax;	/* Defines the scrolling reqion of the
-					 * axis.  Normally the region is
-					 * determined from the data limits. If
-					 * specified, these values override
-					 * the data-range. */
-
-    AxisRange valueRange;		/* Range of data values of elements
-					 * mapped to this axis. This is used
-					 * to auto-scale the axis in "tight"
-					 * mode. */
-    AxisRange axisRange;		/* Smallest and largest major tick
-					 * values for the axis.  The tick
-					 * values lie outside the range of
-					 * data values.  This is used to
-					 * auto-scale the axis in "loose"
-					 * mode. */
-
-    double prevMin, prevMax;
-
-    double reqStep;		/* If > 0.0, overrides the computed major 
-				 * tick interval.  Otherwise a stepsize 
-				 * is automatically calculated, based 
-				 * upon the range of elements mapped to the 
-				 * axis. The default value is 0.0. */
-
-    Ticks *t1Ptr;		/* Array of major tick positions. May be
-				 * set by the user or generated from the 
-				 * major sweep below. */
-
-    Ticks *t2Ptr;		/* Array of minor tick positions. May be
-				 * set by the user or generated from the
-				 * minor sweep below. */
-
-    TickSweep minorSweep, majorSweep;
-
-    int reqNumMajorTicks;	/* Default number of ticks to be displayed. */
-    int reqNumMinorTicks;	/* If non-zero, represents the
-				 * requested the number of minor ticks
-				 * to be uniformally displayed along
-				 * each major tick. */
-
-
-    int labelOffset;		/* If non-zero, indicates that the tick
-				 * label should be offset to sit in the
-				 * middle of the next interval. */
-
-    /* The following fields are specific to logical axes */
-
-    int margin;				/* Margin that contains this axis. */
-    Blt_ChainLink link;			/* Axis link in margin list. */
-    Blt_Chain chain;
-    Segment2d *segments;		/* Array of line segments representing
-					 * the major and minor ticks, but also
-					 * the * axis line itself. The segment
-					 * coordinates * are relative to the
-					 * axis. */
-    int nSegments;			/* Number of segments in the above
-					 * array. */
-    Blt_Chain tickLabels;		/* Contains major tick label strings
-					 * and their offsets along the
-					 * axis. */
-    short int left, right, top, bottom;	/* Region occupied by the of axis. */
-    short int width, height;		/* Extents of axis */
-
-    Blt_Background normalBg;
-    Blt_Background activeBg;
-    XColor *activeFgColor;
-
-    int relief;
-    int borderWidth;
-    int activeRelief;
-
-    float tickAngle;	
-    Blt_Font tickFont;
-    Tk_Anchor tickAnchor;
-    Tk_Anchor reqTickAnchor;
-    XColor *tickColor;
-    GC tickGC;				/* Graphics context for axis and tick
-					 * labels */
-    GC activeTickGC;
-
-    double titleAngle;	
-    Blt_Font titleFont;
-    Tk_Anchor titleAnchor;
-    Tk_Justify titleJustify;
-    XColor *titleColor;
-    
-    Grid major, minor;			/* Axis grid information. */
-
-    double screenScale;
-    int screenMin, screenRange;
-
-} Axis;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Axis2d --
- *
- *	The pair of axes mapping a point onto the graph.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    Axis *x, *y;
-} Axis2d;
-
-/* Axis flags: */
-
-#define AXIS_AUTO_MAJOR		(1<<16) /* Auto-generate major ticks. */
-#define AXIS_AUTO_MINOR		(1<<17) /* Auto-generate minor ticks. */
-#define AXIS_ONSCREEN		(1<<18)	/* Axis is displayed on the screen via
-					 * the "use" operation */
-#define AXIS_GRID		(1<<19)
-#define AXIS_GRID_MINOR		(1<<20)
-#define AXIS_TICKS		(1<<21)
-#define AXIS_TICKS_INTERIOR	(1<<22)
-#define AXIS_CHECK_LIMITS	(1<<23)
-#define AXIS_LOGSCALE		(1<<24)
-#define AXIS_DECREASING		(1<<25)
-
-#endif /* _BLT_GR_AXIS_H */
diff --git a/blt3.0/src/bltGrBar.c b/blt3.0/src/bltGrBar.c
deleted file mode 100644
index 4bfd7b2..0000000
--- a/blt3.0/src/bltGrBar.c
+++ /dev/null
@@ -1,2540 +0,0 @@
-
-/*
- * bltGrBar.c --
- *
- * This module implements barchart elements for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include <X11/Xutil.h>
-
-#include "bltGrElem.h"
-
-#define CLAMP(x,l,h)	((x) = (((x)<(l))? (l) : ((x)>(h)) ? (h) : (x)))
-
-typedef struct {
-    float x1, y1, x2, y2;
-} BarRegion;
-
-typedef struct {
-    Point2f ul, lr;
-    Segment2d segments[4];  
-    int nSegments;
-} Bar;
-
-typedef struct {
-    const char *name;			/* Pen style identifier.  If NULL, pen
-					 * was statically allocated. */
-    ClassId classId;			/* Type of pen */
-    const char *typeId;			/* String token identifying the type of
-					 * pen */
-    unsigned int flags;			/* Indicates if the pen element is
-					 * active or normal */
-    int refCount;			/* Reference count for elements using
-					 * this pen. */
-    Blt_HashEntry *hashPtr;
-
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications */
-
-    PenConfigureProc *configProc;
-    PenDestroyProc *destroyProc;
-    Graph *graphPtr;			/* Graph that the pen is associated
-					 * with. */
-
-    /* Barchart specific pen fields start here. */
-
-    XColor *outlineColor;		/* Outline (foreground) color of bar */
-    Blt_Background fill;		/* 3D border and fill (background)
-					 * color */
-    int borderWidth;			/* 3D border width of bar */
-    int relief;				/* Relief of the bar */
-    Pixmap stipple;			/* Stipple */
-    GC fillGC;				/* Graphics context */
-    GC outlineGC;			/* GC for outline of bar. */
-
-    /* Error bar attributes. */
-    int errorBarShow;			/* Describes which error bars to
-					 * display: none, x, y, or * both. */
-
-    int errorBarLineWidth;		/* Width of the error bar segments. */
-
-    int errorBarCapWidth;
-    XColor *errorBarColor;		/* Color of the error bar. */
-
-    GC errorBarGC;			/* Error bar graphics context. */
-
-    /* Show value attributes. */
-    int valueShow;			/* Indicates whether to display data
-					 * value.  Values are x, y, or none. */
-
-    const char *valueFormat;		/* A printf format string. */
-    TextStyle valueStyle;		/* Text attributes (color, font,
-					 * rotation, etc.) of the value. */
-    
-} BarPen;
-
-typedef struct {
-    Weight weight;			/* Weight range where this pen is
-					 * valid. */
-    BarPen *penPtr;			/* Pen to use. */
-
-    XRectangle *bars;			/* Indicates starting location in bar
-					 * array for this pen. */
-    int nBars;				/* # of bar segments for this pen. */
-
-    GraphSegments xeb, yeb;		/* X and Y error bars. */
-
-    int symbolSize;			/* Size of the pen's symbol scaled to
-					 * the current graph size. */
-    int errorBarCapWidth;		/* Length of the cap ends on each error
-					 * bar. */
-
-} BarStyle;
-
-typedef struct {
-    GraphObj obj;			/* Must be first field in element. */
-    unsigned int flags;		
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to elements. */
-    const char *label;			/* Label displayed in legend */
-    unsigned short row, col;		/* Position of the entry in the
-					 * legend. */
-    int legendRelief;			/* Relief of label in legend. */
-    Axis2d axes;			/* X-axis and Y-axis mapping the
-					 * element */
-
-    ElemValues x, y, w;			/* Contains array of floating point
-					 * graph coordinate values. Also holds
-					 * min/max and the number of
-					 * coordinates */
-    int *activeIndices;			/* Array of indices (malloc-ed) which
-					 * indicate which data points are active
-					 * (drawn * with "active" colors). */
-    int nActiveIndices;			/* Number of active data points.
-					 * Special case: if nActiveIndices < 0
-					 * and the active bit is set in "flags",
-					 * then all data * points are drawn
-					 * active. */
-    ElementProcs *procsPtr;
-
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications. */
-
-    BarPen *activePenPtr;		/* Standard Pens */
-    BarPen *normalPenPtr;
-    BarPen *builtinPenPtr;
-
-    Blt_Chain stylePalette;		/* Palette of pens. */
-
-    /* Symbol scaling */
-    int scaleSymbols;			/* If non-zero, the symbols will scale
-					 * in size as the graph is zoomed
-					 * in/out.  */
-    double xRange, yRange;		/* Initial X-axis and Y-axis ranges:
-					 * used to scale the size of element's
-					 * symbol. */
-    int state;
-    Blt_ChainLink link;
-
-    /* Legend information */
-    int legendHeight;
-    int worldX, worldY;			/* Location of element in legend. */
-
-    /* Fields specific to the barchart element */
-
-    float barWidth;
-    const char *groupName;
-
-    int *barToData;
-    XRectangle *bars;		       /* Array of rectangles comprising the bar
-					* segments of the element. */
-    int *activeToData;
-    XRectangle *activeRects;
-
-    int nBars;				/* # of visible bar segments for
-					 * element */
-    int nActive;
-
-    int xPad;				/* Spacing on either side of bar */
-
-    ElemValues xError;			/* Relative/symmetric X error values. */
-    ElemValues yError;			/* Relative/symmetric Y error values. */
-    ElemValues xHigh, xLow;		/* Absolute/asymmetric X-coordinate
-					 * high/low error values. */
-    ElemValues yHigh, yLow;		/* Absolute/asymmetric Y-coordinate
-					 * high/low error values. */
-    BarPen builtinPen;
-
-    GraphSegments xeb, yeb;
-
-    int errorBarCapWidth;		/* Length of cap on error bars */
-} BarElement;
-
-BLT_EXTERN Blt_CustomOption bltBarPenOption;
-BLT_EXTERN Blt_CustomOption bltValuesOption;
-BLT_EXTERN Blt_CustomOption bltValuePairsOption;
-BLT_EXTERN Blt_CustomOption bltXAxisOption;
-BLT_EXTERN Blt_CustomOption bltYAxisOption;
-BLT_EXTERN Blt_CustomOption bltColorOption;
-BLT_EXTERN Blt_CustomOption bltBarStylesOption;
-
-static Blt_OptionParseProc ObjToBarMode;
-static Blt_OptionPrintProc BarModeToObj;
-Blt_CustomOption bltBarModeOption =
-{
-    ObjToBarMode, BarModeToObj, NULL, (ClientData)0
-};
-
-#define DEF_BAR_ACTIVE_PEN		"activeBar"
-#define DEF_BAR_AXIS_X			"x"
-#define DEF_BAR_AXIS_Y			"y"
-#define DEF_BAR_BACKGROUND		"navyblue"
-#define DEF_BAR_BORDERWIDTH		"2"
-#define DEF_BAR_ERRORBAR_COLOR		"defcolor"
-#define DEF_BAR_ERRORBAR_LINE_WIDTH	"1"
-#define DEF_BAR_ERRORBAR_CAP_WIDTH	"1"
-#define DEF_BAR_FOREGROUND		"blue"
-#define DEF_BAR_HIDE			"no"
-#define DEF_BAR_LABEL_RELIEF		"flat"
-#define DEF_BAR_NORMAL_STIPPLE		""
-#define DEF_BAR_RELIEF			"raised"
-#define DEF_BAR_SHOW_ERRORBARS		"both"
-#define DEF_BAR_STATE			"normal"
-#define DEF_BAR_STACK			(char *)NULL
-#define DEF_BAR_STYLES			""
-#define DEF_BAR_TAGS			"all"
-#define DEF_BAR_WIDTH			"0.0"
-
-#define DEF_PEN_ACTIVE_BACKGROUND	"red"
-#define DEF_PEN_ACTIVE_FOREGROUND     	"pink"
-#define DEF_PEN_BORDERWIDTH		"2"
-#define DEF_PEN_NORMAL_BACKGROUND	"navyblue"
-#define DEF_PEN_NORMAL_FOREGROUND	"blue"
-#define DEF_PEN_RELIEF			"raised"
-#define DEF_PEN_STIPPLE			""
-#define DEF_PEN_TYPE			"bar"
-#define	DEF_PEN_VALUE_ANCHOR		"s"
-#define	DEF_PEN_VALUE_COLOR		RGB_BLACK
-#define	DEF_PEN_VALUE_FONT		STD_FONT_SMALL
-#define	DEF_PEN_VALUE_FORMAT		"%g"
-#define DEF_PEN_SHOW_VALUES		"no"
-
-static Blt_ConfigSpec barPenConfigSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_PEN_ACTIVE_BACKGROUND, Blt_Offset(BarPen, fill),
-	BLT_CONFIG_NULL_OK | ACTIVE_PEN},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_PEN_NORMAL_BACKGROUND, Blt_Offset(BarPen, fill),
-	BLT_CONFIG_NULL_OK | NORMAL_PEN},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_PEN_BORDERWIDTH, Blt_Offset(BarPen, borderWidth), ALL_PENS},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_BAR_ERRORBAR_COLOR, Blt_Offset(BarPen, errorBarColor), ALL_PENS, 
-	&bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth","ErrorBarWidth",
-	DEF_BAR_ERRORBAR_LINE_WIDTH, Blt_Offset(BarPen, errorBarLineWidth),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-	DEF_BAR_ERRORBAR_CAP_WIDTH, Blt_Offset(BarPen, errorBarCapWidth),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_PEN_ACTIVE_FOREGROUND, Blt_Offset(BarPen, outlineColor),
-	ACTIVE_PEN | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_PEN_NORMAL_FOREGROUND, Blt_Offset(BarPen, outlineColor),
-	NORMAL_PEN |  BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_PEN_RELIEF, Blt_Offset(BarPen, relief), ALL_PENS},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_BAR_SHOW_ERRORBARS, Blt_Offset(BarPen, errorBarShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(BarPen, valueShow),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_PEN_STIPPLE, 
-	Blt_Offset(BarPen, stipple), ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-type", (char *)NULL, (char *)NULL, DEF_PEN_TYPE, 
-	Blt_Offset(BarPen, typeId), ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, Blt_Offset(BarPen, valueStyle.anchor), 
-	ALL_PENS},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, Blt_Offset(BarPen, valueStyle.color), 
-	ALL_PENS},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, Blt_Offset(BarPen, valueStyle.font), 
-	ALL_PENS},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(BarPen, valueFormat),
-	ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	(char *)NULL, Blt_Offset(BarPen, valueStyle.angle), ALL_PENS},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Blt_ConfigSpec barElemConfigSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen",
-	DEF_BAR_ACTIVE_PEN, Blt_Offset(BarElement, activePenPtr), 
-	BLT_CONFIG_NULL_OK, &bltBarPenOption},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BAR_BACKGROUND, Blt_Offset(BarElement, builtinPen.fill),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-barwidth", "barWidth", "BarWidth",
-	DEF_BAR_WIDTH, Blt_Offset(BarElement, barWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_BAR_TAGS, 
-	Blt_Offset(BarElement, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BAR_BORDERWIDTH, Blt_Offset(BarElement, builtinPen.borderWidth), 0},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_BAR_ERRORBAR_COLOR, 
-	Blt_Offset(BarElement, builtinPen.errorBarColor), 0, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth",
-	DEF_BAR_ERRORBAR_LINE_WIDTH, 
-	Blt_Offset(BarElement, builtinPen.errorBarLineWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-	DEF_BAR_ERRORBAR_CAP_WIDTH, 
-	Blt_Offset(BarElement, builtinPen.errorBarCapWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-data", "data", "Data", (char *)NULL, 0, 0, 
-	&bltValuePairsOption},
-    {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_BAR_FOREGROUND, Blt_Offset(BarElement, builtinPen.outlineColor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-label", "label", "Label", (char *)NULL, 
-	Blt_Offset(BarElement, label), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief",
-	DEF_BAR_LABEL_RELIEF, Blt_Offset(BarElement, legendRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_BAR_HIDE, 
-         Blt_Offset(BarElement, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_BAR_AXIS_X, 
-	Blt_Offset(BarElement, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_BAR_AXIS_Y, 
-	Blt_Offset(BarElement, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-pen", "pen", "Pen", (char *)NULL, 
-	Blt_Offset(BarElement, normalPenPtr), BLT_CONFIG_NULL_OK, 
-	&bltBarPenOption},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_BAR_RELIEF, Blt_Offset(BarElement, builtinPen.relief), 0},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_BAR_SHOW_ERRORBARS, Blt_Offset(BarElement, builtinPen.errorBarShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(BarElement, builtinPen.valueShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-stack", "stack", "Stack", DEF_BAR_STACK, 
-	Blt_Offset(BarElement, groupName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_BAR_STATE, 
-	Blt_Offset(BarElement, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple",
-	DEF_BAR_NORMAL_STIPPLE, Blt_Offset(BarElement, builtinPen.stipple),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", DEF_BAR_STYLES, 
-	Blt_Offset(BarElement, stylePalette), 0, &bltBarStylesOption},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, Blt_Offset(BarElement, builtinPen.valueStyle.anchor), 0},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, Blt_Offset(BarElement, builtinPen.valueStyle.color), 0},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, Blt_Offset(BarElement, builtinPen.valueStyle.font), 0},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(BarElement, builtinPen.valueFormat),
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	(char *)NULL, Blt_Offset(BarElement, builtinPen.valueStyle.angle), 0},
-    {BLT_CONFIG_CUSTOM, "-weights", "weights", "Weights", (char *)NULL, 
-	Blt_Offset(BarElement, w), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-x", "xdata", "Xdata", (char *)NULL, 
-	Blt_Offset(BarElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-y", "ydata", "Ydata", (char *)NULL, 
-	Blt_Offset(BarElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xdata", "xdata", "Xdata", (char *)NULL, 
-	Blt_Offset(BarElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ydata", "ydata", "Ydata", (char *)NULL, 
-	Blt_Offset(BarElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xerror", "xError", "XError", (char *)NULL, 
-	Blt_Offset(BarElement, xError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xhigh", "xHigh", "XHigh", (char *)NULL, 
-	Blt_Offset(BarElement, xHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xlow", "xLow", "XLow", (char *)NULL, 
-	Blt_Offset(BarElement, xLow), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yerror", "yError", "YError", (char *)NULL, 
-	Blt_Offset(BarElement, yError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yhigh", "yHigh", "YHigh", (char *)NULL, 
-	Blt_Offset(BarElement, yHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ylow", "yLow", "YLow", (char *)NULL, 
-	Blt_Offset(BarElement, yLow), 0, &bltValuesOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/* Forward declarations */
-static PenConfigureProc ConfigureBarPenProc;
-static PenDestroyProc DestroyBarPenProc;
-static ElementClosestProc ClosestBarProc;
-static ElementConfigProc ConfigureBarProc;
-static ElementDestroyProc DestroyBarProc;
-static ElementDrawProc DrawActiveBarProc;
-static ElementDrawProc DrawNormalBarProc;
-static ElementDrawSymbolProc DrawSymbolProc;
-static ElementExtentsProc GetBarExtentsProc;
-static ElementToPostScriptProc ActiveBarToPostScriptProc;
-static ElementToPostScriptProc NormalBarToPostScriptProc;
-static ElementSymbolToPostScriptProc SymbolToPostScriptProc;
-static ElementMapProc MapBarProc;
-
-INLINE static int
-Round(double x)
-{
-    return (int) (x + ((x < 0.0) ? -0.5 : 0.5));
-}
-
-/*
- *---------------------------------------------------------------------------
- * Custom option parse and print procedures
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfBarMode --
- *
- *	Converts the integer representing the mode style into a string.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfBarMode(BarMode mode)
-{
-    switch (mode) {
-    case BARS_INFRONT:
-	return "infront";
-    case BARS_OVERLAP:
-	return "overlap";
-    case BARS_STACKED:
-	return "stacked";
-    case BARS_ALIGNED:
-	return "aligned";
-    default:
-	return "unknown mode value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToMode --
- *
- *	Converts the mode string into its numeric representation.
- *
- *	Valid mode strings are:
- *
- *      "infront"   Draw a full bar at each point in the element.
- *
- * 	"stacked"   Stack bar segments vertically. Each stack is defined
- *		    by each ordinate at a particular abscissa. The height
- *		    of each segment is represented by the sum the previous
- *		    ordinates.
- *
- *	"aligned"   Align bar segments as smaller slices one next to
- *		    the other.  Like "stacks", aligned segments are
- *		    defined by each ordinate at a particular abscissa.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToBarMode(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Mode style string */
-    char *widgRec,			/* Cubicle structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    BarMode *modePtr = (BarMode *)(widgRec + offset);
-    int length;
-    char c;
-    char *string;
-    
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "normal", length) == 0)) {
-	*modePtr = BARS_INFRONT;
-    } else if ((c == 'i') && (strncmp(string, "infront", length) == 0)) {
-	*modePtr = BARS_INFRONT;
-    } else if ((c == 's') && (strncmp(string, "stacked", length) == 0)) {
-	*modePtr = BARS_STACKED;
-    } else if ((c == 'a') && (strncmp(string, "aligned", length) == 0)) {
-	*modePtr = BARS_ALIGNED;
-    } else if ((c == 'o') && (strncmp(string, "overlap", length) == 0)) {
-	*modePtr = BARS_OVERLAP;
-    } else {
-	Tcl_AppendResult(interp, "bad mode argument \"", string, "\": should"
-		"be \"infront\", \"stacked\", \"overlap\", or \"aligned\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BarModeToObj --
- *
- *	Returns the mode style string based upon the mode flags.
- *
- * Results:
- *	The mode style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-BarModeToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Row/column structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    BarMode mode = *(BarMode *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfBarMode(mode), -1);
-}
-
-
-/* 
- * Zero out the style's number of bars and errorbars. 
- */
-static void
-ResetStylePalette(Blt_Chain stylePalette)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(stylePalette); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	BarStyle *stylePtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->xeb.length = stylePtr->yeb.length = 0;
-	stylePtr->nBars = 0;
-    }
-}
-
-static int
-ConfigureBarPen(Graph *graphPtr, BarPen *penPtr)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-    long defColor;
-    int screenNum;
-
-    screenNum = Tk_ScreenNumber(graphPtr->tkwin);
-    gcMask = GCForeground | GCLineWidth;
-    gcValues.line_width = LineWidth(penPtr->errorBarLineWidth);
-
-    if (penPtr->outlineColor != NULL) {
-	defColor = penPtr->outlineColor->pixel;
-	gcValues.foreground = penPtr->outlineColor->pixel;
-    } else if (penPtr->fill != NULL) {
-	defColor = Blt_BackgroundBorderColor(penPtr->fill)->pixel;
-	gcValues.foreground = defColor;
-    } else {
-	defColor = BlackPixel(graphPtr->display, screenNum);
-    }
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (penPtr->outlineGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->outlineGC);
-    }
-    penPtr->outlineGC = newGC;
-
-    newGC = NULL;
-    if (penPtr->stipple != None) {
-	/* Handle old-style -stipple specially. */
-	gcMask = GCForeground | GCBackground | GCFillStyle | GCStipple;
-	gcValues.foreground = BlackPixel(graphPtr->display, screenNum);
-	gcValues.background = WhitePixel(graphPtr->display, screenNum);
-	if (penPtr->fill != NULL) {
-	    gcValues.foreground =
-		Blt_BackgroundBorderColor(penPtr->fill)->pixel;
-	} else if (penPtr->outlineColor != NULL) {
-	    gcValues.foreground = penPtr->outlineColor->pixel;
-	}
-	gcValues.stipple = penPtr->stipple;
-	gcValues.fill_style = FillStippled;
-	newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    }
-    if (penPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->fillGC);
-    }
-    penPtr->fillGC = newGC;
-
-    gcMask = GCForeground | GCLineWidth;
-    if (penPtr->errorBarColor == COLOR_DEFAULT) {
-	gcValues.foreground = defColor;
-    } else {
-	gcValues.foreground = penPtr->errorBarColor->pixel;
-    }
-    gcValues.line_width = LineWidth(penPtr->errorBarLineWidth);
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (penPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->errorBarGC);
-    }
-    penPtr->errorBarGC = newGC;
-    return TCL_OK;
-}
-
-static void
-DestroyBarPen(Graph *graphPtr, BarPen *penPtr)
-{
-    Blt_Ts_FreeStyle(graphPtr->display, &penPtr->valueStyle);
-    if (penPtr->outlineGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->outlineGC);
-    }
-    if (penPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->fillGC);
-    }
-    if (penPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->errorBarGC);
-    }
-}
-
-static int
-ConfigureBarPenProc(Graph *graphPtr, Pen *basePtr)
-{
-    return ConfigureBarPen(graphPtr, (BarPen *)basePtr);
-}
-
-static void
-DestroyBarPenProc(Graph *graphPtr, Pen *basePtr)
-{
-    DestroyBarPen(graphPtr, (BarPen *)basePtr);
-}
-
-
-static void
-InitializeBarPen(BarPen *penPtr)
-{
-    /* Generic fields common to all pen types. */
-    penPtr->configProc = ConfigureBarPenProc;
-    penPtr->destroyProc = DestroyBarPenProc;
-    penPtr->flags = NORMAL_PEN;
-    penPtr->configSpecs = barPenConfigSpecs;
-
-    /* Initialize fields specific to bar pens. */
-    Blt_Ts_InitStyle(penPtr->valueStyle);
-    penPtr->relief = TK_RELIEF_RAISED;
-    penPtr->valueShow = SHOW_NONE;
-    penPtr->borderWidth = 2;
-    penPtr->errorBarShow = SHOW_BOTH;
-}
-
-Pen *
-Blt_BarPen(const char *penName)
-{
-    BarPen *penPtr;
-
-    penPtr = Blt_AssertCalloc(1, sizeof(BarPen));
-    InitializeBarPen(penPtr);
-    penPtr->name = Blt_AssertStrdup(penName);
-    if (strcmp(penName, "activeBar") == 0) {
-	penPtr->flags = ACTIVE_PEN;
-    }
-    return (Pen *)penPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CheckBarStacks --
- *
- *	Check that the data limits are not superseded by the heights of
- *	stacked bar segments.  The heights are calculated by
- *	Blt_ComputeStacks.
- *
- * Results:
- *	If the y-axis limits need to be adjusted for stacked segments,
- *	*minPtr* or *maxPtr* are updated.
- *
- * Side effects:
- *	Autoscaling of the y-axis is affected.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CheckBarStacks(Graph *graphPtr, Axis2d *pairPtr, double *minPtr, double *maxPtr)
-{
-    BarGroup *gp, *gend;
-
-    if ((graphPtr->mode != BARS_STACKED) || (graphPtr->nBarGroups == 0)) {
-	return;
-    }
-    for (gp = graphPtr->barGroups, gend = gp + graphPtr->nBarGroups; gp < gend;
-	 gp++) {
-	if ((gp->axes.x == pairPtr->x) && (gp->axes.y == pairPtr->y)) {
-	    /*
-	     * Check if any of the y-values (because of stacking) are greater
-	     * than the current limits of the graph.
-	     */
-	    if (gp->sum < 0.0f) {
-		if (*minPtr > gp->sum) {
-		    *minPtr = gp->sum;
-		}
-	    } else {
-		if (*maxPtr < gp->sum) {
-		    *maxPtr = gp->sum;
-		}
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureBarProc --
- *
- *	Sets up the appropriate configuration parameters in the GC.  It is
- *	assumed the parameters have been previously set by a call to
- *	Blt_ConfigureWidget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information such as bar foreground/background color and
- *	stipple etc. get set in a new GC.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureBarProc(Graph *graphPtr, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    Blt_ChainLink link;
-    BarStyle *stylePtr;
-
-    if (ConfigureBarPen(graphPtr, elemPtr->builtinPenPtr)!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Point to the static normal pen if no external pens have been selected.
-     */
-    link = Blt_Chain_FirstLink(elemPtr->stylePalette);
-    if (link == NULL) {
-	link = Blt_Chain_AllocLink(sizeof(BarStyle));
-	Blt_Chain_LinkAfter(elemPtr->stylePalette, link, NULL);
-    }
-    stylePtr = Blt_Chain_GetValue(link);
-    stylePtr->penPtr = NORMALPEN(elemPtr);
-
-    if (Blt_ConfigModified(elemPtr->configSpecs, "-barwidth", "-*data",
-	    "-map*", "-label", "-hide", "-x", "-y", (char *)NULL)) {
-	elemPtr->flags |= MAP_ITEM;
-    }
-    return TCL_OK;
-}
-
-static void
-GetBarExtentsProc(Element *basePtr, Region2d *regPtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    Graph *graphPtr;
-    double middle, barWidth;
-    int nPoints;
-
-    graphPtr = elemPtr->obj.graphPtr;
-    regPtr->top = regPtr->left = DBL_MAX;
-    regPtr->bottom = regPtr->right = -DBL_MAX;
-
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (nPoints < 1) {
-	return;				/* No data points */
-    }
-    barWidth = graphPtr->barWidth;
-    if (elemPtr->barWidth > 0.0f) {
-	barWidth = elemPtr->barWidth;
-    }
-    middle = 0.5;
-    regPtr->left = elemPtr->x.min - middle;
-    regPtr->right = elemPtr->x.max + middle;
-
-    regPtr->top = elemPtr->y.min;
-    regPtr->bottom = elemPtr->y.max;
-    if (regPtr->bottom < graphPtr->baseline) {
-	regPtr->bottom = graphPtr->baseline;
-    }
-    /*
-     * Handle stacked bar elements specially.
-     *
-     * If element is stacked, the sum of its ordinates may be outside the
-     * minimum/maximum limits of the element's data points.
-     */
-    if ((graphPtr->mode == BARS_STACKED) && (graphPtr->nBarGroups > 0)) {
-	CheckBarStacks(graphPtr, &elemPtr->axes, &regPtr->top, &regPtr->bottom);
-    }
-    /* Warning: You get what you deserve if the x-axis is logScale */
-    if (elemPtr->axes.x->logScale) {
-	regPtr->left = Blt_FindElemValuesMinimum(&elemPtr->x, DBL_MIN) + 
-	    middle;
-    }
-    /* Fix y-min limits for barchart */
-    if (elemPtr->axes.y->logScale) {
- 	if ((regPtr->top <= 0.0) || (regPtr->top > 1.0)) {
-	    regPtr->top = 1.0;
-	}
-    } else {
-	if (regPtr->top > 0.0) {
-	    regPtr->top = 0.0;
-	}
-    }
-    /* Correct the extents for error bars if they exist. */
-    if (elemPtr->xError.nValues > 0) {
-	int i;
-	
-	/* Correct the data limits for error bars */
-	nPoints = MIN(elemPtr->xError.nValues, nPoints);
-	for (i = 0; i < nPoints; i++) {
-	    double x;
-
-	    x = elemPtr->x.values[i] + elemPtr->xError.values[i];
-	    if (x > regPtr->right) {
-		regPtr->right = x;
-	    }
-	    x = elemPtr->x.values[i] - elemPtr->xError.values[i];
-	    if (elemPtr->axes.x->logScale) {
-		if (x < 0.0) {
-		    x = -x;		/* Mirror negative values, instead of
-					 * ignoring them. */
-		}
-		if ((x > DBL_MIN) && (x < regPtr->left)) {
-		    regPtr->left = x;
-		}
-	    } else if (x < regPtr->left) {
-		regPtr->left = x;
-	    }
-	}		     
-    } else {
-	if ((elemPtr->xHigh.nValues > 0) && 
-	    (elemPtr->xHigh.max > regPtr->right)) {
-	    regPtr->right = elemPtr->xHigh.max;
-	}
-	if (elemPtr->xLow.nValues > 0) {
-	    double left;
-	    
-	    if ((elemPtr->xLow.min <= 0.0) && 
-		(elemPtr->axes.x->logScale)) {
-		left = Blt_FindElemValuesMinimum(&elemPtr->xLow, DBL_MIN);
-	    } else {
-		left = elemPtr->xLow.min;
-	    }
-	    if (left < regPtr->left) {
-		regPtr->left = left;
-	    }
-	}
-    }
-    if (elemPtr->yError.nValues > 0) {
-	int i;
-	
-	nPoints = MIN(elemPtr->yError.nValues, nPoints);
-	for (i = 0; i < nPoints; i++) {
-	    double y;
-
-	    y = elemPtr->y.values[i] + elemPtr->yError.values[i];
-	    if (y > regPtr->bottom) {
-		regPtr->bottom = y;
-	    }
-	    y = elemPtr->y.values[i] - elemPtr->yError.values[i];
-	    if (elemPtr->axes.y->logScale) {
-		if (y < 0.0) {
-		    y = -y;		/* Mirror negative values, instead of
-					 * ignoring them. */
-		}
-		if ((y > DBL_MIN) && (y < regPtr->left)) {
-		    regPtr->top = y;
-		}
-	    } else if (y < regPtr->top) {
-		regPtr->top = y;
-	    }
-	}		     
-    } else {
-	if ((elemPtr->yHigh.nValues > 0) && 
-	    (elemPtr->yHigh.max > regPtr->bottom)) {
-	    regPtr->bottom = elemPtr->yHigh.max;
-	}
-	if (elemPtr->yLow.nValues > 0) {
-	    double top;
-	    
-	    if ((elemPtr->yLow.min <= 0.0) && 
-		(elemPtr->axes.y->logScale)) {
-		top = Blt_FindElemValuesMinimum(&elemPtr->yLow, DBL_MIN);
-	    } else {
-		top = elemPtr->yLow.min;
-	    }
-	    if (top < regPtr->top) {
-		regPtr->top = top;
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestBar --
- *
- *	Find the bar segment closest to the window coordinates point
- *	specified.
- *
- *	Note:  This does not return the height of the stacked segment
- *	       (in graph coordinates) properly.
- *
- * Results:
- *	Returns 1 if the point is width any bar segment, otherwise 0.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-ClosestBarProc(
-    Graph *graphPtr,			/* Not used. */
-    Element *basePtr,			/* Bar element */
-    ClosestSearch *searchPtr)		/* Information about closest point in
-					 * element */
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    XRectangle *bp;
-    double minDist;
-    int imin;
-    int i;
-
-    minDist = searchPtr->dist;
-    imin = 0;
-    
-    for (bp = elemPtr->bars, i = 0; i < elemPtr->nBars; i++, bp++) {
-	Point2d *pp, *pend;
-	Point2d outline[5];
-	double left, right, top, bottom;
-
-	if (PointInRectangle(bp, searchPtr->x, searchPtr->y)) {
-	    imin = elemPtr->barToData[i];
-	    minDist = 0.0;
-	    break;
-	}
-	left = bp->x, top = bp->y;
-	right = (double)(bp->x + bp->width);
-	bottom = (double)(bp->y + bp->height);
-	outline[4].x = outline[3].x = outline[0].x = left;
-	outline[4].y = outline[1].y = outline[0].y = top;
-	outline[2].x = outline[1].x = right;
-	outline[3].y = outline[2].y = bottom;
-
-	for (pp = outline, pend = outline + 4; pp < pend; pp++) {
-	    Point2d t;
-	    double dist;
-
-	    t = Blt_GetProjection(searchPtr->x, searchPtr->y, pp, pp + 1);
-	    if (t.x > right) {
-		t.x = right;
-	    } else if (t.x < left) {
-		t.x = left;
-	    }
-	    if (t.y > bottom) {
-		t.y = bottom;
-	    } else if (t.y < top) {
-		t.y = top;
-	    }
-	    dist = hypot((t.x - searchPtr->x), (t.y - searchPtr->y));
-	    if (dist < minDist) {
-		minDist = dist;
-		imin = elemPtr->barToData[i];
-	    }
-	}
-    }
-    if (minDist < searchPtr->dist) {
-	searchPtr->elemPtr = (Element *)elemPtr;
-	searchPtr->dist = minDist;
-	searchPtr->index = imin;
-	searchPtr->point.x = (double)elemPtr->x.values[imin];
-	searchPtr->point.y = (double)elemPtr->y.values[imin];
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MergePens --
- *
- *	Reorders the both arrays of points and errorbars to merge pens.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The old arrays are freed and new ones allocated containing
- *	the reordered points and errorbars.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MergePens(BarElement *elemPtr, BarStyle **dataToStyle)
-{
-    if (Blt_Chain_GetLength(elemPtr->stylePalette) < 2) {
-	Blt_ChainLink link;
-	BarStyle *stylePtr;
-
-	link = Blt_Chain_FirstLink(elemPtr->stylePalette);
-
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->nBars = elemPtr->nBars;
-	stylePtr->bars = elemPtr->bars;
-	stylePtr->symbolSize = elemPtr->bars->width / 2;
-	stylePtr->xeb.length = elemPtr->xeb.length;
-	stylePtr->xeb.segments = elemPtr->xeb.segments;
-	stylePtr->yeb.length = elemPtr->yeb.length;
-	stylePtr->yeb.segments = elemPtr->yeb.segments;
-	return;
-    }
-    /* We have more than one style. Group bar segments of like pen styles
-     * together.  */
-
-    if (elemPtr->nBars > 0) {
-	Blt_ChainLink link;
-	XRectangle *bars, *bp;
-	int *ip, *barToData;
-
-	bars = Blt_AssertMalloc(elemPtr->nBars * sizeof(XRectangle));
-	barToData = Blt_AssertMalloc(elemPtr->nBars * sizeof(int));
-	bp = bars, ip = barToData;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    BarStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->symbolSize = bp->width / 2;
-	    stylePtr->bars = bp;
-	    for (i = 0; i < elemPtr->nBars; i++) {
-		int iData;
-
-		iData = elemPtr->barToData[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *bp++ = elemPtr->bars[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->nBars = bp - stylePtr->bars;
-	}
-	Blt_Free(elemPtr->bars);
-	Blt_Free(elemPtr->barToData);
-	elemPtr->bars = bars;
-	elemPtr->barToData = barToData;
-    }
-
-    if (elemPtr->xeb.length > 0) {
-	Blt_ChainLink link;
-	Segment2d *bars, *sp;
-	int *map, *ip;
-
-	bars = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(int));
-	sp = bars, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    BarStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->xeb.segments = sp;
-	    for (i = 0; i < elemPtr->xeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->xeb.map[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *sp++ = elemPtr->xeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->xeb.length = sp - stylePtr->xeb.segments;
-	}
-	Blt_Free(elemPtr->xeb.segments);
-	elemPtr->xeb.segments = bars;
-	Blt_Free(elemPtr->xeb.map);
-	elemPtr->xeb.map = map;
-    }
-    if (elemPtr->yeb.length > 0) {
-	Blt_ChainLink link;
-	Segment2d *bars, *sp;
-	int *map, *ip;
-
-	bars = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(int));
-	sp = bars, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    BarStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->yeb.segments = sp;
-	    for (i = 0; i < elemPtr->yeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->yeb.map[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *sp++ = elemPtr->yeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->yeb.length = sp - stylePtr->yeb.segments;
-	}
-	Blt_Free(elemPtr->yeb.segments);
-	elemPtr->yeb.segments = bars;
-	Blt_Free(elemPtr->yeb.map);
-	elemPtr->yeb.map = map;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapActiveBars --
- *
- *	Creates an array of points of the active graph coordinates.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the active point array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapActiveBars(BarElement *elemPtr)
-{
-    if (elemPtr->activeRects != NULL) {
-	Blt_Free(elemPtr->activeRects);
-	elemPtr->activeRects = NULL;
-    }
-    if (elemPtr->activeToData != NULL) {
-	Blt_Free(elemPtr->activeToData);
-	elemPtr->activeToData = NULL;
-    }
-    elemPtr->nActive = 0;
-
-    if (elemPtr->nActiveIndices > 0) {
-	XRectangle *activeRects;
-	int *activeToData;
-	int i;
-	int count;
-
-	activeRects = Blt_AssertMalloc(sizeof(XRectangle) * 
-				       elemPtr->nActiveIndices);
-	activeToData = Blt_AssertMalloc(sizeof(int) * 
-					elemPtr->nActiveIndices);
-	count = 0;
-	for (i = 0; i < elemPtr->nBars; i++) {
-	    int *ip, *iend;
-
-	    for (ip = elemPtr->activeIndices, 
-		     iend = ip + elemPtr->nActiveIndices; ip < iend; ip++) {
-		if (elemPtr->barToData[i] == *ip) {
-		    activeRects[count] = elemPtr->bars[i];
-		    activeToData[count] = i;
-		    count++;
-		}
-	    }
-	}
-	elemPtr->nActive = count;
-	elemPtr->activeRects = activeRects;
-	elemPtr->activeToData = activeToData;
-    }
-    elemPtr->flags &= ~ACTIVE_PENDING;
-}
-
-static void
-ResetBar(BarElement *elemPtr)
-{
-    /* Release any storage associated with the display of the bar */
-    ResetStylePalette(elemPtr->stylePalette);
-    if (elemPtr->activeRects != NULL) {
-	Blt_Free(elemPtr->activeRects);
-    }
-    if (elemPtr->activeToData != NULL) {
-	Blt_Free(elemPtr->activeToData);
-    }
-    if (elemPtr->xeb.segments != NULL) {
-	Blt_Free(elemPtr->xeb.segments);
-    }
-    if (elemPtr->xeb.map != NULL) {
-	Blt_Free(elemPtr->xeb.map);
-    }
-    if (elemPtr->yeb.segments != NULL) {
-	Blt_Free(elemPtr->yeb.segments);
-    }
-    if (elemPtr->yeb.map != NULL) {
-	Blt_Free(elemPtr->yeb.map);
-    }
-    if (elemPtr->bars != NULL) {
-	Blt_Free(elemPtr->bars);
-    }
-    if (elemPtr->barToData != NULL) {
-	Blt_Free(elemPtr->barToData);
-    }
-    elemPtr->activeToData = elemPtr->xeb.map = elemPtr->yeb.map = 
-	elemPtr->barToData = NULL;
-    elemPtr->activeRects = elemPtr->bars = NULL;
-    elemPtr->xeb.segments = elemPtr->yeb.segments = NULL;
-    elemPtr->nActive = elemPtr->xeb.length = elemPtr->yeb.length = 
-	elemPtr->nBars = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapErrorBars --
- *
- *	Creates two arrays of points and pen indices, filled with the screen
- *	coordinates of the visible
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the index array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapErrorBars(Graph *graphPtr, BarElement *elemPtr, BarStyle **dataToStyle)
-{
-    int n, nPoints;
-    Region2d reg;
-
-    Blt_GraphExtents(graphPtr, &reg);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (elemPtr->xError.nValues > 0) {
-	n = MIN(elemPtr->xError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->xHigh.nValues, elemPtr->xLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *bars;
-	Segment2d *segPtr;
-	int *map;
-	int *indexPtr;
-	int i;
-		
-	segPtr = bars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = map = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    BarStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = dataToStyle[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->xError.nValues > 0) {
-		    high = x + elemPtr->xError.values[i];
-		    low = x - elemPtr->xError.values[i];
-		} else {
-		    high = elemPtr->xHigh.values[i];
-		    low = elemPtr->xLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-
-		    p = Blt_Map2D(graphPtr, high, y, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, low, y, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Left cap */
-		    segPtr->p.x = segPtr->q.x = p.x;
-		    segPtr->p.y = p.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = p.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Right cap */
-		    segPtr->p.x = segPtr->q.x = q.x;
-		    segPtr->p.y = q.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = q.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->xeb.segments = bars;
-	elemPtr->xeb.length = segPtr - bars;
-	elemPtr->xeb.map = map;
-    }
-    if (elemPtr->yError.nValues > 0) {
-	n = MIN(elemPtr->yError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->yHigh.nValues, elemPtr->yLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *bars;
-	Segment2d *segPtr;
-	int *map;
-	int *indexPtr;
-	int i;
-		
-	segPtr = bars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = map = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    BarStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = dataToStyle[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->yError.nValues > 0) {
-		    high = y + elemPtr->yError.values[i];
-		    low = y - elemPtr->yError.values[i];
-		} else {
-		    high = elemPtr->yHigh.values[i];
-		    low = elemPtr->yLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-		    
-		    p = Blt_Map2D(graphPtr, x, high, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, x, low, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Top cap. */
-		    segPtr->p.y = segPtr->q.y = p.y;
-		    segPtr->p.x = p.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = p.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Bottom cap. */
-		    segPtr->p.y = segPtr->q.y = q.y;
-		    segPtr->p.x = q.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = q.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&reg, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->yeb.segments = bars;
-	elemPtr->yeb.length = segPtr - bars;
-	elemPtr->yeb.map = map;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapBarProc --
- *
- *	Calculates the actual window coordinates of the bar element.  The
- *	window coordinates are saved in the bar element structure.
- *
- * Results:
- *	None.
- *
- * Notes:
- *	A bar can have multiple segments (more than one x,y pairs).  In this
- *	case, the bar can be represented as either a set of non-contiguous
- *	bars or a single multi-segmented (stacked) bar.
- *
- *	The x-axis layout for a barchart may be presented in one of two ways.
- *	If abscissas are used, the bars are placed at those coordinates.
- *	Otherwise, the range will represent the number of values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapBarProc(Graph *graphPtr, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    BarStyle **dataToStyle;
-    double *x, *y;
-    double barWidth, barOffset;
-    double baseline, ybot;
-    int *barToData;			/* Maps bars to data point indices */
-    int invertBar;
-    int nPoints, count;
-    XRectangle *rp, *bars;
-    int i;
-    int size;
-
-    ResetBar(elemPtr);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (nPoints < 1) {
-	return;				/* No data points */
-    }
-    barWidth = graphPtr->barWidth;
-    barWidth = (elemPtr->barWidth > 0.0f) 
-	? elemPtr->barWidth : graphPtr->barWidth;
-    baseline = (elemPtr->axes.y->logScale) ? 0.0 : graphPtr->baseline;
-    barOffset = barWidth * 0.5;
-
-    /*
-     * Create an array of bars representing the screen coordinates of all the
-     * segments in the bar.
-     */
-    bars = Blt_AssertCalloc(nPoints, sizeof(XRectangle));
-    barToData = Blt_AssertCalloc(nPoints, sizeof(int));
-
-    x = elemPtr->x.values, y = elemPtr->y.values;
-    count = 0;
-    for (rp = bars, i = 0; i < nPoints; i++) {
-	Point2d c1, c2;			/* Two opposite corners of the rectangle
-					 * in graph coordinates. */
-	double dx, dy;
-	int height;
-	double right, left, top, bottom;
-
-	if (((x[i] - barWidth) > elemPtr->axes.x->axisRange.max) ||
-	    ((x[i] + barWidth) < elemPtr->axes.x->axisRange.min)) {
-	    continue;			/* Abscissa is out of range of the
-					 * x-axis */
-	}
-	c1.x = x[i] - barOffset;
-	c1.y = y[i];
-	c2.x = c1.x + barWidth;
-	c2.y = baseline;
-
-	/*
-	 * If the mode is "aligned" or "stacked" we need to adjust the x or y
-	 * coordinates of the two corners.
-	 */
-
-	if ((graphPtr->nBarGroups > 0) && (graphPtr->mode != BARS_INFRONT) && 
-	    (!graphPtr->stackAxes)) {
-	    Blt_HashEntry *hPtr;
-	    BarSetKey key;
-
-	    key.value = (float)x[i];
-	    key.axes = elemPtr->axes;
-	    key.axes.y = NULL;
-	    hPtr = Blt_FindHashEntry(&graphPtr->setTable, (char *)&key);
-	    if (hPtr != NULL) {
-		Blt_HashTable *tablePtr;
-		const char *name;
-
-		tablePtr = Blt_GetHashValue(hPtr);
-		name = (elemPtr->groupName != NULL) ? elemPtr->groupName : 
-		    elemPtr->axes.y->obj.name;
- 		hPtr = Blt_FindHashEntry(tablePtr, name);
-		if (hPtr != NULL) {
-		    BarGroup *groupPtr;
-		    double slice, width, offset;
-		    
-		    groupPtr = Blt_GetHashValue(hPtr);
-		    slice = barWidth / (double)graphPtr->maxBarSetSize;
-		    offset = (slice * groupPtr->index);
-		    if (graphPtr->maxBarSetSize > 1) {
-			offset += slice * 0.05;
-			slice *= 0.90;
-		    }
-		    switch (graphPtr->mode) {
-		    case BARS_STACKED:
-			groupPtr->count++;
-			c2.y = groupPtr->lastY;
-			c1.y += c2.y;
-			groupPtr->lastY = c1.y;
-			c1.x += offset;
-			c2.x = c1.x + slice;
-			break;
-			
-		    case BARS_ALIGNED:
-			slice /= groupPtr->nSegments;
-			c1.x += offset + (slice * groupPtr->count);
-			c2.x = c1.x + slice;
-			groupPtr->count++;
-			break;
-			
-		    case BARS_OVERLAP:
-			slice /= (groupPtr->nSegments + 1);
-			width = slice + slice;
-			groupPtr->count++;
-			c1.x += offset + 
-			    (slice * (groupPtr->nSegments - groupPtr->count));
-			c2.x = c1.x + width;
-			break;
-			
-		    case BARS_INFRONT:
-			break;
-		    }
-		}
-	    }
-	}
-	invertBar = FALSE;
-	if (c1.y < c2.y) {
-	    double temp;
-
-	    /* Handle negative bar values by swapping ordinates */
-	    temp = c1.y, c1.y = c2.y, c2.y = temp;
-	    invertBar = TRUE;
-	}
-	/*
-	 * Get the two corners of the bar segment and compute the rectangle
-	 */
-	ybot = c2.y;
-	c1 = Blt_Map2D(graphPtr, c1.x, c1.y, &elemPtr->axes);
-	c2 = Blt_Map2D(graphPtr, c2.x, c2.y, &elemPtr->axes);
-	if ((ybot == 0.0) && (elemPtr->axes.y->logScale)) {
-	    c2.y = graphPtr->bottom;
-	}
-	    
-	if (c2.y < c1.y) {
-	    double t;
-	    t = c1.y, c1.y = c2.y, c2.y = t;
-	}
-	if (c2.x < c1.x) {
-	    double t;
-	    t = c1.x, c1.x = c2.x, c2.x = t;
-	}
-	if ((c1.x > graphPtr->right) || (c2.x < graphPtr->left) || 
-	    (c1.y > graphPtr->bottom) || (c2.y < graphPtr->top)) {
-	    continue;
-	}
-	/* Bound the bars horizontally by the width of the graph window */
-	/* Bound the bars vertically by the position of the axis. */
-	if (graphPtr->stackAxes) {
-	    top = elemPtr->axes.y->screenMin;
-	    bottom = elemPtr->axes.y->screenMin + elemPtr->axes.y->screenRange;
-	    left = graphPtr->left;
-	    right = graphPtr->right;
-	} else {
-	    left = top = 0;
-	    bottom = Tk_Height(graphPtr->tkwin);
-	    right = Tk_Width(graphPtr->tkwin);
-	}
-	CLAMP(c1.y, top, bottom);
-	CLAMP(c2.y, top, bottom);
-	CLAMP(c1.x, left, right);
-	CLAMP(c2.x, left, right);
-	dx = FABS(c1.x - c2.x);
-	dy = FABS(c1.y - c2.y);
-	if ((dx == 0) || (dy == 0)) {
-	    continue;
-	}
-	height = (int)dy;
-	if (invertBar) {
-	    rp->y = (short int)MIN(c1.y, c2.y);
-	} else {
-	    rp->y = (short int)(MAX(c1.y, c2.y)) - height;
-	}
-	rp->x = (short int)MIN(c1.x, c2.x);
-	rp->width = (short int)dx + 1;
-	rp->width |= 0x1;
-	if (rp->width < 1) {
-	    rp->width = 1;
-	}
-	rp->height = height + 1;
-	if (rp->height < 1) {
-	    rp->height = 1;
-	}
-	barToData[count] = i;		/* Save the data index corresponding to
-					 * the rectangle */
-	count++;
-	rp++;
-    }
-    elemPtr->nBars = count;
-    elemPtr->bars = bars;
-    elemPtr->barToData = barToData;
-    if (elemPtr->nActiveIndices > 0) {
-	MapActiveBars(elemPtr);
-    }
-	
-    size = 20;
-    if (count > 0) {
-	size = bars->width;
-    }
-    {
-	Blt_ChainLink link;
-
-	/* Set the symbol size of all the pen styles. */
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    BarStyle *stylePtr;
-	    
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->symbolSize = size;
-	    stylePtr->errorBarCapWidth = 
-		(stylePtr->penPtr->errorBarCapWidth > 0) 
-		? stylePtr->penPtr->errorBarCapWidth : (size * 66666) / 100000;
-	    stylePtr->errorBarCapWidth /= 2;
-	}
-    }
-    dataToStyle = (BarStyle **)Blt_StyleMap((Element *)elemPtr);
-    if (((elemPtr->yHigh.nValues > 0) && (elemPtr->yLow.nValues > 0)) ||
-	((elemPtr->xHigh.nValues > 0) && (elemPtr->xLow.nValues > 0)) ||
-	(elemPtr->xError.nValues > 0) || (elemPtr->yError.nValues > 0)) {
-	MapErrorBars(graphPtr, elemPtr, dataToStyle);
-    }
-    MergePens(elemPtr, dataToStyle);
-    Blt_Free(dataToStyle);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSymbolProc --
- *
- * 	Draw a symbol centered at the given x,y window coordinate based upon
- * 	the element symbol type and size.
- *
- * Results:
- *	None.
- *
- * Problems:
- *	Most notable is the round-off errors generated when calculating the
- *	centered position of the symbol.  
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-DrawSymbolProc(Graph *graphPtr, Drawable drawable, Element *basePtr, 
-	       int x, int y, int size)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    BarPen *penPtr;
-    int radius;
-
-    penPtr = NORMALPEN(elemPtr);
-    if ((penPtr->fill == NULL) && (penPtr->outlineColor == NULL)) {
-	return;
-    }
-    radius = (size / 2);
-    size--;
-
-    x -= radius;
-    y -= radius;
-    if (penPtr->fillGC != NULL) {
-	XSetTSOrigin(graphPtr->display, penPtr->fillGC, x, y);
-    }
-    if (penPtr->stipple != None) {
-	XFillRectangle(graphPtr->display, drawable, penPtr->fillGC, x, y, 
-		       size, size);
-    } else {
-	Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, penPtr->fill, 
-		x, y, size, size, penPtr->borderWidth, penPtr->relief);
-    }
-    XDrawRectangle(graphPtr->display, drawable, penPtr->outlineGC, x, y, 
-		   size, size);
-    if (penPtr->fillGC != NULL) {
-	XSetTSOrigin(graphPtr->display, penPtr->fillGC, 0, 0);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawBarSegments --
- *
- * 	Draws each of the rectangular segments for the element.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawBarSegments(Graph *graphPtr, Drawable drawable, BarPen *penPtr,
-		XRectangle *bars, int nBars)
-{
-    XRectangle clip;
-
-    clip.x = graphPtr->left;
-    clip.y = graphPtr->top;
-    clip.width  = graphPtr->right - graphPtr->left + 1;
-    clip.height = graphPtr->bottom - graphPtr->top + 1;
-
-    if (penPtr->fill != NULL) {
-	XRectangle *rp, *rend;
-	int hasOutline;
-	int relief;
-
-	relief = (penPtr->relief == TK_RELIEF_SOLID) ? TK_RELIEF_FLAT:penPtr->relief;
-	hasOutline = ((relief == TK_RELIEF_FLAT) && (penPtr->outlineColor != NULL));
-	if (penPtr->stipple != None) {
-	    XSetClipRectangles(graphPtr->display, penPtr->fillGC, 0, 0, &clip, 1, 
-		YSorted);
-	}
-	Blt_SetBackgroundClipRectangles(graphPtr->tkwin, penPtr->fill, 0, 0, &clip, 
-		1, YSorted);
-	if (hasOutline) {
-	    XSetClipRectangles(graphPtr->display, penPtr->outlineGC, 0, 0, &clip, 
-		1, YSorted);
-	}
-	for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	    if (penPtr->stipple != None) {
-		XFillRectangle(graphPtr->display, drawable, penPtr->fillGC, 
-			       rp->x, rp->y, rp->width, rp->height);
-	    } else {
-		Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, 
-			penPtr->fill, rp->x, rp->y, rp->width, rp->height, 
-			penPtr->borderWidth, relief);
-	    }
-	    if (hasOutline) {
-		XDrawRectangle(graphPtr->display, drawable, penPtr->outlineGC, 
-			       rp->x, rp->y, rp->width, rp->height);
-	    }
-	}
-	Blt_UnsetBackgroundClipRegion(graphPtr->tkwin, penPtr->fill);
-	if (hasOutline) {
-	    XSetClipMask(graphPtr->display, penPtr->outlineGC, None);
-	}
-	if (penPtr->stipple != None) {
-	    XSetClipMask(graphPtr->display, penPtr->fillGC, None);
-	}
-    } else if (penPtr->outlineColor != NULL) {
-	XSetClipRectangles(graphPtr->display, penPtr->outlineGC, 0, 0, &clip, 
-			   1, YSorted);
-	XDrawRectangles(graphPtr->display, drawable, penPtr->outlineGC, bars, 
-			nBars);
-	XSetClipMask(graphPtr->display, penPtr->outlineGC, None);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawBarValues --
- *
- * 	Draws the numeric value of the bar.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawBarValues(Graph *graphPtr, Drawable drawable, BarElement *elemPtr,
-	      BarPen *penPtr, XRectangle *bars, int nBars, int *barToData)
-{
-    XRectangle *rp, *rend;
-    int count;
-    const char *fmt;
-    
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    count = 0;
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	Point2d anchorPos;
-	double x, y;
-	char string[TCL_DOUBLE_SPACE * 2 + 2];
-
-	x = elemPtr->x.values[barToData[count]];
-	y = elemPtr->y.values[barToData[count]];
-
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	if (graphPtr->inverted) {
-	    anchorPos.y = rp->y + rp->height * 0.5;
-	    anchorPos.x = rp->x + rp->width;
-	    if (x < graphPtr->baseline) {
-		anchorPos.x -= rp->width;
-	    } 
-	} else {
-	    anchorPos.x = rp->x + rp->width * 0.5;
-	    anchorPos.y = rp->y;
-	    if (y < graphPtr->baseline) {			
-		anchorPos.y += rp->height;
-	    }
-	}
-	Blt_DrawText(graphPtr->tkwin, drawable, string, &penPtr->valueStyle, 
-		     (int)anchorPos.x, (int)anchorPos.y);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawNormalBar --
- *
- *	Draws the rectangle representing the bar element.  If the relief
- *	option is set to "raised" or "sunken" and the bar borderwidth is set
- *	(borderwidth > 0), a 3D border is drawn around the bar.
- *
- *	Don't draw bars that aren't visible (i.e. within the limits of the
- *	axis).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawNormalBarProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    int count;
-    Blt_ChainLink link;
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	BarStyle *stylePtr;
-	BarPen *penPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = stylePtr->penPtr;
-	if (stylePtr->nBars > 0) {
-	    DrawBarSegments(graphPtr, drawable, penPtr, stylePtr->bars,
-		stylePtr->nBars);
-	}
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		       stylePtr->xeb.segments, stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		       stylePtr->yeb.segments, stylePtr->yeb.length);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			stylePtr->bars, stylePtr->nBars, 
-			elemPtr->barToData + count);
-	}
-	count += stylePtr->nBars;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawActiveBar --
- *
- *	Draws bars representing the active segments of the bar element.  If
- *	the -relief option is set (other than "flat") and the borderwidth is
- *	greater than 0, a 3D border is drawn around the each bar segment.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawActiveBarProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-
-    if (elemPtr->activePenPtr != NULL) {
-	BarPen *penPtr = elemPtr->activePenPtr;
-
-	if (elemPtr->nActiveIndices > 0) {
-	    if (elemPtr->flags & ACTIVE_PENDING) {
-		MapActiveBars(elemPtr);
-	    }
-	    DrawBarSegments(graphPtr, drawable, penPtr, elemPtr->activeRects, 
-			 elemPtr->nActive);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			elemPtr->activeRects, elemPtr->nActive, 
-			elemPtr->activeToData);
-	    }
-	} else if (elemPtr->nActiveIndices < 0) {
-	    DrawBarSegments(graphPtr, drawable, penPtr, elemPtr->bars, 
-			 elemPtr->nBars);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			elemPtr->bars, elemPtr->nBars, elemPtr->barToData);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SymbolToPostScript --
- *
- * 	Draw a symbol centered at the given x,y window coordinate based upon
- * 	the element symbol type and size.
- *
- * Results:
- *	None.
- *
- * Problems:
- *	Most notable is the round-off errors generated when calculating the
- *	centered position of the symbol.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-SymbolToPostScriptProc(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    Element *basePtr,
-    double x, double y,
-    int size)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    BarPen *penPtr;
-
-    penPtr = NORMALPEN(elemPtr);
-    if ((penPtr->fill == NULL) && (penPtr->outlineColor == NULL)) {
-	return;
-    }
-    /*
-     * Build a PostScript procedure to draw the fill and outline of the symbol
-     * after the path of the symbol shape has been formed
-     */
-    Blt_Ps_Append(ps, "\n"
-		  "/DrawSymbolProc {\n"
-		  "gsave\n    ");
-    if (penPtr->stipple != None) {
-	if (penPtr->fill != NULL) {
-	    Blt_Ps_XSetBackground(ps, Blt_BackgroundBorderColor(penPtr->fill));
-	    Blt_Ps_Append(ps, "    gsave fill grestore\n    ");
-	}
-	if (penPtr->outlineColor != NULL) {
-	    Blt_Ps_XSetForeground(ps, penPtr->outlineColor);
-	} else {
-	    Blt_Ps_XSetForeground(ps, Blt_BackgroundBorderColor(penPtr->fill));
-	}
-	Blt_Ps_XSetStipple(ps, graphPtr->display, penPtr->stipple);
-    } else if (penPtr->outlineColor != NULL) {
-	Blt_Ps_XSetForeground(ps, penPtr->outlineColor);
-	Blt_Ps_Append(ps, "    fill\n");
-    }
-    Blt_Ps_Append(ps, "  grestore\n");
-    Blt_Ps_Append(ps, "} def\n\n");
-    Blt_Ps_Format(ps, "%g %g %d Sq\n", x, y, size);
-}
-
-static void
-SegmentsToPostScript(Graph *graphPtr, Blt_Ps ps, BarPen *penPtr, 
-		     XRectangle *bars, int nBars)
-{
-    XRectangle *rp, *rend;
-
-    if ((penPtr->fill == NULL) && (penPtr->outlineColor == NULL)) {
-	return;
-    }
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	if ((rp->width < 1) || (rp->height < 1)) {
-	    continue;
-	}
-	if (penPtr->stipple != None) {
-	    Blt_Ps_Rectangle(ps, rp->x, rp->y, rp->width - 1, rp->height - 1);
-	    if (penPtr->fill != NULL) {
-		Blt_Ps_XSetBackground(ps,Blt_BackgroundBorderColor(penPtr->fill));
-		Blt_Ps_Append(ps, "gsave fill grestore\n");
-	    }
-	    if (penPtr->outlineColor != NULL) {
-		Blt_Ps_XSetForeground(ps, penPtr->outlineColor);
-	    } else {
-		Blt_Ps_XSetForeground(ps,Blt_BackgroundBorderColor(penPtr->fill));
-	    }
-	    Blt_Ps_XSetStipple(ps, graphPtr->display, penPtr->stipple);
-	} else if (penPtr->outlineColor != NULL) {
-	    Blt_Ps_XSetForeground(ps, penPtr->outlineColor);
-	    Blt_Ps_XFillRectangle(ps, (double)rp->x, (double)rp->y, 
-		(int)rp->width - 1, (int)rp->height - 1);
-	}
-	if ((penPtr->fill != NULL) && (penPtr->borderWidth > 0) && 
-	    (penPtr->relief != TK_RELIEF_FLAT)) {
-	    Blt_Ps_Draw3DRectangle(ps, Blt_BackgroundBorder(penPtr->fill), 
-		(double)rp->x, (double)rp->y, (int)rp->width, (int)rp->height,
-		penPtr->borderWidth, penPtr->relief);
-	}
-    }
-}
-
-static void
-BarValuesToPostScript(Graph *graphPtr, Blt_Ps ps, BarElement *elemPtr,
-		      BarPen *penPtr, XRectangle *bars, int nBars, 
-		      int *barToData)
-{
-    XRectangle *rp, *rend;
-    int count;
-    const char *fmt;
-    char string[TCL_DOUBLE_SPACE * 2 + 2];
-    double x, y;
-    Point2d anchorPos;
-    
-    count = 0;
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	x = elemPtr->x.values[barToData[count]];
-	y = elemPtr->y.values[barToData[count]];
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	if (graphPtr->inverted) {
-	    anchorPos.y = rp->y + rp->height * 0.5;
-	    anchorPos.x = rp->x + rp->width;
-	    if (x < graphPtr->baseline) {
-		anchorPos.x -= rp->width;
-	    } 
-	} else {
-	    anchorPos.x = rp->x + rp->width * 0.5;
-	    anchorPos.y = rp->y;
-	    if (y < graphPtr->baseline) {			
-		anchorPos.y += rp->height;
-	    }
-	}
-	Blt_Ps_DrawText(ps, string, &penPtr->valueStyle, anchorPos.x, 
-		anchorPos.y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActiveBarToPostScript --
- *
- *	Similar to the NormalBarToPostScript procedure, generates PostScript
- *	commands to display the bars representing the active bar segments of
- *	the element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-ActiveBarToPostScriptProc(Graph *graphPtr, Blt_Ps ps, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-
-    if (elemPtr->activePenPtr != NULL) {
-	BarPen *penPtr = elemPtr->activePenPtr;
-	
-	if (elemPtr->nActiveIndices > 0) {
-	    if (elemPtr->flags & ACTIVE_PENDING) {
-		MapActiveBars(elemPtr);
-	    }
-	    SegmentsToPostScript(graphPtr, ps, penPtr, elemPtr->activeRects,
-		elemPtr->nActive);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		   elemPtr->activeRects, elemPtr->nActive, elemPtr->activeToData);
-	    }
-	} else if (elemPtr->nActiveIndices < 0) {
-	    SegmentsToPostScript(graphPtr, ps, penPtr, elemPtr->bars, 
-		elemPtr->nBars);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		   elemPtr->bars, elemPtr->nBars, elemPtr->barToData);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NormalBarToPostScript --
- *
- *	Generates PostScript commands to form the bars representing the
- *	segments of the bar element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-NormalBarToPostScriptProc(Graph *graphPtr, Blt_Ps ps, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-    Blt_ChainLink link;
-    int count;
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	BarStyle *stylePtr;
-	BarPen *penPtr;
-	XColor *colorPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = stylePtr->penPtr;
-	if (stylePtr->nBars > 0) {
-	    SegmentsToPostScript(graphPtr, ps, penPtr, stylePtr->bars, 
-		stylePtr->nBars);
-	}
-	colorPtr = penPtr->errorBarColor;
-	if (colorPtr == COLOR_DEFAULT) {
-	    colorPtr = penPtr->outlineColor;
-	}
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, penPtr->errorBarLineWidth, 
-		NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->xeb.segments,
-		stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, penPtr->errorBarLineWidth, 
-		NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->yeb.segments, 
-		stylePtr->yeb.length);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		stylePtr->bars, stylePtr->nBars, elemPtr->barToData + count);
-	}
-	count += stylePtr->nBars;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyBar --
- *
- *	Release memory and resources allocated for the bar element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the bar element is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyBarProc(Graph *graphPtr, Element *basePtr)
-{
-    BarElement *elemPtr = (BarElement *)basePtr;
-
-    DestroyBarPen(graphPtr, elemPtr->builtinPenPtr);
-    if (elemPtr->activePenPtr != NULL) {
-	Blt_FreePen((Pen *)elemPtr->activePenPtr);
-    }
-    ResetBar(elemPtr);
-    if (elemPtr->stylePalette != NULL) {
-	Blt_FreeStylePalette(elemPtr->stylePalette);
-	Blt_Chain_Destroy(elemPtr->stylePalette);
-    }
-    if (elemPtr->activeIndices != NULL) {
-	Blt_Free(elemPtr->activeIndices);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BarElement --
- *
- *	Allocate memory and initialize methods for the new bar element.
- *
- * Results:
- *	The pointer to the newly allocated element structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the bar element structure.
- *
- *---------------------------------------------------------------------------
- */
-
-static ElementProcs barProcs = {
-    ClosestBarProc,
-    ConfigureBarProc,
-    DestroyBarProc,
-    DrawActiveBarProc,
-    DrawNormalBarProc,
-    DrawSymbolProc,
-    GetBarExtentsProc,
-    ActiveBarToPostScriptProc,
-    NormalBarToPostScriptProc,
-    SymbolToPostScriptProc,
-    MapBarProc,
-};
-
-
-Element *
-Blt_BarElement(Graph *graphPtr, const char *name, ClassId classId)
-{
-    BarElement *elemPtr;
-
-    elemPtr = Blt_AssertCalloc(1, sizeof(BarElement));
-    elemPtr->procsPtr = &barProcs;
-    elemPtr->configSpecs = barElemConfigSpecs;
-    elemPtr->legendRelief = TK_RELIEF_FLAT;
-    Blt_GraphSetObjectClass(&elemPtr->obj, classId);
-    elemPtr->obj.name = Blt_AssertStrdup(name);
-    elemPtr->obj.graphPtr = graphPtr;
-    /* By default, an element's name and label are the same. */
-    elemPtr->label = Blt_AssertStrdup(name);
-    elemPtr->builtinPenPtr = &elemPtr->builtinPen;
-    InitializeBarPen(elemPtr->builtinPenPtr);
-    elemPtr->stylePalette = Blt_Chain_Create();
-    bltBarStylesOption.clientData = (ClientData)sizeof(BarStyle);
-    return (Element *)elemPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitBarSetTable --
- *
- *	Generate a table of abscissa frequencies.  Duplicate x-coordinates
- *	(depending upon the bar drawing mode) indicate that something special
- *	should be done with each bar segment mapped to the same abscissa
- *	(i.e. it should be stacked, aligned, or overlay-ed with other segments)
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is allocated for the bar element structure.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_InitBarSetTable(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-    int nStacks, nSegs;
-    Blt_HashTable setTable;
-    int sum, max;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    /*
-     * Free resources associated with a previous frequency table. This includes
-     * the array of frequency information and the table itself
-     */
-    Blt_DestroyBarSets(graphPtr);
-    if (graphPtr->mode == BARS_INFRONT) {
-	return;				/* No set table is needed for
-					 * "infront" mode */
-    }
-    Blt_InitHashTable(&graphPtr->setTable, sizeof(BarSetKey) / sizeof(int));
-
-    /*
-     * Initialize a hash table and fill it with unique abscissas.  Keep track
-     * of the frequency of each x-coordinate and how many abscissas have
-     * duplicate mappings.
-     */
-    Blt_InitHashTable(&setTable, sizeof(BarSetKey) / sizeof(int));
-    nSegs = nStacks = 0;
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	BarElement *elemPtr;
-	double *x, *xend;
-	int nPoints;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & HIDE) || (elemPtr->obj.classId != CID_ELEM_BAR)) {
-	    continue;
-	}
-	nSegs++;
-	nPoints = NUMBEROFPOINTS(elemPtr);
-	for (x = elemPtr->x.values, xend = x + nPoints; x < xend; x++) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashTable *tablePtr;
-	    BarSetKey key;
-	    int isNew;
-	    size_t count;
-	    const char *name;
-
-	    key.value = *x;
-	    key.axes = elemPtr->axes;
-	    key.axes.y = NULL;
-	    hPtr = Blt_CreateHashEntry(&setTable, (char *)&key, &isNew);
-	    if (isNew) {
-		tablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-		Blt_InitHashTable(tablePtr, BLT_STRING_KEYS);
-		Blt_SetHashValue(hPtr, tablePtr);
-	    } else {
-		tablePtr = Blt_GetHashValue(hPtr);
-	    }
-	    name = (elemPtr->groupName != NULL) ? elemPtr->groupName : 
-		elemPtr->axes.y->obj.name;
-	    hPtr = Blt_CreateHashEntry(tablePtr, name, &isNew);
-	    if (isNew) {
-		count = 1;
-	    } else {
-		count = (size_t)Blt_GetHashValue(hPtr);
- 		count++;
-	    }		
-	    Blt_SetHashValue(hPtr, (ClientData)count);
-	}
-    }
-    if (setTable.numEntries == 0) {
-	return;				/* No bar elements to be displayed */
-    }
-    sum = max = 0;
-    for (hPtr = Blt_FirstHashEntry(&setTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	Blt_HashEntry *hPtr2;
-	BarSetKey *keyPtr;
-	int isNew;
-
-	keyPtr = (BarSetKey *)Blt_GetHashKey(&setTable, hPtr);
-	hPtr2 = Blt_CreateHashEntry(&graphPtr->setTable, (char *)keyPtr,&isNew);
-	tablePtr = Blt_GetHashValue(hPtr);
-	Blt_SetHashValue(hPtr2, tablePtr);
-	if (max < tablePtr->numEntries) {
-	    max = tablePtr->numEntries;	/* # of stacks in group. */
-	}
-	sum += tablePtr->numEntries;
-    }
-    Blt_DeleteHashTable(&setTable);
-    if (sum > 0) {
-	BarGroup *groupPtr;
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	graphPtr->barGroups = Blt_AssertCalloc(sum, sizeof(BarGroup));
-	groupPtr = graphPtr->barGroups;
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->setTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    BarSetKey *keyPtr;
-	    Blt_HashTable *tablePtr;
-	    Blt_HashEntry *hPtr2;
-	    Blt_HashSearch iter2;
-	    size_t xcount;
-
-	    tablePtr = Blt_GetHashValue(hPtr);
-	    keyPtr = (BarSetKey *)Blt_GetHashKey(&setTable, hPtr);
-	    xcount = 0;
-	    for (hPtr2 = Blt_FirstHashEntry(tablePtr, &iter2); hPtr2!=NULL;
-		 hPtr2 = Blt_NextHashEntry(&iter2)) {
-		size_t count;
-
-		count = (size_t)Blt_GetHashValue(hPtr2);
-		groupPtr->nSegments = count;
-		groupPtr->axes = keyPtr->axes;
-		Blt_SetHashValue(hPtr2, groupPtr);
-		groupPtr->index = xcount++;
-		groupPtr++;
-	    }
-	}
-    }
-    graphPtr->maxBarSetSize = max;
-    graphPtr->nBarGroups = sum;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ComputeStacks --
- *
- *	Determine the height of each stack of bar segments.  A stack is created
- *	by designating two or more points with the same abscissa.  Each ordinate
- *	defines the height of a segment in the stack.  This procedure simply
- *	looks at all the data points summing the heights of each stacked
- *	segment. The sum is saved in the frequency information table.  This
- *	value will be used to calculate the y-axis limits (data limits aren't
- *	sufficient).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The heights of each stack is computed. CheckBarGroups will use this
- *	information to adjust the y-axis limits if necessary.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ComputeBarStacks(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    if ((graphPtr->mode != BARS_STACKED) || (graphPtr->nBarGroups == 0)) {
-	return;
-    }
-
-    /* Initialize the stack sums to zero. */
-    {
-	BarGroup *gp, *gend;
-
-	for (gp = graphPtr->barGroups, gend = gp + graphPtr->nBarGroups; 
-	     gp < gend; gp++) {
-	    gp->sum = 0.0;
-	}
-    }
-
-    /* Consider each bar x-y coordinate. Add the ordinates of duplicate
-     * abscissas. */
-
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	BarElement *elemPtr;
-	double *x, *y, *xend;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & HIDE) || (elemPtr->obj.classId != CID_ELEM_BAR)) {
-	    continue;
-	}
-	for (x = elemPtr->x.values, y = elemPtr->y.values, 
-		 xend = x + NUMBEROFPOINTS(elemPtr); x < xend; x++, y++) {
-	    BarSetKey key;
-	    BarGroup *groupPtr;
-	    Blt_HashEntry *hPtr;
-	    Blt_HashTable *tablePtr;
-	    const char *name;
-
-	    key.value = *x;
-	    key.axes = elemPtr->axes;
-	    key.axes.y = NULL;
-	    hPtr = Blt_FindHashEntry(&graphPtr->setTable, (char *)&key);
-	    if (hPtr == NULL) {
-		continue;
-	    }
-	    tablePtr = Blt_GetHashValue(hPtr);
-	    name = (elemPtr->groupName != NULL) ? elemPtr->groupName : 
-		elemPtr->axes.y->obj.name;
-	    hPtr = Blt_FindHashEntry(tablePtr, name);
-	    if (hPtr == NULL) {
-		continue;
-	    }
-	    groupPtr = Blt_GetHashValue(hPtr);
-	    groupPtr->sum += *y;
-	}
-    }
-}
-
-void
-Blt_ResetBarGroups(Graph *graphPtr)
-{
-    BarGroup *gp, *gend;
-
-    for (gp = graphPtr->barGroups, gend = gp + graphPtr->nBarGroups; gp < gend; 
-	 gp++) {
-	gp->lastY = 0.0;
-	gp->count = 0;
-    }
-}
-
-void
-Blt_DestroyBarSets(Graph *graphPtr)
-{
-    Blt_HashSearch iter;
-    Blt_HashEntry *hPtr;
-
-    if (graphPtr->barGroups != NULL) {
-	Blt_Free(graphPtr->barGroups);
-	graphPtr->barGroups = NULL;
-    }
-    graphPtr->nBarGroups = 0;
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->setTable, &iter); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashTable(tablePtr);
-	Blt_Free(tablePtr);
-    }
-    Blt_DeleteHashTable(&graphPtr->setTable);
-    Blt_InitHashTable(&graphPtr->setTable, sizeof(BarSetKey) / sizeof(int));
-}
diff --git a/blt3.0/src/bltGrContour.c b/blt3.0/src/bltGrContour.c
deleted file mode 100644
index 76251b3..0000000
--- a/blt3.0/src/bltGrContour.c
+++ /dev/null
@@ -1,2798 +0,0 @@
-
-/*
- * bltGrContour.c --
- *
- * This module implements contour elements for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include <X11/Xutil.h>
-
-#include "bltGrElem.h"
-
-/* 
- * .c element create 
- * .c level create name 0 0 -min -max -foreground -linewidth -background -color 
- * .c level configure 
- * .c level closest x y 
- * .c element closest x y 
- * .c element level add x y z 
- */
-typedef struct {
-    float x, y;
-} MeshKey;
-
-typedef struct {
-    float x, y, z;
-}  Point3;
-
-typedef struct {
-    Point3 *A, Point3 *B;	/* Index of two edge points in x, y, and
-				 * z vectors. */
-} Edge;
-
-typedef struct {
-    Edge *AB, *BC, *AC;
-} Triangle;
-
-typedef struct {
-    double min, max;		/* Minimum and maximum values for the triangle
-				 * indexed at the same value. */
-} Limits;
-
-typedef struct {
-    ElemValues *x, *y;
-} MeshKey;
-
-typedef struct {
-    int refCount;		/* Indicates how many contour elements are
-				 * using this mesh.  When refCount is zero, it
-				 * means that this mesh can be destroyed. */
-
-    ElemValues *x, *y;		/* The x and y vectors containing the points
-				 * of the mesh. */
-
-    long nPoints;		/* The number of points in the mesh */
-    
-    Edge *edges;		/* Array of edges generated from the points. */
-    long nEdges;		/* # of edges in above array. */
-
-    Triangle *triangles;	/* Array of triangles generated from the
-				 * edges. */
-    long nTriangles;		/* # of triangles in the above array. */
-} TriMesh;
-
-typedef struct  {
-    Point2d a, b, c;		/* Filled triangle. */
-    struct Polygon3 *next;
-} Polygon3;
-
-typedef struct  {
-    Point2d a, b, c, d;		/* Filled quadrilateral. */
-    struct Polygon4 *next;
-} Polygon4;
-
-typedef struct {
-    char *name;			/*  */
-    char *label;		/* Label to be displayed in the legend. */
-    double min, max;
-
-    int symbol;			/* Symbol to be displayed at each point. */
-    int lineWidth;		/* Width of contour line.  */
-    Dashes dashes;
-    XColor *bgColor, *fgColor;
-    GC fillGC;
-    GC lineGC;
-
-    Polygon4 *quadilaterals;
-    int nQuads;
-    Polygon3 *triangles;
-    int nTriangles;
-    Segment2d *segments;
-    int nSegments;
-} ContourLevel;
-
-typedef struct {
-    GraphObj obj;		/* Must be first field in element. */
-
-    unsigned int flags;		
-
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to elements. */
-
-    char *label;		/* Label displayed in legend. There may be
-				 * sub-labels for each contour range/value. */
-    unsigned short row, col;  	/* Position of the entry in the legend. */
-
-    int legendRelief;		/* Relief of label in legend. */
-
-    Axis2d axes;		/* X-axis and Y-axis mapping the element */
-
-    ElemValues x, y, w;		/* Contains array of floating point graph
-				 * coordinate values. Also holds min/max and
-				 * the number of coordinates */
-
-
-    int *activeIndices;		/* Array of indices (malloc-ed) which indicate
-				 * which data points are active (drawn with
-				 * "active" colors). */
-
-    int nActiveIndices;		/* Number of active data points.  Special
-				 * case: if nActiveIndices < 0 and the active
-				 * bit is set in "flags", then all data points
-				 * are drawn active. */
-
-    ElementProcs *procsPtr;
-
-    Blt_ConfigSpec *configSpecs; /* Configuration specifications. */
-
-    Pen *activePenPtr;		/* Standard Pens */
-    Pen *normalPenPtr;
-    Pen *builtinPenPtr;
-
-    /* There is no style for a particular x, y */
-    Blt_Chain stylePalette;	/* Palette of pens. */
-
-    /* Symbol scaling */
-    int scaleSymbols;		/* If non-zero, the symbols will scale in size
-				 * as the graph is zoomed in/out.  */
-
-    double xRange, yRange;	/* Initial X-axis and Y-axis ranges: used to
-				 * scale the size of element's symbol. */
-    int state;
-
-    TriMesh *meshPtr;		/* Mesh associated with contour data set. */
-    ElemValues z;
-    Limits *limits;		/* Array of limits (min/max) associated with
-				 * each triangle in the above mesh. */
-
-} ContourElement;
-
-
-typedef struct {
-    float x1, y1, x2, y2;
-} BarRegion;
-
-typedef struct {
-    char *name;			/* Pen style identifier.  If NULL pen was
-				 * statically allocated. */
-    ClassId classId;		/* Type of pen */
-    char *typeId;		/* String token identifying the type of pen */
-    unsigned int flags;		/* Indicates if the pen element is active or
-				 * normal */
-    int refCount;		/* Reference count for elements using
-				 * this pen. */
-    Blt_HashEntry *hashPtr;
-
-    Blt_ConfigSpec *configSpecs; /* Configuration specifications */
-
-    PenConfigureProc *configProc;
-    PenDestroyProc *destroyProc;
-    Graph *graphPtr;		/* Graph that the pen is associated with. */
-
-    /* Contour Plot specific pen fields start here. */
-
-    XColor *fgColor;		/* Foreground color of bar */
-    Blt_Background bg;		/* 3D border and background color */
-    int borderWidth;		/* 3D border width of bar */
-    int relief;			/* Relief of the bar */
-    Pixmap stipple;		/* Stipple */
-    GC gc;			/* Graphics context */
-
-    /* Error bar attributes. */
-    int errorBarShow;		/* Describes which error bars to display:
-				 * none, x, y, or * both. */
-
-    int errorBarLineWidth;	/* Width of the error bar segments. */
-
-    int errorBarCapWidth;
-    XColor *errorBarColor;	/* Color of the error bar. */
-
-    GC errorBarGC;		/* Error bar graphics context. */
-
-    /* Show value attributes. */
-    int valueShow;		/* Indicates whether to display data value.
-				 * Values are x, y, or none. */
-
-    char *valueFormat;		/* A printf format string. */
-    TextStyle valueStyle;	/* Text attributes (color, font, rotation,
-				 * etc.) of the value. */
-    
-} ContourPen;
-
-typedef struct {
-    Weight weight;		/* Weight range where this pen is valid. */
-    ContourPen *penPtr;		/* Pen to use. */
-
-    XRectangle *bars;		/* Indicates starting location in bar array
-				 * for this pen. */
-    int nBars;			/* Number of bar segments for this pen. */
-
-    GraphSegments xeb, yeb;	/* X and Y error bars. */
-
-    int symbolSize;		/* Size of the pen's symbol scaled to the
-				 * current graph size. */
-    int errorBarCapWidth;	/* Length of the cap ends on each error
-				 * bar. */
-
-} ContourStyle;
-
-
-typedef struct {
-    GraphObj obj;		/* Must be first field in element. */
-    unsigned int flags;		
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to elements. */
-
-    char *label;		/* Label displayed in legend */
-
-    int legendRelief;		/* Relief of label in legend. */
-
-    Axis2d axes;		/* X-axis and Y-axis mapping the element */
-
-    ElemValues x, y, w;		/* Contains array of floating point graph
-				 * coordinate values. Also holds min/max and
-				 * the number of coordinates */
-
-    int *activeIndices;		/* Array of indices (malloc-ed) which indicate
-				 * which data points are active (drawn with
-				 * "active" colors). */
-
-    int nActiveIndices;		/* Number of active data points.  Special
-				 * case: if nActiveIndices < 0 and the active
-				 * bit is set in "flags", then all data points
-				 * are drawn active. */
-
-    ElementProcs *procsPtr;
-
-    Blt_ConfigSpec *configSpecs; /* Configuration specifications. */
-
-    ContourPen *activePenPtr;	/* Standard Pens */
-    ContourPen *normalPenPtr;
-    ContourPen *builtinPenPtr;
-
-    Blt_Chain stylePalette;	/* Palette of pens. */
-
-    /* Symbol scaling */
-    int scaleSymbols;		/* If non-zero, the symbols will scale in size
-				 * as the graph is zoomed in/out.  */
-
-    double xRange, yRange;	/* Initial X-axis and Y-axis ranges: used to
-				 * scale the size of element's symbol. */
-    int state;
-
-    /* Fields specific to the contour element */
-
-    float barWidth;
-
-    int *barToData;
-    XRectangle *bars;	        /* Array of rectangles comprising the bar
-				 * segments of the element. */
-    int *activeToData;
-    XRectangle *activeRects;
-
-    int nBars;			/* # of visible bar segments for element */
-    int nActive;
-
-    ContourPen builtinPen;
-
-    ElemValues z;		/* Contains array of floating point graph
-				 * coordinate values. Also holds min/max and
-				 * the number of coordinates */
-    Triangle *triangles;
-    int nTriangles;
-
-} ContourElement;
-
-BLT_EXTERN Blt_CustomOption bltContourPenOption;
-BLT_EXTERN Blt_CustomOption bltValuesOption;
-BLT_EXTERN Blt_CustomOption bltValuePairsOption;
-BLT_EXTERN Blt_CustomOption bltXAxisOption;
-BLT_EXTERN Blt_CustomOption bltYAxisOption;
-BLT_EXTERN Blt_CustomOption bltColorOption;
-BLT_EXTERN Blt_CustomOption bltContourStylesOption;
-
-static Blt_OptionParseProc ObjToBarMode;
-static Blt_OptionPrintProc BarModeToObj;
-Blt_CustomOption bltBarModeOption =
-{
-    ObjToBarMode, BarModeToObj, NULL, (ClientData)0
-};
-
-#define DEF_CONTOUR_ACTIVE_PEN		"activeBar"
-#define DEF_CONTOUR_AXIS_X		"x"
-#define DEF_CONTOUR_AXIS_Y		"y"
-#define DEF_CONTOUR_BACKGROUND		"navyblue"
-#define DEF_CONTOUR_BORDERWIDTH		"2"
-#define DEF_CONTOUR_ERRORBAR_COLOR	"defcolor"
-#define DEF_CONTOUR_ERRORBAR_LINE_WIDTH	"1"
-#define DEF_CONTOUR_ERRORBAR_CAP_WIDTH	"1"
-#define DEF_CONTOUR_FOREGROUND		"blue"
-#define DEF_CONTOUR_HIDE		"no"
-#define DEF_CONTOUR_LABEL_RELIEF	"flat"
-#define DEF_CONTOUR_NORMAL_STIPPLE	""
-#define DEF_CONTOUR_RELIEF		"raised"
-#define DEF_CONTOUR_SHOW_ERRORBARS	"both"
-#define DEF_CONTOUR_STATE		"normal"
-#define DEF_CONTOUR_STYLES		""
-#define DEF_CONTOUR_TAGS		"all"
-#define DEF_CONTOUR_WIDTH		"0.0"
-
-#define DEF_PEN_ACTIVE_BACKGROUND	"red"
-#define DEF_PEN_ACTIVE_FOREGROUND     	"pink"
-#define DEF_PEN_BORDERWIDTH		"2"
-#define DEF_PEN_NORMAL_BACKGROUND	"navyblue"
-#define DEF_PEN_NORMAL_FOREGROUND	"blue"
-#define DEF_PEN_RELIEF			"raised"
-#define DEF_PEN_STIPPLE			""
-#define DEF_PEN_TYPE			"bar"
-#define	DEF_PEN_VALUE_ANCHOR		"s"
-#define	DEF_PEN_VALUE_COLOR		RGB_BLACK
-#define	DEF_PEN_VALUE_FONT		STD_FONT_SMALL
-#define	DEF_PEN_VALUE_FORMAT		"%g"
-#define DEF_PEN_SHOW_VALUES		"no"
-
-static Blt_ConfigSpec contourPenConfigSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_PEN_ACTIVE_BACKGROUND, Blt_Offset(ContourPen, bg),
-	BLT_CONFIG_NULL_OK | ACTIVE_PEN},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_PEN_NORMAL_BACKGROUND, Blt_Offset(ContourPen, bg),
-	BLT_CONFIG_NULL_OK | NORMAL_PEN},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_PEN_BORDERWIDTH, Blt_Offset(ContourPen, borderWidth), ALL_PENS},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_CONTOUR_ERRORBAR_COLOR, Blt_Offset(ContourPen, errorBarColor), 
-	ALL_PENS, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth","ErrorBarWidth",
-	DEF_CONTOUR_ERRORBAR_LINE_WIDTH, Blt_Offset(ContourPen, errorBarLineWidth),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-	DEF_CONTOUR_ERRORBAR_CAP_WIDTH, Blt_Offset(ContourPen, errorBarCapWidth),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL,
-	(char *)NULL, 0, ALL_PENS},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_PEN_ACTIVE_FOREGROUND, Blt_Offset(ContourPen, fgColor),
-	ACTIVE_PEN | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_PEN_NORMAL_FOREGROUND, Blt_Offset(ContourPen, fgColor),
-	NORMAL_PEN |  BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_PEN_RELIEF, Blt_Offset(ContourPen, relief), ALL_PENS},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_CONTOUR_SHOW_ERRORBARS, Blt_Offset(ContourPen, errorBarShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(ContourPen, valueShow),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_PEN_STIPPLE, 
-	Blt_Offset(ContourPen, stipple), ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-type", (char *)NULL, (char *)NULL, DEF_PEN_TYPE, 
-	Blt_Offset(ContourPen, typeId), ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, Blt_Offset(ContourPen, valueStyle.anchor), 
-	ALL_PENS},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, Blt_Offset(ContourPen, valueStyle.color), 
-	ALL_PENS},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, Blt_Offset(ContourPen, valueStyle.font), 
-	ALL_PENS},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(ContourPen, valueFormat),
-	ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	(char *)NULL, Blt_Offset(ContourPen, valueStyle.angle), ALL_PENS},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Blt_ConfigSpec contourElemConfigSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen",
-	DEF_CONTOUR_ACTIVE_PEN, Blt_Offset(ContourElement, activePenPtr), 
-	BLT_CONFIG_NULL_OK, &bltContourPenOption},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_CONTOUR_BACKGROUND, Blt_Offset(ContourElement, builtinPen.bg),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-barwidth", "barWidth", "BarWidth", DEF_CONTOUR_WIDTH,
-	Blt_Offset(ContourElement, barWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_CONTOUR_TAGS, 
-	Blt_Offset(ContourElement, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_CONTOUR_BORDERWIDTH, 
-	Blt_Offset(ContourElement, builtinPen.borderWidth), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-data", "data", "Data", (char *)NULL, 0, 0, 
-	&bltValuePairsOption},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_CONTOUR_FOREGROUND, Blt_Offset(ContourElement, builtinPen.fgColor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-label", "label", "Label", (char *)NULL, 
-	Blt_Offset(ContourElement, label), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief",
-	DEF_CONTOUR_LABEL_RELIEF, Blt_Offset(ContourElement, legendRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_CONTOUR_HIDE, 
-         Blt_Offset(ContourElement, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_CONTOUR_AXIS_X, 
-	Blt_Offset(ContourElement, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_CONTOUR_AXIS_Y, 
-	Blt_Offset(ContourElement, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_CUSTOM, "-pen", "pen", "Pen", (char *)NULL, 
-	Blt_Offset(ContourElement, normalPenPtr), BLT_CONFIG_NULL_OK, 
-	&bltContourPenOption},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_CONTOUR_RELIEF, 
-	Blt_Offset(ContourElement, builtinPen.relief), 0},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(ContourElement, builtinPen.valueShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_CONTOUR_STATE, 
-	Blt_Offset(ContourElement, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple",
-	DEF_CONTOUR_NORMAL_STIPPLE, 
-	Blt_Offset(ContourElement, builtinPen.stipple), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", DEF_CONTOUR_STYLES, 
-	Blt_Offset(ContourElement, stylePalette), 0, &bltContourStylesOption},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, Blt_Offset(ContourElement, builtinPen.valueStyle.anchor), 0},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, 
-	Blt_Offset(ContourElement, builtinPen.valueStyle.color), 0},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", 
-	DEF_PEN_VALUE_FONT, 
-	Blt_Offset(ContourElement, builtinPen.valueStyle.font), 0},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, 
-	Blt_Offset(ContourElement, builtinPen.valueFormat),
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	(char *)NULL, Blt_Offset(ContourElement, builtinPen.valueStyle.angle), 
-	0},
-    {BLT_CONFIG_CUSTOM, "-weights", "weights", "Weights", (char *)NULL, 
-	Blt_Offset(ContourElement, w), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-x", "xdata", "Xdata", (char *)NULL, 
-	Blt_Offset(ContourElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-y", "ydata", "Ydata", (char *)NULL, 
-	Blt_Offset(ContourElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-z", "zdata", "Zdata", (char *)NULL, 
-	Blt_Offset(ContourElement, z), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xdata", "xdata", "Xdata", (char *)NULL, 
-	Blt_Offset(ContourElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ydata", "ydata", "Ydata", (char *)NULL, 
-	Blt_Offset(ContourElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-zdata", "zdata", "Zdata", (char *)NULL, 
-	Blt_Offset(ContourElement, z), 0, &bltValuesOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/* Forward declarations */
-static PenConfigureProc ConfigureContourPenProc;
-static PenDestroyProc DestroyContourPenProc;
-static ElementClosestProc ClosestBarProc;
-static ElementConfigProc ConfigureBarProc;
-static ElementDestroyProc DestroyBarProc;
-static ElementDrawProc DrawActiveBarProc;
-static ElementDrawProc DrawNormalBarProc;
-static ElementDrawSymbolProc DrawSymbolProc;
-static ElementExtentsProc GetContourExtentsProc;
-static ElementToPostScriptProc ActiveBarToPostScriptProc;
-static ElementToPostScriptProc NormalBarToPostScriptProc;
-static ElementSymbolToPostScriptProc SymbolToPostScriptProc;
-static ElementMapProc MapBarProc;
-
-INLINE static int
-Round(double x)
-{
-    return (int) (x + ((x < 0.0) ? -0.5 : 0.5));
-}
-
-/*
- *---------------------------------------------------------------------------
- * Custom option parse and print procedures
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfBarMode --
- *
- *	Converts the integer representing the mode style into a string.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-NameOfBarMode(BarMode mode)
-{
-    switch (mode) {
-    case MODE_INFRONT:
-	return "infront";
-    case MODE_OVERLAP:
-	return "overlap";
-    case MODE_STACKED:
-	return "stacked";
-    case MODE_ALIGNED:
-	return "aligned";
-    default:
-	return "unknown mode value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToMode --
- *
- *	Converts the mode string into its numeric representation.
- *
- *	Valid mode strings are:
- *
- *      "infront"   Draw a full bar at each point in the element.
- *
- * 	"stacked"   Stack bar segments vertically. Each stack is defined
- *		    by each ordinate at a particular abscissa. The height
- *		    of each segment is represented by the sum the previous
- *		    ordinates.
- *
- *	"aligned"   Align bar segments as smaller slices one next to
- *		    the other.  Like "stacks", aligned segments are
- *		    defined by each ordinate at a particular abscissa.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToBarMode(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Mode style string */
-    char *widgRec,		/* Cubicle structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    BarMode *modePtr = (BarMode *)(widgRec + offset);
-    int length;
-    char c;
-    char *string;
-    
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "normal", length) == 0)) {
-	*modePtr = MODE_INFRONT;
-    } else if ((c == 'i') && (strncmp(string, "infront", length) == 0)) {
-	*modePtr = MODE_INFRONT;
-    } else if ((c == 's') && (strncmp(string, "stacked", length) == 0)) {
-	*modePtr = MODE_STACKED;
-    } else if ((c == 'a') && (strncmp(string, "aligned", length) == 0)) {
-	*modePtr = MODE_ALIGNED;
-    } else if ((c == 'o') && (strncmp(string, "overlap", length) == 0)) {
-	*modePtr = MODE_OVERLAP;
-    } else {
-	Tcl_AppendResult(interp, "bad mode argument \"", string,
-	    "\": should be \"infront\", \"stacked\", \"overlap\", or \"aligned\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BarModeToObj --
- *
- *	Returns the mode style string based upon the mode flags.
- *
- * Results:
- *	The mode style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-BarModeToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Row/column structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    BarMode mode = *(BarMode *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfBarMode(mode), -1);
-}
-
-
-/* 
- * Zero out the style's number of bars and errorbars. 
- */
-static void
-ResetStylePalette(Blt_Chain stylePalette)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(stylePalette); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	ContourStyle *stylePtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->xeb.length = stylePtr->yeb.length = 0;
-	stylePtr->nBars = 0;
-    }
-}
-
-static int
-ConfigureContourPen(Graph *graphPtr, ContourPen *penPtr)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-    long defColor;
-
-    gcMask = GCForeground;
-    if (penPtr->fgColor != NULL) {
-	defColor = penPtr->fgColor->pixel;
-	gcValues.foreground = penPtr->fgColor->pixel;
-    } else if (penPtr->bg != NULL) {
-	defColor = Blt_BackgroundBorderColor(penPtr->bg)->pixel;
-	gcValues.foreground = defColor;
-    } else {
-	defColor = BlackPixel(graphPtr->display, 
-			      Tk_ScreenNumber(graphPtr->tkwin));
-    }
-    if (penPtr->stipple != None) {
-	gcValues.stipple = penPtr->stipple;
-	gcValues.fill_style = FillStippled;
-	gcMask |= (GCStipple | GCFillStyle);
-    }
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (penPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->gc);
-    }
-    penPtr->gc = newGC;
-
-    gcMask = GCForeground | GCLineWidth;
-    if (penPtr->errorBarColor == COLOR_DEFAULT) {
-	gcValues.foreground = defColor;
-    } else {
-	gcValues.foreground = penPtr->errorBarColor->pixel;
-    }
-    gcValues.line_width = LineWidth(penPtr->errorBarLineWidth);
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (penPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->errorBarGC);
-    }
-    penPtr->errorBarGC = newGC;
-    return TCL_OK;
-}
-
-static void
-DestroyContourPen(Graph *graphPtr, ContourPen *penPtr)
-{
-    Blt_Ts_FreeStyle(graphPtr->display, &penPtr->valueStyle);
-    if (penPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->gc);
-    }
-    if (penPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->errorBarGC);
-    }
-}
-
-static int
-ConfigureContourPenProc(Graph *graphPtr, Pen *basePtr)
-{
-    return ConfigureContourPen(graphPtr, (ContourPen *)basePtr);
-}
-
-static void
-DestroyContourPenProc(Graph *graphPtr, Pen *basePtr)
-{
-    DestroyContourPen(graphPtr, (ContourPen *)basePtr);
-}
-
-
-static void
-InitContourPen(ContourPen *penPtr)
-{
-    /* Generic fields common to all pen types. */
-    penPtr->configProc = ConfigureContourPenProc;
-    penPtr->destroyProc = DestroyContourPenProc;
-    penPtr->flags = NORMAL_PEN;
-    penPtr->configSpecs = contourPenConfigSpecs;
-
-    /* Initialize fields specific to contour pens. */
-    Blt_Ts_InitStyle(penPtr->valueStyle);
-    penPtr->relief = TK_RELIEF_RAISED;
-    penPtr->valueShow = SHOW_NONE;
-    penPtr->borderWidth = 2;
-    penPtr->errorBarShow = SHOW_BOTH;
-}
-
-Pen *
-Blt_ContourPen(char *penName)
-{
-    ContourPen *penPtr;
-
-    penPtr = Blt_AssertCalloc(1, sizeof(ContourPen));
-    InitContourPen(penPtr);
-    penPtr->name = Blt_AssertStrdup(penName);
-    if (strcmp(penName, "activeBar") == 0) {
-	penPtr->flags = ACTIVE_PEN;
-    }
-    return (Pen *)penPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CheckStacks --
- *
- *	Check that the data limits are not superseded by the heights
- *	of stacked bar segments.  The heights are calculated by
- *	Blt_ComputeStacks.
- *
- * Results:
- *	If the y-axis limits need to be adjusted for stacked segments,
- *	*minPtr* or *maxPtr* are updated.
- *
- * Side effects:
- *	Autoscaling of the y-axis is affected.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CheckStacks(Graph *graphPtr, Axis2d *pairPtr, double *minPtr, double *maxPtr)
-{
-    BarGroup *stackPtr;
-    int i;
-
-    if ((graphPtr->mode != MODE_STACKED) || (graphPtr->nStacks == 0)) {
-	return;
-    }
-    infoPtr = graphPtr->freqArr;
-    for (i = 0; i < graphPtr->nStacks; i++) {
-	if ((infoPtr->axes.x == pairPtr->x) && 
-	    (infoPtr->axes.y == pairPtr->y)) {
-	    /*
-
-	     * Check if any of the y-values (because of stacking) are
-	     * greater than the current limits of the graph.
-	     */
-	    if (infoPtr->sum < 0.0) {
-		if (*minPtr > infoPtr->sum) {
-		    *minPtr = infoPtr->sum;
-		}
-	    } else {
-		if (*maxPtr < infoPtr->sum) {
-		    *maxPtr = infoPtr->sum;
-		}
-	    }
-	}
-	infoPtr++;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureBarProc --
- *
- *	Sets up the appropriate configuration parameters in the GC.
- *      It is assumed the parameters have been previously set by
- *	a call to Blt_ConfigureWidget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information such as bar foreground/background
- *	color and stipple etc. get set in a new GC.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureBarProc(Graph *graphPtr, Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    Blt_ChainLink link;
-    ContourStyle *stylePtr;
-
-    if (ConfigureContourPen(graphPtr, elemPtr->builtinPenPtr)!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Point to the static normal pen if no external pens have
-     * been selected.
-     */
-    link = Blt_Chain_FirstLink(elemPtr->stylePalette);
-    if (link == NULL) {
-	link = Blt_Chain_AllocLink(sizeof(ContourStyle));
-	Blt_Chain_LinkAfter(elemPtr->stylePalette, link, NULL);
-    }
-    stylePtr = Blt_Chain_GetValue(link);
-    stylePtr->penPtr = NORMALPEN(elemPtr);
-
-    if (Blt_ConfigModified(elemPtr->configSpecs, "-barwidth", "-*data",
-	    "-map*", "-label", "-hide", "-x", "-y", (char *)NULL)) {
-	elemPtr->flags |= MAP_ITEM;
-    }
-    return TCL_OK;
-}
-
-static void
-GetContourExtentsProc(Element *basePtr, Region2d *extsPtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    Mesh *meshPtr;
-
-    extsPtr->top = extsPtr->left = DBL_MAX;
-    extsPtr->bottom = extsPtr->right = -DBL_MAX;
-
-    meshPtr = elemPtr->meshPtr;
-    if ((meshPtr == NULL) || (elemPtr->values == NULL)) {
-	return;			/* No mesh or values configured. */
-    }
-    if (meshPtr->nPoints < 3) {
-	return;
-    }
-    extsPtr->left = (elemPtr->axes.x->logScale) ? 
-	meshPtr->xLogMin : meshPtr->xMin;
-    extsPtr->top = (elemPtr->axes.y->logScale) ? 
-	meshPtr->yLogMin : meshPtr->yMin;
-    extsPtr->right = meshPtr->xMax;
-    extsPtr->bottom = meshPtr->yMax;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestBar --
- *
- *	Find the bar segment closest to the window coordinates	point
- *	specified.
- *
- *	Note:  This does not return the height of the stacked segment
- *	       (in graph coordinates) properly.
- *
- * Results:
- *	Returns 1 if the point is width any bar segment, otherwise 0.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-ClosestBarProc(
-    Graph *graphPtr,		/* Graph widget record */
-    Element *basePtr,		/* Bar element */
-    ClosestSearch *searchPtr)	/* Info of closest point in element */
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    XRectangle *bp;
-    double minDist;
-    int imin;
-    int i;
-
-    minDist = searchPtr->dist;
-    imin = 0;
-    
-    for (bp = elemPtr->bars, i = 0; i < elemPtr->nBars; i++, bp++) {
-	Point2d *pp, *pend;
-	Point2d outline[5];
-	double left, right, top, bottom;
-
-	if (PointInRectangle(bp, searchPtr->x, searchPtr->y)) {
-	    imin = elemPtr->barToData[i];
-	    minDist = 0.0;
-	    break;
-	}
-	left = bp->x, top = bp->y;
-	right = (double)(bp->x + bp->width);
-	bottom = (double)(bp->y + bp->height);
-	outline[4].x = outline[3].x = outline[0].x = left;
-	outline[4].y = outline[1].y = outline[0].y = top;
-	outline[2].x = outline[1].x = right;
-	outline[3].y = outline[2].y = bottom;
-
-	for (pp = outline, pend = outline + 4; pp < pend; pp++) {
-	    Point2d t;
-	    double dist;
-
-	    t = Blt_GetProjection(searchPtr->x, searchPtr->y, pp, pp + 1);
-	    if (t.x > right) {
-		t.x = right;
-	    } else if (t.x < left) {
-		t.x = left;
-	    }
-	    if (t.y > bottom) {
-		t.y = bottom;
-	    } else if (t.y < top) {
-		t.y = top;
-	    }
-	    dist = hypot((t.x - searchPtr->x), (t.y - searchPtr->y));
-	    if (dist < minDist) {
-		minDist = dist;
-		imin = elemPtr->barToData[i];
-	    }
-	}
-    }
-    if (minDist < searchPtr->dist) {
-	searchPtr->elemPtr = (Element *)elemPtr;
-	searchPtr->dist = minDist;
-	searchPtr->index = imin;
-	searchPtr->point.x = (double)elemPtr->x.values[imin];
-	searchPtr->point.y = (double)elemPtr->y.values[imin];
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MergePens --
- *
- *	Reorders the both arrays of points and errorbars to merge pens.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The old arrays are freed and new ones allocated containing
- *	the reordered points and errorbars.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MergePens(ContourElement *elemPtr, ContourStyle **dataToStyle)
-{
-    if (Blt_Chain_GetLength(elemPtr->stylePalette) < 2) {
-	Blt_ChainLink link;
-	ContourStyle *stylePtr;
-
-	link = Blt_Chain_FirstLink(elemPtr->stylePalette);
-
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->nBars = elemPtr->nBars;
-	stylePtr->bars = elemPtr->bars;
-	stylePtr->symbolSize = elemPtr->bars->width / 2;
-	stylePtr->xeb.length = elemPtr->xeb.length;
-	stylePtr->xeb.segments = elemPtr->xeb.segments;
-	stylePtr->yeb.length = elemPtr->yeb.length;
-	stylePtr->yeb.segments = elemPtr->yeb.segments;
-	return;
-    }
-    /* We have more than one style. Group bar segments of like pen
-     * styles together.  */
-
-    if (elemPtr->nBars > 0) {
-	Blt_ChainLink link;
-	XRectangle *bars, *bp;
-	int *ip, *barToData;
-
-	bars = Blt_AssertMalloc(elemPtr->nBars * sizeof(XRectangle));
-	barToData = Blt_AssertMalloc(elemPtr->nBars * sizeof(int));
-	bp = bars, ip = barToData;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    ContourStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->symbolSize = bp->width / 2;
-	    stylePtr->bars = bp;
-	    for (i = 0; i < elemPtr->nBars; i++) {
-		int iData;
-
-		iData = elemPtr->barToData[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *bp++ = elemPtr->bars[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->nBars = bp - stylePtr->bars;
-	}
-	Blt_Free(elemPtr->bars);
-	Blt_Free(elemPtr->barToData);
-	elemPtr->bars = bars;
-	elemPtr->barToData = barToData;
-    }
-
-    if (elemPtr->xeb.length > 0) {
-	Blt_ChainLink link;
-	Segment2d *bars, *sp;
-	int *map, *ip;
-
-	bars = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(int));
-	sp = bars, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    ContourStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->xeb.segments = sp;
-	    for (i = 0; i < elemPtr->xeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->xeb.map[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *sp++ = elemPtr->xeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->xeb.length = sp - stylePtr->xeb.segments;
-	}
-	Blt_Free(elemPtr->xeb.segments);
-	elemPtr->xeb.segments = bars;
-	Blt_Free(elemPtr->xeb.map);
-	elemPtr->xeb.map = map;
-    }
-    if (elemPtr->yeb.length > 0) {
-	Blt_ChainLink link;
-	Segment2d *bars, *sp;
-	int *map, *ip;
-
-	bars = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(int));
-	sp = bars, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    ContourStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->yeb.segments = sp;
-	    for (i = 0; i < elemPtr->yeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->yeb.map[i];
-		if (dataToStyle[iData] == stylePtr) {
-		    *sp++ = elemPtr->yeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->yeb.length = sp - stylePtr->yeb.segments;
-	}
-	Blt_Free(elemPtr->yeb.segments);
-	elemPtr->yeb.segments = bars;
-	Blt_Free(elemPtr->yeb.map);
-	elemPtr->yeb.map = map;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapActiveBars --
- *
- *	Creates an array of points of the active graph coordinates.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the active point array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapActiveBars(ContourElement *elemPtr)
-{
-    if (elemPtr->activeRects != NULL) {
-	Blt_Free(elemPtr->activeRects);
-	elemPtr->activeRects = NULL;
-    }
-    if (elemPtr->activeToData != NULL) {
-	Blt_Free(elemPtr->activeToData);
-	elemPtr->activeToData = NULL;
-    }
-    elemPtr->nActive = 0;
-
-    if (elemPtr->nActiveIndices > 0) {
-	XRectangle *activeRects;
-	int *activeToData;
-	int i;
-	int count;
-
-	activeRects = Blt_AssertMalloc(sizeof(XRectangle) * 
-				       elemPtr->nActiveIndices);
-	activeToData = Blt_AssertMalloc(sizeof(int) * 
-					elemPtr->nActiveIndices);
-	count = 0;
-	for (i = 0; i < elemPtr->nBars; i++) {
-	    int *ip, *iend;
-
-	    for (ip = elemPtr->activeIndices, 
-		     iend = ip + elemPtr->nActiveIndices; ip < iend; ip++) {
-		if (elemPtr->barToData[i] == *ip) {
-		    activeRects[count] = elemPtr->bars[i];
-		    activeToData[count] = i;
-		    count++;
-		}
-	    }
-	}
-	elemPtr->nActive = count;
-	elemPtr->activeRects = activeRects;
-	elemPtr->activeToData = activeToData;
-    }
-    elemPtr->flags &= ~ACTIVE_PENDING;
-}
-
-static void
-ResetBar(ContourElement *elemPtr)
-{
-    /* Release any storage associated with the display of the bar */
-    ResetStylePalette(elemPtr->stylePalette);
-    if (elemPtr->activeRects != NULL) {
-	Blt_Free(elemPtr->activeRects);
-    }
-    if (elemPtr->activeToData != NULL) {
-	Blt_Free(elemPtr->activeToData);
-    }
-    if (elemPtr->xeb.segments != NULL) {
-	Blt_Free(elemPtr->xeb.segments);
-    }
-    if (elemPtr->xeb.map != NULL) {
-	Blt_Free(elemPtr->xeb.map);
-    }
-    if (elemPtr->yeb.segments != NULL) {
-	Blt_Free(elemPtr->yeb.segments);
-    }
-    if (elemPtr->yeb.map != NULL) {
-	Blt_Free(elemPtr->yeb.map);
-    }
-    if (elemPtr->bars != NULL) {
-	Blt_Free(elemPtr->bars);
-    }
-    if (elemPtr->barToData != NULL) {
-	Blt_Free(elemPtr->barToData);
-    }
-    elemPtr->activeToData = elemPtr->xeb.map = elemPtr->yeb.map = 
-	elemPtr->barToData = NULL;
-    elemPtr->activeRects = elemPtr->bars = NULL;
-    elemPtr->xeb.segments = elemPtr->yeb.segments = NULL;
-    elemPtr->nActive = elemPtr->xeb.length = elemPtr->yeb.length = 
-	elemPtr->nBars = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapErrorBars --
- *
- *	Creates two arrays of points and pen indices, filled with
- *	the screen coordinates of the visible
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the index array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapErrorBars(Graph *graphPtr, ContourElement *elemPtr, ContourStyle **dataToStyle)
-{
-    int n, nPoints;
-    Region2d exts;
-
-    Blt_GraphExtents(graphPtr, &exts);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (elemPtr->xError.nValues > 0) {
-	n = MIN(elemPtr->xError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->xHigh.nValues, elemPtr->xLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *bars;
-	Segment2d *segPtr;
-	int *map;
-	int *indexPtr;
-	int i;
-		
-	segPtr = bars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = map = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    ContourStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = dataToStyle[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->xError.nValues > 0) {
-		    high = x + elemPtr->xError.values[i];
-		    low = x - elemPtr->xError.values[i];
-		} else {
-		    high = elemPtr->xHigh.values[i];
-		    low = elemPtr->xLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-
-		    p = Blt_Map2D(graphPtr, high, y, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, low, y, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Left cap */
-		    segPtr->p.x = segPtr->q.x = p.x;
-		    segPtr->p.y = p.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = p.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Right cap */
-		    segPtr->p.x = segPtr->q.x = q.x;
-		    segPtr->p.y = q.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = q.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->xeb.segments = bars;
-	elemPtr->xeb.length = segPtr - bars;
-	elemPtr->xeb.map = map;
-    }
-    if (elemPtr->yError.nValues > 0) {
-	n = MIN(elemPtr->yError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->yHigh.nValues, elemPtr->yLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *bars;
-	Segment2d *segPtr;
-	int *map;
-	int *indexPtr;
-	int i;
-		
-	segPtr = bars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = map = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    ContourStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = dataToStyle[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->yError.nValues > 0) {
-		    high = y + elemPtr->yError.values[i];
-		    low = y - elemPtr->yError.values[i];
-		} else {
-		    high = elemPtr->yHigh.values[i];
-		    low = elemPtr->yLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-		    
-		    p = Blt_Map2D(graphPtr, x, high, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, x, low, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Top cap. */
-		    segPtr->p.y = segPtr->q.y = p.y;
-		    segPtr->p.x = p.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = p.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Bottom cap. */
-		    segPtr->p.y = segPtr->q.y = q.y;
-		    segPtr->p.x = q.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = q.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->yeb.segments = bars;
-	elemPtr->yeb.length = segPtr - bars;
-	elemPtr->yeb.map = map;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapContourElementProc --
- *
- *	Calculates the actual window coordinates of the bar element.
- *	The window coordinates are saved in the bar element structure.
- *
- * Results:
- *	None.
- *
- * Notes:
- *	A bar can have multiple segments (more than one x,y pairs).
- *	In this case, the bar can be represented as either a set of
- *	non-contiguous bars or a single multi-segmented (stacked) bar.
- *
- *	The x-axis layout for a contour plot may be presented in one of
- *	two ways.  If abscissas are used, the bars are placed at those
- *	coordinates.  Otherwise, the range will represent the number
- *	of values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapContourElementProc(Graph *graphPtr, Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    ContourStyle **dataToStyle;
-    double *x, *y;
-    double barWidth, barOffset;
-    double baseline;
-    int *barToData;		/* Maps bars to data point indices */
-    int invertBar;
-    int nPoints, count;
-    XRectangle *rp, *bars;
-    int i;
-    int size;
-
-    ResetBar(elemPtr);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (nPoints < 1) {
-	return;			/* No data points */
-    }
-    barWidth = graphPtr->barWidth;
-    if (elemPtr->barWidth > 0.0) {
-	barWidth = elemPtr->barWidth;
-    }
-    baseline = (elemPtr->axes.y->logScale) ? 1.0 : graphPtr->baseline;
-    barOffset = barWidth * 0.5;
-
-    /*
-     * Create an array of bars representing the screen coordinates
-     * of all the segments in the bar.
-     */
-    bars = Blt_AssertCalloc(nPoints, sizeof(XRectangle));
-    barToData = Blt_AssertCalloc(nPoints, sizeof(int));
-
-    x = elemPtr->x.values, y = elemPtr->y.values;
-    count = 0;
-    for (rp = bars, i = 0; i < nPoints; i++) {
-	Point2d c1, c2;		/* Two opposite corners of the rectangle
-				 * in graph coordinates. */
-	double dx, dy;
-	int height;
-
-	if (((x[i] - barWidth) > elemPtr->axes.x->axisRange.max) ||
-	    ((x[i] + barWidth) < elemPtr->axes.x->axisRange.min)) {
-	    continue;		/* Abscissa is out of range of the x-axis */
-	}
-	c1.x = x[i] - barOffset;
-	c1.y = y[i];
-	c2.x = c1.x + barWidth;
-	c2.y = baseline;
-
-	/*
-	 * If the mode is "aligned" or "stacked" we need to adjust the
-	 * x or y coordinates of the two corners.
-	 */
-
-	if ((graphPtr->nStacks > 0) && (graphPtr->mode != MODE_INFRONT)) {
-	    Blt_HashEntry *hPtr;
-	    FreqKey key;
-
-	    key.value = x[i];
-	    key.axes = elemPtr->axes;
-	    hPtr = Blt_FindHashEntry(&graphPtr->freqTable, (char *)&key);
-	    if (hPtr != NULL) {
-		FreqInfo *infoPtr;
-		double slice, width;
-
-		infoPtr = Blt_GetHashValue(hPtr);
-		switch (graphPtr->mode) {
-		case MODE_STACKED:
-		    c2.y = infoPtr->lastY;
-		    c1.y += c2.y;
-		    infoPtr->lastY = c1.y;
-		    break;
-
-		case MODE_ALIGNED:
-		    infoPtr->count++;
-		    slice = barWidth / (double)infoPtr->freq;
-		    c1.x += slice * (infoPtr->freq - infoPtr->count);
-		    c2.x = c1.x + slice;
-		    break;
-
-		case MODE_OVERLAP:
-		    infoPtr->count++;
-		    slice = barWidth / (double)(infoPtr->freq * 2);
-		    width = slice * (infoPtr->freq + 1);
-		    c1.x += slice * (infoPtr->freq - infoPtr->count);
-		    c2.x = c1.x + width;
-		    break;
-		case MODE_INFRONT:
-		    break;
-		}
-	    }
-	}
-	invertBar = FALSE;
-	if (c1.y < c2.y) {
-	    double temp;
-
-	    /* Handle negative bar values by swapping ordinates */
-	    temp = c1.y, c1.y = c2.y, c2.y = temp;
-	    invertBar = TRUE;
-	}
-	/*
-	 * Get the two corners of the bar segment and compute the rectangle
-	 */
-	c1 = Blt_Map2D(graphPtr, c1.x, c1.y, &elemPtr->axes);
-	c2 = Blt_Map2D(graphPtr, c2.x, c2.y, &elemPtr->axes);
-
-	/* Bound the bars horizontally by the width of the graph window */
-	/* Bound the bars vertically by the position of the axis. */
-	if (graphPtr->stackAxes) {
-	    int right, left, top, bottom;
-
-	    if (graphPtr->inverted) {
-		left = elemPtr->axes.y->screenMin;
-		right = elemPtr->axes.y->screenMin + 
-		    elemPtr->axes.y->screenRange;
-		top = graphPtr->top;
-		bottom = graphPtr->bottom;
-	    } else {
-		top = elemPtr->axes.y->screenMin;
-		bottom = elemPtr->axes.y->screenMin + 
-		    elemPtr->axes.y->screenRange;
-		left = graphPtr->left;
-		right = graphPtr->right;
-	    }
-	    if (c1.y < (double)top) {
-		c1.y = (double)top;
-	    } else if (c1.y > (double)bottom) {
-		c1.y = (double)bottom;
-	    }
-	    if (c2.y < (double)top) {
-		c2.y = (double)top;
-	    } else if (c2.y > (double)bottom) {
-		c2.y = (double)bottom;
-	    }
-	    if (c1.x < (double)left) {
-		c1.x = (double)left;
-	    } else if (c1.x > (double)right) {
-		c1.x = (double)right;
-	    }
-	    if (c2.x < (double)left) {
-		c2.x = (double)left;
-	    } else if (c2.x > (double)right) {
-		c2.x = (double)right;
-	    }
-	} else {
-	    int right, left, top, bottom;
-
-	    if (graphPtr->inverted) {
-		top = graphPtr->left;
-		bottom = graphPtr->right;
-		left = graphPtr->top;
-		right = graphPtr->bottom;
-	    } else {
-		top = graphPtr->top;
-		bottom = graphPtr->bottom;
-		left = graphPtr->left;
-		right = graphPtr->right;
-	    }
-
-	    if (c1.y < 0.0) {
-		c1.y = 0.0;
-	    } else if (c1.y > (double)graphPtr->height) {
-		c1.y = (double)graphPtr->height;
-	    }
-	    if (c2.y < 0.0) {
-		c2.y = 0.0;
-	    } else if (c2.y > (double)graphPtr->height) {
-		c2.y = (double)graphPtr->height;
-	    }
-	}
-	dx = FABS(c1.x - c2.x);
-	dy = FABS(c1.y - c2.y);
-	if ((dx == 0) || (dy == 0)) {
-	    continue;
-	}
-	height = (int)dy;
-	if (invertBar) {
-	    rp->y = (short int)MIN(c1.y, c2.y);
-	} else {
-	    rp->y = (short int)(MAX(c1.y, c2.y)) - height;
-	}
-	rp->x = (short int)MIN(c1.x, c2.x);
-	rp->width = (short int)dx + 1;
-	if (rp->width < 1) {
-	    rp->width = 1;
-	}
-	rp->height = height + 1;
-	if (rp->height < 1) {
-	    rp->height = 1;
-	}
-	barToData[count] = i;	/* Save the data index corresponding to the
-				 * rectangle */
-	count++;
-	rp++;
-    }
-    elemPtr->nBars = count;
-    elemPtr->bars = bars;
-    elemPtr->barToData = barToData;
-    if (elemPtr->nActiveIndices > 0) {
-	MapActiveBars(elemPtr);
-    }
-	
-    size = 20;
-    if (count > 0) {
-	size = bars->width;
-    }
-    {
-	Blt_ChainLink link;
-
-	/* Set the symbol size of all the pen styles. */
-	for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    ContourStyle *stylePtr;
-	    
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->symbolSize = size;
-	    stylePtr->errorBarCapWidth = 
-		(stylePtr->penPtr->errorBarCapWidth > 0) 
-		? stylePtr->penPtr->errorBarCapWidth : (size * 66666) / 100000;
-	    stylePtr->errorBarCapWidth /= 2;
-	}
-    }
-    dataToStyle = (ContourStyle **)Blt_StyleMap((Element *)elemPtr);
-    if (((elemPtr->yHigh.nValues > 0) && (elemPtr->yLow.nValues > 0)) ||
-	((elemPtr->xHigh.nValues > 0) && (elemPtr->xLow.nValues > 0)) ||
-	(elemPtr->xError.nValues > 0) || (elemPtr->yError.nValues > 0)) {
-	MapErrorBars(graphPtr, elemPtr, dataToStyle);
-    }
-    MergePens(elemPtr, dataToStyle);
-    Blt_Free(dataToStyle);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSymbolProc --
- *
- * 	Draw a symbol centered at the given x,y window coordinate
- *	based upon the element symbol type and size.
- *
- * Results:
- *	None.
- *
- * Problems:
- *	Most notable is the round-off errors generated when
- *	calculating the centered position of the symbol.
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-DrawSymbolProc(
-    Graph *graphPtr,
-    Drawable drawable,		/* Pixmap or window to draw into */
-    Element *basePtr,
-    int x, int y,
-    int size)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    ContourPen *penPtr;
-    int radius;
-
-    penPtr = NORMALPEN(elemPtr);
-    if ((penPtr->bg == NULL) && (penPtr->fgColor == NULL)) {
-	return;
-    }
-    radius = (size / 2);
-    size--;
-
-    x -= radius;
-    y -= radius;
-    XSetTSOrigin(graphPtr->display, penPtr->gc, x, y);
-    XFillRectangle(graphPtr->display, drawable, penPtr->gc, x, y, size, size);
-    XSetTSOrigin(graphPtr->display, penPtr->gc, 0, 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawContourSegments --
- *
- * 	Draws each of the rectangular segments for the element.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawContourSegments(
-    Graph *graphPtr,
-    Drawable drawable,		/* Pixmap or window to draw into */
-    ContourPen *penPtr,
-    XRectangle *bars,
-    int nBars)
-{
-
-    if ((penPtr->bg == NULL) && (penPtr->fgColor == NULL)) {
-	return;
-    }
-    if (penPtr->bg != NULL) {
-	XRectangle *rp, *rend;
-
-	for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, penPtr->bg,
-		rp->x, rp->y, rp->width, rp->height, penPtr->borderWidth, 
-		penPtr->relief);
-	}
-    }
-    if (penPtr->fgColor != NULL) {
-	XFillRectangles(graphPtr->display, drawable, penPtr->gc, bars, nBars);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawContourValues --
- *
- * 	Draws the numeric value of the bar.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawContourValues(
-    Graph *graphPtr, 
-    Drawable drawable, 
-    ContourElement *elemPtr,
-    ContourPen *penPtr,
-    XRectangle *bars,
-    int nBars,
-    int *barToData)
-{
-    XRectangle *rp, *rend;
-    int count;
-    char *fmt;
-    
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    count = 0;
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	Point2d anchorPos;
-	double x, y;
-	char string[TCL_DOUBLE_SPACE * 2 + 2];
-
-	x = elemPtr->x.values[barToData[count]];
-	y = elemPtr->y.values[barToData[count]];
-
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	if (graphPtr->inverted) {
-	    anchorPos.y = rp->y + rp->height * 0.5;
-	    anchorPos.x = rp->x + rp->width;
-	    if (y < graphPtr->baseline) {
-		anchorPos.x -= rp->width;
-	    } 
-	} else {
-	    anchorPos.x = rp->x + rp->width * 0.5;
-	    anchorPos.y = rp->y;
-	    if (y < graphPtr->baseline) {			
-		anchorPos.y += rp->height;
-	    }
-	}
-	Blt_DrawText(graphPtr->tkwin, drawable, string, &penPtr->valueStyle, 
-		     (int)anchorPos.x, (int)anchorPos.y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawNormalContourProc --
- *
- *	Draws the rectangle representing the bar element.  If the
- *	relief option is set to "raised" or "sunken" and the bar
- *	borderwidth is set (borderwidth > 0), a 3D border is drawn
- *	around the bar.
- *
- *	Don't draw bars that aren't visible (i.e. within the limits
- *	of the axis).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawNormalContourProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    int count;
-    Blt_ChainLink link;
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	ContourStyle *stylePtr;
-	ContourPen *penPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = stylePtr->penPtr;
-	if (stylePtr->nBars > 0) {
-	    DrawBarSegments(graphPtr, drawable, penPtr, stylePtr->bars,
-		stylePtr->nBars);
-	}
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		       stylePtr->xeb.segments, stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		       stylePtr->yeb.segments, stylePtr->yeb.length);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			stylePtr->bars, stylePtr->nBars, 
-			elemPtr->barToData + count);
-	}
-	count += stylePtr->nBars;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawActiveContourProc --
- *
- *	Draws contours representing the active segments of the
- *	bar element.  If the -relief option is set (other than "flat")
- *	and the borderwidth is greater than 0, a 3D border is drawn
- *	around the each bar segment.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawActiveContourProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-
-    if (elemPtr->activePenPtr != NULL) {
-	ContourPen *penPtr = elemPtr->activePenPtr;
-
-	if (elemPtr->nActiveIndices > 0) {
-	    if (elemPtr->flags & ACTIVE_PENDING) {
-		MapActiveBars(elemPtr);
-	    }
-	    DrawBarSegments(graphPtr, drawable, penPtr, elemPtr->activeRects, 
-			 elemPtr->nActive);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			elemPtr->activeRects, elemPtr->nActive, 
-			elemPtr->activeToData);
-	    }
-	} else if (elemPtr->nActiveIndices < 0) {
-	    DrawBarSegments(graphPtr, drawable, penPtr, elemPtr->bars, 
-			 elemPtr->nBars);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		DrawBarValues(graphPtr, drawable, elemPtr, penPtr, 
-			elemPtr->bars, elemPtr->nBars, elemPtr->barToData);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SymbolToPostScript --
- *
- * 	Draw a symbol centered at the given x,y window coordinate
- *	based upon the element symbol type and size.
- *
- * Results:
- *	None.
- *
- * Problems:
- *	Most notable is the round-off errors generated when
- *	calculating the centered position of the symbol.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-SymbolToPostScriptProc(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    Element *basePtr,
-    double x, double y,
-    int size)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    ContourPen *penPtr;
-
-    penPtr = NORMALPEN(elemPtr);
-    if ((penPtr->bg == NULL) && (penPtr->fgColor == NULL)) {
-	return;
-    }
-    /*
-     * Build a PostScript procedure to draw the fill and outline of
-     * the symbol after the path of the symbol shape has been formed
-     */
-    Blt_Ps_VarAppend(ps, "\n",
-		     "/DrawSymbolProc {\n",
-		     "  gsave\n    ", (char *)NULL);
-    if (penPtr->stipple != None) {
-	if (penPtr->bg != NULL) {
-	    Blt_Ps_XSetBackground(ps, Blt_BackgroundBorderColor(penPtr->bg));
-	    Blt_Ps_Append(ps, "    gsave fill grestore\n    ");
-	}
-	if (penPtr->fgColor != NULL) {
-	    Blt_Ps_XSetForeground(ps, penPtr->fgColor);
-	} else {
-	    Blt_Ps_XSetForeground(ps, Blt_BackgroundBorderColor(penPtr->bg));
-	}
-	Blt_Ps_XSetStipple(ps, graphPtr->display, penPtr->stipple);
-    } else if (penPtr->fgColor != NULL) {
-	Blt_Ps_XSetForeground(ps, penPtr->fgColor);
-	Blt_Ps_Append(ps, "    fill\n");
-    }
-    Blt_Ps_Append(ps, "  grestore\n");
-    Blt_Ps_Append(ps, "} def\n\n");
-    Blt_Ps_Format(ps, "%g %g %d Sq\n", x, y, size);
-}
-
-static void
-SegmentsToPostScript(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    ContourPen *penPtr,
-    XRectangle *bars,
-    int nBars)
-{
-    XRectangle *rp, *rend;
-
-    if ((penPtr->bg == NULL) && (penPtr->fgColor == NULL)) {
-	return;
-    }
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	if ((rp->width < 1) || (rp->height < 1)) {
-	    continue;
-	}
-	if (penPtr->stipple != None) {
-	    Blt_Ps_Rectangle(ps, rp->x, rp->y, rp->width - 1, rp->height - 1);
-	    if (penPtr->bg != NULL) {
-		Blt_Ps_XSetBackground(ps,Blt_BackgroundBorderColor(penPtr->bg));
-		Blt_Ps_Append(ps, "gsave fill grestore\n");
-	    }
-	    if (penPtr->fgColor != NULL) {
-		Blt_Ps_XSetForeground(ps, penPtr->fgColor);
-	    } else {
-		Blt_Ps_XSetForeground(ps,Blt_BackgroundBorderColor(penPtr->bg));
-	    }
-	    Blt_Ps_XSetStipple(ps, graphPtr->display, penPtr->stipple);
-	} else if (penPtr->fgColor != NULL) {
-	    Blt_Ps_XSetForeground(ps, penPtr->fgColor);
-	    Blt_Ps_XFillRectangle(ps, (double)rp->x, (double)rp->y, 
-		(int)rp->width - 1, (int)rp->height - 1);
-	}
-	if ((penPtr->bg != NULL) && (penPtr->borderWidth > 0) && 
-	    (penPtr->relief != TK_RELIEF_FLAT)) {
-	    Blt_Ps_Draw3DRectangle(ps, Blt_BackgroundBorder(penPtr->bg), 
-		(double)rp->x, (double)rp->y, (int)rp->width, (int)rp->height,
-		penPtr->borderWidth, penPtr->relief);
-	}
-    }
-}
-
-static void
-BarValuesToPostScript(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    ContourElement *elemPtr,
-    ContourPen *penPtr,
-    XRectangle *bars,
-    int nBars,
-    int *barToData)
-{
-    XRectangle *rp, *rend;
-    int count;
-    char *fmt;
-    char string[TCL_DOUBLE_SPACE * 2 + 2];
-    double x, y;
-    Point2d anchorPos;
-    
-    count = 0;
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
-	x = elemPtr->x.values[barToData[count]];
-	y = elemPtr->y.values[barToData[count]];
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	if (graphPtr->inverted) {
-	    anchorPos.y = rp->y + rp->height * 0.5;
-	    anchorPos.x = rp->x + rp->width;
-	    if (y < graphPtr->baseline) {
-		anchorPos.x -= rp->width;
-	    } 
-	} else {
-	    anchorPos.x = rp->x + rp->width * 0.5;
-	    anchorPos.y = rp->y;
-	    if (y < graphPtr->baseline) {			
-		anchorPos.y += rp->height;
-	    }
-	}
-	Blt_Ps_DrawText(ps, string, &penPtr->valueStyle, anchorPos.x, 
-		anchorPos.y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActiveBarToPostScript --
- *
- *	Similar to the NormalBarToPostScript procedure, generates
- *	PostScript commands to display the bars representing the
- *	active bar segments of the element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-ActiveBarToPostScriptProc(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-
-    if (elemPtr->activePenPtr != NULL) {
-	ContourPen *penPtr = elemPtr->activePenPtr;
-	
-	if (elemPtr->nActiveIndices > 0) {
-	    if (elemPtr->flags & ACTIVE_PENDING) {
-		MapActiveBars(elemPtr);
-	    }
-	    SegmentsToPostScript(graphPtr, ps, penPtr, elemPtr->activeRects,
-		elemPtr->nActive);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		   elemPtr->activeRects, elemPtr->nActive, elemPtr->activeToData);
-	    }
-	} else if (elemPtr->nActiveIndices < 0) {
-	    SegmentsToPostScript(graphPtr, ps, penPtr, elemPtr->bars, 
-		elemPtr->nBars);
-	    if (penPtr->valueShow != SHOW_NONE) {
-		BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		   elemPtr->bars, elemPtr->nBars, elemPtr->barToData);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NormalBarToPostScript --
- *
- *	Generates PostScript commands to form the bars
- *	representing the segments of the bar element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-NormalBarToPostScriptProc(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-    Blt_ChainLink link;
-    int count;
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->stylePalette); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	ContourStyle *stylePtr;
-	ContourPen *penPtr;
-	XColor *colorPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = stylePtr->penPtr;
-	if (stylePtr->nBars > 0) {
-	    SegmentsToPostScript(graphPtr, ps, penPtr, stylePtr->bars, 
-		stylePtr->nBars);
-	}
-	colorPtr = penPtr->errorBarColor;
-	if (colorPtr == COLOR_DEFAULT) {
-	    colorPtr = penPtr->fgColor;
-	}
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, 
-		penPtr->errorBarLineWidth, NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->xeb.segments,
-		stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, 
-		penPtr->errorBarLineWidth, NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->yeb.segments,
-		stylePtr->yeb.length);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    BarValuesToPostScript(graphPtr, ps, elemPtr, penPtr, 
-		stylePtr->bars, stylePtr->nBars, elemPtr->barToData + count);
-	}
-	count += stylePtr->nBars;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyBar --
- *
- *	Release memory and resources allocated for the bar element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the bar element is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyBarProc(Graph *graphPtr, Element *basePtr)
-{
-    ContourElement *elemPtr = (ContourElement *)basePtr;
-
-    DestroyContourPen(graphPtr, elemPtr->builtinPenPtr);
-    if (elemPtr->activePenPtr != NULL) {
-	Blt_FreePen((Pen *)elemPtr->activePenPtr);
-    }
-    ResetBar(elemPtr);
-    if (elemPtr->stylePalette != NULL) {
-	Blt_FreeStylePalette(elemPtr->stylePalette);
-	Blt_Chain_Destroy(elemPtr->stylePalette);
-    }
-    if (elemPtr->activeIndices != NULL) {
-	Blt_Free(elemPtr->activeIndices);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ContourElement --
- *
- *	Allocate memory and initialize methods for the new bar element.
- *
- * Results:
- *	The pointer to the newly allocated element structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the bar element structure.
- *
- *---------------------------------------------------------------------------
- */
-
-static ElementProcs barProcs =
-{
-    ClosestBarProc,
-    ConfigureBarProc,
-    DestroyBarProc,
-    DrawActiveBarProc,
-    DrawNormalBarProc,
-    DrawSymbolProc,
-    GetBarExtentsProc,
-    ActiveBarToPostScriptProc,
-    NormalBarToPostScriptProc,
-    SymbolToPostScriptProc,
-    MapBarProc,
-};
-
-
-Element *
-Blt_ContourElement(Graph *graphPtr, char *name, ClassId classId)
-{
-    ContourElement *elemPtr;
-
-    elemPtr = Blt_AssertCalloc(1, sizeof(ContourElement));
-    elemPtr->procsPtr = &barProcs;
-    elemPtr->configSpecs = contourElemConfigSpecs;
-    elemPtr->legendRelief = TK_RELIEF_FLAT;
-    Blt_GraphSetObjectClass(&elemPtr->object, classId);
-    elemPtr->obj.name = Blt_AssertStrdup(name);
-    elemPtr->obj.graphPtr = graphPtr;
-
-    /* By default, an element's name and label are the same. */
-    elemPtr->label = Blt_AssertStrdup(name);
-    elemPtr->builtinPenPtr = &elemPtr->builtinPen;
-    InitContourPen(elemPtr->builtinPenPtr);
-    elemPtr->stylePalette = Blt_Chain_Create();
-    bltContourStylesOption.clientData = (ClientData)sizeof(ContourStyle);
-    return (Element *)elemPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitFreqTable --
- *
- *	Generate a table of abscissa frequencies.  Duplicate
- *	x-coordinates (depending upon the bar drawing mode) indicate
- *	that something special should be done with each bar segment
- *	mapped to the same abscissa (i.e. it should be stacked,
- *	aligned, or overlay-ed with other segments)
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is allocated for the bar element structure.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_InitFreqTable(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-    int nStacks, nSegs;
-    Blt_HashTable freqTable;
-
-    /*
-     * Free resources associated with a previous frequency table. This
-     * includes the array of frequency information and the table itself
-     */
-    if (graphPtr->freqArr != NULL) {
-	Blt_Free(graphPtr->freqArr);
-	graphPtr->freqArr = NULL;
-    }
-    if (graphPtr->nStacks > 0) {
-	Blt_DeleteHashTable(&graphPtr->freqTable);
-	graphPtr->nStacks = 0;
-    }
-    if (graphPtr->mode == MODE_INFRONT) {
-	return;			/* No frequency table is needed for
-				 * "infront" mode */
-    }
-    Blt_InitHashTable(&graphPtr->freqTable, sizeof(FreqKey) / sizeof(int));
-
-    /*
-     * Initialize a hash table and fill it with unique abscissas.
-     * Keep track of the frequency of each x-coordinate and how many
-     * abscissas have duplicate mappings.
-     */
-    Blt_InitHashTable(&freqTable, sizeof(FreqKey) / sizeof(int));
-    nSegs = nStacks = 0;
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	ContourElement *elemPtr;
-	double *xArr;
-	int nPoints;
-	int i;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & (HIDE|DELETE_PENDING) || 
-	    (elemPtr->obj.classId != CID_ELEM_CONTOUR)) {
-	    continue;
-	}
-	nSegs++;
-	xArr = elemPtr->x.values;
-	nPoints = NUMBEROFPOINTS(elemPtr);
-	for (i = 0; i < nPoints; i++) {
-	    Blt_HashEntry *hPtr;
-	    FreqKey key;
-	    int isNew;
-	    size_t count;
-
-	    key.value = xArr[i];
-	    key.axes = elemPtr->axes;
-	    hPtr = Blt_CreateHashEntry(&freqTable, (char *)&key, &isNew);
-	    if (isNew) {
-		count = 1;
-	    } else {
-		count = (size_t)Blt_GetHashValue(hPtr);
-		if (count == 1) {
-		    nStacks++;
-		}
-		count++;
-	    }
-	    Blt_SetHashValue(hPtr, (ClientData)count);
-	}
-    }
-    if (nSegs == 0) {
-	return;			/* No bar elements to be displayed */
-    }
-    if (nStacks > 0) {
-	FreqInfo *fp;
-	Blt_HashEntry *h1;
-	Blt_HashSearch cursor;
-
-	graphPtr->freqArr = Blt_AssertCalloc(nStacks, sizeof(FreqInfo));
-	fp = graphPtr->freqArr;
-	for (h1 = Blt_FirstHashEntry(&freqTable, &cursor); h1 != NULL;
-	    h1 = Blt_NextHashEntry(&cursor)) {
-	    FreqKey *keyPtr;
-	    size_t count;
-
-	    count = (size_t)Blt_GetHashValue(h1);
-	    keyPtr = (FreqKey *)Blt_GetHashKey(&freqTable, h1);
-	    if (count > 1) {
-		Blt_HashEntry *h2;
-		int isNew;
-
-		h2 = Blt_CreateHashEntry(&graphPtr->freqTable, (char *)keyPtr, 
-			&isNew);
-		count = (size_t)Blt_GetHashValue(h1);
-		fp->freq = count;
-		fp->axes = keyPtr->axes;
-		Blt_SetHashValue(h2, fp);
-		fp++;
-	    }
-	}
-    }
-    Blt_DeleteHashTable(&freqTable);
-    graphPtr->nStacks = nStacks;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ComputeStacks --
- *
- *	Determine the height of each stack of bar segments.  A stack
- *	is created by designating two or more points with the same
- *	abscissa.  Each ordinate defines the height of a segment in
- *	the stack.  This procedure simply looks at all the data points
- *	summing the heights of each stacked segment. The sum is saved
- *	in the frequency information table.  This value will be used
- *	to calculate the y-axis limits (data limits aren't sufficient).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The heights of each stack is computed. CheckStacks will
- *	use this information to adjust the y-axis limits if necessary.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ComputeStacks(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    if ((graphPtr->mode != MODE_STACKED) || (graphPtr->nStacks == 0)) {
-	return;
-    }
-
-    /* Reset the sums for all duplicate values to zero. */
-    {
-	FreqInfo *infoPtr;
-	int i;
-
-	infoPtr = graphPtr->freqArr;
-	for (i = 0; i < graphPtr->nStacks; i++) {
-	    infoPtr->sum = 0.0;
-	    infoPtr++;
-	}
-    }
-
-    /* Look at each bar point, adding the ordinates of duplicate abscissas */
-
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	ContourElement *elemPtr;
-	double *xArr, *yArr;
-	int nPoints;
-	int i;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & (HIDE|DELETE_PENDING) || 
-	    (elemPtr->obj.classId != CID_ELEM_CONTOUR)) {
-	    continue;
-	}
-	xArr = elemPtr->x.values;
-	yArr = elemPtr->y.values;
-	nPoints = NUMBEROFPOINTS(elemPtr);
-	for (i = 0; i < nPoints; i++) {
-	    Blt_HashEntry *hPtr;
-	    FreqKey key;
-	    FreqInfo *infoPtr;
-
-	    key.value = xArr[i];
-	    key.axes = elemPtr->axes;
-	    hPtr = Blt_FindHashEntry(&graphPtr->freqTable, (char *)&key);
-	    if (hPtr == NULL) {
-		continue;
-	    }
-	    infoPtr = Blt_GetHashValue(hPtr);
-	    infoPtr->sum += yArr[i];
-	}
-    }
-}
-
-void
-Blt_ResetBarGroups(Graph *graphPtr)
-{
-    FreqInfo *fp, *fend;
-
-    for (fp = graphPtr->freqArr, fend = fp+graphPtr->nStacks; fp < fend; fp++) {
-	fp->lastY = 0.0;
-	fp->count = 0;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetScreenPoints --
- *
- *	Generates a coordinate array of transformed screen coordinates from
- *	the data points.
- *
- * Results:
- *	The transformed screen coordinates are returned.
- *
- * Side effects:
- *	Memory is allocated for the coordinate array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetScreenPoints(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    double *x, *y;
-    int i, n;
-    int count;
-    Point3 *points;
-    int *map;
-    MeshKey key;
-
-    n = MIN3(elemPtr->x.nValues, elemPtr->y.nValues, elemPtr->z.nValues);
-    x = elemPtr->x.values;
-    y = elemPtr->y.values;
-    z = elemPtr->z.values;
-    points = Blt_AssertMalloc(sizeof(Point3) * n);
-    map = Blt_AssertMalloc(sizeof(int) * n);
-    count = 0;			/* Count the valid screen coordinates */
-
-    next = 0;
-    zmin = zmax = 0.0;		/* Suppress compiler warning. */
-
-    Blt_InitHashTable(&table, sizeof(MeshKey) / sizeof(int));
-    p = points;
-    p->x = x[0];
-    p->y = y[0];
-    p->z = z[0];
-    zmin = zmax = p->z;
-    p++;
-    /*
-     * Generate array of points. Check for duplicates.  This is a quick+dirty
-     * (slow) solution.
-     */
-    hPtr = Blt_CreateHashEntry(&table, (char *)&key, &isNew);
-    for (i = 1; i < n; i++) {
-	Blt_HashEntry *hPtr;
-	MeshKey key;
-
-	key.x = x[i];
-	key.y = y[i];
-
-	hPtr = Blt_CreateHashEntry(&table, (char *)&key, &isNew);
-	if (!isNew) {
-	    continue;		/* Already have coordinate pair. */
-	}
-	p->x = key.x;
-	p->y = key.y;
-	p->z = z[i];
-	if (p->z < zMin) {
-	    zMin = p->z;
-	} else if (p->z > zMax) {
-	    zMax = p->z;
-	}
-	p++;
-    }
-    Tcl_DeleteHashTable(&table);
-    nPnts = points - p;
-    tol = (zMax - zMin) * tol;
-    
-    /*
-     * Mesh the points to get triangles 
-     */
-    R = Blt_Malloc(2 * nPnts * sizeof(Triplet));
-    if (R == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Itoa(nPnts), " triplets",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    nTriangles = Triangulate(nPnts, points, R);
-    assert(nTriangles <= 2 * nPnts);
-
-    if (graphPtr->inverted) {
-	for (i = 0; i < n; i++) {
-	    if ((FINITE(x[i])) && (FINITE(y[i]))) {
- 		points[count].x = Blt_HMap(elemPtr->axes.y, y[i]);
-		points[count].y = Blt_VMap(elemPtr->axes.x, x[i]);
-		map[count] = i;
-		count++;
-	    }
-	}
-    } else {
-	for (i = 0; i < n; i++) {
-	    if ((FINITE(x[i])) && (FINITE(y[i]))) {
-		points[count].x = Blt_HMap(elemPtr->axes.x, x[i]);
-		points[count].y = Blt_VMap(elemPtr->axes.y, y[i]);
-		map[count] = i;
-		count++;
-	    }
-	}
-    }
-    mapPtr->screenPts = points;
-    mapPtr->nScreenPts = count;
-    mapPtr->map = map;
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsolineOp --
- *
- *	.g isoline create -name $name -value $value -color $color -pen $pen
- *	.g isoline configure $name -value $value -color $color -hide no
- *	.g isoline delete $name
- *	.g isoline names
- *
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsolineOp --
- *
- *	.g isoline create -name $name -value $value -color $color
- *	.g isoline configure $name -value $value -color $color -hide no
- *	.g isoline 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsolineOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	char *tagName;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.tagTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    tagName = Blt_GetHashKey(&graphPtr->elements.tagTable, hPtr);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				     Tcl_NewStringObj(tagName, -1));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->bindTable,
-	Blt_MakeElementTag(graphPtr, Tcl_GetString(objv[3])), 
-	objc - 4, objv + 4);
-}
-
-
-/* make up an edge */
-static INLINE void
-MakeEdgeKey(Edge *keyPtr, int a, int b) 
-{
-    if (a < b) {
-	keyPtr->a = a;
-	keyPtr->b = b;
-    } else {
-	keyPtr->a = b;
-	keyPtr->b = a;
-    }
-}
-
-/* interpolate 2 points and add possible result to points array */
-static int 
-Interpolate(ContourElement *contPtr, int a, int b, double isovalue) 
-{
-    int ab, junk;
-    Edge *edgePtr;
-    EdgeInfo *eiPtr;
-    Blt_HashEntry *hPtr;
-    double zA, zB, r, absr;
-    Point2f *points = contPtr->meshPtr->points;
-    EdgeKey key;
-
-    /* Create the edge key. */
-    MakeEdgeKey(&key, a, b);
-
-    hPtr = Blt_CreateHashEntry(contPtr->edgeTable, (char *)key, &isNew);
-    if (!isNew) {
-	int index;
- 
-	index = (int)Blt_GetHashValue(hPtr);
-#if DEBUG
-	printf("A=%d(%g,%g,%g) B=%d(%g,%g,%g) isovalue=%g -> old %d\n",
-	       a, points[a].x, points[a].y, values[a],
-	       b, points[b].x, points[b].y, values[b],
-	       isovalue, index);
-#endif
-	return index;
-    }
-
-    /* No, then do the interpolation */
-    zA = contPtr->values[a] - isovalue;
-    if (fabs(zA/isovalue) < contPtr->fuzz) {
-	zA = 0.0;
-    }
-    zB = contPtr->values[b] - isovalue;
-    if (fabs(zB/isovalue) < contPtr->fuzz) {
-	zB = 0.0;
-    }
-    /* Does there exist an intermediate point? */
-    if (sign(zA) != sign(zB)) {
-	double t;
-	int i;
-
-	i = contPtr->nAdditional;
-	t = zA / (zA - zB);
-	points[i].x = points[a].x + t * (points[b].x - points[a].x);
-	points[i].y = points[a].y + t * (points[b].y - points[a].y);
-	values[i] = isovalue;
-	ab = i;
-	contPtr->nAdditional++;
-    } else {
-	ab = 0;
-    }
-#if DEBUG
-    printf("A=%d(%g,%g,%g) B=%d(%g,%g,%g) isovalue=%g -> new %d\n",
-	   a, points[a].x, points[a].y, values[a],
-	   b, points[b].x, points[b].y, values[b],
-	   isovalue, ab);
-#endif
-    /* add the new point to the hash table */
-    Blt_SetHashValue(hPtr, (ClientData)ab);
-    return ab;
-}
-
-/* process a Cont triangle  */
-void 
-ProcessTriangle(ContourElement *contPtr, Triangle *t, float isovalue) 
-{
-    int ab, bc, ca;
-
-    if (isovalue <= t->min) {
-	if ((t->a != t->b) && (t->b != t->c) && (t->a != t->c)) {
-	    AddTriangle(t->a, t->b, t->c);
-	}
-	return;
-    }
-    /* Interpolate the three sides of the triangle. */
-    ab = Interpolate(contPtr, t->a, t->b, isovalue);
-    bc = Interpolate(contPtr, t->b, t->c, isovalue);
-    ca = Interpolate(contPtr, t->c, t->a, isovalue);
-    if ((ab) && (bc) && (!ca)) {
-	if (contPtr->values[t->b] > isovalue) {
-	    AddTriangle(ab, t->b, bc);
-	} else {
-	    AddQuadrilateral(t->a, ab, bc, t->c);
-	}
-	return;
-    }
-    if ((ab) && (!bc) && (ca)) {
-	if (contPtr->values[t->a] > isovalue) {
-	    AddTriangle(t->a, ab, ca);
-	} else {
-	    AddQuadrilateral(ab, t->b, t->c, ca);
-	}
-	return;
-    }
-    if ((!ab) && (bc) && (ca)) {
-	if (contPtr->values[t->c] > isovalue) {
-	    AddTriangle(bc, t->c, ca);
-	} else {
-	    AddQuadrilateral(t->b, bc, ca, t->a);
-	}
-	return;
-    }
-}
-
-
-static int
-CompareTriangles(const void *a, const void *b)
-{
-    const Triangle *t1 = a;
-    const Triangle *t2 = b;
-
-    /* Sort by the minimum. */
-    if (t1->min < t2->min) {
-	return -1;
-    } else if (t1->min > t2->min) {
-	return 1;
-    }
-    /* Secondarily sort by the maximum. */
-    if (t1->max < t2->max) {
-	return -1;
-    } else if (t1->max > t2->max) {
-	return 1;
-    }
-    return 0;
-}
-
-static void
-SortTriangles(Mesh *meshPtr, int nValues, float *values)
-{
-    /* Compute the min/max of the z-values of the triangle */
-    for (i = 0; i < meshPtr->nTriangles; i++) {
-	Triangle *t;
-
-	t = meshPtr->triangles + i;
-	t->min = t->max = values[t->a];
-	if (values[t->b] > t->max) {
-	    t->max = values[t->b];
-	} else if (values[t->b] < t->min) {
-	    t->min = values[t->b];
-	}
-	if (values[t->c] > t->max) {
-	    t->max = values[t->c];
-	} else if (values[t->c] < t->min) {
-	    t->min = values[t->c];
-	}
-    }
-    /* Sort the triangles by the current set of values associates with the
-     * mesh. */
-    qsort(meshPtr->triangles, meshPtr->nTriangles, sizeof(Triangle), 
-	  CompareTriangles);
-}
-
-/* Display a cont widget */
-static int
-MapContour(Tcl_Interp *interp, Element *elemPtr)
-{
-    ContourElement *contPtr = (ContourElement *)elemPtr;
-    Polygon *P;
-    int i, k, N, M;
-    Tcl_Obj *listObjPtr, *subListObjPtr, *objPtr;
-
-    init_extra_points(contPtr);
-    init_poly_table();
-
-    SortTriangles(contPtr->meshPtr, contPtr->nValues, contPtr->values);
-    for (i = 0; i < contPtr->nIsolines; i++) {
-	double z;
-
-	z = contPtr->isolines[i];
-	for (j = 0; j < contPtr->meshPtr->nTriangles; j++) {
-	    Triangle *t;
-
-	    t = contPtr->meshPtr->triangles + j;
-	    if (z < t->min) {
-		break;		/* No more triangles in range. */
-	    }
-	    if (z > t->max) {
-		continue;	/* Not in range. */
-	    }
-	    ProcessTriangle(contPtr, t, z);
-	}
-    }
-}
diff --git a/blt3.0/src/bltGrElem.c b/blt3.0/src/bltGrElem.c
deleted file mode 100644
index 9da9e11..0000000
--- a/blt3.0/src/bltGrElem.c
+++ /dev/null
@@ -1,2465 +0,0 @@
-
-/*
- * bltGrElem.c --
- *
- * This module implements generic elements for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltChain.h"
-#include <X11/Xutil.h>
-#include <bltDataTable.h>
-
-#define GRAPH_KEY		"BLT Graph Data"
-
-/* Ignore elements that aren't in the display list or have been deleted. */
-#define IGNORE_ELEMENT(e) (((e)->link == NULL) || ((e)->flags & DELETE_PENDING))
-
-typedef struct {
-    Blt_Table table;
-    int refCount;
-} TableClient;
-
-static Blt_OptionParseProc ObjToAlong;
-static Blt_OptionPrintProc AlongToObj;
-static Blt_CustomOption alongOption =
-{
-    ObjToAlong, AlongToObj, NULL, (ClientData)0
-};
-static Blt_OptionFreeProc FreeValues;
-static Blt_OptionParseProc ObjToValues;
-static Blt_OptionPrintProc ValuesToObj;
-Blt_CustomOption bltValuesOption =
-{
-    ObjToValues, ValuesToObj, FreeValues, (ClientData)0
-};
-static Blt_OptionFreeProc FreeValuePairs;
-static Blt_OptionParseProc ObjToValuePairs;
-static Blt_OptionPrintProc ValuePairsToObj;
-Blt_CustomOption bltValuePairsOption =
-{
-    ObjToValuePairs, ValuePairsToObj, FreeValuePairs, (ClientData)0
-};
-
-static Blt_OptionFreeProc  FreeStyles;
-static Blt_OptionParseProc ObjToStyles;
-static Blt_OptionPrintProc StylesToObj;
-Blt_CustomOption bltLineStylesOption =
-{
-    ObjToStyles, StylesToObj, FreeStyles, (ClientData)0,
-};
-
-Blt_CustomOption bltBarStylesOption =
-{
-    ObjToStyles, StylesToObj, FreeStyles, (ClientData)0,
-};
-
-#include "bltGrElem.h"
-
-static Blt_VectorChangedProc VectorChangedProc;
-
-static void FindRange(ElemValues *valuesPtr);
-static void FreeDataValues(ElemValues *valuesPtr);
-static Tcl_FreeProc FreeElement;
-
-typedef int (GraphElementProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DestroyTableClients --
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-void
-Blt_DestroyTableClients(Graph *graphPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->dataTables, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	TableClient *clientPtr;
-
-	clientPtr = Blt_GetHashValue(hPtr);
-	if (clientPtr->table != NULL) {
-	    Blt_Table_Close(clientPtr->table);
-	}
-	Blt_Free(clientPtr);
-    }
-    Blt_DeleteHashTable(&graphPtr->dataTables);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- * Custom option parse and print procedures
- *---------------------------------------------------------------------------
- */
-static int
-GetPenStyleFromObj(
-    Tcl_Interp *interp,
-    Graph *graphPtr,
-    Tcl_Obj *objPtr,
-    ClassId classId,
-    PenStyle *stylePtr)
-{
-    Pen *penPtr;
-    Tcl_Obj **objv;
-    int objc;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc != 1) && (objc != 3)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "bad style entry \"", 
-			Tcl_GetString(objPtr), 
-			"\": should be \"penName\" or \"penName min max\"", 
-			(char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (Blt_GetPenFromObj(interp, graphPtr, objv[0], classId, &penPtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	double min, max;
-
-	if ((Tcl_GetDoubleFromObj(interp, objv[1], &min) != TCL_OK) ||
-	    (Tcl_GetDoubleFromObj(interp, objv[2], &max) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	SetWeight(stylePtr->weight, min, max);
-    }
-    stylePtr->penPtr = penPtr;
-    return TCL_OK;
-}
-
-static void
-FreeVector(ElemValues *valuesPtr)
-{
-    if (valuesPtr->vectorSource.vector != NULL) { 
-	Blt_SetVectorChangedProc(valuesPtr->vectorSource.vector, NULL, NULL);
-	Blt_FreeVectorId(valuesPtr->vectorSource.vector); 
-	valuesPtr->vectorSource.vector = NULL;
-    }
-}
-
-static int
-FetchVectorValues(Tcl_Interp *interp, ElemValues *valuesPtr, Blt_Vector *vector)
-{
-    double *array;
-    
-    if (valuesPtr->values == NULL) {
-	array = Blt_Malloc(Blt_VecLength(vector) * sizeof(double));
-    } else {
-	array = Blt_Realloc(valuesPtr->values, 
-			    Blt_VecLength(vector) * sizeof(double));
-    }
-    if (array == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't allocate new vector", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    memcpy(array, Blt_VecData(vector), sizeof(double) * Blt_VecLength(vector));
-    valuesPtr->min = Blt_VecMin(vector);
-    valuesPtr->max = Blt_VecMax(vector);
-    valuesPtr->values = array;
-    valuesPtr->nValues = Blt_VecLength(vector);
-    /* FindRange(valuesPtr); */
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorChangedProc --
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-VectorChangedProc(
-    Tcl_Interp *interp, 
-    ClientData clientData, 
-    Blt_VectorNotify notify)
-{
-    ElemValues *valuesPtr = clientData;
-
-    if (notify == BLT_VECTOR_NOTIFY_DESTROY) {
-	FreeDataValues(valuesPtr);
-    } else {
-	Blt_Vector *vector;
-	
-	Blt_GetVectorById(interp, valuesPtr->vectorSource.vector, &vector);
-	if (FetchVectorValues(NULL, valuesPtr, vector) != TCL_OK) {
-	    return;
-	}
-    }
-    {
-	Element *elemPtr = valuesPtr->elemPtr;
-	Graph *graphPtr;
-	
-	graphPtr = elemPtr->obj.graphPtr;
-	graphPtr->flags |= RESET_AXES;
-	elemPtr->flags |= MAP_ITEM;
-	if (!IGNORE_ELEMENT(elemPtr)) {
-	    graphPtr->flags |= CACHE_DIRTY;
-	    Blt_EventuallyRedrawGraph(graphPtr);
-	}
-    }
-}
-
-static int 
-GetVectorData(Tcl_Interp *interp, ElemValues *valuesPtr, const char *vecName)
-{
-    Blt_Vector *vecPtr;
-    VectorDataSource *srcPtr;
-
-    srcPtr = &valuesPtr->vectorSource;
-    srcPtr->vector = Blt_AllocVectorId(interp, vecName);
-    if (Blt_GetVectorById(interp, srcPtr->vector, &vecPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (FetchVectorValues(interp, valuesPtr, vecPtr) != TCL_OK) {
-	FreeVector(valuesPtr);
-	return TCL_ERROR;
-    }
-    Blt_SetVectorChangedProc(srcPtr->vector, VectorChangedProc, valuesPtr);
-    valuesPtr->type = ELEM_SOURCE_VECTOR;
-    return TCL_OK;
-}
-
-static int
-FetchTableValues(
-    Tcl_Interp *interp,
-    ElemValues *valuesPtr, 
-    Blt_TableColumn col)
-{
-    long i, j;
-    double *array;
-    Blt_Table table;
-
-    table = valuesPtr->tableSource.table;
-    array = Blt_Malloc(sizeof(double) * Blt_Table_NumRows(table));
-    if (array == NULL) {
-	return TCL_ERROR;
-    }
-    for (j = 0, i = 1; i < Blt_Table_NumRows(table); i++) {
-	Blt_TableRow row;
-	Tcl_Obj *objPtr;
-	double value;
-
-	row = Blt_Table_FindRowByIndex(table, i);
-	objPtr  = Blt_Table_GetObj(table, row, col);
-	if (objPtr == NULL) {
-	    continue;			/* Ignore empty values. */
-	}
-	if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (FINITE(value)) {
-	    array[j] = value;
-	    j++;
-	}
-    }
-    if (valuesPtr->values != NULL) {
-	Blt_Free(valuesPtr->values);
-    }
-    valuesPtr->nValues = j;
-    valuesPtr->values = array;
-    FindRange(valuesPtr);
-    return TCL_OK;
-}
-
-static void
-FreeTable(ElemValues *valuesPtr)
-{
-    TableDataSource *srcPtr;
-
-    srcPtr = &valuesPtr->tableSource;
-    if (srcPtr->trace != NULL) {
-	Blt_Table_DeleteTrace(srcPtr->trace);
-    }
-    if (srcPtr->notifier != NULL) {
-	Blt_Table_DeleteNotifier(srcPtr->notifier);
-    }
-    if (srcPtr->hashPtr != NULL) {
-	TableClient *clientPtr;
-
-	clientPtr = Blt_GetHashValue(srcPtr->hashPtr);
-	clientPtr->refCount--;
-	if (clientPtr->refCount == 0) {
-	    Graph *graphPtr;
-
-	    graphPtr = valuesPtr->elemPtr->obj.graphPtr;
-	    if (srcPtr->table != NULL) {
-		Blt_Table_Close(srcPtr->table);
-	    }
-	    Blt_Free(clientPtr);
-	    Blt_DeleteHashEntry(&graphPtr->dataTables, srcPtr->hashPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableNotifyProc --
- *
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableNotifyProc(ClientData clientData, Blt_TableNotifyEvent *eventPtr)
-{
-    ElemValues *valuesPtr = clientData;
-    Element *elemPtr;
-    Graph *graphPtr;
-
-    elemPtr = valuesPtr->elemPtr;
-    graphPtr = elemPtr->obj.graphPtr;
-    if ((eventPtr->type == TABLE_NOTIFY_COLUMN_DELETED) || 
-	(FetchTableValues(graphPtr->interp, valuesPtr, 
-			  (Blt_TableColumn)eventPtr->header)) != TCL_OK) {
-	FreeTable(valuesPtr);
-	return TCL_ERROR;
-    } 
-    /* Always redraw the element. */
-    graphPtr->flags |= RESET_AXES;
-    elemPtr->flags |= MAP_ITEM;
-    if (!IGNORE_ELEMENT(elemPtr)) {
-	graphPtr->flags |= CACHE_DIRTY;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    return TCL_OK;
-}
- 
-/*
- *---------------------------------------------------------------------------
- *
- * TableTraceProc --
- *
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableTraceProc(ClientData clientData, Blt_TableTraceEvent *eventPtr)
-{
-    ElemValues *valuesPtr = clientData;
-    Element *elemPtr;
-    Graph *graphPtr;
-
-    elemPtr = valuesPtr->elemPtr;
-    graphPtr = elemPtr->obj.graphPtr;
-    assert((Blt_TableColumn)eventPtr->column == valuesPtr->tableSource.column);
-
-    if (FetchTableValues(eventPtr->interp, valuesPtr, eventPtr->column) 
-	!= TCL_OK) {
-	FreeTable(valuesPtr);
-	return TCL_ERROR;
-    }
-    graphPtr->flags |= RESET_AXES;
-    elemPtr->flags |= MAP_ITEM;
-    if (!IGNORE_ELEMENT(elemPtr)) {
-	graphPtr->flags |= CACHE_DIRTY;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    return TCL_OK;
-}
-
-static int
-GetTableData(Tcl_Interp *interp, ElemValues *valuesPtr, const char *tableName,
-	     Tcl_Obj *colObjPtr)
-{
-    TableDataSource *srcPtr;
-    TableClient *clientPtr;
-    int isNew;
-    Graph *graphPtr;
-
-    memset(&valuesPtr->tableSource, 0, sizeof(TableDataSource));
-    srcPtr = &valuesPtr->tableSource;
-    graphPtr = valuesPtr->elemPtr->obj.graphPtr;
-    /* See if the graph is already using this table. */
-    srcPtr->hashPtr = Blt_CreateHashEntry(&graphPtr->dataTables, tableName, 
-	&isNew);
-    if (isNew) {
-	if (Blt_Table_Open(interp, tableName, &srcPtr->table) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	clientPtr = Blt_AssertMalloc(sizeof(TableClient));
-	clientPtr->table = srcPtr->table;
-	clientPtr->refCount = 1;
-	Blt_SetHashValue(srcPtr->hashPtr, clientPtr);
-    } else {
-	clientPtr = Blt_GetHashValue(srcPtr->hashPtr);
-	srcPtr->table = clientPtr->table;
-	clientPtr->refCount++;
-    }
-    srcPtr->column = Blt_Table_FindColumn(interp, srcPtr->table, colObjPtr);
-    if (srcPtr->column == NULL) {
-	goto error;
-    }
-    if (FetchTableValues(interp, valuesPtr, srcPtr->column) != TCL_OK) {
-	goto error;
-    }
-    srcPtr->notifier = Blt_Table_CreateColumnNotifier(interp, srcPtr->table, 
-	srcPtr->column, TABLE_NOTIFY_COLUMN_CHANGED, TableNotifyProc, 
-	(Blt_TableNotifierDeleteProc *)NULL, valuesPtr);
-    srcPtr->trace = Blt_Table_CreateColumnTrace(srcPtr->table, srcPtr->column, 
-	(TABLE_TRACE_WRITES | TABLE_TRACE_UNSETS | TABLE_TRACE_CREATES), TableTraceProc,
-	(Blt_TableTraceDeleteProc *)NULL, valuesPtr);
-    valuesPtr->type = ELEM_SOURCE_TABLE;
-    return TCL_OK;
- error:
-    FreeTable(valuesPtr);
-    return TCL_ERROR;
-}
-
-static int
-ParseValues(Tcl_Interp *interp, Tcl_Obj *objPtr, int *nValuesPtr,
-	    double **arrayPtr)
-{
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *arrayPtr = NULL;
-    *nValuesPtr = 0;
-    if (objc > 0) {
-	double *array;
-	double *p;
-	int i;
-
-	array = Blt_Malloc(sizeof(double) * objc);
-	if (array == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate new vector", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (p = array, i = 0; i < objc; i++, p++) {
-	    if (Blt_ExprDoubleFromObj(interp, objv[i], p) != TCL_OK) {
-		Blt_Free(array);
-		return TCL_ERROR;
-	    }
-	}
-	*arrayPtr = array;
-	*nValuesPtr = objc;
-    }
-    return TCL_OK;
-}
-
-static void
-FreeDataValues(ElemValues *valuesPtr)
-{
-    switch (valuesPtr->type) {
-    case ELEM_SOURCE_VECTOR: 
-	FreeVector(valuesPtr);	break;
-    case ELEM_SOURCE_TABLE:
-	FreeTable(valuesPtr);	break;
-    case ELEM_SOURCE_VALUES:
-				break;
-    }
-    if (valuesPtr->values != NULL) {
-	Blt_Free(valuesPtr->values);
-    }
-    valuesPtr->values = NULL;
-    valuesPtr->nValues = 0;
-    valuesPtr->type = ELEM_SOURCE_VALUES;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindRange --
- *
- *	Find the minimum, positive minimum, and maximum values in a given
- *	vector and store the results in the vector structure.
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Minimum, positive minimum, and maximum values are stored in the
- *	vector.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FindRange(ElemValues *valuesPtr)
-{
-    int i;
-    double *x;
-    double min, max;
-
-    if ((valuesPtr->nValues < 1) || (valuesPtr->values == NULL)) {
-	return;			/* This shouldn't ever happen. */
-    }
-    x = valuesPtr->values;
-
-    min = DBL_MAX, max = -DBL_MAX;
-    for(i = 0; i < valuesPtr->nValues; i++) {
-	if (FINITE(x[i])) {
-	    min = max = x[i];
-	    break;
-	}
-    }
-    /*  Initialize values to track the vector range */
-    for (/* empty */; i < valuesPtr->nValues; i++) {
-	if (FINITE(x[i])) {
-	    if (x[i] < min) {
-		min = x[i];
-	    } else if (x[i] > max) {
-		max = x[i];
-	    }
-	}
-    }
-    valuesPtr->min = min, valuesPtr->max = max;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FindElemValuesMinimum --
- *
- *	Find the minimum, positive minimum, and maximum values in a given
- *	vector and store the results in the vector structure.
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Minimum, positive minimum, and maximum values are stored in the
- *	vector.
- *
- *---------------------------------------------------------------------------
- */
-double
-Blt_FindElemValuesMinimum(ElemValues *valuesPtr, double minLimit)
-{
-    int i;
-    double min;
-
-    min = DBL_MAX;
-    for (i = 0; i < valuesPtr->nValues; i++) {
-	double x;
-
-	x = valuesPtr->values[i];
-	if (x < 0.0) {
-	    /* What do you do about negative values when using log
-	     * scale values seems like a grey area.  Mirror. */
-	    x = -x;
-	}
-	if ((x > minLimit) && (min > x)) {
-	    min = x;
-	}
-    }
-    if (min == DBL_MAX) {
-	min = minLimit;
-    }
-    return min;
-}
-
-/*ARGSUSED*/
-static void
-FreeValues(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    ElemValues *valuesPtr = (ElemValues *)(widgRec + offset);
-
-    FreeDataValues(valuesPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToValues --
- *
- *	Given a TCL list of numeric expression representing the element
- *	values, convert into an array of double precision values. In addition,
- *	the minimum and maximum values are saved.  Since elastic values are
- *	allow (values which translate to the min/max of the graph), we must
- *	try to get the non-elastic minimum and maximum.
- *
- * Results:
- *	The return value is a standard TCL result.  The vector is passed
- *	back via the valuesPtr.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToValues(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* TCL list of expressions */
-    char *widgRec,		/* Element record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    ElemValues *valuesPtr = (ElemValues *)(widgRec + offset);
-    Element *elemPtr = (Element *)widgRec;
-    Tcl_Obj **objv;
-    int objc;
-    int result;
-    const char *string;
-
-    valuesPtr->elemPtr = elemPtr;
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    elemPtr->flags |= MAP_ITEM;
-
-    /* Release the current data sources. */
-    FreeDataValues(valuesPtr);
-    if (objc == 0) {
-	return TCL_OK;			/* Empty list of values. */
-    }
-    string = Tcl_GetString(objv[0]);
-    if ((objc == 1) && (Blt_VectorExists2(interp, string))) {
-	result = GetVectorData(interp, valuesPtr, string);
-    } else if ((objc == 2) && (Blt_Table_TableExists(interp, string))) {
-	result = GetTableData(interp, valuesPtr, string, objv[1]);
-    } else {
-	double *values;
-	int nValues;
-
-	result = ParseValues(interp, objPtr, &nValues, &values);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;		/* Can't parse the values as numbers. */
-	}
-	FreeDataValues(valuesPtr);
-	if (nValues > 0) {
-	    valuesPtr->values = values;
-	}
-	valuesPtr->nValues = nValues;
-	FindRange(valuesPtr);
-	valuesPtr->type = ELEM_SOURCE_VALUES;
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ValuesToObj --
- *
- *	Convert the vector of floating point values into a TCL list.
- *
- * Results:
- *	The string representation of the vector is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ValuesToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Element record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    ElemValues *valuesPtr = (ElemValues *)(widgRec + offset);
-
-    switch (valuesPtr->type) {
-    case ELEM_SOURCE_VECTOR:
-	{
-	    const char *vecName;
-	    
-	    vecName = Blt_NameOfVectorId(valuesPtr->vectorSource.vector);
-	    return Tcl_NewStringObj(vecName, -1);
-	}
-    case ELEM_SOURCE_TABLE:
-	{
-	    Tcl_Obj *listObjPtr;
-	    const char *tableName;
-	    long i;
-	    
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    tableName = Blt_Table_TableName(valuesPtr->tableSource.table);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(tableName, -1));
-	    
-	    i = Blt_Table_ColumnIndex(valuesPtr->tableSource.column);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(i));
-	    return listObjPtr;
-	}
-    case ELEM_SOURCE_VALUES:
-	{
-	    Tcl_Obj *listObjPtr;
-	    double *vp, *vend; 
-	    
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    for (vp = valuesPtr->values, vend = vp + valuesPtr->nValues; 
-		 vp < vend; vp++) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, 
-					 Tcl_NewDoubleObj(*vp));
-	    }
-	    return listObjPtr;
-	}
-    default:
-	abort();
-    }
-    return Tcl_NewStringObj("", 0);
-}
-
-/*ARGSUSED*/
-static void
-FreeValuePairs(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)			/* Not used. */
-{
-    Element *elemPtr = (Element *)widgRec;
-
-    FreeDataValues(&elemPtr->x);
-    FreeDataValues(&elemPtr->y);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToValuePairs --
- *
- *	This procedure is like ObjToValues except that it interprets
- *	the list of numeric expressions as X Y coordinate pairs.  The
- *	minimum and maximum for both the X and Y vectors are
- *	determined.
- *
- * Results:
- *	The return value is a standard TCL result.  The vectors are
- *	passed back via the widget record (elemPtr).
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToValuePairs(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* TCL list of numeric expressions */
-    char *widgRec,		/* Element record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    Element *elemPtr = (Element *)widgRec;
-    double *values;
-    int nValues;
-    size_t newSize;
-
-    if (ParseValues(interp, objPtr, &nValues, &values) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (nValues & 1) {
-	Tcl_AppendResult(interp, "odd number of data points", (char *)NULL);
-	Blt_Free(values);
-	return TCL_ERROR;
-    }
-    nValues /= 2;
-    newSize = nValues * sizeof(double);
-    FreeDataValues(&elemPtr->x);	/* Release the current data sources. */
-    FreeDataValues(&elemPtr->y);
-    if (newSize > 0) {
-	double *p;
-	int i;
-
-	elemPtr->x.values = Blt_AssertMalloc(newSize);
-	elemPtr->y.values = Blt_AssertMalloc(newSize);
-	elemPtr->x.nValues = elemPtr->y.nValues = nValues;
-	for (p = values, i = 0; i < nValues; i++) {
-	    elemPtr->x.values[i] = *p++;
-	    elemPtr->y.values[i] = *p++;
-	}
-	Blt_Free(values);
-	FindRange(&elemPtr->x);
-	FindRange(&elemPtr->y);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ValuePairsToObj --
- *
- *	Convert pairs of floating point values in the X and Y arrays
- *	into a TCL list.
- *
- * Results:
- *	The return value is a string (Tcl list).
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ValuePairsToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Element information record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    Element *elemPtr = (Element *)widgRec;
-    Tcl_Obj *listObjPtr;
-    int i;
-    int length;
-
-    length = NUMBEROFPOINTS(elemPtr);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (i = 0; i < length; i++) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewDoubleObj(elemPtr->x.values[i]));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewDoubleObj(elemPtr->y.values[i]));
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToAlong --
- *
- *	Given a TCL list of numeric expression representing the element
- *	values, convert into an array of double precision values. In
- *	addition, the minimum and maximum values are saved.  Since
- *	elastic values are allow (values which translate to the
- *	min/max of the graph), we must try to get the non-elastic
- *	minimum and maximum.
- *
- * Results:
- *	The return value is a standard TCL result.  The vector is passed
- *	back via the valuesPtr.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToAlong(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation of value. */
-    char *widgRec,		/* Widget record. */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    int *intPtr = (int *)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == 'x') && (string[1] == '\0')) {
-	*intPtr = SEARCH_X;
-    } else if ((string[0] == 'y') && (string[1] == '\0')) { 
-	*intPtr = SEARCH_Y;
-    } else if ((string[0] == 'b') && (strcmp(string, "both") == 0)) {
-	*intPtr = SEARCH_BOTH;
-    } else {
-	Tcl_AppendResult(interp, "bad along value \"", string, "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AlongToObj --
- *
- *	Convert the vector of floating point values into a TCL list.
- *
- * Results:
- *	The string representation of the vector is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-AlongToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    int along = *(int *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    switch (along) {
-    case SEARCH_X:
-	objPtr = Tcl_NewStringObj("x", 1);
-	break;
-    case SEARCH_Y:
-	objPtr = Tcl_NewStringObj("y", 1);
-	break;
-    case SEARCH_BOTH:
-	objPtr = Tcl_NewStringObj("both", 4);
-	break;
-    default:
-	objPtr = Tcl_NewStringObj("unknown along value", 4);
-	break;
-    }
-    return objPtr;
-}
-
-void
-Blt_FreeStylePalette(Blt_Chain stylePalette)
-{
-    Blt_ChainLink link;
-
-    /* Skip the first slot. It contains the built-in "normal" pen of
-     * the element.  */
-    link = Blt_Chain_FirstLink(stylePalette);
-    if (link != NULL) {
-	Blt_ChainLink next;
-
-	for (link = Blt_Chain_NextLink(link); link != NULL; link = next) {
-	    PenStyle *stylePtr;
-
-	    next = Blt_Chain_NextLink(link);
-	    stylePtr = Blt_Chain_GetValue(link);
-	    Blt_FreePen(stylePtr->penPtr);
-	    Blt_Chain_DeleteLink(stylePalette, link);
-	}
-    }
-}
-
-/*ARGSUSED*/
-static void
-FreeStyles(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Blt_Chain stylePalette = *(Blt_Chain *)(widgRec + offset);
-
-    Blt_FreeStylePalette(stylePalette);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ObjToStyles --
- *
- *	Parse the list of style names.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStyles(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing style list */
-    char *widgRec,		/* Element information record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Blt_Chain stylePalette = *(Blt_Chain *)(widgRec + offset);
-    Blt_ChainLink link;
-    Element *elemPtr = (Element *)(widgRec);
-    PenStyle *stylePtr;
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-    size_t size = (size_t)clientData;
-
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Reserve the first entry for the "normal" pen. We'll set the
-     * style later */
-    Blt_FreeStylePalette(stylePalette);
-    link = Blt_Chain_FirstLink(stylePalette);
-    if (link == NULL) {
-	link = Blt_Chain_AllocLink(size);
-	Blt_Chain_LinkAfter(stylePalette, link, NULL);
-    }
-    stylePtr = Blt_Chain_GetValue(link);
-    stylePtr->penPtr = elemPtr->normalPenPtr;
-    for (i = 0; i < objc; i++) {
-	link = Blt_Chain_AllocLink(size);
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->weight.min = (double)i;
-	stylePtr->weight.max = (double)i + 1.0;
-	stylePtr->weight.range = 1.0;
-	if (GetPenStyleFromObj(interp, elemPtr->obj.graphPtr, objv[i], 
-		elemPtr->obj.classId, (PenStyle *)stylePtr) != TCL_OK) {
-	    Blt_FreeStylePalette(stylePalette);
-	    return TCL_ERROR;
-	}
-	Blt_Chain_LinkAfter(stylePalette, link, NULL);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StylesToObj --
- *
- *	Convert the style information into a Tcl_Obj.
- *
- * Results:
- *	The string representing the style information is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StylesToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Element information record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Blt_Chain stylePalette = *(Blt_Chain *)(widgRec + offset);
-    Blt_ChainLink link;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    link = Blt_Chain_FirstLink(stylePalette);
-    if (link != NULL) {
-	/* Skip the first style (it's the default) */
-	for (link = Blt_Chain_NextLink(link); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    PenStyle *stylePtr;
-	    Tcl_Obj *subListObjPtr;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    subListObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    Tcl_ListObjAppendElement(interp, subListObjPtr, 
-		Tcl_NewStringObj(stylePtr->penPtr->name, -1));
-	    Tcl_ListObjAppendElement(interp, subListObjPtr, 
-				     Tcl_NewDoubleObj(stylePtr->weight.min));
-	    Tcl_ListObjAppendElement(interp, subListObjPtr, 
-				     Tcl_NewDoubleObj(stylePtr->weight.max));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, subListObjPtr);
-	}
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_StyleMap --
- *
- *	Creates an array of style indices and fills it based on the weight
- *	of each data point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the index array.
- *
- *---------------------------------------------------------------------------
- */
-
-PenStyle **
-Blt_StyleMap(Element *elemPtr)
-{
-    int i;
-    int nWeights;		/* Number of weights to be examined.
-				 * If there are more data points than
-				 * weights, they will default to the
-				 * normal pen. */
-
-    PenStyle **dataToStyle;	/* Directory of styles.  Each array
-				 * element represents the style for
-				 * the data point at that index */
-    Blt_ChainLink link;
-    PenStyle *stylePtr;
-    double *w;			/* Weight vector */
-    int nPoints;
-
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    nWeights = MIN(elemPtr->w.nValues, nPoints);
-    w = elemPtr->w.values;
-    link = Blt_Chain_FirstLink(elemPtr->stylePalette);
-    stylePtr = Blt_Chain_GetValue(link);
-
-    /* 
-     * Create a style mapping array (data point index to style), 
-     * initialized to the default style.
-     */
-    dataToStyle = Blt_AssertMalloc(nPoints * sizeof(PenStyle *));
-    for (i = 0; i < nPoints; i++) {
-	dataToStyle[i] = stylePtr;
-    }
-
-    for (i = 0; i < nWeights; i++) {
-	for (link = Blt_Chain_LastLink(elemPtr->stylePalette); link != NULL; 
-	     link = Blt_Chain_PrevLink(link)) {
-	    stylePtr = Blt_Chain_GetValue(link);
-
-	    if (stylePtr->weight.range > 0.0) {
-		double norm;
-
-		norm = (w[i] - stylePtr->weight.min) / stylePtr->weight.range;
-		if (((norm - 1.0) <= DBL_EPSILON) && 
-		    (((1.0 - norm) - 1.0) <= DBL_EPSILON)) {
-		    dataToStyle[i] = stylePtr;
-		    break;		/* Done: found range that matches. */
-		}
-	    }
-	}
-    }
-    return dataToStyle;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetIndex --
- *
- *	Given a string representing the index of a pair of x,y
- *	coordinates, return the numeric index.
- *
- * Results:
- *     	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetIndex(Tcl_Interp *interp, Element *elemPtr, Tcl_Obj *objPtr, int *indexPtr)
-{
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if ((*string == 'e') && (strcmp("end", string) == 0)) {
-	*indexPtr = NUMBEROFPOINTS(elemPtr) - 1;
-    } else if (Blt_ExprIntFromObj(interp, objPtr, indexPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetElement --
- *
- *	Find the element represented the given name, returning a pointer to
- *	its data structure via elemPtrPtr.
- *
- * Results:
- *     	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetElement(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr, 
-	       Element **elemPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    char *name;
-
-    name = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->elements.table, name);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
- 	    Tcl_AppendResult(interp, "can't find element \"", name,
-			     "\" in \"", Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *elemPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyElement --
- *
- *	Add a new element to the graph.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyElement(Element *elemPtr)
-{
-    Graph *graphPtr = elemPtr->obj.graphPtr;
-
-    Blt_DeleteBindings(graphPtr->bindTable, elemPtr);
-    Blt_Legend_RemoveElement(graphPtr, elemPtr);
-
-    Blt_FreeOptions(elemPtr->configSpecs, (char *)elemPtr,graphPtr->display, 0);
-    /*
-     * Call the element's own destructor to release the memory and
-     * resources allocated for it.
-     */
-    (*elemPtr->procsPtr->destroyProc) (graphPtr, elemPtr);
-
-    /* Remove it also from the element display list */
-    if (elemPtr->link != NULL) {
-	Blt_Chain_DeleteLink(graphPtr->elements.displayList, elemPtr->link);
-	if (!IGNORE_ELEMENT(elemPtr)) {
-	    graphPtr->flags |= RESET_WORLD;
-	    Blt_EventuallyRedrawGraph(graphPtr);
-	}
-    }
-    /* Remove the element for the graph's hash table of elements */
-    if (elemPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&graphPtr->elements.table, elemPtr->hashPtr);
-    }
-    if (elemPtr->obj.name != NULL) {
-	Blt_Free(elemPtr->obj.name);
-    }
-    if (elemPtr->label != NULL) {
-	Blt_Free(elemPtr->label);
-    }
-    Blt_Free(elemPtr);
-}
-
-static void
-FreeElement(DestroyData data)
-{
-    Element *elemPtr = (Element *)data;
-    DestroyElement(elemPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateElement --
- *
- *	Add a new element to the graph.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateElement(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv,
-    ClassId classId)
-{
-    Element *elemPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '-') {
-	Tcl_AppendResult(graphPtr->interp, "name of element \"", string, 
-			 "\" can't start with a '-'", (char *)NULL);
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(&graphPtr->elements.table, string, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "element \"", string, 
-			 "\" already exists in \"", Tcl_GetString(objv[0]), 
-			 "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (classId == CID_ELEM_BAR) {
-	elemPtr = Blt_BarElement(graphPtr, string, classId);
-    } else { 
-	/* Stripcharts are line graphs with some options enabled. */	
-	elemPtr = Blt_LineElement(graphPtr, string, classId);
-    }
-    elemPtr->hashPtr = hPtr;
-    Blt_SetHashValue(hPtr, elemPtr);
-
-    if (Blt_ConfigureComponentFromObj(interp, graphPtr->tkwin, 
-	elemPtr->obj.name, "Element", elemPtr->configSpecs, objc - 4, objv + 4,
-	(char *)elemPtr, 0) != TCL_OK) {
-	DestroyElement(elemPtr);
-	return TCL_ERROR;
-    }
-    (*elemPtr->procsPtr->configProc) (graphPtr, elemPtr);
-    elemPtr->link = Blt_Chain_Append(graphPtr->elements.displayList, elemPtr);
-    graphPtr->flags |= CACHE_DIRTY;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    elemPtr->flags |= MAP_ITEM;
-    graphPtr->flags |= RESET_AXES;
-    Tcl_SetObjResult(interp, objv[3]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DestroyElements --
- *
- *	Removes all the graph's elements. This routine is called when
- *	the graph is destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory allocated for the graph's elements is freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DestroyElements(Graph *graphPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Element *elemPtr;
-
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.table, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	elemPtr = Blt_GetHashValue(hPtr);
-	elemPtr->hashPtr = NULL;
-	DestroyElement(elemPtr);
-    }
-    Blt_DeleteHashTable(&graphPtr->elements.table);
-    Blt_DeleteHashTable(&graphPtr->elements.tagTable);
-    Blt_Chain_Destroy(graphPtr->elements.displayList);
-}
-
-void
-Blt_ConfigureElements(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	(*elemPtr->procsPtr->configProc) (graphPtr, elemPtr);
-    }
-}
-
-void
-Blt_MapElements(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    if (graphPtr->mode != BARS_INFRONT) {
-	Blt_ResetBarGroups(graphPtr);
-    }
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (IGNORE_ELEMENT(elemPtr)) {
-	    continue;
-	}
-	if ((graphPtr->flags & MAP_ALL) || (elemPtr->flags & MAP_ITEM)) {
-	    (*elemPtr->procsPtr->mapProc) (graphPtr, elemPtr);
-	    elemPtr->flags &= ~MAP_ITEM;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawElements --
- *
- *	Calls the individual element drawing routines for each
- *	element.
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Elements are drawn into the drawable (pixmap) which will
- *	eventually be displayed in the graph window.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawElements(Graph *graphPtr, Drawable drawable)
-{
-    Blt_ChainLink link;
-
-    /* Draw with respect to the stacking order. */
-    for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & (HIDE|DELETE_PENDING)) == 0) {
-	    (*elemPtr->procsPtr->drawNormalProc)(graphPtr, drawable, elemPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawActiveElements --
- *
- *	Calls the individual element drawing routines to display
- *	the active colors for each element.
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Elements are drawn into the drawable (pixmap) which will
- *	eventually be displayed in the graph window.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawActiveElements(Graph *graphPtr, Drawable drawable)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & (HIDE|ACTIVE|DELETE_PENDING)) == ACTIVE) {
-	    (*elemPtr->procsPtr->drawActiveProc)(graphPtr, drawable, elemPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ElementsToPostScript --
- *
- *	Generates PostScript output for each graph element in the
- *	element display list.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ElementsToPostScript(Graph *graphPtr, Blt_Ps ps)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->flags & (HIDE|DELETE_PENDING)) {
-	    continue;
-	}
-	/* Comment the PostScript to indicate the start of the element */
-	Blt_Ps_Format(ps, "\n%% Element \"%s\"\n\n", elemPtr->obj.name);
-	(*elemPtr->procsPtr->printNormalProc) (graphPtr, ps, elemPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ActiveElementsToPostScript --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ActiveElementsToPostScript( Graph *graphPtr, Blt_Ps ps)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if ((elemPtr->flags & (DELETE_PENDING|HIDE|ACTIVE)) == ACTIVE) {
-	    Blt_Ps_Format(ps, "\n%% Active Element \"%s\"\n\n", 
-		elemPtr->obj.name);
-	    (*elemPtr->procsPtr->printActiveProc)(graphPtr, ps, elemPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Marks data points of elements (given by their index) as active.
- *
- * Results:
- *	Returns TCL_OK if no errors occurred.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(
-    Graph *graphPtr,			/* Graph widget */
-    Tcl_Interp *interp,			/* Interpreter to report errors to */
-    int objc,				/* Number of element names */
-    Tcl_Obj *const *objv)		/* List of element names */
-{
-    Element *elemPtr;
-    int i;
-    int *indices;
-    int nIndices;
-
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/* List all the currently active elements */
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.table, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    elemPtr = Blt_GetHashValue(hPtr);
-	    if (elemPtr->flags & ACTIVE) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewStringObj(elemPtr->obj.name, -1));
-	    }
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetElement(interp, graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;	/* Can't find named element */
-    }
-    elemPtr->flags |= ACTIVE | ACTIVE_PENDING;
-
-    indices = NULL;
-    nIndices = -1;
-    if (objc > 4) {
-	int *activePtr;
-
-	nIndices = objc - 4;
-	activePtr = indices = Blt_AssertMalloc(sizeof(int) * nIndices);
-	for (i = 4; i < objc; i++) {
-	    if (GetIndex(interp, elemPtr, objv[i], activePtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    activePtr++;
-	}
-    }
-    if (elemPtr->activeIndices != NULL) {
-	Blt_Free(elemPtr->activeIndices);
-    }
-    elemPtr->nActiveIndices = nIndices;
-    elemPtr->activeIndices = indices;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-ClientData
-Blt_MakeElementTag(Graph *graphPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&graphPtr->elements.tagTable, tagName, &isNew);
-    return Blt_GetHashKey(&graphPtr->elements.tagTable, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	.g element bind elemName sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	char *tagName;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.tagTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    tagName = Blt_GetHashKey(&graphPtr->elements.tagTable, hPtr);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				     Tcl_NewStringObj(tagName, -1));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->bindTable,
-	Blt_MakeElementTag(graphPtr, Tcl_GetString(objv[3])), 
-	objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateOp --
- *
- *	Add a new element to the graph (using the default type of the
- *	graph).
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv,
-    ClassId classId)
-{
-    return CreateElement(graphPtr, interp, objc, objv, classId);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Element *elemPtr;
-
-    if (Blt_GetElement(interp, graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;	/* Can't find named element */
-    }
-    if (Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, elemPtr->configSpecs,
-				  (char *)elemPtr, objv[4], 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestOp --
- *
- *	Find the element closest to the specified screen coordinates.
- *	Options:
- *	-halo		Consider points only with this maximum distance
- *			from the picked coordinate.
- *	-interpolate	Find closest point along element traces, not just
- *			data points.
- *	-along
- *
- * Results:
- *	A standard TCL result. If an element could be found within
- *	the halo distance, the interpreter result is "1", otherwise
- *	"0".  If a closest element exists, the designated TCL array
- *	variable will be set with the following information:
- *
- *	1) the element name,
- *	2) the index of the closest point,
- *	3) the distance (in screen coordinates) from the picked X-Y
- *	   coordinate and the closest point,
- *	4) the X coordinate (graph coordinate) of the closest point,
- *	5) and the Y-coordinate.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_ConfigSpec closestSpecs[] = {
-    {BLT_CONFIG_PIXELS_NNEG, "-halo", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(ClosestSearch, halo), 0},
-    {BLT_CONFIG_BOOLEAN, "-interpolate", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(ClosestSearch, mode), 0 }, 
-    {BLT_CONFIG_CUSTOM, "-along", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(ClosestSearch, along), 0, &alongOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static int
-ClosestOp(
-    Graph *graphPtr,		/* Graph widget */
-    Tcl_Interp *interp,		/* Interpreter to report results to */
-    int objc,			/* Number of element names */
-    Tcl_Obj *const *objv)	/* List of element names */
-{
-    Element *elemPtr;
-    ClosestSearch search;
-    int i, x, y;
-    char *string;
-
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) {
-	Tcl_AppendResult(interp, ": bad window x-coordinate", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK) {
-	Tcl_AppendResult(interp, ": bad window y-coordinate", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (graphPtr->inverted) {
-	int temp;
-
-	temp = x, x = y, y = temp;
-    }
-    for (i = 5; i < objc; i += 2) {	/* Count switches-value pairs */
-	string = Tcl_GetString(objv[i]);
-	if ((string[0] != '-') || 
-	    ((string[1] == '-') && (string[2] == '\0'))) {
-	    break;
-	}
-    }
-    if (i > objc) {
-	i = objc;
-    }
-
-    search.mode = SEARCH_POINTS;
-    search.halo = graphPtr->halo;
-    search.index = -1;
-    search.along = SEARCH_BOTH;
-    search.x = x;
-    search.y = y;
-
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, closestSpecs, i - 5,
-	objv + 5, (char *)&search, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;	/* Error occurred processing an option. */
-    }
-    if (i < objc) {
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    i++;			/* Skip "--" */
-	}
-    }
-    search.dist = (double)(search.halo + 1);
-
-    if (i < objc) {
-	for ( /* empty */ ; i < objc; i++) {
-	    if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-		return TCL_ERROR; /* Can't find named element */
-	    }
-	    if (IGNORE_ELEMENT(elemPtr)) {
-		continue;
-	    }
-	    if (elemPtr->flags & (HIDE|MAP_ITEM)) {
-		continue;
-	    }
-	    (*elemPtr->procsPtr->closestProc) (graphPtr, elemPtr, &search);
-	}
-    } else {
-	Blt_ChainLink link;
-
-	/* 
-	 * Find the closest point from the set of displayed elements,
-	 * searching the display list from back to front.  That way if
-	 * the points from two different elements overlay each other
-	 * exactly, the last one picked will be the topmost.  
-	 */
-	for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	     link != NULL; link = Blt_Chain_PrevLink(link)) {
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (elemPtr->flags & (HIDE|MAP_ITEM|DELETE_PENDING)) {
-		continue;
-	    }
-	    (*elemPtr->procsPtr->closestProc) (graphPtr, elemPtr, &search);
-	}
-    }
-    if (search.dist < (double)search.halo) {
-	Tcl_Obj *listObjPtr;
-	/*
-	 *  Return a list of name value pairs.
-	 */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj("name", -1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(search.elemPtr->obj.name, -1)); 
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("index", -1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(search.index));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("x", -1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(search.point.x));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("y", -1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(search.point.y));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj("dist", -1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(search.dist));
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Sets the element specifications by the given the command line
- *	arguments and calls the element specification configuration
- *	routine. If zero or one command line options are given, only
- *	information about the option(s) is returned in interp->result.
- *	If the element configuration has changed and the element is
- *	currently displayed, the axis limits are updated and
- *	recomputed.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new display list.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int nNames, nOpts;
-    Tcl_Obj *const *options;
-    int i;
-
-    /* Figure out where the option value pairs begin */
-    objc -= 3;
-    objv += 3;
-    for (i = 0; i < objc; i++) {
-	Element *elemPtr;
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find named element */
-	}
-    }
-    nNames = i;			/* Number of element names specified */
-    nOpts = objc - i;		/* Number of options specified */
-    options = objv + nNames;	/* Start of options in objv  */
-
-    for (i = 0; i < nNames; i++) {
-	Element *elemPtr;
-	int flags;
-
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	flags = BLT_CONFIG_OBJV_ONLY;
-	if (nOpts == 0) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		elemPtr->configSpecs, (char *)elemPtr, (Tcl_Obj *)NULL, flags);
-	} else if (nOpts == 1) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		elemPtr->configSpecs, (char *)elemPtr, options[0], flags);
-	}
-	if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, 
-		elemPtr->configSpecs, nOpts, options, (char *)elemPtr, flags) 
-		!= TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((*elemPtr->procsPtr->configProc) (graphPtr, elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Failed to configure element */
-	}
-	if (Blt_ConfigModified(elemPtr->configSpecs, "-hide", (char *)NULL)) {
-	    graphPtr->flags |= RESET_AXES;
-	    elemPtr->flags |= MAP_ITEM;
-	}
-	/* If data points or axes have changed, reset the axes (may
-	 * affect autoscaling) and recalculate the screen points of
-	 * the element. */
-
-	if (Blt_ConfigModified(elemPtr->configSpecs, "-*data", "-map*", "-x",
-		"-y", (char *)NULL)) {
-	    graphPtr->flags |= RESET_WORLD;
-	    elemPtr->flags |= MAP_ITEM;
-	}
-	/* The new label may change the size of the legend */
-	if (Blt_ConfigModified(elemPtr->configSpecs, "-label", (char *)NULL)) {
-	    graphPtr->flags |= (MAP_WORLD | REDRAW_WORLD);
-	}
-    }
-    /* Update the pixmap if any configuration option changed */
-    graphPtr->flags |= CACHE_DIRTY;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeactivateOp --
- *
- *	Clears the active bit for the named elements.
- *
- * Results:
- *	Returns TCL_OK if no errors occurred.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeactivateOp(
-    Graph *graphPtr,		/* Graph widget */
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,			/* Number of element names */
-    Tcl_Obj *const *objv)	/* List of element names */
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Element *elemPtr;
-
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find named element */
-	}
-	elemPtr->flags &= ~(ACTIVE | ACTIVE_PENDING);
-	if (elemPtr->activeIndices != NULL) {
-	    Blt_Free(elemPtr->activeIndices);
-	    elemPtr->activeIndices = NULL;
-	}
-	elemPtr->nActiveIndices = 0;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Delete the named elements from the graph.
- *
- * Results:
- *	TCL_ERROR is returned if any of the named elements can not be
- *	found.  Otherwise TCL_OK is returned;
- *
- * Side Effects:
- *	If the element is currently displayed, the plotting area of
- *	the graph is redrawn. Memory and resources allocated by the
- *	elements are released.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(
-    Graph *graphPtr,		/* Graph widget */
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,			/* Number of element names */
-    Tcl_Obj *const *objv)	/* List of element names */
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Element *elemPtr;
-
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find named element */
-	}
-	elemPtr->flags |= DELETE_PENDING;
-	Tcl_EventuallyFree(elemPtr, FreeElement);
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExistsOp --
- *
- *	Indicates if the named element exists in the graph.
- *
- * Results:
- *	The return value is a standard TCL result.  The interpreter
- *	result will contain "1" or "0".
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ExistsOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&graphPtr->elements.table, Tcl_GetString(objv[3]));
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (hPtr != NULL));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- * 	Returns the name of the picked element (using the element
- *	bind operation).  Right now, the only name accepted is
- *	"current".
- *
- * Results:
- *	A standard TCL result.  The interpreter result will contain
- *	the name of the element.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GetOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if ((string[0] == 'c') && (strcmp(string, "current") == 0)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_GetCurrentItem(graphPtr->bindTable);
-	/* Report only on elements. */
-	if ((elemPtr != NULL) && ((elemPtr->flags & DELETE_PENDING) == 0) &&
-	    (elemPtr->obj.classId >= CID_ELEM_BAR) &&
-	    (elemPtr->obj.classId <= CID_ELEM_STRIP)) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->obj.name,-1);
-	}
-    }
-    return TCL_OK;
-}
-
-static Tcl_Obj *
-DisplayListObj(Graph *graphPtr)
-{
-    Tcl_Obj *listObjPtr;
-    Blt_ChainLink link;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-	Tcl_Obj *objPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-	Tcl_ListObjAppendElement(graphPtr->interp, listObjPtr, objPtr);
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LowerOp --
- *
- *	Lowers the named elements to the bottom of the display list.
- *
- * Results:
- *	A standard TCL result. The interpreter result will contain the new
- *	display list of element names.
- *
- *	.g element lower elem ?elem...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-LowerOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Chain chain;
-    Blt_ChainLink link, next;
-    int i;
-
-    /* Move the links of lowered elements out of the display list into
-     * a temporary list. */
-    chain = Blt_Chain_Create();
-    for (i = 3; i < objc; i++) {
-	Element *elemPtr;
-
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find named element */
-	}
-	Blt_Chain_UnlinkLink(graphPtr->elements.displayList, elemPtr->link); 
-	Blt_Chain_LinkAfter(chain, elemPtr->link, NULL); 
-    }
-    /* Append the links to end of the display list. */
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; link = next) {
-	next = Blt_Chain_NextLink(link);
-	Blt_Chain_UnlinkLink(chain, link); 
-	Blt_Chain_LinkAfter(graphPtr->elements.displayList, link, NULL); 
-    }	
-    Blt_Chain_Destroy(chain);
-    Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
-    graphPtr->flags |= RESET_WORLD;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Returns the names of the elements is the graph matching
- *	one of more patterns provided.  If no pattern arguments
- *	are given, then all element names will be returned.
- *
- * Results:
- *	The return value is a standard TCL result. The interpreter
- *	result will contain a TCL list of the element names.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.table, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Element *elemPtr;
-	    Tcl_Obj *objPtr;
-
-	    elemPtr = Blt_GetHashValue(hPtr);
-	    objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.table, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Element *elemPtr;
-	    int i;
-
-	    elemPtr = Blt_GetHashValue(hPtr);
-	    for (i = 3; i < objc; i++) {
-		if (Tcl_StringMatch(elemPtr->obj.name,Tcl_GetString(objv[i]))) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RaiseOp --
- *
- *	Reset the element within the display list.
- *
- * Results:
- *	The return value is a standard TCL result. The interpreter
- *	result will contain the new display list of element names.
- *
- *	.g element raise ?elem...?
- *
- *---------------------------------------------------------------------------
- */
-static int
-RaiseOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Chain chain;
-    Blt_ChainLink link, prev;
-    int i;
-
-    /* Move the links of lowered elements out of the display list into
-     * a temporary list. */
-    chain = Blt_Chain_Create();
-    for (i = 3; i < objc; i++) {
-	Element *elemPtr;
-
-	if (Blt_GetElement(interp, graphPtr, objv[i], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find named element */
-	}
-	Blt_Chain_UnlinkLink(graphPtr->elements.displayList, elemPtr->link); 
-	Blt_Chain_LinkAfter(chain, elemPtr->link, NULL); 
-    }
-    /* Prepend the links to beginning of the display list in reverse order. */
-    for (link = Blt_Chain_LastLink(chain); link != NULL; link = prev) {
-	prev = Blt_Chain_PrevLink(link);
-	Blt_Chain_UnlinkLink(chain, link); 
-	Blt_Chain_LinkBefore(graphPtr->elements.displayList, link, NULL); 
-    }	
-    Blt_Chain_Destroy(chain);
-    Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
-    graphPtr->flags |= RESET_WORLD;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShowOp --
- *
- *	Queries or resets the element display list.
- *
- * Results:
- *	The return value is a standard TCL result. The interpreter
- *	result will contain the new display list of element names.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ShowOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    if (objc == 4) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-	Tcl_Obj **elem;
-	int i, n;
-
-	if (Tcl_ListObjGetElements(interp, objv[3], &n, &elem) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* Collect the named elements into a list. */
-	chain = Blt_Chain_Create();
-	for (i = 0; i < n; i++) {
-	    Element *elemPtr;	/* Element information record */
-
-	    if (Blt_GetElement(interp, graphPtr, elem[i], &elemPtr) != TCL_OK) {
-		Blt_Chain_Destroy(chain);
-		return TCL_ERROR;
-	    }
-	    Blt_Chain_Append(chain, elemPtr);
-	}
-	/* Clear the links from the currently displayed elements.  */
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    elemPtr->link = NULL;
-	}
-	Blt_Chain_Destroy(graphPtr->elements.displayList);
-	graphPtr->elements.displayList = chain;
-	/* Set links on all the displayed elements.  */
-	for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    elemPtr->link = link;
-	}
-	graphPtr->flags |= RESET_WORLD;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeOp --
- *
- *	Returns the name of the type of the element given by some
- *	element name.
- *
- * Results:
- *	A standard TCL result. Returns the type of the element in
- *	interp->result. If the identifier given doesn't represent an
- *	element, then an error message is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeOp(
-    Graph *graphPtr,		/* Graph widget */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Element name */
-{
-    Element *elemPtr;
-
-    if (Blt_GetElement(interp, graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;	/* Can't find named element */
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->obj.className, -1);
-    return TCL_OK;
-}
-
-/*
- * Global routines:
- */
-static Blt_OpSpec elemOps[] = {
-    {"activate",   1, ActivateOp,   3, 0, "?elemName? ?index...?",},
-    {"bind",       1, BindOp,       3, 6, "elemName sequence command",},
-    {"cget",       2, CgetOp,       5, 5, "elemName option",},
-    {"closest",    2, ClosestOp,    5, 0,
-	"x y ?option value?... ?elemName?...",},
-    {"configure",  2, ConfigureOp,  4, 0,
-	"elemName ?elemName?... ?option value?...",},
-    {"create",     2, CreateOp,     4, 0, "elemName ?option value?...",},
-    {"deactivate", 3, DeactivateOp, 3, 0, "?elemName?...",},
-    {"delete",     3, DeleteOp,     3, 0, "?elemName?...",},
-    {"exists",     1, ExistsOp,     4, 4, "elemName",},
-    {"get",        1, GetOp,        4, 4, "name",},
-    {"lower",      1, LowerOp,      3, 0, "?elemName?...",},
-    {"names",      1, NamesOp,      3, 0, "?pattern?...",},
-    {"raise",      1, RaiseOp,      3, 0, "?elemName?...",},
-    {"show",       1, ShowOp,       3, 4, "?elemList?",},
-    {"type",       1, TypeOp,       4, 4, "elemName",},
-};
-static int numElemOps = sizeof(elemOps) / sizeof(Blt_OpSpec);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ElementOp --
- *
- *	This procedure is invoked to process the TCL command that
- *	corresponds to a widget managed by this module.  See the user
- *	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ElementOp(
-    Graph *graphPtr,		/* Graph widget record */
-    Tcl_Interp *interp,
-    int objc,			/* # arguments */
-    Tcl_Obj *const *objv,	/* Argument list */
-    ClassId classId)
-{
-    void *ptr;
-    int result;
-
-    ptr = Blt_GetOpFromObj(interp, numElemOps, elemOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (ptr == NULL) {
-	return TCL_ERROR;
-    }
-    if (ptr == CreateOp) {
-	result = CreateOp(graphPtr, interp, objc, objv, classId);
-    } else {
-	GraphElementProc *proc;
-	
-	proc = ptr;
-	result = (*proc) (graphPtr, interp, objc, objv);
-    }
-    return result;
-}
diff --git a/blt3.0/src/bltGrElem.h b/blt3.0/src/bltGrElem.h
deleted file mode 100644
index f0e3969..0000000
--- a/blt3.0/src/bltGrElem.h
+++ /dev/null
@@ -1,271 +0,0 @@
-
-/*
- * bltGrElem.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_GR_ELEM_H
-#define _BLT_GR_ELEM_H
-
-#include <bltVector.h>
-#include <bltDataTable.h>
-
-#define ELEM_SOURCE_VALUES	0
-#define ELEM_SOURCE_VECTOR	1
-#define ELEM_SOURCE_TABLE	2
-
-#define SEARCH_X	0
-#define SEARCH_Y	1
-#define SEARCH_BOTH	2
-
-#define SHOW_NONE	0
-#define SHOW_X		1
-#define SHOW_Y		2
-#define SHOW_BOTH	3
-
-#define SEARCH_POINTS	0	/* Search for closest data point. */
-#define SEARCH_TRACES	1	/* Search for closest point on trace.
-				 * Interpolate the connecting line segments if
-				 * necessary. */
-#define SEARCH_AUTO	2	/* Automatically determine whether to search
-				 * for data points or traces.  Look for traces
-				 * if the linewidth is > 0 and if there is
-				 * more than one data point. */
-
-#define	LABEL_ACTIVE 	(1<<9)	/* Non-zero indicates that the element's entry
-				 * in the legend should be drawn in its active
-				 * foreground and background colors. */
-#define SCALE_SYMBOL	(1<<10)
-
-#define NUMBEROFPOINTS(e)	MIN((e)->x.nValues, (e)->y.nValues)
-
-#define NORMALPEN(e)		((((e)->normalPenPtr == NULL) ?  \
-				  (e)->builtinPenPtr :		 \
-				  (e)->normalPenPtr))
-
-/*
- *---------------------------------------------------------------------------
- *
- * Weight --
- *
- *	Designates a range of values by a minimum and maximum limit.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double min, max, range;
-} Weight;
-
-#define SetRange(l) \
-	((l).range = ((l).max > (l).min) ? ((l).max - (l).min) : DBL_EPSILON)
-#define SetScale(l) \
-	((l).scale = 1.0 / (l).range)
-#define SetWeight(l, lo, hi) \
-	((l).min = (lo), (l).max = (hi), SetRange(l))
-
-typedef struct {
-    Segment2d *segments;	/* Point to start of this pen's X-error bar
-				 * segments in the element's array. */
-    int nSegments;
-} ErrorBarSegments;
-
-/* 
- * An element has one or more vectors plus several attributes, such as line
- * style, thickness, color, and symbol type.  It has an identifier which
- * distinguishes it among the list of all elements.
- */
-typedef struct {
-    Weight weight;		/* Weight range where this pen is valid. */
-    Pen *penPtr;		/* Pen to use. */
-} PenStyle;
-
-
-typedef struct {
-    XColor *color;		/* Color of error bar */
-    int lineWidth;		/* Width of the error bar segments. */
-    GC gc;
-    int show;			/* Flags for errorbars: none, x, y, or both */
-} ErrorBarAttributes;
-
-typedef struct {
-    /* Inputs */
-    int halo;			/* Maximal screen distance a candidate point
-				 * can be from the sample window coordinate */
-
-    int mode;			/* Indicates whether to find the closest data
-				 * point or the closest point on the trace by
-				 * interpolating the line segments.  Can also
-				 * be SEARCH_AUTO, indicating to choose how to
-				 * search.*/
-
-    int x, y;			/* Screen coordinates of test point */
-
-    int along;			/* Indicates to let search run along a
-				 * particular axis: x, y, or both. */
-
-    /* Outputs */
-    Element *elemPtr;		/* Name of the closest element */
-
-    Point2d point;		/* Graph coordinates of closest point */
-
-    int index;			/* Index of closest data point */
-
-    double dist;		/* Distance in screen coordinates */
-
-} ClosestSearch;
-
-typedef void (ElementDrawProc) (Graph *graphPtr, Drawable drawable, 
-	Element *elemPtr);
-
-typedef void (ElementToPostScriptProc) (Graph *graphPtr, Blt_Ps ps, 
-	Element *elemPtr);
-
-typedef void (ElementDestroyProc) (Graph *graphPtr, Element *elemPtr);
-
-typedef int (ElementConfigProc) (Graph *graphPtr, Element *elemPtr);
-
-typedef void (ElementMapProc) (Graph *graphPtr, Element *elemPtr);
-
-typedef void (ElementExtentsProc) (Element *elemPtr, Region2d *extsPtr);
-
-typedef void (ElementClosestProc) (Graph *graphPtr, Element *elemPtr, 
-	ClosestSearch *searchPtr);
-
-typedef void (ElementDrawSymbolProc) (Graph *graphPtr, Drawable drawable, 
-	Element *elemPtr, int x, int y, int symbolSize);
-
-typedef void (ElementSymbolToPostScriptProc) (Graph *graphPtr, 
-	Blt_Ps ps, Element *elemPtr, double x, double y, int symSize);
-
-typedef struct {
-    ElementClosestProc *closestProc;
-    ElementConfigProc *configProc;
-    ElementDestroyProc *destroyProc;
-    ElementDrawProc *drawActiveProc;
-    ElementDrawProc *drawNormalProc;
-    ElementDrawSymbolProc *drawSymbolProc;
-    ElementExtentsProc *extentsProc;
-    ElementToPostScriptProc *printActiveProc;
-    ElementToPostScriptProc *printNormalProc;
-    ElementSymbolToPostScriptProc *printSymbolProc;
-    ElementMapProc *mapProc;
-} ElementProcs;
-
-typedef struct {
-    Blt_VectorId vector;
-} VectorDataSource;
-
-typedef struct {
-    Blt_Table table;			/* Data table. */ 
-    Blt_TableColumn column;		/* Column of data used. */
-    Blt_TableNotifier notifier;		/* Notifier used for column destroy
-					 * event. */
-    Blt_TableTrace trace;		/* Trace used for column
-					 * (set/get/unset). */
-    Blt_HashEntry *hashPtr;		/* Pointer to the entry of the data
-					 * source in graph's hash table of
-					 * datatables. One graph may use
-					 * multiple columns from the same data
-					 * table. */
-} TableDataSource;
-
-/* 
- * The data structure below contains information pertaining to a line vector.
- * It consists of an array of floating point data values and for convenience,
- * the number and minimum/maximum values.
- */
-typedef struct {
-    int type;			/* Selects the type of data populating this
-				 * vector: ELEM_SOURCE_VECTOR,
-				 * ELEM_SOURCE_TABLE, or ELEM_SOURCE_VALUES
-				 */
-    Element *elemPtr;		/* Element associated with vector. */
-    union {
-	TableDataSource tableSource;
-	VectorDataSource vectorSource;
-    };
-    double *values;
-    int nValues;
-    int arraySize;
-    double min, max;
-} ElemValues;
-
-
-struct _Element {
-    GraphObj obj;			/* Must be first field in element. */
-    unsigned int flags;		
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to elements. */
-    const char *label;			/* Label displayed in legend */
-    unsigned short row, col;		/* Position of the entry in the
-					 * legend. */
-    int legendRelief;			/* Relief of label in legend. */
-    Axis2d axes;			/* X-axis and Y-axis mapping the
-					 * element */
-    ElemValues x, y, w;			/* Contains array of floating point
-					 * graph coordinate values. Also holds
-					 * min/max and the number of
-					 * coordinates */
-    int *activeIndices;			/* Array of indices (malloc-ed) which
-					 * indicate which data points are
-					 * active (drawn with "active"
-					 * colors). */
-    int nActiveIndices;			/* Number of active data points.
-					 * Special case: if nActiveIndices < 0
-					 * and the active bit is set in
-					 * "flags", then all data points are
-					 * drawn active. */
-    ElementProcs *procsPtr;
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications. */
-    Pen *activePenPtr;			/* Standard Pens */
-    Pen *normalPenPtr;
-    Pen *builtinPenPtr;
-    Blt_Chain stylePalette;		/* Palette of pens. */
-
-    /* Symbol scaling */
-    int scaleSymbols;			/* If non-zero, the symbols will scale
-					 * in size as the graph is zoomed
-					 * in/out.  */
-    double xRange, yRange;		/* Initial X-axis and Y-axis ranges:
-					 * used to scale the size of element's
-					 * symbol. */
-    int state;
-    Blt_ChainLink link;			/* Element's link in display list. */
-};
-
-
-BLT_EXTERN double Blt_FindElemValuesMinimum(ElemValues *vecPtr, double minLimit);
-BLT_EXTERN void Blt_ResizeStatusArray(Element *elemPtr, int nPoints);
-BLT_EXTERN int Blt_GetPenStyle(Graph *graphPtr, char *name, size_t classId, 
-	PenStyle *stylePtr);
-BLT_EXTERN void Blt_FreeStylePalette (Blt_Chain stylePalette);
-BLT_EXTERN PenStyle **Blt_StyleMap (Element *elemPtr);
-BLT_EXTERN void Blt_MapErrorBars(Graph *graphPtr, Element *elemPtr, 
-	PenStyle **dataToStyle);
-BLT_EXTERN void Blt_FreeDataValues(ElemValues *evPtr);
-BLT_EXTERN int Blt_GetElement(Tcl_Interp *interp, Graph *graphPtr, 
-	Tcl_Obj *objPtr, Element **elemPtrPtr);
-BLT_EXTERN void Blt_DestroyTableClients(Graph *graphPtr);
-
-#endif /* _BLT_GR_ELEM_H */
diff --git a/blt3.0/src/bltGrHairs.c b/blt3.0/src/bltGrHairs.c
deleted file mode 100644
index 86ebb57..0000000
--- a/blt3.0/src/bltGrHairs.c
+++ /dev/null
@@ -1,534 +0,0 @@
-
-/*
- * bltGrHairs.c --
- *
- * This module implements crosshairs for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-
-typedef int (GraphCrosshairProc)(Graph *graphPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * Crosshairs
- *
- *	Contains the line segments positions and graphics context used
- *	to simulate crosshairs (by XORing) on the graph.
- *
- *---------------------------------------------------------------------------
- */
-
-struct _Crosshairs {
-
-    XPoint hotSpot;		/* Hot spot for crosshairs */
-    int visible;		/* Internal state of crosshairs. If non-zero,
-				 * crosshairs are displayed. */
-    int hidden;			/* If non-zero, crosshairs are not displayed.
-				 * This is not necessarily consistent with the
-				 * internal state variable.  This is true when
-				 * the hot spot is off the graph.  */
-    Blt_Dashes dashes;		/* Dashstyle of the crosshairs. This represents
-				 * an array of alternatingly drawn pixel
-				 * values. If NULL, the hairs are drawn as a
-				 * solid line */
-    int lineWidth;		/* Width of the simulated crosshair lines */
-    XSegment segArr[2];		/* Positions of line segments representing the
-				 * simulated crosshairs. */
-    XColor *colorPtr;		/* Foreground color of crosshairs */
-    GC gc;			/* Graphics context for crosshairs. Set to
-				 * GXxor to not require redraws of graph */
-};
-
-#define DEF_HAIRS_DASHES	(char *)NULL
-#define DEF_HAIRS_FOREGROUND	RGB_BLACK
-#define DEF_HAIRS_LINE_WIDTH	"0"
-#define DEF_HAIRS_HIDE		"yes"
-#define DEF_HAIRS_POSITION	(char *)NULL
-
-BLT_EXTERN Blt_CustomOption bltPointOption;
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_COLOR, "-color", "color", "Color", DEF_HAIRS_FOREGROUND, 
-	Blt_Offset(Crosshairs, colorPtr), 0},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_HAIRS_DASHES, 
-	Blt_Offset(Crosshairs, dashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-hide", "hide", "Hide", DEF_HAIRS_HIDE, 
-	Blt_Offset(Crosshairs, hidden), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "Linewidth",
-	DEF_HAIRS_LINE_WIDTH, Blt_Offset(Crosshairs, lineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-position", "position", "Position", 
-	DEF_HAIRS_POSITION, Blt_Offset(Crosshairs, hotSpot), 0, &bltPointOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * TurnOffHairs --
- *
- *	XOR's the existing line segments (representing the crosshairs),
- *	thereby erasing them.  The internal state of the crosshairs is
- *	tracked.
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Crosshairs are erased.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TurnOffHairs(Tk_Window tkwin, Crosshairs *chPtr)
-{
-    if (Tk_IsMapped(tkwin) && (chPtr->visible)) {
-	XDrawSegments(Tk_Display(tkwin), Tk_WindowId(tkwin), chPtr->gc,
-	    chPtr->segArr, 2);
-	chPtr->visible = FALSE;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TurnOnHairs --
- *
- *	Draws (by XORing) new line segments, creating the effect of
- *	crosshairs. The internal state of the crosshairs is tracked.
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Crosshairs are displayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TurnOnHairs(Graph *graphPtr, Crosshairs *chPtr)
-{
-    if (Tk_IsMapped(graphPtr->tkwin) && (!chPtr->visible)) {
-	if (!PointInGraph(graphPtr, chPtr->hotSpot.x, chPtr->hotSpot.y)) {
-	    return;		/* Coordinates are off the graph */
-	}
-	XDrawSegments(graphPtr->display, Tk_WindowId(graphPtr->tkwin),
-	    chPtr->gc, chPtr->segArr, 2);
-	chPtr->visible = TRUE;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureCrosshairs --
- *
- *	Configures attributes of the crosshairs such as line width,
- *	dashes, and position.  The crosshairs are first turned off
- *	before any of the attributes changes.
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Crosshair GC is allocated.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ConfigureCrosshairs(Graph *graphPtr)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-    unsigned long int pixel;
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    /*
-     * Turn off the crosshairs temporarily. This is in case the new
-     * configuration changes the size, style, or position of the lines.
-     */
-    TurnOffHairs(graphPtr->tkwin, chPtr);
-
-    gcValues.function = GXxor;
-
-    if (graphPtr->plotBg == NULL) {
-	/* The graph's color option may not have been set yet */
-	pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
-    } else {
-	pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
-    }
-    gcValues.background = pixel;
-    gcValues.foreground = (pixel ^ chPtr->colorPtr->pixel);
-
-    gcValues.line_width = LineWidth(chPtr->lineWidth);
-    gcMask = (GCForeground | GCBackground | GCFunction | GCLineWidth);
-    if (LineIsDashed(chPtr->dashes)) {
-	gcValues.line_style = LineOnOffDash;
-	gcMask |= GCLineStyle;
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(chPtr->dashes)) {
-	Blt_SetDashes(graphPtr->display, newGC, &chPtr->dashes);
-    }
-    if (chPtr->gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, chPtr->gc);
-    }
-    chPtr->gc = newGC;
-
-    /*
-     * Are the new coordinates on the graph?
-     */
-    chPtr->segArr[0].x2 = chPtr->segArr[0].x1 = chPtr->hotSpot.x;
-    chPtr->segArr[0].y1 = graphPtr->bottom;
-    chPtr->segArr[0].y2 = graphPtr->top;
-    chPtr->segArr[1].y2 = chPtr->segArr[1].y1 = chPtr->hotSpot.y;
-    chPtr->segArr[1].x1 = graphPtr->left;
-    chPtr->segArr[1].x2 = graphPtr->right;
-
-    if (!chPtr->hidden) {
-	TurnOnHairs(graphPtr, chPtr);
-    }
-}
-
-void
-Blt_EnableCrosshairs(Graph *graphPtr)
-{
-    if (!graphPtr->crosshairs->hidden) {
-	TurnOnHairs(graphPtr, graphPtr->crosshairs);
-    }
-}
-
-void
-Blt_DisableCrosshairs(Graph *graphPtr)
-{
-    if (!graphPtr->crosshairs->hidden) {
-	TurnOffHairs(graphPtr->tkwin, graphPtr->crosshairs);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UpdateCrosshairs --
- *
- *	Update the length of the hairs (not the hot spot).
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UpdateCrosshairs(Graph *graphPtr)
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    chPtr->segArr[0].y1 = graphPtr->bottom;
-    chPtr->segArr[0].y2 = graphPtr->top;
-    chPtr->segArr[1].x1 = graphPtr->left;
-    chPtr->segArr[1].x2 = graphPtr->right;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DestroyCrosshairs --
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Crosshair GC is allocated.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DestroyCrosshairs(Graph *graphPtr)
-{
-    if (graphPtr->crosshairs != NULL) {
-	Crosshairs *chPtr = graphPtr->crosshairs;
-
-	Blt_FreeOptions(configSpecs, (char *)chPtr, graphPtr->display, 0);
-	if (chPtr->gc != NULL) {
-	    Blt_FreePrivateGC(graphPtr->display, chPtr->gc);
-	}
-	Blt_Free(chPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreateCrosshairs --
- *
- *	Creates and initializes a new crosshair structure.
- *
- * Results:
- *	Returns TCL_ERROR if the crosshair structure can't be created,
- *	otherwise TCL_OK.
- *
- * Side Effects:
- *	Crosshair GC is allocated.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CreateCrosshairs(Graph *graphPtr)
-{
-    Crosshairs *chPtr;
-
-    chPtr = Blt_AssertCalloc(1, sizeof(Crosshairs));
-    chPtr->hidden = TRUE;
-    chPtr->hotSpot.x = chPtr->hotSpot.y = -1;
-    graphPtr->crosshairs = chPtr;
-
-    if (Blt_ConfigureComponentFromObj(graphPtr->interp, graphPtr->tkwin,
-	    "crosshairs", "Crosshairs", configSpecs, 0, (Tcl_Obj **)NULL,
-	    (char *)chPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Queries configuration attributes of the crosshairs such as
- *	line width, dashes, and position.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-CgetOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    return Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)chPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Queries or resets configuration attributes of the crosshairs
- * 	such as line width, dashes, and position.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Crosshairs are reset.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)chPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)chPtr, objv[3], 0);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-	objc - 3, objv + 3, (char *)chPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_ConfigureCrosshairs(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OnOp --
- *
- *	Maps the crosshairs.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Crosshairs are reset if necessary.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OnOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    if (chPtr->hidden) {
-	TurnOnHairs(graphPtr, chPtr);
-	chPtr->hidden = FALSE;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OffOp --
- *
- *	Unmaps the crosshairs.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Crosshairs are reset if necessary.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OffOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    if (!chPtr->hidden) {
-	TurnOffHairs(graphPtr->tkwin, chPtr);
-	chPtr->hidden = TRUE;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ToggleOp --
- *
- *	Toggles the state of the crosshairs.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Crosshairs are reset.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ToggleOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    Crosshairs *chPtr = graphPtr->crosshairs;
-
-    chPtr->hidden = (chPtr->hidden == 0);
-    if (chPtr->hidden) {
-	TurnOffHairs(graphPtr->tkwin, chPtr);
-    } else {
-	TurnOnHairs(graphPtr, chPtr);
-    }
-    return TCL_OK;
-}
-
-
-static Blt_OpSpec xhairOps[] =
-{
-    {"cget", 2, CgetOp, 4, 4, "option",},
-    {"configure", 2, ConfigureOp, 3, 0, "?options...?",},
-    {"off", 2, OffOp, 3, 3, "",},
-    {"on", 2, OnOp, 3, 3, "",},
-    {"toggle", 1, ToggleOp, 3, 3, "",},
-};
-static int nXhairOps = sizeof(xhairOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CrosshairsOp --
- *
- *	User routine to configure crosshair simulation.  Crosshairs
- *	are simulated by drawing line segments parallel to both axes
- *	using the XOR drawing function. The allows the lines to be
- *	erased (by drawing them again) without redrawing the entire
- *	graph.  Care must be taken to erase crosshairs before redrawing
- *	the graph and redraw them after the graph is redraw.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *	Crosshairs may be drawn in the plotting area.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CrosshairsOp(
-    Graph *graphPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    GraphCrosshairProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nXhairOps, xhairOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (graphPtr, interp, objc, objv);
-}
diff --git a/blt3.0/src/bltGrLegd.c b/blt3.0/src/bltGrLegd.c
deleted file mode 100644
index fadeddf..0000000
--- a/blt3.0/src/bltGrLegd.c
+++ /dev/null
@@ -1,3059 +0,0 @@
-
-/*
- * bltGrLegd.c --
- *
- * This module implements the legend for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltGrElem.h"
-#include "bltPicture.h"
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-/*
- *  Selection related flags:
- *
- *	SELECT_EXPORT		Export the selection to X11.
- *
- *	SELECT_PENDING		A "selection" command idle task is pending.
- *
- *	SELECT_CLEAR		Clear selection flag of entry.
- *
- *	SELECT_SET		Set selection flag of entry.
- *
- *	SELECT_TOGGLE		Toggle selection flag of entry.
- *
- *	SELECT_MASK		Mask of selection set/clear/toggle flags.
- *
- *	SELECT_SORTED		Indicates if the entries in the selection 
- *				should be sorted or displayed in the order 
- *				they were selected.
- *
- */
-
-#define SELECT_CLEAR		(1<<16)
-#define SELECT_EXPORT		(1<<17) 
-#define SELECT_PENDING		(1<<18)
-#define SELECT_SET		(1<<19)
-#define SELECT_TOGGLE		(SELECT_SET | SELECT_CLEAR)
-#define SELECT_MASK		(SELECT_SET | SELECT_CLEAR)
-#define SELECT_SORTED		(1<<20)
-
-#define RAISED			(1<<21)
-
-#define SELECT_MODE_SINGLE	(1<<0)
-#define SELECT_MODE_MULTIPLE	(1<<1)
-
-typedef int (GraphLegendProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-/*
- * Legend --
- *
- * 	Contains information specific to how the legend will be displayed.
- */
-struct _Legend {
-    unsigned int flags;
-    ClassId classId;			/* Type: Element or Marker. */
-
-    int nEntries;			/* Number of element entries in
-					 * table. */
-    short int nColumns, nRows;	        /* Number of columns and rows in
-					 * legend */
-    short int width, height;		/* Dimensions of the legend */
-    short int entryWidth, entryHeight;
-
-    int site;
-    short int xReq, yReq;		/* User-requested site of legend, not
-					 * the final actual position. Used in
-					 * conjunction with the anchor below
-					 * to determine location of the
-					 * legend. */
-
-    Tk_Anchor anchor;			/* Anchor of legend. Used to interpret
-					 * the positioning point of the legend
-					 * in the graph*/
-
-    int x, y;				/* Computed origin of legend. */
-
-    Graph *graphPtr;
-    Tcl_Command cmdToken;		/* Token for graph's widget command. */
-    int reqColumns, reqRows;
-
-    Blt_Pad ixPad, iyPad;		/* # of pixels interior padding around
-					 * legend entries */
-    Blt_Pad xPad, yPad;			/* # of pixels padding to exterior of
-					 * legend */
-    Tk_Window tkwin;			/* If non-NULL, external window to draw
-					 * legend. */
-    TextStyle style;
-
-    int maxSymSize;			/* Size of largest symbol to be
-					 * displayed.  Used to calculate size
-					 * of legend */
-    XColor *fgColor;
-    Blt_Background activeBg;		/* Active legend entry background
-					 * color. */
-    XColor *activeFgColor;
-    int activeRelief;			/* 3-D effect on active entry. */
-    int entryBW;		/* Border width around each entry in
-					 * legend. */
-    Blt_Background normalBg;		/* 3-D effect of legend. */
-    int borderWidth;			/* Width of legend 3-D border */
-    int relief;				/* 3-d effect of border around the
-					 * legend: TK_RELIEF_RAISED etc. */
-
-    Blt_BindTable bindTable;
-
-    int selRelief;
-    int selBW;
-
-    XColor *selInFocusFgColor;		/* Text color of a selected entry. */
-    XColor *selOutFocusFgColor;
-
-    Blt_Background selInFocusBg;
-    Blt_Background selOutFocusBg;
-
-    XColor *focusColor;
-    Blt_Dashes focusDashes;		/* Dash on-off value. */
-    GC focusGC;				/* Graphics context for the active
-					 * label. */
-
-    const char *takeFocus;
-    int focus;				/* Position of the focus entry. */
-
-    int cursorX, cursorY;		/* Position of the insertion cursor in
-					 * the textbox window. */
-    short int cursorWidth;		/* Size of the insertion cursor
-					 * symbol. */
-    short int cursorHeight;
-    Element *focusPtr;			/* Element that currently has the
-					 * focus. If NULL, no legend entry has
-					 * the focus. */
-    Element *selAnchorPtr;		/* Fixed end of selection. Used to
-					 * extend the selection while
-					 * maintaining the other end of the
-					 * selection. */
-    Element *selMarkPtr;
-    Element *selFirstPtr;		/* First element selected in current
-					 * pick. */
-    Element *selLastPtr;		/* Last element selected in current
-					 * pick. */
-    int exportSelection;
-    int active;
-    int cursorOn;			/* Indicates if the cursor is
-					 * displayed. */
-    int onTime, offTime;		/* Time in milliseconds to wait before
-					 * changing the cursor from off-to-on
-					 * and on-to-off. Setting offTime to 0
-					 * makes the * cursor steady. */
-    Tcl_TimerToken timerToken;		/* Handle for a timer event called
-					 * periodically to blink the cursor. */
-    const char *selectCmd;		/* TCL script that's invoked whenever
-					 * the selection changes. */
-    int selectMode;			/* Mode of selection: single or
-					 * multiple. */
-    Blt_HashTable selectTable;		/* Table of selected elements. Used to
-					 * quickly determine whether an element
-					 * is selected. */
-    Blt_Chain selected;			/* List of selected elements. */
-
-    const char *title;
-    unsigned int titleWidth, titleHeight;
-    TextStyle titleStyle;		/* Legend title attributes */
-};
-
-#define padLeft  	xPad.side1
-#define padRight  	xPad.side2
-#define padTop		yPad.side1
-#define padBottom	yPad.side2
-#define PADDING(x)	((x).side1 + (x).side2)
-#define LABEL_PAD	2
-
-#define DEF_LEGEND_ACTIVEBACKGROUND 	RGB_SKYBLUE4
-#define DEF_LEGEND_ACTIVEBORDERWIDTH    "2"
-#define DEF_LEGEND_ACTIVEFOREGROUND	RGB_WHITE
-#define DEF_LEGEND_ACTIVERELIEF		"flat"
-#define DEF_LEGEND_ANCHOR	   	"n"
-#define DEF_LEGEND_BACKGROUND	   	(char *)NULL
-#define DEF_LEGEND_BORDERWIDTH		STD_BORDERWIDTH
-#define DEF_LEGEND_COLUMNS		"0"
-#define DEF_LEGEND_EXPORTSELECTION	"no"
-#define DEF_LEGEND_FONT			"{Sans Serif} 8"
-#define DEF_LEGEND_FOREGROUND		STD_NORMAL_FOREGROUND
-#define DEF_LEGEND_HIDE			"no"
-#define DEF_LEGEND_IPADX		"1"
-#define DEF_LEGEND_IPADY		"1"
-#define DEF_LEGEND_PADX			"1"
-#define DEF_LEGEND_PADY			"1"
-#define DEF_LEGEND_POSITION		"rightmargin"
-#define DEF_LEGEND_RAISED       	"no"
-#define DEF_LEGEND_RELIEF		"flat"
-#define DEF_LEGEND_ROWS			"0"
-#define DEF_LEGEND_SELECTBACKGROUND 	RGB_SKYBLUE4
-#define DEF_LEGEND_SELECT_BG_MONO  	STD_SELECT_BG_MONO
-#define DEF_LEGEND_SELECTBORDERWIDTH	"1"
-#define DEF_LEGEND_SELECTMODE		"multiple"
-#define DEF_LEGEND_SELECT_FG_MONO  	STD_SELECT_FG_MONO
-#define DEF_LEGEND_SELECTFOREGROUND 	RGB_WHITE /*STD_SELECT_FOREGROUND*/
-#define DEF_LEGEND_SELECTRELIEF		"flat"
-#define DEF_LEGEND_FOCUSDASHES		"dot"
-#define DEF_LEGEND_FOCUSEDIT		"no"
-#define DEF_LEGEND_FOCUSFOREGROUND	STD_ACTIVE_FOREGROUND
-#define DEF_LEGEND_FOCUS_FG_MONO	STD_ACTIVE_FG_MONO
-#define DEF_LEGEND_TAKEFOCUS		"1"
-#define DEF_LEGEND_TITLE		(char *)NULL
-#define	DEF_LEGEND_TITLECOLOR		STD_NORMAL_FOREGROUND
-#define DEF_LEGEND_TITLEFONT		"{Sans Serif} 8 bold"
-
-static Blt_OptionParseProc ObjToPosition;
-static Blt_OptionPrintProc PositionToObj;
-static Blt_CustomOption legendPositionOption =
-{
-    ObjToPosition, PositionToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToSelectmode;
-static Blt_OptionPrintProc SelectmodeToObj;
-static Blt_CustomOption selectmodeOption = {
-    ObjToSelectmode, SelectmodeToObj, NULL, NULL,
-};
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_LEGEND_ACTIVEBACKGROUND, 
-	Blt_Offset(Legend, activeBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-activeborderwidth", "activeBorderWidth",
-	"BorderWidth", DEF_LEGEND_BORDERWIDTH, 
-	Blt_Offset(Legend, entryBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"ActiveForeground", DEF_LEGEND_ACTIVEFOREGROUND,
-	Blt_Offset(Legend, activeFgColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
-	DEF_LEGEND_ACTIVERELIEF, Blt_Offset(Legend, activeRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_LEGEND_ANCHOR, 
-	Blt_Offset(Legend, anchor), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_LEGEND_BACKGROUND, Blt_Offset(Legend, normalBg),BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_LEGEND_BORDERWIDTH, Blt_Offset(Legend, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_INT_NNEG, "-columns", "columns", "columns",
-	DEF_LEGEND_COLUMNS, Blt_Offset(Legend, reqColumns),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-exportselection", "exportSelection",
-	"ExportSelection", DEF_LEGEND_EXPORTSELECTION, 
-	Blt_Offset(Legend, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)SELECT_EXPORT},
-    {BLT_CONFIG_DASHES, "-focusdashes", "focusDashes", "FocusDashes",
-	DEF_LEGEND_FOCUSDASHES, Blt_Offset(Legend, focusDashes), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-focusforeground", "focusForeground", "FocusForeground",
-	DEF_LEGEND_FOCUSFOREGROUND, Blt_Offset(Legend, focusColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-focusforeground", "focusForeground", "FocusForeground",
-	DEF_LEGEND_FOCUS_FG_MONO, Blt_Offset(Legend, focusColor),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_LEGEND_FONT, 
-	Blt_Offset(Legend, style.font), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_LEGEND_FOREGROUND, Blt_Offset(Legend, fgColor), 0},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_LEGEND_HIDE, 
-	Blt_Offset(Legend, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_PAD, "-ipadx", "iPadX", "Pad", DEF_LEGEND_IPADX, 
-	Blt_Offset(Legend, ixPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-ipady", "iPadY", "Pad", DEF_LEGEND_IPADY, 
-	Blt_Offset(Legend, iyPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-nofocusselectbackground", 
-	"noFocusSelectBackground", "NoFocusSelectBackground", 
-	DEF_LEGEND_SELECTBACKGROUND, Blt_Offset(Legend, selOutFocusBg), 0},
-    {BLT_CONFIG_COLOR, "-nofocusselectforeground", "noFocusSelectForeground", 
-	"NoFocusSelectForeground", DEF_LEGEND_SELECTFOREGROUND, 
-	Blt_Offset(Legend, selOutFocusFgColor), 0},
-    {BLT_CONFIG_PAD, "-padx", "padX", "Pad", DEF_LEGEND_PADX, 
-	Blt_Offset(Legend, xPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", "padY", "Pad", DEF_LEGEND_PADY, 
-	Blt_Offset(Legend, yPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-position", "position", "Position", 
-	DEF_LEGEND_POSITION, 0, BLT_CONFIG_DONT_SET_DEFAULT, 
-        &legendPositionOption},
-    {BLT_CONFIG_BITMASK, "-raised", "raised", "Raised", DEF_LEGEND_RAISED, 
-	Blt_Offset(Legend, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-	(Blt_CustomOption *)RAISED},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_LEGEND_RELIEF, 
-	Blt_Offset(Legend, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT_NNEG, "-rows", "rows", "rows", DEF_LEGEND_ROWS, 
-	Blt_Offset(Legend, reqRows),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Background", DEF_LEGEND_SELECTBACKGROUND, 
-	Blt_Offset(Legend, selInFocusBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", 
-        "BorderWidth", DEF_LEGEND_SELECTBORDERWIDTH, 
-	Blt_Offset(Legend, selBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-selectcommand", "selectCommand", "SelectCommand",
-	(char *)NULL, Blt_Offset(Legend, selectCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-	DEF_LEGEND_SELECT_FG_MONO, Blt_Offset(Legend, selInFocusFgColor),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-	DEF_LEGEND_SELECTFOREGROUND, Blt_Offset(Legend, selInFocusFgColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_CUSTOM, "-selectmode", "selectMode", "SelectMode",
-	DEF_LEGEND_SELECTMODE, Blt_Offset(Legend, selectMode),
-	BLT_CONFIG_DONT_SET_DEFAULT, &selectmodeOption},
-    {BLT_CONFIG_RELIEF, "-selectrelief", "selectRelief", "Relief",
-	DEF_LEGEND_SELECTRELIEF, Blt_Offset(Legend, selRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_LEGEND_TAKEFOCUS, Blt_Offset(Legend, takeFocus), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-title", "title", "Title", DEF_LEGEND_TITLE, 
-	Blt_Offset(Legend, title), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-titlecolor", "titleColor", "Foreground",
-	DEF_LEGEND_TITLECOLOR, Blt_Offset(Legend, titleStyle.color), 0},
-    {BLT_CONFIG_FONT, "-titlefont", "titleFont", "Font",
-	DEF_LEGEND_TITLEFONT, Blt_Offset(Legend, titleStyle.font), 0},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Tcl_IdleProc DisplayLegend;
-static Blt_BindPickProc PickEntryProc;
-static Tk_EventProc LegendEventProc;
-static Tcl_TimerProc BlinkCursorProc;
-static Tk_LostSelProc LostSelectionProc;
-static Tk_SelectionProc SelectionProc;
-
-BLT_EXTERN Tcl_ObjCmdProc Blt_GraphInstCmdProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Legend_EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the graph display routine at the next
- *	idle point.  This request is made only if the window is displayed and
- *	no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Legend_EventuallyRedraw(Graph *graphPtr) 
-{
-    Legend *legendPtr = graphPtr->legend;
-
-    if ((legendPtr->tkwin != NULL) && !(legendPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayLegend, legendPtr);
-	legendPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectCmdProc --
- *
- *      Invoked at the next idle point whenever the current selection changes.
- *      Executes some application-specific code in the -selectcommand option.
- *      This provides a way for applications to handle selection changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SelectCmdProc(ClientData clientData) 
-{
-    Legend *legendPtr = clientData;
-
-    Tcl_Preserve(legendPtr);
-    legendPtr->flags &= ~SELECT_PENDING;
-    if (legendPtr->selectCmd != NULL) {
-	Tcl_Interp *interp;
-
-	interp = legendPtr->graphPtr->interp;
-	if (Tcl_GlobalEval(interp, legendPtr->selectCmd) != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    Tcl_Release(legendPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyInvokeSelectCmd --
- *
- *      Queues a request to execute the -selectcommand code associated with
- *      the widget at the next idle point.  Invoked whenever the selection
- *      changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyInvokeSelectCmd(Legend *legendPtr)
-{
-    if ((legendPtr->flags & SELECT_PENDING) == 0) {
-	legendPtr->flags |= SELECT_PENDING;
-	Tcl_DoWhenIdle(SelectCmdProc, legendPtr);
-    }
-}
-
-static void
-ClearSelection(Legend *legendPtr)
-{
-    Blt_DeleteHashTable(&legendPtr->selectTable);
-    Blt_InitHashTable(&legendPtr->selectTable, BLT_ONE_WORD_KEYS);
-    Blt_Chain_Reset(legendPtr->selected);
-    Blt_Legend_EventuallyRedraw(legendPtr->graphPtr);
-    if (legendPtr->selectCmd != NULL) {
-	EventuallyInvokeSelectCmd(legendPtr);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LostSelectionProc --
- *
- *	This procedure is called back by Tk when the selection is grabbed away
- *	from a Text widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The existing selection is unhighlighted, and the window is marked as
- *	not containing a selection.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LostSelectionProc(ClientData clientData)
-{
-    Legend *legendPtr = clientData;
-
-    if (legendPtr->flags & SELECT_EXPORT) {
-	ClearSelection(legendPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LegendEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for various events on
- *	graphs.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, the graph is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LegendEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Graph *graphPtr = clientData;
-    Legend *legendPtr;
-
-    legendPtr = graphPtr->legend;
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    Blt_Legend_EventuallyRedraw(graphPtr);
-	}
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    legendPtr->flags |= FOCUS;
-	} else {
-	    legendPtr->flags &= ~FOCUS;
-	}
-	Tcl_DeleteTimerHandler(legendPtr->timerToken);
-	if ((legendPtr->active) && (legendPtr->flags & FOCUS)) {
-	    legendPtr->cursorOn = TRUE;
-	    if (legendPtr->offTime != 0) {
-		legendPtr->timerToken = Tcl_CreateTimerHandler(
-			legendPtr->onTime, BlinkCursorProc, graphPtr);
-	    }
-	} else {
-	    legendPtr->cursorOn = FALSE;
-	    legendPtr->timerToken = (Tcl_TimerToken)NULL;
-	}
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	Graph *graphPtr = legendPtr->graphPtr;
-
-	if (legendPtr->site == LEGEND_WINDOW) {
-	    Blt_DeleteWindowInstanceData(legendPtr->tkwin);
-	    if (legendPtr->cmdToken != NULL) {
-		Tcl_DeleteCommandFromToken(graphPtr->interp, 
-					   legendPtr->cmdToken);
-		legendPtr->cmdToken = NULL;
-	    }
-	    legendPtr->tkwin = graphPtr->tkwin;
-	}
-	if (legendPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayLegend, legendPtr);
-	    legendPtr->flags &= ~REDRAW_PENDING;
-	}
-	legendPtr->site = LEGEND_RIGHT;
-	legendPtr->flags |= HIDE;
-	graphPtr->flags |= (MAP_WORLD | REDRAW_WORLD);
-	Blt_MoveBindingTable(legendPtr->bindTable, graphPtr->tkwin);
-	Blt_EventuallyRedrawGraph(graphPtr);
-    } else if (eventPtr->type == ConfigureNotify) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-}
-
-static int
-CreateLegendWindow(Tcl_Interp *interp, Legend *legendPtr, const char *pathName)
-{
-    Graph *graphPtr;
-    Tk_Window tkwin;
-
-    graphPtr = legendPtr->graphPtr;
-    tkwin = Tk_CreateWindowFromPath(interp, graphPtr->tkwin, pathName, NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    Blt_SetWindowInstanceData(tkwin, legendPtr);
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	  LegendEventProc, graphPtr);
-    /* Move the legend's binding table to the new window. */
-    Blt_MoveBindingTable(legendPtr->bindTable, tkwin);
-    if (legendPtr->tkwin != graphPtr->tkwin) {
-	Tk_DestroyWindow(legendPtr->tkwin);
-    }
-    /* Create a command by the same name as the legend window so that Legend
-     * bindings can use %W interchangably.  */
-    legendPtr->cmdToken = Tcl_CreateObjCommand(interp, pathName, 
-	Blt_GraphInstCmdProc, graphPtr, NULL);
-    legendPtr->tkwin = tkwin;
-    legendPtr->site = LEGEND_WINDOW;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPosition --
- *
- *	Convert the string representation of a legend XY position into window
- *	coordinates.  The form of the string must be "@x,y" or none.
- *
- * Results:
- *	The return value is a standard TCL result.  The symbol type is written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPosition(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* New legend position string */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Graph *graphPtr;
-    Legend *legendPtr = (Legend *)widgRec;
-    char c;
-    int length;
-    const char *string;
-
-    graphPtr = legendPtr->graphPtr;
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if (c == '\0') {
-	legendPtr->site = LEGEND_RIGHT;
-    } else if ((c == 'l') && (strncmp(string, "leftmargin", length) == 0)) {
-	legendPtr->site = LEGEND_LEFT;
-    } else if ((c == 'r') && (strncmp(string, "rightmargin", length) == 0)) {
-	legendPtr->site = LEGEND_RIGHT;
-    } else if ((c == 't') && (strncmp(string, "topmargin", length) == 0)) {
-	legendPtr->site = LEGEND_TOP;
-    } else if ((c == 'b') && (strncmp(string, "bottommargin", length) == 0)) {
-	legendPtr->site = LEGEND_BOTTOM;
-    } else if ((c == 'p') && (strncmp(string, "plotarea", length) == 0)) {
-	legendPtr->site = LEGEND_PLOT;
-    } else if (c == '@') {
-	char *comma;
-	long x, y;
-	int result;
-	
-	comma = strchr(string + 1, ',');
-	if (comma == NULL) {
-	    Tcl_AppendResult(interp, "bad screen position \"", string,
-			     "\": should be @x,y", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	x = y = 0;
-	*comma = '\0';
-	result = ((Tcl_ExprLong(interp, string + 1, &x) == TCL_OK) &&
-		  (Tcl_ExprLong(interp, comma + 1, &y) == TCL_OK));
-	*comma = ',';
-	if (!result) {
-	    return TCL_ERROR;
-	}
-	legendPtr->xReq = x;
-	legendPtr->yReq = y;
-	legendPtr->site = LEGEND_XY;
-    } else if (c == '.') {
-	if (CreateLegendWindow(interp, legendPtr, string) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    } else {
-	Tcl_AppendResult(interp, "bad position \"", string, "\": should be  \
-\"leftmargin\", \"rightmargin\", \"topmargin\", \"bottommargin\", \
-\"plotarea\", windowName or @x,y", (char *)NULL);
-	return TCL_ERROR;
-    }
-    graphPtr->flags |= RESET_WORLD;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PositionToObj --
- *
- *	Convert the window coordinates into a string.
- *
- * Results:
- *	The string representing the coordinate position is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PositionToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    Legend *legendPtr = (Legend *)widgRec;
-    Tcl_Obj *objPtr;
-
-    switch (legendPtr->site) {
-    case LEGEND_LEFT:
-	objPtr = Tcl_NewStringObj("leftmargin", -1);
-	break;
-
-    case LEGEND_RIGHT:
-	objPtr = Tcl_NewStringObj("rightmargin", -1);
-	break;
-
-    case LEGEND_TOP:
-	objPtr = Tcl_NewStringObj("topmargin", -1);
-	break;
-
-    case LEGEND_BOTTOM:
-	objPtr = Tcl_NewStringObj("bottommargin", -1);
-	break;
-
-    case LEGEND_PLOT:
-	objPtr = Tcl_NewStringObj("plotarea", -1);
-	break;
-
-    case LEGEND_WINDOW:
-	objPtr = Tcl_NewStringObj(Tk_PathName(legendPtr->tkwin), -1);
-	break;
-
-    case LEGEND_XY:
-	{
-	    char string[200];
-
-	    sprintf_s(string, 200, "@%d,%d", legendPtr->xReq, legendPtr->yReq);
-	    objPtr = Tcl_NewStringObj(string, -1);
-	}
-    default:
-	objPtr = Tcl_NewStringObj("unknown legend position", -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSelectmode --
- *
- *	Convert the string reprsenting a select mode, to its numeric form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSelectmode(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    char *string;
-    char c;
-    int *modePtr = (int *)(widgRec + offset);
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 's') && (strcmp(string, "single") == 0)) {
-	*modePtr = SELECT_MODE_SINGLE;
-    } else if ((c == 'm') && (strcmp(string, "multiple") == 0)) {
-	*modePtr = SELECT_MODE_MULTIPLE;
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	*modePtr = SELECT_MODE_SINGLE;
-    } else {
-	Tcl_AppendResult(interp, "bad select mode \"", string,
-	    "\": should be \"single\" or \"multiple\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectmodeToObj --
- *
- * Results:
- *	The string representation of the select mode is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SelectmodeToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int mode = *(int *)(widgRec + offset);
-
-    switch (mode) {
-    case SELECT_MODE_SINGLE:
-	return Tcl_NewStringObj("single", -1);
-    case SELECT_MODE_MULTIPLE:
-	return Tcl_NewStringObj("multiple", -1);
-    default:
-	return Tcl_NewStringObj("unknown scroll mode", -1);
-    }
-}
-
-
-static void
-SetLegendOrigin(Legend *legendPtr)
-{
-    Graph *graphPtr;
-    int x, y, w, h;
-
-    graphPtr = legendPtr->graphPtr;
-    x = y = w = h = 0;			/* Suppress compiler warning. */
-    switch (legendPtr->site) {
-    case LEGEND_RIGHT:
-	w = graphPtr->rightMargin.width - graphPtr->rightMargin.axesOffset;
-	h = graphPtr->bottom - graphPtr->top;
-	x = graphPtr->right + graphPtr->rightMargin.axesOffset;
-	y = graphPtr->top;
-	break;
-
-    case LEGEND_LEFT:
-	w = graphPtr->leftMargin.width - graphPtr->leftMargin.axesOffset;
-	h = graphPtr->bottom - graphPtr->top;
-	x = graphPtr->inset;
-	y = graphPtr->top;
-	break;
-
-    case LEGEND_TOP:
-	w = graphPtr->right - graphPtr->left;
-	h = graphPtr->topMargin.height - graphPtr->topMargin.axesOffset;
-	if (graphPtr->title != NULL) {
-	    h -= graphPtr->titleHeight;
-	}
-	x = graphPtr->left;
-	y = graphPtr->inset;
-	if (graphPtr->title != NULL) {
-	    y += graphPtr->titleHeight;
-	}
-	break;
-
-    case LEGEND_BOTTOM:
-	w = graphPtr->right - graphPtr->left;
-	h = graphPtr->bottomMargin.height - graphPtr->bottomMargin.axesOffset;
-	x = graphPtr->left;
-	y = graphPtr->bottom + graphPtr->bottomMargin.axesOffset;
-	break;
-
-    case LEGEND_PLOT:
-	w = graphPtr->right - graphPtr->left;
-	h = graphPtr->bottom - graphPtr->top;
-	x = graphPtr->left;
-	y = graphPtr->top;
-	break;
-
-    case LEGEND_XY:
-	w = legendPtr->width;
-	h = legendPtr->height;
-	x = legendPtr->xReq;
-	y = legendPtr->yReq;
-	if (x < 0) {
-	    x += graphPtr->width;
-	}
-	if (y < 0) {
-	    y += graphPtr->height;
-	}
-	break;
-
-    case LEGEND_WINDOW:
-	legendPtr->anchor = TK_ANCHOR_NW;
-	legendPtr->x = legendPtr->y = 0;
-	return;
-    }
-
-    switch (legendPtr->anchor) {
-    case TK_ANCHOR_NW:			/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:			/* Left center */
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height) / 2;
-	}
-	break;
-    case TK_ANCHOR_SW:			/* Lower left corner */
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height);
-	}
-	break;
-    case TK_ANCHOR_N:			/* Top center */
-	if (w > legendPtr->width) {
-	    x += (w - legendPtr->width) / 2;
-	}
-	break;
-    case TK_ANCHOR_CENTER:		/* Center */
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height) / 2;
-	}
-	if (w > legendPtr->width) {
-	    x += (w - legendPtr->width) / 2;
-	}
-	break;
-    case TK_ANCHOR_S:			/* Bottom center */
-	if (w > legendPtr->width) {
-	    x += (w - legendPtr->width) / 2;
-	}
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height);
-	}
-	break;
-    case TK_ANCHOR_NE:			/* Upper right corner */
-	if (w > legendPtr->width) {
-	    x += w - legendPtr->width;
-	}
-	break;
-    case TK_ANCHOR_E:			/* Right center */
-	if (w > legendPtr->width) {
-	    x += w - legendPtr->width;
-	}
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height) / 2;
-	}
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	if (w > legendPtr->width) {
-	    x += w - legendPtr->width;
-	}
-	if (h > legendPtr->height) {
-	    y += (h - legendPtr->height);
-	}
-	break;
-    }
-    legendPtr->x = x + legendPtr->padLeft;
-    legendPtr->y = y + legendPtr->padTop;
-}
-
-static int
-EntryIsSelected(Legend *legendPtr, Element *elemPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&legendPtr->selectTable, (char *)elemPtr);
-    return (hPtr != NULL);
-}
-
-static void
-SelectElement(Legend *legendPtr, Element *elemPtr)
-{
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_CreateHashEntry(&legendPtr->selectTable, (char *)elemPtr,&isNew);
-    if (isNew) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_Append(legendPtr->selected, elemPtr);
-	Blt_SetHashValue(hPtr, link);
-    }
-}
-
-static void
-DeselectElement(Legend *legendPtr, Element *elemPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&legendPtr->selectTable, (char *)elemPtr);
-    if (hPtr != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_GetHashValue(hPtr);
-	Blt_Chain_DeleteLink(legendPtr->selected, link);
-	Blt_DeleteHashEntry(&legendPtr->selectTable, hPtr);
-    }
-}
-
-static void
-SelectEntry(Legend *legendPtr, Element *elemPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    switch (legendPtr->flags & SELECT_MASK) {
-    case SELECT_CLEAR:
-	DeselectElement(legendPtr, elemPtr);
-	break;
-
-    case SELECT_SET:
-	SelectElement(legendPtr, elemPtr);
-	break;
-
-    case SELECT_TOGGLE:
-	hPtr = Blt_FindHashEntry(&legendPtr->selectTable, (char *)elemPtr);
-	if (hPtr != NULL) {
-	    DeselectElement(legendPtr, elemPtr);
-	} else {
-	    SelectElement(legendPtr, elemPtr);
-	}
-	break;
-    }
-}
-
-#ifdef notdef
-static Element *
-PointerToElement(Legend *legendPtr, int x, int y)
-{
-    Graph *graphPtr = legendPtr->graphPtr;
-    int w, h;
-    int n;
-
-    w = legendPtr->width;
-    h = legendPtr->height;
-
-    x -= legendPtr->x + legendPtr->borderWidth;
-    y -= legendPtr->y + legendPtr->borderWidth;
-    w -= 2 * legendPtr->borderWidth + PADDING(legendPtr->xPad);
-    h -= 2 * legendPtr->borderWidth + PADDING(legendPtr->yPad);
-
-    if ((x < 0) || (x >= w) || (y < 0) || (y >= h)) {
-	return NULL;
-    }
-
-    /* It's in the bounding box, so compute the index. */
-    {
-	int row, column;
-
-	row    = y / legendPtr->entryHeight;
-	column = x / legendPtr->entryWidth;
-	n = (column * legendPtr->nRows) + row;
-    }
-    if (n < legendPtr->nEntries) {
-	Blt_ChainLink link;
-	int count;
-
-	count = 0;
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (elemPtr->label == NULL) {
-
-		continue;
-	    }
-	    if (count > n) {
-		return NULL;
-	    } else if (count == n) {
-		return elemPtr;
-	    }
-	    count++;
-	}	      
-    }
-    return NULL;
-}
-#endif
-
-/*ARGSUSED*/
-static ClientData
-PickEntryProc(ClientData clientData, int x, int y, ClientData *contextPtr)
-{
-    Graph *graphPtr = clientData;
-    Legend *legendPtr;
-    int w, h;
-
-    legendPtr = graphPtr->legend;
-    w = legendPtr->width;
-    h = legendPtr->height;
-
-    if (legendPtr->titleHeight > 0) {
-	y -= legendPtr->titleHeight + legendPtr->yPad.side1;
-    }
-    x -= legendPtr->x + legendPtr->borderWidth;
-    y -= legendPtr->y + legendPtr->borderWidth;
-    w -= 2 * legendPtr->borderWidth + PADDING(legendPtr->xPad);
-    h -= 2 * legendPtr->borderWidth + PADDING(legendPtr->yPad);
-
-    if ((x >= 0) && (x < w) && (y >= 0) && (y < h)) {
-	int row, column;
-	int n;
-
-	/*
-	 * It's in the bounding box, so compute the index.
-	 */
-	row    = y / legendPtr->entryHeight;
-	column = x / legendPtr->entryWidth;
-	n = (column * legendPtr->nRows) + row;
-	if (n < legendPtr->nEntries) {
-	    Blt_ChainLink link;
-	    int count;
-
-	    /* Legend entries are stored in bottom-to-top. */
-	    count = 0;
-	    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-		 link != NULL; link = Blt_Chain_NextLink(link)) {
-		Element *elemPtr;
-
-		elemPtr = Blt_Chain_GetValue(link);
-		if (elemPtr->label != NULL) {
-		    if (count == n) {
-			return elemPtr;
-		    }
-		    count++;
-		}
-	    }	      
-	    if (link != NULL) {
-		return Blt_Chain_GetValue(link);
-	    }	
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapLegend --
- *
- * 	Calculates the dimensions (width and height) needed for the legend.
- * 	Also determines the number of rows and columns necessary to list all
- * 	the valid element labels.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *   	The following fields of the legend are calculated and set.
- *
- * 	nEntries   - number of valid labels of elements in the
- *		      display list.
- * 	nRows	    - number of rows of entries
- * 	nColumns    - number of columns of entries
- * 	entryHeight - height of each entry
- * 	entryWidth  - width of each entry
- * 	height	    - width of legend (includes borders and padding)
- * 	width	    - height of legend (includes borders and padding)
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MapLegend(
-    Graph *graphPtr,
-    int plotWidth,			/* Maximum width available in window
-					 * to draw the legend. Will calculate
-					 * # of columns from this. */
-    int plotHeight)			/* Maximum height available in window
-					 * to draw the legend. Will calculate
-					 * # of rows from this. */
-{
-    Legend *legendPtr = graphPtr->legend;
-    Blt_ChainLink link;
-    int nRows, nColumns, nEntries;
-    int lw, lh;
-    int maxWidth, maxHeight;
-    int symbolWidth;
-    Blt_FontMetrics fontMetrics;
-
-    /* Initialize legend values to default (no legend displayed) */
-    legendPtr->entryWidth = legendPtr->entryHeight = 0;
-    legendPtr->nRows = legendPtr->nColumns = legendPtr->nEntries = 0;
-    legendPtr->height = legendPtr->width = 0;
-
-    if (legendPtr->site == LEGEND_WINDOW) {
-	if (Tk_Width(legendPtr->tkwin) > 1) {
-	    plotWidth = Tk_Width(legendPtr->tkwin);
-	}
-	if (Tk_Height(legendPtr->tkwin) > 1) {
-	    plotHeight = Tk_Height(legendPtr->tkwin);
-	}
-    }
-    Blt_Ts_GetExtents(&legendPtr->titleStyle, legendPtr->title, 
-		      &legendPtr->titleWidth, &legendPtr->titleHeight);
-    /*   
-     * Count the number of legend entries and determine the widest and tallest
-     * label.  The number of entries would normally be the number of elements,
-     * but elements can have no legend entry (-label "").
-     */
-    nEntries = 0;
-    maxWidth = maxHeight = 0;
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	unsigned int w, h;
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;			/* Element has no legend entry. */
-	}
-	Blt_Ts_GetExtents(&legendPtr->style, elemPtr->label, &w, &h);
-	if (maxWidth < w) {
-	    maxWidth = w;
-	}
-	if (maxHeight < h) {
-	    maxHeight = h;
-	}
-	nEntries++;
-    }
-    if (nEntries == 0) {
-	return;				/* No visible legend entries. */
-    }
-
-
-    Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics);
-    symbolWidth = 2 * fontMetrics.ascent;
-
-    maxWidth += 2 * legendPtr->entryBW + PADDING(legendPtr->ixPad) +
-	+ symbolWidth + 3 * LABEL_PAD;
-
-    maxHeight += 2 * legendPtr->entryBW + PADDING(legendPtr->iyPad);
-
-    maxWidth |= 0x01;
-    maxHeight |= 0x01;
-
-    lw = plotWidth - 2 * legendPtr->borderWidth - PADDING(legendPtr->xPad);
-    lh = plotHeight - 2 * legendPtr->borderWidth - PADDING(legendPtr->yPad);
-
-    /*
-     * The number of rows and columns is computed as one of the following:
-     *
-     *	both options set		User defined. 
-     *  -rows				Compute columns from rows.
-     *  -columns			Compute rows from columns.
-     *	neither set			Compute rows and columns from
-     *					size of plot.  
-     */
-    if (legendPtr->reqRows > 0) {
-	nRows = MIN(legendPtr->reqRows, nEntries); 
-	if (legendPtr->reqColumns > 0) {
-	    nColumns = MIN(legendPtr->reqColumns, nEntries);
-	} else {
-	    nColumns = ((nEntries - 1) / nRows) + 1; /* Only -rows. */
-	}
-    } else if (legendPtr->reqColumns > 0) { /* Only -columns. */
-	nColumns = MIN(legendPtr->reqColumns, nEntries);
-	nRows = ((nEntries - 1) / nColumns) + 1;
-    } else {			
-	/* Compute # of rows and columns from the legend size. */
-	nRows = lh / maxHeight;
-	nColumns = lw / maxWidth;
-	if (nRows < 1) {
-	    nRows = nEntries;
-	}
-	if (nColumns < 1) {
-	    nColumns = nEntries;
-	}
-	if (nRows > nEntries) {
-	    nRows = nEntries;
-	} 
-	switch (legendPtr->site) {
-	case LEGEND_TOP:
-	case LEGEND_BOTTOM:
-	    nRows = ((nEntries - 1) / nColumns) + 1;
-	    break;
-	case LEGEND_LEFT:
-	case LEGEND_RIGHT:
-	default:
-	    nColumns = ((nEntries - 1) / nRows) + 1;
-	    break;
-	}
-    }
-    if (nColumns < 1) {
-	nColumns = 1;
-    } 
-    if (nRows < 1) {
-	nRows = 1;
-    }
-
-    lh = (nRows * maxHeight);
-    if (legendPtr->titleHeight > 0) {
-	lh += legendPtr->titleHeight + legendPtr->yPad.side1;
-    }
-    lw = nColumns * maxWidth;
-    if (lw < legendPtr->titleWidth) {
-	lw = legendPtr->titleWidth;
-    }
-    legendPtr->width = lw + 2 * legendPtr->borderWidth + 
-	PADDING(legendPtr->xPad);
-    legendPtr->height = lh + 2 * legendPtr->borderWidth + 
-	PADDING(legendPtr->yPad);
-    legendPtr->nRows = nRows;
-    legendPtr->nColumns = nColumns;
-    legendPtr->nEntries = nEntries;
-    legendPtr->entryHeight = maxHeight;
-    legendPtr->entryWidth = maxWidth;
-
-    {
-	int row, col, count;
-
-	row = col = count = 0;
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    count++;
-	    elemPtr->row = row;
-	    elemPtr->col = col;
-	    row++;
-	    if ((count % nRows) == 0) {
-		col++;
-		row = 0;
-	    }
-	}
-    }
-    if ((legendPtr->site == LEGEND_WINDOW) &&
-	((Tk_ReqWidth(legendPtr->tkwin) != legendPtr->width) ||
-	 (Tk_ReqHeight(legendPtr->tkwin) != legendPtr->height))) {
-	Tk_GeometryRequest(legendPtr->tkwin,legendPtr->width,legendPtr->height);
-    }
-}
-
-void
-Blt_DrawLegend(Graph *graphPtr, Drawable drawable)
-{
-    Blt_Background bg;
-    Blt_ChainLink link;
-    Blt_FontMetrics fontMetrics;
-    Legend *legendPtr = graphPtr->legend;
-    Pixmap pixmap;
-    Tk_Window tkwin;
-    int count;
-    int symbolSize, xMid, yMid;
-    int x, y, w, h;
-    int xLabel, yStart, xSymbol, ySymbol;
-
-    if ((legendPtr->flags & HIDE) || (legendPtr->nEntries == 0)) {
-	return;
-    }
-
-    SetLegendOrigin(legendPtr);
-    graphPtr = legendPtr->graphPtr;
-    tkwin = legendPtr->tkwin;
-    if (legendPtr->site == LEGEND_WINDOW) {
-	w = Tk_Width(tkwin);
-	h = Tk_Height(tkwin);
-    } else {
-	w = legendPtr->width;
-	h = legendPtr->height;
-    }
-
-    pixmap = Tk_GetPixmap(graphPtr->display, Tk_WindowId(tkwin), w, h, 
-	Tk_Depth(tkwin));
-
-    if (legendPtr->normalBg != NULL) {
-	Blt_FillBackgroundRectangle(tkwin, pixmap, legendPtr->normalBg, 0, 0, 
-		w, h, 0, TK_RELIEF_FLAT);
-    } else if (legendPtr->site & LEGEND_PLOTAREA_MASK) {
-	/* 
-	 * Legend background is transparent and is positioned over the the
-	 * plot area.  Either copy the part of the background from the backing
-	 * store pixmap or (if no backing store exists) just fill it with the
-	 * background color of the plot.
-	 */
-	if (graphPtr->cache != None) {
-	    XCopyArea(graphPtr->display, graphPtr->cache, pixmap, 
-		graphPtr->drawGC, legendPtr->x, legendPtr->y, w, h, 0, 0);
-        } else {
-	    Blt_FillBackgroundRectangle(tkwin, pixmap, graphPtr->plotBg, 0, 0, 
-		w, h, TK_RELIEF_FLAT, 0);
- 	}
-    } else {
-	int xOrigin, yOrigin;
-	/* 
-	 * The legend is located in one of the margins or the external window.
-	 */
-	Blt_GetBackgroundOrigin(graphPtr->normalBg, &xOrigin, &yOrigin);
-	Blt_SetBackgroundOrigin(graphPtr->tkwin, graphPtr->normalBg, 
-		xOrigin - legendPtr->x,yOrigin - legendPtr->y);
-	Blt_FillBackgroundRectangle(tkwin, pixmap, graphPtr->normalBg, 0, 0, 
-		w, h, 0, TK_RELIEF_FLAT);
-	Blt_SetBackgroundOrigin(tkwin, graphPtr->normalBg, xOrigin, yOrigin);
-    }
-    Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics);
-
-    symbolSize = fontMetrics.ascent;
-    xMid = symbolSize + 1 + legendPtr->entryBW;
-    yMid = (symbolSize / 2) + 1 + legendPtr->entryBW;
-    xLabel = 2 * symbolSize + legendPtr->entryBW + 
-	legendPtr->ixPad.side1 + 2 * LABEL_PAD;
-    ySymbol = yMid + legendPtr->iyPad.side1; 
-    xSymbol = xMid + LABEL_PAD;
-
-    x = legendPtr->padLeft + legendPtr->borderWidth;
-    y = legendPtr->padTop + legendPtr->borderWidth;
-    Blt_DrawText(tkwin, pixmap, legendPtr->title, &legendPtr->titleStyle, x, y);
-    if (legendPtr->titleHeight > 0) {
-	y += legendPtr->titleHeight + legendPtr->yPad.side1;
-    }
-    count = 0;
-    yStart = y;
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-	int isSelected;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;			/* Skip this entry */
-	}
-	isSelected = EntryIsSelected(legendPtr, elemPtr);
-	if (elemPtr->flags & LABEL_ACTIVE) {
-	    int xOrigin, yOrigin;
-
-	    fprintf(stderr, "element:%s is active\n", elemPtr->obj.name);
-	    Blt_GetBackgroundOrigin(legendPtr->activeBg, &xOrigin, &yOrigin);
-	    Blt_SetBackgroundOrigin(tkwin, legendPtr->activeBg, 
-		xOrigin - legendPtr->x, yOrigin - legendPtr->y);
-	    Blt_Ts_SetForeground(legendPtr->style, legendPtr->activeFgColor);
-	    Blt_FillBackgroundRectangle(tkwin, pixmap, legendPtr->activeBg, 
-		x, y, legendPtr->entryWidth, legendPtr->entryHeight, 
-		legendPtr->entryBW, legendPtr->activeRelief);
-	    Blt_SetBackgroundOrigin(tkwin, legendPtr->activeBg, 
-		xOrigin, yOrigin);
-	} else if (isSelected) {
-	    int xOrigin, yOrigin;
-	    Blt_Background bg;
-	    XColor *fg;
-
-	    fg = (legendPtr->flags & FOCUS) ?
-		legendPtr->selInFocusFgColor : legendPtr->selOutFocusFgColor;
-	    bg = (legendPtr->flags & FOCUS) ?
-		    legendPtr->selInFocusBg : legendPtr->selOutFocusBg;
-	    Blt_GetBackgroundOrigin(bg, &xOrigin, &yOrigin);
-	    Blt_SetBackgroundOrigin(tkwin, bg, xOrigin - legendPtr->x, 
-		yOrigin - legendPtr->y);
-	    Blt_Ts_SetForeground(legendPtr->style, fg);
-	    Blt_FillBackgroundRectangle(tkwin, pixmap, bg, x, y, 
-		legendPtr->entryWidth, legendPtr->entryHeight, 
-		legendPtr->selBW, legendPtr->selRelief);
-	    Blt_SetBackgroundOrigin(tkwin, bg, xOrigin, yOrigin);
-	} else {
-	    Blt_Ts_SetForeground(legendPtr->style, legendPtr->fgColor);
-	    if (elemPtr->legendRelief != TK_RELIEF_FLAT) {
-		Blt_FillBackgroundRectangle(tkwin, pixmap, graphPtr->normalBg, 
-			x, y, legendPtr->entryWidth, 
-			legendPtr->entryHeight, legendPtr->entryBW, 
-			elemPtr->legendRelief);
-	    }
-	}
-	(*elemPtr->procsPtr->drawSymbolProc) (graphPtr, pixmap, elemPtr,
-		x + xSymbol, y + ySymbol, symbolSize);
-	Blt_DrawText(tkwin, pixmap, elemPtr->label, &legendPtr->style, 
-		x + xLabel, 
-		y + legendPtr->entryBW + legendPtr->iyPad.side1);
-	count++;
-	if (legendPtr->focusPtr == elemPtr) { /* Focus outline */
-	    if (isSelected) {
-		XColor *color;
-
-		color = (legendPtr->flags & FOCUS) ?
-		    legendPtr->selInFocusFgColor :
-		    legendPtr->selOutFocusFgColor;
-		XSetForeground(graphPtr->display, legendPtr->focusGC, 
-			       color->pixel);
-	    }
-	    XDrawRectangle(graphPtr->display, pixmap, legendPtr->focusGC, 
-		x + 1, y + 1, legendPtr->entryWidth - 3, 
-		legendPtr->entryHeight - 3);
-	    if (isSelected) {
-		XSetForeground(graphPtr->display, legendPtr->focusGC, 
-			legendPtr->focusColor->pixel);
-	    }
-	}
-	/* Check when to move to the next column */
-	if ((count % legendPtr->nRows) > 0) {
-	    y += legendPtr->entryHeight;
-	} else {
-	    x += legendPtr->entryWidth;
-	    y = yStart;
-	}
-    }
-    /*
-     * Draw the border and/or background of the legend.
-     */
-    bg = legendPtr->normalBg;
-    if (bg == NULL) {
-	bg = graphPtr->normalBg;
-    }
-    /* Disable crosshairs before redisplaying to the screen */
-    if (legendPtr->site & LEGEND_PLOTAREA_MASK) {
-	Blt_DisableCrosshairs(graphPtr);
-    }
-    Blt_DrawBackgroundRectangle(tkwin, pixmap, bg, 0, 0, w, h, 
-	legendPtr->borderWidth, legendPtr->relief);
-    XCopyArea(graphPtr->display, pixmap, drawable, graphPtr->drawGC, 0, 0, w, h,
-	legendPtr->x, legendPtr->y);
-    if (legendPtr->site & LEGEND_PLOTAREA_MASK) {
-	Blt_EnableCrosshairs(graphPtr);
-    }
-    Tk_FreePixmap(graphPtr->display, pixmap);
-    graphPtr->flags &= ~DRAW_LEGEND;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LegendToPostScript --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_LegendToPostScript(Graph *graphPtr, Blt_Ps ps)
-{
-    Legend *legendPtr = graphPtr->legend;
-    double x, y, yStart;
-    int xLabel, xSymbol, ySymbol;
-    int count;
-    Blt_ChainLink link;
-    int symbolSize, xMid, yMid;
-    int width, height;
-    Blt_FontMetrics fontMetrics;
-
-    if ((legendPtr->flags & HIDE) || (legendPtr->nEntries == 0)) {
-	return;
-    }
-    SetLegendOrigin(legendPtr);
-
-    x = legendPtr->x, y = legendPtr->y;
-    width = legendPtr->width - PADDING(legendPtr->xPad);
-    height = legendPtr->height - PADDING(legendPtr->yPad);
-
-    Blt_Ps_Append(ps, "% Legend\n");
-    graphPtr = legendPtr->graphPtr;
-    if (graphPtr->pageSetup->flags & PS_DECORATIONS) {
-	if (legendPtr->normalBg != NULL) {
-	    Tk_3DBorder border;
-
-	    border = Blt_BackgroundBorder(legendPtr->normalBg);
-	    Blt_Ps_Fill3DRectangle(ps, border, x, y, width, height, 
-		legendPtr->borderWidth, legendPtr->relief);
-	} else {
-	    Tk_3DBorder border;
-
-	    border = Blt_BackgroundBorder(graphPtr->normalBg);
-	    Blt_Ps_Draw3DRectangle(ps, border, x, y, width, height, 
-		legendPtr->borderWidth, legendPtr->relief);
-	}
-    } else {
-	Blt_Ps_SetClearBackground(ps);
-	Blt_Ps_XFillRectangle(ps, x, y, width, height);
-    }
-    Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics);
-    symbolSize = fontMetrics.ascent;
-    xMid = symbolSize + 1 + legendPtr->entryBW;
-    yMid = (symbolSize / 2) + 1 + legendPtr->entryBW;
-    xLabel = 2 * symbolSize + legendPtr->entryBW + legendPtr->ixPad.side1 + 5;
-    xSymbol = xMid + legendPtr->ixPad.side1;
-    ySymbol = yMid + legendPtr->iyPad.side1;
-
-    x += legendPtr->borderWidth;
-    y += legendPtr->borderWidth;
-    Blt_Ps_DrawText(ps, legendPtr->title, &legendPtr->titleStyle, x, y);
-    if (legendPtr->titleHeight > 0) {
-	y += legendPtr->titleHeight + legendPtr->yPad.side1;
-    }
-
-    count = 0;
-    yStart = y;
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;			/* Skip this label */
-	}
-	if (elemPtr->flags & LABEL_ACTIVE) {
-	    Tk_3DBorder border;
-	    
-	    border = Blt_BackgroundBorder(legendPtr->activeBg);
-	    Blt_Ts_SetForeground(legendPtr->style, legendPtr->activeFgColor);
-	    Blt_Ps_Fill3DRectangle(ps, border, x, y, legendPtr->entryWidth, 
-		legendPtr->entryHeight, legendPtr->entryBW, 
-		legendPtr->activeRelief);
-	} else {
-	    Blt_Ts_SetForeground(legendPtr->style, legendPtr->fgColor);
-	    if (elemPtr->legendRelief != TK_RELIEF_FLAT) {
-		Tk_3DBorder border;
-
-		border = Blt_BackgroundBorder(graphPtr->normalBg);
-		Blt_Ps_Draw3DRectangle(ps, border, x, y, legendPtr->entryWidth,
-			legendPtr->entryHeight, legendPtr->entryBW, 
-			elemPtr->legendRelief);
-	    }
-	}
-	(*elemPtr->procsPtr->printSymbolProc) (graphPtr, ps, elemPtr, 
-		x + xSymbol, y + ySymbol, symbolSize);
-	Blt_Ps_DrawText(ps, elemPtr->label, &legendPtr->style, 
-		x + xLabel, y + legendPtr->entryBW + legendPtr->iyPad.side1);
-	count++;
-	if ((count % legendPtr->nRows) > 0) {
-	    y += legendPtr->entryHeight;
-	} else {
-	    x += legendPtr->entryWidth;
-	    y = yStart;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayLegend --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayLegend(ClientData clientData)
-{
-    Legend *legendPtr = clientData;
-    Graph *graphPtr;
-
-    legendPtr->flags &= ~REDRAW_PENDING;
-    if (legendPtr->tkwin == NULL) {
-	return;				/* Window has been destroyed. */
-    }
-    graphPtr = legendPtr->graphPtr;
-    if (legendPtr->site == LEGEND_WINDOW) {
-	int w, h;
-
-	w = Tk_Width(legendPtr->tkwin);
-	h = Tk_Height(legendPtr->tkwin);
-	if ((w != legendPtr->width) || (h != legendPtr->height)) {
-	    Blt_MapLegend(graphPtr, w, h);
-	}
-    }
-    if (Tk_IsMapped(legendPtr->tkwin)) {
-	Blt_DrawLegend(graphPtr, Tk_WindowId(legendPtr->tkwin));
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConfigureLegend --
- *
- * 	Routine to configure the legend.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ConfigureLegend(Graph *graphPtr)
-{
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Legend *legendPtr;
-
-    legendPtr = graphPtr->legend;
-    /* GC for active label. Dashed outline. */
-    gcMask = GCForeground | GCLineStyle;
-    gcValues.foreground = legendPtr->focusColor->pixel;
-    gcValues.line_style = (LineIsDashed(legendPtr->focusDashes))
-	? LineOnOffDash : LineSolid;
-    newGC = Blt_GetPrivateGC(legendPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(legendPtr->focusDashes)) {
-	legendPtr->focusDashes.offset = 2;
-	Blt_SetDashes(graphPtr->display, newGC, &legendPtr->focusDashes);
-    }
-    if (legendPtr->focusGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, legendPtr->focusGC);
-    }
-    legendPtr->focusGC = newGC;
-    
-    /*
-     *  Update the layout of the graph (and redraw the elements) if any of
-     *  the following legend options (all of which affect the size of the
-     *  legend) have changed.
-     *
-     *		-activeborderwidth, -borderwidth
-     *		-border
-     *		-font
-     *		-hide
-     *		-ipadx, -ipady, -padx, -pady
-     *		-rows
-     *
-     *  If the position of the legend changed to/from the default
-     *  position, also indicate that a new layout is needed.
-     *
-     */
-    if (legendPtr->site == LEGEND_WINDOW) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    } else if (Blt_ConfigModified(configSpecs, "-*border*", "-*pad?",
-	"-hide", "-font", "-rows", (char *)NULL)) {
-	graphPtr->flags |= RESET_WORLD;
-	graphPtr->flags |= (REDRAW_WORLD | CACHE_DIRTY);
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DestroyLegend --
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Resources associated with the legend are freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DestroyLegend(Graph *graphPtr)
-{
-    Legend *legendPtr = graphPtr->legend;
-
-    if (graphPtr->legend == NULL) {
-	return;
-    }
-
-    Blt_FreeOptions(configSpecs, (char *)legendPtr, graphPtr->display, 0);
-    Blt_Ts_FreeStyle(graphPtr->display, &legendPtr->style);
-    Blt_Ts_FreeStyle(graphPtr->display, &legendPtr->titleStyle);
-    Blt_DestroyBindingTable(legendPtr->bindTable);
-    
-    if (legendPtr->focusGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, legendPtr->focusGC);
-    }
-    if (legendPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(legendPtr->timerToken);
-    }
-    if (legendPtr->tkwin != NULL) {
-	Tk_DeleteSelHandler(legendPtr->tkwin, XA_PRIMARY, XA_STRING);
-    }
-    if (legendPtr->site == LEGEND_WINDOW) {
-	Tk_Window tkwin;
-	
-	/* The graph may be in the process of being torn down */
-	if (legendPtr->cmdToken != NULL) {
-	    Tcl_DeleteCommandFromToken(graphPtr->interp, legendPtr->cmdToken);
-	}
-	if (legendPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayLegend, legendPtr);
-	    legendPtr->flags &= ~REDRAW_PENDING;
-	}
-	tkwin = legendPtr->tkwin;
-	legendPtr->tkwin = NULL;
-	if (tkwin != NULL) {
-	    Tk_DeleteEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-		LegendEventProc, graphPtr);
-	    Blt_DeleteWindowInstanceData(tkwin);
-	    Tk_DestroyWindow(tkwin);
-	}
-    }
-    Blt_Free(legendPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreateLegend --
- *
- * 	Creates and initializes a legend structure with default settings
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_CreateLegend(Graph *graphPtr)
-{
-    Legend *legendPtr;
-
-    legendPtr = Blt_AssertCalloc(1, sizeof(Legend));
-    graphPtr->legend = legendPtr;
-    legendPtr->graphPtr = graphPtr;
-    legendPtr->tkwin = graphPtr->tkwin;
-    legendPtr->xReq = legendPtr->yReq = -SHRT_MAX;
-    legendPtr->relief = TK_RELIEF_SUNKEN;
-    legendPtr->activeRelief = TK_RELIEF_FLAT;
-    legendPtr->entryBW = 2;
-    legendPtr->borderWidth = 2;
-    legendPtr->ixPad.side1 = legendPtr->ixPad.side2 = 1;
-    legendPtr->iyPad.side1 = legendPtr->iyPad.side2 = 1;
-    legendPtr->xPad.side1  = legendPtr->xPad.side2  = 1;
-    legendPtr->yPad.side1  = legendPtr->yPad.side2  = 1;
-    legendPtr->anchor = TK_ANCHOR_N;
-    legendPtr->site = LEGEND_RIGHT;
-    legendPtr->selectMode = SELECT_MODE_MULTIPLE;
-    Blt_Ts_InitStyle(legendPtr->style);
-    Blt_Ts_InitStyle(legendPtr->titleStyle);
-    legendPtr->style.justify = TK_JUSTIFY_LEFT;
-    legendPtr->style.anchor = TK_ANCHOR_NW;
-    legendPtr->titleStyle.justify = TK_JUSTIFY_LEFT;
-    legendPtr->titleStyle.anchor = TK_ANCHOR_NW;
-    legendPtr->bindTable = Blt_CreateBindingTable(graphPtr->interp,
-	graphPtr->tkwin, graphPtr, PickEntryProc, Blt_GraphTags);
-
-    Blt_InitHashTable(&legendPtr->selectTable, BLT_ONE_WORD_KEYS);
-    legendPtr->selected = Blt_Chain_Create();
-    Tk_CreateSelHandler(legendPtr->tkwin, XA_PRIMARY, XA_STRING, 
-	SelectionProc, legendPtr, XA_STRING);
-    legendPtr->selRelief = TK_RELIEF_FLAT;
-    legendPtr->selBW = 1;
-    legendPtr->onTime = 600;
-    legendPtr->offTime = 300;
-    if (Blt_ConfigureComponentFromObj(graphPtr->interp, graphPtr->tkwin,
-	    "legend", "Legend", configSpecs, 0, (Tcl_Obj **)NULL,
-	    (char *)legendPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_ConfigureLegend(graphPtr);
-    return TCL_OK;
-}
-
-static Element *
-GetNextRow(Graph *graphPtr, Element *focusPtr)
-{
-    Blt_ChainLink link;
-    int row, col;
-
-    col = focusPtr->col;
-    row = focusPtr->row + 1;
-    for (link = focusPtr->link; link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;
-	}
-	if ((elemPtr->col == col) && (elemPtr->row == row)) {
-	    return elemPtr;	
-	}
-    }
-    return NULL;
-}
-
-static Element *
-GetNextColumn(Graph *graphPtr, Element *focusPtr)
-{
-    Blt_ChainLink link;
-    int row, col;
-
-    col = focusPtr->col + 1;
-    row = focusPtr->row;
-    for (link = focusPtr->link; link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;
-	}
-	if ((elemPtr->col == col) && (elemPtr->row == row)) {
-	    return elemPtr;		/* Don't go beyond legend boundaries. */
-	}
-    }
-    return NULL;
-}
-
-static Element *
-GetPreviousRow(Graph *graphPtr, Element *focusPtr)
-{
-    Blt_ChainLink link;
-    int row, col;
-
-    col = focusPtr->col;
-    row = focusPtr->row - 1;
-    for (link = focusPtr->link; link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;
-	}
-	if ((elemPtr->col == col) && (elemPtr->row == row)) {
-	    return elemPtr;	
-	}
-    }
-    return NULL;
-}
-
-static Element *
-GetPreviousColumn(Graph *graphPtr, Element *focusPtr)
-{
-    Blt_ChainLink link;
-    int row, col;
-
-    col = focusPtr->col - 1;
-    row = focusPtr->row;
-    for (link = focusPtr->link; link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label == NULL) {
-	    continue;
-	}
-	if ((elemPtr->col == col) && (elemPtr->row == row)) {
-	    return elemPtr;	
-	}
-    }
-    return NULL;
-}
-
-static Element *
-GetFirstElement(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label != NULL) {
-	    return elemPtr;
-	}
-    }
-    return NULL;
-}
-
-static Element *
-GetLastElement(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->elements.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Element *elemPtr;
-
-	elemPtr = Blt_Chain_GetValue(link);
-	if (elemPtr->label != NULL) {
-	    return elemPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetElementFromObj --
- *
- *	Parse an index into an entry and return either its value or an error.
- *
- * Results:
- *	A standard TCL result.  If all went well, then *indexPtr is filled in
- *	with the character index (into entryPtr) corresponding to string.  The
- *	index value is guaranteed to lie between 0 and the number of characters
- *	in the string, inclusive.  If an error occurs then an error message is
- *	left in the interp's result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetElementFromObj(Graph *graphPtr, Tcl_Obj *objPtr, Element **elemPtrPtr)
-{
-    Element *elemPtr;
-    Legend *legendPtr;
-    Tcl_Interp *interp;
-    char c;
-    const char *string;
-    int last;
-
-    legendPtr = graphPtr->legend;
-    interp = graphPtr->interp;
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    elemPtr = NULL;
-
-    last = Blt_Chain_GetLength(graphPtr->elements.displayList) - 1;
-    if ((c == 'a') && (strcmp(string, "anchor") == 0)) {
-	elemPtr = legendPtr->selAnchorPtr;
-    } else if ((c == 'c') && (strcmp(string, "current") == 0)) {
-	elemPtr = (Element *)Blt_GetCurrentItem(legendPtr->bindTable);
-    } else if ((c == 'f') && (strcmp(string, "first") == 0)) {
-	elemPtr = GetFirstElement(graphPtr);
-    } else if ((c == 'f') && (strcmp(string, "focus") == 0)) {
-	elemPtr = legendPtr->focusPtr;
-    } else if ((c == 'l') && (strcmp(string, "last") == 0)) {
-	elemPtr = GetLastElement(graphPtr);
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	elemPtr = GetLastElement(graphPtr);
-    } else if ((c == 'n') && (strcmp(string, "next.row") == 0)) {
-	elemPtr = GetNextRow(graphPtr, legendPtr->focusPtr);
-    } else if ((c == 'n') && (strcmp(string, "next.column") == 0)) {
-	elemPtr = GetNextColumn(graphPtr, legendPtr->focusPtr);
-    } else if ((c == 'p') && (strcmp(string, "previous.row") == 0)) {
-	elemPtr = GetPreviousRow(graphPtr, legendPtr->focusPtr);
-    } else if ((c == 'p') && (strcmp(string, "previous.column") == 0)) {
-	elemPtr = GetPreviousColumn(graphPtr, legendPtr->focusPtr);
-    } else if ((c == 's') && (strcmp(string, "sel.first") == 0)) {
-	elemPtr = legendPtr->selFirstPtr;
-    } else if ((c == 's') && (strcmp(string, "sel.last") == 0)) {
-	elemPtr = legendPtr->selLastPtr;
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(interp, legendPtr->tkwin, string, &x, &y) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	elemPtr = (Element *)PickEntryProc(graphPtr, x, y, NULL);
-    } else if (isdigit((int)c)) {
-	int index;
-	Blt_ChainLink link;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &index) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	link = Blt_Chain_GetNthLink(graphPtr->elements.displayList, index);
-	if (link != NULL) {
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (elemPtr->label == NULL) {
-		elemPtr = NULL;
-	    }
-	}
-    } else {
-	if (Blt_GetElement(interp, graphPtr, objPtr, &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (elemPtr->link == NULL) {
-	    Tcl_AppendResult(interp, "bad legend index \"", string, "\"",
-				 (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (elemPtr->label == NULL) {
-	    elemPtr = NULL;
-	}
-    }
-    *elemPtrPtr = elemPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectRange --
- *
- *	Sets the selection flag for a range of nodes.  The range is determined
- *	by two pointers which designate the first/last nodes of the range.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectRange(Legend *legendPtr, Element *fromPtr, Element *toPtr)
-{
-
-    if (Blt_Chain_IsBefore(fromPtr->link, toPtr->link)) {
-	Blt_ChainLink link;
-
-	for (link = fromPtr->link; link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    SelectEntry(legendPtr, elemPtr);
-	    if (link == toPtr->link) {
-		break;
-	    }
-	}
-    } else {
-	Blt_ChainLink link;
-
-	for (link = fromPtr->link; link != NULL;
-	     link = Blt_Chain_PrevLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    SelectEntry(legendPtr, elemPtr);
-	    if (link == toPtr->link) {
-		break;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * SelectText --
- *
- *	Modify the selection by moving its un-anchored end.  This could make
- *	the selection either larger or smaller.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectText(Legend *legendPtr, Element *elemPtr)
-{
-    Element *firstPtr, *lastPtr;
-    Graph *graphPtr = legendPtr->graphPtr;
-
-    /* Grab the selection if we don't own it already. */
-    if ((legendPtr->flags&SELECT_EXPORT) && (legendPtr->selFirstPtr == NULL)) {
-	Tk_OwnSelection(legendPtr->tkwin, XA_PRIMARY, LostSelectionProc, 
-		legendPtr);
-    }
-    /* If the anchor hasn't been set, assume the beginning of the legend. */
-    if (legendPtr->selAnchorPtr == NULL) {
-	legendPtr->selAnchorPtr = GetFirstElement(graphPtr);
-    }
-    if (legendPtr->selAnchorPtr != elemPtr) {
-	firstPtr = legendPtr->selAnchorPtr;
-	lastPtr = elemPtr;
-    } else {
-	firstPtr = elemPtr;
-	lastPtr = legendPtr->selAnchorPtr;
-    }
-    if ((legendPtr->selFirstPtr != firstPtr) || 
-	(legendPtr->selLastPtr != lastPtr)) {
-	legendPtr->selFirstPtr = firstPtr;
-	legendPtr->selLastPtr = lastPtr;
-	SelectRange(legendPtr, firstPtr, lastPtr);
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    return TCL_OK;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- * 	Activates a particular label in the legend.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    unsigned int active, redraw;
-    const char *string;
-    int i;
-
-    string = Tcl_GetString(objv[2]);
-    active = (string[0] == 'a') ? LABEL_ACTIVE : 0;
-    redraw = FALSE;
-    for (i = 3; i < objc; i++) {
-	Blt_ChainLink link;
-	const char *pattern;
-
-	pattern = Tcl_GetString(objv[i]);
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (Tcl_StringMatch(elemPtr->obj.name, pattern)) {
-		fprintf(stderr, "legend %s(%s) %s is currently %d\n",
-			string, pattern, elemPtr->obj.name, 
-			(elemPtr->flags & LABEL_ACTIVE));
-		if (active) {
-		    if ((elemPtr->flags & LABEL_ACTIVE) == 0) {
-			elemPtr->flags |= LABEL_ACTIVE;
-			redraw = TRUE;
-		    }
-		} else {
-		    if (elemPtr->flags & LABEL_ACTIVE) {
-			elemPtr->flags &= ~LABEL_ACTIVE;
-			redraw = TRUE;
-		    }
-		}
-		fprintf(stderr, "legend %s(%s) %s is now %d\n",
-			string, pattern, elemPtr->obj.name, 
-			(elemPtr->flags & LABEL_ACTIVE));
-	    }
-	}
-    }
-    if ((redraw) && ((legendPtr->flags & HIDE) == 0)) {
-	/*
-	 * See if how much we need to draw. If the graph is already scheduled
-	 * for a redraw, just make sure the right flags are set.  Otherwise
-	 * redraw only the legend: it's either in an external window or it's
-	 * the only thing that need updating.
-	 */
-	if ((legendPtr->site != LEGEND_WINDOW) && 
-	    (graphPtr->flags & REDRAW_PENDING)) {
-	    graphPtr->flags |= CACHE_DIRTY;
-	    graphPtr->flags |= REDRAW_WORLD; /* Redraw entire graph. */
-	} else {
-	    Blt_Legend_EventuallyRedraw(graphPtr);
-	}
-    }
-    {
-	Blt_ChainLink link;
-	Tcl_Obj *listObjPtr;
-	
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/* List active elements in stacking order. */
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (elemPtr->flags & LABEL_ACTIVE) {
-		Tcl_Obj *objPtr;
-
-		objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	  .t bind index sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->elements.tagTable, &iter);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    const char *tagName;
-	    Tcl_Obj *objPtr;
-
-	    tagName = Blt_GetHashKey(&graphPtr->elements.tagTable, hPtr);
-	    objPtr = Tcl_NewStringObj(tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->legend->bindTable,
-	Blt_MakeElementTag(graphPtr, Tcl_GetString(objv[3])), objc - 4, 
-	objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * 	Queries or resets options for the legend.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-CgetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)graphPtr->legend, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	Queries or resets options for the legend.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int flags = BLT_CONFIG_OBJV_ONLY;
-    Legend *legendPtr;
-
-    legendPtr = graphPtr->legend;
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)legendPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)legendPtr, objv[3], flags);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-		objc - 3, objv + 3, (char *)legendPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_ConfigureLegend(graphPtr);
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-CurselectionOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (legendPtr->flags & SELECT_SORTED) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(legendPtr->selected); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    Tcl_Obj *objPtr;
-
-	    elemPtr = Blt_Chain_GetValue(link);
-	    objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_ChainLink link;
-
-	/* List of selected entries is in stacking order. */
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-
-	    elemPtr = Blt_Chain_GetValue(link);
-
-	    if (EntryIsSelected(legendPtr, elemPtr)) {
-		Tcl_Obj *objPtr;
-
-		objPtr = Tcl_NewStringObj(elemPtr->obj.name, -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-FocusOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-
-    if (objc == 4) {
-	Element *elemPtr;
-
-	if (GetElementFromObj(graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((elemPtr != NULL) && (elemPtr != legendPtr->focusPtr)) {
-	    /* Changing focus can only affect the visible entries.  The entry
-	     * layout stays the same. */
-	    legendPtr->focusPtr = elemPtr;
-	}
-	Blt_SetFocusItem(legendPtr->bindTable, legendPtr->focusPtr, 
-			 CID_LEGEND_ENTRY);
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    if (legendPtr->focusPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		legendPtr->focusPtr->obj.name, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- * 	Find the legend entry from the given argument.  The argument can be
- * 	either a screen position "@x,y" or the name of an element.
- *
- *	I don't know how useful it is to test with the name of an element.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-
-    if (((legendPtr->flags & HIDE) == 0) && (legendPtr->nEntries > 0)) {
-	Element *elemPtr;
-
-	if (GetElementFromObj(graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (elemPtr != NULL) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->obj.name,-1);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * IconOp --
- *
- * 	Find the legend entry from the given argument.  The argument
- *	can be either a screen position "@x,y" or the name of an
- *	element.
- *
- *	I don't know how useful it is to test with the name of an
- *	element.
- *
- * Results:
- *	A standard Tcl result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *	.g legend icon elemName image
- *
- *----------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IconOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Picture picture;
-    Element *elemPtr;
-    Legend *legendPtr = graphPtr->legend;
-    Pixmap pixmap;
-    Blt_FontMetrics fontMetrics;
-    Tk_PhotoHandle photo;
-    const char *imageName;
-    int isPicture;
-    int w, h, x, y, s;
-
-    if (GetElementFromObj(graphPtr, objv[3], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    imageName = Tcl_GetString(objv[4]);
-    photo = Tk_FindPhoto(interp, imageName);
-    if (photo != NULL) {
-	isPicture = FALSE;
-    } else if (Blt_GetPicture(interp, imageName, &picture) == TCL_OK) {
-	isPicture = TRUE;
-    } else {
-	return TCL_ERROR;
-    }
-    Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics);
-    s = fontMetrics.ascent;
-    h = s + PADDING(legendPtr->iyPad) + 1;
-    w = s + s + 1 + PADDING(legendPtr->ixPad);
-    x = (w / 2);
-    y = (h / 2);
-    
-    pixmap = Tk_GetPixmap(graphPtr->display, Tk_RootWindow(graphPtr->tkwin),
-	w, h, Tk_Depth(graphPtr->tkwin));
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, pixmap, graphPtr->plotBg, 
-		0, 0, w, h, TK_RELIEF_FLAT, 0);
-    (*elemPtr->procsPtr->drawSymbolProc) (graphPtr, pixmap, elemPtr, x, y, s);
-    picture = Blt_DrawableToPicture(graphPtr->tkwin, pixmap, 0, 0, w, h, 1.0);
-    Tk_FreePixmap(graphPtr->display, pixmap);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "can't get picture of symbol.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Make the background transparent. */
-    {
-	int y;
-	Blt_Pixel bg;
-	Blt_Pixel *destRowPtr;
-	XColor *colorPtr;
-
-	colorPtr = Blt_BackgroundBorderColor(graphPtr->plotBg);
-	bg.Red   = colorPtr->red >> 8;
-	bg.Green = colorPtr->green >> 8;
-	bg.Blue  = colorPtr->blue >> 8;
-	bg.Alpha = 0xFF;
-	
-	destRowPtr = Blt_PictureBits(picture);
-	for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp, *dend;
-
-	    for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		if (dp->u32 == bg.u32) {
-		    dp->Alpha = 0x0;
-		}
-	    }
-	    destRowPtr += Blt_PictureStride(picture);
-	}
-    }
-    Blt_ClassifyPicture(picture);
-    if (isPicture) {
-	Blt_ResetPicture(interp, imageName, picture);
-    } else {
-	Blt_PictureToPhoto(picture, photo);
-	Blt_FreePicture(picture);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionAnchorOp --
- *
- *	Sets the selection anchor to the element given by a index.  The
- *	selection anchor is the end of the selection that is fixed while
- *	dragging out a selection with the mouse.  The index "anchor" may be
- *	used to refer to the anchor element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionAnchorOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    Element *elemPtr;
-
-    if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Set both the anchor and the mark. Indicates that a single entry
-     * is selected. */
-    legendPtr->selAnchorPtr = elemPtr;
-    legendPtr->selMarkPtr = NULL;
-    if (elemPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->label, -1);
-    }
-    Blt_Legend_EventuallyRedraw(graphPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionClearallOp
- *
- *	Clears the entire selection.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionClearallOp(Graph *graphPtr, Tcl_Interp *interp, int objc,
-		    Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-
-    ClearSelection(legendPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionIncludesOp
- *
- *	Returns 1 if the element indicated by index is currently
- *	selected, 0 if it isn't.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionIncludesOp(Graph *graphPtr, Tcl_Interp *interp, int objc,
-		    Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    Element *elemPtr;
-    int bool;
-
-    if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = EntryIsSelected(legendPtr, elemPtr);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionMarkOp --
- *
- *	Sets the selection mark to the element given by a index.  The
- *	selection anchor is the end of the selection that is movable while
- *	dragging out a selection with the mouse.  The index "mark" may be used
- *	to refer to the anchor element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionMarkOp(Graph *graphPtr, Tcl_Interp *interp, int objc,
-		Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    Element *elemPtr;
-
-    if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (legendPtr->selAnchorPtr == NULL) {
-	Tcl_AppendResult(interp, "selection anchor must be set first", 
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (legendPtr->selMarkPtr != elemPtr) {
-	Blt_ChainLink link, next;
-
-	/* Deselect entry from the list all the way back to the anchor. */
-	for (link = Blt_Chain_LastLink(legendPtr->selected); link != NULL; 
-	     link = next) {
-	    Element *selectPtr;
-
-	    next = Blt_Chain_PrevLink(link);
-	    selectPtr = Blt_Chain_GetValue(link);
-	    if (selectPtr == legendPtr->selAnchorPtr) {
-		break;
-	    }
-	    DeselectElement(legendPtr, selectPtr);
-	}
-	legendPtr->flags &= ~SELECT_MASK;
-	legendPtr->flags |= SELECT_SET;
-	SelectRange(legendPtr, legendPtr->selAnchorPtr, elemPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->label, -1);
-	legendPtr->selMarkPtr = elemPtr;
-
-	Blt_Legend_EventuallyRedraw(graphPtr);
-	if (legendPtr->selectCmd != NULL) {
-	    EventuallyInvokeSelectCmd(legendPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionPresentOp
- *
- *	Returns 1 if there is a selection and 0 if it isn't.
- *
- * Results:
- *	A standard TCL result.  interp->result will contain a boolean string
- *	indicating if there is a selection.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionPresentOp(Graph *graphPtr, Tcl_Interp *interp, int objc,
-		   Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    int bool;
-
-    bool = (Blt_Chain_GetLength(legendPtr->selected) > 0);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionSetOp
- *
- *	Selects, deselects, or toggles all of the elements in the range
- *	between first and last, inclusive, without affecting the selection
- *	state of elements outside that range.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *	.g legend selection set first last
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionSetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Legend *legendPtr = graphPtr->legend;
-    Element *firstPtr, *lastPtr;
-    const char *string;
-
-    legendPtr->flags &= ~SELECT_MASK;
-    string = Tcl_GetString(objv[3]);
-    switch (string[0]) {
-    case 's':
-	legendPtr->flags |= SELECT_SET;
-	break;
-    case 'c':
-	legendPtr->flags |= SELECT_CLEAR;
-	break;
-    case 't':
-	legendPtr->flags |= SELECT_TOGGLE;
-	break;
-    }
-    if (GetElementFromObj(graphPtr, objv[4], &firstPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((firstPtr->flags & HIDE) && ((legendPtr->flags & SELECT_CLEAR)==0)) {
-	Tcl_AppendResult(interp, "can't select hidden node \"", 
-		Tcl_GetString(objv[4]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    lastPtr = firstPtr;
-    if (objc > 5) {
-	if (GetElementFromObj(graphPtr, objv[5], &lastPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((lastPtr->flags & HIDE) && 
-	    ((legendPtr->flags & SELECT_CLEAR) == 0)) {
-	    Tcl_AppendResult(interp, "can't select hidden node \"", 
-		     Tcl_GetString(objv[5]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (firstPtr == lastPtr) {
-	SelectEntry(legendPtr, firstPtr);
-    } else {
-	SelectRange(legendPtr, firstPtr, lastPtr);
-    }
-    /* Set both the anchor and the mark. Indicates that a single entry is
-     * selected. */
-    if (legendPtr->selAnchorPtr == NULL) {
-	legendPtr->selAnchorPtr = firstPtr;
-    }
-    if (legendPtr->flags & SELECT_EXPORT) {
-	Tk_OwnSelection(legendPtr->tkwin, XA_PRIMARY, LostSelectionProc, 
-			legendPtr);
-    }
-    Blt_Legend_EventuallyRedraw(graphPtr);
-    if (legendPtr->selectCmd != NULL) {
-	EventuallyInvokeSelectCmd(legendPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionOp --
- *
- *	This procedure handles the individual options for text selections.
- *	The selected text is designated by start and end indices into the text
- *	pool.  The selected segment has both a anchored and unanchored ends.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *	.g legend selection anchor 
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec selectionOps[] =
-{
-    {"anchor",   1, SelectionAnchorOp,   5, 5, "elem",},
-    {"clear",    5, SelectionSetOp,      5, 6, "firstElem ?lastElem?",},
-    {"clearall", 6, SelectionClearallOp, 4, 4, "",},
-    {"includes", 1, SelectionIncludesOp, 5, 5, "elem",},
-    {"mark",     1, SelectionMarkOp,     5, 5, "elem",},
-    {"present",  1, SelectionPresentOp,  4, 4, "",},
-    {"set",      1, SelectionSetOp,      5, 6, "firstElem ?lastElem?",},
-    {"toggle",   1, SelectionSetOp,      5, 6, "firstElem ?lastElem?",},
-};
-static int nSelectionOps = sizeof(selectionOps) / sizeof(Blt_OpSpec);
-
-static int
-SelectionOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    GraphLegendProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSelectionOps, selectionOps, BLT_OP_ARG3, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (graphPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LegendOp --
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Legend is possibly redrawn.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec legendOps[] =
-{
-    {"activate",     1, ActivateOp,      3, 0, "?pattern?...",},
-    {"bind",         1, BindOp,          3, 6, "elem sequence command",},
-    {"cget",         2, CgetOp,          4, 4, "option",},
-    {"configure",    2, ConfigureOp,     3, 0, "?option value?...",},
-    {"curselection", 2, CurselectionOp,  3, 3, "",},
-    {"deactivate",   1, ActivateOp,      3, 0, "?pattern?...",},
-    {"focus",        1, FocusOp,         4, 4, "elem",},
-    {"get",          1, GetOp,           4, 4, "elem",},
-    {"icon",         1, IconOp,          5, 5, "elem image",},
-    {"selection",    1, SelectionOp,     3, 0, "args"},
-};
-static int nLegendOps = sizeof(legendOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_LegendOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    GraphLegendProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nLegendOps, legendOps, BLT_OP_ARG2, 
-	objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (graphPtr, interp, objc, objv);
-}
-
-int 
-Blt_Legend_Site(Graph *graphPtr)
-{
-    return graphPtr->legend->site;
-}
-
-int 
-Blt_Legend_Width(Graph *graphPtr)
-{
-    return graphPtr->legend->width;
-}
-
-int 
-Blt_Legend_Height(Graph *graphPtr)
-{
-    return graphPtr->legend->height;
-}
-
-int 
-Blt_Legend_IsHidden(Graph *graphPtr)
-{
-    return (graphPtr->legend->flags & HIDE);
-}
-
-int 
-Blt_Legend_IsRaised(Graph *graphPtr)
-{
-    return (graphPtr->legend->flags & RAISED);
-}
-
-int 
-Blt_Legend_X(Graph *graphPtr)
-{
-    return graphPtr->legend->x;
-}
-
-int 
-Blt_Legend_Y(Graph *graphPtr)
-{
-    return graphPtr->legend->y;
-}
-
-void
-Blt_Legend_RemoveElement(Graph *graphPtr, Element *elemPtr)
-{
-    Blt_DeleteBindings(graphPtr->legend->bindTable, elemPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionProc --
- *
- *	This procedure is called back by Tk when the selection is requested by
- *	someone.  It returns part or all of the selection in a buffer provided
- *	by the caller.
- *
- * Results:
- *	The return value is the number of non-NULL bytes stored at buffer.
- *	Buffer is filled (or partially filled) with a NUL-terminated string
- *	containing part or all of the selection, as given by offset and
- *	maxBytes.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectionProc(
-    ClientData clientData,		/* Information about the widget. */
-    int offset,				/* Offset within selection of first
-					 * character to be returned. */
-    char *buffer,			/* Location in which to place
-					 * selection. */
-    int maxBytes)			/* Maximum number of bytes to place at
-					 * buffer, not including terminating
-					 * NULL character. */
-{
-    Legend *legendPtr = clientData;
-    int nBytes;
-    Tcl_DString dString;
-
-    if ((legendPtr->flags & SELECT_EXPORT) == 0) {
-	return -1;
-    }
-    /* Retrieve the names of the selected entries. */
-    Tcl_DStringInit(&dString);
-    if (legendPtr->flags & SELECT_SORTED) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(legendPtr->selected); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-
-	    elemPtr = Blt_Chain_GetValue(link);
-	    Tcl_DStringAppend(&dString, elemPtr->label, -1);
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    } else {
-	Blt_ChainLink link;
-	Graph *graphPtr;
-
-	graphPtr = legendPtr->graphPtr;
-	/* List of selected entries is in stacking order. */
-	for (link = Blt_Chain_FirstLink(graphPtr->elements.displayList);
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Element *elemPtr;
-	    
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (EntryIsSelected(legendPtr, elemPtr)) {
-		Tcl_DStringAppend(&dString, elemPtr->label, -1);
-		Tcl_DStringAppend(&dString, "\n", -1);
-	    }
-	}
-    }
-    nBytes = Tcl_DStringLength(&dString) - offset;
-    strncpy(buffer, Tcl_DStringValue(&dString) + offset, maxBytes);
-    Tcl_DStringFree(&dString);
-    buffer[maxBytes] = '\0';
-    return MIN(nBytes, maxBytes);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlinkCursorProc --
- *
- *	This procedure is called as a timer handler to blink the insertion
- *	cursor off and on.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The cursor gets turned on or off, redisplay gets invoked, and this
- *	procedure reschedules itself.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BlinkCursorProc(ClientData clientData)
-{
-    Graph *graphPtr = clientData;
-    Legend *legendPtr;
-
-    legendPtr = graphPtr->legend;
-    if (!(legendPtr->flags & FOCUS) || (legendPtr->offTime == 0)) {
-	return;
-    }
-    if (legendPtr->active) {
-	int time;
-
-	legendPtr->cursorOn ^= 1;
-	time = (legendPtr->cursorOn) ? legendPtr->onTime : legendPtr->offTime;
-	legendPtr->timerToken = Tcl_CreateTimerHandler(time, BlinkCursorProc, 
-		graphPtr);
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-}
diff --git a/blt3.0/src/bltGrLegd.h b/blt3.0/src/bltGrLegd.h
deleted file mode 100644
index 0ba1cb3..0000000
--- a/blt3.0/src/bltGrLegd.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * bltGrLegd.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_GR_LEGEND_H
-#define _BLT_GR_LEGEND_H
-
-#define LEGEND_RIGHT	(1<<0)	/* Right margin */
-#define LEGEND_LEFT	(1<<1)	/* Left margin */
-#define LEGEND_BOTTOM	(1<<2)	/* Bottom margin */
-#define LEGEND_TOP	(1<<3)	/* Top margin, below the graph title. */
-#define LEGEND_PLOT	(1<<4)	/* Plot area */
-#define LEGEND_XY	(1<<5)	/* Screen coordinates in the plotting 
-				 * area. */
-#define LEGEND_WINDOW	(1<<6)	/* External window. */
-#define LEGEND_MARGIN_MASK \
-	(LEGEND_RIGHT | LEGEND_LEFT | LEGEND_BOTTOM | LEGEND_TOP)
-#define LEGEND_PLOTAREA_MASK  (LEGEND_PLOT | LEGEND_XY)
-
-BLT_EXTERN int Blt_CreateLegend(Graph *graphPtr);
-BLT_EXTERN void Blt_DestroyLegend(Graph *graphPtr);
-BLT_EXTERN void Blt_DrawLegend(Graph *graphPtr, Drawable drawable);
-BLT_EXTERN void Blt_MapLegend(Graph *graphPtr, int width, int height);
-BLT_EXTERN int Blt_LegendOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-BLT_EXTERN int Blt_Legend_Site(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_Width(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_Height(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_IsHidden(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_IsRaised(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_X(Graph *graphPtr);
-BLT_EXTERN int Blt_Legend_Y(Graph *graphPtr);
-BLT_EXTERN void Blt_Legend_RemoveElement(Graph *graphPtr, Element *elemPtr);
-BLT_EXTERN void Blt_Legend_EventuallyRedraw(Graph *graphPtr);
-
-#endif /* BLT_GR_LEGEND_H */
diff --git a/blt3.0/src/bltGrLine.c b/blt3.0/src/bltGrLine.c
deleted file mode 100644
index 319e2f7..0000000
--- a/blt3.0/src/bltGrLine.c
+++ /dev/null
@@ -1,5247 +0,0 @@
-
-/*
- * bltGrLine.c --
- *
- * This module implements line graph and stripchart elements for the BLT graph
- * widget.
- *
- *	Copyright (c) 1993 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltChain.h"
-#include <X11/Xutil.h>
-#include "bltGrElem.h"
-#include "tkDisplay.h"
-#include "bltBgStyle.h"
-#include "bltImage.h"
-#include "bltBitmap.h"
-
-#define COLOR_DEFAULT	(XColor *)1
-#define PATTERN_SOLID	((Pixmap)1)
-
-#define PEN_INCREASING  1		/* Draw line segments for only those
-					 * data points whose abscissas are
-					 * monotonically increasing in
-					 * order. */
-#define PEN_DECREASING  2		/* Lines will be drawn between only
-					 * those points whose abscissas are
-					 * decreasing in order. */
-
-#define PEN_BOTH_DIRECTIONS	(PEN_INCREASING | PEN_DECREASING)
-
-/* Lines will be drawn between points regardless of the ordering of the
- * abscissas */
-
-#define BROKEN_TRACE(dir,last,next) \
-    (((((dir) & PEN_DECREASING) == 0) && ((next) < (last))) || \
-     ((((dir) & PEN_INCREASING) == 0) && ((next) > (last))))
-
-#define DRAW_SYMBOL(linePtr) \
-	(((linePtr)->symbolCounter % (linePtr)->symbolInterval) == 0)
-
-typedef enum { 
-    PEN_SMOOTH_LINEAR,			/* Line segments */
-    PEN_SMOOTH_STEP,			/* Step-and-hold */
-    PEN_SMOOTH_NATURAL,			/* Natural cubic spline */
-    PEN_SMOOTH_QUADRATIC,		/* Quadratic spline */
-    PEN_SMOOTH_CATROM,			/* Catrom parametric spline */
-    PEN_SMOOTH_LAST			/* Sentinel */
-} Smoothing;
-
-typedef struct {
-    const char *name;
-    Smoothing value;
-} SmoothingInfo;
-
-static SmoothingInfo smoothingInfo[] = {
-    { "none",		PEN_SMOOTH_LINEAR	},
-    { "linear",		PEN_SMOOTH_LINEAR	},
-    { "step",		PEN_SMOOTH_STEP		},
-    { "natural",	PEN_SMOOTH_NATURAL	},
-    { "cubic",		PEN_SMOOTH_NATURAL	},
-    { "quadratic",	PEN_SMOOTH_QUADRATIC	},
-    { "catrom",		PEN_SMOOTH_CATROM	},
-    { (char *)NULL,	PEN_SMOOTH_LAST		}
-};
-
-
-typedef struct {
-    Point2d *screenPts;			/* Array of transformed coordinates */
-    int nScreenPts;			/* Number of coordinates */
-    int *styleMap;			/* Index of pen styles  */
-    int *map;				/* Maps segments/traces to data
-					 * points */
-} MapInfo;
-
-/* Symbol types for line elements */
-typedef enum {
-    SYMBOL_NONE,
-    SYMBOL_SQUARE,
-    SYMBOL_CIRCLE,
-    SYMBOL_DIAMOND,
-    SYMBOL_PLUS,
-    SYMBOL_CROSS,
-    SYMBOL_SPLUS,
-    SYMBOL_SCROSS,
-    SYMBOL_TRIANGLE,
-    SYMBOL_ARROW,
-    SYMBOL_BITMAP,
-    SYMBOL_IMAGE
-} SymbolType;
-
-typedef struct {
-    const char *name;
-    unsigned int minChars;
-    SymbolType type;
-} GraphSymbolType;
-
-static GraphSymbolType graphSymbols[] = {
-    { "arrow",	  1, SYMBOL_ARROW,	},
-    { "circle",	  2, SYMBOL_CIRCLE,	},
-    { "cross",	  2, SYMBOL_CROSS,	}, 
-    { "diamond",  1, SYMBOL_DIAMOND,	}, 
-    { "none",	  1, SYMBOL_NONE,	}, 
-    { "plus",	  1, SYMBOL_PLUS,	}, 
-    { "scross",	  2, SYMBOL_SCROSS,	}, 
-    { "splus",	  2, SYMBOL_SPLUS,	}, 
-    { "square",	  2, SYMBOL_SQUARE,	}, 
-    { "triangle", 1, SYMBOL_TRIANGLE,	}, 
-    { NULL,       0, 0			}, 
-};
-
-typedef struct {
-    SymbolType type;			/* Type of symbol to be drawn/printed */
-
-    int size;				/* Requested size of symbol in pixels */
-
-    XColor *outlineColor;		/* Outline color */
-
-    int outlineWidth;			/* Width of the outline */
-
-    GC outlineGC;			/* Outline graphics context */
-
-    XColor *fillColor;			/* Normal fill color */
-
-    GC fillGC;				/* Fill graphics context */
-
-    Tk_Image image;			/* This is used of image symbols.  */
-
-    /* The last two fields are used only for bitmap symbols. */
-
-    Pixmap bitmap;			/* Bitmap to determine
-					* foreground/background pixels of the
-					* symbol */
-    Pixmap mask;			/* Bitmap representing the transparent
-					 * pixels of the symbol */
-} Symbol;
-
-typedef struct {
-    int start;				/* Index into the X-Y coordinate arrays
-					 * indicating where trace starts. */
-    GraphPoints screenPts;		/* Array of screen coordinates
-					 * (malloc-ed) representing the
-					 * trace. */
-} Trace;
-
-typedef struct {
-    const char *name;			/* Pen style identifier.  If NULL pen
-					 * was statically allocated. */
-    ClassId classId;			/* Type of pen */
-    const char *typeId;			/* String token identifying the type of
-					 * pen */
-    unsigned int flags;			/* Indicates if the pen element is
-					 * active or normal */
-    int refCount;			/* Reference count for elements using
-					 * this pen. */
-    Blt_HashEntry *hashPtr;
-
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications */
-
-    PenConfigureProc *configProc;
-    PenDestroyProc *destroyProc;
-    Graph *graphPtr;			/* Graph that the pen is associated
-					 * with. */
-
-    /* Symbol attributes. */
-    Symbol symbol;			/* Element symbol type */
-
-    /* Trace attributes. */
-    int traceWidth;			/* Width of the line segments. If
-					 * lineWidth is 0, no line will be
-					 * drawn, only symbols. */
-
-    Blt_Dashes traceDashes;		/* Dash on-off list value */
-
-    XColor *traceColor;			/* Line segment color */
-
-    XColor *traceOffColor;		/* Line segment dash gap color */
-
-    GC traceGC;				/* Line segment graphics context */
-    
-    /* Error bar attributes. */
-    int errorBarShow;		       /* Describes which error bars to display:
-					* none, x, y, or * both. */
-
-    int errorBarLineWidth;		/* Width of the error bar segments. */
-
-    int errorBarCapWidth;		/* Width of the cap on error bars. */
-
-    XColor *errorBarColor;		/* Color of the error bar. */
-
-    GC errorBarGC;			/* Error bar graphics context. */
-
-    /* Show value attributes. */
-    int valueShow;			/* Indicates whether to display data
-					 * value.  Values are x, y, both, or
-					 * none. */
-    const char *valueFormat;		/* A printf format string. */
-
-    TextStyle valueStyle;		/* Text attributes (color, font,
-					 * rotation, etc.) of the value. */
-} LinePen;
-
-typedef struct {
-    Weight weight;			/* Weight range where this pen is
-					 * valid. */
-    LinePen *penPtr;			/* Pen to use. */
-    GraphPoints symbolPts;
-
-    GraphSegments lines;		/* Points to start of the line segments
-					 * for this pen. */
-    GraphSegments xeb, yeb;		/* X and Y axis error bars. */
-
-    int symbolSize;			/* Size of the pen's symbol scaled to
-					 * the current graph size. */
-    int errorBarCapWidth;		/* Length of the cap ends on each error
-					 * bar. */
-} LineStyle;
-
-typedef struct {
-    GraphObj obj;			/* Must be first field in element. */
-    unsigned int flags;		
-    Blt_HashEntry *hashPtr;
-
-    /* Fields specific to elements. */
-    const char *label;			/* Label displayed in legend */
-    unsigned short row, col;		/* Position of the entry in the
-					 * legend. */
-    int legendRelief;			/* Relief of label in legend. */
-    Axis2d axes;			/* X-axis and Y-axis mapping the
-					 * element */
-    ElemValues x, y, w;			/* Contains array of floating point
-					 * graph coordinate values. Also holds
-					 * min/max * and the number of
-					 * coordinates */
-    int *activeIndices;			/* Array of indices (malloc-ed) which
-					 * indicate which data points are active
-					 * (drawn * with "active" colors). */
-    int nActiveIndices;			/* Number of active data points.
-					 * Special case: if nActiveIndices < 0
-					 * and the * active bit is set in
-					 * "flags", then all data points are
-					 * drawn active. */
-    ElementProcs *procsPtr;
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications. */
-    LinePen *activePenPtr;		/* Standard Pens */
-    LinePen *normalPenPtr;
-    LinePen *builtinPenPtr;
-    Blt_Chain styles;			/* Palette of pens. */
-
-    /* Symbol scaling */
-    int scaleSymbols;			/* If non-zero, the symbols will scale
-					 * in size as the graph is zoomed
-					 * in/out.  */
-
-    double xRange, yRange;		/* Initial X-axis and Y-axis ranges:
-					 * used to scale the size of element's
-					 * symbol. */
-    int state;
-    Blt_ChainLink link;			/* Element's link in display list. */
-
-    /* The line element specific fields start here. */
-
-    ElemValues xError;			/* Relative/symmetric X error values. */
-    ElemValues yError;			/* Relative/symmetric Y error values. */
-    ElemValues xHigh, xLow;		/* Absolute/asymmetric X-coordinate
-					 * high/low error values. */
-    ElemValues yHigh, yLow;		/* Absolute/asymmetric Y-coordinate
-					 * high/low error values. */
-    LinePen builtinPen;
-    int errorBarCapWidth;		/* Length of cap on error bars */
-
-    /* Line smoothing */
-    Smoothing reqSmooth;		/* Requested smoothing function to use
-					 * for connecting the data points */
-    Smoothing smooth;			/* Smoothing function used. */
-    float rTolerance;			/* Tolerance to reduce the number of
-					 * points displayed. */
-
-    /* Drawing-related data structures. */
-
-    /* Area-under-curve fill attributes. */
-    XColor *fillFgColor;
-    XColor *fillBgColor;
-    GC fillGC;
-
-    Blt_Background fillBg;		/* Background for fill area. */
-
-    Point2d *fillPts;			/* Array of points used to draw polygon
-					 * to fill area under the curve */
-    int nFillPts;
-
-    /* Symbol points */
-    GraphPoints symbolPts;
-
-    /* Active symbol points */
-    GraphPoints activePts;
-    GraphSegments xeb, yeb;		/* Point to start of this pen's X-error
-					 * bar segments in the element's
-					 * array. */
-    int reqMaxSymbols;
-    int symbolInterval;
-    int symbolCounter;
-
-    /* X-Y graph-specific fields */
-
-    int penDir;				/* Indicates if a change in the pen
-					 * direction should be considered a
-					 * retrace (line segment is not
-					 * drawn). */
-    Blt_Chain traces;			/* List of traces (a trace is a series
-					 * of contiguous line segments).  New
-					 * traces are generated when either
-					 * the next segment changes the pen
-					 * direction, or the end point is
-					 * clipped by the plotting area. */
-
-    /* Stripchart-specific fields */
-
-    GraphSegments lines;		/* Holds the the line segments of the
-					 * element trace. The segments are
-					 * grouped by pen style. */
-} LineElement;
-
-static Blt_OptionParseProc ObjToSmoothProc;
-static Blt_OptionPrintProc SmoothToObjProc;
-static Blt_CustomOption smoothOption =
-{
-    ObjToSmoothProc, SmoothToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToPenDirProc;
-static Blt_OptionPrintProc PenDirToObjProc;
-static Blt_CustomOption penDirOption =
-{
-    ObjToPenDirProc, PenDirToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeSymbolProc;
-static Blt_OptionParseProc ObjToSymbolProc;
-static Blt_OptionPrintProc SymbolToObjProc;
-static Blt_CustomOption symbolOption =
-{
-    ObjToSymbolProc, SymbolToObjProc, FreeSymbolProc, (ClientData)0
-};
-
-BLT_EXTERN Blt_CustomOption bltLineStylesOption;
-BLT_EXTERN Blt_CustomOption bltColorOption;
-BLT_EXTERN Blt_CustomOption bltValuesOption;
-BLT_EXTERN Blt_CustomOption bltValuePairsOption;
-BLT_EXTERN Blt_CustomOption bltLinePenOption;
-BLT_EXTERN Blt_CustomOption bltXAxisOption;
-BLT_EXTERN Blt_CustomOption bltYAxisOption;
-
-#define DEF_LINE_ACTIVE_PEN		"activeLine"
-#define DEF_LINE_AXIS_X			"x"
-#define DEF_LINE_AXIS_Y			"y"
-#define DEF_LINE_DASHES			(char *)NULL
-#define DEF_LINE_DATA			(char *)NULL
-#define DEF_LINE_FILL_COLOR    		"defcolor"
-#define DEF_LINE_HIDE			"no"
-#define DEF_LINE_LABEL			(char *)NULL
-#define DEF_LINE_LABEL_RELIEF		"flat"
-#define DEF_LINE_MAX_SYMBOLS		"0"
-#define DEF_LINE_OFFDASH_COLOR    	(char *)NULL
-#define DEF_LINE_OUTLINE_COLOR		"defcolor"
-#define DEF_LINE_OUTLINE_WIDTH 		"1"
-#define DEF_LINE_PATTERN_BG		(char *)NULL
-#define DEF_LINE_PATTERN_FG		"black"
-#define DEF_LINE_PEN_COLOR		RGB_NAVYBLUE
-#define DEF_LINE_PEN_DIRECTION		"both"
-#define DEF_LINE_PEN_WIDTH		"1"
-#define DEF_LINE_PIXELS			"0.1i"
-#define DEF_LINE_REDUCE			"0.0"
-#define DEF_LINE_SCALE_SYMBOLS		"yes"
-#define DEF_LINE_SMOOTH			"linear"
-#define DEF_LINE_STATE			"normal"
-#define DEF_LINE_STIPPLE		(char *)NULL
-#define DEF_LINE_STYLES			""
-#define DEF_LINE_SYMBOL			"circle"
-#define DEF_LINE_TAGS			"all"
-#define DEF_LINE_X_DATA			(char *)NULL
-#define DEF_LINE_Y_DATA			(char *)NULL
-
-#define DEF_LINE_ERRORBAR_COLOR		"defcolor"
-#define DEF_LINE_ERRORBAR_LINE_WIDTH	"2"
-#define DEF_LINE_ERRORBAR_CAP_WIDTH	"2"
-#define DEF_LINE_SHOW_ERRORBARS		"both"
-
-#define DEF_PEN_ACTIVE_COLOR		RGB_BLUE
-#define DEF_PEN_DASHES			(char *)NULL
-#define DEF_PEN_FILL_COLOR    		"defcolor"
-#define DEF_PEN_LINE_WIDTH		"1"
-#define DEF_PEN_NORMAL_COLOR		RGB_NAVYBLUE
-#define DEF_PEN_OFFDASH_COLOR    	(char *)NULL
-#define DEF_PEN_OUTLINE_COLOR		"defcolor"
-#define DEF_PEN_OUTLINE_WIDTH 		"1"
-#define DEF_PEN_PIXELS			"0.1i"
-#define DEF_PEN_SYMBOL			"circle"
-#define DEF_PEN_TYPE			"line"
-#define	DEF_PEN_VALUE_ANCHOR		"s"
-#define	DEF_PEN_VALUE_COLOR		RGB_BLACK
-#define	DEF_PEN_VALUE_FONT		STD_FONT_NUMBERS
-#define	DEF_PEN_VALUE_FORMAT		"%g"
-#define	DEF_PEN_VALUE_ANGLE		(char *)NULL
-#define DEF_PEN_SHOW_VALUES		"no"
-
-static Blt_ConfigSpec lineElemConfigSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen",
-	DEF_LINE_ACTIVE_PEN, Blt_Offset(LineElement, activePenPtr),
-	BLT_CONFIG_NULL_OK, &bltLinePenOption},
-    {BLT_CONFIG_COLOR, "-areaforeground", "areaForeground", "AreaForeground",
-	DEF_LINE_PATTERN_FG, Blt_Offset(LineElement, fillFgColor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-areabackground", "areaBackground", 
-	"AreaBackground", DEF_LINE_PATTERN_BG, Blt_Offset(LineElement, fillBg),
-	 BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_LINE_TAGS, 
-	Blt_Offset(LineElement, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-color", "color", "Color", DEF_LINE_PEN_COLOR, 
-	Blt_Offset(LineElement, builtinPen.traceColor), 0},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_LINE_DASHES, 
-	Blt_Offset(LineElement, builtinPen.traceDashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-data", "data", "Data", DEF_LINE_DATA, 0, 0, 
-	&bltValuePairsOption},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_LINE_ERRORBAR_COLOR, 
-	Blt_Offset(LineElement, builtinPen.errorBarColor), 0, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth",
-	DEF_LINE_ERRORBAR_LINE_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.errorBarLineWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-	DEF_LINE_ERRORBAR_CAP_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.errorBarCapWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_LINE_FILL_COLOR, 
-	Blt_Offset(LineElement, builtinPen.symbol.fillColor), 
-	BLT_CONFIG_NULL_OK, &bltColorOption},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_LINE_HIDE, 
-        Blt_Offset(LineElement, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_STRING, "-label", "label", "Label", (char *)NULL, 
-	Blt_Offset(LineElement, label), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief",
-	DEF_LINE_LABEL_RELIEF, Blt_Offset(LineElement, legendRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT}, 
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-	DEF_LINE_PEN_WIDTH, Blt_Offset(LineElement, builtinPen.traceWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX",
-        DEF_LINE_AXIS_X, Blt_Offset(LineElement, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY",
-	DEF_LINE_AXIS_Y, Blt_Offset(LineElement, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_INT_NNEG, "-maxsymbols", "maxSymbols", "MaxSymbols",
-	DEF_LINE_MAX_SYMBOLS, Blt_Offset(LineElement, reqMaxSymbols),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-offdash", "offDash", "OffDash", 
-	DEF_LINE_OFFDASH_COLOR, 
-	Blt_Offset(LineElement, builtinPen.traceOffColor),
-	BLT_CONFIG_NULL_OK, &bltColorOption},
-    {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline", 
-	DEF_LINE_OUTLINE_COLOR, 
-	Blt_Offset(LineElement, builtinPen.symbol.outlineColor), 
-	0, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-outlinewidth", "outlineWidth", "OutlineWidth",
-	DEF_LINE_OUTLINE_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.symbol.outlineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-pen", "pen", "Pen", (char *)NULL, 
-	Blt_Offset(LineElement, normalPenPtr), BLT_CONFIG_NULL_OK, 
-	&bltLinePenOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-pixels", "pixels", "Pixels", DEF_LINE_PIXELS, 
-	Blt_Offset(LineElement, builtinPen.symbol.size), GRAPH | STRIPCHART}, 
-    {BLT_CONFIG_FLOAT, "-reduce", "reduce", "Reduce",
-	DEF_LINE_REDUCE, Blt_Offset(LineElement, rTolerance),
-	GRAPH | STRIPCHART | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-scalesymbols", "scaleSymbols", "ScaleSymbols",
-	DEF_LINE_SCALE_SYMBOLS, Blt_Offset(LineElement, scaleSymbols),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_LINE_SHOW_ERRORBARS, 
-	Blt_Offset(LineElement, builtinPen.errorBarShow), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(LineElement, builtinPen.valueShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-smooth", "smooth", "Smooth", DEF_LINE_SMOOTH, 
-	Blt_Offset(LineElement, reqSmooth), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&smoothOption},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_LINE_STATE, 
-	Blt_Offset(LineElement, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", DEF_LINE_STYLES, 
-	Blt_Offset(LineElement, styles), 0, &bltLineStylesOption},
-    {BLT_CONFIG_CUSTOM, "-symbol", "symbol", "Symbol", DEF_LINE_SYMBOL, 
-	Blt_Offset(LineElement, builtinPen.symbol), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &symbolOption},
-    {BLT_CONFIG_CUSTOM, "-trace", "trace", "Trace", DEF_LINE_PEN_DIRECTION, 
-	Blt_Offset(LineElement, penDir), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &penDirOption},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.anchor), 0},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.color), 0},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.font), 0},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(LineElement, builtinPen.valueFormat),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	DEF_PEN_VALUE_ANGLE, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.angle), 0},
-    {BLT_CONFIG_CUSTOM, "-weights", "weights", "Weights", (char *)NULL, 
-	Blt_Offset(LineElement, w), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-        Blt_Offset(LineElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xdata", "xData", "XData", (char *)NULL, 
-	Blt_Offset(LineElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xerror", "xError", "XError", (char *)NULL, 
-	Blt_Offset(LineElement, xError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xhigh", "xHigh", "XHigh", (char *)NULL, 
-	Blt_Offset(LineElement, xHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xlow", "xLow", "XLow", (char *)NULL, 
-	Blt_Offset(LineElement, xLow), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-	Blt_Offset(LineElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ydata", "yData", "YData", (char *)NULL, 
-	Blt_Offset(LineElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yerror", "yError", "YError", (char *)NULL, 
-	Blt_Offset(LineElement, yError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yhigh", "yHigh", "YHigh", (char *)NULL, 
-	Blt_Offset(LineElement, yHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ylow", "yLow", "YLow", (char *)NULL, 
-	Blt_Offset(LineElement, yLow), 0, &bltValuesOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Blt_ConfigSpec stripElemConfigSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen",
-	DEF_LINE_ACTIVE_PEN, Blt_Offset(LineElement, activePenPtr), 
-	BLT_CONFIG_NULL_OK, &bltLinePenOption},
-    {BLT_CONFIG_COLOR, "-areaforeground", "areaForeground", "areaForeground",
-	DEF_LINE_PATTERN_FG, Blt_Offset(LineElement, fillFgColor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-areabackground", "areaBackground", 
-	"areaBackground", DEF_LINE_PATTERN_BG, Blt_Offset(LineElement, fillBg), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_LINE_TAGS, 
-	Blt_Offset(LineElement, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-color", "color", "Color",
-	DEF_LINE_PEN_COLOR, Blt_Offset(LineElement, builtinPen.traceColor), 0},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes",
-	DEF_LINE_DASHES, Blt_Offset(LineElement, builtinPen.traceDashes),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-data", "data", "Data", DEF_LINE_DATA, 0, 0, 
-	&bltValuePairsOption},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_LINE_ERRORBAR_COLOR, 
-	Blt_Offset(LineElement, builtinPen.errorBarColor), 0, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth", "ErrorBarWidth",
-	DEF_LINE_ERRORBAR_LINE_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.errorBarLineWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-        DEF_LINE_ERRORBAR_CAP_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.errorBarCapWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_LINE_FILL_COLOR, 
-	Blt_Offset(LineElement, builtinPen.symbol.fillColor),
-	BLT_CONFIG_NULL_OK, &bltColorOption},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_LINE_HIDE, 
-	Blt_Offset(LineElement, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_STRING, "-label", "label", "Label", (char *)NULL, 
-	Blt_Offset(LineElement, label), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief",
-	DEF_LINE_LABEL_RELIEF, Blt_Offset(LineElement, legendRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", 
-	DEF_LINE_PEN_WIDTH, Blt_Offset(LineElement, builtinPen.traceWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_LINE_AXIS_X, 
-	Blt_Offset(LineElement, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_LINE_AXIS_Y, 
-	Blt_Offset(LineElement, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_INT_NNEG, "-maxsymbols", "maxSymbols", "MaxSymbols",
-	DEF_LINE_MAX_SYMBOLS, Blt_Offset(LineElement, reqMaxSymbols),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-offdash", "offDash", "OffDash",
-	DEF_LINE_OFFDASH_COLOR, Blt_Offset(LineElement, builtinPen.traceOffColor),
-	BLT_CONFIG_NULL_OK, &bltColorOption},
-    {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline",
-	DEF_LINE_OUTLINE_COLOR, 
-	Blt_Offset(LineElement, builtinPen.symbol.outlineColor), 0, 
-	&bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-outlinewidth", "outlineWidth", "OutlineWidth",
-	DEF_LINE_OUTLINE_WIDTH, 
-	Blt_Offset(LineElement, builtinPen.symbol.outlineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-pen", "pen", "Pen", (char *)NULL, 
-	Blt_Offset(LineElement, normalPenPtr), BLT_CONFIG_NULL_OK, 
-	&bltLinePenOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-pixels", "pixels", "Pixels", DEF_LINE_PIXELS, 
-	Blt_Offset(LineElement, builtinPen.symbol.size), 0},
-    {BLT_CONFIG_BOOLEAN, "-scalesymbols", "scaleSymbols", "ScaleSymbols",
-	DEF_LINE_SCALE_SYMBOLS, Blt_Offset(LineElement, scaleSymbols),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_LINE_SHOW_ERRORBARS, 
-	Blt_Offset(LineElement, builtinPen.errorBarShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(LineElement, builtinPen.valueShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-smooth", "smooth", "Smooth", DEF_LINE_SMOOTH, 
-        Blt_Offset(LineElement, reqSmooth), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&smoothOption},
-    {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", DEF_LINE_STYLES, 
-	Blt_Offset(LineElement, styles), 0, &bltLineStylesOption},
-    {BLT_CONFIG_CUSTOM, "-symbol", "symbol", "Symbol", DEF_LINE_SYMBOL, 
-	Blt_Offset(LineElement, builtinPen.symbol), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &symbolOption},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, 
-        Blt_Offset(LineElement, builtinPen.valueStyle.anchor), 0},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.color), 0},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.font), 0},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(LineElement, builtinPen.valueFormat),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	DEF_PEN_VALUE_ANGLE, 
-	Blt_Offset(LineElement, builtinPen.valueStyle.angle),0},
-    {BLT_CONFIG_CUSTOM, "-weights", "weights", "Weights", (char *)NULL, 
-	Blt_Offset(LineElement, w), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-	Blt_Offset(LineElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xdata", "xData", "XData", (char *)NULL, 
-	Blt_Offset(LineElement, x), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-	Blt_Offset(LineElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xerror", "xError", "XError", (char *)NULL, 
-	Blt_Offset(LineElement, xError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ydata", "yData", "YData", (char *)NULL, 
-	Blt_Offset(LineElement, y), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yerror", "yError", "YError", (char *)NULL, 
-	Blt_Offset(LineElement, yError), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xhigh", "xHigh", "XHigh", (char *)NULL, 
-	Blt_Offset(LineElement, xHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-xlow", "xLow", "XLow", (char *)NULL, 
-	Blt_Offset(LineElement, xLow), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-yhigh", "yHigh", "YHigh", (char *)NULL, 
-	Blt_Offset(LineElement, xHigh), 0, &bltValuesOption},
-    {BLT_CONFIG_CUSTOM, "-ylow", "yLow", "YLow", (char *)NULL, 
-	Blt_Offset(LineElement, yLow), 0, &bltValuesOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec linePenConfigSpecs[] =
-{
-    {BLT_CONFIG_COLOR, "-color", "color", "Color", DEF_PEN_ACTIVE_COLOR, 
-	Blt_Offset(LinePen, traceColor), ACTIVE_PEN},
-    {BLT_CONFIG_COLOR, "-color", "color", "Color", DEF_PEN_NORMAL_COLOR, 
-	Blt_Offset(LinePen, traceColor), NORMAL_PEN},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_PEN_DASHES, 
-	Blt_Offset(LinePen, traceDashes), BLT_CONFIG_NULL_OK | ALL_PENS},
-    {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor",
-	DEF_LINE_ERRORBAR_COLOR, Blt_Offset(LinePen, errorBarColor), 
-	ALL_PENS, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth", "ErrorBarWidth",
-	DEF_LINE_ERRORBAR_LINE_WIDTH, Blt_Offset(LinePen, errorBarLineWidth),
-        ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", 
-	DEF_LINE_ERRORBAR_CAP_WIDTH, Blt_Offset(LinePen, errorBarCapWidth),
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_PEN_FILL_COLOR, 
-	Blt_Offset(LinePen, symbol.fillColor), BLT_CONFIG_NULL_OK | ALL_PENS, 
-	&bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-        (char *)NULL, Blt_Offset(LinePen, traceWidth), 
-	ALL_PENS| BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-offdash", "offDash", "OffDash", DEF_PEN_OFFDASH_COLOR,
-	Blt_Offset(LinePen, traceOffColor), BLT_CONFIG_NULL_OK | ALL_PENS, 
-	&bltColorOption},
-    {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline", DEF_PEN_OUTLINE_COLOR,
-	Blt_Offset(LinePen, symbol.outlineColor), ALL_PENS, &bltColorOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-outlinewidth", "outlineWidth", "OutlineWidth",
-	DEF_PEN_OUTLINE_WIDTH, Blt_Offset(LinePen, symbol.outlineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT | ALL_PENS},
-    {BLT_CONFIG_PIXELS_NNEG, "-pixels", "pixels", "Pixels", DEF_PEN_PIXELS, 
-	Blt_Offset(LinePen, symbol.size), ALL_PENS},
-    {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars",
-	DEF_LINE_SHOW_ERRORBARS, Blt_Offset(LinePen, errorBarShow),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-showvalues", "showValues", "ShowValues",
-	DEF_PEN_SHOW_VALUES, Blt_Offset(LinePen, valueShow),
-	ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-symbol", "symbol", "Symbol", DEF_PEN_SYMBOL, 
-	Blt_Offset(LinePen, symbol), BLT_CONFIG_DONT_SET_DEFAULT | ALL_PENS, 
-	&symbolOption},
-    {BLT_CONFIG_STRING, "-type", (char *)NULL, (char *)NULL, DEF_PEN_TYPE, 
-	Blt_Offset(Pen, typeId), ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor",
-	DEF_PEN_VALUE_ANCHOR, Blt_Offset(LinePen, valueStyle.anchor), ALL_PENS},
-    {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor",
-	DEF_PEN_VALUE_COLOR, Blt_Offset(LinePen, valueStyle.color), ALL_PENS},
-    {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont",
-	DEF_PEN_VALUE_FONT, Blt_Offset(LinePen, valueStyle.font), ALL_PENS},
-    {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat",
-	DEF_PEN_VALUE_FORMAT, Blt_Offset(LinePen, valueFormat),
-	ALL_PENS | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FLOAT, "-valuerotate", "valueRotate", "ValueRotate",
-	DEF_PEN_VALUE_ANGLE, Blt_Offset(LinePen, valueStyle.angle), ALL_PENS},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-typedef double (DistanceProc)(int x, int y, Point2d *p, Point2d *q, Point2d *t);
-
-/* Forward declarations */
-static PenConfigureProc ConfigurePenProc;
-static PenDestroyProc DestroyPenProc;
-static ElementClosestProc ClosestLineProc;
-static ElementConfigProc ConfigureLineProc;
-static ElementDestroyProc DestroyLineProc;
-static ElementDrawProc DrawActiveLineProc;
-static ElementDrawProc DrawNormalLineProc;
-static ElementDrawSymbolProc DrawSymbolProc;
-static ElementExtentsProc GetLineExtentsProc;
-static ElementToPostScriptProc ActiveLineToPostScriptProc;
-static ElementToPostScriptProc NormalLineToPostScriptProc;
-static ElementSymbolToPostScriptProc SymbolToPostScriptProc;
-static ElementMapProc MapLineProc;
-static DistanceProc DistanceToYProc;
-static DistanceProc DistanceToXProc;
-static DistanceProc DistanceToLineProc;
-static Blt_BackgroundChangedProc BackgroundChangedProc;
-
-#ifdef WIN32
-
-static int tkpWinRopModes[] =
-{
-    R2_BLACK,		/* GXclear */
-    R2_MASKPEN,		/* GXand */
-    R2_MASKPENNOT,	/* GXandReverse */
-    R2_COPYPEN,		/* GXcopy */
-    R2_MASKNOTPEN,	/* GXandInverted */
-    R2_NOT,		/* GXnoop */
-    R2_XORPEN,		/* GXxor */
-    R2_MERGEPEN,	/* GXor */
-    R2_NOTMERGEPEN,	/* GXnor */
-    R2_NOTXORPEN,	/* GXequiv */
-    R2_NOT,		/* GXinvert */
-    R2_MERGEPENNOT,	/* GXorReverse */
-    R2_NOTCOPYPEN,	/* GXcopyInverted */
-    R2_MERGENOTPEN,	/* GXorInverted */
-    R2_NOTMASKPEN,	/* GXnand */
-    R2_WHITE		/* GXset */
-};
-
-#endif
-
-#ifndef notdef
-INLINE static int
-Round(double x)
-{
-    return (int) (x + ((x < 0.0) ? -0.5 : 0.5));
-}
-#else 
-#define Round Round
-#endif
-/*
- *---------------------------------------------------------------------------
- * 	Custom configuration option (parse and print) routines
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroySymbol(Display *display, Symbol *symbolPtr)
-{
-    if (symbolPtr->image != NULL) {
-	Tk_FreeImage(symbolPtr->image);
-	symbolPtr->image = NULL;
-    }
-    if (symbolPtr->bitmap != None) {
-	Tk_FreeBitmap(display, symbolPtr->bitmap);
-	symbolPtr->bitmap = None;
-    }
-    if (symbolPtr->mask != None) {
-	Tk_FreeBitmap(display, symbolPtr->mask);
-	symbolPtr->mask = None;
-    }
-    symbolPtr->type = SYMBOL_NONE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,		/* Not used. */
-    int imageWidth, int imageHeight)	/* Not used. */
-{
-    Element *elemPtr;
-    Graph *graphPtr;
-
-    elemPtr = clientData;
-    elemPtr->flags |= MAP_ITEM;
-    graphPtr = elemPtr->obj.graphPtr;
-    graphPtr->flags |= CACHE_DIRTY;
-    Blt_EventuallyRedrawGraph(graphPtr);
-}
-
-/*ARGSUSED*/
-static void
-FreeSymbolProc(
-    ClientData clientData,		/* Not used. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Symbol *symbolPtr = (Symbol *)(widgRec + offset);
-
-    DestroySymbol(display, symbolPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSymbol --
- *
- *	Convert the string representation of a line style or symbol name into
- *	its numeric form.
- *
- * Results:
- *	The return value is a standard TCL result.  The symbol type is written
- *	into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSymbolProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing symbol type */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Symbol *symbolPtr = (Symbol *)(widgRec + offset);
-    const char *string;
-
-    {
-	int length;
-	GraphSymbolType *p;
-	char c;
-
-	string = Tcl_GetStringFromObj(objPtr, &length);
-	if (length == 0) {
-	    DestroySymbol(Tk_Display(tkwin), symbolPtr);
-	    symbolPtr->type = SYMBOL_NONE;
-	    return TCL_OK;
-	}
-	c = string[0];
-	for (p = graphSymbols; p->name != NULL; p++) {
-	    if (length < p->minChars) {
-		continue;
-	    }
-	    if ((c == p->name[0]) && (strncmp(string, p->name, length) == 0)) {
-		DestroySymbol(Tk_Display(tkwin), symbolPtr);
-		symbolPtr->type = p->type;
-		return TCL_OK;
-	    }
-	}
-    }
-    {
-	Tk_Image tkImage;
-	Element *elemPtr = (Element *)widgRec;
-
-	tkImage = Tk_GetImage(interp, tkwin, string, ImageChangedProc, elemPtr);
-	if (tkImage != NULL) {
-	    DestroySymbol(Tk_Display(tkwin), symbolPtr);
-	    symbolPtr->image = tkImage;
-	    symbolPtr->type = SYMBOL_IMAGE;
-	    return TCL_OK;
-	}
-    }
-    {
-	Pixmap bitmap, mask;
-	Tcl_Obj **objv;
-	int objc;
-
-	if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) || 
-	    (objc > 2)) {
-	    goto error;
-	}
-	bitmap = mask = None;
-	if (objc > 0) {
-	    bitmap = Tk_AllocBitmapFromObj((Tcl_Interp *)NULL, tkwin, objv[0]);
-	    if (bitmap == None) {
-		goto error;
-	    }
-	}
-	if (objc > 1) {
-	    mask = Tk_AllocBitmapFromObj((Tcl_Interp *)NULL, tkwin, objv[1]);
-	    if (mask == None) {
-		goto error;
-	    }
-	}
-	DestroySymbol(Tk_Display(tkwin), symbolPtr);
-	symbolPtr->bitmap = bitmap;
-	symbolPtr->mask = mask;
-	symbolPtr->type = SYMBOL_BITMAP;
-	return TCL_OK;
-    }
- error:
-    Tcl_AppendResult(interp, "bad symbol \"", string, 
-	"\": should be \"none\", \"circle\", \"square\", \"diamond\", "
-	"\"plus\", \"cross\", \"splus\", \"scross\", \"triangle\", "
-	"\"arrow\" or the name of a bitmap", (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SymbolToObj --
- *
- *	Convert the symbol value into a string.
- *
- * Results:
- *	The string representing the symbol type or line style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SymbolToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Symbol *symbolPtr = (Symbol *)(widgRec + offset);
-
-    if (symbolPtr->type == SYMBOL_BITMAP) {
-	Tcl_Obj *listObjPtr, *objPtr;
-	const char *name;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	name = Tk_NameOfBitmap(Tk_Display(tkwin), symbolPtr->bitmap);
-	objPtr = Tcl_NewStringObj(name, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	if (symbolPtr->mask == None) {
-	    objPtr = Blt_EmptyStringObj();
-	} else {
-	    name = Tk_NameOfBitmap(Tk_Display(tkwin), symbolPtr->mask);
-	    objPtr = Tcl_NewStringObj(name, -1);
-	}
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	return listObjPtr;
-    } else {
-	GraphSymbolType *p;
-
-	for (p = graphSymbols; p->name != NULL; p++) {
-	    if (p->type == symbolPtr->type) {
-		return Tcl_NewStringObj(p->name, -1);
-	    }
-	}
-	return Tcl_NewStringObj("?unknown symbol type?", -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfSmooth --
- *
- *	Converts the smooth value into its string representation.
- *
- * Results:
- *	The static string representing the smooth type is returned.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfSmooth(Smoothing value)
-{
-    SmoothingInfo *siPtr;
-
-    for (siPtr = smoothingInfo; siPtr->name != NULL; siPtr++) {
-	if (siPtr->value == value) {
-	    return siPtr->name;
-	}
-    }
-    return "unknown smooth value";
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSmooth --
- *
- *	Convert the string representation of a line style or smooth name
- *	into its numeric form.
- *
- * Results:
- *	The return value is a standard TCL result.  The smooth type is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSmoothProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing smooth type */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Smoothing *valuePtr = (Smoothing *)(widgRec + offset);
-    SmoothingInfo *siPtr;
-    const char *string;
-    char c;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    for (siPtr = smoothingInfo; siPtr->name != NULL; siPtr++) {
-	if ((c == siPtr->name[0]) && (strcmp(string, siPtr->name) == 0)) {
-	    *valuePtr = siPtr->value;
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "bad smooth value \"", string, "\": should be \
-linear, step, natural, or quadratic", (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SmoothToObj --
- *
- *	Convert the smooth value into a string.
- *
- * Results:
- *	The string representing the smooth type or line style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SmoothToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int smooth = *(int *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfSmooth(smooth), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPenDir --
- *
- *	Convert the string representation of a line style or symbol name
- *	into its numeric form.
- *
- * Results:
- *	The return value is a standard TCL result.  The symbol type is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPenDirProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing pen direction */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int *penDirPtr = (int *)(widgRec + offset);
-    int length;
-    char c;
-    char *string;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'i') && (strncmp(string, "increasing", length) == 0)) {
-	*penDirPtr = PEN_INCREASING;
-    } else if ((c == 'd') && (strncmp(string, "decreasing", length) == 0)) {
-	*penDirPtr = PEN_DECREASING;
-    } else if ((c == 'b') && (strncmp(string, "both", length) == 0)) {
-	*penDirPtr = PEN_BOTH_DIRECTIONS;
-    } else {
-	Tcl_AppendResult(interp, "bad trace value \"", string,
-	    "\" : should be \"increasing\", \"decreasing\", or \"both\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfPenDir --
- *
- *	Convert the pen direction into a string.
- *
- * Results:
- *	The static string representing the pen direction is returned.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfPenDir(int penDir)
-{
-    switch (penDir) {
-    case PEN_INCREASING:
-	return "increasing";
-    case PEN_DECREASING:
-	return "decreasing";
-    case PEN_BOTH_DIRECTIONS:
-	return "both";
-    default:
-	return "unknown trace direction";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PenDirToObj --
- *
- *	Convert the pen direction into a string.
- *
- * Results:
- *	The string representing the pen drawing direction is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PenDirToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int penDir = *(int *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfPenDir(penDir), -1);
-}
-
-
-/*
- * Reset the number of points and segments, in case there are no segments or
- * points
- */
-static void
-ResetStylePalette(Blt_Chain styles)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(styles); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	LineStyle *stylePtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->lines.length = stylePtr->symbolPts.length = 0;
-	stylePtr->xeb.length = stylePtr->yeb.length = 0;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigurePenProc --
- *
- *	Sets up the appropriate configuration parameters in the GC.  It is
- *	assumed the parameters have been previously set by a call to
- *	Blt_ConfigureWidget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information such as line width, line style, color
- *	etc. get set in a new GC.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigurePenProc(Graph *graphPtr, Pen *penPtr)
-{
-    LinePen *lpPtr = (LinePen *)penPtr;
-    unsigned long gcMask;
-    GC newGC;
-    XGCValues gcValues;
-    XColor *colorPtr;
-
-    /*
-     * Set the outline GC for this pen: GCForeground is outline color.
-     * GCBackground is the fill color (only used for bitmap symbols).
-     */
-    gcMask = (GCLineWidth | GCForeground);
-    colorPtr = lpPtr->symbol.outlineColor;
-    if (colorPtr == COLOR_DEFAULT) {
-	colorPtr = lpPtr->traceColor;
-    }
-    gcValues.foreground = colorPtr->pixel;
-    if (lpPtr->symbol.type == SYMBOL_BITMAP) {
-	colorPtr = lpPtr->symbol.fillColor;
-	if (colorPtr == COLOR_DEFAULT) {
-	    colorPtr = lpPtr->traceColor;
-	}
-	/*
-	 * Set a clip mask if either
-	 *	1) no background color was designated or
-	 *	2) a masking bitmap was specified.
-	 *
-	 * These aren't necessarily the bitmaps we'll be using for clipping. But
-	 * this makes it unlikely that anyone else will be sharing this GC when
-	 * we set the clip origin (at the time the bitmap is drawn).
-	 */
-	if (colorPtr != NULL) {
-	    gcValues.background = colorPtr->pixel;
-	    gcMask |= GCBackground;
-	    if (lpPtr->symbol.mask != None) {
-		gcValues.clip_mask = lpPtr->symbol.mask;
-		gcMask |= GCClipMask;
-	    }
-	} else {
-	    gcValues.clip_mask = lpPtr->symbol.bitmap;
-	    gcMask |= GCClipMask;
-	}
-    }
-    gcValues.line_width = LineWidth(lpPtr->symbol.outlineWidth);
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (lpPtr->symbol.outlineGC != NULL) {
-	Tk_FreeGC(graphPtr->display, lpPtr->symbol.outlineGC);
-    }
-    lpPtr->symbol.outlineGC = newGC;
-
-    /* Fill GC for symbols: GCForeground is fill color */
-
-    gcMask = (GCLineWidth | GCForeground);
-    colorPtr = lpPtr->symbol.fillColor;
-    if (colorPtr == COLOR_DEFAULT) {
-	colorPtr = lpPtr->traceColor;
-    }
-    newGC = NULL;
-    if (colorPtr != NULL) {
-	gcValues.foreground = colorPtr->pixel;
-	newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    }
-    if (lpPtr->symbol.fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, lpPtr->symbol.fillGC);
-    }
-    lpPtr->symbol.fillGC = newGC;
-
-    /* Line segments */
-
-    gcMask = (GCLineWidth | GCForeground | GCLineStyle | GCCapStyle |
-	GCJoinStyle);
-    gcValues.cap_style = CapButt;
-    gcValues.join_style = JoinRound;
-    gcValues.line_style = LineSolid;
-    gcValues.line_width = LineWidth(lpPtr->traceWidth);
-
-    colorPtr = lpPtr->traceOffColor;
-    if (colorPtr == COLOR_DEFAULT) {
-	colorPtr = lpPtr->traceColor;
-    }
-    if (colorPtr != NULL) {
-	gcMask |= GCBackground;
-	gcValues.background = colorPtr->pixel;
-    }
-    gcValues.foreground = lpPtr->traceColor->pixel;
-    if (LineIsDashed(lpPtr->traceDashes)) {
-	gcValues.line_width = lpPtr->traceWidth;
-	gcValues.line_style = 
-	    (colorPtr == NULL) ? LineOnOffDash : LineDoubleDash;
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (lpPtr->traceGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, lpPtr->traceGC);
-    }
-    if (LineIsDashed(lpPtr->traceDashes)) {
-	lpPtr->traceDashes.offset = lpPtr->traceDashes.values[0] / 2;
-	Blt_SetDashes(graphPtr->display, newGC, &lpPtr->traceDashes);
-    }
-    lpPtr->traceGC = newGC;
-
-    gcMask = (GCLineWidth | GCForeground);
-    colorPtr = lpPtr->errorBarColor;
-    if (colorPtr == COLOR_DEFAULT) {
-	colorPtr = lpPtr->traceColor;
-    }
-    gcValues.line_width = LineWidth(lpPtr->errorBarLineWidth);
-    gcValues.foreground = colorPtr->pixel;
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (lpPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, lpPtr->errorBarGC);
-    }
-    lpPtr->errorBarGC = newGC;
-
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyPenProc --
- *
- *	Release memory and resources allocated for the style.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the pen style is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyPenProc(Graph *graphPtr, Pen *basePtr)
-{
-    LinePen *penPtr = (LinePen *)basePtr;
-
-    Blt_Ts_FreeStyle(graphPtr->display, &penPtr->valueStyle);
-    if (penPtr->symbol.outlineGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->symbol.outlineGC);
-    }
-    if (penPtr->symbol.fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->symbol.fillGC);
-    }
-    if (penPtr->errorBarGC != NULL) {
-	Tk_FreeGC(graphPtr->display, penPtr->errorBarGC);
-    }
-    if (penPtr->traceGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, penPtr->traceGC);
-    }
-    if (penPtr->symbol.bitmap != None) {
-	Tk_FreeBitmap(graphPtr->display, penPtr->symbol.bitmap);
-	penPtr->symbol.bitmap = None;
-    }
-    if (penPtr->symbol.mask != None) {
-	Tk_FreeBitmap(graphPtr->display, penPtr->symbol.mask);
-	penPtr->symbol.mask = None;
-    }
-}
-
-
-static void
-InitLinePen(LinePen *penPtr)
-{
-    Blt_Ts_InitStyle(penPtr->valueStyle);
-    penPtr->errorBarLineWidth = 2;
-    penPtr->errorBarShow = SHOW_BOTH;
-    penPtr->configProc = ConfigurePenProc;
-    penPtr->configSpecs = linePenConfigSpecs;
-    penPtr->destroyProc = DestroyPenProc;
-    penPtr->flags = NORMAL_PEN;
-    penPtr->name = "";
-    penPtr->symbol.bitmap = penPtr->symbol.mask = None;
-    penPtr->symbol.outlineColor = penPtr->symbol.fillColor = COLOR_DEFAULT;
-    penPtr->symbol.outlineWidth = penPtr->traceWidth = 1;
-    penPtr->symbol.type = SYMBOL_CIRCLE;
-    penPtr->valueShow = SHOW_NONE;
-}
-
-Pen *
-Blt_LinePen(const char *penName)
-{
-    LinePen *penPtr;
-
-    penPtr = Blt_AssertCalloc(1, sizeof(LinePen));
-    InitLinePen(penPtr);
-    penPtr->name = Blt_AssertStrdup(penName);
-    penPtr->classId = CID_ELEM_LINE;
-    if (strcmp(penName, "activeLine") == 0) {
-	penPtr->flags = ACTIVE_PEN;
-    }
-    return (Pen *)penPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *	In this section, the routines deal with building and filling the
- *	element's data structures with transformed screen coordinates.  They are
- *	triggered from TranformLine which is called whenever the data or
- *	coordinates axes have changed and new screen coordinates need to be
- *	calculated.
- *
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScaleSymbol --
- *
- *	Returns the scaled size for the line element. Scaling depends upon when
- *	the base line ranges for the element were set and the current range of
- *	the graph.
- *
- * Results:
- *	The new size of the symbol, after considering how much the graph has
- *	been scaled, is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ScaleSymbol(LineElement *elemPtr, int normalSize)
-{
-    int maxSize;
-    double scale;
-    int newSize;
-
-    scale = 1.0;
-    if (elemPtr->scaleSymbols) {
-	double xRange, yRange;
-
-	xRange = (elemPtr->axes.x->max - elemPtr->axes.x->min);
-	yRange = (elemPtr->axes.y->max - elemPtr->axes.y->min);
-	if (elemPtr->flags & SCALE_SYMBOL) {
-	    /* Save the ranges as a baseline for future scaling. */
-	    elemPtr->xRange = xRange;
-	    elemPtr->yRange = yRange;
-	    elemPtr->flags &= ~SCALE_SYMBOL;
-	} else {
-	    double xScale, yScale;
-
-	    /* Scale the symbol by the smallest change in the X or Y axes */
-	    xScale = elemPtr->xRange / xRange;
-	    yScale = elemPtr->yRange / yRange;
-	    scale = MIN(xScale, yScale);
-	}
-    }
-    newSize = Round(normalSize * scale);
-
-    /*
-     * Don't let the size of symbols go unbounded. Both X and Win32 drawing
-     * routines assume coordinates to be a signed short int.
-     */
-    maxSize = (int)MIN(elemPtr->obj.graphPtr->hRange, 
-		       elemPtr->obj.graphPtr->vRange);
-    if (newSize > maxSize) {
-	newSize = maxSize;
-    }
-
-    /* Make the symbol size odd so that its center is a single pixel. */
-    newSize |= 0x01;
-    return newSize;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetScreenPoints --
- *
- *	Generates a coordinate array of transformed screen coordinates from
- *	the data points.
- *
- * Results:
- *	The transformed screen coordinates are returned.
- *
- * Side effects:
- *	Memory is allocated for the coordinate array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetScreenPoints(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    double *x, *y;
-    int i, n;
-    int count;
-    Point2d *points;
-    int *map;
-
-    n = NUMBEROFPOINTS(elemPtr);
-    x = elemPtr->x.values;
-    y = elemPtr->y.values;
-    points = Blt_AssertMalloc(sizeof(Point2d) * n);
-    map = Blt_AssertMalloc(sizeof(int) * n);
-
-    count = 0;				/* Count the valid screen coordinates */
-    if (graphPtr->inverted) {
-	for (i = 0; i < n; i++) {
-	    if ((FINITE(x[i])) && (FINITE(y[i]))) {
- 		points[count].x = Blt_HMap(elemPtr->axes.y, y[i]);
-		points[count].y = Blt_VMap(elemPtr->axes.x, x[i]);
-		map[count] = i;
-		count++;
-	    }
-	}
-    } else {
-	for (i = 0; i < n; i++) {
-	    if ((FINITE(x[i])) && (FINITE(y[i]))) {
-		points[count].x = Blt_HMap(elemPtr->axes.x, x[i]);
-		points[count].y = Blt_VMap(elemPtr->axes.y, y[i]);
-		map[count] = i;
-		count++;
-	    }
-	}
-    }
-    mapPtr->screenPts = points;
-    mapPtr->nScreenPts = count;
-    mapPtr->map = map;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReducePoints --
- *
- *	Generates a coordinate array of transformed screen coordinates from
- *	the data points.
- *
- * Results:
- *	The transformed screen coordinates are returned.
- *
- * Side effects:
- *	Memory is allocated for the coordinate array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReducePoints(MapInfo *mapPtr, double tolerance)
-{
-    int i, n;
-    Point2d *screenPts;
-    int *map, *simple;
-
-    simple    = Blt_AssertMalloc(mapPtr->nScreenPts * sizeof(int));
-    map	      = Blt_AssertMalloc(mapPtr->nScreenPts * sizeof(int));
-    screenPts = Blt_AssertMalloc(mapPtr->nScreenPts * sizeof(Point2d));
-    n = Blt_SimplifyLine(mapPtr->screenPts, 0, mapPtr->nScreenPts - 1, 
-		 tolerance, simple);
-    for (i = 0; i < n; i++) {
-	int k;
-
-	k = simple[i];
-	screenPts[i] = mapPtr->screenPts[k];
-	map[i] = mapPtr->map[k];
-    }
-#ifdef notdef
-    if (n < mapPtr->nScreenPts) {
-	fprintf(stderr, "reduced from %d to %d\n", mapPtr->nScreenPts, n);
-    }
-#endif
-    Blt_Free(mapPtr->screenPts);
-    Blt_Free(mapPtr->map);
-    Blt_Free(simple);
-    mapPtr->screenPts = screenPts;
-    mapPtr->map = map;
-    mapPtr->nScreenPts = n;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GenerateSteps --
- *
- *	Resets the coordinate and pen index arrays adding new points for
- *	step-and-hold type smoothing.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The temporary arrays for screen coordinates and pen indices
- *	are updated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GenerateSteps(MapInfo *mapPtr)
-{
-    int newSize;
-    int i, count;
-    Point2d *screenPts;
-    int *map;
-
-    newSize = ((mapPtr->nScreenPts - 1) * 2) + 1;
-    screenPts = Blt_AssertMalloc(newSize * sizeof(Point2d));
-    map = Blt_AssertMalloc(sizeof(int) * newSize);
-    screenPts[0] = mapPtr->screenPts[0];
-    map[0] = 0;
-
-    count = 1;
-    for (i = 1; i < mapPtr->nScreenPts; i++) {
-	screenPts[count + 1] = mapPtr->screenPts[i];
-
-	/* Hold last y-coordinate, use new x-coordinate */
-	screenPts[count].x = screenPts[count + 1].x;
-	screenPts[count].y = screenPts[count - 1].y;
-
-	/* Use the same style for both the hold and the step points */
-	map[count] = map[count + 1] = mapPtr->map[i];
-	count += 2;
-    }
-    Blt_Free(mapPtr->screenPts);
-    Blt_Free(mapPtr->map);
-    mapPtr->map = map;
-    mapPtr->screenPts = screenPts;
-    mapPtr->nScreenPts = newSize;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GenerateSpline --
- *
- *	Computes a spline based upon the data points, returning a new (larger)
- *	coordinate array or points.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The temporary arrays for screen coordinates and data map are updated
- *	based upon spline.
- *
- * FIXME:  Can't interpolate knots along the Y-axis.   Need to break
- *	   up point array into interchangable X and Y vectors earlier.
- *	   Pass extents (left/right or top/bottom) as parameters.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GenerateSpline(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Point2d *origPts, *intpPts;
-    int *map;
-    int extra;
-    int nIntpPts, nOrigPts;
-    int result;
-    int i, j, count;
-
-    nOrigPts = mapPtr->nScreenPts;
-    origPts = mapPtr->screenPts;
-    assert(mapPtr->nScreenPts > 0);
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-	if (origPts[j].x <= origPts[i].x) {
-	    return;			/* Points are not monotonically
-					 * increasing */
-	}
-    }
-    if (((origPts[0].x > (double)graphPtr->right)) ||
-	((origPts[mapPtr->nScreenPts - 1].x < (double)graphPtr->left))) {
-	return;				/* All points are clipped */
-    }
-
-    /*
-     * The spline is computed in screen coordinates instead of data points so
-     * that we can select the abscissas of the interpolated points from each
-     * pixel horizontally across the plotting area.
-     */
-    extra = (graphPtr->right - graphPtr->left) + 1;
-    if (extra < 1) {
-	return;
-    }
-    nIntpPts = nOrigPts + extra + 1;
-    intpPts = Blt_AssertMalloc(nIntpPts * sizeof(Point2d));
-    map = Blt_AssertMalloc(sizeof(int) * nIntpPts);
-    /* Populate the x2 array with both the original X-coordinates and extra
-     * X-coordinates for each horizontal pixel that the line segment
-     * contains. */
-    count = 0;
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-
-	/* Add the original x-coordinate */
-	intpPts[count].x = origPts[i].x;
-
-	/* Include the starting offset of the point in the offset array */
-	map[count] = mapPtr->map[i];
-	count++;
-
-	/* Is any part of the interval (line segment) in the plotting area?  */
-	if ((origPts[j].x >= (double)graphPtr->left) || 
-	    (origPts[i].x <= (double)graphPtr->right)) {
-	    double x, last;
-
-	    x = origPts[i].x + 1.0;
-
-	    /*
-	     * Since the line segment may be partially clipped on the left or
-	     * right side, the points to interpolate are always interior to
-	     * the plotting area.
-	     *
-	     *           left			    right
-	     *      x1----|---------------------------|---x2
-	     *
-	     * Pick the max of the starting X-coordinate and the left edge and
-	     * the min of the last X-coordinate and the right edge.
-	     */
-	    x = MAX(x, (double)graphPtr->left);
-	    last = MIN(origPts[j].x, (double)graphPtr->right);
-
-	    /* Add the extra x-coordinates to the interval. */
-	    while (x < last) {
-		map[count] = mapPtr->map[i];
-		intpPts[count++].x = x;
-		x++;
-	    }
-	}
-    }
-    nIntpPts = count;
-    result = FALSE;
-    if (elemPtr->smooth == PEN_SMOOTH_NATURAL) {
-	result = Blt_NaturalSpline(origPts, nOrigPts, intpPts, nIntpPts);
-    } else if (elemPtr->smooth == PEN_SMOOTH_QUADRATIC) {
-	result = Blt_QuadraticSpline(origPts, nOrigPts, intpPts, nIntpPts);
-    }
-    if (!result) {
-	/* The spline interpolation failed.  We'll fallback to the current
-	 * coordinates and do no smoothing (standard line segments).  */
-	elemPtr->smooth = PEN_SMOOTH_LINEAR;
-	Blt_Free(intpPts);
-	Blt_Free(map);
-    } else {
-	Blt_Free(mapPtr->screenPts);
-	Blt_Free(mapPtr->map);
-	mapPtr->map = map;
-	mapPtr->screenPts = intpPts;
-	mapPtr->nScreenPts = nIntpPts;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GenerateParametricSpline --
- *
- *	Computes a spline based upon the data points, returning a new (larger)
- *	coordinate array or points.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The temporary arrays for screen coordinates and data map are updated
- *	based upon spline.
- *
- * FIXME:  Can't interpolate knots along the Y-axis.   Need to break
- *	   up point array into interchangable X and Y vectors earlier.
- *	   Pass extents (left/right or top/bottom) as parameters.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GenerateParametricSpline(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Region2d exts;
-    Point2d *origPts, *intpPts;
-    int *map;
-    int nIntpPts, nOrigPts;
-    int result;
-    int i, j, count;
-
-    nOrigPts = mapPtr->nScreenPts;
-    origPts = mapPtr->screenPts;
-    assert(mapPtr->nScreenPts > 0);
-
-    Blt_GraphExtents(graphPtr, &exts);
-
-    /* 
-     * Populate the x2 array with both the original X-coordinates and extra
-     * X-coordinates for each horizontal pixel that the line segment contains.
-     */
-    count = 1;
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-	Point2d p, q;
-
-        p = origPts[i];
-        q = origPts[j];
-	count++;
-        if (Blt_LineRectClip(&exts, &p, &q)) {
-	    count += (int)(hypot(q.x - p.x, q.y - p.y) * 0.5);
-	}
-    }
-    nIntpPts = count;
-    intpPts = Blt_AssertMalloc(nIntpPts * sizeof(Point2d));
-    map = Blt_AssertMalloc(sizeof(int) * nIntpPts);
-
-    /* 
-     * FIXME: This is just plain wrong.  The spline should be computed
-     *        and evaluated in separate steps.  This will mean breaking
-     *	      up this routine since the catrom coefficients can be
-     *	      independently computed for original data point.  This 
-     *	      also handles the problem of allocating enough points 
-     *	      since evaluation is independent of the number of points 
-     *		to be evalualted.  The interpolated 
-     *	      line segments should be clipped, not the original segments.
-     */
-    count = 0;
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-	Point2d p, q;
-	double d;
-
-        p = origPts[i];
-        q = origPts[j];
-
-        d = hypot(q.x - p.x, q.y - p.y);
-        /* Add the original x-coordinate */
-        intpPts[count].x = (double)i;
-        intpPts[count].y = 0.0;
-
-        /* Include the starting offset of the point in the offset array */
-        map[count] = mapPtr->map[i];
-        count++;
-
-        /* Is any part of the interval (line segment) in the plotting
-         * area?  */
-
-        if (Blt_LineRectClip(&exts, &p, &q)) {
-            double dp, dq;
-
-	    /* Distance of original point to p. */
-            dp = hypot(p.x - origPts[i].x, p.y - origPts[i].y);
-	    /* Distance of original point to q. */
-            dq = hypot(q.x - origPts[i].x, q.y - origPts[i].y);
-            dp += 2.0;
-            while(dp <= dq) {
-                /* Point is indicated by its interval and parameter t. */
-                intpPts[count].x = (double)i;
-                intpPts[count].y =  dp / d;
-                map[count] = mapPtr->map[i];
-                count++;
-                dp += 2.0;
-            }
-        }
-    }
-    intpPts[count].x = (double)i;
-    intpPts[count].y = 0.0;
-    map[count] = mapPtr->map[i];
-    count++;
-    nIntpPts = count;
-    result = FALSE;
-    if (elemPtr->smooth == PEN_SMOOTH_NATURAL) {
-        result = Blt_NaturalParametricSpline(origPts, nOrigPts, &exts, FALSE,
-		intpPts, nIntpPts);
-    } else if (elemPtr->smooth == PEN_SMOOTH_CATROM) {
-        result = Blt_CatromParametricSpline(origPts, nOrigPts, intpPts,
-		nIntpPts);
-    }
-    if (!result) {
-        /* The spline interpolation failed.  We'll fallback to the current
-         * coordinates and do no smoothing (standard line segments).  */
-        elemPtr->smooth = PEN_SMOOTH_LINEAR;
-        Blt_Free(intpPts);
-        Blt_Free(map);
-    } else {
-        Blt_Free(mapPtr->screenPts);
-        Blt_Free(mapPtr->map);
-        mapPtr->map = map;
-        mapPtr->screenPts = intpPts;
-        mapPtr->nScreenPts = nIntpPts;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapSymbols --
- *
- *	Creates two arrays of points and pen map, filled with
- *	the screen coordinates of the visible
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the index array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapSymbols(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Region2d exts;
-    Point2d *pp, *points;
-    int *map;
-    int i, count;
-
-    points = Blt_AssertMalloc(sizeof(Point2d) * mapPtr->nScreenPts);
-    map    = Blt_AssertMalloc(sizeof(int)     * mapPtr->nScreenPts);
-
-    Blt_GraphExtents(graphPtr, &exts);
-    count = 0;			/* Count the number of visible points */
-
-    for (pp = mapPtr->screenPts, i = 0; i < mapPtr->nScreenPts; i++, pp++) {
-	if (PointInRegion(&exts, pp->x, pp->y)) {
-	    points[count].x = pp->x;
-	    points[count].y = pp->y;
-	    map[count] = mapPtr->map[i];
-	    count++;
-	}
-    }
-    elemPtr->symbolPts.points = points;
-    elemPtr->symbolPts.length = count;
-    elemPtr->symbolPts.map = map;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapActiveSymbols --
- *
- *	Creates an array of points of the active graph coordinates.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the active point array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapActiveSymbols(Graph *graphPtr, LineElement *elemPtr)
-{
-    Point2d *points;
-    Region2d exts;
-    int *map;
-    int count, i, nPoints;
-
-    if (elemPtr->activePts.points != NULL) {
-	Blt_Free(elemPtr->activePts.points);
-	elemPtr->activePts.points = NULL;
-    }
-    if (elemPtr->activePts.map != NULL) {
-	Blt_Free(elemPtr->activePts.map);
-	elemPtr->activePts.map = NULL;
-    }
-    Blt_GraphExtents(graphPtr, &exts);
-    points = Blt_AssertMalloc(sizeof(Point2d) * elemPtr->nActiveIndices);
-    map    = Blt_AssertMalloc(sizeof(int)     * elemPtr->nActiveIndices);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    count = 0;				/* Count the visible active points */
-    for (i = 0; i < elemPtr->nActiveIndices; i++) {
-	double x, y;
-	int iPoint;
-
-	iPoint = elemPtr->activeIndices[i];
-	if (iPoint >= nPoints) {
-	    continue;			/* Index not available */
-	}
-	x = elemPtr->x.values[iPoint];
-	y = elemPtr->y.values[iPoint];
-	points[count] = Blt_Map2D(graphPtr, x, y, &elemPtr->axes);
-	map[count] = iPoint;
-	if (PointInRegion(&exts, points[count].x, points[count].y)) {
-	    count++;
-	}
-    }
-    if (count > 0) {
-	elemPtr->activePts.points = points;
-	elemPtr->activePts.map = map;
-    } else {
-	/* No active points were visible. */
-	Blt_Free(points);
-	Blt_Free(map);	
-    }
-    elemPtr->activePts.length = count;
-    elemPtr->flags &= ~ACTIVE_PENDING;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapStrip --
- *
- *	Creates an array of line segments of the graph coordinates.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is  allocated for the line segment array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapStrip(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Region2d exts;
-    Segment2d *lines;
-    int *indices, *indexPtr;
-    Point2d *pend, *pp;
-    Segment2d *sp;
-    int count;
-
-    indices = Blt_AssertMalloc(sizeof(int) * mapPtr->nScreenPts);
-
-    /* 
-     * Create array to hold points for line segments (not polyline
-     * coordinates).  So allocate twice the number of points.
-     */
-    sp = lines = Blt_AssertMalloc(mapPtr->nScreenPts * sizeof(Segment2d));
-    Blt_GraphExtents(graphPtr, &exts);
-    count = 0;				/* Count the number of segments. */
-    indexPtr = mapPtr->map;
-    for (pp = mapPtr->screenPts, pend = pp + (mapPtr->nScreenPts - 1); 
-	pp < pend; pp++, indexPtr++) {
-	sp->p = pp[0], sp->q = pp[1];
-	if (Blt_LineRectClip(&exts, &sp->p, &sp->q)) {
-	    sp++;
-	    indices[count] = *indexPtr;
-	    count++;
-	}
-    }
-    elemPtr->lines.map = indices;
-    elemPtr->lines.length = count;
-    elemPtr->lines.segments = lines;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MergePens --
- *
- *	Reorders the both arrays of points and segments to merge pens.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The old arrays are freed and new ones allocated containing
- *	the reordered points and segments.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MergePens(LineElement *elemPtr, LineStyle **styleMap)
-{
-    if (Blt_Chain_GetLength(elemPtr->styles) < 2) {
-	Blt_ChainLink link;
-	LineStyle *stylePtr;
-
-	link = Blt_Chain_FirstLink(elemPtr->styles);
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->errorBarCapWidth = elemPtr->errorBarCapWidth;
-	stylePtr->lines.length = elemPtr->lines.length;
-	stylePtr->lines.segments = elemPtr->lines.segments;
-	stylePtr->symbolPts.length = elemPtr->symbolPts.length;
-	stylePtr->symbolPts.points = elemPtr->symbolPts.points;
-	stylePtr->xeb.length = elemPtr->xeb.length;
-	stylePtr->xeb.segments = elemPtr->xeb.segments;
-	stylePtr->yeb.length = elemPtr->yeb.length;
-	stylePtr->yeb.segments = elemPtr->yeb.segments;
-	return;
-    }
-
-    /* We have more than one style. Group line segments and points of like pen
-     * styles.  */
-    if (elemPtr->lines.length > 0) {
-	Blt_ChainLink link;
-	Segment2d *sp, *segments;
-	int *ip;
-	int *map;
-
-	segments = Blt_AssertMalloc(elemPtr->lines.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->lines.length * sizeof(int));
-	sp = segments, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->lines.segments = sp;
-	    for (i = 0; i < elemPtr->lines.length; i++) {
-		int iData;
-
-		iData = elemPtr->lines.map[i];
-		if (styleMap[iData] == stylePtr) {
-		    *sp++ = elemPtr->lines.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->lines.length = sp - stylePtr->lines.segments;
-	}
-	Blt_Free(elemPtr->lines.segments);
-	elemPtr->lines.segments = segments;
-	Blt_Free(elemPtr->lines.map);
-	elemPtr->lines.map = map;
-    }
-    if (elemPtr->symbolPts.length > 0) {
-	Blt_ChainLink link;
-	int *ip;
-	Point2d *points, *pp;
-	int *map;
-
-	points = Blt_AssertMalloc(elemPtr->symbolPts.length * sizeof(Point2d));
-	map = Blt_AssertMalloc(elemPtr->symbolPts.length * sizeof(int));
-	pp = points, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->symbolPts.points = pp;
-	    for (i = 0; i < elemPtr->symbolPts.length; i++) {
-		int iData;
-
-		iData = elemPtr->symbolPts.map[i];
-		if (styleMap[iData] == stylePtr) {
-		    *pp++ = elemPtr->symbolPts.points[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->symbolPts.length = pp - stylePtr->symbolPts.points;
-	}
-	Blt_Free(elemPtr->symbolPts.points);
-	Blt_Free(elemPtr->symbolPts.map);
-	elemPtr->symbolPts.points = points;
-	elemPtr->symbolPts.map = map;
-    }
-    if (elemPtr->xeb.length > 0) {
-	Segment2d *segments, *sp;
-	int *map, *ip;
-	Blt_ChainLink link;
-
-	segments = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->xeb.length * sizeof(int));
-	sp = segments, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->xeb.segments = sp;
-	    for (i = 0; i < elemPtr->xeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->xeb.map[i];
-		if (styleMap[iData] == stylePtr) {
-		    *sp++ = elemPtr->xeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->xeb.length = sp - stylePtr->xeb.segments;
-	}
-	Blt_Free(elemPtr->xeb.segments);
-	Blt_Free(elemPtr->xeb.map);
-	elemPtr->xeb.segments = segments;
-	elemPtr->xeb.map = map;
-    }
-    if (elemPtr->yeb.length > 0) {
-	Segment2d *segments, *sp;
-	int *map, *ip;
-	Blt_ChainLink link;
-
-	segments = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(Segment2d));
-	map = Blt_AssertMalloc(elemPtr->yeb.length * sizeof(int));
-	sp = segments, ip = map;
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    int i;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    stylePtr->yeb.segments = sp;
-	    for (i = 0; i < elemPtr->yeb.length; i++) {
-		int iData;
-
-		iData = elemPtr->yeb.map[i];
-		if (styleMap[iData] == stylePtr) {
-		    *sp++ = elemPtr->yeb.segments[i];
-		    *ip++ = iData;
-		}
-	    }
-	    stylePtr->yeb.length = sp - stylePtr->yeb.segments;
-	}
-	Blt_Free(elemPtr->yeb.segments);
-	elemPtr->yeb.segments = segments;
-	Blt_Free(elemPtr->yeb.map);
-	elemPtr->yeb.map = map;
-    }
-}
-
-#define CLIP_TOP	(1<<0)
-#define CLIP_BOTTOM	(1<<1)
-#define CLIP_RIGHT	(1<<2)
-#define CLIP_LEFT	(1<<3)
-
-INLINE static int
-OutCode(Region2d *extsPtr, Point2d *p)
-{
-    int code;
-
-    code = 0;
-    if (p->x > extsPtr->right) {
-	code |= CLIP_RIGHT;
-    } else if (p->x < extsPtr->left) {
-	code |= CLIP_LEFT;
-    }
-    if (p->y > extsPtr->bottom) {
-	code |= CLIP_BOTTOM;
-    } else if (p->y < extsPtr->top) {
-	code |= CLIP_TOP;
-    }
-    return code;
-}
-
-static int
-ClipSegment(
-    Region2d *extsPtr,
-    int code1, int code2,
-    Point2d *p, Point2d *q)
-{
-    int inside, outside;
-
-    inside = ((code1 | code2) == 0);
-    outside = ((code1 & code2) != 0);
-
-    /*
-     * In the worst case, we'll clip the line segment against each of the four
-     * sides of the bounding rectangle.
-     */
-    while ((!outside) && (!inside)) {
-	if (code1 == 0) {
-	    Point2d *tmp;
-	    int code;
-
-	    /* Swap pointers and out codes */
-	    tmp = p, p = q, q = tmp;
-	    code = code1, code1 = code2, code2 = code;
-	}
-	if (code1 & CLIP_LEFT) {
-	    p->y += (q->y - p->y) *
-		(extsPtr->left - p->x) / (q->x - p->x);
-	    p->x = extsPtr->left;
-	} else if (code1 & CLIP_RIGHT) {
-	    p->y += (q->y - p->y) *
-		(extsPtr->right - p->x) / (q->x - p->x);
-	    p->x = extsPtr->right;
-	} else if (code1 & CLIP_BOTTOM) {
-	    p->x += (q->x - p->x) *
-		(extsPtr->bottom - p->y) / (q->y - p->y);
-	    p->y = extsPtr->bottom;
-	} else if (code1 & CLIP_TOP) {
-	    p->x += (q->x - p->x) *
-		(extsPtr->top - p->y) / (q->y - p->y);
-	    p->y = extsPtr->top;
-	}
-	code1 = OutCode(extsPtr, p);
-
-	inside = ((code1 | code2) == 0);
-	outside = ((code1 & code2) != 0);
-    }
-    return (!inside);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SaveTrace --
- *
- *	Creates a new trace and inserts it into the line's list of traces.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SaveTrace(
-    LineElement *elemPtr,
-    int start,			/* Starting index of the trace in data point
-				 * array.  Used to figure out closest point */
-    int length,			/* Number of points forming the trace */
-    MapInfo *mapPtr)
-{
-    Trace *tracePtr;
-    Point2d *screenPts;
-    int *map;
-    int i, j;
-
-    tracePtr  = Blt_AssertMalloc(sizeof(Trace));
-    screenPts = Blt_AssertMalloc(sizeof(Point2d) * length);
-    map       = Blt_AssertMalloc(sizeof(int) * length);
-
-    /* Copy the screen coordinates of the trace into the point array */
-
-    if (mapPtr->map != NULL) {
-	for (i = 0, j = start; i < length; i++, j++) {
-	    screenPts[i].x = mapPtr->screenPts[j].x;
-	    screenPts[i].y = mapPtr->screenPts[j].y;
-	    map[i] = mapPtr->map[j];
-	}
-    } else {
-	for (i = 0, j = start; i < length; i++, j++) {
-	    screenPts[i].x = mapPtr->screenPts[j].x;
-	    screenPts[i].y = mapPtr->screenPts[j].y;
-	    map[i] = j;
-	}
-    }
-    tracePtr->screenPts.length = length;
-    tracePtr->screenPts.points = screenPts;
-    tracePtr->screenPts.map = map;
-    tracePtr->start = start;
-    if (elemPtr->traces == NULL) {
-	elemPtr->traces = Blt_Chain_Create();
-    }
-    Blt_Chain_Append(elemPtr->traces, tracePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeTraces --
- *
- *	Deletes all the traces for the line.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeTraces(LineElement *elemPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(elemPtr->traces); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Trace *tracePtr;
-
-	tracePtr = Blt_Chain_GetValue(link);
-	Blt_Free(tracePtr->screenPts.map);
-	Blt_Free(tracePtr->screenPts.points);
-	Blt_Free(tracePtr);
-    }
-    Blt_Chain_Destroy(elemPtr->traces);
-    elemPtr->traces = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapTraces --
- *
- *	Creates an array of line segments of the graph coordinates.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is  allocated for the line segment array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapTraces(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Point2d *p, *q;
-    Region2d exts;
-    int code1;
-    int i;
-    int start, count;
-
-    Blt_GraphExtents(graphPtr, &exts);
-    count = 1;
-    code1 = OutCode(&exts, mapPtr->screenPts);
-    p = mapPtr->screenPts;
-    q = p + 1;
-    for (i = 1; i < mapPtr->nScreenPts; i++, p++, q++) {
-	Point2d s;
-	int code2;
-	int broken, offscreen;
-
-	s.x = s.y = 0;
-	code2 = OutCode(&exts, q);
-	if (code2 != 0) {
-	    /* Save the coordinates of the last point, before clipping */
-	    s = *q;
-	}
-	broken = BROKEN_TRACE(elemPtr->penDir, p->x, q->x);
-	offscreen = ClipSegment(&exts, code1, code2, p, q);
-	if (broken || offscreen) {
-
-	    /*
-	     * The last line segment is either totally clipped by the plotting
-	     * area or the x-direction is wrong, breaking the trace.  Either
-	     * way, save information about the last trace (if one exists),
-	     * discarding the current line segment
-	     */
-
-	    if (count > 1) {
-		start = i - count;
-		SaveTrace(elemPtr, start, count, mapPtr);
-		count = 1;
-	    }
-	} else {
-	    count++;		/* Add the point to the trace. */
-	    if (code2 != 0) {
-
-		/*
-		 * If the last point is clipped, this means that the trace is
-		 * broken after this point.  Restore the original coordinate
-		 * (before clipping) after saving the trace.
-		 */
-
-		start = i - (count - 1);
-		SaveTrace(elemPtr, start, count, mapPtr);
-		mapPtr->screenPts[i] = s;
-		count = 1;
-	    }
-	}
-	code1 = code2;
-    }
-    if (count > 1) {
-	start = i - count;
-	SaveTrace(elemPtr, start, count, mapPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapFillArea --
- *
- *	Creates an array of points that represent a polygon that fills
- *	the area under the element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is  allocated for the polygon point array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapFillArea(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
-{
-    Point2d *origPts, *clipPts;
-    Region2d exts;
-    int n;
-
-    if (elemPtr->fillPts != NULL) {
-	Blt_Free(elemPtr->fillPts);
-	elemPtr->fillPts = NULL;
-	elemPtr->nFillPts = 0;
-    }
-    if (mapPtr->nScreenPts < 3) {
-	return;
-    }
-    n = mapPtr->nScreenPts + 3;
-    Blt_GraphExtents(graphPtr, &exts);
-
-    origPts = Blt_AssertMalloc(sizeof(Point2d) * n);
-    if (graphPtr->inverted) {
-	double minX;
-	int i;
-
-	minX = (double)elemPtr->axes.y->screenMin;
-	for (i = 0; i < mapPtr->nScreenPts; i++) {
-	    origPts[i].x = mapPtr->screenPts[i].x + 1;
-	    origPts[i].y = mapPtr->screenPts[i].y;
-	    if (origPts[i].x < minX) {
-		minX = origPts[i].x;
-	    }
-	}	
-	/* Add edges to make (if necessary) the polygon fill to the bottom of
-	 * plotting window */
-	origPts[i].x = minX;
-	origPts[i].y = origPts[i - 1].y;
-	i++;
-	origPts[i].x = minX;
-	origPts[i].y = origPts[0].y; 
-	i++;
-	origPts[i] = origPts[0];
-    } else {
-	double maxY;
-	int i;
-
-	maxY = (double)elemPtr->axes.y->bottom;
-	for (i = 0; i < mapPtr->nScreenPts; i++) {
-	    origPts[i].x = mapPtr->screenPts[i].x + 1;
-	    origPts[i].y = mapPtr->screenPts[i].y;
-	    if (origPts[i].y > maxY) {
-		maxY = origPts[i].y;
-	    }
-	}	
-	/* Add edges to extend the fill polygon to the bottom of plotting
-	 * window */
-	origPts[i].x = origPts[i - 1].x;
-	origPts[i].y = maxY;
-	i++;
-	origPts[i].x = origPts[0].x; 
-	origPts[i].y = maxY;
-	i++;
-	origPts[i] = origPts[0];
-    }
-
-    clipPts = Blt_AssertMalloc(sizeof(Point2d) * n * 3);
-    n = Blt_PolyRectClip(&exts, origPts, n - 1, clipPts);
-
-    Blt_Free(origPts);
-    if (n < 3) {
-	Blt_Free(clipPts);
-    } else {
-	elemPtr->fillPts = clipPts;
-	elemPtr->nFillPts = n;
-    }
-}
-
-static void
-ResetLine(LineElement *elemPtr)
-{
-    FreeTraces(elemPtr);
-    ResetStylePalette(elemPtr->styles);
-    if (elemPtr->symbolPts.points != NULL) {
-	Blt_Free(elemPtr->symbolPts.points);
-    }
-    if (elemPtr->symbolPts.map != NULL) {
-	Blt_Free(elemPtr->symbolPts.map);
-    }
-    if (elemPtr->lines.segments != NULL) {
-	Blt_Free(elemPtr->lines.segments);
-    }
-    if (elemPtr->lines.map != NULL) {
-	Blt_Free(elemPtr->lines.map);
-    }
-    if (elemPtr->activePts.points != NULL) {
-	Blt_Free(elemPtr->activePts.points);
-    }
-    if (elemPtr->activePts.map != NULL) {
-	Blt_Free(elemPtr->activePts.map);
-    }
-    if (elemPtr->xeb.segments != NULL) {
-	Blt_Free(elemPtr->xeb.segments);
-    }
-    if (elemPtr->xeb.map != NULL) {
-	Blt_Free(elemPtr->xeb.map);
-    }
-    if (elemPtr->yeb.segments != NULL) {
-	Blt_Free(elemPtr->yeb.segments);
-    }
-    if (elemPtr->yeb.map != NULL) {
-	Blt_Free(elemPtr->yeb.map);
-    }
-    elemPtr->xeb.segments = elemPtr->yeb.segments = elemPtr->lines.segments = NULL;
-    elemPtr->symbolPts.points = elemPtr->activePts.points = NULL;
-    elemPtr->lines.map = elemPtr->symbolPts.map = elemPtr->xeb.map = 
-	elemPtr->yeb.map = elemPtr->activePts.map = NULL;
-    elemPtr->activePts.length = elemPtr->symbolPts.length = 
-	elemPtr->lines.length = elemPtr->xeb.length = elemPtr->yeb.length = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapErrorBars --
- *
- *	Creates two arrays of points and pen indices, filled with the screen
- *	coordinates of the visible
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed and allocated for the index array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapErrorBars(Graph *graphPtr, LineElement *elemPtr, LineStyle **styleMap)
-{
-    int n, nPoints;
-    Region2d exts;
-
-    Blt_GraphExtents(graphPtr, &exts);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (elemPtr->xError.nValues > 0) {
-	n = MIN(elemPtr->xError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->xHigh.nValues, elemPtr->xLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *errorBars;
-	Segment2d *segPtr;
-	int *errorToData;
-	int *indexPtr;
-	int i;
-		
-	segPtr = errorBars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = errorToData = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    LineStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = styleMap[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->xError.nValues > 0) {
-		    high = x + elemPtr->xError.values[i];
-		    low = x - elemPtr->xError.values[i];
-		} else {
-		    high = elemPtr->xHigh.values[i];
-		    low = elemPtr->xLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-
-		    p = Blt_Map2D(graphPtr, high, y, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, low, y, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Left cap */
-		    segPtr->p.x = segPtr->q.x = p.x;
-		    segPtr->p.y = p.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = p.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Right cap */
-		    segPtr->p.x = segPtr->q.x = q.x;
-		    segPtr->p.y = q.y - stylePtr->errorBarCapWidth;
-		    segPtr->q.y = q.y + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->xeb.segments = errorBars;
-	elemPtr->xeb.length = segPtr - errorBars;
-	elemPtr->xeb.map = errorToData;
-    }
-    if (elemPtr->yError.nValues > 0) {
-	n = MIN(elemPtr->yError.nValues, nPoints);
-    } else {
-	n = MIN3(elemPtr->yHigh.nValues, elemPtr->yLow.nValues, nPoints);
-    }
-    if (n > 0) {
-	Segment2d *errorBars;
-	Segment2d *segPtr;
-	int *errorToData;
-	int *indexPtr;
-	int i;
-		
-	segPtr = errorBars = Blt_AssertMalloc(n * 3 * sizeof(Segment2d));
-	indexPtr = errorToData = Blt_AssertMalloc(n * 3 * sizeof(int));
-	for (i = 0; i < n; i++) {
-	    double x, y;
-	    double high, low;
-	    LineStyle *stylePtr;
-
-	    x = elemPtr->x.values[i];
-	    y = elemPtr->y.values[i];
-	    stylePtr = styleMap[i];
-	    if ((FINITE(x)) && (FINITE(y))) {
-		if (elemPtr->yError.nValues > 0) {
-		    high = y + elemPtr->yError.values[i];
-		    low = y - elemPtr->yError.values[i];
-		} else {
-		    high = elemPtr->yHigh.values[i];
-		    low = elemPtr->yLow.values[i];
-		}
-		if ((FINITE(high)) && (FINITE(low)))  {
-		    Point2d p, q;
-		    
-		    p = Blt_Map2D(graphPtr, x, high, &elemPtr->axes);
-		    q = Blt_Map2D(graphPtr, x, low, &elemPtr->axes);
-		    segPtr->p = p;
-		    segPtr->q = q;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Top cap. */
-		    segPtr->p.y = segPtr->q.y = p.y;
-		    segPtr->p.x = p.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = p.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		    /* Bottom cap. */
-		    segPtr->p.y = segPtr->q.y = q.y;
-		    segPtr->p.x = q.x - stylePtr->errorBarCapWidth;
-		    segPtr->q.x = q.x + stylePtr->errorBarCapWidth;
-		    if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) {
-			segPtr++;
-			*indexPtr++ = i;
-		    }
-		}
-	    }
-	}
-	elemPtr->yeb.segments = errorBars;
-	elemPtr->yeb.length = segPtr - errorBars;
-	elemPtr->yeb.map = errorToData;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapLineProc --
- *
- *	Calculates the actual window coordinates of the line element.  The
- *	window coordinates are saved in an allocated point array.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is (re)allocated for the point array.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapLineProc(Graph *graphPtr, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    MapInfo mapInfo;
-    int size, nPoints;
-    LineStyle **styleMap;
-    Blt_ChainLink link;
-    
-    ResetLine(elemPtr);
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (nPoints < 1) {
-	return;			/* No data points */
-    }
-    GetScreenPoints(graphPtr, elemPtr, &mapInfo);
-    MapSymbols(graphPtr, elemPtr, &mapInfo);
-
-    if ((elemPtr->flags & ACTIVE_PENDING) && (elemPtr->nActiveIndices > 0)) {
-	MapActiveSymbols(graphPtr, elemPtr);
-    }
-    /*
-     * Map connecting line segments if they are to be displayed.
-     */
-    elemPtr->smooth = elemPtr->reqSmooth;
-    if ((nPoints > 1) && ((graphPtr->classId == CID_ELEM_STRIP) ||
-	    (elemPtr->builtinPen.traceWidth > 0))) {
-
-	/*
-	 * Do smoothing if necessary.  This can extend the coordinate array,
-	 * so both mapInfo.points and mapInfo.nPoints may change.
-	 */
-
-	switch (elemPtr->smooth) {
-	case PEN_SMOOTH_STEP:
-	    GenerateSteps(&mapInfo);
-	    break;
-
-	case PEN_SMOOTH_NATURAL:
-	case PEN_SMOOTH_QUADRATIC:
-	    if (mapInfo.nScreenPts < 3) {
-		/* Can't interpolate with less than three points. */
-		elemPtr->smooth = PEN_SMOOTH_LINEAR;
-	    } else {
-		GenerateSpline(graphPtr, elemPtr, &mapInfo);
-	    }
-	    break;
-
-	case PEN_SMOOTH_CATROM:
-	    if (mapInfo.nScreenPts < 3) {
-		/* Can't interpolate with less than three points. */
-		elemPtr->smooth = PEN_SMOOTH_LINEAR;
-	    } else {
-		GenerateParametricSpline(graphPtr, elemPtr, &mapInfo);
-	    }
-	    break;
-
-	default:
-	    break;
-	}
-	if (elemPtr->rTolerance > 0.0) {
-	    ReducePoints(&mapInfo, elemPtr->rTolerance);
-	}
-	if (elemPtr->fillBg != NULL) {
-	    MapFillArea(graphPtr, elemPtr, &mapInfo);
-	}
-	if (graphPtr->classId == CID_ELEM_STRIP) {
-	    MapStrip(graphPtr, elemPtr, &mapInfo);
-	} else {
-	    MapTraces(graphPtr, elemPtr, &mapInfo);
-	}
-    }
-    Blt_Free(mapInfo.screenPts);
-    Blt_Free(mapInfo.map);
-
-    /* Set the symbol size of all the pen styles. */
-    for (link = Blt_Chain_FirstLink(elemPtr->styles); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	LineStyle *stylePtr;
-	LinePen *penPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = (LinePen *)stylePtr->penPtr;
-	size = ScaleSymbol(elemPtr, penPtr->symbol.size);
-	stylePtr->symbolSize = size;
-	stylePtr->errorBarCapWidth = (penPtr->errorBarCapWidth > 0) 
-	    ? penPtr->errorBarCapWidth : Round(size * 0.6666666);
-	stylePtr->errorBarCapWidth /= 2;
-    }
-    styleMap = (LineStyle **)Blt_StyleMap((Element *)elemPtr);
-    if (((elemPtr->yHigh.nValues > 0) && (elemPtr->yLow.nValues > 0)) ||
-	((elemPtr->xHigh.nValues > 0) && (elemPtr->xLow.nValues > 0)) ||
-	(elemPtr->xError.nValues > 0) || (elemPtr->yError.nValues > 0)) {
-	MapErrorBars(graphPtr, elemPtr, styleMap);
-    }
-    MergePens(elemPtr, styleMap);
-    Blt_Free(styleMap);
-}
-
-static double
-DistanceToLineProc(
-    int x, int y,			/* Sample X-Y coordinate. */
-    Point2d *p, Point2d *q,		/* End points of the line segment. */
-    Point2d *t)				/* (out) Point on line segment. */
-{
-    double right, left, top, bottom;
-
-    *t = Blt_GetProjection(x, y, p, q);
-    if (p->x > q->x) {
-	right = p->x, left = q->x;
-    } else {
-	left = p->x, right = q->x;
-    }
-    if (p->y > q->y) {
-	bottom = p->y, top = q->y;
-    } else {
-	top = p->y, bottom = q->y;
-    }
-    if (t->x > right) {
-	t->x = right;
-    } else if (t->x < left) {
-	t->x = left;
-    }
-    if (t->y > bottom) {
-	t->y = bottom;
-    } else if (t->y < top) {
-	t->y = top;
-    }
-    return hypot((t->x - x), (t->y - y));
-}
-
-static double
-DistanceToXProc(
-    int x, int y,			/* Search X-Y coordinate. */
-    Point2d *p, 
-    Point2d *q,				/* End points of the line segment. */
-    Point2d *t)				/* (out) Point on line segment. */
-{
-    double dx, dy;
-    double d;
-
-    if (p->x > q->x) {
-	if ((x > p->x) || (x < q->x)) {
-	    return DBL_MAX;		/* X-coordinate outside line segment. */
-	}
-    } else {
-	if ((x > q->x) || (x < p->x)) {
-	    return DBL_MAX;		/* X-coordinate outside line segment. */
-	}
-    }
-    dx = p->x - q->x;
-    dy = p->y - q->y;
-    t->x = (double)x;
-    if (FABS(dx) < DBL_EPSILON) {
-	double d1, d2;
-	/* 
-	 * Same X-coordinate indicates a vertical line.  Pick the closest end
-	 * point.
-	 */
-	d1 = p->y - y;
-	d2 = q->y - y;
-	if (FABS(d1) < FABS(d2)) {
-	    t->y = p->y, d = d1;
-	} else {
-	    t->y = q->y, d = d2;
-	}
-    } else if (FABS(dy) < DBL_EPSILON) {
-	/* Horizontal line. */
-	t->y = p->y, d = p->y - y;
-    } else {
-	double m, b;
-		
-	m = dy / dx;
-	b = p->y - (m * p->x);
-	t->y = (x * m) + b;
-	d = y - t->y;
-    }
-   return FABS(d);
-}
-
-static double
-DistanceToYProc(
-    int x, int y,		/* Search X-Y coordinate. */
-    Point2d *p, Point2d *q,	/* End points of the line segment. */
-    Point2d *t)			/* (out) Point on line segment. */
-{
-    double dx, dy;
-    double d;
-
-    if (p->y > q->y) {
-	if ((y > p->y) || (y < q->y)) {
-	    return DBL_MAX;
-	}
-    } else {
-	if ((y > q->y) || (y < p->y)) {
-	    return DBL_MAX;
-	}
-    }
-    dx = p->x - q->x;
-    dy = p->y - q->y;
-    t->y = y;
-    if (FABS(dy) < DBL_EPSILON) {
-	double d1, d2;
-
-	/* Save Y-coordinate indicates an horizontal line. Pick the closest end
-	 * point. */
-	d1 = p->x - x;
-	d2 = q->x - x;
-	if (FABS(d1) < FABS(d2)) {
-	    t->x = p->x, d = d1;
-	} else {
-	    t->x = q->x, d = d2;
-	}
-    } else if (FABS(dx) < DBL_EPSILON) {
-	/* Vertical line. */
-	t->x = p->x, d = p->x - x;
-    } else {
-	double m, b;
-	
-	m = dy / dx;
-	b = p->y - (m * p->x);
-	t->x = (y - b) / m;
-	d = x - t->x;
-    }
-    return FABS(d);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestTrace --
- *
- *	Find the line segment closest to the given window coordinate in the
- *	element.
- *
- * Results:
- *	If a new minimum distance is found, the information regarding it is
- *	returned via searchPtr.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ClosestTrace(
-    Graph *graphPtr,			/* Graph widget record */
-    LineElement *elemPtr,
-    ClosestSearch *searchPtr,		/* Info about closest point in
-					 * element */
-    DistanceProc *distProc)
-{
-    Blt_ChainLink link;
-    Point2d closest;
-    double dMin;
-    int iClose;
-
-    iClose = -1;			/* Suppress compiler warning. */
-    dMin = searchPtr->dist;
-    closest.x = closest.y = 0;		/* Suppress compiler warning. */
-    for (link = Blt_Chain_FirstLink(elemPtr->traces); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Trace *tracePtr;
-	Point2d *p, *pend;
-
-	tracePtr = Blt_Chain_GetValue(link);
-	for (p = tracePtr->screenPts.points, 
-		pend = p + (tracePtr->screenPts.length - 1); p < pend; p++) {
-	    Point2d b;
-	    double d;
-
-	    d = (*distProc)(searchPtr->x, searchPtr->y, p, p + 1, &b);
-	    if (d < dMin) {
-		closest = b;
-		iClose = tracePtr->screenPts.map[p-tracePtr->screenPts.points];
-		dMin = d;
-	    }
-	}
-    }
-    if (dMin < searchPtr->dist) {
-	searchPtr->dist = dMin;
-	searchPtr->elemPtr = (Element *)elemPtr;
-	searchPtr->index = iClose;
-	searchPtr->point = Blt_InvMap2D(graphPtr, closest.x, closest.y,
-	    &elemPtr->axes);
-	return TRUE;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestStrip --
- *
- *	Find the line segment closest to the given window coordinate in the
- *	element.
- *
- * Results:
- *	If a new minimum distance is found, the information regarding it is
- *	returned via searchPtr.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ClosestStrip(
-    Graph *graphPtr,			/* Graph widget record */
-    LineElement *elemPtr,		/* Line element record */
-    ClosestSearch *searchPtr,		/* Info about closest point in
-					 * element */
-    DistanceProc *distProc)
-{
-    Point2d closest;
-    double dMin;
-    int count;
-    int iClose;
-    Segment2d *sp;
-
-    iClose = 0;
-    dMin = searchPtr->dist;
-    closest.x = closest.y = 0;
-    for (sp = elemPtr->lines.segments, count = 0; 
-	 count < elemPtr->lines.length; count++, sp++) {
-	double d;
-	Point2d b;
-
-	d = (*distProc)(searchPtr->x, searchPtr->y, &sp->p, &sp->q, &b);
-	if (d < dMin) {
-	    closest = b;
-	    iClose = elemPtr->lines.map[count];
-	    dMin = d;
-	}
-    }
-    if (dMin < searchPtr->dist) {
-	searchPtr->dist = dMin;
-	searchPtr->elemPtr = (Element *)elemPtr;
-	searchPtr->index = iClose;
-	searchPtr->point = Blt_InvMap2D(graphPtr, closest.x, closest.y,
-	    &elemPtr->axes);
-	return TRUE;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestPoint --
- *
- *	Find the element whose data point is closest to the given screen
- *	coordinate.
- *
- * Results:
- *	If a new minimum distance is found, the information regarding
- *	it is returned via searchPtr.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClosestPoint(
-    LineElement *elemPtr,		/* Line element to be searched. */
-    ClosestSearch *searchPtr)		/* Assorted information related to
-					 * searching for the closest point */
-{
-    double dMin;
-    int count, iClose;
-    Point2d *pp;
-
-    dMin = searchPtr->dist;
-    iClose = 0;
-
-    /*
-     * Instead of testing each data point in graph coordinates, look at the
-     * array of mapped screen coordinates. The advantages are
-     *   1) only examine points that are visible (unclipped), and
-     *   2) the computed distance is already in screen coordinates.
-     */
-
-    for (pp = elemPtr->symbolPts.points, count = 0; 
-	 count < elemPtr->symbolPts.length; count++, pp++) {
-	double dx, dy;
-	double d;
-
-	dx = (double)(searchPtr->x - pp->x);
-	dy = (double)(searchPtr->y - pp->y);
-	if (searchPtr->along == SEARCH_BOTH) {
-	    d = hypot(dx, dy);
-	} else if (searchPtr->along == SEARCH_X) {
-	    d = dx;
-	} else if (searchPtr->along == SEARCH_Y) {
-	    d = dy;
-	} else {
-	    /* This can't happen */
-	    continue;
-	}
-	if (d < dMin) {
-	    iClose = elemPtr->symbolPts.map[count];
-	    dMin = d;
-	}
-    }
-    if (dMin < searchPtr->dist) {
-	searchPtr->elemPtr = (Element *)elemPtr;
-	searchPtr->dist = dMin;
-	searchPtr->index = iClose;
-	searchPtr->point.x = elemPtr->x.values[iClose];
-	searchPtr->point.y = elemPtr->y.values[iClose];
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetLineExtentsProc --
- *
- *	Retrieves the range of the line element
- *
- * Results:
- *	Returns the number of data points in the element.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetLineExtentsProc(Element *basePtr, Region2d *extsPtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    int nPoints;
-
-    extsPtr->top = extsPtr->left = DBL_MAX;
-    extsPtr->bottom = extsPtr->right = -DBL_MAX;
-
-    nPoints = NUMBEROFPOINTS(elemPtr);
-    if (nPoints < 1) {
-	return;
-    } 
-    extsPtr->right = elemPtr->x.max;
-    if ((elemPtr->x.min <= 0.0) && (elemPtr->axes.x->logScale)) {
-	extsPtr->left = Blt_FindElemValuesMinimum(&elemPtr->x, DBL_MIN);
-    } else {
-	extsPtr->left = elemPtr->x.min;
-    }
-    extsPtr->bottom = elemPtr->y.max;
-    if ((elemPtr->y.min <= 0.0) && (elemPtr->axes.y->logScale)) {
-	extsPtr->top = Blt_FindElemValuesMinimum(&elemPtr->y, DBL_MIN);
-    } else {
-	extsPtr->top = elemPtr->y.min;
-    }
-
-    /* Correct the data limits for error bars */
-
-    if (elemPtr->xError.nValues > 0) {
-	int i;
-	
-	nPoints = MIN(elemPtr->xError.nValues, nPoints);
-	for (i = 0; i < nPoints; i++) {
-	    double x;
-
-	    x = elemPtr->x.values[i] + elemPtr->xError.values[i];
-	    if (x > extsPtr->right) {
-		extsPtr->right = x;
-	    }
-	    x = elemPtr->x.values[i] - elemPtr->xError.values[i];
-	    if (elemPtr->axes.x->logScale) {
-		if (x < 0.0) {
-		    x = -x;		/* Mirror negative values, instead of
-					 * ignoring them. */
-		}
-		if ((x > DBL_MIN) && (x < extsPtr->left)) {
-		    extsPtr->left = x;
-		}
-	    } else if (x < extsPtr->left) {
-		extsPtr->left = x;
-	    }
-	}		     
-    } else {
-	if ((elemPtr->xHigh.nValues > 0) && 
-	    (elemPtr->xHigh.max > extsPtr->right)) {
-	    extsPtr->right = elemPtr->xHigh.max;
-	}
-	if (elemPtr->xLow.nValues > 0) {
-	    double left;
-	    
-	    if ((elemPtr->xLow.min <= 0.0) && 
-		(elemPtr->axes.x->logScale)) {
-		left = Blt_FindElemValuesMinimum(&elemPtr->xLow, DBL_MIN);
-	    } else {
-		left = elemPtr->xLow.min;
-	    }
-	    if (left < extsPtr->left) {
-		extsPtr->left = left;
-	    }
-	}
-    }
-    
-    if (elemPtr->yError.nValues > 0) {
-	int i;
-	
-	nPoints = MIN(elemPtr->yError.nValues, nPoints);
-	for (i = 0; i < nPoints; i++) {
-	    double y;
-
-	    y = elemPtr->y.values[i] + elemPtr->yError.values[i];
-	    if (y > extsPtr->bottom) {
-		extsPtr->bottom = y;
-	    }
-	    y = elemPtr->y.values[i] - elemPtr->yError.values[i];
-	    if (elemPtr->axes.y->logScale) {
-		if (y < 0.0) {
-		    y = -y;		/* Mirror negative values, instead of
-					 * ignoring them. */
-		}
-		if ((y > DBL_MIN) && (y < extsPtr->left)) {
-		    extsPtr->top = y;
-		}
-	    } else if (y < extsPtr->top) {
-		extsPtr->top = y;
-	    }
-	}		     
-    } else {
-	if ((elemPtr->yHigh.nValues > 0) && 
-	    (elemPtr->yHigh.max > extsPtr->bottom)) {
-	    extsPtr->bottom = elemPtr->yHigh.max;
-	}
-	if (elemPtr->yLow.nValues > 0) {
-	    double top;
-	    
-	    if ((elemPtr->yLow.min <= 0.0) && 
-		(elemPtr->axes.y->logScale)) {
-		top = Blt_FindElemValuesMinimum(&elemPtr->yLow, DBL_MIN);
-	    } else {
-		top = elemPtr->yLow.min;
-	    }
-	    if (top < extsPtr->top) {
-		extsPtr->top = top;
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BackgroundChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-BackgroundChangedProc(ClientData clientData)
-{
-    Element *elemPtr = clientData;
-    Graph *graphPtr;
-
-    graphPtr = elemPtr->obj.graphPtr;
-    if (graphPtr->tkwin != NULL) {
-	graphPtr->flags |= REDRAW_WORLD;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureLineProc --
- *
- *	Sets up the appropriate configuration parameters in the GC.  It is
- *	assumed the parameters have been previously set by a call to
- *	Blt_ConfigureWidget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information such as line width, line style, color
- *	etc. get set in a new GC.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureLineProc(Graph *graphPtr, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    unsigned long gcMask;
-    XGCValues gcValues;
-    GC newGC;
-    Blt_ChainLink link;
-    LineStyle *stylePtr;
-
-    if (ConfigurePenProc(graphPtr, (Pen *)&elemPtr->builtinPen) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Point to the static normal/active pens if no external pens have been
-     * selected.
-     */
-    link = Blt_Chain_FirstLink(elemPtr->styles);
-    if (link == NULL) {
-	link = Blt_Chain_AllocLink(sizeof(LineStyle));
-	Blt_Chain_LinkAfter(elemPtr->styles, link, NULL);
-    } 
-    stylePtr = Blt_Chain_GetValue(link);
-    stylePtr->penPtr = NORMALPEN(elemPtr);
-
-    if (elemPtr->fillBg != NULL) {
-	Blt_SetBackgroundChangedProc(elemPtr->fillBg, BackgroundChangedProc, 
-		elemPtr);
-    }
-    /*
-     * Set the outline GC for this pen: GCForeground is outline color.
-     * GCBackground is the fill color (only used for bitmap symbols).
-     */
-    gcMask = 0;
-    if (elemPtr->fillFgColor != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = elemPtr->fillFgColor->pixel;
-    }
-    if (elemPtr->fillBgColor != NULL) {
-	gcMask |= GCBackground;
-	gcValues.background = elemPtr->fillBgColor->pixel;
-    }
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (elemPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, elemPtr->fillGC);
-    }
-    elemPtr->fillGC = newGC;
-
-    if (Blt_ConfigModified(elemPtr->configSpecs, "-scalesymbols", 
-			   (char *)NULL)) {
-	elemPtr->flags |= (MAP_ITEM | SCALE_SYMBOL);
-    }
-    if (Blt_ConfigModified(elemPtr->configSpecs, "-pixels", "-trace", 
-	"-*data", "-smooth", "-map*", "-label", "-hide", "-x", "-y", 
-	"-areabackground", (char *)NULL)) {
-	elemPtr->flags |= MAP_ITEM;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClosestLineProc --
- *
- *	Find the closest point or line segment (if interpolated) to the given
- *	window coordinate in the line element.
- *
- * Results:
- *	Returns the distance of the closest point among other information.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClosestLineProc(Graph *graphPtr, Element *basePtr, ClosestSearch *searchPtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    int mode;
-
-    mode = searchPtr->mode;
-    if (mode == SEARCH_AUTO) {
-	LinePen *penPtr;
-
-	penPtr = NORMALPEN(elemPtr);
-	mode = SEARCH_POINTS;
-	if ((NUMBEROFPOINTS(elemPtr) > 1) && (penPtr->traceWidth > 0)) {
-	    mode = SEARCH_TRACES;
-	}
-    }
-    if (mode == SEARCH_POINTS) {
-	ClosestPoint(elemPtr, searchPtr);
-    } else {
-	DistanceProc *distProc;
-	int found;
-
-	if (searchPtr->along == SEARCH_X) {
-	    distProc = DistanceToXProc;
-	} else if (searchPtr->along == SEARCH_Y) {
-	    distProc = DistanceToYProc;
-	} else {
-	    distProc = DistanceToLineProc;
-	}
-	if (elemPtr->obj.classId == CID_ELEM_STRIP) {
-	    found = ClosestStrip(graphPtr, elemPtr, searchPtr, distProc);
-	} else {
-	    found = ClosestTrace(graphPtr, elemPtr, searchPtr, distProc);
-	}
-	if ((!found) && (searchPtr->along != SEARCH_BOTH)) {
-	    ClosestPoint(elemPtr, searchPtr);
-	}
-    }
-}
-
-/*
- * XDrawLines() points: XMaxRequestSize(dpy) - 3
- * XFillPolygon() points:  XMaxRequestSize(dpy) - 4
- * XDrawSegments() segments:  (XMaxRequestSize(dpy) - 3) / 2
- * XDrawRectangles() rectangles:  (XMaxRequestSize(dpy) - 3) / 2
- * XFillRectangles() rectangles:  (XMaxRequestSize(dpy) - 3) / 2
- * XDrawArcs() or XFillArcs() arcs:  (XMaxRequestSize(dpy) - 3) / 3
- */
-
-#define MAX_DRAWLINES(d)	Blt_MaxRequestSize(d, sizeof(XPoint))
-#define MAX_DRAWPOLYGON(d)	Blt_MaxRequestSize(d, sizeof(XPoint))
-#define MAX_DRAWSEGMENTS(d)	Blt_MaxRequestSize(d, sizeof(XSegment))
-#define MAX_DRAWRECTANGLES(d)	Blt_MaxRequestSize(d, sizeof(XRectangle))
-#define MAX_DRAWARCS(d)		Blt_MaxRequestSize(d, sizeof(XArc))
-
-#ifdef WIN32
-
-static void
-DrawCircles(
-    Display *display,
-    Drawable drawable,
-    LineElement *elemPtr,
-    LinePen *penPtr,
-    int nSymbolPts,
-    Point2d *symbolPts,
-    int radius)
-{
-    HBRUSH brush, oldBrush;
-    HPEN pen, oldPen;
-    HDC dc;
-    TkWinDCState state;
-
-    if (drawable == None) {
-	return;				/* Huh? */
-    }
-    if ((penPtr->symbol.fillGC == NULL) && 
-	(penPtr->symbol.outlineWidth == 0)) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    /* SetROP2(dc, tkpWinRopModes[penPtr->symbol.fillGC->function]); */
-    if (penPtr->symbol.fillGC != NULL) {
-	brush = CreateSolidBrush(penPtr->symbol.fillGC->foreground);
-    } else {
-	brush = GetStockBrush(NULL_BRUSH);
-    }
-    if (penPtr->symbol.outlineWidth > 0) {
-	pen = Blt_GCToPen(dc, penPtr->symbol.outlineGC);
-    } else {
-	pen = GetStockPen(NULL_PEN);
-    }
-    oldPen = SelectPen(dc, pen);
-    oldBrush = SelectBrush(dc, brush);
-    {
-	Point2d *pp, *pend;
-
-	for (pp = symbolPts, pend = pp + nSymbolPts; pp < pend; pp++) {
-	    int rndx, rndy;
-	    rndx = Round(pp->x), rndy = Round(pp->y);
-	    Ellipse(dc, rndx - radius, rndy - radius, rndx + radius + 1, 
-		rndy + radius + 1);
-	}
-    }
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    DeletePen(SelectPen(dc, oldPen));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-#else
-
-static void
-DrawCircles(Display *display, Drawable drawable, LineElement *elemPtr,
-	    LinePen *penPtr, int nSymbolPts, Point2d *symbolPts, int radius)
-{
-    int i;
-    XArc *arcs;				/* Array of arcs (circle) */
-    int reqSize;
-    int s;
-    int count;
-
-    s = radius + radius;
-    arcs = Blt_AssertMalloc(nSymbolPts * sizeof(XArc));
-
-    if (elemPtr->symbolInterval > 0) {
-	Point2d *pp, *pend;
-	XArc *ap;
-
-        ap = arcs;
-	count = 0;
-	for (pp = symbolPts, pend = pp + nSymbolPts; pp < pend; pp++) {
-	    if (DRAW_SYMBOL(elemPtr)) {
-		ap->x = Round(pp->x) - radius;
-		ap->y = Round(pp->y) - radius;
-		ap->width = ap->height = (unsigned short)s;
-		ap->angle1 = 0;
-		ap->angle2 = 23040;
-		ap++, count++;
-	    }
-	    elemPtr->symbolCounter++;
-	}
-    } else {
-	Point2d *pp, *pend;
-	XArc *ap;
-
-        ap = arcs;
-	for (pp = symbolPts, pend = pp + nSymbolPts; pp < pend; pp++) {
-	    ap->x = Round(pp->x) - radius;
-	    ap->y = Round(pp->y) - radius;
-	    ap->width = ap->height = (unsigned short)s;
-	    ap->angle1 = 0;
-	    ap->angle2 = 23040;
-	    ap++;
-	}
-	count = nSymbolPts;
-    }
-    reqSize = MAX_DRAWARCS(display);
-    for (i = 0; i < count; i += reqSize) {
-	int n;
-
-	n = ((i + reqSize) > count) ? (count - i) : reqSize;
-	if (penPtr->symbol.fillGC != NULL) {
-	    XFillArcs(display, drawable, penPtr->symbol.fillGC, arcs + i, n);
-	}
-	if (penPtr->symbol.outlineWidth > 0) {
-	    XDrawArcs(display, drawable, penPtr->symbol.outlineGC, arcs + i, n);
-	}
-    }
-    Blt_Free(arcs);
-}
-
-#endif
-
-static void
-DrawSquares(
-    Display *display,
-    Drawable drawable,
-    LineElement *elemPtr,
-    LinePen *penPtr,
-    int nSymbolPts,
-    Point2d *symbolPts,
-    int r)
-{
-    XRectangle *rectangles;
-    XRectangle *rp, *rend;
-    int reqSize;
-    int s, count;
-
-    s = r + r;
-    rectangles = Blt_AssertMalloc(nSymbolPts * sizeof(XRectangle));
-    if (elemPtr->symbolInterval > 0) {
-	Point2d *pp, *pend;
-	XRectangle *rp;
-
-	count = 0;
-	rp = rectangles;
-	for (pp = symbolPts, pend = pp + nSymbolPts; pp < pend; pp++) {
-	    if (DRAW_SYMBOL(elemPtr)) {
-		rp->x = Round(pp->x) - r;
-		rp->y = Round(pp->y) - r;
-		rp->width = rp->height = (unsigned short)s;
-		rp++, count++;
-	    }
-	    elemPtr->symbolCounter++;
-	}
-    } else {
-	Point2d *pp, *pend;
-	XRectangle *rp;
-
-	rp = rectangles;
-	for (pp = symbolPts, pend = pp + nSymbolPts; pp < pend; pp++) {
-	    rp->x = Round(pp->x) - r;
-	    rp->y = Round(pp->y) - r;
-	    rp->width = rp->height = (unsigned short)s;
-	    rp++;
-	}
-	count = nSymbolPts;
-    }
-    reqSize = MAX_DRAWRECTANGLES(display) - 3;
-    for (rp = rectangles, rend = rp + count; rp < rend; rp += reqSize) {
-	int nRects;
-
-	nRects = rend - rp;
-	if (nRects > reqSize) {
-	    nRects = reqSize;
-	}
-	if (penPtr->symbol.fillGC != NULL) {
-	    XFillRectangles(display, drawable, penPtr->symbol.fillGC, rp, 
-		(int)nRects);
-	}
-	if (penPtr->symbol.outlineWidth > 0) {
-	    XDrawRectangles(display, drawable, penPtr->symbol.outlineGC, rp, 
-		(int)nRects);
-	}
-    }
-    Blt_Free(rectangles);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSymbols --
- *
- * 	Draw the symbols centered at the each given x,y coordinate in the array
- * 	of points.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws a symbol at each coordinate given.  If active, only those
- *	coordinates which are currently active are drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawSymbols(
-    Graph *graphPtr,			/* Graph widget record */
-    Drawable drawable,			/* Pixmap or window to draw into */
-    LineElement *elemPtr,
-    LinePen *penPtr,
-    int size,				/* Size of element */
-    int nSymbolPts,			/* Number of coordinates in array */
-    Point2d *symbolPts)			/* Array of x,y coordinates for line */
-{
-    XPoint pattern[13];			/* Template for polygon symbols */
-    int r1, r2;
-    int count;
-#define SQRT_PI		1.77245385090552
-#define S_RATIO		0.886226925452758
-
-    if (size < 3) {
-	if (penPtr->symbol.fillGC != NULL) {
-	    Point2d *pp, *endp;
-	    XPoint *points, *xpp;
-	    
-	    xpp = points = Blt_AssertMalloc(nSymbolPts * sizeof(XPoint));
-	    for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		xpp->x = Round(pp->x);
-		xpp->y = Round(pp->y);
-		xpp++;
-	    }
-	    XDrawPoints(graphPtr->display, drawable, penPtr->symbol.fillGC, 
-			points, nSymbolPts, CoordModeOrigin);
-	    Blt_Free(points);
-	}
-	return;
-    }
-    r1 = (int)ceil(size * 0.5);
-    r2 = (int)ceil(size * S_RATIO * 0.5);
-
-    switch (penPtr->symbol.type) {
-    case SYMBOL_NONE:
-	break;
-
-    case SYMBOL_SQUARE:
-	DrawSquares(graphPtr->display, drawable, elemPtr, penPtr, nSymbolPts,
-	    symbolPts, r2);
-	break;
-
-    case SYMBOL_CIRCLE:
-	DrawCircles(graphPtr->display, drawable, elemPtr, penPtr, nSymbolPts,
-	    symbolPts, r1);
-	break;
-
-    case SYMBOL_SPLUS:
-    case SYMBOL_SCROSS:
-	{
-	    XSegment *segments;		/* Array of line segments (splus,
-					 * scross) */
-	    int i;
-	    int reqSize, nSegs;
-
-	    if (penPtr->symbol.type == SYMBOL_SCROSS) {
-		r2 = Round((double)r2 * M_SQRT1_2);
-		pattern[3].y = pattern[2].x = pattern[0].x = pattern[0].y = -r2;
-		pattern[3].x = pattern[2].y = pattern[1].y = pattern[1].x = r2;
-	    } else {
-		pattern[0].y = pattern[1].y = pattern[2].x = pattern[3].x = 0;
-		pattern[0].x = pattern[2].y = -r2;
-		pattern[1].x = pattern[3].y = r2;
-	    }
-	    segments = Blt_AssertMalloc(nSymbolPts * 2 * sizeof(XSegment));
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-		XSegment *sp;
-
-		sp = segments;
-		count = 0;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int rndx, rndy;
-			rndx = Round(pp->x), rndy = Round(pp->y);
-			sp->x1 = pattern[0].x + rndx;
-			sp->y1 = pattern[0].y + rndy;
-			sp->x2 = pattern[1].x + rndx;
-			sp->y2 = pattern[1].y + rndy;
-			sp++;
-			sp->x1 = pattern[2].x + rndx;
-			sp->y1 = pattern[2].y + rndy;
-			sp->x2 = pattern[3].x + rndx;
-			sp->y2 = pattern[3].y + rndy;
-			sp++;
-			count++;
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-		XSegment *sp;
-
-		sp = segments;
-		count = nSymbolPts;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int rndx, rndy;
-		    rndx = Round(pp->x), rndy = Round(pp->y);
-		    sp->x1 = pattern[0].x + rndx;
-		    sp->y1 = pattern[0].y + rndy;
-		    sp->x2 = pattern[1].x + rndx;
-		    sp->y2 = pattern[1].y + rndy;
-		    sp++;
-		    sp->x1 = pattern[2].x + rndx;
-		    sp->y1 = pattern[2].y + rndy;
-		    sp->x2 = pattern[3].x + rndx;
-		    sp->y2 = pattern[3].y + rndy;
-		    sp++;
-		}
-	    }
-	    nSegs = count * 2;
-	    /* Always draw skinny symbols regardless of the outline width */
-	    reqSize = MAX_DRAWSEGMENTS(graphPtr->display);
-	    for (i = 0; i < nSegs; i += reqSize) {
-		int chunk;
-
-		chunk = ((i + reqSize) > nSegs) ? (nSegs - i) : reqSize;
-		XDrawSegments(graphPtr->display, drawable, 
-			penPtr->symbol.outlineGC, segments + i, chunk);
-	    }
-	    Blt_Free(segments);
-	}
-	break;
-
-    case SYMBOL_PLUS:
-    case SYMBOL_CROSS:
-	{
-	    XPoint *polygon;
-	    int d;			/* Small delta for cross/plus
-					 * thickness */
-
-	    d = (r2 / 3);
-
-	    /*
-	     *
-	     *          2   3       The plus/cross symbol is a closed polygon
-	     *                      of 12 points. The diagram to the left
-	     *    0,12  1   4    5  represents the positions of the points
-	     *           x,y        which are computed below. The extra
-	     *     11  10   7    6  (thirteenth) point connects the first and
-	     *                      last points.
-	     *          9   8
-	     */
-
-	    pattern[0].x = pattern[11].x = pattern[12].x = -r2;
-	    pattern[2].x = pattern[1].x = pattern[10].x = pattern[9].x = -d;
-	    pattern[3].x = pattern[4].x = pattern[7].x = pattern[8].x = d;
-	    pattern[5].x = pattern[6].x = r2;
-	    pattern[2].y = pattern[3].y = -r2;
-	    pattern[0].y = pattern[1].y = pattern[4].y = pattern[5].y =
-		pattern[12].y = -d;
-	    pattern[11].y = pattern[10].y = pattern[7].y = pattern[6].y = d;
-	    pattern[9].y = pattern[8].y = r2;
-
-	    if (penPtr->symbol.type == SYMBOL_CROSS) {
-		int i;
-
-		/* For the cross symbol, rotate the points by 45 degrees. */
-		for (i = 0; i < 12; i++) {
-		    double dx, dy;
-
-		    dx = (double)pattern[i].x * M_SQRT1_2;
-		    dy = (double)pattern[i].y * M_SQRT1_2;
-		    pattern[i].x = Round(dx - dy);
-		    pattern[i].y = Round(dx + dy);
-		}
-		pattern[12] = pattern[0];
-	    }
-	    polygon = Blt_AssertMalloc(nSymbolPts * 13 * sizeof(XPoint));
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		count = 0;
-		xpp = polygon;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int i;
-			int rndx, rndy;
-
-			rndx = Round(pp->x), rndy = Round(pp->y);
-			for (i = 0; i < 13; i++) {
-			    xpp->x = pattern[i].x + rndx;
-			    xpp->y = pattern[i].y + rndy;
-			    xpp++;
-			}
-			count++;
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		xpp = polygon;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int i;
-		    int rndx, rndy;
-
-		    rndx = Round(pp->x), rndy = Round(pp->y);
-		    for (i = 0; i < 13; i++) {
-			xpp->x = pattern[i].x + rndx;
-			xpp->y = pattern[i].y + rndy;
-			xpp++;
-		    }
-		}
-		count = nSymbolPts;
-	    }
-	    if (penPtr->symbol.fillGC != NULL) {
-		int i;
-		XPoint *xpp;
-
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 13) {
-		    XFillPolygon(graphPtr->display, drawable, 
-			penPtr->symbol.fillGC, xpp, 13, Complex, 
-			CoordModeOrigin);
-		}
-	    }
-	    if (penPtr->symbol.outlineWidth > 0) {
-		int i;
-		XPoint *xpp;
-
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 13) {
-		    XDrawLines(graphPtr->display, drawable, 
-			penPtr->symbol.outlineGC, xpp, 13, CoordModeOrigin);
-		}
-	    }
-	    Blt_Free(polygon);
-	}
-	break;
-
-    case SYMBOL_DIAMOND:
-	{
-	    XPoint *polygon;
-
-	    /*
-	     *
-	     *                      The plus symbol is a closed polygon
-	     *            1         of 4 points. The diagram to the left
-	     *                      represents the positions of the points
-	     *       0,4 x,y  2     which are computed below. The extra
-	     *                      (fifth) point connects the first and
-	     *            3         last points.
-	     *
-	     */
-	    pattern[1].y = pattern[0].x = -r1;
-	    pattern[2].y = pattern[3].x = pattern[0].y = pattern[1].x = 0;
-	    pattern[3].y = pattern[2].x = r1;
-	    pattern[4] = pattern[0];
-
-	    polygon = Blt_AssertMalloc(nSymbolPts * 5 * sizeof(XPoint));
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		xpp = polygon;
-		count = 0;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int i;
-
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int rndx, rndy;
-			
-			rndx = Round(pp->x), rndy = Round(pp->y);
-			for (i = 0; i < 5; i++) {
-			    xpp->x = pattern[i].x + rndx;
-			    xpp->y = pattern[i].y + rndy;
-			    xpp++;
-			}
-			count++;
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		xpp = polygon;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int i;
-		    int rndx, rndy;
-			
-		    rndx = Round(pp->x), rndy = Round(pp->y);
-		    for (i = 0; i < 5; i++) {
-			xpp->x = pattern[i].x + rndx;
-			xpp->y = pattern[i].y + rndy;
-			xpp++;
-		    }
-		}
-		count = nSymbolPts;
-	    }
-	    if (penPtr->symbol.fillGC != NULL) {
-		XPoint *xpp;
-		int i;
-
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 5) {
-		    XFillPolygon(graphPtr->display, drawable, 
-			penPtr->symbol.fillGC, xpp, 5, Convex, CoordModeOrigin);
-
-		}
-	    }
-	    if (penPtr->symbol.outlineWidth > 0) {
-		XPoint *xpp;
-		int i;
-
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 5) {
-		    XDrawLines(graphPtr->display, drawable, 
-		       penPtr->symbol.outlineGC, xpp, 5, CoordModeOrigin);
-		}
-	    }
-	    Blt_Free(polygon);
-	}
-	break;
-
-    case SYMBOL_TRIANGLE:
-    case SYMBOL_ARROW:
-	{
-	    XPoint *polygon;
-	    double b;
-	    int b2, h1, h2;
-#define H_RATIO		1.1663402261671607
-#define B_RATIO		1.3467736870885982
-#define TAN30		0.57735026918962573
-#define COS30		0.86602540378443871
-
-	    b = Round(size * B_RATIO * 0.7);
-	    b2 = Round(b * 0.5);
-	    h2 = Round(TAN30 * b2);
-	    h1 = Round(b2 / COS30);
-	    /*
-	     *
-	     *                      The triangle symbol is a closed polygon
-	     *           0,3         of 3 points. The diagram to the left
-	     *                      represents the positions of the points
-	     *           x,y        which are computed below. The extra
-	     *                      (fourth) point connects the first and
-	     *      2           1   last points.
-	     *
-	     */
-
-	    if (penPtr->symbol.type == SYMBOL_ARROW) {
-		pattern[3].x = pattern[0].x = 0;
-		pattern[3].y = pattern[0].y = h1;
-		pattern[1].x = b2;
-		pattern[2].y = pattern[1].y = -h2;
-		pattern[2].x = -b2;
-	    } else {
-		pattern[3].x = pattern[0].x = 0;
-		pattern[3].y = pattern[0].y = -h1;
-		pattern[1].x = b2;
-		pattern[2].y = pattern[1].y = h2;
-		pattern[2].x = -b2;
-	    }
-	    polygon = Blt_AssertMalloc(nSymbolPts * 4 * sizeof(XPoint));
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		xpp = polygon;
-		count = 0;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int i;
-
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int rndx, rndy;
-
-			rndx = Round(pp->x), rndy = Round(pp->y);
-			for (i = 0; i < 4; i++) {
-			    xpp->x = pattern[i].x + rndx;
-			    xpp->y = pattern[i].y + rndy;
-			    xpp++;
-			}
-			count++;
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-		XPoint *xpp;
-
-		xpp = polygon;
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int i;
-		    int rndx, rndy;
-
-		    rndx = Round(pp->x), rndy = Round(pp->y);
-		    for (i = 0; i < 4; i++) {
-			xpp->x = pattern[i].x + rndx;
-			xpp->y = pattern[i].y + rndy;
-			xpp++;
-		    }
-		}
-		count = nSymbolPts;
-	    }
-	    if (penPtr->symbol.fillGC != NULL) {
-		XPoint *xpp;
-		int i;
-
-		xpp = polygon;
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 4) {
-		    XFillPolygon(graphPtr->display, drawable, 
-			penPtr->symbol.fillGC, xpp, 4, Convex, CoordModeOrigin);
-		}
-	    }
-	    if (penPtr->symbol.outlineWidth > 0) {
-		XPoint *xpp;
-		int i;
-
-		xpp = polygon;
-		for (xpp = polygon, i = 0; i < count; i++, xpp += 4) {
-		    XDrawLines(graphPtr->display, drawable, 
-			penPtr->symbol.outlineGC, xpp, 4, CoordModeOrigin);
-		}
-	    }
-	    Blt_Free(polygon);
-	}
-	break;
-
-    case SYMBOL_IMAGE:
-	{
-	    int w, h;
-	    int dx, dy;
-
-	    Tk_SizeOfImage(penPtr->symbol.image, &w, &h);
-
-	    dx = w / 2;
-	    dy = h / 2;
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int x, y;
-	    
-			x = Round(pp->x) - dx;
-			y = Round(pp->y) - dy;
-			Tk_RedrawImage(penPtr->symbol.image, 0, 0, w, h, 
-				       drawable, x, y);
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int x, y;
-
-		    x = Round(pp->x) - dx;
-		    y = Round(pp->y) - dy;
-		    Tk_RedrawImage(penPtr->symbol.image, 0, 0, w, h, 
-				   drawable, x, y);
-		}
-	    }
-	}
-	break;
-
-    case SYMBOL_BITMAP:
-	{
-	    Pixmap bitmap, mask;
-	    int w, h, bw, bh;
-	    double scale, sx, sy;
-	    int dx, dy;
-
-	    Tk_SizeOfBitmap(graphPtr->display, penPtr->symbol.bitmap, &w, &h);
-	    mask = None;
-
-	    /*
-	     * Compute the size of the scaled bitmap.  Stretch the bitmap to fit
-	     * a nxn bounding box.
-	     */
-	    sx = (double)size / (double)w;
-	    sy = (double)size / (double)h;
-	    scale = MIN(sx, sy);
-	    bw = (int)(w * scale);
-	    bh = (int)(h * scale);
-
-	    XSetClipMask(graphPtr->display, penPtr->symbol.outlineGC, None);
-	    if (penPtr->symbol.mask != None) {
-		mask = Blt_ScaleBitmap(graphPtr->tkwin, penPtr->symbol.mask,
-		    w, h, bw, bh);
-		XSetClipMask(graphPtr->display, penPtr->symbol.outlineGC, mask);
-	    }
-	    bitmap = Blt_ScaleBitmap(graphPtr->tkwin, penPtr->symbol.bitmap,
-		w, h, bw, bh);
-	    if (penPtr->symbol.fillGC == NULL) {
-		XSetClipMask(graphPtr->display, penPtr->symbol.outlineGC, 
-			     bitmap);
-	    }
-	    dx = bw / 2;
-	    dy = bh / 2;
-	    if (elemPtr->symbolInterval > 0) {
-		Point2d *pp, *endp;
-
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    if (DRAW_SYMBOL(elemPtr)) {
-			int x, y;
-	    
-			x = Round(pp->x) - dx;
-			y = Round(pp->y) - dy;
-			if ((penPtr->symbol.fillGC == NULL) || (mask !=None)) {
-			    XSetClipOrigin(graphPtr->display,
-				penPtr->symbol.outlineGC, x, y);
-			}
-			XCopyPlane(graphPtr->display, bitmap, drawable,
-			    penPtr->symbol.outlineGC, 0, 0, bw, bh, x, y, 1);
-		    }
-		    elemPtr->symbolCounter++;
-		}
-	    } else {
-		Point2d *pp, *endp;
-
-		for (pp = symbolPts, endp = pp + nSymbolPts; pp < endp; pp++) {
-		    int x, y;
-
-		    x = Round(pp->x) - dx;
-		    y = Round(pp->y) - dy;
-		    if ((penPtr->symbol.fillGC == NULL) || (mask != None)) {
-			XSetClipOrigin(graphPtr->display, 
-				penPtr->symbol.outlineGC, x, y);
-		    }
-		    XCopyPlane(graphPtr->display, bitmap, drawable,
-			penPtr->symbol.outlineGC, 0, 0, bw, bh, x, y, 1);
-		}
-	    }
-	    Tk_FreePixmap(graphPtr->display, bitmap);
-	    if (mask != None) {
-		Tk_FreePixmap(graphPtr->display, mask);
-	    }
-	}
-	break;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSymbolProc --
- *
- * 	Draw the symbol centered at the each given x,y coordinate.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws a symbol at the coordinate given.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawSymbolProc(
-    Graph *graphPtr,			/* Graph widget record */
-    Drawable drawable,			/* Pixmap or window to draw into */
-    Element *basePtr,			/* Line element information */
-    int x, int y,			/* Center position of symbol */
-    int size)				/* Size of symbol. */
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    LinePen *penPtr;
-
-    penPtr = NORMALPEN(elemPtr);
-    if (penPtr->traceWidth > 0) {
-	/*
-	 * Draw an extra line offset by one pixel from the previous to give a
-	 * thicker appearance.  This is only for the legend entry.  This routine
-	 * is never called for drawing the actual line segments.
-	 */
-	XDrawLine(graphPtr->display, drawable, penPtr->traceGC, x - size, y, 
-		x + size, y);
-	XDrawLine(graphPtr->display, drawable, penPtr->traceGC, x - size, y + 1,
-		x + size, y + 1);
-    }
-    if (penPtr->symbol.type != SYMBOL_NONE) {
-	Point2d point;
-
-	point.x = x, point.y = y;
-	DrawSymbols(graphPtr, drawable, elemPtr, penPtr, size, 1, &point);
-    }
-}
-
-#ifdef WIN32
-
-static void
-DrawTraces(
-    Graph *graphPtr,
-    Drawable drawable,			/* Pixmap or window to draw into */
-    LineElement *elemPtr,
-    LinePen *penPtr)
-{
-    Blt_ChainLink link;
-    HBRUSH brush, oldBrush;
-    HDC dc;
-    HPEN pen, oldPen;
-    POINT *points;
-    TkWinDCState state;
-    int nPoints;
-
-    /*  
-     * Depending if the line is wide (> 1 pixel), arbitrarily break the line in
-     * sections of 100 points.  This bit of weirdness has to do with wide
-     * geometric pens.  The longer the polyline, the slower it draws.  The trade
-     * off is that we lose dash and cap uniformity for unbearably slow polyline
-     * draws.
-     */
-    if (penPtr->traceGC->line_width > 1) {
-	nPoints = 100;
-    } else {
-	nPoints = Blt_MaxRequestSize(graphPtr->display, sizeof(POINT)) - 1;
-    }
-    points = Blt_AssertMalloc((nPoints + 1) * sizeof(POINT));
-
-    dc = TkWinGetDrawableDC(graphPtr->display, drawable, &state);
-
-    pen = Blt_GCToPen(dc, penPtr->traceGC);
-    oldPen = SelectPen(dc, pen);
-    brush = CreateSolidBrush(penPtr->traceGC->foreground);
-    oldBrush = SelectBrush(dc, brush);
-    SetROP2(dc, tkpWinRopModes[penPtr->traceGC->function]);
-
-    for (link = Blt_Chain_FirstLink(elemPtr->traces); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	POINT *p;
-	Trace *tracePtr;
-	int count, remaining;
-
-	tracePtr = Blt_Chain_GetValue(link);
-
-	/*
-	 * If the trace has to be split into separate XDrawLines calls, then the
-	 * end point of the current trace is also the starting point of the new
-	 * split.
-	 */
-
-	/* Step 1. Convert and draw the first section of the trace.
-	 *	   It may contain the entire trace. */
-
-	for (p = points, count = 0; 
-	     count < MIN(nPoints, tracePtr->screenPts.length); 
-	     count++, p++) {
-	    p->x = Round(tracePtr->screenPts.points[count].x);
-	    p->y = Round(tracePtr->screenPts.points[count].y);
-	}
-	Polyline(dc, points, count);
-
-	/* Step 2. Next handle any full-size chunks left. */
-
-	while ((count + nPoints) < tracePtr->screenPts.length) {
-	    int j;
-
-	    /* Start with the last point of the previous trace. */
-	    points[0].x = points[nPoints - 1].x;
-	    points[0].y = points[nPoints - 1].y;
-
-	    for (p = points + 1, j = 0; j < nPoints; j++, count++, p++) {
-		p->x = Round(tracePtr->screenPts.points[count].x);
-		p->y = Round(tracePtr->screenPts.points[count].y);
-	    }
-	    Polyline(dc, points, nPoints + 1);
-	}
-	
-	/* Step 3. Convert and draw the remaining points. */
-
-	remaining = tracePtr->screenPts.length - count;
-	if (remaining > 0) {
-	    /* Start with the last point of the previous trace. */
-	    points[0].x = points[nPoints - 1].x;
-	    points[0].y = points[nPoints - 1].y;
-
-	    for (p = points + 1; count < tracePtr->screenPts.length; 
-		 count++, p++) {
-		p->x = Round(tracePtr->screenPts.points[count].x);
-		p->y = Round(tracePtr->screenPts.points[count].y);
-	    }	    
-	    Polyline(dc, points, remaining + 1);
-	}
-    }
-    Blt_Free(points);
-    DeletePen(SelectPen(dc, oldPen));
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-#else
-
-static void
-DrawTraces(
-    Graph *graphPtr,
-    Drawable drawable,			/* Pixmap or window to draw into */
-    LineElement *elemPtr,
-    LinePen *penPtr)
-{
-    Blt_ChainLink link;
-    XPoint *points;
-    int nPoints;
-
-    nPoints = Blt_MaxRequestSize(graphPtr->display, sizeof(XPoint)) - 1;
-    points = Blt_AssertMalloc((nPoints + 1) * sizeof(XPoint));
-	    
-    for (link = Blt_Chain_FirstLink(elemPtr->traces); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	XPoint *xpp;
-	Trace *tracePtr;
-	int remaining, count;
-	int n;
-
-	tracePtr = Blt_Chain_GetValue(link);
-
-	/*
-	 * If the trace has to be split into separate XDrawLines calls, then the
-	 * end point of the current trace is also the starting point of the new
-	 * split.
-	 */
-	/* Step 1. Convert and draw the first section of the trace.
-	 *	   It may contain the entire trace. */
-
-	n = MIN(nPoints, tracePtr->screenPts.length); 
-	for (xpp = points, count = 0; count < n; count++, xpp++) {
-	    xpp->x = Round(tracePtr->screenPts.points[count].x);
-	    xpp->y = Round(tracePtr->screenPts.points[count].y);
-	}
-	XDrawLines(graphPtr->display, drawable, penPtr->traceGC, points, 
-	   count, CoordModeOrigin);
-
-	/* Step 2. Next handle any full-size chunks left. */
-
-	while ((count + nPoints) < tracePtr->screenPts.length) {
-	    int j;
-
-	    /* Start with the last point of the previous trace. */
-	    points[0].x = points[nPoints - 1].x;
-	    points[0].y = points[nPoints - 1].y;
-	    
-	    for (xpp = points + 1, j = 0; j < nPoints; j++, count++, xpp++) {
-		xpp->x = Round(tracePtr->screenPts.points[count].x);
-		xpp->y = Round(tracePtr->screenPts.points[count].y);
-	    }
-	    XDrawLines(graphPtr->display, drawable, penPtr->traceGC, points, 
-		       nPoints + 1, CoordModeOrigin);
-	}
-	
-	/* Step 3. Convert and draw the remaining points. */
-
-	remaining = tracePtr->screenPts.length - count;
-	if (remaining > 0) {
-	    /* Start with the last point of the previous trace. */
-	    points[0].x = points[nPoints - 1].x;
-	    points[0].y = points[nPoints - 1].y;
-	    for (xpp = points + 1; count < tracePtr->screenPts.length; count++, 
-		     xpp++) {
-		xpp->x = Round(tracePtr->screenPts.points[count].x);
-		xpp->y = Round(tracePtr->screenPts.points[count].y);
-	    }	    
-	    XDrawLines(graphPtr->display, drawable, penPtr->traceGC, points, 
-		remaining + 1, CoordModeOrigin);
-	}
-    }
-    Blt_Free(points);
-}
-#endif /* WIN32 */
-
-static void
-DrawValues(
-    Graph *graphPtr,
-    Drawable drawable,
-    LineElement *elemPtr,
-    LinePen *penPtr,
-    int length,
-    Point2d *points,
-    int *map)
-{
-    Point2d *pp, *endp;
-    double *xval, *yval;
-    const char *fmt;
-    char string[TCL_DOUBLE_SPACE * 2 + 2];
-    int count;
-    
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    count = 0;
-    xval = elemPtr->x.values, yval = elemPtr->y.values;
-    for (pp = points, endp = points + length; pp < endp; pp++) {
-	double x, y;
-
-	x = xval[map[count]];
-	y = yval[map[count]];
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	Blt_DrawText(graphPtr->tkwin, drawable, string, &penPtr->valueStyle, 
-		Round(pp->x), Round(pp->y));
-    } 
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawActiveLine --
- *
- *	Draws the connected line(s) representing the element. If the line is
- *	made up of non-line symbols and the line width parameter has been set
- *	(linewidth > 0), the element will also be drawn as a line (with the
- *	linewidth requested).  The line may consist of separate line segments.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawActiveLineProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    LinePen *penPtr = (LinePen *)elemPtr->activePenPtr;
-    int symbolSize;
-
-    if (penPtr == NULL) {
-	return;
-    }
-    symbolSize = ScaleSymbol(elemPtr, penPtr->symbol.size);
-
-    /* 
-     * nActiveIndices 
-     *	  > 0		Some points are active.  Uses activeArr.
-     *	  < 0		All points are active.
-     *    == 0		No points are active.
-     */
-    if (elemPtr->nActiveIndices > 0) {
-	if (elemPtr->flags & ACTIVE_PENDING) {
-	    MapActiveSymbols(graphPtr, elemPtr);
-	}
-	if (penPtr->symbol.type != SYMBOL_NONE) {
-	    DrawSymbols(graphPtr, drawable, elemPtr, penPtr, symbolSize,
-		elemPtr->activePts.length, elemPtr->activePts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    DrawValues(graphPtr, drawable, elemPtr, penPtr, 
-		elemPtr->activePts.length,
-		elemPtr->activePts.points, 
-		elemPtr->activePts.map);
-	}
-    } else if (elemPtr->nActiveIndices < 0) { 
-	if (penPtr->traceWidth > 0) {
-	    if (elemPtr->lines.length > 0) {
-		Blt_Draw2DSegments(graphPtr->display, drawable, 
-			penPtr->traceGC, elemPtr->lines.segments, 
-			elemPtr->lines.length);
-	    } else if (Blt_Chain_GetLength(elemPtr->traces) > 0) {
-		DrawTraces(graphPtr, drawable, elemPtr, penPtr);
-	    }
-	}
-	if (penPtr->symbol.type != SYMBOL_NONE) {
-	    DrawSymbols(graphPtr, drawable, elemPtr, penPtr, symbolSize,
-		elemPtr->symbolPts.length, elemPtr->symbolPts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    DrawValues(graphPtr, drawable, elemPtr, penPtr, 
-		elemPtr->symbolPts.length, elemPtr->symbolPts.points, 
-		elemPtr->symbolPts.map);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawNormalLine --
- *
- *	Draws the connected line(s) representing the element. If the line is
- *	made up of non-line symbols and the line width parameter has been set
- *	(linewidth > 0), the element will also be drawn as a line (with the
- *	linewidth requested).  The line may consist of separate line segments.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	X drawing commands are output.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawNormalLineProc(Graph *graphPtr, Drawable drawable, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    Blt_ChainLink link;
-    unsigned int count;
-
-    /* Fill area under the curve */
-    if (elemPtr->fillPts != NULL) {
-	XPoint *points;
-	Point2d *endp, *pp;
-
-	points = Blt_AssertMalloc(sizeof(XPoint) * elemPtr->nFillPts);
-	count = 0;
-	for (pp = elemPtr->fillPts, endp = pp + elemPtr->nFillPts; 
-	     pp < endp; pp++) {
-	    points[count].x = Round(pp->x);
-	    points[count].y = Round(pp->y);
-	    count++;
-	}
-	if (elemPtr->fillBg != NULL) {
-	    Blt_SetBackgroundOrigin(graphPtr->tkwin, elemPtr->fillBg, 0, 0);
-	    Blt_FillBackgroundPolygon(graphPtr->tkwin, drawable, 
-		elemPtr->fillBg, points, elemPtr->nFillPts, 0, TK_RELIEF_FLAT);
-	}
-	Blt_Free(points);
-    }
-
-    /* Lines: stripchart segments or graph traces. */
-    if (elemPtr->lines.length > 0) {
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    LinePen *penPtr;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    penPtr = (LinePen *)stylePtr->penPtr;
-	    if ((stylePtr->lines.length > 0) && 
-		(penPtr->errorBarLineWidth > 0)) {
-		Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->traceGC,
-			stylePtr->lines.segments, stylePtr->lines.length);
-	    }
-	}
-    } else {
-	LinePen *penPtr;
-
-	penPtr = NORMALPEN(elemPtr);
-	if ((Blt_Chain_GetLength(elemPtr->traces) > 0) && 
-	    (penPtr->traceWidth > 0)) {
-	    DrawTraces(graphPtr, drawable, elemPtr, penPtr);
-	}
-    }
-
-    if (elemPtr->reqMaxSymbols > 0) {
-	int total;
-
-	total = 0;
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    total += stylePtr->symbolPts.length;
-	}
-	elemPtr->symbolInterval = total / elemPtr->reqMaxSymbols;
-	elemPtr->symbolCounter = 0;
-    }
-
-    /* Symbols, error bars, values. */
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->styles); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	LineStyle *stylePtr;
-	LinePen *penPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = (LinePen *)stylePtr->penPtr;
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		stylePtr->xeb.segments, stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Draw2DSegments(graphPtr->display, drawable, penPtr->errorBarGC, 
-		stylePtr->yeb.segments, stylePtr->yeb.length);
-	}
-	if ((stylePtr->symbolPts.length > 0) && 
-	    (penPtr->symbol.type != SYMBOL_NONE)) {
-	    DrawSymbols(graphPtr, drawable, elemPtr, penPtr, 
-		stylePtr->symbolSize, stylePtr->symbolPts.length, 
-		stylePtr->symbolPts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    DrawValues(graphPtr, drawable, elemPtr, penPtr, 
-		stylePtr->symbolPts.length, stylePtr->symbolPts.points, 
-		elemPtr->symbolPts.map + count);
-	}
-	count += stylePtr->symbolPts.length;
-    }
-    elemPtr->symbolInterval = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetSymbolPostScriptInfo --
- *
- *	Set up the PostScript environment with the macros and attributes needed
- *	to draw the symbols of the element.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetSymbolPostScriptInfo(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    LinePen *penPtr,
-    int size)
-{
-    XColor *outlineColor, *fillColor, *defaultColor;
-
-    /* Set line and foreground attributes */
-    outlineColor = penPtr->symbol.outlineColor;
-    fillColor = penPtr->symbol.fillColor;
-    defaultColor = penPtr->traceColor;
-
-    if (fillColor == COLOR_DEFAULT) {
-	fillColor = defaultColor;
-    }
-    if (outlineColor == COLOR_DEFAULT) {
-	outlineColor = defaultColor;
-    }
-    if (penPtr->symbol.type == SYMBOL_NONE) {
-	Blt_Ps_XSetLineAttributes(ps, defaultColor, penPtr->traceWidth + 2,
-		 &penPtr->traceDashes, CapButt, JoinMiter);
-    } else {
-	Blt_Ps_XSetLineWidth(ps, penPtr->symbol.outlineWidth);
-	Blt_Ps_XSetDashes(ps, (Blt_Dashes *)NULL);
-    }
-
-    /*
-     * Build a PostScript procedure to draw the symbols.  For bitmaps, paint
-     * both the bitmap and its mask. Otherwise fill and stroke the path formed
-     * already.
-     */
-    Blt_Ps_Append(ps, "\n/DrawSymbolProc {\n");
-    switch (penPtr->symbol.type) {
-    case SYMBOL_NONE:
-	break;				/* Do nothing */
-    case SYMBOL_BITMAP:
-	{
-	    int w, h;
-	    double sx, sy, scale;
-
-	    /*
-	     * Compute how much to scale the bitmap.  Don't let the scaled
-	     * bitmap exceed the bounding square for the symbol.
-	     */
-	    Tk_SizeOfBitmap(graphPtr->display, penPtr->symbol.bitmap, &w, &h);
-	    sx = (double)size / (double)w;
-	    sy = (double)size / (double)h;
-	    scale = MIN(sx, sy);
-
-	    if ((penPtr->symbol.mask != None) && (fillColor != NULL)) {
-		Blt_Ps_VarAppend(ps, "\n  % Bitmap mask is \"",
-		    Tk_NameOfBitmap(graphPtr->display, penPtr->symbol.mask),
-		    "\"\n\n  ", (char *)NULL);
-		Blt_Ps_XSetBackground(ps, fillColor);
-		Blt_Ps_DrawBitmap(ps, graphPtr->display, penPtr->symbol.mask, 
-			scale, scale);
-	    }
-	    Blt_Ps_VarAppend(ps, "\n  % Bitmap symbol is \"",
-		Tk_NameOfBitmap(graphPtr->display, penPtr->symbol.bitmap),
-		"\"\n\n  ", (char *)NULL);
-	    Blt_Ps_XSetForeground(ps, outlineColor);
-	    Blt_Ps_DrawBitmap(ps, graphPtr->display, penPtr->symbol.bitmap, 
-		scale, scale);
-	}
-	break;
-    default:
-	if (fillColor != NULL) {
-	    Blt_Ps_Append(ps, "  ");
-	    Blt_Ps_XSetBackground(ps, fillColor);
-	    Blt_Ps_Append(ps, "  gsave fill grestore\n");
-	}
-	if ((outlineColor != NULL) && (penPtr->symbol.outlineWidth > 0)) {
-	    Blt_Ps_Append(ps, "  ");
-	    Blt_Ps_XSetForeground(ps, outlineColor);
-	    Blt_Ps_Append(ps, "  stroke\n");
-	}
-	break;
-    }
-    Blt_Ps_Append(ps, "} def\n\n");
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SymbolsToPostScript --
- *
- * 	Draw a symbol centered at the given x,y window coordinate based upon the
- * 	element symbol type and size.
- *
- * Results:
- *	None.
- *
- * Problems:
- *	Most notable is the round-off errors generated when calculating the
- *	centered position of the symbol.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SymbolsToPostScript(
-    Graph *graphPtr,
-    Blt_Ps ps,
-    LinePen *penPtr,
-    int size,
-    int nSymbolPts,
-    Point2d *symbolPts)
-{
-    double symbolSize;
-    static const char *symbolMacros[] =
-    {
-	"Li", "Sq", "Ci", "Di", "Pl", "Cr", "Sp", "Sc", "Tr", "Ar", "Bm", 
-	(char *)NULL,
-    };
-    GetSymbolPostScriptInfo(graphPtr, ps, penPtr, size);
-
-    symbolSize = (double)size;
-    switch (penPtr->symbol.type) {
-    case SYMBOL_SQUARE:
-    case SYMBOL_CROSS:
-    case SYMBOL_PLUS:
-    case SYMBOL_SCROSS:
-    case SYMBOL_SPLUS:
-	symbolSize = (double)Round(size * S_RATIO);
-	break;
-    case SYMBOL_TRIANGLE:
-    case SYMBOL_ARROW:
-	symbolSize = (double)Round(size * 0.7);
-	break;
-    case SYMBOL_DIAMOND:
-	symbolSize = (double)Round(size * M_SQRT1_2);
-	break;
-
-    default:
-	break;
-    }
-    {
-	Point2d *pp, *endp;
-
-	for (pp = symbolPts, endp = symbolPts + nSymbolPts; pp < endp; pp++) {
-	    Blt_Ps_Format(ps, "%g %g %g %s\n", pp->x, pp->y, 
-		symbolSize, symbolMacros[penPtr->symbol.type]);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SymbolToPostScriptProc --
- *
- * 	Draw the symbol centered at the each given x,y coordinate.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws a symbol at the coordinate given.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SymbolToPostScriptProc(
-    Graph *graphPtr,			/* Graph widget record */
-    Blt_Ps ps,
-    Element *basePtr,			/* Line element information */
-    double x, double y,			/* Center position of symbol */
-    int size)				/* Size of element */
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    LinePen *penPtr;
-
-    penPtr = NORMALPEN(elemPtr);
-    if (penPtr->traceWidth > 0) {
-	/*
-	 * Draw an extra line offset by one pixel from the previous to give a
-	 * thicker appearance.  This is only for the legend entry.  This routine
-	 * is never called for drawing the actual line segments.
-	 */
-	Blt_Ps_XSetLineAttributes(ps, penPtr->traceColor,
-	    penPtr->traceWidth, &penPtr->traceDashes, CapButt, JoinMiter);
-	Blt_Ps_Format(ps, "%g %g %d Li\n", x, y, size + size);
-    }
-    if (penPtr->symbol.type != SYMBOL_NONE) {
-	Point2d point;
-
-	point.x = x, point.y = y;
-	SymbolsToPostScript(graphPtr, ps, penPtr, size, 1, &point);
-    }
-}
-
-static void
-SetLineAttributes(Blt_Ps ps, LinePen *penPtr)
-{
-    /* Set the attributes of the line (color, dashes, linewidth) */
-    Blt_Ps_XSetLineAttributes(ps, penPtr->traceColor,
-	penPtr->traceWidth, &penPtr->traceDashes, CapButt, JoinMiter);
-    if ((LineIsDashed(penPtr->traceDashes)) && 
-	(penPtr->traceOffColor != NULL)) {
-	Blt_Ps_Append(ps, "/DashesProc {\n  gsave\n    ");
-	Blt_Ps_XSetBackground(ps, penPtr->traceOffColor);
-	Blt_Ps_Append(ps, "    ");
-	Blt_Ps_XSetDashes(ps, (Blt_Dashes *)NULL);
-	Blt_Ps_Append(ps, "stroke\n  grestore\n} def\n");
-    } else {
-	Blt_Ps_Append(ps, "/DashesProc {} def\n");
-    }
-}
-
-static void
-TracesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen *penPtr)
-{
-    Blt_ChainLink link;
-
-    SetLineAttributes(ps, penPtr);
-    for (link = Blt_Chain_FirstLink(elemPtr->traces); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Trace *tracePtr;
-
-	tracePtr = Blt_Chain_GetValue(link);
-	if (tracePtr->screenPts.length > 0) {
-	    Blt_Ps_Append(ps, "% start trace\n");
-	    Blt_Ps_DrawPolyline(ps, tracePtr->screenPts.points, 
-		tracePtr->screenPts.length);
-	    Blt_Ps_Append(ps, "% end trace\n");
-	}
-    }
-}
-
-
-static void
-ValuesToPostScript(Blt_Ps ps, LineElement *elemPtr, LinePen *penPtr,
-		   int nSymbolPts, Point2d *symbolPts, int *pointToData)
-{
-    Point2d *pp, *endp;
-    int count;
-    char string[TCL_DOUBLE_SPACE * 2 + 2];
-    const char *fmt;
-    
-    fmt = penPtr->valueFormat;
-    if (fmt == NULL) {
-	fmt = "%g";
-    }
-    count = 0;
-    for (pp = symbolPts, endp = symbolPts + nSymbolPts; pp < endp; pp++) {
-	double x, y;
-
-	x = elemPtr->x.values[pointToData[count]];
-	y = elemPtr->y.values[pointToData[count]];
-	count++;
-	if (penPtr->valueShow == SHOW_X) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x); 
-	} else if (penPtr->valueShow == SHOW_Y) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, y); 
-	} else if (penPtr->valueShow == SHOW_BOTH) {
-	    sprintf_s(string, TCL_DOUBLE_SPACE, fmt, x);
-	    strcat(string, ",");
-	    sprintf_s(string + strlen(string), TCL_DOUBLE_SPACE, fmt, y);
-	}
-	Blt_Ps_DrawText(ps, string, &penPtr->valueStyle, pp->x, pp->y);
-    } 
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActiveLineToPostScript --
- *
- *	Generates PostScript commands to draw as "active" the points (symbols)
- *	and or line segments (trace) representing the element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ActiveLineToPostScriptProc(Graph *graphPtr, Blt_Ps ps, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    LinePen *penPtr = (LinePen *)elemPtr->activePenPtr;
-    int symbolSize;
-
-    if (penPtr == NULL) {
-	return;
-    }
-    symbolSize = ScaleSymbol(elemPtr, penPtr->symbol.size);
-    if (elemPtr->nActiveIndices > 0) {
-	if (elemPtr->flags & ACTIVE_PENDING) {
-	    MapActiveSymbols(graphPtr, elemPtr);
-	}
-	if (penPtr->symbol.type != SYMBOL_NONE) {
-	    SymbolsToPostScript(graphPtr, ps, penPtr, symbolSize,
-		elemPtr->activePts.length, elemPtr->activePts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    ValuesToPostScript(ps, elemPtr, penPtr, elemPtr->activePts.length,
-		       elemPtr->activePts.points, elemPtr->activePts.map);
-	}
-    } else if (elemPtr->nActiveIndices < 0) {
-	if (penPtr->traceWidth > 0) {
-	    if (elemPtr->lines.length > 0) {
-		SetLineAttributes(ps, penPtr);
-		Blt_Ps_Draw2DSegments(ps, elemPtr->lines.segments, 
-			elemPtr->lines.length);
-	    }
-	    if (Blt_Chain_GetLength(elemPtr->traces) > 0) {
-		TracesToPostScript(ps, elemPtr, (LinePen *)penPtr);
-	    }
-	}
-	if (penPtr->symbol.type != SYMBOL_NONE) {
-	    SymbolsToPostScript(graphPtr, ps, penPtr, symbolSize,
-		elemPtr->symbolPts.length, elemPtr->symbolPts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    ValuesToPostScript(ps, elemPtr, penPtr, elemPtr->symbolPts.length, 
-		elemPtr->symbolPts.points, elemPtr->symbolPts.map);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NormalLineToPostScriptProc --
- *
- *	Similar to the DrawLine procedure, prints PostScript related commands to
- *	form the connected line(s) representing the element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript pen width, dashes, and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-NormalLineToPostScriptProc(Graph *graphPtr, Blt_Ps ps, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-    Blt_ChainLink link;
-    unsigned int count;
-
-    /* Draw fill area */
-    if (elemPtr->fillPts != NULL) {
-	/* Create a path to use for both the polygon and its outline. */
-	Blt_Ps_Append(ps, "% start fill area\n");
-	Blt_Ps_Polyline(ps, elemPtr->fillPts, elemPtr->nFillPts);
-
-	/* If the background fill color was specified, draw the polygon in a
-	 * solid fashion with that color.  */
-	if (elemPtr->fillBgColor != NULL) {
-	    Blt_Ps_XSetBackground(ps, elemPtr->fillBgColor);
-	    Blt_Ps_Append(ps, "gsave fill grestore\n");
-	}
-	Blt_Ps_XSetForeground(ps, elemPtr->fillFgColor);
-	if (elemPtr->fillBg != NULL) {
-	    Blt_Ps_Append(ps, "gsave fill grestore\n");
-	    /* TBA: Transparent tiling is the hard part. */
-	} else {
-	    Blt_Ps_Append(ps, "gsave fill grestore\n");
-	}
-	Blt_Ps_Append(ps, "% end fill area\n");
-    }
-
-    /* Draw lines (strip chart) or traces (xy graph) */
-    if (elemPtr->lines.length > 0) {
-	for (link = Blt_Chain_FirstLink(elemPtr->styles); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    LineStyle *stylePtr;
-	    LinePen *penPtr;
-
-	    stylePtr = Blt_Chain_GetValue(link);
-	    penPtr = (LinePen *)stylePtr->penPtr;
-	    if ((stylePtr->lines.length > 0) && (penPtr->traceWidth > 0)) {
-		SetLineAttributes(ps, penPtr);
-		Blt_Ps_Append(ps, "% start segments\n");
-		Blt_Ps_Draw2DSegments(ps, stylePtr->lines.segments, 
-			stylePtr->lines.length);
-		Blt_Ps_Append(ps, "% end segments\n");
-	    }
-	}
-    } else {
-	LinePen *penPtr;
-
-	penPtr = NORMALPEN(elemPtr);
-	if ((Blt_Chain_GetLength(elemPtr->traces) > 0) && 
-	    (penPtr->traceWidth > 0)) {
-	    TracesToPostScript(ps, elemPtr, penPtr);
-	}
-    }
-
-    /* Draw symbols, error bars, values. */
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(elemPtr->styles); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	LineStyle *stylePtr;
-	LinePen *penPtr;
-	XColor *colorPtr;
-
-	stylePtr = Blt_Chain_GetValue(link);
-	penPtr = (LinePen *)stylePtr->penPtr;
-	colorPtr = penPtr->errorBarColor;
-	if (colorPtr == COLOR_DEFAULT) {
-	    colorPtr = penPtr->traceColor;
-	}
-	if ((stylePtr->xeb.length > 0) && (penPtr->errorBarShow & SHOW_X)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, penPtr->errorBarLineWidth, 
-		NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->xeb.segments, 
-		stylePtr->xeb.length);
-	}
-	if ((stylePtr->yeb.length > 0) && (penPtr->errorBarShow & SHOW_Y)) {
-	    Blt_Ps_XSetLineAttributes(ps, colorPtr, penPtr->errorBarLineWidth, 
-		NULL, CapButt, JoinMiter);
-	    Blt_Ps_Draw2DSegments(ps, stylePtr->yeb.segments,
-		stylePtr->yeb.length);
-	}
-	if ((stylePtr->symbolPts.length > 0) &&
-	    (penPtr->symbol.type != SYMBOL_NONE)) {
-	    SymbolsToPostScript(graphPtr, ps, penPtr, stylePtr->symbolSize, 
-		stylePtr->symbolPts.length, stylePtr->symbolPts.points);
-	}
-	if (penPtr->valueShow != SHOW_NONE) {
-	    ValuesToPostScript(ps, elemPtr, penPtr, stylePtr->symbolPts.length, 
-		stylePtr->symbolPts.points, elemPtr->symbolPts.map + count);
-	}
-	count += stylePtr->symbolPts.length;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyLineProc --
- *
- *	Release memory and resources allocated for the line element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the line element is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyLineProc(Graph *graphPtr, Element *basePtr)
-{
-    LineElement *elemPtr = (LineElement *)basePtr;
-
-    DestroyPenProc(graphPtr, (Pen *)&elemPtr->builtinPen);
-    if (elemPtr->activePenPtr != NULL) {
-	Blt_FreePen((Pen *)elemPtr->activePenPtr);
-    }
-    ResetLine(elemPtr);
-    if (elemPtr->styles != NULL) {
-	Blt_FreeStylePalette(elemPtr->styles);
-	Blt_Chain_Destroy(elemPtr->styles);
-    }
-    if (elemPtr->activeIndices != NULL) {
-	Blt_Free(elemPtr->activeIndices);
-    }
-    if (elemPtr->fillPts != NULL) {
-	Blt_Free(elemPtr->fillPts);
-    }
-    if (elemPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, elemPtr->fillGC);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LineElement --
- *
- *	Allocate memory and initialize methods for the new line element.
- *
- * Results:
- *	The pointer to the newly allocated element structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the line element structure.
- *
- *---------------------------------------------------------------------------
- */
-
-static ElementProcs lineProcs =
-{
-    ClosestLineProc,			/* Finds the closest element/data
-					 * point */
-    ConfigureLineProc,			/* Configures the element. */
-    DestroyLineProc,			/* Destroys the element. */
-    DrawActiveLineProc,			/* Draws active element */
-    DrawNormalLineProc,			/* Draws normal element */
-    DrawSymbolProc,			/* Draws the element symbol. */
-    GetLineExtentsProc,			/* Find the extents of the element's
-					 * data. */
-    ActiveLineToPostScriptProc,		/* Prints active element. */
-    NormalLineToPostScriptProc,		/* Prints normal element. */
-    SymbolToPostScriptProc,		/* Prints the line's symbol. */
-    MapLineProc				/* Compute element's screen
-					 * coordinates. */
-};
-
-Element *
-Blt_LineElement(Graph *graphPtr, const char *name, ClassId classId)
-{
-    LineElement *elemPtr;
-
-    elemPtr = Blt_AssertCalloc(1, sizeof(LineElement));
-    elemPtr->procsPtr = &lineProcs;
-    if (classId == CID_ELEM_LINE) {
-	elemPtr->configSpecs = lineElemConfigSpecs;
-    } else {
-	elemPtr->configSpecs = stripElemConfigSpecs;
-    }
-    elemPtr->obj.name = Blt_AssertStrdup(name);
-    Blt_GraphSetObjectClass(&elemPtr->obj, classId);
-    elemPtr->flags = SCALE_SYMBOL;
-    elemPtr->obj.graphPtr = graphPtr;
-    /* By default an element's name and label are the same. */
-    elemPtr->label = Blt_AssertStrdup(name);
-    elemPtr->legendRelief = TK_RELIEF_FLAT;
-    elemPtr->penDir = PEN_BOTH_DIRECTIONS;
-    elemPtr->styles = Blt_Chain_Create();
-    elemPtr->builtinPenPtr = &elemPtr->builtinPen;
-    elemPtr->reqSmooth = PEN_SMOOTH_LINEAR;
-    InitLinePen(elemPtr->builtinPenPtr);
-    bltLineStylesOption.clientData = (ClientData)sizeof(LineStyle);
-    return (Element *)elemPtr;
-}
diff --git a/blt3.0/src/bltGrMarker.c b/blt3.0/src/bltGrMarker.c
deleted file mode 100644
index 1ab727b..0000000
--- a/blt3.0/src/bltGrMarker.c
+++ /dev/null
@@ -1,5229 +0,0 @@
-
-/*
- * bltGrMarker.c --
- *
- * This module implements markers for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltImage.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include "bltChain.h"
-#include "bltGrElem.h"
-#include "bltBitmap.h"
-
-typedef int (GraphMarkerProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-#define GETBITMAP(b) \
-	(((b)->destBitmap == None) ? (b)->srcBitmap : (b)->destBitmap)
-
-#define MAX_OUTLINE_POINTS	12
-
-#define IMAGE_PHOTO		(1<<7)
-
-/* Map graph coordinates to normalized coordinates [0..1] */
-#define NORMALIZE(A,x) 	(((x) - (A)->axisRange.min) / (A)->axisRange.range)
-
-#define DEF_MARKER_ANCHOR	"center"
-#define DEF_MARKER_BACKGROUND	RGB_WHITE
-#define DEF_MARKER_BITMAP	(char *)NULL
-#define DEF_MARKER_CAP_STYLE	"butt"
-#define DEF_MARKER_COORDS	(char *)NULL
-#define DEF_MARKER_DASHES	(char *)NULL
-#define DEF_MARKER_DASH_OFFSET	"0"
-#define DEF_MARKER_ELEMENT	(char *)NULL
-#define DEF_MARKER_FOREGROUND	RGB_BLACK
-#define DEF_MARKER_FILL_COLOR	RGB_RED
-#define DEF_MARKER_FONT		STD_FONT
-#define DEF_MARKER_GAP_COLOR	RGB_PINK
-#define DEF_MARKER_HEIGHT	"0"
-#define DEF_MARKER_HIDE		"no"
-#define DEF_MARKER_JOIN_STYLE	"miter"
-#define DEF_MARKER_JUSTIFY	"left"
-#define DEF_MARKER_LINE_WIDTH	"1"
-#define DEF_MARKER_MAP_X	"x"
-#define DEF_MARKER_MAP_Y	"y"
-#define DEF_MARKER_NAME		(char *)NULL
-#define DEF_MARKER_OUTLINE_COLOR RGB_BLACK
-#define DEF_MARKER_PAD		"4"
-#define DEF_MARKER_ANGLE	"0.0"
-#define DEF_MARKER_SCALE	"1.0"
-#define DEF_MARKER_STATE	"normal"
-#define DEF_MARKER_STIPPLE	(char *)NULL
-#define DEF_MARKER_TEXT		(char *)NULL
-#define DEF_MARKER_UNDER	"no"
-#define DEF_MARKER_WIDTH	"0"
-#define DEF_MARKER_WINDOW	(char *)NULL
-#define DEF_MARKER_XOR		"no"
-#define DEF_MARKER_X_OFFSET	"0"
-#define DEF_MARKER_Y_OFFSET	"0"
-#define DEF_MARKER_FILTER	"box"
-
-#define DEF_TEXT_TAGS		"Text all"
-#define DEF_IMAGE_TAGS		"Image all"
-#define DEF_BITMAP_TAGS		"Bitmap all"
-#define DEF_WINDOW_TAGS		"Window all"
-#define DEF_POLYGON_TAGS	"Polygon all"
-#define DEF_LINE_TAGS		"Line all"
-
-static Blt_OptionParseProc ObjToCoordsProc;
-static Blt_OptionPrintProc CoordsToObjProc;
-static Blt_OptionFreeProc FreeCoordsProc;
-static Blt_CustomOption coordsOption =
-{
-    ObjToCoordsProc, CoordsToObjProc, FreeCoordsProc, (ClientData)0
-};
-static Blt_OptionFreeProc FreeColorPairProc;
-static Blt_OptionParseProc ObjToColorPairProc;
-static Blt_OptionPrintProc ColorPairToObjProc;
-static Blt_CustomOption colorPairOption =
-{
-    ObjToColorPairProc, ColorPairToObjProc, FreeColorPairProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToPictImageProc;
-static Blt_OptionPrintProc PictImageToObjProc;
-static Blt_OptionFreeProc FreePictImageProc;
-static Blt_CustomOption pictImageOption =
-{
-    ObjToPictImageProc, PictImageToObjProc, FreePictImageProc, (ClientData)0
-};
-
-BLT_EXTERN Blt_CustomOption bltXAxisOption;
-BLT_EXTERN Blt_CustomOption bltYAxisOption;
-BLT_EXTERN Blt_CustomOption bltFilterOption;
-
-typedef Marker *(MarkerCreateProc)(void);
-typedef void    (MarkerDrawProc)(Marker *markerPtr, Drawable drawable);
-typedef void    (MarkerFreeProc)(Marker *markerPtr);
-typedef int     (MarkerConfigProc)(Marker *markerPtr);
-typedef void    (MarkerMapProc)(Marker *markerPtr);
-typedef void    (MarkerPostscriptProc)(Marker *markerPtr, Blt_Ps ps);
-typedef int     (MarkerPointProc)(Marker *markerPtr, Point2d *samplePtr);
-typedef int     (MarkerRegionProc)(Marker *markerPtr, Region2d *extsPtr, 
-				   int enclosed);
-
-static Tcl_FreeProc FreeMarker;
-
-typedef struct {
-    Blt_ConfigSpec *configSpecs;	/* Marker configuration
-					 * specifications */
-    MarkerConfigProc *configProc;
-    MarkerDrawProc *drawProc;
-    MarkerFreeProc *freeProc;
-    MarkerMapProc *mapProc;
-    MarkerPointProc *pointProc;
-    MarkerRegionProc *regionProc;
-    MarkerPostscriptProc *postscriptProc;
-
-}  MarkerClass;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Marker --
- *
- *	Structure defining the generic marker.  In C++ parlance this would be
- *	the base class from which all markers are derived.
- *
- *	This structure corresponds with the specific types of markers.  Don't
- *	change this structure without changing the individual marker
- *	structures of each type below.
- *
- * -------------------------------------------------------------------------- 
- */
-struct _Marker {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-    Point2d *worldPts;		        /* Coordinate array to position
-					 * marker */
-    int nWorldPts;			/* Number of points in above array */
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-};
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker. */
-    int nWorldPts;			/* # of points in above array. */
-
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-
-    /* Fields specific to bitmap markers. */
-
-    Pixmap srcBitmap;			/* Original bitmap. May be further
-					 * scaled or rotated. */
-    float reqAngle;			/* Requested rotation of the bitmap */
-    float angle;			/* Normalized rotation (0..360
-					 * degrees) */
-    Tk_Anchor anchor;			/* If only one X-Y coordinate is given,
-					* indicates how to translate the given
-					* marker position.  Otherwise, if there
-					* are two X-Y coordinates, then this
-					* value is ignored. */
-    Point2d anchorPt;			/* Translated anchor point. */
-
-    XColor *outlineColor;		/* Foreground color */
-    XColor *fillColor;			/* Background color */
-
-    GC gc;				/* Private graphic context */
-    GC fillGC;				/* Shared graphic context */
-    Pixmap destBitmap;			/* Bitmap to be drawn. */
-    int destWidth, destHeight;		/* Dimensions of the final bitmap */
-
-    Point2d outline[MAX_OUTLINE_POINTS];/* Polygon representing the background
-					 * of the bitmap. */
-    int nOutlinePts;
-} BitmapMarker;
-
-static Blt_ConfigSpec bitmapConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, 
-	Blt_Offset(BitmapMarker, anchor), 0},
-    {BLT_CONFIG_COLOR, "-background", "background", "Background",
-	DEF_MARKER_BACKGROUND, Blt_Offset(BitmapMarker, fillColor),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_BITMAP_TAGS, 
-	Blt_Offset(BitmapMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_MARKER_BITMAP, 
-	Blt_Offset(BitmapMarker, srcBitmap), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(BitmapMarker, worldPts), BLT_CONFIG_NULL_OK, 
-	&coordsOption},
-    {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, 
-	Blt_Offset(BitmapMarker, elemName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_MARKER_FOREGROUND, Blt_Offset(BitmapMarker, outlineColor),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, 
-	Blt_Offset(BitmapMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(BitmapMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(BitmapMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(BitmapMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FLOAT, "-rotate", "rotate", "Rotate", DEF_MARKER_ANGLE, 
-	Blt_Offset(BitmapMarker, reqAngle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(BitmapMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(BitmapMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(BitmapMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-	Blt_Offset(BitmapMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigureBitmapProc;
-static MarkerCreateProc CreateBitmapProc;
-static MarkerDrawProc DrawBitmapProc;
-static MarkerFreeProc FreeBitmapProc;
-static MarkerMapProc MapBitmapProc;
-static MarkerPointProc PointInBitmapProc;
-static MarkerPostscriptProc BitmapToPostscriptProc;
-static MarkerRegionProc RegionInBitmapProc;
-
-static MarkerClass bitmapMarkerClass = {
-    bitmapConfigSpecs,
-    ConfigureBitmapProc,
-    DrawBitmapProc,
-    FreeBitmapProc,
-    MapBitmapProc,
-    PointInBitmapProc,
-    RegionInBitmapProc,
-    BitmapToPostscriptProc,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker. */
-
-    int nWorldPts;			/* # of points in above array. */
-
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-
-    Tk_Image tkImage;			/* Tk image to be displayed. */
-    Tk_Anchor anchor;			/* Indicates how to translate the given
-					 * marker position. */
-    Point2d anchorPt;			/* Translated anchor point. */
-    int width, height;			/* Dimensions of the possibly scaled
-					 * image. */
-    Blt_Painter painter;
-    Blt_Picture picture;
-    Blt_ResampleFilter filter;
-    int pictX, pictY;			/*  */
-    Blt_Picture scaled;			/* Pixmap containing the scaled image */
-    GC gc;
-
-} ImageMarker;
-
-static Blt_ConfigSpec imageConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, 
-	Blt_Offset(ImageMarker, anchor), 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_IMAGE_TAGS, 
-	Blt_Offset(ImageMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(ImageMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption},
-    {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, 
-	Blt_Offset(ImageMarker, elemName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE,	
-	Blt_Offset(ImageMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", (char *)NULL, 
-	Blt_Offset(ImageMarker, picture), BLT_CONFIG_NULL_OK, &pictImageOption},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(ImageMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(ImageMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(ImageMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-resamplefilter", "resampleFilter", "ResampleFilter", 
-        DEF_MARKER_FILTER, Blt_Offset(ImageMarker, filter), 
-	BLT_CONFIG_NULL_OK | BLT_CONFIG_DONT_SET_DEFAULT, &bltFilterOption},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(ImageMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(ImageMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(ImageMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-        Blt_Offset(ImageMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigureImageProc;
-static MarkerCreateProc CreateImageProc;
-static MarkerDrawProc DrawImageProc;
-static MarkerFreeProc FreeImageProc;
-static MarkerMapProc MapImageProc;
-static MarkerPointProc PointInImageProc;
-static MarkerPostscriptProc ImageToPostscriptProc;
-static MarkerRegionProc RegionInImageProc;
-
-static MarkerClass imageMarkerClass = {
-    imageConfigSpecs,
-    ConfigureImageProc,
-    DrawImageProc,
-    FreeImageProc,
-    MapImageProc,
-    PointInImageProc,
-    RegionInImageProc,
-    ImageToPostscriptProc,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * LineMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker. */
-
-    int nWorldPts;			/* Number of points in above array */
-
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-
-    XColor *fillColor;
-    XColor *outlineColor;		/* Foreground and background colors */
-
-    int lineWidth;			/* Line width. */
-    int capStyle;			/* Cap style. */
-    int joinStyle;			/* Join style.*/
-    Blt_Dashes dashes;			/* Dash list values (max 11) */
-
-    GC gc;				/* Private graphic context */
-
-    Segment2d *segments;		/* Malloc'ed array of points.
-					 * Represents individual line segments
-					 * (2 points per segment) comprising the
-					 * mapped line.  The segments may not
-					 * necessarily be connected after
-					 * clipping. */
-    int nSegments;			/* # segments in the above array. */
-    int xor;
-    int xorState;			/* State of the XOR drawing. Indicates
-					 * if the marker is currently drawn. */
-} LineMarker;
-
-static Blt_ConfigSpec lineConfigSpecs[] =
-{
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_LINE_TAGS, 
-	Blt_Offset(LineMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CAP_STYLE, "-cap", "cap", "Cap", DEF_MARKER_CAP_STYLE, 
-	Blt_Offset(LineMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(LineMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_MARKER_DASHES, 
-	Blt_Offset(LineMarker, dashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-dashoffset", "dashOffset", "DashOffset",
-	DEF_MARKER_DASH_OFFSET, Blt_Offset(LineMarker, dashes.offset),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, 
-	Blt_Offset(LineMarker, elemName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-fill", "fill", "Fill", (char *)NULL, 
-	Blt_Offset(LineMarker, fillColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_JOIN_STYLE, "-join", "join", "Join", DEF_MARKER_JOIN_STYLE, 
-     Blt_Offset(LineMarker, joinStyle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-	DEF_MARKER_LINE_WIDTH, Blt_Offset(LineMarker, lineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, 
-	Blt_Offset(LineMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(LineMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(LineMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(LineMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-outline", "outline", "Outline",
-	DEF_MARKER_OUTLINE_COLOR, Blt_Offset(LineMarker, outlineColor),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(LineMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(LineMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(LineMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-xor", "xor", "Xor", DEF_MARKER_XOR, 
-	Blt_Offset(LineMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-	Blt_Offset(LineMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigureLineProc;
-static MarkerCreateProc CreateLineProc;
-static MarkerDrawProc DrawLineProc;
-static MarkerFreeProc FreeLineProc;
-static MarkerMapProc MapLineProc;
-static MarkerPointProc PointInLineProc;
-static MarkerPostscriptProc LineToPostscriptProc;
-static MarkerRegionProc RegionInLineProc;
-
-static MarkerClass lineMarkerClass = {
-    lineConfigSpecs,
-    ConfigureLineProc,
-    DrawLineProc,
-    FreeLineProc,
-    MapLineProc,
-    PointInLineProc,
-    RegionInLineProc,
-    LineToPostscriptProc,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * PolygonMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker. */
-
-    int nWorldPts;			/* Number of points in above array */
-
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-
-    Point2d *screenPts;			/* Array of points representing the
-					 * polygon in screen coordinates. It's
-					 * not used for drawing, but to generate
-					 * the outlinePts and fillPts arrays
-					 * that are the coordinates of the
-					 * possibly clipped outline and filled
-					 * polygon. */
-
-    ColorPair outline;
-    ColorPair fill;
-
-    Pixmap stipple;			/* Stipple pattern to fill the
-					 * polygon. */
-    int lineWidth;			/* Width of polygon outline. */
-    int capStyle;
-    int joinStyle;
-    Blt_Dashes dashes;			/* List of dash values.  Indicates how
-					 * to draw the dashed line.  If no dash
-					 * values are provided, or the first
-					 * value is zero, then the line is drawn
-					 * solid. */
-
-    GC outlineGC;			/* Graphics context to draw the outline
-					 * of the polygon. */
-    GC fillGC;				/* Graphics context to draw the filled
-					 * polygon. */
-
-    Point2d *fillPts;			/* Malloc'ed array of points used to
-					 * draw the filled polygon. These points
-					 * may form a degenerate polygon after
-					 * clipping. */
-    int nFillPts;			/* # points in the above array. */
-    Segment2d *outlinePts;		/* Malloc'ed array of points.
-					 * Represents individual line segments
-					 * (2 points per segment) comprising the
-					 * outline of the polygon.  The segments
-					 * may not necessarily be closed or
-					 * connected after clipping. */
-    int nOutlinePts;			/* # points in the above array. */
-    int xor;
-    int xorState;			/* State of the XOR drawing. Indicates
-					 * if the marker is visible. We have to
-					 * drawn it again to erase it. */
-} PolygonMarker;
-
-static Blt_ConfigSpec polygonConfigSpecs[] =
-{
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_POLYGON_TAGS, 
-	Blt_Offset(PolygonMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CAP_STYLE, "-cap", "cap", "Cap", DEF_MARKER_CAP_STYLE, 
-	Blt_Offset(PolygonMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(PolygonMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_MARKER_DASHES, 
-	Blt_Offset(PolygonMarker, dashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, 
-	Blt_Offset(PolygonMarker, elemName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_MARKER_FILL_COLOR, 
-	Blt_Offset(PolygonMarker, fill), BLT_CONFIG_NULL_OK, &colorPairOption},
-    {BLT_CONFIG_JOIN_STYLE, "-join", "join", "Join", DEF_MARKER_JOIN_STYLE, 
-	Blt_Offset(PolygonMarker, joinStyle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-	DEF_MARKER_LINE_WIDTH, Blt_Offset(PolygonMarker, lineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, 
-	Blt_Offset(PolygonMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(PolygonMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(PolygonMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(PolygonMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline", 
-	DEF_MARKER_OUTLINE_COLOR, Blt_Offset(PolygonMarker, outline),
-	BLT_CONFIG_NULL_OK, &colorPairOption},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(PolygonMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_MARKER_STIPPLE, 
-	Blt_Offset(PolygonMarker, stipple), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(PolygonMarker, drawUnder), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(PolygonMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-xor", "xor", "Xor", DEF_MARKER_XOR, 
-	Blt_Offset(PolygonMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-	Blt_Offset(PolygonMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigurePolygonProc;
-static MarkerCreateProc CreatePolygonProc;
-static MarkerDrawProc DrawPolygonProc;
-static MarkerFreeProc FreePolygonProc;
-static MarkerMapProc MapPolygonProc;
-static MarkerPointProc PointInPolygonProc;
-static MarkerPostscriptProc PolygonToPostscriptProc;
-static MarkerRegionProc RegionInPolygonProc;
-
-static MarkerClass polygonMarkerClass = {
-    polygonConfigSpecs,
-    ConfigurePolygonProc,
-    DrawPolygonProc,
-    FreePolygonProc,
-    MapPolygonProc,
-    PointInPolygonProc,
-    RegionInPolygonProc,
-    PolygonToPostscriptProc,
-};
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-    MarkerClass *classPtr;
-    Blt_HashEntry *hashPtr;
-    Blt_ChainLink link;
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker. */
-    int nWorldPts;			/* # of points in above array */
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-    int state;
-
-    /* Fields specific to text markers. */
-#ifdef notdef
-    const char *textVarName;		/* Name of variable (malloc'ed) or
-					 * NULL. If non-NULL, graph displays the
-					 * contents of this variable. */
-#endif
-    const char *string;			/* Text string to be display.  The
-					 * string make contain newlines. */
-    Tk_Anchor anchor;			/* Indicates how to translate the given
-					 * marker position. */
-    Point2d anchorPt;			/* Translated anchor point. */
-    int width, height;			/* Dimension of bounding box. */
-    TextStyle style;			/* Text attributes (font, fg, anchor,
-					 * etc) */
-    TextLayout *textPtr;		/* Contains information about the layout
-					 * of the text. */
-    Point2d outline[5];
-    XColor *fillColor;
-    GC fillGC;
-} TextMarker;
-
-
-static Blt_ConfigSpec textConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, 
-	Blt_Offset(TextMarker, anchor), 0},
-    {BLT_CONFIG_COLOR, "-background", "background", "MarkerBackground",
-	(char *)NULL, Blt_Offset(TextMarker, fillColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", "Background", (char *)NULL, 0, 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_TEXT_TAGS,
-	Blt_Offset(TextMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(TextMarker, worldPts), BLT_CONFIG_NULL_OK, 
-        &coordsOption},
-    {BLT_CONFIG_STRING, "-element", "element", "Element",
-	DEF_MARKER_ELEMENT, Blt_Offset(TextMarker, elemName), 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", "Foreground", (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", 	DEF_MARKER_FONT, 
-	Blt_Offset(TextMarker, style.font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_MARKER_FOREGROUND, Blt_Offset(TextMarker, style.color), 0},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify",
-	DEF_MARKER_JUSTIFY, Blt_Offset(TextMarker, style.justify),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, 
-	Blt_Offset(TextMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(TextMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(TextMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(TextMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_PAD, "-padx", "padX", "PadX", DEF_MARKER_PAD, 
-	Blt_Offset(TextMarker, style.xPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", "padY", "PadY", DEF_MARKER_PAD, 
-	Blt_Offset(TextMarker, style.yPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-rotate", "rotate", "Rotate", DEF_MARKER_ANGLE, 
-	Blt_Offset(TextMarker, style.angle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(TextMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-text", "text", "Text", DEF_MARKER_TEXT, 
-	Blt_Offset(TextMarker, string), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(TextMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(TextMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-	Blt_Offset(TextMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigureTextProc;
-static MarkerCreateProc CreateTextProc;
-static MarkerDrawProc DrawTextProc;
-static MarkerFreeProc FreeTextProc;
-static MarkerMapProc MapTextProc;
-static MarkerPointProc PointInTextProc;
-static MarkerPostscriptProc TextToPostscriptProc;
-static MarkerRegionProc RegionInTextProc;
-
-static MarkerClass textMarkerClass = {
-    textConfigSpecs,
-    ConfigureTextProc,
-    DrawTextProc,
-    FreeTextProc,
-    MapTextProc,
-    PointInTextProc,
-    RegionInTextProc,
-    TextToPostscriptProc,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowMarker --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    GraphObj obj;			/* Must be first field in marker. */
-
-    MarkerClass *classPtr;
-
-    Blt_HashEntry *hashPtr;
-
-    Blt_ChainLink link;
-
-    const char *elemName;		/* Element associated with marker. Let's
-					 * you link a marker to an element. The
-					 * marker is drawn only if the element
-					 * is also visible. */
-    Axis2d axes;
-
-    Point2d *worldPts;			/* Coordinate array to position
-					 * marker */
-
-    int nWorldPts;			/* # of points in above array */
-
-    int drawUnder;			/* If non-zero, draw the marker
-					 * underneath any elements. This can be
-					 * a performance penalty because the
-					 * graph must be redraw entirely each
-					 * time the marker is redrawn. */
-
-    int clipped;			/* Indicates if the marker is totally
-					 * clipped by the plotting area. */
-
-    unsigned int flags;		
-
-
-    int xOffset, yOffset;		/* Pixel offset from graph position */
-
-    int state;
-
-    /* Fields specific to window markers. */
-
-    const char *childName;		/* Name of child widget. */
-    Tk_Window child;			/* Window to display. */
-    int reqWidth, reqHeight;		/* If non-zero, this overrides the size
-					 * requested by the child widget. */
-
-    Tk_Anchor anchor;			/* Indicates how to translate the given
-					 * marker position. */
-
-    Point2d anchorPt;			/* Translated anchor point. */
-    int width, height;			/* Current size of the child window. */
-
-} WindowMarker;
-
-static Blt_ConfigSpec windowConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, 
-	Blt_Offset(WindowMarker, anchor), 0},
-    {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_WINDOW_TAGS, 
-	Blt_Offset(WindowMarker, obj.tags), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, 
-	Blt_Offset(WindowMarker, worldPts), BLT_CONFIG_NULL_OK, 
-	&coordsOption},
-    {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, 
-	Blt_Offset(WindowMarker, elemName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-height", "height", "Height", DEF_MARKER_HEIGHT, 
-	Blt_Offset(WindowMarker, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, 
-        Blt_Offset(WindowMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)HIDE},
-    {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, 
-	Blt_Offset(WindowMarker, axes.x), 0, &bltXAxisOption},
-    {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, 
-	Blt_Offset(WindowMarker, axes.y), 0, &bltYAxisOption},
-    {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, 
-	Blt_Offset(WindowMarker, obj.name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MARKER_STATE, 
-	Blt_Offset(WindowMarker, state), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, 
-	Blt_Offset(WindowMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_POS, "-width", "width", "Width", DEF_MARKER_WIDTH, 
-	Blt_Offset(WindowMarker, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-window", "window", "Window", DEF_MARKER_WINDOW, 
-	Blt_Offset(WindowMarker, childName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, 
-	Blt_Offset(WindowMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, 
-	Blt_Offset(WindowMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static MarkerConfigProc ConfigureWindowProc;
-static MarkerCreateProc CreateWindowProc;
-static MarkerDrawProc DrawWindowProc;
-static MarkerFreeProc FreeWindowProc;
-static MarkerMapProc MapWindowProc;
-static MarkerPointProc PointInWindowProc;
-static MarkerPostscriptProc WindowToPostscriptProc;
-static MarkerRegionProc RegionInWindowProc;
-
-static MarkerClass windowMarkerClass = {
-    windowConfigSpecs,
-    ConfigureWindowProc,
-    DrawWindowProc,
-    FreeWindowProc,
-    MapWindowProc,
-    PointInWindowProc,
-    RegionInWindowProc,
-    WindowToPostscriptProc,
-};
-
-static Tk_ImageChangedProc ImageChangedProc;
-
-
-
-#ifdef notdef
-static MarkerClass rectangleMarkerClass = {
-    rectangleConfigSpecs,
-    ConfigureRectangleProc,
-    DrawRectangleProc,
-    FreeRectangleProc,
-    MapRectangleProc,
-    PointInRectangleProc,
-    RegionInRectangleProc,
-    RectangleToPostscriptProc,
-};
-
-static MarkerClass ovalMarkerClass = {
-    ovalConfigSpecs,
-    ConfigureOvalProc,
-    DrawOvalProc,
-    FreeOvalProc,
-    MapOvalProc,
-    PointInOvalProc,
-    RegionInOvalProc,
-    OvalToPostscriptProc,
-};
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * BoxesDontOverlap --
- *
- *	Tests if the bounding box of a marker overlaps the plotting area in
- *	any way.  If so, the marker will be drawn.  Just do a min/max test on
- *	the extents of both boxes.
- *
- *	Note: It's assumed that the extents of the bounding box lie 
- *	      within the area.  So for a 10x10 rectangle, bottom and
- *	      left would be 9.
- *
- * Results:
- *	Returns 0 is the marker is visible in the plotting area, and 1
- *	otherwise (marker is clipped).
- *
- *---------------------------------------------------------------------------
- */
-static int
-BoxesDontOverlap(Graph *graphPtr, Region2d *extsPtr)
-{
-    assert(extsPtr->right >= extsPtr->left);
-    assert(extsPtr->bottom >= extsPtr->top);
-    assert(graphPtr->right >= graphPtr->left);
-    assert(graphPtr->bottom >= graphPtr->top);
-
-    return (((double)graphPtr->right < extsPtr->left) ||
-	    ((double)graphPtr->bottom < extsPtr->top) ||
-	    (extsPtr->right < (double)graphPtr->left) ||
-	    (extsPtr->bottom < (double)graphPtr->top));
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetCoordinate --
- *
- * 	Convert the expression string into a floating point value. The * only
- * 	reason we use this routine instead of Blt_ExprDouble is to * handle
- * 	"elastic" bounds.  That is, convert the strings "-Inf", * "Inf" into
- * 	-(DBL_MAX) and DBL_MAX respectively.
- *
- * Results:
- *	The return value is a standard TCL result.  The value of the
- * 	expression is passed back via valuePtr.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetCoordinate(
-    Tcl_Interp *interp,			/* Interpreter to return results */
-    Tcl_Obj *objPtr,			/* Numeric expression string to
-					 * parse */
-    double *valuePtr)			/* Real-valued result of expression */
-{
-    char c;
-    const char *expr;
-    
-    expr = Tcl_GetString(objPtr);
-    c = expr[0];
-    if ((c == 'I') && (strcmp(expr, "Inf") == 0)) {
-	*valuePtr = DBL_MAX;		/* Elastic upper bound */
-    } else if ((c == '-') && (expr[1] == 'I') && (strcmp(expr, "-Inf") == 0)) {
-	*valuePtr = -DBL_MAX;		/* Elastic lower bound */
-    } else if ((c == '+') && (expr[1] == 'I') && (strcmp(expr, "+Inf") == 0)) {
-	*valuePtr = DBL_MAX;		/* Elastic upper bound */
-    } else if (Blt_ExprDoubleFromObj(interp, objPtr, valuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrintCoordinate --
- *
- * 	Convert the floating point value into its string representation.  The
- * 	only reason this routine is used in instead of sprintf, is to handle
- * 	the "elastic" bounds.  That is, convert the values DBL_MAX and
- * 	-(DBL_MAX) into "+Inf" and "-Inf" respectively.
- *
- * Results:
- *	The return value is a standard TCL result.  The string of the *
- *	expression is passed back via string.
- *
- * -------------------------------------------------------------------------- */
-static Tcl_Obj *
-PrintCoordinate(double x)
-{
-    if (x == DBL_MAX) {
-	return Tcl_NewStringObj("+Inf", -1);
-    } else if (x == -DBL_MAX) {
-	return Tcl_NewStringObj("-Inf", -1);
-    } else {
-	return Tcl_NewDoubleObj(x);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseCoordinates --
- *
- *	The TCL coordinate list is converted to their floating point
- *	values. It will then replace the current marker coordinates.
- *
- *	Since different marker types require different number of coordinates
- *	this must be checked here.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side effects:
- *	If the marker coordinates are reset, the graph is eventually redrawn
- *	with at the new marker coordinates.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseCoordinates(
-    Tcl_Interp *interp,
-    Marker *markerPtr,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int nWorldPts;
-    int minArgs, maxArgs;
-    Point2d *worldPts;
-    int i;
-
-    if (objc == 0) {
-	return TCL_OK;
-    }
-    if (objc & 1) {
-	Tcl_AppendResult(interp, "odd number of marker coordinates specified",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    switch (markerPtr->obj.classId) {
-    case CID_MARKER_LINE:
-	minArgs = 4, maxArgs = 0;
-	break;
-    case CID_MARKER_POLYGON:
-	minArgs = 6, maxArgs = 0;
-	break;
-    case CID_MARKER_WINDOW:
-    case CID_MARKER_TEXT:
-	minArgs = 2, maxArgs = 2;
-	break;
-    case CID_MARKER_IMAGE:
-    case CID_MARKER_BITMAP:
-	minArgs = 2, maxArgs = 4;
-	break;
-    default:
-	Tcl_AppendResult(interp, "unknown marker type", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    if (objc < minArgs) {
-	Tcl_AppendResult(interp, "too few marker coordinates specified",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((maxArgs > 0) && (objc > maxArgs)) {
-	Tcl_AppendResult(interp, "too many marker coordinates specified",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    nWorldPts = objc / 2;
-    worldPts = Blt_Malloc(nWorldPts * sizeof(Point2d));
-    if (worldPts == NULL) {
-	Tcl_AppendResult(interp, "can't allocate new coordinate array",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    {
-	Point2d *pp;
-
-	pp = worldPts;
-	for (i = 0; i < objc; i += 2) {
-	    double x, y;
-	    
-	    if ((GetCoordinate(interp, objv[i], &x) != TCL_OK) ||
-		(GetCoordinate(interp, objv[i + 1], &y) != TCL_OK)) {
-		Blt_Free(worldPts);
-		return TCL_ERROR;
-	    }
-	    pp->x = x, pp->y = y, pp++;
-	}
-    }
-    /* Don't free the old coordinate array until we've parsed the new
-     * coordinates without errors.  */
-    if (markerPtr->worldPts != NULL) {
-	Blt_Free(markerPtr->worldPts);
-    }
-    markerPtr->worldPts = worldPts;
-    markerPtr->nWorldPts = nWorldPts;
-    markerPtr->flags |= MAP_ITEM;
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static void
-FreeCoordsProc(
-    ClientData clientData,		/* Not used. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Marker *markerPtr = (Marker *)widgRec;
-    Point2d **pointsPtr = (Point2d **)(widgRec + offset);
-
-    if (*pointsPtr != NULL) {
-	Blt_Free(*pointsPtr);
-	*pointsPtr = NULL;
-    }
-    markerPtr->nWorldPts = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToCoordsProc --
- *
- *	Given a TCL list of numeric expression representing the element
- *	values, convert into an array of floating point values. In addition,
- *	the minimum and maximum values are saved.  Since elastic values are
- *	allow (values which translate to the min/max of the graph), we must
- *	try to get the non-elastic minimum and maximum.
- *
- * Results:
- *	The return value is a standard TCL result.  The vector is
- *	passed back via the vecPtr.
- *
- * -------------------------------------------------------------------------- 
- */
-/*ARGSUSED*/
-static int
-ObjToCoordsProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to return results */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* TCL list of numeric expressions */
-    char *widgRec,		/* Marker record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    Marker *markerPtr = (Marker *)widgRec;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	return TCL_OK;
-    }
-    return ParseCoordinates(interp, markerPtr, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CoordsToObjProc --
- *
- *	Convert the vector of floating point values into a TCL list.
- *
- * Results:
- *	The string representation of the vector is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-CoordsToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Marker record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    Marker *markerPtr = (Marker *)widgRec;
-    Tcl_Obj *listObjPtr;
-    Point2d *pp, *pend;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (pp = markerPtr->worldPts, pend = pp + markerPtr->nWorldPts; pp < pend;
-	 pp++) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, PrintCoordinate(pp->x));
-	Tcl_ListObjAppendElement(interp, listObjPtr, PrintCoordinate(pp->y));
-    }
-    return listObjPtr;
-}
-
-/*LINTLIBRARY*/
-static int
-GetColorPair(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    Tcl_Obj *fgObjPtr, Tcl_Obj *bgObjPtr,
-    ColorPair *pairPtr,
-    int allowDefault)
-{
-    XColor *fgColor, *bgColor;
-    const char *string;
-
-    fgColor = bgColor = NULL;
-    if (fgObjPtr != NULL) {
-	int length;
-
-	string = Tcl_GetStringFromObj(fgObjPtr, &length);
-	if (string[0] == '\0') {
-	    fgColor = NULL;
-	} else if ((allowDefault) && (string[0] == 'd') &&
-		   (strncmp(string, "defcolor", length) == 0)) {
-	    fgColor = COLOR_DEFAULT;
-	} else {
-	    fgColor = Tk_AllocColorFromObj(interp, tkwin, fgObjPtr);
-	    if (fgColor == NULL) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if (bgObjPtr != NULL) {
-	int length;
-
-	string = Tcl_GetStringFromObj(bgObjPtr, &length);
-	if (string[0] == '\0') {
-	    bgColor = NULL;
-	} else if ((allowDefault) && (string[0] == 'd') &&
-		   (strncmp(string, "defcolor", length) == 0)) {
-	    bgColor = COLOR_DEFAULT;
-	} else {
-	    bgColor = Tk_AllocColorFromObj(interp, tkwin, bgObjPtr);
-	    if (bgColor == NULL) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if (pairPtr->fgColor != NULL) {
-	Tk_FreeColor(pairPtr->fgColor);
-    }
-    if (pairPtr->bgColor != NULL) {
-	Tk_FreeColor(pairPtr->bgColor);
-    }
-    pairPtr->fgColor = fgColor;
-    pairPtr->bgColor = bgColor;
-    return TCL_OK;
-}
-
-void
-Blt_FreeColorPair(ColorPair *pairPtr)
-{
-    if ((pairPtr->bgColor != NULL) && (pairPtr->bgColor != COLOR_DEFAULT)) {
-	Tk_FreeColor(pairPtr->bgColor);
-    }
-    if ((pairPtr->fgColor != NULL) && (pairPtr->fgColor != COLOR_DEFAULT)) {
-	Tk_FreeColor(pairPtr->fgColor);
-    }
-    pairPtr->bgColor = pairPtr->fgColor = NULL;
-}
-
-static void
-FreeColorPairProc(
-    ClientData clientData,		/* Not used. */
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    ColorPair *pairPtr = (ColorPair *)(widgRec + offset);
-
-    Blt_FreeColorPair(pairPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToColorPairProc --
- *
- *	Convert the color names into pair of XColor pointers.
- *
- * Results:
- *	A standard TCL result.  The color pointer is written into the
- *	widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToColorPairProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to return results */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing color */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    ColorPair *pairPtr = (ColorPair *)(widgRec + offset);
-    long longValue = (long)clientData;
-    int bool;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 2) {
-	Tcl_AppendResult(interp, "too many names in colors list", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	Blt_FreeColorPair(pairPtr);
-	return TCL_OK;
-    }
-    bool = (int)longValue;
-    if (objc == 1) {
-	if (GetColorPair(interp, tkwin, objv[0], NULL, pairPtr, bool) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	if (GetColorPair(interp, tkwin, objv[0], objv[1], pairPtr, bool) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfColor --
- *
- *	Convert the color option value into a string.
- *
- * Results:
- *	The static string representing the color option is returned.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfColor(XColor *colorPtr)
-{
-    if (colorPtr == NULL) {
-	return "";
-    } else if (colorPtr == COLOR_DEFAULT) {
-	return "defcolor";
-    } else {
-	return Tk_NameOfColor(colorPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColorPairToObjProc --
- *
- *	Convert the color pairs into color names.
- *
- * Results:
- *	The string representing the symbol color is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ColorPairToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Element information record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    ColorPair *pairPtr = (ColorPair *)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(NameOfColor(pairPtr->fgColor), -1));
-    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(NameOfColor(pairPtr->bgColor), -1));
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,		/* Not used. */
-    int imageWidth, int imageHeight)	/* Not used. */
-{
-    Graph *graphPtr;
-    ImageMarker *imPtr = clientData;
-
-    graphPtr = imPtr->obj.graphPtr;
-    if ((imPtr->picture != NULL) && (imPtr->flags & IMAGE_PHOTO)) {
-	Blt_FreePicture(imPtr->picture);
-    }
-    imPtr->picture = NULL;
-    imPtr->flags &= ~IMAGE_PHOTO;
-    if (Blt_Image_IsDeleted(imPtr->tkImage)) {
-	Tk_FreeImage(imPtr->tkImage);
-	imPtr->tkImage = NULL;
-	return;
-    }
-    if (Blt_IsPicture(imPtr->tkImage)) {
-	imPtr->picture = Blt_GetPictureFromImage(imPtr->tkImage);
-    } else {
-	Tk_PhotoHandle photo;
-
-	photo = Tk_FindPhoto(graphPtr->interp, Blt_Image_Name(imPtr->tkImage));
-	if (photo == NULL) {
-	    return;		/* It's neither a photo nor a picture. */
-	}
-	imPtr->picture = Blt_PhotoToPicture(photo);
-	imPtr->flags |= IMAGE_PHOTO;
-    }
-    graphPtr->flags |= CACHE_DIRTY;
-    imPtr->flags |= MAP_ITEM;
-    Blt_EventuallyRedrawGraph(graphPtr);
-}
-
-/*ARGSUSED*/
-static void
-FreePictImageProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    ImageMarker *imPtr = (ImageMarker *)widgRec;
-
-    if ((imPtr->picture != NULL) && (imPtr->flags & IMAGE_PHOTO)) {
-	Blt_FreePicture(imPtr->picture);
-    }
-    imPtr->picture = NULL;
-    if (imPtr->tkImage != NULL) {
-	Tk_FreeImage(imPtr->tkImage);
-    }
-    imPtr->tkImage = NULL;
-    imPtr->flags &= ~IMAGE_PHOTO;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPictImageProc --
- *
- *	Given an image name, get the Tk image associated with it.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPictImageProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to return results */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ImageMarker *imPtr = (ImageMarker *)widgRec;
-    Blt_Picture *picturePtr = (Blt_Picture *)(widgRec + offset);
-    Tk_Image tkImage;
-    const char *name;
-
-    name = Tcl_GetString(objPtr);
-    tkImage = Tk_GetImage(interp, tkwin, name, ImageChangedProc, imPtr);
-    if (tkImage == NULL) {
-	return TCL_ERROR;
-    }
-    if (imPtr->tkImage != NULL) {
-	Tk_FreeImage(imPtr->tkImage);
-    }
-    if (*picturePtr != NULL) {
-	Blt_FreePicture(*picturePtr);
-    }
-    *picturePtr = NULL;
-    imPtr->tkImage = tkImage;
-    imPtr->flags &= ~IMAGE_PHOTO;
-    if (Blt_IsPicture(tkImage)) {
-	*picturePtr = Blt_GetPictureFromImage(tkImage);
-    } else {
-	Tk_PhotoHandle photo;
-	Graph *graphPtr;
-
-	graphPtr = imPtr->obj.graphPtr;
-	photo = Tk_FindPhoto(graphPtr->interp, Blt_Image_Name(tkImage));
-	if (photo == NULL) {
-	    return TCL_ERROR;	       /* It's neither a photo nor a picture. */
-	}
-	*picturePtr = Blt_PhotoToPicture(photo);
-	imPtr->flags |= IMAGE_PHOTO;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictImageToObjProc --
- *
- *	Convert the image name into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the image is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PictImageToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    ImageMarker *imPtr = (ImageMarker *)(widgRec);
-    
-    if (imPtr->tkImage == NULL) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(Blt_Image_Name(imPtr->tkImage), -1);
-}
-
-static INLINE int
-IsElementHidden(Marker *markerPtr)
-{
-    Blt_HashEntry *hPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    /* Look up the named element and see if it's hidden */
-    hPtr = Blt_FindHashEntry(&graphPtr->elements.table, markerPtr->elemName);
-    if (hPtr != NULL) {
-	Element *elemPtr;
-	
-	elemPtr = Blt_GetHashValue(hPtr);
-	if ((elemPtr->link == NULL) || (elemPtr->flags & HIDE)) {
-	    return TRUE;
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HMap --
- *
- *	Map the given graph coordinate value to its axis, returning a window
- *	position.
- *
- * Results:
- *	Returns a floating point number representing the window coordinate
- *	position on the given axis.
- *
- * -------------------------------------------------------------------------- 
- */
-static double
-HMap(Axis *axisPtr, double x)
-{
-    double norm;
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    if (x == DBL_MAX) {
-	norm = 1.0;
-    } else if (x == -DBL_MAX) {
-	norm = 0.0;
-    } else {
-	if (axisPtr->logScale) {
-	    if (x > 0.0) {
-		x = log10(x);
-	    } else if (x < 0.0) {
-		x = 0.0;
-	    }
-	}
-	norm = NORMALIZE(axisPtr, x);
-    }
-    if (axisPtr->descending) {
-	norm = 1.0 - norm;
-    }
-    /* Horizontal transformation */
-    return ((norm * graphPtr->hRange) + graphPtr->hOffset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VMap --
- *
- *	Map the given graph coordinate value to its axis, returning a window
- *	position.
- *
- * Results:
- *	Returns a double precision number representing the window coordinate
- *	position on the given axis.
- *
- *---------------------------------------------------------------------------
- */
-static double
-VMap(Axis *axisPtr, double y)
-{
-    double norm;
-    Graph *graphPtr = axisPtr->obj.graphPtr;
-
-    if (y == DBL_MAX) {
-	norm = 1.0;
-    } else if (y == -DBL_MAX) {
-	norm = 0.0;
-    } else {
-	if (axisPtr->logScale) {
-	    if (y > 0.0) {
-		y = log10(y);
-	    } else if (y < 0.0) {
-		y = 0.0;
-	    }
-	}
-	norm = NORMALIZE(axisPtr, y);
-    }
-    if (axisPtr->descending) {
-	norm = 1.0 - norm;
-    }
-    /* Vertical transformation */
-    return (((1.0 - norm) * graphPtr->vRange) + graphPtr->vOffset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapPoint --
- *
- *	Maps the given graph x,y coordinate values to a window position.
- *
- * Results:
- *	Returns a XPoint structure containing the window coordinates of the
- *	given graph x,y coordinate.
- *
- *---------------------------------------------------------------------------
- */
-static Point2d
-MapPoint(
-    Point2d *pointPtr,		/* Graph X-Y coordinate. */
-    Axis2d *axesPtr)		/* Specifies which axes to use */
-{
-    Point2d result;
-    Graph *graphPtr = axesPtr->y->obj.graphPtr;
-
-    if (graphPtr->inverted) {
-	result.x = HMap(axesPtr->y, pointPtr->y);
-	result.y = VMap(axesPtr->x, pointPtr->x);
-    } else {
-	result.x = HMap(axesPtr->x, pointPtr->x);
-	result.y = VMap(axesPtr->y, pointPtr->y);
-    }
-    return result;			/* Result is screen coordinate. */
-}
-
-static Marker *
-CreateMarker(
-    Graph *graphPtr,
-    const char *name,
-    ClassId classId)
-{    
-    Marker *markerPtr;
-
-    /* Create the new marker based upon the given type */
-    switch (classId) {
-    case CID_MARKER_BITMAP:
-	markerPtr = CreateBitmapProc(); /* bitmap */
-	break;
-    case CID_MARKER_LINE:
-	markerPtr = CreateLineProc();	/* line */
-	break;
-    case CID_MARKER_IMAGE:
-	markerPtr = CreateImageProc();	/* image */
-	break;
-    case CID_MARKER_TEXT:
-	markerPtr = CreateTextProc();	/* text */
-	break;
-    case CID_MARKER_POLYGON:
-	markerPtr = CreatePolygonProc(); /* polygon */
-	break;
-    case CID_MARKER_WINDOW:
-	markerPtr = CreateWindowProc(); /* window */
-	break;
-    default:
-	return NULL;
-    }
-    markerPtr->obj.graphPtr = graphPtr;
-    markerPtr->drawUnder = FALSE;
-    markerPtr->flags |= MAP_ITEM;
-    markerPtr->obj.name = Blt_AssertStrdup(name);
-    Blt_GraphSetObjectClass(&markerPtr->obj, classId);
-    return markerPtr;
-}
-
-
-static void
-DestroyMarker(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (markerPtr->drawUnder) {
-	/* If the marker to be deleted is currently displayed below the
-	 * elements, then backing store needs to be repaired. */
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    /* 
-     * Call the marker's type-specific deallocation routine. We do it first
-     * while all the marker fields are still valid.
-     */
-    (*markerPtr->classPtr->freeProc)(markerPtr);
-
-    /* Dump any bindings that might be registered for the marker. */
-    Blt_DeleteBindings(graphPtr->bindTable, markerPtr);
-
-    /* Release all the X resources associated with the marker. */
-    Blt_FreeOptions(markerPtr->classPtr->configSpecs, (char *)markerPtr,
-	graphPtr->display, 0);
-
-    if (markerPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&graphPtr->markers.table, 
-			    markerPtr->hashPtr);
-    }
-    if (markerPtr->link != NULL) {
-	Blt_Chain_DeleteLink(graphPtr->markers.displayList, markerPtr->link);
-    }
-    if (markerPtr->obj.name != NULL) {
-	Blt_Free(markerPtr->obj.name);
-    }
-    Blt_Free(markerPtr);
-}
-
-static void
-FreeMarker(DestroyData dataPtr) 
-{
-    Marker *markerPtr = (Marker *)dataPtr;
-    DestroyMarker(markerPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureBitmapProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a bitmap
- *	marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as bitmap pixmap, colors, rotation,
- *	etc. get set for markerPtr; old resources get freed, if there were
- *	any.  The marker is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ConfigureBitmapProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    if (bmPtr->srcBitmap == None) {
-	return TCL_OK;
-    }
-    bmPtr->angle = FMOD(bmPtr->reqAngle, 360.0);
-    if (bmPtr->angle < 0.0) {
-	bmPtr->angle += 360.0;
-    }
-    gcMask = 0;
-
-    if (bmPtr->outlineColor != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = bmPtr->outlineColor->pixel;
-    }
-
-    if (bmPtr->fillColor != NULL) {
-	/* Opaque bitmap: both foreground and background (fill) colors
-	 * are used. */
-	gcValues.background = bmPtr->fillColor->pixel;
-	gcMask |= GCBackground;
-    } else {
-	/* Transparent bitmap: set the clip mask to the current bitmap. */
-	gcValues.clip_mask = bmPtr->srcBitmap;
-	gcMask |= GCClipMask;
-    }
-
-    /* 
-     * This is technically a shared GC, but we're going to set/change the clip
-     * origin anyways before we draw the bitmap.  This relies on the fact that
-     * no other client will be allocated this GC with the GCClipMask set to
-     * this particular bitmap.
-     */
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (bmPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, bmPtr->gc);
-    }
-    bmPtr->gc = newGC;
-
-    /* Create the background GC containing the fill color. */
-
-    if (bmPtr->fillColor != NULL) {
-	gcValues.foreground = bmPtr->fillColor->pixel;
-	newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-	if (bmPtr->fillGC != NULL) {
-	    Tk_FreeGC(graphPtr->display, bmPtr->fillGC);
-	}
-	bmPtr->fillGC = newGC;
-    }
-
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-#ifdef notdef
-static void
-PrintPolyPoint(char *mesg, Point2d *points, int nPoints)
-{
-    int i;
-
-    fprintf(stderr, "%s:\t\tpoint[0]=%g,%g\n", mesg, points[0].x, points[0].y);
-    for (i = 1; i < nPoints; i++) {
-	fprintf(stderr, "\t\tpoint[%d]=%g,%g\n", i, points[i].x, points[i].y);
-    }
-}	
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapBitmapProc --
- *
- * 	This procedure gets called each time the layout of the graph changes.
- * 	The x, y window coordinates of the bitmap marker are saved in the
- * 	marker structure.
- *
- *	Additionly, if no background color was specified, the
- *	GCTileStipXOrigin and GCTileStipYOrigin attributes are set in the
- *	private GC.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Window coordinates are saved and if no background color was set, the
- *	GC stipple origins are changed to calculated window coordinates.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapBitmapProc(Marker *markerPtr)
-{
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-    Region2d extents;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    Point2d anchorPt;
-    Point2d corner1, corner2;
-    int destWidth, destHeight;
-    int srcWidth, srcHeight;
-    int i;
-
-    if (bmPtr->srcBitmap == None) {
-	return;
-    }
-    if (bmPtr->destBitmap != None) {
-	Tk_FreePixmap(graphPtr->display, bmPtr->destBitmap);
-	bmPtr->destBitmap = None;
-    }
-    /* 
-     * Collect the coordinates.  The number of coordinates will determine the
-     * calculations to be made.
-     * 
-     *	   x1 y1	A single pair of X-Y coordinates.  They represent
-     *			the anchor position of the bitmap.  
-     *
-     *	x1 y1 x2 y2	Two pairs of X-Y coordinates.  They represent
-     *			two opposite corners of a bounding rectangle. The
-     *			bitmap is possibly rotated and scaled to fit into
-     *			this box.
-     *
-     */   
-    Tk_SizeOfBitmap(graphPtr->display, bmPtr->srcBitmap, &srcWidth, 
-		    &srcHeight);
-    corner1 = MapPoint(markerPtr->worldPts, &markerPtr->axes);
-    if (markerPtr->nWorldPts > 1) {
-	double hold;
-
-	corner2 = MapPoint(markerPtr->worldPts + 1, &markerPtr->axes);
-	/* Flip the corners if necessary */
-	if (corner1.x > corner2.x) {
-	    hold = corner1.x, corner1.x = corner2.x, corner2.x = hold;
-	}
-	if (corner1.y > corner2.y) {
-	    hold = corner1.y, corner1.y = corner2.y, corner2.y = hold;
-	}
-    } else {
-	corner2.x = corner1.x + srcWidth - 1;
-	corner2.y = corner1.y + srcHeight - 1;
-    }
-    destWidth = (int)(corner2.x - corner1.x) + 1;
-    destHeight = (int)(corner2.y - corner1.y) + 1;
-
-    if (markerPtr->nWorldPts == 1) {
-	anchorPt = Blt_AnchorPoint(corner1.x, corner1.y, (double)destWidth, 
-		(double)destHeight, bmPtr->anchor);
-    } else {
-	anchorPt = corner1;
-    }
-    anchorPt.x += markerPtr->xOffset;
-    anchorPt.y += markerPtr->yOffset;
-
-    /* Check if the bitmap sits at least partially in the plot area. */
-    extents.left   = anchorPt.x;
-    extents.top    = anchorPt.y;
-    extents.right  = anchorPt.x + destWidth - 1;
-    extents.bottom = anchorPt.y + destHeight - 1;
-    markerPtr->clipped = BoxesDontOverlap(graphPtr, &extents);
-    if (markerPtr->clipped) {
-	return;				/* Bitmap is offscreen. Don't generate
-					 * rotated or scaled bitmaps. */
-    }
-
-    /*  
-     * Scale the bitmap if necessary. It's a little tricky because we only
-     * want to scale what's visible on the screen, not the entire bitmap.
-     */
-    if ((bmPtr->angle != 0.0f) || (destWidth != srcWidth) || 
-	(destHeight != srcHeight)) {
-	int regionX, regionY, regionWidth, regionHeight; 
-	double left, right, top, bottom;
-
-	/* Ignore parts of the bitmap outside of the plot area. */
-	left   = MAX(graphPtr->left, extents.left);
-	right  = MIN(graphPtr->right, extents.right);
-	top    = MAX(graphPtr->top, extents.top);
-	bottom = MIN(graphPtr->bottom, extents.bottom);
-
-	/* Determine the portion of the scaled bitmap to display. */
-	regionX = regionY = 0;
-	if (graphPtr->left > extents.left) {
-	    regionX = (int)(graphPtr->left - extents.left);
-	}
-	if (graphPtr->top > extents.top) {
-	    regionY = (int)(graphPtr->top - extents.top);
-	}	    
-	regionWidth = (int)(right - left) + 1;
-	regionHeight = (int)(bottom - top) + 1;
-	
-	anchorPt.x = left;
-	anchorPt.y = top;
-	bmPtr->destBitmap = Blt_ScaleRotateBitmapArea(graphPtr->tkwin, 
-		bmPtr->srcBitmap, srcWidth, srcHeight, regionX, regionY, 
-		regionWidth, regionHeight, destWidth, destHeight, bmPtr->angle);
-	bmPtr->destWidth = regionWidth;
-	bmPtr->destHeight = regionHeight;
-    } else {
-	bmPtr->destWidth = srcWidth;
-	bmPtr->destHeight = srcHeight;
-	bmPtr->destBitmap = None;
-    }
-    bmPtr->anchorPt = anchorPt;
-    {
-	double xScale, yScale;
-	double tx, ty;
-	double rotWidth, rotHeight;
-	Point2d polygon[5];
-	int n;
-
-	/* 
-	 * Compute a polygon to represent the background area of the bitmap.
-	 * This is needed for backgrounds of arbitrarily rotated bitmaps.  We
-	 * also use it to print a background in PostScript.
-	 */
-	Blt_GetBoundingBox(srcWidth, srcHeight, bmPtr->angle, &rotWidth, 
-			   &rotHeight, polygon);
-	xScale = (double)destWidth / rotWidth;
-	yScale = (double)destHeight / rotHeight;
-	
-	/* 
-	 * Adjust each point of the polygon. Both scale it to the new size and
-	 * translate it to the actual screen position of the bitmap.
-	 */
-	tx = extents.left + destWidth * 0.5;
-	ty = extents.top + destHeight * 0.5;
-	for (i = 0; i < 4; i++) {
-	    polygon[i].x = (polygon[i].x * xScale) + tx;
-	    polygon[i].y = (polygon[i].y * yScale) + ty;
-	}
-	Blt_GraphExtents(graphPtr, &extents);
-	n = Blt_PolyRectClip(&extents, polygon, 4, bmPtr->outline); 
-	assert(n <= MAX_OUTLINE_POINTS);
-	if (n < 3) { 
-	    memcpy(&bmPtr->outline, polygon, sizeof(Point2d) * 4);
-	    bmPtr->nOutlinePts = 4;
-	} else {
-	    bmPtr->nOutlinePts = n;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PointInBitmapProc --
- *
- *	Indicates if the given point is over the bitmap marker.  The area of
- *	the bitmap is the rectangle.
- *
- * Results:
- *	Returns 1 is the point is over the bitmap marker, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PointInBitmapProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-
-    if (bmPtr->srcBitmap == None) {
-	return 0;
-    }
-    if (bmPtr->angle != 0.0f) {
-	Point2d points[MAX_OUTLINE_POINTS];
-	int i;
-
-	/*  
-	 * Generate the bounding polygon (isolateral) for the bitmap and see
-	 * if the point is inside of it.
-	 */
-	for (i = 0; i < bmPtr->nOutlinePts; i++) {
-	    points[i].x = bmPtr->outline[i].x + bmPtr->anchorPt.x;
-	    points[i].y = bmPtr->outline[i].y + bmPtr->anchorPt.y;
-	}
-	return Blt_PointInPolygon(samplePtr, points, bmPtr->nOutlinePts);
-    }
-    return ((samplePtr->x >= bmPtr->anchorPt.x) && 
-	    (samplePtr->x < (bmPtr->anchorPt.x + bmPtr->destWidth)) &&
-	    (samplePtr->y >= bmPtr->anchorPt.y) && 
-	    (samplePtr->y < (bmPtr->anchorPt.y + bmPtr->destHeight)));
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInBitmapProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInBitmapProc(Marker *markerPtr, Region2d *extsPtr, int enclosed)
-{
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-
-    if (markerPtr->nWorldPts < 1) {
-	return FALSE;
-    }
-    if (bmPtr->angle != 0.0f) {
-	Point2d points[MAX_OUTLINE_POINTS];
-	int i;
-	
-	/*  
-	 * Generate the bounding polygon (isolateral) for the bitmap and see
-	 * if the point is inside of it.
-	 */
-	for (i = 0; i < bmPtr->nOutlinePts; i++) {
-	    points[i].x = bmPtr->outline[i].x + bmPtr->anchorPt.x;
-	    points[i].y = bmPtr->outline[i].y + bmPtr->anchorPt.y;
-	}
-	return Blt_RegionInPolygon(extsPtr, points, bmPtr->nOutlinePts, 
-		   enclosed);
-    }
-    if (enclosed) {
-	return ((bmPtr->anchorPt.x >= extsPtr->left) &&
-		(bmPtr->anchorPt.y >= extsPtr->top) && 
-		((bmPtr->anchorPt.x + bmPtr->destWidth) <= extsPtr->right) &&
-		((bmPtr->anchorPt.y + bmPtr->destHeight) <= extsPtr->bottom));
-    }
-    return !((bmPtr->anchorPt.x >= extsPtr->right) ||
-	     (bmPtr->anchorPt.y >= extsPtr->bottom) ||
-	     ((bmPtr->anchorPt.x + bmPtr->destWidth) <= extsPtr->left) ||
-	     ((bmPtr->anchorPt.y + bmPtr->destHeight) <= extsPtr->top));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawBitmapProc --
- *
- *	Draws the bitmap marker that have a transparent of filled background.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	GC stipple origins are changed to current window coordinates.
- *	Commands are output to X to draw the marker in its current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawBitmapProc(Marker *markerPtr, Drawable drawable)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-    double rangle;
-    Pixmap bitmap;
-
-    bitmap = GETBITMAP(bmPtr);
-    if ((bitmap == None) || (bmPtr->destWidth < 1) || (bmPtr->destHeight < 1)) {
-	return;
-    }
-    rangle = FMOD(bmPtr->angle, 90.0);
-    if ((bmPtr->fillColor == NULL) || (rangle != 0.0)) {
-
-	/* 
-	 * If the bitmap is rotated and a filled background is required, then
-	 * a filled polygon is drawn before the bitmap.
-	 */
-	if (bmPtr->fillColor != NULL) {
-	    int i;
-	    XPoint polygon[MAX_OUTLINE_POINTS];
-
-	    for (i = 0; i < bmPtr->nOutlinePts; i++) {
-		polygon[i].x = (short int)bmPtr->outline[i].x;
-		polygon[i].y = (short int)bmPtr->outline[i].y;
-	    }
-	    XFillPolygon(graphPtr->display, drawable, bmPtr->fillGC,
-		 polygon, bmPtr->nOutlinePts, Convex, CoordModeOrigin);
-	}
-	XSetClipMask(graphPtr->display, bmPtr->gc, bitmap);
-	XSetClipOrigin(graphPtr->display, bmPtr->gc, (int)bmPtr->anchorPt.x, 
-	       (int)bmPtr->anchorPt.y);
-    } else {
-	XSetClipMask(graphPtr->display, bmPtr->gc, None);
-	XSetClipOrigin(graphPtr->display, bmPtr->gc, 0, 0);
-    }
-    XCopyPlane(graphPtr->display, bitmap, drawable, bmPtr->gc, 0, 0,
-	bmPtr->destWidth, bmPtr->destHeight, (int)bmPtr->anchorPt.x, 
-	(int)bmPtr->anchorPt.y, 1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BitmapToPostscriptProc --
- *
- *	Generates PostScript to print a bitmap marker.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BitmapToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-    Pixmap bitmap;
-
-    bitmap = GETBITMAP(bmPtr);
-    if ((bitmap == None) || (bmPtr->destWidth < 1) || (bmPtr->destHeight < 1)) {
-	return;				/* No bitmap to display. */
-    }
-    if (bmPtr->fillColor != NULL) {
-	Blt_Ps_XSetBackground(ps, bmPtr->fillColor);
-	Blt_Ps_XFillPolygon(ps, bmPtr->outline, 4);
-    }
-    Blt_Ps_XSetForeground(ps, bmPtr->outlineColor);
-
-    Blt_Ps_Format(ps,
-	"  gsave\n    %g %g translate\n    %d %d scale\n", 
-	   bmPtr->anchorPt.x, bmPtr->anchorPt.y + bmPtr->destHeight, 
-	   bmPtr->destWidth, -bmPtr->destHeight);
-    Blt_Ps_Format(ps, "    %d %d true [%d 0 0 %d 0 %d] {",
-	bmPtr->destWidth, bmPtr->destHeight, bmPtr->destWidth, 
-	-bmPtr->destHeight, bmPtr->destHeight);
-    Blt_Ps_XSetBitmapData(ps, graphPtr->display, bitmap,
-	bmPtr->destWidth, bmPtr->destHeight);
-    Blt_Ps_VarAppend(ps, 
-		     "    } imagemask\n",
-		     "grestore\n", (char *)NULL);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeBitmapProc --
- *
- *	Releases the memory and attributes of the bitmap marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Bitmap attributes (GCs, colors, bitmap, etc) get destroyed.  Memory is
- *	released, X resources are freed, and the graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeBitmapProc(Marker *markerPtr)
-{
-    BitmapMarker *bmPtr = (BitmapMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (bmPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, bmPtr->gc);
-    }
-    if (bmPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, bmPtr->fillGC);
-    }
-    if (bmPtr->destBitmap != None) {
-	Tk_FreePixmap(graphPtr->display, bmPtr->destBitmap);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateBitmapProc --
- *
- *	Allocate memory and initialize methods for the new bitmap marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the bitmap marker structure.
- *
- *---------------------------------------------------------------------------
- */
-static Marker *
-CreateBitmapProc(void)
-{
-    BitmapMarker *bmPtr;
-
-    bmPtr = Blt_AssertCalloc(1, sizeof(BitmapMarker));
-    bmPtr->classPtr = &bitmapMarkerClass;
-    return (Marker *)bmPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureImageProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a image
- *	marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as image pixmap, colors, rotation,
- *	etc. get set for markerPtr; old resources get freed, if there were
- *	any.  The marker is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureImageProc(Marker *markerPtr)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    Blt_Painter painter;
-    GC newGC;
-
-    newGC = Tk_GetGC(graphPtr->tkwin, 0L, (XGCValues *)NULL);
-    if (imPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, imPtr->gc);
-    }
-    imPtr->gc = newGC;
-
-    painter = Blt_GetPainter(graphPtr->tkwin, 1.0);
-    if (imPtr->painter != NULL) {
-	Blt_FreePainter(painter);
-    }
-    imPtr->painter = painter;
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapImageProc --
- *
- * 	This procedure gets called each time the layout of the graph changes.
- * 	The x, y window coordinates of the image marker are saved in the
- * 	marker structure.
- *
- *	In addition, if no background color was specified, the
- *	GCTileStipXOrigin and GCTileStipYOrigin attributes will not set in the
- *	private GC.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Window coordinates are saved and if no background color was set, the
- *	GC stipple origins are changed to calculated window coordinates.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapImageProc(Marker *markerPtr)
-{
-    Region2d extents;
-    Graph *graphPtr;
-    ImageMarker *imPtr;
-    Point2d anchorPt;
-    Point2d c1, c2;
-    int newWidth, newHeight;
-    int srcWidth, srcHeight;
-    int x, y, w, h;
-    int left, right, top, bottom;
-
-    imPtr = (ImageMarker *)markerPtr;
-    if (imPtr->picture == NULL) {
-	return;
-    }
-    if (imPtr->scaled != NULL) { 
-	Blt_FreePicture(imPtr->scaled);
-	imPtr->scaled = NULL;
-    }
-    graphPtr = markerPtr->obj.graphPtr;
-    c1 = MapPoint(markerPtr->worldPts, &markerPtr->axes);
-
-    imPtr->width = srcWidth = Blt_PictureWidth(imPtr->picture);
-    imPtr->height = srcHeight = Blt_PictureHeight(imPtr->picture);
-
-    if ((srcWidth == 0) || (srcHeight == 0)) {
-	markerPtr->clipped = TRUE;
-	return;				/* Empty image. */
-    }
-    if (markerPtr->nWorldPts > 1) {
-	double hold;
-
-	c2 = MapPoint(markerPtr->worldPts + 1, &markerPtr->axes);
-	/* Flip the corners if necessary */
-	if (c1.x > c2.x) {
-	    hold = c1.x, c1.x = c2.x, c2.x = hold;
-	}
-	if (c1.y > c2.y) {
-	    hold = c1.y, c1.y = c2.y, c2.y = hold;
-	}
-    } else {
-	c2.x = c1.x + srcWidth - 1;
-	c2.y = c1.y + srcHeight - 1;
-    }
-    newWidth = (int)(c2.x - c1.x) + 1;
-    newHeight = (int)(c2.y - c1.y) + 1;
-
-    if (markerPtr->nWorldPts == 1) {
-	anchorPt = Blt_AnchorPoint(c1.x, c1.y, (double)newWidth, 
-		(double)newHeight, imPtr->anchor);
-    } else {
-	anchorPt = c1;
-    }
-    anchorPt.x += markerPtr->xOffset;
-    anchorPt.y += markerPtr->yOffset;
-
-    /* Check if the image sits at least partially in the plot area. */
-    extents.left   = anchorPt.x;
-    extents.top    = anchorPt.y;
-    extents.right  = anchorPt.x + newWidth - 1;
-    extents.bottom = anchorPt.y + newHeight - 1;
-
-    markerPtr->clipped = BoxesDontOverlap(graphPtr, &extents);
-    if (markerPtr->clipped) {
-	return;				/* Image is offscreen. Don't generate
-					 * rotated or scaled images. */
-    }
-
-    /* Determine the extents of the subimage inside of the destination
-     * image. */
-    left =   MAX((int)extents.left, graphPtr->left);
-    top =    MAX((int)extents.top, graphPtr->top);
-    right =  MIN((int)extents.right, graphPtr->right);
-    bottom = MIN((int)extents.bottom, graphPtr->bottom);
-    
-    /* Reset image location and coordinates to that of the region */
-    anchorPt.x = left;
-    anchorPt.y = top;
-    
-    x = y = 0;
-    if (graphPtr->left > (int)extents.left) {
-	x = graphPtr->left - (int)extents.left;
-    } 
-    if (graphPtr->top > (int)extents.top) {
-	y = graphPtr->top - (int)extents.top;
-    } 
-    w  = (int)(right - left + 1);
-    h = (int)(bottom - top + 1);
-    
-    if (markerPtr->nWorldPts > 1) {
-	Blt_Picture scaled;
-
-	scaled = Blt_ScalePictureArea(imPtr->picture, x, y, w, h, 
-				      newWidth, newHeight);
-	imPtr->scaled = scaled;
-	imPtr->pictX = 0;
-	imPtr->pictY = 0;
-    } else {
-	imPtr->pictX = x;
-	imPtr->pictY = y;
-    }
-    imPtr->width = newWidth;
-    imPtr->height = newHeight;
-    imPtr->anchorPt = anchorPt;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PointInWindowProc --
- *
- *	Indicates if the given point is over the window marker.  The area of
- *	the window is the rectangle.
- *
- * Results:
- *	Returns 1 is the point is over the window marker, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PointInImageProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-    double left, right, top, bottom;
-    
-    left = imPtr->anchorPt.x;
-    right = imPtr->anchorPt.x + imPtr->width;
-    top = imPtr->anchorPt.y;
-    bottom = imPtr->anchorPt.y + imPtr->height;
-
-    return ((samplePtr->x >= left) && (samplePtr->x < right) &&
-	    (samplePtr->y >= top) && (samplePtr->y < bottom));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInImageProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInImageProc(Marker *markerPtr, Region2d *regPtr, int enclosed)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-
-    if (markerPtr->nWorldPts > 0) {
-	double left, right, top, bottom;
-
-	left = imPtr->anchorPt.x;
-	right = imPtr->anchorPt.x + imPtr->width;
-	top = imPtr->anchorPt.y;
-	bottom = imPtr->anchorPt.y + imPtr->height;
-	if (enclosed) {
-	    return ((left >= regPtr->left) && (top >= regPtr->top) && 
-		    (right <= regPtr->right) && (bottom <= regPtr->bottom));
-	} 
-	return !((left >= regPtr->right) || (top >= regPtr->bottom) ||
-		 (right <= regPtr->left) || (bottom <= regPtr->top));
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawImageProc --
- *
- *	This procedure is invoked to draw a image marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	GC stipple origins are changed to current window coordinates.
- *	Commands are output to X to draw the marker in its current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawImageProc(Marker *markerPtr, Drawable drawable)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-    Blt_Picture picture;
-
-    picture = (imPtr->scaled != NULL) ? imPtr->scaled : imPtr->picture;
-    if (picture != NULL) {
-	Blt_PaintPictureWithBlend(imPtr->painter, drawable, picture, 
-		imPtr->pictX, imPtr->pictY, imPtr->width, imPtr->height, 
-		(int)imPtr->anchorPt.x, (int)imPtr->anchorPt.y, 0, 0.4);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageToPostscriptProc --
- *
- *	This procedure is invoked to print a image marker.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ImageToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-    Blt_Picture picture;
-
-    picture = (imPtr->scaled != NULL) ? imPtr->scaled : imPtr->picture;
-    if (picture != NULL) {
-	Blt_Ps_DrawPicture(ps, picture, imPtr->anchorPt.x, imPtr->anchorPt.y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeImageProc --
- *
- *	Destroys the structure containing the attributes of the image marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Image attributes (GCs, colors, image, etc) get destroyed.  Memory is
- *	released, X resources are freed, and the graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeImageProc(Marker *markerPtr)
-{
-    ImageMarker *imPtr = (ImageMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (imPtr->painter != NULL) {
-	Blt_FreePainter(imPtr->painter);
-    }
-    if (imPtr->scaled != NULL) {
-	Blt_FreePicture(imPtr->scaled);
-    }
-    if (imPtr->gc != NULL) {
-	Tk_FreeGC(graphPtr->display, imPtr->gc);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateImageProc --
- *
- *	Allocate memory and initialize methods for the new image marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the image marker structure.
- *
- *---------------------------------------------------------------------------
- */
-static Marker *
-CreateImageProc(void)
-{
-    ImageMarker *imPtr;
-
-    imPtr = Blt_AssertCalloc(1, sizeof(ImageMarker));
-    imPtr->classPtr = &imageMarkerClass;
-    return (Marker *)imPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureTextProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a text marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for markerPtr; old resources get freed, if there were any.  The
- *	marker is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureTextProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    tmPtr->style.angle = (float)FMOD(tmPtr->style.angle, 360.0);
-    if (tmPtr->style.angle < 0.0f) {
-	tmPtr->style.angle += 360.0f;
-    }
-    newGC = NULL;
-    if (tmPtr->fillColor != NULL) {
-	gcMask = GCForeground;
-	gcValues.foreground = tmPtr->fillColor->pixel;
-	newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    }
-    if (tmPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, tmPtr->fillGC);
-    }
-    tmPtr->fillGC = newGC;
-
-    if (Blt_ConfigModified(markerPtr->classPtr->configSpecs, "-text", 
-	(char *)NULL)) {
-	if (tmPtr->textPtr != NULL) {
-	    Blt_Free(tmPtr->textPtr);
-	    tmPtr->textPtr = NULL;
-	}
-	tmPtr->width = tmPtr->height = 0;
-	if (tmPtr->string != NULL) {
-	    int i;
-	    double rotWidth, rotHeight;
-
-	    tmPtr->textPtr = 
-		Blt_Ts_CreateLayout(tmPtr->string, -1, &tmPtr->style);
-	    Blt_GetBoundingBox(tmPtr->textPtr->width, tmPtr->textPtr->height, 
-	       tmPtr->style.angle, &rotWidth, &rotHeight, tmPtr->outline);
-	    tmPtr->width = ROUND(rotWidth);
-	    tmPtr->height = ROUND(rotHeight);
-	    for (i = 0; i < 4; i++) {
-		tmPtr->outline[i].x += ROUND(rotWidth * 0.5);
-		tmPtr->outline[i].y += ROUND(rotHeight * 0.5);
-	    }
-	    tmPtr->outline[4].x = tmPtr->outline[0].x;
-	    tmPtr->outline[4].y = tmPtr->outline[0].y;
-	}
-    }
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapTextProc --
- *
- *	Calculate the layout position for a text marker.  Positional information
- *	is saved in the marker.  If the text is rotated, a bitmap containing the
- *	text is created.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	If no background color has been specified, the GC stipple origins are
- *	changed to current window coordinates. For both rotated and
- *	non-rotated text, if any old bitmap is leftover, it is freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapTextProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-    Region2d extents;
-    Point2d anchorPt;
-
-    if (tmPtr->string == NULL) {
-	return;
-    }
-    anchorPt = MapPoint(markerPtr->worldPts, &markerPtr->axes);
-    anchorPt = Blt_AnchorPoint(anchorPt.x, anchorPt.y, (double)(tmPtr->width), 
-	(double)(tmPtr->height), tmPtr->anchor);
-    anchorPt.x += markerPtr->xOffset;
-    anchorPt.y += markerPtr->yOffset;
-    /*
-     * Determine the bounding box of the text and test to see if it is at
-     * least partially contained within the plotting area.
-     */
-    extents.left = anchorPt.x;
-    extents.top = anchorPt.y;
-    extents.right = anchorPt.x + tmPtr->width - 1;
-    extents.bottom = anchorPt.y + tmPtr->height - 1;
-    markerPtr->clipped = BoxesDontOverlap(graphPtr, &extents);
-    tmPtr->anchorPt = anchorPt;
-
-}
-
-static int
-PointInTextProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-
-    if (tmPtr->string == NULL) {
-	return 0;
-    }
-    if (tmPtr->style.angle != 0.0f) {
-	Point2d points[5];
-	int i;
-
-	/* 
-	 * Figure out the bounding polygon (isolateral) for the text and see
-	 * if the point is inside of it.
-	 */
-	for (i = 0; i < 5; i++) {
-	    points[i].x = tmPtr->outline[i].x + tmPtr->anchorPt.x;
-	    points[i].y = tmPtr->outline[i].y + tmPtr->anchorPt.y;
-	}
-	return Blt_PointInPolygon(samplePtr, points, 5);
-    } 
-    return ((samplePtr->x >= tmPtr->anchorPt.x) && 
-	    (samplePtr->x < (tmPtr->anchorPt.x + tmPtr->width)) &&
-	    (samplePtr->y >= tmPtr->anchorPt.y) && 
-	    (samplePtr->y < (tmPtr->anchorPt.y + tmPtr->height)));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInTextProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInTextProc(Marker *markerPtr, Region2d *extsPtr, int enclosed)
-{
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-
-    if (markerPtr->nWorldPts < 1) {
-	return FALSE;
-    }
-    if (tmPtr->style.angle != 0.0f) {
-	Point2d points[5];
-	int i;
-	
-	/*  
-	 * Generate the bounding polygon (isolateral) for the bitmap and see
-	 * if the point is inside of it.
-	 */
-	for (i = 0; i < 4; i++) {
-	    points[i].x = tmPtr->outline[i].x + tmPtr->anchorPt.x;
-	    points[i].y = tmPtr->outline[i].y + tmPtr->anchorPt.y;
-	}
-	return Blt_RegionInPolygon(extsPtr, points, 4, enclosed);
-    } 
-    if (enclosed) {
-	return ((tmPtr->anchorPt.x >= extsPtr->left) &&
-		(tmPtr->anchorPt.y >= extsPtr->top) && 
-		((tmPtr->anchorPt.x + tmPtr->width) <= extsPtr->right) &&
-		((tmPtr->anchorPt.y + tmPtr->height) <= extsPtr->bottom));
-    }
-    return !((tmPtr->anchorPt.x >= extsPtr->right) ||
-	     (tmPtr->anchorPt.y >= extsPtr->bottom) ||
-	     ((tmPtr->anchorPt.x + tmPtr->width) <= extsPtr->left) ||
-	     ((tmPtr->anchorPt.y + tmPtr->height) <= extsPtr->top));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawTextProc --
- *
- *	Draws the text marker on the graph.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to draw the marker in its current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawTextProc(Marker *markerPtr, Drawable drawable) 
-{
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (tmPtr->string == NULL) {
-	return;
-    }
-    if (tmPtr->fillGC != NULL) {
-	XPoint points[4];
-	int i;
-
-	/*
-	 * Simulate the rotated background of the bitmap by filling a bounding
-	 * polygon with the background color.
-	 */
-	for (i = 0; i < 4; i++) {
-	    points[i].x = (short int)(tmPtr->outline[i].x + tmPtr->anchorPt.x);
-	    points[i].y = (short int)(tmPtr->outline[i].y + tmPtr->anchorPt.y);
-	}
-	XFillPolygon(graphPtr->display, drawable, tmPtr->fillGC, points, 4,
-	    Convex, CoordModeOrigin);
-    }
-    if (tmPtr->style.color != NULL) {
-	Blt_Ts_DrawLayout(graphPtr->tkwin, drawable, tmPtr->textPtr,
-	    &tmPtr->style, (int)tmPtr->anchorPt.x, (int)tmPtr->anchorPt.y, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextToPostscriptProc --
- *
- *	Outputs PostScript commands to draw a text marker at a given x,y
- *	coordinate, rotation, anchor, and font.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	PostScript font and color settings are changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TextToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-
-    if (tmPtr->string == NULL) {
-	return;
-    }
-    if (tmPtr->fillGC != NULL) {
-	Point2d points[4];
-	int i;
-
-	/*
-	 * Simulate the rotated background of the bitmap by filling a bounding
-	 * polygon with the background color.
-	 */
-	for (i = 0; i < 4; i++) {
-	    points[i].x = tmPtr->outline[i].x + tmPtr->anchorPt.x;
-	    points[i].y = tmPtr->outline[i].y + tmPtr->anchorPt.y;
-	}
-	Blt_Ps_XSetBackground(ps, tmPtr->fillColor);
-	Blt_Ps_XFillPolygon(ps, points, 4);
-    }
-    Blt_Ps_DrawText(ps, tmPtr->string, &tmPtr->style, tmPtr->anchorPt.x, 
-	tmPtr->anchorPt.y);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeTextProc --
- *
- *	Destroys the structure containing the attributes of the text marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Text attributes (GCs, colors, stipple, font, etc) get destroyed.
- *	Memory is released, X resources are freed, and the graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeTextProc(Marker *markerPtr)
-{
-    TextMarker *tmPtr = (TextMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    Blt_Ts_FreeStyle(graphPtr->display, &tmPtr->style);
-    if (tmPtr->textPtr != NULL) {
-	Blt_Free(tmPtr->textPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
-
- * CreateTextProc --
- *
- *	Allocate memory and initialize methods for the new text marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the text marker structure.
- *
- *---------------------------------------------------------------------------
- */
-static Marker *
-CreateTextProc(void)
-{
-    TextMarker *tmPtr;
-
-    tmPtr = Blt_AssertCalloc(1, sizeof(TextMarker));
-    tmPtr->classPtr = &textMarkerClass;
-    Blt_Ts_InitStyle(tmPtr->style);
-    tmPtr->style.anchor = TK_ANCHOR_NW;
-    tmPtr->style.padLeft = tmPtr->style.padRight = 4;
-    tmPtr->style.padTop = tmPtr->style.padBottom = 4;
-    return (Marker *)tmPtr;
-}
-
-static Tk_EventProc ChildEventProc;
-static Tk_GeomRequestProc ChildGeometryProc;
-static Tk_GeomLostSlaveProc ChildCustodyProc;
-static Tk_GeomMgr winMarkerMgrInfo =
-{
-    (char *)"graph",			/* Name of geometry manager used by
-					 * winfo */
-    ChildGeometryProc,			/* Procedure to for new geometry
-					 * requests. */
-    ChildCustodyProc,			/* Procedure when window is taken
-					 * away. */
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureWindowProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a window
- *	marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as window pathname, placement,
- *	etc. get set for markerPtr; old resources get freed, if there were
- *	any.  The marker is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureWindowProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-    Tk_Window tkwin;
-
-    if (wmPtr->childName == NULL) {
-	return TCL_OK;
-    }
-    tkwin = Tk_NameToWindow(graphPtr->interp, wmPtr->childName, 
-	    graphPtr->tkwin);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(tkwin) != graphPtr->tkwin) {
-	Tcl_AppendResult(graphPtr->interp, "\"", wmPtr->childName,
-	    "\" is not a child of \"", Tk_PathName(graphPtr->tkwin), "\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (tkwin != wmPtr->child) {
-	if (wmPtr->child != NULL) {
-	    Tk_DeleteEventHandler(wmPtr->child, StructureNotifyMask,
-		ChildEventProc, wmPtr);
-	    Tk_ManageGeometry(wmPtr->child, (Tk_GeomMgr *) 0, (ClientData)0);
-	    Tk_UnmapWindow(wmPtr->child);
-	}
-	Tk_CreateEventHandler(tkwin, StructureNotifyMask, ChildEventProc, 
-		wmPtr);
-	Tk_ManageGeometry(tkwin, &winMarkerMgrInfo, wmPtr);
-    }
-    wmPtr->child = tkwin;
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapWindowProc --
- *
- *	Calculate the layout position for a window marker.  Positional
- *	information is saved in the marker.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapWindowProc(Marker *markerPtr)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    Point2d anchorPt;
-    Region2d extents;
-    int width, height;
-
-    if (wmPtr->child == (Tk_Window)NULL) {
-	return;
-    }
-    anchorPt = MapPoint(markerPtr->worldPts, &markerPtr->axes);
-
-    width = Tk_ReqWidth(wmPtr->child);
-    height = Tk_ReqHeight(wmPtr->child);
-    if (wmPtr->reqWidth > 0) {
-	width = wmPtr->reqWidth;
-    }
-    if (wmPtr->reqHeight > 0) {
-	height = wmPtr->reqHeight;
-    }
-    wmPtr->anchorPt = Blt_AnchorPoint(anchorPt.x, anchorPt.y, (double)width, 
-	(double)height, wmPtr->anchor);
-    wmPtr->anchorPt.x += markerPtr->xOffset;
-    wmPtr->anchorPt.y += markerPtr->yOffset;
-    wmPtr->width = width;
-    wmPtr->height = height;
-
-    /*
-     * Determine the bounding box of the window and test to see if it is at
-     * least partially contained within the plotting area.
-     */
-    extents.left = wmPtr->anchorPt.x;
-    extents.top = wmPtr->anchorPt.y;
-    extents.right = wmPtr->anchorPt.x + wmPtr->width - 1;
-    extents.bottom = wmPtr->anchorPt.y + wmPtr->height - 1;
-    markerPtr->clipped = BoxesDontOverlap(graphPtr, &extents);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PointInWindowProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-PointInWindowProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-
-    return ((samplePtr->x >= wmPtr->anchorPt.x) && 
-	    (samplePtr->x < (wmPtr->anchorPt.x + wmPtr->width)) &&
-	    (samplePtr->y >= wmPtr->anchorPt.y) && 
-	    (samplePtr->y < (wmPtr->anchorPt.y + wmPtr->height)));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInWindowProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInWindowProc(Marker *markerPtr, Region2d *extsPtr, int enclosed)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-
-    if (markerPtr->nWorldPts < 1) {
-	return FALSE;
-    }
-    if (enclosed) {
-	return ((wmPtr->anchorPt.x >= extsPtr->left) &&
-		(wmPtr->anchorPt.y >= extsPtr->top) && 
-		((wmPtr->anchorPt.x + wmPtr->width) <= extsPtr->right) &&
-		((wmPtr->anchorPt.y + wmPtr->height) <= extsPtr->bottom));
-    }
-    return !((wmPtr->anchorPt.x >= extsPtr->right) ||
-	     (wmPtr->anchorPt.y >= extsPtr->bottom) ||
-	     ((wmPtr->anchorPt.x + wmPtr->width) <= extsPtr->left) ||
-	     ((wmPtr->anchorPt.y + wmPtr->height) <= extsPtr->top));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawWindowProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-DrawWindowProc(Marker *markerPtr, Drawable drawable)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-
-    if (wmPtr->child == NULL) {
-	return;
-    }
-    if ((wmPtr->height != Tk_Height(wmPtr->child)) ||
-	(wmPtr->width != Tk_Width(wmPtr->child)) ||
-	((int)wmPtr->anchorPt.x != Tk_X(wmPtr->child)) ||
-	((int)wmPtr->anchorPt.y != Tk_Y(wmPtr->child))) {
-	Tk_MoveResizeWindow(wmPtr->child, (int)wmPtr->anchorPt.x, 
-	    (int)wmPtr->anchorPt.y, wmPtr->width, wmPtr->height);
-    }
-    if (!Tk_IsMapped(wmPtr->child)) {
-	Tk_MapWindow(wmPtr->child);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowToPostscriptProc --
- *
- *---------------------------------------------------------------------------
- */
-static void
-WindowToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-
-    if (wmPtr->child == NULL) {
-	return;
-    }
-    if (Tk_IsMapped(wmPtr->child)) {
-	Blt_Ps_XDrawWindow(ps, wmPtr->child, wmPtr->anchorPt.x, 
-			   wmPtr->anchorPt.y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeWindowProc --
- *
- *	Destroys the structure containing the attributes of the window *
- *	marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Window is destroyed and removed from the screen.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeWindowProc(Marker *markerPtr)
-{
-    WindowMarker *wmPtr = (WindowMarker *)markerPtr;
-
-    if (wmPtr->child != NULL) {
-	Tk_DeleteEventHandler(wmPtr->child, StructureNotifyMask,
-	    ChildEventProc, wmPtr);
-	Tk_ManageGeometry(wmPtr->child, (Tk_GeomMgr *) 0, (ClientData)0);
-	Tk_DestroyWindow(wmPtr->child);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateWindowProc --
- *
- *	Allocate memory and initialize methods for the new window marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the window marker structure.
- *
- *---------------------------------------------------------------------------
- */
-static Marker *
-CreateWindowProc(void)
-{
-    WindowMarker *wmPtr;
-
-    wmPtr = Blt_AssertCalloc(1, sizeof(WindowMarker));
-    wmPtr->classPtr = &windowMarkerClass;
-    return (Marker *)wmPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildEventProc --
- *
- *	This procedure is invoked whenever StructureNotify events occur for a
- *	window that's managed as part of a graph window marker. This
- *	procedure's only purpose is to clean up when windows are deleted.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The window is disassociated from the window item when it is
- *	deleted.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ChildEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    WindowMarker *wmPtr = clientData;
-
-    if (eventPtr->type == DestroyNotify) {
-	wmPtr->child = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildGeometryProc --
- *
- *	This procedure is invoked whenever a window that's associated with a
- *	window item changes its requested dimensions.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The size and location on the window of the window may change,
- *	depending on the options specified for the window item.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ChildGeometryProc(ClientData clientData, Tk_Window tkwin)
-{
-    WindowMarker *wmPtr = clientData;
-
-    if (wmPtr->reqWidth == 0) {
-	wmPtr->width = Tk_ReqWidth(tkwin);
-    }
-    if (wmPtr->reqHeight == 0) {
-	wmPtr->height = Tk_ReqHeight(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildCustodyProc --
- *
- *	This procedure is invoked when an embedded window has been stolen by
- *	another geometry manager.  The information and memory associated with
- *	the widget is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the graph to be redrawn without the embedded widget at
- *	the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-ChildCustodyProc(ClientData clientData, Tk_Window tkwin)
-{
-    Marker *markerPtr = clientData;
-    Graph *graphPtr;
-
-    graphPtr = markerPtr->obj.graphPtr;
-    markerPtr->flags |= DELETE_PENDING;
-    Tcl_EventuallyFree(markerPtr, FreeMarker);
-    /*
-     * Not really needed. We should get an Expose event when the child window
-     * is unmapped.
-     */
-    Blt_EventuallyRedrawGraph(graphPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapLineProc --
- *
- *	Calculate the layout position for a line marker.  Positional
- *	information is saved in the marker.  The line positions are stored in
- *	an array of points (malloc'ed).
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapLineProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-    Point2d *srcPtr, *pend;
-    Segment2d *segments, *segPtr;
-    Point2d p, q;
-    Region2d extents;
-
-    lmPtr->nSegments = 0;
-    if (lmPtr->segments != NULL) {
-	Blt_Free(lmPtr->segments);
-    }
-    if (markerPtr->nWorldPts < 2) {
-	return;				/* Too few points */
-    }
-    Blt_GraphExtents(graphPtr, &extents);
-
-    /* 
-     * Allow twice the number of world coordinates. The line will represented
-     * as series of line segments, not one continous polyline.  This is
-     * because clipping against the plot area may chop the line into several
-     * disconnected segments.
-     */
-    segments = Blt_AssertMalloc(markerPtr->nWorldPts * sizeof(Segment2d));
-    srcPtr = markerPtr->worldPts;
-    p = MapPoint(srcPtr, &markerPtr->axes);
-    p.x += markerPtr->xOffset;
-    p.y += markerPtr->yOffset;
-
-    segPtr = segments;
-    for (srcPtr++, pend = markerPtr->worldPts + markerPtr->nWorldPts; 
-	 srcPtr < pend; srcPtr++) {
-	Point2d next;
-
-	next = MapPoint(srcPtr, &markerPtr->axes);
-	next.x += markerPtr->xOffset;
-	next.y += markerPtr->yOffset;
-	q = next;
-	if (Blt_LineRectClip(&extents, &p, &q)) {
-	    segPtr->p = p;
-	    segPtr->q = q;
-	    segPtr++;
-	}
-	p = next;
-    }
-    lmPtr->nSegments = segPtr - segments;
-    lmPtr->segments = segments;
-    markerPtr->clipped = (lmPtr->nSegments == 0);
-}
-
-static int
-PointInLineProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-
-    return Blt_PointInSegments(samplePtr, lmPtr->segments, lmPtr->nSegments, 
-	   (double)markerPtr->obj.graphPtr->halo);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInLineProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInLineProc(Marker *markerPtr, Region2d *extsPtr, int enclosed)
-{
-    if (markerPtr->nWorldPts < 2) {
-	return FALSE;
-    }
-    if (enclosed) {
-	Point2d *pp, *pend;
-
-	for (pp = markerPtr->worldPts, pend = pp + markerPtr->nWorldPts; 
-	     pp < pend; pp++) {
-	    Point2d p;
-
-	    p = MapPoint(pp, &markerPtr->axes);
-	    if ((p.x < extsPtr->left) && (p.x > extsPtr->right) &&
-		(p.y < extsPtr->top) && (p.y > extsPtr->bottom)) {
-		return FALSE;
-	    }
-	}
-	return TRUE;			/* All points inside bounding box. */
-    } else {
-	int count;
-	Point2d *pp, *pend;
-
-	count = 0;
-	for (pp = markerPtr->worldPts, pend = pp + (markerPtr->nWorldPts - 1); 
-		pp < pend; pp++) {
-	    Point2d p, q;
-
-	    p = MapPoint(pp, &markerPtr->axes);
-	    q = MapPoint(pp + 1, &markerPtr->axes);
-	    if (Blt_LineRectClip(extsPtr, &p, &q)) {
-		count++;
-	    }
-	}
-	return (count > 0);		/* At least 1 segment passes through
-					 * region. */
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawLineProc --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawLineProc(Marker *markerPtr, Drawable drawable)
-{
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-
-    if (lmPtr->nSegments > 0) {
-	Graph *graphPtr = markerPtr->obj.graphPtr;
-
-	Blt_Draw2DSegments(graphPtr->display, drawable, lmPtr->gc, 
-		lmPtr->segments, lmPtr->nSegments);
-	if (lmPtr->xor) {		/* Toggle the drawing state */
-	    lmPtr->xorState = (lmPtr->xorState == 0);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureLineProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a line marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as line width, colors, dashes,
- *	etc. get set for markerPtr; old resources get freed, if there were
- *	any.  The marker is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureLineProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Drawable drawable;
-
-    drawable = Tk_WindowId(graphPtr->tkwin);
-    gcMask = (GCLineWidth | GCLineStyle | GCCapStyle | GCJoinStyle);
-    if (lmPtr->outlineColor != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = lmPtr->outlineColor->pixel;
-    }
-    if (lmPtr->fillColor != NULL) {
-	gcMask |= GCBackground;
-	gcValues.background = lmPtr->fillColor->pixel;
-    }
-    gcValues.cap_style = lmPtr->capStyle;
-    gcValues.join_style = lmPtr->joinStyle;
-    gcValues.line_width = LineWidth(lmPtr->lineWidth);
-    gcValues.line_style = LineSolid;
-    if (LineIsDashed(lmPtr->dashes)) {
-	gcValues.line_style = 
-	    (gcMask & GCBackground) ? LineDoubleDash : LineOnOffDash;
-    }
-    if (lmPtr->xor) {
-	unsigned long pixel;
-	gcValues.function = GXxor;
-
-	gcMask |= GCFunction;
-	if (graphPtr->plotBg == NULL) {
-	    pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
-	} else {
-	    pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
-	}
-	if (gcMask & GCBackground) {
-	    gcValues.background ^= pixel;
-	}
-	gcValues.foreground ^= pixel;
-	if (drawable != None) {
-	    DrawLineProc(markerPtr, drawable);
-	}
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (lmPtr->gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, lmPtr->gc);
-    }
-    if (LineIsDashed(lmPtr->dashes)) {
-	Blt_SetDashes(graphPtr->display, newGC, &lmPtr->dashes);
-    }
-    lmPtr->gc = newGC;
-    if (lmPtr->xor) {
-	if (drawable != None) {
-	    MapLineProc(markerPtr);
-	    DrawLineProc(markerPtr, drawable);
-	}
-	return TCL_OK;
-    }
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LineToPostscriptProc --
- *
- *	Prints postscript commands to display the connect line.  Dashed lines
- *	need to be handled specially, especially if a background color is
- *	designated.
- *
- * Results:
- *	None.
- *
- * Side effects:
-  *	PostScript output commands are saved in the interpreter
- *	(infoPtr->interp) result field.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LineToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-
-    if (lmPtr->nSegments > 0) {
-	Blt_Ps_XSetLineAttributes(ps, lmPtr->outlineColor, 
-		lmPtr->lineWidth, &lmPtr->dashes, lmPtr->capStyle,
-		lmPtr->joinStyle);
-	if ((LineIsDashed(lmPtr->dashes)) && (lmPtr->fillColor != NULL)) {
-	    Blt_Ps_Append(ps, "/DashesProc {\n  gsave\n    ");
-	    Blt_Ps_XSetBackground(ps, lmPtr->fillColor);
-	    Blt_Ps_Append(ps, "    ");
-	    Blt_Ps_XSetDashes(ps, (Blt_Dashes *)NULL);
-	    Blt_Ps_VarAppend(ps,
-			     "stroke\n",
-			     "  grestore\n",
-			     "} def\n", (char *)NULL);
-	} else {
-	    Blt_Ps_Append(ps, "/DashesProc {} def\n");
-	}
-	Blt_Ps_Draw2DSegments(ps, lmPtr->segments, lmPtr->nSegments);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeLineProc --
- *
- *	Destroys the structure and attributes of a line marker.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Line attributes (GCs, colors, stipple, etc) get released.  Memory is
- *	deallocated, X resources are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeLineProc(Marker *markerPtr)
-{
-    LineMarker *lmPtr = (LineMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (lmPtr->gc != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, lmPtr->gc);
-    }
-    if (lmPtr->segments != NULL) {
-	Blt_Free(lmPtr->segments);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateLineProc --
- *
- *	Allocate memory and initialize methods for a new line marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the line marker structure.
- *
- *---------------------------------------------------------------------------
- */
-static Marker *
-CreateLineProc(void)
-{
-    LineMarker *lmPtr;
-
-    lmPtr = Blt_AssertCalloc(1, sizeof(LineMarker));
-    lmPtr->classPtr = &lineMarkerClass;
-    lmPtr->xor = FALSE;
-    lmPtr->capStyle = CapButt;
-    lmPtr->joinStyle = JoinMiter;
-    return (Marker *)lmPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapPolygonProc --
- *
- *	Calculate the layout position for a polygon marker.  Positional
- *	information is saved in the polygon in an array of points (malloc'ed).
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapPolygonProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-    Point2d *screenPts;
-    Region2d extents;
-    int nScreenPts;
-
-    if (pmPtr->outlinePts != NULL) {
-	Blt_Free(pmPtr->outlinePts);
-	pmPtr->outlinePts = NULL;
-	pmPtr->nOutlinePts = 0;
-    }
-    if (pmPtr->fillPts != NULL) {
-	Blt_Free(pmPtr->fillPts);
-	pmPtr->fillPts = NULL;
-	pmPtr->nFillPts = 0;
-    }
-    if (pmPtr->screenPts != NULL) {
-	Blt_Free(pmPtr->screenPts);
-	pmPtr->screenPts = NULL;
-    }
-    if (markerPtr->nWorldPts < 3) {
-	return;				/* Too few points */
-    }
-
-    /* 
-     * Allocate and fill a temporary array to hold the screen coordinates of
-     * the polygon.
-     */
-    nScreenPts = markerPtr->nWorldPts + 1;
-    screenPts = Blt_AssertMalloc((nScreenPts + 1) * sizeof(Point2d));
-    {
-	Point2d *sp, *dp, *send;
-
-	dp = screenPts;
-	for (sp = markerPtr->worldPts, send = sp + markerPtr->nWorldPts; 
-	     sp < send; sp++) {
-	    *dp = MapPoint(sp, &markerPtr->axes);
-	    dp->x += markerPtr->xOffset;
-	    dp->y += markerPtr->yOffset;
-	    dp++;
-	}
-	*dp = screenPts[0];
-    }
-    Blt_GraphExtents(graphPtr, &extents);
-    markerPtr->clipped = TRUE;
-    if (pmPtr->fill.fgColor != NULL) {	/* Polygon fill required. */
-	Point2d *fillPts;
-	int n;
-
-	fillPts = Blt_AssertMalloc(sizeof(Point2d) * nScreenPts * 3);
-	n = Blt_PolyRectClip(&extents, screenPts, markerPtr->nWorldPts,fillPts);
-	if (n < 3) { 
-	    Blt_Free(fillPts);
-	} else {
-	    pmPtr->nFillPts = n;
-	    pmPtr->fillPts = fillPts;
-	    markerPtr->clipped = FALSE;
-	}
-    }
-    if ((pmPtr->outline.fgColor != NULL) && (pmPtr->lineWidth > 0)) { 
-	Segment2d *outlinePts;
-	Segment2d *segPtr;
-	Point2d *sp, *send;
-
-	/* 
-	 * Generate line segments representing the polygon outline.  The
-	 * resulting outline may or may not be closed from viewport clipping.
-	 */
-	outlinePts = Blt_Malloc(nScreenPts * sizeof(Segment2d));
-	if (outlinePts == NULL) {
-	    return;			/* Can't allocate point array */
-	}
-	/* 
-	 * Note that this assumes that the point array contains an extra point
-	 * that closes the polygon.
-	 */
-	segPtr = outlinePts;
-	for (sp = screenPts, send = sp + (nScreenPts - 1); sp < send; sp++) {
-	    segPtr->p = sp[0];
-	    segPtr->q = sp[1];
-	    if (Blt_LineRectClip(&extents, &segPtr->p, &segPtr->q)) {
-		segPtr++;
-	    }
-	}
-	pmPtr->nOutlinePts = segPtr - outlinePts;
-	pmPtr->outlinePts = outlinePts;
-	if (pmPtr->nOutlinePts > 0) {
-	    markerPtr->clipped = FALSE;
-	}
-    }
-    pmPtr->screenPts = screenPts;
-}
-
-static int
-PointInPolygonProc(Marker *markerPtr, Point2d *samplePtr)
-{
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-
-    if ((markerPtr->nWorldPts >= 3) && (pmPtr->screenPts != NULL)) {
-	return Blt_PointInPolygon(samplePtr, pmPtr->screenPts, 
-		markerPtr->nWorldPts + 1);
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RegionInPolygonProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-RegionInPolygonProc(Marker *markerPtr, Region2d *extsPtr, int enclosed)
-{
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-    
-    if ((markerPtr->nWorldPts >= 3) && (pmPtr->screenPts != NULL)) {
-	return Blt_RegionInPolygon(extsPtr, pmPtr->screenPts, 
-		markerPtr->nWorldPts, enclosed);
-    }
-    return FALSE;
-}
-
-static void
-DrawPolygonProc(Marker *markerPtr, Drawable drawable)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-
-    /* Draw polygon fill region */
-    if ((pmPtr->nFillPts > 0) && (pmPtr->fill.fgColor != NULL)) {
-	XPoint *dp, *points;
-	Point2d *sp, *send;
-	
-	points = Blt_Malloc(pmPtr->nFillPts * sizeof(XPoint));
-	if (points == NULL) {
-	    return;
-	}
-	dp = points;
-	for (sp = pmPtr->fillPts, send = sp + pmPtr->nFillPts; sp < send; 
-	     sp++) {
-	    dp->x = (short int)sp->x;
-	    dp->y = (short int)sp->y;
-	    dp++;
-	}
-
-	XFillPolygon(graphPtr->display, drawable, pmPtr->fillGC, points, 
-		pmPtr->nFillPts, Complex, CoordModeOrigin);
-	Blt_Free(points);
-    }
-    /* and then the outline */
-    if ((pmPtr->nOutlinePts > 0) && (pmPtr->lineWidth > 0) && 
-	(pmPtr->outline.fgColor != NULL)) {
-	Blt_Draw2DSegments(graphPtr->display, drawable, pmPtr->outlineGC,
-	    pmPtr->outlinePts, pmPtr->nOutlinePts);
-    }
-}
-
-
-static void
-PolygonToPostscriptProc(Marker *markerPtr, Blt_Ps ps)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-
-    if (pmPtr->fill.fgColor != NULL) {
-
-	/*
-	 * Options:  fg bg
-	 *			Draw outline only.
-	 *	     x          Draw solid or stipple.
-	 *	     x  x       Draw solid or stipple.
-	 */
-
-	/* Create a path to use for both the polygon and its outline. */
-	Blt_Ps_Polyline(ps, pmPtr->fillPts, pmPtr->nFillPts);
-
-	/* If the background fill color was specified, draw the polygon in a
-	 * solid fashion with that color.  */
-	if (pmPtr->fill.bgColor != NULL) {
-	    /* Draw the solid background as the background layer of the opaque
-	     * stipple  */
-	    Blt_Ps_XSetBackground(ps, pmPtr->fill.bgColor);
-	    /* Retain the path. We'll need it for the foreground layer. */
-	    Blt_Ps_Append(ps, "gsave fill grestore\n");
-	}
-	Blt_Ps_XSetForeground(ps, pmPtr->fill.fgColor);
-	if (pmPtr->stipple != None) {
-	    /* Draw the stipple in the foreground color. */
-	    Blt_Ps_XSetStipple(ps, graphPtr->display, pmPtr->stipple);
-	} else {
-	    Blt_Ps_Append(ps, "fill\n");
-	}
-    }
-
-    /* Draw the outline in the foreground color.  */
-    if ((pmPtr->lineWidth > 0) && (pmPtr->outline.fgColor != NULL)) {
-
-	/*  Set up the line attributes.  */
-	Blt_Ps_XSetLineAttributes(ps, pmPtr->outline.fgColor,
-	    pmPtr->lineWidth, &pmPtr->dashes, pmPtr->capStyle,
-	    pmPtr->joinStyle);
-
-	/*  
-	 * Define on-the-fly a PostScript macro "DashesProc" that will be
-	 * executed for each call to the Polygon drawing routine.  If the line
-	 * isn't dashed, simply make this an empty definition.
-	 */
-	if ((pmPtr->outline.bgColor != NULL) && (LineIsDashed(pmPtr->dashes))) {
-	    Blt_Ps_Append(ps, "/DashesProc {\ngsave\n    ");
-	    Blt_Ps_XSetBackground(ps, pmPtr->outline.bgColor);
-	    Blt_Ps_Append(ps, "    ");
-	    Blt_Ps_XSetDashes(ps, (Blt_Dashes *)NULL);
-	    Blt_Ps_Append(ps, "stroke\n  grestore\n} def\n");
-	} else {
-	    Blt_Ps_Append(ps, "/DashesProc {} def\n");
-	}
-	Blt_Ps_Draw2DSegments(ps, pmPtr->outlinePts, pmPtr->nOutlinePts);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigurePolygonProc --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a polygon
- *	marker.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as polygon color, dashes, fillstyle,
- *	etc. get set for markerPtr; old resources get freed, if there were
- *	any.  The marker is eventually redisplayed.
- *
- * -------------------------------------------------------------------------- 
- */
-/*ARGSUSED*/
-static int
-ConfigurePolygonProc(Marker *markerPtr)
-{
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Drawable drawable;
-
-    drawable = Tk_WindowId(graphPtr->tkwin);
-    gcMask = (GCLineWidth | GCLineStyle);
-    if (pmPtr->outline.fgColor != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = pmPtr->outline.fgColor->pixel;
-    }
-    if (pmPtr->outline.bgColor != NULL) {
-	gcMask |= GCBackground;
-	gcValues.background = pmPtr->outline.bgColor->pixel;
-    }
-    gcMask |= (GCCapStyle | GCJoinStyle);
-    gcValues.cap_style = pmPtr->capStyle;
-    gcValues.join_style = pmPtr->joinStyle;
-    gcValues.line_style = LineSolid;
-    gcValues.dash_offset = 0;
-    gcValues.line_width = LineWidth(pmPtr->lineWidth);
-    if (LineIsDashed(pmPtr->dashes)) {
-	gcValues.line_style = (pmPtr->outline.bgColor == NULL)
-	    ? LineOnOffDash : LineDoubleDash;
-    }
-    if (pmPtr->xor) {
-	unsigned long pixel;
-	gcValues.function = GXxor;
-
-	gcMask |= GCFunction;
-	if (graphPtr->plotBg == NULL) {
-	    /* The graph's color option may not have been set yet */
-	    pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
-	} else {
-	    pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
-	}
-	if (gcMask & GCBackground) {
-	    gcValues.background ^= pixel;
-	}
-	gcValues.foreground ^= pixel;
-	if (drawable != None) {
-	    DrawPolygonProc(markerPtr, drawable);
-	}
-    }
-    newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(pmPtr->dashes)) {
-	Blt_SetDashes(graphPtr->display, newGC, &pmPtr->dashes);
-    }
-    if (pmPtr->outlineGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, pmPtr->outlineGC);
-    }
-    pmPtr->outlineGC = newGC;
-
-    gcMask = 0;
-    if (pmPtr->fill.fgColor != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = pmPtr->fill.fgColor->pixel;
-    }
-    if (pmPtr->fill.bgColor != NULL) {
-	gcMask |= GCBackground;
-	gcValues.background = pmPtr->fill.bgColor->pixel;
-    }
-    if (pmPtr->stipple != None) {
-	gcValues.stipple = pmPtr->stipple;
-	gcValues.fill_style = (pmPtr->fill.bgColor != NULL)
-	    ? FillOpaqueStippled : FillStippled;
-	gcMask |= (GCStipple | GCFillStyle);
-    }
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (pmPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, pmPtr->fillGC);
-    }
-    pmPtr->fillGC = newGC;
-
-    if ((gcMask == 0) && !(graphPtr->flags & RESET_AXES) && (pmPtr->xor)) {
-	if (drawable != None) {
-	    MapPolygonProc(markerPtr);
-	    DrawPolygonProc(markerPtr, drawable);
-	}
-	return TCL_OK;
-    }
-    markerPtr->flags |= MAP_ITEM;
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    graphPtr->flags |= RESET_WORLD;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePolygonProc --
- *
- *	Release memory and resources allocated for the polygon element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the polygon element is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreePolygonProc(Marker *markerPtr)
-{
-    PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;
-    Graph *graphPtr = markerPtr->obj.graphPtr;
-
-    if (pmPtr->fillGC != NULL) {
-	Tk_FreeGC(graphPtr->display, pmPtr->fillGC);
-    }
-    if (pmPtr->outlineGC != NULL) {
-	Blt_FreePrivateGC(graphPtr->display, pmPtr->outlineGC);
-    }
-    if (pmPtr->fillPts != NULL) {
-	Blt_Free(pmPtr->fillPts);
-    }
-    if (pmPtr->outlinePts != NULL) {
-	Blt_Free(pmPtr->outlinePts);
-    }
-    if (pmPtr->screenPts != NULL) {
-	Blt_Free(pmPtr->screenPts);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreatePolygonProc --
- *
- *	Allocate memory and initialize methods for the new polygon marker.
- *
- * Results:
- *	The pointer to the newly allocated marker structure is returned.
- *
- * Side effects:
- *	Memory is allocated for the polygon marker structure.
- *
- * -------------------------------------------------------------------------- 
- */
-static Marker *
-CreatePolygonProc(void)
-{
-    PolygonMarker *pmPtr;
-
-    pmPtr = Blt_AssertCalloc(1, sizeof(PolygonMarker));
-    pmPtr->classPtr = &polygonMarkerClass;
-    pmPtr->capStyle = CapButt;
-    pmPtr->joinStyle = JoinMiter;
-    return (Marker *)pmPtr;
-}
-
-static int
-GetMarkerFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr,
-		 Marker **markerPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->markers.table, string);
-    if (hPtr != NULL) {
-	*markerPtrPtr = Blt_GetHashValue(hPtr);
-	return TCL_OK;
-    }
-    if (interp != NULL) {
-	Tcl_AppendResult(interp, "can't find marker \"", string, 
-	     "\" in \"", Tk_PathName(graphPtr->tkwin), (char *)NULL);
-    }
-    return TCL_ERROR;
-}
-
-
-static int
-RenameMarker(Graph *graphPtr, Marker *markerPtr, const char *oldName, 
-	     const char *newName)
-{
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    /* Rename the marker only if no marker already exists by that name */
-    hPtr = Blt_CreateHashEntry(&graphPtr->markers.table, newName, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(graphPtr->interp, "can't rename marker: \"", newName,
-	    "\" already exists", (char *)NULL);
-	return TCL_ERROR;
-    }
-    markerPtr->obj.name = Blt_AssertStrdup(newName);
-    markerPtr->hashPtr = hPtr;
-    Blt_SetHashValue(hPtr, (char *)markerPtr);
-
-    /* Delete the old hash entry */
-    hPtr = Blt_FindHashEntry(&graphPtr->markers.table, oldName);
-    Blt_DeleteHashEntry(&graphPtr->markers.table, hPtr);
-    if (oldName != NULL) {
-	Blt_Free(oldName);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Returns a list of marker identifiers in interp->result;
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 3) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Marker *markerPtr;
-
-	    markerPtr = Blt_Chain_GetValue(link);
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewStringObj(markerPtr->obj.name, -1));
-	}
-    } else {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    Marker *markerPtr;
-	    int i;
-
-	    markerPtr = Blt_Chain_GetValue(link);
-	    for (i = 3; i < objc; i++) {
-		const char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch(markerPtr->obj.name, pattern)) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr,
-			Tcl_NewStringObj(markerPtr->obj.name, -1));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	.g element bind elemName sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Blt_HashEntry *hp;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hp = Blt_FirstHashEntry(&graphPtr->markers.tagTable, &iter);
-	    hp != NULL; hp = Blt_NextHashEntry(&iter)) {
-	    const char *tag;
-	    Tcl_Obj *objPtr;
-
-	    tag = Blt_GetHashKey(&graphPtr->markers.tagTable, hp);
-	    objPtr = Tcl_NewStringObj(tag, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    return Blt_ConfigureBindingsFromObj(interp, graphPtr->bindTable,
-	Blt_MakeMarkerTag(graphPtr, Tcl_GetString(objv[3])),
-	objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Marker *markerPtr;
-
-    if (GetMarkerFromObj(interp, graphPtr, objv[3], &markerPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, 
-	markerPtr->classPtr->configSpecs, (char *)markerPtr, objv[4], 0) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Marker *markerPtr;
-    Tcl_Obj *const *options;
-    const char *oldName;
-    const char *string;
-    int flags = BLT_CONFIG_OBJV_ONLY;
-    int nNames, nOpts;
-    int i;
-    int under;
-
-    markerPtr = NULL;			/* Suppress compiler warning. */
-
-    /* Figure out where the option value pairs begin */
-    objc -= 3;
-    objv += 3;
-    for (i = 0; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-	if (GetMarkerFromObj(interp, graphPtr, objv[i], &markerPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    nNames = i;				/* # of element names specified */
-    nOpts = objc - i;			/* # of options specified */
-    options = objv + nNames;		/* Start of options in objv  */
-    
-    for (i = 0; i < nNames; i++) {
-	GetMarkerFromObj(interp, graphPtr, objv[i], &markerPtr);
-	if (nOpts == 0) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		markerPtr->classPtr->configSpecs, (char *)markerPtr, 
-		(Tcl_Obj *)NULL, flags);
-	} else if (nOpts == 1) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin,
-		markerPtr->classPtr->configSpecs, (char *)markerPtr, 
-		options[0], flags);
-	}
-	/* Save the old marker name. */
-	oldName = markerPtr->obj.name;
-	under = markerPtr->drawUnder;
-	if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, 
-		markerPtr->classPtr->configSpecs, nOpts, options, 
-		(char *)markerPtr, flags) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (oldName != markerPtr->obj.name) {
-	    if (RenameMarker(graphPtr, markerPtr, oldName, markerPtr->obj.name)
-		!= TCL_OK) {
-		markerPtr->obj.name = oldName;
-		return TCL_ERROR;
-	    }
-	}
-	if ((*markerPtr->classPtr->configProc) (markerPtr) != TCL_OK) {
-
-	    return TCL_ERROR;
-	}
-	if (markerPtr->drawUnder != under) {
-	    graphPtr->flags |= CACHE_DIRTY;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateOp --
- *
- *	This procedure creates and initializes a new marker.
- *
- * Results:
- *	The return value is a pointer to a structure describing the new
- *	element.  If an error occurred, then the return value is NULL and an
- *	error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated, etc.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Marker *markerPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    ClassId classId;
-    int i;
-    const char *name;
-    char ident[200];
-    const char *string;
-    char c;
-
-    string = Tcl_GetString(objv[3]);
-    c = string[0];
-    /* Create the new marker based upon the given type */
-    if ((c == 't') && (strcmp(string, "text") == 0)) {
-	classId = CID_MARKER_TEXT;
-    } else if ((c == 'l') && (strcmp(string, "line") == 0)) {
-	classId = CID_MARKER_LINE;
-    } else if ((c == 'p') && (strcmp(string, "polygon") == 0)) {
-	classId = CID_MARKER_POLYGON;
-    } else if ((c == 'i') && (strcmp(string, "image") == 0)) {
-	classId = CID_MARKER_IMAGE;
-    } else if ((c == 'b') && (strcmp(string, "bitmap") == 0)) {
-	classId = CID_MARKER_BITMAP;
-    } else if ((c == 'w') && (strcmp(string, "window") == 0)) {
-	classId = CID_MARKER_WINDOW;
-    } else {
-	Tcl_AppendResult(interp, "unknown marker type \"", string,
-    "\": should be \"text\", \"line\", \"polygon\", \"bitmap\", \"image\", or \
-\"window\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Scan for "-name" option. We need it for the component name */
-    name = NULL;
-    for (i = 4; i < objc; i += 2) {
-	int length;
-
-	string = Tcl_GetStringFromObj(objv[i], &length);
-	if ((length > 1) && (strncmp(string, "-name", length) == 0)) {
-	    name = Tcl_GetString(objv[i + 1]);
-	    break;
-	}
-    }
-    /* If no name was given for the marker, make up one. */
-    if (name == NULL) {
-	sprintf_s(ident, 200, "marker%d", graphPtr->nextMarkerId++);
-	name = ident;
-    } else if (name[0] == '-') {
-	Tcl_AppendResult(interp, "name of marker \"", name, 
-		"\" can't start with a '-'", (char *)NULL);
-	return TCL_ERROR;
-    }
-    markerPtr = CreateMarker(graphPtr, name, classId);
-    if (Blt_ConfigureComponentFromObj(interp, graphPtr->tkwin, name, 
-		markerPtr->obj.className, markerPtr->classPtr->configSpecs, 
-		objc - 4, objv + 4, (char *)markerPtr, 0) != TCL_OK) {
-	DestroyMarker(markerPtr);
-	return TCL_ERROR;
-    }
-    if ((*markerPtr->classPtr->configProc) (markerPtr) != TCL_OK) {
-	DestroyMarker(markerPtr);
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(&graphPtr->markers.table, name, &isNew);
-    if (!isNew) {
-	Marker *oldPtr;
-	/*
-	 * Marker by the same name already exists.  Delete the old marker and
-	 * it's list entry.  But save the hash entry.
-	 */
-	oldPtr = Blt_GetHashValue(hPtr);
-	oldPtr->hashPtr = NULL;
-	DestroyMarker(oldPtr);
-    }
-    Blt_SetHashValue(hPtr, markerPtr);
-    markerPtr->hashPtr = hPtr;
-    /* Unlike elements, new markers are drawn on top of old markers. */
-    markerPtr->link = Blt_Chain_Prepend(graphPtr->markers.displayList,markerPtr);
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), name, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes the marker given by markerId.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new display list.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Marker *markerPtr;
-
-	if (GetMarkerFromObj(NULL, graphPtr, objv[i], &markerPtr) == TCL_OK) {
-	    markerPtr->flags |= DELETE_PENDING;
-	    Tcl_EventuallyFree(markerPtr, FreeMarker);
-	}
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- * 	Find the legend entry from the given argument.  The argument can be
- * 	either a screen position "@x,y" or the name of an element.
- *
- *	I don't know how useful it is to test with the name of an element.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new legend attributes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Marker *markerPtr;
-    const char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if ((string[0] == 'c') && (strcmp(string, "current") == 0)) {
-	markerPtr = (Marker *)Blt_GetCurrentItem(graphPtr->bindTable);
-	if (markerPtr == NULL) {
-	    return TCL_OK;		/* Report only on markers. */
-
-	}
-	if ((markerPtr->obj.classId >= CID_MARKER_BITMAP) &&
-	    (markerPtr->obj.classId <= CID_MARKER_WINDOW))	    {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		markerPtr->obj.name, -1);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RelinkOp --
- *
- *	Reorders the marker (given by the first name) before/after the another
- *	marker (given by the second name) in the marker display list.  If no
- *	second name is given, the marker is placed at the beginning/end of the
- *	list.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Graph will be redrawn to reflect the new display list.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RelinkOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link, place;
-    Marker *markerPtr;
-    const char *string;
-
-    /* Find the marker to be raised or lowered. */
-    if (GetMarkerFromObj(interp, graphPtr, objv[3], &markerPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Right now it's assumed that all markers are always in the display
-       list. */
-    link = markerPtr->link;
-    Blt_Chain_UnlinkLink(graphPtr->markers.displayList, markerPtr->link);
-
-    place = NULL;
-    if (objc == 5) {
-	if (GetMarkerFromObj(interp, graphPtr, objv[4], &markerPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	place = markerPtr->link;
-    }
-
-    /* Link the marker at its new position. */
-    string = Tcl_GetString(objv[2]);
-    if (string[0] == 'l') {
-	Blt_Chain_LinkAfter(graphPtr->markers.displayList, link, place);
-    } else {
-	Blt_Chain_LinkBefore(graphPtr->markers.displayList, link, place);
-    }
-    if (markerPtr->drawUnder) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *	Returns if marker by a given ID currently exists.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FindOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link;
-    Region2d extents;
-    const char *string;
-    int enclosed;
-    int left, right, top, bottom;
-    int mode;
-
-#define FIND_ENCLOSED	 (1<<0)
-#define FIND_OVERLAPPING (1<<1)
-    string = Tcl_GetString(objv[3]);
-    if (strcmp(string, "enclosed") == 0) {
-	mode = FIND_ENCLOSED;
-    } else if (strcmp(string, "overlapping") == 0) {
-	mode = FIND_OVERLAPPING;
-    } else {
-	Tcl_AppendResult(interp, "bad search type \"", string, 
-		": should be \"enclosed\", or \"overlapping\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    if ((Tcl_GetIntFromObj(interp, objv[4], &left) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[5], &top) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[6], &right) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[7], &bottom) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (left < right) {
-	extents.left = (double)left;
-	extents.right = (double)right;
-    } else {
-	extents.left = (double)right;
-	extents.right = (double)left;
-    }
-    if (top < bottom) {
-	extents.top = (double)top;
-	extents.bottom = (double)bottom;
-    } else {
-	extents.top = (double)bottom;
-	extents.bottom = (double)top;
-    }
-    enclosed = (mode == FIND_ENCLOSED);
-    for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList);
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-	if (markerPtr->flags & (HIDE|DELETE_PENDING)) {
-	    continue;
-	}
-	if ((markerPtr->elemName != NULL) && (IsElementHidden(markerPtr))) {
-	    continue;
-	}
-	if ((*markerPtr->classPtr->regionProc)(markerPtr, &extents, enclosed)) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_GetObjResult(interp);
-	    Tcl_SetStringObj(objPtr, markerPtr->obj.name, -1);
-	    return TCL_OK;
-	}
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), "", -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExistsOp --
- *
- *	Returns if marker by a given ID currently exists.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ExistsOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&graphPtr->markers.table, Tcl_GetString(objv[3]));
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (hPtr != NULL));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeOp --
- *
- *	Returns a symbolic name for the type of the marker whose ID is given.
- *
- * Results:
- *	A standard TCL result. interp->result will contain the symbolic type
- *	of the marker.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Marker *markerPtr;
-    const char *type;
-
-    if (GetMarkerFromObj(interp, graphPtr, objv[3], &markerPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switch (markerPtr->obj.classId) {
-    case CID_MARKER_BITMAP:	type = "bitmap";	break;
-    case CID_MARKER_IMAGE:	type = "image";		break;
-    case CID_MARKER_LINE:	type = "line";		break;
-    case CID_MARKER_POLYGON:	type = "polygon";	break;
-    case CID_MARKER_TEXT:	type = "text";		break;
-    case CID_MARKER_WINDOW:	type = "window";	break;
-    default:			type = "???";		break;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), type, -1);
-    return TCL_OK;
-}
-
-/* Public routines */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MarkerOp --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to a widget managed by this module.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec markerOps[] =
-{
-    {"bind",      1, BindOp,   3, 6, "marker sequence command",},
-    {"cget",      2, CgetOp,   5, 5, "marker option",},
-    {"configure", 2, ConfigureOp, 4, 0,"marker ?marker?... ?option value?...",},
-    {"create",    2, CreateOp, 4, 0, "type ?option value?...",},
-    {"delete",    1, DeleteOp, 3, 0, "?marker?...",},
-    {"exists",    1, ExistsOp, 4, 4, "marker",},
-    {"find",      1, FindOp,   8, 8, "enclosed|overlapping x1 y1 x2 y2",},
-    {"get",       1, GetOp,    4, 4, "name",},
-    {"lower",     1, RelinkOp, 4, 5, "marker ?afterMarker?",},
-    {"names",     1, NamesOp,  3, 0, "?pattern?...",},
-    {"raise",     1, RelinkOp, 4, 5, "marker ?beforeMarker?",},
-    {"type",      1, TypeOp,   4, 4, "marker",},
-};
-static int nMarkerOps = sizeof(markerOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-int
-Blt_MarkerOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    GraphMarkerProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nMarkerOps, markerOps, BLT_OP_ARG2, 
-	objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (graphPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MarkersToPostScript --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MarkersToPostScript(Graph *graphPtr, Blt_Ps ps, int under)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->markers.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-	if ((markerPtr->classPtr->postscriptProc == NULL) || 
-	    (markerPtr->nWorldPts == 0)) {
-	    continue;
-	}
-	if (markerPtr->drawUnder != under) {
-	    continue;
-	}
-	if (markerPtr->flags & (HIDE|DELETE_PENDING)) {
-	    continue;
-	}
-	if ((markerPtr->elemName != NULL) && (IsElementHidden(markerPtr))) {
-	    continue;
-	}
-	Blt_Ps_VarAppend(ps, "\n% Marker \"", markerPtr->obj.name, 
-		"\" is a ", markerPtr->obj.className, ".\n", (char *)NULL);
-	(*markerPtr->classPtr->postscriptProc) (markerPtr, ps);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawMarkers --
- *
- *	Calls the individual drawing routines (based on marker type) for each
- *	marker in the display list.
- *
- *	A marker will not be drawn if
- *
- *	1) An element linked to the marker (indicated by elemName) is
- *	   currently hidden.
- *
- *	2) No coordinates have been specified for the marker.
- *
- *	3) The marker is requesting to be drawn at a different level
- *	   (above/below the elements) from the current mode.
- *
- *	4) The marker is configured as hidden (-hide option).
- *
- *	5) The marker isn't visible in the current viewport (i.e. clipped).
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	Markers are drawn into the drawable (pixmap) which will eventually
- *	be displayed in the graph window.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawMarkers(Graph *graphPtr, Drawable drawable, int under)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(graphPtr->markers.displayList); 
-	 link != NULL; link = Blt_Chain_PrevLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-
-	if ((markerPtr->nWorldPts == 0) || 
-	    (markerPtr->drawUnder != under) ||
-	    (markerPtr->clipped) ||
-	    (markerPtr->flags & (DELETE_PENDING|HIDE))) {
-	    continue;
-	}
-	if ((markerPtr->elemName != NULL) && (IsElementHidden(markerPtr))) {
-	    continue;
-	}
-	(*markerPtr->classPtr->drawProc) (markerPtr, drawable);
-    }
-}
-
-void
-Blt_ConfigureMarkers(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-	(*markerPtr->classPtr->configProc) (markerPtr);
-    }
-}
-
-void
-Blt_MapMarkers(Graph *graphPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-	if (markerPtr->nWorldPts == 0) {
-	    continue;
-	}
-	if (markerPtr->flags & (HIDE|DELETE_PENDING)) {
-	    continue;
-	}
-	if ((graphPtr->flags & MAP_ALL) || (markerPtr->flags & MAP_ITEM)) {
-	    (*markerPtr->classPtr->mapProc) (markerPtr);
-	    markerPtr->flags &= ~MAP_ITEM;
-	}
-    }
-}
-
-void
-Blt_DestroyMarkers(Graph *graphPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->markers.table, &iter); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_GetHashValue(hPtr);
-	/*
-	 * Dereferencing the pointer to the hash table prevents the hash table
-	 * entry from being automatically deleted.
-	 */
-	markerPtr->hashPtr = NULL;
-	DestroyMarker(markerPtr);
-    }
-    Blt_DeleteHashTable(&graphPtr->markers.table);
-    Blt_DeleteHashTable(&graphPtr->markers.tagTable);
-    Blt_Chain_Destroy(graphPtr->markers.displayList);
-}
-
-Marker *
-Blt_NearestMarker(
-    Graph *graphPtr,
-    int x, int y,			/* Screen coordinates */
-    int under)
-{
-    Blt_ChainLink link;
-    Point2d point;
-
-    point.x = (double)x;
-    point.y = (double)y;
-    for (link = Blt_Chain_FirstLink(graphPtr->markers.displayList);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	Marker *markerPtr;
-
-	markerPtr = Blt_Chain_GetValue(link);
-	if ((markerPtr->nWorldPts == 0) ||
-	    (markerPtr->flags & (HIDE|DELETE_PENDING|MAP_ITEM))) {
-	    continue;			/* Don't consider markers that are
-					 * pending to be mapped. Even if the
-					 * marker has already been mapped, the
-					 * coordinates could be invalid now.
-					 * Better to pick no marker than the
-					 * wrong marker. */
-
-	}
-	if ((markerPtr->elemName != NULL) && (IsElementHidden(markerPtr))) {
-	    continue;
-	}
-	if ((markerPtr->drawUnder == under) && 
-	    (markerPtr->state == STATE_NORMAL)) {
-	    if ((*markerPtr->classPtr->pointProc) (markerPtr, &point)) {
-		return markerPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-ClientData
-Blt_MakeMarkerTag(Graph *graphPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    assert(tagName != NULL);
-    hPtr = Blt_CreateHashEntry(&graphPtr->markers.tagTable, tagName, &isNew);
-    return Blt_GetHashKey(&graphPtr->markers.tagTable, hPtr);
-}
-
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureArrows --
- *
- *	If arrowheads have been requested for a line, this procedure makes
- *	arrangements for the arrowheads.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- * Side effects:
- *	Information in linePtr is set up for one or two arrowheads.  the
- *	firstArrowPtr and lastArrowPtr polygons are allocated and initialized,
- *	if need be, and the end points of the line are adjusted so that a
- *	thick line doesn't stick out past the arrowheads.
- *
- *---------------------------------------------------------------------------
- */
-
-	/* ARGSUSED */
-static int
-ConfigureArrows(canvas, linePtr)
-    Tk_Canvas canvas;			/* Canvas in which arrows will be
-					 * displayed (interp and tkwin fields
-					 * are needed). */
-    LineItem *linePtr;			/* Item to configure for arrows. */
-{
-    double *poly, *coordPtr;
-    double dx, dy, length, sinTheta, cosTheta, temp;
-    double fracHeight;			/* Line width as fraction of arrowhead
-					 * width. */
-    double backup;			/* Distance to backup end points so
-					 * the line ends in the middle of the
-					 * arrowhead. */
-    double vertX, vertY;		/* Position of arrowhead vertex. */
-    double shapeA, shapeB, shapeC;	/* Adjusted coordinates (see
-					 * explanation below). */
-    double width;
-    Tk_State state = linePtr->header.state;
-
-    if (linePtr->numPoints <2) {
-	return TCL_OK;
-    }
-
-    if(state == TK_STATE_NULL) {
-	state = ((TkCanvas *)canvas)->canvas_state;
-    }
-
-    width = linePtr->outline.width;
-    if (((TkCanvas *)canvas)->currentItemPtr == (Tk_Item *)linePtr) {
-	if (linePtr->outline.activeWidth>width) {
-	    width = linePtr->outline.activeWidth;
-	}
-    } else if (state==TK_STATE_DISABLED) {
-	if (linePtr->outline.disabledWidth>0) {
-	    width = linePtr->outline.disabledWidth;
-	}
-    }
-
-    /*
-     * The code below makes a tiny increase in the shape parameters for the
-     * line.  This is a bit of a hack, but it seems to result in displays that
-     * more closely approximate the specified parameters.  Without the
-     * adjustment, the arrows come out smaller than expected.
-     */
-
-    shapeA = linePtr->arrowShapeA + 0.001;
-    shapeB = linePtr->arrowShapeB + 0.001;
-    shapeC = linePtr->arrowShapeC + width/2.0 + 0.001;
-
-    /*
-     * If there's an arrowhead on the first point of the line, compute its
-     * polygon and adjust the first point of the line so that the line doesn't
-     * stick out past the leading edge of the arrowhead.
-     */
-
-    fracHeight = (width/2.0)/shapeC;
-    backup = fracHeight*shapeB + shapeA*(1.0 - fracHeight)/2.0;
-    if (linePtr->arrow != ARROWS_LAST) {
-	poly = linePtr->firstArrowPtr;
-	if (poly == NULL) {
-	    poly = (double *) ckalloc((unsigned)
-		    (2*PTS_IN_ARROW*sizeof(double)));
-	    poly[0] = poly[10] = linePtr->coordPtr[0];
-	    poly[1] = poly[11] = linePtr->coordPtr[1];
-	    linePtr->firstArrowPtr = poly;
-	}
-	dx = poly[0] - linePtr->coordPtr[2];
-	dy = poly[1] - linePtr->coordPtr[3];
-	length = hypot(dx, dy);
-	if (length == 0) {
-	    sinTheta = cosTheta = 0.0;
-	} else {
-	    sinTheta = dy/length;
-	    cosTheta = dx/length;
-	}
-	vertX = poly[0] - shapeA*cosTheta;
-	vertY = poly[1] - shapeA*sinTheta;
-	temp = shapeC*sinTheta;
-	poly[2] = poly[0] - shapeB*cosTheta + temp;
-	poly[8] = poly[2] - 2*temp;
-	temp = shapeC*cosTheta;
-	poly[3] = poly[1] - shapeB*sinTheta - temp;
-	poly[9] = poly[3] + 2*temp;
-	poly[4] = poly[2]*fracHeight + vertX*(1.0-fracHeight);
-	poly[5] = poly[3]*fracHeight + vertY*(1.0-fracHeight);
-	poly[6] = poly[8]*fracHeight + vertX*(1.0-fracHeight);
-	poly[7] = poly[9]*fracHeight + vertY*(1.0-fracHeight);
-
-	/*
-	 * Polygon done.  Now move the first point towards the second so that
-	 * the corners at the end of the line are inside the arrowhead.
-	 */
-
-	linePtr->coordPtr[0] = poly[0] - backup*cosTheta;
-	linePtr->coordPtr[1] = poly[1] - backup*sinTheta;
-    }
-
-    /*
-     * Similar arrowhead calculation for the last point of the line.
-     */
-
-    if (linePtr->arrow != ARROWS_FIRST) {
-	coordPtr = linePtr->coordPtr + 2*(linePtr->numPoints-2);
-	poly = linePtr->lastArrowPtr;
-	if (poly == NULL) {
-	    poly = (double *) ckalloc((unsigned)
-		    (2*PTS_IN_ARROW*sizeof(double)));
-	    poly[0] = poly[10] = coordPtr[2];
-	    poly[1] = poly[11] = coordPtr[3];
-	    linePtr->lastArrowPtr = poly;
-	}
-	dx = poly[0] - coordPtr[0];
-	dy = poly[1] - coordPtr[1];
-	length = hypot(dx, dy);
-	if (length == 0) {
-	    sinTheta = cosTheta = 0.0;
-	} else {
-	    sinTheta = dy/length;
-	    cosTheta = dx/length;
-	}
-	vertX = poly[0] - shapeA*cosTheta;
-	vertY = poly[1] - shapeA*sinTheta;
-	temp = shapeC*sinTheta;
-	poly[2] = poly[0] - shapeB*cosTheta + temp;
-	poly[8] = poly[2] - 2*temp;
-	temp = shapeC*cosTheta;
-	poly[3] = poly[1] - shapeB*sinTheta - temp;
-	poly[9] = poly[3] + 2*temp;
-	poly[4] = poly[2]*fracHeight + vertX*(1.0-fracHeight);
-	poly[5] = poly[3]*fracHeight + vertY*(1.0-fracHeight);
-	poly[6] = poly[8]*fracHeight + vertX*(1.0-fracHeight);
-	poly[7] = poly[9]*fracHeight + vertY*(1.0-fracHeight);
-	coordPtr[2] = poly[0] - backup*cosTheta;
-	coordPtr[3] = poly[1] - backup*sinTheta;
-    }
-
-    return TCL_OK;
-}
-#endif
diff --git a/blt3.0/src/bltGrMesh.c b/blt3.0/src/bltGrMesh.c
deleted file mode 100644
index fa773bf..0000000
--- a/blt3.0/src/bltGrMesh.c
+++ /dev/null
@@ -1,1747 +0,0 @@
-
-typedef unsigned int PointIndex;
-
-typedef struct {
-    float x, y;
-    int index;
-} MeshPoint;
-
-typedef struct {
-    PointIndex a, b;		/* Index of two points in x, y, point array */
-} Edge;
-
-typedef struct {
-    PointIndex ab, bc, ac;	/* Index of three edges representing a
-				 * triangle in the edge array. */
-    float min, max;
-} Triangle;
-
-typedef Mesh *(MeshCreateProc)(void);
-typedef void (MeshDestroyProc)(Mesh *meshPtr);
-typedef void (MeshConfigureProc)(Mesh *meshPtr);
-
-typedef enum MeshTypes {
-    MESH_CLOUD, MESH_REGULAR, MESH_IRREGULAR, MESH_TRIANGULAR
-} MeshType;
-
-typedef struct {
-    enum MeshTypes type;	/* Indicates type of mesh. */
-    const char *name;		/* String representation for type of class. */
-    Blt_ConfigSpec *configSpecs; /* Mesh configuration specifications. */
-    MeshDestroyProc *destroyProc;
-    MeshConfigureProc *configProc;
-} MeshClass;
-
-typedef enum SourceTypes {
-    SOURCE_LIST, SOURCE_VECTOR, SOURCE_TABLE, SOURCE_NONE
-} SourceType;
-
-typedef struct {
-    enum SourceTypes type;	/* Selects the type of data populating this
-				 * vector: SOURCE_VECTOR,
-				 * SOURCE_TABLE, or SOURCE_LIST */
-    SourceGetProc *getProc;
-    SourceDestroyProc *destroyProc;
-    SourcePrintProc *printProc;
-} DataSourceClass;
-
-typedef struct {
-    float min, max, logMin;
-    float *values;
-    float nValues;
-} DataSourceResult;
-
-typedef struct {
-    DataSourceClass *classPtr;
-    DataSourceChangedProc *proc;
-    ClientData clientData;
-} DataSource;
-
-typedef int (SourceGetProc)(Tcl_Interp *interp, DataSource *srcPtr, 
-	DataSourceResult *resultPtr);
-typedef int (SourceDestroyProc)(DataSource *srcPtr);
-typedef Tcl_Obj * (SourcePrintProc)(DataSource *srcPtr);
-
-typedef struct {
-    DataSourceClass *classPtr;
-    DataSourceChangedProc *proc;
-    ClientData clientData;
-    Blt_VectorId vector;
-} VectorDataSource;
-
-typedef struct {
-    DataSourceClass *classPtr;
-    DataSourceChangedProc *proc;
-    ClientData clientData;
-    float *values;
-    int nValues;
-} ListDataSource;
-
-typedef struct {
-    Blt_Table table;
-    int refCount;
-} TableClient;
-
-typedef struct {
-    DataSourceClass *classPtr;
-    DataSourceChangedProc *proc;
-    ClientData clientData;
-
-    Blt_Table table;	/* Data table. */ 
-    Blt_TableColumn column;	/* Column of data used. */
-    Blt_TableNotifier notifier; /* Notifier used for column (destroy). */
-    Blt_TableTrace trace;	/* Trace used for column (set/get/unset). */
-    Blt_HashEntry *hashPtr;	/* Pointer to entry of source in graph's hash
-				 * table of datatables. One graph may use
-				 * multiple columns from the same data
-				 * table. */
-} TableDataSource;
-
-typedef struct {
-    const char *name;		/* Mesh identifier. */
-    MeshClass *classPtr;
-    Graph *graphPtr;		/* Graph that the mesh is associated with. */
-    unsigned int flags;		/* Indicates if the mesh element is active or
-				 * normal */
-    int refCount;		/* Reference count for elements using this
-				 * mesh. */
-    Blt_HashEntry *hashPtr;
-
-    /* Resulting mesh is a triangular grid.  */
-    MeshPoint *points;		/* Array of points representing the mesh. */
-    int nPoints;		/* # of points in array. */
-    int *hull;			/* Array of indices of points representing the
-				 * convex hull of the mesh. */
-    int nHullPts;
-    float xMin, yMin, xMax, yMax, xLogMin, yLogMin;
-
-    Edges *edges;		/* Array of edges. */
-    int nEdges;			/* # of edges in array. */
-    Triangles *triangles;	/* Array of triangles. */
-    int nTriangles;		/* # of triangles in array. */
-    DataSource *x, *y;
-} Mesh;
-
-typedef struct {
-    const char *name;		/* Mesh identifier. */
-    MeshClass *classPtr;
-    Graph *graphPtr;		/* Graph that the mesh is associated with. */
-
-    unsigned int flags;		/* Indicates if the mesh element is active or
-				 * normal */
-    int refCount;		/* Reference count for elements using this
-				 * mesh. */
-    Blt_HashEntry *hashPtr;
-
-    /* Resulting mesh is a triangular grid.  */
-    MeshPoint *points;		/* Array of points representing the mesh. */
-    int nPoints;		/* # of points in array. */
-    int *hull;			/* Array of indices of points representing the
-				 * convex hull of the mesh. */
-    int nHullPts;
-    float xMin, yMin, xMax, yMax, xLogMin, yLogMin;
-
-    Edges *edges;		/* Array of edges. */
-    int nEdges;			/* # of edges in array. */
-    Triangles *triangles;	/* Array of triangles. */
-    int nTriangles;		/* # of triangles in array. */
-
-    DataSource *x, *y;
-} RegularMesh;
-
-typedef struct {
-    const char *name;		/* Mesh identifier. */
-    MeshClass *classPtr;
-    Graph *graphPtr;		/* Graph that the mesh is associated with. */
-
-    unsigned int flags;		/* Indicates if the mesh element is active or
-				 * normal */
-    int refCount;		/* Reference count for elements using this
-				 * mesh. */
-    Blt_HashEntry *hashPtr;
-
-    /* Resulting mesh is a triangular grid.  */
-    MeshPoint *points;		/* Array of points representing the mesh. */
-    int nPoints;		/* # of points in array. */
-    int *hull;			/* Array of indices of points representing the
-				 * convex hull of the mesh. */
-    int nHullPts;
-    float xMin, yMin, xMax, yMax, xLogMin, yLogMin;
-
-    Edges *edges;		/* Array of edges. */
-    int nEdges;			/* # of edges in array. */
-    Triangles *triangles;	/* Array of triangles. */
-    int nTriangles;		/* # of triangles in array. */
-
-    DataSource *x, *y;
-} IrregularMesh;
-
-typedef struct {
-    const char *name;		/* Mesh identifier. */
-    MeshClass *classPtr;
-    Graph *graphPtr;		/* Graph that the mesh is associated with. */
-
-    unsigned int flags;		/* Indicates if the mesh element is active or
-				 * normal */
-    int refCount;		/* Reference count for elements using this
-				 * mesh. */
-    Blt_HashEntry *hashPtr;
-
-    /* Resulting mesh is a triangular grid.  */
-    MeshPoint *points;		/* Array of points representing the mesh. */
-    int nPoints;		/* # of points in array. */
-    int *hull;			/* Array of indices of points representing the
-				 * convex hull of the mesh. */
-    int nHullPts;
-    float xMin, yMin, xMax, yMax, xLogMin, yLogMin;
-
-    Edges *edges;		/* Array of edges. */
-    int nEdges;			/* # of edges in array. */
-    Triangles *triangles;	/* Array of triangles. */
-    int nTriangles;		/* # of triangles in array. */
-
-    DataSource *x, *y;
-} CloudMesh;
-
-static MeshConfigureProc CloudMeshConfigureProc;
-static MeshDestroyProc   CloudMeshDestroyProc;
-
-static MeshConfigureProc IrregularMeshConfigureProc;
-static MeshDestroyProc   IrregularMeshDestroyProc;
-
-static MeshConfigureProc RegularMeshConfigureProc;
-static MeshDestroyProc   RegularMeshDestroyProc;
-
-static MeshConfigureProc TriangularMeshConfigureProc;
-static MeshDestroyProc   TriangularMeshDestroyProc;
-
-static MeshClass cloudMeshClass = {
-    MESH_CLOUD, "Cloud",
-    CloudMeshConfigureProc,
-    CloudMeshDestroyProc,
-};
-
-static MeshClass regularMeshClass = {
-    MESH_REGULAR, "Regular",
-    RegularMeshConfigureProc,
-    RegularMeshDestroyProc,
-};
-
-static MeshClass triangularMeshClass = {
-    MESH_TRIANGULAR, "Triangular",
-    TriangularMeshConfigureProc,
-    TriangularMeshDestroyProc,
-};
-
-static MeshClass irregularMeshClass = {
-    MESH_IRREGULAR, "Irregular",
-    IrregularMeshConfigureProc,
-    IrregularMeshDestroyProc,
-};
-
-static SourceGetProc     ListDataSourceGetProc;
-static SourcePrintProc   ListDataSourcePrintProc;
-static SourceDestroyProc ListDataSourceDestroyProc;
-
-static SourceGetProc     TableDataSourceGetProc;
-static SourcePrintProc   TableDataSourcePrintProc;
-static SourceDestroyProc TableDataSourceDestroyProc;
-
-static SourceGetProc     VectorDataSourceGetProc;
-static SourcePrintProc   VectorDataSourcePrintProc;
-static SourceDestroyProc VectorDataSourceDestroyProc;
-
-static DataSourceClass listDataSourceClass = {
-    SOURCE_LIST, "List",
-    ListDataSourceGetProc,
-    ListDataSourceDestroyProc,
-    ListDataSourcePrintProc
-};
-
-static DataSourceClass vectorDataSourceClass = {
-    SOURCE_VECTOR, "Vector",
-    VectorDataSourceGetProc,
-    VectorDataSourceDestroyProc,
-    VectorDataSourcePrintProc
-};
-
-static DataSourceClass tableDataSourceClass = {
-    SOURCE_TABLE, "Table",
-    TableDataSourceGetProc,
-    TableDataSourceDestroyProc,
-    TableDataSourcePrintProc
-};
-
-static Blt_OptionFreeProc FreeDataSource;
-static Blt_OptionParseProc ObjToDataSource;
-static Blt_OptionPrintProc DataSourceToObj;
-Blt_CustomOption bltDataSourceOption =
-{
-    ObjToDataSourceProc, DataSourceToObjProc, FreeDataSourceProc, (ClientData)0
-};
-
-static Blt_ConfigSpec cloudMeshSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-name", "name", "name", (char *)NULL, 
-        Blt_Offset(Cloud, name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-        Blt_Offset(Cloud, x), 0, &bltDataSourceOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-        Blt_Offset(Cloud, y), 0, &bltDataSourceOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec regularMeshSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-name", "name", "name", (char *)NULL, 
-        Blt_Offset(Cloud, name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-        Blt_Offset(Cloud, x), 0, &bltDataSourceOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-        Blt_Offset(Cloud, y), 0, &bltDataSourceOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec irregularMeshSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-name", "name", "name", (char *)NULL, 
-        Blt_Offset(Cloud, name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-        Blt_Offset(Cloud, x), 0, &bltDataSourceOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-        Blt_Offset(Cloud, y), 0, &bltDataSourceOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec triangularMeshSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-name", "name", "name", (char *)NULL, 
-        Blt_Offset(Cloud, name), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-x", "xData", "XData", (char *)NULL, 
-        Blt_Offset(Cloud, x), 0, &bltDataSourceOption},
-    {BLT_CONFIG_CUSTOM, "-y", "yData", "YData", (char *)NULL, 
-        Blt_Offset(Cloud, y), 0, &bltDataSourceOption},
-    {BLT_CONFIG_CUSTOM, "-triangles", "triangles", "Triangles", (char *)NULL, 
-        Blt_Offset(Cloud, triangles), 0, &trianglesOption},
-    {BLT_CONFIG_CUSTOM, "-edges", "edges", "Edges", (char *)NULL, 
-        Blt_Offset(Cloud, edges), 0, &edgesOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Tcl_Obj *
-VectorDataSourcePrintProc(DataSource *dataSrcPtr)
-{
-    VectorDataSource *srcPtr = (VectorDataSource *)dataSrcPtr;
-	    
-    return Tcl_NewStringObj(Blt_NameOfVectorId(srcPtr->vector), -1);
-}
-
-static void
-VectorDataSourceDestroyProc(DataSource *dataSrcPtr)
-{
-    VectorDataSource *srcPtr = (VectorDataSource *)dataSrcPtr;
-
-    Blt_SetVectorChangedProc(srcPtr->vector, NULL, NULL);
-    if (srcPtr->vector != NULL) { 
-	Blt_FreeVectorId(srcPtr->vector); 
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorChangedProc --
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-VectorChangedProc(Tcl_Interp *interp, ClientData clientData, 
-		  Blt_VectorNotify notify)
-{
-    VectorDataSource *srcPtr = clientData;
-
-    if (notify == BLT_VECTOR_NOTIFY_DESTROY) {
-	DestroyDataSource(srcPtr);
-	return;
-    } 
-    (*srcPtr->proc)(srcPtr->clientData);
-}
-
-static DataSource *
-CreateVectorDataSource(Tcl_Interp *interp, const char *name)
-{
-    Blt_Vector *vecPtr;
-    VectorDataSource *srcPtr;
-    
-    srcPtr = Blt_AssertCalloc(sizeof(VectorDataSource));
-    srcPtr->type = SOURCE_VECTOR;
-    srcPtr->vector = Blt_AllocVectorId(interp, name);
-    if (Blt_GetVectorById(interp, srcPtr->vector, &vecPtr) != TCL_OK) {
-	Blt_Free(srcPtr);
-	return NULL;
-    }
-    Blt_SetVectorChangedProc(srcPtr->vector, VectorChangedProc, srcPtr);
-    return (DataSource *)srcPtr;
-}
-
-static int
-VectorDataSourceGetProc(Tcl_Interp *interp, DataSource *dataSrcPtr, 
-			DataSourceResult *resultPtr)
-{
-    VectorDataSource *srcPtr = (VectorDataSource *)dataSrcPtr;
-    size_t nBytes;
-    Blt_Vector *vector;
-
-    if (Blt_GetVectorById(interp, srcPtr->vector, &vector) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    nBytes = Blt_VecLength(vector) * sizeof(float);
-    values = Blt_Malloc(nBytes);
-    if (values == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't allocate new vector", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    {
-	float *values;
-	float min, max, logMin;
-	double *data;
-	double *p; 
-	int i;
-
-	p = Blt_VecData(vector);
-	logMin = min = max = (float)*p++;
-	for (i = 0; i < Blt_VecLength(vector); i++, p++) {
-	    values[i] = (float)*p;
-	    if (*p > max) {
-		max = (float)*p;
-	    } else if (*p < min) {
-		min = (float)*p;
-	    }
-	    if ((*p > 0.0f) && (*p < logMin)) {
-		logMin = (float)*p;
-	    }
-	}
-	resultPtr->min = min;
-	resultPtr->max = max;
-	resultPtr->logMin = logMin;
-    }
-    resultPtr->values = values;
-    resultPtr->nValues = Blt_VecLength(vector);
-    return TCL_OK;
-}
-
-static Tcl_Obj *
-ListDataSourcePrintProc(DataSource *dataSrcPtr)
-{
-    ListDataSource *srcPtr = (ListDataSource *)dataSrcPtr;
-    Tcl_Obj *listObjPtr;
-    float *vp, *vend; 
-    
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (vp = srcPtr->values, vend = vp + srcPtr->nValues; vp < vend; vp++) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj((double)*vp));
-    }
-    return listObjPtr;
-}
-
-static void
-ListDataSourceDestroyProc(DataSource *dataSrcPtr)
-{
-    ListDataSource *srcPtr = (ListDataSource *)dataSrcPtr;
-
-    if (srcPtr->values != NULL) {
-	Blt_Free(srcPtr->values);
-    }
-    (*srcPtr->proc)(srcPtr, srcPtr->clientData);
-}
-
-static DataSource *
-CreateListDataSource(Tcl_Interp *interp, int objc, Tcl_Obj **objv)
-{
-    float *values;
-    int nValues;
-    ListDataSource *srcPtr;
-
-    srcPtr = Blt_AssertMalloc(sizeof(ListDataSource));
-    srcPtr->type = SOURCE_LIST;
-
-    nValues = 0;
-    values = NULL;
-
-    if (objc > 0) {
-	float *p;
-	int i;
-
-	values = Blt_Malloc(sizeof(float) * objc);
-	if (values == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate new vector", (char *)NULL);
-	    return NULL;
-	}
-	for (p = values, i = 0; i < objc; i++, p++) {
-	    double value;
-
-	    if (Blt_ExprDoubleFromObj(interp, objv[i], &value) != TCL_OK) {
-		Blt_Free(array);
-		return TCL_ERROR;
-	    }
-	    *p = (float)value;
-	}
-	srcPtr->values = values;
-	srcPtr->nValues = objc;
-    }
-    return (DataSource *)srcPtr;
-}
-
-static int
-ListDataSourceGetProc(Tcl_Interp *interp, SourceData *dataSrcPtr, float *minPtr,
-		      DataSourceResult *resultPtr)
-{
-    long i, j;
-    float *values;
-    float min, max, logMin;
-    ListDataSource *srcPtr = (ListDataSource *)dataSrcPtr;
-
-    values = Blt_Malloc(sizeof(float) * srcPtr->nValues);
-    if (values == NULL) {
-	return TCL_ERROR;
-    }
-    sp = srcPtr->values;
-    logMin = min = max = values[0] = *sp++;
-    for (send = srcPtr->values + srcPtr->nValues; sp < send; sp++) {
-	if (*sp > max) {
-	    max = *sp;
-	} else if (*sp < min) {
-	    min = *sp;
-	}
-	if ((*sp > 0.0f) && (*sp < logMin)) {
-	    logMin = *sp;
-	}
-	values[j] = *sp;
-    }
-    resultPtr->min = min;
-    resultPtr->max = max;
-    resultPtr->logMin = logMin;
-    resultPtr->values = values;
-    resultPtr->nValues = srcPtr->nValues;
-    return TCL_OK;
-}
-
-
-static void
-TableDataSourceDestroyProc(DataSource *dataSrcPtr)
-{
-    TableDataSource *srcPtr = (TableDataSource *)dataSrcPtr;
-
-    if (srcPtr->trace != NULL) {
-	Blt_Table_DeleteTrace(srcPtr->trace);
-    }
-    if (srcPtr->notifier != NULL) {
-	Blt_Table_DeleteNotifier(srcPtr->notifier);
-    }
-    if (srcPtr->hashPtr != NULL) {
-	TableClient *clientPtr;
-
-	clientPtr = Blt_GetHashValue(srcPtr->hashPtr);
-	clientPtr->refCount--;
-	if (clientPtr->refCount == 0) {
-	    if (srcPtr->table != NULL) {
-		Blt_Table_Close(srcPtr->table);
-	    }
-	    Blt_Free(clientPtr);
-	    Blt_DeleteHashEntry(&graphPtr->dataTables, srcPtr->hashPtr);
-	}
-	(*srcPtr->proc)(srcPtr, srcPtr->clientData);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableNotifyProc --
- *
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableNotifyProc(ClientData clientData, Blt_TableNotifyEvent *eventPtr)
-{
-    TableDataSource *srcPtr = clientData;
-
-    if (eventPtr->type == TABLE_NOTIFY_COLUMN_DELETED) {
-	(*srcPtr->classPtr->destroyProc)(srcPtr);
-	srcPtr->classPtr = NULL;
-	return TCL_ERROR;
-    } 
-    (*srcPtr->proc)(srcPtr->clientData);
-    return TCL_OK;
-}
- 
-/*
- *---------------------------------------------------------------------------
- *
- * TableTraceProc --
- *
- *
- * Results:
- *     	None.
- *
- * Side Effects:
- *	Graph is redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableTraceProc(ClientData clientData, Blt_TableTraceEvent *eventPtr)
-{
-    TableDataSource *srcPtr = clientData;
-
-    assert(eventPtr->column == srcPtr->column);
-    (*srcPtr->proc)(srcPtr->clientData);
-    return TCL_OK;
-}
-
-
-static DataSource *
-CreateTableDataSource(Tcl_Interp *interp, const char *name, Tcl_Obj *colObjPtr)
-{
-    TableDataSource *srcPtr;
-    TableClient *clientPtr;
-    int isNew;
-
-    srcPtr = Blt_AssertMalloc(sizeof(TableDataSource));
-    srcPtr->type = SOURCE_TABLE;
-
-    /* See if the graph is already using this table. */
-    srcPtr->hashPtr = Blt_CreateHashEntry(&graphPtr->dataTables, name, &isNew);
-    if (isNew) {
-	if (Blt_Table_Open(interp, name, &srcPtr->table) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	clientPtr = Blt_AssertMalloc(sizeof(TableClient));
-	clientPtr->table = srcPtr->table;
-	clientPtr->refCount = 1;
-	Blt_SetHashValue(srcPtr->hashPtr, clientPtr);
-    } else {
-	clientPtr = Blt_GetHashValue(srcPtr->hashPtr);
-	srcPtr->table = clientPtr->table;
-	clientPtr->refCount++;
-    }
-    srcPtr->column = Blt_Table_FindColumn(interp, srcPtr->table, colObjPtr);
-    if (srcPtr->column == NULL) {
-	goto error;
-    }
-    srcPtr->notifier = Blt_Table_CreateColumnNotifier(interp, srcPtr->table,
-	srcPtr->column, TABLE_NOTIFY_COLUMN_CHANGED, TableNotifyProc, 
-	(Blt_TableNotifierDeleteProc *)NULL, srcPtr);
-    srcPtr->trace = Blt_Table_CreateColumnTrace(srcPtr->table, 
-	srcPtr->column, 
-	(TABLE_TRACE_WRITES | TABLE_TRACE_UNSETS | TABLE_TRACE_CREATES), TableTraceProc,
-	(Blt_TableTraceDeleteProc *)NULL, srcPtr);
-    return (DataSource *)srcPtr;
- error:
-    DestroyDataSource(srcPtr);
-    return NULL;
-}
-
-static Tcl_Obj *
-TableDataSourcePrintProc(DataSource *dataSrcPtr)
-{
-    TableDataSource *srcPtr = (TableDataSource *)dataSrcPtr;
-    Tcl_Obj *listObjPtr;
-    const char *name;
-    long index;
-    
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    name = Blt_Table_TableName(srcPtr->table);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(name, -1));
-    
-    index = Blt_Table_ColumnIndex(srcPtr->column);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewLongObj(index));
-    return listObjPtr;
-}
-
-static int
-TableDataSourceGetProc(Tcl_Interp *interp, SourceData *dataSrcPtr, 
-		       DataSourceResult *resultPtr)
-{
-    Blt_Table table;
-    float *values;
-    float min, max, logMin;
-    long i, j;
-
-    table = srcPtr->table;
-    values = Blt_Malloc(sizeof(float) * Blt_Table_NumRows(table));
-    if (values == NULL) {
-	return TCL_ERROR;
-    }
-    logMin = min = FLT_MAX, max = -FLT_MAX;
-    for (j = 0, i = 1; i < Blt_Table_NumRows(table); i++) {
-	Blt_TableRow row;
-	Tcl_Obj *objPtr;
-	double value;
-
-	row = Blt_Table_GetRowByIndex(table, i);
-	objPtr  = Blt_Table_GetObj(table, row, col);
-	if (objPtr == NULL) {
-	    continue;			/* Ignore empty values. */
-	}
-	if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	values[j] = (float)value;
-	if (values[j] < min) {
-	    min = values[j];
-	}
-	if (values[j] > max) {
-	    max = values[j];
-	}
-	if ((values[j] > 0.0f) && (values[j] < logMin)) {
-	    logMin = values[j];
-	}
-	j++;
-    }
-    resultPtr->min = min;
-    resultPtr->max = max;
-    resultPtr->logMin = logMin;
-    resultPtr->values = values;
-    resultPtr->nValues = j;
-    return TCL_OK;
-}
-
-static void
-DestroyDataSource(DataSource *dataSrcPtr)
-{
-    if ((dataSrcPtr->classPtr != NULL) && 
-	(dataSrcPtr->classPtr->destroyProc != NULL)) {
-	(*dataSrcPtr->classPtr->destroyProc)(dataSrcPtr);
-    }
-    Blt_Free(dataSrcPtr);
-}
-
-
-/*ARGSUSED*/
-static void
-FreeDataSourceProc(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    DataSource *srcPtr = (DataSource *)(widgRec + offset);
-
-    DestroyDataSource(srcPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToDataSourceProc --
- *
- *	Given a string representation of a data source, converts it into its
- *	equivalent data source.  A data source may be a list of numbers, a
- *	vector name, or a two element list of table name and column.
- *
- * Results:
- *	The return value is a standard TCL result.  The data source is passed
- *	back via the srcPtr.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToDataSourceProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* TCL list of expressions */
-    char *widgRec,		/* Element record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Mesh *meshPtr = clientData;
-    DataSource *srcPtr;
-    DataSource **dataSrcPtrPtr = (DataSource **)(widgRec + offset);
-    Tcl_Obj **objv;
-    int objc;
-    const char *string;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	if (*dataSrcPtrPtr != NULL) {
-	    DestroyDataSource(*dataSrcPtrPtr);
-	}
-	*dataSrcPtrPtr = NULL;
-	return TCL_OK;
-    }
-    string = Tcl_GetString(objv[0]);
-    if ((objc == 1) && (Blt_VectorExists2(interp, string))) {
-	srcPtr = CreateVectorDataSource(interp, string);
-    } else if ((objc == 2) && (Blt_Table_TableExists(interp, string))) {
-	srcPtr = CreateTableDataSource(interp, string, objv[1]);
-    } else {
-	srcPtr = CreateListDataSource(interp, objc, objv);
-    }
-    srcPtr->clientData = meshPtr;
-    srcPtr->proc = meshPtr->classPtr->configProc;
-    if (*dataSrcPtrPtr != NULL) {
-	DestroyDataSource(*dataSrcPtrPtr);
-    }
-    *dataSrcPtrPtr = srcPtr;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DataSourceToObjProc --
- *
- *	Converts the data source to its equivalent string representation.
- *	The data source may be a table, vector, or list.
- *
- * Results:
- *	The string representation of the data source is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-DataSourceToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Element record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    DataSource *srcPtr = (DataSource *)(widgRec + offset);
-    
-    return (srcPtr->classPtr->printProc)(srcPtr);
-}
-
-static void
-DestroyMesh(Mesh *meshPtr)
-{
-    Graph *graphPtr = meshPtr->graphPtr;
-
-    if (meshPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&graphPtr->meshTable, meshPtr->hashPtr);
-    }
-    if (meshPtr->link != NULL) {
-	Blt_Chain_DeleteLink(&graphPtr->meshChain, meshPtr->link);
-    }
-    if (meshPtr->classPtr->destroyProc != NULL) {
-	(*meshPtr->classPtr->destroyProc)(meshPtr);
-    }
-    Blt_FreeOptions(meshPtr->classPtr->configSpecs, (char *)meshPtr,
-	graphPtr->display, 0);
-    if (meshPtr->triangles != NULL) {
-	Blt_Free(meshPtr->triangles);
-    }
-    if (meshPtr->edges != NULL) {
-	Blt_Free(meshPtr->edges);
-    }
-    if (meshPtr->points != NULL) {
-	Blt_Free(meshPtr->points);
-    }
-    if (meshPtr->hull != NULL) {
-	Blt_Free(meshPtr->hull);
-    }
-    if (meshPtr->x != NULL) {
-	DestroyDataSource(meshPtr->x);
-    }
-    if (meshPtr->y != NULL) {
-	DestroyDataSource(meshPtr->y);
-    }
-    Blt_Free(meshPtr);
-    return TCL_OK;
-}
-
-static Mesh *
-GetMeshFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr, 
-	       Mesh **meshPtrPtr)
-{
-    const char *string;
-    Blt_HashEntry *hPtr;
-
-    string = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->meshTable, string);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find mesh \"", string, 
-		"\" in graph \"", Tk_PathName(graphPtr->tkwin), "\"",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    *meshPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-static int
-RegularMeshConfigureProc(Mesh *meshPtr)
-{
-    Tcl_Interp *interp;
-    RegularMesh *regPtr = (RegularMesh *)meshPtr;
-    MeshPoint *points;
-    int i;
-    float xStep, yStep;
-    int count;
-    DataSourceResult x, y;
-
-    interp = meshPtr->interp;
-    if ((regPtr->x->classPtr == NULL) || (regPtr->y->classPtr == NULL)) {
-	return TCL_OK;
-    }
-    if ((*regPtr->x->classPtr->getProc)(interp, regPtr->x, &x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (x.nValues != 3) {
-	Tcl_AppendResult(interp, 
-		"wrong # of elements for x regular mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((*regPtr->y->classPtr->getProc)(interp, regPtr->y, &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (y.nValues != 3) {
-	Tcl_AppendResult(interp, 
-		"wrong # of elements for y rectangular mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-
-    regPtr->xMin = x.values[0];
-    regPtr->xMax = x.values[1];
-    regPtr->xNum = (int)x.values[2];
-    regPtr->yMin = y.values[0];
-    regPtr->yMax = y.values[1];
-    regPtr->yNum = (int)y.values[2];
-    regPtr->xLogMin = x.logMin;
-    regPtr->yLogMin = y.logMin;
-    Blt_Free(x.values);
-    Blt_Free(y.values);
-    
-    if (regPtr->xNum) {
-	Tcl_AppendResult(interp, "# of x-values for rectangular mesh",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (regPtr->yNum) {
-	Tcl_AppendResult(interp, "# of y-values for rectangular mesh",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (regPtr->xMin == regPtr->xMax) {
-	return TCL_ERROR;
-    }
-    if (regPtr->yMin == regPtr->yMax) {
-	return TCL_ERROR;
-    }
-    nPoints = x.nValues * y.nValues;
-    points = Blt_Malloc(nPoints * sizeof(MeshPoint));
-    if (points == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Itoa(nPoints), 
-		" points", (char *)NULL);
-	return TCL_ERROR;
-    }
-    xStep = (regPtr->xMax - regPtr->xMin) / (float)(regPtr->xNum - 1);
-    yStep = (regPtr->yMax - regPtr->yMin) / (float)(regPtr->yNum - 1);
-    {
-	int count;
-	MeshPoint *p;
-
-	p = points;
-	count = 0;
-	for (i = 0; i < regPtr->yNum; i++) {
-	    float y0;
-	    int j;
-	    
-	    y0 = regPtr->yMin + (yStep * i);
-	    for (j = 0; j < regPtr->xNum; j++) {
-		p->x = regPtr->xMin + (xStep * j);
-		p->y = y;
-		p->index = count;
-		count++;
-		p++;
-	    }
-	}
-    }
-    if (regPtr->points != NULL) {
-	Blt_Free(regPtr->points);
-    }
-    regPtr->points = points;
-    regPtr->nPoints = nPoints;
-
-    if (Triangulate(interp, regPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-IrregularMeshConfigureProc(Mesh *meshPtr)
-{
-    IrregularMesh *irregPtr = (IrregularMesh *)meshPtr;
-    MeshPoint *points;
-    int i;
-    DataSourceResult x, y;
-
-    if ((irregPtr->x->classPtr == NULL) || (irregPtr->y->classPtr == NULL)) {
-	return TCL_OK;
-    }
-    if ((*irregPtr->x->classPtr->getProc)(irregPtr->interp, irregPtr->x, &x) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (x.nValues < 2) {
-	Tcl_AppendResult(interp, 
-		"wrong # of elements for x rectangular mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    irregPtr->xMin = x.min;
-    irregPtr->xMax = x.max;
-    irregPtr->xLogMin = x.logMin;
-    if ((*irregPtr->y->classPtr->getProc)(irregPtr->interp, irregPtr->y, &y) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (y.nValues != 2) {
-	Tcl_AppendResult(interp, 
-		"wrong # of elements for y rectangular mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    irregPtr->yMin = y.min;
-    irregPtr->yMax = y.max;
-    irregPtr->yLogMin = y.logMin;
-
-    nPoints = x.nValues * y.nValues;
-    points = Blt_Malloc(nPoints * sizeof(MeshPoint));
-    if (points == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Itoa(nPoints), 
-		" points", (char *)NULL);
-	return TCL_ERROR;
-    }
-    {
-	int i, count;
-	MeshPoint *p;
-
-	p = points;
-	count = 0;
-	for (i = 0; i < y.nValues; i++) {
-	    int j;
-	    
-	    for (j = 0; j < x.nValues; j++) {
-		p->x = x.values[j];
-		p->y = y.values[i];
-		p->index = count;
-		count++;
-		p++;
-	    }
-	}
-    }
-    Blt_Free(x.values);
-    Blt_Free(y.values);
-    if (irregPtr->points != NULL) {
-	Blt_Free(irregPtr->points);
-    }
-    irregPtr->points = points;
-    irregPtr->nPoints = nPoints;
-    irregPtr->xMin = x.min;
-    irregPtr->xLogMin = x.logMin;
-    irregPtr->xMax = x.max;
-    irregPtr->yMin = y.min;
-    irregPtr->yLogMin = y.logMin;
-    irregPtr->yMax = y.max;
-    if (Triangulate(interp, irregPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-CloudMeshConfigureProc(Mesh *meshPtr)
-{
-    CloudMesh *cloudPtr = (CloudMesh *)meshPtr;
-    MeshPoint *points;
-    DataSourceResult x, y;
-    int i, nPoints;
-
-    if ((cloudPtr->x->classPtr == NULL) || (cloudPtr->y->classPtr == NULL)) {
-	return TCL_OK;
-    }
-    if ((*cloudPtr->x->classPtr->getProc)(cloudPtr->interp, cloudPtr->x, &x) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (x.nValues < 3) {
-	Tcl_AppendResult(interp, "too few values for x cloud mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    cloudPtr->xMin = x.min, cloudPtr->xMax = x.max;
-    cloudPtr->logMin = x.logMin;
-    if ((*cloudPtr->y->classPtr->getProc)(cloudPtr->interp, cloudPtr->y, &y) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (y.nValues < 3) {
-	Tcl_AppendResult(interp, 
-		"too few values for y cloud mesh description.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    cloudPtr->yMin = y.min, cloudPtr->yMax = y.max;
-    cloudPtr->logMin = y.logMin;
-    if (x.nValues != y.nValues) {
-	Tcl_AppendResult(interp, " # of values for x and y do not match.",
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    nPoints = x.nValues;
-    points = Blt_Malloc(nPoints * sizeof(MeshPoint));
-    if (points == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Itoa(nPoints), 
-			 " points", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (cloudPtr->points != NULL) {
-	Blt_Free(cloudPtr->points);
-    }
-    for (i = 0; i < nPoints; i++) {
-	p->x = x.values[i];
-	p->y = y.values[i];
-	p->index = i;
-	p++;
-    }
-    Blt_Free(x.values);
-    Blt_Free(y.values);
-    if (cloudPtr->points != NULL) {
-	Blt_Free(cloudPtr->points);
-    }
-    cloudPtr->points = points;
-    cloudPtr->nPoints = nPoints;
-
-    if (Triangulate(interp, cloudPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-TriangularMeshConfigureProc(Mesh *meshPtr)
-{
-    return TCL_OK;
-}
-
-static Mesh *
-CreateTriangularMesh(const char *name)
-{
-    TriangularMesh *meshPtr;
-
-    /* Allocate memory for the new mesh. */
-    meshPtr = Blt_AssertCalloc(1, sizeof(TriangularMesh));
-    meshPtr->classPtr = &triangularMeshClass;
-    meshPtr->name = Blt_AssertStrdup(name);
-    return (Mesh *)meshPtr;
-}
-
-static Mesh *
-CreateRegularMesh(const char *name)
-{
-    RegularMesh *meshPtr;
-
-    /* Allocate memory for the new mesh. */
-    meshPtr = Blt_AssertCalloc(1, sizeof(RegularMesh));
-    meshPtr->classPtr = ®ularMeshClass;
-    meshPtr->name = Blt_AssertStrdup(name);
-    return (Mesh *)meshPtr;
-}
-
-static Mesh *
-CreateIrregularMesh(const char *name)
-{
-    IrregularMesh *meshPtr;
-
-    /* Allocate memory for the new mesh. */
-    meshPtr = Blt_AssertCalloc(1, sizeof(IrregularMesh));
-    meshPtr->classPtr = &irregularMeshClass;
-    meshPtr->name = Blt_AssertStrdup(name);
-    return (Mesh *)meshPtr;
-}
-
-static Mesh *
-CreateCloudMesh(const char *name)
-{
-    CloudMesh *meshPtr;
-
-    /* Allocate memory for the new mesh. */
-    meshPtr = Blt_AssertCalloc(1, sizeof(CloudMesh));
-    meshPtr->classPtr = &cloudMeshClass;
-    meshPtr->name = Blt_AssertStrdup(name);
-    return (Mesh *)meshPtr;
-}
-
-static int
-TypeOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Mesh *meshPtr;
-
-    if (GetMeshFromObj(interp, graphPtr, objv[3], &meshPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), meshPtr->classPtr->type, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Returns a list of marker identifiers in interp->result;
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->meshTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Mesh *meshPtr;
-
-	    meshPtr = Blt_GetHashValue(hPtr);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(meshPtr->name, -1));
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->meshTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Marker *markerPtr;
-	    int i;
-
-	    markerPtr = Blt_GetHashValue(hPtr);
-	    for (i = 3; i < objc; i++) {
-		const char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch(meshPtr->name, pattern)) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr,
-			Tcl_NewStringObj(meshPtr->name, -1));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static int
-ConfigureOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Mesh *meshPtr;
-
-    if (GetMeshFromObj(interp, graphPtr, objv[3], &meshPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		meshPtr->classPtr->configSpecs, (char *)meshPtr, 
-		(Tcl_Obj *)NULL, flags);
-    } else if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		meshPtr->classPtr->configSpecs, (char *)meshPtr, 
-		objv[4], flags);
-    }
-    bltDataSourceOption.clientData = meshPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, 
-		meshPtr->classPtr->configSpecs, objc - 3, objv + 3, 
-		(char *)meshPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((*meshPtr->classPtr->configProc)(meshPtr) != TCL_OK) {
-	return TCL_ERROR;	/* Failed to configure element */
-    }
-    return TCL_OK;
-}
-
-static int
-CreateOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Mesh *meshPtr;
-    Blt_HashEntry *hPtr;
-    char ident[200];
-    char *name;
-    int i;
-    char c;
-    char *string;
-    int length;
-
-    /* Scan for "-name" option. We need it for the component name */
-    name = NULL;
-    for (i = 4; i < objc; i += 2) {
-	string = Tcl_GetStringFromObj(objv[i], &length);
-	if ((length > 1) && (strncmp(string, "-name", length) == 0)) {
-	    name = Tcl_GetString(objv[i + 1]);
-	    break;
-	}
-    }
-    /* If no name was given for the marker, make up one. */
-    if (name == NULL) {
-	sprintf_s(ident, 200, "mesh%d", graphPtr->nextMeshId++);
-	name = ident;
-    } else if (name[0] == '-') {
-	Tcl_AppendResult(interp, "name of marker \"", name, 
-		"\" can't start with a '-'", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    string = Tcl_GetString(objv[3]);
-    c = string[0];
-    length = strlen(string);
-    if ((c == 't') && (strncmp(string, "triangle", length) == 0)) {
-	meshPtr = CreateTrigangularMesh(name);
-    } else if ((c == 'r') && (strncmp(string, "regular", length) == 0)) {
-	meshPtr = CreateRegularMesh(name);
-    } else if ((c == 'i') && (strncmp(string, "irregular", length) == 0)) {
-	meshPtr = CreateIrregularMesh(name);
-    } else if ((c == 'c') && (strncmp(string, "cloud", length) == 0)) {
-	meshPtr = CreateCloudMesh(name);
-    } else {
-	Tcl_AppendResult(interp, "unknown mesh type \"", string, "\"",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    meshPtr->graphPtr = graphPtr;
-    meshPtr->interp = interp;
-    meshPtr->refCount = 1;
-
-    /* Parse the configuration options. */
-    if (Blt_ConfigureComponentFromObj(interp, graphPtr->tkwin, name,
-	meshPtr->classPtr->name, meshPtr->classPtr->configSpecs, 
-	objc - 4, objv + 4, (char *)meshPtr, 0) != TCL_OK) {
-	DestroyMesh(meshPtr);
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(&graphPtr->meshTable, meshPtr->name, &isNew);
-    if (!isNew) {
-	Mesh *oldMeshPtr;
-	oldMeshPtr = Blt_GetHashValue(hPtr);
-	if ((oldMeshPtr->flags & DELETE_PENDING) == 0) {
-	    Tcl_AppendResult(graphPtr->interp, "mesh \"", meshPtr->name,
-		"\" already exists in \"", Tk_PathName(graphPtr->tkwin), "\"",
-		(char *)NULL);
-	    DestroyMesh(meshPtr);
-	    return TCL_ERROR;
-	}
-	oldMeshPtr->hashPtr = NULL; /* Remove the mesh from the table. */
-    }
-    Blt_SetHashValue(hPtr, meshPtr);
-    meshPtr->hashPtr = hPtr;
-    if ((meshPtr->classPtr->configProc)(meshPtr) != TCL_OK) {
-	DestroyMesh(meshPtr);
-	return TCL_ERROR;
-    }
-    meshPtr->link = Blt_Chain_Append(graphPtr->meshChain, meshPtr);
-    return TCL_OK;
-}
-
-static int
-DeleteOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Mesh *meshPtr;
-
-	if (GetMeshFromObj(interp, graphPtr, objv[i], &meshPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (meshPtr->flags & DELETE_PENDING) {
-	    Tcl_AppendResult(interp, "can't find mesh \"", 
-		Tcl_GetString(objv[i]), "\" in \"", 
-		Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	meshPtr->flags |= DELETE_PENDING;
-	if (meshPtr->refCount == 0) {
-	    DestroyMesh(meshPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MeshOp --
- *
- *	.g mesh create regular -name $name -x {x0 xN n} -y {y0 yN n}
- *	.g mesh create irregular -name $name -x $xvalues -y $yvalues 
- *	.g mesh create triangular -name $name -x x -y y -edges $edges \
- *		-triangles $triangles
- *	.g mesh create cloud -name $name -x x -y y 
- *	.g mesh type $name
- *	.g mesh names ?pattern?
- *	.g mesh delete $name
- *	.g mesh configure $name -hide no -linewidth 1 -color black
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec meshOps[] =
-{
-    {"cget",        2, CgetOp,       4, 4, "meshName option",},
-    {"create",      2, CreateOp,     4, 0, "type ?option value?...",},
-    {"configure",   2, ConfigureOp,  3, 0, "meshName ?option value?...",},
-    {"delete",      1, DeleteOp,     3, 0, "?meshName?...",},
-    {"names",       1, NamesOp,      3, 0, "?pattern?...",},
-    {"type",        2, TypeOp,       4, 4, "meshName",},
-};
-static int nMeshOps = sizeof(meshOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_MeshOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nMeshOps, meshOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (interp, graphPtr, objc, objv);
-}
-
-void
-Blt_DestroyMeshes(Graph *graphPtr)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(graphPtr->meshChain); link != NULL;
-	 link = next) {
-	Mesh *meshPtr;
-
-	next = Blt_Chain_NextLink(link);
-	meshPtr = Blt_Chain_GetValue(link);
-	DestroyMesh(meshPtr);
-    }
-}
-
-void
-Blt_FreeMesh(Mesh *meshPtr)
-{
-    if (meshPtr != NULL) {
-	meshPtr->refCount--;
-	if ((meshPtr->refCount == 0) && (meshPtr->flags & DELETE_PENDING)) {
-	    DestroyMesh(meshPtr);
-	}
-    }
-}
-
-int
-Blt_GetMeshFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr, 
-		   Mesh **meshPtrPtr)
-{
-    Mesh *meshPtr;
-
-    if (GetMeshFromObj(interp, graphPtr, objPtr, &meshPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    meshPtr->refCount++;
-    *meshPtrPtr = meshPtr;
-    return TCL_OK;
-}
-
-
-static void
-ComputeRanges(int nTriangles, Triangle *triangles, float *values)
-{
-    Triangle *p, *tend;
-
-    for (p = triangles, tend = triangles + nTriangles; p < tend; p++) {
-	float za, zb, zc;
-
-	za = values[points[p->a].index].z;
-	zb = values[points[p->b].index].z;
-	zc = values[points[p->c].index].z;
-
-	p->min = p->max = za;
-	if (zb < p->min) {
-	    p->min = zb;
-	}
-	if (zc < p->min) {
-	    p->min = zc;
-	}
-	if (zb > p->max) {
-	    p->max = zb;
-	}
-	if (zc > p->max) {
-	    p->max = zc;
-	}
-    }
-}
-
-static INLINE float 
-IsLeft(MeshPoint *points, int i, int j, int k) 
-{
-    return (((points[i].x - points[j].x) * (points[k].y - points[j].y)) -
-	    ((points[i].y - points[j].y) * (points[k].x - points[j].x)));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChainHull2d --
- *
- *	Computes the convex hull from the points of the mesh.  
- *
- *	Notes: 1. The array of points is assumed to be sorted.  
- *	       2. An array to contain the points is assumed.  This is 
- *		  allocated by the caller.
- *	
- * Results:
- *     	The number of points in the convex hull is returned. The coordinates
- *	of the hull will be written in the given point array.
- *
- *	Copyright 2001, softSurfer (www.softsurfer.com)
- *	This code may be freely used and modified for any purpose
- *	providing that this copyright notice is included with it.
- *	SoftSurfer makes no warranty for this code, and cannot be held
- *	liable for any real or imagined damage resulting from its use.
- *	Users of this code must verify correctness for their application.
- *
- *---------------------------------------------------------------------------
- */
-
-#define Push(index) (hull[top] = (index), top++)
-#define Pop()	    (top--)
-
-static int 
-ChainHull2d(int nPts, MeshPoint *pts, int *hull) 
-{
-    int bot, top, i; 
-    int minMin, minMax;
-    int maxMin, maxMax;
-    float xMin, xMax;
-
-    bot = top = 0;		/* Points to next location on stack. */
-    minMin = 0;
-
-    /* 
-     * Step 1. Get the indices of points with max x-coord and min|max
-     *	       y-coord .
-     */
-
-    xMin = pts[0].x;
-    for (i = 1; i < nPts; i++) {
-	if (pts[i].x != xMin) {
-	    break;
-	}
-    }
-    minMax = i - 1;
-    
-    if (minMax == (nPts - 1)) {       
-	/* Degenerate case: all x-coords == xMin */
-	Push(minMin)
-	if (pts[minMax].y != pts[minMin].y) {
-	    Push(minMax);	    /* A nontrivial segment. */
-	}
-	Push(minMin);
-	return top;
-    }
-
-    maxMax = nPts - 1;
-    xMax = pts[maxMax].x;
-    for (i = maxMax - 1; i >= 0; i--) {
-	if (pts[i].x != xMax) {
-	    break;
-	}
-    }
-    maxMin = i+1;
-    
-    /*
-     * Step 2. Compute the lower hull on the stack.
-     */
-    Push(minMin);		/* push minMin point onto stack */
-    i = minMax;
-
-    while (++i <= maxMin) {
-	/* The lower line joins pts[minMin] with pts[maxMin]. */
-	if ((IsLeft(pts[minMin], pts[maxMin], pts[i]) >= 0.0f) && 
-	    (i < maxMin)) {
-	    continue;	/* Ignore pts[i] above or on the lower line */
-	}
-	while (top > 1) {
-	    /* There are at least 2 pts on the stack. */
-	    
-	    /* Test if pts[i] is left of the line at the stack top. */
-	    if (IsLeft(pts[hull[top-2]], pts[hull[top-1]], pts[i]) > 0.0f) {
-		break;         /* Pts[i] is a new hull vertex. */
-	    } else {
-		Pop();         /* Pop top point off stack */
-	    }
-	}
-	Push(i);		/* Push point[i] onto stack. */
-    }
-
-    /* 
-     * Step 3. Compute the upper hull on the stack above the bottom hull.
-     */
-
-    if (maxMax != maxMin)  {
-	// if distinct xMax points
-        Push(maxMax);		/* Push maxMax point onto stack. */
-    }
-
-    bot = top - 1;		/* The bottom point of the upper hull stack. */
-    i = maxMin;
-
-    while (--i >= minMax) {
-        /* The upper line joins pts[maxMax] with pts[minMax]. */
-        if ((IsLeft(pts[maxMax], pts[minMax], pts[i]) >= 0) && 
-	    (i > minMax)) {
-            continue;          /* Ignore pts[i] below or on the upper
-				* line. */
-	}
-        while (top >= bot) {
-	    /* There are at least 2 points on the upper stack. */
-
-            /*  Test if points[i] is left of the line at the stack top. */
-            if (Isleft(pts[hull[top-2]], pts[hull[top-1]], pts[i]) > 0) {
-                break;         /* pts[i] is a new hull vertex. */
-	    } else {
-                Pop();         /* Pop top point off stack. */
-	    }
-        }
-        Push(i);		/* Push pts[i] onto stack. */
-    }
-    if (minMax != minMin) {
-        Push(minMin);  /* Push joining endpoint onto stack. */
-    }
-    return top;
-}
-
-static int
-ConvexHull(Tcl_Interp *interp, Mesh *meshPtr) 
-{
-    int *hull;
-    int n;
-
-    /* Allocate worst-case storage initially for the hull. */
-    hull = Blt_Malloc(meshPtr->nPoints * sizeof(int));
-    if (hull == NULL) {
-	Tcl_AppendResult(interp, "can't allocate memory for convex hull ", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Compute the convex hull. */
-    n = ChainHull2d(meshPtr->nPoints, meshPtr->points, hull);
-
-    /* Resize the hull array to the actual # of boundary points. */
-    if (n < meshPtr->nPoints) {
-	hull = Blt_Realloc(hull, n * sizeof(int));
-	if (hull == NULL) {
-	    Tcl_AppendResult(interp, "can't reallocate memory for convex hull ",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (meshPtr->hull != NULL) {
-	Blt_Free(meshPtr->hull);
-    }
-    meshPtr->hull = hull;
-    meshPtr->nHullPts = n;
-    return TCL_OK;
-}
-
-static int
-ComparePoints(const void *a, const void *b)
-{
-    const MeshPoint *s1 = a;
-    const MeshPoint *s2 = b;
-
-    if (s1->y < s2->y) {
-	return -1;
-    }
-    if (s1->y > s2->y) {
-	return 1;
-    }
-    if (s1->x < s2->x) {
-	return -1;
-    }
-    if (s1->x > s2->x) {
-	return 1;
-    }
-    return 0;
-}
-
-static void
-Triangulate(Tcl_Interp *interp, Mesh *meshPtr)
-{
-    Triangle *triangles;
-    int nTriangles;
-
-    /* Sort the points in the mesh. This is useful for both computing the
-     * convex hull and triangulating the mesh. */
-    qsort(meshPtr->points, meshPtr->nPoints, sizeof(MeshPoint), ComparePoints);
-
-    /* Compute the convex hull first, this will provide an estimate for the
-     * boundary points and therefore the number of triangles and edges. */
-    if (ConvexHull(interp, meshPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    /* Determine the number of triangles and edges. */
-    meshPtr->nTriangles = 2 * meshPtr->nPoints - 2 - meshPtr->nHullPts;
-    meshPtr->nEdges = 3 * meshPtr->nPoints - 3 - meshPtr->nHullPts;
-    triangles = Blt_Malloc(meshPtr->nTriangles * sizeof(Triangle));
-    if (triangles == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", 
-		Blt_Itoa(meshPtr->nTriangles), " triplets", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /*
-     * Mesh the points to get triangles.
-     */
-    nTriangles = Blt_Triangulate(meshPtr->nPoints, meshPtr->points, TRUE, 
-	triangles);
-    if (meshPtr->triangles != NULL) {
-	Blt_Free(meshPtr->triangles);
-    }
-    meshPtr->nTriangles = nTriangles;
-    meshPtr->triangles = triangles;
-}
diff --git a/blt3.0/src/bltGrMisc.c b/blt3.0/src/bltGrMisc.c
deleted file mode 100644
index bca16aa..0000000
--- a/blt3.0/src/bltGrMisc.c
+++ /dev/null
@@ -1,2012 +0,0 @@
-
-
-/*
- * bltGrMisc.c --
- *
- * This module implements miscellaneous routines for the BLT graph widget.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include <X11/Xutil.h>
-#include <bltAlloc.h>
-#include <bltOp.h>
-#include <stdarg.h>
-
-static Blt_OptionParseProc ObjToPoint;
-static Blt_OptionPrintProc PointToObj;
-Blt_CustomOption bltPointOption =
-{
-    ObjToPoint, PointToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToLimitsProc;
-static Blt_OptionPrintProc LimitsToObjProc;
-Blt_CustomOption bltLimitsOption =
-{
-    ObjToLimitsProc, LimitsToObjProc, NULL, (ClientData)0
-};
-
-
-/*
- *---------------------------------------------------------------------------
- * Custom option parse and print procedures
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetXY --
- *
- *	Converts a string in the form "@x,y" into an XPoint structure of the x
- *	and y coordinates.
- *
- * Results:
- *	A standard TCL result. If the string represents a valid position
- *	*pointPtr* will contain the converted x and y coordinates and TCL_OK
- *	is returned.  Otherwise, TCL_ERROR is returned and interp->result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetXY(Tcl_Interp *interp, Tk_Window tkwin, const char *string, 
-	  int *xPtr, int *yPtr)
-{
-    char *comma;
-    int result;
-    int x, y;
-
-    if ((string == NULL) || (*string == '\0')) {
-	*xPtr = *yPtr = -SHRT_MAX;
-	return TCL_OK;
-    }
-    if (*string != '@') {
-	goto badFormat;
-    }
-    comma = strchr(string + 1, ',');
-    if (comma == NULL) {
-	goto badFormat;
-    }
-    *comma = '\0';
-    result = ((Tk_GetPixels(interp, tkwin, string + 1, &x) == TCL_OK) &&
-	      (Tk_GetPixels(interp, tkwin, comma + 1, &y) == TCL_OK));
-    *comma = ',';
-    if (!result) {
-	Tcl_AppendResult(interp, ": can't parse position \"", string, "\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    *xPtr = x, *yPtr = y;
-    return TCL_OK;
-
-  badFormat:
-    Tcl_AppendResult(interp, "bad position \"", string, 
-	     "\": should be \"@x,y\"", (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPoint --
- *
- *	Convert the string representation of a legend XY position into window
- *	coordinates.  The form of the string must be "@x,y" or none.
- *
- * Results:
- *	A standard TCL result.  The symbol type is written into the
- *	widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPoint(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* New legend position string */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    XPoint *pointPtr = (XPoint *)(widgRec + offset);
-    int x, y;
-
-    if (Blt_GetXY(interp, tkwin, Tcl_GetString(objPtr), &x, &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    pointPtr->x = x, pointPtr->y = y;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PointToObj --
- *
- *	Convert the window coordinates into a string.
- *
- * Results:
- *	The string representing the coordinate position is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PointToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    XPoint *pointPtr = (XPoint *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if ((pointPtr->x != -SHRT_MAX) && (pointPtr->y != -SHRT_MAX)) {
-	char string[200];
-
-	sprintf_s(string, 200, "@%d,%d", pointPtr->x, pointPtr->y);
-	objPtr = Tcl_NewStringObj(string, -1);
-    } else { 
-	objPtr = Tcl_NewStringObj("", -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLimitsProc --
- *
- *	Converts the list of elements into zero or more pixel values which
- *	determine the range of pixel values possible.  An element can be in any
- *	form accepted by Tk_GetPixels. The list has a different meaning based
- *	upon the number of elements.
- *
- *	    # of elements:
- *
- *	    0 - the limits are reset to the defaults.
- *	    1 - the minimum and maximum values are set to this
- *		value, freezing the range at a single value.
- *	    2 - first element is the minimum, the second is the
- *		maximum.
- *	    3 - first element is the minimum, the second is the
- *		maximum, and the third is the nominal value.
- *
- *	Any element may be the empty string which indicates the default.
- *
- * Results:
- *	The return value is a standard TCL result.  The min and max fields
- *	of the range are set.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLimitsProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Widget of paneset */
-    Tcl_Obj *objPtr,			/* New width list */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_Limits *limitsPtr = (Blt_Limits *)(widgRec + offset);
-
-    if (Blt_GetLimitsFromObj(interp, tkwin, objPtr, limitsPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LimitsToObjProc --
- *
- *	Convert the limits of the pixel values allowed into a list.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LimitsToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Row/column structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_Limits *limitsPtr = (Blt_Limits *)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (limitsPtr->flags & LIMITS_MIN_SET) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->min));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (limitsPtr->flags & LIMITS_MAX_SET) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->max));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (limitsPtr->flags & LIMITS_NOM_SET) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->nom));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    return listObjPtr;
-}
-
-int
-Blt_PointInSegments(
-    Point2d *samplePtr,
-    Segment2d *segments,
-    int nSegments,
-    double halo)
-{
-    Segment2d *sp, *send;
-    double minDist;
-
-    minDist = DBL_MAX;
-    for (sp = segments, send = sp + nSegments; sp < send; sp++) {
-	double dist;
-	double left, right, top, bottom;
-	Point2d p, t;
-
-	t = Blt_GetProjection((int)samplePtr->x, (int)samplePtr->y, 
-			      &sp->p, &sp->q);
-	if (sp->p.x > sp->q.x) {
-	    right = sp->p.x, left = sp->q.x;
-	} else {
-	    right = sp->q.x, left = sp->p.x;
-	}
-	if (sp->p.y > sp->q.y) {
-	    bottom = sp->p.y, top = sp->q.y;
-	} else {
-	    bottom = sp->q.y, top = sp->p.y;
-	}
-	p.x = BOUND(t.x, left, right);
-	p.y = BOUND(t.y, top, bottom);
-	dist = hypot(p.x - samplePtr->x, p.y - samplePtr->y);
-	if (dist < minDist) {
-	    minDist = dist;
-	}
-    }
-    return (minDist < halo);
-}
-
-int
-Blt_PointInPolygon(
-    Point2d *s,			/* Sample point. */
-    Point2d *points,		/* Points representing the polygon. */
-    int nPoints)		/* # of points in above array. */
-{
-    Point2d *p, *q, *qend;
-    int count;
-
-    count = 0;
-    for (p = points, q = p + 1, qend = p + nPoints; q < qend; p++, q++) {
-	if (((p->y <= s->y) && (s->y < q->y)) || 
-	    ((q->y <= s->y) && (s->y < p->y))) {
-	    double b;
-
-	    b = (q->x - p->x) * (s->y - p->y) / (q->y - p->y) + p->x;
-	    if (s->x < b) {
-		count++;	/* Count the number of intersections. */
-	    }
-	}
-    }
-    return (count & 0x01);
-}
-
-int
-Blt_RegionInPolygon(
-    Region2d *regionPtr,
-    Point2d *points,
-    int nPoints,
-    int enclosed)
-{
-    Point2d *pp, *pend;
-
-    if (enclosed) {
-	/*  
-	 * All points of the polygon must be inside the rectangle.
-	 */
-	for (pp = points, pend = pp + nPoints; pp < pend; pp++) {
-	    if ((pp->x < regionPtr->left) || (pp->x > regionPtr->right) ||
-		(pp->y < regionPtr->top) || (pp->y > regionPtr->bottom)) {
-		return FALSE;	/* One point is exterior. */
-	    }
-	}
-	return TRUE;
-    } else {
-	Point2d r;
-	/*
-	 * If any segment of the polygon clips the bounding region, the
-	 * polygon overlaps the rectangle.
-	 */
-	points[nPoints] = points[0];
-	for (pp = points, pend = pp + nPoints; pp < pend; pp++) {
-	    Point2d p, q;
-
-	    p = *pp;
-	    q = *(pp + 1);
-	    if (Blt_LineRectClip(regionPtr, &p, &q)) {
-		return TRUE;
-	    }
-	}
-	/* 
-	 * Otherwise the polygon and rectangle are either disjoint or
-	 * enclosed.  Check if one corner of the rectangle is inside the
-	 * polygon.
-	 */
-	r.x = regionPtr->left;
-	r.y = regionPtr->top;
-	return Blt_PointInPolygon(&r, points, nPoints);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GraphExtents --
- *
- *	Generates a bounding box representing the plotting area of the
- *	graph. This data structure is used to clip the points and line
- *	segments of the line element.
- *
- *	The clip region is the plotting area plus such arbitrary extra space.
- *	The reason we clip with a bounding box larger than the plot area is so
- *	that symbols will be drawn even if their center point isn't in the
- *	plotting area.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The bounding box is filled with the dimensions of the plotting area.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_GraphExtents(Graph *graphPtr, Region2d *regionPtr)
-{
-    regionPtr->left = (double)(graphPtr->hOffset - graphPtr->xPad.side1);
-    regionPtr->top = (double)(graphPtr->vOffset - graphPtr->yPad.side1);
-    regionPtr->right = (double)(graphPtr->hOffset + graphPtr->hRange + 
-	graphPtr->xPad.side2);
-    regionPtr->bottom = (double)(graphPtr->vOffset + graphPtr->vRange + 
-	graphPtr->yPad.side2);
-}
-
-static int 
-ClipTest (double ds, double dr, double *t1, double *t2)
-{
-  double t;
-
-  if (ds < 0.0) {
-      t = dr / ds;
-      if (t > *t2) {
-	  return FALSE;
-      } 
-      if (t > *t1) {
-	  *t1 = t;
-      }
-  } else if (ds > 0.0) {
-      t = dr / ds;
-      if (t < *t1) {
-	  return FALSE;
-      } 
-      if (t < *t2) {
-	  *t2 = t;
-      }
-  } else {
-      /* d = 0, so line is parallel to this clipping edge */
-      if (dr < 0.0) {		/* Line is outside clipping edge */
-	  return FALSE;
-      }
-  }
-  return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LineRectClip --
- *
- *	Clips the given line segment to a rectangular region.  The coordinates
- *	of the clipped line segment are returned.  The original coordinates
- *	are overwritten.
- *
- *	Reference: 
- *	  Liang, Y-D., and B. Barsky, A new concept and method for
- *	  Line Clipping, ACM, TOG,3(1), 1984, pp.1-22.
- *
- * Results:
- *	Returns if line segment is visible within the region. The coordinates
- *	of the original line segment are overwritten by the clipped
- *	coordinates.
- *
- *---------------------------------------------------------------------------
- */
-int 
-Blt_LineRectClip(
-    Region2d *regionPtr,	/* Rectangular region to clip. */
-    Point2d *p, Point2d *q)	/* (in/out) Coordinates of original and
-				 * clipped line segment. */
-{
-    double t1, t2;
-    double dx, dy;
-
-    t1 = 0.0, t2 = 1.0;
-    dx = q->x - p->x;
-    if ((ClipTest (-dx, p->x - regionPtr->left, &t1, &t2)) &&
-	(ClipTest (dx, regionPtr->right - p->x, &t1, &t2))) {
-	dy = q->y - p->y;
-	if ((ClipTest (-dy, p->y - regionPtr->top, &t1, &t2)) && 
-	    (ClipTest (dy, regionPtr->bottom - p->y, &t1, &t2))) {
-	    if (t2 < 1.0) {
-		q->x = p->x + t2 * dx;
-		q->y = p->y + t2 * dy;
-	    }
-	    if (t1 > 0.0) {
-		p->x += t1 * dx;
-		p->y += t1 * dy;
-	    }
-	    return TRUE;
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PolyRectClip --
- *
- *	Clips the given polygon to a rectangular region.  The resulting
- *	polygon is returned. Note that the resulting polyon may be complex,
- *	connected by zero width/height segments.  The drawing routine (such as
- *	XFillPolygon) will not draw a connecting segment.
- *
- *	Reference:  
- *	  Liang Y. D. and Brian A. Barsky, "Analysis and Algorithm for
- *	  Polygon Clipping", Communications of ACM, Vol. 26,
- *	  p.868-877, 1983
- *
- * Results:
- *	Returns the number of points in the clipped polygon. The points of the
- *	clipped polygon are stored in *outputPts*.
- *
- *---------------------------------------------------------------------------
- */
-#define EPSILON  FLT_EPSILON
-#define AddVertex(vx, vy)	    r->x=(vx), r->y=(vy), r++, count++ 
-#define LastVertex(vx, vy)	    r->x=(vx), r->y=(vy), count++ 
-
-int 
-Blt_PolyRectClip(
-    Region2d *regionPtr,	/* Rectangular region clipping the polygon. */
-    Point2d *points,		/* Points of polygon to be clipped. */
-    int nPoints,		/* # of points in polygon. */
-    Point2d *clipPts)		/* (out) Points of clipped polygon. */
-{
-    Point2d *p;			/* First vertex of input polygon edge. */
-    Point2d *pend;
-    Point2d *q;			/* Last vertex of input polygon edge. */
-    Point2d *r;
-    int count;
-
-    r = clipPts;
-    count = 0;			/* Counts # of vertices in output polygon. */
-
-    points[nPoints] = points[0];
-    for (p = points, q = p + 1, pend = p + nPoints; p < pend; p++, q++) {
-	double dx, dy;
-	double tin1, tin2, tinx, tiny;
-	double xin, yin, xout, yout;
-
-	dx = q->x - p->x;	/* X-direction */
-	dy = q->y - p->y;	/* Y-direction */
-
-	if (FABS(dx) < EPSILON) { 
-	    dx = (p->x > regionPtr->left) ? -EPSILON : EPSILON ;
-	}
-	if (FABS(dy) < EPSILON) { 
-	    dy = (p->y > regionPtr->top) ? -EPSILON : EPSILON ;
-	}
-
-	if (dx > 0.0) {		/* Left */
-	    xin = regionPtr->left;
-	    xout = regionPtr->right + 1.0;
-	} else {		/* Right */
-	    xin = regionPtr->right + 1.0;
-	    xout = regionPtr->left;
-	}
-	if (dy > 0.0) {		/* Top */
-	    yin = regionPtr->top;
-	    yout = regionPtr->bottom + 1.0;
-	} else {		/* Bottom */
-	    yin = regionPtr->bottom + 1.0;
-	    yout = regionPtr->top;
-	}
-	
-	tinx = (xin - p->x) / dx;
-	tiny = (yin - p->y) / dy;
-	
-	if (tinx < tiny) {	/* Hits x first */
-	    tin1 = tinx;
-	    tin2 = tiny;
-	} else {		/* Hits y first */
-	    tin1 = tiny;
-	    tin2 = tinx;
-	}
-	
-	if (tin1 <= 1.0) {
-	    if (tin1 > 0.0) {
-		AddVertex(xin, yin);
-            }
-	    if (tin2 <= 1.0) {
-		double toutx, touty, tout1;
-
-		toutx = (xout - p->x) / dx;
-		touty = (yout - p->y) / dy;
-		tout1 = MIN(toutx, touty);
-		
-		if ((tin2 > 0.0) || (tout1 > 0.0)) {
-		    if (tin2 <= tout1) {
-			if (tin2 > 0.0) {
-			    if (tinx > tiny) {
-				AddVertex(xin, p->y + tinx * dy);
-			    } else {
-				AddVertex(p->x + tiny * dx, yin);
-			    }
-			}
-			if (tout1 < 1.0) {
-			    if (toutx < touty) {
-				AddVertex(xout, p->y + toutx * dy);
-			    } else {
-				AddVertex(p->x + touty * dx, yout);
-			    }
-			} else {
-			    AddVertex(q->x, q->y);
-			}
-		    } else {
-			if (tinx > tiny) {
-			    AddVertex(xin, yout);
-			} else {
-			    AddVertex(xout, yin);
-			}
-
-		    }
-		}
-            }
-	}
-    }
-    if (count > 0) {
-	LastVertex(clipPts[0].x, clipPts[0].y);
-    }
-    return count;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetProjection --
- *
- *	Computes the projection of a point on a line.  The line (given by two
- *	points), is assumed the be infinite.
- *
- *	Compute the slope (angle) of the line and rotate it 90 degrees.  Using
- *	the slope-intercept method (we know the second line from the sample
- *	test point and the computed slope), then find the intersection of both
- *	lines. This will be the projection of the sample point on the first
- *	line.
- *
- * Results:
- *	Returns the coordinates of the projection on the line.
- *
- *---------------------------------------------------------------------------
- */
-Point2d
-Blt_GetProjection(
-    int x, int y,		/* Screen coordinates of the sample point. */
-    Point2d *p, Point2d *q)	/* Line segment to project point onto */
-{
-    double dx, dy;
-    Point2d t;
-
-    dx = p->x - q->x;
-    dy = p->y - q->y;
-
-    /* Test for horizontal and vertical lines */
-    if (FABS(dx) < DBL_EPSILON) {
-	t.x = p->x, t.y = (double)y;
-    } else if (FABS(dy) < DBL_EPSILON) {
-	t.x = (double)x, t.y = p->y;
-    } else {
-	double m1, m2;		/* Slope of both lines */
-	double b1, b2;		/* y-intercepts */
-	double midX, midY;	/* Midpoint of line segment. */
-	double ax, ay, bx, by;
-
-	/* Compute the slope and intercept of PQ. */
-	m1 = (dy / dx);
-	b1 = p->y - (p->x * m1);
-
-	/* 
-	 * Compute the slope and intercept of a second line segment: one that
-	 * intersects through sample X-Y coordinate with a slope perpendicular
-	 * to original line.
-	 */
-
-	/* Find midpoint of PQ. */
-	midX = (p->x + q->x) * 0.5;
-	midY = (p->y + q->y) * 0.5;
-
-	/* Rotate the line 90 degrees */
-	ax = midX - (0.5 * dy);
-	ay = midY - (0.5 * -dx);
-	bx = midX + (0.5 * dy);
-	by = midY + (0.5 * -dx);
-
-	m2 = (ay - by) / (ax - bx);
-	b2 = y - (x * m2);
-
-	/*
-	 * Given the equations of two lines which contain the same point,
-	 *
-	 *    y = m1 * x + b1
-	 *    y = m2 * x + b2
-	 *
-	 * solve for the intersection.
-	 *
-	 *    x = (b2 - b1) / (m1 - m2)
-	 *    y = m1 * x + b1
-	 *
-	 */
-
-	t.x = (b2 - b1) / (m1 - m2);
-	t.y = m1 * t.x + b1;
-    }
-    return t;
-}
-
-typedef struct {
-    double hue, sat, val;
-} HSV;
-
-#define SetColor(c,r,g,b) ((c)->red = (int)((r) * 65535.0), \
-			   (c)->green = (int)((g) * 65535.0), \
-			   (c)->blue = (int)((b) * 65535.0))
-
-#ifdef notdef
-void
-Blt_XColorToHSV(XColor *colorPtr, HSV *hsvPtr)
-{
-    unsigned short max, min;
-    double range;
-    unsigned short *colorValues;
-
-    /* Find the minimum and maximum RGB intensities */
-    colorValues = (unsigned short *)&colorPtr->red;
-    max = MAX3(colorValues[0], colorValues[1], colorValues[2]);
-    min = MIN3(colorValues[0], colorValues[1], colorValues[2]);
-
-    hsvPtr->val = (double)max / 65535.0;
-    hsvPtr->hue = hsvPtr->sat = 0.0;
-
-    range = (double)(max - min);
-    if (max != min) {
-	hsvPtr->sat = range / (double)max;
-    }
-    if (hsvPtr->sat > 0.0) {
-	double red, green, blue;
-
-	/* Normalize the RGB values */
-	red = (double)(max - colorPtr->red) / range;
-	green = (double)(max - colorPtr->green) / range;
-	blue = (double)(max - colorPtr->blue) / range;
-
-	if (colorPtr->red == max) {
-	    hsvPtr->hue = (blue - green);
-	} else if (colorPtr->green == max) {
-	    hsvPtr->hue = 2 + (red - blue);
-	} else if (colorPtr->blue == max) {
-	    hsvPtr->hue = 4 + (green - red);
-	}
-	hsvPtr->hue *= 60.0;
-    } else {
-	hsvPtr->sat = 0.5;
-    }
-    if (hsvPtr->hue < 0.0) {
-	hsvPtr->hue += 360.0;
-    }
-}
-
-void
-Blt_HSVToXColor(HSV *hsvPtr, XColor *colorPtr)
-{
-    double hue, p, q, t;
-    double frac;
-    int quadrant;
-
-    if (hsvPtr->val < 0.0) {
-	hsvPtr->val = 0.0;
-    } else if (hsvPtr->val > 1.0) {
-	hsvPtr->val = 1.0;
-    }
-    if (hsvPtr->sat == 0.0) {
-	SetColor(colorPtr, hsvPtr->val, hsvPtr->val, hsvPtr->val);
-	return;
-    }
-    hue = FMOD(hsvPtr->hue, 360.0) / 60.0;
-    quadrant = (int)floor(hue);
-    frac = hsvPtr->hue - quadrant;
-    p = hsvPtr->val * (1 - (hsvPtr->sat));
-    q = hsvPtr->val * (1 - (hsvPtr->sat * frac));
-    t = hsvPtr->val * (1 - (hsvPtr->sat * (1 - frac)));
-
-    switch (quadrant) {
-    case 0:
-	SetColor(colorPtr, hsvPtr->val, t, p);
-	break;
-    case 1:
-	SetColor(colorPtr, q, hsvPtr->val, p);
-	break;
-    case 2:
-	SetColor(colorPtr, p, hsvPtr->val, t);
-	break;
-    case 3:
-	SetColor(colorPtr, p, q, hsvPtr->val);
-	break;
-    case 4:
-	SetColor(colorPtr, t, p, hsvPtr->val);
-	break;
-    case 5:
-	SetColor(colorPtr, hsvPtr->val, p, q);
-	break;
-    }
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_AdjustViewport --
- *
- *	Adjusts the offsets of the viewport according to the scroll mode.
- *	This is to accommodate both "listbox" and "canvas" style scrolling.
- *
- *	"canvas"	The viewport scrolls within the range of world
- *			coordinates.  This way the viewport always displays
- *			a full page of the world.  If the world is smaller
- *			than the viewport, then (bizarrely) the world and
- *			viewport are inverted so that the world moves up
- *			and down within the viewport.
- *
- *	"listbox"	The viewport can scroll beyond the range of world
- *			coordinates.  Every entry can be displayed at the
- *			top of the viewport.  This also means that the
- *			scrollbar thumb weirdly shrinks as the last entry
- *			is scrolled upward.
- *
- * Results:
- *	The corrected offset is returned.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_AdjustViewport(int offset, int worldSize, int windowSize, int scrollUnits, 
-		   int scrollMode)
-{
-    switch (scrollMode) {
-    case BLT_SCROLL_MODE_CANVAS:
-
-	/*
-	 * Canvas-style scrolling allows the world to be scrolled within the
-	 * window.
-	 */
-	if (worldSize < windowSize) {
-	    if ((worldSize - offset) > windowSize) {
-		offset = worldSize - windowSize;
-	    }
-	    if (offset > 0) {
-		offset = 0;
-	    }
-	} else {
-	    if ((offset + windowSize) > worldSize) {
-		offset = worldSize - windowSize;
-	    }
-	    if (offset < 0) {
-		offset = 0;
-	    }
-	}
-	break;
-
-    case BLT_SCROLL_MODE_LISTBOX:
-	if (offset < 0) {
-	    offset = 0;
-	}
-	if (offset >= worldSize) {
-	    offset = worldSize - scrollUnits;
-	}
-	break;
-
-    case BLT_SCROLL_MODE_HIERBOX:
-
-	/*
-	 * Hierbox-style scrolling allows the world to be scrolled within the
-	 * window.
-	 */
-	if ((offset + windowSize) > worldSize) {
-	    offset = worldSize - windowSize;
-	}
-	if (offset < 0) {
-	    offset = 0;
-	}
-	break;
-    }
-    return offset;
-}
-
-int
-Blt_GetScrollInfoFromObj(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv,
-			 int *offsetPtr, int worldSize, int windowSize, 
-			 int scrollUnits, int scrollMode)
-{
-    char c;
-    const char *string;
-    int length;
-    int offset;
-
-    offset = *offsetPtr;
-    string = Tcl_GetStringFromObj(objv[0], &length);
-    c = string[0];
-    if ((c == 's') && (strncmp(string, "scroll", length) == 0)) {
-	double fract;
-	int count;
-
-	if (objc != 3) {
-	    return TCL_ERROR;
-	}
-	/* Scroll number unit/page */
-	if (Tcl_GetIntFromObj(interp, objv[1], &count) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	c = string[0];
-	if ((c == 'u') && (strncmp(string, "units", length) == 0)) {
-	    fract = (double)count *scrollUnits;
-	} else if ((c == 'p') && (strncmp(string, "pages", length) == 0)) {
-	    /* A page is 90% of the view-able window. */
-	    fract = (double)count * windowSize * 0.9;
-	} else {
-	    Tcl_AppendResult(interp, "unknown \"scroll\" units \"", 
-		     Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	offset += (int)fract;
-    } else if ((c == 'm') && (strncmp(string, "moveto", length) == 0)) {
-	double fract;
-
-	if (objc != 2) {
-	    return TCL_ERROR;
-	}
-	/* moveto fraction */
-	if (Tcl_GetDoubleFromObj(interp, objv[1], &fract) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	offset = (int)(worldSize * fract);
-    } else {
-	double fract;
-	int count;
-
-	/* Treat like "scroll units" */
-	if (Tcl_GetIntFromObj(interp, objv[0], &count) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	fract = (double)count *scrollUnits;
-	offset += (int)fract;
-    }
-    *offsetPtr = Blt_AdjustViewport(offset, worldSize, windowSize, scrollUnits,
-	scrollMode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UpdateScrollbar --
- *
- * 	Invoke a TCL command to the scrollbar, defining the new position and
- * 	length of the scroll. See the Tk documentation for further information
- * 	on the scrollbar.  It is assumed the scrollbar command prefix is
- * 	valid.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Scrollbar is commanded to change position and/or size.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UpdateScrollbar(
-    Tcl_Interp *interp,
-    Tcl_Obj *scrollCmdObjPtr,		/* Scrollbar command prefix. May be
-					 * several words */
-    int first, int last, int width)
-{
-    Tcl_Obj **objv;
-    Tcl_Obj *cmdObjPtr;
-    double firstFract, lastFract;
-    int objc;
-
-    firstFract = 0.0, lastFract = 1.0;
-    if (width > 0) {
-	firstFract = (double)first / (double)width;
-	lastFract = (double)last / (double)width;
-    }
-    cmdObjPtr = Tcl_DuplicateObj(scrollCmdObjPtr);
-    Tcl_ListObjAppendElement(interp, cmdObjPtr, Tcl_NewDoubleObj(firstFract));
-    Tcl_ListObjAppendElement(interp, cmdObjPtr, Tcl_NewDoubleObj(lastFract));
-    if (Tcl_ListObjGetElements(interp, cmdObjPtr, &objc, &objv) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    } else {
-	Tcl_IncrRefCount(cmdObjPtr);
-	if (Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_GLOBAL) != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-    }
-    Tcl_DecrRefCount(cmdObjPtr);
-
-}
-
-/* -------------------------------------------------------------------------- */
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPrivateGCFromDrawable --
- *
- *      Like Tk_GetGC, but doesn't share the GC with any other widget.  This
- *      is needed because the certain GC parameters (like dashes) can not be
- *      set via XCreateGC, therefore there is no way for Tk's hashing
- *      mechanism to recognize that two such GCs differ.
- *
- * Results:
- *      A new GC is returned.
- *
- *---------------------------------------------------------------------------
- */
-GC
-Blt_GetPrivateGCFromDrawable(
-    Display *display,
-    Drawable drawable,
-    unsigned long gcMask,
-    XGCValues *valuePtr)
-{
-    GC newGC;
-
-#ifdef WIN32
-    newGC = Blt_EmulateXCreateGC(display, drawable, gcMask, valuePtr);
-#else
-    newGC = XCreateGC(display, drawable, gcMask, valuePtr);
-#endif
-    return newGC;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPrivateGC --
- *
- *      Like Tk_GetGC, but doesn't share the GC with any other widget.  This
- *      is needed because the certain GC parameters (like dashes) can not be
- *      set via XCreateGC, therefore there is no way for Tk's hashing
- *      mechanism to recognize that two such GCs differ.
- *
- * Results:
- *      A new GC is returned.
- *
- *---------------------------------------------------------------------------
- */
-GC
-Blt_GetPrivateGC(
-    Tk_Window tkwin,
-    unsigned long gcMask,
-    XGCValues *valuePtr)
-{
-    GC gc;
-    Pixmap pixmap;
-    Drawable drawable;
-    Display *display;
-
-    pixmap = None;
-    drawable = Tk_WindowId(tkwin);
-    display = Tk_Display(tkwin);
-    if (drawable == None) {
-	Drawable root;
-	int depth;
-
-	root = Tk_RootWindow(tkwin);
-	depth = Tk_Depth(tkwin);
-
-	if (depth == DefaultDepth(display, Tk_ScreenNumber(tkwin))) {
-	    drawable = root;
-	} else {
-	    pixmap = Tk_GetPixmap(display, root, 1, 1, depth);
-	    drawable = pixmap;
-	    Blt_SetDrawableAttribs(display, drawable, 1, 1, depth, 
-		Tk_Colormap(tkwin), Tk_Visual(tkwin));
-	}
-    }
-    gc = Blt_GetPrivateGCFromDrawable(display, drawable, gcMask, valuePtr);
-    if (pixmap != None) {
-	Tk_FreePixmap(display, pixmap);
-    }
-    return gc;
-}
-
-void
-Blt_FreePrivateGC(Display *display, GC gc)
-{
-    Tk_FreeXId(display, (XID) XGContextFromGC(gc));
-    XFreeGC(display, gc);
-}
-
-#ifndef WIN32
-void
-Blt_SetDashes(Display *display, GC gc, Blt_Dashes *dashesPtr)
-{
-    XSetDashes(display, gc, dashesPtr->offset, (const char *)dashesPtr->values,
-	(int)strlen((char *)dashesPtr->values));
-}
-#endif
-
-void
-Blt_ScreenDPI(Tk_Window tkwin, unsigned int *xPtr, unsigned int *yPtr) 
-{
-    Screen *screen;
-
-#define MM_INCH		25.4
-    screen = Tk_Screen(tkwin);
-    *xPtr = (unsigned int)((WidthOfScreen(screen) * MM_INCH) / 
-			   WidthMMOfScreen(screen));
-    *yPtr = (unsigned int)((HeightOfScreen(screen) * MM_INCH) / 
-			   HeightMMOfScreen(screen));
-}
-
-void
-Blt_Draw2DSegments(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    Segment2d *segments,
-    int nSegments)
-{
-    XSegment *dp, *xsegments;
-    Segment2d *sp, *send;
-
-    xsegments = Blt_Malloc(nSegments * sizeof(XSegment));
-    if (xsegments == NULL) {
-	return;
-    }
-    dp = xsegments;
-    for (sp = segments, send = sp + nSegments; sp < send; sp++) {
-	dp->x1 = (short int)sp->p.x;
-	dp->y1 = (short int)sp->p.y;
-	dp->x2 = (short int)sp->q.x;
-	dp->y2 = (short int)sp->q.y;
-	dp++;
-    }
-    XDrawSegments(display, drawable, gc, xsegments, nSegments);
-    Blt_Free(xsegments);
-}
-
-void
-Blt_DrawArrowOld(Display *display, Drawable drawable, GC gc, int x, int y, int w, 
-	      int h, int borderWidth, int orientation)
-{
-    XPoint arrow[4];
-    int  s2, s;
-    int ax, ay;
-
-#define ARROW_IPAD 1
-    w -= 2 * (ARROW_IPAD + borderWidth);
-    h -= 2 * (ARROW_IPAD + borderWidth);
-    x += ARROW_IPAD + borderWidth;
-    y += ARROW_IPAD + borderWidth;
-
-    w |= 0x01;
-    h |= 0x01;
-    s = MIN(w, h);
-    s2 = s / 2;
-    ax = x + w / 2;
-    ay = y + h / 2;
-
-    switch (orientation) {
-    case ARROW_UP:
-	ay -= s2/2 + 1;
-	arrow[2].x = arrow[0].x = ax;
-	arrow[2].y = arrow[0].y = ay;
-	arrow[0].x = ax + s2 + 1;
-	arrow[1].x = ax - s2;
-	arrow[0].y = arrow[1].y = ay + s2 + 1;
-	fprintf(stderr, "up arrow %d,%d %d,%d %d,%d\n",
-		arrow[0].x, arrow[0].y,
-		arrow[1].x, arrow[1].y,
-		arrow[2].x, arrow[2].y);
-	break;
-    case ARROW_DOWN:
-	ay -= s2/2;
-	arrow[3].x = arrow[0].x = ax;
-	arrow[3].y = arrow[0].y = ay + s2 + 1;
-	arrow[1].x = ax + s2 + 1;
-	arrow[2].x = ax - s2;
-	arrow[2].y = arrow[1].y = ay;
-	fprintf(stderr, "down arrow %d,%d %d,%d %d,%d\n",
-		arrow[0].x, arrow[0].y,
-		arrow[1].x, arrow[1].y,
-		arrow[2].x, arrow[2].y);
-	break;
-    case ARROW_LEFT:
-	ax -= s2 / 2;
-	arrow[3].x = arrow[0].x = ax;
-	arrow[3].y = arrow[0].y = ay;
-	arrow[1].y = ay - s2;
-	arrow[2].y = ay + s2 + 1;
-	arrow[2].x = arrow[1].x = ax + s2 + 1;
-	break;
-    case ARROW_RIGHT:
-	ax -= s2 / 2;
-	arrow[3].x = arrow[0].x = ax + s2 + 1;
-	arrow[3].y = arrow[0].y = ay;
-	arrow[1].y = ay - s2;
-	arrow[2].y = ay + s2;
-	arrow[2].x = arrow[1].x = ax;
-	break;
-    }
-    XFillPolygon(display, drawable, gc, arrow, 3, Convex, CoordModeOrigin);
-}
-
-void
-Blt_DrawArrow(Display *display, Drawable drawable, XColor *color, int x, int y, 
-	      int w, int h, int borderWidth, int orientation)
-{
-    int s;
-    int s2;
-    int ax, ay;
-    int dx, dy;
-    GC gc;
-
-#define ARROW_IPAD 1
-    w -= 2 * (ARROW_IPAD + borderWidth);
-    h -= 2 * (ARROW_IPAD + borderWidth);
-    x += ARROW_IPAD + borderWidth;
-    y += ARROW_IPAD + borderWidth;
-
-    s = MIN(w, h);
-    s2 = (s / 2) + 1;
-    ax = x + w / 2;
-    ay = y + h / 2;
-
-    gc = Tk_GCForColor(color, drawable);
-    switch (orientation) {
-    case ARROW_UP:
-	ay -= s2 / 2;
-	for (dx = 0; dx < s2; dx++, ay++) {
-	    XDrawLine(display, drawable, gc, ax - dx, ay, ax + dx, ay);
-	}
-	break;
-    case ARROW_DOWN:
-	ay += s2 / 2;
-	for (dx = 0; dx < s2; dx++, ay--) {
-	    XDrawLine(display, drawable, gc, ax - dx, ay, ax + dx, ay);
-	}
-	break;
-    case ARROW_LEFT:
-	ax -= s2 / 2;
-	for (dy = 0; dy < s2; dy++, ax++) {
-	    XDrawLine(display, drawable, gc, ax, ay - dy, ax, ay + dy);
-	}
-	break;
-    case ARROW_RIGHT:
-	ax += s2 / 2;
-	for (dy = 0; dy < s2; dy++, ax--) {
-	    XDrawLine(display, drawable, gc, ax, ay - dy, ax, ay + dy);
-	}
-	break;
-    }
-}
-
-long 
-Blt_MaxRequestSize(Display *display, size_t elemSize) 
-{
-    static long maxSizeBytes = 0L;
-
-    if (maxSizeBytes == 0L) {
-	long size;
-#ifndef WIN32
-	size = XExtendedMaxRequestSize(display);
-	if (size == 0) {
-	    size = XMaxRequestSize(display);
-	}
-#else
-	size = XMaxRequestSize(display);
-#endif
-	size -= (4 * elemSize);
-	/*	maxSizeBytes = (size * 4); */
-	maxSizeBytes = size;
-    }
-    return (maxSizeBytes / elemSize);
-}
-
-void
-Blt_GetLineExtents(size_t nPoints, Point2d *points, Region2d *r)
-{
-    Point2d *p, *pend;
-    r->top = r->left = DBL_MAX;
-    r->bottom = r->right = -DBL_MAX;
-    for (p = points, pend = p + nPoints; p < pend; p++) {
-	if (r->top > p->y) {
-	    r->top = p->y;
-	}
-	if (r->bottom < p->y) {
-	    r->bottom = p->y;
-	}
-	if (r->left > p->x) {
-	    r->left = p->x;
-	}
-	if (r->right < p->x) {
-	    r->right = p->x;
-	}
-    }
-}
-
-#undef Blt_Fill3DRectangle
-void
-Blt_Fill3DRectangle(
-    Tk_Window tkwin,		/* Window for which border was allocated. */
-    Drawable drawable,		/* X window or pixmap in which to draw. */
-    Tk_3DBorder border,		/* Token for border to draw. */
-    int x, int y, 
-    int width, int  height,	/* Outside area of rectangular region. */
-    int borderWidth,		/* Desired width for border, in pixels. Border
-				 * will be *inside* region. */
-    int relief)			/* Indicates 3D effect: TK_RELIEF_FLAT,
-				 * TK_RELIEF_RAISED, or TK_RELIEF_SUNKEN. */
-{
-#ifndef notdef
-    if ((borderWidth > 1) && (width > 2) && (height > 2) &&
-	((relief == TK_RELIEF_SUNKEN) || (relief == TK_RELIEF_RAISED))) {
-	GC lightGC, darkGC;
-	int x2, y2;
-
-	x2 = x + width - 1;
-	y2 = y + height - 1;
-#define TK_3D_LIGHT2_GC TK_3D_DARK_GC+1
-#define TK_3D_DARK2_GC TK_3D_DARK_GC+2
-	if (relief == TK_RELIEF_RAISED) {
-	    lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
-	    darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
-#ifdef notdef
-	    darkGC = DefaultGC(Tk_Display(tkwin), Tk_ScreenNumber(tkwin));
-#endif
-	} else {
-
-	    lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
-#ifdef notdef
-	    lightGC = DefaultGC(Tk_Display(tkwin), Tk_ScreenNumber(tkwin));
-#endif
-	    darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
-	}
-	XDrawLine(Tk_Display(tkwin), drawable, lightGC, x, y, x2, y);
-	XDrawLine(Tk_Display(tkwin), drawable, darkGC, x2, y2, x2, y);
-	XDrawLine(Tk_Display(tkwin), drawable, darkGC, x2, y2, x, y2);
-	XDrawLine(Tk_Display(tkwin), drawable, lightGC, x, y, x, y2);
-	x++, y++, width -= 2, height -= 2, borderWidth--;
-    }
-#endif
-    Tk_Fill3DRectangle(tkwin, drawable, border, x, y, width, height, 
-	borderWidth, relief);
-}
-
-
-#undef Blt_Draw3DRectangle
-void
-Blt_Draw3DRectangle(
-    Tk_Window tkwin,		/* Window for which border was allocated. */
-    Drawable drawable,		/* X window or pixmap in which to draw. */
-    Tk_3DBorder border,		/* Token for border to draw. */
-    int x, int y, 
-    int width, int height,	/* Outside area of rectangular region. */
-    int borderWidth,		/* Desired width for border, in pixels. Border
-				 * will be *inside* region. */
-    int relief)			/* Indicates 3D effect: TK_RELIEF_FLAT,
-				 * TK_RELIEF_RAISED, or TK_RELIEF_SUNKEN. */
-{
-#ifndef notdef
-    if ((borderWidth > 1) && (width > 2) && (height > 2) &&
-	((relief == TK_RELIEF_SUNKEN) || (relief == TK_RELIEF_RAISED))) {
-	GC lightGC, darkGC;
-	int x2, y2;
-
-	x2 = x + width - 1;
-	y2 = y + height - 1;
-	if (relief == TK_RELIEF_RAISED) {
-	    lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
-	    darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
-#ifdef notdef
-	    darkGC = DefaultGC(Tk_Display(tkwin), Tk_ScreenNumber(tkwin));
-#endif
-	} else {
-	    lightGC = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
-#ifdef notdef
-	    lightGC = DefaultGC(Tk_Display(tkwin), Tk_ScreenNumber(tkwin));
-#endif
-	    darkGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
-	}
-	XDrawLine(Tk_Display(tkwin), drawable, darkGC, x2, y2, x2, y);
-	XDrawLine(Tk_Display(tkwin), drawable, lightGC, x, y, x2, y);
-	XDrawLine(Tk_Display(tkwin), drawable, darkGC, x2, y2, x, y2);
-	XDrawLine(Tk_Display(tkwin), drawable, lightGC, x, y, x, y2);
-	x++, y++, width -= 2, height -= 2, borderWidth--;
-    }
-#endif
-    Tk_Draw3DRectangle(tkwin, drawable, border, x, y, width, height, 
-	borderWidth, relief);
-}
-
-#ifdef notdef
-typedef struct {
-    Screen *screen;
-    Visual *visual;
-    Colormap colormap;
-    Tk_Uid nameUid;
-} BorderKey;
-
-typedef struct {
-    Screen *screen;		/* Screen on which the border will be used. */
-    Visual *visual;		/* Visual for all windows and pixmaps using
-				 * the border. */
-    int depth;			/* Number of bits per pixel of drawables where
-				 * the border will be used. */
-    Colormap colormap;		/* Colormap out of which pixels are
-				 * allocated. */
-    int refCount;		/* Number of active uses of this color (each
-				 * active use corresponds to a call to
-				 * Blt_Get3DBorder).  If this count is 0, then
-				 * this structure is no longer valid and it
-				 * isn't present in borderTable: it is being
-				 * kept around only because there are objects
-				 * referring to it.  The structure is freed
-				 * when refCount is 0. */
-
-    XColor *bgColorPtr;		/* Color of face. */
-    XColor *shadows[4];
-
-    Pixmap darkStipple;		/* Stipple pattern to use for drawing shadows
-				 * areas.  Used for displays with <= 64 colors
-				 * or where colormap has filled up. */
-    Pixmap lightStipple;	/* Stipple pattern to use for drawing shadows
-				 * areas.  Used for displays with <= 64 colors
-				 * or where colormap has filled up. */
-    GC bgGC;			/* Used (if necessary) to draw areas in the
-				 * background color. */
-    GC lightGC, darkGC;
-    Tcl_HashEntry *hashPtr;	/* Entry in borderTable (needed in order to
-				 * delete structure). */
-
-    struct _Blt_3DBorder *nextPtr;
-} Border, *Blt_3DBorder;
-    
-
-void
-Blt_Draw3DRectangle(tkwin, drawable, border, x, y, width,
-	height, borderWidth, relief)
-    Tk_Window tkwin;		/* Window for which border was allocated. */
-    Drawable drawable;		/* X window or pixmap in which to draw. */
-    Blt_3DBorder *borderPtr;	/* Border to draw. */
-    int x, y, width, height;	/* Outside area of rectangular region. */
-    int borderWidth;		/* Desired width for border, in
-				 * pixels. Border will be *inside* region. */
-    int relief;			/* Indicates 3D effect: TK_RELIEF_FLAT,
-				 * TK_RELIEF_RAISED, or TK_RELIEF_SUNKEN. */
-{
-    if ((width > (2 * borderWidth)) && (height > (2 * borderWidth))) {
-	int x2, y2;
-	int i;
-
-	x2 = x + width - 1;
-	y2 = y + height - 1;
-
-	XSetForeground(borderPtr->lightGC, borderPtr->shadows[0]);
-	XSetForeground(borderPtr->darkGC, borderPtr->shadows[3]);
-	XDrawLine(Tk_Display(tkwin), drawable, borderPtr->lightGC, 
-		  x, y, x2, y);
-	XDrawLine(Tk_Display(tkwin), drawable, borderPtr->lightGC, 
-		  x, y, x, y2);
-	XDrawLine(Tk_Display(tkwin), drawable, borderPtr->darkGC, 
-		  x2, y, x2, y2);
-	XDrawLine(Tk_Display(tkwin), drawable, borderPtr->darkGC, 
-		  x2, y2, x, y2);
-	XSetForeground(borderPtr->lightGC, borderPtr->shadows[1]);
-	XSetForeground(borderPtr->darkGC, borderPtr->shadows[2]);
-	for (i = 1; i < (borderWidth - 1); i++) {
-
-	    /*
-	     *  +----------
-	     *  |+-------
-	     *  ||+-----
-	     *  |||
-	     *  |||
-	     *  ||
-	     *  |
-	     */
-	    x++, y++, x2--, y2--;
-	    XDrawLine(Tk_Display(tkwin), drawable, borderPtr->lightGC, 
-		x, y, x2, y);
-	    XDrawLine(Tk_Display(tkwin), drawable, borderPtr->lightGC, 
-		x, y, x, y2);
-	    XDrawLine(Tk_Display(tkwin), drawable, borderPtr->darkGC, 
-		x2, y, x2, y2);
-	    XDrawLine(Tk_Display(tkwin), drawable, borderPtr->darkGC, 
-		x2, y2, x, y2);
-	}
-    }
-}
-
-void
-Blt_Fill3DRectangle(tkwin, drawable, border, x, y, width, height, borderWidth, 
-	relief)
-    Tk_Window tkwin;		/* Window for which border was allocated. */
-    Drawable drawable;		/* X window or pixmap in which to draw. */
-    Tk_3DBorder border;		/* Token for border to draw. */
-    int x, y, width, height;	/* Outside area of rectangular region. */
-    int borderWidth;		/* Desired width for border, in
-				 * pixels. Border will be *inside* region. */
-    int relief;			/* Indicates 3D effect: TK_RELIEF_FLAT,
-				 * TK_RELIEF_RAISED, or TK_RELIEF_SUNKEN. */
-{
-    Blt_3DBorder *borderPtr;
-
-    XFillRectangle(Tk_Display(tkwin), drawable, borderPtr->bgGC, x, y, width,
-	   height);
-    if ((borderWidth > 0) && (relief != BLT_RELIEF_FLAT)) {
-	Blt_Draw3DRectangle(tkwin, drawable, borderPtr, x, y, width, height, 
-	    borderWidth, relief);
-    }
-}
-
-
-void 
-FreeBorder(display, borderPtr)
-    Display *display;
-    Border *borderPtr;
-{
-    int i;
-
-    if (borderPtr->bgColorPtr != NULL) {
-	Tk_FreeColor(display, borderPtr->bgColorPtr);
-    }
-    for (i = 0; i < 4; i++) {
-	Tk_FreeColor(display, borderPtr->shadows[i]);
-    }
-    if (borderPtr->darkGC != NULL) {
-	Blt_FreePrivateGC(display, borderPtr->darkGC);
-    }
-    if (borderPtr->lightGC != NULL) {
-	Blt_FreePrivateGC(tkwin, borderPtr->lightGC);
-    }
-    if (borderPtr->bgGC != NULL) {
-	Blt_FreePrivateGC(tkwin, borderPtr->bgGC);
-    }
-    Blt_Free(borderPtr);
-}
-
-void
-Blt_Free3DBorder(display, border)
-    Display *display;
-    Blt_3DBorder border;
-{
-    Border *borderPtr = (Border *)border;
-
-    borderPtr->refCount--;
-    if (borderPtr->refCount >= 0) {
-	/* Search for the border in the bucket. Start at the head. */
-	headPtr = Blt_GetHashValue(borderPtr->hashPtr);
-	lastPtr = NULL;
-	while ((headPtr != borderPtr) && (headPtr != NULL)) {
-	    lastPtr = headPtr;
-	    headPtr = headPtr->next;
-	}
-	if (headPtr == NULL) {
-	    return;		/* This can't happen. It means that we could
-				 * not find the border. */
-	}
-	if (lastPtr != NULL) {
-	    lastPtr->next = borderPtr->next;
-	} else {
-	    Tcl_DeleteHashEntry(borderPtr->hashPtr);
-	}
-	FreeBorder(display, borderPtr);
-    }
-}
-
-Blt_3DBorder *
-Blt_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin, const char *borderName)
-{
-    Blt_3DBorder *borderPtr, *lastBorderPtr;
-    Blt_HashEntry *hPtr;
-    XColor *bgColorPtr;
-    char **argv;
-    const char *colorName;
-    int argc;
-    int isNew;
-
-    lastBorderPtr = NULL;
-    hPtr = Tcl_CreateHashEntry(&dataPtr->borderTable, borderName, &isNew);
-    if (!isNew) {
-	borderPtr = lastBorderPtr = Blt_GetHashValue(hPtr);
-	while (borderPtr != NULL) {
-	    if ((Tk_Screen(tkwin) == borderPtr->screen) && 
-		(Tk_Colormap(tkwin) == borderPtr->colormap)) {
-		borderPtr->refCount++;
-		return borderPtr;
-	    }
-	    borderPtr = borderPtr->nextPtr;
-	}
-    }
-    /* Create a new border. */
-    argv = NULL;
-    bgColorPtr = NULL;
-
-    if (Tcl_SplitList(interp, borderName, &argc, &argv) != TCL_OK) {
-	goto error;
-    }
-    colorName = borderName;
-    bgColorPtr = Tk_GetColor(interp, tkwin, colorName);
-    if (bgColorPtr == NULL) {
-	goto error;
-    }
-
-    /* Create a new border */
-    borderPtr = Blt_AssertCalloc(1, sizeof(Blt_3DBorder));
-    borderPtr->screen = Tk_Screen(tkwin);
-    borderPtr->visual = Tk_Visual(tkwin);
-    borderPtr->depth = Tk_Depth(tkwin);
-    borderPtr->colormap = Tk_Colormap(tkwin);
-    borderPtr->refCount = 1;
-    borderPtr->bgColorPtr = bgColorPtr;
-    borderPtr->darkGC = Blt_GetPrivateGC(tkwin, 0, NULL);
-    borderPtr->lightGC = Blt_GetPrivateGC(tkwin, 0, NULL);
-    borderPtr->hashPtr = lastBorderPtr->hashPtr;
-    lastBorderPtr->nextPtr = lastBorderPtr;
-    {
-	HSV hsv;
-	XColor color;
-	double sat, sat0, diff, step, hstep;
-	int count;
-	
-	/* Convert the face (background) color to HSV */
-	Blt_XColorToHSV(borderPtr->bgColorPtr, &hsv);
-	
-	/* Using the color as the baseline intensity, pick a set of colors
-	 * around the intensity. */
-#define UFLOOR(x,u)		(floor((x)*(u))/(u))
-	diff = hsv.sat - UFLOOR(hsv.sat, 0.2);
-	sat = 0.1 + (diff - 0.1);
-	sat0 = hsv.sat;
-	count = 0;
-	for (sat = 0.1 + (diff - 0.1); sat <= 1.0; sat += 0.2) {
-	    if (FABS(sat0 - sat) >= 0.1) {
-		hsv.sat = sat;
-		Blt_HSVToXColor(&hsv, &color);
-		borderPtr->shadows[count] = Tk_GetColorByValue(tkwin, &color);
-		count++;
-	    }
-	}
-    }
-    Blt_SetHashValue(hPtr, borderPtr);
-    if (argv != NULL) {
-	Blt_Free(argv);
-    }
-    return TCL_OK;
-
- error:
-    if (argv != NULL) {
-	Blt_Free(argv);
-    }
-    if (bgColorPtr != NULL) {
-	Tk_FreeColor(bgColorPtr);
-    }
-    if (isNew) {
-	Blt_DeleteHashEntry(&borderTable, hPtr);
-    }
-    return NULL;
-}
-
-
-#endif
-
-typedef struct {
-    float x, y, z;
-} Vector3f;
-
-typedef struct {
-    float x, y, z, w;
-} Vector4f;
-
-typedef Vector4f Quaternion;
-
-typedef float Matrix3x3f[3][3];
-
-typedef struct _ArcBall {
-    Vector3f click;      
-    Vector3f drag;		
-    float xScale;   
-    float yScale;  
-} ArcBall;
-
-/*
- * Arcball sphere constants:
- * Diameter is       2.0f
- * Radius is         1.0f
- * Radius squared is 1.0f
- */
-
-/* assuming IEEE-754 (float), which i believe has max precision of 7 bits */
-#define EPSILON FLT_EPSILON
-static INLINE float 
-LengthVector3f(Vector3f *a)
-{
-    return sqrtf((a->x * a->x) + (a->y * a->y) + (a->z * a->z));
-}
-
-static INLINE float DotProductVector3f(Vector3f *a,  Vector3f *b)
-{
-    return (a->x * b->x) + (a->y * b->y) + (a->z * b->z);
-}
-
-/**
-  * Calculate the cross product of two 3D vectors: c = a x b.
-  * "c" must not refer to the same memory location as "a" or "b".
-  */
-static INLINE void 
-CrossProductVector3f(Vector3f *a, Vector3f *b, Vector3f *c)
-{
-    c->x = (a->y * b->z) - (b->y * a->z);
-    c->y = (a->z * b->x) - (b->z * a->x);
-    c->z = (a->x * b->y) - (b->x * a->y);
-}
-
-static void 
-PointOnSphere (ArcBall *arcPtr, float x, float y, Vector3f *outPtr)
-{
-    float sx, sy;
-    float d;
-
-    /* Adjust point coords and scale down to range of [-1 ... 1] */
-    sx = (x * arcPtr->xScale)  - 1.0f;
-    sy = 1.0f - (y * arcPtr->yScale);
-
-    /* Compute the square of the length of the vector to the point from the
-     * center. */
-    d = (sx * sx) + (sy * sy);
-
-    /* If the point is mapped outside of the sphere ... 
-     * (length > radius squared)
-     */
-    if (d > 1.0f) {
-        float scale;
-
-        /* Compute a normalizing factor (radius / sqrt(length)) */
-        scale = 1.0f / sqrt (d);
-
-        /* Return the "normalized" vector, a point on the sphere */
-        outPtr->x = sx * scale;
-        outPtr->y = sy * scale;
-        outPtr->z = 0.0f;
-    } else {   /* else it's on the inside */
-        /* Return a vector to a point mapped inside the sphere
-         * sqrt(radius squared - length) */
-        outPtr->x = sx;
-        outPtr->y = sy;
-        outPtr->z = sqrtf(1.0f - d);
-    }
-}
-
-static void 
-SetArcBallBounds(ArcBall *arcPtr, float w, float h)
-{
-    if (w <= 1.0f ) {
-        w = 2.0f;
-    }
-    if (h <= 1.0f ) {
-        h = 2.0f;
-    }
-    /* Set adjustment factor for width/height */
-    arcPtr->xScale = 1.0f / ((w - 1.0f) * 0.5f);
-    arcPtr->yScale = 1.0f / ((h - 1.0f) * 0.5f);
-}
-
-static ArcBall *
-CreateArcBall (float w, float h)
-{
-    ArcBall *arcPtr;
-
-    arcPtr = Blt_AssertCalloc(1, sizeof(ArcBall));
-    SetArcBallBounds (arcPtr, w, h);
-    return arcPtr;
-}
-
-static void 
-DestroyArcBall(ArcBall *arcPtr)
-{
-    if (arcPtr != NULL) {
-        Blt_Free(arcPtr);
-    }
-}
-
-/* Mouse down: Supply mouse position in x and y */
-static void 
-ArcBallOnClick(ArcBall *arcPtr, float x, float y)
-{
-    PointOnSphere (arcPtr, x, y, &arcPtr->click);
-}
-
-/* Mouse drag, calculate rotation: Supply mouse position in x and y */
-static void 
-ArcBallOnDrag(ArcBall *arcPtr, float x, float y, Quaternion *outPtr)
-{
-    /* Map the point to the sphere */
-    PointOnSphere(arcPtr, x, y, &arcPtr->drag);
-
-    /* Return the quaternion equivalent to the rotation */
-    if (outPtr != NULL) {
-        Vector3f perp;
-
-        /* Compute the vector perpendicular to the begin and end vectors */
-        CrossProductVector3f(&arcPtr->drag, &arcPtr->click, &perp);
-
-        /* Compute the length of the perpendicular vector */
-        if (LengthVector3f(&perp) > FLT_EPSILON) {
-            /* If its non-zero, we're ok, so return the perpendicular
-             * vector as the transform after all
-             */
-            outPtr->x = perp.x;
-            outPtr->y = perp.y;
-            outPtr->z = perp.z;
-            /* In the quaternion values, w is cosine (theta / 2),
-             * where theta is rotation angle
-             */
-            outPtr->w = DotProductVector3f(&arcPtr->click, &arcPtr->drag);
-        } else {
-            /* If it is zero, the begin and end vectors coincide,
-             * so return an identity transform
-             */
-            outPtr->x = outPtr->y = outPtr->z = outPtr->z = 0.0f;
-        }
-    }
-}
-
-
-static INLINE void 
-SetRotationMatrix(const Quaternion* q, Matrix3x3f mat)
-{
-    float n, s;
-    float xs, ys, zs;
-    float wx, wy, wz;
-    float xx, xy, xz;
-    float yy, yz, zz;
-
-    assert(mat && q);
-    
-    n = (q->x * q->x) + (q->y * q->y) + (q->z * q->z) + (q->w * q->w);
-
-    s = (n > 0.0f) ? (2.0f / n) : 0.0f;
-    
-    xs = q->x * s;  
-    ys = q->y * s;  
-    zs = q->z * s;
-    wx = q->w * xs; 
-    wy = q->w * ys; 
-    wz = q->w * zs;
-    xx = q->x * xs; 
-    xy = q->x * ys; 
-    xz = q->x * zs;
-    yy = q->y * ys; 
-    yz = q->y * zs; 
-    zz = q->z * zs;
-    
-    mat[0][0] = 1.0f - (yy + zz); 
-    mat[0][1] = xy - wz;  
-    mat[0][2] = xz + wy;
-    mat[1][0] = xy + wz;  
-    mat[1][1] = 1.0f - (xx + zz); 
-    mat[1][2] = yz - wx;
-    mat[2][0] = xz - wy;  
-    mat[2][1] = yz + wx;  
-    mat[2][2] = 1.0f - (xx + yy);
-}
-
-/* Return quaternion product qL * qR.  Note: order is important!
- * To combine rotations, use the product Mul(Second, First),
- * which gives the effect of rotating by First then Second. */
-static INLINE void
-CombineRotations(Quaternion *a, Quaternion *b, Quaternion *result)
-{
-    result->w = (a->w * b->w) - (a->x * b->x) - (a->y * b->y) - (a->z * b->z);
-    result->x = (a->w * b->x) + (a->x * b->w) + (a->y * b->z) - (a->z * b->y);
-    result->y = (a->w * b->y) + (a->y * b->w) + (a->z * b->x) - (a->x * b->z);
-    result->z = (a->w * b->z) + (a->z * b->w) + (a->x * b->y) - (a->y * b->x);
-}
-
-
-static int
-GetQuaternionFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Quaternion *q)
-{
-    Tcl_Obj **objv;
-    int objc;
-    double x, y, z, w;
-    
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc != 4) {
-	Tcl_AppendResult(interp, "wrong number of elements in quaternion \"",
-			 Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetDoubleFromObj(interp, objv[0], &x) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[1], &y) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[2], &z) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[3], &w) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    q->x = x, q->y = y, q->z = z, q->w = w;
-    return TCL_OK;
-}
-
-static int
-ArcBallCombineOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    Quaternion q1, q2, r;
-
-    if (GetQuaternionFromObj(interp, objv[2], &q1) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetQuaternionFromObj(interp, objv[3], &q2) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    CombineRotations(&q2, &q1, &r);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(r.x));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(r.y));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(r.w));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(r.z));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static int
-ArcBallRotateOp(ClientData clientData, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    ArcBall *arcPtr;
-    Tcl_Obj *listObjPtr;
-    Quaternion q;
-    double x1, y1, x2, y2;
-    int w, h;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &w) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &h) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetDoubleFromObj(interp, objv[4], &x1) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[5], &y1) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[6], &x2) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[7], &y2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    arcPtr = CreateArcBall((float)w, (float)h);
-    ArcBallOnClick(arcPtr, x1, y1);
-    ArcBallOnDrag(arcPtr, x2, y2, &q);
-    DestroyArcBall(arcPtr);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(q.x));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(q.y));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(q.w));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(q.z));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static int
-ArcBallMatrixOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    Matrix3x3f rot;
-    Tcl_Obj *listObjPtr;
-    Quaternion q;
-
-    if (GetQuaternionFromObj(interp, objv[2], &q) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    SetRotationMatrix(&q, rot);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[0][0]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[0][1]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[0][2]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[1][0]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[1][1]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[1][2]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[2][0]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[2][1]));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(rot[2][2]));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec arcBallOps[] =
-{
-    {"combine", 1, ArcBallCombineOp, 4, 4, "quat1 quat2",},
-    {"matrix",  1, ArcBallMatrixOp,  3, 3, "quat",},
-    {"rotate",  1, ArcBallRotateOp,  8, 8, "w h x1 y1 x2 y2",},
-};
-static int nArcBallOps = sizeof(arcBallOps) / sizeof(Blt_OpSpec);
-
-static int
-ArcBallCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nArcBallOps, arcBallOps, BLT_OP_ARG1, 
-			    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
diff --git a/blt3.0/src/bltGrPen.c b/blt3.0/src/bltGrPen.c
deleted file mode 100644
index 2e13b3a..0000000
--- a/blt3.0/src/bltGrPen.c
+++ /dev/null
@@ -1,765 +0,0 @@
-
-/*
- * bltGrPen.c --
- *
- * This module implements pens for the BLT graph widget.
- *
- *	Copyright 1996-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include <X11/Xutil.h>
-
-typedef int (GraphPenProc)(Tcl_Interp *interp, Graph *graphPtr, int objc, 
-	Tcl_Obj *const *objv);
-
-static Blt_OptionFreeProc FreeColor;
-static Blt_OptionParseProc ObjToColor;
-static Blt_OptionPrintProc ColorToObj;
-Blt_CustomOption bltColorOption = {
-    ObjToColor, ColorToObj, FreeColor, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreePen;
-static Blt_OptionParseProc ObjToPen;
-static Blt_OptionPrintProc PenToObj;
-Blt_CustomOption bltBarPenOption = {
-    ObjToPen, PenToObj, FreePen, (ClientData)CID_ELEM_BAR
-};
-Blt_CustomOption bltLinePenOption = {
-    ObjToPen, PenToObj, FreePen, (ClientData)CID_ELEM_LINE
-};
-
-/*ARGSUSED*/
-static void
-FreeColor(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    XColor *colorPtr = *(XColor **)(widgRec + offset);
-
-    if ((colorPtr != NULL) && (colorPtr != COLOR_DEFAULT)) {
-	Tk_FreeColor(colorPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
-
- * ObjToColor --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToColor(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing color */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    XColor **colorPtrPtr = (XColor **)(widgRec + offset);
-    XColor *colorPtr;
-    const char *string;
-    char c;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-
-    if ((c == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	if ((*colorPtrPtr != NULL) && (*colorPtrPtr != COLOR_DEFAULT)) {
-	    Tk_FreeColor(*colorPtrPtr);
-	}
-	*colorPtrPtr = NULL;
-	return TCL_OK;
-    } 
-    if ((c == 'd') && (strncmp(string, "defcolor", length) == 0)) {
-	if ((*colorPtrPtr != NULL) && (*colorPtrPtr != COLOR_DEFAULT)) {
-	    Tk_FreeColor(*colorPtrPtr);
-	}
-	*colorPtrPtr = COLOR_DEFAULT;
-	return TCL_OK;
-    } 
-    colorPtr = Tk_AllocColorFromObj(interp, tkwin, objPtr);
-    if (colorPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if ((*colorPtrPtr != NULL) && (*colorPtrPtr != COLOR_DEFAULT)) {
-	Tk_FreeColor(*colorPtrPtr);
-    }
-    *colorPtrPtr = colorPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColorToObj --
- *
- *	Convert the color value into a string.
- *
- * Results:
- *	The string representing the symbol color is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ColorToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    XColor *colorPtr = *(XColor **)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (colorPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else if (colorPtr == COLOR_DEFAULT) {
-	objPtr = Tcl_NewStringObj("defcolor", -1);
-    } else {
-	objPtr = Tcl_NewStringObj(Tk_NameOfColor(colorPtr), -1);
-    }
-    return objPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreePen(
-    ClientData clientData,	/* Not used. */
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Pen **penPtrPtr = (Pen **)(widgRec + offset);
-
-    if (*penPtrPtr != NULL) {
-	Blt_FreePen(*penPtrPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPen --
- *
- *	Convert the color value into a string.
- *
- * Results:
- *	The string representing the symbol color is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPen(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing pen */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Pen **penPtrPtr = (Pen **)(widgRec + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	Blt_FreePen(*penPtrPtr);
-	*penPtrPtr = NULL;
-    } else {
-	Pen *penPtr;
-	Graph *graphPtr;
-	ClassId classId = (ClassId)clientData; /* Element type. */
-
-	graphPtr = Blt_GetGraphFromWindowData(tkwin);
-	assert(graphPtr);
-
-	if (classId == CID_NONE) {	
-	    classId = graphPtr->classId;
-	}
-	if (Blt_GetPenFromObj(interp, graphPtr, objPtr, classId, &penPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	Blt_FreePen(*penPtrPtr);
-	*penPtrPtr = penPtr;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PenToObj --
- *
- *	Parse the name of the name.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PenToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Pen *penPtr = *(Pen **)(widgRec + offset);
-
-    if (penPtr == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(penPtr->name, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPenFromObj --
- *
- *	Find and return the pen style from a given name.
- *
- * Results:
- *     	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetPenFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr, 
-	      Pen **penPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    Pen *penPtr;
-    const char *name;
-
-    penPtr = NULL;
-    name = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->penTable, name);
-    if (hPtr != NULL) {
-	penPtr = Blt_GetHashValue(hPtr);
-	if (penPtr->flags & DELETE_PENDING) {
-	    penPtr = NULL;
-	}
-    }
-    if (penPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find pen \"", name, "\" in \"", 
-		Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *penPtrPtr = penPtr;
-    return TCL_OK;
-}
-
-static void
-DestroyPen(Pen *penPtr)
-{
-    Graph *graphPtr = penPtr->graphPtr;
-
-    Blt_FreeOptions(penPtr->configSpecs, (char *)penPtr, graphPtr->display, 0);
-    (*penPtr->destroyProc) (graphPtr, penPtr);
-    if ((penPtr->name != NULL) && (penPtr->name[0] != '\0')) {
-	Blt_Free(penPtr->name);
-    }
-    if (penPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&graphPtr->penTable, penPtr->hashPtr);
-    }
-    Blt_Free(penPtr);
-}
-
-void
-Blt_FreePen(Pen *penPtr)
-{
-    if (penPtr != NULL) {
-	penPtr->refCount--;
-	if ((penPtr->refCount == 0) && (penPtr->flags & DELETE_PENDING)) {
-	    DestroyPen(penPtr);
-	}
-    }
-}
-
-Pen *
-Blt_CreatePen(Graph *graphPtr, const char *penName, ClassId classId,
-	      int objc, Tcl_Obj *const *objv)
-{
-    Pen *penPtr;
-    Blt_HashEntry *hPtr;
-    unsigned int configFlags;
-    int isNew;
-    int i;
-
-    /*
-     * Scan the option list for a "-type" entry.  This will indicate what type
-     * of pen we are creating. Otherwise we'll default to the suggested type.
-     * Last -type option wins.
-     */
-    for (i = 0; i < objc; i += 2) {
-	char *string;
-	int length;
-
-	string = Tcl_GetStringFromObj(objv[i],  &length);
-	if ((length > 2) && (strncmp(string, "-type", length) == 0)) {
-	    char *arg;
-
-	    arg = Tcl_GetString(objv[i + 1]);
-	    if (strcmp(arg, "bar") == 0) {
-		classId = CID_ELEM_BAR;
-	    } else if (strcmp(arg, "line") == 0) {
-		classId = CID_ELEM_LINE;
-	    } else if (strcmp(arg, "strip") == 0) {
-		classId = CID_ELEM_LINE;
-	    } else if (strcmp(arg, "contour") == 0) {
-		classId = CID_ELEM_CONTOUR;
-	    } else {
-		Tcl_AppendResult(graphPtr->interp, "unknown pen type \"",
-		    arg, "\" specified", (char *)NULL);
-		return NULL;
-	    }
-	}
-    }
-    if (classId == CID_ELEM_STRIP) {
-	classId = CID_ELEM_LINE;
-    }
-    hPtr = Blt_CreateHashEntry(&graphPtr->penTable, penName, &isNew);
-    if (!isNew) {
-	penPtr = Blt_GetHashValue(hPtr);
-	if ((penPtr->flags & DELETE_PENDING) == 0) {
-	    Tcl_AppendResult(graphPtr->interp, "pen \"", penName,
-		"\" already exists in \"", Tk_PathName(graphPtr->tkwin), "\"",
-		(char *)NULL);
-	    return NULL;
-	}
-	if (penPtr->classId != classId) {
-	    Tcl_AppendResult(graphPtr->interp, "pen \"", penName,
-		"\" in-use: can't change pen type from \"", 
-		Blt_GraphClassName(penPtr->classId), "\" to \"", 
-		Blt_GraphClassName(classId), "\"", (char *)NULL);
-	    return NULL;
-	}
-	penPtr->flags &= ~DELETE_PENDING; /* Undelete the pen. */
-    } else {
-	if (classId == CID_ELEM_BAR) {
-	    penPtr = Blt_BarPen(penName);
-	} else {
-	    penPtr = Blt_LinePen(penName);
-	}
-	penPtr->classId = classId;
-	penPtr->hashPtr = hPtr;
-	penPtr->graphPtr = graphPtr;
-	Blt_SetHashValue(hPtr, penPtr);
-    }
-    configFlags = (penPtr->flags & (ACTIVE_PEN | NORMAL_PEN));
-    if (Blt_ConfigureComponentFromObj(graphPtr->interp, graphPtr->tkwin,
-	    penPtr->name, "Pen", penPtr->configSpecs, objc, objv,
-	    (char *)penPtr, configFlags) != TCL_OK) {
-	if (isNew) {
-	    DestroyPen(penPtr);
-	}
-	return NULL;
-    }
-    (*penPtr->configProc) (graphPtr, penPtr);
-    return penPtr;
-}
-
-int
-Blt_GetPenFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr,
-		  ClassId classId, Pen **penPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    Pen *penPtr;
-    const char *name;
-    
-    penPtr = NULL;
-    name = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&graphPtr->penTable, name);
-    if (hPtr != NULL) {
-	penPtr = Blt_GetHashValue(hPtr);
-	if (penPtr->flags & DELETE_PENDING) {
-	    penPtr = NULL;
-	}
-    }
-    if (penPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find pen \"", name, "\" in \"", 
-		Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (classId == CID_ELEM_STRIP) {
-	classId = CID_ELEM_LINE;
-    }
-    if (penPtr->classId != classId) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "pen \"", name, 
-		"\" is the wrong type (is \"", 
-		Blt_GraphClassName(penPtr->classId), "\"", ", wanted \"", 
-		Blt_GraphClassName(classId), "\")", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    penPtr->refCount++;
-    *penPtrPtr = penPtr;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DestroyPens --
- *
- *	Release memory and resources allocated for the style.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the pen style is freed up.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DestroyPens(Graph *graphPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&graphPtr->penTable, &iter);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Pen *penPtr;
-
-	penPtr = Blt_GetHashValue(hPtr);
-	penPtr->hashPtr = NULL;
-	DestroyPen(penPtr);
-    }
-    Blt_DeleteHashTable(&graphPtr->penTable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Queries axis attributes (font, line width, label, etc).
- *
- * Results:
- *	A standard TCL result.  If querying configuration values,
- *	interp->result will contain the results.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-CgetOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Pen *penPtr;
-    unsigned int configFlags;
-
-    if (GetPenFromObj(interp, graphPtr, objv[3], &penPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    configFlags = (penPtr->flags & (ACTIVE_PEN | NORMAL_PEN));
-    return Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, 
-	penPtr->configSpecs, (char *)penPtr, objv[4], configFlags);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Queries or resets pen attributes (font, line width, color, etc).
- *
- * Results:
- *	A standard TCL result.  If querying configuration values,
- *	interp->result will contain the results.
- *
- * Side Effects:
- *	Pen resources are possibly allocated (GC, font).
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Pen *penPtr;
-    int nNames, nOpts;
-    int redraw;
-    Tcl_Obj *const *options;
-    int i;
-
-    /* Figure out where the option value pairs begin */
-    objc -= 3;
-    objv += 3;
-    for (i = 0; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-	if (GetPenFromObj(interp, graphPtr, objv[i], &penPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    nNames = i;			/* Number of pen names specified */
-    nOpts = objc - i;		/* Number of options specified */
-    options = objv + i;		/* Start of options in objv  */
-
-    redraw = 0;
-    for (i = 0; i < nNames; i++) {
-    int flags;
-
-	if (GetPenFromObj(interp, graphPtr, objv[i], &penPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	flags = BLT_CONFIG_OBJV_ONLY | (penPtr->flags&(ACTIVE_PEN|NORMAL_PEN));
-	if (nOpts == 0) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		penPtr->configSpecs, (char *)penPtr, (Tcl_Obj *)NULL, flags);
-	} else if (nOpts == 1) {
-	    return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, 
-		    penPtr->configSpecs, (char *)penPtr, options[0], flags);
-	}
-	if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, 
-		penPtr->configSpecs, nOpts, options, (char *)penPtr, flags) 
-		!= TCL_OK) {
-	    break;
-	}
-	(*penPtr->configProc) (graphPtr, penPtr);
-	if (penPtr->refCount > 0) {
-	    redraw++;
-	}
-    }
-    if (redraw) {
-	graphPtr->flags |= CACHE_DIRTY;
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-    if (i < nNames) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateOp --
- *
- *	Adds a new penstyle to the graph.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Pen *penPtr;
-
-    penPtr = Blt_CreatePen(graphPtr, Tcl_GetString(objv[3]), graphPtr->classId,
-	objc - 4, objv + 4);
-    if (penPtr == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[3]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Delete the given pen.
- *
- * Results:
- *	Always returns TCL_OK.  The interp->result field is a list of the
- *	graph axis limits.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static int
-DeleteOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Pen *penPtr;
-
-	if (GetPenFromObj(interp, graphPtr, objv[i], &penPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (penPtr->flags & DELETE_PENDING) {
-	    Tcl_AppendResult(interp, "can't find pen \"", 
-		Tcl_GetString(objv[i]), "\" in \"", 
-		Tk_PathName(graphPtr->tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	penPtr->flags |= DELETE_PENDING;
-	if (penPtr->refCount == 0) {
-	    DestroyPen(penPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Return a list of the names of all the axes.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->penTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Pen *penPtr;
-
-	    penPtr = Blt_GetHashValue(hPtr);
-	    if ((penPtr->flags & DELETE_PENDING) == 0) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewStringObj(penPtr->name, -1));
-	    }
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&graphPtr->penTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Pen *penPtr;
-
-	    penPtr = Blt_GetHashValue(hPtr);
-	    if ((penPtr->flags & DELETE_PENDING) == 0) {
-		int i;
-
-		for (i = 3; i < objc; i++) {
-		    char *pattern;
-
-		    pattern = Tcl_GetString(objv[i]);
-		    if (Tcl_StringMatch(penPtr->name, pattern)) {
-			Tcl_ListObjAppendElement(interp, listObjPtr, 
-				Tcl_NewStringObj(penPtr->name, -1));
-			break;
-		    }
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TypeOp --
- *
- *	Return the type of pen.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeOp(Tcl_Interp *interp, Graph *graphPtr, int objc, Tcl_Obj *const *objv)
-{
-    Pen *penPtr;
-
-    if (GetPenFromObj(interp, graphPtr, objv[3], &penPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		     Blt_GraphClassName(penPtr->classId), -1);
-    return TCL_OK;
-}
-
-static Blt_OpSpec penOps[] =
-{
-    {"cget", 2, CgetOp, 5, 5, "penName option",},
-    {"configure", 2, ConfigureOp, 4, 0,
-	"penName ?penName?... ?option value?...",},
-    {"create", 2, CreateOp, 4, 0, "penName ?option value?...",},
-    {"delete", 2, DeleteOp, 3, 0, "?penName?...",},
-    {"names", 1, NamesOp, 3, 0, "?pattern?...",},
-    {"type", 1, TypeOp, 4, 4, "penName",},
-};
-static int nPenOps = sizeof(penOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_PenOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    GraphPenProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPenOps, penOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (interp, graphPtr, objc, objv);
-}
diff --git a/blt3.0/src/bltGrPs.c b/blt3.0/src/bltGrPs.c
deleted file mode 100644
index f0cfc99..0000000
--- a/blt3.0/src/bltGrPs.c
+++ /dev/null
@@ -1,731 +0,0 @@
-
-/*
- * bltGrPs.c --
- *
- * This module implements the "postscript" operation for BLT graph widget.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostScript routines to print a graph
- *
- *---------------------------------------------------------------------------
- */
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltPsInt.h"
-#include "bltPicture.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-#include <stdarg.h>
-
-#define MM_INCH		25.4
-#define PICA_INCH	72.0
-
-typedef int (GraphPsProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-static Blt_OptionParseProc ObjToPicaProc;
-static Blt_OptionPrintProc PicaToObjProc;
-static Blt_CustomOption picaOption =
-{
-    ObjToPicaProc, PicaToObjProc, NULL, (ClientData)0,
-};
-
-static Blt_OptionParseProc ObjToPad;
-static Blt_OptionPrintProc PadToObj;
-static Blt_CustomOption padOption =
-{
-    ObjToPad, PadToObj, NULL, (ClientData)0,
-};
-
-#define DEF_PS_CENTER		"yes"
-#define DEF_PS_COLOR_MAP	(char *)NULL
-#define DEF_PS_GREYSCALE	"no"
-#define DEF_PS_DECORATIONS	"no"
-#define DEF_PS_FONT_MAP		(char *)NULL
-#define DEF_PS_FOOTER		"no"
-#define DEF_PS_LEVEL		"2"
-#define DEF_PS_HEIGHT		"0"
-#define DEF_PS_LANDSCAPE	"no"
-#define DEF_PS_PADX		"1.0i"
-#define DEF_PS_PADY		"1.0i"
-#define DEF_PS_PAPERHEIGHT	"11.0i"
-#define DEF_PS_PAPERWIDTH	"8.5i"
-#define DEF_PS_WIDTH		"0"
-#define DEF_PS_COMMENTS		""
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BITMASK, "-center", "center", "Center", DEF_PS_CENTER, 
-	Blt_Offset(PageSetup, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-        (Blt_CustomOption *)PS_CENTER},
-    {BLT_CONFIG_STRING, "-colormap", "colorMap", "ColorMap",
-	DEF_PS_COLOR_MAP, Blt_Offset(PageSetup, colorVarName),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST,    "-comments", "comments", "Comments",
-	DEF_PS_COMMENTS, Blt_Offset(PageSetup, comments), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK, "-decorations", "decorations", "Decorations",
-	DEF_PS_DECORATIONS, Blt_Offset(PageSetup, flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)PS_DECORATIONS},
-    {BLT_CONFIG_STRING, "-fontmap", "fontMap", "FontMap",
-	DEF_PS_FONT_MAP, Blt_Offset(PageSetup, fontVarName),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK, "-footer", "footer", "Footer", DEF_PS_FOOTER, 
-        Blt_Offset(PageSetup, flags), BLT_CONFIG_DONT_SET_DEFAULT,
-        (Blt_CustomOption *)PS_FOOTER},
-    {BLT_CONFIG_BITMASK, "-greyscale", "greyscale", "Greyscale",
-	DEF_PS_GREYSCALE, Blt_Offset(PageSetup, flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)PS_GREYSCALE},
-    {BLT_CONFIG_CUSTOM, "-height", "height", "Height", DEF_PS_HEIGHT, 
-	Blt_Offset(PageSetup, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT,
-	&picaOption},
-    {BLT_CONFIG_BITMASK, "-landscape", "landscape", "Landscape",
-	DEF_PS_LANDSCAPE, Blt_Offset(PageSetup, flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)PS_LANDSCAPE},
-    {BLT_CONFIG_INT_POS, "-level", "level", "Level", DEF_PS_LEVEL, 
-	Blt_Offset(PageSetup, level), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-padx", "padX", "PadX", DEF_PS_PADX, 
-	Blt_Offset(PageSetup, xPad), 0, &padOption},
-    {BLT_CONFIG_CUSTOM, "-pady", "padY", "PadY", DEF_PS_PADY, 
-	Blt_Offset(PageSetup, yPad), 0, &padOption},
-    {BLT_CONFIG_CUSTOM, "-paperheight", "paperHeight", "PaperHeight",
-	DEF_PS_PAPERHEIGHT, Blt_Offset(PageSetup, reqPaperHeight), 0,
-	&picaOption},
-    {BLT_CONFIG_CUSTOM, "-paperwidth", "paperWidth", "PaperWidth",
-	DEF_PS_PAPERWIDTH, Blt_Offset(PageSetup, reqPaperWidth), 0,
-	&picaOption},
-    {BLT_CONFIG_CUSTOM, "-width", "width", "Width", DEF_PS_WIDTH, 
-        Blt_Offset(PageSetup, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&picaOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPicaProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPicaProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* New value. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int *picaPtr = (int *)(widgRec + offset);
-
-    return Blt_Ps_GetPicaFromObj(interp, objPtr, picaPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PicaToObj --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PicaToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* PostScript structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int pica = *(int *)(widgRec + offset);
-
-    return Tcl_NewIntObj(pica);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPad --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPad(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* New value. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_Pad *padPtr = (Blt_Pad *) (widgRec + offset);
-
-    return Blt_Ps_GetPadFromObj(interp, objPtr, padPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PadToObj --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-PadToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* PostScript structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Blt_Pad *padPtr = (Blt_Pad *)(widgRec + offset);
-    Tcl_Obj *objPtr, *listObjPtr;
-	    
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    objPtr = Tcl_NewIntObj(padPtr->side1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(padPtr->side2);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    return listObjPtr;
-}
-
-static void
-AddComments(Blt_Ps ps, const char **comments)
-{
-    const char **p;
-
-    for (p = comments; *p != NULL; p += 2) {
-	if (*(p+1) == NULL) {
-	    break;
-	}
-	Blt_Ps_Format(ps, "%% %s: %s\n", *p, *(p+1));
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostScriptPreamble
- *
- *    	The PostScript preamble calculates the needed translation and scaling
- *    	to make X11 coordinates compatible with PostScript.
- *
- *---------------------------------------------------------------------------
- */
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif /* HAVE_SYS_TIME_H */
-#endif /* TIME_WITH_SYS_TIME */
-
-
-static int
-PostScriptPreamble(Graph *graphPtr, const char *fileName, Blt_Ps ps)
-{
-    PageSetup *setupPtr = graphPtr->pageSetup;
-    time_t ticks;
-    char date[200];			/* Holds the date string from ctime() */
-    const char *version;
-    char *newline;
-
-    if (fileName == NULL) {
-	fileName = Tk_PathName(graphPtr->tkwin);
-    }
-    Blt_Ps_Append(ps, "%!PS-Adobe-3.0 EPSF-3.0\n");
-
-    /*
-     * The "BoundingBox" comment is required for EPS files. The box
-     * coordinates are integers, so we need round away from the center of the
-     * box.
-     */
-    Blt_Ps_Format(ps, "%%%%BoundingBox: %d %d %d %d\n",
-	setupPtr->left, setupPtr->paperHeight - setupPtr->top,
-	setupPtr->right, setupPtr->paperHeight - setupPtr->bottom);
-	
-    Blt_Ps_Append(ps, "%%Pages: 0\n");
-
-    version = Tcl_GetVar(graphPtr->interp, "blt_version", TCL_GLOBAL_ONLY);
-    if (version == NULL) {
-	version = "???";
-    }
-    Blt_Ps_Format(ps, "%%%%Creator: (BLT %s %s)\n", version,
-	Tk_Class(graphPtr->tkwin));
-
-    ticks = time((time_t *) NULL);
-    strcpy(date, ctime(&ticks));
-    newline = date + strlen(date) - 1;
-    if (*newline == '\n') {
-	*newline = '\0';
-    }
-    Blt_Ps_Format(ps, "%%%%CreationDate: (%s)\n", date);
-    Blt_Ps_Format(ps, "%%%%Title: (%s)\n", fileName);
-    Blt_Ps_Append(ps, "%%DocumentData: Clean7Bit\n");
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Append(ps, "%%Orientation: Landscape\n");
-    } else {
-	Blt_Ps_Append(ps, "%%Orientation: Portrait\n");
-    }
-    Blt_Ps_Append(ps, "%%DocumentNeededResources: font Helvetica Courier\n");
-    AddComments(ps, setupPtr->comments);
-    Blt_Ps_Append(ps, "%%EndComments\n\n");
-    if (Blt_Ps_IncludeFile(graphPtr->interp, ps, "bltGraph.pro") != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (setupPtr->flags & PS_FOOTER) {
-	const char *who;
-
-	who = getenv("LOGNAME");
-	if (who == NULL) {
-	    who = "???";
-	}
-	Blt_Ps_VarAppend(ps,
-	    "8 /Helvetica SetFont\n",
-	    "10 30 moveto\n",
-	    "(Date: ", date, ") show\n",
-	    "10 20 moveto\n",
-	    "(File: ", fileName, ") show\n",
-	    "10 10 moveto\n",
-	    "(Created by: ", who, "@", Tcl_GetHostName(), ") show\n",
-	    "0 0 moveto\n",
-	    (char *)NULL);
-    }
-    /*
-     * Set the conversion from PostScript to X11 coordinates.  Scale pica to
-     * pixels and flip the y-axis (the origin is the upperleft corner).
-     */
-    Blt_Ps_VarAppend(ps,
-	"% Transform coordinate system to use X11 coordinates\n\n",
-	"% 1. Flip y-axis over by reversing the scale,\n",
-	"% 2. Translate the origin to the other side of the page,\n",
-	"%    making the origin the upper left corner\n", (char *)NULL);
-    Blt_Ps_Format(ps, "1 -1 scale\n");
-    /* Papersize is in pixels.  Translate the new origin *after* changing the
-     * scale. */
-    Blt_Ps_Format(ps, "0 %d translate\n\n", -setupPtr->paperHeight);
-    Blt_Ps_VarAppend(ps, "% User defined page layout\n\n",
-		     "% Set color level\n", (char *)NULL);
-    Blt_Ps_Format(ps, "%% Set origin\n%d %d translate\n\n",
-	setupPtr->left, setupPtr->bottom);
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Format(ps,
-	    "%% Landscape orientation\n0 %g translate\n-90 rotate\n",
-	    ((double)graphPtr->width * setupPtr->scale));
-    }
-#ifdef notdef
-    if (setupPtr->scale != 1.0f) {
-	Blt_Ps_Append(ps, "\n% Setting graph scale factor\n");
-	Blt_Ps_Format(ps, " %g %g scale\n", setupPtr->scale, setupPtr->scale);
-    }
-#endif
-    Blt_Ps_Append(ps, "\n%%EndSetup\n\n");
-    return TCL_OK;
-}
-
-
-static void
-MarginsToPostScript(Graph *graphPtr, Blt_Ps ps)
-{
-    PageSetup *setupPtr = graphPtr->pageSetup;
-    XRectangle margin[4];
-
-    margin[0].x = margin[0].y = margin[3].x = margin[1].x = 0;
-    margin[0].width = margin[3].width = graphPtr->width;
-    margin[0].height = graphPtr->top;
-    margin[3].y = graphPtr->bottom;
-    margin[3].height = graphPtr->height - graphPtr->bottom;
-    margin[2].y = margin[1].y = graphPtr->top;
-    margin[1].width = graphPtr->left;
-    margin[2].height = margin[1].height = graphPtr->bottom - graphPtr->top;
-    margin[2].x = graphPtr->right;
-    margin[2].width = graphPtr->width - graphPtr->right;
-
-    /* Clear the surrounding margins and clip the plotting surface */
-    if (setupPtr->flags & PS_DECORATIONS) {
-	Blt_Ps_XSetBackground(ps,Blt_BackgroundBorderColor(graphPtr->normalBg));
-    } else {
-	Blt_Ps_SetClearBackground(ps);
-    }
-    Blt_Ps_Append(ps, "% Margins\n");
-    Blt_Ps_XFillRectangles(ps, margin, 4);
-    
-    Blt_Ps_Append(ps, "% Interior 3D border\n");
-    /* Interior 3D border */
-    if (graphPtr->plotBW > 0) {
-	Tk_3DBorder border;
-	int x, y, w, h;
-
-	x = graphPtr->left - graphPtr->plotBW;
-	y = graphPtr->top - graphPtr->plotBW;
-	w = (graphPtr->right - graphPtr->left) + (2*graphPtr->plotBW);
-	h = (graphPtr->bottom - graphPtr->top) + (2*graphPtr->plotBW);
-	border = Blt_BackgroundBorder(graphPtr->normalBg);
-	Blt_Ps_Draw3DRectangle(ps, border, (double)x, (double)y, w, h,
-		graphPtr->plotBW, graphPtr->plotRelief);
-    }
-    if (Blt_Legend_Site(graphPtr) & LEGEND_MARGIN_MASK) {
-	/*
-	 * Print the legend if we're using a site which lies in one of the
-	 * margins (left, right, top, or bottom) of the graph.
-	 */
-	Blt_LegendToPostScript(graphPtr, ps);
-    }
-    if (graphPtr->title != NULL) {
-	Blt_Ps_Append(ps, "% Graph title\n");
-	Blt_Ps_DrawText(ps, graphPtr->title, &graphPtr->titleTextStyle, 
-		(double)graphPtr->titleX, (double)graphPtr->titleY);
-    }
-    Blt_AxesToPostScript(graphPtr, ps);
-}
-
-
-static int
-GraphToPostScript(Graph *graphPtr, const char *ident, Blt_Ps ps)
-{
-    int x, y, w, h;
-    int result;
-    PageSetup *setupPtr = graphPtr->pageSetup;
-
-    /*   
-     * We need to know how big a graph to print.  If the graph hasn't been drawn
-     * yet, the width and height will be 1.  Instead use the requested size of
-     * the widget.  The user can still override this with the -width and -height
-     * postscript options.
-     */
-    if (setupPtr->reqWidth > 0) {
-	graphPtr->width = setupPtr->reqWidth;
-    } else if (graphPtr->width < 2) {
-	graphPtr->width = Tk_ReqWidth(graphPtr->tkwin);
-    }
-    if (setupPtr->reqHeight > 0) {
-	graphPtr->height = setupPtr->reqHeight;
-    } else if (graphPtr->height < 2) {
-	graphPtr->height = Tk_ReqHeight(graphPtr->tkwin);
-    }
-    Blt_Ps_ComputeBoundingBox(setupPtr, graphPtr->width, graphPtr->height);
-    graphPtr->flags |= LAYOUT_NEEDED | RESET_WORLD;
-
-    /* Turn on PostScript measurements when computing the graph's layout. */
-    Blt_Ps_SetPrinting(ps, TRUE);
-    Blt_ReconfigureGraph(graphPtr);
-    Blt_MapGraph(graphPtr);
-
-    result = PostScriptPreamble(graphPtr, ident, ps);
-    if (result != TCL_OK) {
-	goto error;
-    }
-    /* Determine rectangle of the plotting area for the graph window */
-    x = graphPtr->left - graphPtr->plotBW;
-    y = graphPtr->top - graphPtr->plotBW;
-
-    w = (graphPtr->right - graphPtr->left + 1) + (2*graphPtr->plotBW);
-    h = (graphPtr->bottom - graphPtr->top + 1) + (2*graphPtr->plotBW);
-
-    Blt_Ps_XSetFont(ps, Blt_Ts_GetFont(graphPtr->titleTextStyle));
-    if (graphPtr->pageSetup->flags & PS_DECORATIONS) {
-	Blt_Ps_XSetBackground(ps, Blt_BackgroundBorderColor(graphPtr->plotBg));
-    } else {
-	Blt_Ps_SetClearBackground(ps);
-    }
-    Blt_Ps_XFillRectangle(ps, x, y, w, h);
-    Blt_Ps_Rectangle(ps, x, y, w, h);
-    Blt_Ps_Append(ps, "gsave clip\n\n");
-    /* Draw the grid, elements, and markers in the plotting area. */
-    Blt_GridsToPostScript(graphPtr, ps);
-    Blt_MarkersToPostScript(graphPtr, ps, TRUE);
-    if ((Blt_Legend_Site(graphPtr) & LEGEND_PLOTAREA_MASK) && 
-	(!Blt_Legend_IsRaised(graphPtr))) {
-	/* Print legend underneath elements and markers */
-	Blt_LegendToPostScript(graphPtr, ps);
-    }
-    Blt_AxisLimitsToPostScript(graphPtr, ps);
-    Blt_ElementsToPostScript(graphPtr, ps);
-    if ((Blt_Legend_Site(graphPtr) & LEGEND_PLOTAREA_MASK) && 
-	(Blt_Legend_IsRaised(graphPtr))) {
-	/* Print legend above elements (but not markers) */
-	Blt_LegendToPostScript(graphPtr, ps);
-    }
-    Blt_MarkersToPostScript(graphPtr, ps, FALSE);
-    Blt_ActiveElementsToPostScript(graphPtr, ps);
-    Blt_Ps_VarAppend(ps, "\n",
-	"% Unset clipping\n",
-	"grestore\n\n", (char *)NULL);
-    MarginsToPostScript(graphPtr, ps);
-    Blt_Ps_VarAppend(ps,
-	"showpage\n",
-	"%Trailer\n",
-	"grestore\n",
-	"end\n",
-	"%EOF\n", (char *)NULL);
-  error:
-    /* Reset height and width of graph window */
-    graphPtr->width = Tk_Width(graphPtr->tkwin);
-    graphPtr->height = Tk_Height(graphPtr->tkwin);
-    graphPtr->flags |= MAP_WORLD;
-    Blt_Ps_SetPrinting(ps, FALSE);
-    Blt_ReconfigureGraph(graphPtr);
-    Blt_MapGraph(graphPtr);
-    /*
-     * Redraw the graph in order to re-calculate the layout as soon as
-     * possible. This is in the case the crosshairs are active.
-     */
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    PageSetup *setupPtr = graphPtr->pageSetup;
-
-    if (Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, configSpecs, 
-	(char *)setupPtr, objv[3], 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *      This procedure is invoked to print the graph in a file.
- *
- * Results:
- *      A standard TCL result.
- *
- * Side effects:
- *      A new PostScript file is created.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int flags = BLT_CONFIG_OBJV_ONLY;
-    PageSetup *setupPtr = graphPtr->pageSetup;
-
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)setupPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-		(char *)setupPtr, objv[3], flags);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-	    objc - 3, objv + 3, (char *)setupPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OutputOp --
- *
- *      This procedure is invoked to print the graph in a file.
- *
- * Results:
- *      Standard TCL result.  TCL_OK if plot was successfully printed, 
- *      TCL_ERROR otherwise.
- *
- * Side effects:
- *      A new PostScript file is created.
- *
- *---------------------------------------------------------------------------
- */
-static int
-OutputOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *buffer;
-    PostScript *psPtr;
-    Tcl_Channel channel;
-    const char *fileName;		/* Name of file to write PostScript
-					 * output If NULL, output is returned
-					 * via interp->result. */
-    int length;
-
-    fileName = NULL;			/* Used to identify the output sink. */
-    channel = NULL;
-    if (objc > 3) {
-	fileName = Tcl_GetString(objv[3]);
-	if (fileName[0] != '-') {
-	    objv++, objc--;		/* First argument is the file name. */
-	    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	    if (channel == NULL) {
-		return TCL_ERROR;
-	    }
-	    if (Tcl_SetChannelOption(interp, channel, "-translation", "binary") 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-
-    psPtr = Blt_Ps_Create(graphPtr->interp, graphPtr->pageSetup);
-    if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-	objc - 3, objv + 3, (char *)graphPtr->pageSetup, BLT_CONFIG_OBJV_ONLY) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GraphToPostScript(graphPtr, fileName, psPtr) != TCL_OK) {
-	goto error;
-    }
-    buffer = Blt_Ps_GetValue(psPtr, &length);
-    if (channel != NULL) {
-	int nBytes;
-	/*
-	 * If a file name was given, write the results to that file
-	 */
-	nBytes = Tcl_Write(channel, buffer, length);
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "error writing file \"", fileName, "\": ",
-		Tcl_PosixError(interp), (char *)NULL);
-	    goto error;
-	}
-        Tcl_Close(interp, channel);
-    } else {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), buffer, length);
-    }
-    Blt_Ps_Free(psPtr);
-    return TCL_OK;
-
-  error:
-    if (channel != NULL) {
-        Tcl_Close(interp, channel);
-    }
-    Blt_Ps_Free(psPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreatePostScript --
- *
- *      Creates a postscript structure.
- *
- * Results:
- *      Always TCL_OK.
- *
- * Side effects:
- *      A new PostScript structure is created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CreatePageSetup(Graph *graphPtr)
-{
-    PageSetup *setupPtr;
-
-    setupPtr = Blt_AssertCalloc(1, sizeof(PostScript));
-    setupPtr->flags = PS_CENTER;
-    setupPtr->level = 2;
-    graphPtr->pageSetup = setupPtr;
-
-    if (Blt_ConfigureComponentFromObj(graphPtr->interp, graphPtr->tkwin,
-	    "postscript", "Postscript", configSpecs, 0, (Tcl_Obj **)NULL,
-	    (char *)setupPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PostScriptOp --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to a widget managed by this module.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec psOps[] =
-{
-    {"cget",      2, CgetOp,      4, 4, "option",},
-    {"configure", 2, ConfigureOp, 3, 0, "?option value?...",},
-    {"output",    1, OutputOp,    3, 0, "?fileName? ?option value?...",},
-};
-
-static int nPsOps = sizeof(psOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_PostScriptOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    GraphPsProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nPsOps, psOps, BLT_OP_ARG2, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (graphPtr, interp, objc, objv);
-    return result;
-}
-
-void
-Blt_DestroyPageSetup(Graph *graphPtr)
-{
-    if (graphPtr->pageSetup != NULL) {
-	Blt_FreeOptions(configSpecs, (char *)graphPtr->pageSetup, 
-		graphPtr->display, 0);
-	Blt_Free(graphPtr->pageSetup);
-    }
-}
diff --git a/blt3.0/src/bltGraph.c b/blt3.0/src/bltGraph.c
deleted file mode 100644
index 8792927..0000000
--- a/blt3.0/src/bltGraph.c
+++ /dev/null
@@ -1,2376 +0,0 @@
-
-/*
- * bltGraph.c --
- *
- * This module implements a graph widget for the BLT toolkit.
- *
- * The graph widget was created by Sani Nassif and George Howlett.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * To do:
- *
- * 2) Update manual pages.
- *
- * 3) Update comments.
- *
- * 5) Surface, contour, and flow graphs
- *
- * 7) Arrows for line markers
- *
- */
-
-#include "bltGraph.h"
-#include "bltOp.h"
-#include "bltBind.h"
-#include "bltGrElem.h"
-#include "bltGrLegd.h"
-#include "bltSwitch.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-#include "bltPicture.h"
-
-typedef int (GraphCmdProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-/* 
- * Objects in the graph have their own class names.  These class names are
- * used for the resource database and bindings.  Example.
- *
- *	option add *X.title "X Axis Title" widgetDefault
- *	.g marker bind BitmapMarker <Enter> { ... }
- *
- * The option database trick is performed by creating a temporary window when
- * an object is initially configured.  The class name of the temporary window
- * will be from the list below.
- */
-static const char *objectClassNames[] = {
-    "unknown",
-    "XAxis", 
-    "YAxis",
-    "BarElement", 
-    "ContourElement",
-    "LineElement", 
-    "StripElement", 
-    "BitmapMarker", 
-    "ImageMarker", 
-    "LineMarker", 
-    "PolygonMarker",
-    "TextMarker", 
-    "WindowMarker",
-};
-
-BLT_EXTERN Blt_CustomOption bltLinePenOption;
-BLT_EXTERN Blt_CustomOption bltBarPenOption;
-BLT_EXTERN Blt_CustomOption bltBarModeOption;
-
-#define DEF_GRAPH_ASPECT_RATIO		"0.0"
-#define DEF_GRAPH_BAR_BASELINE		"0.0"
-#define DEF_GRAPH_BAR_MODE		"normal"
-#define DEF_GRAPH_BAR_WIDTH		"0.9"
-#define DEF_GRAPH_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_GRAPH_BORDERWIDTH		STD_BORDERWIDTH
-#define DEF_GRAPH_BUFFER_ELEMENTS	"yes"
-#define DEF_GRAPH_BUFFER_GRAPH		"1"
-#define DEF_GRAPH_CURSOR		"crosshair"
-#define DEF_GRAPH_FONT			"{Sans Serif} 12"
-#define DEF_GRAPH_HALO			"2m"
-#define DEF_GRAPH_HALO_BAR		"0.1i"
-#define DEF_GRAPH_HEIGHT		"4i"
-#define DEF_GRAPH_HIGHLIGHT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_GRAPH_HIGHLIGHT_COLOR	RGB_BLACK
-#define DEF_GRAPH_HIGHLIGHT_WIDTH	"2"
-#define DEF_GRAPH_INVERT_XY		"0"
-#define DEF_GRAPH_JUSTIFY		"center"
-#define DEF_GRAPH_MARGIN		"0"
-#define DEF_GRAPH_MARGIN_VAR		(char *)NULL
-#define DEF_GRAPH_PLOT_BACKGROUND	RGB_WHITE
-#define DEF_GRAPH_PLOT_BORDERWIDTH	"1"
-#define DEF_GRAPH_PLOT_PADX		"0"
-#define DEF_GRAPH_PLOT_PADY		"0"
-#define DEF_GRAPH_PLOT_RELIEF		"solid"
-#define DEF_GRAPH_RELIEF		"flat"
-#define DEF_GRAPH_SHOW_VALUES		"no"
-#define DEF_GRAPH_STACK_AXES		"no"
-#define DEF_GRAPH_TAKE_FOCUS		""
-#define DEF_GRAPH_TITLE			(char *)NULL
-#define DEF_GRAPH_TITLE_COLOR		STD_NORMAL_FOREGROUND
-#define DEF_GRAPH_WIDTH			"5i"
-#define DEF_GRAPH_DATA			(char *)NULL
-#define DEF_GRAPH_DATA_COMMAND		(char *)NULL
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_FLOAT, "-aspect", "aspect", "Aspect", DEF_GRAPH_ASPECT_RATIO, 
-	Blt_Offset(Graph, aspect), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_GRAPH_BACKGROUND, Blt_Offset(Graph, normalBg), 0},
-    {BLT_CONFIG_CUSTOM, "-barmode", "barMode", "BarMode", DEF_GRAPH_BAR_MODE, 
-	Blt_Offset(Graph, mode), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&bltBarModeOption},
-    {BLT_CONFIG_FLOAT, "-barwidth", "barWidth", "BarWidth", 
-	DEF_GRAPH_BAR_WIDTH, Blt_Offset(Graph, barWidth), 0},
-    {BLT_CONFIG_FLOAT, "-baseline", "baseline", "Baseline",
-	DEF_GRAPH_BAR_BASELINE, Blt_Offset(Graph, baseline), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL,0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bm", "bottomMargin", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_GRAPH_BORDERWIDTH, Blt_Offset(Graph, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-bottommargin", "bottomMargin", "Margin",
-	DEF_GRAPH_MARGIN, Blt_Offset(Graph, bottomMargin.reqSize), 0},
-    {BLT_CONFIG_STRING, "-bottomvariable", "bottomVariable", "BottomVariable",
-	DEF_GRAPH_MARGIN_VAR, Blt_Offset(Graph, bottomMargin.varName), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-bufferelements", "bufferElements", "BufferElements",
-	DEF_GRAPH_BUFFER_ELEMENTS, Blt_Offset(Graph, backingStore),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-buffergraph", "bufferGraph", "BufferGraph",
-	DEF_GRAPH_BUFFER_GRAPH, Blt_Offset(Graph, doubleBuffer),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_GRAPH_CURSOR, Blt_Offset(Graph, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-data", "data", "Data", 
-        (char *)NULL, Blt_Offset(Graph, data), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-datacommand", "dataCommand", "DataCommand", 
-        (char *)NULL, Blt_Offset(Graph, dataCmd), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font",
-	DEF_GRAPH_FONT, Blt_Offset(Graph, titleTextStyle.font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_GRAPH_TITLE_COLOR, Blt_Offset(Graph, titleTextStyle.color), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-halo", "halo", "Halo", DEF_GRAPH_HALO, 
-	Blt_Offset(Graph, halo), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_GRAPH_HEIGHT, 
-	Blt_Offset(Graph, reqHeight), 0},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_GRAPH_HIGHLIGHT_BACKGROUND, 
-	Blt_Offset(Graph, highlightBgColor), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_GRAPH_HIGHLIGHT_COLOR, Blt_Offset(Graph, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_GRAPH_HIGHLIGHT_WIDTH, 
-	Blt_Offset(Graph, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-invertxy", "invertXY", "InvertXY", 
-	DEF_GRAPH_INVERT_XY, Blt_Offset(Graph, inverted),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_GRAPH_JUSTIFY, 
-	Blt_Offset(Graph, titleTextStyle.justify), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-leftmargin", "leftMargin", "Margin", 
-	DEF_GRAPH_MARGIN, Blt_Offset(Graph, leftMargin.reqSize), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-leftvariable", "leftVariable", "LeftVariable",
-	DEF_GRAPH_MARGIN_VAR, Blt_Offset(Graph, leftMargin.varName), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-lm", "leftMargin", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_BACKGROUND, "-plotbackground", "plotBackground", "Background",
-	DEF_GRAPH_PLOT_BACKGROUND, Blt_Offset(Graph, plotBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-plotborderwidth", "plotBorderWidth", 
-        "PlotBorderWidth", DEF_GRAPH_PLOT_BORDERWIDTH, 
-	Blt_Offset(Graph, plotBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-plotpadx", "plotPadX", "PlotPad", DEF_GRAPH_PLOT_PADX, 
-	Blt_Offset(Graph, xPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-plotpady", "plotPadY", "PlotPad", DEF_GRAPH_PLOT_PADY, 
-	Blt_Offset(Graph, yPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-plotrelief", "plotRelief", "Relief", 
-	DEF_GRAPH_PLOT_RELIEF, Blt_Offset(Graph, plotRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_GRAPH_RELIEF, 
-	Blt_Offset(Graph, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-rightmargin", "rightMargin", "Margin",
-	DEF_GRAPH_MARGIN, Blt_Offset(Graph, rightMargin.reqSize),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-rightvariable", "rightVariable", "RightVariable",
-	DEF_GRAPH_MARGIN_VAR, Blt_Offset(Graph, rightMargin.varName), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-rm", "rightMargin", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_BOOLEAN, "-stackaxes", "stackAxes", "StackAxes", 
-	DEF_GRAPH_STACK_AXES, Blt_Offset(Graph, stackAxes),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_GRAPH_TAKE_FOCUS, Blt_Offset(Graph, takeFocus), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-title", "title", "Title", DEF_GRAPH_TITLE, 
-	Blt_Offset(Graph, title), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-tm", "topMargin", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-topmargin", "topMargin", "Margin", 
-	DEF_GRAPH_MARGIN, Blt_Offset(Graph, topMargin.reqSize), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-topvariable", "topVariable", "TopVariable",
-	DEF_GRAPH_MARGIN_VAR, Blt_Offset(Graph, topMargin.varName), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_GRAPH_WIDTH, 
-	Blt_Offset(Graph, reqWidth), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-plotwidth", "plotWidth", "PlotWidth", 
-	(char *)NULL, Blt_Offset(Graph, reqPlotWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-plotheight", "plotHeight", "PlotHeight", 
-	(char *)NULL, Blt_Offset(Graph, reqPlotHeight), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_SwitchParseProc ObjToFormat;
-static Blt_SwitchCustom formatSwitch =
-{
-    ObjToFormat, NULL, (ClientData)0,
-};
-
-typedef struct {
-    const char *name;
-    int width, height;
-    int format;
-} SnapSwitches;
-
-enum SnapFormats { FORMAT_PICTURE, FORMAT_PHOTO, FORMAT_EMF, FORMAT_WMF };
-
-static Blt_SwitchSpec snapSwitches[] = 
-{
-    {BLT_SWITCH_INT_POS, "-width",  "width",
-	Blt_Offset(SnapSwitches, width),  0},
-    {BLT_SWITCH_INT_POS, "-height", "height",
-	Blt_Offset(SnapSwitches, height), 0},
-    {BLT_SWITCH_CUSTOM,  "-format", "format",
-	Blt_Offset(SnapSwitches, format), 0, 0, &formatSwitch},
-    {BLT_SWITCH_END}
-};
-
-static Tcl_IdleProc DisplayGraph;
-static Tcl_FreeProc DestroyGraph;
-static Tk_EventProc GraphEventProc;
-Tcl_ObjCmdProc Blt_GraphInstCmdProc;
-
-static Blt_BindPickProc PickEntry;
-static Tcl_ObjCmdProc StripchartCmd;
-static Tcl_ObjCmdProc BarchartCmd;
-static Tcl_ObjCmdProc GraphCmd;
-static Tcl_CmdDeleteProc GraphInstCmdDeleteProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UpdateGraph --
- *
- *	Tells the Tk dispatcher to call the graph display routine at the next
- *	idle point.  This request is made only if the window is displayed and
- *	no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UpdateGraph(ClientData clientData)
-{
-    Graph *graphPtr = clientData;
-
-    graphPtr->flags |= REDRAW_WORLD;
-    if ((graphPtr->tkwin != NULL) && !(graphPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayGraph, graphPtr);
-	graphPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EventuallyRedrawGraph --
- *
- *	Tells the Tk dispatcher to call the graph display routine at the next
- *	idle point.  This request is made only if the window is displayed and
- *	no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EventuallyRedrawGraph(Graph *graphPtr) 
-{
-    if ((graphPtr->tkwin != NULL) && !(graphPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayGraph, graphPtr);
-	graphPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-const char *
-Blt_GraphClassName(ClassId classId) 
-{
-    if ((classId >= CID_NONE) && (classId <= CID_MARKER_WINDOW)) {
-	return objectClassNames[classId];
-    }
-    return NULL;
-}
-
-void
-Blt_GraphSetObjectClass(GraphObj *graphObjPtr, ClassId classId)
-{
-    graphObjPtr->classId = classId;
-    graphObjPtr->className = Blt_GraphClassName(classId);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GraphEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for various events on
- *	graphs.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, the graph is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GraphEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Graph *graphPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    graphPtr->flags |= REDRAW_WORLD;
-	    Blt_EventuallyRedrawGraph(graphPtr);
-	}
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		graphPtr->flags |= FOCUS;
-	    } else {
-		graphPtr->flags &= ~FOCUS;
-	    }
-	    graphPtr->flags |= REDRAW_WORLD;
-	    Blt_EventuallyRedrawGraph(graphPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (graphPtr->tkwin != NULL) {
-	    Blt_DeleteWindowInstanceData(graphPtr->tkwin);
-	    graphPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(graphPtr->interp, graphPtr->cmdToken);
-	}
-	if (graphPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayGraph, graphPtr);
-	}
-	Tcl_EventuallyFree(graphPtr, DestroyGraph);
-    } else if (eventPtr->type == ConfigureNotify) {
-	graphPtr->flags |= (MAP_WORLD | REDRAW_WORLD);
-	Blt_EventuallyRedrawGraph(graphPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GraphInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GraphInstCmdDeleteProc(ClientData clientData) /* Pointer to widget record. */
-{
-    Graph *graphPtr = clientData;
-
-    if (graphPtr->tkwin != NULL) {	/* NULL indicates window has already
-					 * been destroyed. */
-	Tk_Window tkwin;
-
-	tkwin = graphPtr->tkwin;
-	graphPtr->tkwin = NULL;
-	Blt_DeleteWindowInstanceData(tkwin);
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AdjustAxisPointers --
- *
- *	Sets the axis pointers according to whether the axis is inverted on
- *	not.  The axis sites are also reset.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-AdjustAxisPointers(Graph *graphPtr) 
-{
-    if (graphPtr->inverted) {
-	graphPtr->leftMargin.axes   = graphPtr->axisChain[0];
-	graphPtr->bottomMargin.axes = graphPtr->axisChain[1];
-	graphPtr->rightMargin.axes  = graphPtr->axisChain[2];
-	graphPtr->topMargin.axes    = graphPtr->axisChain[3];
-    } else {
-	graphPtr->leftMargin.axes   = graphPtr->axisChain[1];
-	graphPtr->bottomMargin.axes = graphPtr->axisChain[0];
-	graphPtr->rightMargin.axes  = graphPtr->axisChain[3];
-	graphPtr->topMargin.axes    = graphPtr->axisChain[2];
-    }
-}
-
-static int
-InitPens(Graph *graphPtr)
-{
-    Blt_InitHashTable(&graphPtr->penTable, BLT_STRING_KEYS);
-    if (Blt_CreatePen(graphPtr, "activeLine", CID_ELEM_LINE, 0, NULL) == NULL) {
-  	return TCL_ERROR;
-    }
-    if (Blt_CreatePen(graphPtr, "activeBar", CID_ELEM_BAR, 0, NULL) == NULL) {
-  	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GraphTags --
- *
- *	Sets the binding tags for a graph obj. This routine is called by Tk
- *	when an event occurs in the graph.  It fills an array of pointers with
- *	bind tag addresses.
- *
- *	The object addresses are strings hashed in one of two tag tables: one
- *	for elements and the another for markers.  Note that there's only one
- *	binding table for elements and markers.  [We don't want to trigger
- *	both a marker and element bind command for the same event.]  But we
- *	don't want a marker and element with the same tag name to activate the
- *	others bindings. A tag "all" for markers should mean all markers, not
- *	all markers and elements.  As a result, element and marker tags are
- *	stored in separate hash tables, which means we can't generate the same
- *	tag address for both an elements and marker, even if they have the
- *	same name.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	This information will be used by the binding code in bltUtil.c to
- *	determine what graph objects match the current event.  The tags are
- *	placed in tagArr and *nTagsPtr is set with the number of tags found.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-void
-Blt_GraphTags(
-    Blt_BindTable table,
-    ClientData object,
-    ClientData context,		/* Not used. */
-    Blt_List list)
-{
-    GraphObj *graphObjPtr;
-    MakeTagProc *tagProc;
-    Graph *graphPtr;
-
-    graphPtr = (Graph *)Blt_GetBindingData(table);
-
-    /* 
-     * All graph objects (markers, elements, axes, etc) have the same starting
-     * fields in their structures, such as "classId", "name", "className", and
-     * "tags".
-     */
-    graphObjPtr = (GraphObj *)object;
-
-    switch (graphObjPtr->classId) {
-    case CID_ELEM_BAR:		
-    case CID_ELEM_CONTOUR:
-    case CID_ELEM_LINE: 
-    case CID_ELEM_STRIP: 
-	tagProc = Blt_MakeElementTag;
-	break;
-    case CID_AXIS_X:
-    case CID_AXIS_Y:
-	tagProc = Blt_MakeAxisTag;
-	break;
-    case CID_MARKER_BITMAP:
-    case CID_MARKER_IMAGE:
-    case CID_MARKER_LINE:
-    case CID_MARKER_POLYGON:
-    case CID_MARKER_TEXT:
-    case CID_MARKER_WINDOW:
-	tagProc = Blt_MakeMarkerTag;
-	break;
-    case CID_NONE:
-	panic("unknown object type");
-	tagProc = NULL;
-	break;
-    default:
-	panic("bogus object type");
-	tagProc = NULL;
-	break;
-    }
-    assert(graphObjPtr->name != NULL);
-
-    /* Always add the name of the object to the tag array. */
-    Blt_List_Append(list, (*tagProc)(graphPtr, graphObjPtr->name), 0);
-    Blt_List_Append(list, (*tagProc)(graphPtr, graphObjPtr->className), 0);
-    if (graphObjPtr->tags != NULL) {
-	const char **p;
-
-	for (p = graphObjPtr->tags; *p != NULL; p++) {
-	    Blt_List_Append(list, (*tagProc) (graphPtr, *p), 0);
-	}
-    }
-}
-
-/*
- *	Find the closest point from the set of displayed elements, searching
- *	the display list from back to front.  That way, if the points from
- *	two different elements overlay each other exactly, the one that's on
- *	top (visible) is picked.
- */
-/*ARGSUSED*/
-static ClientData
-PickEntry(ClientData clientData, int x, int y, ClientData *contextPtr)
-{
-    Graph *graphPtr = clientData;
-    Blt_ChainLink link;
-    Element *elemPtr;
-    Marker *markerPtr;
-    Region2d exts;
-
-    if (graphPtr->flags & MAP_ALL) {
-	return NULL;			/* Don't pick anything until the next
-					 * redraw occurs. */
-    }
-    Blt_GraphExtents(graphPtr, &exts);
-
-    if ((x > exts.right) || (x < exts.left) || 
-	(y > exts.bottom) || (y < exts.top)) {
-	/* 
-	 * Sample coordinate is in one of the graph margins.  Can only pick an
-	 * axis.
-	 */
-	return Blt_NearestAxis(graphPtr, x, y);
-    }
-    /* 
-     * From top-to-bottom check:
-     *	1. markers drawn on top (-under false).
-     *	2. elements using its display list back to front.
-     *  3. markers drawn under element (-under true).
-     */
-    markerPtr = Blt_NearestMarker(graphPtr, x, y, FALSE);
-    if (markerPtr != NULL) {
-	return markerPtr;		/* Found a marker (-under false). */
-    }
-    {
-	ClosestSearch search;
-
-	search.along = SEARCH_BOTH;
-	search.halo = graphPtr->halo;
-	search.index = -1;
-	search.x = x;
-	search.y = y;
-	search.dist = (double)(search.halo + 1);
-	search.mode = SEARCH_AUTO;
-	
-	for (link = Blt_Chain_LastLink(graphPtr->elements.displayList);
-	     link != NULL; link = Blt_Chain_PrevLink(link)) {
-	    elemPtr = Blt_Chain_GetValue(link);
-	    if (elemPtr->flags & (HIDE|MAP_ITEM)) {
-		continue;
-	    }
-	    if (elemPtr->state == STATE_NORMAL) {
-		(*elemPtr->procsPtr->closestProc) (graphPtr, elemPtr, &search);
-	    }
-	}
-	if (search.dist <= (double)search.halo) {
-	    return search.elemPtr;	/* Found an element within the minimum
-					 * halo distance. */
-	}
-    }
-    markerPtr = Blt_NearestMarker(graphPtr, x, y, TRUE);
-    if (markerPtr != NULL) {
-	return markerPtr;		/* Found a marker (-under true) */
-    }
-    return NULL;			/* Nothing found. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureGraph --
- *
- *	Allocates resources for the graph.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for graphPtr; old resources get freed, if there were any.  The
- *	graph is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ConfigureGraph(Graph *graphPtr)	
-{
-    XColor *colorPtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    /* Don't allow negative bar widths. Reset to an arbitrary value (0.1) */
-    if (graphPtr->barWidth <= 0.0f) {
-	graphPtr->barWidth = 0.8f;
-    }
-    graphPtr->inset = graphPtr->borderWidth + graphPtr->highlightWidth;
-    if ((graphPtr->reqHeight != Tk_ReqHeight(graphPtr->tkwin)) ||
-	(graphPtr->reqWidth != Tk_ReqWidth(graphPtr->tkwin))) {
-	Tk_GeometryRequest(graphPtr->tkwin, graphPtr->reqWidth,
-	    graphPtr->reqHeight);
-    }
-    Tk_SetInternalBorder(graphPtr->tkwin, graphPtr->borderWidth);
-    colorPtr = Blt_BackgroundBorderColor(graphPtr->normalBg);
-
-    graphPtr->titleWidth = graphPtr->titleHeight = 0;
-    if (graphPtr->title != NULL) {
-	unsigned int w, h;
-
-	Blt_Ts_GetExtents(&graphPtr->titleTextStyle, graphPtr->title, &w, &h);
-	graphPtr->titleHeight = h;
-    }
-
-    /*
-     * Create GCs for interior and exterior regions, and a background GC for
-     * clearing the margins with XFillRectangle
-     */
-
-    /* Margin GC */
-
-    gcValues.foreground = 
-	Blt_Ts_GetForeground(graphPtr->titleTextStyle)->pixel;
-    gcValues.background = colorPtr->pixel;
-    gcMask = (GCForeground | GCBackground);
-    newGC = Tk_GetGC(graphPtr->tkwin, gcMask, &gcValues);
-    if (graphPtr->drawGC != NULL) {
-	Tk_FreeGC(graphPtr->display, graphPtr->drawGC);
-    }
-    graphPtr->drawGC = newGC;
-
-    if (graphPtr->plotBg != NULL) {
-	Blt_SetBackgroundChangedProc(graphPtr->plotBg, Blt_UpdateGraph, 
-		graphPtr);
-    }
-    if (graphPtr->normalBg != NULL) {
-	Blt_SetBackgroundChangedProc(graphPtr->normalBg, Blt_UpdateGraph, 
-		graphPtr);
-    }
-    if (Blt_ConfigModified(configSpecs, "-invertxy", (char *)NULL)) {
-
-	/*
-	 * If the -inverted option changed, we need to readjust the pointers
-	 * to the axes and recompute the their scales.
-	 */
-
-	AdjustAxisPointers(graphPtr);
-	graphPtr->flags |= RESET_AXES;
-    }
-    if ((!graphPtr->backingStore) && (graphPtr->cache != None)) {
-	/*
-	 * Free the pixmap if we're not buffering the display of elements
-	 * anymore.
-	 */
-	Tk_FreePixmap(graphPtr->display, graphPtr->cache);
-	graphPtr->cache = None;
-    }
-    /*
-     * Reconfigure the crosshairs, just in case the background color of the
-     * plotarea has been changed.
-     */
-    Blt_ConfigureCrosshairs(graphPtr);
-
-    /*
-     *  Update the layout of the graph (and redraw the elements) if any of the
-     *  following graph options which affect the size of * the plotting area
-     *  has changed.
-     *
-     *	    -aspect
-     *      -borderwidth, -plotborderwidth
-     *	    -font, -title
-     *	    -width, -height
-     *	    -invertxy
-     *	    -bottommargin, -leftmargin, -rightmargin, -topmargin,
-     *	    -barmode, -barwidth
-     */
-    if (Blt_ConfigModified(configSpecs, "-invertxy", "-title", "-font",
-		"-*margin", "-*width", "-height", "-barmode", "-*pad*", 
-		"-aspect", "-*borderwidth", "-plot*", "-*width", "-*height",
-		(char *)NULL)) {
-	graphPtr->flags |= RESET_WORLD | CACHE_DIRTY;
-    }
-    if (Blt_ConfigModified(configSpecs, "-plot*", "-*background",
-			   (char *)NULL)) {
-	graphPtr->flags |= CACHE_DIRTY;
-    }
-    graphPtr->flags |= REDRAW_WORLD;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyGraph --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- *	clean up the internal structure of a graph at a safe time (when no-one
- *	is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyGraph(DestroyData dataPtr)
-{
-    Graph *graphPtr = (Graph *)dataPtr;
-
-    Blt_FreeOptions(configSpecs, (char *)graphPtr, graphPtr->display, 0);
-    /*
-     * Destroy the individual components of the graph: elements, markers,
-     * axes, legend, display lists etc.  Be careful to remove them in
-     * order. For example, axes are used by elements and markers, so they have
-     * to be removed after the markers and elements. Same it true with the
-     * legend and pens (they use elements), so can't be removed until the
-     * elements are destroyed.
-     */
-    Blt_DestroyTableClients(graphPtr);
-    Blt_DestroyMarkers(graphPtr);
-    Blt_DestroyElements(graphPtr);
-    Blt_DestroyLegend(graphPtr);
-    Blt_DestroyAxes(graphPtr);
-    Blt_DestroyPens(graphPtr);
-    Blt_DestroyCrosshairs(graphPtr);
-    Blt_DestroyPageSetup(graphPtr);
-    Blt_DestroyBarSets(graphPtr);
-
-    if (graphPtr->bindTable != NULL) {
-	Blt_DestroyBindingTable(graphPtr->bindTable);
-    }
-
-    /* Release allocated X resources and memory. */
-    if (graphPtr->drawGC != NULL) {
-	Tk_FreeGC(graphPtr->display, graphPtr->drawGC);
-    }
-    Blt_Ts_FreeStyle(graphPtr->display, &graphPtr->titleTextStyle);
-    if (graphPtr->cache != None) {
-	Tk_FreePixmap(graphPtr->display, graphPtr->cache);
-    }
-    Blt_Free(graphPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateGraph --
- *
- *	This procedure creates and initializes a new widget.
- *
- * Results:
- *	The return value is a pointer to a structure describing the new
- *	widget.  If an error occurred, then the return value is NULL and an
- *	error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated, a Tk_Window is created, etc.
- *
- *---------------------------------------------------------------------------
- */
-
-static Graph *
-CreateGraph(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, ClassId classId)
-{
-    Graph *graphPtr;
-    Tk_Window tkwin;
-
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), 
-	Tcl_GetString(objv[1]), (char *)NULL);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    graphPtr = Blt_AssertCalloc(1, sizeof(Graph));
-
-    /* Initialize the graph data structure. */
-
-    graphPtr->tkwin = tkwin;
-    graphPtr->display = Tk_Display(tkwin);
-    graphPtr->interp = interp;
-    graphPtr->classId = classId;
-    graphPtr->backingStore = TRUE;
-    graphPtr->doubleBuffer = TRUE;
-    graphPtr->borderWidth = 2;
-    graphPtr->plotBW = 1;
-    graphPtr->highlightWidth = 2;
-    graphPtr->plotRelief = TK_RELIEF_SOLID;
-    graphPtr->relief = TK_RELIEF_FLAT;
-    graphPtr->flags = (RESET_WORLD);
-    graphPtr->nextMarkerId = 1;
-    graphPtr->padLeft = graphPtr->padRight = 0;
-    graphPtr->padTop = graphPtr->padBottom = 0;
-    graphPtr->bottomMargin.site = MARGIN_BOTTOM;
-    graphPtr->leftMargin.site = MARGIN_LEFT;
-    graphPtr->topMargin.site = MARGIN_TOP;
-    graphPtr->rightMargin.site = MARGIN_RIGHT;
-    Blt_Ts_InitStyle(graphPtr->titleTextStyle);
-    Blt_Ts_SetAnchor(graphPtr->titleTextStyle, TK_ANCHOR_N);
-
-    Blt_InitHashTable(&graphPtr->axes.table, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->axes.tagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->elements.table, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->elements.tagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->markers.table, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->markers.tagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&graphPtr->dataTables, BLT_STRING_KEYS);
-    graphPtr->elements.displayList = Blt_Chain_Create();
-    graphPtr->markers.displayList = Blt_Chain_Create();
-    graphPtr->axes.displayList = Blt_Chain_Create();
-
-    switch (classId) {
-    case CID_ELEM_LINE:
-	Tk_SetClass(tkwin, "Graph");
-	break;
-    case CID_ELEM_BAR:
-	Tk_SetClass(tkwin, "Barchart");
-	break;
-    case CID_ELEM_STRIP:
-	Tk_SetClass(tkwin, "Stripchart");
-    default:
-	Tk_SetClass(tkwin, "???");
-	break;
-    }
-    Blt_SetWindowInstanceData(tkwin, graphPtr);
-
-    if (InitPens(graphPtr) != TCL_OK) {
-	goto error;
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, tkwin, configSpecs, objc - 2, 
-		objv + 2, (char *)graphPtr, 0) != TCL_OK) {
-	goto error;
-    }
-    if (Blt_DefaultAxes(graphPtr) != TCL_OK) {
-	goto error;
-    }
-    AdjustAxisPointers(graphPtr);
-
-    if (Blt_CreatePageSetup(graphPtr) != TCL_OK) {
-	goto error;
-    }
-    if (Blt_CreateCrosshairs(graphPtr) != TCL_OK) {
-	goto error;
-    }
-    if (Blt_CreateLegend(graphPtr) != TCL_OK) {
-	goto error;
-    }
-    Tk_CreateEventHandler(graphPtr->tkwin, 
-	ExposureMask | StructureNotifyMask | FocusChangeMask, GraphEventProc, 
-	graphPtr);
-
-    graphPtr->cmdToken = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[1]), 
-	Blt_GraphInstCmdProc, graphPtr, GraphInstCmdDeleteProc);
-    ConfigureGraph(graphPtr);
-    graphPtr->bindTable = Blt_CreateBindingTable(interp, tkwin, graphPtr, 
-	PickEntry, Blt_GraphTags);
-
-    Tcl_SetObjResult(interp, objv[1]);
-    return graphPtr;
-
- error:
-    DestroyGraph((DestroyData)graphPtr);
-    return NULL;
-}
-
-/* Widget sub-commands */
-
-/*ARGSUSED*/
-static int
-XAxisOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int margin;
-
-    margin = (graphPtr->inverted) ? MARGIN_LEFT : MARGIN_BOTTOM;
-    return Blt_AxisOp(interp, graphPtr, margin, objc, objv);
-}
-
-static int
-X2AxisOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int margin;
-
-    margin = (graphPtr->inverted) ? MARGIN_RIGHT : MARGIN_TOP;
-    return Blt_AxisOp(interp, graphPtr, margin, objc, objv);
-}
-
-static int
-YAxisOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int margin;
-
-    margin = (graphPtr->inverted) ? MARGIN_BOTTOM : MARGIN_LEFT;
-    return Blt_AxisOp(interp, graphPtr, margin, objc, objv);
-}
-
-static int
-Y2AxisOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int margin;
-
-    margin = (graphPtr->inverted) ? MARGIN_TOP : MARGIN_RIGHT;
-    return Blt_AxisOp(interp, graphPtr, margin, objc, objv);
-}
-
-static int
-BarOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ElementOp(graphPtr, interp, objc, objv, CID_ELEM_BAR);
-}
-
-/*ARGSUSED*/
-static int
-LineOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ElementOp(graphPtr, interp, objc, objv, CID_ELEM_LINE);
-}
-
-static int
-ElementOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ElementOp(graphPtr, interp, objc, objv, graphPtr->classId);
-}
-
-static int
-ConfigureOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int flags;
-
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)graphPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, graphPtr->tkwin, configSpecs,
-	    (char *)graphPtr, objv[2], flags);
-    } else {
-	if (Blt_ConfigureWidgetFromObj(interp, graphPtr->tkwin, configSpecs, 
-		objc - 2, objv + 2, (char *)graphPtr, flags) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	ConfigureGraph(graphPtr);
-	Blt_EventuallyRedrawGraph(graphPtr);
-	return TCL_OK;
-    }
-}
-
-/* ARGSUSED*/
-static int
-CgetOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, graphPtr->tkwin, configSpecs,
-	(char *)graphPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExtentsOp --
- *
- *	Reports the size of one of several items within the graph.  The
- *	following are valid items:
- *
- *	  "bottommargin"	Height of the bottom margin
- *	  "leftmargin"		Width of the left margin
- *	  "legend"		x y w h of the legend
- *	  "plotarea"		x y w h of the plotarea
- *	  "plotheight"		Height of the plot area
- *	  "rightmargin"		Width of the right margin
- *	  "topmargin"		Height of the top margin
- *        "plotwidth"		Width of the plot area
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED*/
-static int
-ExtentsOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *string;
-    char c;
-    int length;
-
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    if ((c == 'p') && (length > 4) && 
-	(strncmp("plotheight", string, length) == 0)) {
-	int height;
-
-	height = graphPtr->bottom - graphPtr->top + 1;
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), height);
-    } else if ((c == 'p') && (length > 4) &&
-	(strncmp("plotwidth", string, length) == 0)) {
-	int width;
-
-	width = graphPtr->right - graphPtr->left + 1;
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), width);
-    } else if ((c == 'p') && (length > 4) &&
-	(strncmp("plotarea", string, length) == 0)) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(graphPtr->left));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(graphPtr->top));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(graphPtr->right - graphPtr->left + 1));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(graphPtr->bottom - graphPtr->top + 1));
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else if ((c == 'l') && (length > 2) &&
-	(strncmp("legend", string, length) == 0)) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(Blt_Legend_X(graphPtr)));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(Blt_Legend_Y(graphPtr)));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(Blt_Legend_Width(graphPtr)));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(Blt_Legend_Height(graphPtr)));
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else if ((c == 'l') && (length > 2) &&
-	(strncmp("leftmargin", string, length) == 0)) {
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), graphPtr->leftMargin.width);
-    } else if ((c == 'r') && (length > 1) &&
-	(strncmp("rightmargin", string, length) == 0)) {
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), graphPtr->rightMargin.width);
-    } else if ((c == 't') && (length > 1) &&
-	(strncmp("topmargin", string, length) == 0)) {
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), graphPtr->topMargin.height);
-    } else if ((c == 'b') && (length > 1) &&
-	(strncmp("bottommargin", string, length) == 0)) {
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), graphPtr->bottomMargin.height);
-    } else {
-	Tcl_AppendResult(interp, "bad extent item \"", objv[2],
-	    "\": should be plotheight, plotwidth, leftmargin, rightmargin, \
-topmargin, bottommargin, plotarea, or legend", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsideOp --
- *
- *	Returns true of false whether the given point is inside the plotting
- *	area (defined by left,bottom right, top).
- *
- * Results:
- *	Always returns TCL_OK.  interp->result will contain the boolean string
- *	representation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED*/
-static int
-InsideOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    Region2d exts;
-    int result;
-
-    if (Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_GraphExtents(graphPtr, &exts);
-    result = PointInRegion(&exts, x, y);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), result);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvtransformOp --
- *
- *	This procedure returns a list of the graph coordinate values
- *	corresponding with the given window X and Y coordinate positions.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred while parsing the
- *	window positions, TCL_ERROR is returned, and interp->result will
- *	contain the error message.  Otherwise interp->result will contain a
- *	Tcl list of the x and y coordinates.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InvtransformOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    double x, y;
-    Point2d point;
-    Axis2d axes;
-    Tcl_Obj *listObjPtr;
-
-    if ((Blt_ExprDoubleFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Blt_ExprDoubleFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    /* Perform the reverse transformation, converting from window coordinates
-     * to graph data coordinates.  Note that the point is always mapped to the
-     * bottom and left axes (which may not be what the user wants).  */
-
-    /*  Pick the first pair of axes */
-    axes.x = Blt_GetFirstAxis(graphPtr->axisChain[0]);
-    axes.y = Blt_GetFirstAxis(graphPtr->axisChain[1]);
-    point = Blt_InvMap2D(graphPtr, x, y, &axes);
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(point.x));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(point.y));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TransformOp --
- *
- *	This procedure returns a list of the window coordinates corresponding
- *	with the given graph x and y coordinates.
- *
- * Results:
- *	Returns a standard TCL result.  interp->result contains the list of
- *	the graph coordinates. If an error occurred while parsing the window
- *	positions, TCL_ERROR is returned, then interp->result will contain an
- *	error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TransformOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    double x, y;
-    Point2d point;
-    Axis2d axes;
-    Tcl_Obj *listObjPtr;
-
-    if ((Blt_ExprDoubleFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Blt_ExprDoubleFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    /*
-     * Perform the transformation from window to graph coordinates.  Note that
-     * the points are always mapped onto the bottom and left axes (which may
-     * not be the what the user wants).
-     */
-    axes.x = Blt_GetFirstAxis(graphPtr->axisChain[0]);
-    axes.y = Blt_GetFirstAxis(graphPtr->axisChain[1]);
-
-    point = Blt_Map2D(graphPtr, x, y, &axes);
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(ROUND(point.x)));
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(ROUND(point.y)));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-#ifndef NO_PRINTER
-
-/*
- *---------------------------------------------------------------------------
- *
- * Print1Op --
- *
- *	Prints the equivalent of a screen snapshot of the graph to the
- *	designated printer.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred TCL_ERROR is
- *	returned and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-Print1Op(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    BITMAPINFO info;
-    void *data;
-    TkWinDCState state;
-    TkWinBitmap bd;
-    DIBSECTION ds;
-    Drawable drawable;
-    HBITMAP hBitmap;
-    HDC hDC;
-    DOCINFO di;
-    double pageWidth, pageHeight;
-    int result;
-    double scale, sx, sy;
-    int jobId;
-
-    graphPtr->width = Tk_Width(graphPtr->tkwin);
-    graphPtr->height = Tk_Height(graphPtr->tkwin);
-    if ((graphPtr->width < 2) && (graphPtr->reqWidth > 0)) {
-	graphPtr->width = graphPtr->reqWidth;
-    }
-    if ((graphPtr->height < 2) && (graphPtr->reqHeight > 0)) {
-	graphPtr->height = graphPtr->reqHeight;
-    }
-    if (objc == 2) {
-	result = Blt_PrintDialog(interp, &drawable);
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	if (result == TCL_RETURN) {
-	    return TCL_OK;
-	}
-    } else {
-	if (Blt_GetOpenPrinter(interp, Tcl_GetString(objv[2]), &drawable) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    /*  
-     * This is a taken from Blt_SnapPhoto.  The difference is that here we're
-     * using the DIBSection directly, without converting the section into a
-     * Picture.
-     */
-    ZeroMemory(&info, sizeof(info));
-    info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    info.bmiHeader.biWidth = graphPtr->width;
-    info.bmiHeader.biHeight = graphPtr->height;
-    info.bmiHeader.biPlanes = 1;
-    info.bmiHeader.biBitCount = 32;
-    info.bmiHeader.biCompression = BI_RGB;
-    hDC = TkWinGetDrawableDC(graphPtr->display, Tk_WindowId(graphPtr->tkwin),
-		&state);
-    hBitmap = CreateDIBSection(hDC, &info, DIB_RGB_COLORS, &data, NULL, 0);
-    TkWinReleaseDrawableDC(Tk_WindowId(graphPtr->tkwin), hDC, &state);
-    
-    /*
-     * Create our own drawable by hand using the DIB we just created.  We'll
-     * then draw into it using the standard drawing functions.
-     */
-    bd.type = TWD_BITMAP;
-    bd.handle = hBitmap;
-    bd.colormap = DefaultColormap(graphPtr->display, 
-	DefaultScreen(graphPtr->display));
-    bd.depth = Tk_Depth(graphPtr->tkwin);
-    
-    graphPtr->flags |= RESET_WORLD;
-    Blt_DrawGraph(graphPtr, (Drawable)&bd);
-
-    /*
-     * Now that the DIB contains the image of the graph, get the the data bits
-     * and write them to the printer device, stretching the image to the fit
-     * the printer's resolution.
-     */
-    result = TCL_ERROR;
-    if (GetObject(hBitmap, sizeof(DIBSECTION), &ds) == 0) {
-	Tcl_AppendResult(interp, "can't get object: ", Blt_LastError(),
-	    (char *)NULL);
-	goto done;
-    }
-    hDC = ((TkWinDC *) drawable)->hdc;
-    /* Get the resolution of the printer device. */
-    sx = (double)GetDeviceCaps(hDC, HORZRES) / (double)graphPtr->width;
-    sy = (double)GetDeviceCaps(hDC, VERTRES) / (double)graphPtr->height;
-    scale = MIN(sx, sy);
-    pageWidth = scale * graphPtr->width;
-    pageHeight = scale * graphPtr->height;
-
-    ZeroMemory(&di, sizeof(di));
-    di.cbSize = sizeof(di);
-    di.lpszDocName = "Graph Contents";
-    jobId = StartDoc(hDC, &di);
-    if (jobId <= 0) {
-	Tcl_AppendResult(interp, "can't start document: ", Blt_LastError(),
-	    (char *)NULL);
-	goto done;
-    }
-    if (StartPage(hDC) <= 0) {
-	Tcl_AppendResult(interp, "error starting page: ", Blt_LastError(),
-	    (char *)NULL);
-	goto done;
-    }
-    StretchDIBits(hDC, 0, 0, ROUND(pageWidth), ROUND(pageHeight), 0, 0, 
-	graphPtr->width, graphPtr->height, ds.dsBm.bmBits, 
-	(LPBITMAPINFO)&ds.dsBmih, DIB_RGB_COLORS, SRCCOPY);
-    EndPage(hDC);
-    EndDoc(hDC);
-    result = TCL_OK;
-  done:
-    DeleteBitmap(hBitmap);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Print2Op --
- *
- *	Prints directly to the designated printer device.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred, TCL_ERROR is
- *	returned and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-Print2Op(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Drawable drawable;
-    int result;
-
-    graphPtr->width = Tk_Width(graphPtr->tkwin);
-    graphPtr->height = Tk_Height(graphPtr->tkwin);
-    if ((graphPtr->width < 2) && (graphPtr->reqWidth > 0)) {
-	graphPtr->width = graphPtr->reqWidth;
-    }
-    if ((graphPtr->height < 2) && (graphPtr->reqHeight > 0)) {
-	graphPtr->height = graphPtr->reqHeight;
-    }
-    if (objc == 2) {
-	result = Blt_PrintDialog(interp, &drawable);
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	if (result == TCL_RETURN) {
-	    return TCL_OK;
-	}
-    } else {
-	result = Blt_GetOpenPrinter(interp, Tcl_GetString(objv[2]), &drawable);
-    }
-    if (result == TCL_OK) {
-	int oldMode;
-	HDC hDC;
-	double xRatio, yRatio;
-	TkWinDC *drawPtr;
-	int w, h; 
-
-	drawPtr = (TkWinDC *) drawable;
-	hDC = drawPtr->hdc;
-	Blt_GetPrinterScale(hDC, &xRatio, &yRatio);
-	oldMode = SetMapMode(hDC, MM_ISOTROPIC);
-	if (oldMode == 0) {
-	    Tcl_AppendResult(interp, "can't set mode for printer DC: ",
-		Blt_LastError(), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	w = (int)round(graphPtr->width * xRatio);
-	h = (int)round(graphPtr->height * yRatio);
-	SetViewportExtEx(hDC, w, h, NULL);
-	SetWindowExtEx(hDC, graphPtr->width, graphPtr->height, NULL);
-
-	Blt_StartPrintJob(interp, drawable);
-	graphPtr->flags |= RESET_WORLD;
-	Blt_DrawGraph(graphPtr, drawable);
-	Blt_EndPrintJob(interp, drawable);
-    }
-    return result;
-}
-
-#endif /* NO_PRINTER */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToFormat --
- *
- *	Convert a string represent a node number into its integer value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToFormat(
-    ClientData clientData,		/* Not used.*/
-    Tcl_Interp *interp,			/* Interpreter to send results back to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    int *formatPtr = (int *)(record + offset);
-    char c;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 'p') && (strcmp(string, "picture") == 0)) {
-	*formatPtr = FORMAT_PHOTO;
-    } else if ((c == 'p') && (strcmp(string, "photo") == 0)) {
-	*formatPtr = FORMAT_PHOTO;
-#ifdef WIN32
-    } else if ((c == 'e') && (strcmp(string, "emf") == 0)) {
-	*formatPtr = FORMAT_EMF;
-    } else if ((c == 'w') && (strcmp(string, "wmf") == 0)) {
-	*formatPtr = FORMAT_WMF;
-#endif /* WIN32 */
-    } else {
-#ifdef WIN32
-	Tcl_AppendResult(interp, "bad format \"", string, 
-		 "\": should be picture, photo, emf, or wmf.", (char *)NULL);
-#else
-	Tcl_AppendResult(interp, "bad format \"", string, 
-		 "\": should be picture or photo.", (char *)NULL);
-#endif /* WIN32 */
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-#ifdef WIN32
-static int InitMetaFileHeader(
-    Tk_Window tkwin,
-    int width, int height,
-    APMHEADER *mfhPtr)
-{
-    unsigned int *p;
-    unsigned int sum;
-#define MM_INCH		25.4
-    int xdpi, ydpi;
-
-    mfhPtr->key = 0x9ac6cdd7L;
-    mfhPtr->hmf = 0;
-    mfhPtr->inch = 1440;
-
-    Blt_ScreenDPI(tkwin, &xdpi, &ydpi);
-    mfhPtr->bbox.Left = mfhPtr->bbox.Top = 0;
-    mfhPtr->bbox.Bottom = (SHORT)((width * 1440)/ (float)xdpi);
-    mfhPtr->bbox.Right = (SHORT)((height * 1440) / (float)ydpi);
-    mfhPtr->reserved = 0;
-    sum = 0;
-    for (p = (unsigned int *)mfhPtr; 
-	 p < (unsigned int *)&(mfhPtr->checksum); p++) {
-	sum ^= *p;
-    }
-    mfhPtr->checksum = sum;
-    return TCL_OK;
-}
-
-static int
-CreateAPMetaFile(Tcl_Interp *interp, HANDLE hMetaFile, HDC hDC, 
-		 APMHEADER *mfhPtr, const char *fileName)
-{
-    HANDLE hFile;
-    HANDLE hMem;
-    LPVOID buffer;
-    int result;
-    DWORD count, nBytes;
-
-    result = TCL_ERROR;
-    hMem = NULL;
-    hFile = CreateFile(
-       fileName,			/* File path */
-       GENERIC_WRITE,			/* Access mode */
-       0,				/* No sharing. */
-       NULL,				/* Security attributes */
-       CREATE_ALWAYS,			/* Overwrite any existing file */
-       FILE_ATTRIBUTE_NORMAL,
-       NULL);				/* No template file */
-    if (hFile == INVALID_HANDLE_VALUE) {
-	Tcl_AppendResult(interp, "can't create metafile \"", fileName, 
-		"\":", Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((!WriteFile(hFile, (LPVOID)mfhPtr, sizeof(APMHEADER), &count, 
-		NULL)) || (count != sizeof(APMHEADER))) {
-	Tcl_AppendResult(interp, "can't create metafile header to \"", 
-			 fileName, "\":", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    nBytes = GetWinMetaFileBits(hMetaFile, 0, NULL, MM_ANISOTROPIC, hDC);
-    hMem = GlobalAlloc(GHND, nBytes);
-    if (hMem == NULL) {
-	Tcl_AppendResult(interp, "can't create allocate global memory:", 
-		Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    buffer = (LPVOID)GlobalLock(hMem);
-    if (!GetWinMetaFileBits(hMetaFile, nBytes, buffer, MM_ANISOTROPIC, hDC)) {
-	Tcl_AppendResult(interp, "can't get metafile bits:", 
-		Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    if ((!WriteFile(hFile, buffer, nBytes, &count, NULL)) ||
-	(count != nBytes)) {
-	Tcl_AppendResult(interp, "can't write metafile bits:", 
-		Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    result = TCL_OK;
- error:
-    CloseHandle(hFile);
-    if (hMem != NULL) {
-	GlobalUnlock(hMem);
-	GlobalFree(hMem);
-    }
-    return result;
-}
-#endif /*WIN32*/
-
-/*
- *---------------------------------------------------------------------------
- *
- * SnapOp --
- *
- *	Snaps a picture of the graph and stores it in the specified image.
- *
- * Results:
- *	Returns a standard TCL result.  interp->result contains
- *	the list of the graph coordinates. If an error occurred
- *	while parsing the window positions, TCL_ERROR is returned,
- *	then interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SnapOp(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int result;
-    Pixmap drawable;
-    int i;
-    SnapSwitches switches;
-
-    /* .g snap ?switches? name */
-    switches.height = Tk_Height(graphPtr->tkwin);
-    if ((switches.height < 2) && (graphPtr->reqHeight > 0)) {
-	switches.height = graphPtr->reqHeight;
-    }
-    switches.width = Tk_Width(graphPtr->tkwin);
-    if ((switches.width < 2) && (graphPtr->reqWidth > 0)) {
-	switches.width = graphPtr->reqWidth;
-    }
-    switches.format = FORMAT_PICTURE;
-    /* Process switches  */
-    i = Blt_ParseSwitches(interp, snapSwitches, objc - 2, objv + 2, &switches, 
-	BLT_SWITCH_OBJV_PARTIAL);
-    if (i < 0) {
-	return TCL_ERROR;
-    }
-    i += 2;
-    if (i >= objc) {
-	Tcl_AppendResult(interp, "missing name argument: should be \"",
-		Tcl_GetString(objv[0]), "snap ?switches? name\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    switches.name = Tcl_GetString(objv[i]);
-    if (switches.width < 2) {
-	switches.width = Tk_ReqWidth(graphPtr->tkwin);
-    }
-    if (switches.height < 2) {
-	switches.width = Tk_ReqHeight(graphPtr->tkwin);
-    }
-    /* Always re-compute the layout of the graph before snapping the picture. */
-    graphPtr->width = switches.width;
-    graphPtr->height = switches.height;
-    Blt_MapGraph(graphPtr);
-
-    drawable = Tk_WindowId(graphPtr->tkwin);
-    switch (switches.format) {
-    case FORMAT_PICTURE:
-    case FORMAT_PHOTO:
-	drawable = Tk_GetPixmap(graphPtr->display, drawable, graphPtr->width, 
-		graphPtr->height, Tk_Depth(graphPtr->tkwin));
-#ifdef WIN32
-	assert(drawable != None);
-#endif
-	graphPtr->flags |= RESET_WORLD;
-	Blt_DrawGraph(graphPtr, drawable);
-	if (switches.format == FORMAT_PICTURE) {
-	    result = Blt_SnapPicture(interp, graphPtr->tkwin, drawable, 0, 0, 
-		switches.width, switches.height, switches.width, 
-		switches.height, switches.name, 1.0);
-	} else {
-	    result = Blt_SnapPhoto(interp, graphPtr->tkwin, drawable, 0, 0, 
-		switches.width, switches.height, switches.width, 
-		switches.height, switches.name, 1.0);
-	}
-	Tk_FreePixmap(graphPtr->display, drawable);
-	break;
-
-#ifdef WIN32
-    case FORMAT_WMF:
-    case FORMAT_EMF:
-	{
-	    TkWinDC drawableDC;
-	    TkWinDCState state;
-	    HDC hRefDC, hDC;
-	    HENHMETAFILE hMetaFile;
-	    Tcl_DString dString;
-	    const char *title;
-	    
-	    hRefDC = TkWinGetDrawableDC(graphPtr->display, drawable, &state);
-	    
-	    Tcl_DStringInit(&dString);
-	    Tcl_DStringAppend(&dString, "BLT Graph ", -1);
-	    Tcl_DStringAppend(&dString, BLT_VERSION, -1);
-	    Tcl_DStringAppend(&dString, "\0", -1);
-	    Tcl_DStringAppend(&dString, Tk_PathName(graphPtr->tkwin), -1);
-	    Tcl_DStringAppend(&dString, "\0", -1);
-	    title = Tcl_DStringValue(&dString);
-	    hDC = CreateEnhMetaFile(hRefDC, NULL, NULL, title);
-	    Tcl_DStringFree(&dString);
-	    
-	    if (hDC == NULL) {
-		Tcl_AppendResult(interp, "can't create metafile: ",
-				 Blt_LastError(), (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    
-	    drawableDC.hdc = hDC;
-	    drawableDC.type = TWD_WINDC;
-	    
-	    graphPtr->width = switches.width;
-	    graphPtr->height = switches.height;
-	    Blt_MapGraph(graphPtr);
-	    graphPtr->flags |= RESET_WORLD;
-	    Blt_DrawGraph(graphPtr, (Drawable)&drawableDC);
-	    hMetaFile = CloseEnhMetaFile(hDC);
-	    if (strcmp(switches.name, "CLIPBOARD") == 0) {
-		HWND hWnd;
-		
-		hWnd = Tk_GetHWND(drawable);
-		OpenClipboard(hWnd);
-		EmptyClipboard();
-		SetClipboardData(CF_ENHMETAFILE, hMetaFile);
-		CloseClipboard();
-		result = TCL_OK;
-	    } else {
-		result = TCL_ERROR;
-		if (switches.format == FORMAT_WMF) {
-		    APMHEADER mfh;
-		    
-		    assert(sizeof(mfh) == 22);
-		    InitMetaFileHeader(graphPtr->tkwin, switches.width, 
-				       switches.height, &mfh);
-		    result = CreateAPMetaFile(interp, hMetaFile, hRefDC, &mfh, 
-					      switches.name);
-		} else {
-		    HENHMETAFILE hMetaFile2;
-		    
-		    hMetaFile2 = CopyEnhMetaFile(hMetaFile, switches.name);
-		    if (hMetaFile2 != NULL) {
-			result = TCL_OK;
-			DeleteEnhMetaFile(hMetaFile2); 
-		    }
-		}
-		DeleteEnhMetaFile(hMetaFile); 
-	    }
-	    TkWinReleaseDrawableDC(drawable, hRefDC, &state);
-	}
-	break;
-#endif /*WIN32*/
-    default:
-	Tcl_AppendResult(interp, "bad snapshot format", (char *)NULL);
-	return TCL_ERROR;
-    }
-    graphPtr->flags |= MAP_WORLD;
-    Blt_EventuallyRedrawGraph(graphPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GraphWidgetCmd --
- *
- *	This procedure is invoked to process the TCL command that
- *	corresponds to a widget managed by this module.  See the user
- *	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec graphOps[] =
-{
-    {"axis",         1, Blt_VirtualAxisOp, 2, 0, "oper ?args?",},
-    {"bar",          2, BarOp,             2, 0, "oper ?args?",},
-    {"cget",         2, CgetOp,            3, 3, "option",},
-    {"configure",    2, ConfigureOp,       2, 0, "?option value?...",},
-    {"crosshairs",   2, Blt_CrosshairsOp,  2, 0, "oper ?args?",},
-    {"element",      2, ElementOp,         2, 0, "oper ?args?",},
-    {"extents",      2, ExtentsOp,         3, 3, "item",},
-    {"inside",       3, InsideOp,          4, 4, "winX winY",},
-    {"invtransform", 3, InvtransformOp,    4, 4, "winX winY",},
-    {"legend",       2, Blt_LegendOp,      2, 0, "oper ?args?",},
-    {"line",         2, LineOp,            2, 0, "oper ?args?",},
-    {"marker",       2, Blt_MarkerOp,      2, 0, "oper ?args?",},
-    {"pen",          2, Blt_PenOp,         2, 0, "oper ?args?",},
-    {"postscript",   2, Blt_PostScriptOp,  2, 0, "oper ?args?",},
-#ifndef NO_PRINTER
-    {"print1",       2, Print1Op,          2, 3, "?printerName?",},
-    {"print2",       2, Print2Op,          2, 3, "?printerName?",},
-#endif /*NO_PRINTER*/
-    {"snap",         1, SnapOp,            3, 0, "?switches? name",},
-    {"transform",    1, TransformOp,       4, 4, "x y",},
-    {"x2axis",       2, X2AxisOp,          2, 0, "oper ?args?",},
-    {"xaxis",        2, XAxisOp,           2, 0, "oper ?args?",},
-    {"y2axis",       2, Y2AxisOp,          2, 0, "oper ?args?",},
-    {"yaxis",        2, YAxisOp,           2, 0, "oper ?args?",},
-};
-static int nGraphOps = sizeof(graphOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_GraphInstCmdProc(ClientData clientData, Tcl_Interp *interp, int objc,
-		     Tcl_Obj *const *objv)
-{
-    GraphCmdProc *proc;
-    int result;
-    Graph *graphPtr = clientData;
-
-    proc = Blt_GetOpFromObj(interp, nGraphOps, graphOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(graphPtr);
-    result = (*proc) (graphPtr, interp, objc, objv);
-    Tcl_Release(graphPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewGraph --
- *
- *	Creates a new window and TCL command representing an instance of a
- *	graph widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NewGraph(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, ClassId classId)
-{
-    Graph *graphPtr;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    graphPtr = CreateGraph(interp, objc, objv, classId);
-    if (graphPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GraphCmd --
- *
- *	Creates a new window and TCL command representing an instance of a
- *	graph widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GraphCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    return NewGraph(interp, objc, objv, CID_ELEM_LINE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BarchartCmd --
- *
- *	Creates a new window and TCL command representing an instance of a
- *	barchart widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BarchartCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    return NewGraph(interp, objc, objv, CID_ELEM_BAR);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StripchartCmd --
- *
- *	Creates a new window and TCL command representing an instance of a
- *	barchart widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StripchartCmd(ClientData clientData, Tcl_Interp *interp, int objc,
-	      Tcl_Obj *const *objv)
-{
-    return NewGraph(interp, objc, objv, CID_ELEM_STRIP);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawMargins --
- *
- * 	Draws the exterior region of the graph (axes, ticks, titles, etc) 
- * 	onto a pixmap. The interior region is defined by the given rectangle
- * 	structure.
- *
- *	---------------------------------
- *      |                               |
- *      |           rectArr[0]          |
- *      |                               |
- *	---------------------------------
- *      |     |top           right|     |
- *      |     |                   |     |
- *      |     |                   |     |
- *      | [1] |                   | [2] |
- *      |     |                   |     |
- *      |     |                   |     |
- *      |     |                   |     |
- *      |     |                   |     |
- *      |     |                   |     |
- *      |     |left         bottom|     |
- *	---------------------------------
- *      |                               |
- *      |          rectArr[3]           |
- *      |                               |
- *	---------------------------------
- *
- *		X coordinate axis
- *		Y coordinate axis
- *		legend
- *		interior border
- *		exterior border
- *		titles (X and Y axis, graph)
- *
- * Returns:
- *	None.
- *
- * Side Effects:
- *	Exterior of graph is displayed in its window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawMargins(Graph *graphPtr, Drawable drawable)
-{
-    XRectangle rects[4];
-    int site;
-
-    /*
-     * Draw the four outer rectangles which encompass the plotting
-     * surface. This clears the surrounding area and clips the plot.
-     */
-    rects[0].x = rects[0].y = rects[3].x = rects[1].x = 0;
-    rects[0].width = rects[3].width = (short int)graphPtr->width;
-    rects[0].height = (short int)graphPtr->top;
-    rects[3].y = graphPtr->bottom;
-    rects[3].height = graphPtr->height - graphPtr->bottom;
-    rects[2].y = rects[1].y = graphPtr->top;
-    rects[1].width = graphPtr->left;
-    rects[2].height = rects[1].height = graphPtr->bottom - graphPtr->top;
-    rects[2].x = graphPtr->right;
-    rects[2].width = graphPtr->width - graphPtr->right;
-
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->normalBg, 
-	rects[0].x, rects[0].y, rects[0].width, rects[0].height, 
-	0, TK_RELIEF_FLAT);
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->normalBg, 
-	rects[1].x, rects[1].y, rects[1].width, rects[1].height, 
-	0, TK_RELIEF_FLAT);
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->normalBg, 
-	rects[2].x, rects[2].y, rects[2].width, rects[2].height, 
-	0, TK_RELIEF_FLAT);
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->normalBg, 
-	rects[3].x, rects[3].y, rects[3].width, rects[3].height, 
-	0, TK_RELIEF_FLAT);
-
-    /* Draw 3D border around the plotting area */
-
-    if (graphPtr->plotBW > 0) {
-	int x, y, w, h;
-
-	x = graphPtr->left - graphPtr->plotBW;
-	y = graphPtr->top - graphPtr->plotBW;
-	w = (graphPtr->right - graphPtr->left) + (2*graphPtr->plotBW);
-	h = (graphPtr->bottom - graphPtr->top) + (2*graphPtr->plotBW);
-	Blt_DrawBackgroundRectangle(graphPtr->tkwin, drawable, 
-		graphPtr->normalBg, x, y, w, h, graphPtr->plotBW, 
-		graphPtr->plotRelief);
-    }
-    site = Blt_Legend_Site(graphPtr);
-    if (site & LEGEND_MARGIN_MASK) {
-	/* Legend is drawn on one of the graph margins */
-	Blt_DrawLegend(graphPtr, drawable);
-    } else if (site == LEGEND_WINDOW) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    if (graphPtr->title != NULL) {
-	Blt_DrawText(graphPtr->tkwin, drawable, graphPtr->title,
-	    &graphPtr->titleTextStyle, graphPtr->titleX, graphPtr->titleY);
-    }
-    Blt_DrawAxes(graphPtr, drawable);
-    graphPtr->flags &= ~DRAW_MARGINS;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DrawPlotRegion --
- *
- *	Draws the contents of the plotting area.  This consists of the
- *	elements, markers (draw under elements), axis limits, and possibly the
- *	legend.  Typically, the output will be cached into a backing store
- *	pixmap, so that redraws can occur quickly.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawPlotRegion(Graph *graphPtr, Drawable drawable)
-{
-    int site;
-
-    /* Clear the background of the plotting area. */
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->plotBg,
-	graphPtr->left, graphPtr->top, graphPtr->right - graphPtr->left + 1,
-	graphPtr->bottom - graphPtr->top + 1, TK_RELIEF_FLAT, 0);
-
-    /* Draw the elements, markers, legend, and axis limits. */
-
-    Blt_DrawGrids(graphPtr, drawable);
-    Blt_DrawMarkers(graphPtr, drawable, MARKER_UNDER);
-    site = Blt_Legend_Site(graphPtr);
-    if ((site & LEGEND_PLOTAREA_MASK) && 
-	(!Blt_Legend_IsRaised(graphPtr))) {
-	Blt_DrawLegend(graphPtr, drawable);
-    } else if (site == LEGEND_WINDOW) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    Blt_DrawAxisLimits(graphPtr, drawable);
-    DrawMargins(graphPtr, drawable);
-    Blt_DrawElements(graphPtr, drawable);
-    Blt_DrawAxes(graphPtr, drawable);
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawPlot --
- *
- *	Draws the contents of the plotting area.  This consists of the
- *	elements, markers (draw under elements), axis limits, and possibly the
- *	legend.  Typically, the output will be cached into a backing store
- *	pixmap, so that redraws can occur quickly.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawPlot(Graph *graphPtr, Drawable drawable)
-{
-    int site;
-
-    DrawMargins(graphPtr, drawable);
-
-    /* Draw the background of the plotting area with 3D border. */
-    Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->plotBg,
-	graphPtr->left   - graphPtr->plotBW, 
-	graphPtr->top    - graphPtr->plotBW, 
-	graphPtr->right  - graphPtr->left + 1 + 2 * graphPtr->plotBW,
-	graphPtr->bottom - graphPtr->top  + 1 + 2 * graphPtr->plotBW, 
-	graphPtr->plotBW, graphPtr->plotRelief);
-
-    /* Draw the elements, markers, legend, and axis limits. */
-    Blt_DrawAxes(graphPtr, drawable);
-    Blt_DrawGrids(graphPtr, drawable);
-    Blt_DrawMarkers(graphPtr, drawable, MARKER_UNDER);
-
-    site = Blt_Legend_Site(graphPtr);
-    if ((site & LEGEND_PLOTAREA_MASK) && (!Blt_Legend_IsRaised(graphPtr))) {
-	Blt_DrawLegend(graphPtr, drawable);
-    } else if (site == LEGEND_WINDOW) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    Blt_DrawAxisLimits(graphPtr, drawable);
-    Blt_DrawElements(graphPtr, drawable);
-    /* Blt_DrawAxes(graphPtr, drawable); */
-}
-
-void
-Blt_MapGraph(Graph *graphPtr)
-{
-    if (graphPtr->flags & RESET_AXES) {
-	Blt_ResetAxes(graphPtr);
-    }
-    if (graphPtr->flags & LAYOUT_NEEDED) {
-	Blt_LayoutGraph(graphPtr);
-	graphPtr->flags &= ~LAYOUT_NEEDED;
-    }
-    /* Compute coordinate transformations for graph components */
-    if ((graphPtr->vRange > 1) && (graphPtr->hRange > 1)) {
-	if (graphPtr->flags & MAP_WORLD) {
-	    Blt_MapAxes(graphPtr);
-	}
-	Blt_MapElements(graphPtr);
-	Blt_MapMarkers(graphPtr);
-	graphPtr->flags &= ~(MAP_ALL);
-    }
-}
-
-void
-Blt_DrawGraph(Graph *graphPtr, Drawable drawable)
-{
-    DrawPlot(graphPtr, drawable);
-    /* Draw markers above elements */
-    Blt_DrawMarkers(graphPtr, drawable, MARKER_ABOVE);
-    Blt_DrawActiveElements(graphPtr, drawable);
-
-    /* Don't draw legend in the plot area. */
-    if ((Blt_Legend_Site(graphPtr) & LEGEND_PLOTAREA_MASK) && 
-	(Blt_Legend_IsRaised(graphPtr))) {
-	Blt_DrawLegend(graphPtr, drawable);
-    }
-    /* Draw 3D border just inside of the focus highlight ring. */
-    if ((graphPtr->borderWidth > 0) && (graphPtr->relief != TK_RELIEF_FLAT)) {
-	Blt_DrawBackgroundRectangle(graphPtr->tkwin, drawable, 
-		graphPtr->normalBg, graphPtr->highlightWidth, 
-		graphPtr->highlightWidth, 
-	 	graphPtr->width  - 2 * graphPtr->highlightWidth, 
-		graphPtr->height - 2 * graphPtr->highlightWidth, 
-		graphPtr->borderWidth, graphPtr->relief);
-    }
-    /* Draw focus highlight ring. */
-    if ((graphPtr->highlightWidth > 0) && (graphPtr->flags & FOCUS)) {
-	GC gc;
-
-	gc = Tk_GCForColor(graphPtr->highlightColor, drawable);
-	Tk_DrawFocusHighlight(graphPtr->tkwin, gc, graphPtr->highlightWidth,
-	    drawable);
-    }
-}
-
-static void
-UpdateMarginTraces(Graph *graphPtr)
-{
-    Margin *marginPtr, *endPtr;
-
-    for (marginPtr = graphPtr->margins, endPtr = marginPtr + 4; 
-	 marginPtr < endPtr; marginPtr++) {
-	if (marginPtr->varName != NULL) { /* Trigger variable traces */
-	    int size;
-
-	    if ((marginPtr->site == MARGIN_LEFT) || 
-		(marginPtr->site == MARGIN_RIGHT)) {
-		size = marginPtr->width;
-	    } else {
-		size = marginPtr->height;
-	    }
-	    Tcl_SetVar(graphPtr->interp, marginPtr->varName, Blt_Itoa(size), 
-		TCL_GLOBAL_ONLY);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayGraph --
- *
- *	This procedure is invoked to display a graph widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the graph in its current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayGraph(ClientData clientData)
-{
-    Graph *graphPtr = clientData;
-    Pixmap drawable;
-    Tk_Window tkwin;
-    int site;
-
-    graphPtr->flags &= ~REDRAW_PENDING;
-    if (graphPtr->tkwin == NULL) {
-	return;				/* Window has been destroyed (we
-					 * should not get here) */
-    }
-    tkwin = graphPtr->tkwin;
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayGraph(%s)\n", Tk_PathName(tkwin));
-#endif
-    if ((Tk_Width(tkwin) <= 1) || (Tk_Height(tkwin) <= 1)) {
-	/* Don't bother computing the layout until the size of the window is
-	 * something reasonable. */
-	return;
-    }
-    graphPtr->width = Tk_Width(tkwin);
-    graphPtr->height = Tk_Height(tkwin);
-    Blt_MapGraph(graphPtr);
-    if (!Tk_IsMapped(tkwin)) {
-	/* The graph's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the graph's new layout.  */
-	return;
-    }
-    /* Create a pixmap the size of the window for double buffering. */
-    if (graphPtr->doubleBuffer) {
-	drawable = Tk_GetPixmap(graphPtr->display, Tk_WindowId(tkwin), 
-		graphPtr->width, graphPtr->height, Tk_Depth(tkwin));
-    } else {
-	drawable = Tk_WindowId(tkwin);
-    }
-    if (graphPtr->backingStore) {
-	if ((graphPtr->cache == None) || 
-	    (graphPtr->cacheWidth != graphPtr->width) ||
-	    (graphPtr->cacheHeight != graphPtr->height)) {
-	    if (graphPtr->cache != None) {
-		Tk_FreePixmap(graphPtr->display, graphPtr->cache);
-	    }
-
-
-	    graphPtr->cache = Tk_GetPixmap(graphPtr->display, 
-		Tk_WindowId(tkwin), graphPtr->width, graphPtr->height, 
-		Tk_Depth(tkwin));
-	    graphPtr->cacheWidth  = graphPtr->width;
-	    graphPtr->cacheHeight = graphPtr->height;
-	    graphPtr->flags |= CACHE_DIRTY;
-	}
-    }
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    if (graphPtr->backingStore) {
-	if (graphPtr->flags & CACHE_DIRTY) {
-	    /* The backing store is new or out-of-date. */
-	    DrawPlot(graphPtr, graphPtr->cache);
-	    graphPtr->flags &= ~CACHE_DIRTY;
-	}
-	/* Copy the pixmap to the one used for drawing the entire graph. */
-	XCopyArea(graphPtr->display, graphPtr->cache, drawable,
-		graphPtr->drawGC, 0, 0, Tk_Width(graphPtr->tkwin),
-		Tk_Height(graphPtr->tkwin), 0, 0);
-    } else {
-	DrawPlot(graphPtr, drawable);
-    }
-    /* Draw markers above elements */
-    Blt_DrawMarkers(graphPtr, drawable, MARKER_ABOVE);
-    Blt_DrawActiveElements(graphPtr, drawable);
-    /* Don't draw legend in the plot area. */
-    site = Blt_Legend_Site(graphPtr);
-    if ((site & LEGEND_PLOTAREA_MASK) && (Blt_Legend_IsRaised(graphPtr))) {
-	Blt_DrawLegend(graphPtr, drawable);
-    }
-    if (site == LEGEND_WINDOW) {
-	Blt_Legend_EventuallyRedraw(graphPtr);
-    }
-    /* Draw 3D border just inside of the focus highlight ring. */
-    if ((graphPtr->borderWidth > 0) && (graphPtr->relief != TK_RELIEF_FLAT)) {
-	Blt_DrawBackgroundRectangle(graphPtr->tkwin, drawable, 
-		graphPtr->normalBg, graphPtr->highlightWidth, 
-		graphPtr->highlightWidth, 
-	 	graphPtr->width - 2 * graphPtr->highlightWidth, 
-		graphPtr->height - 2 * graphPtr->highlightWidth, 
-		graphPtr->borderWidth, graphPtr->relief);
-    }
-    /* Draw focus highlight ring. */
-    if ((graphPtr->highlightWidth > 0) && (graphPtr->flags & FOCUS)) {
-	GC gc;
-
-	gc = Tk_GCForColor(graphPtr->highlightColor, drawable);
-	Tk_DrawFocusHighlight(graphPtr->tkwin, gc, graphPtr->highlightWidth,
-	    drawable);
-    }
-    /* Disable crosshairs before redisplaying to the screen */
-    Blt_DisableCrosshairs(graphPtr);
-    XCopyArea(graphPtr->display, drawable, Tk_WindowId(tkwin),
-	graphPtr->drawGC, 0, 0, graphPtr->width, graphPtr->height, 0, 0);
-    Blt_EnableCrosshairs(graphPtr);
-    if (graphPtr->doubleBuffer) {
-	Tk_FreePixmap(graphPtr->display, drawable);
-    }
-    graphPtr->flags &= ~RESET_WORLD;
-    UpdateMarginTraces(graphPtr);
-}
-
-/*LINTLIBRARY*/
-int
-Blt_GraphCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[] = {
-	{"graph", GraphCmd,},
-	{"barchart", BarchartCmd,},
-	{"stripchart", StripchartCmd,},
-    };
-    return Blt_InitCmds(interp, "::blt", cmdSpecs, 3);
-}
-
-Graph *
-Blt_GetGraphFromWindowData(Tk_Window tkwin)
-{
-    Graph *graphPtr;
-
-    while (tkwin != NULL) {
-	graphPtr = (Graph *)Blt_GetWindowInstanceData(tkwin);
-	if (graphPtr != NULL) {
-	    return graphPtr;
-	}
-	tkwin = Tk_Parent(tkwin);
-    }
-    return NULL;
-}
-
-int
-Blt_GraphType(Graph *graphPtr)
-{
-    switch (graphPtr->classId) {
-    case CID_ELEM_LINE:
-	return GRAPH;
-    case CID_ELEM_BAR:
-	return BARCHART;
-    case CID_ELEM_STRIP:
-	return STRIPCHART;
-    default:
-	return 0;
-    }
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ReconfigureGraph --
- *
- *	Allocates resources for the graph.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ReconfigureGraph(Graph *graphPtr)	
-{
-    ConfigureGraph(graphPtr);
-    Blt_ConfigureLegend(graphPtr);
-    Blt_ConfigureElements(graphPtr);
-    Blt_ConfigureAxes(graphPtr);
-    Blt_ConfigureMarkers(graphPtr);
-}
diff --git a/blt3.0/src/bltGraph.h b/blt3.0/src/bltGraph.h
deleted file mode 100644
index a2af05e..0000000
--- a/blt3.0/src/bltGraph.h
+++ /dev/null
@@ -1,696 +0,0 @@
-
-/*
- * bltGraph.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_GRAPH_H
-#define _BLT_GRAPH_H
-
-#include "bltInt.h"
-#include "bltHash.h"
-#include "bltBind.h"
-#include "bltChain.h"
-#include "bltPs.h"
-#include "bltBgStyle.h"
-
-typedef struct _Graph Graph;
-typedef struct _Element Element;
-typedef struct _Legend Legend;
-
-typedef enum {
-    CID_NONE, 
-    CID_AXIS_X,
-    CID_AXIS_Y,
-    CID_ELEM_BAR,
-    CID_ELEM_CONTOUR,
-    CID_ELEM_LINE,
-    CID_ELEM_STRIP,
-    CID_MARKER_BITMAP,
-    CID_MARKER_IMAGE,
-    CID_MARKER_LINE,
-    CID_MARKER_POLYGON,
-    CID_MARKER_TEXT,
-    CID_MARKER_WINDOW,
-    CID_LEGEND_ENTRY,
-} ClassId;
-
-typedef struct {
-    /* Generic fields common to all graph objects. */
-    ClassId classId;		/* Class type of object. */
-    const char *name;		/* Identifier to refer the object. */
-    const char *className;	/* Class name of object. */
-
-    Graph *graphPtr;		/* Graph containing of the object. */
-
-    const char **tags;		/* Binding tags for the object. */
-} GraphObj;
-
-#include "bltGrAxis.h"
-#include "bltGrLegd.h"
-
-#define MARKER_UNDER	1	/* Draw markers designated to lie underneath
-				 * elements, grids, legend, etc. */
-#define MARKER_ABOVE	0	/* Draw markers designated to rest above
-				 * elements, grids, legend, etc. */
-
-#define PADX		2	/* Padding between labels/titles */
-#define PADY    	2	/* Padding between labels */
-
-#define MINIMUM_MARGIN	20	/* Minimum margin size */
-
-
-#define BOUND(x, lo, hi)	 \
-	(((x) > (hi)) ? (hi) : ((x) < (lo)) ? (lo) : (x))
-
-/*
- *---------------------------------------------------------------------------
- *
- * 	Graph component structure definitions
- *
- *---------------------------------------------------------------------------
- */
-#define PointInGraph(g,x,y) \
-	(((x) <= (g)->right) && ((x) >= (g)->left) && \
-	 ((y) <= (g)->bottom) && ((y) >= (g)->top))
-
-/*
- * Mask values used to selectively enable GRAPH or BARCHART entries in the
- * various configuration specs.
- */
-#define GRAPH			(BLT_CONFIG_USER_BIT << 1)
-#define STRIPCHART		(BLT_CONFIG_USER_BIT << 2)
-#define BARCHART		(BLT_CONFIG_USER_BIT << 3)
-#define LINE_GRAPHS		(GRAPH | STRIPCHART)
-#define ALL_GRAPHS		(GRAPH | BARCHART | STRIPCHART)
-
-#define ACTIVE_PEN		(BLT_CONFIG_USER_BIT << 16)
-#define NORMAL_PEN		(BLT_CONFIG_USER_BIT << 17)
-#define ALL_PENS		(NORMAL_PEN | ACTIVE_PEN)
-
-typedef struct {
-    Segment2d *segments;
-    int length;
-    int *map;
-} GraphSegments;
-
-typedef struct {
-    Point2d *points;
-    int length;
-    int *map;
-} GraphPoints;
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * BarGroup --
- *
- *	Represents a sets of bars with the same abscissa. This structure is
- *	used to track the display of the bars in the group.  
- *
- *	Each unique abscissa has at least one group.  Groups can be
- *	defined by the bar element's -group option.  Multiple groups are
- *	needed when you are displaying/comparing similar sets of data (same
- *	abscissas) but belong to a separate group.
- *	
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    int nSegments;			/* Number of occurrences of
-					 * x-coordinate */
-    Axis2d axes;			/* The axes associated with this
-					 * group. (mapped to the x-value) */
-    float sum;				/* Sum of the ordinates (y-coorinate) of
-					 * each duplicate abscissa. Used to
-					 * determine height of stacked bars. */
-    int count;				/* Current number of bars seen.  Used to
-					 * position of the next bar in the
-					 * group. */
-    float lastY;			/* y-cooridinate position of the
-					 * last bar seen. */
-    size_t index;			/* Order of group in set (an unique
-					 * abscissa may have more than one
-					 * group). */
-} BarGroup;
-
-/*
- *---------------------------------------------------------------------------
- *
- * BarSetKey --
- *
- *	Key for hash table of set of bars.  The bar set is defined by
- *	coordinates with the same abscissa (x-coordinate).
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    float value;			/* Duplicated abscissa */
-    Axis2d axes;			/* Axis mapping of element */
-} BarSetKey;
-
-/*
- * BarModes --
- *
- *	Bar elements are displayed according to their x-y coordinates.  If two
- *	bars have the same abscissa (x-coordinate), the bar segments will be
- *	drawn according to one of the following modes:
- */
-
-typedef enum BarModes {
-    BARS_INFRONT,			/* Each successive bar in a group is
-					 * drawn in front of the previous. */
-    BARS_STACKED,			/* Each successive bar in a group is
-					 * drawn stacked on top of the previous
-					 * bar. */
-    BARS_ALIGNED,			/* Each successive bar in a group is
-					 * drawn aligned side-by-side to the
-					 * previous from right-to-left. */
-    BARS_OVERLAP			/* Like "aligned", each successive bar
-					 * in a group is drawn from
-					 * right-to-left. The bars will overlap
-					 * each other by ~50%. */
-} BarMode;
-
-typedef struct _Pen Pen;
-typedef struct _Marker Marker;
-
-typedef Pen *(PenCreateProc)(void);
-typedef int (PenConfigureProc)(Graph *graphPtr, Pen *penPtr);
-typedef void (PenDestroyProc)(Graph *graphPtr, Pen *penPtr);
-
-struct _Pen {
-    const char *name;			/* Pen style identifier.  If NULL pen
-					 * was statically allocated. */
-    ClassId classId;			/* Type element using this pen. */
-    const char *typeId;			/* String token identifying the type of
-					 * pen. */
-    unsigned int flags;			/* Indicates if the pen element is
-					 * active or normal. */
-    int refCount;			/* Reference count for elements using
-					 * this pen. */
-    Blt_HashEntry *hashPtr;
-
-    Blt_ConfigSpec *configSpecs;	/* Configuration specifications */
-
-    PenConfigureProc *configProc;
-    PenDestroyProc *destroyProc;
-    Graph *graphPtr;			/* Graph that the pen is associated
-					 * with. */
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * Crosshairs
- *
- *	Contains the line segments positions and graphics context used to
- *	simulate crosshairs (by XOR-ing) on the graph.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct _Crosshairs Crosshairs;
-
-typedef struct {
-    short int width, height;		/* Dimensions of the margin */
-    short int axesOffset;
-    short int axesTitleLength;		/* Width of the widest title to be
-					 * shown.  Multiple titles are displayed
-					 * in another margin. This is the
-					 * minimum space requirement. */
-    unsigned int nAxes;			/* # of axes to be displayed */
-    Blt_Chain axes;			/* Axes associated with this margin */
-    const char *varName;		/* If non-NULL, name of variable to be
-					 * updated when the margin size
-					 * changes */
-    int reqSize;			/* Requested size of margin */
-    int site;				/* Indicates where margin is located:
-					 * left, right, top, or bottom. */
-} Margin;
-
-#define MARGIN_NONE	-1
-#define MARGIN_BOTTOM	0		/* x */
-#define MARGIN_LEFT	1 		/* y */
-#define MARGIN_TOP	2		/* x2 */
-#define MARGIN_RIGHT	3		/* y2 */
-
-#define rightMargin	margins[MARGIN_RIGHT]
-#define leftMargin	margins[MARGIN_LEFT]
-#define topMargin	margins[MARGIN_TOP]
-#define bottomMargin	margins[MARGIN_BOTTOM]
-
-/*
- *---------------------------------------------------------------------------
- *
- * Graph --
- *
- *	Top level structure containing everything pertaining to the graph.
- *
- *---------------------------------------------------------------------------
- */
-struct _Graph {
-    unsigned int flags;			/* Flags;  see below for definitions. */
-    Tcl_Interp *interp;			/* Interpreter associated with graph */
-    Tk_Window tkwin;			/* Window that embodies the graph.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up. */
-    Display *display;			/* Display containing widget; used to
-					 * release resources after tkwin has
-					 * already gone away. */
-    Tcl_Command cmdToken;		/* Token for graph's widget command. */
-    const char *data;			/* This value isn't used in C code.
-					 * It may be used in TCL bindings to
-					 * associate extra data. */
-    Tk_Cursor cursor;
-    int inset;				/* Sum of focus highlight and 3-D
-					 * border.  Indicates how far to
-					 * offset the graph from outside edge
-					 * of the window. */
-    int borderWidth;			/* Width of the exterior border */
-    int relief;				/* Relief of the exterior border. */
-    Blt_Background normalBg;		/* 3-D border used to delineate the
-					 * plot surface and outer edge of
-					 * window. */
-    int highlightWidth;			/* Width in pixels of highlight to
-					 * draw around widget when it has the
-					 * focus.  <= 0 means don't draw a
-					 * highlight. */
-    XColor *highlightBgColor;		/* Color for drawing traversal
-					 * highlight area when highlight is
-					 * off. */
-    XColor *highlightColor;		/* Color for drawing traversal
-					 * highlight. */
-    const char *title;			/* Graph title */
-    short int titleX, titleY;		/* Position of title on graph. */
-    short int titleWidth, titleHeight;	/* Dimensions of title. */
-    TextStyle titleTextStyle;		/* Title attributes: font, color,
-					 * etc.*/
-    
-    const char *takeFocus;		/* Not used in C code, indicates if
-					 * widget should be included in focus
-					 * traversal. */
-    Axis *focusPtr;			/* The axis that currently has focus. */
-    
-    int reqWidth, reqHeight;		/* Requested size of graph window */
-    int reqPlotWidth, reqPlotHeight;	/* Requested size of plot area. Zero
-					 * means to adjust the dimension
-					 * according to the available space
-					 * left in the window. */
-    int width, height;			/* Actual size (in pixels) of graph
-					 * window or PostScript page. */
-    Blt_HashTable penTable;		/* Table of pens */
-    struct Component {
-	Blt_HashTable table;		/* Hash table of ids. */
-	Blt_Chain displayList;		/* Display list. */
-	Blt_HashTable tagTable;		/* Table of bind tags. */
-    } elements, markers, axes;
-
-    Blt_HashTable dataTables;		/* Hash table of datatable clients. */
-    ClassId classId;			/* Default element type */
-    Blt_BindTable bindTable;
-    int nextMarkerId;			/* Tracks next marker identifier
-					 * available */
-    Blt_Chain axisChain[4];		/* Chain of axes for each of the
-					 * margins.  They're separate from the
-					 * margin structures to make it easier
-					 * to invert the X-Y axes by simply
-					 * switching chain pointers. */
-    Margin margins[4];
-    PageSetup *pageSetup;		/* Page layout options: see bltGrPS.c */
-    Legend *legend;			/* Legend information: see
-					 * bltGrLegd.c */
-    Crosshairs *crosshairs;		/* Crosshairs information: see
-					 * bltGrHairs.c */
-    int halo;				/* Maximum distance allowed between
-					 * points when searching for a point */
-    int inverted;			/* If non-zero, indicates the x and y
-					 * axis positions should be inverted. */
-    int stackAxes;			/* If non-zero, indicates to stack
-					 * mulitple axes in a margin, rather
-					 * than layering them one on top of
-					 * another. */
-    GC drawGC;				/* GC for drawing on the margins. This
-					 * includes the axis lines */  
-    int plotBW;				/* Width of interior 3-D border. */
-    int plotRelief;			/* 3-d effect: TK_RELIEF_RAISED etc. */
-    Blt_Background plotBg;		/* Color of plotting surface */
-
-    /* If non-zero, force plot to conform to aspect ratio W/H */
-    float aspect;
-
-    short int left, right;		/* Coordinates of plot bbox */
-    short int top, bottom;	
-
-    Blt_Pad xPad;			/* Vertical padding for plotarea */
-    int vRange, vOffset;		/* Vertical axis range and offset from
-					 * the left side of the graph
-					 * window. Used to transform coordinates
-					 * to vertical axes. */
-    Blt_Pad yPad;			/* Horizontal padding for plotarea */
-    int hRange, hOffset;		/* Horizontal axis range and offset from
-					 * the top of the graph window. Used to
-					 * transform horizontal axes */
-    float vScale, hScale;
-
-    int doubleBuffer;			/* If non-zero, draw the graph into a
-					 * pixmap first to reduce flashing. */
-    int backingStore;			/* If non-zero, cache elements by
-					 * drawing them into a pixmap */
-    Pixmap cache;			/* Pixmap used to cache elements
-					 * displayed.  If *backingStore* is
-					 * non-zero, each element is drawn into
-					 * this pixmap before it is copied onto
-					 * the screen.  The pixmap then acts as
-					 * a cache (only the pixmap is
-					 * redisplayed if the none of elements
-					 * have changed). This is done so that
-					 * markers can be redrawn quickly over
-					 * elements without redrawing each
-					 * element. */
-    short int cacheWidth, cacheHeight;	/* Size of element backing store
-					 * pixmap. */
-
-    /*
-     * barchart specific information
-     */
-    float baseline;			/* Baseline from bar chart.  */
-    float barWidth;			/* Default width of each bar in graph
-					 * units.  The default width is 1.0
-					 * units. */
-    BarMode mode;			/* Mode describing how to display bars
-					 * with the same x-coordinates. Mode can
-					 * be "stacked", "aligned", "overlap",
-					 * or "infront" */
-    BarGroup *barGroups;		/* Contains information about duplicate
-					 * x-values in bar elements (malloc-ed).
-					 * This information can also be accessed
-					 * by the group hash table */
-    int nBarGroups;			/* # of entries in barGroups array.  If 
-					 * zero, indicates nothing special
-					 * needs to be * done for "stack" or
-					 * "align" modes */
-    Blt_HashTable setTable;		/* Table managing sets of bars with
-					 * the same abscissas. The bars in a
-					 * set may be displayed is various
-					 * ways: aligned, overlap, infront, or
-					 * stacked. */
-    int maxBarSetSize;
-    const char *dataCmd;		/* New data callback? */
-
-};
-
-/*
- * Bit flags definitions:
- *
- * 	All kinds of state information kept here.  All these things happen
- * 	when the window is available to draw into (DisplayGraph). Need the
- * 	window width and height before we can calculate graph layout (i.e. the
- * 	screen coordinates of the axes, elements, titles, etc). But we want to
- * 	do this only when we have to, not every time the graph is redrawn.
- *
- *	Same goes for maintaining a pixmap to double buffer graph elements.
- *	Need to mark when the pixmap needs to updated.
- *
- *
- *	MAP_ITEM		Indicates that the element/marker/axis
- *				configuration has changed such that
- *				its layout of the item (i.e. its
- *				position in the graph window) needs
- *				to be recalculated.
- *
- *	MAP_ALL			Indicates that the layout of the axes and 
- *				all elements and markers and the graph need 
- *				to be recalculated. Otherwise, the layout
- *				of only those markers and elements that
- *				have changed will be reset. 
- *
- *	GET_AXIS_GEOMETRY	Indicates that the size of the axes needs 
- *				to be recalculated. 
- *
- *	RESET_AXES		Flag to call to Blt_ResetAxes routine.  
- *				This routine recalculates the scale offset
- *				(used for mapping coordinates) of each axis.
- *				If an axis limit has changed, then it sets 
- *				flags to re-layout and redraw the entire 
- *				graph.  This needs to happend before the axis
- *				can compute transformations between graph and 
- *				screen coordinates. 
- *
- *	LAYOUT_NEEDED		
- *
- *	CACHE_DIRTY		If set, redraw all elements into the pixmap 
- *				used for buffering elements. 
- *
- *	REDRAW_PENDING		Non-zero means a DoWhenIdle handler has 
- *				already been queued to redraw this window. 
- *
- *	DRAW_LEGEND		Non-zero means redraw the legend. If this is 
- *				the only DRAW_* flag, the legend display 
- *				routine is called instead of the graph 
- *				display routine. 
- *
- *	DRAW_MARGINS		Indicates that the margins bordering 
- *				the plotting area need to be redrawn. 
- *				The possible reasons are:
- *
- *				1) an axis configuration changed
- *				2) an axis limit changed
- *				3) titles have changed
- *				4) window was resized. 
- *
- *	GRAPH_FOCUS	
- */
-
-#define HIDE			(1<<0) /* 0x0001 */
-#define DELETE_PENDING		(1<<1) /* 0x0002 */
-#define REDRAW_PENDING		(1<<2) /* 0x0004 */
-#define	ACTIVE_PENDING		(1<<3) /* 0x0008 */
-#define	MAP_ITEM		(1<<4) /* 0x0010 */
-#define DIRTY			(1<<5) /* 0x0020 */
-#define ACTIVE			(1<<6) /* 0x0040 */
-#define FOCUS			(1<<7) /* 0x0080 */
-
-#define	MAP_ALL			(1<<8) /* 0x0100 */
-#define LAYOUT_NEEDED		(1<<9) /* 0x0200 */
-#define RESET_AXES		(1<<10)/* 0x0400 */
-#define	GET_AXIS_GEOMETRY	(1<<11)/* 0x0800 */
-
-#define DRAW_LEGEND		(1<<12)/* 0x1000 */
-#define DRAW_MARGINS		(1<<13)/* 0x2000 */
-#define	CACHE_DIRTY		(1<<14)/* 0x4000 */
-#define REQ_BACKING_STORE	(1<<15)/* 0x8000 */
-
-#define	MAP_WORLD		(MAP_ALL|RESET_AXES|GET_AXIS_GEOMETRY)
-#define REDRAW_WORLD		(DRAW_LEGEND)
-#define RESET_WORLD		(REDRAW_WORLD | MAP_WORLD)
-
-/*
- * ---------------------- Forward declarations ------------------------
- */
-
-BLT_EXTERN int Blt_CreatePageSetup(Graph *graphPtr);
-
-BLT_EXTERN int Blt_CreateCrosshairs(Graph *graphPtr);
-
-BLT_EXTERN double Blt_InvHMap(Axis *axisPtr, double x);
-
-BLT_EXTERN double Blt_InvVMap(Axis *axisPtr, double x);
-
-BLT_EXTERN double Blt_HMap(Axis *axisPtr, double x);
-
-BLT_EXTERN double Blt_VMap(Axis *axisPtr, double y);
-
-BLT_EXTERN Point2d Blt_InvMap2D(Graph *graphPtr, double x, double y, 
-	Axis2d *pairPtr);
-
-BLT_EXTERN Point2d Blt_Map2D(Graph *graphPtr, double x, double y, 
-	Axis2d *pairPtr);
-
-BLT_EXTERN Graph *Blt_GetGraphFromWindowData(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_AdjustAxisPointers(Graph *graphPtr);
-
-BLT_EXTERN int Blt_PolyRectClip(Region2d *extsPtr, Point2d *inputPts,
-	int nInputPts, Point2d *outputPts);
-
-BLT_EXTERN void Blt_ComputeBarStacks(Graph *graphPtr);
-
-BLT_EXTERN void Blt_ConfigureCrosshairs(Graph *graphPtr);
-BLT_EXTERN void Blt_ConfigureLegend(Graph *graphPtr);
-BLT_EXTERN void Blt_ConfigureElements(Graph *graphPtr);
-BLT_EXTERN void Blt_ConfigureAxes(Graph *graphPtr);
-BLT_EXTERN void Blt_ConfigureMarkers(Graph *graphPtr);
-BLT_EXTERN void Blt_ReconfigureGraph(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyAxes(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyCrosshairs(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyElements(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyMarkers(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyPageSetup(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DrawAxes(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_DrawAxisLimits(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_DrawElements(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_DrawActiveElements(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_DrawGraph(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_DrawMarkers(Graph *graphPtr, Drawable drawable, int under);
-
-BLT_EXTERN void Blt_Draw2DSegments(Display *display, Drawable drawable, GC gc, 
-	Segment2d *segments, int nSegments);
-
-BLT_EXTERN int Blt_GetCoordinate(Tcl_Interp *interp, const char *string, 
-	double *valuePtr);
-
-BLT_EXTERN void Blt_InitBarSetTable(Graph *graphPtr);
-
-BLT_EXTERN void Blt_LayoutGraph(Graph *graphPtr);
-
-BLT_EXTERN void Blt_EventuallyRedrawGraph(Graph *graphPtr);
-
-BLT_EXTERN void Blt_ResetAxes(Graph *graphPtr);
-
-BLT_EXTERN void Blt_ResetBarGroups(Graph *graphPtr);
-
-BLT_EXTERN void Blt_GraphExtents(Graph *graphPtr, Region2d *extsPtr);
-
-BLT_EXTERN void Blt_DisableCrosshairs(Graph *graphPtr);
-
-BLT_EXTERN void Blt_EnableCrosshairs(Graph *graphPtr);
-
-BLT_EXTERN void Blt_MapGraph(Graph *graphPtr);
-
-BLT_EXTERN void Blt_MapAxes(Graph *graphPtr);
-
-BLT_EXTERN void Blt_MapElements(Graph *graphPtr);
-
-BLT_EXTERN void Blt_MapMarkers(Graph *graphPtr);
-
-BLT_EXTERN void Blt_UpdateCrosshairs(Graph *graphPtr);
-
-BLT_EXTERN void Blt_DestroyPens(Graph *graphPtr);
-
-BLT_EXTERN int Blt_GetPenFromObj(Tcl_Interp *interp, Graph *graphPtr, 
-	Tcl_Obj *objPtr, ClassId classId, Pen **penPtrPtr);
-
-BLT_EXTERN Pen *Blt_BarPen(const char *penName);
-
-BLT_EXTERN Pen *Blt_LinePen(const char *penName);
-
-BLT_EXTERN Pen *Blt_CreatePen(Graph *graphPtr, const char *penName, 
-	ClassId classId, int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_InitLinePens(Graph *graphPtr);
-
-BLT_EXTERN int Blt_InitBarPens(Graph *graphPtr);
-
-BLT_EXTERN void Blt_FreePen(Pen *penPtr);
-
-BLT_EXTERN int Blt_VirtualAxisOp(Graph *graphPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_AxisOp(Tcl_Interp *interp, Graph *graphPtr, int margin, 
-	int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_ElementOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, ClassId classId);
-
-BLT_EXTERN int Blt_CrosshairsOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_MarkerOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_PenOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_PointInPolygon(Point2d *samplePtr, Point2d *screenPts, 
-	int nScreenPts);
-
-BLT_EXTERN int Blt_RegionInPolygon(Region2d *extsPtr, Point2d *points, 
-	int nPoints, int enclosed);
-
-BLT_EXTERN int Blt_PointInSegments(Point2d *samplePtr, Segment2d *segments, 
-	int nSegments, double halo);
-
-BLT_EXTERN int Blt_PostScriptOp(Graph *graphPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_GraphUpdateNeeded(Graph *graphPtr);
-
-BLT_EXTERN int Blt_DefaultAxes(Graph *graphPtr);
-
-BLT_EXTERN Axis *Blt_GetFirstAxis(Blt_Chain chain);
-
-BLT_EXTERN void Blt_UpdateAxisBackgrounds(Graph *graphPtr);
-
-BLT_EXTERN Marker *Blt_NearestMarker(Graph *graphPtr, int x, int y, int under);
-
-BLT_EXTERN Axis *Blt_NearestAxis(Graph *graphPtr, int x, int y);
-
-typedef ClientData (MakeTagProc)(Graph *graphPtr, const char *tagName);
-
-BLT_EXTERN MakeTagProc Blt_MakeElementTag;
-BLT_EXTERN MakeTagProc Blt_MakeMarkerTag;
-BLT_EXTERN MakeTagProc Blt_MakeAxisTag;
-BLT_EXTERN Blt_BindTagProc Blt_GraphTags;
-BLT_EXTERN Blt_BindTagProc Blt_AxisTags;
-
-BLT_EXTERN int Blt_GraphType(Graph *graphPtr);
-
-BLT_EXTERN void Blt_UpdateGraph(ClientData clientData);
-
-BLT_EXTERN void Blt_GraphSetObjectClass(GraphObj *graphObjPtr,ClassId classId);
-
-BLT_EXTERN void Blt_MarkersToPostScript(Graph *graphPtr, Blt_Ps ps, int under);
-BLT_EXTERN void Blt_ElementsToPostScript(Graph *graphPtr, Blt_Ps ps);
-BLT_EXTERN void Blt_ActiveElementsToPostScript(Graph *graphPtr, Blt_Ps ps);
-BLT_EXTERN void Blt_LegendToPostScript(Graph *graphPtr, Blt_Ps ps);
-BLT_EXTERN void Blt_AxesToPostScript(Graph *graphPtr, Blt_Ps ps);
-BLT_EXTERN void Blt_AxisLimitsToPostScript(Graph *graphPtr, Blt_Ps ps);
-
-BLT_EXTERN Element *Blt_LineElement(Graph *graphPtr, const char *name, 
-	ClassId classId);
-BLT_EXTERN Element *Blt_BarElement(Graph *graphPtr, const char *name, 
-	ClassId classId);
-
-BLT_EXTERN void Blt_DrawGrids(Graph *graphPtr, Drawable drawable);
-
-BLT_EXTERN void Blt_GridsToPostScript(Graph *graphPtr, Blt_Ps ps);
-BLT_EXTERN void Blt_InitBarSetTable(Graph *graphPtr);
-BLT_EXTERN void Blt_DestroyBarSets(Graph *graphPtr);
-
-/* ---------------------- Global declarations ------------------------ */
-
-BLT_EXTERN const char *Blt_GraphClassName(ClassId classId);
-
-#endif /* _BLT_GRAPH_H */
diff --git a/blt3.0/src/bltHash.c b/blt3.0/src/bltHash.c
deleted file mode 100644
index 06d27a5..0000000
--- a/blt3.0/src/bltHash.c
+++ /dev/null
@@ -1,1281 +0,0 @@
-
-/* 
- * bltHash.c --
- *
- * This module implements an in-memory hash table for the BLT toolkit.  Built
- * upon the TCL hash table, it adds pool allocation 64-bit address handling,
- * improved array hash function.
- *
- *	Copyright 2001 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Both the MIX32 and MIX64 routine are from Bob Jenkins.
- *
- *	Bob Jenkins, 1996.  hash.c.  Public Domain.
- *	Bob Jenkins, 1997.  lookup8.c.  Public Domain.
- *
- * The hash table implementation is base upon the one in the Tcl distribution.
- *
- *	Copyright (c) 1991-1993 The Regents of the University of
- *	California.  
- *
- *	Copyright (c) 1994 Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#include <bltInt.h>
-
-#include <stdio.h>
-#include <string.h>
-/* The following header is required for LP64 compilation */
-#include <stdlib.h>
-
-#include "bltHash.h"
-
-/*
- * When there are this many entries per bucket, on average, rebuild the hash
- * table to make it larger.
- */
-
-#define REBUILD_MULTIPLIER	3
-
-#if (SIZEOF_VOID_P == 8)
-#define RANDOM_INDEX		HashOneWord
-#define DOWNSHIFT_START		62
-static Blt_Hash HashOneWord(Blt_HashTable *tablePtr, const void *key);
-#else 
-
-/*
- * The following macro takes a preliminary integer hash value and produces an
- * index into a hash tables bucket list.  The idea is to make it so that
- * preliminary values that are arbitrarily similar will end up in different
- * buckets.  The hash function was taken from a random-number generator.
- */
-#define RANDOM_INDEX(tablePtr, i) \
-    (((((long) (i))*1103515245) >> (tablePtr)->downShift) & (tablePtr)->mask)
-#define DOWNSHIFT_START	28
-#endif
-
-/*
- * Procedure prototypes for static procedures in this file:
- */
-static Blt_Hash HashArray(const void *key, size_t length);
-static Blt_HashEntry *ArrayFind(Blt_HashTable *tablePtr, const void *key);
-static Blt_HashEntry *ArrayCreate(Blt_HashTable *tablePtr, const void *key, 
-	int *isNewPtr);
-static Blt_HashEntry *BogusFind(Blt_HashTable *tablePtr, const void *key);
-static Blt_HashEntry *BogusCreate(Blt_HashTable *tablePtr, const void *key, 
-	int *isNewPtr);
-static Blt_Hash HashString(const char *string);
-static void RebuildTable(Blt_HashTable *tablePtr);
-static Blt_HashEntry *StringFind(Blt_HashTable *tablePtr, const void *key);
-static Blt_HashEntry *StringCreate(Blt_HashTable *tablePtr, const void *key, 
-	int *isNewPtr);
-static Blt_HashEntry *OneWordFind(Blt_HashTable *tablePtr, const void *key);
-static Blt_HashEntry *OneWordCreate(Blt_HashTable *tablePtr, const void *key, 
-	int *isNewPtr);
-
-/*
- *---------------------------------------------------------------------------
- *
- * HashString --
- *
- *	Compute a one-word summary of a text string, which can be used to
- *	generate a hash index.
- *
- * Results:
- *	The return value is a one-word summary of the information in string.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Hash
-HashString(const char *string)		/* String from which to compute hash
-					 * value. */
-{
-    Blt_Hash result;
-    Blt_Hash c;
-
-    /*
-     * I tried a zillion different hash functions and asked many other
-     * people for advice.  Many people had their own favorite functions,
-     * all different, but no-one had much idea why they were good ones.
-     * I chose the one below (multiply by 9 and add new character)
-     * because of the following reasons:
-     *
-     * 1. Multiplying by 10 is perfect for keys that are decimal strings,
-     *    and multiplying by 9 is just about as good.
-     * 2. Times-9 is (shift-left-3) plus (old).  This means that each
-     *    character's bits hang around in the low-order bits of the
-     *    hash value for ever, plus they spread fairly rapidly up to
-     *    the high-order bits to fill out the hash value.  This seems
-     *    to work well both for decimal and non-decimal strings.
-     */
-
-    result = 0;
-    while ((c = *string++) != 0) {
-	result += (result << 3) + c;
-    }
-    return (Blt_Hash)result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringFind --
- *
- *	Given a hash table with string keys, and a string key, find the entry
- *	with a matching key.
- *
- * Results:
- *	The return value is a token for the matching entry in the hash table,
- *	or NULL if there was no matching entry.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-StringFind(
-    Blt_HashTable *tablePtr,		/* Table in which to lookup entry. */
-    const void *key)			/* Key to find matching entry. */
-{
-    Blt_Hash hval;
-    Blt_HashEntry *hPtr;
-    size_t hindex;
-
-    hval = HashString((const char *)key);
-    hindex = hval & tablePtr->mask;
-
-    /*
-     * Search all of the entries in the appropriate bucket.
-     */
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL; hPtr = hPtr->nextPtr) {
-	if (hPtr->hval == hval) {
-	    const char *p1, *p2;
-
-	    for (p1 = key, p2 = hPtr->key.string; ; p1++, p2++) {
-		if (*p1 != *p2) {
-		    break;
-		}
-		if (*p1 == '\0') {
-		    return hPtr;
-		}
-	    }
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringCreate --
- *
- *	Given a hash table with string keys, and a string key, find the entry
- *	with a matching key.  If there is no matching entry, then create a new
- *	entry that does match.
- *
- * Results:
- *	The return value is a pointer to the matching entry.  If this is a
- *	newly-created entry, then *isNewPtr will be set to a non-zero value;
- *	otherwise *isNewPtr will be set to 0.  If this is a new entry the
- *	value stored in the entry will initially be 0.
- *
- * Side effects:
- *	A new entry may be added to the hash table.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-StringCreate(
-    Blt_HashTable *tablePtr,		/* Table in which to lookup entry. */
-    const void *key,			/* Key to use to find or create
-					 * matching entry. */
-    int *isNewPtr)			/* Store info here telling whether a
-					 * new entry was created. */
-{
-    Blt_Hash hval;
-    Blt_HashEntry **bucketPtr;
-    Blt_HashEntry *hPtr;
-    size_t size, hindex;
-
-    hval = HashString(key);
-    hindex = hval & tablePtr->mask;
-
-    /* Search all of the entries in this bucket. */
-
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL;
-	    hPtr = hPtr->nextPtr) {
-	if (hPtr->hval == hval) {
-	    const char *p1, *p2;
-
-	    for (p1 = key, p2 = hPtr->key.string; ; p1++, p2++) {
-		if (*p1 != *p2) {
-		    break;
-		}
-		if (*p1 == '\0') {
-		    *isNewPtr = FALSE;
-		    return hPtr;
-		}
-	    }
-	}
-    }
-
-    /* Entry not found.  Add a new one to the bucket. */
-
-    *isNewPtr = TRUE;
-    size = sizeof(Blt_HashEntry) + strlen(key) - sizeof(Blt_HashKey) + 1;
-    if (tablePtr->hPool != NULL) {
-	hPtr = Blt_PoolAllocItem(tablePtr->hPool, size);
-    } else {
-	hPtr = Blt_AssertMalloc(size);
-    }
-    bucketPtr = tablePtr->buckets + hindex;
-    hPtr->nextPtr = *bucketPtr;
-    hPtr->hval = hval;
-    hPtr->clientData = 0;
-    strcpy(hPtr->key.string, key);
-    *bucketPtr = hPtr;
-    tablePtr->numEntries++;
-
-    /*
-     * If the table has exceeded a decent size, rebuild it with many more
-     * buckets.
-     */
-
-    if (tablePtr->numEntries >= tablePtr->rebuildSize) {
-	RebuildTable(tablePtr);
-    }
-    return hPtr;
-}
-
-#if (SIZEOF_VOID_P == 8)
-/*
- *---------------------------------------------------------------------------
- *
- * HashOneWord --
- *
- *	Compute a one-word hash value of a 64-bit word, which then can be used
- *	to generate a hash index.
- *
- *	From Knuth, it's a multiplicative hash.  Multiplies an unsigned 64-bit
- *	value with the golden ratio (sqrt(5) - 1) / 2.  The downshift value is
- *	64 - n, where n is the log2 of the size of the hash table.
- *		
- * Results:
- *	The return value is a one-word summary of the information in 64 bit
- *	word.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Hash
-HashOneWord(
-    Blt_HashTable *tablePtr,
-    const void *key)
-{
-    uint64_t a0, a1;
-    uint64_t y0, y1;
-    uint64_t y2, y3; 
-    uint64_t p1, p2;
-    uint64_t result;
-    /* Compute key * GOLDEN_RATIO in 128-bit arithmetic */
-    a0 = (uint64_t)key & 0x00000000FFFFFFFF; 
-    a1 = (uint64_t)key >> 32;
-    
-    y0 = a0 * 0x000000007f4a7c13;
-    y1 = a0 * 0x000000009e3779b9; 
-    y2 = a1 * 0x000000007f4a7c13;
-    y3 = a1 * 0x000000009e3779b9; 
-    y1 += y0 >> 32;			/* Can't carry */ 
-    y1 += y2;				/* Might carry */
-    if (y1 < y2) {
-	y3 += (1LL << 32);		/* Propagate */ 
-    }
-
-    /* 128-bit product: p1 = loword, p2 = hiword */
-    p1 = ((y1 & 0x00000000FFFFFFFF) << 32) + (y0 & 0x00000000FFFFFFFF);
-    p2 = y3 + (y1 >> 32);
-    
-    /* Left shift the value downward by the size of the table */
-    if (tablePtr->downShift > 0) { 
-	if (tablePtr->downShift < 64) { 
-	    result = ((p2 << (64 - tablePtr->downShift)) | 
-		      (p1 >> (tablePtr->downShift & 63))); 
-	} else { 
-	    result = p2 >> (tablePtr->downShift & 63); 
-	} 
-    } else { 
-	result = p1;
-    } 
-    /* Finally mask off the high bits */
-    return (Blt_Hash)(result & tablePtr->mask);
-}
-
-#endif /* SIZEOF_VOID_P == 8 */
-
-/*
- *---------------------------------------------------------------------------
- *
- * OneWordFind --
- *
- *	Given a hash table with one-word keys, and a one-word key, find the
- *	entry with a matching key.
- *
- * Results:
- *	The return value is a token for the matching entry in the hash table,
- *	or NULL if there was no matching entry.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-OneWordFind(
-    Blt_HashTable *tablePtr,		/* Table where to lookup entry. */
-    const void *key)			/* Key that we're searching for. */
-{
-    Blt_HashEntry *hPtr;
-    size_t hindex;
-
-    hindex = RANDOM_INDEX(tablePtr, key);
-
-    /* Search all of the entries in the appropriate bucket. */
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL;
-	    hPtr = hPtr->nextPtr) {
-	if (hPtr->key.oneWordValue == key) {
-	    return hPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OneWordCreate --
- *
- *	Given a hash table with one-word keys, and a one-word key, find the
- *	entry with a matching key.  If there is no matching entry, then create
- *	a new entry that does match.
- *
- * Results:
- *	The return value is a pointer to the matching entry.  If this is a
- *	newly-created entry, then *isNewPtr will be set to a non-zero value;
- *	otherwise *isNewPtr will be set to 0.  If this is a new entry the value
- *	stored in the entry will initially be 0.
- *
- * Side effects:
- *	A new entry may be added to the hash table.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-OneWordCreate(
-    Blt_HashTable *tablePtr,		/* Table in which to lookup entry. */
-    const void *key,			/* Key to use to find or create
-					 * matching entry. */
-    int *isNewPtr)			/* Store info here telling whether a
-					 * new entry was created. */
-{
-    Blt_HashEntry **bucketPtr;
-    Blt_HashEntry *hPtr;
-    size_t hindex;
-
-    hindex = RANDOM_INDEX(tablePtr, key);
-
-    /* Search all of the entries in this bucket. */
-
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL; hPtr = hPtr->nextPtr) {
-	if (hPtr->key.oneWordValue == key) {
-	    *isNewPtr = FALSE;
-	    return hPtr;
-	}
-    }
-
-    /* Entry not found.  Add a new one to the bucket. */
-
-    *isNewPtr = TRUE;
-    if (tablePtr->hPool != NULL) {
-	hPtr = Blt_PoolAllocItem(tablePtr->hPool, sizeof(Blt_HashEntry));
-    } else {
-	hPtr = Blt_AssertMalloc(sizeof(Blt_HashEntry));
-    }	
-    bucketPtr = tablePtr->buckets + hindex;
-    hPtr->nextPtr = *bucketPtr;
-    hPtr->hval = (Blt_Hash)key;
-    hPtr->clientData = 0;
-    hPtr->key.oneWordValue = (void *)key; /* const XXXX */
-    *bucketPtr = hPtr;
-    tablePtr->numEntries++;
-
-    /*
-     * If the table has exceeded a decent size, rebuild it with many more
-     * buckets.
-     */
-
-    if (tablePtr->numEntries >= tablePtr->rebuildSize) {
-	RebuildTable(tablePtr);
-    }
-    return hPtr;
-}
-
-
-#if (SIZEOF_VOID_P == 4)
-/*
- *---------------------------------------------------------------------------
- *
- * MIX32 -- 
- *
- *      Bob Jenkins, 1996.  Public Domain.
- *
- *	Mix 3 32/64-bit values reversibly.  For every delta with one or two
- *	bit set, and the deltas of all three high bits or all three low bits,
- *	whether the original value of a,b,c is almost all zero or is uniformly
- *	distributed, If mix() is run forward or backward, at least 32 bits in
- *	a,b,c have at least 1/4 probability of changing.  * If mix() is run
- *	forward, every bit of c will change between 1/3 and 2/3 of the time.
- *	(Well, 22/100 and 78/100 for some 2-bit deltas.)  mix() was built out
- *	of 36 single-cycle latency instructions in a structure that could
- *	supported 2x parallelism, like so:
- *
- *		a -= b; 
- *		a -= c; x = (c>>13);
- *		b -= c; a ^= x;
- *		b -= a; x = (a<<8);
- *		c -= a; b ^= x;
- *		c -= b; x = (b>>13);
- *		...
- *
- *	 Unfortunately, superscalar Pentiums and Sparcs can't take advantage
- *	 of that parallelism.  They've also turned some of those single-cycle
- *	 latency instructions into multi-cycle latency instructions.  Still,
- *	 this is the fastest good hash I could find.  There were about 2^^68
- *	 to choose from.  I only looked at a billion or so.
- *
- * -------------------------------------------------------------------------- 
- */
-#define MIX32(a,b,c) \
-	a -= b, a -= c, a ^= (c >> 13), \
-	b -= c, b -= a, b ^= (a <<  8), \
-	c -= a, c -= b, c ^= (b >> 13), \
-	a -= b, a -= c, a ^= (c >> 12), \
-	b -= c, b -= a, b ^= (a << 16), \
-	c -= a, c -= b, c ^= (b >>  5), \
-	a -= b, a -= c, a ^= (c >>  3), \
-	b -= c, b -= a, b ^= (a << 10), \
-	c -= a, c -= b, c ^= (b >> 15)
-
-#define GOLDEN_RATIO32	0x9e3779b9	/* An arbitrary value */
-
-/*
- *---------------------------------------------------------------------------
- *
- * HashArray --
- *
- *      Bob Jenkins, 1996.  Public Domain.
- *
- *	This works on all machines.  Length has to be measured in unsigned
- *	longs instead of bytes.  It requires that
- *
- *	  o The key be an array of unsigned ints.
- *	  o All your machines have the same endianness
- *	  o The length be the number of unsigned ints in the key.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Hash
-HashArray(const void *key, size_t length)
-{
-    uint32_t a, b, c, len;
-    uint32_t *arrayPtr = (uint32_t *)key;
-    /* Set up the internal state */
-    len = length;
-    a = b = GOLDEN_RATIO32;		/* An arbitrary value */
-    c = 0;				/* Previous hash value */
-
-    while (len >= 3) {			/* Handle most of the key */
-	a += arrayPtr[0];
-	b += arrayPtr[1];
-	c += arrayPtr[2];
-	MIX32(a, b, c);
-	arrayPtr += 3; len -= 3;
-    }
-    c += length;		
-    /* And now the last 2 words */
-    /* Note that all the case statements fall through */
-    switch(len) {
-	/* c is reserved for the length */
-    case 2 : b += arrayPtr[1];
-    case 1 : a += arrayPtr[0];
-	/* case 0: nothing left to add */
-    }
-    MIX32(a, b, c);
-    return (Blt_Hash)c;
-}
-#endif /* SIZEOF_VOID_P == 4 */
-
-#if (SIZEOF_VOID_P == 8)
-
-/* 
- *---------------------------------------------------------------------------
- *
- * MIX64 --
- *
- *	Bob Jenkins, January 4 1997, Public Domain.  You can use this free for
- *	any purpose.  It has no warranty.
- *
- *	Returns a 64-bit value.  Every bit of the key affects every bit of the
- *	return value.  No funnels.  Every 1-bit and 2-bit delta achieves
- *	avalanche.  About 41+5len instructions.
- *
- *	The best hash table sizes are powers of 2.  There is no need to do mod
- *	a prime (mod is sooo slow!).  If you need less than 64 bits, use a
- *	bitmask.  For example, if you need only 10 bits, do h = (h &
- *	hashmask(10)); In which case, the hash table should have hashsize(10)
- *	elements.
- *
- *	By Bob Jenkins, Jan 4 1997.  bob_jenkins at burtleburtle.net.  You may
- *	use this code any way you wish, private, educational, or commercial,
- *	as long as this whole comment accompanies it.
- * 
- *	See http://burtleburtle.net/bob/hash/evahash.html Use for hash table
- *	lookup, or anything where one collision in 2^^64 * is acceptable.  Do
- *	NOT use for cryptographic purposes.
- *
- *---------------------------------------------------------------------------
- */
-
-#define MIX64(a,b,c) \
-	a -= b, a -= c, a ^= (c >> 43), \
-	b -= c, b -= a, b ^= (a <<  9), \
-	c -= a, c -= b, c ^= (b >>  8), \
-	a -= b, a -= c, a ^= (c >> 38), \
-	b -= c, b -= a, b ^= (a << 23), \
-	c -= a, c -= b, c ^= (b >>  5), \
-	a -= b, a -= c, a ^= (c >> 35), \
-	b -= c, b -= a, b ^= (a << 49), \
-	c -= a, c -= b, c ^= (b >> 11), \
-	a -= b, a -= c, a ^= (c >> 12), \
-	b -= c, b -= a, b ^= (a << 18), \
-	c -= a, c -= b, c ^= (b >> 22)
-
-#define GOLDEN_RATIO64	0x9e3779b97f4a7c13LL
-
-/*
- *---------------------------------------------------------------------------
- *
- * HashArray --
- *
- *	Bob Jenkins, January 4 1997, Public Domain.  You can use this free for
- *	any purpose.  It has no warranty.
- *
- *	This works on all machines.  The length has to be measured in 64 bit
- *	words, instead of bytes.  It requires that
- *
- *	  o The key be an array of 64 bit words (unsigned longs).
- *	  o All your machines have the same endianness.
- *	  o The length be the number of 64 bit words in the key.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Hash
-HashArray(const void *key, size_t length)
-{
-    uint64_t a, b, c, len;
-    uint32_t *ip = (uint32_t *)key;
-
-#ifdef WORDS_BIGENDIAN
-#define PACK(a,b)	((uint64_t)(b) | ((uint64_t)(a) << 32))
-#else
-#define PACK(a,b)	((uint64_t)(a) | ((uint64_t)(b) << 32))
-#endif
-    /* Set up the internal state */
-    len = length;			/* Length is the number of 64-bit
-					 * words. */
-    a = b = GOLDEN_RATIO64;		/* An arbitrary value */
-    c = 0;				/* Previous hash value */
-
-    while (len >= 6) {			/* Handle most of the key */
-	a += PACK(ip[0], ip[1]);
-	b += PACK(ip[2], ip[3]);
-	c += PACK(ip[4], ip[5]);
-	MIX64(a,b,c);
-	ip += 6; len -= 6;
-    }
-    c += length;		
-    /* And now the last 2 words */
-    /* Note that all the case statements fall through */
-    switch(len) {
-	/* c is reserved for the length */
-    case 5 : 
-    case 4 : 
-	a += PACK(ip[0], ip[1]);
-	b += PACK(ip[2], ip[3]);
-	ip += 4; len -= 4;
-	break;
-    case 3 : 
-    case 2 : 
-	a += PACK(ip[0], ip[1]);
-	ip += 2; len -= 2;
- /* case 0: nothing left to add */
-    }
-    if (len > 0) {		
-	b += ip[0];
-    }
-    MIX64(a,b,c);
-    return (Blt_Hash)c;
-}
-#endif /* SIZEOF_VOID_P == 8 */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrayFind --
- *
- *	Given a hash table with array-of-int keys, and a key, find the entry
- *	with a matching key.
- *
- * Results:
- *	The return value is a token for the matching entry in the hash table,
- *	or NULL if there was no matching entry.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-ArrayFind(
-    Blt_HashTable *tablePtr,		/* Table in which to lookup entry. */
-    const void *key)			/* Key to use to find matching entry. */
-{
-    Blt_Hash hval;
-    Blt_HashEntry *hPtr;
-    size_t hindex;
-
-    hval = HashArray(key, tablePtr->keyType);
-    hindex = hval & tablePtr->mask;
-
-    /* Search all of the entries in the appropriate bucket. */
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL;
-	    hPtr = hPtr->nextPtr) {
-	if (hPtr->hval == hval) {
-	    uint32_t *ip1, *ip2;
-	    size_t count;
-
-	    for (ip1 = (uint32_t *)key, ip2 = (uint32_t *)hPtr->key.words,
-		     count = tablePtr->keyType; ; count--, ip1++, ip2++) {
-		if (count == 0) {
-		    return hPtr;
-		}
-		if (*ip1 != *ip2) {
-		    break;
-		}
-	    }
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrayCreate --
- *
- *	Given a hash table with one-word keys, and a one-word key, find the
- *	entry with a matching key.  If there is no matching entry, then create a
- *	new entry that does match.
- *
- * Results:
- *	The return value is a pointer to the matching entry.  If this is a
- *	newly-created entry, then *isNewPtr will be set to a non-zero value;
- *	otherwise *isNewPtr will be set to 0.  If this is a new entry the value
- *	stored in the entry will initially be 0.
- *
- * Side effects:
- *	A new entry may be added to the hash table.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_HashEntry *
-ArrayCreate(
-    Blt_HashTable *tablePtr,		/* Table in which to lookup entry. */
-    const void *key,			/* Key to use to find or create
-					 * matching entry. */
-    int *isNewPtr)			/* Store info here telling whether a
-					 * new entry was created. */
-{
-    Blt_Hash hval;
-    Blt_HashEntry **bucketPtr;
-    size_t count;
-    Blt_HashEntry *hPtr;
-    uint32_t *ip1, *ip2;
-    size_t size, hindex;
-
-    hval = HashArray(key, tablePtr->keyType);
-    hindex = hval & tablePtr->mask;
-
-    /* Search all of the entries in the appropriate bucket. */
-
-    for (hPtr = tablePtr->buckets[hindex]; hPtr != NULL;
-	    hPtr = hPtr->nextPtr) {
-	if (hPtr->hval == hval) {
-	    for (ip1 = (uint32_t *)key, ip2 = (uint32_t *)hPtr->key.words,
-		     count = tablePtr->keyType; ; count--, ip1++, ip2++) {
-		if (count == 0) {
-		    *isNewPtr = FALSE;
-		    return hPtr;
-		}
-		if (*ip1 != *ip2) {
-		    break;
-		}
-	    }
-	}
-    }
-
-    /* Entry not found.  Add a new one to the bucket. */
-
-    *isNewPtr = TRUE;
-    /* We assume here that the size of the key is at least 2 words */
-    size = sizeof(Blt_HashEntry) + tablePtr->keyType * sizeof(uint32_t) - 
-	sizeof(Blt_HashKey);
-    if (tablePtr->hPool != NULL) {
-	hPtr = Blt_PoolAllocItem(tablePtr->hPool, size);
-    } else {
-	hPtr = Blt_AssertMalloc(size);
-    }
-    bucketPtr = tablePtr->buckets + hindex;
-    hPtr->nextPtr = *bucketPtr;
-    hPtr->hval = hval;
-    hPtr->clientData = 0;
-    count = tablePtr->keyType;
-    for (ip1 = (uint32_t *)key, ip2 = (uint32_t *)hPtr->key.words; 
-	 count > 0; count--, ip1++, ip2++) {
-	*ip2 = *ip1;
-    }
-    *bucketPtr = hPtr;
-    tablePtr->numEntries++;
-
-    /*
-     * If the table has exceeded a decent size, rebuild it with many more
-     * buckets.
-     */
-    if (tablePtr->numEntries >= tablePtr->rebuildSize) {
-	RebuildTable(tablePtr);
-    }
-    return hPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BogusFind --
- *
- *	This procedure is invoked when an Blt_FindHashEntry is called on a
- *	table that has been deleted.
- *
- * Results:
- *	If panic returns (which it shouldn't) this procedure returns NULL.
- *
- * Side effects:
- *	Generates a panic.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static Blt_HashEntry *
-BogusFind(
-    Blt_HashTable *tablePtr,		/* Not used. */
-    const void *key)			/* Not used.*/
-{
-    Blt_Panic("called Blt_FindHashEntry on deleted table");
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BogusCreate --
- *
- *	This procedure is invoked when an Blt_CreateHashEntry is called on a
- *	table that has been deleted.
- *
- * Results:
- *	If panic returns (which it shouldn't) this procedure returns NULL.
- *
- * Side effects:
- *	Generates a panic.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static Blt_HashEntry *
-BogusCreate(
-    Blt_HashTable *tablePtr,		/* Not used. */
-    const void *key,			/* Not used. */
-    int *isNewPtr)			/* Not used. */
-{
-    Blt_Panic("called Blt_CreateHashEntry on deleted table");
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RebuildTable --
- *
- *	This procedure is invoked when the ratio of entries to hash buckets
- *	becomes too large.  It creates a new table with a larger bucket array
- *	and moves all of the entries into the new table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory gets reallocated and entries get re-hashed to new buckets.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RebuildTable(Blt_HashTable *tablePtr)	/* Table to enlarge. */
-{
-    Blt_HashEntry **oldBuckets;
-    int oldNumBuckets;
-
-    oldBuckets = tablePtr->buckets;
-    oldNumBuckets = tablePtr->numBuckets;
-    /*
-     * Allocate and initialize the new bucket array, and set up hashing
-     * constants for new array size.
-     */
-    tablePtr->numBuckets <<= 2;
-    tablePtr->buckets = Blt_AssertCalloc(tablePtr->numBuckets, 
-		sizeof(Blt_HashEntry *));
-    tablePtr->rebuildSize <<= 2;
-    tablePtr->downShift -= 2;
-    tablePtr->mask = tablePtr->numBuckets - 1;
-
-    /*
-     * Move all of the existing entries into the new bucket array, based on
-     * their hash values.
-     */
-    if (tablePtr->keyType == BLT_ONE_WORD_KEYS) {
-	Blt_HashEntry **hpp, **hend;
-
-	/* 
-	 * BLT_ONE_WORD_KEYS are handled slightly differently because they use
-	 * the current table size (number of buckets) to distribute the entries.
-	 */
-	for (hpp = oldBuckets, hend = hpp + oldNumBuckets; hpp < hend; hpp++) {
-	    Blt_HashEntry *hPtr, *nextPtr;
-
-	    for (hPtr = *hpp; hPtr != NULL; hPtr = nextPtr) {
-		Blt_HashEntry **bucketPtr;
-		size_t hindex;
-
-		nextPtr = hPtr->nextPtr;
-		hindex = RANDOM_INDEX(tablePtr, hPtr->key.oneWordValue);
-		bucketPtr = tablePtr->buckets + hindex;
-		hPtr->nextPtr = *bucketPtr;
-		*bucketPtr = hPtr;
-	    }
-	}
-    } else {
-	Blt_HashEntry **hpp, **hend;
-
-	for (hpp = oldBuckets, hend = hpp + oldNumBuckets; hpp < hend; hpp++) {
-	    Blt_HashEntry *hPtr, *nextPtr;
-
-	    for (hPtr = *hpp; hPtr != NULL; hPtr = nextPtr) {
-		Blt_HashEntry **bucketPtr;
-		size_t hindex;
-
-		nextPtr = hPtr->nextPtr;
-		hindex = hPtr->hval & tablePtr->mask;
-		bucketPtr = tablePtr->buckets + hindex;
-		hPtr->nextPtr = *bucketPtr;
-		*bucketPtr = hPtr;
-	    }
-	}
-    }
-
-    /*
-     * Free up the old bucket array, if it was dynamically allocated.
-     */
-    if (oldBuckets != tablePtr->staticBuckets) {
-	Blt_Free(oldBuckets);
-    }
-}
-
-
-/* Public hash table routines */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitHashTable --
- *
- *	Given storage for a hash table, set up the fields to prepare the hash
- *	table for use.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	TablePtr is now ready to be passed to Blt_FindHashEntry and
- *	Blt_CreateHashEntry.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_InitHashTable(Blt_HashTable *tablePtr, size_t keyType)
-{
-#if (BLT_SMALL_HASH_TABLE != 4) 
-    Blt_Panic("Blt_InitHashTable: BLT_SMALL_HASH_TABLE is %d, not 4\n",
-	    BLT_SMALL_HASH_TABLE);
-#endif
-    tablePtr->buckets = tablePtr->staticBuckets;
-    tablePtr->numBuckets = BLT_SMALL_HASH_TABLE;
-    tablePtr->staticBuckets[0] = tablePtr->staticBuckets[1] = 0;
-    tablePtr->staticBuckets[2] = tablePtr->staticBuckets[3] = 0;
-    tablePtr->numEntries = 0;
-    tablePtr->rebuildSize = BLT_SMALL_HASH_TABLE * REBUILD_MULTIPLIER;
-    tablePtr->downShift = DOWNSHIFT_START;
-
-    /* The number of buckets is always a power of 2, so we can generate the mask
-     * by simply subtracting 1 from the number of buckets. */
-    tablePtr->mask = (Blt_Hash)(tablePtr->numBuckets - 1);
-    tablePtr->keyType = keyType;
-
-    switch (keyType) {
-    case BLT_STRING_KEYS:		/* NUL terminated string keys. */
-	tablePtr->findProc = StringFind;
-	tablePtr->createProc = StringCreate;
-	break;
-
-    case BLT_ONE_WORD_KEYS:		/* 32 or 64-bit atomic keys. */
-	tablePtr->findProc = OneWordFind;
-	tablePtr->createProc = OneWordCreate;
-	break;
-
-    default:				/* Structures/arrays. */
-	if (keyType == 0) {
-	    Blt_Panic("Blt_InitHashTable: Key size can't be %d, must be > 0\n",
-		  keyType);
-	}
-	tablePtr->findProc = ArrayFind;
-	tablePtr->createProc = ArrayCreate;
-	break;
-    }
-    tablePtr->hPool = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitHashTableWithPool --
- *
- *	Given storage for a hash table, set up the fields to prepare the hash
- *	table for use.  The only difference between this routine and
- *	Blt_InitHashTable is that is uses a pool allocator to allocate memory
- *	for hash table entries.  The type of pool is either fixed or variable
- *	size (string) keys.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	TablePtr is now ready to be passed to Blt_FindHashEntry and
- *	Blt_CreateHashEntry.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_InitHashTableWithPool(Blt_HashTable *tablePtr, size_t keyType)
-{
-    Blt_InitHashTable(tablePtr, keyType);
-    if (keyType == BLT_STRING_KEYS) {
-	tablePtr->hPool = Blt_PoolCreate(BLT_VARIABLE_SIZE_ITEMS);
-    } else {
-	tablePtr->hPool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DeleteHashEntry --
- *
- *	Remove a single entry from a hash table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The entry given by entryPtr is deleted from its table and should never
- *	again be used by the caller.  It is up to the caller to free the
- *	clientData field of the entry, if that is relevant.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DeleteHashEntry(Blt_HashTable *tablePtr, Blt_HashEntry *entryPtr)
-{
-    Blt_HashEntry **bucketPtr;
-    size_t hindex;
-
-    if (tablePtr->keyType == BLT_ONE_WORD_KEYS) {
-	hindex = RANDOM_INDEX(tablePtr, (const void *)entryPtr->hval);
-    } else {
-	hindex = (entryPtr->hval & tablePtr->mask);
-    }	
-    bucketPtr = tablePtr->buckets + hindex;
-    if (*bucketPtr == entryPtr) {
-	*bucketPtr = entryPtr->nextPtr;
-    } else {
-	Blt_HashEntry *prevPtr;
-
-	for (prevPtr = *bucketPtr; /*empty*/; prevPtr = prevPtr->nextPtr) {
-	    if (prevPtr == NULL) {
-		Blt_Panic("malformed bucket chain in Blt_DeleteHashEntry");
-	    }
-	    if (prevPtr->nextPtr == entryPtr) {
-		prevPtr->nextPtr = entryPtr->nextPtr;
-		break;
-	    }
-	}
-    }
-    tablePtr->numEntries--;
-    if (tablePtr->hPool != NULL) {
-	Blt_PoolFreeItem(tablePtr->hPool, entryPtr);
-    } else {
-	Blt_Free(entryPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DeleteHashTable --
- *
- *	Free up everything associated with a hash table except for the record
- *	for the table itself.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The hash table is no longer useable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DeleteHashTable(Blt_HashTable *tablePtr)	/* Table to delete. */
-{
-    /* Free up all the entries in the table. */
-    if (tablePtr->hPool != NULL) {
-	Blt_PoolDestroy(tablePtr->hPool);
-	tablePtr->hPool = NULL;
-    } else {
-	size_t i;
-
-	for (i = 0; i < tablePtr->numBuckets; i++) {
-	    Blt_HashEntry *hPtr;
-
-	    hPtr = tablePtr->buckets[i];
-	    while (hPtr != NULL) {
-		Blt_HashEntry *nextPtr;
-
-		nextPtr = hPtr->nextPtr;
-		Blt_Free(hPtr);
-		hPtr = nextPtr;
-	    }
-	}
-    }
-    
-    /* Free up the bucket array, if it was dynamically allocated. */
-    if (tablePtr->buckets != tablePtr->staticBuckets) {
-	Blt_Free(tablePtr->buckets);
-    }
-
-    /*
-     * Arrange for panics if the table is used again without re-initialization.
-     */
-    tablePtr->findProc = BogusFind;
-    tablePtr->createProc = BogusCreate;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FirstHashEntry --
- *
- *	Locate the first entry in a hash table and set up a record that can be
- *	used to step through all the remaining entries of the table.
- *
- * Results:
- *	The return value is a pointer to the first entry in tablePtr, or NULL
- *	if tablePtr has no entries in it.  The memory at *searchPtr is
- *	initialized so that subsequent calls to Blt_NextHashEntry will return
- *	all of the entries in the table, one at a time.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-Blt_HashEntry *
-Blt_FirstHashEntry(
-    Blt_HashTable *tablePtr,		/* Table to search. */
-    Blt_HashSearch *searchPtr)		/* Place to store information about
-					 * progress through the table. */
-{
-    searchPtr->tablePtr = tablePtr;
-    searchPtr->nextIndex = 0;
-    searchPtr->nextEntryPtr = NULL;
-    return Blt_NextHashEntry(searchPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NextHashEntry --
- *
- *	Once a hash table enumeration has been initiated by calling
- *	Blt_FirstHashEntry, this procedure may be called to return successive
- *	elements of the table.
- *
- * Results:
- *	The return value is the next entry in the hash table being enumerated,
- *	or NULL if the end of the table is reached.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-Blt_HashEntry *
-Blt_NextHashEntry(Blt_HashSearch *searchPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    while (searchPtr->nextEntryPtr == NULL) {
-	if (searchPtr->nextIndex >= searchPtr->tablePtr->numBuckets) {
-	    return NULL;
-	}
-	searchPtr->nextEntryPtr =
-		searchPtr->tablePtr->buckets[searchPtr->nextIndex];
-	searchPtr->nextIndex++;
-    }
-    hPtr = searchPtr->nextEntryPtr;
-    searchPtr->nextEntryPtr = hPtr->nextPtr;
-    return hPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_HashStats --
- *
- *	Return statistics describing the layout of the hash table in its hash
- *	buckets.
- *
- * Results:
- *	The return value is a malloc-ed string containing information about
- *	tablePtr.  It is the caller's responsibility to free this string.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_HashStats(Blt_HashTable *tablePtr) /* Table for which to produce stats. */
-{
-    Blt_HashEntry **bp, **bend;
-    char *result, *p;
-    double average, tmp;
-#define NUM_COUNTERS 10
-    size_t count[NUM_COUNTERS], overflow, i, max;
-
-    /* Compute a histogram of bucket usage. */
-    for (i = 0; i < NUM_COUNTERS; i++) {
-	count[i] = 0;
-    }
-    overflow = 0;
-    average = 0.0;
-    max = 0;
-
-    for (bp = tablePtr->buckets, bend = bp + tablePtr->numBuckets; bp < bend; 
-	 bp++) {
-	Blt_HashEntry *hPtr;
-	size_t j;
-
-	j = 0;
-	for (hPtr = *bp; hPtr != NULL; hPtr = hPtr->nextPtr) {
-	    j++;
-	}
-	if (j > max) {
-	    max = j;
-	}
-	if (j < NUM_COUNTERS) {
-	    count[j]++;
-	} else {
-	    overflow++;
-	}
-	tmp = j;
-	average += (tmp+1.0)*(tmp/tablePtr->numEntries)/2.0;
-    }
-
-    /* Print out the histogram and a few other pieces of information. */
-    result = Blt_AssertMalloc((unsigned) ((NUM_COUNTERS*60) + 300));
-    sprintf(result, "%lu entries in table, %lu buckets\n",
-	    (unsigned long)tablePtr->numEntries, 
-	    (unsigned long)tablePtr->numBuckets);
-    p = result + strlen(result);
-    for (i = 0; i < NUM_COUNTERS; i++) {
-	sprintf(p, "number of buckets with %lu entries: %lu\n",
-		(unsigned long)i, (unsigned long)count[i]);
-	p += strlen(p);
-    }
-    sprintf(p, "number of buckets with %d or more entries: %lu\n",
-	    NUM_COUNTERS, (unsigned long)overflow);
-    p += strlen(p);
-    sprintf(p, "average search distance for entry: %.2f\n", average);
-    p += strlen(p);
-    sprintf(p, "maximum search distance for entry: %lu", (unsigned long)max);
-    return result;
-}
diff --git a/blt3.0/src/bltHash.h.in b/blt3.0/src/bltHash.h.in
deleted file mode 100644
index 67a567b..0000000
--- a/blt3.0/src/bltHash.h.in
+++ /dev/null
@@ -1,212 +0,0 @@
-
-/* 
- * bltHash.h --
- *
- *	Copyright 2000-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The hash table data structures are based upon the ones in the public header
- * file tcl.h in the Tcl library distribution.
- *
- *	Copyright (c) 1991-1993 The Regents of the University of California.
- *
- *	Copyright (c) 1994 Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#ifndef BLT_HASH_H
-#  define BLT_HASH_H 1
-
-#  ifndef BLT_INT_H
-#    ifndef SIZEOF_LONG
-#      define SIZEOF_LONG @SIZEOF_LONG@
-#    endif
-#  ifndef SIZEOF_LONG_LONG
-#    define SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
-#  endif
-#  ifndef SIZEOF_INT
-#    define SIZEOF_INT @SIZEOF_INT@
-#  endif
-#  ifndef SIZEOF_VOID_P
-#    define SIZEOF_VOID_P @SIZEOF_VOID_P@
-#  endif
-#endif /* !BLT_INT_H */
-
-#ifdef HAVE_INTTYPES_H
-#  include <inttypes.h>
-#else
-#  if (SIZEOF_VOID_P == 8)
-#    if (SIZEOF_LONG == 8)
-typedef signed long int64_t;
-typedef unsigned long uint64_t;
-#    else
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#    endif /* SIZEOF_LONG == 8 */
-#  else
-#    ifndef __CYGWIN__
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-#    endif /* __CYGWIN__ */
-#  endif /* SIZEOF_VOID_P == 8 */
-#endif /* HAVE_INTTYPES_H */
-
-#if (SIZEOF_VOID_P == 8) 
-typedef uint64_t Blt_Hash;
-#else
-typedef uint32_t Blt_Hash;
-#endif /* SIZEOF_VOID_P == 8 */
-
-#include "bltPool.h"
-
-/*
- * Acceptable key types for hash tables:
- */
-#ifndef BLT_STRING_KEYS
-#  define BLT_STRING_KEYS		0L
-#endif
-#ifndef BLT_ONE_WORD_KEYS
-#  define BLT_ONE_WORD_KEYS	((size_t)-1L)
-#endif
-/*
- * Forward declaration of Blt_HashTable.  Needed by some C++ compilers to
- * prevent errors when the forward reference to Blt_HashTable is encountered
- * in the Blt_HashEntry structure.
- */
-
-#ifdef __cplusplus
-struct Blt_HashTable;
-#endif
-
-typedef union {			/* Key has one of these forms: */
-    void *oneWordValue;		/* One-word value for key. */
-    unsigned long words[1];	/* Multiple integer words for key.  The actual
-				 * size will be as large as necessary for this
-				 * table's keys. */
-    char string[4];		/* String for key.  The actual size will be as
-				 * large as needed to hold the key. */
-} Blt_HashKey;
-
-/*
- * Structure definition for an entry in a hash table.  No one outside BLT
- * should access any of these fields directly; use the macros defined below.
- */
-typedef struct Blt_HashEntry {
-    struct Blt_HashEntry *nextPtr; /* Pointer to next entry in this hash
-				    * bucket, or NULL for end of chain.*/
-    Blt_Hash hval;
-
-    ClientData clientData;	/* Application stores something here with
-				 * Blt_SetHashValue. */
-    Blt_HashKey key;		/* MUST BE LAST FIELD IN RECORD!! */
-} Blt_HashEntry;
-
-/*
- * Structure definition for a hash table.  Must be in blt.h so clients can
- * allocate space for these structures, but clients should never access any
- * fields in this structure.
- */
-#define BLT_SMALL_HASH_TABLE 4
-typedef struct Blt_HashTable {
-    Blt_HashEntry **buckets;	/* Pointer to bucket array.  Each element
-				 * points to first entry in bucket's hash
-				 * chain, or NULL. */
-    Blt_HashEntry *staticBuckets[BLT_SMALL_HASH_TABLE];
-				/* Bucket array used for small tables (to
-				 * avoid mallocs and frees). */
-    size_t numBuckets;		/* Total number of buckets allocated at
-				 * buckets. */
-    size_t numEntries;		/* Total # of entries present in table. */
-    size_t rebuildSize;		/* Enlarge table when numEntries gets to be
-				 * this large. */
-    Blt_Hash mask;		/* Mask value used in hashing function. */	
-    unsigned int downShift;	/* Shift count used in hashing function.
-				 * Designed to use high- order bits of
-				 * randomized keys. */
-    size_t keyType;		/* Type of keys used in this table.  It's
-				 * either BLT_STRING_KEYS, BLT_ONE_WORD_KEYS,
-				 * or an integer giving the number of ints
-				 * that is the size of the key. */
-    Blt_HashEntry *(*findProc) _ANSI_ARGS_((struct Blt_HashTable *tablePtr,
-	    CONST void *key));
-    Blt_HashEntry *(*createProc) _ANSI_ARGS_((struct Blt_HashTable *tablePtr,
-	    CONST void *key, int *newPtr));
-
-    Blt_Pool hPool;		/* Pointer to the pool allocator used for
-				 * entries in this hash table. If NULL, the
-				 * standard Tcl_Alloc, Tcl_Free routines will
-				 * be used instead. */
-} Blt_HashTable;
-
-/*
- * Structure definition for information used to keep track of searches through
- * hash tables:
- */
-
-typedef struct {
-    Blt_HashTable *tablePtr;	/* Table being searched. */
-    unsigned long nextIndex;	/* Index of next bucket to be enumerated after
-				 * present one. */
-    Blt_HashEntry *nextEntryPtr; /* Next entry to be enumerated in the current
-				  * bucket. */
-} Blt_HashSearch;
-
-/*
- * Macros for clients to use to access fields of hash entries:
- */
-
-#define Blt_GetHashValue(h) ((h)->clientData)
-#define Blt_SetHashValue(h, value) ((h)->clientData = (ClientData)(value))
-#define Blt_GetHashKey(tablePtr, h) \
-    ((void *) (((tablePtr)->keyType == BLT_ONE_WORD_KEYS) ? \
-     (void *)(h)->key.oneWordValue : (h)->key.string))
-
-/*
- * Macros to use for clients to use to invoke find and create procedures for
- * hash tables:
- */
-#define Blt_FindHashEntry(tablePtr, key) \
-	(*((tablePtr)->findProc))(tablePtr, key)
-#define Blt_CreateHashEntry(tablePtr, key, newPtr) \
-	(*((tablePtr)->createProc))(tablePtr, key, newPtr)
-
-BLT_EXTERN void Blt_InitHashTable _ANSI_ARGS_((Blt_HashTable *tablePtr, 
-	size_t keyType));
-
-BLT_EXTERN void Blt_InitHashTableWithPool _ANSI_ARGS_((Blt_HashTable *tablePtr, 
-	size_t keyType));
-
-BLT_EXTERN void Blt_DeleteHashTable _ANSI_ARGS_((Blt_HashTable *tablePtr));
-
-BLT_EXTERN void Blt_DeleteHashEntry _ANSI_ARGS_((Blt_HashTable *tablePtr,
-	Blt_HashEntry *entryPtr));
-
-BLT_EXTERN Blt_HashEntry *Blt_FirstHashEntry _ANSI_ARGS_((
-	Blt_HashTable *tablePtr, Blt_HashSearch *searchPtr));
-
-BLT_EXTERN Blt_HashEntry *Blt_NextHashEntry _ANSI_ARGS_((
-	Blt_HashSearch *srchPtr));
-
-BLT_EXTERN const char *Blt_HashStats _ANSI_ARGS_((Blt_HashTable *tablePtr));
-
-#endif /* BLT_HASH_H */
diff --git a/blt3.0/src/bltHtext.c b/blt3.0/src/bltHtext.c
deleted file mode 100644
index d7bf982..0000000
--- a/blt3.0/src/bltHtext.c
+++ /dev/null
@@ -1,4451 +0,0 @@
-/*
- * bltHtext.c --
- *
- * This module implements a hypertext widget for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * To do:
- *
- * 1) Fix scroll unit round off errors.
- *
- * 2) Better error checking.
- *
- * 3) Use html format.
- *
- * 4) The dimension of cavities using -relwidth and -relheight
- *    should be 0 when computing initial estimates for the size
- *    of the virtual text.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_HTEXT
-#include "bltOp.h"
-#include <bltChain.h>
-#include <bltHash.h>
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltBgStyle.h"
- 
-#include <sys/stat.h>
-#include <X11/Xatom.h>
-
-#define DEF_LINES_ALLOC 512	/* Default block of lines allocated */
-#define CLAMP(val,low,hi)	\
-	(((val) < (low)) ? (low) : ((val) > (hi)) ? (hi) : (val))
-
-/*
- * Justify option values
- */
-typedef enum {
-    JUSTIFY_CENTER, JUSTIFY_TOP, JUSTIFY_BOTTOM
-} Justify;
-
-static Blt_OptionParseProc ObjToWidth, ObjToHeight;
-static Blt_OptionPrintProc WidthHeightToObj;
-static Blt_CustomOption widthOption =
-{
-    ObjToWidth, WidthHeightToObj, NULL, (ClientData)0
-};
-
-static Blt_CustomOption heightOption =
-{
-    ObjToHeight, WidthHeightToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToJustify;
-static Blt_OptionPrintProc JustifyToObj;
-static Blt_CustomOption justifyOption =
-{
-    ObjToJustify, JustifyToObj, NULL, (ClientData)0
-};
-
-static Tk_GeomRequestProc EmbeddedWidgetGeometryProc;
-static Tk_GeomLostSlaveProc EmbeddedWidgetCustodyProc;
-static Tk_GeomMgr htextMgrInfo =
-{
-    (char *)"htext",			/* Name of geometry manager used by
-					 * winfo */
-    EmbeddedWidgetGeometryProc,		/* Procedure to for new geometry
-					 * requests */
-    EmbeddedWidgetCustodyProc,		/* Procedure when window is taken
-					 * away */
-};
-
-
-/*
- * Line --
- *
- *	Structure to contain the contents of a single line of text and the
- *	widgets on that line.
- *
- * 	Individual lines are not configurable, although changes to the size of
- * 	widgets do effect its values.
- */
-typedef struct {
-    int offset;				/* Offset of line from y-origin (0) in
-					 * world coordinates */
-    int baseline;			/* Baseline y-coordinate of the
-					 * text */
-    short int width, height;		/* Dimensions of the line */
-    int textStart, textEnd;		/* Start and end indices of characters
-					 * forming the line in the text array */
-    Blt_Chain chain;			/* Chain of embedded widgets on the
-					 * line of text */
-} Line;
-
-typedef struct {
-    int textStart;
-    int textEnd;
-} Segment;
-
-typedef struct {
-    int x, y;
-} Position;
-
-/*
- * Hypertext widget.
- */
-typedef struct {
-    Tk_Window tkwin;			/* Window that embodies the widget.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up.*/
-    Display *display;			/* Display containing widget; needed,
-					 * among other things, to release
-					 * resources after tkwin has already
-					 * gone away. */
-    Tcl_Interp *interp;			/* Interpreter associated with
-					 * widget. */
-    Tcl_Command cmdToken;	       /* Token for htext's widget command. */
-    int flags;
-
-    /* User-configurable fields */
-
-    XColor *normalFg;
-    Blt_Background normalBg;
-    Blt_Font font;			/* Font for normal text. May affect
-					 * the size of the viewport if the
-					 * width/height is specified in
-					 * columns/rows */
-    GC drawGC;				/* Graphics context for normal text */
-    int tileOffsetPage;			/* Set tile offset to top of page
-					 * instead of toplevel window */
-    GC fillGC;				/* GC for clearing the window in the
-					 * designated background color. The
-					 * background color is the foreground
-					 * attribute in GC.  */
-
-    int nRows, nColumns;		/* # of characters of the current font
-					 * for a row or column of the viewport.
-					 * Used to determine the width and height
-					 * of the text window (i.e. viewport) */
-    int reqWidth, reqHeight;		/* Requested dimensions of the
-					 * viewport */
-    int maxWidth, maxHeight;		/* Maximum dimensions allowed for the
-					 * viewport, regardless of the size of
-					 * the text */
-
-    Tk_Cursor cursor;			/* X Cursor */
-
-    char *fileName;		       /* If non-NULL, indicates the name of a
-					* hypertext file to be read into the
-					* widget. If NULL, the *text* field is
-					* considered instead */
-    char *text;				/* Hypertext to be loaded into the
-					 * widget. This value is ignored if
-					 * *fileName* * is non-NULL */
-    int specChar;			/* Special character designating a TCL
-					 * command block in a hypertext
-					 * file. */
-    int leader;				/* # of pixels between lines */
-
-    Tcl_Obj *yScrollCmdObjPtr;		/* Name of vertical scrollbar to invoke */
-    int yScrollUnits;			/* # of pixels per vertical scroll */
-    Tcl_Obj *xScrollCmdObjPtr;		/* Name of horizontal scroll bar to invoke */
-    int xScrollUnits;			/* # of pixels per horizontal
-					   # scroll */
-
-    int reqLineNum;			/* Line requested by "goto" command */
-
-    /*
-     * The view port is the width and height of the window and the
-     * origin of the viewport (upper left corner) in world coordinates.
-     */
-    int worldWidth, worldHeight;/* Size of view text in world coordinates */
-    int xOffset, yOffset;	/* Position of viewport in world coordinates */
-
-    int pendingX, pendingY;	/* New upper-left corner (origin) of
-				 * the viewport (not yet posted) */
-
-    int first, last;		/* Range of lines displayed */
-
-    int lastWidth, lastHeight;
-    /* Last known size of the window: saved to
-				 * recognize when the viewport is resized. */
-
-    Blt_HashTable widgetTable;	/* Table of embedded widgets. */
-
-    /*
-     * Selection display information:
-     */
-    Blt_Background selBg;	/* Border and background color */
-    int selBW;		/* Border width */
-    XColor *selFgColor;		/* Text foreground color */
-    GC selectGC;		/* GC for drawing selected text */
-    int selAnchor;		/* Fixed end of selection
-			         * (i.e. "selection to" operation will
-			         * use this as one end of the selection).*/
-    int selFirst;		/* The index of first character in the
-				 * text array selected */
-    int selLast;		/* The index of the last character selected */
-    int exportSelection;	/* Non-zero means to export the internal text
-				 * selection to the X server. */
-    char *takeFocus;
-
-    /*
-     * Scanning information:
-     */
-    XPoint scanMark;		/* Anchor position of scan */
-    XPoint scanPt;		/* x,y position where the scan started. */
-
-    char *charArr;		/* Pool of characters representing the text
-				 * to be displayed */
-    int nChars;			/* Length of the text pool */
-
-    Line *lineArr;		/* Array of pointers to text lines */
-    int nLines;			/* # of line entered into array. */
-    int arraySize;		/* Size of array allocated. */
-
-} HText;
-
-/*
- * Bit flags for the hypertext widget:
- */
-#define REDRAW_PENDING	 (1<<0)	/* A DoWhenIdle handler has already
-				 * been queued to redraw the window */
-#define IGNORE_EXPOSURES (1<<1)	/* Ignore exposure events in the text
-				 * window.  Potentially many expose
-				 * events can occur while rearranging
-				 * embedded widgets during a single call to
-				 * the DisplayText.  */
-
-#define REQUEST_LAYOUT 	(1<<4)	/* Something has happened which
-				 * requires the layout of text and
-				 * embedded widget positions to be
-				 * recalculated.  The following
-				 * actions may cause this:
-				 *
-				 * 1) the contents of the hypertext
-				 *    has changed by either the -file or
-				 *    -text options.
-				 *
-				 * 2) a text attribute has changed
-				 *    (line spacing, font, etc)
-				 *
-				 * 3) a embedded widget has been resized or
-				 *    moved.
-				 *
-				 * 4) a widget configuration option has
-				 *    changed.
-				 */
-#define TEXT_DIRTY 	(1<<5)	/* The layout was recalculated and the
-				 * size of the world (text layout) has
-				 * changed. */
-#define GOTO_PENDING 	(1<<6)	/* Indicates the starting text line
-				 * number has changed. To be reflected
-				 * the next time the widget is redrawn. */
-#define WIDGET_APPENDED	(1<<7)	/* Indicates a embedded widget has just
-				 * been appended to the text.  This is
-				 * used to determine when to add a
-				 * space to the text array */
-
-#define DEF_HTEXT_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_HTEXT_CURSOR		"arrow"
-#define DEF_HTEXT_EXPORT_SELECTION	"1"
-
-#define DEF_HTEXT_FOREGROUND		STD_NORMAL_FOREGROUND
-#define DEF_HTEXT_FILE_NAME		(char *)NULL
-#define DEF_HTEXT_FONT			STD_FONT
-#define DEF_HTEXT_HEIGHT		"0"
-#define DEF_HTEXT_LINE_SPACING		"1"
-#define DEF_HTEXT_MAX_HEIGHT		(char *)NULL
-#define DEF_HTEXT_MAX_WIDTH 		(char *)NULL
-#define DEF_HTEXT_SCROLL_UNITS		"10"
-#define DEF_HTEXT_SPEC_CHAR		"0x25"
-#define DEF_HTEXT_SELECT_BORDERWIDTH 	STD_SELECT_BORDERWIDTH
-#define DEF_HTEXT_SELECT_BACKGROUND 	STD_SELECT_BACKGROUND
-#define DEF_HTEXT_SELECT_FOREGROUND 	STD_SELECT_FOREGROUND
-#define DEF_HTEXT_TAKE_FOCUS		"1"
-#define DEF_HTEXT_TEXT			(char *)NULL
-#define DEF_HTEXT_TILE_OFFSET		"1"
-#define DEF_HTEXT_WIDTH			"0"
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_HTEXT_BACKGROUND, Blt_Offset(HText, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_HTEXT_CURSOR, Blt_Offset(HText, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-exportselection", "exportSelection", "ExportSelection",
-	DEF_HTEXT_EXPORT_SELECTION, Blt_Offset(HText, exportSelection), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_STRING, "-file", "file", "File",
-	DEF_HTEXT_FILE_NAME, Blt_Offset(HText, fileName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FONT, "-font", "font", "Font",
-	DEF_HTEXT_FONT, Blt_Offset(HText, font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_HTEXT_FOREGROUND, Blt_Offset(HText, normalFg), 0},
-    {BLT_CONFIG_CUSTOM, "-height", "height", "Height", DEF_HTEXT_HEIGHT, 
-	Blt_Offset(HText, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&heightOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-linespacing", "lineSpacing", "LineSpacing", 
-	DEF_HTEXT_LINE_SPACING, Blt_Offset(HText, leader),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-maxheight", "maxHeight", "MaxHeight",
-	DEF_HTEXT_MAX_HEIGHT, Blt_Offset(HText, maxHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-maxwidth", "maxWidth", "MaxWidth",
-	DEF_HTEXT_MAX_WIDTH, Blt_Offset(HText, maxWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BORDER, "-selectbackground", "selectBackground", "Background",
-	DEF_HTEXT_SELECT_BACKGROUND, Blt_Offset(HText, selBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", 
-	"BorderWidth", DEF_HTEXT_SELECT_BORDERWIDTH, 
-	Blt_Offset(HText, selBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-	DEF_HTEXT_SELECT_FOREGROUND, Blt_Offset(HText, selFgColor), 0},
-    {BLT_CONFIG_INT, "-specialchar", "specialChar", "SpecialChar",
-	DEF_HTEXT_SPEC_CHAR, Blt_Offset(HText, specChar), 0},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_HTEXT_TAKE_FOCUS, Blt_Offset(HText, takeFocus),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-tileoffset", "tileOffset", "TileOffset",
-	DEF_HTEXT_TILE_OFFSET, Blt_Offset(HText, tileOffsetPage), 0},
-    {BLT_CONFIG_STRING, "-text", "text", "Text",
-	DEF_HTEXT_TEXT, Blt_Offset(HText, text), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-width", "width", "Width", DEF_HTEXT_WIDTH, 
-	Blt_Offset(HText, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT, &widthOption},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(HText, xScrollCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-xscrollunits", "xScrollUnits", "ScrollUnits",
-	DEF_HTEXT_SCROLL_UNITS, Blt_Offset(HText, xScrollUnits),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(HText, yScrollCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-yscrollunits", "yScrollUnits", "yScrollUnits",
-	DEF_HTEXT_SCROLL_UNITS, Blt_Offset(HText, yScrollUnits),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-typedef struct {
-    HText *htPtr;		/* Pointer to parent's Htext structure */
-    Tk_Window tkwin;		/* Widget window */
-    int flags;
-
-    int x, y;			/* Origin of embedded widget in text */
-
-    int cavityWidth, cavityHeight; /* Dimensions of the cavity
-				    * surrounding the embedded widget */
-    /*
-     *  Dimensions of the embedded widget.  Compared against actual
-     *	embedded widget sizes when checking for resizing.
-     */
-    int winWidth, winHeight;
-
-    int precedingTextEnd;	/* Index (in charArr) of the the last
-				 * character immediatedly preceding
-				 * the embedded widget */
-    int precedingTextWidth;	/* Width of normal text preceding widget. */
-
-    Tk_Anchor anchor;
-    Justify justify;		/* Justification of region wrt to line */
-
-    /*
-     * Requested dimensions of the cavity (includes padding). If non-zero,
-     * it overrides the calculated dimension of the cavity.
-     */
-    int reqCavityWidth, reqCavityHeight;
-
-    /*
-     * Relative dimensions of cavity wrt the size of the viewport. If
-     * greater than 0.0.
-     */
-    double relCavityWidth, relCavityHeight;
-
-    int reqWidth, reqHeight;	/* If non-zero, overrides the requested
-				 * dimension of the embedded widget */
-
-    double relWidth, relHeight;	/* Relative dimensions of embedded
-				 * widget wrt the size of the viewport */
-
-    Blt_Pad xPad, yPad;		/* Extra padding to frame around */
-
-    int ixPad, iyPad;		/* internal padding for window */
-
-    int fill;			/* Fill style flag */
-
-} EmbeddedWidget;
-
-/*
- * Flag bits embedded widgets:
- */
-#define WIDGET_VISIBLE	(1<<2)	/* Widget is currently visible in the
-				 * viewport. */
-#define WIDGET_NOT_CHILD (1<<3) /* Widget is not a child of hypertext. */
-/*
- * Defaults for embedded widgets:
- */
-#define DEF_WIDGET_ANCHOR        "center"
-#define DEF_WIDGET_FILL		"none"
-#define DEF_WIDGET_HEIGHT	"0"
-#define DEF_WIDGET_JUSTIFY	"center"
-#define DEF_WIDGET_PAD_X		"0"
-#define DEF_WIDGET_PAD_Y		"0"
-#define DEF_WIDGET_REL_HEIGHT	"0.0"
-#define DEF_WIDGET_REL_WIDTH  	"0.0"
-#define DEF_WIDGET_WIDTH  	"0"
-
-static Blt_ConfigSpec widgetConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_ANCHOR, Blt_Offset(EmbeddedWidget, anchor),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FILL, "-fill", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_FILL, Blt_Offset(EmbeddedWidget, fill),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-cavityheight", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_HEIGHT, Blt_Offset(EmbeddedWidget, reqCavityHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-cavitywidth", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_WIDTH, Blt_Offset(EmbeddedWidget, reqCavityWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_HEIGHT, Blt_Offset(EmbeddedWidget, reqHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-justify", (char *)NULL, (char *)NULL, 
-	DEF_WIDGET_JUSTIFY, Blt_Offset(EmbeddedWidget, justify),
-	BLT_CONFIG_DONT_SET_DEFAULT, &justifyOption},
-    {BLT_CONFIG_PAD, "-padx", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_PAD_X, Blt_Offset(EmbeddedWidget, xPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_PAD_Y, Blt_Offset(EmbeddedWidget, yPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DOUBLE, "-relcavityheight", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_REL_HEIGHT, Blt_Offset(EmbeddedWidget, relCavityHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DOUBLE, "-relcavitywidth", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_REL_WIDTH, Blt_Offset(EmbeddedWidget, relCavityWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DOUBLE, "-relheight", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_REL_HEIGHT, Blt_Offset(EmbeddedWidget, relHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DOUBLE, "-relwidth", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_REL_WIDTH, Blt_Offset(EmbeddedWidget, relWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", (char *)NULL, (char *)NULL,
-	DEF_WIDGET_WIDTH, Blt_Offset(EmbeddedWidget, reqWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-
-/* Forward Declarations */
-static Tcl_FreeProc DestroyText;
-static Tk_EventProc EmbeddedWidgetEventProc;
-static Tcl_IdleProc DisplayText;
-static Tcl_CmdDeleteProc TextDeleteCmdProc;
-
-static Tcl_VarTraceProc TextVarProc;
-static Blt_BackgroundChangedProc BackgroundChangedProc;
-static Tk_LostSelProc TextLostSelection;
-static Tk_SelectionProc TextSelectionProc;
-static Tk_EventProc TextEventProc;
-static Tcl_ObjCmdProc TextWidgetCmd;
-static Tcl_ObjCmdProc TextCmd;
-
-typedef int (HTextCmdProc)(HText *htextPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-
-/* end of Forward Declarations */
-
-
- /* Custom options */
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToJustify --
- *
- * 	Converts the justification string into its numeric
- * 	representation. This configuration option affects how the
- *	embedded widget is positioned with respect to the line on which
- *	it sits.
- *
- *	Valid style strings are:
- *
- *	"top"      Uppermost point of region is top of the line's
- *		   text
- * 	"center"   Center point of region is line's baseline.
- *	"bottom"   Lowermost point of region is bottom of the
- *		   line's text
- *
- * Returns:
- *	A standard TCL result.  If the value was not valid
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToJustify(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Justification string */
-    char *widgRec,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Justify *justPtr = (Justify *)(widgRec + offset);
-    char *string;
-    char c;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'c') && (strncmp(string, "center", length) == 0)) {
-	*justPtr = JUSTIFY_CENTER;
-    } else if ((c == 't') && (strncmp(string, "top", length) == 0)) {
-	*justPtr = JUSTIFY_TOP;
-    } else if ((c == 'b') && (strncmp(string, "bottom", length) == 0)) {
-	*justPtr = JUSTIFY_BOTTOM;
-    } else {
-	Tcl_AppendResult(interp, "bad justification argument \"", string,
-	    "\": should be \"center\", \"top\", or \"bottom\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfJustify --
- *
- *	Returns the justification style string based upon the value.
- *
- * Results:
- *	The static justification style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfJustify(Justify justify)
-{
-    switch (justify) {
-    case JUSTIFY_CENTER:
-	return "center";
-    case JUSTIFY_TOP:
-	return "top";
-    case JUSTIFY_BOTTOM:
-	return "bottom";
-    default:
-	return "unknown justification value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * JustifyToObj --
- *
- *	Returns the justification style string based upon the value.
- *
- * Results:
- *	The justification style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-JustifyToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Justify justify = *(Justify *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfJustify(justify), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetScreenDistance --
- *
- *	Converts the given string into the screen distance or number
- *	of characters.  The valid formats are
- *
- *	    N	- pixels	Nm - millimeters
- *	    Ni  - inches        Np - pica
- *          Nc  - centimeters   N# - number of characters
- *
- *	where N is a non-negative decimal number.
- *
- * Results:
- *	A standard TCL result.  The screen distance and the number of
- *	characters are returned.  If the string can't be converted,
- *	TCL_ERROR is returned and interp->result will contain an error
- *	message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetScreenDistance(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    Tcl_Obj *objPtr,
-    int *sizePtr,
-    int *countPtr)
-{
-    int nPixels, nChars;
-    char *endPtr;		/* Pointer to last character scanned */
-    double value;
-    int rounded;
-    char *string;
-
-
-    string = Tcl_GetString(objPtr);
-    value = strtod(string, &endPtr);
-    if (endPtr == string) {
-	Tcl_AppendResult(interp, "bad screen distance \"", string, "\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (value < 0.0) {
-	Tcl_AppendResult(interp, "screen distance \"", string,
-	    "\" must be non-negative value", (char *)NULL);
-	return TCL_ERROR;
-    }
-    while (isspace(UCHAR(*endPtr))) {
-	if (*endPtr == '\0') {
-	    break;
-	}
-	endPtr++;
-    }
-    nPixels = nChars = 0;
-    rounded = ROUND(value);
-    switch (*endPtr) {
-    case '\0':			/* Distance in pixels */
-	nPixels = rounded;
-	break;
-    case '#':			/* Number of characters */
-	nChars = rounded;
-	break;
-    default:			/* cm, mm, pica, inches */
-	if (Tk_GetPixelsFromObj(interp, tkwin, objPtr, &rounded) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	nPixels = rounded;
-	break;
-    }
-    *sizePtr = nPixels;
-    *countPtr = nChars;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToHeight --
- *
- *	Like BLT_CONFIG_PIXELS, but adds an extra check for negative
- *	values.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToHeight(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    Tcl_Obj *objPtr,		/* Pixel value string */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    HText *htPtr = (HText *)widgRec;
-    int height, nRows;
-
-    if (GetScreenDistance(interp, tkwin, objPtr, &height, &nRows) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    htPtr->nRows = nRows;
-    htPtr->reqHeight = height;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToWidth --
- *
- *	Like BLT_CONFIG_PIXELS, but adds an extra check for negative
- *	values.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToWidth(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    Tcl_Obj *objPtr,		/* Pixel value string */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    HText *htPtr = (HText *)widgRec;
-    int width, nColumns;
-
-    if (GetScreenDistance(interp, tkwin, objPtr, &width, &nColumns) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    htPtr->nColumns = nColumns;
-    htPtr->reqWidth = width;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidthHeightToObj --
- *
- *	Returns the string representing the positive pixel size.
- *
- * Results:
- *	The pixel size string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-WidthHeightToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Row/column structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int pixels = *(int *)(widgRec + offset);
-
-    return Tcl_NewIntObj(pixels);
-}
-
-/* General routines */
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the text window at the next idle
- *	point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.  This doesn't
- *	seem to hurt performance noticeably, but if it does then this
- *	could be changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(HText *htPtr)
-{
-    if ((htPtr->tkwin != NULL) && !(htPtr->flags & REDRAW_PENDING)) {
-	htPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayText, htPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResizeArray --
- *
- *	Reallocates memory to the new size given.  New memory
- *	is also cleared (zeros).
- *
- * Results:
- *	Returns a pointer to the new object or NULL if an error occurred.
- *
- * Side Effects:
- *	Memory is re/allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void *
-ResizeArray(
-    void *array,
-    int elemSize,
-    int newSize,
-    int prevSize)
-{
-    void *newArray;
-
-    if (newSize == prevSize) {
-	return array;
-    }
-    if (newSize == 0) {		/* Free entire array */
-	return NULL;
-    }
-    newArray = Blt_AssertCalloc(elemSize, newSize);
-    if ((prevSize > 0) && (array != NULL)) {
-	int size;
-
-	size = MIN(prevSize, newSize) * elemSize;
-	if (size > 0) {
-	    memcpy(newArray, array, size);
-	}
-	Blt_Free(array);
-    }
-    return newArray;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LineSearch --
- *
- * 	Performs a binary search for the line of text located at some
- * 	world y-coordinate (not screen y-coordinate). The search is
- * 	inclusive of those lines from low to high.
- *
- * Results:
- *	Returns the array index of the line found at the given
- *	y-coordinate.  If the y-coordinate is outside of the given range
- *	of lines, -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LineSearch(
-    HText *htPtr,		/* HText widget */
-    int yCoord,			/* Search y-coordinate  */
-    int low, int high)		/* Range of lines to search */
-{
-    int median;
-    Line *linePtr;
-
-    while (low <= high) {
-	median = (low + high) >> 1;
-	linePtr = htPtr->lineArr + median;
-	if (yCoord < linePtr->offset) {
-	    high = median - 1;
-	} else if (yCoord >= (linePtr->offset + linePtr->height)) {
-	    low = median + 1;
-	} else {
-	    return median;
-	}
-    }
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexSearch --
- *
- *	Try to find what line contains a given text index. Performs
- *	a binary search for the text line which contains the given index.
- *	The search is inclusive of those lines from low and high.
- *
- * Results:
- *	Returns the line number containing the given index. If the index
- *	is outside the range of lines, -1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IndexSearch(
-    HText *htPtr,		/* HText widget */
-    int key,			/* Search index */
-    int low, int high)		/* Range of lines to search */
-{
-    int median;
-    Line *linePtr;
-
-    while (low <= high) {
-	median = (low + high) >> 1;
-	linePtr = htPtr->lineArr + median;
-	if (key < linePtr->textStart) {
-	    high = median - 1;
-	} else if (key > linePtr->textEnd) {
-	    low = median + 1;
-	} else {
-	    return median;
-	}
-    }
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetXYPosIndex --
- *
- * 	Converts a string in the form "@x,y", where x and y are
- *	window coordinates, to a text index.
- *
- *	Window coordinates are first translated into world coordinates.
- *	Any coordinate outside of the bounds of the virtual text is
- *	silently set the nearest boundary.
- *
- * Results:
- *	A standard TCL result.  If "string" is a valid index, then
- *	*indexPtr is filled with the numeric index corresponding.
- *	Otherwise an error message is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetXYPosIndex(
-    HText *htPtr,
-    Tcl_Obj *objPtr,
-    int *indexPtr)
-{
-    int x, y, curX, dummy;
-    int textLength, textStart;
-    int cindex, lindex;
-    Line *linePtr;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (Blt_GetXY(htPtr->interp, htPtr->tkwin, string, &x, &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Locate the line corresponding to the window y-coordinate position */
-
-    y += htPtr->yOffset;
-    if (y < 0) {
-	lindex = htPtr->first;
-    } else if (y >= htPtr->worldHeight) {
-	lindex = htPtr->last;
-    } else {
-	lindex = LineSearch(htPtr, y, 0, htPtr->nLines - 1);
-    }
-    if (lindex < 0) {
-	Tcl_AppendResult(htPtr->interp, "can't find line at \"", string, "\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    x += htPtr->xOffset;
-    if (x < 0) {
-	x = 0;
-    } else if (x > htPtr->worldWidth) {
-	x = htPtr->worldWidth;
-    }
-    linePtr = htPtr->lineArr + lindex;
-    curX = 0;
-    textStart = linePtr->textStart;
-    textLength = linePtr->textEnd - linePtr->textStart;
-    if (Blt_Chain_GetLength(linePtr->chain) > 0) {
-	Blt_ChainLink link;
-	int deltaX;
-	EmbeddedWidget *winPtr;
-
-	for (link = Blt_Chain_FirstLink(linePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    winPtr = Blt_Chain_GetValue(link);
-	    deltaX = winPtr->precedingTextWidth + winPtr->cavityWidth;
-	    if ((curX + deltaX) > x) {
-		textLength = (winPtr->precedingTextEnd - textStart);
-		break;
-	    }
-	    curX += deltaX;
-	    /*
-	     * Skip over the trailing space. It designates the position of
-	     * a embedded widget in the text
-	     */
-	    textStart = winPtr->precedingTextEnd + 1;
-	}
-    }
-    cindex = Blt_MeasureChars(htPtr->font, htPtr->charArr + textStart,
-	textLength, 10000, DEF_TEXT_FLAGS, &dummy);
-    *indexPtr = textStart + cindex;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseIndex --
- *
- *	Parse a string representing a text index into numeric
- *	value.  A text index can be in one of the following forms.
- *
- *	  "anchor"	- anchor position of the selection.
- *	  "sel.first"   - index of the first character in the selection.
- *	  "sel.last"	- index of the last character in the selection.
- *	  "page.top"  	- index of the first character on the page.
- *	  "page.bottom"	- index of the last character on the page.
- *	  "@x,y"	- x and y are window coordinates.
- * 	  "number	- raw index of text
- *	  "line.char"	- line number and character position
- *
- * Results:
- *	A standard TCL result.  If "string" is a valid index, then
- *	*indexPtr is filled with the corresponding numeric index.
- *	Otherwise an error message is left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseIndex(
-    HText *htPtr,		/* Text for which the index is being
-				 * specified. */
-    Tcl_Obj *objPtr,		/* Numerical index into htPtr's element
-				 * list, or "end" to refer to last element. */
-    int *indexPtr)		/* Where to store converted relief. */
-{
-    Tcl_Interp *interp = htPtr->interp;
-    char *string;
-    char c;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'a') && (strncmp(string, "anchor", length) == 0)) {
-	*indexPtr = htPtr->selAnchor;
-    } else if ((c == 's') && (length > 4)) {
-	if (strncmp(string, "sel.first", length) == 0) {
-	    *indexPtr = htPtr->selFirst;
-	} else if (strncmp(string, "sel.last", length) == 0) {
-	    *indexPtr = htPtr->selLast;
-	} else {
-	    goto badIndex;	/* Not a valid index */
-	}
-	if (*indexPtr < 0) {
-	    Tcl_AppendResult(interp, "bad index \"", string,
-		"\": nothing selected in \"",
-		Tk_PathName(htPtr->tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else if ((c == 'p') && (length > 5) &&
-	(strncmp(string, "page.top", length) == 0)) {
-	int first;
-
-	first = htPtr->first;
-	if (first < 0) {
-	    first = 0;
-	}
-	*indexPtr = htPtr->lineArr[first].textStart;
-    } else if ((c == 'p') && (length > 5) &&
-	(strncmp(string, "page.bottom", length) == 0)) {
-	*indexPtr = htPtr->lineArr[htPtr->last].textEnd;
-    } else if (c == '@') {	/* Screen position */
-	if (GetXYPosIndex(htPtr, objPtr, indexPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	char *period;
-
-	period = strchr(string, '.');
-	if (period == NULL) {	/* Raw index */
-	    int tindex;
-
-	    if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-		tindex = htPtr->nChars - 1;
-	    } else if (Tcl_GetIntFromObj(interp, objPtr, &tindex) != TCL_OK) {
-		goto badIndex;
-	    }
-	    if (tindex < 0) {
-		tindex = 0;
-	    } else if (tindex > (htPtr->nChars - 1)) {
-		tindex = htPtr->nChars - 1;
-	    }
-	    *indexPtr = tindex;
-	} else {
-	    int lindex, cindex, offset;
-	    Line *linePtr;
-	    int result;
-
-	    *period = '\0';
-	    result = TCL_OK;
-	    if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-		lindex = htPtr->nLines - 1;
-	    } else {
-		result = Tcl_GetIntFromObj(interp, objPtr, &lindex);
-	    }
-	    *period = '.';	/* Repair index string before returning */
-	    if (result != TCL_OK) {
-		goto badIndex;	/* Bad line number */
-	    }
-	    if (lindex < 0) {
-		lindex = 0;	/* Silently repair bad line numbers */
-	    }
-	    if (htPtr->nChars == 0) {
-		*indexPtr = 0;
-		return TCL_OK;
-	    }
-	    if (lindex >= htPtr->nLines) {
-		lindex = htPtr->nLines - 1;
-	    }
-	    linePtr = htPtr->lineArr + lindex;
-	    cindex = 0;
-	    if ((*(period + 1) != '\0')) {
-		string = period + 1;
-		if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-		    cindex = linePtr->textEnd - linePtr->textStart;
-		} else if (Tcl_GetInt(interp, string, &cindex) != TCL_OK) {
-		    goto badIndex;
-		}
-	    }
-	    if (cindex < 0) {
-		cindex = 0;	/* Silently fix bogus indices */
-	    }
-	    offset = 0;
-	    if (htPtr->nChars > 0) {
-		offset = linePtr->textStart + cindex;
-		if (offset > linePtr->textEnd) {
-		    offset = linePtr->textEnd;
-		}
-	    }
-	    *indexPtr = offset;
-	}
-    }
-    if (htPtr->nChars == 0) {
-	*indexPtr = 0;
-    }
-    return TCL_OK;
-
-  badIndex:
-
-    /*
-     * Some of the paths here leave messages in interp->result, so we
-     * have to clear it out before storing our own message.
-     */
-    Tcl_ResetResult(interp);
-    Tcl_AppendResult(interp, "bad index \"", string, "\": \
-should be one of the following: anchor, sel.first, sel.last, page.bottom, \
-page.top, @x,y, index, line.char", (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetIndex --
- *
- *	Get the index from a string representing a text index.
- *
- *
- * Results:
- *	A standard TCL result.  If "string" is a valid index, then
- *	*indexPtr is filled with the numeric index corresponding.
- *	Otherwise an error message is left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetIndex(
-    HText *htPtr,		/* Text for which the index is being
-				 * specified. */
-    Tcl_Obj *objPtr,		/* Numerical index into htPtr's element
-				 * list, or "end" to refer to last element. */
-    int *indexPtr)		/* Where to store converted relief. */
-{
-    int tindex;
-
-    if (ParseIndex(htPtr, objPtr, &tindex) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *indexPtr = tindex;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTextPosition --
- *
- * 	Performs a binary search for the index located on line in
- *	the text. The search is limited to those lines between
- *	low and high inclusive.
- *
- * Results:
- *	Returns the line number at the given Y coordinate. If position
- *	does not correspond to any of the lines in the given the set,
- *	-1 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTextPosition(
-    HText *htPtr,
-    int tindex,
-    int *lindexPtr,
-    int *cindexPtr)
-{
-    int lindex, cindex;
-
-    lindex = cindex = 0;
-    if (htPtr->nChars > 0) {
-	Line *linePtr;
-
-	lindex = IndexSearch(htPtr, tindex, 0, htPtr->nLines - 1);
-	if (lindex < 0) {
-	    char string[200];
-
-	    sprintf_s(string, 200, 
-		"can't determine line number from index \"%d\"", tindex);
-	    Tcl_AppendResult(htPtr->interp, string, (char *)NULL);
-	    return TCL_ERROR;
-	}
-	linePtr = htPtr->lineArr + lindex;
-	if (tindex > linePtr->textEnd) {
-	    tindex = linePtr->textEnd;
-	}
-	cindex = tindex - linePtr->textStart;
-    }
-    *lindexPtr = lindex;
-    *cindexPtr = cindex;
-    return TCL_OK;
-}
-
-/* EmbeddedWidget Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * GetEmbeddedWidgetWidth --
- *
- *	Returns the width requested by the embedded widget. The requested
- *	space also includes any internal padding which has been designated
- *	for this window.
- *
- * Results:
- *	Returns the requested width of the embedded widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetEmbeddedWidgetWidth(EmbeddedWidget *winPtr)
-{
-    int width;
-
-    if (winPtr->reqWidth > 0) {
-	width = winPtr->reqWidth;
-    } else if (winPtr->relWidth > 0.0) {
-	width = (int)
-	    ((double)Tk_Width(winPtr->htPtr->tkwin) * winPtr->relWidth + 0.5);
-    } else {
-	width = Tk_ReqWidth(winPtr->tkwin);
-    }
-    width += (2 * winPtr->ixPad);
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEmbeddedWidgetHeight --
- *
- *	Returns the height requested by the embedded widget. The requested
- *	space also includes any internal padding which has been designated
- *	for this window.
- *
- * Results:
- *	Returns the requested height of the embedded widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetEmbeddedWidgetHeight(EmbeddedWidget *winPtr)
-{
-    int height;
-
-    if (winPtr->reqHeight > 0) {
-	height = winPtr->reqHeight;
-    } else if (winPtr->relHeight > 0.0) {
-	height = (int)((double)Tk_Height(winPtr->htPtr->tkwin) *
-	    winPtr->relHeight + 0.5);
-    } else {
-	height = Tk_ReqHeight(winPtr->tkwin);
-    }
-    height += (2 * winPtr->iyPad);
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on hypertext widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EmbeddedWidgetEventProc(
-    ClientData clientData,	/* Information about the embedded widget. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    EmbeddedWidget *winPtr = clientData;
-    HText *htPtr;
-
-    if ((winPtr == NULL) || (winPtr->tkwin == NULL)) {
-	return;
-    }
-    htPtr = winPtr->htPtr;
-
-    if (eventPtr->type == DestroyNotify) {
-	Blt_HashEntry *hPtr;
-	/*
-	 * Mark the widget as deleted by dereferencing the Tk window
-	 * pointer.  Zero out the height and width to collapse the area
-	 * used by the widget.  Redraw the window only if the widget is
-	 * currently visible.
-	 */
-	winPtr->htPtr->flags |= REQUEST_LAYOUT;
-	if (Tk_IsMapped(winPtr->tkwin) && (winPtr->flags & WIDGET_VISIBLE)) {
-	    EventuallyRedraw(htPtr);
-	}
-	Tk_DeleteEventHandler(winPtr->tkwin, StructureNotifyMask,
-	    EmbeddedWidgetEventProc, winPtr);
-	hPtr = Blt_FindHashEntry(&htPtr->widgetTable, (char *)winPtr->tkwin);
-	Blt_DeleteHashEntry(&htPtr->widgetTable, hPtr);
-	winPtr->cavityWidth = winPtr->cavityHeight = 0;
-	winPtr->tkwin = NULL;
-
-    } else if (eventPtr->type == ConfigureNotify) {
-	/*
-	 * EmbeddedWidgets can't request new positions. Worry only about resizing.
-	 */
-	if (winPtr->winWidth != Tk_Width(winPtr->tkwin) ||
-	    winPtr->winHeight != Tk_Height(winPtr->tkwin)) {
-	    EventuallyRedraw(htPtr);
-	    htPtr->flags |= REQUEST_LAYOUT;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetCustodyProc --
- *
- *	This procedure is invoked when a embedded widget has been
- *	stolen by another geometry manager.  The information and
- *	memory associated with the embedded widget is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the widget formerly associated with the widget
- *	to have its layout re-computed and arranged at the
- *	next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-EmbeddedWidgetCustodyProc(
-    ClientData clientData,	/* Information about the former
-				 * embedded widget. */
-    Tk_Window tkwin)		/* Not used. */
-{
-    Blt_HashEntry *hPtr;
-    EmbeddedWidget *winPtr = clientData;
-    /*
-     * Mark the widget as deleted by dereferencing the Tk window
-     * pointer.  Zero out the height and width to collapse the area
-     * used by the widget.  Redraw the window only if the widget is
-     * currently visible.
-     */
-    winPtr->htPtr->flags |= REQUEST_LAYOUT;
-    if (Tk_IsMapped(winPtr->tkwin) && (winPtr->flags & WIDGET_VISIBLE)) {
-	EventuallyRedraw(winPtr->htPtr);
-    }
-    Tk_DeleteEventHandler(winPtr->tkwin, StructureNotifyMask,
-	EmbeddedWidgetEventProc, winPtr);
-    hPtr = Blt_FindHashEntry(&winPtr->htPtr->widgetTable, 
-			     (char *)winPtr->tkwin);
-    Blt_DeleteHashEntry(&winPtr->htPtr->widgetTable, hPtr);
-    winPtr->cavityWidth = winPtr->cavityHeight = 0;
-    winPtr->tkwin = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for
- *	embedded widgets managed by the hypertext widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for tkwin, and all its managed siblings, to
- *	be repacked and drawn at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-EmbeddedWidgetGeometryProc(
-    ClientData clientData,	/* Information about window that got new
-			         * preferred geometry.  */
-    Tk_Window tkwin)		/* Not used. */
-{
-    EmbeddedWidget *winPtr = clientData;
-
-    winPtr->htPtr->flags |= REQUEST_LAYOUT;
-    EventuallyRedraw(winPtr->htPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindEmbeddedWidget --
- *
- *	Searches for a widget matching the path name given
- *	If found, the pointer to the widget structure is returned,
- *	otherwise NULL.
- *
- * Results:
- *	The pointer to the widget structure. If not found, NULL.
- *
- *---------------------------------------------------------------------------
- */
-static EmbeddedWidget *
-FindEmbeddedWidget(
-    HText *htPtr,		/* Hypertext widget structure */
-    Tk_Window tkwin)		/* Path name of embedded widget  */
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&htPtr->widgetTable, (char *)tkwin);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEmbeddedWidget --
- *
- * 	This procedure creates and initializes a new embedded widget
- *	in the hyper text widget.
- *
- * Results:
- *	The return value is a pointer to a structure describing the
- *	new embedded widget.  If an error occurred, then the return 
- *	value is NULL and an error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated. EmbeddedWidget window is mapped. 
- *	Callbacks are set up for embedded widget resizes and geometry 
- *	requests.
- *
- *---------------------------------------------------------------------------
- */
-static EmbeddedWidget *
-CreateEmbeddedWidget(
-    HText *htPtr,		/* Hypertext widget */
-    char *name)			/* Name of embedded widget */
-{
-    EmbeddedWidget *winPtr;
-    Tk_Window tkwin;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    tkwin = Tk_NameToWindow(htPtr->interp, name, htPtr->tkwin);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    if (Tk_Parent(tkwin) != htPtr->tkwin) {
-	Tcl_AppendResult(htPtr->interp, "parent window of \"", name,
-	    "\" must be \"", Tk_PathName(htPtr->tkwin), "\"", (char *)NULL);
-	return NULL;
-    }
-    hPtr = Blt_CreateHashEntry(&htPtr->widgetTable, (char *)tkwin, &isNew);
-    /* Check is the widget is already embedded into this widget */
-    if (!isNew) {
-	Tcl_AppendResult(htPtr->interp, "\"", name,
-	    "\" is already appended to ", Tk_PathName(htPtr->tkwin),
-	    (char *)NULL);
-	return NULL;
-    }
-    winPtr = Blt_AssertCalloc(1, sizeof(EmbeddedWidget));
-    winPtr->flags = 0;
-    winPtr->tkwin = tkwin;
-    winPtr->htPtr = htPtr;
-    winPtr->x = winPtr->y = 0;
-    winPtr->fill = FILL_NONE;
-    winPtr->justify = JUSTIFY_CENTER;
-    winPtr->anchor = TK_ANCHOR_CENTER;
-    Blt_SetHashValue(hPtr, winPtr);
-
-    Tk_ManageGeometry(tkwin, &htextMgrInfo, winPtr);
-    Tk_CreateEventHandler(tkwin, StructureNotifyMask, EmbeddedWidgetEventProc,
-	  winPtr);
-    return winPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyEmbeddedWidget --
- *
- * 	This procedure is invoked by DestroyLine to clean up the
- * 	internal structure of a widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyEmbeddedWidget(EmbeddedWidget *winPtr)
-{
-    /* Destroy the embedded widget if it still exists */
-    if (winPtr->tkwin != NULL) {
-	Blt_HashEntry *hPtr;
-
-	Tk_DeleteEventHandler(winPtr->tkwin, StructureNotifyMask,
-	    EmbeddedWidgetEventProc, winPtr);
-	hPtr = Blt_FindHashEntry(&winPtr->htPtr->widgetTable,
-	    (char *)winPtr->tkwin);
-	Blt_DeleteHashEntry(&winPtr->htPtr->widgetTable, hPtr);
-	Tk_DestroyWindow(winPtr->tkwin);
-    }
-    Blt_Free(winPtr);
-}
-
-/* Line Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * CreateLine --
- *
- * 	This procedure creates and initializes a new line of text.
- *
- * Results:
- *	The return value is a pointer to a structure describing the new
- * 	line of text.  If an error occurred, then the return value is NULL
- *	and an error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated.
- *
- *---------------------------------------------------------------------------
- */
-static Line *
-CreateLine(HText *htPtr)
-{
-    Line *linePtr;
-
-    if (htPtr->nLines >= htPtr->arraySize) {
-	if (htPtr->arraySize == 0) {
-	    htPtr->arraySize = DEF_LINES_ALLOC;
-	} else {
-	    htPtr->arraySize += htPtr->arraySize;
-	}
-	htPtr->lineArr = ResizeArray(htPtr->lineArr, sizeof(Line), 
-		htPtr->arraySize, htPtr->nLines);
-    }
-    /* Initialize values in the new entry */
-
-    linePtr = htPtr->lineArr + htPtr->nLines;
-    linePtr->offset = 0;
-    linePtr->height = linePtr->width = 0;
-    linePtr->textStart = 0;
-    linePtr->textEnd = -1;
-    linePtr->baseline = 0;
-    linePtr->chain = Blt_Chain_Create();
-
-    htPtr->nLines++;
-    return linePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyLine --
- *
- * 	This procedure is invoked to clean up the internal structure
- *	of a line.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the line (text and widgets) is
- *	freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyLine(Line *linePtr)
-{
-    Blt_ChainLink link;
-    EmbeddedWidget *winPtr;
-
-    /* Free the list of embedded widget structures */
-    for (link = Blt_Chain_FirstLink(linePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	winPtr = Blt_Chain_GetValue(link);
-	DestroyEmbeddedWidget(winPtr);
-    }
-    Blt_Chain_Destroy(linePtr->chain);
-}
-
-static void
-FreeText(HText *htPtr)
-{
-    int i;
-
-    for (i = 0; i < htPtr->nLines; i++) {
-	DestroyLine(htPtr->lineArr + i);
-    }
-    htPtr->nLines = 0;
-    htPtr->nChars = 0;
-    if (htPtr->charArr != NULL) {
-	Blt_Free(htPtr->charArr);
-	htPtr->charArr = NULL;
-    }
-}
-
-/* Text Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyText --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release
- *	to clean up the internal structure of a HText at a safe time
- *	(when no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyText(DestroyData dataPtr) /* Info about hypertext widget. */
-{
-    HText *htPtr = (HText *)dataPtr;
-
-    Blt_FreeOptions(configSpecs, (char *)htPtr, htPtr->display, 0);
-    if (htPtr->drawGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->drawGC);
-    }
-    if (htPtr->fillGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->fillGC);
-    }
-    if (htPtr->selectGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->selectGC);
-    }
-    FreeText(htPtr);
-    if (htPtr->lineArr != NULL) {
-	Blt_Free(htPtr->lineArr);
-    }
-    Blt_DeleteHashTable(&htPtr->widgetTable);
-    Blt_Free(htPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on hypertext widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TextEventProc(
-    ClientData clientData,	/* Information about window. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    HText *htPtr = clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	if ((htPtr->lastWidth != Tk_Width(htPtr->tkwin)) ||
-	    (htPtr->lastHeight != Tk_Height(htPtr->tkwin))) {
-	    htPtr->flags |= (REQUEST_LAYOUT | TEXT_DIRTY);
-	    EventuallyRedraw(htPtr);
-	}
-    } else if (eventPtr->type == Expose) {
-
-	/*
-	 * If the Expose event was synthetic (i.e. we manufactured it
-	 * ourselves during a redraw operation), toggle the bit flag
-	 * which controls redraws.
-	 */
-
-	if (eventPtr->xexpose.send_event) {
-	    htPtr->flags ^= IGNORE_EXPOSURES;
-	    return;
-	}
-	if ((eventPtr->xexpose.count == 0) &&
-	    !(htPtr->flags & IGNORE_EXPOSURES)) {
-	    htPtr->flags |= TEXT_DIRTY;
-	    EventuallyRedraw(htPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (htPtr->tkwin != NULL) {
-	    htPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(htPtr->interp, htPtr->cmdToken);
-	}
-	if (htPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayText, htPtr);
-	}
-	Tcl_EventuallyFree(htPtr, DestroyText);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextDeleteCmdProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If
- *	the widget isn't already in the process of being destroyed,
- *	this command destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-TextDeleteCmdProc(ClientData clientData) /* Pointer to widget record. */
-{
-    HText *htPtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin
-     * is NULL) or because the command was deleted, and then this procedure
-     * destroys the widget.
-     */
-
-    if (htPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = htPtr->tkwin;
-	htPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BackgroundChangedProc
- *
- *	Stub for image change notifications.  Since we immediately draw
- *	the image into a pixmap, we don't care about image changes.
- *
- *	It would be better if Tk checked for NULL proc pointers.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-BackgroundChangedProc(ClientData clientData) 
-{
-    HText *htPtr = clientData;
-
-    if (htPtr->tkwin != NULL) {
-	EventuallyRedraw(htPtr);
-    }
-}
-
-/* Configuration Procedures */
-static void
-ResetTextInfo(HText *htPtr)
-{
-    htPtr->first = 0;
-    htPtr->last = htPtr->nLines - 1;
-    htPtr->selFirst = htPtr->selLast = -1;
-    htPtr->selAnchor = 0;
-    htPtr->pendingX = htPtr->pendingY = 0;
-    htPtr->worldWidth = htPtr->worldHeight = 0;
-    htPtr->xOffset = htPtr->yOffset = 0;
-}
-
-static Line *
-GetLastLine(HText *htPtr)
-{
-    if (htPtr->nLines == 0) {
-	return CreateLine(htPtr);
-    }
-    return (htPtr->lineArr + (htPtr->nLines - 1));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadNamedFile --
- *
- * 	Read the named file into a newly allocated buffer.
- *
- * Results:
- *	Returns the size of the allocated buffer if the file was
- *	read correctly.  Otherwise -1 is returned and "interp->result"
- *	will contain an error message.
- *
- * Side Effects:
- *	If successful, the contents of "bufferPtr" will point
- *	to the allocated buffer.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ReadNamedFile(Tcl_Interp *interp, char *fileName, char **bufferPtr)
-{
-    FILE *f;
-    int nRead;
-    size_t fileSize;
-    int count, bytesLeft;
-    char *buffer;
-    struct stat fileInfo;
-
-    f = Blt_OpenFile(interp, fileName, "r");
-    if (f == NULL) {
-	return -1;
-    }
-    if (fstat(fileno(f), &fileInfo) < 0) {
-	Tcl_AppendResult(interp, "can't stat \"", fileName, "\": ",
-	    Tcl_PosixError(interp), (char *)NULL);
-	fclose(f);
-	return -1;
-    }
-    fileSize = fileInfo.st_size + 1;
-    buffer = Blt_Malloc(sizeof(char) * fileSize);
-    if (buffer == NULL) {
-	fclose(f);
-	return -1;		/* Can't allocate memory for file buffer */
-    }
-    count = 0;
-    for (bytesLeft = fileInfo.st_size; bytesLeft > 0; bytesLeft -= nRead) {
-	nRead = fread(buffer + count, sizeof(char), bytesLeft, f);
-	if (nRead < 0) {
-	    Tcl_AppendResult(interp, "error reading \"", fileName, "\": ",
-		Tcl_PosixError(interp), (char *)NULL);
-	    fclose(f);
-	    Blt_Free(buffer);
-	    return -1;
-	} else if (nRead == 0) {
-	    break;
-	}
-	count += nRead;
-    }
-    fclose(f);
-    buffer[count] = '\0';
-    *bufferPtr = buffer;
-    return count;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CollectCommand --
- *
- * 	Collect the characters representing a TCL command into a
- *	given buffer.
- *
- * Results:
- *	Returns the number of bytes examined.  If an error occurred,
- *	-1 is returned and "interp->result" will contain an error
- *	message.
- *
- * Side Effects:
- *	If successful, the "cmdArr" will be filled with the string
- *	representing the TCL command.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-CollectCommand(
-    HText *htPtr,		/* Widget record */
-    char inputArr[],		/* Array of bytes representing the
-				 * htext input */
-    int maxBytes,		/* Maximum number of bytes left in input */
-    char cmdArr[])		/* Output buffer to be filled with the Tcl
-				 * command */
-{
-    int c;
-    int i;
-    int state, count;
-
-    /* Simply collect the all the characters until %% into a buffer */
-
-    state = count = 0;
-    for (i = 0; i < maxBytes; i++) {
-	c = inputArr[i];
-	if (c == htPtr->specChar) {
-	    state++;
-	} else if ((state == 0) && (c == '\\')) {
-	    state = 3;
-	} else {
-	    state = 0;
-	}
-	switch (state) {
-	case 2:		/* End of command block found */
-	    cmdArr[count - 1] = '\0';
-	    return i;
-
-	case 4:		/* Escaped block designator */
-	    cmdArr[count] = c;
-	    state = 0;
-	    break;
-
-	default:		/* Add to command buffer */
-	    cmdArr[count++] = c;
-	    break;
-	}
-    }
-    Tcl_AppendResult(htPtr->interp, "premature end of TCL command block",
-	(char *)NULL);
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseInput --
- *
- * 	Parse the input to the HText structure into an array of lines.
- *	Each entry contains the beginning index and end index of the
- *	characters in the text array which comprise the line.
- *
- *	|*|*|*|\n|T|h|i|s| |a| |l|i|n|e| |o|f| |t|e|x|t|.|\n|*|*|*|
- *                ^					  ^
- *	          textStart				  textEnd
- *
- *	Note that the end index contains the '\n'.
- *
- * Results:
- *	Returns TCL_OK or error depending if the file was read correctly.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseInput(
-    Tcl_Interp *interp,
-    HText *htPtr,
-    char input[],
-    int nBytes)
-{
-    int c;
-    int i;
-    char *textArr;
-    char *cmdArr;
-    int count, nLines;
-    int length;
-    int state;
-    Line *linePtr;
-
-    linePtr = CreateLine(htPtr);
-    if (linePtr == NULL) {
-	return TCL_ERROR;	/* Error allocating the line structure */
-    }
-    /*  Right now, we replace the text array instead of appending to it */
-
-    linePtr->textStart = 0;
-
-    /* In the worst case, assume the entire input could be TCL commands */
-    cmdArr  = Blt_AssertMalloc(sizeof(char) * (nBytes + 1));
-    textArr = Blt_AssertMalloc(sizeof(char) * (nBytes + 1));
-    if (htPtr->charArr != NULL) {
-	Blt_Free(htPtr->charArr);
-    }
-    htPtr->charArr = textArr;
-    htPtr->nChars = 0;
-
-    nLines = count = state = 0;
-    htPtr->flags &= ~WIDGET_APPENDED;
-
-    for (i = 0; i < nBytes; i++) {
-	c = input[i];
-	if (c == htPtr->specChar) {
-	    state++;
-	} else if (c == '\n') {
-	    state = -1;
-	} else if ((state == 0) && (c == '\\')) {
-	    state = 3;
-	} else {
-	    state = 0;
-	}
-	switch (state) {
-	case 2:		/* Block of TCL commands found */
-	    count--, i++;
-	    length = CollectCommand(htPtr, input + i, nBytes - i, cmdArr);
-	    if (length < 0) {
-		goto error;
-	    }
-	    i += length;
-	    linePtr->textEnd = count;
-	    htPtr->nChars = count + 1;
-	    if (Tcl_Eval(interp, cmdArr) != TCL_OK) {
-		goto error;
-	    }
-	    if (htPtr->flags & WIDGET_APPENDED) {
-		/* Indicates the location a embedded widget in the text array */
-		textArr[count++] = ' ';
-		htPtr->flags &= ~WIDGET_APPENDED;
-	    }
-	    state = 0;
-	    break;
-
-	case 4:		/* Escaped block designator */
-	    textArr[count - 1] = c;
-	    state = 0;
-	    break;
-
-	case -1:		/* End of line or input */
-	    linePtr->textEnd = count;
-	    textArr[count++] = '\n';
-	    nLines++;
-	    linePtr = CreateLine(htPtr);
-	    if (linePtr == NULL) {
-		goto error;
-	    }
-	    linePtr->textStart = count;
-	    state = 0;
-	    break;
-
-	default:		/* Default action, add to text buffer */
-	    textArr[count++] = c;
-	    break;
-	}
-    }
-    if (count > linePtr->textStart) {
-	linePtr->textEnd = count;
-	textArr[count++] = '\n';/* Every line must end with a '\n' */
-	nLines++;
-    }
-    Blt_Free(cmdArr);
-    /* Reset number of lines allocated */
-    htPtr->lineArr = ResizeArray(htPtr->lineArr, sizeof(Line), nLines, 
-	htPtr->arraySize);
-    htPtr->nLines = htPtr->arraySize = nLines;
-    /*  and the size of the character array */
-    htPtr->charArr = ResizeArray(htPtr->charArr, sizeof(char), count, nBytes);
-    htPtr->nChars = count;
-    return TCL_OK;
-  error:
-    Blt_Free(cmdArr);
-    return TCL_ERROR;
-}
-
-static int
-IncludeText(
-    Tcl_Interp *interp,
-    HText *htPtr,
-    char *fileName)
-{
-    char *buffer;
-    int result;
-    int nBytes;
-
-    if ((htPtr->text == NULL) && (fileName == NULL)) {
-	return TCL_OK;		/* Empty text string */
-    }
-    if (fileName != NULL) {
-	nBytes = ReadNamedFile(interp, fileName, &buffer);
-	if (nBytes < 0) {
-	    return TCL_ERROR;
-	}
-    } else {
-	buffer = htPtr->text;
-	nBytes = strlen(htPtr->text);
-    }
-    result = ParseInput(interp, htPtr, buffer, nBytes);
-    if (fileName != NULL) {
-	Blt_Free(buffer);
-    }
-    return result;
-}
-
-/* ARGSUSED */
-static char *
-TextVarProc(
-    ClientData clientData,	/* Information about widget. */
-    Tcl_Interp *interp,		/* Interpreter containing variable. */
-    const char *name1,		/* Name of variable. */
-    const char *name2,		/* Second part of variable name. */
-    int flags)			/* Information about what happened. */
-{
-    HText *htPtr = clientData;
-    HText *lasthtPtr;
-
-    /* Check to see of this is the most recent trace */
-    lasthtPtr = (HText *)Tcl_VarTraceInfo2(interp, name1, name2, flags,
-	TextVarProc, NULL);
-    if (lasthtPtr != htPtr) {
-	return NULL;		/* Ignore all but most current trace */
-    }
-    if (flags & TCL_TRACE_READS) {
-	char c;
-
-	c = name2[0];
-	if ((c == 'w') && (strcmp(name2, "widget") == 0)) {
-	    Tcl_SetVar2(interp, name1, name2, Tk_PathName(htPtr->tkwin),
-		flags);
-	} else if ((c == 'l') && (strcmp(name2, "line") == 0)) {
-	    char buf[200];
-	    int lineNum;
-
-	    lineNum = htPtr->nLines - 1;
-	    if (lineNum < 0) {
-		lineNum = 0;
-	    }
-	    sprintf_s(buf, 200, "%d", lineNum);
-	    Tcl_SetVar2(interp, name1, name2, buf, flags);
-	} else if ((c == 'i') && (strcmp(name2, "index") == 0)) {
-	    char buf[200];
-
-	    sprintf_s(buf, 200, "%d", htPtr->nChars - 1);
-	    Tcl_SetVar2(interp, name1, name2, buf, flags);
-	} else if ((c == 'f') && (strcmp(name2, "file") == 0)) {
-	    const char *fileName;
-
-	    fileName = htPtr->fileName;
-	    if (fileName == NULL) {
-		fileName = "";
-	    }
-	    Tcl_SetVar2(interp, name1, name2, fileName, flags);
-	} else {
-	    return (char *)"?unknown?";
-	}
-    }
-    return NULL;
-}
-
-static const char *varNames[] = {
-    "widget", "line", "file", "index", (char *)NULL
-};
-
-static void
-CreateTraces(HText *htPtr)
-{
-    const char **p;
-    static char globalCmd[] = "global htext";
-
-    /*
-     * Make the traced variables global to the widget
-     */
-    Tcl_Eval(htPtr->interp, globalCmd);
-    for (p = varNames; *p != NULL; p++) {
-	Tcl_TraceVar2(htPtr->interp, "htext", *p,
-	    (TCL_GLOBAL_ONLY | TCL_TRACE_READS), TextVarProc, htPtr);
-    }
-}
-
-static void
-DeleteTraces(HText *htPtr)
-{
-    const char **p;
-
-    for (p = varNames; *p != NULL; p++) {
-	Tcl_UntraceVar2(htPtr->interp, "htext", *p,
-	    (TCL_GLOBAL_ONLY | TCL_TRACE_READS), TextVarProc, htPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureText --
- *
- * 	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or reconfigure)
- *	a hypertext widget.
- *
- * 	The layout of the text must be calculated (by ComputeLayout)
- *	whenever particular options change; -font, -file, -linespacing
- *	and -text options. If the user has changes one of these options,
- *	it must be detected so that the layout can be recomputed. Since the
- *	coordinates of the layout are virtual, there is no need to adjust
- *	them if physical window attributes (window size, etc.)
- *	change.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- * 	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- * 	etc. get set for htPtr;  old resources get freed, if there were any.
- * 	The hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureText(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    HText *htPtr)		/* Information about widget; may or may not
-			         * already have values for some fields. */
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-
-    if (Blt_ConfigModified(configSpecs, "-font", "-linespacing", "-file",
-	    "-text", "-width", "-height", (char *)NULL)) {
-	/*
-	 * These options change the layout of the text.  Width/height
-	 * and rows/columns may change a relatively sized window or cavity.
-	 */
-	htPtr->flags |= (REQUEST_LAYOUT | TEXT_DIRTY);	/* Mark for update */
-    }
-    gcMask = GCForeground | GCFont;
-    gcValues.font = Blt_FontId(htPtr->font);
-    gcValues.foreground = htPtr->normalFg->pixel;
-    newGC = Tk_GetGC(htPtr->tkwin, gcMask, &gcValues);
-    if (htPtr->drawGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->drawGC);
-    }
-    htPtr->drawGC = newGC;
-
-    gcValues.foreground = htPtr->selFgColor->pixel;
-    newGC = Tk_GetGC(htPtr->tkwin, gcMask, &gcValues);
-    if (htPtr->selectGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->selectGC);
-    }
-    htPtr->selectGC = newGC;
-
-    if (htPtr->xScrollUnits < 1) {
-	htPtr->xScrollUnits = 1;
-    }
-    if (htPtr->yScrollUnits < 1) {
-	htPtr->yScrollUnits = 1;
-    }
-    if (htPtr->normalBg != NULL) {
-	Blt_SetBackgroundChangedProc(htPtr->normalBg, BackgroundChangedProc, 
-		htPtr);
-    }
-    if (htPtr->selBg != NULL) {
-	Blt_SetBackgroundChangedProc(htPtr->selBg, BackgroundChangedProc, 
-		htPtr);
-    }
-    gcValues.foreground = Blt_BackgroundBorderColor(htPtr->normalBg)->pixel;
-    newGC = Tk_GetGC(htPtr->tkwin, gcMask, &gcValues);
-    if (htPtr->fillGC != NULL) {
-	Tk_FreeGC(htPtr->display, htPtr->fillGC);
-    }
-    htPtr->fillGC = newGC;
-
-    if (htPtr->nColumns > 0) {
-	htPtr->reqWidth =
-	    htPtr->nColumns * Blt_TextWidth(htPtr->font, "0", 1);
-    }
-    if (htPtr->nRows > 0) {
-	Blt_FontMetrics fontMetrics;
-
-	Blt_GetFontMetrics(htPtr->font, &fontMetrics);
-	htPtr->reqHeight = htPtr->nRows * fontMetrics.linespace;
-    }
-    /*
-     * If the either the -text or -file option changed, read in the
-     * new text.  The -text option supersedes any -file option.
-     */
-    if (Blt_ConfigModified(configSpecs, "-file", "-text", (char *)NULL)) {
-	int result;
-
-	FreeText(htPtr);
-	CreateTraces(htPtr);	/* Create variable traces */
-
-	result = IncludeText(interp, htPtr, htPtr->fileName);
-
-	DeleteTraces(htPtr);
-	if (result == TCL_ERROR) {
-	    FreeText(htPtr);
-	    return TCL_ERROR;
-	}
-	ResetTextInfo(htPtr);
-    }
-    EventuallyRedraw(htPtr);
-    return TCL_OK;
-}
-
-/* Layout Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based
- *	upon the anchor specified.  The anchor indicates where
- *	the given xy position is in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |     x,y ---+
- *  		w   center   e      |     |
- *  		|            |      +-----+
- *  		sw --- s --- se
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-static XPoint
-TranslateAnchor(
-    int deltaX, int deltaY,	/* Difference between outer/inner regions */
-    Tk_Anchor anchor)		/* Direction of the anchor */
-{
-    XPoint point;
-
-    point.x = point.y = 0;
-    switch (anchor) {
-    case TK_ANCHOR_NW:		/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:		/* Left center */
-	point.y = (deltaY / 2);
-	break;
-    case TK_ANCHOR_SW:		/* Lower left corner */
-	point.y = deltaY;
-	break;
-    case TK_ANCHOR_N:		/* Top center */
-	point.x = (deltaX / 2);
-	break;
-    case TK_ANCHOR_CENTER:	/* Centered */
-	point.x = (deltaX / 2);
-	point.y = (deltaY / 2);
-	break;
-    case TK_ANCHOR_S:		/* Bottom center */
-	point.x = (deltaX / 2);
-	point.y = deltaY;
-	break;
-    case TK_ANCHOR_NE:		/* Upper right corner */
-	point.x = deltaX;
-	break;
-    case TK_ANCHOR_E:		/* Right center */
-	point.x = deltaX;
-	point.y = (deltaY / 2);
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	point.x = deltaX;
-	point.y = deltaY;
-	break;
-    }
-    return point;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeCavitySize --
- *
- *	Sets the width and height of the cavity based upon the
- *	requested size of the embedded widget.  The requested space also
- *	includes any external padding which has been designated for
- *	this window.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the cavity is set in the embedded widget information
- *	structure.  These values can effect how the embedded widget is
- *	packed into the master window.
-
- *---------------------------------------------------------------------------
- */
-static void
-ComputeCavitySize(EmbeddedWidget *winPtr)
-{
-    int width, height;
-    int twiceBW;
-
-    twiceBW = 2 * Tk_Changes(winPtr->tkwin)->border_width;
-    if (winPtr->reqCavityWidth > 0) {
-	width = winPtr->reqCavityWidth;
-    } else if (winPtr->relCavityWidth > 0.0) {
-	width = (int)((double)Tk_Width(winPtr->htPtr->tkwin) *
-	    winPtr->relCavityWidth + 0.5);
-    } else {
-	width = GetEmbeddedWidgetWidth(winPtr) + PADDING(winPtr->xPad) + 
-	    twiceBW;
-    }
-    winPtr->cavityWidth = width;
-
-    if (winPtr->reqCavityHeight > 0) {
-	height = winPtr->reqCavityHeight;
-    } else if (winPtr->relCavityHeight > 0.0) {
-	height = (int)((double)Tk_Height(winPtr->htPtr->tkwin) *
-	    winPtr->relCavityHeight + 0.5);
-    } else {
-	height = GetEmbeddedWidgetHeight(winPtr) + PADDING(winPtr->yPad) + 
-	    twiceBW;
-    }
-    winPtr->cavityHeight = height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LayoutLine --
- *
- *	This procedure computes the total width and height needed
- *      to contain the text and widgets for a particular line.
- *      It also calculates the baseline of the text on the line with
- *	respect to the other widgets on the line.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LayoutLine(HText *htPtr, Line *linePtr)
-{
-    EmbeddedWidget *winPtr;
-    int textStart, textLength;
-    int maxAscent, maxDescent, maxHeight;
-    int ascent, descent;
-    int median;			/* Difference of font ascent/descent values */
-    Blt_ChainLink link;
-    int x, y;
-    int newX;
-    Blt_FontMetrics fontMetrics;
-
-    /* Initialize line defaults */
-    Blt_GetFontMetrics(htPtr->font, &fontMetrics);
-    maxAscent = fontMetrics.ascent;
-    maxDescent = fontMetrics.descent;
-    median = fontMetrics.ascent - fontMetrics.descent;
-    ascent = descent = 0;	/* Suppress compiler warnings */
-
-    /*
-     * Pass 1: Determine the maximum ascent (baseline) and descent
-     * needed for the line.  We'll need this for figuring the top,
-     * bottom, and center anchors.
-     */
-    for (link = Blt_Chain_FirstLink(linePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	winPtr = Blt_Chain_GetValue(link);
-	if (winPtr->tkwin == NULL) {
-	    continue;
-	}
-	ComputeCavitySize(winPtr);
-
-	switch (winPtr->justify) {
-	case JUSTIFY_TOP:
-	    ascent = fontMetrics.ascent + winPtr->padTop;
-	    descent = winPtr->cavityHeight - fontMetrics.ascent;
-	    break;
-	case JUSTIFY_CENTER:
-	    ascent = (winPtr->cavityHeight + median) / 2;
-	    descent = (winPtr->cavityHeight - median) / 2;
-	    break;
-	case JUSTIFY_BOTTOM:
-	    ascent = winPtr->cavityHeight - fontMetrics.descent;
-	    descent = fontMetrics.descent;
-	    break;
-	}
-	if (descent > maxDescent) {
-	    maxDescent = descent;
-	}
-	if (ascent > maxAscent) {
-	    maxAscent = ascent;
-	}
-    }
-
-    maxHeight = maxAscent + maxDescent + htPtr->leader;
-    x = 0;			/* Always starts from x=0 */
-    y = 0;			/* Suppress compiler warning */
-    textStart = linePtr->textStart;
-
-    /*
-     * Pass 2: Find the placements of the text and widgets along each
-     * line.
-     */
-    for (link = Blt_Chain_FirstLink(linePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	winPtr = Blt_Chain_GetValue(link);
-	if (winPtr->tkwin == NULL) {
-	    continue;
-	}
-	/* Get the width of the text leading to the widget. */
-	textLength = (winPtr->precedingTextEnd - textStart);
-	if (textLength > 0) {
-	    Blt_MeasureChars(htPtr->font, htPtr->charArr + textStart,
-		textLength, 10000, TK_AT_LEAST_ONE, &newX);
-	    winPtr->precedingTextWidth = newX;
-	    x += newX;
-	}
-	switch (winPtr->justify) {
-	case JUSTIFY_TOP:
-	    y = maxAscent - fontMetrics.ascent;
-	    break;
-	case JUSTIFY_CENTER:
-	    y = maxAscent - (winPtr->cavityHeight + median) / 2;
-	    break;
-	case JUSTIFY_BOTTOM:
-	    y = maxAscent + fontMetrics.descent - winPtr->cavityHeight;
-	    break;
-	}
-	winPtr->x = x, winPtr->y = y;
-
-	/* Skip over trailing space */
-	textStart = winPtr->precedingTextEnd + 1;
-
-	x += winPtr->cavityWidth;
-    }
-
-    /*
-     * This can be either the trailing piece of a line after the last widget
-     * or the entire line if no widgets are embedded in it.
-     */
-    textLength = (linePtr->textEnd - textStart) + 1;
-    if (textLength > 0) {
-	Blt_MeasureChars(htPtr->font, htPtr->charArr + textStart,
-	    textLength, 10000, DEF_TEXT_FLAGS, &newX);
-	x += newX;
-    }
-    /* Update line parameters */
-    if ((linePtr->width != x) || (linePtr->height != maxHeight) ||
-	(linePtr->baseline != maxAscent)) {
-	htPtr->flags |= TEXT_DIRTY;
-    }
-    linePtr->width = x;
-    linePtr->height = maxHeight;
-    linePtr->baseline = maxAscent;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeLayout --
- *
- *	This procedure computes the total width and height needed
- *      to contain the text and widgets from all the lines of text.
- *      It merely sums the heights and finds the maximum width of
- *	all the lines.  The width and height are needed for scrolling.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeLayout(HText *htPtr)
-{
-    int count;
-    Line *linePtr;
-    int height, width;
-
-    width = height = 0;
-    for (count = 0; count < htPtr->nLines; count++) {
-	linePtr = htPtr->lineArr + count;
-
-	linePtr->offset = height;
-	LayoutLine(htPtr, linePtr);
-	height += linePtr->height;
-	if (linePtr->width > width) {
-	    width = linePtr->width;
-	}
-    }
-    /*
-     * Set changed flag if new layout changed size of virtual text.
-     */
-    if ((height != htPtr->worldHeight) || (width != htPtr->worldWidth)) {
-	htPtr->worldHeight = height, htPtr->worldWidth = width;
-	htPtr->flags |= TEXT_DIRTY;
-    }
-}
-
-/* Display Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * GetVisibleLines --
- *
- * 	Calculates which lines are visible using the height
- *      of the viewport and y offset from the top of the text.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Only those line between first and last inclusive are
- * 	redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetVisibleLines(HText *htPtr)
-{
-    int topLine, bottomLine;
-    int firstY, lastY;
-    int lastLine;
-
-    if (htPtr->nLines == 0) {
-	htPtr->first = 0;
-	htPtr->last = -1;
-	return TCL_OK;
-    }
-    firstY = htPtr->pendingY;
-    lastLine = htPtr->nLines - 1;
-
-    /* First line */
-    topLine = LineSearch(htPtr, firstY, 0, lastLine);
-    if (topLine < 0) {
-	/*
-	 * This can't be. The y-coordinate offset must be corrupted.
-	 */
-	fprintf(stderr, "internal error: First position not found `%d'\n",
-	    firstY);
-	return TCL_ERROR;
-    }
-    htPtr->first = topLine;
-
-    /*
-     * If there is less text than window space, the bottom line is the
-     * last line of text.  Otherwise search for the line at the bottom
-     * of the window.
-     */
-    lastY = firstY + Tk_Height(htPtr->tkwin) - 1;
-    if (lastY < htPtr->worldHeight) {
-	bottomLine = LineSearch(htPtr, lastY, topLine, lastLine);
-    } else {
-	bottomLine = lastLine;
-    }
-    if (bottomLine < 0) {
-	/*
-	 * This can't be. The newY offset must be corrupted.
-	 */
-	fprintf(stderr, "internal error: Last position not found `%d'\n",
-	    lastY);
-#ifdef notdef
-	fprintf(stderr, "worldHeight=%d,height=%d,top=%d,first=%d,last=%d\n",
-	    htPtr->worldHeight, Tk_Height(htPtr->tkwin), firstY,
-	    htPtr->lineArr[topLine].offset, htPtr->lineArr[lastLine].offset);
-#endif
-	return TCL_ERROR;
-    }
-    htPtr->last = bottomLine;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawSegment --
- *
- * 	Draws a line segment, designated by the segment structure.
- *	This routine handles the display of selected text by drawing
- *	a raised 3D border underneath the selected text.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The line segment is drawn on *draw*.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawSegment(
-    HText *htPtr,
-    Drawable draw,
-    Line *linePtr,
-    int x, int y,
-    Segment *segPtr)
-{
-    int lastX, curPos, nChars;
-    int textLength;
-    int selStart, selEnd, selLength;
-    Blt_FontMetrics fontMetrics;
-
-#ifdef notdef
-    fprintf(stderr, "DS select: first=%d,last=%d text: first=%d,last=%d\n",
-	htPtr->selFirst, htPtr->selLast, segPtr->textStart, segPtr->textEnd);
-#endif
-    textLength = (segPtr->textEnd - segPtr->textStart) + 1;
-    if (textLength < 1) {
-	return;
-    }
-    Blt_GetFontMetrics(htPtr->font, &fontMetrics);
-    if ((segPtr->textEnd < htPtr->selFirst) ||
-	(segPtr->textStart > htPtr->selLast)) {	/* No selected text */
-	Blt_DrawChars(Tk_Display(htPtr->tkwin), draw, htPtr->drawGC, 
-		htPtr->font, Tk_Depth(htPtr->tkwin), 0.0f, 
-		htPtr->charArr + segPtr->textStart, textLength - 1, 
-		x, y + linePtr->baseline);
-	return;
-    }
-    /*
-     *	Text in a segment (with selected text) may have
-     *	up to three regions:
-     *
-     *	1) the text before the start the selection
-     *	2) the selected text itself (drawn in a raised border)
-     *	3) the text following the selection.
-     */
-
-    selStart = segPtr->textStart;
-    selEnd = segPtr->textEnd;
-    if (htPtr->selFirst > segPtr->textStart) {
-	selStart = htPtr->selFirst;
-    }
-    if (htPtr->selLast < segPtr->textEnd) {
-	selEnd = htPtr->selLast;
-    }
-    selLength = (selEnd - selStart) + 1;
-    lastX = x;
-    curPos = segPtr->textStart;
-
-    if (selStart > segPtr->textStart) {	/* Text preceding selection */
-	nChars = (selStart - segPtr->textStart);
-	Blt_MeasureChars(htPtr->font, htPtr->charArr + segPtr->textStart,
-		nChars, 10000, DEF_TEXT_FLAGS, &lastX);
-	lastX += x;
-	Blt_DrawChars(Tk_Display(htPtr->tkwin), draw, htPtr->drawGC, 
-		htPtr->font, Tk_Depth(htPtr->tkwin), 0.0f, 
-		htPtr->charArr + segPtr->textStart, nChars, 
-		x, y + linePtr->baseline);
-	curPos = selStart;
-    }
-    if (selLength > 0) {	/* The selection itself */
-	int width, nextX;
-
-	Blt_MeasureChars(htPtr->font, htPtr->charArr + selStart,
-	    selLength, 10000, DEF_TEXT_FLAGS, &nextX);
-	nextX += x;
-	width = (selEnd == linePtr->textEnd)
-	    ? htPtr->worldWidth - htPtr->xOffset - lastX :
-	    nextX - lastX;
-	Blt_FillBackgroundRectangle(htPtr->tkwin, draw, htPtr->selBg,
-	    lastX, y + linePtr->baseline - fontMetrics.ascent,
-	    width, fontMetrics.linespace, htPtr->selBW,
-	    TK_RELIEF_RAISED);
-	Blt_DrawChars(Tk_Display(htPtr->tkwin), draw, htPtr->selectGC, 
-		htPtr->font, Tk_Depth(htPtr->tkwin), 0.0f, 
-		htPtr->charArr + selStart, selLength, lastX, 
-		y + linePtr->baseline);
-	lastX = nextX;
-	curPos = selStart + selLength;
-    }
-    nChars = segPtr->textEnd - curPos;
-    if (nChars > 0) {		/* Text following the selection */
-	Blt_DrawChars(Tk_Display(htPtr->tkwin), draw, htPtr->drawGC, 
-		htPtr->font, Tk_Depth(htPtr->tkwin), 0.0f, 
-		htPtr->charArr + curPos, nChars - 1, lastX, 
-		y + linePtr->baseline);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveEmbeddedWidget --
- *
- * 	Move a embedded widget to a new location in the hypertext
- *	parent window.  If the window has no geometry (i.e. width,
- *	or height is 0), simply unmap to window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Each embedded widget is moved to its new location, generating
- *      Expose events in the parent for each embedded widget moved.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MoveEmbeddedWidget(EmbeddedWidget *winPtr, int offset)
-{
-    int winWidth, winHeight;
-    int width, height;
-    int deltaX, deltaY;
-    int x, y;
-    int intBW;
-
-    winWidth = GetEmbeddedWidgetWidth(winPtr);
-    winHeight = GetEmbeddedWidgetHeight(winPtr);
-    if ((winWidth < 1) || (winHeight < 1)) {
-	if (Tk_IsMapped(winPtr->tkwin)) {
-	    Tk_UnmapWindow(winPtr->tkwin);
-	}
-	return;
-    }
-    intBW = Tk_Changes(winPtr->tkwin)->border_width;
-    x = (winPtr->x + intBW + winPtr->padLeft) -
-	winPtr->htPtr->xOffset;
-    y = offset + (winPtr->y + intBW + winPtr->padTop) -
-	winPtr->htPtr->yOffset;
-
-    width = winPtr->cavityWidth - (2 * intBW + PADDING(winPtr->xPad));
-    if (width < 0) {
-	width = 0;
-    }
-    if ((width < winWidth) || (winPtr->fill & FILL_X)) {
-	winWidth = width;
-    }
-    deltaX = width - winWidth;
-
-    height = winPtr->cavityHeight - (2 * intBW + PADDING(winPtr->yPad));
-    if (height < 0) {
-	height = 0;
-    }
-    if ((height < winHeight) || (winPtr->fill & FILL_Y)) {
-	winHeight = height;
-    }
-    deltaY = height - winHeight;
-
-    if ((deltaX > 0) || (deltaY > 0)) {
-	XPoint point;
-
-	point = TranslateAnchor(deltaX, deltaY, winPtr->anchor);
-	x += point.x, y += point.y;
-    }
-    winPtr->winWidth = winWidth;
-    winPtr->winHeight = winHeight;
-
-    if ((x != Tk_X(winPtr->tkwin)) || (y != Tk_Y(winPtr->tkwin)) ||
-	(winWidth != Tk_Width(winPtr->tkwin)) ||
-	(winHeight != Tk_Height(winPtr->tkwin))) {
-	Tk_MoveResizeWindow(winPtr->tkwin, x, y, winWidth, winHeight);
-    }
-    if (!Tk_IsMapped(winPtr->tkwin)) {
-	Tk_MapWindow(winPtr->tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawPage --
- *
- * 	This procedure displays the lines of text and moves the widgets
- *      to their new positions.  It draws lines with regard to
- *	the direction of the scrolling.  The idea here is to make the
- *	text and buttons appear to move together. Otherwise you will
- *	get a "jiggling" effect where the windows appear to bump into
- *	the next line before that line is moved.  In the worst case, where
- *	every line has at least one widget, you can get an aquarium effect
- *      (lines appear to ripple up).
- *
- * 	The text area may start between line boundaries (to accommodate
- *	both variable height lines and constant scrolling). Subtract the
- *	difference of the page offset and the line offset from the starting
- *	coordinates. For horizontal scrolling, simply subtract the offset
- *	of the viewport. The window will clip the top of the first line,
- *	the bottom of the last line, whatever text extends to the left
- *	or right of the viewport on any line.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the line in its current
- * 	mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawPage(HText *htPtr, int deltaY) /* Change from previous Y coordinate */
-{
-    Line *linePtr;
-    EmbeddedWidget *winPtr;
-    Tk_Window tkwin = htPtr->tkwin;
-    Segment sgmt;
-    Pixmap pixmap;
-    int forceCopy;
-    int i;
-    int lineNum;
-    int x, y, lastY;
-    Blt_ChainLink link;
-    int width, height;
-    Display *display;
-
-    display = htPtr->display;
-    width = Tk_Width(tkwin);
-    height = Tk_Height(tkwin);
-
-    /* Create an off-screen pixmap for semi-smooth scrolling. */
-    pixmap = Tk_GetPixmap(display, Tk_WindowId(tkwin), width, height,
-	  Tk_Depth(tkwin));
-
-    x = -(htPtr->xOffset);
-    y = -(htPtr->yOffset);
-
-    if (htPtr->tileOffsetPage) {
-	Blt_SetBackgroundOrigin(htPtr->tkwin, htPtr->normalBg, x, y);
-    } else {
-	Blt_SetBackgroundOrigin(htPtr->tkwin, htPtr->normalBg, 0, 0);
-    }
-    Blt_FillBackgroundRectangle(htPtr->tkwin, pixmap, htPtr->normalBg, 0, 0, 
-	width, height, TK_RELIEF_FLAT, 0);
-
-    if (deltaY >= 0) {
-	y += htPtr->lineArr[htPtr->first].offset;
-	lineNum = htPtr->first;
-	lastY = 0;
-    } else {
-	y += htPtr->lineArr[htPtr->last].offset;
-	lineNum = htPtr->last;
-	lastY = height;
-    }
-    forceCopy = 0;
-
-    /* Draw each line */
-    for (i = htPtr->first; i <= htPtr->last; i++) {
-
-	/* Initialize character position in text buffer to start */
-	linePtr = htPtr->lineArr + lineNum;
-	sgmt.textStart = linePtr->textStart;
-	sgmt.textEnd = linePtr->textEnd;
-
-	/* Initialize X position */
-	x = -(htPtr->xOffset);
-	for (link = Blt_Chain_FirstLink(linePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    winPtr = Blt_Chain_GetValue(link);
-
-	    if (winPtr->tkwin != NULL) {
-		winPtr->flags |= WIDGET_VISIBLE;
-		MoveEmbeddedWidget(winPtr, linePtr->offset);
-	    }
-	    sgmt.textEnd = winPtr->precedingTextEnd - 1;
-	    if (sgmt.textEnd >= sgmt.textStart) {
-		DrawSegment(htPtr, pixmap, linePtr, x, y, &sgmt);
-		x += winPtr->precedingTextWidth;
-	    }
-	    /* Skip over the extra trailing space which designates the widget */
-	    sgmt.textStart = winPtr->precedingTextEnd + 1;
-	    x += winPtr->cavityWidth;
-	    forceCopy++;
-	}
-
-	/*
-	 * This may be the text trailing the last widget or the entire
-	 * line if no widgets occur on it.
-	 */
-	sgmt.textEnd = linePtr->textEnd;
-	if (sgmt.textEnd >= sgmt.textStart) {
-	    DrawSegment(htPtr, pixmap, linePtr, x, y, &sgmt);
-	}
-	/* Go to the top of the next line */
-	if (deltaY >= 0) {
-	    y += htPtr->lineArr[lineNum].height;
-	    lineNum++;
-	}
-	if ((forceCopy > 0) && !(htPtr->flags & TEXT_DIRTY)) {
-	    if (deltaY >= 0) {
-		XCopyArea(display, pixmap, Tk_WindowId(tkwin), htPtr->drawGC,
-			  0, lastY, width, y - lastY, 0, lastY);
-	    } else {
-		XCopyArea(display, pixmap, Tk_WindowId(tkwin), htPtr->drawGC,
-			  0, y, width, lastY - y, 0, y);
-	    }
-	    forceCopy = 0;	/* Reset drawing flag */
-	    lastY = y;		/* Record last Y position */
-	}
-	if ((deltaY < 0) && (lineNum > 0)) {
-	    --lineNum;
-	    y -= htPtr->lineArr[lineNum].height;
-	}
-    }
-    /*
-     * If the viewport was resized, draw the page in one operation.
-     * Otherwise draw any left-over block of text (either at the top
-     * or bottom of the page)
-     */
-    if (htPtr->flags & TEXT_DIRTY) {
-	XCopyArea(display, pixmap, Tk_WindowId(tkwin),
-	    htPtr->drawGC, 0, 0, width, height, 0, 0);
-    } else if (lastY != y) {
-	if (deltaY >= 0) {
-	    height -= lastY;
-	    XCopyArea(display, pixmap, Tk_WindowId(tkwin),
-		htPtr->drawGC, 0, lastY, width, height, 0, lastY);
-	} else {
-	    height = lastY;
-	    XCopyArea(display, pixmap, Tk_WindowId(tkwin),
-		htPtr->drawGC, 0, 0, width, height, 0, 0);
-	}
-    }
-    Tk_FreePixmap(display, pixmap);
-}
-
-
-static void
-SendBogusEvent(Tk_Window tkwin)
-{
-#define DONTPROPAGATE 0
-    XEvent event;
-
-    event.type = event.xexpose.type = Expose;
-    event.xexpose.window = Tk_WindowId(tkwin);
-    event.xexpose.display = Tk_Display(tkwin);
-    event.xexpose.count = 0;
-    event.xexpose.x = event.xexpose.y = 0;
-    event.xexpose.width = Tk_Width(tkwin);
-    event.xexpose.height = Tk_Height(tkwin);
-
-    XSendEvent(Tk_Display(tkwin), Tk_WindowId(tkwin), DONTPROPAGATE,
-	ExposureMask, &event);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayText --
- *
- * 	This procedure is invoked to display a hypertext widget.
- *	Many of the operations which might ordinarily be performed
- *	elsewhere (e.g. in a configuration routine) are done here
- *	because of the somewhat unusual interactions occurring between
- *	the parent and embedded widgets.
- *
- *      Recompute the layout of the text if necessary. This is
- *	necessary if the world coordinate system has changed.
- *	Specifically, the following may have occurred:
- *
- *	  1.  a text attribute has changed (font, linespacing, etc.).
- *	  2.  widget option changed (anchor, width, height).
- *        3.  actual embedded widget was resized.
- *	  4.  new text string or file.
- *
- *      This is deferred to the display routine since potentially
- *      many of these may occur (especially embedded widget changes).
- *
- *	Set the vertical and horizontal scrollbars (if they are
- *	designated) by issuing a TCL command.  Done here since
- *	the text window width and height are needed.
- *
- *	If the viewport position or contents have changed in the
- *	vertical direction,  the now out-of-view embedded widgets
- *	must be moved off the viewport.  Since embedded widgets will
- *	obscure the text window, it is imperative that the widgets
- *	are moved off before we try to redraw text in the same area.
- *      This is necessary only for vertical movements.  Horizontal
- *	embedded widget movements are handled automatically in the
- *	page drawing routine.
- *
- *      Get the new first and last line numbers for the viewport.
- *      These line numbers may have changed because either a)
- *      the viewport changed size or position, or b) the text
- *	(embedded widget sizes or text attributes) have changed.
- *
- *	If the viewport has changed vertically (i.e. the first or
- *      last line numbers have changed), move the now out-of-view
- *	embedded widgets off the viewport.
- *
- *      Potentially many expose events may be generated when the
- *	the individual embedded widgets are moved and/or resized.
- *	These events need to be ignored.  Since (I think) expose
- * 	events are guaranteed to happen in order, we can bracket
- *	them by sending phony events (via XSendEvent). The phony
- *      events turn on and off flags indicating which events
-*	should be ignored.
- *
- *	Finally, the page drawing routine is called.
- *
- * Results:
- *	None.
- *
- * Side effects:
- * 	Commands are output to X to display the hypertext in its
- *	current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayText(ClientData clientData) /* Information about widget. */
-{
-    HText *htPtr = clientData;
-    Tk_Window tkwin = htPtr->tkwin;
-    int oldFirst;		/* First line of old viewport */
-    int oldLast;		/* Last line of old viewport */
-    int deltaY;			/* Change in viewport in Y direction */
-    int reqWidth, reqHeight;
-
-#ifdef notdef
-    fprintf(stderr, "calling DisplayText(%s)\n", Tk_PathName(htPtr->tkwin));
-#endif
-    htPtr->flags &= ~REDRAW_PENDING;
-    if (tkwin == NULL) {
-	return;			/* Window has been destroyed */
-    }
-    if (htPtr->flags & REQUEST_LAYOUT) {
-	/*
-	 * Recompute the layout when widgets are created, deleted,
-	 * moved, or resized.  Also when text attributes (such as
-	 * font, linespacing) have changed.
-	 */
-	ComputeLayout(htPtr);
-    }
-    htPtr->lastWidth = Tk_Width(tkwin);
-    htPtr->lastHeight = Tk_Height(tkwin);
-
-    /*
-     * Check the requested width and height.  We allow two modes:
-     * 	1) If the user requested value is greater than zero, use it.
-     *  2) Otherwise, let the window be as big as the virtual text.
-     *	   This could be too large to display, so constrain it by
-     *	   the maxWidth and maxHeight values.
-     *
-     * In any event, we need to calculate the size of the virtual
-     * text and then make a geometry request.  This is so that widgets
-     * whose size is relative to the master, will be set once.
-     */
-    if (htPtr->reqWidth > 0) {
-	reqWidth = htPtr->reqWidth;
-    } else {
-	reqWidth = MIN(htPtr->worldWidth, htPtr->maxWidth);
-	if (reqWidth < 1) {
-	    reqWidth = 1;
-	}
-    }
-    if (htPtr->reqHeight > 0) {
-	reqHeight = htPtr->reqHeight;
-    } else {
-	reqHeight = MIN(htPtr->worldHeight, htPtr->maxHeight);
-	if (reqHeight < 1) {
-	    reqHeight = 1;
-	}
-    }
-    if ((reqWidth != Tk_ReqWidth(tkwin)) || (reqHeight != Tk_ReqHeight(tkwin))) {
-	Tk_GeometryRequest(tkwin, reqWidth, reqHeight);
-
-	EventuallyRedraw(htPtr);
-	return;			/* Try again with new geometry */
-    }
-    if (!Tk_IsMapped(tkwin)) {
-	return;
-    }
-    /*
-     * Turn off layout requests here, after the text window has been
-     * mapped.  Otherwise, relative embedded widget size requests wrt
-     * to the size of parent text window will be wrong.
-     */
-    htPtr->flags &= ~REQUEST_LAYOUT;
-
-    /* Is there a pending goto request? */
-    if (htPtr->flags & GOTO_PENDING) {
-	htPtr->pendingY = htPtr->lineArr[htPtr->reqLineNum].offset;
-	htPtr->flags &= ~GOTO_PENDING;
-    }
-    deltaY = htPtr->pendingY - htPtr->yOffset;
-    oldFirst = htPtr->first, oldLast = htPtr->last;
-
-    /*
-     * If the viewport has changed size or position, or the text
-     * and/or embedded widgets have changed, adjust the scrollbars to
-     * new positions.
-     */
-    if (htPtr->flags & TEXT_DIRTY) {
-	int width, height;
-
-	width = Tk_Width(htPtr->tkwin);
-	height = Tk_Height(htPtr->tkwin);
-
-	/* Reset viewport origin and world extents */
-	htPtr->xOffset = Blt_AdjustViewport(htPtr->pendingX,
-	    htPtr->worldWidth, width,
-	    htPtr->xScrollUnits, BLT_SCROLL_MODE_LISTBOX);
-	htPtr->yOffset = Blt_AdjustViewport(htPtr->pendingY,
-	    htPtr->worldHeight, height,
-	    htPtr->yScrollUnits, BLT_SCROLL_MODE_LISTBOX);
-	if (htPtr->xScrollCmdObjPtr != NULL) {
-	    Blt_UpdateScrollbar(htPtr->interp, htPtr->xScrollCmdObjPtr,
-		htPtr->xOffset, htPtr->xOffset + width, htPtr->worldWidth);
-	}
-	if (htPtr->yScrollCmdObjPtr != NULL) {
-	    Blt_UpdateScrollbar(htPtr->interp, htPtr->yScrollCmdObjPtr,
-		htPtr->yOffset, htPtr->yOffset + height, htPtr->worldHeight);
-	}
-	/*
-	 * Given a new viewport or text height, find the first and
-	 * last line numbers of the new viewport.
-	 */
-	if (GetVisibleLines(htPtr) != TCL_OK) {
-	    return;
-	}
-    }
-    /*
-     * 	This is a kludge: Send an expose event before and after
-     * 	drawing the page of text.  Since moving and resizing of the
-     * 	embedded widgets will cause redundant expose events in the parent
-     * 	window, the phony events will bracket them indicating no
-     * 	action should be taken.
-     */
-    SendBogusEvent(tkwin);
-
-    /*
-     * If either the position of the viewport has changed or the size
-     * of width or height of the entire text have changed, move the
-     * widgets from the previous viewport out of the current
-     * viewport. Worry only about the vertical embedded widget movements.
-     * The page is always draw at full width and the viewport will clip
-     * the text.
-     */
-    if ((htPtr->first != oldFirst) || (htPtr->last != oldLast)) {
-	int offset;
-	int i;
-	int first, last;
-	Blt_ChainLink link;
-	EmbeddedWidget *winPtr;
-
-	/* Figure out which lines are now out of the viewport */
-
-	if ((htPtr->first > oldFirst) && (htPtr->first <= oldLast)) {
-	    first = oldFirst, last = htPtr->first;
-	} else if ((htPtr->last < oldLast) && (htPtr->last >= oldFirst)) {
-	    first = htPtr->last, last = oldLast;
-	} else {
-	    first = oldFirst, last = oldLast;
-	}
-
-	for (i = first; i <= last; i++) {
-	    offset = htPtr->lineArr[i].offset;
-	    for (link = Blt_Chain_FirstLink(htPtr->lineArr[i].chain);
-		link != NULL; link = Blt_Chain_NextLink(link)) {
-		winPtr = Blt_Chain_GetValue(link);
-		if (winPtr->tkwin != NULL) {
-		    MoveEmbeddedWidget(winPtr, offset);
-		    winPtr->flags &= ~WIDGET_VISIBLE;
-		}
-	    }
-	}
-    }
-    DrawPage(htPtr, deltaY);
-    SendBogusEvent(tkwin);
-
-    /* Reset flags */
-    htPtr->flags &= ~TEXT_DIRTY;
-}
-
-/* Selection Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * TextSelectionProc --
- *
- *	This procedure is called back by Tk when the selection is
- *	requested by someone.  It returns part or all of the selection
- *	in a buffer provided by the caller.
- *
- * Results:
- *	The return value is the number of non-NULL bytes stored
- *	at buffer.  Buffer is filled (or partially filled) with a
- *	NULL-terminated string containing part or all of the selection,
- *	as given by offset and maxBytes.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TextSelectionProc(
-    ClientData clientData,	/* Information about Text widget. */
-    int offset,			/* Offset within selection of first
-				 * character to be returned. */
-    char *buffer,		/* Location in which to place
-				 * selection. */
-    int maxBytes)		/* Maximum number of bytes to place
-				 * at buffer, not including terminating
-				 * NULL character. */
-{
-    HText *htPtr = clientData;
-    int size;
-
-    if ((htPtr->selFirst < 0) || (!htPtr->exportSelection)) {
-	return -1;
-    }
-    size = (htPtr->selLast - htPtr->selFirst) + 1 - offset;
-    if (size > maxBytes) {
-	size = maxBytes;
-    }
-    if (size <= 0) {
-	return 0;		/* huh? */
-    }
-    strncpy(buffer, htPtr->charArr + htPtr->selFirst + offset, size);
-    buffer[size] = '\0';
-    return size;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextLostSelection --
- *
- *	This procedure is called back by Tk when the selection is
- *	grabbed away from a Text widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The existing selection is unhighlighted, and the window is
- *	marked as not containing a selection.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TextLostSelection(ClientData clientData) /* Information about Text widget. */
-{
-    HText *htPtr = clientData;
-
-    if ((htPtr->selFirst >= 0) && (htPtr->exportSelection)) {
-	htPtr->selFirst = htPtr->selLast = -1;
-	EventuallyRedraw(htPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectLine --
- *
- *	Modify the selection by moving both its anchored and un-anchored
- *	ends.  This could make the selection either larger or smaller.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectLine(
-    HText *htPtr,		/* Information about widget. */
-    int tindex)			/* Index of element that is to
-				 * become the "other" end of the
-				 * selection. */
-{
-    int selFirst, selLast;
-    int lineNum;
-    Line *linePtr;
-
-    lineNum = IndexSearch(htPtr, tindex, 0, htPtr->nLines - 1);
-    if (lineNum < 0) {
-	char string[200];
-
-	sprintf_s(string, 200, "can't determine line number from index \"%d\"",
-	    tindex);
-	Tcl_AppendResult(htPtr->interp, string, (char *)NULL);
-	return TCL_ERROR;
-    }
-    linePtr = htPtr->lineArr + lineNum;
-    /*
-     * Grab the selection if we don't own it already.
-     */
-    if ((htPtr->exportSelection) && (htPtr->selFirst == -1)) {
-	Tk_OwnSelection(htPtr->tkwin, XA_PRIMARY, TextLostSelection, htPtr);
-    }
-    selFirst = linePtr->textStart;
-    selLast = linePtr->textEnd;
-    htPtr->selAnchor = tindex;
-    if ((htPtr->selFirst != selFirst) ||
-	(htPtr->selLast != selLast)) {
-	htPtr->selFirst = selFirst;
-	htPtr->selLast = selLast;
-	EventuallyRedraw(htPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectWord --
- *
- *	Modify the selection by moving both its anchored and un-anchored
- *	ends.  This could make the selection either larger or smaller.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectWord(
-    HText *htPtr,		/* Information about widget. */
-    int tindex)			/* Index of element that is to
-				 * become the "other" end of the
-				 * selection. */
-{
-    int selFirst, selLast;
-    int i;
-
-    for (i = tindex; i < htPtr->nChars; i++) {
-	if (isspace(UCHAR(htPtr->charArr[i]))) {
-	    break;
-	}
-    }
-    selLast = i - 1;
-    for (i = tindex; i >= 0; i--) {
-	if (isspace(UCHAR(htPtr->charArr[i]))) {
-	    break;
-	}
-    }
-    selFirst = i + 1;
-    if (selFirst > selLast) {
-	selFirst = selLast = tindex;
-    }
-    /*
-     * Grab the selection if we don't own it already.
-     */
-    if ((htPtr->exportSelection) && (htPtr->selFirst == -1)) {
-	Tk_OwnSelection(htPtr->tkwin, XA_PRIMARY, TextLostSelection, htPtr);
-    }
-    htPtr->selAnchor = tindex;
-    if ((htPtr->selFirst != selFirst) || (htPtr->selLast != selLast)) {
-	htPtr->selFirst = selFirst, htPtr->selLast = selLast;
-	EventuallyRedraw(htPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectTextBlock --
- *
- *	Modify the selection by moving its un-anchored end.  This
- *	could make the selection either larger or smaller.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectTextBlock(
-    HText *htPtr,		/* Information about widget. */
-    int tindex)			/* Index of element that is to
-				 * become the "other" end of the
-				 * selection. */
-{
-    int selFirst, selLast;
-
-    /*
-     * Grab the selection if we don't own it already.
-     */
-
-    if ((htPtr->exportSelection) && (htPtr->selFirst == -1)) {
-	Tk_OwnSelection(htPtr->tkwin, XA_PRIMARY, TextLostSelection, htPtr);
-    }
-    /*  If the anchor hasn't been set yet, assume the beginning of the text*/
-    if (htPtr->selAnchor < 0) {
-	htPtr->selAnchor = 0;
-    }
-    if (htPtr->selAnchor <= tindex) {
-	selFirst = htPtr->selAnchor;
-	selLast = tindex;
-    } else {
-	selFirst = tindex;
-	selLast = htPtr->selAnchor;
-    }
-    if ((htPtr->selFirst != selFirst) || (htPtr->selLast != selLast)) {
-	htPtr->selFirst = selFirst, htPtr->selLast = selLast;
-	EventuallyRedraw(htPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectOp --
- *
- *	This procedure handles the individual options for text
- *	selections.  The selected text is designated by start and end
- *	indices into the text pool.  The selected segment has both a
- *	anchored and unanchored ends.  The following selection
- *	operations are implemented:
- *
- *	  "adjust"	- resets either the first or last index
- *			  of the selection.
- *	  "clear"	- clears the selection. Sets first/last
- *			  indices to -1.
- *	  "from"	- sets the index of the selection anchor.
- *	  "line"	- sets the first of last indices to the
- *			  start and end of the line at the
- *			  designated point.
- *	  "present"	- return "1" if a selection is available,
- *			  "0" otherwise.
- *	  "range"	- sets the first and last indices.
- *	  "to"		- sets the index of the un-anchored end.
- *	  "word"	- sets the first of last indices to the
- *			  start and end of the word at the
- *			  designated point.
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    char *string;
-    char c;
-    int iselection;
-    int length;
-    int result = TCL_OK;
-
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    if ((c == 'c') && (strncmp(string, "clear", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " selection clear\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (htPtr->selFirst != -1) {
-	    htPtr->selFirst = htPtr->selLast = -1;
-	    EventuallyRedraw(htPtr);
-	}
-	return TCL_OK;
-    } else if ((c == 'p') && (strncmp(string, "present", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " selection present\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tcl_AppendResult(interp, (htPtr->selFirst != -1) ? "0" : "1",
-	    (char *)NULL);
-	return TCL_OK;
-    } else if ((c == 'r') && (strncmp(string, "range", length) == 0)) {
-	int selFirst, selLast;
-
-	if (objc != 5) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " selection range first last\"", 
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (GetIndex(htPtr, objv[3], &selFirst) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (GetIndex(htPtr, objv[4], &selLast) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	htPtr->selAnchor = selFirst;
-	SelectTextBlock(htPtr, selLast);
-	return TCL_OK;
-    }
-    if (objc != 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " selection ", 
-		Tcl_GetString(objv[2]), " index\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetIndex(htPtr, objv[3], &iselection) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((c == 'f') && (strncmp(string, "from", length) == 0)) {
-	htPtr->selAnchor = iselection;
-    } else if ((c == 'a') && (strncmp(string, "adjust", length) == 0)) {
-	int half1, half2;
-
-	half1 = (htPtr->selFirst + htPtr->selLast) / 2;
-	half2 = (htPtr->selFirst + htPtr->selLast + 1) / 2;
-	if (iselection < half1) {
-	    htPtr->selAnchor = htPtr->selLast;
-	} else if (iselection > half2) {
-	    htPtr->selAnchor = htPtr->selFirst;
-	}
-	result = SelectTextBlock(htPtr, iselection);
-    } else if ((c == 't') && (strncmp(string, "to", length) == 0)) {
-	result = SelectTextBlock(htPtr, iselection);
-    } else if ((c == 'w') && (strncmp(string, "word", length) == 0)) {
-	result = SelectWord(htPtr, iselection);
-    } else if ((c == 'l') && (strncmp(string, "line", length) == 0)) {
-	result = SelectLine(htPtr, iselection);
-    } else {
-	Tcl_AppendResult(interp, "bad selection operation \"", string,
-	    "\": should be \"adjust\", \"clear\", \"from\", \"line\", \
-\"present\", \"range\", \"to\", or \"word\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GotoOp --
- *
- *	Move the top line of the viewport to the new location based
- *	upon the given line number.  Force out-of-range requests to the
- *	top or bottom of text.
- *
- * Results:
- *	A standard TCL result. If TCL_OK, interp->result contains the
- *	current line number.
- *
- * Side effects:
- *	At the next idle point, the text viewport will be move to the
- *	new line.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-GotoOp(
-    HText *htPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int line;
-
-    line = htPtr->first;
-    if (objc == 3) {
-	int tindex;
-
-	if (GetIndex(htPtr, objv[2], &tindex) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	line = IndexSearch(htPtr, tindex, 0, htPtr->nLines - 1);
-	if (line < 0) {
-	    char string[200];
-
-	    sprintf_s(string, 200, 
-		"can't determine line number from index \"%d\"", tindex);
-	    Tcl_AppendResult(htPtr->interp, string, (char *)NULL);
-	    return TCL_ERROR;
-	}
-	htPtr->reqLineNum = line;
-	htPtr->flags |= TEXT_DIRTY;
-
-	/*
-	 * Make only a request for a change in the viewport.  Defer
-	 * the actual scrolling until the text layout is adjusted at
-	 * the next idle point.
-	 */
-	if (line != htPtr->first) {
-	    htPtr->flags |= GOTO_PENDING;
-	    EventuallyRedraw(htPtr);
-	}
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(htPtr->interp), line);
-    return TCL_OK;
-}
-
-
-static int
-XViewOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int width, worldWidth;
-
-    width = Tk_Width(htPtr->tkwin);
-    worldWidth = htPtr->worldWidth;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/* Report first and last fractions */
-	fract = (double)htPtr->xOffset / worldWidth;
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(CLAMP(fract, 0.0, 1.0)));
-	fract = (double)(htPtr->xOffset + width) / worldWidth;
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(CLAMP(fract, 0.0, 1.0)));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    htPtr->pendingX = htPtr->xOffset;
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &htPtr->pendingX,
-	    worldWidth, width, htPtr->xScrollUnits, BLT_SCROLL_MODE_LISTBOX) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    htPtr->flags |= TEXT_DIRTY;
-    EventuallyRedraw(htPtr);
-    return TCL_OK;
-}
-
-static int
-YViewOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int height, worldHeight;
-
-    height = Tk_Height(htPtr->tkwin);
-    worldHeight = htPtr->worldHeight;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	/* Report first and last fractions */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	fract = (double)htPtr->yOffset / worldHeight;
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(CLAMP(fract, 0.0, 1.0)));
-	fract = (double)(htPtr->yOffset + height) / worldHeight;
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(CLAMP(fract, 0.0, 1.0)));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    htPtr->pendingY = htPtr->yOffset;
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &htPtr->pendingY,
-	    worldHeight, height, htPtr->yScrollUnits, BLT_SCROLL_MODE_LISTBOX)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    htPtr->flags |= TEXT_DIRTY;
-    EventuallyRedraw(htPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AppendOp --
- *
- * 	This procedure embeds a Tk widget into the hypertext.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	Memory is allocated.  EmbeddedWidget gets configured.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AppendOp(
-    HText *htPtr,		/* Hypertext widget */
-    Tcl_Interp *interp,		/* Interpreter associated with widget */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Line *linePtr;
-    EmbeddedWidget *winPtr;
-
-    winPtr = CreateEmbeddedWidget(htPtr, Tcl_GetString(objv[2]));
-    if (winPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, htPtr->tkwin, widgetConfigSpecs,
-	    objc - 3, objv + 3, (char *)winPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Append widget to list of embedded widgets of the last line.
-     */
-    linePtr = GetLastLine(htPtr);
-    if (linePtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate line structure", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Blt_Chain_Append(linePtr->chain, winPtr);
-    linePtr->width += winPtr->cavityWidth;
-    winPtr->precedingTextEnd = linePtr->textEnd;
-
-    htPtr->flags |= (WIDGET_APPENDED | REQUEST_LAYOUT);
-    EventuallyRedraw(htPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowsOp --
- *
- *	Returns a list of all the pathNames of embedded widgets of the
- *	HText widget.  If a pattern argument is given, only the names
- *	of windows matching it will be placed into the list.
- *
- * Results:
- *	Standard TCL result.  If TCL_OK, interp->result will contain
- *	the list of the embedded widget pathnames.  Otherwise it will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-WindowsOp(
-    HText *htPtr,		/* Hypertext widget record */
-    Tcl_Interp *interp,		/* Interpreter associated with widget */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    char *name;
-    char *pattern;
-
-    pattern = (objc == 2) ? NULL : Tcl_GetString(objv[2]);
-    for (hPtr = Blt_FirstHashEntry(&htPtr->widgetTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	EmbeddedWidget *winPtr;
-
-	winPtr = Blt_GetHashValue(hPtr);
-	if (winPtr->tkwin == NULL) {
-	    fprintf(stderr, "window `%s' is null\n",
-		Tk_PathName(Blt_GetHashKey(&htPtr->widgetTable, hPtr)));
-	    continue;
-	}
-	name = Tk_PathName(winPtr->tkwin);
-	if ((pattern == NULL) || (Tcl_StringMatch(name, pattern))) {
-	    Tcl_AppendElement(interp, name);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    char *itemPtr;
-    Blt_ConfigSpec *specsPtr;
-    char *string;
-
-    if (objc > 3) {
-	string = Tcl_GetString(objv[2]);
-	if (string[0] == '.') {
-	    Tk_Window tkwin;
-	    EmbeddedWidget *winPtr;
-	    
-	    /* EmbeddedWidget window to be configured */
-	    tkwin = Tk_NameToWindow(interp, string, htPtr->tkwin);
-	    if (tkwin == NULL) {
-		return TCL_ERROR;
-	    }
-	    winPtr = FindEmbeddedWidget(htPtr, tkwin);
-	    if (winPtr == NULL) {
-		Tcl_AppendResult(interp, "window \"", string,
-				 "\" is not managed by \"", 
-				 Tcl_GetString(objv[0]), "\"", 
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    specsPtr = widgetConfigSpecs;
-	    itemPtr = (char *)winPtr;
-	    return Blt_ConfigureValueFromObj(interp, htPtr->tkwin, specsPtr, 
-					     itemPtr, objv[3], 0);
-	}
-    }
-    specsPtr = configSpecs;
-    itemPtr = (char *)htPtr;
-    return Blt_ConfigureValueFromObj(interp, htPtr->tkwin, specsPtr, 
-	itemPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or reconfigure)
- *	a hypertext widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- * 	etc. get set for htPtr;  old resources get freed, if there were any.
- * 	The hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    char *itemPtr;
-    Blt_ConfigSpec *specsPtr;
-
-    if (objc > 2) {
-	char *string;
-
-	string = Tcl_GetString(objv[2]);
-	if (string[0] == '.') {
-	    Tk_Window tkwin;
-	    EmbeddedWidget *winPtr;
-	    
-	    /* EmbeddedWidget window to be configured */
-	    tkwin = Tk_NameToWindow(interp, string, htPtr->tkwin);
-	    if (tkwin == NULL) {
-		return TCL_ERROR;
-	    }
-	    winPtr = FindEmbeddedWidget(htPtr, tkwin);
-	    if (winPtr == NULL) {
-		Tcl_AppendResult(interp, "window \"", string,
-			"\" is not managed by \"", Tcl_GetString(objv[0]), 
-			"\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    specsPtr = widgetConfigSpecs;
-	    itemPtr = (char *)winPtr;
-	    objv++;
-	    objc--;
-	    goto config;
-	}
-    }
-    specsPtr = configSpecs;
-    itemPtr = (char *)htPtr;
- config:
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, htPtr->tkwin, specsPtr, itemPtr,
-		(Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, htPtr->tkwin, specsPtr, itemPtr,
-		objv[2], 0);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, htPtr->tkwin, specsPtr, objc - 2,
-	    objv + 2, itemPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == (char *)htPtr) {
-	/* Reconfigure the master */
-	if (ConfigureText(interp, htPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	htPtr->flags |= REQUEST_LAYOUT;
-    }
-    EventuallyRedraw(htPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan for hypertext widgets.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    char *string;
-    char c;
-    int length;
-    int x, y;
-
-    string = Tcl_GetString(objv[3]);
-    if (Blt_GetXY(interp, htPtr->tkwin, string, &x, &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	htPtr->scanMark.x = x, htPtr->scanMark.y = y;
-	htPtr->scanPt.x = htPtr->xOffset;
-	htPtr->scanPt.y = htPtr->yOffset;
-
-    } else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	int px, py;
-
-	px = htPtr->scanPt.x - (10 * (x - htPtr->scanMark.x));
-	py = htPtr->scanPt.y - (10 * (y - htPtr->scanMark.y));
-
-	if (px < 0) {
-	    px = htPtr->scanPt.x = 0;
-	    htPtr->scanMark.x = x;
-	} else if (px >= htPtr->worldWidth) {
-	    px = htPtr->scanPt.x = htPtr->worldWidth - htPtr->xScrollUnits;
-	    htPtr->scanMark.x = x;
-	}
-	if (py < 0) {
-	    py = htPtr->scanPt.y = 0;
-	    htPtr->scanMark.y = y;
-	} else if (py >= htPtr->worldHeight) {
-	    py = htPtr->scanPt.y = htPtr->worldHeight - htPtr->yScrollUnits;
-	    htPtr->scanMark.y = y;
-	}
-	if ((py != htPtr->pendingY) || (px != htPtr->pendingX)) {
-	    htPtr->pendingX = px, htPtr->pendingY = py;
-	    htPtr->flags |= TEXT_DIRTY;
-	    EventuallyRedraw(htPtr);
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad scan operation \"", string,
-	    "\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchOp --
- *
- *	Returns the linenumber of the next line matching the given
- *	pattern within the range of lines provided.  If the first
- *	line number is greater than the last, the search is done in
- *	reverse.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SearchOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    const char *startPtr;
-    Tcl_RegExp regExpToken;
-    int iFirst, iLast;
-    int matchStart, matchEnd;
-    int match;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    regExpToken = Tcl_RegExpCompile(interp, string);
-    if (regExpToken == NULL) {
-	return TCL_ERROR;
-    }
-    iFirst = 0;
-    iLast = htPtr->nChars;
-    if (objc > 3) {
-	if (GetIndex(htPtr, objv[3], &iFirst) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (objc == 4) {
-	if (GetIndex(htPtr, objv[4], &iLast) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (iLast < iFirst) {
-	return TCL_ERROR;
-    }
-    matchStart = matchEnd = -1;
-    startPtr = htPtr->charArr + iFirst;
-    {
-	char *p;
-	char saved;
-
-	p = htPtr->charArr + (iLast + 1);
-	saved = *p;
-	*p = '\0';		/* Make the line a string by changing the
-				 * '\n' into a NUL byte before searching */
-	match = Tcl_RegExpExec(interp, regExpToken, startPtr, startPtr);
-	*p = saved;
-    }
-    if (match < 0) {
-	return TCL_ERROR;
-    } else if (match > 0) {
-	const char *endPtr;
-
-	Tcl_RegExpRange(regExpToken, 0, &startPtr, &endPtr);
-	if ((startPtr != NULL) || (endPtr != NULL)) {
-	    matchStart = startPtr - htPtr->charArr;
-	    matchEnd = endPtr - htPtr->charArr - 1;
-	}
-    }
-    if (match > 0) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(matchStart));
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(matchEnd));
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	Tcl_ResetResult(interp);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RangeOp --
- *
- *	Returns the characters designated by the range of elements.
- *
- *---------------------------------------------------------------------------
- */
-static int
-RangeOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    char *startPtr, *endPtr;
-    char saved;
-    int textFirst, textLast;
-
-    textFirst = htPtr->selFirst;
-    textLast = htPtr->selLast;
-    if (textFirst < 0) {
-	textFirst = 0;
-	textLast = htPtr->nChars - 1;
-    }
-    if (objc > 2) {
-	if (GetIndex(htPtr, objv[2], &textFirst) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (objc == 4) {
-	if (GetIndex(htPtr, objv[3], &textLast) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (textLast < textFirst) {
-	Tcl_AppendResult(interp, "first index is greater than last", 
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    startPtr = htPtr->charArr + textFirst;
-    endPtr = htPtr->charArr + (textLast + 1);
-    saved = *endPtr;
-    *endPtr = '\0';		/* Make the line into a string by
-				 * changing the * '\n' into a '\0'
-				 * before copying */
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), startPtr, -1);
-    *endPtr = saved;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    int tindex;
-
-    if (GetIndex(htPtr, objv[2], &tindex) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), tindex);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LinePosOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-LinePosOp(
-    HText *htPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    int line, cpos, tindex;
-    char string[200];
-
-    if (GetIndex(htPtr, objv[2], &tindex) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetTextPosition(htPtr, tindex, &line, &cpos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    sprintf_s(string, 200, "%d.%d", line, cpos);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), string, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextWidgetCmd --
- *
- * 	This procedure is invoked to process the TCL command that
- *	corresponds to a widget managed by this module. See the user
- * 	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec textOps[] =
-{
-    {"append", 1, AppendOp, 3, 0, "window ?option value?...",},
-    {"cget", 2, CgetOp, 3, 3, "?window? option",},
-    {"configure", 2, ConfigureOp, 2, 0,
-	"?window? ?option value?...",},
-    {"gotoline", 2, GotoOp, 2, 3, "?line?",},
-    {"index", 1, IndexOp, 3, 3, "string",},
-    {"linepos", 1, LinePosOp, 3, 3, "string",},
-    {"range", 2, RangeOp, 2, 4, "?from? ?to?",},
-    {"scan", 2, ScanOp, 4, 4, "oper @x,y",},
-    {"search", 3, SearchOp, 3, 5, "pattern ?from? ?to?",},
-    {"selection", 3, SelectOp, 3, 5, "oper ?index?",},
-    {"windows", 6, WindowsOp, 2, 3, "?pattern?",},
-    {"xview", 1, XViewOp, 2, 5,
-	"?moveto fract? ?scroll number what?",},
-    {"yview", 1, YViewOp, 2, 5,
-	"?moveto fract? ?scroll number what?",},
-};
-static int nTextOps = sizeof(textOps) / sizeof(Blt_OpSpec);
-
-static int
-TextWidgetCmd(
-    ClientData clientData,	/* Information about hypertext widget. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    HTextCmdProc *proc;
-    int result;
-    HText *htPtr = clientData;
-
-    proc = Blt_GetOpFromObj(interp, nTextOps, textOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(htPtr);
-    result = (*proc) (htPtr, interp, objc, objv);
-    Tcl_Release(htPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextCmd --
- *
- * 	This procedure is invoked to process the "htext" TCL command.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-TextCmd(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    HText *htPtr;
-    Screen *screenPtr;
-    Tk_Window tkwin;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    htPtr = Blt_AssertCalloc(1, sizeof(HText));
-    tkwin = Tk_MainWindow(interp);
-    tkwin = Tk_CreateWindowFromPath(interp, tkwin, Tcl_GetString(objv[1]), 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	Blt_Free(htPtr);
-	return TCL_ERROR;
-    }
-    /* Initialize the new hypertext widget */
-
-    Tk_SetClass(tkwin, "Htext");
-    htPtr->tkwin = tkwin;
-    htPtr->display = Tk_Display(tkwin);
-    htPtr->interp = interp;
-    htPtr->nLines = htPtr->arraySize = 0;
-    htPtr->leader = 1;
-    htPtr->xScrollUnits = htPtr->yScrollUnits = 10;
-    htPtr->nRows = htPtr->nColumns = 0;
-    htPtr->selFirst = htPtr->selLast = -1;
-    htPtr->selAnchor = 0;
-    htPtr->exportSelection = TRUE;
-    htPtr->selBW = 2;
-    screenPtr = Tk_Screen(htPtr->tkwin);
-    htPtr->maxWidth = WidthOfScreen(screenPtr);
-    htPtr->maxHeight = HeightOfScreen(screenPtr);
-    Blt_InitHashTable(&htPtr->widgetTable, BLT_ONE_WORD_KEYS);
-
-    Tk_CreateSelHandler(tkwin, XA_PRIMARY, XA_STRING, TextSelectionProc,
-	htPtr, XA_STRING);
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	TextEventProc, htPtr);
-    Blt_SetWindowInstanceData(tkwin, htPtr);
-
-    /*
-     *-------------------------------------------------------------------------------
-     *
-     *  Create the widget command before configuring the widget. This
-     *  is because the "-file" and "-text" options may have embedded
-     *  commands that self-reference the widget through the
-     *  "$blt_htext(widget)" variable.
-     *
-     *-------------------------------------------------------------------------------
-     */
-    htPtr->cmdToken = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[1]), 
-	TextWidgetCmd, htPtr, TextDeleteCmdProc);
-    if ((Blt_ConfigureWidgetFromObj(interp, htPtr->tkwin, configSpecs, objc - 2,
-		objv + 2, (char *)htPtr, 0) != TCL_OK) ||
-	(ConfigureText(interp, htPtr) != TCL_OK)) {
-	Tk_DestroyWindow(htPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-int
-Blt_HtextCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"htext", TextCmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_HTEXT */
diff --git a/blt3.0/src/bltImage.c b/blt3.0/src/bltImage.c
deleted file mode 100644
index 5a7a869..0000000
--- a/blt3.0/src/bltImage.c
+++ /dev/null
@@ -1,155 +0,0 @@
-
-/*
- * bltImage.c --
- *
- * This module implements image processing procedures for the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining a
- *	copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be included
- *	in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *	OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltImage.h"
-#include <X11/Xutil.h>
-
-/*
- * Each call to Tk_GetImage returns a pointer to one of the following
- * structures, which is used as a token by clients (widgets) that display
- * images.
- */
-typedef struct _TkImage {
-    Tk_Window tkwin;			/* Window passed to Tk_GetImage (needed
-					 * to "re-get" the image later if the *
-					 * manager changes). */
-    Display *display;			/* Display for tkwin.  Needed because
-					 * when the image is eventually freed
-					 * tkwin may not exist anymore. */
-    struct _TkImageMaster *masterPtr;	/* Master for this image (identifiers
-					 * image manager, for example). */
-    ClientData instanceData;		/* One word argument to pass to image
-					 * manager when dealing with this image
-					 * instance. */
-    Tk_ImageChangedProc *changeProc;	/* Code in widget to call when image
-					 * changes in a way that affects
-					 * redisplay. */
-    ClientData widgetClientData;	/* Argument to pass to changeProc. */
-    struct _TkImage *nextPtr;		/* Next in list of all image instances
-					 * associated with the same name. */
-} TkImage;
-
-/*
- * For each image master there is one of the following structures, which
- * represents a name in the image table and all of the images instantiated from
- * it.  Entries in mainPtr->imageTable point to these structures.
- */
-typedef struct _TkImageMaster {
-    Tk_ImageType *typePtr;		/* Information about image type.  NULL
-					 * means that no image manager owns this
-					 * image: the image was deleted. */
-    ClientData masterData;		/* One-word argument to pass to image
-					 * mgr when dealing with the master, as
-					 * opposed to instances. */
-    int width, height;			/* Last known dimensions for image. */
-    void *tablePtr;			/* Pointer to hash table containing
-					 * image (the imageTable field in some
-					 * TkMainInfo structure). */
-    void *hPtr;				/* Hash entry in mainPtr->imageTable for
-					 * this structure (used to delete the
-					 * hash entry). */
-    void *instancePtr;			/* Pointer to first in list of instances
-					 * derived from this name. */
-    int deleted;			/* Flag set when image is being 
-					 * deleted. */
-    Tk_Window tkwin;			/* Main window of interpreter (used to
-					 * detect when the world is falling
-					 * apart.) */
-} TkImageMaster;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Image_IsDeleted --
- *
- *	Is there any other way to determine if an image has been deleted?
- *
- * Results:
- *	Returns 1 if the image has been deleted, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-int
-Blt_Image_IsDeleted(Tk_Image tkImage)	/* Token for image. */
-{
-    TkImage *imagePtr = (TkImage *) tkImage;
-
-    if (imagePtr->masterPtr == NULL) {
-	return TRUE;
-    }
-    return (imagePtr->masterPtr->typePtr == NULL);
-}
-
-/*LINTLIBRARY*/
-Tk_ImageMaster
-Blt_Image_GetMaster(Tk_Image tkImage)	/* Token for image. */
-{
-    TkImage *imagePtr = (TkImage *)tkImage;
-
-    return (Tk_ImageMaster)imagePtr->masterPtr;
-}
-
-/*LINTLIBRARY*/
-ClientData
-Blt_Image_GetInstanceData(Tk_Image tkImage) /* Token for image. */
-{
-    TkImage *imagePtr = (TkImage *)tkImage;
-
-    return imagePtr->instanceData;
-}
-
-/*LINTLIBRARY*/
-Tk_ImageType *
-Blt_Image_GetType(Tk_Image tkImage)	/* Token for image. */
-{
-    TkImageMaster *masterPtr;
-
-    masterPtr = Blt_Image_GetMaster(tkImage);
-    return masterPtr->typePtr;
-}
-
-const char *
-Blt_Image_Name(Tk_Image tkImage)
-{
-    Tk_ImageMaster master;
-
-    master = Blt_Image_GetMaster(tkImage);
-    return Tk_NameOfImage(master);
-}
-
-const char *
-Blt_Image_NameOfType(Tk_Image tkImage)
-{
-    TkImageMaster *masterPtr;
-
-    masterPtr = Blt_Image_GetMaster(tkImage);
-    return masterPtr->typePtr->name;
-}
-
diff --git a/blt3.0/src/bltImage.h b/blt3.0/src/bltImage.h
deleted file mode 100644
index 1f5d553..0000000
--- a/blt3.0/src/bltImage.h
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/*
- * bltImage.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_IMAGE_H
-#define _BLT_IMAGE_H
-
-#define ROTATE_0	0
-#define ROTATE_90	1
-#define ROTATE_180	2
-#define ROTATE_270	3
-
-BLT_EXTERN int Blt_IsPicture(Tk_Image tkImage);
-
-/* Routines that really should be in the Tk image C API. */
-
-BLT_EXTERN int Blt_Image_IsDeleted(Tk_Image tkImage);
-
-BLT_EXTERN Tk_ImageMaster Blt_Image_GetMaster(Tk_Image tkImage);
-
-BLT_EXTERN Tk_ImageType *Blt_Image_GetType(Tk_Image tkImage);
-
-BLT_EXTERN ClientData Blt_Image_GetInstanceData(Tk_Image tkImage);
-
-BLT_EXTERN const char *Blt_Image_Name(Tk_Image tkImage);
-BLT_EXTERN const char *Blt_Image_NameOfType(Tk_Image tkImage);
-
-#endif /*_BLT_IMAGE_H*/
diff --git a/blt3.0/src/bltInit.c b/blt3.0/src/bltInit.c
deleted file mode 100644
index e0d1088..0000000
--- a/blt3.0/src/bltInit.c
+++ /dev/null
@@ -1,124 +0,0 @@
-
-/*
- * bltInit.c --
- *
- * This module initials the BLT toolkit, registering its commands with the
- * Tcl/Tk interpreter.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltNsUtil.h"
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitCmd --
- *
- *      Given the name of a command, return a pointer to the clientData field
- *      of the command.
- *
- * Results:
- *      A standard TCL result. If the command is found, TCL_OK is returned
- *      and clientDataPtr points to the clientData field of the command (if
- *      the clientDataPtr in not NULL).
- *
- * Side effects:
- *      If the command is found, clientDataPtr is set to the address of the
- *      clientData of the command.  If not found, an error message is left
- *      in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_InitCmd(Tcl_Interp *interp, const char *nsName, Blt_InitCmdSpec *specPtr)
-{
-    const char *cmdPath;
-    Tcl_DString dString;
-    Tcl_Command cmdToken;
-    Tcl_Namespace *nsPtr;
-
-    Tcl_DStringInit(&dString);
-    if (nsName != NULL) {
-	Tcl_DStringAppend(&dString, nsName, -1);
-    } 
-    Tcl_DStringAppend(&dString, "::", -1);
-    Tcl_DStringAppend(&dString, specPtr->name, -1);
-
-    cmdPath = Tcl_DStringValue(&dString);
-    cmdToken = Tcl_FindCommand(interp, cmdPath, (Tcl_Namespace *)NULL, 0);
-    if (cmdToken != NULL) {
-	Tcl_DStringFree(&dString);
-	return TCL_OK;		/* Assume command was already initialized */
-    }
-    cmdToken = Tcl_CreateObjCommand(interp, cmdPath, specPtr->cmdProc, 
-	specPtr->clientData, specPtr->cmdDeleteProc);
-    Tcl_DStringFree(&dString);
-    nsPtr = Tcl_FindNamespace(interp, nsName, (Tcl_Namespace *)NULL,
-	TCL_LEAVE_ERR_MSG);
-    if (nsPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_Export(interp, nsPtr, specPtr->name, FALSE) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitCmds --
- *
- *      Given the name of a command, return a pointer to the clientData field
- *      of the command.
- *
- * Results:
- *      A standard TCL result. If the command is found, TCL_OK is returned and
- *      clientDataPtr points to the clientData field of the command (if the
- *      clientDataPtr in not NULL).
- *
- * Side effects:
- *      If the command is found, clientDataPtr is set to the address of the
- *      clientData of the command.  If not found, an error message is left in
- *      interp->result.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_InitCmds(
-    Tcl_Interp *interp, 
-    const char *nsName, 
-    Blt_InitCmdSpec *specs, 
-    int nCmds)
-{
-    Blt_InitCmdSpec *sp, *endPtr;
-
-    for (sp = specs, endPtr = specs + nCmds; sp < endPtr; sp++) {
-	if (Blt_InitCmd(interp, nsName, sp) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
diff --git a/blt3.0/src/bltInt.h b/blt3.0/src/bltInt.h
deleted file mode 100644
index b1ee871..0000000
--- a/blt3.0/src/bltInt.h
+++ /dev/null
@@ -1,896 +0,0 @@
-
-/*
- * bltInt.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_INT_H
-#define _BLT_INT_H
-
-#undef SIZEOF_LONG
-#include "config.h"
-#include "blt.h"
-
-#undef  BLT_STORAGE_CLASS
-#define BLT_STORAGE_CLASS	DLLEXPORT
-
-#define _VERSION(a,b,c)	    (((a) << 16) + ((b) << 8) + (c))
-
-#define _TCL_VERSION _VERSION(TCL_MAJOR_VERSION, TCL_MINOR_VERSION, TCL_RELEASE_SERIAL)
-#define _TK_VERSION _VERSION(TK_MAJOR_VERSION, TK_MINOR_VERSION, TK_RELEASE_SERIAL)
-
-#ifndef __WIN32__
-#   if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__)
-#	define __WIN32__
-#	ifndef WIN32
-#	    define WIN32
-#	endif
-#   endif
-#endif
-
-#ifdef _MSC_VER
-#  define _CRT_SECURE_NO_DEPRECATE
-#  define _CRT_NONSTDC_NO_DEPRECATE
-#endif
-
-#ifdef WIN32
-#  define STRICT
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  undef STRICT
-#  undef WIN32_LEAN_AND_MEAN
-#  include <windowsx.h>
-#endif /* WIN32 */
-
-#include <tcl.h>
-
-#ifdef USE_TCL_STUBS
-#  include "tclIntDecls.h"
-#  ifdef WIN32
-#    include "tclIntPlatDecls.h"
-#  endif
-#endif	/* USE_TCL_STUBS */
-
-#define USE_COMPOSITELESS_PHOTO_PUT_BLOCK 
-#include <tk.h>
-
-#ifdef USE_TK_STUBS
-#  include "tkIntDecls.h"
-#  ifdef WIN32
-#    include "tkPlatDecls.h"
-#    include "tkIntXlibDecls.h"
-#  endif
-#endif	/* USE_TK_STUBS */
-
-#include <stdio.h>
-
-#ifdef WIN32 
-#  ifndef __GNUC__
-#    ifdef O_NONBLOCK
-#      define O_NONBLOCK	1
-#    endif
-#  endif /* __GNUC__ */
-
-#endif /* WIN32 */
-
-#ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-#endif /* HAVE_STDLIB_H */
-
-#ifdef HAVE_STDDEF_H
-#  include <stddef.h>
-#endif /* HAVE_STDDEF_H */
-
-#ifdef HAVE_ERRNO_H
-#  include <errno.h>
-#endif /* HAVE_ERRNO_H */
-
-#ifdef HAVE_CTYPE_H
-#  include <ctype.h>
-#endif /* HAVE_CTYPE_H */
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#ifdef HAVE_LIMITS_H
-#  include <limits.h>
-#endif
-
-#include "bltMath.h"
-#include "bltString.h"
-
-#undef INLINE
-
-#ifdef __GNUC__
-#  define INLINE __inline__
-#else
-#  define INLINE
-#endif
-
-#if 0 && defined(__GNUC__) && defined(HAVE_X86) && defined(__OPTIMIZE__)
-#  define HAVE_X86_ASM
-#endif
-
-#undef VARARGS
-#ifdef __cplusplus
-#  define ANYARGS (...)
-#  define VARARGS(first)  (first, ...)
-#  define VARARGS2(first, second)  (first, second, ...)
-#else
-#  define ANYARGS ()
-#  define VARARGS(first) ()
-#  define VARARGS2(first, second) ()
-#endif /* __cplusplus */
-
-#undef MIN
-#define MIN(a,b)	(((a)<(b))?(a):(b))
-
-#undef MAX
-#define MAX(a,b)	(((a)>(b))?(a):(b))
-
-#undef MIN3
-#define MIN3(a,b,c)	(((a)<(b))?(((a)<(c))?(a):(c)):(((b)<(c))?(b):(c)))
-
-#undef MAX3
-#define MAX3(a,b,c)	(((a)>(b))?(((a)>(c))?(a):(c)):(((b)>(c))?(b):(c)))
-
-#define TRUE 	1
-#define FALSE 	0
-
-/*
- * The macro below is used to modify a "char" value (e.g. by casting
- * it to an unsigned character) so that it can be used safely with
- * macros such as isspace.
- */
-#define UCHAR(c) ((unsigned char) (c))
-
-#define BLT_ANCHOR_TOP		(TK_ANCHOR_CENTER+1)
-#define BLT_ANCHOR_BOTTOM	(TK_ANCHOR_CENTER+2)
-#define BLT_ANCHOR_LEFT		(TK_ANCHOR_CENTER+3)
-#define BLT_ANCHOR_RIGHT	(TK_ANCHOR_CENTER+4)
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitCmdSpec --
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    const char *name;			/* Name of command */
-    Tcl_ObjCmdProc *cmdProc;
-    Tcl_CmdDeleteProc *cmdDeleteProc;
-    ClientData clientData;
-} Blt_InitCmdSpec;
-
-BLT_EXTERN int Blt_DictionaryCompare (const char *s1, const char *s2);
-
-BLT_EXTERN void Blt_Draw3DRectangle(Tk_Window tkwin, Drawable drawable,
-	Tk_3DBorder border, int x, int y, int width, int height, 
-	int borderWidth, int relief);
-BLT_EXTERN void Blt_Fill3DRectangle(Tk_Window tkwin, Drawable drawable,
-	Tk_3DBorder border, int x, int y, int width, int height, 
-	int borderWidth, int relief);
-
-/* ---------------------------------------------------------------- */
-
-#define PIXELS_NNEG		0
-#define PIXELS_POS		1
-#define PIXELS_ANY		2
-
-#define COUNT_NNEG		0
-#define COUNT_POS		1
-#define COUNT_ANY		2
-
-#define BLT_SCROLL_MODE_CANVAS	(1<<0)
-#define BLT_SCROLL_MODE_LISTBOX	(1<<1)
-#define BLT_SCROLL_MODE_HIERBOX	(1<<2)
-
-#define RGB_ANTIQUEWHITE1	"#ffefdb"
-#define RGB_BISQUE1		"#ffe4c4"
-#define RGB_BISQUE2		"#eed5b7"
-#define RGB_BISQUE3		"#cdb79e"
-#define RGB_BLACK		"#000000"
-#define RGB_BLUE		"#0000ff"
-#define RGB_GREEN		"#00ff00"
-#define RGB_GREY		"#b0b0b0"
-#define RGB_GREY15		"#262626"
-#define RGB_GREY20		"#333333"
-#define RGB_GREY25		"#404040"
-#define RGB_GREY30		"#4d4d4d"
-#define RGB_GREY35		"#595959"
-#define RGB_GREY40		"#666666"
-#define RGB_GREY50		"#7f7f7f"
-#define RGB_GREY64		"#a3a3a3"
-#define RGB_GREY70		"#b3b3b3"
-#define RGB_GREY75		"#bfbfbf"
-#define RGB_GREY77		"#c3c3c3"
-#define RGB_GREY82		"#d1d1d1"
-#define RGB_GREY85		"#d9d9d9"
-#define RGB_GREY90		"#e5e5e5"
-#define RGB_GREY93		"#ececec"
-#define RGB_GREY95		"#f2f2f2"
-#define RGB_LIGHTBLUE0		"#e4f7ff"
-#define RGB_LIGHTBLUE00		"#D9F5FF"
-#define RGB_LIGHTBLUE1		"#bfefff"
-#define RGB_LIGHTBLUE2		"#b2dfee"
-#define RGB_LIGHTSKYBLUE1	"#b0e2ff"
-#define RGB_MAROON		"#b03060"
-#define RGB_NAVYBLUE		"#000080"
-#define RGB_PINK		"#ffc0cb"
-#define RGB_BISQUE1		"#ffe4c4"
-#define RGB_RED			"#ff0000"
-#define RGB_WHITE		"#ffffff"
-#define RGB_YELLOW		"#ffff00"
-#define RGB_SKYBLUE4		"#4a708b"
-
-#ifdef OLD_TK_COLORS
-#define STD_NORMAL_BACKGROUND	RGB_BISQUE1
-#define STD_ACTIVE_BACKGROUND	RGB_BISQUE2
-#define STD_SELECT_BACKGROUND	RGB_LIGHTBLUE1
-#define STD_SELECT_FOREGROUND	RGB_BLACK
-#else
-#define STD_NORMAL_BACKGROUND	RGB_GREY85
-#define STD_ACTIVE_BACKGROUND	RGB_GREY90
-#define STD_SELECT_BACKGROUND	RGB_SKYBLUE4
-#define STD_SELECT_FOREGROUND	RGB_WHITE
-#endif /* OLD_TK_COLORS */
-
-#define STD_ACTIVE_BG_MONO	RGB_BLACK
-#define STD_ACTIVE_FOREGROUND	RGB_BLACK
-#define STD_ACTIVE_FG_MONO	RGB_WHITE
-#define STD_BORDERWIDTH 	"2"
-#define STD_FONT_HUGE		"{Sans Serif} 18"
-#define STD_FONT_LARGE		"{Sans Serif} 14"
-#define STD_FONT_MEDIUM		"{Sans Serif} 11"
-#define STD_FONT_NORMAL		"{Sans Serif} 9"
-#define STD_FONT_SMALL		"{Sans Serif} 8"
-#define	STD_FONT_NUMBERS	"Math 8"
-#define STD_FONT		STD_FONT_NORMAL
-#define STD_INDICATOR_COLOR	RGB_MAROON
-#define STD_NORMAL_BG_MONO	RGB_WHITE
-#define STD_NORMAL_FOREGROUND	RGB_BLACK
-#define STD_NORMAL_FG_MONO	RGB_BLACK
-#define STD_SELECT_BG_MONO	RGB_BLACK
-#define STD_SELECT_BORDERWIDTH	"2"
-#define STD_SELECT_FG_MONO	RGB_WHITE
-#define STD_SHADOW_MONO		RGB_BLACK
-#define STD_SELECT_FONT_HUGE	"{Sans Serif} 18 Bold"
-#define STD_SELECT_FONT_LARGE	"{Sans Serif} 14 Bold"
-#define STD_SELECT_FONT_MEDIUM	"{Sans Serif} 11 Bold"
-#define STD_SELECT_FONT_NORMAL	"{Sans Serif} 9 Bold"
-#define STD_SELECT_FONT_SMALL	"{Sans Serif} 8 Bold"
-#define STD_SELECT_FONT		STD_SELECT_FONT_NORMAL
-#define STD_DISABLED_FOREGROUND	RGB_GREY70
-#define STD_DISABLED_BACKGROUND	RGB_GREY90
-
-#define LineWidth(w)	(((w) > 1) ? (w) : 0)
-
-typedef char *Blt_Uid;
-
-BLT_EXTERN Blt_Uid Blt_GetUid(const char *string);
-BLT_EXTERN void Blt_FreeUid(Blt_Uid uid);
-BLT_EXTERN Blt_Uid Blt_FindUid(const char *string);
-
-#ifdef TCL_UTF_MAX
-#  define HAVE_UTF	1
-#else
-#  define HAVE_UTF	0
-#endif /* TCL_UTF_MAX */
-
-#include <bltAlloc.h>
-
-typedef char *DestroyData;
-
-#ifndef TK_RELIEF_SOLID
-#  define TK_RELIEF_SOLID		TK_RELIEF_FLAT
-#endif
-
-
-typedef int (QSortCompareProc) (const void *, const void *);
-
-/*
- *---------------------------------------------------------------------------
- *
- * Point2 --
- *
- *	2-D coordinate.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double x, y;
-} Point2d;
-
-typedef struct {
-    float x, y;
-} Point2f;
-
-typedef struct {
-    int x, y;
-} Point2i;
-
-typedef struct {
-    size_t nValues; 
-    void *values;
-} Array;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Point3D --
- *
- *	3-D coordinate.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double x, y, z;
-} Point3D;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Segment2 --
- *
- *	2-D line segment.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    Point2f p, q;		/* The two end points of the segment. */
-} Segment2f;
-
-typedef struct {
-    Point2d p, q;		/* The two end points of the segment. */
-} Segment2d;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Dim2D --
- *
- *	2-D dimension.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    short int width, height;
-} Dim2D;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Region2d --
- *
- *      2-D region.  Used to copy parts of images.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    float left, right, top, bottom;
-} Region2f;
-
-typedef struct {
-    double left, right, top, bottom;
-} Region2d;
-
-typedef struct {
-    double left, right, top, bottom, front, back;
-} Region3D;
-
-#define RegionWidth(r)		((r)->right - (r)->left + 1)
-#define RegionHeight(r)		((r)->bottom - (r)->top + 1)
-
-#define PointInRegion(e,x,y) \
-	(((x) <= (e)->right) && ((x) >= (e)->left) && \
-	 ((y) <= (e)->bottom) && ((y) >= (e)->top))
-
-#define PointInRectangle(r,x0,y0) \
-	(((x0) <= (int)((r)->x + (r)->width - 1)) && ((x0) >= (int)(r)->x) && \
-	 ((y0) <= (int)((r)->y + (r)->height - 1)) && ((y0) >= (int)(r)->y))
-
-/*-------------------------------------------------------------------------------
- *
- * ColorPair --
- *
- *	Holds a pair of foreground, background colors.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    XColor *fgColor, *bgColor;
-} ColorPair;
-
-#define COLOR_NONE		(XColor *)0
-#define COLOR_DEFAULT		(XColor *)1
-#define COLOR_ALLOW_DEFAULTS	1
-
-BLT_EXTERN int Blt_GetColorPair (Tcl_Interp *interp, Tk_Window tkwin, 
-	char *fgColor, char *bgColor, ColorPair *pairPtr, int colorFlag);
-
-BLT_EXTERN void Blt_FreeColorPair (ColorPair *pairPtr);
-
-
-#define ARROW_LEFT		(0)
-#define ARROW_UP		(1)
-#define ARROW_RIGHT		(2)
-#define ARROW_DOWN		(3)
-#define ARROW_OFFSET		4
-#define STD_ARROW_HEIGHT	3
-#define STD_ARROW_WIDTH		((2 * (ARROW_OFFSET - 1)) + 1)
-
-/*
- *---------------------------------------------------------------------------
- *
- * 	X11/Xosdefs.h requires XNOSTDHDRS be set for some systems.  This is a
- * 	guess.  If I can't find STDC headers or unistd.h, assume that this is
- * 	non-POSIX and non-STDC environment.  (needed for Encore Umax 3.4 ?)
- *
- *---------------------------------------------------------------------------
- */
-#if !defined(STDC_HEADERS) && !defined(HAVE_UNISTD_H)
-#  define XNOSTDHDRS 	1
-#endif
-
-BLT_EXTERN FILE *Blt_OpenFile(Tcl_Interp *interp, const char *fileName, 
-	const char *mode);
-
-BLT_EXTERN int Blt_ExprDoubleFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	double *valuePtr);
-
-BLT_EXTERN int Blt_ExprIntFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *valuePtr);
-
-BLT_EXTERN const char *Blt_Itoa(int value);
-
-BLT_EXTERN const char *Blt_Ltoa(long value);
-
-BLT_EXTERN const char *Blt_Utoa(unsigned int value);
-
-BLT_EXTERN const char *Blt_Dtoa(Tcl_Interp *interp, double value);
-
-BLT_EXTERN unsigned char *Blt_Base64_Decode(Tcl_Interp *interp, 
-	const char *string, size_t *lengthPtr);
-
-BLT_EXTERN char *Blt_Base64_Encode(Tcl_Interp *interp, 
-	const unsigned char *buffer, size_t bufsize);
-
-BLT_EXTERN int Blt_IsBase64(const unsigned char *buf, size_t length);
-
-BLT_EXTERN int Blt_InitCmd (Tcl_Interp *interp, const char *namespace, 
-	Blt_InitCmdSpec *specPtr);
-
-BLT_EXTERN int Blt_InitCmds (Tcl_Interp *interp, const char *namespace, 
-	Blt_InitCmdSpec *specPtr, int nCmds);
-
-BLT_EXTERN int Blt_GlobalEvalObjv(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-BLT_EXTERN int Blt_GlobalEvalListObj(Tcl_Interp *interp, Tcl_Obj *cmdObjPtr);
-
-#ifdef WIN32
-
-typedef struct {
-    DWORD pid;
-    HANDLE hProcess;
-} ProcessId;
-
-#else
-typedef pid_t ProcessId;
-#endif
-
-BLT_EXTERN int Blt_CreatePipeline(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, ProcessId **pidArrayPtr, int *stdinPipePtr,
-	int *stdoutPipePtr, int *stderrPipePtr);
-
-BLT_EXTERN void Blt_GetLineExtents(size_t nPoints, Point2d *points, 
-	Region2d *r);
-
-BLT_EXTERN int Blt_LineRectClip(Region2d *regionPtr, Point2d *p, Point2d *q);
-
-#if (_TCL_VERSION < _VERSION(8,1,0))
-BLT_EXTERN const char *Tcl_GetString (Tcl_Obj *objPtr);
-
-BLT_EXTERN int Tcl_EvalObjv (Tcl_Interp *interp, int objc, Tcl_Obj **objv, 
-	int flags);
-
-BLT_EXTERN int Tcl_WriteObj (Tcl_Channel channel, Tcl_Obj *objPtr);
-
-BLT_EXTERN char *Tcl_SetVar2Ex (Tcl_Interp *interp, const char *part1, 
-	const char *part2, Tcl_Obj *objPtr, int flags);
-
-BLT_EXTERN Tcl_Obj *Tcl_GetVar2Ex (Tcl_Interp *interp, const char *part1, 
-	const char *part2, int flags);
-#endif /* _TCL_VERSION < 8.1.0 */
-
-BLT_EXTERN int Blt_NaturalSpline (Point2d *origPts, int nOrigPts, Point2d *intpPts,
-	int nIntpPts);
-
-BLT_EXTERN int Blt_QuadraticSpline (Point2d *origPts, int nOrigPts, 
-	Point2d *intpPts, int nIntpPts);
-
-BLT_EXTERN int Blt_SimplifyLine (Point2d *origPts, int low, int high, 
-	double tolerance, int *indices);
-
-BLT_EXTERN int Blt_NaturalParametricSpline (Point2d *origPts, int nOrigPts, 
-	Region2d *extsPtr, int isClosed, Point2d *intpPts, int nIntpPts);
-
-BLT_EXTERN int Blt_CatromParametricSpline (Point2d *origPts, int nOrigPts, 
-	Point2d *intpPts, int nIntpPts);
-
-BLT_EXTERN int Blt_StringToFlag (ClientData clientData, Tcl_Interp *interp, 
-	Tk_Window tkwin, char *string, char *widgRec, int flags);
-
-BLT_EXTERN char *Blt_FlagToString (ClientData clientData, Tk_Window tkwin, 
-	char *string, int offset, Tcl_FreeProc **freeProc);
-
-BLT_EXTERN void Blt_InitHexTable (unsigned char *table);
-
-BLT_EXTERN GC Blt_GetPrivateGC(Tk_Window tkwin, unsigned long gcMask,
-	XGCValues *valuePtr);
-
-BLT_EXTERN GC Blt_GetPrivateGCFromDrawable(Display *display, Drawable drawable, 
-	unsigned long gcMask, XGCValues *valuePtr);
-
-BLT_EXTERN void Blt_FreePrivateGC(Display *display, GC gc);
-
-BLT_EXTERN int Blt_GetWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Window *windowPtr);
-
-BLT_EXTERN Window Blt_GetParentWindow(Display *display, Window window);
-
-BLT_EXTERN Tk_Window Blt_FindChild(Tk_Window parent, char *name);
-
-BLT_EXTERN Tk_Window Blt_FirstChild(Tk_Window parent);
-
-BLT_EXTERN Tk_Window Blt_NextChild(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_RelinkWindow (Tk_Window tkwin, Tk_Window newParent, int x, 
-	int y);
-
-BLT_EXTERN Tk_Window Blt_Toplevel(Tk_Window tkwin);
-
-BLT_EXTERN int Blt_GetPixels(Tcl_Interp *interp, Tk_Window tkwin, 
-	const char *string, int check, int *valuePtr);
-
-BLT_EXTERN int Blt_GetPosition(Tcl_Interp *interp, const char *string, 
-	long *valuePtr);
-
-BLT_EXTERN int Blt_GetCount(Tcl_Interp *interp, const char *string, int check, 
-	long *valuePtr);
-
-BLT_EXTERN int Blt_GetCountFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int check, long *valuePtr);
-
-BLT_EXTERN const char *Blt_NameOfFill(int fill);
-
-BLT_EXTERN const char *Blt_NameOfResize(int resize);
-
-BLT_EXTERN int Blt_GetXY (Tcl_Interp *interp, Tk_Window tkwin, 
-	const char *string, int *xPtr, int *yPtr);
-
-BLT_EXTERN Point2d Blt_GetProjection (int x, int y, Point2d *p, Point2d *q);
-
-BLT_EXTERN void Blt_DrawArrowOld(Display *display, Drawable drawable, GC gc, 
-	int x, int y, int w, int h, int borderWidth, int orientation);
-
-BLT_EXTERN void Blt_DrawArrow (Display *display, Drawable drawable, XColor *color, 
-	int x, int y, int w, int h, int borderWidth, int orientation);
-
-BLT_EXTERN int Blt_OldConfigModified TCL_VARARGS(Tk_ConfigSpec *, specs);
-
-BLT_EXTERN void Blt_DStringAppendElements TCL_VARARGS(Tcl_DString *, args);
-
-BLT_EXTERN void Blt_MakeTransparentWindowExist (Tk_Window tkwin, Window parent, 
-	int isBusy);
-
-BLT_EXTERN Window Blt_GetParent (Display *display, Window tkwin);
-
-BLT_EXTERN void Blt_GetBoundingBox (int width, int height, float angle, 
-	double *widthPtr, double *heightPtr, Point2d *points);
-
-BLT_EXTERN void Blt_InitEpsCanvasItem (Tcl_Interp *interp);
-
-BLT_EXTERN void Blt_TranslateAnchor (int x, int y, int width, int height, 
-	Tk_Anchor anchor, int *transXPtr, int *transYPtr);
-
-BLT_EXTERN Point2d Blt_AnchorPoint (double x, double y, double width, 
-	double height, Tk_Anchor anchor);
-
-BLT_EXTERN void Blt_HSV (XColor *colorPtr, double *huePtr, double *valPtr, 
-	double *satPtr);
-
-BLT_EXTERN void Blt_RGB (double hue, double sat, double val, XColor *colorPtr);
-
-BLT_EXTERN int Blt_ParseFlag (ClientData, Tcl_Interp *, Tk_Window, char *, 
-	char *, int);
-BLT_EXTERN char *Blt_FlagPrint (ClientData, Tk_Window, char *, int, 
-	Tcl_FreeProc **);
-
-BLT_EXTERN long Blt_MaxRequestSize (Display *display, size_t elemSize);
-
-BLT_EXTERN Window Blt_GetWindowId (Tk_Window tkwin);
-
-BLT_EXTERN int Blt_RootX (Tk_Window tkwin);
-
-BLT_EXTERN int Blt_RootY (Tk_Window tkwin);
-
-BLT_EXTERN void Blt_RootCoordinates (Tk_Window tkwin, int x, int y, 
-	int *rootXPtr, int *rootYPtr);
-
-BLT_EXTERN void Blt_MapToplevelWindow(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_UnmapToplevelWindow(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_RaiseToplevelWindow(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_LowerToplevelWindow(Tk_Window tkwin);
-
-BLT_EXTERN void Blt_ResizeToplevelWindow(Tk_Window tkwin, int w, int h);
-
-BLT_EXTERN void Blt_MoveToplevelWindow(Tk_Window tkwin, int x, int y);
-
-BLT_EXTERN void Blt_MoveResizeToplevelWindow(Tk_Window tkwin, int x, int y, 
-	int w, int h);
-
-BLT_EXTERN int Blt_GetWindowRegion(Display *display, Window window, int *xPtr,
-	int *yPtr, int *widthPtr, int *heightPtr);
-
-BLT_EXTERN ClientData Blt_GetWindowInstanceData (Tk_Window tkwin);
-
-BLT_EXTERN void Blt_SetWindowInstanceData (Tk_Window tkwin, 
-	ClientData instanceData);
-
-BLT_EXTERN void Blt_DeleteWindowInstanceData (Tk_Window tkwin);
-
-BLT_EXTERN int Blt_AdjustViewport (int offset, int worldSize, int windowSize, 
-	int scrollUnits, int scrollMode);
-
-BLT_EXTERN int Blt_GetScrollInfoFromObj (Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, int *offsetPtr, int worldSize, int windowSize,
-	int scrollUnits, int scrollMode);
-
-BLT_EXTERN void Blt_UpdateScrollbar(Tcl_Interp *interp, 
-	Tcl_Obj *scrollCmdObjPtr, int first, int last, int width);
-
-BLT_EXTERN int Blt_ReparentWindow (Display *display, Window window, 
-	Window newParent, int x, int y);
-
-BLT_EXTERN int Blt_LoadLibrary(Tcl_Interp *interp, const char *libPath, 
-	const char *initProcName, const char *safeProcName);
-
-extern void Blt_RegisterPictureImageType(Tcl_Interp *interp);
-extern int  Blt_CpuFeatures(Tcl_Interp *interp, int *featuresPtr);
-extern void Blt_RegisterEpsCanvasItem(void);
-
-typedef struct {
-    Drawable id;
-    unsigned short int width, height;
-    int depth;
-    Colormap colormap;
-    Visual *visual;
-} Blt_DrawableAttributes;
-
-BLT_EXTERN Blt_DrawableAttributes *Blt_GetDrawableAttribs(Display *display,
-	Drawable drawable);
-
-BLT_EXTERN void Blt_SetDrawableAttribs(Display *display, Drawable drawable,
-	int width, int height, int depth, Colormap colormap, Visual *visual);
-
-BLT_EXTERN void Blt_SetDrawableAttribsFromWindow(Tk_Window tkwin, 
-	Drawable drawable);
-
-BLT_EXTERN void Blt_FreeDrawableAttribs(Display *display, Drawable drawable);
-
-BLT_EXTERN GC Blt_GetBitmapGC(Tk_Window tkwin);
-
-#define Tk_RootWindow(tkwin)	\
-	RootWindow(Tk_Display(tkwin),Tk_ScreenNumber(tkwin))
-
-#ifndef WIN32
-#  define PurifyPrintf  printf
-#endif /* WIN32 */
-
-#include "bltConfig.h"
-
-/*
- * Define this if you want to be able to tile to the main window "."  This
- * will cause a conflict with Tk if you try to compile and link statically.
- */
-#undef TK_MAINWINDOW
-
-#ifdef WIN32
-#  define	NO_CUTBUFFER	1
-#  define	NO_DND		1  
-#else
-#  define	NO_DDE		1
-#  define	NO_PRINTER	1
-#  ifdef MACOSX
-#    define	NO_BUSY		1
-#    define	NO_CONTAINER	1
-#  endif  
-#endif /* WIN32 */
-
-#ifndef NO_BASE64
-BLT_EXTERN Tcl_AppInitProc Blt_Base64CmdInitProc;
-#endif
-#ifndef NO_BEEP
-BLT_EXTERN Tcl_AppInitProc Blt_BeepCmdInitProc;
-#endif
-#ifndef NO_BGEXEC
-BLT_EXTERN Tcl_AppInitProc Blt_BgexecCmdInitProc;
-#endif
-#ifndef NO_BITMAP
-BLT_EXTERN Tcl_AppInitProc Blt_BitmapCmdInitProc;
-#endif
-#ifndef NO_BUSY
-BLT_EXTERN Tcl_AppInitProc Blt_BusyCmdInitProc;
-#endif
-#ifndef NO_CONTAINER
-BLT_EXTERN Tcl_AppInitProc Blt_ContainerCmdInitProc;
-#endif
-#ifndef NO_CRC32
-BLT_EXTERN Tcl_AppInitProc Blt_Crc32CmdInitProc;
-#endif
-#ifndef NO_CVS
-BLT_EXTERN Tcl_AppInitProc Blt_CsvCmdInitProc;
-#endif
-#ifndef NO_CUTBUFFER
-BLT_EXTERN Tcl_AppInitProc Blt_CutbufferCmdInitProc;
-#endif
-#ifndef NO_DEBUG
-BLT_EXTERN Tcl_AppInitProc Blt_DebugCmdInitProc;
-#endif
-#ifndef NO_DRAGDROP
-BLT_EXTERN Tcl_AppInitProc Blt_DragDropCmdInitProc;
-#endif
-#ifndef NO_DND
-BLT_EXTERN Tcl_AppInitProc Blt_DndCmdInitProc;
-#endif
-#ifndef NO_GRAPH
-BLT_EXTERN Tcl_AppInitProc Blt_GraphCmdInitProc;
-#endif
-#ifndef NO_HIERBOX
-BLT_EXTERN Tcl_AppInitProc Blt_HierboxCmdInitProc;
-#endif
-#ifndef NO_HIERTABLE
-BLT_EXTERN Tcl_AppInitProc Blt_HiertableCmdInitProc;
-#endif
-#ifndef NO_HTEXT
-BLT_EXTERN Tcl_AppInitProc Blt_HtextCmdInitProc;
-#endif
-#ifdef WIN32
-#  ifndef NO_PRINTER
-BLT_EXTERN Tcl_AppInitProc Blt_PrinterCmdInitProc;
-#  endif
-#endif
-BLT_EXTERN Tcl_AppInitProc Blt_AfmCmdInitProc;
-#ifndef NO_PICTURE
-BLT_EXTERN Tcl_AppInitProc Blt_PictureCmdInitProc;
-#endif
-#ifndef NO_TABLEMGR
-BLT_EXTERN Tcl_AppInitProc Blt_TableMgrCmdInitProc;
-#endif
-#ifndef NO_VECTOR
-BLT_EXTERN Tcl_AppInitProc Blt_VectorCmdInitProc;
-#endif
-#ifndef NO_WINOP
-BLT_EXTERN Tcl_AppInitProc Blt_WinopCmdInitProc;
-#endif
-#ifndef NO_WATCH
-BLT_EXTERN Tcl_AppInitProc Blt_WatchCmdInitProc;
-#endif
-#ifndef NO_SPLINE
-BLT_EXTERN Tcl_AppInitProc Blt_SplineCmdInitProc;
-#endif
-#ifndef NO_TABSET
-BLT_EXTERN Tcl_AppInitProc Blt_TabsetCmdInitProc;
-#endif
-#ifndef NO_TABLE
-BLT_EXTERN Tcl_AppInitProc Blt_TableCmdInitProc;
-#endif
-#ifndef NO_TREE
-BLT_EXTERN Tcl_AppInitProc Blt_TreeCmdInitProc;
-#endif
-#ifndef NO_TREEVIEW
-BLT_EXTERN Tcl_AppInitProc Blt_TreeViewCmdInitProc;
-#endif
-#ifndef NO_TKFRAME
-BLT_EXTERN Tcl_AppInitProc Blt_FrameCmdInitProc;
-#endif
-#ifndef NO_TKBUTTON
-BLT_EXTERN Tcl_AppInitProc Blt_ButtonCmdInitProc;
-#endif
-#ifndef NO_SCROLLSET
-BLT_EXTERN Tcl_AppInitProc Blt_ScrollsetCmdInitProc;
-#endif
-#ifndef NO_PANESET
-BLT_EXTERN Tcl_AppInitProc Blt_PanesetCmdInitProc;
-#endif
-#ifndef NO_TKSCROLLBAR
-BLT_EXTERN Tcl_AppInitProc Blt_ScrollbarCmdInitProc;
-#endif
-BLT_EXTERN Tcl_AppInitProc Blt_BgPatternCmdInitProc;
-
-#if (BLT_MAJOR_VERSION == 3)
-#  ifndef NO_MOUNTAIN
-BLT_EXTERN Tcl_AppInitProc Blt_MountainCmdInitProc;
-#  endif
-#endif
-#ifndef NO_TED
-BLT_EXTERN Tcl_AppInitProc Blt_TedCmdInitProc;
-#endif
-
-BLT_EXTERN Tcl_AppInitProc Blt_ComboInitProc;
-BLT_EXTERN Tcl_AppInitProc Blt_ComboButtonInitProc;
-BLT_EXTERN Tcl_AppInitProc Blt_ComboEntryInitProc;
-BLT_EXTERN Tcl_AppInitProc Blt_ComboMenuInitProc;
-BLT_EXTERN Tcl_AppInitProc Blt_ComboTreeInitProc;
-
-BLT_EXTERN Tcl_AppInitProc Blt_SendEventCmdInitProc;
-
-#ifndef NO_DDE
-BLT_EXTERN Tcl_AppInitProc Blt_DdeCmdInitProc;
-#endif
-
-
-#define Tcl_GetLong(i,s,p)	TclGetLong(i,s,p)
-
-#ifndef USE_TCL_STUBS
-BLT_EXTERN int TclGetLong(Tcl_Interp *interp, const char *s, long *longPtr);
-#endif
-
-#ifndef HAVE_SPRINTF_S
-BLT_EXTERN int sprintf_s(char *s, size_t size, const char *fmt, /*args*/ ...);
-#endif	/* HAVE_SPRINTF_S */
-
-
-#undef panic
-#define panic(mesg)	Blt_Panic("%s:%d %s", __FILE__, __LINE__, (mesg))
-BLT_EXTERN void Blt_Panic TCL_VARARGS(const char *, args);
-
-#ifdef WIN32
-#  include "bltWin.h"
-#else 
-
-#ifdef MACOSX
-#  include "bltMacOSX.h"
-#endif /* MACOSX */
-
-#endif /* WIN32 */
-
-BLT_EXTERN Tcl_Obj *Blt_EmptyStringObj(void);
-BLT_EXTERN double Blt_NaN(void);
-
-BLT_EXTERN void Blt_ScreenDPI(Tk_Window tkwin, unsigned int *xPtr, 
-	unsigned int *yPtr);
-
-#include <bltAlloc.h>
-#include <bltAssert.h>
-
-#endif /*_BLT_INT_H*/
diff --git a/blt3.0/src/bltList.c b/blt3.0/src/bltList.c
deleted file mode 100644
index 05d2bba..0000000
--- a/blt3.0/src/bltList.c
+++ /dev/null
@@ -1,557 +0,0 @@
-
-/*
- * bltList.c --
- *
- * The module implements generic linked lists for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include "bltList.h"
-
-typedef struct _Blt_ListNode Node;
-typedef struct _Blt_List List;
-
-static Node *
-FindString(List *listPtr, const char *key)	
-{
-    Node *np;
-    char c;
-
-    c = key[0];
-    for (np = listPtr->head; np != NULL; np = np->next) {
-	if ((c == np->key.string[0]) && (strcmp(key, np->key.string) == 0)) {
-	    return np;
-	}
-    }
-    return NULL;
-}
-
-static Blt_ListNode
-FindOneWord(List *listPtr, const char *key)
-{
-    Node *np;
-
-    for (np = listPtr->head; np != NULL; np = np->next) {
-	if (key == np->key.oneWordValue) {
-	    return np;
-	}
-    }
-    return NULL;
-}
-
-static Blt_ListNode
-FindArray(List *listPtr, const char *key)
-{
-    Node *np;
-    size_t nBytes;
-
-    nBytes = sizeof(uint32_t) * listPtr->type;
-    for (np = listPtr->head; np != NULL; np = np->next) {
-	if (memcmp(key, np->key.words, nBytes) == 0) {
-	    return np;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeNode --
- *
- *	Free the memory allocated for the node.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeNode(Blt_ListNode node)
-{
-    Blt_Free(node);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_Create --
- *
- *	Creates a new linked list structure and initializes its pointers
- *
- * Results:
- *	Returns a pointer to the newly created list structure.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-Blt_List 
-Blt_List_Create(size_t type)
-{
-    List *listPtr;
-
-    listPtr = Blt_Malloc(sizeof(List));
-    if (listPtr != NULL) {
-	Blt_List_Init(listPtr, type);
-    }
-    return listPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_CreateNode --
- *
- *	Creates a list node holder.  This routine does not insert the node
- *	into the list, nor does it no attempt to maintain consistency of the
- *	keys.  For example, more than one node may use the same key.
- *
- * Results:
- *	The return value is the pointer to the newly created node.
- *
- * Side Effects:
- *	The key is not copied, only the Uid is kept.  It is assumed this key
- *	will not change in the life of the node.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-Blt_ListNode
-Blt_List_CreateNode(List *listPtr, const char *key)
-{
-    Node *np;
-    size_t keySize;
-
-    if (listPtr->type == BLT_STRING_KEYS) {
-	keySize = strlen(key) + 1;
-    } else if (listPtr->type == BLT_ONE_WORD_KEYS) {
-	keySize = sizeof(void *);
-    } else {
-	keySize = sizeof(uint32_t) * listPtr->type;
-    }
-    np = Blt_AssertCalloc(1, sizeof(Node) + keySize - 4);
-    np->clientData = NULL;
-    np->next = np->prev = NULL;
-    np->list = listPtr;
-    switch (listPtr->type) {
-    case BLT_STRING_KEYS:
-	strcpy(np->key.string, key);
-	break;
-    case BLT_ONE_WORD_KEYS:
-	np->key.oneWordValue = key;
-	break;
-    default:
-	memcpy(np->key.words, key, keySize);
-	break;
-    }
-    return np;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_Reset --
- *
- *	Removes all the entries from a list, removing pointers to the objects
- *	and keys (not the objects or keys themselves).  The node counter is
- *	reset to zero.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_Reset(List *listPtr)		/* List to clear */
-{
-    if (listPtr != NULL) {
-	Node *nextPtr, *np;
-
-	for (np = listPtr->head; np != NULL; np = nextPtr) {
-	    nextPtr = np->next;
-	    FreeNode(np);
-	}
-	Blt_List_Init(listPtr, listPtr->type);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_Destroy
- *
- *     Frees the list structure.
- *
- * Results:
- *	Returns a pointer to the newly created list structure.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_Destroy(Blt_List list)
-{
-    if (list != NULL) {
-	Blt_List_Reset(list);
-	Blt_Free(list);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_Init --
- *
- *	Initializes a linked list.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_Init(List *listPtr, size_t type)
-{
-    listPtr->nNodes = 0;
-    listPtr->head = listPtr->tail = NULL;
-    listPtr->type = type;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_LinkAfter --
- *
- *	Inserts an node following a given node.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_LinkAfter(List *listPtr, Node *np, Node *afterPtr)
-{
-    if (listPtr->head == NULL) {
-	listPtr->tail = listPtr->head = np;
-    } else {
-	if (afterPtr == NULL) {
-	    /* Prepend to the front of the list */
-	    np->next = listPtr->head;
-	    np->prev = NULL;
-	    listPtr->head->prev = np;
-	    listPtr->head = np;
-	} else {
-	    np->next = afterPtr->next;
-	    np->prev = afterPtr;
-	    if (afterPtr == listPtr->tail) {
-		listPtr->tail = np;
-	    } else {
-		afterPtr->next->prev = np;
-	    }
-	    afterPtr->next = np;
-	}
-    }
-    np->list = listPtr;
-    listPtr->nNodes++;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_LinkBefore --
- *
- *	Inserts an node preceding a given node.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_LinkBefore(List *listPtr, Node *np, Node *beforePtr)
-{
-    if (listPtr->head == NULL) {
-	listPtr->tail = listPtr->head = np;
-    } else {
-	if (beforePtr == NULL) {
-	    /* Append onto the end of the list */
-	    np->next = NULL;
-	    np->prev = listPtr->tail;
-	    listPtr->tail->next = np;
-	    listPtr->tail = np;
-	} else {
-	    np->prev = beforePtr->prev;
-	    np->next = beforePtr;
-	    if (beforePtr == listPtr->head) {
-		listPtr->head = np;
-	    } else {
-		beforePtr->prev->next = np;
-	    }
-	    beforePtr->prev = np;
-	}
-    }
-    np->list = listPtr;
-    listPtr->nNodes++;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_UnlinkNode --
- *
- *	Unlinks an node from the given list. The node itself is not
- *	deallocated, but only removed from the list.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_UnlinkNode(Node *np)
-{
-    List *listPtr;
-
-    listPtr = np->list;
-    if (listPtr != NULL) {
-	int unlinked = 0;
-
-	if (listPtr->head == np) {
-	    listPtr->head = np->next;
-	    unlinked++;
-	}
-	if (listPtr->tail == np) {
-	    listPtr->tail = np->prev;
-	    unlinked++;
-	}
-	if (np->next != NULL) {
-	    np->next->prev = np->prev;
-	    unlinked++;
-	}
-	if (np->prev != NULL) {
-	    np->prev->next = np->next;
-	    unlinked++;
-	}
-	np->list = NULL;
-	if (unlinked) {
-	    assert(listPtr->nNodes > 0);
-	    listPtr->nNodes--;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_GetNode --
- *
- *	Find the first node matching the key given.
- *
- * Results:
- *	Returns the pointer to the node.  If no node matching the key given is
- *	found, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-
-/*LINTLIBRARY*/
-Blt_ListNode
-Blt_List_GetNode(List *listPtr, const char *key)
-{
-    if (listPtr != NULL) {
-	switch (listPtr->type) {
-	case BLT_STRING_KEYS:
-	    return FindString(listPtr, key);
-	case BLT_ONE_WORD_KEYS:
-	    return FindOneWord(listPtr, key);
-	default:
-	    return FindArray(listPtr, key);
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_DeleteNode --
- *
- *	Unlinks and deletes the given node.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_DeleteNode(Blt_ListNode node)
-{
-    Blt_List_UnlinkNode(node);
-    FreeNode(node);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_DeleteNodeByKey --
- *
- *	Find the node and free the memory allocated for the node.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_DeleteNodeByKey(Blt_List list, const char *key)
-{
-    Blt_ListNode node;
-
-    node = Blt_List_GetNode(list, key);
-    if (node != NULL) {
-	Blt_List_DeleteNode(node);
-    }
-}
-
-/*LINTLIBRARY*/
-Blt_ListNode
-Blt_List_Append(Blt_List list, const char *key, ClientData clientData)
-{
-    Blt_ListNode node;
-
-    node = Blt_List_CreateNode(list, key);
-    Blt_List_SetValue(node, clientData);
-    Blt_List_AppendNode(list, node);
-    return node;
-}
-
-/*LINTLIBRARY*/
-Blt_ListNode
-Blt_List_Prepend(Blt_List list, const char *key, ClientData clientData)
-{
-    Blt_ListNode node;
-
-    node = Blt_List_CreateNode(list, key);
-    Blt_List_SetValue(node, clientData);
-    Blt_List_PrependNode(list, node);
-    return node;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_GetNthNode --
- *
- *	Find the node based upon a given position in list.
- *
- * Results:
- *	Returns the pointer to the node, if that numbered element
- *	exists. Otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-Blt_ListNode
-Blt_List_GetNthNode(List *listPtr, long position, int direction)
-{
-    if (listPtr == NULL) {
-	return NULL;
-    }
-    if (direction > 0) {
-	Node *np;
-	
-	for (np = listPtr->head; np != NULL; np = np->next) {
-	    if (position == 0) {
-		return np;
-	    }
-	    position--;
-	}
-    } else {
-	Node *np;
-	
-	for (np = listPtr->tail; np != NULL; np = np->prev) {
-	    if (position == 0) {
-		return np;
-	    }
-	    position--;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_List_Sort --
- *
- *	Find the node based upon a given position in list.
- *
- * Results:
- *	Returns the pointer to the node, if that numbered element
- *	exists. Otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_List_Sort(List *listPtr, Blt_ListCompareProc *proc)
-{
-    Node **nodes;
-    Node *np;
-    size_t i;
-
-    if (listPtr->nNodes < 2) {
-	return;
-    }
-    nodes = Blt_Malloc(sizeof(Node *) * (listPtr->nNodes + 1));
-    if (nodes == NULL) {
-	return;			/* Out of memory. */
-    }
-    for (i = 0, np = listPtr->head; np != NULL; np = np->next) {
-	nodes[i++] = np;
-    }
-    qsort(nodes, listPtr->nNodes, sizeof(Node *), (QSortCompareProc *)proc);
-
-    /* Rethread the list. */
-    np = nodes[0];
-    listPtr->head = np;
-    np->prev = NULL;
-    for (i = 1; i < listPtr->nNodes; i++) {
-	np->next = nodes[i];
-	np->next->prev = np;
-	np = np->next;
-    }
-    listPtr->tail = np;
-    np->next = NULL;
-    Blt_Free(nodes);
-}
diff --git a/blt3.0/src/bltList.h b/blt3.0/src/bltList.h
deleted file mode 100644
index c7331e0..0000000
--- a/blt3.0/src/bltList.h
+++ /dev/null
@@ -1,116 +0,0 @@
-
-/*
- * bltList.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef _BLT_LIST_H
-#define _BLT_LIST_H
-
-/*
- * Acceptable key types for hash tables:
- */
-#ifndef BLT_STRING_KEYS
-#define BLT_STRING_KEYS		0
-#endif
-#ifndef BLT_ONE_WORD_KEYS
-#define BLT_ONE_WORD_KEYS	((size_t)-1)
-#endif
-
-typedef struct _Blt_List *Blt_List;
-typedef struct _Blt_ListNode *Blt_ListNode;
-
-typedef union {			/* Key has one of these forms: */
-    const void *oneWordValue;	/* One-word value for key. */
-    unsigned int words[1];	/* Multiple integer words for key.  The actual
-				 * size will be as large as necessary for this
-				 * table's keys. */
-    char string[4];		/* String for key.  The actual size will be as
-				 * large as needed to hold the key. */
-} Blt_ListKey;
-
-/*
- * A Blt_ListNode is the container structure for the Blt_List.
- */
-struct _Blt_ListNode {
-    Blt_ListNode prev;		/* Link to the previous node */
-    Blt_ListNode next;		/* Link to the next node */
-    Blt_List list;		/* List to eventually insert node */
-    ClientData clientData;	/* Pointer to the data object */
-    Blt_ListKey key;		/* MUST BE LAST FIELD IN RECORD!! */
-};
-
-typedef int (Blt_ListCompareProc)(Blt_ListNode *node1Ptr, 
-	Blt_ListNode *node2Ptr);
-
-/*
- * A Blt_List is a doubly chained list structure.
- */
-struct _Blt_List {
-    Blt_ListNode head;		/* Pointer to first element in list */
-    Blt_ListNode tail;		/* Pointer to last element in list */
-    size_t nNodes;		/* Number of node currently in the list. */
-    size_t type;		/* Type of keys in list. */
-};
-
-BLT_EXTERN void Blt_List_Init(Blt_List list, size_t type);
-BLT_EXTERN void Blt_List_Reset(Blt_List list);
-BLT_EXTERN Blt_List Blt_List_Create(size_t type);
-BLT_EXTERN void Blt_List_Destroy(Blt_List list);
-BLT_EXTERN Blt_ListNode Blt_List_CreateNode(Blt_List list, const char *key);
-BLT_EXTERN void Blt_List_DeleteNode(Blt_ListNode node);
-
-BLT_EXTERN Blt_ListNode Blt_List_Append(Blt_List list, const char *key, 
-	ClientData clientData);
-BLT_EXTERN Blt_ListNode Blt_List_Prepend(Blt_List list, const char *key, 
-	ClientData clientData);
-BLT_EXTERN void Blt_List_LinkAfter(Blt_List list, Blt_ListNode node, 
-	Blt_ListNode afterNode);
-BLT_EXTERN void Blt_List_LinkBefore(Blt_List list, Blt_ListNode node, 
-	Blt_ListNode beforeNode);
-BLT_EXTERN void Blt_List_UnlinkNode(Blt_ListNode node);
-BLT_EXTERN Blt_ListNode Blt_List_GetNode(Blt_List list, const char *key);
-BLT_EXTERN void Blt_List_DeleteNodeByKey(Blt_List list, const char *key);
-BLT_EXTERN Blt_ListNode Blt_List_GetNthNode(Blt_List list, long position, 
-	int direction);
-BLT_EXTERN void Blt_List_Sort(Blt_List list, Blt_ListCompareProc *proc);
-
-#define Blt_List_GetLength(list) \
-	(((list) == NULL) ? 0 : ((struct _Blt_List *)list)->nNodes)
-#define Blt_List_FirstNode(list) \
-	(((list) == NULL) ? NULL : ((struct _Blt_List *)list)->head)
-#define Blt_List_LastNode(list)	\
-	(((list) == NULL) ? NULL : ((struct _Blt_List *)list)->tail)
-#define Blt_List_PrevNode(node)	((node)->prev)
-#define Blt_List_NextNode(node) 	((node)->next)
-#define Blt_List_GetKey(node)	\
-	(((node)->list->type == BLT_STRING_KEYS) \
-		 ? (node)->key.string : (node)->key.oneWordValue)
-#define Blt_List_GetValue(node)  	((node)->clientData)
-#define Blt_List_SetValue(node, value) \
-	((node)->clientData = (ClientData)(value))
-#define Blt_List_AppendNode(list, node) \
-	(Blt_List_LinkBefore((list), (node), (Blt_ListNode)NULL))
-#define Blt_List_PrependNode(list, node) \
-	(Blt_List_LinkAfter((list), (node), (Blt_ListNode)NULL))
-
-#endif /* _BLT_LIST_H */
diff --git a/blt3.0/src/bltMacBitmap.c b/blt3.0/src/bltMacBitmap.c
deleted file mode 100644
index a249582..0000000
--- a/blt3.0/src/bltMacBitmap.c
+++ /dev/null
@@ -1,685 +0,0 @@
-
-/*
- * bltMacOSXBitmap.c --
- *
- * This module implements MacOSX-specific bitmap processing procedures
- * for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the
- * Tk library distrubution.  The photo image type was designed and
- * implemented by Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#include "bltInt.h"
-#include "bltHash.h"
-#ifdef notdef
-#include "bltPicture.h"
-#endif
-#include <X11/Xutil.h>
-
-#define ROTATE_0	0
-#define ROTATE_90	1
-#define ROTATE_180	2
-#define ROTATE_270	3
-
-Pixmap
-Blt_PhotoImageMask(Tk_Window tkwin, Tk_PhotoImageBlock src)
-{
-    Pixmap bitmap;
-    int arraySize, bytes_per_line;
-    int offset, count;
-    int y;
-    unsigned char *bits;
-    unsigned char *dp;
-
-#ifdef notdef
-    bytes_per_line = (src.width + 7) / 8;
-    arraySize = src.height * bytes_per_line;
-    bits = Blt_AssertMalloc(sizeof(unsigned char) * arraySize);
-    dp = bits;
-    offset = count = 0;
-    for (y = 0; y < src.height; y++) {
-	int value, bitMask;
-	int x;
-	unsigned char *sp;
-
-	value = 0, bitMask = 1;
-	sp = src.pixelPtr + offset;
-	for (x = 0; x < src.width; /*empty*/ ) {
-	    unsigned long pixel;
-
-	    pixel = (sp[src.offset[3]] != 0x00);
-	    if (pixel) {
-		value |= bitMask;
-	    } else {
-		count++;	/* Count the number of transparent pixels. */
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		*dp++ = (unsigned char)value;
-		value = 0, bitMask = 1;
-	    }
-	    sp += src.pixelSize;
-	}
-	if (x & 7) {
-	    *dp++ = (unsigned char)value;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	Tk_MakeWindowExist(tkwin);
-	bitmap = XCreateBitmapFromData(Tk_Display(tkwin), Tk_WindowId(tkwin),
-	    (char *)bits, (unsigned int)src.width, (unsigned int)src.height);
-    } else {
-	bitmap = None;		/* Image is opaque. */
-    }
-    Blt_Free(bits);
-#endif
-    return bitmap;
-}
-
-#ifdef notdef
-Pixmap
-Blt_PictureMask(Tk_Window tkwin, Picture *srcPtr)
-{
-    Blt_Pixel *srcRowPtr;
-    Pixmap bitmap;
-    int bytesPerLine;
-    int count;
-    int x, y;
-    unsigned char *bits;
-    unsigned char *destRowPtr;
-
-    bytesPerLine = (srcPtr->width + 7) / 8;
-    bits = Blt_AssertMalloc(sizeof(unsigned char)*srcPtr->height*bytesPerLine);
-    count = 0;
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	int value, bitMask;
-	Blt_Pixel *sp;
-	unsigned char *dp;
-
-	sp = srcRowPtr, dp = destRowPtr;
-	value = 0, bitMask = 1;
-	for (x = 0; x < srcPtr->width; /*empty*/ ) {
-	    unsigned long pixel;
-
-	    pixel = (sp->Alpha != ALPHA_TRANSPARENT);
-	    if (pixel) {
-		value |= bitMask;
-	    } else {
-		count++;	/* Count the number of transparent pixels. */
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		*dp++ = (unsigned char)value;
-		value = 0, bitMask = 1;
-	    }
-	    sp++;
-	}
-	if (x & 7) {
-	    *dp++ = (unsigned char)value;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += bytesPerLine;
-    }
-    if (count > 0) {
-	Tk_MakeWindowExist(tkwin);
-	bitmap = XCreateBitmapFromData(Tk_Display(tkwin), Tk_WindowId(tkwin),
-		(char *)bits, (unsigned int)srcPtr->width, 
-		(unsigned int)srcPtr->height);
-    } else {
-	bitmap = None;		/* Image is opaque. */
-    }
-    Blt_Free(bits);
-    return bitmap;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given
- *	bitmap.  We also need a special GC of depth 1, so that we do
- *	not need to rotate more than one plane of the bitmap.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, int srcHeight, /* Width and height of the source bitmap */
-    float angle,		/* # of degrees to rotate the bitmap. */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    GC bitmapGC;
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    XImage *srcImgPtr, *destImgPtr;
-    double rotWidth, rotHeight;
-    int destWidth, destHeight;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-#ifdef notdef
-    /* Create a bitmap and image big enough to contain the rotated text */
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-    destWidth = ROUND(rotWidth);
-    destHeight = ROUND(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, destWidth, destHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, destWidth, destHeight, 
-	1, ZPixmap);
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, 90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sx;
-
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-		    
-		    sy = destWidth - x - 1;
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sy;
-
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = destWidth - x - 1, 
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sx;
-
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = x;
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x;
-
-		for (x = 0; x < destWidth; x++) {
-		    unsigned long pixel;
-
-		    pixel = XGetPixel(srcImgPtr, x, y);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double sox, soy;	/* Offset from the center of
-				 * the source rectangle. */
-	double destCX, destCY;	/* Offset to the center of the destination
-				 * rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	sox = srcWidth * 0.5;
-	soy = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < destHeight; y++) {
-	    double ty;
-	    int x;
-
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-		double tx, rx, ry, sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += sox;
-		ry += soy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = XGetPixel(srcImgPtr, sx, sy);
-		if (pixel) {
-		    XPutPixel(destImgPtr, x, y, pixel);
-		}
-	    }
-	}
-    }
-    /* Write the rotated image into the destination bitmap. */
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	destWidth, destHeight);
-
-    /* Clean up the temporary resources used. */
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-#endif
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. The new bitmap
- *	is bounded by a specified region. Only this portion of the bitmap
- *	is scaled from the original bitmap.
- *
- *	By bounding scaling to a region we can generate a new bitmap
- *	which is no bigger than the specified viewport.
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, int srcHeight, 
-    int destWidth, int destHeight)
-{
-    Display *display;
-    GC bitmapGC;
-    Pixmap destBitmap;
-    Window root;
-    XImage *srcImgPtr, *destImgPtr;
-    double xScale, yScale;
-    int y;		/* Destination bitmap coordinates */
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-
-    root = Tk_RootWindow(tkwin);
-#ifdef notdef
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, destWidth, destHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, destWidth, destHeight, 
-	1, ZPixmap);
-
-    /*
-     * Scale each pixel of destination image from results of source
-     * image. Verify the coordinates, since the destination image can
-     * be bigger than the source
-     */
-    xScale = (double)srcWidth / (double)destWidth;
-    yScale = (double)srcHeight / (double)destHeight;
-
-    /* Map each pixel in the destination image back to the source. */
-    for (y = 0; y < destHeight; y++) {
-	int x, sy;
-
-	sy = (int)(yScale * (double)y);
-	for (x = 0; x < destWidth; x++) {
-	    int sx;
-	    unsigned long pixel;
-
-	    sx = (int)(xScale * (double)x);
-	    pixel = XGetPixel(srcImgPtr, sx, sy);
-	    if (pixel) {
-		XPutPixel(destImgPtr, x, y, pixel);
-	    }
-	}
-    }
-    /* Write the scaled image into the destination bitmap */
-
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	destWidth, destHeight);
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-#endif
-    return destBitmap;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateScaleBitmapArea --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The
- *	caller also provides (offsets and dimensions) the region of
- *	interest in the destination bitmap.  This saves having to
- *	process the entire destination bitmap is only part of it is
- *	showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the 
- *	destination image.  For each pixel, the corresponding 
- *	pixel in the source bitmap is used.  This means that 
- *	destination coordinates are first scaled to the size of 
- *	the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapArea(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, int regionY,	/* Offset of region in virtual
-				 * destination bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int destWidth,		
-    unsigned int destHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    XImage *srcImgPtr, *destImgPtr;
-    double xScale, yScale;
-    double rotWidth, rotHeight;
-    GC bitmapGC;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-#ifdef notdef
-    /* Create a bitmap and image big enough to contain the rotated text */
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, regionWidth, 
-	regionHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, regionWidth, 
-	regionHeight, 1, ZPixmap);
-    angle = FMOD(angle, 360.0);
-
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    xScale = rotWidth / (double)destWidth;
-    yScale = rotHeight / (double)destHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int x, y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sx;	
-
-		sx = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < regionWidth; x++) {
-		    int sy;	
-		    unsigned long pixel;
-
-		    sy = (int)(xScale *(double)(destWidth - (x + regionX) - 1));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sy;	
-
-		sy = (int)(yScale * (double)(destHeight - (y + regionY) - 1));
-		for (x = 0; x < regionWidth; x++) {
-		    int sx;	
-		    unsigned long pixel;
-
-		    sx = (int)(xScale *(double)(destWidth - (x + regionX) - 1));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sx;	
-
-		sx = (int)(yScale * (double)(destHeight - (y + regionY) - 1));
-		for (x = 0; x < regionWidth; x++) {
-		    int sy;	
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sy;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < regionWidth; x++) {
-		    int sx;	
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double sox, soy; 	/* Offset from the center of the
-				 * source rectangle. */
-	double rox, roy; 	/* Offset to the center of the
-				 * rotated rectangle. */
-	int x, y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	sox = srcWidth * 0.5;
-	soy = srcHeight * 0.5;
-	rox = rotWidth * 0.5;
-	roy = rotHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < regionHeight; y++) {
-	    double ty;
-
-	    ty = (yScale * (double)(y + regionY)) - roy;
-	    for (x = 0; x < regionWidth; x++) {
-		double tx, rx, ry;
-		int sx, sy;	
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rox;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += sox;
-		ry += soy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = XGetPixel(srcImgPtr, sx, sy);
-		if (pixel) {
-		    XPutPixel(destImgPtr, x, y, pixel);
-		}
-	    }
-	}
-    }
-    /* Write the rotated image into the destination bitmap. */
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	regionWidth, regionHeight);
-
-    /* Clean up the temporary resources used. */
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-#endif
-    return destBitmap;
-}
diff --git a/blt3.0/src/bltMacImage.c b/blt3.0/src/bltMacImage.c
deleted file mode 100644
index 6f416e2..0000000
--- a/blt3.0/src/bltMacImage.c
+++ /dev/null
@@ -1,2430 +0,0 @@
-
-/*
- * bltMacOSXImage.c --
- *
- * This module implements MacOSX-specific image processing procedures
- * for the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltImage.h"
-/* #include <X11/Xutil.h> */
-#include "tkDisplay.h"
-
-typedef struct _Blt_Picture _Picture;
-
-#define Cursor MacOSX_Cursor
-#define Picture MacOSX_Picture
-#define TextStyle MacOSX_TextStyle
-#include <Carbon/Carbon.h>
-#undef Picture
-#undef Cursor
-#undef TextStyle
-
-struct TkWindow;
-
-struct _MacDrawable {
-    TkWindow *winPtr;     	/* Ptr to tk window or NULL if Pixmap */
-    CGrafPtr  grafPtr;
-    ControlRef rootControl;
-    int xOffset;		/* X offset from toplevel window. */
-    int yOffset;	       	/* Y offset from toplevel window. */
-    RgnHandle clipRgn;		/* Visable region of window. */
-    RgnHandle aboveClipRgn;	/* Visable region of window and its
-				 * children. */
-    int referenceCount;		/* Don't delete toplevel until
-				 * children are gone. */
-
-    /* Pointer to the toplevel datastruct. */
-    struct _MacDrawable *toplevel;	
-    int flags;			/* Various state see defines below. */
-};
-
-typedef struct _MacDrawable *MacDrawable;
-
-
-#define COLOR_WINDOW		(1<<0)
-#define BLACK_AND_WHITE		(1<<1)
-#define MAP_COLORS		(1<<2)
-
-static Blt_HashTable painterTable;
-static int initialized = 0;
-
-/*
- * PainterKey --
- *
- * This structure represents the key used to uniquely identify
- * painters.  A painter is specified by a combination of display,
- * visual, colormap, depth, and monitor gamma value.
- */
-typedef struct {
-    Display *display;		/* Display of painter. Used to free
-				 * colors allocated. */
-
-    Visual *visualPtr;		/* Visual information for the class of
-				 * windows displaying the image. */
-
-    Colormap colormap;		/* Colormap used.  This may be the
-				 * default colormap, or an allocated
-				 * private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    double gamma;		/* Gamma correction value of monitor. */
-
-} PainterKey;
-
-
-/*
- * Painter --
- *
- * This structure represents a painter used to display picture images.
- * A painter is specified by a combination of display, visual,
- * colormap, depth, and monitor gamma value.  Painters contain
- * information necessary to display a picture.  This includes both an
- * RGB to pixel map, and a RGB to allocated color map.
- *
- * Painters may be shared by more than one client and are reference
- * counted.  When no clients are using the painter, it is freed.
- */
-typedef struct _Blt_Painter {
-    Display *display;		/* Display of painter. Used to free
-				 * colors allocated. */
-
-    Visual *visualPtr;		/* Visual information for the class of
-				 * windows displaying the image. */
-
-    Colormap colormap;		/* Colormap used.  This may be the default
-				 * colormap, or an allocated private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    double gamma;		/* Gamma correction value of monitor. */
-
-    unsigned int flags;		/* Flags listed below. */
-
-    int refCount;		/* # of clients using this painter. If
-				 * zero, the painter is freed. */
-
-    Blt_HashEntry *hashPtr;	/* Used to delete the painter entry
-				 * from the hash table of painters. */
-
-    int nColors;		/* # of colors allocated.  */
-    int nRed, nGreen, nBlue;	/* # of intensities for each RGB component. */
-
-    unsigned long pixels[256];	/* Array of pixel values. Needed to
-				 * deallocate the color palette. Also
-				 * contains the mapping between linear
-				 * pixel values (rBits, gBits, bBits)
-				 * and the actual pixel for
-				 * PsuedoColor, StaticColor,
-				 * Greyscale, and StaticGrey visuals.
-				 */
-
-    int nPixels;		/* # of pixels allocated in above array. */
-
-
-    GC gc;			/* GC used to draw the image. */
-
-    /* 
-     * The following arrays are used for DirectColor, PsuedoColor,
-     * StaticColor, Greyscale, and StaticGrey visuals to convert RGB
-     * triplets to a parts of a pixel index.
-     */
-    unsigned int rBits[256], gBits[256], bBits[256];
-
-    /* 
-     * This following as used for TrueColor and DirectColor visuals
-     * only.  They are used to directly compute of pixel values from
-     * picture RGB components. 
-     */
-    unsigned int rAdjust, gAdjust, bAdjust;
-    unsigned int rShift, gShift, bShift;
-    unsigned int rMask, gMask, bMask;
-
-    unsigned char gammaTable[256]; /* Input gamma lookup table. Used to
-				 * map non-linear monitor values back
-				 * to RGB values. This is used
-				 * whenever we take a snapshot of the
-				 * screen (e.g. alpha blending). 
-				 * Computes the power mapping.  
-				 * D = I^gamma. */
-
-    unsigned char igammaTable[256]; /* Output gamma lookup table. Used to
-				 * map RGB values to non-linear
-				 * monitor values. Computes the
-				 * inverse power mapping. 
-				 * I~ = D^1/gamma. */
-
-    int isMonochrome;		/* Indicates if the display uses a single
-				 * color component (e.g. 4-bit grayscale). */
-
-    Blt_Pixel palette[256];	/* Maps the picture's 8-bit RGB values to the
-				 * RGB values of the colors actually
-				 * allocated. This is used for dithering the
-				 * picture. */
-
-} Painter;
-
-#define GC_PRIVATE	1	/* Indicates if the GC in the painter
-				 * was shared (allocated by Tk_GetGC)
-				 * or private (by XCreateGC). */
-
-static Tcl_FreeProc FreePainter;
-
-typedef struct _Blt_Picture Picture;
-
-#define GetBit(x, y) \
-   srcBits[(srcBytesPerRow * (srcHeight - y - 1)) + (x>>3)] & (0x80 >> (x&7))
-#define SetBit(x, y) \
-   destBits[(destBytesPerRow * (destHeight - y - 1)) + (x>>3)] |= (0x80 >>(x&7))
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindShift --
- *
- *	Returns the position of the least significant (low) bit in
- *	the given mask.
- *
- *	For TrueColor and DirectColor visuals, a pixel value is
- *	formed by OR-ing the red, green, and blue colormap indices
- *	into a single 32-bit word.  The visual's color masks tell
- *	you where in the word the indices are supposed to be.  The
- *	masks contain bits only where the index is found.  By counting
- *	the leading zeros in the mask, we know how many bits to shift
- *	to the individual red, green, and blue values to form a pixel.
- *
- * Results:
- *      The number of the least significant bit.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindShift(unsigned int mask)	/* 32-bit word */
-{
-    int bit;
-
-    for (bit = 0; bit < 32; bit++) {
-	if (mask & (1 << bit)) {
-	    break;
-	}
-    }
-    return bit;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CountBits --
- *
- *	Returns the number of bits set in the given 32-bit mask.
- *
- *	    Reference: Graphics Gems Volume II.
- *	
- * Results:
- *      The number of bits to set in the mask.
- *
- *
- *---------------------------------------------------------------------------
- */
-static int
-CountBits(unsigned long mask)	/* 32  1-bit tallies */
-{
-    /* 16  2-bit tallies */
-    mask = (mask & 0x55555555) + ((mask >> 1) & (0x55555555));  
-    /* 8  4-bit tallies */
-    mask = (mask & 0x33333333) + ((mask >> 2) & (0x33333333)); 
-    /* 4  8-bit tallies */
-    mask = (mask & 0x07070707) + ((mask >> 4) & (0x07070707));  
-    /* 2 16-bit tallies */
-    mask = (mask & 0x000F000F) + ((mask >> 8) & (0x000F000F));  
-    /* 1 32-bit tally */
-    mask = (mask & 0x0000001F) + ((mask >> 16) & (0x0000001F));  
-    return mask;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeGammaTables --
- *
- *	Initializes both the power and inverse power tables for the
- *	painter with a given gamma value.  These tables are used
- *	to/from map linear RGB values to/from non-linear monitor
- *	intensities.
- *	
- * Results:
- *      The *gammaTable* and *igammaTable* arrays are filled out to
- *      contain the mapped values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeGammaTables(Painter *painterPtr)
-{
-    int i;
-    double igamma, gamma;
-    
-    gamma = painterPtr->gamma;
-    igamma = 1.0 / gamma;
-    for (i = 0; i < 256; i++) {
-	double x, y;
-
-	y = i / 255.0;
-	x = pow(y, gamma) * 255.0 + 0.5;
-	painterPtr->gammaTable[i] = (unsigned char)CLAMP(x);
-	x = pow(y, igamma) * 255.0 + 0.5;
-	painterPtr->igammaTable[i] = (unsigned char)CLAMP(x);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QueryPalette --
- *
- *	Queries the X display server for the colors currently used in
- *	the colormap.  These values will then be used to map screen
- *	pixels back to RGB values (see Blt_DrawableToPicture). The
- *	queried non-linear color intensities are reverse mapped back
- *	to to linear RGB values.
- *	
- * Results:
- *      The *palette* array is filled in with the RGB color values 
- *      of the colors allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QueryPalette(Painter *painterPtr, Blt_Pixel *palette)
-{
-    Visual *visualPtr;
-    XColor colors[256];
-
-    visualPtr = painterPtr->visualPtr;
-    assert(visualPtr->map_entries <= 256);
-
-    if ((visualPtr->class == DirectColor) || (visualPtr->class == TrueColor)) {
-	XColor *cp, *cend;
-	unsigned int nRed, nGreen, nBlue;
-	unsigned int  r, g, b;
-	
-	r = g = b = 0;
-	nRed   = (painterPtr->rMask >> painterPtr->rShift) + 1;
-	nGreen = (painterPtr->gMask >> painterPtr->gShift) + 1;
-	nBlue  = (painterPtr->bMask >> painterPtr->bShift) + 1;
-
-	for (cp = colors, cend = cp + visualPtr->map_entries; cp < cend; 
-	     cp++) {
-	    cp->pixel = ((r << painterPtr->rShift) | 
-			 (g << painterPtr->gShift) |
-			 (b << painterPtr->bShift));
-	    cp->pad = 0;
-	    r++, b++, g++;
-	    if (r >= nRed) {
-		r = 0;
-	    }
-	    if (g >= nGreen) {
-		g = 0;
-	    }
-	    if (b >= nBlue) {
-		b = 0;
-	    }
-	}
-    } else {
-	XColor *cp;
-	int i;
-
-	for (cp = colors, i = 0; i < visualPtr->map_entries; i++, cp++) {
-	    cp->pixel = i;
-	    cp->pad = 0;
-	}
-    }
-
-#ifdef notdef
-    /* FIXME */
-    XQueryColors(painterPtr->display, painterPtr->colormap, colors, 
-		 visualPtr->map_entries);
-#endif    
-    /* Scale to convert XColor component value (0..65535) to unsigned
-     * char (0..255). */
-    if (painterPtr->gamma == 1.0) {
-	Blt_Pixel *dp, *dend;
-	XColor *cp;
-	double a;
-	
-	a = 1.0 / 257.0;
-	cp = colors;
-	for (dp = palette, dend = dp + visualPtr->map_entries; dp < dend; 
-	     dp++) {
-	    dp->Red =   (unsigned char)(cp->red * a + 0.5);
-	    dp->Green = (unsigned char)(cp->green * a + 0.5);
-	    dp->Blue =  (unsigned char)(cp->blue * a + 0.5);
-	    cp++;
-	}
-    } else {
-	Blt_Pixel *dp, *dend;
-	XColor *cp;
-	double a;
-
-	a = 1.0 / 257.0;
-	cp = colors;
-	for (dp = palette, dend = dp + visualPtr->map_entries; dp < dend; 
-	     dp++) {
-	    dp->Red =   painterPtr->gammaTable[(int)(cp->red * a + 0.5)];
-	    dp->Green = painterPtr->gammaTable[(int)(cp->green * a + 0.5)];
-	    dp->Blue =  painterPtr->gammaTable[(int)(cp->blue * a + 0.5)];
-	    cp++;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColorRamp --
- *
- *	Computes a color ramp based upon the number of colors
- *	available for each color component.  It returns an array of
- *	the desired colors (XColor structures).  The screen gamma is
- *	factored into the desired colors.
- *	
- * Results:
- *      Returns the number of colors desired.  The *colors* array
- *	is filled out to contain the component values.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColorRamp(Painter *painterPtr, XColor *colors)
-{
-    int nColors;
-    XColor *cp;
-    double rScale, gScale, bScale;
-    double igamma;
-    int i;
-
-    nColors = 0;		/* Suppress compiler warning. */
-
-    /*
-     * Calculate the RGB coordinates of the colors we want to allocate
-     * and store them in *colors.
-     */
-    igamma = 1.0 / painterPtr->gamma;
-
-    rScale = 255.0 / (painterPtr->nRed - 1);
-    gScale = 255.0 / (painterPtr->nGreen - 1);
-    bScale = 255.0 / (painterPtr->nBlue - 1);
-
-    switch (painterPtr->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	
-	nColors = MAX3(painterPtr->nRed, painterPtr->nGreen,painterPtr->nBlue);
-	if (painterPtr->isMonochrome) {
-	    nColors = painterPtr->nBlue = painterPtr->nGreen = painterPtr->nRed;
-	} 
-
-	/* Compute the 16-bit RGB values from each possible 8-bit
-	 * value. */
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    int r, g, b;
-	    
-	    r = (int)(i * rScale + 0.5);
-	    g = (int)(i * gScale + 0.5);
-	    b = (int)(i * bScale + 0.5);
-
-	    r = painterPtr->igammaTable[r];
-	    g = painterPtr->igammaTable[g];
-	    b = painterPtr->igammaTable[b];
-
-	    cp->red = (r << 8) + r;
-	    cp->green = (g << 8) + g;
-	    cp->blue = (b << 8) + b;
-	    cp++;
-	}
-	break;
-
-    case PseudoColor:
-    case StaticColor:
-    case GrayScale:
-    case StaticGray:
-
-	nColors = (painterPtr->nRed * painterPtr->nGreen * painterPtr->nBlue);
-	if (painterPtr->isMonochrome) {
-	    nColors = painterPtr->nRed;
-	} 
-	if (!painterPtr->isMonochrome) {
-	    XColor *cp;
-	    int i;
-	    
-	    cp = colors;
-	    for (i = 0; i < painterPtr->nRed; i++) {
-		int j;
-		unsigned char r;
-		
-		r = (unsigned char)(i * rScale + 0.5);
-		r = painterPtr->igammaTable[r];
-		for (j = 0; j < painterPtr->nGreen; j++) {
-		    int k;
-		    unsigned int g;
-
-		    g = (unsigned char)(j * gScale + 0.5);
-		    g = painterPtr->igammaTable[g];
-		    for (k = 0; k < painterPtr->nBlue; k++) {
-			unsigned int b;
-
-			b = (unsigned char)(k * bScale + 0.5);
-			b = painterPtr->igammaTable[b];
-			cp->red = (r << 8) | r;
-			cp->green = (g << 8) | g;
-			cp->blue = (b << 8) | b;
-			cp++;
-		    } 
-		}
-	    }
-	}
-	break;
-
-    default: /* Monochrome */
-	{
-	    XColor *cp;
-	    double scale;
-	    int i;
-
-	    scale = 255.0 / (nColors - 1);
-
-	    cp = colors;
-	    for (i = 0; i < nColors; ++i) {
-		int c;
-
-		c = (int)(i * scale + 0.5);
-		c = painterPtr->igammaTable[c];
-		cp->red = cp->green = cp->blue = (c << 8) | c;
-		cp++;
-	    }
-	}
-    } /* end switch */
-    return nColors;
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocateColors --
- *
- *	Individually allocates each of the desired colors (as
- *	specified by the *colors* array).  If a color can't be
- *	allocated the desired colors allocated to that point as
- *	released, the number of component intensities is reduced,
- *	and 0 is returned.
- *
- *	For TrueColor visuals, we don't need to allocate colors
- *	at all, since we can compute them directly.  
- *	
- * Results:
- *      Returns 1 if all desired colors were allocated successfully.
- *	If unsuccessful, returns 0.  All colors allocated up to that
- *	point are freed and a smaller color palette size is computed
- *	and reset in the painter structure.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-AllocateColors(Painter *painterPtr, XColor *colors, int nColors)
-{
-    if (painterPtr->visualPtr->class == TrueColor) {
-	XColor *cp, *cend;
-
-	/* 
-	 * For TrueColor visuals, don't call XAllocColor, compute the
-	 * pixel value directly.
-	 */
-	for (cp = colors, cend = cp + nColors; cp < cend; cp++) {
-	    unsigned int r, g, b;
-
-	    r = ((cp->red >> 8) >> painterPtr->rAdjust);
-	    g = ((cp->green >> 8) >> painterPtr->gAdjust);
-	    b = ((cp->blue >> 8) >> painterPtr->bAdjust);
-
-	    /* Shift each color into the proper location of the pixel index. */
-	    r = (r << painterPtr->rShift) & painterPtr->rMask;
-	    g = (g << painterPtr->gShift) & painterPtr->gMask;
-	    b = (b << painterPtr->bShift) & painterPtr->bMask;
-	    cp->pixel = (r | g | b);
-	}
-	painterPtr->nPixels = 0; /* This will indicate that we didn't
-				  * use XAllocColor to obtain pixel
-				  * values. */
-	return TRUE;
-    } else {
-	int i;
-	XColor *cp;
-
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    if (!XAllocColor(painterPtr->display, painterPtr->colormap, cp)){
-		fprintf(stderr, "can't allocate color #%d: r=%x g=%x b=%x\n", 
-			i, cp->red, cp->green, cp->blue);
-		break;
-	    }
-#ifdef notdef
-	    fprintf(stderr, "picture: allocated r=%x g=%x b=%x\n",
-		colors[i].red, colors[i].green, colors[i].blue);
-#endif
-	    painterPtr->pixels[i] = cp->pixel;
-	    cp++;
-	}
-	painterPtr->nPixels = i; /* # of pixels in array */
-	if (i == nColors) {
-	    fprintf(stderr, "painter palette %d/%d/%d colors okay\n", 
-		    painterPtr->nRed, painterPtr->nGreen, painterPtr->nBlue);
-	    return TRUE;		/* Success. */
-	}
-    }
-    /*
-     * If we didn't get all of the colors, free the current palette,
-     * reduce the palette RGB component sizes.
-     */
-    fprintf(stderr, "can't allocate %d/%d/%d colors\n", painterPtr->nRed,
-	    painterPtr->nGreen, painterPtr->nBlue);
-    XFreeColors(painterPtr->display, painterPtr->colormap, painterPtr->pixels, 
-	painterPtr->nPixels, 0);
-
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FillPalette --
- *
- *	Base upon the colors allocated, generate two mappings from
- *	the picture's 8-bit RGB components.
- *
- *	1) Map 8-bit RGB values to the bits of the pixel.  Each component
- *	   contains a portion of the pixel value.  For mapped visuals
- *	   (pseudocolor, staticcolor, grayscale, and staticgray) this 
- *	   pixel value will be translated to the actual pixel used by
- *	   the display.
- *
- *	2) Map 8-bit RGB values to the actual color values used.  The
- *	   color ramp generated may be only a subset of the possible
- *	   color values.  The resulting palette is used in dithering the
- *	   image, using the error between the desired picture RGB value
- *	   and the actual value used.
- *
- * Results:
- *	Color palette and pixel maps are filled in.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FillPalette(Painter *painterPtr, XColor *colors, int nColors) 
-{
-    painterPtr->nColors = nColors;
-    if (!painterPtr->isMonochrome) {
-	painterPtr->flags |= PAINER_COLOR_WINDOW;
-	
-	if ((painterPtr->visualPtr->class != DirectColor) && 
-	    (painterPtr->visualPtr->class != TrueColor)) {
-	    painterPtr->flags |= PAINTER_MAP_COLORS;
-	}
-    }
-    if (painterPtr->isMonochrome) {
-	int i;
-	
-	for (i = 0; i < 256; i++) {
-	    int c;
-	    
-	    c = (i + 127) / 255;
-	    painterPtr->rBits[i] = colors[c].pixel;
-	    painterPtr->palette[i].Blue = painterPtr->palette[i].Green = 
-		painterPtr->palette[i].Red = (unsigned char)(c * 255 + 0.5);
-	} 
-    } else {
-	int i, rMult;
-	double rScale, gScale, bScale;
-	
-	rMult = painterPtr->nGreen * painterPtr->nBlue;
-	
-	rScale = 255.0 / (painterPtr->nRed - 1);
-	gScale = 255.0 / (painterPtr->nGreen - 1);
-	bScale = 255.0 / (painterPtr->nBlue - 1);
-	
-	for (i = 0; i < 256; i++) {
-	    int r, g, b;
-	    
-	    r = (i * (painterPtr->nRed - 1) + 127) / 255;
-	    g = (i * (painterPtr->nGreen - 1) + 127) / 255;
-	    b = (i * (painterPtr->nBlue - 1) + 127) / 255;
-	    
-	    if ((painterPtr->visualPtr->class == DirectColor) || 
-		(painterPtr->visualPtr->class == TrueColor)) {
-		painterPtr->rBits[i] = colors[r].pixel & painterPtr->rMask;
-		painterPtr->gBits[i] = colors[g].pixel & painterPtr->gMask;
-		painterPtr->bBits[i] = colors[b].pixel & painterPtr->bMask;
-	    } else {
-		painterPtr->rBits[i] = r * rMult;
-		painterPtr->gBits[i] = g * painterPtr->nBlue;
-		painterPtr->bBits[i] = b;
-	    }
-	    painterPtr->palette[i].Red = (unsigned char)(r * rScale + 0.5);
-	    painterPtr->palette[i].Green = (unsigned char)(g * gScale + 0.5);
-	    painterPtr->palette[i].Blue = (unsigned char)(b * bScale + 0.5);
-#ifdef notdef
-	    fprintf(stderr, "picture: %d color=%x %x %x\n",
-		    i, 
-		    painterPtr->palette[i].Red, 
-		    painterPtr->palette[i].Green, 
-		    painterPtr->palette[i].Blue);
-#endif
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocatePalette --
- *
- *	This procedure allocates the colors required by a color table,
- *	and sets up the fields in the color table data structure which
- *	are used in dithering.
- *
- *	This routine essentially mimics what is done in tkImgPhoto.c.
- *	It's purpose is to allocate exactly the same color ramp as the
- *	photo image. That way both image types can co-exist without
- *	fighting over available colors.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Colors are allocated from the X server.  The color palette
- *	and pixel indices are updated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-AllocatePalette(
-    Painter *painterPtr)	/* Pointer to the color table requiring
-				 * colors to be allocated. */
-{
-    XColor colors[256];
-    int nColors;
-    static int stdPalettes[13][3] = {
-	/* nRed, nGreen, nBlue */
-	{ 2,  2,  2  },		/* 3 bits, 8 colors */
-	{ 2,  3,  2  },		/* 4 bits, 12 colors */
-	{ 3,  4,  2  },		/* 5 bits, 24 colors */
-	{ 4,  5,  3  },		/* 6 bits, 60 colors */
-	{ 5,  6,  4  },		/* 7 bits, 120 colors */ 
-	{ 7,  7,  4  },		/* 8 bits, 198 colors */
-	{ 8,  10, 6  },		/* 9 bits, 480 colors */
-	{ 10, 12, 8  },		/* 10 bits, 960 colors */
-	{ 14, 15, 9  },		/* 11 bits, 1890 colors */
-	{ 16, 20, 12 },		/* 12 bits, 3840 colors */
-	{ 20, 24, 16 },		/* 13 bits, 7680 colors */
-	{ 26, 30, 20 },		/* 14 bits, 15600 colors */
-	{ 32, 32, 30 },		/* 15 bits, 30720 colors */
-    };
-
-    painterPtr->isMonochrome = FALSE; 
-    switch (painterPtr->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	painterPtr->nRed =   1 << CountBits(painterPtr->rMask);
-	painterPtr->nGreen = 1 << CountBits(painterPtr->gMask);
-	painterPtr->nBlue =  1 << CountBits(painterPtr->bMask);
-	break;
-
-    case GrayScale:
-    case StaticGray:
-    case PseudoColor:
-    case StaticColor:
-	if (painterPtr->depth > 15) {
-	    painterPtr->nRed = painterPtr->nGreen = painterPtr->nBlue = 32;
-	} else if (painterPtr->depth >= 3) {
-	    int *ip = stdPalettes[painterPtr->depth - 3];
-	    painterPtr->nRed = ip[0];
-	    painterPtr->nGreen = ip[1];
-	    painterPtr->nBlue = ip[2];
-	}
-	break;
-
-    default:
-	painterPtr->nGreen = painterPtr->nBlue = 0;
-	painterPtr->nRed = 1 << painterPtr->depth;
-	painterPtr->isMonochrome = TRUE;
-	break;
-    }
-
-    /*
-     * Each time around this loop, we reduce the number of colors
-     * we're trying to allocate until we succeed in allocating all of
-     * the colors we need.
-     */
-    for (;;) {
-	/*
-	 * If we are using 1 bit/pixel, we don't need to allocate any
-	 * colors (we just use the foreground and background colors in
-	 * the GC).
-	 */
-	if ((painterPtr->isMonochrome) && (painterPtr->nRed <= 2)) {
-	    painterPtr->flags |= BLACK_AND_WHITE;
-	    /* return; */
-	}
-	/*
-	 * Calculate the RGB values of a color ramp, given the some
-	 * number of red, green, blue intensities available.
-	 */
-	nColors = ColorRamp(painterPtr, colors);
-
-	/* Now try to allocate the colors we've calculated. */
-
-	if (AllocateColors(painterPtr, colors, nColors)) {
-	    break;		/* Success. */
-	}
-	if (!painterPtr->isMonochrome) {
-	    if ((painterPtr->nRed == 2) && (painterPtr->nGreen == 2) && 
-		(painterPtr->nBlue == 2)) {
-		break;
-		/* Fall back to 1-bit monochrome display. */
-		/* painterPtr->mono = TRUE; */
-	    } else {
-		/*
-		 * Reduce the number of shades of each primary to
-		 * about 3/4 of the previous value.  This will reduce
-		 * the total number of colors required to less than
-		 * half (27/64) the previous value for PseudoColor
-		 * displays.
-		 */
-		painterPtr->nRed = (painterPtr->nRed * 3 + 2) / 4;
-		painterPtr->nGreen = (painterPtr->nGreen * 3 + 2) / 4;
-		painterPtr->nBlue = (painterPtr->nBlue * 3 + 2) / 4;
-	    }
-	} else {
-	    painterPtr->nRed /= 2;
-	}
-    }
-    FillPalette(painterPtr, colors, nColors);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPainter --
- *
- *	Creates a new painter to be used to paint pictures. Painters
- *	are keyed by the combination of display, colormap, visual,
- *	depth, and gamma value used.  
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	A color ramp is allocated (not true for TrueColor visuals).
- *	Gamma tables are computed and filled.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-NewPainter(PainterKey *keyPtr)
-{
-    Painter *painterPtr;
-    
-    painterPtr = Blt_AssertCalloc(1, sizeof(Painter));
-
-    painterPtr->colormap = keyPtr->colormap;
-    painterPtr->depth = keyPtr->depth;
-    painterPtr->display = keyPtr->display;
-    painterPtr->gamma = keyPtr->gamma;
-    painterPtr->visualPtr = keyPtr->visualPtr;
-    
-    painterPtr->refCount = 0;
-    painterPtr->rMask = (unsigned int)painterPtr->visualPtr->red_mask;
-    painterPtr->gMask = (unsigned int)painterPtr->visualPtr->green_mask;
-    painterPtr->bMask = (unsigned int)painterPtr->visualPtr->blue_mask;
-
-    painterPtr->rShift = FindShift(painterPtr->rMask);
-    painterPtr->gShift = FindShift(painterPtr->gMask);
-    painterPtr->bShift = FindShift(painterPtr->bMask);
-
-    painterPtr->rAdjust = painterPtr->gAdjust = painterPtr->bAdjust = 0;
-
-    {
-	int nRedBits, nGreenBits, nBlueBits;
-
-	nRedBits = CountBits(painterPtr->rMask);
-	nGreenBits = CountBits(painterPtr->gMask);
-	nBlueBits = CountBits(painterPtr->bMask);
-	if (nRedBits < 8) {
-	    painterPtr->rAdjust = 8 - nRedBits;
-	}
-	if (nGreenBits < 8) {
-	    painterPtr->gAdjust = 8 - nGreenBits;
-	}
-	if (nBlueBits < 8) {
-	    painterPtr->bAdjust = 8 - nBlueBits;
-	}
-    }
-    ComputeGammaTables(painterPtr);
-    AllocatePalette(painterPtr);
-    return painterPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePainter --
- *
- *	Called when the TCL interpreter is idle, this routine frees the
- *	painter. Painters are reference counted. Only when no clients
- *	are using the painter (the count is zero) is the painter
- *	actually freed.  By deferring its deletion, this allows client
- *	code to call Blt_GetPainter after Blt_FreePainter without
- *	incurring a performance penalty.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreePainter(DestroyData data)
-{
-    Painter *painterPtr = (Painter *)data;
-
-    if (painterPtr->refCount <= 0) {
-	if (painterPtr->nColors > 0) {
-	    XFreeColors(painterPtr->display, painterPtr->colormap,
-		painterPtr->pixels, painterPtr->nPixels, 0);
-	}
-	Blt_DeleteHashEntry(&painterTable, painterPtr->hashPtr);
-	if (painterPtr->gc != NULL) {
-	    if (painterPtr->flags & GC_PRIVATE) {
-		XFreeGC(painterPtr->display, painterPtr->gc);
-	    } else {
-		Tk_FreeGC(painterPtr->display, painterPtr->gc);
-	    }
-	    painterPtr->gc = NULL;
-	}
-	Blt_Free(painterPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPainter --
- *
- *	Attempts to retrieve a painter for a particular combination of
- *	display, colormap, visual, depth, and gamma value.  If no
- *	specific painter exists, then one is created.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	If no current painter exists, a new painter is added to the
- *	hash table of painters.  Otherwise, the current painter's
- *	reference count is incremented indicated how many clients
- *	are using the painter.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-GetPainter(
-    Display *display, 
-    Colormap colormap, 
-    Visual *visualPtr,
-    int depth,
-    double gamma)
-{
-    Painter *painterPtr;
-    PainterKey key;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    if (!initialized) {
-	Blt_InitHashTable(&painterTable, sizeof(PainterKey) / sizeof(int));
-	initialized = TRUE;
-    }
-    key.display = display;
-    key.colormap = colormap;
-    key.visualPtr = visualPtr;
-    key.depth = depth;
-    key.gamma = gamma;
-
-    hPtr = Blt_CreateHashEntry(&painterTable, (char *)&key, &isNew);
-    if (isNew) {
-	painterPtr = NewPainter(&key);
-	painterPtr->hashPtr = hPtr;
-	Blt_SetHashValue(hPtr, painterPtr);
-    } else {
-	painterPtr = Blt_GetHashValue(hPtr);
-    }
-    painterPtr->refCount++;
-    return painterPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainterFromDrawable --
- *
- *	Gets a painter for a particular combination of display,
- *	colormap, visual, depth, and gamma value.  This information is
- *	retrieved from the drawable which is assumed to be a window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainterFromDrawable(
-    Display *display, 
-    Drawable drawable, 
-    double gamma)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Painter *painterPtr;
-    Colormap colormap;
-    int screenNum;
-    Visual *visual;
-    int depth;
-    
-    screenNum = 0;
-    /* Need colormap, visual, depth. */
-    colormap = DefaultColormap(display, DefaultScreen(display));
-    visual = DefaultVisual(display, screenNum);
-    depth  = DefaultDepth(display, screenNum);
-    painterPtr = GetPainter(display, colormap, visual, depth, gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-	    
-    painterPtr->gc = XCreateGC(display, drawable, gcMask, &gcValues);
-    painterPtr->flags |= GC_PRIVATE;
-    return painterPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainter --
- *
- *	Gets a painter for a particular combination of display,
- *	colormap, visual, depth, and gamma value.  This information
- *	(except for the monitor's gamma value) is retrieved from the
- *	given Tk window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainter(Tk_Window tkwin, double gamma)
-{
-    Painter *painterPtr;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    painterPtr = GetPainter(Tk_Display(tkwin), Tk_Colormap(tkwin), 
-	Tk_Visual(tkwin), Tk_Depth(tkwin), gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-    painterPtr->gc = Tk_GetGC(tkwin, gcMask, &gcValues);
-    painterPtr->flags &= ~GC_PRIVATE;
-    return painterPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreePainter --
- *
- *	Frees the painter. Painters are reference counted. Only when
- *	no clients are using the painter (the count is zero) is the
- *	painter actually freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreePainter(Painter *painterPtr)
-{
-    painterPtr->refCount--;
-    if (painterPtr->refCount <= 0) {
-	Tcl_EventuallyFree(painterPtr, FreePainter);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Picture
-DrawableToPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    int x, int y,
-    int width, int height)	/* Dimension of the drawable. */
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr srcPort, destPort;
-    Picture *destPtr;
-
-    srcPort = TkMacOSXGetDrawablePort(drawable);
-    destPtr = Blt_CreatePicture(width, height);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-      
-	SetRect(&srcRect, x, y, x + width, y + height);
-        SetRect(&destRect, 0, 0, width, height);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(srcPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)destPtr->bits;
-	pm.rowBytes = destPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap,
-				    * not a BitMap.  */
-	
-	CopyBits(GetPortBitMapForCopyBits(destPort), 
-		 (BitMap *)&pm, &srcRect, &destRect, srcCopy, NULL);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WindowToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- *	This routine is used to snap foreign (non-Tk) windows. For
- *	pixmaps and Tk windows, Blt_DrawableToPicture is preferred.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_WindowToPicture(
-    Display *display,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainterFromDrawable(display, drawable, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_DrawableToPicture(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainter(tkwin, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-
-Pixmap
-Blt_PhotoImageMask(
-    Tk_Window tkwin,
-    Tk_PhotoImageBlock src)
-{
-    TkWinBitmap *twdPtr;
-    int offset, count;
-    int x, y;
-    unsigned char *srcPtr;
-    int destBytesPerRow;
-    int destHeight;
-    unsigned char *destBits;
-
-    destBytesPerRow = ((src.width + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(src.height, destBytesPerRow);
-    destHeight = src.height;
-
-    offset = count = 0;
-
-    /* FIXME: figure out why this is so! */
-    for (y = src.height - 1; y >= 0; y--) {
-	srcPtr = src.pixelPtr + offset;
-	for (x = 0; x < src.width; x++) {
-	    if (srcPtr[src.offset[3]] == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    srcPtr += src.pixelSize;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = src.width;
-	bm.bmHeight = src.height;
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-Pixmap
-Blt_PictureMask(
-    Tk_Window tkwin,
-    Blt_Picture pict)
-{
-    TkWinBitmap *twdPtr;
-    int count;
-    int x, y;
-    Blt_Pixel *sp;
-    int destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *destBits;
-
-    destWidth = Blt_PictureWidth(pict);
-    destHeight = Blt_PictureHeight(pict);
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-    count = 0;
-    sp = Blt_PictureBits(pict);
-    for (y = 0; y < destHeight; y++) {
-	for (x = 0; x < destWidth; x++) {
-	    if (sp->Alpha == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    sp++;
-	}
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = Blt_PictureWidth(pict);
-	bm.bmHeight = Blt_PictureHeight(pict);
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given
- *	bitmap.  We also need a special GC of depth 1, so that we do
- *	not need to rotate more than one plane of the bitmap.
- *
- *	Note that under Windows, monochrome bitmaps are stored
- *	bottom-to-top.  This is why the right angle rotations 0/180
- *	and 90/270 look reversed.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, 
-    int srcHeight,		/* Width and height of the source bitmap */
-    float angle,		/* Right angle rotation to perform */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    double rotWidth, rotHeight;
-    HDC hDC;
-    TkWinDCState state;
-    int x, y;			/* Destination bitmap coordinates */
-    int sx, sy;			/* Source bitmap coordinates */
-    unsigned long pixel;
-    HBITMAP hBitmap;
-    int result;
-    struct MonoBitmap {
-	BITMAPINFOHEADER bi;
-	RGBQUAD colors[2];
-    } mb;
-    int srcBytesPerRow, destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    destWidth = (int)ceil(rotWidth);
-    destHeight = (int)ceil(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-
-	/* Handle right-angle rotations specially. */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    sy = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:		/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sx = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sy = x;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		for (x = 0; x < destWidth; x++) {
-		    pixel = GetBit(x, y);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double srcCX, srcCY;	/* Center of source rectangle */
-	double destCX, destCY;	/* Center of destination rectangle */
-	double tx, ty;
-	double rx, ry;		/* Angle of rotation for x and y coordinates */
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	srcCX = srcWidth * 0.5;
-	srcCY = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* Rotate each pixel of dest image, placing results in source image */
-
-	for (y = 0; y < destHeight; y++) {
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-
-		/* Translate origin to center of destination image */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image */
-		rx += srcCX;
-		ry += srcCY;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-    ZeroMemory(&mb, sizeof(mb));
-    mb.bi.biSize = sizeof(BITMAPINFOHEADER);
-    mb.bi.biPlanes = 1;
-    mb.bi.biBitCount = 1;
-    mb.bi.biCompression = BI_RGB;
-    mb.bi.biWidth = destWidth;
-    mb.bi.biHeight = destHeight;
-    mb.bi.biSizeImage = destBytesPerRow * destHeight;
-    mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 0x0;
-    mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 0xFF;
-    hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-    result = SetDIBits(hDC, hBitmap, 0, destHeight, (LPVOID)destBits, 
-	(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. 
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, 
-    int srcHeight, 
-    int destWidth, 
-    int destHeight)
-{
-    TkWinDCState srcState, destState;
-    HDC src, dest;
-    Pixmap destBitmap;
-    Window root;
-    Display *display;
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;
-    }
-    src = TkWinGetDrawableDC(display, srcBitmap, &srcState);
-    dest = TkWinGetDrawableDC(display, destBitmap, &destState);
-
-    StretchBlt(dest, 0, 0, destWidth, destHeight, src, 0, 0,
-	srcWidth, srcHeight, SRCCOPY);
-
-    TkWinReleaseDrawableDC(srcBitmap, src, &srcState);
-    TkWinReleaseDrawableDC(destBitmap, dest, &destState);
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleRotateBitmapRegion --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The
- *	caller also provides (offsets and dimensions) the region of
- *	interest in the destination bitmap.  This saves having to
- *	process the entire destination bitmap is only part of it is
- *	showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the 
- *	destination image.  For each pixel, the corresponding 
- *	pixel in the source bitmap is used.  This means that 
- *	destination coordinates are first scaled to the size of 
- *	the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapRegion(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, 
-    int regionY,		/* Offset of region in virtual
-				 * destination bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int virtWidth,		
-    unsigned int virtHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    double rWidth, rHeight;
-    double xScale, yScale;
-    int srcBytesPerRow, destBytesPerRow;
-    int destHeight;
-    int result;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((regionWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(regionHeight, destBytesPerRow);
-    destHeight = regionHeight;
-
-    angle = FMOD(angle, 360.0);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rWidth, &rHeight,
-	       (Point2d *)NULL);
-    xScale = rWidth / (double)virtWidth;
-    yScale = rHeight / (double)virtHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(y+regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sy;
-
-		    sy = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sx;
-
-		    sx = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double scx, scy; 	/* Offset from the center of the
-				 * source rectangle. */
-	double rcx, rcy; 	/* Offset to the center of the
-				 * rotated rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	scx = srcWidth * 0.5;
-	scy = srcHeight * 0.5;
-	rcx = rWidth * 0.5;
-	rcy = rHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < (int)regionHeight; y++) {
-	    int x;
-	    double ty;		/* Translated coordinates from center */
-
-	    ty = (yScale * (double)(y + regionY)) - rcy;
-	    for (x = 0; x < (int)regionWidth; x++) {
-		double rx, ry;	/* Angle of rotation for x and y coordinates */
-		double tx;	/* Translated coordinates from center */
-		int sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rcx;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += scx;
-		ry += scy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= (int)srcWidth) || (sx < 0) || 
-		    (sy >= (int)srcHeight) || (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    {
-	HBITMAP hBitmap;
-	HDC hDC;
-	TkWinDCState state;
-	struct MonoBitmap {
-	    BITMAPINFOHEADER bmiHeader;
-	    RGBQUAD colors[2];
-	} mb;
-	
-	/* Write the rotated image into the destination bitmap. */
-	hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-	ZeroMemory(&mb, sizeof(mb));
-	mb.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-	mb.bmiHeader.biPlanes = 1;
-	mb.bmiHeader.biBitCount = 1;
-	mb.bmiHeader.biCompression = BI_RGB;
-	mb.bmiHeader.biWidth = regionWidth;
-	mb.bmiHeader.biHeight = regionHeight;
-	mb.bmiHeader.biSizeImage = destBytesPerRow * regionHeight;
-	mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 
-	    0x0;
-	mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 
-	    0xFF;
-	hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-	result = SetDIBits(hDC, hBitmap, 0, regionHeight, (LPVOID)destBits, 
-		(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-	TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    }
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-    return destBitmap;
-}
-
-#ifdef HAVE_IJL_H
-
-#include <ijl.h>
-
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    JPEG_CORE_PROPERTIES jpgProps;
-    Blt_Picture pict;
-
-    ZeroMemory(&jpgProps, sizeof(JPEG_CORE_PROPERTIES));
-    if(ijlInit(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't initialize Intel JPEG library",
-			 (char *)NULL);
-	return NULL;
-    }
-    jpgProps.JPGFile = fileName;
-    if (ijlRead(&jpgProps, IJL_JFILE_READPARAMS) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read JPEG file header from \"",
-			 fileName, "\" file.", (char *)NULL);
-	goto error;
-    }
-
-    // !dudnik: to fix bug case 584680, [OT:287A305B]
-    // Set the JPG color space ... this will always be
-    // somewhat of an educated guess at best because JPEG
-    // is "color blind" (i.e., nothing in the bit stream
-    // tells you what color space the data was encoded from).
-    // However, in this example we assume that we are
-    // reading JFIF files which means that 3 channel images
-    // are in the YCbCr color space and 1 channel images are
-    // in the Y color space.
-    switch(jpgProps.JPGChannels) {
-    case 1:
-	jpgProps.JPGColor = IJL_G;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-	
-    case 3:
-	jpgProps.JPGColor = IJL_YCBCR;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    case 4:
-	jpgProps.JPGColor = IJL_YCBCRA_FPX;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    default:
-	/* This catches everything else, but no color twist will be
-           performed by the IJL. */
-	jpgProps.DIBColor = (IJL_COLOR)IJL_OTHER;
- 	jpgProps.JPGColor = (IJL_COLOR)IJL_OTHER;
-	jpgProps.DIBChannels = jpgProps.JPGChannels;
-	break;
-    }
-
-    jpgProps.DIBWidth    = jpgProps.JPGWidth;
-    jpgProps.DIBHeight   = jpgProps.JPGHeight;
-    jpgProps.DIBPadBytes = IJL_DIB_PAD_BYTES(jpgProps.DIBWidth, 
-					     jpgProps.DIBChannels);
-
-    pict = Blt_CreatePicture(jpgProps.JPGWidth, jpgProps.JPGHeight);
-
-    jpgProps.DIBBytes = (BYTE *)Blt_PictureBits(pict);
-    if (ijlRead(&jpgProps, IJL_JFILE_READWHOLEIMAGE) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read image data from \"", fileName,
-		 "\"", (char *)NULL);
-	goto error;
-    }
-    if (ijlFree(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't free Intel(R) JPEG library.", 
-		(char *)NULL);
-    }
-    return pict;
-
- error:
-    ijlFree(&jpgProps);
-    if (pict != NULL) {
-	Blt_FreePicture(pict);
-    }
-    ijlFree(&jpgProps);
-    return NULL;
-} 
-
-#else 
-
-#ifdef HAVE_JPEGLIB_H
-
-#undef HAVE_STDLIB_H
-#ifdef WIN32
-#define XMD_H	1
-#endif
-#include "jpeglib.h"
-#include <setjmp.h>
-
-typedef struct {
-    struct jpeg_error_mgr pub;	/* "public" fields */
-    jmp_buf jmpBuf;
-    Tcl_DString dString;
-} ReaderHandler;
-
-static void ErrorProc(j_common_ptr jpegInfo);
-static void MessageProc(j_common_ptr jpegInfo);
-
-/*
- * Here's the routine that will replace the standard error_exit method:
- */
-
-static void
-ErrorProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-
-    (*handlerPtr->pub.output_message) (jpgPtr);
-    longjmp(handlerPtr->jmpBuf, 1);
-}
-
-static void
-MessageProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-    char buffer[JMSG_LENGTH_MAX];
-
-    /* Create the message and append it into the dynamic string. */
-    (*handlerPtr->pub.format_message) (jpgPtr, buffer);
-    Tcl_DStringAppend(&handlerPtr->dString, " ", -1);
-    Tcl_DStringAppend(&handlerPtr->dString, buffer, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_JPEGToPicture --
- *
- *      Reads a JPEG file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    struct jpeg_decompress_struct jpg;
-    Blt_Picture pict;
-    unsigned int pictWidth, pictHeight;
-    Blt_Pixel *dp;
-    ReaderHandler handler;
-    FILE *f;
-    JSAMPLE **readBuffer;
-    int row_stride;
-    int i;
-    JSAMPLE *bufPtr;
-
-    f = Blt_OpenFile(interp, fileName, "rb");
-    if (f == NULL) {
-	return NULL;
-    }
-    pict = NULL;
-
-    /* Step 1: allocate and initialize JPEG decompression object */
-
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    jpg.dct_method = JDCT_IFAST;
-    jpg.err = jpeg_std_error(&handler.pub);
-    handler.pub.error_exit = ErrorProc;
-    handler.pub.output_message = MessageProc;
-
-    Tcl_DStringInit(&handler.dString);
-    Tcl_DStringAppend(&handler.dString, "error reading \"", -1);
-    Tcl_DStringAppend(&handler.dString, fileName, -1);
-    Tcl_DStringAppend(&handler.dString, "\": ", -1);
-
-    if (setjmp(handler.jmpBuf)) {
-	jpeg_destroy_decompress(&jpg);
-	fclose(f);
-	Tcl_DStringResult(interp, &handler.dString);
-	return NULL;
-    }
-    jpeg_create_decompress(&jpg);
-    jpeg_stdio_src(&jpg, f);
-
-    jpeg_read_header(&jpg, TRUE);	/* Step 3: read file parameters */
-
-    jpeg_start_decompress(&jpg);	/* Step 5: Start decompressor */
-    pictWidth = jpg.output_width;
-    pictHeight = jpg.output_height;
-    if ((pictWidth < 1) || (pictHeight < 1)) {
-	Tcl_AppendResult(interp, "bad JPEG image size", (char *)NULL);
-	fclose(f);
-	return NULL;
-    }
-    /* JSAMPLEs per row in output buffer */
-    row_stride = pictWidth * jpg.output_components;
-
-    /* Make a one-row-high sample array that will go away when done
-     * with image */
-    readBuffer = (*jpg.mem->alloc_sarray) ((j_common_ptr)&jpg, JPOOL_IMAGE, 
-	row_stride, 1);
-    pict = Blt_CreatePicture(pictWidth, pictHeight);
-    dp = Blt_PictureBits(pict);
-
-    if (jpg.output_components == 1) {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = dp->Green = dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    } else {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = *bufPtr++;
-		dp->Green = *bufPtr++;
-		dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    }
-    jpeg_finish_decompress(&jpg);	/* We can ignore the return value
-					 * since suspension is not
-					 * possible with the stdio data
-					 * source.  */
-    jpeg_destroy_decompress(&jpg);
-
-
-    /*  
-     * After finish_decompress, we can close the input file.  Here we
-     * postpone it until after no more JPEG errors are possible, so as
-     * to simplify the setjmp error logic above.  (Actually, I don't
-     * think that jpeg_destroy can do an error exit, but why assume
-     * anything...)  
-     */
-    fclose(f);
-
-    /* 
-     * At this point you may want to check to see whether any corrupt-data
-     * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
-     */
-    if (handler.pub.num_warnings > 0) {
-	Tcl_SetErrorCode(interp, "IMAGE", "JPEG", 
-		 Tcl_DStringValue(&handler.dString), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    /*
-     * We're ready to call the Tk_Photo routines. They'll take the RGB
-     * array we've processed to build the Tk image of the JPEG.
-     */
-    Tcl_DStringFree(&handler.dString);
-    return pict;
-}
-
-#endif /* HAVE_JPEGLIB_H */
-#endif /* HAVE_IJL_H */
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPicture --
- *
- *	Paints the picture to the given drawable. The region of
- *	the picture is specified and the coordinates where in the 
- *	destination drawable is the image to be displayed.
- *
- *	The image may be dithered depending upon the bit set in
- *	the flags parameter: 0 no dithering, 1 for dithering.
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display,
- *	Otherwise FALSE is returned if the particular combination
- *	visual and image depth is not handled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    Picture *srcPtr,
-    int srcX, int srcY,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Region
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr destPort;
-    Picture *ditherPtr;
-
-    ditherPtr = NULL;
-    if (flags & BLT_PAINTER_DITHER) {
-	ditherPtr = Blt_DitherPicture(srcPtr, painterPtr->palette);
-	if (ditherPtr != NULL) {
-	    srcPtr = ditherPtr;
-	}
-    }
-
-    destPort = TkMacOSXGetDrawablePort(drawable);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-      
-	SetRect(&srcRect, srcX, srcY, srcX + width, srcY + height);
-        SetRect(&destRect, 
-	    destX + dstDraw->xOffset, 
-	    destY + dstDraw->yOffset, 
-            destX + width + dstDraw->xOffset, 
-	    destY + height + dstDraw->yOffset);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(destPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)srcPtr->bits;
-	pm.rowBytes = srcPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap,
-				    * not a BitMap.  */
-	
-	CopyBits((BitMap *)&pm, 
-		 GetPortBitMapForCopyBits(destPort), 
-		 &srcRect, &destRect, srcCopy, NULL);
-    }
-    if (ditherPtr != NULL) {
-        Blt_FreePicture(ditherPtr);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPictureWithBlend --
- *
- *	Blends and paints the picture with the given drawable. The
- *	region of the picture is specified and the coordinates where
- *	in the destination drawable is the image to be displayed.
- *
- *	The background is snapped from the drawable and converted into
- *	a picture.  This picture is then blended with the current
- *	picture (the background always assumed to be 100% opaque).
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display,
- *	Otherwise FALSE is returned.  This may happen if the
- *	background can not be obtained from the drawable.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPictureWithBlend(
-    Painter *painterPtr,
-    Drawable drawable,
-    Blt_Picture fg,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Region
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags, 
-    int alpha)
-{
-    Blt_Picture bg;
-
-    if (destX < 0) {
-	width += destX;
-	destX = 0;
-    } 
-    if (destY < 0) {
-	height += destY;
-	destY = 0;
-    }
-    if ((width < 0) || (height < 0)) {
-	return FALSE;
-    }
-    bg = DrawableToPicture(painterPtr, drawable, destX, destY, width, height);
-    if (bg == NULL) {
-	return FALSE;
-    }
-#ifdef notdef
-    Blt_FadePicture(bg, fg, x, y, width, height, 0, 0, alpha);
-#else
-    Blt_BlendPictures(bg, fg, x, y, bg->width, bg->height, 0, 0);
-#endif
-    PaintPicture(painterPtr, drawable, bg, 0, 0, bg->width, bg->height, destX, 
-	destY, flags);
-    Blt_FreePicture(bg);
-    return TRUE;
-}
-
-
-int
-Blt_PaintPicture(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Region
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    if ((picture == NULL) || (x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture))) {
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */
-	return TRUE;	
-    }
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    if ((width <= 0) || (height <= 0)) {
-	return TRUE;
-    }
-    if (Blt_IsOpaquePicture(picture)) {
-	return PaintPicture(painter, drawable, picture, x, y, width, height, 
-		destX, destY, flags);
-    } else {
-	int alpha = 128;
-
-	return PaintPictureWithBlend(painter, drawable, picture, x, y, 
-		width, height, destX, destY, flags, alpha);
-    }
-}
-
-
-int
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Region
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags,		/* Indicates whether to dither the
-				 * picture before displaying. */
-    double falpha)
-{
-    int alpha;
-
-    alpha = (int)(falpha * 255.0 + 0.5);
-
-    assert((x >= 0) && (y >= 0));
-    /* assert((destX >= 0) && (destY >= 0)); */
-    assert((width >= 0) && (height >= 0));
-
-    if ((x >= Blt_PictureWidth(picture)) || (y >= Blt_PictureHeight(picture))){
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */	
-	return TRUE;
-    }
-    /* 
-     * Check that the region defined does not extend beyond the end of
-     * the picture.
-     *
-     * Clip the end of the region if it is too big.
-     */
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    return PaintPictureWithBlend(painter, drawable, picture, x, y, width,
-	height, destX, destY, flags, alpha);
-}
-
-
-GC 
-Blt_PainterGC(Painter *painterPtr)
-{
-    return painterPtr->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *painterPtr)
-{
-    return painterPtr->depth;
-}
diff --git a/blt3.0/src/bltMacOSX.h b/blt3.0/src/bltMacOSX.h
deleted file mode 100644
index f4871d8..0000000
--- a/blt3.0/src/bltMacOSX.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/*
- * bltMacOSX.h --
- *
- *	Copyright 2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_MACOSX_H
-#define _BLT_MACOSX_H
-
-#ifdef MACOSX
-#define NO_CUTBUFFER	1
-#define NO_DND		1
-#define NO_BUSY		1
-#define NO_CONTAINER	1
-#endif
-/* #define NO_TED */
-
-#define XFlush(display)
-#define XFree(data)     Blt_Free(data)
-
-
-#include <sys/cdefs.h>
-
-#ifdef __BIG_ENDIAN__
-#define WORDS_BIGENDIAN 1
-#else /* !__BIG_ENDIAN__ */
-/* #undef WORDS_BIGENDIAN */
-#endif /* __BIG_ENDIAN__ */
-
-#ifdef __LP64__
-#define SIZEOF_FLOAT 	8
-#define SIZEOF_LONG 	8
-#define SIZEOF_INT 	4
-#define SIZEOF_LONG_LONG 8
-#define SIZEOF_VOID_P 	8
-#else /* !__LP64__ */
-#define SIZEOF_FLOAT 	4
-#define SIZEOF_LONG 	4
-#define SIZEOF_INT 	4
-#define SIZEOF_LONG_LONG 8
-#define SIZEOF_VOID_P 	4
-#endif /* __LP64__ */
-
-#if defined (__i386__) || defined(__x86_64__)
-#define HAVE_X86 1
-#endif
-
-#endif /*_BLT_MACOSX_H*/
diff --git a/blt3.0/src/bltMacOSXPainter.c b/blt3.0/src/bltMacOSXPainter.c
deleted file mode 100644
index 3e715bb..0000000
--- a/blt3.0/src/bltMacOSXPainter.c
+++ /dev/null
@@ -1,1394 +0,0 @@
-
-/*
- * bltMacOSXPainter.c --
- *
- * This module implements MacOSX-specific image processing procedures
- * for the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-
-typedef struct _Blt_Picture Picture;
-
-#include <Carbon/Carbon.h>
-
-struct TkWindow;
-
-struct _MacDrawable {
-    TkWindow *winPtr;     	/* Ptr to tk window or NULL if Pixmap */
-    CGrafPtr  grafPtr;
-    ControlRef rootControl;
-    int xOffset;		/* X offset from toplevel window. */
-    int yOffset;	       	/* Y offset from toplevel window. */
-    RgnHandle clipRgn;		/* Visable region of window. */
-    RgnHandle aboveClipRgn;	/* Visable region of window and its
-				 * children. */
-    int referenceCount;		/* Don't delete toplevel until
-				 * children are gone. */
-
-    /* Pointer to the toplevel datastruct. */
-    struct _MacDrawable *toplevel;	
-    int flags;			/* Various state see defines below. */
-};
-
-typedef struct _MacDrawable *MacDrawable;
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Picture
-DrawableToPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    int x, int y,
-    int width, int height)	/* Dimension of the drawable. */
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr srcPort;
-    Picture *destPtr;
-
-    srcPort = TkMacOSXGetDrawablePort(drawable);
-    destPtr = Blt_CreatePicture(width, height);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-      
-	SetRect(&srcRect, x, y, x + width, y + height);
-        SetRect(&destRect, 0, 0, width, height);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(srcPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)destPtr->bits;
-	pm.rowBytes = destPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap, not a
-				    * BitMap.  */
-	
-	CopyBits(GetPortBitMapForCopyBits(destPort), 
-		 (BitMap *)&pm, &srcRect, &destRect, srcCopy, NULL);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WindowToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- *	This routine is used to snap foreign (non-Tk) windows. For
- *	pixmaps and Tk windows, Blt_DrawableToPicture is preferred.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_WindowToPicture(
-    Display *display,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainterFromDrawable(display, drawable, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_DrawableToPicture(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainter(tkwin, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-
-Pixmap
-Blt_PhotoImageMask(
-    Tk_Window tkwin,
-    Tk_PhotoImageBlock src)
-{
-    TkWinBitmap *twdPtr;
-    int offset, count;
-    int x, y;
-    unsigned char *srcPtr;
-    int destBytesPerRow;
-    int destHeight;
-    unsigned char *destBits;
-
-    destBytesPerRow = ((src.width + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(src.height, destBytesPerRow);
-    destHeight = src.height;
-
-    offset = count = 0;
-
-    /* FIXME: figure out why this is so! */
-    for (y = src.height - 1; y >= 0; y--) {
-	srcPtr = src.pixelPtr + offset;
-	for (x = 0; x < src.width; x++) {
-	    if (srcPtr[src.offset[3]] == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    srcPtr += src.pixelSize;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = src.width;
-	bm.bmHeight = src.height;
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-Pixmap
-Blt_PictureMask(
-    Tk_Window tkwin,
-    Blt_Picture pict)
-{
-    TkWinBitmap *twdPtr;
-    int count;
-    int x, y;
-    Blt_Pixel *sp;
-    int destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *destBits;
-
-    destWidth = Blt_PictureWidth(pict);
-    destHeight = Blt_PictureHeight(pict);
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-    count = 0;
-    sp = Blt_PictureBits(pict);
-    for (y = 0; y < destHeight; y++) {
-	for (x = 0; x < destWidth; x++) {
-	    if (sp->Alpha == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    sp++;
-	}
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = Blt_PictureWidth(pict);
-	bm.bmHeight = Blt_PictureHeight(pict);
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given
- *	bitmap.  We also need a special GC of depth 1, so that we do
- *	not need to rotate more than one plane of the bitmap.
- *
- *	Note that under Windows, monochrome bitmaps are stored
- *	bottom-to-top.  This is why the right angle rotations 0/180
- *	and 90/270 look reversed.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, 
-    int srcHeight,		/* Width and height of the source bitmap */
-    float angle,		/* Right angle rotation to perform */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    double rotWidth, rotHeight;
-    HDC hDC;
-    TkWinDCState state;
-    int x, y;			/* Destination bitmap coordinates */
-    int sx, sy;			/* Source bitmap coordinates */
-    unsigned long pixel;
-    HBITMAP hBitmap;
-    int result;
-    struct MonoBitmap {
-	BITMAPINFOHEADER bi;
-	RGBQUAD colors[2];
-    } mb;
-    int srcBytesPerRow, destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    destWidth = (int)ceil(rotWidth);
-    destHeight = (int)ceil(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-
-	/* Handle right-angle rotations specially. */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    sy = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:		/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sx = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sy = x;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		for (x = 0; x < destWidth; x++) {
-		    pixel = GetBit(x, y);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double srcCX, srcCY;	/* Center of source rectangle */
-	double destCX, destCY;	/* Center of destination rectangle */
-	double tx, ty;
-	double rx, ry;		/* Angle of rotation for x and y coordinates */
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	srcCX = srcWidth * 0.5;
-	srcCY = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* Rotate each pixel of dest image, placing results in source image */
-
-	for (y = 0; y < destHeight; y++) {
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-
-		/* Translate origin to center of destination image */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image */
-		rx += srcCX;
-		ry += srcCY;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-    ZeroMemory(&mb, sizeof(mb));
-    mb.bi.biSize = sizeof(BITMAPINFOHEADER);
-    mb.bi.biPlanes = 1;
-    mb.bi.biBitCount = 1;
-    mb.bi.biCompression = BI_RGB;
-    mb.bi.biWidth = destWidth;
-    mb.bi.biHeight = destHeight;
-    mb.bi.biSizeImage = destBytesPerRow * destHeight;
-    mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 0x0;
-    mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 0xFF;
-    hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-    result = SetDIBits(hDC, hBitmap, 0, destHeight, (LPVOID)destBits, 
-	(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. 
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, 
-    int srcHeight, 
-    int destWidth, 
-    int destHeight)
-{
-    TkWinDCState srcState, destState;
-    HDC src, dest;
-    Pixmap destBitmap;
-    Window root;
-    Display *display;
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;
-    }
-    src = TkWinGetDrawableDC(display, srcBitmap, &srcState);
-    dest = TkWinGetDrawableDC(display, destBitmap, &destState);
-
-    StretchBlt(dest, 0, 0, destWidth, destHeight, src, 0, 0,
-	srcWidth, srcHeight, SRCCOPY);
-
-    TkWinReleaseDrawableDC(srcBitmap, src, &srcState);
-    TkWinReleaseDrawableDC(destBitmap, dest, &destState);
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleRotateBitmapArea --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The
- *	caller also provides (offsets and dimensions) the region of
- *	interest in the destination bitmap.  This saves having to
- *	process the entire destination bitmap is only part of it is
- *	showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the 
- *	destination image.  For each pixel, the corresponding 
- *	pixel in the source bitmap is used.  This means that 
- *	destination coordinates are first scaled to the size of 
- *	the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapArea(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, 
-    int regionY,		/* Offset of region in virtual
-				 * destination bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int virtWidth,		
-    unsigned int virtHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    double rWidth, rHeight;
-    double xScale, yScale;
-    int srcBytesPerRow, destBytesPerRow;
-    int destHeight;
-    int result;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((regionWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(regionHeight, destBytesPerRow);
-    destHeight = regionHeight;
-
-    angle = FMOD(angle, 360.0);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rWidth, &rHeight,
-	       (Point2d *)NULL);
-    xScale = rWidth / (double)virtWidth;
-    yScale = rHeight / (double)virtHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(y+regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sy;
-
-		    sy = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sx;
-
-		    sx = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double scx, scy; 	/* Offset from the center of the
-				 * source rectangle. */
-	double rcx, rcy; 	/* Offset to the center of the
-				 * rotated rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	scx = srcWidth * 0.5;
-	scy = srcHeight * 0.5;
-	rcx = rWidth * 0.5;
-	rcy = rHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < (int)regionHeight; y++) {
-	    int x;
-	    double ty;		/* Translated coordinates from center */
-
-	    ty = (yScale * (double)(y + regionY)) - rcy;
-	    for (x = 0; x < (int)regionWidth; x++) {
-		double rx, ry;	/* Angle of rotation for x and y coordinates */
-		double tx;	/* Translated coordinates from center */
-		int sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rcx;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += scx;
-		ry += scy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= (int)srcWidth) || (sx < 0) || 
-		    (sy >= (int)srcHeight) || (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    {
-	HBITMAP hBitmap;
-	HDC hDC;
-	TkWinDCState state;
-	struct MonoBitmap {
-	    BITMAPINFOHEADER bmiHeader;
-	    RGBQUAD colors[2];
-	} mb;
-	
-	/* Write the rotated image into the destination bitmap. */
-	hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-	ZeroMemory(&mb, sizeof(mb));
-	mb.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-	mb.bmiHeader.biPlanes = 1;
-	mb.bmiHeader.biBitCount = 1;
-	mb.bmiHeader.biCompression = BI_RGB;
-	mb.bmiHeader.biWidth = regionWidth;
-	mb.bmiHeader.biHeight = regionHeight;
-	mb.bmiHeader.biSizeImage = destBytesPerRow * regionHeight;
-	mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 
-	    0x0;
-	mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 
-	    0xFF;
-	hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-	result = SetDIBits(hDC, hBitmap, 0, regionHeight, (LPVOID)destBits, 
-		(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-	TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    }
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-    return destBitmap;
-}
-
-#ifdef HAVE_IJL_H
-
-#include <ijl.h>
-
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    JPEG_CORE_PROPERTIES jpgProps;
-    Blt_Picture pict;
-
-    ZeroMemory(&jpgProps, sizeof(JPEG_CORE_PROPERTIES));
-    if(ijlInit(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't initialize Intel JPEG library",
-			 (char *)NULL);
-	return NULL;
-    }
-    jpgProps.JPGFile = fileName;
-    if (ijlRead(&jpgProps, IJL_JFILE_READPARAMS) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read JPEG file header from \"",
-			 fileName, "\" file.", (char *)NULL);
-	goto error;
-    }
-
-    // !dudnik: to fix bug case 584680, [OT:287A305B]
-    // Set the JPG color space ... this will always be
-    // somewhat of an educated guess at best because JPEG
-    // is "color blind" (i.e., nothing in the bit stream
-    // tells you what color space the data was encoded from).
-    // However, in this example we assume that we are
-    // reading JFIF files which means that 3 channel images
-    // are in the YCbCr color space and 1 channel images are
-    // in the Y color space.
-    switch(jpgProps.JPGChannels) {
-    case 1:
-	jpgProps.JPGColor = IJL_G;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-	
-    case 3:
-	jpgProps.JPGColor = IJL_YCBCR;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    case 4:
-	jpgProps.JPGColor = IJL_YCBCRA_FPX;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    default:
-	/* This catches everything else, but no color twist will be
-           performed by the IJL. */
-	jpgProps.DIBColor = (IJL_COLOR)IJL_OTHER;
- 	jpgProps.JPGColor = (IJL_COLOR)IJL_OTHER;
-	jpgProps.DIBChannels = jpgProps.JPGChannels;
-	break;
-    }
-
-    jpgProps.DIBWidth    = jpgProps.JPGWidth;
-    jpgProps.DIBHeight   = jpgProps.JPGHeight;
-    jpgProps.DIBPadBytes = IJL_DIB_PAD_BYTES(jpgProps.DIBWidth, 
-					     jpgProps.DIBChannels);
-
-    pict = Blt_CreatePicture(jpgProps.JPGWidth, jpgProps.JPGHeight);
-
-    jpgProps.DIBBytes = (BYTE *)Blt_PictureBits(pict);
-    if (ijlRead(&jpgProps, IJL_JFILE_READWHOLEIMAGE) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read image data from \"", fileName,
-		 "\"", (char *)NULL);
-	goto error;
-    }
-    if (ijlFree(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't free Intel(R) JPEG library.",
-			 (char *)NULL);
-    }
-    return pict;
-
- error:
-    ijlFree(&jpgProps);
-    if (pict != NULL) {
-	Blt_FreePicture(pict);
-    }
-    ijlFree(&jpgProps);
-    return NULL;
-} 
-
-#else 
-
-#ifdef HAVE_JPEGLIB_H
-
-#undef HAVE_STDLIB_H
-#ifdef WIN32
-#define XMD_H	1
-#endif
-#include "jpeglib.h"
-#include <setjmp.h>
-
-typedef struct {
-    struct jpeg_error_mgr pub;	/* "public" fields */
-    jmp_buf jmpBuf;
-    Tcl_DString dString;
-} ReaderHandler;
-
-static void ErrorProc(j_common_ptr jpegInfo);
-static void MessageProc(j_common_ptr jpegInfo);
-
-/*
- * Here's the routine that will replace the standard error_exit method:
- */
-
-static void
-ErrorProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-
-    (*handlerPtr->pub.output_message) (jpgPtr);
-    longjmp(handlerPtr->jmpBuf, 1);
-}
-
-static void
-MessageProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-    char buffer[JMSG_LENGTH_MAX];
-
-    /* Create the message and append it into the dynamic string. */
-    (*handlerPtr->pub.format_message) (jpgPtr, buffer);
-    Tcl_DStringAppend(&handlerPtr->dString, " ", -1);
-    Tcl_DStringAppend(&handlerPtr->dString, buffer, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_JPEGToPicture --
- *
- *      Reads a JPEG file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    struct jpeg_decompress_struct jpg;
-    Blt_Picture pict;
-    unsigned int pictWidth, pictHeight;
-    Blt_Pixel *dp;
-    ReaderHandler handler;
-    FILE *f;
-    JSAMPLE **readBuffer;
-    int row_stride;
-    int i;
-    JSAMPLE *bufPtr;
-
-    f = Blt_OpenFile(interp, fileName, "rb");
-    if (f == NULL) {
-	return NULL;
-    }
-    pict = NULL;
-
-    /* Step 1: allocate and initialize JPEG decompression object */
-
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    jpg.dct_method = JDCT_IFAST;
-    jpg.err = jpeg_std_error(&handler.pub);
-    handler.pub.error_exit = ErrorProc;
-    handler.pub.output_message = MessageProc;
-
-    Tcl_DStringInit(&handler.dString);
-    Tcl_DStringAppend(&handler.dString, "error reading \"", -1);
-    Tcl_DStringAppend(&handler.dString, fileName, -1);
-    Tcl_DStringAppend(&handler.dString, "\": ", -1);
-
-    if (setjmp(handler.jmpBuf)) {
-	jpeg_destroy_decompress(&jpg);
-	fclose(f);
-	Tcl_DStringResult(interp, &handler.dString);
-	return NULL;
-    }
-    jpeg_create_decompress(&jpg);
-    jpeg_stdio_src(&jpg, f);
-
-    jpeg_read_header(&jpg, TRUE);	/* Step 3: read file parameters */
-
-    jpeg_start_decompress(&jpg);	/* Step 5: Start decompressor */
-    pictWidth = jpg.output_width;
-    pictHeight = jpg.output_height;
-    if ((pictWidth < 1) || (pictHeight < 1)) {
-	Tcl_AppendResult(interp, "bad JPEG image size", (char *)NULL);
-	fclose(f);
-	return NULL;
-    }
-    /* JSAMPLEs per row in output buffer */
-    row_stride = pictWidth * jpg.output_components;
-
-    /* Make a one-row-high sample array that will go away when done
-     * with image */
-    readBuffer = (*jpg.mem->alloc_sarray) ((j_common_ptr)&jpg, JPOOL_IMAGE, 
-	row_stride, 1);
-    pict = Blt_CreatePicture(pictWidth, pictHeight);
-    dp = Blt_PictureBits(pict);
-
-    if (jpg.output_components == 1) {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = dp->Green = dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    } else {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = *bufPtr++;
-		dp->Green = *bufPtr++;
-		dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    }
-    jpeg_finish_decompress(&jpg);	/* We can ignore the return value
-					 * since suspension is not
-					 * possible with the stdio data
-					 * source.  */
-    jpeg_destroy_decompress(&jpg);
-
-
-    /*  
-     * After finish_decompress, we can close the input file.  Here we
-     * postpone it until after no more JPEG errors are possible, so as
-     * to simplify the setjmp error logic above.  (Actually, I don't
-     * think that jpeg_destroy can do an error exit, but why assume
-     * anything...)  
-     */
-    fclose(f);
-
-    /* 
-     * At this point you may want to check to see whether any corrupt-data
-     * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
-     */
-    if (handler.pub.num_warnings > 0) {
-	Tcl_SetErrorCode(interp, "IMAGE", "JPEG", 
-		 Tcl_DStringValue(&handler.dString), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    /*
-     * We're ready to call the Tk_Photo routines. They'll take the RGB
-     * array we've processed to build the Tk image of the JPEG.
-     */
-    Tcl_DStringFree(&handler.dString);
-    return pict;
-}
-
-#endif /* HAVE_JPEGLIB_H */
-#endif /* HAVE_IJL_H */
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPicture --
- *
- *	Paints the picture to the given drawable. The region of
- *	the picture is specified and the coordinates where in the 
- *	destination drawable is the image to be displayed.
- *
- *	The image may be dithered depending upon the bit set in
- *	the flags parameter: 0 no dithering, 1 for dithering.
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display,
- *	Otherwise FALSE is returned if the particular combination
- *	visual and image depth is not handled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    Picture *srcPtr,
-    int srcX, int srcY,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr destPort;
-    Picture *ditherPtr;
-
-    ditherPtr = NULL;
-    if (flags & BLT_PAINTER_DITHER) {
-	ditherPtr = Blt_DitherPicture(srcPtr, painterPtr->palette);
-	if (ditherPtr != NULL) {
-	    srcPtr = ditherPtr;
-	}
-    }
-
-    destPort = TkMacOSXGetDrawablePort(drawable);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-
-	SetRect(&srcRect, srcX, srcY, srcX + width, srcY + height);
-        SetRect(&destRect, 
-	    destX + dstDraw->xOffset, 
-	    destY + dstDraw->yOffset, 
-            destX + width + dstDraw->xOffset, 
-	    destY + height + dstDraw->yOffset);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(destPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)srcPtr->bits;
-	pm.rowBytes = srcPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap,
-				    * not a BitMap.  */
-	CopyBits((BitMap *)&pm, 
-		GetPortBitMapForCopyBits(destPort), 
-		&srcRect, &destRect, srcCopy, NULL);
-    }
-    if (ditherPtr != NULL) {
-        Blt_FreePicture(ditherPtr);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPictureWithBlend --
- *
- *	Blends and paints the picture with the given drawable. The
- *	region of the picture is specified and the coordinates where
- *	in the destination drawable is the image to be displayed.
- *
- *	The background is snapped from the drawable and converted into
- *	a picture.  This picture is then blended with the current
- *	picture (the background always assumed to be 100% opaque).
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display,
- *	Otherwise FALSE is returned.  This may happen if the
- *	background can not be obtained from the drawable.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPictureWithBlend(
-    Painter *painterPtr,
-    Drawable drawable,
-    Blt_Picture fg,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags, 
-    int alpha)
-{
-    Blt_Picture bg;
-
-    if (destX < 0) {
-	width += destX;
-	destX = 0;
-    } 
-    if (destY < 0) {
-	height += destY;
-	destY = 0;
-    }
-    if ((width < 0) || (height < 0)) {
-	return FALSE;
-    }
-    bg = DrawableToPicture(painterPtr, drawable, destX, destY, width, height);
-    if (bg == NULL) {
-	return FALSE;
-    }
-#ifdef notdef
-    Blt_FadePicture(bg, fg, x, y, width, height, 0, 0, alpha);
-#else
-    Blt_BlendPictures(bg, fg, x, y, bg->width, bg->height, 0, 0);
-#endif
-    PaintPicture(painterPtr, drawable, bg, 0, 0, bg->width, bg->height, destX, 
-	destY, flags);
-    Blt_FreePicture(bg);
-    return TRUE;
-}
-
-
-int
-Blt_PaintPicture(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    if ((picture == NULL) || (x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture))) {
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */
-	return TRUE;	
-    }
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    if ((width <= 0) || (height <= 0)) {
-	return TRUE;
-    }
-    if (Blt_PictureIsOpaque(picture)) {
-	return PaintPicture(painter, drawable, picture, x, y, width, height, 
-		destX, destY, flags);
-    } else {
-	int alpha = 128;
-
-	return PaintPictureWithBlend(painter, drawable, picture, x, y, 
-		width, height, destX, destY, flags, alpha);
-    }
-}
-
-
-int
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags,		/* Indicates whether to dither the
-				 * picture before displaying. */
-    double falpha)
-{
-    int alpha;
-
-    alpha = (int)(falpha * 255.0 + 0.5);
-
-    assert((x >= 0) && (y >= 0));
-    /* assert((destX >= 0) && (destY >= 0)); */
-    assert((width >= 0) && (height >= 0));
-
-    if ((x >= Blt_PictureWidth(picture)) || (y >= Blt_PictureHeight(picture))){
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */	
-	return TRUE;
-    }
-    /* 
-     * Check that the region defined does not extend beyond the end of
-     * the picture.
-     *
-     * Clip the end of the region if it is too big.
-     */
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    return PaintPictureWithBlend(painter, drawable, picture, x, y, width,
-	height, destX, destY, flags, alpha);
-}
-
-
-GC 
-Blt_PainterGC(Painter *painterPtr)
-{
-    return painterPtr->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *painterPtr)
-{
-    return painterPtr->depth;
-}
diff --git a/blt3.0/src/bltMacPainter.c b/blt3.0/src/bltMacPainter.c
deleted file mode 100644
index 0f2c0d6..0000000
--- a/blt3.0/src/bltMacPainter.c
+++ /dev/null
@@ -1,1394 +0,0 @@
-
-/*
- * bltMacOSXPainter.c --
- *
- * This module implements MacOSX-specific image processing procedures
- * for the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-
-typedef struct _Blt_Picture Picture;
-
-#include <Carbon/Carbon.h>
-
-struct TkWindow;
-
-struct _MacDrawable {
-    TkWindow *winPtr;     	/* Ptr to tk window or NULL if Pixmap */
-    CGrafPtr  grafPtr;
-    ControlRef rootControl;
-    int xOffset;		/* X offset from toplevel window. */
-    int yOffset;	       	/* Y offset from toplevel window. */
-    RgnHandle clipRgn;		/* Visable region of window. */
-    RgnHandle aboveClipRgn;	/* Visable region of window and its
-				 * children. */
-    int referenceCount;		/* Don't delete toplevel until
-				 * children are gone. */
-
-    /* Pointer to the toplevel datastruct. */
-    struct _MacDrawable *toplevel;	
-    int flags;			/* Various state see defines below. */
-};
-
-typedef struct _MacDrawable *MacDrawable;
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Picture
-DrawableToPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    int x, int y,
-    int width, int height)	/* Dimension of the drawable. */
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr srcPort;
-    Picture *destPtr;
-
-    srcPort = TkMacOSXGetDrawablePort(drawable);
-    destPtr = Blt_CreatePicture(width, height);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-      
-	SetRect(&srcRect, x, y, x + width, y + height);
-        SetRect(&destRect, 0, 0, width, height);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(srcPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)destPtr->bits;
-	pm.rowBytes = destPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap,
-				    * not a BitMap.  */
-	
-	CopyBits(GetPortBitMapForCopyBits(destPort), 
-		 (BitMap *)&pm, &srcRect, &destRect, srcCopy, NULL);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WindowToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- *	This routine is used to snap foreign (non-Tk) windows. For
- *	pixmaps and Tk windows, Blt_DrawableToPicture is preferred.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_WindowToPicture(
-    Display *display,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainterFromDrawable(display, drawable, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Picture *
-Blt_DrawableToPicture(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    double gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainter(tkwin, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-
-Pixmap
-Blt_PhotoImageMask(
-    Tk_Window tkwin,
-    Tk_PhotoImageBlock src)
-{
-    TkWinBitmap *twdPtr;
-    int offset, count;
-    int x, y;
-    unsigned char *srcPtr;
-    int destBytesPerRow;
-    int destHeight;
-    unsigned char *destBits;
-
-    destBytesPerRow = ((src.width + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(src.height, destBytesPerRow);
-    destHeight = src.height;
-
-    offset = count = 0;
-
-    /* FIXME: figure out why this is so! */
-    for (y = src.height - 1; y >= 0; y--) {
-	srcPtr = src.pixelPtr + offset;
-	for (x = 0; x < src.width; x++) {
-	    if (srcPtr[src.offset[3]] == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    srcPtr += src.pixelSize;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = src.width;
-	bm.bmHeight = src.height;
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-Pixmap
-Blt_PictureMask(
-    Tk_Window tkwin,
-    Blt_Picture pict)
-{
-    TkWinBitmap *twdPtr;
-    int count;
-    int x, y;
-    Blt_Pixel *sp;
-    int destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *destBits;
-
-    destWidth = Blt_PictureWidth(pict);
-    destHeight = Blt_PictureHeight(pict);
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-    count = 0;
-    sp = Blt_PictureBits(pict);
-    for (y = 0; y < destHeight; y++) {
-	for (x = 0; x < destWidth; x++) {
-	    if (sp->Alpha == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    sp++;
-	}
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = Blt_PictureWidth(pict);
-	bm.bmHeight = Blt_PictureHeight(pict);
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given
- *	bitmap.  We also need a special GC of depth 1, so that we do
- *	not need to rotate more than one plane of the bitmap.
- *
- *	Note that under Windows, monochrome bitmaps are stored
- *	bottom-to-top.  This is why the right angle rotations 0/180
- *	and 90/270 look reversed.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, 
-    int srcHeight,		/* Width and height of the source bitmap */
-    float angle,		/* Right angle rotation to perform */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    double rotWidth, rotHeight;
-    HDC hDC;
-    TkWinDCState state;
-    int x, y;			/* Destination bitmap coordinates */
-    int sx, sy;			/* Source bitmap coordinates */
-    unsigned long pixel;
-    HBITMAP hBitmap;
-    int result;
-    struct MonoBitmap {
-	BITMAPINFOHEADER bi;
-	RGBQUAD colors[2];
-    } mb;
-    int srcBytesPerRow, destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    destWidth = (int)ceil(rotWidth);
-    destHeight = (int)ceil(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-
-	/* Handle right-angle rotations specially. */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    sy = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:		/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sx = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sy = x;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		for (x = 0; x < destWidth; x++) {
-		    pixel = GetBit(x, y);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double srcCX, srcCY;	/* Center of source rectangle */
-	double destCX, destCY;	/* Center of destination rectangle */
-	double tx, ty;
-	double rx, ry;		/* Angle of rotation for x and y coordinates */
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	srcCX = srcWidth * 0.5;
-	srcCY = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* Rotate each pixel of dest image, placing results in source image */
-
-	for (y = 0; y < destHeight; y++) {
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-
-		/* Translate origin to center of destination image */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image */
-		rx += srcCX;
-		ry += srcCY;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-    ZeroMemory(&mb, sizeof(mb));
-    mb.bi.biSize = sizeof(BITMAPINFOHEADER);
-    mb.bi.biPlanes = 1;
-    mb.bi.biBitCount = 1;
-    mb.bi.biCompression = BI_RGB;
-    mb.bi.biWidth = destWidth;
-    mb.bi.biHeight = destHeight;
-    mb.bi.biSizeImage = destBytesPerRow * destHeight;
-    mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 0x0;
-    mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 0xFF;
-    hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-    result = SetDIBits(hDC, hBitmap, 0, destHeight, (LPVOID)destBits, 
-	(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. 
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, 
-    int srcHeight, 
-    int destWidth, 
-    int destHeight)
-{
-    TkWinDCState srcState, destState;
-    HDC src, dest;
-    Pixmap destBitmap;
-    Window root;
-    Display *display;
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;
-    }
-    src = TkWinGetDrawableDC(display, srcBitmap, &srcState);
-    dest = TkWinGetDrawableDC(display, destBitmap, &destState);
-
-    StretchBlt(dest, 0, 0, destWidth, destHeight, src, 0, 0,
-	srcWidth, srcHeight, SRCCOPY);
-
-    TkWinReleaseDrawableDC(srcBitmap, src, &srcState);
-    TkWinReleaseDrawableDC(destBitmap, dest, &destState);
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleRotateBitmapArea --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The
- *	caller also provides (offsets and dimensions) the region of
- *	interest in the destination bitmap.  This saves having to
- *	process the entire destination bitmap is only part of it is
- *	showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the 
- *	destination image.  For each pixel, the corresponding 
- *	pixel in the source bitmap is used.  This means that 
- *	destination coordinates are first scaled to the size of 
- *	the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapArea(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, 
-    int regionY,		/* Offset of region in virtual
-				 * destination bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int virtWidth,		
-    unsigned int virtHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    double rWidth, rHeight;
-    double xScale, yScale;
-    int srcBytesPerRow, destBytesPerRow;
-    int destHeight;
-    int result;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((regionWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(regionHeight, destBytesPerRow);
-    destHeight = regionHeight;
-
-    angle = FMOD(angle, 360.0);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rWidth, &rHeight,
-	       (Point2d *)NULL);
-    xScale = rWidth / (double)virtWidth;
-    yScale = rHeight / (double)virtHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(y+regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sy;
-
-		    sy = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sx;
-
-		    sx = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double scx, scy; 	/* Offset from the center of the
-				 * source rectangle. */
-	double rcx, rcy; 	/* Offset to the center of the
-				 * rotated rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	scx = srcWidth * 0.5;
-	scy = srcHeight * 0.5;
-	rcx = rWidth * 0.5;
-	rcy = rHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < (int)regionHeight; y++) {
-	    int x;
-	    double ty;		/* Translated coordinates from center */
-
-	    ty = (yScale * (double)(y + regionY)) - rcy;
-	    for (x = 0; x < (int)regionWidth; x++) {
-		double rx, ry;	/* Angle of rotation for x and y coordinates */
-		double tx;	/* Translated coordinates from center */
-		int sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rcx;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += scx;
-		ry += scy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= (int)srcWidth) || (sx < 0) || 
-		    (sy >= (int)srcHeight) || (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    {
-	HBITMAP hBitmap;
-	HDC hDC;
-	TkWinDCState state;
-	struct MonoBitmap {
-	    BITMAPINFOHEADER bmiHeader;
-	    RGBQUAD colors[2];
-	} mb;
-	
-	/* Write the rotated image into the destination bitmap. */
-	hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-	ZeroMemory(&mb, sizeof(mb));
-	mb.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-	mb.bmiHeader.biPlanes = 1;
-	mb.bmiHeader.biBitCount = 1;
-	mb.bmiHeader.biCompression = BI_RGB;
-	mb.bmiHeader.biWidth = regionWidth;
-	mb.bmiHeader.biHeight = regionHeight;
-	mb.bmiHeader.biSizeImage = destBytesPerRow * regionHeight;
-	mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 
-	    0x0;
-	mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 
-	    0xFF;
-	hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-	result = SetDIBits(hDC, hBitmap, 0, regionHeight, (LPVOID)destBits, 
-		(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-	TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    }
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-    return destBitmap;
-}
-
-#ifdef HAVE_IJL_H
-
-#include <ijl.h>
-
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    JPEG_CORE_PROPERTIES jpgProps;
-    Blt_Picture pict;
-
-    ZeroMemory(&jpgProps, sizeof(JPEG_CORE_PROPERTIES));
-    if(ijlInit(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't initialize Intel JPEG library",
-			 (char *)NULL);
-	return NULL;
-    }
-    jpgProps.JPGFile = fileName;
-    if (ijlRead(&jpgProps, IJL_JFILE_READPARAMS) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read JPEG file header from \"",
-			 fileName, "\" file.", (char *)NULL);
-	goto error;
-    }
-
-    // !dudnik: to fix bug case 584680, [OT:287A305B]
-    // Set the JPG color space ... this will always be
-    // somewhat of an educated guess at best because JPEG
-    // is "color blind" (i.e., nothing in the bit stream
-    // tells you what color space the data was encoded from).
-    // However, in this example we assume that we are
-    // reading JFIF files which means that 3 channel images
-    // are in the YCbCr color space and 1 channel images are
-    // in the Y color space.
-    switch(jpgProps.JPGChannels) {
-    case 1:
-	jpgProps.JPGColor = IJL_G;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-	
-    case 3:
-	jpgProps.JPGColor = IJL_YCBCR;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    case 4:
-	jpgProps.JPGColor = IJL_YCBCRA_FPX;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    default:
-	/* This catches everything else, but no color twist will be
-           performed by the IJL. */
-	jpgProps.DIBColor = (IJL_COLOR)IJL_OTHER;
- 	jpgProps.JPGColor = (IJL_COLOR)IJL_OTHER;
-	jpgProps.DIBChannels = jpgProps.JPGChannels;
-	break;
-    }
-
-    jpgProps.DIBWidth    = jpgProps.JPGWidth;
-    jpgProps.DIBHeight   = jpgProps.JPGHeight;
-    jpgProps.DIBPadBytes = IJL_DIB_PAD_BYTES(jpgProps.DIBWidth, 
-					     jpgProps.DIBChannels);
-
-    pict = Blt_CreatePicture(jpgProps.JPGWidth, jpgProps.JPGHeight);
-
-    jpgProps.DIBBytes = (BYTE *)Blt_PictureBits(pict);
-    if (ijlRead(&jpgProps, IJL_JFILE_READWHOLEIMAGE) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read image data from \"", fileName,
-		 "\"", (char *)NULL);
-	goto error;
-    }
-    if (ijlFree(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't free Intel(R) JPEG library.",
-			 (char *)NULL);
-    }
-    return pict;
-
- error:
-    ijlFree(&jpgProps);
-    if (pict != NULL) {
-	Blt_FreePicture(pict);
-    }
-    ijlFree(&jpgProps);
-    return NULL;
-} 
-
-#else 
-
-#ifdef HAVE_JPEGLIB_H
-
-#undef HAVE_STDLIB_H
-#ifdef WIN32
-#define XMD_H	1
-#endif
-#include "jpeglib.h"
-#include <setjmp.h>
-
-typedef struct {
-    struct jpeg_error_mgr pub;	/* "public" fields */
-    jmp_buf jmpBuf;
-    Tcl_DString dString;
-} ReaderHandler;
-
-static void ErrorProc(j_common_ptr jpegInfo);
-static void MessageProc(j_common_ptr jpegInfo);
-
-/*
- * Here's the routine that will replace the standard error_exit method:
- */
-
-static void
-ErrorProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-
-    (*handlerPtr->pub.output_message) (jpgPtr);
-    longjmp(handlerPtr->jmpBuf, 1);
-}
-
-static void
-MessageProc(jpgPtr)
-    j_common_ptr jpgPtr;
-{
-    ReaderHandler *handlerPtr = (ReaderHandler *)jpgPtr->err;
-    char buffer[JMSG_LENGTH_MAX];
-
-    /* Create the message and append it into the dynamic string. */
-    (*handlerPtr->pub.format_message) (jpgPtr, buffer);
-    Tcl_DStringAppend(&handlerPtr->dString, " ", -1);
-    Tcl_DStringAppend(&handlerPtr->dString, buffer, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_JPEGToPicture --
- *
- *      Reads a JPEG file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    struct jpeg_decompress_struct jpg;
-    Blt_Picture pict;
-    unsigned int pictWidth, pictHeight;
-    Blt_Pixel *dp;
-    ReaderHandler handler;
-    FILE *f;
-    JSAMPLE **readBuffer;
-    int row_stride;
-    int i;
-    JSAMPLE *bufPtr;
-
-    f = Blt_OpenFile(interp, fileName, "rb");
-    if (f == NULL) {
-	return NULL;
-    }
-    pict = NULL;
-
-    /* Step 1: allocate and initialize JPEG decompression object */
-
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    jpg.dct_method = JDCT_IFAST;
-    jpg.err = jpeg_std_error(&handler.pub);
-    handler.pub.error_exit = ErrorProc;
-    handler.pub.output_message = MessageProc;
-
-    Tcl_DStringInit(&handler.dString);
-    Tcl_DStringAppend(&handler.dString, "error reading \"", -1);
-    Tcl_DStringAppend(&handler.dString, fileName, -1);
-    Tcl_DStringAppend(&handler.dString, "\": ", -1);
-
-    if (setjmp(handler.jmpBuf)) {
-	jpeg_destroy_decompress(&jpg);
-	fclose(f);
-	Tcl_DStringResult(interp, &handler.dString);
-	return NULL;
-    }
-    jpeg_create_decompress(&jpg);
-    jpeg_stdio_src(&jpg, f);
-
-    jpeg_read_header(&jpg, TRUE);	/* Step 3: read file parameters */
-
-    jpeg_start_decompress(&jpg);	/* Step 5: Start decompressor */
-    pictWidth = jpg.output_width;
-    pictHeight = jpg.output_height;
-    if ((pictWidth < 1) || (pictHeight < 1)) {
-	Tcl_AppendResult(interp, "bad JPEG image size", (char *)NULL);
-	fclose(f);
-	return NULL;
-    }
-    /* JSAMPLEs per row in output buffer */
-    row_stride = pictWidth * jpg.output_components;
-
-    /* Make a one-row-high sample array that will go away when done
-     * with image */
-    readBuffer = (*jpg.mem->alloc_sarray) ((j_common_ptr)&jpg, JPOOL_IMAGE, 
-	row_stride, 1);
-    pict = Blt_CreatePicture(pictWidth, pictHeight);
-    dp = Blt_PictureBits(pict);
-
-    if (jpg.output_components == 1) {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = dp->Green = dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    } else {
-	while (jpg.output_scanline < pictHeight) {
-	    jpeg_read_scanlines(&jpg, readBuffer, 1);
-	    bufPtr = readBuffer[0];
-	    for (i = 0; i < (int)pictWidth; i++) {
-		dp->Red = *bufPtr++;
-		dp->Green = *bufPtr++;
-		dp->Blue = *bufPtr++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	}
-    }
-    jpeg_finish_decompress(&jpg);	/* We can ignore the return value
-					 * since suspension is not
-					 * possible with the stdio data
-					 * source.  */
-    jpeg_destroy_decompress(&jpg);
-
-
-    /*  
-     * After finish_decompress, we can close the input file.  Here we
-     * postpone it until after no more JPEG errors are possible, so as
-     * to simplify the setjmp error logic above.  (Actually, I don't
-     * think that jpeg_destroy can do an error exit, but why assume
-     * anything...)  
-     */
-    fclose(f);
-
-    /* 
-     * At this point you may want to check to see whether any corrupt-data
-     * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
-     */
-    if (handler.pub.num_warnings > 0) {
-	Tcl_SetErrorCode(interp, "IMAGE", "JPEG", 
-		 Tcl_DStringValue(&handler.dString), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    /*
-     * We're ready to call the Tk_Photo routines. They'll take the RGB
-     * array we've processed to build the Tk image of the JPEG.
-     */
-    Tcl_DStringFree(&handler.dString);
-    return pict;
-}
-
-#endif /* HAVE_JPEGLIB_H */
-#endif /* HAVE_IJL_H */
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPicture --
- *
- *	Paints the picture to the given drawable. The region of
- *	the picture is specified and the coordinates where in the 
- *	destination drawable is the image to be displayed.
- *
- *	The image may be dithered depending upon the bit set in
- *	the flags parameter: 0 no dithering, 1 for dithering.
- * 
- * Results:
- *	Returns TRUE if the picture was successfully display,
- *	Otherwise FALSE is returned if the particular combination
- *	visual and image depth is not handled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    Picture *srcPtr,
-    int srcX, int srcY,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    CGrafPtr saveWorld;
-    GDHandle saveDevice;
-    GWorldPtr destPort;
-    Picture *ditherPtr;
-
-    ditherPtr = NULL;
-    if (flags & BLT_PAINTER_DITHER) {
-	ditherPtr = Blt_DitherPicture(srcPtr, painterPtr->palette);
-	if (ditherPtr != NULL) {
-	    srcPtr = ditherPtr;
-	}
-    }
-
-    destPort = TkMacOSXGetDrawablePort(drawable);
-    {
-	Rect srcRect, destRect;
-        MacDrawable dstDraw = (MacDrawable)drawable;
-        PixMap pm;
-
-	SetRect(&srcRect, srcX, srcY, srcX + width, srcY + height);
-        SetRect(&destRect, 
-	    destX + dstDraw->xOffset, 
-	    destY + dstDraw->yOffset, 
-            destX + width + dstDraw->xOffset, 
-	    destY + height + dstDraw->yOffset);
-
-	GetGWorld(&saveWorld, &saveDevice);
-	SetGWorld(destPort, NULL);
-
-	TkMacOSXSetUpClippingRgn(drawable);
-
-	pm.bounds.left = pm.bounds.top = 0;
-	pm.bounds.right = (short)width;
-	pm.bounds.bottom = (short)height;
-
-	pm.pixelType = RGBDirect;
-	pm.pmVersion = baseAddr32; /* 32bit clean */
-
-	pm.packType = pm.packSize = 0;
-	pm.hRes = pm.vRes = 0x00480000; /* 72 dpi */
-
-	pm.pixelSize = sizeof(Blt_Pixel) * 8; /* Bits per pixel. */
-	pm.cmpCount = 3;	/* 3 components for direct. */
-	pm.cmpSize = 8;		/* 8 bits per component. */
-
-	pm.pixelFormat = k32ARGBPixelFormat;
-	pm.pmTable = NULL;
-	pm.pmExt = 0;
-
-	pm.baseAddr = (Ptr)srcPtr->bits;
-	pm.rowBytes = srcPtr->pixelsPerRow * sizeof(Blt_Pixel);
-
-	pm.rowBytes |= 0x8000;	   /* Indicates structure a PixMap,
-				    * not a BitMap.  */
-	CopyBits((BitMap *)&pm, 
-		GetPortBitMapForCopyBits(destPort), 
-		&srcRect, &destRect, srcCopy, NULL);
-    }
-    if (ditherPtr != NULL) {
-        Blt_FreePicture(ditherPtr);
-    }
-    SetGWorld(saveWorld, saveDevice);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPictureWithBlend --
- *
- *	Blends and paints the picture with the given drawable. The
- *	region of the picture is specified and the coordinates where
- *	in the destination drawable is the image to be displayed.
- *
- *	The background is snapped from the drawable and converted into
- *	a picture.  This picture is then blended with the current
- *	picture (the background always assumed to be 100% opaque).
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display,
- *	Otherwise FALSE is returned.  This may happen if the
- *	background can not be obtained from the drawable.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPictureWithBlend(
-    Painter *painterPtr,
-    Drawable drawable,
-    Blt_Picture fg,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags, 
-    int alpha)
-{
-    Blt_Picture bg;
-
-    if (destX < 0) {
-	width += destX;
-	destX = 0;
-    } 
-    if (destY < 0) {
-	height += destY;
-	destY = 0;
-    }
-    if ((width < 0) || (height < 0)) {
-	return FALSE;
-    }
-    bg = DrawableToPicture(painterPtr, drawable, destX, destY, width, height);
-    if (bg == NULL) {
-	return FALSE;
-    }
-#ifdef notdef
-    Blt_FadePicture(bg, fg, x, y, width, height, 0, 0, alpha);
-#else
-    Blt_BlendPictures(bg, fg, x, y, bg->width, bg->height, 0, 0);
-#endif
-    PaintPicture(painterPtr, drawable, bg, 0, 0, bg->width, bg->height, destX, 
-	destY, flags);
-    Blt_FreePicture(bg);
-    return TRUE;
-}
-
-
-int
-Blt_PaintPicture(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags)
-{
-    if ((picture == NULL) || (x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture))) {
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */
-	return TRUE;	
-    }
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    if ((width <= 0) || (height <= 0)) {
-	return TRUE;
-    }
-    if (Blt_PictureIsOpaque(picture)) {
-	return PaintPicture(painter, drawable, picture, x, y, width, height, 
-		destX, destY, flags);
-    } else {
-	int alpha = 128;
-
-	return PaintPictureWithBlend(painter, drawable, picture, x, y, 
-		width, height, destX, destY, flags, alpha);
-    }
-}
-
-
-int
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the
-				 * picture. */
-    int width, int height,	/* Dimension of the region.  Area
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int destX, int destY,	/* Coordinates of region in the
-				 * drawable.  */
-    unsigned int flags,		/* Indicates whether to dither the
-				 * picture before displaying. */
-    double falpha)
-{
-    int alpha;
-
-    alpha = (int)(falpha * 255.0 + 0.5);
-
-    assert((x >= 0) && (y >= 0));
-    /* assert((destX >= 0) && (destY >= 0)); */
-    assert((width >= 0) && (height >= 0));
-
-    if ((x >= Blt_PictureWidth(picture)) || (y >= Blt_PictureHeight(picture))){
-	/* Nothing to draw. The region offset starts beyond the end of
-	 * the picture. */	
-	return TRUE;
-    }
-    /* 
-     * Check that the region defined does not extend beyond the end of
-     * the picture.
-     *
-     * Clip the end of the region if it is too big.
-     */
-    if ((width + x) > Blt_PictureWidth(picture)) {
-	width = Blt_PictureWidth(picture) - x;
-    }
-    if ((height + y) > Blt_PictureHeight(picture)) {
-	height = Blt_PictureHeight(picture) - y;
-    }
-    return PaintPictureWithBlend(painter, drawable, picture, x, y, width,
-	height, destX, destY, flags, alpha);
-}
-
-
-GC 
-Blt_PainterGC(Painter *painterPtr)
-{
-    return painterPtr->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *painterPtr)
-{
-    return painterPtr->depth;
-}
diff --git a/blt3.0/src/bltMacWindow.c b/blt3.0/src/bltMacWindow.c
deleted file mode 100644
index 502a0c3..0000000
--- a/blt3.0/src/bltMacWindow.c
+++ /dev/null
@@ -1,487 +0,0 @@
-
-/*
- * bltMacOSXWindow.c --
- *
- * This module implements additional window functionality for the BLT
- * toolkit, such as transparent Tk windows, and reparenting Tk
- * windows.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include "bltInt.h"
-
-#include <X11/Xlib.h>
-#include "tkDisplay.h"
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoConfigureNotify --
- *
- *	Generate a ConfigureNotify event describing the current
- *	configuration of a window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	An event is generated and processed by Tk_HandleEvent.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DoConfigureNotify(winPtr)
-    Tk_FakeWin *winPtr;		/* Window whose configuration was just
-				 * changed. */
-{
-    XEvent event;
-
-    event.type = ConfigureNotify;
-    event.xconfigure.serial = LastKnownRequestProcessed(winPtr->display);
-    event.xconfigure.send_event = False;
-    event.xconfigure.display = winPtr->display;
-    event.xconfigure.event = winPtr->window;
-    event.xconfigure.window = winPtr->window;
-    event.xconfigure.x = winPtr->changes.x;
-    event.xconfigure.y = winPtr->changes.y;
-    event.xconfigure.width = winPtr->changes.width;
-    event.xconfigure.height = winPtr->changes.height;
-    event.xconfigure.border_width = winPtr->changes.border_width;
-    if (winPtr->changes.stack_mode == Above) {
-	event.xconfigure.above = winPtr->changes.sibling;
-    } else {
-	event.xconfigure.above = None;
-    }
-    event.xconfigure.override_redirect = winPtr->atts.override_redirect;
-    Tk_HandleEvent(&event);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MakeTransparentWindowExist --
- *
- *	Similar to Tk_MakeWindowExist but instead creates a
- *	transparent window to block for user events from sibling
- *	windows.
- *
- *	Differences from Tk_MakeWindowExist.
- *
- *	1. This is always a "busy" window. There's never a
- *	   platform-specific class procedure to execute instead.
- *	2. The window is transparent and never will contain children,
- *	   so colormap information is irrelevant.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the procedure returns, the internal window associated
- *	with tkwin is guaranteed to exist.  This may require the
- *	window's ancestors to be created too.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MakeTransparentWindowExist(Tk_Window tkwin, Window parent, int isBusy)
-{
-    TkWindow *winPtr = (TkWindow *)tkwin;
-    TkWindow *winPtr2;
-    Tcl_HashEntry *hPtr;
-    int notUsed;
-    TkDisplay *dispPtr;
-    long int mask;
-
-    if (winPtr->window != None) {
-	return;			/* Window already exists. */
-    }
-
-    /* Create a transparent window and put it on top.  */
-
-    mask = (!isBusy) ? 0 : (CWDontPropagate | CWEventMask);
-    /* Ignore the important events while the window is mapped.  */
-#define USER_EVENTS  (EnterWindowMask | LeaveWindowMask | KeyPressMask | \
-	KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \
-	PointerMotionMask)
-#define PROP_EVENTS  (KeyPressMask | KeyReleaseMask | ButtonPressMask | \
-	ButtonReleaseMask | PointerMotionMask)
-
-    winPtr->atts.do_not_propagate_mask = PROP_EVENTS;
-    winPtr->atts.event_mask = USER_EVENTS;
-    winPtr->changes.border_width = 0;
-    winPtr->depth = 0; 
-
-#ifdef notdef
-    winPtr->window = XCreateWindow(winPtr->display, parent,
-	winPtr->changes.x, winPtr->changes.y,
-	(unsigned)winPtr->changes.width,	/* width */
-	(unsigned)winPtr->changes.height,	/* height */
-	(unsigned)winPtr->changes.border_width,	/* border_width */
-	winPtr->depth,		/* depth */
-	InputOnly,		/* class */
-	winPtr->visual,		/* visual */
-        mask,			/* valuemask */
-	&winPtr->atts		/* attributes */ );
-#endif
-    dispPtr = winPtr->dispPtr;
-    hPtr = Tcl_CreateHashEntry(&dispPtr->winTable, (char *)winPtr->window,
-	&notUsed);
-    Tcl_SetHashValue(hPtr, winPtr);
-    winPtr->dirtyAtts = 0;
-    winPtr->dirtyChanges = 0;
-#ifdef TK_USE_INPUT_METHODS
-    winPtr->inputContext = NULL;
-#endif /* TK_USE_INPUT_METHODS */
-    if (!(winPtr->flags & TK_TOP_LEVEL)) {
-	/*
-	 * If any siblings higher up in the stacking order have already
-	 * been created then move this window to its rightful position
-	 * in the stacking order.
-	 *
-	 * NOTE: this code ignores any changes anyone might have made
-	 * to the sibling and stack_mode field of the window's attributes,
-	 * so it really isn't safe for these to be manipulated except
-	 * by calling Tk_RestackWindow.
-	 */
-	for (winPtr2 = winPtr->nextPtr; winPtr2 != NULL;
-	    winPtr2 = winPtr2->nextPtr) {
-	    if ((winPtr2->window != None) && !(winPtr2->flags & TK_TOP_LEVEL)) {
-		XWindowChanges changes;
-		changes.sibling = winPtr2->window;
-		changes.stack_mode = Below;
-		XConfigureWindow(winPtr->display, winPtr->window,
-		    CWSibling | CWStackMode, &changes);
-		break;
-	    }
-	}
-    }
-
-    /*
-     * Issue a ConfigureNotify event if there were deferred configuration
-     * changes (but skip it if the window is being deleted;  the
-     * ConfigureNotify event could cause problems if we're being called
-     * from Tk_DestroyWindow under some conditions).
-     */
-    if ((winPtr->flags & TK_NEED_CONFIG_NOTIFY)
-	&& !(winPtr->flags & TK_ALREADY_DEAD)) {
-	winPtr->flags &= ~TK_NEED_CONFIG_NOTIFY;
-	DoConfigureNotify((Tk_FakeWin *) tkwin);
-    }
-}
-
-Window
-Blt_GetParentWindow(Display *display, Window window)
-{
-    Window root, parent;
-    Window *dummy;
-    unsigned int count;
-
-    if (XQueryTree(display, window, &root, &parent, &dummy, &count) > 0) {
-	XFree(dummy);
-	return parent;
-    }
-    return None;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetWindowId --
- *
- *      Returns the XID for the Tk_Window given.  Starting in Tk 8.0,
- *      the toplevel widgets are wrapped by another window.  Currently
- *      there's no way to get at that window, other than what is done
- *      here: query the X window hierarchy and retrieve the parent.
- *
- * Results:
- *      Returns the X Window ID of the widget.  If it's a toplevel, then
- *	the XID of the wrapper is returned.
- *
- *---------------------------------------------------------------------------
- */
-Window
-Blt_GetWindowId(Tk_Window tkwin)
-{
-    Window window;
-
-    Tk_MakeWindowExist(tkwin);
-    window = Tk_WindowId(tkwin);
-    if (Tk_IsTopLevel(tkwin)) {
-	Window parent;
-
-	parent = Blt_GetParentWindow(Tk_Display(tkwin), window);
-	if (parent != None) {
-	    window = parent;
-	}
-	window = parent;
-    }
-    return window;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XGeometryErrorProc --
- *
- *	Flags errors generated from XGetGeometry calls to the X server.
- *
- * Results:
- *	Always returns 0.
- *
- * Side Effects:
- *	Sets a flag, indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-XGeometryErrorProc(clientData, errEventPtr)
-    ClientData clientData;
-    XErrorEvent *errEventPtr;
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = FALSE;
-    return 0;
-}
-
-int
-Blt_GetWindowRegion(
-    Display *display,
-    Window window,
-    int *xPtr, int *yPtr, 
-    int *widthPtr, int *heightPtr)
-{
-    Tk_ErrorHandler handler;
-    Window root;
-    int any = -1;
-    int result;
-    int x, y;
-    unsigned int width, height, borderWidth, depth;
-
-#ifdef notdef
-    handler = Tk_CreateErrorHandler(display, any, X_GetGeometry, any, 
-	XGeometryErrorProc, &result);
-#endif
-    result = XGetGeometry(display, window, &root, &x, &y, &width, &height, 
-	&borderWidth, &depth);
-    Tk_DeleteErrorHandler(handler);
-    XSync(display, False);
-    if (!result) {
-	return TCL_ERROR;
-    }
-    if (xPtr != NULL) {
-	*xPtr = x;
-    }
-    if (yPtr != NULL) {
-	*yPtr = y;
-    }
-    if (widthPtr != NULL) {
-	*widthPtr = (int)width;
-    }
-    if (heightPtr != NULL) {
-	*heightPtr = (int)height;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RaiseToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RaiseToplevelWindow(Tk_Window tkwin)
-{
-    XRaiseWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LowerToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_LowerToplevelWindow(Tk_Window tkwin)
-{
-    XLowerWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResizeToplevelWindow(Tk_Window tkwin, int width, int height)
-{
-    XResizeWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), width, height);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MoveResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MoveResizeToplevelWindow(Tk_Window tkwin, int x, int y, int w, int h)
-{
-    XMoveResizeWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), x, y, w, h);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MoveToplevelWindow(Tk_Window tkwin, int x, int y)
-{
-    XMoveWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), x, y);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MapToplevelWindow(Tk_Window tkwin)
-{
-    XMapWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UnmapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UnmapToplevelWindow(Tk_Window tkwin)
-{
-    XUnmapWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/* ARGSUSED */
-static int
-XReparentWindowErrorProc(clientData, errEventPtr)
-    ClientData clientData;
-    XErrorEvent *errEventPtr;
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-int
-Blt_ReparentWindow(
-    Display *display,
-    Window window, 
-    Window newParent,
-    int x, int y)
-{
-    Tk_ErrorHandler handler;
-    int result;
-    int any = -1;
-
-    result = TCL_OK;
-#ifdef notdef
-    handler = Tk_CreateErrorHandler(display, any, X_ReparentWindow, any,
-	XReparentWindowErrorProc, &result);
-#endif
-    XReparentWindow(display, window, newParent, x, y);
-    Tk_DeleteErrorHandler(handler);
-    XSync(display, False);
-    return result;
-}
-
-int
-Blt_GetWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Window *windowPtr)
-{
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '.') {
-	Tk_Window tkwin;
-
-	tkwin = Tk_NameToWindow(Tcl_GetString(objPtr), interp, 
-		Tk_MainWindow(interp));
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Tk_WindowId(tkwin) == None) {
-	    Tk_MakeWindowExist(tkwin);
-	}
-	*windowPtr = (Tk_IsTopLevel(tkwin)) ? Blt_GetWindowId(tkwin) : 
-	    Tk_WindowId(tkwin);
-    } else {
-	int id;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &id) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	*windowPtr = (Window)id;
-    }
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltMath.h b/blt3.0/src/bltMath.h
deleted file mode 100644
index 07c9afa..0000000
--- a/blt3.0/src/bltMath.h
+++ /dev/null
@@ -1,201 +0,0 @@
-
-/*
- * bltMath.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_MATH_H
-#define _BLT_MATH_H
-
-#include <math.h>
-
-#ifdef HAVE_FLOAT_H
-#include <float.h>
-#endif /* HAVE_FLOAT_H */
-
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif /* HAVE_IEEEFP_H */
-
-#ifndef M_PI
-#define M_PI    	3.14159265358979323846
-#endif /* M_PI */
-
-#ifndef M_PI_2
-#define M_PI_2		1.57079632679489661923
-#endif /* M_PI_2 */
-
-#ifndef M_SQRT2
-#define M_SQRT2		1.41421356237309504880
-#endif /* M_SQRT2 */
-
-#ifndef M_SQRT1_2
-#define M_SQRT1_2	0.70710678118654752440
-#endif /* M_SQRT1_2 */
-
-#ifndef SHRT_MAX
-#define SHRT_MAX	0x7FFF
-#endif /* SHRT_MAX */
-
-#ifndef SHRT_MIN
-#define SHRT_MIN	-(SHRT_MAX)
-#endif /* SHRT_MAX */
-
-#ifndef USHRT_MAX
-#define	USHRT_MAX	0xFFFF
-#endif /* USHRT_MAX */
-
-#ifndef INT_MAX
-#define INT_MAX		2147483647
-#endif /* INT_MAX */
-
-#ifndef HAVE_FLOAT_H
-/*
- *---------------------------------------------------------------------------
- *
- * DBL_MIN, DBL_MAX --
- *
- * 	DBL_MAX and DBL_MIN are the largest and smaller double
- * 	precision numbers that can be represented by the floating
- * 	point hardware. If the compiler is ANSI, they can be found in
- * 	float.h.  Otherwise, we use HUGE_VAL or HUGE to determine
- * 	them.
- *
- *---------------------------------------------------------------------------
- */
-/*
- * Don't want to include __infinity (definition of HUGE_VAL (SC1.x))
- */
-#ifdef sun
-#define DBL_MAX		1.7976931348623157E+308
-#define DBL_MIN		2.2250738585072014E-308
-#define DBL_EPSILON	2.2204460492503131e-16
-#else
-#ifndef DBL_EPSILON
-#define DBL_EPSILON	BLT_DBL_EPSILON
-#endif
-#ifdef HUGE_VAL
-#define DBL_MAX		HUGE_VAL
-#define DBL_MIN		(1/HUGE_VAL)
-#else
-#ifdef HUGE
-#define DBL_MAX		HUGE
-#define DBL_MIN		(1/HUGE)
-#else
-/*
- * Punt: Assume relatively small values
- */
-#define DBL_MAX		3.40282347E+38
-#define DBL_MIN		1.17549435E-38
-#endif /*HUGE*/
-#endif /*HUGE_VAL*/
-#endif /*sun*/
-#endif /*!HAVE_FLOAT_H*/
-
-/*
- *---------------------------------------------------------------------------
- *
- *  	The following are macros replacing math library functions:
- *  	"fabs", "fmod", "abs", "rint", and "exp10".
- *
- *  	Although many of these routines may exist in your math
- *  	library, they aren't used in libtcl.a or libtk.a.  This makes
- *  	it difficult to dynamically load the BLT library as a shared
- *  	object unless the math library is also shared (which isn't
- *  	true on several systems).  We can avoid the problem by
- *  	replacing the "exotic" math routines with macros.
- *
- *---------------------------------------------------------------------------
- */
-#undef ABS
-#define ABS(x)		(((x)<0)?(-(x)):(x))
-
-#undef EXP10
-#define EXP10(x)	(pow(10.0,(x)))
-
-#undef FABS
-#define FABS(x) 	(((x)<0.0)?(-(x)):(x))
-
-#undef SIGN
-#define SIGN(x)		(((x) < 0.0) ? -1 : 1)
-
-/*
- * Be careful when using the next two macros.  They both assume the floating
- * point number is less than the size of an int.  That means, for example, you
- * can't use these macros with numbers bigger than than 2^31-1.
- */
-#undef FMOD
-#define FMOD(x,y) 	((x)-(((int)((x)/(y)))*y))
-
-#undef ROUND
-#define ROUND(x) 	((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))
-
-#ifdef HAVE_FINITE
-#define FINITE(x)	finite(x)
-#else
-#ifdef HAVE_ISFINITE
-#define FINITE(x)	isfinite(x)
-#else
-#ifdef HAVE_ISNAN
-#define FINITE(x)	(!isnan(x))
-#else
-#define FINITE(x)	(TRUE)
-#endif /* HAVE_ISNAN */
-#endif /* HAVE_ISFINITE */
-#endif /* HAVE_FINITE */
-
-#define DEFINED(x)	(!isnan(x))
-#define UNDEFINED(x)	(isnan(x))
-
-#if !HAVE_DECL_DRAND48
-BLT_EXTERN double drand48(void);
-#endif /* !HAVE_DECL_DRAND48 */
-
-#if !HAVE_DECL_SRAND48
-BLT_EXTERN void srand48(long seed);
-#endif /* !HAVE_DECL_SRAND48 */
-
-#if !HAVE_DECL_J1
-BLT_EXTERN double j1(double x);
-#endif /* !HAVE_DECL_J1 */
-
-#if !HAVE_DECL_HYPOT
-BLT_EXTERN double hypot(double x, double y);
-#endif /* !HAVE_DECL_HYPOT */
-
-#ifdef HAVE_ISNAN
-#if !HAVE_DECL_ISNAN
-BLT_EXTERN int isnan(double x);
-#endif /* !HAVE_DECL_ISNAN */
-#endif /* HAVE_ISNAN */
-
-#ifdef HAVE_FINITE
-#if !HAVE_DECL_FINITE
-BLT_EXTERN int finite(double x);
-#endif /* !HAVE_DECL_FINITE */
-#endif /* HAVE_FINITE */
-
-#endif /* BLT_MATH_H */
diff --git a/blt3.0/src/bltMenubar.c b/blt3.0/src/bltMenubar.c
deleted file mode 100644
index cff6f91..0000000
--- a/blt3.0/src/bltMenubar.c
+++ /dev/null
@@ -1,3033 +0,0 @@
-
-/*
- * bltMenubar.c --
- *
- * This module implements a menubar widget for the BLT toolkit.
- *
- *	Copyright 2006 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltImage.h"
-#include "bltHash.h"
-#include "bltBgStyle.h"
-
-#define IPAD		2	/* Internal pad between components. */
-#define YPAD		2	/* External pad between components. */
-#define XPAD		2	/* External pad between border and item. */
-
-#define STATE_NORMAL    (0)	/* Draw widget normally. */
-#define STATE_ACTIVE    (1<<0)	/* Widget is currently active. */
-#define STATE_DISABLED  (1<<1)	/* Widget is disabled. */
-#define STATE_POSTED    (1<<2)	/* Widget is currently posting its menu. */
-#define STATE_MASK	(STATE_ACTIVE|STATE_DISABLED|STATE_POSTED)
-
-#define REDRAW_PENDING  (1<<3)	/* Widget is scheduled to be redrawn. */
-#define LAYOUT_PENDING  (1<<4)	/* Widget layout needs to be recomputed. */
-#define FOCUS           (1<<5)	/* Widget has focus. */
-#define VERTICAL	(1<<6)
-
-#define ITEM_BUTTON	(1<<7)
-#define ITEM_SEPARATOR  (1<<8)
-#define ITEM_FILLER	(1<<9)
-#define ITEM_MASK	(ITEM_BUTTON|ITEM_SEPARATOR|ITEM_FILLER)
-
-#define DEF_ACTIVE_BG		STD_ACTIVE_BACKGROUND
-#define DEF_ACTIVE_FG		STD_ACTIVE_FOREGROUND
-#define DEF_BORDERWIDTH		"2"
-#define DEF_CMD			((char *)NULL)
-#define DEF_CURSOR		((char *)NULL)
-#define DEF_DIRECTION		((char *)NULL)
-#define DEF_DISABLED_BG		STD_DISABLED_BACKGROUND
-#define DEF_DISABLED_FG		STD_DISABLED_FOREGROUND
-#define DEF_ENTRY_BG		RGB_GREY90
-#define DEF_FONT		STD_FONT
-#define DEF_HEIGHT		"0"
-#define DEF_HIGHLIGHT_BG_COLOR  ""
-#define DEF_HIGHLIGHT_COLOR     "black"
-#define DEF_HIGHLIGHT_WIDTH	"2"
-#define DEF_ICON		((char *)NULL)
-#define DEF_IMAGE		((char *)NULL)
-#define DEF_JUSTIFY		"left"
-#define DEF_MENU		((char *)NULL)
-#define DEF_MENU_ANCHOR		"sw"
-#define DEF_NORMAL_BG		STD_NORMAL_BACKGROUND
-#define DEF_NORMAL_FG		STD_NORMAL_FOREGROUND
-#define DEF_ORIENT		"horizonatal"
-#define DEF_POSTED_BG		RGB_SKYBLUE4
-#define DEF_POSTED_FG		RGB_WHITE
-#define DEF_NORMAL_RELIEF	"raised"
-#define DEF_POSTED_RELIEF	"flat"
-#define DEF_ACTIVE_RELIEF	"raised"
-#define DEF_STATE		"normal"
-#define DEF_TAKE_FOCUS		"1"
-#define DEF_TEXT		((char *)NULL)
-#define DEF_TYPE		"button"
-#define DEF_UNDERLINE		"-1"
-#define DEF_WIDTH		"0"
-
-#define SCREEN_HEIGHT(w)	HeightOfScreen(Tk_Screen(w))
-#define SCREEN_WIDTH(w)		WidthOfScreen(Tk_Screen(w))
-
-static Blt_OptionFreeProc FreeTextProc;
-static Blt_OptionParseProc ObjToTextProc;
-static Blt_OptionPrintProc TextToObjProc;
-static Blt_CustomOption textOption = {
-    ObjToTextProc, TextToObjProc, FreeTextProc, (ClientData)0
-};
-
-static Blt_OptionFreeProc FreeIconProc;
-static Blt_OptionParseProc ObjToIconProc;
-static Blt_OptionPrintProc IconToObjProc;
-static Blt_CustomOption iconOption = {
-    ObjToIconProc, IconToObjProc, FreeIconProc, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToStateProc;
-static Blt_OptionPrintProc StateToObjProc;
-static Blt_CustomOption stateOption = {
-    ObjToStateProc, StateToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToOrientProc;
-static Blt_OptionPrintProc OrientToObjProc;
-static Blt_CustomOption orientOption = {
-    ObjToOrientProc, OrientToObjProc, NULL, (ClientData)0
-};
-
-static const char *emptyString = "";
-
-/*
- * Icon --
- *
- *	Since instances of the same Tk image can be displayed in different
- *	windows with possibly different color palettes, Tk internally stores
- *	each instance in a linked list.  But if the instances are used in the
- *	same widget and therefore use the same color palette, this adds a lot
- *	of overhead, especially when deleting instances from the linked list.
- *
- *	For the menubar widget, we never need more than a single instance
- *	of an image, regardless of how many times it's used.  Cache the image,
- *	maintaining a reference count for each image used in the widget.  It's
- *	likely that the menubar widget will use many instances of the same
- *	image.
- */
-
-typedef struct Icon {
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    short int width, height;		/* Dimensions of the cached image. */
-} *Icon;
-
-#define IconHeight(i)	((i)->height)
-#define IconWidth(i)	((i)->width)
-#define IconImage(i)	((i)->tkImage)
-#define IconName(i)	(Blt_Image_Name((i)->tkImage))
-
-typedef struct _Menubar Menubar;
-
-typedef struct  {
-    Menubar *mbPtr;
-    Blt_ChainLink link;
-    Blt_HashEntry *hashPtr;
-    unsigned int flags;
-    /* 
-     * The item contains optionally an icon and a text string. 
-     */
-    Icon icon;				/* If non-NULL, image to be displayed
-					 * in item. */
-    Icon image;				/* If non-NULL, image to be displayed
-					 * instead of text in the item. */
-    const char *text;			/* Text string to be displayed in the
-					 * item if an image has no been
-					 * designated. */
-    Tk_Justify justify;			/* Justification to use for text
-					 * within the item. */
-    short int textLen;			/* # bytes of text. */
-    short int underline;		/* Character index of character to be
-					 * underlined. If -1, no character is
-					 * underlined. */
-    Tcl_Obj *takeFocusObjPtr;		/* Value of -takefocus option; not
-					 * used in the C code, but used by
-					 * keyboard traversal scripts. */
-    short int iconWidth, iconHeight;
-    short int entryWidth, entryHeight;
-    short int textWidth, textHeight;
-    
-    int reqWidth, reqHeight;
-
-    Tcl_Obj *cmdObjPtr;		/* If non-NULL, command to be executed when
-				 * this menu is posted. */
-    Tcl_Obj *menuObjPtr;	
-
-    Tcl_Obj *postCmdObjPtr;	/* If non-NULL, command to be executed when
-				 * this menu is posted. */
-    int menuAnchor;
-    short int inset;
-    short int index;
-    short int x, y, width, height;
-    Blt_Pad xPad, yPad;
-} Item;
-
-
-struct _Menubar  {
-    Tcl_Interp *interp;		/* Interpreter associated with menubar. */
-    Tk_Window tkwin;		/* Window that embodies the menubar. If
-				 * NULL, indicates the window has been
-				 * destroyed but the data structures haven't
-				 * yet been cleaned up.*/
-    Tk_Window parent;		/* Original parent of the menubar. */
-    XRectangle region;
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-
-    Tcl_Command cmdToken;	/* Token for widget command. */
-    Tk_Window floatWin;		/* Toplevel window used to hold the menubar
-				 * when it's floating. */
-    Item *activePtr;	/* Currently active item. */
-    Item *postedPtr;	/* Currently posted item. */
-    Item *focusPtr;	/* Item with focus. */
-
-    int reqWidth, reqHeight;
-     
-    int relief, postedRelief, activeRelief;
-    int borderWidth;
-    Blt_Background normalBg;
-    Blt_Background activeBg;
-    Blt_Background postedBg;
-    Blt_Background disabledBg;
-
-    Tcl_Obj *takeFocusObjPtr;	/* Value of -takefocus option; not used in the
-				 * C code, but used by keyboard traversal
-				 * scripts. */
-
-    /*
-     * In/Out Focus Highlight Ring:
-     */
-    XColor *highlightColor;
-    GC highlightGC;
-    XColor *highlightBgColor;
-    GC highlightBgGC;
-    int highlightWidth;
-
-    /* 
-     * The item contains optionally an icon and a text string. 
-     */
-    Icon icon;			/* If non-NULL, image to be displayed in
-				 * item. */
-
-    Icon image;			/* If non-NULL, image to be displayed instead
-				 * of text in the item. */
-
-    const char *text;		/* Text string to be displayed in the item
-				 * if an image has no been designated. */
-
-    Blt_Font font;		/* Font of text to be display in item. */
-
-    Tk_Justify justify;		/* Justification to use for text within the
-				 * item. */
-
-    int textLen;		/* # bytes of text. */
-
-    int underline;		/* Character index of character to be
-				 * underlined. If -1, no character is
-				 * underlined. */
-
-    XColor *textNormalColor;
-    XColor *textActiveColor;
-    XColor *textPostedColor;
-    XColor *textDisabledColor;
-
-    GC textActiveGC;
-    GC textNormalGC;
-    GC textPostedGC;
-    GC textDisabledGC;
-
-    Tk_Cursor cursor;		/* Current cursor for window or None. */
-
-    int inset;
-    short int width, height;
-
-    unsigned int flags;
-
-    Blt_Chain chain;		/* List of menu items. */
-    unsigned int nextId;
-    Blt_HashTable itemTable;
-
-};
-
-
-static Blt_ConfigSpec itemSpecs[] =
-{
-    {BLT_CONFIG_OBJ, "-command", "command", "Command", 
-	DEF_CMD, Blt_Offset(Item, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(Item, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", DEF_ICON, 
-	Blt_Offset(Item, icon), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", DEF_IMAGE, 
-	Blt_Offset(Item, image), BLT_CONFIG_NULL_OK, &iconOption},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_JUSTIFY, 
-	Blt_Offset(Item, justify), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-menu", "menu", "Menu", DEF_MENU, 
-	Blt_Offset(Item, menuObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-menuanchor", "menuAnchor", "MenuAnchor", 
-	DEF_MENU_ANCHOR, Blt_Offset(Item, menuAnchor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-postcommand", "postCommand", "PostCommand", 
-	DEF_CMD, Blt_Offset(Item, postCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_STATE, 
-	Blt_Offset(Item, flags), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus", DEF_TAKE_FOCUS, 
-	Blt_Offset(Item, takeFocusObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-text", "text", "Text", DEF_TEXT, 
-	Blt_Offset(Item, text), 0, &textOption},
-    {BLT_CONFIG_INT, "-underline", "underline", "Underline", DEF_UNDERLINE, 
-	Blt_Offset(Item, underline), BLT_CONFIG_DONT_SET_DEFAULT },
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Item, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Blt_ConfigSpec menubarSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_ACTIVE_BG, Blt_Offset(Menubar, activeBg),0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"ActiveForeground", DEF_ACTIVE_FG, 
-	Blt_Offset(Menubar, textActiveColor), 0},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief", 
-	DEF_POSTED_RELIEF, Blt_Offset(Menubar, activeRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_NORMAL_BG, Blt_Offset(Menubar, normalBg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, Blt_Offset(Menubar, borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CURSOR, Blt_Offset(Menubar, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-disabledbackground", "disabledBackground",
-	"DisabledBackground", DEF_DISABLED_BG, 
-	Blt_Offset(Menubar, disabledBg), 0},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_DISABLED_FG, 
-	Blt_Offset(Menubar, textDisabledColor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_FONT, 
-	Blt_Offset(Menubar, font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_NORMAL_FG, Blt_Offset(Menubar, textNormalColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(Menubar, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground", 
-	"HighlightBackground", DEF_HIGHLIGHT_BG_COLOR, 
-	Blt_Offset(Menubar, highlightBgColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_HIGHLIGHT_COLOR, Blt_Offset(Menubar, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_HIGHLIGHT_WIDTH, 
-	Blt_Offset(Menubar, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-orient", "orient", "Orient", DEF_ORIENT, 
-	Blt_Offset(Menubar, flags), BLT_CONFIG_DONT_SET_DEFAULT, &orientOption},
-    {BLT_CONFIG_BACKGROUND, "-postedbackground", "postedBackground",
-        "PostedBackground", DEF_POSTED_BG, Blt_Offset(Menubar, postedBg),0},
-    {BLT_CONFIG_COLOR, "-postedforeground", "postedForeground",
-	"PostedForeground", DEF_POSTED_FG, 
-	Blt_Offset(Menubar, textPostedColor), 0},
-    {BLT_CONFIG_RELIEF, "-postedrelief", "postedRelief", "PostedRelief", 
-	DEF_POSTED_RELIEF, Blt_Offset(Menubar, postedRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_NORMAL_RELIEF, 
-	Blt_Offset(Menubar, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-takefocus", "takeFocus", "TakeFocus", DEF_TAKE_FOCUS, 
-	Blt_Offset(Menubar, takeFocusObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Menubar, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Tk_EventProc FloatEventProc;
-static Tk_GeomRequestProc FloatGeometryProc;
-static Tk_GeomLostSlaveProc FloatCustodyProc;
-static Tk_GeomMgr menubarMgrInfo =
-{
-    (char *)"menubar",		/* Name of geometry manager used by winfo */
-    FloatGeometryProc,		/* Procedure to for new geometry requests */
-    FloatCustodyProc,		/* Procedure when window is taken away */
-};
-
-static Tcl_IdleProc DisplayMenubar;
-static Tcl_FreeProc DestroyMenubar;
-static Tcl_FreeProc FreeFloatProc;
-static Tk_EventProc MenubarEventProc;
-static Tcl_ObjCmdProc MenubarInstCmdProc;
-static Tcl_CmdDeleteProc MenubarInstCmdDeletedProc;
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the menubar display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(Menubar *mbPtr) 
-{
-    if ((mbPtr->tkwin != NULL) && ((mbPtr->flags & REDRAW_PENDING) == 0)) {
-	mbPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayMenubar, mbPtr);
-    }
-}
-
-
-static void
-FreeIcon(Menubar *mbPtr, Icon icon)
-{
-    Tk_FreeImage(IconImage(icon));
-    Blt_Free(icon);
-}
-
-#ifdef notdef
-static char *
-GetInterpResult(Tcl_Interp *interp)
-{
-#define MAX_ERR_MSG	1023
-    static char mesg[MAX_ERR_MSG+1];
-
-    strncpy(mesg, Tcl_GetStringResult(interp), MAX_ERR_MSG);
-    mesg[MAX_ERR_MSG] = '\0';
-    return mesg;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x, int y, int w, int h,      /* Not used. */
-    int imageWidth, int imageHeight) /* Not used. */
-{
-    Menubar *mbPtr = clientData;
-
-    mbPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(mbPtr);
-}
-
-static int
-GetIconFromObj(Tcl_Interp *interp, Menubar *mbPtr, Tcl_Obj *objPtr, 
-	       Icon *iconPtr)
-{
-    Tk_Image tkImage;
-    const char *iconName;
-
-    iconName = Tcl_GetString(objPtr);
-    if (iconName[0] == '\0') {
-	*iconPtr = NULL;
-	return TCL_OK;
-    }
-    tkImage = Tk_GetImage(interp, mbPtr->tkwin, iconName, IconChangedProc, 
-	mbPtr);
-    if (tkImage != NULL) {
-	struct Icon *ip;
-	int width, height;
-
-	ip = Blt_AssertMalloc(sizeof(struct Icon));
-	Tk_SizeOfImage(tkImage, &width, &height);
-	ip->tkImage = tkImage;
-	ip->width = width;
-	ip->height = height;
-	*iconPtr = ip;
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenubarEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	menubar widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MenubarEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Menubar *mbPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(mbPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(mbPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    mbPtr->flags |= FOCUS;
-	} else {
-	    mbPtr->flags &= ~FOCUS;
-	}
-	EventuallyRedraw(mbPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (mbPtr->tkwin != NULL) {
-	    mbPtr->tkwin = NULL; 
-	}
-	if (mbPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayMenubar, mbPtr);
-	}
-	Tcl_EventuallyFree(mbPtr, DestroyMenubar);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStateProc --
- *
- *	Converts the string representing a state into a bitflag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStateProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing state. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    const char *string;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "disabled") == 0) {
-	flag = STATE_DISABLED;
-    } else if (strcmp(string, "normal") == 0) {
-	flag = STATE_NORMAL;
-    } else if (strcmp(string, "active") == 0) {
-	Menubar *mbPtr;
-
-	mbPtr = itemPtr->mbPtr;
-	if (mbPtr->activePtr != NULL) {
-	    mbPtr->activePtr->flags &= ~STATE_ACTIVE;
-	}
-	flag = STATE_ACTIVE;
-	mbPtr->activePtr = itemPtr;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-	    "\": should be active, disabled, or normal.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (itemPtr->flags & flag) {
-	return TCL_OK;		/* State is already set to value. */
-    }
-    *flagsPtr &= ~STATE_MASK;
-    *flagsPtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StateToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StateToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int state = *(unsigned int *)(widgRec + offset);
-    const char *string;
-
-    switch (state & STATE_MASK) {
-    case STATE_NORMAL:		string = "normal";	break;
-    case STATE_ACTIVE:		string = "active";	break;
-    case STATE_POSTED:		string = "posted";	break;
-    case STATE_DISABLED:	string = "disabled";	break;
-    default:			string = Blt_Itoa(state & STATE_MASK);
-		break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeIconProc(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-
-    if (icon != NULL) {
-	Menubar *mbPtr = (Menubar *)widgRec;
-
-	FreeIcon(mbPtr, icon);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToOrientProc --
- *
- *	Converts the string representing a state into a bitflag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToOrientProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing state. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Menubar *mbPtr = (Menubar *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    const char *string;
-    int length;
-
-    string = Tcl_GetString(objPtr);
-    length = strlen(string);
-    if (strncmp(string, "vertical", length) == 0) {
-	*flagsPtr |= VERTICAL;
-    } else if (strncmp(string, "horizontal", length) == 0) {
-	*flagsPtr &= ~VERTICAL;
-    } else {
-	Tcl_AppendResult(interp, "bad orientation \"", string,
-	    "\": must be vertical or horizontal", (char *)NULL);
-	return TCL_ERROR;
-    }
-    mbPtr->flags |= LAYOUT_PENDING;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OrientToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-OrientToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int mask = *(unsigned int *)(widgRec + offset);
-    const char *string;
-
-    string = (mask & VERTICAL) ? "vertical" : "horizontal";
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIconProc --
- *
- *	Convert a image into a hashed icon.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIconProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Menubar *mbPtr = (Menubar *)widgRec;
-    Icon *iconPtr = (Icon *)(widgRec + offset);
-    Icon icon;
-
-    if (GetIconFromObj(interp, mbPtr, objPtr, &icon) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (*iconPtr != NULL) {
-	FreeIcon(mbPtr, *iconPtr);
-    }
-    *iconPtr = icon;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObjProc --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Icon icon = *(Icon *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (icon == NULL) {
-	objPtr = Tcl_NewStringObj("", 0);
-    } else {
-	objPtr = Tcl_NewStringObj(Blt_Image_Name(IconImage(icon)), -1);
-    }
-    return objPtr;
-}
-
-
-/*ARGSUSED*/
-static void
-FreeTextProc(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    Item *itemPtr = (Item *)(widgRec);
-
-    if (itemPtr->hashPtr != NULL) {
-	Menubar *mbPtr = itemPtr->mbPtr;
-
-	Blt_DeleteHashEntry(&mbPtr->itemTable, itemPtr->hashPtr);
-	itemPtr->hashPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTextProc --
- *
- *	Save the text and add the item to the text hashtable.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTextProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing style. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-    Menubar *mbPtr;
-    int isNew;
-    Blt_HashEntry *hPtr;
-    const char *string;
-
-    mbPtr = itemPtr->mbPtr;
-    string = Tcl_GetString(objPtr);
-    hPtr = Blt_CreateHashEntry(&mbPtr->itemTable, string, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "item \"", string, "\" already exists in ",
-			 Tk_PathName(mbPtr->tkwin), (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (itemPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&mbPtr->itemTable, itemPtr->hashPtr);
-    }
-    itemPtr->hashPtr = hPtr;
-    itemPtr->text = Blt_GetHashKey(&mbPtr->itemTable, hPtr);
-    Blt_SetHashValue(hPtr, itemPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextToObjProc --
- *
- *	Return the text of the item.
- *
- * Results:
- *	The text is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TextToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Item *itemPtr = (Item *)(widgRec);
-
-    return Tcl_NewStringObj(itemPtr->text, -1);
-}
-
-static INLINE Item *
-FirstItem(Menubar *mbPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & (ITEM_BUTTON|STATE_DISABLED)) == ITEM_BUTTON) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-static INLINE Item *
-LastItem(Menubar *mbPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(mbPtr->chain); link != NULL;
-	 link = Blt_Chain_PrevLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & (ITEM_BUTTON|STATE_DISABLED)) == ITEM_BUTTON) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-static Item *
-NextItem(Item *itemPtr)
-{
-    Blt_ChainLink link;
-
-    if (itemPtr == NULL) {
-	return NULL;
-    }
-    for (link = Blt_Chain_NextLink(itemPtr->link); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & (ITEM_BUTTON|STATE_DISABLED)) == ITEM_BUTTON) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-static INLINE Item *
-PrevItem(Item *itemPtr)
-{
-    Blt_ChainLink link;
-
-    if (itemPtr == NULL) {
-	return NULL;
-    }
-    for (link = Blt_Chain_PrevLink(itemPtr->link); link != NULL; 
-	 link = Blt_Chain_PrevLink(link)) {
-	itemPtr = Blt_Chain_GetValue(link);
-	if ((itemPtr->flags & (ITEM_BUTTON|STATE_DISABLED)) == ITEM_BUTTON) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchForItem --
- *
- *	Performs a binary search for the item at the given y-offset in world
- *	coordinates.  The range of items is specified by menu indices (high
- *	and low).  The item must be (visible) in the viewport.
- *
- * Results:
- *	Returns 0 if no item is found, other the index of the item (menu
- *	indices start from 1).
- *
- *---------------------------------------------------------------------------
- */
-static Item *
-SearchForItem(Menubar *mbPtr, int x, int y)
-{
-    Item *itemPtr;
-
-    for (itemPtr = FirstItem(mbPtr); itemPtr != NULL;
-	 itemPtr = NextItem(itemPtr)) {
-
-	if ((x >= itemPtr->x) && (x < (itemPtr->x + itemPtr->width))) {
-	    return itemPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NearestItem --
- *
- *	Find the item closest to the x-y screen coordinate given.  The
- *	item must be (visible) in the viewport.
- *
- * Results:
- *	Returns the closest item.  If selectOne is set, then always returns
- *	an item (unless the menu is empty).  Otherwise, NULL is returned is
- *	the pointer is not over an item.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Item *
-NearestItem(Menubar *mbPtr, int x, int y, int selectOne)
-{
-    Item *itemPtr;
-
-    if ((x < 0) || (x >= Tk_Width(mbPtr->tkwin)) || 
-	(y < 0) || (y >= Tk_Height(mbPtr->tkwin))) {
-	return NULL;		/* Screen coordinates are outside of menu. */
-    }
-    itemPtr = SearchForItem(mbPtr, x, y);
-    if (itemPtr == NULL) {
-	if (!selectOne) {
-	    return NULL;
-	}
-	if (x < mbPtr->borderWidth) {
-	    return FirstItem(mbPtr);
-	}
-	return LastItem(mbPtr);
-    }
-    return itemPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *  H
- *  C
- *  L
- *  P
- *  max of icon/text/image/item
- *  P
- *  L
- *  C
- *  H
- *
- * |H|C|L|P| icon |P| text/image |P|L|B| item |B|C|H|
- * 
- * H = highlight thickness
- * C = menubar borderwidth
- * L = label borderwidth
- * P = pad
- * I = icon
- * T = text or image
- *---------------------------------------------------------------------------
- */
-static void
-ComputeItemGeometry(Item *itemPtr)
-{
-    Menubar *mbPtr = itemPtr->mbPtr;
-
-    /* Determine the height of the item.  It's the maximum height of all
-     * it's components: icon, label, and item. */
-    itemPtr->iconWidth = itemPtr->iconHeight = 0;
-    itemPtr->entryWidth = itemPtr->entryHeight = 0;
-    itemPtr->textWidth = itemPtr->textHeight = 0;
-    itemPtr->inset = mbPtr->highlightWidth;
-
-    if (itemPtr->icon != NULL) {
-	itemPtr->iconWidth  = IconWidth(itemPtr->icon);
-	itemPtr->iconHeight = IconHeight(itemPtr->icon);
-    }
-    itemPtr->entryWidth += itemPtr->iconWidth;
-    if (itemPtr->entryHeight < itemPtr->iconHeight) {
-	itemPtr->entryHeight = itemPtr->iconHeight;
-    }
-    if (itemPtr->image != NULL) {
-	itemPtr->textWidth  = IconWidth(itemPtr->image);
-	itemPtr->textHeight = IconHeight(itemPtr->image);
-    } else if (itemPtr->text != NULL) {
-	unsigned int w, h;
-
-	Blt_GetTextExtents(mbPtr->font, 0, itemPtr->text, itemPtr->textLen, 
-		&w, &h);
-	itemPtr->textWidth  = w + 2 * IPAD;
-	itemPtr->textHeight = h;
-    }
-    itemPtr->entryWidth += itemPtr->textWidth + IPAD;
-    if (itemPtr->iconWidth == 0) {
-	itemPtr->entryWidth += IPAD;
-    }
-    if (itemPtr->entryHeight < itemPtr->textHeight) {
-	itemPtr->entryHeight = itemPtr->textHeight;
-    }
-    itemPtr->entryHeight += 2 * YPAD;
-    itemPtr->entryWidth += 2 * XPAD;
-    itemPtr->width = itemPtr->entryWidth + 2 * itemPtr->inset;
-    itemPtr->height = itemPtr->entryHeight + 2 * itemPtr->inset;
-    itemPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static void
-ComputeMenubarGeometry(Menubar *mbPtr)
-{
-    Blt_ChainLink link;
-    int maxWidth, maxHeight;
-    int totalWidth, totalHeight;
-
-    mbPtr->width = mbPtr->height = 0;
-    mbPtr->inset = mbPtr->borderWidth + mbPtr->highlightWidth;
-    if (mbPtr->flags & LAYOUT_PENDING) {
-	for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Item *itemPtr;
-	    
-	    itemPtr = Blt_Chain_GetValue(link);
-	    ComputeItemGeometry(itemPtr);
-	}
-    }
-    totalWidth = totalHeight = 0;
-    maxWidth = maxHeight = 0;
-    for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	ComputeItemGeometry(itemPtr);
-	if (itemPtr->width > maxWidth) {
-	    maxWidth = itemPtr->width;
-	}
-	if (itemPtr->height > maxHeight) {
-	    maxHeight = itemPtr->height;
-	}
-	totalWidth  += itemPtr->width + IPAD;
-	totalHeight += itemPtr->height + IPAD;
-    }
-    if (mbPtr->flags & VERTICAL) {
-	mbPtr->height = totalHeight;
-	mbPtr->width = maxWidth;
-    } else {
-	mbPtr->height = totalHeight;
-	mbPtr->width = maxWidth;
-    }
-    if (mbPtr->reqHeight > 0) {
-	mbPtr->width = mbPtr->reqHeight;
-    } 
-    if (mbPtr->reqWidth > 0) {
-	mbPtr->height = mbPtr->reqWidth;
-    }
-    mbPtr->height += 2 * mbPtr->inset;
-    mbPtr->width += 2 * mbPtr->inset;
-    if ((mbPtr->width != Tk_ReqWidth(mbPtr->tkwin)) || 
-	(mbPtr->height != Tk_ReqHeight(mbPtr->tkwin))) {
-	Tk_GeometryRequest(mbPtr->tkwin, mbPtr->width, mbPtr->height);
-    }
-    mbPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static int
-ConfigureMenubar(Tcl_Interp *interp, Menubar *mbPtr, int objc, 
-		 Tcl_Obj *const *objv, int flags)
-{
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC newGC;
-
-    if (Blt_ConfigureWidgetFromObj(interp, mbPtr->tkwin, menubarSpecs, objc, 
-		objv, (char *)mbPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    gcMask = GCForeground | GCFont;
-    gcValues.font = Blt_FontId(mbPtr->font);
-    /* Text GCs. */
-    gcValues.foreground = mbPtr->textNormalColor->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    if (mbPtr->textNormalGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textNormalGC);
-    }
-    mbPtr->textNormalGC = newGC;
-
-    gcValues.foreground = mbPtr->textActiveColor->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    if (mbPtr->textActiveGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textActiveGC);
-    }
-    mbPtr->textActiveGC = newGC;
-
-    gcValues.foreground = mbPtr->textPostedColor->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    if (mbPtr->textPostedGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textPostedGC);
-    }
-    mbPtr->textPostedGC = newGC;
-
-    gcValues.foreground = mbPtr->textDisabledColor->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    if (mbPtr->textDisabledGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textDisabledGC);
-    }
-    mbPtr->textDisabledGC = newGC;
-
-    /* Focus highlight GCs */
-    gcMask = GCForeground;
-    gcValues.foreground = mbPtr->highlightColor->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    if (mbPtr->highlightGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->highlightGC);
-    }
-    mbPtr->highlightGC = newGC;
-    if (mbPtr->highlightBgColor != NULL) {
-	gcValues.foreground = mbPtr->highlightBgColor->pixel;
-	newGC = Tk_GetGC(mbPtr->tkwin, gcMask, &gcValues);
-    } else {
-	newGC = NULL;
-    }
-    if (mbPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->highlightBgGC);
-    }
-    mbPtr->highlightBgGC = newGC;
-    ComputeMenubarGeometry(mbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyMenubar --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyMenubar(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    Menubar *mbPtr = (Menubar *)dataPtr;
-
-    iconOption.clientData = mbPtr;
-    Blt_FreeOptions(menubarSpecs, (char *)mbPtr, mbPtr->display, 0);
-    if (mbPtr->textNormalGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textNormalGC);
-    }
-    if (mbPtr->textActiveGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textActiveGC);
-    }
-    if (mbPtr->textDisabledGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textDisabledGC);
-    }
-    if (mbPtr->textPostedGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->textPostedGC);
-    }
-    if (mbPtr->highlightGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->highlightGC);
-    }
-    if (mbPtr->highlightBgGC != NULL) {
-	Tk_FreeGC(mbPtr->display, mbPtr->highlightBgGC);
-    }
-    Tcl_DeleteCommandFromToken(mbPtr->interp, mbPtr->cmdToken);
-    Blt_Free(mbPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewMenubar --
- *
- *---------------------------------------------------------------------------
- */
-static Menubar *
-NewMenubar(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    Menubar *mbPtr;
-
-    mbPtr = Blt_AssertCalloc(1, sizeof(Menubar));
-
-    mbPtr->borderWidth = 1;
-    mbPtr->display = Tk_Display(tkwin);
-    mbPtr->flags = (LAYOUT_PENDING | STATE_NORMAL);
-    mbPtr->highlightWidth = 2;
-    mbPtr->interp = interp;
-    mbPtr->relief = TK_RELIEF_RAISED;
-    mbPtr->postedRelief = TK_RELIEF_FLAT;
-    mbPtr->activeRelief = TK_RELIEF_RAISED;
-    mbPtr->tkwin = tkwin;
-    mbPtr->parent = Tk_Parent(tkwin);
-    return mbPtr;
-}
-
-static INLINE Item *
-FindItemByIndex(Menubar *mbPtr, long index)
-{
-    Blt_ChainLink link;
-
-    if ((index < 1) || (index > Blt_Chain_GetLength(mbPtr->chain))) {
-	return NULL;
-    }
-    link = Blt_Chain_GetNthLink(mbPtr->chain, index - 1);
-    return Blt_Chain_GetValue(link);
-}
-
-static INLINE Item *
-FindItemByLabel(Menubar *mbPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&mbPtr->itemTable, string);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetItemFromObj --
- *
- *	Gets the item associated the given index or label.  Converts a
- *	string representing a item index into an item pointer.  The index
- *	may be in one of the following forms:
- *
- *	 number		Item at index in the list of items.
- *	 @x,y		Item closest to the specified X-Y screen coordinates.
- *	 "active"	Item where mouse pointer is located.
- *	 "posted"       Item is the currently posted cascade item.
- *	 "next"		Next item from the focus item.
- *	 "previous"	Previous item from the focus item.
- *	 "end"		Last item.
- *	 "none"		No item.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via itemPtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetItemFromObj(Tcl_Interp *interp, Menubar *mbPtr, Tcl_Obj *objPtr,
-		 Item **itemPtrPtr)
-{
-    Item *itemPtr;
-    const char *string;
-    char c;
-    long lval;
-
-    if (mbPtr->flags & LAYOUT_PENDING) {
-	ComputeMenubarGeometry(mbPtr);
-    }
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-
-    itemPtr = NULL;
-    if (c == '\0') {
-	itemPtr = NULL;
-    } else if (Tcl_GetLongFromObj(NULL, objPtr, &lval) == TCL_OK) {
-	if (lval < 0) {
-	    itemPtr = NULL;
-	} else {
-	    itemPtr = FindItemByIndex(mbPtr, (long)lval);
-	}
-	if (itemPtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find item: bad index \"", 
-				 Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	itemPtr = mbPtr->activePtr;
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-	itemPtr = NextItem(mbPtr->activePtr);
-	if (itemPtr == NULL) {
-	    itemPtr = mbPtr->activePtr;
-	}
-    } else if ((c == 'p') && (strcmp(string, "item_previous") == 0)) {
-	itemPtr = PrevItem(mbPtr->activePtr);
-	if (itemPtr == NULL) {
-	    itemPtr = mbPtr->activePtr;
-	}
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	itemPtr = LastItem(mbPtr);
-    } else if ((c == 'f') && (strcmp(string, "first") == 0)) {
-	itemPtr = FirstItem(mbPtr);
-    } else if ((c == 'l') && (strcmp(string, "last") == 0)) {
-	itemPtr = LastItem(mbPtr);
-    } else if ((c == 'n') && (strcmp(string, "none") == 0)) {
-	itemPtr = NULL;
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(mbPtr->interp, mbPtr->tkwin, string, &x, &y) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	itemPtr = NearestItem(mbPtr, x, y, TRUE);
-	if ((itemPtr != NULL) && (itemPtr->flags & STATE_DISABLED)) {
-	    itemPtr = NextItem(itemPtr);
-	}
-    } else {
-	itemPtr = FindItemByLabel(mbPtr, string);
-	if (itemPtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find item \"", string,
-			"\" in \"", Tk_PathName(mbPtr->tkwin), "\"", 
-		(char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *itemPtrPtr = itemPtr;
-    return TCL_OK;
-}
-
-static void
-RenumberItems(Menubar *mbPtr) 
-{
-    int count = 0;
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	itemPtr->index = count;
-	count++;
-    }
-}
-
-static Item *
-NewItem(Menubar *mbPtr, int type)
-{
-    Item *itemPtr;
-    Blt_ChainLink link;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    link = Blt_Chain_AllocLink(sizeof(Item));
-    itemPtr = Blt_Chain_GetValue(link);
-    memset(itemPtr, 0, sizeof(Item));
-    do {
-	char string[200];
-
-	sprintf(string, "item%d", mbPtr->nextId++);
-	hPtr = Blt_CreateHashEntry(&mbPtr->itemTable, string, &isNew);
-    } while (!isNew);
-    itemPtr->hashPtr = hPtr;
-    itemPtr->text = Blt_GetHashKey(&mbPtr->itemTable, hPtr);
-    itemPtr->textLen = strlen(itemPtr->text);
-    itemPtr->mbPtr = mbPtr;
-    itemPtr->flags = STATE_NORMAL | type;
-    itemPtr->link = link;
-    itemPtr->index = Blt_Chain_GetLength(mbPtr->chain) + 1;
-    itemPtr->menuAnchor = TK_ANCHOR_SW;
-    itemPtr->underline = -1;
-    return itemPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyItem --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyItem(Item *itemPtr)
-{
-    Menubar *mbPtr = itemPtr->mbPtr;
-
-    iconOption.clientData = mbPtr;
-    Blt_FreeOptions(itemSpecs, (char *)itemPtr, mbPtr->display, 0);
-    Blt_Chain_DeleteLink(mbPtr->chain, itemPtr->link);
-}
-
-static int
-ConfigureItem(Tcl_Interp *interp, Item *itemPtr, int objc, 
-		Tcl_Obj *const *objv, int flags)
-{
-    Menubar *mbPtr;
-
-    mbPtr = itemPtr->mbPtr;
-    iconOption.clientData = mbPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, mbPtr->tkwin, itemSpecs, 
-	objc, objv, (char *)itemPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    ComputeItemGeometry(itemPtr);
-    return TCL_OK;
-}
-
-static int
-PostMenu(Item *itemPtr)
-{
-    const char *menuName;
-    Tk_Window menuWin;
-    Menubar *mbPtr;
-    Tcl_Interp *interp;
-
-    mbPtr = itemPtr->mbPtr;
-    interp = itemPtr->mbPtr->interp;
-    if (itemPtr->menuObjPtr == NULL) {
-	return TCL_OK;
-    }
-    if ((itemPtr->flags & (ITEM_BUTTON|STATE_DISABLED|STATE_POSTED)) !=
-	ITEM_BUTTON) {
-	return TCL_OK;
-    }
-    menuName = Tcl_GetString(itemPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, mbPtr->tkwin);
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != mbPtr->tkwin) {
-	Tcl_AppendResult(interp, "can't post \"", Tk_PathName(menuWin), 
-		"\": it isn't a descendant of ", Tk_PathName(mbPtr->tkwin),
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (itemPtr->postCmdObjPtr) {
-	int result;
-
-	Tcl_Preserve(itemPtr);
-	Tcl_IncrRefCount(itemPtr->postCmdObjPtr);
-	result = Tcl_EvalObjEx(interp, itemPtr->postCmdObjPtr, 
-		TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(itemPtr->postCmdObjPtr);
-	Tcl_Release(itemPtr);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (Tk_IsMapped(mbPtr->tkwin)) {
-	Tcl_Obj *cmd[2];
-	int result;
-
-	Tcl_Preserve(mbPtr);
-	cmd[0] = itemPtr->menuObjPtr;
-	cmd[1] = Tcl_NewStringObj("post", 4);
-	Tcl_IncrRefCount(cmd[0]);
-	Tcl_IncrRefCount(cmd[1]);
-	result = Tcl_EvalObjv(interp, 2, cmd, 0);
-	Tcl_DecrRefCount(cmd[1]);
-	Tcl_DecrRefCount(cmd[0]);
-	Tcl_Release(mbPtr);
-	if (result == TCL_OK) {
-	    itemPtr->flags &= ~STATE_MASK;
-	    itemPtr->flags |= STATE_POSTED;
-	    mbPtr->postedPtr = itemPtr;
-	}
-	EventuallyRedraw(mbPtr);
-	return result;
-    }
-    return TCL_OK;
-}
-
-static int
-UnpostMenu(Item *itemPtr)
-{
-    const char *menuName;
-    Tk_Window menuWin;
-    Menubar *mbPtr;
-    Tcl_Interp *interp;
-
-    if ((itemPtr->menuObjPtr == NULL) || 
-	((itemPtr->flags & STATE_POSTED) == 0)) {
-	return TCL_OK;
-    }
-    mbPtr = itemPtr->mbPtr;
-    interp = mbPtr->interp;
-    itemPtr->flags &= ~STATE_MASK;
-    itemPtr->flags |= STATE_NORMAL;
-    menuName = Tcl_GetString(itemPtr->menuObjPtr);
-    menuWin = Tk_NameToWindow(interp, menuName, mbPtr->tkwin);
-    if (menuWin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(menuWin) != mbPtr->tkwin) {
-	Tcl_AppendResult(interp, "can't unpost \"", Tk_PathName(menuWin), 
-		"\": it isn't a descendant of ", Tk_PathName(mbPtr->tkwin), 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tk_IsMapped(menuWin)) {
-	Tk_UnmapWindow(menuWin);
-    }
-    return TCL_OK;
-}
-
-
-
-static void
-DestroyFloat(Menubar *mbPtr)
-{
-    if (mbPtr->floatWin != NULL) {
-	if (mbPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayMenubar, mbPtr);
-	}
-	Tk_DeleteEventHandler(mbPtr->floatWin, StructureNotifyMask, 
-			      FloatEventProc, mbPtr);
-	if (mbPtr->tkwin != NULL) {
-
-	    Blt_RelinkWindow(mbPtr->tkwin, mbPtr->parent, 0, 0);
-	    Tk_MoveResizeWindow(mbPtr->tkwin, 
-				mbPtr->region.x, mbPtr->region.y, 
-				mbPtr->region.width, mbPtr->region.height);
-	    if (!Tk_IsMapped(mbPtr->tkwin)) {
-		Tk_MapWindow(mbPtr->tkwin);
-	    }
-	}
-	Tk_DestroyWindow(mbPtr->floatWin);
-	mbPtr->floatWin = NULL;
-    }
-}
-
-static void
-FreeFloatProc(DestroyData dataPtr)
-{
-    Menubar *mbPtr = (Menubar *)dataPtr;
-    DestroyFloat(mbPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FloatEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	the floating menubar.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the tearoff gets deleted, internal structures get
- *	cleaned up.  When it gets resized or exposed, it's redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FloatEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Menubar *mbPtr = clientData;
-
-    if ((mbPtr == NULL) || (mbPtr->tkwin == NULL) ||
-	(mbPtr->floatWin == NULL)) {
-	return;
-    }
-    switch (eventPtr->type) {
-    case Expose:
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(mbPtr);
-	}
-	break;
-
-    case ConfigureNotify:
-	EventuallyRedraw(mbPtr);
-	break;
-
-    case DestroyNotify:
-	DestroyFloat(mbPtr);
-	mbPtr->floatWin = NULL;
-	break;
-
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FloatCustodyProc --
- *
- *	This procedure is invoked when the menubar has been stolen by another
- *	geometry manager.  The information and memory associated with the 
- *	window is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the widget formerly associated with the menubar to
- *	have its layout re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-FloatCustodyProc(ClientData clientData, Tk_Window tkwin)
-{
-    Menubar *mbPtr = clientData;
-
-    if ((mbPtr == NULL) || (mbPtr->tkwin == NULL)) {
-	return;
-    }
-    if (mbPtr->floatWin != NULL) {
-	Tcl_EventuallyFree(mbPtr, FreeFloatProc);
-    }
-    /*
-     * Mark the floating dock as deleted by dereferencing the Tk window
-     * pointer.
-     */
-    if (mbPtr->tkwin != NULL) {
-	if (Tk_IsMapped(mbPtr->tkwin)) {
-	    mbPtr->flags |= LAYOUT_PENDING;
-	    EventuallyRedraw(mbPtr);
-	}
-	Tk_DeleteEventHandler(mbPtr->floatWin, StructureNotifyMask, 
-		FloatEventProc, mbPtr);
-	mbPtr->floatWin = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FloatGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for the floating
- *	menubar managed by the widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for tkwin, and all its managed siblings, to be repacked and
- *	drawn at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-FloatGeometryProc(ClientData clientData, Tk_Window tkwin)
-{
-    Menubar *mbPtr = clientData;
-
-    if ((mbPtr == NULL) || (mbPtr->tkwin == NULL)) {
-	fprintf(stderr, "%s: line %d \"tkwin is null\"", __FILE__, __LINE__);
-	return;
-    }
-    mbPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(mbPtr);
-}
-
-static void
-FloatMenubar(ClientData clientData)
-{
-    Menubar *mbPtr = clientData;
-
-    Blt_RelinkWindow(mbPtr->tkwin, mbPtr->floatWin, 0, 0);
-    Tk_MapWindow(mbPtr->tkwin);
-}
-
-static int
-CreateFloat(Menubar *mbPtr, const char *name)
-{
-    Tk_Window tkwin;
-    int width, height;
-
-    tkwin = Tk_CreateWindowFromPath(mbPtr->interp, mbPtr->tkwin, name,
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    mbPtr->floatWin = tkwin;
-    if (Tk_WindowId(tkwin) == None) {
-	Tk_MakeWindowExist(tkwin);
-    }
-    Tk_SetClass(tkwin, "MenubarDock");
-    Tk_CreateEventHandler(tkwin, (ExposureMask | StructureNotifyMask),
-	FloatEventProc, mbPtr);
-    if (Tk_WindowId(mbPtr->tkwin) == None) {
-	Tk_MakeWindowExist(mbPtr->tkwin);
-    }
-    Tk_ManageGeometry(mbPtr->tkwin, &menubarMgrInfo, mbPtr);
-    mbPtr->region.height = height = Tk_Height(mbPtr->tkwin);
-    mbPtr->region.width = width = Tk_Width(mbPtr->tkwin);
-    mbPtr->region.x = Tk_X(mbPtr->tkwin);
-    mbPtr->region.y = Tk_Y(mbPtr->tkwin);
-    if (width < 2) {
-	width = (mbPtr->reqWidth > 0)
-	    ? mbPtr->reqWidth : Tk_ReqWidth(mbPtr->tkwin);
-    }
-    width += 2 * Tk_Changes(mbPtr->tkwin)->border_width;
-    width += 2 * mbPtr->inset;
-
-    if (height < 2) {
-	height = (mbPtr->reqHeight > 0)
-	    ? mbPtr->reqHeight : Tk_ReqHeight(mbPtr->tkwin);
-    }
-    height += 2 * Tk_Changes(mbPtr->tkwin)->border_width;
-    height += 2 * mbPtr->inset;
-    Tk_GeometryRequest(tkwin, width, height);
-    /* Tk_MoveWindow(mbPtr->tkwin, 0, 0); */
-    Tcl_SetStringObj(Tcl_GetObjResult(mbPtr->interp), Tk_PathName(tkwin), -1);
-    Tk_UnmapWindow(mbPtr->tkwin);
-#ifdef WIN32
-    FloatMenubar(mbPtr);
-#else
-    Tcl_DoWhenIdle(FloatMenubar, mbPtr);
-#endif
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawLabel --
- *
- * 	Draws the text associated with the label.  This is used when the
- * 	widget acts like a standard label.
- *
- * Results:
- *	Nothing.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawLabel(Item *itemPtr, Drawable drawable, int x, int y, int w, int h) 
-{
-    if (itemPtr->image != NULL) {
-	int iw, ih;
-		
-	iw = MIN(w, itemPtr->textWidth) - IPAD;
-	ih = MIN(h, itemPtr->textHeight);
-	Tk_RedrawImage(IconImage(itemPtr->image), 0, 0, iw, ih, drawable, 
-		x + IPAD, y);
-    } else {
-	GC gc;
-	Menubar *mbPtr;
-	TextLayout *layoutPtr;
-	TextStyle ts;
-
-	mbPtr = itemPtr->mbPtr;
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, mbPtr->font);
-	Blt_Ts_SetAnchor(ts, TK_ANCHOR_NW);
-	Blt_Ts_SetJustify(ts, itemPtr->justify);
-	Blt_Ts_SetUnderline(ts, itemPtr->underline);
-	layoutPtr = Blt_Ts_CreateLayout(itemPtr->text, -1, &ts);
-	if (itemPtr->flags & STATE_POSTED) {
-	    gc = mbPtr->textPostedGC;
-	} else if (itemPtr->flags & STATE_ACTIVE) {
-	    gc = mbPtr->textActiveGC;
-	} else if (itemPtr->flags & STATE_DISABLED) {
-	    gc = mbPtr->textDisabledGC;
-	} else {
-	    gc = mbPtr->textNormalGC;
-	}
-	Blt_DrawLayout(mbPtr->tkwin, drawable, gc, mbPtr->font, 
-		Tk_Depth(mbPtr->tkwin), 0.0f, x + IPAD, y, layoutPtr, w);
-	Blt_Free(layoutPtr);
-    }
-}
-
-static void
-DrawSeparator(Item *itemPtr, Drawable drawable, int x, int y, int w, int h)
-{
-    Menubar *mbPtr = itemPtr->mbPtr;
-    XPoint points[2];
-    Tk_3DBorder border;
-
-    points[1].x = points[0].x = x + w / 2;
-    points[0].y = y + YPAD;
-    points[1].y = h - 2 * YPAD;
-
-    border = Blt_BackgroundBorder(mbPtr->normalBg);
-    Tk_Draw3DPolygon(mbPtr->tkwin, drawable, border, points, 2, 1, 
-		     TK_RELIEF_SUNKEN);
-}
-
-static void
-DrawItem(Item *itemPtr, Drawable drawable)
-{
-    Menubar *mbPtr = itemPtr->mbPtr;
-    Blt_Background bg;
-    int relief;
-    int x, y, w, h;
-
-    if (itemPtr->flags & ITEM_FILLER) {
-	return;			/* No need to do anything. */
-    }
-    x = itemPtr->x;
-    y = itemPtr->y;
-    w = itemPtr->width;
-    h = mbPtr->height;
-
-    if (itemPtr->flags & ITEM_SEPARATOR) {
-	DrawSeparator(itemPtr, drawable, x, y, w, h);
-	return;
-    }
-
-    /* Menubar background (just inside of focus highlight ring). */
-
-    if (itemPtr->flags & STATE_POSTED) {
-	bg = mbPtr->postedBg;
-    } else if (itemPtr->flags & STATE_ACTIVE) {
-	bg = mbPtr->activeBg;
-    } else if (itemPtr->flags & STATE_DISABLED) {
-	bg = mbPtr->disabledBg;
-    } else {
-	bg = mbPtr->normalBg;
-    }
-    Blt_FillBackgroundRectangle(mbPtr->tkwin, drawable, bg, 0, 0,
-	itemPtr->width, mbPtr->height, mbPtr->borderWidth, 
-	TK_RELIEF_FLAT);
-
-    /* Label: includes icon and text. */
-    if (h > itemPtr->entryHeight) {
-	y += (h - itemPtr->entryHeight) / 2;
-    }
-    x += XPAD;
-    /* Draw Icon. */
-    if (itemPtr->icon != NULL) {
-	int ix, iy, iw, ih;
-	
-	ix = x;
-	iy = y;
-	if (itemPtr->iconHeight < itemPtr->entryHeight) {
-	    iy += (itemPtr->entryHeight - itemPtr->iconHeight) / 2;
-	}
-	iw = MIN(w, itemPtr->iconWidth);
-	ih = MIN(h, itemPtr->iconHeight);
-	Tk_RedrawImage(IconImage(itemPtr->icon), 0, 0, iw, ih, 
-		       drawable, ix, iy);
-	x += itemPtr->iconWidth + IPAD;
-	w -= itemPtr->iconWidth + IPAD;
-    }
-    if ((w > 0) && (h > 0)) {
-	int tx, ty, tw, th;
-	
-	tx = x + IPAD;
-	ty = y;
-	if (itemPtr->entryHeight > itemPtr->textHeight) {
-	    ty += (itemPtr->entryHeight - itemPtr->textHeight) / 2;
-	}
-	tw = MIN(w, itemPtr->textWidth);
-	th = MIN(h, itemPtr->textHeight);
-	DrawLabel(itemPtr, drawable, tx, ty, tw, th);
-    }
-    /* Draw focus highlight ring. */
-    if (mbPtr->highlightWidth > 0) {
-	GC gc;
-
-	if (itemPtr->flags & FOCUS) {
-	    gc = mbPtr->highlightGC;
-	} else {
-	    gc = mbPtr->highlightBgGC;
-	}
-	if (gc == NULL) {
-	    Blt_DrawFocusBackground(mbPtr->tkwin, bg, 
-		mbPtr->highlightWidth, drawable);
-	} else {
-	    Tk_DrawFocusHighlight(mbPtr->tkwin, gc, mbPtr->highlightWidth,
-		 drawable);
-	}	    
-    }
-    if (itemPtr->flags & STATE_POSTED) {
-	relief = mbPtr->postedRelief;
-    } else if (itemPtr->flags & STATE_ACTIVE) {
-	relief = mbPtr->activeRelief;
-    } else {
-	relief = mbPtr->relief;
-    }
-    if (relief != TK_RELIEF_FLAT) {
-	Blt_DrawBackgroundRectangle(mbPtr->tkwin, drawable, bg, 
-		mbPtr->highlightWidth, mbPtr->highlightWidth,
-		itemPtr->width  - 2 * mbPtr->highlightWidth,
-		itemPtr->height - 2 * mbPtr->highlightWidth,
-		mbPtr->borderWidth, relief);
-    }
-}
-
-static void
-DrawItems(Menubar *mbPtr, Drawable drawable)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Item *itemPtr;
-	int x, y, w, h;
-
-	itemPtr = Blt_Chain_GetValue(link);
-	x = y = itemPtr->inset;
-	w = itemPtr->width  - (2 * mbPtr->inset);
-	h = itemPtr->height - (2 * mbPtr->inset);
-	DrawItem(itemPtr, drawable);
-	x += itemPtr->width + IPAD;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Activates the designated button.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.mbar activate $item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-ActivateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((itemPtr == NULL) || ((itemPtr->flags & ITEM_BUTTON) == 0)) {
-	goto done;
-    }
-    if (itemPtr->flags & (STATE_POSTED|STATE_DISABLED)) {
-	return TCL_OK;		/* Writing is currently disabled. */
-    }
-    itemPtr->flags |= STATE_ACTIVE;
- done:
-    mbPtr->activePtr->flags &= ~STATE_ACTIVE;
-    mbPtr->activePtr = itemPtr;
-    EventuallyRedraw(mbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AddOp --
- *
- *	Appends a new item to the menubar.
- *
- * Results:
- *	NULL is always returned.
- *
- *   .mbar add ?type? -text "fred" -tags ""
- *
- *---------------------------------------------------------------------------
- */
-static int
-AddOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-    int length, type;
-    char c;
-    const char *string;
-    
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    type = ITEM_BUTTON;
-    if ((c == 'b') && (strncmp(string, "button", length) == 0)) {
-	type = ITEM_BUTTON;
-	objc--, objv--;
-    } else if ((c == 's') && (strncmp(string, "separator", length) == 0)) {
-	type = ITEM_SEPARATOR;
-	objc--, objv--;
-    } else if ((c == 's') && (strncmp(string, "filler", length) == 0)) {
-	type = ITEM_FILLER;
-	objc--, objv--;
-    }
-    itemPtr = NewItem(mbPtr, type);
-    if (ConfigureItem(interp, itemPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	DestroyItem(itemPtr);
-	return TCL_ERROR;	/* Error configuring the entry. */
-    }
-    EventuallyRedraw(mbPtr);
-    Blt_Chain_LinkAfter(mbPtr->chain, itemPtr->link, NULL);
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), itemPtr->index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.menubar cget option
- *
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    iconOption.clientData = mbPtr;
-    return Blt_ConfigureValueFromObj(interp, mbPtr->tkwin, menubarSpecs,
-	(char *)mbPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.menubar configure ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    int result;
-    Menubar *mbPtr = clientData;
-
-    iconOption.clientData = mbPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, menubarSpecs, 
-		(char *)mbPtr, (Tcl_Obj *)NULL,  BLT_CONFIG_OBJV_ONLY);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, menubarSpecs, 
-		(char *)mbPtr, objv[2], BLT_CONFIG_OBJV_ONLY);
-    }
-    Tcl_Preserve(mbPtr);
-    result = ConfigureMenubar(interp, mbPtr, objc - 2, objv + 2, 
-	BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(mbPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    mbPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(mbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DockOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.menubar dock
- *	.menubar undock
- *---------------------------------------------------------------------------
- */
-static int
-DockOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-
-    if (mbPtr->floatWin == NULL) {
-	CreateFloat(mbPtr, "dock");
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemCgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.mbar item cget $button option
- *
- *---------------------------------------------------------------------------
- */
-static int
-ItemCgetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, mbPtr, objv[3], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    iconOption.clientData = mbPtr;
-    return Blt_ConfigureValueFromObj(interp, mbPtr->tkwin, itemSpecs,
-	(char *)itemPtr, objv[4], BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.mbar item configure $button ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ItemConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-    int result;
-
-    if (GetItemFromObj(interp, mbPtr, objv[3], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    iconOption.clientData = mbPtr;
-    if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, itemSpecs, 
-		(char *)itemPtr, (Tcl_Obj *)NULL,  BLT_CONFIG_OBJV_ONLY);
-    } else if (objc == 5) {
-	return Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, itemSpecs, 
-		(char *)itemPtr, objv[4], BLT_CONFIG_OBJV_ONLY);
-    }
-    Tcl_Preserve(itemPtr);
-    result = ConfigureItem(interp, itemPtr, objc - 4, objv + 4, 
-			     BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(itemPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    mbPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(mbPtr);
-    return TCL_OK;
-}
-
-
-static Blt_OpSpec itemOps[] =
-{
-    {"cget",      2, ItemCgetOp,      5, 5, "item option",},
-    {"configure", 2, ItemConfigureOp, 4, 0, "item ?option value?...",},
-};
-
-static int nItemOps = sizeof(itemOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * ItemOp --
- *
- *	This procedure handles item operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ItemOp(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument vector. */
-{
-    Tcl_ObjCmdProc *proc;
-    Menubar *mbPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nItemOps, itemOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(mbPtr);
-    result = (*proc) (clientData, interp, objc, objv);
-    Tcl_Release(mbPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes one or more item from the menubar.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The menubar is redrawn.
- *
- *   .mbar delete but1 but2 but3 but4...
- *
- *---------------------------------------------------------------------------
- */
-static int
-DeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Item *itemPtr;
-
-	if (GetItemFromObj(interp, mbPtr, objv[i], &itemPtr) != TCL_OK) {
-	    RenumberItems(mbPtr);
-	    EventuallyRedraw(mbPtr);
-	    return TCL_ERROR;
-	}
-	if (itemPtr != NULL) {
-	    DestroyItem(itemPtr);
-	}
-    }
-    RenumberItems(mbPtr);
-    EventuallyRedraw(mbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Returns the index of the designated item or -1 if it doesn't
- *	exist.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The menubar is redrawn.
- *
- *   .mbar index $item
- *
- *---------------------------------------------------------------------------
- */
-static int
-IndexOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-    int index;
-
-    index = -1;
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr != NULL) {
-	index = itemPtr->index;
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Inserts a new item into the menubar.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The menubar is redrawn.
- *
- *   .mbar insert ?type? -1 -text "fred" -tags ""
- *
- *---------------------------------------------------------------------------
- */
-static int
-InsertOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Blt_ChainLink before;
-    Item *itemPtr;
-    Menubar *mbPtr = clientData;
-    char c;
-    const char *string;
-    int length, type;
-    long insertPos;
-
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    type = ITEM_BUTTON;
-    if ((c == 'b') && (strncmp(string, "button", length) == 0)) {
-	type = ITEM_BUTTON;
-	objc--, objv--;
-    } else if ((c == 's') && (strncmp(string, "separator", length) == 0)) {
-	type = ITEM_SEPARATOR;
-	objc--, objv--;
-    } else if ((c == 's') && (strncmp(string, "filler", length) == 0)) {
-	type = ITEM_FILLER;
-	objc--, objv--;
-    }
-    if (Blt_GetPositionFromObj(interp, objv[2], &insertPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((insertPos == -1) || 
-	(insertPos >= Blt_Chain_GetLength(mbPtr->chain))) {
-	before = NULL;		/* Insert at end of list. */
-    } else {
-	before =  Blt_Chain_GetNthLink(mbPtr->chain, insertPos);
-    }
-    itemPtr = NewItem(mbPtr, type);
-    if (ConfigureItem(interp, itemPtr, objc - 3, objv + 3, 0) != TCL_OK) {
-	DestroyItem(itemPtr);
-	return TCL_ERROR;	/* Error configuring the entry. */
-    }
-    EventuallyRedraw(mbPtr);
-    Blt_Chain_LinkBefore(mbPtr->chain, itemPtr->link, before);
-    RenumberItems(mbPtr);
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), itemPtr->index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .mbar invoke $item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-InvokeOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-    int result;
-
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((itemPtr == NULL) || 
-	((itemPtr->flags & (STATE_DISABLED|ITEM_BUTTON)) != ITEM_BUTTON)) {
-	return TCL_OK;		/* Item is currently disabled. */
-    }
-    result = TCL_OK;
-    if (itemPtr->cmdObjPtr != NULL) {
-	Tcl_Preserve(itemPtr);
-	Tcl_IncrRefCount(itemPtr->cmdObjPtr);
-	result = Tcl_EvalObjEx(interp, itemPtr->cmdObjPtr, TCL_EVAL_GLOBAL);
-	Tcl_DecrRefCount(itemPtr->cmdObjPtr);
-	Tcl_Release(itemPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveOp --
- *
- *	Moves a item to a new location.
- *
- *   .mbar move but1 after|before but2
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MoveOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr, *b2Ptr;
-    char c;
-    const char *string;
-    int isBefore;
-    int length;
-
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    c = string[0];
-    if ((c == 'b') && (strncmp(string, "before", length) == 0)) {
-	isBefore = TRUE;
-    } else if ((c == 'a') && (strncmp(string, "after", length) == 0)) {
-	isBefore = FALSE;
-    } else {
-	Tcl_AppendResult(interp, "bad key word \"", string,
-	    "\": should be \"after\" or \"before\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetItemFromObj(interp, mbPtr, objv[4], &b2Ptr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    Blt_Chain_UnlinkLink(mbPtr->chain, itemPtr->link);
-    if (isBefore) {
-	Blt_Chain_LinkBefore(mbPtr->chain, itemPtr->link, b2Ptr->link);
-    } else {
-	Blt_Chain_LinkAfter(mbPtr->chain, itemPtr->link, b2Ptr->link);
-    }
-    RenumberItems(mbPtr);
-    EventuallyRedraw(mbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Lists the names of the items in the menubar.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The menubar is redrawn.
- *
- *   .mbar names ?pattern?
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Tcl_Obj *listObjPtr;
-    int i;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (i = 2; i < objc; i++) {
-	const char *pattern;
-	Blt_ChainLink link;
-
-	pattern = Tcl_GetString(objv[i]);
-	for (link = Blt_Chain_FirstLink(mbPtr->chain); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Item *itemPtr;
-	    Tcl_Obj *objPtr;
-
-	    itemPtr = Blt_Chain_GetValue(link);
-	    if (Tcl_StringMatch(itemPtr->text, pattern)) {
-		if (itemPtr->text == emptyString) {
-		    objPtr = Blt_EmptyStringObj();
-		} else {
-		    objPtr = Tcl_NewStringObj(itemPtr->text, -1);
-		}
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostOp --
- *
- *	Posts the menu associated with this item.
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .mbar post $item 
- *
- *---------------------------------------------------------------------------
- */
-static int
-PostOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	if (mbPtr->postedPtr != NULL) {
-	    UnpostMenu(mbPtr->postedPtr);
-	}
-	return TCL_OK;
-    }
-    if ((itemPtr->flags & (STATE_POSTED|STATE_DISABLED|ITEM_BUTTON)) !=
-	ITEM_BUTTON) {
-	return TCL_OK;		/* Item's menu is currently posted or entry
-				 * is disabled. */
-    }
-    if (itemPtr->menuObjPtr == NULL) {
-	return TCL_OK;
-    }
-    if (mbPtr->postedPtr != NULL) {
-	UnpostMenu(mbPtr->postedPtr);
-    }
-    if (itemPtr != NULL) {
-	PostMenu(itemPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UndockOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.menubar dock
- *	.menubar undock
- *---------------------------------------------------------------------------
- */
-static int
-UndockOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-
-    if (mbPtr->floatWin != NULL) {
-	DestroyFloat(mbPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnpostOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *  .mbar unpost $item
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnpostOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Menubar *mbPtr = clientData;
-    Item *itemPtr;
-
-    if (GetItemFromObj(interp, mbPtr, objv[2], &itemPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (itemPtr == NULL) {
-	return TCL_OK;
-    }
-    if ((itemPtr->flags & (STATE_POSTED|STATE_DISABLED|ITEM_BUTTON)) != 
-	ITEM_BUTTON) {
-	return TCL_OK;		/* Item's menu is currently posted or entry
-				 * is disabled. */
-    }
-    if (itemPtr->menuObjPtr == NULL) {
-	return TCL_OK;
-    }
-    UnpostMenu(itemPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenubarCmd --
- *
- * 	This procedure is invoked to process the "menubar" command.  See
- * 	the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec menubarOps[] =
-{
-    {"activate",  2, ActivateOp,  3, 3, "item",},
-    {"add",       2, AddOp,       3, 3, "?option value...?",},
-    {"cget",      2, CgetOp,      3, 3, "option",},
-    {"configure", 2, ConfigureOp, 2, 0, "?option value?...",},
-    {"delete",    2, DeleteOp,    2, 0, "item ?item?",},
-    {"dock",      2, DockOp,      2, 2, "",},
-    {"index",     3, IndexOp,     3, 3, "item",},
-    {"insert",    3, InsertOp,    2, 2, "position ?option value...?",},
-    {"invoke",    3, InvokeOp,    3, 3, "item",},
-    {"item",      3, ItemOp,      2, 0, "args",},
-    {"move",      1, MoveOp,      2, 2, "position item ?item?",},
-    {"names",     1, NamesOp,     2, 0, "?pattern...?",},
-    {"post",      1, PostOp,      3, 3, "item",},
-    {"undock",    3, UndockOp,    2, 2, "",},
-    {"unpost",    3, UnpostOp,    3, 3, "item",},
-};
-
-static int nMenubarOps = sizeof(menubarOps) / sizeof(Blt_OpSpec);
-
-static int
-MenubarInstCmdProc(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument vector. */
-{
-    Tcl_ObjCmdProc *proc;
-    Menubar *mbPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nMenubarOps, menubarOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(mbPtr);
-    result = (*proc) (clientData, interp, objc, objv);
-    Tcl_Release(mbPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenubarInstCmdDeletedProc --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MenubarInstCmdDeletedProc(ClientData clientData)
-{
-    Menubar *mbPtr = clientData; /* Pointer to widget record. */
-
-    if (mbPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = mbPtr->tkwin;
-	mbPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenubarCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-MenubarCmd(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Menubar *mbPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tk_Window tkwin;
-    char *path;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, set up procs and initialize various
-     * bindings for the widget.  If the proc doesn't already exist, source it
-     * from "$blt_library/menubar.tcl".  We've deferred sourcing this file
-     * until now so that the user could reset the variable $blt_library from
-     * within her script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::Menubar::PostMenu", &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library menubar.tcl]";
-
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    mbPtr = NewMenubar(interp, tkwin);
-#define EVENT_MASK	(ExposureMask|StructureNotifyMask|FocusChangeMask)
-    Tk_CreateEventHandler(tkwin, EVENT_MASK, MenubarEventProc, mbPtr);
-    Tk_SetClass(tkwin, "Menubar");
-    mbPtr->cmdToken = Tcl_CreateObjCommand(interp, path, 
-	MenubarInstCmdProc, mbPtr, MenubarInstCmdDeletedProc);
-    Blt_SetWindowInstanceData(tkwin, mbPtr);
-    if (ConfigureMenubar(interp, mbPtr, objc-2, objv+2, 0) != TCL_OK) {
-	Tk_DestroyWindow(mbPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-int
-Blt_MenubarInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "menubar", MenubarCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * DrawLabel --
- *
- * 	Draws the text associated with the label.  This is used when the
- * 	widget acts like a standard label.
- *
- * Results:
- *	Nothing.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawLabel(Menubar *mbPtr, Drawable drawable, int x, int y, int w, int h) 
-{
-    if (mbPtr->image != NULL) {
-	int imgWidth, imgHeight;
-		
-	imgWidth = MIN(w, itemPtr->textWidth) - IPAD;
-	imgHeight = MIN(h, itemPtr->textHeight);
-	Tk_RedrawImage(IconImage(mbPtr->image), 0, 0, imgWidth, imgHeight, 
-		drawable, x + IPAD, y);
-    } else {
-	TextStyle ts;
-	TextLayout *layoutPtr;
-	GC gc;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, mbPtr->font);
-	Blt_Ts_SetAnchor(ts, TK_ANCHOR_NW);
-	Blt_Ts_SetJustify(ts, mbPtr->justify);
-	Blt_Ts_SetUnderline(ts, mbPtr->underline);
-	layoutPtr = Blt_Ts_CreateLayout(mbPtr->text, mbPtr->textLen, &ts);
-	if (mbPtr->flags & STATE_POSTED) {
-	    gc = mbPtr->textPostedGC;
-	} else if (mbPtr->flags & STATE_ACTIVE) {
-	    gc = mbPtr->textActiveGC;
-	} else if (mbPtr->flags & STATE_DISABLED) {
-	    gc = mbPtr->textDisabledGC;
-	} else {
-	    gc = mbPtr->textNormalGC;
-	}
-	Blt_DrawLayout(mbPtr->tkwin, drawable, gc, mbPtr->font, 
-		Tk_Depth(mbPtr->tkwin), 0.0f, x + IPAD, y, layoutPtr, w);
-	Blt_Free(layoutPtr);
-    }
-}
-#endif
-
-static void
-DrawMenubar(Menubar *mbPtr, Drawable drawable)
-{
-    Blt_Background bg;
-    int x, y;
-    int w, h;
-
-    /* Menubar background (just inside of focus highlight ring). */
-
-    if (mbPtr->flags & STATE_POSTED) {
-	bg = mbPtr->postedBg;
-    } else if (mbPtr->flags & STATE_ACTIVE) {
-	bg = mbPtr->activeBg;
-    } else if (mbPtr->flags & STATE_DISABLED) {
-	bg = mbPtr->disabledBg;
-    } else {
-	bg = mbPtr->normalBg;
-    }
-    Blt_FillBackgroundRectangle(mbPtr->tkwin, drawable, bg, 0, 0,
-	Tk_Width(mbPtr->tkwin), Tk_Height(mbPtr->tkwin),
-	mbPtr->borderWidth, TK_RELIEF_FLAT);
-
-    x = y = mbPtr->inset;
-    w  = Tk_Width(mbPtr->tkwin)  - (2 * mbPtr->inset);
-    h = Tk_Height(mbPtr->tkwin) - (2 * mbPtr->inset);
-
-    DrawItems(mbPtr, drawable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayMenubar --
- *
- *	This procedure is invoked to display a menubar widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the menubar.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayMenubar(ClientData clientData)
-{
-    Menubar *mbPtr = clientData;
-    Pixmap drawable;
-    int ww, wh;			/* Window width and height. */
-
-    mbPtr->flags &= ~REDRAW_PENDING;
-    if (mbPtr->tkwin == NULL) {
-	return;			/* Window destroyed (should not get here) */
-    }
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayMenubar(%s)\n", 
-	    Tk_PathName(mbPtr->tkwin));
-#endif
-    ww = Tk_Width(mbPtr->tkwin);
-    wh = Tk_Height(mbPtr->tkwin);
-    if ((ww <= 1) || (wh <=1)) {
-	/* Don't bother computing the layout until the window size is
-	 * something reasonable. */
-	return;
-    }
-    if (mbPtr->flags & LAYOUT_PENDING) {
-	ComputeMenubarGeometry(mbPtr);
-    }
-    if (!Tk_IsMapped(mbPtr->tkwin)) {
-	/* The widget's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the menubar's new layout.  */
-	return;
-    }
-
-    /*
-     * Create a pixmap the size of the window for double buffering.
-     */
-    drawable = Tk_GetPixmap(mbPtr->display, Tk_WindowId(mbPtr->tkwin),
-		ww, wh, Tk_Depth(mbPtr->tkwin));
-#ifdef WIN32
-    assert(drawable != None);
-#endif
-    DrawMenubar(mbPtr, drawable);
-    XCopyArea(mbPtr->display, drawable, Tk_WindowId(mbPtr->tkwin),
-	mbPtr->textNormalGC, 0, 0, ww, wh, 0, 0);
-    Tk_FreePixmap(mbPtr->display, drawable);
-}
diff --git a/blt3.0/src/bltNsUtil.c b/blt3.0/src/bltNsUtil.c
deleted file mode 100644
index 62f727d..0000000
--- a/blt3.0/src/bltNsUtil.c
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/*
- * bltNsUtil.c --
- *
- * This module implements utility namespace procedures for the BLT toolkit.
- *
- *	Copyright 1997-2008 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltNsUtil.h"
-
-/*
- * A Command structure exists for each command in a namespace. The Tcl_Command
- * opaque type actually refers to these structures.
- */
-
-typedef struct CompileProc CompileProc;
-typedef struct ImportRef ImportRef;
-typedef struct CommandTrace CommandTrace;
-
-typedef struct {
-    Tcl_HashEntry *hPtr;	/* Pointer to the hash table entry that refers
-				 * to this command. The hash table is either a
-				 * namespace's command table or an
-				 * interpreter's hidden command table. This
-				 * pointer is used to get a command's name
-				 * from its Tcl_Command handle. NULL means
-				 * that the hash table entry has been removed
-				 * already (this can happen if deleteProc
-				 * causes the command to be deleted or
-				 * recreated). */
-    Tcl_Namespace *nsPtr;	/* Points to the namespace containing this
-				 * command. */
-    int refCount;		/* 1 if in command hashtable plus 1 for each
-				 * reference from a CmdName TCL object
-				 * representing a command's name in a ByteCode
-				 * instruction sequence. This structure can be
-				 * freed when refCount becomes zero. */
-    int cmdEpoch;		/* Incremented to invalidate any references
-				 * that point to this command when it is
-				 * renamed, deleted, hidden, or exposed. */
-    CompileProc *compileProc;	/* Procedure called to compile command. NULL
-				 * if no compile proc exists for command. */
-    Tcl_ObjCmdProc *objProc;	/* Object-based command procedure. */
-    ClientData objClientData;	/* Arbitrary value passed to object proc. */
-    Tcl_CmdProc *proc;		/* String-based command procedure. */
-    ClientData clientData;	/* Arbitrary value passed to string proc. */
-    Tcl_CmdDeleteProc *deleteProc;
-				/* Procedure invoked when deleting command
-				 * to, e.g., free all client data. */
-    ClientData deleteData;	/* Arbitrary value passed to deleteProc. */
-    int flags;			/* Means that the command is in the process of
-				 * being deleted (its deleteProc is currently
-				 * executing). Other attempts to delete the
-				 * command should be ignored. */
-    ImportRef *importRefPtr;	/* List of each imported Command created in
-				 * another namespace when this command is
-				 * imported. These imported commands redirect
-				 * invocations back to this command. The list
-				 * is used to remove all those imported
-				 * commands when deleting this "real"
-				 * command. */
-    CommandTrace *tracePtr;	/* First in list of all traces set for this
-				 * command. */
-} Command;
-
-/*ARGSUSED*/
-Tcl_Namespace *
-Blt_GetCommandNamespace(Tcl_Command cmdToken)
-{
-    Command *cmdPtr = (Command *)cmdToken;
-
-    return (Tcl_Namespace *)cmdPtr->nsPtr;
-}
-
-Tcl_CallFrame *
-Blt_EnterNamespace(Tcl_Interp *interp, Tcl_Namespace *nsPtr)
-{
-    Tcl_CallFrame *framePtr;
-
-    framePtr = Blt_AssertMalloc(sizeof(Tcl_CallFrame));
-    if (Tcl_PushCallFrame(interp, framePtr, (Tcl_Namespace *)nsPtr, 0)
-	!= TCL_OK) {
-	Blt_Free(framePtr);
-	return NULL;
-    }
-    return framePtr;
-}
-
-void
-Blt_LeaveNamespace(Tcl_Interp *interp, Tcl_CallFrame *framePtr)
-{
-    Tcl_PopCallFrame(interp);
-    Blt_Free(framePtr);
-}
-
-int
-Blt_ParseObjectName(Tcl_Interp *interp, const char *path, 
-		    Blt_ObjectName *namePtr, unsigned int flags)
-{
-    char *last, *colon;
-
-    namePtr->nsPtr = NULL;
-    namePtr->name = NULL;
-    colon = NULL;
-
-    /* Find the last namespace separator in the qualified name. */
-    last = (char *)(path + strlen(path));
-    while (--last > path) {
-	if ((*last == ':') && (*(last - 1) == ':')) {
-	    last++;		/* just after the last "::" */
-	    colon = last - 2;
-	    break;
-	}
-    }
-    if (colon == NULL) {
-	namePtr->name = path;
-	if ((flags & BLT_NO_DEFAULT_NS) == 0) {
-	    namePtr->nsPtr = Tcl_GetCurrentNamespace(interp);
-	}
-	return TRUE;		/* No namespace designated in name. */
-    }
-
-    /* Separate the namespace and the object name. */
-    *colon = '\0';
-    if (path[0] == '\0') {
-	namePtr->nsPtr = Tcl_GetGlobalNamespace(interp);
-    } else {
-	namePtr->nsPtr = Tcl_FindNamespace(interp, (char *)path, NULL, 
-		(flags & BLT_NO_ERROR_MSG) ? 0 : TCL_LEAVE_ERR_MSG);
-    }
-    /* Repair the string. */    *colon = ':';
-
-    if (namePtr->nsPtr == NULL) {
-	return FALSE;		/* Namespace doesn't exist. */
-    }
-    namePtr->name =last;
-    return TRUE;
-}
-
-char *
-Blt_MakeQualifiedName(Blt_ObjectName *namePtr, Tcl_DString *resultPtr)
-{
-    Tcl_DStringInit(resultPtr);
-    if ((namePtr->nsPtr->fullName[0] != ':') || 
-	(namePtr->nsPtr->fullName[1] != ':') ||
-	(namePtr->nsPtr->fullName[2] != '\0')) {
-	Tcl_DStringAppend(resultPtr, namePtr->nsPtr->fullName, -1);
-    }
-    Tcl_DStringAppend(resultPtr, "::", -1);
-    Tcl_DStringAppend(resultPtr, (char *)namePtr->name, -1);
-    return Tcl_DStringValue(resultPtr);
-}
-
diff --git a/blt3.0/src/bltNsUtil.h b/blt3.0/src/bltNsUtil.h
deleted file mode 100644
index 00769f3..0000000
--- a/blt3.0/src/bltNsUtil.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * bltNsUtil.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef BLT_NS_UTIL_H
-#define BLT_NS_UTIL_H 1
-
-#ifndef TCL_NAMESPACE_ONLY
-#define TCL_NAMESPACE_ONLY TCL_GLOBAL_ONLY
-#endif
-
-#define NS_SEARCH_NONE		(0)
-#define NS_SEARCH_CURRENT	(1<<0)
-#define NS_SEARCH_GLOBAL	(1<<1)
-#define NS_SEARCH_BOTH		(NS_SEARCH_GLOBAL | NS_SEARCH_CURRENT)
-
-typedef struct {
-    const char *name;
-    Tcl_Namespace *nsPtr;
-} Blt_ObjectName;
-
-#define BLT_NO_DEFAULT_NS	(1<<0)
-#define BLT_NO_ERROR_MSG	(1<<1)
-
-#ifndef USE_TCL_STUBS
-
-BLT_EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name, 
-	Tcl_Namespace *nsPtr, int flags);
-/*
- * Namespace procedures not prototyped defined in Tcl.h 
- */
-BLT_EXTERN Tcl_Namespace *Tcl_GetCurrentNamespace(Tcl_Interp *interp);
-
-BLT_EXTERN Tcl_Namespace *Tcl_GetGlobalNamespace(Tcl_Interp *interp);
-
-BLT_EXTERN Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, 
-	const char *name, ClientData clientData, 
-	Tcl_NamespaceDeleteProc *nsDelProc);
-
-BLT_EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr);
-
-BLT_EXTERN Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, 
-	const char *name, Tcl_Namespace *context, int flags);
-
-BLT_EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
-	const char *name, int resetFlag);
-
-BLT_EXTERN Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, const char *name, 
-	Tcl_Namespace *contextNsPtr, int flags);
-
-BLT_EXTERN void Tcl_PopCallFrame(Tcl_Interp *interp);
-
-BLT_EXTERN int Tcl_PushCallFrame(Tcl_Interp *interp, Tcl_CallFrame *framePtr, 
-	Tcl_Namespace *nsPtr, int isProcCallFrame);
-
-#endif /* USE_TCL_STUBS */
-
-/* 
- * Auxillary procedures 
- */
-BLT_EXTERN Tcl_Namespace *Blt_GetVariableNamespace(Tcl_Interp *interp, 
-	const char *varName);
-
-BLT_EXTERN Tcl_Namespace *Blt_GetCommandNamespace(Tcl_Command cmdToken);
-
-BLT_EXTERN Tcl_CallFrame *Blt_EnterNamespace(Tcl_Interp *interp, 
-	Tcl_Namespace *nsPtr);
-
-BLT_EXTERN void Blt_LeaveNamespace(Tcl_Interp *interp, Tcl_CallFrame *framePtr);
-
-BLT_EXTERN int Blt_ParseObjectName(Tcl_Interp *interp, const char *name, 
-	Blt_ObjectName *objNamePtr, unsigned int flags);
-
-BLT_EXTERN char *Blt_MakeQualifiedName(Blt_ObjectName *objNamePtr, 
-	Tcl_DString *resultPtr);
-
-#endif /* BLT_NS_UTIL_H */
diff --git a/blt3.0/src/bltOldConfig.c b/blt3.0/src/bltOldConfig.c
deleted file mode 100644
index 3aa0ebc..0000000
--- a/blt3.0/src/bltOldConfig.c
+++ /dev/null
@@ -1,293 +0,0 @@
-
-/*
- * bltOldConfig.c --
- *
- * This module implements custom configuration options for the BLT
- * toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <stdarg.h>
-
-static int StringToPad(ClientData clientData, Tcl_Interp *interp, 
-	Tk_Window tkwin, const char *string, char *widgRec, int offset);
-static char *PadToString(ClientData clientData, Tk_Window tkwin, char *widgRec,
-	int offset, Tcl_FreeProc **freeProcPtr);
-
-Tk_CustomOption bltPadOption =
-{
-    StringToPad, PadToString, (ClientData)0
-};
-
-static int StringToDistance(ClientData clientData, Tcl_Interp *interp, 
-	Tk_Window tkwin, const char *string, char *widgRec, int flags);
-static char *DistanceToString(ClientData, Tk_Window, char *widgRec, int offset,
-	Tcl_FreeProc **freeProcPtr);
-
-Tk_CustomOption bltDistanceOption =
-{
-    StringToDistance, DistanceToString, (ClientData)PIXELS_NNEG
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPixels --
- *
- *	Like Tk_GetPixels, but checks for negative, zero.
- *	Can be PIXELS_POS, PIXELS_NNEG, or PIXELS_ANY.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetPixels(Tcl_Interp *interp, Tk_Window tkwin, const char *string, 
-	      int check, int *valuePtr)
-{
-    int length;
-
-    if (Tk_GetPixels(interp, tkwin, string, &length) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (length >= SHRT_MAX) {
-	Tcl_AppendResult(interp, "bad distance \"", string, "\": ",
-	    "too big to represent", (char *)NULL);
-	return TCL_ERROR;
-    }
-    switch (check) {
-    case PIXELS_NNEG:
-	if (length < 0) {
-	    Tcl_AppendResult(interp, "bad distance \"", string, "\": ",
-		"can't be negative", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-    case PIXELS_POS:
-	if (length <= 0) {
-	    Tcl_AppendResult(interp, "bad distance \"", string, "\": ",
-		"must be positive", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-    case PIXELS_ANY:
-	break;
-    }
-    *valuePtr = length;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToDistance --
- *
- *	Like TK_CONFIG_PIXELS, but adds an extra check for negative
- *	values.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StringToDistance(
-    ClientData clientData,	/* Indicated how to check distance */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    const char *string,		/* Pixel value string */
-    char *widgRec,		/* Widget record */
-    int offset)			/* Offset of pixel size in record */
-{
-    int *valuePtr = (int *)(widgRec + offset);
-    return Blt_GetPixels(interp, tkwin, string, (unsigned long)clientData, 
-	valuePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DistanceToString --
- *
- *	Returns the string representing the positive pixel size.
- *
- * Results:
- *	The pixel size string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static char *
-DistanceToString(
-    ClientData clientData,	/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget structure record */
-    int offset,			/* Offset in widget record */
-    Tcl_FreeProc **freeProcPtr)	/* Not used. */
-{
-    int value = *(int *)(widgRec + offset);
-    char *result;
-
-    result = Blt_AssertStrdup(Blt_Itoa(value));
-    *freeProcPtr = (Tcl_FreeProc *)Blt_Free;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringToPad --
- *
- *	Convert a string into two pad values.  The string may be in one of
- *	the following forms:
- *
- *	    n    - n is a non-negative integer. This sets both
- *		   pad values to n.
- *	  {n m}  - both n and m are non-negative integers. side1
- *		   is set to n, side2 is set to m.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interp->result.
- *
- * Side Effects:
- *	The padding structure passed is updated with the new values.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StringToPad(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window */
-    const char *string,		/* Pixel value string */
-    char *widgRec,		/* Widget record */
-    int offset)			/* Offset of pad in widget */
-{
-    Blt_Pad *padPtr = (Blt_Pad *)(widgRec + offset);
-    const char **argv;
-    int argc;
-    int pad, result;
-
-    if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if ((argc < 1) || (argc > 2)) {
-	Tcl_AppendResult(interp, "wrong # elements in padding list",
-	    (char *)NULL);
-	goto error;
-    }
-    if (Blt_GetPixels(interp, tkwin, argv[0], PIXELS_NNEG, &pad)
-	!= TCL_OK) {
-	goto error;
-    }
-    padPtr->side1 = pad;
-    if ((argc > 1) && (Blt_GetPixels(interp, tkwin, argv[1], PIXELS_NNEG, &pad)
-	    != TCL_OK)) {
-	goto error;
-    }
-    padPtr->side2 = pad;
-    result = TCL_OK;
-
-  error:
-    Blt_Free(argv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PadToString --
- *
- *	Converts the two pad values into a TCL list.  Each pad has two
- *	pixel values.  For vertical pads, they represent the top and bottom
- *	margins.  For horizontal pads, they're the left and right margins.
- *	All pad values are non-negative integers.
- *
- * Results:
- *	The padding list is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static char *
-PadToString(
-    ClientData clientData,	/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Structure record */
-    int offset,			/* Offset of pad in record */
-    Tcl_FreeProc **freeProcPtr)	/* Not used. */
-{
-    Blt_Pad *padPtr = (Blt_Pad *)(widgRec + offset);
-    char *result;
-    char string[200];
-
-    sprintf_s(string, 200, "%d %d", padPtr->side1, padPtr->side2);
-    result = Blt_AssertStrdup(string);
-    *freeProcPtr = (Tcl_FreeProc *)Blt_Free;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_OldConfigModified --
- *
- *      Given the configuration specifications and one or more option
- *	patterns (terminated by a NULL), indicate if any of the matching
- *	configuration options has been reset.
- *
- * Results:
- *      Returns 1 if one of the options has changed, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int Blt_OldConfigModified
-TCL_VARARGS_DEF(Tk_ConfigSpec *, arg1)
-{
-    va_list argList;
-    Tk_ConfigSpec *specs;
-    char *option;
-
-    specs = TCL_VARARGS_START(Tk_ConfigSpec *, arg1, argList);
-    while ((option = va_arg(argList, char *)) != NULL) {
-	Tk_ConfigSpec *specPtr;
-
-	for (specPtr = specs; specPtr->type != TK_CONFIG_END; specPtr++) {
-	    if ((Tcl_StringMatch(specPtr->argvName, option)) &&
-		(specPtr->specFlags & TK_CONFIG_OPTION_SPECIFIED)) {
-		va_end(argList);
-		return 1;
-	    }
-	}
-    }
-    va_end(argList);
-    return 0;
-}
-
diff --git a/blt3.0/src/bltOp.h b/blt3.0/src/bltOp.h
deleted file mode 100644
index 5887a46..0000000
--- a/blt3.0/src/bltOp.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_OpSpec --
- *
- * 	Structure to specify a set of operations for a TCL command.
- *      This is passed to the Blt_GetOp procedure to look
- *      for a function pointer associated with the operation name.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    const char *name;		/* Name of operation */
-    int minChars;		/* Minimum # characters to disambiguate */
-    void *proc;
-    int minArgs;		/* Minimum # args required */
-    int maxArgs;		/* Maximum # args required */
-    const char *usage;		/* Usage message */
-} Blt_OpSpec;
-
-typedef enum {
-    BLT_OP_ARG0,		/* Op is the first argument. */
-    BLT_OP_ARG1,		/* Op is the second argument. */
-    BLT_OP_ARG2,		/* Op is the third argument. */
-    BLT_OP_ARG3,		/* Op is the fourth argument. */
-    BLT_OP_ARG4			/* Op is the fifth argument. */
-
-} Blt_OpIndex;
-
-#define BLT_OP_BINARY_SEARCH	0
-#define BLT_OP_LINEAR_SEARCH	1
-
-BLT_EXTERN void *Blt_GetOpFromObj(Tcl_Interp *interp, int nSpecs, 
-	Blt_OpSpec *specs, int operPos, int objc, Tcl_Obj *const *objv, 
-	int flags);
-
diff --git a/blt3.0/src/bltPaintDraw.c b/blt3.0/src/bltPaintDraw.c
deleted file mode 100644
index 62c27a5..0000000
--- a/blt3.0/src/bltPaintDraw.c
+++ /dev/null
@@ -1,1464 +0,0 @@
-
-#ifdef notdef
-
-typedef struct {
-    int type;
-    union {
-	Blt_Gradient *gradientPtr;
-	Blt_Picture picture;	/* Picture used to tile background.  */
-    } background;
-    Blt_Pixel color1, color2;	/* Gradient colors. */
-} Paint;
-
-#endif
-
-typedef struct {
-    int left, right;
-} ScanLine;
-
-static ScanLine *
-MakeScanLines(size_t nLines)
-{
-    ScanLine *coords;
-    int i;
-
-    coords = Blt_AssertMalloc(sizeof(ScanLine) * nLines);
-    for(i = 0; i < nLines; i++) {
-	coords[i].left = INT_MAX;
-	coords[i].right = -INT_MAX;
-    }
-    return coords;
-}
-
-static void 
-AddEllipseCoord(ScanLine *coords, int x, int y)
-{
-    if (x < coords[y].left) {
-	coords[y].left = x;
-    } 
-    if (x > coords[y].right) {
-	coords[y].right = x;
-    }
-}
-
-static ScanLine *
-ComputeEllipseQuadrant(int a, int b)
-{
-    ScanLine *coords;
-    double t;
-    int dx, dy;
-    double a2, b2;
-    double p, px, py;
-    a2 = a * a;
-    b2 = b * b;
-    
-    dx = 0;
-    dy = b;
-    px = 0;			/* b2 * (dx + 1) */
-    py = (double)(a2 + a2) * dy;	/* a2 * (dy - 0.5) */
-
-    coords = MakeScanLines(b + 1);
-    if (coords == NULL) {
-	return NULL;
-    }
-    AddEllipseCoord(coords, dx, dy);
-
-    t = (b2 - (a2 * b) + (0.25 * a2));
-    p = (int)ROUND(t);
-    while (py > px) {
-	dx++;
-	px += b2 + b2;
-	if (dy <= 0) {
-	    continue;
-	}
-	if (p < 0) {
-	    p += b2 + px;
-	} else {
-	    dy--;
-	    py -= a2 + a2;
-	    p += b2 + px - py;
-	}
-	AddEllipseCoord(coords, dx, dy);
-    }
-    {
-	double dx2, dy2;
- 
-	dx2 = (dx + 0.5) * (dx + 0.5);
-	dy2 = (dy - 1) * (dy - 1);
-	t = (b2 * dx2 + a2 * dy2 - (a2 * b2));
-	p = (int)ROUND(t);
-    }
-    while (dy > 0) {
-	dy--;
-	py -= a2 + a2;
-	if (p > 0) {
-	    p += a2 - py;
-	} else {
-	    dx++;
-	    px += b2 + b2;
-	    p += a2 - py + px;
-	}
-	AddEllipseCoord(coords, dx, dy);
-    }
-    AddEllipseCoord(coords, dx, dy);
-    return coords;
-}
-
-static INLINE void
-MixColors(Blt_Pixel *bp, Blt_Pixel *colorPtr)
-{
-    if ((bp->Alpha == 0x00) || (colorPtr->Alpha == 0xFF)) {
-	bp->u32 = colorPtr->u32;
-    } else if (colorPtr->Alpha != 0x00) {
-	unsigned char beta;
-	int a, r, g, b, t;
-
-	/* beta = 1 - alpha */
-	beta = colorPtr->Alpha ^ 0xFF; 
-	r = colorPtr->Red   + imul8x8(beta, bp->Red, t);
-	g = colorPtr->Green + imul8x8(beta, bp->Green, t);
-	b = colorPtr->Blue  + imul8x8(beta, bp->Blue, t);
-	a = colorPtr->Alpha + imul8x8(beta, bp->Alpha, t);
-	bp->Red = (r > 255) ? 255 : ((r < 0) ? 0 : r);
-	bp->Green = (g > 255) ? 255 : ((g < 0) ? 0 : g);
-	bp->Blue = (b > 255) ? 255 : ((b < 0) ? 0 : b);
-	bp->Alpha = 0xFF;
-    } 
-}
-
-static void INLINE
-PaintPixel(Pict *destPtr, int x, int y, Blt_Pixel *colorPtr) 
-{
-    if ((x >= 0) && (x < destPtr->width) && (y >= 0) && (y < destPtr->height)) {
-	MixColors(Blt_PicturePixel(destPtr, x, y), colorPtr);
-    }
-}
-
-static void INLINE
-FillHorizontalLine(Pict *destPtr, int x1, int x2, int y, Blt_Pixel *colorPtr, 
-		   int blend)  
-{
-    if ((y >= 0) && (y < destPtr->height)) {
-	Blt_Pixel *dp, *dend;
-
-	if (x1 > x2) {
-	    int tmp;
-	    
-	    tmp = x1, x1 = x2, x2 = tmp;
-	}
-	x1 = MAX(x1, 0);
-	x2 = MIN(x2, destPtr->width - 1);
-	dp   = destPtr->bits + (y * destPtr->pixelsPerRow) + x1;
-	dend = destPtr->bits + (y * destPtr->pixelsPerRow) + x2;
-	if (blend) {
-	    for (/*empty*/; dp <= dend; dp++) {
-		MixColors(dp, colorPtr);
-	    }
-	} else {
-	    for (/*empty*/; dp < dend; dp++) {
-		dp->u32 = colorPtr->u32;
-	    }
-	}
-    }
-}
-
-static void INLINE 
-FillVerticalLine(Pict *destPtr, int x, int y1, int y2, Blt_Pixel *colorPtr, 
-		 int blend)  
-{
-    if ((x >= 0) && (x < destPtr->width)) {
-	Blt_Pixel *dp, *dend;
-
-	if (y1 > y2) {
-	    int tmp;
-	    
-	    tmp = y1, y1 = y2, y2 = tmp;
-	}
-	y1 = MAX(y1, 0);
-	y2 = MIN(y2, destPtr->height - 1);
-	dp   = destPtr->bits + (y1 * destPtr->pixelsPerRow) + x;
-	dend = destPtr->bits + (y2 * destPtr->pixelsPerRow) + x;
-	if (blend) {
-	    for (/*empty*/; dp <= dend; dp += destPtr->pixelsPerRow) {
-		MixColors(dp, colorPtr);
-	    }
-	} else {
-	    for (/*empty*/; dp <= dend; dp += destPtr->pixelsPerRow) {
-		dp->u32 = colorPtr->u32;
-	    }
-	}	    
-    }
-}
-
-static void
-PaintThickRoundedRectangle(
-    Blt_Picture picture,
-    int xOrigin, int yOrigin,	/* Upper left corner of rectangle. */
-    int w, int h, int r,
-    int lineWidth,
-    Blt_Pixel *colorPtr)
-{
-    Blt_Pixel fill, edge;
-    int x1, x2, y1, y2;
-    int blend = 1;
-
-    fill = PremultiplyAlpha(colorPtr, 255);
-    edge.u32 = 0xFF000000;
-    {
-	int d;
-
-	d = MIN(w, h) / 2;
-	if (r > d) {
-	    r = d;
-	}
-	if ((r > 0) && (r < lineWidth)) {
-	    r = lineWidth;
-	}
-    }
-#ifdef notdef
-    fprintf(stderr, "Paint Thick Rounded Rectangle\n");
-#endif
-    /* Compute the coordinates of the four corner radii. */
-    x1 = xOrigin + r;
-    y1 = yOrigin + r;
-    x2 = xOrigin + w - r - 1;
-    y2 = yOrigin + h - r - 1;
-
-    if (lineWidth > r) {
-	int left, right;
-	int dy;
-
-	/* Draw the extra width (not including the radius). */
-	left = xOrigin;
-	right = xOrigin + w - 1;
-	for (dy = 0; dy < (lineWidth - r); dy++) {
-	    FillHorizontalLine(picture, left, right, y1 + dy, &fill, blend);
-	    FillHorizontalLine(picture, left, right, y2 - dy, &fill, blend);
-	}
-    }
-
-    {
-	int y;
-	int left, right, midleft, midright, midtop, midbottom;
-	int mid;
-
-	left = xOrigin;
-	midleft = xOrigin + (lineWidth - 1);
-	right = xOrigin + w - 1;
-	midright = right - (lineWidth - 1);
-
-	mid = MAX(r, lineWidth - 1);
-	/* Draw the left/right edges of the interior rectangle */
-	if (lineWidth > r) {
-	    midtop = yOrigin + mid + 1;
-	    midbottom = yOrigin + h - mid - 1;
-	} else {
-	    midtop = yOrigin + mid;
-	    midbottom = yOrigin + h - mid;
-	}
-	for (y = midtop; y < midbottom; y++) {
-	    FillHorizontalLine(picture, left, midleft, y, &fill, blend);
-	    FillHorizontalLine(picture, midright, right, y, &fill, blend); 
-	}
-    }
-
-    if (r > 0) {
-	ScanLine *outer, *inner;
-	int dy;
-	int dx1, dx2;
-
-	lineWidth--;
-	outer = ComputeEllipseQuadrant(r, r);
-	inner = ComputeEllipseQuadrant(r - lineWidth, r - lineWidth);
- 
-	dy = 1;
-	if (lineWidth <= r) {
-	    /* Draw the bend from the left/right edge to each radius. */
-	    for (dy = 1; dy < (r - lineWidth); dy++) {
-		dx1 = outer[dy].right, dx2 = inner[dy].left;
-		FillHorizontalLine(picture, x1-dx1, x1-dx2, y1-dy, &fill,blend);
-		FillHorizontalLine(picture, x2+dx2, x2+dx1, y1-dy, &fill,blend);
-		FillHorizontalLine(picture, x1-dx1, x1-dx2, y2+dy, &fill,blend);
-		FillHorizontalLine(picture, x2+dx2, x2+dx1, y2+dy, &fill,blend);
-	    }
-	}
-	/* Draw the top/bottom bend from the line width to the radius */
-	for (/* empty */; dy <= r; dy++) {
-	    int dx;
-	    
-	    dx = outer[dy].right;
-#ifdef notdef
-	    fprintf(stderr, "r=%d, dx=%d w=%d x1=%d x2=%d\n", r, dx, w, x1, x2);
-	    fprintf(stderr, "x0=%d\n", xOrigin);
-#endif
-	    FillHorizontalLine(picture, x1 - dx, x2 + dx, y1 - dy, &fill,blend);
-	    FillHorizontalLine(picture, x1 - dx, x2 + dx, y2 + dy, &fill,blend);
-	}
-	Blt_Free(outer);
-	Blt_Free(inner);
-    }
-}
-
-static void
-PaintRoundedRectangle(
-    Blt_Picture picture,
-    int xOrigin, int yOrigin, 
-    int width, int height,
-    int r,
-    Blt_Pixel *colorPtr)
-{
-    Blt_Pixel fill;
-    int x1, x2, y1, y2; /* Centers of each corner */
-    int blend = 1;
-    {
-	int w2, h2;
-
-	/* Radius of each rounded corner can't be bigger than half the width
-	 * or height of the rectangle. */
-	w2 = width / 2;
-	h2 = height / 2;
-	if (r > w2) {
-	    r = w2;
-	}
-	if (r > h2) {
-	    r = h2;
-	}
-    }
-
-    x1 = xOrigin + r;
-    y1 = yOrigin + r;
-    x2 = xOrigin + width - r - 1;
-    y2 = yOrigin + height - r - 1;
-
-    fill = PremultiplyAlpha(colorPtr, 255);
-
-    {    
-	/* Rectangular interior. */
-	int left, right;
-	int y;
-
-	left = xOrigin;
-	right = xOrigin + width - 1;
-	for (y = y1; y <= y2; y++) {
-	    FillHorizontalLine(picture, left, right, y, &fill, blend); 
-	}
-    }
-    if (r > 0) {
-	ScanLine *outer;
-	int dy;
-
-	outer = ComputeEllipseQuadrant(r, r);
-	for (dy = 1; dy <= r; dy++) {
-	    int dx;
-	    
- 	    dx = outer[dy].right;
-	    FillHorizontalLine(picture, x1 - dx, x2 + dx, y1 - dy, &fill, blend);
-	    FillHorizontalLine(picture, x1 - dx, x2 + dx, y2 + dy, &fill, blend);
-	}
-	Blt_Free(outer);
-    }
-}
-#ifdef notdef
-static Pict *
-FilledCircle(int diam, Blt_Pixel *colorPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel edge, interior;
-    double t;
-    int r, r2;
-    int x, y;
-    int y1, y2;
-
-    diam |= 0x01;
-    r = diam / 2;
-    r2 = r * r;
-    destPtr = Blt_CreatePicture(diam, diam);
-    t = 0.0;
-    x = r;
-    interior = PremultiplyAlpha(color, 255);
-    HorizLine(destPtr, x - r, x + r, r, interior);    /* Center line */
-    y = 0;
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	edge = PremultiplyAlpha(color, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, r - x - 1, r + y, edge);
-	HorizLine(destPtr, r - x, r + x, r + y, interior);
-	PutPixel(destPtr, r + x + 1, r + y, edge);
-
-
-	PutPixel(destPtr, r - x - 1, r - y, edge);
-	HorizLine(destPtr, r - x, r + x, r - y, interior);
-	PutPixel(destPtr, r + x + 1, r - y, edge);
-
-	t = d;
-    }
-    y1 = r - y;
-    y2 = r + y; 
-    x = 0;
-    y = r;
-    t = 0;
-    VertLine(destPtr, r, 0, y1, interior);    /* Center line */
-    VertLine(destPtr, r, y2, r + r, interior);    /* Center line */
-    while (y > x) {
-	double z;
-	double d, q;
-
-	x++;
-	z = sqrt(r2 - (x * x));
-	d = floor(z) - z;
-	if (d < t) {
-	    y--;
-	}
-	q = FABS(d * 255.0);
-	edge = PremultiplyAlpha(color, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, r - x, r - y - 1, edge);
-	VertLine(destPtr, r - x, r - y, y1, interior); 
-	VertLine(destPtr, r - x, y2, r + y, interior); 
-	PutPixel(destPtr, r - x, r + y + 1, edge);
-
-	PutPixel(destPtr, r + x, r - y - 1, edge);
-	VertLine(destPtr, r + x, r - y, y1, interior); 
-	VertLine(destPtr, r + x, y2, r + y, interior); 
-	PutPixel(destPtr, r + x, r + y + 1, edge);
-
-	t = d;
-    }
-    return destPtr;
-}
-
-static Pict *
-FilledOval(int width, int height, Color color)
-{
-    Pict *destPtr;
-    Color edge, interior;
-    double t;
-    int r, r2;
-    int x, y;
-    int diam, offset;
-    int x1, x2, y1, y2;
-
-    t = 0.0;
-    interior = PremultiplyAlpha(color, 255);
-    if (width < height) {
-	diam = width;
-	diam |= 0x1;
-	r = diam / 2;
-	r2 = r * r;
-	width = diam;
-	offset = height - width;
-	destPtr = Blt_CreatePicture(width, height);
-	/* Fill the center rectangle */
-	y1 = r, y2 = height - r - 1;
-	for (y = y1; y <= y2; y++) {
-	    HorizLine(destPtr, 0, width - 1, y, interior);
-	}
-	x1 = x2 = r;
-    } else {
-	diam = height;
-	diam |= 0x1;
-	r = diam / 2;
-	r2 = r * r;
-	height = diam;
-	offset = width - height;
-	destPtr = Blt_CreatePicture(width, height);
-	y1 = y2 = r;
-	x1 = r, x2 = width - r - 1;
-	HorizLine(destPtr, 0, width - 1, r, interior);    /* Center line */
-	for (y = 0; y < y1; y++) {
-	    HorizLine(destPtr, x1, x2, y, interior);
-	}
-	for (y = y2; y < height; y++) {
-	    HorizLine(destPtr, x1, x2, y, interior);
-	}
-    }
-    y = 0;
-    x = r;
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	edge = PremultiplyAlpha(color, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, x1 - x - 1, y2 + y, edge); 
-	HorizLine(destPtr, x1 - x, x2 + x, y2 + y, interior);
-	PutPixel(destPtr, x2 + x + 1, y2 + y, edge);
-
-	PutPixel(destPtr, x1 - x - 1, y1 - y, edge);
-	HorizLine(destPtr, x1 - x, x2 + x, y1 - y, interior);
-	PutPixel(destPtr, x2 + x + 1, y1 - y, edge);
-	t = d;
-    }
-    x = 0;
-    y = r;
-    t = 0;
-    VertLine(destPtr, r, 0, y1, interior);    /* Center line */
-    VertLine(destPtr, r, y2, height - 1, interior);    /* Center line */
-    while (y > x) {
-	double z;
-	double d, q;
-
-	x++;
-	z = sqrt(r2 - (x * x));
-	d = floor(z) - z;
-	if (d < t) {
-	    y--;
-	}
-	q = FABS(d * 255.0);
-	edge = PremultiplyAlpha(color, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, x1 - x, y1 - y - 1, edge);
-	VertLine(destPtr, x1 - x, y1 - y, y1, interior); 
-	VertLine(destPtr, x1 - x, y2, y2 + y, interior); 
-	PutPixel(destPtr, x1 - x, y2 + y + 1, edge);
-
-	PutPixel(destPtr, x2 + x, y1 - y - 1, edge);
-	VertLine(destPtr, x2 + x, y1 - y, y1, interior); 
-	VertLine(destPtr, x2 + x, y2, y2 + y, interior); 
-	PutPixel(destPtr, x2 + x, y2 + y + 1, edge);
-
-	t = d;
-    }
-    return destPtr;
-}
-#endif
-
-static void
-PaintCircle3(Blt_Picture src, int x, int y, int r, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel edge, interior;
-    double t;
-    int r2;
-    int y1, y2;
-
-    r2 = r * r;
-    t = 0.0;
-    x = r;
-
-    interior.u32 = edge.u32 = colorPtr->u32;
-    /* Center line */
-    PutPixel(src, r - x, r, &edge);
-    PutPixel(src, r + x, r, &edge);
-    y = 0;
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned char)CLAMP(q);
-	edge.Alpha = a;
-	interior.Alpha = ~a;
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PaintPixel(src, r - x - 1, r + y, &interior);
-	PaintPixel(src, r + x + 1, r + y, &edge);
-
-	PaintPixel(src, r - x - 1, r - y, &edge);
-	PaintPixel(src, r + x + 1, r - y, &interior);
-
-	t = d;
-    }
-    y1 = r - y;
-    y2 = r + y; 
-    x = 0;
-    y = r;
-    t = 0;
-    interior.u32 = edge.u32 = colorPtr->u32;
-    VertLine(src, r, 0, y1, &edge);    /* Center line */
-    VertLine(src, r, y2, r + r, &edge);    
-    while (y > x) {
-	unsigned char a;
-	double z;
-	double d, q;
-
-	x++;
-	z = sqrt(r2 - (x * x));
-	d = floor(z) - z;
-	if (d < t) {
-	    y--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	edge.Alpha = a;
-	interior.Alpha = ~a;
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PaintPixel(src, r - x, r - y - 1, &edge);
-	PaintPixel(src, r - x, r + y + 1, &interior);
-
-	PaintPixel(src, r + x, r - y - 1, &interior);
-	PaintPixel(src, r + x, r + y + 1, &edge);
-
-	t = d;
-    }
-}
-
-static INLINE float 
-sqr(float x) 
-{
-    return x * x;
-}
-    
-static void
-PaintCircle4(Pict *srcPtr, int x, int y, int r, Blt_Pixel *colorPtr)
-{
-    int cx, cy;
-    int x1, x2, y1, y2;
-    int Fact;
-    float RPF2, RMF2;
-    float sqY, sqDist;
-    float *sqX;
-    float feather = 4.0;
-    Blt_Pixel *srcRowPtr;
-
-    cx = x, cy = y;
-    // Determine some helpful values (singles)
-    RPF2 = sqr(r + feather/2);
-    RMF2 = sqr(r - feather/2);
-
-    // Determine bounds:
-    x1 = MAX(floor(cx - RPF2), 0);
-    x2 = MIN(ceil (cx + RPF2), srcPtr->width - 1);
-    y1 = MAX(floor(cy - RPF2), 0);
-    y2 = MIN(ceil (cy + RPF2), srcPtr->height - 1);
-
-    // Optimization run: find squares of X first
-    sqX = Blt_AssertMalloc(sizeof(float) * (x2 - x1 + 1));
-    for (x = x1; x <= x2; x++) {
-	sqX[x - x1] = sqr(x - cx);
-    }
-    // Loop through Y values
-    srcRowPtr = srcPtr->bits + (y1 * srcPtr->pixelsPerRow) + x1;
-    for (y = y1; y <= y2; y++) {
-	Blt_Pixel *sp;
-
-	sqY = sqr(y - cy);
-	// Loop through X values
-	sp = srcRowPtr;
-	for (x = x1; x <= x2; x++, sp++) {
-	    // determine squared distance from center for this pixel
-	    sqDist = sqY + sqX[x - x1];
-	    // inside inner circle? Most often..
-	    if (sqDist < RMF2) {
-		// inside the inner circle.. just give the scanline the
-		// new color
-		sp->u32 = colorPtr->u32;
-	    } else if (sqDist < RPF2) {	// inside outer circle?
-		unsigned int a;
-		// We are inbetween the inner and outer bound, now
-		// mix the color
-		Fact = ROUND(((r - sqrt(sqDist)) * 2 / feather)*127.5 + 127.5);
-		// just in case limit to [0, 255]
-		a = MAX(0, MIN(Fact, 255));
-#ifndef notdef
-		BlendPixel(sp, colorPtr, a);
-#else
-		sp->u32 = colorPtr->u32;
-		sp->Alpha = a;
-#endif
-	    } else {
-		/* do nothing */
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    srcPtr->flags &= ~BLT_PIC_ASSOCIATED_COLORS;
-    Blt_Free(sqX);
-}
-
-static Pict *
-xFilledCircle(int diam, Blt_Pixel *colorPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel edge, interior;
-    double t;
-    int r, r2;
-    int x, y;
-    int y1, y2;
-
-    diam |= 0x01;
-    r = diam / 2;
-    r2 = r * r;
-    destPtr = Blt_CreatePicture(diam, diam);
-    t = 0.0;
-    x = r;
-    interior = PremultiplyAlpha(colorPtr, 255);
-    HorizLine(destPtr, x - r, x + r, r, &interior);    /* Center line */
-    y = 0;
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	edge = PremultiplyAlpha(colorPtr, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, r - x - 1, r + y, &edge);
-	HorizLine(destPtr, r - x, r + x, r + y, &interior);
-	PutPixel(destPtr, r + x + 1, r + y, &edge);
-
-
-	PutPixel(destPtr, r - x - 1, r - y, &edge);
-	HorizLine(destPtr, r - x, r + x, r - y, &interior);
-	PutPixel(destPtr, r + x + 1, r - y, &edge);
-
-	t = d;
-    }
-    y1 = r - y;
-    y2 = r + y; 
-    x = 0;
-    y = r;
-    t = 0;
-    VertLine(destPtr, r, 0, y1, &interior);    /* Center line */
-    VertLine(destPtr, r, y2, r + r, &interior);    /* Center line */
-    while (y > x) {
-	double z;
-	double d, q;
-
-	x++;
-	z = sqrt(r2 - (x * x));
-	d = floor(z) - z;
-	if (d < t) {
-	    y--;
-	}
-	q = FABS(d * 255.0);
-	edge = PremultiplyAlpha(colorPtr, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PutPixel(destPtr, r - x, r - y - 1, &edge);
-	VertLine(destPtr, r - x, r - y, y1, &interior); 
-	VertLine(destPtr, r - x, y2, r + y, &interior); 
-	PutPixel(destPtr, r - x, r + y + 1, &edge);
-
-	PutPixel(destPtr, r + x, r - y - 1, &edge);
-	VertLine(destPtr, r + x, r - y, y1, &interior); 
-	VertLine(destPtr, r + x, y2, r + y, &interior); 
-	PutPixel(destPtr, r + x, r + y + 1, &edge);
-
-	t = d;
-    }
-    return destPtr;
-}
-
-static void
-FilledOval(Pict *destPtr, int destX, int destY, int ovalWidth, int ovalHeight, 
-	   Blt_Pixel *colorPtr)
-{
-    Blt_Pixel edge, interior;
-    double t;
-    int r, r2;
-    int x, y;
-    int diam, offset;
-    int x1, x2, y1, y2;
-    int blend = 1;
-    t = 0.0;
-
-    interior = PremultiplyAlpha(colorPtr, 255);
-    if (ovalWidth < ovalHeight) {
-	diam = ovalWidth;
-	diam |= 0x1;
-	r = diam / 2;
-	r2 = r * r;
-	ovalWidth = diam;
-
-	offset = ovalHeight - ovalWidth;
-
-	/* Fill the center rectangle */
-	x1 = destX;
-	x2 = destX + ovalWidth - 1;
-	y1 = destY + r;
-	y2 = destY + ovalHeight - r - 1;
-	for (y = y1; y <= y2; y++) {
-	    FillHorizontalLine(destPtr, x1, x2, y, &interior, blend);
-	}
-	x1 = x2 = r;
-    } else if (ovalWidth > ovalHeight) {
-	diam = ovalHeight;
-	diam |= 0x1;
-	r = diam / 2;
-	r2 = r * r;
-	ovalHeight = diam;
-	offset = ovalWidth - ovalHeight;
-	y1 = y2 = destY + r;
-	x1 = destX + r, x2 = destY + ovalWidth - r - 1;
-	FillHorizontalLine(destPtr, destX, destX + ovalWidth - 1, y1, 
-			   &interior, blend);
-	for (y = destY; y < y1; y++) {
-	    FillHorizontalLine(destPtr, x1, x2, y, &interior, blend);
-	}
-	for (y = y2; y < destY + ovalHeight; y++) {
-	    FillHorizontalLine(destPtr, x1, x2, y, &interior, blend);
-	}
-    } else {
-	diam = ovalWidth;
-	diam |= 0x1;
-	ovalHeight = ovalWidth = diam;
-	r = diam / 2;
-	r2 = r * r;
-	/* Fill the center rectangle */
-	x1 = destX;
-	x2 = destX + ovalWidth - 1;
-	y1 = destY + r;
-	y2 = destY + ovalHeight - r - 1;
-    }
-    y = 0;
-    x = r;
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	edge = PremultiplyAlpha(colorPtr, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PaintPixel(destPtr, x1 - x - 1, y2 + y, &edge); 
-	FillHorizontalLine(destPtr, x1 - x, x2 + x, y2 + y, &interior, blend);
-	PaintPixel(destPtr, x2 + x + 1, y2 + y, &edge);
-
-	PaintPixel(destPtr, x1 - x - 1, y1 - y, &edge);
-	FillHorizontalLine(destPtr, x1 - x, x2 + x, y1 - y, &interior, blend);
-	PaintPixel(destPtr, x2 + x + 1, y1 - y, &edge);
-	t = d;
-    }
-    x = 0;
-    y = r;
-    t = 0;
-
-    FillVerticalLine(destPtr, destX + r, destY, y1, &interior, blend);
-    FillVerticalLine(destPtr, destX + r, y2, destY + ovalHeight - 1, &interior, 
-		     blend);
-    while (y > x) {
-	double z;
-	double d, q;
-
-	x++;
-	z = sqrt(r2 - (x * x));
-	d = floor(z) - z;
-	if (d < t) {
-	    y--;
-	}
-	q = FABS(d * 255.0);
-	edge = PremultiplyAlpha(colorPtr, (unsigned int)CLAMP(q));
-
-	/* By symmetry we can fill upper and lower scan lines. */
-	PaintPixel(destPtr, x1 - x, y1 - y - 1, &edge);
-	FillVerticalLine(destPtr, x1 - x, y1 - y, y1, &interior, blend); 
-	FillVerticalLine(destPtr, x1 - x, y2, y2 + y, &interior, blend); 
-	PaintPixel(destPtr, x1 - x, y2 + y + 1, &edge);
-
-	PaintPixel(destPtr, x2 + x, y1 - y - 1, &edge);
-	FillVerticalLine(destPtr, x2 + x, y1 - y, y1, &interior, blend); 
-	FillVerticalLine(destPtr, x2 + x, y2, y2 + y, &interior, blend); 
-	PaintPixel(destPtr, x2 + x, y2 + y + 1, &edge);
-
-	t = d;
-    }
-}
-
-static void 
-PaintArc(Pict *destPtr, int x1, int y1, int x2, int y2, int lineWidth, 
-	 Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *dp;
-    double t;
-    int r2;
-    int radius;
-    int dx, dy;
-    int x, y;
-    int xoff, yoff;
-    int fill = 1;
-
-    t = 0.0;
-    dx = x2 - x1;
-    dy = y2 - y1;
-    radius = MIN(dx, dy) / 2;
-    xoff = x1;
-    yoff = y1;
-    x = radius;
-    y = 0;
-    dp = Blt_PicturePixel(destPtr, x + xoff - 1, y + yoff);
-    dp->u32 = colorPtr->u32;
-    r2 = radius * radius;
-    if (fill) {
-	PaintLineSegment(destPtr, x1, y + yoff, x + xoff - 2, y + yoff, 1, 
-			 colorPtr);
-    }
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	dp = Blt_PicturePixel(destPtr, x + xoff, y + yoff);
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	BlendPixel(dp, colorPtr, a);
-	dp--;			/* x - 1 */
-	a = (unsigned int)CLAMP(255.0 - q);
-	BlendPixel(dp, colorPtr, a);
-	t = d;
-	x1++;
-	if (fill) {
-	    PaintLineSegment(destPtr, x1, y + yoff, x + xoff - 1, y + yoff, 1, 
-			     colorPtr);
-	}
-    }
-}
-
-static void
-PaintFilledCircle(Pict *destPtr, int x, int y, int r, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *destRowPtr;
-    Blt_Pixel fill;
-    int dy, d2;
-    int inner, outer;
-    int count;
-
-    count = 0;
-
-    inner = (r - 1) * (r - 1);
-    outer = (r + 1) * (r + 1);
-
-    fill = PremultiplyAlpha(colorPtr, 255);
-    destRowPtr = destPtr->bits + ((y - r) * destPtr->pixelsPerRow) + (x - r);
-    for (y = -r; y <= r; y++) {
-	Blt_Pixel *dp, *dend;
-	int dy2;
-
-	dy2 = y * y;
-	for (dp = destRowPtr, dend = dp + destPtr->width, x = -r; 
-	     (x <= r) && (dp < dend); x++, dp++) {
-	    double d, z;
-	    int d2;
-
-	    d2 = dy2 + x * x;
-	    if (d2 > outer) {
-		continue;
-	    } 
-	    if (d2 < inner) {
-		MixColors(dp, &fill); /* Interior */
-		continue;
-	    }
-	    z = (double)r - sqrt((double)d2);
-	    count++;
-	    if (z > 1.0) {
-		MixColors(dp, &fill); /* Interior */
-	    } else if (z > 0.0) {
-		double q;
-		unsigned char a;
-		Blt_Pixel edge;
-
-		q = z * 255.0;
-		a = (unsigned int)CLAMP(q);	
-		edge = PremultiplyAlpha(colorPtr, a);
-		MixColors(dp, &edge); /* Edge */
-	    }
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-#ifdef notdef
-    fprintf(stderr, "%d pixels %d sqrts\n", (r + r + 1) * (r + r + 1), count);
-#endif
-}
-
-static void
-PaintThinCircle(Pict *destPtr, int x, int y, int r, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel edge, fill;
-    double r2;
-    double t;
-    int dx, dy;
-
-    fill = PremultiplyAlpha(colorPtr, 255);
-
-    PaintPixel(destPtr, x, y + r - 1, &fill);
-    PaintPixel(destPtr, x, y - r + 1, &fill);
-    PaintPixel(destPtr, x + r - 1, y, &fill);
-    PaintPixel(destPtr, x - r + 1, y, &fill);
-
-    r2 = r * r;
-
-    dx = r, dy = 0;
-    t = 0.0;
-    while (dx > dy) {
-	double z;
-	double dist;
-	double d, q;
-	unsigned char a;
-
-	dy++;
-	z = sqrt(r2 - (dy * dy));
-	d = floor(z) - z;
-	if (d < t) {
-	    dx--;
-	}
-	dist = sqrt((dx * dx) + (dy * dy));
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);	
-	edge = PremultiplyAlpha(colorPtr, a);
-	fill = PremultiplyAlpha(colorPtr, ~a);
-
-	/* By symmetry we can add pixels in 4 octants. */
-	PaintPixel(destPtr, x + dx,     y + dy, &edge); 
-	PaintPixel(destPtr, x + dx - 1, y + dy, &fill); 
-	PaintPixel(destPtr, x + dx,     y - dy, &edge);
-	PaintPixel(destPtr, x + dx - 1, y - dy, &fill); 
-	PaintPixel(destPtr, x - dx,     y + dy, &edge);
-	PaintPixel(destPtr, x - dx + 1, y + dy, &fill); 
-	PaintPixel(destPtr, x - dx,     y - dy, &edge);
-	PaintPixel(destPtr, x - dx + 1, y - dy, &fill); 
-	t = d;
-    }
-    
-    dx = 0, dy = r;
-    t = 0.0;
-    while (dy > dx) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	dx++;
-	z = sqrt(r2 - (dx * dx));
-	d = floor(z) - z;
-	if (d < t) {
-	    dy--;
-	}
-	q = FABS(d * 255.0);
-	a = (unsigned char)CLAMP(q);
-	edge = PremultiplyAlpha(colorPtr, a);
-	fill = PremultiplyAlpha(colorPtr, ~a);
-
-	PaintPixel(destPtr, x + dx, y + dy, &edge); 
-	PaintPixel(destPtr, x + dx, y + dy - 1, &fill); 
-	PaintPixel(destPtr, x - dx, y + dy, &edge); 
-	PaintPixel(destPtr, x - dx, y + dy - 1, &fill); 
-	PaintPixel(destPtr, x + dx, y - dy, &edge); 
-	PaintPixel(destPtr, x + dx, y - dy + 1, &fill); 
-	PaintPixel(destPtr, x - dx, y - dy, &edge); 
-	PaintPixel(destPtr, x - dx, y - dy + 1, &fill); 
-	t = d;
-    }
-}
-
-
-static void
-PaintThinEllipse(
-    Pict *destPtr, 
-    int x, int y, int a, int b, 
-    Blt_Pixel *colorPtr, 
-    int blend)
-{
-    ScanLine *coords;
-    Blt_Pixel fill;
-    int dy;
-    int dx1, dx2;
-
-    coords = ComputeEllipseQuadrant(a, b);
-    if (blend) {
-	fill = PremultiplyAlpha(colorPtr, 255);
-    } else {
-	fill.u32 = colorPtr->u32;
-    }
-    if (coords == NULL) {
-	return;
-    }
-    dx1 = coords[0].right;
-    dx2 = coords[0].left;
-    FillHorizontalLine(destPtr, x + dx2, x + dx1, y, &fill, blend);
-    FillHorizontalLine(destPtr, x - dx1, x - dx2, y, &fill, blend);
-    dx1 = coords[b].right;
-    FillHorizontalLine(destPtr, x - dx1, x + dx1, y - b, &fill, blend);
-    FillHorizontalLine(destPtr, x - dx1, x + dx1, y + b, &fill, blend);
-    for (dy = 1; dy < b; dy++) {
-	dx1 = coords[dy].right;
-	dx2 = coords[dy].left;
-	FillHorizontalLine(destPtr, x + dx2, x + dx1, y - dy, &fill, blend);
-	FillHorizontalLine(destPtr, x + dx2, x + dx1, y + dy, &fill, blend);
-	FillHorizontalLine(destPtr, x - dx1, x - dx2, y - dy, &fill, blend);
-	FillHorizontalLine(destPtr, x - dx1, x - dx2, y + dy, &fill, blend);
-    }
-    Blt_Free(coords);
-}
-
-static void
-PaintThickEllipse(
-    Blt_Picture picture, 
-    int x, int y,		/* Center of the ellipse. */
-    int a,			/* Half the width of the ellipse. */
-    int b,			/* Half the height of the ellipse. */
-    int lineWidth,		/* Line width of the ellipse. Must be 1 or
-				 * greater. */
-    Blt_Pixel *colorPtr,
-    int blend)
-{
-    ScanLine *outer, *inner;
-    Blt_Pixel fill;
-    int dy;
-    int dx1, dx2;
-
-    lineWidth--;
-    outer = ComputeEllipseQuadrant(a, b);
-    if (outer == NULL) {
-	return;
-    }
-    inner = ComputeEllipseQuadrant(a - lineWidth, b - lineWidth);
-    if (blend) {
-	fill = PremultiplyAlpha(colorPtr, 255);
-    } else {
-	fill.u32 = colorPtr->u32;
-    }
-    dx1 = outer[0].right;
-    dx2 = inner[0].left;
-    FillHorizontalLine(picture, x + dx2, x + dx1, y, &fill, blend);
-    FillHorizontalLine(picture, x - dx1, x - dx2, y, &fill, blend);
-    for (dy = 1; dy < (b - lineWidth); dy++) {
-	dx1 = outer[dy].right;
-	dx2 = inner[dy].left;
-	FillHorizontalLine(picture, x + dx2, x + dx1, y - dy, &fill, blend);
-	FillHorizontalLine(picture, x + dx2, x + dx1, y + dy, &fill, blend);
-	FillHorizontalLine(picture, x - dx1, x - dx2, y - dy, &fill, blend);
-	FillHorizontalLine(picture, x - dx1, x - dx2, y + dy, &fill, blend);
-    }
-    for (/* empty */; dy <= b; dy++) {
-	int dx;
-
-	dx = outer[dy].right;
-	FillHorizontalLine(picture, x - dx, x + dx, y + dy, &fill, blend);
-	FillHorizontalLine(picture, x - dx, x + dx, y - dy, &fill, blend);
-    }
-    Blt_Free(outer);
-    Blt_Free(inner);
-}
-
-
-static void
-PaintFilledEllipse(
-    Blt_Picture picture, 
-    int x, int y,		/* Center of the ellipse. */
-    int a,			/* Half the width of the ellipse. */
-    int b,			/* Half the height of the ellipse. */
-    Blt_Pixel *colorPtr,
-    int blend)
-{
-    ScanLine *coords;
-    Blt_Pixel fill;
-    int dx, dy;
-
-    coords = ComputeEllipseQuadrant(a, b);
-    if (blend) {
-	fill = PremultiplyAlpha(colorPtr, 255);
-    } else {
-	fill.u32 = colorPtr->u32;
-    }
-    if (coords == NULL) {
-	return;
-    }
-    FillHorizontalLine(picture, x - a, x + a, y, &fill, blend);
-    for (dy = 1; dy <= b; dy++) {
-	dx = coords[dy].right;
-	FillHorizontalLine(picture, x - dx, x + dx, y + dy, &fill, blend);
-	FillHorizontalLine(picture, x - dx, x + dx, y - dy, &fill, blend);
-    }
-    Blt_Free(coords);
-}
-
-static void
-PaintEllipse(
-    Blt_Picture picture, 
-    int x, int y,		/* Center of the ellipse. */
-    int a,			/* Half the width of the ellipse. */
-    int b,			/* Half the height of the ellipse. */
-    int lineWidth,		/* Line width of the ellipse.  If zero,
-				 * then draw a solid filled ellipse. */
-    Blt_Pixel *colorPtr,
-    int blend)
-{
-    if ((lineWidth >= a) || (lineWidth >= b)) {
-	lineWidth = 0;
-    }
-    if (lineWidth < 1) {
-	PaintFilledEllipse(picture, x, y, a, b, colorPtr, blend);
-    } else {
-	PaintThickEllipse(picture, x, y, a, b, lineWidth, colorPtr, blend);
-    }
-}
-
-static void
-PaintEllipseAA(
-    Blt_Picture picture, 
-    int x, int y,		/* Center of the ellipse. */
-    int a,			/* Half the width of the ellipse. */
-    int b,			/* Half the height of the ellipse. */
-    int lineWidth,		/* Line thickness of the ellipse.  If zero,
-				 * then draw a solid filled ellipse. */
-    Blt_Pixel *colorPtr)
-{
-    PictRegion region;
-    Blt_Picture big;
-    int nSamples = 3; 
-    int ellipseWidth, ellipseHeight;
-    int blend = 1;
-
-    if ((lineWidth >= a) || (lineWidth >= b)) {
-	lineWidth = 0;
-    }
-    ellipseWidth = a + a + 3;
-    ellipseHeight = b + b + 3;
-    region.x = x - (a + 1);
-    region.y = y - (b + 1);
-    region.w = ellipseWidth;
-    region.h = ellipseHeight;
-    
-    if (!Blt_AdjustRegionToPicture(picture, &region)) {
-	return;			/* Ellipse is totally clipped. */
-    }
-    /* Scale the region forming the bounding box of the ellipse into a new
-     * picture. The bounding box is scaled by *nSamples* times. */
-    big = Blt_CreatePicture(ellipseWidth * nSamples, ellipseHeight * nSamples);
-    if (big != NULL) {
-	Blt_Picture tmp;
-	int cx, cy;
-	Blt_Pixel color;
-
-	cx = a + 1;
-	cy = b + 1;
-	/* Now draw an ellipse scaled by the same amount. The center of the
-	 * ellipse is the center of the picture. */
-	color.u32 = 0x00000000;
-	Blt_BlankPicture(big, &color);
-	color.u32 = 0xFF000000;
-	PaintEllipse(big, 
-	    cx * nSamples,	/* Center of ellipse. */
-	    cy * nSamples, 
-            a * nSamples,	
-            b * nSamples, 
-            lineWidth * nSamples, /* Scaled line width. */
-		&color,
-		blend); 
-	    
-	/* Reduce the picture back to the original size using a simple box
-	 * filter for smoothing. */
-	tmp = Blt_CreatePicture(ellipseWidth, ellipseHeight);
-	Blt_ResamplePicture(tmp, big, bltBoxFilter, bltBoxFilter);
-	Blt_FreePicture(big);
-	Blt_ApplyColorToPicture(tmp, colorPtr);
-	/* Replace the bounding box in the original with the new. */
-	Blt_BlendPictures(picture, tmp, 0, 0, region.w, region.h, 
-		region.x, region.y);
-	Blt_FreePicture(tmp);
-    }
-}
-
-static void
-PaintCircle(
-    Blt_Picture picture, 
-    int x, int y,		/* Center of the circle in picture. */
-    int r,			/* Radius of the circle. */
-    int lineWidth,		/* Line width of the circle.  */
-    Blt_Pixel *colorPtr)
-{
-    int blend = 1;
-    if (lineWidth >= r) {
-	lineWidth = 0;
-    }
-    if (lineWidth < 1) {
-	PaintFilledEllipse(picture, x, y, r, r, colorPtr, blend);
-    } else if (lineWidth == 1) {
-	PaintThinEllipse(picture, x, y, r, r, colorPtr, blend);
-    } else {
-	PaintThickEllipse(picture, x, y, r, r, lineWidth, colorPtr, blend);
-    }
-}
-
-
-static void
-PaintRectangle(
-    Blt_Picture picture, 
-    int x, int y,		/* Upper left corner of rectangle. */
-    int width, int height,	/* Dimension of rectangle. */
-    int r,			/* Radius of rounded corner. If zero, draw
-				 * square corners. */
-    int lineWidth,		/* Line width of the rectangle.  If zero, then
-				 * draw a solid fill rectangle. */
-    Blt_Pixel *colorPtr)
-{
-    if (((lineWidth*2) >= width) || ((lineWidth*2) >= height)) {
-	lineWidth = 0;		/* Paint solid rectangle instead.*/
-    }
-    if (lineWidth == 0) {
-	PaintRoundedRectangle(picture, x, y, width, height, r, colorPtr);
-    } else {
-	PaintThickRoundedRectangle(picture, x, y, width, height, r, 
-		lineWidth, colorPtr);
-    }
-}
-
-static void
-PaintRectangleAA(
-    Blt_Picture picture, 
-    int x, int y,			/* Upper left corner of rectangle. */
-    int w, int h,			/* Dimension of rectangle. */
-    int r,				/* Radius of rounded corner. If zero,
-					 * draw square corners. */
-    int lineWidth,			/* Line width of the rectangle.  If
-					 * zero, then draw a solid fill
-					 * rectangle. */
-    Blt_Pixel *colorPtr)
-{
-    Blt_Picture big;			/* Super-sampled background. */
-    int nSamples = 4; 
-    Blt_Picture tmp;
-    int offset = 4;
-    Blt_Pixel color;
-
-    if (((lineWidth*2) >= w) || ((lineWidth*2) >= h)) {
-	lineWidth = 0;			/* Paint solid rectangle instead.*/
-    }
-    if (r < 0) {
-	PaintRectangle(picture, x, y, w, h, r, lineWidth, colorPtr);
-	return;
-    }
-    /* 
-     * Scale the region forming the bounding box of the ellipse into a new
-     * picture. The bounding box is scaled by *nSamples* times.
-     */
-    big = Blt_CreatePicture((w+2*offset) * nSamples, 
-			    (h+2*offset) * nSamples); 
-    color.u32 = 0x00;
-    Blt_BlankPicture(big, &color);
-    if (big == NULL) {
-	return;
-    }
-    PaintRectangle(big,			/* Contains super-sampled original
-					 * background. */
-		   0, 0,
-		   w * nSamples,	/* Scaled width */
-		   h * nSamples,	/* Scaled height */
-		   r * nSamples,	/* Scaled radius. */
-		   lineWidth * nSamples, /* Scaled line width. */
-		   colorPtr); 
-	    
-   /* Reduce the picture back to its original size using a simple box
-    * filter for smoothing. */
-   tmp = Blt_CreatePicture(w+2*offset, h+2*offset);
-   Blt_ResamplePicture(tmp, big, bltBoxFilter, bltBoxFilter);
-	
-   /* Replace the bounding box in the original with the new. */
-   Blt_BlendPictures(picture, tmp, 0, 0, w+offset, h+offset, x, y);
-   Blt_FreePicture(big);
-   Blt_FreePicture(tmp);
-}
-
-static void
-PaintRectangleShadow(
-    Blt_Picture picture, 
-    int x, int y,		/* Upper left corner of rectangle. */
-    int w, int h,		/* Dimension of rectangle. */
-    int r,			/* Radius of rounded corner. If zero, draw
-				 * square corners. */
-    int lineWidth,
-    Shadow *shadowPtr)
-{
-    int dw, dh;
-    Blt_Picture blur, tmp;
-    Blt_Pixel color;
-
-    dw = (w + shadowPtr->offset*2);
-    dh = (h + shadowPtr->offset*2);
-    blur = Blt_CreatePicture(dw, dh);
-    color.u32 = 0x00;
-    Blt_BlankPicture(blur, &color);
-    color.Alpha = shadowPtr->alpha;
-#ifdef notdef
-    /* 
-     * draw the rectangle.
-     * blur into a slightly bigger picture (for blur width).
-     * mask off original rectangle, leaving fringe blur.
-     * blend into destination.
-     */
-    tmp = Blt_CreatePicture(dw, dh);
-    color.u32 = 0x00;
-    Blt_BlankPicture(tmp, &color);
-    color.Alpha = 0xFF;
-    PaintRectangle(tmp, 0, 0, w, h, r, lineWidth, &color);
-    Blt_CopyPictureBits(blur, tmp, 0, 0, w, h, shadowPtr->offset*2, 
-			shadowPtr->offset*2);
-    Blt_BlurPicture(blur, blur, shadowPtr->offset);
-    color.u32 = 0x00;
-    Blt_MaskPicture(blur, tmp, 0, 0, w, h, 0, 0, &color);
-    Blt_BlendPictures(picture, blur, 0, 0, dw, dh, x, y);
-    Blt_FreePicture(blur);
-#else
-    PaintRectangle(blur, shadowPtr->offset, shadowPtr->offset, w, h, r, 
-		   lineWidth, &color);
-    Blt_BlurPicture(blur, blur, shadowPtr->offset/2);
-    Blt_BlendPictures(picture, blur, 0, 0, dw, dh, x, y);
-    Blt_FreePicture(blur);
-#endif
-}
-
-void
-Blt_PaintRectangle(
-    Blt_Picture picture, 
-    int x, int y,		/* Upper left corner of rectangle. */
-    int w, int h,		/* Dimension of rectangle. */
-    int r,			/* Radius of rounded corner. If zero, draw
-				 * square corners. */
-    int lineWidth,		/* Line width of the rectangle.  If zero, then
-				 * draw a solid fill rectangle. */
-    Blt_Pixel *colorPtr)
-{
-    PaintRectangle(picture, x, y, w, h, r, lineWidth, colorPtr);
-}
diff --git a/blt3.0/src/bltPainter.c b/blt3.0/src/bltPainter.c
deleted file mode 100644
index eb772b4..0000000
--- a/blt3.0/src/bltPainter.c
+++ /dev/null
@@ -1,968 +0,0 @@
-
-/*
- * bltPainter.c --
- *
- * This module implements generic painting procedures for pictures in
- * the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the Tk
- * library distrubution.  The photo image type was designed and implemented by
- * Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#include "bltInt.h"
-#include "bltHash.h"
-#include "bltPicture.h"
-#include "bltPainterInt.h"
-
-typedef struct _Blt_Picture Picture;
-
-#define CFRAC(i, n)	((i) * 65535 / (n))
-/* As for CFRAC, but apply exponent of g. */
-#define CGFRAC(i, n, g)	((int)(65535 * pow((double)(i) / (n), (g))))
-
-#define MAXIMAGESIZE(dpy)	(XMaxRequestSize(dpy) << 2) - 24
-
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-
-
-static Blt_HashTable painterTable;
-static int initialized = 0;
-
-#define COLOR_WINDOW		(1<<0)
-#define BLACK_AND_WHITE		(1<<1)
-#define MAP_COLORS		(1<<2)
-
-/*
- * PainterKey --
- *
- * This structure represents the key used to uniquely identify painters.  A
- * painter is specified by a combination of display, visual, colormap, depth,
- * and monitor gamma value.
- */
-typedef struct {
-    Display *display;		/* Display of painter. Used to free colors
-				 * allocated. */
-
-    Visual *visualPtr;		/* Visual information for the class of windows
-				 * displaying the image. */
-
-    Colormap colormap;		/* Colormap used.  This may be the default
-				 * colormap, or an allocated private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    float gamma;		/* Gamma correction value of monitor. */
-
-} PainterKey;
-
-
-#define GC_PRIVATE	1	/* Indicates if the GC in the painter was
-				 * shared (allocated by Tk_GetGC) or private
-				 * (by XCreateGC). */
-
-static Tcl_FreeProc FreePainter;
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindShift --
- *
- *	Returns the position of the least significant (low) bit in the given
- *	mask.
- *
- *	For TrueColor and DirectColor visuals, a pixel value is formed by
- *	OR-ing the red, green, and blue colormap indices into a single 32-bit
- *	word.  The visual's color masks tell you where in the word the indices
- *	are supposed to be.  The masks contain bits only where the index is
- *	found.  By counting the leading zeros in the mask, we know how many
- *	bits to shift to the individual red, green, and blue values to form a
- *	pixel.
- *
- * Results:
- *      The number of the least significant bit.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindShift(unsigned int mask)	/* 32-bit word */
-{
-    int bit;
-
-    for (bit = 0; bit < 32; bit++) {
-	if (mask & (1 << bit)) {
-	    break;
-	}
-    }
-    return bit;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CountBits --
- *
- *	Returns the number of bits set in the given 32-bit mask.
- *
- *	    Reference: Graphics Gems Volume II.
- *	
- * Results:
- *      The number of bits to set in the mask.
- *
- *
- *---------------------------------------------------------------------------
- */
-static int
-CountBits(unsigned long mask)	/* 32  1-bit tallies */
-{
-    /* 16  2-bit tallies */
-    mask = (mask & 0x55555555) + ((mask >> 1) & (0x55555555));  
-    /* 8  4-bit tallies */
-    mask = (mask & 0x33333333) + ((mask >> 2) & (0x33333333)); 
-    /* 4  8-bit tallies */
-    mask = (mask & 0x07070707) + ((mask >> 4) & (0x07070707));  
-    /* 2 16-bit tallies */
-    mask = (mask & 0x000F000F) + ((mask >> 8) & (0x000F000F));  
-    /* 1 32-bit tally */
-    mask = (mask & 0x0000001F) + ((mask >> 16) & (0x0000001F));  
-    return mask;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeGammaTables --
- *
- *	Initializes both the power and inverse power tables for the painter
- *	with a given gamma value.  These tables are used to/from map linear
- *	RGB values to/from non-linear monitor intensities.
- *	
- * Results:
- *      The *gammaTable* and *igammaTable* arrays are filled out to
- *      contain the mapped values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeGammaTables(Painter *p)
-{
-    int i;
-    double igamma, gamma;
-    
-    gamma = (double)p->gamma;
-    igamma = 1.0 / gamma;
-    for (i = 0; i < 256; i++) {
-	double value, y;
-
-	y = i / 255.0;
-	value = pow(y, gamma) * 255.0 + 0.5;
-	p->gammaTable[i] = (unsigned char)CLAMP(value);
-	value = pow(y, igamma) * 255.0 + 0.5;
-	p->igammaTable[i] = (unsigned char)CLAMP(value);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_QueryPalette --
- *
- *	Queries the X display server for the colors currently used in the
- *	colormap.  These values will then be used to map screen pixels back to
- *	RGB values (see Blt_DrawableToPicture). The queried non-linear color
- *	intensities are reverse mapped back to to linear RGB values.
- *	
- * Results:
- *      The *palette* array is filled in with the RGB color values of the
- *      colors allocated.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_QueryPalette(Painter *p, Blt_Pixel *palette)
-{
-    Visual *visualPtr;
-    XColor colors[256];
-
-    visualPtr = p->visualPtr;
-    assert(visualPtr->map_entries <= 256);
-
-    if ((visualPtr->class == DirectColor) || (visualPtr->class == TrueColor)) {
-	XColor *cp, *cend;
-	int nRed, nGreen, nBlue;
-	unsigned int  r, g, b;
-	
-	r = g = b = 0;
-	nRed =   (p->rMask >> p->rShift) + 1;
-	nGreen = (p->gMask >> p->gShift) + 1;
-	nBlue =  (p->bMask >> p->bShift) + 1;
-
-	for (cp = colors, cend = cp + visualPtr->map_entries; cp < cend; cp++) {
-	    cp->pixel = ((r << p->rShift)|(g << p->gShift) | (b << p->bShift));
-	    cp->pad = 0;
-	    r++, b++, g++;
-	    if (r >= nRed) {
-		r = 0;
-	    }
-	    if (g >= nGreen) {
-		g = 0;
-	    }
-	    if (b >= nBlue) {
-		b = 0;
-	    }
-	}
-    } else {
-	XColor *cp;
-	int i;
-
-	for (cp = colors, i = 0; i < visualPtr->map_entries; i++, cp++) {
-	    cp->pixel = i;
-	    cp->pad = 0;
-	}
-    }
-
-    XQueryColors(p->display, p->colormap, colors, visualPtr->map_entries);
-    
-    /* Scale to convert XColor component value (0..65535) to unsigned
-     * char (0..255). */
-    if (p->gamma == 1.0f) {
-	Blt_Pixel *dp;
-	XColor *cp;
-	int i;
-	double a;
-	
-	a = 1.0 / 257.0;
-	cp = colors, dp = palette;
-	for (i = 0; i < visualPtr->map_entries; i++) {
-	    dp->Red =   (unsigned char)(cp->red * a + 0.5);
-	    dp->Green = (unsigned char)(cp->green * a + 0.5);
-	    dp->Blue =  (unsigned char)(cp->blue * a + 0.5);
-	    cp++, dp++;
-	}
-    } else {
-	Blt_Pixel *dp;
-	XColor *cp;
-	int i;
-	double a;
-
-	a = 1.0 / 257.0;
-	cp = colors, dp = palette;
-	for (i = 0; i < visualPtr->map_entries; i++) {
-	    dp->Red =   p->gammaTable[(int)(cp->red * a + 0.5)];
-	    dp->Green = p->gammaTable[(int)(cp->green * a + 0.5)];
-	    dp->Blue =  p->gammaTable[(int)(cp->blue * a + 0.5)];
-	    cp++, dp++;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColorRamp --
- *
- *	Computes a smooth color ramp based upon the number of colors available
- *	for each color component.  It returns an array of the desired colors
- *	(XColor structures).  The screen gamma is factored into the desired
- *	colors.
- *	
- * Results:
- *      Returns the number of colors desired.  The *colors* array is filled
- *      out to contain the component values.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColorRamp(Painter *p, XColor *colors)
-{
-    int nColors;
-    XColor *cp;
-    double rScale, gScale, bScale;
-    double igamma;
-    int i;
-
-    nColors = 0;		/* Suppress compiler warning. */
-
-    /*
-     * Calculate the RGB coordinates of the colors we want to allocate and
-     * store them in *colors.
-     */
-    igamma = 1.0 / (double)p->gamma;
-
-    rScale = 255.0 / (p->nRed - 1);
-    gScale = 255.0 / (p->nGreen - 1);
-    bScale = 255.0 / (p->nBlue - 1);
-
-    switch (p->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	
-	nColors = MAX3(p->nRed, p->nGreen, p->nBlue);
-	if (p->isMonochrome) {
-	    nColors = p->nBlue = p->nGreen = p->nRed;
-	} 
-
-	/* Compute the 16-bit RGB values from each possible 8-bit value. */
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    int r, g, b;
-	    
-	    r = (int)(i * rScale + 0.5);
-	    g = (int)(i * gScale + 0.5);
-	    b = (int)(i * bScale + 0.5);
-
-	    r = p->igammaTable[r];
-	    g = p->igammaTable[g];
-	    b = p->igammaTable[b];
-
-	    cp->red = (r << 8) + r;
-	    cp->green = (g << 8) + g;
-	    cp->blue = (b << 8) + b;
-	    cp++;
-	}
-	break;
-
-    case PseudoColor:
-    case StaticColor:
-    case GrayScale:
-    case StaticGray:
-
-	nColors = (p->nRed * p->nGreen * p->nBlue);
-	if (p->isMonochrome) {
-	    nColors = p->nRed;
-	} 
-	if (!p->isMonochrome) {
-	    XColor *cp;
-	    int i;
-	    
-	    cp = colors;
-	    for (i = 0; i < p->nRed; i++) {
-		int j;
-		unsigned char r;
-		
-		r = (unsigned char)(i * rScale + 0.5);
-		r = p->igammaTable[r];
-		for (j = 0; j < p->nGreen; j++) {
-		    int k;
-		    unsigned int g;
-
-		    g = (unsigned char)(j * gScale + 0.5);
-		    g = p->igammaTable[g];
-		    for (k = 0; k < p->nBlue; k++) {
-			unsigned int b;
-
-			b = (unsigned char)(k * bScale + 0.5);
-			b = p->igammaTable[b];
-			cp->red = (r << 8) | r;
-			cp->green = (g << 8) | g;
-			cp->blue = (b << 8) | b;
-			cp++;
-		    } 
-		}
-	    }
-	}
-	break;
-
-    default: /* Monochrome */
-	{
-	    XColor *cp;
-	    double scale;
-	    int i;
-
-	    scale = 255.0 / (nColors - 1);
-
-	    cp = colors;
-	    for (i = 0; i < nColors; ++i) {
-		int c;
-
-		c = (int)(i * scale + 0.5);
-		c = p->igammaTable[c];
-		cp->red = cp->green = cp->blue = (c << 8) | c;
-		cp++;
-	    }
-	}
-    } /* end switch */
-    return nColors;
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocateColors --
- *
- *	Individually allocates each of the desired colors (as specified by the
- *	*colors* array).  If a color can't be allocated the desired colors
- *	allocated to that point as released, the number of component
- *	intensities is reduced, and 0 is returned.
- *
- *	For TrueColor visuals, we don't need to allocate colors at all, since
- *	we can compute them directly.
- *	
- * Results:
- *      Returns 1 if all desired colors were allocated successfully.  If
- *      unsuccessful, returns 0.  All colors allocated up to that point are
- *      freed and a smaller color palette size is computed and reset in the
- *      painter structure.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-AllocateColors(Painter *p, XColor *colors, int nColors)
-{
-    if (p->visualPtr->class == TrueColor) {
-	XColor *cp, *cend;
-
-	/* 
-	 * For TrueColor visuals, don't call XAllocColor, compute the pixel
-	 * value directly.
-	 */
-	for (cp = colors, cend = cp + nColors; cp < cend; cp++) {
-	    unsigned int r, g, b;
-
-	    r = ((cp->red >> 8) >> p->rAdjust);
-	    g = ((cp->green >> 8) >> p->gAdjust);
-	    b = ((cp->blue >> 8) >> p->bAdjust);
-
-	    /* Shift each color into the proper location of the pixel index. */
-	    r = (r << p->rShift) & p->rMask;
-	    g = (g << p->gShift) & p->gMask;
-	    b = (b << p->bShift) & p->bMask;
-	    cp->pixel = (r | g | b);
-	}
-	p->nPixels = 0;		/* This will indicate that we didn't use
-				  * XAllocColor to obtain pixel values. */
-	return TRUE;
-    } else {
-	int i;
-	XColor *cp;
-
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    if (!XAllocColor(p->display, p->colormap, cp)){
-#ifdef notdef
-		fprintf(stderr, "can't allocate color #%d: r=%x g=%x b=%x\n", 
-			i, cp->red, cp->green, cp->blue);
-#endif
-		break;
-	    }
-#ifdef notdef
-	    fprintf(stderr, "picture: allocated r=%x g=%x b=%x\n",
-		colors[i].red, colors[i].green, colors[i].blue);
-#endif
-	    p->pixels[i] = cp->pixel;
-	    cp++;
-	}
-	p->nPixels = i; /* # of pixels in array */
-	if (i == nColors) {
-	    fprintf(stderr, "painter palette %d/%d/%d colors okay\n", p->nRed, 
-		p->nGreen, p->nBlue);
-	    return TRUE;		/* Success. */
-	}
-    }
-    /*
-     * If we didn't get all of the colors, free the current palette, reduce
-     * the palette RGB component sizes.
-     */
-#ifdef notdef
-    fprintf(stderr, "can't allocate %d/%d/%d colors\n", p->nRed, p->nGreen, 
-	p->nBlue);
-#endif
-    XFreeColors(p->display, p->colormap, p->pixels, p->nPixels, 0);
-
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FillPalette --
- *
- *	Base upon the colors allocated, generate two mappings from the
- *	picture's 8-bit RGB components.
- *
- *	1) Map 8-bit RGB values to the bits of the pixel.  Each component
- *	   contains a portion of the pixel value.  For mapped visuals
- *	   (pseudocolor, staticcolor, grayscale, and staticgray) this pixel 
- *	   value will be translated to the actual pixel used by the display.
- *
- *	2) Map 8-bit RGB values to the actual color values used.  The
- *	   color ramp generated may be only a subset of the possible
- *	   color values.  The resulting palette is used in dithering the
- *	   image, using the error between the desired picture RGB value
- *	   and the actual value used.
- *
- * Results:
- *	Color palette and pixel maps are filled in.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FillPalette(Painter *p, XColor *colors, int nColors) 
-{
-    p->nColors = nColors;
-    if (!p->isMonochrome) {
-	p->flags |= COLOR_WINDOW;
-	
-	if ((p->visualPtr->class != DirectColor) && 
-	    (p->visualPtr->class != TrueColor)) {
-	    p->flags |= MAP_COLORS;
-	}
-    }
-    if (p->isMonochrome) {
-	int i;
-	
-	for (i = 0; i < 256; i++) {
-	    int c;
-	    
-	    c = (i + 127) / 255;
-	    p->rBits[i] = colors[c].pixel;
-	    p->palette[i].Blue = p->palette[i].Green = p->palette[i].Red = 
-		(unsigned char)(c * 255 + 0.5);
-	} 
-    } else {
-	int i, rMult;
-	double rScale, gScale, bScale;
-	
-	rMult = p->nGreen * p->nBlue;
-	
-	rScale = 255.0 / (p->nRed - 1);
-	gScale = 255.0 / (p->nGreen - 1);
-	bScale = 255.0 / (p->nBlue - 1);
-	
-	for (i = 0; i < 256; i++) {
-	    int r, g, b;
-	    
-	    r = (i * (p->nRed   - 1) + 127) / 255;
-	    g = (i * (p->nGreen - 1) + 127) / 255;
-	    b = (i * (p->nBlue  - 1) + 127) / 255;
-	    
-	    if ((p->visualPtr->class == DirectColor) || 
-		(p->visualPtr->class == TrueColor)) {
-		p->rBits[i] = colors[r].pixel & p->rMask;
-		p->gBits[i] = colors[g].pixel & p->gMask;
-		p->bBits[i] = colors[b].pixel & p->bMask;
-	    } else {
-		p->rBits[i] = r * rMult;
-		p->gBits[i] = g * p->nBlue;
-		p->bBits[i] = b;
-	    }
-	    p->palette[i].Red = (unsigned char)(r * rScale + 0.5);
-	    p->palette[i].Green = (unsigned char)(g * gScale + 0.5);
-	    p->palette[i].Blue = (unsigned char)(b * bScale + 0.5);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocatePalette --
- *
- *	This procedure allocates the colors required by a color table, and
- *	sets up the fields in the color table data structure which are used in
- *	dithering.
- *
- *	This routine essentially mimics what is done in tkImgPhoto.c.  It's
- *	purpose is to allocate exactly the same color ramp as the photo
- *	image. That way both image types can co-exist without fighting over
- *	available colors.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Colors are allocated from the X server.  The color palette and pixel
- *	indices are updated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-AllocatePalette(
-    Painter *p)	/* Pointer to the color table requiring
-				 * colors to be allocated. */
-{
-    XColor colors[256];
-    int nColors;
-    static int stdPalettes[13][3] = {
-	/* nRed, nGreen, nBlue */
-	{ 2,  2,  2  },		/* 3 bits, 8 colors */
-	{ 2,  3,  2  },		/* 4 bits, 12 colors */
-	{ 3,  4,  2  },		/* 5 bits, 24 colors */
-	{ 4,  5,  3  },		/* 6 bits, 60 colors */
-	{ 5,  6,  4  },		/* 7 bits, 120 colors */ 
-	{ 7,  7,  4  },		/* 8 bits, 198 colors */
-	{ 8,  10, 6  },		/* 9 bits, 480 colors */
-	{ 10, 12, 8  },		/* 10 bits, 960 colors */
-	{ 14, 15, 9  },		/* 11 bits, 1890 colors */
-	{ 16, 20, 12 },		/* 12 bits, 3840 colors */
-	{ 20, 24, 16 },		/* 13 bits, 7680 colors */
-	{ 26, 30, 20 },		/* 14 bits, 15600 colors */
-	{ 32, 32, 30 },		/* 15 bits, 30720 colors */
-    };
-
-    p->isMonochrome = FALSE; 
-    switch (p->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	p->nRed =   1 << CountBits(p->rMask);
-	p->nGreen = 1 << CountBits(p->gMask);
-	p->nBlue =  1 << CountBits(p->bMask);
-	break;
-
-    case GrayScale:
-    case StaticGray:
-    case PseudoColor:
-    case StaticColor:
-	if (p->depth > 15) {
-	    p->nRed = p->nGreen = p->nBlue = 32;
-	} else if (p->depth >= 3) {
-	    int *ip = stdPalettes[p->depth - 3];
-	    p->nRed =   ip[0];
-	    p->nGreen = ip[1];
-	    p->nBlue =  ip[2];
-	}
-	break;
-
-    default:
-	p->nGreen = p->nBlue = 0;
-	p->nRed = 1 << p->depth;
-	p->isMonochrome = TRUE;
-	break;
-    }
-
-    /*
-     * Each time around this loop, we reduce the number of colors
-     * we're trying to allocate until we succeed in allocating all of
-     * the colors we need.
-     */
-    for (;;) {
-	/*
-	 * If we are using 1 bit/pixel, we don't need to allocate any
-	 * colors (we just use the foreground and background colors in
-	 * the GC).
-	 */
-	if ((p->isMonochrome) && (p->nRed <= 2)) {
-	    p->flags |= BLACK_AND_WHITE;
-	    /* return; */
-	}
-	/*
-	 * Calculate the RGB values of a color ramp, given the some
-	 * number of red, green, blue intensities available.
-	 */
-	nColors = ColorRamp(p, colors);
-
-	/* Now try to allocate the colors we've calculated. */
-
-	if (AllocateColors(p, colors, nColors)) {
-	    break;		/* Success. */
-	}
-	if (!p->isMonochrome) {
-	    if ((p->nRed == 2) && (p->nGreen == 2) && (p->nBlue == 2)) {
-		break;
-		/* Fall back to 1-bit monochrome display. */
-		/* p->mono = TRUE; */
-	    } else {
-		/*
-		 * Reduce the number of shades of each primary to
-		 * about 3/4 of the previous value.  This will reduce
-		 * the total number of colors required to less than
-		 * half (27/64) the previous value for PseudoColor
-		 * displays.
-		 */
-		p->nRed = (p->nRed * 3 + 2) / 4;
-		p->nGreen = (p->nGreen * 3 + 2) / 4;
-		p->nBlue = (p->nBlue * 3 + 2) / 4;
-	    }
-	} else {
-	    p->nRed /= 2;
-	}
-    }
-    FillPalette(p, colors, nColors);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPainter --
- *
- *	Creates a new painter to be used to paint pictures. Painters are keyed
- *	by the combination of display, colormap, visual, depth, and gamma
- *	value used.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	A color ramp is allocated (not true for TrueColor visuals).  Gamma
- *	tables are computed and filled.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-NewPainter(PainterKey *keyPtr)
-{
-    Painter *p;
-    
-    p = Blt_AssertCalloc(1, sizeof(Painter));
-
-    p->colormap = keyPtr->colormap;
-    p->depth = keyPtr->depth;
-    p->display = keyPtr->display;
-    p->gamma = keyPtr->gamma;
-    p->visualPtr = keyPtr->visualPtr;
-    
-    p->refCount = 0;
-    p->rMask = (unsigned int)p->visualPtr->red_mask;
-    p->gMask = (unsigned int)p->visualPtr->green_mask;
-    p->bMask = (unsigned int)p->visualPtr->blue_mask;
-
-    p->rShift = FindShift(p->rMask);
-    p->gShift = FindShift(p->gMask);
-    p->bShift = FindShift(p->bMask);
-
-    p->rAdjust = p->gAdjust = p->bAdjust = 0;
-
-    {
-	int nRedBits, nGreenBits, nBlueBits;
-
-	nRedBits = CountBits(p->rMask);
-	nGreenBits = CountBits(p->gMask);
-	nBlueBits = CountBits(p->bMask);
-	if (nRedBits < 8) {
-	    p->rAdjust = 8 - nRedBits;
-	}
-	if (nGreenBits < 8) {
-	    p->gAdjust = 8 - nGreenBits;
-	}
-	if (nBlueBits < 8) {
-	    p->bAdjust = 8 - nBlueBits;
-	}
-    }
-    ComputeGammaTables(p);
-    AllocatePalette(p);
-    return p;
-}
-
-GC 
-Blt_PainterGC(Painter *p)
-{
-    return p->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *p)
-{
-    return p->depth;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePainter --
- *
- *	Called when the TCL interpreter is idle, this routine frees the
- *	painter. Painters are reference counted. Only when no clients are using
- *	the painter (the count is zero) is the painter actually freed.  By
- *	deferring its deletion, this allows client code to call Blt_GetPainter
- *	after Blt_FreePainter without incurring a performance penalty.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreePainter(DestroyData data)
-{
-    Painter *p = (Painter *)data;
-
-    if (p->refCount <= 0) {
-	if (p->nColors > 0) {
-	    XFreeColors(p->display, p->colormap,
-		p->pixels, p->nPixels, 0);
-	}
-	Blt_DeleteHashEntry(&painterTable, p->hashPtr);
-	if (p->gc != NULL) {
-	    if (p->flags & GC_PRIVATE) {
-		XFreeGC(p->display, p->gc);
-	    } else {
-		Tk_FreeGC(p->display, p->gc);
-	    }
-	    p->gc = NULL;
-	}
-	Blt_Free(p);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPainter --
- *
- *	Attempts to retrieve a painter for a particular combination of
- *	display, colormap, visual, depth, and gamma value.  If no specific
- *	painter exists, then one is created.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	If no current painter exists, a new painter is added to the hash table
- *	of painters.  Otherwise, the current painter's reference count is
- *	incremented indicated how many clients are using the painter.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-GetPainter(
-    Display *display, 
-    Colormap colormap, 
-    Visual *visualPtr,
-    int depth,
-    float gamma)
-{
-    Painter *p;
-    PainterKey key;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    if (!initialized) {
-	Blt_InitHashTable(&painterTable, sizeof(PainterKey) / sizeof(int));
-	initialized = TRUE;
-    }
-    key.display = display;
-    key.colormap = colormap;
-    key.visualPtr = visualPtr;
-    key.depth = depth;
-    key.gamma = gamma;
-
-    hPtr = Blt_CreateHashEntry(&painterTable, (char *)&key, &isNew);
-    if (isNew) {
-	p = NewPainter(&key);
-	p->hashPtr = hPtr;
-	Blt_SetHashValue(hPtr, p);
-    } else {
-	p = Blt_GetHashValue(hPtr);
-    }
-    p->refCount++;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainterFromDrawable --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information is retrieved from
- *	the drawable which is assumed to be a window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainterFromDrawable(Display *display, Drawable drawable, float gamma)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Painter *p;
-    Visual *visual;
-    Colormap colormap;
-    int depth;
-
-
-    Blt_GetDrawableInfo(display, drawable, &visual, &colormap, &depth);
-    p = GetPainter(display, colormap, visual, depth, gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-	    
-    p->gc = XCreateGC(display, drawable, gcMask, &gcValues);
-    p->flags |= GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainter --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information (except for the
- *	monitor's gamma value) is retrieved from the given Tk window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainter(Tk_Window tkwin, float gamma)
-{
-    Painter *p;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    p = GetPainter(Tk_Display(tkwin), Tk_Colormap(tkwin), 
-	Tk_Visual(tkwin), Tk_Depth(tkwin), gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-    p->gc = Tk_GetGC(tkwin, gcMask, &gcValues);
-    p->flags &= ~GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreePainter --
- *
- *	Frees the painter. Painters are reference counted. Only when no
- *	clients are using the painter (the count is zero) is the painter
- *	actually freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreePainter(Painter *p)
-{
-    p->refCount--;
-    if (p->refCount <= 0) {
-	Tcl_EventuallyFree(p, FreePainter);
-    }
-}
-
diff --git a/blt3.0/src/bltPainter.h b/blt3.0/src/bltPainter.h
deleted file mode 100644
index 0addca4..0000000
--- a/blt3.0/src/bltPainter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/*
- * bltPainter.h --
- *
- * This module implements generic image painting procedures for
- * the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the
- * Tk library distrubution.  The photo image type was designed and
- * implemented by Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#ifndef _BLT_PAINTER_H
-#define _BLT_PAINTER_H
-
-typedef struct _Blt_Painter *Blt_Painter;
-
-BLT_EXTERN void Blt_FreePainter(Blt_Painter painter);
-
-BLT_EXTERN Blt_Painter Blt_GetPainter(Tk_Window tkwin, float gamma);
-
-BLT_EXTERN Blt_Painter Blt_GetPainterFromDrawable(Display *display, 
-	Drawable drawable, float gamma);
-
-BLT_EXTERN GC Blt_PainterGC(Blt_Painter painter);
-
-BLT_EXTERN int Blt_PainterDepth(Blt_Painter painter);
-
-BLT_EXTERN Visual *Blt_PainterVisual(Blt_Painter painter);
-
-BLT_EXTERN Colormap Blt_PainterColormap(Blt_Painter painter);
-
-BLT_EXTERN int Blt_PaintPicture(Blt_Painter painter, Drawable drawable, 
-	Blt_Picture src, int srcX, int srcY, int width, int height, 
-	int destX, int destY, unsigned int flags);
-
-BLT_EXTERN int Blt_PaintPictureWithBlend(Blt_Painter painter, Drawable drawable, 
-	Blt_Picture src, int srcX, int srcY, int width, int height, 
-	int destX, int destY, unsigned int flags, double falpha);
-
-BLT_EXTERN Blt_Picture Blt_PaintCheckbox(int width, int height, 
-	XColor *fillColor, XColor *outlineColor, XColor *checkColor, int isOn);
-
-BLT_EXTERN Blt_Picture Blt_PaintRadioButton(int width, int height, 
-	XColor *fillColor, XColor *outlineColor, XColor *checkColor, int isOn);
-
-BLT_EXTERN void Blt_PaintRectangle(Blt_Picture picture, int x, int y, int w, 
-	int h, int dx, int dy, Blt_Pixel *colorPtr);
-
-BLT_EXTERN void Blt_PaintPolygon(Blt_Picture picture, int n, Point2f *vertices,
-	Blt_Pixel *colorPtr);
-#endif /* _BLT_PAINTER_H */
diff --git a/blt3.0/src/bltPainterInt.h b/blt3.0/src/bltPainterInt.h
deleted file mode 100644
index 63749a1..0000000
--- a/blt3.0/src/bltPainterInt.h
+++ /dev/null
@@ -1,143 +0,0 @@
-
-/*
- * bltUnixPainter.h --
- *
- * This header contains the private definitions for a painter in 
- * the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the
- * Tk library distrubution.  The photo image type was designed and
- * implemented by Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#ifndef _BLT_UNIX_PAINTER_H
-#define _BLT_UNIX_PAINTER_H
-
-#ifdef notdef
-#define PAINTER_COLOR_WINDOW		(1<<0)
-#define PAINTER_BW			(1<<1)
-#define PAINTER_MAP_COLORS		(1<<2)
-#endif
-
-/*
- * Painter --
- *
- * This structure represents a painter used to display picture images.  A
- * painter is specified by a combination of display, visual, colormap, depth,
- * and monitor gamma value.  Painters contain information necessary to display
- * a picture.  This includes both an RGB to pixel map, and a RGB to allocated
- * color map.
- *
- * Painters may be shared by more than one client and are reference counted.
- * When no clients are using the painter, it is freed.
- */
-
-struct _Blt_Painter {
-    Display *display;		/* Display of painter. Used to free colors
-				 * allocated. */
-
-    Visual *visualPtr;		/* Visual information for the class of windows
-				 * displaying the image. */
-
-    Colormap colormap;		/* Colormap used.  This may be the default
-				 * colormap, or an allocated private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    float gamma;		/* Gamma correction value of monitor. */
-
-    unsigned int flags;		/* Flags listed below. */
-
-    int refCount;		/* # of clients using this painter. If zero,
-				 * # the painter is freed. */
-
-    Blt_HashEntry *hashPtr;	/* Used to delete the painter entry from the
-				 * hash table of painters. */
-
-    int nColors;		/* # of colors allocated.  */
-    int nRed, nGreen, nBlue;	/* # of intensities for each RGB component. */
-
-    unsigned long pixels[256];	/* Array of pixel values. Needed to deallocate
-				 * the color palette. Also contains the
-				 * mapping between linear pixel values (rBits,
-				 * gBits, bBits) and the actual pixel for
-				 * PsuedoColor, StaticColor, Greyscale, and
-				 * StaticGrey visuals.
-				 */
-
-    int nPixels;		/* # of pixels allocated in above array. */
-
-
-    GC gc;			/* GC used to draw the image. */
-
-    /* 
-     * The following arrays are used for DirectColor, PsuedoColor,
-     * StaticColor, Greyscale, and StaticGrey visuals to convert RGB triplets
-     * to a parts of a pixel index.
-     */
-    unsigned int rBits[256], gBits[256], bBits[256];
-
-    /* 
-     * This following as used for TrueColor and DirectColor visuals only.
-     * They are used to directly compute of pixel values from picture RGB
-     * components.
-     */
-    unsigned int rAdjust, gAdjust, bAdjust;
-    unsigned int rShift, gShift, bShift;
-    unsigned int rMask, gMask, bMask;
-
-    unsigned char gammaTable[256]; /* Input gamma lookup table. Used to map
-				 * non-linear monitor values back to RGB
-				 * values. This is used whenever we take a
-				 * snapshot of the screen (e.g. alpha
-				 * blending).  Computes the power mapping.  D
-				 * = I^gamma. */
-
-    unsigned char igammaTable[256]; /* Output gamma lookup table. Used to map
-				 * RGB values to non-linear monitor
-				 * values. Computes the inverse power mapping.
-				 * I~ = D^1/gamma. */
-
-    int isMonochrome;		/* Indicates if the display uses a single
-				 * color component (e.g. 4-bit grayscale). */
-
-    Blt_Pixel palette[256];	/* Maps the picture's 8-bit RGB values to the
-				 * RGB values of the colors actually
-				 * allocated. This is used for dithering the
-				 * picture. */
-
-};
-
-typedef struct _Blt_Painter Painter;
-
-#endif /* _BLT_UNIX_PAINTER_H */
diff --git a/blt3.0/src/bltPaneset.c b/blt3.0/src/bltPaneset.c
deleted file mode 100644
index a50bce6..0000000
--- a/blt3.0/src/bltPaneset.c
+++ /dev/null
@@ -1,7446 +0,0 @@
-
-/*
- * bltPaneset.c --
- *
- *	Copyright 2009 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining a
- *	copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be included
- *	in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *	OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/* 
- * Modes 
- *
- *  1.  enlarge/reduce:  change only the panes touching the anchor.
- *  2.  slinky:		 change all panes on both sides of the anchor.
- *  3.  hybrid:		 one side slinky, the other enlarge/reduce
- *  4.  locked minus 1   changed only the pane to the left of the anchor.
- *  5.  filmstrip        move the panes left or right.
- */
-#include "bltInt.h"
-#include "bltChain.h"
-#include "bltList.h"
-#include "bltHash.h"
-#include "bltOp.h"
-#include "bltSwitch.h"
-#include "bltBgStyle.h"
-
-#define GETATTR(t,attr)		\
-   (((t)->attr != NULL) ? (t)->attr : (t)->setPtr->attr)
-#define VPORTWIDTH(s) \
-    (ISVERT(s)) ? Tk_Height((s)->tkwin) : Tk_Width((s)->tkwin);
-
-#define TRACE	0
-#define TRACE1	0
-
-#define SCREEN(x)	((x) - setPtr->scrollOffset) 
-#define ISVERT(s)	((s)->flags & VERTICAL)
-#define ISHORIZ(s)	(((s)->flags & VERTICAL) == 0)
-
-/* 
- * The following are the adjustment modes for the paneset widget.
- */
-typedef enum AdjustModes {
-    MODE_SLINKY,			/* Adjust all panes when resizing */
-    MODE_GIVETAKE,			/* Adjust panes to immediate left/right
-					 * or top/bottom of active handle. */
-    MODE_SPREADSHEET,			/* Adjust only the left pane and the
-					 * last pane. */
-} AdjustMode;
-
-typedef struct _Paneset Paneset;
-typedef struct _Pane Pane;
-typedef int (LimitsProc)(int value, Blt_Limits *limitsPtr);
-typedef int (SizeProc)(Pane *panePtr);
-typedef int (PanesetCmdProc)(Paneset *setPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-typedef int (HandleCmdProc)(Pane *panePtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-/*
- * Default values for widget attributes.
- */
-#define DEF_ACTIVEHANDLECOLOR	STD_ACTIVE_BACKGROUND
-#define DEF_ACTIVEHANDLERELIEF  "flat"
-#define DEF_ANIMATE		"0"
-#define DEF_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_BORDERWIDTH		"0"
-#define DEF_HANDLEBORDERWIDTH	"1"
-#define DEF_HANDLECOLOR		STD_NORMAL_BACKGROUND
-#define DEF_HANDLEPAD		"0"
-#define DEF_HANDLERELIEF	"flat"
-#define DEF_HANDLETHICKNESS	"2"
-#define DEF_HCURSOR		"sb_h_double_arrow"
-#define DEF_HEIGHT		"0"
-#define DEF_HIGHLIGHT_THICKNESS	"1"
-#define DEF_MODE		"givetake"
-#define DEF_ORIENT		"horizontal"
-#define DEF_DRAWER_SHRINK	"0"
-#define DEF_DRAWER_FILL		"1"
-#define DEF_PAD			"0"
-#define DEF_PANE_ANCHOR		"nw"
-#define DEF_PANE_ANCHOR		"nw"
-#define DEF_PANE_BORDERWIDTH	"0"
-#define DEF_PANE_CURSOR		(char *)NULL
-#define DEF_PANE_FILL		"none"
-#define DEF_PANE_HIDE		"0"
-#define DEF_PANE_HIGHLIGHT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_PANE_HIGHLIGHT_COLOR	RGB_BLACK
-#define DEF_PANE_PAD		"0"
-#define DEF_PANE_PADX		"0"
-#define DEF_PANE_PADY		"0"
-#define DEF_PANE_RESIZE		"shrink"
-#define DEF_PANE_SHOWHANDLE	"1"
-#define DEF_PANE_WEIGHT		"1.0"
-#define DEF_PANE_OPENVALUE	"1"
-#define DEF_PANE_CLOSEVALUE	"0"
-#define DEF_PANE_VARIABLE	(char *)NULL
-#define DEF_SCROLLCOMMAND	"0"
-#define DEF_SCROLLDELAY		"30"
-#define DEF_SCROLLINCREMENT	"10"
-#define DEF_SIDE		"right"
-#define DEF_TAKEFOCUS		"1"
-#define DEF_VCURSOR		"sb_v_double_arrow"
-#define DEF_WEIGHT		"0"
-#define DEF_WIDTH		"0"
-
-#define PANE_DEF_ANCHOR		TK_ANCHOR_NW
-#define PANE_DEF_FILL		FILL_NONE
-#define PANE_DEF_IPAD		0
-#define PANE_DEF_PAD		0
-#define PANE_DEF_PAD		0
-#define PANE_DEF_RESIZE		RESIZE_BOTH
-#define PANE_DEF_WEIGHT		1.0
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-#define VAR_FLAGS (TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS)
-
-/*
- * Paneset structure
- *
- *	The paneset is a set of windows (panes) that may be resized in one
- *	dimension (horizontally or vertically).  How the panes are resized is
- *	dependent upon the paneset's bearing and the adjustment mode in place.
- *
- *	The bearing is the position of the handle last moved.  By default it's
- *	the last handle.  The position is the just outside of the handle. So
- *	if the window starting at 100 has a width of 200 and the handle size
- *	is 10, the bearing is 310.
- *
- *	The bearing divides the panes into two. Each side is resized 
- *	according to the adjustment mode.
- *
- *	givetake	The panes immediately to the left and right of 
- *			the bearing are grown/shrunk.
- *	slinky		All the panes on either side of the bearing are
- *			grown/shrunk.
- *	spreadsheet     The pane to the left of the bearing and the last
- *			pane on the right side are grown/shrunk.  Intervening
- *			panes are unaffected.
- */
-
-struct _Paneset {
-    int flags;				/* See the flags definitions below. */
-    int type;				/* Type of widget: PANESET, DRAWER, or
-					 * FILMSTRIP. */
-    Display *display;			/* Display of the widget. */
-    Tk_Window tkwin;			/* The container window into which
-					 * other widgets are arranged. For the
-					 * paneset and filmstrip, this window
-					 * is created.  For the drawer we use
-					 * an existing window. */
-    Tcl_Interp *interp;			/* Interpreter associated with all
-					 * widgets and handles. */
-    Tcl_Command cmdToken;		/* Command token associated with this
-					 * widget. For panesets and filmstrips
-					 * this is the path name of the window
-					 * created. For drawers, this is a
-					 * generated name. */
-    char *name;				/* The generated name of the drawer
-					 * or the pathname of the window
-					 * created (panesets and
-					 * filmstrips). */
-    AdjustMode mode;			/* Panesets only: Mode to use to
-					   resize panes when the user adjusts
-					   a handle. */
-    int highlightThickness;		/* Width in pixels of highlight to
-					 * draw around the handle when it has
-					 * the focus.  <= 0 means don't draw a
-					 * highlight. */
-    int normalWidth;			/* Normal dimensions of the paneset */
-    int normalHeight;
-    int reqWidth, reqHeight;		/* Constraints on the paneset's normal
-					 * width and height. Overrides the
-					 * requested width of the window. */
-
-    Tk_Cursor defVertCursor;		/* Default vertical X cursor */
-    Tk_Cursor defHorzCursor;		/* Default horizontal X cursor */
-
-    short int width, height;		/* Requested size of the widget. */
-
-    Blt_Background bg;			/* 3D border surrounding the window
-					 * (viewport). */
-    /*
-     * Scrolling information (filmstrip only):
-     */
-    int worldWidth;
-    int scrollOffset;			/* Offset of viewport in world
-					 * coordinates. */
-    Tcl_Obj *scrollCmdObjPtr;		/* Command strings to control
-					 * scrollbar.*/
-
-    /* 
-     * Automated scrolling information (filmstrip or drawer). 
-     */
-    int scrollUnits;			/* Smallest unit of scrolling for
-					 * tabs. */
-    int scrollTarget;			/* Target offset to scroll to. */
-    int scrollIncr;			/* Current increment. */
-    int interval;			/* Current increment. */
-    Tcl_TimerToken timerToken;		/* Token for timer to automatically
-					 * scroll the pane or drawer. */
-
-    /*
-     * Focus highlight ring
-     */
-    XColor *highlightColor;		/* Color for drawing traversal
-					 * highlight. */
-    int relief;
-    int activeRelief;
-    Blt_Pad handlePad;
-    int handleBW;
-    int handleThickness;		/*  */
-    int handleSize;
-    Blt_Background handleBg;
-    Blt_Background activeHandleBg;
-    int handleAnchor;			/* Last known location of handle
-					 * during a move. */
-
-    Blt_Chain chain;			/* List of panes/drawers. In paneset
-					 * and filmstrip widgets, describes
-					 * the order of the panes in the
-					 * widget. In the drawer widget,
-					 * represents the stacking order of
-					 * the drawers. */
-
-    Blt_HashTable paneTable;		/* Table of panes.  Serves as a
-					 * directory to look up panes from
-					 * windows. */
-    Blt_HashTable tagTable;		/* Table of tags. */
-    Pane *activePtr;			/* Indicates the pane with the active
-					 * handle. */
-    Pane *anchorPtr;			/* Pane that is currently anchored */
-    int bearing;			/* Location of the split (paneset).
-					 * the drawer (drawer). */
-    Tcl_Obj *cmdObjPtr;			/* Command to invoke when the "invoke"
-					 * operation is performed. */
-    size_t nVisible;			/* # of visible panes. */
-    GC gc;
-    size_t nextId;			/* Counter to generate unique
-					 * pane/drawer names. */
-};
-
-/*
- * Paneset flags definitions
- */
-#define REDRAW_PENDING  (1<<0)		/* A redraw request is pending. */
-#define LAYOUT_PENDING 	(1<<1)		/* Get the requested sizes of the
-					 * widgets before expanding/shrinking
-					 * the size of the container.  It's
-					 * necessary to recompute the layout
-					 * every time a pane is added,
-					 * reconfigured, or deleted, but not
-					 * when the container is resized. */
-#define SCROLL_PENDING 	(1<<2)		/* Get the requested sizes of the
-					 * widgets before expanding/shrinking
-					 * the size of the container.  It's
-					 * necessary to recompute the layout
-					 * every time a pane is added,
-					 * reconfigured, or deleted, but not
-					 * when the container is resized. */
-#define ANIMATE		(1<<3)		/* Animate pane moves and drawer
-					 * open/closes  */
-
-#define FOCUS		(1<<6)
-
-#define VERTICAL	(1<<7)
-
-#define PANESET		(BLT_CONFIG_USER_BIT << 1)
-#define DRAWER		(BLT_CONFIG_USER_BIT << 2)
-#define FILMSTRIP	(BLT_CONFIG_USER_BIT << 3)
-#define ALL		(PANESET|DRAWER|FILMSTRIP)
-
-/*
- * Pane --
- *
- *	A pane holds a window and a possibly a handle.  It describes how the
- *	window should appear in the pane.  The handle is a rectangle on the
- *	far edge of the pane (horizontal right, vertical bottom).  Normally
- *	the last pane does not have a handle.  Handles may be hidden.
- *
- *	Initially, the size of a pane consists of
- *	 1. the requested size embedded window,
- *	 2. any requested internal padding, and
- *       3. the size of the handle (if one is displayed). 
- *
- *	Note: There is no 3D border around the pane.  This can be added
- *	      by embedding a frame.  This simplifies the widget so that
- *	      there is only one window for the widget.  Windows outside of
- *	      the boundary of the pane are occluded.
- */
-struct _Pane  {
-    Tk_Window tkwin;			/* Widget to be managed. */
-    Tk_Window handle;			/* Handle subwindow. */
-    Tcl_Command cmdToken;
-
-    Tk_Cursor cursor;			/* X Cursor */
-
-    const char *name;			/* Name of pane */
-
-    unsigned int side;			/* The side of the widget where this
-					 * drawer is attached. */
-    unsigned int flags;
-
-    Paneset *setPtr;			/* Paneset widget managing this pane. */
-
-    int borderWidth;			/* The external border width of the
-					 * widget. This is needed to check if
-					 * Tk_Changes(tkwin)->border_width
-					 * changes. */
-
-    XColor *highlightBgColor;		/* Color for drawing traversal
-					 * highlight area when highlight is
-					 * off. */
-    XColor *highlightColor;		/* Color for drawing traversal
-					 * highlight. */
-
-    const char *takeFocus;		/* Says whether to select this widget
-					 * during tab traveral operations.
-					 * This value isn't used in C code,
-					 * but for the widget's TCL
-					 * bindings. */
-
-    Blt_Limits reqWidth, reqHeight;	/* Bounds for width and height
-					 * requests made by the widget. */
-    Tk_Anchor anchor;			/* Anchor type: indicates how the
-					 * widget is positioned if extra space
-					 * is available in the pane. */
-
-    Blt_Pad xPad;			/* Extra padding placed left and right
-					 * of the widget. */
-    Blt_Pad yPad;			/* Extra padding placed above and below
-					 * the widget */
-
-    int iPadX, iPadY;			/* Extra padding added to the interior
-					 * of the widget (i.e. adds to the
-					 * requested size of the widget) */
-
-    int fill;				/* Indicates how the widget should fill
-					 * the pane it occupies. */
-    int resize;				/* Indicates if the pane should
-					 * expand/shrink. */
-
-    int x, y;				/* Origin of pane wrt container. */
-
-    short int width, height;		/* Size of pane, including handle. */
-
-    Blt_ChainLink link;			/* Pointer of this pane into the list
-					 * of panes. */
-
-    Blt_HashEntry *hashPtr;	        /* Pointer of this pane into hashtable
-					 * of panes. */
-
-    int index;				/* Index of the pane. */
-
-    int size;				/* Current size of the pane. This size
-					 * is bounded by min and max. */
-
-    /*
-     * nom and size perform similar duties.  I need to keep track of the
-     * amount of space allocated to the pane (using size).  But at the same
-     * time, I need to indicate that space can be parcelled out to this pane.
-     * If a nominal size was set for this pane, I don't want to add space.
-     */
-
-    int nom;				/* The nominal size (neither expanded
-					 * nor shrunk) of the pane based upon
-					 * the requested size of the widget
-					 * embedded in this pane. */
-
-    int min, max;			/* Size constraints on the pane */
-
-    float weight;			/* Weight of pane. */
-
-    Blt_Limits reqSize;			/* Requested bounds for the size of
-					 * the pane. The pane will not expand
-					 * or shrink beyond these limits,
-					 * regardless of how it was specified
-					 * (max widget size).  This includes
-					 * any extra padding which may be
-					 * specified. */
-    Blt_Background handleBg;
-    Blt_Background activeHandleBg;
-    Blt_Background bg;			/* 3D background border surrounding
-					 * the widget */
-    Tcl_Obj *cmdObjPtr;
-
-    Tcl_TimerToken timerToken;
-    int scrollTarget;			/* Target offset to scroll to. */
-    int scrollIncr;			/* Current increment. */
-
-    Tcl_Obj *variableObjPtr;		/* Name of TCL variable.  If non-NULL,
-					 * this variable will be set to the
-					 * value string of the selected
-					 * item. */
-
-    /* Checkbutton on and off values. */
-    Tcl_Obj *openValueObjPtr;		/* Drawer open-value. */
-    Tcl_Obj *closeValueObjPtr;		/* Drawer close-value. */
-};
-
-/* Pane/handle flags.  */
-
-#define HIDE		(1<<8)		/* Do not display the pane. */
-#define CLOSED		(1<<8)		/* Do not display the pane. */
-#define DISABLED	(1<<9)		/* Handle is disabled. */
-#define ONSCREEN	(1<<10)		/* Pane is on-screen. */
-#define HANDLE_ACTIVE	(1<<11)		/* Handle is currently active. */
-#define HANDLE		(1<<12)		/* The pane has a handle. */
-#define SHOW_HANDLE	(1<<13)		/* Display the pane. */
-#define SHRINK		(1<<14)		/* Shrink the window to fit the
-					 * drawer, instead of moving it. */
-#define VIRGIN		(1<<24)
-
-/* Orientation. */
-#define SIDE_VERTICAL	(SIDE_TOP|SIDE_BOTTOM)
-#define SIDE_HORIZONTAL	(SIDE_LEFT|SIDE_RIGHT)
-
-/* Handle positions. */
-#define HANDLE_LEFT	SIDE_RIGHT
-#define HANDLE_RIGHT	SIDE_LEFT
-#define HANDLE_TOP	SIDE_BOTTOM
-#define HANDLE_BOTTOM	SIDE_TOP
-
-#define HANDLE_FARSIDE	(HANDLE_RIGHT|HANDLE_BOTTOM)	
-#define HANDLE_NEARSIDE	(HANDLE_LEFT|HANDLE_TOP)	
-
-
-static Tk_GeomRequestProc PaneGeometryProc;
-static Tk_GeomLostSlaveProc PaneCustodyProc;
-static Tk_GeomMgr panesetMgrInfo =
-{
-    (char *)"paneset",			/* Name of geometry manager used by
-					 * winfo */
-    PaneGeometryProc,			/* Procedure to for new geometry
-					 * requests */
-    PaneCustodyProc,			/* Procedure when widget is taken
-					 * away */
-};
-
-static Blt_OptionParseProc ObjToChild;
-static Blt_OptionPrintProc ChildToObj;
-static Blt_CustomOption childOption = {
-    ObjToChild, ChildToObj, NULL, (ClientData)0,
-};
-
-extern Blt_CustomOption bltLimitsOption;
-
-static Blt_OptionParseProc ObjToOrientProc;
-static Blt_OptionPrintProc OrientToObjProc;
-static Blt_CustomOption orientOption = {
-    ObjToOrientProc, OrientToObjProc, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToMode;
-static Blt_OptionPrintProc ModeToObj;
-static Blt_CustomOption adjustOption = {
-    ObjToMode, ModeToObj, NULL, (ClientData)0,
-};
-
-static Blt_OptionFreeProc FreeTraceVarProc;
-static Blt_OptionParseProc ObjToTraceVarProc;
-static Blt_OptionPrintProc TraceVarToObjProc;
-static Blt_CustomOption traceVarOption = {
-    ObjToTraceVarProc, TraceVarToObjProc, FreeTraceVarProc, (ClientData)0
-};
-
-static Blt_ConfigSpec paneSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activehandlecolor", "activeHandleColor", 
-	"HandleColor", DEF_ACTIVEHANDLECOLOR, Blt_Offset(Pane, activeHandleBg), 
-        BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK | FILMSTRIP | DRAWER},
-    {BLT_CONFIG_BACKGROUND, "-activesashcolor", "activeSashColor", 
-	"SashColor", DEF_ACTIVEHANDLECOLOR, Blt_Offset(Pane, activeHandleBg), 
-        BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK | PANESET},
-    {BLT_CONFIG_ANCHOR, "-anchor", (char *)NULL, (char *)NULL, DEF_PANE_ANCHOR,
-	Blt_Offset(Pane, anchor), BLT_CONFIG_DONT_SET_DEFAULT | PANESET},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	(char *)NULL, Blt_Offset(Pane, bg), 
-	BLT_CONFIG_NULL_OK | BLT_CONFIG_DONT_SET_DEFAULT | ALL},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, ALL},
-    {BLT_CONFIG_OBJ, "-closevalue", "closeValue", "CloseValue",
-	DEF_PANE_CLOSEVALUE, Blt_Offset(Pane, closeValueObjPtr), 
-	BLT_CONFIG_NULL_OK | DRAWER },
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", "Cursor",
-        DEF_PANE_CURSOR, Blt_Offset(Pane, cursor), BLT_CONFIG_NULL_OK | ALL},
-    {BLT_CONFIG_FILL, "-fill", "fill", "Fill", DEF_PANE_FILL, 
-	Blt_Offset(Pane, fill), 
-	BLT_CONFIG_DONT_SET_DEFAULT | PANESET | FILMSTRIP },
-    {BLT_CONFIG_BOOLEAN, "-fill", "fill", "Fill", DEF_DRAWER_FILL, 
-	Blt_Offset(Pane, fill), BLT_CONFIG_DONT_SET_DEFAULT | DRAWER },
-    {BLT_CONFIG_BACKGROUND, "-handlecolor", "handleColor", "HandleColor",
-	DEF_HANDLECOLOR, Blt_Offset(Pane, handleBg), 
-        BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK | FILMSTRIP|DRAWER},
-    {BLT_CONFIG_SYNONYM, "-height", "reqHeight", (char *)NULL, (char *)NULL, 
-	Blt_Offset(Pane, reqHeight), 0},
-    {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_PANE_HIDE, 
-	Blt_Offset(Pane, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | PANESET, 
-	(Blt_CustomOption *)HIDE },
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_PANE_HIGHLIGHT_BACKGROUND, 
-	Blt_Offset(Pane, highlightBgColor), ALL},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_PANE_HIGHLIGHT_COLOR, Blt_Offset(Pane, highlightColor), ALL},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipadx", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Pane, iPadX), ALL},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipady", (char *)NULL, (char *)NULL, 
-	(char *)NULL, Blt_Offset(Pane, iPadY), ALL},
-    {BLT_CONFIG_OBJ, "-opennvalue", "openValue", "OpenValue", 
-	DEF_PANE_OPENVALUE, Blt_Offset(Pane, openValueObjPtr), 
-	BLT_CONFIG_NULL_OK | DRAWER },
-    {BLT_CONFIG_CUSTOM, "-reqheight", "reqHeight", (char *)NULL, (char *)NULL, 
-	Blt_Offset(Pane, reqHeight), ALL, &bltLimitsOption},
-    {BLT_CONFIG_CUSTOM, "-reqwidth", "reqWidth", (char *)NULL, (char *)NULL, 
-	Blt_Offset(Pane, reqWidth), ALL, &bltLimitsOption},
-    {BLT_CONFIG_RESIZE, "-resize", "resize", "Resize", DEF_PANE_RESIZE,
-	Blt_Offset(Pane, resize), BLT_CONFIG_DONT_SET_DEFAULT | ALL},
-    {BLT_CONFIG_BACKGROUND, "-sashcolor", "sashColor", "SashColor",
-	DEF_HANDLECOLOR, Blt_Offset(Pane, handleBg), 
-        BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK | PANESET},
-    {BLT_CONFIG_BITMASK, "-showhandle", "showHandle", "showHandle", 
-	DEF_PANE_SHOWHANDLE, Blt_Offset(Pane, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER, 
-        (Blt_CustomOption *)SHOW_HANDLE },
-    {BLT_CONFIG_BITMASK, "-showsash", "showSash", "showSash", 
-	DEF_PANE_SHOWHANDLE, Blt_Offset(Pane, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | PANESET, (Blt_CustomOption *)SHOW_HANDLE},
-    {BLT_CONFIG_BITMASK, "-shrink", "shrink", "Shrink", 
-	DEF_DRAWER_SHRINK, Blt_Offset(Pane, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | DRAWER, (Blt_CustomOption *)SHRINK },
-    {BLT_CONFIG_SIDE, "-side", (char *)NULL, (char *)NULL, DEF_SIDE, 
-        Blt_Offset(Pane, side), BLT_CONFIG_DONT_SET_DEFAULT | DRAWER},
-    {BLT_CONFIG_CUSTOM, "-size", (char *)NULL, (char *)NULL, (char *)NULL, 
-	Blt_Offset(Pane, reqSize), ALL, &bltLimitsOption},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_TAKEFOCUS, Blt_Offset(Pane, takeFocus), BLT_CONFIG_NULL_OK | ALL},
-    {BLT_CONFIG_CUSTOM, "-variable", (char *)NULL, (char *)NULL, 
-	DEF_PANE_VARIABLE, Blt_Offset(Pane, variableObjPtr), 
-	BLT_CONFIG_NULL_OK | DRAWER, &traceVarOption},
-    {BLT_CONFIG_FLOAT, "-weight", "weight", "Weight", DEF_PANE_WEIGHT,
-	Blt_Offset(Pane, weight), BLT_CONFIG_DONT_SET_DEFAULT | PANESET},
-    {BLT_CONFIG_SYNONYM, "-width", "reqWidth", (char *)NULL, (char *)NULL, 
-	Blt_Offset(Pane, reqWidth), 0},
-    {BLT_CONFIG_CUSTOM, "-window", "window", "Window", (char *)NULL, 
-	Blt_Offset(Pane, tkwin), BLT_CONFIG_NULL_OK | ALL, &childOption },
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-/* 
- * Hide the handle. 
- *
- *	.p configure -handlethickness 0
- *	.p pane configure -hide yes 
- *	Put all the drawers in the paneset widget, hidden by default.
- *	Reveal/hide drawers to pop them out.
- *	plotarea | sidebar | scroller
- */
-static Blt_ConfigSpec panesetSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activehandlecolor", "activeHandleColor", 
-	"HandleColor", DEF_ACTIVEHANDLECOLOR, 
-	Blt_Offset(Paneset, activeHandleBg), DRAWER|FILMSTRIP},
-    {BLT_CONFIG_RELIEF, "-activehandlerelief", "activeHandleRelief", 
-	"HandleRelief", DEF_ACTIVEHANDLERELIEF, 
-	Blt_Offset(Paneset, activeRelief), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER },
-    {BLT_CONFIG_BACKGROUND, "-activesashcolor", "activeSashColor", 
-	"SashColor", DEF_ACTIVEHANDLECOLOR, 
-	Blt_Offset(Paneset, activeHandleBg), PANESET},
-    {BLT_CONFIG_RELIEF, "-activesashrelief", "activeSashRelief", 
-	"SashRelief", DEF_ACTIVEHANDLERELIEF, 
-	Blt_Offset(Paneset, activeRelief), BLT_CONFIG_DONT_SET_DEFAULT|PANESET},
-    {BLT_CONFIG_BITMASK, "-animate", "animate", "Animate", DEF_ANIMATE, 
-	Blt_Offset(Paneset, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER, 
-	(Blt_CustomOption *)ANIMATE },
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BACKGROUND, Blt_Offset(Paneset, bg), ALL },
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, ALL},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT,
-	Blt_Offset(Paneset, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT | ALL },
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_HIGHLIGHT_THICKNESS, 
-	Blt_Offset(Paneset, highlightThickness), 
-	BLT_CONFIG_DONT_SET_DEFAULT | ALL},
-    {BLT_CONFIG_CUSTOM, "-orient", "orient", "Orient", DEF_ORIENT, 
-	Blt_Offset(Paneset, flags), 
-	BLT_CONFIG_DONT_SET_DEFAULT | PANESET | FILMSTRIP, &orientOption},
-    {BLT_CONFIG_CUSTOM, "-mode", "mode", "Mode", DEF_MODE,
-	Blt_Offset(Paneset, mode), BLT_CONFIG_DONT_SET_DEFAULT | PANESET, 
-	&adjustOption},
-    {BLT_CONFIG_CUSTOM, "-reqheight", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Paneset, reqHeight), ALL, &bltLimitsOption},
-    {BLT_CONFIG_CUSTOM, "-reqwidth", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Paneset, reqWidth), ALL, &bltLimitsOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-handleborderwidth", "handleBorderWidth", 
-        "HandleBorderWidth", DEF_HANDLEBORDERWIDTH, 
-	Blt_Offset(Paneset, handleBW), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER },
-    {BLT_CONFIG_BACKGROUND, "-handlecolor", "handleColor", "HandleColor",
-	DEF_HANDLECOLOR, Blt_Offset(Paneset, handleBg), FILMSTRIP | DRAWER},
-    {BLT_CONFIG_PAD, "-handlepad", "handlePad", "HandlePad", DEF_HANDLEPAD, 
-	Blt_Offset(Paneset, handlePad), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER},
-    {BLT_CONFIG_RELIEF, "-handlerelief", "handleRelief", "HandleRelief", 
-	DEF_HANDLERELIEF, Blt_Offset(Paneset, relief), 
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER },
-    {BLT_CONFIG_PIXELS_NNEG, "-handlethickness", "handleThickness", 
-	"HandleThickness", DEF_HANDLETHICKNESS, 
-	Blt_Offset(Paneset, handleThickness), 
-	BLT_CONFIG_DONT_SET_DEFAULT| FILMSTRIP | DRAWER },
-    {BLT_CONFIG_PIXELS_NNEG, "-sashborderwidth", "sashBorderWidth", 
-        "SashBorderWidth", DEF_HANDLEBORDERWIDTH, 
-	Blt_Offset(Paneset, handleBW), BLT_CONFIG_DONT_SET_DEFAULT | PANESET},
-    {BLT_CONFIG_BACKGROUND, "-sashcolor", "sashColor", "SashColor",
-	DEF_HANDLECOLOR, Blt_Offset(Paneset, handleBg), PANESET},
-    {BLT_CONFIG_PAD, "-sashpad", "sashPad", "SashPad", DEF_HANDLEPAD, 
-	Blt_Offset(Paneset, handlePad), BLT_CONFIG_DONT_SET_DEFAULT | PANESET},
-    {BLT_CONFIG_RELIEF, "-sashrelief", "sashRelief", "SashRelief", 
-	DEF_HANDLERELIEF, Blt_Offset(Paneset, relief), 
-	BLT_CONFIG_DONT_SET_DEFAULT | PANESET },
-    {BLT_CONFIG_PIXELS_NNEG, "-sashthickness", "sashThickness", 
-	"SashThickness", DEF_HANDLETHICKNESS, 
-	Blt_Offset(Paneset, handleThickness), 
-	BLT_CONFIG_DONT_SET_DEFAULT| PANESET },
-    {BLT_CONFIG_OBJ, "-scrollcommand", "scrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(Paneset, scrollCmdObjPtr),
-	BLT_CONFIG_NULL_OK | FILMSTRIP },
-    {BLT_CONFIG_PIXELS_POS, "-scrollincrement", "scrollIncrement",
-	"ScrollIncrement", DEF_SCROLLINCREMENT, Blt_Offset(Paneset,scrollUnits),
-	BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER },
-    {BLT_CONFIG_INT_NNEG, "-scrolldelay", "scrollDelay", "ScrollDelay",
-	DEF_SCROLLDELAY, Blt_Offset(Paneset, interval),
-        BLT_CONFIG_DONT_SET_DEFAULT | FILMSTRIP | DRAWER },
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH,
-	Blt_Offset(Paneset, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT | ALL},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-/*
- * PaneIterator --
- *
-v *	Panes may be tagged with strings.  A pane may have many tags.  The same
- *	tag may be used for many panes.
- *	
- */
-typedef enum { 
-    ITER_SINGLE, ITER_ALL, ITER_TAG, ITER_PATTERN, 
-} IteratorType;
-
-typedef struct _Iterator {
-    Paneset *setPtr;		       /* Paneset that we're iterating over. */
-
-    IteratorType type;			/* Type of iteration:
-					 * ITER_TAG	 By item tag.
-					 * ITER_ALL      By every item.
-					 * ITER_SINGLE   Single item: either 
-					 *               tag or index.
-					 * ITER_PATTERN  Over a consecutive 
-					 *               range of indices.
-					 */
-
-    Pane *startPtr;			/* Starting pane.  Starting point of
-					 * search, saved if iterator is reused.
-					 * Used for ITER_ALL and ITER_SINGLE
-					 * searches. */
-    Pane *endPtr;			/* Ending pend (inclusive). */
-
-    Pane *nextPtr;			/* Next pane. */
-
-    /* For tag-based searches. */
-    char *tagName;			/* If non-NULL, is the tag that we are
-					 * currently iterating over. */
-
-    Blt_HashTable *tablePtr;		/* Pointer to tag hash table. */
-
-    Blt_HashSearch cursor;		/* Search iterator for tag hash
-					 * table. */
-    Blt_ChainLink link;
-} PaneIterator;
-
-/*
- * Forward declarations
- */
-static Tcl_FreeProc PanesetFreeProc;
-static Tcl_IdleProc DisplayPaneset;
-static Tcl_IdleProc DisplayHandle;
-static Tcl_ObjCmdProc PanesetCmd;
-static Tcl_ObjCmdProc DrawersetCmd;
-static Tcl_ObjCmdProc FilmstripCmd;
-static Tk_EventProc PanesetEventProc;
-static Tk_EventProc PaneEventProc;
-static Tk_EventProc HandleEventProc;
-static Tcl_FreeProc PaneFreeProc;
-static Tcl_ObjCmdProc PanesetInstCmdProc;
-static Tcl_ObjCmdProc DrawerInstCmdProc;
-static Tcl_ObjCmdProc HandleInstCmdProc;
-static Tcl_CmdDeleteProc PanesetInstCmdDeleteProc;
-static Tcl_CmdDeleteProc DrawerInstCmdDeleteProc;
-static Tcl_CmdDeleteProc HandleInstCmdDeleteProc;
-static Tcl_TimerProc MotionTimerProc;
-static Tcl_TimerProc DrawerTimerProc;
-static Tcl_VarTraceProc DrawerVarTraceProc;
-
-static int GetPaneIterator(Tcl_Interp *interp, Paneset *setPtr, Tcl_Obj *objPtr,
-	PaneIterator *iterPtr);
-static int GetPaneFromObj(Tcl_Interp *interp, Paneset *setPtr, Tcl_Obj *objPtr, 
-	Pane **panePtrPtr);
-
-static int 
-ScreenX(Pane *panePtr)
-{
-    Paneset *setPtr;
-    int x;
-
-    x = panePtr->x;
-    setPtr = panePtr->setPtr;
-    if (setPtr->type == DRAWER) {
-	if (panePtr->side & SIDE_RIGHT) {
-	    x = Tk_Width(setPtr->tkwin) - x;
-	} else if (panePtr->side & SIDE_LEFT) {
-	    x -= panePtr->size;
-	}
-    } else if ((setPtr->type == FILMSTRIP) && (ISHORIZ(setPtr))) {
-	x -= setPtr->scrollOffset;
-    }
-    return x;
-}
-
-static int 
-ScreenY(Pane *panePtr)
-{
-    Paneset *setPtr;
-    int y;
-
-    setPtr = panePtr->setPtr;
-    y = panePtr->y;
-    if (setPtr->type == DRAWER) {
-	if (panePtr->side & SIDE_BOTTOM) {
-	    y = Tk_Height(setPtr->tkwin) - y;
-	} else if (panePtr->side & SIDE_TOP) {
-	    y -= panePtr->size;
-	}
-    } else if ((setPtr->type == FILMSTRIP) && (ISVERT(setPtr))) {
-	y -= setPtr->scrollOffset;
-    }
-    return y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RaiseDrawer --
- *
- *	Raises the drawer to the top of the stack of drawers.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Drawer is redrawn at the top of the stack.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RaiseDrawer(Pane *panePtr)
-{
-    if (panePtr->link != NULL) {
-	Paneset *setPtr;
-
-	setPtr = panePtr->setPtr;
-	Blt_Chain_UnlinkLink(setPtr->chain, panePtr->link);
-	Blt_Chain_AppendLink(setPtr->chain, panePtr->link);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LowerDrawer --
- *
- *	Lowers the drawer to the bottom of the stack of drawers.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Drawer is redraw at the bottom of the stack.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LowerDrawer(Pane *panePtr)
-{
-    if (panePtr->link != NULL) {
-	Paneset *setPtr;
-
-	setPtr = panePtr->setPtr;
-	Blt_Chain_UnlinkLink(setPtr->chain, panePtr->link);
-	Blt_Chain_PrependLink(setPtr->chain, panePtr->link);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * BoundWidth --
- *
- *	Bounds a given width value to the limits described in the limit
- *	structure.  The initial starting value may be overridden by the
- *	nominal value in the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BoundWidth(int width, Blt_Limits *limitsPtr)	
-{
-    /*
-     * Check widgets for requested width values;
-     */
-    if (limitsPtr->flags & LIMITS_NOM_SET) {
-	width = limitsPtr->nom;		/* Override initial value */
-    }
-    if (width < limitsPtr->min) {
-	width = limitsPtr->min;		/* Bounded by minimum value */
-    }
-    if (width > limitsPtr->max) {
-	width = limitsPtr->max;		/* Bounded by maximum value */
-    }
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BoundHeight --
- *
- *	Bounds a given value to the limits described in the limit structure.
- *	The initial starting value may be overridden by the nominal value in
- *	the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BoundHeight(int height, Blt_Limits *limitsPtr)
-{
-    /*
-     * Check widgets for requested height values;
-     */
-    if (limitsPtr->flags & LIMITS_NOM_SET) {
-	height = limitsPtr->nom;	/* Override initial value */
-    }
-    if (height < limitsPtr->min) {
-	height = limitsPtr->min;	/* Bounded by minimum value */
-    } 
-    if (height > limitsPtr->max) {
-	height = limitsPtr->max;	/* Bounded by maximum value */
-    }
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqWidth --
- *
- *	Returns the width requested by the window embedded in the given pane.
- *	The requested space also includes any internal padding which has been
- *	designated for this widget.
- *
- *	The requested width of the widget is always bounded by the limits set
- *	in panePtr->reqWidth.
- *
- * Results:
- *	Returns the requested width of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqWidth(Pane *panePtr)
-{
-    int w;
-
-    w = (2 * panePtr->iPadX);		/* Start with any addition padding
-					 * requested for the pane. */
-    if (panePtr->tkwin != NULL) {	/* Add in the requested width. */
-	w += Tk_ReqWidth(panePtr->tkwin);
-    }
-    return BoundWidth(w, &panePtr->reqWidth);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqHeight --
- *
- *	Returns the height requested by the widget starting in the given pane.
- *	The requested space also includes any internal padding which has been
- *	designated for this widget.
- *
- *	The requested height of the widget is always bounded by the limits set
- *	in panePtr->reqHeight.
- *
- * Results:
- *	Returns the requested height of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqHeight(Pane *panePtr)
-{
-    int h;
-
-    h = 2 * panePtr->iPadY;
-    if (panePtr->tkwin != NULL) {
-	h += Tk_ReqHeight(panePtr->tkwin);
-    }
-    h = BoundHeight(h, &panePtr->reqHeight);
-    return h;
-}
-
-static int
-GetReqDrawerWidth(Pane *panePtr)
-{
-    int w;
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    w = GetReqWidth(panePtr); 
-    if ((panePtr->side & SIDE_HORIZONTAL) && (panePtr->flags & HANDLE)) {
-	w += setPtr->handleSize;
-    }
-    if ((Tk_Width(setPtr->tkwin) > 1) && (Tk_Width(setPtr->tkwin) < w)) {
-	w = Tk_Width(setPtr->tkwin);
-    }
-    return w;
-}
-
-static int
-GetReqDrawerHeight(Pane *panePtr)
-{
-    int h;
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    h = GetReqHeight(panePtr);
-    if ((panePtr->side & SIDE_VERTICAL) && (panePtr->flags & HANDLE)) {
-	h += panePtr->setPtr->handleSize;
-    }
-    if ((Tk_Height(setPtr->tkwin) > 1) && (Tk_Height(setPtr->tkwin) < h)) {
-	h = Tk_Height(setPtr->tkwin);
-    }
-    return h;
-}
-
-static void
-EventuallyRedraw(Paneset *setPtr)
-{
-    if ((setPtr->flags & REDRAW_PENDING) == 0) {
-	setPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayPaneset, setPtr);
-    }
-}
-
-static int
-SetDrawerVariable(Pane *panePtr) 
-{
-    Paneset *setPtr;
-    Tcl_Obj *objPtr;
-    int state;
-    int result;
-
-    result = TCL_OK;
-    state = (panePtr->flags & CLOSED) ? FALSE : TRUE;
-    objPtr = (state) ? panePtr->openValueObjPtr : panePtr->closeValueObjPtr;
-    if (objPtr == NULL) {
-	objPtr = Tcl_NewBooleanObj(state);
-    }
-    setPtr = panePtr->setPtr;
-    Tcl_IncrRefCount(objPtr);
-    if (Tcl_ObjSetVar2(setPtr->interp, panePtr->variableObjPtr, NULL, 
-		objPtr, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
-	result = TCL_ERROR;
-    }
-    Tcl_DecrRefCount(objPtr);
-    return result;
-}
-
-static void
-ClearTags(Pane *panePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	Blt_HashEntry *h2Ptr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)panePtr);
-	if (h2Ptr != NULL) {
-	    Blt_DeleteHashEntry(tablePtr, h2Ptr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyPane --
- *
- *	Removes the Pane structure from the hash table and frees the memory
- *	allocated by it.  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the pane is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyPane(Pane *panePtr)
-{
-    Paneset *setPtr;
-
-    ClearTags(panePtr);
-    setPtr = panePtr->setPtr;
-    Blt_FreeOptions(paneSpecs, (char *)panePtr, setPtr->display, 0);
-    if (panePtr->timerToken != (Tcl_TimerToken)0) {
-	Tcl_DeleteTimerHandler(panePtr->timerToken);
-	panePtr->timerToken = 0;
-    }
-    if (panePtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&setPtr->paneTable, panePtr->hashPtr);
-	panePtr->hashPtr = NULL;
-    }
-    if (panePtr->link != NULL) {
-	Blt_Chain_DeleteLink(setPtr->chain, panePtr->link);
-	panePtr->link = NULL;
-    }
-    if (panePtr->cmdToken != NULL) {
-	Tcl_DeleteCommandFromToken(setPtr->interp, panePtr->cmdToken);
-    }
-    if (panePtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = panePtr->tkwin;
-	Tk_DeleteEventHandler(tkwin, StructureNotifyMask, PaneEventProc, 
-		panePtr);
-	Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL, panePtr);
-	Tk_DestroyWindow(tkwin);
-    }
-    if (panePtr->handle != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = panePtr->handle;
-	Tk_DeleteEventHandler(tkwin, 
-		ExposureMask|FocusChangeMask|StructureNotifyMask, 
-		HandleEventProc, panePtr);
-	Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL, panePtr);
-	panePtr->handle = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-    Blt_Free(panePtr);
-}
-
-static void
-CloseDrawer(Pane *panePtr) 
-{
-    Paneset *setPtr;
-
-    if (panePtr->flags & (CLOSED|DISABLED)) {
-	return;				/* Already closed or disabled. */
-    }
-    if (Tk_IsMapped(panePtr->tkwin)) {
-	Tk_UnmapWindow(panePtr->tkwin);
-    }
-    if (Tk_IsMapped(panePtr->handle)) {
-	Tk_UnmapWindow(panePtr->handle);
-    }
-    setPtr = panePtr->setPtr;
-    if (panePtr->side & SIDE_VERTICAL) {
-	panePtr->y = -1;
-    } else {
-	panePtr->x = -1;
-    }
-    if (panePtr->timerToken != (Tcl_TimerToken)0) {
-	Tcl_DeleteTimerHandler(panePtr->timerToken);
-	panePtr->timerToken = 0;
-    }
-    panePtr->flags |= CLOSED;
-    SetDrawerVariable(panePtr);
-}
-
-
-static void
-EventuallyOpenDrawer(Pane *panePtr) 
-{
-    Paneset *setPtr;
-
-    if ((panePtr->flags & (CLOSED|DISABLED)) != HIDE) {
-	return;				/* Already open or disabled. */
-    }
-    setPtr = panePtr->setPtr;
-    panePtr->flags &= ~CLOSED;
-    SetDrawerVariable(panePtr);
-    if (setPtr->flags & ANIMATE) {
-	int anchor;
-
-	if (panePtr->side & SIDE_VERTICAL) {
-	    panePtr->scrollTarget = GetReqDrawerHeight(panePtr);
-	    if (panePtr->y < 0) {
-		panePtr->y = 0;
-	    }
-	    anchor = panePtr->y;
-	} else {
-	    panePtr->scrollTarget = GetReqDrawerWidth(panePtr);
-	    if (panePtr->x < 0) {
-		panePtr->x = 0;
-	    }
-	    anchor = panePtr->x;
-	}
-	if (panePtr->timerToken != (Tcl_TimerToken)0) {
-	    Tcl_DeleteTimerHandler(panePtr->timerToken);
-	    panePtr->timerToken = 0;
-	}
-	panePtr->scrollIncr = (panePtr->nom > anchor) ? -setPtr->scrollUnits : 
-	    setPtr->scrollUnits;
-	panePtr->timerToken = Tcl_CreateTimerHandler(setPtr->interval, 
-		DrawerTimerProc, panePtr);
-    } else {
-	if (panePtr->side & SIDE_VERTICAL) {
-	    panePtr->size = panePtr->y = GetReqDrawerHeight(panePtr);
-	} else {
-	    panePtr->size = panePtr->x = GetReqDrawerWidth(panePtr);
-	}
-	SetDrawerVariable(panePtr);
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-static void
-EventuallyCloseDrawer(Pane *panePtr) 
-{
-    Paneset *setPtr;
-
-    if (panePtr->flags & (DISABLED|CLOSED)) {
-	return;				/* Already closed or disabled. */
-    }
-    setPtr = panePtr->setPtr;
-    if (setPtr->flags & ANIMATE) {
-	panePtr->scrollTarget = -1;
-	if (panePtr->timerToken != (Tcl_TimerToken)0) {
-	    Tcl_DeleteTimerHandler(panePtr->timerToken);
-	    panePtr->timerToken = 0;
-	}
-	panePtr->scrollIncr = -setPtr->scrollUnits;
-	panePtr->timerToken = Tcl_CreateTimerHandler(setPtr->interval, 
-		DrawerTimerProc, panePtr);
-    } else {
-	CloseDrawer(panePtr);
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawerTimerProc --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawerTimerProc(ClientData clientData)
-{
-    Pane *panePtr = clientData;
-    int *anchorPtr;
-    Paneset *setPtr;
-
-    assert((panePtr->flags & CLOSED) == 0);
-    setPtr = panePtr->setPtr;
-    anchorPtr = (panePtr->side & SIDE_VERTICAL) ? &panePtr->y : &panePtr->x;
-    if (*anchorPtr != panePtr->scrollTarget) {
-	*anchorPtr += panePtr->scrollIncr;
-	if (((panePtr->scrollIncr > 0) && (*anchorPtr>panePtr->scrollTarget)) || 
-	    ((panePtr->scrollIncr < 0) && (*anchorPtr<panePtr->scrollTarget))) {
-	    *anchorPtr = panePtr->scrollTarget;
-	}
-    }
-    if (panePtr->scrollTarget == *anchorPtr) {
-	if (panePtr->timerToken != (Tcl_TimerToken)0) {
-	    Tcl_DeleteTimerHandler(panePtr->timerToken);
-	    panePtr->timerToken = 0;
-	}
-	if (*anchorPtr < 0) {
-	    CloseDrawer(panePtr);
-	}
-    } else if (setPtr->flags & ANIMATE) {
-	panePtr->scrollIncr += panePtr->scrollIncr;
-	panePtr->timerToken = Tcl_CreateTimerHandler(setPtr->interval, 
-		DrawerTimerProc, panePtr);
-    }
-    EventuallyRedraw(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * DrawerVarTraceProc --
- *
- *	This procedure is invoked when someone changes the state variable
- *	associated with a radiobutton or checkbutton entry.  The entry's
- *	selected state is set to match the value of the variable.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The drawer may become opened or closed.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-DrawerVarTraceProc(
-    ClientData clientData,		/* Information about the item. */
-    Tcl_Interp *interp,			/* Interpreter containing variable. */
-    const char *name1,			/* First part of variable's name. */
-    const char *name2,			/* Second part of variable's name. */
-    int flags)				/* Describes what just happened. */
-{
-    Pane *panePtr = clientData;
-    Tcl_Obj *objPtr;
-    int bool;
-
-    assert(panePtr->variableObjPtr != NULL);
-    if (flags & TCL_INTERP_DESTROYED) {
-    	return NULL;			/* Interpreter is going away. */
-    }
-    /*
-     * If the variable is being unset, then re-establish the trace.
-     */
-    if (flags & TCL_TRACE_UNSETS) {
-	panePtr->flags &= ~CLOSED;
-	if (flags & TCL_TRACE_DESTROYED) {
-	    char *varName;
-
-	    varName = Tcl_GetString(panePtr->variableObjPtr);
-	    Tcl_TraceVar(interp, varName, VAR_FLAGS, DrawerVarTraceProc, 
-		clientData);
-	}
-	goto done;
-    }
-
-    /*
-     * Use the value of the variable to update the selected status of the
-     * item.
-     */
-    objPtr = Tcl_ObjGetVar2(interp, panePtr->variableObjPtr, NULL, 
-	TCL_GLOBAL_ONLY);
-    if (objPtr == NULL) {
-	return NULL;			/* Can't get value of variable. */
-    }
-    bool = 0;
-    if (panePtr->openValueObjPtr == NULL) {
-	if (Tcl_GetBooleanFromObj(NULL, objPtr, &bool) != TCL_OK) {
-	    return NULL;
-	}
-    } else {
-	bool =  (strcmp(Tcl_GetString(objPtr), 
-		Tcl_GetString(panePtr->openValueObjPtr)) == 0);
-    }
-    if (bool) {
-	EventuallyOpenDrawer(panePtr);
-    } else {
-	EventuallyCloseDrawer(panePtr);
-    }
- done:
-    EventuallyRedraw(panePtr->setPtr);
-    return NULL;			/* Done. */
-}
-
-/*ARGSUSED*/
-static void
-FreeTraceVarProc(ClientData clientData, Display *display, char *widgRec, 
-		 int offset)
-{
-    Tcl_Obj **varObjPtrPtr = (Tcl_Obj **)(widgRec + offset);
-
-    if (*varObjPtrPtr != NULL) {
-	Pane *panePtr = (Pane *)(widgRec);
-	Paneset *setPtr;
-	const char *varName;
-
-	setPtr = panePtr->setPtr;
-	varName = Tcl_GetString(*varObjPtrPtr);
-	Tcl_UntraceVar(setPtr->interp, varName, VAR_FLAGS, DrawerVarTraceProc, 
-		panePtr);
-	Tcl_DecrRefCount(*varObjPtrPtr);
-	*varObjPtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
-
- * ObjToTraceVarProc --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTraceVarProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing style. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj **varObjPtrPtr = (Tcl_Obj **)(widgRec + offset);
-    Pane *panePtr = (Pane *)(widgRec);
-    const char *varName;
-
-    /* Remove the current trace on the variable. */
-    if (*varObjPtrPtr != NULL) {
-	varName = Tcl_GetString(*varObjPtrPtr);
-	Tcl_UntraceVar(interp, varName, VAR_FLAGS, DrawerVarTraceProc, panePtr);
-	Tcl_DecrRefCount(*varObjPtrPtr);
-	*varObjPtrPtr = NULL;
-    }
-    varName = Tcl_GetString(objPtr);
-    if ((varName[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) {
-	return TCL_OK;
-    }
-    *varObjPtrPtr = objPtr;
-    Tcl_IncrRefCount(objPtr);
-    Tcl_TraceVar(interp, varName, VAR_FLAGS, DrawerVarTraceProc, panePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceVarToObjProc --
- *
- *	Return the name of the trace variable.
- *
- * Results:
- *	The name of the variable representing the drawer is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TraceVarToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *objPtr = *(Tcl_Obj **)(widgRec + offset); 
-
-    if (objPtr != NULL) {
-	return objPtr;
-    } 
-    return Tcl_NewStringObj("", -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToChild --
- *
- *	Converts a window name into Tk window.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToChild(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results */
-    Tk_Window parent,			/* Parent window */
-    Tcl_Obj *objPtr,			/* String representation. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Pane *panePtr = (Pane *)widgRec;
-    Paneset *setPtr;
-    Tk_Window *tkwinPtr = (Tk_Window *)(widgRec + offset);
-    Tk_Window old, tkwin;
-    char *string;
-
-    old = *tkwinPtr;
-    tkwin = NULL;
-    setPtr = panePtr->setPtr;
-    string = Tcl_GetString(objPtr);
-    if (string[0] != '\0') {
-	tkwin = Tk_NameToWindow(interp, string, setPtr->tkwin);
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (tkwin == old) {
-	    return TCL_OK;
-	}
-	/*
-	 * Allow only widgets that are children of the paneset/drawer window
-	 * to be used.  We are using the window as viewport to clip the
-	 * children are necessary.
-	 */
-	parent = Tk_Parent(tkwin);
-	if (parent != setPtr->tkwin) {
-	    Tcl_AppendResult(interp, "can't manage \"", Tk_PathName(tkwin),
-		"\" in paneset \"", Tk_PathName(setPtr->tkwin), "\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tk_ManageGeometry(tkwin, &panesetMgrInfo, panePtr);
-	Tk_CreateEventHandler(tkwin, StructureNotifyMask, PaneEventProc, 
-		panePtr);
-	/*
-	 * We need to make the window to exist immediately.  If the window is
-	 * torn off (placed into another container window), the timing between
-	 * the container and the its new child (this window) gets tricky.
-	 * This should work for Tk 4.2.
-	 */
-	Tk_MakeWindowExist(tkwin);
-    }
-    if (old != NULL) {
-	Tk_DeleteEventHandler(old, StructureNotifyMask, PaneEventProc, panePtr);
-	Tk_ManageGeometry(old, (Tk_GeomMgr *)NULL, panePtr);
-	Tk_UnmapWindow(old);
-    }
-    *tkwinPtr = tkwin;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildToObj --
- *
- *	Converts the Tk window back to a Tcl_Obj (i.e. its name).
- *
- * Results:
- *	The name of the window is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ChildToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window parent,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tk_Window tkwin = *(Tk_Window *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (tkwin == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	objPtr = Tcl_NewStringObj(Tk_PathName(tkwin), -1);
-    }
-    return objPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToMode --
- *
- *	Converts an adjust mode name into a enum.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToMode(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window parent,			/* Parent window */
-    Tcl_Obj *objPtr,			/* String representation. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    AdjustMode *modePtr = (AdjustMode *)(widgRec + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "slinky") == 0) {
-	*modePtr = MODE_SLINKY;
-    } else if (strcmp(string, "givetake") == 0) {
-	*modePtr = MODE_GIVETAKE;
-    } else if (strcmp(string, "spreadsheet") == 0) {
-	*modePtr = MODE_SPREADSHEET;
-    } else {
-	Tcl_AppendResult(interp, "unknown mode \"", string, "\": should be "
-		"givetake, slinky, or spreadsheet\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildToObj --
- *
- *	Converts the enum back to a mode string (i.e. its name).
- *
- * Results:
- *	The name of the mode is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ModeToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window parent,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    AdjustMode mode = *(AdjustMode *)(widgRec + offset);
-    const char *string;
-
-    switch (mode) {
-    case MODE_SLINKY: 
-	string = "slinky"; 
-	break;
-    case MODE_GIVETAKE: 
-	string = "givetake"; 
-	break;
-    case MODE_SPREADSHEET: 
-	string = "spreadsheet"; 
-	break;
-    default:
-	string = "???"; 
-	break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToOrientProc --
- *
- *	Converts the string representing a state into a bitflag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToOrientProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representing state. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Paneset *setPtr = (Paneset *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    const char *string;
-    int orient;
-    int length;
-
-    string = Tcl_GetString(objPtr);
-    length = strlen(string);
-    if (strncmp(string, "vertical", length) == 0) {
-	orient = VERTICAL;
-    } else if (strncmp(string, "horizontal", length) == 0) {
-	orient = 0;
-    } else {
-	Tcl_AppendResult(interp, "bad orientation \"", string,
-	    "\": must be vertical or horizontal", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *flagsPtr &= ~VERTICAL;
-    *flagsPtr |= orient;
-    setPtr->flags |= LAYOUT_PENDING;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OrientToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-OrientToObjProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget information record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int orient = *(unsigned int *)(widgRec + offset);
-    const char *string;
-
-    if (orient & VERTICAL) {
-	string = "vertical";	
-    } else {
-	string = "horizontal";  
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-
-
-static void
-EventuallyRedrawHandle(Pane *panePtr)
-{
-    if ((panePtr->flags & REDRAW_PENDING) == 0) {
-	panePtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayHandle, panePtr);
-    }
-}
-
-
-static Pane *
-FirstPane(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if ((panePtr->flags & (HIDE|DISABLED)) == 0) {
-	    return panePtr;
-	}
-    }
-    return NULL;
-}
-
-static Pane *
-LastPane(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(setPtr->chain); link != NULL;
-	 link = Blt_Chain_PrevLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if ((panePtr->flags & (HIDE|DISABLED)) == 0) {
-	    return panePtr;
-	}
-    }
-    return NULL;
-}
-
-
-static Pane *
-NextPane(Pane *panePtr)
-{
-    if (panePtr != NULL) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_NextLink(panePtr->link); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    panePtr = Blt_Chain_GetValue(link);
-	    if ((panePtr->flags & (HIDE|DISABLED)) == 0) {
-		return panePtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-static Pane *
-PrevPane(Pane *panePtr)
-{
-    if (panePtr != NULL) {
-	Blt_ChainLink link;
-	
-	for (link = Blt_Chain_PrevLink(panePtr->link); link != NULL; 
-	     link = Blt_Chain_PrevLink(link)) {
-	    panePtr = Blt_Chain_GetValue(link);
-	    if ((panePtr->flags & HIDE) == 0) {
-		return panePtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PanesetEventProc --
- *
- *	This procedure is invoked by the Tk event handler when the container
- *	widget is reconfigured or destroyed.
- *
- *	The paneset will be rearranged at the next idle point if the container
- *	widget has been resized or moved. There's a distinction made between
- *	parent and non-parent container arrangements.  When the container is
- *	the parent of the embedded widgets, the widgets will automatically
- *	keep their positions relative to the container, even when the
- *	container is moved.  But if the container is not the parent, those
- *	widgets have to be moved manually.  This can be a performance hit in
- *	rare cases where we're scrolling the container (by moving the window)
- *	and there are lots of non-child widgets arranged inside.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the paneset associated with tkwin to have its layout
- *	re-computed and drawn at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PanesetEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Paneset *setPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(setPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (setPtr->tkwin != NULL) {
-	    Blt_DeleteWindowInstanceData(setPtr->tkwin);
-	    setPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(setPtr->interp, setPtr->cmdToken);
-	}
-	if (setPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayPaneset, setPtr);
-	}
-	Tcl_EventuallyFree(setPtr, PanesetFreeProc);
-    } else if (eventPtr->type == ConfigureNotify) {
-	setPtr->anchorPtr = LastPane(setPtr); /* Reset anchor pane. */
-	/* setPtr->flags |= LAYOUT_PENDING; */
-	setPtr->anchorPtr = LastPane(setPtr);
-	EventuallyRedraw(setPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneEventProc --
- *
- *	This procedure is invoked by the Tk event handler when StructureNotify
- *	events occur in a widget managed by the paneset.
- *
- *	For example, when a managed widget is destroyed, it frees the
- *	corresponding pane structure and arranges for the paneset layout to be
- *	re-computed at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	If the managed widget was deleted, the Pane structure gets cleaned up
- *	and the paneset is rearranged.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PaneEventProc(
-    ClientData clientData,		/* Pointer to Pane structure for
-					 * widget referred to by eventPtr. */
-    XEvent *eventPtr)			/* Describes what just happened. */
-{
-    Pane *panePtr = (Pane *)clientData;
-    Paneset *setPtr = panePtr->setPtr;
-
-    if (eventPtr->type == ConfigureNotify) {
-	int borderWidth;
-
-	if (panePtr->tkwin == NULL) {
-	    return;
-	}
-	borderWidth = Tk_Changes(panePtr->tkwin)->border_width;
-	if (panePtr->borderWidth != borderWidth) {
-	    panePtr->borderWidth = borderWidth;
-	    EventuallyRedraw(setPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	panePtr->tkwin = NULL;
-	Tcl_EventuallyFree(panePtr, PaneFreeProc);
-	setPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(setPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneCustodyProc --
- *
- * 	This procedure is invoked when a widget has been stolen by another
- * 	geometry manager.  The information and memory associated with the
- * 	widget is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the paneset to have its layout recomputed at the next
- *	idle point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-PaneCustodyProc(ClientData clientData, Tk_Window tkwin)
-{
-    Pane *panePtr = (Pane *)clientData;
-    Paneset *setPtr = panePtr->setPtr;
-
-    if (Tk_IsMapped(panePtr->tkwin)) {
-	Tk_UnmapWindow(panePtr->tkwin);
-    }
-    fprintf(stderr, "PaneCustodyProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-    DestroyPane(panePtr);
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for widgets managed by
- *	the paneset geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the paneset to have its layout re-computed and re-arranged
- *	at the next idle point.
- *
- * ----------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-PaneGeometryProc(ClientData clientData, Tk_Window tkwin)
-{
-    Pane *panePtr = (Pane *)clientData;
-
-    panePtr->setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(panePtr->setPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleEventProc --
- *
- *	This procedure is invoked by the Tk event handler when various events
- *	occur in the pane/drawer handle subwindow maintained by this widget.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-HandleEventProc(
-    ClientData clientData,		/* Pointer to Pane structure for
-					 * handle referred to by eventPtr. */
-    XEvent *eventPtr)			/* Describes what just happened. */
-{
-    Pane *panePtr = (Pane *)clientData;
-    Paneset *setPtr = panePtr->setPtr;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedrawHandle(panePtr);
-	}
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		panePtr->flags |= FOCUS;
-	    } else {
-		panePtr->flags &= ~FOCUS;
-	    }
-	    EventuallyRedrawHandle(panePtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	if (panePtr->handle == NULL) {
-	    return;
-	}
-	EventuallyRedrawHandle(panePtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	panePtr->handle = NULL;
-	Tcl_DeleteCommandFromToken(setPtr->interp, panePtr->cmdToken);
-    } 
-}
-
-static Blt_HashTable *
-GetTagTable(Paneset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&setPtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return NULL;			/* No tag by name. */
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static int
-HasTag(Pane *panePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return TRUE;
-    }
-    tablePtr = GetTagTable(panePtr->setPtr, tagName);
-    if (tablePtr == NULL) {
-	return FALSE;
-    }
-    hPtr = Blt_FindHashEntry(tablePtr, (char *)panePtr);
-    if (hPtr == NULL) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-static Blt_HashTable *
-AddTagTable(Paneset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&setPtr->tagTable, tagName, &isNew);
-    if (isNew) {
-	tablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-	Blt_InitHashTable(tablePtr, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tablePtr);
-    } else {
-	tablePtr = Blt_GetHashValue(hPtr);
-    }
-    return tablePtr;
-}
-
-static void
-AddTag(Paneset *setPtr, Pane *panePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    int isNew;
-
-    tablePtr = AddTagTable(setPtr, tagName);
-    hPtr = Blt_CreateHashEntry(tablePtr, (char *)panePtr, &isNew);
-    if (isNew) {
-	Blt_SetHashValue(hPtr, panePtr);
-    }
-}
-
-
-static void
-ForgetTag(Paneset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return;				/* Can't remove tag "all". */
-    }
-    hPtr = Blt_FindHashEntry(&setPtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return;				/* No tag by name. */
-    }
-    tablePtr = Blt_GetHashValue(hPtr);
-    Blt_DeleteHashTable(tablePtr);
-    Blt_Free(tablePtr);
-    Blt_DeleteHashEntry(&setPtr->tagTable, hPtr);
-}
-
-static void
-DestroyTags(Paneset *setPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashTable(tablePtr);
-    }
-}
-
-static void
-RemoveTag(Pane *panePtr, const char *tagName)
-{
-    Blt_HashTable *tablePtr;
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    tablePtr = GetTagTable(setPtr, tagName);
-    if (tablePtr != NULL) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FindHashEntry(tablePtr, (char *)panePtr);
-	if (hPtr != NULL) {
-	    Blt_DeleteHashEntry(tablePtr, hPtr);
-	}
-    }
-}
-
-static INLINE Pane *
-BeginPane(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_FirstLink(setPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static INLINE Pane *
-EndPane(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_LastLink(setPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static Pane *
-StepPane(Pane *panePtr)
-{
-    if (panePtr != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_NextLink(panePtr->link); 
-	if (link != NULL) {
-	    return Blt_Chain_GetValue(link);
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextTaggedPane --
- *
- *	Returns the next pane derived from the given tag.
- *
- * Results:
- *	Returns the pointer to the next pane in the iterator.  If no more panes
- *	are available, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Pane *
-NextTaggedPane(PaneIterator *iterPtr)
-{
-    switch (iterPtr->type) {
-    case ITER_TAG:
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	    if (hPtr != NULL) {
-		return Blt_GetHashValue(hPtr);
-	    }
-	    break;
-	}
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    Pane *panePtr;
-	    
-	    panePtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return panePtr;
-	}
-	break;
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Pane *panePtr;
-		
-		panePtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(panePtr->name, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return panePtr;
-		}
-	    }
-	    break;
-	}
-    default:
-	break;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstTaggedPane --
- *
- *	Returns the first pane derived from the given tag.
- *
- * Results:
- *	Returns the first pane in the sequence.  If no more panes are in the
- *	list, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Pane *
-FirstTaggedPane(PaneIterator *iterPtr)
-{
-    switch (iterPtr->type) {
-    case ITER_TAG:
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	    if (hPtr != NULL) {
-		return Blt_GetHashValue(hPtr);
-	    }
-	}
-	break
-;
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    Pane *panePtr;
-	    
-	    panePtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return panePtr;
-	}
-	break;
-
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Pane *panePtr;
-		
-		panePtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(panePtr->name, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return panePtr;
-		}
-	    }
-	    break;
-	}
-    case ITER_SINGLE:
-	return iterPtr->startPtr;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPaneFromObj --
- *
- *	Gets the pane associated the given index, tag, or label.  This routine
- *	is used when you want only one pane.  It's an error if more than one
- *	pane is specified (e.g. "all" tag or range "1:4").  It's also an error
- *	if the tag is empty (no panes are currently tagged).
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetPaneFromObj(Tcl_Interp *interp, Paneset *setPtr, Tcl_Obj *objPtr,
-	      Pane **panePtrPtr)
-{
-    PaneIterator iter;
-    Pane *firstPtr;
-
-    if (GetPaneIterator(interp, setPtr, objPtr, &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    firstPtr = FirstTaggedPane(&iter);
-    if (firstPtr != NULL) {
-	Pane *nextPtr;
-
-	nextPtr = NextTaggedPane(&iter);
-	if (nextPtr != NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "multiple panes specified by \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *panePtrPtr = firstPtr;
-    return TCL_OK;
-}
-
-static int
-GetPaneByIndex(Tcl_Interp *interp, Paneset *setPtr, const char *string, 
-	      int length, Pane **panePtrPtr)
-{
-    Pane *panePtr;
-    char c;
-    long pos;
-
-    panePtr = NULL;
-    c = string[0];
-    if (Tcl_GetLong(NULL, string, &pos) == TCL_OK) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_GetNthLink(setPtr->chain, pos);
-	if (link != NULL) {
-	    panePtr = Blt_Chain_GetValue(link);
-	} 
-	if (panePtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find pane: bad index \"", 
-			string, "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	panePtr = setPtr->activePtr;
-    } else if ((c == 'f') && (strcmp(string, "first") == 0)) {
-	panePtr = FirstPane(setPtr);
-    } else if ((c == 'l') && (strcmp(string, "last") == 0)) {
-	panePtr = LastPane(setPtr);
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	panePtr = LastPane(setPtr);
-    } else if ((c == 'n') && (strcmp(string, "none") == 0)) {
-	panePtr = NULL;
-    } else {
-	return TCL_CONTINUE;
-    }
-    *panePtrPtr = panePtr;
-    return TCL_OK;
-}
-
-static Pane *
-GetPaneByName(Paneset *setPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    
-    hPtr = Blt_FindHashEntry(&setPtr->paneTable, string);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPaneIterator --
- *
- *	Converts a string representing a pane index into an pane pointer.  The
- *	index may be in one of the following forms:
- *
- *	 number		Pane at index in the list of panes.
- *	 @x,y		Pane closest to the specified X-Y screen coordinates.
- *	 "active"	Pane where mouse pointer is located.
- *	 "posted"       Pane is the currently posted cascade pane.
- *	 "next"		Next pane from the focus pane.
- *	 "previous"	Previous pane from the focus pane.
- *	 "end"		Last pane.
- *	 "none"		No pane.
- *
- *	 number		Pane at position in the list of panes.
- *	 @x,y		Pane closest to the specified X-Y screen coordinates.
- *	 "active"	Pane mouse is located over.
- *	 "focus"	Pane is the widget's focus.
- *	 "select"	Currently selected pane.
- *	 "right"	Next pane from the focus pane.
- *	 "left"		Previous pane from the focus pane.
- *	 "up"		Next pane from the focus pane.
- *	 "down"		Previous pane from the focus pane.
- *	 "end"		Last pane in list.
- *	"name:string"   Pane named "string".
- *	"index:number"  Pane at index number in list of panes.
- *	"tag:string"	Pane(s) tagged by "string".
- *	"label:pattern"	Pane(s) with label matching "pattern".
- *	
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via panePtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetPaneIterator(Tcl_Interp *interp, Paneset *setPtr, Tcl_Obj *objPtr,
-	       PaneIterator *iterPtr)
-{
-    Pane *panePtr, *startPtr, *endPtr;
-    Blt_HashTable *tablePtr;
-    char *string;
-    char c;
-    int nBytes;
-    int length;
-    int result;
-
-    iterPtr->setPtr = setPtr;
-    iterPtr->type = ITER_SINGLE;
-    iterPtr->tagName = Tcl_GetStringFromObj(objPtr, &nBytes);
-    iterPtr->nextPtr = NULL;
-    iterPtr->startPtr = iterPtr->endPtr = NULL;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    iterPtr->startPtr = iterPtr->endPtr = setPtr->activePtr;
-    startPtr = endPtr = panePtr = NULL;
-    if (c == '\0') {
-	startPtr = endPtr = NULL;
-    } 
-    iterPtr->type = ITER_SINGLE;
-    result = GetPaneByIndex(interp, setPtr, string, length, &panePtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    if (result == TCL_OK) {
-	iterPtr->startPtr = iterPtr->endPtr = panePtr;
-	return TCL_OK;
-    }
-    if ((c == 'a') && (strcmp(iterPtr->tagName, "all") == 0)) {
-	iterPtr->type  = ITER_ALL;
-	iterPtr->link = Blt_Chain_FirstLink(setPtr->chain);
-    } else if ((c == 'i') && (length > 6) && 
-	       (strncmp(string, "index:", 6) == 0)) {
-	if (GetPaneByIndex(interp, setPtr, string + 6, length - 6, &panePtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	iterPtr->startPtr = iterPtr->endPtr = panePtr;
-    } else if ((c == 'n') && (length > 5) && 
-	       (strncmp(string, "name:", 5) == 0)) {
-	panePtr = GetPaneByName(setPtr, string + 5);
-	if (panePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a pane named \"", string + 5,
-			"\" in \"", Tk_PathName(setPtr->tkwin), "\"",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->startPtr = iterPtr->endPtr = panePtr;
-    } else if ((c == 't') && (length > 4) && 
-	       (strncmp(string, "tag:", 4) == 0)) {
-	Blt_HashTable *tablePtr;
-
-	tablePtr = GetTagTable(setPtr, string + 4);
-	if (tablePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tag \"", string + 5,
-			"\" in \"", Tk_PathName(setPtr->tkwin), "\"",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->tagName = string + 4;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else if ((c == 'l') && (length > 6) && 
-	       (strncmp(string, "label:", 6) == 0)) {
-	iterPtr->link = Blt_Chain_FirstLink(setPtr->chain);
-	iterPtr->tagName = string + 6;
-	iterPtr->type = ITER_PATTERN;
-    } else if ((panePtr = GetPaneByName(setPtr, string)) != NULL) {
-	iterPtr->startPtr = iterPtr->endPtr = panePtr;
-    } else if ((tablePtr = GetTagTable(setPtr, string)) != NULL) {
-	iterPtr->tagName = string;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find pane index, name, or tag \"", 
-		string, "\" in \"", Tk_PathName(setPtr->tkwin), "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPane --
- *
- *	This procedure creates and initializes a new Pane structure to hold a
- *	widget.  A valid widget has a parent widget that is either a) the
- *	container widget itself or b) a mutual ancestor of the container widget.
- *
- * Results:
- *	Returns a pointer to the new structure describing the new widget pane.
- *	If an error occurred, then the return value is NULL and an error message
- *	is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated and initialized for the Pane structure.
- *
- * ---------------------------------------------------------------------------- 
- */
-static Pane *
-NewPane(Tcl_Interp *interp, Paneset *setPtr, const char *name)
-{
-    Blt_HashEntry *hPtr;
-    Pane *panePtr;
-    int isNew;
-    const char *object, *className;
-    char string[200];
-	
-    if (setPtr->type == DRAWER) {
-	className = "DrawerHandle";
-	object = "drawer";
-    } else if (setPtr->type == PANESET) {
-	className = "PanesetSash";
-	object = "pane";
-    } else if (setPtr->type == FILMSTRIP) {
-	className = "FilmstripHandle";
-	object = "frame";
-    }
-    if (name == NULL) {
-	char *path;
-
-	/* Generate an unique subwindow name.  In theory you could have more
-	 * than one drawer widget assigned to the same window.  */
-	path = Blt_AssertMalloc(strlen(Tk_PathName(setPtr->tkwin)) + 200);
-	do {
-	    sprintf(string, "%s%lu", object, setPtr->nextId++);
-	    sprintf(path, "%s.%s", Tk_PathName(setPtr->tkwin), string);
-	} while (Tk_NameToWindow(interp, path, setPtr->tkwin) != NULL);
-	Blt_Free(path);
-	name = string;
-    } 
-    hPtr = Blt_CreateHashEntry(&setPtr->paneTable, name, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, object, " \"", name, "\" already exists.", 
-		(char *)NULL);
-	return NULL;
-    }
-    panePtr = Blt_AssertCalloc(1, sizeof(Pane));
-    Blt_ResetLimits(&panePtr->reqWidth);
-    Blt_ResetLimits(&panePtr->reqHeight);
-    Blt_ResetLimits(&panePtr->reqSize);
-    panePtr->setPtr = setPtr;
-    panePtr->name = Blt_GetHashKey(&setPtr->paneTable, hPtr);
-    panePtr->hashPtr = hPtr;
-    panePtr->anchor = TK_ANCHOR_CENTER;
-    panePtr->fill = FILL_NONE;
-    panePtr->nom  = LIMITS_NOM;
-    panePtr->size = panePtr->index = 0;
-    panePtr->flags = VIRGIN | SHOW_HANDLE;
-    if (setPtr->type == DRAWER) {
-	panePtr->flags |= CLOSED | HANDLE;
-	panePtr->resize = RESIZE_SHRINK;
-	panePtr->fill = TRUE;
-    } else {
-	panePtr->resize = RESIZE_BOTH;
-	panePtr->side = HANDLE_FARSIDE;
-    }
-    panePtr->weight = 1.0f;
-    Blt_SetHashValue(hPtr, panePtr);
-
-    /* Create handle. */
-    panePtr->handle = Tk_CreateWindow(interp, setPtr->tkwin, name,(char *)NULL);
-    Tk_CreateEventHandler(panePtr->handle, 
-			  ExposureMask|FocusChangeMask|StructureNotifyMask, 
-			  HandleEventProc, panePtr);
-    Tk_SetClass(panePtr->handle, className);
-    panePtr->cmdToken = Tcl_CreateObjCommand(interp, 
-	Tk_PathName(panePtr->handle), HandleInstCmdProc, panePtr, 
-	HandleInstCmdDeleteProc);
-    return panePtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneFreeProc --
- *
- *	Removes the Pane structure from the hash table and frees the memory
- *	allocated by it.  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the pane is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PaneFreeProc(DestroyData dataPtr)
-{
-    Pane *panePtr = (Pane *)dataPtr;
-
-    fprintf(stderr, "PaneFreeProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-    DestroyPane(panePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPaneset --
- *
- *	This procedure creates and initializes a new Paneset structure with
- *	tkwin as its container widget. The internal structures associated with
- *	the paneset are initialized.
- *
- * Results:
- *	Returns the pointer to the new Paneset structure describing the new
- *	paneset geometry manager.  If an error occurred, the return value will
- *	be NULL and an error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated and initialized, an event handler is set up to
- *	watch tkwin, etc.
- *
- *---------------------------------------------------------------------------
- */
-static Paneset *
-NewPaneset(Tcl_Interp *interp, Tcl_Obj *objPtr, int type)
-{
-    Paneset *setPtr;
-    Tk_Window tkwin;
-
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), 
-	Tcl_GetString(objPtr), (char *)NULL);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    if (type == PANESET) {
-	Tk_SetClass(tkwin, (char *)"Paneset");
-    } else if (type == FILMSTRIP) {
-	Tk_SetClass(tkwin, (char *)"Filmstrip");
-    }
-    setPtr = Blt_AssertCalloc(1, sizeof(Paneset));
-    setPtr->type = type;
-    setPtr->tkwin = tkwin;
-    setPtr->interp = interp;
-    setPtr->display = Tk_Display(tkwin);
-    setPtr->chain = Blt_Chain_Create();
-    setPtr->handleThickness = 2;
-    setPtr->handlePad.side1 = setPtr->handlePad.side2 = 2;
-    setPtr->relief = TK_RELIEF_FLAT;
-    setPtr->activeRelief = TK_RELIEF_RAISED;
-    setPtr->handleBW = 1;
-    setPtr->flags = LAYOUT_PENDING;
-    setPtr->mode = MODE_GIVETAKE;
-    setPtr->interval = 30;
-    setPtr->scrollUnits = 10;
-    setPtr->highlightThickness = 2;
-    Blt_SetWindowInstanceData(tkwin, setPtr);
-    Blt_InitHashTable(&setPtr->paneTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&setPtr->tagTable, BLT_STRING_KEYS);
-    Tk_CreateEventHandler(tkwin, ExposureMask|StructureNotifyMask, 
-			  PanesetEventProc, setPtr);
-    setPtr->chain = Blt_Chain_Create();
-    setPtr->cmdToken = Tcl_CreateObjCommand(interp, Tk_PathName(tkwin), 
-	PanesetInstCmdProc, setPtr, PanesetInstCmdDeleteProc);
-    setPtr->defVertCursor = Tk_GetCursor(interp, tkwin, DEF_VCURSOR);
-    setPtr->defHorzCursor = Tk_GetCursor(interp, tkwin, DEF_HCURSOR);
-    return setPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewDrawerset --
- *
- *	This procedure creates and initializes a new Paneset structure with
- *	tkwin as its container widget. The internal structures associated with
- *	the paneset are initialized.
- *
- * Results:
- *	Returns the pointer to the new Paneset structure describing the new
- *	paneset geometry manager.  If an error occurred, the return value will
- *	be NULL and an error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated and initialized, an event handler is set up to
- *	watch tkwin, etc.
- *
- *---------------------------------------------------------------------------
- */
-static Paneset *
-NewDrawerset(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Paneset *setPtr;
-    Tk_Window tkwin;
-    const char *string;
-    unsigned long count;
-
-    string = Tcl_GetString(objPtr);
-    tkwin = Tk_NameToWindow(interp, string, Tk_MainWindow(interp));
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    setPtr = Blt_AssertCalloc(1, sizeof(Paneset));
-    setPtr->tkwin = tkwin;
-    setPtr->type = DRAWER;
-    setPtr->interp = interp;
-    setPtr->display = Tk_Display(tkwin);
-    setPtr->chain = Blt_Chain_Create();
-    setPtr->handleThickness = 2;
-    setPtr->handlePad.side1 = setPtr->handlePad.side2 = 2;
-    setPtr->relief = TK_RELIEF_FLAT;
-    setPtr->activeRelief = TK_RELIEF_RAISED;
-    setPtr->handleBW = 1;
-    setPtr->flags = 0;
-    setPtr->interval = 30;
-    setPtr->scrollUnits = 10;
-    setPtr->highlightThickness = 2;
-    Blt_SetWindowInstanceData(tkwin, setPtr);
-    Blt_InitHashTable(&setPtr->paneTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&setPtr->tagTable, BLT_STRING_KEYS);
-    Tk_CreateEventHandler(tkwin, ExposureMask|StructureNotifyMask, 
-	PanesetEventProc, setPtr);
-    setPtr->chain = Blt_Chain_Create();
-    setPtr->name = Blt_AssertMalloc(strlen(string) + 200);
-    count = 1;
-    do {
-	sprintf(setPtr->name, "%s_drawerset%lu", string, count++);
-    }
-    while (Tcl_FindCommand(interp, setPtr->name, 
-			   (Tcl_Namespace *)NULL, 0) != NULL);
-    setPtr->cmdToken = Tcl_CreateObjCommand(interp, setPtr->name, 
-	DrawerInstCmdProc, setPtr, DrawerInstCmdDeleteProc);
-    setPtr->defVertCursor = Tk_GetCursor(interp, tkwin, DEF_VCURSOR);
-    setPtr->defHorzCursor = Tk_GetCursor(interp, tkwin, DEF_HCURSOR);
-    return setPtr;
-}
-
-
-static void
-RenumberPanes(Paneset *setPtr)
-{
-    int count;
-    Blt_ChainLink link;
-
-    count = 0;
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-	
-	panePtr = Blt_Chain_GetValue(link);
-	panePtr->index = count;
-	count++;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyPaneset --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- *	clean up the Paneset structure at a safe time (when no-one is using it
- *	anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the paneset geometry manager is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyPaneset(Paneset *setPtr)		/* Paneset structure */
-{
-    Blt_ChainLink link;
-
-    Blt_FreeOptions(panesetSpecs, (char *)setPtr, setPtr->display, 0);
-    /* Release the chain of entries. */
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	panePtr->link = NULL;		/* Don't disrupt this chain of
-					 * entries. */
-	panePtr->hashPtr = NULL;
-    fprintf(stderr, "PanesetFreeProc: DestoryPane(%x, %s)\n", panePtr, panePtr->name);
-	DestroyPane(panePtr);
-    }
-    Tk_FreeCursor(setPtr->display, setPtr->defHorzCursor);
-    Tk_FreeCursor(setPtr->display, setPtr->defVertCursor);
-    DestroyTags(setPtr);
-    Blt_Chain_Destroy(setPtr->chain);
-    Blt_DeleteHashTable(&setPtr->paneTable);
-    Blt_Free(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PanesetFreeProc --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- *	clean up the Paneset structure at a safe time (when no-one is using it
- *	anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the paneset geometry manager is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PanesetFreeProc(DestroyData dataPtr)	/* Paneset structure */
-{
-    Paneset *setPtr = (Paneset *)dataPtr;
-
-    DestroyPaneset(setPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given xy position is
- * 	in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |     x,y ---+
- *  		w   center   e      |     |
- *  		|            |      +-----+
- *  		sw --- s --- se
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TranslateAnchor(
-    int dx, int dy,			/* Difference between outer and inner
-					 * regions. */
-    Tk_Anchor anchor,			/* Direction of the anchor */
-    int *xPtr, int *yPtr)
-{
-    int x, y;
-
-    x = y = 0;
-    switch (anchor) {
-    case TK_ANCHOR_NW:			/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:			/* Left center */
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SW:			/* Lower left corner */
-	y = dy;
-	break;
-    case TK_ANCHOR_N:			/* Top center */
-	x = (dx / 2);
-	break;
-    case TK_ANCHOR_CENTER:		/* Centered */
-	x = (dx / 2);
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_S:			/* Bottom center */
-	x = (dx / 2);
-	y = dy;
-	break;
-    case TK_ANCHOR_NE:			/* Upper right corner */
-	x = dx;
-	break;
-    case TK_ANCHOR_E:			/* Right center */
-	x = dx;
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SE:			/* Lower right corner */
-	x = dx;
-	y = dy;
-	break;
-    }
-    *xPtr = (*xPtr) + x;
-    *yPtr = (*yPtr) + y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LeftSpan --
- *
- *	Sums the space requirements of all the panes.
- *
- * Results:
- *	Returns the space currently used by the paneset widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LeftSpan(Paneset *setPtr)
-{
-    int total;
-    Pane *panePtr;
-
-    total = 0;
-    /* The left span is every pane before and including) the anchor pane. */
-    for (panePtr = setPtr->anchorPtr; panePtr != NULL; 
-	 panePtr = PrevPane(panePtr)) {
-	total += panePtr->size;
-    }
-    return total;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RightSpan --
- *
- *	Sums the space requirements of all the panes.
- *
- * Results:
- *	Returns the space currently used by the paneset widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-RightSpan(Paneset *setPtr)
-{
-    int total;
-    Pane *panePtr;
-
-    total = 0;
-    for (panePtr = NextPane(setPtr->anchorPtr); panePtr != NULL; 
-	 panePtr = NextPane(panePtr)) {
-	total += panePtr->size;
-    }
-    return total;
-}
-
-
-static int
-LeftSpanLimits(Paneset *setPtr, int *minPtr, int *maxPtr)
-{
-    int total, min, max;
-    Pane *panePtr;
-
-    total = min = max = 0;
-    /* The left span is every pane before and including) the anchor pane. */
-    for (panePtr = setPtr->anchorPtr; panePtr != NULL; 
-	 panePtr = PrevPane(panePtr)) {
-	total += panePtr->size;
-	max += panePtr->max;
-	min += panePtr->min;
-    }
-    *minPtr = min;
-    *maxPtr = max;
-    return total;
-}
-
-
-static int
-RightSpanLimits(Paneset *setPtr, int *minPtr, int *maxPtr)
-{
-    int min, max, total;
-    Pane *panePtr;
-
-    total = min = max = 0;
-    for (panePtr = NextPane(setPtr->anchorPtr); panePtr != NULL; 
-	 panePtr = NextPane(panePtr)) {
-	total += panePtr->size;
-	max += panePtr->max;
-	min += panePtr->min;
-    }
-    *minPtr = min;
-    *maxPtr = max;
-    return total;
-}
-
-
-static int
-GetReqPaneWidth(Pane *panePtr)
-{
-    int w;
-
-    w = GetReqWidth(panePtr) + PADDING(panePtr->xPad); 
-    if ((ISHORIZ(panePtr->setPtr)) && (panePtr->flags & HANDLE)) {
-	w += panePtr->setPtr->handleSize;
-    }
-    return w;
-}
-
-static int
-GetReqPaneHeight(Pane *panePtr)
-{
-    int h;
-
-    h = GetReqHeight(panePtr) + PADDING(panePtr->yPad);
-    if ((ISVERT(panePtr->setPtr)) && (panePtr->flags & HANDLE)) {
-	h += panePtr->setPtr->handleSize;
-    }
-    return h;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GrowPane --
- *
- *	Expand the span by the amount of the extra space needed.  This
- *	procedure is used in Layout*Panes to grow the panes to their minimum
- *	nominal size, starting from a zero width and height space.
- *
- *	On the first pass we try to add space to panes which have not been
- *	touched yet (i.e. have no nominal size).
- *
- *	If there is still extra space after the first pass, this means that
- *	there were no panes could be expanded. This pass will try to remedy
- *	this by parcelling out the left over space evenly among the rest of
- *	the panes.
- *
- *	On each pass, we have to keep iterating over the list, evenly doling
- *	out slices of extra space, because we may hit pane limits as space is
- *	donated.  In addition, if there are left over pixels because of
- *	round-off, this will distribute them as evenly as possible.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The panes in the span may be expanded.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GrowPane(Pane *panePtr, int extra)
-{
-    if ((panePtr->nom == LIMITS_NOM) && (panePtr->max > panePtr->size)) {
-	int avail;
-
-	avail = panePtr->max - panePtr->size;
-	if (avail > extra) {
-	    panePtr->size += extra;
-	    return;
-	} else {
-	    extra -= avail;
-	    panePtr->size += avail;
-	}
-    }
-    /* Find out how many panes still have space available */
-    if ((panePtr->resize & RESIZE_EXPAND) && (panePtr->max > panePtr->size)) {
-	int avail;
-
-	avail = panePtr->max - panePtr->size;
-	if (avail > extra) {
-	    panePtr->size += extra;
-	    return;
-	} else {
-	    extra -= avail;
-	    panePtr->size += avail;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GrowSpan --
- *
- *	Grow the span by the designated amount.  Size constraints on the panes
- *	may prevent any or all of the spacing adjustments.
- *
- *	This is very much like the GrowPane procedure, but in this case we are
- *	expanding all the panes. It uses a two pass approach, first giving
- *	space to panes which are smaller than their nominal sizes. This is
- *	because constraints on the panes may cause resizing to be non-linear.
- *
- *	If there is still extra space, this means that all panes are at least
- *	to their nominal sizes.  The second pass will try to add the left over
- *	space evenly among all the panes which still have space available
- *	(i.e. haven't reached their specified max sizes).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the pane may be increased.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GrowSpan(Blt_Chain chain, int adjustment)	
-{
-    int delta;				/* Amount of space needed */
-    int nAdjust;			/* Number of rows/columns that still can
-					 * be adjusted. */
-    Blt_ChainLink link;
-    float totalWeight;
-
-    /*
-     * Pass 1:  First adjust the size of panes that still haven't reached their
-     *		nominal size.
-     */
-    delta = adjustment;
-
-    nAdjust = 0;
-    totalWeight = 0.0f;
-    for (link = Blt_Chain_LastLink(chain); link != NULL; 
-	 link = Blt_Chain_PrevLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if ((panePtr->weight > 0.0f) && (panePtr->nom > panePtr->size)) {
-	    nAdjust++;
-	    totalWeight += panePtr->weight;
-	}
-    }
-
-    while ((nAdjust > 0) && (totalWeight > 0.0f) && (delta > 0)) {
-	Blt_ChainLink link;
-	int ration;			/* Amount of space to add to each
-					 * row/column. */
-	ration = (int)(delta / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_LastLink(chain); (link != NULL) && (delta > 0);
-	    link = Blt_Chain_PrevLink(link)) {
-	    Pane *panePtr;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    if (panePtr->weight > 0.0f) {
-		int avail;		/* Amount of space still available. */
-
-		avail = panePtr->nom - panePtr->size;
-		if (avail > 0) {
-		    int size;		/* Amount of space requested for a
-					 * particular row/column. */
-		    size = (int)(ration * panePtr->weight);
-		    if (size > delta) {
-			size = delta;
-		    }
-		    if (size < avail) {
-			delta -= size;
-			panePtr->size += size;
-		    } else {
-			delta -= avail;
-			panePtr->size += avail;
-			nAdjust--;
-			totalWeight -= panePtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-
-    /*
-     * Pass 2: Adjust the panes with space still available
-     */
-    nAdjust = 0;
-    totalWeight = 0.0f;
-    for (link = Blt_Chain_LastLink(chain); link != NULL; 
-	 link = Blt_Chain_PrevLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if ((panePtr->weight > 0.0f) && (panePtr->max > panePtr->size)) {
-	    nAdjust++;
-	    totalWeight += panePtr->weight;
-	}
-    }
-    while ((nAdjust > 0) && (totalWeight > 0.0f) && (delta > 0)) {
-	Blt_ChainLink link;
-	int ration;			/* Amount of space to add to each
-					 * row/column. */
-
-	ration = (int)(delta / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_LastLink(chain); (link != NULL) && (delta > 0);
-	    link = Blt_Chain_PrevLink(link)) {
-	    Pane *panePtr;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    if (panePtr->weight > 0.0f) {
-		int avail;		/* Amount of space still available */
-
-		avail = (panePtr->max - panePtr->size);
-		if (avail > 0) {
-		    int size;		/* Amount of space requested for a
-					 * particular row/column. */
-		    size = (int)(ration * panePtr->weight);
-		    if (size > delta) {
-			size = delta;
-		    }
-		    if (size < avail) {
-			delta -= size;
-			panePtr->size += size;
-		    } else {
-			delta -= avail;
-			panePtr->size += avail;
-			nAdjust--;
-			totalWeight -= panePtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShrinkSpan --
- *
- *	Shrink the span by the amount specified.  Size constraints on the
- *	panes may prevent any or all of the spacing adjustments.
- *
- *	This is very much like the GrowPane procedure, but in this case we are
- *	shrinking the panes. It uses a two pass approach, first subtracting
- *	space to panes which are larger than their nominal sizes. This is
- *	because constraints on the panes may cause resizing to be non-linear.
- *
- *	After pass 1, if there is still extra to be removed, this means that
- *	all panes are at least to their nominal sizes.  The second pass will
- *	try to remove the extra space evenly among all the panes which still
- *	have space available (i.e haven't reached their respective min sizes).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the panes may be decreased.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ShrinkSpan(Blt_Chain chain, int adjustment)
-{
-    Blt_ChainLink link;
-    int extra;				/* Amount of space needed */
-    int nAdjust;			/* Number of panes that still can be
-					 * adjusted. */
-    float totalWeight;
-
-    extra = -adjustment;
-    /*
-     * Pass 1: First adjust the size of panes that still aren't at their
-     *         nominal size.
-     */
-    
-    nAdjust = 0;
-    totalWeight = 0.0f;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if ((panePtr->weight > 0.0f) && (panePtr->nom < panePtr->size)) {
-	    nAdjust++;
-	    totalWeight += panePtr->weight;
-	}
-    }
-
-    while ((nAdjust > 0) && (totalWeight > 0.0f) && (extra > 0)) {
-	Blt_ChainLink link;
-	int ration;			/* Amount of space to subtract from each
-					 * row/column. */
-	ration = (int)(extra / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (extra > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    Pane *panePtr;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    if (panePtr->weight > 0.0f) {
-		int avail;		/* Amount of space still available */
-
-		avail = panePtr->size - panePtr->nom;
-		if (avail > 0) {
-		    int slice;		/* Amount of space requested for a
-					 * particular row/column. */
-		    slice = (int)(ration * panePtr->weight);
-		    if (slice > extra) {
-			slice = extra;
-		    }
-		    if (avail > slice) {
-			extra -= slice;
-			panePtr->size -= slice;  
-		    } else {
-			extra -= avail;
-			panePtr->size -= avail;
-			nAdjust--;	/* Goes to zero (nominal). */
-			totalWeight -= panePtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-    /*
-     * Pass 2: Now adjust the panes with space still available (i.e.
-     *	       are bigger than their minimum size).
-     */
-    nAdjust = 0;
-    totalWeight = 0.0f;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-	int avail;
-
-	panePtr = Blt_Chain_GetValue(link);
-	avail = panePtr->size - panePtr->min;
-	if ((panePtr->weight > 0.0f) && (avail > 0)) {
-	    nAdjust++;
-	    totalWeight += panePtr->weight;
-	}
-    }
-    while ((nAdjust > 0) && (totalWeight > 0.0f) && (extra > 0)) {
-	Blt_ChainLink link;
-	int ration;			/* Amount of space to subtract from each
-					 * pane. */
-	ration = (int)(extra / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (extra > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    Pane *panePtr;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    if (panePtr->weight > 0.0f) {
-		int avail;		/* Amount of space still available */
-
-		avail = panePtr->size - panePtr->min;
-		if (avail > 0) {
-		    int slice;		/* Amount of space requested for a
-					 * particular pane. */
-		    slice = (int)(ration * panePtr->weight);
-		    if (slice > extra) {
-			slice = extra;
-		    }
-		    if (avail > slice) {
-			extra -= slice;
-			panePtr->size -= slice;
-		    } else {
-			extra -= avail;
-			panePtr->size -= avail;
-			nAdjust--;
-			totalWeight -= panePtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-}
-
-
-/* |pos     anchor| */
-static void 
-ShrinkLeftGrowRight(Paneset *setPtr, Pane *leftPtr, Pane *rightPtr, int delta)
-{
-    int extra;
-    Pane *panePtr;
-
-    extra = delta;
-    for (panePtr = leftPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to shrink */
-	
-	avail = panePtr->size - panePtr->min;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size -= extra;
-		extra = 0;
-	    } else {
-		panePtr->size -= avail;
-		extra -= avail;
-	    }
-	}
-    }
-    extra = delta - extra;
-    for (panePtr = rightPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = NextPane(panePtr)) {
-	int avail;			/* Space available to grow. */
-	
-	avail = panePtr->max - panePtr->size;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size += extra;
-		extra = 0;
-	    } else {
-		panePtr->size += avail;
-		extra -= avail;
-	    }
-	}
-    }
-}
-
-/* |anchor     pos| */
-static void 
-GrowLeftShrinkRight(Paneset *setPtr, Pane *leftPtr, Pane *rightPtr, int delta)
-{
-    int extra;
-    Pane *panePtr;
-
-    extra = delta;
-    for (panePtr = rightPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = NextPane(panePtr)) {
-	int avail;			/* Space available to shrink */
-	
-	avail = panePtr->size - panePtr->min;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size -= extra;
-		extra = 0;
-	    } else {
-		panePtr->size -= avail;
-		extra -= avail;
-	    }
-	}
-    }
-    extra = delta - extra;
-    for (panePtr = leftPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to grow. */
-	
-	avail = panePtr->max - panePtr->size;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size += extra;
-		extra = 0;
-	    } else {
-		panePtr->size += avail;
-		extra -= avail;
-	    }
-	}
-    }
-}
-
-
-/* |pos     anchor| */
-static void 
-ShrinkLeftGrowLast(Paneset *setPtr, Pane *leftPtr, Pane *rightPtr, int delta)
-{
-    int extra;
-    Pane *panePtr;
-
-    extra = delta;
-    for (panePtr = leftPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to shrink */
-	
-	avail = panePtr->size - panePtr->min;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size -= extra;
-		extra = 0;
-	    } else {
-		panePtr->size -= avail;
-		extra -= avail;
-	    }
-	}
-    }
-#ifdef notdef
-    extra = delta - extra;
-    for (panePtr = LastPane(setPtr);(panePtr != leftPtr) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to grow. */
-	
-	avail = panePtr->max - panePtr->size;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size += extra;
-		extra = 0;
-	    } else {
-		panePtr->size += avail;
-		extra -= avail;
-	    }
-	}
-    }
-#endif
-}
-
-/* |anchor     pos| */
-static void 
-GrowLeftShrinkLast(Paneset *setPtr, Pane *leftPtr, Pane *rightPtr, int delta)
-{
-    int extra;
-    Pane *panePtr;
-
-    extra = delta;
-#ifdef notdef
-    for (panePtr = LastPane(setPtr);(panePtr != leftPtr) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to shrink */
-	
-	avail = panePtr->size - panePtr->min;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size -= extra;
-		extra = 0;
-	    } else {
-		panePtr->size -= avail;
-		extra -= avail;
-	    }
-	}
-    }
-    extra = delta - extra;
-#endif
-    for (panePtr = leftPtr; (panePtr != NULL) && (extra > 0); 
-	 panePtr = PrevPane(panePtr)) {
-	int avail;			/* Space available to grow. */
-	
-	avail = panePtr->max - panePtr->size;
-	if (avail > 0) {
-	    if (avail > extra) {
-		panePtr->size += extra;
-		extra = 0;
-	    } else {
-		panePtr->size += avail;
-		extra -= avail;
-	    }
-	}
-    }
-}
-
-static Blt_Chain 
-SortedSpan(Paneset *setPtr, Pane *firstPtr, Pane *lastPtr)
-{
-    Blt_Chain chain;
-    SizeProc *proc;
-    Pane *panePtr;
-
-    proc = ISVERT(setPtr) ? GetReqPaneHeight : GetReqPaneWidth;
-    chain = Blt_Chain_Create();
-    for (panePtr = firstPtr; panePtr != lastPtr; 
-	 panePtr = NextPane(panePtr)) {
-	int d1;
-	Blt_ChainLink link, before, newLink;
-
-	d1 = (*proc)(panePtr) - panePtr->size;
-	before = NULL;
-	for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    Pane *pane2Ptr;
-	    int d2;
-
-	    pane2Ptr = Blt_Chain_GetValue(link);
-	    d2 = (*proc)(pane2Ptr) - pane2Ptr->size;
-	    if (d2 >= d1) {
-		before = link;
-		break;
-	    }
-	}
-	newLink = Blt_Chain_NewLink();
-	Blt_Chain_SetValue(newLink, panePtr);
-	if (before != NULL) {
-	    Blt_Chain_LinkBefore(chain, newLink, before);
-	} else {
-	    Blt_Chain_LinkAfter(chain, newLink, NULL);
-	}
-    }
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetDrawers --
- *
- *	Sets/resets the size of each pane to the minimum limit of the pane
- *	(this is usually zero). This routine gets called when new widgets are
- *	added, deleted, or resized.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each pane is re-initialized to its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetDrawers(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-	int extra, size;
-
-	panePtr = Blt_Chain_GetValue(link);
-	/*
-	 * The constraint procedure below also has the desired side-effect of
-	 * setting the minimum, maximum, and nominal values to the requested
-	 * size of its associated widget (if one exists).
-	 */
-	extra = 0;
-	if (panePtr->side & SIDE_VERTICAL) {
-	    size = BoundHeight(0, &panePtr->reqSize);
-	} else {
-	    size = BoundWidth(0, &panePtr->reqSize);
-	}
-	if (panePtr->flags & HANDLE) {
-	    extra += setPtr->handleSize;
-	}
-	if (panePtr->reqSize.flags & LIMITS_NOM_SET) {
-	    /*
-	     * This could be done more cleanly.  We want to ensure that the
-	     * requested nominal size is not overridden when determining the
-	     * normal sizes.  So temporarily fix min and max to the nominal
-	     * size and reset them back later.
-	     */
-	    panePtr->min = panePtr->max = panePtr->size = panePtr->nom = 
-		size + extra;
-	} else {
-	    /* The range defaults to 0..MAXINT */
-	    panePtr->min = panePtr->reqSize.min + extra;
-	    panePtr->max = panePtr->reqSize.max + extra;
-	    panePtr->nom = LIMITS_NOM;
-	    panePtr->size = size + extra;
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetPanes --
- *
- *	Sets/resets the size of each pane to the minimum limit of the pane
- *	(this is usually zero). This routine gets called when new widgets are
- *	added, deleted, or resized.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each pane is re-initialized to its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetPanes(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-	int extra, size;
-
-	panePtr = Blt_Chain_GetValue(link);
-	/*
-	 * The constraint procedure below also has the desired side-effect of
-	 * setting the minimum, maximum, and nominal values to the requested
-	 * size of its associated widget (if one exists).
-	 */
-	if (ISVERT(setPtr)) {
-	    size = BoundHeight(0, &panePtr->reqSize);
-	    extra = PADDING(panePtr->yPad);
-	} else {
-	    size = BoundWidth(0, &panePtr->reqSize);
-	    extra = PADDING(panePtr->xPad);
-	}
-	if (panePtr->flags & HANDLE) {
-	    extra += setPtr->handleSize;
-	}
-	if (panePtr->reqSize.flags & LIMITS_NOM_SET) {
-	    /*
-	     * This could be done more cleanly.  We want to ensure that the
-	     * requested nominal size is not overridden when determining the
-	     * normal sizes.  So temporarily fix min and max to the nominal
-	     * size and reset them back later.
-	     */
-	    panePtr->min = panePtr->max = panePtr->size = panePtr->nom = 
-		size + extra;
-	} else {
-	    /* The range defaults to 0..MAXINT */
-	    panePtr->min = panePtr->reqSize.min + extra;
-	    panePtr->max = panePtr->reqSize.max + extra;
-	    panePtr->nom = LIMITS_NOM;
-	    panePtr->size = size + extra;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetNominalSizes
- *
- *	Sets the normal sizes for each pane.  The pane size is the requested
- *	widget size plus an amount of padding.  In addition, adjust the
- *	min/max bounds of the pane depending upon the resize flags (whether
- *	the pane can be expanded or shrunk from its normal size).
- *
- * Results:
- *	Returns the total space needed for the all the panes.
- *
- * Side Effects:
- *	The nominal size of each pane is set.  This is later used to determine
- *	how to shrink or grow the table if the container can't be resized to
- *	accommodate the exact size requirements of all the panes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetNominalSizes(Paneset *setPtr)
-{
-    Blt_ChainLink link;
-    int total;
-
-    total = 0;
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-	int extra;
-
-	panePtr = Blt_Chain_GetValue(link);
-	if (ISVERT(setPtr)) {
-	    extra = PADDING(panePtr->yPad);
-	} else {
-	    extra = PADDING(panePtr->xPad);
-	}
-	if (panePtr->flags & HANDLE) {
-	    extra += setPtr->handleSize;
-	}
-	/*
-	 * Restore the real bounds after temporarily setting nominal size.
-	 * These values may have been set in ResetPanes to restrict the size
-	 * of the pane to the requested range.
-	 */
-	panePtr->min = panePtr->reqSize.min + extra;
-	panePtr->max = panePtr->reqSize.max + extra;
-	if (panePtr->size > panePtr->max) {
-	    panePtr->size = panePtr->max;
-	} 
-	if (panePtr->size < panePtr->min) {
-	    panePtr->size = panePtr->min;
-	}
-	panePtr->nom = panePtr->size;
-	/*
-	 * If a pane can't be resized (to either expand or shrink), hold its
-	 * respective limit at its normal size.
-	 */
-	if ((panePtr->resize & RESIZE_EXPAND) == 0) {
-	    panePtr->max = panePtr->nom;
-	}
-	if ((panePtr->resize & RESIZE_SHRINK) == 0) {
-	    panePtr->min = panePtr->nom;
-	}
-	total += panePtr->nom;
-    }
-    return total;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LayoutHorizontalPanes --
- *
- *	Calculates the normal space requirements for panes.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The sum of normal sizes set here will be used as the normal size for
- * 	the container widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LayoutHorizontalPanes(Paneset *setPtr)
-{
-    Blt_ChainLink link, next;
-    int total;
-    int maxHeight;
-    int x, y;
-
-    maxHeight = 0;
-    ResetPanes(setPtr);
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL; link = next) {
-	Pane *panePtr;
-	int width, height;
-
-	next = Blt_Chain_NextLink(link);
-	panePtr = Blt_Chain_GetValue(link);
-	panePtr->flags &= ~HANDLE;
-	if (panePtr->flags & HIDE) {
-	    if (Tk_IsMapped(panePtr->tkwin)) {
-		Tk_UnmapWindow(panePtr->tkwin);
-	    }
-	    if (Tk_IsMapped(panePtr->handle)) {
-		Tk_UnmapWindow(panePtr->handle);
-	    }
-	    continue;
-	}
-	if ((next != NULL) || (setPtr->mode == MODE_SPREADSHEET)) {
-	    /* Add the size of the handle to the pane. */
-	    /* width += setPtr->handleSize; */
-	    if (panePtr->flags & SHOW_HANDLE) {
-		panePtr->flags |= HANDLE;
-	    }
-	}
-	width = GetReqPaneWidth(panePtr);
-	if (width <= 0) {
-	    /* continue; */
-	}
-	height = GetReqPaneHeight(panePtr);
-	if (maxHeight < height) {
-	    maxHeight = height;
-	}
-	if (width > panePtr->size) {
-	    GrowPane(panePtr, width - panePtr->size);
-	}
-    }
-    x = y = 0;
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	panePtr->height = maxHeight;
-	panePtr->width = panePtr->size;
-	panePtr->x = x;
-	panePtr->y = y;
-	x += panePtr->size;
-    }
-    total = SetNominalSizes(setPtr);
-    setPtr->worldWidth = total;
-    setPtr->normalWidth = total + 2 * Tk_InternalBorderWidth(setPtr->tkwin);
-    setPtr->normalHeight = maxHeight + 2*Tk_InternalBorderWidth(setPtr->tkwin);
-    if (setPtr->normalWidth < 1) {
-	setPtr->normalWidth = 1;
-    }
-    if (setPtr->normalHeight < 1) {
-	setPtr->normalHeight = 1;
-    }
-    setPtr->flags &= ~LAYOUT_PENDING;
-    setPtr->flags |= SCROLL_PENDING;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LayoutVerticalPanes --
- *
- *	Calculates the normal space requirements for panes.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The sum of normal sizes set here will be used as the normal size for
- * 	the container widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LayoutVerticalPanes(Paneset *setPtr)
-{
-    Blt_ChainLink link, next;
-    int total;
-    int maxWidth;
-    int x, y;
-
-    maxWidth = 0;
-#if TRACE
-    fprintf(stderr, "LayoutVerticalPanes\n");
-#endif
-    ResetPanes(setPtr);
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL; link = next) {
-	Pane *panePtr;
-	int width, height;
-	
-	next = Blt_Chain_NextLink(link);
-	panePtr = Blt_Chain_GetValue(link);
-	if (panePtr->flags & HIDE) {
-	    if (Tk_IsMapped(panePtr->tkwin)) {
-		Tk_UnmapWindow(panePtr->tkwin);
-	    }
-	    if (Tk_IsMapped(panePtr->handle)) {
-		Tk_UnmapWindow(panePtr->handle);
-	    }
-	    continue;
-	}
-	panePtr->flags &= ~HANDLE;
-	if ((next != NULL) || (setPtr->mode == MODE_SPREADSHEET)) {
-	    /* height += setPtr->handleSize; */
-	    if (panePtr->flags & SHOW_HANDLE) {
-		panePtr->flags |= HANDLE;
-	    }
-	}
-	height = GetReqPaneHeight(panePtr);
-	if (height <= 0) {
-	    continue;
-	}
-	width = GetReqPaneWidth(panePtr);
-	if (maxWidth < width) {
-	    maxWidth = width;
-	}
-	if (height > panePtr->size) {
-	    GrowPane(panePtr, height - panePtr->size);
-	}
-    }
-    x = y = 0;
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	Pane *panePtr;
-
-	panePtr = Blt_Chain_GetValue(link);
-	panePtr->width = maxWidth;
-	panePtr->height = panePtr->size;
-	panePtr->x = x;
-	panePtr->y = y;
-	y += panePtr->size;
-    }
-    total = SetNominalSizes(setPtr);
-    setPtr->worldWidth = total;
-    setPtr->normalHeight = total + 2*Tk_InternalBorderWidth(setPtr->tkwin);
-    setPtr->normalWidth = maxWidth + 2*Tk_InternalBorderWidth(setPtr->tkwin);
-    if (setPtr->normalWidth < 1) {
-	setPtr->normalWidth = 1;
-    }
-    if (setPtr->normalHeight < 1) {
-	setPtr->normalHeight = 1;
-    }
-    setPtr->flags &= ~LAYOUT_PENDING;
-    setPtr->flags |= SCROLL_PENDING;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LayoutDrawers --
- *
- *	Calculates the normal space requirements for panes.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The sum of normal sizes set here will be used as the normal size for
- * 	the container widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LayoutDrawers(Paneset *setPtr)
-{
-    Blt_ChainLink link, next;
-
-    ResetDrawers(setPtr);
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL; link = next) {
-	Pane *panePtr;
-	int anchor;
-
-	next = Blt_Chain_NextLink(link);
-	panePtr = Blt_Chain_GetValue(link);
-	    
-	if (panePtr->side & SIDE_VERTICAL) {
-	    panePtr->size = GetReqDrawerHeight(panePtr);
-	    anchor = panePtr->y;
-	} else {
-	    panePtr->size =  GetReqDrawerWidth(panePtr);
-	    anchor = panePtr->x;
-	}
-	if (anchor < 0) {
-#ifdef notdef
-	    panePtr->flags |= CLOSED;	/* Auto-close */
-#endif
-	}
-	if (panePtr->flags & SHOW_HANDLE) {
-	    panePtr->flags |= HANDLE;
-	} else {
-	    panePtr->flags &= ~HANDLE;
-	}
-	if (panePtr->flags & CLOSED) {
-	    if (Tk_IsMapped(panePtr->tkwin)) {
-		Tk_UnmapWindow(panePtr->tkwin);
-	    }
-	    if (Tk_IsMapped(panePtr->handle)) {
-		Tk_UnmapWindow(panePtr->handle);
-	    }
-	    continue;
-	}
-	if (panePtr->flags & VIRGIN) {
-#ifdef notdef
-	    panePtr->x = panePtr->y = 0;
-	    if (panePtr->side & SIDE_VERTICAL) {
-		panePtr->y = panePtr->size = GetReqDrawerHeight(panePtr);
-	    } else {
-		panePtr->x = panePtr->size = GetReqDrawerWidth(panePtr);
-	    }
-#endif
-	}
-	if ((panePtr->resize & RESIZE_EXPAND) == 0) {
-	    panePtr->max = panePtr->size;
-	}
-	if ((panePtr->resize & RESIZE_SHRINK) == 0) {
-	    panePtr->min = panePtr->size;
-	}
-    }
-}
-static void
-ArrangeWindow(Pane *panePtr, int x, int y) 
-{
-    Paneset *setPtr;
-    int cavityWidth, cavityHeight;
-
-    setPtr = panePtr->setPtr;
-    if (ISVERT(setPtr)) {
-	panePtr->height = panePtr->size;
-	panePtr->width = Tk_Width(setPtr->tkwin);
-    } else {
-	panePtr->width = panePtr->size;
-	panePtr->height = Tk_Height(setPtr->tkwin);
-    }
-    cavityWidth  = panePtr->width;
-    cavityHeight = panePtr->height;
-    if (panePtr->tkwin != NULL) {
-	int w, h;
-	int xMax, yMax;
-	int dx, dy;
-
-	xMax = x + panePtr->width;
-	yMax = y + panePtr->height;
-	x += Tk_Changes(panePtr->tkwin)->border_width;
-	y += Tk_Changes(panePtr->tkwin)->border_width;
-	if (panePtr->flags & HANDLE) {
-	    if (ISVERT(setPtr)) {
-		cavityHeight -= setPtr->handleSize;
-		if (panePtr->side & HANDLE_FARSIDE) {
-		    yMax -= setPtr->handleSize;
-		} else {
-		    y += setPtr->handleSize;
-		}
-	    } else {
-		cavityWidth -= setPtr->handleSize;
-		if (panePtr->side & HANDLE_FARSIDE) {
-		    xMax -= setPtr->handleSize;
-		} else {
-		    x += setPtr->handleSize;
-		}
-	    }
-	}
-	
-	/*
-	 * Unmap any widgets that start beyond of the right edge of the
-	 * container.
-	 */
-	if ((x >= xMax) || (y >= yMax)) {
-	    if (Tk_IsMapped(panePtr->tkwin)) {
-		Tk_UnmapWindow(panePtr->tkwin);
-	    }
-	    return;
-	}
-	w = GetReqWidth(panePtr);
-	h = GetReqHeight(panePtr);
-	
-	/*
-	 *
-	 * Compare the widget's requested size to the size of the cavity.
-	 *
-	 * 1) If the widget is larger than the cavity or if the fill flag is
-	 * set, make the widget the size of the cavity. Check that the new size
-	 * is within the bounds set for the widget.
-	 *
-	 * 2) Otherwise, position the widget in the space according to its
-	 *    anchor.
-	 *
-	 */
-	if ((cavityWidth <= w) || (panePtr->fill & FILL_X)) {
-	    w = cavityWidth;
-	} 
-	if (w > panePtr->reqWidth.max) {
-	    w = panePtr->reqWidth.max;
-	}
-	if ((cavityHeight <= h) || (panePtr->fill & FILL_Y)) {
-	    h = cavityHeight;
-	}
-	if (h > panePtr->reqHeight.max) {
-	    h = panePtr->reqHeight.max;
-	}
-	/*
-	 * Clip the widget at the bottom and/or right edge of the container.
-	 */
-	if (h > (yMax - y)) {
-	    h = (yMax - y);
-	}
-	if (w > (xMax - x)) {
-	    w = (xMax - x);
-	}
-	dx = dy = 0;
-	if (cavityWidth > w) {
-	    dx = (cavityWidth - w);
-	}
-	if (cavityHeight > h) {
-	    dy = (cavityHeight - h);
-	}
-#ifdef notdef
-	if ((dx > 0) || (dy > 0)) {
-	    TranslateAnchor(dx, dy, panePtr->anchor, &x, &y);
-	}
-	TranslateAnchor(w, h, panePtr->anchor, &x, &y);
-	fprintf(stderr, "pane=%s x=%d,y=%d, w=%d h=%d\n", 
-		panePtr->name, x, y, w, h);
-#endif
-	/*
-	 * If the widget is too small (i.e. it has only an external border)
-	 * then unmap it.
-	 */
-	if ((w < 1) || (h < 1)) {
-	    if (Tk_IsMapped(panePtr->tkwin)) {
-		Tk_UnmapWindow(panePtr->tkwin);
-	    }
-	    return;
-	}
-	/*
-	 * Resize and/or move the widget as necessary.
-	 */
-	if ((x != Tk_X(panePtr->tkwin)) || 
-	    (y != Tk_Y(panePtr->tkwin)) ||
-	    (w != Tk_Width(panePtr->tkwin)) || 
-	    (h != Tk_Height(panePtr->tkwin))) {
-	    Tk_MoveResizeWindow(panePtr->tkwin, x, y, w, h);
-	}
-	if (!Tk_IsMapped(panePtr->tkwin)) {
-	    Tk_MapWindow(panePtr->tkwin);
-	}
-    }
-}
-
-static void
-ArrangeHandle(Pane *panePtr, int x, int y) 
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    if (panePtr->flags & HANDLE) {
-	int w, h;
-	
-	if (ISVERT(setPtr)) {
-	    x = 0;
-	    if (panePtr->side & HANDLE_FARSIDE) {
-		y += panePtr->size - setPtr->handleSize;
-	    }
-	    w = Tk_Width(setPtr->tkwin);
-	    h = setPtr->handleSize; 
-	} else {
-	    y = 0;
-	    if (panePtr->side & HANDLE_FARSIDE) {
-		x += panePtr->size - setPtr->handleSize;
-	    } 
-	    h = Tk_Height(setPtr->tkwin);
-	    w = setPtr->handleSize; 
-	}
-	if ((x != Tk_X(panePtr->tkwin)) || 
-	    (y != Tk_Y(panePtr->tkwin)) ||
-	    (w != Tk_Width(panePtr->tkwin)) ||
-	    (h != Tk_Height(panePtr->tkwin))) {
-	    Tk_MoveResizeWindow(panePtr->handle, x, y, w, h);
-	}
-	if (!Tk_IsMapped(panePtr->handle)) {
-	    Tk_MapWindow(panePtr->handle);
-	}
-	XRaiseWindow(setPtr->display, Tk_WindowId(panePtr->handle));
-    } else if (Tk_IsMapped(panePtr->handle)) {
-	Tk_UnmapWindow(panePtr->handle);
-    }
-}
-
-
-static void
-ArrangeDrawer(Pane *panePtr) 
-{
-    Paneset *setPtr;
-    int cavityWidth, cavityHeight;
-    int x0, y0;
-    int x, y;
-    int w, h;
-    int anchor;
-
-    if ((panePtr->flags & CLOSED) || (panePtr->tkwin == NULL)) {
-	if (Tk_IsMapped(panePtr->handle)) {
-	    Tk_UnmapWindow(panePtr->handle);
-	}
-	return;
-    }	
-    setPtr = panePtr->setPtr;
-    x0 = ScreenX(panePtr);
-    y0 = ScreenY(panePtr);
-    if (panePtr->side & SIDE_VERTICAL) {
-	if (panePtr->y > Tk_Height(setPtr->tkwin)) {
-	    panePtr->y = Tk_Height(setPtr->tkwin);
-	}
-	cavityHeight = panePtr->y;
-	cavityWidth  = Tk_Width(setPtr->tkwin);
-	panePtr->height = panePtr->size;
-	panePtr->width = GetReqDrawerWidth(panePtr);
-    } else {
-	if (panePtr->x > Tk_Width(setPtr->tkwin)) {
-	    panePtr->x = Tk_Width(setPtr->tkwin);
-	}
-	cavityWidth = panePtr->x;
-	cavityHeight = Tk_Height(setPtr->tkwin);
-	panePtr->width = panePtr->size;
-	panePtr->height = GetReqDrawerHeight(panePtr);
-    }
-    x = ScreenX(panePtr) + Tk_Changes(panePtr->tkwin)->border_width;
-    y = ScreenY(panePtr) + Tk_Changes(panePtr->tkwin)->border_width;
-
-    w = GetReqDrawerWidth(panePtr);
-    h = GetReqDrawerHeight(panePtr);
-
-    /*
-     *
-     * Compare the widget's requested size to the size of the cavity.
-     *
-     * 1) If the widget is larger than the cavity or if the fill flag is
-     * set, make the widget the size of the cavity. Check that the new size
-     * is within the bounds set for the widget.
-     *
-     * 2) Otherwise, position the widget in the space according to its
-     *    anchor.
-     *
-     */
-    anchor = (panePtr->side & SIDE_VERTICAL) ? panePtr->y : panePtr->x;
-
-    if (panePtr->side & SIDE_VERTICAL) {
-	if (cavityHeight > h) {
-	    h = cavityHeight;		/* Automatically grow the window. */
-	}
-	if ((cavityHeight < h) && (panePtr->flags & SHRINK)) {
-	    h = cavityHeight;	
-	}
-	if (h > panePtr->reqHeight.max) {
-	    h = panePtr->reqHeight.max;
-	}
-	panePtr->size = h;
-	if ((cavityWidth < w) || (panePtr->fill)) {
-	    w = cavityWidth;
-	    if (w > panePtr->reqWidth.max) {
-		w = panePtr->reqWidth.max;
-	    }
-	} 
-    } else {
-	if (cavityWidth > w) {
-	    w = cavityWidth;		/* Automatically grow the window. */
-	}
-	if ((cavityWidth < w) && (panePtr->flags & SHRINK)) {
-	    w = cavityWidth;		/* Allow window to be shrunk. */
-	}
-	if (w > panePtr->reqWidth.max) {
-	    w = panePtr->reqWidth.max;
-	}
-	panePtr->size = w;
-	if ((cavityHeight < h) || (panePtr->fill)) {
-	    h = cavityHeight;
-	    if (h > panePtr->reqHeight.max) {
-		h = panePtr->reqHeight.max;
-	    }
-	}
-    }
-    x = ScreenX(panePtr) + Tk_Changes(panePtr->tkwin)->border_width;
-    y = ScreenY(panePtr) + Tk_Changes(panePtr->tkwin)->border_width;
-
-    if ((panePtr->side & SIDE_VERTICAL) && (cavityWidth > w)) {
-	x += (cavityWidth - w) / 2;
-    }
-    if ((panePtr->side & SIDE_HORIZONTAL) && (cavityHeight > h)) {
-	y += (cavityHeight - h) / 2;
-    }
-
-    if (panePtr->flags & HANDLE) {
-	/* Make room for the handle if one if needed. Adjust the window's
-	 * position if the handle is on the near side. */
-	if (panePtr->side & SIDE_VERTICAL) {
-	    h -= setPtr->handleSize;
-	    if (panePtr->side & HANDLE_NEARSIDE) {
-		y += setPtr->handleSize;
-	    }
-	} else {
-	    w -= setPtr->handleSize;
-	    if (panePtr->side & HANDLE_NEARSIDE) {
-		x += setPtr->handleSize;
-	    }
-	}
-    }
-	
-    /*
-     * If the widget is too small (i.e. it has only an external border)
-     * then unmap it.
-     */
-
-    if (anchor < 0) {
-	CloseDrawer(panePtr);
-    }
-    if ((w < 1) || (h < 1)) {
-	if (Tk_IsMapped(panePtr->tkwin)) {
-	    Tk_UnmapWindow(panePtr->tkwin);
-	}
-    } else {
-	/*
-	 * Resize and/or move the widget as necessary.
-	 */
-	if ((x != Tk_X(panePtr->tkwin)) || 
-	    (y != Tk_Y(panePtr->tkwin)) ||
-	    (w != Tk_Width(panePtr->tkwin)) || 
-	    (h != Tk_Height(panePtr->tkwin))) {
-	    Tk_MoveResizeWindow(panePtr->tkwin, x, y, w, h);
-	}
-	if (!Tk_IsMapped(panePtr->tkwin)) {
-	    Tk_MapWindow(panePtr->tkwin);
-	}
-	XRaiseWindow(setPtr->display, Tk_WindowId(panePtr->tkwin));
-	panePtr->flags &= ~VIRGIN;
-    }
-
-    if (panePtr->flags & HANDLE) {
-	if (panePtr->side & SIDE_VERTICAL) {
-	    if (panePtr->side & HANDLE_FARSIDE) {
-		y += h;
-	    } else {
-		y -= setPtr->handleSize;
-	    }
-	    h = setPtr->handleSize; 
-	} else {
-	    if (panePtr->side & HANDLE_FARSIDE) {
-		x += w;
-	    } else {
-		x -= setPtr->handleSize;
-	    }
-	    w = setPtr->handleSize; 
-	}
-	if ((x != Tk_X(panePtr->tkwin)) || 
-	    (y != Tk_Y(panePtr->tkwin)) ||
-	    (w != Tk_Width(panePtr->tkwin)) ||
-	    (h != Tk_Height(panePtr->tkwin))) {
-	    Tk_MoveResizeWindow(panePtr->handle, x, y, w, h);
-	}
-	if (!Tk_IsMapped(panePtr->handle)) {
-	    Tk_MapWindow(panePtr->handle);
-	}
-	XRaiseWindow(setPtr->display, Tk_WindowId(panePtr->handle));
-    } else if (Tk_IsMapped(panePtr->handle)) {
-	Tk_UnmapWindow(panePtr->handle);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrangePane
- *
- *	Places each window at its proper location.  First determines the size
- *	and position of the each window.  It then considers the following:
- *
- *	  1. translation of widget position its parent widget.
- *	  2. fill style
- *	  3. anchor
- *	  4. external and internal padding
- *	  5. widget size must be greater than zero
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each pane is re-initialized its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ArrangePane(Pane *panePtr, int x, int y) 
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    if (ISVERT(setPtr)) {
-	panePtr->height = panePtr->size;
-	panePtr->width = Tk_Width(setPtr->tkwin);
-    } else {
-	panePtr->width = panePtr->size;
-	panePtr->height = Tk_Height(setPtr->tkwin);
-    }
-    ArrangeWindow(panePtr, x, y);
-    ArrangeHandle(panePtr, x, y);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * VerticalPanes --
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The widgets in the paneset are possibly resized and redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-VerticalPanes(Paneset *setPtr)
-{
-    int height;
-    int top, bottom;
-    int y;
-    int xPad, yPad;
-    Pane *panePtr;
-
-    /*
-     * If the paneset has no children anymore, then don't do anything at all:
-     * just leave the container widget's size as-is.
-     */
-#if TRACE
-    fprintf(stderr, "VerticalPanes\n");
-#endif
-    panePtr = LastPane(setPtr);
-    if (panePtr == NULL) {
-	fprintf(stderr, "VPanes: last pane is null\n");
-	return;
-    }
-    if (setPtr->anchorPtr == NULL) {
-	setPtr->anchorPtr = panePtr;
-    }
-    if (setPtr->anchorPtr == panePtr) {
-	setPtr->bearing = Tk_Height(setPtr->tkwin);
-#if TRACE
-	fprintf(stderr, "VerticalPanes: bearing = %d\n", setPtr->bearing);
-#endif
-    }
-    if (setPtr->flags & LAYOUT_PENDING) {
-	fprintf(stderr, "layout v panes\n");
-	LayoutVerticalPanes(setPtr);
-    }
-    /*
-     * Save the width and height of the container so we know when its size has
-     * changed during ConfigureNotify events.
-     */
-    xPad = yPad = 2 * Tk_InternalBorderWidth(setPtr->tkwin);
-
-    top = LeftSpan(setPtr);
-    bottom = RightSpan(setPtr);
-    setPtr->worldWidth = height = top + bottom;
-
-    /*
-     * If the previous geometry request was not fulfilled (i.e. the size of
-     * the container is different from paneset space requirements), try to
-     * adjust size of the panes to fit the widget.
-     */
-    if (setPtr->type == PANESET) {
-	Pane *firstPtr, *lastPtr;
-	Blt_Chain span;
-	int dy;
-
-	dy = setPtr->bearing - top;
-	firstPtr = FirstPane(setPtr);
-	lastPtr = NextPane(setPtr->anchorPtr);
-	if (firstPtr != lastPtr) {
-	    span = SortedSpan(setPtr, firstPtr, lastPtr);
-	    if (dy > 0) {
-		GrowSpan(span, dy);
-	    } else if (dy < 0) {
-		ShrinkSpan(span, dy);
-	    }
-	    top = LeftSpan(setPtr) + yPad;
-	    Blt_Chain_Destroy(span);
-	}
-	dy = (Tk_Height(setPtr->tkwin) - setPtr->bearing) - bottom;
-	span = SortedSpan(setPtr, lastPtr, NULL);
-	if (dy > 0) {
-	    GrowSpan(span, dy);
-	} else if (dy < 0) {
-	    ShrinkSpan(span, dy);
-	}
-	Blt_Chain_Destroy(span);
-	bottom = RightSpan(setPtr) + yPad;
-	setPtr->worldWidth = height = top + bottom;
-    }
-
-    /*
-     * If after adjusting the size of the panes the space required does not
-     * equal the size of the widget, do one of the following:
-     *
-     * 1) If it's smaller, center the paneset in the widget.
-     * 2) If it's bigger, clip the panes that extend beyond the edge of the
-     *    container.
-     *
-     * Set the row and column offsets (including the container's internal
-     * border width). To be used later when positioning the widgets.
-     */
-
-#ifdef notdef
-    if (height < setPtr->containerHeight) {
-	y += (setPtr->containerHeight - height) / 2;
-    }
-#endif
-    y = 0;
-    for (panePtr = FirstPane(setPtr); panePtr != NULL; 
-	 panePtr = NextPane(panePtr)) {
-	panePtr->y = y;
-	ArrangePane(panePtr, 0, SCREEN(y));
-	y += panePtr->size;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HorizontalPanes --
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The widgets in the paneset are possibly resized and redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-HorizontalPanes(Paneset *setPtr)
-{
-    int width;
-    int left, right;
-    int x;
-    int xPad, yPad;
-    Pane *panePtr;
-
-    /*
-     * If the paneset has no children anymore, then don't do anything at all:
-     * just leave the container widget's size as-is.
-     */
-    panePtr = LastPane(setPtr);
-    if (panePtr == NULL) {
-	fprintf(stderr, "HPanes: first pane is null\n");
-	return;
-    }
-    if (setPtr->anchorPtr == NULL) {
-	setPtr->anchorPtr = panePtr;
-    }
-    if (setPtr->anchorPtr == panePtr) {
-	setPtr->bearing = Tk_Width(setPtr->tkwin);
-#if TRACE
-	fprintf(stderr, "HorizontalPanes: bearing = %d\n", setPtr->bearing);
-#endif
-    }
-    if (setPtr->flags & LAYOUT_PENDING) {
-	fprintf(stderr, "layout h panes\n");
-	LayoutHorizontalPanes(setPtr);
-    }
-    /*
-     * Save the width and height of the container so we know when its size has
-     * changed during ConfigureNotify events.
-     */
-    xPad = yPad = 2 * Tk_InternalBorderWidth(setPtr->tkwin);
-
-    left = LeftSpan(setPtr);
-    right = RightSpan(setPtr);
-    setPtr->worldWidth = width = left + right;
-    
-    /*
-     * If the previous geometry request was not fulfilled (i.e. the size of
-     * the paneset is different from the total panes space requirements), try
-     * to adjust size of the panes to fit the widget.
-     */
-    if (setPtr->type == PANESET) {
-	Pane *firstPtr, *lastPtr;
-	Blt_Chain span;
-	int dx;
-
-	dx = setPtr->bearing - left;
-	firstPtr = FirstPane(setPtr);
-	lastPtr = NextPane(setPtr->anchorPtr);
-	if (firstPtr != lastPtr) {
-	    span = SortedSpan(setPtr, firstPtr, lastPtr);
-	    if (dx > 0) {
-		GrowSpan(span, dx);
-	    } else if (dx < 0) {
-		ShrinkSpan(span, dx);
-	    }
-	    left = LeftSpan(setPtr) + xPad;
-	    Blt_Chain_Destroy(span);
-	}
-	dx = (Tk_Width(setPtr->tkwin) - setPtr->bearing) - right;
-	span = SortedSpan(setPtr, lastPtr, NULL);
-	if (dx > 0) {
-	    GrowSpan(span, dx);
-	} else if (dx < 0) {
-	    ShrinkSpan(span, dx);
-	}
-	Blt_Chain_Destroy(span);
-	right = RightSpan(setPtr) + xPad;
-	setPtr->worldWidth = width = left + right;
-    }
-
-    /*
-     * If after adjusting the size of the panes the space required does not
-     * equal the size of the widget, do one of the following:
-     *
-     * 1) If it's smaller, center the paneset in the widget.  
-     * 2) If it's bigger, clip the panes that extend beyond the edge of the 
-     *    container.
-     *
-     * Set the row and column offsets (including the container's internal
-     * border width). To be used later when positioning the widgets.
-     */
-
-    x = 0;
-    for (panePtr = FirstPane(setPtr); panePtr != NULL; 
-	 panePtr = NextPane(panePtr)) {
-	panePtr->x = x;
-	ArrangePane(panePtr, SCREEN(x), 0);
-	x += panePtr->size;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpenDrawers --
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The widgets in the paneset are possibly resized and redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ArrangeDrawers(Paneset *setPtr)
-{
-    Blt_ChainLink link, next;
-
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL; link = next) {
-	Pane *panePtr;
-
-	next = Blt_Chain_NextLink(link);
-	panePtr = Blt_Chain_GetValue(link);
-	ArrangeDrawer(panePtr);
-    }
-}
-
-static void
-ComputeGeometry(Paneset *setPtr) 
-{
-    if (setPtr->type == DRAWER) {
-	setPtr->normalWidth = setPtr->normalHeight = 0;
-	if (setPtr->tkwin != NULL) {
-	    setPtr->normalWidth = Tk_ReqWidth(setPtr->tkwin) + 
-		2 * Tk_InternalBorderWidth(setPtr->tkwin);
-	    setPtr->normalHeight = Tk_ReqHeight(setPtr->tkwin) +
-		2 * Tk_InternalBorderWidth(setPtr->tkwin);
-	}
-	if (setPtr->normalWidth < 1) {
-	    setPtr->normalWidth = 1;
-	}
-	if (setPtr->normalHeight < 1) {
-	    setPtr->normalHeight = 1;
-	}
-	LayoutDrawers(setPtr);
-    } else {
-	if (ISVERT(setPtr)) {
-	    LayoutVerticalPanes(setPtr);
-	} else {
-	    LayoutHorizontalPanes(setPtr);
-	}
-    }
-    setPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static void
-ConfigurePaneset(Paneset *setPtr) 
-{
-    setPtr->handleSize = MAX(PADDING(setPtr->handlePad),setPtr->highlightThickness) + setPtr->handleThickness;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AddOp --
- *
- *	Appends a pane into the widget.
- *
- * Results:
- *	Returns a standard TCL result.  The index of the pane is left in
- *	interp->result.
- *
- *	.p add ?name? ?option value...?
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AddOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{ 
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    const char *name;
-
-    name = NULL;
-    if (objc > 2) {
-	const char *string;
-
-	string = Tcl_GetString(objv[2]);
-	if (string[0] != '-') {
-	    if (GetPaneFromObj(NULL, setPtr, objv[2], &panePtr) == TCL_OK) {
-		Tcl_AppendResult(interp, "pane \"", string, 
-			"\" already exists", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    name = string;
-	    objc--, objv++;
-	}
-    }
-    panePtr = NewPane(interp, setPtr, name);
-    if (panePtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, panePtr->handle, paneSpecs, objc - 2,
-	objv + 2, (char *)panePtr, setPtr->type) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    panePtr->link = Blt_Chain_Append(setPtr->chain, panePtr);
-    RenumberPanes(setPtr);
-    EventuallyRedraw(setPtr);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), panePtr->index);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Returns the name, position and options of a widget in the paneset.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *	.p cget option
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, panesetSpecs, 
-	(char *)setPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CloseOp --
- *
- *	Opens the specified pane. 
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p open pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CloseOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    Pane *panePtr;
-    PaneIterator iter;
-    Paneset *setPtr = clientData;
-
-    if (GetPaneIterator(interp, setPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	EventuallyCloseDrawer(panePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Returns the name, position and options of a widget in the paneset.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the paneset configuration
- *	option information is left in interp->result.
- *
- *	.p configure option value
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, panesetSpecs, 
-		(char *)setPtr, (Tcl_Obj *)NULL, setPtr->type);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, panesetSpecs, 
-		(char *)setPtr, objv[2], setPtr->type);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, panesetSpecs,
-	objc - 2, objv + 2, (char *)setPtr, BLT_CONFIG_OBJV_ONLY|setPtr->type) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    ConfigurePaneset(setPtr);
-    /* Arrange for the paneset layout to be computed at the next idle point. */
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes the specified panes from the widget.  Note that the pane
- *	indices can be fixed only after all the deletions have occurred.
- *
- *	.p delete widget
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    PaneIterator iter;
-    Pane *panePtr;
-
-    if (GetPaneIterator(interp, setPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	Tcl_EventuallyFree(panePtr, PaneFreeProc);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Add new entries into a pane set.
- *
- *	.t insert position ?label? option-value label option-value...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InsertOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr;
-    Blt_ChainLink link, before;
-    char c;
-    const char *string;
-    const char *name;
-
-    string = Tcl_GetString(objv[2]);
-    c = string[0];
-    if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	before = NULL;
-    } else if (isdigit(UCHAR(c))) {
-	int pos;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &pos) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (pos < 0) {
-	    before = Blt_Chain_FirstLink(setPtr->chain);
-	} else if (pos > Blt_Chain_GetLength(setPtr->chain)) {
-	    before = NULL;
-	} else {
-	    before = Blt_Chain_GetNthLink(setPtr->chain, pos);
-	}
-    } else {
-	Pane *beforePtr;
-
-	if (GetPaneFromObj(interp, setPtr, objv[2], &beforePtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (beforePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a pane \"", 
-		Tcl_GetString(objv[2]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	before = beforePtr->link;
-    }
-    name = NULL;
-    if (objc > 3) {
-	string = Tcl_GetString(objv[3]);
-	if (name[0] != '-') {
-	    name = string;
-	    objc--, objv++;
-	}
-    }
-    panePtr = NewPane(interp, setPtr, name);
-    if (panePtr == NULL) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    if (Blt_ConfigureWidgetFromObj(interp, panePtr->handle, paneSpecs, objc - 3, 
-	objv + 3, (char *)panePtr, setPtr->type) != TCL_OK) {
-	DestroyPane(panePtr);
-	return TCL_ERROR;
-    }
-    link = Blt_Chain_NewLink();
-    if (before != NULL) {
-	Blt_Chain_LinkBefore(setPtr->chain, link, before);
-    } else {
-	Blt_Chain_AppendLink(setPtr->chain, link);
-    }
-    panePtr->link = link;
-    Blt_Chain_SetValue(link, panePtr);
-    RenumberPanes(setPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), panePtr->name, -1);
-    return TCL_OK;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * 	This procedure is called to invoke a selection command.
- *
- *	  .ps invoke pane
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set; old resources get freed, if there were any.  The widget is
- *	redisplayed if needed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InvokeOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr;
-    Tcl_Obj *cmdObjPtr;
-
-    if (GetPaneFromObj(interp, setPtr, objv[2], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((panePtr == NULL) || (panePtr->flags & (DISABLED|HIDE))) {
-	return TCL_OK;
-    }
-    cmdObjPtr = GETATTR(panePtr, cmdObjPtr);
-    if (cmdObjPtr != NULL) {
-	Tcl_Obj **args;
-	Tcl_Obj **cmdv;
-	int cmdc;
-	int i;
-	int result;
-
-	if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	args = Blt_AssertMalloc(sizeof(Tcl_Obj *) * (cmdc + 1));
-	for (i = 0; i < cmdc; i++) {
-	    args[i] = cmdv[i];
-	}
-	args[i] = Tcl_NewIntObj(panePtr->index);
-	result = Blt_GlobalEvalObjv(interp, cmdc + 1, args);
-	Blt_Free(args);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsOpenOp --
- *
- *	Indicates if drawer is open or closed.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	widget isopen pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsOpenOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    int state;
-
-    if (GetPaneFromObj(interp, setPtr, objv[2], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    state = FALSE;
-    if (panePtr != NULL) {
-	state = (panePtr->flags & CLOSED) ? 0 : 1;
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), state);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveOp --
- *
- *	Moves a pane to a new location.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MoveOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr, *fromPtr;
-    char c;
-    const char *string;
-    int isBefore;
-    int length;
-
-    if (GetPaneFromObj(interp, setPtr, objv[2], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((panePtr == NULL) || (panePtr->flags & DISABLED)) {
-	return TCL_OK;
-    }
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    c = string[0];
-    if ((c == 'b') && (strncmp(string, "before", length) == 0)) {
-	isBefore = TRUE;
-    } else if ((c == 'a') && (strncmp(string, "after", length) == 0)) {
-	isBefore = FALSE;
-    } else {
-	Tcl_AppendResult(interp, "bad key word \"", string,
-	    "\": should be \"after\" or \"before\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetPaneFromObj(interp, setPtr, objv[4], &fromPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (fromPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find a pane \"", 
-		Tcl_GetString(objv[4]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (panePtr == fromPtr) {
-	return TCL_OK;
-    }
-    Blt_Chain_UnlinkLink(setPtr->chain, panePtr->link);
-    if (isBefore) {
-	Blt_Chain_LinkBefore(setPtr->chain, panePtr->link, fromPtr->link);
-    } else {
-	Blt_Chain_LinkAfter(setPtr->chain, panePtr->link, fromPtr->link);
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	  .ps names pattern
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)	
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 2) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    Pane *panePtr;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewStringObj(panePtr->name, -1));
-	}
-    } else {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    Pane *panePtr;
-	    int i;
-
-	    panePtr = Blt_Chain_GetValue(link);
-	    for (i = 2; i < objc; i++) {
-		if (Tcl_StringMatch(panePtr->name, Tcl_GetString(objv[i]))) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				Tcl_NewStringObj(panePtr->name, -1));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpenOp --
- *
- *	Opens the specified pane. 
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p open pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OpenOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	EventuallyOpenDrawer(panePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RaiseOp --
- *
- *	Raises the specified pane to the top of the stack of panes.  
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p raise pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RaiseOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	RaiseDrawer(panePtr);
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LowerOp --
- *
- *	Lowers the specified pane to bottom of the stack of panes.  
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p raise pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-LowerOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	LowerDrawer(panePtr);
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneCgetOp --
- *
- *	Returns the name, position and options of a widget in the paneset.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *	.p pane cget pane option
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PaneCgetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-
-    if (GetPaneFromObj(interp, setPtr, objv[3], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, paneSpecs, 
-	(char *)panePtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneConfigureOp --
- *
- *	Returns the name, position and options of a widget in the paneset.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the paneset configuration
- *	option information is left in interp->result.
- *
- *	.p pane configure pane option value
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PaneConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-
-    if (GetPaneFromObj(interp, setPtr, objv[3], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, panePtr->handle, paneSpecs, 
-		(char *)panePtr, (Tcl_Obj *)NULL, setPtr->type);
-    } else if (objc == 5) {
-	return Blt_ConfigureInfoFromObj(interp, panePtr->handle, paneSpecs, 
-		(char *)panePtr, objv[4], setPtr->type);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, panePtr->handle, paneSpecs, objc-4, 
-	objv+4, (char *)panePtr, BLT_CONFIG_OBJV_ONLY|setPtr->type) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec paneOps[] =
-{
-    {"cget",       2, PaneCgetOp,      5, 5, "pane option",},
-    {"configure",  2, PaneConfigureOp, 4, 0, "pane ?option value?",},
-};
-
-static int nPaneOps = sizeof(paneOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaneOp --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to the paneset geometry manager.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaneOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPaneOps, paneOps, BLT_OP_ARG2, 
-			    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc)(clientData, interp, objc, objv);
-}
-
-
-/*ARGSUSED*/
-static int
-SizeOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-    int size;
-
-    if (GetPaneFromObj(interp, setPtr, objv[3], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	size = panePtr->size;
-    } else {
-	int newSize;
-	Paneset *setPtr;
-
-	setPtr = panePtr->setPtr;
-	if (Blt_GetPixelsFromObj(interp, setPtr->tkwin, objv[3], PIXELS_NNEG, 
-		&newSize) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	panePtr->size = newSize;
-	if (panePtr->side & SIDE_VERTICAL) {
-	    panePtr->y = newSize;
-	} else {
-	    panePtr->x = newSize;
-	}
-	EventuallyRedraw(setPtr);
-    } 
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), size);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CloseOp --
- *
- *	Opens the specified pane. 
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p open pane
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ToggleOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    Paneset *setPtr = clientData;
-    Pane *panePtr;
-
-    if (GetPaneFromObj(interp, setPtr, objv[2], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((panePtr->tkwin == NULL) || (panePtr->flags & DISABLED)) {
-	return TCL_OK;
-    }
-    if (panePtr->flags & CLOSED) {
-	EventuallyOpenDrawer(panePtr);
-    } else {
-	EventuallyCloseDrawer(panePtr);
-    }
-    return TCL_OK;
-}
-
-static int
-AdjustDrawerDelta(Paneset *setPtr, int delta)
-{
-    int oldBearing;
-    int total, min, max, size;
-    Pane *panePtr;
-
-    total = min = max = 0;
-    /* The left span is every pane before and including) the anchor pane. */
-    panePtr = setPtr->anchorPtr;
-    size = (panePtr->side & SIDE_VERTICAL) 
-	? Tk_Height(setPtr->tkwin) : Tk_Width(setPtr->tkwin);
-    switch (panePtr->side) {
-    case SIDE_BOTTOM:
-    case SIDE_RIGHT:
-	max = MIN(panePtr->max, size);
-	min = size + panePtr->size - max;
-	max = size + panePtr->size - panePtr->min;
-	break;
-    case SIDE_TOP:
-    case SIDE_LEFT:
-	min = panePtr->min;
-	max = MIN(panePtr->max, size);
-	break;
-    }
-    oldBearing = setPtr->bearing;
-    setPtr->bearing += delta;
-    if (setPtr->bearing < min) {
-	setPtr->bearing = min;
-    } else if (setPtr->bearing > max) {
-	setPtr->bearing = max;
-    }
-    return setPtr->bearing - oldBearing;
-}
-
-
-static int
-AdjustPanesetDelta(Paneset *setPtr, int delta)
-{
-    int total;
-    int lmin, lmax, rmin, rmax;
-    int oldBearing;
-    Pane *panePtr;
-
-    total = (ISVERT(setPtr)) 
-	? Tk_Height(setPtr->tkwin) : Tk_Width(setPtr->tkwin);
-    
-    LeftSpanLimits(setPtr, &lmin, &lmax);
-    RightSpanLimits(setPtr, &rmin, &rmax);
-    
-    rmin = total - rmin;
-    rmax = total - rmax;
-    oldBearing = setPtr->bearing;
-    setPtr->bearing += delta;
-    if (setPtr->bearing < lmin) {
-	setPtr->bearing = lmin;
-    } else if (setPtr->bearing > lmax) {
-	setPtr->bearing = lmax;
-    }
-    if (setPtr->bearing >= rmin) {
-	setPtr->bearing = rmin;
-    } else if (setPtr->bearing < rmax) {
-	setPtr->bearing = rmax;
-    }
-    for (panePtr = FirstPane(setPtr); panePtr != NULL; 
-	 panePtr = NextPane(panePtr)) {
-	panePtr->nom = panePtr->size;
-    }
-    return setPtr->bearing - oldBearing;
-}
-
-
-static void
-AdjustHandle(Paneset *setPtr, int delta)
-{
-    Pane *panePtr;
-
-    if (setPtr->type != FILMSTRIP) {
-	if (setPtr->type == DRAWER) {
-	    delta = AdjustDrawerDelta(setPtr, delta);
-	} else {
-	    delta = AdjustPanesetDelta(setPtr, delta);
-	}
-	for (panePtr = FirstPane(setPtr); panePtr != NULL; 
-	     panePtr = NextPane(panePtr)) {
-	    panePtr->nom = panePtr->size;
-	}
-    }
-    if (setPtr->type == DRAWER) {
-	switch (setPtr->anchorPtr->side) {
-	case SIDE_TOP:
-	    setPtr->anchorPtr->y += delta;
-	    break;
-	case SIDE_BOTTOM:
-	    setPtr->anchorPtr->y -= delta;
-	    break;
-	case SIDE_LEFT:
-	    setPtr->anchorPtr->x += delta;
-	    break;
-	case SIDE_RIGHT:
-	    setPtr->anchorPtr->x -= delta;
-	    break;
-	}
-    } else if (setPtr->type == FILMSTRIP) {
-	setPtr->scrollOffset -= delta;
-	setPtr->flags |= SCROLL_PENDING;
-    } else {
-	switch (setPtr->mode) {
-	case MODE_GIVETAKE:
-	    {
-		Pane *leftPtr, *rightPtr;
-		
-		leftPtr = setPtr->anchorPtr;
-		rightPtr = NextPane(leftPtr);
-		if (delta > 0) {
-		    GrowLeftShrinkRight(setPtr, leftPtr, rightPtr, delta);
-		} else if (delta < 0) {
-		    ShrinkLeftGrowRight(setPtr, leftPtr, rightPtr, -delta);
-		}
-	    } 
-	    break;
-	case MODE_SPREADSHEET:
-	    {
-		Pane *leftPtr, *rightPtr;
-		
-		leftPtr = setPtr->anchorPtr;
-		rightPtr = NextPane(leftPtr);
-		if (delta > 0) {
-		    GrowLeftShrinkLast(setPtr, leftPtr, rightPtr, delta);
-		} else if (delta < 0) {
-		    ShrinkLeftGrowLast(setPtr, leftPtr, rightPtr, -delta);
-		}
-	    } 
-	    break;
-	case MODE_SLINKY:
-	    break;
-	}
-	for (panePtr = FirstPane(setPtr); panePtr != NULL; 
-	     panePtr = NextPane(panePtr)) {
-	    panePtr->nom = panePtr->size;
-	}
-    }
-    EventuallyRedraw(setPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * MotionTimerProc --
- *
- *---------------------------------------------------------------------------
- */
-static void
-MotionTimerProc(ClientData clientData)
-{
-    Paneset *setPtr = clientData;
-
-    if (setPtr->scrollTarget > setPtr->scrollOffset) {
-	setPtr->scrollOffset += setPtr->scrollIncr;
-	if (setPtr->scrollOffset > setPtr->scrollTarget) {
-	    setPtr->scrollOffset = setPtr->scrollTarget;
-	} 
-    } else if (setPtr->scrollTarget < setPtr->scrollOffset) {
-	setPtr->scrollOffset -= setPtr->scrollIncr;
-	if (setPtr->scrollOffset < setPtr->scrollTarget) {
-	    setPtr->scrollOffset = setPtr->scrollTarget;
-	} 
-    }
-    setPtr->scrollIncr += setPtr->scrollIncr;
-    if (setPtr->scrollTarget == setPtr->scrollOffset) {
-	if (setPtr->timerToken != (Tcl_TimerToken)0) {
-	    Tcl_DeleteTimerHandler(setPtr->timerToken);
-	    setPtr->timerToken = 0;
-	    setPtr->scrollIncr = setPtr->scrollUnits;
-	}
-    } else {
-	setPtr->timerToken = Tcl_CreateTimerHandler(setPtr->interval, 
-		MotionTimerProc, setPtr);
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-
-/*ARGSUSED*/
-static int
-SeeOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr;
-    int left, right, width, margin;
-
-    if (GetPaneFromObj(interp, setPtr, objv[2], &panePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((panePtr == NULL) || (panePtr->flags & (HIDE|DISABLED))) {
-	return TCL_OK;
-    }
-
-    width = VPORTWIDTH(setPtr);
-    left = setPtr->scrollOffset;
-    right = setPtr->scrollOffset + width;
-    margin = 20;
-    
-    /* If the pane is partially obscured, scroll so that it's entirely in
-     * view. */
-    if (panePtr->x < left) {
-	setPtr->scrollTarget = panePtr->x - (width - panePtr->size)/2;
-	if ((panePtr->size + margin) < width) {
-	    setPtr->scrollTarget -= margin;
-	}
-    } else if ((panePtr->x + panePtr->size) >= right) {
-	setPtr->scrollTarget = panePtr->x - (width - panePtr->size)/2;
-	if ((panePtr->size + margin) < width) {
-	    setPtr->scrollTarget += margin;
-	}
-    }
-    if (setPtr->flags & ANIMATE) {
-	setPtr->scrollIncr = setPtr->scrollUnits;
-	setPtr->timerToken = Tcl_CreateTimerHandler(setPtr->interval, 
-		MotionTimerProc, setPtr);
-    } else {
-	setPtr->scrollOffset = setPtr->scrollTarget;
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagAddOp --
- *
- *	.t tag add tagName pane1 pane2 pane2 pane4
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagAddOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *tag;
-
-    tag = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(tag[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", tag, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (strcmp(tag, "all") == 0) {
-	Tcl_AppendResult(interp, "can't add reserved tag \"", tag, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	/* No nodes specified.  Just add the tag. */
-	AddTag(setPtr, NULL, tag);
-    } else {
-	int i;
-
-	for (i = 4; i < objc; i++) {
-	    Pane *panePtr;
-	    PaneIterator iter;
-	    
-	    if (GetPaneIterator(interp, setPtr, objv[i], &iter) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-		 panePtr = NextTaggedPane(&iter)) {
-		AddTag(setPtr, panePtr, tag);
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagDeleteOp --
- *
- *	.t delete tagName pane1 pane2 pane3
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagDeleteOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *tag;
-    Blt_HashTable *tablePtr;
-
-    tag = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(tag[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", tag, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (strcmp(tag, "all") == 0) {
-	Tcl_AppendResult(interp, "can't delete reserved tag \"", tag, "\"", 
-			 (char *)NULL);
-        return TCL_ERROR;
-    }
-    tablePtr = GetTagTable(setPtr, tag);
-    if (tablePtr != NULL) {
-        int i;
-      
-        for (i = 4; i < objc; i++) {
-	    Pane *panePtr;
-	    PaneIterator iter;
-
-	    if (GetPaneIterator(interp, setPtr, objv[i], &iter) != TCL_OK) {
-	        return TCL_ERROR;
-	    }
-	    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-		 panePtr = NextTaggedPane(&iter)) {
-		Blt_HashEntry *hPtr;
-
-	        hPtr = Blt_FindHashEntry(tablePtr, (char *)panePtr);
-	        if (hPtr != NULL) {
-		    Blt_DeleteHashEntry(tablePtr, hPtr);
-	        }
-	   }
-       }
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagExistsOp --
- *
- *	Returns the existence of the one or more tags in the given node.  If
- *	the node has any the tags, true is return in the interpreter.
- *
- *	.t tag exists pane tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagExistsOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	const char *tag;
-	Pane *panePtr;
-
-	tag = Tcl_GetString(objv[i]);
-	for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	     panePtr = NextTaggedPane(&iter)) {
-	    if (HasTag(panePtr, tag)) {
-		Tcl_SetBooleanObj(Tcl_GetObjResult(interp), TRUE);
-		return TCL_OK;
-	    }
-	}
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), FALSE);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagForgetOp --
- *
- *	Removes the given tags from all panes.
- *
- *	.ts tag forget tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagForgetOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	const char *tag;
-
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-			     "\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	ForgetTag(setPtr, tag);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagGetOp --
- *
- *	Returns tag names for a given node.  If one of more pattern arguments
- *	are provided, then only those matching tags are returned.
- *
- *	.t tag get pane pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagGetOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr; 
-    PaneIterator iter;
-    Tcl_Obj *listObjPtr;
-
-    if (GetPaneIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	if (objc == 4) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch hiter;
-
-	    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		 hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		Blt_HashTable *tablePtr;
-
-		tablePtr = Blt_GetHashValue(hPtr);
-		if (Blt_FindHashEntry(tablePtr, (char *)panePtr) != NULL) {
-		    const char *tag;
-		    Tcl_Obj *objPtr;
-
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    objPtr = Tcl_NewStringObj(tag, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		}
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				     Tcl_NewStringObj("all", 3));
-	} else {
-	    int i;
-	    
-	    /* Check if we need to add the special tags "all" */
-	    for (i = 4; i < objc; i++) {
-		const char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch("all", pattern)) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj("all", 3);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;
-		}
-	    }
-	    /* Now process any standard tags. */
-	    for (i = 4; i < objc; i++) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch hiter;
-		const char *pattern;
-		
-		pattern = Tcl_GetString(objv[i]);
-		for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		    const char *tag;
-		    Blt_HashTable *tablePtr;
-
-		    tablePtr = Blt_GetHashValue(hPtr);
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    if (!Tcl_StringMatch(tag, pattern)) {
-			continue;
-		    }
-		    if (Blt_FindHashEntry(tablePtr, (char *)panePtr) != NULL) {
-			Tcl_Obj *objPtr;
-
-			objPtr = Tcl_NewStringObj(tag, -1);
-			Tcl_ListObjAppendElement(interp, listObjPtr,objPtr);
-		    }
-		}
-	    }
-	}    
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNamesOp --
- *
- *	Returns the names of all the tags in the paneset.  If one of more node
- *	arguments are provided, then only the tags found in those nodes are
- *	returned.
- *
- *	.t tag names pane pane pane...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNamesOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    objPtr = Tcl_NewStringObj("all", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    const char *tag;
-	    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-	    objPtr = Tcl_NewStringObj(tag, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_HashTable uniqTable;
-	int i;
-
-	Blt_InitHashTable(&uniqTable, BLT_STRING_KEYS);
-	for (i = 3; i < objc; i++) {
-	    PaneIterator iter;
-	    Pane *panePtr;
-
-	    if (GetPaneIterator(interp, setPtr, objPtr, &iter) != TCL_OK) {
-		goto error;
-	    }
-	    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-		 panePtr = NextTaggedPane(&iter)) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch hiter;
-		for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		    const char *tag;
-		    Blt_HashTable *tablePtr;
-
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    tablePtr = Blt_GetHashValue(hPtr);
-		    if (Blt_FindHashEntry(tablePtr, panePtr) != NULL) {
-			int isNew;
-
-			Blt_CreateHashEntry(&uniqTable, tag, &isNew);
-		    }
-		}
-	    }
-	}
-	{
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch hiter;
-
-	    for (hPtr = Blt_FirstHashEntry(&uniqTable, &hiter); hPtr != NULL;
-		 hPtr = Blt_NextHashEntry(&hiter)) {
-		objPtr = Tcl_NewStringObj(Blt_GetHashKey(&uniqTable, hPtr), -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-	Blt_DeleteHashTable(&uniqTable);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
- error:
-    Tcl_DecrRefCount(listObjPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagIndicesOp --
- *
- *	Returns the indices associated with the given tags.  The indices
- *	returned will represent the union of panes for all the given tags.
- *
- *	.t tag indices tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagIndicesOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashTable paneTable;
-    int i;
-	
-    Blt_InitHashTable(&paneTable, BLT_ONE_WORD_KEYS);
-    for (i = 3; i < objc; i++) {
-	const char *tag;
-
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-			     "\": can't start with a digit", (char *)NULL);
-	    goto error;
-	}
-	if (strcmp(tag, "all") == 0) {
-	    break;
-	} else {
-	    Blt_HashTable *tablePtr;
-	    
-	    tablePtr = GetTagTable(setPtr, tag);
-	    if (tablePtr != NULL) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch iter;
-
-		for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		    Pane *panePtr;
-		    int isNew;
-
-		    panePtr = Blt_GetHashValue(hPtr);
-		    if (panePtr != NULL) {
-			Blt_CreateHashEntry(&paneTable, (char *)panePtr, &isNew);
-		    }
-		}
-		continue;
-	    }
-	}
-	Tcl_AppendResult(interp, "can't find a tag \"", tag, "\"",
-			 (char *)NULL);
-	goto error;
-    }
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (hPtr = Blt_FirstHashEntry(&paneTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Pane *panePtr;
-	    Tcl_Obj *objPtr;
-
-	    panePtr = (Pane *)Blt_GetHashKey(&paneTable, hPtr);
-	    objPtr = Tcl_NewLongObj(panePtr->index);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_DeleteHashTable(&paneTable);
-    return TCL_OK;
-
- error:
-    Blt_DeleteHashTable(&paneTable);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagSetOp --
- *
- *	Sets one or more tags for a given pane.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all").
- *
- *	.t tag set pane tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagSetOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	const char *tag;
-	Pane *panePtr;
-	
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-		"\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (strcmp(tag, "all") == 0) {
-	    Tcl_AppendResult(interp, "can't add reserved tag \"", tag, "\"",
-			     (char *)NULL);	
-	    return TCL_ERROR;
-	}
-	for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	     panePtr = NextTaggedPane(&iter)) {
-	    AddTag(setPtr, panePtr, tag);
-	}    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagUnsetOp --
- *
- *	Removes one or more tags from a given pane. If a tag doesn't exist or
- *	is a reserved tag ("all"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t tag unset pane tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagUnsetOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Pane *panePtr;
-    PaneIterator iter;
-
-    if (GetPaneIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (panePtr = FirstTaggedPane(&iter); panePtr != NULL; 
-	 panePtr = NextTaggedPane(&iter)) {
-	int i;
-	for (i = 4; i < objc; i++) {
-	    RemoveTag(panePtr, Tcl_GetString(objv[i]));
-	}    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagOp --
- *
- * 	This procedure is invoked to process tag operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tagOps[] =
-{
-    {"add",     1, TagAddOp,      2, 0, "?name? ?option value...?",},
-    {"delete",  1, TagDeleteOp,   2, 0, "?pane...?",},
-    {"exists",  1, TagExistsOp,   4, 0, "pane ?tag...?",},
-    {"forget",  1, TagForgetOp,   3, 0, "?tag...?",},
-    {"get",     1, TagGetOp,      4, 0, "pane ?pattern...?",},
-    {"indices", 1, TagIndicesOp,  3, 0, "?tag...?",},
-    {"names",   2, TagNamesOp,    3, 0, "?pane...?",},
-    {"set",     1, TagSetOp,      4, 0, "pane ?tag...",},
-    {"unset",   1, TagUnsetOp,    4, 0, "pane ?tag...",},
-};
-
-static int nTagOps = sizeof(tagOps) / sizeof(Blt_OpSpec);
-
-static int
-TagOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    PanesetCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTagOps, tagOps, BLT_OP_ARG2,
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(setPtr, interp, objc, objv);
-    return result;
-}
-
-static int
-ViewOp(Paneset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int width;
-
-    width = VPORTWIDTH(setPtr);
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr, *objPtr;
-
-	/* Report first and last fractions */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)setPtr->scrollOffset / setPtr->worldWidth;
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	fract = (double)(setPtr->scrollOffset + width) / setPtr->worldWidth;
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, 
-		&setPtr->scrollOffset, setPtr->worldWidth, width, 
-		setPtr->scrollUnits, BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Paneset operations.
- *
- * The fields for Blt_OpSpec are as follows:
- *
- *   - operation name
- *   - minimum number of characters required to disambiguate the operation name.
- *   - function associated with operation.
- *   - minimum number of arguments required.
- *   - maximum number of arguments allowed (0 indicates no limit).
- *   - usage string
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec panesetOps[] =
-{
-    {"add",        1, AddOp,       2, 0, "?name? ?option value?...",},
-    {"cget",       2, CgetOp,      3, 3, "option",},
-    {"configure",  2, ConfigureOp, 2, 0, "?option value?",},
-    {"delete",     1, DeleteOp,    3, 3, "pane",},
-    {"insert",     3, InsertOp,    3, 0, "position ?name? ?option value?...",},
-    {"invoke",     3, InvokeOp,    3, 3, "pane",},
-    {"move",       1, MoveOp,      3, 0, "pane after|before pane",},
-    {"names",      1, NamesOp,     2, 0, "?pattern...?",},
-    {"pane",       1, PaneOp,      2, 0, "oper ?args?",},
-    {"see",        1, SeeOp,       3, 3, "pane",},
-    {"tag",        1, TagOp,	   2, 0, "oper args",},
-    {"view",       1, ViewOp,	   2, 5, 
-	"?moveto fract? ?scroll number what?",},
-};
-
-static int nPanesetOps = sizeof(panesetOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * PanesetInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PanesetInstCmdDeleteProc(ClientData clientData)
-{
-    Paneset *setPtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was destroyed
-     * and the command was then deleted (in which case tkwin is NULL) or
-     * because the command was deleted, and then this procedure destroys the
-     * widget.
-     */
-    if (setPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = setPtr->tkwin;
-	setPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PanesetInstCmdProc --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to the paneset geometry manager.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PanesetInstCmdProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    PanesetCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPanesetOps, panesetOps, BLT_OP_ARG1, 
-		objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc)(clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawerInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawerInstCmdDeleteProc(ClientData clientData)
-{
-    Paneset *setPtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin is
-     * NULL) or because the command was deleted, and then this procedure
-     * destroys the widget.
-     */
-    if (setPtr->tkwin != NULL) {
-	DestroyPaneset(setPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Drawer operations.
- *
- * The fields for Blt_OpSpec are as follows:
- *
- *   - operation name
- *   - minimum number of characters required to disambiguate the operation name.
- *   - function associated with operation.
- *   - minimum number of arguments required.
- *   - maximum number of arguments allowed (0 indicates no limit).
- *   - usage string
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec drawerOps[] =
-{
-    {"add",        1, AddOp,       2, 0, "?name? ?option value?...",},
-    {"cget",       2, CgetOp,      3, 3, "option",},
-    {"close",      2, CloseOp,     3, 3, "drawer",},
-    {"configure",  2, ConfigureOp, 2, 0, "?option value?",},
-    {"delete",     2, DeleteOp,    3, 3, "drawer",},
-    {"drawer",     2, PaneOp,      2, 0, "oper ?args?",},
-    {"insert",     3, InsertOp,    4, 0, "position ?name? ?option value?...",},
-    {"invoke",     3, InvokeOp,    3, 3, "drawer",},
-    {"isopen",     2, IsOpenOp,    3, 3, "drawer",},
-    {"lower",      1, LowerOp,     3, 3, "drawer",},
-    {"move",       1, MoveOp,      3, 0, "drawer before|after drawer",},
-    {"names",      1, NamesOp,     2, 0, "?pattern...?",},
-    {"open",       1, OpenOp,      3, 3, "drawer",},
-    {"raise",      1, RaiseOp,     3, 3, "drawer",},
-    {"size",       2, SizeOp,	   2, 4, "?drawer? ?size?",},
-    {"tag",        2, TagOp,	   2, 0, "oper args",},
-    {"toggle",     2, ToggleOp,    3, 3, "drawer",},
-};
-
-static int nDrawerOps = sizeof(drawerOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawerInstCmdProc --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to the paneset geometry manager.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DrawerInstCmdProc(
-    ClientData clientData,		/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    PanesetCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nDrawerOps, drawerOps, BLT_OP_ARG1, 
-		objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc)(clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleActivateOp --
- *
- *	Changes the cursor and schedules to redraw the handle in
- *	its activate state (different relief, colors, etc).
- *
- *	.s activate 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleActivateOp(Pane *panePtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    if (panePtr != setPtr->activePtr) {
-	Tk_Cursor cursor;
-	int vert;
-
-	if (setPtr->activePtr != NULL) {
-	    EventuallyRedrawHandle(setPtr->activePtr);
-	}
-	if (panePtr != NULL) {
-	    EventuallyRedrawHandle(panePtr);
-	}
-	setPtr->activePtr = panePtr;
-	if (setPtr->type == DRAWER) {
-	    vert = panePtr->side & SIDE_VERTICAL;
-	} else {
-	    vert = ISVERT(setPtr);
-	}
-	if (panePtr->cursor != None) {
-	    cursor = panePtr->cursor;
-	} else if (vert) {
-	    cursor = setPtr->defVertCursor;
-	} else {
-	    cursor = setPtr->defHorzCursor;
-	}
-	Tk_DefineCursor(panePtr->handle, cursor);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleAnchorOp --
- *
- *	Set the anchor for the resize/moving the pane/drawer.  Only one of the
- *	x and y coordinates are used depending upon the orientation of the
- *	drawer or pane.
- *
- *	drawer anchor x y
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleAnchorOp(Pane *panePtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-    int x, y;
-    int vert;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    setPtr = panePtr->setPtr;
-    setPtr->anchorPtr = setPtr->activePtr = panePtr;
-    setPtr->flags |= HANDLE_ACTIVE;
-    if (setPtr->type == DRAWER) {
-	vert = panePtr->side & SIDE_VERTICAL;
-    } else {
-	vert = ISVERT(setPtr);
-    }
-    if (vert) {
-	setPtr->bearing = ScreenY(panePtr);
-	setPtr->handleAnchor = y;
-    } else {
-	setPtr->bearing = ScreenX(panePtr);
-	setPtr->handleAnchor = x;
-    } 
-    setPtr->bearing += panePtr->size;
-    AdjustHandle(setPtr, 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleCgetOp --
- *
- *	Returns the value of the named option in the handle.
- *
- * Results:
- *	Returns a standard TCL result.  
- *
- *	.p cget option
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleCgetOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, paneSpecs, 
-	(char *)panePtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleCloseOp --
- *
- *	Used only for drawers. Closes the specified drawer. 
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	drawer open 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleCloseOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if ((panePtr->tkwin == NULL) || (panePtr->flags & (DISABLED|CLOSED))) {
-	return TCL_OK;
-    }
-    EventuallyCloseDrawer(panePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleConfigureOp --
- *
- *	Returns the name, position and options of a widget in the paneset.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the paneset configuration
- *	option information is left in interp->result.
- *
- *	drawer configure option value
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleConfigureOp(Pane *panePtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, panePtr->handle, paneSpecs, 
-		(char *)panePtr, (Tcl_Obj *)NULL, setPtr->type);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, panePtr->handle, paneSpecs, 
-		(char *)panePtr, objv[2], setPtr->type);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, panePtr->handle, paneSpecs, objc-2, 
-	objv+2, (char *)panePtr, BLT_CONFIG_OBJV_ONLY|setPtr->type) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleDeactivateOp --
- *
- *	Changes the cursor and schedules to redraw the handle in its
- *	inactivate state (different relief, colors, etc).
- *
- *	drawer deactivate 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleDeactivateOp(Pane *panePtr, Tcl_Interp *interp, int objc, 
-		   Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-
-    setPtr = panePtr->setPtr;
-    if (panePtr == setPtr->activePtr) {
-	EventuallyRedrawHandle(panePtr);
-	setPtr->activePtr = NULL;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleIsOpenOp --
- *
- *	Indicates if the drawer is open or closed.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	drawer isopen
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleIsOpenOp(Pane *panePtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    int state;
-
-    state = (panePtr->flags & CLOSED) ? FALSE : TRUE;
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), state);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleLowerOp --
- *
- *	Lowers the specified pane to bottom of the stack of panes.  
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	.p lower
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleLowerOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    LowerDrawer(panePtr);
-    EventuallyRedraw(panePtr->setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleMarkOp --
- *
- *	Sets the current mark for moving the handle.  The change between the
- *	mark and the anchor is the amount to move the handle from its previous
- *	location.
- *
- *	drawer mark x y
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleMarkOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-    int x, y;				/* Root coordinates of the pointer
-					 * over the handle. */
-    int delta, mark, vert;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    setPtr = panePtr->setPtr;
-    setPtr->anchorPtr = panePtr;
-    if (setPtr->type == DRAWER) {
-	vert = panePtr->side & SIDE_VERTICAL;
-    } else {
-	vert = ISVERT(setPtr);
-    }
-    mark = (vert) ? y : x;
-    delta = mark - setPtr->handleAnchor;
-    AdjustHandle(setPtr, delta);
-    setPtr->handleAnchor = mark;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleMoveOp --
- *
- *	Moves the handle.  The handle is moved the given distance from its
- *	previous location.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleMoveOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-    int delta, x, y;
-    int vert;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    setPtr = panePtr->setPtr;
-    setPtr->anchorPtr = panePtr;
-    if (setPtr->type == DRAWER) {
-	vert = panePtr->side & SIDE_VERTICAL;
-    } else {
-	vert = ISVERT(setPtr);
-    }
-    if (vert) {
-	delta = y;
-	setPtr->bearing = ScreenY(panePtr);
-    } else {
-	delta = x;
-	setPtr->bearing = ScreenX(panePtr);
-    }
-    setPtr->bearing += panePtr->size;
-    AdjustHandle(setPtr, delta);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleOpenOp --
- *
- *	Used only for drawers.  Opens the specified drawer.  The drawer is
- *	opened to the widget's requested size.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	drawer open 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleOpenOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if ((panePtr->flags & (DISABLED|CLOSED)) != CLOSED) {
-	return TCL_OK;			/* Already open or disabled. */
-    }
-    EventuallyOpenDrawer(panePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleSetOp --
- *
- *	Sets the location of the handle to coordinate (x or y) specified.  The
- *	windows are move and/or arranged according to the mode.
- *
- *	drawer set $x $y
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleSetOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Paneset *setPtr;
-    int x, y;
-    int delta, mark, vert;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    } 
-    setPtr = panePtr->setPtr;
-    setPtr->flags &= ~HANDLE_ACTIVE;
-    if (setPtr->type == DRAWER) {
-	vert = panePtr->side & SIDE_VERTICAL;
-    } else {
-	vert = ISVERT(setPtr);
-    }
-    mark = (vert) ? y : x;
-    delta = mark - setPtr->handleAnchor;
-    AdjustHandle(setPtr, delta);
-    setPtr->handleAnchor = mark;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleSizeOp --
- *
- *	Only used for drawers, set and/or gets the size of the opening for the
- *	drawer.  This does not affect the size of the window.
- *
- *	drawer size $size
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleSizeOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int size;
-
-    if (objc == 2) {
-	size = panePtr->size;
-    } else {
-	int newSize;
-	Paneset *setPtr;
-
-	setPtr = panePtr->setPtr;
-	if (Blt_GetPixelsFromObj(interp, setPtr->tkwin, objv[2], PIXELS_NNEG, 
-				 &newSize) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	panePtr->size = newSize;
-	if (panePtr->side & SIDE_VERTICAL) {
-	    panePtr->y = newSize;
-	} else {
-	    panePtr->x = newSize;
-	}
-	EventuallyRedraw(setPtr);
-    } 
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), size);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleRaiseOp --
- *
- *	Raises the specified pane to the top of the stack of panes.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	drawer raise 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HandleRaiseOp(Pane *panePtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    RaiseDrawer(panePtr);
-    EventuallyRedraw(panePtr->setPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec drawerHandleOps[] =
-{
-    {"activate",   2, HandleActivateOp,   2, 2, ""},
-    {"anchor",     2, HandleAnchorOp,     4, 4, "x y"},
-    {"cget",       2, HandleCgetOp,       3, 3, "option",},
-    {"close",      2, HandleCloseOp,      3, 3, "",},
-    {"configure",  2, HandleConfigureOp,  2, 0, "?option value?",},
-    {"deactivate", 1, HandleDeactivateOp, 2, 2, ""},
-    {"isopen",     1, HandleIsOpenOp,     2, 2, "",},
-    {"lower",      1, HandleLowerOp,      2, 2, "",},
-    {"mark",       1, HandleMarkOp,       4, 4, "x y"},
-    {"move",       1, HandleMoveOp,       4, 4, "x y"},
-    {"open",       1, HandleOpenOp,       2, 2, "",},
-    {"raise",      1, HandleRaiseOp,      2, 2, "",},
-    {"set",        2, HandleSetOp,        4, 4, "x y"},
-    {"size",       2, HandleSizeOp,       2, 3, "?size?"},
-};
-
-static int nDrawerHandleOps = sizeof(drawerHandleOps) / sizeof(Blt_OpSpec);
-
-static Blt_OpSpec paneHandleOps[] =
-{
-    {"activate",   2, HandleActivateOp,   2, 2, ""},
-    {"anchor",     2, HandleAnchorOp,     4, 4, "x y"},
-    {"cget",       2, HandleCgetOp,       3, 3, "option",},
-    {"configure",  2, HandleConfigureOp,  2, 0, "?option value?",},
-    {"deactivate", 1, HandleDeactivateOp, 2, 2, ""},
-    {"mark",       1, HandleMarkOp,       4, 4, "x y"},
-    {"move",       1, HandleMoveOp,       4, 4, "x y"},
-    {"set",        1, HandleSetOp,        4, 4, "x y"},
-};
-
-static int nPaneHandleOps = sizeof(paneHandleOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleInstCmdProc --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to the paneset geometry manager.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HandleInstCmdProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_OpSpec *specs;
-    HandleCmdProc *proc;
-    Pane *panePtr = clientData;
-    Paneset *setPtr;
-    int nSpecs;
-
-    setPtr = panePtr->setPtr;
-
-    if (setPtr->type == DRAWER) {
-	specs = drawerHandleOps;
-	nSpecs = nDrawerHandleOps;
-    } else {
-	specs = paneHandleOps;
-	nSpecs = nPaneHandleOps;
-    }
-    proc = Blt_GetOpFromObj(interp, nSpecs, specs, BLT_OP_ARG1, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    if (panePtr->flags & (DISABLED|HIDE)) {
-	return TCL_OK;
-    }
-    return (*proc)(panePtr, interp, objc, objv);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * HandleInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-HandleInstCmdDeleteProc(ClientData clientData)
-{
-    Pane *panePtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was destroyed
-     * and the command was then deleted (in which case tkwin is NULL) or
-     * because the command was deleted, and then this procedure destroys the
-     * widget.
-     */
-    if (panePtr->handle != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = panePtr->handle;
-	panePtr->handle = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PanesetCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-PanesetCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    Paneset *setPtr;
-    Tcl_CmdInfo cmdInfo;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     * If the procedure doesn't already exist, source it from
-     * "$blt_library/paneset.tcl".  We deferred sourcing the file until now so
-     * that the variable $blt_library could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::paneset::Initialize", &cmdInfo)) {
-	char cmd[200];
-	sprintf_s(cmd, 200, "source [file join $blt_library paneset.tcl]\n");
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-	    
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		      Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    setPtr = NewPaneset(interp, objv[1], PANESET);
-    if (setPtr == NULL) {
-	goto error;
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, panesetSpecs, 
-	objc - 2, objv + 2, (char *)setPtr, setPtr->type) != TCL_OK) {
-	goto error;
-    }
-    ConfigurePaneset(setPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(setPtr->tkwin),-1);
-    return TCL_OK;
-  error:
-    if (setPtr != NULL) {
-	Tk_DestroyWindow(setPtr->tkwin);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FilmstripCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-FilmstripCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    Paneset *setPtr;
-    Tcl_CmdInfo cmdInfo;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     * If the procedure doesn't already exist, source it from
-     * "$blt_library/paneset.tcl".  We deferred sourcing the file until now so
-     * that the variable $blt_library could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::Filmstrip::Initialize", &cmdInfo)) {
-	char cmd[200];
-	sprintf_s(cmd, 200, "source [file join $blt_library filmstrip.tcl]\n");
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    goto error;
-	}
-    }
-
-    setPtr = NewPaneset(interp, objv[1], FILMSTRIP);
-    if (setPtr == NULL) {
-	goto error;
-    }
-
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, panesetSpecs, 
-	objc - 2, objv + 2, (char *)setPtr, setPtr->type) != TCL_OK) {
-	goto error;
-    }
-    ConfigurePaneset(setPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(setPtr->tkwin),-1);
-    return TCL_OK;
-  error:
-    if (setPtr != NULL) {
-	Tk_DestroyWindow(setPtr->tkwin);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawersetCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-DrawersetCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    Paneset *setPtr;
-    Tcl_CmdInfo cmdInfo;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     * If the procedure doesn't already exist, source it from
-     * "$blt_library/paneset.tcl".  We deferred sourcing the file until now so
-     * that the variable $blt_library could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::Drawer::Initialize", &cmdInfo)) {
-	char cmd[200];
-	sprintf_s(cmd, 200, "source [file join $blt_library drawer.tcl]\n");
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    setPtr = NewDrawerset(interp, objv[1]);
-    if (setPtr == NULL) {
-	goto error;
-    }
-
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, panesetSpecs, 
-	objc - 2, objv + 2, (char *)setPtr, setPtr->type) != TCL_OK) {
-	goto error;
-    }
-    ConfigurePaneset(setPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), setPtr->name, -1);
-    return TCL_OK;
-  error:
-    if (setPtr != NULL) {
-	Tk_DestroyWindow(setPtr->tkwin);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PanesetCmdInitProc --
- *
- *	This procedure is invoked to initialize the TCL command that
- *	corresponds to the paneset geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new TCL command.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_PanesetCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[] = {
-	{ "drawerset", DrawersetCmd },
-	{ "filmstrip", FilmstripCmd },
-	{ "paneset",   PanesetCmd }
-    };
-    return Blt_InitCmds(interp, "::blt", cmdSpecs, 3);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayPaneset --
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The widgets in the paneset are possibly resized and redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayPaneset(ClientData clientData)
-{
-    Paneset *setPtr = clientData;
-
-    setPtr->flags &= ~REDRAW_PENDING;
-#if TRACE
-    fprintf(stderr, "DisplayPaneset(%s)\n", Tk_PathName(setPtr->tkwin));
-#endif
-    if (setPtr->flags & LAYOUT_PENDING) {
-	ComputeGeometry(setPtr);
-    }
-    if (setPtr->reqWidth > 0) {
-	setPtr->normalWidth = setPtr->reqWidth;
-    }
-    if (setPtr->reqHeight > 0) {
-	setPtr->normalHeight = setPtr->reqHeight;
-    }
-    if (setPtr->type & (FILMSTRIP|PANESET)) {
-	if ((setPtr->normalWidth != Tk_ReqWidth(setPtr->tkwin)) ||
-	    (setPtr->normalHeight != Tk_ReqHeight(setPtr->tkwin))) {
-	    Tk_GeometryRequest(setPtr->tkwin, setPtr->normalWidth,
-			       setPtr->normalHeight);
-	    EventuallyRedraw(setPtr);
-	    return;
-	}
-    }
-    if ((Tk_Width(setPtr->tkwin) <= 1) || (Tk_Height(setPtr->tkwin) <=1)) {
-	/* Don't bother computing the layout until the size of the window is
-	 * something reasonable. */
-	return;
-    }
-    if (!Tk_IsMapped(setPtr->tkwin)) {
-	/* The paneset's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the new layout.  */
-	return;
-    }
-    
-    if ((setPtr->type == FILMSTRIP) && (setPtr->flags & SCROLL_PENDING)) {
-	int width;
-
-	width = VPORTWIDTH(setPtr);
-	setPtr->scrollOffset = Blt_AdjustViewport(setPtr->scrollOffset,
-		setPtr->worldWidth, width, setPtr->scrollUnits, 
-		BLT_SCROLL_MODE_HIERBOX);
-	if (setPtr->scrollCmdObjPtr != NULL) {
-	    Blt_UpdateScrollbar(setPtr->interp, setPtr->scrollCmdObjPtr,
-		setPtr->scrollOffset, setPtr->scrollOffset + width,
-		setPtr->worldWidth);
-	}
-	setPtr->flags &= ~SCROLL_PENDING;
-    }
-    setPtr->nVisible = Blt_Chain_GetLength(setPtr->chain);
-    if (setPtr->type & (FILMSTRIP|PANESET)) {
-#ifdef notdef
-	Blt_FillBackgroundRectangle(setPtr->tkwin, Tk_WindowId(setPtr->tkwin), 
-		setPtr->bg, 0, 0, Tk_Width(setPtr->tkwin), 
-		Tk_Height(setPtr->tkwin), 0, TK_RELIEF_FLAT);
-#endif
-	if (setPtr->nVisible > 0) {
-	    if (ISVERT(setPtr)) {
-		VerticalPanes(setPtr);
-	    } else {
-		HorizontalPanes(setPtr);
-	    }
-	}
-    } else {
-	if (setPtr->nVisible > 0) {
-	    ArrangeDrawers(setPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayHandle
- *
- *	Draws the pane's handle at its proper location.  First determines the
- *	size and position of the each window.  It then considers the
- *	following:
- *
- *	  1. translation of widget position its parent widget.
- *	  2. fill style
- *	  3. anchor
- *	  4. external and internal padding
- *	  5. widget size must be greater than zero
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each pane is re-initialized its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayHandle(ClientData clientData)
-{
-    Pane *panePtr = clientData;
-    Blt_Background bg;
-    int relief;
-    Paneset *setPtr;
-    Drawable drawable;
-
-    panePtr->flags &= ~REDRAW_PENDING;
-    if (panePtr->handle == NULL) {
-	return;
-    }
-    setPtr = panePtr->setPtr;
-    if (setPtr->activePtr == panePtr) {
-	bg = GETATTR(panePtr, activeHandleBg);
-	relief = setPtr->activeRelief;
-    } else {
-	bg = GETATTR(panePtr, handleBg);
-	relief = setPtr->relief;
-    }
-    drawable = Tk_WindowId(panePtr->handle);
-    Blt_FillBackgroundRectangle(panePtr->handle, drawable, bg, 
-	0, 0, Tk_Width(panePtr->handle), Tk_Height(panePtr->handle), 
-	0, TK_RELIEF_FLAT);
-    Blt_DrawBackgroundRectangle(panePtr->handle, drawable, bg, 
-	setPtr->handlePad.side1, setPtr->handlePad.side1, 
-	Tk_Width(panePtr->handle) - PADDING(setPtr->handlePad), 
-	Tk_Height(panePtr->handle) - PADDING(setPtr->handlePad),
-	setPtr->handleBW, relief);
-
-    if ((setPtr->highlightThickness > 0) && (panePtr->flags & FOCUS)) {
-	GC gc;
-
-	gc = Tk_GCForColor(panePtr->highlightColor, drawable);
-	Tk_DrawFocusHighlight(panePtr->handle, gc, setPtr->highlightThickness,
-		drawable);
-    }
-}
diff --git a/blt3.0/src/bltParse.c b/blt3.0/src/bltParse.c
deleted file mode 100644
index 10703f3..0000000
--- a/blt3.0/src/bltParse.c
+++ /dev/null
@@ -1,546 +0,0 @@
-
-/*
- * bltParse.c --
- *
- * Contains a collection of procedures that are used to parse Tcl
- * commands or parts of commands (like quoted strings or nested 
- * sub-commands).
- *
- * This file is copied from tclParse.c in the TCL library distribution.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * 
- */
-
-/*
- * Since TCL 8.1.0 these routines have been replaced by ones that
- * generate byte-codes.  But since these routines are used in vector
- * expressions, where no such byte-compilation is necessary, I now
- * include them.  In fact, the byte-compiled versions would be slower
- * since the compiled code typically runs only one time.
- */
-#include <bltInt.h>
-
-#include "bltParse.h"
-
-/*
- * A table used to classify input characters to assist in parsing
- * TCL commands.  The table should be indexed with a signed character
- * using the CHAR_TYPE macro.  The character may have a negative
- * value.  The CHAR_TYPE macro takes a pointer to a signed character
- * and a pointer to the last character in the source string.  If the
- * src pointer is pointing at the terminating null of the string,
- * CHAR_TYPE returns TCL_COMMAND_END.
- */
-
-#define STATIC_STRING_SPACE	150
-#define UCHAR(c)		((unsigned char) (c))
-#define TCL_NORMAL		0x01
-#define TCL_SPACE		0x02
-#define TCL_COMMAND_END		0x04
-#define TCL_QUOTE		0x08
-#define TCL_OPEN_BRACKET	0x10
-#define TCL_OPEN_BRACE		0x20
-#define TCL_CLOSE_BRACE		0x40
-#define TCL_BACKSLASH		0x80
-#define TCL_DOLLAR		0x00
-
-/*
- * The following table assigns a type to each character. Only types
- * meaningful to TCL parsing are represented here. The table is
- * designed to be referenced with either signed or unsigned characters,
- * so it has 384 entries. The first 128 entries correspond to negative
- * character values, the next 256 correspond to positive character
- * values. The last 128 entries are identical to the first 128. The
- * table is always indexed with a 128-byte offset (the 128th entry
- * corresponds to a 0 character value).
- */
-
-static unsigned char tclTypeTable[] =
-{
- /*
-     * Negative character values, from -128 to -1:
-     */
-
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-
-    /*
-     * Positive character values, from 0-127:
-     */
-
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_SPACE, TCL_COMMAND_END, TCL_SPACE,
-    TCL_SPACE, TCL_SPACE, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_SPACE, TCL_NORMAL, TCL_QUOTE, TCL_NORMAL,
-    TCL_DOLLAR, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_COMMAND_END,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_OPEN_BRACKET,
-    TCL_BACKSLASH, TCL_COMMAND_END, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_OPEN_BRACE,
-    TCL_NORMAL, TCL_CLOSE_BRACE, TCL_NORMAL, TCL_NORMAL,
-
-    /*
-     * Large unsigned character values, from 128-255:
-     */
-
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-    TCL_NORMAL, TCL_NORMAL, TCL_NORMAL, TCL_NORMAL,
-};
-
-#define CHAR_TYPE(src,last) \
-	(((src)==(last))?TCL_COMMAND_END:(tclTypeTable+128)[(int)*(src)])
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ParseNestedCmd --
- *
- *	This procedure parses a nested TCL command between
- *	brackets, returning the result of the command.
- *
- * Results:
- *	The return value is a standard TCL result, which is
- *	TCL_OK unless there was an error while executing the
- *	nested command.  If an error occurs then interp->result
- *	contains a standard error message.  *TermPtr is filled
- *	in with the address of the character just after the
- *	last one processed;  this is usually the character just
- *	after the matching close-bracket, or the null character
- *	at the end of the string if the close-bracket was missing
- *	(a missing close bracket is an error).  The result returned
- *	by the command is stored in standard fashion in *parsePtr,
- *	null-terminated, with parsePtr->next pointing to the null
- *	character.
- *
- * Side effects:
- *	The storage space at *parsePtr may be expanded.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ParseNestedCmd(
-    Tcl_Interp *interp,		/* Interpreter to use for nested command
-				 * evaluations and error messages. */
-    const char *string,		/* Character just after opening bracket. */
-    int flags,			/* Flags to pass to nested Tcl_Eval. */
-    const char **termPtr,	/* Store address of terminating character
-				 * here. */
-    ParseValue *parsePtr)	/* Information about where to place
-				 * result of command. */
-{
-    int result, length, shortfall;
-    Interp *iPtr = (Interp *)interp;
-
-    iPtr->evalFlags = flags | TCL_BRACKET_TERM;
-    result = Tcl_Eval(interp, string);
-    *termPtr = (string + iPtr->termOffset);
-    if (result != TCL_OK) {
-	/*
-	 * The increment below results in slightly cleaner message in
-	 * the errorInfo variable (the close-bracket will appear).
-	 */
-
-	if (**termPtr == ']') {
-	    *termPtr += 1;
-	}
-	return result;
-    }
-    (*termPtr) += 1;
-    length = (int)strlen(iPtr->result);
-    shortfall = length + 1 - (parsePtr->end - parsePtr->next);
-    if (shortfall > 0) {
-	(*parsePtr->expandProc) (parsePtr, shortfall);
-    }
-    strcpy(parsePtr->next, iPtr->result);
-    parsePtr->next += length;
-
-    Tcl_FreeResult(interp);
-    iPtr->result = iPtr->resultSpace;
-    iPtr->resultSpace[0] = '\0';
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ParseBraces --
- *
- *	This procedure scans the information between matching
- *	curly braces.
- *
- * Results:
- *	The return value is a standard TCL result, which is
- *	TCL_OK unless there was an error while parsing string.
- *	If an error occurs then interp->result contains a
- *	standard error message.  *TermPtr is filled
- *	in with the address of the character just after the
- *	last one successfully processed;  this is usually the
- *	character just after the matching close-brace.  The
- *	information between curly braces is stored in standard
- *	fashion in *parsePtr, null-terminated with parsePtr->next
- *	pointing to the terminating null character.
- *
- * Side effects:
- *	The storage space at *parsePtr may be expanded.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_ParseBraces(
-    Tcl_Interp *interp,		/* Interpreter to use for nested command
-				 * evaluations and error messages. */
-    const char *string,		/* Character just after opening bracket. */
-    const char **termPtr,	/* Store address of terminating character
-				 * here. */
-    ParseValue *parsePtr)	/* Information about where to place
-				 * result of command. */
-{
-    int level;
-    const char *src;
-    char *dest, *end;
-    char c;
-    const char *lastChar = string + strlen(string);
-
-    src = string;
-    dest = parsePtr->next;
-    end = parsePtr->end;
-    level = 1;
-
-    /*
-     * Copy the characters one at a time to the result area, stopping
-     * when the matching close-brace is found.
-     */
-
-    for (;;) {
-	c = *src;
-	src++;
-
-	if (dest == end) {
-	    parsePtr->next = dest;
-	    (*parsePtr->expandProc) (parsePtr, 20);
-	    dest = parsePtr->next;
-	    end = parsePtr->end;
-	}
-	*dest = c;
-	dest++;
-
-	if (CHAR_TYPE(src - 1, lastChar) == TCL_NORMAL) {
-	    continue;
-	} else if (c == '{') {
-	    level++;
-	} else if (c == '}') {
-	    level--;
-	    if (level == 0) {
-		dest--;		/* Don't copy the last close brace. */
-		break;
-	    }
-	} else if (c == '\\') {
-	    int count;
-
-	    /*
-	     * Must always squish out backslash-newlines, even when in
-	     * braces.  This is needed so that this sequence can appear
-	     * anywhere in a command, such as the middle of an expression.
-	     */
-
-	    if (*src == '\n') {
-		dest[-1] = Tcl_Backslash(src - 1, &count);
-		src += count - 1;
-	    } else {
-		Tcl_Backslash(src - 1, &count);
-		while (count > 1) {
-		    if (dest == end) {
-			parsePtr->next = dest;
-			(*parsePtr->expandProc) (parsePtr, 20);
-			dest = parsePtr->next;
-			end = parsePtr->end;
-		    }
-		    *dest = *src;
-		    dest++;
-		    src++;
-		    count--;
-		}
-	    }
-	} else if (c == '\0') {
-	    Tcl_AppendResult(interp, "missing close-brace", (char *)NULL);
-	    *termPtr = string - 1;
-	    return TCL_ERROR;
-	}
-    }
-
-    *dest = '\0';
-    parsePtr->next = dest;
-    *termPtr = src;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ExpandParseValue --
- *
- *	This procedure is commonly used as the value of the
- *	expandProc in a ParseValue.  It uses malloc to allocate
- *	more space for the result of a parse.
- *
- * Results:
- *	The buffer space in *parsePtr is reallocated to something
- *	larger, and if parsePtr->clientData is non-zero the old
- *	buffer is freed.  Information is copied from the old
- *	buffer to the new one.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ExpandParseValue(
-    ParseValue *parsePtr,	/* Information about buffer that
-				 * must be expanded.  If the clientData
-				 * in the structure is non-zero, it
-				 * means that the current buffer is
-				 * dynamically allocated. */
-    int needed)			/* Minimum amount of additional space
-				 * to allocate. */
-{
-    int size;
-    char *buffer;
-
-    /*
-     * Either double the size of the buffer or add enough new space
-     * to meet the demand, whichever produces a larger new buffer.
-     */
-    size = (parsePtr->end - parsePtr->buffer) + 1;
-    if (size < needed) {
-	size += needed;
-    } else {
-	size += size;
-    }
-    buffer = Blt_AssertMalloc((unsigned int)size);
-
-    /*
-     * Copy from old buffer to new, free old buffer if needed, and
-     * mark new buffer as malloc-ed.
-     */
-    memcpy((VOID *) buffer, (VOID *) parsePtr->buffer,
-	(size_t) (parsePtr->next - parsePtr->buffer));
-    parsePtr->next = buffer + (parsePtr->next - parsePtr->buffer);
-    if (parsePtr->clientData != 0) {
-	Blt_Free(parsePtr->buffer);
-    }
-    parsePtr->buffer = buffer;
-    parsePtr->end = buffer + size - 1;
-    parsePtr->clientData = (ClientData)1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ParseQuotes --
- *
- *	This procedure parses a double-quoted string such as a
- *	quoted TCL command argument or a quoted value in a Tcl
- *	expression.  This procedure is also used to parse array
- *	element names within parentheses, or anything else that
- *	needs all the substitutions that happen in quotes.
- *
- * Results:
- *	The return value is a standard TCL result, which is
- *	TCL_OK unless there was an error while parsing the
- *	quoted string.  If an error occurs then interp->result
- *	contains a standard error message.  *TermPtr is filled
- *	in with the address of the character just after the
- *	last one successfully processed;  this is usually the
- *	character just after the matching close-quote.  The
- *	fully-substituted contents of the quotes are stored in
- *	standard fashion in *parsePtr, null-terminated with
- *	parsePtr->next pointing to the terminating null character.
- *
- * Side effects:
- *	The buffer space in parsePtr may be enlarged by calling its
- *	expandProc.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ParseQuotes(
-    Tcl_Interp *interp,		/* Interpreter to use for nested command
-				 * evaluations and error messages. */
-    const char *string,		/* Character just after opening double-
-				 * quote. */
-    int termChar,		/* Character that terminates "quoted" string
-				 * (usually double-quote, but sometimes
-				 * right-paren or something else). */
-    int flags,			/* Flags to pass to nested Tcl_Eval calls. */
-    const char **termPtr,	/* Store address of terminating character
-				 * here. */
-    ParseValue *parsePtr)	/* Information about where to place
-				 * fully-substituted result of parse. */
-{
-    const char *src;
-    char *dest, c;
-    const char *lastChar = string + strlen(string);
-
-    src = string;
-    dest = parsePtr->next;
-
-    for (;;) {
-	if (dest == parsePtr->end) {
-	    /*
-	     * Target buffer space is about to run out.  Make more space.
-	     */
-	    parsePtr->next = dest;
-	    (*parsePtr->expandProc) (parsePtr, 1);
-	    dest = parsePtr->next;
-	}
-	c = *src;
-	src++;
-	if (c == termChar) {
-	    *dest = '\0';
-	    parsePtr->next = dest;
-	    *termPtr = src;
-	    return TCL_OK;
-	} else if (CHAR_TYPE(src - 1, lastChar) == TCL_NORMAL) {
-	  copy:
-	    *dest = c;
-	    dest++;
-	    continue;
-	} else if (c == '$') {
-	    int length;
-	    const char *value;
-
-	    value = Tcl_ParseVar(interp, src - 1, termPtr);
-	    if (value == NULL) {
-		return TCL_ERROR;
-	    }
-	    src = *termPtr;
-	    length = strlen(value);
-	    if ((parsePtr->end - dest) <= length) {
-		parsePtr->next = dest;
-		(*parsePtr->expandProc) (parsePtr, length);
-		dest = parsePtr->next;
-	    }
-	    strcpy(dest, value);
-	    dest += length;
-	    continue;
-	} else if (c == '[') {
-	    int result;
-
-	    parsePtr->next = dest;
-	    result = Blt_ParseNestedCmd(interp, src, flags, termPtr, parsePtr);
-	    if (result != TCL_OK) {
-		return result;
-	    }
-	    src = *termPtr;
-	    dest = parsePtr->next;
-	    continue;
-	} else if (c == '\\') {
-	    int nRead;
-
-	    src--;
-	    *dest = Tcl_Backslash(src, &nRead);
-	    dest++;
-	    src += nRead;
-	    continue;
-	} else if (c == '\0') {
-	    char buf[10];
-
-	    Tcl_ResetResult(interp);
-	    sprintf_s(buf, 10, "missing %c", termChar);
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), buf, 9);
-	    *termPtr = string - 1;
-	    return TCL_ERROR;
-	} else {
-	    goto copy;
-	}
-    }
-}
-
diff --git a/blt3.0/src/bltParse.h b/blt3.0/src/bltParse.h
deleted file mode 100644
index 3ff26cb..0000000
--- a/blt3.0/src/bltParse.h
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/*
- * bltParse.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_PARSE_H
-#define _BLT_PARSE_H
-
-#include "tclInterp.h"
-
-BLT_EXTERN int Blt_ParseBraces(Tcl_Interp *interp, const char *string, 
-	const char **termPtr, ParseValue *pvPtr);
-
-BLT_EXTERN int Blt_ParseNestedCmd(Tcl_Interp *interp, const char *string, 
-	int flags, const char **termPtr, ParseValue *pvPtr);
-
-BLT_EXTERN int Blt_ParseQuotes(Tcl_Interp *interp, const char *string, 
-	int termChar, int flags, const char **termPtr, ParseValue * pvPtr);
-
-BLT_EXTERN void Blt_ExpandParseValue(ParseValue *pvPtr, int needed);
-
-#endif 
diff --git a/blt3.0/src/bltPictBmp.c b/blt3.0/src/bltPictBmp.c
deleted file mode 100644
index f8e2770..0000000
--- a/blt3.0/src/bltPictBmp.c
+++ /dev/null
@@ -1,1646 +0,0 @@
-
-/*
- * bltPictBmp.c --
- *
- * This module implements BMP file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#include <tcl.h>
-#include <bltAlloc.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifdef _MSC_VER
-#define vsnprintf		_vsnprintf
-#endif
-
-#include <setjmp.h>
-
-typedef struct _Blt_Picture Picture;
-
-#define TRUE 	1
-#define FALSE 	0
-
-
-#define OFF_TYPE		0
-#define OFF_FILE_SIZE		2
-#define OFF_RESERVED1		6
-#define OFF_RESERVED2		8
-#define OFF_OFFBITS		10
-
-#define OFF_SIZE		14
-#define OFF_WIDTH		18
-#define OFF_HEIGHT		22
-#define OFF_PLANES		26
-#define OFF_BIT_COUNT		28
-#define OFF_COMPRESSION		30
-#define OFF_SIZE_IMAGE		34
-#define OFF_X_PELS_PER_METER	38
-#define OFF_Y_PELS_PER_METER	42
-#define OFF_CLR_USED		46
-#define OFF_CLR_IMPORTANT	50
-#define OFF_RED_MASK		54
-#define OFF_GREEN_MASK		58
-#define OFF_BLUE_MASK		62
-#define OFF_ALPHA_MASK		66
-#define OFF_CS_TYPE		70
-#define OFF_END_POINTS		74
-#define OFF_GAMMA_RED		110 
-#define OFF_GAMMA_GREEN		114
-#define OFF_GAMMA_BLUE		118  
-#define OFF_INTENT		122 
-#define OFF_PROFILE_DATA	126
-#define OFF_PROFILE_SIZE	130
-#define OFF_RESERVED3		134 
-
-#define OFF_OSV1_SIZE		14
-#define OFF_OSV1_WIDTH		18
-#define OFF_OSV1_HEIGHT		20
-#define OFF_OSV1_PLANES		22
-#define OFF_OSV1_BIT_COUNT	24
-
-#define SIZEOF_BITMAPOS2V1HEADER 12
-#define SIZEOF_BITMAPOS2V2HEADER 64
-#define SIZEOF_BITMAPV3HEADER    40
-#define SIZEOF_BITMAPV4HEADER	 108
-#define SIZEOF_BITMAPV5HEADER	 124
-
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-} BmpImportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int flags;			/* Flag. */
-    Blt_Pixel bg;
-    int index;
-} BmpExportSwitches;
-
-#define EXPORT_ALPHA	(1<<0)
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data",  "data",
-	Blt_Offset(BmpImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file",  "fileName",
-	Blt_Offset(BmpImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data",  "data",
-	Blt_Offset(BmpExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file",  "fileName",
-	Blt_Offset(BmpExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_CUSTOM, "-bg", "color",
-	Blt_Offset(BmpExportSwitches, bg),         0, 0, &colorSwitch},
-    {BLT_SWITCH_BITMASK, "-alpha", "",
-	Blt_Offset(BmpExportSwitches, flags),   0, EXPORT_ALPHA},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(BmpExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    jmp_buf jmpbuf;
-    Tcl_DString errors;
-    Tcl_DString warnings;
-    int nWarnings, nErrors;
-} BmpMessage;
-
-static BmpMessage *bmpMessagePtr;
-
-static const char *compression_types[] = {
-    "RGB", "RLE8", "RLE4", "BITFIELDS", "JPEG", "PNG"
-};
-
-enum CompressionTypes {
-    BI_RGB,			/* No compression. */
-    BI_RLE8,			/* RLE 8-bits/pixel. Only used with
-				 * 8-bit/pixel bitmaps */  
-    BI_RLE4,			/* RLE 4-bits/pixel. Can be used only with
-				 * 4-bit/pixel bitmaps */
-    BI_BITFIELDS,		/* Bit fields. Can be used only with 16 and
-				 * 32-bit/pixel bitmaps. */
-    BI_JPEG,			/* The bitmap contains a JPEG image. */
-    BI_PNG,			/* The bitmap contains a PNG image. */
-};
-
-typedef struct {
-    unsigned short bfType;
-    unsigned int   bfSize;
-    unsigned short bfReserved1;
-    unsigned short bfReserved2;
-    unsigned int   bfOffBits;
-} BitmapFileHeader;
-
-typedef struct {
-    int  RedX;          /* X coordinate of red endpoint */
-    int  RedY;          /* Y coordinate of red endpoint */
-    int  RedZ;          /* Z coordinate of red endpoint */
-    int  GreenX;        /* X coordinate of green endpoint */
-    int  GreenY;        /* Y coordinate of green endpoint */
-    int  GreenZ;        /* Z coordinate of green endpoint */
-    int  BlueX;         /* X coordinate of blue endpoint */
-    int  BlueY;         /* Y coordinate of blue endpoint */
-    int  BlueZ;         /* Z coordinate of blue endpoint */
-} CieXyzTriple;
-
-typedef struct {
-    unsigned int   biSize; 	/* Size of this structure. This determines
-				 * what version of the header is used. */
-    int		   biWidth; 
-    int		   biHeight; 
-    unsigned short biPlanes; 
-    unsigned short biBitCount; 
-    unsigned int   biCompression; 
-    unsigned int   biSizeImage; 
-    int		   biXPelsPerMeter; 
-    int		   biYPelsPerMeter; 
-    unsigned int   biClrUsed; 
-    unsigned int   biClrImportant; 
-
-    /* Fields related to Version 4 of header. */
-    unsigned int   biRedMask;
-    unsigned int   biGreenMask;
-    unsigned int   biBlueMask;
-    unsigned int   biAlphaMask;
-    unsigned int   biCSType;
-    CieXyzTriple   biEndpoints;
-    unsigned int   biGammaRed;
-    unsigned int   biGammaGreen;
-    unsigned int   biGammaBlue;
-
-    /* Fields related to Version 5 of header. */
-    unsigned int   biIntent; 
-    unsigned int   biProfileData; 
-    unsigned int   biProfileSize; 
-    unsigned int   biReserved; 
-} BitmapInfoHeader;
-
-#define MAXCOLORS       256
-
-typedef struct {
-    BitmapFileHeader bmfh;
-    BitmapInfoHeader bmih;
-    Blt_Pixel colorTable[MAXCOLORS];
-    const char *name;
-} Bmp;
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureBmpInit;
-
-/*ARGSUSED*/
-static void
-BmpError TCL_VARARGS_DEF(const char *, arg1)
-{
-    const char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&bmpMessagePtr->errors, string, -1);
-    va_end(args);
-    longjmp(bmpMessagePtr->jmpbuf, 0);
-}
-
-/*ARGSUSED*/
-static void
-BmpWarning TCL_VARARGS_DEF(const char *, arg1)
-{
-    const char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&bmpMessagePtr->warnings, string, -1);
-    va_end(args);
-    bmpMessagePtr->nWarnings++;
-}
-
-static INLINE unsigned int
-BmpGetLong(unsigned char *buf)
-{
-#ifdef WORDS_BIGENDIAN
-    return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
-#else
-    return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
-#endif
-}
-
-static INLINE unsigned short
-BmpGetShort(unsigned char *buf)
-{
-#ifdef WORDS_BIGENDIAN
-    return (buf[0] << 8) | buf[1];
-#else
-    return buf[0] | (buf[1] << 8);
-#endif
-}
-
-static INLINE unsigned char *
-BmpSetLong(unsigned char *buf, unsigned long value)
-{
-#ifdef WORDS_BIGENDIAN
-    buf[0] = (value >> 24) & 0xFF;
-    buf[1] = (value >> 16) & 0xFF;
-    buf[2] = (value >> 8)  & 0xFF;
-    buf[3] = (value)       & 0xFF;
-#else
-    buf[0] = (value)       & 0xFF;
-    buf[1] = (value >> 8)  & 0xFF;
-    buf[2] = (value >> 16) & 0xFF;
-    buf[3] = (value >> 24) & 0xFF;
-#endif
-    return buf + 4;
-}
-
-static INLINE unsigned char *
-BmpSetShort(unsigned char *buf, unsigned long value)
-{
-#ifdef WORDS_BIGENDIAN
-    buf[0] = (value >> 8)  & 0xFF;
-    buf[1] = (value)       & 0xFF;
-#else
-    buf[0] = (value)       & 0xFF;
-    buf[1] = (value >> 8)  & 0xFF;
-#endif
-    return buf + 2;
-}
-
-/*
- *			       Field Name                    Type 
- *   | 0| 1|			bfType                      2 Bytes 
- *   | 2| 3| 4| 5|		bfSize                      4 Bytes 
- *   | 6| 7|			bfReserved1                 4 Bytes 
- *   | 8| 9|			bfReserved2                 4 Bytes 
- *   |10|11|12|13|		bfOffBits                   4 Bytes 
- *   
- */
-static int
-BmpHeader(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    unsigned char *bp;
-    size_t fileSize;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    fileSize = Blt_DBuffer_BytesLeft(dbuffer);
-    if (fileSize < 14) {
-	return FALSE;
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    if ((bp[0] != 'B') || (bp[1] != 'M')) {
-	return FALSE;
-    }
-    bmpPtr->bmfh.bfSize      = BmpGetLong (bp + OFF_FILE_SIZE);
-    bmpPtr->bmfh.bfReserved1 = BmpGetShort(bp + OFF_RESERVED1);
-    bmpPtr->bmfh.bfReserved2 = BmpGetShort(bp + OFF_RESERVED2);
-    bmpPtr->bmfh.bfOffBits   = BmpGetLong (bp + OFF_OFFBITS);
-    return TRUE;
-}
-
-/*
- * Version 2		Field Name		Size 
- *   | 0| 1| 2| 3|	biSize			4 Bytes 
- *   | 4| 5|		biWidth			2 Bytes 
- *   | 6| 7|		biHeight		2 Bytes 
- *   | 8| 9|		biPlanes		2 Bytes 
- *   |10|11|		biBitCount		2 Bytes 
-
- * Version 3		
- *   | 0| 1| 2| 3|	biSize			4 Bytes 
- *   | 4| 5| 6| 7|	biWidth			4 Bytes 
- *   | 8| 9|10|11|	biHeight		4 Bytes 
- *   |12|13|		biPlanes		2 Bytes 
- *   |14|15|		biBitCount		2 Bytes 
- *   |16|17|18|19|	biCompression		4 Bytes 
- *   |20|21|22|23|	biSizeImage		4 Bytes 
- *   |24|25|26|27|	biXPelsPerMeter		4 Bytes 
- *   |28|29|30|31|	biYPelsPerMeter		4 Bytes 
- *   |32|33|34|35|	biClrUsed		4 Bytes 
- *   |36|37|38|39|	biClrImportant		4 Bytes 
- * Version 4
- *   |40|41|42|43|	biRedMask		4 Bytes 
- *   |44|45|46|47|	biGreenMask		4 Bytes 
- *   |48|49|50|51|	biBlueMask		4 Bytes 
- *   |52|53|54|55|	biAlphaMask		4 Bytes 
- *   |56|57|58|59|	biCSType		4 Bytes 
- *   |60--95|		biEndpoints		36 Bytes 
- *   |96|97|98|99|	biGammaRed		4 Bytes 
- *   |00|01|02|03|	biGammaGreen		4 Bytes 
- *   |04|05|06|07|	biGammaBlue		4 Bytes 
- * Version 5
- *   |08|09|10|11|	bV5Intent		4 Bytes 
- *   |12|13|14|15|	bV5ProfileData		4 Bytes 
- *   |16|17|18|19|	bV5ProfileSize		4 Bytes 
- *   |20|21|22|23|	bV5Reserved		4 Bytes 
- */
-
-static int
-BmpHeaderInfo(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    unsigned char *bp;
-
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    bmpPtr->bmih.biSize = BmpGetLong(bp + OFF_SIZE);
-
-    /* Verify header size. */
-    switch (bmpPtr->bmih.biSize) {
-    case SIZEOF_BITMAPOS2V1HEADER:
-    case SIZEOF_BITMAPOS2V2HEADER:
-    case SIZEOF_BITMAPV3HEADER:
-    case SIZEOF_BITMAPV4HEADER:
-    case SIZEOF_BITMAPV5HEADER:
-	break;
-    default:
-	BmpError("unknown BMP bitmap header (size=%d).", bmpPtr->bmih.biSize);
-    }
-    if (bmpPtr->bmih.biSize == SIZEOF_BITMAPOS2V1HEADER) {
-	bmpPtr->bmih.biWidth         = (int)BmpGetShort(bp + OFF_OSV1_WIDTH);
-	bmpPtr->bmih.biHeight        = (int)BmpGetShort(bp + OFF_OSV1_HEIGHT);
-	bmpPtr->bmih.biPlanes        = BmpGetShort(bp + OFF_OSV1_PLANES);
-	bmpPtr->bmih.biBitCount      = BmpGetShort(bp + OFF_OSV1_BIT_COUNT);
-	bmpPtr->bmih.biCompression   = BI_RGB;
-    } else {
-	bmpPtr->bmih.biWidth         = (int)BmpGetLong(bp + OFF_WIDTH);
-	bmpPtr->bmih.biHeight        = (int)BmpGetLong(bp + OFF_HEIGHT);
-	bmpPtr->bmih.biPlanes        = BmpGetShort(bp + OFF_PLANES);
-	bmpPtr->bmih.biBitCount      = BmpGetShort(bp + OFF_BIT_COUNT);
-	bmpPtr->bmih.biCompression   = BmpGetLong(bp + OFF_COMPRESSION);
-	bmpPtr->bmih.biSizeImage     = BmpGetLong(bp + OFF_SIZE_IMAGE);
-	bmpPtr->bmih.biXPelsPerMeter = (int)BmpGetLong(bp + OFF_X_PELS_PER_METER);
-	bmpPtr->bmih.biYPelsPerMeter = (int)BmpGetLong(bp + OFF_Y_PELS_PER_METER);
-	bmpPtr->bmih.biClrUsed       = BmpGetLong(bp + OFF_CLR_USED);
-	bmpPtr->bmih.biClrImportant  = BmpGetLong(bp + OFF_CLR_IMPORTANT);
-    }	
-
-#ifdef notdef
-    fprintf(stderr, "fileName=%s\n", bmpPtr->name);
-    fprintf(stderr, "  biSize=%d\n", bmpPtr->bmih.biSize);
-    fprintf(stderr, "  biWidth=%d\n", bmpPtr->bmih.biWidth);
-    fprintf(stderr, "  biHeight=%d\n", bmpPtr->bmih.biHeight);
-    fprintf(stderr, "  biPlanes=%d\n", bmpPtr->bmih.biPlanes);
-    fprintf(stderr, "  biBitCount=%d\n", bmpPtr->bmih.biBitCount);
-    fprintf(stderr, "  biCompression=%d\n", bmpPtr->bmih.biCompression);
-    fprintf(stderr, "  biSizeImage=%d\n", bmpPtr->bmih.biSizeImage);
-    fprintf(stderr, "  biClrUsed=%d\n", bmpPtr->bmih.biClrUsed);
-#endif
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) < bmpPtr->bmih.biSize) {
-	BmpError("bad BMP header, short file");
-    }
-    if (bmpPtr->bmih.biWidth <= 0) {
-	BmpError("invalid image width %d.", bmpPtr->bmih.biWidth);
-    }
-    if (bmpPtr->bmih.biHeight == 0) {
-	BmpError("invalid image height %d.", bmpPtr->bmih.biHeight);
-    }
-    /* According to the MicroSoft documentation, if the image height is
-     * negative, the image data is in top-down order. Since virtually no one
-     * does this, read the image data bottom-up. The user can always flip the
-     * resulting image. */
-    if (bmpPtr->bmih.biHeight < 0) {
-	bmpPtr->bmih.biHeight = -bmpPtr->bmih.biHeight;
-    }
-    if (Blt_DBuffer_Length(dbuffer) < bmpPtr->bmfh.bfSize) {
-	int old;
-
-	old = Blt_DBuffer_Length(dbuffer);
-	Blt_DBuffer_Resize(dbuffer, bmpPtr->bmfh.bfSize);
-	memset(bp + old, 0, bmpPtr->bmfh.bfSize - old);
-	Blt_DBuffer_SetLength(dbuffer, bmpPtr->bmfh.bfSize);
-    }
-    if (bmpPtr->bmih.biSize >= SIZEOF_BITMAPV4HEADER) {
-	bmpPtr->bmih.biRedMask     = BmpGetLong(bp + OFF_RED_MASK);
-	bmpPtr->bmih.biGreenMask   = BmpGetLong(bp + OFF_GREEN_MASK);
-	bmpPtr->bmih.biBlueMask    = BmpGetLong(bp + OFF_BLUE_MASK);
-	bmpPtr->bmih.biAlphaMask   = BmpGetLong(bp + OFF_ALPHA_MASK);
-	bmpPtr->bmih.biCSType      = BmpGetLong(bp + OFF_CS_TYPE);
-	/* Skip CIEXYZ endpoints */
-	bmpPtr->bmih.biGammaRed    = BmpGetLong(bp + OFF_GAMMA_RED);
-	bmpPtr->bmih.biGammaGreen  = BmpGetLong(bp + OFF_GAMMA_GREEN);
-	bmpPtr->bmih.biGammaBlue   = BmpGetLong(bp + OFF_GAMMA_BLUE);
-    } 
-    if (bmpPtr->bmih.biSize >= SIZEOF_BITMAPV5HEADER) {
-	bmpPtr->bmih.biIntent      = BmpGetLong(bp + OFF_INTENT);
-	bmpPtr->bmih.biProfileData = BmpGetLong(bp + OFF_PROFILE_DATA);
-	bmpPtr->bmih.biProfileSize = BmpGetLong(bp + OFF_PROFILE_SIZE);
-	bmpPtr->bmih.biReserved    = BmpGetLong(bp + OFF_RESERVED3);
-    }
-
-#ifdef notdef
-    if (bmpPtr->bmih.biCSType != 0) {
-    fprintf(stderr, "fileName=%s\n", bmpPtr->name);
-    fprintf(stderr, "  biRedMask=%x\n", bmpPtr->bmih.biRedMask);
-    fprintf(stderr, "  biGreenMask=%x\n", bmpPtr->bmih.biGreenMask);
-    fprintf(stderr, "  biBlueMask=%x\n", bmpPtr->bmih.biBlueMask);
-    fprintf(stderr, "  biAlphaMask=%x\n", bmpPtr->bmih.biAlphaMask);
-    fprintf(stderr, "  biCSType=%d\n", bmpPtr->bmih.biCSType);
-    fprintf(stderr, "  biGammaRed=%d\n", bmpPtr->bmih.biGammaRed);
-    fprintf(stderr, "  biGammaGreen=%d\n", bmpPtr->bmih.biGammaGreen);
-    fprintf(stderr, "  biGammaBlue=%d\n", bmpPtr->bmih.biGammaBlue);
-    fprintf(stderr, "  biIntent=%d\n", bmpPtr->bmih.biIntent);
-    fprintf(stderr, "  biProfileData=%d\n", bmpPtr->bmih.biProfileData);
-    fprintf(stderr, "  biProfileSize=%d\n", bmpPtr->bmih.biProfileSize);
-    fprintf(stderr, "  biReserved=%d\n", bmpPtr->bmih.biReserved);
-    }
-#endif
-
-    /* Verify bits per pixel count and colors used. */
-    switch (bmpPtr->bmih.biBitCount) {
-    case 1:			/* 2-bits, Monochrome */
-	if (bmpPtr->bmih.biClrUsed > 2) {
-	    BmpError("wrong # colors (%d), expecting <= 2 colors.", 
-		     bmpPtr->bmih.biClrUsed);
-	}
-	if (bmpPtr->bmih.biClrUsed == 0) {
-	    bmpPtr->bmih.biClrUsed = 2;
-	}
-	break;
-    case 4:			/* 4-bits, 16 colors. */
-	if (bmpPtr->bmih.biClrUsed > 16) {
-	    BmpError("wrong # colors (%d), expecting <= 16 colors.",
-		     bmpPtr->bmih.biClrUsed);
-	}
-	if (bmpPtr->bmih.biClrUsed == 0) {
-	    bmpPtr->bmih.biClrUsed = 16;
-	}
-	break;
-    case 8:			/* 8-bits, 256 colors */
-	if (bmpPtr->bmih.biClrUsed > 256) {
-	    BmpError("wrong # colors (%d), expecting <= 256 colors.",
-		     bmpPtr->bmih.biClrUsed);
-	}
-	if (bmpPtr->bmih.biClrUsed == 0) {
-	    bmpPtr->bmih.biClrUsed = 256;
-	}
-	break;
-    case 16:
-    case 24:
-    case 32:			/* True color. */
-	if (bmpPtr->bmih.biClrUsed != 0) {
-	    BmpWarning("# colors is %d, expecting 0 colors in %d-bit image.",
-		       bmpPtr->bmih.biClrUsed, bmpPtr->bmih.biBitCount);
-	    bmpPtr->bmih.biClrUsed = 0;
-	}
-	break;
-    default:
-	BmpError("invalid # bits per pixel (%d)", bmpPtr->bmih.biBitCount);
-	break;
-    }	
-
-    /* Verify compression type. */
-    switch (bmpPtr->bmih.biCompression) {
-    case BI_RGB:
-	break;
-    case BI_RLE4:
-	if (bmpPtr->bmih.biBitCount != 4) {
-	    BmpError("wrong # bits per pixel (%d) for RLE4 compression",
-		     bmpPtr->bmih.biBitCount);
-	}
-	break;
-    case BI_RLE8:
-	if (bmpPtr->bmih.biBitCount != 8) {
-	    BmpError("wrong # bits per pixel (%d) for RLE8 compression",
-		     bmpPtr->bmih.biBitCount);
-	}
-	break;
-    case BI_BITFIELDS:
-	if ((bmpPtr->bmih.biBitCount != 16)&&(bmpPtr->bmih.biBitCount != 32)) {
-	    BmpError("wrong # bits per pixel (%d) for BITFIELD compression",
-		     bmpPtr->bmih.biBitCount);
-	}
-	break;
-    case BI_PNG:
-    case BI_JPEG:
-	BmpError("compression type \"%s\" not implemented",
-		 compression_types[bmpPtr->bmih.biCompression]);
-	break;
-    default:
-	BmpError("unknown compression type (%d)", bmpPtr->bmih.biCompression);
-    }      
-    Blt_DBuffer_SetPointer(dbuffer, bp + bmpPtr->bmih.biSize + 14);
-    return TRUE;
-}
-
-static int
-BmpPalette(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    unsigned char *bp;
-
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    if (bmpPtr->bmih.biClrUsed == 0) {
-	if (bmpPtr->bmih.biSize == SIZEOF_BITMAPV3HEADER) {
-	    bmpPtr->bmih.biRedMask = BmpGetLong(bp);
-	    bmpPtr->bmih.biGreenMask = BmpGetLong(bp + 4);
-	    bmpPtr->bmih.biBlueMask = BmpGetLong(bp + 8);
-	    bmpPtr->bmih.biAlphaMask = 0;
-	}
-    } else {
-	int sizeElem;
-	int i;
-
-	assert(bmpPtr->bmih.biClrUsed <= 256);
-	sizeElem = (bmpPtr->bmih.biSize == SIZEOF_BITMAPOS2V1HEADER) ? 3 : 4;
-	if (Blt_DBuffer_BytesLeft(dbuffer) < 
-	    (bmpPtr->bmih.biClrUsed * sizeElem)) {
-	    BmpError("short file");
-	}
-	for (i = 0; i < bmpPtr->bmih.biClrUsed; i++, bp += sizeElem) {
-	    /* Colormap components are ordered BGBA. */
-	    bmpPtr->colorTable[i].Blue  = bp[0];
-	    bmpPtr->colorTable[i].Green = bp[1];
-	    bmpPtr->colorTable[i].Red   = bp[2];
-	    bmpPtr->colorTable[i].Alpha = ALPHA_OPAQUE;
-	}
-    }
-    Blt_DBuffer_SetPointer(dbuffer, bp);
-    return TRUE;
-}
-
-static Blt_Picture
-BmpRgbImageData(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    Blt_Pixel *destRowPtr;
-    Picture *destPtr;
-    unsigned char *srcBits;
-    unsigned int bytesPerRow, wordsPerRow;
-    int w, h;
-
-    w = bmpPtr->bmih.biWidth;
-    h = bmpPtr->bmih.biHeight;
-
-    wordsPerRow = (w * bmpPtr->bmih.biBitCount + 31) / 32;
-    bytesPerRow = wordsPerRow * 4;
-
-    srcBits = Blt_DBuffer_Pointer(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < (bytesPerRow * h)) {
-	BmpError("image size is %d, need %u bytes", 
-		Blt_DBuffer_BytesLeft(dbuffer), bytesPerRow * (unsigned int)h);
-    }
-    destPtr = Blt_CreatePicture(w, h);
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * h);
-    switch (bmpPtr->bmih.biBitCount) {
-    case 1:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    int x;
-		    unsigned char byte;
-		    x = dp - destRowPtr;
-
-		    byte = srcRowPtr[x>>3];
-		    dp->u32 = (byte & (0x80 >> (x & 7))) ? 
-			bmpPtr->colorTable[1].u32 : 
-			bmpPtr->colorTable[0].u32;
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	}
-	break;
-    case 4:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-		unsigned char *sp;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; /*empty*/) {
-		    unsigned int pixel;
-		    
-		    pixel = ((sp[0] >> 4) & 0x0F);
-		    dp->u32 = bmpPtr->colorTable[pixel].u32;
-		    dp++;
-		    pixel = (sp[0] & 0x0F);
-		    dp->u32 = bmpPtr->colorTable[pixel].u32;
-		    dp++;
-		    sp++;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	}
-	break;
-    case 8:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-		unsigned char *sp;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    dp->u32 = bmpPtr->colorTable[*sp].u32;
-		    sp++;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	    break;
-	}
-    case 16:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-		unsigned char *sp;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    unsigned int pixel;
-		    
-		    pixel = BmpGetShort(sp);
-		    dp->Blue  = (pixel & 0x001f) << 3;
-		    dp->Green = (pixel & 0x03e0) >> 2;
-		    dp->Red   = (pixel & 0x7c00) >> 7;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 2;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	}
-	break;
-    case 24:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-		unsigned char *sp;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    dp->Blue  = sp[0];
-		    dp->Green = sp[1];
-		    dp->Red   = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 3;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	}
-	break;
-    case 32:
-	{
-	    int y;
-	    unsigned char *srcRowPtr;
-
-	    srcRowPtr = srcBits;
-	    for (y = 0; y < h; y++) {
-		Blt_Pixel *dp, *dend;
-		unsigned char *sp;
-
-		destRowPtr -= destPtr->pixelsPerRow;
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    dp->Blue  = sp[0];
-		    dp->Green = sp[1];
-		    dp->Red   = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 4;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	}
-	break;
-    }
-    return destPtr;
-}
-
-/*-------------------------------------------------------------------------------
- *
- * CountBits --
- *
- *	Returns the number of bits set in the given 32-bit mask.
- *
- *	    Reference: Graphics Gems Volume II.
- *	
- * Results:
- *      The number of bits to set in the mask.
- *
- *
- *---------------------------------------------------------------------------
- */
-static int
-CountBits(unsigned long mask)	/* 32  1-bit tallies */
-{
-    /* 16  2-bit tallies */
-    mask = (mask & 0x55555555) + ((mask >> 1) & (0x55555555));  
-    /* 8  4-bit tallies */
-    mask = (mask & 0x33333333) + ((mask >> 2) & (0x33333333)); 
-    /* 4  8-bit tallies */
-    mask = (mask & 0x07070707) + ((mask >> 4) & (0x07070707));  
-    /* 2 16-bit tallies */
-    mask = (mask & 0x000F000F) + ((mask >> 8) & (0x000F000F));  
-    /* 1 32-bit tally */
-    mask = (mask & 0x0000001F) + ((mask >> 16) & (0x0000001F));  
-    return mask;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindShift --
- *
- *	Returns the position of the least significant (low) bit in the given
- *	mask.
- *
- * Results:
- *      The number of the least significant bit.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindShift(unsigned int mask)
-{
-    int bit;
-
-    for (bit = 0; bit < 32; bit++) {
-	if (mask & (1 << bit)) {
-	    break;
-	}
-    }
-    return bit;
-}
-
-static int
-GetAdjust(unsigned int mask)
-{
-    int n;
-    int adjust = 0;
-
-    n = CountBits(mask);
-    if (n < 8) {
-	adjust = 8 - n;
-    }
-    return adjust;
-}
-
-static Blt_Picture
-BmpBitfieldImageData(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    Picture *destPtr;
-    unsigned char *srcBits;
-    unsigned int bytesPerRow, wordsPerRow;
-    int w, h;
-    unsigned int rShift, gShift, bShift, aShift;
-    unsigned int rMask, gMask, bMask, aMask;
-    unsigned int rAdjust, gAdjust, bAdjust, aAdjust;
-
-    rMask = bmpPtr->bmih.biRedMask;
-    gMask = bmpPtr->bmih.biGreenMask;
-    bMask = bmpPtr->bmih.biBlueMask;
-    aMask = bmpPtr->bmih.biAlphaMask;
-
-    rShift = FindShift(rMask);
-    gShift = FindShift(gMask);
-    bShift = FindShift(bMask);
-    aShift = FindShift(aMask);
-
-    rAdjust = GetAdjust(rMask);
-    gAdjust = GetAdjust(gMask);
-    bAdjust = GetAdjust(bMask);
-    aAdjust = GetAdjust(aMask);
-
-    w = bmpPtr->bmih.biWidth;
-    h = bmpPtr->bmih.biHeight;
-    wordsPerRow = (w * bmpPtr->bmih.biBitCount + 31) / 32;
-    bytesPerRow = wordsPerRow * 4;
-
-    srcBits = Blt_DBuffer_Pointer(dbuffer);
-    destPtr = Blt_CreatePicture(w, h);
-    if (bmpPtr->bmih.biBitCount == 32) {
-	Blt_Pixel *destRowPtr;
-	int y;
-	unsigned char *srcRowPtr;
-	
-	destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * h);
-	srcRowPtr = srcBits;
-	for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp, *dend;
-	    unsigned char *sp;
-	    
-	    destRowPtr -= destPtr->pixelsPerRow;
-	    sp = srcRowPtr;
-	    for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		unsigned int pixel;
-		
-		pixel = BmpGetLong(sp);
-		dp->Red   = ((pixel & rMask) >> rShift) << rAdjust;
-		dp->Green = ((pixel & gMask) >> gShift) << gAdjust;
-		dp->Blue  = ((pixel & bMask) >> bShift) << bAdjust;
-		dp->Alpha = ((pixel & aMask) >> aShift) << aAdjust;
-		sp += 4;
-	    }
-	    srcRowPtr += bytesPerRow;
-	}
-    } else if (bmpPtr->bmih.biBitCount == 16) {
-	Blt_Pixel *destRowPtr;
-	int y;
-	unsigned char *srcRowPtr;
-	
-	destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * h);
-	srcRowPtr = srcBits;
-	for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp, *dend;
-	    unsigned char *sp;
-	    
-	    destRowPtr -= destPtr->pixelsPerRow;
-	    sp = srcRowPtr;
-	    for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		unsigned int pixel;
-		
-		pixel = BmpGetShort(sp);
-		dp->Red   = ((pixel & rMask) >> rShift) << rAdjust;
-		dp->Green = ((pixel & gMask) >> gShift) << gAdjust;
-		dp->Blue  = ((pixel & bMask) >> bShift) << bAdjust;
-		dp->Alpha = ((pixel & aMask) >> aShift) << aAdjust;
-		sp += 2;
-	    }
-	    srcRowPtr += bytesPerRow;
-	}
-    } else {
-	return NULL;
-    }
-    if (aMask != 0) {
-	/* The image may or may not be transparent. Check */
-	Blt_ClassifyPicture(destPtr);
-    }
-    return destPtr;
-}
-
-static Blt_Picture
-BmpRleImageData(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    Picture *destPtr;
-    unsigned char *srcBits, *sp;
-    unsigned int bytesPerRow, wordsPerRow;
-    int w, h;
-
-    w = bmpPtr->bmih.biWidth;
-    h = bmpPtr->bmih.biHeight;
-    wordsPerRow = (w * bmpPtr->bmih.biBitCount + 31) / 32;
-    bytesPerRow = wordsPerRow * 4;
-
-    srcBits = Blt_DBuffer_Pointer(dbuffer);
-    destPtr = Blt_CreatePicture(w, h);
-    Blt_BlankPicture(destPtr, bmpPtr->colorTable);
-    sp = srcBits;
-    if (bmpPtr->bmih.biBitCount == 8) {
-	int x, y;
-
-	x = 0, y = h - 1;
-	for (;;) {
-	    unsigned int index, count;
-	    
-	    count = sp[0];
-	    index = sp[1];
-	    sp += 2;
-	    if (count == 0) {
-		switch (index) {
-		case 0:		/* End-of-line */
-		    x = 0;
-		    y--;
-		    if (y < 0) {
-			goto done;
-		    }
-		    break;
-
-		case 1:		/* End-of-bitmap */
-		    goto done;
-		    
-		case 2:		/* Delta */
-		    x += sp[2];
-		    y -= sp[3];
-		    if (y < 0) {
-			goto done;
-		    }
-		    sp += 2;
-		    break;
-
-		default:	/* Absolute mode. index is # of bytes. */
-		    {
-			int i;
-			Blt_Pixel *dp;
-
-			count = index;
-
-			if ((x + count) > w) {
-			    Blt_FreePicture(destPtr);
-			    BmpError("invalid image data: abs run of %d pixels will overrun row (%d,%d) %d index=%d", count, x, y, w, index);
-			}
-			/* The run is always padded to an even number of bytes
-			 * (16-bit boundary). This loop relies on the fact
-			 * that picture data is also padded. */
-			dp = Blt_PicturePixel(destPtr, x, y);
-			for (i = 0; i < count; i += 2) {
-			    dp->u32 = bmpPtr->colorTable[sp[0]].u32;
-			    dp++;
-			    dp->u32 = bmpPtr->colorTable[sp[1]].u32;
-			    dp++, sp += 2;
-			}
-			x += count;
-		    }
-		    break;
-		} 
-	    } else {
-		int i;
-		Blt_Pixel *dp;
-
-		dp = Blt_PicturePixel(destPtr, x, y);
-		for (i = 0; (x < w) && (i < count); i++, x++) {
-		    dp->u32 = bmpPtr->colorTable[index].u32;
-		    dp++;
-		}
-	    }
-	}
-    } else if (bmpPtr->bmih.biBitCount == 4) {
-	int x, y;
-
-	x = 0, y = h - 1;
-	for (;;) {
-	    unsigned int index, count;
-
-	    count = sp[0];
-	    index = sp[1];
-	    sp += 2;
-	    if (count == 0) {
-		switch (index) {
-		case 0:		/* End-of-line */
-		    x = 0;
-		    y--;
-		    if (y < 0) {
-			goto done;
-		    }
-		    break;
-
-		case 1:		/* End-of-bitmap */
-		    goto done;
-		    
-		case 2:		/* Delta */
-		    x += sp[2];
-		    y -= sp[3];
-		    if (y < 0) {
-			goto done;
-		    }
-		    sp += 2;
-		    break;
-
-		default:	/* Absolute mode. index is # of pixels. */
-		    {
-			int i;
-			Blt_Pixel *dp;
-			unsigned char *send;
-
-			count = index;
-			dp = Blt_PicturePixel(destPtr, x, y);
-			/* The run may be padded up to 12 bits. */
-			send = sp + ((count + 3) / 4) * 2;
-
-			if ((x + count) > w) {
-			    Blt_FreePicture(destPtr);
-			    BmpError("invalid image data: abs run of %d pixels will overrun row (%d,%d) %d index=%d", count, x, y, w, index);
-			}
-
-			for (i = 0; i < count; i += 2) {
-			    int i1, i2;
-			    i1 = (sp[0] >> 4) & 0x0F;
-			    i2 = sp[0] & 0x0F;
-			    sp++;
-			    dp->u32 = bmpPtr->colorTable[i1].u32;
-			    dp++;
-			    dp->u32 = bmpPtr->colorTable[i2].u32;
-			    dp++;
-			}
-			x += count;
-			sp = send;
-		    }
-		    break;
-		} 
-	    } else {
-		/* Encoded mode */
-		int i;
-		Blt_Pixel *dp;
-		unsigned int c1, c2;
-
-		c1 = bmpPtr->colorTable[(index >> 4) & 0x0F].u32;
-		c2 =  bmpPtr->colorTable[index & 0x0F].u32;
-		dp = Blt_PicturePixel(destPtr, x, y);
-		for (i = 0; (x < w) && (i < count); i++, x++) {
-		    dp->u32 = (i & 0x1) ? c2 : c1;
-		    dp++;
-		}
-	    }
-	}
-    }
- done:
-    return destPtr;
-}
-
-
-static Blt_Picture
-BmpImageData(Blt_DBuffer dbuffer, Bmp *bmpPtr)
-{
-    Blt_Picture picture;
-
-    picture = NULL;
-    Blt_DBuffer_SetCursor(dbuffer, bmpPtr->bmfh.bfOffBits);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < (bmpPtr->bmih.biSizeImage)) {
-	BmpError("short file: not enough bytes for image data");
-    }
-    switch(bmpPtr->bmih.biCompression) {
-    case BI_RGB:
-	picture = BmpRgbImageData(dbuffer, bmpPtr);
-	break;
-    case BI_BITFIELDS:
-	picture = BmpBitfieldImageData(dbuffer, bmpPtr);
-	break;
-    case BI_RLE4:
-    case BI_RLE8:
-	picture = BmpRleImageData(dbuffer, bmpPtr);
-	break;
-    case BI_PNG:
-    case BI_JPEG:
-	break;
-    }
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BmpToPicture --
- *
- *      Reads a BMP file, converts it into a picture, and appends it
- *	to the list of images.  We only handle only single BMP images.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain 
-BmpToPicture(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer dbuffer,
-    BmpImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-    Blt_Picture picture;
-    Bmp bmp;
-    BmpMessage message;
-
-    bmpMessagePtr = &message;
-    memset(&bmp, 0, sizeof(bmp)); /* Clear the structure. */
-    message.nWarnings = 0;
-    bmp.name = fileName;
-
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    Tcl_DStringAppend(&message.errors, "error reading \"", -1);
-    Tcl_DStringAppend(&message.errors, fileName, -1);
-    Tcl_DStringAppend(&message.errors, "\": ", -1);
-
-    Tcl_DStringAppend(&message.warnings, "\"", -1);
-    Tcl_DStringAppend(&message.warnings, fileName, -1);
-    Tcl_DStringAppend(&message.warnings, "\": ", -1);
-
-    if (setjmp(message.jmpbuf)) {
-	Tcl_DStringResult(interp, &message.errors);
-	Tcl_DStringFree(&message.warnings);
-	return NULL;
-    }
-    chain = NULL;
-    if (!BmpHeader(dbuffer, &bmp)) {
-	BmpError("bad BMP header");
-    }
-    if (!BmpHeaderInfo(dbuffer, &bmp)) {
-	BmpError("bad BMP logical screen descriptor");
-    }
-    if (!BmpPalette(dbuffer, &bmp)) {
-	BmpError("bad BMP color table");
-    }
-    picture = BmpImageData(dbuffer, &bmp);
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "BMP_READ_WARNINGS", 
-		Tcl_DStringValue(&message.warnings), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    Tcl_DStringFree(&message.errors);
-    if (picture != NULL) {
-	chain = Blt_Chain_Create();
-	Blt_Chain_Append(chain, picture);
-    }
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToBmp --
- *
- *      Reads an BMP file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the designated
- *      file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToBmp(Tcl_Interp *interp, Blt_Picture original, Blt_DBuffer dbuffer,
-	     BmpExportSwitches *switchesPtr)
-{
-    int nColors;
-    int format;
-    int bitsPerPixel;
-    Picture *srcPtr;
-    Blt_HashTable colorTable;
-    unsigned int wordsPerRow, bytesPerRow;
-    unsigned int imageSize, fileSize, infoHeaderSize, offsetToData;
-    unsigned char *bp, *destBits;
-
-    srcPtr = original;
-    if (switchesPtr->flags & EXPORT_ALPHA) {
-	bitsPerPixel = 32;
-	format = BI_BITFIELDS;
-	nColors = 0;
-	infoHeaderSize = SIZEOF_BITMAPV4HEADER;
-    } else {
-	if (!Blt_PictureIsOpaque(srcPtr)) {	
-	    Blt_Picture background;
-
-	    /* Blend picture with solid color background. */
-	    background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	    Blt_BlankPicture(background, &switchesPtr->bg); 
-	    Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	    if (srcPtr != original) {
-		Blt_FreePicture(srcPtr);
-	    }
-	    srcPtr = background;
-	}
-	nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-	format = BI_RGB;
-	infoHeaderSize = SIZEOF_BITMAPV3HEADER;
-	if (nColors <= 256) {
-	    bitsPerPixel = 8;
-	    Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-	    nColors = Blt_QueryColors(srcPtr, &colorTable);
-	} else {
-	    bitsPerPixel = 24;
-	    nColors = 0;
-	}
-    }
-    wordsPerRow = (srcPtr->width * bitsPerPixel + 31) / 32;
-    bytesPerRow = wordsPerRow * 4;
-    imageSize = bytesPerRow * srcPtr->height;
-
-    /*
-     * Compute the size of the structure.
-     *
-     * header + infoheader + colortable + imagedata
-     *
-     * 14 + 108 + 0-256 * 4  + bytesPerRow * height;
-     */
-    fileSize = imageSize + (nColors * 4) + infoHeaderSize + 14;
-    offsetToData = 14 + infoHeaderSize + (nColors * 4);
-
-    bp = Blt_DBuffer_Extend(dbuffer, fileSize);
-    memset(bp, 0, fileSize);
-
-    /* File header. */
-    bp[0] = 'B', bp[1] = 'M';
-    BmpSetLong(bp + OFF_FILE_SIZE, fileSize); 
-    BmpSetLong(bp + OFF_OFFBITS, offsetToData); 
-
-    /* Image header. */
-    BmpSetLong (bp + OFF_SIZE,		   infoHeaderSize);
-    BmpSetLong (bp + OFF_WIDTH,            srcPtr->width);
-    BmpSetLong (bp + OFF_HEIGHT,	   srcPtr->height);
-    BmpSetShort(bp + OFF_PLANES,	   1);	
-    BmpSetShort(bp + OFF_BIT_COUNT,	   bitsPerPixel);	
-    BmpSetLong (bp + OFF_COMPRESSION,	   format); 
-    BmpSetLong (bp + OFF_SIZE_IMAGE,       bytesPerRow * srcPtr->height);
-    BmpSetLong (bp + OFF_X_PELS_PER_METER, 0);	
-    BmpSetLong (bp + OFF_Y_PELS_PER_METER, 0);	
-    BmpSetLong (bp + OFF_CLR_USED,	   nColors);		
-    BmpSetLong (bp + OFF_CLR_IMPORTANT,    0);	
-
-    if (bitsPerPixel == 32) {
-	BmpSetLong(bp + OFF_RED_MASK,   0x00FF0000);  /* biRedMask */
-	BmpSetLong(bp + OFF_GREEN_MASK, 0x0000FF00);  /* biGreenMask */
-	BmpSetLong(bp + OFF_BLUE_MASK,  0x000000FF);  /* biBlueMask */
-	BmpSetLong(bp + OFF_ALPHA_MASK, 0xFF000000);  /* biAlphaMask */
-    } 
-
-    /* Color table. */
-    if (bitsPerPixel == 8) {
-	unsigned long i;
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	i = 0;
-	bp += 14 + infoHeaderSize;
-	for (hPtr = Blt_FirstHashEntry(&colorTable, &cursor); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_Pixel pixel;
-	    unsigned long key;
-
-	    Blt_SetHashValue(hPtr, i);
-	    key = (unsigned long)Blt_GetHashKey(&colorTable, hPtr);
-	    pixel.u32 = (unsigned int)key;
-
-	    /* Colormap components are ordered BGBA. */
-	    bp[0] = pixel.Blue;
-	    bp[1] = pixel.Green;
-	    bp[2] = pixel.Red;
-	    bp[3] = pixel.Alpha;
-	    bp += 4;
-	    i++;
-	}
-	assert(i == nColors);
-    }
-
-    destBits = Blt_DBuffer_Pointer(dbuffer) + offsetToData;
-
-    /* Image data. */
-    switch (bitsPerPixel) {
-    case 32:
-	{
-	    Blt_Pixel *srcRowPtr;
-	    int y;
-	    unsigned char *destRowPtr;
-
-	    destRowPtr = destBits;
-	    srcRowPtr = srcPtr->bits+((srcPtr->height-1)*srcPtr->pixelsPerRow);
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp+srcPtr->width; sp < send; sp++) {
-		    BmpSetLong(dp, sp->u32);
-		    dp += 4;
-		}
-		destRowPtr += bytesPerRow;
-		srcRowPtr  -= srcPtr->pixelsPerRow;
-	    }
-	    assert((destRowPtr - Blt_DBuffer_Pointer(dbuffer)) == fileSize);
-	}
-	break;
-
-    case 24:
-	{
-	    Blt_Pixel *srcRowPtr;
-	    int y;
-	    unsigned char *destRowPtr;
-	    
-	    destRowPtr = destBits;
-	    srcRowPtr = srcPtr->bits+((srcPtr->height-1)*srcPtr->pixelsPerRow);
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp+srcPtr->width; sp < send; sp++) {
-		    dp[0] = sp->Blue;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Red;
-		    dp += 3;
-		}
-		destRowPtr += bytesPerRow;
-		srcRowPtr  -= srcPtr->pixelsPerRow;
-	    }
-	    assert((destRowPtr - Blt_DBuffer_Pointer(dbuffer)) == fileSize);
-	}
-	break;
-
-    case 8:
-	{
-	    Blt_Pixel *srcRowPtr;
-	    int y;
-	    unsigned char *destRowPtr;
-
-	    destRowPtr = destBits;
-	    srcRowPtr = srcPtr->bits+((srcPtr->height-1)*srcPtr->pixelsPerRow);
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp+srcPtr->width; sp < send; sp++) {
-		    Blt_HashEntry *hPtr;
-		    unsigned long index;
-		    union {
-			Blt_Pixel color;
-			char *key;
-		    } value;
-
-		    value.color.u32 = sp->u32;
-		    value.color.Alpha = 0xFF;
-		    hPtr = Blt_FindHashEntry(&colorTable, value.key);
-		    if (hPtr == NULL) {
-			fprintf(stderr, "can't find %x\n", sp->u32);
-			continue;
-		    }
-		    index = (unsigned long)Blt_GetHashValue(hPtr);
-		    *dp = (unsigned char)(index & 0xFF);
-		    dp++;
-		}
-		destRowPtr += bytesPerRow;
-		srcRowPtr  -= srcPtr->pixelsPerRow;
-	    }
-	    assert((destRowPtr - Blt_DBuffer_Pointer(dbuffer)) == fileSize);
-	}
-	break;
-    }
-    if (bitsPerPixel == 8) {
-	Blt_DeleteHashTable(&colorTable);
-    }
-    if (srcPtr != original) {
-	Blt_FreePicture(srcPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsBmp --
- *
- *      Attempts to parse a BMP file header.
- *
- * Results:
- *      Returns 1 is the header is BMP and 0 otherwise.  Note that
- *      the validity of the header contents is not checked here.  That's
- *	done in BmpToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsBmp(Blt_DBuffer dbuffer)
-{
-    Bmp bmp;
-
-    return BmpHeader(dbuffer, &bmp);
-}
-
-static Blt_Chain
-ReadBmp(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    BmpImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return BmpToPicture(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WriteBmp(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_DBuffer dbuffer;
-    BmpExportSwitches switches;
-    Tcl_Obj *objPtr;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-
-    dbuffer = Blt_DBuffer_Create();
-    objPtr = NULL;
-    if (PictureToBmp(interp, picture, dbuffer, &switches) == TCL_OK) {
-	char *bytes;
-
-	bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (bytes != NULL) {
-	    objPtr = Tcl_NewStringObj(bytes, -1);
-	    Blt_Free(bytes);
-	}
-    }
-    return objPtr;
-}
-
-static Blt_Chain
-ImportBmp(
-    Tcl_Interp *interp, 
-    int objc,
-    Tcl_Obj *const *objv,
-    const char **fileNamePtr)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Chain chain;
-    const char *string;
-    BmpImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_SaveFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = BmpToPicture(interp, string, dbuffer, &switches);
-    if (chain == NULL) {
-	return NULL;
-    }
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportBmp(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, 
-	  int objc, Tcl_Obj *const *objv)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Picture picture;
-    BmpExportSwitches switches;
-    int result;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data switch.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "bad picture index.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    result = PictureToBmp(interp, picture, dbuffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	const char *fileName;
-
-	/* Write the image into the designated file. */
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	/* Write the image into the designated TCL variable. */
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	/* Return the image as a base64 string in the interpreter result. */
-	result = TCL_ERROR;
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	    result = TCL_OK;
-	}
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int 
-Blt_PictureBmpInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_bmp", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp, 
-	"bmp",			/* Name of format. */
-	IsBmp,			/* Discovery routine. */
-	ReadBmp,		/* Read format procedure. */
-	WriteBmp,		/* Write format procedure. */
-	ImportBmp,		/* Import format procedure. */
-	ExportBmp);		/* Export format switches. */
-}
diff --git a/blt3.0/src/bltPictCmd.c b/blt3.0/src/bltPictCmd.c
deleted file mode 100644
index f012c00..0000000
--- a/blt3.0/src/bltPictCmd.c
+++ /dev/null
@@ -1,4382 +0,0 @@
-
-/*
- * bltPictCmd.c --
- *
- * This module implements the Tk image interface for picture images.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include <bltHash.h>
-#include <bltImage.h>
-#include <bltDBuffer.h>
-#include "bltSwitch.h"
-#include "bltPicture.h"
-#include "bltPictInt.h"
-#include "bltPictFmts.h"
-#include "bltPainter.h"
-
-#include "bltPs.h"
-#include <X11/Xutil.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-typedef struct _Blt_DBuffer DBuffer;
-
-typedef int (PictCmdProc)(Blt_Picture picture, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-#if (_TCL_VERSION < _VERSION(8,2,0)) 
-typedef struct _Tk_PostscriptInfo *Tk_PostscriptInfo;
-#endif
-
-/*
- * PictureCmdInterpData --
- *
- *	Structure containing global data, used on a interpreter by interpreter
- *	basis.
- *
- *	This structure holds the hash table of instances of datatable commands
- *	associated with a particular interpreter.
- */
-typedef struct {
-    Tcl_Interp *interp;
-} PictureCmdInterpData;
-
-/*
- * Various external file/string formats handled by the picture image.
- */
-
-enum PictureFormats {
-    FMT_JPG, /* Joint Photographic Experts Group r/w */
-    FMT_PNG, /* Portable Network Graphics r/w */
-    FMT_TIF, /* Tagged Image File Format r/w */
-    FMT_XPM, /* X Pixmap r/w */
-    FMT_XBM, /* X Bitmap r/w */
-    FMT_GIF, /* Graphics Interchange Format r/w */
-    FMT_PS,  /* PostScript r/w */
-    FMT_PDF, /* Portable Document Format w TBA */
-    FMT_BMP, /* Device-independent bitmap r/w */
-    FMT_PBM, /* Portable Bitmap Format r/w */
-    FMT_EMF, /* Enhanced Metafile Format r/w (Windows only) TBA */
-    FMT_WMF, /* Windows Metafile Format r/w (Windows only) TBA */
-    FMT_PHO, /* Tk Photo Image r/w */
-    NUMFMTS
-};
-
-typedef struct {
-    const char *name;			/* Name of format. */
-    unsigned int flags;
-    Blt_PictureIsFmtProc *isFmtProc;
-    Blt_PictureReadDataProc *readProc;	/* Used for -file and -data
-					 * configuration options. */
-    Blt_PictureWriteDataProc *writeProc; /* Used for cget -data. */
-    Blt_PictureImportProc *importProc;
-    Blt_PictureExportProc *exportProc;
-} PictFormat;
-
-static PictFormat pictFormats[] = {
-    { "jpg" },
-    { "png" },
-    { "tif" },				/* Multi-page */
-    { "xpm" },
-    { "xbm" },
-    { "gif" },				/* Multi-page */
-    { "ps"  },				/* Multi-page */
-    { "pdf" },				/* Not implemented yet. */
-    { "photo" },
-    { "bmp" },
-    { "pbm" },				/* Multi-page */
-    { "emf" },
-    { "wmf" },
-};
-
-static Blt_HashTable fmtTable;
-
-
-/*
- * Default configuration options for picture images. 
- */
-#define DEF_ANGLE		"0.0"
-#define DEF_MAXPECT		"0"
-#define DEF_AUTOSCALE		"0"
-#define DEF_CACHE		"0"
-#define DEF_DITHER		"0"
-#define DEF_DATA		(char *)NULL
-#define DEF_FILE		(char *)NULL
-#define DEF_FILTER		(char *)NULL
-#define DEF_GAMMA		"1.0"
-#define DEF_HEIGHT		"0"
-#define DEF_WIDTH		"0"
-#define DEF_WINDOW		(char *)NULL
-#define DEF_IMAGE		(char *)NULL
-#define DEF_SHARPEN		"no"
-
-#define DEF_OPAQUE		"0"
-#define DEF_OPAQUE_BACKGROUND	"white"
-
-#define IMPORTED_NONE		0
-#define IMPORTED_FILE		(1<<0)
-#define IMPORTED_IMAGE		(1<<1)
-#define IMPORTED_WINDOW		(1<<2)
-#define IMPORTED_DATA		(1<<3)
-#define IMPORTED_MASK	\
-	(IMPORTED_FILE|IMPORTED_IMAGE|IMPORTED_WINDOW|IMPORTED_DATA)
-
-#define NOTIFY_PENDING		(1<<8)
-
-/*
- * A PictImage implements a Tk_ImageMaster for the "picture" image type.  It
- * represents a set of bits (i.e. the picture), some options, and operations
- * (sub-commands) to manipulate the picture.
- *
- * The PictImage manages the TCL interface to a picture (using Tk's "image"
- * command).  Pictures and the mechanics of drawing the picture to the display
- * (painters) are orthogonal.  The PictImage knows nothing about the display
- * type (the display is stored only to free options when it's destroyed).
- * Information specific to the visual context (combination of display, visual,
- * depth, colormap, and gamma) is stored in each cache entry.  The picture
- * image manages the various picture transformations: reading, writing,
- * scaling, rotation, etc.
- */
-typedef struct _Blt_PictureImage {
-    Tk_ImageMaster imgToken;		/* Tk's token for image master.  If
-					 * NULL, the image has been deleted. */
-
-    Tcl_Interp *interp;			/* Interpreter associated with the
-					 * application using this image. */
-
-    Display *display;			/* Display associated with this picture
-					 * image.  This is used to free the 
-					 * configuration options. */
-    Colormap colormap;
-
-    Tcl_Command cmdToken;		/* Token for image command (used to
-					 * delete the command when the image
-					 * goes away).  NULL means the image
-					 * command has already been deleted. */
-
-    unsigned int flags;			/* Various bit-field flags defined
-					 * below. */
-
-    Blt_Chain chain;			/* List of pictures. (multi-page
-					 * formats)  */
-
-    Blt_Picture picture;		/* Current picture displayed. */
-    
-    /* User-requested options. */
-    float angle;			/* Angle in degrees to rotate the
-					 * image. */
-
-    int reqWidth, reqHeight;		/* User-requested size of picture. The
-					 * picture is scaled accordingly.  These
-					 * dimensions may or may not be used,
-					 * depending * upon the -maxpect
-					 * option. */
-
-    int maxpect;			/* If non-zero, indicates to maintain
-					 * the aspect ratio while scaling. The
-					 * larger dimension is discarded. */
-
-    int dither;				/* If non-zero, dither the picture
-					 * before drawing. */
-    int sharpen;			/* If non-zero, indicates to sharpen the
-					 * image. */
-    int autoscale;			/* Automatically scale the picture
-					 * from a saved original picture when
-					 * the size of the picture changes. */
-    Blt_Picture original;
-
-    Blt_ResampleFilter filter;		/* 1D Filter to use when the picture is
-					 * resampled (resized). The same filter
-					 * is applied both horizontally and
-					 * vertically. */
-
-    float gamma;			/* Gamma correction value of the
-					 * monitor. In theory, the same picture
-					 * image may be displayed on two
-					 * monitors simultaneously (using
-					 * xinerama).  Here we're assuming
-					 * (almost certainly wrong) that both
-					 * monitors will have the same gamma
-					 * value. */
-
-    const char *name;			/* Name of the image, file, or window
-					 * read into the picture image. */
-
-    unsigned int index;			/* Index of the picture in the above
-					 * list. */
-
-    Tcl_TimerToken timerToken;		/* Token for timer handler which polls
-					 * for the exit status of each
-					 * sub-process. If zero, there's no
-					 * timer handler queued. */
-    int interval;
-
-    PictFormat *fmtPtr;			/* External format of last image read
-					 * into the picture image. We use this
-					 * to write back the same format if the
-					 * user doesn't specify the format. */
-
-    int doCache;			/* If non-zero, indicates to generate a
-					 * pixmap of the picture. The pixmap is
-					 * cached * in the table below. */
-
-    Blt_HashTable cacheTable;		/* Table of cache entries specific to
-					 * each visual context where this
-					 * picture is displayed. */
-
-} PictImage;
-
-
-/*
- * A PictCacheKey represents the visual context of a cache entry. type.  It
- * contains information specific to the visual context (combination of display,
- * visual, depth, colormap, and gamma).  It is used as a hash table key for
- * cache entries of picture images.  The same picture may be displayed in more
- * than one visual context.
- */
-typedef struct {
-    Display *display;			/* Display where the picture will be
-					 * drawn. Used to free colors allocated
-					 * by the painter. */
-
-    Visual *visualPtr;			/* Visual information of window
-					 * displaying the image. */
-
-    Colormap colormap;			/* Colormap used.  This may be the
-					 * default colormap, or an allocated
-					 * private map. */
-
-    int depth;				/* Depth of the display. */
-
-    unsigned int index;			/* Index of the picture in the list. */
-
-    float gamma;			/* Gamma correction value */
-} PictCacheKey;
-
-
-/*
- * PictInstances (image instances in the Tk parlance) represent a picture
- * image in some specific combination of visual, display, colormap, depth, and
- * output gamma.  Cache entries are stored by each picture image.
- *
- * The purpose is to 1) allocate and hold the painter-specific to the visual
- * and 2) provide caching of XImage's (drawn pictures) into pixmaps.  This
- * feature is enabled only for 100% opaque pictures.  If the picture must be
- * blended with the current background, there is no guarantee (between
- * redraws) that the background will not have changed.  This feature is widget
- * specific. There's no simple way to detect when the pixmap must be redrawn.
- * In general, we should rely on the widget itself to perform its own caching
- * of complex scenes.
- */
-typedef struct {
-    Blt_PictureImage image;		/* The picture image represented by this
-					 * entry. */
-
-    Blt_Painter painter;		/* The painter allocated for this
-					 * particular combination of visual,
-					 * display, colormap, depth, and
-					 * gamma. */
-
-    Display *display;			/* Used to free the pixmap below when
-					 * the entry is destroyed. */
-
-    Blt_HashEntry *hashPtr;		/* These two fields allow the cache */
-    Blt_HashTable *tablePtr;		/* entry to be deleted from the picture
-					 * image's table of entries. */
-
-    Pixmap pixmap;			/* If non-NULL, is a cached pixmap of
-					 * the picture. It's recreated each time
-					 * the * picture changes. */
-
-    int refCount;			/* This entry may be shared by all
-					 * clients displaying this picture image
-					 * with the same painter. */
-    unsigned int flags;
-} PictInstance;
-
-
-static Blt_OptionParseProc ObjToFile;
-static Blt_OptionPrintProc FileToObj;
-static Blt_CustomOption fileOption =
-{
-    ObjToFile, FileToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToData;
-static Blt_OptionPrintProc DataToObj;
-static Blt_CustomOption dataOption =
-{
-    ObjToData, DataToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToFilter;
-static Blt_OptionPrintProc FilterToObj;
-Blt_CustomOption bltFilterOption =
-{
-    ObjToFilter, FilterToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToImage;
-static Blt_OptionPrintProc ImageToObj;
-static Blt_CustomOption imageOption =
-{
-    ObjToImage, ImageToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToWindow;
-static Blt_OptionPrintProc WindowToObj;
-static Blt_CustomOption windowOption =
-{
-    ObjToWindow, WindowToObj, NULL, (ClientData)0
-};
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BOOLEAN, "-autoscale", (char *)NULL, (char *)NULL, 
-	DEF_AUTOSCALE, Blt_Offset(PictImage, autoscale), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-data", (char *)NULL, (char *)NULL, DEF_DATA, 
-	Blt_Offset(PictImage, picture), 0, &dataOption},
-    {BLT_CONFIG_BOOLEAN, "-dither", (char *)NULL, (char *)NULL, 
-	DEF_DITHER, Blt_Offset(PictImage, dither), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-file", (char *)NULL, (char *)NULL, DEF_DATA, 
-	Blt_Offset(PictImage, picture), 0, &fileOption},
-    {BLT_CONFIG_CUSTOM, "-filter", (char *)NULL, (char *)NULL, 
-	DEF_FILTER, Blt_Offset(PictImage, filter), 0, &bltFilterOption},
-    {BLT_CONFIG_FLOAT, "-gamma", (char *)NULL, (char *)NULL, DEF_GAMMA,
-	Blt_Offset(PictImage, gamma), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", (char *)NULL, (char *)NULL,
-	DEF_HEIGHT, Blt_Offset(PictImage, reqHeight), 0},
-    {BLT_CONFIG_CUSTOM, "-image", (char *)NULL, (char *)NULL, DEF_IMAGE,
-	Blt_Offset(PictImage, picture), 0, &imageOption},
-    {BLT_CONFIG_BOOLEAN, "-maxpect", (char *)NULL, (char *)NULL, 
-	DEF_MAXPECT, Blt_Offset(PictImage, maxpect),BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-rotate", (char *)NULL, (char *)NULL, 
-	DEF_ANGLE, Blt_Offset(PictImage, angle), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-sharpen", (char *)NULL, (char *)NULL, 
-	DEF_SHARPEN, Blt_Offset(PictImage, sharpen), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", (char *)NULL, (char *)NULL,
-	DEF_WIDTH, Blt_Offset(PictImage, reqWidth), 0},
-    {BLT_CONFIG_CUSTOM, "-window", (char *)NULL, (char *)NULL, 
-	DEF_WINDOW, Blt_Offset(PictImage, picture), 0, &windowOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc BBoxSwitch;
-static Blt_SwitchCustom bboxSwitch = {
-    BBoxSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc FilterSwitch;
-static Blt_SwitchCustom filterSwitch = {
-    FilterSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc BlendingModeSwitch;
-static Blt_SwitchCustom blendModeSwitch = {
-    BlendingModeSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc ShapeSwitch;
-static Blt_SwitchCustom shapeSwitch = {
-    ShapeSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PathSwitch;
-static Blt_SwitchCustom pathSwitch = {
-    PathSwitch, NULL, (ClientData)0,
-};
-
-typedef struct {
-    Blt_Pixel bg, fg;			/* Fg and bg colors. */
-    Blt_Gradient gradient;
-} GradientSwitches;
-
-static Blt_SwitchSpec gradientSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-direction", "direction",
-	Blt_Offset(GradientSwitches, gradient.path),  0, 0, &pathSwitch},
-    {BLT_SWITCH_CUSTOM, "-shape",     "shape",
-	Blt_Offset(GradientSwitches, gradient.shape), 0, 0, &shapeSwitch},
-    {BLT_SWITCH_CUSTOM, "-high",      "color",
-	Blt_Offset(GradientSwitches, fg),             0, 0, &colorSwitch},
-    {BLT_SWITCH_CUSTOM, "-low",       "color",
-	Blt_Offset(GradientSwitches, bg),             0, 0, &colorSwitch},
-    {BLT_SWITCH_BOOLEAN,"-logscale",  "bool",
-	Blt_Offset(GradientSwitches, gradient.logScale), 0},
-    {BLT_SWITCH_BOOLEAN, "-jitter",   "bool",
-	Blt_Offset(GradientSwitches, gradient.jitter),   0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    PictRegion region;			/* Area to tile. */
-    int xOrigin;
-    int yOrigin;
-} TileSwitches;
-
-static Blt_SwitchSpec tileSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-region",  "bbox",
-	Blt_Offset(TileSwitches, region), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_INT,    "-xorigin", "x",
-	Blt_Offset(TileSwitches, xOrigin),  0},
-    {BLT_SWITCH_INT,    "-yorigin", "y",
-	Blt_Offset(TileSwitches, yOrigin),  0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int invert;				/* Flag. */
-    Tcl_Obj *maskObjPtr;
-} ArithSwitches;
-
-static Blt_SwitchSpec arithSwitches[] = 
-{
-    {BLT_SWITCH_OBJ,     "-mask",   "mask",
-	Blt_Offset(ArithSwitches, maskObjPtr), 0},
-    {BLT_SWITCH_BOOLEAN, "-invert", "bool",
-	Blt_Offset(ArithSwitches, invert), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    PictRegion region;			/* Area to crop. */
-    int nocopy;				/* If non-zero, don't copy the source
-					 * image. */
-} DupSwitches;
-
-#define DUP_NOCOPY	1
-
-static Blt_SwitchSpec dupSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK,"-nocopy", "",
-	Blt_Offset(DupSwitches, nocopy), 0, DUP_NOCOPY},
-    {BLT_SWITCH_CUSTOM, "-region", "bbox",
-	Blt_Offset(DupSwitches, region), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    PictRegion from, to;
-    Blt_BlendingMode mode;		/* Blending mode. */
-} BlendSwitches;
-
-static Blt_SwitchSpec blendSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-mode", "blendingmode",
-	Blt_Offset(BlendSwitches, mode), 0, 0, &blendModeSwitch},
-    {BLT_SWITCH_CUSTOM, "-from", "bbox", 
-	Blt_Offset(BlendSwitches,from), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_CUSTOM, "-to",   "bbox", 
-	Blt_Offset(BlendSwitches, to),  0, 0, &bboxSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Blt_ResampleFilter vFilter;		/* Color of rectangle. */
-    Blt_ResampleFilter hFilter;		/* Width of outline. */
-    Blt_ResampleFilter filter;
-} ConvolveSwitches;
-
-static Blt_SwitchSpec convolveSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-filter",  "filter",
-	Blt_Offset(ConvolveSwitches, filter),  0, 0, &filterSwitch},
-    {BLT_SWITCH_CUSTOM, "-hfilter", "filter",
-	Blt_Offset(ConvolveSwitches, hFilter), 0, 0, &filterSwitch},
-    {BLT_SWITCH_CUSTOM, "-vfilter", "filter",
-	Blt_Offset(ConvolveSwitches, vFilter), 0, 0, &filterSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    PictRegion from, to;
-    int blend;
-} CopySwitches;
-
-static Blt_SwitchSpec copySwitches[] = 
-{
-    {BLT_SWITCH_BOOLEAN,"-blend", "", 
-	Blt_Offset(CopySwitches, blend), 0, 0},
-    {BLT_SWITCH_CUSTOM, "-from", "bbox", 
-	Blt_Offset(CopySwitches,from), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_CUSTOM, "-to",   "bbox", 
-	Blt_Offset(CopySwitches, to),  0, 0, &bboxSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Blt_ResampleFilter filter;
-    PictRegion region;
-    int width, height;
-} ResampleSwitches;
-
-static Blt_SwitchSpec resampleSwitches[] = {
-    {BLT_SWITCH_CUSTOM, "-filter", "filter",
-	Blt_Offset(ResampleSwitches, filter), 0, 0, &filterSwitch},
-    {BLT_SWITCH_CUSTOM, "-from",   "bbox",
-	Blt_Offset(ResampleSwitches, region), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_INT,    "-width",   "int",
-	Blt_Offset(ResampleSwitches, width),  0},
-    {BLT_SWITCH_INT,    "-height",  "int",
-	Blt_Offset(ResampleSwitches, height),  0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    PictRegion region;
-    int raise;
-} SnapSwitches;
-
-static Blt_SwitchSpec snapSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-region", "bbox",
-	Blt_Offset(SnapSwitches, region), 0, 0, &bboxSwitch},
-    {BLT_SWITCH_BITMASK, "-raise",  "",
-	Blt_Offset(SnapSwitches, raise),  0, TRUE},
-    {BLT_SWITCH_END}
-};
-
-/* 
- * Forward references for TCL command callbacks used below. 
- */
-static Tcl_ObjCmdProc PictureInstCmdProc;
-static Tcl_CmdDeleteProc PictureInstCmdDeletedProc;
-
-Blt_Picture
-Blt_GetNthPicture(Blt_Chain chain, size_t index)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_GetNthLink(chain, index);
-    if (link == NULL) {
-	return NULL;
-    }
-    return Blt_Chain_GetValue(link);
-}
-
-static Blt_Picture
-PictureFromPictImage(PictImage *imgPtr)
-{
-    imgPtr->picture = Blt_GetNthPicture(imgPtr->chain, imgPtr->index);
-    return imgPtr->picture;
-}
-
-static void
-ReplacePicture(PictImage *imgPtr, Blt_Picture picture)
-{
-    Blt_ChainLink link;
-
-    if (imgPtr->chain == NULL) {
-	imgPtr->chain = Blt_Chain_Create();
-    }
-    link = Blt_Chain_GetNthLink(imgPtr->chain, imgPtr->index);
-    if (link == NULL) {
-	int n;
-
-	n = Blt_Chain_GetLength(imgPtr->chain);
-	link = Blt_Chain_Append(imgPtr->chain, picture);
-	imgPtr->index = n;
-    } else {
-	Blt_Picture old;
-
-	old = Blt_Chain_GetValue(link);
-	Blt_FreePicture(old);
-    }
-    Blt_Chain_SetValue(link, picture);
-    imgPtr->picture = picture;
-}
-
-static void
-FreePictures(Blt_Chain chain)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Blt_Picture picture;
-	
-	picture = Blt_Chain_GetValue(link);
-	Blt_FreePicture(picture);
-    }
-    Blt_Chain_Destroy(chain);
-}
-
-Blt_Picture
-Blt_GetPictureFromImage(Tk_Image tkImage)
-{
-    PictInstance *instancePtr;
-
-    if (!Blt_IsPicture(tkImage)) {
-	return NULL;
-    }
-    instancePtr = Blt_Image_GetInstanceData(tkImage);
-    return PictureFromPictImage(instancePtr->image);
-}
-
-void
-Blt_NotifyImageChanged(PictImage *imgPtr)
-{
-    if (imgPtr->picture != NULL) {
-	int w, h;
-
-	w = Blt_PictureWidth(imgPtr->picture);
-	h = Blt_PictureHeight(imgPtr->picture);
-	Tk_ImageChanged(imgPtr->imgToken, 0, 0, w, h, w, h);
-    }
-}
-
-Blt_Pixel 
-Blt_XColorToPixel(XColor *colorPtr)
-{
-    Blt_Pixel new;
-
-    /* Convert X Color with 3 channel, 16-bit components to Blt_Pixel
-     * (8-bit, with alpha component) */
-    new.Red = colorPtr->red / 257;
-    new.Green = colorPtr->green / 257;
-    new.Blue = colorPtr->blue / 257;
-    new.Alpha = ALPHA_OPAQUE;
-    return new;
-}
-
-int
-Blt_GetPixel(Tcl_Interp *interp, const char *string, Blt_Pixel *pixelPtr)
-{
-    int length;
-
-    length = strlen(string);
-    if ((string[0] == '0') && (string[1] == 'x')) {
-	unsigned int value;
-	char *term;
-
-	value = strtoul(string + 2, &term, 16); 
-	if ((term == (string + 1)) || (*term != '\0')) {
-	    Tcl_AppendResult(interp, "expected color value but got \"", string,
-		"\"", (char *) NULL);
-	    return TCL_ERROR;
-	}
-	pixelPtr->u32 = value;
-    } else {
-    	XColor color;
-	Tk_Window tkwin;
-
-	tkwin = Tk_MainWindow(interp);
-	if (!XParseColor(Tk_Display(tkwin), Tk_Colormap(tkwin), string, 
-		&color)) {
-	    Tcl_AppendResult(interp, "unknown color name \"", string, "\"",
-			     (char *) NULL);
-	    return TCL_ERROR;
-	}
-	*pixelPtr = Blt_XColorToPixel(&color);
-    }  
-    return TCL_OK;
-}
-
-int
-Blt_GetPixelFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Blt_Pixel *pixelPtr)
-{
-    return Blt_GetPixel(interp, Tcl_GetString(objPtr), pixelPtr);
-}
-
-const char *
-Blt_NameOfPixel(Blt_Pixel *pixelPtr)
-{
-    static char string[10];
-
-    sprintf_s(string, 10, "%02x%02x%02x%02x", pixelPtr->Alpha,
-	    pixelPtr->Red, pixelPtr->Green, pixelPtr->Blue);
-    return string;
-}
-
-int
-Blt_GetBBoxFromObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-		    PictRegion *regionPtr)
-{
-    double left, top, right, bottom;
-
-    if ((objc != 2) && (objc != 4)) {
-	Tcl_AppendResult(interp, "wrong # elements in bounding box ", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    regionPtr->x = regionPtr->y = regionPtr->w = regionPtr->h = 0;
-    if ((Tcl_GetDoubleFromObj(interp, objv[0], &left) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[1], &top) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (objc == 2) {
-	regionPtr->x = ROUND(left), regionPtr->y = ROUND(top);
-	return TCL_OK;
-    }
-    if ((Tcl_GetDoubleFromObj(interp, objv[2], &right) != TCL_OK) ||
-	(Tcl_GetDoubleFromObj(interp, objv[3], &bottom) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-
-    /* Flip the coordinates of the bounding box if necessary so that its the
-     * upper-left and lower-right corners */
-    if (left > right) {
-	double tmp;
-
-	tmp = left, left = right, right = tmp;
-    }
-    if (top > bottom) {
-	double tmp;
-
-	tmp = top, top = bottom, bottom = tmp;
-    }
-    top = floor(top), left = floor(left);
-    bottom = ceil(bottom), right = ceil(right);
-    regionPtr->x = (int)left, regionPtr->y = (int)top;
-    regionPtr->w = (int)right - regionPtr->x + 1;
-    regionPtr->h = (int)bottom - regionPtr->y + 1;
-    return TCL_OK;
-}
-
-static int
-GetBBoxFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, PictRegion *regionPtr)
-{
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_GetBBoxFromObjv(interp, objc, objv, regionPtr);
-}
-
-int
-Blt_AdjustRegionToPicture(Blt_Picture picture, PictRegion *regionPtr)
-{
-    int w, h;
-
-    w = Blt_PictureWidth(picture);
-    h = Blt_PictureHeight(picture);
-
-    if ((regionPtr->w == 0) || (regionPtr->w > w)) {
-	regionPtr->w = w;
-    }
-    if ((regionPtr->h == 0) || (regionPtr->h > h)) {
-	regionPtr->h = h;
-    }
-
-    /* Verify that some part of the bounding box is actually inside the
-     * picture. */
-    if ((regionPtr->x >= w) || ((regionPtr->x + regionPtr->w) <= 0) ||
-	(regionPtr->y >= h) || ((regionPtr->y + regionPtr->h) <= 0)) {
-	return FALSE;
-    }
-    /* If needed, adjust the bounding box so that it resides totally inside the
-     * picture */
-    if (regionPtr->x < 0) {
-	regionPtr->w += regionPtr->x;
-	regionPtr->x = 0;
-    } 
-    if (regionPtr->y < 0) {
-	regionPtr->h += regionPtr->y;
-	regionPtr->y = 0;
-    }
-    if ((regionPtr->x + regionPtr->w) > w) {
-	regionPtr->w = w - regionPtr->x;
-    }
-    if ((regionPtr->y + regionPtr->h) > h) {
-	regionPtr->h = h - regionPtr->y;
-    }
-    return TRUE;
-}
-
-int
-Blt_ResetPicture(Tcl_Interp *interp, const char *imageName, Blt_Picture picture)
-{
-    Tcl_CmdInfo cmdInfo;
-
-    if (Tcl_GetCommandInfo(interp, imageName, &cmdInfo)) {
-	if (cmdInfo.objProc == PictureInstCmdProc) {
-	    PictImage *imgPtr;
-
-	    imgPtr = cmdInfo.objClientData;
-	    if (imgPtr->picture != picture) {
-		ReplacePicture(imgPtr, picture);
-	    }
-	    Blt_NotifyImageChanged(imgPtr);
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "can't find picture \"", imageName, "\"", 
-	(char *)NULL);
-    return TCL_ERROR;
-}
-    
-#ifdef notdef
-int
-Blt_ResetPictureFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-			Blt_Picture picture)
-{
-    return Blt_ResetPicture(interp, Tcl_GetString(objPtr), picture);
-}
-#endif
-
-int
-Blt_GetPicture(Tcl_Interp *interp, const char *string, Blt_Picture *picturePtr)
-{
-    Tcl_CmdInfo cmdInfo;
-
-    if (Tcl_GetCommandInfo(interp, string, &cmdInfo)) {
-	if (cmdInfo.objProc == PictureInstCmdProc) {
-	    PictImage *imgPtr;
-
-	    imgPtr = cmdInfo.objClientData;
-	    *picturePtr = imgPtr->picture;
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "can't find picture \"", string, "\"",
-		     (char *)NULL);
-    return TCL_ERROR;
-}
-
-int
-Blt_GetPictureFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Blt_Picture *pictPtr)
-{
-    return Blt_GetPicture(interp, Tcl_GetString(objPtr), pictPtr);
-}
-
-
-static int
-LoadFormat(Tcl_Interp *interp, const char *name)
-{
-    Tcl_DString ds;
-    const char *result;
-
-    Tcl_DStringInit(&ds);
-    Tcl_DStringAppend(&ds, "blt_picture_", 12);
-    Tcl_DStringAppend(&ds, name, -1);
-    strtolower(Tcl_DStringValue(&ds));
-#define EXACT 1
-    result = Tcl_PkgRequire(interp, Tcl_DStringValue(&ds), BLT_VERSION, EXACT);
-    Tcl_DStringFree(&ds);
-    return (result != NULL);
-}
-
-static PictFormat *
-QueryExternalFormat(
-    Tcl_Interp *interp,			/* Interpreter to load new format
-					 * into. */
-    Blt_DBuffer dbuffer,		/* Data to be tested. */
-    const char *ext)			/* Extension of file name read in.  Will
-					 * be NULL if read from data/base64
-					 * string. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    /* 
-     * Step 1. Try to match the format to the extension, if there is
-     *	       one.  We're trying to minimize the number of formats 
-     *	       loaded using a blind query (.i.e. -file fileName).
-     */
-    if (ext != NULL) {
-	hPtr = Blt_FindHashEntry(&fmtTable, ext);
-	if (hPtr != NULL) {
-	    PictFormat *fmtPtr;
-
-	    fmtPtr = Blt_GetHashValue(hPtr);
-#ifdef notdef
-	    fprintf(stderr, "trying %s\n", fmtPtr->name);
-#endif
-	    if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-		LoadFormat(interp, ext);
-	    }
-	    if (((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) || 
-		(fmtPtr->isFmtProc == NULL)) {
-		fprintf(stderr, "can't load format %s\n", fmtPtr->name);
-		if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-		    fprintf(stderr, "not loaded: format %s\n", fmtPtr->name);
-		} else if (fmtPtr->isFmtProc == NULL) {
-		    fprintf(stderr, "no isFmtProc: format %s\n", fmtPtr->name);
-		}
-		return NULL;		/* Could not load the format or the
-					 * format doesn't have a discovery
-					 * procedure. */
-	    }
-	    if ((*fmtPtr->isFmtProc)(dbuffer)) {
-		return fmtPtr;
-	    }
-#ifdef notdef
-	    fprintf(stderr, "failed to match %s\n", fmtPtr->name);
-#endif
-	    /* If the image doesn't match, even though the extension matches,
-	     * fall through and try all the other formats available. */
-	}
-    }
-    /* 
-     * Step 2. Try to match the image against all the previously 
-     *	       loaded formats.
-     */
-    for (hPtr = Blt_FirstHashEntry(&fmtTable, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	PictFormat *fmtPtr;
-
-	fmtPtr = Blt_GetHashValue(hPtr);
-#ifdef notdef
-	    fprintf(stderr, "pass2 trying %s\n", fmtPtr->name);
-#endif
-	if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-	    continue;			/* Format isn't already loaded. */
-	}
-	if (fmtPtr->isFmtProc == NULL) {
-	    continue;			/* No discover procedure.  */
-	}
-	if ((*fmtPtr->isFmtProc)(dbuffer)) {
-	    return fmtPtr;
-	}
-    }
-    /* 
-     * Step 3. Try to match the image against any format not previously loaded.
-     */
-    for (hPtr = Blt_FirstHashEntry(&fmtTable, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	PictFormat *fmtPtr;
-
-	fmtPtr = Blt_GetHashValue(hPtr);
-#ifdef notdef
-	    fprintf(stderr, "pass3 trying %s\n", fmtPtr->name);
-#endif
-	if (fmtPtr->flags & BLT_PIC_FMT_LOADED) {
-	    continue;			/* Format is already loaded.  */
-	}
-	if (!LoadFormat(interp, fmtPtr->name)) {
-	    continue;			/* Can't load format. */
-	}
-	if (((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) || 
-	    (fmtPtr->isFmtProc == NULL)) {
-	    fprintf(stderr, "can't load format %s\n", fmtPtr->name);
-		if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-		    fprintf(stderr, "not loaded: format %s\n", fmtPtr->name);
-		} else if (fmtPtr->isFmtProc == NULL) {
-		    fprintf(stderr, "no isFmtProc: format %s\n", fmtPtr->name);
-		}
-	    return NULL;		/* Could not load the format or the
-					 * format doesn't have a discovery
-					 * procedure. */
-	}
-	if ((*fmtPtr->isFmtProc)(dbuffer)) {
-	    return fmtPtr;
-	}
-    }
-    return NULL;
-}
-
-static int
-ImageToPicture(Tcl_Interp *interp, PictImage *imgPtr, const char *imageName)
-{
-    Blt_Picture picture;
-    Tk_PhotoHandle photo;
-
-    photo = Tk_FindPhoto(interp, imageName);
-    if (photo != NULL) {
-	picture = Blt_PhotoToPicture(photo);
-    } else if (Blt_GetPicture(interp, imageName, &picture) == TCL_OK) {
-	picture = Blt_ClonePicture(picture);
-    } else {
-	return TCL_ERROR;
-    }
-    ReplacePicture(imgPtr, picture);
-    if (imgPtr->name != NULL) {
-	Blt_Free(imgPtr->name);
-    }
-    imgPtr->name = Blt_AssertStrdup(imageName);
-    imgPtr->flags &= ~IMPORTED_MASK;
-    imgPtr->flags |= IMPORTED_IMAGE;
-    return TCL_OK;
-}
-
-static int
-WindowToPicture(Tcl_Interp *interp, PictImage *imgPtr, Tcl_Obj *objPtr)
-{
-    Blt_Picture picture;
-    Window window;
-    int w, h;
-
-    if (Blt_GetWindowFromObj(interp, objPtr, &window) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetWindowRegion(imgPtr->display, window, (int *)NULL, (int *)NULL,
-		&w, &h) != TCL_OK) {
-	Tcl_AppendResult(interp, "can't get dimensions of window \"", 
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Depth, visual, colormap */
-    picture = Blt_WindowToPicture(imgPtr->display, window, 0, 0, w, h, 
-	imgPtr->gamma);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "can't obtain snapshot of window \"", 
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    ReplacePicture(imgPtr, picture);
-    if (imgPtr->name != NULL) {
-	Blt_Free(imgPtr->name);
-    }
-    imgPtr->name = Blt_AssertStrdup(Tcl_GetString(objPtr));
-    imgPtr->flags &= ~IMPORTED_MASK;
-    imgPtr->flags |= IMPORTED_WINDOW;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToFile --
- *
- *	Given a file name, determine the image type and convert into a
- *	picture.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToFile(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_Chain chain;
-    Blt_DBuffer dbuffer;
-    Blt_Picture *picturePtr = (Blt_Picture *)(widgRec + offset);
-    Blt_Picture picture;
-    PictImage *imgPtr = (PictImage *)widgRec;
-    const char *fileName;
-    PictFormat *fmtPtr;
-    char *ext;
-
-    fileName = Tcl_GetString(objPtr);
-    if (fileName[0] == '\0') {
-	FreePictures(imgPtr->chain);
-	imgPtr->chain = NULL;
-	imgPtr->index = 0;
-	imgPtr->picture = NULL;
-	if (imgPtr->name != NULL) {
-	    Blt_Free(imgPtr->name);
-	}
-	imgPtr->fmtPtr = NULL;
-	imgPtr->flags &= ~IMPORTED_MASK;
-	return TCL_OK;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    if (Blt_DBuffer_LoadFile(interp, fileName, dbuffer) != TCL_OK) {
-	goto error;
-    }
-    ext = NULL;
-    if (fileName[0] != '@') {
-	ext = strrchr(fileName, '.');
-	if (ext != NULL) {
-	    ext++;
-	    if (*ext == '\0') {
-		ext = NULL;
-	    } 
-	    strtolower(ext);
-	}
-    }
-    fmtPtr = QueryExternalFormat(interp, dbuffer, ext);
-    if (fmtPtr == NULL) {
-	Tcl_AppendResult(interp, "\nunknown image file format in \"", fileName, 
-		"\"", (char *)NULL);
-	goto error;
-    }
-    if (fmtPtr->readProc == NULL) {
-	Tcl_AppendResult(interp, "no reader for format \"", fmtPtr->name, "\".",
-		(char *)NULL);
-	goto error;
-    }
-    chain = (*fmtPtr->readProc)(interp, fileName, dbuffer);
-    if (chain == NULL) {
-	goto error;
-    }
-    FreePictures(imgPtr->chain);
-    imgPtr->chain = chain;
-    imgPtr->index = 0;
-    imgPtr->picture = Blt_Chain_FirstValue(chain);
-    if (imgPtr->name != NULL) {
-	Blt_Free(imgPtr->name);
-    }
-    imgPtr->fmtPtr = fmtPtr;
-    imgPtr->name = Blt_AssertStrdup(fileName);
-    imgPtr->flags &= ~IMPORTED_MASK;
-    imgPtr->flags |= IMPORTED_FILE;
-    imgPtr->interval = 0;		/* 100 microseconds */
-    *picturePtr = picture;
-    Blt_DBuffer_Destroy(dbuffer);
-    return TCL_OK;
- error:
-    Blt_DBuffer_Destroy(dbuffer);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FileToObj --
- *
- *	Convert the picture into a TCL list of pixels.
- *
- * Results:
- *	The string representation of the picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-FileToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)widgRec;
-
-    if (((imgPtr->flags & IMPORTED_FILE) == 0) || (imgPtr->name == NULL)) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(imgPtr->name, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToFilter --
- *
- *	Given a string name, get the resample filter associated with it.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToFilter(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_ResampleFilter *filterPtr = (Blt_ResampleFilter *)(widgRec + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	*filterPtr = NULL;
-	return TCL_OK;
-    }
-    return Blt_GetResampleFilterFromObj(interp, objPtr, filterPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FilterToObj --
- *
- *	Convert the picture filter into a string Tcl_Obj.
- *
- * Results:
- *	The string representation of the filter is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-FilterToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_ResampleFilter filter = *(Blt_ResampleFilter *)(widgRec + offset);
-
-    if (filter == NULL) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(Blt_NameOfResampleFilter(filter), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToData --
- *
- *	Given a string of data or binary Tcl_Obj, determine the image
- *	type and convert into a picture.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToData(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_Picture *picturePtr = (Blt_Picture *)(widgRec + offset);
-    PictImage *imgPtr = (PictImage *)widgRec;
-    const unsigned char *bytes;
-    int length, result;
-
-    bytes = Tcl_GetByteArrayFromObj(objPtr, &length);
-    result = TCL_ERROR;
-    if (length == 0) {
-	imgPtr->flags &= ~IMPORTED_MASK;
-	FreePictures(imgPtr->chain);
-	imgPtr->index = 0;
-	imgPtr->picture = NULL;
-	imgPtr->chain = NULL;
-	result = TCL_OK;
-    } else {
-	Blt_DBuffer dbuffer;
-	size_t nBytes;
-	PictFormat *fmtPtr;
-	Blt_Chain chain;
-
-	nBytes = (size_t)length;
-	dbuffer = Blt_DBuffer_Create();
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, (const char *)bytes, 
-			nBytes, dbuffer) != TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	}
-#ifdef notdef
-	{
-	    FILE *f;
-	    
-	    f = fopen("junk.unk", "w");
-	    fwrite(Blt_DBuffer_Bytes(dbuffer), 1, Blt_DBuffer_Length(dbuffer), f);
-	    fclose(f);
-	}
-#endif
-	fmtPtr = QueryExternalFormat(interp, dbuffer, NULL);
-	if (fmtPtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown image file format in \"",
-			     Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    goto error;
-	}
-	if (fmtPtr->readProc == NULL) {
-	    Tcl_AppendResult(interp, "no reader for format \"", fmtPtr->name, 
-			     "\".", (char *)NULL);
-	    goto error;
-	}
-	chain = (*fmtPtr->readProc)(interp, "-data", dbuffer);
-	if (chain == NULL) {
-	    goto error;
-	}
-	result = TCL_OK;
-    error:
-	imgPtr->flags &= ~IMPORTED_MASK;
-	FreePictures(imgPtr->chain);
-	imgPtr->index = 0;
-	imgPtr->picture = NULL;
-	if (result == TCL_OK) {
-	    imgPtr->chain = chain;
-	    imgPtr->fmtPtr = fmtPtr;
-	    imgPtr->picture = Blt_Chain_FirstValue(chain);
-	    imgPtr->flags |= IMPORTED_DATA;
-	}
-	Blt_DBuffer_Destroy(dbuffer);
-    }
-    *picturePtr = imgPtr->picture;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DataToObj --
- *
- *	Convert the picture into a TCL list of pixels.
- *
- * Results:
- *	The string representation of the picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-DataToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)(widgRec);
-    PictFormat *fmtPtr;
-
-    if (((imgPtr->flags & IMPORTED_DATA) == 0) || (imgPtr->picture == NULL)) {
-	return Tcl_NewStringObj("", -1);
-    }
-    fmtPtr = imgPtr->fmtPtr;
-    if (fmtPtr == NULL) {
-	Tcl_AppendResult(interp, "image \"", imgPtr->name, 
-		"\" has no assigned format.", (char *)NULL);
-	Tcl_BackgroundError(interp);
-	return Tcl_NewStringObj("", -1);
-    }
-    if (fmtPtr->writeProc == NULL) {
-	Tcl_AppendResult(interp, "no write procedure for format \"", 
-			 fmtPtr->name, "\".", (char *)NULL);
-	Tcl_BackgroundError(interp);
-	return Tcl_NewStringObj("", -1);
-    }
-    return (*fmtPtr->writeProc)(interp, imgPtr->picture);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToImage --
- *
- *	Convert a named image into a picture.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToImage(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to report results. */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)(widgRec);
-
-    return ImageToPicture(interp, imgPtr, Tcl_GetString(objPtr));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageToObj --
- *
- *	Convert the named image into a picture.
- *
- * Results:
- *	The string representation of the picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ImageToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)widgRec;
-
-    if (((imgPtr->flags & IMPORTED_IMAGE) == 0) || (imgPtr->name == NULL)) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(imgPtr->name, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToWindow --
- *
- *	Given a file name, determine the image type and convert 
- *	into a picture.
- *
- * Results:
- *	The return value is a standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToWindow(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		        /* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation of value. */
-    char *widgRec,			/* Widget record. */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)(widgRec);
-
-    return WindowToPicture(interp, imgPtr, objPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowToObj --
- *
- *	Convert the picture into a TCL list of pixels.
- *
- * Results:
- *	The string representation of the picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-WindowToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Not used. */
-    int flags)				/* Not used. */
-{
-    PictImage *imgPtr = (PictImage *)widgRec;
-
-    if (((imgPtr->flags & IMPORTED_WINDOW) == 0) || (imgPtr->name == NULL)) {
-	return Tcl_NewStringObj("", -1);
-    }
-    return Tcl_NewStringObj(imgPtr->name, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CacheKey --
- *
- *	Returns a key representing a specific visual context for a PictImage.
- *	Keys are used to create/find cache entries stored in the hash table of
- *	each PictImage.
- *
- * Results:
- *	A pointer to a static cache key.  
- *
- * Side effects:
- *	The key is overwritten on each call.  Care must be taken by the caller
- *	to save the key before making additional calls.
- *
- *---------------------------------------------------------------------------
- */
-static PictCacheKey *
-CacheKey(Tk_Window tkwin, unsigned int index)
-{
-    static PictCacheKey key;
-
-    key.display = Tk_Display(tkwin);
-    key.visualPtr = Tk_Visual(tkwin);
-    key.colormap = Tk_Colormap(tkwin);
-    key.depth = Tk_Depth(tkwin);
-    key.index = index;
-    return &key;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyCache --
- *
- *	This procedure is a callback for Tcl_EventuallyFree to release the
- *	resources and memory used by a PictInstance entry. The entry is
- *	destroyed only if noone else is currently using the entry (using
- *	reference counting).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The cache entry is possibly deallocated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyCache(DestroyData data)
-{
-    PictInstance *cachePtr = (PictInstance *)data;
-    
-    if (cachePtr->refCount <= 0) {
-	if (cachePtr->pixmap != None) {
-	    Tk_FreePixmap(cachePtr->display, cachePtr->pixmap);
-	}
-	if (cachePtr->painter != NULL) {
-	    Blt_FreePainter(cachePtr->painter);
-	}
-	if (cachePtr->hashPtr != NULL) {
-	    Blt_DeleteHashEntry(cachePtr->tablePtr, cachePtr->hashPtr);
-	}
-	Blt_Free(cachePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPictInstance --
- *
- *	This procedure is called for each use of a picture image in a widget.
- *
- * Results:
- *	The return value is an entry for the visual context, which will be
- *	passed back to us on calls to DisplayPictureImage and
- *	FreePictInstance.
- *
- * Side effects:
- *	A new entry is possibly allocated (or shared if one already exists).
- *
- *---------------------------------------------------------------------------
- */
-static ClientData
-GetPictInstance(
-    Tk_Window tkwin,			/* Window in which the picture will be
-					 * displayed. */
-    ClientData clientData)		/* Pointer to picture image for the
-					 * image. */
-{
-    Blt_HashEntry *hPtr;
-    PictCacheKey *keyPtr;
-    PictImage *imgPtr = clientData;
-    PictInstance *cachePtr;
-    int isNew;
-
-    keyPtr = CacheKey(tkwin, imgPtr->index);
-    hPtr = Blt_CreateHashEntry(&imgPtr->cacheTable, (char *)keyPtr, &isNew);
-    if (isNew) {
-	cachePtr = Blt_Malloc(sizeof(PictInstance));	
-	if (cachePtr == NULL) {
-	    return NULL;		/* Can't allocate memory. */
-	}
-	cachePtr->painter = Blt_GetPainter(tkwin, imgPtr->gamma);
-	cachePtr->image = imgPtr;
-	cachePtr->display = Tk_Display(tkwin);
-	cachePtr->pixmap = None;
-	cachePtr->hashPtr = hPtr;
-	cachePtr->tablePtr = &imgPtr->cacheTable;
-	cachePtr->refCount = 0;
-	Blt_SetHashValue(hPtr, cachePtr);
-
-	if (imgPtr->picture != NULL) {
-	    Blt_NotifyImageChanged(imgPtr);
-	}
-    } 
-    cachePtr = Blt_GetHashValue(hPtr);
-    cachePtr->refCount++;
-    return cachePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePictInstance --
- *
- *	This procedure is called when a widget ceases to use a particular
- *	instance of a picture image.  We don't actually get rid of the entry
- *	until later because we may be about to re-get this instance again.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Internal data structures get freed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreePictInstance(
-    ClientData clientData,		/* Pointer to cache structure */
-    Display *display)			/* Not used. */
-{
-    PictInstance *cachePtr = clientData;
-
-    cachePtr->refCount--;
-    if (cachePtr->refCount <= 0) {
-	/* 
-	 * Right now no one is using the entry. But delay the removal of the
-	 * cache entry in case it's reused shortly afterwards.
-	 */
- 	Tcl_EventuallyFree(cachePtr, DestroyCache);
-    }    
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeletePictureImage --
- *
- *	This procedure is called by the Tk image code to delete the master
- *	structure (PictureImage) for a picture image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Resources associated with the picture image are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DeletePictureImage(
-    ClientData clientData)		/* Pointer to picture image master
-					 * structure for image.  Must not have
-					 * any more instances. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    PictImage *imgPtr = clientData;
- 
-    for (hPtr = Blt_FirstHashEntry(&imgPtr->cacheTable, &iter); 
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	PictInstance *cachePtr;
-
-	cachePtr = Blt_GetHashValue(hPtr);
-	cachePtr->hashPtr = NULL; /* Flag for FreePictInstance. */
-	DestroyCache((DestroyData)cachePtr);
-    }
-    imgPtr->imgToken = NULL;
-    if (imgPtr->cmdToken != NULL) {
-	Tcl_DeleteCommandFromToken(imgPtr->interp, imgPtr->cmdToken);
-    }
-    Blt_DeleteHashTable(&imgPtr->cacheTable);
-    Blt_FreeOptions(configSpecs, (char *)imgPtr, imgPtr->display, 0);
-    if (imgPtr->chain != NULL) {
-	FreePictures(imgPtr->chain);
-    }
-    if (imgPtr->timerToken != (Tcl_TimerToken)0) {
-	Tcl_DeleteTimerHandler(imgPtr->timerToken);
-	imgPtr->timerToken = 0;
-    }
-    Blt_Free(imgPtr);
-}
-
-static int 
-ConfigurePictureImage(Tcl_Interp *interp, PictImage *imgPtr, int objc, 
-		      Tcl_Obj *const *objv, int flags) 
-{
-    int w, h;
-
-    if (Blt_ConfigureWidgetFromObj(interp, Tk_MainWindow(interp), configSpecs, 
-	objc, objv, (char *)imgPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    imgPtr->picture = PictureFromPictImage(imgPtr);
-    if (imgPtr->picture == NULL) {
-	w = (imgPtr->reqWidth == 0) ? 16 : imgPtr->reqWidth;
-	h = (imgPtr->reqHeight == 0) ? 16 : imgPtr->reqHeight;
-	ReplacePicture(imgPtr, Blt_CreatePicture(w, h));
-    }
-    if (Blt_ConfigModified(configSpecs, "-autoscale", (char *)NULL)) {
-	if (imgPtr->original != NULL) {
-	    Blt_FreePicture(imgPtr->original);
-	}
-	if ((imgPtr->autoscale) && (imgPtr->picture != NULL)) {
-	    imgPtr->original = Blt_ClonePicture(imgPtr->picture);
-	}
-    }
-    if (imgPtr->angle != 0.0) {
-	Blt_Picture rotate;
-
-	/* Rotate the picture */
-	rotate = Blt_RotatePicture(imgPtr->picture, imgPtr->angle);
-	ReplacePicture(imgPtr, rotate);
-    }
-
-    w = (imgPtr->reqWidth == 0) ? 
-	Blt_PictureWidth(imgPtr->picture) : imgPtr->reqWidth;
-    h = (imgPtr->reqHeight == 0) ? 
-	Blt_PictureHeight(imgPtr->picture) : imgPtr->reqHeight;
-
-    if (imgPtr->maxpect) {
-	double sx, sy, scale;
-
-	sx = (double)w / (double)Blt_PictureWidth(imgPtr->picture);
-	sy = (double)h / (double)Blt_PictureHeight(imgPtr->picture);
-	scale = MIN(sx, sy);
-	w = (int)(Blt_PictureWidth(imgPtr->picture) * scale + 0.5);
-	h = (int)(Blt_PictureHeight(imgPtr->picture) * scale + 0.5);
-    }	    
-    if ((Blt_PictureWidth(imgPtr->picture) != w) || 
-	(Blt_PictureHeight(imgPtr->picture) != h)) {
-	if (imgPtr->autoscale) { 
-	    Blt_Picture resize;
-
-	    /* Scale the picture */
-	    if (imgPtr->filter == NULL) {
-		resize = Blt_ScalePicture(imgPtr->original, 0, 0,
-			Blt_PictureWidth(imgPtr->original), 
-			Blt_PictureHeight(imgPtr->original), w, h);
-	    } else {
-		resize = Blt_CreatePicture(w, h);
-		Blt_ResamplePicture(resize, imgPtr->original, imgPtr->filter, 
-			imgPtr->filter);
-	    }	
-	    ReplacePicture(imgPtr, resize);
-	} else {
-	    Blt_ResizePicture(imgPtr->picture, w, h);
-	}
-    }
-    if (imgPtr->sharpen > 0) {
-	Blt_SharpenPicture(imgPtr->picture, imgPtr->picture);
-    }
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}    
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreatePictureImage --
- *
- *	This procedure is called by the Tk image code to create a new picture
- *	image.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	The data structure for a new picture image is allocated and initialized.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreatePictureImage(
-    Tcl_Interp *interp,		        /* Interpreter to report errors back
-					 * to. */
-    char *name,				/* Name to use for image command. */
-    int objc,				/* # of option arguments. */
-    Tcl_Obj *const *objv,		/* Option arguments (doesn't include
-					 * image name or type). */
-    Tk_ImageType *typePtr,		/* Not used. */
-    Tk_ImageMaster imgToken,		/* Token for image, to be used by us in
-					 * later callbacks. */
-    ClientData *clientDataPtr)		/* Store manager's token for image here;
-					 * it will be returned in later
-					 * callbacks. */
-{
-    PictImage *imgPtr;
-    Tk_Window tkwin;
-
-    /*
-     * Allocate and initialize the picture image master record.
-     */
-
-    imgPtr = Blt_AssertCalloc(1, sizeof(PictImage));
-    imgPtr->imgToken = imgToken;
-    imgPtr->interp = interp;
-    imgPtr->gamma = 1.0f;
-    imgPtr->cmdToken = Tcl_CreateObjCommand(interp, name, PictureInstCmdProc,
-	    imgPtr, PictureInstCmdDeletedProc);
-    imgPtr->maxpect = FALSE;
-    imgPtr->dither = 2;
-    tkwin = Tk_MainWindow(interp);
-    imgPtr->display = Tk_Display(tkwin);
-    imgPtr->colormap = Tk_Colormap(tkwin);
-#ifdef notdef
-    imgPtr->typePtr = typePtr;
-#endif
-    Blt_InitHashTable(&imgPtr->cacheTable, sizeof(PictCacheKey)/sizeof(int));
-
-    /*
-     * Process configuration options given in the image create command.
-     */
-    if (ConfigurePictureImage(interp, imgPtr, objc, objv, 0) != TCL_OK) {
-	DeletePictureImage(imgPtr);
-	return TCL_ERROR;
-    }
-    *clientDataPtr = imgPtr;
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), name, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayPictureImage --
- *
- *	This procedure is invoked to draw a picture image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	A portion of the image gets rendered in a pixmap or window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayPictureImage(
-    ClientData clientData,		/* Pointer to token structure for the
-					 * picture to be displayed. */
-    Display *display,		        /* Display on which to draw
-					 * picture. */
-    Drawable drawable,			/* Pixmap or window in which to draw
-					 * image. */
-    int x, int y,			/* Upper-left corner of region within
-					 * image to draw. */
-    int w, int h,			/* Dimension of region within image to
-					 * draw. */
-    int dx, int dy)			/* Coordinates within destination
-					 * drawable that correspond to imageX
-					 * and imageY. */
-{
-    PictInstance *instPtr = clientData;
-    PictImage *imgPtr;
-    Blt_Picture picture;
-
-    imgPtr = instPtr->image;
-    
-    picture = PictureFromPictImage(imgPtr);
-    if (picture == NULL) {
-	return;
-    }
-    if ((instPtr->pixmap != None) && (Blt_PictureIsDirty(picture))) {
-	Tk_FreePixmap(display, instPtr->pixmap);
-	instPtr->pixmap = None;
-    }
-    if ((imgPtr->doCache) && (Blt_PictureIsOpaque(picture))) {
-	if (instPtr->pixmap == None) {
-	    Pixmap pixmap;
-
-	    /* Save the entire picture in the pixmap. */
-	    pixmap = Tk_GetPixmap(display, drawable, 
-		Blt_PictureWidth(picture), 
-		Blt_PictureHeight(picture),
-		Blt_PainterDepth(instPtr->painter));
-	    Blt_PaintPicture(instPtr->painter, drawable, picture,
-		0, 0, Blt_PictureWidth(picture), 
-		Blt_PictureHeight(picture), 
-		0, 0, imgPtr->dither);
-	    instPtr->pixmap = pixmap;
-	}
-	/* Draw only the area that need to be repaired. */
-	XCopyArea(display, instPtr->pixmap, drawable, 
-		Blt_PainterGC(instPtr->painter), x, y, (unsigned int)w, 
-		(unsigned int)h, dx, dy);
-    } else {
-	unsigned int flags;
-
-	if (instPtr->pixmap != None) {
-	    /* Kill the cached pixmap. */
-	    Tk_FreePixmap(display, instPtr->pixmap);
-	    instPtr->pixmap = None;
-	}
-	flags = 0;
-	if ((imgPtr->dither == 1) || ((imgPtr->dither == 2) && 
-		(Blt_PainterDepth(instPtr->painter) < 15))) {
-	    flags |= BLT_PAINTER_DITHER;
-	}
-	Blt_PaintPicture(instPtr->painter, drawable, picture, 
-		x, y, w, h, dx, dy, flags);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureImageToPostScript --
- *
- *	This procedure is called to output the contents of a picture image in
- *	PostScript by calling the Tk_PostscriptPhoto function.
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureImageToPostScript(
-    ClientData clientData,		/* Master picture image. */
-    Tcl_Interp *interp,			/* Interpreter to return generated
-					 * PostScript. */
-    Tk_Window tkwin,
-    Tk_PostscriptInfo psInfo,		/* Not used.  Only useful for Tk
-					 * internal Photo and Bitmap image
-					 * types.  */
-    int x, int y,			/* First pixel to output */
-    int w, int h,			/* Width and height of picture area */
-    int prepass)
-{
-    PictImage *imgPtr = clientData;
-
-    if (prepass) {
-	return TCL_OK;
-    }
-    if (Blt_PictureIsOpaque(imgPtr->picture)) {
-	Blt_Ps ps;
-	PageSetup setup;
-
-	memset(&setup, 0, sizeof(setup));
-	ps = Blt_Ps_Create(interp, &setup);
-	Blt_Ps_DrawPicture(ps, imgPtr->picture, (double)x, (double)y);
-	Blt_Ps_SetInterp(ps, interp);
-	Blt_Ps_Free(ps);
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_Picture bg;
-	Blt_Ps ps;
-	Drawable drawable;
-	PageSetup setup;
-	PictInstance *instPtr;
-	PictCacheKey *keyPtr;
-
-	instPtr = NULL;
-	keyPtr = CacheKey(tkwin, imgPtr->index);
-	hPtr = Blt_FindHashEntry(&imgPtr->cacheTable,(char *)keyPtr);
-	if (hPtr != NULL) {
-	    instPtr = Blt_GetHashValue(hPtr);
-	}
-	if ((instPtr != NULL) && (instPtr->pixmap != None)) {
-	    drawable = instPtr->pixmap;
-	} else {
-	    drawable = Tk_WindowId(tkwin);
-	}
-	bg = Blt_DrawableToPicture(tkwin, drawable, x, y, w, h, imgPtr->gamma); 
-	if (bg == NULL) {
-	    return TCL_ERROR;
-	}
-	Blt_BlendPictures(bg, imgPtr->picture, 0, 0, w, h, 0, 0);
-
-	memset(&setup, 0, sizeof(setup));
-	ps = Blt_Ps_Create(interp, &setup);
-	Blt_Ps_DrawPicture(ps, bg, (double)x, (double)y);
-	Blt_Ps_SetInterp(ps, interp);
-	Blt_Ps_Free(ps);
-	Blt_FreePicture(bg);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BBoxSwitch --
- *
- *	Convert a Tcl_Obj list of 2 or 4 numbers into representing a bounding
- *	box structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BBoxSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    PictRegion *regionPtr = (PictRegion *)(record + offset);
-
-    if (GetBBoxFromObj(interp, objPtr, regionPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FilterSwitch --
- *
- *	Convert a Tcl_Obj representing a 1D image filter.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FilterSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_ResampleFilter *filterPtr = (Blt_ResampleFilter *)(record + offset);
-
-    return Blt_GetResampleFilterFromObj(interp, objPtr, filterPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlendingModeSwitch --
- *
- *	Convert a Tcl_Obj representing a blending mode.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BlendingModeSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_BlendingMode *modePtr = (Blt_BlendingMode *)(record + offset);
-    const char *string;
-    int length;
-    char c;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "normal", length) == 0)) {
-	*modePtr = BLT_BLEND_NORMAL;
-    } else if ((c == 'm') && (strncmp(string, "multiply", length) == 0)) {
-	*modePtr = BLT_BLEND_MULTIPLY;
-    } else if ((c == 's') && (strncmp(string, "screen", length) == 0)) {
-	*modePtr = BLT_BLEND_SCREEN;
-    } else if ((c == 'd') && (length > 1) && 
-	       (strncmp(string, "darken", length) == 0)) {
-	*modePtr = BLT_BLEND_DARKEN;
-    } else if ((c == 'l') && (strncmp(string, "lighten", length) == 0)) {
-	*modePtr = BLT_BLEND_LIGHTEN;
-    } else if ((c == 'd') && (length > 1) && 
-	       (strncmp(string, "difference", length) == 0)) {
-	*modePtr = BLT_BLEND_DIFFERENCE;
-    } else if ((c == 'h') && (strncmp(string, "hardlight", length) == 0)) {
-	*modePtr = BLT_BLEND_HARDLIGHT;
-    } else if ((c == 's') && (strncmp(string, "softlight", length) == 0)) {
-	*modePtr = BLT_BLEND_SOFTLIGHT;
-    } else if ((c == 'c') && (length > 5) && 
-	       (strncmp(string, "colordodge", length) == 0)) {
-	*modePtr = BLT_BLEND_COLORDODGE;
-    } else if ((c == 'c') && (length > 5) && 
-	       (strncmp(string, "colorburn", length) == 0)) {
-	*modePtr = BLT_BLEND_COLORBURN;
-    } else if ((c == 'o') && (strncmp(string, "overlay", length) == 0)) {
-	*modePtr = BLT_BLEND_OVERLAY;
-    } else {
-	Tcl_AppendResult(interp, "unknown blending mode \"", string, "\": ",
-		"should be normal, mulitply, screen, darken, lighten, ",
-		"or difference", (char *) NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShapeSwitch --
- *
- *	Convert a Tcl_Obj representing a gradient shape.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ShapeSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_GradientShape *shapePtr = (Blt_GradientShape *)(record + offset);
-    const char *string, **p;
-    int shape;
-    static const char *gradientShapes[] = {
-	"linear",
-	"bilinear",
-	"radial",
-	"rectangular",
-	NULL
-    };
-    string = Tcl_GetString(objPtr);
-    for (shape = 0, p = gradientShapes; *p != NULL; p++, shape++) {
-	if (strcmp(string, *p) == 0) {
-	    *shapePtr = (Blt_GradientShape)shape;
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "unknown gradient type \"", string, "\"",
-		     (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PathSwitch --
- *
- *	Convert a Tcl_Obj representing a gradient path.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PathSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)				/* Not used. */
-{
-    Blt_GradientPath *pathPtr = (Blt_GradientPath *)(record + offset);
-    const char *string, **p;
-    int path;
-    static const char *gradientPaths[] = {
-	"x", "y", "xy", "yx", NULL
-    };
-
-    string = Tcl_GetString(objPtr);
-    for (path = 0, p = gradientPaths; *p != NULL; p++, path++) {
-	if (strcmp(string, *p) == 0) {
-	    *pathPtr = (Blt_GradientPath)path;
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "unknown gradient type \"", string, "\"",
-		     (char *)NULL);
-    return TCL_ERROR;
-}
-
-static Blt_Picture
-NextImage(PictImage *imgPtr)
-{
-    Blt_Picture picture;
-
-    imgPtr->index++;
-    if (imgPtr->index >= Blt_Chain_GetLength(imgPtr->chain)) {
-	imgPtr->index = 0;
-    }
-    picture = PictureFromPictImage(imgPtr);
-    Blt_NotifyImageChanged(imgPtr);
-    return picture;
-}
-
-static void
-TimerProc(ClientData clientData)
-{
-    PictImage *imgPtr = clientData;
-    Blt_Picture picture;
-    int delay;
-
-    picture = NextImage(imgPtr);
-    delay = Blt_PictureDelay(imgPtr->picture);
-    if (imgPtr->interval > 0) {
-	delay = imgPtr->interval;
-    }
-    imgPtr->timerToken = Tcl_CreateTimerHandler(delay, TimerProc, imgPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArithOp --
- *
- *	$image arith op $src -from { 0 0 100 100 } -to { 0 0 }
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-ArithOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, mask;
-    Blt_PictureArithOps op;
-    PictImage *imgPtr = clientData;
-    Blt_Pixel scalar;
-    const char *string;
-    char c;
-    int len;
-    ArithSwitches switches;
-
-    src = NULL;
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] == '0') && (string[1] == 'x')) {
-	if (Blt_GetPixel(interp, string, &scalar) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else if (Blt_GetPicture(interp, string, &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetStringFromObj(objv[1], &len);
-    op = 0;
-    c = string[0];
-    if ((c == 'a') && (len > 1) && (strncmp(string, "add", len) == 0)) {
-	op = PIC_ARITH_ADD;
-    } else if ((c == 's') && (strncmp(string, "subtract", len) == 0)) {
-	op = PIC_ARITH_SUB;
-    } else if ((c == 'a') && (len > 1) && (strncmp(string, "and", len) == 0)) {
-	op = PIC_ARITH_AND;
-    } else if ((c == 'o') && (strncmp(string, "or", len) == 0)) {
-	op = PIC_ARITH_OR;
-    } else if ((c == 'n') && (len > 1) && (strncmp(string, "nand", len) == 0)) {
-	op = PIC_ARITH_NAND;
-    } else if ((c == 'n') && (len > 1) && (strncmp(string, "nor", len) == 0)) {
-	op = PIC_ARITH_NOR;
-    } else if ((c == 'x') && (strncmp(string, "xor", len) == 0)) {
-	op = PIC_ARITH_XOR;
-    } else if ((c == 'm') && (len > 1) && (strncmp(string, "max", len) == 0)) {
-	op = PIC_ARITH_MAX;
-    } else if ((c == 'm') && (len > 1) && (strncmp(string, "min", len) == 0)) {
-	op = PIC_ARITH_MIN;
-    }	
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, arithSwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    mask = NULL;
-    if (switches.maskObjPtr != NULL) {
-	if (Blt_GetPictureFromObj(interp, switches.maskObjPtr, &mask)!=TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (mask == NULL) {
-	if (src == NULL) {
-	    Blt_ApplyScalarToPicture(imgPtr->picture, &scalar, op);
-	} else {
-	    Blt_ApplyPictureToPicture(imgPtr->picture, src, 
-				      0, 0, 
-				      Blt_PictureWidth(src),
-				      Blt_PictureHeight(src),
-				      0, 0, 
-				      op);
-	}	
-    } else {
-	if (src == NULL) {
-	    Blt_ApplyScalarToPictureWithMask(imgPtr->picture, &scalar, mask, 
-		switches.invert, op);
-	} else {
-	    Blt_ApplyPictureToPictureWithMask(imgPtr->picture, src, mask, 
-					      0, 0, 
-					      Blt_PictureWidth(src),
-					      Blt_PictureHeight(src),
-					      0, 0, 
-					      switches.invert, op);
-	}	
-    }
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlankOp --
- *	
- *	Resets the picture at its current size to blank (by default 
- *	white, fully opaque) pixels.  
- *
- *		$image blank -color #000000 -region { 0 0 20 20 }
- * Results:
- *	Returns a standard TCL return value. If an error occured parsing
- *	the pixel.
- *
- *
- * Side effects:
- *	A Tk_ImageChanged notification is triggered.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BlankOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    Blt_Pixel bg;
-
-    bg.u32 = 0x00000000;
-    if ((objc == 3) && (Blt_GetPixelFromObj(interp, objv[2], &bg)!= TCL_OK)) {
-	return TCL_ERROR;
-    }
-    Blt_BlankPicture(imgPtr->picture, &bg);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlendOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-BlendOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    BlendSwitches switches;
-    Blt_Picture fg, bg, tmp;
-    PictImage *imgPtr = clientData;
-    Blt_Picture dest;
-
-    if ((Blt_GetPictureFromObj(interp, objv[2], &bg) != TCL_OK) ||
-	(Blt_GetPictureFromObj(interp, objv[3], &fg) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    switches.mode = BLT_BLEND_NORMAL;
-    switches.from.x = switches.from.y = 0;
-    switches.from.w = Blt_PictureWidth(bg);
-    switches.from.h = Blt_PictureHeight(bg);
-    switches.to.x = switches.to.y = 0;
-    switches.to.w = Blt_PictureWidth(bg);
-    switches.to.h = Blt_PictureHeight(bg);
-    if (Blt_ParseSwitches(interp, blendSwitches, objc - 4, objv + 4, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    dest = PictureFromPictImage(imgPtr);
-    tmp = NULL;
-    if (dest == fg) {
-	fg = tmp = Blt_ClonePicture(fg);
-    }
-    if (dest != bg) {
-	Blt_ResizePicture(dest, Blt_PictureWidth(bg), Blt_PictureHeight(bg));
-	Blt_CopyPictureBits(dest, bg, 0, 0, 
-			    Blt_PictureWidth(bg), Blt_PictureHeight(bg), 0, 0);
-    }
-    Blt_BlendPictures(dest, fg, 
-		      switches.from.x, switches.from.y, 
-		      switches.from.w, switches.from.h, 
-		      switches.to.x, switches.to.y);
-    if (tmp != NULL) {
-	Blt_FreePicture(bg);
-    }
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blend2Op --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-Blend2Op(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture fg, bg, dest;
-    BlendSwitches switches;
-    PictImage *imgPtr = clientData;
-
-    if ((Blt_GetPictureFromObj(interp, objv[2], &bg) != TCL_OK) ||
-	(Blt_GetPictureFromObj(interp, objv[3], &fg) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    switches.mode = BLT_BLEND_NORMAL;
-    if (Blt_ParseSwitches(interp, blendSwitches, objc - 4, objv + 4, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    dest = PictureFromPictImage(imgPtr);
-    Blt_ResizePicture(dest, Blt_PictureWidth(bg), Blt_PictureHeight(bg));
-    Blt_CopyPictureBits(dest, bg, 0, 0, Blt_PictureWidth(bg), 
-	Blt_PictureHeight(bg), 0, 0);
-    Blt_BlendPicturesByMode(dest, fg, switches.mode); 
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlurOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-BlurOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, dest;
-    PictImage *imgPtr;
-    int r;				/* Radius of the blur. */
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &r) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (r < 1) {
-	Tcl_AppendResult(interp, "radius of blur must be > 1 pixel wide",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    imgPtr = clientData;
-    dest = PictureFromPictImage(imgPtr);
-    Blt_BlurPicture(dest, src, r);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Returns the value of the configuration option specified.
- *
- * Results:
- *	Returns a standard TCL return value.  If TCL_OK, the value of the
- *	picture configuration option specified is returned in the interpreter
- *	result.  Otherwise an error message is returned.
- * 
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    
-    return Blt_ConfigureValueFromObj(interp, Tk_MainWindow(interp), configSpecs,
-	(char *)imgPtr, objv[2], 0);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr;
-    Tk_Window tkwin;
-    unsigned int flags;
-    
-    flags = BLT_CONFIG_OBJV_ONLY;
-    tkwin = Tk_MainWindow(interp);
-    imgPtr = clientData;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, tkwin, configSpecs,
-	    (char *)imgPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, tkwin, configSpecs,
-	    (char *)imgPtr, objv[2], flags);
-    } else {
-	if (ConfigurePictureImage(interp, imgPtr, objc - 2, objv + 2, flags) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConvolveOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-ConvolveOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src;
-    ConvolveSwitches switches;
-    PictImage *imgPtr = clientData;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switches.vFilter = bltBoxFilter;
-    switches.hFilter = bltBoxFilter;
-    switches.filter = NULL;
-    if (Blt_ParseSwitches(interp, convolveSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.filter != NULL) {
-	switches.hFilter = switches.vFilter = switches.filter;
-    }
-#ifdef notdef
-    dest = PictureFromPictImage(imgPtr);
-    Blt_ConvolvePicture(dest, src, switches.vFilter, switches.hFilter);
-#endif
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CopyOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CopyOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Blt_Picture src, dest;
-    CopySwitches switches;
-    PictImage *imgPtr;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switches.from.x = switches.from.y = 0;
-    switches.from.w = Blt_PictureWidth(src);
-    switches.from.h = Blt_PictureHeight(src);
-    switches.to.x = switches.to.y = 0;
-    switches.to.w = Blt_PictureWidth(src);
-    switches.to.h = Blt_PictureHeight(src);
-    switches.blend = FALSE;
-
-    if (Blt_ParseSwitches(interp, copySwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (!Blt_AdjustRegionToPicture(src, &switches.from)) {
-	return TCL_OK;			/* Region is not inside of source. */
-    }
-    imgPtr = clientData;
-    dest = PictureFromPictImage(imgPtr);
-    if (!Blt_AdjustRegionToPicture(dest, &switches.to)) {
-	return TCL_OK;			/* Region is not inside of
-					 * destination. */
-    }
-    if (switches.blend) {
-	Blt_BlendPictures(dest, src, switches.from.x, 
-		switches.from.y, switches.from.w, switches.from.h,
-		switches.to.x, switches.to.y);
-    } else {
-	Blt_CopyPictureBits(dest, src, switches.from.x, 
-		switches.from.y, switches.from.w, switches.from.h,
-		switches.to.x, switches.to.y);
-    }
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CropOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CropOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictRegion region;
-    Blt_Picture src, dest;
-    PictImage *imgPtr;
-
-    if (Blt_GetBBoxFromObjv(interp, objc - 2, objv + 2, &region) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    imgPtr = clientData;
-    src = PictureFromPictImage(imgPtr);
-    if (!Blt_AdjustRegionToPicture(src, &region)) {
-	Tcl_AppendResult(interp, "impossible coordinates for region", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    dest = Blt_CreatePicture(region.w, region.h);
-    Blt_CopyPictureBits(dest, src, region.x, region.y, region.w, region.h, 0,0);
-    ReplacePicture(imgPtr, dest);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-BLT_EXTERN Blt_OpSpec bltPictDrawOps[];
-BLT_EXTERN int bltPictDrawNOps;
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-DrawOp(
-    ClientData clientData,		/* Contains reference to picture
-					 * object. */
-    Tcl_Interp *interp,
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    Blt_Picture picture;
-    PictCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, bltPictDrawNOps, bltPictDrawOps, 
-	BLT_OP_ARG2, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    picture = PictureFromPictImage(imgPtr);
-    result = (*proc) (picture, interp, objc, objv);
-    if (result == TCL_OK) {
-	Blt_NotifyImageChanged(imgPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DupOp --
- *
- *	Creates a duplicate of the current picture in a new picture image.  The
- *	name of the new image is returned.
- *
- * Results:
- *	Returns a standard TCL return value.  If TCL_OK, The name of
- *	the new image command is returned via the interpreter result.
- *	Otherwise an error message is returned.
- *
- * Side effects:
- *	A new image command is created.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DupOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Blt_Picture picture;
-    DupSwitches switches;
-    PictImage *imgPtr = clientData;
-    Tcl_Obj *objPtr;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, dupSwitches, objc - 2, objv + 2, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (!Blt_AdjustRegionToPicture(imgPtr->picture, &switches.region)) {
-	Tcl_AppendResult(interp, "impossible coordinates for region", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* 
-     * Create a new picture image. Let Tk automatically generate the command
-     * name.
-     */
-    if (Tcl_Eval(interp, "image create picture") != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* The interpreter result now contains the name of the image. */
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-
-    /* 
-     * Reset the result just in case Blt_ResetPicture returns an error. 
-     */
-    Tcl_ResetResult(interp);	
-    
-    picture = Blt_CreatePicture(switches.region.w, switches.region.h);
-    if (switches.nocopy) {		/* Set the picture to a blank image. */
-	Blt_BlankPicture(picture, 0x00000000);
-    } else {				/* Copy region into new picture. */
-	Blt_CopyPictureBits(picture, imgPtr->picture, switches.region.x,
-	    switches.region.y, switches.region.w, switches.region.h, 0, 0);
-    }
-    if (Blt_ResetPicture(interp, Tcl_GetString(objPtr), picture) != TCL_OK) {
-	Tcl_DecrRefCount(objPtr);
-	Blt_FreePicture(picture);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objPtr);
-    Tcl_DecrRefCount(objPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExportOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ExportOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Blt_HashEntry *hPtr;
-    PictFormat *fmtPtr;
-    PictImage *imgPtr = clientData;
-    int result;
-    const char *fmt;
-
-    if (objc == 2) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&fmtTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    PictFormat *fmtPtr;
-
-	    fmtPtr = Blt_GetHashValue(hPtr);
-	    if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-		continue;
-	    }
-	    if (fmtPtr->exportProc == NULL) {
-		continue;
-	    }
-	    Tcl_AppendElement(interp, fmtPtr->name);
-	}
-	return TCL_OK;
-    }
-    fmt = Tcl_GetString(objv[2]);
-    hPtr = Blt_FindHashEntry(&fmtTable, fmt);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't export \"", fmt,
-			 "\": format not registered", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-	LoadFormat(interp, fmt);
-    }
-    if (fmtPtr->exportProc == NULL) {
-	Tcl_AppendResult(interp, "no export procedure registered for \"", 
-			 fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    result = (*fmtPtr->exportProc)(interp, imgPtr->index, imgPtr->chain, 
-	objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FadeOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-FadeOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src;
-    PictImage *imgPtr = clientData;
-    int alpha;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &alpha) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_FadePicture(imgPtr->picture, src, 0, 0, Blt_PictureWidth(src), 
-	Blt_PictureHeight(src), 0, 0, alpha);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FlipOp --
- *
- *	Flips the picture either horizontally or vertically.
- *
- * Results:
- *	Returns a standard TCL return value.  If TCL_OK, the components of the
- *	pixel are returned as a list in the interpreter result.  Otherwise an
- *	error message is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FlipOp(
-    ClientData clientData,	/* Information about picture cmd. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    const char *string;
-    int isVertical;
-
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] ==  'x') && (string[1] == '\0')) {
-	isVertical = FALSE;
-    } else if ((string[0] ==  'y') && (string[1] == '\0')) {
-	isVertical = TRUE;
-    } else {
-	Tcl_AppendResult(interp, "bad flip argument \"", string, 
-		"\": should be x or y", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Blt_FlipPicture(imgPtr->picture, isVertical);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *	Returns the RGBA components of the pixel at the specified coordinate.
- *
- * Results:
- *	Returns a standard TCL return value.  If TCL_OK, the components of the
- *	pixel are returned as a list in the interpreter result.  Otherwise an
- *	error message is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    Blt_Pixel *sp, pixel;
-    int x, y;
-
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if ((x < 0) || (x >= Blt_PictureWidth(imgPtr->picture))) {
-	Tcl_AppendResult(interp, "x-coordinate \"", Tcl_GetString(objv[2]),
-		"\" is out of range", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((y < 0) || (y >= Blt_PictureHeight(imgPtr->picture))) {
-	Tcl_AppendResult(interp, "y-coordinate \"", Tcl_GetString(objv[3]),
-		"\" is out of range", (char *)NULL);
-	return TCL_ERROR;
-    }
-    sp = Blt_PicturePixel(imgPtr->picture, x, y);
-    pixel = *sp;
-    if ((Blt_PictureFlags(imgPtr->picture) & BLT_PIC_ASSOCIATED_COLORS) &&
-	((sp->Alpha != 0xFF) && (sp->Alpha != 0x00))) {
-	int bias = sp->Alpha >> 1;
-
-	pixel.Red   = (mul255(sp->Red)   + bias) / sp->Alpha;
-	pixel.Green = (mul255(sp->Green) + bias) / sp->Alpha;
-	pixel.Blue  = (mul255(sp->Blue)  + bias) / sp->Alpha;
-    }
-    {
-	char string[11];
-
-	sprintf_s(string, 11, "0x%02x%02x%02x%02x", pixel.Alpha, pixel.Red, 
-		 pixel.Green, pixel.Blue);
-	Tcl_SetObjResult(interp, Tcl_NewStringObj(string, 10));
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GradientOp --
- *
- *	Flips the picture either horizontally or vertically.
- *
- * Results:
- *	Returns a standard TCL return value.  If TCL_OK, the components of the
- *	pixel are returned as a list in the interpreter result.  Otherwise an
- *	error message is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GradientOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    GradientSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    colorSwitch.clientData = imgPtr;
-    switches.fg.u32 = 0xFFFFFFFF;
-    switches.bg.u32 = 0xFF000000;
-    switches.gradient.shape = BLT_GRADIENT_SHAPE_LINEAR;
-    switches.gradient.path = BLT_GRADIENT_PATH_X; 
-    switches.gradient.logScale = TRUE;
-    switches.gradient.jitter = FALSE;
-   if (Blt_ParseSwitches(interp, gradientSwitches, objc - 2, objv + 2, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    Blt_GradientPicture(imgPtr->picture, &switches.fg, &switches.bg, 
-	&switches.gradient);
-    if ((switches.bg.Alpha != 0xFF) || (switches.fg.Alpha != 0xFF)) {
-	imgPtr->picture->flags |= BLT_PIC_BLEND;
-    }
-    Blt_AssociateColors(imgPtr->picture);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GreyscaleOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-GreyscaleOp(
-    ClientData clientData,	/* Information about picture cmd. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, dest;
-    PictImage *imgPtr = clientData;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    dest = Blt_GreyscalePicture(src);
-    ReplacePicture(imgPtr, dest);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HeightOp --
- *	Returns the current height of the picture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HeightOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument vector. */
-{
-    PictImage *imgPtr = clientData;
-    int h;
-
-    h = 0;
-    if (objc == 3) {
-	int w;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &h) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	w = Blt_PictureWidth(imgPtr->picture);
-	Blt_AdjustPicture(imgPtr->picture, w, h);
-	Blt_NotifyImageChanged(imgPtr);
-    } 
-    if (imgPtr->picture != NULL) {
-	h = Blt_PictureHeight(imgPtr->picture);
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), h);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImportOp --
- *
- *	Imports an image source into a picture.  The image source can be a file,
- *	base64 string, or binary Tcl_Obj.  This performs basically the same
- *	function as "configure".  Any extra functionality this command has is
- *	based upon the ability to pass extra flags to the various converters,
- *	something that can't be done really be done with
- *
- *		$image configure -file file.jpg
- *
- * Results:
- *	Returns a standard TCL return value.  If no error, the interpreter
- *	result will contain the number of images successfully read.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ImportOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Blt_Chain chain;
-    Blt_HashEntry *hPtr;
-    PictFormat *fmtPtr;
-    PictImage *imgPtr = clientData;
-    const char *fileName;
-    const char *fmt;
-
-    if (objc == 2) {
-	PictFormat *fp, *fend;
-	
-	for (fp = pictFormats, fend = fp + NUMFMTS; fp < fend; fp++) {
-	    if ((fp->flags & BLT_PIC_FMT_LOADED) == 0) {
-		continue;
-	    }
-	    if (fp->importProc == NULL) {
-		continue;
-	    }
-	    Tcl_AppendElement(interp, fp->name);
-	}
-	return TCL_OK;
-    }
-    fmt = Tcl_GetString(objv[2]);
-    hPtr = Blt_FindHashEntry(&fmtTable, fmt);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown picture format \"", fmt, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if ((fmtPtr->flags & BLT_PIC_FMT_LOADED) == 0) {
-	LoadFormat(interp, fmt);
-    }
-    if (fmtPtr->importProc == NULL) {
-	Tcl_AppendResult(interp, "no import procedure registered for \"", 
-		fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    chain = (*fmtPtr->importProc)(interp, objc, objv, &fileName);
-    if (chain == NULL) {
-	return TCL_ERROR;
-    }
-    FreePictures(imgPtr->chain);
-    imgPtr->chain = chain;
-    imgPtr->index = 0;
-    imgPtr->picture = Blt_Chain_FirstValue(chain);
-
-    /* 
-     * Save the format type and file name in the image record.  The file name
-     * is used when querying image options -file or -data via configure.  The
-     * type is used by the "-data" operation to establish a default format to
-     * output.
-     */
-    imgPtr->fmtPtr = fmtPtr;
-    imgPtr->flags &= ~IMPORTED_MASK;
-    if (imgPtr->name != NULL) {
-	Blt_Free(imgPtr->name);
-    }
-    if (fileName == NULL) {
-	imgPtr->name = NULL;
-	imgPtr->flags |= IMPORTED_DATA;
-    } else {
-	imgPtr->name = Blt_AssertStrdup(fileName);
-	imgPtr->flags |= IMPORTED_FILE;
-    }
-    Blt_NotifyImageChanged(imgPtr);
-
-    /* Return the number of separates images read. */
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), Blt_Chain_GetLength(imgPtr->chain));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InfoOp --
- *
- *	Reports the basic information about a picture.  
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-InfoOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)		/* Not used. */
-{
-    PictImage *imgPtr = clientData;
-    int nColors;
-    const char *string;
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    nColors = Blt_QueryColors(imgPtr->picture, (Blt_HashTable *)NULL);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-
-    objPtr = Tcl_NewStringObj("colors", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(nColors);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("type", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    string = Blt_PictureIsColor(imgPtr->picture) ? "color" : "greyscale";
-    objPtr = Tcl_NewStringObj(string, -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("opacity", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    if (Blt_PictureIsBlended(imgPtr->picture)) {
-	string = "blended";
-    } else if (Blt_PictureIsMasked(imgPtr->picture)) {
-	string = "masked";
-    } else {
-	string = "full";
-    }
-    objPtr = Tcl_NewStringObj(string, -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("width", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(Blt_PictureWidth(imgPtr->picture));
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    
-    objPtr = Tcl_NewStringObj("height", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(Blt_PictureHeight(imgPtr->picture));
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("count", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(Blt_Chain_GetLength(imgPtr->chain));
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("index", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewIntObj(imgPtr->index);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    objPtr = Tcl_NewStringObj("read-format", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    objPtr = Tcl_NewStringObj((imgPtr->fmtPtr != NULL) ? 
-	imgPtr->fmtPtr->name : "???", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MultiplyOp --
- *
- *	$image multiply scalar
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-MultiplyOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    double scalar;
-
-    if (Tcl_GetDoubleFromObj(interp, objv[2], &scalar) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_MultiplyPixels(imgPtr->picture, (float)scalar);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceAnimateOp --
- *
- *	$im sequence animate $delay
- *	$im sequence animate stop
- *	$im sequence animate start
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceAnimateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    const char *string;
-    int interval;
-    
-    string = Tcl_GetString(objv[2]);
-    if (strcmp(string, "stop") == 0) {
-	if (imgPtr->timerToken != 0) {
-	    Tcl_DeleteTimerHandler(imgPtr->timerToken);
-	    imgPtr->timerToken = 0;
-	}
-    } else if (strcmp(string, "start") == 0) {
-	if (imgPtr->timerToken == 0) {
-	    int delay;
-
-	    delay = Blt_PictureDelay(imgPtr->picture);
-	    imgPtr->timerToken = 
-		Tcl_CreateTimerHandler(delay, TimerProc, imgPtr);
-	}	
-    } else if (Tcl_GetIntFromObj(interp, objv[2], &interval) == TCL_OK) {
-	imgPtr->interval = interval;
-	if (imgPtr->timerToken != 0) {
-	    Tcl_DeleteTimerHandler(imgPtr->timerToken);
-	}
-	imgPtr->timerToken = Tcl_CreateTimerHandler(imgPtr->interval, 
-		TimerProc, imgPtr);
-    } else {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceAppendOp --
- *
- *	$im sequence append $img...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceAppendOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Blt_Picture src, dest;
-
-	if (Blt_GetPictureFromObj(interp, objv[i], &src) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	dest = Blt_ClonePicture(src);
-	Blt_Chain_Append(imgPtr->chain, dest);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceDeleteOp --
- *
- *	$im sequence delete index
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link, next;
-    PictImage *imgPtr = clientData;
-    int i;
-    int index;
-
-    for (i = 3; i < objc; i++) {
-	if (Tcl_GetIntFromObj(interp, objv[i], &index) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((index < 0) || (index >= Blt_Chain_GetLength(imgPtr->chain))) {
-	    Tcl_AppendResult(interp, "invalid image index \"", 
-			     Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    for (i = 3; i < objc; i++) {
-	if (Tcl_GetIntFromObj(interp, objv[i], &index) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	imgPtr->picture = Blt_GetNthPicture(imgPtr->chain, index);
-	Blt_FreePicture(imgPtr->picture);
-	imgPtr->picture = NULL;
-    }
-    for (link = Blt_Chain_FirstLink(imgPtr->chain); link != NULL; 
-	 link = next) {
-	next = Blt_Chain_NextLink(link);
-	if (Blt_Chain_GetValue(link) == NULL) {
-	    Blt_Chain_DeleteLink(imgPtr->chain, link);
-	}
-    }
-    imgPtr->index = 0;
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceLengthOp --
- *
- *	$im sequence length
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceLengthOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    int count;
-
-    count = Blt_Chain_GetLength(imgPtr->chain);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), count);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceNextOp --
- *
- *	$im sequence next
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceNextOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    
-    NextImage(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequencePreviousOp --
- *
- *	$im sequence previous
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequencePreviousOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    
-    Blt_Picture picture;
-
-    imgPtr->index--;
-    if (imgPtr->index < 0) {
-	imgPtr->index = Blt_Chain_GetLength(imgPtr->chain) - 1;
-    }
-    if (imgPtr->index < 0) {
-	imgPtr->index = 0;
-    }
-    picture = PictureFromPictImage(imgPtr);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceSetOp --
- *
- *	$im sequence set index 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceSetOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    PictImage *imgPtr = clientData;
-    int index;
-
-    if (Tcl_GetIntFromObj(interp, objv[3], &index) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((index < 0) || (index >= Blt_Chain_GetLength(imgPtr->chain))) {
-	Tcl_AppendResult(interp, "invalid image index \"", 
-		Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    imgPtr->picture = Blt_GetNthPicture(imgPtr->chain, index);
-    imgPtr->index = index;
-    return TCL_OK;
-}
-
-static Blt_OpSpec sequenceOps[] =
-{
-    {"animate",   2, SequenceAnimateOp,   3, 3, "oper",},
-    {"append",    2, SequenceAppendOp,    3, 0, "?image...?",},
-    {"delete",    1, SequenceDeleteOp,    3, 0, "index ?index...?",},
-    {"length",    1, SequenceLengthOp,    3, 3, "",},
-    {"next",      1, SequenceNextOp,      3, 3, "",},
-    {"previous",  1, SequencePreviousOp,  3, 3, "",},
-    {"set",       1, SequenceSetOp,       4, 4, "index",},
-};
-
-static int nSequenceOps = sizeof(sequenceOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * SequenceOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SequenceOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    PictCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nSequenceOps, sequenceOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PutOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PutOp(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuantizeOp --
- *
- *	$dest quantize $src 256
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-QuantizeOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, dest;
-    PictImage *imgPtr = clientData;
-    int nColors;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &nColors) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    dest = Blt_QuantizePicture(src, nColors);
-    if (dest == NULL) {
-	return TCL_ERROR;
-    }
-    ReplacePicture(imgPtr, dest);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResampleOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-ResampleOp(
-    ClientData clientData,	/* Information about picture cmd. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, tmp;
-    Blt_ResampleFilter hFilter, vFilter;
-    PictImage *imgPtr = clientData;
-    ResampleSwitches switches;
-    int destWidth, destHeight;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switches.region.x = switches.region.y = 0;
-    switches.region.w = Blt_PictureWidth(src);
-    switches.region.h = Blt_PictureHeight(src);
-    switches.width    = Blt_PictureWidth(imgPtr->picture);
-    switches.height   = Blt_PictureHeight(imgPtr->picture);
-    switches.filter = NULL;
-    if (Blt_ParseSwitches(interp, resampleSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (!Blt_AdjustRegionToPicture(src, &switches.region)) {
-	Tcl_AppendResult(interp, "impossible coordinates for region", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Blt_PictureWidth(imgPtr->picture) != switches.width) ||
-	(Blt_PictureHeight(imgPtr->picture) != switches.height)) {
-	Blt_AdjustPicture(imgPtr->picture, switches.width, switches.height);
-    }
-    destWidth = Blt_PictureWidth(imgPtr->picture);
-    destHeight = Blt_PictureHeight(imgPtr->picture);
-    if (switches.filter == NULL) {
-	if (switches.region.w < destWidth) {
-	    hFilter = bltMitchellFilter;
-	} else {
-	    hFilter = bltBoxFilter;
-	}
-	if (switches.region.h < destHeight) {
-	    vFilter = bltMitchellFilter;
-	} else {
-	    vFilter = bltBoxFilter;
-	}
-    } else {
-	hFilter = vFilter = switches.filter;
-    }
-    tmp = Blt_CreatePicture(switches.region.w, switches.region.h);
-    Blt_CopyPictureBits(tmp, src, switches.region.x, switches.region.y, 
-	switches.region.w, switches.region.h, 0, 0);
-    Blt_ResamplePicture(imgPtr->picture, tmp, vFilter, hFilter);
-    Blt_FreePicture(tmp);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RotateOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-RotateOp(
-    ClientData clientData,	/* Information about picture cmd. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_Picture src, dest;
-    PictImage *imgPtr = clientData;
-    double angle;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetDoubleFromObj(interp, objv[3], &angle) != TCL_OK) {
-	const char *string;
-
-	string = Tcl_GetString(objv[3]);
-	if (Tcl_ExprDouble(interp, string, &angle) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    dest = Blt_RotatePicture(src, angle);
-    ReplacePicture(imgPtr, dest);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Blt_Picture src;
-    PictImage *imgPtr = clientData;
-    Blt_Pixel lower, upper;
-    unsigned char tmp;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetPixelFromObj(interp, objv[3], &lower) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 5) {
-	if (Blt_GetPixelFromObj(interp, objv[4], &upper) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	upper.u32 = lower.u32;
-    }
-    if (lower.Red > upper.Red) {
-	tmp = lower.Red, lower.Red = upper.Red, upper.Red = tmp;
-    }
-    if (lower.Green > upper.Green) {
-	tmp = lower.Green, lower.Green = upper.Green, upper.Green = tmp;
-    }
-    if (lower.Blue > upper.Blue) {
-	tmp = lower.Blue, lower.Blue = upper.Blue, upper.Blue = tmp;
-    }
-    if (lower.Alpha > upper.Alpha) {
-	tmp = lower.Alpha, lower.Alpha = upper.Alpha, upper.Alpha = tmp;
-    }
-    Blt_SelectPixels(imgPtr->picture, src, &lower, &upper);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SharpenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-SharpenOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Not used. */
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)		/* Not used. */
-{
-    PictImage *imgPtr = clientData;
-    
-    Blt_SharpenPicture(imgPtr->picture, imgPtr->picture);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SnapOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *   $pict snap window -region {x y w h} -raise 
- *
- *---------------------------------------------------------------------------
- */
-static int
-SnapOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    Blt_Picture picture;
-    Window window;
-    int w, h;
-    SnapSwitches switches;
-
-    if (Blt_GetWindowFromObj(interp, objv[2], &window) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetWindowRegion(imgPtr->display, window, (int *)NULL, (int *)NULL,
-		&w, &h) != TCL_OK) {
-	Tcl_AppendResult(interp, "can't get dimensions of window \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    switches.region.x = switches.region.y = 0;
-    switches.region.w = w;
-    switches.region.h = h;
-    if (Blt_ParseSwitches(interp, snapSwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if ((switches.region.w + switches.region.x) > w) {
-	switches.region.w = (w - switches.region.x);
-    }
-    if ((switches.region.h + switches.region.y) > h) {
-	switches.region.h = (h - switches.region.y);
-    }
-    if (switches.raise) {
-	XRaiseWindow(imgPtr->display, window);
-    }
-    /* Depth, visual, colormap */
-    picture = Blt_WindowToPicture(imgPtr->display, window, switches.region.x, 
-	switches.region.y, switches.region.w, switches.region.h, imgPtr->gamma);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "can't obtain snapshot of window \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    ReplacePicture(imgPtr, picture);
-    if (imgPtr->name != NULL) {
-	Blt_Free(imgPtr->name);
-    }
-    Blt_NotifyImageChanged(imgPtr);
-    imgPtr->flags &= ~IMPORTED_MASK;
-    Blt_FreeSwitches(snapSwitches, &switches, 0);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TileOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TileOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    PictImage *imgPtr = clientData;
-    Blt_Picture src;
-    TileSwitches switches;
-
-    if (Blt_GetPictureFromObj(interp, objv[2], &src) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switches.xOrigin = switches.yOrigin = 0;
-    switches.region.x = switches.region.y = 0;
-    switches.region.w = Blt_PictureWidth(imgPtr->picture);
-    switches.region.h = Blt_PictureHeight(imgPtr->picture);
-
-    if (Blt_ParseSwitches(interp, tileSwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (!Blt_AdjustRegionToPicture(imgPtr->picture, &switches.region)) {
-	Tcl_AppendResult(interp, "impossible coordinates for region", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    Blt_TilePicture(imgPtr->picture, src, switches.xOrigin, switches.yOrigin, 
-            switches.region.x, switches.region.y, switches.region.w,
-	    switches.region.h);
-    Blt_NotifyImageChanged(imgPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidthOp --
- *	Returns the current width of the picture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-WidthOp(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Argument vector. */
-{
-    PictImage *imgPtr = clientData;
-    int w;
-
-    if (objc == 3) {
-	int h;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &w) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (w < 0) {
-	    Tcl_AppendResult(interp, "bad width \"", Tcl_GetString(objv[2]), 
-			     "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	h = Blt_PictureHeight(imgPtr->picture);
-	Blt_AdjustPicture(imgPtr->picture, w, h);
-	Blt_NotifyImageChanged(imgPtr);
-    } 
-    w = Blt_PictureWidth(imgPtr->picture);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), w);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Picture instance sub-command specification:
- *
- *	- Name of the sub-command.
- *	- Minimum number of characters needed to unambiguously
- *        recognize the sub-command.
- *	- Pointer to the function to be called for the sub-command.
- *	- Minimum number of arguments accepted.
- *	- Maximum number of arguments accepted.
- *	- String to be displayed for usage (arguments only).
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec pictInstOps[] =
-{
-    {"add",       2, ArithOp,     3, 0, "image|color",},
-    {"and",       3, ArithOp,     3, 0, "image|color",},
-    {"blank",     3, BlankOp,     2, 3, "?color?",},
-    {"blend",     3, BlendOp,     4, 0, "bg fg ?switches?",},
-    {"blend2",    3, Blend2Op,    4, 0, "bg fg ?switches?",},
-    {"blur",      3, BlurOp,      4, 4, "src width",},
-    {"cget",      2, CgetOp,      3, 3, "option",},
-    {"configure", 4, ConfigureOp, 2, 0, "?option value?...",},
-    {"convolve",  4, ConvolveOp,  3, 0, "src ?switches?",},
-    {"copy",      3, CopyOp,      3, 0, "srcPict ?switches?",},
-    {"crop",      3, CropOp,      2, 0, "?switches?",},
-    {"draw",      2, DrawOp,	  2, 0, "?args?",},
-    {"dup",       2, DupOp,       2, 0, "?switches?",},
-    {"export",    1, ExportOp,    2, 0, "format ?switches?...",},
-    {"fade",      2, FadeOp,      4, 4, "src factor",},
-    {"flip",      2, FlipOp,      3, 0, "x|y",},
-    {"get",       2, GetOp,       4, 4, "x y",},
-    {"gradient",  3, GradientOp,  2, 0, "?switches?",},
-    {"greyscale", 3, GreyscaleOp, 3, 3, "src",},
-    {"height",    1, HeightOp,    2, 3, "?newHeight?",},
-    {"import",    2, ImportOp,    2, 0, "format ?switches?...",},
-    {"info",      2, InfoOp,      2, 2, "info",},
-    {"max",	  2, ArithOp,     3, 0, "image|color",},
-    {"min",	  2, ArithOp,     3, 0, "image|color",},
-    {"multiply",  2, MultiplyOp,  3, 3, "float",},
-    {"nand",      2, ArithOp,     3, 0, "image|color",},
-    {"nor",       2, ArithOp,     3, 0, "image|color",},
-    {"or",        1, ArithOp,     3, 0, "image|color ?switches?",},
-    {"put",       1, PutOp,       2, 0, "color ?window?...",},
-    {"quantize",  1, QuantizeOp,  4, 4, "src numColors",},
-    {"resample",  2, ResampleOp,  3, 0, "src ?switches?",},
-    {"rotate",    2, RotateOp,    4, 4, "src angle",},
-    {"select",    3, SelectOp,    4, 5, "src color ?color?",},
-    {"sequence",  3, SequenceOp,  2, 0, "args...",},
-    {"sharpen",   2, SharpenOp,   2, 0, "",},
-    {"snap",      2, SnapOp,      3, 0, "window ?switches?",},
-    {"subtract",  2, ArithOp,     3, 0, "image|color",},
-    {"tile",      2, TileOp,      3, 0, "image ?switches?",},
-    {"width",     1, WidthOp,     2, 3, "?newWidth?",},
-    {"xor",       1, ArithOp,     3, 0, "image|color ?switches?",},
-};
-
-static int nPictInstOps = sizeof(pictInstOps) / sizeof(Blt_OpSpec);
-
-static int
-PictureInstCmdProc(
-    ClientData clientData,		/* Information about picture cmd. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument objects. */
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPictInstOps, pictInstOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureInstCmdDeleteProc --
- *
- *	This procedure is invoked when a picture command is deleted.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PictureInstCmdDeletedProc(ClientData clientData) /* Pointer to record. */
-{
-    PictImage *imgPtr = clientData;
-
-    imgPtr->cmdToken = NULL;
-    if (imgPtr->imgToken != NULL) {
-	Tk_DeleteImage(imgPtr->interp, Tk_NameOfImage(imgPtr->imgToken));
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureLoadOp --
- *
- *	Loads the dynamic library representing the converters for the named
- *	format.  Designed to be called by "package require", not directly by the
- *	user.
- *	
- * Results:
- *	A standard TCL result.  Return TCL_OK is the converter was successfully
- *	loaded, TCL_ERROR otherwise.
- *
- * blt::datatable load fmt libpath lib
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PictureLoadOp(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Tcl_DString lib;
-    char *fmt;
-    char *safeProcName, *initProcName;
-    int result;
-    int length;
-
-    fmt = Tcl_GetStringFromObj(objv[2], &length);
-    hPtr = Blt_FindHashEntry(&fmtTable, fmt);
-    if (hPtr != NULL) {
-	PictFormat *fmtPtr;
-
-	fmtPtr = Blt_GetHashValue(hPtr);
-	if (fmtPtr->flags & BLT_PIC_FMT_LOADED) {
-	    return TCL_OK;		/* Converter is already loaded. */
-	}
-    }
-    Tcl_DStringInit(&lib);
-    {
-	Tcl_DString ds;
-	const char *pathName;
-
-	Tcl_DStringInit(&ds);
-	pathName = Tcl_TranslateFileName(interp, Tcl_GetString(objv[3]), &ds);
-	if (pathName == NULL) {
-	    Tcl_DStringFree(&ds);
-	    return TCL_ERROR;
-	}
-	Tcl_DStringAppend(&lib, pathName, -1);
-	Tcl_DStringFree(&ds);
-    }
-    Tcl_DStringAppend(&lib, "/", -1);
-    Tcl_UtfToTitle(fmt);
-    Tcl_DStringAppend(&lib, "Picture", 7);
-    Tcl_DStringAppend(&lib, fmt, -1);
-    Tcl_DStringAppend(&lib, Blt_Itoa(BLT_MAJOR_VERSION), 1);
-    Tcl_DStringAppend(&lib, Blt_Itoa(BLT_MINOR_VERSION), 1);
-    Tcl_DStringAppend(&lib, BLT_LIB_SUFFIX, -1);
-    Tcl_DStringAppend(&lib, BLT_SO_EXT, -1);
-
-    initProcName = Blt_AssertMalloc(11 + length + 4 + 1);
-    sprintf_s(initProcName, 11 + length + 4 + 1, "Blt_Picture%sInit", fmt);
-    safeProcName = Blt_AssertMalloc(11 + length + 8 + 1);
-    sprintf_s(safeProcName, 11 + length + 8 + 1, "Blt_Picture%sSafeInit", fmt);
-
-    result = Blt_LoadLibrary(interp, Tcl_DStringValue(&lib), initProcName, 
-	safeProcName); 
-    Tcl_DStringFree(&lib);
-    if (safeProcName != NULL) {
-	Blt_Free(safeProcName);
-    }
-    if (initProcName != NULL) {
-	Blt_Free(initProcName);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Picture instance sub-command specification:
- *
- *	- Name of the sub-command.
- *	- Minimum number of characters needed to unambiguously
- *        recognize the sub-command.
- *	- Pointer to the function to be called for the sub-command.
- *	- Minimum number of arguments accepted.
- *	- Maximum number of arguments accepted.
- *	- String to be displayed for usage (arguments only).
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec pictureOps[] =
-{
-    {"load",      1, PictureLoadOp, 4, 0, "fmt lib",},
-#ifdef notdef
-    {"blur",      1, BlurOp,        4, 0, "src dest ?switches?",},
-    {"brighten"   1, BrightenOp,    4, 0, "src dest ?switches?",},
-    {"darken"     1, BrightenOp,    4, 0, "src dest ?switches?",},
-    {"medianf"    1, MedianOp,      4, 0, "src dest ?switches?",},
-    {"translate", 1, TranslateOp,   4, 0, "src dest ?switches?",},
-#endif
-};
-static int nPictureOps = sizeof(pictureOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureImageCmdProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int 
-PictureImageCmdProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    int objc,				/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nPictureOps, pictureOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc)(clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PictureCmdInitProc --
- *
- *	This procedure is invoked to initialize the "tree" command.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new command and adds a new entry into a global Tcl
- *	associative array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_PictureCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { 
-	"picture", PictureImageCmdProc, 
-    };
-    /* cmdSpec.clientData = GetPictureCmdInterpData(interp); */
-    if (Blt_InitCmd(interp, "::blt", &cmdSpec) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static Tk_ImageType pictureImageType = {
-    (char *)"picture",		
-    CreatePictureImage,
-    GetPictInstance,		
-    DisplayPictureImage,	
-    FreePictInstance,	
-    DeletePictureImage,	
-    PictureImageToPostScript,	
-    (Tk_ImageType *)NULL		/* nextPtr */
-};
-
-int
-Blt_IsPicture(Tk_Image tkImage)
-{
-    const char *type;
-
-    type = Blt_Image_NameOfType(tkImage);
-    return (strcmp(type, pictureImageType.name) == 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RegisterPictureImageType --
- *
- *	Registers the "picture" image type with Tk.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RegisterPictureImageType(Tcl_Interp *interp) 
-{
-    PictFormat *fp, *fend;
-
-    Tk_CreateImageType(&pictureImageType);
-
-    Blt_CpuFeatures(interp, NULL);
-
-    Blt_InitHashTable(&fmtTable, BLT_STRING_KEYS);
-    for (fp = pictFormats, fend = fp + NUMFMTS; fp < fend; fp++) {
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	hPtr = Blt_CreateHashEntry(&fmtTable, fp->name, &isNew);
-	Blt_SetHashValue(hPtr, fp);
-    }
-}
-
-int
-Blt_PictureRegisterFormat(
-    Tcl_Interp *interp, 			  
-    const char *fmt,
-    Blt_PictureIsFmtProc  *isProc,
-    Blt_PictureReadDataProc *readProc,
-    Blt_PictureWriteDataProc *writeProc,
-    Blt_PictureImportProc *importProc,
-    Blt_PictureExportProc *exportProc)
-{
-    PictFormat *fmtPtr;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&fmtTable, fmt);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown format \"", fmt, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    fmtPtr->flags = BLT_PIC_FMT_LOADED;
-    fmtPtr->isFmtProc = isProc;
-    fmtPtr->readProc = readProc;
-    fmtPtr->writeProc = writeProc;
-    fmtPtr->importProc = importProc;
-    fmtPtr->exportProc = exportProc;
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltPictDraw.c b/blt3.0/src/bltPictDraw.c
deleted file mode 100644
index c37303a..0000000
--- a/blt3.0/src/bltPictDraw.c
+++ /dev/null
@@ -1,3304 +0,0 @@
-
-/*
- * bltPictDraw.c --
- *
- * This module implements image drawing primitives (line, circle, rectangle,
- * text, etc.) for picture images in the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltHash.h"
-#include "bltSwitch.h"
-#include "bltPicture.h"
-#include "bltPictInt.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include "bltFont.h"
-#include "bltText.h"
-#include <string.h>
-
-#define imul8x8(a,b,t)	((t) = (a)*(b)+128,(((t)+((t)>>8))>>8))
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-
-typedef struct {
-    unsigned int alpha;
-    unsigned int offset;
-} Shadow;
-
-#ifdef HAVE_FT2BUILD_H
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#ifdef HAVE_LIBXFT
-#include <X11/Xft/Xft.h>
-#endif /* HAVE_LIBXFT */
-
-
-typedef struct {
-    FT_Face face;
-    FT_Matrix matrix;
-    FT_Library lib;
-    XftFont *xftFont;
-    int fontSize;
-    float angle;
-    int height;
-    int ascent, descent;
-} FtFont;    
-#endif /*HAVE_FT2BUILD_H*/
-
-static Blt_SwitchParseProc ArraySwitchProc;
-static Blt_SwitchFreeProc ArrayFreeProc;
-static Blt_SwitchCustom arraySwitch = {
-    ArraySwitchProc, ArrayFreeProc, (ClientData)0,
-};
-
-static Blt_SwitchParseProc AnchorSwitch;
-static Blt_SwitchCustom anchorSwitch = {
-    AnchorSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc AlphaSwitch;
-static Blt_SwitchCustom alphaSwitch = {
-    AlphaSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc ShadowSwitch;
-static Blt_SwitchCustom shadowSwitch = {
-    ShadowSwitch, NULL, (ClientData)0,
-};
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-typedef struct {
-    int alpha;			/* Overrides alpha value of color. */
-    Blt_Pixel outline, fill;	/* Outline and fill colors for the circle. */
-    Shadow shadow;
-    int antialiased;
-    int lineWidth;		/* Width of outline.  If zero, indicates to
-				 * draw a solid circle. */
-} CircleSwitches;
-
-static Blt_SwitchSpec circleSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-alpha", "value",
-	Blt_Offset(CircleSwitches, alpha), 0, 0, &alphaSwitch},
-    {BLT_SWITCH_CUSTOM, "-fill", "fill",
-	Blt_Offset(CircleSwitches, fill),    0, 0, &colorSwitch},
-    {BLT_SWITCH_BOOLEAN, "-antialiased", "bool",
-	Blt_Offset(CircleSwitches, antialiased), 0},
-    {BLT_SWITCH_INT_NNEG, "-linewidth", "value",
-	Blt_Offset(CircleSwitches, lineWidth), 0},
-    {BLT_SWITCH_CUSTOM, "-outline", "outline",
-	Blt_Offset(CircleSwitches, outline),    0, 0, &colorSwitch},
-    {BLT_SWITCH_CUSTOM, "-shadow", "offset",
-        Blt_Offset(CircleSwitches, shadow), 0, 0, &shadowSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int alpha;			/* Overrides alpha value of color. */
-    Blt_Pixel bg;		/* Color of line. */
-    int lineWidth;		/* Width of outline. */
-    Array x, y;
-    Array coords;
-} LineSwitches;
-
-typedef struct {
-    int alpha;			/* Overrides alpha value of color. */
-    Blt_Pixel bg;		/* Fill color of polygon. */
-    int antialiased;
-    Shadow shadow;
-    int lineWidth;		/* Width of outline. Default is 1, If zero,
-				 * indicates to draw a solid polygon. */
-    Array coords;
-    Array x, y;
-
-} PolygonSwitches;
-
-static Blt_SwitchSpec polygonSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-alpha", "int",
-	Blt_Offset(PolygonSwitches, alpha), 0, 0, &alphaSwitch},
-    {BLT_SWITCH_BOOLEAN, "-antialiased", "bool",
-	Blt_Offset(PolygonSwitches, antialiased), 0},
-    {BLT_SWITCH_CUSTOM, "-color", "color",
-	Blt_Offset(PolygonSwitches, bg),    0, 0, &colorSwitch},
-    {BLT_SWITCH_CUSTOM, "-coords", "{x0 y0 x1 y1 ... xn yn}",
-	Blt_Offset(PolygonSwitches, coords), 0, 0, &arraySwitch},
-    {BLT_SWITCH_CUSTOM, "-x", "{x0 x1 ... xn}",
-	Blt_Offset(PolygonSwitches, x), 0, 0, &arraySwitch},
-    {BLT_SWITCH_CUSTOM, "-y", "{x0 x1 ... xn}",
-	Blt_Offset(PolygonSwitches, y), 0, 0, &arraySwitch},
-    {BLT_SWITCH_CUSTOM, "-shadow", "offset",
-        Blt_Offset(PolygonSwitches, shadow), 0, 0, &shadowSwitch},
-    {BLT_SWITCH_INT_POS, "-linewidth", "int",
-	Blt_Offset(PolygonSwitches, lineWidth), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec lineSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-alpha", "int",
-	Blt_Offset(LineSwitches, alpha), 0, 0, &alphaSwitch},
-    {BLT_SWITCH_CUSTOM, "-color", "color",
-	Blt_Offset(LineSwitches, bg),    0, 0, &colorSwitch},
-    {BLT_SWITCH_CUSTOM, "-coords", "{x0 y0 x1 y1 ... xn yn}",
-	Blt_Offset(LineSwitches, coords), 0, 0, &arraySwitch},
-    {BLT_SWITCH_INT_POS, "-linewidth", "int",
-	Blt_Offset(LineSwitches, lineWidth), 0},
-    {BLT_SWITCH_CUSTOM, "-x", "{x0 x1 ... xn}",
-	Blt_Offset(LineSwitches, x), 0, 0, &arraySwitch},
-    {BLT_SWITCH_CUSTOM, "-y", "{x0 x1 ... xn}",
-	Blt_Offset(LineSwitches, y), 0, 0, &arraySwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int alpha;			/* Overrides alpha value of color. */
-    Blt_Pixel bg;		/* Color of rectangle. */
-    Shadow shadow;
-    int lineWidth;		/* Width of outline. If zero, indicates to
-				 * draw a solid rectangle. */
-    int radius;			/* Radius of rounded corner. */
-    int antialiased;
-} RectangleSwitches;
-
-static Blt_SwitchSpec rectangleSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-alpha", "int", 
-	Blt_Offset(RectangleSwitches, alpha), 0, 0, &alphaSwitch},
-    {BLT_SWITCH_CUSTOM, "-color", "color",
-	Blt_Offset(RectangleSwitches, bg),    0, 0, &colorSwitch},
-    {BLT_SWITCH_BOOLEAN, "-antialiased", "bool",
-	Blt_Offset(RectangleSwitches, antialiased), 0},
-    {BLT_SWITCH_INT_NNEG, "-radius", "number",
-	Blt_Offset(RectangleSwitches, radius), 0},
-    {BLT_SWITCH_CUSTOM, "-shadow", "offset",
-        Blt_Offset(RectangleSwitches, shadow), 0, 0, &shadowSwitch},
-    {BLT_SWITCH_INT_NNEG, "-linewidth", "number",
-	Blt_Offset(RectangleSwitches, lineWidth), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int alpha;			/* Overrides alpha value of color. */
-    int kerning;
-    Blt_Pixel color;		/* Color of text. */
-    Shadow shadow;
-    int fontSize;
-    Tcl_Obj *fontObjPtr;
-    int justify;
-    Tk_Anchor anchor;
-    float angle;
-} TextSwitches;
-
-static Blt_SwitchSpec textSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-alpha",    "int",
-	Blt_Offset(TextSwitches, alpha),  0, 0, &alphaSwitch},
-    {BLT_SWITCH_CUSTOM,  "-anchor",   "anchor",
-	Blt_Offset(TextSwitches, anchor), 0, 0, &anchorSwitch},
-    {BLT_SWITCH_CUSTOM,  "-color",    "colorName",
-	Blt_Offset(TextSwitches, color),  0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ,     "-font",     "fontName",
-	Blt_Offset(TextSwitches, fontObjPtr), 0},
-    {BLT_SWITCH_BOOLEAN, "-kerning",  "bool",
-	Blt_Offset(TextSwitches, kerning),  0},
-    {BLT_SWITCH_FLOAT,  "-rotate",   "angle",
-	Blt_Offset(TextSwitches, angle), 0},
-    {BLT_SWITCH_INT,     "-size",     "number",
-	Blt_Offset(TextSwitches, fontSize),  0}, 
-    {BLT_SWITCH_CUSTOM, "-shadow", "offset",
-        Blt_Offset(TextSwitches, shadow), 0, 0, &shadowSwitch},
-    {BLT_SWITCH_END}
-};
-
-static Pict *
-BgPicture(Pict *srcPtr, int sx, int sy, int w, int h)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    size_t nBytes;
-    int y;
-
-    w = MIN(w, srcPtr->width - sx);
-    h = MIN(h, srcPtr->height - sy);
-    destPtr = Blt_CreatePicture(w*4, h*4);
-    srcRowPtr = srcPtr->bits + (sy * srcPtr->width) + sx;
-    destRowPtr = destPtr->bits;
-    nBytes = sizeof(Blt_Pixel) * destPtr->pixelsPerRow;
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *dp, *sp, *send;
-	Blt_Pixel *nextRowPtr;
-
-	for (dp = destRowPtr, sp = srcRowPtr, send = sp + w; sp < send; sp++) {
-	    Blt_Pixel p;
-
-	    p.u32 = sp->u32;
-	    dp[0].u32 = dp[1].u32 = dp[2].u32 = dp[3].u32 = p.u32;
-	    dp += 4;
-	}
-
-	nextRowPtr = destRowPtr + destPtr->pixelsPerRow;
-	memcpy(nextRowPtr, destRowPtr, nBytes);
-	nextRowPtr += destPtr->pixelsPerRow;
-	memcpy(nextRowPtr, destRowPtr, nBytes);
-	nextRowPtr += destPtr->pixelsPerRow;
-	memcpy(nextRowPtr, destRowPtr, nBytes);
-	nextRowPtr += destPtr->pixelsPerRow;
-	destRowPtr = nextRowPtr;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    return destPtr;
-}
-
-static void
-MarkPicture(Pict *srcPtr)
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    if (sp->Alpha != 0x0) {
-		sp->Alpha = 0xFF;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-#ifdef HAVE_FT2BUILD_H
-static void
-MeasureText(FtFont *fontPtr, const char *string, size_t length,
-	    size_t *widthPtr, size_t *heightPtr);
-
-static size_t GetTextWidth(FtFont *fontPtr, const char *string, size_t length, 
-	int kerning);
-#endif /*HAVE_FT2BUILD_H*/
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrayFreeProc --
- *
- *	Free the storage associated with the -table switch.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-ArrayFreeProc(char *record, int offset, int flags)
-{
-    Array *arrayPtr = (Array *)(record + offset);
-
-    if (arrayPtr->values != NULL) {
-	Blt_Free(arrayPtr->values);
-    }
-    arrayPtr->values = NULL;
-    arrayPtr->nValues = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArraySwitchProc --
- *
- *	Convert a Tcl_Obj list of numbers into an array of floats.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ArraySwitchProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Tcl_Obj **objv;
-    Array *arrayPtr = (Array *)(record + offset);
-    float *values;
-    int i;
-    int objc;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    values = Blt_Malloc(sizeof(float) * objc);
-    if (values == NULL) {
-	Tcl_AppendResult(interp, "can't allocated coordinate array of ",
-		Blt_Itoa(objc), " elements", (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	double x;
-
-	if (Tcl_GetDoubleFromObj(interp, objv[i], &x) != TCL_OK) {
-	    Blt_Free(values);
-	    return TCL_ERROR;
-	}
-	values[i] = (float)x;
-    }
-    arrayPtr->values = values;
-    arrayPtr->nValues = objc;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AlphaSwitch --
- *
- *	Convert a Tcl_Obj representing a number for the alpha value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AlphaSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    int *alphaPtr = (int *)(record + offset);
-    int value;
-
-    if (Tcl_GetIntFromObj(interp, objPtr, &value) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((value < 0) || (value > 255)) {
-	Tcl_AppendResult(interp, "bad value \"", Tcl_GetString(objPtr), 
-		"\" for alpha: must be 0..255", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *alphaPtr = value;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AnchorSwitch --
- *
- *	Convert a Tcl_Obj representing an anchor.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-AnchorSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tk_Anchor *anchorPtr = (Tk_Anchor *)(record + offset);
-
-    if (Tk_GetAnchorFromObj(interp, objPtr, anchorPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShadowSwitch --
- *
- *	Convert a Tcl_Obj representing a number for the alpha value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ShadowSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Shadow *shadowPtr = (Shadow *)(record + offset);
-    int value, alpha;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc != 1) && (objc != 2)) {
-	Tcl_AppendResult(interp, "bad shadow list \"", Tcl_GetString(objPtr), 
-		"\": should be \"offset ?alpha?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[0], &value) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((value < 0) || (value > 20)) {
-	Tcl_AppendResult(interp, "bad offset value \"", 
-		Tcl_GetString(objv[0]), "\": must be 0..20", (char *)NULL);
-	return TCL_ERROR;
-    }
-    alpha = 0xA0;
-    if (objc == 2) {
-	if (Tcl_GetIntFromObj(interp, objv[1], &alpha) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((alpha < 0) || (alpha > 255)) {
-	    Tcl_AppendResult(interp, "bad value \"", Tcl_GetString(objv[1]), 
-		"\" for alpha: must be 0..255", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    shadowPtr->offset = (unsigned int)value;
-    shadowPtr->alpha = (unsigned int)alpha;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ColorSwitchProc --
- *
- *	Convert a Tcl_Obj representing a Blt_Pixel color.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_ColorSwitchProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Blt_Pixel *pixelPtr = (Blt_Pixel *)(record + offset);
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	pixelPtr->u32 = 0x00;
-	return TCL_OK;
-    }
-    if (Blt_GetPixelFromObj(interp, objPtr, pixelPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-#ifdef HAVE_FT2BUILD_H
-/*
- *---------------------------------------------------------------------------
- *
- * CreateSimpleTextLayout --
- *
- *	Get the extents of a possibly multiple-lined text string.
- *
- * Results:
- *	Returns via *widthPtr* and *heightPtr* the dimensions of the text
- *	string.
- *
- *---------------------------------------------------------------------------
- */
-static TextLayout *
-CreateSimpleTextLayout(FtFont *fontPtr, const char *text, size_t textLen, 
-		       TextStyle *tsPtr)
-{
-    TextFragment *fp;
-    TextLayout *layoutPtr;
-    size_t count;		/* Count # of characters on each line */
-    int lineHeight;
-    int maxHeight, maxWidth;
-    int nFrags;
-    int width;			/* Running dimensions of the text */
-    const char *p, *endp, *start;
-    int i;
-    size_t size;
-
-    nFrags = 0;
-    endp = text + ((textLen < 0) ? strlen(text) : textLen);
-    for (p = text; p < endp; p++) {
-	if (*p == '\n') {
-	    nFrags++;
-	}
-    }
-    if ((p != text) && (*(p - 1) != '\n')) {
-	nFrags++;
-    }
-    size = sizeof(TextLayout) + (sizeof(TextFragment) * (nFrags - 1));
-
-    layoutPtr = Blt_AssertCalloc(1, size);
-    layoutPtr->nFrags = nFrags;
-
-    nFrags = count = 0;
-    width = maxWidth = 0;
-    maxHeight = tsPtr->padTop;
-    lineHeight = fontPtr->height;
-
-    fp = layoutPtr->fragments;
-    for (p = start = text; p < endp; p++) {
-	if (*p == '\n') {
-	    size_t w;
-
-	    if (count > 0) {
-		w = GetTextWidth(fontPtr, start, count, 1);
-		if (w > maxWidth) {
-		    maxWidth = w;
-		}
-	    } else {
-		w = 0;
-	    }
-	    fp->width = w;
-	    fp->count = count;
-	    fp->sy = fp->y = maxHeight + fontPtr->ascent;
-	    fp->text = start;
-	    maxHeight += lineHeight;
-	    fp++;
-	    nFrags++;
-	    start = p + 1;	/* Start the text on the next line */
-	    count = 0;		/* Reset to indicate the start of a new
-				 * line */
-	    continue;
-	}
-	count++;
-    }
-    if (nFrags < layoutPtr->nFrags) {
-	size_t w;
-
-	w = GetTextWidth(fontPtr, start, count, 1);
-	if (w > maxWidth) {
-	    maxWidth = w;
-	}
-	fp->width = w;
-	fp->count = count;
-	fp->sy = fp->y = maxHeight + fontPtr->ascent;
-	fp->text = start;
-	maxHeight += lineHeight;
-	nFrags++;
-    }
-    maxHeight += tsPtr->padBottom;
-    maxWidth += PADDING(tsPtr->xPad);
-    fp = layoutPtr->fragments;
-    for (i = 0; i < nFrags; i++, fp++) {
-	switch (tsPtr->justify) {
-	default:
-	case TK_JUSTIFY_LEFT:
-	    /* No offset for left justified text strings */
-	    fp->x = fp->sx = tsPtr->padLeft;
-	    break;
-	case TK_JUSTIFY_RIGHT:
-	    fp->x = fp->sx = (maxWidth - fp->width) - tsPtr->padRight;
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    fp->x = fp->sx = (maxWidth - fp->width) / 2;
-	    break;
-	}
-    }
-    if (tsPtr->underline >= 0) {
-	fp = layoutPtr->fragments;
-	for (i = 0; i < nFrags; i++, fp++) {
-	    int first, last;
-
-	    first = fp->text - text;
-	    last = first + fp->count;
-	    if ((tsPtr->underline >= first) && (tsPtr->underline < last)) {
-		layoutPtr->underlinePtr = fp;
-		layoutPtr->underline = tsPtr->underline - first;
-		break;
-	    }
-	}
-    }
-    layoutPtr->width = maxWidth;
-    layoutPtr->height = maxHeight - tsPtr->leader;
-    return layoutPtr;
-}
-#endif
-
-static void INLINE 
-PutPixel(Pict *destPtr, int x, int y, Blt_Pixel *colorPtr)  
-{
-    if ((x >= 0) && (x < destPtr->width) && (y >= 0) && (y < destPtr->height)) {
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x, y);
-	dp->u32 = colorPtr->u32; 
-    }
-}
-
-
-static INLINE Blt_Pixel
-PremultiplyAlpha(Blt_Pixel *colorPtr, unsigned int alpha)
-{
-    Blt_Pixel new;
-    int t;
-
-    new.u32 = colorPtr->u32;
-    alpha = imul8x8(alpha, colorPtr->Alpha, t);
-    if ((alpha != 0xFF) && (alpha != 0x00)) {
-	new.Red = imul8x8(alpha, colorPtr->Red, t);
-	new.Green = imul8x8(alpha, colorPtr->Green, t);
-	new.Blue = imul8x8(alpha, colorPtr->Blue, t);
-    }
-    new.Alpha = alpha;
-    return new;
-}
-
-static void INLINE
-HorizLine(Pict *destPtr, int x1, int x2, int y, Blt_Pixel *colorPtr)  
-{
-    Blt_Pixel *destRowPtr;
-    Blt_Pixel *dp, *dend;
-    size_t length;
-
-    if (x1 > x2) {
-	int tmp;
-
-	tmp = x1, x1 = x2, x2 = tmp;
-    }
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * y) + x1;
-    length = x2 - x1 + 1;
-    for (dp = destRowPtr, dend = dp + length; dp < dend; dp++) {
-	dp->u32 = colorPtr->u32;
-    }
-}
-
-static void INLINE 
-VertLine(Pict *destPtr, int x, int y1, int y2, Blt_Pixel *colorPtr)  
-{
-    Blt_Pixel *dp;
-    int y;
-
-    if (y1 > y2) {
-	int tmp;
-
-	tmp = y1, y1 = y2, y2 = tmp;
-    }
-    dp = destPtr->bits + (destPtr->pixelsPerRow * y1) + x;
-    for (y = y1; y <= y2; y++) {
-	dp->u32 = colorPtr->u32;
-	dp += destPtr->pixelsPerRow;
-    }
-}
-
-static INLINE void
-BlendPixel(Blt_Pixel *bgPtr, Blt_Pixel *colorPtr, unsigned char weight)
-{
-    unsigned char alpha;
-    int t1;
-
-    alpha = imul8x8(colorPtr->Alpha, weight, t1);
-#ifdef notdef
-    fprintf(stderr, "colorAlpha=%d weight=%d, alpha=%d, beta=%d\n",
-	    colorPtr->Alpha, weight, alpha, alpha ^ 0xFF);
-#endif
-    if (alpha == 0xFF) {
-	bgPtr->u32 = colorPtr->u32;
-    } else if (alpha != 0x00) {
-	unsigned char beta;
-	int t2;
-
-	beta = alpha ^ 0xFF;
-	bgPtr->Red   = imul8x8(alpha, colorPtr->Red, t1) + 
-	    imul8x8(beta, bgPtr->Red, t2);
-	bgPtr->Green = imul8x8(alpha, colorPtr->Green, t1) + 
-	    imul8x8(beta, bgPtr->Green, t2);
-	bgPtr->Blue  = imul8x8(alpha, colorPtr->Blue, t1)  + 
-	    imul8x8(beta, bgPtr->Blue, t2);
-	bgPtr->Alpha = alpha + imul8x8(beta, bgPtr->Alpha, t2);
-#ifdef notdef
-	fprintf(stderr, "r=%d, g=%d, b=%d, a=%d, alpha=%d\n",
-	       bgPtr->Red, bgPtr->Green, bgPtr->Blue, bgPtr->Alpha, alpha);
-#endif
-    }
-}
-    
-static void INLINE 
-PutPixel2(Pict *destPtr, int x, int y, Blt_Pixel *colorPtr, 
-	  unsigned char weight)  
-{
-    if ((x >= 0) && (x < destPtr->width) && (y >= 0) && (y < destPtr->height)) {
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x, y);
-	BlendPixel(dp, colorPtr, weight);
-    }
-}
-
-static void 
-PaintLineSegment(
-    Pict *destPtr,
-    int x1, int y1, 
-    int x2, int y2, 
-    int lineWidth,
-    Blt_Pixel *colorPtr)
-{
-    int dx, dy, xDir;
-    unsigned long error;
-    Blt_Pixel edge;
-
-    if (y1 > y2) {
-	int tmp;
-
-	tmp = y1, y1 = y2, y2 = tmp;
-	tmp = x1, x1 = x2, x2 = tmp;
-    }
-    edge = PremultiplyAlpha(colorPtr, 255);
-    /* First and last Pixels always get Set: */
-    PutPixel2(destPtr, x1, y1, colorPtr, 255);
-    PutPixel2(destPtr, x2, y2, colorPtr, 255);
-
-    dx = x2 - x1;
-    dy = y2 - y1;
-
-    if (dx >= 0) {
-	xDir = 1;
-    } else {
-	xDir = -1;
-	dx = -dx;
-    }
-    if (dy == 0) {		/* Horizontal line */
-	HorizLine(destPtr, x1, x2, y1, &edge);
-	return;
-    }
-    if (dx == 0) {		/*  Vertical line */
-	VertLine(destPtr, x1, y1, y2, &edge);
-	return;
-    }
-    if (dx == dy) {		/* Diagonal line. */
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x1, y1);
-	while(dy-- > 0) {
-	    dp += destPtr->pixelsPerRow + xDir;
-	    dp->u32 = colorPtr->u32;
-	}
-	return;
-    }
-
-    /* use Wu Antialiasing: */
-
-    error = 0;
-    if (dy > dx) {		/* y-major line */
-	unsigned long adjust;
-
-	/* x1 -= lineWidth / 2; */
-	adjust = (dx << 16) / dy;
-	while(--dy) {
-	    unsigned int weight;
-	    
-	    error += adjust;
-	    ++y1;
-	    if (error & ~0xFFFF) {
-		x1 += xDir;
-		error &= 0xFFFF;
-	    }
-	    weight = (unsigned char)(error >> 8);
-	    PutPixel2(destPtr, x1, y1, colorPtr, ~weight);
-	    PutPixel2(destPtr, x1 + xDir, y1, colorPtr, weight);
-	}
-    } else {			/* x-major line */
-	unsigned long adjust;
-
-	/* y1 -= lineWidth / 2; */
-	adjust = (dy << 16) / dx;
-	while (--dx) {
-	    unsigned int weight;
-
-	    error += adjust;
-	    x1 += xDir;
-	    if (error & ~0xFFFF) {
-		y1++;
-		error &= 0xFFFF;
-	    }
-	    weight = (error >> 8) & 0xFF;
-	    PutPixel2(destPtr, x1, y1, colorPtr, ~weight);
-	    PutPixel2(destPtr, x1, y1 + 1, colorPtr, weight);
-	}
-    }
-}
-
-#include "bltPaintDraw.c"
-
-static void 
-PaintLineSegment2(
-    Pict *destPtr,
-    int x1, int y1, 
-    int x2, int y2, 
-    int cw,
-    Blt_Pixel *colorPtr)
-{
-    Blt_Pixel interior;
-    int dx, dy, xDir;
-    unsigned long error;
-
-    if (y1 > y2) {
-	int tmp;
-
-	tmp = y1, y1 = y2, y2 = tmp;
-	tmp = x1, x1 = x2, x2 = tmp;
-	cw = !cw;
-    } 
-    if (x1 > x2) {
-	cw = !cw;
-    }
-    interior = PremultiplyAlpha(colorPtr, 255);
-    /* First and last Pixels always get Set: */
-    PutPixel(destPtr, x1, y1, &interior);
-    PutPixel(destPtr, x2, y2, &interior);
-
-    dx = x2 - x1;
-    dy = y2 - y1;
-
-    if (dx >= 0) {
-	xDir = 1;
-    } else {
-	xDir = -1;
-	dx = -dx;
-    }
-    if (dx == 0) {		/*  Vertical line */
-	VertLine(destPtr, x1, y1, y2, &interior);
-	return;
-    }
-    if (dy == 0) {		/* Horizontal line */
-	HorizLine(destPtr, x1, x2, y1, &interior);
-	return;
-    }
-    if (dx == dy) {		/* Diagonal line. */
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x1, y1);
-	while(dy-- > 0) {
-	    dp += destPtr->pixelsPerRow + xDir;
-	    dp->u32 = interior.u32;
-	}
-	return;
-    }
-
-    /* use Wu Antialiasing: */
-
-    error = 0;
-    if (dy > dx) {		/* y-major line */
-	unsigned long adjust;
-
-	/* x1 -= lineWidth / 2; */
-	adjust = (dx << 16) / dy;
-	while(--dy) {
-	    Blt_Pixel *dp;
-	    int x;
-	    unsigned char weight;
-	    
-	    error += adjust;
-	    ++y1;
-	    if (error & ~0xFFFF) {
-		x1 += xDir;
-		error &= 0xFFFF;
-	    }
-	    dp = Blt_PicturePixel(destPtr, x1, y1);
-	    weight = (unsigned char)(error >> 8);
-	    x = x1;
-	    if (x >= 0) {
-		if (cw) {
-		    *dp = PremultiplyAlpha(colorPtr, weight ^ 0xFF);
-		} else {
-		    *dp = interior;
-		}
-	    }
-	    x += xDir;
-	    dp += xDir;
-	    if (x >= 0) {
-		if (!cw) {
-		    *dp = PremultiplyAlpha(colorPtr, weight);
-		} else {
-		    *dp = interior;
-		}
-	    }
-	}
-    } else {			/* x-major line */
-	unsigned long adjust;
-
-	/* y1 -= lineWidth / 2; */
-	adjust = (dy << 16) / dx;
-	while (--dx) {
-	    Blt_Pixel *dp;
-	    int y;
-	    unsigned char weight;
-
-	    error += adjust;
-	    x1 += xDir;
-	    if (error & ~0xFFFF) {
-		y1++;
-		error &= 0xFFFF;
-	    }
-	    dp = Blt_PicturePixel(destPtr, x1, y1);
-	    weight = (unsigned char)(error >> 8);
-	    y = y1;
-	    if (y >= 0) {
-		if (!cw) {
-		    *dp = PremultiplyAlpha(colorPtr, weight ^ 0xFF);
-		} else {
-		    *dp = interior;
-		}
-	    }
-	    dp += destPtr->pixelsPerRow;
-	    y++;
-	    if (y >= 0) {
-		if (cw) {
-		    *dp = PremultiplyAlpha(colorPtr, weight);
-		} else {
-		    *dp = interior;
-		}
-	    } 
-	}
-    }
-    destPtr->flags |= (BLT_PIC_BLEND | BLT_PIC_ASSOCIATED_COLORS);
-}
-
-
-static void 
-PaintPolyline(
-    Pict *destPtr,
-    int nPoints, 
-    Point2f *points, 
-    int lineWidth,
-    Blt_Pixel *colorPtr)
-{
-    int i;
-    Region2d r;
-    Point2f p;
-
-    r.left = r.top = 0;
-    r.right = destPtr->width - 1;
-    r.bottom = destPtr->height - 1;
-    p.x = points[0].x, p.y = points[0].y;
-    for (i = 1; i < nPoints; i++) {
-	Point2f q, next;
-
-	q.x = points[i].x, q.y = points[i].y;
-	next = q;
-	PaintLineSegment(destPtr, ROUND(p.x), ROUND(p.y), ROUND(q.x), 
-			  ROUND(q.y), 0, colorPtr);
-#ifdef notdef
-	if (Blt_LineRectClip(&r, &p, &q)) {
-	    PaintLineSegment(destPtr, ROUND(p.x), ROUND(p.y), ROUND(q.x), 
-		ROUND(q.y), 1, colorPtr);
-	}
-#endif
-	p = next;
-    }
-}
-
-#ifdef HAVE_FT2BUILD_H
-
-#undef __FTERRORS_H__
-#define FT_ERRORDEF( e, v, s )  { e, s },
-#define FT_ERROR_START_LIST     {
-#define FT_ERROR_END_LIST       { -1, 0 } };
-
-static const char *
-FtError(FT_Error fterr)
-{
-    struct ft_errors {                                          
-	int          code;             
-	const char*  msg;
-    };
-    static struct ft_errors ft_err_mesgs[] = 
-#include FT_ERRORS_H            
-
-    struct ft_errors *fp;
-    for (fp = ft_err_mesgs; fp->msg != NULL; fp++) {
-	if (fp->code == fterr) {
-	    return fp->msg;
-	}
-    }
-    return "unknown Freetype error";
-}
-
-static void
-MeasureText(FtFont *fontPtr, const char *string, size_t length,
-	    size_t *widthPtr, size_t *heightPtr)
-{
-    FT_Vector pen;		/* Untransformed origin  */
-    FT_GlyphSlot  slot;
-    FT_Matrix matrix;		/* Transformation matrix. */
-    int maxX, maxY;
-    const char *p, *pend;
-    double radians;
-    int x;
-    FT_Face face;
-
-    radians = 0.0;
-    matrix.yy = matrix.xx = (FT_Fixed)(cos(radians) * 65536.0);
-    matrix.yx = (FT_Fixed)(sin(radians) * 65536.0);
-    matrix.xy = -matrix.yx;
-
-    face = fontPtr->face;
-    slot = face->glyph;
-    
-    maxY = maxX = 0;
-    pen.y = 0;
-    x = 0;
-#ifdef notdef
-    fprintf(stderr, "face->height=%d, face->size->height=%d\n",
-	    face->height, (int)face->size->metrics.height);
-    fprintf(stderr, "face->ascender=%d, face->descender=%d\n",
-	    face->ascender, face->descender);
-#endif
-    for (p = string, pend = p + length; p < pend; p++) {
-	maxY += face->size->metrics.height;
-	pen.x = x << 6;
-	while ((*p != '\n') && (p < pend)) {
-	    FT_Set_Transform(face, &matrix, &pen);
-	    /* Load glyph image into the slot (erase previous) */
-	    if (FT_Load_Char(face, *p, FT_LOAD_RENDER)) {
-		fprintf(stderr, "can't load character \"%c\"\n", *p);
-		continue;                 /* ignore errors */
-	    }
-	    pen.x += slot->advance.x;
-	    pen.y += slot->advance.y;
-	    p++;
-	}
-	if (pen.x > maxX) {
-	    maxX = pen.x;
-	}
-    }	
-#ifdef notdef
-    fprintf(stderr, "w=%d,h=%d\n", maxX >> 6, maxY >> 6);
-#endif
-    *widthPtr = (size_t)(maxX >> 6);
-    *heightPtr = (size_t)(maxY >> 6);
-#ifdef notdef
-    fprintf(stderr, "w=%lu,h=%lu\n", (unsigned long)*widthPtr, 
-	    (unsigned long)*heightPtr);
-#endif
-}
-
-static size_t
-GetTextWidth(FtFont *fontPtr, const char *string, size_t length, int kerning)
-{
-    FT_Vector pen;		/* Untransformed origin  */
-    FT_GlyphSlot  slot;
-    FT_Matrix matrix;		/* Transformation matrix. */
-    int maxX, maxY;
-    const char *p, *pend;
-    double radians;
-    FT_Face face;
-    int previous;
-    int fterr;
-
-    radians = 0.0;
-    matrix.yy = matrix.xx = (FT_Fixed)(cos(radians) * 65536.0);
-    matrix.yx = (FT_Fixed)(sin(radians) * 65536.0);
-    matrix.xy = -matrix.yx;
-
-    face = fontPtr->face;
-    slot = face->glyph;
-    
-    maxY = maxX = 0;
-    pen.y = pen.x = 0;
-#ifdef notdef
-    fprintf(stderr, "face->height=%d, face->size->height=%d\n",
-	    face->height, (int)face->size->metrics.height);
-#endif
-    for (p = string, pend = p + length; p < pend; p++) {
-	int current;
-
-	current = FT_Get_Char_Index(face, *p);
-	if ((kerning) && (previous >= 0)) { 
-	    FT_Vector delta; 
-		
-	    FT_Get_Kerning(face, previous, current, FT_KERNING_DEFAULT, &delta);
-	    pen.x += delta.x; 
-	} 
-	FT_Set_Transform(face, &matrix, &pen);
-	previous = current;
-	/* load glyph image into the slot (erase previous one) */  
-	fterr = FT_Load_Glyph(face, current, FT_LOAD_DEFAULT); 
-	if (fterr) {
-	    fprintf(stderr, "can't load character \"%c\": %s\n", *p,
-		    FtError(fterr));
-	    continue;                 /* ignore errors */
-	}
-	pen.x += slot->advance.x;
-	pen.y += slot->advance.y;
-	if (pen.x > maxX) {
-	    maxX = pen.x;
-	}
-    }	
-    return maxX >> 6;
-}
-
-
-static void
-BlitGlyph(Pict *destPtr, 
-	  FT_GlyphSlot slot, 
-	  int dx, int dy,
-	  int xx, int yy,
-	  Blt_Pixel *colorPtr)
-{
-    int gx, gy, gw, gh; 
-
-#ifdef notdef
-    fprintf(stderr, "dx=%d, dy=%d\n", dx, dy);
-    fprintf(stderr, "  slot.bitmap.width=%d\n", (int)slot->bitmap.width);
-    fprintf(stderr, "  slot.bitmap.rows=%d\n", slot->bitmap.rows);
-    fprintf(stderr, "  slot.bitmap_left=%d\n", (int)slot->bitmap_left);
-    fprintf(stderr, "  slot.bitmap_top=%d\n", (int)slot->bitmap_top);
-    fprintf(stderr, "  slot.bitmap.pixel_mode=%x\n", slot->bitmap.pixel_mode);
-    fprintf(stderr, "  slot.advance.x=%d\n", (int)slot->advance.x);
-    fprintf(stderr, "  slot.advance.y=%d\n", (int)slot->advance.y);
-    
-    fprintf(stderr, "  slot.format=%c%c%c%c\n", 
-	    (slot->format >> 24) & 0xFF, 
-	    (slot->format >> 16) & 0xFF, 
-	    (slot->format >> 8) & 0xFF, 
-	    (slot->format & 0xFF));
-#endif
-    if ((dx >= destPtr->width) || ((dx + slot->bitmap.width) <= 0) ||
-	(dy >= destPtr->height) || ((dy + slot->bitmap.rows) <= 0)) {
-	return;			/* No portion of the glyph is visible in the
-				 * picture. */
-    }
-    /* By default, set the region to cover the entire glyph */
-    gx = 0;
-    gy = 0;
-    gw = slot->bitmap.width;
-    gh = slot->bitmap.rows;
-
-    /* Determine the portion of the glyph inside the picture. */
-
-    if (dx < 0) {		/* Left side of glyph overhangs. */
-	gx -= dx;		
-	gw += dx;
-	dx = 0;		
-    }
-    if (dy < 0) {		/* Top of glyph overhangs. */
-	gy -= dy;
-	gh += dy;
-	dy = 0;
-    }
-    if ((dx + gw) > destPtr->width) { /* Right side of glyph overhangs. */
-	gw = destPtr->width - dx;
-    }
-    if ((dy + gh) > destPtr->height) { /* Bottom of glyph overhangs. */
-	gh = destPtr->height - dy;
-    }
-    if (slot->bitmap.pixel_mode == FT_PIXEL_MODE_MONO) {
-	Blt_Pixel *destRowPtr;
-	unsigned char *srcRowPtr;
-	int y;
-
-	srcRowPtr = slot->bitmap.buffer + (gy * slot->bitmap.pitch);
-	destRowPtr = Blt_PicturePixel(destPtr, xx, yy);
-	for (y = gy; y < gh; y++) {
-	    Blt_Pixel *dp, *dend;
-	    int x;
-	    
-	    for (dp = destRowPtr, dend = dp+gw, x = gx; dp < dend; x++, dp++) {
-		int pixel;
-
-		pixel = srcRowPtr[x >> 3] & (1 << (7 - (x & 0x7)));
-		if (pixel != 0x0) {
-		    BlendPixel(dp, colorPtr, 0xFF);
-		}
-	    }
-	    srcRowPtr += slot->bitmap.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } else {
-	Blt_Pixel *destRowPtr;
-	unsigned char *srcRowPtr;
-	int y;
-
-	srcRowPtr = slot->bitmap.buffer + ((gy * slot->bitmap.pitch) + gx);
-	destRowPtr = Blt_PicturePixel(destPtr, dx, dy);
-	for (y = gy; y < gh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *sp, *send;
-	    
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + gw; sp < send; sp++, dp++) {
-		if (*sp != 0x0) {
-		    BlendPixel(dp, colorPtr, *sp);
-		}
-	    }
-	    srcRowPtr += slot->bitmap.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
-}
-
-static void
-CopyGrayGlyph(Pict *destPtr, FT_GlyphSlot slot, int x, int y, 
-	      Blt_Pixel *colorPtr)
-{
-    int gx, gy, gw, gh; 
-
-#ifdef notdef
-    fprintf(stderr, "x=%d, y=%d\n", x, y);
-    fprintf(stderr, "  slot.bitmap.width=%d\n", slot->bitmap.width);
-    fprintf(stderr, "  slot.bitmap.rows=%d\n", slot->bitmap.rows);
-    fprintf(stderr, "  slot.bitmap_left=%d\n", slot->bitmap_left);
-    fprintf(stderr, "  slot.bitmap_top=%d\n", slot->bitmap_top);
-    fprintf(stderr, "  slot.bitmap.pixel_mode=%x\n", slot->bitmap.pixel_mode);
-    fprintf(stderr, "  slot.advance.x=%d\n", slot->advance.x);
-    fprintf(stderr, "  slot.advance.y=%d\n", slot->advance.y);
-    
-    fprintf(stderr, "  slot.format=%c%c%c%c\n", 
-	    (slot->format >> 24) & 0xFF, 
-	    (slot->format >> 16) & 0xFF, 
-	    (slot->format >> 8) & 0xFF, 
-	    (slot->format & 0xFF));
-#endif
-    if ((x >= destPtr->width) || ((x + slot->bitmap.width) <= 0) ||
-	(y >= destPtr->height) || ((y + slot->bitmap.rows) <= 0)) {
-	return;			/* No portion of the glyph is visible in the
-				 * picture. */
-    }
-
-    /* By default, set the region to cover the entire glyph */
-    gx = 0;
-    gy = 0;
-    gw = slot->bitmap.width;
-    gh = slot->bitmap.rows;
-#ifdef notdef
-    fprintf(stderr, "before: x=%d,y=%d, gx=%d, gy=%d gw=%d gh=%d\n",
-	    x, y, gx, gy, gw, gh);
-#endif
-    /* Determine the portion of the glyph inside the picture. */
-
-    if (x < 0) {		/* Left side of glyph overhangs. */
-	gx -= x;		
-	gw += x;
-	x = 0;		
-    }
-    if (y < 0) {		/* Top of glyph overhangs. */
-	gy -= y;
-	gh += y;
-	y = 0;
-    }
-    if ((x + gw) > destPtr->width) { /* Right side of glyph overhangs. */
-	gw = destPtr->width - x;
-    }
-    if ((y + gh) > destPtr->height) { /* Bottom of glyph overhangs. */
-	gh = destPtr->height - y;
-    }
-#ifdef notdef
-    fprintf(stderr, "after: x=%d,y=%d, gx=%d, gy=%d gw=%d gh=%d\n",
-	    x, y, gx, gy, gw, gh);
-#endif
-    {
-	Blt_Pixel *destRowPtr;
-	unsigned char *srcRowPtr;
-
-	srcRowPtr = slot->bitmap.buffer + ((gy * slot->bitmap.pitch) + gx);
-	destRowPtr = Blt_PicturePixel(destPtr, x, y);
-	for (y = gy; y < gh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *sp, *send;
-	    
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + gw; sp < send; sp++, dp++) {
-		if (*sp != 0x0) {
-		    int t, a;
-		    a = imul8x8(*sp, colorPtr->Alpha, t);
-		    dp->u32 = colorPtr->u32;
-		    dp->Alpha = a;
-		}
-	    }
-	    srcRowPtr += slot->bitmap.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
-}
-
-static void
-PaintGrayGlyph(Pict *destPtr, FT_GlyphSlot slot, int x, int y, 
-	      Blt_Pixel *colorPtr)
-{
-    int gx, gy, gw, gh; 
-
-#ifdef notdef
-    fprintf(stderr, "x=%d, y=%d\n", x, y);
-    fprintf(stderr, "  slot.bitmap.width=%d\n", slot->bitmap.width);
-    fprintf(stderr, "  slot.bitmap.rows=%d\n", slot->bitmap.rows);
-    fprintf(stderr, "  slot.bitmap_left=%d\n", slot->bitmap_left);
-    fprintf(stderr, "  slot.bitmap_top=%d\n", slot->bitmap_top);
-    fprintf(stderr, "  slot.bitmap.pixel_mode=%x\n", slot->bitmap.pixel_mode);
-    fprintf(stderr, "  slot.advance.x=%d\n", slot->advance.x);
-    fprintf(stderr, "  slot.advance.y=%d\n", slot->advance.y);
-    
-    fprintf(stderr, "  slot.format=%c%c%c%c\n", 
-	    (slot->format >> 24) & 0xFF, 
-	    (slot->format >> 16) & 0xFF, 
-	    (slot->format >> 8) & 0xFF, 
-	    (slot->format & 0xFF));
-#endif
-    if ((x >= destPtr->width) || ((x + slot->bitmap.width) <= 0) ||
-	(y >= destPtr->height) || ((y + slot->bitmap.rows) <= 0)) {
-	return;			/* No portion of the glyph is visible in the
-				 * picture. */
-    }
-
-    /* By default, set the region to cover the entire glyph */
-    gx = 0;
-    gy = 0;
-    gw = slot->bitmap.width;
-    gh = slot->bitmap.rows;
-#ifdef notdef
-    fprintf(stderr, "before: x=%d,y=%d, gx=%d, gy=%d gw=%d gh=%d\n",
-	    x, y, gx, gy, gw, gh);
-#endif
-    /* Determine the portion of the glyph inside the picture. */
-
-    if (x < 0) {		/* Left side of glyph overhangs. */
-	gx -= x;		
-	gw += x;
-	x = 0;		
-    }
-    if (y < 0) {		/* Top of glyph overhangs. */
-	gy -= y;
-	gh += y;
-	y = 0;
-    }
-    if ((x + gw) > destPtr->width) { /* Right side of glyph overhangs. */
-	gw = destPtr->width - x;
-    }
-    if ((y + gh) > destPtr->height) { /* Bottom of glyph overhangs. */
-	gh = destPtr->height - y;
-    }
-#ifdef notdef
-    fprintf(stderr, "after: x=%d,y=%d, gx=%d, gy=%d gw=%d gh=%d\n",
-	    x, y, gx, gy, gw, gh);
-#endif
-    {
-	Blt_Pixel *destRowPtr;
-	unsigned char *srcRowPtr;
-
-	srcRowPtr = slot->bitmap.buffer + ((gy * slot->bitmap.pitch) + gx);
-	destRowPtr = Blt_PicturePixel(destPtr, x, y);
-	for (y = gy; y < gh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *sp, *send;
-	    
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + gw; sp < send; sp++, dp++) {
-		if (*sp != 0x0) {
-		    BlendPixel(dp, colorPtr, *sp);
-		}
-	    }
-	    srcRowPtr += slot->bitmap.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
-}
-
-static void
-CopyMonoGlyph(Pict *destPtr, FT_GlyphSlot slot, int dx, int dy,
-	  Blt_Pixel *colorPtr)
-{
-    int gx, gy, gw, gh; 
-
-#ifdef notdef
-    fprintf(stderr, "dx=%d, dy=%d\n", dx, dy);
-    fprintf(stderr, "  slot.bitmap.width=%d\n", slot->bitmap.width);
-    fprintf(stderr, "  slot.bitmap.rows=%d\n", slot->bitmap.rows);
-    fprintf(stderr, "  slot.bitmap_left=%d\n", slot->bitmap_left);
-    fprintf(stderr, "  slot.bitmap_top=%d\n", slot->bitmap_top);
-    fprintf(stderr, "  slot.bitmap.pixel_mode=%x\n", slot->bitmap.pixel_mode);
-    fprintf(stderr, "  slot.advance.x=%d\n", slot->advance.x);
-    fprintf(stderr, "  slot.advance.y=%d\n", slot->advance.y);
-    fprintf(stderr, "  slot.format=%c%c%c%c\n", 
-	    (slot->format >> 24) & 0xFF, 
-	    (slot->format >> 16) & 0xFF, 
-	    (slot->format >> 8) & 0xFF, 
-	    (slot->format & 0xFF));
-#endif
-    
-    if ((dx >= destPtr->width) || ((dx + slot->bitmap.width) <= 0) ||
-	(dy >= destPtr->height) || ((dy + slot->bitmap.rows) <= 0)) {
-	return;			/* No portion of the glyph is visible in the
-				 * picture. */
-    }
-    /* By default, set the region to cover the entire glyph */
-    gx = 0;
-    gy = 0;
-    gw = slot->bitmap.width;
-    gh = slot->bitmap.rows;
-
-    /* Determine the portion of the glyph inside the picture. */
-
-    if (dx < 0) {		/* Left side of glyph overhangs. */
-	gx -= dx;		
-	gw += dx;
-	dx = 0;		
-    }
-    if (dy < 0) {		/* Top of glyph overhangs. */
-	gy -= dy;
-	gh += dy;
-	dy = 0;
-    }
-    if ((dx + gw) > destPtr->width) { /* Right side of glyph overhangs. */
-	gw = destPtr->width - dx;
-    }
-    if ((dy + gh) > destPtr->height) { /* Bottom of glyph overhangs. */
-	gh = destPtr->height - dy;
-    }
-    {
-	Blt_Pixel *destRowPtr;
-	unsigned char *srcRowPtr;
-	int y;
-
-	srcRowPtr = slot->bitmap.buffer + (gy * slot->bitmap.pitch);
-	destRowPtr = Blt_PicturePixel(destPtr, dx, dy);
-	for (y = gy; y < gh; y++) {
-	    Blt_Pixel *dp, *dend;
-	    int x;
-	    
-	    for (dp = destRowPtr, dend = dp+gw, x = gx; dp < dend; x++, dp++) {
-		int pixel;
-
-		pixel = srcRowPtr[x >> 3] & (1 << (7 - (x & 0x7)));
-		if (pixel != 0x0) {
-		    dp->u32 = colorPtr->u32;
-		    /* BlendPixel(dp, colorPtr, 0xFF); */
-		}
-	    }
-	    srcRowPtr += slot->bitmap.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } 
-}
-
-static int 
-ScaleFont(Tcl_Interp *interp, FtFont *fontPtr, size_t fontSize)
-{
-    if (fontSize > 0) {
-	int fterr;
-	unsigned int xdpi, ydpi;
-
-	Blt_ScreenDPI(Tk_MainWindow(interp), &xdpi, &ydpi);
-	fterr = FT_Set_Char_Size(fontPtr->face, 0, fontSize << 6, xdpi, ydpi);
-	if (fterr) {
-	    Tcl_AppendResult(interp, "can't set font size to \"", 
-		Blt_Itoa(fontSize), "\": ", FtError(fterr), (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    fontPtr->height = fontPtr->face->size->metrics.height >> 6;
-    fontPtr->ascent = fontPtr->face->size->metrics.ascender >> 6;
-    fontPtr->descent = fontPtr->face->size->metrics.descender >> 6;
-    return TCL_OK;
-}
-
-static void
-RotateFont(FtFont *fontPtr, float angle)
-{
-    /* Set up the transformation matrix. */
-    double radians;
-
-    radians = (angle / 180.0) * M_PI;
-    fontPtr->matrix.yy = fontPtr->matrix.xx = 
-	(FT_Fixed)(cos(radians) * 65536.0);
-    fontPtr->matrix.yx = (FT_Fixed)(sin(radians) * 65536.0);
-    fontPtr->matrix.xy = -fontPtr->matrix.yx;
-}
-
-static FtFont *
-OpenFont(Tcl_Interp *interp, const char *fontName, size_t fontSize) 
-{
-#ifdef HAVE_FT2BUILD_H
-    FtFont *fontPtr;
-    int fterr;
-
-    fontPtr = Blt_AssertMalloc(sizeof(FtFont));
-
-    fterr = FT_Init_FreeType(&fontPtr->lib);
-    if (fterr) {
-	Tcl_AppendResult(interp, "can't initialize freetype library: ", 
-		FtError(fterr), (char *)NULL);
-	return NULL;
-    }
-    fontPtr->face = NULL;
-    if (fontName[0] == '@') {
-	fterr = FT_New_Face(fontPtr->lib, fontName+1, 0, &fontPtr->face);
-	if (fterr) {
-	    Tcl_AppendResult(interp, "can't create face from font file \"", 
-		fontName+1, "\": ", FtError(fterr), (char *)NULL);
-	    return NULL;
-	}
-    } else {
-#ifdef HAVE_LIBXFT
-	fontPtr->xftFont = Blt_OpenXftFont(interp, fontName);
-	if (fontPtr->xftFont == NULL) {
-	    return NULL;
-	}
-	fontPtr->face = XftLockFace(fontPtr->xftFont);
-	if (fontPtr->face == NULL) {
-	    Tcl_AppendResult(interp, "no font specified for drawing operation", 
-		(char *)NULL);
-	    return NULL;
-	}
-#else
-	Tcl_AppendResult(interp, "freetype library not available", 
-		(char *)NULL);
-	return NULL;
-#endif
-    }
-    if (ScaleFont(interp, fontPtr, fontSize) != TCL_OK) {
-	return NULL;
-    }
-    RotateFont(fontPtr, 0.0f);	/* Initializes the rotation matrix. */
-    return fontPtr;
-#else 
-    Tcl_AppendResult(interp, "freetype library not available", 
-		(char *)NULL);
-    return NULL;
-#endif /* HAVE_FT2BUILD_H */
-}
-
-static void
-CloseFont(FtFont *fontPtr) 
-{
-#ifdef HAVE_LIBXFT
-    if (fontPtr->xftFont != NULL) {
-	XftUnlockFace(fontPtr->xftFont);
-    } else {
-	FT_Done_Face(fontPtr->face);
-    }
-#else
-    FT_Done_Face(fontPtr->face);
-#endif /* HAVE_LIBXFT */ 
-    FT_Done_FreeType(fontPtr->lib);
-}
-
-
-static int
-PaintText(
-    Pict *destPtr,
-    FtFont *fontPtr, 
-    const char *string,
-    size_t length,
-    int x, int y,		/* Anchor coordinates of text. */
-    int kerning,
-    Blt_Pixel *colorPtr)
-{
-#ifdef HAVE_FT2BUILD_H
-    int fterr;
-    int h;
-
-    FT_Vector pen;	/* Untransformed origin  */
-    const char *p, *pend;
-    FT_GlyphSlot  slot;
-    FT_Face face;		/* Face object. */  
-
-    h = destPtr->height;
-    face = fontPtr->face;
-    slot = face->glyph;
-    int xx, yy;
-    int previous;
-
-    if (destPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(destPtr);
-    }
-#ifdef notdef
-    fprintf(stderr, 
-	    "num_faces=%d\n"
-	    "face_flags=%x\n"
-	    "style_flags=%x\n"
-	    "num_glyphs=%d\n"
-	    "family_name=%s\n"
-	    "style_name=%s\n"
-	    "num_fixed_sizes=%d\n"
-	    "num_charmaps=%d\n"
-	    "units_per_EM=%d\n"
-	    "face->size->metrics.height=%d\n"
-	    "face->size->metrics.ascender=%d\n"
-	    "face->size->metrics.descender=%d\n"
-	    "ascender=%d\n"
-	    "descender=%d\n"
-	    "height=%d\n"
-	    "max_advance_width=%d\n"
-	    "max_advance_height=%d\n"
-	    "underline_position=%d\n"
-	    "underline_thickness=%d\n",
-	    face->num_faces,
-	    face->face_flags,
-	    face->style_flags,
-	    face->num_glyphs,
-	    face->family_name,
-	    face->style_name,
-	    face->num_fixed_sizes,
-	    face->num_charmaps,
-	    face->units_per_EM,
-	    face->size->metrics.height,
-	    face->size->metrics.ascender,
-	    face->size->metrics.descender,
-	    face->ascender,
-	    face->descender,
-	    face->height,
-	    face->max_advance_width,
-	    face->max_advance_height,
-	    face->underline_position,
-	    (int)face->underline_thickness);
-#endif
-    xx = x, yy = y;
-    previous = -1;
-    FT_Set_Transform(face, &fontPtr->matrix, NULL);
-    pen.y = (h - y) << 6;
-    xx = x;
-    pen.x = x << 6;
-    for (p = string, pend = p + length; p < pend; p++) {
-	int current;
-
-	current = FT_Get_Char_Index(face, *p);
-	if ((kerning) && (previous >= 0)) { 
-	    FT_Vector delta; 
-		
-	    FT_Get_Kerning(face, previous, current, FT_KERNING_DEFAULT, &delta);
-	    pen.x += delta.x; 
-	} 
-	FT_Set_Transform(face, &fontPtr->matrix, &pen);
-	previous = current;
-	/* load glyph image into the slot (erase previous one) */  
-	fterr = FT_Load_Glyph(face, current, FT_LOAD_DEFAULT); 
-	if (fterr) {
-	    fprintf(stderr, "can't load character \"%c\": %s\n", *p,
-		    FtError(fterr));
-	    continue;                 /* ignore errors */
-	}
-	fterr = FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL);
-	if (fterr) {
-	    fprintf(stderr, "can't render glyph \"%c\": %s\n", *p,
-		    FtError(fterr));
-	    continue;                 /* ignore errors */
-	}
-	switch(slot->bitmap.pixel_mode) {
-	case FT_PIXEL_MODE_MONO:
-	    CopyMonoGlyph(destPtr, slot, pen.x >> 6, yy - slot->bitmap_top, 
-		colorPtr);
-	    break;
-	case FT_PIXEL_MODE_LCD:
-	case FT_PIXEL_MODE_LCD_V:
-	case FT_PIXEL_MODE_GRAY:
-#ifdef notdef
-	    fprintf(stderr, "h=%d, slot->bitmap_top=%d\n", h, slot->bitmap_top);
-#endif
-	    PaintGrayGlyph(destPtr, slot, slot->bitmap_left, 
-			   h - slot->bitmap_top, colorPtr);
-	case FT_PIXEL_MODE_GRAY2:
-	case FT_PIXEL_MODE_GRAY4:
-	    break;
-	}
-	pen.x += slot->advance.x; 
-	pen.y += slot->advance.y;
-	previous = -1;
-    }	
-#endif /* HAVE_FT2BUILD_H */
-    return TCL_OK;
-}
-
-#ifdef notdef
-static void
-PaintTextShadow(
-    Blt_Picture picture,
-    Tcl_Interp *interp,
-    const char *string,
-    int x, int y,		/* Anchor coordinates of text. */
-
-    TextSwitches *switchesPtr,
-    int offset)
-{
-    int w, h;
-    Blt_Picture blur;
-    Blt_Pixel color;
-
-    MeasureText(FT_Face face, char *string, float angle, int *widthPtr, 
-	    int *heightPtr)
-    w = (width + offset*2);
-    h = (height + offset*2);
-    blur = Blt_CreatePicture(w, h);
-    color.u32 = 0x00;
-    Blt_BlankPicture(blur, &color);
-    color.u32 = 0xA0000000;
-
-    PaintText(blur, fontPtr, string, x+offset/2, y+offset/2, 0, colorPtr);
-
-    PaintText(blur, interp, string, x+offset/2, y+offset/2, switchesPtr);
-    Blt_BlurPicture(blur, blur, offset);
-    Blt_BlendPictures(picture, blur, 0, 0, w, h, x+offset/2, y+offset/2);
-    Blt_FreePicture(blur);
-}
-#endif
-#endif /*HAVE_FT2BUILD_H*/
-
-static void 
-xPaintArc(Pict *destPtr, int x1, int y1, int x2, int y2, int lineWidth, 
-	  Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *dp;
-    double t;
-    int r2;
-    int radius;
-    int dx, dy;
-    int x, y;
-    int xoff, yoff;
-    int fill = 1;
-
-    t = 0.0;
-    dx = x2 - x1;
-    dy = y2 - y1;
-    radius = MIN(dx, dy) / 2;
-    xoff = x1;
-    yoff = y1;
-    x = radius;
-    y = 0;
-    dp = Blt_PicturePixel(destPtr, x + xoff - 1, y + yoff);
-    dp->u32 = colorPtr->u32;
-    r2 = radius * radius;
-    if (fill) {
-	PaintLineSegment(destPtr, x1, y + yoff, x + xoff - 2, y + yoff, 1, 
-			 colorPtr);
-    }
-    while (x > y) {
-	double z;
-	double d, q;
-	unsigned char a;
-
-	y++;
-	z = sqrt(r2 - (y * y));
-	d = floor(z) - z;
-	if (d < t) {
-	    x--;
-	}
-	dp = Blt_PicturePixel(destPtr, x + xoff, y + yoff);
-	q = FABS(d * 255.0);
-	a = (unsigned int)CLAMP(q);
-	BlendPixel(dp, colorPtr, a);
-	dp--;			/* x - 1 */
-	a = (unsigned int)CLAMP(255.0 - q);
-	BlendPixel(dp, colorPtr, a);
-	t = d;
-	x1++;
-	if (fill) {
-	    PaintLineSegment(destPtr, x1, y + yoff, x + xoff - 1, y + yoff, 1, colorPtr);
-	}
-    }
-}
-
-static Point2d
-PolygonArea(int nPoints, Point2d *points, double *areaPtr)
-{
-    Point2d *p, *pend;
-    Point2d c;
-    double area;
-    int i;
-    
-    area = c.x = c.y = 0.0;
-    for (p = points, pend = p + nPoints, i = 0; p < pend; p++, i++) {
-	Point2d *q;
-	double factor;
-	int j;
-	
-	j = (i + 1) % nPoints;
-	q = points + j;
-	factor = (p->x * q->y) - (p->y * q->x);
-	area += factor;
-	c.x += (p->x + q->x) * factor;
-	c.y += (p->y + q->y) * factor;
-    }
-    area *= 0.5;
-    c.x /= 6.0 * area;
-    c.y /= 6.0 * area;
-    *areaPtr = area;
-    return c;
-}
-
-static void
-BlendLine(Pict *destPtr, int x1, int x2, int y, Blt_Pixel *colorPtr)  
-{
-    Blt_Pixel *destRowPtr;
-    Blt_Pixel *dp, *dend;
-    size_t length;
-
-    if (x1 > x2) {
-	int tmp;
-
-	tmp = x1, x1 = x2, x2 = tmp;
-    }
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * y) + x1;
-    length = x2 - x1 + 1;
-    for (dp = destRowPtr, dend = dp + length; dp < dend; dp++) {
-	BlendPixel(dp, colorPtr, 0xFF);
-    }
-}
-
-/*
- * Concave Polygon Scan Conversion
- * by Paul Heckbert
- * from "Graphics Gems", Academic Press, 1990
- */
-
-/*
- * concave: scan convert nvert-sided concave non-simple polygon with vertices at
- * (point[i].x, point[i].y) for i in [0..nvert-1] within the window win by
- * calling spanproc for each visible span of pixels.
- * Polygon can be clockwise or counterclockwise.
- * Algorithm does uniform point sampling at pixel centers.
- * Inside-outside test done by Jordan's rule: a point is considered inside if
- * an emanating ray intersects the polygon an odd number of times.
- * drawproc should fill in pixels from xl to xr inclusive on scanline y,
- * e.g:
- *	drawproc(y, xl, xr)
- *	int y, xl, xr;
- *	{
- *	    int x;
- *	    for (x=xl; x<=xr; x++)
- *		pixel_write(x, y, pixelvalue);
- *	}
- *
- *  Paul Heckbert	30 June 81, 18 Dec 89
- */
-
-#include <stdio.h>
-#include <math.h>
-
-typedef struct {		/* a polygon edge */
-    double x;	/* x coordinate of edge's intersection with current scanline */
-    double dx;	/* change in x with respect to y */
-    int i;	/* edge number: edge i goes from pt[i] to pt[i+1] */
-} ActiveEdge;
-
-typedef struct {
-    int nActive;
-    ActiveEdge *active;
-} AET;
-
-/* comparison routines for qsort */
-static int n;			/* number of vertices */
-static Point2f *pt;		/* vertices */
-
-static int 
-CompareIndices(const void *a, const void *b)
-{
-    return (pt[*(int *)a].y <= pt[*(int *)b].y) ? -1 : 1;
-}
-
-static int 
-CompareActive(const void *a, const void *b)
-{
-    const ActiveEdge *u, *v;
-
-    u = a, v = b;
-    return (u->x <= v->x) ? -1 : 1;
-}
-
-static void
-cdelete(AET *tablePtr, int i)	/* remove edge i from active list */
-{
-    int j;
-
-    for (j=0; (j < tablePtr->nActive) && (tablePtr->active[j].i != i); j++) {
-	/*empty*/
-    }
-    if (j >= tablePtr->nActive) {
-	return;		      /* edge not in active list; happens at win->y0*/
-    }
-    tablePtr->nActive--;
-
-    bcopy(&tablePtr->active[j+1], &tablePtr->active[j], 
-	  (tablePtr->nActive-j) *sizeof tablePtr->active[0]);
-}
-
-/* append edge i to end of active list */
-static void
-cinsert(AET *tablePtr, size_t n, Point2f *points, int i, int y)
-{
-    int j;
-    Point2f *p, *q;
-    ActiveEdge *edgePtr;
-
-    j = (i < (n - 1)) ? i + 1 : 0;
-    if (points[i].y < points[j].y) {
-	p = points + i, q = points + j;
-    } else {
-	p = points + j, q = points + i;
-    }
-    edgePtr = tablePtr->active + tablePtr->nActive;
-    assert(tablePtr->nActive < n);
-    /* initialize x position at intersection of edge with scanline y */
-    edgePtr->dx = (q->x - p->x) / (q->y - p->y);
-    edgePtr->x  = edgePtr->dx * (y + 0.5 - p->y) + p->x;
-    edgePtr->i  = i;
-    tablePtr->nActive++;
-}
-
-void
-Blt_PaintPolygon(Pict *destPtr, int nVertices, Point2f *vertices, 
-		 Blt_Pixel *colorPtr)
-{
-    int y, k;
-    int top, bot;
-    int *map;	  /* list of vertex indices, sorted by pt[map[j]].y */
-    AET aet;
-
-    n = nVertices;
-    pt = vertices;
-    if (n <= 0) {
-	return;
-    }
-    if (destPtr->height == 0) {
-	return;
-    }
-    map = Blt_AssertMalloc(nVertices * sizeof(unsigned int));
-    aet.active = Blt_AssertCalloc(nVertices, sizeof(ActiveEdge));
-    /* create y-sorted array of indices map[k] into vertex list */
-    for (k = 0; k < n; k++) {
-	map[k] = k;
-    }
-    /* sort map by pt[map[k]].y */
-    qsort(map, n, sizeof(unsigned int), CompareIndices); 
-    aet.nActive = 0;		/* start with empty active list */
-    k = 0;			/* map[k] is next vertex to process */
-    top = MAX(0, ceil(vertices[map[0]].y-.5)); /* ymin of polygon */
-    bot = MIN(destPtr->height-1, floor(vertices[map[n-1]].y-.5)); /* ymax */
-    for (y = top; y <= bot; y++) { /* step through scanlines */
-	unsigned int i, j;
-
-	/* Scanline y is at y+.5 in continuous coordinates */
-
-	/* Check vertices between previous scanline and current one, if any */
-	for (/*empty*/; (k < n) && (vertices[map[k]].y <= (y +.5)); k++) {
-	    /* to simplify, if pt.y=y+.5, pretend it's above */
-	    /* invariant: y-.5 < pt[i].y <= y+.5 */
-	    i = map[k];	
-	    /*
-	     * Insert or delete edges before and after vertex i (i-1 to i, and
-	     * i to i+1) from active list if they cross scanline y
-	     */
-	    /* vertex previous to i */
-	    j = (i > 0) ? (i - 1) : (n - 1);
-	    if (vertices[j].y <= (y - 0.5)) {	
-		/* old edge, remove from active list */
-		cdelete(&aet, j);
-	    } else if (vertices[j].y > (y + 0.5)) { 
-		/* new edge, add to active list */
-		cinsert(&aet, nVertices, vertices, j, y);
-	    }
-	    j = (i < (n - 1)) ? (i + 1) : 0; /* vertex next after i */
-	    if (vertices[j].y <= (y-.5)) { 
-		/* old edge, remove from active list */
-		cdelete(&aet, i);
-	    } else if (vertices[j].y > (y+.5)){ 
-		/* new edge, add to active list */
-		cinsert(&aet, nVertices, vertices, i, y);
-	    }
-	}
-	/* Sort active edge list by active[j].x */
-	qsort(aet.active, aet.nActive, sizeof(ActiveEdge), CompareActive);
-
-	/* Draw horizontal segments for scanline y */
-	for (j = 0; j < aet.nActive; j += 2) {	/* draw horizontal segments */
-	    int left, right;
-	    ActiveEdge *p, *q;
-
-	    p = aet.active + j;
-	    q = p+1;
-	    /* span 'tween j & j+1 is inside, span tween j+1 & j+2 is outside */
-	    left  = (int)ceil (p->x - 0.5); /* left end of span */
-	    right = (int)floor(q->x - 0.5); /* right end of span */
-	    if (left < 0) {
-		left = 0;
-	    }
-	    if (right >= (int)destPtr->width) {
-		right = destPtr->width - 1;
-	    }
-	    if (left <= right) {
-		BlendLine(destPtr, left, right, y, colorPtr);
-	    }
-	    p->x += p->dx;	/* increment edge coords */
-	    q->x += q->dx;
-	}
-    }
-    Blt_Free(aet.active);
-    Blt_Free(map);
-}
-
-static void
-GetPolygonBoundingBox(size_t nVertices, Point2f *vertices, Region2f *regionPtr)
-{
-    Point2f *pp, *pend;
-
-    regionPtr->left = regionPtr->top = FLT_MAX;
-    regionPtr->right = regionPtr->bottom = -FLT_MAX;
-    for (pp = vertices, pend = pp + nVertices; pp < pend; pp++) {
-	if (pp->x < regionPtr->left) {
-	    regionPtr->left = pp->x;
-	} else if (pp->x > regionPtr->right) {
-	    regionPtr->right = pp->x;
-	}
-	if (pp->y < regionPtr->top) {
-	    regionPtr->top = pp->y;
-	} else if (pp->y > regionPtr->bottom) {
-	    regionPtr->bottom = pp->y;
-	}
-    }
-}
-
-static void
-TranslatePolygon(size_t nVertices, Point2f *vertices, float x, float y, 
-		 float scale)
-{
-    Point2f *pp, *pend;
-
-    for (pp = vertices, pend = pp + nVertices; pp < pend; pp++) {
-	pp->x = (pp->x + x) * scale;
-	pp->y = (pp->y + y) * scale;
-    }
-}
-
-static void
-PaintPolygonAA(Pict *destPtr, size_t nVertices, Point2f *vertices, 
-	       Region2f *regionPtr, Blt_Pixel *colorPtr)
-{
-    Region2f r2;
-    int w, h;
-    Blt_Picture big, tmp;
-    Blt_Pixel color;
-    Point2f *v;
-
-    int x1, x2, y1, y2;
-
-    x1 = y1 = 0;
-    x2 = destPtr->width, y2 = destPtr->height;
-    if (regionPtr->left > 0) {
-	x1 = (int)floor(regionPtr->left);
-    }
-    if (regionPtr->top > 0) {
-	y1 = (int)floor(regionPtr->top);
-    }
-    if (regionPtr->right < x2) {
-	double d;
-	d = ceil(regionPtr->right);
-	x2 = (int)ceil(regionPtr->right);
-    }
-    if (regionPtr->bottom < y2) {
-	y2 = (int)ceil(regionPtr->bottom);
-    }
-    v = Blt_AssertMalloc(nVertices * sizeof(Point2f));
-    memcpy(v, vertices, sizeof(Point2f) * nVertices);
-    TranslatePolygon(nVertices, v, -x1+1, -y1+1, 4.0f);
-    GetPolygonBoundingBox(nVertices, v, &r2);
-    
-    w = (x2 - x1 + 2) * 4;
-    h = (y2 - y1 + 2) * 4;
-    big = Blt_CreatePicture(w, h);
-    color.u32 = 0x00;
-    Blt_BlankPicture(big, &color);
-    color.Alpha = colorPtr->Alpha;
-    Blt_PaintPolygon(big, nVertices, v, &color);
-    Blt_Free(v);
-    w = (x2 - x1 + 2);
-    h = (y2 - y1 + 2);
-    tmp = Blt_CreatePicture(w, h);
-    Blt_ResamplePicture(tmp, big, bltBoxFilter, bltBoxFilter);
-    Blt_FreePicture(big);
-    Blt_ApplyColorToPicture(tmp, colorPtr);
-    /* Replace the bounding box in the original with the new. */
-    Blt_BlendPictures(destPtr, tmp, 0, 0, w, h, (int)floor(regionPtr->left)-1, 
-		      (int)floor(regionPtr->top)-1);
-    Blt_FreePicture(tmp);
-}
-
-static void
-PaintPolygonShadow(Pict *destPtr, size_t nVertices, Point2f *vertices, 
-		   Region2f *regionPtr, Shadow *shadowPtr)
-{
-    int w, h;
-    Blt_Picture blur, tmp;
-    Point2f *v;
-    Blt_Pixel color;
-    int x1, x2, y1, y2;
-    Region2f r2;
-
-    x1 = y1 = 0;
-    x2 = destPtr->width, y2 = destPtr->height;
-    if (regionPtr->left > 0) {
-	x1 = (int)regionPtr->left;
-    }
-    if (regionPtr->top > 0) {
-	y1 = (int)regionPtr->top;
-    }
-    if (regionPtr->right < x2) {
-	x2 = (int)ceil(regionPtr->right);
-    }
-    if (regionPtr->bottom < y2) {
-	y2 = (int)ceil(regionPtr->bottom);
-    }
-    if ((x1 > 0) || (y1 > 0)) {
-	v = Blt_AssertMalloc(nVertices * sizeof(Point2f));
-	memcpy(v, vertices, sizeof(Point2f) * nVertices);
-	TranslatePolygon(nVertices, v, -x1, -y1, 1.0f);
-    } else {
-	v = vertices;
-    }
-    w = (x2 - x1 + shadowPtr->offset*8);
-    h = (y2 - y1 + shadowPtr->offset*8);
-    tmp = Blt_CreatePicture(w, h);
-    color.u32 = 0x00;
-    Blt_BlankPicture(tmp, &color);
-    color.Alpha = shadowPtr->alpha;
-    GetPolygonBoundingBox(nVertices, v, &r2);
-    Blt_PaintPolygon(tmp, nVertices, v, &color);
-    if (v != vertices) {
-	Blt_Free(v);
-    }
-    blur = Blt_CreatePicture(w, h);
-    color.u32 = 0x00;
-    Blt_BlankPicture(blur, &color);
-    Blt_CopyPictureBits(blur, tmp, 0, 0, w, h, shadowPtr->offset*2, 
-			shadowPtr->offset*2); 
-    Blt_BlurPicture(blur, blur, shadowPtr->offset);
-    Blt_MaskPicture(blur, tmp, 0, 0, w, h, 0, 0, &color);
-    Blt_FreePicture(tmp);
-    Blt_BlendPictures(destPtr, blur, 0, 0, w, h, x1, y1);
-    Blt_FreePicture(blur);
-}
-
-static void
-PaintPolygonAA2(Pict *destPtr, size_t nVertices, Point2f *vertices, 
-		Region2f *regionPtr, Blt_Pixel *colorPtr, Shadow *shadowPtr)
-{
-    Region2f r2;
-    Blt_Picture big, tmp;
-    Blt_Pixel color;
-    /* 
-     * Get the minimum size region to draw both a supersized polygon and
-     * shadow.
-     *
-     * Draw the shadow and then the polygon. Everything is 4x bigger including
-     * the shadow offset.  This is a much bigger blur.
-     * 
-     * Resample the image back down to 1/4 the size and blend it into 
-     * the destination picture.
-     */
-    big = Blt_CreatePicture(destPtr->width * 4, destPtr->height * 4);
-    TranslatePolygon(nVertices, vertices, 0.0f, 0.0f, 4.0f);
-    color.u32 = 0x00;
-    Blt_BlankPicture(big, &color);
-    GetPolygonBoundingBox(nVertices, vertices, &r2);
-    PaintPolygonShadow(big, nVertices, vertices, &r2, shadowPtr);
-    Blt_PaintPolygon(big, nVertices, vertices, colorPtr);
-    tmp = Blt_CreatePicture(destPtr->width, destPtr->height);
-    Blt_ResamplePicture(tmp, big, bltBoxFilter, bltBoxFilter);
-    Blt_FreePicture(big);
-    Blt_BlendPictures(destPtr, tmp, 0, 0, destPtr->width, destPtr->height, 0,0);
-    Blt_FreePicture(tmp);
-}
-
-static void
-DrawCircle(Blt_Picture picture, int x, int y, int radius, 
-	    CircleSwitches *switchesPtr)
-{
-    int filled;
-
-    filled = (switchesPtr->fill.u32 != 0x00);
-    if (switchesPtr->antialiased) {
-	int nSamples = 4; 
-	Pict *bigPtr, *tmpPtr;
- 	int w, h;
-	Blt_Pixel color;
-	int offset, r, lw;
-	int cx, cy;
-
-	r = radius * nSamples;
-	w = h = r + r;
-	offset = switchesPtr->shadow.offset * nSamples;
-
-	/* Scale the region forming the bounding box of the ellipse into a new
-	 * picture. The bounding box is scaled by *nSamples* times. */
-	bigPtr = Blt_CreatePicture(w+(1+offset)*4, h+(1+offset)*4);
-
-	cx = bigPtr->width / 2;
-	cy = bigPtr->height / 2;
-	
-	color.u32 = 0x00;
-	color.Alpha = 0x00;
-	Blt_BlankPicture(bigPtr, &color);
-	if (switchesPtr->shadow.offset > 0) {
-	    color.Alpha = switchesPtr->shadow.alpha;
-	    /* Either ring or full circle for blur stencil. */
-	    lw = switchesPtr->lineWidth * nSamples;
-	    if (filled) {
-		lw = 0;
-	    }
-	    PaintEllipse(bigPtr, cx, cy, r, r, lw, &color, 0);
-	    Blt_BlurPicture(bigPtr, bigPtr, offset/2);
-	    /* Offset the circle from the shadow. */
-	    cx -= offset;
-	    cy -= offset;
-	}
-	lw = switchesPtr->lineWidth * nSamples;
-	if ((lw > 0) && (r > lw) && (switchesPtr->outline.u32 != 0x00)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(bigPtr, cx, cy, r, r, lw, &switchesPtr->outline, 0);
-	    r -= lw;
-	}
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(bigPtr, cx, cy, r, r, 0, &switchesPtr->fill, 0);
-	}
-	offset = switchesPtr->shadow.offset;
-	w = h = radius + radius + (1 + offset) * 2;
-	tmpPtr = Blt_CreatePicture(w, h);
-	Blt_ResamplePicture(tmpPtr, bigPtr, bltBoxFilter, bltBoxFilter);
-#ifdef notdef
-	fprintf(stderr, "big=%dx%d, blur=%d\n", bigPtr->width,bigPtr->height,
-		(switchesPtr->shadow.offset * nSamples)/2);
-#endif
-	Blt_FreePicture(bigPtr);
-	/*Blt_ApplyColorToPicture(tmpPtr, &switchesPtr->fill); */
-	Blt_BlendPictures(picture, tmpPtr, 0, 0, w, h, x-w/2+offset, 
-			  y-h/2+offset);
-	Blt_FreePicture(tmpPtr);
-    } else if (switchesPtr->shadow.offset > 0) {
-	Pict *blurPtr;
-	int w, h;
-	Blt_Pixel color;
-	int offset, r, lw;
-	int cx, cy;
-
-	w = h = (radius + radius);
-	r = radius;
-	offset = switchesPtr->shadow.offset;
-
-	/* Scale the region forming the bounding box of the ellipse into a new
-	 * picture. The bounding box is scaled by *nSamples* times. */
-	blurPtr = Blt_CreatePicture(w+(offset*4), h+(offset*4));
-	cx = blurPtr->width / 2;
-	cy = blurPtr->height / 2;
-	color.u32 = 0x00;
-	Blt_BlankPicture(blurPtr, &color);
-
-	color.Alpha = switchesPtr->shadow.alpha;
-	/* Either ring or full circle for blur stencil. */
-	lw = switchesPtr->lineWidth;
-	if (filled) {
-	    lw = 0;
-	}
-	PaintEllipse(blurPtr, cx, cy, r, r, lw, &color, 0);
-	Blt_BlurPicture(blurPtr, blurPtr, offset);
-	/* Offset the circle from the shadow. */
-	cx -= offset;
-	cy -= offset;
-	lw = switchesPtr->lineWidth;
-	if ((lw > 0) && (r > lw) && (switchesPtr->outline.u32 != 0x00)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(blurPtr, cx, cy, r, r, lw, &switchesPtr->outline, 0); 
-	    r -= lw;
-	}
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(blurPtr, cx, cy, r, r, 0, &switchesPtr->fill, 0);
-	}
-	x -= blurPtr->width/2 + offset;
-	if (x < 0) {
-	    x = 0;
-	}
-	y -= blurPtr->height/2 + offset;
-	if (y < 0) {
-	    y = 0;
-	}
-	Blt_BlendPictures(picture, blurPtr, 0, 0, blurPtr->width, 
-			  blurPtr->height, x, y);
-	Blt_FreePicture(blurPtr);
-    } else {
-	int r;
-
-	r = radius;
-	if ((switchesPtr->lineWidth > 0) && (r > switchesPtr->lineWidth)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(picture, x, y, r, r, switchesPtr->lineWidth, 
-		&switchesPtr->outline, 1); 
-	    r -= switchesPtr->lineWidth;
-	}
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(picture, x, y, r, r, 0, &switchesPtr->fill, 1);
-	}
-    }
-}
-
-static void
-DrawCircle2(Blt_Picture picture, int x, int y, int radius, 
-	    CircleSwitches *switchesPtr)
-{
-    int filled;
-
-    filled = (switchesPtr->fill.u32 != 0x00);
-    if (switchesPtr->antialiased) {
-	int nSamples = 4; 
-	Pict *bigPtr, *tmpPtr;
- 	int w, h;
-	Blt_Pixel color;
-	int offset, r, lw;
-	int cx, cy;
-	Blt_Pixel *srcRowPtr, *sp, *send;
-
-	r = radius;
-	w = h = r + r;
-	offset = switchesPtr->shadow.offset * nSamples;
-
-	/* Scale the region forming the bounding box of the ellipse into a new
-	 * picture. The bounding box is scaled by *nSamples* times. */
-	bigPtr = BgPicture(picture, x, y, w, h);
-	cx = bigPtr->width / 2;
-	cy = bigPtr->height / 2;
-	
-#ifdef notdef
-	if (switchesPtr->shadow.offset > 0) {
-	    color.Alpha = switchesPtr->shadow.alpha;
-	    /* Either ring or full circle for blur stencil. */
-	    lw = switchesPtr->lineWidth * nSamples;
-	    if (filled) {
-		lw = 0;
-	    }
-	    PaintEllipse(bigPtr, cx, cy, r, r, lw, &color, 0);
-	    Blt_BlurPicture(bigPtr, bigPtr, offset/2);
-	    /* Offset the circle from the shadow. */
-	    cx -= offset;
-	    cy -= offset;
-	}
-	lw = switchesPtr->lineWidth * nSamples;
-	if ((lw > 0) && (r > lw) && (switchesPtr->outline.u32 != 0x00)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(bigPtr, cx, cy, r, r, lw, &switchesPtr->outline, 0);
-	    r -= lw;
-	}
-#endif
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(bigPtr, cx, cy, r*3, r*3, 0, &switchesPtr->fill, 0);
-	}
-	offset = switchesPtr->shadow.offset;
-	tmpPtr = Blt_CreatePicture(w, h);
-	Blt_ResamplePicture(tmpPtr, bigPtr, bltBoxFilter, bltBoxFilter);
-#ifdef notdef
-	MarkPicture(tmpPtr);
-	fprintf(stderr, "big=%dx%d, blur=%d\n", bigPtr->width,bigPtr->height,
-		(switchesPtr->shadow.offset * nSamples)/2);
-#endif
-	Blt_FreePicture(bigPtr);
-	/*Blt_ApplyColorToPicture(tmpPtr, &switchesPtr->fill); */
-	Blt_BlendPictures(picture, tmpPtr, 0, 0, w, h, x-w/2+offset, 
-			  y-h/2+offset);
-	Blt_FreePicture(tmpPtr);
-    } else if (switchesPtr->shadow.offset > 0) {
-	Pict *blurPtr;
-	int w, h;
-	Blt_Pixel color;
-	int offset, r, lw;
-	int cx, cy;
-
-	w = h = (radius + radius);
-	r = radius;
-	offset = switchesPtr->shadow.offset;
-
-	/* Scale the region forming the bounding box of the ellipse into a new
-	 * picture. The bounding box is scaled by *nSamples* times. */
-	blurPtr = Blt_CreatePicture(w+(offset*4), h+(offset*4));
-	cx = blurPtr->width / 2;
-	cy = blurPtr->height / 2;
-	color.u32 = 0x00;
-	Blt_BlankPicture(blurPtr, &color);
-
-	color.Alpha = switchesPtr->shadow.alpha;
-	/* Either ring or full circle for blur stencil. */
-	lw = switchesPtr->lineWidth;
-	if (filled) {
-	    lw = 0;
-	}
-	PaintEllipse(blurPtr, cx, cy, r, r, lw, &color, 0);
-	Blt_BlurPicture(blurPtr, blurPtr, offset);
-	/* Offset the circle from the shadow. */
-	cx -= offset;
-	cy -= offset;
-	lw = switchesPtr->lineWidth;
-	if ((lw > 0) && (r > lw) && (switchesPtr->outline.u32 != 0x00)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(blurPtr, cx, cy, r, r, lw, &switchesPtr->outline, 0); 
-	    r -= lw;
-	}
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(blurPtr, cx, cy, r, r, 0, &switchesPtr->fill, 0);
-	}
-	x -= blurPtr->width/2 + offset;
-	if (x < 0) {
-	    x = 0;
-	}
-	y -= blurPtr->height/2 + offset;
-	if (y < 0) {
-	    y = 0;
-	}
-	Blt_BlendPictures(picture, blurPtr, 0, 0, blurPtr->width, 
-			  blurPtr->height, x, y);
-	Blt_FreePicture(blurPtr);
-    } else {
-	int r;
-
-	r = radius;
-	if ((switchesPtr->lineWidth > 0) && (r > switchesPtr->lineWidth)) {
-	    /* Paint ring outline. */
-	    PaintEllipse(picture, x, y, r, r, switchesPtr->lineWidth, 
-		&switchesPtr->outline, 1); 
-	    r -= switchesPtr->lineWidth;
-	}
-	if (filled) {
-	    /* Paint filled interior */
-	    PaintEllipse(picture, x, y, r, r, 0, &switchesPtr->fill, 1);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CircleOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CircleOp(
-    Blt_Picture picture,
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    CircleSwitches switches;
-    int x, y, radius;
-
-    if (objc < 5) {
-	Tcl_AppendResult(interp, "wrong # of coordinates for circle",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[5], &radius) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    switches.lineWidth = 1;
-    switches.fill.u32    = 0xffffffff;
-    switches.outline.u32 = 0xff000000;
-    switches.alpha = -1;
-    switches.antialiased = 0;
-    switches.shadow.offset = 0;
-    switches.shadow.alpha = 0xa0;
-    if (Blt_ParseSwitches(interp, circleSwitches, objc - 6, objv + 6, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-#ifdef notdef
-    if (switches.alpha != -1) {
-	switches.fill.Alpha = switches.alpha;
-	switches.outline.Alpha = switches.alpha;
-    }
-#endif
-    DrawCircle(picture, x, y, radius, &switches);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EllipseOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EllipseOp(
-    Blt_Picture picture,
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    CircleSwitches switches;
-    int x, y, a, b;
-
-    if (objc < 7) {
-	Tcl_AppendResult(interp, "wrong # of coordinates for circle",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[5], &a) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[6], &b) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    switches.lineWidth = 0;
-    switches.fill.u32 = 0xFFFFFFFF;
-    switches.outline.u32 = 0xFF000000;
-    switches.alpha = -1;
-    switches.antialiased = FALSE;
-    if (Blt_ParseSwitches(interp, circleSwitches, objc - 7, objv + 7, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.alpha != -1) {
-	switches.fill.Alpha = switches.alpha;
-	switches.outline.Alpha = switches.alpha;
-    }
-    if ((switches.lineWidth >= a) || (switches.lineWidth >= b)) {
-	/* If the requested line width is greater than the radius then draw a
-	 * solid ellipse instead. */
-	switches.lineWidth = 0;
-    }
-    if (switches.antialiased) {
-	PaintEllipseAA(picture, x, y, a, b, switches.lineWidth, &switches.fill);
-    } else {
-	PaintEllipse(picture, x, y, a, b, switches.lineWidth, &switches.fill, 1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LineOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LineOp(
-    Blt_Picture picture,
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    LineSwitches switches;
-    size_t nPoints;
-    Point2f *points;
-    
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF;
-    switches.alpha = -1;
-    if (Blt_ParseSwitches(interp, lineSwitches, objc - 3, objv + 3, 
-		&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.alpha != -1) {
-	switches.bg.Alpha = switches.alpha;
-    }
-    if (switches.x.nValues != switches.y.nValues) {
-	Tcl_AppendResult(interp, "-x and -y coordinate lists must have the ",
-		" same number of coordinates.",(char *)NULL);
-	return TCL_ERROR;
-    }
-    points = NULL;
-    if (switches.x.nValues > 0) {
-	size_t i;
-	float *x, *y;
-
-	nPoints = switches.x.nValues;
-	points = Blt_Malloc(sizeof(Point2f) * nPoints);
-	if (points == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate memory for ", 
-		Blt_Itoa(nPoints + 1), " points", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	x = (float *)switches.x.values;
-	y = (float *)switches.y.values;
-	for (i = 0; i < nPoints; i++) {
-	    points[i].x = x[i];
-	    points[i].y = y[i];
-	}
-	Blt_Free(switches.x.values);
-	Blt_Free(switches.y.values);
-	switches.x.values = switches.y.values = NULL;
-    } else if (switches.coords.nValues > 0) {
-	size_t i, j;
-	float *coords;
-
-	if (switches.coords.nValues & 0x1) {
-	    Tcl_AppendResult(interp, "bad -coords list: ",
-		"must have an even number of values", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	nPoints = (switches.coords.nValues / 2);
-	points = Blt_Malloc(sizeof(Point2f)* nPoints);
-	if (points == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate memory for ", 
-		Blt_Itoa(nPoints + 1), " points", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	coords = (float *)switches.coords.values;
-	for (i = 0, j = 0; i < switches.coords.nValues; i += 2, j++) {
-	    points[j].x = coords[i];
-	    points[j].y = coords[i+1];
-	}
-	Blt_Free(switches.coords.values);
-	switches.coords.values = NULL;
-    }
-    if (points != NULL) {
-	PaintPolyline(picture, nPoints, points, switches.lineWidth, 
-		   &switches.bg);
-	Blt_Free(points);
-    }
-    Blt_FreeSwitches(lineSwitches, (char *)&switches, 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PolygonOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *	$pict draw polygon -coords $coords -color $color 
- *---------------------------------------------------------------------------
- */
-static int
-PolygonOp(
-    Pict *destPtr,
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    PolygonSwitches switches;
-    size_t nVertices;
-    Point2f *vertices;
-    Region2f r;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF;
-    switches.alpha = -1;
-    if (Blt_ParseSwitches(interp, polygonSwitches, objc - 3, objv + 3, 
-		&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.alpha != -1) {
-	switches.bg.Alpha = switches.alpha;
-    }
-    if (switches.x.nValues != switches.y.nValues) {
-	Tcl_AppendResult(interp, "-x and -y coordinate lists must have the ",
-		" same number of coordinates.",(char *)NULL);
-	return TCL_ERROR;
-    }
-    vertices = NULL;
-    r.top = r.left = FLT_MAX, r.bottom = r.right = -FLT_MAX;
-    if (switches.x.nValues > 0) {
-	size_t i;
-	float *x, *y;
-
-	nVertices = switches.x.nValues;
-	vertices = Blt_Malloc(sizeof(Point2f) * (switches.x.nValues + 1));
-	if (vertices == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate memory for ", 
-		Blt_Itoa(nVertices + 1), " vertices", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	x = (float *)switches.x.values;
-	y = (float *)switches.y.values;
-	for (i = 0; i < switches.x.nValues; i++) {
-	    vertices[i].x = x[i];
-	    vertices[i].y = y[i];
-	    if (r.left > x[i]) {
-		r.left = x[i];
-	    } else if (r.right < x[i]) {
-		r.right = x[i];
-	    }
-	    if (r.top > y[i]) {
-		r.top = y[i];
-	    } else if (r.bottom < y[i]) {
-		r.bottom = y[i];
-	    }
-	}
-	if ((x[0] != x[i-1]) || (y[0] != y[i-1])) {
-	    vertices[i].x = x[0];
-	    vertices[i].y = y[0];
-	    nVertices++;
-	}
-	Blt_Free(switches.x.values);
-	Blt_Free(switches.y.values);
-	switches.x.values = switches.y.values = NULL;
-    } else if (switches.coords.nValues > 0) {
-	size_t i, j;
-	float *coords;
-
-	if (switches.coords.nValues & 0x1) {
-	    Tcl_AppendResult(interp, "bad -coords list: ",
-		"must have an even number of values", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	nVertices = (switches.coords.nValues / 2);
-	vertices = Blt_Malloc(sizeof(Point2f)* (nVertices + 1));
-	if (vertices == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate memory for ", 
-		Blt_Itoa(nVertices + 1), " vertices", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	coords = (float *)switches.coords.values;
-	for (i = 0, j = 0; i < switches.coords.nValues; i += 2, j++) {
-	    vertices[j].x = coords[i];
-	    vertices[j].y = coords[i+1];
-	    if (r.left > coords[i]) {
-		r.left = coords[i];
-	    } else if (r.right < coords[i]) {
-		r.right = coords[i];
-	    }
-	    if (r.top > coords[i+1]) {
-		r.top = coords[i+1];
-	    } else if (r.bottom < coords[i+1]) {
-		r.bottom = coords[i+1];
-	    }
-	}
-	if ((coords[0] != coords[i-2]) || (coords[1] != coords[i-1])) {
-	    vertices[j].x = coords[0];
-	    vertices[j].y = coords[1];
-	    nVertices++;
-	}
-	Blt_Free(switches.coords.values);
-	switches.coords.values = NULL;
-    }
-    if (vertices != NULL) {
-	if ((r.left < destPtr->width) && (r.right >= 0) &&
-	    (r.top < destPtr->height) && (r.bottom >= 0)) {
-	    if (switches.antialiased) {
-		PaintPolygonAA2(destPtr, nVertices, vertices, &r, 
-			&switches.bg, &switches.shadow);
-	    } else {
-		if (switches.shadow.offset > 0) {
-		    PaintPolygonShadow(destPtr, nVertices, vertices, &r, 
-				       &switches.shadow);
-		}
-		Blt_PaintPolygon(destPtr, nVertices, vertices, &switches.bg);
-	    }
-	}
-	Blt_Free(vertices);
-    }
-    Blt_FreeSwitches(polygonSwitches, (char *)&switches, 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RectangleOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-RectangleOp(
-    Blt_Picture picture,
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{
-    RectangleSwitches switches;
-    PictRegion r;
-    
-    if (Blt_GetBBoxFromObjv(interp, 4, objv + 3, &r) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    /* Process switches  */
-    switches.lineWidth = 0;
-    switches.bg.u32 = 0xFFFFFFFF;
-    switches.alpha = -1;
-    if (Blt_ParseSwitches(interp, rectangleSwitches, objc - 7, objv + 7, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.alpha != -1) {
-	switches.bg.Alpha = switches.alpha;
-    }
-    if (switches.shadow.offset > 0) {
-	PaintRectangleShadow(picture, r.x, r.y, r.w, r.h, switches.radius, 
-		switches.lineWidth, &switches.shadow);
-    }
-    if ((switches.antialiased) && (switches.radius > 0)) {
-	PaintRectangleAA(picture, r.x, r.y, r.w, r.h, switches.radius, 
-		switches.lineWidth, &switches.bg);
-    } else {
-	PaintRectangle(picture, r.x, r.y, r.w, r.h, switches.radius, 
-		switches.lineWidth, &switches.bg);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextOp --
- *
- * Results:
- *	Returns a standard TCL return value.
- *
- * Side effects:
- *	None.
- *
- *	image draw text string x y switches 
- *---------------------------------------------------------------------------
- */
-static int
-TextOp(
-    Pict *destPtr,		/* Picture. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument objects. */
-{ 
-#ifdef HAVE_FT2BUILD_H
-    FtFont *fontPtr;
-    TextSwitches switches;
-    const char *string;
-    const char *fontName;
-    int length;
-    int result;
-    int x, y;
-
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    if ((Tcl_GetIntFromObj(interp, objv[4], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[5], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    switches.alpha = -1;
-    switches.anchor = TK_ANCHOR_NW;
-    switches.angle = 0.0;
-    switches.shadow.offset = 0;
-    switches.color.u32 = 0xFF000000;  /* black. */
-    switches.shadow.alpha = 0xA0; /* black. */
-    switches.fontObjPtr = Tcl_NewStringObj("Arial 12", -1);
-    switches.fontSize = 0;
-    switches.kerning = FALSE;
-    switches.justify = TK_JUSTIFY_LEFT;
-    if (Blt_ParseSwitches(interp, textSwitches, objc - 6, objv + 6, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.alpha != -1) {
-	switches.color.Alpha = switches.alpha;
-    }
-    fontName = Tcl_GetString(switches.fontObjPtr);
-    fontPtr = OpenFont(interp, fontName, switches.fontSize);
-    if (fontPtr == NULL) {
-	fprintf(stderr, "can't open font %s\n", fontName);
-	return TCL_ERROR;
-    }
-    if (destPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(destPtr);
-    }
-    if (switches.angle != 0.0) {
-	TextStyle ts;
-	TextLayout *layoutPtr;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetJustify(ts, switches.justify);
-	layoutPtr = CreateSimpleTextLayout(fontPtr, string, length, &ts);
-	if (fontPtr->face->face_flags & FT_FACE_FLAG_SCALABLE) {
-	    TextFragment *fp, *fend;
-	    double rw, rh;
-
-	    Blt_RotateStartingTextPositions(layoutPtr, switches.angle);
-	    Blt_GetBoundingBox(layoutPtr->width, layoutPtr->height, 
-		switches.angle, &rw, &rh, (Point2d *)NULL);
-	    Blt_TranslateAnchor(x, y, (int)(rw), (int)(rh), switches.anchor, 
-		&x, &y);
-	    RotateFont(fontPtr, switches.angle);
-	    for (fp = layoutPtr->fragments, fend = fp + layoutPtr->nFrags; 
-		fp < fend; fp++) {
-		PaintText(destPtr, fontPtr, fp->text, fp->count, x + fp->sx, 
-			y + fp->sy, switches.kerning, &switches.color);
-	    }
-	} else {
-	    Blt_Picture tmp;
-	    Blt_Pixel color;
-	    Pict *rotPtr;
-	    TextFragment *fp, *fend;
-	    
-	    tmp = Blt_CreatePicture(layoutPtr->width, layoutPtr->height);
-	    color.u32 = 0x00FF0000;
-	    Blt_BlankPicture(tmp, &color);
-	    color.Alpha = 0xFF;
-	    for (fp = layoutPtr->fragments, fend = fp + layoutPtr->nFrags; 
-		fp < fend; fp++) {
-		PaintText(tmp, fontPtr, fp->text, fp->count, fp->sx, 
-			fp->sy, switches.kerning, &switches.color);
-	    }
-	    rotPtr = Blt_RotatePicture(tmp, switches.angle);
-	    Blt_FreePicture(tmp);
-	    Blt_TranslateAnchor(x, y, rotPtr->width, rotPtr->height, 
-				switches.anchor, &x, &y);
-	    Blt_BlendPictures(destPtr, rotPtr, 0, 0, 
-		rotPtr->width, rotPtr->height, x, y);
-	    Blt_FreePicture(rotPtr);
-	}
-	Blt_Free(layoutPtr);
-    } else {
-	size_t w, h;
-
-	MeasureText(fontPtr, string, length, &w, &h);
-	Blt_TranslateAnchor(x, y, w, h, switches.anchor, &x, &y);
-#ifdef notdef
-	fprintf(stderr, "string=%s w=%d h=%d\n", string, w, h);
-#endif
-	if (switches.shadow.offset > 0) {
-	    Blt_Pixel color;
-	    Pict *blurPtr, *tmpPtr;
-	    int offset = switches.shadow.offset;
-
-	    MeasureText(fontPtr, string, length, &w, &h);
-	    tmpPtr = Blt_CreatePicture(w, h);
-	    color.u32 = 0x00000000;
-	    Blt_BlankPicture(tmpPtr, &color);
-	    color.Alpha = switches.shadow.alpha;
-	    PaintText(tmpPtr, fontPtr, string, length, 0, fontPtr->ascent, 
-		      switches.kerning, &color);
-	    blurPtr = Blt_CreatePicture(w+offset*4, h+offset*4);
-	    color.Alpha = 0;
-	    Blt_BlankPicture(blurPtr, &color);
-	    Blt_CopyPictureBits(blurPtr, tmpPtr, 0, 0, w, h, 
-				offset, offset); 
-	    Blt_FreePicture(tmpPtr);
-	    Blt_BlurPicture(blurPtr, blurPtr, offset);
-	    Blt_BlendPictures(destPtr, blurPtr, 0, 0, blurPtr->width, 
-			      blurPtr->height, x, y);
-	    Blt_FreePicture(blurPtr);
-	}
-	y += fontPtr->ascent;
-	result = PaintText(destPtr, fontPtr, string, length, x, y, 
-			   switches.kerning, &switches.color);
-    }
-    Blt_FreeSwitches(textSwitches, (char *)&switches, 0);
-    CloseFont(fontPtr);
-#endif
-    return TCL_OK;
-}
-
-Blt_OpSpec bltPictDrawOps[] =
-{
-    {"circle",    1, CircleOp,    4, 0, "x y r ?switches?",},
-    {"ellipse",   1, EllipseOp,   5, 0, "x y a b ?switches?",},
-    {"line",      1, LineOp,      3, 0, "?switches?",},
-    {"polygon",   1, PolygonOp,   3, 0, "?switches?",},
-    {"rectangle", 1, RectangleOp, 7, 0, "x1 y1 x2 y2 ?switches?",},
-    {"text",      1, TextOp,      6, 0, "string x y ?switches?",},
-};
-
-int bltPictDrawNOps = sizeof(bltPictDrawOps) / sizeof(Blt_OpSpec);
-
-static void 
-Polyline2(Pict *destPtr, int x1, int y1, int x2, int y2, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *dp;
-    int dx, dy, xDir;
-    unsigned long error;
-
-    if (y1 > y2) {
-	int tmp;
-
-	tmp = y1, y1 = y2, y2 = tmp;
-	tmp = x1, x1 = x2, x2 = tmp;
-    }
-
-    /* First and last Pixels always get Set: */
-    dp = Blt_PicturePixel(destPtr, x1, y1);
-    dp->u32 = colorPtr->u32;
-    dp = Blt_PicturePixel(destPtr, x2, y2);
-    dp->u32 = colorPtr->u32;
-
-    dx = x2 - x1;
-    dy = y2 - y1;
-
-    if (dx >= 0) {
-	xDir = 1;
-    } else {
-	xDir = -1;
-	dx = -dx;
-    }
-    if (dx == 0) {		/*  Vertical line */
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x1, y1);
-	while (dy-- > 0) {
-	    dp += destPtr->pixelsPerRow;
-	    dp->u32 = colorPtr->u32;
-	}
-	return;
-    }
-    if (dy == 0) {		/* Horizontal line */
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x1, y1);
-	while(dx-- > 0) {
-	    dp += xDir;
-	    dp->u32 = colorPtr->u32;
-	}
-	return;
-    }
-    if (dx == dy) {		/* Diagonal line. */
-	Blt_Pixel *dp;
-
-	dp = Blt_PicturePixel(destPtr, x1, y1);
-	while(dy-- > 0) {
-	    dp += destPtr->pixelsPerRow + xDir;
-	    dp->u32 = colorPtr->u32;
-	}
-	return;
-    }
-
-    /* use Wu Antialiasing: */
-
-    error = 0;
-    if (dy > dx) {		/* y-major line */
-	unsigned long adjust;
-
-	/* x1 -= lineWidth / 2; */
-	adjust = (dx << 16) / dy;
-	while(--dy) {
-	    Blt_Pixel *dp;
-	    int x;
-	    unsigned char weight;
-	    
-	    error += adjust;
-	    ++y1;
-	    if (error & ~0xFFFF) {
-		x1 += xDir;
-		error &= 0xFFFF;
-	    }
-	    dp = Blt_PicturePixel(destPtr, x1, y1);
-	    weight = (unsigned char)(error >> 8);
-	    x = x1;
-	    if (x >= 0) {
-		dp->u32 = colorPtr->u32;
-		dp->Alpha = ~weight;
-	    }
-	    x += xDir;
-	    dp += xDir;
-	    if (x >= 0) {
-		dp->u32 = colorPtr->u32;
-		dp->Alpha = weight;
-	    }
-	}
-    } else {			/* x-major line */
-	unsigned long adjust;
-
-	/* y1 -= lineWidth / 2; */
-	adjust = (dy << 16) / dx;
-	while (--dx) {
-	    Blt_Pixel *dp;
-	    int y;
-	    unsigned char weight;
-
-	    error += adjust;
-	    x1 += xDir;
-	    if (error & ~0xFFFF) {
-		y1++;
-		error &= 0xFFFF;
-	    }
-	    dp = Blt_PicturePixel(destPtr, x1, y1);
-	    weight = (unsigned char)(error >> 8);
-	    y = y1;
-	    if (y >= 0) {
-		dp->u32 = colorPtr->u32;
-		dp->Alpha = ~weight;
-	    }
-	    dp += destPtr->pixelsPerRow;
-	    y++;
-	    if (y >= 0) {
-		dp->u32 = colorPtr->u32;
-		dp->Alpha = weight;
-	    } 
-	}
-    }
-}
-
-
-Blt_Picture
-Blt_PaintCheckbox(int w, int h, XColor *fillColor, XColor *outlineColor, 
-		  XColor *checkColor, int on)
-{
-    Shadow shadow;
-    Blt_Pixel color;
-    int x, y;
-    Pict *destPtr;
-
-    destPtr = Blt_CreatePicture(w, h);
-    w -= 5, h -= 5;
-    color.u32 = 0x00;
-    Blt_BlankPicture(destPtr, &color);
-
-    shadow.offset = 1;
-    shadow.alpha = 0xA0;
-    x = y = 2;
-    if (fillColor != NULL) {
-	PaintRectangleShadow(destPtr, x+1, y+1, w-2, h-2, 0, 0, &shadow);
-	color = Blt_XColorToPixel(fillColor);
-	PaintRectangle(destPtr, x+1, y+1, w-2, h-2, 0, 0, &color);
-    }
-    if (outlineColor != NULL) {
-	color = Blt_XColorToPixel(outlineColor);
-	PaintRectangle(destPtr, x, y, w, h, 0, 1, &color);
-    }
-    x += 2, y += 2;
-    w -= 5, h -= 5;
-    if (on) {
-	Point2f points[7];
-	Region2f r;
-
-	points[0].x = points[1].x = points[6].x = x;
-	points[0].y = points[6].y = y + (0.4 * h);
-	points[1].y = y + (0.6 * h);
-	points[2].x = points[5].x = x + (0.4 * w);
-	points[2].y = y + h;
-	points[3].x = points[4].x = x + w;
-	points[3].y = y + (0.2 * h);
-	points[4].y = y;
-	points[5].y = y + (0.7 * h);
-	points[6].x = points[0].x;
-	points[6].y = points[0].y;
-	shadow.offset = 2;
-	r.left = x, r.right = x + w;
-	r.top = y, r.bottom = y + h;
-	color = Blt_XColorToPixel(checkColor);
-	PaintPolygonAA2(destPtr, 7, points, &r, &color, &shadow);
-    }
-    return destPtr;
-}
-
-Blt_Picture
-Blt_PaintRadioButton(int w, int h, XColor *fillColor, XColor *outlineColor, 
-		     XColor *indicatorColor, int on)
-{
-    Blt_Picture picture;
-    CircleSwitches switches;
-    int x, y, r;
-    Blt_Pixel color;
-
-    /* Process switches  */
-    switches.lineWidth = 1;
-    switches.fill = Blt_XColorToPixel(fillColor);
-    switches.outline = Blt_XColorToPixel(outlineColor);
-    switches.alpha = -1;
-    switches.antialiased = 0;
-    switches.shadow.offset = 1;
-    switches.shadow.alpha = 0xA0;
-    switches.antialiased = TRUE;
-
-    picture = Blt_CreatePicture(w, h);
-    color.u32 = 0x00;
-    Blt_BlankPicture(picture, &color);
-    w -= 6, h -= 6;
-    x = w / 2 + 2;
-    y = h / 2 + 2;
-    r = (w+1) / 2;
-    DrawCircle(picture, x, y, r, &switches);
-    if (on) {
-	r -= 6;
-	if (r < 1) {
-	    r = 2;
-	}
-	switches.fill = Blt_XColorToPixel(indicatorColor);
-	switches.outline = switches.fill;
-	switches.lineWidth = 0;
-	switches.shadow.offset = 0;
-	DrawCircle(picture, x, y, r, &switches);
-    }
-    return picture;
-}
-
-
diff --git a/blt3.0/src/bltPictFmts.h b/blt3.0/src/bltPictFmts.h
deleted file mode 100644
index 772410c..0000000
--- a/blt3.0/src/bltPictFmts.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/*
- * bltPictFmts.h --
- *
- * This module implements the various image format conversion routines for
- * picture in the BLT toolkit.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The JPEG reader/writer is adapted from jdatasrc.c and jdatadst.c
- * in the Independent JPEG Group (version 6b) library distribution.
- *
- *	The authors make NO WARRANTY or representation, either express
- *	or implied, with respect to this software, its quality,
- *	accuracy, merchantability, or fitness for a particular
- *	purpose.  This software is provided "AS IS", and you, its
- *	user, assume the entire risk as to its quality and accuracy.
- *
- *	This software is copyright (C) 1991-1998, Thomas G. Lane.  All
- *	Rights Reserved except as specified below.
- *
- *	Permission is hereby granted to use, copy, modify, and
- *	distribute this software (or portions thereof) for any
- *	purpose, without fee, subject to these conditions: (1) If any
- *	part of the source code for this software is distributed, then
- *	this README file must be included, with this copyright and
- *	no-warranty notice unaltered; and any additions, deletions, or
- *	changes to the original files must be clearly indicated in
- *	accompanying documentation.  (2) If only executable code is
- *	distributed, then the accompanying documentation must state
- *	that "this software is based in part on the work of the
- *	Independent JPEG Group".  (3) Permission for use of this
- *	software is granted only if the user accepts full
- *	responsibility for any undesirable consequences; the authors
- *	accept NO LIABILITY for damages of any kind.
- *
- * The GIF reader is from converters/other/giftopnm.c in the netpbm
- * (version 10.19) distribution.
- *
- *	Copyright 1990, 1991, 1993, David Koblas.  (koblas at netcom.com)
- *	Permission to use, copy, modify, and distribute this software
- *	and its documentation for any purpose and without fee is
- *	hereby granted, provided that the above copyright notice
- *	appear in all copies and that both that copyright notice and
- *	this permission notice appear in supporting documentation.
- *	This software is provided "as is" without express or implied
- *	warranty.
- *
- */
-
-#ifndef _BLT_PIC_FMTS_H
-#define _BLT_PIC_FMTS_H
-
-#include <bltChain.h>
-
-#define PIC_PROGRESSIVE	(1<<0)
-#define PIC_NOQUANTIZE	(1<<1)
-
-#define PIC_FMT_ISASCII	(1<<3)
-
-
-typedef int (Blt_PictureIsFmtProc)(Blt_DBuffer buffer);
-
-typedef Blt_Chain (Blt_PictureReadDataProc)(Tcl_Interp *interp, 
-	const char *fileName, Blt_DBuffer buffer);
-
-typedef Tcl_Obj *(Blt_PictureWriteDataProc)(Tcl_Interp *interp, 
-	Blt_Picture picture);
-
-typedef Blt_Chain (Blt_PictureImportProc)(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, const char **fileNamePtr);
-
-typedef int (Blt_PictureExportProc)(Tcl_Interp *interp, unsigned int index,
-	Blt_Chain chain, int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_PictureRegisterFormat(Tcl_Interp *interp, 
-	const char *name, 
-	Blt_PictureIsFmtProc *isFmtProc,
-	Blt_PictureReadDataProc *readProc, 
-	Blt_PictureWriteDataProc *writeProc,
-	Blt_PictureImportProc *importProc, 
-	Blt_PictureExportProc *exportProc);
-
-BLT_EXTERN Blt_Picture Blt_GetNthPicture(Blt_Chain chain, size_t index);
-BLT_EXTERN Tcl_Obj *Blt_EmptyStringObj(void);
-
-#endif /* _BLT_PIC_FMTS_H */
diff --git a/blt3.0/src/bltPictGif.c b/blt3.0/src/bltPictGif.c
deleted file mode 100644
index 14d29c4..0000000
--- a/blt3.0/src/bltPictGif.c
+++ /dev/null
@@ -1,2331 +0,0 @@
-
-/*
- * bltPictGif.c --
- *
- * This module implements GIF file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The GIF reader is from converters/other/giftopnm.c in the netpbm
- * (version 10.19) distribution.
- *
- *	Copyright 1990, 1991, 1993, David Koblas.  (koblas at netcom.com)
- *	Permission to use, copy, modify, and distribute this software and its
- *	documentation for any purpose and without fee is hereby granted,
- *	provided that the above copyright notice appear in all copies and that
- *	both that copyright notice and this permission notice appear in
- *	supporting documentation.  This software is provided "as is" without
- *	express or implied warranty.
- *
- * The GIF writer is in part derived from converters/other/pamtogif.c in 
- * the netpbm (version 10.19) distribution.  
- *
- *	Original version, named 'ppmgif' was by Jef Poskanzer in 1989, based
- *	on GIFENCOD by David Rowley <mgardi at watdscu.waterloo.edu>.A Lempel-Zim
- *	compression based on "compress".
- *
- *	Switched to use libnetpbm PAM facilities (ergo process PAM images) and
- *	renamed 'pamtogif' by Bryan Henderson November 2006.
- *
- *
- *	Copyright (C) 1989 by Jef Poskanzer.
- *
- *	Permission to use, copy, modify, and distribute this software and its
- *	documentation for any purpose and without fee is hereby granted,
- *	provided that the above copyright notice appear in all copies and that
- *	both that copyright notice and this permission notice appear in
- *	supporting documentation.  This software is provided "as is" without
- *	express or implied warranty.
- *
- *	The Graphics Interchange Format(c) is the Copyright property of
- *	CompuServe Incorporated.  GIF(sm) is a Service Mark property of
- *	CompuServe Incorporated.
- *
- * The compression routines also use the following
- *
- *	GIFCOMPR.C       - GIF Image compression routines
- *
- *	Lempel-Ziv compression based on 'compress'.  GIF modifications by *
- *	David Rowley (mgardi at watdcsu.waterloo.edu)
- *
- *	GIF Image compression - modified 'compress'
- *
- *	Based on: compress.c - File compression ala IEEE Computer, June 1984.
- *
- *	By Authors:  
- *		Spencer W. Thomas       (decvax!harpo!utah-cs!utah-gr!thomas)
- *              Jim McKie               (decvax!mcvax!jim)
- *              Steve Davies            (decvax!vax135!petsd!peora!srd)
- *              Ken Turkowski           (decvax!decwrl!turtlevax!ken)
- *              James A. Woods          (decvax!ihnp4!ames!jaw)
- *              Joe Orost               (decvax!vax135!petsd!joe)
- *
- */
-
-#include "blt.h"
-#include "config.h"
-
-#include <ctype.h>
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#include <tcl.h>
-#include <bltAlloc.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#ifdef _MSC_VER
-#define vsnprintf		_vsnprintf
-#endif
-
-#include <setjmp.h>
-
-typedef struct _Blt_Picture Pict;
-
-typedef struct {
-    Blt_Picture original;
-    Blt_Picture current;
-    int delay;
-    int nColors;
-} Frame;
-
-#define TRUE		1
-#define FALSE		0
-
-#define LZW_MAX_BITS	12
-#define LZW_MAX_CODE	(1 << LZW_MAX_BITS)
-
-#define GIF87A		1
-#define GIF89A		2
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-} GifImportSwitches;
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data",  "data",
-	Blt_Offset(GifImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file",  "fileName",
-	Blt_Offset(GifImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    Blt_Pixel bg;
-    const char **comments;		/* Comments */
-    unsigned int flags;
-    int index;
-    int delay;
-} GifExportSwitches;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-#define EXPORT_BLEND	(1<<0)
-#define EXPORT_ANIMATE	(1<<1)
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-animate", "",
-	Blt_Offset(GifExportSwitches, flags),	   0, EXPORT_ANIMATE},
-    {BLT_SWITCH_CUSTOM, "-bg", "color",
-	Blt_Offset(GifExportSwitches, bg),         0, 0, &colorSwitch},
-    {BLT_SWITCH_BITMASK, "-blend", "",
-	Blt_Offset(GifExportSwitches, flags),	   0, EXPORT_BLEND},
-    {BLT_SWITCH_OBJ, "-data",  "data",
-	Blt_Offset(GifExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file",  "fileName",
-	Blt_Offset(GifExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_LIST, "-comments", "{string...}",
-	Blt_Offset(GifExportSwitches, comments),   0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(GifExportSwitches, index), 0},
-    {BLT_SWITCH_INT_NNEG, "-delay", "int",
-	Blt_Offset(GifExportSwitches, delay), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    jmp_buf jmpbuf;
-    Tcl_DString errors;
-    Tcl_DString warnings;
-    int nWarnings, nErrors;
-} GifMessage;
-
-typedef struct {
-    int version;		/* Eithe GIF87A or GIF89A */
-    Blt_Pixel globalColorTable[256];
-    Blt_Pixel localColorTable[256];
-
-    /* Data to be parsed */
-    Blt_DBuffer dbuffer;
-
-    /* Global parameters. */
-    int logicalScreenWidth, logicalScreenHeight;
-    int globalColorTableFlag;
-    int colorResolution;
-    int sortFlag;
-    unsigned int globalColorTableSize;
-    int bgColorIndex;
-    int pixelAspectRatio;
-
-    /* Local parameters. */
-    int imageLeftPosition, imageTopPosition;
-    int imageWidth, imageHeight;
-    int localColorTableFlag;
-    int interlaceFlag;
-    int imageSortFlag;
-    unsigned int localColorTableSize;
-
-    /* Graphic control extension. */
-
-    int disposalMethod;
-    int userInputFlag;
-    int transparentColorFlag;
-    int delayTime;
-    int transparentColorIndex;
-
-    int lzwMinimumCodeSize;
-
-} Gif;
-
-static GifMessage *gifMessagePtr;
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureGifInit;
-
-static unsigned short
-GifGetShort(unsigned char *buf)
-{
-#ifdef WORDS_BIGENDIAN
-    return (buf[0] << 8) | buf[1];
-#else
-    return buf[0] | (buf[1] << 8);
-#endif
-}
-
-static unsigned char *
-GifSetShort(unsigned char *buf, unsigned int value)
-{
-#ifdef WORDS_BIGENDIAN
-    buf[0] = (value >> 8)  & 0xFF;
-    buf[1] = (value)       & 0xFF;
-#else
-    buf[0] = (value)       & 0xFF;
-    buf[1] = (value >> 8)  & 0xFF;
-#endif
-    return buf + 2;
-}
-
-/*ARGSUSED*/
-static void
-GifError TCL_VARARGS_DEF(const char *, arg1)
-{
-    const char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&gifMessagePtr->errors, string, -1);
-    va_end(args);
-    longjmp(gifMessagePtr->jmpbuf, 0);
-}
-
-/*ARGSUSED*/
-static void
-GifWarning TCL_VARARGS_DEF(const char *, arg1)
-{
-    const char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&gifMessagePtr->warnings, string, -1);
-    va_end(args);
-    gifMessagePtr->nWarnings++;
-}
-
-/*
- *     0  3	Signature	"GIF" 
- *     3  3     Version		"89a"
- */
-static int
-GifHeader(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char *bp;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < 6) {
-	return FALSE;
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    if ((bp[0] != 'G') || (bp[1] != 'I') || (bp[2] != 'F') || (bp[3] != '8') ||
-	(bp[5] != 'a')) {
-	return FALSE;
-    }
-    if (bp[4] == '7') {
-	gifPtr->version = GIF87A;
-    } else if (bp[4] == '9') {
-	gifPtr->version = GIF89A;
-    }
-    Blt_DBuffer_IncrCursor(dbuffer, 6);
-    return TRUE;
-}
-
-/*
- *     0  2	Logical Screen Width
- *     2  2     Logical Screen Height 
- *     4  1     Flags 
- *		bit 7    = Global color table flag.
- *		bits 4-6 = Color resolution.
- *		bit 3    = Sort flag.
- *		bits 0-2 = Size of global color table.
- *     5  1     Background Color Index
- *     6  1     Pixel Aspect Ratio
- */
-static void
-GifReadLogicalScreenDescriptor(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char *bp;
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) <  7) {
-	GifError("short file: expected 7 bytes for GIF logical screen descriptor");
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    /* Logical Screen Descriptor. */
-    gifPtr->logicalScreenWidth =  GifGetShort(bp + 0);
-    gifPtr->logicalScreenHeight = GifGetShort(bp + 2);
-    gifPtr->globalColorTableFlag = (bp[4] & 0x80);
-    gifPtr->colorResolution =	((bp[4] & 0x70) >> 4);
-    gifPtr->sortFlag = (bp[4] & 0x08) >> 3;
-    gifPtr->globalColorTableSize = 1 << ((bp[4] & 0x07) + 1);
-    gifPtr->bgColorIndex = bp[5];	/* Index of bgcolor color */
-    gifPtr->pixelAspectRatio = bp[6];
-    Blt_DBuffer_IncrCursor(dbuffer, 7);
-#ifdef notdef
-    fprintf(stderr, "screen width = %d\n", gifPtr->logicalScreenWidth);
-    fprintf(stderr, "screen height = %d\n", gifPtr->logicalScreenHeight);
-    fprintf(stderr, "global color table flag = %d\n", gifPtr->globalColorTableFlag);
-    fprintf(stderr, "color resolution = %d\n", gifPtr->colorResolution);
-    fprintf(stderr, "sort flag = %d\n", gifPtr->sortFlag);
-    fprintf(stderr, "global color table size = %d\n", gifPtr->globalColorTableSize);
-    fprintf(stderr, "bg color index = %d\n", gifPtr->bgColorIndex);
-    fprintf(stderr, "pixel aspect ratio = %d\n", gifPtr->pixelAspectRatio);
-#endif
-}
-
-/*
- *        7 6 5 4 3 2 1 0        Field Name                    Type 
- *      +================+ 
- *   0  |                |       Red 0                         Byte 
- *   1  |                |       Green 0                       Byte 
- *   2  |                |       Blue 0                        Byte 
- *   3  |                |       Red 1                         Byte 
- *      |                |       Green 1                       Byte 
- *  up  |                | 
- *  to  |                | 
- *      |                |       Green 255                     Byte 
- * 767  |                |       Blue 255                      Byte 
- *      +================+ 
- */
-static void
-GifReadGlobalColorTable(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    Blt_Pixel *dp;
-    unsigned int i;
-    unsigned char *bp;
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) < (gifPtr->globalColorTableSize*3)) {
-	GifError("short file: expected %d bytes for GIF global color table",
-		 gifPtr->globalColorTableSize * 3);
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    dp = gifPtr->globalColorTable;
-    for (i = 0; i < gifPtr->globalColorTableSize; i++) {
-	dp->Red = bp[0];
-	dp->Green = bp[1];
-	dp->Blue = bp[2];
-	dp->Alpha = ALPHA_OPAQUE;
-	dp++;
-	bp += 3;
-    }	    
-    Blt_DBuffer_SetPointer(dbuffer, bp);
-}
-
-/*
- *       7 6 5 4 3 2 1 0        Field Name                    Type
- *     +----------------+
- *  0  |                |       Image Separator               Byte
- *     +----------------+
- *  1  |                |       Image Left Position           Unsigned
- *  2  |                |
- *     +----------------+
- *  3  |                |       Image Top Position            Unsigned
- *  4  |                |
- *     +----------------+
- *  5  |                |       Image Width                   Unsigned
- *  6  |                |
- *     +----------------+
- *  7  |                |       Image Height                  Unsigned
- *  8  |                |
- *     +----------------+
- *  9  | | | |   |      |	See below
- *     +----------------+
- *
- *			=	Local Color Table Flag        1 Bit
- *				Interlace Flag                1 Bit
- *				Sort Flag                     1 Bit
- *				Reserved                      2 Bits
- *				Size of Local Color Table     3 Bits
- */
-static void
-GifReadImageDescriptor(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char *bp;
-    int size;
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) < 9) {
-	GifError("short file: expected 9 bytes for GIF image descriptor");
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    gifPtr->imageLeftPosition =   GifGetShort(bp + 0);
-    gifPtr->imageTopPosition =    GifGetShort(bp + 2);
-    gifPtr->imageWidth =          GifGetShort(bp + 4);
-    gifPtr->imageHeight =         GifGetShort(bp + 6);
-    gifPtr->localColorTableFlag = (bp[8] & 0x80) >> 7;
-    gifPtr->interlaceFlag =       (bp[8] & 0x40) >> 6;
-    gifPtr->imageSortFlag =       (bp[8] & 0x20) >> 5;
-    size =                        (bp[8] & 0x07);
-    if (size > 0) {
-        size = 1 << (size + 1);
-    }
-    gifPtr->localColorTableSize = size;
-    Blt_DBuffer_IncrCursor(dbuffer, 9);
-}
-
-/*
- *        7 6 5 4 3 2 1 0        Field Name                    Type 
- *      +================+ 
- *   0  |                |       Red 0                         Byte 
- *   1  |                |       Green 0                       Byte 
- *   2  |                |       Blue 0                        Byte 
- *   3  |                |       Red 1                         Byte 
- *      |                |       Green 1                       Byte 
- *  up  |                | 
- *  to  |                | 
- *      |                |       Green 255                     Byte 
- * 767  |                |       Blue 255                      Byte 
- *      +================+ 
- */
-static void
-GifReadLocalColorTable(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char *bp;
-    Blt_Pixel *dp;
-    unsigned int i;
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) < (gifPtr->localColorTableSize*3)) {
-	GifError("short file: expected %d bytes for GIF local color table",
-		 gifPtr->localColorTableSize * 3);
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    dp = gifPtr->localColorTable;
-    for (i = 0; i < gifPtr->localColorTableSize; i++) {
-	dp->Red = bp[0];
-	dp->Green = bp[1];
-	dp->Blue = bp[2];
-	dp->Alpha = ALPHA_OPAQUE;
-	dp++;
-	bp += 3;
-    }	    
-    Blt_DBuffer_SetPointer(dbuffer, bp);
-}
-
-
-/*
- *        7 6 5 4 3 2 1 0        Field Name                    Type 
- *      +----------------+ 
- *   0  |                |       Extension Introducer          Byte 
- *      +----------------+ 
- *   1  |                |       Graphic Control Label         Byte 
- *      +----------------+ 
- *
- *      +----------------+ 
- *   0  |                |       Block Size                    Byte 
- *      +----------------+ 
- *   1  |      |     | | |                      See below 
- *      +----------------+ 
- *   2  |                |       Delay Time                    Unsigned 
- *   3  |                | 
- *      +----------------+ 
- *   4  |                |       Transparent Color Index       Byte 
- *      +----------------+ 
- *
- *      +----------------+ 
- *   0  |                |       Block Terminator              Byte 
- *      +----------------+ 
- *
- *
- *      		  =     Reserved                      3 Bits 
- *                              Disposal Method               3 Bits 
- *                              User Input Flag               1 Bit 
- *                              Transparent Color Flag        1 Bit 
- */
-static void
-GifReadGraphicControlExtension(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned int length;
-
-    
-    while ((length = Blt_DBuffer_NextByte(dbuffer)) > 0) {
-	unsigned char *bp;
-
-	bp = Blt_DBuffer_Pointer(dbuffer);
-	gifPtr->disposalMethod = (bp[0] & 0x1C) >> 2;
-	gifPtr->userInputFlag = bp[0] & 0x02;
-	gifPtr->transparentColorFlag = bp[0] & 0x01;
-	gifPtr->delayTime = GifGetShort(bp + 1);
-	gifPtr->transparentColorIndex = bp[3];
-	Blt_DBuffer_IncrCursor(dbuffer, length);
-    }
-}
-
-/*
- * Optional comment block
- */
-static void 
-GifReadCommentExtension(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char length;
-
-    while ((length = Blt_DBuffer_NextByte(dbuffer)) > 0) {
-	unsigned char *bp;
-
-	if (Blt_DBuffer_BytesLeft(dbuffer) < length) {
-	    GifError("short file: expected %d bytes for GIF comment block", 
-		     length);
-	}
-	bp = Blt_DBuffer_Pointer(dbuffer);
-#ifdef notdef
-	{
-	int i;
-	fprintf(stderr, "comment %d bytes follows\n", length);
-	for (i = 0; i < length; i++) {
-	    if (isprint(bp[i]) || isspace(bp[i])) {
-		fprintf(stderr, "%c", bp[i]);
-	    } else {
-		fprintf(stderr, "{%.2x}", bp[i]);
-	    }
-	}
-	fprintf(stderr, "\n");
-	}
-#endif
-	Blt_DBuffer_IncrCursor(dbuffer, length);
-    }
-    assert(length == 0);
-}
-
-static void
-GifReadUnknownExtension(Blt_DBuffer dbuffer, int ident, Gif *gifPtr)
-{
-    unsigned char length;
-    const char *ext;
-    
-    if (ident == 0x01) {
-	ext = "plain text";
-    } else if (ident == 0xFF) {
-	ext = "application";
-    } else {
-	ext = "???";
-    }
-#ifdef notdef
-    fprintf(stderr, "read %s extension\n", ext);
-#endif
-    /* Skip the data sub-blocks */
-    while ((length = Blt_DBuffer_NextByte(dbuffer)) > 0) {
-	if (Blt_DBuffer_BytesLeft(dbuffer) < length) {
-	    GifError("short file: expected %d bytes for %s extension block",
-		     length, ext);
-	}
-	Blt_DBuffer_IncrCursor(dbuffer, length);
-    }
-#ifdef notdef
-    fprintf(stderr, "down reading %s extension\n", ext);
-#endif
-}
-
-static void
-GifReadExtensions(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    unsigned char byte;
-    /* 
-     * Handle only the "Graphic control extension" block, ignoring all others
-     * (text, comment, and application).
-     */
-    byte = Blt_DBuffer_NextByte(dbuffer);
-    switch (byte) {
-    case 0xF9:			/* Graphic control extension. */
-	GifReadGraphicControlExtension(dbuffer, gifPtr);
-	break;
-
-    case 0xFE:			/* Comment extension. */
-	GifReadCommentExtension(dbuffer, gifPtr);
-	break;
-
-    default:
-    case 0x01:			/* Plain text extension. */
-    case 0xFF:			/* Application extension */
-	GifReadUnknownExtension(dbuffer, byte, gifPtr);
-	break;
-    }
-#ifdef notdef
-    assert(byte == 0);
-    byte = Blt_DBuffer_NextByte(dbuffer);
-#endif
-}
-
-static int
-GifReadDataBlock(Blt_DBuffer dbuffer, unsigned char *out) 
-{
-    unsigned int length;
-
-    length = Blt_DBuffer_NextByte(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < length) {
-	return -1;
-    } 
-    if (length > 0) {
-	memcpy(out, Blt_DBuffer_Pointer(dbuffer), length);
-	Blt_DBuffer_IncrCursor(dbuffer, length);
-    }
-    return (int)length;
-}
-
-
-/* Stack grows from low addresses to high addresses */
-typedef struct {
-    int *stack;			/* Malloc'ed array */
-    int *sp;			/* Stack pointer */
-    int *top;			/* Next word above top of stack */
-} LzwStack;
-
-typedef struct {
-    unsigned char buf[280];	/* This is the buffer through which we read
-				 * the data from the stream.  We must buffer
-				 * it because we have to read whole data
-				 * blocks at a time, but our client wants one
-				 * code at a time.  The buffer typically
-				 * contains the contents of one data block
-				 * plus two bytes from the previous data
-				 * block. */
-    int bufCount;		/* # of bytes of contents in buf[]. */
-    int curbit;			/* The bit number (starting at 0) within buf[]
-				 * of the next bit to be returned.  If the
-				 * next bit to be returned is not yet in buf[]
-				 * (we've already returned everything in
-				 * there), this points one beyond the end of
-				 * the buffer contents.
-				 */
-    int streamExhausted;	/* The last time we read from the input
-				 * stream, we got an EOD marker or EOF */
-} LzwCodeState;
-
-
-/*-------------------------------------------------------------------------------
-   Some notes on LZW.
-
-   LZW is an extension of Limpel-Ziv.  The two extensions are:
-
-     1) in Limpel-Ziv, codes are all the same number of bits.  In
-        LZW, they start out small and increase as the stream progresses.
-
-     2) LZW has a clear code that resets the string table and code
-        size.
-
-   The LZW code space is allocated as follows:
-
-   The true data elements are dataWidth bits wide, so the maximum value of a
-   true data element is 2**dataWidth-1.  We call that max_dataVal.  The first
-   byte in the stream tells you what dataWidth is.
-
-   LZW codes 0 - max_dataVal are direct codes.  Each on represents the true
-   data element whose value is that of the LZW code itself.  No decompression
-   is required.
-
-   max_dataVal + 1 and up are compression codes.  They encode true data
-   elements:
-
-   max_dataVal + 1 is the clear code.
-         
-   max_dataVal + 2 is the end code.
-
-   max_dataVal + 3 and up are string codes.  Each string code represents a
-   string of true data elements.  The translation from a string code to the
-   string of true data elements varies as the stream progresses.  In the
-   beginning and after every clear code, the translation table is empty, so no
-   string codes are valid.  As the stream progresses, the table gets filled
-   and more string codes become valid.
-
---------------------------------------------------------------------------*/
-
-typedef struct {
-    LzwStack stack;
-    int fresh;			/* The stream is right after a clear code or
-				   at the very beginning */
-    int codeSize;		/* Current code size -- each LZW code in this
-				 * part of the image is this many bits.  Ergo,
-				 * we read this many bits at a time from the
-				 * stream. */
-
-    int maxnum_code;		/* Maximum number of LZW codes that can be
-				 * represented with the current code size. (1
-				 * << codeSize) */
-
-    int next_tableSlot;		/* Index in the code translation table of the
-				 * next free entry */
-    int firstcode;		/* This is always a true data element code */
-    int prevcode;		/* The code just before, in the image, the one
-				 * we're processing now */
-
-    int table[2][(1 << LZW_MAX_BITS)];
-
-    /* The following are constant for the life of the decompressor */
-    int init_codeSize;
-    int max_dataVal;
-    int clear_code;
-    int end_code; 
-
-    Blt_DBuffer dbuffer;
-} LzwDecompressor;
-
-static int zeroDataBlock = 0;
-
-static void
-LzwInitCodeState(LzwCodeState *statePtr) 
-{
-    /* Fake a previous data block */
-    statePtr->buf[0] = statePtr->buf[1] = 0;
-    statePtr->bufCount = 2;
-    statePtr->curbit = statePtr->bufCount * 8;
-    statePtr->streamExhausted = 0;
-}
-
-static void
-LzwGetAnotherBlock(Blt_DBuffer dbuffer, LzwCodeState *statePtr) 
-{
-    int count;
-    unsigned int assumed_count;
-
-    /* 
-     * Shift buffer down so last two bytes are now the first two bytes.  Shift
-     * 'curbit' cursor, which must be somewhere in or immediately after those
-     * two bytes, accordingly.
-     */
-    statePtr->buf[0] = statePtr->buf[statePtr->bufCount-2];
-    statePtr->buf[1] = statePtr->buf[statePtr->bufCount-1];
-
-    statePtr->curbit -= (statePtr->bufCount-2)*8;
-    statePtr->bufCount = 2;
-        
-    /* Add the next block to the buffer */
-    count = GifReadDataBlock(dbuffer, statePtr->buf  + statePtr->bufCount);
-    if (count == -1) {
-        GifWarning("EOF encountered in image before EOD marker.  The GIF file is malformed, but we are proceeding anyway as if an EOD marker were at the end of the file.");
-        assumed_count = 0;
-    } else {
-        assumed_count = count;
-    }
-    statePtr->streamExhausted = (assumed_count == 0);
-    statePtr->bufCount += assumed_count;
-}
-
-static int
-LzwNextCode(Blt_DBuffer dbuffer, int codeSize, LzwCodeState *statePtr) 
-{
-    int result;
-
-    if (((statePtr->curbit + codeSize) > (statePtr->bufCount * 8)) && 
-	(!statePtr->streamExhausted)) {
-        /* 
-	 * Not enough left in buffer to satisfy request.  Get the next
-	 * data block into the buffer.
-	 */
-        LzwGetAnotherBlock(dbuffer, statePtr);
-    }
-    if ((statePtr->curbit + codeSize) > (statePtr->bufCount * 8)) {
-        /* 
-	 * If the buffer still doesn't have enough bits in it, that means
-	 * there were no data blocks left to read.
-	 */
-	result = -1;  /* EOF */
-
-        {
-            int const bitsUnused = (statePtr->bufCount * 8) - statePtr->curbit;
-            if (bitsUnused > 0) {
-                GifWarning("Stream ends with a partial code (%d bits left in file; expected a %d bit code). Ignoring.", bitsUnused, codeSize);
-	    }
-        }
-    } else {
-        int i, j;
-        int code;
-        unsigned char *bp;
-
-        bp = statePtr->buf;
-        code = 0;		/* Initial value */
-        for (i = statePtr->curbit, j = 0; j < codeSize; ++i, ++j) {
-            code |= ((bp[ i / 8 ] & (1 << (i % 8))) != 0) << j;
-	}
-        statePtr->curbit += codeSize;
-        result = code;
-    }
-    return result;
-}
-
-/*---------------------------------------------------------------------------
- * 
- * LzwGetCode --
- *
- *	If 'init', initialize the code getter.  Otherwise, read and return the
- *	next LZW code from the buffer.
- *
- * Results:
- *	Retunes the retrieved code.  Otherwise -1 if we encounter the
- *	end of the file.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LzwGetCode(
-    Blt_DBuffer dbuffer,	/* Buffer to read from. */
-    int codeSize,		/* # of bits in the code we are to get. */
-    int init)			/* Indicates to initial the code reader. */
-{
-    static LzwCodeState state;
-
-    if (init) {
-        LzwInitCodeState(&state);
-        return 0;
-    } 
-    return LzwNextCode(dbuffer, codeSize, &state);
-}
-
-static void 
-LzwInitStack(
-    LzwDecompressor *lzwPtr, 
-    size_t size) 
-{
-    lzwPtr->stack.stack = Blt_Malloc(size * sizeof(int));
-    if (lzwPtr->stack.stack == NULL) {
-        GifError("Unable to allocate %d -word stack.", size);
-    }
-    lzwPtr->stack.sp = lzwPtr->stack.stack;
-    lzwPtr->stack.top = lzwPtr->stack.stack + size;
-}
-
-static void
-LzwPushStack(LzwDecompressor *lzwPtr, int const value) 
-{
-    if (lzwPtr->stack.sp >= lzwPtr->stack.top) {
-        GifError("stack overflow");
-    }
-    *(lzwPtr->stack.sp++) = value;
-}
-
-static int
-LzwStackIsEmpty(LzwDecompressor *lzwPtr) 
-{
-    return (lzwPtr->stack.sp == lzwPtr->stack.stack);
-}
-
-static int
-LzwPopStack(LzwDecompressor *lzwPtr) 
-{
-    if (lzwPtr->stack.sp <= lzwPtr->stack.stack) {
-        GifError("stack underflow");
-    }
-    return *(--lzwPtr->stack.sp);
-}
-
-static void
-LzwTermStack(LzwDecompressor *lzwPtr) 
-{
-    Blt_Free(lzwPtr->stack.stack);
-    lzwPtr->stack.stack = NULL;
-}
-
-static void
-LzwResetDecompressor(LzwDecompressor *lzwPtr) 
-{
-    lzwPtr->codeSize = lzwPtr->init_codeSize + 1;
-    lzwPtr->maxnum_code = 1 << lzwPtr->codeSize;
-    lzwPtr->next_tableSlot = lzwPtr->max_dataVal + 3;
-    lzwPtr->fresh = 1;
-}
-
-static void
-LzwInitDecompressor(Blt_DBuffer dbuffer, int codeSize, LzwDecompressor *lzwPtr) 
-{
-    lzwPtr->init_codeSize = codeSize;
-
-    lzwPtr->max_dataVal = (1 << codeSize) - 1;
-    lzwPtr->clear_code = lzwPtr->max_dataVal + 1;
-    lzwPtr->end_code = lzwPtr->max_dataVal + 2;
-    
-    /* 
-     * The entries in the translation table for true data codes are constant
-     * throughout the stream.  We set them now and they never change.
-     */
-    {
-        int i;
-
-        for (i = 0; i <= lzwPtr->max_dataVal; ++i) {
-            lzwPtr->table[0][i] = 0;
-            lzwPtr->table[1][i] = i;
-        }
-    }
-    LzwResetDecompressor(lzwPtr);
-    LzwGetCode(dbuffer, 0, TRUE);
-    lzwPtr->dbuffer = dbuffer;
-    lzwPtr->fresh = TRUE;
-    LzwInitStack(lzwPtr, LZW_MAX_CODE * 2);
-}
-
-static void
-LzwTermDecompressor(LzwDecompressor *lzwPtr) 
-{
-    LzwTermStack(lzwPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * LzwExpandCodeOntoStack --
- *
- *	'incode' is an LZW string code.  It represents a string of true data
- *	elements, as defined by the string translation table in *decompP.
- *
- *	Expand the code to a string of LZW direct codes and push them onto the
- *	stack such that the leftmost code is on top.
- *
- *	Also add to the translation table where appropriate.
- *
- * Results:
- *	If successful, return TRUE. Iff the translation table contains a cycle
- *	(which means the LZW stream from which it was built is invalid),
- *	return FALSE.
- *	
- *---------------------------------------------------------------------------
- */
-static int
-LzwExpandCodeOntoStack(LzwDecompressor *lzwPtr, int incode) 
-{
-    int code;
-    int error;
-
-    error = FALSE;
-    if (incode < lzwPtr->next_tableSlot) {
-        code = incode;
-    } else {
-        /* It's a code that isn't in our translation table yet */
-        LzwPushStack(lzwPtr, lzwPtr->firstcode);
-        code = lzwPtr->prevcode;
-    }
-
-    {
-        /* 
-	 * Get the whole string that this compression code represents and push
-	 * it onto the code stack so the leftmost code is on top.  Set
-	 * lzwPtr->firstcode to the first (leftmost) code in that string.
-	 */
-        unsigned int stringCount;
-        stringCount = 0;
-
-        while ((code > lzwPtr->max_dataVal) && (!error)) {
-            if (stringCount > LZW_MAX_CODE) {
-                GifError("contains LZW string loop");
-            } 
-	    ++stringCount;
-	    LzwPushStack(lzwPtr, lzwPtr->table[1][code]);
-	    code = lzwPtr->table[0][code];
-        }
-        lzwPtr->firstcode = lzwPtr->table[1][code];
-        LzwPushStack(lzwPtr, lzwPtr->firstcode);
-    }
-
-    if (lzwPtr->next_tableSlot < LZW_MAX_CODE) {
-
-        lzwPtr->table[0][lzwPtr->next_tableSlot] = lzwPtr->prevcode;
-        lzwPtr->table[1][lzwPtr->next_tableSlot] = lzwPtr->firstcode;
-        ++lzwPtr->next_tableSlot;
-
-        if (lzwPtr->next_tableSlot >= lzwPtr->maxnum_code) {
-            /* 
-	     * We've used up all the codes of the current code size.  Future
-	     * codes in the stream will have codes one bit longer.  But
-	     * there's an exception if we're already at the LZW maximum, in
-	     * which case the codes will simply continue the same size.
-	     */
-            if (lzwPtr->codeSize < LZW_MAX_BITS) {
-                ++lzwPtr->codeSize;
-                lzwPtr->maxnum_code = 1 << lzwPtr->codeSize;
-            }
-        }
-    }
-    lzwPtr->prevcode = incode;
-    return error == 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LzwReadByte --
- *
- *	Returns the next data element of the decompressed image.  In the
- *	context of a GIF, a data element is the color table index of one
- *	pixel.
- *
- *	We read and return the next byte of the decompressed image:
- *
- * Results:
- *	Returns -1, if we hit EOF prematurely (i.e. before an "end" code.  We
- *	forgive the case that the "end" code is followed by EOF instead of an
- *	EOD marker (zero length DataBlock)).
- *
- *	Returns -2 if there are no more bytes in the image.
- *
- *	Returns -3 if we encounter errors in the LZW stream. 
- *
- *---------------------------------------------------------------------------
- */
-static int
-LzwReadByte(LzwDecompressor *lzwPtr) 
-{
-    int code;
-
-    if (!LzwStackIsEmpty(lzwPtr)) {
-        return LzwPopStack(lzwPtr);
-    }
-    if (lzwPtr->fresh) {
-        lzwPtr->fresh = FALSE;
-        /* 
-	 * Read off all initial clear codes, read the first non-clear code,
-	 * and return it.  There are no strings in the table yet, so the next
-	 * code must be a direct true data code.
-	 */
-        do {
-            lzwPtr->firstcode = LzwGetCode(lzwPtr->dbuffer, lzwPtr->codeSize, 
-		FALSE);
-            lzwPtr->prevcode = lzwPtr->firstcode; 
-	} while (lzwPtr->firstcode == lzwPtr->clear_code);
-
-        return lzwPtr->firstcode;
-    } 
-    code = LzwGetCode(lzwPtr->dbuffer, lzwPtr->codeSize, FALSE);
-    if (code < 0) {
-	return code;
-    } 
-    if (code == lzwPtr->clear_code) {
-	LzwResetDecompressor(lzwPtr);
-	return LzwReadByte(lzwPtr);
-    } 
-    if (code == lzwPtr->end_code) {
-	if (!zeroDataBlock) {
-	    /* readThroughEod(lzwPtr->ifP); */
-	}
-	return -2;
-    } 
-    if (!LzwExpandCodeOntoStack(lzwPtr, code)) {
-	return -3;
-    }
-    return LzwPopStack(lzwPtr);
-}
-
-static Blt_Picture
-GifCreatePictureFromData(Blt_DBuffer dbuffer, Gif *gifPtr) 
-{
-    Pict *destPtr;
-    Blt_Pixel *colormap;
-    LzwDecompressor lzw;
-    int v;
-    int xOffset, yOffset;
-
-    colormap = (gifPtr->localColorTableFlag) ? gifPtr->localColorTable :
-	gifPtr->globalColorTable;
-    LzwInitDecompressor(dbuffer, gifPtr->lzwMinimumCodeSize, &lzw);
-
-    destPtr = Blt_CreatePicture(gifPtr->logicalScreenWidth, 
-				gifPtr->logicalScreenHeight);
-    if (!gifPtr->transparentColorFlag) {
-	gifPtr->transparentColorIndex = -1;
-    } 
-    xOffset = gifPtr->imageLeftPosition;
-    yOffset = gifPtr->imageTopPosition;
-    if ((xOffset > 0) || (yOffset > 0) || (gifPtr->transparentColorFlag)) {
-	Blt_Pixel color;
-
-	color.u32 = 0x00000000;
-	Blt_BlankPicture(destPtr, &color);
-    }
-    destPtr->delay = gifPtr->delayTime * 10;  /* Convert to milliseconds. */
-    if (destPtr->delay == 0) {
-	destPtr->delay = 100;
-    }
-    if (gifPtr->interlaceFlag) {
-	static int istart[] = { 0, 4, 2, 1 };
-	static int istep[] = { 8, 8, 4, 2 };
-	int x, y, pass;
-	
-	pass = 0;
-	x = y = 0;
-	while ((v = LzwReadByte(&lzw)) >= 0) {
-	    Blt_Pixel *dp;
-	    
-	    dp = Blt_PicturePixel(destPtr, x + xOffset, y + yOffset);
-	    dp->u32 = colormap[v].u32;
-	    if (v == gifPtr->transparentColorIndex) {
-		dp->Alpha = 0x0;
-		destPtr->flags |= BLT_PIC_MASK;
-	    }
-	    ++x;
-	    if (x == gifPtr->imageWidth) {
-		x = 0;
-		y += istep[pass]; /* 8, 8, 4, 2 */
-		if (y >= gifPtr->imageHeight) {
-		    ++pass;
-		    y = istart[pass]; /* 0, 4, 2, 1 */
-		    if (y == 0) {
-			goto done;
-		    }
-		}
-	    }
-	    if (y >= gifPtr->imageHeight) {
-		break;
-	    }
-	}
-    } else {
-	Blt_Pixel *destRowPtr;
-	int y;
-
-	v = 0;			/* Suppress compiler warning. */
-	destRowPtr = destPtr->bits + (yOffset*destPtr->pixelsPerRow) + xOffset;
-	for (y = 0; y < gifPtr->imageHeight; y++) {
-	    Blt_Pixel *dp, *dend;
-
-	    for (dp = destRowPtr, dend = dp + gifPtr->imageWidth; dp < dend; 
-		 dp++) {
-		v = LzwReadByte(&lzw);
-		if (v < 0) {
-		    goto done;
-		}
-		dp->u32 = colormap[v].u32;
-		if (v == gifPtr->transparentColorIndex) { 
-		    dp->Alpha = 0x0;
-		    destPtr->flags |= BLT_PIC_MASK;
-		}
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
- done:
-    if (v == -3) {
-        GifError("Error in GIF input stream");
-    } 
-    if (LzwReadByte(&lzw) >= 0) {
-	GifWarning("too much input data, ignoring extra...");
-    }
-    LzwTermDecompressor(&lzw);
-    return destPtr;
-}
-
-static Blt_Picture 
-GifImageDescriptor(Blt_DBuffer dbuffer, Gif *gifPtr)
-{
-    Blt_Picture picture;
-
-    GifReadImageDescriptor(dbuffer, gifPtr);
-    if (gifPtr->localColorTableFlag) {
-	GifReadLocalColorTable(dbuffer, gifPtr);
-    }
-    /* Get LZW minimum code size. */
-    gifPtr->lzwMinimumCodeSize = Blt_DBuffer_NextByte(dbuffer);
-    /* Get Image data */
-    picture = GifCreatePictureFromData(dbuffer, gifPtr);
-
-    /* The image block may or may not end in a 0 byte. Skip it if it
-    * exists. */
-    if (*Blt_DBuffer_Pointer(dbuffer) == 0) {
-	Blt_DBuffer_IncrCursor(dbuffer, 1);
-    }
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GifToPictures --
- *
- *      Reads a GIF file and converts it into a one or more pictures
- *	returned in a list.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the
- *      designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain 
-GifToPictures(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer,
-	      GifImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-    Blt_Picture composite, next;
-    Gif gif;
-    GifMessage message;
-    
-    gifMessagePtr = &message;
-    memset(&gif, 0, sizeof(gif)); /* Clear the structure. */
-    message.nWarnings = 0;
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    Tcl_DStringAppend(&message.errors, "error reading \"", -1);
-    Tcl_DStringAppend(&message.errors, fileName, -1);
-    Tcl_DStringAppend(&message.errors, "\": ", -1);
-
-    if (setjmp(message.jmpbuf)) {
-	Tcl_DStringResult(interp, &message.errors);
-	Tcl_DStringFree(&message.warnings);
-	return NULL;
-    }
-    if (!GifHeader(dbuffer, &gif)) {
-	GifError("bad GIF header");
-    }
-    GifReadLogicalScreenDescriptor(dbuffer, &gif);
-    if (gif.globalColorTableFlag) {
-	GifReadGlobalColorTable(dbuffer, &gif);
-    }
-    chain = Blt_Chain_Create();
-    next = composite = NULL;
-    while (Blt_DBuffer_Cursor(dbuffer) < Blt_DBuffer_Length(dbuffer)) {
-	int byte;
-	Pict *srcPtr;
-
-	byte = Blt_DBuffer_NextByte(dbuffer);
-	switch (byte) {
-	case '!':		/* GIF extension */
-	    GifReadExtensions(dbuffer, &gif);
-	    break;
-	case ',':		/* Image descriptor. */
-	    srcPtr = GifImageDescriptor(dbuffer, &gif);
-	    if (composite == NULL) {
-		next = Blt_ClonePicture(srcPtr);
-	    } else {
-		switch (gif.disposalMethod) {
-		case 0:		/* Do nothing, blend with background */
-		case 1:	{	/* Blend with background */
-		    int delay;
-		    
-		    delay = srcPtr->delay;
-		    /* Blend in the next frame into the current composite. */
-		    Blt_BlendPictures(composite, srcPtr, 0, 0, 
-				      srcPtr->width, srcPtr->height, 0, 0);
-		    Blt_FreePicture(srcPtr);
-		    srcPtr = composite;
-		    /* Save a copy of the new composite for the next frame. */
-		    next = Blt_ClonePicture(composite);
-		    srcPtr->delay = delay;
-		    break;
-		} 
-		case 2: {	/* Restore background. Don't blend. */
-		    Blt_Pixel pixel;
-		    int delay;
-		    
-		    delay = srcPtr->delay;
-		    Blt_BlendPictures(composite, srcPtr, 0, 0, 
-				      srcPtr->width, srcPtr->height, 0, 0);
-		    Blt_FreePicture(srcPtr);
-		    srcPtr = composite;
-		    /* Make a copy of the new composite. */
-		    next = Blt_ClonePicture(composite);
-		    srcPtr->delay = delay;
-		    /* Clear the current region for the next frame. */
-		    pixel.u32 = 0x0;
-		    Blt_BlankRegion(next, gif.imageLeftPosition, 
-				    gif.imageTopPosition, 
-				    gif.imageWidth, gif.imageHeight, 
-				    &pixel);
-		    break;
-		}
-		case 3: {	/* Restore to previous. */
-		    int delay;
-		    
-		    delay = srcPtr->delay;
-		    /* Save a copy of the current composite for the next
-		     * frame. */
-		    next = Blt_ClonePicture(composite);
-		    /* Blend in the next frame. */
-		    Blt_BlendPictures(composite, srcPtr, 0, 0, 
-				      srcPtr->width, srcPtr->height, 0, 0);
-		    Blt_FreePicture(srcPtr);
-		    srcPtr = composite;
-		    srcPtr->delay = delay;
-		    break;
-		}
-		default:
-		    fprintf(stderr, "unknown disposal method %d\n", 
-			    gif.disposalMethod);
-		    break;
-		}
-	    }
-	    Blt_Chain_Append(chain, srcPtr);
-	    composite = next;
-	    break;
-	case ';':		/* File terminator */
-	    goto done;
-	default:
-	    fprintf(stderr, "ignoring %x at %d of %d\n", byte, 
-		    (int)Blt_DBuffer_Cursor(dbuffer), 
-		    (int)Blt_DBuffer_Length(dbuffer));
-	}
-    }
- done:
-    if (composite != NULL) {
-	Blt_FreePicture(composite);
-    }
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "GIF_READ_WARNINGS", 
-		Tcl_DStringValue(&message.warnings), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    Tcl_DStringFree(&message.errors);
-    return chain;
-}
-
-static int 
-GetLog2(unsigned int n) 
-{
-    int i;
-
-    for (i = 0; (n >> i) != 0; i++) {
-	/*empty*/
-    }
-    return i;
-}
-
-/*
- * Logical Screen Descriptor
- *
- *     6  0  2    Logical Screen Width
- *     8  2  2    Logical Screen Height 
- *     10 4  1    Flags 
- *			bit 7    = Global color table flag.
- *			bits 4-6 = Color resolution.
- *			bit 3    = Sort flag.
- *			bits 0-2 = Size of global color table.
- *     11 5  1    Background Color Index
- *     12 6  1    Pixel Aspect Ratio
- */
-static void 
-GifWriteLogicalScreenDescriptor(
-    int width, 
-    int height, 
-    int bitsPerPixel, 
-    unsigned char *bp)
-{
-    unsigned char flags;
-
-#define MAXSIZE (1<<16)
-    if ((width >= MAXSIZE) || (height >= MAXSIZE)) {
-	GifError("picture is too big for GIF format");
-    }	     
-    if ((bitsPerPixel > 8) || (bitsPerPixel < 1)) {
-	GifError("#bits per pixel is %d for GIF format", bitsPerPixel);
-    }	     
-    GifSetShort(bp + 0, width);
-    GifSetShort(bp + 2, height);
-    flags = 0;
-    flags |= (1<<7);		/* Global color map flag.*/
-    flags |= (bitsPerPixel - 1) << 4;  /* Color resolution. */
-    flags |= (bitsPerPixel - 1); /* Size of global color table. */
-
-    bp[4] = flags;
-    bp[5] = 0;			/* Background color index. */
-    bp[6] = 0;			/* Pixel aspect ratio. */
-}
-
-
-/*
- * Image Descriptor 
- *
- *   0 1 Image Separator
- *   1 2 Image Left Position
- *   3 2 Image Top Position      
- *   5 2 Image Width
- *   7 2 Image Height
- *   9 1 Image flags:
- *			=	Local Color Table Flag        1 Bit
- *				Interlace Flag                1 Bit
- *				Sort Flag                     1 Bit
- *				Reserved                      2 Bits
- *				Size of Local Color Table     3 Bits
- */
-static void 
-GifWriteImageDescriptor(int w, int h, unsigned char *bp)
-{
-    bp[0] = ',';		/* Image separator */
-    bp[1] = bp[2] = 0;		/* Left offset of image. */
-    bp[3] = bp[4] = 0;		/* Top offset of image. */
-    GifSetShort(bp + 5, w);	/* Width of image. */
-    GifSetShort(bp + 7, h);	/* Height of image. */
-    bp[9] = 0;			/* Flags: no local table, not interlaced,
-				 * and unsorted. */
-}
-
-/*
- *  Graphic Control Extension 
- *
- *   0 1  Extension Introducer
- *   1 2  Graphic Control Label
- *   2 1  Block size
- *   3 1  Flags.
- *		bits 5-7 Reserved                      3 Bits 
- *		bits 2-4 Disposal Method               3 Bits 
- *		bit 1    User Input Flag               1 Bit 
- *		bit 0    Transparent Color Flag        1 Bit 
- *   4 2  Delay time.
- *   6 1  Transparent Color Index
- *   7 1  Block terminator
- */
-static void 
-GifWriteGraphicControlExtension(int colorIndex, int delay, unsigned char *bp)
-{
-    bp[0] = '!';		/* Extension introducer */
-    bp[1] = 0xF9; 		/* Graphic control label */
-    bp[2] = 4;			/* Block size. */
-    bp[3] = (colorIndex != -1);	/* Transparent flag. */
-    GifSetShort(bp + 4, delay);
-    bp[6] = colorIndex;		/* Transparent color index */
-    bp[7] = 0;			/* Block terminator */
-}
-
-/*
- * Write optional comment block
- */
-static void 
-GifWriteCommentExtension(Blt_DBuffer dbuffer, const char *comment)
-{
-    int n, length;
-    unsigned char *bp;
-
-    /* Comment extension and label */
-    length = strlen(comment);
-    if (length > 255) {
-	length = 255;
-    }
-    n = 3 + length + 1;
-    bp = Blt_DBuffer_Extend(dbuffer, n);
-    bp[0] = '!';
-    bp[1] = 0xFE;
-    bp[2] = length;
-    memcpy(bp + 3, comment, length);
-    bp[n - 1] = '\0';
-}
-
-/*
- *  Graphic Control Extension 
- *
- *   0 1  Extension Introducer
- *   1 2  Graphic Control Label
- *   2 1  Block size
- *   3 1  Flags.
- *		bits 5-7 Reserved                      3 Bits 
- *		bits 2-4 Disposal Method               3 Bits 
- *		bit 1    User Input Flag               1 Bit 
- *		bit 0    Transparent Color Flag        1 Bit 
- *   4 2  Delay time.
- *   6 1  Transparent Color Index
- *   7 1  Block terminator
- */
-static void 
-GifWriteNetscapeAppExtension(int nLoop, unsigned char *bp)
-{
-    bp[0] = '!';			/* Extension introducer */
-    bp[1] = 0xFF;			/* Application extension label */
-    bp[2] = 11;				/* Block size. */
-    memcpy(bp + 3, "NETSCAPE2.0", 11);
-    bp[14] = 0x3;			/* Length of data sub-block */
-    bp[15] = 0x1;
-    bp[16] = 0xFF;
-    bp[17] = 0xFF;
-    bp[18] = 0;				/* Block terminator */
-}
-
-#define DICTSIZE  5003            /* 80% occupancy */
-#define MAXCODE(n)        ((1 << (n)) - 1)
-
-typedef struct {
-    int fcode;
-    unsigned int ent;
-} LzwDictEntry;
-
-typedef struct {
-    int nBits;
-    int maxCode;
-    int codeLimit;
-    LzwDictEntry dict[DICTSIZE];
-    int ent;
-    int hshift;
-    int nextUnusedCode;
-    int codeCount;
-    int initBits;
-    int clearCode;
-    int eofCode;
-    unsigned int curAccum;
-    int curBits;
-    unsigned char accum[256];
-    int a_count;
-    Blt_DBuffer dbuffer;
-} LzwCompressor;
-
-static void
-LzwDictShift(LzwCompressor *lzwPtr)
-{
-    int hshift;
-    int fcode;
-    
-    hshift = 0;
-    for (fcode = DICTSIZE; fcode < 65536L; fcode += fcode) {
-	hshift++;
-    }
-    lzwPtr->hshift = 8 - hshift;	/* set hash code range bound */
-}
-
-static void
-LzwDictInit(LzwCompressor *lzwPtr)
-{
-    LzwDictEntry *hp, *hend;
-    
-    for (hp = lzwPtr->dict, hend = hp + DICTSIZE; hp < hend; hp++) {
-	hp->fcode = -1;
-	hp->ent = 0;
-    }
-    lzwPtr->nextUnusedCode = lzwPtr->clearCode + 2;
-}
- 
-/*
- * Flush the packet to disk, and reset the accumulator
- */
-INLINE static void
-LzwFlush(LzwCompressor *lzwPtr)
-{
-    if(lzwPtr->a_count > 0) {
-	unsigned char *bp;
-
-	bp = Blt_DBuffer_Extend(lzwPtr->dbuffer, lzwPtr->a_count + 1);
-	bp[0] = lzwPtr->a_count;
-	memcpy(bp + 1, lzwPtr->accum, lzwPtr->a_count);
-	lzwPtr->a_count = 0;
-    }
-}
-
-/*
- * Add a character to the end of the current packet, and if it is 254
- * characters, flush the packet to disk.
- */
-INLINE static void
-LzwAccum(LzwCompressor *lzwPtr, unsigned char byte)
-{
-    lzwPtr->accum[lzwPtr->a_count] = byte;
-    lzwPtr->a_count++;
-    if(lzwPtr->a_count >= 254) {
-	LzwFlush(lzwPtr);
-    }
-}
-
-INLINE static void
-LzwSetCodeSize(LzwCompressor *lzwPtr, int nBits)
-{
-    lzwPtr->nBits = nBits;
-    assert(nBits <= LZW_MAX_BITS);
-    lzwPtr->maxCode = MAXCODE(nBits);
-}
-
-INLINE static void
-LzwIncrCodeSize(LzwCompressor *lzwPtr) 
-{
-    assert((lzwPtr->nBits + 1) <= LZW_MAX_BITS);
-    LzwSetCodeSize(lzwPtr, lzwPtr->nBits + 1);
-}
-
-INLINE static void
-LzwAdjustCodeSize(LzwCompressor *lzwPtr) 
-{
-    assert(lzwPtr->nextUnusedCode <= lzwPtr->codeLimit);
-    if (lzwPtr->nextUnusedCode == lzwPtr->codeLimit) {
-	lzwPtr->codeLimit += lzwPtr->codeLimit;
-	LzwIncrCodeSize(lzwPtr);
-    }
-    lzwPtr->nextUnusedCode++;
-    assert(lzwPtr->codeLimit <= LZW_MAX_CODE);
-}
-
-static int
-LzwDictSearch(LzwCompressor *lzwPtr, int pixel)
-{
-    int hval;
-    int fcode;
-    int disp;
-    LzwDictEntry *hPtr;
-
-    fcode = (int) ((pixel << LZW_MAX_BITS) + lzwPtr->ent);
-    hval = ((pixel << lzwPtr->hshift) ^ lzwPtr->ent); /* XOR hashing */
-
-    /* Secondary hash (after G. Knott) */
-    disp = (hval == 0) ? 1 : DICTSIZE - hval; 
-    while ((lzwPtr->dict[hval].fcode != fcode) && 
-	   (lzwPtr->dict[hval].fcode >= 0)) {
-	hval -= disp;
-	if (hval < 0) {
-	    hval += DICTSIZE;
-	}
-    }
-    hPtr = lzwPtr->dict + hval;
-    if (hPtr->fcode == fcode ) {
-	lzwPtr->ent = hPtr->ent;
-	return TRUE;
-    } else {
-	hPtr->ent = lzwPtr->nextUnusedCode;
-	hPtr->fcode = fcode;
-	return FALSE;
-    }
-}
-
-static void
-LzwPutCode(LzwCompressor *lzwPtr, int code)
-{
-    assert(code <= lzwPtr->maxCode);
-    lzwPtr->curAccum &= (1 << lzwPtr->curBits) - 1;
-    if (lzwPtr->curBits > 0) {
-        lzwPtr->curAccum |= ((unsigned long)code << lzwPtr->curBits);
-    } else {
-        lzwPtr->curAccum = code;
-    }
-    lzwPtr->curBits += lzwPtr->nBits;
-
-    while (lzwPtr->curBits >= 8) {
-        LzwAccum(lzwPtr, (unsigned int)lzwPtr->curAccum & 0xff);
-        lzwPtr->curAccum >>= 8;
-        lzwPtr->curBits -= 8;
-    }
-    lzwPtr->codeCount++;
-}
-
-
-static void
-LzwResetCompressor(LzwCompressor *lzwPtr)
-{
-    LzwDictInit(lzwPtr);	/* Clear out the hash table */
-    LzwPutCode(lzwPtr, lzwPtr->clearCode);
-    LzwSetCodeSize(lzwPtr, lzwPtr->initBits);
-    lzwPtr->codeLimit = (1 << lzwPtr->initBits);
-}
-
-static void
-LzwOutputCurrent(LzwCompressor *lzwPtr)
-{
-    LzwPutCode(lzwPtr, lzwPtr->ent);
-    /*
-     * If the next entry is going to be too big for the code size, then
-     * increase it, if possible.
-     */
-    if (lzwPtr->nextUnusedCode < LZW_MAX_CODE) {
-	LzwAdjustCodeSize(lzwPtr);
-    } else {
-	LzwResetCompressor(lzwPtr);
-    }
-    if (lzwPtr->ent == lzwPtr->eofCode) {
-	/* At EOF, write the rest of the buffer. */
-	while (lzwPtr->curBits > 0) {
-	    LzwAccum(lzwPtr, (unsigned int)lzwPtr->curAccum & 0xff);
-	    lzwPtr->curAccum >>= 8;
-	    lzwPtr->curBits -= 8;
-	}
-	LzwFlush(lzwPtr);
-    }
-}
-
-static void
-GifWriteGlobalColorTable(Blt_HashTable *colorTablePtr, unsigned char *bp)
-{
-    unsigned long index;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    index = 0;
-    for (hPtr = Blt_FirstHashEntry(colorTablePtr, &cursor); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	union {
-	    unsigned long index;
-	    char *key;
-	} value;
-	Blt_Pixel pixel;
-	
-	Blt_SetHashValue(hPtr, index);
-	value.key = Blt_GetHashKey(colorTablePtr, hPtr);
-	pixel.u32 = (unsigned int)value.index;
-	bp[0] = pixel.Red;
-	bp[1] = pixel.Green;
-	bp[2] = pixel.Blue;
-	bp += 3;
-	index++;
-    }
-}
-
-static int
-GetColorIndex(Blt_HashTable *colorTablePtr, Blt_Pixel *colorPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_Pixel pixel;
-    int index;
-    int nColors;
-    union {
-	unsigned long pixel;
-	char *key;
-    } value;
-
-    nColors = colorTablePtr->numEntries;
-    pixel.u32 = colorPtr->u32;
-    pixel.Alpha = 0xFF;
-    value.pixel = pixel.u32;
-    hPtr = Blt_FindHashEntry(colorTablePtr, value.key);
-    if (hPtr == NULL) {
-	GifError("can't find color %x,%x,%x in color table\n", 
-		 colorPtr->Red, colorPtr->Blue, colorPtr->Green);
-    }
-    if (colorPtr->Alpha == 0x00) {
-	index = (int)nColors;
-    } else {
-	index = (unsigned long)Blt_GetHashValue(hPtr);
-    }
-    return index;
-}
-
-static void
-GifAddText(Blt_DBuffer dbuffer, const char **comments)
-{
-    const char **p;
-
-    for (p = comments; *p != NULL; p++) {
-	GifWriteCommentExtension(dbuffer, *p);
-    }
-}
-
-static void
-GifWriteImageData(Blt_DBuffer dbuffer, Pict *srcPtr, 
-		  Blt_HashTable *colorTablePtr)
-{
-    LzwCompressor lzw;
-    int initBits;
-    int initCodeSize;
-    int bitsPerPixel;
-    
-    bitsPerPixel = GetLog2(colorTablePtr->numEntries - 1);
-    assert((bitsPerPixel > 0) && (bitsPerPixel <= 8));
-    /* 
-       bitsPerPixel = (colorMapSize == 1) ? 1 : ns(colorMapSize - 1);
-       initCodeSize = bitsPerPixel <= 1 ? 2 : bitsPerPixel;
-       initBits = initCodeSize + 1;
-       clearCode = 1 << (initBits - 1);
-     */
-    initCodeSize = (bitsPerPixel <= 1) ? 2 : bitsPerPixel;
-    initBits = bitsPerPixel + 1;
-    memset(&lzw, 0, sizeof(lzw));
-    /*
-     * Set up the globals:  initBits - initial number of bits
-     */
-    lzw.initBits = initBits;
-    lzw.curAccum = 0;
-    lzw.curBits = 0;
-    lzw.dbuffer = dbuffer;
-
-    /* Set up the necessary values */
-    lzw.codeCount      = 0;
-    lzw.nBits          = lzw.initBits;
-    lzw.maxCode        = MAXCODE(lzw.nBits);
-    lzw.clearCode      = (1 << (initBits - 1));
-    lzw.eofCode        = lzw.clearCode + 1;
-    lzw.nextUnusedCode = lzw.clearCode + 2;
-    lzw.codeLimit      = (1 << initBits);
-    lzw.a_count        = 0;
-    LzwDictShift(&lzw);
-
-    Blt_DBuffer_AppendByte(dbuffer, initCodeSize);
-    LzwResetCompressor(&lzw);
-    /* Add compressed image data. */
-    {
-	Blt_Pixel *srcRowPtr, *sp;
-	int y;
-
-	sp = srcRowPtr = srcPtr->bits;
-	lzw.ent = GetColorIndex(colorTablePtr, sp);
-	sp++;
-	for(y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *send;
-	    
-	    for (send = srcRowPtr + srcPtr->width; sp < send; sp++) {
-		unsigned long index;
-		
-		index = GetColorIndex(colorTablePtr, sp);
-		if (!LzwDictSearch(&lzw, index)) {
-		    LzwOutputCurrent(&lzw);
-		    lzw.ent = index;
-		}
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	    sp = srcRowPtr;
-	}
-    }
-    /* Put out the final code and sub-block terminator. */
-    LzwOutputCurrent(&lzw);
-    lzw.ent = lzw.eofCode;
-    LzwOutputCurrent(&lzw);
-    Blt_DBuffer_AppendByte(dbuffer, '\0');  /* Mark end of data sub-blocks. */
-}
- 
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToGif --
- *
- *      Converts a picture to the GIF format.  Since the GIF format doesn't
- *      handle semi-transparent pixels we have to blend the image with a given
- *      background color, while still retaining any 100% transparent pixels.
- *
- * Results:
- *      A standard TCL result is returned.  If an error occured, 
- *	such as the designated file could not be opened, TCL_ERROR is returned.
- *
- * Side Effects:
- *	The dynamic buffer is filled with the GIF image.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToGif(Tcl_Interp *interp, Blt_Picture original, Blt_DBuffer dbuffer,
-	     GifExportSwitches *switchesPtr)
-{
-    Blt_HashTable colorTable;
-    Pict *srcPtr;
-    int bitsPerPixel;
-    int isMasked;
-    int n;
-    int nColors, maxColors;
-    unsigned char *bp;
-
-    srcPtr = original;
-    nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-    maxColors = 256;
-    if (Blt_PictureIsMasked(srcPtr)) {
-	if (switchesPtr->flags & EXPORT_BLEND) {	
-	    Blt_Picture background;
-	    
-	    /* Blend picture with solid color background. */
-	    background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	    Blt_BlankPicture(background, &switchesPtr->bg); 
-	    Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-			      srcPtr->height, 0, 0);
-	    if (srcPtr != original) {
-		Blt_FreePicture(srcPtr);
-	    }
-	    srcPtr = background;
-	    nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-	} else if (nColors >= 256) {
-	    maxColors--;
-	}
-    }
-    if (nColors > maxColors) {
-	Blt_Picture quant;
-
-	quant = Blt_QuantizePicture(srcPtr, maxColors);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = quant;
-    }
-    Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-    nColors = Blt_QueryColors(srcPtr, &colorTable);
-    isMasked = Blt_PictureIsMasked(srcPtr);
-    bitsPerPixel = GetLog2(nColors - 1);
-    /* 
-     * 6			Header
-     * 7			Logical Screen Descriptor
-     * 3 * (1<<bitPerPixel)	Global Color Table
-     * 8			Graphic Control Extension
-     * 10			Image Descriptor
-     */
-    n = 6 + 7 + (3 * (1<<bitsPerPixel)) + 10;
-    if (isMasked) {
-	n += 8;
-    }
-    bp = Blt_DBuffer_Extend(dbuffer, n);
-
-    /* Header */
-    if (isMasked) {
-	memcpy(bp, "GIF89a", 6);
-    } else {
-	memcpy(bp, "GIF87a", 6);
-    }
-    bp += 6;				/* Size of header */
-    GifWriteLogicalScreenDescriptor(srcPtr->width, srcPtr->height, 
-				    bitsPerPixel, bp);
-    bp += 7;				/* Size of logical screen
-					 * descriptor. */
-    GifWriteGlobalColorTable(&colorTable, bp);
-    bp += 3 * (1<<bitsPerPixel);	/* Size of global color table. */
-    if (isMasked) {
-	GifWriteGraphicControlExtension(nColors, 0, bp);
-	bp += 8;			/* size of graphic control
-					 * extension. */
-    }
-    GifWriteImageDescriptor(srcPtr->width, srcPtr->height, bp);
-    bp += 10;				/* Size of image descriptor. */
-
-    GifWriteImageData(dbuffer, srcPtr, &colorTable);
-    if (switchesPtr->comments != NULL) {
-	GifAddText(dbuffer, switchesPtr->comments);
-    }
-    Blt_DBuffer_AppendByte(dbuffer, ';');  /* File terminator */
-    if (srcPtr != original) {
-	Blt_FreePicture(srcPtr);
-    }
-    return TCL_OK;
-}
-
-#ifndef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * PicturesToAnimatedGif --
- *
- *      Converts a one or more pictures to into the animates GIF format.
- *      Since the GIF format doesn't handle semi-transparent pixels we have to
- *      blend the image with a given background color, while still retaining
- *      any 100% transparent pixels.
- *
- * Results:
- *      A standard TCL result is returned.  If an error occured, such as the
- *      designated file could not be opened, TCL_ERROR is returned.
- *
- * Side Effects:
- *	The dynamic buffer is filled with the GIF image.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PicturesToAnimatedGif(Tcl_Interp *interp, Blt_Chain chain, Blt_DBuffer dbuffer,
-		      GifExportSwitches *switchesPtr)
-{
-    Blt_ChainLink link;
-    Blt_HashTable colorTable;
-    Frame *fp, *fend, *frames;
-    int bitsPerPixel;
-    int n;
-    int nColors, maxColors, nFrames;
-    int screenWidth, screenHeight;
-    unsigned char *bp;
-
-    /* For each frame quantize if needed, accumulate the colors used.  try to
-     * assemble  */
-
-    maxColors = 255;
-    nFrames = Blt_Chain_GetLength(chain);
-    if (nFrames == 0) {
-	return TCL_ERROR;
-    }
-    frames = Blt_AssertCalloc(nFrames, sizeof(Frame));
-    link = Blt_Chain_FirstLink(chain);
-    fp = frames;
-    fp->original = Blt_Chain_GetValue(link);
-
-    /* 
-     * Step 1:  Load the pictures into the array.  Determine what the
-     *	        maximum picture width and height are.
-     */
-    screenWidth = Blt_PictureWidth(fp->original);
-    screenHeight = Blt_PictureHeight(fp->original);
-    for (fp = frames, link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link), fp++) {
-	Pict *srcPtr;
-
-	srcPtr = fp->current = fp->original = Blt_Chain_GetValue(link);
-	fp->delay = srcPtr->delay;
-	if (srcPtr->width > screenWidth) {
-	    screenWidth = srcPtr->width;
-	}
-	if (srcPtr->height > screenHeight) {
-	    screenHeight = srcPtr->height;
-	}
-    }
-    /* 
-     * Step 2:  Convert the pictures into the same maximum size. Automatically
-     *		handle blended pictures by blending into a known background.
-     */
-    Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-    for (fp = frames, fend = fp + nFrames; fp < fend; fp++) {
-	Pict *srcPtr;
-
-	srcPtr = fp->current;
-	if ((srcPtr->flags & BLT_PIC_BLEND) || (srcPtr->width != screenWidth) || 
-	    (srcPtr->height != screenHeight)) {
-	    Pict *bg;
-
-	    /* Blend picture with solid color background. */
-	    bg = Blt_CreatePicture(screenWidth, screenHeight);
-	    Blt_BlankPicture(bg, &switchesPtr->bg); 
-	    Blt_BlendPictures(bg, srcPtr, 0, 0, srcPtr->width, srcPtr->height, 
-		0, 0);
-	    srcPtr = fp->current = bg;
-	}
-	Blt_QueryColors(srcPtr, &colorTable);
-    }
-    /* 
-     * Step 3:  If there are more that 256 colors, compute color lookup
-     *		table by quantizing all the pictures in the sequence.
-     */
-    if (colorTable.numEntries > maxColors) {
-	Blt_Chain sequence;
-	Blt_ColorLookupTable clut;
-
-	sequence = Blt_Chain_Create();
-	for (fp = frames, fend = fp + nFrames; fp < fend; fp++) {
-	    Blt_Chain_Append(sequence, fp->current);
-	}
-	clut = Blt_GetColorLookupTable(sequence, maxColors);
-	Blt_Chain_Destroy(sequence);
-
-	/* Dump the old color table and build a new old. */
-	Blt_DeleteHashTable(&colorTable);
-	Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-
-	for (fp = frames, fend = fp + nFrames; fp < fend; fp++) {
-	    Pict *srcPtr, *destPtr;
-
-	    srcPtr = fp->current;
-	    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	    Blt_MapColors(destPtr, srcPtr, clut);
-	    if (fp->current != fp->original) {
-		Blt_FreePicture(fp->current);
-	    }
-	    fp->current = destPtr;
-	    Blt_QueryColors(destPtr, &colorTable);
-	}
-	Blt_Free(clut);
-    }
-
-    /* 
-     * Step 4:  Write the animated GIF output.
-     */
-    nColors = colorTable.numEntries;
-    bitsPerPixel = GetLog2(nColors - 1);
-    /* 
-     * 6			Header
-     * 7			Logical Screen Descriptor
-     * 3 * (1<<bitPerPixel)	Global Color Table
-     * 8			Graphic Control Extension
-     * 10			Image Descriptor
-     */
-    n = 6 + 7 + (3 * (1<<bitsPerPixel)) + 19;
-    bp = Blt_DBuffer_Extend(dbuffer, n);
-
-    /* Header */
-    memcpy(bp, "GIF89a", 6);
-    bp += 6;				/* Size of header */
-    GifWriteLogicalScreenDescriptor(screenWidth, screenHeight, 
-	bitsPerPixel, bp);
-    bp += 7;				/* Size of logical screen
-					 * descriptor. */
-    GifWriteGlobalColorTable(&colorTable, bp);
-    bp += 3 * (1<<bitsPerPixel);	/* Size of global color table. */
-
-    GifWriteNetscapeAppExtension(10, bp);
-    bp += 19;
-    for (fp = frames, fend = fp + nFrames; fp < fend; fp++) {
-	Pict *srcPtr;
-
-	bp = Blt_DBuffer_Extend(dbuffer, 18);
-	srcPtr = fp->current;
-	GifWriteGraphicControlExtension(-1, switchesPtr->delay, bp);
-	bp += 8;			/* Size of graphic control
-					 * extension. */
-	GifWriteImageDescriptor(srcPtr->width, srcPtr->height, bp);
-	bp += 10;			/* Size of image descriptor. */
-	GifWriteImageData(dbuffer, srcPtr, &colorTable);
-	if (fp->current != fp->original) {
-	    Blt_FreePicture(fp->current);
-	}
-    }
-    Blt_Free(frames);
-    Blt_DeleteHashTable(&colorTable);
-    if (switchesPtr->comments != NULL) {
-	GifAddText(dbuffer, switchesPtr->comments);
-    }
-    Blt_DBuffer_AppendByte(dbuffer, ';');  /* File terminator */
-    return TCL_OK;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsGif --
- *
- *      Attempts to parse a GIF file header.
- *
- * Results:
- *      Returns 1 is the header is GIF and 0 otherwise.  Note that the
- *      validity of the header contents is not checked here.  That's done in
- *      GifToPictures.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsGif(Blt_DBuffer dbuffer)
-{
-    Gif gif;
-    int bool;
-
-    bool = GifHeader(dbuffer, &gif);
-    return bool;
-}
-
-static Blt_Chain
-ReadGif(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    GifImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return GifToPictures(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WriteGif(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_DBuffer dbuffer;
-    GifExportSwitches switches;
-    Tcl_Obj *objPtr;
-    char *bytes;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    dbuffer = Blt_DBuffer_Create();
-    objPtr = NULL;
-    if (PictureToGif(interp, picture, dbuffer, &switches) != TCL_OK) {
-	Blt_DBuffer_Destroy(dbuffer);
-	return NULL;
-    }
-    bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-    if (bytes != NULL) {
-	objPtr = Tcl_NewStringObj(bytes, -1);
-	Blt_Free(bytes);
-    }
-    Blt_DBuffer_Destroy(dbuffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportGif(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Chain chain;
-    const char *string;
-    GifImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_SaveFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = GifToPictures(interp, string, dbuffer, &switches);
-    if (chain == NULL) {
-	fprintf(stderr, "import gif: can't read buffer\n");
-    }
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportGif(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Blt_DBuffer dbuffer;
-    GifExportSwitches switches;
-    int result;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.index = index;
-    switches.delay = 20;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    if (switches.flags & EXPORT_ANIMATE) {
-	if (PicturesToAnimatedGif(interp, chain, dbuffer, &switches) != TCL_OK){
-	    Tcl_AppendResult(interp, "can't convert \"", Tcl_GetString(objv[2]),
-			     "\"", (char *)NULL);
-	    goto error;
-	}
-    } else {
-	Blt_Picture picture;
-
-	picture = Blt_GetNthPicture(chain, switches.index);
-	if (picture == NULL) {
-	    Tcl_AppendResult(interp, "bad picture index.", (char *)NULL);
-	    goto error;
-	}
-	if (PictureToGif(interp, picture, dbuffer, &switches) != TCL_OK) {
-	    Tcl_AppendResult(interp, "can't convert \"", Tcl_GetString(objv[2]), 
-			     "\"", (char *)NULL);
-	    goto error;
-	}
-    }
-    if (switches.fileObjPtr != NULL) {
-	const char *fileName;
-
-	/* Write the image into the designated file. */
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	/* Write the image into the designated TCL variable. */
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	/* Return the image as a base64 string in the interpreter result. */
-	result = TCL_ERROR;
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	    result = TCL_OK;
-	}
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int 
-Blt_PictureGifInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_gif", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp, 
-	"gif",			/* Name of format. */
-	IsGif,			/* Discovery routine. */
-	ReadGif,		/* Read format procedure. */
-	WriteGif,		/* Write format procedure. */
-	ImportGif,		/* Import format procedure. */
-	ExportGif);		/* Export format switches. */
-}
diff --git a/blt3.0/src/bltPictInt.h b/blt3.0/src/bltPictInt.h
deleted file mode 100644
index ac94ed4..0000000
--- a/blt3.0/src/bltPictInt.h
+++ /dev/null
@@ -1,219 +0,0 @@
-
-/*
- * bltPictInt.h --
- *
- *	Copyright 2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_PIC_INT_H
-#define _BLT_PIC_INT_H
-
-/*
- * Scaled integers are fixed point values.  The upper 18 bits is the integer
- * portion, the lower 14 bits the fractional remainder.  Must be careful
- * not to overflow the values (especially during multiplication). 
- *
- * The following operations are defined:
- * 
- *	S * n		Scaled integer times an integer.
- *	S1 + S2		Scaled integer plus another scaled integer.
- *
- */
-
-#define float2si(f)	(int)((f) * 16383.0 + ((f < 0) ? -0.5 : 0.5))
-#define uchar2si(b)	(((int)(b)) << 14)
-#define si2int(s)	(((s) + 8192) >> 14)
-#define int2si(i)	(((i) << 14) - 8192)
-
-/* 
- * The following macro converts a fixed-point scaled integer to a
- * byte, clamping the value between 0 and 255.  
- */
-#define SICLAMP(s) \
-    (unsigned char)(((s) < 0) ? 0 : ((s) > 4177920) ? 255 : (si2int(s)))
-
-#define div255(i)	((((int)(i) + 1) + (((int)(i) + 1) >> 8) ) >> 8)
-#define div257(t)	(((t)+((t)>>8))>>8)
-#define mul255(i)	(((int)(i) << 8) - ((int)(i)))
-
-#define RGBIndex(r,g,b) (((r)<<10) + ((r)<<6) + (r) + ((g) << 5) + (g) + (b))
-
-#define ROTATE_0	0
-#define ROTATE_90	1
-#define ROTATE_180	2
-#define ROTATE_270	3
-
-#define UCLAMP(s) (unsigned char)(((s) < 0) ? 0 : ((s) > 255) ? 255 : (s))
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResampleFilterProc --
- *
- *      A function implementing a 1-D filter.
- *
- *---------------------------------------------------------------------------
- */
-typedef double (Blt_ResampleFilterProc) (double value);
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResampleFilter --
- *
- *      Contains information about a 1-D filter (its support and
- *	the procedure implementing the filter).
- *
- *---------------------------------------------------------------------------
- */
-struct _Blt_ResampleFilter {
-    const char *name;		/* Name of the filter */
-    Blt_ResampleFilterProc *proc; /* 1-D filter procedure. */
-    double support;		/* Width of 1-D filter */
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableFilter --
- *
- *      Contains information about a 1-D filter (its support and
- *	the procedure implementing the filter).
- *
- *---------------------------------------------------------------------------
- */
-struct _Blt_TableFilter {
-    float scale;
-    int nWeights;		/* Width of 1-D filter */
-    int weights[1];
-};
-
-#define RESAMPLE_FILTER 0
-#define TABLE_FILTER    1
-struct _Blt_ConvolveFilter {
-    int type;
-    void *filter;
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * Filter2D --
- *
- *      Defines a convolution mask for a 2-D filter.  Used to smooth or
- *	enhance images.
- *
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    double support;		/* Radius of filter */
-    double sum, scale;		/* Sum of kernel */
-    double *kernel;		/* Array of values (malloc-ed) representing
-				 * the discrete 2-D filter. */
-} Filter2D;
-
-/*
- * We can use scaled integers (20-bit fraction) to compute the
- * luminosity with reasonable accuracy considering it's stored
- * in an 8-bit result.
- */
-#define YR	223002		/* 0.212671 */
-#define YG	749900		/* 0.715160 */
-#define YB	75675		/* 0.072169 */
-#define YMAX	267386880	/* 255.0 */
-#define YCLAMP(s) \
-	(unsigned char)((s) > YMAX) ? 255 : ((((s) + 524288) >> 20))
-	    
-#define JITTER(x)	((x) * (0.05 - drand48() * 0.10))
-#define JCLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 1.0) ? 1.0 : (c)))
-
-typedef union {
-    int i32;			/* Fixed point (scaled
-				 * integer). 14-bit fraction. */
-    float f32;
-} PixelWeight;
-
-typedef struct {
-    int start;
-    PixelWeight *wend;		/* Points to just beyond the last
-				 * weight.  Tracks the number of
-				 * weights in array below. */
-    PixelWeight weights[1];	/* Array of weights. */
-} Sample;
-
-typedef struct _Blt_Picture Pict;
-typedef struct _Blt_ResampleFilter ResampleFilter;
-typedef struct _Blt_TableFilter TableFilter;
-
-BLT_EXTERN unsigned int Blt_ComputeWeights(unsigned int sw, unsigned int dw, 
-	ResampleFilter *filterPtr, Sample **samplePtrPtr);
-
-typedef void (Blt_ApplyPictureToPictureProc)(Blt_Picture dest, Blt_Picture src,
-	int x, int y, int w, int h, int dx, int dy, Blt_PictureArithOps op);
-typedef void (Blt_ApplyScalarToPictureProc)(Blt_Picture dest, 
-	Blt_Pixel *colorPtr, Blt_PictureArithOps op);
-typedef void (Blt_ApplyPictureToPictureWithMaskProc)(Blt_Picture dest, 
-	Blt_Picture src, Blt_Picture mask, int x, int y, int w, int h, 
-	int dx, int dy, int invert, Blt_PictureArithOps op);
-typedef void (Blt_ApplyScalarToPictureWithMaskProc)(Blt_Picture dest, 
-	Blt_Pixel *colorPtr, Blt_Picture mask, 
-	int invert, Blt_PictureArithOps op);
-typedef void (Blt_TentHorizontallyProc)(Blt_Picture dest, Blt_Picture src);
-typedef void (Blt_TentVerticallyProc)(Blt_Picture dest, Blt_Picture src);
-typedef void (Blt_ZoomHorizontallyProc)(Blt_Picture dest, Blt_Picture src, 
-	Blt_ResampleFilter filter);
-typedef void (Blt_ZoomVerticallyProc)(Blt_Picture dest, Blt_Picture src, 
-	Blt_ResampleFilter filter);
-typedef void (Blt_BlendPicturesProc)(Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy);
-typedef void (Blt_SelectPixelsProc)(Blt_Picture dest, Blt_Picture src, 
-	Blt_Pixel *lowPtr , Blt_Pixel *highPtr);
-typedef void (Blt_AssociateColorsProc)(Blt_Picture picture);
-typedef void (Blt_UnassociateColorsProc)(Blt_Picture picture);
-typedef void (Blt_FadePictureProc) (Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy, int alpha);
-typedef void (Blt_CopyPictureBitsProc)(Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy);
-
-typedef struct {
-    Blt_ApplyPictureToPictureProc *applyPictureToPictureProc;
-    Blt_ApplyScalarToPictureProc  *applyScalarToPictureProc;
-    Blt_ApplyPictureToPictureWithMaskProc *applyPictureToPictureWithMaskProc;
-    Blt_ApplyScalarToPictureWithMaskProc *applyScalarToPictureWithMaskProc;
-    Blt_TentHorizontallyProc *tentHorizontallyProc;
-    Blt_TentVerticallyProc *tentVerticallyProc;
-    Blt_ZoomHorizontallyProc *zoomHorizontallyProc;
-    Blt_ZoomVerticallyProc *zoomVerticallyProc;
-    Blt_BlendPicturesProc *blendPicturesProc;
-    Blt_SelectPixelsProc *selectPixelsProc;
-    Blt_AssociateColorsProc *associateColorsProc;
-    Blt_UnassociateColorsProc *unassociateColorsProc;
-    Blt_FadePictureProc *fadePictureProc;
-    Blt_CopyPictureBitsProc *copyPictureBitsProc;
-} Blt_PictureProcs;
-
-BLT_EXTERN Blt_PictureProcs *bltPictProcsPtr;
-
-#endif /*_BLT_PIC_INT_H*/
diff --git a/blt3.0/src/bltPictJpg.c b/blt3.0/src/bltPictJpg.c
deleted file mode 100644
index 8340aef..0000000
--- a/blt3.0/src/bltPictJpg.c
+++ /dev/null
@@ -1,878 +0,0 @@
-
-/*
- * bltPictJpg.c --
- *
- * This module implements JPEG file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The JPEG reader/writer is adapted from jdatasrc.c and jdatadst.c in the
- * Independent JPEG Group (version 6b) library distribution.
- *
- *	The authors make NO WARRANTY or representation, either express or
- *	implied, with respect to this software, its quality, accuracy,
- *	merchantability, or fitness for a particular purpose.  This software
- *	is provided "AS IS", and you, its user, assume the entire risk as to
- *	its quality and accuracy.
- *
- *	This software is copyright (C) 1991-1998, Thomas G. Lane.  All Rights
- *	Reserved except as specified below.
- *
- *	Permission is hereby granted to use, copy, modify, and distribute this
- *	software (or portions thereof) for any purpose, without fee, subject
- *	to these conditions: (1) If any part of the source code for this
- *	software is distributed, then this README file must be included, with
- *	this copyright and no-warranty notice unaltered; and any additions,
- *	deletions, or changes to the original files must be clearly indicated
- *	in accompanying documentation.  (2) If only executable code is
- *	distributed, then the accompanying documentation must state that "this
- *	software is based in part on the work of the Independent JPEG Group".
- *	(3) Permission for use of this software is granted only if the user
- *	accepts full responsibility for any undesirable consequences; the
- *	authors accept NO LIABILITY for damages of any kind.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#ifdef HAVE_LIBJPG
-
-#include <tcl.h>
-
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include <bltAlloc.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-typedef struct _Blt_Picture Picture;
-
-#undef HAVE_STDLIB_H
-#ifdef WIN32
-#define XMD_H	1
-#endif
-#undef EXTERN
-#undef FAR
-#include "jpeglib.h"
-#include "jerror.h"
-#include <setjmp.h>
-
-#define PIC_PROGRESSIVE	(1<<0)
-#define PIC_NOQUANTIZE	(1<<1)
-
-#define PIC_FMT_ISASCII	(1<<3)
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int quality;		/* Value 0..100 */
-    int smoothing;		/* Value 0..100 */
-    int compress;		/* Value 0..N */
-    int flags;			/* Flag. */
-    Blt_Pixel bg;
-    int index;
-} JpgExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int fast;
-} JpgImportSwitches;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,	   "-bg",          "color",
-	Blt_Offset(JpgExportSwitches, bg), 0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ,       "-data",        "data",
-	Blt_Offset(JpgExportSwitches, dataObjPtr),0},
-    {BLT_SWITCH_OBJ,       "-file",        "fileName",
-	Blt_Offset(JpgExportSwitches, fileObjPtr),0},
-    {BLT_SWITCH_INT_NNEG,  "-quality",     "int",
-	Blt_Offset(JpgExportSwitches, quality), 0},
-    {BLT_SWITCH_INT_NNEG,  "-smooth",      "int",
-	Blt_Offset(JpgExportSwitches, smoothing),0},
-    {BLT_SWITCH_BITMASK,   "-progressive", "",
-	Blt_Offset(JpgExportSwitches, flags), 0, PIC_PROGRESSIVE},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(JpgExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(JpgImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_INT, "-fast", "int",
-	Blt_Offset(JpgImportSwitches, fast), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(JpgImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-#define JPG_BUF_SIZE  4096	/* choose an efficiently fwrite'able size */
-
-typedef struct {
-    struct jpeg_source_mgr pub;	/* public fields */
-
-    Blt_DBuffer dBuffer;	/* Collects the converted data. */
-} JpgReader;
-
-typedef struct {
-    struct jpeg_destination_mgr pub; /* public fields */
-    Blt_DBuffer dBuffer;	/* Target stream */
-    JOCTET *bytes;		/* start of buffer */
-} JpgWriter;
-
-typedef struct {
-    struct jpeg_error_mgr pub;	/* "public" fields */
-    jmp_buf jmpbuf;
-    Tcl_DString dString;
-} JpgErrorHandler;
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureJpgInit;
-extern const char *Blt_Itoa(int);
-
-static void
-JpgErrorProc(j_common_ptr commPtr)
-{
-    JpgErrorHandler *errorPtr = (JpgErrorHandler *)commPtr->err;
-
-    (*errorPtr->pub.output_message) (commPtr);
-    longjmp(errorPtr->jmpbuf, 1);
-}
-
-static void
-JpgMessageProc(j_common_ptr commPtr)
-{
-    JpgErrorHandler *errorPtr = (JpgErrorHandler *)commPtr->err;
-    char mesg[JMSG_LENGTH_MAX];
-
-    /* Create the message and append it into the dynamic string. */
-    (*errorPtr->pub.format_message) (commPtr, mesg);
-    Tcl_DStringAppend(&errorPtr->dString, " ", -1);
-    Tcl_DStringAppend(&errorPtr->dString, mesg, -1);
-}
-
-static void
-JpgInitSource(j_decompress_ptr commPtr)
-{
-    JpgReader *readerPtr = (JpgReader *)commPtr->src;
-
-    readerPtr->pub.next_input_byte = Blt_DBuffer_Bytes(readerPtr->dBuffer);
-    readerPtr->pub.bytes_in_buffer = Blt_DBuffer_Length(readerPtr->dBuffer);
-}
-
-static boolean
-JpgFillInputBuffer(j_decompress_ptr commPtr)
-{
-    JpgReader *readerPtr = (JpgReader *)commPtr->src; 
-    static unsigned char eoi[2] = { 0xFF, JPEG_EOI };
-
-    /* Insert a fake EOI marker */
-    readerPtr->pub.next_input_byte = eoi;
-    readerPtr->pub.bytes_in_buffer = 2;
-    return TRUE;
-}
-
-static void
-JpgSkipInputData(j_decompress_ptr commPtr, long nBytes)
-{
-    if (nBytes > 0) {
-	JpgReader *readerPtr = (JpgReader *)commPtr->src; 
-
-	assert((readerPtr->pub.next_input_byte + nBytes) < 
-	    (Blt_DBuffer_Bytes(readerPtr->dBuffer) + 
-	     Blt_DBuffer_Length(readerPtr->dBuffer)));
-	readerPtr->pub.next_input_byte += (size_t)nBytes;
-	readerPtr->pub.bytes_in_buffer -= (size_t)nBytes;
-    }
-}
-
-static void
-JpgTermSource (j_decompress_ptr commPtr)
-{
-    /* Nothing to do. */
-}
-
-static void
-JpgSetSourceFromBuffer(j_decompress_ptr commPtr, Blt_DBuffer buffer)
-{
-    JpgReader *readerPtr;
-    
-    /* The source object is made permanent so that a series of JPEG images can
-     * be read from the same file by calling jpeg_stdio_src only before the
-     * first one.  (If we discarded the buffer at the end of one image, we'd
-     * likely lose the start of the next one.)  This makes it unsafe to use
-     * this manager and a different source manager serially with the same JPEG
-     * object.  Caveat programmer.
-     */
-    if (commPtr->src == NULL) {	/* first time for this JPEG object? */
-	commPtr->src = (struct jpeg_source_mgr *)
-	    (*commPtr->mem->alloc_small) ((j_common_ptr)commPtr, 
-		JPOOL_PERMANENT, sizeof(JpgReader));
-	readerPtr = (JpgReader *)commPtr->src;
-    }
-    readerPtr = (JpgReader *)commPtr->src;
-    readerPtr->dBuffer = buffer;
-    readerPtr->pub.init_source = JpgInitSource;
-    readerPtr->pub.fill_input_buffer = JpgFillInputBuffer;
-    readerPtr->pub.skip_input_data = JpgSkipInputData;
-    /* use default method */
-    readerPtr->pub.resync_to_restart = jpeg_resync_to_restart; 
-    readerPtr->pub.term_source = JpgTermSource;
-}
-
-static void
-JpgInitDestination (j_compress_ptr commPtr)
-{
-    JpgWriter *writerPtr = (JpgWriter *)commPtr->dest;
-
-    writerPtr->bytes = (JOCTET *)(*commPtr->mem->alloc_small) 
-	((j_common_ptr) commPtr, JPOOL_IMAGE, JPG_BUF_SIZE * sizeof(JOCTET));
-    writerPtr->pub.next_output_byte = writerPtr->bytes;
-    writerPtr->pub.free_in_buffer = JPG_BUF_SIZE;
-}
-
-static boolean
-JpgEmptyOutputBuffer(j_compress_ptr commPtr)
-{
-    JpgWriter *writerPtr = (JpgWriter *)commPtr->dest;
-
-    if (!Blt_DBuffer_AppendData(writerPtr->dBuffer, writerPtr->bytes, 
-	JPG_BUF_SIZE)) {
-	ERREXIT(commPtr, 10);
-    }
-    writerPtr->pub.next_output_byte = writerPtr->bytes;
-    writerPtr->pub.free_in_buffer = JPG_BUF_SIZE;
-    return TRUE;
-}
-
-static void
-JpgTermDestination (j_compress_ptr commPtr)
-{
-    JpgWriter *writerPtr = (JpgWriter *)commPtr->dest;
-    size_t nBytes = JPG_BUF_SIZE - writerPtr->pub.free_in_buffer;
-    
-    /* Write any data remaining in the buffer */
-    if (nBytes > 0) {
-	if (!Blt_DBuffer_AppendData(writerPtr->dBuffer, writerPtr->bytes, 
-		nBytes)) {
-	    ERREXIT(commPtr, 10);
-	}
-    }
-}
-
-static void
-JpgSetDestinationToBuffer(j_compress_ptr commPtr, Blt_DBuffer buffer)
-{
-    JpgWriter *writerPtr;
-    
-    /* The destination object is made permanent so that multiple JPEG images
-     * can be written to the same file without re-executing jpeg_stdio_dest.
-     * This makes it dangerous to use this manager and a different destination
-     * manager serially with the same JPEG object, because their private
-     * object sizes may be different.  Caveat programmer.
-     */
-    if (commPtr->dest == NULL) {	/* first time for this JPEG object? */
-	commPtr->dest = (struct jpeg_destination_mgr *)
-	    (*commPtr->mem->alloc_small) ((j_common_ptr)commPtr, 
-			JPOOL_PERMANENT, sizeof(JpgWriter));
-    }
-    writerPtr = (JpgWriter *)commPtr->dest;
-    writerPtr->pub.init_destination = JpgInitDestination;
-    writerPtr->pub.empty_output_buffer = JpgEmptyOutputBuffer;
-    writerPtr->pub.term_destination = JpgTermDestination;
-    writerPtr->dBuffer = buffer;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsJpg --
- *
- *      Attempts to parse a JPG file header.
- *
- * Results:
- *      Returns 1 is the header is JPG and 0 otherwise.  Note that the
- *      validity of the header contents is not checked here.  That's done in
- *      Blt_JpgToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsJpg(Blt_DBuffer buffer)
-{
-    JpgErrorHandler error;
-    struct jpeg_decompress_struct cinfo;
-    int bool;
-
-    /* Step 1: allocate and initialize JPEG decompression object */
-    
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.dct_method = JDCT_IFAST;
-    cinfo.err = jpeg_std_error(&error.pub);
-    error.pub.error_exit = JpgErrorProc;
-    error.pub.output_message = JpgMessageProc;
-    
-    /* Initialize possible error message */
-    bool = FALSE;
-    Tcl_DStringInit(&error.dString);
-    if (setjmp(error.jmpbuf)) {
-	goto done;
-    }
-    jpeg_create_decompress(&cinfo);
-    JpgSetSourceFromBuffer(&cinfo, buffer);
-    bool = (jpeg_read_header(&cinfo, TRUE) == JPEG_HEADER_OK);
- done:
-    jpeg_destroy_decompress(&cinfo);
-    Tcl_DStringFree(&error.dString);
-    return bool;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * JpgToPicture --
- *
- *      Reads a JPEG data buffer and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the
- *      designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-JpgToPicture(
-    Tcl_Interp *interp, 	/* Interpreter to report errors back to. */
-    const char *fileName,	/* Name of file used to fill the dynamic
-				 * buffer.  */
-    Blt_DBuffer buffer,		/* Contents of the above file. */
-    JpgImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-    JSAMPLE **rows;
-    JpgErrorHandler error;
-    Picture *destPtr;
-    int samplesPerRow;
-    struct jpeg_decompress_struct cinfo;
-    unsigned int width, height;
-
-    destPtr = NULL;
-
-    /* Step 1: allocate and initialize JPEG decompression object */
-
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.dct_method = (switchesPtr->fast) ? JDCT_IFAST : JDCT_ISLOW;
-    cinfo.err = jpeg_std_error(&error.pub);
-    error.pub.error_exit = JpgErrorProc;
-    error.pub.output_message = JpgMessageProc;
-
-    /* Initialize possible error message */
-    Tcl_DStringInit(&error.dString);
-    Tcl_DStringAppend(&error.dString, "error reading \"", -1);
-    Tcl_DStringAppend(&error.dString, fileName, -1);
-    Tcl_DStringAppend(&error.dString, "\": ", -1);
-
-    if (setjmp(error.jmpbuf)) {
-	jpeg_destroy_decompress(&cinfo);
-	Tcl_DStringResult(interp, &error.dString);
-	return NULL;
-    }
-    jpeg_create_decompress(&cinfo);
-    JpgSetSourceFromBuffer(&cinfo, buffer);
-
-    jpeg_read_header(&cinfo, TRUE);	/* Step 3: read file parameters */
-
-    jpeg_start_decompress(&cinfo);	/* Step 5: Start decompressor */
-    width = cinfo.output_width;
-    height = cinfo.output_height;
-    if ((width < 1) || (height < 1)) {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\": bad JPEG image size", (char *)NULL);
-	return NULL;
-    }
-    /* JSAMPLEs per row in output buffer */
-    samplesPerRow = width * cinfo.output_components;
-
-    /* Make a one-row-high sample array that will go away when done with
-     * image */
-    rows = (*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo, JPOOL_IMAGE, 
-	samplesPerRow, 1);
-    destPtr = Blt_CreatePicture(width, height);
-    if (cinfo.output_components == 1) {
-	Blt_Pixel *destRowPtr;
-
-	destRowPtr = destPtr->bits;
-	while (cinfo.output_scanline < height) {
-	    JSAMPLE *bp;
-	    Blt_Pixel *dp;
-	    int i;
-
-	    dp = destRowPtr;
-	    jpeg_read_scanlines(&cinfo, rows, 1);
-	    bp = rows[0];
-	    for (i = 0; i < (int)width; i++) {
-		dp->Red = dp->Green = dp->Blue = *bp++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } else {
-	Blt_Pixel *destRowPtr;
-
-	destRowPtr = destPtr->bits;
-	while (cinfo.output_scanline < height) {
-	    JSAMPLE *bp;
-	    Blt_Pixel *dp;
-	    int i;
-	    
-	    dp = destRowPtr;
-	    jpeg_read_scanlines(&cinfo, rows, 1);
-	    bp = rows[0];
-	    for (i = 0; i < (int)width; i++) {
-		dp->Red = *bp++;
-		dp->Green = *bp++;
-		dp->Blue = *bp++;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-	destPtr->flags |= BLT_PIC_COLOR;
-    }
-    jpeg_finish_decompress(&cinfo);
-    jpeg_destroy_decompress(&cinfo);
-
-    if (error.pub.num_warnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "JPG_READ_WARNINGS", 
-		Tcl_DStringValue(&error.dString), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&error.dString);
-    chain = Blt_Chain_Create();
-    Blt_Chain_Append(chain, destPtr);
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToJpg --
- *
- *      Writes a JPEG format image to the provided dynamic buffer.
- *
- * Results:
- *      A standard TCL result.  If an error occured, TCL_ERROR is returned and
- *      an error message will be place in the interpreter result. Otherwise,
- *      the dynamic buffer will contain the binary output of the image.
- *
- * Side Effects:
- *	Memory is allocated for the dynamic buffer.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToJpg(
-    Tcl_Interp *interp, 	/* Interpreter to report errors back to. */
-    Blt_Picture original,	/* Picture source. */
-    Blt_DBuffer buffer,		/* Destination buffer to contain the JPEG
-				 * image.  */
-    JpgExportSwitches *switchesPtr)
-{
-    JpgErrorHandler error;
-    int result, nColors;
-    struct jpeg_compress_struct cinfo;
-    Picture *srcPtr;
-
-    result = TCL_ERROR;
-    srcPtr = original;
-
-    /* Step 1: allocate and initialize JPEG compression object */
-    cinfo.err = jpeg_std_error(&error.pub);
-    error.pub.error_exit = JpgErrorProc;
-    error.pub.output_message = JpgMessageProc;
-
-    /* Initialize possible error message */
-    Tcl_DStringInit(&error.dString);
-    Tcl_DStringAppend(&error.dString, "error writing jpg: ", -1);
-
-    if (setjmp(error.jmpbuf)) {
-	/* Transfer the error message to the interpreter result. */
-	Tcl_DStringResult(interp, &error.dString);
-	goto bad;
-    }
-
-    /* Now we can initialize the JPEG compression object. */
-    jpeg_create_compress(&cinfo);
-    
-    /* Step 2: specify data destination (eg, a file) */
-    
-    JpgSetDestinationToBuffer(&cinfo, buffer);
-    
-    /* Step 3: set parameters for compression */
-    
-    /* First we supply a description of the input image.  Four fields of the
-     * cinfo struct must be filled in:
-     */
-    cinfo.image_width = srcPtr->width;
-    cinfo.image_height = srcPtr->height;
-
-    if (!Blt_PictureIsOpaque(srcPtr)) {
-	Blt_Picture background;
-
-	/* Blend picture with solid color background. */
-	background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	Blt_BlankPicture(background, &switchesPtr->bg); 
-	Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = background;
-    }
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_Picture unassoc;
-	/* 
-	 * The picture has an alpha burned into the components.
-	 * Create a temporary copy removing pre-multiplied alphas.
-	 */ 
-	unassoc = Blt_ClonePicture(srcPtr);
-	Blt_UnassociateColors(unassoc);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = unassoc;
-    }
-    nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-    if (Blt_PictureIsColor(srcPtr)) {
-	cinfo.input_components = 3; /* # of color components per pixel */
-	cinfo.in_color_space = JCS_RGB;	/* colorspace of input image */
-    } else {
-	cinfo.input_components = 1; /* # of color components per pixel */
-	cinfo.in_color_space = JCS_GRAYSCALE; /* colorspace of input image */
-    }	
-    jpeg_set_defaults(&cinfo);
-
-    /* 
-     * Now you can set any non-default parameters you wish to.  Here we just
-     * illustrate the use of quality (quantization table) scaling:
-     */
-
-    /* limit to baseline-JPEG values */
-    jpeg_set_quality(&cinfo, switchesPtr->quality, TRUE);
-    if (switchesPtr->flags & PIC_PROGRESSIVE) {
-	jpeg_simple_progression(&cinfo);
-    }
-    if (switchesPtr->smoothing > 0) {
-	cinfo.smoothing_factor = switchesPtr->smoothing;
-    }
-    /* Step 4: Start compressor */
-
-    jpeg_start_compress(&cinfo, TRUE);
-
-    /* Step 5: while (scan lines remain to be written) */
-    /*           jpeg_write_scanlines(...); */
-    {
-	int y;
-	int row_stride;
-	JSAMPLE *destRow;
-	Blt_Pixel *srcRowPtr;
-	JSAMPROW row_pointer[1];	/* pointer to JSAMPLE row[s] */
-
-	/* JSAMPLEs per row in image_buffer */
-	row_stride = srcPtr->width * cinfo.input_components;
-	destRow = Blt_AssertMalloc(sizeof(JSAMPLE) * row_stride);
-	srcRowPtr = srcPtr->bits;
-	if (cinfo.input_components == 3) {
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		JSAMPLE *dp;
-		
-		dp = destRow;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; 
-		     sp++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Blue;
-		    dp += 3;
-		}
-		row_pointer[0] = destRow;
-		jpeg_write_scanlines(&cinfo, row_pointer, 1);
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	} else {
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		JSAMPLE *dp;
-		
-		dp = destRow;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; 
-		     sp++) {
-		    *dp++ = sp->Red;
-		}
-		row_pointer[0] = destRow;
-		jpeg_write_scanlines(&cinfo, row_pointer, 1);
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	}
-	Blt_Free(destRow);
-    }
-    /* Step 6: Finish compression */
-    jpeg_finish_compress(&cinfo);
-    result = TCL_OK;
- bad:
-    /* Step 7: release JPEG compression object */
-    jpeg_destroy_compress(&cinfo);
-
-    if (error.pub.num_warnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "JPG_WRITE_WARNINGS", 
-		Tcl_DStringValue(&error.dString), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&error.dString);
-    if (srcPtr != original) {
-	Blt_FreePicture(srcPtr);
-    }
-    return result;
-}
-
-static Blt_Chain
-ReadJpg(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    JpgImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return JpgToPicture(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WriteJpg(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Tcl_Obj *objPtr;
-    Blt_DBuffer dbuffer;
-    JpgExportSwitches switches;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.quality = 100;
-    switches.smoothing = 0;
-    switches.flags = 0;		/* No progressive or compression. */
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-
-    objPtr = NULL;
-    dbuffer = Blt_DBuffer_Create();
-    if (PictureToJpg(interp, picture, dbuffer, &switches) == TCL_OK) {
-	char *bytes;
-
-	bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (bytes != NULL) {
-	    objPtr = Tcl_NewStringObj(bytes, -1);
-	    Blt_Free(bytes);
-	}
-    }
-    Blt_DBuffer_Destroy(dbuffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportJpg(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Chain chain;
-    const char *string;
-    JpgImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_SaveFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = JpgToPicture(interp, string, dbuffer, &switches);
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportJpg(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Picture picture;
-    JpgExportSwitches switches;
-    int result;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.quality = 100;
-    switches.smoothing = 0;
-    switches.flags = 0;		/* No progressive or compression. */
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-    switches.index = index;
-
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if (switches.quality == 0) {
-	switches.quality = 100; /* Default quality setting. */
-    } else if (switches.quality > 100) {
-	switches.quality = 100; /* Maximum quality setting. */
-    }
-    if (switches.smoothing > 100) {
-	switches.smoothing = 100; /* Maximum smoothing setting. */
-    }
-
-    dbuffer = Blt_DBuffer_Create();
-    result = PictureToJpg(interp, picture, dbuffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-
-    if (switches.fileObjPtr != NULL) {
-	const char *fileName;
-
-	/* Write the image into the designated file. */
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	/* Write the image into the designated TCL variable. */
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	/* Return the image as a base64 string in the interpreter result. */
-	result = TCL_ERROR;
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	    result = TCL_OK;
-	}
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int
-Blt_PictureJpgInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_jpg", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-        "jpg",			/* Name of format. */
-	IsJpg,			/* Format discovery procedure. */
-	ReadJpg,		/* Read format procedure. */
-	WriteJpg,		/* Write format procedure. */
-	ImportJpg,		/* Import format procedure. */
-	ExportJpg);		/* Export format procedure. */
-}
-
-#endif /* HAVE_LIBJPG */
-
diff --git a/blt3.0/src/bltPictMmx.c b/blt3.0/src/bltPictMmx.c
deleted file mode 100644
index f3140c2..0000000
--- a/blt3.0/src/bltPictMmx.c
+++ /dev/null
@@ -1,2257 +0,0 @@
-
-
-/*
- * bltPictMMX.c --
- *
- * This module implements image processing procedures for the BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltPicture.h"
-#include "bltPictInt.h"
-
-#ifdef HAVE_X86_ASM
-
-static Blt_ApplyPictureToPictureProc ApplyPictureToPicture;
-static Blt_ApplyScalarToPictureProc  ApplyScalarToPicture;
-#ifdef notdef
-static Blt_ApplyPictureToPictureWithMaskProc ApplyPictureToPictureWithMask;
-static Blt_ApplyScalarToPictureWithMaskProc  ApplyScalarToPictureWithMask;
-#endif
-static Blt_TentHorizontallyProc TentHorizontally;
-static Blt_TentVerticallyProc TentVertically;
-static Blt_ZoomHorizontallyProc ZoomHorizontally;
-static Blt_ZoomVerticallyProc ZoomVertically;
-static Blt_BlendPicturesProc BlendPictures;
-static Blt_SelectPixelsProc SelectPixels;
-static Blt_AssociateColorsProc AssociateColors;
-static Blt_UnassociateColorsProc UnassociateColors;
-static Blt_FadePictureProc FadePicture;
-static Blt_CopyPictureBitsProc CopyPictureBits;
-
-static Blt_PictureProcs mmxPictureProcs = {
-    ApplyPictureToPicture,
-    ApplyScalarToPicture,
-    NULL, /* ApplyPictureToPictureWithMask, */
-    NULL, /* ApplyScalarToPictureWithMask, */
-    TentHorizontally,
-    TentVertically,
-    ZoomHorizontally,
-    ZoomVertically,
-    BlendPictures,
-    SelectPixels,
-    AssociateColors,
-    UnassociateColors,
-    NULL, /*FadePicture*, */
-    CopyPictureBits
-};
-
-static void
-SelectPixels(
-    Pict *destPtr,
-    Pict *srcPtr, 
-    Blt_Pixel *lowerPtr,
-    Blt_Pixel *upperPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if (srcPtr != destPtr) {
-	Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    }
-
-    asm volatile (
-	/* Put lower and upper pixels in registers. */
-	"movd %0, %%mm4	        # mm4 = L\n\t"
-	"movd %1, %%mm5	        # mm5 = H\n\t"
-	"pxor %%mm6, %%mm6	# mm6 = 0\n\t"
-	"punpckldq %%mm4, %%mm4 # mm4 = L,L\n\t" 
-	"punpckldq %%mm5, %%mm5 # mm5 = H,H\n\t" :
-	/* output registers */ :
-	/* input registers */
-	"r" (lowerPtr->u32), "r" (upperPtr->u32));
-
-    destRowPtr = destPtr->bits, srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp, *sp, *send;
-
-	dp = destRowPtr;
-	for(sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp += 2) {
-	    asm volatile (
-		/* Compare two pixels at a time */
-		"movq (%1), %%mm3	# mm3 = S1,S2\n\t"
-		"movq %%mm4, %%mm0	# mm0 = L,L\n\t"
-
-		/* We want to test (S >= L) && (S <= H). Since the operands
-		 * are all unsigned, pcmp* ops are out.  Instead use
-		 * saturated, unsigned subtraction.  ((L psub S) == 0) is the
-		 * same as (S >= L) */
-
-		"psubusb %%mm3, %%mm0	# mm0 = L - S\n\t"
-		"movq %%mm3, %%mm1	# mm1 = S\n\t"
-		"psubusb %%mm5, %%mm1	# mm1 = S - H\n\t"
-
-		/* "or" the two results and compare 32-bit values to 0
-		 * (inverting the logic). */
-
-		"por %%mm1, %%mm0	# mm0 = (S >= L)|(H >= S)\n\t"
- 		"pcmpeqd %%mm6, %%mm0	# invert logic\n\t"
-		"movq %%mm0, (%0)	# dp = new value\n" :
-		/* output registers */
-		"+r" (dp) :
-		/* input registers */
-		"r" (sp));
-	    dp += 2;
-	}
-	srcRowPtr  += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-    destPtr->flags &= ~BLT_PIC_BLEND;
-    destPtr->flags |= BLT_PIC_MASK;
-}
-
-static void
-AddPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-	        "movq (%0), %%mm0\n\t" 
-		"paddusb (%1), %%mm0\n\t" 
-		"movq %%mm0, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-SubPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"psubusb (%1), %%mm0\n\t" 
-		"movq %%mm0, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-RSubPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		     int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%1), %%mm1\n\t" 
-		"psubusb (%0), %%mm1\n\t" 
-		"movq %%mm1, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-AndPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, 	int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"pand (%1), %%mm0\n\t" 
-		"movq %%mm0, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-OrPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		   int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"por (%1), %%mm0\n\t" 
-		"movq %%mm0, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-NandPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		     int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"pand (%1), %%mm0\n\t" 
-		"pxor %%mm7, %%mm0\n\t" 
-		"movq %%mm0, (%0)" : 
-		/* output registers */
-		"+r" (dp) : 
-		/* input registers */
-		"r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-NorPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"por (%1), %%mm0\n\t" 
-		"pxor %%mm7, %%mm0\n\t" 
-		"movq %%mm0, (%0)" 
-		/* output registers */
-		: "+r" (dp) 
-		/* input registers */
-		: "r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-XorPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0\n\t" 
-		"pxor (%1), %%mm0\n\t" 
-		"movq %%mm0, (%0)" 
-		/* output registers */
-		: "+r" (dp) 
-		/* input registers */
-		: "r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-MinPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0		# mm0 = A\n\t" 
-		"movq (%1), %%mm1		# mm1 = B\n\t" 
-		"movq %%mm0, %%mm2		# mm2 = A\n\t" 
-		"psubusb %%mm1, %%mm2		# mm2 = A - B\n\t"
-		"pcmpeqb %%mm6, %%mm2		# mm2 = 0s A>B 1s A<=B\n\t"
-		"pand %%mm2, %%mm0		# mm2 = mask & A\n\t" 
-		"pxor %%mm7, %%mm2		# mm2 = ~mask\n\t" 
-		"pand %%mm2, %%mm1		# mm0 = ~mask & B\n\t" 
-		"por %%mm1, %%mm0		# mm0 = R1 | R2\n\t" 
-		"movq %%mm0, (%0)" 
-		/* output registers */
-		: "+r" (dp) 
-		/* input registers */
-		: "r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-MaxPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		    int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm7, %mm7	# mm5 = -1 \n");
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp += 2, sp += 2) {
-	    asm volatile (
-		"movq (%0), %%mm0		# mm0 = A\n\t" 
-		"movq (%1), %%mm1		# mm1 = B\n\t" 
-		"movq %%mm0, %%mm2		# mm2 = A\n\t" 
-		"psubusb %%mm1, %%mm2		# mm2 = A - B\n\t"
-		"pcmpeqb %%mm6, %%mm2		# mm2 = 0s A>B 1s A<=B\n\t"
-		"pand %%mm2, %%mm1		# mm1 = mask & B\n\t" 
-		"pxor %%mm7, %%mm2		# mm2 = ~mask\n\t" 
-		"pand %%mm2, %%mm0		# mm0 = ~mask & A\n\t" 
-		"por %%mm1, %%mm0		# mm3 = R1 | R2\n\t" 
-		"movq %%mm0, (%0)" 
-		/* output registers */
-		: "+r" (dp) 
-		/* input registers */
-		: "r" (sp));
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-ApplyPictureToPicture(
-    Pict *destPtr, 
-    Pict *srcPtr, 
-    int x, int y, int w, int h, int dx, int dy, 
-    Blt_PictureArithOps op)
-{
-    if ((x + w) > srcPtr->width) {
-	w -= srcPtr->width - x;	
-    }
-    if ((y + h) > srcPtr->height) {
-	h -= srcPtr->height - y;
-    }
-    if ((dx + w) > destPtr->width) {
-	w -= destPtr->width - dx;
-    }
-    if ((dy + h) > destPtr->height) {
-	h -= destPtr->height - dy;
-    }
-    switch(op) {
-    case PIC_ARITH_ADD:
-	AddPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_SUB:
-	SubPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_RSUB:
-	RSubPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_AND:
-	AndPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_OR:
-	OrPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_NAND:
-	NandPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_NOR:
-	NorPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_XOR:
-	XorPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_MIN:
-	MinPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    case PIC_ARITH_MAX:
-	MaxPictureToPicture(destPtr, srcPtr, x, y, w, h, dx, dy);
-	break;
-    }
-}
-
-
-static void
-ApplyScalarToPicture(
-    Pict *srcPtr, 
-    Blt_Pixel *colorPtr,
-    Blt_PictureArithOps op)
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    
-    /*
-     * mm7 = -1
-     * mm6 = 0x0
-     * mm4 = scalar,scalar
-     */
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %%mm6, %%mm6	  # mm6 = 0\n\t"
-	"pcmpeqw %%mm7, %%mm7	  # mm5 = -1 \n\t"
-	/* Put the scalar into hi/lo 32-bit words.*/
-	"movd %0, %%mm4		  # mm4 = scalar\n\t"
-	"punpckldq %%mm4, %%mm4   # mm2 = S,S\n" 
-	/* output registers */
-	:
-	/* input registers */
-	: "r" (colorPtr->u32));
-
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-
-	sp = srcRowPtr;
-	send = sp + srcPtr->width;
-	switch(op) {
-	case PIC_ARITH_ADD:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "paddusb %%mm4, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_SUB:
-	    while (sp < send) {
-		asm volatile (
-		     "movq (%0), %%mm0\n\t" 
-		     "psubusb %%mm4, %%mm0\n\t" 
-		     "movq %%mm0, (%0)" : 
-		     /* output registers */
-		     "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_RSUB:
-	    while (sp < send) {
-		asm volatile (
-		     "movq (%0), %%mm0\n\t" 
-		     "movq %%mm4, %%mm1\n\t"
-		     "psubusb %%mm0, %%mm1\n\t" 
-		     "movq %%mm1, (%0)" : 
-		     /* output registers */
-		     "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_AND:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "pand %%mm4, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_OR:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "por %%mm4, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_NAND:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "pand %%mm4, %%mm0\n\t" 
-		    "pxor %%mm7, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_NOR:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "por %%mm4, %%mm0\n\t" 
-		    "pxor %%mm7, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_XOR:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0\n\t" 
-		    "pxor %%mm4, %%mm0\n\t" 
-		    "movq %%mm0, (%0)" : 
-		    /* output registers */
-		    "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_MIN:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0     # mm0 = Color\n\t" 
-		    "movq %%mm0, %%mm1    # mm1 = Color\n\t" 
-		    "psubusb %%mm4, %%mm1 # mm1 = C - S\n\t"
-		    "pcmpeqb %%mm6, %%mm1 # mm2 = mask: 0s C>S 1s C<=S\n\t"
-		    "pand %%mm1, %%mm0    # mm0 = mask & C\n\t" 
-		    "pxor %%mm7, %%mm1    # mm1 = ~mask\n\t" 
-		    "pand %%mm4, %%mm1    # mm1 = S & ~mask\n\t" 
-		    "por %%mm1, %%mm0     # mm0 = (S&~mask)|(mask&C)\n\t" 
-		    "movq %%mm0, (%0)" 
-		    /* output registers */
-		    : "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-
-	case PIC_ARITH_MAX:
-	    while (sp < send) {
-		asm volatile (
-		    "movq (%0), %%mm0     # mm0 = Color\n\t" 
-		    "movq %%mm4, %%mm1    # mm1 = Scalar\n\t" 
-		    "psubusb %%mm0, %%mm1 # mm1 = S - C\n\t"
-		    "pcmpeqb %%mm6, %%mm1 # mm1 = mask: 0s S>C 1s S<=C\n\t"
-		    "pand %%mm1, %%mm0    # mm0 = mask & C\n\t" 
-		    "pxor %%mm7, %%mm1    # mm1 = ~mask\n\t" 
-		    "pand %%mm4, %%mm1    # mm1 = S & ~mask\n\t" 
-		    "por %%mm1, %%mm0     # mm0 = (S&~mask)|(mask&C)\n\t" 
-		    "movq %%mm0, (%0)" 
-		    /* output registers */
-		    : "+r" (sp));
-		sp += 2;
-	    }
-	    break;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-ZoomVertically(Pict *destPtr, Pict *srcPtr, ResampleFilter *filterPtr)
-{
-    Sample *samples, *send;
-    int x;
-    int bytesPerSample;		/* Size of sample. */
-    long bytesPerRow;
-
-    /* Pre-calculate filter contributions for each row. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->height, destPtr->height, 
-	filterPtr, &samples);
-    bytesPerRow = sizeof(Blt_Pixel) * srcPtr->pixelsPerRow;
-    send = (Sample *)((char *)samples + (destPtr->height * bytesPerSample));
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm2, %mm2	# mm2 = -1 \n\t"
-	"psubw %mm6, %mm2	# mm2 = 1,1,1,1\n\t"
-	"psllw $4, %mm2	        # mm2 = BIAS\n");
-
-    /* Apply filter to each row. */
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColumnPtr;
-	Sample *splPtr;
-
-	srcColumnPtr = srcPtr->bits + x;
-	dp = destPtr->bits + x;
-	for (splPtr = samples; splPtr < send; 
-	     splPtr = (Sample *)((char *)splPtr + bytesPerSample)) {
-	    Blt_Pixel *sp;
-
-	    sp = srcColumnPtr + (splPtr->start * srcPtr->pixelsPerRow);
-	    asm volatile (
-		/* Clear the accumulator mm5. */
-                 "pxor %%mm5, %%mm5	    #  mm5 = 0\n\n" 
-                 ".Lasm%=:\n\t" 
-		 /* Load the weighting factor into mm1. */
-		 "movd (%1), %%mm1	    #  mm1 = 0,0,0,W\n\t"
-		 /* Load the source pixel into mm0. */
-                 "movd (%3), %%mm0          #  mm0 = S\n\t" 
-		 /* Unpack the weighting factor into mm1. */
-		 "punpcklwd %%mm1, %%mm1    #  mm1 = 0,0,W,W\n\t"
-		 /* Unpack the pixel components into 16-bit words.*/
-                 "punpcklbw %%mm6, %%mm0    #  mm0 = Sa,Sb,Sg,Sr\n\t" 
-		 /*  */
-		 "punpcklwd %%mm1, %%mm1    #  mm1 = W,W,W,W\n\t"
-		 /* Scale the 8-bit components to 14 bits. (S * 257) >> 2 */
-                 "movq %%mm0, %%mm3         #  mm3 = S8\n\t" 
-                 "psllw $8, %%mm3           #  mm3 = S8 * 256\n\t" 
-                 "paddw %%mm3, %%mm0        #  mm0 = S16\n\t" 
-                 "psrlw $1, %%mm0           #  mm0 = S15\n\t" 
-		 /* Multiple each pixel component by the weight.  Note that
-		  * the lower 16-bits of the product are truncated (bad)
-		  * creating round-off error in the sum. */
-                 "pmulhw %%mm1, %%mm0       #  mm0 = S15 * W14\n\t" 
-                 "add $4, %1                #  wp++\n\t" 
-                 "add %4, %3                #  sp++\n\t" 
-                 /* Accumulate upper 16-bit results of product in mm5. */
-                 "paddsw %%mm0, %%mm5       #  mm5 = prod + mm5\n\t" 
-                 /* Move the pointers to the next weight and pixel */
-                 "cmp %2, %1                #  wend == wp\n\t" 
-                 "jnz .Lasm%=\n\t" 
-                 /* end loop */
-                 /* Add a rounding bias to the pixel sum */
-                 "paddw %%mm2, %%mm5        # mm5 = A13 + BIAS\n\t" 
-                 /* Shift off fractional part */
-                 "psraw $5, %%mm5           # mm5 = A8\n\t" 
-		 /* Pack 16-bit components into lower 4 bytes. */
-                 "packuswb  %%mm5, %%mm5    # Pack 4 low-order bytes.\n\t" 
-		 /* Save the word (pixel) in the destination. */
-                 "movd %%mm5,(%0)           # dp = word\n"
-  		 /* output registers */ 
-		 : "+r" (dp) 
-		 /* input registers */
-		 : "r" (splPtr->weights), 
-		   "r" (splPtr->wend), 
-		   "r" (sp),
-		   "r" (bytesPerRow));
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "mmx v-alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp += destPtr->pixelsPerRow;
-
-	}
-    }
-    asm volatile ("emms");
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(samples);
-}
-
-static void
-ZoomHorizontally(
-    Pict *destPtr,
-    Pict *srcPtr, 
-    ResampleFilter *filterPtr)
-{
-    Sample *samples, *send;
-    int y;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int bytesPerSample;		/* Size of sample. */
-
-    /* Pre-calculate filter contributions for each column. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->width, destPtr->width, 
-	filterPtr, &samples);
-    send = (Sample *)((char *)samples + (destPtr->width * bytesPerSample));
-
-    /* Apply filter to each column. */
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-
-    asm volatile (
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pxor %mm3, %mm3	# mm3 = 0\n\t"
-	"pcmpeqw %mm2, %mm2	# mm2 = -1\n\t"
-	"psubw %mm3, %mm2	# mm2 = 1,1,1,1\n\t"
-	"psllw $4, %mm2	        # mm2 = BIAS\n");
-
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	Sample *splPtr;
-
-	dp = destRowPtr;
-	for (splPtr = samples; splPtr < send; 
-	     splPtr = (Sample *)((char *)splPtr + bytesPerSample)) {
-
-	    Blt_Pixel *sp;
-	    sp = srcRowPtr + splPtr->start;
-	    asm volatile (
-		/* Clear the accumulator mm5. */
-                 "pxor %%mm5, %%mm5        #  mm5 = 0\n\n" 
-                 ".Lasm%=:\n\t" 
-		 /* Load the weighting factor into mm1. */
-                 "movd (%1), %%mm1         #  mm1 = W\n\t" 
-		 /* Get the source RGBA pixel. */
-                 "movd (%3), %%mm0         #  mm0 = sp\n\t" 
-		 /* Unpack the weighting factor into mm1. */
-		 "punpcklwd %%mm1, %%mm1   #  mm1 = 0,0,W,W\n\t"
-		 /* Unpack the pixel into mm0. */
-                 "punpcklbw %%mm6, %%mm0   #  mm0 = Sa,Sr,Sg,Sb\n\t" 
-		 /*  */
-		 "punpcklwd %%mm1, %%mm1   #  mm1 = W,W,W,W\n\t"
-		 /* Scale the 8-bit components to 14 bits: (S * 257) >> 2 */
-                 "movq %%mm0, %%mm3        #  mm3 = S8\n\t" 
-                 "psllw $8, %%mm3          #  mm3 = S8 * 256\n\t" 
-                 "paddw %%mm3, %%mm0       #  mm0 = S16\n\t" 
-                 "psrlw $1, %%mm0          #  mm0 = S15\n\t" 
-		 /* Multiple each pixel component by the weight.  Note
-		  * that the lower 16-bits of the product are
-		  * truncated (bad) creating round-off error in the
-		  * sum. */
-                 "pmulhw %%mm1, %%mm0      #  mm0 = S15 * W14\n\t"  
-                 "add $4, %1		   #  wp++\n\t" 
-                 "add $4, %3               #  sp++\n\t" 
-                 /* Add the 16-bit components to mm5. */
-                 "paddsw %%mm0, %%mm5      #  mm5 = A13 + mm5\n\t" 
-                 /* Move the pointers to the next weight and pixel */
-                 "cmp %2, %1               #  wend == wp\n\t" 
-                 "jnz .Lasm%=\n\t" 
-                 /* end loop */
-                 /* Add a rounding bias to the pixel sum. */
-                 "paddw %%mm2, %%mm5       # mm5 = A13 + BIAS\n\t" 
-                 /* Shift off fractional portion. */
-                 "psraw $5, %%mm5          # mm5 = A8\n\t" 
-		 /* Pack 16-bit components into lower 4 bytes. */
-                 "packuswb %%mm5, %%mm5    # Pack A8 into low 4 bytes.\n\t" 
-		 /* Store the word (pixel) in the destination. */
-                 "movd %%mm5,(%0)	   # dp = word\n" 
-  		 /* output registers */ 
-		 : "+r" (dp) 
-		 /* input registers */
-		 : "r" (splPtr->weights), 
-		   "r" (splPtr->wend), 
-		   "r" (sp));
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "mmx h-alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp++;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-    /* Free the memory allocated for horizontal filter weights. */
-    Blt_Free(samples);
-}
-
-
-static void
-TentVertically(Pict *destPtr, Pict *srcPtr) 
-{
-    Blt_Pixel *srcColumnPtr, *destColumnPtr;
-    int x;
-    size_t nPixels;
-    
-    asm volatile (
-	/* Establish constants used below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n");
-
-    nPixels = srcPtr->height * srcPtr->pixelsPerRow; 
-    srcColumnPtr = srcPtr->bits;
-    destColumnPtr = destPtr->bits;
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *rp, *rend;
-
-	/* 
-	 * mm0 = 
-	 * mm1 = unpacked center pixel 
-	 * mm2 = unpacked left pixel  
-	 * mm3 = unpacked right pixel 
-	 * mm4 = 
-	 * mm5 = 
-	 * mm6 = 0
-	 * mm7 = 
-	 */
-	dp = destColumnPtr;
-	rp = srcColumnPtr + srcPtr->pixelsPerRow;
-	asm volatile (
-	    "movd (%2), %%mm1         # mm1 = cp\n\t"
-	    "movd (%1), %%mm3         # mm3 = rp\n\t"
-	    "punpcklbw %%mm6, %%mm1   # mm1 = S8\n\t"
-	    "movq %%mm1, %%mm2        # mm2 = lp = S8\n\t"
-	    "punpcklbw %%mm6, %%mm3   # mm3 = S8\n\t"
-	    "movq  %%mm1, %%mm0       # mm0 = cp\n\t"
-	    "psllw $1, %%mm0          # mm0 = cp << 1\n\t"
-	    "paddw %%mm2, %%mm0       # mm0 = lp + (cp << 1)\n\t"
-	    "paddw %%mm3, %%mm0       # mm0 = lp + (cp << 1) + rp\n\t"
-	    "psraw $2, %%mm0          # mm0 = (lp + (cp << 1) + rp) >> 2\n\t"
-	    "packuswb %%mm0, %%mm0    # Pack into low 4 bytes.\n\t"  
-	    "movd %%mm0,(%0)	      # dp = word\n\t"
-	    "movq %%mm3, %%mm1	      # cp = rp\n" :
-	    /* output registers */ 
-	    "+r" (dp), "+r" (rp) :
-	    /* input registers */
-	    "r" (srcColumnPtr));
-	dp += destPtr->pixelsPerRow;
-	rp += srcPtr->pixelsPerRow;
-
-	for (rend = srcColumnPtr + nPixels; rp < rend; /*empty*/) {
-	    asm volatile (
-	        "movd (%1), %%mm3         #  mm3 = rp\n\t" 
-	        "punpcklbw %%mm6, %%mm3   #  mm3 = S8\n\t"
-		"movq  %%mm1, %%mm0       #  mm0 = cp\n\t"
-		"psllw $1, %%mm0          #  mm0 = cp << 1\n\t"
-		"paddw %%mm2, %%mm0       #  mm0 = lp + (cp << 1)\n\t"
-		"paddw %%mm3, %%mm0       #  mm0 = lp + (cp << 1) + rp\n\t"
-		"psraw $2, %%mm0          #  mm0 = (lp + (cp<<1) + rp) >> 2\n\t"
-		"packuswb %%mm0, %%mm0    #  Pack into low 4 bytes.\n\t"  
-		"movd %%mm0,(%0)	  #  dp = word\n\t" 
-  	        "movq %%mm1, %%mm2        #  lp = cp\n\t"
-  	        "movq %%mm3, %%mm1        #  cp = rp\n"
-		/* output registers */ 
-		: "+r" (dp), 
-		  "+r" (rp));
-	    dp += destPtr->pixelsPerRow;
-	    rp += srcPtr->pixelsPerRow;
-	}	
-	asm volatile (
-	    "movq %%mm1, %%mm3        #  rp = cp\n\t"
-	    "movq %%mm1, %%mm0        #  mm0 = cp\n\t"
-	    "psllw $1, %%mm0          #  mm0 = cp << 1\n\t"
-	    "paddw %%mm2, %%mm0       #  mm0 = lp + (cp << 1)\n\t"
-	    "paddw %%mm3, %%mm0       #  mm0 = lp + (cp << 1) + rp\n\t"
-	    "psraw $2, %%mm0          #  mm0 = (lp + (cp << 1) + rp) >> 2\n\t"
-	    "packuswb %%mm0, %%mm0    #  Pack into low 4 bytes.\n\t"  
-	    "movd %%mm0,(%0)	      #  dp = word\n" 
-	    /* output registers */ 
-	    : "+r" (dp));
-
-	srcColumnPtr++, destColumnPtr++;
-    }
-    asm volatile ("emms");
-}
-
-static void
-TentHorizontally(Pict *destPtr, Pict *srcPtr) 
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    asm volatile (
-	/* Establish constants used below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n");
-
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	Blt_Pixel *rp, *rend;
-	
-	/* 
-	 * mm0 = 
-	 * mm1 = unpacked center pixel 
-	 * mm2 = unpacked left pixel  
-	 * mm3 = unpacked right pixel 
-	 * mm4 = 
-	 * mm5 = 
-	 * mm6 = 0
-	 * mm7 = 
-	 */
-	dp = destRowPtr;
-	rp = srcRowPtr + 1;
-	asm volatile (
-	    "movd (%2), %%mm1         #  mm1 = cp\n\t"
-	    "movq %%mm1, %%mm2        #  mm2 = lp\n\t"
-	    "movd (%1), %%mm3         #  mm3 = rp\n\t"
-	    "punpcklbw %%mm6, %%mm1   #  mm1 = S8\n\t"
-	    "punpcklbw %%mm6, %%mm2   #  mm2 = S8\n\t"
-	    "punpcklbw %%mm6, %%mm3   #  mm3 = S8\n\t"
-	    "movq  %%mm1, %%mm0       #  mm0 = cp\n\t"
-	    "psllw $1, %%mm0          #  mm0 = cp << 1\n\t"
-	    "paddw %%mm2, %%mm0       #  mm0 = lp + (cp << 1)\n\t"
-	    "paddw %%mm3, %%mm0       #  mm0 = lp + (cp << 1) + rp\n\t"
-	    "psraw $2, %%mm0          #  mm0 = (lp + (cp << 1) + rp) >> 2\n\t"
-	    "packuswb %%mm0, %%mm0    #  Pack into low 4 bytes.\n\t"  
-	    "movd %%mm0,(%0)	      #  dp = word\n\t"
-	    "movq %%mm3, %%mm1	      #  cp = rp\n" :
-	    /* output registers */ 
-	    "+r" (dp), "+r" (rp) :
-	    /* input registers */
-	    "r" (srcRowPtr));
-	dp++, rp++;
-
-	for (rend = srcRowPtr + srcPtr->width; rp < rend; /*empty*/) {
-	    asm volatile (
-		"movd (%1), %%mm3         # mm3 = rp\n\t" 
-		"punpcklbw %%mm6, %%mm3   # mm3 = S8\n\t"
-		"movq  %%mm1, %%mm0       #  mm0 = cp\n\t"
-		"psllw $1, %%mm0          #  mm0 = cp << 1\n\t"
-		"paddw %%mm2, %%mm0       #  mm0 = lp + (cp << 1)\n\t"
-		"paddw %%mm3, %%mm0       #  mm0 = lp + (cp << 1) + rp\n\t"
-		"psraw $2, %%mm0          #  mm0 = (lp + (cp<<1) + rp) >> 2\n\t"
-		"packuswb %%mm0, %%mm0    #  Pack into low 4 bytes.\n\t"  
-		"movd %%mm0,(%0)	  #  dp = word\n\t" 
-  	        "movq %%mm1, %%mm2        #  lp = cp\n\t"
-  	        "movq %%mm3, %%mm1        #  cp = rp\n" 
-		/* output registers */ 
-		: "+r" (dp), 
-		  "+r" (rp));
-	    dp++, rp++;
-	}
-
-	asm volatile (
-	    "movq %%mm1, %%mm3        #  rp = cp\n\t"
-	    "movq %%mm1, %%mm0        #  mm0 = cp\n\t"
-	    "psllw $1, %%mm0          #  mm0 = cp << 1\n\t"
-	    "paddw %%mm2, %%mm0       #  mm0 = lp + (cp << 1)\n\t"
-	    "paddw %%mm3, %%mm0       #  mm0 = lp + (cp << 1) + rp\n\t"
-	    "psraw $2, %%mm0          #  mm0 = (lp + (cp << 1) + rp) >> 2\n\t"
-	    "packuswb %%mm0, %%mm0    #  Pack into low 4 bytes.\n\t"  
-	    "movd %%mm0,(%0)	      #  dp = word\n" 
-	    /* output registers */ 
-	    : "+r" (dp));
-
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-BlendPictures(
-    Pict *destPtr,		/* (in/out) Background picture. Composite
-				 * overwrites region in background. */
-    Pict *srcPtr,		/* Foreground picture. */
-    int sx, int sy,		/* Origin of foreground region in source. */
-    int w, int h,		/* Dimension of area to be blended. */
-    int dx, int dy)		/* Origin of background region in
-				 * destination. */
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if ((srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(srcPtr);
-    }
-    if ((destPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(destPtr);
-    }
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr = srcPtr->bits + ((sy * srcPtr->pixelsPerRow) + sx);
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm5, %mm5	# mm5 = -1 \n\t"
-	"psubw %mm6, %mm5	# mm5 = 1,1,1,1\n\t"
-	"psllw $7, %mm5	        # mm5 = ROUND = 128\n");
-
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *send, *dp;
-
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + w; sp < send; sp++, dp++) {
-	    /* Blend the foreground and background together. */
-	    if (sp->Alpha == 0xFF) {
-		*dp = *sp;
-	    } else if (sp->Alpha != 0x00) {
-		unsigned long beta;
-		
-		beta = sp->Alpha ^ 0xFF; /* beta = 1 - alpha */
-
-		/*
-		 * Small wins:  
-		 *
-		 * We can compute 
-		 *      dest = (fg * alpha) + (beta * bg);
-		 * for all RGBA components at once. 
-		 *
-		 * Packing unsigned with saturation performs the
-		 * necessary clamping without the branch misprediction
-		 * penalty.
-		 *
-		 * FIXME: 
-		 *     Check if it's faster to do the blend calcution
-		 *     all the time (even when alpha is 0 or
-		 *     255). There's a good probability that the
-		 *     majority of pixels are opaque (interior) or
-		 *     completely transparent (exterior).  Only the
-		 *     edge pixels would require blending.
-		 */
-  	        asm volatile (
-		    /* 
-		     * mm0 = dp
-		     * mm1 = sp
-		     * mm2 = beta = 1 - alpha
-		     * mm3 = temp
-		     * mm4 = 
-		     * mm5 = ROUND = 128,128,128,128
-		     * mm6 = 0
-		     * mm7 = 
-		     */
-		    "movd (%0), %%mm0         #  mm0 = dp\n\t" 
-		    "movd (%1), %%mm1         #  mm1 = sp\n\t" 
- 		    "movd %2, %%mm2           #  mm2 = beta\n\t" 
-		    "punpcklbw %%mm6, %%mm0   #  mm0 = Da,Dr,Dg,Db\n\t" 
- 		    "punpcklwd %%mm2, %%mm2   #  mm2 = 0,0,B,B\n\t"
-		    "punpcklbw %%mm6, %%mm1   #  mm1 = Sa,Sr,Sg,Sb\n\t" 
-		    "punpcklwd %%mm2, %%mm2   #  mm2 = B,B,B,B\n\t"
-		    "pmullw %%mm0, %%mm2      #  mm2 = D*B\n\t" 
-		    "paddw %%mm5, %%mm2       #  mm2 = (D*B)+ROUND\n\t"
-		    "movq %%mm2, %%mm3	      #  mm3 = P16\n\t" 
-		    "psrlw $8, %%mm3          #  mm3 = P16 / 256\n\t"
-		    "paddw %%mm2, %%mm3       #  mm3 = (P16 / 256) + P16\n\t" 
-		    "psrlw $8, %%mm3          #  mm3 = P8 ~= P16 / 257\n\t"
-		    "paddw %%mm1, %%mm3       #  mm3 = S + P\n\t"
-		    "packuswb %%mm3, %%mm3    #  Pack 4 low bytes.\n\t" 
-		    "movd %%mm3, (%0)         #  *dp = word\n" 
-		    : "+r" (dp) 
-		    : "r" (sp), 
-		      "r" (beta));
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-}
-
-static void
-FadePicture(
-    Pict *destPtr, 
-    Pict *srcPtr, 
-    int sx, int sy,
-    int w, int h,
-    int dx, int dy,
-    int alpha)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int beta;
-
-    beta = alpha ^ 0xFF;
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr = srcPtr->bits + ((sy * srcPtr->pixelsPerRow) + sx);
-    if (alpha == 0xFF) {
-	int y;
-
-	for (y = 0; y < h; y++) {
-	    Blt_Pixel *sp, *dp;
-	    int x;
-	
-	    sp = srcRowPtr, dp = destRowPtr;
-	    for (x = 0; x < w; x++) {
-		*dp++ = *sp++;
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } else if (alpha != 0x00) {
-	int y;
-
-	asm volatile (
-            /* Generate constants needed below. */
-            "pxor %mm6, %mm6	# mm6 = 0\n\t"
-	    "pcmpeqw %mm5, %mm5	# mm5 = -1 \n\t"
-	    "psubw %mm6, %mm5	# mm5 = 1,1,1,1\n\t"
-	    "psllw $7, %mm5	# mm5 = BIAS = 128\n");
-	
-	for (y = 0; y < h; y++) {
-	    Blt_Pixel *sp, *send, *dp;
-	    
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + w; sp < send; sp++, dp++) {
-  	        asm volatile (
-		    /* 
-		     * mm0 = dp
-		     * mm1 = sp
-		     * mm2 = beta = 1 - alpha
-		     * mm3 = temp
-		     * mm4 = 
-		     * mm5 = ROUND = 128,128,128,128
-		     * mm6 = 0
-		     * mm7 = 
-		     */
-		    "movd (%0), %%mm0         # mm0 = dp\n\t" 
-		    "movd (%1), %%mm1         # mm1 = sp\n\t" 
- 		    "movd %2, %%mm2           # mm2 = beta\n\t" 
-		    "punpcklbw %%mm6, %%mm0   # mm0 = Da,Dr,Dg,Db\n\t" 
-		    "punpcklbw %%mm6, %%mm1   # mm1 = Sa,Sr,Sg,Sb\n\t" 
- 		    "punpcklwd %%mm2, %%mm2   # mm2 = 0,0,beta,beta\n\t"
-		    "punpcklwd %%mm2, %%mm2   # mm2 = beta,beta,beta,beta\n\t"
-		    "pmullw %%mm0, %%mm2      # mm2 = prod = D*beta\n\t" 
-		    "paddw %%mm5, %%mm2       # mm2 = t = (D*beta)+ROUND\n\t"
-		    "movq %%mm2, %%mm3	      # mm3 = t\n\t" 
-		    "psrlw $8, %%mm3          # mm3 = t >> 8\n\t"
-		    "paddw %%mm2, %%mm3       # mm3 = t + (t>>8)\n\t" 
-		    "psrlw $8, %%mm3          # mm3 = ((t+(t>>8)) >> 8)\n\t"
-		    "paddw %%mm1, %%mm3       # mm3 = S + ((t+(t>>8))>>8)\n\t"
-		    "packuswb %%mm3, %%mm3    # Pack 4 low bytes.\n\t" 
-		    "movd %%mm3,(%0)          # *dp = word\n" 
-		    : "+r" (dp) 
-		    : "r" (dp), 
-		      "r" (beta));
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
-    asm volatile ("emms");
-}
-
-
-#ifdef notdef
-static void
-ConvolvePictureVertically(Pict *destPtr, Pict *srcPtr, 
-			  ResampleFilter *filterPtr)
-{
-    Sample *samples, *send;
-    int x;
-    int bytesPerSample;		/* Size of sample. */
-    long bytesPerRow;
-
-    /* Pre-calculate filter contributions for each row. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->height, destPtr->height, 
-	filterPtr, &samples);
-    bytesPerRow = sizeof(Blt_Pixel) * srcPtr->pixelsPerRow;
-    send = (Sample *)((char *)samples + (destPtr->height * bytesPerSample));
-
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pcmpeqw %mm2, %mm2	# mm2 = -1 \n\t"
-	"psubw %mm6, %mm2	# mm2 = 1,1,1,1\n\t"
-	"psllw $4, %mm2	        # mm2 = BIAS\n");
-
-    /* Apply filter to each row. */
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColumnPtr;
-	Sample *splPtr;
-
-	srcColumnPtr = srcPtr->bits + x;
-	dp = destPtr->bits + x;
-	for (splPtr = samples; splPtr < send; 
-	     splPtr = (Sample *)((char *)splPtr + bytesPerSample)) {
-	    Blt_Pixel *sp;
-
-	    sp = srcColumnPtr + (splPtr->start * srcPtr->pixelsPerRow);
-	    asm volatile (
-		/* Clear the accumulator mm5. */
-                 "pxor %%mm5, %%mm5	    # mm5 = 0\n\n" 
-                 ".Lasm%=:\n\t" 
-		 /* Load the weighting factor into mm1. */
-		 "movd (%1), %%mm1	    # mm1 = 0,0,0,W\n\t"
-		 /* Load the source pixel into mm0. */
-                 "movd (%3), %%mm0          # mm0 = S\n\t" 
-		 /* Unpack the weighting factor into mm1. */
-		 "punpcklwd %%mm1, %%mm1    # mm1 = 0,0,W,W\n\t"
-		 "punpcklwd %%mm1, %%mm1    # mm1 = W,W,W,W\n\t"
-		 /* Unpack the pixel components into 16-bit words.*/
-                 "punpcklbw %%mm6, %%mm0    # mm0 = Sa,Sb,Sg,Sr\n\t" 
-		 /* Scale the 8-bit components to 14 bits. (S * 257) >> 2 */
-                 "movq %%mm0, %%mm3         # mm3 = S8\n\t" 
-                 "psllw $8, %%mm3           # mm3 = S8 * 256\n\t" 
-                 "paddw %%mm3, %%mm0        # mm0 = S16\n\t" 
-                 "psrlw $1, %%mm0           # mm0 = S15\n\t" 
-		 /* Multiple each pixel component by the weight.  Note that
-		  * the lower 16-bits of the product are truncated (bad)
-		  * creating round-off error in the sum. */
-                 "pmulhw %%mm1, %%mm0       # mm0 = S15 * W14\n\t" 
-                 /* Move the pointers to the next weight and pixel */
-                 "add $4, %1                # wp++\n\t" 
-                 "add %4, %3                # sp++\n\t"
-                 /* Accumulate upper 16-bit results of product in mm5. */
-                 "paddsw %%mm0, %%mm5        # mm5 = prod + mm5\n\t" 
-                 "cmp %2, %1                # wend == wp\n\t" 
-                 "jnz .Lasm%=\n\t" 
-                 /* end loop */
-                 /* Add a rounding bias to the pixel sum */
-                 "paddw %%mm2, %%mm5        # mm5 = A13 + BIAS\n\t" 
-                 /* Shift off fractional part */
-                 "psraw $5, %%mm5           # mm5 = A8\n\t" 
-		 /* Pack 16-bit components into lower 4 bytes. */
-                 "packuswb  %%mm5, %%mm5    # Pack 4 low-order bytes.\n\t" 
-		 /* Save the word (pixel) in the destination. */
-                 "movd %%mm5,(%0)           # dp = word\n" 
-  		 /* output registers */ 
-		 : "+r" (dp) 
-		 /* input registers */
-		 : "r" (splPtr->weights), 
-		   "r" (splPtr->wend), 
-		   "r" (sp),
-		   "r" (bytesPerRow));
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "mmx v-alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp += destPtr->pixelsPerRow;
-
-	}
-    }
-    asm volatile ("emms");
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(samples);
-}
-
-static void
-ConvolvePictureHorizontally(Pict *destPtr, Pict *srcPtr, 
-			    ResampleFilter *filterPtr)
-{
-    Sample *samples, *send;
-    int y;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int bytesPerSample;		/* Size of sample. */
-
-    /* Pre-calculate filter contributions for each column. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->width, destPtr->width, 
-	filterPtr, &samples);
-    send = (Sample *)((char *)samples + (destPtr->width * bytesPerSample));
-
-    /* Apply filter to each column. */
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-
-    asm volatile (
-	"pxor %mm6, %mm6	# mm6 = 0\n\t"
-	"pxor %mm3, %mm3	# mm3 = 0\n\t"
-	"pcmpeqw %mm2, %mm2	# mm2 = -1\n\t"
-	"psubw %mm3, %mm2	# mm2 = 1,1,1,1\n\t"
-	"psllw $4, %mm2	        # mm2 = BIAS\n");
-
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	Sample *splPtr;
-
-	dp = destRowPtr;
-	for (splPtr = samples; splPtr < send; 
-	     splPtr = (Sample *)((char *)splPtr + bytesPerSample)) {
-
-	    Blt_Pixel *sp;
-	    sp = srcRowPtr + splPtr->start;
-	    asm volatile (
-		/* Clear the accumulator mm5. */
-                 "pxor %%mm5, %%mm5        #  mm5 = 0\n\n" 
-                 ".Lasm%=:\n\t" 
-		 /* Load the weighting factor into mm1. */
-                 "movd (%1), %%mm1         #  mm1 = W\n\t" 
-		 /* Get the source RGBA pixel. */
-                 "movd (%3), %%mm0         # mm0 = sp\n\t" 
-		 /* Unpack the weighting factor into mm1. */
-		 "punpcklwd %%mm1, %%mm1   # mm1 = 0,0,W,W\n\t"
-		 "punpcklwd %%mm1, %%mm1   # mm1 = W,W,W,W\n\t"
-		 /* Unpack the pixel into mm0. */
-                 "punpcklbw %%mm6, %%mm0   # mm0 = Sa,Sr,Sg,Sb\n\t" 
-		 /* Scale the 8-bit components to 14 bits: (S * 257) >> 2 */
-                 "movq %%mm0, %%mm3        # mm3 = S8\n\t" 
-                 "psllw $8, %%mm3          # mm3 = S8 * 256\n\t" 
-                 "paddw %%mm3, %%mm0       # mm0 = S16\n\t" 
-                 "psrlw $1, %%mm0          # mm0 = S15\n\t" 
-		 /* Multiple each pixel component by the weight.  Note that
-		  * the lower 16-bits of the product are truncated (bad)
-		  * creating round-off error in the sum. */
-                 "movq %%mm0, %%mm7        # mm5 = S15\n\t" 
-                 "pmulhw %%mm1, %%mm0      # mm0 = S15 * W14\n\t" 
-                 "pmullw %%mm1, %%mm7      # mm0 = S15 * W14\n\t" 
-                 "psrlw $15, %%mm7         # mm0 = S1\n\t" 
-                 "paddsw %%mm7, %%mm0      # mm5 = A13 + mm5\n\t" 
-		 
-                 /* Add the 16-bit components to mm5. */
-                 "paddsw %%mm0, %%mm5      # mm5 = A13 + mm5\n\t" 
-                 /* Move the pointers to the next weight and pixel */
-                 "add $4, %1		   # wp++\n\t" 
-                 "add $4, %3               # sp++\n\t" 
-                 "cmp %2, %1               # wend == wp\n\t" 
-                 "jnz .Lasm%=\n\t" 
-                 /* end loop */
-                 /* Add a rounding bias to the pixel sum. */
-                 "paddw %%mm2, %%mm5       # mm5 = A13 + BIAS\n\t" 
-                 /* Shift off fractional portion. */
-                 "psraw $5, %%mm5          # mm5 = A8\n\t" 
-		 /* Pack 16-bit components into lower 4 bytes. */
-                 "packuswb %%mm5, %%mm5    # Pack A8 into low 4 bytes.\n\t" 
-		 /* Store the word (pixel) in the destination. */
-                 "movd %%mm5,(%0)	   # dp = word\n" 
-  		 /* output registers */ 
-		 : "+r" (dp) 
-		 /* input registers */
-		 : "r" (splPtr->weights), 
-		   "r" (splPtr->wend), 
-		   "r" (sp));
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "mmx h-alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp++;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-    /* Free the memory allocated for horizontal filter weights. */
-    Blt_Free(samples);
-}
-#endif
-
-static void
-AssociateColors(Pict *srcPtr) /* (in/out) picture */
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    Blt_Pixel mask;
-
-    /* Create mask for alpha component.  We'll use this mask to make sure we
-     * don't change the alpha component of a pixel.  */
-    mask.u32 = 0;
-    mask.Alpha = 0xFF;
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %%mm6, %%mm6	# mm6 = 0\n\t"
-	"pcmpeqw %%mm5, %%mm5	# mm5 = -1 \n\t"
-	"psubw %%mm6, %%mm5	# mm5 = 1,1,1,1\n\t"
-	"movd %0, %%mm4         # mm4 = mask\n\t" 
-	"psllw $7, %%mm5        # mm5 = ROUND = 128\n" 
-	"punpcklbw %%mm6, %%mm4 # mm4 = 0,0,0,FF\n\t" 
-	/* outputs */
-	: 
-	/* inputs */
-	: "r" (mask.u32));
-
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-
-#ifdef notdef
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp += 2) {
-	    Blt_Pixel *p, *q;
-		
-	    /*
-	     * Small wins:  
-	     *
-	     * We can compute 
-	     *      dest = (fg * alpha) + (beta * bg);
-	     * for all RGBA components at once. 
-	     *
-	     * Packing unsigned with saturation performs the necessary
-	     * clamping without the branch misprediction penalty.
-	     */
-	    p = sp, q = sp+1;
-	    asm volatile (
-		/* 
-		 * mm0 = P
-		 * mm1 = Q
-		 * mm2 = Pa
-		 * mm3 = Qa
-		 * mm4 = temp
-		 * mm5 = ROUND = 128,128,128,128
-		 * mm6 = 0
-		 * mm7 = 0,0,0,FF
-		 */
-		"movd (%0), %%mm0         #  mm0 = P\n\t" 
-		"movd (%1), %%mm1         #  mm1 = Q\n\t" 
-		"movd %2, %%mm2           #  mm2 = 0,0,0,Pa\n\t" 
-		"movd %3, %%mm3           #  mm2 = 0,0,0,Qa\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = 0,0,Pa,Pa\n\t"
-		"punpcklwd %%mm3, %%mm3   #  mm3 = 0,0,Qa,Qa\n\t"
-		"punpcklbw %%mm6, %%mm0   #  mm0 = Pa,Pr,Pg,Pb\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = Pa,Pa,Pa,Pa\n\t"
-		"punpcklbw %%mm6, %%mm1   #  mm1 = Qa,Qr,Qg,Qb\n\t" 
-		"por %%mm7, %%mm2	  #  mm2 = 0xff,Pa,Pa,Pa\n\t"
-		"punpcklwd %%mm3, %%mm3   #  mm3 = Qa,Qa,Qa,Qa\n\t"
-		"por %%mm7, %%mm3	  #  mm2 = 0xff,Qa,Qa,Qa\n\t"
-		"pmullw %%mm0, %%mm2      #  mm2 = P*Pa\n\t" 
-		"pmullw %%mm1, %%mm3      #  mm3 = Q*Qa\n\t" 
-		"paddw %%mm5, %%mm2       #  mm2 = (P*Pa)+ROUND\n\t"
-		"paddw %%mm5, %%mm3       #  mm3 = (Q*Qa)+ROUND\n\t"
-		"movq %%mm2, %%mm0	  #  mm0 = P16\n\t" 
-		"movq %%mm3, %%mm1	  #  mm1 = Q16\n\t" 
-		"psrlw $8, %%mm0          #  mm0 = P16 / 256\n\t"
-		"psrlw $8, %%mm1          #  mm1 = Q16 / 256\n\t"
-		"paddw %%mm2, %%mm0       #  mm0 = (P16 / 256) + P16\n\t" 
-		"paddw %%mm3, %%mm1       #  mm1 = (Q16 / 256) + Q16\n\t" 
-		"psrlw $8, %%mm0          #  mm0 = P8 ~= P16 / 257\n\t"
-		"psrlw $8, %%mm1          #  mm1 = Q8 ~= Q16 / 257\n\t"
-		"packuswb %%mm0, %%mm0    #  Pack 4 low bytes.\n\t" 
-		"packuswb %%mm1, %%mm1    #  Pack 4 low bytes.\n\t" 
-		"movd %%mm0, (%0)         #  *P = word\n" 
-		"movd %%mm1, (%1)         #  *Q = word\n" 
-		/* outputs */
-		: "+r" (p), 
-		  "+r" (q)
-		/* inputs */
-		: "r" ((unsigned int)(p->Alpha)), 
-		  "r" ((unsigned int)(q->Alpha)));
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-#else 
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    unsigned int alpha;
-		
-	    /*
-	     * Small wins:  
-	     *
-	     * We can compute 
-	     *      dest = (fg * alpha) + (beta * bg);
-	     * for all RGBA components at once. 
-	     *
-	     * Packing unsigned with saturation performs the necessary
-	     * clamping without the branch misprediction penalty.
-	     */
-	    alpha = sp->Alpha;
-	    asm volatile (
-		/* 
-		 * mm0 = 
-		 * mm1 = sp
-		 * mm2 = alpha
-		 * mm3 = temp
-		 * mm4 = 0,0,0,FF
-		 * mm5 = ROUND = 128,128,128,128
-		 * mm6 = 0
-		 * mm7 = 
-		 */
-		"movd %1, %%mm2           #  mm2 = 0,0,0,A\n\t" 
-		"movd (%0), %%mm1         #  mm1 = sp\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = 0,0,A,A\n\t"
-		"punpcklbw %%mm6, %%mm1   #  mm1 = Sa,Sr,Sg,Sb\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = A,A,A,A\n\t"
-		"por %%mm4, %%mm2	  #  mm2 = 0xff,A,A,A\n\t"
-		"pmullw %%mm1, %%mm2      #  mm2 = S*A\n\t" 
-		"paddw %%mm5, %%mm2       #  mm2 = (S*A)+ROUND\n\t"
-		"movq %%mm2, %%mm3	  #  mm3 = P16\n\t" 
-		"psrlw $8, %%mm3          #  mm3 = P16 / 256\n\t"
-		"paddw %%mm2, %%mm3       #  mm3 = (P16 / 256) + P16\n\t" 
-		"psrlw $8, %%mm3          #  mm3 = P8 ~= P16 / 257\n\t"
-		"packuswb %%mm3, %%mm3    #  Pack 4 low bytes.\n\t" 
-		"movd %%mm3, (%0)         #  *sp = word\n" :
-		"+r" (sp) :
-		"r" (alpha));
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-#endif
-    asm volatile ("emms");
-    srcPtr->flags |= BLT_PIC_ASSOCIATED_COLORS;
-}
-
-
-static void
-UnassociateColors(Pict *srcPtr) /* (in/out) picture */
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    Blt_Pixel mask;
-
-    /* Create mask for alpha component.  We'll use this mask to make sure we
-     * don't change the alpha component of a pixel.  */
-    mask.u32 = 0;
-    mask.Alpha = 0xFF;
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %%mm6, %%mm6	# mm6 = 0\n\t"
-	"pcmpeqw %%mm5, %%mm5	# mm5 = -1 \n\t"
-	"psubw %%mm6, %%mm5	# mm5 = 1,1,1,1\n\t"
-	"movd %0, %%mm4         # mm4 = mask\n\t" 
-	"psllw $7, %%mm5        # mm5 = ROUND = 128\n" 
-	"punpcklbw %%mm6, %%mm4 # mm4 = 0,0,0,FF\n\t" 
-	: /* inputs */
-	: "r" (mask.u32));
-
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    unsigned int alpha;
-		
-	    /*
-	     * Small wins:  
-	     *
-	     * We can compute 
-	     *      dest = (fg * alpha) + (beta * bg);
-	     * for all RGBA components at once. 
-	     *
-	     * C = (Ca * ia) + bias >> 16 
-	     * Packing unsigned with saturation performs the
-	     * necessary clamping without the branch misprediction
-	     * penalty.
-	     */
-	    alpha = sp->Alpha;
-	    asm volatile (
-		/* 
-		 * mm0 = 
-		 * mm1 = sp
-		 * mm2 = alpha
-		 * mm3 = temp
-		 * mm4 = 0,0,0,FF
-		 * mm5 = ROUND = 128,128,128,128
-		 * mm6 = 0
-		 * mm7 = 
-		 */
-		"movd %1, %%mm2           #  mm2 = 0,0,0,IA\n\t" 
-		"movd (%0), %%mm1         #  mm1 = sp\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = 0,0,IA,IA\n\t"
-		"punpcklbw %%mm6, %%mm1   #  mm1 = Sa,Sr,Sg,Sb\n\t" 
-		"punpcklwd %%mm2, %%mm2   #  mm2 = IA,IA,IA,IA\n\t"
-		"por %%mm4, %%mm2	  #  mm2 = 0xff,IA,IA,IA\n\t"
-		"pmullw %%mm1, %%mm2      #  mm2 = S*IA\n\t" 
-		"paddw %%mm5, %%mm2       #  mm2 = (S*A)+ROUND\n\t"
-		"movq %%mm2, %%mm3	  #  mm3 = P16\n\t" 
-		"psrlw $8, %%mm3          #  mm3 = P16 / 256\n\t"
-		"paddw %%mm2, %%mm3       #  mm3 = (P16 / 256) + P16\n\t" 
-		"psrlw $8, %%mm3          #  mm3 = P8 ~= P16 / 257\n\t"
-		"packuswb %%mm3, %%mm3    #  Pack 4 low bytes.\n\t" 
-		"movd %%mm3, (%0)         #  *sp = word\n" 
-		: "+r" (sp) 
-		: "r" (alpha));
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    asm volatile ("emms");
-    srcPtr->flags &= ~BLT_PIC_ASSOCIATED_COLORS;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * CopyPictureBits --
- *
- *	Creates a copy of the given picture using SSE xmm registers.  
- * 
- *	FIXME: This is broken since it uses an double-world aligned quad word
- *	move instruction.
- *	
- * Results: 
- *	None.
- *
- * Side effects: 
- *	The area specified in the source picture is copied to the
- *	destination picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-CopyPictureBits(Pict *destPtr, Pict *srcPtr, int sx, int sy, 
-	int w, int h, int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-    int dw, dh, width, height;
-
-    dw = destPtr->width - dx;
-    dh = destPtr->height - dy;
-    width  = MIN(dw, w);
-    height = MIN(dh, h);
-    
-    srcRowPtr  = srcPtr->bits  + (srcPtr->pixelsPerRow * sy)  + sx;
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * dy) + dx;
-    for (y = 0; y < height; y++) {
-	Blt_Pixel *sp, *send, *dp;
-
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + (width & ~3); sp < send; sp += 4, 
-		 dp += 4) {
-	    asm volatile (
-		"movdqa (%1), %%xmm1\n\t"
-		"movdqa %%xmm1, (%0)\n\t" 
-		: "+r" (dp) 
-		: "r" (sp));
-	}
-	switch (width & 3) {
-	case 3:		dp->u32 = sp->u32; sp++; dp++;
-	case 2:		dp->u32 = sp->u32; sp++; dp++;
-	case 1:		dp->u32 = sp->u32; sp++; dp++;
-	case 0:		break;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-    asm volatile ("emms");
-}
-
-#ifdef notdef
-static void
-BoxCarVertically(Pict *destPtr, Pict *srcPtr, size_t r)
-{
-    unsigned int x;
-    size_t *map;
-    int fscale;
-    size_t fwidth;			/* Filter width */
-    float s;
-    Blt_Pixel mask;
-
-    map = CreateNeighborhoodMap(srcPtr->height, r);
-    fwidth = r + r + 1;
-    s = 1.0f / fwidth;
-    fscale = float2si(s);
-
-    fwidth--;
-    /* 
-     * mm3 = r16 g16 b16 a16  accumulators
-     */
-    /* Apply filter to each row. */
-
-    /* Create mask for alpha component.  We'll use this mask to make sure we
-     * don't change the alpha component of a pixel.  */
-    mask.u32 = 0;
-    mask.Alpha = 0xFF;
-    asm volatile (
-        /* Generate constants needed below. */
-	"pxor %%mm6, %%mm6	# mm6 = 0\n\t"
-	"pcmpeqw %%mm5, %%mm5	# mm5 = -1 \n\t"
-	"psubw %%mm6, %%mm5	# mm5 = 1,1,1,1\n\t"
-	"movd %0, %%mm4         # mm4 = mask\n\t" 
-	"psllw $7, %%mm5        # mm5 = ROUND = 128\n" 
-	"punpcklbw %%mm6, %%mm4 # mm4 = 0,0,0,FF\n\t" 
-	: /* inputs */
-	: "r" (mask.u32));
-
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColPtr;
-	int r, g, b, a;
-	unsigned int y;
-
-	srcColPtr = srcPtr->bits + x;
-	asm volatile (
-	    /* Initialize 16 bit accumulators. */
-	    "pxor %%mm4, %%mm4	# mm4 = 0\n\t");
-	/* Prime the pump. */
-	for (y = 0; y < fwidth; y++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcColPtr + (srcPtr->pixelsPerRow * map[y]);
-	    asm volatile (
-		/* 
-		 * mm0 = 
-		 * mm1 = sp
-		 * mm4 = accumulator
-		 * mm6 = 0
-		 * mm7 = 
-		 */
-		"movd (%0), %%mm1         #  mm1 = sp\n\t" 
-		"punpcklbw %%mm6, %%mm1   #  mm1 = Sa,Sr,Sg,Sb\n\t" 
-		"paddw %%mm1, %%mm4       #  mm4 = accumulator\n\t"
-		: "+r" (sp));
-	}
-	dp = destPtr->bits + x;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *s1, s2;
-	    int fr, fg, fb, fa;
-
-	    s1 = srcColPtr + (srcPtr->pixelsPerRow * map[y + fwidth]);
-	    s2 = srcColPtr + (srcPtr->pixelsPerRow * map[y]);
-	    asm volatile (
-		/* 
-		 * mm0 = 
-		 * mm1 = sp
-		 * mm2 = alpha
-		 * mm3 = temp
-		 * mm4 = 0,0,0,FF
-		 * mm5 = ROUND = 128,128,128,128
-		 * mm6 = 0
-		 * mm7 = 
-		 */
-		"movd (%0), %%mm1         #  mm1 = next\n\t" 
-		"movd (%1), %%mm2         #  mm2 = prev\n\t" 
-		"punpcklbw %%mm6, %%mm1   #  mm1 = Sa,Sr,Sg,Sb\n\t" 
-		"punpcklbw %%mm6, %%mm2   #  mm2 = Sa,Sr,Sg,Sb\n\t" 
-		"paddw %%mm1, %%mm4       #  mm4 = accumulator\n\t"
-		"movq %%mm4, %%mm5	  #  mm3 = P16\n\t" 
-                "pmulhw %%mm3, %%mm5      #  mm0 = S15 * W14\n\t"  
-		"psrlw $8, %%mm3          #  mm3 = P16 / 256\n\t"
-		"paddw %%mm2, %%mm3       #  mm3 = (P16 / 256) + P16\n\t" 
-		"psrlw $8, %%mm3          #  mm3 = P8 ~= P16 / 257\n\t"
-		"packuswb %%mm3, %%mm3    #  Pack 4 low bytes.\n\t" 
-		"movd %%mm3, (%0)         #  *sp = word\n" 
-		: "+r" (s1) "+r" (s2) 
-		: "r" (alpha));
-	}
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	    fr = r * fscale;
-	    fg = g * fscale;
-	    fb = b * fscale;
-	    fa = a * fscale;
-	    dp->Red = (unsigned char)SICLAMP(fr);
-	    dp->Green = (unsigned char)SICLAMP(fg);
-	    dp->Blue = (unsigned char)SICLAMP(fb);
-	    dp->Alpha = (unsigned char)SICLAMP(fa);
-	    sp = srcColPtr + (srcPtr->pixelsPerRow * map[y]);
-	    r -= sp->Red;
-	    g -= sp->Green;
-	    b -= sp->Blue;
-	    a -= sp->Alpha;
-	    dp += destPtr->pixelsPerRow;
-	}
-    }
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(map);
-}
-
-static void
-BoxCarHorizontally(Pict *destPtr, Pict *srcPtr, size_t r)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    float s;
-    size_t *map;
-    int fscale;
-    unsigned int y;
-    size_t fwidth;		/* Filter width */
-
-    fwidth = r + r + 1;
-    map = CreateNeighborhoodMap(srcPtr->width, r);
-    s = 1.0f / fwidth;
-    fscale = float2si(s);
-    destRowPtr = destPtr->bits;
-    srcRowPtr = srcPtr->bits;
-    fwidth--;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	unsigned int x;
-	int r, g, b, a;
-	
-	/* Prime the pump. Get sums for each component for the first (fwidth)
-	 * pixels in the column. */
-	r = g = b = a = 0;
-	for (x = 0; x < fwidth; x++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcRowPtr + map[x];
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	}
-	dp = destRowPtr;
-	for (x = 0; x < srcPtr->width; x++) {
-	    Blt_Pixel *sp;
-	    int fr, fg, fb, fa;
-
-	    sp = srcRowPtr + map[x + fwidth];
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	    fr = r * fscale;
-	    fg = g * fscale;
-	    fb = b * fscale;
-	    fa = a * fscale;
-	    dp->Red = (unsigned char)SICLAMP(fr);
-	    dp->Green = (unsigned char)SICLAMP(fg);
-	    dp->Blue = (unsigned char)SICLAMP(fb);
-	    dp->Alpha = (unsigned char)SICLAMP(fa);
-	    sp = srcRowPtr + map[x];
-	    r -= sp->Red;
-	    g -= sp->Green;
-	    b -= sp->Blue;
-	    a -= sp->Alpha;
-	    dp++;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    /* Free the memory allocated for map. */
-    Blt_Free(map);
-}
-#endif
-
-
-#ifdef notdef
-/* 
- *---------------------------------------------------------------------------
- *
- * BlankPicture --
- *
- *	Creates a copy of the given picture using SSE xmm registers.  
- *	
- * Results: 
- *	None.
- *
- * Side effects: 
- *	The area specified in the source picture is copied to the
- *	destination picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-BlankPicture(Pict *destPtr, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *destRowPtr;
-    int y;
-
-    asm volatile (
-	/* How do you load a xmm register? */
-        /* Generate constants needed below. */
-	"pxor %%mm6, %%mm6	# mm6 = 0\n\t"
-	"pcmpeqw %%mm5, %%mm5	# mm5 = -1 \n\t"
-	"psubw %%mm6, %%mm5	# mm5 = 1,1,1,1\n\t"
-	"movd %0, %%mm4         # mm4 = C\n\t" 
-	"psllw $7, %%mm5        # mm5 = ROUND = 128\n" 
-	"punpcklbw %%mm6, %%mm4 # mm4 = 0,0,0,FF\n\t" 
-	: /* inputs */
-	: "r" (colorPtr->u32));
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < destPtr->height; y++) {
-	Blt_Pixel *dp, *dend;
-
-	for (dp = destRowPtr, dend = dp + (destPtr->width & ~3); dp < dend; 
-	     dp += 4)
-	    asm volatile (
-		"movdqa %%xmm1, (%0)\n\t" 
-		: "+r" (dp));
-	}
-	switch (width & 3) {
-	case 3:		dp->u32 = colorPtr->u32; dp++;
-	case 2:		dp->u32 = colorPtr->u32; dp++;
-	case 1:		dp->u32 = colorPtr->u32; dp++;
-	case 0:		break;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-    asm volatile ("emms");
-}
-#endif
-
-static int
-x86HaveCpuId(void)
-{
-    unsigned int ecx;
-
-    asm volatile (
-	/* See if ID instruction is supported. Save a copy of
-	 * EFLAGS in eax and ecx */
-#ifdef __amd64__
-	"pushq %%rbx\n\t"
-#else 
-	"push %%ebx\n\t"
-#endif
-	"pushf\n\t"
-#ifdef __amd64__
-	"popq %%rax\n\t" 
-#else 
-	"pop %%eax\n\t" 
-#endif
-	"mov %%eax, %%ecx\n\t"
-	/* Toggle the CPUID bit in one copy and store to the EFLAGS
-	 * reg */
-	"xorl $0x200000, %%eax\n\t"
-#ifdef __amd64__
-	"pushq %%rax\n\t"
-#else 
-	"push %%eax\n\t"
-#endif
-	"popf\n\t"
-	/* Get the (hopefully modified) EFLAGS */
-	"pushf\n\t"
-#ifdef __amd64__
-	"popq %%rax\n\t"
-#else 
-	"pop %%eax\n\t"
-#endif
-	/* Compare the result with the previous. */
-	"xor %%eax, %%ecx\n\t"
-	"movl %%ecx, %0\n\t" 
-#ifdef __amd64__
-	"popq %%rbx\n\t"
-#else 
-	"pop %%ebx\n\t"
-#endif
-	: "=c" (ecx));
-    if (ecx & 0x200000) {
-	return 1;
-    } 
-    return 0;
-}
-
-static int
-x86GetCpuVersion(char *version)
-{
-    unsigned int ebx, ecx, edx;
-
-    if (!x86HaveCpuId()) {
-	return 0;
-    }
-    asm volatile (
-	/* See if ID instruction is supported. Save a copy of
-	 * EFLAGS in eax and ecx */
-
-	/* Get standard CPUID information, and go to a specific vendor
-	 * section */
-#ifdef __amd64__
-	"pushq %%rbx\n\t" 
-#else 
-	"push %%ebx\n\t" 
-#endif
-	"xor %%eax, %%eax\n\t"
-	"cpuid\n\t"
-	"movl %%ebx, %0\n\n\t"	
-#ifdef __amd64__
-	"popq %%rbx\n\n\t"	
-#else 
-	"pop %%ebx\n\n\t"	
-#endif
-	: "=a" (ebx), "=d" (edx), "=c" (ecx)
-	: /* no input */
-	);
-    memcpy (version,   &ebx, 4);
-    memcpy (version+4, &edx, 4);
-    memcpy (version+8, &ecx, 4);
-    version[12] = '\0';
-#ifdef notdef
-    fprintf(stderr, "version=%s\n", version);
-#endif
-    return 1;
-}
-
-static unsigned int
-x86GetCpuFlags(void)
-{
-    unsigned int edx;
-
-    asm volatile (
-	/* Get the CPUID flags (eax=1). */
-#ifdef __amd64__
-	"pushq %%rbx\n\t"	
-#else 
-	"push %%ebx\n\t"	
-#endif
-	"movl $1, %%eax\n\t"
-	"cpuid\n\t"
-#ifdef __amd64__
-	"popq %%rbx\n\t"	
-#else 
-	"pop %%ebx\n\t"	
-#endif
-	: "=d" (edx));
-    return edx;
-}
-
-#define CPU_FEATURE_NONE  (0)
-#define CPU_FEATURE_MMX   (1<<0)
-#define CPU_FEATURE_SSE   (1<<1)
-#define CPU_FEATURE_SSE2  (1<<2)
-#define CPU_FEATURE_3DNOW (1<<3)
-
-#define CPU_FEATURE_AMD_MMXEXT     (1 << 22)
-#define CPU_FEATURE_AMD_3DNOW      (1 << 31)
-#define CPU_FEATURE_CENTAUR_3DNOW  (1 << 31)
-#define CPU_FEATURE_CENTAUR_MMX    (1 << 23)
-#define CPU_FEATURE_CENTAUR_MMXEXT (1 << 24)
-#define CPU_FEATURE_CYRIX_MMX      (1 << 23)
-#define CPU_FEATURE_CYRIX_MMXEXT   (1 << 24)
-#define CPU_FEATURE_INTEL_MMX      (1 << 23)
-#define CPU_FEATURE_INTEL_SSE      (1 << 25)
-#define CPU_FEATURE_INTEL_SSE2     (1 << 26)
-#define CPU_FEATURE_AMD_MMX        (1 << 23)
-#define CPU_FEATURE_AMD_SSE        (1 << 25)
-#define CPU_FEATURE_AMD_SSE2       (1 << 26)
-
-static void
-PrintFeatures(Tcl_Interp *interp, unsigned int features)
-{
-    if (features & CPU_FEATURE_MMX) {
-	Tcl_AppendElement(interp, "mmx");
-    }
-    if (features & CPU_FEATURE_SSE) {
-	Tcl_AppendElement(interp, "sse");
-    }
-    if (features & CPU_FEATURE_SSE2) {
-	Tcl_AppendElement(interp, "sse2");
-    }
-    if (features & CPU_FEATURE_3DNOW) {
-	Tcl_AppendElement(interp, "3dnow");
-    }
-    if (features & CPU_FEATURE_AMD_MMXEXT) {
-	Tcl_AppendElement(interp, "amd_mmxext");
-    }
-    if (features & CPU_FEATURE_AMD_3DNOW) {
-	Tcl_AppendElement(interp, "amd_mmxext");
-    }
-    if (features & CPU_FEATURE_CENTAUR_3DNOW) {
-	Tcl_AppendElement(interp, "amd_mmxext");
-    }
-    if (features & CPU_FEATURE_CENTAUR_MMX) {
-	Tcl_AppendElement(interp, "amd_mmxext");
-    }
-    if (features & CPU_FEATURE_CENTAUR_MMXEXT) {
-	Tcl_AppendElement(interp, "amd_mmxext");
-    }
-    if (features & CPU_FEATURE_CYRIX_MMX) {
-	Tcl_AppendElement(interp, "cyrix_mmx");
-    }	
-    if (features & CPU_FEATURE_CYRIX_MMXEXT) {
-	Tcl_AppendElement(interp, "cyrix_mmxext");
-    }
-    if (features & CPU_FEATURE_INTEL_MMX) {
-	Tcl_AppendElement(interp, "intel_mmx");
-    }
-    if (features & CPU_FEATURE_INTEL_SSE) {
-	Tcl_AppendElement(interp, "intel_sse");
-    }
-    if (features & CPU_FEATURE_INTEL_SSE2) {
-	Tcl_AppendElement(interp, "intel_sse2");
-    }
-    if (features & CPU_FEATURE_AMD_MMX) {
-	Tcl_AppendElement(interp, "amd_mmax");
-    }
-    if (features & CPU_FEATURE_AMD_SSE) {
-	Tcl_AppendElement(interp, "amd_sse");
-    }
-    if (features & CPU_FEATURE_AMD_SSE2) {
-	Tcl_AppendElement(interp, "amd_sse2");
-    }
-}
-
-static int
-x86CpuFeatures(void)
-{
-    char version[13];
-    unsigned int flags, featureFlags;
-
-    featureFlags = CPU_FEATURE_NONE;
-    if (!x86GetCpuVersion(version)) {
-	return featureFlags;
-    }
-    if (strcmp(version, "GenuineIntel") == 0) {
-	flags = x86GetCpuFlags();
-	if (flags & CPU_FEATURE_INTEL_MMX) {
-	    featureFlags |= CPU_FEATURE_MMX;
-	} 
-	if (flags & CPU_FEATURE_INTEL_SSE) {
-	    featureFlags |= CPU_FEATURE_SSE;
-	}
-	if (flags & CPU_FEATURE_INTEL_SSE2) {
-	    featureFlags |= CPU_FEATURE_SSE2;
-	}
-    } else if (strcmp(version, "AuthenticAMD") == 0) {
-	flags = x86GetCpuFlags();
-	if (flags & CPU_FEATURE_AMD_MMX) {
-	    featureFlags |= CPU_FEATURE_MMX;
-	}
-	if (flags & CPU_FEATURE_AMD_SSE) {
-	    featureFlags |= CPU_FEATURE_SSE;
-	}
-	if (flags & CPU_FEATURE_AMD_SSE2) {
-	    featureFlags |= CPU_FEATURE_SSE2;
-	}
-	if (flags & CPU_FEATURE_AMD_3DNOW) {
-	    featureFlags |= CPU_FEATURE_3DNOW;
-	}
-    } else if (strcmp(version, "CyrixInstead") == 0) {
-	flags = x86GetCpuFlags();
-	if (flags & CPU_FEATURE_CYRIX_MMX) {
-	    featureFlags |= CPU_FEATURE_MMX;
-	} 
-    } 
-    return featureFlags;
-}
-
-int
-Blt_CpuFeatures(Tcl_Interp *interp, int *featuresPtr)
-{
-    unsigned int features;
-
-    features = x86CpuFeatures();
-    if (features & CPU_FEATURE_MMX) {
-#ifdef notdef
-	bltPictProcsPtr = &mmxPictureProcs;
-#else 
-	bltPictProcsPtr->applyPictureToPictureProc = ApplyPictureToPicture;
-	bltPictProcsPtr->applyScalarToPictureProc = ApplyScalarToPicture;
-	bltPictProcsPtr->tentHorizontallyProc = TentHorizontally;
-	bltPictProcsPtr->tentVerticallyProc = TentVertically;
-	bltPictProcsPtr->zoomHorizontallyProc = ZoomHorizontally;
-	bltPictProcsPtr->zoomVerticallyProc = ZoomVertically;
-#ifdef notdef
-	bltPictProcsPtr->blendPicturesProc = BlendPictures;
-#endif
-	bltPictProcsPtr->associateColorsProc = AssociateColors;
-	bltPictProcsPtr->selectPixelsProc = SelectPixels;
-	bltPictProcsPtr->fadePictureProc = FadePicture;
-#ifdef notdef
-	if (features & CPU_FEATURE_SSE) {
-	    /*
-	      bltPictProcsPtr->copyPictureBitsProc = CopyPictureBits;
-	    */
-	}
-#endif
-#endif
-    }
-    if (featuresPtr != NULL) {
-	*featuresPtr = features;
-    }
-    if (interp != NULL) {
-	PrintFeatures(interp, features);
-	fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
-    }
-    return TCL_OK;
-}
-
-#else 
-
-int
-Blt_CpuFeatures(Tcl_Interp *interp, int *featuresPtr)
-{
-    if (featuresPtr != NULL) {
-	*featuresPtr = 0;
-    }
-    return TCL_OK;
-}
-
-#endif /* HAVE_X86_ASM */
diff --git a/blt3.0/src/bltPictPbm.c b/blt3.0/src/bltPictPbm.c
deleted file mode 100644
index c170434..0000000
--- a/blt3.0/src/bltPictPbm.c
+++ /dev/null
@@ -1,962 +0,0 @@
-
-/*
- * bltPictPbm.c --
- *
- * This module implements PBM file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#include <tcl.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <ctype.h>
-#include <bltAlloc.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifdef _MSC_VER
-#define vsnprintf		_vsnprintf
-#endif
-
-#include <setjmp.h>
-
-typedef struct _Blt_Picture Picture;
-
-#define TRUE 	1
-#define FALSE 	0
-#define div257(t)	(((t)+((t)>>8))>>8)
-#define SetBit(x)	destRowPtr[(x>>3)] |= (0x80 >>(x&7))
-#define GetBit(x)	 srcRowPtr[(x>>3)] &  (0x80 >> (x&7))
-
-typedef struct {
-    jmp_buf jmpbuf;
-    Tcl_DString errors;
-    Tcl_DString warnings;
-    int nWarnings, nErrors;
-} PbmMessage;
-
-typedef struct {
-    unsigned int version;	/* Version of PBM file */
-    unsigned int maxval;	/* Maximum intensity allowed. */
-    unsigned int width, height;	/* Dimensions of the image. */
-    unsigned int bitsPerPixel;	/* # bits per pixel. */
-    unsigned int isRaw;		/* Indicates if the image format is raw or
-				 * plain. */
-    Blt_DBuffer dbuffer;	/* */
-    unsigned char *data;	/* Start of raw data */
-    unsigned int bytesPerRow;
-    Blt_Picture picture;
-} Pbm;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int imageIndex;
-    float gamma;
-} PbmImportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    Blt_Pixel bg;
-    int index;
-} PbmExportSwitches;
-
-#define MAXCOLORS       256
-
-enum PbmVersions {
-    PBM_UNKNOWN,
-    PBM_PLAIN,			/* Monochrome: 1-bit per pixel */
-    PGM_PLAIN,			/* 8-bits per pixel */
-    PPM_PLAIN,			/* 24-bits per pixel */
-    PBM_RAW,			/* 1-bit per pixel */
-    PGM_RAW,			/* 8/16-bits per pixel */
-    PPM_RAW			/* 24/48 bits per pixel */
-};
-    
-static const char *pbmFormat[] = {
-    "???", 
-    "pbmplain",
-    "pgmplain",
-    "ppmplain",
-    "pbmraw",
-    "pgmraw",
-    "ppmraw",
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ,   "-data",  "data",
-	Blt_Offset(PbmImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ,   "-file",  "fileName",
-	Blt_Offset(PbmImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PbmImportSwitches, imageIndex), 0},
-    {BLT_SWITCH_FLOAT, "-gamma", "number",
-	Blt_Offset(PbmImportSwitches, gamma), 0},
-    {BLT_SWITCH_END}
-};
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ,     "-data",  "data",
-	Blt_Offset(PbmExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ,     "-file",  "fileName",
-	Blt_Offset(PbmExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_CUSTOM,  "-bg",	   "color",
-	Blt_Offset(PbmExportSwitches, bg),         0, 0, &colorSwitch},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PbmExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static PbmMessage *pbmMessagePtr;
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PicturePbmInit;
-
-/*ARGSUSED*/
-static void
-PbmError TCL_VARARGS_DEF(const char *, arg1)
-{
-    char string[BUFSIZ+4];
-    const char *fmt;
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&pbmMessagePtr->errors, string, -1);
-    va_end(args);
-    longjmp(pbmMessagePtr->jmpbuf, 0);
-}
-
-/*ARGSUSED*/
-static void
-PbmWarning TCL_VARARGS_DEF(const char *, arg1)
-{
-    char string[BUFSIZ+4];
-    const char *fmt;
-    int length;
-    va_list args;
-
-    fmt = TCL_VARARGS_START(const char *, arg1, args);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&pbmMessagePtr->warnings, string, -1);
-    va_end(args);
-    pbmMessagePtr->nWarnings++;
-}
-
-static char *
-PbmComment(char *bp) 
-{
-    char *p;
-
-    p = bp;
-    if (*p == '#') {
-	/* Comment: file end of line */
-	while((*p != '\n') && (p != '\0')) {
-	    p++;
-	}
-	PbmWarning("comment: %.*s\n", p-bp, bp);
-    }
-    return p;
-}
-
-static unsigned int
-PbmNextValue(Pbm *pbmPtr)
-{
-    char *p, *endp;
-    unsigned int value;
-
-    p = (char *)Blt_DBuffer_Pointer(pbmPtr->dbuffer);
-    while(isspace(*p)) {
-	p++;
-    }
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    while(isspace(*p)) {
-	p++;
-    }
-    value = strtoul(p, &endp, 10);
-    if (endp == p) {
-	PbmError("bad value in %s image data", pbmFormat[pbmPtr->version]);
-    }
-    if (value > pbmPtr->maxval) {
-	PbmError("value (%d) greater than %s image max value %d", value, 
-		pbmFormat[pbmPtr->version], pbmPtr->maxval);
-    }
-    while (isspace(*p)) {
-	p++;
-    }
-    Blt_DBuffer_SetPointer(pbmPtr->dbuffer, (unsigned char*)p);
-    return value;
-}    
-
-
-static inline int 
-PbmGetShort(unsigned char *bp) {
-    return (bp[0] << 8) + bp[1];
-}
-
-static Picture *
-PbmPlainData(Pbm *pbmPtr)
-{
-    Picture *destPtr;
-
-    pbmPtr->picture = destPtr = 
-	Blt_CreatePicture(pbmPtr->width, pbmPtr->height);
-    switch (pbmPtr->bitsPerPixel) {
-    case 1:			/* Monochrome */
-    case 8:			/* Greyscale */
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		Blt_Pixel *dp, *dend;
-
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-			 dp++) {
-		    dp->Red = dp->Green = dp->Blue = PbmNextValue(pbmPtr);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    case 16:			/* Greyscale (2 bytes)  */
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		Blt_Pixel *dp, *dend;
-
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     dp++) {
-		    unsigned int value;
-
-		    value = PbmNextValue(pbmPtr);
-		    dp->Red = dp->Green = dp->Blue = div257(value);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    case 24:			/* Color (1 byte per color component) */
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		Blt_Pixel *dp, *dend;
-
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-			 dp++) {
-		    dp->Red   = PbmNextValue(pbmPtr);
-		    dp->Green = PbmNextValue(pbmPtr);
-		    dp->Blue  = PbmNextValue(pbmPtr);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    case 48:			/* Color (2 bytes per color component) */
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		Blt_Pixel *dp, *dend;
-
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-			 dp++) {
-		    int r, g, b;
-
-		    r = PbmNextValue(pbmPtr);
-		    g = PbmNextValue(pbmPtr);
-		    b = PbmNextValue(pbmPtr);
-		    dp->Red   = div257(r);
-		    dp->Green = div257(g);
-		    dp->Blue  = div257(b);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    }
-    return destPtr;
-}
-
-static Picture *
-PbmRawData(Pbm *pbmPtr)
-{
-    Picture *destPtr;
-
-    pbmPtr->picture = destPtr = 
-	Blt_CreatePicture(pbmPtr->width, pbmPtr->height);
-    switch (pbmPtr->bitsPerPixel) {
-    case 1: 
-	{
-	    /* Monochrome */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		int x;
-		Blt_Pixel *dp;
-		
-		dp = destRowPtr;
-		for (x = 0; x < pbmPtr->width; x++) {
-		    dp->Red = dp->Green = dp->Blue = (GetBit(x)) ? 0xFF : 0;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    dp++;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 8: 
-	{
-	    /* Greyscale (1 byte)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp++, dp++) {
-		    dp->Red = dp->Green = dp->Blue = *sp;
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 16: 
-	{ 
-	    /* Greyscale (2 bytes)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 2, dp++) {
-		    unsigned int value;
-		    
-		    value = PbmGetShort(sp);
-		    dp->Red = dp->Green = dp->Blue = div257(value);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 24: 
-	{ 
-	    /* Color (1 byte per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 3, dp++) {
-		    dp->Red   = sp[0];
-		    dp->Green = sp[1];
-		    dp->Blue  = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 48: 
-	{
-	    /* Color (2 bytes per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 6, dp++) {
-		    unsigned int r, g, b;
-		    
-		    r = PbmGetShort(sp);
-		    g = PbmGetShort(sp+2);
-		    b = PbmGetShort(sp+4);
-		    dp->Red   = div257(r);
-		    dp->Green = div257(g);
-		    dp->Blue  = div257(b);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    }
-    return destPtr;
-}
-
-static Blt_Picture
-PbmImage(Pbm *pbmPtr)
-{
-    char *bp, *p;
-    const char *type;
-    size_t size, want;
-    unsigned char *start;
-    Blt_Picture picture;
-
-    size = Blt_DBuffer_BytesLeft(pbmPtr->dbuffer);
-    start = Blt_DBuffer_Pointer(pbmPtr->dbuffer);
-    if (size < 14) {
-	PbmError("can't read PBM image: short file %d bytes", size);
-    }
-    bp = (char *)start;
-    if ((bp[0] != 'P') || (bp[1] < '1') || (bp[1] > '6')) {
-	PbmError("unknown PBM image header (%c%c).", bp[0], bp[1]);
-    }
-    pbmPtr->version = bp[1] - '0';
-    pbmPtr->isRaw = (pbmPtr->version > 2);
-    switch(pbmPtr->version) {	
-    case PBM_PLAIN:		/* P2 */
-    case PBM_RAW:		/* P5 */
-	pbmPtr->bitsPerPixel = 8;
-	break;
-    case PGM_PLAIN:		/* P1 */
-    case PGM_RAW:		/* P4 */
-	pbmPtr->bitsPerPixel = 1;
-	break;
-    case PPM_PLAIN:		/* P3 */
-    case PPM_RAW:		/* P6 */
-	pbmPtr->bitsPerPixel = 24;
-	break;
-    }
-    type = pbmFormat[pbmPtr->version];
-    if (!isspace(bp[2])) {
-	PbmError("no white space after version in %s header.", type);
-    }
-    p = bp + 3;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbmPtr->width = strtoul(p, &p, 10);
-    if (pbmPtr->width == 0) {
-	PbmError("bad %s width specification %s", type, bp+3);
-    }
-    if (!isspace(*p)) {
-	PbmError("no white space after width in %s header.", type);
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbmPtr->height = strtoul(p, &p, 10);
-    if (pbmPtr->height == 0) {
-	PbmError("bad %s height specification", type);
-    }
-    if (!isspace(*p)) {
-	PbmError("no white space after height in %s header.", type);
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    if (pbmPtr->bitsPerPixel != 1) {
-	pbmPtr->maxval = strtoul(p, &p, 10);
-	if (pbmPtr->maxval == 0) {
-	    PbmError("bad %s maxval specification", type);
-	}
-	if (!isspace(*p)) {
-	    PbmError("no white space after maxval in %s header.", type);
-	}
-	p++;
-	if (*p == '#') {
-	    p = PbmComment(p);
-	}
-	if (pbmPtr->maxval >= USHRT_MAX) {
-	    PbmError("invalid %s maxval specification", type);
-	}
-	if (pbmPtr->maxval > 255) {
-	    pbmPtr->bitsPerPixel <<= 1;  /* 16-bit greyscale or 48 bit color. */
-	}
-    }
-    pbmPtr->data = (unsigned char *)p;
-    pbmPtr->bytesPerRow = ((pbmPtr->bitsPerPixel * pbmPtr->width) + 7) / 8;
-    want = (pbmPtr->data - start) + pbmPtr->height * pbmPtr->bytesPerRow;
-    if ((pbmPtr->isRaw) && (want > Blt_DBuffer_BytesLeft(pbmPtr->dbuffer))) {
-	PbmError("short %s file: expected %d bytes, got %d", type, want,
-		 Blt_DBuffer_BytesLeft(pbmPtr->dbuffer));
-    }	    
-    if (pbmPtr->isRaw) {
-	picture = PbmRawData(pbmPtr);
-	Blt_DBuffer_SetPointer(pbmPtr->dbuffer, pbmPtr->data + 
-			       (pbmPtr->height * pbmPtr->bytesPerRow));
-    } else {
-	picture = PbmPlainData(pbmPtr);
-    }
-    return picture;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsPbm --
- *
- *      Attempts to parse a PBM file header.
- *
- * Results:
- *      Returns 1 is the header is PBM and 0 otherwise.  Note that
- *      the validity of the header contents is not checked here.  That's
- *	done in PbmToPictures.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsPbm(Blt_DBuffer dbuffer)
-{
-    unsigned char *bp;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < 2) {
-	return FALSE;
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    if ((bp[0] != 'P') || (bp[1] < '1') || (bp[1] > '6')) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PbmToPictures --
- *
- *      Reads a PBM file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain 
-PbmToPictures(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer,
-	      PbmImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-    Blt_Picture picture;
-    Pbm pbm;
-    PbmMessage message;
-
-    pbmMessagePtr = &message;
-    message.nWarnings = 0;
-    memset(&pbm, 0, sizeof(pbm)); /* Clear the structure. */
-    pbm.dbuffer = dbuffer;
-
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    Tcl_DStringAppend(&message.errors, "error reading \"", -1);
-    Tcl_DStringAppend(&message.errors, fileName, -1);
-    Tcl_DStringAppend(&message.errors, "\": ", -1);
-
-    Tcl_DStringAppend(&message.warnings, "\"", -1);
-    Tcl_DStringAppend(&message.warnings, fileName, -1);
-    Tcl_DStringAppend(&message.warnings, "\": ", -1);
-
-    if (setjmp(message.jmpbuf)) {
-	Tcl_DStringResult(interp, &message.errors);
-	Tcl_DStringFree(&message.warnings);
-	if (pbm.picture != NULL) {
-	    Blt_FreePicture(pbm.picture);
-	}
-	return NULL;
-    }
-    chain = NULL;
-    if (!IsPbm(pbm.dbuffer)) {
-	PbmError("bad PBM header");
-    }
-    Blt_DBuffer_ResetCursor(pbm.dbuffer);
-    chain = Blt_Chain_Create();
-    while (Blt_DBuffer_BytesLeft(pbm.dbuffer) > 0) {
-	picture = PbmImage(&pbm);
-	Blt_Chain_Append(chain, picture);
-    }
-    if (switchesPtr->gamma != 1.0) {
-	Blt_GammaCorrectPicture(picture, picture, switchesPtr->gamma);
-    }
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "PBM_READ_WARNINGS", 
-		Tcl_DStringValue(&message.warnings), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    Tcl_DStringFree(&message.errors);
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PicturesToPbm --
- *
- *      Reads an PBM file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the designated
- *      file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToPbm(Tcl_Interp *interp, Blt_Picture original, Blt_DBuffer dbuffer,
-	     PbmExportSwitches *switchesPtr)
-{
-    Picture *srcPtr;
-
-    srcPtr = original;
-    if (srcPtr->flags & BLT_PIC_MASK) {	
-	Blt_Picture background;
-	
-	/* Blend picture with solid color background. */
-	background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	Blt_BlankPicture(background, &switchesPtr->bg); 
-	Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = background;
-    }
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(srcPtr);
-    }
-    if (srcPtr->flags & BLT_PIC_COLOR) {  /* Color */
-	Blt_Pixel *srcRowPtr;
-	int bytesPerRow;
-	int y;
-	unsigned char *destRowPtr;
-
-	Blt_DBuffer_Print(dbuffer, "P%d\n%d\n%d\n255\n", PPM_RAW, 
-		srcPtr->width, srcPtr->height);
-	bytesPerRow = srcPtr->width * 3;
-	Blt_DBuffer_Extend(dbuffer, srcPtr->height * bytesPerRow);
-	destRowPtr = Blt_DBuffer_End(dbuffer);
-	srcRowPtr = srcPtr->bits;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp, *send;
-	    unsigned char *dp;
-
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		dp[0] = sp->Red;
-		dp[1] = sp->Green;
-		dp[2] = sp->Blue;
-		dp += 3;
-	    }
-	    destRowPtr += bytesPerRow;
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-    } else {			/* Greyscale */
-	Blt_Pixel *srcRowPtr;
-	int bytesPerRow;
-	int y;
-	unsigned char *destRowPtr;
-
-	Blt_DBuffer_Print(dbuffer, "P%d\n%d\n%d\n255\n", PGM_RAW, 
-		srcPtr->width, srcPtr->height);
-	bytesPerRow = srcPtr->width;
-	Blt_DBuffer_Extend(dbuffer, srcPtr->height * bytesPerRow);
-	destRowPtr = Blt_DBuffer_End(dbuffer);
-	srcRowPtr = srcPtr->bits;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp, *send;
-	    unsigned char *dp;
-
-	    dp = destRowPtr;
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		dp[0] = sp->Red;
-		dp++;
-	    }
-	    destRowPtr += bytesPerRow;
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-    }
-    Blt_DBuffer_SetLength(dbuffer, Blt_DBuffer_Size(dbuffer));
-    if (srcPtr != original) {
-	Blt_FreePicture(srcPtr);
-    }
-    return TCL_OK;
-}
-
-
-static Blt_Chain
-ReadPbm(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    PbmImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.imageIndex = 1;
-    switches.gamma = 1.0;
-    return PbmToPictures(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WritePbm(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_ChainLink link;
-    Blt_DBuffer dbuffer;
-    PbmExportSwitches switches;
-    Tcl_Obj *objPtr;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-
-    dbuffer = Blt_DBuffer_Create();
-    objPtr = NULL;
-    picture = Blt_Chain_GetValue(link);
-    if (PictureToPbm(interp, picture, dbuffer, &switches) == TCL_OK) {
-	char *bytes;
-
-	bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (bytes != NULL) {
-	    objPtr = Tcl_NewStringObj(bytes, -1);
-	    Blt_Free(bytes);
-	}
-    }
-    Blt_DBuffer_Destroy(dbuffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportPbm(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Chain chain;
-    PbmImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.imageIndex = 1;
-    switches.gamma = 1.0;
-
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_LoadFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = PbmToPictures(interp, string, dbuffer, &switches);
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportPbm(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Picture picture;
-    PbmExportSwitches switches;
-    int result;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.index = index;
-    switches.bg.u32 = 0xFFFFFFFF;	/* Default bgcolor is white. */
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data switch.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* FIXME: handle -all option.  */
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "bad picture index.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    if (PictureToPbm(interp, picture, dbuffer, &switches) != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-			 Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    /* Write the PBM data to file or convert it to a base64 string. */
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	result = TCL_ERROR;
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	    result = TCL_OK;
-	}
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int 
-Blt_PicturePbmInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_pbm", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp, 
-	"pbm",			/* Name of format. */
-	IsPbm,			/* Discovery routine. */
-	ReadPbm,		/* Read format procedure. */
-	WritePbm,		/* Write format procedure. */
-	ImportPbm,		/* Import format procedure. */
-	ExportPbm);		/* Export format switches. */
-}
-
diff --git a/blt3.0/src/bltPictPdf.c b/blt3.0/src/bltPictPdf.c
deleted file mode 100644
index 6256969..0000000
--- a/blt3.0/src/bltPictPdf.c
+++ /dev/null
@@ -1,1245 +0,0 @@
-
-/*
- * bltPictPdf.c --
- *
- * This module implements Portable Document Format (PDF) file conversion
- * routines for the picture image type in the BLT toolkit.
- *
- *	Copyright 2003-2007 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-#include "config.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <tcl.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifndef __WIN32__
-#   if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__)
-#	define __WIN32__
-#	ifndef WIN32
-#	    define WIN32
-#	endif
-#   endif
-#endif	/*__WIN32__*/
-
-#ifdef _MSC_VER
-#  define _CRT_SECURE_NO_DEPRECATE
-#  define _CRT_NONSTDC_NO_DEPRECATE
-#endif	/*MSC_VER*/
-
-#ifdef WIN32
-#  define STRICT
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  undef STRICT
-#  undef WIN32_LEAN_AND_MEAN
-#  include <windowsx.h>
-#endif	/*WIN32*/
-
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include "bltTypes.h"
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-#include "bltPs.h"
-#include "bltAlloc.h"
-#include "bltWait.h"
-
-#include <tk.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef WIN32
-#include "bltWin.h"
-#endif /*WIN32*/
-
-#define UCHAR(c)	((unsigned char) (c))
-#define ISASCII(c)	(UCHAR(c)<=0177)
-#define MIN(a,b)	(((a)<(b))?(a):(b))
-
-#define TRUE 	1
-#define FALSE 	0
-#define div257(t)	(((t)+((t)>>8))>>8)
-#define SetBit(x)	destRowPtr[(x>>3)] |= (0x80 >>(x&7))
-#define GetBit(x)	 srcRowPtr[(x>>3)] &  (0x80 >> (x&7))
-
-#define MAXCOLORS       256
-#define BUFFER_SIZE (1<<16)
-
-enum PbmVersions {
-    PBM_UNKNOWN,
-    PBM_PLAIN,				/* Monochrome: 1-bit per pixel */
-    PGM_PLAIN,				/* 8-bits per pixel */
-    PPM_PLAIN,				/* 24-bits per pixel */
-    PBM_RAW,				/* 1-bit per pixel */
-    PGM_RAW,				/* 8/16-bits per pixel */
-    PPM_RAW				/* 24/48 bits per pixel */
-};
-    
-    
-static const char *pbmFormat[] = {
-    "???", 
-    "pbmplain",
-    "pgmplain",
-    "ppmplain",
-    "pbmraw",
-    "pgmraw",
-    "ppmraw",
-};
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int flags;				/* Flag. */
-    Blt_Pixel bg;
-    PageSetup setup;
-    int index;
-} PdfExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int dpi;				/* Dots per inch. */
-    const char *paperSize;		/* Papersize. */
-    int crop;
-} PdfImportSwitches;
-
-#define PDF_CROP		(1<<0)
-
-typedef struct {
-    unsigned int width, height;		/* Dimensions of the image. */
-    unsigned int bitsPerPixel;		/* # bits per pixel. */
-    unsigned char *data;		/* Start of raw data */
-    unsigned int bytesPerRow;
-    Blt_DBuffer dbuffer;
-} Pbm;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PicaSwitchProc;
-static Blt_SwitchCustom picaSwitch = {
-    PicaSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PadSwitchProc;
-static Blt_SwitchCustom padSwitch = {
-    PadSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-bg",		"color",
-	Blt_Offset(PdfExportSwitches, bg),	   0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ,     "-data",	"data",
-	Blt_Offset(PdfExportSwitches, dataObjPtr),  0},
-    {BLT_SWITCH_OBJ,     "-file",	"fileName",
-	Blt_Offset(PdfExportSwitches, fileObjPtr),  0},
-    {BLT_SWITCH_BITMASK, "-center",	"",
-	Blt_Offset(PdfExportSwitches, setup.flags), 0, PS_CENTER},
-    {BLT_SWITCH_BITMASK, "-greyscale",	"",
-	Blt_Offset(PdfExportSwitches, setup.flags), 0, PS_GREYSCALE},
-    {BLT_SWITCH_BITMASK, "-landscape",	"",
-	Blt_Offset(PdfExportSwitches, setup.flags), 0, PS_LANDSCAPE},
-    {BLT_SWITCH_INT_POS, "-level",	"pdflevel",
-	Blt_Offset(PdfExportSwitches, setup.level), 0},
-    {BLT_SWITCH_BITMASK, "-maxpect",	"",
-	Blt_Offset(PdfExportSwitches, setup.flags), 0, PS_MAXPECT},
-    {BLT_SWITCH_CUSTOM,  "-padx",	"pad",
-	Blt_Offset(PdfExportSwitches, setup.xPad),  0, 0, &padSwitch},
-    {BLT_SWITCH_CUSTOM,  "-pady",	"pad",
-	Blt_Offset(PdfExportSwitches, setup.yPad),  0, 0, &padSwitch},
-    {BLT_SWITCH_CUSTOM,  "-paperheight","pica",
-	Blt_Offset(PdfExportSwitches, setup.reqPaperHeight), 0, 0, &picaSwitch},
-    {BLT_SWITCH_CUSTOM,  "-paperwidth", "pica",
-	Blt_Offset(PdfExportSwitches, setup.reqPaperWidth), 0, 0, &picaSwitch},
-    {BLT_SWITCH_LIST,    "-comments", "{key value...}",
-	Blt_Offset(PdfExportSwitches, setup.comments), BLT_SWITCH_NULL_OK},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PdfExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] =
-{
-    {BLT_SWITCH_BOOLEAN,  "-crop",	"bool",
-	Blt_Offset(PdfImportSwitches, crop), 0},
-    {BLT_SWITCH_OBJ,     "-data",	"data",
-	Blt_Offset(PdfImportSwitches, dataObjPtr),  0},
-    {BLT_SWITCH_INT,      "-dpi",	"number",
-	Blt_Offset(PdfImportSwitches, dpi), 0},
-    {BLT_SWITCH_OBJ,     "-file",	"fileName",
-	Blt_Offset(PdfImportSwitches, fileObjPtr),  0},
-    {BLT_SWITCH_STRING,  "-papersize",	"string",
-	Blt_Offset(PdfImportSwitches, paperSize),   0},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PicturePdfInit;
-extern const char *Blt_Itoa(int);
-
-#ifdef WIN32
-
-typedef struct {
-    DWORD pid;
-    HANDLE hProcess;
-} ProcessId;
-
-#else
-typedef pid_t ProcessId;
-#endif
-
-#ifdef WIN32
-#define close(fd)		CloseHandle((HANDLE)fd)
-#define kill			KillProcess
-#define waitpid			WaitProcess
-#endif
-
-BLT_EXTERN int Blt_CreatePipeline(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, ProcessId **pidArrayPtr, int *stdinPipePtr,
-	int *stdoutPipePtr, int *stderrPipePtr);
-BLT_EXTERN void Blt_ScreenDPI(Tk_Window tkwin, unsigned int *xPtr, 
-	unsigned int *yPtr);
-
-#define TRUE 	1
-#define FALSE 	0
-
-typedef struct _Blt_Picture Picture;
-
-#include <ctype.h>
-
-static void
-AddComments(Blt_Ps ps, const char **comments)
-{
-    const char **p;
-
-    for (p = comments; *p != NULL; p += 2) {
-	if (*(p+1) == NULL) {
-	    break;
-	}
-	Blt_Ps_Format(ps, "%% %s: %s\n", *p, *(p+1));
-    }
-}
-
-/*
- * Parse the lines that define the dimensions of the bitmap, plus the first
- * line that defines the bitmap data (it declares the name of a data variable
- * but doesn't include any actual data).  These lines look something like the
- * following:
- *
- *		#define foo_width 16
- *		#define foo_height 16
- *		#define foo_x_hot 3
- *		#define foo_y_hot 3
- *		static char foo_bits[] = {
- *
- * The x_hot and y_hot lines may or may not be present.  It's important to
- * check for "char" in the last line, in order to reject old X10-style bitmaps
- * that used shorts.
- */
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif /* HAVE_SYS_TIME_H */
-#endif /* TIME_WITH_SYS_TIME */
-
-/*
- *--------------------------------------------------------------------------
- *
- * PicaSwitchProc --
- *
- *	Convert a Tcl_Obj list of 2 or 4 numbers into representing a bounding
- *	box structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *--------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PicaSwitchProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int *picaPtr = (int *)(record + offset);
-    
-    return Blt_Ps_GetPicaFromObj(interp, objPtr, picaPtr);
-}
-
-/*
- *--------------------------------------------------------------------------
- *
- * PadSwitchProc --
- *
- *	Convert a Tcl_Obj list of 2 or 4 numbers into representing a bounding
- *	box structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *--------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PadSwitchProc(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Blt_Pad *padPtr = (Blt_Pad *)(record + offset);
-    
-    return Blt_Ps_GetPadFromObj(interp, objPtr, padPtr);
-}
-
-/*
- * --------------------------------------------------------------------------
- *
- * PostScriptPreamble --
- *
- *    	The PostScript preamble calculates the needed translation and scaling
- *    	to make image coordinates compatible with PostScript.
- *
- * --------------------------------------------------------------------------
- */
-static int
-PostScriptPreamble(
-    Tcl_Interp *interp,
-    Picture *srcPtr,
-    PdfExportSwitches *switchesPtr,
-    Blt_Ps ps)
-{
-    PageSetup *setupPtr = &switchesPtr->setup;
-    time_t ticks;
-    char date[200];		/* Hold the date string from ctime() */
-    const char *version;
-    char *newline;
-
-    Blt_Ps_Append(ps, "%!PS-Adobe-3.0 EPSF-3.0\n");
-
-    /* The "BoundingBox" comment is required for EPS files. */
-    Blt_Ps_Format(ps, "%%%%BoundingBox: %d %d %d %d\n",
-	setupPtr->left, setupPtr->paperHeight - setupPtr->top,
-	setupPtr->right, setupPtr->paperHeight - setupPtr->bottom);
-    Blt_Ps_Append(ps, "%%Pages: 0\n");
-
-    version = Tcl_GetVar(interp, "blt_version", TCL_GLOBAL_ONLY);
-    if (version == NULL) {
-	version = "???";
-    }
-    Blt_Ps_Format(ps, "%%%%Creator: (BLT %s Picture)\n", version);
-
-    ticks = time((time_t *) NULL);
-    strcpy(date, ctime(&ticks));
-    newline = date + strlen(date) - 1;
-    if (*newline == '\n') {
-	*newline = '\0';
-    }
-    Blt_Ps_Format(ps, "%%%%CreationDate: (%s)\n", date);
-    Blt_Ps_Append(ps, "%%DocumentData: Clean7Bit\n");
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Append(ps, "%%Orientation: Landscape\n");
-    } else {
-	Blt_Ps_Append(ps, "%%Orientation: Portrait\n");
-    }
-    AddComments(ps, setupPtr->comments);
-    Blt_Ps_Append(ps, "%%EndComments\n\n");
-    Blt_Ps_Append(ps, "%%BeginProlog\n");
-    Blt_Ps_Append(ps, "%%EndProlog\n");
-    Blt_Ps_Append(ps, "%%BeginSetup\n");
-    Blt_Ps_Append(ps, "gsave\n");
-    /*
-     * Set the conversion from PostScript to X11 coordinates.  Scale pica to
-     * pixels and flip the y-axis (the origin is the upperleft corner).
-     */
-    Blt_Ps_VarAppend(ps,
-	"% Transform coordinate system to use X11 coordinates\n"
-	"% 1. Flip y-axis over by reversing the scale,\n", (char *)NULL);
-    Blt_Ps_Append(ps, "1 -1 scale\n");
-    Blt_Ps_VarAppend(ps, 
-	"% 2. Translate the origin to the other side of the page,\n"
-	"%    making the origin the upper left corner\n", (char *)NULL);
-    Blt_Ps_Format(ps, "0 %d translate\n\n", -setupPtr->paperHeight);
-    Blt_Ps_VarAppend(ps, "% User defined page layout\n\n",
-	"% Set color level\n", (char *)NULL);
-    Blt_Ps_Format(ps, "%% Set origin\n%d %d translate\n\n",
-		  setupPtr->left, setupPtr->bottom);
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Format(ps,
-	    "%% Landscape orientation\n0 %g translate\n-90 rotate\n",
-	    ((double)srcPtr->width * setupPtr->scale));
-    }
-    if (setupPtr->scale != 1.0f) {
-	Blt_Ps_Append(ps, "\n% Setting picture scale factor\n");
-	Blt_Ps_Format(ps, " %g %g scale\n", setupPtr->scale, setupPtr->scale);
-    }
-    Blt_Ps_Append(ps, "\n%%EndSetup\n\n");
-    return TCL_OK;
-}
-
-static char *
-PbmComment(char *bp) 
-{
-    char *p;
-
-    p = bp;
-    if (*p == '#') {
-	/* Comment: file end of line */
-	while((*p != '\n') && (p != '\0')) {
-	    p++;
-	}
-    }
-    return p;
-}
-
-static inline int 
-PbmGetShort(unsigned char *bp) {
-    return (bp[0] << 8) + bp[1];
-}
-
-static Picture *
-PbmRawData(Pbm *pbmPtr)
-{
-    Picture *destPtr;
-
-    destPtr = Blt_CreatePicture(pbmPtr->width, pbmPtr->height);
-    switch (pbmPtr->bitsPerPixel) {
-    case 1: 
-	{
-	    /* Monochrome */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		int x;
-		Blt_Pixel *dp;
-		
-		dp = destRowPtr;
-		for (x = 0; x < pbmPtr->width; x++) {
-		    dp->Red = dp->Green = dp->Blue = (GetBit(x)) ? 0xFF : 0;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    dp++;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 8: 
-	{
-	    /* Greyscale (1 byte)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp++, dp++) {
-		    dp->Red = dp->Green = dp->Blue = *sp;
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 16: 
-	{ 
-	    /* Greyscale (2 bytes)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 2, dp++) {
-		    unsigned int value;
-		    
-		    value = PbmGetShort(sp);
-		    dp->Red = dp->Green = dp->Blue = div257(value);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 24: 
-	{ 
-	    /* Color (1 byte per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 3, dp++) {
-		    dp->Red   = sp[0];
-		    dp->Green = sp[1];
-		    dp->Blue  = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 48: 
-	{
-	    /* Color (2 bytes per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 6, dp++) {
-		    unsigned int r, g, b;
-		    
-		    r = PbmGetShort(sp);
-		    g = PbmGetShort(sp+2);
-		    b = PbmGetShort(sp+4);
-		    dp->Red   = div257(r);
-		    dp->Green = div257(g);
-		    dp->Blue  = div257(b);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    }
-    Blt_DBuffer_SetPointer(pbmPtr->dbuffer, pbmPtr->data + 
-			   (pbmPtr->height * pbmPtr->bytesPerRow));
-    return destPtr;
-}
-
-static Blt_Picture
-PbmToPicture(Tcl_Interp *interp, Blt_DBuffer dbuffer)
-{
-    char *bp, *p;
-    const char *type;
-    int isRaw;
-    int version;
-    size_t size, want;
-    unsigned char *start;
-    Pbm pbm;
-
-    size = Blt_DBuffer_BytesLeft(dbuffer);
-    start = Blt_DBuffer_Pointer(dbuffer);
-    if (size < 14) {
-	Tcl_AppendResult(interp, "can't read PBM bitmap: short file", 
-			 (char *)NULL);
-	return NULL;
-    }
-    bp = (char *)start;
-    if ((bp[0] != 'P') || (bp[1] < '1') || (bp[1] > '6')) {
-	Tcl_AppendResult(interp, "unknown PBM bitmap header", (char *)NULL);
-	return NULL;
-    }
-    version = bp[1] - '0';
-    isRaw = (version > 2);
-    switch(version) {	
-    case PBM_PLAIN:			/* P2 */
-    case PBM_RAW:			/* P5 */
-	pbm.bitsPerPixel = 8;
-	break;
-    case PGM_PLAIN:			/* P1 */
-    case PGM_RAW:			/* P4 */
-	pbm.bitsPerPixel = 1;
-	break;
-    case PPM_PLAIN:			/* P3 */
-    case PPM_RAW:			/* P6 */
-	pbm.bitsPerPixel = 24;
-	break;
-    }
-    if (!isspace(bp[2])) {
-	type = pbmFormat[version];
-	Tcl_AppendResult(interp, "no white space after version in pbm header.", 
-			 (char *)NULL);
-	return NULL;
-    }
-    p = bp + 3;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbm.width = strtoul(p, &p, 10);
-    if (pbm.width == 0) {
-	Tcl_AppendResult(interp, "bad width specification ", bp+3, ".", 
-			 (char *)NULL);
-	return NULL;
-    }
-    if (!isspace(*p)) {
-	Tcl_AppendResult(interp, "no white space after width in pbm header.", 
-		(char *)NULL);
-	return NULL;
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbm.height = strtoul(p, &p, 10);
-    if (pbm.height == 0) {
-	Tcl_AppendResult(interp, "bad height specification", (char *)NULL);
-	return NULL;
-    }
-    if (!isspace(*p)) {
-	Tcl_AppendResult(interp, "no white space after height in header.", 
-			 (char *)NULL);
-	return NULL;
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    if (pbm.bitsPerPixel != 1) {
-	unsigned int maxval;		/* Maximum intensity allowed. */
-
-	maxval = strtoul(p, &p, 10);
-	if (maxval == 0) {
-	    Tcl_AppendResult(interp, "bad maxval specification", (char *)NULL);
-	    return NULL;
-	}
-	if (!isspace(*p)) {
-	    Tcl_AppendResult(interp, "no white space after maxval pbm header.", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	p++;
-	if (*p == '#') {
-	    p = PbmComment(p);
-	}
-	if (maxval >= USHRT_MAX) {
-	    Tcl_AppendResult(interp, "invalid maxval specification", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	if (maxval > 255) {
-	    pbm.bitsPerPixel <<= 1;  /* 16-bit greyscale or 48 bit color. */
-	}
-    }
-    pbm.data = (unsigned char *)p;
-    pbm.dbuffer = dbuffer;
-    pbm.bytesPerRow = ((pbm.bitsPerPixel * pbm.width) + 7) / 8;
-    want = (pbm.data - start) + pbm.height * pbm.bytesPerRow;
-    if ((isRaw) && (want > Blt_DBuffer_BytesLeft(dbuffer))) {
-	Tcl_AppendResult(interp, "short pbm file", (char *)NULL);
-	return NULL;
-    }	    
-    if (!isRaw) {
-	Tcl_AppendResult(interp, "expected raw pbm file", (char *)NULL);
-	return NULL;
-    }
-    return PbmRawData(&pbm);
-}
-
-#ifdef WIN32
-
-typedef struct {
-    int fd;
-    Blt_DBuffer dbuffer;
-    int lastError;
-} PdfWriter;
-
-/*
- *---------------------------------------------------------------------------
- *
- * WriteBufferProc --
- *
- *	This function runs in a separate thread and write the data buffer as
- *	input to the ghostscript process.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Writes the buffer (PDF file) to the ghostscript standard input
- *	file descriptor.
- *
- *---------------------------------------------------------------------------
- */
-static DWORD WINAPI
-WriteBufferProc(void *clientData)
-{
-    PdfWriter *writerPtr = clientData;
-    const unsigned char *bp;
-    int bytesLeft;
-    HANDLE hFile;
-    DWORD count;
-
-    hFile = (HANDLE)writerPtr->fd;
-    bp = Blt_DBuffer_Bytes(writerPtr->dbuffer);
-    for (bytesLeft = Blt_DBuffer_Length(writerPtr->dbuffer); bytesLeft > 0;
-	 bytesLeft -= count) {
-	if (!WriteFile(hFile, bp, bytesLeft, &count, NULL)) {
-	    writerPtr->lastError = GetLastError();
-	    break;
-	}
-	bp += count;
-    }
-    Blt_DBuffer_Destroy(writerPtr->dbuffer);
-    CloseHandle(hFile);
-    if (bytesLeft > 0) {
-	ExitThread(1);
-    }
-    ExitThread(0);
-    /* NOTREACHED */
-    return 0;
-}
-
-static PdfWriter writer;
-
-static int
-WriteToGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    HANDLE hThread;
-    ClientData clientData;
-    DWORD id;
-
-    writer.dbuffer = Blt_DBuffer_Create();
-    Blt_DBuffer_Init(writer.dbuffer);
-    /* Copy the input to a new buffer. */
-    Blt_DBuffer_AppendData(writer.dbuffer, Blt_DBuffer_Bytes(dbuffer),
-	Blt_DBuffer_Length(dbuffer));
-    writer.fd = fd;
-    writer.lastError = 0;
-    clientData = &writer;
-    hThread = CreateThread(
-	NULL,				/* Security attributes */
-	8000,				/* Initial stack size. */
-	WriteBufferProc,		/* Address of thread routine */
-	clientData,			/* One-word of data passed to
-					 * routine. */
-	0,				/* Creation flags */
-	&id);				/* (out) Will contain Id of new
-					 * thread. */
-    return (int)hThread;
-}
-
-
-static int
-ReadFromGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    DWORD nBytes;
-    HANDLE hFile;
-    int result;
-
-    Blt_DBuffer_Free(dbuffer);
-    hFile = (HANDLE)fd;
-    nBytes = 0;
-    for (;;) {
-	DWORD nRead;
-	char *bp;
-
-	bp = Blt_DBuffer_Extend(dbuffer, BUFFER_SIZE);
-	if (!ReadFile(hFile, bp, BUFFER_SIZE, &nRead, NULL)) {
-	    DWORD err;
-
-	    err = GetLastError();
-	    if ((err != ERROR_BROKEN_PIPE) && (err != ERROR_HANDLE_EOF)) {
-		Tcl_AppendResult(interp, "error reading from ghostscript: ",
-				 Blt_PrintError(err), (char *)NULL);
-		result = TCL_ERROR;
-		break;
-	    }
-	}
-	if (nRead == 0) {
-	    result = TCL_OK;
-	    break;			/* EOF */
-	}
-	nBytes += nRead;
-	Blt_DBuffer_SetLength(dbuffer, nBytes);
-    }
-    Blt_DBuffer_SetLength(dbuffer, nBytes);
-    CloseHandle(hFile);
-    return result;
-}
-
-#else  /* WIN32 */
-
-static int
-WriteToGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    pid_t child;
-
-    child = fork();
-    if (child == -1) {
-	Tcl_AppendResult(interp, "can't fork process: ", Tcl_PosixError(interp),
-			 (char *)NULL);
-	return 0;
-    } else if (child > 0) {
-	close(fd);
-	return child;
-    } else {
-	const char *bytes;
-	int nWritten, nBytes;
-
-	bytes = (const char *)Blt_DBuffer_Bytes(dbuffer);
-	nBytes = Blt_DBuffer_Length(dbuffer);
-	nWritten = write(fd, bytes, nBytes);
-	close(fd);
-	if (nWritten != nBytes) {
-	    exit(1);
-	}
-	exit(0);
-    }
-}
-
-static int
-ReadFromGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    int nBytes;
-    
-    Blt_DBuffer_Free(dbuffer);
-    nBytes = 0;
-    for (;;) {
-	char *bp;
-	int nRead;
-
-	bp = (char *)Blt_DBuffer_Extend(dbuffer, BUFFER_SIZE);
-	nRead = read(fd, bp, BUFFER_SIZE);
-	if (nRead == 0) {
-	    break;		/* EOF */
-	} else if (nRead < 0) {
-	    Tcl_AppendResult(interp, "error reading from ghostscript: ",
-			     Tcl_PosixError(interp), (char *)NULL);
-	    return TCL_ERROR;
-	}
-
-	nBytes += nRead;
-	Blt_DBuffer_SetLength(dbuffer, nBytes);
-    }
-    Blt_DBuffer_SetLength(dbuffer, nBytes);
-    close(fd);
-    return TCL_OK;
-}
-
-#endif	/* WIN32 */
-
-static int
-PdfToPbm(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer dbuffer,
-    PdfImportSwitches *switchesPtr)
-{
-    int in, out;			/* File descriptors for ghostscript
-					 * subprocess. */
-    char string1[200];
-    char string2[200];
-    int nPids;
-    ProcessId *pidPtr;
-    int result;
-    pid_t child;
-    const char **p;
-    const char *args[] = {
-	"gs",				/* Ghostscript command */
-	"-dEPSCrop",			/* (optional) crop page to bbox  */
-	"-dSAFER",			/*  */
-	"-q",				/* Quiet mode.  No GS messages.  */
-	"-sDEVICE=ppmraw",		/* Format is PPM raw */
-	"-dBATCH",			/* Batch mode. No "quit" necessary. */
-	"-sPAPERSIZE=letter",		/* (optional) Specify paper size. */
-	"-r100x100",			/* (optional) Specify DPI of screen */
-	"-dNOPAUSE",			/*  */
-	"-sOutputFile=-",		/* Output file is stdout. */
-	"-",
-	NULL
-    };
-
-    args[1] = (switchesPtr->crop) ? "-dEPSCrop" : "-dSAFER";
-    {
-	Tk_Window tkwin;
-	unsigned int xdpi, ydpi;
-
-	tkwin = Tk_MainWindow(interp);
-	if (switchesPtr->dpi > 0) {
-	    xdpi = ydpi = switchesPtr->dpi;
-	} else {
-	    Blt_ScreenDPI(tkwin, &xdpi, &ydpi);
-	}
-	sprintf(string1, "-r%dx%d", xdpi, ydpi);
-	args[7] = string1;
-    }
-    if (switchesPtr->paperSize != NULL) {
-	sprintf(string2, "-sPAPERSIZE=%s", switchesPtr->paperSize);
-	args[6] = string2;
-    }
-    {
-	int i;
-	Tcl_Obj *objv[11];
-	int objc = 11;
-
-	for (i = 0, p = args; *p != NULL; p++, i++) {
-	    objv[i] = Tcl_NewStringObj(*p, -1);
-	    Tcl_IncrRefCount(objv[i]);
-	}
-	nPids = Blt_CreatePipeline(interp, objc, objv, &pidPtr, &in, &out,
-		(int *)NULL);
-	for (i = 0; i < objc; i++) {
-	    Tcl_DecrRefCount(objv[i]);
-	}
-    }
-    if (nPids < 0) {
-	return TCL_ERROR;
-    }
-    Tcl_DetachPids(nPids, (Tcl_Pid *)pidPtr);
-    child = WriteToGhostscript(interp, in, dbuffer);
-    if (child == 0) {
-	return TCL_ERROR;
-    }
-    result = ReadFromGhostscript(interp, out, dbuffer);
-#ifdef WIN32
-    CloseHandle((HANDLE)child);
-#endif
-    Tcl_ReapDetachedProcs();
-#ifdef notdef
-    Blt_DBuffer_SaveFile(interp, "junk.ppm", dbuffer);
-#endif
-    if (result != TCL_OK) {
-	Blt_DBuffer_Free(dbuffer);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static Blt_Chain
-PdfToPicture(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer,
-	     PdfImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-
-    if (PdfToPbm(interp, fileName, dbuffer, switchesPtr) != TCL_OK) {
-	return NULL;
-    }
-    /* Can be more than one image in buffer. Save each picture in a list. */
-    chain = Blt_Chain_Create();
-    while (Blt_DBuffer_BytesLeft(dbuffer) > 0) {
-	Blt_Picture picture;
-
-	picture = PbmToPicture(interp, dbuffer);
-	if (picture == NULL) {
-	    Blt_Chain_Destroy(chain);
-	    return NULL;
-	}
-	Blt_Chain_Append(chain, picture);
-    }
-    return chain;
-}
-
-static int
-PictureToPdf(Tcl_Interp *interp, Blt_Picture original, Blt_Ps ps,
-	    PdfExportSwitches *switchesPtr)
-{
-    Picture *srcPtr;
-    int w, h;
-
-    srcPtr = original;
-    w = srcPtr->width, h = srcPtr->height;
-    Blt_Ps_ComputeBoundingBox(&switchesPtr->setup, w, h);
-    if (PostScriptPreamble(interp, srcPtr, switchesPtr, ps) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_ClassifyPicture(srcPtr); 
-    if (!Blt_PictureIsOpaque(srcPtr)) {
-	Blt_Picture background;
-
-	background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	Blt_BlankPicture(background, &switchesPtr->bg);
-	Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	srcPtr = background;
-    }
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(srcPtr);
-    }
-    Blt_Ps_Rectangle(ps, 0, 0, srcPtr->width, srcPtr->height);
-    Blt_Ps_Append(ps, "gsave clip\n\n");
-    Blt_Ps_DrawPicture(ps, srcPtr, 0, 0);
-    Blt_Ps_VarAppend(ps, "\n",
-	"% Unset clipping\n",
-	"grestore\n\n", (char *)NULL);
-    Blt_Ps_VarAppend(ps,
-	"showpage\n",
-	"%Trailer\n",
-	"grestore\n",
-	"end\n",
-	"%EOF\n", (char *)NULL);
-    if (srcPtr != original) {
-	Blt_Free(srcPtr);
-    }
-    return TCL_OK;
-}
-
-static int 
-IsPdf(Blt_DBuffer dbuffer)
-{
-    unsigned char *bp;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < 4) {
-	return FALSE;
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    return (strncmp("%PDF", (char *)bp, 4) == 0);
-}
-
-static Blt_Chain
-ReadPdf(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    Blt_Chain chain;
-    PdfImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.crop = TRUE;
-    chain = PdfToPicture(interp, fileName, dbuffer, &switches);
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return chain;
-}
-
-static Tcl_Obj *
-WritePdf(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_Ps ps;
-    PdfExportSwitches switches;
-    Tcl_Obj *objPtr;
-    int result;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.setup.reqPaperHeight = 792; /* 11 inches */
-    switches.setup.reqPaperWidth = 612; /* 8.5 inches */
-    switches.setup.level = 1;
-    switches.setup.xPad.side1 = 72;
-    switches.setup.xPad.side2 = 72;
-    switches.setup.yPad.side1 = 72;
-    switches.setup.yPad.side2 = 72;
-    switches.setup.flags = 0;
-
-    ps = Blt_Ps_Create(interp, &switches.setup);
-    result = PictureToPdf(interp, picture, ps, &switches);
-    objPtr = NULL;
-    if (result == TCL_OK) {
-	const char *string;
-	int length;
-
-	string = Blt_Ps_GetValue(ps, &length);
-	objPtr = Tcl_NewStringObj(string, length);
-    }
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_Ps_Free(ps);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportPdf(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer dbuffer;
-    PdfImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.crop = TRUE;
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	return NULL;
-    }
-    chain = NULL;
-    dbuffer = Blt_DBuffer_Create();
-    if (switches.dataObjPtr != NULL) {
-	int nBytes;
-
-	string = Tcl_GetStringFromObj(switches.dataObjPtr, &nBytes);
-	Blt_DBuffer_AppendData(dbuffer, (unsigned char *)string, nBytes);
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	if (Blt_DBuffer_LoadFile(interp, string, dbuffer) != TCL_OK) {
-	    Blt_DBuffer_Destroy(dbuffer);
-	    return NULL;
-	}
-	*fileNamePtr = string;
-    }
-    chain = PdfToPicture(interp, string, dbuffer, &switches);
-    Blt_DBuffer_Destroy(dbuffer);
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return chain;
-}
-
-static int
-ExportPdf(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    PdfExportSwitches switches;
-    Blt_Ps pdf;
-    int result;
-    Blt_Picture picture;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.setup.reqPaperHeight = 792; /* 11 inches */
-    switches.setup.reqPaperWidth = 612; /* 8.5 inches */
-    switches.setup.level = 1;
-    switches.setup.xPad.side1 = 72;
-    switches.setup.xPad.side2 = 72;
-    switches.setup.yPad.side1 = 72;
-    switches.setup.yPad.side2 = 72;
-    switches.setup.flags = 0;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data switch.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    pdf = Blt_Ps_Create(interp, &switches.setup);
-    result = PictureToPdf(interp, picture, pdf, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_Ps_SaveFile(interp, pdf, fileName);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-	int length;
-	const char *string;
-
-	string = Blt_Ps_GetValue(pdf, &length);
-	objPtr = Tcl_NewStringObj(string, length);
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, objPtr, 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	const char *string;
-	int length;
-
-	string = Blt_Ps_GetValue(pdf, &length);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), string, length);
-    }  
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_Ps_Free(pdf);
-    return result;
-}
-
-int 
-Blt_PicturePdfInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_pdf", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"pdf",				/* Name of format. */
-	IsPdf,				/* Discovery routine. */
-	ReadPdf,			/* Import format procedure. */
-	NULL,				/* Export format procedure. */
-	ImportPdf,			/* Import format procedure. */
-	NULL);				/* Export format procedure. */
-}
diff --git a/blt3.0/src/bltPictPhoto.c b/blt3.0/src/bltPictPhoto.c
deleted file mode 100644
index 44c6aee..0000000
--- a/blt3.0/src/bltPictPhoto.c
+++ /dev/null
@@ -1,219 +0,0 @@
-
-#include "blt.h"
-
-#include "config.h"
-#include <tcl.h>
-#include <tk.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#define FALSE	0
-#define TRUE	1
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-typedef struct {
-    Tcl_Obj *imageObjPtr;
-    int index;
-} PhotoExportSwitches;
-
-typedef struct {
-    Tcl_Obj *imageObjPtr;
-} PhotoImportSwitches;
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-image", "imageName",
-	Blt_Offset(PhotoExportSwitches, imageObjPtr), 0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PhotoExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-image", "imageName",
-	Blt_Offset(PhotoImportSwitches, imageObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PicturePhotoInit;
-
-#ifdef notdef
-void
-Blt_SizeOfPhoto(Tk_PhotoHandle photo, int *widthPtr, int *heightPtr)	
-{
-    Tk_PhotoImageBlock ib;
-
-    Tk_PhotoGetImage(photo, &ib);
-    *widthPtr = ib.width;
-    *heightPtr = ib.height;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * PhotoToPicture --
- *
- *      Converts a Tk Photo image to a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-PhotoToPicture(
-    Tcl_Interp *interp, 	/* Interpreter to report errors back to. */
-    PhotoImportSwitches *importPtr)
-{
-    Tk_PhotoHandle photo;
-    Blt_Picture picture;
-    Blt_Chain chain;
-
-    photo = Tk_FindPhoto(interp, Tcl_GetString(importPtr->imageObjPtr));
-    if (photo == NULL) {
-	Tcl_AppendResult(interp, "can't find photo \"",
-		Tcl_GetString(importPtr->imageObjPtr), "\"", (char *)NULL);
-	return NULL;
-    } 
-    picture =  Blt_PhotoToPicture(photo);
-    chain = Blt_Chain_Create();
-    Blt_Chain_Append(chain, picture);
-    return chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToPhoto --
- *
- *      Writes to an existing Tk Photo to contents of the picture.
- *
- * Results:
- *      A standard TCL result.  If an error occured, TCL_ERROR is
- *	returned and an error message will be place in the interpreter
- *	result. 
- *
- * Side Effects:
- *	Memory is allocated for the photo.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToPhoto(
-    Tcl_Interp *interp, 	/* Interpreter to report errors back to. */
-    Blt_Picture picture,	/* Picture source. */
-    PhotoExportSwitches *switchesPtr)
-{
-    Tk_PhotoHandle photo;
-
-    photo = Tk_FindPhoto(interp, Tcl_GetString(switchesPtr->imageObjPtr));
-    if (photo == NULL) {
-	Tcl_AppendResult(interp, "can't find photo \"",
-		Tcl_GetString(switchesPtr->imageObjPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    } 
-    Blt_PictureToPhoto(picture, photo);
-    return TCL_OK;
-}
-
-static int
-IsPhoto(Blt_DBuffer buffer)
-{
-    return FALSE;
-}
-
-static Blt_Chain
-ImportPhoto(
-    Tcl_Interp *interp, 
-    int objc,
-    Tcl_Obj *const *objv,
-    const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    PhotoImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if (switches.imageObjPtr != NULL) {
-	Tcl_AppendResult(interp, "no photo specified: use -image switch.",
-		(char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    chain = PhotoToPicture(interp, &switches);
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return chain;
-}
-
-static int
-ExportPhoto(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    int result;
-    PhotoExportSwitches switches;
-    Blt_Picture picture;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.index = index;
-    result = TCL_ERROR;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    if (switches.imageObjPtr != NULL) {
-	Tcl_AppendResult(interp, "no photo specified: use -image switch.",
-		(char *)NULL);
-	goto error;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "bad picture index.", (char *)NULL);
-	goto error;
-    }
-    result = PictureToPhoto(interp, picture, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", Tcl_GetString(objv[2]), 
-		"\"", (char *)NULL);
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    return result;
-}
-
-int 
-Blt_PicturePhotoInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-    if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_photo", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"photo",		/* Name of format. */
-	IsPhoto,		/* Discovery routine. */
-	NULL,			/* Read format procedure. */
-	NULL,			/* Write format procedure. */
-	ImportPhoto,		/* Import format procedure. */
-	ExportPhoto);		/* Export format procedure. */
-}
diff --git a/blt3.0/src/bltPictPng.c b/blt3.0/src/bltPictPng.c
deleted file mode 100644
index b178542..0000000
--- a/blt3.0/src/bltPictPng.c
+++ /dev/null
@@ -1,774 +0,0 @@
-
-/*
- * bltPictPng.c --
- *
- * This module implements PNG file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#ifdef HAVE_LIBPNG
-#include <tcl.h>
-#include <bltSwitch.h>
-#include <bltAlloc.h>
-#include <bltAssert.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#define TRUE 	1
-#define FALSE 	0
-
-typedef struct _Blt_Picture Picture;
-
-#include <png.h>
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    char **comments;		/* Comment pairs */
-    int index;
-} PngExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-} PngImportSwitches;
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(PngExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(PngExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_LIST, "-comments", "{key string...}",
-	Blt_Offset(PngExportSwitches, comments), 0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PngExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(PngImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(PngImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    Tcl_DString errors;
-    Tcl_DString warnings;
-    int nErrors, nWarnings;
-} PngMessage;
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PicturePngInit;
-extern const char *Blt_Itoa(int);
-
-static void
-PngError(png_struct *pngPtr, const char *mesg)
-{
-    PngMessage *mesgPtr;
-
-    mesgPtr = png_get_error_ptr(pngPtr);
-    Tcl_DStringAppend(&mesgPtr->errors, mesg, -1);
-    mesgPtr->nErrors++;
-}
-
-static void
-PngWarning(png_structp png, const char *mesg)
-{
-    PngMessage *mesgPtr;
-
-    mesgPtr = png_get_error_ptr(png);
-    Tcl_DStringAppend(&mesgPtr->warnings, mesg, -1);
-    mesgPtr->nWarnings++;
-}
-
-static void
-PngReadFromBuffer(png_structp png, png_byte *out, png_size_t nWanted)
-{
-    Blt_DBuffer dbuffer;
-    
-    dbuffer = png_get_io_ptr(png);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < nWanted) {
-	nWanted = Blt_DBuffer_BytesLeft(dbuffer);
-    }
-    if (nWanted > 0) {
-	memcpy(out, Blt_DBuffer_Pointer(dbuffer), nWanted);
-	Blt_DBuffer_IncrCursor(dbuffer, nWanted);
-    }
-}
-
-static void
-PngWriteToBuffer(
-    png_struct *pngPtr, 
-    png_byte *out, 
-    png_size_t nBytes)
-{
-    Blt_DBuffer dbuffer;
-
-    dbuffer = png_get_io_ptr(pngPtr);
-    if (!Blt_DBuffer_AppendData(dbuffer, out, nBytes)) {
-	return;
-    }
-}
-
-static void
-PngFlush(png_struct *pngPtr)
-{
-    /* Do nothing */
-}
-
-#ifdef PNG_TEXT_SUPPORTED
-static void
-PngAddText(Tcl_Interp *interp, png_struct *pngPtr, png_info *infoPtr, 
-	   char **comments)
-{
-    png_text *text, *textPtr;
-    char **p, **pend;
-    int count;
-
-    count = 0;
-    for (p = comments; *p != NULL; p++) {
-	count++;
-    }
-    if (count == 0) {
-	return;
-    }
-    text = Blt_AssertMalloc(sizeof(png_text) * count);
-    textPtr = text;
-    for (p = comments, pend = p + count; p < pend; p += 2) {
-	textPtr->compression = PNG_TEXT_COMPRESSION_NONE;
-	textPtr->key = *p;
-	if (*(p+1) == NULL) {
-	    continue;
-	}
-	textPtr->text = *(p+1);
-	textPtr++;
-    }
-    if (count > 0) {
-	png_set_text(pngPtr, infoPtr, text, textPtr - text);
-    }
-    Blt_Free(text);
-}
-#endif	/* PNG_TEXT_SUPPORTED */
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsPng --
- *
- *      Attempts to parse a PNG file header.
- *
- * Results:
- *      Returns 1 is the header is PNG and 0 otherwise.  Note that only the
- *      signature is compared and the validity of the image contents is not
- *      checked here.  That's done in Blt_PngToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-IsPng(Blt_DBuffer dbuffer)
-{
-#define PNG_BYTES_TO_CHECK 4
-    Blt_DBuffer_ResetCursor(dbuffer);
-    if (Blt_DBuffer_Length(dbuffer) > PNG_BYTES_TO_CHECK) {
-	unsigned char *bp;
-	int bool;
-
-	bp = Blt_DBuffer_Pointer(dbuffer);
-	bool = (png_sig_cmp(bp, (png_size_t)0, PNG_BYTES_TO_CHECK) == 0);
-	return bool;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PngToPicture --
- *
- *      Reads a PNG file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the designated
- *      file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-PngToPicture(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer,
-	     PngImportSwitches *switchesPtr)
-{
-    Picture *destPtr;
-    PngMessage message;
-    int transform;
-    png_infop info;
-    png_structp png;
-    unsigned int bitDepth, colorType;
-    unsigned int interlace, filter, nChannels;
-    unsigned int width, height;
-    
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    message.nErrors = message.nWarnings = 0;
-
-    Tcl_DStringAppend(&message.errors, "error reading \"", -1);
-    Tcl_DStringAppend(&message.errors, fileName, -1);
-    Tcl_DStringAppend(&message.errors, "\": ", -1);
-    png = png_create_read_struct(PNG_LIBPNG_VER_STRING, &message, PngError, 
-	PngWarning);
-    if (png == NULL) {
-	return NULL;
-    }
-
-    destPtr = NULL;		/* Mark to indicate failure. */
-
-    info = png_create_info_struct(png);
-    if (info == NULL) {
-	goto bad;
-    }
-    if (setjmp(png->jmpbuf)) {
-	goto bad;
-    }
-    png_set_read_fn(png, dbuffer, PngReadFromBuffer);
-
-    transform = (PNG_TRANSFORM_EXPAND | /* Expand 1,2 and 4 bit to 8 bits. */
-		 PNG_TRANSFORM_STRIP_16); /* Convert 16-bit components to 8. */
-
-    png_read_png(png, info, transform, (void *)NULL);
-
-    bitDepth =  png_get_bit_depth(png, info);
-    colorType = png_get_color_type(png, info);
-    filter =    png_get_filter_type(png, info);
-    height =    png_get_image_height(png, info);
-    interlace = png_get_interlace_type(png, info);
-    nChannels = png_get_channels(png, info);
-    width =     png_get_image_width(png, info);
-    
-#ifdef notdef
-    fprintf(stderr, "%s: %dx%d, bit_depth=%d, channels=%d, interlace=%d\n",
-	    fileName, width, height, bitDepth, nChannels, interlace);
-    fprintf(stderr, "colortype= %s %s %s \n",
-	    (colorType & 1) ? "palette" : "",
-	    (colorType & 2) ? "color"   : "",
-	    (colorType & 4) ? "alpha"   : "");
-#endif
-
-    destPtr = Blt_CreatePicture(width, height);
-    if (colorType & PNG_COLOR_MASK_ALPHA) {
-	assert((nChannels == 4) || (nChannels == 2));
-	destPtr->flags |= BLT_PIC_BLEND;
-    }
-    if ((nChannels == 4) || (nChannels == 3)) {
-	destPtr->flags |= BLT_PIC_COLOR;
-    }
-    {
-	unsigned int y;
-	Blt_Pixel *destRowPtr;
-	png_byte **row_pointers;
-
-	destRowPtr = destPtr->bits;
-	row_pointers = png_get_rows(png, info);
-	switch (nChannels) {
-	case 4:			/* 1 red, 1 green, 1 blue, 1 alpha */
-	    for (y = 0; y < height; y++) {
-		Blt_Pixel *dp;
-		png_byte *sp;
-		unsigned int x;
-		
-		dp = destRowPtr;
-		sp = row_pointers[y];
-		for (x = 0; x < width; x++) {
-		    dp->Red = sp[0];
-		    dp->Green = sp[1];
-		    dp->Blue = sp[2];
-		    dp->Alpha = sp[3];
-		    dp++, sp += 4;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	case 3:			/* 1 red, 1 green, 1 blue */
-	    for (y = 0; y < height; y++) {
-		Blt_Pixel *dp;
-		unsigned char *sp;
-		unsigned int x;
-		
-		dp = destRowPtr;
-		sp = row_pointers[y];
-		for (x = 0; x < width; x++) {
-		    dp->Red = sp[0];
-		    dp->Green = sp[1];
-		    dp->Blue = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		    dp++, sp += 3;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	case 2:			/* 1 greyscale, 1 alpha */
-	    for (y = 0; y < height; y++) {
-		Blt_Pixel *dp;
-		unsigned char *sp;
-		unsigned int x;
-		
-		dp = destRowPtr;
-		sp = row_pointers[y];
-		for (x = 0; x < width; x++) {
-		    dp->Red = dp->Green = dp->Blue = sp[0];
-		    dp->Alpha = sp[1];
-		    dp++, sp += 2;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	case 1:			/* 1 greyscale */
-	    for (y = 0; y < height; y++) {
-		Blt_Pixel *dp;
-		unsigned char *sp;
-		unsigned int x;
-		
-		dp = destRowPtr;
-		sp = row_pointers[y];
-		for (x = 0; x < width; x++) {
-		    dp->Red = dp->Green = dp->Blue = *sp++;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    dp++;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    }
-
- bad:
-    png_destroy_read_struct(&png, &info, (png_infop *)NULL);
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "PNG_READ_WARNINGS", 
-		Tcl_DStringValue(&message.errors), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    if (message.nErrors > 0) {
-	Tcl_DStringResult(interp, &message.errors);
-    }
-    Tcl_DStringFree(&message.errors);
-    if (destPtr != NULL) {
-	Blt_Chain chain;
-
-	chain = Blt_Chain_Create();
-	Blt_Chain_Append(chain, destPtr);
-	return chain;
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToPng --
- *
- *      Writes a PNG format image to the provided data buffer.
- *
- * Results:
- *      A standard TCL result.  If an error occured, TCL_ERROR is returned and
- *      an error message will be place in the interpreter result. Otherwise,
- *      the data buffer will contain the binary output of the image.
- *
- * Side Effects:
- *	Memory is allocated for the data buffer.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToPng(Tcl_Interp *interp, Blt_Picture picture, Blt_DBuffer dbuffer,
-	     PngExportSwitches *switchesPtr)
-{
-    PngMessage message;
-    int nColors;
-    png_infop info;
-    png_structp png;
-    unsigned int colorType, nChannels, bitsPerPixel;
-
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    message.nErrors = message.nWarnings = 0;
-
-    Tcl_DStringAppend(&message.errors, "error writing PNG output: ", -1);
-    png = png_create_write_struct(PNG_LIBPNG_VER_STRING, &message, PngError, 
-	PngWarning);
-    if (png == NULL) {
-	return TCL_ERROR;
-    }
-    info = png_create_info_struct(png);
-    if (info == NULL) {
-	png_destroy_write_struct(&png, (png_infop *)NULL);
-	return TCL_ERROR;
-    }
-    if (setjmp(png->jmpbuf)) {
-	goto bad;
-    }
-    png_set_write_fn(png, (void *)dbuffer, PngWriteToBuffer, PngFlush);
-
-    png_set_compression_level(png, Z_BEST_COMPRESSION);
-    nColors = Blt_QueryColors(picture, (Blt_HashTable *)NULL);
-    if (Blt_PictureIsColor(picture)) {
-	nChannels = 3;
-	colorType = PNG_COLOR_TYPE_RGB;
-    } else {
-	nChannels = 1;
-	colorType = PNG_COLOR_TYPE_GRAY;
-    }
-    if (!Blt_PictureIsOpaque(picture)) {
-	nChannels++;
-	colorType |= PNG_COLOR_MASK_ALPHA;
-    }
-    bitsPerPixel = 8;
-
-    png_set_IHDR(png, info, 
-	Blt_PictureWidth(picture),    /* Width */
-	Blt_PictureHeight(picture),   /* Height */
-	bitsPerPixel, 		      /* Bits per pixel. */
-	colorType, 		      /* Color type: RGB or GRAY */
-	PNG_INTERLACE_NONE, 	      /* Interlace */
-	PNG_COMPRESSION_TYPE_DEFAULT, /* Compression */
-	PNG_FILTER_TYPE_DEFAULT);     /* Filter */
-
-#ifdef PNG_TEXT_SUPPORTED
-    if (switchesPtr->comments != NULL) {
-	PngAddText(interp, png, info, switchesPtr->comments);
-    }
-#endif
-    png_write_info(png, info);
-    png_set_packing(png);
-
-    {
-	Picture *srcPtr;
-	Blt_Pixel *srcRowPtr;
-	int bytesPerRow;
-	int y;
-	unsigned char **rowArray;
-	unsigned char *destBuffer, *destRowPtr;
-	
-	srcPtr = picture;
-	bytesPerRow = nChannels * srcPtr->width;
-	destBuffer = Blt_Malloc(bytesPerRow * srcPtr->height);
-	if (destBuffer == NULL) {
-	    goto bad;
-	}
-	rowArray = Blt_Malloc(sizeof(unsigned char *) * srcPtr->height);
-	if (rowArray == NULL) {
-	    Blt_Free(destBuffer);
-	    goto bad;
-	}
-	destRowPtr = destBuffer;
-	srcRowPtr = srcPtr->bits;
-	switch (nChannels) {
-	case 4:			/* RGBA */
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp<send; sp++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Blue;
-		    dp[3] = sp->Alpha;
-		    dp += 4;
-		}
-		rowArray[y] = destRowPtr;
-		destRowPtr += bytesPerRow;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	    
-	case 3:			/* RGB, 100% opaque image.  */
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp<send; sp++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Blue;
-		    dp += 3;
-		}
-		rowArray[y] = destRowPtr;
-		destRowPtr += bytesPerRow;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	    
-	case 2:			/* Greyscale with alpha component.  */
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp<send; sp++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Alpha;
-		    dp += 2;
-		}
-		rowArray[y] = destRowPtr;
-		destRowPtr += bytesPerRow;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	    
-	case 1:			/* Greyscale, 100% opaque image.  */
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + srcPtr->width; sp<send; sp++) {
-		    *dp++ = sp->Red;
-		}
-		rowArray[y] = destRowPtr;
-		destRowPtr += bytesPerRow;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-	png_write_image(png, rowArray);
-	png_write_end(png, NULL);
-
-	Blt_Free(destBuffer);
-	Blt_Free(rowArray);
-    }
- bad:
-    png_destroy_write_struct(&png, &info);
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "PNG_WRITE_WARNINGS", 
-		Tcl_DStringValue(&message.errors), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    if (message.nErrors > 0) {
-	Tcl_DStringResult(interp, &message.errors);
-	return TCL_ERROR;
-    } 
-    Tcl_DStringFree(&message.errors);
-    return TCL_OK;
-}
-
-static Blt_Chain
-ReadPng(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    PngImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return PngToPicture(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WritePng(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_DBuffer dbuffer;
-    PngExportSwitches switches;
-    Tcl_Obj *objPtr;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-
-    objPtr = NULL;
-    dbuffer = Blt_DBuffer_Create();
-    if (PictureToPng(interp, picture, dbuffer, &switches) == TCL_OK) {
-	char *bytes;
-
-	bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (bytes != NULL) {
-	    objPtr = Tcl_NewStringObj(bytes, -1);
-	    Blt_Free(bytes);
-	}
-    }
-    Blt_DBuffer_Destroy(dbuffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportPng(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer dbuffer;
-    PngImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_SaveFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = PngToPicture(interp, string, dbuffer, &switches);
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportPng(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    PngExportSwitches switches;
-    Blt_DBuffer dbuffer;
-    int result;
-    Blt_Picture picture;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    result = PictureToPng(interp, picture, dbuffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-
-    /* Write the PNG data to file or convert it to a base64 string. */
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	result = TCL_ERROR;
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	    result = TCL_OK;
-	}
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int 
-Blt_PicturePngInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_png", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-        "png",			/* Name of format. */
-	IsPng,			/* Format discovery procedure. */
-	ReadPng,		/* Read format procedure. */
-	WritePng,		/* Write format procedure. */
-	ImportPng,		/* Import format procedure. */
-	ExportPng);		/* Export format procedure. */
-}
-
-#endif /* HAVE_LIBPNG */
-
diff --git a/blt3.0/src/bltPictPs.c b/blt3.0/src/bltPictPs.c
deleted file mode 100644
index 31b90be..0000000
--- a/blt3.0/src/bltPictPs.c
+++ /dev/null
@@ -1,1246 +0,0 @@
-
-/*
- * bltPictPs.c --
- *
- * This module implements Encapsulated PostScript file format conversion
- * routines for the picture image type in the BLT toolkit.
- *
- *	Copyright 2003-2007 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-#include "config.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <tcl.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifndef __WIN32__
-#   if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__)
-#	define __WIN32__
-#	ifndef WIN32
-#	    define WIN32
-#	endif
-#   endif
-#endif	/*__WIN32__*/
-
-#ifdef _MSC_VER
-#  define _CRT_SECURE_NO_DEPRECATE
-#  define _CRT_NONSTDC_NO_DEPRECATE
-#endif	/*MSC_VER*/
-
-#ifdef WIN32
-#  define STRICT
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  undef STRICT
-#  undef WIN32_LEAN_AND_MEAN
-#  include <windowsx.h>
-#endif	/*WIN32*/
-
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include "bltTypes.h"
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-#include "bltPs.h"
-#include "bltAlloc.h"
-#include "bltWait.h"
-
-#include <tk.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef WIN32
-#include "bltWin.h"
-#endif /*WIN32*/
-
-#define UCHAR(c)	((unsigned char) (c))
-#define ISASCII(c)	(UCHAR(c)<=0177)
-#define MIN(a,b)	(((a)<(b))?(a):(b))
-
-#define TRUE 	1
-#define FALSE 	0
-#define div257(t)	(((t)+((t)>>8))>>8)
-#define SetBit(x)	destRowPtr[(x>>3)] |= (0x80 >>(x&7))
-#define GetBit(x)	 srcRowPtr[(x>>3)] &  (0x80 >> (x&7))
-
-#define MAXCOLORS       256
-#define BUFFER_SIZE (1<<16)
-
-enum PbmVersions {
-    PBM_UNKNOWN,
-    PBM_PLAIN,			/* Monochrome: 1-bit per pixel */
-    PGM_PLAIN,			/* 8-bits per pixel */
-    PPM_PLAIN,			/* 24-bits per pixel */
-    PBM_RAW,			/* 1-bit per pixel */
-    PGM_RAW,			/* 8/16-bits per pixel */
-    PPM_RAW			/* 24/48 bits per pixel */
-};
-    
-    
-static const char *pbmFormat[] = {
-    "???", 
-    "pbmplain",
-    "pgmplain",
-    "ppmplain",
-    "pbmraw",
-    "pgmraw",
-    "ppmraw",
-};
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int flags;			/* Flag. */
-    Blt_Pixel bg;
-    PageSetup setup;
-    int index;
-} PsExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int dpi;			/* Dots per inch. */
-    const char *paperSize;	/* Papersize. */
-    int crop;
-} PsImportSwitches;
-
-#define PS_CROP		(1<<0)
-
-typedef struct {
-    unsigned int width, height;	/* Dimensions of the image. */
-    unsigned int bitsPerPixel;	/* # bits per pixel. */
-    unsigned char *data;	/* Start of raw data */
-    unsigned int bytesPerRow;
-    Blt_DBuffer dbuffer;
-} Pbm;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PicaSwitchProc;
-static Blt_SwitchCustom picaSwitch = {
-    PicaSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PadSwitchProc;
-static Blt_SwitchCustom padSwitch = {
-    PadSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,  "-bg",		"color",
-	Blt_Offset(PsExportSwitches, bg),	   0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ,     "-data",	"data",
-	Blt_Offset(PsExportSwitches, dataObjPtr),  0},
-    {BLT_SWITCH_OBJ,     "-file",	"fileName",
-	Blt_Offset(PsExportSwitches, fileObjPtr),  0},
-    {BLT_SWITCH_BITMASK, "-center",	"",
-	Blt_Offset(PsExportSwitches, setup.flags), 0, PS_CENTER},
-    {BLT_SWITCH_BITMASK, "-greyscale",	"",
-	Blt_Offset(PsExportSwitches, setup.flags), 0, PS_GREYSCALE},
-    {BLT_SWITCH_BITMASK, "-landscape",	"",
-	Blt_Offset(PsExportSwitches, setup.flags), 0, PS_LANDSCAPE},
-    {BLT_SWITCH_INT_POS, "-level",	"pslevel",
-	Blt_Offset(PsExportSwitches, setup.level), 0},
-    {BLT_SWITCH_BITMASK, "-maxpect",	"",
-	Blt_Offset(PsExportSwitches, setup.flags), 0, PS_MAXPECT},
-    {BLT_SWITCH_CUSTOM,  "-padx",	"pad",
-	Blt_Offset(PsExportSwitches, setup.xPad),  0, 0, &padSwitch},
-    {BLT_SWITCH_CUSTOM,  "-pady",	"pad",
-	Blt_Offset(PsExportSwitches, setup.yPad),  0, 0, &padSwitch},
-    {BLT_SWITCH_CUSTOM,  "-paperheight","pica",
-	Blt_Offset(PsExportSwitches, setup.reqPaperHeight), 0, 0, &picaSwitch},
-    {BLT_SWITCH_CUSTOM,  "-paperwidth", "pica",
-	Blt_Offset(PsExportSwitches, setup.reqPaperWidth), 0, 0, &picaSwitch},
-    {BLT_SWITCH_LIST,    "-comments", "{key value...}",
-	Blt_Offset(PsExportSwitches, setup.comments), BLT_SWITCH_NULL_OK},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(PsExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] =
-{
-    {BLT_SWITCH_BOOLEAN,  "-crop",	"bool",
-	Blt_Offset(PsImportSwitches, crop), 0},
-    {BLT_SWITCH_OBJ,     "-data",	"data",
-	Blt_Offset(PsImportSwitches, dataObjPtr),  0},
-    {BLT_SWITCH_INT,      "-dpi",	"number",
-	Blt_Offset(PsImportSwitches, dpi), 0},
-    {BLT_SWITCH_OBJ,     "-file",	"fileName",
-	Blt_Offset(PsImportSwitches, fileObjPtr),  0},
-    {BLT_SWITCH_STRING,  "-papersize",	"string",
-	Blt_Offset(PsImportSwitches, paperSize),   0},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PicturePsInit;
-extern const char *Blt_Itoa(int);
-
-#ifdef WIN32
-
-typedef struct {
-    DWORD pid;
-    HANDLE hProcess;
-} ProcessId;
-
-#else
-typedef pid_t ProcessId;
-#endif
-
-#ifdef WIN32
-#define close(fd)		CloseHandle((HANDLE)fd)
-#define kill			KillProcess
-#define waitpid			WaitProcess
-#endif
-
-BLT_EXTERN int Blt_CreatePipeline(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, ProcessId **pidArrayPtr, int *stdinPipePtr,
-	int *stdoutPipePtr, int *stderrPipePtr);
-BLT_EXTERN void Blt_ScreenDPI(Tk_Window tkwin, unsigned int *xPtr, 
-	unsigned int *yPtr);
-
-#define TRUE 	1
-#define FALSE 	0
-
-typedef struct _Blt_Picture Picture;
-
-#include <ctype.h>
-
-static void
-AddComments(Blt_Ps ps, const char **comments)
-{
-    const char **p;
-
-    for (p = comments; *p != NULL; p += 2) {
-	if (*(p+1) == NULL) {
-	    break;
-	}
-	Blt_Ps_Format(ps, "%% %s: %s\n", *p, *(p+1));
-    }
-}
-
-/*
- * Parse the lines that define the dimensions of the bitmap, plus the first
- * line that defines the bitmap data (it declares the name of a data variable
- * but doesn't include any actual data).  These lines look something like the
- * following:
- *
- *		#define foo_width 16
- *		#define foo_height 16
- *		#define foo_x_hot 3
- *		#define foo_y_hot 3
- *		static char foo_bits[] = {
- *
- * The x_hot and y_hot lines may or may not be present.  It's important to
- * check for "char" in the last line, in order to reject old X10-style bitmaps
- * that used shorts.
- */
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif /* HAVE_SYS_TIME_H */
-#endif /* TIME_WITH_SYS_TIME */
-
-/*
- *--------------------------------------------------------------------------
- *
- * PicaSwitchProc --
- *
- *	Convert a Tcl_Obj list of 2 or 4 numbers into representing a bounding
- *	box structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *--------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PicaSwitchProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int *picaPtr = (int *)(record + offset);
-    
-    return Blt_Ps_GetPicaFromObj(interp, objPtr, picaPtr);
-}
-
-/*
- *--------------------------------------------------------------------------
- *
- * PadSwitchProc --
- *
- *	Convert a Tcl_Obj list of 2 or 4 numbers into representing a bounding
- *	box structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *--------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PadSwitchProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Blt_Pad *padPtr = (Blt_Pad *)(record + offset);
-    
-    return Blt_Ps_GetPadFromObj(interp, objPtr, padPtr);
-}
-
-/*
- * --------------------------------------------------------------------------
- *
- * PostScriptPreamble --
- *
- *    	The PostScript preamble calculates the needed translation and scaling
- *    	to make image coordinates compatible with PostScript.
- *
- * --------------------------------------------------------------------------
- */
-static int
-PostScriptPreamble(Tcl_Interp *interp, Picture *srcPtr, 
-		   PsExportSwitches *switchesPtr, Blt_Ps ps)
-{
-    PageSetup *setupPtr = &switchesPtr->setup;
-    time_t ticks;
-    char date[200];		/* Hold the date string from ctime() */
-    const char *version;
-    char *newline;
-
-    Blt_Ps_Append(ps, "%!PS-Adobe-3.0 EPSF-3.0\n");
-
-    /* The "BoundingBox" comment is required for EPS files. */
-    Blt_Ps_Format(ps, "%%%%BoundingBox: %d %d %d %d\n",
-	setupPtr->left, setupPtr->paperHeight - setupPtr->top,
-	setupPtr->right, setupPtr->paperHeight - setupPtr->bottom);
-    Blt_Ps_Append(ps, "%%Pages: 0\n");
-
-    version = Tcl_GetVar(interp, "blt_version", TCL_GLOBAL_ONLY);
-    if (version == NULL) {
-	version = "???";
-    }
-    Blt_Ps_Format(ps, "%%%%Creator: (BLT %s Picture)\n", version);
-
-    ticks = time((time_t *) NULL);
-    strcpy(date, ctime(&ticks));
-    newline = date + strlen(date) - 1;
-    if (*newline == '\n') {
-	*newline = '\0';
-    }
-    Blt_Ps_Format(ps, "%%%%CreationDate: (%s)\n", date);
-    Blt_Ps_Append(ps, "%%DocumentData: Clean7Bit\n");
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Append(ps, "%%Orientation: Landscape\n");
-    } else {
-	Blt_Ps_Append(ps, "%%Orientation: Portrait\n");
-    }
-    AddComments(ps, setupPtr->comments);
-    Blt_Ps_Append(ps, "%%EndComments\n\n");
-    Blt_Ps_Append(ps, "%%BeginProlog\n");
-    Blt_Ps_Append(ps, "%%EndProlog\n");
-    Blt_Ps_Append(ps, "%%BeginSetup\n");
-    Blt_Ps_Append(ps, "gsave\n");
-    /*
-     * Set the conversion from PostScript to X11 coordinates.  Scale pica to
-     * pixels and flip the y-axis (the origin is the upperleft corner).
-     */
-    Blt_Ps_VarAppend(ps,
-	"% Transform coordinate system to use X11 coordinates\n"
-	"% 1. Flip y-axis over by reversing the scale,\n", (char *)NULL);
-    Blt_Ps_Append(ps, "1 -1 scale\n");
-    Blt_Ps_VarAppend(ps, 
-	"% 2. Translate the origin to the other side of the page,\n"
-	"%    making the origin the upper left corner\n", (char *)NULL);
-    Blt_Ps_Format(ps, "0 %d translate\n\n", -setupPtr->paperHeight);
-    Blt_Ps_VarAppend(ps, "% User defined page layout\n\n",
-	"% Set color level\n", (char *)NULL);
-    Blt_Ps_Format(ps, "%% Set origin\n%d %d translate\n\n",
-		  setupPtr->left, setupPtr->bottom);
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	Blt_Ps_Format(ps,
-	    "%% Landscape orientation\n0 %g translate\n-90 rotate\n",
-	    ((double)srcPtr->width * setupPtr->scale));
-    }
-    if (setupPtr->scale != 1.0f) {
-	Blt_Ps_Append(ps, "\n% Setting picture scale factor\n");
-	Blt_Ps_Format(ps, " %g %g scale\n", setupPtr->scale, setupPtr->scale);
-    }
-    Blt_Ps_Append(ps, "\n%%EndSetup\n\n");
-    return TCL_OK;
-}
-
-
-static char *
-PbmComment(char *bp) 
-{
-    char *p;
-
-    p = bp;
-    if (*p == '#') {
-	/* Comment: file end of line */
-	while((*p != '\n') && (p != '\0')) {
-	    p++;
-	}
-    }
-    return p;
-}
-
-static inline int 
-PbmGetShort(unsigned char *bp) {
-    return (bp[0] << 8) + bp[1];
-}
-
-static Picture *
-PbmRawData(Pbm *pbmPtr)
-{
-    Picture *destPtr;
-
-    destPtr = Blt_CreatePicture(pbmPtr->width, pbmPtr->height);
-    switch (pbmPtr->bitsPerPixel) {
-    case 1: 
-	{
-	    /* Monochrome */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		int x;
-		Blt_Pixel *dp;
-		
-		dp = destRowPtr;
-		for (x = 0; x < pbmPtr->width; x++) {
-		    dp->Red = dp->Green = dp->Blue = (GetBit(x)) ? 0xFF : 0;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    dp++;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 8: 
-	{
-	    /* Greyscale (1 byte)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp++, dp++) {
-		    dp->Red = dp->Green = dp->Blue = *sp;
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 16: 
-	{ 
-	    /* Greyscale (2 bytes)  */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 2, dp++) {
-		    unsigned int value;
-		    
-		    value = PbmGetShort(sp);
-		    dp->Red = dp->Green = dp->Blue = div257(value);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 24: 
-	{ 
-	    /* Color (1 byte per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 3, dp++) {
-		    dp->Red   = sp[0];
-		    dp->Green = sp[1];
-		    dp->Blue  = sp[2];
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    case 48: 
-	{
-	    /* Color (2 bytes per color component) */
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    
-	    srcRowPtr = pbmPtr->data;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < pbmPtr->height; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-		     sp += 6, dp++) {
-		    unsigned int r, g, b;
-		    
-		    r = PbmGetShort(sp);
-		    g = PbmGetShort(sp+2);
-		    b = PbmGetShort(sp+4);
-		    dp->Red   = div257(r);
-		    dp->Green = div257(g);
-		    dp->Blue  = div257(b);
-		    dp->Alpha = ALPHA_OPAQUE;
-		}
-		srcRowPtr += pbmPtr->bytesPerRow;
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-    }
-    Blt_DBuffer_SetPointer(pbmPtr->dbuffer, pbmPtr->data + 
-			   (pbmPtr->height * pbmPtr->bytesPerRow));
-    return destPtr;
-}
-
-static Blt_Picture
-PbmToPicture(Tcl_Interp *interp, Blt_DBuffer dbuffer)
-{
-    char *bp, *p;
-    const char *type;
-    int isRaw;
-    int version;
-    size_t size, want;
-    unsigned char *start;
-    Pbm pbm;
-
-    size = Blt_DBuffer_BytesLeft(dbuffer);
-    start = Blt_DBuffer_Pointer(dbuffer);
-    if (size < 14) {
-	Tcl_AppendResult(interp, "can't read PBM bitmap: short file", 
-			 (char *)NULL);
-	return NULL;
-    }
-    bp = (char *)start;
-    if ((bp[0] != 'P') || (bp[1] < '1') || (bp[1] > '6')) {
-	Tcl_AppendResult(interp, "unknown PBM bitmap header", (char *)NULL);
-	return NULL;
-    }
-    version = bp[1] - '0';
-    isRaw = (version > 2);
-    switch(version) {	
-    case PBM_PLAIN:		/* P2 */
-    case PBM_RAW:		/* P5 */
-	pbm.bitsPerPixel = 8;
-	break;
-    case PGM_PLAIN:		/* P1 */
-    case PGM_RAW:		/* P4 */
-	pbm.bitsPerPixel = 1;
-	break;
-    case PPM_PLAIN:		/* P3 */
-    case PPM_RAW:		/* P6 */
-	pbm.bitsPerPixel = 24;
-	break;
-    }
-    if (!isspace(bp[2])) {
-	type = pbmFormat[version];
-	Tcl_AppendResult(interp, "no white space after version in pbm header.", 
-			 (char *)NULL);
-	return NULL;
-    }
-    p = bp + 3;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbm.width = strtoul(p, &p, 10);
-    if (pbm.width == 0) {
-	Tcl_AppendResult(interp, "bad width specification ", bp+3, ".", 
-			 (char *)NULL);
-	return NULL;
-    }
-    if (!isspace(*p)) {
-	Tcl_AppendResult(interp, "no white space after width in pbm header.", 
-		(char *)NULL);
-	return NULL;
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    pbm.height = strtoul(p, &p, 10);
-    if (pbm.height == 0) {
-	Tcl_AppendResult(interp, "bad height specification", (char *)NULL);
-	return NULL;
-    }
-    if (!isspace(*p)) {
-	Tcl_AppendResult(interp, "no white space after height in header.", 
-			 (char *)NULL);
-	return NULL;
-    }
-    p++;
-    if (*p == '#') {
-	p = PbmComment(p);
-    }
-    if (pbm.bitsPerPixel != 1) {
-	unsigned int maxval;	/* Maximum intensity allowed. */
-
-	maxval = strtoul(p, &p, 10);
-	if (maxval == 0) {
-	    Tcl_AppendResult(interp, "bad maxval specification", (char *)NULL);
-	    return NULL;
-	}
-	if (!isspace(*p)) {
-	    Tcl_AppendResult(interp, "no white space after maxval pbm header.", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	p++;
-	if (*p == '#') {
-	    p = PbmComment(p);
-	}
-	if (maxval >= USHRT_MAX) {
-	    Tcl_AppendResult(interp, "invalid maxval specification", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	if (maxval > 255) {
-	    pbm.bitsPerPixel <<= 1;  /* 16-bit greyscale or 48 bit color. */
-	}
-    }
-    pbm.data = (unsigned char *)p;
-    pbm.dbuffer = dbuffer;
-    pbm.bytesPerRow = ((pbm.bitsPerPixel * pbm.width) + 7) / 8;
-    want = (pbm.data - start) + pbm.height * pbm.bytesPerRow;
-    if ((isRaw) && (want > Blt_DBuffer_BytesLeft(dbuffer))) {
-	Tcl_AppendResult(interp, "short pbm file", (char *)NULL);
-	return NULL;
-    }	    
-    if (!isRaw) {
-	Tcl_AppendResult(interp, "expected raw pbm file", (char *)NULL);
-	return NULL;
-    }
-    return PbmRawData(&pbm);
-}
-
-#ifdef WIN32
-
-typedef struct {
-    int fd;
-    Blt_DBuffer dbuffer;
-    int lastError;
-} PsWriter;
-
-/*
- *---------------------------------------------------------------------------
- *
- * WriteBufferProc --
- *
- *	This function runs in a separate thread and write the data 
- *	buffer as input to the ghostscript process.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Writes the buffer (PostScript file) to the ghostscript standard
- *	input file descriptor.
- *
- *---------------------------------------------------------------------------
- */
-static DWORD WINAPI
-WriteBufferProc(void *clientData)
-{
-    PsWriter *writerPtr = clientData;
-    const unsigned char *bp;
-    int bytesLeft;
-    HANDLE hFile;
-    DWORD count;
-
-    hFile = (HANDLE)writerPtr->fd;
-    bp = Blt_DBuffer_Bytes(writerPtr->dbuffer);
-    for (bytesLeft = Blt_DBuffer_Length(writerPtr->dbuffer); bytesLeft > 0;
-	 bytesLeft -= count) {
-	if (!WriteFile(hFile, bp, bytesLeft, &count, NULL)) {
-	    writerPtr->lastError = GetLastError();
-	    break;
-	}
-	bp += count;
-    }
-    Blt_DBuffer_Destroy(writerPtr->dbuffer);
-    CloseHandle(hFile);
-    if (bytesLeft > 0) {
-	ExitThread(1);
-    }
-    ExitThread(0);
-    /* NOTREACHED */
-    return 0;
-}
-
-static PsWriter writer;
-
-static int
-WriteToGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    HANDLE hThread;
-    ClientData clientData;
-    DWORD id;
-
-    writer.dbuffer = Blt_DBuffer_Create();
-    Blt_DBuffer_Init(writer.dbuffer);
-    /* Copy the input to a new buffer. */
-    Blt_DBuffer_AppendData(writer.dbuffer, 
-			   Blt_DBuffer_Bytes(dbuffer),
-			   Blt_DBuffer_Length(dbuffer));
-    writer.fd = fd;
-    writer.lastError = 0;
-    clientData = &writer;
-    hThread = CreateThread(
-	NULL,			/* Security attributes */
-	8000,			/* Initial stack size. */
-	WriteBufferProc,	/* Address of thread routine */
-	clientData,		/* One-word of data passed to routine. */
-	0,			/* Creation flags */
-	&id);			/* (out) Will contain Id of new thread. */
-    return (int)hThread;
-}
-
-
-static int
-ReadFromGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    DWORD nBytes;
-    HANDLE hFile;
-    int result;
-
-    Blt_DBuffer_Free(dbuffer);
-    hFile = (HANDLE)fd;
-    nBytes = 0;
-    for (;;) {
-	DWORD nRead;
-	char *bp;
-
-	bp = Blt_DBuffer_Extend(dbuffer, BUFFER_SIZE);
-	if (!ReadFile(hFile, bp, BUFFER_SIZE, &nRead, NULL)) {
-	    DWORD err;
-
-	    err = GetLastError();
-	    if ((err != ERROR_BROKEN_PIPE) && (err != ERROR_HANDLE_EOF)) {
-		Tcl_AppendResult(interp, "error reading from ghostscript: ",
-				 Blt_PrintError(err), (char *)NULL);
-		result = TCL_ERROR;
-		break;
-	    }
-	}
-	if (nRead == 0) {
-	    result = TCL_OK;
-	    break;		/* EOF */
-	}
-	nBytes += nRead;
-	Blt_DBuffer_SetLength(dbuffer, nBytes);
-    }
-    Blt_DBuffer_SetLength(dbuffer, nBytes);
-    CloseHandle(hFile);
-    return result;
-}
-
-#else  /* WIN32 */
-
-static int
-WriteToGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    pid_t child;
-
-    child = fork();
-    if (child == -1) {
-	Tcl_AppendResult(interp, "can't fork process: ", Tcl_PosixError(interp),
-			 (char *)NULL);
-	return 0;
-    } else if (child > 0) {
-	close(fd);
-	return child;
-    } else {
-	const char *bytes;
-	int nWritten, nBytes;
-
-	bytes = (const char *)Blt_DBuffer_Bytes(dbuffer);
-	nBytes = Blt_DBuffer_Length(dbuffer);
-	nWritten = write(fd, bytes, nBytes);
-	close(fd);
-	if (nWritten != nBytes) {
-	    exit(1);
-	}
-	exit(0);
-    }
-}
-
-static int
-ReadFromGhostscript(Tcl_Interp *interp, int fd, Blt_DBuffer dbuffer)
-{
-    int nBytes;
-    
-    Blt_DBuffer_Free(dbuffer);
-    nBytes = 0;
-    for (;;) {
-	char *bp;
-	int nRead;
-
-	bp = (char *)Blt_DBuffer_Extend(dbuffer, BUFFER_SIZE);
-	nRead = read(fd, bp, BUFFER_SIZE);
-	if (nRead == 0) {
-	    break;		/* EOF */
-	} else if (nRead < 0) {
-	    Tcl_AppendResult(interp, "error reading from ghostscript: ",
-			     Tcl_PosixError(interp), (char *)NULL);
-	    return TCL_ERROR;
-	}
-
-	nBytes += nRead;
-	Blt_DBuffer_SetLength(dbuffer, nBytes);
-    }
-    Blt_DBuffer_SetLength(dbuffer, nBytes);
-    close(fd);
-    return TCL_OK;
-}
-
-#endif	/* WIN32 */
-
-static int
-PsToPbm(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer dbuffer,
-    PsImportSwitches *switchesPtr)
-{
-    int in, out;		/* File descriptors for ghostscript
-				 * subprocess. */
-    char string1[200];
-    char string2[200];
-    int nPids;
-    ProcessId *pidPtr;
-    int result;
-    pid_t child;
-    const char **p;
-    const char *args[] = {
-	"gs",			/* Ghostscript command */
-	"-dEPSCrop",		/* (optional) crop page to bbox  */
-	"-dSAFER",		/*  */
-	"-q",			/* Quiet mode.  No GS messages.  */
-	"-sDEVICE=ppmraw",	/* Format is PPM raw */
-	"-dBATCH",		/* Batch mode. No "quit" necessary. */
-	"-sPAPERSIZE=letter",	/* (optional) Specify paper size. */
-	"-r100x100",		/* (optional) Specify DPI of X screen */
-	"-dNOPAUSE",		/*  */
-	"-sOutputFile=-",	/* Output file is stdout. */
-	"-",
-	NULL
-    };
-
-    args[1] = (switchesPtr->crop) ? "-dEPSCrop" : "-dSAFER";
-    {
-	Tk_Window tkwin;
-	unsigned int xdpi, ydpi;
-
-	tkwin = Tk_MainWindow(interp);
-	if (switchesPtr->dpi > 0) {
-	    xdpi = ydpi = switchesPtr->dpi;
-	} else {
-	    Blt_ScreenDPI(tkwin, &xdpi, &ydpi);
-	}
-	sprintf(string1, "-r%dx%d", xdpi, ydpi);
-	args[7] = string1;
-    }
-    if (switchesPtr->paperSize != NULL) {
-	sprintf(string2, "-sPAPERSIZE=%s", switchesPtr->paperSize);
-	args[6] = string2;
-    }
-    {
-	int i;
-	Tcl_Obj *objv[11];
-	int objc = 11;
-
-	for (i = 0, p = args; *p != NULL; p++, i++) {
-	    objv[i] = Tcl_NewStringObj(*p, -1);
-	    Tcl_IncrRefCount(objv[i]);
-	}
-	nPids = Blt_CreatePipeline(interp, objc, objv, &pidPtr, &in, &out,
-		(int *)NULL);
-	for (i = 0; i < objc; i++) {
-	    Tcl_DecrRefCount(objv[i]);
-	}
-    }
-    if (nPids < 0) {
-	return TCL_ERROR;
-    }
-    Tcl_DetachPids(nPids, (Tcl_Pid *)pidPtr);
-    child = WriteToGhostscript(interp, in, dbuffer);
-    if (child == 0) {
-	return TCL_ERROR;
-    }
-    result = ReadFromGhostscript(interp, out, dbuffer);
-#ifdef WIN32
-    CloseHandle((HANDLE)child);
-#endif
-    Tcl_ReapDetachedProcs();
-#ifdef notdef
-    Blt_DBuffer_SaveFile(interp, "junk.ppm", dbuffer);
-#endif
-    if (result != TCL_OK) {
-	Blt_DBuffer_Free(dbuffer);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static Blt_Chain
-PsToPicture(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer dbuffer,
-    PsImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-
-    if (PsToPbm(interp, fileName, dbuffer, switchesPtr) != TCL_OK) {
-	return NULL;
-    }
-    /* Can be more than one image in buffer. Save each picture in a list. */
-    chain = Blt_Chain_Create();
-    while (Blt_DBuffer_BytesLeft(dbuffer) > 0) {
-	Blt_Picture picture;
-
-	picture = PbmToPicture(interp, dbuffer);
-	if (picture == NULL) {
-	    Blt_Chain_Destroy(chain);
-	    return NULL;
-	}
-	Blt_Chain_Append(chain, picture);
-    }
-    return chain;
-}
-
-static int
-PictureToPs(Tcl_Interp *interp, Blt_Picture original, Blt_Ps ps,
-	    PsExportSwitches *switchesPtr)
-{
-    Picture *srcPtr;
-    int w, h;
-
-    srcPtr = original;
-    w = srcPtr->width, h = srcPtr->height;
-    Blt_Ps_ComputeBoundingBox(&switchesPtr->setup, w, h);
-    if (PostScriptPreamble(interp, srcPtr, switchesPtr, ps) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_ClassifyPicture(srcPtr); 
-    if (!Blt_PictureIsOpaque(srcPtr)) {
-	Blt_Picture background;
-
-	background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	Blt_BlankPicture(background, &switchesPtr->bg);
-	Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	srcPtr = background;
-    }
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(srcPtr);
-    }
-    Blt_Ps_Rectangle(ps, 0, 0, srcPtr->width, srcPtr->height);
-    Blt_Ps_Append(ps, "gsave clip\n\n");
-    Blt_Ps_DrawPicture(ps, srcPtr, 0, 0);
-    Blt_Ps_VarAppend(ps, "\n",
-	"% Unset clipping\n",
-	"grestore\n\n", (char *)NULL);
-    Blt_Ps_VarAppend(ps,
-	"showpage\n",
-	"%Trailer\n",
-	"grestore\n",
-	"end\n",
-	"%EOF\n", (char *)NULL);
-    if (srcPtr != original) {
-	Blt_Free(srcPtr);
-    }
-    return TCL_OK;
-}
-
-static int 
-IsPs(Blt_DBuffer dbuffer)
-{
-    unsigned char *bp;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    if (Blt_DBuffer_BytesLeft(dbuffer) < 4) {
-	return FALSE;
-    }
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    return (strncmp("%!PS", (char *)bp, 4) == 0);
-}
-
-static Blt_Chain
-ReadPs(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    Blt_Chain chain;
-    PsImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.crop = TRUE;
-    chain = PsToPicture(interp, fileName, dbuffer, &switches);
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return chain;
-}
-
-static Tcl_Obj *
-WritePs(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Blt_Ps ps;
-    PsExportSwitches switches;
-    Tcl_Obj *objPtr;
-    int result;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.setup.reqPaperHeight = 792; /* 11 inches */
-    switches.setup.reqPaperWidth = 612; /* 8.5 inches */
-    switches.setup.level = 1;
-    switches.setup.xPad.side1 = 72;
-    switches.setup.xPad.side2 = 72;
-    switches.setup.yPad.side1 = 72;
-    switches.setup.yPad.side2 = 72;
-    switches.setup.flags = 0;
-    ps = Blt_Ps_Create(interp, &switches.setup);
-    result = PictureToPs(interp, picture, ps, &switches);
-    objPtr = NULL;
-    if (result == TCL_OK) {
-	const char *string;
-	int length;
-
-	string = Blt_Ps_GetValue(ps, &length);
-	objPtr = Tcl_NewStringObj(string, length);
-    }
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_Ps_Free(ps);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportPs(
-    Tcl_Interp *interp, 
-    int objc,
-    Tcl_Obj *const *objv,
-    const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer dbuffer;
-    PsImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.crop = TRUE;
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	return NULL;
-    }
-    chain = NULL;
-    dbuffer = Blt_DBuffer_Create();
-    if (switches.dataObjPtr != NULL) {
-	int nBytes;
-
-	string = Tcl_GetStringFromObj(switches.dataObjPtr, &nBytes);
-	Blt_DBuffer_AppendData(dbuffer, (unsigned char *)string, nBytes);
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	if (Blt_DBuffer_LoadFile(interp, string, dbuffer) != TCL_OK) {
-	    Blt_DBuffer_Destroy(dbuffer);
-	    return NULL;
-	}
-	*fileNamePtr = string;
-    }
-    chain = PsToPicture(interp, string, dbuffer, &switches);
-    Blt_DBuffer_Destroy(dbuffer);
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return chain;
-}
-
-static int
-ExportPs(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    PsExportSwitches switches;
-    Blt_Ps ps;
-    int result;
-    Blt_Picture picture;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.setup.reqPaperHeight = 792; /* 11 inches */
-    switches.setup.reqPaperWidth = 612; /* 8.5 inches */
-    switches.setup.level = 1;
-    switches.setup.xPad.side1 = 72;
-    switches.setup.xPad.side2 = 72;
-    switches.setup.yPad.side1 = 72;
-    switches.setup.yPad.side2 = 72;
-    switches.setup.flags = 0;
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data switch.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    ps = Blt_Ps_Create(interp, &switches.setup);
-    result = PictureToPs(interp, picture, ps, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_Ps_SaveFile(interp, ps, fileName);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-	int length;
-	const char *string;
-
-	string = Blt_Ps_GetValue(ps, &length);
-	objPtr = Tcl_NewStringObj(string, length);
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, objPtr, 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	const char *string;
-	int length;
-
-	string = Blt_Ps_GetValue(ps, &length);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), string, length);
-    }  
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_Ps_Free(ps);
-    return result;
-}
-
-int 
-Blt_PicturePsInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_ps", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"ps",			/* Name of format. */
-	IsPs,			/* Discovery routine. */
-	ReadPs,			/* Import format procedure. */
-	WritePs,		/* Export format procedure. */
-	ImportPs,		/* Import format procedure. */
-	ExportPs);		/* Export format procedure. */
-}
diff --git a/blt3.0/src/bltPictTif.c b/blt3.0/src/bltPictTif.c
deleted file mode 100644
index c72ccdc..0000000
--- a/blt3.0/src/bltPictTif.c
+++ /dev/null
@@ -1,874 +0,0 @@
-
-/*
- * bltPictTif.c --
- *
- * This module implements TIF file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#ifdef HAVE_LIBTIF
-#include <tcl.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include <bltChain.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-#include <bltAlloc.h>
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-#if defined(WIN32) || defined(MACOSX)
-#include <setjmp.h>
-#endif
-
-typedef struct _Blt_Picture Picture;
-
-#include <tiffio.h>
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int compress;
-    int index;
-} TifExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-} TifImportSwitches;
-
-static Blt_SwitchParseProc CompressSwitch;
-static Blt_SwitchCustom compressSwitch = {
-    CompressSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-compress", "type",
-	Blt_Offset(TifExportSwitches, compress), 0, 0, &compressSwitch},
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(TifExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(TifExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(TifExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(TifImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(TifImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureTifInit;
-extern const char *Blt_Itoa(int);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CompressSwitch --
- *
- *	Convert a Tcl_Obj representing a TIFF compression name.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static const char *compressNames[] =  {
-    "lzw",			/* Lempel-Ziv & Welch */
-    "ojpeg",			/* !6.0 JPEG */
-    "jpeg",			/* %JPEG DCT compression */
-    "next",			/* NeXT 2-bit RLE */
-    "packbits",			/* Macintosh RLE */
-    "thunderscan",		/* ThunderScan RLE */
-    "pixarfilm",		/* Pixar companded 10bit LZW */
-    "pixarlog",			/* Pixar companded 11bit ZIP */
-    "deflate",			/* Deflate compression */
-    "adobe_deflate",		/* Adobe's deflate */
-    "dcs",			/* Kodak DCS encoding */
-    "sgilog",			/* SGI Log Luminance RLE */
-    "sgilog24",			/* SGI Log 24-bit packed */
-    NULL
-};
-
-static int nCompressNames = sizeof(compressNames) / sizeof(char *);
-
-/*ARGSUSED*/
-static int
-CompressSwitch(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to return results. */
-    const char *switchName,		/* Not used. */
-    Tcl_Obj *objPtr,			/* String representation */
-    char *record,			/* Structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int *compressPtr = (int *)(record + offset);
-    int i;
-    char *string;
-    char c;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if (c == '\0') {
-	*compressPtr = 0;
-	return TCL_OK;
-    } 
-    for (i = 0; i < nCompressNames; i++) {
-	if ((c == compressNames[i][0]) && 
-	    (strcasecmp(string, compressNames[i]) == 0)) {
-	    *compressPtr = i + 1;
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "unknown TIFF compression mode \"", string, "\"",
-		     (char *) NULL);
-    return TCL_ERROR;
-}
-
-
-static tsize_t
-TifRead(thandle_t handle, tdata_t out, tsize_t nWanted)
-{
-    Blt_DBuffer dbuffer = (Blt_DBuffer)handle;
-
-    if (Blt_DBuffer_BytesLeft(dbuffer) < nWanted) {
-	nWanted = Blt_DBuffer_BytesLeft(dbuffer);
-    }
-    if (nWanted > 0) {
-	memcpy(out, Blt_DBuffer_Pointer(dbuffer), nWanted);
-	Blt_DBuffer_IncrCursor(dbuffer, nWanted);
-    }
-    return nWanted;
-}
-
-static toff_t
-TifSeek(thandle_t handle, toff_t offset, int whence)
-{
-    Blt_DBuffer dbuffer = (Blt_DBuffer)handle;
-
-    if (whence == SEEK_CUR) {
-	offset += Blt_DBuffer_Cursor(dbuffer);
-    } else if (whence == SEEK_END) {
-	offset += Blt_DBuffer_Length(dbuffer);
-    }
-    if (offset < 0) {
-	return -1;
-    }
-    if (offset > Blt_DBuffer_Size(dbuffer)) {
-	/* Attempting to seek past the end of the current
-	 * buffer. Resize the buffer */
-	Blt_DBuffer_Resize(dbuffer, offset);
-    }
-    Blt_DBuffer_SetCursor(dbuffer, offset);
-    return (toff_t) Blt_DBuffer_Cursor(dbuffer);
-}
-
-static toff_t
-TifSize(thandle_t handle)
-{
-    Blt_DBuffer dbuffer = (Blt_DBuffer)handle;
-
-    return Blt_DBuffer_Length(dbuffer);
-}
-
-static int
-TifMapFile(thandle_t handle, tdata_t *data, toff_t *offsetPtr)
-{
-    return 0;
-}
-
-static void
-TifUnmapFile(thandle_t handle, tdata_t data, toff_t offset)
-{
-}
-
-static int
-TifClose(thandle_t handle)
-{
-    return 0;
-}
-
-
-static tsize_t
-TifWrite(thandle_t handle, tdata_t out, tsize_t nBytes)
-{
-    Blt_DBuffer dbuffer = (Blt_DBuffer)handle;
-    unsigned int needed;
-
-    needed = Blt_DBuffer_Cursor(dbuffer) + nBytes;
-    if (needed > Blt_DBuffer_Size(dbuffer)) {
-	if (!Blt_DBuffer_Resize(dbuffer, needed)) {
-	    return -1;
-	}
-    }
-    memcpy(Blt_DBuffer_Pointer(dbuffer), out, nBytes);
-    Blt_DBuffer_IncrCursor(dbuffer, nBytes);
-    if (Blt_DBuffer_Cursor(dbuffer) > Blt_DBuffer_Length(dbuffer)) {
-	Blt_DBuffer_SetLength(dbuffer, Blt_DBuffer_Cursor(dbuffer));
-    }
-    return nBytes;
-}
-
-typedef struct {
-    Tcl_DString errors;
-    Tcl_DString warnings;
-    int nWarnings, nErrors;
-} TifMessage;
-
-static TifMessage *tifMessagePtr;
-
-static void 
-TifError(const char *routine, const char *fmt, va_list ap)
-{
-    char string[BUFSIZ+4];
-    int length;
-
-    length = vsnprintf(string, BUFSIZ, fmt, ap);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&tifMessagePtr->errors, string, -1);
-    tifMessagePtr->nErrors++;
-}
-
-/* warnings are not processed in TCL */
-static void
-TifWarning(const char *routine, const char *fmt, va_list ap)
-{
-    char string[BUFSIZ+4];
-    int length;
-
-    length = vsnprintf(string, BUFSIZ, fmt, ap);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&tifMessagePtr->warnings, string, -1);
-    Tcl_DStringAppend(&tifMessagePtr->warnings, "\n", -1);
-    tifMessagePtr->nWarnings++;
-}
-
-static int
-TifReadImage(Tcl_Interp *interp, TIFF *tifPtr, Blt_Chain chain)
-{
-    int w, h, nPixels;
-    uint32 *srcBits, *sp;
-    Picture *destPtr;
-    Blt_Pixel *destRowPtr;
-    int y;
-
-    TIFFGetField(tifPtr, TIFFTAG_IMAGEWIDTH, &w);
-    TIFFGetField(tifPtr, TIFFTAG_IMAGELENGTH, &h);
-    nPixels = w * h;
-    srcBits = _TIFFmalloc(sizeof(uint32) * nPixels);
-    if (srcBits == NULL) {
-	Tcl_AppendResult(interp, "can't allocate ", Blt_Itoa(nPixels), 
-		" buffer for TIF image", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (!TIFFReadRGBAImage(tifPtr, w, h, srcBits, /*stopOnError*/0)) {
-	Tcl_AppendResult(interp, "can't read image in directory", 
-		(char *)NULL);
-	_TIFFfree(srcBits);
-	return TCL_ERROR;
-    }	
-    destPtr = Blt_CreatePicture(w, h);
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * (h - 1));
-    sp = srcBits;
-    for (y = h - 1; y >= 0; y--) {
-	Blt_Pixel *dp, *dend;
-
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-	    dp->Red   = TIFFGetR(*sp);
-	    dp->Green = TIFFGetG(*sp);
-	    dp->Blue  = TIFFGetB(*sp);
-	    dp->Alpha = TIFFGetA(*sp);
-	    sp++;
-	}
-	destRowPtr -= destPtr->pixelsPerRow;
-    }
-    Blt_Chain_Append(chain, destPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsTif --
- *
- *      Attempts to parse a TIF file header.
- *
- * Results:
- *      Returns 1 is the header is TIF and 0 otherwise.  Note that the
- *      validity of the header contents is not checked here.  That's done in
- *      TifToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsTif(Blt_DBuffer dbuffer)
-{
-    unsigned char *bp;
-    int bool;
-
-    Blt_DBuffer_ResetCursor(dbuffer);
-    bp = Blt_DBuffer_Pointer(dbuffer);
-    bool = (((bp[0] == 'M') && (bp[1] == 'M')) || 
-	    ((bp[0] == 'I') && (bp[1] == 'I')));
-    return bool;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TifToPicture --
- *
- *      Reads a TIFF file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such as the
- *      designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-TifToPicture(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer dbuffer,
-    TifImportSwitches *switchesPtr)
-{
-    Blt_Chain chain;
-    TIFF *tifPtr;
-    TIFFErrorHandler oldErrorHandler, oldWarningHandler;
-    TifMessage message;
-
-    message.nWarnings = message.nErrors = 0;
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    Tcl_DStringAppend(&message.errors, "error reading \"", -1);
-    Tcl_DStringAppend(&message.errors, fileName, -1);
-    Tcl_DStringAppend(&message.errors, "\": ", -1);
-    tifMessagePtr = &message;
-
-    oldErrorHandler = TIFFSetErrorHandler(TifError);
-    oldWarningHandler = TIFFSetWarningHandler(TifWarning);
-
-    chain = NULL;
-    tifPtr = TIFFClientOpen(fileName, "r", (thandle_t)dbuffer,
-	TifRead,		/* TIFFReadProc */
-	TifWrite, 		/* TIFFWriteProc */
-	TifSeek, 		/* TIFFSeekProc */
-	TifClose, 		/* TIFFCloseProc */
-	TifSize, 		/* TIFFSizeProc */
-	TifMapFile, 		/* TIFFMapFileProc */
-	TifUnmapFile);		/* TIFFUnmapFileProc */
-    if (tifPtr == NULL) {
-	goto bad;
-    }
-    chain = Blt_Chain_Create();
-    do {
-	if (TifReadImage(interp, tifPtr, chain) != TCL_OK) {
-	    goto bad;
-	}
-    } while (TIFFReadDirectory(tifPtr));
- bad:
-    if (tifPtr != NULL) {
-	TIFFClose(tifPtr);
-    }
-    TIFFSetErrorHandler(oldErrorHandler);
-    TIFFSetWarningHandler(oldWarningHandler);
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "TIF_READ_WARNINGS", 
-		Tcl_DStringValue(&message.warnings), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    if (message.nErrors > 0) {
-	Tcl_AppendResult(interp, Tcl_DStringValue(&message.errors), 
-			 (char *)NULL); 
-    }
-    Tcl_DStringFree(&message.errors);
-    return chain;
-}
-
-static int tifCompressionSchemes[] = {
-    COMPRESSION_NONE,
-
-#ifdef LZW_SUPPORT
-    COMPRESSION_LZW,		/* Lempel-Ziv & Welch */
-#else 
-    COMPRESSION_NONE,
-#endif
-
-#ifdef OJPEG_SUPPORT
-    COMPRESSION_OJPEG,		/* !6.0 JPEG */
-#else 
-    COMPRESSION_NONE,
-#endif /* OJPEG_SUPPORT */
-
-#ifdef JPEG_SUPPORT
-    COMPRESSION_JPEG,		/* %JPEG DCT compression */
-#else 
-    COMPRESSION_NONE,
-#endif /* JPEG_SUPPORT */
-
-#ifdef NEXT_SUPPORT
-    COMPRESSION_NEXT,		/* NeXT 2-bit RLE */
-#else 
-    COMPRESSION_NONE,
-#endif /* NEXT_SUPPORT */
-
-#ifdef PACKBITS_SUPPORT
-    COMPRESSION_PACKBITS,	/* Macintosh RLE */
-#else 
-    COMPRESSION_NONE,
-#endif /* PACKBITS_SUPPORT */
-
-#ifdef THUNDER_SUPPORT
-    COMPRESSION_THUNDERSCAN,	/* ThunderScan RLE */
-#else 
-    COMPRESSION_NONE,
-#endif /* THUNDER_SUPPORT */
-
-    COMPRESSION_PIXARFILM,	/* Pixar 10-bit LZW */
-
-#ifdef PIXARLOG_SUPPORT
-    COMPRESSION_PIXARLOG,	/* Pixar 11-bit ZIP */
-#else 
-    COMPRESSION_NONE,
-#endif /* PIXARLOG_SUPPORT */
-
-#ifdef ZIP_SUPPORT
-    COMPRESSION_DEFLATE,	/* Deflate compression */
-#else 
-    COMPRESSION_NONE,
-#endif /* ZIP_SUPPORT */
-
-#ifdef ADOBE_SUPPORT
-    COMPRESSION_ADOBE_DEFLATE,	/* Adobe's deflate */
-#else
-    COMPRESSION_NONE,
-#endif /* ADOBE_SUPPORT */
-    COMPRESSION_DCS,		/* Kodak DCS encoding */
-
-#ifdef SGILOG_SUPPORT
-    COMPRESSION_SGILOG,		/* SGI Log Luminance RLE */
-    COMPRESSION_SGILOG24,	/* SGI Log 24-bit packed */
-#else 
-    COMPRESSION_NONE,
-    COMPRESSION_NONE,
-#endif /* SGILOG_SUPPORT */
-
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToTif --
- *
- *      Writes a TIFF format image to the provided data buffer.
- *
- * Results:
- *      A standard TCL result.  If an error occured, TCL_ERROR is
- *	returned and an error message will be place in the interpreter
- *	result. Otherwise, the data sink will contain the binary
- *	output of the image.
- *
- * Side Effects:
- *	Memory is allocated for the data sink.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-PictureToTif(Tcl_Interp *interp, Blt_Picture picture, Blt_DBuffer dbuffer,
-	     TifExportSwitches *switchesPtr)
-{
-    TIFF *tifPtr;
-    TIFFErrorHandler oldErrorHandler, oldWarningHandler;
-    TifMessage message;
-    int photometric, samplesPerPixel;
-    int compress, result, nColors;
-    Picture *srcPtr;
-
-    compress = tifCompressionSchemes[switchesPtr->compress];
-    if (compress == COMPRESSION_NONE) {
-	fprintf(stderr, "not compressing TIFF output\n");
-    }
-#ifdef notdef
-    if (!TIFFIsCODECConfigured((unsigned short int)compress)) {
-	compress = COMPRESSION_NONE;
-    }	
-#endif
-    srcPtr = picture;
-
-    Tcl_DStringInit(&message.errors);
-    Tcl_DStringInit(&message.warnings);
-    Tcl_DStringAppend(&message.errors, "error writing TIF output: ", -1);
-    tifMessagePtr = &message;
-    message.nErrors = message.nWarnings = 0;
-
-    oldErrorHandler = TIFFSetErrorHandler(TifError);
-    oldWarningHandler = TIFFSetWarningHandler(TifWarning);
-
-    tifPtr = TIFFClientOpen("data buffer", "w", (thandle_t)dbuffer,
-	TifRead,		/* TIFFReadWriteProc */
-	TifWrite, 		/* TIFFReadWriteProc */
-	TifSeek, 		/* TIFFSeekProc */
-	TifClose, 		/* TIFFCloseProc */
-	TifSize, 		/* TIFFSizeProc */
-	TifMapFile, 		/* TIFFMapFileProc */
-	TifUnmapFile);		/* TIFFUnmapFileProc */
-    if (tifPtr == NULL) {
-	Tcl_AppendResult(interp, "can't register TIF procs: ", (char *)NULL);
-	return TCL_ERROR;
-    }
-    nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-    if (Blt_PictureIsColor(srcPtr)) {
-	samplesPerPixel = (Blt_PictureIsOpaque(srcPtr)) ? 3 : 4;
-	photometric = PHOTOMETRIC_RGB;
-    } else {
-	if (!Blt_PictureIsOpaque(srcPtr)) {
-	    Blt_Picture background;
-	    Blt_Pixel white;
-	    /* Blend picture with solid color background. */
-	    background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	    white.u32 = 0xFFFFFFFF;
-	    Blt_BlankPicture(background, &white); /* White background. */
-	    Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	    srcPtr = background;
-	}
-	samplesPerPixel = 1;
-	photometric = PHOTOMETRIC_MINISBLACK;
-    }
-    TIFFSetField(tifPtr, TIFFTAG_BITSPERSAMPLE,    8);
-    TIFFSetField(tifPtr, TIFFTAG_COMPRESSION, (unsigned short int)compress);
-    TIFFSetField(tifPtr, TIFFTAG_IMAGELENGTH,      srcPtr->height);
-    TIFFSetField(tifPtr, TIFFTAG_IMAGEWIDTH,       srcPtr->width);
-    TIFFSetField(tifPtr, TIFFTAG_ORIENTATION,      ORIENTATION_TOPLEFT);
-    TIFFSetField(tifPtr, TIFFTAG_PHOTOMETRIC,      photometric);
-    TIFFSetField(tifPtr, TIFFTAG_PLANARCONFIG,     PLANARCONFIG_CONTIG);
-    TIFFSetField(tifPtr, TIFFTAG_RESOLUTIONUNIT,   2);
-    TIFFSetField(tifPtr, TIFFTAG_ROWSPERSTRIP,     srcPtr->height);
-    TIFFSetField(tifPtr, TIFFTAG_SAMPLESPERPIXEL,  samplesPerPixel);
-    TIFFSetField(tifPtr, TIFFTAG_SOFTWARE,         TIFFGetVersion());
-    TIFFSetField(tifPtr, TIFFTAG_XRESOLUTION,      300.0f);
-    TIFFSetField(tifPtr, TIFFTAG_YRESOLUTION,      300.0f);
-#ifdef WORD_BIGENDIAN
-    TIFFSetField(tifPtr, TIFFTAG_FILLORDER,        FILLORDER_MSB2LSB);
-#else
-    TIFFSetField(tifPtr, TIFFTAG_FILLORDER,        FILLORDER_LSB2MSB);
-#endif
-    result = -1;
-    {
-	Blt_Pixel *srcRowPtr;
-	int destBitsSize;
-	int y;
-	unsigned char *destBits;
-	unsigned char *dp;
-
-	destBitsSize = srcPtr->width * srcPtr->height * sizeof(uint32);
-	destBits = (unsigned char *)_TIFFmalloc(destBitsSize);
-
-	if (destBits == NULL) {
-	    TIFFError("tiff", "can't allocate space for TIF buffer");
-	    TIFFClose(tifPtr);
-	    return TCL_ERROR;
-	}
-	dp = destBits;
-	srcRowPtr = srcPtr->bits;
-	switch (samplesPerPixel) {
-	case 4:
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp;
-		int x;
-		
-		sp = srcRowPtr;
-		for (x = 0; x < srcPtr->width; x++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Blue;
-		    dp[3] = sp->Alpha;
-		    dp += 4, sp++;
-		}
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 3:				/* RGB, 100% opaque image. */
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp;
-		int x;
-		
-		sp = srcRowPtr;
-		for (x = 0; x < srcPtr->width; x++) {
-		    dp[0] = sp->Red;
-		    dp[1] = sp->Green;
-		    dp[2] = sp->Blue;
-		    dp += 3, sp++;
-		}
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 1:
-	    for (y = 0; y < srcPtr->height; y++) {
-		Blt_Pixel *sp;
-		int x;
-		
-		sp = srcRowPtr;
-		for (x = 0; x < srcPtr->width; x++) {
-		    *dp++ = sp->Red;
-		    sp++;
-		}
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	}
-	result = TIFFWriteEncodedStrip(tifPtr, 0, destBits, destBitsSize);
-	if (result < 0) {
-	    Tcl_AppendResult(interp, "error writing TIFF encoded strip",
-			     (char *)NULL);
-	}
-	_TIFFfree(destBits);
-    }
-    TIFFClose(tifPtr);
-    if (result == -1) {
-	Blt_DBuffer_Free(dbuffer);
-    }
-    TIFFSetErrorHandler(oldErrorHandler);
-    TIFFSetWarningHandler(oldWarningHandler);
-    if (message.nWarnings > 0) {
-	Tcl_SetErrorCode(interp, "PICTURE", "TIF_WRITE_WARNINGS", 
-		Tcl_DStringValue(&message.warnings), (char *)NULL);
-    } else {
-	Tcl_SetErrorCode(interp, "NONE", (char *)NULL);
-    }
-    Tcl_DStringFree(&message.warnings);
-    if (message.nErrors > 0) {
-	Tcl_DStringResult(interp, &message.errors);
-    }
-    Tcl_DStringFree(&message.errors);
-    if (srcPtr != picture) {
-	Blt_FreePicture(srcPtr);
-    }
-    return (result == -1) ? TCL_ERROR : TCL_OK;
-}
-
-
-static Blt_Chain
-ReadTif(Tcl_Interp *interp, const char *fileName, Blt_DBuffer dbuffer)
-{
-    TifImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return TifToPicture(interp, fileName, dbuffer, &switches);
-}
-
-static Tcl_Obj *
-WriteTif(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Tcl_Obj *objPtr;
-    Blt_DBuffer dbuffer;
-    TifExportSwitches switches;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    dbuffer = Blt_DBuffer_Create();
-    objPtr = NULL;
-    if (PictureToTif(interp, picture, dbuffer, &switches) == TCL_OK) {
-	char *bytes;
-
-	bytes = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (bytes != NULL) {
-	    objPtr = Tcl_NewStringObj(bytes, -1);
-	    Blt_Free(bytes);
-	}
-    }
-    Blt_DBuffer_Destroy(dbuffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportTif(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, 
-	  const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer dbuffer;
-    TifImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	unsigned char *bytes;
-	int nBytes;
-	
-	bytes = Tcl_GetByteArrayFromObj(switches.dataObjPtr, &nBytes);
-	if (Blt_IsBase64(bytes, nBytes)) {
-	    if (Blt_DBuffer_DecodeBase64(interp, string, nBytes, dbuffer) 
-		!= TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    Blt_DBuffer_AppendData(dbuffer, bytes, nBytes);
-	} 
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	*fileNamePtr = string;
-	if (Blt_DBuffer_SaveFile(interp, string, dbuffer) != TCL_OK) {
-	    goto error;
-	}
-    }
-    chain = TifToPicture(interp, string, dbuffer, &switches);
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return chain;
-}
-
-static int
-ExportTif(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Blt_DBuffer dbuffer;
-    Blt_Picture picture;
-    TifExportSwitches switches;
-    int result;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    dbuffer = Blt_DBuffer_Create();
-    result = PictureToTif(interp, picture, dbuffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-
-    /* Write the TIF data to file or convert it to a base64 string. */
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, dbuffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, 
-		Blt_DBuffer_ByteArrayObj(dbuffer), 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	char *string;
-
-	string = Blt_DBuffer_EncodeBase64(interp, dbuffer);
-	if (string != NULL) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(string, -1);
-	    Blt_Free(string);
-	    Tcl_SetObjResult(interp, objPtr);
-	}
-	result = (string == NULL) ? TCL_ERROR : TCL_OK;
-    }
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(dbuffer);
-    return result;
-}
-
-int 
-Blt_PictureTifInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_tif", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"tif",			/* Name of format. */
-	IsTif,			/* Discovery routine. */
-	ReadTif,		/* Read format procedure. */
-	WriteTif,		/* Write format procedure. */
-	ImportTif,		/* Import format procedure. */
-	ExportTif);		/* Export format procedure. */
-}
-
-#endif /* HAVE_LIBTIF */
diff --git a/blt3.0/src/bltPictXbm.c b/blt3.0/src/bltPictXbm.c
deleted file mode 100644
index 38c525c..0000000
--- a/blt3.0/src/bltPictXbm.c
+++ /dev/null
@@ -1,719 +0,0 @@
-
-/*
- * bltPictXbm.c --
- *
- * This module implements XBM file format conversion routines for
- * the picture image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#include <tcl.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#define UCHAR(c) ((unsigned char) (c))
-#define ISASCII(c) (UCHAR(c)<=0177)
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureXbmInit;
-
-extern char *Blt_Itoa(int);
-extern char *Blt_InitHexTable(unsigned char *);
-
-#define TRUE 	1
-#define FALSE 	0
-
-typedef struct _Blt_Picture Picture;
-
-#include <ctype.h>
-
-typedef struct {
-    int hotX, hotY;
-    int width, height;
-    int version;
-} Xbm;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    Blt_Pixel bg, fg;		/* Colors for XBM image format. */
-} XbmImportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    Blt_Pixel bg;
-    int index;
-} XbmExportSwitches;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-bg", "color",
-	Blt_Offset(XbmImportSwitches, bg), 0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(XbmImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_CUSTOM, "-fg", "color",
-	Blt_Offset(XbmImportSwitches, fg), 0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(XbmImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-bg", "color",
-	Blt_Offset(XbmExportSwitches, bg), 0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(XbmExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(XbmExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(XbmExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-
-/*
- * Parse the lines that define the dimensions of the bitmap,
- * plus the first line that defines the bitmap data (it declares
- * the name of a data variable but doesn't include any actual
- * data).  These lines look something like the following:
- *
- *		#define foo_width 16
- *		#define foo_height 16
- *		#define foo_x_hot 3
- *		#define foo_y_hot 3
- *		static char foo_bits[] = {
- *
- * The x_hot and y_hot lines may or may not be present.  It's
- * important to check for "char" in the last line, in order to
- * reject old X10-style bitmaps that used shorts.
- */
-
-static int
-XbmHeader(Blt_DBuffer data, Xbm *xbmPtr)
-{
-    unsigned char *line, *next;
-
-    xbmPtr->width = xbmPtr->height = 0;
-    xbmPtr->hotX = xbmPtr->hotY = -1;
-    xbmPtr->version = 11;
-
-    Blt_DBuffer_ResetCursor(data);
-    for (line = Blt_DBuffer_Pointer(data); *line != '\0'; line = next) {
-#define XBM_MAX_LINE 1023
-	char substring[XBM_MAX_LINE+1];
-	char *s;
-	int value;
-
-	/* Find the start of the next line */
-	if ((*line == '\n') || (*line == '\r')) {
-	    line++;
-	}
-	next = line;
-	while ((*next != '\r') && (*next != '\n') && (*next != '\0')) {
-	    if (*next & !ISASCII(*next)) {
-		return FALSE;
-	    }
-	    next++;
-	}
-	/* Verify that we won't overrun the buffer with "sscanf". */
-	if ((next - line) > XBM_MAX_LINE) {
-	    return FALSE;
-	}
-	s = (char *)line;
-	if (sscanf(s, "#define %s %d", substring,  &value) == 2) {
-	    char *name;
-	    char c;
-	    char *p;
-
-	    p = strrchr(substring, '_');
-	    if (p == NULL) {
-		name = substring;
-	    } else {
-		name = p + 1;
-	    }
-	    c = name[0];
-	    if ((c == 'w') && (strcmp("width", name) == 0)) {
-		xbmPtr->width = value;
-	    } else if ((c == 'h') && (strcmp("height", name) == 0)){
-		xbmPtr->height = value;
-	    } else if ((c == 'h') && (strcmp("hot", name) == 0)) {
-		name -= 2;
-		if (name > substring) {
-		    if (name[1] == '_') {
-			if (name[0] == 'x') {
-			    xbmPtr->hotX = value;
-			} else if (name[0] == 'y') {
-			    xbmPtr->hotY = value;
-			}
-		    }
-		}
-	    }
-	    continue;
-	} else if (sscanf(s, "static short %s = {", substring) == 1) {
-	    xbmPtr->version = 10;
-	} else if (sscanf(s,"static unsigned char %s = {", substring) == 1) {
-	    xbmPtr->version = 11;
-	} else if (sscanf(s, "static char %s = {", substring) == 1) {
-	    xbmPtr->version = 11;
-	} else {
-	    continue;
-	}
-	if (*next == '\r') {
-	    next++;
-	}
-	Blt_DBuffer_SetPointer(data, next);
-	return TRUE;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XbmGetHexValue --
- *
- *	Converts the hexadecimal string into an unsigned integer
- *	value.  The hexadecimal string need not have a leading "0x".
- *
- * Results:
- *	Returns a standard TCL result. If the conversion was
- *	successful, TCL_OK is returned, otherwise TCL_ERROR.
- *
- * Side Effects:
- * 	If the conversion fails, interp->result is filled with an
- *	error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-XbmGetHexValue(const char *string, int *valuePtr)
-{
-    static unsigned char hexTable[256];
-    static int initialized = 0;
-    const char *s;
-    int accum;
-
-    if (!initialized) {
-	Blt_InitHexTable(hexTable);
-	initialized++;
-    }
-
-    s = string;
-    if ((s[0] == '0') && ((s[1] == 'x') || (s[1] == 'X'))) {
-	s += 2;
-    }
-    if (s[0] == '\0') {
-	return FALSE;	/* Error: empty string or only found "0x".  */
-    }
-    accum = 0;
-    for ( /*empty*/ ; *s != '\0'; s++) {
-	unsigned char byte;
-
-	/* Check if character is a hex digit and accumulate. */
-	byte = hexTable[(int)*s];
-	if (byte == 0xFF) {
-	    return FALSE;	/* Not a hexadecimal number */
-	}
-	accum = (accum << 4) | byte;
-    }
-    *valuePtr = accum;
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XbmBitmapData --
- *
- *	Converts a list of ASCII values into a picture.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- * 	If an error occurs while processing the data, interp->result
- * 	is filled with a corresponding error message.  
- *
- *	The data sink is damaged by "strtok".  Unlike XbmReadHeader,
- *	here it's okay, since if we're already this far, we know it's
- *	an XBM image and we assume that the data sink won't be reused.
- *
- *---------------------------------------------------------------------------
- */
-static int
-XbmBitmapData(
-    Blt_DBuffer data,		/* Data sink to be read from. */
-    int version,		/* X10 or X11. */
-    Blt_Pixel *fgColorPtr,		/* Foreground bitmap color (bit is 1). */
-    Blt_Pixel *bgColorPtr,		/* Background bitmap color (bit is 0). */
-    Picture *destPtr)		/* Picture to be populated from XBM
-				 * image. */
-{
-    Blt_Pixel *destRowPtr;
-    char *string;		/* Used to tell strtok that have
-				 * continued processing the same
-				 * string. */
-    int y;
-
-    destRowPtr = destPtr->bits;
-    string = (char *)Blt_DBuffer_Pointer(data);
-    for (y = 0; y < destPtr->height; y++) {
-	int x;
-	Blt_Pixel *dp;
-
-	dp = destRowPtr;
-	if (version == 10) {
-	    for (x = 0; x < destPtr->width; /* empty */) {
-		char *p;
-		int i, u16;
-		
-		p = strtok(string, ",;}\n\r\t "), string = NULL;
-		if ((p == NULL) || (!XbmGetHexValue(p, &u16))) {
-		    return FALSE;
-		}
-		for (i = 0; (x < destPtr->width) && (i < 16); i++, x++) {
-		    dp->u32 = (u16 & (1<<i)) ? 
-			fgColorPtr->u32 : bgColorPtr->u32;
-		    dp++;
-		}
-	    }
-	} else {
-	    for (x = 0; x < destPtr->width; /* empty */) {
-		char *p;
-		int i, u8;
-
-		p = strtok(string, ",;}\n\r\t "), string = NULL;
-		if ((p == NULL) || (!XbmGetHexValue(p, &u8))) {
-		    return FALSE;
-		}
-		for (i = 0; (x < destPtr->width) && (i < 8); i++, x++) {
-		    dp->u32 = (u8 & (1<<i)) ? 
-			fgColorPtr->u32 : bgColorPtr->u32;
-		    dp++;
-		}
-	    }
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    if (bgColorPtr->Alpha == 0x00) {	/* Background is 100% transparent. */
-	if (fgColorPtr->Alpha == 0xFF) {
-	    destPtr->flags |= BLT_PIC_MASK;
-	} else {
-	    destPtr->flags |= BLT_PIC_BLEND;
-	}
-    } else if (bgColorPtr->Alpha != 0xFF) { /* Partial transparency. */
-	destPtr->flags |= BLT_PIC_BLEND;
-    } else if (fgColorPtr->Alpha == 0x00) { 
-	/* Background is 100% opaque and foreground is 100%
-	 * transparent. */
-	destPtr->flags |= BLT_PIC_MASK;
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsXbm --
- *
- *      Attempts to parse an XBM file header.
- *
- * Results:
- *      Returns 1 is the header is XBM and 0 otherwise.  Note that
- *      the validity of the header values is not checked here.  That's
- *	done in Blt_XbmToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsXbm(Blt_DBuffer data)
-{
-    Xbm xbm;
-    int bool;
-
-    bool = XbmHeader(data, &xbm);
-    return bool;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XbmToPicture --
- *
- *      Reads an XBM file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-XbmToPicture(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer buffer,
-    XbmImportSwitches *switchesPtr)
-{
-    Blt_Picture picture;
-    Xbm xbm;
-
-    picture = NULL;
-    if (!XbmHeader(buffer, &xbm)) {
-	    Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" invalid XBM header", (char *)NULL);
-	    goto error;
-    }
-    if ((xbm.width > 0) && (xbm.height > 0)) {
-	picture = Blt_CreatePicture(xbm.width, xbm.height);
-	if (!XbmBitmapData(buffer, xbm.version, &switchesPtr->fg, 
-		&switchesPtr->bg, picture)) { 
-	    Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" invalid XBM data", (char *)NULL);
-	    goto error;
-	}
-    } else {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" invalid XBM dimensions \"", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(xbm.width), " x ", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(xbm.height), "\"", (char *)NULL);
-	goto error;
-    }
-
-    Blt_DBuffer_Free(buffer);
-    if (picture) {
-	Blt_Chain chain;
-
-	chain = Blt_Chain_Create();
-	Blt_Chain_Append(chain, picture);
-	return chain;
-    }
- error:
-    if (picture) {
-	Blt_FreePicture(picture);
-    }
-    Blt_DBuffer_Free(buffer);
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToXbm --
- *
- *      Writes a XBM format image to the provided data buffer.
- *
- * Results:
- *      A standard TCL result.  If an error occured, TCL_ERROR is
- *	returned and an error message will be place in the interpreter
- *	result. Otherwise, the data sink will contain the binary
- *	output of the image.
- *
- * Side Effects:
- *	Memory is allocated for the data sink.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToXbm(Tcl_Interp *interp, Blt_Picture original, Blt_DBuffer buffer,
-	     XbmExportSwitches *switchesPtr)
-{
-    Picture *srcPtr;
-
-    srcPtr = original;
-    Blt_DBuffer_Print(buffer, "#define picture_width %d\n", srcPtr->width);
-    Blt_DBuffer_Print(buffer, "#define picture_height %d\n", srcPtr->height);
-    Blt_DBuffer_Print(buffer, "#define picture_x_hot %d\n", srcPtr->width / 2);
-    Blt_DBuffer_Print(buffer, "#define picture_y_hot %d\n", srcPtr->height / 2);
-    Blt_DBuffer_Print(buffer, "static char picture_bits[] = {\n    ");
-    {
-	Blt_Pixel *cp, *srcRowPtr;
-	Blt_Pixel palette[256];
-	int count, i;
-	int y;
-	
-	/* Create a B&W palette for dithering the image. */
-	for (cp = palette, i = 0; i < 256; i++, cp++) {
-	    int c;
-	    
-	    c = (i + 127) / 255;
-	    cp->Blue = cp->Green = cp->Red = (unsigned char) (c * 255 + 0.5);
-	    cp->Alpha = ALPHA_OPAQUE;
-	} 
-
-	/* Remove any transparent pixels by blending into a solid
-	 * white background. */
-	if (!Blt_PictureIsOpaque(srcPtr)) {
-	    Blt_Picture background;
-
-	    /* Blend picture with solid color background. */
-	    background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	    Blt_BlankPicture(background, &switchesPtr->bg); 
-	    Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-	    if (srcPtr != original) {
-		Blt_FreePicture(srcPtr);
-	    }
-	    srcPtr = background;
-	}
-	if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	    Blt_Picture unassoc;
-	    /* 
-	     * The picture has an alpha burned into the components.  Create a
-	     * temporary copy removing pre-multiplied alphas.
-	     */ 
-	    unassoc = Blt_ClonePicture(srcPtr);
-	    Blt_UnassociateColors(unassoc);
-	    if (srcPtr != original) {
-		Blt_FreePicture(srcPtr);
-	    }
-	    srcPtr = unassoc;
-	}
-	/* Now dither the picture to 2 colors. */
-	{
-	    Blt_Picture dither;
-
-	    dither = Blt_DitherPicture(srcPtr, palette);
-	    if (srcPtr != original) {
-		Blt_FreePicture(srcPtr);
-	    }
-	    srcPtr = dither;
-	}
-	/* Write the dithered image data. */
-	count = 0;
-	srcRowPtr = srcPtr->bits;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp;
-	    int x;
-	    
-	    sp = srcRowPtr;
-	    for (x = 0; x < srcPtr->width; /* empty */) {
-		unsigned char bits;
-		int i;
-
-		bits = 0;
-		for (i = 0; (x < srcPtr->width) && (i < 8); i++, x++) {
-		    if (sp->Red == 0x00) {
-			bits |= (1<<i);
-		    }
-		    sp++;
-		}
-		count++;
-		Blt_DBuffer_Print(buffer, "0x%02x, ", bits);
-		if (count > 11) {
-		    Blt_DBuffer_Print(buffer, "\n    ");
-		    count = 0;
-		}
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-	Blt_DBuffer_Print(buffer, "\n};\n");
-
-	/* Free the temporary images. */
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-static Blt_Chain
-ReadXbm(Tcl_Interp *interp, const char *fileName, Blt_DBuffer buffer)
-{
-    XbmImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return XbmToPicture(interp, fileName, buffer, &switches);
-}
-
-static Tcl_Obj *
-WriteXbm(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Tcl_Obj *objPtr;
-    Blt_DBuffer buffer;
-    XbmExportSwitches switches;
-
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-
-    buffer = Blt_DBuffer_Create();
-    if (PictureToXbm(interp, picture, buffer, &switches) != TCL_OK) {
-	objPtr = NULL;
-    } else {
-	objPtr = Tcl_NewStringObj((char *)Blt_DBuffer_Bytes(buffer), 
-		Blt_DBuffer_Length(buffer));
-    }
-    Blt_DBuffer_Destroy(buffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportXbm(
-    Tcl_Interp *interp, 
-    int objc,
-    Tcl_Obj *const *objv,
-    const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer buffer;
-    XbmImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-	return NULL;
-    }
-    buffer = Blt_DBuffer_Create();
-    chain = NULL;
-    if (switches.dataObjPtr != NULL) {
-	int nBytes;
-
-	string = Tcl_GetStringFromObj(switches.dataObjPtr, &nBytes);
-	Blt_DBuffer_AppendData(buffer, (unsigned char *)string, nBytes);
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	if (Blt_DBuffer_LoadFile(interp, string, buffer) != TCL_OK) {
-	    goto error;
-	}
-	*fileNamePtr = string;
-    }
-    chain = XbmToPicture(interp, string, buffer, &switches);
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(buffer);
-    return chain;
-}
-
-static int
-ExportXbm(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    XbmExportSwitches switches;
-    Blt_DBuffer buffer;
-    int result;
-    Blt_Picture picture;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-
-    buffer = Blt_DBuffer_Create();
-    result = PictureToXbm(interp, picture, buffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, buffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Blt_DBuffer_StringObj(buffer);
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, objPtr, 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	Tcl_SetObjResult(interp, Blt_DBuffer_StringObj(buffer));
-    }  
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(buffer);
-    return result;
-}
-
-int 
-Blt_PictureXbmInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_xbm", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"xbm",			/* Name of format. */
-	IsXbm,			/* Discovery routine. */
-	ReadXbm,		/* Read format procedure. */
-	WriteXbm,		/* Write format procedure. */
-	ImportXbm,		/* Import format procedure. */
-	ExportXbm);		/* Export format procedure. */
-}
diff --git a/blt3.0/src/bltPictXpm.c b/blt3.0/src/bltPictXpm.c
deleted file mode 100644
index 049da05..0000000
--- a/blt3.0/src/bltPictXpm.c
+++ /dev/null
@@ -1,662 +0,0 @@
-
-/*
- * bltPictXpm.c --
- *
- * This module implements XPM file format conversion routines for the picture
- * image type in the BLT toolkit.
- *
- *	Copyright 2003-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "blt.h"
-
-#include "config.h"
-#ifdef HAVE_LIBXPM
-#include <tcl.h>
-#include <bltAlloc.h>
-#include <bltSwitch.h>
-#include <bltDBuffer.h>
-#include <bltHash.h>
-#include "bltPicture.h"
-#include "bltPictFmts.h"
-#include <ctype.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef HAVE_MEMORY_H
-#  include <memory.h>
-#endif /* HAVE_MEMORY_H */
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifndef HAVE_SPRINTF_S
-BLT_EXTERN int sprintf_s(char *s, size_t size, const char *fmt, /*args*/ ...);
-#endif	/* HAVE_SPRINTF_S */
-
-#define TRUE 	1
-#define FALSE 	0
-
-typedef struct _Blt_Picture Picture;
-
-#include <X11/xpm.h>
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-    int flags;			/* Flag. */
-    Blt_Pixel bg;
-    int index;
-} XpmExportSwitches;
-
-typedef struct {
-    Tcl_Obj *dataObjPtr;
-    Tcl_Obj *fileObjPtr;
-} XpmImportSwitches;
-
-BLT_EXTERN Blt_SwitchParseProc Blt_ColorSwitchProc;
-
-static Blt_SwitchCustom colorSwitch = {
-    Blt_ColorSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-bg", "color",
-	Blt_Offset(XpmExportSwitches, bg), 0, 0, &colorSwitch},
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(XpmExportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(XpmExportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_BITMASK, "-noquantize", "",
-	Blt_Offset(XpmExportSwitches, flags), 0, PIC_NOQUANTIZE},
-    {BLT_SWITCH_INT_NNEG, "-index", "int",
-	Blt_Offset(XpmExportSwitches, index), 0},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(XpmImportSwitches, dataObjPtr), 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(XpmImportSwitches, fileObjPtr), 0},
-    {BLT_SWITCH_END}
-};
-
-DLLEXPORT extern Tcl_AppInitProc Blt_PictureXpmInit;
-extern char *Blt_Itoa(int);
-
-
-static int
-XpmHeader(Blt_DBuffer buffer)
-{
-    unsigned char *line, *next;
-    unsigned char *bp;
-
-    Blt_DBuffer_ResetCursor(buffer);
-    bp = Blt_DBuffer_End(buffer);
-    bp[0] = '\0';		/* Guaranteed to have 1 extra byte in the
-				 * buffer to create an ASCIZ string. */
-
-    for (line = Blt_DBuffer_Pointer(buffer); *line != '\0'; line = next) {
-#define XPM_MAX_LINE 4097
-	char substring[XPM_MAX_LINE+1];
-	int value;
-	char *s;
-
-	/* Find the start of the next line */
-	if ((*line == '\n') || (*line == '\r')) {
-	    line++;
-	}
-	next = line;
-	while ((*next != '\r') && (*next != '\n') && (*next != '\0')) {
-	    if (!isascii(*next)) {
-		return FALSE;
-	    }
-	    next++;
-	}
-	/* Verify that we won't overrun the buffer with "sscanf". */
-	if ((next - line) > XPM_MAX_LINE) {
-	    return FALSE;
-	}
-	s = (char *)line;
-	if (sscanf(s, "#define %s %d", substring,  &value) == 2) {
-	    char *p;
-	    char c;
-	    char *name;
-
-	    p = strrchr(substring, '_');
-
-	    if (p == NULL) {
-		name = substring;
-	    } else {
-		name = p + 1;
-	    }
-	    c = name[0];
-	    if ((c == 'f') && (strcmp("format", name) == 0)) {
-		return TRUE;
-	    } else {
-		return FALSE;
-	    }
-	} else if (sscanf(s, "/* %s */", substring) == 1) {
-	    if ((strcmp("XPM", substring) == 0) || 
-		(strcmp("XPM2", substring) == 0)) {
-		return TRUE;
-	    }
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsXpm --
- *
- *      Attempts to parse an XBM file header.
- *
- * Results:
- *      Returns 1 is the header is XBM and 0 otherwise.  Note that
- *      the validity of the header values is not checked here.  That's
- *	done in XpmToPicture.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IsXpm(Blt_DBuffer buffer)
-{
-    int bool;
-
-    bool = XpmHeader(buffer);
-    return bool;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XpmToPicture --
- *
- *      Reads an XBM file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Chain
-XpmToPicture(
-    Tcl_Interp *interp, 
-    const char *fileName,
-    Blt_DBuffer buffer,
-    XpmImportSwitches *switchesPtr)
-{
-    Picture *destPtr;
-    Blt_Pixel *palette;
-    XpmImage xpm;
-    int i, result;
-    int maskColorIndex;
-
-    Blt_DBuffer_ResetCursor(buffer);
-    result = XpmCreateXpmImageFromBuffer((char *)Blt_DBuffer_Bytes(buffer), &xpm,
-	(XpmInfo *)NULL);
-    if (result != XpmSuccess) {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" can't read XPM image. ", (char *)NULL);
-	return NULL;
-    }
-    destPtr = NULL;
-    palette = NULL;
-    if ((xpm.height < 1) || (xpm.width < 1)) {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" invalid XPM dimensions \"", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(xpm.width), " x ", (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(xpm.height), "\"", (char *)NULL);
-	goto bad;
-    }
-    if (xpm.colorTable == NULL) {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" no XPM color table available. ", (char *)NULL);
-	goto bad;
-    }
-    destPtr = Blt_CreatePicture(xpm.width, xpm.height);
-    palette = Blt_Malloc(xpm.ncolors * sizeof(Blt_Pixel));
-    if (palette == NULL) {
-	Tcl_AppendResult(interp, "error reading \"", fileName, 
-		"\" can't allocate a ", Blt_Itoa(xpm.ncolors), 
-		" color XPM palette.", (char *)NULL);
-	goto bad;
-    }
-    maskColorIndex = -1;
-    for (i = 0; i < xpm.ncolors; i++) {
-        char *colorName;
-
-        if (xpm.colorTable[i].c_color) {
-             colorName = xpm.colorTable[i].c_color;
-	} else if (xpm.colorTable[i].g_color) {
-             colorName = xpm.colorTable[i].g_color;
-	} else if (xpm.colorTable[i].g4_color) {
-             colorName = xpm.colorTable[i].g4_color;
-	} else if (xpm.colorTable[i].m_color) {
-             colorName = xpm.colorTable[i].m_color;
-	} else if (xpm.colorTable[i].symbolic) {
-	    colorName = xpm.colorTable[i].symbolic;
-	} else {
-	    palette[i].u32 = 0xFFBEBEBE;
-            continue;
-	}
-	if (strncmp(colorName, "None", 4) == 0) {
-	    maskColorIndex = i;
-	    palette[i].u32 = 0x00000000;
-	    continue;
-	}
-	if (Blt_GetPixel(interp, colorName, palette + i) != TCL_OK) {
-	    palette[i].u32 = 0xFFBEBEBE;
-	}
-    }
-    {
-	int y;
-	unsigned int *pixelPtr;		/* Pointer */
-	Blt_Pixel *destRowPtr;
-
-	destRowPtr = destPtr->bits;
-	pixelPtr = (unsigned int *)xpm.data;
-	for (y = 0; y < xpm.height; y++) {
-	    Blt_Pixel *dp, *dend;
-	    
-	    for (dp = destRowPtr, dend = dp + xpm.width; dp < dend; dp++) {
-		if (*pixelPtr >= xpm.ncolors) {
-		    Tcl_AppendResult(interp, "error reading \"", fileName, 
-			"\" bad color index ", Blt_Itoa(*pixelPtr), 
-			" in XPM image.", (char *)NULL);
-		    goto bad;
-		}
-		if (*pixelPtr == maskColorIndex) {
-		    destPtr->flags |= BLT_PIC_MASK;
-		}
-		*dp = palette[*pixelPtr];
-		pixelPtr++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }
-    Blt_Free(palette);
-    XpmFreeXpmImage(&xpm);
-    if (destPtr != NULL) {
-	Blt_Chain chain;
-
-	chain = Blt_Chain_Create();
-	Blt_Chain_Append(chain, destPtr);
-	return chain;
-    }
- bad:
-    if (destPtr != NULL) {
-	Blt_FreePicture(destPtr);
-    }
-    if (palette != NULL) {
-	Blt_Free(palette);
-    }
-    XpmFreeXpmImage(&xpm);
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PictureToXpm --
- *
- *      Reads an XBM file and converts it into a picture.
- *
- * Results:
- *      The picture is returned.  If an error occured, such
- *	as the designated file could not be opened, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PictureToXpm(Tcl_Interp *interp, Blt_Picture original, Blt_DBuffer buffer,
-	     XpmExportSwitches *switchesPtr)
-{
-    Picture *srcPtr;
-    int nColors;
-    Blt_HashTable colorTable;
-    char fmt[20];
-    int quantize;
-    Blt_Pixel *bgColorPtr;
-
-    quantize = ((switchesPtr->flags & PIC_NOQUANTIZE) == 0);
-    bgColorPtr = &switchesPtr->bg;
-
-    srcPtr = original;
-    if (Blt_PictureIsBlended(srcPtr)) {
-	Blt_Picture background, mask;
-	Blt_Pixel black, white;
-
-	background = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	Blt_BlankPicture(background, bgColorPtr);
-
-	mask = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-	/* Don't select 100% transparent pixels */
-	white.u32 = 0xFFFFFFFF;
-	black.u32 = 0x01000000;
-	Blt_SelectPixels(mask, srcPtr, &black, &white);
-	Blt_BlendPictures(background, srcPtr, 0, 0, srcPtr->width, 
-		srcPtr->height, 0, 0);
-
-	/* Put back the mask by and-ing the pictures together */
-	Blt_AndPictures(background, mask);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = background;
-    }
-    if (Blt_PictureFlags(srcPtr) & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_Picture unassoc;
-
-	/* 
-	 * The picture has an alpha burned into the components.  Create a
-	 * temporary copy removing pre-multiplied alphas.
-	 */ 
-	unassoc = Blt_ClonePicture(srcPtr);
-	Blt_UnassociateColors(unassoc);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = unassoc;
-    }
-    nColors = Blt_QueryColors(srcPtr, (Blt_HashTable *)NULL);
-    if ((quantize) && (nColors > 256)) {
-	Blt_Picture quant;
-
-	quant = Blt_QuantizePicture(srcPtr, 256);
-	if (srcPtr != original) {
-	    Blt_FreePicture(srcPtr);
-	}
-	srcPtr = quant;
-    }
-    Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-    nColors = Blt_QueryColors(srcPtr, &colorTable);
-    if (Blt_PictureIsMasked(srcPtr)) {
-	nColors++;
-    }
-    /* Header. */
-    {
-	unsigned int size;
-	int cpp;
-
-	cpp = 1;
-	size = 16;
-	while (size < nColors) {
-	    size *= 16;
-	    cpp++;
-	}
-	sprintf_s(fmt, 20, "%%0%dx", cpp);
-	/* Write the header line */
-	Blt_DBuffer_Print(buffer, "/* XPM */\n");
-	Blt_DBuffer_Print(buffer, "static char * image_name[] = {\n");
-	Blt_DBuffer_Print(buffer, "    /* Creator: BLT %s */\n", BLT_VERSION);
-	Blt_DBuffer_Print(buffer, "    \"%d %d %d %d\",\n", srcPtr->width, 
-		      srcPtr->height, nColors, cpp);
-	Blt_DBuffer_Print(buffer, "    /* Colors used: %d */\n", nColors);
-    }
-
-    /* Color table. */
-    {
-	unsigned long i;
-	const char *colorkey;
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	colorkey = (Blt_PictureIsColor(srcPtr)) ? "c" : "m";
-	i = 0;
-	Blt_DBuffer_Print(buffer, "    ");
-	for (hPtr = Blt_FirstHashEntry(&colorTable, &cursor); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_Pixel pixel;
-	    unsigned long key;
-
-	    Blt_SetHashValue(hPtr, i);
-	    key = (unsigned long)Blt_GetHashKey(&colorTable, hPtr);
-	    pixel.u32 = (unsigned int)key;
-	    Blt_DBuffer_Print(buffer, "\"");
-	    Blt_DBuffer_Print(buffer, fmt, i);
-	    Blt_DBuffer_Print(buffer, " %s #%02x%02x%02x\", ", colorkey, 
-		pixel.Red, pixel.Green, pixel.Blue);
-	    i++;
-	    if ((i % 4) == 0) {
-		Blt_DBuffer_Print(buffer, "\n    ");
-	    }
-	}
-	if (Blt_PictureIsMasked(srcPtr)) {
-	    i++;
-	    Blt_DBuffer_Print(buffer, "\"");
-	    Blt_DBuffer_Print(buffer, fmt, i);
-	    Blt_DBuffer_Print(buffer, " %s None\",\n", colorkey, i);
-	}	    
-	if ((i % 4) != 0) {
-	    Blt_DBuffer_Print(buffer, "\n");
-	}
-    }
-    /* Image data. */
-    {
-	Blt_Pixel *srcRowPtr;
-	int y;
-	int count;
-
-	srcRowPtr = srcPtr->bits;
-	count = 0;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp, *send;
-	    Blt_DBuffer_Print(buffer, "\"");
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		Blt_HashEntry *hPtr;
-		unsigned long i;
-		unsigned long key;
-		Blt_Pixel pixel;
-
-		pixel.u32 = sp->u32;
-		pixel.Alpha = 0xFF;
-		key = (unsigned long)pixel.u32;
-		hPtr = Blt_FindHashEntry(&colorTable, (char *)key);
-		if (hPtr == NULL) {
-		    fprintf(stderr, "can't find %x\n", sp->u32);
-		    Blt_DBuffer_Print(buffer, fmt, nColors);
-		    continue;
-		}
-		if (sp->Alpha == 0x00) {
-		    i = (unsigned long)nColors;
-		} else {
-		    i = (unsigned long)Blt_GetHashValue(hPtr);
-		}
-		Blt_DBuffer_Print(buffer, fmt, i);
-	    }
-	    Blt_DBuffer_Print(buffer, "\",\n");
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-    } 
-    Blt_DBuffer_Print(buffer, "};\n");
-    if (srcPtr != original) {
-	Blt_FreePicture(srcPtr);
-    }
-    Blt_DeleteHashTable(&colorTable);
-    return TCL_OK;
-}
-
-static Blt_Chain
-ReadXpm(Tcl_Interp *interp, const char *fileName, Blt_DBuffer buffer)
-{
-    XpmImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    return XpmToPicture(interp, fileName, buffer, &switches);
-}
-
-static Tcl_Obj *
-WriteXpm(Tcl_Interp *interp, Blt_Picture picture)
-{
-    Tcl_Obj *objPtr;
-    Blt_DBuffer buffer;
-    XpmExportSwitches switches;
-    int result;
-    
-    /* Default export switch settings. */
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* white */
-    buffer = Blt_DBuffer_Create();
-    result = PictureToXpm(interp, picture, buffer, &switches);
-    objPtr = NULL;
-    if (result == TCL_OK) {
-	objPtr = Tcl_NewStringObj((char *)Blt_DBuffer_Bytes(buffer), 
-		Blt_DBuffer_Length(buffer));
-    }
-    Blt_DBuffer_Destroy(buffer);
-    return objPtr;
-}
-
-static Blt_Chain
-ImportXpm(
-    Tcl_Interp *interp, 
-    int objc,
-    Tcl_Obj *const *objv,
-    const char **fileNamePtr)
-{
-    Blt_Chain chain;
-    Blt_DBuffer buffer;
-    XpmImportSwitches switches;
-    const char *string;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return NULL;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one import source: ",
-		"use only one -file or -data flag.", (char *)NULL);
-	return NULL;
-    }
-    chain = NULL;
-    buffer = Blt_DBuffer_Create();
-    if (switches.dataObjPtr != NULL) {
-	int nBytes;
-
-	string = Tcl_GetStringFromObj(switches.dataObjPtr, &nBytes);
-	Blt_DBuffer_AppendData(buffer, (unsigned char *)string, nBytes);
-	string = "data buffer";
-	*fileNamePtr = NULL;
-    } else {
-	string = Tcl_GetString(switches.fileObjPtr);
-	if (Blt_DBuffer_LoadFile(interp, string, buffer) != TCL_OK) {
-	    Blt_DBuffer_Destroy(buffer);
-	    return NULL;
-	}
-	*fileNamePtr = string;
-    }
-    chain = XpmToPicture(interp, string, buffer, &switches);
-    Blt_DBuffer_Destroy(buffer);
-    return chain;
-}
-
-static int
-ExportXpm(Tcl_Interp *interp, unsigned int index, Blt_Chain chain, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    Blt_DBuffer buffer;
-    Blt_Picture picture;
-    XpmExportSwitches switches;
-    int result;
-
-    memset(&switches, 0, sizeof(switches));
-    switches.bg.u32 = 0xFFFFFFFF; /* Default bgcolor is white. */
-    switches.index = index;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if ((switches.dataObjPtr != NULL) && (switches.fileObjPtr != NULL)) {
-	Tcl_AppendResult(interp, "more than one export destination: ",
-		"use only one -file or -data switch.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    picture = Blt_GetNthPicture(chain, switches.index);
-    if (picture == NULL) {
-	Tcl_AppendResult(interp, "no picture at index ", 
-		Blt_Itoa(switches.index), (char *)NULL);
-	Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-	return TCL_ERROR;
-    }
-
-    buffer = Blt_DBuffer_Create();
-    result = PictureToXpm(interp, picture, buffer, &switches);
-    if (result != TCL_OK) {
-	Tcl_AppendResult(interp, "can't convert \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObjPtr != NULL) {
-	char *fileName;
-
-	fileName = Tcl_GetString(switches.fileObjPtr);
-	result = Blt_DBuffer_SaveFile(interp, fileName, buffer);
-    } else if (switches.dataObjPtr != NULL) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Blt_DBuffer_StringObj(buffer);
-	objPtr = Tcl_ObjSetVar2(interp, switches.dataObjPtr, NULL, objPtr, 0);
-	result = (objPtr == NULL) ? TCL_ERROR : TCL_OK;
-    } else {
-	Tcl_SetObjResult(interp, Blt_DBuffer_StringObj(buffer));
-    }  
- error:
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    Blt_DBuffer_Destroy(buffer);
-    return result;
-}
-
-int 
-Blt_PictureXpmInit(Tcl_Interp *interp)
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
-	return TCL_ERROR;
-    };
-#endif
-    if (Tcl_PkgRequire(interp, "blt_extra", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_picture_xpm", BLT_VERSION) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_PictureRegisterFormat(interp,
-	"xpm",			/* Name of format. */
-	IsXpm,			/* Discovery routine. */
-	ReadXpm,		/* Read format procedure. */
-	WriteXpm,		/* Write format procedure. */
-	ImportXpm,		/* Import format procedure. */
-	ExportXpm);		/* Export format procedure. */
-}
-
-#endif /* HAVE_LIBXPM */
- 
diff --git a/blt3.0/src/bltPicture.c b/blt3.0/src/bltPicture.c
deleted file mode 100644
index bceae56..0000000
--- a/blt3.0/src/bltPicture.c
+++ /dev/null
@@ -1,6334 +0,0 @@
-
-/*
- * bltPicture.c --
- *
- * This module implements basic picture processing routines for the BLT
- * toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltHash.h"
-#include <bltDBuffer.h>
-#include "bltChain.h"
-#include "bltPicture.h"
-#include "bltPictInt.h"
-#include <X11/Xutil.h>
-#include <bltRound.h>
-
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif /* HAVE_MALLOC_H */
-
-#ifndef ALIGN
-#define ALIGN(a) \
-	(((size_t)a + (sizeof(void *) - 1)) & (~(sizeof(void *) - 1)))
-#endif /* ALIGN */
-
-#define ALIGNMENT	16
-
-#define JITTER(x)	((x) * (0.05 - drand48() * 0.10))
-#define JCLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 1.0) ? 1.0 : (c)))
-
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-
-#define imul8x8(a,b,t)	((t) = (a)*(b)+128,(((t)+((t)>>8))>>8))
-
-static Blt_ResampleFilterProc DefaultFilter;
-static Blt_ResampleFilterProc BellFilter;
-static Blt_ResampleFilterProc BesselFilter;
-static Blt_ResampleFilterProc BoxFilter;
-static Blt_ResampleFilterProc BSplineFilter;
-static Blt_ResampleFilterProc CatRomFilter;
-static Blt_ResampleFilterProc DummyFilter;
-static Blt_ResampleFilterProc GaussianFilter;
-static Blt_ResampleFilterProc GiFilter;
-static Blt_ResampleFilterProc Lanczos3Filter;
-static Blt_ResampleFilterProc MitchellFilter;
-static Blt_ResampleFilterProc SincFilter;
-static Blt_ResampleFilterProc TriangleFilter;
-
-static Blt_ApplyPictureToPictureProc ApplyPictureToPicture;
-static Blt_ApplyScalarToPictureProc  ApplyScalarToPicture;
-static Blt_ApplyPictureToPictureWithMaskProc ApplyPictureToPictureWithMask;
-static Blt_ApplyScalarToPictureWithMaskProc  ApplyScalarToPictureWithMask;
-static Blt_TentHorizontallyProc TentHorizontally;
-static Blt_TentVerticallyProc TentVertically;
-static Blt_ZoomHorizontallyProc ZoomHorizontally;
-static Blt_ZoomVerticallyProc ZoomVertically;
-static Blt_BlendPicturesProc BlendPictures;
-static Blt_SelectPixelsProc SelectPixels;
-static Blt_AssociateColorsProc AssociateColors;
-static Blt_UnassociateColorsProc UnassociateColors;
-static Blt_FadePictureProc FadePicture;
-static Blt_CopyPictureBitsProc CopyPictureBits;
-
-static Blt_PictureProcs stdPictureProcs = {
-    ApplyPictureToPicture,
-    ApplyScalarToPicture,
-    ApplyPictureToPictureWithMask,
-    ApplyScalarToPictureWithMask,
-    TentHorizontally,
-    TentVertically,
-    ZoomHorizontally,
-    ZoomVertically,
-    BlendPictures,
-    SelectPixels,
-    AssociateColors,
-    UnassociateColors,
-    FadePicture,
-    CopyPictureBits
-};
-
-Blt_PictureProcs *bltPictProcsPtr = &stdPictureProcs;
-
-void 
-Blt_ApplyPictureToPicture(Blt_Picture dest, Blt_Picture src, 
-			  int x, int y, int w, int h, int dx, int dy,
-			  Blt_PictureArithOps op)
-{
-    (*bltPictProcsPtr->applyPictureToPictureProc)(dest, src, x, y, w, h, 
-	dx, dy, op);
-}
-
-void 
-Blt_ApplyScalarToPicture(Blt_Picture dest, Blt_Pixel *colorPtr,
-			 Blt_PictureArithOps op)
-{
-    (*bltPictProcsPtr->applyScalarToPictureProc)(dest, colorPtr, op);
-}
-
-void
-Blt_ApplyPictureToPictureWithMask(Blt_Picture dest, Blt_Picture src, 
-				  Blt_Picture mask, int x, int y, int w, int h,
-				  int dx, int dy, int invert, 
-				  Blt_PictureArithOps op)
-{
-    (*bltPictProcsPtr->applyPictureToPictureWithMaskProc)(dest, src, mask,
-	x, y, w, h, dx, dy, invert, op);
-}
-
-void
-Blt_ApplyScalarToPictureWithMask(Blt_Picture dest, Blt_Pixel *colorPtr,
-				 Blt_Picture mask, int invert, 
-				 Blt_PictureArithOps op)
-{
-    (*bltPictProcsPtr->applyScalarToPictureWithMaskProc)(dest, colorPtr, 
-	mask, invert, op);
-}
-
-void 
-Blt_TentHorizontally(Blt_Picture dest, Blt_Picture src)
-{
-    (*bltPictProcsPtr->tentHorizontallyProc)(dest, src);
-}
-
-void 
-Blt_TentVertically(Blt_Picture dest, Blt_Picture src)
-{
-    (*bltPictProcsPtr->tentVerticallyProc)(dest, src);
-}
-
-void 
-Blt_ZoomHorizontally(Blt_Picture dest, Blt_Picture src, 
-		     Blt_ResampleFilter filter)
-{
-    (*bltPictProcsPtr->zoomHorizontallyProc)(dest, src, filter);
-}
-
-void 
-Blt_ZoomVertically(Blt_Picture dest, Blt_Picture src, Blt_ResampleFilter filter)
-{
-    (*bltPictProcsPtr->zoomVerticallyProc)(dest, src, filter);
-}
-
-void 
-Blt_BlendPictures(Blt_Picture dest, Blt_Picture src, int x, int y, int w, int h,
-		  int dx, int dy)
-{
-    (*bltPictProcsPtr->blendPicturesProc)(dest, src, x, y, w, h, dx, dy);
-}
-
-void 
-Blt_SelectPixels(Blt_Picture dest, Blt_Picture src, Blt_Pixel *lowPtr , 
-		 Blt_Pixel *highPtr)
-{
-    (*bltPictProcsPtr->selectPixelsProc)(dest, src, lowPtr, highPtr);
-}
-
-void 
-Blt_AssociateColors(Blt_Picture picture)
-{
-    (*bltPictProcsPtr->associateColorsProc)(picture);
-}
-
-void 
-Blt_UnassociateColors(Blt_Picture picture)
-{
-    (*bltPictProcsPtr->unassociateColorsProc)(picture);
-}
-
-void 
-Blt_FadePicture(Blt_Picture dest, Blt_Picture src, int x, int y, int w, int h, 
-		int dx, int dy, int alpha)
-{
-    (*bltPictProcsPtr->fadePictureProc)(dest, src, x, y, w, h, dx, dy, alpha);
-}
-
-void 
-Blt_CopyPictureBits(Blt_Picture dest, Blt_Picture src, int x, int y, int w, 
-		    int h, int dx, int dy)
-{
-    (*bltPictProcsPtr->copyPictureBitsProc)(dest, src, x, y, w, h, dx, dy);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreatePicture --
- *
- *      Allocates a picture of a designated height and width.
- *
- *	This routine will be augmented with other types of information such as
- *	a color table, etc.
- *
- * Results:
- *      Returns the new color pict.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_CreatePicture(int w, int h)
-{
-    Pict *destPtr;
-    int pixelsPerRow;
-    size_t size;
-    unsigned char *buffer;
-    ptrdiff_t ptr;
-    assert((w > 0) && (w <= SHRT_MAX));
-    assert((h > 0) && (h <= SHRT_MAX));
-
-    /* 
-     * Be careful. There's a bunch of picture routines that assume an even
-     * number of pixels per row.
-     */
-    pixelsPerRow = (w + 3) & ~3; /* Align each row on a 16-byte boundary. */
-    destPtr = Blt_AssertMalloc(sizeof(Pict));
-    destPtr->pixelsPerRow = pixelsPerRow;
-    destPtr->width  = w;
-    destPtr->height = h;
-    destPtr->flags  = BLT_PIC_DIRTY;
-    destPtr->delay = 0;
-
-    /* Over-allocate a buffer so that we can align it (if needed) to a 16-byte
-     * boundary. */
-    size = (pixelsPerRow * h * sizeof(Blt_Pixel)) + ALIGNMENT;
-    buffer = Blt_AssertCalloc(1, size);
-    ptr = (ptrdiff_t)buffer;
-    destPtr->bits = (Blt_Pixel *)(ptr + (ptr & (ALIGNMENT-1)));
-    destPtr->buffer = buffer;
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreePicture --
- *
- *      Deallocates the given picture.
- *
- * Results:
- *      None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreePicture(Pict *pictPtr)
-{
-    Blt_Free(pictPtr->buffer);
-    Blt_Free(pictPtr);
-}
-
-void
-Blt_SizeOfPicture(Pict *pictPtr, int *widthPtr , int *heightPtr) 
-{
-    *widthPtr = pictPtr->width;
-    *heightPtr = pictPtr->height;
-}
-
-void
-Blt_ResizePicture(Pict *srcPtr, int w, int h)	
-{
-    assert((w > 0) && (w <= SHRT_MAX));
-    assert((h > 0) && (h <= SHRT_MAX));
-    if ((w != srcPtr->width) || (h != srcPtr->height)) {
-	int pixelsPerRow;
-	size_t size;
-	ptrdiff_t ptr;
-	void *buffer;
-
-	pixelsPerRow = (w + 3) & ~3;	/* Align each row on a 16-byte
-					 * boundary. */
-	size = (pixelsPerRow * h * sizeof(Blt_Pixel)) + ALIGNMENT;
-	buffer = Blt_Realloc(srcPtr->buffer, size);
-	assert(buffer != NULL);
-	srcPtr->pixelsPerRow = pixelsPerRow;
-	srcPtr->width = w;
-	srcPtr->height = h;
-	ptr = (ptrdiff_t)buffer;
-	srcPtr->bits = (Blt_Pixel *)(ptr + (ptr & (ALIGNMENT-1)));
-	srcPtr->flags = BLT_PIC_DIRTY;
-	srcPtr->buffer = buffer;
-    }
-}
-
-void
-Blt_AdjustPicture(Pict *srcPtr, int w, int h)	
-{
-    assert((w > 0) && (w <= SHRT_MAX));
-    assert((h > 0) && (h <= SHRT_MAX));
-    if ((w != srcPtr->width) || (h != srcPtr->height)) {
-	int pixelsPerRow;
-	int bytesPerRow;
-	size_t size;
-	void *buffer;
-	ptrdiff_t ptr;
-	Blt_Pixel *bits;
-
-	/* 
-	 * Be careful. There's a bunch of picture routines that assume an even
-	 * number of pixels per row.
-	 */
-	pixelsPerRow = (w + 3) & ~3;	/* Align each row on a 16-byte
-					 * boundary. */
-	
-	size = (pixelsPerRow * h * sizeof(Blt_Pixel)) + ALIGNMENT;
-	buffer = Blt_AssertMalloc(size);
-	ptr = (ptrdiff_t)buffer;
-	bits = (Blt_Pixel *)(ptr + (ptr & (ALIGNMENT-1)));
-	if (srcPtr->bits != NULL && (srcPtr->pixelsPerRow > 0)) {
-	    Blt_Pixel *srcRowPtr, *destRowPtr;
-	    int y, nRows;
-
-	    bytesPerRow = sizeof(Blt_Pixel) * 
-		MIN(pixelsPerRow, srcPtr->pixelsPerRow);
-	    nRows = MIN(srcPtr->height, h);
-	    
-	    srcRowPtr = srcPtr->bits, destRowPtr = bits;
-	    for (y = 0; y < nRows; y++) {
-		memcpy(destRowPtr, srcRowPtr, bytesPerRow);
-		destRowPtr += pixelsPerRow;
-		srcRowPtr  += srcPtr->pixelsPerRow;
-	    }
-	    Blt_Free(srcPtr->buffer);
-	}
-	srcPtr->pixelsPerRow = pixelsPerRow;
-	srcPtr->width = w;
-	srcPtr->height = h;
-	srcPtr->bits = bits;
-	srcPtr->buffer = buffer;
-	srcPtr->flags = BLT_PIC_DIRTY;
-    }
-}
-
-
-void
-Blt_BlankPicture(Pict *destPtr, Blt_Pixel *colorPtr) 
-{
-    Blt_Pixel *destRowPtr;
-    int y;
-
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < destPtr->height; y++) {
-	int n;
-	Blt_Pixel *dp;
-
-	dp = destRowPtr;
-	n = (destPtr->width + 7) / 8; /* width > 0 assumed */
-	switch (destPtr->width & 0x7) {
-	case 0:        do {  dp->u32 = colorPtr->u32, dp++;
-	case 7:              dp->u32 = colorPtr->u32, dp++;
-	case 6:              dp->u32 = colorPtr->u32, dp++;
-	case 5:              dp->u32 = colorPtr->u32, dp++;
-	case 4:              dp->u32 = colorPtr->u32, dp++;
-	case 3:              dp->u32 = colorPtr->u32, dp++;
-	case 2:              dp->u32 = colorPtr->u32, dp++;
-	case 1:              dp->u32 = colorPtr->u32, dp++;
-			} while (--n > 0);
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags |= BLT_PIC_DIRTY;
-    destPtr->flags &= ~(BLT_PIC_BLEND | BLT_PIC_MASK);
-    if (colorPtr->Alpha == 0x00) {
-	destPtr->flags |= BLT_PIC_MASK;
-    } else if (colorPtr->Alpha != 0xFF) {
-	destPtr->flags |= BLT_PIC_BLEND;
-    }
-}
-
-void
-Blt_BlankRegion(Pict *destPtr, int x, int y, int w, int h, Blt_Pixel *colorPtr) 
-{
-    Blt_Pixel *destRowPtr;
-    int y1, x1;
-
-    assert ((x >= 0) && (y >= 0));
-    if ((x >= destPtr->width) || (y >= destPtr->height)) {
-	return;
-    }
-    x1 = x + w;
-    y1 = y + h;
-    if (x1 > destPtr->width) {
-	x1 = destPtr->width;
-    }
-    if (y1 > destPtr->height) {
-	y1 = destPtr->height;
-    }
-    w = x1 - x;
-    h = y1 - y;
-    destRowPtr = destPtr->bits + (y * destPtr->pixelsPerRow) + x;
-    for (y = 0; y < h; y++) {
-	int n;
-	Blt_Pixel *dp;
-
-	dp = destRowPtr;
-	n = (w + 7) / 8; /* width > 0 assumed */
-	switch (w & 0x7) {
-	case 0:        do {  dp->u32 = colorPtr->u32, dp++;
-	case 7:              dp->u32 = colorPtr->u32, dp++;
-	case 6:              dp->u32 = colorPtr->u32, dp++;
-	case 5:              dp->u32 = colorPtr->u32, dp++;
-	case 4:              dp->u32 = colorPtr->u32, dp++;
-	case 3:              dp->u32 = colorPtr->u32, dp++;
-	case 2:              dp->u32 = colorPtr->u32, dp++;
-	case 1:              dp->u32 = colorPtr->u32, dp++;
-			} while (--n > 0);
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags |= BLT_PIC_DIRTY;
-    destPtr->flags &= ~(BLT_PIC_BLEND | BLT_PIC_MASK);
-    if (colorPtr->Alpha == 0x00) {
-	destPtr->flags |= BLT_PIC_MASK;
-    } else if (colorPtr->Alpha != 0xFF) {
-	destPtr->flags |= BLT_PIC_BLEND;
-    }
-}
-
-#ifdef notdef
-static void
-ComputeGammaTable(float gamma, unsigned char lut[])
-{
-    int i;
-    double iGamma;
-
-    iGamma = 1.0 / (double)gamma;
-    for (i = 0; i < 256; i++) {
-	double value;
-
-	value = 255.0 * pow((double)i / 255.0, iGamma);
-	lut[i] = (unsigned char)CLAMP(value);
-    }
-}
-#endif
-
-static void
-ComputeGammaTable2(float gamma, unsigned char lut[])
-{
-    int i;
-    double iGamma;
-    double cutoff, exp;
-
-    iGamma = 1.0 / (double)gamma;
-    cutoff = 0.018;
-    exp = (1.099 * pow(cutoff, iGamma) - 0.099) / cutoff;
-    for (i = 0; i < 256; i++) {
-	double value, intensity;
-
-	intensity = (double)i / 255.0;
-	if (intensity < cutoff) {
-	    intensity *= exp;
-	} else {
-	    intensity = (1.099 * pow(intensity, iGamma) - 0.099);
-	}
-	value = 255.0 * intensity;
-	lut[i] = (unsigned char)CLAMP(value);
-    }
-}
-
-void
-Blt_GammaCorrectPicture(Pict *destPtr, Pict *srcPtr, float gamma)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-    unsigned char lut[256];
-    
-    ComputeGammaTable2(gamma, lut);
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *dp, *send;
-
-	sp = srcRowPtr, dp = destRowPtr;
-	for (send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    dp->Red = lut[(unsigned int)sp->Red];
-	    dp->Green = lut[(unsigned int)sp->Green];
-	    dp->Blue = lut[(unsigned int)sp->Blue];
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GreyscalePicture --
- *
- *	Returns a new picture converted to grey scale.  All three picture
- *	color components will have the same value.
- *
- *	Luminosity is computed using the formula,
- *
- *	    Y = 0.212671 * Red + 0.715160 * Green + 0.072169 * Blue
- *
- *	which is supposed to better represent contemporary monitors.
- *
- * Results:
- *	Returns a new greyscale picture.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture 
-Blt_GreyscalePicture(Pict *srcPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    /*
-     * We can use scaled integers (20-bit fraction) to compute the luminosity
-     * with reasonable accuracy considering it's stored in an 8-bit result.
-     */
-#define YR	223002		/* 0.212671 */
-#define YG	749900		/* 0.715160 */
-#define YB	75675		/* 0.072169 */
-#define YMAX	267386880	/* 255.0 */
-#define YCLAMP(s) \
-	(unsigned char)((s) > YMAX) ? 255 : ((((s) + 524288) >> 20))
-
-    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *dp, *send;
-
-	sp = srcRowPtr, dp = destRowPtr;
-	for (send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    unsigned int Y;
-
-	    Y = YR * sp->Red + YG * sp->Green + YB * sp->Blue;
-	    dp->Red = dp->Green = dp->Blue = YCLAMP(Y);
-	    dp->Alpha = sp->Alpha;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags = srcPtr->flags;
-    destPtr->flags |= BLT_PIC_DIRTY;
-    destPtr->flags &= ~BLT_PIC_COLOR;
-    return destPtr;
-}
-
-static void
-FadePicture(Pict *destPtr, Pict *srcPtr, int sx, int sy, int w, int h, 
-	    int dx, int dy, int alpha)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if (srcPtr != destPtr) {
-	Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    }
-    destRowPtr = destPtr->bits;
-    srcRowPtr = srcPtr->bits;
-
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(srcPtr);
-    }
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *dp, *send;
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    dp->Alpha -= alpha;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags |= BLT_PIC_BLEND;
-}
-
-static void
-AssociateColors(Pict *srcPtr)
-{
-    if ((srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_Pixel *srcRowPtr;
-	int y;
-	
-	srcRowPtr = srcPtr->bits;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp, *send;
-	    
-	    sp = srcRowPtr;
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		/* No conversion necessary if 100% transparent or opaque. */
-		if ((sp->Alpha != 0xFF) && (sp->Alpha != 0x00)) {
-		    int t;
-		    
-		    sp->Red = imul8x8(sp->Alpha, sp->Red, t);
-		    sp->Green = imul8x8(sp->Alpha, sp->Green, t);
-		    sp->Blue = imul8x8(sp->Alpha, sp->Blue, t);
-		}
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-	srcPtr->flags |= BLT_PIC_ASSOCIATED_COLORS;
-    }
-}
-
-static void
-UnassociateColors(Pict *srcPtr)
-{
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_Pixel *srcRowPtr;
-	int y;
-
-	srcRowPtr = srcPtr->bits;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp, *send;
-	    
-	    sp = srcRowPtr;
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		/* No conversion necessary if 100% transparent or opaque. */
-		if ((sp->Alpha != 0xFF) && (sp->Alpha != 0x00)) {
-		    int bias;
-		    
-		    bias = sp->Alpha >> 1;
-		    sp->Red   = (mul255(sp->Red)   + bias) / sp->Alpha;
-		    sp->Green = (mul255(sp->Green) + bias) / sp->Alpha;
-		    sp->Blue  = (mul255(sp->Blue)  + bias) / sp->Alpha;
-		}
-	    }
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-	srcPtr->flags &= ~BLT_PIC_ASSOCIATED_COLORS;
-    }
-}
-
-static void
-BlendPictures(Pict *destPtr, Pict *srcPtr, int sx, int sy, int w, int h,
-	      int dx, int dy)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if (destPtr->width < (dx + w)) {
-	w = destPtr->width - dx;
-    }
-    if (destPtr->height < (dy + h)) {
-	h = destPtr->height - dy;
-    }
-    if (srcPtr->width < w) {
-	w = srcPtr->width;
-    }
-    if (srcPtr->height < h) {
-	h = srcPtr->height;
-    }
-    if ((srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(srcPtr);
-    }
-    if ((destPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(destPtr);
-    }
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((sy * srcPtr->pixelsPerRow) + sx);
-
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-
-	sp = srcRowPtr;
-	for (dp = destRowPtr, dend = dp + w; dp < dend; dp++, sp++) {
-	    /* Blend the foreground and background together. */
-	    if (sp->Alpha == 0xFF) {
-		*dp = *sp;
-	    } else if (sp->Alpha != 0x00) {
-		int beta, t;
-		int r, g, b, a;
-
-		beta = sp->Alpha ^ 0xFF; /* beta = 1 - alpha */
-		r = sp->Red   + imul8x8(beta, dp->Red, t);
-		g = sp->Green + imul8x8(beta, dp->Green, t);
-		b = sp->Blue  + imul8x8(beta, dp->Blue, t);
-		a = sp->Alpha + imul8x8(beta, dp->Alpha, t);
-		dp->Red =   (r > 255) ? 255 : ((r < 0) ? 0 : r);
-		dp->Green = (g > 255) ? 255 : ((g < 0) ? 0 : g);
-		dp->Blue =  (b > 255) ? 255 : ((b < 0) ? 0 : b);
-		dp->Alpha = (a > 255) ? 255 : ((a < 0) ? 0 : a);
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
-static void
-BlendPictureArea2(
-    Pict *destPtr,			/* (in/out) Background picture.
-					 * Composite overwrites region in 
-					 * background. */
-    Pict *srcPtr,			/* Foreground picture. */
-    Blt_BlendingMode mode,		/* Blend mode. */
-    int sx, int sy,			/* Origin of foreground region in
-					 * source. */
-    int w, int h,			/* Dimension of region to be blended. */
-    int dx, int dy)			/* Origin of background region in
-					 * destination. */
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if ((srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(srcPtr);
-    }
-    if ((destPtr->flags & BLT_PIC_ASSOCIATED_COLORS) == 0) {
-	Blt_AssociateColors(destPtr);
-    }
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((sy * srcPtr->pixelsPerRow) + sx);
-
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *send, *dp;
-
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + w; sp < send; sp++, dp++) {
-	    int r, g, b, a;
-	    double fa, z;
-
-	    /*
-	     * C = ((1 - Fa) * B) + ((1 - Ba) * F) + (Fa * Ba * BLEND(F,B));
-	     */
-	    {
-		int fgBeta, bgBeta;
-
-		bgBeta = dp->Alpha ^ 0xFF;
-		fgBeta = sp->Alpha ^ 0xFF;
-		r = (fgBeta * dp->Red)   + (bgBeta * sp->Red);
-		g = (fgBeta * dp->Green) + (bgBeta * sp->Green);
-		b = (fgBeta * dp->Blue)  + (bgBeta * sp->Blue);
-		a = (fgBeta * dp->Alpha) + (bgBeta * sp->Alpha);
-	    }
-	    switch (mode) {
-	    case BLT_BLEND_NORMAL: /* C = F */
-		r += dp->Alpha * sp->Red;
-		g += dp->Alpha * sp->Green;
-		b += dp->Alpha * sp->Blue;
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_MULTIPLY: /* C = F * B */
-		r += dp->Red * sp->Red;
-		g += dp->Green * sp->Green;
-		b += dp->Blue * sp->Blue;
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_COLORDODGE: /* C = B / (1 - F) */
-		if (sp->Alpha > 0) {
-		    fa = 1.0 / sp->Alpha;
-		    z = (sp->Alpha * dp->Red) / (1.0 - (sp->Red * fa));
-		    r += (int)(z + 0.5);
-		    z = (sp->Alpha * dp->Green) / (1.0 - (sp->Green * fa));
-		    g += (int)(z + 0.5) ;
-		    z = (sp->Alpha * dp->Blue) / (1.0 - (sp->Blue * fa));
-		    b += (int)(z + 0.5);
-		    a += dp->Alpha * sp->Alpha;
-		} else {
-		    r += dp->Alpha * sp->Red;
-		    g += dp->Alpha * sp->Green;
-		    b += dp->Alpha * sp->Blue;
-		    a += dp->Alpha * sp->Alpha;
-		}
-		break;
-		
-	    case BLT_BLEND_COLORBURN: /* C = B / F; */
-		if (sp->Alpha > 0) {
-		    fa = 1.0 / sp->Alpha;
-		    z = 511.0 * ((dp->Alpha * sp->Red * fa) - 
-				 ((sp->Alpha * dp->Red) / (sp->Red + 1)));
-		    r += (int)(z + 0.5);
-		    z = 511.0 * ((dp->Alpha * sp->Green * fa) - 
-				 ((sp->Alpha * dp->Green) / (sp->Green + 1)));
-		    g += (int)(z + 0.5);
-		    z = 511.0 * ((dp->Alpha * sp->Blue * fa) - 
-				 ((sp->Alpha * dp->Blue) / (sp->Blue + 1)));
-		    b += (int)(z + 0.5);
-		    a += dp->Alpha * sp->Alpha;
-		} else {
-		    r += dp->Alpha * sp->Red;
-		    g += dp->Alpha * sp->Green;
-		    b += dp->Alpha * sp->Blue;
-		    a += dp->Alpha * sp->Alpha;
-		}
-		break;
-		
-	    case BLT_BLEND_OVERLAY: /* Multiplies or screens depending upon
-				     * background color. */
-		if (dp->Red < 128) {
-		    r += dp->Red * sp->Red;
-		} else {
-		    r += ((sp->Alpha * dp->Red) + (dp->Alpha * sp->Red) - 
-			  (sp->Red * dp->Red));
-		}
-		if (dp->Green < 128) {
-		    g += dp->Green * sp->Green;
-		} else {
-		    g += ((sp->Alpha * dp->Green) + (dp->Alpha * sp->Green) - 
-			  (sp->Green * dp->Green));
-		}
-		if (dp->Blue < 128) {
-		    b += dp->Blue * sp->Blue;
-		} else {
-		    b += ((sp->Alpha * dp->Blue) + (dp->Alpha * sp->Blue) - 
-			  (sp->Blue * dp->Blue));
-		}
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_SCREEN: /* C = 1 - ((1 - F) * B) */
-		r += ((sp->Alpha * dp->Red) + (dp->Alpha * sp->Red) - 
-		      (sp->Red * dp->Red));
-		g += ((sp->Alpha * dp->Green) + (dp->Alpha * sp->Green) - 
-		      (sp->Green * dp->Green));
-		b += ((sp->Alpha * dp->Blue) + (dp->Alpha * sp->Blue) - 
-		      (sp->Blue * dp->Blue));
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_DARKEN:	/* C = min(F,B) */
-		r += MIN(dp->Alpha * sp->Red,   sp->Alpha * dp->Red);
-		g += MIN(dp->Alpha * sp->Green, sp->Alpha * dp->Green);
-		b += MIN(dp->Alpha * sp->Blue,  sp->Alpha * dp->Blue);
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_LIGHTEN:	/* C = max(F,B) */
-		r += MAX(dp->Alpha * sp->Red,   sp->Alpha * dp->Red);
-		g += MAX(dp->Alpha * sp->Green, sp->Alpha * dp->Green);
-		b += MAX(dp->Alpha * sp->Blue,  sp->Alpha * dp->Blue);
-		a += dp->Alpha * sp->Alpha;
-		break;
-		
-	    case BLT_BLEND_DIFFERENCE: /* C = |F - B| */
-		/* C = |(F * Ba) - (B * Fa)| */
-		r += ABS((dp->Alpha * sp->Red) -   (sp->Alpha * dp->Red));
-		g += ABS((dp->Alpha * sp->Green) - (sp->Alpha * dp->Green));
-		b += ABS((dp->Alpha * sp->Blue) -  (sp->Alpha * dp->Blue));
-		a += dp->Alpha * sp->Alpha;
-		break;
-	    case BLT_BLEND_HARDLIGHT:
-		if (sp->Red > 127) {
-		    r += ((sp->Alpha * dp->Red) + (dp->Alpha * sp->Red) - 
-			  (sp->Red * dp->Red));
-		} else {
-		    r += dp->Red * sp->Red;
-		}
-		if (sp->Green > 127) {
-		    g += ((sp->Alpha * dp->Green) + 
-			  (dp->Alpha * sp->Green) - 
-			  (sp->Green * dp->Green));
-		} else {
-		    g += dp->Green * sp->Green;
-		}
-		if (sp->Blue > 127) {
-		    b += ((sp->Alpha * dp->Blue) + (dp->Alpha * sp->Blue) - 
-			  (sp->Blue * dp->Blue));
-		} else {
-		    b += dp->Blue * sp->Blue;
-		}
-		a += MIN(sp->Alpha, dp->Alpha);
-		break;
-	    case BLT_BLEND_SOFTLIGHT:
-		fa = 1.0 / sp->Alpha;
-		if (sp->Red > 127) {
-		    z = (sp->Alpha * dp->Red) / (1.0 - (sp->Red * fa));
-		} else {
-		    z = 511.0 * ((dp->Alpha * sp->Red * fa) - 
-			((sp->Alpha * dp->Red) / (sp->Red + 1)));
-		}
-		r += (int)(z + 0.5);
-		if (sp->Green > 127) {
-		    z = (sp->Alpha * dp->Green) / (1.0 - (sp->Green * fa));
-		} else {
-		    z = 511.0 * ((dp->Alpha * sp->Green * fa) - 
-			((sp->Alpha * dp->Green) / (sp->Green + 1)));
-		}
-		g += (int)(z + 0.5);
-		if (sp->Blue > 127) {
-		    z = (sp->Alpha * dp->Blue) / (1.0 - (sp->Blue * fa));
-		} else {
-		    z = 511.0 * ((dp->Alpha * sp->Blue * fa) - 
-				 ((sp->Alpha * dp->Blue) / (sp->Blue + 1)));
-		}
-		b += (int)(z + 0.5);
-		a += sp->Alpha * dp->Alpha;
-		break;
-	    }
-	    dp->Red   = (r >= 65025) ? 255 : ((r < 0) ? 0 : div255(r));
-	    dp->Green = (g >= 65025) ? 255 : ((g < 0) ? 0 : div255(g));
-	    dp->Blue  = (b >= 65025) ? 255 : ((b < 0) ? 0 : div255(b));
-	    dp->Alpha = (a >= 65025) ? 255 : ((a < 0) ? 0 : div255(a));
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
-void
-Blt_BlendPicturesByMode(Pict *destPtr, Pict *srcPtr, Blt_BlendingMode mode)
-{
-    BlendPictureArea2(destPtr, srcPtr, mode, 0, 0, srcPtr->width, 
-	srcPtr->height, 0, 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BitmapToPicture --
- *
- *	Converts the given bitmap into a picture.
- *
- * Results:
- *	Returns a new picture containing the bitmap image.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_BitmapToPicture(
-    Display *display,
-    Pixmap bitmap,			/* Source bitmap. */
-    int w, int h,			/* Width and height of the bitmap */
-    Blt_Pixel *fg,			/* Foreground pixel color */
-    Blt_Pixel *bg)			/* Background pixel color */
-{
-    XImage *imagePtr;
-    Blt_Pixel *destRowPtr;
-    Pict *destPtr;
-    int y;
-    unsigned int flags;
-
-    imagePtr = XGetImage(display, bitmap, 0, 0, w, h, 1, ZPixmap);
-
-    destPtr = Blt_CreatePicture(w, h);
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *dp;
-	int x;
-
-	/*
-	 * The slow but robust brute force method of converting an X image:
-	 * FIXME: update to avoid XGetPixel calls.
-	 */
-	dp = destRowPtr;
-	for (x = 0; x < w; x++, dp++) {
-	    unsigned int pixel;
-
-	    pixel = XGetPixel(imagePtr, x, y);
-	    dp->u32 = (pixel) ? fg->u32 : bg->u32;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    XDestroyImage(imagePtr);
-    flags = 0;
-    if (bg->Alpha == 0x00) { 
-	flags |= BLT_PIC_MASK;
-    } else if (bg->Alpha != 0xFF) {
-	flags |= BLT_PIC_BLEND;
-    }
-    if (fg->Alpha == 0x00) { 
-	flags |= BLT_PIC_MASK;
-    } else if (fg->Alpha != 0xFF) {
-	flags |= BLT_PIC_BLEND;
-    }
-    destPtr->flags |= flags;
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PictureToPhoto --
- *
- *      Translates a picture into a Tk photo.
- *
- * Results:
- *      The photo is re-written with the new picture.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_PictureToPhoto(Pict *srcPtr, Tk_PhotoHandle photo)
-{
-    Tk_PhotoImageBlock dib;		/* Destination image block. */
-
-    Tk_PhotoGetImage(photo, &dib);
-    dib.pixelSize = sizeof(Blt_Pixel);
-    dib.pitch = sizeof(Blt_Pixel) * srcPtr->pixelsPerRow;
-    dib.width = srcPtr->width;
-    dib.height = srcPtr->height;
-    dib.offset[0] = Blt_Offset(Blt_Pixel, Red);
-    dib.offset[1] = Blt_Offset(Blt_Pixel, Green);
-    dib.offset[2] = Blt_Offset(Blt_Pixel, Blue);
-    dib.offset[3] = Blt_Offset(Blt_Pixel, Alpha); 
-    Tk_PhotoSetSize(photo, srcPtr->width, srcPtr->height);
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Pict *tmpPtr;
-
-	/* Divide out the alphas from picture's pre-multipled RGB values. */
-	tmpPtr = Blt_ClonePicture(srcPtr);
-	Blt_UnassociateColors(tmpPtr);
-	dib.pixelPtr = (unsigned char *)tmpPtr->bits;
-	Tk_PhotoSetSize(photo, tmpPtr->width, tmpPtr->height);
-	Tk_PhotoPutBlock(photo, &dib, 0, 0, tmpPtr->width, tmpPtr->height);
-	Blt_FreePicture(tmpPtr);
-    } else {
-	dib.pixelPtr = (unsigned char *)srcPtr->bits;
-	Tk_PhotoPutBlock(photo, &dib, 0, 0, srcPtr->width, srcPtr->height);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PhotoAreaToPicture --
- *
- *      Create a picture from a region in a photo image.
- *
- * Results:
- *      The new picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_PhotoAreaToPicture(Tk_PhotoHandle photo, int x, int y, int w, int h)
-{
-    Tk_PhotoImageBlock sib;		/* Source image block. */
-    Pict *destPtr;
-    int offset;
-    int ir, ib, ig, ia;
-
-    if (x < 0) {
-	x = 0;
-    } 
-    if (y < 0) {
-	y = 0;
-    }
-    Tk_PhotoGetImage(photo, &sib);
-    if (w < 0) {
-	w = sib.width;
-    }
-    if (h < 0) {
-	h = sib.height;
-    }
-    if ((x + w) > sib.width) {
-	w = sib.width - x;
-    }
-    if ((h + y) > sib.height) {
-	h = sib.width - y;
-    }
-    offset = (x * sib.pixelSize) + (y * sib.pitch);
-
-    destPtr = Blt_CreatePicture(w, h);
-    ir = sib.offset[0];
-    ig = sib.offset[1];
-    ib = sib.offset[2];
-    ia = sib.offset[3];
-
-    if (sib.pixelSize == 4) {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits;
-
-	    dp = destRowPtr;
-	    bits = sib.pixelPtr + offset;
-	    for (x = 0; x < w; x++) {
-
-	        dp->Alpha = bits[ia];
-
-		if (dp->Alpha == 0xFF) {
-		    dp->Red = bits[ir];
-		    dp->Green = bits[ig];
-		    dp->Blue = bits[ib];
-		} else if (dp->Alpha == 0x00) {
-		    dp->Red = bits[ir];
-		    dp->Green = bits[ig];
-		    dp->Blue = bits[ib];
-		    destPtr->flags |= BLT_PIC_MASK;
-		} else {
-		    int t;
-
-		    /* 
-		     * Premultiple the alpha into each component. 
-		     * (0..255 * 0..255) / 255.0 
-		     */
-		    dp->Red = imul8x8(dp->Alpha, bits[ir], t);
-		    dp->Green = imul8x8(dp->Alpha, bits[ig], t);
-		    dp->Blue = imul8x8(dp->Alpha, bits[ib], t);
-		    destPtr->flags |= 
-			(BLT_PIC_BLEND | BLT_PIC_ASSOCIATED_COLORS);
-		}
-		bits += sib.pixelSize;
-	        dp++;
-	    }
-	    offset += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } else if (sib.pixelSize == 3) {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits;
-
-	    dp = destRowPtr;
-	    bits = sib.pixelPtr + offset;
-	    for (x = 0; x < w; x++) {
-	        dp->Red = bits[ir];
-	        dp->Green = bits[ig];
-	        dp->Blue = bits[ib];
-	        dp->Alpha = ALPHA_OPAQUE;
-	        bits += sib.pixelSize;
-	        dp++;
-	    }
-	    offset += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } else {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < h; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits;
-
-	    dp = destRowPtr;
-	    bits = sib.pixelPtr + offset;
-	    for (x = 0; x < w; x++) {
-	        dp->Red = dp->Green = dp->Blue = bits[ir];
-	        dp->Alpha = ALPHA_OPAQUE;
-	        bits += sib.pixelSize;
-	        dp++;
-	    }
-	    offset += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } 
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PhotoToPicture --
- *
- *      Create a picture from a photo image.
- *
- * Results:
- *      The new picture is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_PhotoToPicture(Tk_PhotoHandle photo) /* Source photo to convert. */
-{
-    Pict *destPtr;
-    Tk_PhotoImageBlock sib;		/* Source image block. */
-    int bytesPerRow;
-    int sw, sh;
-    int ir, ib, ig, ia;
-
-    Tk_PhotoGetImage(photo, &sib);
-    sw = sib.width;
-    sh = sib.height;
-    bytesPerRow = sib.pixelSize * sw;
-    ir = sib.offset[0];
-    ig = sib.offset[1];
-    ib = sib.offset[2];
-    ia = sib.offset[3];
-
-    destPtr = Blt_CreatePicture(sw, sh);
-    if (sib.pixelSize == 4) {
-	Blt_Pixel *destRowPtr;
-	int y;
-	unsigned char *srcRowPtr;
-	
-	srcRowPtr = sib.pixelPtr;
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < sh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits, *bend;
-
-	    dp = destRowPtr;
-	    for (bits = srcRowPtr, bend = bits + bytesPerRow; bits < bend; 
-		bits += sib.pixelSize) {
-	        dp->Alpha = bits[ia];
-		if (dp->Alpha == 0xFF) {
-		    dp->Red = bits[ir];
-		    dp->Green = bits[ig];
-		    dp->Blue = bits[ib];
-		} else if (dp->Alpha == 0x00) {
-		    dp->Red = bits[ir];
-		    dp->Green = bits[ig];
-		    dp->Blue = bits[ib];
-		    destPtr->flags |= BLT_PIC_MASK;
-		} else {
-		    dp->Red = bits[ir];
-		    dp->Green = bits[ig];
-		    dp->Blue = bits[ib];
-		    destPtr->flags |= BLT_PIC_BLEND;
-		}
-	        dp++;
-	    }
-	    srcRowPtr += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } else if (sib.pixelSize == 3) {
-	Blt_Pixel *destRowPtr;
-	int y;
-	unsigned char *srcRowPtr;
-
-	srcRowPtr = sib.pixelPtr;
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < sh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits, *bend;
-
-	    dp = destRowPtr;
-	    for (bits = srcRowPtr, bend = bits + bytesPerRow; bits < bend; 
-		bits += sib.pixelSize) {
-	        dp->Red = bits[ir];
-	        dp->Green = bits[ig];
-	        dp->Blue = bits[ib];
-	        dp->Alpha = ALPHA_OPAQUE;
-	        dp++;
-	    }
-	    srcRowPtr += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } else {
-	Blt_Pixel *destRowPtr;
-	int y;
-	unsigned char *srcRowPtr;
-
-	srcRowPtr = sib.pixelPtr;
-	destRowPtr = destPtr->bits;
-        for (y = 0; y < sh; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *bits, *bend;
-
-	    dp = destRowPtr;
-	    for (bits = srcRowPtr, bend = bits + bytesPerRow; bits < bend; 
-		bits += sib.pixelSize) {
-	        dp->Red = dp->Green = dp->Blue = bits[ir];
-	        dp->Alpha = ALPHA_OPAQUE;
-	        dp++;
-	    }
-	    srcRowPtr += sib.pitch;
-	    destRowPtr += destPtr->pixelsPerRow;
-        }
-    } 
-    return destPtr;
-}
-
-/*
- *	filter function definitions
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ByteToAsciiHex --
- *
- *	Convert a byte to its ASCII hexidecimal equivalent.
- *
- * Results:
- *	The converted 2 ASCII character string is returned.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static void
-ByteToAsciiHex(unsigned char byte, char *string)
-{
-    static char hexDigits[] = "0123456789ABCDEF";
-
-    string[0] = hexDigits[byte >> 4];
-    string[1] = hexDigits[byte & 0x0F];
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PictureToDBuffer --
- *
- *	Converts a picture to PostScript RGB (3 components) or Greyscale (1
- *	component) output.  With 3 components, we assume the "colorimage"
- *	operator is available.
- *
- *	Note: The picture is converted from bottom to top, to conform
- *	      with the PostScript coordinate system.
- *
- * Results:
- *	The PostScript data comprising the picture is written into the dynamic
- *	string.
- *
- *---------------------------------------------------------------------------
- */
-Blt_DBuffer 
-Blt_PictureToDBuffer(Pict *srcPtr, int nComponents)
-{
-    Blt_DBuffer dBuffer;
-    int length;
-
-    dBuffer = Blt_DBuffer_Create();
-    length = srcPtr->width * srcPtr->height * nComponents;
-    Blt_DBuffer_Resize(dBuffer, length);
-    if (nComponents == 3) {
-	Blt_Pixel *srcRowPtr;
-	int y;
-	unsigned char *bp;
-	
-	bp = Blt_DBuffer_Pointer(dBuffer);
-	srcRowPtr = srcPtr->bits + ((srcPtr->height-1) * srcPtr->pixelsPerRow);
-	for (y = (srcPtr->height - 1); y >= 0; y--) {
-	    Blt_Pixel *sp, *send;
-	    
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		bp[0] = sp->Red;
-		bp[1] = sp->Green;
-		bp[2] = sp->Blue;
-		bp += 3;
-	    }
-	    srcRowPtr -= srcPtr->pixelsPerRow;
-	}
-    } else if (nComponents == 1) {
-	Blt_Pixel *srcRowPtr;
-	int y;
-	unsigned char *bp;
-	
-	bp = Blt_DBuffer_Pointer(dBuffer);
-	srcRowPtr = srcPtr->bits + ((srcPtr->height-1) * srcPtr->pixelsPerRow);
-	for (y = (srcPtr->height - 1); y >= 0; y--) {
-	    Blt_Pixel *sp, *send;
-	    
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		*bp++ = sp->Red;
-	    }
-	    srcRowPtr -= srcPtr->pixelsPerRow;
-	}
-    }
-    Blt_DBuffer_SetLength(dBuffer, length);
-    return dBuffer;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PictureToPsData --
- *
- *	Converts a picture to PostScript RGB (3 components) or Greyscale (1
- *	component) output.  With 3 components, we assume the "colorimage"
- *	operator is available.
- *
- *	Note: The picture is converted from bottom to top, to conform
- *	      with the PostScript coordinate system.
- *
- * Results:
- *	The PostScript data comprising the picture is written
- *	into the dynamic string.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_PictureToPsData(
-    Pict *srcPtr,			/* Picture to be represented in
-					 * PostScript. */
-    int nComponents,			/* # of color components (1 or 3).  If
-					 * it's 1, we only look at red for
-					 * color information. */
-    Tcl_DString *resultPtr,		/* (out) Holds the generated
-					 * postscript */
-    const char *prefix)			/* Indicates how to prefix the start of
-					 * each line of output. This is normally
-					 * used for PostScript previews, where
-					 * each line is * comment "% ". */
-{
-    int count, nLines;
-
-    nLines = count = 0;
-    if (nComponents == 3) {
-	Blt_Pixel *srcRowPtr;
-	int y;
-
-	srcRowPtr = srcPtr->bits + ((srcPtr->height-1) * srcPtr->pixelsPerRow);
-	for (y = (srcPtr->height - 1); y >= 0; y--) {
-	    Blt_Pixel *sp, *send;
-
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		char string[10];
-
-		if (count == 0) {
-		    Tcl_DStringAppend(resultPtr, prefix, -1);
-		    Tcl_DStringAppend(resultPtr, " ", -1);
-		}
-		count += 6;
-		ByteToAsciiHex(sp->Red, string);
-		ByteToAsciiHex(sp->Green, string + 2);
-		ByteToAsciiHex(sp->Blue, string + 4);
-		string[6] = '\0';
-		if (count >= 60) {
-		    string[6] = '\n';
-		    string[7] = '\0';
-		    count = 0;
-		    nLines++;
-		}
-		Tcl_DStringAppend(resultPtr, string, -1);
-	    }
-	    srcRowPtr -= srcPtr->pixelsPerRow;
-	}
-    } else if (nComponents == 1) {
-	int y;
-	Blt_Pixel *srcRowPtr;
-
-	srcRowPtr = srcPtr->bits + ((srcPtr->height-1) * srcPtr->pixelsPerRow);
-	for (y = (srcPtr->height - 1); y >= 0; y--) {
-	    Blt_Pixel *sp, *send;
-
-	    for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-		char string[10];
-		char byte;
-
-		if (count == 0) {
-		    Tcl_DStringAppend(resultPtr, prefix, -1);
-		    Tcl_DStringAppend(resultPtr, " ", -1);
-		}
-		count += 2;
-		byte = ~(sp->Red);
-		ByteToAsciiHex(byte, string);
-		string[2] = '\0';
-		if (count >= 60) {
-		    string[2] = '\n';
-		    string[3] = '\0';
-		    count = 0;
-		    nLines++;
-		}
-		Tcl_DStringAppend(resultPtr, string, -1);
-	    }
-	    srcRowPtr -= srcPtr->pixelsPerRow;
-	}
-    }
-    if (count != 0) {
-	Tcl_DStringAppend(resultPtr, "\n", -1);
-	nLines++;
-    }
-    return nLines;
-}
-
-static double
-DefaultFilter(double x)
-{
-    if (x < 0.0) {
-	x = -x;
-    }
-    if (x < 1.0) {
-	/* f(x) = 2x^3 - 3x^2 + 1, -1 <= x <= 1 */
-	return (2.0 * x - 3.0) * x * x + 1.0;
-    }
-    return 0.0;
-}
-
-/* Just for testing */
-static double
-DummyFilter(double x)
-{
-    return FABS(x);
-}
-
-/*
- *
- * Finite filters in increasing order:
- *	Box (constant)
- *	Triangle (linear)
- *	Bell
- *	BSpline (cubic)
- *
- */
-static double
-BoxFilter(double x)
-{
-    if ((x < -0.5) || (x > 0.5)) {
-	return 0.0;
-    }
-    return 1.0;
-}
-
-static double
-TriangleFilter(double x)
-{
-    if (x < 0.0) {
-	x = -x;
-    }
-    if (x < 1.0) {
-	return (1.0 - x);
-    }
-    return 0.0;
-}
-
-static double
-BellFilter(double x)
-{
-    if (x < 0.0) {
-	x = -x;
-    }
-    if (x < 0.5) {
-	return (0.75 - (x * x));
-    }
-    if (x < 1.5) {
-	x = (x - 1.5);
-	return (0.5 * (x * x));
-    }
-    return 0.0;
-}
-
-static double
-BSplineFilter(double x)
-{
-    double x2;
-
-    if (x < 0.0) {
-	x = -x;
-    }
-    if (x < 1) {
-	x2 = x * x;
-	return ((.5 * x2 * x) - x2 + (2.0 / 3.0));
-    } else if (x < 2) {
-	x = 2 - x;
-	return ((x * x * x) / 6.0);
-    }
-    return 0.0;
-}
-
-/*
- *
- * Infinite Filters:
- *	Sinc		perfect lowpass filter
- *	Bessel		circularly symmetric 2-D filter
- *	Gaussian
- *	Lanczos3
- *	Mitchell
- */
-
-static double
-SincFilter(double x)
-{
-    x *= M_PI;
-    if (x == 0.0) {
-	return 1.0;
-    }
-    return (sin(x) / x);
-}
-
-static double
-BesselFilter(double x)
-{
-    /*
-     * See Pratt "Digital Image Processing" p. 97 for Bessel functions
-     * zeros are at approx x=1.2197, 2.2331, 3.2383, 4.2411, 5.2428, 6.2439,
-     * 7.2448, 8.2454
-     */
-#ifdef __BORLANDC__
-    return 0.0;
-#else
-    return (x == 0.0) ? M_PI / 4.0 : j1(M_PI * x) / (x + x);
-#endif
-}
-
-#define SQRT_2PI	0.79788456080286541	/* sqrt(2.0 / M_PI) */
-
-static double
-GaussianFilter(double x)
-{
-    return exp(-2.0 * x * x) * SQRT_2PI;
-}
-
-static double
-Lanczos3Filter(double x)
-{
-    if (x < 0) {
-	x = -x;
-    }
-    if (x < 3.0) {
-	return (SincFilter(x) * SincFilter(x / 3.0));
-    }
-    return 0.0;
-}
-
-#define	B		0.3333333333333333	/* (1.0 / 3.0) */
-#define	C		0.3333333333333333	/* (1.0 / 3.0) */
-
-static double
-MitchellFilter(double x)
-{
-    double x2;
-
-    x2 = x * x;
-    if (x < 0) {
-	x = -x;
-    }
-    if (x < 1.0) {
-	x = (((12.0 - 9.0 * B - 6.0 * C) * (x * x2)) +
-	    ((-18.0 + 12.0 * B + 6.0 * C) * x2) + (6.0 - 2 * B));
-	return (x / 6.0);
-    } else if (x < 2.0) {
-	x = (((-1.0 * B - 6.0 * C) * (x * x2)) + ((6.0 * B + 30.0 * C) * x2) +
-	    ((-12.0 * B - 48.0 * C) * x) + (8.0 * B + 24 * C));
-	return (x / 6.0);
-    }
-    return 0.0;
-}
-
-/*
- * Catmull-Rom spline
- */
-static double
-CatRomFilter(double x)
-{
-    if (x < -2.) {
-	return 0.0;
-    }
-    if (x < -1.0) {
-	return 0.5 * (4.0 + x * (8.0 + x * (5.0 + x)));
-    }
-    if (x < 0.0) {
-	return 0.5 * (2.0 + x * x * (-5.0 + x * -3.0));
-    }
-    if (x < 1.0) {
-	return 0.5 * (2.0 + x * x * (-5.0 + x * 3.0));
-    }
-    if (x < 2.0) {
-	return 0.5 * (4.0 + x * (-8.0 + x * (5.0 - x)));
-    }
-    return 0.0;
-}
-
-/* approximation to the gaussian integral [x, inf) */
-static double
-GiFilter(double x)
-{
-    if (x > 1.5) {
-	return 0.0;
-    } else if (x < -1.5) {
-	return 1.0;
-    } else {
-#define I6 0.166666666666667
-#define I4 0.25
-#define I3 0.333333333333333
-	double x2 = x * x;
-	double x3 = x2 * x;
-
-	if (x > 0.5) {
-	    return .5625  - ( x3 * I6 - 3 * x2 * I4 + 1.125 * x);
-	} else if (x > -0.5) {
-	    return 0.5    - (0.75 * x - x3 * I3);
-	} else {
-	    return 0.4375 + (-x3 * I6 - 3 * x2 * I4 - 1.125 * x);
-	}
-    }
-}
-
-static ResampleFilter resampleFilters[] =
-{
-    /* Name,     Function,		     Support */
-    {"bell",     BellFilter,		     1.5	 },
-    {"bessel",   BesselFilter,		     3.2383      },
-    {"box",      BoxFilter,		     0.5         },
-    {"bspline",  BSplineFilter,		     2.0	 },
-    {"catrom",   CatRomFilter,		     2.0	 },
-    {"default",  DefaultFilter,		     1.0	 },
-    {"dummy",    DummyFilter,		     0.5	 },
-    {"gauss8",   GaussianFilter,	     8.0	 },
-    {"gaussian", GaussianFilter,	     1.25	 },
-    {"gi",	 GiFilter,		     4.0	 },
-    {"gi8",	 GiFilter,		     8.0	 },
-    {"lanczos3", Lanczos3Filter,	     3.0	 },
-    {"mitchell", MitchellFilter,	     2.0	 },
-    {"none",     (Blt_ResampleFilterProc *)NULL, 0.0	 },
-    {"sinc",     SincFilter,		     4.0	 },
-    {"sinc8",    SincFilter,		     8.0	 },
-    {"sinc12",   SincFilter,		     12.0	 }, 
-    {"tent",	 TriangleFilter,	     1.0	 },
-    {"triangle", TriangleFilter,	     1.0	 },
-};
-
-static int nFilters = sizeof(resampleFilters) / sizeof(ResampleFilter);
-
-Blt_ResampleFilter bltBoxFilter = &(resampleFilters[2]);
-Blt_ResampleFilter bltMitchellFilter = &(resampleFilters[11]);
-Blt_ResampleFilter bltBellFilter = &(resampleFilters[0]);
-Blt_ResampleFilter bltTentFilter = &(resampleFilters[16]);
-
-const char *
-Blt_NameOfResampleFilter(ResampleFilter *filterPtr)
-{
-    return filterPtr->name;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetResampleFilterFromObj --
- *
- *      Finds a 1-D filter associated by the given filter name.
- *
- * Results:
- *      A standard TCL result.  Returns TCL_OK is the filter was found.  The
- *      filter information (proc and support) is returned via
- *      filterPtrPtr. Otherwise TCL_ERROR is returned and an error message is
- *      left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetResampleFilterFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
-			     ResampleFilter **filterPtrPtr)
-{
-    ResampleFilter *fp, *fend;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    for (fp = resampleFilters, fend = fp + nFilters; fp < fend; fp++) {
-	if (strcmp(string, fp->name) == 0) {
-	    *filterPtrPtr = (fp->proc == NULL) ? NULL : fp;
-	    return TCL_OK;
-	}
-    }
-    if (interp != NULL) {
-	Tcl_AppendResult(interp, "can't find filter \"", string, "\"", 
-		     (char *)NULL);
-    }
-    return TCL_ERROR;
-}
-
-#ifdef notdef
-int
-Blt_GetTableFilterFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
-			  TableFilter **filterPtrPtr)
-{
-    TableFilter *filterPtr;
-    Tcl_Obj **objv;
-    double scale;
-    int objc;
-
-    /* Next see if it's a table (list of numbers) */
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;	/* Can't split object. */
-    }
-    if (Tcl_GetDoubleFromObj(interp, objv[0], &scale) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    objc--, objv++;
-    if ((objc & 0x1) == 0) {
-	Tcl_AppendResult(interp, "# of values in 1-D filter \"", string, 
-		"\" must be odd", (char *)NULL);
-	return TCL_ERROR;
-    }
-    filterPtr = Blt_AssertMalloc(sizeof(TableFilter) + (sizeof(int) * objc));
-    filterPtr->nWeights = objc;
-    filterPtr->scale = (float)scale;
-    { 
-	int *tp, *tend, i;
-
-	i = 0;
-	for (tp = filterPtr->table, tend < tp + objc; tp < tend; tp++, i++) {
-	    if (Tcl_GetIntFromObj(interp, objv[i], tp) != TCL_OK) {
-		Blt_Free(filterPtr);
-		return TCL_ERROR;
-	    }
-	}
-    }
-    *filterPtrPtr = filterPtr;
-    return TCL_OK;
-}
-#endif
-
-unsigned int
-Blt_ComputeWeights(unsigned int sw, unsigned int dw, ResampleFilter *filterPtr,
-		   Sample **samplePtrPtr)
-{
-    Sample *samples;
-    double scale;
-    size_t bytesPerSample;
-
-    /* Pre-calculate filter contributions for a row or column. */
-    scale = (double)dw / (double)sw;
-    if (scale < 1.0) {
-	Sample *samplePtr;
-	double r, fscale;
-	int filterSize, x;
-
-	/* Downsample */
-
-	r = filterPtr->support / scale;
-	fscale = 1.0 / scale;
-	filterSize = (int)(r * 2 + 2);
-
-	bytesPerSample = sizeof(Sample) + 
-	    ((filterSize - 1) * sizeof(PixelWeight));
-	samples = Blt_AssertCalloc(dw, bytesPerSample);
-	samplePtr = samples;
-#define DEBUG 0
-#if DEBUG
-	fprintf(stderr, "downscale=%g, fscale=%g, radius=%g\n", 
-		scale, fscale, r);
-#endif
-	for (x = 0; x < dw; x++) {
-	    PixelWeight *wp;
-	    double sum, center, factor;
-	    int i, left, right;	/* filter bounds */
-
-	    center = ((double)x) * fscale;
-
-	    /* Determine bounds of filter and its density */
-#ifndef notdef
-	    left = (int)/*floor*/(center - r);
-#else
-	    left = CRoundToInt(center - r);
-#endif
-	    if (left < 0) {
-		left = 0;
-	    }
-#ifndef notdef
-	    right = (int)/*floor*/(center + r);
-#else
-	    right = CRoundToInt(center + r);
-#endif
-	    if (right >= sw) {
-		right = sw - 1;
-	    }
-	    samplePtr->start = left;
-	    samplePtr->wend = samplePtr->weights + (right - left + 1);
-
-	    sum = 0.0;
-	    for (wp = samplePtr->weights, i = left; i <= right; i++, wp++) {
-		double val = ((double)i - center) * scale;
-		wp->f32 = (float)(*filterPtr->proc)(val);
-		sum += wp->f32;
-	    }
-
-	    factor = (sum == 0.0) ? 1.0 : (1.0 / sum);
-	    for (wp = samplePtr->weights; wp < samplePtr->wend; wp++) {
-		wp->f32 = (float)(wp->f32 * factor);
-		wp->i32 = float2si(wp->f32);
-	    }
-	    samplePtr = (Sample *)((char *)samplePtr + bytesPerSample);
-	}
-    } else {
-	Sample *samplePtr;
-	double fscale;
-	int filterSize, x;
-
-	/* Upsample */
-
-	filterSize = (int)(filterPtr->support * 2 + 2);
-	bytesPerSample = sizeof(Sample) + 
-	    ((filterSize - 1) * sizeof(PixelWeight));
-	samples = Blt_AssertCalloc(dw, bytesPerSample);
-	fscale = 1.0 / scale;
-
-	samplePtr = samples;
-#if DEBUG
-	fprintf(stderr, "upscale=%g, fscale=%g, radius=%g\n",
-		    scale, fscale, filterPtr->support);
-#endif
-	for (x = 0; x < dw; x++) {
-	    PixelWeight *wp;
-	    double sum, center, factor;
-	    int i, left, right;	/* filter bounds */
-
-	    center = ((double)x) * fscale;
-#ifndef notdef
-	    left = (int)(center - filterPtr->support);
-#else
-	    left = CRoundToInt(center - filterPtr->support);
-#endif
-	    if (left < 0) {
-		left = 0;
-	    }
-#ifndef notdef
-	    right = (int)(center + filterPtr->support);
-#else
-	    right = CRoundToInt(center + filterPtr->support);
-#endif
-	    if (right >= sw) {
-		right = sw - 1;
-	    }
-	    samplePtr->start = left;
-	    samplePtr->wend = samplePtr->weights + (right - left + 1);
-
-	    /* Sum the contributions for each pixel in the filter. */
-	    sum = 0.0;
-	    for (wp = samplePtr->weights, i = left; i <= right;i++, wp++) {
-		wp->f32 = (float) (*filterPtr->proc) ((double)i - center);
-		sum += wp->f32;
-	    }
-
-	    /* The sum of the contributions should not be greater than 1.0 */
-	    factor = (sum == 0.0) ? 1.0 : (1.0 / sum);
-
-	    for (wp = samplePtr->weights; wp < samplePtr->wend; wp++) {
-#ifdef notdef
-		fprintf(stderr, "w[%d]=%g, %g sum=%g\n", 
-			wp - samplePtr->weights, 
-			wp->f32, wp->f32 * factor, sum);
-#endif
-		wp->f32 = (float)(wp->f32 * factor);
-		/* Convert each weight into a fixed-point scaled integer */
-		wp->i32 = float2si(wp->f32);
-
-	    }
-	    /* Go to the next sample. */
-	    samplePtr = (Sample *)((char *)samplePtr + bytesPerSample);
-	}
-    }
-    *samplePtrPtr = samples;
-    return bytesPerSample;
-}
-
-static void
-ZoomVertically(Pict *destPtr, Pict *srcPtr, Blt_ResampleFilter filter)
-{
-    Sample *samples, *send;
-    int x;
-    int bytesPerSample;			/* Size of sample. */
-
-    /* Pre-calculate filter contributions for each row. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->height, destPtr->height, 
-	filter, &samples);
-    send = (Sample *)((char *)samples + (destPtr->height * bytesPerSample));
-
-    /* Apply filter to each row. */
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColPtr;
-	Sample *samplePtr;
-	int dummy;
-
-	srcColPtr = srcPtr->bits + x;
-	dp = destPtr->bits + x;
-	for (samplePtr = samples; samplePtr < send; 
-	     samplePtr = (Sample *)((char *)samplePtr + bytesPerSample)) {
-	    Blt_Pixel *sp;
-	    int r, g, b, a;
-	    PixelWeight *wp;
-
-	    r = g = b = a = 0;
-	    sp = srcColPtr + (samplePtr->start * srcPtr->pixelsPerRow);
-	    for (wp = samplePtr->weights; wp < samplePtr->wend; wp++) {
-		a += wp->i32 * sp->Alpha;
-		r += wp->i32 * sp->Red;
-		g += wp->i32 * sp->Green;
-		b += wp->i32 * sp->Blue;
-		sp += srcPtr->pixelsPerRow;
-	    }
-	    dummy = 0;
-	    dp->Alpha = SICLAMP(a);
-	    dp->Red   = SICLAMP(r);
-	    dp->Green = SICLAMP(g);
-	    dp->Blue  = SICLAMP(b);
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "v1: alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp += destPtr->pixelsPerRow;
-
-	}
-    }
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(samples);
-}
-
-static void
-ZoomHorizontally(Pict *destPtr, Pict *srcPtr, Blt_ResampleFilter filter)
-{
-    Sample *samples, *send;
-    int y;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int bytesPerSample;			/* Size of sample. */
-
-    /* Pre-calculate filter contributions for each column. */
-    bytesPerSample = Blt_ComputeWeights(srcPtr->width, destPtr->width, 
-	filter, &samples);
-    send = (Sample *)((char *)samples + (destPtr->width * bytesPerSample));
-
-    /* Apply filter to each column. */
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	Sample *samplePtr;
-
-	dp = destRowPtr;
-	for (samplePtr = samples; samplePtr < send; 
-	     samplePtr = (Sample *)((char *)samplePtr + bytesPerSample)) {
-	    Blt_Pixel *sp;
-	    int r, g, b, a;
-	    PixelWeight *wp;
-
-	    r = g = b = a = 0;
-	    sp = srcRowPtr + samplePtr->start;
-	    for (wp = samplePtr->weights; wp < samplePtr->wend; wp++) {
-		a += wp->i32 * sp->Alpha;
-		r += wp->i32 * sp->Red;
-		g += wp->i32 * sp->Green;
-		b += wp->i32 * sp->Blue;
-		sp++;
-	    }
-	    dp->Alpha = SICLAMP(a);
-	    dp->Red   = SICLAMP(r);
-	    dp->Green = SICLAMP(g);
-	    dp->Blue  = SICLAMP(b);
-#ifdef notdef
-	    if (dp->Alpha != 0xFF) {
-		fprintf(stdout, "h1: alpha=0x%x\n", dp->Alpha);
-	    }
-#endif
-	    dp++;
-	}
-	srcRowPtr  += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    /* Free the memory allocated for horizontal filter weights. */
-    Blt_Free(samples);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResamplePicture --
- *
- *      Resamples a given picture using 1-D filters and returns a new picture
- *      of the designated size.
- *
- * Results:
- *      Returns the resampled picture. The original picture
- *	is left intact.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResamplePicture(Pict *destPtr, Pict *srcPtr, Blt_ResampleFilter hFilter, 
-		    Blt_ResampleFilter vFilter)
-{
-    Pict *tmpPtr;
-
-    tmpPtr = Blt_CreatePicture(destPtr->width, srcPtr->height);
-
-    /* 
-     * It's usually faster to zoom vertically last.  This has to do with the
-     * fact that pictures are stored in contiguous rows.
-     */
-    Blt_ZoomHorizontally(tmpPtr, srcPtr, hFilter);
-    Blt_ZoomVertically(destPtr, tmpPtr, vFilter);
-    Blt_FreePicture(tmpPtr);
-    destPtr->flags = srcPtr->flags;
-    destPtr->flags |= BLT_PIC_DIRTY;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResamplePhoto --
- *
- *      Resamples a Tk photo image using 1-D filters and writes the image into
- *      another Tk photo.  It is possible for the source and destination to be
- *      the same photo.
- *
- * Results:
- *      The designated destination photo will contain the resampled
- *      picture. The original photo is left intact.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResamplePhoto(
-    Tk_PhotoHandle srcPhoto,		/* Source photo image to scale */
-    int x, int y,
-    int width, int height,
-    Tk_PhotoHandle destPhoto,		/* Resulting scaled photo image */
-    Blt_ResampleFilter hFilter, 
-    Blt_ResampleFilter vFilter)
-{
-    Blt_Picture src, dest;
-    Tk_PhotoImageBlock dib;
-
-    Tk_PhotoGetImage(destPhoto, &dib);
-    src = Blt_PhotoAreaToPicture(srcPhoto, x, y, width, height);
-    dest = Blt_CreatePicture(dib.width, dib.height);
-    Blt_ResamplePicture(dest, src, hFilter, vFilter);
-    Blt_FreePicture(src);
-    Blt_PictureToPhoto(dest, destPhoto);
-    Blt_FreePicture(dest);
-}
-#endif
-
-static void
-FillScaleTables(
-    int sw, int sh,			/* Dimension of source. */
-    int ax, int ay,			/* Origin of requested area. */
-    int aw, int ah,			/* Dimension of requested area. */
-    int dw, int destHeight,		/* Desired new dimension. */
-    int *mapX, int *mapY)		/* (out) Resulting mapping tables. */
-{
-    int left, right, top, bottom;
-    double xScale, yScale;
-    int x, y;
-
-    left = ax;
-    top = ay;
-    right = MIN(sw, ax + aw) - 1;
-    bottom = MIN(sh, ay + ah) - 1;
-
-    xScale = (double)aw / (double)dw;
-    for (x = 0; x < dw; x++) {
-	int sx;
-	
-	sx = (int)(xScale * (double)x);
-	sx += left;
-	if (sx > right) {
-	    sx = right;
-	}
-	mapX[x] = sx;
-    }
-    yScale = (double)ah / (double)destHeight;
-    for (y = 0; y < destHeight; y++) {
-	int sy;
-	
-	sy = (int)(yScale * (double)y);
-	sy += top;
-	if (sy > bottom) {
-	    sy = bottom;
-	}
-	mapY[y] = sy;
-    }
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizePhoto --
- *
- *	Scales the region of the source image to the size of the destination
- *	image.  This routine performs raw scaling of the image and unlike
- *	Blt_ResamplePhoto does not handle aliasing effects from subpixel
- *	sampling. It is possible for the source and destination to be the same
- *	photo.
- *
- * Results:
- *      The designated destination photo will contain the resampled
- *      picture. The original photo is left intact.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResizePhoto(
-    Tk_PhotoHandle srcPhoto,		/* Source photo image to scaled. */
-    int srcX, int srcY,			/* Area of source photo to be scaled. */
-    int sw, int sh,
-    Tk_PhotoHandle destPhoto)		/* (out) Resulting scaled photo image.
-					 * Scaling factors are derived from the
-					 * destination photo's dimensions. */
-{
-    Pict *destPtr;
-    Tk_PhotoImageBlock sib, dib;	/* Source and destination image
-					 * blocks. */
-    int *mapX, *mapY;
-    int ir, ib, ig, ia;
-
-    Tk_PhotoGetImage(srcPhoto, &sib);
-    Tk_PhotoGetImage(destPhoto, &dib);
-    mapX = (int *)Blt_AssertMalloc(sizeof(int) * dib.width);
-    mapY = (int *)Blt_AssertMalloc(sizeof(int) * dib.height);
-    FillScaleTables(sib.width, sib.height, srcX, srcY, sw, 
-	sh, dib.width, dib.height, mapX, mapY);
-
-    destPtr = Blt_CreatePicture(dib.width, dib.height);
-    ir = sib.offset[0];
-    ig = sib.offset[1];
-    ib = sib.offset[2];
-    ia = sib.offset[3];
-
-    if (sib.pixelSize == 4) {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-	for (y = 0; y < dib.height; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *srcRowPtr;
-
-	    dp = destRowPtr;
-	    srcRowPtr = sib.pixelPtr + (mapY[y] * sib.pitch);
-	    for (x = 0; x < dib.width; x++) {
-		unsigned char *sp;
-
-		sp = srcRowPtr + (mapX[x] * sib.pixelSize);
-		dp->Red = sp[ir];
-		dp->Green = sp[ig];
-		dp->Blue = sp[ib];
-		dp->Alpha = sp[ia];
-		dp++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } else if (sib.pixelSize == 3) {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-	for (y = 0; y < dib.height; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *srcRowPtr;
-
-	    dp = destRowPtr;
-	    srcRowPtr = sib.pixelPtr + (mapY[y] * sib.pitch);
-	    for (x = 0; x < dib.width; x++) {
-		unsigned char *sp;
-
-		sp = srcRowPtr + (mapX[x] * sib.pixelSize);
-		dp->Red = sp[ir];
-		dp->Green = sp[ig];
-		dp->Blue = sp[ib];
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    } else  {
-	Blt_Pixel *destRowPtr;
-	int x, y;
-
-	destRowPtr = destPtr->bits;
-	for (y = 0; y < dib.height; y++) {
-	    Blt_Pixel *dp;
-	    unsigned char *srcRowPtr;
-
-	    dp = destRowPtr;
-	    srcRowPtr = sib.pixelPtr + (mapY[y] * sib.pitch);
-	    for (x = 0; x < dib.width; x++) {
-		unsigned char *sp;
-
-		sp = srcRowPtr + (mapX[x] * sib.pixelSize);
-		dp->Red = dp->Green = dp->Blue = sp[ir];
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-    }	
-    Blt_Free(mapX);
-    Blt_Free(mapY);
-    Blt_PictureToPhoto(destPtr, destPhoto);
-    Blt_FreePicture(destPtr);
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScalePicture --
- *
- *	Scales the region of the source picture to the size requested.  This
- *	routine performs raw scaling of the image and unlike Blt_ResamplePhoto
- *	does not do any filtering.
- *
- *          src picture
- *      +===================+
- *      |                   |              dest picture
- *      |                   |            +==============+
- *      | x,y               |            |              |
- *      |  *-------*        |            |              |
- *      |  | area  |        |            |              |
- *      |  |       |        |            |              |
- *      |  |       | height |            |              | 
- *      |  |       |        |            |              |
- *      |  *-------*        |            |              |
- *      |    width          |            |              |
- *      |                   |            +==============+
- *      |                   |
- *      +===================+
- *
- *		x ratio = dest width / area width
- *		y ratio = dest height / area height
- *		
- *
- * Results:
- *      Returns the new resized picture.  The original picture is left intact.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_ScalePicture(
-    Pict *srcPtr,			/* Source picture to be scaled. */
-    int sx, int sy,			/* Area of source picture to scaled. */
-    int sw, int sh,
-    int reqWidth, int reqHeight)	/* Requested dimensions of the scaled
-					 * picture. */
-{
-    Pict *destPtr;
-    Blt_Pixel *destRowPtr;
-    int *mapX, *mapY;
-    int y;
-
-    mapX = (int *)Blt_AssertMalloc(sizeof(int) * reqWidth);
-    mapY = (int *)Blt_AssertMalloc(sizeof(int) * reqHeight);
-    FillScaleTables(srcPtr->width, srcPtr->height, sx, sy, sw, sh, 
-	reqWidth, reqHeight, mapX, mapY);
-
-    destPtr = Blt_CreatePicture(reqWidth, reqHeight);
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < reqHeight; y++) {
-	Blt_Pixel *dp;
-	Blt_Pixel *srcRowPtr;
-	int x;
-
-	dp = destRowPtr;
-	srcRowPtr = srcPtr->bits + (srcPtr->pixelsPerRow * mapY[y]);
-	for (x = 0; x < reqWidth; x++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcRowPtr + mapX[x];
-	    dp->u32 = sp->u32;		/* Copy the pixel. */
-	    dp++;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    Blt_Free(mapX), Blt_Free(mapY);
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScalePictureArea --
- *
- *	Scales the region of the source picture to the size of the destination
- *	image.  This routine performs raw scaling of the image and unlike
- *	Blt_ResamplePhoto does not perform any antialiasing.
- *
- * Results:
- *      Returns the new resized picture.  The original picture is left intact.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_ScalePictureArea(
-    Pict *srcPtr,			/* Source picture to be scaled. */
-    int ax, int ay,			/* Origin of area in source picture. */
-    int aw, int ah,			/* Dimension of area to be scaled. */
-    int dw, int dh)			/* Dimensions of the destination scaled
-					   image. */
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    double xScale, yScale;
-    int *mapX, *mapY;
-    int x, y;
-
-    xScale = (double)srcPtr->width / (double)dw;
-    yScale = (double)srcPtr->height / (double)dh;
-    mapX = Blt_AssertMalloc(sizeof(int) * aw);
-    mapY = Blt_AssertMalloc(sizeof(int) * ah);
-
-    /* Precompute scaling factors for each row and column. */
-    for (x = 0; x < aw; x++) {
-	int sx;
-
-	sx = (int)(xScale * (double)(x + ax));
-	if (sx >= srcPtr->width) {
-	    sx = srcPtr->width - 1;
-	} 
-	mapX[x] = sx;
-    }
-    for (y = 0; y < ah; y++) {
-	int sy;
-
-	sy = (int)(yScale * (double)(y + ay));
-	if (sy > srcPtr->height) {
-	    sy = srcPtr->height - 1;
-	} 
-	mapY[y] = sy;
-    }
-
-    destPtr = Blt_CreatePicture(aw, ah);
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < ah; y++) {
-	Blt_Pixel *dp;
-
-	dp = destRowPtr;
-	srcRowPtr = srcPtr->bits + (srcPtr->pixelsPerRow * mapY[y]);
-	for (x = 0; x < aw; x++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcRowPtr + mapX[x];
-	    dp->u32 = sp->u32;		/* Copy the pixel. */
-	    dp++;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    Blt_Free(mapX), Blt_Free(mapY);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SnapPhoto --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and writes it to
- *      an existing Tk photo image.
- *
- * Results:
- *      A standard TCL result.
- *
- * Side Effects:
- *	The named Tk photo is updated with the snapshot.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_SnapPhoto(
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to */
-    Tk_Window tkwin,
-    Drawable drawable,			/* Window or pixmap to be snapped */
-    int x, int y,			/* Offset of image from drawable
-					 * origin. */
-    int width, int height,		/* Dimension of the drawable */
-    int dw, int dh,			/* Desired size of the destination Tk
-					 * photo. */
-    const char *photoName,		/* Name of a current Tk photo image. */
-    float gamma)
-{
-    Tk_PhotoHandle photo;		/* The photo image to write into. */
-    Blt_Picture pict;
-
-    photo = Tk_FindPhoto(interp, photoName);
-    if (photo == NULL) {
-	Tcl_AppendResult(interp, "can't find photo \"", photoName, "\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    pict = Blt_DrawableToPicture(tkwin, drawable, x, y, width, height, gamma);
-    if (pict == NULL) {
-	Tcl_AppendResult(interp,
-	    "can't grab window or pixmap (possibly obscured?)", (char *)NULL);
-	return TCL_ERROR;		/* Can't grab window image */
-    }
-    if ((dw != width) || (dh != height)) {
-	Blt_Picture dest;
-
-	/*
-	 * The requested size for the destination image is different than that
-	 * of the source snapshot.  Resample the image as necessary.  We'll
-	 * use a cheap box filter. I'm assuming that the destination image
-	 * will typically be smaller than the original.
-	 */
-	dest = Blt_CreatePicture(dw, dh);
-	Blt_ResamplePicture(dest, pict, bltBoxFilter, bltBoxFilter);
-	Blt_FreePicture(pict);
-	pict = dest;
-    }
-    Blt_PictureToPhoto(pict, photo);
-    Blt_FreePicture(pict);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SnapPhoto --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and writes it to
- *      an existing Tk photo image.
- *
- * Results:
- *      A standard TCL result.
- *
- * Side Effects:
- *	The named Tk photo is updated with the snapshot.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_SnapPicture(
-    Tcl_Interp *interp,			/* Interpreter to return results. */
-    Tk_Window tkwin,
-    Drawable drawable,			/* Window or pixmap to be snapped */
-    int x, int y,			/* Offset of image in drawable
-					 * origin. */
-    int width, int height,		/* Dimension of the drawable. */
-    int dw, int dh,			/* Desired size of the destination
-					 * picture. */
-    const char *imageName,		/* Name of a current picture image. */
-    float gamma)
-{
-    Blt_Picture pict;
-
-    pict = Blt_DrawableToPicture(tkwin, drawable, x, y, width, height, gamma);
-    if (pict == NULL) {
-	Tcl_AppendResult(interp,
-	    "can't grab window or pixmap (possibly obscured?)", (char *)NULL);
-	return TCL_ERROR;		/* Can't grab window image */
-    }
-    if ((dw != width) || (dh != height)) {
-	Blt_Picture dest;
-
-	/*
-	 * The requested size for the destination image is different than that
-	 * of the source snapshot.  Resample the image as necessary.  We'll
-	 * use a cheap box filter. I'm assuming that the destination image
-	 * will typically be smaller than the original.
-	 */
-	dest = Blt_CreatePicture(dw, dh);
-	Blt_ResamplePicture(dest, pict, bltBoxFilter, bltBoxFilter);
-	Blt_FreePicture(pict);
-	pict = dest;
-    }
-    if (Blt_ResetPicture(interp, imageName, pict) == TCL_OK) {
-	return TCL_OK;
-    }
-    Blt_FreePicture(pict);
-    return TCL_ERROR;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * ShearY --
- *
- *	Shears a row horizontally.  Antialiasing limited to filtering two
- *	adjacent pixels.  So the shear angle must be between +-45 degrees.
- *	
- * Results:   
- *	None.
- *
- * Side Effects:
- *	The sheared image is drawn into the destination picture.
- *
- *---------------------------------------------------------------------------
- */
-static void 
-ShearY(
-    Pict *destPtr, 
-    Pict *srcPtr,
-    int y,				/* Designates the row to be sheared */
-    int offset,				/* Difference between of.  Note: don't
-					 * assume that offset is always
-					 * positive.  */
-    double frac,
-    Blt_Pixel *bg)
-{
-    Blt_Pixel *sp, *dp;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int x, dx;
-    Blt_Pixel left;
-    unsigned char alpha;
-    int t;
-
-    assert(frac >= 0.0 && frac <= 1.0);
-    destRowPtr = destPtr->bits + (y * destPtr->pixelsPerRow);
-    srcRowPtr = srcPtr->bits + (y * srcPtr->pixelsPerRow);
-
-    for (dp = destRowPtr, x = 0; x < offset; x++, dp++) { 
-        dp->u32 = bg->u32;
-    }
-    dp = destRowPtr + offset;
-    sp = srcRowPtr;
-    dx = offset;
-
-    alpha = (unsigned char)(frac * 255.0 + 0.5);
-    left.Red   = imul8x8(alpha, bg->Red, t);
-    left.Green = imul8x8(alpha, bg->Green, t);
-    left.Blue  = imul8x8(alpha, bg->Blue, t);
-    left.Alpha = imul8x8(alpha, bg->Alpha, t);
-
-    for (x = 0; x < srcPtr->width; x++, dx++) { /* Loop through row pixels */
-	Blt_Pixel right;
-	int t;
-
-	right.Red   = imul8x8(alpha, sp->Red, t);
-	right.Green = imul8x8(alpha, sp->Green, t);
-	right.Blue  = imul8x8(alpha, sp->Blue, t);
-	right.Alpha = imul8x8(alpha, sp->Alpha, t);
-        if ((dx >= 0) && (dx < destPtr->width)) {
-	    int r, b, g, a;
-
-	    r = sp->Red   - (right.Red   - left.Red);
-	    g = sp->Green - (right.Green - left.Green);
-	    b = sp->Blue  - (right.Blue  - left.Blue);
-	    a = sp->Alpha - (right.Alpha - left.Alpha);
-	    if (sp->Alpha == 0) {
-		a = 0;
-	    }
-	    dp->Red   = UCLAMP(r);
-	    dp->Green = UCLAMP(g);
-	    dp->Blue  = UCLAMP(b);
-	    dp->Alpha = UCLAMP(a);
-        }
-	left.u32 = right.u32;
-	sp++, dp++;
-    }
-    x = srcPtr->width + offset;  
-    dp = destPtr->bits + (y * destPtr->pixelsPerRow) + x;
-    if (x < destPtr->width) {
-	dp->u32 = left.u32;
-	dp++;
-    }
-    for (x++; x < destPtr->width; x++, dp++) {
-        dp->u32 = bg->u32;
-    }
-}  
-
-/* 
- *---------------------------------------------------------------------------
- *
- * ShearX --
- *
- *	Shears a column. Antialiasing is limited to filtering two adjacent
- *	pixels.  So the shear angle must be between +-45 degrees.
- *	
- * Results:   
- *	None.
- *
- * Side Effects:
- *	The sheared image is drawn into the destination picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-ShearX(
-    Pict *destPtr, 
-    Pict *srcPtr,
-    int x,				/* Column in source image to be
-					 * sheared. */
-    int offset,				/* Offset of */
-    double frac,			/* Fraction of subpixel. */
-    Blt_Pixel *bg)
-{
-    Blt_Pixel *sp, *dp;
-    int y, dy;
-    unsigned char alpha;
-    Blt_Pixel left;			/* Old left values of shear. */
-    int t;
-
-    assert(frac >= 0.0 && frac <= 1.0);
-    dp = destPtr->bits + x;
-    for (y = 0; y < offset; y++) {
-        dp->u32 = bg->u32;
-	dp += destPtr->pixelsPerRow;
-    }
-
-
-    dp = destPtr->bits + (offset * destPtr->pixelsPerRow) + x;
-    sp = srcPtr->bits + x;
-    alpha = (unsigned char)(frac * 255.0 + 0.5);
-    left.Red   = imul8x8(alpha, bg->Red, t);
-    left.Green = imul8x8(alpha, bg->Green, t);
-    left.Blue  = imul8x8(alpha, bg->Blue, t);
-    left.Alpha = imul8x8(alpha, bg->Alpha, t);
-    for (dy = offset, y = 0; y < srcPtr->height; y++, dy++) {
-	Blt_Pixel right;
-	int t;
-
-	right.Red   = imul8x8(alpha, sp->Red, t);
-	right.Green = imul8x8(alpha, sp->Green, t);
-	right.Blue  = imul8x8(alpha, sp->Blue, t);
-	right.Alpha = imul8x8(alpha, sp->Alpha, t);
-        if ((dy >= 0) && (dy < destPtr->height)) {
-	    int r, g, b, a;
-
-	    r = sp->Red   - (right.Red   - left.Red);
-	    g = sp->Green - (right.Green - left.Green);
-	    b = sp->Blue  - (right.Blue  - left.Blue);
-	    a = sp->Alpha - (right.Alpha - left.Alpha);
-	    if (sp->Alpha == 0) {
-		a = 0;
-	    }
-	    dp->Red   = UCLAMP(r);
-	    dp->Green = UCLAMP(g);
-	    dp->Blue  = UCLAMP(b);
-	    dp->Alpha = UCLAMP(a);
-        }
-	left.u32 = right.u32;
-	sp += srcPtr->pixelsPerRow; 
-	dp += destPtr->pixelsPerRow;
-    }
-    y = srcPtr->height + offset;  
-
-    dp = destPtr->bits + (y * destPtr->pixelsPerRow) + x;
-    if (y < destPtr->height) {
-	dp->u32 = left.u32;
-	dp += destPtr->pixelsPerRow;
-    }
-    
-    for (y++; y < destPtr->height; y++) {
-	dp->u32 = bg->u32;
-	dp += destPtr->pixelsPerRow; 
-    }
-}  
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Rotate45 --
- *
- *	Rotates an image by a given angle.  The angle must be in the range
- *	-45.0 to 45.0 inclusive.  Anti-aliasing filtering is performed on two
- *	adjacent pixels, so the angle can't be so great as to force a sheared
- *	pixel to occupy 3 destination pixels.  Performs a three shear rotation
- *	described below.
- *
- *	Reference: Alan W. Paeth, "A Fast Algorithm for General Raster
- *		   Rotation", Graphics Gems, pp 179-195.  
- *
- *
- * Results:  
- *	Returns a newly allocated rotated image.
- *
- * -------------------------------------------------------------------------- 
- */
-static Blt_Picture
-Rotate45(Pict *srcPtr, float angle, Blt_Pixel *bg)
-{
-    Pict *shear1Ptr, *shear2Ptr, *destPtr;
-    double  skewf;
-    double sinTheta, cosTheta, tanTheta;
-    int skewi;
-    int shearWidth, shearHeight;
-    int x, y;
-
-    sinTheta = sin(angle);
-    cosTheta = cos(angle);
-    tanTheta = tan(angle * 0.5);
-    
-    shearWidth = srcPtr->width + (int)(srcPtr->height * FABS(tanTheta));
-    shearHeight = srcPtr->height;
-
-    /* 1st shear */
-
-    shear1Ptr = Blt_CreatePicture(shearWidth, shearHeight);
-    if (tanTheta >= 0.0) {	/* Positive angle */
-	for (y = 0; y < shearHeight; y++) {  
-	    skewf = (y + 0.5) * tanTheta;
-	    skewi = (int)floor(skewf);
-	    ShearY(shear1Ptr, srcPtr, y, skewi, skewf - skewi, bg);
-	}
-    } else {			/* Negative angle */
-	for (y = 0; y < shearHeight; y++) {  
-	    skewf = ((y - srcPtr->height) + 0.5) * tanTheta;
-	    skewi = (int)floor(skewf);
-	    ShearY(shear1Ptr, srcPtr, y, skewi, skewf - skewi, bg);
-	}
-    }
-    shearHeight = 
-	(int)(srcPtr->width * FABS(sinTheta) + srcPtr->height * cosTheta) + 1;
-
-    shear2Ptr = Blt_CreatePicture(shearWidth, shearHeight);
-    /* 2nd shear */
-
-    if (sinTheta > 0.0) {		/* Positive angle */
-        skewf = (srcPtr->width - 1) * sinTheta;
-    } else {				/* Negative angle */
-        skewf = (srcPtr->width - shearWidth) * -sinTheta;
-    }
-    for (x = 0; x < shearWidth; x++) {
-	skewi = (int)floor(skewf);
-        ShearX(shear2Ptr, shear1Ptr, x, skewi, skewf - skewi, bg);
-	skewf -= sinTheta;
-    }
-
-    Blt_FreePicture(shear1Ptr);
-
-    /* 3rd shear */
-
-    shearWidth = 
-	(int)(srcPtr->height * FABS(sinTheta) + srcPtr->width * cosTheta) + 1;
-
-    destPtr = Blt_CreatePicture(shearWidth, shearHeight);
-    if (sinTheta >= 0.0) {		/* Positive angle */
-        skewf = (srcPtr->width - 1) * sinTheta * -tanTheta;
-    } else {				/* Negative angle */
-        skewf = tanTheta * ((srcPtr->width - 1) * -sinTheta - (shearHeight-1));
-    }
-    for (y = 0; y < shearHeight; y++) {
-	skewi = (int)floor(skewf);
-        ShearY(destPtr, shear2Ptr, y, skewi, skewf - skewi, bg);
-	skewf += tanTheta;
-    }
-    Blt_FreePicture(shear2Ptr);
-    destPtr->flags |= BLT_PIC_BLEND;
-    return destPtr;      
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Blt_ClonePicture --
- *
- *	Creates a copy of the given picture.  
- *
- * Results:  
- *	Returns the new copy.
- *
- * -------------------------------------------------------------------------- 
- */
-Blt_Picture
-Blt_ClonePicture(Pict *srcPtr)
-{
-    Pict *destPtr;
-
-    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    Blt_CopyPictureBits(destPtr, srcPtr, 0, 0, srcPtr->width, srcPtr->height, 
-	0, 0);
-    destPtr->delay = srcPtr->delay;
-    return destPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Rotate90 --
- *
- *	Rotates the given picture by 90 degrees.  This is part of the special
- *	case right-angle rotations that do not create subpixel aliasing.
- *
- * Results:  
- *	Returns a newly allocated, rotated picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static Blt_Picture
-Rotate90(Pict *srcPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr;
-    int offset;
-    int x, y;
-
-    destPtr = Blt_CreatePicture(srcPtr->height, srcPtr->width);
-    offset = (destPtr->height - 1) * destPtr->pixelsPerRow;
-    srcRowPtr = srcPtr->bits;
-    for (x = 0; x < destPtr->width; x++) {
-	Blt_Pixel *dp, *sp;
-
-	sp = srcRowPtr;
-	dp = destPtr->bits + offset + x;
-	for (y = 0; y < destPtr->height; y++) {
-	    *dp = *sp++;
-	    dp -= destPtr->pixelsPerRow;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    destPtr->flags = srcPtr->flags;
-    return destPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Rotate180 --
- *
- *	Rotates the given picture by 180 degrees.  This is one of the special
- *	case orthogonal rotations that do not create subpixel aliasing.
- *
- * Results:  
- *	Returns a newly allocated, rotated picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static Blt_Picture
-Rotate180(Pict *srcPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr;
-    int offset;
-    int x, y;
-
-    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    offset = (destPtr->height - 1) * destPtr->pixelsPerRow;
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < destPtr->height; y++) {
-	Blt_Pixel *dp, *sp;
-
-	sp = srcRowPtr;
-	dp = destPtr->bits + offset + destPtr->width - 1;
-	for (x = 0; x < destPtr->width; x++) {
-	    *dp-- = *sp++;
-	}
-	offset -= destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    destPtr->flags = srcPtr->flags;
-    return destPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Rotate270 --
- *
- *	Rotates the given picture by 270 degrees.  This is part of the special
- *	case right-angle rotations that do not create subpixel aliasing.
- *
- * Results:  
- *	Returns a newly allocated, rotated picture.
- *
- * -------------------------------------------------------------------------- 
- */
-static Blt_Picture
-Rotate270(Pict *srcPtr)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr;
-    int x, y;
-
-    destPtr = Blt_CreatePicture(srcPtr->height, srcPtr->width);
-
-    srcRowPtr = srcPtr->bits;
-    for (x = destPtr->width - 1; x >= 0; x--) {
-	Blt_Pixel *sp, *dp;
-
-	sp = srcRowPtr;
-	dp = destPtr->bits + x;
-	for (y = 0; y < destPtr->height; y++) {
-	    *dp = *sp++;
-	    dp += destPtr->pixelsPerRow;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    destPtr->flags = srcPtr->flags;
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotatePicture --
- *
- *	Rotates a picture by a given # of degrees.
- *
- * Results:
- *	Returns a newly allocated, rotated picture.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_RotatePicture(Pict *srcPtr, float angle)
-{
-    Pict *destPtr, *tmpPtr;
-    int quadrant;
-    
-    tmpPtr = srcPtr;			/* Suppress compiler warning. */
-
-    /* Make the angle positive between 0 and 360 degrees. */ 
-    angle = FMOD(angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    quadrant = ROTATE_0;
-    if ((angle > 45.0) && (angle <= 135.0)) {
-        quadrant = ROTATE_90;
-        angle -= 90.0;
-    } else if ((angle > 135.0) && (angle <= 225.0)) { 
-        quadrant = ROTATE_180;
-        angle -= 180.0;
-    } else if ((angle > 225.0) && (angle <= 315.0)) { 
-        quadrant = ROTATE_270;
-        angle -= 270.0;
-    } else if (angle > 315.0) {
-	angle -= 360.0;
-    }
-    /* 
-     * If necessary, create a temporary image that's rotated by a right-angle.
-     * We'll then rotate this picture between -45 to 45 degrees to arrive at
-     * its final angle.
-     */
-    switch (quadrant) {
-    case ROTATE_270:			/* 270 degrees */
-	tmpPtr = Rotate270(srcPtr);
-	break;
-
-    case ROTATE_90:			/* 90 degrees */
-	tmpPtr = Rotate90(srcPtr);
-	break;
-
-    case ROTATE_180:			/* 180 degrees */
-	tmpPtr = Rotate180(srcPtr);
-	break;
-
-    case ROTATE_0:			/* 0 degrees */
-	if (angle == 0.0) {
-	    tmpPtr = Blt_ClonePicture(srcPtr); /* Make a copy of the source. */
-	} 
-	break;
-    }
-
-    assert((angle >= -45.0) && (angle <= 45.0));
-
-    destPtr = tmpPtr;
-    if (angle != 0.0) {
-	Blt_Pixel bg;
-
-	bg.u32 = 0x00000000;
-	angle = (angle / 180.0) * M_PI;
-	destPtr = Rotate45(tmpPtr, angle, &bg);
-	if (tmpPtr != srcPtr) {
-	    Blt_FreePicture(tmpPtr);
-	}
-    } 
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FlipPicture --
- *
- *	Flips a picture vertically or horizonally.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FlipPicture(Pict *srcPtr, int vertically)
-{
-    if (vertically) {
-	Blt_Pixel *s1RowPtr, *s2RowPtr;
-	int y;
-	
-	s1RowPtr = srcPtr->bits;
-	s2RowPtr = srcPtr->bits + ((srcPtr->height - 1) * srcPtr->pixelsPerRow);
-	for (y = 0; y < srcPtr->height / 2; y++) {
-	    Blt_Pixel *s1, *s2, *send;
-	    
-	    s1 = s1RowPtr, s2 = s2RowPtr;
-	    for (send = s1 + srcPtr->width; s1 < send; s1++, s2++) {
-		Blt_Pixel tmp;
-		
-		tmp.u32 = s1->u32;
-		s1->u32 = s2->u32;
-		s2->u32 = tmp.u32;
-	    }
-	    s1RowPtr += srcPtr->pixelsPerRow;
-	    s2RowPtr -= srcPtr->pixelsPerRow;
-	}
-    } else {
-	Blt_Pixel *s1ColumnPtr, *s2ColumnPtr;
-	int x;
-	
-	s1ColumnPtr = srcPtr->bits;
-	s2ColumnPtr = srcPtr->bits + (srcPtr->width - 1);
-	for (x = 0; x < srcPtr->width / 2; x++) {
-	    Blt_Pixel *s1, *s2, *send;
-	    
-	    s1 = s1ColumnPtr, s2 = s2ColumnPtr;
-	    for (send = s1 + (srcPtr->height * srcPtr->pixelsPerRow); s1 < send;
-		 s1 += srcPtr->pixelsPerRow, s2 += srcPtr->pixelsPerRow) {
-		Blt_Pixel tmp;
-		
-		tmp.u32 = s1->u32;
-		s1->u32 = s2->u32;
-		s2->u32 = tmp.u32;
-	    }
-	    s1ColumnPtr++;
-	    s2ColumnPtr--;
-	}
-    }
-    srcPtr->flags |= BLT_PIC_DIRTY;
-}
-
-#define NC		256
-enum ColorDirections { RED, GREEN, BLUE };
-
-#define R0	(cubePtr->r0)
-#define R1	(cubePtr->r1)
-#define G0	(cubePtr->g0)
-#define G1	(cubePtr->g1)
-#define B0	(cubePtr->b0)
-#define B1	(cubePtr->b1)
-
-typedef struct {
-    int r0, r1;				/* min, max values: min exclusive max
-					 * inclusive */
-    int g0, g1;
-    int b0, b1;
-    int vol;
-} Cube;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Histogram is in elements 1..HISTSIZE along each axis, element 0 is for base
- * or marginal value NB: these must start out 0!
- * 
- *---------------------------------------------------------------------------
- */
-typedef struct {
-    long int wt[33][33][33];		/* # pixels in voxel */
-    long int mR[33][33][33];		/* Sum over voxel of red pixel values */
-    long int mG[33][33][33];		/* Sum over voxel of green pixel
-					 * values */
-    long int mB[33][33][33];		/* Sum over voxel of blue pixel
-					 * values */
-    float gm2[33][33][33];		/* Variance */
-} PictStats;
-
-/*
- * Build 3-D color histogram of counts, R/G/B, c^2
- */
-static void
-Hist3d(PictStats *s, Pict *srcPtr)
-{
-#define MAX_INTENSITIES	256
-    Blt_Pixel *srcRowPtr;
-    int y;
-    float tab[MAX_INTENSITIES];
-
-    {
-	int i;
-
-	/* Precompute table of squares. */
-	for (i = 0; i < MAX_INTENSITIES; i++) {
-	    tab[i] = (float)(i * i);
-	}
-    }
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp;
-	int x;
-
-	for (sp = srcRowPtr, x = 0; x < srcPtr->width; x++, sp++) {
-	    int r, g, b;
-
-	    /*
-	     * Reduce the number of bits (5) per color component. This will
-	     * keep the table size (2^15) reasonable without perceptually
-	     * affecting the final image.
-	     */
-	    r = (sp->Red >> 3) + 1;
-	    g = (sp->Green >> 3) + 1;
-	    b = (sp->Blue >> 3) + 1;
-	    
-	    s->wt[r][g][b] += 1;
-	    s->mR[r][g][b] += sp->Red;
-	    s->mG[r][g][b] += sp->Green;
-	    s->mB[r][g][b] += sp->Blue;
-	    s->gm2[r][g][b] += tab[sp->Red] + tab[sp->Green] + tab[sp->Blue];
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  At conclusion of the histogram step, we can interpret
- *	wt[r][g][b] = sum over voxel of P(c)
- *	mR[r][g][b] = sum over voxel of r*P(c)  ,  similarly for mG, mB
- *	m2[r][g][b] = sum over voxel of c^2*P(c)
- * 
- *  Actually each of these should be divided by 'size' to give the usual
- *  interpretation of P() as ranging from 0 to 1, but we needn't do that here.
- * 
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- * 
- *     We now convert histogram into moments so that we can rapidly calculate
- *     the sums of the above quantities over any desired box.
- * 
- *---------------------------------------------------------------------------
- */
-/* Compute cumulative moments. */
-static void
-M3d(PictStats *s)
-{
-    unsigned char i, r, g, b, r0;
-    long int area[33], rArea[33], gArea[33], bArea[33];
-    float area2[33];
-
-    for (r = 1, r0 = 0; r <= 32; r++, r0++) {
-	for (i = 0; i <= 32; ++i) {
-	    area2[i] = 0.0f;
-	    area[i] = rArea[i] = gArea[i] = bArea[i] = 0;
-	}
-	for (g = 1; g <= 32; g++) {
-	    long int line, rLine, gLine, bLine;
-	    float line2;
-
-	    line2 = 0.0f;
-	    line = rLine = gLine = bLine = 0;
-	    for (b = 1; b <= 32; b++) {
-		/* ind1 = RGBIndex(r, g, b); */
-
-		line  += s->wt[r][g][b];
-		rLine += s->mR[r][g][b];
-		gLine += s->mG[r][g][b];
-		bLine += s->mB[r][g][b];
-		line2 += s->gm2[r][g][b];
-
-		area[b] += line;
-		rArea[b] += rLine;
-		gArea[b] += gLine;
-		bArea[b] += bLine;
-		area2[b] += line2;
-
-		/* ind2 = ind1 - 1089; [r0][g][b] */
-		s->wt[r][g][b] = s->wt[r0][g][b] + area[b];
-		s->mR[r][g][b] = s->mR[r0][g][b] + rArea[b];
-		s->mG[r][g][b] = s->mG[r0][g][b] + gArea[b];
-		s->mB[r][g][b] = s->mB[r0][g][b] + bArea[b];
-		s->gm2[r][g][b] = s->gm2[r0][g][b] + area2[b];
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Vol --
- *
- *	Compute sum over a box of any given statistic
- *
- *---------------------------------------------------------------------------
- */
-static INLINE long int
-Vol(Cube *cubePtr, long int m[33][33][33])
-{
-    return (m[R1][G1][B1] - m[R1][G1][B0] - m[R1][G0][B1] + m[R1][G0][B0] -
-	    m[R0][G1][B1] + m[R0][G1][B0] + m[R0][G0][B1] - m[R0][G0][B0]);
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * Bottom -- 
- *
- *	The next two routines allow a slightly more efficient calculation of
- *	Vol() for a proposed subbox of a given box.  The sum of Top() and
- *	Bottom() is the Vol() of a subbox split in the given direction and
- *	with the specified new upper bound.
- *
- *---------------------------------------------------------------------------
- */
-/* Compute part of Vol(cubePtr, mmt) that doesn't depend on r1, g1, or b1 */
-/* (depending on dir) */
-static long int
-Bottom(
-    Cube *cubePtr,
-    enum ColorDirections dir,
-    long int m[33][33][33])		/* Moment */
-{
-    switch (dir) {
-    case RED:
-	return -m[R0][G1][B1] + m[R0][G1][B0] + m[R0][G0][B1] - m[R0][G0][B0];
-    case GREEN:
-	return -m[R1][G0][B1] + m[R1][G0][B0] + m[R0][G0][B1] - m[R0][G0][B0];
-    case BLUE:
-	return -m[R1][G1][B0] + m[R1][G0][B0] + m[R0][G1][B0] - m[R0][G0][B0];
-    }
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Top --
- *
- *	Compute remainder of Vol(cubePtr, mmt), substituting pos for r1, g1,
- *	or b1 (depending on dir).
- *
- *---------------------------------------------------------------------------
- */
-static long int
-Top(Cube *cubePtr, enum ColorDirections dir, int pos, long int m[33][33][33])
-{
-    switch (dir) {
-    case RED:
-	return (m[pos][G1][B1] - m[pos][G1][B0] - 
-		m[pos][G0][B1] + m[pos][G0][B0]);
-
-    case GREEN:
-	return (m[R1][pos][B1] - m[R1][pos][B0] - 
-		m[R0][pos][B1] + m[R0][pos][B0]);
-
-    case BLUE:
-	return (m[R1][G1][pos] - m[R1][G0][pos] -
-		m[R0][G1][pos] + m[R0][G0][pos]);
-    }
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- * 
- * Var --
- *
- *	Compute the weighted variance of a box NB: as with the raw statistics,
- *	this is really the (variance * size)
- *
- *---------------------------------------------------------------------------
- */
-static float
-Var(Cube *cubePtr, PictStats *s)
-{
-    long int dR, dG, dB;
-    float xx;
-
-    dR = Vol(cubePtr, s->mR);
-    dG = Vol(cubePtr, s->mG);
-    dB = Vol(cubePtr, s->mB);
-    xx = (s->gm2[R1][G1][B1] - s->gm2[R1][G1][B0] -
-	  s->gm2[R1][G0][B1] + s->gm2[R1][G0][B0] -
-	  s->gm2[R0][G1][B1] + s->gm2[R0][G1][B0] +
-	  s->gm2[R0][G0][B1] - s->gm2[R0][G0][B0]);
-    return (xx - (float)(dR * dR + dG * dG + dB * dB) / (float)Vol(cubePtr, s->wt));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Maximize --
- *
- *	We want to minimize the sum of the variances of two subboxes.  The
- *	sum(c^2) terms can be ignored since their sum over both subboxes is
- *	the same (the sum for the whole box) no matter where we split.  The
- *	remaining terms have a minus sign in the variance formula, so we drop
- *	the minus sign and MAXIMIZE the sum of the two terms.
- *
- *---------------------------------------------------------------------------
- */
-static float
-Maximize(
-    Cube *cubePtr,
-    enum ColorDirections dir,
-    int first, int last, int *cut,
-    long rWhole, long gWhole, long bWhole, long wWhole,
-    PictStats *s)
-{
-    long int rHalf, gHalf, bHalf, wHalf;
-    long int rBase, gBase, bBase, wBase;
-    int i;
-    float temp, max;
-
-    rBase = Bottom(cubePtr, dir, s->mR);
-    gBase = Bottom(cubePtr, dir, s->mG);
-    bBase = Bottom(cubePtr, dir, s->mB);
-    wBase = Bottom(cubePtr, dir, s->wt);
-    max = 0.0;
-    *cut = -1;
-    for (i = first; i < last; i++) {
-	rHalf = rBase + Top(cubePtr, dir, i, s->mR);
-	gHalf = gBase + Top(cubePtr, dir, i, s->mG);
-	bHalf = bBase + Top(cubePtr, dir, i, s->mB);
-	wHalf = wBase + Top(cubePtr, dir, i, s->wt);
-
-	/* Now half_x is sum over lower half of box, if split at i */
-	if (wHalf == 0) {		/* subbox could be empty of pixels! */
-	    continue;			/* never split into an empty box */
-	} else {
-	    temp = ((float)rHalf * rHalf + (float)gHalf * gHalf +
-		    (float)bHalf * bHalf) / wHalf;
-	}
-	rHalf = rWhole - rHalf;
-	gHalf = gWhole - gHalf;
-	bHalf = bWhole - bHalf;
-	wHalf = wWhole - wHalf;
-	if (wHalf == 0) {		/* Subbox could be empty of pixels! */
-	    continue;			/* never split into an empty box */
-	} else {
-	    temp += ((float)rHalf * rHalf + (float)gHalf * gHalf +
-		(float)bHalf * bHalf) / wHalf;
-	}
-	if (temp > max) {
-	    max = temp;
-	    *cut = i;
-	}
-    }
-    return max;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Cut --
- *
- *---------------------------------------------------------------------------
- */
-static int
-Cut(Cube *set1, Cube *set2, PictStats *s)
-{
-    enum ColorDirections dir;
-    int rCut, gCut, bCut;
-    float rMax, gMax, bMax;
-    long int rWhole, gWhole, bWhole, wWhole;
-
-    rWhole = Vol(set1, s->mR);
-    gWhole = Vol(set1, s->mG);
-    bWhole = Vol(set1, s->mB);
-    wWhole = Vol(set1, s->wt);
-
-    rMax = Maximize(set1, RED, set1->r0 + 1, set1->r1, &rCut,
-	rWhole, gWhole, bWhole, wWhole, s);
-    gMax = Maximize(set1, GREEN, set1->g0 + 1, set1->g1, &gCut,
-	rWhole, gWhole, bWhole, wWhole, s);
-    bMax = Maximize(set1, BLUE, set1->b0 + 1, set1->b1, &bCut,
-	rWhole, gWhole, bWhole, wWhole, s);
-
-    if ((rMax >= gMax) && (rMax >= bMax)) {
-	dir = RED;
-	if (rCut < 0) {
-	    return 0;			/* can't split the box */
-	}
-    } else {
-	dir = ((gMax >= rMax) && (gMax >= bMax)) ? GREEN : BLUE;
-    }
-    set2->r1 = set1->r1;
-    set2->g1 = set1->g1;
-    set2->b1 = set1->b1;
-
-    switch (dir) {
-    case RED:
-	set2->r0 = set1->r1 = rCut;
-	set2->g0 = set1->g0;
-	set2->b0 = set1->b0;
-	break;
-
-    case GREEN:
-	set2->g0 = set1->g1 = gCut;
-	set2->r0 = set1->r0;
-	set2->b0 = set1->b0;
-	break;
-
-    case BLUE:
-	set2->b0 = set1->b1 = bCut;
-	set2->r0 = set1->r0;
-	set2->g0 = set1->g0;
-	break;
-    }
-    set1->vol = (set1->r1 - set1->r0) * (set1->g1 - set1->g0) *
-	(set1->b1 - set1->b0);
-    set2->vol = (set2->r1 - set2->r0) * (set2->g1 - set2->g0) *
-	(set2->b1 - set2->b0);
-    return 1;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SplitCS --
- *
- *---------------------------------------------------------------------------
- */
-static int
-SplitCS(PictStats *s, Cube *cubes, int nReqColors)
-{
-    float *vv, temp;
-    int i;
-    int next, k;
-    int nc;
-
-    vv = Blt_AssertMalloc(sizeof(float) * nReqColors);
-    nc = nReqColors;
-    cubes[0].r0 = cubes[0].g0 = cubes[0].b0 = 0;
-    cubes[0].r1 = cubes[0].g1 = cubes[0].b1 = 32;
-    next = 0;
-    for (i = 1; i < nReqColors; i++) {
-	if (Cut(cubes + next, cubes + i, s)) {
-	    /* Volume test ensures we won't try to cut one-cell box */
-	    vv[next] = (cubes[next].vol > 1) ? Var(cubes + next, s) : 0.0f;
-	    vv[i]    = (cubes[i].vol > 1)    ? Var(cubes + i, s)    : 0.0f;
-	} else {
-	    vv[next] = 0.0f;		/* don't try to split this box again */
-	    i--;			/* didn't create box i */
-	}
-	
-	next = 0;
-	temp = vv[0];
-	for (k = 1; k <= i; k++) {
-	    if (vv[k] > temp) {
-		temp = vv[k];
-		next = k;
-	    }
-	}
-	if (temp <= 0.0) {
-	    nc = i + 1;
-	    fprintf(stderr, "Only got %d boxes\n", nc);
-	    break;
-	}
-    }
-    Blt_Free(vv);
-    return nc;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Mark --
- *
- *---------------------------------------------------------------------------
- */
-static void
-Mark(Cube *cubePtr, int label, Blt_ColorLookupTable tag)
-{
-    int r, g, b;
-
-    for (r = R0 + 1; r <= R1; r++) {
-	for (g = G0 + 1; g <= G1; g++) {
-	    for (b = B0 + 1; b <= B1; b++) {
-		tag[r][g][b] = label;
-	    }
-	}
-    }
-}
-
-static Blt_ColorLookupTable
-MakeCLuT(PictStats *s, Cube *cubes, int nColors)
-{
-    Blt_ColorLookupTable clut;
-    Cube *cp, *cend;
-
-    clut = Blt_AssertCalloc(sizeof(unsigned int), 33 * 33 * 33);
-    for (cp = cubes, cend = cp + nColors; cp < cend; cp++) {
-	unsigned int r, g, b;
-	long int weight;
-	Blt_Pixel pixel;
-
-	weight = Vol(cp, s->wt);
-	if (weight) {
-	    r = (unsigned int)((Vol(cp, s->mR) / (float)weight) * (NC + 1));
-	    g = (unsigned int)((Vol(cp, s->mG) / (float)weight) * (NC + 1));
-	    b = (unsigned int)((Vol(cp, s->mB) / (float)weight) * (NC + 1));
-	} else {
-#ifdef notdef
-	    fprintf(stderr, "bogus box %d\n", cp - cubes);
-#endif
-	    r = g = b = 0;
-	}
-	pixel.Red = r / 257;
-	pixel.Green = g / 257;
-	pixel.Blue = b / 257;
-	pixel.Alpha = ALPHA_OPAQUE;
-	Mark(cp, pixel.u32, clut);
-    }
-    return clut;
-}
-
-void
-Blt_MapColors(Pict *destPtr, Pict *srcPtr, Blt_ColorLookupTable clut)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    /* Apply the color lookup table against the original image */
-    srcRowPtr = srcPtr->bits;    
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp, *sp, *send;
-	
-	sp = srcRowPtr, dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    int r, g, b, a;
-
-	    r = (sp->Red >> 3) + 1;
-	    g = (sp->Green >> 3) + 1;
-	    b = (sp->Blue >> 3) + 1;
-	    a = sp->Alpha;
-	    dp->u32 = clut[r][g][b];
-	    dp->Alpha = a;
-	    dp++;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_QuantizePicture --
- *
- *	C Implementation of Wu's Color Quantizer (v. 2) (see Graphics Gems
- *	vol. II, pp. 126-133)
- *
- *	Author: Xiaolin Wu
- *		Dept. of Computer Science Univ. of Western
- *		Ontario London, Ontario
- *		N6A 5B7
- *		wu at csd.uwo.ca
- *
- *		Greedy orthogonal bipartition of RGB space for variance
- *		minimization aided by inclusion-exclusion tricks.  For speed
- *		no nearest neighbor search is done. Slightly better
- *		performance can be expected by more sophisticated but more
- *		expensive versions.
- *
- *		The author thanks Tom Lane at Tom_Lane at G.GP.CS.CMU.EDU for
- *		much of additional documentation and a cure to a previous bug.
- *
- *		Free to distribute, comments and suggestions are appreciated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_QuantizePicture(Pict *srcPtr, int nReqColors)
-{
-    Cube *cubes;
-    PictStats *statsPtr;
-    int nc;
-    Blt_ColorLookupTable clut;
-    Pict *destPtr;
-
-    /*
-     * Allocated a structure to hold color statistics.
-     */
-    statsPtr = Blt_AssertCalloc(1, sizeof(PictStats));
-    Hist3d(statsPtr, srcPtr);
-    M3d(statsPtr);
-
-    cubes = Blt_AssertMalloc(sizeof(Cube) * nReqColors);
-    nc = SplitCS(statsPtr, cubes, nReqColors);
-    assert(nc <= nReqColors);
-
-    clut = MakeCLuT(statsPtr, cubes, nc);
-    Blt_Free(statsPtr);
-    Blt_Free(cubes);
-    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    Blt_MapColors(destPtr, srcPtr, clut);
-    Blt_Free(clut);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_QuantizePicture --
- *
- *	C Implementation of Wu's Color Quantizer (v. 2) (see Graphics Gems
- *	vol. II, pp. 126-133)
- *
- *	Author: Xiaolin Wu
- *		Dept. of Computer Science Univ. of Western
- *		Ontario London, Ontario
- *		N6A 5B7
- *		wu at csd.uwo.ca
- *
- *		Greedy orthogonal bipartition of RGB space for variance
- *		minimization aided by inclusion-exclusion tricks.  For speed
- *		no nearest neighbor search is done. Slightly better
- *		performance can be expected by more sophisticated but more
- *		expensive versions.
- *
- *		The author thanks Tom Lane at Tom_Lane at G.GP.CS.CMU.EDU for
- *		much of additional documentation and a cure to a previous bug.
- *
- *		Free to distribute, comments and suggestions are appreciated.
- *
- *---------------------------------------------------------------------------
- */
-Blt_ColorLookupTable
-Blt_GetColorLookupTable(Blt_Chain chain, int nReqColors)
-{
-    Cube *cubes;
-    PictStats *statsPtr;
-    int nc;
-    Blt_ColorLookupTable clut;
-    Blt_ChainLink link;
-
-    /*
-     * Allocated a structure to hold color statistics.
-     */
-    statsPtr = Blt_AssertCalloc(1, sizeof(PictStats));
-    for (link = Blt_Chain_FirstLink(chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	Pict *srcPtr;
-
-	srcPtr = Blt_Chain_GetValue(link);
-	Hist3d(statsPtr, srcPtr);
-    }
-    M3d(statsPtr);
-    cubes = Blt_AssertMalloc(sizeof(Cube) * nReqColors);
-    nc = SplitCS(statsPtr, cubes, nReqColors);
-    assert(nc <= nReqColors);
-
-    clut = MakeCLuT(statsPtr, cubes, nc);
-    Blt_Free(statsPtr);
-    Blt_Free(cubes);
-    return clut;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * CopyPictureBits --
- *
- *	Creates a copy of the given picture.  
- *
- * Results:  
- *	Returns the new copy.
- *
- * -------------------------------------------------------------------------- 
- */
-static void
-CopyPictureBits(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		int dx, int dy)
-{
-    int *srcRowPtr, *destRowPtr;
-    int right, bottom;
-    int dw, dh;
-    int width, height;
-
-    dw = destPtr->width - dx;
-    dh = destPtr->height - dy;
-
-    width  = MIN(dw, w);
-    height = MIN(dh, h);
-    
-    bottom = height + y;
-    right  = width + x;
-
-    srcRowPtr = (int *)(srcPtr->bits + ((srcPtr->pixelsPerRow * y) + x));
-    destRowPtr = (int *)(destPtr->bits + ((destPtr->pixelsPerRow * dy) + dx));
-
-    for (/*empty*/; y < bottom; y++) {
-	int n;
-	int *sp, *dp;
-
-	sp = srcRowPtr, dp = destRowPtr;
-	n = (width + 7) / 8;      /* count > 0 assumed */
-	switch (width & 0x07) {
-	case 0:        do {  *dp++ = *sp++;
-	case 7:              *dp++ = *sp++;
-	case 6:              *dp++ = *sp++;
-	case 5:              *dp++ = *sp++;
-	case 4:              *dp++ = *sp++;
-	case 3:              *dp++ = *sp++;
-	case 2:              *dp++ = *sp++;
-	case 1:              *dp++ = *sp++;
-			} while (--n > 0);
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-}
-
-/*
- * Image dithering routines.
- *
- * Reference: 
- *	Victor Ostromoukhov http://www.iro.umontreal.ca/~ostrom/.  
- *
- *	Victor Ostromoukhov, "A Simple and Efficient Error-Diffusion
- *	Algorithm" SIGGRAPH'01
- *
- *	University of Montreal, http://www.iro.umontreal.ca/~ostrom/
- *
- */
-typedef struct {
-    short int r;			/* Right */
-    short int dl;			/* Down-left */
-    short int d;			/* Down */
-    short int sum;			/* Sum */
-} VarCoefs;
-
-static VarCoefs coefTable[256] = {
-    {    13,     0,     5,    18,   },  /*    0 */
-    {    13,     0,     5,    18,   },  /*    1 */
-    {    21,     0,    10,    31,   },  /*    2 */
-    {     7,     0,     4,    11,   },  /*    3 */
-    {     8,     0,     5,    13,   },  /*    4 */
-    {    47,     3,    28,    78,   },  /*    5 */
-    {    23,     3,    13,    39,   },  /*    6 */
-    {    15,     3,     8,    26,   },  /*    7 */
-    {    22,     6,    11,    39,   },  /*    8 */
-    {    43,    15,    20,    78,   },  /*    9 */
-    {     7,     3,     3,    13,   },  /*   10 */
-    {   501,   224,   211,   936,   },  /*   11 */
-    {   249,   116,   103,   468,   },  /*   12 */
-    {   165,    80,    67,   312,   },  /*   13 */
-    {   123,    62,    49,   234,   },  /*   14 */
-    {   489,   256,   191,   936,   },  /*   15 */
-    {    81,    44,    31,   156,   },  /*   16 */
-    {   483,   272,   181,   936,   },  /*   17 */
-    {    60,    35,    22,   117,   },  /*   18 */
-    {    53,    32,    19,   104,   },  /*   19 */
-    {   237,   148,    83,   468,   },  /*   20 */
-    {   471,   304,   161,   936,   },  /*   21 */
-    {     3,     2,     1,     6,   },  /*   22 */
-    {   459,   304,   161,   924,   },  /*   23 */
-    {    38,    25,    14,    77,   },  /*   24 */
-    {   453,   296,   175,   924,   },  /*   25 */
-    {   225,   146,    91,   462,   },  /*   26 */
-    {   149,    96,    63,   308,   },  /*   27 */
-    {   111,    71,    49,   231,   },  /*   28 */
-    {    63,    40,    29,   132,   },  /*   29 */
-    {    73,    46,    35,   154,   },  /*   30 */
-    {   435,   272,   217,   924,   },  /*   31 */
-    {   108,    67,    56,   231,   },  /*   32 */
-    {    13,     8,     7,    28,   },  /*   33 */
-    {   213,   130,   119,   462,   },  /*   34 */
-    {   423,   256,   245,   924,   },  /*   35 */
-    {     5,     3,     3,    11,   },  /*   36 */
-    {   281,   173,   162,   616,   },  /*   37 */
-    {   141,    89,    78,   308,   },  /*   38 */
-    {   283,   183,   150,   616,   },  /*   39 */
-    {    71,    47,    36,   154,   },  /*   40 */
-    {   285,   193,   138,   616,   },  /*   41 */
-    {    13,     9,     6,    28,   },  /*   42 */
-    {    41,    29,    18,    88,   },  /*   43 */
-    {    36,    26,    15,    77,   },  /*   44 */
-    {   289,   213,   114,   616,   },  /*   45 */
-    {   145,   109,    54,   308,   },  /*   46 */
-    {   291,   223,   102,   616,   },  /*   47 */
-    {    73,    57,    24,   154,   },  /*   48 */
-    {   293,   233,    90,   616,   },  /*   49 */
-    {    21,    17,     6,    44,   },  /*   50 */
-    {   295,   243,    78,   616,   },  /*   51 */
-    {    37,    31,     9,    77,   },  /*   52 */
-    {    27,    23,     6,    56,   },  /*   53 */
-    {   149,   129,    30,   308,   },  /*   54 */
-    {   299,   263,    54,   616,   },  /*   55 */
-    {    75,    67,    12,   154,   },  /*   56 */
-    {    43,    39,     6,    88,   },  /*   57 */
-    {   151,   139,    18,   308,   },  /*   58 */
-    {   303,   283,    30,   616,   },  /*   59 */
-    {    38,    36,     3,    77,   },  /*   60 */
-    {   305,   293,    18,   616,   },  /*   61 */
-    {   153,   149,     6,   308,   },  /*   62 */
-    {   307,   303,     6,   616,   },  /*   63 */
-    {     1,     1,     0,     2,   },  /*   64 */
-    {   101,   105,     2,   208,   },  /*   65 */
-    {    49,    53,     2,   104,   },  /*   66 */
-    {    95,   107,     6,   208,   },  /*   67 */
-    {    23,    27,     2,    52,   },  /*   68 */
-    {    89,   109,    10,   208,   },  /*   69 */
-    {    43,    55,     6,   104,   },  /*   70 */
-    {    83,   111,    14,   208,   },  /*   71 */
-    {     5,     7,     1,    13,   },  /*   72 */
-    {   172,   181,    37,   390,   },  /*   73 */
-    {    97,    76,    22,   195,   },  /*   74 */
-    {    72,    41,    17,   130,   },  /*   75 */
-    {   119,    47,    29,   195,   },  /*   76 */
-    {     4,     1,     1,     6,   },  /*   77 */
-    {     4,     1,     1,     6,   },  /*   78 */
-    {     4,     1,     1,     6,   },  /*   79 */
-    {     4,     1,     1,     6,   },  /*   80 */
-    {     4,     1,     1,     6,   },  /*   81 */
-    {     4,     1,     1,     6,   },  /*   82 */
-    {     4,     1,     1,     6,   },  /*   83 */
-    {     4,     1,     1,     6,   },  /*   84 */
-    {     4,     1,     1,     6,   },  /*   85 */
-    {    65,    18,    17,   100,   },  /*   86 */
-    {    95,    29,    26,   150,   },  /*   87 */
-    {   185,    62,    53,   300,   },  /*   88 */
-    {    30,    11,     9,    50,   },  /*   89 */
-    {    35,    14,    11,    60,   },  /*   90 */
-    {    85,    37,    28,   150,   },  /*   91 */
-    {    55,    26,    19,   100,   },  /*   92 */
-    {    80,    41,    29,   150,   },  /*   93 */
-    {   155,    86,    59,   300,   },  /*   94 */
-    {     5,     3,     2,    10,   },  /*   95 */
-    {     5,     3,     2,    10,   },  /*   96 */
-    {     5,     3,     2,    10,   },  /*   97 */
-    {     5,     3,     2,    10,   },  /*   98 */
-    {     5,     3,     2,    10,   },  /*   99 */
-    {     5,     3,     2,    10,   },  /*  100 */
-    {     5,     3,     2,    10,   },  /*  101 */
-    {     5,     3,     2,    10,   },  /*  102 */
-    {     5,     3,     2,    10,   },  /*  103 */
-    {     5,     3,     2,    10,   },  /*  104 */
-    {     5,     3,     2,    10,   },  /*  105 */
-    {     5,     3,     2,    10,   },  /*  106 */
-    {     5,     3,     2,    10,   },  /*  107 */
-    {   305,   176,   119,   600,   },  /*  108 */
-    {   155,    86,    59,   300,   },  /*  109 */
-    {   105,    56,    39,   200,   },  /*  110 */
-    {    80,    41,    29,   150,   },  /*  111 */
-    {    65,    32,    23,   120,   },  /*  112 */
-    {    55,    26,    19,   100,   },  /*  113 */
-    {   335,   152,   113,   600,   },  /*  114 */
-    {    85,    37,    28,   150,   },  /*  115 */
-    {   115,    48,    37,   200,   },  /*  116 */
-    {    35,    14,    11,    60,   },  /*  117 */
-    {   355,   136,   109,   600,   },  /*  118 */
-    {    30,    11,     9,    50,   },  /*  119 */
-    {   365,   128,   107,   600,   },  /*  120 */
-    {   185,    62,    53,   300,   },  /*  121 */
-    {    25,     8,     7,    40,   },  /*  122 */
-    {    95,    29,    26,   150,   },  /*  123 */
-    {   385,   112,   103,   600,   },  /*  124 */
-    {    65,    18,    17,   100,   },  /*  125 */
-    {   395,   104,   101,   600,   },  /*  126 */
-    {     4,     1,     1,     6,   },  /*  127 */
-    {     4,     1,     1,     6,   },  /*  128 */
-    {   395,   104,   101,   600,   },  /*  129 */
-    {    65,    18,    17,   100,   },  /*  130 */
-    {   385,   112,   103,   600,   },  /*  131 */
-    {    95,    29,    26,   150,   },  /*  132 */
-    {    25,     8,     7,    40,   },  /*  133 */
-    {   185,    62,    53,   300,   },  /*  134 */
-    {   365,   128,   107,   600,   },  /*  135 */
-    {    30,    11,     9,    50,   },  /*  136 */
-    {   355,   136,   109,   600,   },  /*  137 */
-    {    35,    14,    11,    60,   },  /*  138 */
-    {   115,    48,    37,   200,   },  /*  139 */
-    {    85,    37,    28,   150,   },  /*  140 */
-    {   335,   152,   113,   600,   },  /*  141 */
-    {    55,    26,    19,   100,   },  /*  142 */
-    {    65,    32,    23,   120,   },  /*  143 */
-    {    80,    41,    29,   150,   },  /*  144 */
-    {   105,    56,    39,   200,   },  /*  145 */
-    {   155,    86,    59,   300,   },  /*  146 */
-    {   305,   176,   119,   600,   },  /*  147 */
-    {     5,     3,     2,    10,   },  /*  148 */
-    {     5,     3,     2,    10,   },  /*  149 */
-    {     5,     3,     2,    10,   },  /*  150 */
-    {     5,     3,     2,    10,   },  /*  151 */
-    {     5,     3,     2,    10,   },  /*  152 */
-    {     5,     3,     2,    10,   },  /*  153 */
-    {     5,     3,     2,    10,   },  /*  154 */
-    {     5,     3,     2,    10,   },  /*  155 */
-    {     5,     3,     2,    10,   },  /*  156 */
-    {     5,     3,     2,    10,   },  /*  157 */
-    {     5,     3,     2,    10,   },  /*  158 */
-    {     5,     3,     2,    10,   },  /*  159 */
-    {     5,     3,     2,    10,   },  /*  160 */
-    {   155,    86,    59,   300,   },  /*  161 */
-    {    80,    41,    29,   150,   },  /*  162 */
-    {    55,    26,    19,   100,   },  /*  163 */
-    {    85,    37,    28,   150,   },  /*  164 */
-    {    35,    14,    11,    60,   },  /*  165 */
-    {    30,    11,     9,    50,   },  /*  166 */
-    {   185,    62,    53,   300,   },  /*  167 */
-    {    95,    29,    26,   150,   },  /*  168 */
-    {    65,    18,    17,   100,   },  /*  169 */
-    {     4,     1,     1,     6,   },  /*  170 */
-    {     4,     1,     1,     6,   },  /*  171 */
-    {     4,     1,     1,     6,   },  /*  172 */
-    {     4,     1,     1,     6,   },  /*  173 */
-    {     4,     1,     1,     6,   },  /*  174 */
-    {     4,     1,     1,     6,   },  /*  175 */
-    {     4,     1,     1,     6,   },  /*  176 */
-    {     4,     1,     1,     6,   },  /*  177 */
-    {     4,     1,     1,     6,   },  /*  178 */
-    {   119,    47,    29,   195,   },  /*  179 */
-    {    72,    41,    17,   130,   },  /*  180 */
-    {    97,    76,    22,   195,   },  /*  181 */
-    {   172,   181,    37,   390,   },  /*  182 */
-    {     5,     7,     1,    13,   },  /*  183 */
-    {    83,   111,    14,   208,   },  /*  184 */
-    {    43,    55,     6,   104,   },  /*  185 */
-    {    89,   109,    10,   208,   },  /*  186 */
-    {    23,    27,     2,    52,   },  /*  187 */
-    {    95,   107,     6,   208,   },  /*  188 */
-    {    49,    53,     2,   104,   },  /*  189 */
-    {   101,   105,     2,   208,   },  /*  190 */
-    {     1,     1,     0,     2,   },  /*  191 */
-    {   307,   303,     6,   616,   },  /*  192 */
-    {   153,   149,     6,   308,   },  /*  193 */
-    {   305,   293,    18,   616,   },  /*  194 */
-    {    38,    36,     3,    77,   },  /*  195 */
-    {   303,   283,    30,   616,   },  /*  196 */
-    {   151,   139,    18,   308,   },  /*  197 */
-    {    43,    39,     6,    88,   },  /*  198 */
-    {    75,    67,    12,   154,   },  /*  199 */
-    {   299,   263,    54,   616,   },  /*  200 */
-    {   149,   129,    30,   308,   },  /*  201 */
-    {    27,    23,     6,    56,   },  /*  202 */
-    {    37,    31,     9,    77,   },  /*  203 */
-    {   295,   243,    78,   616,   },  /*  204 */
-    {    21,    17,     6,    44,   },  /*  205 */
-    {   293,   233,    90,   616,   },  /*  206 */
-    {    73,    57,    24,   154,   },  /*  207 */
-    {   291,   223,   102,   616,   },  /*  208 */
-    {   145,   109,    54,   308,   },  /*  209 */
-    {   289,   213,   114,   616,   },  /*  210 */
-    {    36,    26,    15,    77,   },  /*  211 */
-    {    41,    29,    18,    88,   },  /*  212 */
-    {    13,     9,     6,    28,   },  /*  213 */
-    {   285,   193,   138,   616,   },  /*  214 */
-    {    71,    47,    36,   154,   },  /*  215 */
-    {   283,   183,   150,   616,   },  /*  216 */
-    {   141,    89,    78,   308,   },  /*  217 */
-    {   281,   173,   162,   616,   },  /*  218 */
-    {     5,     3,     3,    11,   },  /*  219 */
-    {   423,   256,   245,   924,   },  /*  220 */
-    {   213,   130,   119,   462,   },  /*  221 */
-    {    13,     8,     7,    28,   },  /*  222 */
-    {   108,    67,    56,   231,   },  /*  223 */
-    {   435,   272,   217,   924,   },  /*  224 */
-    {    73,    46,    35,   154,   },  /*  225 */
-    {    63,    40,    29,   132,   },  /*  226 */
-    {   111,    71,    49,   231,   },  /*  227 */
-    {   149,    96,    63,   308,   },  /*  228 */
-    {   225,   146,    91,   462,   },  /*  229 */
-    {   453,   296,   175,   924,   },  /*  230 */
-    {    38,    25,    14,    77,   },  /*  231 */
-    {   459,   304,   161,   924,   },  /*  232 */
-    {     3,     2,     1,     6,   },  /*  233 */
-    {   471,   304,   161,   936,   },  /*  234 */
-    {   237,   148,    83,   468,   },  /*  235 */
-    {    53,    32,    19,   104,   },  /*  236 */
-    {    60,    35,    22,   117,   },  /*  237 */
-    {   483,   272,   181,   936,   },  /*  238 */
-    {    81,    44,    31,   156,   },  /*  239 */
-    {   489,   256,   191,   936,   },  /*  240 */
-    {   123,    62,    49,   234,   },  /*  241 */
-    {   165,    80,    67,   312,   },  /*  242 */
-    {   249,   116,   103,   468,   },  /*  243 */
-    {   501,   224,   211,   936,   },  /*  244 */
-    {     7,     3,     3,    13,   },  /*  245 */
-    {    43,    15,    20,    78,   },  /*  246 */
-    {    22,     6,    11,    39,   },  /*  247 */
-    {    15,     3,     8,    26,   },  /*  248 */
-    {    23,     3,    13,    39,   },  /*  249 */
-    {    47,     3,    28,    78,   },  /*  250 */
-    {     8,     0,     5,    13,   },  /*  251 */
-    {     7,     0,     4,    11,   },  /*  252 */
-    {    21,     0,    10,    31,   },  /*  253 */
-    {    13,     0,     5,    18,   },  /*  254 */
-    {    13,     0,     5,    18,   },  /*  255 */
-};
-
-static void 
-DistributeError(
-    double (*cl0)[3], double (*cl1)[3],
-    int x, 
-    double rDiff, double gDiff, double bDiff,
-    int dir, Blt_Pixel *sp)
-{
-    VarCoefs *coefsPtr;
-    double sum, r, dl, d;
-
-    coefsPtr = coefTable + sp->Red;
-    sum = coefsPtr->sum;
-    r = coefsPtr->r * rDiff / sum;
-    dl = coefsPtr->dl * rDiff / sum;
-    d = rDiff - (r + dl);
-
-    cl0[x + dir][0] += r;
-    cl1[x - dir][0] += dl;
-    cl1[x][0]       += d;
-
-    coefsPtr = coefTable + sp->Green;
-    sum = coefsPtr->sum;
-    r = coefsPtr->r * gDiff / sum;
-    dl = coefsPtr->dl * gDiff / sum;
-    d = gDiff - (r + dl);
-
-    cl0[x + dir][1] += r;
-    cl1[x - dir][1] += dl;
-    cl1[x][1]       += d;
-
-    coefsPtr = coefTable + sp->Blue;
-    sum = coefsPtr->sum;
-    r = coefsPtr->r * bDiff / sum;
-    dl = coefsPtr->dl * bDiff / sum;
-    d = bDiff - (r + dl);
-
-    cl0[x + dir][2] += r;
-    cl1[x - dir][2] += dl;
-    cl1[x][2]       += d;
-}
-
-#ifdef notdef
-static void 
-DistributeErrorFS(
-    double (*cl0)[3], double (*cl1)[3],
-    int x, 
-    double rDiff, double gDiff, double bDiff,
-    int dir, Blt_Pixel *sp)
-{
-    double d2, d3, d5, d7;
-
-    d2 = rDiff + rDiff;
-    d3 = rDiff + d2;
-    d5 = d3 + d2;
-    d7 = d5 + d2;
-
-    cl0[x + dir][0] += (d7 / 16);
-    cl1[x - dir][0] += (d3 / 16);
-    cl1[x][0]       += (d5 / 16);
-    cl1[x + dir][0] += (rDiff / 16);
-    
-    d2 = gDiff + gDiff;
-    d3 = gDiff + d2;
-    d5 = d3 + d2;
-    d7 = d5 + d2;
-
-    cl0[x + dir][1] += (d7 / 16);
-    cl1[x - dir][1] += (d3 / 16);
-    cl1[x][1]       += (d5 / 16);
-    cl1[x + dir][1] += (gDiff / 16);
-
-    d2 = bDiff + bDiff;
-    d3 = bDiff + d2;
-    d5 = d3 + d2;
-    d7 = d5 + d2;
-
-    cl0[x + dir][2] += (d7 / 16);
-    cl1[x - dir][2] += (d3 / 16);
-    cl1[x][2]       += (d5 / 16);
-    cl1[x + dir][2] += (bDiff / 16);
-}
-#endif
-
-static void 
-ShiftCarryBuffers(double (**cl0)[3], double (**cl1)[3], int width)
-{
-    double (*tmp)[3];
-    int i;
-
-    /* Swap cl0 and cl1 */
-    tmp = *cl0, *cl0 = *cl1, *cl1 = tmp;
-
-    /* Clear c11 */
-    for (i = 0; i < width; ++i) {
-        (*cl1)[i][0] = (*cl1)[i][1] = (*cl1)[i][2] = 0.0;
-    }
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * Blt_DitherPicture --
- *
- *	Dithers a 24-bit picture using a given reduced-color palette. 
- *
- *	Reference: 
- *		Victor Ostromoukhov http://www.iro.umontreal.ca/~ostrom/.  
- *
- *		Victor Ostromoukhov, "A Simple and Efficient
- *		Error-Diffusion Algorithm" SIGGRAPH'01
- *
- *		University of Montreal, http://www.iro.umontreal.ca/~ostrom/
- *
- * Results:
- *	A new picture is allocated, dithered and returned. Returns NULL only
- *	if memory can't be allocated for the dithered picture.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture 
-Blt_DitherPicture(Pict *srcPtr, Blt_Pixel *palette)
-{
-    Pict *destPtr;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    double (*cl0)[3];
-    double (*cl1)[3];
-    int y;
-    
-    /* allocate carry_line_0 and carry_line_1 */
-    cl0 = Blt_Calloc(srcPtr->width + 2, sizeof(*cl0));
-    if (cl0 == NULL) {
-	return NULL;
-    }
-    cl1 = Blt_Calloc(srcPtr->width + 2, sizeof(*cl1));
-    if (cl1 == NULL) {
-	Blt_Free(cl0);
-	return NULL;
-    }
-    ++cl0;
-    ++cl1;
-
-    destPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-
-    srcRowPtr = srcPtr->bits, destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; ++y) {
-	Blt_Pixel *sp, *dp;
-	int start, finish, step;
-	int x;
-
-        if (y & 1) {
-            start = srcPtr->width - 1;
-            finish = -1;
-            step = -1;
-        } else {
-            start = 0;
-            finish = srcPtr->width;
-            step = 1;
-        }
-	sp = srcRowPtr + start, dp = destRowPtr + start;
-        for (x = start; x != finish; x += step) {
-            double rCorrected, gCorrected, bCorrected;
-            double rDiff, gDiff, bDiff;
-	    int rIntensity, gIntensity, bIntensity;
-
-            rCorrected = sp->Red +   cl0[x][0];
-            gCorrected = sp->Green + cl0[x][1];
-            bCorrected = sp->Blue +  cl0[x][2];
-
-	    rIntensity = palette[(int)CLAMP(rCorrected)].Red;
-	    gIntensity = palette[(int)CLAMP(gCorrected)].Green;
-	    bIntensity = palette[(int)CLAMP(bCorrected)].Blue;
-
-            rDiff = rCorrected - rIntensity;
-            gDiff = gCorrected - gIntensity;
-            bDiff = bCorrected - bIntensity;
-
-            DistributeError(cl0, cl1, x, rDiff, gDiff, bDiff, step, sp); 
-	    dp->Red = rIntensity;
-	    dp->Green = gIntensity;
-	    dp->Blue = bIntensity;
-	    dp += step, sp += step;
-        }
-        ShiftCarryBuffers(&cl0, &cl1, srcPtr->width);
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    Blt_Free(cl0 - 1);
-    Blt_Free(cl1 - 1);
-    return destPtr;
-}
-
-#ifdef notdef
-static void
-BoxX(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp, *send;
-	Blt_Pixel *lp, *cp, *rp;	/* Pointers to left, center, and right
-					 * pixels.  */
-	Blt_Pixel hold;
-	double r, g, b, a;
-
-	dp = destRowPtr;
-	cp = lp = srcRowPtr, rp = srcRowPtr + 1;
-	r = (double)(lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	g = (double)(lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	b = (double)(lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	a = (double)(lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	hold = *lp;
-	dp->Red = (unsigned char)CLAMP(r);
-	dp->Green = (unsigned char)CLAMP(g);
-	dp->Blue = (unsigned char)CLAMP(b);
-	dp->Alpha = (unsigned char)CLAMP(a);
-	dp++, cp++, rp++;
-
-	for (send = srcRowPtr + srcPtr->width; rp < send; rp++, cp++, lp++) {
-	    r = (double)(lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	    g = (double)(lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	    b = (double)(lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	    a = (double)(lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	    dp->Red = (unsigned char)CLAMP(r);
-	    dp->Green = (unsigned char)CLAMP(g);
-	    dp->Blue = (unsigned char)CLAMP(b);
-	    dp->Alpha = (unsigned char)CLAMP(a);
-	    hold = *lp;
-	    dp++;
-	}
-
-	rp = cp;
-	r = (double)(lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	g = (double)(lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	b = (double)(lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	a = (double)(lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	dp->Red = (unsigned char)CLAMP(r);
-	dp->Green = (unsigned char)CLAMP(g);
-	dp->Blue = (unsigned char)CLAMP(b);
-	dp->Alpha = (unsigned char)CLAMP(a);
-
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-    
-static void
-BoxY(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_Pixel *srcColPtr, *destColumnPtr;
-    int x;
-
-    srcColPtr = srcPtr->bits;
-    destColumnPtr = destPtr->bits;
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *rp, *lp, *cp, *send;
-	double r, g, b, a;
-	Blt_Pixel hold;
-
-	dp = destColumnPtr;
-	cp = lp = srcColPtr, rp = srcColPtr + srcPtr->pixelsPerRow;
-	r = (lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	g = (lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	b = (lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	a = (lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	hold = *lp;
-	dp->Red = (unsigned char)CLAMP(r);
-	dp->Green = (unsigned char)CLAMP(g);
-	dp->Blue = (unsigned char)CLAMP(b);
-	dp->Alpha = (unsigned char)CLAMP(a);
-	dp += destPtr->pixelsPerRow;
-	cp += srcPtr->pixelsPerRow;
-	rp += srcPtr->pixelsPerRow;
-
-	for (send = srcColPtr + (srcPtr->height * srcPtr->pixelsPerRow); 
-	     rp < send; /* empty */) {
-	    r = (lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	    g = (lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	    b = (lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	    a = (lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	    hold = *lp;
-	    dp->Red = (unsigned char)CLAMP(r);
-	    dp->Green = (unsigned char)CLAMP(g);
-	    dp->Blue = (unsigned char)CLAMP(b);
-	    dp->Alpha = (unsigned char)CLAMP(a);
-	    dp += destPtr->pixelsPerRow;
-	    rp += srcPtr->pixelsPerRow;
-	    lp += srcPtr->pixelsPerRow; 
-	    cp += srcPtr->pixelsPerRow;
-	}	
-	rp = cp;
-	r = (lp->Red + cp->Red + rp->Red) * 0.333333333333333;
-	g = (lp->Green + cp->Green + rp->Green) * 0.333333333333333;
-	b = (lp->Blue + cp->Blue + rp->Blue) * 0.333333333333333;
-	a = (lp->Alpha + cp->Alpha + rp->Alpha) * 0.333333333333333;
-	dp->Red = (unsigned char)CLAMP(r);
-	dp->Green = (unsigned char)CLAMP(g);
-	dp->Blue = (unsigned char)CLAMP(b);
-	dp->Alpha = (unsigned char)CLAMP(a);
-	srcColPtr++, destColumnPtr++;
-    }
-}
-#endif
-
-static void
-TentHorizontally(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = destPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel left, center, right;
-	Blt_Pixel *dp, *sp, *send;
-
-	dp = destRowPtr;
-	sp = srcRowPtr + 1;
-	left = *srcRowPtr, center = left, right = *sp;
-	dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-	center = right;
-	dp++, sp++;
-
-	for (send = srcRowPtr + srcPtr->width; sp < send; /*empty*/) {
-	    right = *sp;
-	    dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	    dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	    dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	    dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-	    left = center;
-	    center = right;
-	    dp++, sp++;
-	}
-
-	right = center;
-	dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    return;
-}
-
-static void
-TentVertically(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_Pixel *srcColPtr, *destColumnPtr;
-    int x;
-
-    srcColPtr = srcPtr->bits;
-    destColumnPtr = destPtr->bits;
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel left, center, right;
-	Blt_Pixel *dp, *sp, *send;
-
-	dp = destColumnPtr;
-	sp = srcColPtr + srcPtr->pixelsPerRow;
-	left = *srcColPtr, center = left, right = *sp;
-	dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-	center = right;
-	dp += destPtr->pixelsPerRow;
-	sp += srcPtr->pixelsPerRow;
-
-	for (send = srcColPtr + (srcPtr->height * srcPtr->pixelsPerRow); 
-	     sp < send; /* empty */) {
-	    right = *sp;
-	    dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	    dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	    dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	    dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-	    left = center;
-	    center = right;
-	    dp += destPtr->pixelsPerRow;
-	    sp += srcPtr->pixelsPerRow;
-	}	
-	right = center;
-	dp->Red = (left.Red + (center.Red << 1) + right.Red) >> 2;
-	dp->Green = (left.Green + (center.Green << 1) + right.Green) >> 2;
-	dp->Blue = (left.Blue + (center.Blue << 1) + right.Blue) >> 2;
-	dp->Alpha = (left.Alpha + (center.Alpha << 1) + right.Alpha) >> 2;
-
-	srcColPtr++, destColumnPtr++;
-    }
-}
-
-static void
-ApplyPictureToPicture(Pict *destPtr, Pict *srcPtr, int x, int y, 
-		      int w, int h, int dx, int dy, Blt_PictureArithOps op)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    if ((x + w) > srcPtr->width) {
-	w -= srcPtr->width - x;
-    }
-    if ((y + h) > srcPtr->height) {
-	h -= srcPtr->height - y;
-    }
-    if ((dx + w) > destPtr->width) {
-	w -= destPtr->width - dx;
-    }
-    if ((dy + h) > destPtr->height) {
-	h -= destPtr->height - dy;
-    }
-    srcRowPtr = srcPtr->bits + (srcPtr->pixelsPerRow * y) + x;
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * dy) + dx;
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *dend;
-	
-	sp = srcRowPtr;
-	dp = destRowPtr, dend = dp + w;
-	switch(op) {
-
-	case PIC_ARITH_ADD:
-	    while (dp < dend) {
-		int i;
-		i = dp->Red + sp->Red;
-		dp->Red = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = dp->Green + sp->Green;
-		dp->Green = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = dp->Blue + sp->Blue;
-		dp->Blue =  (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = dp->Alpha + sp->Alpha;
-		dp->Alpha = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		sp++, dp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_SUB:
-	    while (dp < dend) {
-		int i;
-
-		i = dp->Red - sp->Red;
-		dp->Red =   (i < 0) ? 0 : i;
-		i = dp->Green - sp->Green;
-		dp->Green = (i < 0) ? 0 : i;
-		i = dp->Blue - sp->Blue;
-		dp->Blue =  (i < 0) ? 0 : i;
-		i = dp->Alpha - sp->Alpha;
-		dp->Alpha = (i < 0) ? 0 : i;
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_RSUB:
-	    while (dp < dend) {
-		int i;
-
-		i = sp->Red - dp->Red;
-		dp->Red =   (i < 0) ? 0 : i;
-		i = sp->Green - dp->Green;
-		dp->Green = (i < 0) ? 0 : i;
-		i = sp->Blue - dp->Blue;
-		dp->Blue =  (i < 0) ? 0 : i;
-		i = sp->Alpha - dp->Alpha;
-		dp->Alpha = (i < 0) ? 0 : i;
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_AND:
-	    while (dp < dend) {
-		dp->u32 &= sp->u32;
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_OR:
-	    while (dp < dend) {
-		dp->u32 |= sp->u32;
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_XOR:
-	    while (dp < dend) {
-		dp->u32 ^= sp->u32;
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NAND:
-	    while (dp < dend) {
-		dp->u32 = ~(dp->u32 & sp->u32);
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NOR:
-	    while (dp < dend) {
-		dp->u32 = ~(dp->u32 | sp->u32);
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_MIN:
-	    while (dp < dend) {
-		dp->Red = MIN(dp->Red, sp->Red);
-		dp->Green = MIN(dp->Green, sp->Green);
-		dp->Blue = MIN(dp->Blue, sp->Blue);
-		dp->Alpha = MIN(dp->Alpha, sp->Alpha);
-		sp++, dp++;
-	    }
-	    break;
-
-	case PIC_ARITH_MAX:
-	    while (dp < dend) {
-		dp->Red = MAX(dp->Red, sp->Red);
-		dp->Green = MAX(dp->Green, sp->Green);
-		dp->Blue = MAX(dp->Blue, sp->Blue);
-		dp->Alpha = MAX(dp->Alpha, sp->Alpha);
-		sp++, dp++;
-	    }
-	    break;
-
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-void
-Blt_ApplyColorToPicture(Pict *srcPtr, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    if (sp->Alpha != 0x0) {
-		sp->Red = colorPtr->Red;
-		sp->Green = colorPtr->Green;
-		sp->Blue = colorPtr->Blue;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-static void
-ApplyScalarToPicture(Pict *srcPtr, Blt_Pixel *colorPtr, Blt_PictureArithOps op)
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	sp = srcRowPtr;
-	send = sp + srcPtr->width;
-	switch(op) {
-	    
-	case PIC_ARITH_ADD:
-	    while (sp < send) {
-		int i;
-		
-		i = sp->Red + colorPtr->Red;
-		sp->Red = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = sp->Green + colorPtr->Green;
-		sp->Green = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = sp->Blue + colorPtr->Blue;
-		sp->Blue =  (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		i = sp->Alpha + colorPtr->Alpha;
-		sp->Alpha = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_SUB:
-	    while (sp < send) {
-		int i;
-
-		i = sp->Red - colorPtr->Red;
-		sp->Red =   (i < 0) ? 0 : i;
-		i = sp->Green - colorPtr->Green;
-		sp->Green = (i < 0) ? 0 : i;
-		i = sp->Blue - colorPtr->Blue;
-		sp->Blue =  (i < 0) ? 0 : i;
-		i = sp->Alpha - colorPtr->Alpha;
-		sp->Alpha = (i < 0) ? 0 : i;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_RSUB:
-	    while (sp < send) {
-		int i;
-
-		i = colorPtr->Red - sp->Red;
-		sp->Red =   (i < 0) ? 0 : i;
-		i = colorPtr->Green - sp->Green;
-		sp->Green = (i < 0) ? 0 : i;
-		i = colorPtr->Blue - sp->Blue;
-		sp->Blue =  (i < 0) ? 0 : i;
-		i = colorPtr->Alpha - sp->Alpha;
-		sp->Alpha = (i < 0) ? 0 : i;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_AND:
-	    while (sp < send) {
-		sp->u32 &= colorPtr->u32;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_OR:
-	    while (sp < send) {
-		sp->u32 |= colorPtr->u32;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_XOR:
-	    while (sp < send) {
-		sp->u32 ^= colorPtr->u32;
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NAND:
-	    while (sp < send) {
-		sp->u32 = ~(sp->u32 & colorPtr->u32);
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NOR:
-	    while (sp < send) {
-		sp->u32 = ~(sp->u32 | colorPtr->u32);
-		sp++;
-	    }
-	    break;
-
-	case PIC_ARITH_MIN:
-	    while (sp < send) {
-		sp->Red = MIN(sp->Red, colorPtr->Red);
-		sp->Green = MIN(sp->Green, colorPtr->Green);
-		sp->Blue = MIN(sp->Blue, colorPtr->Blue);
-		sp->Alpha = MIN(sp->Alpha, colorPtr->Alpha);
-		sp++;
-	    }
-	    break;
-	case PIC_ARITH_MAX:
-	    while (sp < send) {
-		sp->Red = MAX(sp->Red, colorPtr->Red);
-		sp->Green = MAX(sp->Green, colorPtr->Green);
-		sp->Blue = MAX(sp->Blue, colorPtr->Blue);
-		sp->Alpha = MAX(sp->Alpha, colorPtr->Alpha);
-		sp++;
-	    }
-	    break;
-
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-
-static void
-ApplyPictureToPictureWithMask(Pict *destPtr, Pict *srcPtr, Pict *maskPtr, 
-			      int x, int y, int w, int h, int dx, int dy, 
-			      int invert, Blt_PictureArithOps op)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr, *maskRowPtr;
-    unsigned int off;
-
-    if ((x + w) > srcPtr->width) {
-	w -= srcPtr->width - x;
-    }
-    if ((y + h) > srcPtr->height) {
-	h -= srcPtr->height - y;
-    }
-    if ((dx + w) > destPtr->width) {
-	w -= destPtr->width - dx;
-    }
-    if ((dy + h) > destPtr->height) {
-	h -= destPtr->height - dy;
-    }
-    off = (invert) ? (unsigned int)-1 : 0;
-    maskRowPtr = maskPtr->bits;
-    srcRowPtr = srcPtr->bits + (srcPtr->pixelsPerRow * y) + x;
-    destRowPtr = destPtr->bits + (destPtr->pixelsPerRow * dy) + dx;
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *mp, *mend;
-	
-	sp = srcRowPtr, dp = destRowPtr;
-	mp = maskRowPtr, mend = mp + w;
-	switch(op) {
-
-	case PIC_ARITH_ADD:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-
-		    i = dp->Red + sp->Red;
-		    dp->Red = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = dp->Green + sp->Green;
-		    dp->Green = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = dp->Blue + sp->Blue;
-		    dp->Blue =  (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = dp->Alpha + sp->Alpha;
-		    dp->Alpha = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_SUB:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-		    
-		    i = dp->Red - sp->Red;
-		    dp->Red =   (i < 0) ? 0 : i;
-		    i = dp->Green - sp->Green;
-		    dp->Green = (i < 0) ? 0 : i;
-		    i = dp->Blue - sp->Blue;
-		    dp->Blue =  (i < 0) ? 0 : i;
-		    i = dp->Alpha - sp->Alpha;
-		    dp->Alpha = (i < 0) ? 0 : i;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_RSUB:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-		    
-		    i = sp->Red - dp->Red;
-		    dp->Red =   (i < 0) ? 0 : i;
-		    i = sp->Green - dp->Green;
-		    dp->Green = (i < 0) ? 0 : i;
-		    i = sp->Blue - dp->Blue;
-		    dp->Blue =  (i < 0) ? 0 : i;
-		    i = sp->Alpha - dp->Alpha;
-		    dp->Alpha = (i < 0) ? 0 : i;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_AND:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->u32 &= sp->u32;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_OR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->u32 |= sp->u32;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-		
-	case PIC_ARITH_XOR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->u32 ^= sp->u32;
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_NAND:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->u32 = ~(dp->u32 & sp->u32);
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_NOR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->u32 = ~(dp->u32 | sp->u32);
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_MIN:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->Red = MIN(dp->Red, sp->Red);
-		    dp->Green = MIN(dp->Green, sp->Green);
-		    dp->Blue = MIN(dp->Blue, sp->Blue);
-		    dp->Alpha = MIN(dp->Alpha, sp->Alpha);
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	case PIC_ARITH_MAX:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    dp->Red = MAX(dp->Red, sp->Red);
-		    dp->Green = MAX(dp->Green, sp->Green);
-		    dp->Blue = MAX(dp->Blue, sp->Blue);
-		    dp->Alpha = MAX(dp->Alpha, sp->Alpha);
-		}
-		sp++, dp++, mp++;
-	    }
-	    break;
-	    
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-	maskRowPtr += maskPtr->pixelsPerRow;
-    }
-}
-
-static void
-ApplyScalarToPictureWithMask(Pict *srcPtr, Blt_Pixel *colorPtr, Pict *maskPtr, 
-			     int invert, Blt_PictureArithOps op)
-{
-    Blt_Pixel *srcRowPtr, *maskRowPtr;
-    int width, height;
-    int y;
-    unsigned int off;
-
-    width = MIN(srcPtr->width, maskPtr->width);
-    height = MIN(srcPtr->height, maskPtr->height);
-    srcRowPtr = srcPtr->bits;
-    maskRowPtr = maskPtr->bits;
-    off = (invert) ? (unsigned int)-1 : 0;
-    for (y = 0; y < height; y++) {
-	Blt_Pixel *sp, *mp, *mend;
-	
-	sp = srcRowPtr;
-	mp = maskRowPtr, mend = mp + width;
-	switch(op) {
-
-	case PIC_ARITH_ADD:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-		    
-		    i = sp->Red + colorPtr->Red;
-		    sp->Red = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = sp->Green + colorPtr->Green;
-		    sp->Green = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = sp->Blue + colorPtr->Blue;
-		    sp->Blue =  (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		    i = sp->Alpha + colorPtr->Alpha;
-		    sp->Alpha = (i > MAXINTENSITY) ? MAXINTENSITY : i;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_SUB:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-		    
-		    i = sp->Red - colorPtr->Red;
-		    sp->Red =   (i < 0) ? 0 : i;
-		    i = sp->Green - colorPtr->Green;
-		    sp->Green = (i < 0) ? 0 : i;
-		    i = sp->Blue - colorPtr->Blue;
-		    sp->Blue =  (i < 0) ? 0 : i;
-		    i = sp->Alpha - colorPtr->Alpha;
-		    sp->Alpha = (i < 0) ? 0 : i;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_RSUB:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    int i;
-		    
-		    i = colorPtr->Red - sp->Red;
-		    sp->Red =   (i < 0) ? 0 : i;
-		    i = colorPtr->Green - sp->Green;
-		    sp->Green = (i < 0) ? 0 : i;
-		    i = colorPtr->Blue - sp->Blue;
-		    sp->Blue =  (i < 0) ? 0 : i;
-		    i = colorPtr->Alpha - sp->Alpha;
-		    sp->Alpha = (i < 0) ? 0 : i;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_AND:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->u32 &= colorPtr->u32;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_OR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->u32 |= colorPtr->u32;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_XOR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->u32 ^= colorPtr->u32;
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NAND:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->u32 = ~(sp->u32 & colorPtr->u32);
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_NOR:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->u32 = ~(sp->u32 | colorPtr->u32);
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	case PIC_ARITH_MIN:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->Red = MIN(sp->Red, colorPtr->Red);
-		    sp->Green = MIN(sp->Green, colorPtr->Green);
-		    sp->Blue = MIN(sp->Blue, colorPtr->Blue);
-		    sp->Alpha = MIN(sp->Alpha, colorPtr->Alpha);
-		}
-		sp++, mp++;
-	    }
-	    break;
-	case PIC_ARITH_MAX:
-	    while (mp < mend) {
-		if (mp->u32 != off) {
-		    sp->Red = MAX(sp->Red, colorPtr->Red);
-		    sp->Green = MAX(sp->Green, colorPtr->Green);
-		    sp->Blue = MAX(sp->Blue, colorPtr->Blue);
-		    sp->Alpha = MAX(sp->Alpha, colorPtr->Alpha);
-		}
-		sp++, mp++;
-	    }
-	    break;
-
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	maskRowPtr += maskPtr->pixelsPerRow;
-    }
-}
-
-void
-Blt_MultiplyPixels(Pict *srcPtr, float scalar)
-{
-    Blt_Pixel *srcRowPtr;
-    short int s15;
-    int y;
-    float x;
-    int nBits, bias;
-
-    x = FABS(scalar);
-    if (FABS(x) > 127.0) {
-	return;
-    }
-    /* Figure out how many bits we need. */
-    nBits = 0;
-    while ((1 << nBits) < x) {
-	nBits++;
-    }
-    nBits = 15 - nBits;
-    bias = (1 << nBits) / 2;
-    if (scalar < 0) {
-	bias = -bias;
-    }
-    
-    s15 = (short int)((scalar * (float)(1 << nBits)) + 0.5);
-
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	sp = srcRowPtr;
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    short int r15, g15, b15, a15;
-	    int i31;
-	    short int i15;
-	    
-	    r15 = ((sp->Red << 8) + sp->Red) >> 1;
-	    g15 = ((sp->Green << 8) + sp->Green) >> 1;
-	    b15 = ((sp->Blue << 8) + sp->Blue) >> 1;
-	    a15 = ((sp->Alpha << 8) + sp->Alpha) >> 1;
-	    
-	    i31 = r15 * s15;
-	    i15 = i31 >> 16;	/* Truncate lower 16 bits */
-	    i15 =+ bias;
-	    i15 >>= nBits;
-	    sp->Red = (i15 > 255) ? 255 : i15;
-	    
-	    i31 = g15 * s15;
-	    i15 = i31 >> 16;	/* Truncate lower 16 bits */
-	    i15 =+ bias;
-	    i15 >>= nBits;
-	    sp->Green = (i15 > 255) ? 255 : i15;
-	    
-	    i31 = b15 * s15;
-	    i15 = i31 >> 16;	/* Truncate lower 16 bits */
-	    i15 =+ bias;
-	    i15 >>= nBits;
-	    sp->Green = (i15 > 255) ? 255 : i15;
-	    
-	    i31 = a15 * s15;
-	    i15 = i31 >> 16;	/* Truncate lower 16 bits */
-	    i15 =+ bias;
-	    i15 >>= nBits;
-	    sp->Alpha = (i15 > 255) ? 255 : i15;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-}
-
-static void
-SelectPixels(Pict *destPtr, Pict *srcPtr, Blt_Pixel *lowPtr, Blt_Pixel *highPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    int y;
-
-    if (srcPtr != destPtr) {
-	Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    }
-    destRowPtr = destPtr->bits, srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp, *sp, *send;
-
-	dp = destRowPtr;
-	for(sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    if ((sp->Red >= lowPtr->Red) && (sp->Red <= highPtr->Red) &&
-		(sp->Green >= lowPtr->Green) && (sp->Green <= highPtr->Green) &&
-		(sp->Blue >= lowPtr->Blue) && (sp->Blue <= highPtr->Blue) &&
-		(sp->Alpha >= lowPtr->Alpha) && (sp->Alpha <= highPtr->Alpha)) {
-		dp->u32 = 0xFFFFFFFF;
-	    } else {
-		dp->u32 = 0;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-    destPtr->flags &= ~BLT_PIC_BLEND;
-    destPtr->flags |= BLT_PIC_MASK;
-}
-
-#ifdef nodtdef
-void
-Blt_BoxFilterPicture(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    BoxY(destPtr, srcPtr);
-    BoxX(destPtr, destPtr);    
-}
-
-void
-Blt_TentFilterPicture(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    Blt_TentVertically(destPtr, srcPtr);
-    Blt_TentHorizontally(destPtr, destPtr);    
-}
-
-static unsigned int
-ComputeWeights(
-    unsigned int sw, unsigned int dw,	/* Source and destination widths. */
-    ResampleFilter *filterPtr,
-    Sample **samplePtrPtr)
-{
-    Sample *samples;
-    double scale;
-    int bytesPerSample;
-
-    /* Pre-calculate filter contributions for a row */
-    scale = (double)dw / (double)sw;
-    if (scale < 1.0) {
-	Sample *samplePtr;
-	double radius, fscale;
-	int filterSize, x;
-
-	/* Downsample */
-
-	radius = filterPtr->support / scale;
-	fscale = 1.0 / scale;
-	filterSize = (int)(radius * 2 + 2);
-
-	bytesPerSample = sizeof(Sample) + 
-	    ((filterSize - 1) * sizeof(PixelWeight));
-	samples = Blt_AssertCalloc(dw, bytesPerSample);
-	samplePtr = samples;
-#define DEBUG 0
-#if DEBUG
-	fprintf(stderr, "downscale=%g, fscale=%g, radius=%g\n",
-		    scale, fscale, radius);
-#endif
-	for (x = 0; x < dw; x++) {
-	    PixelWeight *wp;
-	    double center;
-	    int i, left, right;	/* Filter bounds. */
-
-	    center = ((double)x + 0.5) * fscale;
-
-	    /* Determine bounds of filter and its density. */
-	    left = (int)/*floor*/(center - radius);
-	    if (left < 0) {
-		left = 0;
-	    }
-	    right = (int)/*floor*/(center + radius);
-	    if (right >= sw) {
-		right = sw - 1;
-	    }
-	    samplePtr->start = left;
-	    samplePtr->wend = samplePtr->weights + (right - left + 1);
-
-	    for (wp = samplePtr->weights, i = left; i <= right; i++, wp++) {
-		wp->f32 = (float)
-		    (*filterPtr->proc)(((double)i - center) * scale);
-		wp->i32 = float2si(wp->f32);
-	    }
-	    samplePtr = (Sample *)((char *)samplePtr + bytesPerSample);
-	}
-    } else {
-	Sample *samplePtr;
-	double fscale;
-	int filterSize, x;
-
-	/* Upsample */
-
-	filterSize = (int)(filterPtr->support * 2 + 2);
-	bytesPerSample = sizeof(Sample) + 
-	    ((filterSize - 1) * sizeof(PixelWeight));
-	samples = Blt_AssertCalloc(dw, bytesPerSample);
-	fscale = 1.0 / scale;
-
-	samplePtr = samples;
-#if DEBUG
-	fprintf(stderr, "upscale=%g, fscale=%g, radius=%g\n",
-		    scale, fscale, filterPtr->support);
-#endif
-	for (x = 0; x < dw; x++) {
-	    PixelWeight *wp;
-	    double center;
-	    int i, left, right;	/* Filter bounds. */
-
-	    center = ((double)x + 0.5) * fscale;
-	    left = (int)(center - filterPtr->support);
-	    if (left < 0) {
-		left = 0;
-	    }
-	    right = (int)(center + filterPtr->support);
-	    if (right >= sw) {
-		right = sw - 1;
-	    }
-	    samplePtr->start = left;
-	    samplePtr->wend = samplePtr->weights + (right - left + 1);
-
-	    /* Sum the contributions for each pixel in the filter. */
-	    for (wp = samplePtr->weights, i = left; i <= right;i++, wp++) {
-		wp->f32 = (float) (*filterPtr->proc)((double)i - center);
-		wp->i32 = float2si(wp->f32);
-	    }
-	    /* Go get the next sample. */
-	    samplePtr = (Sample *)((char *)samplePtr + bytesPerSample);
-	}
-    }
-    *samplePtrPtr = samples;
-    return bytesPerSample;
-}
-#endif
-
-static unsigned int *
-CreateNeighborhoodMap(unsigned int size, unsigned int radius)
-{
-    unsigned int newSize;
-    unsigned int *map, *p;
-    unsigned int i;
-
-    newSize = size + radius + radius;	
-    map = Blt_AssertMalloc(sizeof(unsigned int) * newSize);
-    p = map;
-    for (i = 0; i < radius; i++, p++) {
-	*p = 0;		    /* Before the picture. Replicate the first
-			     * pixel. */  
-    }
-    for (i = 0; i < size; i++, p++) {
-	*p = i;		
-    }
-    for (i = 0; i < radius; i++, p++) {
-	*p = size - 1;	      /* After the picture. Replicate the last
-			       * pixel */
-    }
-    return map;
-}
-
-static void
-ConvolveVertically(Pict *destPtr, Pict *srcPtr, TableFilter *filterPtr)
-{
-    int x;
-    unsigned *map, mapSize;
-    int fscale;
-
-    map = CreateNeighborhoodMap(srcPtr->height, filterPtr->nWeights / 2);
-    mapSize = srcPtr->height + filterPtr->nWeights;
-    fscale = float2si(filterPtr->scale);
-
-    /* Apply filter to each row. */
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColPtr;
-
-	srcColPtr = srcPtr->bits + x;
-	dp = destPtr->bits + x;
-	for (x = 0; x < mapSize; x++) {
-	    int i;
-	    int r, g, b, a;
-	    
-	    r = g = b = a = 0;
-	    for (i = 0; i < filterPtr->nWeights; i++) {
-		int sx;
-		Blt_Pixel *sp;
-
-		sx = map[x + i];
-		sp = srcColPtr + (srcPtr->pixelsPerRow * sx);
-		r += sp->Red * filterPtr->weights[i];
-		g += sp->Green * filterPtr->weights[i];
-		b += sp->Blue * filterPtr->weights[i];
-		a += sp->Alpha * filterPtr->weights[i];
-	    }
-	    r *= fscale;
-	    g *= fscale;
-	    b *= fscale;
-	    a *= fscale;
-	    dp->Red = (unsigned char)SICLAMP(r);
-	    dp->Green = (unsigned char)SICLAMP(g);
-	    dp->Blue = (unsigned char)SICLAMP(b);
-	    dp->Alpha = (unsigned char)SICLAMP(a);
-	    dp += destPtr->pixelsPerRow;
-	}
-    }
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(map);
-}
-
-static void
-ConvolveHorizontally(Pict *destPtr, Pict *srcPtr, TableFilter *filterPtr)
-{
-    int y;
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    unsigned int *map, mapSize;
-    int fscale;
-
-    map = CreateNeighborhoodMap(srcPtr->width, filterPtr->nWeights / 2);
-    mapSize = srcPtr->width + filterPtr->nWeights;
-    fscale = float2si(filterPtr->scale);
-    destRowPtr = destPtr->bits;
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	int x;
-
-	dp = destRowPtr;
-	for (x = 0; x < mapSize; x++) {
-	    int i;
-	    int r, g, b, a;
-	    
-	    r = g = b = a = 0;
-	    for (i = 0; i < filterPtr->nWeights; i++) {
-		Blt_Pixel *sp;
-		
-		sp = srcRowPtr + map[x + i];
-		r += sp->Red * filterPtr->weights[i];
-		g += sp->Green * filterPtr->weights[i];
-		b += sp->Blue * filterPtr->weights[i];
-		a += sp->Alpha * filterPtr->weights[i];
-	    }
-	    r *= fscale;
-	    g *= fscale;
-	    b *= fscale;
-	    a *= fscale;
-	    dp->Red = (unsigned char)SICLAMP(r);
-	    dp->Green = (unsigned char)SICLAMP(g);
-	    dp->Blue = (unsigned char)SICLAMP(b);
-	    dp->Alpha = (unsigned char)SICLAMP(a);
-	    dp++;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    /* Free the memory allocated for map. */
-    Blt_Free(map);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConvolvePicture --
- *
- *      Resamples a given picture using 1-D filters and returns a new picture
- *      of the designated size.
- *
- * Results:
- *      Returns the resampled picture. The original picture is left intact.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ConvolvePicture(Pict *destPtr, Pict *srcPtr,
-		    struct _Blt_ConvolveFilter *xFilterPtr, 
-		    struct _Blt_ConvolveFilter *yFilterPtr)
-{
-    Pict *tmpPtr;
-
-    tmpPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    if (xFilterPtr->type == RESAMPLE_FILTER) {
-	Blt_ZoomHorizontally(tmpPtr, srcPtr, xFilterPtr->filter);
-    } else {
-	ConvolveHorizontally(tmpPtr, srcPtr, xFilterPtr->filter);
-    }
-    if (yFilterPtr->type == RESAMPLE_FILTER) {
-	Blt_ZoomVertically(destPtr, tmpPtr, yFilterPtr->filter);
-    } else {
-	ConvolveVertically(destPtr, tmpPtr, yFilterPtr->filter);
-    }
-    Blt_FreePicture(tmpPtr);
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-}
-
-static void
-BoxCarVertically(Pict *destPtr, Pict *srcPtr, unsigned int r)
-{
-    unsigned int x;
-    unsigned int *map;
-    int fscale;
-    unsigned int fwidth;		/* Filter width */
-    float s;
-
-    map = CreateNeighborhoodMap(srcPtr->height, r);
-    fwidth = r + r + 1;
-    s = 1.0f / fwidth;
-    fscale = float2si(s);
-
-    fwidth--;
-    /* Apply filter to each row. */
-    for (x = 0; x < srcPtr->width; x++) {
-	Blt_Pixel *dp, *srcColPtr;
-	int r, g, b, a;
-	unsigned int y;
-
-	srcColPtr = srcPtr->bits + x;
-	r = g = b = a = 0;
-	/* Prime the pump. */
-	for (y = 0; y < fwidth; y++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcColPtr + (srcPtr->pixelsPerRow * map[y]);
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	}
-	dp = destPtr->bits + x;
-	for (y = 0; y < srcPtr->height; y++) {
-	    Blt_Pixel *sp;
-	    int fr, fg, fb, fa;
-
-	    sp = srcColPtr + (srcPtr->pixelsPerRow * map[y + fwidth]);
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	    fr = r * fscale;
-	    fg = g * fscale;
-	    fb = b * fscale;
-	    fa = a * fscale;
-	    dp->Red = (unsigned char)SICLAMP(fr);
-	    dp->Green = (unsigned char)SICLAMP(fg);
-	    dp->Blue = (unsigned char)SICLAMP(fb);
-	    dp->Alpha = (unsigned char)SICLAMP(fa);
-	    sp = srcColPtr + (srcPtr->pixelsPerRow * map[y]);
-	    r -= sp->Red;
-	    g -= sp->Green;
-	    b -= sp->Blue;
-	    a -= sp->Alpha;
-	    dp += destPtr->pixelsPerRow;
-	}
-    }
-    /* Free the memory allocated for filter weights. */
-    Blt_Free(map);
-}
-
-static void
-BoxCarHorizontally(Pict *destPtr, Pict *srcPtr, unsigned int r)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-    float s;
-    unsigned int *map;
-    int fscale;
-    unsigned int y;
-    unsigned int fwidth;		/* Filter width */
-
-    fwidth = r + r + 1;
-    map = CreateNeighborhoodMap(srcPtr->width, r);
-    s = 1.0f / fwidth;
-    fscale = float2si(s);
-    destRowPtr = destPtr->bits;
-    srcRowPtr = srcPtr->bits;
-    fwidth--;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *dp;
-	unsigned int x;
-	int r, g, b, a;
-	
-	/* Prime the pump. Get sums for each component for the first (fwidth)
-	 * pixels in the column. */
-	r = g = b = a = 0;
-	for (x = 0; x < fwidth; x++) {
-	    Blt_Pixel *sp;
-
-	    sp = srcRowPtr + map[x];
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	}
-	dp = destRowPtr;
-	for (x = 0; x < srcPtr->width; x++) {
-	    Blt_Pixel *sp;
-	    int fr, fg, fb, fa;
-
-	    sp = srcRowPtr + map[x + fwidth];
-	    r += sp->Red;
-	    g += sp->Green;
-	    b += sp->Blue;
-	    a += sp->Alpha;
-	    fr = r * fscale;
-	    fg = g * fscale;
-	    fb = b * fscale;
-	    fa = a * fscale;
-	    dp->Red = (unsigned char)SICLAMP(fr);
-	    dp->Green = (unsigned char)SICLAMP(fg);
-	    dp->Blue = (unsigned char)SICLAMP(fb);
-	    dp->Alpha = (unsigned char)SICLAMP(fa);
-	    sp = srcRowPtr + map[x];
-	    r -= sp->Red;
-	    g -= sp->Green;
-	    b -= sp->Blue;
-	    a -= sp->Alpha;
-	    dp++;
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    /* Free the memory allocated for map. */
-    Blt_Free(map);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_BlurPicture --
- *
- *      Blurs a picture using a series of 1-D box filters.  The width of the
- *      box filter is a parameter. The source picture is blurred and stored in
- *      the destination picture.
- *
- * Results:
- *      None. 
- * Side Effects: 
- *	The original picture is left intact.  The destination picture contains
- *	the blurred image.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_BlurPicture(Pict *destPtr, Pict *srcPtr, unsigned int r)
-{
-    Pict *tmpPtr;
-
-    if (srcPtr != destPtr) {
-	Blt_ResizePicture(destPtr, srcPtr->width, srcPtr->height);
-    }
-    tmpPtr = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    BoxCarHorizontally(tmpPtr, srcPtr, r);
-    BoxCarVertically(destPtr, tmpPtr, r);
-    BoxCarHorizontally(tmpPtr, destPtr, r);
-    BoxCarVertically(destPtr, tmpPtr, r);
-    BoxCarHorizontally(tmpPtr, destPtr, r);
-    BoxCarVertically(destPtr, tmpPtr, r);
-#ifdef notdef
-    BoxCarHorizontally(tmpPtr, destPtr, r);
-    BoxCarVertically(destPtr, tmpPtr, r);
-#endif
-    Blt_FreePicture(tmpPtr);
-    destPtr->flags = (srcPtr->flags | BLT_PIC_DIRTY);
-}
-
-#ifdef notdef
-void
-Blt_BlurPictureOld(Blt_Picture pict)
-{
-    Blt_Picture tmp;
-
-    tmp = Blt_CreatePicture(Blt_PictureWidth(pict), Blt_PictureHeight(pict));
-    BoxX(tmp, pict), BoxY(pict, tmp);
-    BoxX(tmp, pict), BoxY(pict, tmp); 
-    BoxX(tmp, pict), BoxY(pict, tmp);
-    BoxX(tmp, pict), BoxY(pict, tmp);
-    Blt_FreePicture(tmp);
-}
-#endif
-
-void
-Blt_SharpenPicture(Pict *destPtr, Pict *srcPtr)
-{
-    Blt_Picture blur, tmp;
-    
-    blur = Blt_CreatePicture(srcPtr->width, srcPtr->height);
-    Blt_BlurPicture(blur, srcPtr, 4);
-    /* 
-     * tmp = src - blur;
-     * dest = src + tmp
-     */
-    tmp = Blt_ClonePicture(srcPtr);
-    Blt_SubtractPictures(tmp, blur);
-    Blt_AddPictures(tmp, srcPtr);
-    Blt_FreePicture(blur);
-    Blt_CopyPictureBits(destPtr, tmp, 0, 0, Blt_PictureWidth(tmp),
-	Blt_PictureHeight(tmp), 0, 0);
-    Blt_FreePicture(tmp);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TilePicture --
- *
- *      Tiles the designated region in the destination picture with the source
- *      picture.
- *	
- *	Please note that it is the responsibility of the caller to verify the
- *	region is valid (i.e. wholly contained by the destination picture).
- *
- * Results:
- *      The destination picture is tiled. The original picture * is left
- *      intact.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TilePicture(
-    Pict *destPtr,			/* Picture to be tiled. */
-    Pict *srcPtr,			/* Picture used as the tile. */
-    int xOrigin, int yOrigin,		/* Tile origin. */
-    int x, int y, int w, int h)		/* Region of destination picture to be
-					 * tiled. */
-{
-    int startX, startY;			/* Starting upper left corner of
-					 * region. */
-    int delta;
-
-    /* Compute the starting x and y offsets of the tile from the coordinates
-     * of the origin. */
-    startX = x;
-    if (x < xOrigin) {
-	delta = (xOrigin - x) % srcPtr->width;
-	if (delta > 0) {
-	    startX -= (srcPtr->width - delta);
-	}
-    } else if (x > xOrigin) {
-	delta = (x - xOrigin) % srcPtr->width;
-	if (delta > 0) {
-	    startX -= delta;
-	}
-    }
-    startY = y;
-    if (y < yOrigin) {
-	delta = (yOrigin - y) % srcPtr->height;
-	if (delta > 0) {
-	    startY -= (srcPtr->height - delta);
-	}
-    } else if (y >= yOrigin) {
-	delta = (y - yOrigin) % srcPtr->height;
-	if (delta > 0) {
-	    startY -= delta;
-	}
-    }
-
-#ifdef notdef
-    fprintf(stderr, "tile is (%d,%d,%d,%d)\n", 
-		 xOrigin, yOrigin, srcPtr->width, srcPtr->height);
-    fprintf(stderr, "region is (%d,%d,%d,%d)\n", x, y, w, h);
-    fprintf(stderr, "starting at %d,%d\n", startX, startY);
-#endif
-    {
-	int left, top, right, bottom;
-
-	/* The region to be tiled. */
-	left = x;
-	right = x + w;
-	top = y;
-	bottom = y + h;
-
-	for (y = startY; y < bottom; y += srcPtr->height) {
-	    int sy, dy;
-	    int th;			/* Current tile height. */
-	    
-	    sy = 0;
-	    dy = y;
-	    th = srcPtr->height;
-	    if (y < top) {
-		sy = (top - y);
-		th = srcPtr->height - sy;
-		dy = top;
-	    } 
-	    if ((dy + th) > bottom) {
-		th = (bottom - dy);
-	    }
-	    for (x = startX; x < right; x += srcPtr->width) {
-		int sx, dx;
-		int tw;			/* Current tile width. */
-		
-		sx = 0;
-		dx = x;
-		tw = srcPtr->width;
-		if (x < left) {
-		    sx = (left - x);
-		    tw = srcPtr->width - sx;
-		    dx = left;
-		} 
-		if ((dx + tw) > right) {
-		    tw = (right - dx);
-		}
-#ifdef notdef
-		fprintf(stder, "drawing pattern (%d,%d,%d,%d) at %d,%d\n",
-			sx, sy, tw, th, dx, dy);
-#endif
-		Blt_BlendPictures(destPtr, srcPtr, sx, sy, tw, th, dx, dy);
-	    }
-	}
-    }
-}
-
-void
-Blt_GradientPicture(
-    Pict *destPtr,			/* (out) Picture to contain the new
-					 * gradient. */
-    Blt_Pixel *maxPtr,			/* Color to represent 1.0 */
-    Blt_Pixel *minPtr,			/* Color to represent 0.0 */
-    Blt_Gradient *gradientPtr)
-{
-    double rRange, gRange, bRange, aRange;
-
-    /* Compute the ranges for each color component. */
-    rRange = (double)(maxPtr->Red - minPtr->Red);
-    gRange = (double)(maxPtr->Green - minPtr->Green);
-    bRange = (double)(maxPtr->Blue - minPtr->Blue);
-    aRange = (double)(maxPtr->Alpha - minPtr->Alpha);
-
-    switch (gradientPtr->shape) {
-    case BLT_GRADIENT_SHAPE_LINEAR:
-	switch (gradientPtr->path) {
-	case BLT_GRADIENT_PATH_X:
-	    {
-		Blt_Pixel *copyRowPtr, *destRowPtr, *dp;
-		int x, y;
-		
-		/* Draw the gradient on the first row, then copy the row to
-		 * each subsequent row. */
-		
-		destRowPtr = destPtr->bits;
-		for (dp = destRowPtr, x = 0; x < destPtr->width; x++, dp++) {
-		    double t;
-		    
-		    t = (double)x / (double)(destPtr->width - 1);
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    dp->Red   = (unsigned char)(minPtr->Red   + t * rRange);
-		    dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-		    dp->Blue  = (unsigned char)(minPtr->Blue  + t * bRange);
-		    dp->Alpha = (unsigned char)(minPtr->Alpha + t * aRange);
-		}
-		destRowPtr += destPtr->pixelsPerRow;;
-		copyRowPtr = destPtr->bits;
-		for (y = 1; y < destPtr->height; y++) {
-		    Blt_Pixel *dp, *sp, *send;
-		    
-		    for (dp = destRowPtr, sp = copyRowPtr, 
-			send = sp + destPtr->width; sp < send; dp++, sp++) {
-			dp->u32 = sp->u32;
-		    }
-		    copyRowPtr += destPtr->pixelsPerRow;
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-
-	case BLT_GRADIENT_PATH_Y:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp, *dend;
-		    double t;
-		    Blt_Pixel color;
-		    
-		    /* Compute the color value for the row and then replicate
-		     * it in every pixel in the row. */
-		    
-		    dp = destRowPtr;
-		    t = (double)y / (double)(destPtr->height - 1);
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    color.Red =   (unsigned char)(minPtr->Red + t * rRange);
-		    color.Green = (unsigned char)(minPtr->Green +  t * gRange);
-		    color.Blue =  (unsigned char)(minPtr->Blue +  t * bRange);
-		    color.Alpha = (unsigned char)(minPtr->Alpha +  t * aRange);
-		    for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-			 dp++) {
-			dp->u32 = color.u32;
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-
-	case BLT_GRADIENT_PATH_YX:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp;
-		    int x;
-		    double ty;
-
-		    ty = (double)y / (double)(destPtr->height - 1);
-		    ty = 1.0 - ty;
-		    for (dp = destRowPtr, x=0; x < destPtr->width; x++, dp++) {
-			double t;
-			double tx;
-			
-			tx = (double)x / (double)(destPtr->width - 1);
-			t = (tx + ty) * 0.5;
-			if (gradientPtr->jitter) {
-			    t += JITTER(t);
-			    t = JCLAMP(t);
-			}
-			if (gradientPtr->logScale) {
-			    t = log10(9.0 * t + 1.0);
-			}
-			dp->Red   = (unsigned char)(minPtr->Red + t * rRange);
-			dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-			dp->Blue  = (unsigned char)(minPtr->Blue + t * bRange);
-			dp->Alpha = (unsigned char)(minPtr->Alpha + t * aRange);
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-	case BLT_GRADIENT_PATH_XY:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp;
-		    int x;
-		    double ty;
-
-		    ty = (double)y / (double)(destPtr->height - 1);
-		    for (dp = destRowPtr, x=0; x < destPtr->width; x++, dp++) {
-			double t, tx;
-			
-			tx = (double)x / (double)(destPtr->width - 1);
-			t = (tx + ty) * 0.5;
-			if (gradientPtr->jitter) {
-			    t += JITTER(t);
-			    t = JCLAMP(t);
-			}
-			if (gradientPtr->logScale) {
-			    t = log10(9.0 * t + 1.0);
-			}
-			dp->Red =   (unsigned char)(minPtr->Red + t * rRange);
-			dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-			dp->Blue =  (unsigned char)(minPtr->Blue + t * bRange);
-			dp->Alpha = (unsigned char)(minPtr->Alpha + t * aRange);
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-	}
-	break;
-
-    case BLT_GRADIENT_SHAPE_BILINEAR:
-	switch (gradientPtr->path) {
-	case BLT_GRADIENT_PATH_X:
-	    {
-		Blt_Pixel *copyRowPtr, *destRowPtr, *dp;
-		int x, y;
-		
-		/* Draw the gradient on the first row, then copy the row to
-		 * each subsequent row. */
-		
-		destRowPtr = destPtr->bits;
-		for (dp = destRowPtr, x = 0; x < destPtr->width; x++, dp++) {
-		    double t;
-		    
-		    t = (double)x / (double)(destPtr->width - 1);
-		    if (t > 0.5) {
-			t = 1.0 - t;
-		    }
-		    t += t;
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    dp->Red = (unsigned char)(minPtr->Red + t * rRange);
-		    dp->Green = (unsigned char)(minPtr->Green +  t * gRange);
-		    dp->Blue = (unsigned char)(minPtr->Blue +  t * bRange);
-		    dp->Alpha = (unsigned char)(minPtr->Alpha +  t * aRange);
-		}
-		destRowPtr += destPtr->pixelsPerRow;;
-		copyRowPtr = destPtr->bits;
-		for (y = 1; y < destPtr->height; y++) {
-		    Blt_Pixel *dp, *sp, *send;
-		    
-		    for (dp = destRowPtr, sp = copyRowPtr, 
-			send = sp + destPtr->width; sp < send; dp++, sp++) {
-			dp->u32 = sp->u32;
-		    }
-		    copyRowPtr += destPtr->pixelsPerRow;
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-
-	case BLT_GRADIENT_PATH_Y:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp, *dend;
-		    double t;
-		    Blt_Pixel color;
-		    
-		    /* Compute the color value for the row and then replicate
-		     * it in every pixel in the row. */
-		    
-		    dp = destRowPtr;
-		    t = (double)y / (double)(destPtr->height - 1);
-		    if (t > 0.5) {
-			t = 1.0 - t;
-		    }
-		    t += t;
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    color.Red =   (unsigned char)(minPtr->Red + t * rRange);
-		    color.Green = (unsigned char)(minPtr->Green +  t * gRange);
-		    color.Blue =  (unsigned char)(minPtr->Blue +  t * bRange);
-		    color.Alpha = (unsigned char)(minPtr->Alpha +  t * aRange);
-		    for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend;
-			 dp++) {
-			dp->u32 = color.u32;
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-
-	case BLT_GRADIENT_PATH_YX:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp;
-		    int x;
-		    double ty;
-
-		    ty = (double)y / (double)(destPtr->height - 1);
-		    for (dp = destRowPtr, x = 0; x < destPtr->width; x++, dp++) {
-			double t, tx;
-
-			tx = (double)x / (double)(destPtr->width - 1);
-			t = 1.0 - ABS(tx - ty);
-			if (gradientPtr->jitter) {
-			    t += JITTER(t);
-			    t = JCLAMP(t);
-			}
-			if (gradientPtr->logScale) {
-			    t = log10(9.0 * t + 1.0);
-			}
-			dp->Red =   (unsigned char)(minPtr->Red + t * rRange);
-			dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-			dp->Blue =  (unsigned char)(minPtr->Blue + t * bRange);
-			dp->Alpha = (unsigned char)(minPtr->Alpha + t * aRange);
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-
-	case BLT_GRADIENT_PATH_XY:
-	    {
-		Blt_Pixel *destRowPtr;
-		int y;
-		
-		destRowPtr = destPtr->bits;
-		for (y = 0; y < destPtr->height; y++) {
-		    Blt_Pixel *dp;
-		    int x;
-		    double ty;
-
-		    ty = (double)y / (double)(destPtr->height - 1);
-		    ty = 1.0 - ty;
-		    for (dp = destRowPtr, x=0; x < destPtr->width; x++, dp++) {
-			double t, tx;
-
-			tx = (double)x / (double)(destPtr->width - 1);
-			t = 1.0 - ABS(tx - ty);
-			if (gradientPtr->jitter) {
-			    t += JITTER(t);
-			    t = JCLAMP(t);
-			}
-			if (gradientPtr->logScale) {
-			    t = log10(9.0 * t + 1.0);
-			}
-			dp->Red =   (unsigned char)(minPtr->Red + t * rRange);
-			dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-			dp->Blue =  (unsigned char)(minPtr->Blue + t * bRange);
-			dp->Alpha = (unsigned char)(minPtr->Alpha + t * aRange);
-		    }
-		    destRowPtr += destPtr->pixelsPerRow;
-		}
-	    }
-	    break;
-	}
-	break;
-
-    case BLT_GRADIENT_SHAPE_RADIAL:
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    int cx, cy;
-	    int range;
-	    destRowPtr = destPtr->bits;
-
-	    /* Center coordinates. */
-	    cx = destPtr->width / 2, cy = destPtr->height / 2;
-	    range = cx * cx + cy * cy;
-	    for (y = 0; y < destPtr->height; y++) {
-		int x;
-		double dy, dy2;
-		Blt_Pixel *dp;
-		
-		dy = ABS(cy - y);
-		dy2 = dy * dy;
-		dp = destRowPtr;
-		for (x = 0; x < destPtr->width; x++) {
-		    double dx;
-		    double t;
-		    
-		    dx = ABS(cx - x);
-		    t = sqrt(dx * dx + dy2) / range;
-		    t = 1.0 - t;
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    dp->Red = (unsigned char)(minPtr->Red + t * rRange);
-		    dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-		    dp->Blue = (unsigned char)(minPtr->Blue + t * bRange);
-		    dp->Alpha = (unsigned char)(t * aRange);
-		    dp++;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-	
-    case BLT_GRADIENT_SHAPE_RECTANGULAR:
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-	    int midX, midY;
-	    
-	    midX = destPtr->width / 2, midY = destPtr->height / 2;
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < destPtr->height; y++) {
-		Blt_Pixel *dp;
-		int x;
-		double ty;
-		
-		ty = (double)y / (double)(destPtr->height - 1);
-		if (ty > 0.5) {
-		    ty = 1.0 - ty;
-		}
-		dp = destRowPtr;
-		for (x = 0; x < destPtr->width; x++) {
-		    double t;
-		    double tx;
-
-		    tx = (double)x / (double)(destPtr->width - 1);
-		    if (tx > 0.5) {
-			tx = 1.0 - tx;
-		    }
-		    t = MIN(tx, ty);
-		    t += t;
-		    if (gradientPtr->jitter) {
-			t += JITTER(t);
-			t = JCLAMP(t);
-		    }
-		    if (gradientPtr->logScale) {
-			t = log10(9.0 * t + 1.0);
-		    }
-		    dp->Red = (unsigned char)(minPtr->Red + t * rRange);
-		    dp->Green = (unsigned char)(minPtr->Green + t * gRange);
-		    dp->Blue = (unsigned char)(minPtr->Blue + t * bRange);
-		    dp->Alpha = (unsigned char)(t * aRange);
-		    dp++;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    }
-}
-
-void
-Blt_TexturePicture(Pict *destPtr, Blt_Pixel *lowPtr, Blt_Pixel *highPtr, 
-		   int type)
-{
-#define TEXTURE_STRIPED 0
-    switch (type) {
-    case TEXTURE_STRIPED:
-	{
-	    Blt_Pixel *destRowPtr;
-	    int y;
-
-	    destRowPtr = destPtr->bits;
-	    for (y = 0; y < destPtr->height; y++) {
-		Blt_Pixel *dp, *dend;
-		Blt_Pixel color;
-
-		color = ((y / 2) & 0x1) ? *lowPtr : *highPtr;
-		if (0) {
-		    double t;
-		    t = 0.8;
-		    t += JITTER(t);
-		    t = JCLAMP(t);
-		    color.Blue  = (unsigned char)(color.Blue + t * 255.0);
-		    color.Red   = (unsigned char)(color.Red + t * 255.0);
-		    color.Green = (unsigned char)(color.Green + t * 255.0);
-		}
-		for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend; 
-		     dp++) {
-		    dp->u32 = color.u32;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-	    }
-	}
-	break;
-    }
-}
-
-int
-Blt_QueryColors(Pict *srcPtr, Blt_HashTable *tablePtr)
-{
-    Blt_HashTable colorTable;
-    Blt_Pixel *srcRowPtr;
-    int y;
-    int nColors;
-    unsigned int flags;
-
-    flags = 0;
-    if (tablePtr == NULL) {
-	Blt_InitHashTable(&colorTable, BLT_ONE_WORD_KEYS);
-	tablePtr = &colorTable;
-    }
-    if (srcPtr->flags & BLT_PIC_ASSOCIATED_COLORS) {
-	Blt_UnassociateColors(srcPtr);
-    }
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    int isNew;
-	    Blt_Pixel color;
-	    unsigned long key;
-
-	    if ((sp->Red != sp->Green) || (sp->Green != sp->Blue)) {
-		flags |= BLT_PIC_COLOR;
-	    }
-	    if (sp->Alpha != 0xFF) {
-#ifdef notdef
-		fprintf(stderr, "Alpha at [%d,%d] = %x\n",
-			sp - srcRowPtr, y, sp->Alpha);
-#endif
-		if (sp->Alpha == 0x00) {
-		    flags |= BLT_PIC_MASK;
-		} else {
-		    flags |= BLT_PIC_BLEND;
-		}
-	    }
-	    color.u32 = sp->u32;
-	    color.Alpha = 0xFF;
-	    key = (unsigned long)color.u32;
-	    Blt_CreateHashEntry(tablePtr, (char *)key, &isNew);
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
-    nColors = tablePtr->numEntries;
-    if (tablePtr == &colorTable) {
-	Blt_DeleteHashTable(&colorTable);
-    }
-    srcPtr->flags |= flags;
-    return nColors;
-}
-
-void
-Blt_ClassifyPicture(Pict *srcPtr)
-{
-    Blt_Pixel *srcRowPtr;
-    int y;
-    unsigned int flags;
-    int opaque, transparent;
-
-    flags = 0;
-    srcRowPtr = srcPtr->bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    if ((sp->Red != sp->Green) || (sp->Green != sp->Blue)) {
-		flags |= BLT_PIC_COLOR;
-		goto checkOpacity;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
- checkOpacity:
-    srcRowPtr = srcPtr->bits;
-    opaque = transparent = FALSE;
-    for (y = 0; y < srcPtr->height; y++) {
-	Blt_Pixel *sp, *send;
-	
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++) {
-	    if (sp->Alpha == 0xFF) {
-		opaque = TRUE;
-	    } else if (sp->Alpha == 0x00) {
-		transparent = TRUE;
-	    } else {
-		flags |= BLT_PIC_BLEND;
-		goto setFlags;
-	    }
-	}
-	if (opaque && transparent) {
-	    flags |= BLT_PIC_MASK;
-	    goto setFlags;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-    }
- setFlags:
-    srcPtr->flags |= flags;
-}
-
-void 
-Blt_MaskPicture(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		int dx, int dy, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *send;
-
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    if (sp->u32 != 0) {
-		dp->u32 = colorPtr->u32;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
-void 
-Blt_MaskPicture2(Pict *destPtr, Pict *srcPtr, int x, int y, int w, int h, 
-		int dx, int dy, Blt_Pixel *colorPtr)
-{
-    Blt_Pixel *srcRowPtr, *destRowPtr;
-
-    destRowPtr = destPtr->bits + ((dy * destPtr->pixelsPerRow) + dx);
-    srcRowPtr  = srcPtr->bits + ((y * srcPtr->pixelsPerRow) + x);
-    for (y = 0; y < h; y++) {
-	Blt_Pixel *sp, *dp, *send;
-
-	dp = destRowPtr;
-	for (sp = srcRowPtr, send = sp + srcPtr->width; sp < send; sp++, dp++) {
-	    if (sp->Alpha == 0xFF) {
-		dp->u32 = colorPtr->u32;
-	    }
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-}
-
diff --git a/blt3.0/src/bltPicture.h b/blt3.0/src/bltPicture.h
deleted file mode 100644
index e9fd766..0000000
--- a/blt3.0/src/bltPicture.h
+++ /dev/null
@@ -1,411 +0,0 @@
-
-/*
- * bltPicture.h --
- *
- *	Copyright 2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_PICTURE_H
-#define _BLT_PICTURE_H
-
-#include <bltHash.h>
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Pixel --
- *
- *      A union representing either a pixel as a RGBA quartet or a single
- *      word value.
- *
- *---------------------------------------------------------------------------
- */
-typedef union {
-    unsigned int u32;		
-    struct {
-#ifdef WORDS_BIGENDIAN
-	unsigned char a, r, g, b;
-#else 
-	unsigned char b, g, r, a;
-#endif    
-    } u8;
-} Blt_Pixel;
-
-#define Red	u8.r
-#define Blue	u8.b
-#define Green	u8.g
-#define Alpha	u8.a
-
-#define ALPHA_OPAQUE		(0xFF)
-#define ALPHA_TRANSPARENT	(0)
-#define MAXINTENSITY		(0xFF)
-
-#define GAMMA	(1.0f)
-
-struct _Blt_Ps;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Picture --
- *
- *      The structure below represents a picture.  Each pixel occupies a
- *      32-bit word of memory: one byte for each of the red, green, and blue
- *      color intensities, and another for alpha-channel image compositing
- *      (e.g. transparency).
- *
- *---------------------------------------------------------------------------
- */
-struct _Blt_Picture {
-    void *buffer;		/* Unaligned (malloc'ed) memory for pixels. */
-    Blt_Pixel *bits;		/* Array of pixels containing the RGBA
-				 * values. */
-    short int delay;
-    short int flags;		/* Flags describing the picture. */
-    short int width, height;	/* Dimensions of the image in pixels. */
-    short int pixelsPerRow;	/* Stride of the image. */
-    short int reserved;
-};
-
-#define BLT_PIC_COLOR  (1<<0)	/* Indicates if color or greyscale. */
-#define BLT_PIC_BLEND  (1<<1)	/* Picture has partial opaque pixels. */
-#define BLT_PIC_MASK   (1<<2)	/* Pixels are either 100% opaque or
-				 * transparent. The separate BLEND and MASK
-				 * flags are so that don't premultiply alphas
-				 * for masks. */
-
-#define BLT_PIC_ASSOCIATED_COLORS (1<<3)
-				/* Indicates if RGB components have been
-				 * premultiplied by their alphas. */
-
-#define BLT_PIC_DIRTY (1<<4)	/* Indicates that the picture contents have
-				 * changed. Cached items may need to be
-				 * refreshed. For example, may need to
-				 * premultiply alphas again. */ 
-
-#define BLT_PIC_FMT_ASCII		(1<<0)
-#define BLT_PIC_FMT_LOADED		(1<<1)
-
-#define BLT_PAINTER_DITHER		(1<<0)
-
-#define BLT_PAINTER_BLEND_MASK		(0x0F)
-#define BLT_PAINTER_BLEND_NONE		(0)
-#define BLT_PAINTER_BLEND_MIN_ALPHAS	(1<<1)
-#define BLT_PAINTER_BLEND_MAX_ALPHAS	(1<<2)
-#define BLT_PAINTER_BLEND_DIFF		(1<<3)
-#define BLT_PAINTER_BLEND_MULTIPLY	(1<<4)
-#define BLT_PAINTER_BLEND_UNDER		(1<<6)
-
-typedef enum GradientShapes {
-    BLT_GRADIENT_SHAPE_LINEAR,
-    BLT_GRADIENT_SHAPE_BILINEAR,
-    BLT_GRADIENT_SHAPE_RADIAL,	
-    BLT_GRADIENT_SHAPE_RECTANGULAR
-} Blt_GradientShape;
-
-typedef enum GradientPaths {
-    BLT_GRADIENT_PATH_X,
-    BLT_GRADIENT_PATH_Y,
-    BLT_GRADIENT_PATH_XY,
-    BLT_GRADIENT_PATH_YX,
-} Blt_GradientPath;
-
-typedef struct {
-    Blt_GradientShape shape;	/* Determines the shape of gradient. */
-
-    Blt_GradientPath path;	/* Determines the direction of a linear or
-				 * bilinear gradient. */
-
-    int logScale;		/* If non-zero, use a logarithmic scale to
-				 * ramp colors. */
-
-    int jitter;			/* If non-zero, add jitter error to
-				 * gradient. */
-
-} Blt_Gradient;
-
-typedef struct _Blt_PictureImage *Blt_PictureImage;
-typedef struct _Blt_ResampleFilter *Blt_ResampleFilter;
-typedef struct _Blt_ConvolveFilter *Blt_ConvolveFilter;
-typedef struct _Blt_Picture *Blt_Picture;
-
-struct _Blt_Chain;
-
-/*
- * Blt_Picture is supposed to be an opaque type.  Use the macros below to
- * access its members.
- */
-
-#define Blt_PictureBits(p)	((p)->bits)
-#define Blt_PictureFlags(p)	((p)->flags)
-#define Blt_PictureHeight(p)	((p)->height)
-#define Blt_PicturePixel(p,x,y) ((p)->bits + ((p)->pixelsPerRow * (y)) + (x))
-#define Blt_PictureWidth(p)	((p)->width)
-#define Blt_PictureStride(p)	((p)->pixelsPerRow)
-#define Blt_PictureDelay(p)	((p)->delay)
-
-#define Blt_PictureIsDirty(p)	((p)->flags & BLT_PIC_DIRTY)
-#define Blt_PictureIsOpaque(p)	\
-	(((p)->flags & (BLT_PIC_BLEND | BLT_PIC_MASK)) == 0)
-#define Blt_PictureIsMasked(p)  ((p)->flags &  BLT_PIC_MASK) 
-#define Blt_PictureIsBlended(p) ((p)->flags &  BLT_PIC_BLEND)
-#define Blt_PictureIsColor(p)   ((p)->flags &  BLT_PIC_COLOR)
-#define Blt_PictureIsGreyscale(p)   (!Blt_IsColorPicture(p))
-
-typedef enum PictureArithOps {
-    PIC_ARITH_ADD,
-    PIC_ARITH_AND,
-    PIC_ARITH_NAND,
-    PIC_ARITH_NOR,
-    PIC_ARITH_OR,
-    PIC_ARITH_RSUB,
-    PIC_ARITH_SUB,
-    PIC_ARITH_XOR,
-    PIC_ARITH_MIN,
-    PIC_ARITH_MAX,
-} Blt_PictureArithOps;
-
-typedef struct {
-    unsigned int x, y;
-} PictureCoordinate;
-
-typedef enum BlendingModes {
-    BLT_BLEND_NORMAL,		/* C = F */
-    BLT_BLEND_MULTIPLY,		/* C = F * B */
-    BLT_BLEND_SCREEN,		/* C = 1 - (1 - F * B */
-    BLT_BLEND_DARKEN,		/* C = min(F,B) */
-    BLT_BLEND_LIGHTEN,		/* C = max(F,B) */
-    BLT_BLEND_DIFFERENCE,	/* C = |F - B| */
-    BLT_BLEND_HARDLIGHT,
-    BLT_BLEND_SOFTLIGHT,
-    BLT_BLEND_COLORDODGE,	/* C = B / (1 - F) */ 
-    BLT_BLEND_COLORBURN,	/* C = (1 - B) / F */
-    BLT_BLEND_OVERLAY,		/* C = B * (F + (2 * F) * (1 - B)) */
-} Blt_BlendingMode;
-
-BLT_EXTERN Blt_ResampleFilter bltBoxFilter; /* The ubiquitous box filter */
-BLT_EXTERN Blt_ResampleFilter bltMitchellFilter; 
-BLT_EXTERN Blt_ResampleFilter bltBellFilter; 
-BLT_EXTERN Blt_ResampleFilter bltTentFilter; 
-
-BLT_EXTERN Blt_ResampleFilter bltTableFilter;
-
-typedef struct {
-    int x, y, w, h;
-} PictRegion;
-
-#define Blt_AddPictures(dest, src) \
-    Blt_ApplyPictureToPicture(dest, src, 0, 0, (src)->width, (src)->height, \
-	0, 0, PIC_ARITH_ADD)
-#define Blt_SubtractPictures(dest, src) \
-    Blt_ApplyPictureToPicture(dest, src, 0, 0, (src)->width, (src)->height, \
-	0, 0, PIC_ARITH_SUB)
-#define Blt_AndPictures(dest, src) \
-    Blt_ApplyPictureToPicture(dest, src, 0, 0, (src)->width, (src)->height, \
-	0, 0, PIC_ARITH_AND)
-#define Blt_OrPictures(dest, src) \
-    Blt_ApplyPictureToPicture(dest, src, 0, 0, (src)->width, (src)->height, \
-	0, 0, PIC_ARITH_OR)
-#define Blt_XorPictures(dest, src) \
-    Blt_ApplyPictureToPicture(dest, src, 0, 0, (src)->width, (src)->height, \
-	0, 0, PIC_ARITH_XOR)
-
-typedef unsigned int (*Blt_ColorLookupTable)[33][33];
-
-/* Prototypes of picture routines */
-
-BLT_EXTERN void Blt_ApplyPictureToPicture(Blt_Picture dest, Blt_Picture src,
-	int x, int y, int w, int h, int dx, int dy, Blt_PictureArithOps op);
-
-BLT_EXTERN void Blt_ApplyScalarToPicture(Blt_Picture dest, Blt_Pixel *colorPtr, 
-	Blt_PictureArithOps op);
-
-BLT_EXTERN void Blt_ApplyPictureToPictureWithMask(Blt_Picture dest, 
-	Blt_Picture src, Blt_Picture mask, int x, int y, int w, int h, 
-	int dx, int dy, int invert, Blt_PictureArithOps op);
-
-BLT_EXTERN void Blt_ApplyScalarToPictureWithMask(Blt_Picture dest, 
-	Blt_Pixel *colorPtr, Blt_Picture mask, int invert, 
-	Blt_PictureArithOps op);
-
-BLT_EXTERN void Blt_MaskPicture(Blt_Picture dest, Blt_Picture mask, 
-	int x, int y, int w, int h, int dx, int dy, Blt_Pixel *colorPtr);
-
-BLT_EXTERN void Blt_BlankPicture(Blt_Picture picture, Blt_Pixel *colorPtr);
-BLT_EXTERN void Blt_BlankRegion(Blt_Picture picture, int x, int y, int w, int h,
-	 Blt_Pixel *colorPtr);
-
-BLT_EXTERN void Blt_BlurPicture(Blt_Picture dest, Blt_Picture src, 
-	unsigned int r);
-
-BLT_EXTERN void Blt_ResizePicture(Blt_Picture picture, int w, int h);
-BLT_EXTERN void Blt_AdjustPicture(Blt_Picture picture, int w, int h);
-
-BLT_EXTERN Blt_Picture Blt_ClonePicture(Blt_Picture picture);
-
-BLT_EXTERN void Blt_ConvolvePicture(Blt_Picture dest, Blt_Picture src, 
-	Blt_ConvolveFilter vFilter, Blt_ConvolveFilter hFilter);
-
-BLT_EXTERN Blt_Picture Blt_CreatePicture(int w, int h);
-
-BLT_EXTERN Blt_Picture Blt_DitherPicture(Blt_Picture picture, 
-	Blt_Pixel *palette);
-
-BLT_EXTERN void Blt_FlipPicture(Blt_Picture picture, int vertically);
-
-BLT_EXTERN void Blt_FreePicture(Blt_Picture picture);
-
-BLT_EXTERN void Blt_GradientPicture(Blt_Picture picture, Blt_Pixel *highPtr, 
-	Blt_Pixel *lowPtr, Blt_Gradient *gradientPtr);
-
-BLT_EXTERN Blt_Picture Blt_GreyscalePicture(Blt_Picture picture);
-
-BLT_EXTERN Blt_Picture Blt_QuantizePicture (Blt_Picture picture, int nColors);
-
-BLT_EXTERN void Blt_ResamplePicture (Blt_Picture dest, Blt_Picture src, 
-	Blt_ResampleFilter hFilter, Blt_ResampleFilter vFilter);
-
-BLT_EXTERN Blt_Picture Blt_ScalePicture(Blt_Picture picture, int x, int y, 
-	int w, int h, int dw, int dh);
-
-BLT_EXTERN Blt_Picture Blt_ScalePictureArea(Blt_Picture picture, int x, int y,
-	int w, int h, int dw, int dh);
-
-BLT_EXTERN Blt_Picture Blt_RotatePicture (Blt_Picture picture, float angle);
-
-BLT_EXTERN void Blt_TilePicture(Blt_Picture dest, Blt_Picture src, int xOrigin, 
-	int yOrigin, int x, int y, int w, int h);
-
-BLT_EXTERN int Blt_PictureToPsData(Blt_Picture picture, int nComponents, 
-	Tcl_DString *resultPtr, const char *prefix);
-
-BLT_EXTERN void Blt_SelectPixels(Blt_Picture dest, Blt_Picture src, 
-	Blt_Pixel *lowerPtr, Blt_Pixel *upperPtr);
-
-BLT_EXTERN int Blt_GetPicture(Tcl_Interp *interp, const char *string, 
-	Blt_Picture *picturePtr);
-
-BLT_EXTERN int Blt_GetPictureFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_Picture *picturePtr);
-
-BLT_EXTERN int Blt_GetResampleFilterFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
-	Blt_ResampleFilter *filterPtr);
-
-BLT_EXTERN const char *Blt_NameOfResampleFilter(Blt_ResampleFilter filter);
-
-BLT_EXTERN void Blt_AssociateColors(Blt_Picture picture);
-
-BLT_EXTERN void Blt_UnassociateColors(Blt_Picture picture);
-
-BLT_EXTERN void Blt_MultiplyPixels(Blt_Picture picture, float value);
-
-BLT_EXTERN int Blt_GetBBoxFromObjv(Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, PictRegion *regionPtr);
-
-BLT_EXTERN int Blt_AdjustRegionToPicture(Blt_Picture picture, 
-	PictRegion *regionPtr);
-
-BLT_EXTERN int Blt_GetPixelFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_Pixel *pixelPtr);
-
-BLT_EXTERN int Blt_GetPixel(Tcl_Interp *interp, const char *string, 
-	Blt_Pixel *pixelPtr);
-
-BLT_EXTERN const char *Blt_NameOfPixel(Blt_Pixel *pixelPtr);
-
-BLT_EXTERN Blt_Picture Blt_PictureFromPictImage(Blt_PictureImage image);
-
-BLT_EXTERN void Blt_NotifyImageChanged(Blt_PictureImage image);
-
-BLT_EXTERN int Blt_QueryColors(Blt_Picture picture, Blt_HashTable *tablePtr);
-
-BLT_EXTERN void Blt_ClassifyPicture(Blt_Picture picture);
-
-BLT_EXTERN void Blt_TentHorizontally(Blt_Picture dest, Blt_Picture src);
-BLT_EXTERN void Blt_TentVertically(Blt_Picture dest, Blt_Picture src);
-BLT_EXTERN void Blt_ZoomHorizontally(Blt_Picture dest, Blt_Picture src, 
-	Blt_ResampleFilter filter);
-BLT_EXTERN void Blt_ZoomVertically(Blt_Picture dest, Blt_Picture src, 
-	Blt_ResampleFilter filter);
-BLT_EXTERN void Blt_BlendPictures(Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy);
-
-BLT_EXTERN void Blt_BlendPicturesByMode(Blt_Picture dest, Blt_Picture src, 
-	Blt_BlendingMode mode);
-
-BLT_EXTERN void Blt_SelectPixelsP(Blt_Picture dest, Blt_Picture src, 
-	Blt_Pixel *lowPtr , Blt_Pixel *highPtr);
-
-BLT_EXTERN void Blt_FadePicture(Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy, int alpha);
-
-BLT_EXTERN void Blt_CopyPictureBits(Blt_Picture dest, Blt_Picture src, 
-	int sx, int sy, int w, int h, int dx, int dy);
-
-BLT_EXTERN void Blt_GammaCorrectPicture(Blt_Picture dest, Blt_Picture src, 
-	float gamma);
-
-BLT_EXTERN void Blt_SharpenPicture(Blt_Picture dest, Blt_Picture src);
-
-BLT_EXTERN void Blt_TexturePicture(Blt_Picture picture, Blt_Pixel *lowPtr, 
-	Blt_Pixel *highPtr, int type);
-
-BLT_EXTERN void Blt_ApplyColorToPicture(Blt_Picture pict, Blt_Pixel *colorPtr);
-
-BLT_EXTERN void Blt_SizeOfPicture(Blt_Picture pict, int *wPtr, int *hPtr);
-
-#ifdef _BLT_DBUFFER_H
-BLT_EXTERN Blt_DBuffer Blt_PictureToDBuffer(Blt_Picture picture, int nComp);
-#endif	/* _BLT_DBUFFER_H */
-
-BLT_EXTERN int Blt_ResetPicture(Tcl_Interp *interp, const char *imageName, 
-	Blt_Picture picture);
-
-BLT_EXTERN void Blt_MapColors(Blt_Picture dest, Blt_Picture src, 
-	Blt_ColorLookupTable clut);
-
-BLT_EXTERN Blt_ColorLookupTable Blt_GetColorLookupTable(struct _Blt_Chain *chain,
-	int nReqColors);
-
-#ifdef _TK
-BLT_EXTERN Blt_Picture Blt_PhotoToPicture (Tk_PhotoHandle photo);
-BLT_EXTERN Blt_Picture Blt_PhotoAreaToPicture (Tk_PhotoHandle photo, 
-	int x, int y, int w, int h);
-BLT_EXTERN Blt_Picture Blt_DrawableToPicture(Tk_Window tkwin, 
- 	Drawable drawable, int x, int y, int w, int h, float gamma);
-BLT_EXTERN Blt_Picture Blt_WindowToPicture(Display *display, 
-	Drawable drawable, int x, int y, int w, int h, float gamma);
-BLT_EXTERN void Blt_PictureToPhoto(Blt_Picture picture, Tk_PhotoHandle photo);
-BLT_EXTERN int Blt_SnapPhoto(Tcl_Interp *interp, Tk_Window tkwin, 
-	Drawable drawable, int sx, int sy, int w, int h, int dw, int dh, 
-	const char *photoName, float gamma);
-BLT_EXTERN int Blt_SnapPicture(Tcl_Interp *interp, Tk_Window tkwin, 
-	Drawable drawable, int sx, int sy, int w, int h, int dw, int dh, 
-	const char *imageName, float gamma);
-BLT_EXTERN Blt_Picture Blt_BitmapToPicture(Display *display, Pixmap bitmap,
-	int w, int h, Blt_Pixel *fg, Blt_Pixel *bg);
-BLT_EXTERN Blt_Pixel Blt_XColorToPixel(XColor *colorPtr);
-BLT_EXTERN int Blt_IsPicture(Tk_Image tkImage);
-BLT_EXTERN Blt_Picture Blt_GetPictureFromImage(Tk_Image tkImage);
-#endif	/* _TK */
-
-#endif /*_BLT_PICTURE_H*/
diff --git a/blt3.0/src/bltPool.c b/blt3.0/src/bltPool.c
deleted file mode 100644
index 81ac0db..0000000
--- a/blt3.0/src/bltPool.c
+++ /dev/null
@@ -1,473 +0,0 @@
-
-/*
- * bltPool.c --
- *
- *	Copyright 2001-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltPool.h"
-
-/*
- * Blt_Pool --
- *
- *	Implements a pool memory allocator. 
- *
- *	  + It's faster allocating memory since malloc/free are called
- *	    only a fraction of the normal times.  Fixed size items can 
- *	    be reused without deallocating/reallocating memory.
- *	  + You don't have the extra 8-16 byte overhead per malloc. 
- *	  - Memory is freed only when the entire pool is destroyed.
- *	  - Memory is allocated in chunks. More memory is allocated 
- *	    than used.  
- *	  0 Depending upon allocation/deallocation patterns, locality
- *	    may be improved or degraded.
- *
- *      The pool is a chain of malloc'ed blocks.
- *
- *             +---------+  +---------+  +---------+  
- *       NULL<-| nextPtr |<-| nextPtr |<-| nextPtr |<- headPtr
- *             |---------|  |---------|  |---------|  
- *             | chunk1  |  | chunk2  |  | chunk3  |  
- *             +---------+  |         |  |         |  
- *                          +---------+  |         |  
- *                                       |         |  
- *                                       |         |  
- *                                       +---------+  
- *
- *      Each chunk contains an integral number of fixed size items.
- *	The number of items doubles until a maximum size is reached
- *      (each subsequent new chunk will be the maximum).  Chunks
- *	are allocated only when needed (no more space is available
- *	in the last chunk).
- *
- *	The chain of blocks is only freed when the entire pool is
- *	destroyed.  
- *
- *      A freelist of unused items also maintained. Each freed item
- *	is prepended to a free list.  Before allocating new chunks
- *	the freelist is examined to see if any unused items exist.
- *
- *               chunk1       chunk2       chunk3
- *            +---------+  +---------+  +---------+  
- *      NULL<-| unused  |  |         |  |         |
- *            +----^----+  +---------+  +---------+  
- *            | unused  |<-| unused  |<-| unused  |       
- *            +---------+  +---------+  +----^----+  
- *            |         |  |         |  | unused  |
- *            +---------+  |         |  +----^----+
- *                         |         |  |    |    |
- *                         +---------+  +----|----+
- *                                      | usused  |<- freePtr
- *                                      +---------+  
- */
-
-#define POOL_MAX_CHUNK_SIZE      ((1<<16) - sizeof(PoolChain))
-
-#ifndef ALIGN
-#define ALIGN(a) \
-	(((size_t)a + (sizeof(void *) - 1)) & (~(sizeof(void *) - 1)))
-#endif /* ALIGN */
-
-typedef struct _PoolChain {
-   struct _PoolChain *nextPtr;
-} PoolChain;
-
-typedef struct {
-    Blt_PoolAllocProc *allocProc;
-    Blt_PoolFreeProc *freeProc;
-
-    PoolChain *headPtr;		/* Chain of malloc'ed chunks. */
-    PoolChain *freePtr; 	/* List of deleted items. This is only used
-				 * for fixed size items. */
-    size_t poolSize;		/* Log2 of # of items in the current block. */
-    size_t itemSize;		/* Size of an item. */
-    size_t bytesLeft;		/* # of bytes left in the current chunk. */
-    size_t waste;
-} Pool;
-
-static Blt_PoolAllocProc VariablePoolAllocItem;
-static Blt_PoolFreeProc  VariablePoolFreeItem;
-static Blt_PoolAllocProc FixedPoolAllocItem;
-static Blt_PoolFreeProc  FixedPoolFreeItem;
-static Blt_PoolAllocProc StringPoolAllocItem;
-static Blt_PoolFreeProc  StringPoolFreeItem;
-
-/*
- *---------------------------------------------------------------------------
- *
- * VariablePoolAllocItem --
- *
- *      Returns a new item.  First check if there is any more space 
- *	left in the current chunk.  If there isn't then next check
- *	the free list for unused items.  Finally allocate a new 
- *	chunk and return its first item.
- *
- * Results:
- *      Returns a new (possible reused) item.
- *
- * Side Effects:
- *	A new memory chunk may be allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void *
-VariablePoolAllocItem(
-    Blt_Pool pool,		      
-    size_t size)		/* Number of bytes to allocate. */
-{
-    Pool *poolPtr = (Pool *)pool;
-    PoolChain *chainPtr;
-    void *memory;
-
-    size = ALIGN(size);
-    if (size >= POOL_MAX_CHUNK_SIZE) {
-	/* 
-	 * Handle oversized requests by allocating a chunk to hold the
-	 * single item and immediately placing it into the in-use list.
-	 */
-	chainPtr = Blt_AssertMalloc(sizeof(PoolChain) + size);
-        if (poolPtr->headPtr == NULL) {
-	    poolPtr->headPtr = chainPtr;
-	} else {
-	    chainPtr->nextPtr = poolPtr->headPtr->nextPtr;
-	    poolPtr->headPtr->nextPtr = chainPtr;
-	}
-	memory = (void *)chainPtr;
-    } else {
-	if (poolPtr->bytesLeft >= size) {
-	    poolPtr->bytesLeft -= size;
-	    memory = (char *)(poolPtr->headPtr + 1) + poolPtr->bytesLeft;
-	} else {
-	    poolPtr->waste += poolPtr->bytesLeft;
-	    /* Create a new block of items and prepend it to the in-use list */
-	    poolPtr->bytesLeft = POOL_MAX_CHUNK_SIZE;
-	    /* Allocate the requested chunk size, plus the header */
-	    chainPtr = Blt_AssertMalloc(sizeof(PoolChain) + poolPtr->bytesLeft);
-	    chainPtr->nextPtr = poolPtr->headPtr;
-	    poolPtr->headPtr = chainPtr;
-	    /* Peel off a new item. */
-	    poolPtr->bytesLeft -= size;
-	    memory = (char *)(chainPtr + 1) + poolPtr->bytesLeft;
-	}
-    }
-    return memory;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VariablePoolFreeItem --
- *
- *      Placeholder for freeProc routine.  The pool memory is 
- *	not reclaimed or freed until the entire pool is released.
- *
- * Results:
- *      None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-VariablePoolFreeItem(Blt_Pool pool, void *item)
-{
-    /* Does nothing */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringPoolAllocItem --
- *
- *      Returns a new item.  First check if there is any more space 
- *	left in the current chunk.  If there isn't then next check
- *	the free list for unused items.  Finally allocate a new 
- *	chunk and return its first item.
- *
- * Results:
- *      Returns a new (possible reused) item.
- *
- * Side Effects:
- *	A new memory chunk may be allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void *
-StringPoolAllocItem(Blt_Pool pool, size_t size)
-{
-    Pool *poolPtr = (Pool *)pool;
-    PoolChain *chainPtr;
-    void *memory;
-
-    if (size >= POOL_MAX_CHUNK_SIZE) {
-	/* 
-	 * Handle oversized requests by allocating a chunk to hold the
-	 * single item and immediately placing it into the in-use list.
-	 */
-	chainPtr = Blt_AssertMalloc(sizeof(PoolChain) + size);
-        if (poolPtr->headPtr == NULL) {
-	    poolPtr->headPtr = chainPtr;
-	} else {
-	    chainPtr->nextPtr = poolPtr->headPtr->nextPtr;
-	    poolPtr->headPtr->nextPtr = chainPtr;
-	}
-	memory = (void *)chainPtr;
-    } else {
-	if (poolPtr->bytesLeft >= size) {
-	    poolPtr->bytesLeft -= size;
-	    memory = (char *)(poolPtr->headPtr + 1) + poolPtr->bytesLeft;
-	} else {
-	    poolPtr->waste += poolPtr->bytesLeft;
-	    /* Create a new block of items and prepend it to the
-	     * in-use list */
-	    poolPtr->bytesLeft = POOL_MAX_CHUNK_SIZE;
-	    /* Allocate the requested chunk size, plus the header */
-	    chainPtr = Blt_AssertMalloc(sizeof(PoolChain) + poolPtr->bytesLeft);
-	    chainPtr->nextPtr = poolPtr->headPtr;
-	    poolPtr->headPtr = chainPtr;
-	    /* Peel off a new item. */
-	    poolPtr->bytesLeft -= size;
-	    memory = (char *)(chainPtr + 1) + poolPtr->bytesLeft;
-	}
-    }
-    return memory;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StringPoolFreeItem --
- *
- *      Placeholder for freeProc routine.  String pool memory is 
- *	not reclaimed or freed until the entire pool is released.
- *
- * Results:
- *      None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-StringPoolFreeItem(Blt_Pool pool, void *item) 
-{
-    /* Does nothing */
-}
-
-/*
- *       The fixed size pool is a chain of malloc'ed blocks.
- *
- *             +---------+  +---------+  +---------+  
- *       NULL<-| nextPtr |<-| nextPtr |<-| nextPtr |<- headPtr
- *             |---------|  |---------|  |---------|  
- *             | chunk1  |  | chunk2  |  | chunk3  |  
- *             +---------+  |         |  |         |  
- *                          +---------+  |         |  
- *                                       |         |  
- *                                       |         |  
- *                                       +---------+  
- *
- *      Each chunk contains an integral number of fixed size items.
- *	The number of items doubles until a maximum size is reached
- *      (each subsequent new chunk will be the maximum).  Chunks
- *	are allocated only when needed (no more space is available
- *	in the last chunk).
- *
- *	The chain of blocks is only freed when the entire pool is
- *	destroyed.  
- *
- *      A freelist of unused items also maintained. Each freed item
- *	is prepended to a free list.  Before allocating new chunks
- *	the freelist is examined to see if an unused items exist.
- *
- *               chunk1       chunk2       chunk3
- *            +---------+  +---------+  +---------+  
- *      NULL<-| unused  |  |         |  |         |
- *            +----^----+  +---------+  +---------+  
- *            | unused  |<-| unused  |<-| unused  |       
- *            +---------+  +---------+  +----^----+  
- *            |         |  |         |  | unused  |
- *            +---------+  |         |  +----^----+
- *                         |         |  |    |    |
- *                         +---------+  +----|----+
- *                                      | usused  |<- freePtr
- *                                      +---------+  
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * FixedPoolFreeItem --
- *
- *      Returns a new item.  First check if there is any more space 
- *	left in the current chunk.  If there isn't then next check
- *	the free list for unused items.  Finally allocate a new 
- *	chunk and return its first item.
- *
- * Results:
- *      Returns a new (possible reused) item.
- *
- * Side Effects:
- *	A new memory chunk may be allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void *
-FixedPoolAllocItem(Blt_Pool pool, size_t size)
-{
-    Pool *poolPtr = (Pool *)pool;
-    PoolChain *chainPtr;
-    void *newPtr;
-
-    size = ALIGN(size);
-    if (poolPtr->itemSize == 0) {
-	poolPtr->itemSize = size;
-    }
-    assert(size == poolPtr->itemSize);
-
-    if (poolPtr->bytesLeft > 0) {
-	poolPtr->bytesLeft -= poolPtr->itemSize;
-	newPtr = (char *)(poolPtr->headPtr + 1) + poolPtr->bytesLeft;
-    } else if (poolPtr->freePtr != NULL) { /* Reuse from the free list. */
-	/* Reuse items on the free list */
-	chainPtr = poolPtr->freePtr;
-	poolPtr->freePtr = chainPtr->nextPtr;
-	newPtr = (void *)chainPtr;
-    } else {			/* Allocate another block. */
-	
-	/* Create a new block of items and prepend it to the in-use list */
-	poolPtr->bytesLeft = poolPtr->itemSize * (1 << poolPtr->poolSize);
-	if (poolPtr->bytesLeft < POOL_MAX_CHUNK_SIZE) {
-	    poolPtr->poolSize++; /* Keep doubling the size of the new 
-				  * chunk up to a maximum size. */
-	}
-	/* Allocate the requested chunk size, plus the header */
-	chainPtr = Blt_AssertMalloc(sizeof(PoolChain) + poolPtr->bytesLeft);
-	chainPtr->nextPtr = poolPtr->headPtr;
-	poolPtr->headPtr = chainPtr;
-
-	/* Peel off a new item. */
-	poolPtr->bytesLeft -= poolPtr->itemSize;
-	newPtr = (char *)(poolPtr->headPtr + 1) + poolPtr->bytesLeft;
-    }
-    return newPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FixedPoolFreeItem --
- *
- *      Frees an item.  The actual memory is not freed.  The item
- *	instead is prepended to a freelist where it may be reclaimed
- *	and used again.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *	Item is placed on the pool's free list.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FixedPoolFreeItem(Blt_Pool pool, void *item) 
-{
-    Pool *poolPtr = (Pool *)pool;
-    PoolChain *chainPtr = (PoolChain *)item;
-    
-    /* Prepend the newly deallocated item to the free list. */
-    chainPtr->nextPtr = poolPtr->freePtr;
-    poolPtr->freePtr = chainPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PoolCreate --
- *
- *      Creates a new memory pool for fixed-size/variable-size/string
- *      items.  
- *
- * Results:
- *      Returns a pointer to the newly allocated pool.
- *
- *---------------------------------------------------------------------------
- */
-
-Blt_Pool
-Blt_PoolCreate(int type)
-{
-    Pool *poolPtr;
-
-    poolPtr = Blt_AssertMalloc(sizeof(Pool));
-    switch (type) {
-    case BLT_VARIABLE_SIZE_ITEMS:
-	poolPtr->allocProc = VariablePoolAllocItem;
-	poolPtr->freeProc = VariablePoolFreeItem;
-	break;
-    case BLT_FIXED_SIZE_ITEMS:
-	poolPtr->allocProc = FixedPoolAllocItem;
-	poolPtr->freeProc = FixedPoolFreeItem;
-	break;
-    case BLT_STRING_ITEMS:
- 	poolPtr->allocProc = StringPoolAllocItem;
-	poolPtr->freeProc = StringPoolFreeItem;
-	break;
-    }
-    poolPtr->headPtr = poolPtr->freePtr = NULL;
-    poolPtr->waste = poolPtr->bytesLeft = 0;
-    poolPtr->poolSize = poolPtr->itemSize = 0;
-    return (Blt_Pool)poolPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PoolDestroy --
- *
- *      Destroys the given memory pool.  The chain of allocated blocks
- *	are freed.  The is the only time that memory is actually freed.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *	All memory used by the pool is freed.
- *
- *---------------------------------------------------------------------------
- */
-void  
-Blt_PoolDestroy(Blt_Pool pool)
-{
-    Pool *poolPtr = (Pool *)pool;
-    PoolChain *chainPtr, *nextPtr;
-    
-    for (chainPtr = poolPtr->headPtr; chainPtr != NULL; chainPtr = nextPtr) {
-	nextPtr = chainPtr->nextPtr;
-	Blt_Free(chainPtr);
-    }
-    Blt_Free(poolPtr);
-}
-
diff --git a/blt3.0/src/bltPool.h b/blt3.0/src/bltPool.h
deleted file mode 100644
index a4fc329..0000000
--- a/blt3.0/src/bltPool.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef BLT_POOL_H
-#define BLT_POOL_H
-
-#define BLT_STRING_ITEMS		0
-#define BLT_FIXED_SIZE_ITEMS		1
-#define BLT_VARIABLE_SIZE_ITEMS		2
-
-typedef struct _Blt_Pool *Blt_Pool;
-typedef void *(Blt_PoolAllocProc)(Blt_Pool pool, size_t size);
-typedef void (Blt_PoolFreeProc)(Blt_Pool pool, void *item);
-
-struct _Blt_Pool {
-    Blt_PoolAllocProc *allocProc;
-    Blt_PoolFreeProc *freeProc;
-};
-
-BLT_EXTERN Blt_Pool Blt_PoolCreate(int type);
-BLT_EXTERN void Blt_PoolDestroy(Blt_Pool pool);
-
-#define Blt_PoolAllocItem(pool, n) (*((pool)->allocProc))(pool, n)
-#define Blt_PoolFreeItem(pool, item) (*((pool)->freeProc))(pool, item)
-
-#endif /* BLT_POOL_H */
diff --git a/blt3.0/src/bltPs.c b/blt3.0/src/bltPs.c
deleted file mode 100644
index 44cfdb8..0000000
--- a/blt3.0/src/bltPs.c
+++ /dev/null
@@ -1,1697 +0,0 @@
-
-/*
- * bltPs.c --
- *
- * This module implements general PostScript conversion routines.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "bltInt.h"
-#include <stdarg.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include "tkIntBorder.h"
-#include "bltDBuffer.h"
-#include "bltPicture.h"
-#include "bltPsInt.h"
-#include "tkDisplay.h"
-#include "tkFont.h"
-
-#define PS_MAXPATH	1500		/* Maximum number of components in a
-					 * PostScript (level 1) path. */
-
-#define PICA_MM		2.83464566929
-#define PICA_INCH	72.0
-#define PICA_CM		28.3464566929
-
-static Tcl_Interp *psInterp = NULL;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_GetPica --
- *
- *	Given a string, returns the number of pica corresponding to that
- *	string.
- *
- * Results:
- *	The return value is a standard TCL return result.  If TCL_OK is
- *	returned, then everything went well and the pixel distance is stored
- *	at *doublePtr; otherwise TCL_ERROR is returned and an error message is
- *	left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Ps_GetPicaFromObj(
-    Tcl_Interp *interp,			/* Use this for error reporting. */
-    Tcl_Obj *objPtr,			/* String describing a number of
-					 * pixels. */
-    int *picaPtr)			/* Place to store converted result. */
-{
-    char *p;
-    double pica;
-    const char *string;
-    
-    string = Tcl_GetString(objPtr);
-    pica = strtod((char *)string, &p);
-    if (p == string) {
-	goto error;
-    }
-    if (pica < 0.0) {
-	goto error;
-    }
-    while ((*p != '\0') && isspace(UCHAR(*p))) {
-	p++;
-    }
-    switch (*p) {
-	case '\0':			     break;
-	case 'c': pica *= PICA_CM;   p++;    break;
-	case 'i': pica *= PICA_INCH; p++;    break;
-	case 'm': pica *= PICA_MM;   p++;    break;
-	case 'p': p++;                       break;
-	default:  goto error;
-    }
-    while ((*p != '\0') && isspace(UCHAR(*p))) {
-	p++;
-    }
-    if (*p == '\0') {
-	*picaPtr = ROUND(pica);
-	return TCL_OK;
-    }
- error:
-    Tcl_AppendResult(interp, "bad screen distance \"", string, "\"", 
-	(char *) NULL);
-    return TCL_ERROR;
-}
-
-int
-Blt_Ps_GetPadFromObj(
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tcl_Obj *objPtr,			/* Pixel value string */
-    Blt_Pad *padPtr)
-{
-    int side1, side2;
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((objc < 1) || (objc > 2)) {
-	Tcl_AppendResult(interp, "wrong # elements in padding list",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_Ps_GetPicaFromObj(interp, objv[0], &side1) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    side2 = side1;
-    if ((objc > 1) && 
-	(Blt_Ps_GetPicaFromObj(interp, objv[1], &side2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    /* Don't update the pad structure until we know both values are okay. */
-    padPtr->side1 = side1;
-    padPtr->side2 = side2;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_ComputeBoundingBox --
- *
- * 	Computes the bounding box for the PostScript plot.  First get the size
- * 	of the plot (by default, it's the size of graph's X window).  If the
- * 	plot plus the page border is bigger than the designated paper size, or
- * 	if the "-maxpect" option is turned on, scale the plot to the page.
- *
- *	Note: All coordinates/sizes are in screen coordinates, not PostScript
- *	      coordinates.  This includes the computed bounding box and paper
- *	      size.  They will be scaled to printer points later.
- *
- * Results:
- *	Returns the height of the paper in screen coordinates.
- *
- * Side Effects:
- *	The graph dimensions (width and height) are changed to the requested
- *	PostScript plot size.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Ps_ComputeBoundingBox(PageSetup *setupPtr, int width, int height)
-{
-    int paperWidth, paperHeight;
-    int x, y, hSize, vSize, hBorder, vBorder;
-    float hScale, vScale, scale;
-
-    x = setupPtr->padLeft;
-    y = setupPtr->padTop;
-
-    hBorder = PADDING(setupPtr->xPad);
-    vBorder = PADDING(setupPtr->yPad);
-
-    if (setupPtr->flags & PS_LANDSCAPE) {
-	hSize = height;
-	vSize = width;
-    } else {
-	hSize = width;
-	vSize = height;
-    }
-    /*
-     * If the paper size wasn't specified, set it to the graph size plus the
-     * paper border.
-     */
-    paperWidth = (setupPtr->reqPaperWidth > 0) ? setupPtr->reqPaperWidth :
-	hSize + hBorder;
-    paperHeight = (setupPtr->reqPaperHeight > 0) ? setupPtr->reqPaperHeight :
-	vSize + vBorder;
-
-    /*
-     * Scale the plot size (the graph itself doesn't change size) if it's
-     * bigger than the paper or if -maxpect was set.
-     */
-    hScale = vScale = 1.0f;
-    if ((setupPtr->flags & PS_MAXPECT) || ((hSize + hBorder) > paperWidth)) {
-	hScale = (float)(paperWidth - hBorder) / (float)hSize;
-    }
-    if ((setupPtr->flags & PS_MAXPECT) || ((vSize + vBorder) > paperHeight)) {
-	vScale = (float)(paperHeight - vBorder) / (float)vSize;
-    }
-    scale = MIN(hScale, vScale);
-    if (scale != 1.0f) {
-	hSize = (int)((hSize * scale) + 0.5f);
-	vSize = (int)((vSize * scale) + 0.5f);
-    }
-    setupPtr->scale = scale;
-    if (setupPtr->flags & PS_CENTER) {
-	if (paperWidth > hSize) {
-	    x = (paperWidth - hSize) / 2;
-	}
-	if (paperHeight > vSize) {
-	    y = (paperHeight - vSize) / 2;
-	}
-    }
-    setupPtr->left = x;
-    setupPtr->bottom = y;
-    setupPtr->right = x + hSize - 1;
-    setupPtr->top = y + vSize - 1;
-    setupPtr->paperHeight = paperHeight;
-    setupPtr->paperWidth = paperWidth;
-    return paperHeight;
-}
-
-PostScript *
-Blt_Ps_Create(Tcl_Interp *interp, PageSetup *setupPtr)
-{
-    PostScript *psPtr;
-
-    psPtr = Blt_AssertMalloc(sizeof(PostScript));
-    psPtr->setupPtr = setupPtr;
-    psPtr->interp = interp;
-    Tcl_DStringInit(&psPtr->dString);
-    return psPtr;
-}
-
-void 
-Blt_Ps_SetPrinting(PostScript *psPtr, int state)
-{
-    psInterp = ((state) && (psPtr != NULL)) ? psPtr->interp : NULL;
-}
-
-int
-Blt_Ps_IsPrinting(void)
-{
-    return (psInterp != NULL);
-}
-
-void
-Blt_Ps_Free(PostScript *psPtr)
-{
-    Tcl_DStringFree(&psPtr->dString);
-    Blt_Free(psPtr);
-}
-
-const char *
-Blt_Ps_GetValue(PostScript *psPtr, int *lengthPtr)
-{
-    *lengthPtr = strlen(Tcl_DStringValue(&psPtr->dString));
-    return Tcl_DStringValue(&psPtr->dString);
-}
-
-void
-Blt_Ps_SetInterp(PostScript *psPtr, Tcl_Interp *interp)
-{
-    Tcl_DStringResult(interp, &psPtr->dString);
-}
-
-char *
-Blt_Ps_GetScratchBuffer(PostScript *psPtr)
-{
-    return psPtr->scratchArr;
-}
-
-Tcl_Interp *
-Blt_Ps_GetInterp(PostScript *psPtr)
-{
-    return psPtr->interp;
-}
-
-Tcl_DString *
-Blt_Ps_GetDString(PostScript *psPtr)
-{
-    return &psPtr->dString;
-}
-
-int 
-Blt_Ps_SaveFile(Tcl_Interp *interp, PostScript *psPtr, const char *fileName)
-{
-    Tcl_Channel channel;
-    int nWritten, nBytes;
-    char *bytes;
-
-    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0660);
-    if (channel == NULL) {
-	return TCL_ERROR;
-    }
-    nBytes = Tcl_DStringLength(&psPtr->dString);
-    bytes = Tcl_DStringValue(&psPtr->dString);
-    nWritten = Tcl_Write(channel, bytes, nBytes);
-    Tcl_Close(interp, channel);
-    if (nWritten != nBytes) {
-	Tcl_AppendResult(interp, "short file \"", fileName, (char *)NULL);
-	Tcl_AppendResult(interp, "\" : wrote ", Blt_Itoa(nWritten), " of ", 
-			 (char *)NULL);
-	Tcl_AppendResult(interp, Blt_Itoa(nBytes), " bytes.", (char *)NULL); 
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-
-void
-Blt_Ps_VarAppend
-TCL_VARARGS_DEF(PostScript *, arg1)
-{
-    va_list argList;
-    PostScript *psPtr;
-    const char *string;
-
-    psPtr = TCL_VARARGS_START(PostScript, arg1, argList);
-    for (;;) {
-	string = va_arg(argList, char *);
-	if (string == NULL) {
-	    break;
-	}
-	Tcl_DStringAppend(&psPtr->dString, string, -1);
-    }
-}
-
-void
-Blt_Ps_AppendBytes(PostScript *psPtr, const char *bytes, int length)
-{
-    Tcl_DStringAppend(&psPtr->dString, bytes, length);
-}
-
-void
-Blt_Ps_Append(PostScript *psPtr, const char *string)
-{
-    Tcl_DStringAppend(&psPtr->dString, string, -1);
-}
-
-void
-Blt_Ps_Format
-TCL_VARARGS_DEF(PostScript *, arg1)
-{
-    va_list argList;
-    PostScript *psPtr;
-    char *fmt;
-
-    psPtr = TCL_VARARGS_START(PostScript, arg1, argList);
-    fmt = va_arg(argList, char *);
-    vsnprintf(psPtr->scratchArr, POSTSCRIPT_BUFSIZ, fmt, argList);
-    va_end(argList);
-    Tcl_DStringAppend(&psPtr->dString, psPtr->scratchArr, -1);
-}
-
-int
-Blt_Ps_IncludeFile(Tcl_Interp *interp, Blt_Ps ps, const char *fileName)
-{
-    Tcl_Channel channel;
-    Tcl_DString dString;
-    char *buf;
-    char *libDir;
-    int nBytes;
-
-    buf = Blt_Ps_GetScratchBuffer(ps);
-
-    /*
-     * Read in a standard prolog file from file and append it to the
-     * PostScript output stored in the Tcl_DString in psPtr.
-     */
-
-    libDir = (char *)Tcl_GetVar(interp, "blt_library", TCL_GLOBAL_ONLY);
-    if (libDir == NULL) {
-	Tcl_AppendResult(interp, "couldn't find BLT script library:",
-	    "global variable \"blt_library\" doesn't exist", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppend(&dString, libDir, -1);
-    Tcl_DStringAppend(&dString, "/", -1);
-    Tcl_DStringAppend(&dString, fileName, -1);
-    fileName = Tcl_DStringValue(&dString);
-    Blt_Ps_VarAppend(ps, "\n% including file \"", fileName, "\"\n\n", 
-	(char *)NULL);
-    channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-    if (channel == NULL) {
-	Tcl_AppendResult(interp, "couldn't open prologue file \"", fileName,
-		 "\": ", Tcl_PosixError(interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    for(;;) {
-	nBytes = Tcl_Read(channel, buf, POSTSCRIPT_BUFSIZ);
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "error reading prologue file \"", 
-		     fileName, "\": ", Tcl_PosixError(interp), 
-		     (char *)NULL);
-	    Tcl_Close(interp, channel);
-	    Tcl_DStringFree(&dString);
-	    return TCL_ERROR;
-	}
-	if (nBytes == 0) {
-	    break;
-	}
-	buf[nBytes] = '\0';
-	Blt_Ps_Append(ps, buf);
-    }
-    Tcl_DStringFree(&dString);
-    Tcl_Close(interp, channel);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XColorToPostScript --
- *
- *	Convert the a XColor (from its RGB values) to a PostScript command.
- *	If a Tk color map variable exists, it will be consulted for a
- *	PostScript translation based upon the color name.
- *
- *	Maps an X color intensity (0 to 2^16-1) to a floating point value
- *	[0..1].  Many versions of Tk don't properly handle the the lower 8
- *	bits of the color intensity, so we can only consider the upper 8 bits.
- *
- * Results:
- *	The string representing the color mode is returned.
- *
- *---------------------------------------------------------------------------
- */
-static void
-XColorToPostScript(Blt_Ps ps, XColor *colorPtr)
-{
-    /* 
-     * Shift off the lower byte before dividing because some versions of Tk
-     * don't fill the lower byte correctly.
-     */
-    Blt_Ps_Format(ps, "%g %g %g",
-	((double)(colorPtr->red >> 8) / 255.0),
-	((double)(colorPtr->green >> 8) / 255.0),
-	((double)(colorPtr->blue >> 8) / 255.0));
-}
-
-void
-Blt_Ps_XSetBackground(PostScript *psPtr, XColor *colorPtr)
-{
-    /* If the color name exists in TCL array variable, use that translation */
-    if ((psPtr->setupPtr != NULL) && (psPtr->setupPtr->colorVarName != NULL)) {
-	const char *psColor;
-
-	psColor = Tcl_GetVar2(psPtr->interp, psPtr->setupPtr->colorVarName,
-	    Tk_NameOfColor(colorPtr), 0);
-	if (psColor != NULL) {
-	    Blt_Ps_VarAppend(psPtr, " ", psColor, "\n", (char *)NULL);
-	    return;
-	}
-    }
-    XColorToPostScript(psPtr, colorPtr);
-    Blt_Ps_Append(psPtr, " setrgbcolor\n");
-    if (psPtr->setupPtr->flags & PS_GREYSCALE) {
-	Blt_Ps_Append(psPtr, " currentgray setgray\n");
-    }
-}
-
-void
-Blt_Ps_XSetForeground(PostScript *psPtr, XColor *colorPtr)
-{
-    /* If the color name exists in TCL array variable, use that translation */
-    if ((psPtr->setupPtr != NULL) && (psPtr->setupPtr->colorVarName != NULL)) {
-	const char *psColor;
-
-	psColor = Tcl_GetVar2(psPtr->interp, psPtr->setupPtr->colorVarName,
-	    Tk_NameOfColor(colorPtr), 0);
-	if (psColor != NULL) {
-	    Blt_Ps_VarAppend(psPtr, " ", psColor, "\n", (char *)NULL);
-	    return;
-	}
-    }
-    XColorToPostScript(psPtr, colorPtr);
-    Blt_Ps_Append(psPtr, " setrgbcolor\n");
-    if (psPtr->setupPtr->flags & PS_GREYSCALE) {
-	Blt_Ps_Append(psPtr, " currentgray setgray\n");
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReverseBits --
- *
- *	Convert a byte from a X image into PostScript image order.  This
- *	requires not only the nybbles to be reversed but also their bit
- *	values.
- *
- * Results:
- *	The converted byte is returned.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static unsigned char
-ReverseBits(unsigned char byte)
-{
-    byte = ((byte >> 1) & 0x55) | ((byte << 1) & 0xaa);
-    byte = ((byte >> 2) & 0x33) | ((byte << 2) & 0xcc);
-    byte = ((byte >> 4) & 0x0f) | ((byte << 4) & 0xf0);
-    return byte;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ByteToHex --
- *
- *	Convert a byte to its ASCII hexidecimal equivalent.
- *
- * Results:
- *	The converted 2 ASCII character string is returned.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static void
-ByteToHex(unsigned char byte, char *string)
-{
-    static char hexDigits[] = "0123456789ABCDEF";
-
-    string[0] = hexDigits[byte >> 4];
-    string[1] = hexDigits[byte & 0x0F];
-}
-
-#ifdef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_XSetBitmapData --
- *
- *      Output a PostScript image string of the given bitmap image.  It is
- *      assumed the image is one bit deep and a zero value indicates an
- *      off-pixel.  To convert to PostScript, the bits need to be reversed
- *      from the X11 image order.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *      The PostScript image string is appended.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_XSetBitmapData(
-    PostScript *psPtr,
-    Display *display,
-    Pixmap bitmap,
-    int width, int height)
-{
-    unsigned char byte;
-    int x, y, bitPos;
-    unsigned long pixel;
-    int byteCount;
-    char string[10];
-    unsigned char *srcBits, *srcPtr;
-    int bytesPerRow;
-
-    srcBits = Blt_GetBitmapData(display, bitmap, width, height, &bytesPerRow);
-    if (srcBits == NULL) {
-        OutputDebugString("Can't get bitmap data");
-	return;
-    }
-    Blt_Ps_Append(psPtr, "\t<");
-    byteCount = bitPos = 0;	/* Suppress compiler warning */
-    for (y = height - 1; y >= 0; y--) {
-	srcPtr = srcBits + (bytesPerRow * y);
-	byte = 0;
-	for (x = 0; x < width; x++) {
-	    bitPos = x % 8;
-	    pixel = (*srcPtr & (0x80 >> bitPos));
-	    if (pixel) {
-		byte |= (unsigned char)(1 << bitPos);
-	    }
-	    if (bitPos == 7) {
-		byte = ReverseBits(byte);
-		ByteToHex(byte, string);
-		string[2] = '\0';
-		byteCount++;
-		srcPtr++;
-		byte = 0;
-		if (byteCount >= 30) {
-		    string[2] = '\n';
-		    string[3] = '\t';
-		    string[4] = '\0';
-		    byteCount = 0;
-		}
-		Blt_Ps_Append(psPtr, string);
-	    }
-	}			/* x */
-	if (bitPos != 7) {
-	    byte = ReverseBits(byte);
-	    ByteToHex(byte, string);
-	    string[2] = '\0';
-	    Blt_Ps_Append(psPtr, string);
-	    byteCount++;
-	}
-    }				/* y */
-    Blt_Free(srcBits);
-    Blt_Ps_Append(psPtr, ">\n");
-}
-
-#else
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_XSetBitmapData --
- *
- *      Output a PostScript image string of the given bitmap image.  It is
- *      assumed the image is one bit deep and a zero value indicates an
- *      off-pixel.  To convert to PostScript, the bits need to be reversed
- *      from the X11 image order.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *      The PostScript image string is appended to interp->result.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_XSetBitmapData(Blt_Ps ps, Display *display, Pixmap bitmap, int w, int h)
-{
-    XImage *imagePtr;
-    int byteCount;
-    int y, bitPos;
-
-    imagePtr = XGetImage(display, bitmap, 0, 0, w, h, 1, ZPixmap);
-    Blt_Ps_Append(ps, "\t<");
-    byteCount = bitPos = 0;	/* Suppress compiler warning */
-    for (y = 0; y < h; y++) {
-	unsigned char byte;
-	char string[10];
-	int x;
-
-	byte = 0;
-	for (x = 0; x < w; x++) {
-	    unsigned long pixel;
-
-	    pixel = XGetPixel(imagePtr, x, y);
-	    bitPos = x % 8;
-	    byte |= (unsigned char)(pixel << bitPos);
-	    if (bitPos == 7) {
-		byte = ReverseBits(byte);
-		ByteToHex(byte, string);
-		string[2] = '\0';
-		byteCount++;
-		byte = 0;
-		if (byteCount >= 30) {
-		    string[2] = '\n';
-		    string[3] = '\t';
-		    string[4] = '\0';
-		    byteCount = 0;
-		}
-		Blt_Ps_Append(ps, string);
-	    }
-	}			/* x */
-	if (bitPos != 7) {
-	    byte = ReverseBits(byte);
-	    ByteToHex(byte, string);
-	    string[2] = '\0';
-	    Blt_Ps_Append(ps, string);
-	    byteCount++;
-	}
-    }				/* y */
-    Blt_Ps_Append(ps, ">\n");
-    XDestroyImage(imagePtr);
-}
-
-#endif /* WIN32 */
-
-typedef struct {
-    const char *alias;
-    const char *fontName;
-} FamilyMap;
-
-static FamilyMap familyMap[] =
-{
-    { "Arial",		        "Helvetica"	   },
-    { "AvantGarde",             "AvantGarde"       },
-    { "Bookman",                "Bookman"          },
-    { "Courier New",            "Courier"          },
-    { "Courier",                "Courier"          },
-    { "Geneva",                 "Helvetica"        },
-    { "Helvetica",              "Helvetica"        },
-    { "Mathematica1",		"Helvetica"	   },
-    { "Monaco",                 "Courier"          },
-    { "New Century Schoolbook", "NewCenturySchlbk" },
-    { "New York",               "Times"            },
-    { "Nimbus Roman No9 L"	"Times"		   },
-    { "Nimbus Sans L Condensed","Helvetica"        },
-    { "Nimbus Sans L",		"Helvetica"        },
-    { "Palatino",               "Palatino"         },
-    { "Standard Symbols L",	"Symbol"           },
-    { "Swiss 721",              "Helvetica"        },
-    { "Symbol",                 "Symbol"           },
-    { "Times New Roman",        "Times"            },
-    { "Times Roman",            "Times"            },
-    { "Times",                  "Times"            },
-    { "ZapfChancery",           "ZapfChancery"     },
-    { "ZapfDingbats",           "ZapfDingbats"     }
-};
-
-static int nFamilyNames = (sizeof(familyMap) / sizeof(FamilyMap));
-
-static const char *
-FamilyToPsFamily(const char *family) 
-{
-    FamilyMap *fp, *fend;
-
-    if (strncasecmp(family, "itc ", 4) == 0) {
-	family += 4;
-    }
-    for (fp = familyMap, fend = fp + nFamilyNames; fp < fend; fp++) {
-	if (strcasecmp(fp->alias, family) == 0) {
-	    return fp->fontName;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- * Routines to convert X drawing functions to PostScript commands.
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_SetClearBackground(Blt_Ps ps)
-{
-    Blt_Ps_Append(ps, "1 1 1 setrgbcolor\n");
-}
-
-void
-Blt_Ps_XSetCapStyle(Blt_Ps ps, int capStyle)
-{
-    /*
-     * X11:not last = 0, butt = 1, round = 2, projecting = 3
-     * PS: butt = 0, round = 1, projecting = 2
-     */
-    if (capStyle > 0) {
-	capStyle--;
-    }
-    Blt_Ps_Format(ps, "%d setlinecap\n", capStyle);
-}
-
-void
-Blt_Ps_XSetJoinStyle(Blt_Ps ps, int joinStyle)
-{
-    /*
-     * miter = 0, round = 1, bevel = 2
-     */
-    Blt_Ps_Format(ps, "%d setlinejoin\n", joinStyle);
-}
-
-void
-Blt_Ps_XSetLineWidth(Blt_Ps ps, int lineWidth)
-{
-    if (lineWidth < 1) {
-	lineWidth = 1;
-    }
-    Blt_Ps_Format(ps, "%d setlinewidth\n", lineWidth);
-}
-
-void
-Blt_Ps_XSetDashes(Blt_Ps ps, Blt_Dashes *dashesPtr)
-{
-
-    Blt_Ps_Append(ps, "[ ");
-    if (dashesPtr != NULL) {
-	unsigned char *vp;
-
-	for (vp = dashesPtr->values; *vp != 0; vp++) {
-	    Blt_Ps_Format(ps, " %d", *vp);
-	}
-    }
-    Blt_Ps_Append(ps, "] 0 setdash\n");
-}
-
-void
-Blt_Ps_XSetLineAttributes(
-    Blt_Ps ps,
-    XColor *colorPtr,
-    int lineWidth,
-    Blt_Dashes *dashesPtr,
-    int capStyle, 
-    int joinStyle)
-{
-    Blt_Ps_XSetJoinStyle(ps, joinStyle);
-    Blt_Ps_XSetCapStyle(ps, capStyle);
-    Blt_Ps_XSetForeground(ps, colorPtr);
-    Blt_Ps_XSetLineWidth(ps, lineWidth);
-    Blt_Ps_XSetDashes(ps, dashesPtr);
-    Blt_Ps_Append(ps, "/DashesProc {} def\n");
-}
-
-void
-Blt_Ps_Rectangle(Blt_Ps ps, int x, int y, int width, int height)
-{
-    Blt_Ps_Append(ps, "newpath\n");
-    Blt_Ps_Format(ps, "  %d %d moveto\n", x, y);
-    Blt_Ps_Format(ps, "  %d %d rlineto\n", width, 0);
-    Blt_Ps_Format(ps, "  %d %d rlineto\n", 0, height);
-    Blt_Ps_Format(ps, "  %d %d rlineto\n", -width, 0);
-    Blt_Ps_Append(ps, "closepath\n");
-}
-
-void
-Blt_Ps_XFillRectangle(Blt_Ps ps, double x, double y, int width, int height)
-{
-    Blt_Ps_Rectangle(ps, (int)x, (int)y, width, height);
-    Blt_Ps_Append(ps, "fill\n");
-}
-
-void
-Blt_Ps_PolylineFromXPoints(Blt_Ps ps, XPoint *points, int n)
-{
-    XPoint *pp, *pend;
-
-    pp = points;
-    Blt_Ps_Append(ps, "newpath\n");
-    Blt_Ps_Format(ps, "  %d %d moveto\n", pp->x, pp->y);
-    pp++;
-    for (pend = points + n; pp < pend; pp++) {
-	Blt_Ps_Format(ps, "  %d %d lineto\n", pp->x, pp->y);
-    }
-}
-
-void
-Blt_Ps_Polyline(Blt_Ps ps, Point2d *screenPts, int nScreenPts)
-{
-    Point2d *pp, *pend;
-
-    pp = screenPts;
-    Blt_Ps_Append(ps, "newpath\n");
-    Blt_Ps_Format(ps, "  %g %g moveto\n", pp->x, pp->y);
-    for (pp++, pend = screenPts + nScreenPts; pp < pend; pp++) {
-	Blt_Ps_Format(ps, "  %g %g lineto\n", pp->x, pp->y);
-    }
-}
-
-void
-Blt_Ps_Polygon(Blt_Ps ps, Point2d *screenPts, int nScreenPts)
-{
-    Point2d *pp, *pend;
-
-    pp = screenPts;
-    Blt_Ps_Append(ps, "newpath\n");
-    Blt_Ps_Format(ps, "  %g %g moveto\n", pp->x, pp->y);
-    for (pp++, pend = screenPts + nScreenPts; pp < pend; pp++) {
-	Blt_Ps_Format(ps, "  %g %g lineto\n", pp->x, pp->y);
-    }
-    Blt_Ps_Format(ps, "  %g %g lineto\n", screenPts[0].x, screenPts[0].y);
-    Blt_Ps_Append(ps, "closepath\n");
-}
-
-void
-Blt_Ps_XFillPolygon(Blt_Ps ps, Point2d *screenPts, int nScreenPts)
-{
-    Blt_Ps_Polygon(ps, screenPts, nScreenPts);
-    Blt_Ps_Append(ps, "fill\n");
-}
-
-void
-Blt_Ps_XDrawSegments(Blt_Ps ps, XSegment *segments, int nSegments)
-{
-    XSegment *sp, *send;
-
-    for (sp = segments, send = sp + nSegments; sp < send; sp++) {
-	Blt_Ps_Format(ps, "%d %d moveto %d %d lineto\n", sp->x1, sp->y1, 
-		      sp->x2, sp->y2);
-	Blt_Ps_Append(ps, "DashesProc stroke\n");
-    }
-}
-
-
-void
-Blt_Ps_XFillRectangles(Blt_Ps ps, XRectangle *rectangles, int nRectangles)
-{
-    XRectangle *rp, *rend;
-
-    for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	Blt_Ps_XFillRectangle(ps, (double)rp->x, (double)rp->y, 
-		(int)rp->width, (int)rp->height);
-    }
-}
-
-#ifndef TK_RELIEF_SOLID
-#define TK_RELIEF_SOLID		-1	/* Set the an impossible value. */
-#endif /* TK_RELIEF_SOLID */
-
-void
-Blt_Ps_Draw3DRectangle(
-    Blt_Ps ps,
-    Tk_3DBorder border,		/* Token for border to draw. */
-    double x, double y,		/* Coordinates of rectangle */
-    int width, int height,	/* Region to be drawn. */
-    int borderWidth,		/* Desired width for border, in pixels. */
-    int relief)			/* Should be either TK_RELIEF_RAISED or
-                                 * TK_RELIEF_SUNKEN; indicates position of
-                                 * interior of window relative to exterior. */
-{
-    Point2d points[7];
-    TkBorder *borderPtr = (TkBorder *) border;
-    XColor *lightPtr, *darkPtr;
-    XColor *topPtr, *bottomPtr;
-    XColor light, dark;
-    int twiceWidth = (borderWidth * 2);
-
-    if ((width < twiceWidth) || (height < twiceWidth)) {
-	return;
-    }
-    if ((relief == TK_RELIEF_SOLID) ||
-	(borderPtr->lightColor == NULL) || (borderPtr->darkColor == NULL)) {
-	if (relief == TK_RELIEF_SOLID) {
-	    dark.red = dark.blue = dark.green = 0x00;
-	    light.red = light.blue = light.green = 0x00;
-	    relief = TK_RELIEF_SUNKEN;
-	} else {
-	    light = *borderPtr->bgColor;
-	    dark.red = dark.blue = dark.green = 0xFF;
-	}
-	lightPtr = &light;
-	darkPtr = &dark;
-    } else {
-	lightPtr = borderPtr->lightColor;
-	darkPtr = borderPtr->darkColor;
-    }
-
-
-    /* Handle grooves and ridges with recursive calls. */
-
-    if ((relief == TK_RELIEF_GROOVE) || (relief == TK_RELIEF_RIDGE)) {
-	int halfWidth, insideOffset;
-
-	halfWidth = borderWidth / 2;
-	insideOffset = borderWidth - halfWidth;
-	Blt_Ps_Draw3DRectangle(ps, border, (double)x, (double)y,
-	    width, height, halfWidth, 
-	    (relief == TK_RELIEF_GROOVE) ? TK_RELIEF_SUNKEN : TK_RELIEF_RAISED);
-	Blt_Ps_Draw3DRectangle(ps, border, 
-  	    (double)(x + insideOffset), (double)(y + insideOffset), 
-	    width - insideOffset * 2, height - insideOffset * 2, halfWidth,
-	    (relief == TK_RELIEF_GROOVE) ? TK_RELIEF_RAISED : TK_RELIEF_SUNKEN);
-	return;
-    }
-    if (relief == TK_RELIEF_RAISED) {
-	topPtr = lightPtr;
-	bottomPtr = darkPtr;
-    } else if (relief == TK_RELIEF_SUNKEN) {
-	topPtr = darkPtr;
-	bottomPtr = lightPtr;
-    } else {
-	topPtr = bottomPtr = borderPtr->bgColor;
-    }
-    Blt_Ps_XSetBackground(ps, bottomPtr);
-    Blt_Ps_XFillRectangle(ps, x, y + height - borderWidth, width, borderWidth);
-    Blt_Ps_XFillRectangle(ps, x + width - borderWidth, y, borderWidth, height);
-    points[0].x = points[1].x = points[6].x = x;
-    points[0].y = points[6].y = y + height;
-    points[1].y = points[2].y = y;
-    points[2].x = x + width;
-    points[3].x = x + width - borderWidth;
-    points[3].y = points[4].y = y + borderWidth;
-    points[4].x = points[5].x = x + borderWidth;
-    points[5].y = y + height - borderWidth;
-    if (relief != TK_RELIEF_FLAT) {
-	Blt_Ps_XSetBackground(ps, topPtr);
-    }
-    Blt_Ps_XFillPolygon(ps, points, 7);
-}
-
-void
-Blt_Ps_Fill3DRectangle(
-    Blt_Ps ps,
-    Tk_3DBorder border,		/* Token for border to draw. */
-    double x, double y,		/* Coordinates of top-left of border area */
-    int width, int height,	/* Dimension of border to be drawn. */
-    int borderWidth,		/* Desired width for border, in pixels. */
-    int relief)			/* Should be either TK_RELIEF_RAISED or
-                                 * TK_RELIEF_SUNKEN;  indicates position of
-                                 * interior of window relative to exterior. */
-{
-    TkBorder *borderPtr = (TkBorder *) border;
-
-    Blt_Ps_XSetBackground(ps, borderPtr->bgColor);
-    Blt_Ps_XFillRectangle(ps, x, y, width, height);
-    Blt_Ps_Draw3DRectangle(ps, border, x, y, width, height, borderWidth,
-	relief);
-}
-
-void
-Blt_Ps_XSetStipple(Blt_Ps ps, Display *display, Pixmap bitmap)
-{
-    int width, height;
-
-    Tk_SizeOfBitmap(display, bitmap, &width, &height);
-    Blt_Ps_Format(ps, 
-	"gsave\n"
-        "  clip\n"
-        "  %d %d\n", 
-	width, height);
-    Blt_Ps_XSetBitmapData(ps, display, bitmap, width, height);
-    Blt_Ps_VarAppend(ps, 
-        "  StippleFill\n"
-        "grestore\n", (char *)NULL);
-}
-
-static void
-Base85Encode(Blt_DBuffer dBuffer, Tcl_DString *resultPtr)
-{
-    char *dp; 
-    int count;
-    int length, nBytes, oldLength;
-    int n;
-    unsigned char *sp, *send;
-
-    oldLength = Tcl_DStringLength(resultPtr);
-    nBytes = Blt_DBuffer_Length(dBuffer);
-
-    /*
-     * Compute worst-case length of buffer needed for encoding. 
-     * That is 5 characters per 4 bytes.  There are newlines every
-     * 65 characters. The actual size can be smaller, depending upon
-     * the number of 0 tuples ('z' bytes).
-     */
-    length = oldLength + nBytes;
-    length += ((nBytes + 3)/4) * 5;	/* 5 characters per 4 bytes. */
-    length += (nBytes+64) / 65;		/* # of newlines. */
-    Tcl_DStringSetLength(resultPtr, length);
-
-
-    n = count = 0;
-    dp = Tcl_DStringValue(resultPtr) + oldLength;
-    for (sp = Blt_DBuffer_Bytes(dBuffer), send = sp + nBytes; sp < send; 
-	 sp += 4) {
-	unsigned int tuple;
-	
-	tuple = 0;
-#ifdef WORDS_BIGENDIAN
-	tuple |= (sp[3] << 24);
-	tuple |= (sp[2] << 16); 
-	tuple |= (sp[1] <<  8);
-	tuple |= sp[0];
-#else 
-	tuple |= (sp[0] << 24);
-	tuple |= (sp[1] << 16); 
-	tuple |= (sp[2] <<  8);
-	tuple |= sp[3];
-#endif
-	if (tuple == 0) {
-	    *dp++ = 'z';
-	    count++;
-	    n++;
-	} else {
-	    dp[4] = '!' + (tuple % 85);
-	    tuple /= 85;
-	    dp[3] = '!' + (tuple % 85);
-	    tuple /= 85;
-	    dp[2] = '!' + (tuple % 85);
-	    tuple /= 85;
-	    dp[1] = '!' + (tuple % 85);
-	    tuple /= 85;
-	    dp[0] = '!' + (tuple % 85);
-	    dp += 5;
-	    n += 5;
-	    count += 5;
-	}
-	if (count > 64) {
-	    *dp++ = '\n';
-	    n++;
-	    count = 0;
-	}
-    }
-    
-    {
-	unsigned int tuple;
-
-	/* Handle remaining bytes (0-3). */
-	nBytes = (nBytes & 0x3);
-	sp -= nBytes;
-	tuple = 0;
-	switch (nBytes) {
-#ifdef WORDS_BIGENDIAN
-	case 3:
-	    tuple |= (sp[2] <<  8);
-	case 2:
-	    tuple |= (sp[1] << 16); 
-	case 1:
-	    tuple |= (sp[0] << 24);
-#else
-	case 3:
-	    tuple |= (sp[2] << 24);
-	case 2:
-	    tuple |= (sp[1] << 16); 
-	case 1:
-	    tuple |= (sp[0] <<  8);
-#endif
-	default:
-	    break;
-	}
-	if (nBytes > 0) {
-	    tuple /= 85;	
-	    if (nBytes > 2) {
-		dp[3] = '!' + (tuple % 85);
-		n++;
-	    }
-	    tuple /= 85;	
-	    if (nBytes > 1) { 
-		dp[2] = '!' + (tuple % 85);
-		n++;
-	    }
-	    tuple /= 85;	
-	    dp[1] = '!' + (tuple % 85);
-	    tuple /= 85;	
-	    dp[0] = '!' + (tuple % 85);
-	    *dp++ = '\n';
-	    n += 3;
-	}
-	Tcl_DStringSetLength(resultPtr, n);
-    }
-}
-
-static void
-AsciiHexEncode(Blt_DBuffer dBuffer, Tcl_DString *resultPtr)
-{
-    static char hexDigits[] = "0123456789ABCDEF";
-    int length, oldLength;
-    int nBytes;
-
-    /*
-     * Compute the length of the buffer needed for the encoding.  That is 2
-     * characters per byte.  There are newlines every 64 characters.
-     */
-    length = oldLength = Tcl_DStringLength(resultPtr);
-    nBytes =  Blt_DBuffer_Length(dBuffer) * 2;  /* Two characters per byte */
-    length += nBytes;		
-    length += (nBytes+63)/64;	/* Number of newlines required. */
-    Tcl_DStringSetLength(resultPtr, length);
-    {
-	unsigned char *sp, *send;
-	char *bytes, *dp; 
-	int count, n;
-
-	count = n = 0;
-	dp = bytes = Tcl_DStringValue(resultPtr) + oldLength;
-	for (sp = Blt_DBuffer_Bytes(dBuffer), 
-		 send = sp + Blt_DBuffer_Length(dBuffer); 
-	     sp < send; sp++) {
-	    dp[0] = hexDigits[*sp >> 4];
-	    dp[1] = hexDigits[*sp & 0x0F];
-	    dp += 2;
-	    n += 2;
-	    count++;
-	    if ((count & 0x1F) == 0) {
-		*dp++ = '\n';
-		n++;
-	    }
-	}
-	*dp++ = '\0';
-#ifdef notdef
-	Tcl_DStringSetLength(resultPtr, n + oldLength);
-#endif
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_DrawPicture --
- *
- *      Translates a picture into 3 component RGB PostScript output.  Uses PS
- *      Language Level 2 operator "colorimage".
- *
- * Results:
- *      The dynamic string will contain the PostScript output.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_DrawPicture(PostScript *psPtr, Blt_Picture picture, double x, double y)
-{
-    PageSetup *setupPtr = psPtr->setupPtr;
-    int w, h;
-    Blt_DBuffer dBuffer;
-
-    w = Blt_PictureWidth(picture);
-    h = Blt_PictureHeight(picture);
-    Blt_Ps_Format(psPtr, 
-	"gsave\n"
-	"/DeviceRGB setcolorspace\n"
-	"%g %g translate\n"
-	"%d %d scale\n", x, y, w, h);
-    if ((setupPtr->flags & PS_GREYSCALE) || (setupPtr->level == 1)) {
-	int strSize;
-
-	strSize = (setupPtr->flags & PS_GREYSCALE) ? w : w * 3;
-	Blt_Ps_Format(psPtr, 
-	    "/picstr %d string def\n"
-	    "%d %d 8\n" 
-	    "[%d 0 0 %d 0 %d]\n"
-            "{\n"
-	    "  currentfile picstr readhexstring pop\n"
-            "}\n", strSize, w, h, w, -h, h);
-	if (setupPtr->flags & PS_GREYSCALE) {
-	    Blt_Picture greyscale;
-	    
-	    Blt_Ps_Append(psPtr, "image\n");
-	    greyscale = Blt_GreyscalePicture(picture);
-	    dBuffer = Blt_PictureToDBuffer(picture, 1);
-	    Blt_FreePicture(greyscale);
-	} else {
-	    Blt_Ps_Append(psPtr, "false 3 colorimage\n");
-	    dBuffer = Blt_PictureToDBuffer(picture, 3);
-	}
-	AsciiHexEncode(dBuffer, &psPtr->dString);
-	Blt_DBuffer_Free(dBuffer);
-    } else {
-	Blt_Ps_Format(psPtr, 
-	    "<<\n"
-	    "/ImageType 1\n"
-	    "/Width %d\n"
-	    "/Height %d\n"
-	    "/BitsPerComponent 8\n"
-	    "/Decode [0 1 0 1 0 1]\n"
-	    "/ImageMatrix [%d 0 0 %d 0 %d]\n"
-	    "/Interpolate true\n"
-	    "/DataSource  currentfile /ASCII85Decode filter\n"
-	    ">>\n"
-	    "image\n", w, h, w, -h, h);
-	dBuffer = Blt_PictureToDBuffer(picture, 3);
-	Base85Encode(dBuffer, &psPtr->dString);
-	Blt_DBuffer_Free(dBuffer);
-    } 
-    Blt_Ps_Append(psPtr, "\ngrestore\n\n");
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_XDrawWindow --
- *
- *      Converts a Tk window to PostScript.  If the window could not be
- *      "snapped", then a grey rectangle is drawn in its place.
- *
- * Results:
- *      None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_XDrawWindow(Blt_Ps ps, Tk_Window tkwin, double x, double y)
-{
-    Blt_Picture picture;
-
-    picture = Blt_DrawableToPicture(tkwin, Tk_WindowId(tkwin), 0, 0, 
-	Tk_Width(tkwin), Tk_Height(tkwin), GAMMA);
-    if (picture == NULL) {
-	/* Can't grab window image so paint the window area grey */
-	Blt_Ps_VarAppend(ps, "% Can't grab window \"", Tk_PathName(tkwin),
-		"\"\n", (char *)NULL);
-	Blt_Ps_Append(ps, "0.5 0.5 0.5 setrgbcolor\n");
-	Blt_Ps_XFillRectangle(ps, x, y, Tk_Width(tkwin), Tk_Height(tkwin));
-	return;
-    }
-    Blt_Ps_DrawPicture(ps, picture, x, y);
-    Blt_FreePicture(picture);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_DrawPhoto --
- *
- *      Output a PostScript image string of the given photo image.  The photo
- *      is first converted into a picture and then translated into PostScript.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *      The PostScript output representing the photo is appended to the
- *      psPtr's dynamic string.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_DrawPhoto(Blt_Ps ps, Tk_PhotoHandle photo, double x, double y)
-{
-    Blt_Picture picture;
-
-    picture = Blt_PhotoToPicture(photo);
-    Blt_Ps_DrawPicture(ps, picture, x, y);
-    Blt_FreePicture(picture);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_XSetFont --
- *
- *      Map the Tk font to a PostScript font and point size.
- *
- *	If a TCL array variable was specified, each element should be indexed
- *	by the X11 font name and contain a list of 1-2 elements; the
- *	PostScript font name and the desired point size.  The point size may
- *	be omitted and the X font point size will be used.
- *
- *	Otherwise, if the foundry is "Adobe", we try to do a plausible mapping
- *	looking at the full name of the font and building a string in the form
- *	of "Family-TypeFace".
- *
- * Returns:
- *      None.
- *
- * Side Effects:
- *      PostScript commands are output to change the type and the point size
- *      of the current font.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-Blt_Ps_XSetFont(PostScript *psPtr, Blt_Font font) 
-{
-    Tcl_Interp *interp = psPtr->interp;
-    const char *family;
-
-    /* Use the font variable information if it exists. */
-    if ((psPtr->setupPtr != NULL) && (psPtr->setupPtr->fontVarName != NULL)) {
-	char *value;
-
-	value = (char *)Tcl_GetVar2(interp, psPtr->setupPtr->fontVarName, 
-		Blt_NameOfFont(font), 0);
-	if (value != NULL) {
-	    const char **argv = NULL;
-	    int argc;
-	    int newSize;
-	    double pointSize;
-	    const char *fontName;
-
-	    if (Tcl_SplitList(NULL, value, &argc, &argv) != TCL_OK) {
-		return;
-	    }
-	    fontName = argv[0];
-	    if ((argc != 2) || 
-		(Tcl_GetInt(interp, argv[1], &newSize) != TCL_OK)) {
-		Blt_Free(argv);
-		return;
-	    }
-	    pointSize = (double)newSize;
-	    Blt_Ps_Format(psPtr, "%g /%s SetFont\n", pointSize, 
-		fontName);
-	    Blt_Free(argv);
-	    return;
-	}
-	/*FallThru*/
-    }
-
-    /*
-     * Check to see if it's a PostScript font. Tk_PostScriptFontName silently
-     * generates a bogus PostScript font name, so we have to check to see if
-     * this is really a PostScript font first before we call it.
-     */
-    family = FamilyToPsFamily(Blt_FamilyOfFont(font));
-    if (family != NULL) {
-	Tcl_DString dString;
-	double pointSize;
-	
-	Tcl_DStringInit(&dString);
-	pointSize = (double)Blt_PostscriptFontName(font, &dString);
-	Blt_Ps_Format(psPtr, "%g /%s SetFont\n", pointSize, 
-		Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-	return;
-    }
-    Blt_Ps_Append(psPtr, "12.0 /Helvetica-Bold SetFont\n");
-}
-
-static void
-TextLayoutToPostScript(Blt_Ps ps, int x, int y, TextLayout *textPtr)
-{
-    char *bp, *dst;
-    int count;			/* Counts the # of bytes written to the
-				 * intermediate scratch buffer. */
-    const char *src, *end;
-    TextFragment *fragPtr;
-    int i;
-    unsigned char c;
-#if HAVE_UTF
-    Tcl_UniChar ch;
-#endif
-    int limit;
-
-    limit = POSTSCRIPT_BUFSIZ - 4; /* High water mark for scratch buffer. */
-    fragPtr = textPtr->fragments;
-    for (i = 0; i < textPtr->nFrags; i++, fragPtr++) {
-	if (fragPtr->count < 1) {
-	    continue;
-	}
-	Blt_Ps_Append(ps, "(");
-	count = 0;
-	dst = Blt_Ps_GetScratchBuffer(ps);
-	src = fragPtr->text;
-	end = fragPtr->text + fragPtr->count;
-	while (src < end) {
-	    if (count > limit) {
-		/* Don't let the scatch buffer overflow */
-		dst = Blt_Ps_GetScratchBuffer(ps);
-		dst[count] = '\0';
-		Blt_Ps_Append(ps, dst);
-		count = 0;
-	    }
-#if HAVE_UTF
-	    /*
-	     * INTL: For now we just treat the characters as binary data and
-	     * display the lower byte.  Eventually this should be revised to
-	     * handle international postscript fonts.
-	     */
-	    src += Tcl_UtfToUniChar(src, &ch);
-	    c = (unsigned char)(ch & 0xff);
-#else 
-	    c = *src++;
-#endif
-
-	    if ((c == '\\') || (c == '(') || (c == ')')) {
-		/*
-		 * If special PostScript characters characters "\", "(", and
-		 * ")" are contained in the text string, prepend backslashes
-		 * to them.
-		 */
-		*dst++ = '\\';
-		*dst++ = c;
-		count += 2;
-	    } else if ((c < ' ') || (c > '~')) {
-		/* Convert non-printable characters into octal. */
-		sprintf_s(dst, 5, "\\%03o", c);
-		dst += 4;
-		count += 4;
-	    } else {
-		*dst++ = c;
-		count++;
-	    }
-	}
-	bp = Blt_Ps_GetScratchBuffer(ps);
-	bp[count] = '\0';
-	Blt_Ps_Append(ps, bp);
-	Blt_Ps_Format(ps, ") %d %d %d DrawAdjText\n",
-	    fragPtr->width, x + fragPtr->x, y + fragPtr->y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ps_DrawText --
- *
- *      Output PostScript commands to print a text string. The string may be
- *      rotated at any arbitrary angle, and placed according the anchor type
- *      given. The anchor indicates how to interpret the window coordinates as
- *      an anchor for the text bounding box.
- *
- * Results:
- *      None.
- *
- * Side Effects:
- *      Text string is drawn using the given font and GC on the graph window
- *      at the given coordinates, anchor, and rotation
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ps_DrawText(
-    Blt_Ps ps,
-    const char *string,		/* String to convert to PostScript */
-    TextStyle *tsPtr,		/* Text attribute information */
-    double x, double y)		/* Window coordinates where to print text */
-{
-    TextLayout *textPtr;
-    Point2d t;
-
-    if ((string == NULL) || (*string == '\0')) { /* Empty string, do nothing */
-	return;
-    }
-    textPtr = Blt_Ts_CreateLayout(string, -1, tsPtr);
-    {
-	float angle;
-	double rw, rh;
-	
-	angle = FMOD(tsPtr->angle, (double)360.0);
-	Blt_GetBoundingBox(textPtr->width, textPtr->height, angle, &rw, &rh, 
-	(Point2d *)NULL);
-	/*
-	 * Find the center of the bounding box
-	 */
-	t = Blt_AnchorPoint(x, y, rw, rh, tsPtr->anchor); 
-	t.x += rw * 0.5;
-	t.y += rh * 0.5;
-    }
-
-    /* Initialize text (sets translation and rotation) */
-    Blt_Ps_Format(ps, "%d %d %g %g %g BeginText\n", textPtr->width, 
-	textPtr->height, tsPtr->angle, t.x, t.y);
-
-    Blt_Ps_XSetFont(ps, tsPtr->font);
-
-    Blt_Ps_XSetForeground(ps, tsPtr->color);
-    TextLayoutToPostScript(ps, 0, 0, textPtr);
-    Blt_Free(textPtr);
-    Blt_Ps_Append(ps, "EndText\n");
-}
-
-void
-Blt_Ps_XDrawLines(Blt_Ps ps, XPoint *points, int n)
-{
-    int nLeft;
-
-    if (n <= 0) {
-	return;
-    }
-    for (nLeft = n; nLeft > 0; nLeft -= PS_MAXPATH) {
-	int length;
-
-	length = MIN(PS_MAXPATH, nLeft);
-	Blt_Ps_PolylineFromXPoints(ps, points, length);
-	Blt_Ps_Append(ps, "DashesProc stroke\n");
-	points += length;
-    }
-}
-
-void
-Blt_Ps_DrawPolyline(Blt_Ps ps, Point2d *points, int nPoints)
-{
-    int nLeft;
-
-    if (nPoints <= 0) {
-	return;
-    }
-    for (nLeft = nPoints; nLeft > 0; nLeft -= PS_MAXPATH) {
-	int length;
-
-	length = MIN(PS_MAXPATH, nLeft);
-	Blt_Ps_Polyline(ps, points, length);
-	Blt_Ps_Append(ps, "DashesProc stroke\n");
-	points += length;
-    }
-}
-
-void
-Blt_Ps_DrawBitmap(
-    Blt_Ps ps,
-    Display *display,
-    Pixmap bitmap,		/* Bitmap to be converted to PostScript */
-    double xScale, double yScale)
-{
-    int width, height;
-    double sw, sh;
-
-    Tk_SizeOfBitmap(display, bitmap, &width, &height);
-    sw = (double)width * xScale;
-    sh = (double)height * yScale;
-    Blt_Ps_Append(ps, "  gsave\n");
-    Blt_Ps_Format(ps, "    %g %g translate\n", sw * -0.5, sh * 0.5);
-    Blt_Ps_Format(ps, "    %g %g scale\n", sw, -sh);
-    Blt_Ps_Format(ps, "    %d %d true [%d 0 0 %d 0 %d] {", 
-	width, height, width, -height, height);
-    Blt_Ps_XSetBitmapData(ps, display, bitmap, width, height);
-    Blt_Ps_Append(ps, "    } imagemask\n  grestore\n");
-}
-
-void
-Blt_Ps_Draw2DSegments(Blt_Ps ps, Segment2d *segments, int nSegments)
-{
-    Segment2d *sp, *send;
-
-    Blt_Ps_Append(ps, "newpath\n");
-    for (sp = segments, send = sp + nSegments; sp < send; sp++) {
-	Blt_Ps_Format(ps, "  %g %g moveto %g %g lineto\n", 
-		sp->p.x, sp->p.y, sp->q.x, sp->q.y);
-	Blt_Ps_Append(ps, "DashesProc stroke\n");
-    }
-}
-
-void
-Blt_Ps_FontName(const char *family, int flags, Tcl_DString *resultPtr)
-{
-    const char *familyName, *weightName, *slantName;
-    int len;
-
-    len = Tcl_DStringLength(resultPtr);
-
-    familyName = FamilyToPsFamily(family);
-    if (familyName == NULL) {
-	Tcl_UniChar ch;
-	char *src, *dest;
-	int upper;
-
-	/*
-	 * Inline, capitalize the first letter of each word, lowercase the
-	 * rest of the letters in each word, and then take out the spaces
-	 * between the words.  This may make the DString shorter, which is
-	 * safe to do.
-	 */
-	Tcl_DStringAppend(resultPtr, family, -1);
-	src = dest = Tcl_DStringValue(resultPtr) + len;
-	upper = TRUE;
-	while (*src != '\0') {
-	    while (isspace(*src)) { /* INTL: ISO space */
-		src++;
-		upper = TRUE;
-	    }
-	    src += Tcl_UtfToUniChar(src, &ch);
-	    if (upper) {
-		ch = Tcl_UniCharToUpper(ch);
-		upper = FALSE;
-	    } else {
-	        ch = Tcl_UniCharToLower(ch);
-	    }
-	    dest += Tcl_UniCharToUtf(ch, dest);
-	}
-	*dest = '\0';
-	Tcl_DStringSetLength(resultPtr, dest - Tcl_DStringValue(resultPtr));
-	familyName = Tcl_DStringValue(resultPtr) + len;
-    }
-    if (familyName != Tcl_DStringValue(resultPtr) + len) {
-	Tcl_DStringAppend(resultPtr, familyName, -1);
-	familyName = Tcl_DStringValue(resultPtr) + len;
-    }
-    if (strcasecmp(familyName, "NewCenturySchoolbook") == 0) {
-	Tcl_DStringSetLength(resultPtr, len);
-	Tcl_DStringAppend(resultPtr, "NewCenturySchlbk", -1);
-	familyName = Tcl_DStringValue(resultPtr) + len;
-    }
-
-    /* Get the string to use for the weight. */
-    weightName = NULL;
-    if (flags & FONT_BOLD) {
-	if ((strcmp(familyName, "Bookman") == 0) || 
-	    (strcmp(familyName, "AvantGarde") == 0)) {
-	    weightName = "Demi";
-	} else {
-	    weightName = "Bold";
-	}
-    } else {
-	if (strcmp(familyName, "Bookman") == 0) {
-	    weightName = "Light";
-	} else if (strcmp(familyName, "AvantGarde") == 0) {
-	    weightName = "Book";
-	} else if (strcmp(familyName, "ZapfChancery") == 0) {
-	    weightName = "Medium";
-	}
-    }
-
-    /* Get the string to use for the slant. */
-    slantName = NULL;
-    if (flags & FONT_ITALIC) {
-	if ((strcmp(familyName, "Helvetica") == 0) || 
-	    (strcmp(familyName, "Courier") == 0) || 
-	    (strcmp(familyName, "AvantGarde") == 0)) {
-	    slantName = "Oblique";
-	} else {
-	    slantName = "Italic";
-	}
-    }
-
-    /*
-     * The string "Roman" needs to be added to some fonts that are not bold
-     * and not italic.
-     */
-    if ((slantName == NULL) && (weightName == NULL)) {
-	if ((strcmp(familyName, "Times") == 0) || 
-	    (strcmp(familyName, "NewCenturySchlbk") == 0) || 
-	    (strcmp(familyName, "Palatino") == 0)) {
-	    Tcl_DStringAppend(resultPtr, "-Roman", -1);
-	}
-    } else {
-	Tcl_DStringAppend(resultPtr, "-", -1);
-	if (weightName != NULL) {
-	    Tcl_DStringAppend(resultPtr, weightName, -1);
-	}
-	if (slantName != NULL) {
-	    Tcl_DStringAppend(resultPtr, slantName, -1);
-	}
-    }
-}
diff --git a/blt3.0/src/bltPs.h b/blt3.0/src/bltPs.h
deleted file mode 100644
index 944faf8..0000000
--- a/blt3.0/src/bltPs.h
+++ /dev/null
@@ -1,215 +0,0 @@
-
-/*
- * bltPs.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_PS_H
-#define _BLT_PS_H
-
-#include "bltPicture.h"
-
-/*
- * PageSetup --
- *
- * 	Structure contains information specific to the layout of the page for
- * 	printing the graph.
- *
- */
-typedef struct  {
-    /* User configurable fields */
-
-    int reqWidth, reqHeight;	/* If greater than zero, represents the
-				 * requested dimensions of the printed graph */
-    int reqPaperWidth;
-    int reqPaperHeight;		/* Requested dimensions for the PostScript
-				 * page. Can constrain the size of the graph
-				 * if the graph (plus padding) is larger than
-				 * the size of the page. */
-    Blt_Pad xPad, yPad;		/* Requested padding on the exterior of the
-				 * graph. This forms the bounding box for
-				 * the page. */
-    const char *colorVarName;	/* If non-NULL, is the name of a TCL array
-				 * variable containing X to output device color
-				 * translations */
-    const char *fontVarName;	/* If non-NULL, is the name of a TCL array
-				 * variable containing X to output device font
-				 * translations */
-    int level;			/* PostScript Language level 1-3 */
-    unsigned int flags;
-
-    const char **comments;	/* User supplied comments to be added. */
-
-    /* Computed fields */
-
-    short int left, bottom;	/* Bounding box of the plot in the page. */
-    short int right, top;
-
-    float scale;		/* Scale of page. Set if "-maxpect" option
-				 * is set, otherwise 1.0. */
-
-    int paperHeight;
-    int paperWidth;
-    
-} PageSetup;
-
-#define PS_GREYSCALE	(1<<0)
-#define PS_LANDSCAPE	(1<<2)
-#define PS_CENTER	(1<<3)
-#define PS_MAXPECT	(1<<4)
-#define PS_DECORATIONS	(1<<5)
-#define PS_FOOTER	(1<<6)
-#define PS_FMT_NONE	0
-#define PS_FMT_MASK	(PS_FMT_WMF|PS_FMT_EPSI|PS_FMT_TIFF)
-#define PS_FMT_WMF	(1<<8)
-#define PS_FMT_EPSI	(1<<9)
-#define PS_FMT_TIFF	(1<<10)
-
-typedef struct _Blt_Ps *Blt_Ps;
-
-BLT_EXTERN Blt_Ps Blt_Ps_Create(Tcl_Interp *interp, PageSetup *setupPtr);
-
-BLT_EXTERN void Blt_Ps_Free(Blt_Ps ps);
-
-BLT_EXTERN const char *Blt_Ps_GetValue(Blt_Ps ps, int *lengthPtr);
-
-BLT_EXTERN Tcl_Interp *Blt_Ps_GetInterp(Blt_Ps ps);
-
-BLT_EXTERN Tcl_DString *Blt_Ps_GetDString(Blt_Ps ps);
-
-BLT_EXTERN char *Blt_Ps_GetScratchBuffer(Blt_Ps ps);
-
-BLT_EXTERN void Blt_Ps_SetInterp(Blt_Ps ps, Tcl_Interp *interp);
-
-BLT_EXTERN void Blt_Ps_Append(Blt_Ps ps, const char *string);
-
-BLT_EXTERN void Blt_Ps_AppendBytes(Blt_Ps ps, const char *string, int nBytes);
-
-BLT_EXTERN void Blt_Ps_VarAppend TCL_VARARGS(Blt_Ps, ps);
-
-BLT_EXTERN void Blt_Ps_Format TCL_VARARGS(Blt_Ps, ps);
-
-BLT_EXTERN void Blt_Ps_SetClearBackground(Blt_Ps ps);
-
-BLT_EXTERN int Blt_Ps_IncludeFile(Tcl_Interp *interp, Blt_Ps ps, 
-	const char *fileName);
-
-BLT_EXTERN int Blt_Ps_GetPicaFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	int *picaPtr);
-
-BLT_EXTERN int Blt_Ps_GetPadFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_Pad *padPtr);
-
-BLT_EXTERN int Blt_Ps_ComputeBoundingBox(PageSetup *setupPtr, int w, int h);
-
-BLT_EXTERN void Blt_Ps_DrawPicture(Blt_Ps ps, Blt_Picture picture, 
-	double x, double y);
-
-BLT_EXTERN void Blt_Ps_Rectangle(Blt_Ps ps, int x, int y, int w, int h);
-
-
-BLT_EXTERN int Blt_Ps_SaveFile(Tcl_Interp *interp, Blt_Ps ps, 
-	const char *fileName);
-
-#ifdef _TK
-
-#include "bltFont.h"
-#include "bltText.h"
-
-BLT_EXTERN void Blt_Ps_XSetLineWidth(Blt_Ps ps, int lineWidth);
-
-BLT_EXTERN void Blt_Ps_XSetBackground(Blt_Ps ps, XColor *colorPtr);
-
-BLT_EXTERN void Blt_Ps_XSetBitmapData(Blt_Ps ps, Display *display, 
-	Pixmap bitmap, int width, int height);
-
-BLT_EXTERN void Blt_Ps_XSetForeground(Blt_Ps ps, XColor *colorPtr);
-
-BLT_EXTERN void Blt_Ps_XSetFont(Blt_Ps ps, Blt_Font font);
-
-BLT_EXTERN void Blt_Ps_XSetDashes(Blt_Ps ps, Blt_Dashes *dashesPtr);
-
-BLT_EXTERN void Blt_Ps_XSetLineAttributes(Blt_Ps ps, XColor *colorPtr,
-	int lineWidth, Blt_Dashes *dashesPtr, int capStyle, int joinStyle);
-
-BLT_EXTERN void Blt_Ps_XSetStipple(Blt_Ps ps, Display *display, Pixmap bitmap);
-
-BLT_EXTERN void Blt_Ps_Polyline(Blt_Ps ps, Point2d *screenPts, int nScreenPts);
-
-BLT_EXTERN void Blt_Ps_XDrawLines(Blt_Ps ps, XPoint *points, int n);
-
-BLT_EXTERN void Blt_Ps_XDrawSegments(Blt_Ps ps, XSegment *segments, 
-	int nSegments);
-
-BLT_EXTERN void Blt_Ps_DrawPolyline(Blt_Ps ps, Point2d *points, int n);
-
-BLT_EXTERN void Blt_Ps_Draw2DSegments(Blt_Ps ps, Segment2d *segments,
-	int nSegments);
-
-BLT_EXTERN void Blt_Ps_Draw3DRectangle(Blt_Ps ps, Tk_3DBorder border, 
-	double x, double y, int width, int height, int borderWidth, int relief);
-
-BLT_EXTERN void Blt_Ps_Fill3DRectangle(Blt_Ps ps, Tk_3DBorder border, double x,
-	 double y, int width, int height, int borderWidth, int relief);
-
-BLT_EXTERN void Blt_Ps_XFillRectangle(Blt_Ps ps, double x, double y, 
-	int width, int height);
-
-BLT_EXTERN void Blt_Ps_XFillRectangles(Blt_Ps ps, XRectangle *rects, int n);
-
-BLT_EXTERN void Blt_Ps_XFillPolygon(Blt_Ps ps, Point2d *screenPts, 
-	int nScreenPts);
-
-BLT_EXTERN void Blt_Ps_DrawPhoto(Blt_Ps ps, Tk_PhotoHandle photoToken,
-	double x, double y);
-
-BLT_EXTERN void Blt_Ps_XDrawWindow(Blt_Ps ps, Tk_Window tkwin, 
-	double x, double y);
-
-BLT_EXTERN void Blt_Ps_DrawText(Blt_Ps ps, const char *string, 
-	TextStyle *attrPtr, double x, double y);
-
-BLT_EXTERN void Blt_Ps_DrawBitmap(Blt_Ps ps, Display *display, Pixmap bitmap, 
-	double scaleX, double scaleY);
-
-BLT_EXTERN void Blt_Ps_XSetCapStyle(Blt_Ps ps, int capStyle);
-
-BLT_EXTERN void Blt_Ps_XSetJoinStyle(Blt_Ps ps, int joinStyle);
-
-BLT_EXTERN void Blt_Ps_PolylineFromXPoints(Blt_Ps ps, XPoint *points, int n);
-
-BLT_EXTERN void Blt_Ps_Polygon(Blt_Ps ps, Point2d *screenPts, int nScreenPts);
-
-BLT_EXTERN void Blt_Ps_SetPrinting(Blt_Ps ps, int value);
-BLT_EXTERN int Blt_Ps_IsPrinting(void);
-
-BLT_EXTERN int Blt_Ps_TextWidth(Blt_Font font, const char *string, int nBytes);
-
-BLT_EXTERN int Blt_Ps_GetFontMetrics(Blt_Font font, Blt_FontMetrics *fmPtr);
-
-BLT_EXTERN void Blt_Ps_FontName(const char *family, int flags, 
-	Tcl_DString *resultPtr);
-
-#endif /* _TK */
-
-#endif /* BLT_PS_H */
diff --git a/blt3.0/src/bltPsAfm.c b/blt3.0/src/bltPsAfm.c
deleted file mode 100644
index 5307156..0000000
--- a/blt3.0/src/bltPsAfm.c
+++ /dev/null
@@ -1,1835 +0,0 @@
-
-/*
- * bltPsAfm.c --
- *
- * This module implements an Adobe Font Metric File parser for the purpose of
- * determining font metrics when generating PostScript.
- *
- *	Copyright 2009 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <setjmp.h>
-#include <bltInt.h>
-#include <bltHash.h>
-#include "bltPs.h"
-
-#include "bltOp.h"
-#include "bltText.h"
-#include "bltFont.h"
-#define AFM_MAXSTATES	50
-#define AFM_MAXLINE	512
-#define FM(x)		Blt_Offset(AdobeFontMetrics, x)
-#define CM(x)		Blt_Offset(CharMetrics, x)
-#define FTOA(x)		Blt_Dtoa(interp, (double)x)
-    
-typedef struct {
-    const char *name;
-    short int code;
-} Symbol;
-
-static Symbol isoLatin1Symbols[] = {
-    { "A", 65 },
-    { "AE", 198 },
-    { "Aacute", 193 },
-    { "Acircumflex", 194 },
-    { "Adieresis", 196 },
-    { "Agrave", 192 },
-    { "Aring", 197 },
-    { "Atilde", 195 },
-    { "B", 66 },
-    { "C", 67 },
-    { "Ccedilla", 199 },
-    { "D", 68 },
-    { "E", 69 },
-    { "Eacute", 201 },
-    { "Ecircumflex", 202 },
-    { "Edieresis", 203 },
-    { "Egrave", 200 },
-    { "Eth", 208 },
-    { "F", 70 },
-    { "G", 71 },
-    { "H", 72 },
-    { "I", 73 },
-    { "Iacute", 205 },
-    { "Icircumflex", 206 },
-    { "Idieresis", 207 },
-    { "Igrave", 204 },
-    { "J", 74 },
-    { "K", 75 },
-    { "L", 76 },
-    { "M", 77 },
-    { "N", 78 },
-    { "Ntilde", 209 },
-    { "O", 79 },
-    { "Oacute", 211 },
-    { "Ocircumflex", 212 },
-    { "Odieresis", 214 },
-    { "Ograve", 210 },
-    { "Oslash", 216 },
-    { "Otilde", 213 },
-    { "P", 80 },
-    { "Q", 81 },
-    { "R", 82 },
-    { "S", 83 },
-    { "T", 84 },
-    { "Thorn", 222 },
-    { "U", 85 },
-    { "Uacute", 218 },
-    { "Ucircumflex", 219 },
-    { "Udieresis", 220 },
-    { "Ugrave", 217 },
-    { "V", 86 },
-    { "W", 87 },
-    { "X", 88 },
-    { "Y", 89 },
-    { "Yacute", 221 },
-    { "Z", 90 },
-    { "a", 97 },
-    { "aacute", 225 },
-    { "acircumflex", 226 },
-    { "acute", 180 },
-    { "adieresis", 228 },
-    { "ae", 230 },
-    { "agrave", 224 },
-    { "ampersand", 38 },
-    { "aring", 229 },
-    { "asciicircum", 94 },
-    { "asciitilde", 126 },
-    { "asterisk", 42 },
-    { "at", 64 },
-    { "atilde", 227 },
-    { "b", 98 },
-    { "backslash", 92 },
-    { "bar", 124 },
-    { "braceleft", 123 },
-    { "braceright", 125 },
-    { "bracketleft", 91 },
-    { "bracketright", 93 },
-    { "brokenbar", 166 },
-    { "florin", 166 },
-    { "c", 99 },
-    { "ccedilla", 231 },
-    { "cedilla", 184 },
-    { "cent", 162 },
-    { "colon", 58 },
-    { "comma", 44 },
-    { "controlACK", 6 },
-    { "controlBEL", 7 },
-    { "controlBS", 8 },
-    { "controlCAN", 24 },
-    { "controlCR", 13 },
-    { "controlDC1", 17 },
-    { "controlDC2", 18 },
-    { "controlDC3", 19 },
-    { "controlDC4", 20 },
-    { "controlDEL", 127 },
-    { "controlDLE", 16 },
-    { "controlEM", 25 },
-    { "controlENQ", 5 },
-    { "controlEOT", 4 },
-    { "controlESC", 27 },
-    { "controlETB", 23 },
-    { "controlETX", 3 },
-    { "controlFF", 12 },
-    { "controlFS", 28 },
-    { "controlGS", 29 },
-    { "controlHT", 9 },
-    { "controlLF", 10 },
-    { "controlNAK", 21 },
-    { "controlRS", 30 },
-    { "controlSI", 15 },
-    { "controlSO", 14 },
-    { "controlSOT", 2 },
-    { "controlSTX", 1 },
-    { "controlSUB", 26 },
-    { "controlSYN", 22 },
-    { "controlUS", 31 },
-    { "controlVT", 11 },
-    { "copyright", 169 },
-    { "currency", 164 },
-    { "fraction", 164 },
-    { "d", 100 },
-    { "degree", 176 },
-    { "dieresis", 168 },
-    { "divide", 247 },
-    { "dollar", 36 },
-    { "e", 101 },
-    { "eacute", 233 },
-    { "ecircumflex", 234 },
-    { "edieresis", 235 },
-    { "egrave", 232 },
-    { "eight", 56 },
-    { "equal", 61 },
-    { "eth", 240 },
-    { "exclam", 33 },
-    { "exclamdown", 161 },
-    { "f", 102 },
-    { "five", 53 },
-    { "four", 52 },
-    { "g", 103 },
-    { "germandbls", 223 },
-    { "grave", 96 },
-    { "quoteleft", 96 },
-    { "greater", 62 },
-    { "guillemotleft", 171 },
-    { "guillemotright", 187 },
-    { "h", 104 },
-    { "hyphen", 45 },
-    { "i", 105 },
-    { "iacute", 237 },
-    { "icircumflex", 238 },
-    { "idieresis", 239 },
-    { "igrave", 236 },
-    { "j", 106 },
-    { "k", 107 },
-    { "l", 108 },
-    { "less", 60 },
-    { "logicalnot", 172 },
-    { "m", 109 },
-    { "macron", 175 },
-    { "middot", 183 },
-    { "mu", 181 },
-    { "mu1", 181 },
-    { "multiply", 215 },
-    { "n", 110 },
-    { "nbspace", 160 },
-    { "nine", 57 },
-    { "nonbreakingspace", 160 },
-    { "ntilde", 241 },
-    { "numbersign", 35 },
-    { "o", 111 },
-    { "oacute", 243 },
-    { "ocircumflex", 244 },
-    { "odieresis", 246 },
-    { "ograve", 242 },
-    { "one", 49 },
-    { "onehalf", 189 },
-    { "onequarter", 188 },
-    { "onesuperior", 185 },
-    { "ordfeminine", 170 },
-    { "ordmasculine", 186 },
-    { "oslash", 248 },
-    { "otilde", 245 },
-    { "overscore", 175 },
-    { "p", 112 },
-    { "paragraph", 182 },
-    { "parenleft", 40 },
-    { "parenright", 41 },
-    { "percent", 37 },
-    { "period", 46 },
-    { "periodcentered", 183 },
-    { "plus", 43 },
-    { "plusminus", 177 },
-    { "q", 113 },
-    { "question", 63 },
-    { "questiondown", 191 },
-    { "quotedbl", 34 },
-    { "quotesingle", 39 },
-    { "quoteright", 39 },
-    { "r", 114 },
-    { "registered", 174 },
-    { "s", 115 },
-    { "section", 167 },
-    { "semicolon", 59 },
-    { "seven", 55 },
-    { "sfthyphen", 173 },
-    { "six", 54 },
-    { "slash", 47 },
-    { "softhyphen", 173 },
-    { "space", 32 },
-    { "spacehackarabic", 32 },
-    { "sterling", 163 },
-    { "t", 116 },
-    { "thorn", 254 },
-    { "three", 51 },
-    { "threequarters", 190 },
-    { "threesuperior", 179 },
-    { "two", 50 },
-    { "twosuperior", 178 },
-    { "u", 117 },
-    { "uacute", 250 },
-    { "ucircumflex", 251 },
-    { "udieresis", 252 },
-    { "ugrave", 249 },
-    { "underscore", 95 },
-    { "v", 118 },
-    { "verticalbar", 124 },
-    { "w", 119 },
-    { "x", 120 },
-    { "y", 121 },
-    { "yacute", 253 },
-    { "ydieresis", 255 },
-    { "yen", 165 },
-    { "z", 122 },
-    { "zero", 48 },
-    { NULL, -1 }
-};
-
-typedef struct _Parser Parser;
-
-typedef int (ParseProc) (Parser *parserPtr, char *record, int offset);
-
-typedef struct {
-    const char *key;
-    unsigned int nArgs;
-    ParseProc *proc;
-    size_t offset;
-} ParserSpec;
-
-typedef struct {
-    float llx, lly, urx, ury;
-} CharBBox;
-
-typedef struct {
-    float x, y;
-} Point;
-
-typedef struct {
-    short int first, second;
-} LigatureKey;
-
-typedef struct {
-    const char *successor;
-    const char *ligature;
-    short int index;
-} Ligature;
-
-typedef struct {
-    CharBBox bbox;
-    int index;
-    const char *name;
-    int hasLigature;
-    int hasKernPair;
-    Point w;
-    Point vVector;
-} CharMetrics;
-
-typedef struct {
-    float x, y;
-    short int first, second;
-} KernPairs;
-
-typedef struct {
-    short int first, second;
-} KernPairsKey;
-
-typedef struct {
-    float degree;
-    float minPointSize, maxPointSize;
-    float minKern, maxKern;
-} TrackKern;
-
-typedef struct {
-    const char *afmVersion;
-    const char *familyName;
-    const char *fontName;
-    const char *fullName;
-    const char *weight;
-    const char *comment;
-    const char *copyright;
-    const char *notice;
-    float italicAngle;
-    CharBBox fontBBox;
-    float underlinePosition;
-    float underlineThickness;
-    const char *characterSet;
-    int characters;
-    const char *version;
-    const char *encodingScheme;
-    float capHeight;
-    float xHeight;
-    float ascender, descender;
-    int metricSets;
-    Point charWidth;
-    int escChar;
-    int isFixedPitch;
-    int isBaseFont;
-    int isCIDFont;
-    int isFixedV;
-    int mappingScheme;
-    int nCharMetrics;
-    int nComposites;
-    int nDirection;
-    int nKernPairs;
-    int nTrackKern;
-
-    float stdHW, stdVW;
-    Point vVector;
-    TrackKern *trackKern;
-
-    KernPairs *kernPairs;
-    CharMetrics metrics[256];
-    Blt_HashTable metricsTable;
-    Blt_HashTable kernPairsTable;
-    Blt_HashTable ligatureTable;
-    Blt_HashTable symbolTable;
-#ifdef notdef
-    Composites *composites;
-    Blt_HashTable compositeTable;
-#endif
-    int refCount;
-    Blt_HashEntry *hashPtr;
-    float pointSize;			/* Current point size of font. */
-} AdobeFontMetrics;
-
-struct _Parser {
-    Tcl_Channel channel;		/* Channel to AdobeFontMetrics file. */
-    AdobeFontMetrics *afmPtr;
-    jmp_buf jmpbuf; 
-    Tcl_DString errors;			/* Contains error message. */
-    int nErrors;
-    int argc;				/* # arguments (word) of last line.  */
-    const char **argv;			/* Split of last line. */
-    Tcl_DString lastLine;		/* Contains last line read from file. */
-    int lineNumber;
-};
-
-static Blt_HashTable fontTable;
-static int initialized;
-
-static int ParseLine(Parser *parserPtr, ParserSpec *specs, int nSpecs, 
-		     ClientData clientData);
-
-static INLINE int 
-Points(AdobeFontMetrics *afmPtr, double x)
-{
-    return (int)round((afmPtr->pointSize * x) / 1000.0);
-}
-
-/*ARGSUSED*/
-static void
-ParserError TCL_VARARGS_DEF(Parser *, arg1)
-{
-    Parser *parserPtr;
-    const char *fmt;
-    char string[BUFSIZ+4];
-    int length;
-    va_list args;
-
-    parserPtr = TCL_VARARGS_START(Parser *, arg1, args);
-    fmt = va_arg(args, char *);
-    length = vsnprintf(string, BUFSIZ, fmt, args);
-    if (length > BUFSIZ) {
-	strcat(string, "...");
-    }
-    Tcl_DStringAppend(&parserPtr->errors, "line ", 5);
-    Tcl_DStringAppend(&parserPtr->errors, Blt_Itoa(parserPtr->lineNumber), -1);
-    Tcl_DStringAppend(&parserPtr->errors, ": ", 2);
-    Tcl_DStringAppend(&parserPtr->errors, string, -1);
-    Tcl_DStringAppend(&parserPtr->errors, "\n", -1);
-    va_end(args);
-    longjmp(parserPtr->jmpbuf, 0);
-}
-
-static int
-GetNumber(Parser *parserPtr, const char *string, float *valuePtr) 
-{
-    char *end;
-    double d;
-
-    errno = 0;
-    d = strtod(string, &end);		/* INTL: Tcl source. */
-    if (end == string) {
-    badDouble:
-	ParserError(parserPtr, "expected floating-point number but got \"%s\"",
-		    string);
-    }
-    if (errno != 0 && (d == HUGE_VAL || d == -HUGE_VAL || d == 0)) {
-	ParserError(parserPtr, "number \"%s\" is too big to represent",
-		    string);
-    }
-    while ((*end != 0) && isspace(UCHAR(*end))) { /* INTL: ISO space. */
-	end++;
-    }
-    if (*end != 0) {
-	goto badDouble;
-    }
-    *valuePtr = (float)d;
-    return TCL_OK;
-}
-
-static int
-GetHexNumber(Parser *parserPtr, const char *string, int *valuePtr) 
-{
-    char *p;
-    int value;
-
-    if (*string == '<') {
-	string++;
-    }
-    value = strtoul(string, &p, 8);
-    if ((p == string) || (*p != '>')) {
-	ParserError(parserPtr, "expected hex number but got \"%s\"", string);
-    }
-    *valuePtr = value;
-    return TCL_OK;
-}
-
-static int 
-GetLine(Parser *parserPtr)
-{
-    Tcl_DStringSetLength(&parserPtr->lastLine, 0);
-    while (!Tcl_Eof(parserPtr->channel)) {
-	const char *p;
-	int code;
-
-	code = Tcl_Gets(parserPtr->channel, &parserPtr->lastLine);
-	if (code < 0) {
-	    if (Tcl_Eof(parserPtr->channel)) {
-		return TCL_RETURN;
-	    }
-	    ParserError(parserPtr, "error reading channel: %s\n", 
-		strerror(errno));
-	}
-	parserPtr->lineNumber++;
-	for (p = Tcl_DStringValue(&parserPtr->lastLine); isspace(*p); p++) {
-	    /* skip blanks */
-	}
-	if (*p == '\0') {
-	    continue;
-	}
-	return TCL_OK;
-    }
-    return TCL_RETURN;
-}
-
-static void 
-SplitLine(Parser *parserPtr, const char *line)
-{
-    const char *p;
-    int count;
-    size_t strSize, addrSize;
-
-    if (parserPtr->argv != NULL) {
-	Blt_Free((char *)parserPtr->argv);
-	parserPtr->argv = NULL;
-	parserPtr->argc = 0;
-    }
-    /* Count the # of arguments to determine what size array to allocate. */
-    count = 0;
-    p = line;
-    while (*p != '\0') {
-	while (isspace(*p)) p++;	/* Skip whitespace. */
-	if (*p == '\0') {
-	    break;
-	}
-	while (!isspace(*p) && (*p != '\0')) p++;  /* Skip the word itself. */
-	count++;
-    }
-    if (count == 0) {
-	return;				/* No arguments. */
-    }
-    addrSize = sizeof(char **) * (count + 1);
-    strSize = p - line + 1;
-    {
-	char *buffer, *p;
-	const char **array;
-
-	buffer = Blt_Malloc(addrSize + strSize);
-	assert(buffer);
-	p = buffer + addrSize;
-	strcpy(p, line);		/* Copy the string into the buffer. */
-	array = (const char **)buffer;
-	count = 0;
-	while (*p != '\0') {
-	    while (isspace(*p)) {
-		*p++ = '\0';	/* Convert whitespace to NULs. */
-	    }
-	    if (*p == '\0') {
-		break;
-	    }
-	    array[count] = p;
-	    while (!isspace(*p) && (*p != '\0')) p++;  
-	    count++;
-	}
-	array[count] = NULL;
-	parserPtr->argv = array;
-	parserPtr->argc = count;
-    }
-}
-
-static int 
-SplitNextLine(Parser *parserPtr)
-{
-    int result;
-
-    if (parserPtr->argv != NULL) {
-	Blt_Free((char *)parserPtr->argv);
-	parserPtr->argv = NULL;
-	parserPtr->argc = 0;
-    }
-    result = GetLine(parserPtr);
-    if (result == TCL_OK) {
-	SplitLine(parserPtr, Tcl_DStringValue(&parserPtr->lastLine));
-	return TCL_OK;
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LookupKeyword --
- *
- *---------------------------------------------------------------------------
- */
-static ParserSpec *
-LookupKeyword(ParserSpec *specs, int nSpecs, const char *string)
-{
-    char c;
-    int high, low;
-
-    low = 0;
-    high = nSpecs - 1;
-    c = string[0];
-    while (low <= high) {
-	ParserSpec *specPtr;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	specPtr = specs + median;
-
-	/* Test the first character */
-	compare = c - specPtr->key[0];
-	if (compare == 0) {
-	    /* Now test the entire string */
-	    compare = strcmp(string, specPtr->key);
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return specPtr;
-	}
-    }
-    return NULL;			/* Can't find operation */
-}
-
-static int
-ParseLine(Parser *parserPtr, ParserSpec *specs, int nSpecs, 
-	  ClientData clientData)
-{
-    ParserSpec *specPtr;
-
-    specPtr = LookupKeyword(specs, nSpecs, parserPtr->argv[0]);
-    if (specPtr == NULL) {
-	ParserError(parserPtr, "unknown keyword \"%s\"", parserPtr->argv[0]);
-    }
-    if ((specPtr->nArgs > 0) && (specPtr->nArgs != parserPtr->argc)) {
-	ParserError(parserPtr, "wrong # arguments for \"%s\"", specPtr->key);
-    }
-    if (specPtr->proc == NULL) {
-	return TCL_OK;
-    }
-    return (*specPtr->proc)(parserPtr, clientData, specPtr->offset);
-}
-
-static int 
-ParseEndSection(Parser *parserPtr, char *record, int offset)
-{
-    return TCL_CONTINUE;		/* Indicates end of section. */
-}
-
-static long
-LookupSymbol(AdobeFontMetrics *afmPtr, const char *symbol)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&afmPtr->symbolTable, symbol);
-    if (hPtr != NULL) {
-	return (long)Blt_GetHashValue(hPtr);
-    }
-    /*fprintf(stderr, "unknown symbol \"%s\"\n", symbol);*/
-    return -1;
-}
-
-static void
-InitSymbolTable(AdobeFontMetrics *afmPtr)
-{
-    Symbol *symPtr;
-
-    Blt_InitHashTable(&afmPtr->symbolTable, BLT_STRING_KEYS);
-    for (symPtr = isoLatin1Symbols; symPtr->name != NULL; symPtr++) {
-	Blt_HashEntry *hPtr;
-	int isNew;
-	
-	hPtr = Blt_CreateHashEntry(&afmPtr->symbolTable, symPtr->name, &isNew);
-	Blt_SetHashValue(hPtr, (ClientData)(long)symPtr->code);
-    }
-}
-
-static void
-UpdateSymbol(AdobeFontMetrics *afmPtr, long code, const char *symbol)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    
-    hPtr = Blt_CreateHashEntry(&afmPtr->symbolTable, symbol, &isNew);
-#ifdef notdef
-    if (!isNew) {
-	long oldCode;
-
-	oldCode = (long)Blt_GetHashValue(hPtr);
-	if (code != oldCode) {
-	    fprintf(stderr, "rewriting symbol %s with %d (was %ld)\n",
-		    symbol, code, oldCode);
-	}
-    }
-#endif
-    Blt_SetHashValue(hPtr, (ClientData)code);
-}
-
-static void
-BuildKernPairsTable(AdobeFontMetrics *afmPtr)
-{
-    KernPairs *kp, *kend;
-
-    Blt_InitHashTable(&afmPtr->kernPairsTable, 
-		      sizeof(KernPairsKey) / sizeof(int));
-    for (kp = afmPtr->kernPairs, kend = kp + afmPtr->nKernPairs; kp < kend; 
-	 kp++) {
-	KernPairsKey key;
-	Blt_HashEntry *hPtr;
-	int isNew;
-	
-	memset(&key, 0, sizeof(key));
-	key.first = kp->first;
-	key.second = kp->second;
-	hPtr = Blt_CreateHashEntry(&afmPtr->kernPairsTable, (char *)&key, 
-		&isNew);
-	Blt_SetHashValue(hPtr, (ClientData)kp);
-    }
-}
-
-static KernPairs *
-GetKernPairs(AdobeFontMetrics *afmPtr, int c1, int c2)
-{
-    KernPairsKey key;
-    Blt_HashEntry *hPtr;
-
-    key.first = c1;
-    key.second = c2;
-    
-    hPtr = Blt_FindHashEntry(&afmPtr->kernPairsTable, (char *)&key);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static KernPairs *
-GetLigature(AdobeFontMetrics *afmPtr, int c1, int c2)
-{
-    KernPairsKey key;
-    Blt_HashEntry *hPtr;
-
-    key.first = c1;
-    key.second = c2;
-    
-    hPtr = Blt_FindHashEntry(&afmPtr->kernPairsTable, (char *)&key);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-static Ligature *
-NewLigature(Parser *parserPtr, int first, int second)
-{
-    Blt_HashEntry *hPtr;
-    Ligature *ligPtr;
-    int isNew;
-    LigatureKey key;
-
-    key.first = first;
-    key.second = second;
-    ligPtr = Blt_Calloc(1, sizeof(Ligature));
-    assert(ligPtr);
-    hPtr = Blt_CreateHashEntry(&parserPtr->afmPtr->ligatureTable, 
-	(char *)&key, &isNew);
-    Tcl_SetHashValue(hPtr, ligPtr);
-    return ligPtr;
-}
-
-static Parser *
-NewParser(AdobeFontMetrics *afmPtr, const char *fileName)
-{
-    Parser *parserPtr;
-    Tcl_Channel channel;
-
-    channel = Tcl_OpenFileChannel(NULL, fileName, "r", 0);
-    if (channel == NULL) {
-	fprintf(stderr, "can't open %s\n", fileName);
-	return NULL;
-    }
-    if ((Tcl_SetChannelOption(NULL, channel, "-translation","auto")!=TCL_OK)||
-	(Tcl_SetChannelOption(NULL, channel, "-eofchar", "\x1a") != TCL_OK)) {
-	return NULL;
-    }
-    parserPtr = Blt_Calloc(1, sizeof(Parser));
-    assert(parserPtr);
-    parserPtr->channel = channel;
-    parserPtr->afmPtr = afmPtr;
-    InitSymbolTable(afmPtr);
-    Tcl_DStringInit(&parserPtr->errors);
-    Tcl_DStringAppend(&parserPtr->errors, "error reading \"", -1);
-    Tcl_DStringAppend(&parserPtr->errors, fileName, -1);
-    Tcl_DStringAppend(&parserPtr->errors, "\": ", -1);
-    Tcl_DStringInit(&parserPtr->lastLine);
-    return parserPtr;
-}
-
-static void
-DestroyParser(Parser *parserPtr)
-{
-    if (parserPtr->argv != NULL) {
-	Blt_Free((char *)parserPtr->argv);
-    }
-    Tcl_Close(NULL, parserPtr->channel);
-    Tcl_DStringFree(&parserPtr->errors);
-    Tcl_DStringFree(&parserPtr->lastLine);
-    Blt_Free(parserPtr);
-}
-
-static void
-DestroyAdobeFontMetrics(AdobeFontMetrics *afmPtr)
-{
-    if (afmPtr->afmVersion != NULL) {
-	Blt_Free((char *)afmPtr->afmVersion);
-    }
-    if (afmPtr->characterSet != NULL) {
-	Blt_Free((char *)afmPtr->characterSet);
-    }
-    if (afmPtr->comment != NULL) {
-	Blt_Free((char *)afmPtr->comment);
-    }
-    if (afmPtr->copyright != NULL) {
-	Blt_Free((char *)afmPtr->copyright);
-    }
-    if (afmPtr->encodingScheme != NULL) {
-	Blt_Free((char *)afmPtr->encodingScheme);
-    }
-    if (afmPtr->familyName != NULL) {
-	Blt_Free((char *)afmPtr->familyName);
-    }
-    if (afmPtr->fontName != NULL) {
-	Blt_Free((char *)afmPtr->fontName);
-    }
-    if (afmPtr->fullName != NULL) {
-	Blt_Free((char *)afmPtr->fullName);
-    }
-    if (afmPtr->notice != NULL) {
-	Blt_Free((char *)afmPtr->notice);
-    }
-    if (afmPtr->version != NULL) {
-	Blt_Free((char *)afmPtr->version);
-    }
-    if (afmPtr->weight != NULL) {
-	Blt_Free((char *)afmPtr->weight);
-    }
-    if (afmPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&fontTable, afmPtr->hashPtr);
-    }
-    Blt_DeleteHashTable(&afmPtr->kernPairsTable);
-    Blt_DeleteHashTable(&afmPtr->metricsTable);
-    Blt_DeleteHashTable(&afmPtr->symbolTable);
-    Blt_DeleteHashTable(&afmPtr->ligatureTable);
-    if (afmPtr->kernPairs != NULL) {
-	Blt_Free(afmPtr->kernPairs);
-    }
-    if (afmPtr->trackKern != NULL) {
-	Blt_Free(afmPtr->trackKern);
-    }
-    Blt_Free((char *)afmPtr);
-}
-
-static int
-ParseInt(Parser *parserPtr, char *record, int offset)
-{
-    int *valuePtr = (int *)(record + offset);
-
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], valuePtr) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to integer.", 
-		    parserPtr->argv[1]);
-    }
-    return TCL_OK;
-}
-
-static int
-ParseHex(Parser *parserPtr, char *record, int offset)
-{
-    int *valuePtr = (int *)(record + offset);
-
-    return GetHexNumber(parserPtr, parserPtr->argv[1], valuePtr);
-}
-
-static int
-ParseBoolean(Parser *parserPtr, char *record, int offset)
-{
-    int *valuePtr = (int *)(record + offset);
-
-    if (Tcl_GetBoolean(NULL, parserPtr->argv[1], valuePtr) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to boolean.", 
-		    parserPtr->argv[1]);
-    }
-    return TCL_OK;
-}
-
-
-static int
-ParseNumber(Parser *parserPtr, char *record, int offset)
-{
-    float *valuePtr = (float *)(record + offset);
-
-    return GetNumber(parserPtr, parserPtr->argv[1], valuePtr);
-}
-
-
-static int
-ParsePoint(Parser *parserPtr, char *record, int offset)
-{
-    Point *pointPtr = (Point *)(record + offset);
-
-    if ((GetNumber(parserPtr, parserPtr->argv[1], &pointPtr->x) != TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[2], &pointPtr->y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-ParseBBox(Parser *parserPtr, char *record, int offset)
-{
-    CharBBox *bboxPtr = (CharBBox *)(record + offset);
-    
-    if ((GetNumber(parserPtr, parserPtr->argv[1], &bboxPtr->llx) != TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[2], &bboxPtr->lly) != TCL_OK) || 
-	(GetNumber(parserPtr, parserPtr->argv[3], &bboxPtr->urx) != TCL_OK) || 
-	(GetNumber(parserPtr, parserPtr->argv[4], &bboxPtr->ury) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-ParseString(Parser *parserPtr, char *record, int offset)
-{
-    char **args = (char **)(record + offset);
-
-    if (*args != NULL) {
-	Blt_Free(*args);
-	*args = NULL;
-    }
-    *args = Tcl_Merge(parserPtr->argc - 1 , parserPtr->argv + 1);
-    if (*args == NULL) {
-	ParserError(parserPtr, "can't merge \"%s\" string.", 
-		    parserPtr->argv[0]);
-    }
-    return TCL_OK;
-}
-
-static int
-ParseName(Parser *parserPtr, char *record, int offset)
-{
-    const char **valuePtr = (const char **)(record + offset);
-
-    if (*valuePtr != NULL) {
-	Blt_Free((char *)*valuePtr);
-    }
-    *valuePtr = Blt_Strdup(parserPtr->argv[1]);
-    return TCL_OK;
-}
-
-
-static int
-ParseStartComposites(Parser *parserPtr, char *record, int offset)
-{
-    int *valuePtr = (int *)(record + offset);
-    int n;
-
-    assert(*valuePtr == 0);
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], &n) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to integer", 
-		    parserPtr->argv[1]);
-    }
-    n++;
-    *valuePtr = n;
-    for (;;) {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartComposites");
-	}
-	if (strcmp(parserPtr->argv[0], "EndComposites") == 0) {
-	    return TCL_OK;
-	}
-    }
-    /*notreached*/
-    return TCL_ERROR;
-}
-
-
-static ParserSpec directionSpecs[] = {
-    { "CharWidth",	   3, ParsePoint,      FM(charWidth)	      },
-    { "EndDirection",	   1, ParseEndSection, 0		      },
-    { "IsFixedPitch",	   2, ParseBoolean,    FM(isFixedPitch)       },
-    { "ItalicAngle",	   2, ParseNumber,     FM(italicAngle)	      },
-    { "UnderlinePosition", 2, ParseNumber,     FM(underlinePosition)  },
-    { "UnderlineThickness",2, ParseNumber,     FM(underlineThickness) }
-};
-static int nDirectionSpecs = sizeof(directionSpecs) / sizeof(ParserSpec);
-
-
-static int
-ParseStartDirection(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    int *valuePtr = (int *)(record + offset);
-    int n;
-    int result;
-
-    assert(*valuePtr == 0);
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], &n) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to integer.", 
-		    parserPtr->argv[1]);
-    }
-    do {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartDirection");
-	}
-	result = ParseLine(parserPtr, directionSpecs, nDirectionSpecs, afmPtr);
-    } while (result == TCL_OK);
-    if (result == TCL_CONTINUE) {
-	return TCL_OK;			/* Found EndKernPairs */
-    }
-    return TCL_ERROR;
-}
-
-static int 
-ParseTrackKern(Parser *parserPtr, char *record, int offset)
-{
-    TrackKern *tp = (TrackKern *)(record + offset);
-
-    if ((GetNumber(parserPtr, parserPtr->argv[1], &tp->degree) != TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[2], &tp->minPointSize)!=TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[3], &tp->minKern) != TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[4], &tp->maxPointSize)!=TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[5], &tp->maxKern) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static ParserSpec trackKernSpecs[] = {
-    { "EndTrackKern",	 1, ParseEndSection, 0 },
-    { "TrackKern",	 6, ParseTrackKern,  0 },
-};
-static int nTrackKernSpecs = sizeof(trackKernSpecs) / sizeof(ParserSpec);
-
-static int
-ParseStartTrackKern(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    TrackKern *tp;
-    int *valuePtr = (int *)(record + offset);
-    int n;
-    int result;
-
-    assert(*valuePtr == 0);
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], &n) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to integer.", 
-		parserPtr->argv[1]);
-    }
-    n++;
-    *valuePtr = n;
-    afmPtr->trackKern = Blt_Calloc(n, sizeof(TrackKern));
-    assert(afmPtr->trackKern);
-    tp = afmPtr->trackKern;
-    do {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartTrackKern");
-	}
-	result = ParseLine(parserPtr, trackKernSpecs, nTrackKernSpecs, tp);
-	tp++;
-    } while (result == TCL_OK);
-    if (result == TCL_CONTINUE) {
-	assert((tp - afmPtr->trackKern) == n);
-	return TCL_OK;			/* Found EndTrackKern */
-    }
-    return TCL_ERROR;
-}
-
-
-static int 
-ParseKP(Parser *parserPtr, char *record, int offset)
-{
-    KernPairs *pairPtr = (KernPairs *)(record + offset);
-
-    pairPtr->first = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[1]);
-    pairPtr->second = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[2]);
-    if ((GetNumber(parserPtr, parserPtr->argv[3], &pairPtr->x) != TCL_OK) ||
-	(GetNumber(parserPtr, parserPtr->argv[4], &pairPtr->y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int 
-ParseKPH(Parser *parserPtr, char *record, int offset)
-{
-    KernPairs *pairPtr = (KernPairs *)(record + offset);
-    int x, y;
-
-    pairPtr->first = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[1]);
-    pairPtr->second = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[2]);
-    if ((GetHexNumber(parserPtr, parserPtr->argv[3], &x) != TCL_OK) ||
-	(GetHexNumber(parserPtr, parserPtr->argv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    pairPtr->x = (float)x;
-    pairPtr->y = (float)y;
-    return TCL_OK;
-}
-
-static int 
-ParseKPX(Parser *parserPtr, char *record, int offset)
-{
-    KernPairs *pairPtr = (KernPairs *)(record + offset);
-
-    pairPtr->first = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[1]);
-    pairPtr->second = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[2]);
-    if (GetNumber(parserPtr, parserPtr->argv[3], &pairPtr->x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    pairPtr->y = 0;
-    return TCL_OK;
-}
-
-static int 
-ParseKPY(Parser *parserPtr, char *record, int offset)
-{
-    KernPairs *pairPtr = (KernPairs *)(record + offset);
-
-    pairPtr->first = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[1]);
-    pairPtr->second = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[2]);
-    if (GetNumber(parserPtr, parserPtr->argv[3], &pairPtr->y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    pairPtr->x = 0;
-    return TCL_OK;
-}
-
-static ParserSpec kernPairsSpecs[] = {
-    { "EndKernPairs",	1, ParseEndSection, 0 },
-    { "KP",		5, ParseKP,	    0 },
-    { "KPH",		5, ParseKPH,	    0 },
-    { "KPX",		4, ParseKPX,	    0 },
-    { "KPY",		4, ParseKPY,	    0 },
-};
-static int nKernPairsSpecs = sizeof(kernPairsSpecs) / sizeof(ParserSpec);
-
-static int
-ParseStartKernPairs(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    int *valuePtr = (int *)(record + offset);
-    int n;
-    int result;
-    KernPairs *kp;
-
-    assert(*valuePtr == 0);
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], &n) != TCL_OK) {
- 	ParserError(parserPtr, "can't convert \"%s\" to integer.", 
-		    parserPtr->argv[1]);
-    }
-    n++;
-    *valuePtr = n;
-    afmPtr->kernPairs = Blt_Calloc(n, sizeof(KernPairs));
-    assert(afmPtr->kernPairs);
-    kp = afmPtr->kernPairs;
-    do {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartKernPairs");
-	}
-	result = ParseLine(parserPtr, kernPairsSpecs, nKernPairsSpecs, kp);
-	kp++;
-    } while (result == TCL_OK);
-    if (result == TCL_CONTINUE) {
-	assert((kp - afmPtr->kernPairs) == *valuePtr);
-	return TCL_OK;			/* Found EndKernPairs */
-    }
-    return TCL_ERROR;
-}
-
-
-static ParserSpec kernDataSpecs[] = {
-    { "EndKernData",	 1, ParseEndSection,      0		  },
-    { "StartKernPairs",	 2, ParseStartKernPairs,  FM(nKernPairs)  },
-    { "StartKernPairs0", 2, ParseStartKernPairs,  FM(nKernPairs)  },
-    { "StartKernPairs1", 2, ParseStartKernPairs,  FM(nKernPairs)  },
-    { "StartTrackKern",	 2, ParseStartTrackKern,  FM(nTrackKern)  },
-};
-static int nKernDataSpecs = sizeof(kernDataSpecs) / sizeof(ParserSpec);
-
-static int
-ParseStartKernData(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    int result;
-
-    do {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartKernPairs");
-	}
-	result = ParseLine(parserPtr, kernDataSpecs, nKernDataSpecs, afmPtr);
-    } while (result == TCL_OK);
-    if (result == TCL_CONTINUE) {
-	return TCL_OK;			/* Found EndKernData */
-    }
-    return TCL_ERROR;
-}
-
-
-static int
-ParseLigature(Parser *parserPtr, char *record, int offset)
-{
-#ifdef notdef
-    CharMetrics *cmPtr = (CharMetrics *)record;
-    int successor;
-
-    cmPtr->ligature = TRUE;
-    successor = LookupSymbol(parserPtr->afmPtr, parserPtr->argv[1]);
-    ligPtr = NewLigature(cmPtr->index, successor);
-    ligPtr->name = Blt_Strdup(parserPtr->argv[2]);
-#endif
-    return TCL_OK;
-}
-
-static ParserSpec charMetricsSpecs[] = {
-    { "B",		5, ParseBBox,	    CM(bbox)	    },
-    { "C",		2, ParseInt,	    CM(index)	    },
-    { "CH",		2, ParseHex,	    CM(index)	    },
-    { "EndCharMetrics",	1, ParseEndSection, 0		    },
-    { "L",		3, ParseLigature,   CM(hasLigature) },
-    { "N",		2, ParseName,	    CM(name)	    },
-    { "VV",		3, ParsePoint,      CM(vVector)     },
-    { "W",		3, ParsePoint,      CM(w)           },
-    { "W0",		3, ParsePoint,      CM(w)           },
-    { "W1",		3, ParsePoint,      CM(w)           },
-    { "W0X",		2, ParseNumber,     CM(w.x)	    },
-    { "W0Y",		2, ParseNumber,     CM(w.y)	    },
-    { "W1X",		2, ParseNumber,     CM(w.x)	    },
-    { "W1Y",		2, ParseNumber,     CM(w.y)	    },
-    { "WX",		2, ParseNumber,     CM(w.x)	    },
-    { "WY",		2, ParseNumber,     CM(w.y)	    }
-};
-static int nCharMetricsSpecs = sizeof(charMetricsSpecs) / sizeof(ParserSpec);
-
-static int
-ParseStartCharMetrics(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    int *valuePtr = (int *)(record + offset);
-    int count;
-    int i;
-
-    assert(*valuePtr == 0);
-    if (Tcl_GetInt(NULL, parserPtr->argv[1], &i) != TCL_OK) {
-	ParserError(parserPtr, "can't convert \"%s\" to integer.", 
-		    parserPtr->argv[1]);
-    }
-    i++;
-    *valuePtr = i;
-    for(i = 0; i < 256; i++) {
-	afmPtr->metrics[i].index = -1;
-    }
-    count = 0;
-    for (;;) {
-	int result;
-	CharMetrics cm;
-	const char *p;
-
-	result = GetLine(parserPtr);
-	if (result == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartCharMetrics");
-	}
-	memset(&cm, 0, sizeof(CharMetrics));
-	for(p = strtok(Tcl_DStringValue(&parserPtr->lastLine), ";"); p != NULL; 
-	    p = strtok(NULL, ";")) {
-	    SplitLine(parserPtr, p);
-	    if (parserPtr->argc == 0) {
-		continue;
-	    }
-	    result = ParseLine(parserPtr, charMetricsSpecs, nCharMetricsSpecs, 
-			       &cm);
-	    if (result != TCL_OK) {
-		break;
-	    }
-	}
-	count++;
-	if (cm.index != -1) {
-	    if (cm.name != NULL) {
-		UpdateSymbol(parserPtr->afmPtr, cm.index, cm.name);
-	    }
-	    afmPtr->metrics[cm.index] = cm;
-	}
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	if (result == TCL_CONTINUE) {
-	    assert(count == *valuePtr);
-	    return TCL_OK;		/* Found EndCharMetrics */
-	}
-    }
-    return TCL_ERROR;
-}
-
-static ParserSpec fontMetricsSpecs[] = {
-    { "Ascender",	    2, ParseNumber,	      FM(ascender)  	     }, 
-    { "CapHeight",	    2, ParseNumber,	      FM(capHeight)	     },
-    { "CharWidth",	    3, ParsePoint,	      FM(charWidth)	     },
-    { "CharacterSet",	    0, ParseString,	      FM(characterSet)       },
-    { "Characters",	    2, ParseInt,	      FM(characters)	     },
-    { "Comment",	    0, NULL,		      FM(comment)	     },
-    { "Copyright",	    0, NULL,		      FM(copyright)	     },
-    { "Descender",	    2, ParseNumber,	      FM(descender)	     },
-    { "EncodingScheme",	    0, ParseString,	      FM(encodingScheme)     },
-    { "EndFontMetrics",	    1, ParseEndSection,	      0		             },
-    { "EscChar",	    2, ParseInt,	      FM(escChar)	     },
-    { "FamilyName",	    0, ParseString,	      FM(familyName)	     },
-    { "FontBBox",	    5, ParseBBox,	      FM(fontBBox)	     },
-    { "FontName",	    0, ParseString,	      FM(fontName)	     },
-    { "FullName",	    0, ParseString,	      FM(fullName)	     },
-    { "IsBaseFont",	    2, ParseBoolean,          FM(isBaseFont)	     },
-    { "IsCIDFont",	    2, ParseBoolean,          FM(isCIDFont)	     },
-    { "IsFixedPitch",	    2, ParseBoolean,          FM(isFixedPitch)       },
-    { "IsFixedV",	    2, ParseBoolean,          FM(isFixedV)	     },
-    { "ItalicAngle",	    2, ParseNumber,	      FM(italicAngle)        },
-    { "MappingScheme",	    2, ParseInt,	      FM(mappingScheme)      },
-    { "MetricSets",	    2, ParseInt,	      FM(metricSets)         },
-    { "Notice",		    0, NULL,		      FM(notice)	     },
-    { "StartCharMetrics",   2, ParseStartCharMetrics, FM(nCharMetrics)       },
-    { "StartComposites",    2, ParseStartComposites,  FM(nComposites)        },
-    { "StartDirection",	    2, ParseStartDirection,   FM(nDirection)         },
-    { "StartKernData",	    1, ParseStartKernData,    0                      },
-    { "StdHW",		    2, ParseNumber,           FM(stdHW)              },
-    { "StdVW",		    2, ParseNumber,           FM(stdVW)              },
-    { "UnderlinePosition",  2, ParseNumber,           FM(underlinePosition)  },
-    { "UnderlineThickness", 2, ParseNumber,           FM(underlineThickness) },
-    { "VVector",	    2, ParsePoint,            FM(vVector)            },
-    { "Version",	    0, ParseString,           FM(version)            },
-    { "Weight",		    0, ParseString,           FM(weight)             },
-    { "XHeight",	    2, ParseNumber,           FM(xHeight)            }
-};
-static int nFontMetricsSpecs = sizeof(fontMetricsSpecs) / sizeof(ParserSpec);
-
-static int 
-ParseStartFontMetrics(Parser *parserPtr, char *record, int offset)
-{
-    AdobeFontMetrics *afmPtr = (AdobeFontMetrics *)record;
-    const char **versionPtr = (const char **)(record + offset);
-    int result;
-
-    assert(*versionPtr == NULL);
-    *versionPtr = Blt_Strdup(parserPtr->argv[1]);
-    do {
-	if (SplitNextLine(parserPtr) == TCL_RETURN) {
-	    ParserError(parserPtr, "unexpected EOF in StartFontMetrics");
-	}
-	result = ParseLine(parserPtr, fontMetricsSpecs, nFontMetricsSpecs,
-			   afmPtr);
-    } while (result == TCL_OK);
-    if (result == TCL_CONTINUE) {
-	return TCL_OK;			/* Found EndFontMetrics */
-    }
-    return TCL_ERROR;
-}
-
-static ParserSpec afmSpecs[] = {
-    { "StartFontMetrics", 2, ParseStartFontMetrics, FM(afmVersion)  },
-};
-static int nAfmSpecs = sizeof(afmSpecs) / sizeof(ParserSpec);
-
-static AdobeFontMetrics *
-ParseAdobeFontMetricsFile(Tcl_Interp *interp, const char *fileName)
-{
-    AdobeFontMetrics *afmPtr;
-    Parser *parserPtr;
-    int result;
-
-    afmPtr = Blt_Calloc(1, sizeof(AdobeFontMetrics));
-    assert(afmPtr);
-    parserPtr = NewParser(afmPtr, fileName);
-    if (parserPtr == NULL) {
-	Blt_Free(afmPtr);
-	return NULL;
-    }
-    /* Set up jump for errors. */
-    if (setjmp(parserPtr->jmpbuf)) {
-	fprintf(stderr, "%s\n", Tcl_DStringValue(&parserPtr->errors));
-	DestroyParser(parserPtr);
-	DestroyAdobeFontMetrics(afmPtr);
-	return NULL;
-    }
-    for (;;) {
-	result = SplitNextLine(parserPtr);
-	if (result == TCL_RETURN) {
-	    break;
-	}
-	result = ParseLine(parserPtr, afmSpecs, nAfmSpecs, afmPtr);
-    }
-    DestroyParser(parserPtr);
-    if (result != TCL_RETURN) {
-	DestroyAdobeFontMetrics(afmPtr);
-	return NULL;
-    }
-    BuildKernPairsTable(afmPtr);
-    return afmPtr;
-}
-
-typedef struct {
-    const char *alias;
-    const char *fontName;
-} FontMap;
-
-static FontMap psFontMap[] =
-{
-    { "Arial",		        "Helvetica"	   },
-    { "AvantGarde",             "AvantGarde"       },
-    { "Bookman",                "Bookman"          },
-    { "Courier New",            "Courier"          },
-    { "Courier",                "Courier"          },
-    { "Geneva",                 "Helvetica"        },
-    { "Helvetica",              "Helvetica"        },
-    { "Mathematica1",		"Helvetica"	   },
-    { "Monaco",                 "Courier"          },
-    { "New Century Schoolbook", "NewCenturySchlbk" },
-    { "New York",               "Times"            },
-    { "Nimbus Roman No9 L"	"Times"		   },
-    { "Nimbus Sans L Condensed","Helvetica"        },
-    { "Nimbus Sans L",		"Helvetica"        },
-    { "Palatino",               "Palatino"         },
-    { "Standard Symbols L",	"Symbol"           },
-    { "Symbol",                 "Symbol"           },
-    { "Times New Roman",        "Times"            },
-    { "Times Roman",            "Times"            },
-    { "Times",                  "Times"            },
-    { "ZapfChancery",           "ZapfChancery"     },
-    { "ZapfDingbats",           "ZapfDingbats"     }
-};
-static int nPsFonts = sizeof(psFontMap) / sizeof(FontMap);
-/*
- *---------------------------------------------------------------------------
- *
- * LookupFontName --
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-LookupFontName(const char *string)
-{
-    char c;
-    int high, low;
-
-    low = 0;
-    high = nPsFonts - 1;
-    c = string[0];
-    while (low <= high) {
-	FontMap *mapPtr;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	mapPtr = psFontMap + median;
-
-	/* Test the first character */
-	compare = c - mapPtr->alias[0];
-	if (compare == 0) {
-	    /* Now test the entire string */
-	    compare = strcmp(string, mapPtr->alias);
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return mapPtr->fontName;
-	}
-    }
-    return "Helvetica";			/* Can't find font. */
-}
-
-static AdobeFontMetrics *
-GetAdobeFontMetrics(Tcl_Interp *interp, const char *psFontName) 
-{
-    AdobeFontMetrics *afmPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    if (!initialized) {
-	Blt_InitHashTable(&fontTable, BLT_STRING_KEYS);
-	initialized = TRUE;
-    }
-#ifdef notdef
-    fprintf(stderr, "Lookup for %s\n", psFontName);
-#endif
-    psFontName = LookupFontName(psFontName);
-#ifdef notdef
-    fprintf(stderr, "returning %s\n", psFontName);
-#endif
-    hPtr = Blt_CreateHashEntry(&fontTable, psFontName, &isNew);
-    if (isNew) {
-	const char *path;
-	Tcl_DString ds;
-
-	path = Tcl_GetVar(interp, "blt_library", TCL_GLOBAL_ONLY);
-	if (path == NULL) {
-	    Tcl_AppendResult(interp, "can't find \"blt_library\" variable", 
-			     (char *)NULL);
-	    Blt_DeleteHashEntry(&fontTable, hPtr);
-	    return NULL;
-	}
-	Tcl_DStringInit(&ds);
-	Tcl_DStringAppend(&ds, path, -1);
-	Tcl_DStringAppend(&ds, "/afm/", 5);
-	Tcl_DStringAppend(&ds, psFontName, -1);
-	Tcl_DStringAppend(&ds, ".afm", 4);
-	afmPtr = ParseAdobeFontMetricsFile(interp, Tcl_DStringValue(&ds));
-	Tcl_DStringFree(&ds);
-	if (afmPtr == NULL) {
-	    Blt_DeleteHashEntry(&fontTable, hPtr);
-	    return NULL;
-	}
-	Blt_SetHashValue(hPtr, afmPtr);
-	afmPtr->hashPtr = hPtr;
-    } else {
-	afmPtr = Blt_GetHashValue(hPtr);
-    }
-    return afmPtr;
-}
-
-static AdobeFontMetrics *
-GetAdobeFontMetricsFromFont(Blt_Font font) 
-{
-    AdobeFontMetrics *afmPtr;
-    Tcl_DString ds;
-    double pointSize;
-    Tcl_Interp *interp;
-
-    Tcl_DStringInit(&ds);
-    pointSize = Blt_PostscriptFontName(font, &ds);
-    interp = Blt_GetFontInterp(font);
-    afmPtr = GetAdobeFontMetrics(interp, Tcl_DStringValue(&ds));
-    Tcl_DStringFree(&ds);
-    if (afmPtr != NULL) {
-	afmPtr->pointSize = pointSize;
-	return afmPtr;
-    }
-    return NULL;
-}    
-
-int 
-Blt_Ps_GetFontMetrics(Blt_Font font, Blt_FontMetrics *fmPtr) 
-{
-    AdobeFontMetrics *afmPtr;
-
-    afmPtr = GetAdobeFontMetricsFromFont(font);
-    if (afmPtr == NULL) {
-	return TCL_ERROR;
-    }
-#ifndef notdef
-    fmPtr->ascent    = Points(afmPtr, afmPtr->ascender);
-#else
-    fmPtr->ascent    = Points(afmPtr, afmPtr->capHeight);
-#endif
-    fmPtr->descent   = Points(afmPtr, -afmPtr->descender);
-    fmPtr->linespace = Points(afmPtr, afmPtr->ascender - afmPtr->descender);
-#ifdef notdef
-    fprintf(stderr, "GetFontMetrics(%s), ascent=%d descent=%d linespace=%d\n",
-	    Blt_NameOfFont(font), fmPtr->ascent, fmPtr->descent, 
-	    fmPtr->linespace);
-#endif
-    return TCL_OK;
-}
-
-int 
-Blt_Ps_TextWidth(Blt_Font font, const char *string, int nBytes) 
-{
-    AdobeFontMetrics *afmPtr;
-    const char *p, *pend;
-    float width;
-
-#ifdef notdef
-    fprintf(stderr, "Ps_TextWidth(%s,\"%s\")\n", Blt_NameOfFont(font),  
-	    string);
-#endif
-    afmPtr = GetAdobeFontMetricsFromFont(font);
-    if (afmPtr == NULL) {
-	fprintf(stderr, "can't find font\n");
-	return -1;
-    }
-    width = 0;
-#ifdef notdef
-    fprintf(stderr, "string=\"%s\"\n", string);
-#endif
-    for (p = string, pend = string + nBytes; p < pend; /*empty*/) {
-	CharMetrics *cmPtr;
-	unsigned char c;
-	Tcl_UniChar ch;
-
-	p += Tcl_UtfToUniChar(p, &ch);
-	c = (unsigned char)(ch & 0xff);
-	cmPtr = afmPtr->metrics + c;
-	if (cmPtr->index < 0) {
-	    continue;			/* Ignore unencoded characters. */
-	}
-#ifdef notdef
-	fprintf(stderr, "width=%g, incr=%g, char=%c\n",
-		width, cmPtr->w.x, c);
-#endif
-	width += cmPtr->w.x;
-    }
-    {
-	/* Kerning */
-	unsigned char c1, c2;
-	Tcl_UniChar ch;
-
-	p = string;
-	p += Tcl_UtfToUniChar(string, &ch);
-	c1 = (unsigned char)(ch & 0xff);
-	while (p < pend) {
-	    p += Tcl_UtfToUniChar(p, &ch);
-	    c2 = (unsigned char)(ch & 0xff);
-	    if (afmPtr->metrics[c1].hasKernPair) {
-		KernPairs *kp;
-		
-		kp = GetKernPairs(afmPtr, c1, c2);
-		width += kp->x;
-	    }
-	    c1 = c2;
-	}
-    }
-#ifdef notdef
-    fprintf(stderr, "StringWidth of \"%s\" is %d (ps=%f)\n",
-	    string, Points(afmPtr, width), afmPtr->pointSize);
-#endif
-    return Points(afmPtr, width);
-}
-
-
-static int
-LoadOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    AdobeFontMetrics *afmPtr;
-
-    afmPtr = ParseAdobeFontMetricsFile(interp, Tcl_GetString(objv[2]));
-    if (afmPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static int
-DumpOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    AdobeFontMetrics *afmPtr;
-    const char *fileName;
-    int i;
-
-    fileName = Tcl_GetString(objv[2]);
-    afmPtr = ParseAdobeFontMetricsFile(interp, fileName);
-    if (afmPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (afmPtr->familyName != NULL) {
-	Tcl_AppendElement(interp, "familyName");
-	Tcl_AppendElement(interp, afmPtr->familyName);
-    }
-    if (afmPtr->fontName != NULL) {
-	Tcl_AppendElement(interp, "fontName");
-	Tcl_AppendElement(interp, afmPtr->fontName);
-    }
-    if (afmPtr->fullName != NULL) {
-	Tcl_AppendElement(interp, "fullName");
-	Tcl_AppendElement(interp, afmPtr->fullName);
-    }
-    if (afmPtr->version != NULL) {
-	Tcl_AppendElement(interp, "version");
-	Tcl_AppendElement(interp, afmPtr->version);
-    }
-    if (afmPtr->weight != NULL) {
-	Tcl_AppendElement(interp, "weight");
-	Tcl_AppendElement(interp, afmPtr->weight);
-    }
-    if (afmPtr->comment != NULL) {
-	Tcl_AppendElement(interp, "comment");
-	Tcl_AppendElement(interp, afmPtr->comment);
-    }
-    if (afmPtr->notice != NULL) {
-	Tcl_AppendElement(interp, "notice");
-	Tcl_AppendElement(interp, afmPtr->notice);
-    }
-    if (afmPtr->characterSet != NULL) {
-	Tcl_AppendElement(interp, "characterSet");
-	Tcl_AppendElement(interp, afmPtr->characterSet);
-    }
-    if (afmPtr->encodingScheme != NULL) {
-	Tcl_AppendElement(interp, "encodingScheme");
-	Tcl_AppendElement(interp, afmPtr->encodingScheme);
-    }
-    Tcl_AppendElement(interp, "underlinePosition");
-    Tcl_AppendElement(interp, FTOA(afmPtr->underlinePosition));
-    Tcl_AppendElement(interp, "underlineThickness");
-    Tcl_AppendElement(interp, FTOA(afmPtr->underlineThickness));
-    Tcl_AppendElement(interp, "italicAngle");
-    Tcl_AppendElement(interp, FTOA(afmPtr->italicAngle));
-    Tcl_AppendElement(interp, "capHeight");
-    Tcl_AppendElement(interp, FTOA(afmPtr->capHeight));
-    Tcl_AppendElement(interp, "xHeight");
-    Tcl_AppendElement(interp, FTOA(afmPtr->xHeight));
-    Tcl_AppendElement(interp, "ascender");
-    Tcl_AppendElement(interp, FTOA(afmPtr->ascender));
-    Tcl_AppendElement(interp, "descender");
-    Tcl_AppendElement(interp, FTOA(afmPtr->descender));
-
-    Tcl_AppendElement(interp, "isFixedPitch");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->isFixedPitch));
-    Tcl_AppendElement(interp, "isBaseFont");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->isBaseFont));
-    Tcl_AppendElement(interp, "isCIDFont");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->isCIDFont));
-    Tcl_AppendElement(interp, "isFixedV");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->isFixedV));
-    Tcl_AppendElement(interp, "nCharMetrics");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->nCharMetrics));
-    Tcl_AppendElement(interp, "nComposites");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->nComposites));
-    Tcl_AppendElement(interp, "nDirection");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->nDirection));
-    Tcl_AppendElement(interp, "nKernPairs");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->nKernPairs));
-    Tcl_AppendElement(interp, "nTrackKern");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->nTrackKern));
-    Tcl_AppendElement(interp, "escChar");
-    Tcl_AppendElement(interp, Blt_Itoa(afmPtr->escChar));
-    Tcl_AppendElement(interp, "vvector x");
-    Tcl_AppendElement(interp, FTOA(afmPtr->vVector.x));
-    Tcl_AppendElement(interp, "vvector y");
-    Tcl_AppendElement(interp, FTOA(afmPtr->vVector.y));
-    Tcl_AppendElement(interp, "stdHW");
-    Tcl_AppendElement(interp, FTOA(afmPtr->stdHW));
-    Tcl_AppendElement(interp, "stdVW");
-    Tcl_AppendElement(interp, FTOA(afmPtr->stdVW));
-    for (i = 0; i < 256; i++) {
-	if (afmPtr->metrics[i].index >= 0) {
-	    if (afmPtr->metrics[i].hasLigature) {
-		
-	    Tcl_AppendElement(interp, "index");
-	    Tcl_AppendElement(interp, "x");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].w.x));
-	    Tcl_AppendElement(interp, "y");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].w.y));
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].index));
-	    if (afmPtr->metrics[i].name != NULL) {
-		int code;
-		code = LookupSymbol(afmPtr, afmPtr->metrics[i].name);
-		if (code != afmPtr->metrics[i].index) {
-		fprintf(stderr, "index=%d, code=%d, name=%s\n", 
-			afmPtr->metrics[i].index, code, 
-			afmPtr->metrics[i].name);
-		}
-
-		Tcl_AppendElement(interp, "name");
-		Tcl_AppendElement(interp, afmPtr->metrics[i].name);
-	    }
-	    Tcl_AppendElement(interp, "llx");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].bbox.llx));
-	    Tcl_AppendElement(interp, "lly");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].bbox.lly));
-	    Tcl_AppendElement(interp, "urx");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].bbox.urx));
-	    Tcl_AppendElement(interp, "ury");
-	    Tcl_AppendElement(interp, FTOA(afmPtr->metrics[i].bbox.ury));
-	    }
-	}
-    }
-    DestroyAdobeFontMetrics(afmPtr);
-    return TCL_OK;
-}
-
-static Blt_OpSpec afmOps[] =
-{
-    {"dump",    1, DumpOp,  3, 3, "fileName",},
-    {"load",    1, LoadOp,  3, 3, "fileName",},
-};
-static int nAfmOps = sizeof(afmOps) / sizeof(Blt_OpSpec);
-
-
-static int
-AfmCmdProc(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nAfmOps, afmOps, BLT_OP_ARG1, 
-			    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-
-int
-Blt_AfmCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { 
-	"afm", AfmCmdProc, 
-    };
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-
-static int
-AfmStringWidthOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    AdobeFontMetrics *afmPtr;
-
-    afmPtr = ParseAdobeFontMetricsFile(interp, Tcl_GetString(objv[2]));
-    if (afmPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltPsInt.h b/blt3.0/src/bltPsInt.h
deleted file mode 100644
index 4b552c4..0000000
--- a/blt3.0/src/bltPsInt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/*
- * bltPsInt.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_PS_INT_H
-#define _BLT_PS_INT_H
-
-#include "bltPs.h"
-
-struct _Blt_Ps {
-    Tcl_Interp *interp;		/* Interpreter to report errors to. */
-
-    Tcl_DString dString;	/* Dynamic string used to contain the
-				 * PostScript generated. */
-    PageSetup *setupPtr;
-
-#define POSTSCRIPT_BUFSIZ	((BUFSIZ*2)-1)
-    /*
-     * Utility space for building strings.  Currently used to create
-     * PostScript output for the "postscript" command.
-     */
-    char scratchArr[POSTSCRIPT_BUFSIZ+1];
-};
-
-typedef struct _Blt_Ps PostScript;
-
-#endif /* BLT_PS_H */
diff --git a/blt3.0/src/bltRound.h b/blt3.0/src/bltRound.h
deleted file mode 100644
index e66b0fa..0000000
--- a/blt3.0/src/bltRound.h
+++ /dev/null
@@ -1,32 +0,0 @@
-
-#if (SIZEOF_FLOAT == 8)
-#define REAL64	float
-#else
-#define REAL64	double
-#endif	/* SIZE_VOID_P == 8 */
-
-#define DOUBLE_MAGIC		6755399441055744.0
-#define DEFAULT_CONVERSION	1
-#ifdef WORDS_BIGENDIAN
-#define IMAN 1
-#define IEXP 0
-#else
-#define IMAN 0
-#define IEXP 1
-#endif	/* WORDS_BIGENDIAN */
-
-static INLINE int 
-CRoundToInt(REAL64 val)
-{
-#if DEFAULT_CONVERSION==0
-    val += DOUBLE_MAGIC;
-#ifdef WORDS_BIGENDIAN
-    return ((int *)&val)[1];
-#else
-    return ((int *)&val)[0];
-#endif	/* WORD_BIGENDIAN */
-#else
-    return (int)(floor(val+.5));
-#endif	/* DEFAULT_CONVERSION */
-}
-
diff --git a/blt3.0/src/bltScrollbar.c b/blt3.0/src/bltScrollbar.c
deleted file mode 100644
index c270545..0000000
--- a/blt3.0/src/bltScrollbar.c
+++ /dev/null
@@ -1,1345 +0,0 @@
-
-/*
- * bltScrollbar.c --
- *
- *	This module implements a scrollbar widgets for the Tk toolkit.  A
- *	scrollbar displays a slider and two arrows; mouse clicks on features
- *	within the scrollbar cause scrolling commands to be invoked.
- *
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * SCCS: @(#) tkScrollbar.c 1.79 96/02/15 18:52:40
- */
-
-#include "bltInt.h"
-#ifndef NO_TKSCROLLBAR
-
-#include "bltBgStyle.h"
-
-#define NORMAL_BG	"#d9d9d9"
-#define ACTIVE_BG	"#ececec"
-#define SELECT_BG	"#c3c3c3"
-#define TROUGH		"#c3c3c3"
-#define INDICATOR	"#b03060"
-#define DISABLED	"#a3a3a3"
-
-/*
- * Defaults for scrollbars:
- */
-#define DEF_ACTIVE_BACKGROUND	ACTIVE_BG
-#define DEF_ACTIVE_BG_MONO	RGB_BLACK
-#define DEF_ACTIVE_RELIEF	"raised"
-#define DEF_ARROW_COLOR		"black" 
-#define DEF_DISABLED_ARROW_COLOR RGB_GREY50
-#define DEF_BACKGROUND		NORMAL_BG
-#define DEF_BG_MONO		RGB_WHITE
-#define DEF_BORDERWIDTH		"2"
-#define DEF_COMMAND		""
-#define DEF_CURSOR		""
-#define DEF_ELEMENT_BORDERWIDTH	"1"
-#define DEF_HIGHLIGHT		RGB_BLACK
-#define DEF_HIGHLIGHT_BG	NORMAL_BG
-#define DEF_HIGHLIGHT_WIDTH	"2"
-#define DEF_JUMP		"0"
-#define DEF_MIN_SLIDER_LENGTH	"12"
-#define DEF_ORIENT		"vertical"
-#define DEF_RELIEF		"sunken"
-#define DEF_REPEAT_DELAY	"300"
-#define DEF_REPEAT_INTERVAL	"100"
-#define DEF_SELECT_BACKGROUND	SELECT_BG
-#define DEF_TAKE_FOCUS		(char *)NULL
-#define DEF_TROUGH_COLOR	"grey" /*TROUGH*/
-#define DEF_TROUGH_MONO		RGB_WHITE
-#define DEF_WIDTH		"15"
-#define DEF_SELECT_RELIEF	"sunken"
-#define SB_WIDTH		15
-
-/*
- * A data structure of the following type is kept for each scrollbar widget
- * managed by this file:
- */
-
-typedef struct {
-    Tk_Window tkwin;			/* Window that embodies the scrollbar.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up.*/
-    Display *display;			/* Display containing widget.  Used,
-					 * among other things, so that
-					 * resources can be freed even after
-					 * tkwin has gone away. */
-    Tcl_Interp *interp;			/* Interpreter associated with
-					 * scrollbar. */
-    Tcl_Command widgetCmd;		/* Token for scrollbar's widget
-					 * command. */
-    char *orientation;			/* Orientation for window ("vertical"
-					 * or "horizontal"). */
-    int vertical;			/* Non-zero means vertical orientation
-					 * requested, zero means horizontal. */
-    int width;				/* Desired narrow dimension of
-					 * scrollbar, in pixels. */
-    char *command;			/* Command prefix to use when invoking
-					 * scrolling commands.  NULL means don't
-					 * invoke commands.  Malloc'ed. */
-    int commandSize;			/* Number of non-NULL bytes in
-					 * command. */
-    int repeatDelay;			/* How long to wait before
-					 * auto-repeating on scrolling actions
-					 * (in * ms). */
-    int repeatInterval;			/* Interval between autorepeats (in
-					 * ms). */
-    int jump;				/* Value of -jump option. */
-
-    /*
-     * Information used when displaying widget:
-     */
-    int borderWidth;			/* Width of 3-D borders. */
-    Blt_Background bg;			/* Used for drawing background (all flat
-					 * surfaces except for trough). */
-    Blt_Background activeBg;		/* For drawing backgrounds when active
-					 * (i.e.  when mouse is positioned
-					 * over element). */
-    Blt_Background selBg;
-    Blt_Background troughBg;		/* For drawing trough. */
-    GC copyGC;				/* Used for copying from pixmap onto
-					   screen. */
-    XColor *disabledArrowColor;		/* Used for drawing the arrow. */
-    XColor *arrowColor;			/* Used for drawing the arrow. */
-    int relief;				/* Indicates whether window as a whole
-					 * is raised, sunken, or flat. */
-    int highlightWidth;			/* Width in pixels of highlight to
-					 * draw around widget when it has the
-					 * focus.  <= 0 means don't draw a
-					 * highlight. */
-    XColor *highlightBgColorPtr;	/* Color for drawing traversal
-					 * highlight area when highlight is
-					 * off. */
-    XColor *highlightColorPtr;		/* Color for drawing traversal
-					 * highlight. */
-    int inset;				/* Total width of all borders,
-					 * including traversal highlight and
-					 * 3-D * border.  Indicates how much
-					 * interior stuff must be offset from
-					 * outside edges to leave room for
-					 * borders. */
-    int minSliderLength;		/* Minimum size of thumb. */
-    int elementBW;			/* Width of border to draw around
-					 * elements inside scrollbar (arrows
-					 * and * slider).  -1 means use
-					 * borderWidth. */
-    int arrowLength;			/* Length of arrows along long
-					 * dimension of scrollbar, including
-					 * space for a small gap between the
-					 * arrow and the slider.  Recomputed
-					 * on window size changes. */
-    int sliderFirst;			/* Pixel coordinate of top or left
-					 * edge of slider area, including
-					 * border. */
-    int sliderLast;			/* Coordinate of pixel just after
-					 * bottom or right edge of slider
-					 * area, including border. */
-    int activeField;			/* Names field to be displayed in
-					 * active colors, such as TOP_ARROW,
-					 * or 0 for no field. */
-    int activeRelief;			/* Value of -activeRelief option:
-					 * relief to use for active element. */
-    int selRelief;
-    int selField;			/* Names field to be displayed in
-					 * active colors, such as TOP_ARROW,
-					 * or 0 for no field. */
-   /*
-     * Information describing the application related to the scrollbar.  This
-     * information is provided by the application by invoking the "set" widget
-     * command.  This information can now be provided in two ways: the "old"
-     * form (totalUnits, windowUnits, firstUnit, and lastUnit), or the "new"
-     * form (firstFraction and lastFraction).  FirstFraction and lastFraction
-     * will always be valid, but the old-style information is only valid if
-     * the NEW_STYLE_COMMANDS flag is 0.
-     */
-
-    int totalUnits;			/* Total dimension of application, in
-					 * units.  Valid only if the
-					 * NEW_STYLE_COMMANDS flag isn't
-					 * set. */
-    int windowUnits;			/* Maximum number of units that can be
-					 * displayed in the window at once.
-					 * Valid * only if the
-					 * NEW_STYLE_COMMANDS flag isn't
-					 * set. */
-    int firstUnit;			/* Number of last unit visible in
-					 * application's window.  Valid only
-					 * if the NEW_STYLE_COMMANDS flag
-					 * isn't set. */
-    int lastUnit;			/* Index of last unit visible in
-					 * window.  Valid only if the
-					 * NEW_STYLE_COMMANDS flag isn't set. */
-    double firstFraction;		/* Position of first visible thing in
-					 * window, specified as a fraction
-					 * between 0 and 1.0. */
-    double lastFraction;		/* Position of last visible thing in
-					 * window, specified as a fraction
-					 * between 0 and 1.0. */
-    /*
-     * Miscellaneous information:
-     */
-    Tk_Cursor cursor;			/* Current cursor for window, or
-					 * None. */
-    char *takeFocus;			/* Value of -takefocus option; not
-					 * used in the C code, but used by
-					 * keyboard traversal scripts.
-					 * Malloc'ed, but may be * NULL. */
-    int flags;				/* Various flags;  see below for
-					 * definitions. */
-} Scrollbar;
-
-/*
- * Legal values for "activeField" field of Scrollbar structures.  These are
- * also the return values from the ScrollbarPosition procedure.
- */
-
-#define OUTSIDE		0
-#define TOP_ARROW	1
-#define TOP_GAP		2
-#define SLIDER		3
-#define BOTTOM_GAP	4
-#define BOTTOM_ARROW	5
-
-/*
- * Flag bits for scrollbars:
- *
- * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler
- *				has already been queued to redraw
- *				this window.
- * NEW_STYLE_COMMANDS:		Non-zero means the new style of commands
- *				should be used to communicate with the
- *				widget:  ".t yview scroll 2 lines", instead
- *				of ".t yview 40", for example.
- * GOT_FOCUS:			Non-zero means this window has the input
- *				focus.
- */
-
-#define REDRAW_PENDING		1
-#define NEW_STYLE_COMMANDS	2
-#define GOT_FOCUS		4
-
-/*
- * Minimum slider length, in pixels (designed to make sure that the slider
- * is always easy to grab with the mouse).
- */
-
-#define MIN_SLIDER_LENGTH	12
-
-/*
- * Information used for objv parsing.
- */
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"Foreground", DEF_ACTIVE_BACKGROUND, Blt_Offset(Scrollbar, activeBg),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"Foreground", DEF_ACTIVE_BG_MONO, Blt_Offset(Scrollbar, activeBg),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
-	DEF_ACTIVE_RELIEF, Blt_Offset(Scrollbar, activeRelief), 0},
-    {BLT_CONFIG_COLOR, "-arrowcolor", "arrowColor", "ArrowColor", 
-	DEF_ARROW_COLOR, Blt_Offset(Scrollbar, arrowColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BACKGROUND, Blt_Offset(Scrollbar, bg), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BG_MONO, Blt_Offset(Scrollbar, bg), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, Blt_Offset(Scrollbar, borderWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-command", "command", "Command",
-	DEF_COMMAND, Blt_Offset(Scrollbar, command),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CURSOR, Blt_Offset(Scrollbar, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-diabledarrowcolor", "disabledArrowColor", 
-	"DisabledArrowColor", DEF_DISABLED_ARROW_COLOR, 
-	Blt_Offset(Scrollbar, disabledArrowColor), 0},
-    {BLT_CONFIG_PIXELS, "-elementborderwidth", "elementBorderWidth",
-	"BorderWidth", DEF_ELEMENT_BORDERWIDTH,
-	Blt_Offset(Scrollbar, elementBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_HIGHLIGHT_BG,
-	Blt_Offset(Scrollbar, highlightBgColorPtr), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_HIGHLIGHT,
-	Blt_Offset(Scrollbar, highlightColorPtr), 0},
-    {BLT_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
-	"HighlightThickness",
-	DEF_HIGHLIGHT_WIDTH, Blt_Offset(Scrollbar, highlightWidth), 0},
-    {BLT_CONFIG_BOOLEAN, "-jump", "jump", "Jump",
-	DEF_JUMP, Blt_Offset(Scrollbar, jump), 0},
-    {BLT_CONFIG_PIXELS_POS, "-minsliderlength", "minSliderLength",
-	"MinSliderLength", DEF_MIN_SLIDER_LENGTH, 
-	Blt_Offset(Scrollbar, minSliderLength), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-orient", "orient", "Orient",
-	DEF_ORIENT, Blt_Offset(Scrollbar, orientation), 0},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_RELIEF, Blt_Offset(Scrollbar, relief), 0},
-    {BLT_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
-	DEF_REPEAT_DELAY, Blt_Offset(Scrollbar, repeatDelay), 0},
-    {BLT_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
-	DEF_REPEAT_INTERVAL, Blt_Offset(Scrollbar, repeatInterval), 0},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", DEF_SELECT_BACKGROUND, Blt_Offset(Scrollbar, selBg), 0},
-    {BLT_CONFIG_RELIEF, "-selectrelief", "selectRelief", "Relief", 
-	DEF_ACTIVE_RELIEF, Blt_Offset(Scrollbar, selRelief), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_TAKE_FOCUS, Blt_Offset(Scrollbar, takeFocus),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-troughcolor", "troughColor", "Background",
-	DEF_TROUGH_COLOR, Blt_Offset(Scrollbar, troughBg), 0},
-    {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Scrollbar, width), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-
-static void ComputeScrollbarGeometry(Scrollbar *scrollPtr);
-static int ConfigureScrollbar(Tcl_Interp *interp, Scrollbar *scrollPtr, 
-	int objc, Tcl_Obj *const *objv, int flags);
-static void DestroyScrollbar(DestroyData *memPtr);
-static void DisplayScrollbar(ClientData clientData);
-static void EventuallyRedraw(Scrollbar *scrollPtr);
-static void ScrollbarCmdDeletedProc(ClientData clientData);
-static void ScrollbarEventProc(ClientData clientData, XEvent *eventPtr);
-static int ScrollbarPosition(Scrollbar *scrollPtr, int x, int y);
-static int ScrollbarWidgetCmd(ClientData clientData, Tcl_Interp *, int objc, 
-	Tcl_Obj *const *objv);
-
-static Blt_BackgroundChangedProc BackgroundChangedProc;
-static Tcl_ObjCmdProc ScrollbarCmd;
-
-
-static const char *
-NameOfField(int field)
-{
-    switch (field) {
-    case BOTTOM_ARROW:	return "arrow2";
-    case BOTTOM_GAP:	return "trough2";
-    case SLIDER:	return "slider";
-    case TOP_ARROW:	return "arrow1";
-    case TOP_GAP:	return "trough1";
-    default:
-	return "???";
-    }
-}
-
-static int
-GetFieldFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *fieldPtr)
-{
-    char *string;
-    int length;
-    char c;
-
-    string  = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'a') && (strcmp(string, "arrow1") == 0)) {
-	*fieldPtr = TOP_ARROW;
-    } else if ((c == 'a') && (strcmp(string, "arrow2") == 0)) {
-	*fieldPtr = BOTTOM_ARROW;
-    } else if ((c == 's') && (strncmp(string, "slider", length) == 0)) {
-	*fieldPtr = SLIDER;
-    } else {
-	*fieldPtr = OUTSIDE;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarCmd --
- *
- *	This procedure is invoked to process the "scrollbar" TCL command.  See
- *	the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static int
-ScrollbarCmd(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Scrollbar *sp;
-    Tk_Window tkwin;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-	    Tcl_GetString(objv[0]), " pathName ?options?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), 
-	Tcl_GetString(objv[1]), (char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    /*
-     * Initialize fields that won't be initialized by ConfigureScrollbar, or
-     * which ConfigureScrollbar expects to have reasonable values
-     * (e.g. resource pointers).
-     */
-    sp = Blt_AssertCalloc(1, sizeof(Scrollbar));
-    sp->tkwin = tkwin;
-    sp->display = Tk_Display(tkwin);
-    sp->interp = interp;
-    sp->widgetCmd = Tcl_CreateObjCommand(interp,
-	Tk_PathName(sp->tkwin), ScrollbarWidgetCmd,
-	(ClientData)sp, ScrollbarCmdDeletedProc);
-    sp->relief = TK_RELIEF_FLAT;
-    sp->elementBW = 2;
-    sp->borderWidth = 1;
-    sp->selRelief = TK_RELIEF_SUNKEN;
-    sp->activeRelief = TK_RELIEF_RAISED;
-    sp->minSliderLength = MIN_SLIDER_LENGTH;
-    
-    sp->width = SB_WIDTH;
-
-    Tk_SetClass(sp->tkwin, "TkScrollbar");
-    Tk_CreateEventHandler(sp->tkwin, 
-	ExposureMask | StructureNotifyMask | FocusChangeMask,
-	ScrollbarEventProc, (ClientData)sp);
-    if (ConfigureScrollbar(interp, sp, objc - 2, objv + 2, 0) != TCL_OK) {
-	goto error;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-
-  error:
-    Tk_DestroyWindow(sp->tkwin);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarWidgetCmd --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to a widget managed by this module.  See the user documentation for
- *	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ScrollbarWidgetCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-		   Tcl_Obj *const *objv)
-{
-    Scrollbar *scrollPtr = clientData;
-    int result = TCL_OK;
-    int length;
-    int c;
-    char *string;
-    Tcl_CmdInfo cmdInfo;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-	    objv[0], " option ?arg arg ...?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * First time in this interpreter, invoke a procedure to initialize
-     * various bindings on the combomenu widget.  If the procedure doesn't
-     * already exist, source it from "$blt_library/scrollbar.tcl".  We
-     * deferred sourcing the file until now so that the variable $blt_library
-     * could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::TkScrollbar::ScrollButtonDown", 
-			    &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library scrollbar.tcl]";
-
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_Preserve((ClientData)scrollPtr);
-    string = Tcl_GetStringFromObj(objv[1], &length);
-    c = string[0];
-    if ((c == 'a') && (strncmp(string, "activate", length) == 0)) {
-	if (objc > 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " activate element\"", (char *)NULL);
-	    goto error;
-	}
-	if (objc == 2) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-			     NameOfField(scrollPtr->activeField), -1);
-	} else {
-	    GetFieldFromObj(interp, objv[2], &scrollPtr->activeField);
-	    EventuallyRedraw(scrollPtr);
-	}
-    } else if ((c == 'c') && (length >= 2) && 
-	       (strncmp(string, "cget", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " cget option\"", (char *)NULL);
-	    goto error;
-	}
-	result = Blt_ConfigureValueFromObj(interp, scrollPtr->tkwin, 
-		configSpecs, (char *)scrollPtr, objv[2], 0);
-    } else if ((c == 'c') && (length >= 2) && 
-	       (strncmp(string, "configure", length) == 0)) {
-	if (objc == 2) {
-	    result = Blt_ConfigureInfoFromObj(interp, scrollPtr->tkwin, 
-		configSpecs, (char *)scrollPtr, (Tcl_Obj *)NULL, 0);
-	} else if (objc == 3) {
-	    result = Blt_ConfigureInfoFromObj(interp, scrollPtr->tkwin, 
-		configSpecs, (char *)scrollPtr, objv[2], 0);
-	} else {
-	    result = ConfigureScrollbar(interp, scrollPtr, objc - 2, objv + 2,
-		BLT_CONFIG_OBJV_ONLY);
-	}
-    } else if ((c == 'd') && (strncmp(string, "delta", length) == 0)) {
-	int xDelta, yDelta, pixels, barWidth;
-	double fraction;
-
-	if (objc != 4) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " delta xDelta yDelta\"", (char *)NULL);
-	    goto error;
-	}
-	if ((Tcl_GetIntFromObj(interp, objv[2], &xDelta) != TCL_OK) || 
-	    (Tcl_GetIntFromObj(interp, objv[3], &yDelta) != TCL_OK)) {
-	    goto error;
-	}
-	if (scrollPtr->vertical) {
-	    pixels = yDelta;
-	    barWidth = Tk_Height(scrollPtr->tkwin) - 1
-		- 2 * (scrollPtr->arrowLength + scrollPtr->inset);
-	} else {
-	    pixels = xDelta;
-	    barWidth = Tk_Width(scrollPtr->tkwin) - 1
-		- 2 * (scrollPtr->arrowLength + scrollPtr->inset);
-	}
-	if (barWidth == 0) {
-	    fraction = 0.0;
-	} else {
-	    fraction = ((double)pixels / (double)barWidth);
-	}
-	Tcl_SetDoubleObj(Tcl_GetObjResult(interp), fraction);
-    } else if ((c == 'f') && (strncmp(string, "fraction", length) == 0)) {
-	int x, y, pos, barWidth;
-	double fraction;
-
-	if (objc != 4) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " fraction x y\"", (char *)NULL);
-	    goto error;
-	}
-	if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) || 
-	    (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	    goto error;
-	}
-	if (scrollPtr->vertical) {
-	    pos = y - (scrollPtr->arrowLength + scrollPtr->inset);
-	    barWidth = Tk_Height(scrollPtr->tkwin) - 1
-		- 2 * (scrollPtr->arrowLength + scrollPtr->inset);
-	} else {
-	    pos = x - (scrollPtr->arrowLength + scrollPtr->inset);
-	    barWidth = Tk_Width(scrollPtr->tkwin) - 1
-		- 2 * (scrollPtr->arrowLength + scrollPtr->inset);
-	}
-	if (barWidth == 0) {
-	    fraction = 0.0;
-	} else {
-	    fraction = ((double)pos / (double)barWidth);
-	}
-	if (fraction < 0.0) {
-	    fraction = 0.0;
-	} else if (fraction > 1.0) {
-	    fraction = 1.0;
-	}
-	Tcl_SetDoubleObj(Tcl_GetObjResult(interp), fraction);
-    } else if ((c == 'g') && (strncmp(string, "get", length) == 0)) {
-	if (objc != 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " get\"", (char *)NULL);
-	    goto error;
-	}
-	if (scrollPtr->flags & NEW_STYLE_COMMANDS) {
-	    Tcl_Obj *listObjPtr;
-
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewDoubleObj(scrollPtr->firstFraction));
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewDoubleObj(scrollPtr->lastFraction));
-	    Tcl_SetObjResult(interp, listObjPtr);
-	} else {
-	    Tcl_Obj *listObjPtr;
-
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewIntObj(scrollPtr->totalUnits));
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewIntObj(scrollPtr->windowUnits));
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewIntObj(scrollPtr->firstUnit));
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-		Tcl_NewIntObj(scrollPtr->lastUnit));
-	    Tcl_SetObjResult(interp, listObjPtr);
-	}
-    } else if ((c == 'i') && (strncmp(string, "identify", length) == 0)) {
-	int x, y, thing;
-
-	if (objc != 4) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " identify x y\"", (char *)NULL);
-	    goto error;
-	}
-	if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) || 
-	    (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	    goto error;
-	}
-	thing = ScrollbarPosition(scrollPtr, x, y);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), NameOfField(thing), -1);
-    } else if ((c == 's') && (strncmp(string, "set", length) == 0)) {
-	int totalUnits, windowUnits, firstUnit, lastUnit;
-
-	if (objc == 4) {
-	    double first, last;
-
-	    if ((Tcl_GetDoubleFromObj(interp, objv[2], &first) != TCL_OK) ||
-		(Tcl_GetDoubleFromObj(interp, objv[3], &last) != TCL_OK)) {
-		goto error;
-	    }
-	    if (first < 0) {
-		scrollPtr->firstFraction = 0;
-	    } else if (first > 1.0) {
-		scrollPtr->firstFraction = 1.0;
-	    } else {
-		scrollPtr->firstFraction = first;
-	    }
-	    if (last < scrollPtr->firstFraction) {
-		scrollPtr->lastFraction = scrollPtr->firstFraction;
-	    } else if (last > 1.0) {
-		scrollPtr->lastFraction = 1.0;
-	    } else {
-		scrollPtr->lastFraction = last;
-	    }
-	    scrollPtr->flags |= NEW_STYLE_COMMANDS;
-	} else if (objc == 6) {
-	    if (Tcl_GetIntFromObj(interp, objv[2], &totalUnits) != TCL_OK) {
-		goto error;
-	    }
-	    if (totalUnits < 0) {
-		totalUnits = 0;
-	    }
-	    if (Tcl_GetIntFromObj(interp, objv[3], &windowUnits) != TCL_OK) {
-		goto error;
-	    }
-	    if (windowUnits < 0) {
-		windowUnits = 0;
-	    }
-	    if (Tcl_GetIntFromObj(interp, objv[4], &firstUnit) != TCL_OK) {
-		goto error;
-	    }
-	    if (Tcl_GetIntFromObj(interp, objv[5], &lastUnit) != TCL_OK) {
-		goto error;
-	    }
-	    if (totalUnits > 0) {
-		if (lastUnit < firstUnit) {
-		    lastUnit = firstUnit;
-		}
-	    } else {
-		firstUnit = lastUnit = 0;
-	    }
-	    scrollPtr->totalUnits = totalUnits;
-	    scrollPtr->windowUnits = windowUnits;
-	    scrollPtr->firstUnit = firstUnit;
-	    scrollPtr->lastUnit = lastUnit;
-	    if (scrollPtr->totalUnits == 0) {
-		scrollPtr->firstFraction = 0.0;
-		scrollPtr->lastFraction = 1.0;
-	    } else {
-		scrollPtr->firstFraction = ((double)firstUnit) / totalUnits;
-		scrollPtr->lastFraction = ((double)(lastUnit + 1)) / totalUnits;
-	    }
-	    scrollPtr->flags &= ~NEW_STYLE_COMMANDS;
-	} else {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), 
-		" set firstFraction lastFraction\" or \"",
-		Tcl_GetString(objv[0]),
-		" set totalUnits windowUnits firstUnit lastUnit\"",
-		(char *)NULL);
-	    goto error;
-	}
-	ComputeScrollbarGeometry(scrollPtr);
-	EventuallyRedraw(scrollPtr);
-    } else if ((c == 's') && (strncmp(string, "select", length) == 0)) {
-	if (objc > 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " select element\"", (char *)NULL);
-	    goto error;
-	}
-	if (objc == 2) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-			     NameOfField(scrollPtr->selField), -1);
-	} else {
-	    GetFieldFromObj(interp, objv[2], &scrollPtr->selField);
-	    EventuallyRedraw(scrollPtr);
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
-	    "\": must be activate, cget, configure, delta, fraction, ",
-	    "get, identify, or set", (char *)NULL);
-	goto error;
-    }
-    Tcl_Release((ClientData)scrollPtr);
-    return result;
-
-  error:
-    Tcl_Release((ClientData)scrollPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyScrollbar --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- *	clean up the internal structure of a scrollbar at a safe time (when
- *	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the scrollbar is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyScrollbar(DestroyData *memPtr) /* Info about scrollbar widget. */
-{
-    Scrollbar *scrollPtr = (Scrollbar *)memPtr;
-
-    /*
-     * Free up all the stuff that requires special handling, then let
-     * Blt_FreeOptions handle all the standard option-related stuff.
-     */
-    if (scrollPtr->copyGC != None) {
-	Tk_FreeGC(scrollPtr->display, scrollPtr->copyGC);
-    }
-    Blt_FreeOptions(configSpecs, (char *)scrollPtr, scrollPtr->display, 0);
-    Blt_Free(scrollPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BackgroundChangedProc
- *
- *	Routine for background change notifications.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-BackgroundChangedProc(ClientData clientData)
-{
-    Scrollbar *scrollPtr = clientData;
-
-    if (scrollPtr->tkwin != NULL) {
-	EventuallyRedraw(scrollPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureScrollbar --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) a scrollbar
- *	widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as colors, border width, etc. get set
- *	for scrollPtr; old resources get freed, if there were any.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ConfigureScrollbar(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Scrollbar *scrollPtr,	/* Information about widget; may or
-				 * may not already have values for
-				 * some fields. */
-    int objc,			/* Number of valid entries in objv. */
-    Tcl_Obj *const *objv,	/* Arguments. */
-    int flags)			/* Flags to pass to
-				 * Blt_ConfigureWidget. */
-{
-    size_t length;
-    XGCValues gcValues;
-
-    if (Blt_ConfigureWidgetFromObj(interp, scrollPtr->tkwin, configSpecs,
-	    objc, objv, (char *)scrollPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * A few options need special processing, such as parsing the orientation
-     * or setting the background from a 3-D border.
-     */
-    length = strlen(scrollPtr->orientation);
-    if (strncmp(scrollPtr->orientation, "vertical", length) == 0) {
-	scrollPtr->vertical = 1;
-    } else if (strncmp(scrollPtr->orientation, "horizontal", length) == 0) {
-	scrollPtr->vertical = 0;
-    } else {
-	Tcl_AppendResult(interp, "bad orientation \"", scrollPtr->orientation,
-	    "\": must be vertical or horizontal", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    if (scrollPtr->command != NULL) {
-	scrollPtr->commandSize = strlen(scrollPtr->command);
-    } else {
-	scrollPtr->commandSize = 0;
-    }
-    if (scrollPtr->activeBg != NULL) {
-	Blt_SetBackgroundChangedProc(scrollPtr->activeBg, BackgroundChangedProc,
-		scrollPtr);
-    }
-    if (scrollPtr->bg != NULL) {
-	Blt_SetBackgroundChangedProc(scrollPtr->bg, BackgroundChangedProc,
-		scrollPtr);
-    }
-    Blt_SetBackgroundFromBackground(scrollPtr->tkwin, scrollPtr->bg);
-
-    if (scrollPtr->copyGC == None) {
-	gcValues.graphics_exposures = False;
-	scrollPtr->copyGC = Tk_GetGC(scrollPtr->tkwin, GCGraphicsExposures,
-	    &gcValues);
-    }
-    /*
-     * Register the desired geometry for the window (leave enough space for
-     * the two arrows plus a minimum-size slider, plus border around the whole
-     * window, if any).  Then arrange for the window to be redisplayed.
-     */
-
-    ComputeScrollbarGeometry(scrollPtr);
-    EventuallyRedraw(scrollPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayScrollbar --
- *
- *	This procedure redraws the contents of a scrollbar window.  It is
- *	invoked as a do-when-idle handler, so it only runs when there's
- *	nothing else for the application to do.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information appears on the screen.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DisplayScrollbar(ClientData clientData)	/* Information about window. */
-{
-    Blt_Background bg;
-    XColor *fg;
-    Pixmap pixmap;
-    Scrollbar *scrollPtr = clientData;
-    Tk_Window tkwin;
-    XPoint points[7];
-    int relief, width, elementBW;
-
-    scrollPtr->flags &= ~REDRAW_PENDING;
-    tkwin = scrollPtr->tkwin;
-    if ((tkwin == NULL) || !Tk_IsMapped(tkwin)) {
-	return;
-    }
-    if (scrollPtr->vertical) {
-	width = Tk_Width(tkwin) - 2 * scrollPtr->inset;
-    } else {
-	width = Tk_Height(tkwin) - 2 * scrollPtr->inset;
-    }
-    elementBW = scrollPtr->elementBW;
-    if (elementBW < 0) {
-	elementBW = scrollPtr->borderWidth;
-    }
-
-    /*
-     * In order to avoid screen flashes, this procedure redraws the scrollbar
-     * in a pixmap, then copies the pixmap to the screen in a single
-     * operation.  This means that there's no point in time where the on-sreen
-     * image has been cleared.
-     */
-
-    pixmap = Tk_GetPixmap(scrollPtr->display, Tk_WindowId(tkwin),
-	Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-
-    if (scrollPtr->highlightWidth != 0) {
-	GC gc;
-
-	if (scrollPtr->flags & GOT_FOCUS) {
-	    gc = Tk_GCForColor(scrollPtr->highlightColorPtr, pixmap);
-	} else {
-	    gc = Tk_GCForColor(scrollPtr->highlightBgColorPtr, pixmap);
-	}
-	Tk_DrawFocusHighlight(tkwin, gc, scrollPtr->highlightWidth, pixmap);
-    }
-    Blt_FillBackgroundRectangle(tkwin, pixmap, scrollPtr->troughBg,
-	scrollPtr->highlightWidth, scrollPtr->highlightWidth,
-	Tk_Width(tkwin) - 2 * scrollPtr->highlightWidth,
-	Tk_Height(tkwin) - 2 * scrollPtr->highlightWidth,
-	scrollPtr->borderWidth, scrollPtr->relief);
-
-    /*
-     * Draw the top or left arrow.  The coordinates of the polygon points
-     * probably seem odd, but they were carefully chosen with respect to X's
-     * rules for filling polygons.  These point choices cause the arrows to
-     * just fill the narrow dimension of the scrollbar and be properly
-     * centered.
-     */
-    if (scrollPtr->selField == TOP_ARROW) {
-	bg = scrollPtr->selBg;
-	relief = scrollPtr->selRelief;
-    } else if (scrollPtr->activeField == TOP_ARROW) {
-	bg = scrollPtr->activeBg;
-	relief = scrollPtr->activeRelief;
-    } else {
-	bg = scrollPtr->bg;
-	relief = TK_RELIEF_RAISED;
-    }
-    if (scrollPtr->vertical) {
-	points[0].x = scrollPtr->inset - 1;
-	points[0].y = scrollPtr->arrowLength + scrollPtr->inset - 1;
-	points[1].x = width + scrollPtr->inset;
-	points[1].y = points[0].y;
-	points[2].x = width / 2 + scrollPtr->inset;
-	points[2].y = scrollPtr->inset - 1;
-    } else {
-	points[0].x = scrollPtr->arrowLength + scrollPtr->inset - 1;
-	points[0].y = scrollPtr->inset - 1;
-	points[1].x = scrollPtr->inset;
-	points[1].y = width / 2 + scrollPtr->inset;
-	points[2].x = points[0].x;
-	points[2].y = width + scrollPtr->inset;
-    }
-    Blt_FillBackgroundRectangle(tkwin, pixmap, bg, scrollPtr->inset, 
-       scrollPtr->inset, width, width, elementBW, relief); 
-    
-    fg = (scrollPtr->firstFraction <= 0.0) 
-	? scrollPtr->disabledArrowColor : scrollPtr->arrowColor;
-    Blt_DrawArrow(scrollPtr->display, pixmap, fg,
-	scrollPtr->inset, scrollPtr->inset, width, width, elementBW, 
-	(scrollPtr->vertical) ? ARROW_UP : ARROW_LEFT);
-    /*
-     * Display the bottom or right arrow.
-     */
-    if (scrollPtr->selField == BOTTOM_ARROW) {
-	bg = scrollPtr->selBg;
-	relief = scrollPtr->selRelief;
-    } else if (scrollPtr->activeField == BOTTOM_ARROW) {
-	bg = scrollPtr->activeBg;
-	relief = scrollPtr->activeRelief;
-    } else {
-	bg = scrollPtr->bg;
-	relief = TK_RELIEF_RAISED;
-    }
-    if (scrollPtr->vertical) {
-	points[0].x = scrollPtr->inset;
-	points[0].y = Tk_Height(tkwin) - scrollPtr->arrowLength
-	    - scrollPtr->inset + 1;
-	points[1].x = width / 2 + scrollPtr->inset;
-	points[1].y = Tk_Height(tkwin) - scrollPtr->inset;
-	points[2].x = width + scrollPtr->inset;
-	points[2].y = points[0].y;
-    } else {
-	points[0].x = Tk_Width(tkwin) - scrollPtr->arrowLength
-	    - scrollPtr->inset + 1;
-	points[0].y = scrollPtr->inset - 1;
-	points[1].x = points[0].x;
-	points[1].y = width + scrollPtr->inset;
-	points[2].x = Tk_Width(tkwin) - scrollPtr->inset;
-	points[2].y = width / 2 + scrollPtr->inset;
-    }
-#ifdef notdef
-    Blt_FillBackgroundPolygon(tkwin, pixmap, bg, points, 3, elementBW,
-	relief);
-    }
-#else
-    Blt_FillBackgroundRectangle(tkwin, pixmap, bg, 
-		       Tk_Width(tkwin) - (width + scrollPtr->inset), 
-		       Tk_Height(tkwin) - (width + scrollPtr->inset),
-		       width, width, elementBW, relief); 
-    
-    fg = (scrollPtr->lastFraction >= 1.0) 
-	? scrollPtr->disabledArrowColor : scrollPtr->arrowColor;
-    Blt_DrawArrow(scrollPtr->display, pixmap, fg, 
-	Tk_Width(tkwin) - scrollPtr->inset - width, 
-	Tk_Height(tkwin) - scrollPtr->inset - width, 
-	width, width, elementBW, (scrollPtr->vertical) ? ARROW_DOWN : ARROW_RIGHT);
-#endif    
-    /*
-     * Display the slider.
-     */
-    if (scrollPtr->activeField == SLIDER) {
-	bg = scrollPtr->activeBg;
-	relief = TK_RELIEF_RAISED;
-    } else if (scrollPtr->activeField == SLIDER) {
-	bg = scrollPtr->activeBg;
-	relief = scrollPtr->activeRelief;
-    } else {
-	bg = scrollPtr->bg;
-	relief = TK_RELIEF_RAISED;
-    }
-    if (scrollPtr->vertical) {
-	Blt_FillBackgroundRectangle(tkwin, pixmap, bg, scrollPtr->inset, 
-		scrollPtr->sliderFirst, width, 
-		scrollPtr->sliderLast - scrollPtr->sliderFirst,
-		elementBW, relief);
-    } else {
-	Blt_FillBackgroundRectangle(tkwin, pixmap, bg, scrollPtr->sliderFirst, 
-		scrollPtr->inset, 
-		scrollPtr->sliderLast - scrollPtr->sliderFirst, width,
-		elementBW, relief);
-    }
-
-    /*
-     * Copy the information from the off-screen pixmap onto the screen, then
-     * delete the pixmap.
-     */
-
-    XCopyArea(scrollPtr->display, pixmap, Tk_WindowId(tkwin),
-	scrollPtr->copyGC, 0, 0, (unsigned)Tk_Width(tkwin),
-	(unsigned)Tk_Height(tkwin), 0, 0);
-    Tk_FreePixmap(scrollPtr->display, pixmap);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for various events on
- *	scrollbars.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollbarEventProc(
-    ClientData clientData,	/* Information about window. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    Scrollbar *scrollPtr = clientData;
-
-    if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
-	EventuallyRedraw(scrollPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (scrollPtr->tkwin != NULL) {
-	    scrollPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(scrollPtr->interp,scrollPtr->widgetCmd);
-	}
-	if (scrollPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayScrollbar, (ClientData)scrollPtr);
-	}
-	Tcl_EventuallyFree((ClientData)scrollPtr,
-	    (Tcl_FreeProc *)DestroyScrollbar);
-    } else if (eventPtr->type == ConfigureNotify) {
-	ComputeScrollbarGeometry(scrollPtr);
-	EventuallyRedraw(scrollPtr);
-    } else if (eventPtr->type == FocusIn) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    scrollPtr->flags |= GOT_FOCUS;
-	    if (scrollPtr->highlightWidth > 0) {
-		EventuallyRedraw(scrollPtr);
-	    }
-	}
-    } else if (eventPtr->type == FocusOut) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    scrollPtr->flags &= ~GOT_FOCUS;
-	    if (scrollPtr->highlightWidth > 0) {
-		EventuallyRedraw(scrollPtr);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarCmdDeletedProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollbarCmdDeletedProc(ClientData clientData)
-{
-    Scrollbar *scrollPtr = clientData;
-    Tk_Window tkwin = scrollPtr->tkwin;
-
-    /*
-     * This procedure could be invoked either because the window was destroyed
-     * and the command was then deleted (in which case tkwin is NULL) or
-     * because the command was deleted, and then this procedure destroys the
-     * widget.
-     */
-
-    if (tkwin != NULL) {
-	scrollPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeScrollbarGeometry --
- *
- *	After changes in a scrollbar's size or configuration, this procedure
- *	recomputes various geometry information used in displaying the
- *	scrollbar.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The scrollbar will be displayed differently.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ComputeScrollbarGeometry(Scrollbar *sp)	
-{
-    int width, fieldLength;
-
-    if (sp->highlightWidth < 0) {
-	sp->highlightWidth = 0;
-    }
-    sp->inset = sp->highlightWidth + sp->borderWidth;
-    width = (sp->vertical) ? Tk_Width(sp->tkwin) : Tk_Height(sp->tkwin);
-    sp->arrowLength = width - (2 * sp->inset + 1);
-    fieldLength = (sp->vertical ? Tk_Height(sp->tkwin) : 
-		   Tk_Width(sp->tkwin)) - 2 * (sp->arrowLength + sp->inset);
-    if (fieldLength < 0) {
-	fieldLength = 0;
-    }
-    sp->sliderFirst = (int)(fieldLength * sp->firstFraction);
-    sp->sliderLast = (int)(fieldLength * sp->lastFraction);
-
-    /*
-     * Adjust the slider so that some piece of it is always displayed in the
-     * scrollbar and so that it has at least a minimal width (so it can be
-     * grabbed with the mouse).
-     */
-    {
-	int minSliderLength, sliderLength;
-
-	minSliderLength = sp->minSliderLength;
-	if (minSliderLength > fieldLength) {
-	    minSliderLength = fieldLength;
-	}
-	sliderLength = sp->sliderLast - sp->sliderFirst;
-	if (sliderLength < minSliderLength) {
-	    fieldLength -= minSliderLength - sliderLength;
-	    sp->sliderFirst = (int)(fieldLength * sp->firstFraction);
-	    sp->sliderLast = sp->sliderFirst + minSliderLength;
-	} else {
-	    if (sp->sliderFirst > (fieldLength - 2 * sp->borderWidth)) {
-		sp->sliderFirst = fieldLength - 2 * sp->borderWidth;
-	    }
-	    if (sp->sliderFirst < 0) {
-		sp->sliderFirst = 0;
-	    }
-	    if (sp->sliderLast > fieldLength) {
-		sp->sliderLast = fieldLength;
-	    }
-	}
-    }
-    sp->sliderFirst += sp->arrowLength + sp->inset;
-    sp->sliderLast += sp->arrowLength + sp->inset;
-
-    /*
-     * Register the desired geometry for the window (leave enough space for
-     * the two arrows plus a minimum-size slider, plus border around the whole
-     * window, if any).  Then arrange for the window to be redisplayed.
-     */
-
-    if (sp->vertical) {
-	Tk_GeometryRequest(sp->tkwin, sp->width + 2 * sp->inset,
-	    2 * (sp->arrowLength + sp->borderWidth + sp->inset));
-    } else {
-	Tk_GeometryRequest(sp->tkwin, 
-		2 * (sp->arrowLength + sp->borderWidth + sp->inset), 
-		sp->width + 2 * sp->inset);
-    }
-    Tk_SetInternalBorder(sp->tkwin, sp->inset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollbarPosition --
- *
- *	Determine the scrollbar element corresponding to a given position.
- *
- * Results:
- *	One of TOP_ARROW, TOP_GAP, etc., indicating which element of the
- *	scrollbar covers the position given by (x, y).  If (x,y) is outside
- *	the scrollbar entirely, then OUTSIDE is returned.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ScrollbarPosition(
-    Scrollbar *scrollPtr,	/* Scrollbar widget record. */
-    int x, int y)		/* Coordinates within scrollPtr's 
-				 * window. */
-{
-    int length, width, tmp;
-
-    if (scrollPtr->vertical) {
-	length = Tk_Height(scrollPtr->tkwin);
-	width = Tk_Width(scrollPtr->tkwin);
-    } else {
-	tmp = x;
-	x = y;
-	y = tmp;
-	length = Tk_Width(scrollPtr->tkwin);
-	width = Tk_Height(scrollPtr->tkwin);
-    }
-
-    if ((x < scrollPtr->inset) || (x >= (width - scrollPtr->inset)) || 
-	(y < scrollPtr->inset) || (y >= (length - scrollPtr->inset))) {
-	return OUTSIDE;
-    }
-    /*
-     * All of the calculations in this procedure mirror those in
-     * DisplayScrollbar.  Be sure to keep the two consistent.
-     */
-
-    if (y < (scrollPtr->inset + scrollPtr->arrowLength)) {
-	return TOP_ARROW;
-    }
-    if (y < scrollPtr->sliderFirst) {
-	return TOP_GAP;
-    }
-    if (y < scrollPtr->sliderLast) {
-	return SLIDER;
-    }
-    if (y >= (length - (scrollPtr->arrowLength + scrollPtr->inset))) {
-	return BOTTOM_ARROW;
-    }
-    return BOTTOM_GAP;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Arrange for one or more of the fields of a scrollbar to be redrawn.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-EventuallyRedraw(Scrollbar *scrollPtr) /* Information about widget. */
-{
-    if ((scrollPtr->tkwin == NULL) || (!Tk_IsMapped(scrollPtr->tkwin))) {
-	return;
-    }
-    if ((scrollPtr->flags & REDRAW_PENDING) == 0) {
-	Tcl_DoWhenIdle(DisplayScrollbar, (ClientData)scrollPtr);
-	scrollPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-int
-Blt_ScrollbarCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "scrollbar", ScrollbarCmd, };
-
-    return Blt_InitCmd(interp, "::blt::tk", &cmdSpec);
-}
-
-#endif /* NO_TKSCROLLBAR */
diff --git a/blt3.0/src/bltScrollset.c b/blt3.0/src/bltScrollset.c
deleted file mode 100644
index ce84d23..0000000
--- a/blt3.0/src/bltScrollset.c
+++ /dev/null
@@ -1,1998 +0,0 @@
-
-/*
- * bltScrollset.c --
- *
- * This module implements a scrollset widget for the BLT toolkit.
- *
- *	Copyright 2006 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltBind.h"
-#include "bltImage.h"
-#include "bltPicture.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltHash.h"
-#include "bltBgStyle.h"
-#include "bltPainter.h"
-
-#define VPORTWIDTH(s)	(Tk_Width((s)->tkwin) - (s)->yScrollbarWidth)
-#define VPORTHEIGHT(s)	(Tk_Height((s)->tkwin) - (s)->xScrollbarHeight)
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-
-#define REDRAW_PENDING		(1<<0)	/* A redraw request is pending.  */
-#define LAYOUT_PENDING		(1<<1)	/* A request to recompute the layout of
-					 * the scrollbars and slave widget is
-					 * pending.  */
-#define UPDATE_PENDING		(1<<2)	/* A request to call the widget update
-					 * procedure because scrollbars or 
-					 * slave widget has been configured. */
-#define SCROLLX			(1<<3)	/* A request to set the X scrollbar is
-					 * pending. */
-#define SCROLLY			(1<<4)	/* A request to set the Y scrollbar is
-					 * pending. */
-#define SCROLL_PENDING		(SCROLLX|SCROLLY)
-
-#define XSCROLLBAR_PENDING	(1<<5)	/* A request to install a new
-					 * x-scrollbar widget is pending. */
-#define YSCROLLBAR_PENDING	(1<<6)	/* A request to install a new
-					 * y-scrollbar widget is pending. */
-#define SLAVE_PENDING		(1<<7)	/* A request to install a new slave
-					 * widget is pending.  */
-#define DISPLAY_X		(1<<8)	/* Display the x-scrollbar. */
-#define DISPLAY_Y		(1<<9)	/* Display the y-scrollbar. */
-#define SLAVE_XVIEW		(1<<10)	/* The slave widget has a "xview"
-					 * operation */
-#define SLAVE_YVIEW		(1<<11)	/* The slave widget has a "yview"
-					 * operation. */
-
-#define DEF_ANCHOR		"center"
-#define DEF_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_CURSOR		((char *)NULL)
-#define DEF_FILL		"both"
-#define DEF_HEIGHT		"0"
-#define DEF_IPADX		"0"
-#define DEF_IPADY		"0"
-#define DEF_PADX		"0"
-#define DEF_PADY		"0"
-#define DEF_WIDTH		"0"
-#define DEF_WINDOW		((char *)NULL)
-#define DEF_XSCROLLBAR		((char *)NULL)
-#define DEF_XSCROLLCOMMAND	((char *)NULL)
-#define DEF_XSCROLLINCREMENT	"2"
-#define DEF_XVIEWCOMMAND	((char *)NULL)
-#define DEF_YSCROLLBAR		((char *)NULL)
-#define DEF_YSCROLLCOMMAND	((char *)NULL)
-#define DEF_YSCROLLINCREMENT	"2"
-#define DEF_YVIEWCOMMAND	((char *)NULL)
-
-/*
- * Limits --
- *
- * 	Defines the bounding of a size (width or height) in the table.  It may
- * 	be related to the partition, entry, or table size.  The widget pointers
- * 	are used to associate sizes with the requested size of other widgets.
- */
-
-typedef struct {
-    int flags;				/* Flags indicate whether using
-					 * default values for limits or
-					 * not. See flags below. */
-    int max, min;			/* Values for respective limits. */
-    int nom;				/* Nominal starting value. */
-} Limits;
-
-typedef struct {
-    /*
-     * This works around a bug in the Tk API.  Under under Win32, Tk tries to
-     * read the widget record of toplevel windows (TopLevel or Frame widget), to
-     * get its menu name field.  What this means is that we must carefully
-     * arrange the fields of this widget so that the menuName field is at the
-     * same offset in the structure.
-     */
-
-    Tk_Window tkwin;			/* Window that embodies the frame.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up. */
-
-    Display *display;			/* Display containing widget.  Used,
-					 * among other things, so that
-					 * resources can * be freed even after
-					 * tkwin has gone away. */
-
-    Tcl_Interp *interp;			/* Interpreter associated with widget.
-					 * Used to delete widget command. */
-
-    Tcl_Command cmdToken;		/* Token for widget's command. */
-
-    Tcl_Obj *slaveObjPtr;		/* Name of the slave widget to be
-					 * embed into the widget window. */
-    Tk_Window slave;			/* Slave window to be managed by this
-					 * widget. */
-    Tk_Window shangle;
-
-    Limits reqSlaveWidth, reqSlaveHeight; /* Requested sizes for slave. */
-    int reqWidth, reqHeight;
-    Tk_Anchor anchor;			/* Anchor type: indicates how the
-					 * slave is positioned if extra space
-					 * is available in the widget */
-    Blt_Pad xPad;			/* Extra padding placed left and right
-					 * of the slave. */
-    Blt_Pad yPad;			/* Extra padding placed above and
-					 * below the slave */
-    Blt_Background bg;
-    int ixPad, iyPad;			/* Extra padding added to the interior
-					 * of the widget (i.e. adds to the
-					 * requested size of the widget) */
-    int fill;				/* Indicates how the widget should
-					 * fill the span of cells it
-					 * occupies. */
-    int slaveX, slaveY;			/* Origin of widget wrt container. */
-    int slaveWidth, slaveHeight;	/* Dimension of slave widget. */
-    unsigned int flags;
-    Tk_Cursor cursor;			/* Current cursor for window or
-					 * None. */
-
-    int xScrollUnits, yScrollUnits;	/* Unit of distance to move when
-					 * clicking on the scrollbar
-					 * button. */
-    /* Names of scrollbars to embed into the widget window. */
-    Tcl_Obj *xScrollbarObjPtr, *yScrollbarObjPtr;
-
-    /* Commands to control horizontal and vertical scrollbars. */
-    Tcl_Obj *xReqScrollCmdObjPtr, *yReqScrollCmdObjPtr;
-
-    Tcl_Obj *xScrollCmdObjPtr, *yScrollCmdObjPtr;
-
-    /* Commands to control slave's horizontal and vertical views. */
-    Tcl_Obj *xViewCmdObjPtr, *yViewCmdObjPtr;
-
-    int xOffset, yOffset;		/* Scroll offsets of viewport in
-					 * world. */ 
-    int worldWidth, worldHeight;	/* Dimension of entire menu. */
-    int cavityWidth, cavityHeight;	/* Dimension of entire menu. */
-
-    Tk_Window xScrollbar;		/* Horizontal scrollbar to be used if
-					 * necessary. If NULL, no x-scrollbar
-					 * is used. */
-    Tk_Window yScrollbar;		/* Vertical scrollbar to be used if
-					 * necessary. If NULL, no y-scrollbar
-					 * is used. */
-
-    short int xScrollbarWidth, xScrollbarHeight;
-    short int yScrollbarWidth, yScrollbarHeight;
-    short int shangleWidth, shangleHeight;
-    /*
-     * Scanning Information:
-     */
-    int scanAnchorX;			/* Horizontal scan anchor in screen
-					 * x-coordinates. */
-    int scanX;				/* x-offset of the start of the
-					 * horizontal scan in world
-					 * coordinates.*/
-    int scanAnchorY;			/* Vertical scan anchor in screen
-					 * y-coordinates. */
-    int scanY;				/* y-offset of the start of the
-					 * vertical scan in world
-					 * coordinates.*/
-    short int width, height;
-} Scrollset;
-
-static Blt_OptionParseProc ObjToLimits;
-static Blt_OptionPrintProc LimitsToObj;
-static Blt_CustomOption limitsOption =
-{
-    ObjToLimits, LimitsToObj, NULL, (ClientData)0
-};
-
-static Blt_ConfigSpec scrollsetSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",	DEF_ANCHOR, 
-	Blt_Offset(Scrollset, anchor), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BACKGROUND, Blt_Offset(Scrollset, bg), 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_CURSOR, 
-	Blt_Offset(Scrollset, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FILL, "-fill", "fill", "Fill", DEF_FILL, 
-	Blt_Offset(Scrollset, fill), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(Scrollset, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipadx", "iPadX", "IPadX", DEF_IPADX,
-	Blt_Offset(Scrollset, ixPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipady", "iPadY", "IPadY", DEF_IPADY,
-	Blt_Offset(Scrollset, iyPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-padx", "padX", "PadX", DEF_PADX, 
-	Blt_Offset(Scrollset, xPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", "padY", "PadY", DEF_PADY, 
-	Blt_Offset(Scrollset, yPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-reqheight", "reqHeight", "ReqHeight", (char *)NULL, 
-	Blt_Offset(Scrollset, reqSlaveHeight), 0, &limitsOption},
-    {BLT_CONFIG_CUSTOM, "-reqwidth", "reqSlaveWidth", "ReqWidth", (char *)NULL, 
-	Blt_Offset(Scrollset, reqSlaveWidth), 0, &limitsOption},
-    {BLT_CONFIG_OBJ, "-xscrollbar", "xScrollbar", "Scrollbar", DEF_XSCROLLBAR, 
-	Blt_Offset(Scrollset, xScrollbarObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-        DEF_XSCROLLCOMMAND, Blt_Offset(Scrollset, xReqScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-xscrollincrement", "xScrollIncrement",
-	"ScrollIncrement", DEF_XSCROLLINCREMENT, 
-	Blt_Offset(Scrollset, xScrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-xviewcommand", "xViewCommand", "ViewCommand",
-        DEF_XVIEWCOMMAND, Blt_Offset(Scrollset, xViewCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-yscrollbar", "yScrollbar", "Scrollbar", DEF_YSCROLLBAR, 
-	Blt_Offset(Scrollset, yScrollbarObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_OBJ, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
-        DEF_YSCROLLCOMMAND, Blt_Offset(Scrollset, yReqScrollCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-yscrollincrement", "yScrollIncrement",
-	"ScrollIncrement", DEF_YSCROLLINCREMENT, 
-         Blt_Offset(Scrollset, yScrollUnits),BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-yviewcommand", "yViewCommand", "ViewCommand",
-        DEF_YVIEWCOMMAND, Blt_Offset(Scrollset, yViewCmdObjPtr), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Scrollset, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-window", "window", "Window", DEF_WINDOW, 
-	Blt_Offset(Scrollset, slaveObjPtr), 
-        BLT_CONFIG_NULL_OK | BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Tk_GeomRequestProc ScrollsetGeometryProc;
-static Tk_GeomLostSlaveProc ScrollsetCustodyProc;
-static Tk_GeomMgr scrollsetMgrInfo = {
-    (char *)"scrollset",		/* Name of geometry manager used by
-					 * winfo. */
-    ScrollsetGeometryProc,		/* Procedure to for new geometry
-					 * requests. */
-    ScrollsetCustodyProc,		/* Procedure when scrollbar is taken
-					 * away. */
-};
-
-static Tcl_IdleProc DisplayScrollset;
-static Tcl_FreeProc DestroyScrollset;
-static Tk_EventProc WindowEventProc;
-static Tk_EventProc ScrollsetEventProc;
-static Tcl_ObjCmdProc ScrollsetInstCmdProc;
-static Tcl_CmdDeleteProc ScrollsetInstCmdDeletedProc;
-
-typedef int (ScrollsetCmdProc)(Scrollset *setPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Tells the Tk dispatcher to call the scrollset display routine at the
- *	next idle point.  This request is made only if the window is displayed
- *	and no other redraw request is pending.
- *
- * Results: None.
- *
- * Side effects:
- *	The window is eventually redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(Scrollset *setPtr) 
-{
-    if ((setPtr->tkwin != NULL) && !(setPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayScrollset, setPtr);
-	setPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLimits --
- *
- *	Converts the list of elements into zero or more pixel values which
- *	determine the range of pixel values possible.  An element can be in any
- *	form accepted by Tk_GetPixels. The list has a different meaning based
- *	upon the number of elements.
- *
- *	    # of elements:
- *
- *	    0 - the limits are reset to the defaults.
- *	    1 - the minimum and maximum values are set to this
- *		value, freezing the range at a single value.
- *	    2 - first element is the minimum, the second is the
- *		maximum.
- *	    3 - first element is the minimum, the second is the
- *		maximum, and the third is the nominal value.
- *
- *	Any element may be the empty string which indicates the default.
- *
- * Results:
- *	The return value is a standard TCL result.  The min and max fields
- *	of the range are set.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLimits(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Widget of table */
-    Tcl_Obj *objPtr,			/* New width list */
-    char *widgRec,			/* Widget record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Limits *limitsPtr = (Limits *)(widgRec + offset);
-    int objc;
-    int limits[3];
-    int limitsFlags;
-
-    /* Initialize limits to default values */
-    limits[2] = LIMITS_NOM;
-    limits[1] = LIMITS_MAX;
-    limits[0] = LIMITS_MIN;
-    limitsFlags = 0;
-
-    objc = 0;
-    if (objPtr != NULL) {
-	Tcl_Obj **objv;
-	int size;
-	int i;
-
-	if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (objc > 3) {
-	    Tcl_AppendResult(interp, "wrong # limits \"", 
-		Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	for (i = 0; i < objc; i++) {
-	    const char *string;
-
-	    string = Tcl_GetString(objv[i]);
-	    if (string[0] == '\0') {
-		continue;	/* Empty string: use default value */
-	    }
-	    limitsFlags |= (1 << i);
-	    if (Blt_GetPixelsFromObj(interp, tkwin, objv[i], PIXELS_ANY,
-				     &size) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if ((size < LIMITS_MIN) || (size > LIMITS_MAX)) {
-		Tcl_AppendResult(interp, "bad limits \"", Tcl_GetString(objPtr),
-				 "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    limits[i] = size;
-	}
-    }
-    /*
-    * Check the limits specified.  
-    */
-    switch (objc) {
-    case 1:
-	limitsFlags |= (LIMITS_MIN | LIMITS_MAX);
-	limits[1] = limits[0];		/* Set minimum and maximum to value */
-	break;
-
-    case 2:
-	if (limits[1] < limits[0]) {
-	    Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-		"\": min > max", (char *)NULL);
-	    return TCL_ERROR;		/* Minimum is greater than maximum */
-	}
-	break;
-
-    case 3:
-	if (limits[1] < limits[0]) {
-	    Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-			     "\": min > max", (char *)NULL);
-	    return TCL_ERROR;		/* Minimum is greater than maximum */
-	}
-	if ((limits[2] < limits[0]) || (limits[2] > limits[1])) {
-	    Tcl_AppendResult(interp, "nominal value \"", 
-			     Tcl_GetString(objPtr),
-			     "\" out of range", (char *)NULL);
-	    return TCL_ERROR;		/* Nominal is outside of range defined
-					 * by minimum and maximum */
-	}
-	break;
-    }
-    limitsPtr->min = limits[0];
-    limitsPtr->max = limits[1];
-    limitsPtr->nom = limits[2];
-    limitsPtr->flags = limitsFlags;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LimitsToObj --
- *
- *	Convert the limits of the pixel values allowed into a list.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LimitsToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Not used. */
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,			/* Row/column structure record */
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Limits *limitsPtr = (Limits *)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (limitsPtr->flags & LIMITS_MIN) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->min));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (limitsPtr->flags & LIMITS_MAX) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->max));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    if (limitsPtr->flags & LIMITS_NOM) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(limitsPtr->nom));
-    } else {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Blt_EmptyStringObj());
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetLimits --
- *
- *	Resets the limits to their default values.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static void
-ResetLimits(Limits *limitsPtr)		/* Limits to be imposed on the value */
-{
-    limitsPtr->flags = 0;
-    limitsPtr->min = LIMITS_MIN;
-    limitsPtr->max = LIMITS_MAX;
-    limitsPtr->nom = LIMITS_NOM;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given xy position is
- * 	in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |     x,y ---+
- *  		w   center   e      |     |
- *  		|            |      +-----+
- *  		sw --- s --- se
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TranslateAnchor(
-    int dx, int dy,			/* Difference between outer and inner
-					 * regions */
-    Tk_Anchor anchor,			/* Direction of the anchor */
-    int *xPtr, int *yPtr)
-{
-    int x, y;
-
-    x = y = 0;
-    switch (anchor) {
-    case TK_ANCHOR_NW:			/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:			/* Left center */
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SW:			/* Lower left corner */
-	y = dy;
-	break;
-    case TK_ANCHOR_N:			/* Top center */
-	x = (dx / 2);
-	break;
-    case TK_ANCHOR_CENTER:		/* Centered */
-	x = (dx / 2);
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_S:			/* Bottom center */
-	x = (dx / 2);
-	y = dy;
-	break;
-    case TK_ANCHOR_NE:			/* Upper right corner */
-	x = dx;
-	break;
-    case TK_ANCHOR_E:			/* Right center */
-	x = dx;
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SE:			/* Lower right corner */
-	x = dx;
-	y = dy;
-	break;
-    }
-    *xPtr = (*xPtr) + x;
-    *yPtr = (*yPtr) + y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedWidth --
- *
- *	Bounds a given width value to the limits described in the limit
- *	structure.  The initial starting value may be overridden by the nominal
- *	value in the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static INLINE int
-GetBoundedWidth(
-    int width,				/* Initial value to be constrained */
-    Limits *limitsPtr)			/* Limits to be imposed on the
-					 * value. */
-{
-    if (limitsPtr->flags & LIMITS_NOM) {
-	width = limitsPtr->nom;		/* Override initial value */
-    }
-    if (width < limitsPtr->min) {
-	width = limitsPtr->min;		/* Bounded by minimum value */
-    } 
-    if (width > limitsPtr->max) {
-	width = limitsPtr->max;		/* Bounded by maximum value */
-    }
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedHeight --
- *
- *	Bounds a given value to the limits described in the limit structure.
- *	The initial starting value may be overridden by the nominal value in
- *	the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static INLINE int
-GetBoundedHeight(
-    int height,				/* Initial value to be constrained */
-    Limits *limitsPtr)			/* Limits to be imposed on the
-					 * value. */
-{
-    if (limitsPtr->flags & LIMITS_NOM) {
-	height = limitsPtr->nom;	/* Override initial value */
-    }
-    if (height < limitsPtr->min) {
-	height = limitsPtr->min;	/* Bounded by minimum value */
-    } 
-    if (height > limitsPtr->max) {
-	height = limitsPtr->max;	/* Bounded by maximum value */
-    }
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetSlaveReqWidth --
- *
- *	Returns the width requested by the widget starting in the given entry.
- *	The requested space also includes any internal padding which has been
- *	designated for this widget.
- *
- *	The requested width of the widget is always bounded by the limits set
- *	in tePtr->reqWidth.
- *
- * Results:
- *	Returns the requested width of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static INLINE int
-GetSlaveReqWidth(Scrollset *setPtr)
-{
-    int width;
-
-    width = 2 * setPtr->ixPad;
-    if (setPtr->slave != NULL) {
-	width += Tk_ReqWidth(setPtr->slave);
-    }
-    width = GetBoundedWidth(width, &setPtr->reqSlaveWidth);
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetSlaveReqHeight --
- *
- *	Returns the height requested by the widget starting in the given entry.
- *	The requested space also includes any internal padding which has been
- *	designated for this widget.
- *
- *	The requested height of the widget is always bounded by the limits set
- *	in setPtr->reqSlaveHeight.
- *
- * Results:
- *	Returns the requested height of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static INLINE int
-GetSlaveReqHeight(Scrollset *setPtr)
-{
-    int height;
-
-    height = 2 * setPtr->iyPad;
-    if (setPtr->slave != NULL) {
-	height += Tk_ReqHeight(setPtr->slave);
-    }
-    height = GetBoundedHeight(height, &setPtr->reqSlaveHeight);
-    return height;
-}
-
-static void
-UnmanageWindow(Scrollset *setPtr, Tk_Window tkwin)
-{
-    Tk_DeleteEventHandler(tkwin, StructureNotifyMask, WindowEventProc, setPtr);
-    Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL, setPtr);
-    if (Tk_IsMapped(tkwin)) {
-	Tk_UnmapWindow(tkwin);
-    }
-}
-
-static void
-ManageWindow(Scrollset *setPtr, Tk_Window tkwin)
-{
-    Tk_CreateEventHandler(tkwin, StructureNotifyMask, WindowEventProc, setPtr);
-    Tk_ManageGeometry(tkwin, &scrollsetMgrInfo, setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InstallWindow --
- *
- *	Convert the string representation of a color into a XColor pointer.
- *
- * Results:
- *	The return value is a standard TCL result.  The color pointer is
- *	written into the widget record.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InstallWindow(
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Scrollset *setPtr,
-    Tcl_Obj *objPtr,			/* String representing scrollbar
-					 * window. */
-    Tk_Window *tkwinPtr)
-{
-    Tk_Window tkwin;
-
-    if (objPtr == NULL) {
-	Tcl_AppendResult(interp, "window name is NULL", (char *)NULL);
-	*tkwinPtr = NULL;
-	return TCL_ERROR;
-    }
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objPtr), setPtr->tkwin);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_Parent(tkwin) != setPtr->tkwin) {
-	Tcl_AppendResult(interp, "window \"", Tk_PathName(tkwin), 
-			 "\" must be a slave of scrollset.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    ManageWindow(setPtr, tkwin);
-    *tkwinPtr = tkwin;
-    return TCL_OK;
-}
-
-static void
-InstallXScrollbar(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;
-    Tcl_Interp *interp;
-
-    interp = setPtr->interp;
-    setPtr->flags &= ~XSCROLLBAR_PENDING;
-    if (setPtr->tkwin == NULL) {
-	return;				/* Widget has been destroyed. */
-    }
-    if (InstallWindow(interp, setPtr, setPtr->xScrollbarObjPtr, 
-		      &setPtr->xScrollbar) != TCL_OK) {
-	Tcl_BackgroundError(setPtr->interp);
-	return;
-    } 
-    if (setPtr->xScrollCmdObjPtr != NULL) {
-	Tcl_DecrRefCount(setPtr->xScrollCmdObjPtr);
-	setPtr->xScrollCmdObjPtr = NULL;
-    }
-    if (setPtr->xReqScrollCmdObjPtr != NULL) {
-	Tcl_IncrRefCount(setPtr->xReqScrollCmdObjPtr);
-	setPtr->xScrollCmdObjPtr = setPtr->xReqScrollCmdObjPtr;
-    } else {
-	Tcl_Obj *listObjPtr;
-
-	/* Defaults to "scrollbar set". */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, setPtr->xScrollbarObjPtr);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("set",3));
-	Tcl_IncrRefCount(listObjPtr);
-	setPtr->xScrollCmdObjPtr = listObjPtr;
-    }
-}
-
-static void
-InstallYScrollbar(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;
-    Tcl_Interp *interp;
-
-    interp = setPtr->interp;
-    setPtr->flags &= ~YSCROLLBAR_PENDING;
-    if (setPtr->tkwin == NULL) {
-	return;				/* Widget has been destroyed. */
-    }
-    if (InstallWindow(interp, setPtr, setPtr->yScrollbarObjPtr, 
-		      &setPtr->yScrollbar) != TCL_OK) {
-	Tcl_BackgroundError(setPtr->interp);
-	return;
-    }
-    if (setPtr->yScrollCmdObjPtr != NULL) {
-	Tcl_DecrRefCount(setPtr->yScrollCmdObjPtr);
-	setPtr->yScrollCmdObjPtr = NULL;
-    }
-    if (setPtr->yReqScrollCmdObjPtr != NULL) {
-	Tcl_IncrRefCount(setPtr->yReqScrollCmdObjPtr);
-	setPtr->yScrollCmdObjPtr = setPtr->yReqScrollCmdObjPtr;
-    } else {
-	Tcl_Obj *listObjPtr;
-
-	/* Defaults to "scrollbar set". */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, setPtr->yScrollbarObjPtr);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("set",3));
-	Tcl_IncrRefCount(listObjPtr);
-	setPtr->yScrollCmdObjPtr = listObjPtr;
-    }
-}
-
-
-static void
-InstallSlave(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;
-    Tcl_Interp *interp;
-    Tcl_Obj *cmdObjPtr;
-    Tcl_Obj **cmdv;
-    int cmdc;
-    int result;
-
-    interp = setPtr->interp;
-    setPtr->flags &= ~(SLAVE_PENDING | SLAVE_XVIEW | SLAVE_YVIEW);
-    if (setPtr->tkwin == NULL) {
-	return;				/* Widget has been destroyed. */
-    }
-    if (InstallWindow(interp, setPtr, setPtr->slaveObjPtr, &setPtr->slave) 
-	!= TCL_OK) {
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    /* Check if the slave widget has a "yview" operation. */
-    if (setPtr->yViewCmdObjPtr != NULL) {
-	cmdObjPtr = Tcl_DuplicateObj(setPtr->yViewCmdObjPtr);
-    } else {
-	cmdObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, cmdObjPtr, setPtr->slaveObjPtr);
-	Tcl_ListObjAppendElement(interp, cmdObjPtr,Tcl_NewStringObj("yview",5));
-    }
-    if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    result = Blt_GlobalEvalObjv(interp, cmdc, cmdv);
-    Tcl_ResetResult(interp);
-    Tcl_DecrRefCount(cmdObjPtr);
-    if (result == TCL_OK) {
-	setPtr->flags |= SLAVE_YVIEW;
-    }
-
-    /* Check if the slave widget has a "xview" operation. */
-    if (setPtr->xViewCmdObjPtr != NULL) {
-	cmdObjPtr = Tcl_DuplicateObj(setPtr->xViewCmdObjPtr);
-    } else {
-	cmdObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, cmdObjPtr, setPtr->slaveObjPtr);
-	Tcl_ListObjAppendElement(interp, cmdObjPtr,Tcl_NewStringObj("xview",5));
-    }
-    if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-	return;
-    }
-    result = Blt_GlobalEvalObjv(interp, cmdc, cmdv);
-    Tcl_ResetResult(interp);
-    Tcl_DecrRefCount(cmdObjPtr);
-    if (result == TCL_OK) {
-	setPtr->flags |= SLAVE_XVIEW;
-    }
-}
-
-static void
-UpdateScrollset(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;
-    Tcl_Interp *interp;
-
-    interp = setPtr->interp;
-    /* 
-     * Execute the initialization procedure on this widget.
-     */
-    setPtr->flags &= ~UPDATE_PENDING;
-    if (setPtr->tkwin == NULL) {
-	return;				/* Widget has been destroyed. */
-    }
-    if (Tcl_VarEval(interp, "::blt::Scrollset::ConfigureScrollbars ", 
-		Tk_PathName(setPtr->tkwin), (char *)NULL) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-}
-
-static void
-ComputeGeometry(Scrollset *setPtr)
-{
-    int cavityWidth, cavityHeight;
-    int dx, dy;
-    int slaveWidth, slaveHeight;
-    int x, y;
-    
-    cavityWidth  = Tk_Width(setPtr->tkwin);
-    cavityHeight = Tk_Height(setPtr->tkwin);
-    
-    slaveWidth = GetSlaveReqWidth(setPtr);
-    slaveHeight = GetSlaveReqHeight(setPtr);
-    setPtr->flags &= ~(DISPLAY_X | DISPLAY_Y);
-    if ((setPtr->flags & SLAVE_XVIEW) == 0) {
-	setPtr->worldWidth = slaveWidth;
-    }
-    if ((setPtr->flags & SLAVE_YVIEW) == 0) {
-	setPtr->worldHeight = slaveHeight;
-    }
-    setPtr->xScrollbarHeight = setPtr->yScrollbarWidth = 0;
-    if ((setPtr->xScrollbar != NULL) && (setPtr->worldWidth > cavityWidth)) {
-	setPtr->xScrollbarHeight = Tk_ReqHeight(setPtr->xScrollbar);
-	cavityHeight -= setPtr->xScrollbarHeight;
-	setPtr->flags |= DISPLAY_X;
-    } 
-    if ((setPtr->yScrollbar != NULL) && (setPtr->worldHeight > cavityHeight)) {
-	setPtr->yScrollbarWidth = Tk_ReqWidth(setPtr->yScrollbar);
-	cavityWidth -= setPtr->yScrollbarWidth;
-	setPtr->flags |= DISPLAY_Y;
-    }
-    if ((setPtr->xScrollbar != NULL) && (setPtr->xScrollbarHeight == 0) && 
-	(setPtr->worldWidth > cavityWidth)) {
-	setPtr->xScrollbarHeight = Tk_ReqHeight(setPtr->xScrollbar);
-	cavityHeight -= setPtr->xScrollbarHeight;
-	setPtr->flags |= DISPLAY_X;
-    }
-    if ((setPtr->yScrollbar != NULL) && (setPtr->yScrollbarWidth == 0) && 
-	(setPtr->worldHeight > cavityHeight)) {
-	setPtr->yScrollbarWidth = Tk_ReqWidth(setPtr->yScrollbar);
-	cavityWidth -= setPtr->yScrollbarWidth;
-	setPtr->flags |= DISPLAY_Y;
-    }
-
-    dx = dy = 0;
-    if ((cavityWidth - PADDING(setPtr->xPad)) > slaveWidth) {
-	cavityWidth -= PADDING(setPtr->xPad);
-	if (setPtr->fill & FILL_X) {
-	    slaveWidth = cavityWidth;
-	    if (slaveWidth > setPtr->reqSlaveWidth.max) {
-		slaveWidth = setPtr->reqSlaveWidth.max;
-	    }
-	} else {
-	    dx = (cavityWidth - slaveWidth);
-	}
-	setPtr->xOffset = 0;
-    } else if (setPtr->flags & SLAVE_XVIEW) {
-	slaveWidth = cavityWidth;
-    }
-    if ((cavityHeight - PADDING(setPtr->yPad)) > slaveHeight) {
-	cavityHeight -= PADDING(setPtr->yPad);
-	if (setPtr->fill & FILL_Y) {
-	    slaveHeight = cavityHeight;
-	    if (slaveHeight > setPtr->reqSlaveHeight.max) {
-		slaveHeight = setPtr->reqSlaveHeight.max;
-	    } 
-	} else {
-	    dy = (cavityHeight - slaveHeight);
-	}
-	setPtr->yOffset = 0;
-    } else if (setPtr->flags & SLAVE_YVIEW) {
-	slaveHeight = cavityHeight;
-    }
-    x = y = 0;
-    if ((dx > 0) || (dy > 0)) {
-	TranslateAnchor(dx, dy, setPtr->anchor, &x, &y);
-    }
-
-    setPtr->shangleHeight = setPtr->xScrollbarHeight;
-    setPtr->shangleWidth  = setPtr->yScrollbarWidth;
-    setPtr->yScrollbarHeight = cavityHeight - setPtr->xScrollbarHeight;
-    setPtr->xScrollbarWidth  = cavityWidth  - setPtr->yScrollbarWidth;
-	
-    if (setPtr->slave != NULL) {
-	if ((setPtr->xScrollbar == NULL) && (slaveWidth > cavityWidth)) {
-	    slaveWidth = cavityWidth;
-	    if (slaveWidth < setPtr->reqSlaveWidth.min) {
-		slaveWidth = setPtr->reqSlaveWidth.min;
-	    } 
-	}
-	if ((setPtr->yScrollbar == NULL) && (slaveHeight > cavityHeight)) {
-	    slaveHeight = cavityHeight;
-	    if (slaveHeight < setPtr->reqSlaveHeight.min) {
-		slaveHeight = setPtr->reqSlaveHeight.min;
-	    } 
-	}
-	if (cavityWidth > slaveWidth) {
-	    x += Tk_Changes(setPtr->slave)->border_width;
-	} else {
-	    x = Tk_Changes(setPtr->slave)->border_width;
-	}
-	if (cavityHeight > slaveHeight) {
-	    y += Tk_Changes(setPtr->slave)->border_width;
-	} else { 
-	    y = Tk_Changes(setPtr->slave)->border_width;
-	}
-    }
-    setPtr->slaveX = x;
-    setPtr->slaveY = y;
-    setPtr->slaveWidth = slaveWidth;
-    setPtr->slaveHeight = slaveHeight;
-    setPtr->cavityWidth = cavityWidth;
-    setPtr->cavityHeight = cavityHeight;
-    
-    /* Adjust the scroll offsets to put as much of the slave widget in view as
-     * possible. */
-    if ((setPtr->flags & SLAVE_YVIEW) == 0) {
-	if ((slaveHeight - setPtr->yOffset) < cavityHeight) {
-	    setPtr->yOffset = slaveHeight - cavityHeight;
-	}
-	setPtr->flags |= SCROLLY;
-    }
-    if ((setPtr->flags & SLAVE_XVIEW) == 0) {
-	if ((slaveWidth - setPtr->xOffset) < cavityWidth) {
-	    setPtr->xOffset = slaveWidth - cavityWidth;
-	}
-	setPtr->flags |= SCROLLX;
-    }
-    setPtr->flags &= ~LAYOUT_PENDING;
-}
-
-static int
-ConfigureScrollset(Tcl_Interp *interp, Scrollset *setPtr, int objc,
-		   Tcl_Obj *const *objv, int flags)
-{
-    int updateNeeded;
-
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, scrollsetSpecs, 
-	objc, objv, (char *)setPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* 
-     * Install the scrollbars and slave widget at a later time after the
-     * scrollset window has been created.  We defer installing the slave and
-     * scrollbars so the scrollbar widgets don't have to exist when they are
-     * specified by the -xscrollbar, -yscrollbar, and -window options
-     * respectively. The down-side is that errors messages will be backgrounded.
-     */
-    updateNeeded = FALSE;
-    if (Blt_ConfigModified(scrollsetSpecs, "-xscrollbar", (char *)NULL)) {
-	if (setPtr->xScrollbar != NULL) {
-	    UnmanageWindow(setPtr, setPtr->xScrollbar);
-	    setPtr->xScrollbar = NULL;
-	}
-	if ((setPtr->flags & XSCROLLBAR_PENDING) == 0) {
-	    Tcl_DoWhenIdle(InstallXScrollbar, setPtr);
-	    setPtr->flags |= XSCROLLBAR_PENDING;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (Blt_ConfigModified(scrollsetSpecs, "-yscrollbar", (char *)NULL)) {
-	if (setPtr->yScrollbar != NULL) {
-	    UnmanageWindow(setPtr, setPtr->yScrollbar);
-	    setPtr->yScrollbar = NULL;
-	}
-	if ((setPtr->flags & YSCROLLBAR_PENDING) == 0) {
-	    Tcl_DoWhenIdle(InstallYScrollbar, setPtr);
-	    setPtr->flags |= YSCROLLBAR_PENDING;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (Blt_ConfigModified(scrollsetSpecs, "-window", (char *)NULL)) {
-	if (setPtr->slave != NULL) {
-	    UnmanageWindow(setPtr, setPtr->slave);
-	    setPtr->slave = NULL;
-	}
-	if ((setPtr->flags & SLAVE_PENDING) == 0) {
-	    Tcl_DoWhenIdle(InstallSlave, setPtr);
-	    setPtr->flags |= SLAVE_PENDING;
-	}	    
-	updateNeeded = TRUE;
-    }
-    if (updateNeeded) {
-	if ((setPtr->flags & UPDATE_PENDING) == 0) {
-	    Tcl_DoWhenIdle(UpdateScrollset, setPtr);
-	    setPtr->flags |= UPDATE_PENDING;
-	}	    
-    }
-    return TCL_OK;
-}
-
-/* Widget Callbacks */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	comboentry widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollsetEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Scrollset *setPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(setPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	setPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(setPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (setPtr->tkwin != NULL) {
-	    setPtr->tkwin = NULL; 
-	}
-	if (setPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayScrollset, setPtr);
-	}
-	if (setPtr->flags & XSCROLLBAR_PENDING) {
-	    Tcl_CancelIdleCall(InstallXScrollbar, setPtr);
-	}
-	if (setPtr->flags & YSCROLLBAR_PENDING) {
-	    Tcl_CancelIdleCall(InstallYScrollbar, setPtr);
-	}
-	if (setPtr->flags & SLAVE_PENDING) {
-	    Tcl_CancelIdleCall(InstallSlave, setPtr);
-	}	    
-	if (setPtr->flags & UPDATE_PENDING) {
-	    Tcl_CancelIdleCall(UpdateScrollset, setPtr);
-	}	    
-	Tcl_EventuallyFree(setPtr, DestroyScrollset);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowEventProc --
- *
- *	This procedure is invoked by the Tk event handler when StructureNotify
- *	events occur in a scrollbar managed by the widget.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-WindowEventProc(
-    ClientData clientData,		/* Pointer to Entry structure for widget
-					 * referred to by eventPtr. */
-    XEvent *eventPtr)			/* Describes what just happened. */
-{
-    Scrollset *setPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(setPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(setPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if ((setPtr->yScrollbar != NULL) && 
-	    (eventPtr->xany.window == Tk_WindowId(setPtr->yScrollbar))) {
-	    setPtr->yScrollbar = NULL;
-	} else if ((setPtr->xScrollbar != NULL) && 
-		   (eventPtr->xany.window == Tk_WindowId(setPtr->xScrollbar))) {
-	    setPtr->xScrollbar = NULL;
-	} else if ((setPtr->slave != NULL) && 
-		   (eventPtr->xany.window == Tk_WindowId(setPtr->slave))) {
-	    setPtr->slave = NULL;
-	} else if ((setPtr->shangle != NULL) && 
-		   (eventPtr->xany.window == Tk_WindowId(setPtr->shangle))) {
-	    setPtr->shangle = NULL;
-	} 
-	setPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(setPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetCustodyProc --
- *
- * 	This procedure is invoked when a scrollbar has been stolen by another
- * 	geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
-  *	Arranges for the scrollset to have its layout re-arranged at the next
- *	idle point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ScrollsetCustodyProc(ClientData clientData, Tk_Window tkwin)
-{
-    Scrollset *setPtr = (Scrollset *)clientData;
-
-    if (tkwin == setPtr->yScrollbar) {
-	setPtr->yScrollbar = NULL;
-	setPtr->yScrollbarWidth = 0;
-	setPtr->flags &= ~DISPLAY_Y;
-    } else if (tkwin == setPtr->xScrollbar) {
-	setPtr->xScrollbar = NULL;
-	setPtr->xScrollbarHeight = 0;
-	setPtr->flags &= ~DISPLAY_X;
-    } else if (tkwin == setPtr->slave) {
-	setPtr->slave = NULL;
-	setPtr->slaveWidth = setPtr->slaveHeight = 0;
-	setPtr->flags &= ~(DISPLAY_X|DISPLAY_Y);
-    }
-    Tk_UnmaintainGeometry(tkwin, setPtr->tkwin);
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for scrollbars managed
- *	by the scrollset.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the scrollset to have its layout re-computed and
- *	re-arranged at the next idle point.
- *
- * -------------------------------------------------------------------------- 
-*/
-/* ARGSUSED */
-static void
-ScrollsetGeometryProc(ClientData clientData, Tk_Window tkwin)
-{
-    Scrollset *setPtr = (Scrollset *)clientData;
-
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-}
-
-/* Widget Operations */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm configure ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Scrollset *setPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    int result;
-
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, scrollsetSpecs, 
-		(char *)setPtr, (Tcl_Obj *)NULL,  0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, scrollsetSpecs, 
-		(char *)setPtr, objv[2], 0);
-    }
-    Tcl_Preserve(setPtr);
-    result = ConfigureScrollset(interp, setPtr, objc - 2, objv + 2, 
-		BLT_CONFIG_OBJV_ONLY);
-    Tcl_Release(setPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- * Results:
- *	Standard TCL result.
- *
- * Side effects:
- *	Commands may get excecuted; variables may get set; sub-menus may
- *	get posted.
- *
- *	.cm cget option
- *
- *---------------------------------------------------------------------------
- */
-static int
-CgetOp(Scrollset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, scrollsetSpecs,
-	(char *)setPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetOp --
- *
- *	Relays the "set" operation from the slave widget to scrollbar.  This
- *	routine checks to see if the first/last values are 0 and 1 respectively,
- *	indicating no scrollbar is necessary.  This is used for slave widgets
- *	with scrolling capabilities to determine when scrollbars are needed.
- *
- *	.ss set x first last 
- *	.ss set y first last 
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetOp(Scrollset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *scrollObjPtr;
-    const char *string;
-    unsigned int flag;
-    int useX;
-
-    string = Tcl_GetString(objv[2]);
-    flag = 0;
-    if ((string[0] == 'x') && (string[1] == '\0')) {
-	scrollObjPtr = setPtr->xScrollbarObjPtr;
-	useX = TRUE;
-	if (setPtr->flags & SLAVE_XVIEW) {
-	    flag = DISPLAY_X;
-	}
-    } else if ((string[0] == 'y') && (string[1] == '\0')) {
-	scrollObjPtr = setPtr->yScrollbarObjPtr;
-	useX = FALSE;
-	if (setPtr->flags & SLAVE_YVIEW) {
-	    flag = DISPLAY_Y;
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad scrollbar argument: should be x or y",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (flag != 0) { 
-	double first, last;
-
-	/* Examine the set values from the slave. */
-	if (Tcl_GetDoubleFromObj(interp, objv[3], &first) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Tcl_GetDoubleFromObj(interp, objv[4], &last) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((first <= 0.0) && (last >= 1.0)) {
-	    setPtr->flags &= ~flag;	/* Hide scrollbar. */
-	    if (useX) {
-		setPtr->worldWidth = 0;
-	    } else {
-		setPtr->worldHeight = 0;
-	    }
-	} else if (useX) {
-	    setPtr->worldWidth = 0;
-	    if ((last > first) && (Tk_Width(setPtr->slave) > 1)) {
-	    setPtr->worldWidth = 
-		(int)((double)Tk_Width(setPtr->slave) / (last - first));
-	    } 
-	    setPtr->flags |= DISPLAY_X; /* Display y-scrollbar. */
-	} else {
-	    setPtr->worldHeight = 0;
-	    if ((last > first) && (Tk_Height(setPtr->slave) > 1)) {
-	    setPtr->worldHeight = 
-		(int)((double)Tk_Height(setPtr->slave) / (last - first));
-	    }
-	    setPtr->flags |= DISPLAY_Y; /* Display y-scrollbar. */
-	}
-	setPtr->flags |= LAYOUT_PENDING;
-	EventuallyRedraw(setPtr);
-    }
-    if (scrollObjPtr != NULL) {
-	Tcl_Obj *cmdv[4];
-
-	/* Now relay the "set" command to the appropiate scrollbar. */
-	cmdv[0] = scrollObjPtr;
-	cmdv[1] = Tcl_NewStringObj("set", 3);
-	cmdv[2] = objv[3];
-	cmdv[3] = objv[4];
-	if (Blt_GlobalEvalObjv(interp, 4, cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-XviewOp(Scrollset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int w;
-
-    if (setPtr->flags & SLAVE_XVIEW) {
-	Tcl_Obj **cmdv;
-	Tcl_Obj *cmdObjPtr;
-	int cmdc;
-	int i;
-	int result;
-
-	/* The slave widget has a "xview" operation.  Simply relay the
-	 * information on to the slave widget by calling its "xview"
-	 * operation. */
-	if (setPtr->xViewCmdObjPtr != NULL) {
-	    cmdObjPtr = Tcl_DuplicateObj(setPtr->xViewCmdObjPtr);
-	} else {
-	    cmdObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, setPtr->slaveObjPtr);
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, 
-		Tcl_NewStringObj("xview", 5));
-	}
-	for (i = 2; i < objc; i++) {
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, objv[i]);
-	}
-	if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	result = Blt_GlobalEvalObjv(interp, cmdc, cmdv);
-	Tcl_DecrRefCount(cmdObjPtr);
-	return result;
-    }
-    w = VPORTWIDTH(setPtr);
-    if (objc == 2) {
-	double first, last;
-	Tcl_Obj *listObjPtr;
-
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	if (setPtr->worldWidth < 1) {
-	    first = 0.0, last = 1.0;
-	} else {
-	    first = (double)setPtr->xOffset / setPtr->worldHeight;
-	    last  = (double)(setPtr->xOffset + w) / setPtr->worldWidth;
-	    first = FCLAMP(first);
-	    last  = FCLAMP(last);
-	}
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(first));
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(last));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &setPtr->xOffset,
-	setPtr->worldWidth, w, setPtr->xScrollUnits, 
-	BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-
-static int
-YviewOp(Scrollset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int height;
-
-    if (setPtr->flags & SLAVE_YVIEW) {
-	Tcl_Obj **cmdv;
-	Tcl_Obj *cmdObjPtr;
-	int cmdc;
-	int i;
-	int result;
-
-	/* The slave widget has a "yview" operation.  Simply relay the
-	 * information on to the slave widget by calling its "yview"
-	 * operation. */
-	if (setPtr->yViewCmdObjPtr != NULL) {
-	    cmdObjPtr = Tcl_DuplicateObj(setPtr->yViewCmdObjPtr);
-	} else {
-	    cmdObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, setPtr->slaveObjPtr);
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, 
-				     Tcl_NewStringObj("yview", 5));
-	}
-	for (i = 2; i < objc; i++) {
-	    Tcl_ListObjAppendElement(interp, cmdObjPtr, objv[i]);
-	}
-	if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	result = Blt_GlobalEvalObjv(interp, cmdc, cmdv);
-	Tcl_DecrRefCount(cmdObjPtr);
-	return result;
-    }
-
-    height = VPORTHEIGHT(setPtr);
-    if (objc == 2) {
-	double fract;
-
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)setPtr->yOffset / setPtr->worldHeight;
-	Tcl_AppendElement(interp, Blt_Dtoa(interp, FCLAMP(fract)));
-	fract = (double)(setPtr->yOffset + height) / setPtr->worldHeight;
-	Tcl_AppendElement(interp, Blt_Dtoa(interp, FCLAMP(fract)));
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &setPtr->yOffset,
-	setPtr->worldHeight, height, setPtr->yScrollUnits, 
-	BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyScrollset --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyScrollset(DestroyData dataPtr)		/* Pointer to the widget
-						 * record. */
-{
-    Scrollset *setPtr = (Scrollset *)dataPtr;
-
-    if (setPtr->flags & REDRAW_PENDING) {
-	Tcl_CancelIdleCall(DisplayScrollset, setPtr);
-    }
-    if (setPtr->flags & XSCROLLBAR_PENDING) {
-	Tcl_CancelIdleCall(InstallXScrollbar, setPtr);
-    }
-    if (setPtr->flags & YSCROLLBAR_PENDING) {
-	Tcl_CancelIdleCall(InstallYScrollbar, setPtr);
-    }
-    if (setPtr->flags & SLAVE_PENDING) {
-	Tcl_CancelIdleCall(InstallSlave, setPtr);
-    }	    
-    if (setPtr->flags & UPDATE_PENDING) {
-	Tcl_CancelIdleCall(UpdateScrollset, setPtr);
-    }	    
-    Blt_FreeOptions(scrollsetSpecs, (char *)setPtr, setPtr->display, 0);
-    Tcl_DeleteCommandFromToken(setPtr->interp, setPtr->cmdToken);
-    Blt_Free(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewScrollset --
- *
- *---------------------------------------------------------------------------
- */
-static Scrollset *
-NewScrollset(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    Scrollset *setPtr;
-
-    setPtr = Blt_AssertCalloc(1, sizeof(Scrollset));
-
-    Tk_SetClass(tkwin, "Scrollset");
-    setPtr->tkwin = tkwin;
-    setPtr->display = Tk_Display(tkwin);
-    setPtr->interp = interp;
-    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    setPtr->xScrollUnits = 2;
-    setPtr->yScrollUnits = 2;
-    setPtr->anchor = TK_ANCHOR_CENTER;
-    setPtr->fill = FILL_BOTH;
-    ResetLimits(&setPtr->reqSlaveWidth);
-    ResetLimits(&setPtr->reqSlaveHeight);
-    Blt_SetWindowInstanceData(tkwin, setPtr);
-    return setPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetCmd --
- *
- * 	This procedure is invoked to process the "scrollset" command.  See the
- * 	user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec scrollsetOps[] =
-{
-    {"cget",        2, CgetOp,        3, 3, "option",},
-    {"configure",   2, ConfigureOp,   2, 0, "?option value?...",},
-    {"set",         1, SetOp,         5, 5, "x|y first last",},
-    {"xview",       1, XviewOp,       2, 5, 
-	"?moveto fract? ?scroll number what?",},
-    {"yview",       1, YviewOp,       2, 5, 
-	"?moveto fract? ?scroll number what?",},
-};
-
-static int nScrollsetOps = sizeof(scrollsetOps) / sizeof(Blt_OpSpec);
-
-typedef int (ScrollsetInstOp)(Scrollset *setPtr, Tcl_Interp *interp, int objc,
-			  Tcl_Obj *const *objv);
-
-static int
-ScrollsetInstCmdProc(
-    ClientData clientData,		/* Information about the widget. */
-    Tcl_Interp *interp,			/* Interpreter to report errors back
-					 * to. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument vector. */
-{
-    ScrollsetInstOp *proc;
-    Scrollset *setPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nScrollsetOps, scrollsetOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(setPtr);
-    result = (*proc) (setPtr, interp, objc, objv);
-    Tcl_Release(setPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetInstCmdDeletedProc --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ScrollsetInstCmdDeletedProc(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;	/* Pointer to widget record. */
-
-    if (setPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = setPtr->tkwin;
-	setPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollsetCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-ScrollsetCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Scrollset *setPtr;
-    Tk_Window tkwin;
-    unsigned int mask;
-    Tcl_CmdInfo cmdInfo;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), 
-		Tcl_GetString(objv[1]), (char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    setPtr = NewScrollset(interp, tkwin);
-    if (ConfigureScrollset(interp, setPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(setPtr->tkwin);
-	return TCL_ERROR;
-    }
-    mask = (ExposureMask | StructureNotifyMask);
-    Tk_CreateEventHandler(tkwin, mask, ScrollsetEventProc, setPtr);
-    setPtr->cmdToken = Tcl_CreateObjCommand(interp, Tk_PathName(tkwin), 
-	ScrollsetInstCmdProc, setPtr, ScrollsetInstCmdDeletedProc);
-
-    /* 
-     * The shangle is a small window covering the lower-right corner of the
-     * widget that is unobscurred by both the horizontal of vertical
-     * scrollbar. You can pack a widget into it or use "bind" to add
-     * shangle-like resize behaviors. 
-     */
-    setPtr->shangle = Tk_CreateWindow(interp, tkwin, "shangle", (char *)NULL);
-    Tk_CreateEventHandler(setPtr->shangle, mask, WindowEventProc, setPtr);
-
-    /*
-     * First time in this interpreter, load in a procedure to initialize various
-     * bindings on the scrollset widget.  We deferred sourcing the file until
-     * now so that the variable $blt_library can be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::Scrollset::ConfigureScrollbars", 
-		&cmdInfo)) {
-	if (Tcl_GlobalEval(interp, 
-		"source [file join $blt_library scrollset.tcl]") != TCL_OK) {
-	    char info[200];
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_SetObjResult(interp, objv[1]); 
-    return TCL_OK;
-}
-
-int
-Blt_ScrollsetCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "scrollset", ScrollsetCmd, };
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-static void
-DrawScrollset(Scrollset *setPtr)
-{
-    if (setPtr->slave != NULL) {
-	/*
-	 * If the widget is too small (i.e. it has only an external border)
-	 * then unmap it.
-	 */
-	if ((setPtr->slaveWidth < 1) || (setPtr->slaveHeight < 1)) {
-	    if (Tk_IsMapped(setPtr->slave)) {
-		if (setPtr->tkwin != Tk_Parent(setPtr->slave)) {
-		    Tk_UnmaintainGeometry(setPtr->slave, setPtr->tkwin);
-		}
-		Tk_UnmapWindow(setPtr->slave);
-	    }
-	} else {
-	    int x, y;
-
-	    x = setPtr->slaveX;
-	    y = setPtr->slaveY;
-	    if (setPtr->xOffset > 0) {
-		x -= setPtr->xOffset;
-	    }
-	    if (setPtr->yOffset > 0) {
-		y -= setPtr->yOffset;
-	    }
-
-	    if (setPtr->tkwin != Tk_Parent(setPtr->slave)) {
-		Tk_MaintainGeometry(setPtr->slave, setPtr->tkwin, x, y,
-				    setPtr->slaveWidth, setPtr->slaveHeight);
-	    } else {
-		if ((x != Tk_X(setPtr->slave)) || (y != Tk_Y(setPtr->slave)) ||
-		    (setPtr->slaveWidth != Tk_Width(setPtr->slave)) ||
-		    (setPtr->slaveHeight != Tk_Height(setPtr->slave))) {
-		    Tk_MoveResizeWindow(setPtr->slave, x, y, 
-			setPtr->slaveWidth, setPtr->slaveHeight);
-		}
-		if (!Tk_IsMapped(setPtr->slave)) {
-		    Tk_MapWindow(setPtr->slave);
-		}
-	    }
-	}
-    }
-
-    /* Manage the geometry of the scrollbars. */
-    
-    if (setPtr->yScrollbarWidth > 0) {
-	int x, y;
-	int yScrollbarHeight;
-
-	x = VPORTWIDTH(setPtr);
-	y = 0;
-	yScrollbarHeight = VPORTHEIGHT(setPtr);
-	if ((Tk_Width(setPtr->yScrollbar) != setPtr->yScrollbarWidth) ||
-	    (Tk_Height(setPtr->yScrollbar) != yScrollbarHeight) ||
-	    (x != Tk_X(setPtr->yScrollbar)) || 
-	    (y != Tk_Y(setPtr->yScrollbar))) {
-	    Tk_MoveResizeWindow(setPtr->yScrollbar, x, y, 
-		setPtr->yScrollbarWidth, yScrollbarHeight);
-	}
-	if (!Tk_IsMapped(setPtr->yScrollbar)) {
-	    Tk_MapWindow(setPtr->yScrollbar);
-	    XRaiseWindow(setPtr->display, Tk_WindowId(setPtr->yScrollbar));
-	}
-    } else if ((setPtr->yScrollbar != NULL) && 
-	       (Tk_IsMapped(setPtr->yScrollbar))) {
-	Tk_UnmapWindow(setPtr->yScrollbar);
-    }
-
-    if (setPtr->xScrollbarHeight > 0) {
-	int x, y;
-	int xScrollbarWidth;
-
-	x = 0;
-	y = VPORTHEIGHT(setPtr);
-	xScrollbarWidth = VPORTWIDTH(setPtr);
-	if ((Tk_Width(setPtr->xScrollbar) != xScrollbarWidth) ||
-	    (Tk_Height(setPtr->xScrollbar) != setPtr->xScrollbarHeight) ||
-	    (x != Tk_X(setPtr->xScrollbar)) || 
-	    (y != Tk_Y(setPtr->xScrollbar))) {
-	    Tk_MoveResizeWindow(setPtr->xScrollbar, x, y, xScrollbarWidth,
-		setPtr->xScrollbarHeight);
-	}
-	if (!Tk_IsMapped(setPtr->xScrollbar)) {
-	    Tk_MapWindow(setPtr->xScrollbar);
-	    XRaiseWindow(setPtr->display, Tk_WindowId(setPtr->xScrollbar));
-	}
-    } else if ((setPtr->xScrollbar != NULL) && 
-	       (Tk_IsMapped(setPtr->xScrollbar))) {
-	Tk_UnmapWindow(setPtr->xScrollbar);
-    }
-
-    if ((setPtr->yScrollbarWidth > 0) && (setPtr->xScrollbarHeight > 0)) {
-	int shangleX, shangleY;
-	int shangleWidth, shangleHeight;
-
-	shangleX = VPORTWIDTH(setPtr);
-	shangleY = VPORTHEIGHT(setPtr);
-	shangleWidth = setPtr->yScrollbarWidth;
-	shangleHeight = setPtr->xScrollbarHeight;
-	if ((shangleX != Tk_X(setPtr->shangle)) || 
-	    (shangleY != Tk_Y(setPtr->shangle)) ||
-	    (shangleWidth != Tk_Width(setPtr->shangle)) ||
-	    (shangleHeight != Tk_Height(setPtr->shangle))) {
-	    Tk_MoveResizeWindow(setPtr->shangle, shangleX, 
-		shangleY, shangleWidth, shangleHeight);
-	}
-	if (!Tk_IsMapped(setPtr->shangle)) {
-	    Tk_MapWindow(setPtr->shangle);
-	    XRaiseWindow(setPtr->display, Tk_WindowId(setPtr->shangle));
-	}
-	Blt_FillBackgroundRectangle(setPtr->shangle, 
-		Tk_WindowId(setPtr->shangle), setPtr->bg, 
-		0, 0, shangleWidth, shangleHeight, 0, TK_RELIEF_FLAT);
-
-    } else {
-	Tk_UnmapWindow(setPtr->shangle);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayScrollset --
- *
- *	This procedure is invoked to display a scrollset widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the menu.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayScrollset(ClientData clientData)
-{
-    Scrollset *setPtr = clientData;
-    int reqWidth, reqHeight;
-
-    setPtr->flags &= ~REDRAW_PENDING;
-    if (setPtr->tkwin == NULL) {
-	return;				/* Window destroyed (should not get
-					 * here) */
-    }
-#ifdef notdef
-    fprintf(stderr, "Calling DisplayScrollset(%s)\n", 
-	    Tk_PathName(setPtr->tkwin));
-#endif
-    /*
-     * The request size of the host container is always the requested 
-     * size of the slave widget without scrollbars. Only when the size
-     * of the window is less than the requested size to we add scrollbars
-     * (non-scrolling widgets).
-     */
-    reqWidth = (setPtr->reqWidth > 0) ? setPtr->reqWidth : 
-	GetSlaveReqWidth(setPtr);
-    reqHeight = (setPtr->reqHeight > 0) ? setPtr->reqHeight : 
-	GetSlaveReqHeight(setPtr);
-
-    if ((reqWidth != Tk_ReqWidth(setPtr->tkwin)) || 
-	(reqHeight != Tk_ReqHeight(setPtr->tkwin))) {
-	Tk_GeometryRequest(setPtr->tkwin, reqWidth, reqHeight);
-    }
-
-    if ((Tk_Width(setPtr->tkwin) <= 1) || (Tk_Height(setPtr->tkwin) <= 1)){
-	/* Don't bother computing the layout until the window size is
-	 * something reasonable. */
-	return;
-    }
-    if (setPtr->flags & LAYOUT_PENDING) {
-	ComputeGeometry(setPtr);
-    }
-    if (!Tk_IsMapped(setPtr->tkwin)) {
-	/* The scrollset's window isn't displayed, so don't bother drawing
-	 * anything.  By getting this far, we've at least computed the
-	 * coordinates of the scrollset's new layout.  */
-	return;
-    }
-    if (setPtr->flags & SCROLL_PENDING) {
-	int w, h;
-	/* 
-	 * The view port has changed. The scrollbars need to be updated.
-	 */
-	w = VPORTWIDTH(setPtr);
-	h = VPORTHEIGHT(setPtr);
-	if ((setPtr->xScrollCmdObjPtr != NULL) && (setPtr->flags & SCROLLX)) {
-	    Blt_UpdateScrollbar(setPtr->interp, setPtr->xScrollCmdObjPtr,
-		setPtr->xOffset, setPtr->xOffset + w, setPtr->worldWidth);
-	}
-	if ((setPtr->yScrollCmdObjPtr != NULL) && (setPtr->flags & SCROLLY)) {
-	    Blt_UpdateScrollbar(setPtr->interp, setPtr->yScrollCmdObjPtr,
-		setPtr->yOffset, setPtr->yOffset + h, setPtr->worldHeight);
-	}
-	setPtr->flags &= ~SCROLL_PENDING;
-    }
-    if ((setPtr->slaveWidth < VPORTWIDTH(setPtr)) ||
-	(setPtr->slaveHeight < VPORTHEIGHT(setPtr))) {
-	Blt_FillBackgroundRectangle(setPtr->tkwin, Tk_WindowId(setPtr->tkwin), 
-		setPtr->bg, 0, 0, VPORTWIDTH(setPtr), VPORTHEIGHT(setPtr), 
-		0, TK_RELIEF_FLAT);
-    }
-    DrawScrollset(setPtr);
-}
diff --git a/blt3.0/src/bltSpline.c b/blt3.0/src/bltSpline.c
deleted file mode 100644
index 3f3b621..0000000
--- a/blt3.0/src/bltSpline.c
+++ /dev/null
@@ -1,1399 +0,0 @@
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include <bltVector.h>
-
-typedef int (SplineProc)(Point2d origPts[], int nOrigPts, Point2d intpPts[],
-			 int nIntpPts);
-
-typedef double TriDiagonalMatrix[3];
-typedef struct {
-    double b, c, d;
-} Cubic2D;
-
-typedef struct {
-    double b, c, d, e, f;
-} Quint2D;
-
-/*
- * Quadratic spline parameters
- */
-#define E1	param[0]
-#define E2	param[1]
-#define V1	param[2]
-#define V2	param[3]
-#define W1	param[4]
-#define W2	param[5]
-#define Z1	param[6]
-#define Z2	param[7]
-#define Y1	param[8]
-#define Y2	param[9]
-
-static Tcl_ObjCmdProc SplineCmd;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Search --
- *
- *	Conducts a binary search for a value.  This routine is called
- *	only if key is between x(0) and x(len - 1).
- *
- * Results:
- *	Returns the index of the largest value in xtab for which
- *	x[i] < key.
- *
- *---------------------------------------------------------------------------
- */
-static int
-Search(
-    Point2d points[],		/* Contains the abscissas of the data
-				 * points of interpolation. */
-    int nPoints,		/* Dimension of x. */
-    double key,			/* Value whose relative position in
-				 * x is to be located. */
-    int *foundPtr)		/* (out) Returns 1 if s is found in
-				 * x and 0 otherwise. */
-{
-    int high, low, mid;
-
-    low = 0;
-    high = nPoints - 1;
-
-    while (high >= low) {
-	mid = (high + low) / 2;
-	if (key > points[mid].x) {
-	    low = mid + 1;
-	} else if (key < points[mid].x) {
-	    high = mid - 1;
-	} else {
-	    *foundPtr = 1;
-	    return mid;
-	}
-    }
-    *foundPtr = 0;
-    return low;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadChoose --
- *
- *	Determines the case needed for the computation of the parame-
- *	ters of the quadratic spline.
- *
- * Results:
- * 	Returns a case number (1-4) which controls how the parameters
- * 	of the quadratic spline are evaluated.
- *
- *---------------------------------------------------------------------------
- */
-static int
-QuadChoose(
-    Point2d *p,			/* Coordinates of one of the points of
-				 * interpolation */
-    Point2d *q,			/* Coordinates of one of the points of
-				 * interpolation */
-    double m1,			/* Derivative condition at point P */
-    double m2,			/* Derivative condition at point Q */
-    double epsilon)		/* Error tolerance used to distinguish
-				 * cases when m1 or m2 is relatively
-				 * close to the slope or twice the
-				 * slope of the line segment joining
-				 * the points P and Q.  If
-				 * epsilon is not 0.0, then epsilon
-				 * should be greater than or equal to
-				 * machine epsilon.  */
-{
-    double slope;
-
-    /* Calculate the slope of the line joining P and Q. */
-    slope = (q->y - p->y) / (q->x - p->x);
-
-    if (slope != 0.0) {
-	double relerr;
-	double mref, mref1, mref2, prod1, prod2;
-
-	prod1 = slope * m1;
-	prod2 = slope * m2;
-
-	/* Find the absolute values of the slopes slope, m1, and m2. */
-	mref = FABS(slope);
-	mref1 = FABS(m1);
-	mref2 = FABS(m2);
-
-	/*
-	 * If the relative deviation of m1 or m2 from slope is less than
-	 * epsilon, then choose case 2 or case 3.
-	 */
-	relerr = epsilon * mref;
-	if ((FABS(slope - m1) > relerr) && (FABS(slope - m2) > relerr) &&
-	    (prod1 >= 0.0) && (prod2 >= 0.0)) {
-	    double prod;
-
-	    prod = (mref - mref1) * (mref - mref2);
-	    if (prod < 0.0) {
-		/*
-		 * l1, the line through (x1,y1) with slope m1, and l2,
-		 * the line through (x2,y2) with slope m2, intersect
-		 * at a point whose abscissa is between x1 and x2.
-		 * The abscissa becomes a knot of the spline.
-		 */
-		return 1;
-	    }
-	    if (mref1 > (mref * 2.0)) {
-		if (mref2 <= ((2.0 - epsilon) * mref)) {
-		    return 3;
-		}
-	    } else if (mref2 <= (mref * 2.0)) {
-		/*
-		 * Both l1 and l2 cross the line through
-		 * (x1+x2)/2.0,y1 and (x1+x2)/2.0,y2, which is the
-		 * midline of the rectangle formed by P and Q or both
-		 * m1 and m2 have signs different than the sign of
-		 * slope, or one of m1 and m2 has opposite sign from
-		 * slope and l1 and l2 intersect to the left of x1 or
-		 * to the right of x2.  The point (x1+x2)/2. is a knot
-		 * of the spline.
-		 */
-		return 2;
-	    } else if (mref1 <= ((2.0 - epsilon) * mref)) {
-		/*
-		 * In cases 3 and 4, sign(m1)=sign(m2)=sign(slope).
-		 * Either l1 or l2 crosses the midline, but not both.
-		 * Choose case 4 if mref1 is greater than
-		 * (2.-epsilon)*mref; otherwise, choose case 3.
-		 */
-		return 3;
-	    }
-	    /*
-	     * If neither l1 nor l2 crosses the midline, the spline
-	     * requires two knots between x1 and x2.
-	     */
-	    return 4;
-	} else {
-	    /*
-	     * The sign of at least one of the slopes m1 or m2 does not
-	     * agree with the sign of *slope*.
-	     */
-	    if ((prod1 < 0.0) && (prod2 < 0.0)) {
-		return 2;
-	    } else if (prod1 < 0.0) {
-		if (mref2 > ((epsilon + 1.0) * mref)) {
-		    return 1;
-		} else {
-		    return 2;
-		}
-	    } else if (mref1 > ((epsilon + 1.0) * mref)) {
-		return 1;
-	    } else {
-		return 2;
-	    }
-	}
-    } else if ((m1 * m2) >= 0.0) {
-	return 2;
-    } else {
-	return 1;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadCases --
- *
- *	Computes the knots and other parameters of the spline on the
- *	interval PQ.
- *
- *
- * On input--
- *
- *	P and Q are the coordinates of the points of interpolation.
- *
- *	m1 is the slope at P.
- *
- *	m2 is the slope at Q.
- *
- *	ncase controls the number and location of the knots.
- *
- *
- * On output--
- *
- *	(v1,v2),(w1,w2),(z1,z2), and (e1,e2) are the coordinates of
- *	the knots and other parameters of the spline on P.
- *	(e1,e2) and Q are used only if ncase=4.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QuadCases(Point2d *p, Point2d *q, double m1, double m2, double param[], 
-	  int which)
-{
-    if ((which == 3) || (which == 4)) {	/* Parameters used in both 3 and 4 */
-	double mbar1, mbar2, mbar3, c1, d1, h1, j1, k1;
-
-	c1 = p->x + (q->y - p->y) / m1;
-	d1 = q->x + (p->y - q->y) / m2;
-	h1 = c1 * 2.0 - p->x;
-	j1 = d1 * 2.0 - q->x;
-	mbar1 = (q->y - p->y) / (h1 - p->x);
-	mbar2 = (p->y - q->y) / (j1 - q->x);
-
-	if (which == 4) {	/* Case 4. */
-	    Y1 = (p->x + c1) / 2.0;
-	    V1 = (p->x + Y1) / 2.0;
-	    V2 = m1 * (V1 - p->x) + p->y;
-	    Z1 = (d1 + q->x) / 2.0;
-	    W1 = (q->x + Z1) / 2.0;
-	    W2 = m2 * (W1 - q->x) + q->y;
-	    mbar3 = (W2 - V2) / (W1 - V1);
-	    Y2 = mbar3 * (Y1 - V1) + V2;
-	    Z2 = mbar3 * (Z1 - V1) + V2;
-	    E1 = (Y1 + Z1) / 2.0;
-	    E2 = mbar3 * (E1 - V1) + V2;
-	} else {		/* Case 3. */
-	    k1 = (p->y - q->y + q->x * mbar2 - p->x * mbar1) / (mbar2 - mbar1);
-	    if (FABS(m1) > FABS(m2)) {
-		Z1 = (k1 + p->x) / 2.0;
-	    } else {
-		Z1 = (k1 + q->x) / 2.0;
-	    }
-	    V1 = (p->x + Z1) / 2.0;
-	    V2 = p->y + m1 * (V1 - p->x);
-	    W1 = (q->x + Z1) / 2.0;
-	    W2 = q->y + m2 * (W1 - q->x);
-	    Z2 = V2 + (W2 - V2) / (W1 - V1) * (Z1 - V1);
-	}
-    } else if (which == 2) {	/* Case 2. */
-	Z1 = (p->x + q->x) / 2.0;
-	V1 = (p->x + Z1) / 2.0;
-	V2 = p->y + m1 * (V1 - p->x);
-	W1 = (Z1 + q->x) / 2.0;
-	W2 = q->y + m2 * (W1 - q->x);
-	Z2 = (V2 + W2) / 2.0;
-    } else {			/* Case 1. */
-	double ztwo;
-
-	Z1 = (p->y - q->y + m2 * q->x - m1 * p->x) / (m2 - m1);
-	ztwo = p->y + m1 * (Z1 - p->x);
-	V1 = (p->x + Z1) / 2.0;
-	V2 = (p->y + ztwo) / 2.0;
-	W1 = (Z1 + q->x) / 2.0;
-	W2 = (ztwo + q->y) / 2.0;
-	Z2 = V2 + (W2 - V2) / (W1 - V1) * (Z1 - V1);
-    }
-}
-
-static int
-QuadSelect(Point2d *p, Point2d *q, double m1, double m2, double epsilon,
-	   double param[])
-{
-    int ncase;
-
-    ncase = QuadChoose(p, q, m1, m2, epsilon);
-    QuadCases(p, q, m1, m2, param, ncase);
-    return ncase;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadGetImage --
- *
- *---------------------------------------------------------------------------
- */
-INLINE static double
-QuadGetImage(double p1, double p2, double p3, double x1, double x2, double x3)
-{
-    double A, B, C;
-    double y;
-
-    A = x1 - x2;
-    B = x2 - x3;
-    C = x1 - x3;
-
-    y = (p1 * (A * A) + p2 * 2.0 * B * A + p3 * (B * B)) / (C * C);
-    return y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadSpline --
- *
- *	Finds the image of a point in x.
- *
- *	On input
- *
- *	x	Contains the value at which the spline is evaluated.
- *	leftX, leftY
- *		Coordinates of the left-hand data point used in the
- *		evaluation of x values.
- *	rightX, rightY
- *		Coordinates of the right-hand data point used in the
- *		evaluation of x values.
- *	Z1, Z2, Y1, Y2, E2, W2, V2
- *		Parameters of the spline.
- *	ncase	Controls the evaluation of the spline by indicating
- *		whether one or two knots were placed in the interval
- *		(xtabs,xtabs1).
- *
- * Results:
- *	The image of the spline at x.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QuadSpline(
-    Point2d *intp,		/* Value at which spline is evaluated */
-    Point2d *left,		/* Point to the left of the data point to
-				 * be evaluated */
-    Point2d *right,		/* Point to the right of the data point to
-				 * be evaluated */
-    double param[],		/* Parameters of the spline */
-    int ncase)			/* Controls the evaluation of the
-				 * spline by indicating whether one or
-				 * two knots were placed in the
-				 * interval (leftX,rightX) */
-{
-    double y;
-
-    if (ncase == 4) {
-	/*
-	 * Case 4:  More than one knot was placed in the interval.
-	 */
-
-	/*
-	 * Determine the location of data point relative to the 1st knot.
-	 */
-	if (Y1 > intp->x) {
-	    y = QuadGetImage(left->y, V2, Y2, Y1, intp->x, left->x);
-	} else if (Y1 < intp->x) {
-	    /*
-	     * Determine the location of the data point relative to
-	     * the 2nd knot.
-	     */
-	    if (Z1 > intp->x) {
-		y = QuadGetImage(Y2, E2, Z2, Z1, intp->x, Y1);
-	    } else if (Z1 < intp->x) {
-		y = QuadGetImage(Z2, W2, right->y, right->x, intp->x, Z1);
-	    } else {
-		y = Z2;
-	    }
-	} else {
-	    y = Y2;
-	}
-    } else {
-
-	/*
-	 * Cases 1, 2, or 3:
-	 *
-	 * Determine the location of the data point relative to the
-	 * knot.
-	 */
-	if (Z1 < intp->x) {
-	    y = QuadGetImage(Z2, W2, right->y, right->x, intp->x, Z1);
-	} else if (Z1 > intp->x) {
-	    y = QuadGetImage(left->y, V2, Z2, Z1, intp->x, left->x);
-	} else {
-	    y = Z2;
-	}
-    }
-    intp->y = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadSlopes --
- *
- * 	Calculates the derivative at each of the data points.  The
- * 	slopes computed will insure that an osculatory quadratic
- * 	spline will have one additional knot between two adjacent
- * 	points of interpolation.  Convexity and monotonicity are
- * 	preserved wherever these conditions are compatible with the
- * 	data.
- *
- * Results:
- *	The output array "m" is filled with the derivates at each
- *	data point.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QuadSlopes(Point2d *points, double *m, int nPoints)
-{
-    double xbar, xmid, xhat, ydif1, ydif2;
-    double yxmid;
-    double m1, m2;
-    double m1s, m2s;
-    int i, n, l;
-
-    m1s = m2s = m1 = m2 = 0;
-    for (l = 0, i = 1, n = 2; i < (nPoints - 1); l++, i++, n++) {
-	/*
-	 * Calculate the slopes of the two lines joining three
-	 * consecutive data points.
-	 */
-	ydif1 = points[i].y - points[l].y;
-	ydif2 = points[n].y - points[i].y;
-	m1 = ydif1 / (points[i].x - points[l].x);
-	m2 = ydif2 / (points[n].x - points[i].x);
-	if (i == 1) {
-	    m1s = m1, m2s = m2;	/* Save slopes of starting point */
-	}
-	/*
-	 * If one of the preceding slopes is zero or if they have opposite
-	 * sign, assign the value zero to the derivative at the middle
-	 * point.
-	 */
-	if ((m1 == 0.0) || (m2 == 0.0) || ((m1 * m2) <= 0.0)) {
-	    m[i] = 0.0;
-	} else if (FABS(m1) > FABS(m2)) {
-	    /*
-	     * Calculate the slope by extending the line with slope m1.
-	     */
-	    xbar = ydif2 / m1 + points[i].x;
-	    xhat = (xbar + points[n].x) / 2.0;
-	    m[i] = ydif2 / (xhat - points[i].x);
-	} else {
-	    /*
-	     * Calculate the slope by extending the line with slope m2.
-	     */
-	    xbar = -ydif1 / m2 + points[i].x;
-	    xhat = (points[l].x + xbar) / 2.0;
-	    m[i] = ydif1 / (points[i].x - xhat);
-	}
-    }
-
-    /* Calculate the slope at the last point, x(n). */
-    i = nPoints - 2;
-    n = nPoints - 1;
-    if ((m1 * m2) < 0.0) {
-	m[n] = m2 * 2.0;
-    } else {
-	xmid = (points[i].x + points[n].x) / 2.0;
-	yxmid = m[i] * (xmid - points[i].x) + points[i].y;
-	m[n] = (points[n].y - yxmid) / (points[n].x - xmid);
-	if ((m[n] * m2) < 0.0) {
-	    m[n] = 0.0;
-	}
-    }
-
-    /* Calculate the slope at the first point, x(0). */
-    if ((m1s * m2s) < 0.0) {
-	m[0] = m1s * 2.0;
-    } else {
-	xmid = (points[0].x + points[1].x) / 2.0;
-	yxmid = m[1] * (xmid - points[1].x) + points[1].y;
-	m[0] = (yxmid - points[0].y) / (xmid - points[0].x);
-	if ((m[0] * m1s) < 0.0) {
-	    m[0] = 0.0;
-	}
-    }
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QuadEval --
- *
- * 	QuadEval controls the evaluation of an osculatory quadratic
- * 	spline.  The user may provide his own slopes at the points of
- * 	interpolation or use the subroutine 'QuadSlopes' to calculate
- * 	slopes which are consistent with the shape of the data.
- *
- * ON INPUT--
- *   	intpPts	must be a nondecreasing vector of points at which the
- *		spline will be evaluated.
- *   	origPts	contains the abscissas of the data points to be
- *		interpolated. xtab must be increasing.
- *   	y	contains the ordinates of the data points to be
- *		interpolated.
- *   	m 	contains the slope of the spline at each point of
- *		interpolation.
- *   	nPoints	number of data points (dimension of xtab and y).
- *   	numEval is the number of points of evaluation (dimension of
- *		xval and yval).
- *   	epsilon 	is a relative error tolerance used in subroutine
- *		'QuadChoose' to distinguish the situation m(i) or
- *		m(i+1) is relatively close to the slope or twice
- *		the slope of the linear segment between xtab(i) and
- *		xtab(i+1).  If this situation occurs, roundoff may
- *		cause a change in convexity or monotonicity of the
- *   		resulting spline and a change in the case number
- *		provided by 'QuadChoose'.  If epsilon is not equal to zero,
- *		then epsilon should be greater than or equal to machine
- *		epsilon.
- * ON OUTPUT--
- * 	yval 	contains the images of the points in xval.
- *   	err 	is one of the following error codes:
- *      	0 - QuadEval ran normally.
- *      	1 - xval(i) is less than xtab(1) for at least one
- *		    i or xval(i) is greater than xtab(num) for at
- *		    least one i. QuadEval will extrapolate to provide
- *		    function values for these abscissas.
- *      	2 - xval(i+1) < xval(i) for some i.
- *
- *
- *  QuadEval calls the following subroutines or functions:
- *      Search
- *      QuadCases
- *      QuadChoose
- *      QuadSpline
- *---------------------------------------------------------------------------
- */
-static int
-QuadEval(
-    Point2d origPts[],
-    int nOrigPts,
-    Point2d intpPts[],
-    int nIntpPts,
-    double *m,			/* Slope of the spline at each point
-				 * of interpolation. */
-    double epsilon)		/* Relative error tolerance (see choose) */
-{
-    int error;
-    int i, j;
-    double param[10];
-    int ncase;
-    int start, end;
-    int l, p;
-    int n;
-    int found;
-
-    /* Initialize indices and set error result */
-    error = 0;
-    l = nOrigPts - 1;
-    p = l - 1;
-    ncase = 1;
-
-    /*
-     * Determine if abscissas of new vector are non-decreasing.
-     */
-    for (j = 1; j < nIntpPts; j++) {
-	if (intpPts[j].x < intpPts[j - 1].x) {
-	    return 2;
-	}
-    }
-    /*
-     * Determine if any of the points in xval are LESS than the
-     * abscissa of the first data point.
-     */
-    for (start = 0; start < nIntpPts; start++) {
-	if (intpPts[start].x >= origPts[0].x) {
-	    break;
-	}
-    }
-    /*
-     * Determine if any of the points in xval are GREATER than the
-     * abscissa of the l data point.
-     */
-    for (end = nIntpPts - 1; end >= 0; end--) {
-	if (intpPts[end].x <= origPts[l].x) {
-	    break;
-	}
-    }
-
-    if (start > 0) {
-	error = 1;		/* Set error value to indicate that
-				 * extrapolation has occurred. */
-	/*
-	 * Calculate the images of points of evaluation whose abscissas
-	 * are less than the abscissa of the first data point.
-	 */
-	ncase = QuadSelect(origPts, origPts + 1, m[0], m[1], epsilon, param);
-	for (j = 0; j < (start - 1); j++) {
-	    QuadSpline(intpPts + j, origPts, origPts + 1, param, ncase);
-	}
-	if (nIntpPts == 1) {
-	    return error;
-	}
-    }
-    if ((nIntpPts == 1) && (end != (nIntpPts - 1))) {
-	goto noExtrapolation;
-    }
-    
-    /*
-     * Search locates the interval in which the first in-range
-     * point of evaluation lies.
-     */
-
-    i = Search(origPts, nOrigPts, intpPts[start].x, &found);
-    
-    n = i + 1;
-    if (n >= nOrigPts) {
-	n = nOrigPts - 1;
-	i = nOrigPts - 2;
-    }
-    /*
-     * If the first in-range point of evaluation is equal to one
-     * of the data points, assign the appropriate value from y.
-     * Continue until a point of evaluation is found which is not
-     * equal to a data point.
-     */
-    if (found) {
-	do {
-	    intpPts[start].y = origPts[i].y;
-	    start++;
-	    if (start >= nIntpPts) {
-		return error;
-	    }
-	} while (intpPts[start - 1].x == intpPts[start].x);
-	
-	for (;;) {
-	    if (intpPts[start].x < origPts[n].x) {
-		break;	/* Break out of for-loop */
-	    }
-	    if (intpPts[start].x == origPts[n].x) {
-		do {
-		    intpPts[start].y = origPts[n].y;
-		    start++;
-		    if (start >= nIntpPts) {
-			return error;
-		    }
-		} while (intpPts[start].x == intpPts[start - 1].x);
-	    }
-	    i++;
-	    n++;
-	}
-    }
-    /*
-     * Calculate the images of all the points which lie within
-     * range of the data.
-     */
-    if ((i > 0) || (error != 1)) {
-	ncase = QuadSelect(origPts + i, origPts + n, m[i], m[n], 
-			   epsilon, param);
-    }
-    for (j = start; j <= end; j++) {
-	/*
-	 * If xx(j) - x(n) is negative, do not recalculate
-	 * the parameters for this section of the spline since
-	 * they are already known.
-	 */
-	if (intpPts[j].x == origPts[n].x) {
-	    intpPts[j].y = origPts[n].y;
-	    continue;
-	} else if (intpPts[j].x > origPts[n].x) {
-	    double delta;
-	    
-	    /* Determine that the routine is in the correct part of
-	       the spline. */
-	    do {
-		i++, n++;
-		delta = intpPts[j].x - origPts[n].x;
-	    } while (delta > 0.0);
-	    
-	    if (delta < 0.0) {
-		ncase = QuadSelect(origPts + i, origPts + n, m[i], 
-			   m[n], epsilon, param);
-	    } else if (delta == 0.0) {
-		intpPts[j].y = origPts[n].y;
-		continue;
-	    }
-	}
-	QuadSpline(intpPts + j, origPts + i, origPts + n, param, ncase);
-    }
-    
-    if (end == (nIntpPts - 1)) {
-	return error;
-    }
-    if ((n == l) && (intpPts[end].x != origPts[l].x)) {
-	goto noExtrapolation;
-    }
-
-    error = 1;			/* Set error value to indicate that
-				 * extrapolation has occurred. */
-    ncase = QuadSelect(origPts + p, origPts + l, m[p], m[l], epsilon, param);
-
-  noExtrapolation:
-    /*
-     * Calculate the images of the points of evaluation whose
-     * abscissas are greater than the abscissa of the last data point.
-     */
-    for (j = (end + 1); j < nIntpPts; j++) {
-	QuadSpline(intpPts + j, origPts + p, origPts + l, param, ncase);
-    }
-    return error;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *		  Shape preserving quadratic splines
- *		   by D.F.Mcallister & J.A.Roulier
- *		    Coded by S.L.Dodd & M.Roulier
- *			 N.C.State University
- *
- *---------------------------------------------------------------------------
- */
-/*
- * Driver routine for quadratic spline package
- * On input--
- *   X,Y    Contain n-long arrays of data (x is increasing)
- *   XM     Contains m-long array of x values (increasing)
- *   eps    Relative error tolerance
- *   n      Number of input data points
- *   m      Number of output data points
- * On output--
- *   work   Contains the value of the first derivative at each data point
- *   ym     Contains the interpolated spline value at each data point
- */
-int
-Blt_QuadraticSpline(Point2d *origPts, int nOrigPts, Point2d *intpPts, 
-		    int nIntpPts)
-{
-    double epsilon;
-    double *work;
-    int result;
-
-    work = Blt_AssertMalloc(nOrigPts * sizeof(double));
-    epsilon = 0.0;		/* TBA: adjust error via command-line option */
-    /* allocate space for vectors used in calculation */
-    QuadSlopes(origPts, work, nOrigPts);
-    result = QuadEval(origPts, nOrigPts, intpPts, nIntpPts, work, epsilon);
-    Blt_Free(work);
-    if (result > 1) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Reference:
- *	Numerical Analysis, R. Burden, J. Faires and A. Reynolds.
- *	Prindle, Weber & Schmidt 1981 pp 112
- *
- * Parameters:
- *	origPts - vector of points, assumed to be sorted along x.
- *	intpPts - vector of new points.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_NaturalSpline(Point2d *origPts, int nOrigPts, Point2d *intpPts, 
-		  int nIntpPts)
-{
-    Cubic2D *eq;
-    Point2d *ip, *iend;
-    TriDiagonalMatrix *A;
-    double *dx;		/* vector of deltas in x */
-    double x, dy, alpha;
-    int isKnot;
-    int i, j, n;
-
-    dx = Blt_AssertMalloc(sizeof(double) * nOrigPts);
-    /* Calculate vector of differences */
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-	dx[i] = origPts[j].x - origPts[i].x;
-	if (dx[i] < 0.0) {
-	    return 0;
-	}
-    }
-    n = nOrigPts - 1;		/* Number of intervals. */
-    A = Blt_AssertMalloc(sizeof(TriDiagonalMatrix) * nOrigPts);
-    if (A == NULL) {
-	Blt_Free(dx);
-	return 0;
-    }
-    /* Vectors to solve the tridiagonal matrix */
-    A[0][0] = A[n][0] = 1.0;
-    A[0][1] = A[n][1] = 0.0;
-    A[0][2] = A[n][2] = 0.0;
-
-    /* Calculate the intermediate results */
-    for (i = 0, j = 1; j < n; j++, i++) {
-	alpha = 3.0 * ((origPts[j + 1].y / dx[j]) - (origPts[j].y / dx[i]) - 
-		       (origPts[j].y / dx[j]) + (origPts[i].y / dx[i]));
-	A[j][0] = 2 * (dx[j] + dx[i]) - dx[i] * A[i][1];
-	A[j][1] = dx[j] / A[j][0];
-	A[j][2] = (alpha - dx[i] * A[i][2]) / A[j][0];
-    }
-
-    eq = Blt_Malloc(sizeof(Cubic2D) * nOrigPts);
-    if (eq == NULL) {
-	Blt_Free(A);
-	Blt_Free(dx);
-	return FALSE;
-    }
-    eq[0].c = eq[n].c = 0.0;
-    for (j = n, i = n - 1; i >= 0; i--, j--) {
-	eq[i].c = A[i][2] - A[i][1] * eq[j].c;
-	dy = origPts[i+1].y - origPts[i].y;
-	eq[i].b = (dy) / dx[i] - dx[i] * (eq[j].c + 2.0 * eq[i].c) / 3.0;
-	eq[i].d = (eq[j].c - eq[i].c) / (3.0 * dx[i]);
-    }
-    Blt_Free(A);
-    Blt_Free(dx);
-
-    /* Now calculate the new values */
-    for (ip = intpPts, iend = ip + nIntpPts; ip < iend; ip++) {
-	ip->y = 0.0;
-	x = ip->x;
-
-	/* Is it outside the interval? */
-	if ((x < origPts[0].x) || (x > origPts[n].x)) {
-	    continue;
-	}
-	/* Search for the interval containing x in the point array */
-	i = Search(origPts, nOrigPts, x, &isKnot);
-	if (isKnot) {
-	    ip->y = origPts[i].y;
-	} else {
-	    i--;
-	    x -= origPts[i].x;
-	    ip->y = origPts[i].y + x * (eq[i].b + x * (eq[i].c + x * eq[i].d));
-	}
-    }
-    Blt_Free(eq);
-    return TRUE;
-}
-
-static Blt_OpSpec splineOps[] =
-{
-    {"natural", 1, Blt_NaturalSpline, 6, 6, "x y splx sply",},
-    {"quadratic", 1, Blt_QuadraticSpline, 6, 6, "x y splx sply",},
-};
-static int nSplineOps = sizeof(splineOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-SplineCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    SplineProc *proc;
-    Blt_Vector *x, *y, *splX, *splY;
-    double *xArr, *yArr;
-    int i;
-    Point2d *origPts, *intpPts;
-    int nOrigPts, nIntpPts;
-    
-    proc = Blt_GetOpFromObj(interp, nSplineOps, splineOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    if ((Blt_GetVectorFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Blt_GetVectorFromObj(interp, objv[3], &y) != TCL_OK) ||
-	(Blt_GetVectorFromObj(interp, objv[4], &splX) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    nOrigPts = Blt_VecLength(x);
-    if (nOrigPts < 3) {
-	Tcl_AppendResult(interp, "length of vector \"", Tcl_GetString(objv[2]),
-			 "\" is < 3", (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (i = 1; i < nOrigPts; i++) {
-	if (Blt_VecData(x)[i] < Blt_VecData(x)[i - 1]) {
-	    Tcl_AppendResult(interp, "x vector \"", Tcl_GetString(objv[2]),
-		"\" must be monotonically increasing", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    /* Check that all the data points aren't the same. */
-    if (Blt_VecData(x)[i - 1] <= Blt_VecData(x)[0]) {
-	Tcl_AppendResult(interp, "x vector \"", Tcl_GetString(objv[2]),
-	 "\" must be monotonically increasing", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (nOrigPts != Blt_VecLength(y)) {
-	Tcl_AppendResult(interp, "vectors \"", Tcl_GetString(objv[2]), 
-			 "\" and \"", Tcl_GetString(objv[3]),
-			 " have different lengths", (char *)NULL);
-	return TCL_ERROR;
-    }
-    nIntpPts = Blt_VecLength(splX);
-    if (Blt_GetVectorFromObj(interp, objv[5], &splY) != TCL_OK) {
-	/*
-	 * If the named vector to hold the ordinates of the spline
-	 * doesn't exist, create one the same size as the vector
-	 * containing the abscissas.
-	 */
-	if (Blt_CreateVector(interp, Tcl_GetString(objv[5]), nIntpPts, &splY) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else if (nIntpPts != Blt_VecLength(splY)) {
-	/*
-	 * The x and y vectors differ in size. Make the number of ordinates
-	 * the same as the number of abscissas.
-	 */
-	if (Blt_ResizeVector(splY, nIntpPts) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    origPts = Blt_Malloc(sizeof(Point2d) * nOrigPts);
-    if (origPts == NULL) {
-	Tcl_AppendResult(interp, "can't allocate \"", Blt_Itoa(nOrigPts), 
-		"\" points", (char *)NULL);
-	return TCL_ERROR;
-    }
-    intpPts = Blt_Malloc(sizeof(Point2d) * nIntpPts);
-    if (intpPts == NULL) {
-	Tcl_AppendResult(interp, "can't allocate \"", Blt_Itoa(nIntpPts), 
-		"\" points", (char *)NULL);
-	Blt_Free(origPts);
-	return TCL_ERROR;
-    }
-    xArr = Blt_VecData(x);
-    yArr = Blt_VecData(y);
-    for (i = 0; i < nOrigPts; i++) {
-	origPts[i].x = xArr[i];
-	origPts[i].y = yArr[i];
-    }
-    xArr = Blt_VecData(splX);
-    yArr = Blt_VecData(splY);
-    for (i = 0; i < nIntpPts; i++) {
-	intpPts[i].x = xArr[i];
-	intpPts[i].y = yArr[i];
-    }
-    if (!(*proc) (origPts, nOrigPts, intpPts, nIntpPts)) {
-	Tcl_AppendResult(interp, "error generating spline for \"", 
-		Blt_NameOfVector(splY), "\"", (char *)NULL);
-	Blt_Free(origPts);
-	Blt_Free(intpPts);
-	return TCL_ERROR;
-    }
-    yArr = Blt_VecData(splY);
-    for (i = 0; i < nIntpPts; i++) {
-	yArr[i] = intpPts[i].y;
-    }
-    Blt_Free(origPts);
-    Blt_Free(intpPts);
-
-    /* Finally update the vector. The size of the vector hasn't
-     * changed, just the data. Reset the vector using TCL_STATIC to
-     * indicate this. */
-    if (Blt_ResetVector(splY, Blt_VecData(splY), Blt_VecLength(splY),
-	    Blt_VecSize(splY), TCL_STATIC) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_SplineCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"spline", SplineCmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-
-#define SQR(x)	((x)*(x))
-
-typedef struct {
-    double t;			/* Arc length of interval. */
-    double x;			/* 2nd derivative of X with respect to T */
-    double y;			/* 2nd derivative of Y with respect to T */
-} CubicSpline;
-
-
-/*
- * The following two procedures solve the special linear system which arise
- * in cubic spline interpolation. If x is assumed cyclic ( x[i]=x[n+i] ) the
- * equations can be written as (i=0,1,...,n-1):
- *     m[i][0] * x[i-1] + m[i][1] * x[i] + m[i][2] * x[i+1] = b[i] .
- * In matrix notation one gets A * x = b, where the matrix A is tridiagonal
- * with additional elements in the upper right and lower left position:
- *   A[i][0] = A_{i,i-1}  for i=1,2,...,n-1    and    m[0][0] = A_{0,n-1} ,
- *   A[i][1] = A_{i, i }  for i=0,1,...,n-1
- *   A[i][2] = A_{i,i+1}  for i=0,1,...,n-2    and    m[n-1][2] = A_{n-1,0}.
- * A should be symmetric (A[i+1][0] == A[i][2]) and positive definite.
- * The size of the system is given in n (n>=1).
- *
- * In the first procedure the Cholesky decomposition A = C^T * D * C
- * (C is upper triangle with unit diagonal, D is diagonal) is calculated.
- * Return TRUE if decomposition exist.
- */
-static int 
-SolveCubic1(TriDiagonalMatrix A[], int n)
-{
-    int i;
-    double m_ij, m_n, m_nn, d;
-
-    if (n < 1) {
-	return FALSE;		/* Dimension should be at least 1 */
-    }
-    d = A[0][1];		/* D_{0,0} = A_{0,0} */
-    if (d <= 0.0) {
-	return FALSE;		/* A (or D) should be positive definite */
-    }
-    m_n = A[0][0];		/*  A_{0,n-1}  */
-    m_nn = A[n - 1][1];		/* A_{n-1,n-1} */
-    for (i = 0; i < n - 2; i++) {
-	m_ij = A[i][2];		/*  A_{i,1}  */
-	A[i][2] = m_ij / d;	/* C_{i,i+1} */
-	A[i][0] = m_n / d;	/* C_{i,n-1} */
-	m_nn -= A[i][0] * m_n;	/* to get C_{n-1,n-1} */
-	m_n = -A[i][2] * m_n;	/* to get C_{i+1,n-1} */
-	d = A[i + 1][1] - A[i][2] * m_ij;	/* D_{i+1,i+1} */
-	if (d <= 0.0) {
-	    return FALSE;	/* Elements of D should be positive */
-	}
-	A[i + 1][1] = d;
-    }
-    if (n >= 2) {		/* Complete last column */
-	m_n += A[n - 2][2];	/* add A_{n-2,n-1} */
-	A[n - 2][0] = m_n / d;	/* C_{n-2,n-1} */
-	A[n - 1][1] = d = m_nn - A[n - 2][0] * m_n;	/* D_{n-1,n-1} */
-	if (d <= 0.0) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-/*
- * The second procedure solves the linear system, with the Cholesky
- * decomposition calculated above (in m[][]) and the right side b given
- * in x[]. The solution x overwrites the right side in x[].
- */
-static void 
-SolveCubic2(TriDiagonalMatrix A[], CubicSpline spline[], int nIntervals)
-{
-    int i;
-    double x, y;
-    int n, m;
-
-    n = nIntervals - 2;
-    m = nIntervals - 1;
-
-    /* Division by transpose of C : b = C^{-T} * b */
-    x = spline[m].x;
-    y = spline[m].y;
-    for (i = 0; i < n; i++) {
-	spline[i + 1].x -= A[i][2] * spline[i].x; /* C_{i,i+1} * x(i) */
-	spline[i + 1].y -= A[i][2] * spline[i].y; /* C_{i,i+1} * x(i) */
-	x -= A[i][0] * spline[i].x;	/* C_{i,n-1} * x(i) */
-	y -= A[i][0] * spline[i].y; /* C_{i,n-1} * x(i) */
-    }
-    if (n >= 0) {
-	/* C_{n-2,n-1} * x_{n-1} */
-	spline[m].x = x - A[n][0] * spline[n].x; 
-	spline[m].y = y - A[n][0] * spline[n].y; 
-    }
-    /* Division by D: b = D^{-1} * b */
-    for (i = 0; i < nIntervals; i++) {
-	spline[i].x /= A[i][1];
-	spline[i].y /= A[i][1];
-    }
-
-    /* Division by C: b = C^{-1} * b */
-    x = spline[m].x;
-    y = spline[m].y;
-    if (n >= 0) {
-	/* C_{n-2,n-1} * x_{n-1} */
-	spline[n].x -= A[n][0] * x;	
-	spline[n].y -= A[n][0] * y;	
-    }
-    for (i = (n - 1); i >= 0; i--) {
-	/* C_{i,i+1} * x_{i+1} + C_{i,n-1} * x_{n-1} */
-	spline[i].x -= A[i][2] * spline[i + 1].x + A[i][0] * x;
-	spline[i].y -= A[i][2] * spline[i + 1].y + A[i][0] * y;
-    }
-}
-
-/*
- * Find second derivatives (x''(t_i),y''(t_i)) of cubic spline interpolation
- * through list of points (x_i,y_i). The parameter t is calculated as the
- * length of the linear stroke. The number of points must be at least 3.
- * Note: For CLOSED_CONTOURs the first and last point must be equal.
- */
-static CubicSpline *
-CubicSlopes(
-    Point2d points[],
-    int nPoints,		/* Number of points (nPoints>=3) */
-    int isClosed,		/* CLOSED_CONTOUR or OPEN_CONTOUR  */
-    double unitX, 
-    double unitY)		/* Unit length in x and y (norm=1) */
-{
-    CubicSpline *spline;
-    CubicSpline *s1, *s2;
-    int n, i;
-    double norm, dx, dy;
-    TriDiagonalMatrix *A;	/* The tri-diagonal matrix is saved here. */
-    
-    spline = Blt_Malloc(sizeof(CubicSpline) * nPoints);
-    if (spline == NULL) {
-	return NULL;
-    }
-    A = Blt_Malloc(sizeof(TriDiagonalMatrix) * nPoints);
-    if (A == NULL) {
-	Blt_Free(spline);
-	return NULL;
-    }
-    /*
-     * Calculate first differences in (dxdt2[i], y[i]) and interval lengths
-     * in dist[i]:
-     */
-    s1 = spline;
-    for (i = 0; i < nPoints - 1; i++) {
-	s1->x = points[i+1].x - points[i].x;
-	s1->y = points[i+1].y - points[i].y;
-
-	/*
-	 * The Norm of a linear stroke is calculated in "normal coordinates"
-	 * and used as interval length:
-	 */
-	dx = s1->x / unitX;
-	dy = s1->y / unitY;
-	s1->t = sqrt(dx * dx + dy * dy);
-
-	s1->x /= s1->t;	/* first difference, with unit norm: */
-	s1->y /= s1->t;	/*   || (dxdt2[i], y[i]) || = 1      */
-	s1++;
-    }
-
-    /*
-     * Setup linear System:  Ax = b
-     */
-    n = nPoints - 2;		/* Without first and last point */
-    if (isClosed) {
-	/* First and last points must be equal for CLOSED_CONTOURs */
-	spline[nPoints - 1].t = spline[0].t;
-	spline[nPoints - 1].x = spline[0].x;
-	spline[nPoints - 1].y = spline[0].y;
-	n++;			/* Add last point (= first point) */
-    }
-    s1 = spline, s2 = s1 + 1;
-    for (i = 0; i < n; i++) {
-	/* Matrix A, mainly tridiagonal with cyclic second index 
-	   ("j = j+n mod n") 
-	*/
-	A[i][0] = s1->t;	/* Off-diagonal element A_{i,i-1} */
-	A[i][1] = 2.0 * (s1->t + s2->t);	/* A_{i,i} */
-	A[i][2] = s2->t;	/* Off-diagonal element A_{i,i+1} */
-
-	/* Right side b_x and b_y */
-	s1->x = (s2->x - s1->x) * 6.0;
-	s1->y = (s2->y - s1->y) * 6.0;
-
-	/* 
-	 * If the linear stroke shows a cusp of more than 90 degree,
-	 * the right side is reduced to avoid oscillations in the
-	 * spline: 
-	 */
-	/*
-	 * The Norm of a linear stroke is calculated in "normal coordinates"
-	 * and used as interval length:
-	 */
-	dx = s1->x / unitX;
-	dy = s1->y / unitY;
-	norm = sqrt(dx * dx + dy * dy) / 8.5;
-	if (norm > 1.0) {
-	    /* The first derivative will not be continuous */
-	    s1->x /= norm;
-	    s1->y /= norm;
-	}
-	s1++, s2++;
-    }
-
-    if (!isClosed) {
-	/* Third derivative is set to zero at both ends */
-	A[0][1] += A[0][0];	/* A_{0,0}     */
-	A[0][0] = 0.0;		/* A_{0,n-1}   */
-	A[n-1][1] += A[n-1][2]; /* A_{n-1,n-1} */
-	A[n-1][2] = 0.0;	/* A_{n-1,0}   */
-    }
-    /* Solve linear systems for dxdt2[] and y[] */
-
-    if (SolveCubic1(A, n)) {	/* Cholesky decomposition */
-	SolveCubic2(A, spline, n); /* A * dxdt2 = b_x */
-    } else {			/* Should not happen, but who knows ... */
-	Blt_Free(A);
-	Blt_Free(spline);
-	return NULL;
-    }
-    /* Shift all second derivatives one place right and update the ends. */
-    s2 = spline + n, s1 = s2 - 1;
-    for (/* empty */; s2 > spline; s2--, s1--) {
-	s2->x = s1->x;
-	s2->y = s1->y;
-    }
-    if (isClosed) {
-	spline[0].x = spline[n].x;
-	spline[0].y = spline[n].y;
-    } else {
-	/* Third derivative is 0.0 for the first and last interval. */
-	spline[0].x = spline[1].x; 
-	spline[0].y = spline[1].y; 
-	spline[n + 1].x = spline[n].x;
-	spline[n + 1].y = spline[n].y;
-    }
-    Blt_Free( A);
-    return spline;
-}
-
-
-/*
- * Calculate interpolated values of the spline function (defined via p_cntr
- * and the second derivatives dxdt2[] and dydt2[]). The number of tabulated
- * values is n. On an equidistant grid n_intpol values are calculated.
- */
-static int
-CubicEval(Point2d *origPts, int nOrigPts, Point2d *intpPts, int nIntpPts,
-	  CubicSpline *spline)
-{
-    double t, tSkip, tMax;
-    Point2d q;
-    int i, j, count;
-
-    /* Sum the lengths of all the segments (intervals). */
-    tMax = 0.0;
-    for (i = 0; i < nOrigPts - 1; i++) {
-	tMax += spline[i].t;
-    }
-
-    /* Need a better way of doing this... */
-
-    /* The distance between interpolated points */
-    tSkip = (1. - 1e-7) * tMax / (nIntpPts - 1);
-    
-    t = 0.0;			/* Spline parameter value. */
-    q = origPts[0];
-    count = 0;
-
-    intpPts[count++] = q;	/* First point. */
-    t += tSkip;
-    
-    for (i = 0, j = 1; j < nOrigPts; i++, j++) {
-	Point2d p;
-	double d, hx, dx0, dx01, hy, dy0, dy01;
-	
-	d = spline[i].t;	/* Interval length */
-	p = q;
-	q = origPts[i+1];
-	hx = (q.x - p.x) / d;
-	hy = (q.y - p.y) / d;
-	dx0 = (spline[j].x + 2 * spline[i].x) / 6.0;
-	dy0 = (spline[j].y + 2 * spline[i].y) / 6.0;
-	dx01 = (spline[j].x - spline[i].x) / (6.0 * d);
-	dy01 = (spline[j].y - spline[i].y) / (6.0 * d);
-	while (t <= spline[i].t) { /* t in current interval ? */
-	    p.x += t * (hx + (t - d) * (dx0 + t * dx01));
-	    p.y += t * (hy + (t - d) * (dy0 + t * dy01));
-	    intpPts[count++] = p;
-	    t += tSkip;
-	}
-	/* Parameter t relative to start of next interval */
-	t -= spline[i].t;
-    }
-    return count;
-}
-
-/*
- * Generate a cubic spline curve through the points (x_i,y_i) which are
- * stored in the linked list p_cntr.
- * The spline is defined as a 2d-function s(t) = (x(t),y(t)), where the
- * parameter t is the length of the linear stroke.
- */
-int
-Blt_NaturalParametricSpline(Point2d *origPts, int nOrigPts, Region2d *extsPtr,
-			    int isClosed, Point2d *intpPts, int nIntpPts)
-{
-    double unitX, unitY;	/* To define norm (x,y)-plane */
-    CubicSpline *spline;
-    int result;
-
-    if (nOrigPts < 3) {
-	return 0;
-    }
-    if (isClosed) {
-	origPts[nOrigPts].x = origPts[0].x;
-	origPts[nOrigPts].y = origPts[0].y;
-	nOrigPts++;
-    }
-    /* Width and height of the grid is used at unit length (2d-norm) */
-    unitX = extsPtr->right - extsPtr->left;
-    unitY = extsPtr->bottom - extsPtr->top;
-
-    if (unitX < FLT_EPSILON) {
-	unitX = FLT_EPSILON;
-    }
-    if (unitY < FLT_EPSILON) {
-	unitY = FLT_EPSILON;
-    }
-    /* Calculate parameters for cubic spline: 
-     *		t     = arc length of interval.
-     *		dxdt2 = second derivatives of x with respect to t, 
-     *		dydt2 = second derivatives of y with respect to t, 
-     */
-    spline = CubicSlopes(origPts, nOrigPts, isClosed, unitX, unitY);
-    if (spline == NULL) {
-	return 0;
-    }
-    result= CubicEval(origPts, nOrigPts, intpPts, nIntpPts, spline);
-    Blt_Free(spline);
-    return result;
-}
-
-static INLINE void
-CatromCoeffs(Point2d *p, Point2d *a, Point2d *b, Point2d *c, Point2d *d)
-{
-    a->x = -p[0].x + 3.0 * p[1].x - 3.0 * p[2].x + p[3].x;
-    b->x = 2.0 * p[0].x - 5.0 * p[1].x + 4.0 * p[2].x - p[3].x;
-    c->x = -p[0].x + p[2].x;
-    d->x = 2.0 * p[1].x;
-    a->y = -p[0].y + 3.0 * p[1].y - 3.0 * p[2].y + p[3].y;
-    b->y = 2.0 * p[0].y - 5.0 * p[1].y + 4.0 * p[2].y - p[3].y;
-    c->y = -p[0].y + p[2].y;
-    d->y = 2.0 * p[1].y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ParametricCatromSpline --
- *
- *	Computes a spline based upon the data points, returning a new (larger)
- *	coordinate array of points.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CatromParametricSpline(Point2d *points, int nPoints, Point2d *intpPts,
-			   int nIntpPts)
-{
-    int i;
-    Point2d *origPts;
-    double t;
-    int interval;
-    Point2d a, b, c, d;
-
-    assert(nPoints > 0);
-
-    /*
-     * The spline is computed in screen coordinates instead of data points so
-     * that we can select the abscissas of the interpolated points from each
-     * pixel horizontally across the plotting area.
-     */
-    origPts = Blt_AssertMalloc((nPoints + 4) * sizeof(Point2d));
-    memcpy(origPts + 1, points, sizeof(Point2d) * nPoints);
-
-    origPts[0] = origPts[1];
-    origPts[nPoints + 2] = origPts[nPoints + 1] = origPts[nPoints];
-
-    for (i = 0; i < nIntpPts; i++) {
-	interval = (int)intpPts[i].x;
-	t = intpPts[i].y;
-	assert(interval < nPoints);
-	CatromCoeffs(origPts + interval, &a, &b, &c, &d);
-	intpPts[i].x = (d.x + t * (c.x + t * (b.x + t * a.x))) / 2.0;
-	intpPts[i].y = (d.y + t * (c.y + t * (b.y + t * a.y))) / 2.0;
-    }
-    Blt_Free(origPts);
-    return 1;
-}
diff --git a/blt3.0/src/bltString.h b/blt3.0/src/bltString.h
deleted file mode 100644
index a831057..0000000
--- a/blt3.0/src/bltString.h
+++ /dev/null
@@ -1,61 +0,0 @@
-
-/*
- * bltString.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_STRING_H
-#define _BLT_STRING_H
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif /* HAVE_STDLIB_H */
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif /* HAVE_STRING_H */
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-/*
- * On some systems "strncasecmp" and "strcasecmp" are in the C library
- * but have no declarations in the C header files. Make sure we supply
- * them here.
- */
-#if !HAVE_DECL_STRTOLOWER
-BLT_EXTERN void strtolower(char *s);
-#endif /* !HAVE_DECL_STRTOLOWER */
-
-#if !HAVE_DECL_STRCASECMP
-BLT_EXTERN int strcasecmp(const char *s1, const char *s2);
-#endif /* !HAVE_DECL_STRDUP */
-
-#if !HAVE_DECL_STRNCASECMP
-BLT_EXTERN int strncasecmp(const char *s1, const char *s2, size_t length);
-#endif /* !HAVE_DECL_STRDUP */
-#endif
diff --git a/blt3.0/src/bltSwitch.c b/blt3.0/src/bltSwitch.c
deleted file mode 100644
index 4ca4cc8..0000000
--- a/blt3.0/src/bltSwitch.c
+++ /dev/null
@@ -1,546 +0,0 @@
-
-/*
- * bltSwitch.c --
- *
- * This module implements command/argument switch parsing procedures for the
- * BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <stdarg.h>
-
-#include "bltSwitch.h"
-
-static void
-DoHelp(Tcl_Interp *interp, Blt_SwitchSpec *specs)
-{
-    Tcl_DString ds;
-    Blt_SwitchSpec *sp;
-
-    Tcl_DStringInit(&ds);
-    Tcl_DStringAppend(&ds, "following switches are available:", -1);
-    for (sp = specs; sp->type != BLT_SWITCH_END; sp++) {
-	Tcl_DStringAppend(&ds, "\n    ", 4);
-	Tcl_DStringAppend(&ds, sp->switchName, -1);
-	Tcl_DStringAppend(&ds, " ", 1);
-	Tcl_DStringAppend(&ds, sp->help, -1);
-    }
-    Tcl_AppendResult(interp, Tcl_DStringValue(&ds), (char *)NULL);
-    Tcl_DStringFree(&ds);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindSwitchSpec --
- *
- *	Search through a table of configuration specs, looking for one that
- *	matches a given argvName.
- *
- * Results:
- *	The return value is a pointer to the matching entry, or NULL if
- *	nothing matched.  In that case an error message is left in the
- *	interp's result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_SwitchSpec *
-FindSwitchSpec(
-    Tcl_Interp *interp,		/* Used for reporting errors. */
-    Blt_SwitchSpec *specs,	/* Pointer to table of configuration
-				 * specifications for a widget. */
-    const char *name,		/* Name identifying a particular switch. */
-    int length,			/* Length of name. */
-    int needFlags,		/* Flags that must be present in matching
-				 * entry. */
-    int hateFlags)		/* Flags that must NOT be present in matching
-				 * entry. */
-{
-    Blt_SwitchSpec *sp;
-    char c;			/* First character of current argument. */
-    Blt_SwitchSpec *matchPtr;	/* Matching spec, or NULL. */
-
-    c = name[1];
-    matchPtr = NULL;
-    for (sp = specs; sp->type != BLT_SWITCH_END; sp++) {
-	if (sp->switchName == NULL) {
-	    continue;
-	}
-	if (((sp->flags & needFlags) != needFlags) || (sp->flags & hateFlags)) {
-	    continue;
-	}
-	if ((sp->switchName[1] != c) || 
-	    (strncmp(sp->switchName, name, length) != 0)) {
-	    continue;
-	}
-	if (sp->switchName[length] == '\0') {
-	    return sp;		/* Stop on a perfect match. */
-	}
-	if (matchPtr != NULL) {
-	    Tcl_AppendResult(interp, "ambiguous switch \"", name, "\"\n", 
-		(char *) NULL);
-	    DoHelp(interp, specs);
-	    return NULL;
-	}
-	matchPtr = sp;
-    }
-    if (strcmp(name, "-help") == 0) {
-	DoHelp(interp, specs);
-	return NULL;
-    }
-    if (matchPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown switch \"", name, "\"\n", 
-			 (char *)NULL);
-	DoHelp(interp, specs);
-	return NULL;
-    }
-    return matchPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoSwitch --
- *
- *	This procedure applies a single configuration switch to a widget
- *	record.
- *
- * Results:
- *	A standard TCL return value.
- *
- * Side effects:
- *	WidgRec is modified as indicated by specPtr and value.  The old value
- *	is recycled, if that is appropriate for the value type.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DoSwitch(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Blt_SwitchSpec *sp,		/* Specifier to apply. */
-    Tcl_Obj *objPtr,		/* Value to use to fill in widgRec. */
-    void *record)		/* Record whose fields are to be modified.
-				 * Values must be properly initialized. */
-{
-    do {
-	char *ptr;
-
-	ptr = (char *)record + sp->offset;
-	switch (sp->type) {
-	case BLT_SWITCH_BOOLEAN:
-	    {
-		int bool;
-
-		if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		if (sp->mask > 0) {
-		    if (bool) {
-			*((int *)ptr) |= sp->mask;
-		    } else {
-			*((int *)ptr) &= ~sp->mask;
-		    }
-		} else {
-		    *((int *)ptr) = bool;
-		}
-	    }
-	    break;
-
-	case BLT_SWITCH_DOUBLE:
-	    if (Tcl_GetDoubleFromObj(interp, objPtr, (double *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_SWITCH_OBJ:
-	    *(Tcl_Obj **)ptr = objPtr;
-	    break;
-
-	case BLT_SWITCH_FLOAT:
-	    {
-		double value;
-
-		if (Tcl_GetDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(float *)ptr = (float)value;
-	    }
-	    break;
-
-	case BLT_SWITCH_INT:
-	    if (Tcl_GetIntFromObj(interp, objPtr, (int *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_SWITCH_INT_NNEG:
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_NNEG, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = (int)value;
-	    }
-	    break;
-
-	case BLT_SWITCH_INT_POS:
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_POS, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(int *)ptr = (int)value;
-	    }
-	    break;
-
-	case BLT_SWITCH_LIST:
-	    {
-		int argc;
-
-		if (Tcl_SplitList(interp, Tcl_GetString(objPtr), &argc, 
-				  (const char ***)ptr) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	    break;
-
-	case BLT_SWITCH_LONG:
-	    if (Tcl_GetLongFromObj(interp, objPtr, (long *)ptr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	case BLT_SWITCH_LONG_NNEG:
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_NNEG, 
-			&value) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(long *)ptr = value;
-	    }
-	    break;
-
-	case BLT_SWITCH_LONG_POS:
-	    {
-		long value;
-		
-		if (Blt_GetCountFromObj(interp, objPtr, COUNT_POS, &value)
-			!= TCL_OK) {
-		    return TCL_ERROR;
-		}
-		*(long *)ptr = value;
-	    }
-	    break;
-
-	case BLT_SWITCH_STRING: 
-	    {
-		char *value;
-		
-		value = Tcl_GetString(objPtr);
-		value =  (*value == '\0') ?  NULL : Blt_AssertStrdup(value);
-		if (*(char **)ptr != NULL) {
-		    Blt_Free(*(char **)ptr);
-		}
-		*(char **)ptr = value;
-	    }
-#ifdef notdef
-	    {
-		char *old, *new, **strPtr;
-		char *string;
-
-		string = Tcl_GetString(objPtr);
-		strPtr = (char **)ptr;
-		new = ((*string == '\0') && (sp->flags & BLT_SWITCH_NULL_OK))
-		    ? NULL : Blt_AssertStrdup(string);
-		old = *strPtr;
-		if (old != NULL) {
-		    Blt_Free(old);
-		}
-		*strPtr = new;
-	    }
-#endif
-	    break;
-
-	case BLT_SWITCH_CUSTOM:
-	    assert(sp->customPtr != NULL);
-	    if ((*sp->customPtr->parseProc)(sp->customPtr->clientData, interp,
-		sp->switchName, objPtr, (char *)record, sp->offset, sp->flags) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    break;
-
-	default: 
-	    Tcl_AppendResult(interp, "bad switch table: unknown type \"",
-		 Blt_Itoa(sp->type), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	sp++;
-    } while ((sp->switchName == NULL) && (sp->type != BLT_SWITCH_END));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ParseSwitches --
- *
- *	Process command-line switches to fill in fields of a record with
- *	resources and other parameters.
- *
- * Results:
- *	Returns the number of arguments comsumed by parsing the command line.
- *	If an error occurred, -1 will be returned and an error messages can be
- *	found as the interpreter result.
- *
- * Side effects:
- *	The fields of widgRec get filled in with information from argc/argv.
- *	Old information in widgRec's fields gets recycled.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ParseSwitches(
-    Tcl_Interp *interp,		/* Interpreter for error reporting. */
-    Blt_SwitchSpec *specs,	/* Describes legal switches. */
-    int objc,			/* Number of elements in argv. */
-    Tcl_Obj *const *objv,	/* Command-line switches. */
-    void *record,		/* Record whose fields are to be modified.
-				 * Values must be properly initialized. */
-    int flags)			/* Used to specify additional flags that must
-				 * be present in switch specs for them to be
-				 * considered.  */
-{
-    Blt_SwitchSpec *sp;
-    int count;
-    int needFlags;		/* Specs must contain this set of flags or
-				 * else they are not considered. */
-    int hateFlags;		/* If a spec contains any bits here, it's not
-				 * considered. */
-
-    needFlags = flags & ~(BLT_SWITCH_USER_BIT - 1);
-    hateFlags = 0;
-
-    /*
-     * Pass 1:  Clear the change flags on all the specs so that we 
-     *          can check it later.
-     */
-    for (sp = specs; sp->type != BLT_SWITCH_END; sp++) {
-	sp->flags &= ~BLT_SWITCH_SPECIFIED;
-    }
-    /*
-     * Pass 2:  Process the arguments that match entries in the specs.
-     *		It's an error if the argument doesn't match anything.
-     */
-    for (count = 0; count < objc; count++) {
-	char *arg;
-	int length;
-
-	arg = Tcl_GetStringFromObj(objv[count], &length);
-	if (flags & BLT_SWITCH_OBJV_PARTIAL) {
-	    /* 
-	     * If the argument doesn't start with a '-' (not a switch) or is
-	     * '--', stop processing and return the number of arguments
-	     * comsumed.
-	     */
-	    if (arg[0] != '-') {
-		return count;
-	    }
-	    if ((arg[1] == '-') && (arg[2] == '\0')) {
-		return count + 1; /* include the "--" in the count. */
-	    }
-	}
-	sp = FindSwitchSpec(interp, specs, arg, length, needFlags, hateFlags);
-	if (sp == NULL) {
-	    return -1;
-	}
-	if (sp->type == BLT_SWITCH_BITMASK) {
-	    char *ptr;
-
-	    ptr = (char *)record + sp->offset;
-	    *((int *)ptr) |= sp->mask;
-	} else if (sp->type == BLT_SWITCH_BITMASK_INVERT) {
-	    char *ptr;
-	    
-	    ptr = (char *)record + sp->offset;
-	    *((int *)ptr) &= ~sp->mask;
-	} else if (sp->type == BLT_SWITCH_VALUE) {
-	    char *ptr;
-	    
-	    ptr = (char *)record + sp->offset;
-	    *((int *)ptr) = sp->mask;
-	} else {
-	    count++;
-	    if (count == objc) {
-		Tcl_AppendResult(interp, "value for \"", arg, "\" missing", 
-				 (char *) NULL);
-		return -1;
-	    }
-	    if (DoSwitch(interp, sp, objv[count], record) != TCL_OK) {
-		char msg[200];
-
-		sprintf_s(msg, 200, "\n    (processing \"%.40s\" switch)", 
-			sp->switchName);
-		Tcl_AddErrorInfo(interp, msg);
-		return -1;
-	    }
-	}
-	sp->flags |= BLT_SWITCH_SPECIFIED;
-    }
-    return count;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeSwitches --
- *
- *	Free up all resources associated with switches.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-void
-Blt_FreeSwitches(
-    Blt_SwitchSpec *specs,	/* Describes legal switches. */
-    void *record,		/* Record whose fields contain current values
-				 * for switches. */
-    int needFlags)		/* Used to specify additional flags that must
-				 * be present in config specs for them to be
-				 * considered. */
-{
-    Blt_SwitchSpec *sp;
-
-    for (sp = specs; sp->type != BLT_SWITCH_END; sp++) {
-	if ((sp->flags & needFlags) == needFlags) {
-	    char *ptr;
-
-	    ptr = (char *)record + sp->offset;
-	    switch (sp->type) {
-	    case BLT_SWITCH_STRING:
-	    case BLT_SWITCH_LIST:
-		if (*((char **) ptr) != NULL) {
-		    Blt_Free(*((char **) ptr));
-		    *((char **) ptr) = NULL;
-		}
-		break;
-
-	    case BLT_SWITCH_CUSTOM:
-		assert(sp->customPtr != NULL);
-		if ((*(char **)ptr != NULL) && 
-		    (sp->customPtr->freeProc != NULL)) {
-		    (*sp->customPtr->freeProc)((char *)record, sp->offset, 
-			sp->flags);
-		}
-		break;
-
-	    default:
-		break;
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SwitchModified --
- *
- *      Given the configuration specifications and one or more switch patterns
- *      (terminated by a NULL), indicate if any of the matching switches has
- *      been reset.
- *
- * Results:
- *      Returns 1 if one of the switches have changed, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int 
-Blt_SwitchChanged TCL_VARARGS_DEF(Blt_SwitchSpec *, arg1)
-{
-    va_list argList;
-    Blt_SwitchSpec *specs;
-    Blt_SwitchSpec *sp;
-    char *switchName;
-
-    specs = TCL_VARARGS_START(Blt_SwitchSpec *, arg1, argList);
-    while ((switchName = va_arg(argList, char *)) != NULL) {
-	for (sp = specs; sp->type != BLT_SWITCH_END; sp++) {
-	    if ((Tcl_StringMatch(sp->switchName, switchName)) &&
-		(sp->flags & BLT_SWITCH_SPECIFIED)) {
-		va_end(argList);
-		return 1;
-	    }
-	}
-    }
-    va_end(argList);
-    return 0;
-}
-
-int 
-Blt_ExprDoubleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *valuePtr)
-{
-    /* First try to extract the value as a double precision number. */
-    if (Tcl_GetDoubleFromObj((Tcl_Interp *)NULL, objPtr, valuePtr) == TCL_OK) {
-	return TCL_OK;
-    }
-    /* Then try to parse it as an expression. */
-    if (Tcl_ExprDouble(interp, Tcl_GetString(objPtr), valuePtr) == TCL_OK) {
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-
-int 
-Blt_ExprIntFromObj(
-    Tcl_Interp *interp, 
-    Tcl_Obj *objPtr, 
-    int *valuePtr)
-{
-    long lvalue;
-
-    /* First try to extract the value as a simple integer. */
-    if (Tcl_GetIntFromObj((Tcl_Interp *)NULL, objPtr, valuePtr) == TCL_OK) {
-	return TCL_OK;
-    }
-    /* Otherwise try to parse it as an expression. */
-    if (Tcl_ExprLong(interp, Tcl_GetString(objPtr), &lvalue) == TCL_OK) {
-	*valuePtr = lvalue;
-	return TCL_OK;
-    }
-    return TCL_ERROR;
-}
-
diff --git a/blt3.0/src/bltSwitch.h b/blt3.0/src/bltSwitch.h
deleted file mode 100644
index 603c73f..0000000
--- a/blt3.0/src/bltSwitch.h
+++ /dev/null
@@ -1,136 +0,0 @@
-
-/*
- * bltSwitch.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef BLT_SWITCH_H
-#define BLT_SWITCH_H
-
-#ifdef HAVE_STDDEF_H
-#  include <stddef.h>
-#endif /* HAVE_STDDEF_H */
-
-#ifndef Blt_Offset
-#ifdef offsetof
-#define Blt_Offset(type, field) ((int) offsetof(type, field))
-#else
-#define Blt_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
-#endif
-#endif /* Blt_Offset */
-
-typedef int (Blt_SwitchParseProc)(ClientData clientData, Tcl_Interp *interp, 
-	const char *switchName, Tcl_Obj *valueObjPtr, char *record, int offset,
-	int flags);
-typedef void (Blt_SwitchFreeProc)(char *record, int offset, int flags);
-
-typedef struct {
-    Blt_SwitchParseProc *parseProc; /* Procedure to parse a switch
-				     * value and store it in its *
-				     * converted form in the data *
-				     * record. */
-
-    Blt_SwitchFreeProc *freeProc; /* Procedure to free a switch. */
-
-    ClientData clientData;	/* Arbitrary one-word value used by
-				 * switch parser, passed to
-				 * parseProc. */
-} Blt_SwitchCustom;
-
-
-/*
- * Type values for Blt_SwitchSpec structures.  See the user
- * documentation for details.
- */
-typedef enum {
-    BLT_SWITCH_BOOLEAN, 
-    BLT_SWITCH_DOUBLE, 
-    BLT_SWITCH_BITMASK, 
-    BLT_SWITCH_BITMASK_INVERT, 
-    BLT_SWITCH_FLOAT, 
-    BLT_SWITCH_INT, 
-    BLT_SWITCH_INT_NNEG, 
-    BLT_SWITCH_INT_POS,
-    BLT_SWITCH_LIST, 
-    BLT_SWITCH_LONG, 
-    BLT_SWITCH_LONG_NNEG, 
-    BLT_SWITCH_LONG_POS,
-    BLT_SWITCH_OBJ,
-    BLT_SWITCH_STRING, 
-    BLT_SWITCH_VALUE, 
-    BLT_SWITCH_CUSTOM, 
-    BLT_SWITCH_END
-} Blt_SwitchTypes;
-
-
-typedef struct {
-    Blt_SwitchTypes type;	/* Type of option, such as
-				 * BLT_SWITCH_COLOR; see definitions
-				 * below.  Last option in table must
-				 * have type BLT_SWITCH_END. */
-
-    const char *switchName;	/* Switch used to specify option in
-				 * argv.  NULL means this spec is part
-				 * of a group. */
-
-    const char *help;		/* Help string. */
-    int offset;			/* Where in widget record to store
-				 * value; use Blt_Offset macro to
-				 * generate values for this. */
-
-    int flags;			/* Any combination of the values
-				 * defined below. */
-
-    unsigned int mask;
-
-    Blt_SwitchCustom *customPtr; /* If type is BLT_SWITCH_CUSTOM then
-				 * this is a pointer to info about how
-				 * to parse and print the option.
-				 * Otherwise it is irrelevant. */
-} Blt_SwitchSpec;
-
-#define BLT_SWITCH_DEFAULTS		(0)
-#define BLT_SWITCH_ARGV_PARTIAL		(1<<1)
-#define BLT_SWITCH_OBJV_PARTIAL		(1<<1)
-
-/*
- * Possible flag values for Blt_SwitchSpec structures.  Any bits at or
- * above BLT_SWITCH_USER_BIT may be used by clients for selecting
- * certain entries.
- */
-#define BLT_SWITCH_NULL_OK		(1<<0)
-#define BLT_SWITCH_DONT_SET_DEFAULT	(1<<3)
-#define BLT_SWITCH_SPECIFIED		(1<<4)
-#define BLT_SWITCH_USER_BIT		(1<<8)
-
-BLT_EXTERN int Blt_ParseSwitches(Tcl_Interp *interp, Blt_SwitchSpec *specPtr, 
-	int objc, Tcl_Obj *const *objv, void *rec, int flags);
-
-BLT_EXTERN void Blt_FreeSwitches(Blt_SwitchSpec *specs, void *rec, int flags);
-
-BLT_EXTERN int Blt_SwitchChanged TCL_VARARGS(Blt_SwitchSpec *, specs);
- 
-#endif /* BLT_SWITCH_H */
diff --git a/blt3.0/src/bltTable.c b/blt3.0/src/bltTable.c
deleted file mode 100644
index 0dccd2e..0000000
--- a/blt3.0/src/bltTable.c
+++ /dev/null
@@ -1,5051 +0,0 @@
-
-/*
- * bltTable.c --
- *
- * This module implements a table-based geometry manager for the BLT toolkit.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * To do:
- *
- * 3) No way to detect if widget is already a container of another geometry
- *    manager.  This one is especially bad with toplevel widgets, causing the
- *    window manager to lock-up trying to handle the myriads of resize requests.
- *
- *   Note:  This problem continues in Tk 8.x.  It's possible for a widget
- *	    to be a container for two different geometry managers.  Each manager
- *	    will set its own requested geometry for the container widget. The
- *	    winner sets the geometry last (sometimes ad infinitum).
- *
- * 7) Relative sizing of partitions?
- *
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltSwitch.h"
-#include "bltTable.h"
-
-#define TABLE_THREAD_KEY	"BLT Table Data"
-#define TABLE_DEF_PAD		0
-
-/*
- * Default values for widget attributes.
- */
-#define DEF_TABLE_ANCHOR	"center"
-#define DEF_TABLE_COLUMNS 	"0"
-#define DEF_TABLE_FILL		"none"
-#define DEF_TABLE_PAD		"0"
-#define DEF_TABLE_PROPAGATE 	"1"
-#define DEF_TABLE_RESIZE	"both"
-#define DEF_TABLE_ROWS		"0"
-#define DEF_TABLE_SPAN		"1"
-#define DEF_TABLE_CONTROL	"normal"
-#define DEF_TABLE_WEIGHT	"1.0"
-
-#define ENTRY_DEF_PAD		0
-#define ENTRY_DEF_ANCHOR	TK_ANCHOR_CENTER
-#define ENTRY_DEF_FILL		FILL_NONE
-#define ENTRY_DEF_SPAN		1
-#define ENTRY_DEF_CONTROL	CONTROL_NORMAL
-#define ENTRY_DEF_IPAD		0
-
-#define ROWCOL_DEF_RESIZE	(RESIZE_BOTH | RESIZE_VIRGIN)
-#define ROWCOL_DEF_PAD		0
-#define ROWCOL_DEF_WEIGHT	1.0
-
-#define	MATCH_PATTERN   (1<<0)	/* Find widgets whose path names
-				 * match a given pattern */
-#define	MATCH_SPAN	(1<<1)	/* Find widgets that span index  */
-#define	MATCH_START	(1<<2)	/* Find widgets that start at index */
-
-
-static Blt_Uid rowUid, columnUid;
-
-static Tk_GeomRequestProc WidgetGeometryProc;
-static Tk_GeomLostSlaveProc WidgetCustodyProc;
-static Tk_GeomMgr tableMgrInfo =
-{
-    (char *)"table",		/* Name of geometry manager used by winfo */
-    WidgetGeometryProc,		/* Procedure to for new geometry requests */
-    WidgetCustodyProc,		/* Procedure when widget is taken away */
-};
-
-static Blt_OptionParseProc ObjToLimits;
-static Blt_OptionPrintProc LimitsToObj;
-static Blt_CustomOption limitsOption =
-{
-    ObjToLimits, LimitsToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToControl;
-static Blt_OptionPrintProc ControlToObj;
-static Blt_CustomOption controlOption =
-{
-    ObjToControl, ControlToObj, NULL, (ClientData)0
-};
-
-static Blt_ConfigSpec rowConfigSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-height", (char *)NULL, (char *)NULL, (char *)NULL, 
-	Blt_Offset(RowColumn, reqSize), 0, &limitsOption},
-    {BLT_CONFIG_PAD, "-pady", (char *)NULL, (char *)NULL, DEF_TABLE_PAD, 
-	Blt_Offset(RowColumn, pad), BLT_CONFIG_DONT_SET_DEFAULT, },
-    {BLT_CONFIG_RESIZE, "-resize", (char *)NULL, (char *)NULL, DEF_TABLE_RESIZE,
-	Blt_Offset(RowColumn, resize), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-weight", (char *)NULL, (char *)NULL, DEF_TABLE_WEIGHT,
-	Blt_Offset(RowColumn, weight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_ConfigSpec columnConfigSpecs[] =
-{
-    {BLT_CONFIG_PAD, "-padx", (char *)NULL, (char *)NULL, DEF_TABLE_PAD, 
-	Blt_Offset(RowColumn, pad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RESIZE, "-resize", (char *)NULL, (char *)NULL, DEF_TABLE_RESIZE,
-	Blt_Offset(RowColumn, resize), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FLOAT, "-weight", (char *)NULL, (char *)NULL, DEF_TABLE_WEIGHT,
-	Blt_Offset(RowColumn, weight), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&limitsOption},
-    {BLT_CONFIG_CUSTOM, "-width", (char *)NULL, (char *)NULL, (char *)NULL, 
-	Blt_Offset(RowColumn, reqSize), 0, &limitsOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Blt_ConfigSpec entryConfigSpecs[] =
-{
-    {BLT_CONFIG_ANCHOR, "-anchor", (char *)NULL, (char *)NULL,
-	DEF_TABLE_ANCHOR, Blt_Offset(TableEntry, anchor),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT, "-columnspan", "columnSpan", (char *)NULL,
-	DEF_TABLE_SPAN, Blt_Offset(TableEntry, column.span),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-columncontrol", "columnControl", (char *)NULL,
-	DEF_TABLE_CONTROL, Blt_Offset(TableEntry, column.control),
-	BLT_CONFIG_DONT_SET_DEFAULT, &controlOption},
-    {BLT_CONFIG_SYNONYM, "-cspan", "columnSpan", (char *)NULL, (char *)NULL, 
-	Blt_Offset(TableEntry, column.span), 0},
-    {BLT_CONFIG_SYNONYM, "-ccontrol", "columnControl", (char *)NULL, 
-	(char *)NULL, Blt_Offset(TableEntry, column.control), 0},
-    {BLT_CONFIG_FILL, "-fill", (char *)NULL, (char *)NULL, DEF_TABLE_FILL, 
-	Blt_Offset(TableEntry, fill), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-height", "reqHeight", (char *)NULL,
-	(char *)NULL, Blt_Offset(TableEntry, reqHeight), 0},
-    {BLT_CONFIG_PAD, "-padx", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(TableEntry, xPad), 0},
-    {BLT_CONFIG_PAD, "-pady", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(TableEntry, yPad), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipadx", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(TableEntry, ixPad), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-ipady", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(TableEntry, iyPad), 0},
-    {BLT_CONFIG_CUSTOM, "-reqheight", "reqHeight", (char *)NULL, (char *)NULL, 
-	Blt_Offset(TableEntry, reqHeight), 0, &limitsOption},
-    {BLT_CONFIG_CUSTOM, "-reqwidth", "reqWidth", (char *)NULL, (char *)NULL, 
-	Blt_Offset(TableEntry, reqWidth), 0, &limitsOption},
-    {BLT_CONFIG_INT, "-rowspan", "rowSpan", (char *)NULL, DEF_TABLE_SPAN, 
-	Blt_Offset(TableEntry, row.span), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-rowcontrol", "rowControl", (char *)NULL,
-	DEF_TABLE_CONTROL, Blt_Offset(TableEntry, row.control),
-	BLT_CONFIG_DONT_SET_DEFAULT, &controlOption},
-    {BLT_CONFIG_SYNONYM, "-rspan", "rowSpan", (char *)NULL, (char *)NULL, 
-	Blt_Offset(TableEntry, row.span), 0},
-    {BLT_CONFIG_SYNONYM, "-rcontrol", "rowControl", (char *)NULL, (char *)NULL,
-	Blt_Offset(TableEntry, row.control), 0},
-    {BLT_CONFIG_SYNONYM, "-width", "reqWidth", (char *)NULL, (char *)NULL, 
-	Blt_Offset(TableEntry, reqWidth), 0},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Blt_ConfigSpec tableConfigSpecs[] =
-{
-    {BLT_CONFIG_PAD, "-padx", (char *)NULL, (char *)NULL,
-	DEF_TABLE_PAD, Blt_Offset(Table, xPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pady", (char *)NULL, (char *)NULL,
-	DEF_TABLE_PAD, Blt_Offset(Table, yPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-propagate", (char *)NULL, (char *)NULL,
-	DEF_TABLE_PROPAGATE, Blt_Offset(Table, propagate),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-reqheight", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Table, reqHeight), 0, &limitsOption},
-    {BLT_CONFIG_CUSTOM, "-reqwidth", (char *)NULL, (char *)NULL,
-	(char *)NULL, Blt_Offset(Table, reqWidth), 0, &limitsOption},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-static Blt_SwitchParseProc ObjToPosition;
-static Blt_SwitchCustom positionSwitch =
-{
-    ObjToPosition, NULL, 0,
-};
-
-typedef struct {
-    int rspan, cspan;
-    int rstart, cstart;
-    int flags;
-    const char *pattern;
-    Table *tablePtr;
-} SearchSwitches;
-
-static Blt_SwitchSpec searchSwitches[] = 
-{
-    {BLT_SWITCH_STRING, "-pattern", "pattern",
-	Blt_Offset(SearchSwitches, pattern), 0, 0,},
-    {BLT_SWITCH_CUSTOM, "-span",    "int",
-	0, 0, 0, &positionSwitch},
-    {BLT_SWITCH_CUSTOM, "-start",   "position",
-	0, 0, 0, &positionSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    const char *pattern;
-    const char *slave;
-} NamesSwitches;
-
-static Blt_SwitchSpec namesSwitches[] = 
-{
-    {BLT_SWITCH_STRING, "-pattern", "pattern",
-	Blt_Offset(NamesSwitches, pattern), 0, 0,},
-    {BLT_SWITCH_STRING, "-slave", "widget",
-	Blt_Offset(NamesSwitches, slave), 0, 0},
-    {BLT_SWITCH_END}
-};
-
-/*
- * Forward declarations
- */
-static Tcl_FreeProc DestroyTable;
-static Tcl_IdleProc ArrangeTable;
-static Tcl_InterpDeleteProc TableInterpDeleteProc;
-static Tcl_ObjCmdProc TableCmd;
-static Tk_EventProc TableEventProc;
-static Tk_EventProc WidgetEventProc;
-
-static void DestroyEntry(TableEntry * tePtr);
-static void BinEntry(Table *tablePtr, TableEntry * tePtr);
-static RowColumn *InitSpan(PartitionInfo * piPtr, int start, int span);
-static int ParseItem(Table *tablePtr, const char *string, int *rowPtr, 
-	int *colPtr);
-
-static EntrySearchProc FindEntry;
-
-typedef int (TableCmdProc)(TableInterpData *dataPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLimits --
- *
- *	Converts the list of elements into zero or more pixel values which
- *	determine the range of pixel values possible.  An element can be in
- *	any form accepted by Tk_GetPixels. The list has a different meaning
- *	based upon the number of elements.
- *
- *	    # of elements:
- *
- *	    0 - the limits are reset to the defaults.
- *	    1 - the minimum and maximum values are set to this
- *		value, freezing the range at a single value.
- *	    2 - first element is the minimum, the second is the
- *		maximum.
- *	    3 - first element is the minimum, the second is the
- *		maximum, and the third is the nominal value.
- *
- *	Any element may be the empty string which indicates the default.
- *
- * Results:
- *	The return value is a standard TCL result.  The min and max fields
- *	of the range are set.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLimits(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Widget of table */
-    Tcl_Obj *objPtr,		/* New width list */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Limits *limitsPtr = (Limits *)(widgRec + offset);
-    const char **argv;
-    int argc;
-    int limArr[3];
-    Tk_Window winArr[3];
-    int limitsFlags;
-
-    argv = NULL;
-    argc = 0;
-
-    /* Initialize limits to default values */
-    limArr[2] = LIMITS_NOM;
-    limArr[1] = LIMITS_MAX;
-    limArr[0] = LIMITS_MIN;
-    winArr[0] = winArr[1] = winArr[2] = NULL;
-    limitsFlags = 0;
-
-    if (objPtr != NULL) {
-	int size;
-	int i;
-	const char *string;
-
-	string = Tcl_GetString(objPtr);
-	if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (argc > 3) {
-	    Tcl_AppendResult(interp, "wrong # limits \"", string, "\"",
-		(char *)NULL);
-	    goto error;
-	}
-	for (i = 0; i < argc; i++) {
-	    if (argv[i][0] == '\0') {
-		continue;	/* Empty string: use default value */
-	    }
-	    limitsFlags |= (LIMITS_SET_BIT << i);
-	    if ((argv[i][0] == '.') &&
-		((argv[i][1] == '\0') || isalpha(UCHAR(argv[i][1])))) {
-		Tk_Window tkwin2;
-
-		/* Widget specified: save pointer to widget */
-		tkwin2 = Tk_NameToWindow(interp, argv[i], tkwin);
-		if (tkwin2 == NULL) {
-		    goto error;
-		}
-		winArr[i] = tkwin2;
-	    } else {
-		if (Tk_GetPixels(interp, tkwin, argv[i], &size) != TCL_OK) {
-		    goto error;
-		}
-		if ((size < LIMITS_MIN) || (size > LIMITS_MAX)) {
-		    Tcl_AppendResult(interp, "bad limits \"", string, "\"",
-			(char *)NULL);
-		    goto error;
-		}
-		limArr[i] = size;
-	    }
-	}
-	Blt_Free(argv);
-    }
-    /*
-    * Check the limits specified.  We can't check the requested
-    * size of widgets.
-    */
-    switch (argc) {
-    case 1:
-	limitsFlags |= (LIMITS_SET_MIN | LIMITS_SET_MAX);
-	if (winArr[0] == NULL) {
-	    limArr[1] = limArr[0];	/* Set minimum and maximum to value */
-	} else {
-	    winArr[1] = winArr[0];
-	}
-	break;
-
-    case 2:
-	if ((winArr[0] == NULL) && (winArr[1] == NULL) &&
-	    (limArr[1] < limArr[0])) {
-	    Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-		"\": min > max", (char *)NULL);
-	    return TCL_ERROR;	/* Minimum is greater than maximum */
-	}
-	break;
-
-    case 3:
-	if ((winArr[0] == NULL) && (winArr[1] == NULL)) {
-	    if (limArr[1] < limArr[0]) {
-		Tcl_AppendResult(interp, "bad range \"", Tcl_GetString(objPtr),
-		    "\": min > max", (char *)NULL);
-		return TCL_ERROR;	/* Minimum is greater than maximum */
-	    }
-	    if ((winArr[2] == NULL) &&
-		((limArr[2] < limArr[0]) || (limArr[2] > limArr[1]))) {
-		Tcl_AppendResult(interp, "nominal value \"", 
-		    Tcl_GetString(objPtr),
-		    "\" out of range", (char *)NULL);
-		return TCL_ERROR;	/* Nominal is outside of range defined
-					 * by minimum and maximum */
-	    }
-	}
-	break;
-    }
-    limitsPtr->min = limArr[0];
-    limitsPtr->max = limArr[1];
-    limitsPtr->nom = limArr[2];
-    limitsPtr->wMin = winArr[0];
-    limitsPtr->wMax = winArr[1];
-    limitsPtr->wNom = winArr[2];
-    limitsPtr->flags = limitsFlags;
-    return TCL_OK;
-  error:
-    Blt_Free(argv);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetLimits --
- *
- *	Resets the limits to their default values.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static void
-ResetLimits(Limits *limitsPtr)	/* Limits to be imposed on the value */
-{
-    limitsPtr->flags = 0;
-    limitsPtr->min = LIMITS_MIN;
-    limitsPtr->max = LIMITS_MAX;
-    limitsPtr->nom = LIMITS_NOM;
-    limitsPtr->wNom = limitsPtr->wMax = limitsPtr->wMin = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedWidth --
- *
- *	Bounds a given width value to the limits described in the limit
- *	structure.  The initial starting value may be overridden by the
- *	nominal value in the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetBoundedWidth(
-    int width,			/* Initial value to be constrained */
-    Limits *limitsPtr)		/* Limits to be imposed on the value */
-{
-    /*
-     * Check widgets for requested width values;
-     */
-    if (limitsPtr->wMin != NULL) {
-	limitsPtr->min = Tk_ReqWidth(limitsPtr->wMin);
-    }
-    if (limitsPtr->wMax != NULL) {
-	limitsPtr->max = Tk_ReqWidth(limitsPtr->wMax);
-    }
-    if (limitsPtr->wNom != NULL) {
-	limitsPtr->nom = Tk_ReqWidth(limitsPtr->wNom);
-    }
-    if (limitsPtr->flags & LIMITS_SET_NOM) {
-	width = limitsPtr->nom;	/* Override initial value */
-    }
-    if (width < limitsPtr->min) {
-	width = limitsPtr->min;	/* Bounded by minimum value */
-    } else if (width > limitsPtr->max) {
-	width = limitsPtr->max;	/* Bounded by maximum value */
-    }
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBoundedHeight --
- *
- *	Bounds a given value to the limits described in the limit structure.
- *	The initial starting value may be overridden by the nominal value in
- *	the limits.
- *
- * Results:
- *	Returns the constrained value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetBoundedHeight(
-    int height,			/* Initial value to be constrained */
-    Limits *limitsPtr)		/* Limits to be imposed on the value */
-{
-    /*
-     * Check widgets for requested height values;
-     */
-    if (limitsPtr->wMin != NULL) {
-	limitsPtr->min = Tk_ReqHeight(limitsPtr->wMin);
-    }
-    if (limitsPtr->wMax != NULL) {
-	limitsPtr->max = Tk_ReqHeight(limitsPtr->wMax);
-    }
-    if (limitsPtr->wNom != NULL) {
-	limitsPtr->nom = Tk_ReqHeight(limitsPtr->wNom);
-    }
-    if (limitsPtr->flags & LIMITS_SET_NOM) {
-	height = limitsPtr->nom;/* Override initial value */
-    }
-    if (height < limitsPtr->min) {
-	height = limitsPtr->min;/* Bounded by minimum value */
-    } else if (height > limitsPtr->max) {
-	height = limitsPtr->max;/* Bounded by maximum value */
-    }
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfLimits --
- *
- *	Convert the values into a list representing the limits.
- *
- * Results:
- *	The static string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfLimits(Limits *limitsPtr)
-{
-    Tcl_DString buffer;
-#define STRING_SPACE 200
-    static char string[STRING_SPACE + 1];
-
-    Tcl_DStringInit(&buffer);
-
-    if (limitsPtr->wMin != NULL) {
-	Tcl_DStringAppendElement(&buffer, Tk_PathName(limitsPtr->wMin));
-    } else if (limitsPtr->flags & LIMITS_SET_MIN) {
-	Tcl_DStringAppendElement(&buffer, Blt_Itoa(limitsPtr->min));
-    } else {
-	Tcl_DStringAppendElement(&buffer, "");
-    }
-
-    if (limitsPtr->wMax != NULL) {
-	Tcl_DStringAppendElement(&buffer, Tk_PathName(limitsPtr->wMax));
-    } else if (limitsPtr->flags & LIMITS_SET_MAX) {
-	Tcl_DStringAppendElement(&buffer, Blt_Itoa(limitsPtr->max));
-    } else {
-	Tcl_DStringAppendElement(&buffer, "");
-    }
-
-    if (limitsPtr->wNom != NULL) {
-	Tcl_DStringAppendElement(&buffer, Tk_PathName(limitsPtr->wNom));
-    } else if (limitsPtr->flags & LIMITS_SET_NOM) {
-	Tcl_DStringAppendElement(&buffer, Blt_Itoa(limitsPtr->nom));
-    } else {
-	Tcl_DStringAppendElement(&buffer, "");
-    }
-    strncpy(string, Tcl_DStringValue(&buffer), STRING_SPACE);
-    string[STRING_SPACE] = '\0';
-    return string;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LimitsToObj --
- *
- *	Convert the limits of the pixel values allowed into a list.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LimitsToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Row/column structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Limits *limitsPtr = (Limits *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfLimits(limitsPtr), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToControl --
- *
- *	Converts the control string into its numeric representation.  Valid
- *	control strings are "none", "normal", and "full".
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToControl(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Control style string */
-    char *widgRec,		/* Entry structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    const char *string;
-    char c;
-    float *controlPtr = (float *)(widgRec + offset);
-    int bool;
-    int length;
-
-    if (Tcl_GetBooleanFromObj(NULL, objPtr, &bool) == TCL_OK) {
-	*controlPtr = bool;
-	return TCL_OK;
-    }
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (length > 1) &&
-	(strncmp(string, "normal", length) == 0)) {
-	*controlPtr = CONTROL_NORMAL;
-    } else if ((c == 'n') && (length > 1) &&
-	(strncmp(string, "none", length) == 0)) {
-	*controlPtr = CONTROL_NONE;
-    } else if ((c == 'f') && (strncmp(string, "full", length) == 0)) {
-	*controlPtr = CONTROL_FULL;
-    } else {
-	double control;
-
-	if ((Tcl_GetDoubleFromObj(interp, objPtr, &control) != TCL_OK) ||
-	    (control < 0.0)) {
-	    Tcl_AppendResult(interp, "bad control argument \"", string,
-		"\": should be \"normal\", \"none\", or \"full\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	*controlPtr = (float)control;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NameOfControl --
- *
- *	Converts the control value into its string representation.
- *
- * Results:
- *	Returns a pointer to the static name string.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfControl(float control)
-{
-    if (control == CONTROL_NORMAL) {
-	return "normal";
-    } else if (control == CONTROL_NONE) {
-	return "none";
-    } else if (control == CONTROL_FULL) {
-	return "full";
-    } else {
-	static char string[TCL_DOUBLE_SPACE];
-
-	sprintf_s(string, TCL_DOUBLE_SPACE, "%g", (double)control);
-	return string;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ControlToObj --
- *
- *	Returns control mode string based upon the control flags.
- *
- * Results:
- *	The control mode string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ControlToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Row/column structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    float control = *(float *)(widgRec + offset);
-
-    return Tcl_NewStringObj(NameOfControl(control), -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToPosition --
- *
- *	Converts the position mode into its numeric representation.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToPosition(
-    ClientData clientData,	/* Flag indicating if the node is considered
-				 * before or after the insertion position. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    SearchSwitches *searchPtr = (SearchSwitches *)record;
-    int row, column;
-
-    if (ParseItem(searchPtr->tablePtr, Tcl_GetString(objPtr), &row, &column) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (strcmp(switchName, "-span") == 0) {
-	searchPtr->flags |= MATCH_SPAN;
-	searchPtr->rspan = row;
-	searchPtr->cspan = column;
-    } else if (strcmp(switchName, "-start") == 0) {
-	searchPtr->flags |= MATCH_START;
-	searchPtr->rstart = row;
-	searchPtr->cstart = column;
-    }
-    return TCL_OK;
-}
-
-
-static void
-EventuallyArrangeTable(Table *tablePtr)
-{
-    if (!(tablePtr->flags & ARRANGE_PENDING)) {
-	tablePtr->flags |= ARRANGE_PENDING;
-	Tcl_DoWhenIdle(ArrangeTable, tablePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableEventProc --
- *
- *	This procedure is invoked by the Tk event handler when the container
- *	widget is reconfigured or destroyed.
- *
- *	The table will be rearranged at the next idle point if the container
- *	widget has been resized or moved. There's a distinction made between
- *	parent and non-parent container arrangements.  When the container is
- *	the parent of the embedded widgets, the widgets will automatically
- *	keep their positions relative to the container, even when the
- *	container is moved.  But if the container is not the parent, those
- *	widgets have to be moved manually.  This can be a performance hit in
- *	rare cases where we're scrolling the container (by moving the window)
- *	and there are lots of non-child widgets arranged inside.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the table associated with tkwin to have its layout
- *	re-computed and drawn at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TableEventProc(
-    ClientData clientData,	/* Information about widget */
-    XEvent *eventPtr)		/* Information about event */
-{
-    Table *tablePtr = clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	if ((tablePtr->container.width != Tk_Width(tablePtr->tkwin)) ||
-	    (tablePtr->container.height != Tk_Height(tablePtr->tkwin))
-	    || (tablePtr->flags & NON_PARENT)) {
-	    EventuallyArrangeTable(tablePtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (tablePtr->flags & ARRANGE_PENDING) {
-	    Tcl_CancelIdleCall(ArrangeTable, tablePtr);
-	}
-	tablePtr->tkwin = NULL;
-	Tcl_EventuallyFree(tablePtr, DestroyTable);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidgetEventProc --
- *
- *	This procedure is invoked by the Tk event handler when StructureNotify
- *	events occur in a widget managed by the table.
- *
- *	For example, when a managed widget is destroyed, it frees the
- *	corresponding entry structure and arranges for the table layout to be
- *	re-computed at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	If the managed widget was deleted, the Entry structure gets cleaned up
- *	and the table is rearranged.
- *
- *---------------------------------------------------------------------------
- */
-static void
-WidgetEventProc(
-    ClientData clientData,	/* Pointer to Entry structure for widget
-				 * referred to by eventPtr. */
-    XEvent *eventPtr)		/* Describes what just happened. */
-{
-    TableEntry *tePtr = (TableEntry *) clientData;
-    Table *tablePtr = tePtr->tablePtr;
-
-    if (eventPtr->type == ConfigureNotify) {
-	int borderWidth;
-
-	tablePtr->flags |= REQUEST_LAYOUT;
-	borderWidth = Tk_Changes(tePtr->tkwin)->border_width;
-	if (tePtr->borderWidth != borderWidth) {
-	    tePtr->borderWidth = borderWidth;
-	    EventuallyArrangeTable(tablePtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	tePtr->tkwin = NULL;
-	DestroyEntry(tePtr);
-	tablePtr->flags |= REQUEST_LAYOUT;
-	EventuallyArrangeTable(tablePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidgetCustodyProc --
- *
- * 	This procedure is invoked when a widget has been stolen by another
- * 	geometry manager.  The information and memory associated with the
- * 	widget is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the table to have its layout re-arranged at the next idle
- *	point.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-WidgetCustodyProc(
-    ClientData clientData,	/* Information about the widget */
-    Tk_Window tkwin)		/* Not used. */
-{
-    TableEntry *tePtr = (TableEntry *) clientData;
-    Table *tablePtr = tePtr->tablePtr;
-
-    if (Tk_IsMapped(tePtr->tkwin)) {
-	Tk_UnmapWindow(tePtr->tkwin);
-    }
-    Tk_UnmaintainGeometry(tePtr->tkwin, tablePtr->tkwin);
-    tePtr->tkwin = NULL;
-    DestroyEntry(tePtr);
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidgetGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for widgets managed by
- *	the table geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the table to have its layout re-computed and re-arranged
- *	at the next idle point.
- *
- * ---------------------------------------------------------------------------- */
-/* ARGSUSED */
-static void
-WidgetGeometryProc(
-    ClientData clientData,	/* Information about widget that got new
-				 * preferred geometry.  */
-    Tk_Window tkwin)		/* Other Tk-related information about the
-			         * widget. */
-{
-    TableEntry *tePtr = (TableEntry *) clientData;
-
-    tePtr->tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tePtr->tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindEntry --
- *
- *	Searches for the table entry corresponding to the given widget.
- *
- * Results:
- *	If a structure associated with the widget exists, a pointer to that
- *	structure is returned. Otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-static TableEntry *
-FindEntry(
-    Table *tablePtr,
-    Tk_Window tkwin)		/* Widget associated with table entry */
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&tablePtr->entryTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-static int
-GetEntry(Tcl_Interp *interp, Table *tablePtr, const char *string, 
-	 TableEntry **tePtrPtr)
-{
-    Tk_Window tkwin;
-    TableEntry *tePtr;
-
-    tkwin = Tk_NameToWindow(interp, string, tablePtr->tkwin);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    tePtr = FindEntry(tablePtr, tkwin);
-    if (tePtr == NULL) {
-	Tcl_AppendResult(interp, "\"", Tk_PathName(tkwin),
-	    "\" is not managed by any table", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *tePtrPtr = tePtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEntry --
- *
- *	This procedure creates and initializes a new Entry structure to hold a
- *	widget.  A valid widget has a parent widget that is either a) the
- *	container widget itself or b) a mutual ancestor of the container
- *	widget.
- *
- * Results:
- *	Returns a pointer to the new structure describing the new widget
- *	entry.  If an error occurred, then the return value is NULL and an
- *	error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated and initialized for the Entry structure.
- *
- * ---------------------------------------------------------------------------- 
- */
-static TableEntry *
-CreateEntry(
-    Table *tablePtr,
-    Tk_Window tkwin)
-{
-    TableEntry *tePtr;
-    int dummy;
-    Tk_Window parent, ancestor;
-
-    /*
-     * Check that this widget can be managed by this table.  A valid widget
-     * has a parent widget that either
-     *
-     *    1) is the container widget, or
-     *    2) is a mutual ancestor of the container widget.
-     */
-    ancestor = Tk_Parent(tkwin);
-    for (parent = tablePtr->tkwin; (parent != ancestor) &&
-	(!Tk_IsTopLevel(parent)); parent = Tk_Parent(parent)) {
-	/* empty */
-    }
-    if (ancestor != parent) {
-	Tcl_AppendResult(tablePtr->interp, "can't manage \"",
-	    Tk_PathName(tkwin), "\" in table \"", Tk_PathName(tablePtr->tkwin),
-	    "\"", (char *)NULL);
-	return NULL;
-    }
-    tePtr = Blt_AssertCalloc(1, sizeof(TableEntry));
-
-    /* Initialize the entry structure */
-
-    tePtr->tkwin = tkwin;
-    tePtr->tablePtr = tablePtr;
-    tePtr->borderWidth = Tk_Changes(tkwin)->border_width;
-    tePtr->fill = ENTRY_DEF_FILL;
-    tePtr->row.control = tePtr->column.control = ENTRY_DEF_CONTROL;
-    tePtr->anchor = ENTRY_DEF_ANCHOR;
-    tePtr->row.span = tePtr->column.span = ENTRY_DEF_SPAN;
-    ResetLimits(&tePtr->reqWidth);
-    ResetLimits(&tePtr->reqHeight);
-
-    /*
-     * Add the entry to the following data structures.
-     *
-     * 	1) A chain of widgets managed by the table.
-     *   2) A hash table of widgets managed by the table.
-     */
-    tePtr->link = Blt_Chain_Append(tablePtr->chain, tePtr);
-    tePtr->hashPtr = Blt_CreateHashEntry(&tablePtr->entryTable,
-	(char *)tkwin, &dummy);
-    Blt_SetHashValue(tePtr->hashPtr, tePtr);
-
-    Tk_CreateEventHandler(tkwin, StructureNotifyMask, WidgetEventProc, 
-	tePtr);
-    Tk_ManageGeometry(tkwin, &tableMgrInfo, (ClientData)tePtr);
-
-    return tePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyEntry --
- *
- *	Removes the Entry structure from the hash table and frees the memory
- *	allocated by it.  If the table is still in use (i.e. was not called
- *	from DestoryTable), remove its entries from the lists of row and
- *	column sorted partitions.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the entry is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyEntry(TableEntry *tePtr)
-{
-    Table *tablePtr = tePtr->tablePtr;
-
-    if (tePtr->row.link != NULL) {
-	Blt_Chain_DeleteLink(tePtr->row.chain, tePtr->row.link);
-    }
-    if (tePtr->column.link != NULL) {
-	Blt_Chain_DeleteLink(tePtr->column.chain,
-	    tePtr->column.link);
-    }
-    if (tePtr->link != NULL) {
-	Blt_Chain_DeleteLink(tablePtr->chain, tePtr->link);
-    }
-    if (tePtr->tkwin != NULL) {
-	Tk_DeleteEventHandler(tePtr->tkwin, StructureNotifyMask,
-	      WidgetEventProc, (ClientData)tePtr);
-	Tk_ManageGeometry(tePtr->tkwin, (Tk_GeomMgr *)NULL,
-			  (ClientData)tePtr);
-	if ((tablePtr->tkwin != NULL) && 
-	    (Tk_Parent(tePtr->tkwin) != tablePtr->tkwin)) {
-	    Tk_UnmaintainGeometry(tePtr->tkwin, tablePtr->tkwin);
-	}
-	if (Tk_IsMapped(tePtr->tkwin)) {
-	    Tk_UnmapWindow(tePtr->tkwin);
-	}
-    }
-    if (tePtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&tablePtr->entryTable, tePtr->hashPtr);
-    }
-    Blt_Free(tePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureEntry --
- *
- *	This procedure is called to process an objv/objc list, plus the Tk
- *	option database, in order to configure (or reconfigure) one or more
- *	entries.  Entries hold information about widgets managed by the table
- *	geometry manager.
- *
- * 	Note:	You can query only one widget at a time.  But several can be
- *		reconfigured at once.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	The table layout is recomputed and rearranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureEntry(Table *tablePtr, Tcl_Interp *interp, TableEntry *tePtr,
-	       int objc, Tcl_Obj *const *objv)
-{
-    int oldRowSpan, oldColSpan;
-
-    if (tePtr->tablePtr != tablePtr) {
-	Tcl_AppendResult(interp, "widget  \"", Tk_PathName(tePtr->tkwin),
-	    "\" does not belong to table \"", Tk_PathName(tablePtr->tkwin),
-	    "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	return Blt_ConfigureInfoFromObj(interp, tePtr->tkwin, 
-		entryConfigSpecs, (char *)tePtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, tePtr->tkwin, 
-		entryConfigSpecs, (char *)tePtr, objv[0], 0);
-    }
-    oldRowSpan = tePtr->row.span;
-    oldColSpan = tePtr->column.span;
-
-    if (Blt_ConfigureWidgetFromObj(interp, tePtr->tkwin, entryConfigSpecs,
-	    objc, objv, (char *)tePtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tePtr->column.span < 1) || (tePtr->column.span > USHRT_MAX)) {
-	Tcl_AppendResult(interp, "bad column span specified for \"",
-	    Tk_PathName(tePtr->tkwin), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((tePtr->row.span < 1) || (tePtr->row.span > USHRT_MAX)) {
-	Tcl_AppendResult(interp, "bad row span specified for \"",
-	    Tk_PathName(tePtr->tkwin), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((oldColSpan != tePtr->column.span) ||
-	(oldRowSpan != tePtr->row.span)) {
-	BinEntry(tablePtr, tePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrintEntry --
- *
- *	Returns the name, position and options of a widget in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-PrintEntry(TableEntry *tePtr, Tcl_DString *resultPtr)
-{
-    char string[200];
-
-    sprintf_s(string, 200, "    %d,%d  ", tePtr->row.rcPtr->index,
-	tePtr->column.rcPtr->index);
-    Tcl_DStringAppend(resultPtr, string, -1);
-    Tcl_DStringAppend(resultPtr, Tk_PathName(tePtr->tkwin), -1);
-    if (tePtr->ixPad != ENTRY_DEF_PAD) {
-	Tcl_DStringAppend(resultPtr, " -ipadx ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_Itoa(tePtr->ixPad), -1);
-    }
-    if (tePtr->iyPad != ENTRY_DEF_PAD) {
-	Tcl_DStringAppend(resultPtr, " -ipady ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_Itoa(tePtr->iyPad), -1);
-    }
-    if (tePtr->row.span != ENTRY_DEF_SPAN) {
-	Tcl_DStringAppend(resultPtr, " -rowspan ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_Itoa(tePtr->row.span), -1);
-    }
-    if (tePtr->column.span != ENTRY_DEF_SPAN) {
-	Tcl_DStringAppend(resultPtr, " -columnspan ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_Itoa(tePtr->column.span), -1);
-    }
-    if (tePtr->anchor != ENTRY_DEF_ANCHOR) {
-	Tcl_DStringAppend(resultPtr, " -anchor ", -1);
-	Tcl_DStringAppend(resultPtr, Tk_NameOfAnchor(tePtr->anchor), -1);
-    }
-    if ((tePtr->padLeft != ENTRY_DEF_PAD) ||
-	(tePtr->padRight != ENTRY_DEF_PAD)) {
-	Tcl_DStringAppend(resultPtr, " -padx ", -1);
-	sprintf_s(string, 200, "{%d %d}", tePtr->padLeft, tePtr->padRight);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if ((tePtr->padTop != ENTRY_DEF_PAD) ||
-	(tePtr->padBottom != ENTRY_DEF_PAD)) {
-	Tcl_DStringAppend(resultPtr, " -pady ", -1);
-	sprintf_s(string, 200, "{%d %d}", tePtr->padTop, tePtr->padBottom);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if (tePtr->fill != ENTRY_DEF_FILL) {
-	Tcl_DStringAppend(resultPtr, " -fill ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_NameOfFill(tePtr->fill), -1);
-    }
-    if (tePtr->column.control != ENTRY_DEF_CONTROL) {
-	Tcl_DStringAppend(resultPtr, " -columncontrol ", -1);
-	Tcl_DStringAppend(resultPtr, NameOfControl(tePtr->column.control), -1);
-    }
-    if (tePtr->row.control != ENTRY_DEF_CONTROL) {
-	Tcl_DStringAppend(resultPtr, " -rowcontrol ", -1);
-	Tcl_DStringAppend(resultPtr, NameOfControl(tePtr->row.control), -1);
-    }
-    if ((tePtr->reqWidth.nom != LIMITS_NOM) ||
-	(tePtr->reqWidth.min != LIMITS_MIN) ||
-	(tePtr->reqWidth.max != LIMITS_MAX)) {
-	Tcl_DStringAppend(resultPtr, " -reqwidth {", -1);
-	Tcl_DStringAppend(resultPtr, NameOfLimits(&tePtr->reqWidth), -1);
-	Tcl_DStringAppend(resultPtr, "}", -1);
-    }
-    if ((tePtr->reqHeight.nom != LIMITS_NOM) ||
-	(tePtr->reqHeight.min != LIMITS_MIN) ||
-	(tePtr->reqHeight.max != LIMITS_MAX)) {
-	Tcl_DStringAppend(resultPtr, " -reqheight {", -1);
-	Tcl_DStringAppend(resultPtr, NameOfLimits(&tePtr->reqHeight), -1);
-	Tcl_DStringAppend(resultPtr, "}", -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InfoEntry --
- *
- *	Returns the name, position and options of a widget in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InfoEntry(Tcl_Interp *interp, Table *tablePtr, TableEntry *tePtr)
-{
-    Tcl_DString dString;
-
-    if (tePtr->tablePtr != tablePtr) {
-	Tcl_AppendResult(interp, "widget  \"", Tk_PathName(tePtr->tkwin),
-	    "\" does not belong to table \"", Tk_PathName(tablePtr->tkwin),
-	    "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    PrintEntry(tePtr, &dString);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateRowColumn --
- *
- *	Creates and initializes a structure that manages the size of a row or
- *	column in the table. There will be one of these structures allocated
- *	for each row and column in the table, regardless if a widget is
- *	contained in it or not.
- *
- * Results:
- *	Returns a pointer to the newly allocated row or column structure.
- *
- *---------------------------------------------------------------------------
- */
-static RowColumn *
-CreateRowColumn(void)
-{
-    RowColumn *rcPtr;
-
-    rcPtr = Blt_AssertMalloc(sizeof(RowColumn));
-    rcPtr->resize = ROWCOL_DEF_RESIZE;
-    ResetLimits(&rcPtr->reqSize);
-    rcPtr->nom = LIMITS_NOM;
-    rcPtr->pad.side1 = rcPtr->pad.side2 = ROWCOL_DEF_PAD;
-    rcPtr->size = rcPtr->index = rcPtr->minSpan = 0;
-    rcPtr->weight = ROWCOL_DEF_WEIGHT;
-    return rcPtr;
-}
-
-static PartitionInfo *
-ParseRowColumn2(Table *tablePtr, const char *string, int *numberPtr)
-{
-    char c;
-    int n;
-    PartitionInfo *piPtr;
-
-    c = tolower(string[0]);
-    if (c == 'c') {
-	piPtr = &tablePtr->cols;
-    } else if (c == 'r') {
-	piPtr = &tablePtr->rows;
-    } else {
-	Tcl_AppendResult(tablePtr->interp, "bad index \"", string,
-	    "\": must start with \"r\" or \"c\"", (char *)NULL);
-	return NULL;
-    }
-    /* Handle row or column configuration queries */
-    if (Tcl_GetInt(tablePtr->interp, string + 1, &n) != TCL_OK) {
-	return NULL;
-    }
-    *numberPtr = (int)n;
-    return piPtr;
-}
-
-static PartitionInfo *
-ParseRowColumn(Table *tablePtr, Tcl_Obj *objPtr, int *numberPtr)
-{
-    int n;
-    PartitionInfo *piPtr;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    piPtr = ParseRowColumn2(tablePtr, string, &n);
-    if (piPtr == NULL) {
-	return NULL;
-    }
-    if ((n < 0) || (n >= Blt_Chain_GetLength(piPtr->chain))) {
-	Tcl_AppendResult(tablePtr->interp, "bad ", piPtr->type, " index \"",
-	    string, "\"", (char *)NULL);
-	return NULL;
-    }
-    *numberPtr = (int)n;
-    return piPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetRowColumn --
- *
- *	Gets the designated row or column from the table.  If the row or
- *	column index is greater than the size of the table, new rows/columns
- *	will be automatically allocated.
- *
- * Results:
- *	Returns a pointer to the row or column structure.
- *
- *---------------------------------------------------------------------------
- */
-static RowColumn *
-GetRowColumn(PartitionInfo *piPtr, int n)
-{
-    Blt_ChainLink link;
-    int i;
-
-    for (i = Blt_Chain_GetLength(piPtr->chain); i <= n; i++) {
-	RowColumn *rcPtr;
-
-	rcPtr = CreateRowColumn();
-	rcPtr->index = i;
-	rcPtr->link = Blt_Chain_Append(piPtr->chain, (ClientData)rcPtr);
-    }
-    link = Blt_Chain_GetNthLink(piPtr->chain, n);
-    if (link == NULL) {
-	return NULL;
-    }
-    return Blt_Chain_GetValue(link);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteRowColumn --
- *
- *	Deletes a span of rows/columns from the table. The number of
- *	rows/columns to be deleted is given by span.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The size of the column partition array may be extended and
- *	initialized.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DeleteRowColumn(
-    Table *tablePtr,
-    PartitionInfo *piPtr,
-    RowColumn *rcPtr)
-{
-    /*
-     * Remove any entries that start in the row/column to be deleted.  They
-     * point to memory that will be freed.
-     */
-    if (piPtr->type == rowUid) {
-	Blt_ChainLink link, next;
-
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = next) {
-	    TableEntry *tePtr;
-
-	    next = Blt_Chain_NextLink(link);
-	    tePtr = Blt_Chain_GetValue(link);
-	    if (tePtr->row.rcPtr->index == rcPtr->index) {
-		DestroyEntry(tePtr);
-	    }
-	}
-    } else {
-	Blt_ChainLink link, next;
-
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = next) {
-	    TableEntry *tePtr;
-
-	    next = Blt_Chain_NextLink(link);
-	    tePtr = Blt_Chain_GetValue(link);
-	    if (tePtr->column.rcPtr->index == rcPtr->index) {
-		DestroyEntry(tePtr);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureRowColumn --
- *
- *	This procedure is called to process an objv/objc list in order to
- *	configure a row or column in the table geometry manager.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result holds an error message.
- *
- * Side effects:
- *	Partition configuration options (bounds, resize flags, etc) get set.
- *	New partitions may be created as necessary. The table is recalculated
- *	and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureRowColumn(Table *tablePtr, PartitionInfo *piPtr, const char *pattern,
-		   int objc, Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link;
-    int nMatches;
-
-    nMatches = 0;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-	char string[200];
-
-	rcPtr = Blt_Chain_GetValue(link);
-	sprintf_s(string, 200, "%c%d", pattern[0], rcPtr->index);
-	if (Tcl_StringMatch(string, pattern)) {
-	    if (objc == 0) {
-		return Blt_ConfigureInfoFromObj(tablePtr->interp, 
-			tablePtr->tkwin, piPtr->configSpecs, (char *)rcPtr, 
-			(Tcl_Obj *)NULL, 0);
-	    } else if (objc == 1) {
-		return Blt_ConfigureInfoFromObj(tablePtr->interp, 
-			tablePtr->tkwin, piPtr->configSpecs, (char *)rcPtr, 
-			objv[0], 0);
-	    } else {
-		if (Blt_ConfigureWidgetFromObj(tablePtr->interp, 
-			tablePtr->tkwin, piPtr->configSpecs, objc, objv, 
-			(char *)rcPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	    nMatches++;
-	}
-    }
-    if (nMatches == 0) {
-	int n;
-	RowColumn *rcPtr;
-
-	/* 
-	 * We found no existing partitions matching this pattern, so see if
-	 * this designates an new partition (one beyond the current range).
-	 */
-	if ((Tcl_GetInt(NULL, pattern + 1, &n) != TCL_OK) || (n < 0)) {
-	    Tcl_AppendResult(tablePtr->interp, "pattern \"", pattern, 
-		     "\" matches no ", piPtr->type, " in table \"", 
-		     Tk_PathName(tablePtr->tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	rcPtr = GetRowColumn(piPtr, n);
-	assert(rcPtr);
-	if (Blt_ConfigureWidgetFromObj(tablePtr->interp, tablePtr->tkwin,
-	       piPtr->configSpecs, objc, objv, (char *)rcPtr,
-	       BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    EventuallyArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-static void
-PrintRowColumn(
-    Tcl_Interp *interp,
-    PartitionInfo *piPtr,
-    RowColumn *rcPtr,
-    Tcl_DString *resultPtr)
-{
-    char string[200];
-    const char *padFmt, *sizeFmt;
-
-    if (piPtr->type == rowUid) {
-	padFmt = " -pady {%d %d}";
-	sizeFmt = " -height {%s}";
-    } else {
-	padFmt = " -padx {%d %d}";
-	sizeFmt = " -width {%s}";
-    }
-    if (rcPtr->resize != ROWCOL_DEF_RESIZE) {
-	Tcl_DStringAppend(resultPtr, " -resize ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_NameOfResize(rcPtr->resize), -1);
-    }
-    if ((rcPtr->pad.side1 != ROWCOL_DEF_PAD) ||
-	(rcPtr->pad.side2 != ROWCOL_DEF_PAD)) {
-	sprintf_s(string, 200, padFmt, rcPtr->pad.side1, rcPtr->pad.side2);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if (rcPtr->weight != ROWCOL_DEF_WEIGHT) {
-	Tcl_DStringAppend(resultPtr, " -weight ", -1);
-	Tcl_DStringAppend(resultPtr, Blt_Dtoa(interp, rcPtr->weight), -1);
-    }
-    if ((rcPtr->reqSize.min != LIMITS_MIN) ||
-	(rcPtr->reqSize.nom != LIMITS_NOM) ||
-	(rcPtr->reqSize.max != LIMITS_MAX)) {
-	sprintf_s(string, 200, sizeFmt, NameOfLimits(&rcPtr->reqSize));
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InfoRowColumn --
- *
- *	Returns the options of a partition in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the partition
- *	attributes is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InfoRowColumn(Table *tablePtr, Tcl_Interp *interp, const char *pattern)
-{
-    PartitionInfo *piPtr;
-    char c;
-    Blt_ChainLink link, last;
-    Tcl_DString dString;
-
-    c = pattern[0];
-    if ((c == 'r') || (c == 'R')) {
-	piPtr = &tablePtr->rows;
-    } else {
-	piPtr = &tablePtr->cols;
-    }
-    Tcl_DStringInit(&dString);
-    last = Blt_Chain_LastLink(piPtr->chain);
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-	char string[200];
-
-	rcPtr = Blt_Chain_GetValue(link);
-	sprintf_s(string, 200, "%c%d", piPtr->type[0], rcPtr->index);
-	if (Tcl_StringMatch(string, pattern)) {
-	    Tcl_DStringAppend(&dString, string, -1);
-	    PrintRowColumn(interp, piPtr, rcPtr, &dString);
-	    if (link != last) {
-		Tcl_DStringAppend(&dString, " \\\n", -1);
-	    } else {
-		Tcl_DStringAppend(&dString, "\n", -1);
-	    }
-	}
-    }
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InitSpan --
- *
- *	Checks the size of the column partitions and extends the size if a
- *	larger array is needed.
- *
- * Results:
- *	Always return a RowColumn pointer.
- *
- * Side effects:
- *	The size of the column partition array may be extended and
- *	initialized.
- *
- *---------------------------------------------------------------------------
- */
-static RowColumn *
-InitSpan(PartitionInfo *piPtr, int start, int span)
-{
-    int length;
-    int i;
-    Blt_ChainLink link;
-
-    length = Blt_Chain_GetLength(piPtr->chain);
-    for (i = length; i < (start + span); i++) {
-	RowColumn *rcPtr;
-
-	rcPtr = CreateRowColumn();
-	rcPtr->index = i;
-	rcPtr->link = Blt_Chain_Append(piPtr->chain, (ClientData)rcPtr);
-    }
-    link = Blt_Chain_GetNthLink(piPtr->chain, start);
-    return Blt_Chain_GetValue(link);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetTableFromObj --
- *
- *	Searches for a table associated by the path name of the widget
- *	container.
- *
- *	Errors may occur because
- *	  1) pathName isn't a valid for any Tk widget, or
- *	  2) there's no table associated with that widget as a container.
- *
- * Results:
- *	If a table entry exists, a pointer to the Table structure is
- *	returned. Otherwise NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-int
-Blt_GetTableFromObj(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    Tcl_Obj *objPtr,		/* Path name of the container widget. */
-    Table **tablePtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    Tk_Window tkwin;
-    const char *pathName;
-
-    pathName = Tcl_GetString(objPtr);
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->tableTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "no table associated with widget \"",
-		pathName, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *tablePtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTable --
- *
- *	This procedure creates and initializes a new Table structure with
- *	tkwin as its container widget. The internal structures associated with
- *	the table are initialized.
- *
- * Results:
- *	Returns the pointer to the new Table structure describing the new
- *	table geometry manager.  If an error occurred, the return value will
- *	be NULL and an error message is left in interp->result.
- *
- * Side effects:
- *	Memory is allocated and initialized, an event handler is set up to
- *	watch tkwin, etc.
- *
- *---------------------------------------------------------------------------
- */
-static Table *
-CreateTable(
-    TableInterpData *dataPtr,
-    Tcl_Interp *interp,		/* Interpreter associated with table. */
-    const char *pathName)	/* Path name of the container widget to be
-				 * associated with the new table. */
-{
-    Table *tablePtr;
-    Tk_Window tkwin;
-    int dummy;
-    Blt_HashEntry *hPtr;
-
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return NULL;
-    }
-    tablePtr = Blt_AssertCalloc(1, sizeof(Table));
-    tablePtr->tkwin = tkwin;
-    tablePtr->interp = interp;
-    tablePtr->rows.type = rowUid;
-    tablePtr->rows.configSpecs = rowConfigSpecs;
-    tablePtr->rows.chain = Blt_Chain_Create();
-    tablePtr->cols.type = columnUid;
-    tablePtr->cols.configSpecs = columnConfigSpecs;
-    tablePtr->cols.chain = Blt_Chain_Create();
-    tablePtr->propagate = TRUE;
-
-    tablePtr->arrangeProc = ArrangeTable;
-    Blt_InitHashTable(&tablePtr->entryTable, BLT_ONE_WORD_KEYS);
-    tablePtr->findEntryProc = FindEntry;
-
-    ResetLimits(&tablePtr->reqWidth);
-    ResetLimits(&tablePtr->reqHeight);
-
-    tablePtr->chain = Blt_Chain_Create();
-    tablePtr->rows.list = Blt_List_Create(BLT_ONE_WORD_KEYS);
-    tablePtr->cols.list = Blt_List_Create(BLT_ONE_WORD_KEYS);
-
-    Tk_CreateEventHandler(tablePtr->tkwin, StructureNotifyMask,
-	TableEventProc, (ClientData)tablePtr);
-    hPtr = Blt_CreateHashEntry(&dataPtr->tableTable, (char *)tkwin, &dummy);
-    tablePtr->hashPtr = hPtr;
-    tablePtr->tablePtr = &dataPtr->tableTable;
-    Blt_SetHashValue(hPtr, (ClientData)tablePtr);
-    return tablePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureTable --
- *
- *	This procedure is called to process an objv/objc list in order to
- *	configure the table geometry manager.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Table configuration options (-padx, -pady, etc.) get set.  The table
- *	is recalculated and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureTable(
-    Table *tablePtr,		/* Table to be configured */
-    Tcl_Interp *interp,		/* Interpreter to report results back to */
-    int objc,
-    Tcl_Obj *const *objv)	/* Option-value pairs */
-{
-    if (objc == 0) {
-	return Blt_ConfigureInfoFromObj(interp, tablePtr->tkwin, 
-		tableConfigSpecs, (char *)tablePtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 1) {
-	return Blt_ConfigureInfoFromObj(interp, tablePtr->tkwin, 
-		tableConfigSpecs, (char *)tablePtr, objv[0], 0);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, tablePtr->tkwin, tableConfigSpecs,
-	    objc, objv, (char *)tablePtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Arrange for the table layout to be computed at the next idle point. */
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-static void
-PrintTable(
-    Table *tablePtr,
-    Tcl_DString *resultPtr)
-{
-    char string[200];
-
-    if ((tablePtr->padLeft != TABLE_DEF_PAD) ||
-	(tablePtr->padRight != TABLE_DEF_PAD)) {
-	sprintf_s(string, 200, " -padx {%d %d}", tablePtr->padLeft, 
-		tablePtr->padRight);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if ((tablePtr->padTop != TABLE_DEF_PAD) ||
-	(tablePtr->padBottom != TABLE_DEF_PAD)) {
-	sprintf_s(string, 200, " -pady {%d %d}", tablePtr->padTop, 
-		tablePtr->padBottom);
-	Tcl_DStringAppend(resultPtr, string, -1);
-    }
-    if (!tablePtr->propagate) {
-	Tcl_DStringAppend(resultPtr, " -propagate no", -1);
-    }
-    if ((tablePtr->reqWidth.min != LIMITS_MIN) ||
-	(tablePtr->reqWidth.nom != LIMITS_NOM) ||
-	(tablePtr->reqWidth.max != LIMITS_MAX)) {
-	Tcl_DStringAppend(resultPtr, " -reqwidth {%s}", -1);
-	Tcl_DStringAppend(resultPtr, NameOfLimits(&tablePtr->reqWidth), -1);
-    }
-    if ((tablePtr->reqHeight.min != LIMITS_MIN) ||
-	(tablePtr->reqHeight.nom != LIMITS_NOM) ||
-	(tablePtr->reqHeight.max != LIMITS_MAX)) {
-	Tcl_DStringAppend(resultPtr, " -reqheight {%s}", -1);
-	Tcl_DStringAppend(resultPtr, NameOfLimits(&tablePtr->reqHeight), -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyPartitions --
- *
- *	Clear each of the lists managing the entries.  The entries in the
- *	lists of row and column spans are themselves lists which need to be
- *	cleared.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyPartitions(PartitionInfo *piPtr)
-{
-    if (piPtr->list != NULL) {
-	Blt_ListNode node;
-
-	for (node = Blt_List_FirstNode(piPtr->list); node != NULL;
-	    node = Blt_List_NextNode(node)) {
-	    Blt_Chain chain;
-
-	    chain = Blt_List_GetValue(node);
-	    if (chain != NULL) {
-		Blt_Chain_Destroy(chain);
-	    }
-	}
-	Blt_List_Destroy(piPtr->list);
-    }
-    if (piPtr->chain != NULL) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(piPtr->chain);
-	    link != NULL; link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    Blt_Free(rcPtr);
-	}
-	Blt_Chain_Destroy(piPtr->chain);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTable --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- *	clean up the Table structure at a safe time (when no-one is using it
- *	anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the table geometry manager is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTable(DestroyData dataPtr) /* Table structure */
-{
-    Blt_ChainLink link;
-    Table *tablePtr = (Table *)dataPtr;
-
-    /* Release the chain of entries. */
-    for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	TableEntry *tePtr;
-
-	tePtr = Blt_Chain_GetValue(link);
-	tePtr->link = NULL; /* Don't disrupt this chain of entries */
-	DestroyEntry(tePtr);
-    }
-    Blt_Chain_Destroy(tablePtr->chain);
-
-    DestroyPartitions(&tablePtr->rows);
-    DestroyPartitions(&tablePtr->cols);
-    Blt_DeleteHashTable(&tablePtr->entryTable);
-    if (tablePtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(tablePtr->tablePtr, tablePtr->hashPtr);
-    }
-    Blt_Free(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BinEntry --
- *
- *	Adds the entry to the lists of both row and column spans.  The layout
- *	of the table is done in order of partition spans, from shorted to
- *	longest.  The widgets spanning a particular number of partitions are
- *	stored in a linked list.  Each list is in turn, contained within a
- *	master list.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The entry is added to both the lists of row and columns spans.  This
- *	will effect the layout of the widgets.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BinEntry(Table *tablePtr, TableEntry *tePtr)
-{
-    Blt_ListNode node;
-    Blt_List list;
-    Blt_Chain chain;
-    long key;
-
-    /*
-     * Remove the entry from both row and column lists.  It will be
-     * re-inserted into the table at the new position.
-     */
-    if (tePtr->column.link != NULL) {
-	Blt_Chain_UnlinkLink(tePtr->column.chain,
-	    tePtr->column.link);
-    }
-    if (tePtr->row.link != NULL) {
-	Blt_Chain_UnlinkLink(tePtr->row.chain, tePtr->row.link);
-    }
-    list = tablePtr->rows.list;
-    key = 0;			/* Initialize key to bogus span */
-    for (node = Blt_List_FirstNode(list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-
-	key = (long)Blt_List_GetKey(node);
-	if (tePtr->row.span <= key) {
-	    break;
-	}
-    }
-    if (key != tePtr->row.span) {
-	Blt_ListNode newNode;
-
-	/*
-	 * Create a new list (bucket) to hold entries of that size span and
-	 * and link it into the list of buckets.
-	 */
-	newNode = Blt_List_CreateNode(list, (char *)tePtr->row.span);
-	Blt_List_SetValue(newNode, (char *)Blt_Chain_Create());
-	Blt_List_LinkBefore(list, newNode, node);
-	node = newNode;
-    }
-    chain = Blt_List_GetValue(node);
-    if (tePtr->row.link == NULL) {
-	tePtr->row.link = Blt_Chain_Append(chain, tePtr);
-    } else {
-	Blt_Chain_LinkAfter(chain, tePtr->row.link, NULL);
-    }
-    tePtr->row.chain = chain;
-
-    list = tablePtr->cols.list;
-    key = 0;
-    for (node = Blt_List_FirstNode(list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-	key = (long)Blt_List_GetKey(node);
-	if (tePtr->column.span <= key) {
-	    break;
-	}
-    }
-    if (key != tePtr->column.span) {
-	Blt_ListNode newNode;
-
-	/*
-	 * Create a new list (bucket) to hold entries of that size span and
-	 * and link it into the list of buckets.
-	 */
-	newNode = Blt_List_CreateNode(list, (char *)tePtr->column.span);
-	Blt_List_SetValue(newNode, (char *)Blt_Chain_Create());
-	Blt_List_LinkBefore(list, newNode, node);
-	node = newNode;
-    }
-    chain = Blt_List_GetValue(node);
-
-    /* Add the new entry to the span bucket */
-    if (tePtr->column.link == NULL) {
-	tePtr->column.link = Blt_Chain_Append(chain, tePtr);
-    } else {
-	Blt_Chain_LinkAfter(chain, tePtr->column.link, NULL);
-    }
-    tePtr->column.chain = chain;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseIndex --
- *
- *	Parse the entry index string and return the row and column numbers in
- *	their respective parameters.  The format of a table entry index is
- *	row,column where row is the row number and column is the column
- *	number.  Rows and columns are numbered starting from zero.
- *
- * Results:
- *	Returns a standard TCL result.  If TCL_OK is returned, the row and
- *	column numbers are returned via rowPtr and columnPtr respectively.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseIndex(Tcl_Interp *interp, const char *string, int *rowPtr, int *columnPtr)
-{
-    char *comma;
-    long row, column;
-    int result;
-
-    comma = (char *)strchr(string, ',');
-    if (comma == NULL) {
-	Tcl_AppendResult(interp, "bad index \"", string,
-	    "\": should be \"row,column\"", (char *)NULL);
-	return TCL_ERROR;
-
-    }
-    *comma = '\0';
-    result = ((Tcl_ExprLong(interp, string, &row) != TCL_OK) ||
-	(Tcl_ExprLong(interp, comma + 1, &column) != TCL_OK));
-    *comma = ',';		/* Repair the argument */
-    if (result) {
-	return TCL_ERROR;
-    }
-    if ((row < 0) || (row > (long)USHRT_MAX)) {
-	Tcl_AppendResult(interp, "bad index \"", string,
-	    "\": row is out of range", (char *)NULL);
-	return TCL_ERROR;
-
-    }
-    if ((column < 0) || (column > (long)USHRT_MAX)) {
-	Tcl_AppendResult(interp, "bad index \"", string,
-	    "\": column is out of range", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *rowPtr = (int)row;
-    *columnPtr = (int)column;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ManageEntry --
- *
- *	Inserts the given widget into the table at a given row and column
- *	position.  The widget can already be managed by this or another table.
- *	The widget will be simply moved to the new location in this table.
- *
- *	The new widget is inserted into both a hash table (this is used to
- *	locate the information associated with the widget) and a list (used to
- *	indicate relative ordering of widgets).
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side Effects:
- *	The table is re-computed and arranged at the next idle point.
- *
- * ---------------------------------------------------------------------------- */
-static int
-ManageEntry(
-    Tcl_Interp *interp,
-    Table *tablePtr,
-    Tk_Window tkwin,
-    int row, int column,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TableEntry *tePtr;
-    int result = TCL_OK;
-
-    tePtr = FindEntry(tablePtr, tkwin);
-    if ((tePtr != NULL) && (tePtr->tablePtr != tablePtr)) {
-	/* The entry for the widget already exists. If it's managed by another
-	 * table, delete it.  */
-	DestroyEntry(tePtr);
-	tePtr = NULL;
-    }
-    if (tePtr == NULL) {
-	tePtr = CreateEntry(tablePtr, tkwin);
-	if (tePtr == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (objc > 0) {
-	result = Blt_ConfigureWidgetFromObj(tablePtr->interp, tePtr->tkwin,
-	    entryConfigSpecs, objc, objv, (char *)tePtr,
-	    BLT_CONFIG_OBJV_ONLY);
-    }
-    if ((tePtr->column.span < 1) || (tePtr->row.span < 1)) {
-	Tcl_AppendResult(tablePtr->interp, "bad span specified for \"",
-	    Tk_PathName(tkwin), "\"", (char *)NULL);
-	DestroyEntry(tePtr);
-	return TCL_ERROR;
-    }
-    tePtr->column.rcPtr = InitSpan(&tablePtr->cols, column, tePtr->column.span);
-    tePtr->row.rcPtr = InitSpan(&tablePtr->rows, row, tePtr->row.span);
-    /* Insert the entry into both the row and column layout lists */
-    BinEntry(tablePtr, tePtr);
-
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BuildTable --
- *
- *	Processes an objv/objc list of table entries to add and configure new
- *	widgets into the table.  A table entry consists of the widget path
- *	name, table index, and optional configuration options.  The first
- *	argument in the objv list is the name of the table.  If no table
- *	exists for the given widget, a new one is created.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred,
- *	TCL_ERROR is returned and an error message is left in
- *	interp->result.
- *
- * Side Effects:
- *	Memory is allocated, a new table is possibly created, etc.
- *	The table is re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BuildTable(
-    Table *tablePtr,		/* Table to manage new widgets */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to */
-    int objc,			/*  */
-    Tcl_Obj *const *objv)	/* List of widgets, indices, and options */
-{
-    Tk_Window tkwin;
-    int row, column;
-    int nextRow, nextColumn;
-    int i;
-
-    /* Process any options specific to the table */
-    for (i = 2; i < objc; i += 2) {
-	const char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] != '-') {
-	    break;
-	}
-    }
-    if (i > objc) {
-	i = objc;
-    }
-    if (i > 2) {
-	if (ConfigureTable(tablePtr, interp, i - 2, objv + 2) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    nextRow = tablePtr->nRows;
-    nextColumn = 0;
-    objc -= i, objv += i;
-    while (objc > 0) {
-	const char *string;
-	/*
-	 * Allow the name of the widget and row/column index to be specified
-	 * in any order.
-	 */
-	string = Tcl_GetString(objv[0]);
-	if (string[0] == '.') {
-	    tkwin = Tk_NameToWindow(interp, string, tablePtr->tkwin);
-	    if (tkwin == NULL) {
-		return TCL_ERROR;
-	    }
-	    if (objc == 1) {
-		/* No row,column index, use defaults instead */
-		row = nextRow, column = nextColumn;
-		objc--, objv++;
-	    } else {
-		string = Tcl_GetString(objv[1]);
-		if (string[0] == '-') {
-		    /* No row,column index, use defaults instead */
-		    row = nextRow, column = nextColumn;
-		    objc--, objv++;
-		} else {
-		    if (ParseIndex(interp, string, &row, &column) != TCL_OK) {
-			return TCL_ERROR;	/* Invalid row,column index */
-		    }
-		    /* Skip over the widget pathname and table index. */
-		    objc -= 2, objv += 2;
-		}
-	    }
-	} else {
-	    if (ParseIndex(interp, Tcl_GetString(objv[0]), &row, &column) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (objc == 1) {
-		Tcl_AppendResult(interp, "missing widget pathname after \"",
-			 Tcl_GetString(objv[0]), "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[1]), 
-			    tablePtr->tkwin);
-	    if (tkwin == NULL) {
-		return TCL_ERROR;
-	    }
-	    /* Skip over the widget pathname and table index. */
-	    objc -= 2, objv += 2;
-	}
-
-	/* Find the end of the widget's option-value pairs */
-	for (i = 0; i < objc; i += 2) {
-	    string = Tcl_GetString(objv[i]);
-	    if (string[0] != '-') {
-		break;
-	    }
-	}
-	if (i > objc) {
-	    i = objc;
-	}
-	if (ManageEntry(interp, tablePtr, tkwin, row,
-		column, i, objv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	nextColumn = column + 1;
-	objc -= i, objv += i;
-    }
-    /* Arrange for the new table layout to be calculated. */
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(tablePtr->tkwin),-1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseItem --
- *
- *	Parses a string representing an item in the table.  An item may be one
- *	of the following:
- *		Rn	- Row index, where n is the index of row
- *		Cn	- Column index, where n is the index of column
- *		r,c	- Cell index, where r is the row index and c
- *			  is the column index.
- *
- * Results:
- *	Returns a standard TCL result.  If no error occurred, TCL_OK is
- *	returned.  *RowPtr* will return the row index.  *ColumnPtr* will
- *	return the column index.  If the row or column index is not
- *	applicable, -1 is returned via *rowPtr* or *columnPtr*.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseItem(Table *tablePtr, const char *string, int *rowPtr, int *columnPtr)
-{
-    char c;
-    long partNum;
-
-    c = tolower(string[0]);
-    *rowPtr = *columnPtr = -1;
-    if (c == 'r') {
-	if (Tcl_ExprLong(tablePtr->interp, string + 1, &partNum) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((partNum < 0) || (partNum >= tablePtr->nRows)) {
-	    Tcl_AppendResult(tablePtr->interp, "row index \"", string,
-		"\" is out of range", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	*rowPtr = (int)partNum;
-    } else if (c == 'c') {
-	if (Tcl_ExprLong(tablePtr->interp, string + 1, &partNum) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((partNum < 0) || (partNum >= tablePtr->nColumns)) {
-	    Tcl_AppendResult(tablePtr->interp, "column index \"", string,
-		"\" is out of range", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	*columnPtr = (int)partNum;
-    } else {
-	if (ParseIndex(tablePtr->interp, string,
-		rowPtr, columnPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Invalid row,column index */
-	}
-	if ((*rowPtr < 0) || (*rowPtr >= tablePtr->nRows) ||
-	    (*columnPtr < 0) || (*columnPtr >= tablePtr->nColumns)) {
-	    Tcl_AppendResult(tablePtr->interp, "index \"", string,
-		"\" is out of range", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given xy position is
- * 	in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |     x,y ---+
- *  		w   center   e      |     |
- *  		|            |      +-----+
- *  		sw --- s --- se
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TranslateAnchor(
-    int dx, int dy,		/* Difference between outer and inner
-				 * regions */
-    Tk_Anchor anchor,		/* Direction of the anchor */
-    int *xPtr, int *yPtr)
-{
-    int x, y;
-
-    x = y = 0;
-    switch (anchor) {
-    case TK_ANCHOR_NW:		/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:		/* Left center */
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SW:		/* Lower left corner */
-	y = dy;
-	break;
-    case TK_ANCHOR_N:		/* Top center */
-	x = (dx / 2);
-	break;
-    case TK_ANCHOR_CENTER:	/* Centered */
-	x = (dx / 2);
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_S:		/* Bottom center */
-	x = (dx / 2);
-	y = dy;
-	break;
-    case TK_ANCHOR_NE:		/* Upper right corner */
-	x = dx;
-	break;
-    case TK_ANCHOR_E:		/* Right center */
-	x = dx;
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	x = dx;
-	y = dy;
-	break;
-    }
-    *xPtr = (*xPtr) + x;
-    *yPtr = (*yPtr) + y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqWidth --
- *
- *	Returns the width requested by the widget starting in the given entry.
- *	The requested space also includes any internal padding which has been
- *	designated for this widget.
- *
- *	The requested width of the widget is always bounded by the limits set
- *	in tePtr->reqWidth.
- *
- * Results:
- *	Returns the requested width of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqWidth(TableEntry *tePtr)
-{
-    int width;
-
-    width = Tk_ReqWidth(tePtr->tkwin) + (2 * tePtr->ixPad);
-    width = GetBoundedWidth(width, &tePtr->reqWidth);
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqHeight --
- *
- *	Returns the height requested by the widget starting in the given
- *	entry.  The requested space also includes any internal padding which
- *	has been designated for this widget.
- *
- *	The requested height of the widget is always bounded by the limits set
- *	in tePtr->reqHeight.
- *
- * Results:
- *	Returns the requested height of the widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqHeight(TableEntry *tePtr)
-{
-    int height;
-
-    height = Tk_ReqHeight(tePtr->tkwin) + (2 * tePtr->iyPad);
-    height = GetBoundedHeight(height, &tePtr->reqHeight);
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTotalSpan --
- *
- *	Sums the row/column space requirements for the entire table.
- *
- * Results:
- *	Returns the space currently used in the span of partitions.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTotalSpan(PartitionInfo *piPtr)
-{
-    int spaceUsed;
-    Blt_ChainLink link;
-
-    spaceUsed = 0;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;		/* Start of partitions */
-
-	rcPtr = Blt_Chain_GetValue(link);
-	spaceUsed += rcPtr->size;
-    }
-    return spaceUsed;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetSpan --
- *
- *	Determines the space used by rows/columns for an entry.
- *
- * Results:
- *	Returns the space currently used in the span of partitions.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetSpan(PartitionInfo *piPtr, TableEntry *tePtr)
-{
-    RowColumn *startPtr;
-    int spaceUsed;
-    int count;
-    Blt_ChainLink link;
-    RowColumn *rcPtr;		/* Start of partitions */
-    int span;			/* Number of partitions spanned */
-
-    if (piPtr->type == rowUid) {
-	rcPtr = tePtr->row.rcPtr;
-	span = tePtr->row.span;
-    } else {
-	rcPtr = tePtr->column.rcPtr;
-	span = tePtr->column.span;
-    }
-
-    count = spaceUsed = 0;
-    link = rcPtr->link;
-    startPtr = Blt_Chain_GetValue(link);
-    for ( /*empty*/ ; (link != NULL) && (count < span);
-	link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	spaceUsed += rcPtr->size;
-	count++;
-    }
-    /*
-     * Subtract off the padding on either side of the span, since the
-     * widget can't grow into it.
-     */
-    spaceUsed -= (startPtr->pad.side1 + rcPtr->pad.side2 + piPtr->ePad);
-    return spaceUsed;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GrowSpan --
- *
- *	Expand the span by the amount of the extra space needed.  This
- *	procedure is used in LayoutPartitions to grow the partitions to their
- *	minimum nominal size, starting from a zero width and height space.
- *
- *	This looks more complicated than it really is.  The idea is to make
- *	the size of the partitions correspond to the smallest entry spans.
- *	For example, if widget A is in column 1 and widget B spans both
- *	columns 0 and 1, any extra space needed to fit widget B should come
- *	from column 0.
- *
- *	On the first pass we try to add space to partitions which have not
- *	been touched yet (i.e. have no nominal size).  Since the row and
- *	column lists are sorted in ascending order of the number of rows or
- *	columns spanned, the space is distributed amongst the smallest spans
- *	first.
- *
- *	The second pass handles the case of widgets which have the same span.
- *	For example, if A and B, which span the same number of partitions are
- *	the only widgets to span column 1, column 1 would grow to contain the
- *	bigger of the two slices of space.
- *
- *	If there is still extra space after the first two passes, this means
- *	that there were no partitions of with no widget spans or the same
- *	order span that could be expanded. The third pass will try to remedy
- *	this by parcelling out the left over space evenly among the rest of
- *	the partitions.
- *
- *	On each pass, we have to keep iterating over the span, evenly doling
- *	out slices of extra space, because we may hit partition limits as
- *	space is donated.  In addition, if there are left over pixels because
- *	of round-off, this will distribute them as evenly as possible.  For
- *	the worst case, it will take *span* passes to expand the span.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The partitions in the span may be expanded.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GrowSpan(
-    PartitionInfo *piPtr,
-    TableEntry *tePtr,
-    int growth)			/* The amount of extra space needed to grow
-				 * the span. */
-{
-    Blt_ChainLink link;
-    int nOpen;			/* # of partitions with space available */
-    int n;
-    RowColumn *startPtr;	/* Starting (column/row) partition  */
-    int span;			/* Number of partitions in the span */
-
-    if (piPtr->type == rowUid) {
-	startPtr = tePtr->row.rcPtr;
-	span = tePtr->row.span;
-    } else {
-	startPtr = tePtr->column.rcPtr;
-	span = tePtr->column.span;
-    }
-
-    /*
-     * Pass 1: First add space to rows/columns that haven't determined
-     *	       their nominal sizes yet.
-     */
-
-    nOpen = 0;
-    /* Find out how many partitions have no size yet */
-
-    for (n = 0, link = startPtr->link; (link != NULL) && (n < span); 
-	 n++, link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->nom == LIMITS_NOM) && (rcPtr->max > rcPtr->size)) {
-	    nOpen++;
-	}
-    }
-
-    while ((nOpen > 0) && (growth > 0)) {
-	int ration;
-
-	ration = growth / nOpen;
-	if (ration == 0) {
-	    ration = 1;
-	}
-	link = startPtr->link;
-	for (n = 0; (n < span) && (growth > 0); n++) {
-	    RowColumn *rcPtr;
-	    int avail;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    avail = rcPtr->max - rcPtr->size;
-	    if ((rcPtr->nom == LIMITS_NOM) && (avail > 0)) {
-		if (ration < avail) {
-		    growth -= ration;
-		    rcPtr->size += ration;
-		} else {
-		    growth -= avail;
-		    rcPtr->size += avail;
-		    nOpen--;
-		}
-		rcPtr->minSpan = span;
-		rcPtr->control = tePtr;
-	    }
-	    link = Blt_Chain_NextLink(link);
-	}
-    }
-
-    /*
-     * Pass 2: Add space to partitions which have the same minimum span
-     */
-
-    nOpen = 0;
-    link = startPtr->link;
-    for (n = 0; n < span; n++) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->minSpan == span) && (rcPtr->max > rcPtr->size)) {
-	    nOpen++;
-	}
-	link = Blt_Chain_NextLink(link);
-    }
-    while ((nOpen > 0) && (growth > 0)) {
-	int ration;
-
-	ration = growth / nOpen;
-	if (ration == 0) {
-	    ration = 1;
-	}
-	link = startPtr->link;
-	for (n = 0; (n < span) && (growth > 0); n++) {
-	    RowColumn *rcPtr;
-	    int avail;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    avail = rcPtr->max - rcPtr->size;
-	    if ((rcPtr->minSpan == span) && (avail > 0)) {
-		if (ration < avail) {
-		    growth -= ration;
-		    rcPtr->size += ration;
-		} else {
-		    growth -= avail;
-		    rcPtr->size += avail;
-		    nOpen--;
-		}
-		rcPtr->control = tePtr;
-	    }
-	    link = Blt_Chain_NextLink(link);
-	}
-    }
-
-    /*
-     * Pass 3: Try to expand all the partitions with space still available
-     */
-
-    /* Find out how many partitions still have space available */
-    nOpen = 0;
-    link = startPtr->link;
-    for (n = 0; n < span; n++) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->resize & RESIZE_EXPAND) && (rcPtr->max > rcPtr->size)) {
-	    nOpen++;
-	}
-	/* Set the nominal size of the row/column. */
-	rcPtr->nom = rcPtr->size;
-	link = Blt_Chain_NextLink(link);
-    }
-    while ((nOpen > 0) && (growth > 0)) {
-	int ration;
-
-	ration = growth / nOpen;
-	if (ration == 0) {
-	    ration = 1;
-	}
-	link = startPtr->link;
-	for (n = 0; (n < span) && (growth > 0); n++) {
-	    RowColumn *rcPtr;
-	    int avail;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    link = Blt_Chain_NextLink(link);
-	    if (!(rcPtr->resize & RESIZE_EXPAND)) {
-		continue;
-	    }
-	    avail = rcPtr->max - rcPtr->size;
-	    if (avail > 0) {
-		if (ration < avail) {
-		    growth -= ration;
-		    rcPtr->size += ration;
-		} else {
-		    growth -= avail;
-		    rcPtr->size += avail;
-		    nOpen--;
-		}
-		rcPtr->nom = rcPtr->size;
-		rcPtr->control = tePtr;
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GrowPartitions --
- *
- *	Grow the span by the designated amount.  Size constraints on the
- *	partitions may prevent any or all of the spacing adjustments.
- *
- *	This is very much like the GrowSpan procedure, but in this case we are
- *	expanding all the (row or column) partitions. It uses a two pass
- *	approach, first giving space to partitions which are smaller than
- *	their nominal sizes. This is because constraints on the partitions may
- *	cause resizing to be non-linear.
- *
- *	If there is still extra space, this means that all partitions are at
- *	least to their nominal sizes.  The second pass will try to add the
- *	left over space evenly among all the partitions which still have space
- *	available (i.e. haven't reached their specified max sizes).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the partitions may be increased.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GrowPartitions(
-    PartitionInfo *piPtr,	/* Array of (column/row) partitions  */
-    int adjustment)		/* The amount of extra space to grow the
-				 * span. If negative, it represents the amount
-				 * of space to add. */
-{
-    int delta;			/* Amount of space needed */
-    int nAdjust;		/* Number of rows/columns that still can be
-				 * adjusted. */
-    Blt_Chain chain;
-    Blt_ChainLink link;
-    float totalWeight;
-
-    chain = piPtr->chain;
-
-    /*
-     * Pass 1: First adjust the size of rows/columns that still haven't
-     *	      reached their nominal size.
-     */
-    delta = adjustment;
-
-    nAdjust = 0;
-    totalWeight = 0.0;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->weight > 0.0) && (rcPtr->nom > rcPtr->size)) {
-	    nAdjust++;
-	    totalWeight += rcPtr->weight;
-	}
-    }
-
-    while ((nAdjust > 0) && (totalWeight > 0.0) && (delta > 0)) {
-	Blt_ChainLink link;
-	int ration;		/* Amount of space to add to each
-				 * row/column. */
-	ration = (int)(delta / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (delta > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    if (rcPtr->weight > 0.0) {
-		int avail;	/* Amount of space still available. */
-
-		avail = rcPtr->nom - rcPtr->size;
-		if (avail > 0) {
-		    int size;	/* Amount of space requested for a particular
-				 * row/column. */
-		    size = (int)(ration * rcPtr->weight);
-		    if (size > delta) {
-			size = delta;
-		    }
-		    if (size < avail) {
-			delta -= size;
-			rcPtr->size += size;
-		    } else {
-			delta -= avail;
-			rcPtr->size += avail;
-			nAdjust--;
-			totalWeight -= rcPtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-
-    /*
-     * Pass 2: Adjust the partitions with space still available
-     */
-    nAdjust = 0;
-    totalWeight = 0.0;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->weight > 0.0) && (rcPtr->max > rcPtr->size)) {
-	    nAdjust++;
-	    totalWeight += rcPtr->weight;
-	}
-    }
-    while ((nAdjust > 0) && (totalWeight > 0.0) && (delta > 0)) {
-	Blt_ChainLink link;
-	int ration;		/* Amount of space to add to each
-				 * row/column. */
-
-	ration = (int)(delta / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (delta > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    if (rcPtr->weight > 0.0) {
-		int avail;	/* Amount of space still available */
-
-		avail = (rcPtr->max - rcPtr->size);
-		if (avail > 0) {
-		    int size;	/* Amount of space requested for a particular
-				 * row/column. */
-		    size = (int)(ration * rcPtr->weight);
-		    if (size > delta) {
-			size = delta;
-		    }
-		    if (size < avail) {
-			delta -= size;
-			rcPtr->size += size;
-		    } else {
-			delta -= avail;
-			rcPtr->size += avail;
-			nAdjust--;
-			totalWeight -= rcPtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShrinkPartitions --
- *
- *	Shrink the span by the amount specified.  Size constraints on the
- *	partitions may prevent any or all of the spacing adjustments.
- *
- *	This is very much like the GrowSpan procedure, but in this case we are
- *	shrinking or expanding all the (row or column) partitions. It uses a
- *	two pass approach, first subtracting space to partitions which are
- *	larger than their nominal sizes. This is because constraints on the
- *	partitions may cause resizing to be non-linear.
- *
- *	After pass 1, if there is still extra to be removed, this means that
- *	all partitions are at least to their nominal sizes.  The second pass
- *	will try to remove the extra space evenly among all the partitions
- *	which still have space available (i.e haven't reached their respective
- *	min sizes).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The size of the partitions may be decreased.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ShrinkPartitions(
-    PartitionInfo *piPtr,	/* Array of (column/row) partitions  */
-    int adjustment)		/* The amount of extra space to shrink the
-				 * span. It represents the amount of space to
-				 * remove. */
-{
-    Blt_ChainLink link;
-    int extra;			/* Amount of space needed */
-    int nAdjust;		/* Number of rows/columns that still can be
-				 * adjusted. */
-    Blt_Chain chain;
-    float totalWeight;
-
-    chain = piPtr->chain;
-
-    /*
-     * Pass 1: First adjust the size of rows/columns that still aren't
-     *	       at their nominal size.
-     */
-    extra = -adjustment;
-
-    nAdjust = 0;
-    totalWeight = 0.0;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->weight > 0.0) && (rcPtr->nom < rcPtr->size)) {
-	    nAdjust++;
-	    totalWeight += rcPtr->weight;
-	}
-    }
-
-    while ((nAdjust > 0) && (totalWeight > 0.0) && (extra > 0)) {
-	Blt_ChainLink link;
-	int ration;		/* Amount of space to subtract from each
-				 * row/column. */
-	ration = (int)(extra / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (extra > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    if (rcPtr->weight > 0.0) {
-		int avail;	/* Amount of space still available */
-
-		avail = rcPtr->size - rcPtr->nom;
-		if (avail > 0) {
-		    int slice;	/* Amount of space requested for a particular
-				 * row/column. */
-		    slice = (int)(ration * rcPtr->weight);
-		    if (slice > extra) {
-			slice = extra;
-		    }
-		    if (avail > slice) {
-			extra -= slice;
-			rcPtr->size -= slice;  
-		    } else {
-			extra -= avail;
-			rcPtr->size -= avail;
-			nAdjust--; /* Goes to zero (nominal). */
-			totalWeight -= rcPtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-    /*
-     * Pass 2: Now adjust the partitions with space still available (i.e.
-     *	       are bigger than their minimum size).
-     */
-    nAdjust = 0;
-    totalWeight = 0.0;
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if ((rcPtr->weight > 0.0) && (rcPtr->size > rcPtr->min)) {
-	    nAdjust++;
-	    totalWeight += rcPtr->weight;
-	}
-    }
-    while ((nAdjust > 0) && (totalWeight > 0.0) && (extra > 0)) {
-	Blt_ChainLink link;
-	int ration;		/* Amount of space to subtract from each
-				 * row/column. */
-	ration = (int)(extra / totalWeight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(chain); (link != NULL) && (extra > 0);
-	    link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    if (rcPtr->weight > 0.0) {
-		int avail;	/* Amount of space still available */
-
-		avail = rcPtr->size - rcPtr->min;
-		if (avail > 0) {
-		    int slice;	/* Amount of space requested for a particular
-				 * row/column. */
-		    slice = (int)(ration * rcPtr->weight);
-		    if (slice > extra) {
-			slice = extra;
-		    }
-		    if (avail > slice) {
-			extra -= slice;
-			rcPtr->size -= slice;
-		    } else {
-			extra -= avail;
-			rcPtr->size -= avail;
-			nAdjust--;
-			totalWeight -= rcPtr->weight;
-		    }
-		}
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetPartitions --
- *
- *	Sets/resets the size of each row and column partition to the minimum
- *	limit of the partition (this is usually zero). This routine gets
- *	called when new widgets are added, deleted, or resized.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each partition is re-initialized to its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetPartitions(Table *tablePtr, PartitionInfo *piPtr, LimitsProc *limitsProc)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-	int pad, size;
-
-	rcPtr = Blt_Chain_GetValue(link);
-
-	/*
-	 * The constraint procedure below also has the desired side-effect of
-	 * setting the minimum, maximum, and nominal values to the requested
-	 * size of its associated widget (if one exists).
-	 */
-	size = (*limitsProc)(0, &rcPtr->reqSize);
-
-	pad = PADDING(rcPtr->pad) + piPtr->ePad;
-	if (rcPtr->reqSize.flags & LIMITS_SET_NOM) {
-
-	    /*
-	     * This could be done more cleanly.  We want to ensure that the
-	     * requested nominal size is not overridden when determining the
-	     * normal sizes.  So temporarily fix min and max to the nominal
-	     * size and reset them back later.
-	     */
-	    rcPtr->min = rcPtr->max = rcPtr->size = rcPtr->nom = 
-		size + pad;
-
-	} else {
-	    /* The range defaults to 0..MAXINT */
-	    rcPtr->min = rcPtr->reqSize.min + pad;
-	    rcPtr->max = rcPtr->reqSize.max + pad;
-	    rcPtr->nom = LIMITS_NOM;
-	    rcPtr->size = pad;
-	}
-	rcPtr->minSpan = 0;
-	rcPtr->control = NULL;
-	rcPtr->count = 0;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetNominalSizes
- *
- *	Sets the normal sizes for each partition.  The partition size is the
- *	requested widget size plus an amount of padding.  In addition, adjust
- *	the min/max bounds of the partition depending upon the resize flags
- *	(whether the partition can be expanded or shrunk from its normal
- *	size).
- *
- * Results:
- *	Returns the total space needed for the all the partitions.
- *
- * Side Effects:
- *	The nominal size of each partition is set.  This is later used to
- *	determine how to shrink or grow the table if the container can't be
- *	resized to accommodate the exact size requirements of all the
- *	partitions.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetNominalSizes(Table *tablePtr, PartitionInfo *piPtr)
-{
-    Blt_ChainLink link;
-    int total;
-
-    total = 0;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-	int pad, size;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	pad = PADDING(rcPtr->pad) + piPtr->ePad;
-
-	/*
-	 * Restore the real bounds after temporarily setting nominal size.
-	 * These values may have been set in ResetPartitions to restrict the
-	 * size of the partition to the requested range.
-	 */
-
-	rcPtr->min = rcPtr->reqSize.min + pad;
-	rcPtr->max = rcPtr->reqSize.max + pad;
-
-	size = rcPtr->size;
-	if (size > rcPtr->max) {
-	    size = rcPtr->max;
-	} else if (size < rcPtr->min) {
-	    size = rcPtr->min;
-	}
-	if ((piPtr->ePad > 0) && (size < tablePtr->editPtr->min)) {
-	    size = tablePtr->editPtr->min;
-	}
-	rcPtr->nom = rcPtr->size = size;
-
-	/*
-	 * If a partition can't be resized (to either expand or shrink), hold
-	 * its respective limit at its normal size.
-	 */
-	if (!(rcPtr->resize & RESIZE_EXPAND)) {
-	    rcPtr->max = rcPtr->nom;
-	}
-	if (!(rcPtr->resize & RESIZE_SHRINK)) {
-	    rcPtr->min = rcPtr->nom;
-	}
-	if (rcPtr->control == NULL) {
-	    /* If a row/column contains no entries, then its size should be
-	     * locked. */
-	    if (rcPtr->resize & RESIZE_VIRGIN) {
-		rcPtr->max = rcPtr->min = size;
-	    } else {
-		if (!(rcPtr->resize & RESIZE_EXPAND)) {
-		    rcPtr->max = size;
-		}
-		if (!(rcPtr->resize & RESIZE_SHRINK)) {
-		    rcPtr->min = size;
-		}
-	    }
-	    rcPtr->nom = size;
-	}
-	total += rcPtr->nom;
-    }
-    return total;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LockPartitions
- *
- *	Sets the maximum size of a row or column, if the partition has a
- *	widget that controls it.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LockPartitions(PartitionInfo *piPtr)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	if (rcPtr->control != NULL) {
-	    /* Partition is controlled by this widget */
-	    rcPtr->max = rcPtr->size;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LayoutPartitions --
- *
- *	Calculates the normal space requirements for both the row and column
- *	partitions.  Each widget is added in order of the number of rows or
- *	columns spanned, which defines the space needed among in the
- *	partitions spanned.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The sum of normal sizes set here will be used as the normal size for
- * 	the container widget.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LayoutPartitions(Table *tablePtr)
-{
-    Blt_ListNode node;
-    int total;
-    PartitionInfo *piPtr;
-
-    piPtr = &tablePtr->cols;
-
-    ResetPartitions(tablePtr, piPtr, GetBoundedWidth);
-
-    for (node = Blt_List_FirstNode(piPtr->list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_List_GetValue(node);
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    TableEntry *tePtr;
-	    int needed, used;
-
-	    tePtr = Blt_Chain_GetValue(link);
-	    if (tePtr->column.control != CONTROL_FULL) {
-		continue;
-	    }
-	    needed = GetReqWidth(tePtr) + PADDING(tePtr->xPad) +
-		2 * (tePtr->borderWidth + tablePtr->eEntryPad);
-	    if (needed <= 0) {
-		continue;
-	    }
-	    used = GetSpan(piPtr, tePtr);
-	    if (needed > used) {
-		GrowSpan(piPtr, tePtr, needed - used);
-	    }
-	}
-    }
-
-    LockPartitions(piPtr);
-
-    for (node = Blt_List_FirstNode(piPtr->list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_List_GetValue(node);
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    TableEntry *tePtr;
-	    int needed, used;
-
-	    tePtr = Blt_Chain_GetValue(link);
-
-	    needed = GetReqWidth(tePtr) + PADDING(tePtr->xPad) +
-		2 * (tePtr->borderWidth + tablePtr->eEntryPad);
-
-	    if (tePtr->column.control >= 0.0) {
-		needed = (int)(needed * tePtr->column.control);
-	    }
-	    if (needed <= 0) {
-		continue;
-	    }
-	    used = GetSpan(piPtr, tePtr);
-	    if (needed > used) {
-		GrowSpan(piPtr, tePtr, needed - used);
-	    }
-	}
-    }
-    total = SetNominalSizes(tablePtr, piPtr);
-    tablePtr->normal.width = GetBoundedWidth(total, &tablePtr->reqWidth) +
-	PADDING(tablePtr->xPad) +
-	2 * (tablePtr->eTablePad + Tk_InternalBorderWidth(tablePtr->tkwin));
-
-    piPtr = &tablePtr->rows;
-
-    ResetPartitions(tablePtr, piPtr, GetBoundedHeight);
-
-    for (node = Blt_List_FirstNode(piPtr->list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_List_GetValue(node);
-
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    TableEntry *tePtr;
-	    int needed, used;
-
-	    tePtr = Blt_Chain_GetValue(link);
-	    if (tePtr->row.control != CONTROL_FULL) {
-		continue;
-	    }
-	    needed = GetReqHeight(tePtr) + PADDING(tePtr->yPad) +
-		2 * (tePtr->borderWidth + tablePtr->eEntryPad);
-	    if (needed <= 0) {
-		continue;
-	    }
-	    used = GetSpan(piPtr, tePtr);
-	    if (needed > used) {
-		GrowSpan(piPtr, tePtr, needed - used);
-	    }
-	}
-    }
-
-    LockPartitions(&tablePtr->rows);
-
-    for (node = Blt_List_FirstNode(piPtr->list); node != NULL;
-	node = Blt_List_NextNode(node)) {
-	Blt_Chain chain;
-	Blt_ChainLink link;
-
-	chain = Blt_Chain_GetValue(node);
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    TableEntry *tePtr;
-	    int needed, used;
-
-	    tePtr = Blt_Chain_GetValue(link);
-	    needed = GetReqHeight(tePtr) + PADDING(tePtr->yPad) +
-		2 * (tePtr->borderWidth + tablePtr->eEntryPad);
-	    if (tePtr->row.control >= 0.0) {
-		needed = (int)(needed * tePtr->row.control);
-	    }
-	    if (needed <= 0) {
-		continue;
-	    }
-	    used = GetSpan(piPtr, tePtr);
-	    if (needed > used) {
-		GrowSpan(piPtr, tePtr, needed - used);
-	    }
-	}
-    }
-    total = SetNominalSizes(tablePtr, piPtr);
-    tablePtr->normal.height = GetBoundedHeight(total, &tablePtr->reqHeight) +
-	PADDING(tablePtr->yPad) +
-	2 * (tablePtr->eTablePad + Tk_InternalBorderWidth(tablePtr->tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrangeEntries
- *
- *	Places each widget at its proper location.  First determines the size
- *	and position of the each widget.  It then considers the following:
- *
- *	  1. translation of widget position its parent widget.
- *	  2. fill style
- *	  3. anchor
- *	  4. external and internal padding
- *	  5. widget size must be greater than zero
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The size of each partition is re-initialized its minimum size.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ArrangeEntries(Table *tablePtr)		/* Table widget structure */
-{
-    Blt_ChainLink link;
-    int xMax, yMax;
-
-    xMax = tablePtr->container.width -
-	(Tk_InternalBorderWidth(tablePtr->tkwin) + tablePtr->padRight +
-	tablePtr->eTablePad);
-    yMax = tablePtr->container.height -
-	(Tk_InternalBorderWidth(tablePtr->tkwin) + tablePtr->padBottom +
-	tablePtr->eTablePad);
-
-    for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	TableEntry *tePtr;
-	int dx, dy;
-	int extra;
-	int spanWidth, spanHeight;
-	int winWidth, winHeight;
-	int x, y;
-
-	tePtr = Blt_Chain_GetValue(link);
-
-	x = tePtr->column.rcPtr->offset +
-	    tePtr->column.rcPtr->pad.side1 +
-	    tePtr->padLeft +
-	    Tk_Changes(tePtr->tkwin)->border_width +
-	    tablePtr->eEntryPad;
-	y = tePtr->row.rcPtr->offset +
-	    tePtr->row.rcPtr->pad.side1 +
-	    tePtr->padTop +
-	    Tk_Changes(tePtr->tkwin)->border_width +
-	    tablePtr->eEntryPad;
-
-	/*
-	 * Unmap any widgets that start beyond of the right edge of the
-	 * container.
-	 */
-	if ((x >= xMax) || (y >= yMax)) {
-	    if (Tk_IsMapped(tePtr->tkwin)) {
-		if (Tk_Parent(tePtr->tkwin) != tablePtr->tkwin) {
-		    Tk_UnmaintainGeometry(tePtr->tkwin, tablePtr->tkwin);
-		}
-		Tk_UnmapWindow(tePtr->tkwin);
-	    }
-	    continue;
-	}
-	extra = 2 * (tePtr->borderWidth + tablePtr->eEntryPad);
-	spanWidth = GetSpan(&tablePtr->cols, tePtr) -
-	    (extra + PADDING(tePtr->xPad));
-	spanHeight = GetSpan(&tablePtr->rows, tePtr) - 
-	    (extra + PADDING(tePtr->yPad));
-
-	winWidth = GetReqWidth(tePtr);
-	winHeight = GetReqHeight(tePtr);
-
-	/*
-	 *
-	 * Compare the widget's requested size to the size of the span.
-	 *
-	 * 1) If the widget is larger than the span or if the fill flag is
-	 *    set, make the widget the size of the span. Check that the new size
-	 *    is within the bounds set for the widget.
-	 *
-	 * 2) Otherwise, position the widget in the space according to its
-	 *    anchor.
-	 *
-	 */
-	if ((spanWidth <= winWidth) || (tePtr->fill & FILL_X)) {
-	    winWidth = spanWidth;
-	    if (winWidth > tePtr->reqWidth.max) {
-		winWidth = tePtr->reqWidth.max;
-	    }
-	}
-	if ((spanHeight <= winHeight) || (tePtr->fill & FILL_Y)) {
-	    winHeight = spanHeight;
-	    if (winHeight > tePtr->reqHeight.max) {
-		winHeight = tePtr->reqHeight.max;
-	    }
-	}
-	dx = dy = 0;
-	if (spanWidth > winWidth) {
-	    dx = (spanWidth - winWidth);
-	}
-	if (spanHeight > winHeight) {
-	    dy = (spanHeight - winHeight);
-	}
-	if ((dx > 0) || (dy > 0)) {
-	    TranslateAnchor(dx, dy, tePtr->anchor, &x, &y);
-	}
-	/*
-	 * Clip the widget at the bottom and/or right edge of the container.
-	 */
-	if (winWidth > (xMax - x)) {
-	    winWidth = (xMax - x);
-	}
-	if (winHeight > (yMax - y)) {
-	    winHeight = (yMax - y);
-	}
-
-	/*
-	 * If the widget is too small (i.e. it has only an external border)
-	 * then unmap it.
-	 */
-	if ((winWidth < 1) || (winHeight < 1)) {
-	    if (Tk_IsMapped(tePtr->tkwin)) {
-		if (tablePtr->tkwin != Tk_Parent(tePtr->tkwin)) {
-		    Tk_UnmaintainGeometry(tePtr->tkwin, tablePtr->tkwin);
-		}
-		Tk_UnmapWindow(tePtr->tkwin);
-	    }
-	    continue;
-	}
-
-	/*
-	 * Resize and/or move the widget as necessary.
-	 */
-	tePtr->x = x;
-	tePtr->y = y;
-
-	if (tablePtr->tkwin != Tk_Parent(tePtr->tkwin)) {
-	    Tk_MaintainGeometry(tePtr->tkwin, tablePtr->tkwin, x, y,
-		winWidth, winHeight);
-	} else {
-	    if ((x != Tk_X(tePtr->tkwin)) || (y != Tk_Y(tePtr->tkwin)) ||
-		(winWidth != Tk_Width(tePtr->tkwin)) ||
-		(winHeight != Tk_Height(tePtr->tkwin))) {
-		Tk_MoveResizeWindow(tePtr->tkwin, x, y, winWidth, winHeight);
-	    }
-	    if (!Tk_IsMapped(tePtr->tkwin)) {
-		Tk_MapWindow(tePtr->tkwin);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrangeTable --
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- * 	The widgets in the table are possibly resized and redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ArrangeTable(ClientData clientData)
-{
-    Table *tablePtr = clientData;
-    int width, height;
-    int offset, delta;
-    int xPad, yPad;
-    int outerPad;
-    Blt_ChainLink link;
-
-#ifdef notdef
-    fprintf(stderr, "ArrangeTable(%s)\n", Tk_PathName(tablePtr->tkwin));
-#endif
-    Tcl_Preserve(tablePtr);
-    tablePtr->flags &= ~ARRANGE_PENDING;
-
-    tablePtr->rows.ePad = tablePtr->cols.ePad = tablePtr->eTablePad =
-	tablePtr->eEntryPad = 0;
-    if (tablePtr->editPtr != NULL) {
-	tablePtr->rows.ePad = tablePtr->cols.ePad =
-	    tablePtr->editPtr->gridLineWidth;
-	tablePtr->eTablePad = tablePtr->editPtr->gridLineWidth;
-	tablePtr->eEntryPad = tablePtr->editPtr->entryPad;
-    }
-    /*
-     * If the table has no children anymore, then don't do anything at all:
-     * just leave the container widget's size as-is.
-     */
-    if ((Blt_Chain_GetLength(tablePtr->chain) == 0) || 
-	(tablePtr->tkwin == NULL)) {
-	Tcl_Release(tablePtr);
-	return;
-    }
-    if (tablePtr->flags & REQUEST_LAYOUT) {
-	tablePtr->flags &= ~REQUEST_LAYOUT;
-	LayoutPartitions(tablePtr);
-    }
-    /*
-     * Initially, try to fit the partitions exactly into the container by
-     * resizing the container.  If the widget's requested size is different,
-     * send a request to the container widget's geometry manager to resize.
-     */
-    if ((tablePtr->propagate) &&
-	((tablePtr->normal.width != Tk_ReqWidth(tablePtr->tkwin)) ||
-	    (tablePtr->normal.height != Tk_ReqHeight(tablePtr->tkwin)))) {
-	Tk_GeometryRequest(tablePtr->tkwin, tablePtr->normal.width,
-	    tablePtr->normal.height);
-	EventuallyArrangeTable(tablePtr);
-	Tcl_Release(tablePtr);
-	return;
-    }
-    /*
-     * Save the width and height of the container so we know when its size has
-     * changed during ConfigureNotify events.
-     */
-    tablePtr->container.width = Tk_Width(tablePtr->tkwin);
-    tablePtr->container.height = Tk_Height(tablePtr->tkwin);
-    outerPad = 2 * (Tk_InternalBorderWidth(tablePtr->tkwin) +
-	tablePtr->eTablePad);
-    xPad = outerPad + tablePtr->cols.ePad + PADDING(tablePtr->xPad);
-    yPad = outerPad + tablePtr->rows.ePad + PADDING(tablePtr->yPad);
-
-    width = GetTotalSpan(&tablePtr->cols) + xPad;
-    height = GetTotalSpan(&tablePtr->rows) + yPad;
-
-    /*
-     * If the previous geometry request was not fulfilled (i.e. the size of
-     * the container is different from partitions' space requirements), try to
-     * adjust size of the partitions to fit the widget.
-     */
-    delta = tablePtr->container.width - width;
-    if (delta != 0) {
-	if (delta > 0) {
-	    GrowPartitions(&tablePtr->cols, delta);
-	} else {
-	    ShrinkPartitions(&tablePtr->cols, delta);
-	}
-	width = GetTotalSpan(&tablePtr->cols) + xPad;
-    }
-    delta = tablePtr->container.height - height;
-    if (delta != 0) {
-	if (delta > 0) {
-	    GrowPartitions(&tablePtr->rows, delta);
-	} else {
-	    ShrinkPartitions(&tablePtr->rows, delta);
-	}
-	height = GetTotalSpan(&tablePtr->rows) + yPad;
-    }
-
-    /*
-     * If after adjusting the size of the partitions the space required does
-     * not equal the size of the widget, do one of the following:
-     *
-     * 1) If it's smaller, center the table in the widget.
-     * 2) If it's bigger, clip the partitions that extend beyond
-     *    the edge of the container.
-     *
-     * Set the row and column offsets (including the container's internal
-     * border width). To be used later when positioning the widgets.
-     */
-
-    offset = Tk_InternalBorderWidth(tablePtr->tkwin) + tablePtr->padLeft +
-	tablePtr->eTablePad;
-    if (width < tablePtr->container.width) {
-	offset += (tablePtr->container.width - width) / 2;
-    }
-    for (link = Blt_Chain_FirstLink(tablePtr->cols.chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	RowColumn *columnPtr;
-
-	columnPtr = Blt_Chain_GetValue(link);
-	columnPtr->offset = offset + tablePtr->cols.ePad;
-	offset += columnPtr->size;
-    }
-
-    offset = Tk_InternalBorderWidth(tablePtr->tkwin) + tablePtr->padTop +
-	tablePtr->eTablePad;
-    if (height < tablePtr->container.height) {
-	offset += (tablePtr->container.height - height) / 2;
-    }
-    for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	RowColumn *rowPtr;
-
-	rowPtr = Blt_Chain_GetValue(link);
-	rowPtr->offset = offset + tablePtr->rows.ePad;
-	offset += rowPtr->size;
-    }
-
-    ArrangeEntries(tablePtr);
-    if (tablePtr->editPtr != NULL) {
-	/* Redraw the editor */
-	(*tablePtr->editPtr->drawProc) (tablePtr->editPtr);
-    }
-    Tcl_Release(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArrangeOp --
- *
- *	Forces layout of the table geometry manager.  This is useful mostly
- *	for debugging the geometry manager.  You can get the geometry manager
- *	to calculate the normal (requested) width and height of each row and
- *	column.  Otherwise, you need to first withdraw the container widget,
- *	invoke "update", and then query the geometry manager.
- *
- * Results:
- *	Returns a standard TCL result.  If the table is successfully
- *	rearranged, TCL_OK is returned. Otherwise, TCL_ERROR is returned and
- *	an error message is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ArrangeOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to report errors to */
-    int objc,
-    Tcl_Obj *const *objv)	/* Path name of container associated with the
-				 * table */
-{
-    Table *tablePtr;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tablePtr->flags |= REQUEST_LAYOUT;
-    ArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *	Returns the name, position and options of a widget in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    PartitionInfo *piPtr;
-    Table *tablePtr;
-    const char *string;
-    char c;
-    int length;
-    int n;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	return Blt_ConfigureValueFromObj(interp, tablePtr->tkwin, 
-		tableConfigSpecs, (char *)tablePtr, objv[3], 0);
-    }
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    c = string[0];
-    if (c == '.') {		/* Configure widget */
-	TableEntry *tePtr;
-
-	if (GetEntry(interp, tablePtr, Tcl_GetString(objv[3]), &tePtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	return Blt_ConfigureValueFromObj(interp, tePtr->tkwin, 
-		entryConfigSpecs, (char *)tePtr, objv[4], 0);
-    } else if ((c == 'c') && (strncmp(string, "container", length) == 0)) {
-	return Blt_ConfigureValueFromObj(interp, tablePtr->tkwin, 
-		tableConfigSpecs, (char *)tablePtr, objv[4], 0);
-    }
-    piPtr = ParseRowColumn(tablePtr, objv[3], &n);
-    if (piPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, tablePtr->tkwin, 
-	piPtr->configSpecs, (char *)GetRowColumn(piPtr, n), objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Returns the name, position and options of a widget in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the table configuration
- *	option information is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    int count;
-    int result;
-    Tcl_Obj *const *items;
-    int i;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * Find the end of the items. Search until we see an option (-).
-     */
-    objc -= 3, objv += 3;
-    for (count = 0; count < objc; count++) {
-	const char *string;
-	
-	string = Tcl_GetString(objv[count]);
-	if (string[0] == '-') {
-	    break;
-	}
-    }
-    items = objv;		/* Save the start of the item list */
-    objc -= count;		/* Move beyond the items to the options */
-    objv += count;
-    result = TCL_ERROR;		/* Suppress compiler warning */
-
-    if (count == 0) {
-	result = ConfigureTable(tablePtr, interp, objc, objv);
-    }
-    for (i = 0; i < count; i++) {
-	const char *string;
-	char c1, c2;
-	int length;
-
-	string = Tcl_GetStringFromObj(items[i], &length);
-	c1 = string[0];
-	c2 = string[1];
-	if (c1 == '.') {		/* Configure widget */
-	    TableEntry *tePtr;
-
-	    if (GetEntry(interp, tablePtr, string, &tePtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    result = ConfigureEntry(tablePtr, interp, tePtr, objc, objv);
-	} else if ((c1 == 'r') || (c1 == 'R')) {
-	    result = ConfigureRowColumn(tablePtr, &tablePtr->rows,
-		string, objc, objv);
-	} else if ((c1 == 'c') && (c2 == 'o') &&
-	    (strncmp(string, "container", length) == 0)) {
-	    result = ConfigureTable(tablePtr, interp, objc, objv);
-	} else if ((c1 == 'c') || (c1 == 'C')) {
-	    result = ConfigureRowColumn(tablePtr, &tablePtr->cols,
-		string, objc, objv);
-	} else {
-	    Tcl_AppendResult(interp, "unknown item \"", string,
-		"\": should be widget, row or column index, or \"container\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (result == TCL_ERROR) {
-	    break;
-	}
-	if ((i + 1) < count) {
-	    Tcl_AppendResult(interp, "\n", (char *)NULL);
-	}
-    }
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes the specified rows and/or columns from the table.  Note that
- *	the row/column indices can be fixed only after all the deletions have
- *	occurred.
- *
- *		table delete .f r0 r1 r4 c0
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    int matches;
-    int i;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 3; i < objc; i++) {
-	const char *pattern;
-	char c;
-
-	pattern = Tcl_GetString(objv[i]);
-	c = tolower(pattern[0]);
-	if ((c != 'r') && (c != 'c')) {
-	    Tcl_AppendResult(interp, "bad index \"", pattern,
-		"\": must start with \"r\" or \"c\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    matches = 0;
-    for (i = 3; i < objc; i++) {
-	Blt_ChainLink link, next;
-	PartitionInfo *piPtr;
-	const char *pattern;
-	char c;
-
-	pattern = Tcl_GetString(objv[i]);
-	c = tolower(pattern[0]);
-	piPtr = (c == 'r') ? &tablePtr->rows : &tablePtr->cols;
-	for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	    link = next) {
-	    RowColumn *rcPtr;
-	    char ident[200];
-
-	    next = Blt_Chain_NextLink(link);
-	    rcPtr = Blt_Chain_GetValue(link);
-	    sprintf_s(ident, 200, "%c%d", c, rcPtr->index);
-	    if (Tcl_StringMatch(ident, pattern)) {
-		matches++;
-		DeleteRowColumn(tablePtr, piPtr, rcPtr);
-		Blt_Chain_DeleteLink(piPtr->chain, link);
-	    }
-	}
-    }
-    if (matches > 0) {		/* Fix indices */
-	Blt_ChainLink link;
-
-	i = 0;
-	for (link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-	    link != NULL; link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    rcPtr->index = i++;
-	}
-	i = 0;
-	for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	    link != NULL; link = Blt_Chain_NextLink(link)) {
-	    RowColumn *rcPtr;
-
-	    rcPtr = Blt_Chain_GetValue(link);
-	    rcPtr->index = i++;
-	}
-	tablePtr->flags |= REQUEST_LAYOUT;
-	EventuallyArrangeTable(tablePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * JoinOp --
- *
- *	Joins the specified span of rows/columns together into a partition.
- *	The row/column indices can be fixed only after all the deletions have
- *	occurred.
- *
- *		table join .f r0 r3
- *		table join .f c2 c4
- * Results:
- *	Returns a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-JoinOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    Blt_ChainLink link, nextl, froml;
-    PartitionInfo *piPtr, *info2Ptr;
-    TableEntry *tePtr;
-    int from, to;		/* Indices marking the span of partitions to
-				 * be joined together.  */
-    int start, end;		/* Entry indices. */
-    int i;
-    RowColumn *rcPtr;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    piPtr = ParseRowColumn(tablePtr, objv[3], &from);
-    if (piPtr == NULL) {
-	return TCL_ERROR;
-    }
-    info2Ptr = ParseRowColumn(tablePtr, objv[4], &to);
-    if (info2Ptr == NULL) {
-	return TCL_ERROR;
-    }
-    if (piPtr != info2Ptr) {
-	Tcl_AppendResult(interp,
-	    "\"from\" and \"to\" must both be rows or columns",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (from >= to) {
-	return TCL_OK;		/* No-op. */
-    }
-    froml = Blt_Chain_GetNthLink(piPtr->chain, from);
-    rcPtr = Blt_Chain_GetValue(froml);
-
-    /*
-     *	Reduce the span of all entries that currently cross any of the
-     *	trailing rows/columns.  Also, if the entry starts in one of these
-     *	rows/columns, moved it to the designated "joined" row/column.
-     */
-    if (piPtr->type == rowUid) {
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    tePtr = Blt_Chain_GetValue(link);
-	    start = tePtr->row.rcPtr->index + 1;
-	    end = tePtr->row.rcPtr->index + tePtr->row.span - 1;
-	    if ((end < from) || ((start > to))) {
-		continue;
-	    }
-	    tePtr->row.span -= to - start + 1;
-	    if (start >= from) {/* Entry starts in a trailing partition. */
-		tePtr->row.rcPtr = rcPtr;
-	    }
-	}
-    } else {
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    tePtr = Blt_Chain_GetValue(link);
-	    start = tePtr->column.rcPtr->index + 1;
-	    end = tePtr->column.rcPtr->index + tePtr->column.span - 1;
-	    if ((end < from) || ((start > to))) {
-		continue;
-	    }
-	    tePtr->column.span -= to - start + 1;
-	    if (start >= from) {/* Entry starts in a trailing partition. */
-		tePtr->column.rcPtr = rcPtr;
-	    }
-	}
-    }
-    link = Blt_Chain_NextLink(froml);
-    for (i = from + 1; i <= to; i++) {
-	nextl = Blt_Chain_NextLink(link);
-	rcPtr = Blt_Chain_GetValue(link);
-	DeleteRowColumn(tablePtr, piPtr, rcPtr);
-	Blt_Chain_DeleteLink(piPtr->chain, link);
-	link = nextl;
-    }
-    i = 0;
-    for (link = Blt_Chain_FirstLink(piPtr->chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	rcPtr->index = i++;
-    }
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExtentsOp --
- *
- *	Returns a list of all the pathnames of the widgets managed by a table.
- *	The table is determined from the name of the container widget
- *	associated with the table.
- *
- *		table extents .frame r0 c0 container
- *
- * Results:
- *	Returns a standard TCL result.  If no error occurred, TCL_OK is
- *	returned and a list of widgets managed by the table is left in
- *	interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ExtentsOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return results to. */
-    int objc,			/* # of arguments */
-    Tcl_Obj *const *objv)	/* Command line arguments. */
-{
-    Table *tablePtr;
-    Blt_ChainLink link;
-    PartitionInfo *piPtr;
-    Tcl_DString dString;
-    char *pattern;
-    char c;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    pattern = Tcl_GetString(objv[3]);
-    c = tolower(pattern[0]);
-    if (c == 'r') {
-	piPtr = &tablePtr->rows;
-    } else if (c == 'c') {
-	piPtr = &tablePtr->cols;
-    } else {
-	Tcl_AppendResult(interp, "unknown item \"", pattern, 
-		"\": should be widget, row, or column", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-	char ident[200];
-
-	rcPtr = Blt_Chain_GetValue(link);
-	sprintf_s(ident, 200, "%c%d", c, rcPtr->index);
-	if (Tcl_StringMatch(ident, pattern)) {
-	    int x, y, width, height;
-	    RowColumn *c1Ptr, *r1Ptr, *c2Ptr, *r2Ptr;
-
-	    if (c == 'r') {
-		r1Ptr = r2Ptr = rcPtr;
-		c1Ptr = GetRowColumn(&tablePtr->cols, 0);
-		c2Ptr = GetRowColumn(&tablePtr->cols, 
-				     tablePtr->nColumns - 1);
-	    } else {
-		c1Ptr = c2Ptr = rcPtr;
-		r1Ptr = GetRowColumn(&tablePtr->rows, 0);
-		r2Ptr = GetRowColumn(&tablePtr->rows, tablePtr->nRows - 1);
-	    }
-	    x = c1Ptr->offset;
-	    y = r1Ptr->offset;
-	    width = c2Ptr->offset + c2Ptr->size - x;
-	    height = r2Ptr->offset + r2Ptr->size - y;
-	    Tcl_DStringAppend(&dString, ident, -1);
-	    Tcl_DStringAppend(&dString, " ", 1);
-	    Tcl_DStringAppend(&dString, Blt_Itoa(rcPtr->index), -1);
-	    Tcl_DStringAppend(&dString, " ", 1);
-	    Tcl_DStringAppend(&dString, Blt_Itoa(x), -1);
-	    Tcl_DStringAppend(&dString, " ", 1);
-	    Tcl_DStringAppend(&dString, Blt_Itoa(y), -1);
-	    Tcl_DStringAppend(&dString, " ", 1);
-	    Tcl_DStringAppend(&dString, Blt_Itoa(width), -1);
-	    Tcl_DStringAppend(&dString, " ", 1);
-	    Tcl_DStringAppend(&dString, Blt_Itoa(height), -1);
-	    Tcl_DStringAppend(&dString, "\n", 1);
-	}
-    }
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ForgetOp --
- *
- *	Processes an objv/objc list of widget names and purges their entries
- *	from their respective tables.  The widgets are unmapped and the tables
- *	are rearranged at the next idle point.  Note that all the named
- *	widgets do not need to exist in the same table.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side Effects:
- *	Memory is deallocated (the entry is destroyed), etc.  The affected
- *	tables are is re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ForgetOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TableEntry *tePtr;
-    int i;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Table *tablePtr;
-    Tk_Window tkwin;
-    char *string;
-
-    tablePtr = NULL;
-    for (i = 2; i < objc; i++) {
-	tePtr = NULL;
-	string = Tcl_GetString(objv[i]);
-	tkwin = Tk_NameToWindow(interp, string, dataPtr->tkMain);
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->tableTable, &iter);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    tablePtr = Blt_GetHashValue(hPtr);
-	    if (tablePtr->interp != interp) {
-		continue;
-	    }
-	    tePtr = FindEntry(tablePtr, tkwin);
-	    if (tePtr != NULL) {
-		break;
-	    }
-	}
-	if (tePtr == NULL) {
-	    Tcl_AppendResult(interp, "\"", string,
-		"\" is not managed by any table", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Tk_IsMapped(tePtr->tkwin)) {
-	    Tk_UnmapWindow(tePtr->tkwin);
-	}
-	/* Arrange for the call back here in the loop, because the widgets may
-	 * not belong to the same table.  */
-	tablePtr->flags |= REQUEST_LAYOUT;
-	EventuallyArrangeTable(tablePtr);
-	DestroyEntry(tePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InfoOp --
- *
- *	Returns the options of a widget or partition in the table.
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InfoOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    int result;
-    char c;
-    int i;
-    char *string;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 3; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	c = string[0];
-	if (c == '.') {		/* Entry information */
-	    TableEntry *tePtr;
-
-	    if (GetEntry(interp, tablePtr, string, &tePtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    result = InfoEntry(interp, tablePtr, tePtr);
-	} else if ((c == 'r') || (c == 'R') || (c == 'c') || (c == 'C')) {
-	    result = InfoRowColumn(tablePtr, interp, string);
-	} else {
-	    Tcl_AppendResult(interp, "unknown item \"", string,
-		"\": should be widget, row, or column", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((i + 1) < objc) {
-	    Tcl_AppendResult(interp, "\n", (char *)NULL);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Inserts a span of rows/columns into the table.
- *
- *		table insert .f r0 2
- *		table insert .f c0 5
- *
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InsertOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{ 
-    Table *tablePtr;
-    long int span;
-    int iBefore;
-    PartitionInfo *piPtr;
-    RowColumn *rcPtr;
-    int i;
-    Blt_ChainLink before, link;
-    int linkBefore;
-    char *string;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    linkBefore = TRUE;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '-') {
-	if (strcmp(string, "-before") == 0) {
-	    linkBefore = TRUE;
-	    objv++; objc--;
-	} else if (strcmp(string, "-after") == 0) {
-	    linkBefore = FALSE;
-	    objv++; objc--;
-	}	    
-    } 
-    if (objc == 3) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), "insert ", Tcl_GetString(objv[2]), 
-		"row|column ?span?", (char *)NULL);
-	return TCL_ERROR;
-    }
-    piPtr = ParseRowColumn(tablePtr, objv[3], &iBefore);
-    if (piPtr == NULL) {
-	return TCL_ERROR;
-    }
-    span = 1;
-    if ((objc > 4) && 
-	(Tcl_ExprLong(interp, Tcl_GetString(objv[4]), &span) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (span < 1) {
-	Tcl_AppendResult(interp, "span value \"", Tcl_GetString(objv[4]),
-	    "\" can't be negative", (char *)NULL);
-	return TCL_ERROR;
-    }
-    before = Blt_Chain_GetNthLink(piPtr->chain, iBefore);
-    /*
-     * Insert the new rows/columns from the designated point in the
-     * chain.
-     */
-    for (i = 0; i < span; i++) {
-	rcPtr = CreateRowColumn();
-	link = Blt_Chain_NewLink();
-	Blt_Chain_SetValue(link, rcPtr);
-	if (linkBefore) {
-	    Blt_Chain_LinkBefore(piPtr->chain, link, before);
-	} else {
-	    Blt_Chain_LinkAfter(piPtr->chain, link, before);
-	}
-	rcPtr->link = link;
-    }
-    i = 0;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	/* Reset the indices of the trailing rows/columns.  */
-	rcPtr->index = i++;
-    }
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SplitOp --
- *
- *	Splits a single row/column into multiple partitions. Any widgets that
- *	span this row/column will be automatically corrected to include the
- *	new rows/columns.
- *
- *		table split .f r0 3
- *		table split .f c2 2
- * Results:
- *	Returns a standard TCL result.  A list of the widget attributes is
- *	left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SplitOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    int number, split;
-    int start, end;
-    PartitionInfo *piPtr;
-    RowColumn *rcPtr;
-    int i;
-    Blt_ChainLink after, link;
-    TableEntry *tePtr;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    piPtr = ParseRowColumn(tablePtr, objv[3], &number);
-    if (piPtr == NULL) {
-	return TCL_ERROR;
-    }
-    split = 2;
-    if (objc > 4) {
-	if (Tcl_GetIntFromObj(interp, objv[4], &split) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (split < 2) {
-	Tcl_AppendResult(interp, "bad split value \"", Tcl_GetString(objv[4]),
-	    "\": should be 2 or greater", (char *)NULL);
-	return TCL_ERROR;
-    }
-    after = Blt_Chain_GetNthLink(piPtr->chain, number);
-
-    /*
-     * Append (split - 1) additional rows/columns starting
-     * from the current point in the chain.
-     */
-
-    for (i = 1; i < split; i++) {
-	rcPtr = CreateRowColumn();
-	link = Blt_Chain_NewLink();
-	Blt_Chain_SetValue(link, rcPtr);
-	Blt_Chain_LinkAfter(piPtr->chain, link, after);
-	rcPtr->link = link;
-    }
-
-    /*
-     * Also increase the span of all entries that span this row/column by
-     * split - 1.
-     */
-    if (piPtr->type == rowUid) {
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    tePtr = Blt_Chain_GetValue(link);
-	    start = tePtr->row.rcPtr->index;
-	    end = tePtr->row.rcPtr->index + tePtr->row.span;
-	    if ((start <= number) && (number < end)) {
-		tePtr->row.span += (split - 1);
-	    }
-	}
-    } else {
-	for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    tePtr = Blt_Chain_GetValue(link);
-	    start = tePtr->column.rcPtr->index;
-	    end = tePtr->column.rcPtr->index + tePtr->column.span;
-	    if ((start <= number) && (number < end)) {
-		tePtr->column.span += (split - 1);
-	    }
-	}
-    }
-    /*
-     * Be careful to renumber the rows or columns only after processing each
-     * entry.  Otherwise row/column numbering will be out of sync with the
-     * index.
-     */
-    i = number;
-    for (link = after; link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	rcPtr->index = i++;	/* Renumber the trailing indices.  */
-    }
-
-    tablePtr->flags |= REQUEST_LAYOUT;
-    EventuallyArrangeTable(tablePtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RowColumnSearch --
- *
- * 	Searches for the row or column designated by an x or y coordinate.
- *
- * Results:
- *	Returns a pointer to the row/column containing the given point.  If no
- *	row/column contains the coordinate, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static RowColumn *
-RowColumnSearch(PartitionInfo *piPtr, int x)
-{
-    Blt_ChainLink link;
-
-    /* 
-     * This search assumes that rows/columns are organized in increasing
-     * order.
-     */
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	/*
-	 *|         |offset    |offset+size  |        |
-	 *            ^
-	 *            x
-	 */
-	if (x < rcPtr->offset) { 
-	    return NULL;	/* Too far, can't find row/column. */
-	}
-	if (x < (rcPtr->offset + rcPtr->size)) {
-	    return rcPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LocateOp --
- *
- *
- *	Returns the row,column index given a screen coordinate.
- *
- * Results:
- *	Returns a standard TCL result.
- *
- *	table locate .t %X %Y
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-LocateOp(TableInterpData *dataPtr, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    RowColumn *rowPtr, *columnPtr;
-    Table *tablePtr;
-    Tcl_Obj *listObjPtr;
-    int x, y;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetPixelsFromObj(interp, tablePtr->tkwin, objv[3], PIXELS_ANY, &x)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetPixelsFromObj(interp, tablePtr->tkwin, objv[4], PIXELS_ANY, &y)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    rowPtr = RowColumnSearch(&tablePtr->rows, y);
-    if (rowPtr == NULL) {
-	return TCL_OK;
-    }
-    columnPtr = RowColumnSearch(&tablePtr->cols, x);
-    if (columnPtr == NULL) {
-	return TCL_OK;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(rowPtr->index));
-    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewIntObj(columnPtr->index));
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Returns a list of tables currently in use. A table is associated by
- *	the name of its container widget.  All tables matching a given pattern
- *	are included in this list.  If no pattern is present (objc == 0), all
- *	tables are included.
- *
- * Results:
- *	Returns a standard TCL result.  If no error occurred, TCL_OK is
- *	returned and a list of tables is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return list of names to */
-    int objc,
-    Tcl_Obj *const *objv)	/* Contains 0-1 arguments: search pattern */
-{
-    NamesSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, namesSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.slave != NULL) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tk_Window tkwin;
-
-	tkwin = Tk_NameToWindow(interp, switches.slave, dataPtr->tkMain);
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->tableTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Table *tablePtr;
-
-	    tablePtr = Blt_GetHashValue(hPtr);
-	    if (FindEntry(tablePtr, tkwin) != NULL) {
-		Tcl_AppendElement(interp, Tk_PathName(tablePtr->tkwin));
-	    }
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	const char *pattern;
-
-	pattern = (switches.pattern == NULL) ? Tcl_GetString(objv[3]) : 
-	    switches.pattern;
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->tableTable, &iter);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Table *tablePtr;
-
-	    tablePtr = Blt_GetHashValue(hPtr);
-	    if (tablePtr->interp == interp) {
-		if ((pattern == NULL) ||
-		    (Tcl_StringMatch(Tk_PathName(tablePtr->tkwin), pattern))) {
-		    Tcl_AppendElement(interp, Tk_PathName(tablePtr->tkwin));
-		}
-	    }
-	}
-    }	
-    Blt_FreeSwitches(namesSwitches, (char *)&switches, 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SaveOp --
- *
- *	Returns a list of all the commands necessary to rebuild the the table.
- *	This includes the layout of the widgets and any row, column, or table
- *	options set.
- *
- * Results:
- *	Returns a standard TCL result.  If no error occurred, TCL_OK is
- *	returned and a list of widget path names is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SaveOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    Blt_ChainLink link, lastl;
-    PartitionInfo *piPtr;
-    Tcl_DString dString;
-    int start, last;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppend(&dString, "\n# Table widget layout\n\n", -1);
-    Tcl_DStringAppend(&dString, Tcl_GetString(objv[0]), -1);
-    Tcl_DStringAppend(&dString, " ", -1);
-    Tcl_DStringAppend(&dString, Tk_PathName(tablePtr->tkwin), -1);
-    Tcl_DStringAppend(&dString, " \\\n", -1);
-    lastl = Blt_Chain_LastLink(tablePtr->chain);
-    for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	TableEntry *tePtr;
-
-	tePtr = Blt_Chain_GetValue(link);
-	PrintEntry(tePtr, &dString);
-	if (link != lastl) {
-	    Tcl_DStringAppend(&dString, " \\\n", -1);
-	}
-    }
-    Tcl_DStringAppend(&dString, "\n\n# Row configuration options\n\n", -1);
-    piPtr = &tablePtr->rows;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	start = Tcl_DStringLength(&dString);
-	Tcl_DStringAppend(&dString, Tcl_GetString(objv[0]), -1);
-	Tcl_DStringAppend(&dString, " configure ", -1);
-	Tcl_DStringAppend(&dString, Tk_PathName(tablePtr->tkwin), -1);
-	Tcl_DStringAppend(&dString, " r", -1);
-	Tcl_DStringAppend(&dString, Blt_Itoa(rcPtr->index), -1);
-	last = Tcl_DStringLength(&dString);
-	PrintRowColumn(interp, piPtr, rcPtr, &dString);
-	if (Tcl_DStringLength(&dString) == last) {
-	    Tcl_DStringSetLength(&dString, start);
-	} else {
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    }
-    Tcl_DStringAppend(&dString, "\n\n# Column configuration options\n\n", -1);
-    piPtr = &tablePtr->cols;
-    for (link = Blt_Chain_FirstLink(piPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	RowColumn *rcPtr;
-
-	rcPtr = Blt_Chain_GetValue(link);
-	start = Tcl_DStringLength(&dString);
-	Tcl_DStringAppend(&dString, Tcl_GetString(objv[0]), -1);
-	Tcl_DStringAppend(&dString, " configure ", -1);
-	Tcl_DStringAppend(&dString, Tk_PathName(tablePtr->tkwin), -1);
-	Tcl_DStringAppend(&dString, " c", -1);
-	Tcl_DStringAppend(&dString, Blt_Itoa(rcPtr->index), -1);
-	last = Tcl_DStringLength(&dString);
-	PrintRowColumn(interp, piPtr, rcPtr, &dString);
-	if (Tcl_DStringLength(&dString) == last) {
-	    Tcl_DStringSetLength(&dString, start);
-	} else {
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    }
-    start = Tcl_DStringLength(&dString);
-    Tcl_DStringAppend(&dString, "\n\n# Table configuration options\n\n", -1);
-    Tcl_DStringAppend(&dString, Tcl_GetString(objv[0]), -1);
-    Tcl_DStringAppend(&dString, " configure ", -1);
-    Tcl_DStringAppend(&dString, Tk_PathName(tablePtr->tkwin), -1);
-    last = Tcl_DStringLength(&dString);
-    PrintTable(tablePtr, &dString);
-    if (Tcl_DStringLength(&dString) == last) {
-	Tcl_DStringSetLength(&dString, start);
-    } else {
-	Tcl_DStringAppend(&dString, "\n", -1);
-    }
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchOp --
- *
- *	Returns a list of all the pathnames of the widgets managed by a table
- *	geometry manager.  The table is given by the path name of a container
- *	widget associated with the table.
- *
- * Results:
- *	Returns a standard TCL result.  If no error occurred, TCL_OK is
- *	returned and a list of widget path names is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SearchOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return list of names to */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const *objv)	/* Contains 1-2 arguments: pathname of
-				 * container widget associated with the table
-				 * and search pattern */
-{
-    Table *tablePtr;
-    Blt_ChainLink link;
-    SearchSwitches switches;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    memset(&switches, 0, sizeof(switches));
-    switches.tablePtr = tablePtr;
-    if (Blt_ParseSwitches(interp, searchSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-
-    /* Find entries that match the search criteria. */
-
-    for (link = Blt_Chain_FirstLink(tablePtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	TableEntry *tePtr;
-
-	tePtr = Blt_Chain_GetValue(link);
-	if (switches.pattern != NULL) {
-	    if (!Tcl_StringMatch(Tk_PathName(tePtr->tkwin), switches.pattern)) {
-		continue;
-	    }
-	}
-	if (switches.flags & MATCH_SPAN) {
-	    if ((switches.rspan >= 0) && 
-		(tePtr->row.rcPtr->index > switches.rspan) &&
-		((tePtr->row.rcPtr->index + tePtr->row.span) < switches.rspan)){
-		continue;
-	    } 
-	    if ((switches.cspan >= 0) && 
-		((tePtr->column.rcPtr->index > switches.cspan) ||
-		((tePtr->column.rcPtr->index + tePtr->column.span) <
-		 switches.cspan))) {
-		continue;
-	    }
-	}
-	if (switches.flags & MATCH_START) {
-	    if ((switches.rstart >= 0) && 
-		(tePtr->row.rcPtr->index != switches.rstart)) {
-		continue;
-	    }
-	    if ((switches.cstart >= 0) && 
-		(tePtr->column.rcPtr->index != switches.cstart)) {
-		continue;
-	    }
-	}
-	Tcl_AppendElement(interp, Tk_PathName(tePtr->tkwin));
-    }
-    Blt_FreeSwitches(searchSwitches, (char *)&switches, 0);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Table operations.
- *
- * The fields for Blt_OpSpec are as follows:
- *
- *   - operation name
- *   - minimum number of characters required to disambiguate the operation name.
- *   - function associated with operation.
- *   - minimum number of arguments required.
- *   - maximum number of arguments allowed (0 indicates no limit).
- *   - usage string
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tableOps[] =
-{
-    {"arrange",    1, ArrangeOp,   3, 3, "container",},
-    {"cget",       2, CgetOp,      4, 5, 
-	"container ?row|column|widget? option",},
-    {"configure",  3, ConfigureOp, 3, 0,
-	"container ?row|column|widget?... ?option value?...",},
-    {"containers", 3, NamesOp,     2, 4, "?switch? ?arg?",},
-    {"delete",     1, DeleteOp,    3, 0, "container row|column ?row|column?",},
-    {"extents",    1, ExtentsOp,   4, 4, "container row|column|widget",},
-    {"forget",     1, ForgetOp,    3, 0, "widget ?widget?...",},
-    {"info",       3, InfoOp,      3, 0, "container ?row|column|widget?...",},
-    {"insert",     3, InsertOp,    4, 6,
-	"container ?-before|-after? row|column ?count?",},
-    {"join",       1, JoinOp,      5, 5, "container first last",},
-    {"locate",     2, LocateOp,    5, 5, "container x y",},
-    {"names",      1, NamesOp,     2, 4, "?switch? ?arg?",},
-    {"save",       2, SaveOp,      3, 3, "container",},
-    {"search",     2, SearchOp,    3, 0, "container ?switch arg?...",},
-    {"split",      2, SplitOp,     4, 5, "container row|column div",},
-};
-
-static int nTableOps = sizeof(tableOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableCmd --
- *
- *	This procedure is invoked to process the TCL command that corresponds
- *	to the table geometry manager.  See the user documentation for details
- *	on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TableCmd(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TableInterpData *dataPtr = clientData;
-    TableCmdProc *proc;
-
-    if (objc > 1) {
-	char *string;
-
-	string = Tcl_GetString(objv[1]);
-	if (string[0] == '.') {
-	    Table *tablePtr;
-
-	    if (Blt_GetTableFromObj(clientData, interp, objv[1], &tablePtr) 
-		!= TCL_OK) {
-		Tcl_ResetResult(interp);
-		tablePtr = CreateTable(dataPtr, interp, string);
-		if (tablePtr == NULL) {
-		    return TCL_ERROR;
-		}
-	    }
-	    return BuildTable(tablePtr, interp, objc, objv);
-	}
-    }
-    proc = Blt_GetOpFromObj(interp, nTableOps, tableOps, BLT_OP_ARG1, 
-		objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc)(dataPtr, interp, objc, objv);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the table command is
- *	destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys all the hash table maintaining the names of the table
- *	geometry managers.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TableInterpDeleteProc(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp)
-{
-    TableInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->tableTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Table *tablePtr;
-
-	tablePtr = Blt_GetHashValue(hPtr);
-	tablePtr->hashPtr = NULL;
-	DestroyTable((DestroyData)tablePtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->tableTable);
-    Tcl_DeleteAssocData(interp, TABLE_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-static TableInterpData *
-GetTableInterpData(Tcl_Interp *interp)
-{
-    TableInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (TableInterpData *)
-	Tcl_GetAssocData(interp, TABLE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(TableInterpData));
-	dataPtr->tkMain = Tk_MainWindow(interp);
-	Tcl_SetAssocData(interp, TABLE_THREAD_KEY, TableInterpDeleteProc, 
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->tableTable, BLT_ONE_WORD_KEYS);
-    }
-    return dataPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TableMgrCmdInitProc --
- *
- *	This procedure is invoked to initialize the TCL command that
- *	corresponds to the table geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new TCL command.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TableMgrCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "table", TableCmd, };
-
-    cmdSpec.clientData = GetTableInterpData(interp);
-    rowUid = (Blt_Uid)Tk_GetUid("row");
-    columnUid = (Blt_Uid)Tk_GetUid("column");
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltTable.h b/blt3.0/src/bltTable.h
deleted file mode 100644
index e732d41..0000000
--- a/blt3.0/src/bltTable.h
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/*
- * bltTable.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_TABLE_H
-#define _BLT_TABLE_H
-
-#include "bltChain.h"
-#include "bltHash.h"
-#include "bltList.h"
-
-typedef struct {
-    Blt_HashTable tableTable;	/* Hash table of table structures keyed by 
-				 * the address of the reference Tk window */
-    Tk_Window tkMain;
-} TableInterpData;
-
-
-typedef struct _Editor Editor;
-typedef void (EditorDrawProc)(Editor *editor);
-typedef void (EditorDestroyProc)(DestroyData destroyData);
-
-struct _Editor {
-    int gridLineWidth;
-    int buttonHeight;
-    int entryPad;
-    int min;			/* Minimum size to allow any partition */
-
-    EditorDrawProc *drawProc;
-    EditorDestroyProc *destroyProc;
-};
-
-#define nRows		rows.chain->nLinks
-#define nColumns	cols.chain->nLinks
-
-/*
- * Limits --
- *
- * 	Defines the bounding of a size (width or height) in the table.  It may
- * 	be related to the partition, entry, or table size.  The widget
- * 	pointers are used to associate sizes with the requested size of other
- * 	widgets.
- */
-
-typedef struct {
-    int flags;			/* Flags indicate whether using default
-				 * values for limits or not. See flags
-				 * below. */
-    int max, min;		/* Values for respective limits. */
-    int nom;			/* Nominal starting value. */
-    Tk_Window wMax, wMin;	/* If non-NULL, represents widgets whose
-				 * requested sizes will be set as limits. */
-    Tk_Window wNom;		/* If non-NULL represents widget whose
-				 * requested size will be the nominal
-				 * size. */
-} Limits;
-
-#define LIMITS_SET_BIT	1
-#define LIMITS_SET_MIN  (LIMITS_SET_BIT<<0)
-#define LIMITS_SET_MAX  (LIMITS_SET_BIT<<1)
-#define LIMITS_SET_NOM  (LIMITS_SET_BIT<<2)
-
-#define LIMITS_MIN	0	/* Default minimum limit  */
-#define LIMITS_MAX	SHRT_MAX/* Default maximum limit */
-#define LIMITS_NOM	-1000	/* Default nomimal value.  Indicates if a
-				 * partition has received any space yet */
-
-typedef int (LimitsProc)(int value, Limits *limitsPtr);
-
-/*
- * Resize --
- *
- *	These flags indicate in what ways each partition in a table can be
- *	resized from its default dimensions.  The normal size of a row/column
- *	is the minimum amount of space needed to hold the widgets that span
- *	it.  The table may then be stretched or shrunk depending if the
- *	container is larger or smaller than the table. This can occur if 1)
- *	the user resizes the toplevel widget, or 2) the container is in turn
- *	packed into a larger widget and the "fill" option is set.
- *
- * 	  RESIZE_NONE 	  - No resizing from normal size.
- *	  RESIZE_EXPAND   - Do not allow the size to decrease.
- *			    The size may increase however.
- *        RESIZE_SHRINK   - Do not allow the size to increase.
- *			    The size may decrease however.
- *	  RESIZE_BOTH     - Allow the size to increase or
- *			    decrease from the normal size.
- *	  RESIZE_VIRGIN   - Special case of the resize flag.  Used to
- *			    indicate the initial state of the flag.
- *			    Empty rows/columns are treated differently
- *			    if this row/column is set.
- */
-
-#define RESIZE_NONE	0
-#define RESIZE_EXPAND	(1<<0)
-#define RESIZE_SHRINK	(1<<1)
-#define RESIZE_BOTH	(RESIZE_EXPAND | RESIZE_SHRINK)
-#define RESIZE_VIRGIN	(1<<2)
-
-/*
- * Control --
- */
-#define CONTROL_NORMAL	1.0	/* Consider the widget when calculating the
-				 * row heights and column widths.  */
-#define CONTROL_NONE	0.0	/* Ignore the widget.  The height and width of
-				 * the rows/columns spanned by this widget
-				 * will not affected by the size of the
-				 * widget.
-				 */
-#define CONTROL_FULL	-1.0	/* Consider only this widget when determining
-				 * the column widths and row heights of the
-				 * partitions it spans. */
-#define EXCL_PAD 	0
-#define INCL_PAD	1
-
-typedef struct _Table Table;
-typedef struct _RowColumn RowColumn;
-
-/*
- * TableEntry --
- *
- *	An entry holds a widget and describes how the widget should appear in
- *	a range of cells.
- *	 1. padding.
- *	 2. how many rows/columns the entry spans.
- *	 3. size bounds for the widget.
- *
- *	Several entries may start at the same cell in the table, but a entry
- *	can hold only one widget.
- */
-
-typedef struct  {
-    Tk_Window tkwin;		/* Widget to be managed. */
-
-    Table *tablePtr;		/* Table managing this widget */
-
-    int borderWidth;		/* The external border width of the
-				 * widget. This is needed to check if
-				 * Tk_Changes(tkwin)->border_width changes.
-				 */
-
-    int manageWhenNeeded;	/* If non-zero, allow joint custody of the
-				 * widget.  This is for cases where the same
-				 * widget may be shared between two different
-				 * tables (e.g. same graph on two different
-				 * notebook pages).  Claim the widget only
-				 * when the table is mapped. Don't destroy the
-				 * entry if the table loses custody of the
-				 * widget. */
-
-    Limits reqWidth, reqHeight;	/* Bounds for width and height requests made
-				 * by the widget. */
-    struct PositionInfo {
-	RowColumn *rcPtr;	/* Row or column where this entry starts. */
-
-	long span;		/* Number of rows or columns spanned. */
-	float control;		/* Weight of widget in the row or column. */
-
-	Blt_ChainLink link;	/* Link to widget in the chain of spans */
-
-	Blt_Chain chain;	/* Pointer to the chain of spans. */
-    } row, column;
-
-    Tk_Anchor anchor;		/* Anchor type: indicates how the widget is
-				 * positioned if extra space is available in
-				 * the entry */
-
-    Blt_Pad xPad;		/* Extra padding placed left and right of the
-				 * widget. */
-    Blt_Pad yPad;		/* Extra padding placed above and below the
-				 * widget */
-
-    int ixPad, iyPad;		/* Extra padding added to the interior of the
-				 * widget (i.e. adds to the requested size of
-				 * the widget) */
-
-    int fill;			/* Indicates how the widget should fill the
-				 * span of cells it occupies. */
-
-    int x, y;			/* Origin of widget wrt container. */
-
-    Blt_ChainLink link;		/* Pointer into list of entries. */
-
-    Blt_HashEntry *hashPtr;	/* Pointer into table of entries. */
-
-} TableEntry;
-
-/*
- * RowColumn --
- *
- * 	Creates a definable space (row or column) in the table. It may have
- * 	both requested minimum or maximum values which constrain the size of
- * 	it.
- */
-
-struct _RowColumn {
-    int index;			/* Index of row or column */
-
-    int size;			/* Current size of the partition. This size
-				 * is bounded by min and max. */
-
-    /*
-     * nom and size perform similar duties.  I need to keep track of the
-     * amount of space allocated to the partition (using size).  But at the
-     * same time, I need to indicate that space can be parcelled out to this
-     * partition.  If a nominal size was set for this partition, I don't want
-     * to add space.
-     */
-
-    int nom;			/* The nominal size (neither expanded nor
-				 * shrunk) of the partition based upon the
-				 * requested sizes of the widgets spanning
-				 * this partition. */
-
-    int min, max;		/* Size constraints on the partition */
-
-    int offset;			/* Offset of the partition (in pixels) from
-				 * the origin of the container. */
-
-    int minSpan;		/* Minimum spanning widget in partition. Used
-				 * for bookkeeping when growing a span of
-				 * partitions */
-
-    float weight;		/* Weight of row or column */
-
-    TableEntry *control;	/* Pointer to the entry that is determining
-				 * the size of this partition.  This is used
-				 * to know when a partition is occupied. */
-
-    int resize;			/* Indicates if the partition should shrink or
-				 * expand from its nominal size. */
-
-    Blt_Pad pad;		/* Pads the partition beyond its nominal
-				 * size */
-
-    Limits reqSize;		/* Requested bounds for the size of the
-				 * partition. The partition will not expand or
-				 * shrink beyond these limits, regardless of
-				 * how it was specified (max widget size).
-				 * This includes any extra padding which may
-				 * be specified. */
-
-    int maxSpan;		/* Maximum spanning widget to consider when
-				 * growing a span of partitions.  A value of
-				 * zero indicates that all spans should be
-				 * considered. */
-
-    int count;
-
-    Blt_ChainLink link;
-
-};
-
-#define DEF_TBL_RESIZE	"both"
-#define DEF_TBL_PAD	"0"
-#define DEF_TBL_MAXSPAN	"0"
-
-
-/*
- * This is the default number of elements in the statically pre-allocated
- * column and row arrays.  This number should reflect a useful number of row
- * and columns, which fit most applications.
- */
-#define DEF_ARRAY_SIZE	32
-
-typedef TableEntry *(EntrySearchProc)(Table *tablePtr, Tk_Window tkwin);
-
-/*
- * PartitionInfo --
- *
- * 	Manages the rows or columns of the table.  Contains a chain of
- * 	partitions (representing the individiual rows or columns).
- *
- */
-typedef struct PartitionInfo {
-    char *type;			/* String identifying the type of partition:
-				 * "row" or "column". */
-    Blt_Chain chain;
-    Blt_List list;		/* Linked list of bins of widgets keyed by
-				 * increasing span. */
-    Blt_ConfigSpec *configSpecs;
-    int reqLength;
-    int ePad;			/* Extra padding for row/column needed to
-				 * display editor marks */
-} PartitionInfo;
-
-/*
- * Table structure
- */
-struct _Table {
-    int flags;			/* See the flags definitions below. */
-    Tk_Window tkwin;		/* The container widget into which other
-				 * widgets are arranged. */
-    Tcl_Interp *interp;		/* Interpreter associated with all widgets */
-
-    Blt_Chain chain;		/* Chain of entries in the table. */
-
-    Blt_HashTable entryTable;	/* Table of entries.  Serves as a directory to
-				 * look up entries from widget their names. */
-    Blt_Pad xPad, yPad;
-
-    int propagate;		/* If non-zero, the table will make a geometry
-				 * request on behalf of the container
-				 * widget. */
-
-    int eTablePad, eEntryPad;
-
-    PartitionInfo cols;
-    PartitionInfo rows;		/* Manages row and column partitions */
-
-    Dim2D container;		/* Last known dimenion of the container. */
-    Dim2D normal;		/* Normal dimensions of the table */
-    Limits reqWidth, reqHeight;	/* Constraints on the table's normal width and
-				 * height */
-    Editor *editPtr;		/* If non-NULL, indicates that the table is
-				 * currently being edited */
-    Tcl_IdleProc *arrangeProc;
-    EntrySearchProc *findEntryProc;
-    Blt_HashEntry *hashPtr;	/* Used to delete the table from its
-				 * hashtable. */
-    Blt_HashTable *tablePtr;
-};
-
-/*
- * Table flags definitions
- */
-#define ARRANGE_PENDING (1<<0)	/* A call to ArrangeTable is pending. This
-				 * flag allows multiple layout changes to be
-				 * requested before the table is actually
-				 * reconfigured. */
-#define REQUEST_LAYOUT 	(1<<1)	/* Get the requested sizes of the widgets
-				 * before expanding/shrinking the size of the
-				 * container.  It's necessary to recompute the
-				 * layout every time a partition or entry is
-				 * added, reconfigured, or deleted, but not
-				 * when the container is resized. */
-#define NON_PARENT	(1<<2)	/* The table is managing widgets that arern't
-				 * children of the container.  This requires
-				 * that they are manually moved when the
-				 * container is moved (a definite performance
-				 * hit). */
-/*
- * Forward declarations
- */
-
-BLT_EXTERN int Blt_GetTable(TableInterpData *dataPtr, Tcl_Interp *interp, 
-	const char *pathName, Table **tablePtrPtr);
-
-BLT_EXTERN int Blt_GetTableFromObj(TableInterpData *dataPtr, Tcl_Interp *interp,
-	Tcl_Obj *objPtr, Table **tablePtrPtr);
-
-#endif /* _BLT_TABLE_H */
diff --git a/blt3.0/src/bltTabset.c b/blt3.0/src/bltTabset.c
deleted file mode 100644
index 12784df..0000000
--- a/blt3.0/src/bltTabset.c
+++ /dev/null
@@ -1,7370 +0,0 @@
-
-/*
- * bltTabset.c --
- *
- * This module implements a tabnotebook widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_TABSET
-#include "bltOp.h"
-#include "bltBind.h"
-#include "bltChain.h"
-#include "bltFont.h"
-#include "bltBgStyle.h"
-#include "bltImage.h"
-#include "bltText.h"
-#include "bltHash.h"
-
-#define INVALID_FAIL	0
-#define INVALID_OK	1
-
-#define TABWIDTH_NONE		-2
-#define TABWIDTH_SAME		-1
-#define TABWIDTH_VARIABLE	0
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-
-#define GAP			1
-#define SELECT_PADX		4
-#define SELECT_PADY		2
-#define OUTER_PAD		0
-#define LABEL_PAD		2
-#define CORNER_OFFSET		3
-
-#define TAB_SCROLL_OFFSET	10
-
-#define END			(-1)
-#define ODD(x)			((x) | 0x01)
-
-#define SIDE_LEFT		(1<<0)
-#define SIDE_TOP		(1<<1)
-#define SIDE_RIGHT		(1<<2)
-#define SIDE_BOTTOM		(1<<3)
-
-#define ISVERTICAL(s)		((s) & (SIDE_LEFT | SIDE_RIGHT))
-#define ISHORIZONTAL(s)		((s) & (SIDE_TOP | SIDE_BOTTOM))
-
-#define TABWIDTH(s, t)		\
-    (ISVERTICAL((s)->side)) ? (t)->height : (t)->width)
-#define TABHEIGHT(s, t)		\
-    (ISVERTICAL((s)->side)) ? (t)->height : (t)->width)
-
-#define VPORTWIDTH(b)		 \
-    ((ISHORIZONTAL((b)->side)) ? (Tk_Width((b)->tkwin) - 2 * (b)->inset) : \
-   (Tk_Height((b)->tkwin) - 2 * (b)->inset))
-
-#define VPORTHEIGHT(b)		 \
-    ((ISVERTICAL((b)->side)) ? (Tk_Width((b)->tkwin) - 2 * (b)->inset) : \
-   (Tk_Height((b)->tkwin) - 2 * (b)->inset))
-
-#define GETATTR(t,attr)		\
-   (((t)->attr != NULL) ? (t)->attr : (t)->setPtr->defStyle.attr)
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Internal widget flags:
- *
- *	LAYOUT_PENDING  The layout of the widget needs to be recomputed.
- *
- *	REDRAW_PENDING	A redraw request is pending for the widget.
- *
- *	SCROLL_PENDING	A scroll request is pending.
- *
- *	FOCUS		The widget is receiving keyboard events.
- *			Draw the focus highlight border around the widget.
- *
- *	MULTIPLE_TIER	Tabset is using multiple tiers.
- *
- *	SCROLLABLE	Tabset has enough tabs to be scrolled.
- *
- *---------------------------------------------------------------------------
- */
-#define LAYOUT_PENDING	   (1<<0)	/* Indicates the tabset has been
-					 * changed so that it geometry needs
-					 * to be recalculated before its
-					 * redrawn. */
-#define REDRAW_PENDING	   (1<<1)	/* Indicates the tabset needs to be
-					 * redrawn at the next idle point. */
-#define SCROLL_PENDING	   (1<<2)	/* Indicates a scroll request that  */
-#define FOCUS		   (1<<4)	/* Indicates the tabset/tab has
-					 * focus. */
-#define TEAROFF		   (1<<5)	/* Indicates if the perforation should
-					 * be drawn (see -tearoff). */
-#define SCROLLABLE	   (1<<6)
-#define MULTIPLE_TIER	   (1<<7)	/* Indicates the tabset is using
-					 * multiple tiers of tabs. */
-#define PERFORATION_ACTIVE (1<<8)	/* Indicates if the perforation should
-					 * should be drawn with active
-					 * colors. */
-#define TABS_ONLY	   (1<<9)	/* Indicates if only tabs need to be
-					 * drawn.  This avoids drawing the
-					 * folder again. */
-#define BUTTON		   (1<<10)	/* Indicates if the button should be
-					 * displayed. */
-#define BUTTON_ACTIVE	   (1<<11)	/* Indicates if the button should be
-					 * drawn with the active image,
-					 * otherwise use the normal image. */
-
-#define SLANT_NONE		0
-#define SLANT_LEFT		(1<<11)
-#define SLANT_RIGHT		(1<<12)
-#define SLANT_BOTH		(SLANT_LEFT | SLANT_RIGHT)
-
-#define TAB_LABEL		(ClientData)0
-#define TAB_PERFORATION		(ClientData)1
-#define TAB_BUTTON		(ClientData)2
-
-#ifdef notdef
-#define DEF_ACTIVEBACKGROUND		RBG_GREY85
-#define DEF_ACTIVEFOREGROUND		STD_ACTIVE_FOREGROUND
-#else
-#define DEF_ACTIVEBACKGROUND		RGB_SKYBLUE4
-#define DEF_ACTIVEFOREGROUND		RGB_WHITE
-#endif
-#define DEF_BACKGROUND			RGB_GREY77
-#define DEF_BORDERWIDTH			"0"
-#define DEF_COMMAND			(char *)NULL
-#define DEF_CURSOR			(char *)NULL
-#define DEF_DASHES			"1"
-#define DEF_FONT			STD_FONT_SMALL
-#define DEF_FOREGROUND			STD_NORMAL_FOREGROUND
-#define DEF_FOREGROUND			STD_NORMAL_FOREGROUND
-#define DEF_GAP				"1"
-#define DEF_HEIGHT			"0"
-#define DEF_HIGHLIGHTBACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_HIGHLIGHTCOLOR		RGB_BLACK
-#define DEF_HIGHLIGHTTHICKNESS		"0"
-#define DEF_JUSTIFY			"left"
-#define DEF_OUTERPAD			"0"
-#define DEF_PAGEHEIGHT			"0"
-#define DEF_PAGEWIDTH			"0"
-#define DEF_RELIEF			"flat"
-#define DEF_ROTATE			"0.0"
-#define DEF_SCROLLINCREMENT		"0"
-#define DEF_SELECTBACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_SELECTBORDERWIDTH		"1"
-#define DEF_SELECTCOMMAND		(char *)NULL
-#define DEF_SELECTFOREGROUND		RGB_BLACK
-#define DEF_SELECTMODE			"multiple"
-#define DEF_SELECTPAD			"5"
-#define DEF_SELECTRELIEF		"raised"
-#define DEF_SHADOWCOLOR			RGB_BLACK
-#define DEF_SIDE			"top"
-#define DEF_SLANT			"none"
-#define DEF_TABRELIEF			"raised"
-#define DEF_TABWIDTH			"same"
-#define DEF_TAKEFOCUS			"1"
-#define DEF_TEAROFF			"no"
-#define DEF_TEXTSIDE			"right"
-#define DEF_TIERS			"1"
-#define DEF_TROUGHCOLOR			"grey60"
-#define DEF_WIDTH			"0"
-
-#define DEF_BUTTON_ACTIVEBACKGROUND	(char *)NULL
-#define DEF_BUTTON_ACTIVEFOREGROUND	(char *)NULL
-#define DEF_BUTTON_ACTIVEIMAGE		(char *)NULL
-#define DEF_BUTTON_ACTIVERELIEF		"raised"
-#define DEF_BUTTON_BORDERWIDTH		"1"
-#define DEF_BUTTON_COMMAND		(char *)NULL
-#define DEF_BUTTON_IMAGE		(char *)NULL
-#define DEF_BUTTON_RELIEF		"flat"
-
-#define DEF_TAB_ACTIVEBACKGROUND	(char *)NULL
-#define DEF_TAB_ACTIVEFOREGROUND	(char *)NULL
-#define DEF_TAB_ANCHOR			"center"
-#define DEF_TAB_BACKGROUND		(char *)NULL
-#define DEF_TAB_BORDERWIDTH		"1"
-#define DEF_TAB_BUTTON			(char *)NULL
-#define DEF_TAB_COMMAND			(char *)NULL
-#define DEF_TAB_DATA			(char *)NULL
-#define DEF_TAB_FILL			"none"
-#define DEF_TAB_FONT			(char *)NULL
-#define DEF_TAB_FOREGROUND		(char *)NULL
-#define DEF_TAB_HEIGHT			"0"
-#define DEF_TAB_HIDE			"no"
-#define DEF_TAB_IMAGE			(char *)NULL
-#define DEF_TAB_IPAD			"0"
-#define DEF_TAB_PAD			"3"
-#define DEF_TAB_PERFORATIONCOMMAND	(char *)NULL
-#define DEF_TAB_SELECTBACKGROUND	(char *)NULL
-#define DEF_TAB_SELECTBORDERWIDTH 	"1"
-#define DEF_TAB_SELECTCOMMAND		(char *)NULL
-#define DEF_TAB_SELECTFOREGROUND	(char *)NULL
-#define DEF_TAB_STATE			"normal"
-#define DEF_TAB_STIPPLE			"BLT"
-#define DEF_TAB_TEXT			(char *)NULL
-#define DEF_TAB_VISUAL			(char *)NULL
-#define DEF_TAB_WIDTH			"0"
-#define DEF_TAB_WINDOW			(char *)NULL
-#define DEF_TAB_WINDOWHEIGHT		"0"
-#define DEF_TAB_WINDOWWIDTH		"0"
-
-typedef struct _Tabset Tabset;
-
-static Tk_GeomRequestProc EmbeddedWidgetGeometryProc;
-static Tk_GeomLostSlaveProc EmbeddedWidgetCustodyProc;
-static Tk_GeomMgr tabMgrInfo = {
-    (char *)"tabset",		     /* Name of geometry manager used by
-				      * winfo */
-    EmbeddedWidgetGeometryProc,	     /* Procedure to for new geometry
-				      * requests */
-    EmbeddedWidgetCustodyProc,	     /* Procedure when window is taken away */
-};
-
-static Blt_OptionParseProc ObjToImageProc;
-static Blt_OptionPrintProc ImageToObjProc;
-static Blt_OptionFreeProc  FreeImageProc;
-static Blt_OptionParseProc ObjToChildProc;
-static Blt_OptionPrintProc ChildToObjProc;
-static Blt_OptionParseProc ObjToSlantProc;
-static Blt_OptionPrintProc SlantToObjProc;
-static Blt_OptionParseProc ObjToTabWidthProc;
-static Blt_OptionPrintProc TabWidthToObjProc;
-static Blt_OptionParseProc ObjToStateProc;
-static Blt_OptionPrintProc StateToObjProc;
-
-/*
- * Contains a pointer to the widget that's currently being configured.  This
- * is used in the custom configuration parse routine for images.
- */
-
-static Blt_CustomOption imageOption = {
-    ObjToImageProc, ImageToObjProc, FreeImageProc, (ClientData)0,
-};
-
-static Blt_CustomOption childOption = {
-    ObjToChildProc, ChildToObjProc, NULL, (ClientData)0,
-};
-
-static Blt_CustomOption slantOption = {
-    ObjToSlantProc, SlantToObjProc, NULL, (ClientData)0,
-};
-
-static Blt_CustomOption tabWidthOption = {
-    ObjToTabWidthProc, TabWidthToObjProc, NULL, (ClientData)0,
-};
-
-static Blt_CustomOption stateOption = {
-    ObjToStateProc, StateToObjProc, NULL, (ClientData)0
-};
-
-/*
- * Image --
- *
- *	When multiple instances of an image are displayed in the same widget,
- *	this can be inefficient in terms of both memory and time.  We only
- *	need one instance of each image, regardless of number of times we use
- *	it.  And searching/deleting instances can be very slow as the list
- *	gets large.
- *
- *	The workaround, employed below, is to maintain a hash table of images
- *	that maintains a reference count for each image.
- */
-
-typedef struct {
-    Blt_HashEntry *hashPtr;		/* Hash table pointer to the image. */
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    short int width, height;		/* Dimensions of the cached image. */
-    int refCount;		        /* Reference counter for this image. */
-} Image;
-
-#define ImageHeight(i)	((i)->height)
-#define ImageWidth(i)	((i)->width)
-#define ImageBits(i)	((i)->tkImage)
-
-/*
- * Button --
- */
-typedef struct {
-    int borderWidth;			/* Width of 3D border around the tab's
-					 * button. */
-    int pad;				/* Extra padding around button. */
-    int activeRelief;			/* 3D relief when the button is
-					 * active. */
-    int relief;				/* 3D relief of button. */
-
-    Image *imagePtr;			/* If non-NULL, image to be displayed
-					 * when button is displayed. */
-    Image *activeImagePtr;		/* If non-NULL, image to be displayed
-					 * when the button is active. */
-    Tcl_Obj *cmdObjPtr;			/* Command to be executed when the
-					 * the button is invoked. */
-    short int width, height;
-} Button;
-
-static Blt_ConfigSpec buttonSpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-activeimage", "activeImage", "ActiveImage", 
-        DEF_BUTTON_ACTIVEIMAGE, Blt_Offset(Button, activeImagePtr), 
-	BLT_CONFIG_NULL_OK, &imageOption},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "ActiveRelief",
-	DEF_BUTTON_ACTIVERELIEF, Blt_Offset(Button, activeRelief), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BUTTON_BORDERWIDTH, Blt_Offset(Button, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-command", "command", "Command", DEF_BUTTON_COMMAND, 
-	Blt_Offset(Button, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", DEF_BUTTON_IMAGE, 
-        Blt_Offset(Button, imagePtr), BLT_CONFIG_NULL_OK, &imageOption},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_BUTTON_RELIEF, 
-	Blt_Offset(Button, relief), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-#define NORMAL		(0)
-#define ACTIVE		(1<<0)
-#define DISABLED	(1<<1)
-#define HIDE		(1<<2)
-#define STATE_MASK	(ACTIVE|DISABLED|HIDE)
-#define ONSCREEN	(1<<3)
-#define TEAROFF_REDRAW	(1<<4)
-
-typedef struct {
-    const char *name;			/* Identifier for tab. */
-    Blt_HashEntry *hashPtr;
-    int index;				/* Index of the tab. */
-    unsigned int flags;
-    int tier;				/* Index of tier [1..numTiers]
-					 * containing this tab. */
-
-    int worldX, worldY;			/* Position of tab in world
-					 * coordinates. */
-    int worldWidth, worldHeight;	/* Dimensions of the tab, corrected
-					 * for orientation (-side).  It
-					 * includes the * border, padding,
-					 * label, etc. */
-    int screenX, screenY;
-    short int screenWidth;
-    short int screenHeight;		/*  */
-
-    Tabset *setPtr;			/* Tabset that includes this
-					 * tab. Needed for callbacks can pass
-					 * only a tab pointer.  */
-    int reqTabWidth, reqTabHeight;	/* Requested tab size. */
-
-    /*
-     * Tab label:
-     */
-    const char *text;			/* String displayed as the tab's
-					 * label. */
-    TextLayout *layoutPtr;
-
-    Image *imagePtr;			/* Image displayed as the label. */
-
-    short int textWidth, textHeight;
-    short int labelWidth, labelHeight;
-    Blt_Pad iPadX, iPadY;		/* Internal padding around the text */
-
-    Blt_Font font;
-
-    /*
-     * Normal:
-     */
-    XColor *textColor;			/* Text color */
-    Blt_Background bg;		        /* Background color and border for
-					 * tab. */
-    /*
-     * Selected: Tab is currently selected.
-     */
-    XColor *selColor;			/* Selected text color */
-    Blt_Background selBg;		/* 3D border of selected folder. */
-
-    /*
-     * Active: Mouse passes over the tab.
-     */
-    Blt_Background activeBg;		/* Active background color. */
-    XColor *activeFgColor;		/* Active text color */
-    Pixmap stipple;			/* Stipple for outline of embedded
-					 * window when torn off. */
-    /*
-     * Embedded widget information:
-     */
-    Tk_Window tkwin;			/* Widget to be mapped when the tab is
-					 * selected.  If NULL, don't make
-					 * space for the page. */
-    int reqSlaveWidth, reqSlaveHeight;	/* If non-zero, overrides the
-					 * requested dimensions of the
-					 * embedded widget. */
-    Tk_Window container;		/* The window containing the embedded
-					 * widget.  Does not necessarily have
-					 * to be the parent. */
-    Tk_Anchor anchor;			/* Anchor: indicates how the embedded
-					 * widget is positioned within the
-					 * extra space on the page. */
-    Blt_Pad xPad, yPad;			/* Padding around embedded widget. */
-    int fill;				/* Indicates how the window should
-					 * fill the page. */
-
-    /*
-     * Auxillary information:
-     */
-    Tcl_Obj *cmdObjPtr;			/* Command invoked when the tab is
-					 * selected */
-    const char *data;			/* This value isn't used in C code.
-					 * It may be used by clients in Tcl
-					 * bindings * to associate extra data
-					 * (other than the * label or name)
-					 * with the tab. */
-
-    Blt_ChainLink link;			/* Pointer to where the tab resides in
-					 * the list of tabs. */
-    Tcl_Obj *perfCmdObjPtr;		/* Command invoked when the tab is
-					 * selected */
-    GC textGC;
-    GC backGC;
-
-} Tab;
-
-static Blt_ConfigSpec tabSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_TAB_ACTIVEBACKGROUND,
-	Blt_Offset(Tab, activeBg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_TAB_ACTIVEFOREGROUND, 
-	Blt_Offset(Tab, activeFgColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_TAB_ANCHOR, 
-	Blt_Offset(Tab, anchor), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_TAB_BACKGROUND, Blt_Offset(Tab, bg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_BITMASK, "-button", "button", "button", DEF_TAB_BUTTON, 
-	Blt_Offset(Tab, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)BUTTON},
-    {BLT_CONFIG_OBJ, "-command", "command", "Command", DEF_TAB_COMMAND, 
-        Blt_Offset(Tab, cmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-data", "data", "data", DEF_TAB_DATA, 
-	Blt_Offset(Tab, data), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FILL, "-fill", "fill", "Fill", DEF_TAB_FILL, 
-	Blt_Offset(Tab, fill), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", 
-	DEF_TAB_FOREGROUND, Blt_Offset(Tab, textColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_TAB_FONT, 
-	Blt_Offset(Tab, font), 0},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "icon", DEF_TAB_IMAGE, 
-	Blt_Offset(Tab, imagePtr), BLT_CONFIG_NULL_OK, &imageOption},
-    {BLT_CONFIG_PAD, "-ipadx", "iPadX", "PadX", DEF_TAB_IPAD, 
-	Blt_Offset(Tab, iPadX), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-ipady", "iPadY", "PadY", DEF_TAB_IPAD, 
-	Blt_Offset(Tab, iPadY), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-padx", "padX", "PadX", 	DEF_TAB_PAD, 
-	Blt_Offset(Tab, xPad), 0},
-    {BLT_CONFIG_PAD, "-pady", "padY", "PadY", DEF_TAB_PAD, 
-	Blt_Offset(Tab, yPad), 0},
-    {BLT_CONFIG_OBJ, "-perforationcommand", "perforationcommand", 
-	"PerforationCommand", DEF_TAB_PERFORATIONCOMMAND, 
-	Blt_Offset(Tab, perfCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Background", DEF_TAB_SELECTBACKGROUND, Blt_Offset(Tab, selBg), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-	DEF_TAB_SELECTFOREGROUND, Blt_Offset(Tab, selColor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_TAB_STATE, 
-	Blt_Offset(Tab, flags), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption},
-    {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_TAB_STIPPLE, 
-	Blt_Offset(Tab, stipple), 0},
-    {BLT_CONFIG_STRING, "-text", "Text", "Text", DEF_TAB_TEXT, 
-	Blt_Offset(Tab, text), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Tab, reqTabWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-window", "window", "Window", DEF_TAB_WINDOW, 
-	Blt_Offset(Tab, tkwin), BLT_CONFIG_NULL_OK, &childOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-windowheight", "windowHeight", "WindowHeight",
-	DEF_TAB_WINDOWHEIGHT, Blt_Offset(Tab, reqSlaveHeight), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-windowwidth", "windowWidth", "WindowWidth",
-	DEF_TAB_WINDOWWIDTH, Blt_Offset(Tab, reqSlaveWidth), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * TabStyle --
- */
-typedef struct {
-    Tk_Window tkwin;			/* Default window to map pages. */
-
-    int reqTabWidth, reqTabHeight;	/* Requested tab size. */
-    int borderWidth;			/* Width of 3D border around the tab's
-					 * label. */
-    int pad;				/* Extra padding of a tab entry */
-
-    Blt_Font font;
-
-    XColor *textColor;
-    Blt_Background bg;			/* Normal background. */
-
-    XColor *selColor;			/* Selected foreground. */
-    Blt_Background selBg;		/* Selected background. */
-
-    Blt_Background activeBg;		/* Active background. */
-    XColor *activeFgColor;		/* Active foreground. */
-
-    int justify;
-
-
-    Blt_Dashes dashes;
-    GC activeGC;
-    int relief;
-    Tcl_Obj *cmdObjPtr;			/* Command invoked when the tab is
-					 * selected */
-    Tcl_Obj *perfCmdObjPtr;	
-
-    float angle;
-    int textPos;
-
-} TabStyle;
-
-struct _Tabset {
-    Tk_Window tkwin;			/* Window that embodies the widget.
-					 * NULL means that the window has been
-					 * destroyed but the data structures
-					 * haven't yet been cleaned up.*/
-
-    Display *display;			/* Display containing widget; needed,
-					 * among other things, to release
-					 * resources after tkwin has already
-					 * gone away. */
-
-    Tcl_Interp *interp;			/* Interpreter associated with
-					 * widget. */
-
-    Tcl_Command cmdToken;		/* Token for widget's command. */
-
-    unsigned int flags;			/* For bitfield definitions, see
-					 * below */
-
-    short int inset;			/* Total width of all borders,
-					 * including traversal highlight and
-					 * 3-D border.  Indicates how much
-					 * interior stuff must be offset from
-					 * outside edges to leave room for
-					 * borders. */
-
-    short int inset2;			/* Total width of 3-D folder border +
-					 * corner, Indicates how much interior
-					 * stuff  must be offset from outside
-					 * edges of folder.*/
-
-    short int yPad;			/* Extra offset for selected tab. Only
-					 * for single tiers. */
-
-    short int pageTop;			/* Offset from top of tabset to the
-					 * start of the page. */
-    short int xOffset, yOffset;		/* Offset of pixmap buffer to top of
-					 * window. */
-
-    Tk_Cursor cursor;			/* X Cursor */
-
-    Blt_Background bg;		        /* 3D border surrounding the
-					 * window. */
-    int borderWidth;			/* Width of 3D border. */
-    int relief;				/* 3D border relief. */
-
-    XColor *shadowColor;		/* Shadow color around folder. */
-
-    /*
-     * Focus highlight ring
-     */
-    int highlightWidth;			/* Width in pixels of highlight to
-					 * draw around widget when it has the
-					 * focus.  <= 0 means don't draw a
-					 * highlight. */
-    XColor *highlightBgColor;		/* Color for drawing traversal
-					 * highlight area when highlight is
-					 * off. */
-    XColor *highlightColor;		/* Color for drawing traversal
-					 * highlight. */
-
-    GC highlightGC;			/* GC for focus highlight. */
-
-    const char *takeFocus;		/* Says whether to select this widget
-					 * during tab traveral operations.
-					 * This value isn't used in C code,
-					 * but for the widget's Tcl
-					 * bindings. */
-
-
-    int side;				/* Orientation of the tabset: either
-					 * SIDE_LEFT, SIDE_RIGHT, SIDE_TOP, or
-					 * SIDE_BOTTOM. */
-
-    int overlap;			/* Amount of  */
-    int gap;
-    short int tabWidth, tabHeight;
-    int xSelectPad, ySelectPad;		/* Padding around label of the
-					 * selected tab. */
-    int outerPad;			/* Padding around the exterior of the
-					 * tabset and folder. */
-    Button button;
-
-    TabStyle defStyle;			/* Global attribute information
-					 * specific to tabs. */
-
-    int reqWidth, reqHeight;		/* Requested dimensions of the tabset
-					 * window. */
-    int pageWidth, pageHeight;		/* Dimensions of a page in the
-					 * folder. */
-    int reqPageWidth, reqPageHeight;	/* Requested dimensions of a page. */
-
-    int lastX, lastY;
-
-    /*
-     * Scrolling information:
-     */
-    int worldWidth;
-    int scrollOffset;			/* Offset of viewport in world
-					 * coordinates. */
-    Tcl_Obj *scrollCmdObjPtr;		/* Command strings to control
-					 * scrollbar.*/
-    int scrollUnits;			/* Smallest unit of scrolling for
-					 * tabs. */
-
-    /*
-     * Scanning information:
-     */
-    int scanAnchor;			/* Scan anchor in screen coordinates. */
-    int scanOffset;			/* Offset of the start of the scan in
-					 * world coordinates.*/
-    int corner;				/* Number of pixels to offset next
-					 * point when drawing corners of the
-					 * folder. */
-    int reqTiers;			/* Requested number of tiers. Zero
-					 * means to dynamically scroll if
-					 * there are * too many tabs to be
-					 * display on a single * tier. */
-    int nTiers;				/* Actual number of tiers. */
-    Blt_HashTable imageTable;
-    Tab *selectPtr;			/* The currently selected tab.
-					 * (i.e. its page is displayed). */
-    Tab *activePtr;			/* Tab last located under the pointer.
-					 * It is displayed with its active
-					 * foreground / background
-					 * colors.  */
-    Tab *focusPtr;			/* Tab currently receiving focus. */
-    Tab *startPtr;			/* The first tab on the first tier. */
-    Blt_Chain chain;			/* List of tab entries. Used to
-					 * arrange placement of tabs. */
-    Blt_HashTable tabTable;		/* Hash table of tab entries. Used for
-					 * lookups of tabs by name. */
-    int nextId;
-    int nVisible;			/* Number of tabs that are currently
-					 * visible in the view port. */
-    Blt_BindTable bindTable;		/* Tab binding information */
-    Blt_HashTable tagTable;		/* Table of tags. */
-};
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"activeBackground", DEF_ACTIVEBACKGROUND, 
-	Blt_Offset(Tabset, defStyle.activeBg), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground",
-	"activeForeground", DEF_ACTIVEFOREGROUND, 
-	Blt_Offset(Tabset, defStyle.activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BACKGROUND, Blt_Offset(Tabset, defStyle.bg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, Blt_Offset(Tabset, defStyle.borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-button", "button", "button", DEF_TAB_BUTTON, 
-	Blt_Offset(Tabset, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)BUTTON},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_CURSOR, Blt_Offset(Tabset, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_DASHES, 
-	Blt_Offset(Tabset, defStyle.dashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_FOREGROUND, Blt_Offset(Tabset, defStyle.textColor), 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font",
-	DEF_FONT, Blt_Offset(Tabset, defStyle.font), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-gap", "gap", "Gap", DEF_GAP, 
-	Blt_Offset(Tabset, gap), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	Blt_Offset(Tabset, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_HIGHLIGHTBACKGROUND, 
-	Blt_Offset(Tabset, highlightBgColor), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_HIGHLIGHTCOLOR, Blt_Offset(Tabset, highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_HIGHLIGHTTHICKNESS, 
-	Blt_Offset(Tabset, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_JUSTIFY, "-justify", "Justify", "Justify", DEF_JUSTIFY, 
-	Blt_Offset(Tabset, defStyle.justify), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-outerborderwidth", "outerBorderWidth", 
-	"OuterBorderWidth", DEF_BORDERWIDTH, Blt_Offset(Tabset, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-outerpad", "outerPad", "OuterPad", DEF_OUTERPAD,
-	 Blt_Offset(Tabset, outerPad), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-outerrelief", "outerRelief", "OuterRelief", 
-	DEF_RELIEF, Blt_Offset(Tabset, relief), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-pageheight", "pageHeight", "PageHeight",
-	DEF_PAGEHEIGHT, Blt_Offset(Tabset, reqPageHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-pagewidth", "pageWidth", "PageWidth",
-	DEF_PAGEWIDTH, Blt_Offset(Tabset, reqPageWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-perforationcommand", "perforationcommand", 
-	"PerforationCommand", DEF_TAB_PERFORATIONCOMMAND, 
-	Blt_Offset(Tabset, defStyle.perfCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_TABRELIEF, Blt_Offset(Tabset, defStyle.relief), 0},
-    {BLT_CONFIG_FLOAT, "-rotate", "rotate", "Rotate", DEF_ROTATE, 
-	Blt_Offset(Tabset, defStyle.angle), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-tabwidth", "tabWidth", "TabWidth",
-	DEF_TABWIDTH, Blt_Offset(Tabset, defStyle.reqTabWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT, &tabWidthOption},
-    {BLT_CONFIG_OBJ, "-scrollcommand", "scrollCommand", "ScrollCommand",
-	(char *)NULL, Blt_Offset(Tabset, scrollCmdObjPtr),BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_POS, "-scrollincrement", "scrollIncrement",
-	"ScrollIncrement", DEF_SCROLLINCREMENT, 
-	Blt_Offset(Tabset, scrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", DEF_SELECTBACKGROUND, Blt_Offset(Tabset, defStyle.selBg),
-	0},
-    {BLT_CONFIG_OBJ, "-selectcommand", "selectCommand", "SelectCommand",
-	DEF_SELECTCOMMAND, Blt_Offset(Tabset, defStyle.cmdObjPtr),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	DEF_SELECTFOREGROUND, Blt_Offset(Tabset, defStyle.selColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectpad", "selectPad", "SelectPad",
-	DEF_SELECTPAD, Blt_Offset(Tabset, xSelectPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-shadowcolor", "shadowColor", "ShadowColor",
-	DEF_SHADOWCOLOR, Blt_Offset(Tabset, shadowColor), 0},
-    {BLT_CONFIG_SIDE, "-side", "side", "side", DEF_SIDE, 
-	Blt_Offset(Tabset, side), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-slant", "slant", "Slant", DEF_SLANT, 
-	Blt_Offset(Tabset, flags), BLT_CONFIG_DONT_SET_DEFAULT, &slantOption},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_TAKEFOCUS, Blt_Offset(Tabset, takeFocus), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMASK, "-tearoff", "tearoff", "Tearoff", DEF_TEAROFF, 
-	Blt_Offset(Tabset, flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)TEAROFF},
-    {BLT_CONFIG_SIDE, "-textside", "textSide", "TextSide", DEF_TEXTSIDE, 
-	Blt_Offset(Tabset, defStyle.textPos),BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT_POS, "-tiers", "tiers", "Tiers", DEF_TIERS, 
-	Blt_Offset(Tabset, reqTiers), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-troughcolor", "troughColor", "TroughColor",
-	DEF_TROUGHCOLOR, Blt_Offset(Tabset, bg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	Blt_Offset(Tabset, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * TabIterator --
- *
- *	Tabs may be tagged with strings.  A tab may have many tags.  The
- *	same tag may be used for many tabs.
- *	
- */
-typedef enum { 
-    ITER_SINGLE, ITER_ALL, ITER_TAG, ITER_PATTERN, 
-} IteratorType;
-
-typedef struct _Iterator {
-    Tabset *setPtr;		       /* Tabset that we're iterating over. */
-
-    IteratorType type;			/* Type of iteration:
-					 * ITER_TAG	 By item tag.
-					 * ITER_ALL      By every item.
-					 * ITER_SINGLE   Single item: either 
-					 *               tag or index.
-					 * ITER_PATTERN  Over a consecutive 
-					 *               range of indices.
-					 */
-
-    Tab *startPtr;			/* Starting item.  Starting point of
-					 * search, saved if iterator is reused.
-					 * Used for ITER_ALL and ITER_SINGLE
-					 * searches. */
-    Tab *endPtr;			/* Ending item (inclusive). */
-
-    Tab *nextPtr;			/* Next item. */
-
-					/* For tag-based searches. */
-    char *tagName;			/* If non-NULL, is the tag that we are
-					 * currently iterating over. */
-
-    Blt_HashTable *tablePtr;		/* Pointer to tag hash table. */
-
-    Blt_HashSearch cursor;		/* Search iterator for tag hash
-					 * table. */
-    Blt_ChainLink link;
-} TabIterator;
-
-/* Forward Declarations */
-static Blt_BindPickProc PickTabProc;
-static Blt_BindTagProc GetTagsProc;
-static Tcl_CmdDeleteProc TabsetInstDeletedCmd;
-static Tcl_FreeProc DestroyTabset;
-static Tcl_FreeProc DestroyTearoff;
-static Tcl_IdleProc AdoptWindow;
-static Tcl_IdleProc DisplayTabset;
-static Tcl_IdleProc DisplayTearoff;
-static Tcl_ObjCmdProc TabsetCmd;
-static Tcl_ObjCmdProc TabsetInstCmd;
-static Tk_EventProc EmbeddedWidgetEventProc;
-static Tk_EventProc TabsetEventProc;
-static Tk_EventProc TearoffEventProc;
-static Tk_ImageChangedProc ImageChangedProc;
-
-static void DrawLabel(Tabset *setPtr, Tab *tabPtr, Drawable drawable);
-static void DrawFolder(Tabset *setPtr, Tab *tabPtr, Drawable drawable);
-
-static void GetWindowRectangle(Tab *tabPtr, Tk_Window parent, int hasTearOff, 
-	XRectangle *rectPtr);
-static void ArrangeWindow(Tk_Window tkwin, XRectangle *rectPtr, int force);
-static void EventuallyRedraw(Tabset *setPtr);
-static void EventuallyRedrawTearoff(Tab *tabPtr);
-static void ComputeLayout(Tabset *setPtr);
-static void DrawOuterBorders(Tabset *setPtr, Drawable drawable);
-
-static int GetTabIterator(Tcl_Interp *interp, Tabset *setPtr, Tcl_Obj *objPtr, 
-	TabIterator *iterPtr);
-static int GetTabFromObj(Tcl_Interp *interp, Tabset *setPtr, Tcl_Obj *objPtr, 
-	Tab **tabPtrPtr);
-
-typedef int (TabsetCmdProc)(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-/*
- *---------------------------------------------------------------------------
- *
- * WorldToScreen --
- *
- *	Converts world coordinates to screen coordinates. Note that the world
- *	view is always tabs side top.
- *
- * Results:
- *	The screen coordinates are returned via *xScreenPtr and *yScreenPtr.
- *
- *---------------------------------------------------------------------------
- */
-static void
-WorldToScreen(Tabset *setPtr, int x, int y, int *xScreenPtr, int *yScreenPtr)
-{
-    int sx, sy;
-
-    sx = sy = 0;			/* Suppress compiler warning. */
-
-    /* Translate world X-Y to screen coordinates */
-    /*
-     * Note that the world X-coordinate is translated by the selected label's
-     * X padding. This is done only to keep the scroll range is between 0.0
-     * and 1.0, rather adding/subtracting the pad in various locations.  It
-     * may be changed back in the future.
-     */
-    x += (setPtr->inset + setPtr->xSelectPad - setPtr->scrollOffset);
-    y += setPtr->inset + setPtr->yPad;
-
-    switch (setPtr->side) {
-    case SIDE_TOP:
-	sx = x, sy = y;			/* Do nothing */
-	break;
-    case SIDE_RIGHT:
-	sx = Tk_Width(setPtr->tkwin) - y;
-	sy = x;
-	break;
-    case SIDE_LEFT:
-	sx = y, sy = x;			/* Flip coordinates */
-	break;
-    case SIDE_BOTTOM:
-	sx = x;
-	sy = Tk_Height(setPtr->tkwin) - y;
-	break;
-    }
-    *xScreenPtr = sx;
-    *yScreenPtr = sy;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays: the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(Tabset *setPtr)
-{
-    if ((setPtr->tkwin != NULL) && !(setPtr->flags & REDRAW_PENDING)) {
-	setPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayTabset, setPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedrawTearoff --
- *
- *	Queues a request to redraw the tearoff at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedrawTearoff(Tab *tabPtr)
-{
-    if ((tabPtr->tkwin != NULL) && !(tabPtr->flags & TEAROFF_REDRAW)) {
-	tabPtr->flags |= TEAROFF_REDRAW;
-	Tcl_DoWhenIdle(DisplayTearoff, tabPtr);
-    }
-}
-
-static void
-FreeImage(Tabset *setPtr, Image *imgPtr) 
-{
-    imgPtr->refCount--;
-    if (imgPtr->refCount == 0) {
-	Blt_DeleteHashEntry(&setPtr->imageTable, imgPtr->hashPtr);
-	Tk_FreeImage(imgPtr->tkImage);
-	Blt_Free(imgPtr);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- *	This routine is called whenever an image displayed in a tab changes.
- *	In this case, we assume that everything will change and queue a
- *	request to re-layout and redraw the entire tabset.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y,			/* Not used. */
-    int width, int height,		/* Not used. */
-    int imageWidth, int imageHeight)	/* Not used. */
-{
-    Tabset *setPtr = clientData;
-
-    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetImage --
- *
- *	This is a wrapper procedure for Tk_GetImage. The problem is that if
- *	the same image is used repeatedly in the same widget, the separate
- *	instances are saved in a linked list.  This makes it especially slow
- *	to destroy the widget.  As a workaround, this routine hashes the image
- *	and maintains a reference count for it.
- *
- * Results:
- *	Returns a pointer to the new image.
- *
- *---------------------------------------------------------------------------
- */
-static Image *
-GetImage(Tabset *setPtr, Tcl_Interp *interp, Tk_Window tkwin, const char *name)
-{
-    Image *imgPtr;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_CreateHashEntry(&setPtr->imageTable, name, &isNew);
-    if (isNew) {
-	Tk_Image tkImage;
-	int width, height;
-
-	tkImage = Tk_GetImage(interp, tkwin, name, ImageChangedProc, setPtr);
-	if (tkImage == NULL) {
-	    Blt_DeleteHashEntry(&setPtr->imageTable, hPtr);
-	    return NULL;
-	}
-	Tk_SizeOfImage(tkImage, &width, &height);
-	imgPtr = Blt_AssertMalloc(sizeof(Image));
-	imgPtr->tkImage = tkImage;
-	imgPtr->hashPtr = hPtr;
-	imgPtr->refCount = 1;
-	imgPtr->width = width;
-	imgPtr->height = height;
-	Blt_SetHashValue(hPtr, imgPtr);
-    } else {
-	imgPtr = Blt_GetHashValue(hPtr);
-	imgPtr->refCount++;
-    }
-    return imgPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeImageProc --
- *
- *	Releases the image if it's not being used anymore by this widget.
- *	Note there may be several uses of the same image by many tabs.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The reference count is decremented and the image is freed is it's not
- *	being used anymore.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreeImageProc(
-    ClientData clientData,
-    Display *display,			/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Image **imgPtrPtr = (Image **)(widgRec + offset);
-    Tabset *setPtr = clientData;
-
-    if (*imgPtrPtr != NULL) {
-	FreeImage(setPtr, *imgPtrPtr);
-	*imgPtrPtr = NULL;
-    }
-}
-
-static Blt_HashTable *
-GetTagTable(Tabset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&setPtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return NULL;			/* No tag by name. */
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static int
-HasTag(Tab *tabPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return TRUE;
-    }
-    tablePtr = GetTagTable(tabPtr->setPtr, tagName);
-    if (tablePtr == NULL) {
-	return FALSE;
-    }
-    hPtr = Blt_FindHashEntry(tablePtr, (char *)tabPtr);
-    if (hPtr == NULL) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-static Blt_HashTable *
-AddTagTable(Tabset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&setPtr->tagTable, tagName, &isNew);
-    if (isNew) {
-	tablePtr = Blt_AssertMalloc(sizeof(Blt_HashTable));
-	Blt_InitHashTable(tablePtr, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tablePtr);
-    } else {
-	tablePtr = Blt_GetHashValue(hPtr);
-    }
-    return tablePtr;
-}
-
-static void
-AddTag(Tabset *setPtr, Tab *tabPtr, const char *tagName)
-{
-    int isNew;
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-
-    tablePtr = AddTagTable(setPtr, tagName);
-    hPtr = Blt_CreateHashEntry(tablePtr, (char *)tabPtr, &isNew);
-    if (isNew) {
-	Blt_SetHashValue(hPtr, tabPtr);
-    }
-}
-
-
-static void
-ForgetTag(Tabset *setPtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return;				/* Can't remove tag "all". */
-    }
-    hPtr = Blt_FindHashEntry(&setPtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return;				/* No tag by name. */
-    }
-    tablePtr = Blt_GetHashValue(hPtr);
-    Blt_DeleteHashTable(tablePtr);
-    Blt_Free(tablePtr);
-    Blt_DeleteHashEntry(&setPtr->tagTable, hPtr);
-}
-
-static void
-DestroyTags(Tabset *setPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashTable(tablePtr);
-    }
-}
-
-static void
-RemoveTag(Tab *tabPtr, const char *tagName)
-{
-    Blt_HashTable *tablePtr;
-    Tabset *setPtr;
-
-    setPtr = tabPtr->setPtr;
-    tablePtr = GetTagTable(setPtr, tagName);
-    if (tablePtr != NULL) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FindHashEntry(tablePtr, (char *)tabPtr);
-	if (hPtr != NULL) {
-	    Blt_DeleteHashEntry(tablePtr, hPtr);
-	}
-    }
-}
-
-static void
-ClearTags(Tab *tabPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tabset *setPtr;
-
-    setPtr = tabPtr->setPtr;
-    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	Blt_HashEntry *h2Ptr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(tablePtr, (char *)tabPtr);
-	if (h2Ptr != NULL) {
-	    Blt_DeleteHashEntry(tablePtr, h2Ptr);
-	}
-    }
-}
-
-static void
-AppendTags(Tabset *setPtr, Tab *tabPtr, Blt_List list)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_HashTable *tablePtr;
-	
-	tablePtr = Blt_GetHashValue(hPtr);
-	if (Blt_FindHashEntry(tablePtr, (char *)tabPtr) != NULL) {
-	    Blt_List_Append(list, Blt_GetHashKey(&setPtr->tagTable, hPtr), 0);
-	}
-    }
-}
-
-static ClientData
-MakeTag(Tabset *setPtr, const char *tagName)
-{
-    Blt_HashTable *tablePtr;
-    Blt_HashEntry *hPtr;
-
-    tablePtr = AddTagTable(setPtr, tagName);
-    hPtr = Blt_FindHashEntry(&setPtr->tagTable, tagName);
-    return Blt_GetHashKey(&setPtr->tagTable, hPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToImageProc --
- *
- *	Converts an image name into a Tk image token.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToImageProc(
-    ClientData clientData,	/* Contains a pointer to the tabset containing
-				 * this image. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Window associated with the tabset. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tabset *setPtr = clientData;
-    Image **imagePtrPtr = (Image **) (widgRec + offset);
-    Image *imgPtr;
-    const char *string;
-    int length;
-
-    imgPtr = NULL;
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    if (length > 0) {
-	imgPtr = GetImage(setPtr, interp, tkwin, string);
-	if (imgPtr == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    *imagePtrPtr = imgPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageToObj --
- *
- *	Converts the Tk image back to a Tcl_Obj representation (i.e.  its
- *	name).
- *
- * Results:
- *	The name of the image is returned as a Tcl_Obj.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ImageToObjProc(
-    ClientData clientData,	/* Pointer to tabset containing image. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tabset *setPtr = clientData;
-    Image **imagePtrPtr = (Image **) (widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (*imagePtrPtr == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	const char *name;
-
-	name = Blt_GetHashKey(&setPtr->imageTable, (*imagePtrPtr)->hashPtr);
-	objPtr = Tcl_NewStringObj(name, -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSlantProc --
- *
- *	Converts the slant style string into its numeric representation.
- *
- *	Valid style strings are:
- *
- *	  "none"   Both sides are straight.
- * 	  "left"   Left side is slanted.
- *	  "right"  Right side is slanted.
- *	  "both"   Both sides are slanted.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSlantProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation of attribute. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    const char *string;
-    char c;
-    int *flagsPtr = (int *)(widgRec + offset);
-    int flag;
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'n') && (strncmp(string, "none", length) == 0)) {
-	flag = SLANT_NONE;
-    } else if ((c == 'l') && (strncmp(string, "left", length) == 0)) {
-	flag = SLANT_LEFT;
-    } else if ((c == 'r') && (strncmp(string, "right", length) == 0)) {
-	flag = SLANT_RIGHT;
-    } else if ((c == 'b') && (strncmp(string, "both", length) == 0)) {
-	flag = SLANT_BOTH;
-    } else {
-	Tcl_AppendResult(interp, "bad argument \"", string,
-	    "\": should be \"none\", \"left\", \"right\", or \"both\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    *flagsPtr &= ~SLANT_BOTH;
-    *flagsPtr |= flag;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SlantToObjProc --
- *
- *	Returns the slant style string based upon the slant flags.
- *
- * Results:
- *	The slant style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SlantToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget structure record. */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int slant = *(int *)(widgRec + offset);
-    const char *string;
-
-    switch (slant & SLANT_BOTH) {
-    case SLANT_LEFT:	string = "left";		break;
-    case SLANT_RIGHT:	string = "right";		break;
-    case SLANT_NONE:	string = "none";		break;
-    case SLANT_BOTH:	string = "both";		break;
-    default:		string = "unknown slant value";	break;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToChildProc --
- *
- *	Converts a window name into Tk window.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToChildProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window parent,		/* Parent window */
-    Tcl_Obj *objPtr,		/* String representation. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tab *tabPtr = (Tab *)widgRec;
-    Tk_Window *tkwinPtr = (Tk_Window *)(widgRec + offset);
-    Tk_Window old, tkwin;
-    Tabset *setPtr;
-    const char *string;
-
-    old = *tkwinPtr;
-    tkwin = NULL;
-    setPtr = tabPtr->setPtr;
-    string = Tcl_GetString(objPtr);
-    if (string[0] != '\0') {
-	tkwin = Tk_NameToWindow(interp, string, parent);
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (tkwin == old) {
-	    return TCL_OK;
-	}
-	/*
-	 * Allow only widgets that are children of the tabset to be embedded
-	 * into the page.  This way we can make assumptions about the window
-	 * based upon its parent; either it's the tabset window or it has
-	 * been torn off.
-	 */
-	parent = Tk_Parent(tkwin);
-	if (parent != setPtr->tkwin) {
-	    Tcl_AppendResult(interp, "can't manage \"", Tk_PathName(tkwin),
-		"\" in tabset \"", Tk_PathName(setPtr->tkwin), "\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tk_ManageGeometry(tkwin, &tabMgrInfo, tabPtr);
-	Tk_CreateEventHandler(tkwin, StructureNotifyMask, 
-		EmbeddedWidgetEventProc, tabPtr);
-
-	/*
-	 * We need to make the window to exist immediately.  If the window is
-	 * torn off (placed into another container window), the timing between
-	 * the container and the its new child (this window) gets tricky.
-	 * This should work for Tk 4.2.
-	 */
-	Tk_MakeWindowExist(tkwin);
-    }
-    if (old != NULL) {
-	if (tabPtr->container != NULL) {
-	    Tcl_EventuallyFree(tabPtr, DestroyTearoff);
-	}
-	Tk_DeleteEventHandler(old, StructureNotifyMask, 
-	      EmbeddedWidgetEventProc, tabPtr);
-	Tk_ManageGeometry(old, (Tk_GeomMgr *) NULL, tabPtr);
-	Tk_UnmapWindow(old);
-    }
-    *tkwinPtr = tkwin;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildToObjProc --
- *
- *	Converts the Tk window back to a Tcl_Obj (i.e. its name).
- *
- * Results:
- *	The name of the window is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ChildToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window parent,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tk_Window tkwin = *(Tk_Window *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (tkwin == NULL) {
-	objPtr = Tcl_NewStringObj("", -1);
-    } else {
-	objPtr = Tcl_NewStringObj(Tk_PathName(tkwin), -1);
-    }
-    return objPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTabWidthProc --
- *
- *	Converts the tab width style string into its numeric representation.
- *
- *	Valid width strings are:
- *
- *	  "variable"	Tab width determined by text/image label.
- * 	  "same"	Tab width is max of all text/image labels.
- *	  "1i"		Tab width is set to 1 inch.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTabWidthProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation of attribute. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    const char *string;
-    char c;
-    int *widthPtr = (int *)(widgRec + offset);
-    int length;
-
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    if ((c == 'v') && (strncmp(string, "variable", length) == 0)) {
-	*widthPtr = TABWIDTH_VARIABLE;
-    } else if ((c == 's') && (strncmp(string, "same", length) == 0)) {
-	*widthPtr = TABWIDTH_SAME;
-    } else if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, PIXELS_POS, 
-		widthPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabWidthToObjProc --
- *
- *	Returns the tabwidth string based upon the tabwidth.
- *
- * Results:
- *	The tabwidth string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TabWidthToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget structure record. */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int width = *(int *)(widgRec + offset);
-
-    switch (width) {
-    case TABWIDTH_VARIABLE:
-	return Tcl_NewStringObj("variable", 8);
-    case TABWIDTH_SAME:
-	return Tcl_NewStringObj("same", 4);
-    default:
-	return Tcl_NewIntObj(width);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStateProc --
- *
- *	Convert the string representation of an tab state into a flag.
- *
- * Results:
- *	The return value is a standard TCL result.  The state flags are
- *	updated.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStateProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing state. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tab *tabPtr = (Tab *)(widgRec);
-    unsigned int *flagsPtr = (unsigned int *)(widgRec + offset);
-    char *string;
-    Tabset *setPtr;
-    int flag;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "active") == 0) {
-	flag = ACTIVE;
-    } else if (strcmp(string, "disabled") == 0) {
-	flag = DISABLED;
-    } else if (strcmp(string, "hidden") == 0) {
-	flag = HIDE;
-    } else if (strcmp(string, "normal") == 0) {
-	flag = NORMAL;
-    } else {
-	Tcl_AppendResult(interp, "unknown state \"", string, 
-		"\": should be active, disabled, hidden, or normal.", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (tabPtr->flags & flag) {
-	return TCL_OK;		/* State is already set to value. */
-    }
-    setPtr = tabPtr->setPtr;
-    if (setPtr->activePtr != tabPtr) {
-	setPtr->activePtr = NULL;
-    }
-    *flagsPtr &= ~STATE_MASK;
-    *flagsPtr |= flag;
-    if (flag == ACTIVE) {
-	setPtr->activePtr = tabPtr;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StateToObjProc --
- *
- *	Return the name of the style.
- *
- * Results:
- *	The name representing the style is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StateToObjProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget information record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    unsigned int state = *(unsigned int *)(widgRec + offset);
-    Tcl_Obj *objPtr;
-
-    if (state & HIDE) {
-	objPtr = Tcl_NewStringObj("hidden", -1);
-    } else if (state & DISABLED) {
-	objPtr = Tcl_NewStringObj("disabled", -1);
-    } else if (state & ACTIVE) {
-	objPtr = Tcl_NewStringObj("active", -1);
-    } else {
-	objPtr = Tcl_NewStringObj("normal", -1);
-    }
-    return objPtr;
-}
-
-static int
-WorldY(Tab *tabPtr)
-{
-    int tier;
-
-    tier = tabPtr->setPtr->nTiers - tabPtr->tier;
-    return tier * tabPtr->setPtr->tabHeight;
-}
-
-static INLINE Tab *
-FirstTab(Tabset *setPtr, unsigned int hateFlags)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Tab *tabPtr;
-
-	tabPtr = Blt_Chain_GetValue(link);
-	if ((tabPtr->flags & hateFlags) == 0) {
-	    return tabPtr;
-	}
-    }
-    return NULL;
-}
-
-static INLINE Tab *
-LastTab(Tabset *setPtr, unsigned int hateFlags)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(setPtr->chain); link != NULL;
-	 link = Blt_Chain_PrevLink(link)) {
-	Tab *tabPtr;
-
-	tabPtr = Blt_Chain_GetValue(link);
-	if ((tabPtr->flags & hateFlags) == 0) {
-	    return tabPtr;
-	}
-    }
-    return NULL;
-}
-
-
-static Tab *
-NextTab(Tab *tabPtr, unsigned int hateFlags)
-{
-    if (tabPtr != NULL) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_NextLink(tabPtr->link); link != NULL; 
-	     link = Blt_Chain_NextLink(link)) {
-	    tabPtr = Blt_Chain_GetValue(link);
-	    if ((tabPtr->flags & hateFlags) == 0) {
-		return tabPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-static Tab *
-PrevTab(Tab *tabPtr, unsigned int hateFlags)
-{
-    if (tabPtr != NULL) {
-	Blt_ChainLink link;
-	
-	for (link = Blt_Chain_PrevLink(tabPtr->link); link != NULL; 
-	     link = Blt_Chain_PrevLink(link)) {
-	    tabPtr = Blt_Chain_GetValue(link);
-	    if ((tabPtr->flags & hateFlags) == 0) {
-		return tabPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-static INLINE Tab *
-BeginTab(Tabset *setPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_FirstLink(setPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static INLINE Tab *
-EndTab(Tabset *setPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_LastLink(setPtr->chain); 
-    if (link != NULL) {
-	return Blt_Chain_GetValue(link);
-    }
-    return NULL;
-}
-
-static Tab *
-StepTab(Tab *tabPtr)
-{
-    if (tabPtr != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_NextLink(tabPtr->link); 
-	if (link != NULL) {
-	    return Blt_Chain_GetValue(link);
-	}
-    }
-    return NULL;
-}
-
-
-static void
-ReindexTabs(Tabset *setPtr)
-{
-    int count;
-    Tab *tabPtr;
-    
-    count = 0;
-    for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL; 
-	 tabPtr = NextTab(tabPtr, 0)) {
-	tabPtr->index = count;
-	count++;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RenumberTiers --
- *
- *	In multi-tier mode, we need to find the start of the tier containing
- *	the newly selected tab.
- *
- *	Tiers are draw from the last tier to the first, so that the the
- *	lower-tiered tabs will partially cover the bottoms of tab directly
- *	above it.  This simplifies the drawing of tabs because we don't worry
- *	how tabs are clipped by their neighbors.
- *
- *	In addition, tabs are re-marked with the correct tier number.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Renumbering the tab's tier will change the vertical placement
- *	of the tab (i.e. shift tiers).
- *
- *---------------------------------------------------------------------------
- */
-static void
-RenumberTiers(Tabset *setPtr, Tab *tabPtr)
-{
-    int tier;
-    Blt_ChainLink link, last;
-
-    setPtr->focusPtr = setPtr->selectPtr = tabPtr;
-    Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-
-    tier = tabPtr->tier;
-    for (link = Blt_Chain_PrevLink(tabPtr->link); link != NULL; link = last) {
-	Tab *prevPtr;
-
-	last = Blt_Chain_PrevLink(link);
-	prevPtr = Blt_Chain_GetValue(link);
-	if ((prevPtr == NULL) || (prevPtr->tier != tier)) {
-	    break;
-	}
-	tabPtr = prevPtr;
-    }
-    setPtr->startPtr = tabPtr;
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	tabPtr = Blt_Chain_GetValue(link);
-	tabPtr->tier = (tabPtr->tier - tier + 1);
-	if (tabPtr->tier < 1) {
-	    tabPtr->tier += setPtr->nTiers;
-	}
-	tabPtr->worldY = WorldY(tabPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PickTabProc --
- *
- *	Searches the tab located within the given screen X-Y coordinates in
- *	the viewport.  Note that tabs overlap slightly, so that its important
- *	to search from the innermost tier out.
- *
- * Results:
- *	Returns the pointer to the tab.  If the pointer isn't contained by any
- *	tab, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static ClientData
-PickTabProc(ClientData clientData, int x, int y, ClientData *contextPtr)
-{
-    Tabset *setPtr = clientData;
-    Tab *tabPtr;
-
-    if (contextPtr != NULL) {
-	*contextPtr = NULL;
-    }
-    tabPtr = setPtr->selectPtr;
-    if ((setPtr->flags & TEAROFF) && (tabPtr != NULL) && 
-	(tabPtr->container == NULL) && (tabPtr->tkwin != NULL)) {
-	int top, bottom, left, right;
-	int sx, sy;
-
-	/* Check first for perforation on the selected tab. */
-	WorldToScreen(setPtr, tabPtr->worldX + 2, 
-	      tabPtr->worldY + tabPtr->worldHeight + 4, &sx, &sy);
-	if (ISHORIZONTAL(setPtr->side)) {
-	    left = sx - 2;
-	    right = left + tabPtr->screenWidth;
-	    top = sy - 4;
-	    bottom = sy + 4;
-	} else {
-	    left = sx - 4;
-	    right = sx + 4;
-	    top = sy - 2;
-	    bottom = top + tabPtr->screenHeight;
-	}
-	if ((x >= left) && (y >= top) && (x < right) && (y < bottom)) {
-	    if (contextPtr != NULL) {
-		*contextPtr = TAB_PERFORATION;
-	    }
-	    return setPtr->selectPtr;
-	}
-    } 
-    for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	 tabPtr = NextTab(tabPtr, 0)) {
-	if ((tabPtr->flags & ONSCREEN) == 0) {
-	    continue;
-	}
-	if ((x >= tabPtr->screenX) && (y >= tabPtr->screenY) &&
-	    (x <= (tabPtr->screenX + tabPtr->screenWidth)) &&
-	    (y < (tabPtr->screenY + tabPtr->screenHeight))) {
-	    if (contextPtr != NULL) {
-		*contextPtr = TAB_LABEL;
-	    }
-	    return tabPtr;
-	}
-    }
-    return NULL;
-}
-
-static Tab *
-TabLeft(Tab *tabPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_PrevLink(tabPtr->link);
-    if (link != NULL) {
-	Tab *newPtr;
-
-	newPtr = Blt_Chain_GetValue(link);
-	/* Move only if the next tab is the same tier. */
-	if (newPtr->tier == tabPtr->tier) {
-	    tabPtr = newPtr;
-	}
-    }
-    return tabPtr;
-}
-
-static Tab *
-TabRight(Tab *tabPtr)
-{
-    Blt_ChainLink link;
-
-    link = Blt_Chain_NextLink(tabPtr->link);
-    if (link != NULL) {
-	Tab *newPtr;
-
-	newPtr = Blt_Chain_GetValue(link);
-	/* Move only if the next tab is on the same tier. */
-	if (newPtr->tier == tabPtr->tier) {
-	    tabPtr = newPtr;
-	}
-    }
-    return tabPtr;
-}
-
-static Tab *
-TabUp(Tab *tabPtr)
-{
-    if (tabPtr != NULL) {
-	Tabset *setPtr;
-	int x, y;
-	int worldX, worldY;
-	
-	setPtr = tabPtr->setPtr;
-	worldX = tabPtr->worldX + (tabPtr->worldWidth / 2);
-	worldY = tabPtr->worldY - (setPtr->tabHeight / 2);
-	WorldToScreen(setPtr, worldX, worldY, &x, &y);
-	
-	tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	if (tabPtr == NULL) {
-	    /*
-	     * We might have inadvertly picked the gap between two tabs, so if
-	     * the first pick fails, try again a little to the left.
-	     */
-	    WorldToScreen(setPtr, worldX + setPtr->gap, worldY, &x, &y);
-	    tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	}
-	if ((tabPtr == NULL) &&
-	    (setPtr->focusPtr->tier < (setPtr->nTiers - 1))) {
-	    worldY -= setPtr->tabHeight;
-	    WorldToScreen(setPtr, worldX, worldY, &x, &y);
-	    tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	}
-	if (tabPtr == NULL) {
-	    tabPtr = setPtr->focusPtr;
-	}
-    }
-    return tabPtr;
-}
-
-static Tab *
-TabDown(Tab *tabPtr)
-{
-    if (tabPtr != NULL) {
-	Tabset *setPtr;
-	int x, y;
-	int worldX, worldY;
-
-	setPtr = tabPtr->setPtr;
-	worldX = tabPtr->worldX + (tabPtr->worldWidth / 2);
-	worldY = tabPtr->worldY + (3 * setPtr->tabHeight) / 2;
-	WorldToScreen(setPtr, worldX, worldY, &x, &y);
-	tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	if (tabPtr == NULL) {
-	    /*
-	     * We might have inadvertly picked the gap between two tabs, so if
-	     * the first pick fails, try again a little to the left.
-	     */
-	    WorldToScreen(setPtr, worldX - setPtr->gap, worldY, &x, &y);
-	    tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	}
-	if ((tabPtr == NULL) && (setPtr->focusPtr->tier > 2)) {
-	    worldY += setPtr->tabHeight;
-	    WorldToScreen(setPtr, worldX, worldY, &x, &y);
-	    tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	}
-	if (tabPtr == NULL) {
-	    tabPtr = setPtr->focusPtr;
-	}
-    }
-    return tabPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextTaggedTab --
- *
- *	Returns the next tab derived from the given tag.
- *
- * Results:
- *	Returns the pointer to the next tab in the iterator.  If no more tabs
- *	are available, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Tab *
-NextTaggedTab(TabIterator *iterPtr)
-{
-    switch (iterPtr->type) {
-    case ITER_TAG:
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_NextHashEntry(&iterPtr->cursor); 
-	    if (hPtr != NULL) {
-		return Blt_GetHashValue(hPtr);
-	    }
-	    break;
-	}
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    Tab *tabPtr;
-	    
-	    tabPtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return tabPtr;
-	}
-	break;
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Tab *tabPtr;
-		
-		tabPtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(tabPtr->text, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return tabPtr;
-		}
-	    }
-	    break;
-	}
-    default:
-	break;
-    }	
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstTaggedTab --
- *
- *	Returns the first tab derived from the given tag.
- *
- * Results:
- *	Returns the first tab in the sequence.  If no more tabs are in
- *	the list, then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Tab *
-FirstTaggedTab(TabIterator *iterPtr)
-{
-    switch (iterPtr->type) {
-    case ITER_TAG:
-	{
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_FirstHashEntry(iterPtr->tablePtr, &iterPtr->cursor);
-	    if (hPtr != NULL) {
-		return Blt_GetHashValue(hPtr);
-	    }
-	}
-
-    case ITER_ALL:
-	if (iterPtr->link != NULL) {
-	    Tab *tabPtr;
-	    
-	    tabPtr = Blt_Chain_GetValue(iterPtr->link);
-	    iterPtr->link = Blt_Chain_NextLink(iterPtr->link);
-	    return tabPtr;
-	}
-	break;
-
-    case ITER_PATTERN:
-	{
-	    Blt_ChainLink link;
-	    
-	    for (link = iterPtr->link; link != NULL; 
-		 link = Blt_Chain_NextLink(link)) {
-		Tab *tabPtr;
-		
-		tabPtr = Blt_Chain_GetValue(iterPtr->link);
-		if (Tcl_StringMatch(tabPtr->text, iterPtr->tagName)) {
-		    iterPtr->link = Blt_Chain_NextLink(link);
-		    return tabPtr;
-		}
-	    }
-	    break;
-	}
-    case ITER_SINGLE:
-	return iterPtr->startPtr;
-    } 
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTabFromObj --
- *
- *	Gets the tab associated the given index, tag, or label.  This routine
- *	is used when you want only one tab.  It's an error if more than one
- *	tab is specified (e.g. "all" tag or range "1:4").  It's also an error
- *	if the tag is empty (no tabs are currently tagged).
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetTabFromObj(Tcl_Interp *interp, Tabset *setPtr, Tcl_Obj *objPtr,
-	      Tab **tabPtrPtr)
-{
-    TabIterator iter;
-    Tab *firstPtr;
-
-    if (GetTabIterator(interp, setPtr, objPtr, &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    firstPtr = FirstTaggedTab(&iter);
-    if (firstPtr != NULL) {
-	Tab *nextPtr;
-
-	nextPtr = NextTaggedTab(&iter);
-	if (nextPtr != NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "multiple tabs specified by \"", 
-			Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *tabPtrPtr = firstPtr;
-    return TCL_OK;
-}
-
-static int
-GetTabByIndex(Tcl_Interp *interp, Tabset *setPtr, const char *string, 
-	      int length, Tab **tabPtrPtr)
-{
-    Tab *tabPtr;
-    char c;
-    long pos;
-
-    tabPtr = NULL;
-    c = string[0];
-    length = strlen(string);
-    if (Tcl_GetLong(NULL, string, &pos) == TCL_OK) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_GetNthLink(setPtr->chain, pos);
-	if (link != NULL) {
-	    tabPtr = Blt_Chain_GetValue(link);
-	} 
-	if (tabPtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find tab: bad index \"", 
-			string, "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}		
-    } else if ((c == 'a') && (strncmp(string, "active", length) == 0)) {
-	tabPtr = setPtr->activePtr;
-    } else if ((c == 'c') && (strncmp(string, "current", length) == 0)) {
-	tabPtr = (Tab *)Blt_GetCurrentItem(setPtr->bindTable);
-    } else if ((c == 'd') && (strncmp(string, "down", length) == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	case SIDE_RIGHT:
-	    tabPtr = TabRight(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_TOP:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'f') && (length > 1) && 
-	       (strncmp(string, "focus", length) == 0)) {
-	tabPtr = setPtr->focusPtr;
-    } else if ((c == 'f') && (length > 1) && 
-	       (strncmp(string, "first", length) == 0)) {
-	tabPtr = FirstTab(setPtr, HIDE | DISABLED);
-    } else if ((c == 's') && (strncmp(string, "selected", length) == 0)) {
-	tabPtr = setPtr->selectPtr;
-    } else if ((c == 'l') && (length > 1) && 
-	       (strncmp(string, "last", length) == 0)) {
-	tabPtr = LastTab(setPtr, HIDE | DISABLED);
-    } else if ((c == 'l') && (length > 1) && 
-	       (strncmp(string, "left", length) == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_RIGHT:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	case SIDE_TOP:
-	    tabPtr = TabLeft(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'n') && (strncmp(string, "none", length) == 0)) {
-	tabPtr = NULL;
-    } else if ((c == 'r') && (strncmp(string, "right", length) == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_RIGHT:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	case SIDE_TOP:
-	    tabPtr = TabRight(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'u') && (strncmp(string, "up", length) == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	case SIDE_RIGHT:
-	    tabPtr = TabLeft(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_TOP:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	}
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(interp, setPtr->tkwin, string, &x, &y) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-    } else {
-	return TCL_CONTINUE;
-    }
-    *tabPtrPtr = tabPtr;
-    return TCL_OK;
-}
-
-static Tab *
-GetTabByName(Tabset *setPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    
-    hPtr = Blt_FindHashEntry(&setPtr->tabTable, string);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTabIterator --
- *
- *	Converts a string representing a tab index into an tab pointer.  The
- *	index may be in one of the following forms:
- *
- *	 number		Tab at index in the list of tabs.
- *	 @x,y		Tab closest to the specified X-Y screen coordinates.
- *	 "active"	Tab where mouse pointer is located.
- *	 "posted"       Tab is the currently posted cascade tab.
- *	 "next"		Next tab from the focus tab.
- *	 "previous"	Previous tab from the focus tab.
- *	 "end"		Last tab.
- *	 "none"		No tab.
- *
- *	 number		Tab at position in the list of tabs.
- *	 @x,y		Tab closest to the specified X-Y screen coordinates.
- *	 "active"	Tab mouse is located over.
- *	 "focus"	Tab is the widget's focus.
- *	 "select"	Currently selected tab.
- *	 "right"	Next tab from the focus tab.
- *	 "left"		Previous tab from the focus tab.
- *	 "up"		Next tab from the focus tab.
- *	 "down"		Previous tab from the focus tab.
- *	 "end"		Last tab in list.
- *	"name:string"   Tab named "string".
- *	"index:number"  Tab at index number in list of tabs.
- *	"tag:string"	Tab(s) tagged by "string".
- *	"label:pattern"	Tab(s) with label matching "pattern".
- *	
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via tabPtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTabIterator(Tcl_Interp *interp, Tabset *setPtr, Tcl_Obj *objPtr,
-	       TabIterator *iterPtr)
-{
-    Tab *tabPtr, *startPtr, *endPtr;
-    Blt_HashTable *tablePtr;
-    char *string;
-    char c;
-    int nBytes;
-    int length;
-    int result;
-
-    iterPtr->setPtr = setPtr;
-    iterPtr->type = ITER_SINGLE;
-    iterPtr->tagName = Tcl_GetStringFromObj(objPtr, &nBytes);
-    iterPtr->nextPtr = NULL;
-    iterPtr->startPtr = iterPtr->endPtr = NULL;
-
-#ifdef notdef
-    if (setPtr->flags & (LAYOUT_PENDING | SCROLL_PENDING)) {
-	ComputeMenuGeometry(setPtr);
-    }
-    if (setPtr->flags & CM_SCROLL_PENDING) {
-	ComputeVisibleTabs(setPtr);
-    } 
-#endif
-    if (setPtr->focusPtr == NULL) {
-	setPtr->focusPtr = setPtr->selectPtr;
-	Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-    }
-    string = Tcl_GetStringFromObj(objPtr, &length);
-    c = string[0];
-    iterPtr->startPtr = iterPtr->endPtr = setPtr->activePtr;
-    startPtr = endPtr = tabPtr = NULL;
-    if (c == '\0') {
-	startPtr = endPtr = NULL;
-    } 
-    iterPtr->type = ITER_SINGLE;
-    result = GetTabByIndex(interp, setPtr, string, length, &tabPtr);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    if (result == TCL_OK) {
-	iterPtr->startPtr = iterPtr->endPtr = tabPtr;
-	return TCL_OK;
-    }
-    if ((c == 'a') && (strcmp(iterPtr->tagName, "all") == 0)) {
-	iterPtr->type  = ITER_ALL;
-	iterPtr->link = Blt_Chain_FirstLink(setPtr->chain);
-    } else if ((c == 'i') && (length > 6) && 
-	       (strncmp(string, "index:", 6) == 0)) {
-	if (GetTabByIndex(interp, setPtr, string + 6, length - 6, &tabPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	iterPtr->startPtr = iterPtr->endPtr = tabPtr;
-    } else if ((c == 'n') && (length > 5) && 
-	       (strncmp(string, "name:", 5) == 0)) {
-	tabPtr = GetTabByName(setPtr, string + 5);
-	if (tabPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tab name \"", string + 5,
-			"\" in \"", Tk_PathName(setPtr->tkwin), "\"",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->startPtr = iterPtr->endPtr = tabPtr;
-    } else if ((c == 't') && (length > 4) && 
-	       (strncmp(string, "tag:", 4) == 0)) {
-	Blt_HashTable *tablePtr;
-
-	tablePtr = GetTagTable(setPtr, string + 4);
-	if (tablePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tag \"", string + 5,
-			"\" in \"", Tk_PathName(setPtr->tkwin), "\"",
-			(char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->tagName = string + 4;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else if ((c == 'l') && (length > 6) && 
-	       (strncmp(string, "label:", 6) == 0)) {
-	iterPtr->link = Blt_Chain_FirstLink(setPtr->chain);
-	iterPtr->tagName = string + 6;
-	iterPtr->type = ITER_PATTERN;
-    } else if ((tabPtr = GetTabByName(setPtr, string)) != NULL) {
-	iterPtr->startPtr = iterPtr->endPtr = tabPtr;
-    } else if ((tablePtr = GetTagTable(setPtr, string)) != NULL) {
-	iterPtr->tagName = string;
-	iterPtr->tablePtr = tablePtr;
-	iterPtr->type = ITER_TAG;
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find tab index, name, or tag \"", 
-		string, "\" in \"", Tk_PathName(setPtr->tkwin), "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * GetTabFromObj --
- *
- *	Converts a string representing a tab index into a tab pointer.  The
- *	index may be in one of the following forms:
- *
- *	 number		Tab at position in the list of tabs.
- *	 @x,y		Tab closest to the specified X-Y screen coordinates.
- *	 "active"	Tab mouse is located over.
- *	 "focus"	Tab is the widget's focus.
- *	 "select"	Currently selected tab.
- *	 "right"	Next tab from the focus tab.
- *	 "left"		Previous tab from the focus tab.
- *	 "up"		Next tab from the focus tab.
- *	 "down"		Previous tab from the focus tab.
- *	 "end"		Last tab in list.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via tabPtrPtr.  Otherwise, TCL_ERROR
- *	is returned and an error message is left in interpreter's result
- *	field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTabFromObj(Tabset *setPtr, Tcl_Obj *objPtr, Tab **tabPtrPtr, int allowNull)
-{
-    Tab *tabPtr;
-    Blt_ChainLink link;
-    int position;
-    char c;
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    tabPtr = NULL;
-    if (setPtr->focusPtr == NULL) {
-	setPtr->focusPtr = setPtr->selectPtr;
-	Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-    }
-    if ((isdigit(UCHAR(c))) &&
-	(Tcl_GetIntFromObj(setPtr->interp, objPtr, &position) == TCL_OK)) {
-	link = Blt_Chain_GetNthLink(setPtr->chain, position);
-	if (link == NULL) {
-	    Tcl_AppendResult(setPtr->interp, "can't find tab \"", string,
-		"\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\": no such index", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	tabPtr = Blt_Chain_GetValue(link);
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	tabPtr = setPtr->activePtr;
-    } else if ((c == 'c') && (strcmp(string, "current") == 0)) {
-	tabPtr = (Tab *)Blt_GetCurrentItem(setPtr->bindTable);
-    } else if ((c == 's') && (strcmp(string, "select") == 0)) {
-	tabPtr = setPtr->selectPtr;
-    } else if ((c == 'f') && (strcmp(string, "focus") == 0)) {
-	tabPtr = setPtr->focusPtr;
-    } else if ((c == 'u') && (strcmp(string, "up") == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	case SIDE_RIGHT:
-	    tabPtr = TabLeft(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_TOP:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'd') && (strcmp(string, "down") == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	case SIDE_RIGHT:
-	    tabPtr = TabRight(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_TOP:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'l') && (strcmp(string, "left") == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_RIGHT:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	case SIDE_TOP:
-	    tabPtr = TabLeft(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'r') && (strcmp(string, "right") == 0)) {
-	switch (setPtr->side) {
-	case SIDE_LEFT:
-	    tabPtr = TabDown(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_RIGHT:
-	    tabPtr = TabUp(setPtr->focusPtr);
-	    break;
-	    
-	case SIDE_BOTTOM:
-	case SIDE_TOP:
-	    tabPtr = TabRight(setPtr->focusPtr);
-	    break;
-	}
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	tabPtr = LastTab(setPtr, HIDE | DISABLED);
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(setPtr->interp, setPtr->tkwin, string, &x, &y) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-    } else {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FindHashEntry(&setPtr->tabTable, string);
-	if (hPtr != NULL) {
-	    tabPtr = Blt_GetHashValue(hPtr);
-	}
-    }
-    *tabPtrPtr = tabPtr;
-    Tcl_ResetResult(setPtr->interp);
-
-    if ((!allowNull) && (tabPtr == NULL)) {
-	Tcl_AppendResult(setPtr->interp, "can't find tab \"", string,
-	    "\" in \"", Tk_PathName(setPtr->tkwin), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-#endif
-
-static Tab *
-NextOrLastTab(Tab *tabPtr)
-{
-    if (tabPtr->link != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_NextLink(tabPtr->link);
-	if (link == NULL) {
-	    link = Blt_Chain_PrevLink(tabPtr->link);
-	}
-	if (link != NULL) {
-	    return Blt_Chain_GetValue(link);
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	embedded widgets contained in the tabset.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When an embedded widget gets deleted, internal structures get cleaned
- *	up.  When it gets resized, the tabset is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EmbeddedWidgetEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Tab *tabPtr = clientData;
-
-    if ((tabPtr == NULL) || (tabPtr->tkwin == NULL)) {
-	return;
-    }
-    switch (eventPtr->type) {
-    case ConfigureNotify:
-	/*
-	 * If the window's requested size changes, redraw the window.  But
-	 * only if it's currently the selected page.
-	 */
-	if ((tabPtr->container == NULL) && (Tk_IsMapped(tabPtr->tkwin)) &&
-	    (tabPtr->setPtr->selectPtr == tabPtr)) {
-	    EventuallyRedraw(tabPtr->setPtr);
-	}
-	break;
-
-    case DestroyNotify:
-	/*
-	 * Mark the tab as deleted by dereferencing the Tk window
-	 * pointer. Redraw the window only if the tab is currently visible.
-	 */
-	if ((Tk_IsMapped(tabPtr->tkwin)) &&
-	    (tabPtr->setPtr->selectPtr == tabPtr)) {
-	    EventuallyRedraw(tabPtr->setPtr);
-	}
-	Tk_DeleteEventHandler(tabPtr->tkwin, StructureNotifyMask,
-	    EmbeddedWidgetEventProc, tabPtr);
-	tabPtr->tkwin = NULL;
-	break;
-
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetCustodyProc --
- *
- *	This procedure is invoked when a tab window has been stolen by another
- *	geometry manager.  The information and memory associated with the tab
- *	window is released.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the widget formerly associated with the tab window to
- *	have its layout re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-EmbeddedWidgetCustodyProc(ClientData clientData, Tk_Window tkwin)
-{
-    Tab *tabPtr = clientData;
-    Tabset *setPtr;
-
-    if ((tabPtr == NULL) || (tabPtr->tkwin == NULL)) {
-	return;
-    }
-    setPtr = tabPtr->setPtr;
-    if (tabPtr->container != NULL) {
-	Tcl_EventuallyFree(tabPtr, DestroyTearoff);
-    }
-    /*
-     * Mark the tab as deleted by dereferencing the Tk window pointer. Redraw
-     * the window only if the tab is currently visible.
-     */
-    if (tabPtr->tkwin != NULL) {
-	if (Tk_IsMapped(tabPtr->tkwin) && (setPtr->selectPtr == tabPtr)) {
-	    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-	    EventuallyRedraw(setPtr);
-	}
-	Tk_DeleteEventHandler(tabPtr->tkwin, StructureNotifyMask,
-	    EmbeddedWidgetEventProc, tabPtr);
-	tabPtr->tkwin = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EmbeddedWidgetGeometryProc --
- *
- *	This procedure is invoked by Tk_GeometryRequest for tab windows
- *	managed by the widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for tkwin, and all its managed siblings, to be repacked and
- *	drawn at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
- /* ARGSUSED */
-static void
-EmbeddedWidgetGeometryProc(ClientData clientData, Tk_Window tkwin)
-{
-    Tab *tabPtr = clientData;
-
-    if ((tabPtr == NULL) || (tabPtr->tkwin == NULL)) {
-	fprintf(stderr, "%s: line %d \"tkwin is null\"", __FILE__, __LINE__);
-	return;
-    }
-    tabPtr->setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(tabPtr->setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTab --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTab(Tabset *setPtr, Tab *tabPtr)
-{
-    imageOption.clientData = setPtr;
-    Blt_FreeOptions(tabSpecs, (char *)tabPtr, setPtr->display, 0);
-    ClearTags(tabPtr);
-    if (tabPtr->flags & TEAROFF_REDRAW) {
-	Tcl_CancelIdleCall(DisplayTearoff, tabPtr);
-    }
-    if (tabPtr->container != NULL) {
-	Tk_DestroyWindow(tabPtr->container);
-    }
-    if (tabPtr->tkwin != NULL) {
-	Tk_ManageGeometry(tabPtr->tkwin, (Tk_GeomMgr *)NULL, tabPtr);
-	Tk_DeleteEventHandler(tabPtr->tkwin, StructureNotifyMask, 
-		EmbeddedWidgetEventProc, tabPtr);
-	if (Tk_IsMapped(tabPtr->tkwin)) {
-	    Tk_UnmapWindow(tabPtr->tkwin);
-	}
-    }
-    if (tabPtr == setPtr->activePtr) {
-	setPtr->activePtr = NULL;
-    }
-    if (tabPtr == setPtr->selectPtr) {
-	setPtr->selectPtr = NextOrLastTab(tabPtr);
-    }
-    if (tabPtr == setPtr->focusPtr) {
-	setPtr->focusPtr = setPtr->selectPtr;
-	Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-    }
-    if (tabPtr == setPtr->startPtr) {
-	setPtr->startPtr = NULL;
-    }
-    if (tabPtr->text != NULL) {
-	Blt_Free(tabPtr->text);
-    }
-    if (tabPtr->textGC != NULL) {
-	Tk_FreeGC(setPtr->display, tabPtr->textGC);
-    }
-    if (tabPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&setPtr->tabTable, tabPtr->hashPtr);
-    }
-    if (tabPtr->backGC != NULL) {
-	Tk_FreeGC(setPtr->display, tabPtr->backGC);
-    }
-    if (tabPtr->link != NULL) {
-	Blt_Chain_DeleteLink(setPtr->chain, tabPtr->link);
-    }
-    if (tabPtr->layoutPtr != NULL) {
-	Blt_Free(tabPtr->layoutPtr);
-    }
-    Blt_DeleteBindings(setPtr->bindTable, tabPtr);
-    Blt_Free(tabPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTab --
- *
- *	Creates a new tab structure.  A tab contains information about the
- *	state of the tab and its embedded window.
- *
- * Results:
- *	Returns a pointer to the new tab structure.
- *
- *---------------------------------------------------------------------------
- */
-static Tab *
-NewTab(Tabset *setPtr, const char *tabName)
-{
-    Tab *tabPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    char string[200];
-
-    tabPtr = Blt_AssertCalloc(1, sizeof(Tab));
-    tabPtr->setPtr = setPtr;
-    if (tabName == NULL) {
-	sprintf_s(string, 200, "tab%d", setPtr->nextId++);
-	tabName = string;
-    }
-    tabPtr->text = Blt_AssertStrdup(tabName);
-    tabPtr->fill = FILL_NONE;
-    tabPtr->anchor = TK_ANCHOR_CENTER;
-    tabPtr->container = NULL;
-    tabPtr->flags = NORMAL;
-    hPtr = Blt_CreateHashEntry(&setPtr->tabTable, tabName, &isNew);
-    tabPtr->name = Blt_GetHashKey(&setPtr->tabTable, hPtr);
-    Blt_SetHashValue(hPtr, tabPtr);
-    tabPtr->hashPtr = hPtr;
-    return tabPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BackgroundChangedProc
- *
- *	Stub for image change notifications.  Since we immediately draw the
- *	image into a pixmap, we don't really care about image changes.
- *
- *	It would be better if Tk checked for NULL proc pointers.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-BackgroundChangedProc(ClientData clientData)
-{
-    Tabset *setPtr = clientData;
-
-    if (setPtr->tkwin != NULL) {
-	EventuallyRedraw(setPtr);
-    }
-}
-
-static int
-ConfigureTab(Tabset *setPtr, Tab *tabPtr)
-{
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-    unsigned int w, h;
-    Blt_Font font;
-    Blt_Background bg;
-
-    font = GETATTR(tabPtr, font);
-    w = h = 0;
-    if (tabPtr->text != NULL) {
-	TextStyle ts;
-	double rw, rh;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetPadding(ts, 2, 2, 2, 2);
-	if (tabPtr->layoutPtr != NULL) {
-	    Blt_Free(tabPtr->layoutPtr);
-	}
-	tabPtr->layoutPtr = Blt_Ts_CreateLayout(tabPtr->text, -1, &ts);
-	Blt_GetBoundingBox(tabPtr->layoutPtr->width, tabPtr->layoutPtr->height, 
-		setPtr->defStyle.angle, &rw, &rh, (Point2d *)NULL);
-	w = ROUND(rw), h = ROUND(rh);
-    }
-    tabPtr->textWidth  = (unsigned short int)w;
-    tabPtr->textHeight = (unsigned short int)h;
-    if (tabPtr->imagePtr != NULL) {
-	unsigned int imgWidth, imgHeight;
-
-	imgWidth = ImageWidth(tabPtr->imagePtr);
-	imgHeight = ImageHeight(tabPtr->imagePtr);
-	if (ISVERTICAL(setPtr->defStyle.textPos)) {
-	    w += imgWidth;
-	    h = MAX(h, imgHeight);
-	} else {
-	    w = MAX(w, imgWidth);
-	    h += imgHeight;
-	}
-    }
-    if ((tabPtr->imagePtr != NULL) && (tabPtr->text != NULL)) {
-	w += LABEL_PAD;
-    }
-    w += PADDING(tabPtr->iPadX);
-    h += PADDING(tabPtr->iPadY);
-
-    tabPtr->labelWidth  = ODD(w);
-    tabPtr->labelHeight = ODD(h);
-
-    newGC = NULL;
-    if (tabPtr->text != NULL) {
-	XColor *colorPtr;
-
-	gcMask = GCForeground | GCFont;
-	colorPtr = GETATTR(tabPtr, textColor);
-	gcValues.foreground = colorPtr->pixel;
-	gcValues.font = Blt_FontId(font);
-	newGC = Tk_GetGC(setPtr->tkwin, gcMask, &gcValues);
-    }
-    if (tabPtr->textGC != NULL) {
-	Tk_FreeGC(setPtr->display, tabPtr->textGC);
-    }
-    tabPtr->textGC = newGC;
-
-
-    gcMask = GCForeground | GCStipple | GCFillStyle;
-    gcValues.fill_style = FillStippled;
-    bg = GETATTR(tabPtr, bg);
-    gcValues.foreground = Blt_BackgroundBorderColor(bg)->pixel;
-    gcValues.stipple = tabPtr->stipple;
-    newGC = Tk_GetGC(setPtr->tkwin, gcMask, &gcValues);
-    if (tabPtr->backGC != NULL) {
-	Tk_FreeGC(setPtr->display, tabPtr->backGC);
-    }
-    tabPtr->backGC = newGC;
-
-    if (tabPtr->bg != NULL) {
-	Blt_SetBackgroundChangedProc(tabPtr->bg, BackgroundChangedProc, setPtr);
-    }
-    if (Blt_ConfigModified(tabSpecs, "-image", "-*pad*", "-state",
-			   "-text", "-window*", (char *)NULL)) {
-	setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    }
-    if (tabPtr->flags & HIDE) {
-	if (setPtr->selectPtr == tabPtr) {
-	    setPtr->selectPtr = FirstTab(setPtr, HIDE | DISABLED);
-	}
-	if (setPtr->activePtr == tabPtr) {
-	    setPtr->activePtr = NULL;
-	}
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureButton --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
-
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for setPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyButton(Tabset *setPtr)
-{
-    Button *butPtr;
-
-    butPtr = &setPtr->button;
-    imageOption.clientData = setPtr;
-    Blt_FreeOptions(buttonSpecs, (char *)butPtr, setPtr->display, 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureButton --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
-
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for setPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureButton(
-    Tcl_Interp *interp,			/* Interpreter to report errors. */
-    Tabset *setPtr,			/* Information about widget; may or
-					 * may not already have values for some
-					 * fields. */
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    Button *butPtr;
-    int iw, ih;
-
-    imageOption.clientData = setPtr;
-    butPtr = &setPtr->button;
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, buttonSpecs, 
-	objc, objv, (char *)butPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    if ((setPtr->reqHeight > 0) && (setPtr->reqWidth > 0)) {
-	Tk_GeometryRequest(setPtr->tkwin, setPtr->reqWidth, setPtr->reqHeight);
-    }
-    iw = ih = 0;
-    if (butPtr->imagePtr != NULL) {
-	iw = ImageWidth(butPtr->imagePtr);
-	ih = ImageHeight(butPtr->imagePtr);
-    }
-    if (butPtr->activeImagePtr != NULL) {
-	if (iw < ImageWidth(butPtr->activeImagePtr)) {
-	    iw = ImageWidth(butPtr->activeImagePtr);
-	}
-	if (ih < ImageHeight(butPtr->activeImagePtr)) {
-	    ih = ImageHeight(butPtr->activeImagePtr);
-	}
-    }
-    if ((iw > 0) && (ih > 0)) {
-	iw += 2 + 2 * butPtr->borderWidth;
-	ih += 2 + 2 * butPtr->borderWidth;
-    }
-    butPtr->width = iw;
-    butPtr->height = ih;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TearoffEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	the tearoff widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the tearoff gets deleted, internal structures get cleaned up.
- *	When it gets resized or exposed, it's redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TearoffEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Tab *tabPtr = clientData;
-
-    if ((tabPtr == NULL) || (tabPtr->tkwin == NULL) ||
-	(tabPtr->container == NULL)) {
-	return;
-    }
-    switch (eventPtr->type) {
-    case Expose:
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedrawTearoff(tabPtr);
-	}
-	break;
-    case ConfigureNotify:
-	EventuallyRedrawTearoff(tabPtr);
-	break;
-    case DestroyNotify:
-	if (tabPtr->flags & TEAROFF_REDRAW) {
-	    tabPtr->flags &= ~TEAROFF_REDRAW;
-	    Tcl_CancelIdleCall(DisplayTearoff, clientData);
-	}
-	Tk_DestroyWindow(tabPtr->container);
-	tabPtr->container = NULL;
-	break;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqWidth --
- *
- *	Returns the width requested by the embedded tab window and any
- *	requested padding around it. This represents the requested width of
- *	the page.
- *
- * Results:
- *	Returns the requested width of the page.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqWidth(Tab *tabPtr)
-{
-    int width;
-    
-    if (tabPtr->reqSlaveWidth > 0) {
-	width = tabPtr->reqSlaveWidth;
-    } else {
-	width = Tk_ReqWidth(tabPtr->tkwin);
-    }
-    width += PADDING(tabPtr->xPad) + 
-	2 * Tk_Changes(tabPtr->tkwin)->border_width;
-    if (width < 1) {
-	width = 1;
-    }
-    return width;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetReqHeight --
- *
- *	Returns the height requested by the window and padding around the
- *	window. This represents the requested height of the page.
- *
- * Results:
- *	Returns the requested height of the page.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetReqHeight(Tab *tabPtr)
-{
-    int height;
-
-    if (tabPtr->reqSlaveHeight > 0) {
-	height = tabPtr->reqSlaveHeight;
-    } else {
-	height = Tk_ReqHeight(tabPtr->tkwin);
-    }
-    height += PADDING(tabPtr->yPad) +
-	2 * Tk_Changes(tabPtr->tkwin)->border_width;
-    if (height < 1) {
-	height = 1;
-    }
-    return height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given xy position
- * 	is in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |     x,y ---+
- *  		w   center   e      |     |
- *  		|            |      +-----+
- *  		sw --- s --- se
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TranslateAnchor(int dx, int dy, Tk_Anchor anchor, int *xPtr, int *yPtr)
-{
-    int x, y;
-
-    x = y = 0;
-    switch (anchor) {
-    case TK_ANCHOR_NW:		/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:		/* Left center */
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SW:		/* Lower left corner */
-	y = dy;
-	break;
-    case TK_ANCHOR_N:		/* Top center */
-	x = (dx / 2);
-	break;
-    case TK_ANCHOR_CENTER:	/* Centered */
-	x = (dx / 2);
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_S:		/* Bottom center */
-	x = (dx / 2);
-	y = dy;
-	break;
-    case TK_ANCHOR_NE:		/* Upper right corner */
-	x = dx;
-	break;
-    case TK_ANCHOR_E:		/* Right center */
-	x = dx;
-	y = (dy / 2);
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	x = dx;
-	y = dy;
-	break;
-    }
-    *xPtr = (*xPtr) + x;
-    *yPtr = (*yPtr) + y;
-}
-
-static void
-GetWindowRectangle(Tab *tabPtr, Tk_Window parent, int hasTearOff, 
-		   XRectangle *rectPtr)
-{
-    int pad;
-    Tabset *setPtr;
-    int cavityWidth, cavityHeight;
-    int width, height;
-    int dx, dy;
-    int x, y;
-
-    setPtr = tabPtr->setPtr;
-    pad = setPtr->inset + setPtr->inset2;
-
-    x = y = 0; 			/* Suppress compiler warning. */
-    if (!hasTearOff) {
-	switch (setPtr->side) {
-	case SIDE_RIGHT:
-	case SIDE_BOTTOM:
-	    x = setPtr->inset + setPtr->inset2;
-	    y = setPtr->inset + setPtr->inset2;
-	    break;
-
-	case SIDE_LEFT:
-	    x = setPtr->pageTop;
-	    y = setPtr->inset + setPtr->inset2;
-	    break;
-
-	case SIDE_TOP:
-	    x = setPtr->inset + setPtr->inset2;
-	    y = setPtr->pageTop;
-	    break;
-	}
-
-	if (ISVERTICAL(setPtr->side)) {
-	    cavityWidth = Tk_Width(setPtr->tkwin) - (setPtr->pageTop + pad);
-	    cavityHeight = Tk_Height(setPtr->tkwin) - (2 * pad);
-	} else {
-	    cavityWidth = Tk_Width(setPtr->tkwin) - (2 * pad);
-	    cavityHeight = Tk_Height(setPtr->tkwin) - (setPtr->pageTop + pad);
-	}
-
-    } else {
-	x = setPtr->inset + setPtr->inset2;
-#define TEAR_OFF_TAB_SIZE	5
-	y = setPtr->inset + setPtr->inset2 + setPtr->yPad + setPtr->outerPad +
-	    TEAR_OFF_TAB_SIZE;
-	cavityWidth = Tk_Width(parent) - (2 * pad);
-	cavityHeight = Tk_Height(parent) - (y + pad);
-    }
-    cavityWidth -= PADDING(tabPtr->xPad);
-    cavityHeight -= PADDING(tabPtr->yPad);
-    if (cavityWidth < 1) {
-	cavityWidth = 1;
-    }
-    if (cavityHeight < 1) {
-	cavityHeight = 1;
-    }
-    width = GetReqWidth(tabPtr);
-    height = GetReqHeight(tabPtr);
-
-    /*
-     * Resize the embedded window is of the following is true:
-     *
-     *	1) It's been torn off.
-     *  2) The -fill option (horizontal or vertical) is set.
-     *  3) the window is bigger than the cavity.
-     */
-    if ((hasTearOff) || (cavityWidth < width) || (tabPtr->fill & FILL_X)) {
-	width = cavityWidth;
-    }
-    if ((hasTearOff) || (cavityHeight < height) || (tabPtr->fill & FILL_Y)) {
-	height = cavityHeight;
-    }
-    dx = (cavityWidth - width);
-    dy = (cavityHeight - height);
-    if ((dx > 0) || (dy > 0)) {
-	TranslateAnchor(dx, dy, tabPtr->anchor, &x, &y);
-    }
-    /* Remember that X11 windows must be at least 1 pixel. */
-    if (width < 1) {
-	width = 1;
-    }
-    if (height < 1) {
-	height = 1;
-    }
-    rectPtr->x = (short)(x + tabPtr->padLeft);
-    rectPtr->y = (short)(y + tabPtr->padTop);
-    rectPtr->width = (short)width;
-    rectPtr->height = (short)height;
-}
-
-static void
-ArrangeWindow(Tk_Window tkwin, XRectangle *rectPtr, int force)
-{
-    if ((force) ||
-	(rectPtr->x != Tk_X(tkwin)) || 
-	(rectPtr->y != Tk_Y(tkwin)) ||
-	(rectPtr->width != Tk_Width(tkwin)) ||
-	(rectPtr->height != Tk_Height(tkwin))) {
-	Tk_MoveResizeWindow(tkwin, rectPtr->x, rectPtr->y, 
-			    rectPtr->width, rectPtr->height);
-    }
-    if (!Tk_IsMapped(tkwin)) {
-	Tk_MapWindow(tkwin);
-    }
-}
-
-
-/*ARGSUSED*/
-static void
-GetTagsProc(Blt_BindTable table, ClientData object, ClientData context, 
-	    Blt_List list)
-{
-    Tab *tabPtr = (Tab *)object;
-    Tabset *setPtr;
-
-    setPtr = table->clientData;
-    if (context == TAB_PERFORATION) {
-	Blt_List_Append(list, MakeTag(setPtr, "Perforation"), 0);
-    } else if (context == TAB_BUTTON) {
-	Blt_List_Append(list, MakeTag(setPtr, "Button"), 0);
-    } else if (context == TAB_LABEL) {
-	ClientData tag;
-
-	tag = MakeTag(setPtr, tabPtr->name);
-	Blt_List_Append(list, tag, 0);
-	AppendTags(setPtr, tabPtr, list);
-	Blt_List_Append(list, MakeTag(setPtr, "all"), 0);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabsetEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	tabset widgets.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TabsetEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Tabset *setPtr = clientData;
-
-    switch (eventPtr->type) {
-    case Expose:
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(setPtr);
-	}
-	break;
-
-    case ConfigureNotify:
-	setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-	EventuallyRedraw(setPtr);
-	break;
-
-    case FocusIn:
-    case FocusOut:
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		setPtr->flags |= FOCUS;
-	    } else {
-		setPtr->flags &= ~FOCUS;
-	    }
-	    EventuallyRedraw(setPtr);
-	}
-	break;
-
-    case DestroyNotify:
-	if (setPtr->tkwin != NULL) {
-	    setPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(setPtr->interp, setPtr->cmdToken);
-	}
-	if (setPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayTabset, setPtr);
-	}
-	Tcl_EventuallyFree(setPtr, DestroyTabset);
-	break;
-
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTabset --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of the widget at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTabset(DestroyData dataPtr)
-{
-    Tabset *setPtr = (Tabset *)dataPtr;
-    Tab *tabPtr;
-    Blt_ChainLink link, next;
-
-    if (setPtr->flags & REDRAW_PENDING) {
-	Tcl_CancelIdleCall(DisplayTabset, setPtr);
-    }
-    imageOption.clientData = setPtr;
-    Blt_FreeOptions(configSpecs, (char *)setPtr, setPtr->display, 0);
-    if (setPtr->highlightGC != NULL) {
-	Tk_FreeGC(setPtr->display, setPtr->highlightGC);
-    }
-    if (setPtr->defStyle.activeGC != NULL) {
-	Blt_FreePrivateGC(setPtr->display, setPtr->defStyle.activeGC);
-    }
-    for (link = Blt_Chain_FirstLink(setPtr->chain); link != NULL; link = next) {
-	next = Blt_Chain_NextLink(link);
-	tabPtr = Blt_Chain_GetValue(link);
-	tabPtr->link = NULL;
-	tabPtr->hashPtr = NULL;
-	DestroyTab(setPtr, tabPtr);
-    }
-    Blt_Chain_Destroy(setPtr->chain);
-    Blt_DestroyBindingTable(setPtr->bindTable);
-    Blt_DeleteHashTable(&setPtr->imageTable);
-    DestroyTags(setPtr);
-    Blt_DeleteHashTable(&setPtr->tagTable);
-    DestroyButton(setPtr);
-    Blt_Free(setPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTabset --
- *
- *---------------------------------------------------------------------------
- */
-static Tabset *
-NewTabset(Tcl_Interp *interp, Tk_Window tkwin)
-{
-    Tabset *setPtr;
-
-    setPtr = Blt_AssertCalloc(1, sizeof(Tabset));
-    Tk_SetClass(tkwin, "Tabset");
-    setPtr->borderWidth = setPtr->highlightWidth = 0;
-    setPtr->corner = CORNER_OFFSET;
-    setPtr->defStyle.borderWidth = 1;
-    setPtr->defStyle.relief = TK_RELIEF_RAISED;
-    setPtr->defStyle.reqTabWidth = TABWIDTH_SAME;
-    setPtr->defStyle.textPos = SIDE_RIGHT;
-    setPtr->defStyle.angle = 0.0f;
-    setPtr->reqTiers = 1;
-    setPtr->display = Tk_Display(tkwin);
-    setPtr->flags |= LAYOUT_PENDING | SCROLL_PENDING | SLANT_NONE;
-    setPtr->gap = GAP;
-    setPtr->interp = interp;
-    setPtr->relief = TK_RELIEF_FLAT;
-    setPtr->scrollUnits = 2;
-    setPtr->side = SIDE_TOP;
-    setPtr->tkwin = tkwin;
-    setPtr->xSelectPad = SELECT_PADX;
-    setPtr->ySelectPad = SELECT_PADY;
-    setPtr->bindTable = Blt_CreateBindingTable(interp, tkwin, setPtr, 
-	PickTabProc, GetTagsProc);
-    setPtr->chain = Blt_Chain_Create();
-    Blt_InitHashTable(&setPtr->tabTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&setPtr->imageTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&setPtr->tagTable, BLT_STRING_KEYS);
-    Blt_SetWindowInstanceData(tkwin, setPtr);
-    return setPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureTabset --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
-
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for setPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureTabset(
-    Tcl_Interp *interp,		/* Interpreter to report errors. */
-    Tabset *setPtr,		/* Information about widget; may or may not
-			         * already have values for some fields. */
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    GC newGC;
-
-    imageOption.clientData = setPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, configSpecs, 
-	   objc, objv, (char *)setPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_ConfigModified(configSpecs, "-width", "-height", "-side", "-gap",
-	"-slant", "-textside", "-rotate", "-tiers", "-tabwidth", 
-			   (char *)NULL)) {
-	setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    }
-    if ((setPtr->reqHeight > 0) && (setPtr->reqWidth > 0)) {
-	Tk_GeometryRequest(setPtr->tkwin, setPtr->reqWidth, 
-		setPtr->reqHeight);
-    }
-    /*
-     * GC for focus highlight.
-     */
-    gcMask = GCForeground;
-    gcValues.foreground = setPtr->highlightColor->pixel;
-    newGC = Tk_GetGC(setPtr->tkwin, gcMask, &gcValues);
-    if (setPtr->highlightGC != NULL) {
-	Tk_FreeGC(setPtr->display, setPtr->highlightGC);
-    }
-    setPtr->highlightGC = newGC;
-
-    if (setPtr->bg != NULL) {
-	Blt_SetBackgroundChangedProc(setPtr->bg, BackgroundChangedProc, setPtr);
-    }
-    /*
-     * GC for active line.
-     */
-    gcMask = GCForeground | GCLineWidth | GCLineStyle | GCCapStyle;
-    gcValues.foreground = setPtr->defStyle.textColor->pixel;
-    gcValues.line_width = 0;
-    gcValues.cap_style = CapProjecting;
-    gcValues.line_style = (LineIsDashed(setPtr->defStyle.dashes))
-	? LineOnOffDash : LineSolid;
-
-    newGC = Blt_GetPrivateGC(setPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(setPtr->defStyle.dashes)) {
-	setPtr->defStyle.dashes.offset = 2;
-	Blt_SetDashes(setPtr->display, newGC, &setPtr->defStyle.dashes);
-    }
-    if (setPtr->defStyle.activeGC != NULL) {
-	Blt_FreePrivateGC(setPtr->display, setPtr->defStyle.activeGC);
-    }
-    setPtr->defStyle.activeGC = newGC;
-
-    setPtr->defStyle.angle = FMOD(setPtr->defStyle.angle, 360.0);
-    if (setPtr->defStyle.angle < 0.0) {
-	setPtr->defStyle.angle += 360.0;
-    }
-    setPtr->inset = setPtr->highlightWidth + setPtr->borderWidth + 
-	setPtr->outerPad;
-#ifndef notdef
-    if (Blt_ConfigModified(configSpecs, "-font", "-*foreground", "-rotate",
-		"-*background", "-side", "-textside", "-tiers", "-tabwidth",
-		(char *)NULL)) {
-	Tab *tabPtr;
-
-	for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, 0)) {
-	    ConfigureTab(setPtr, tabPtr);
-	}
-	setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    }
-#endif
-    setPtr->inset2 = setPtr->defStyle.borderWidth + setPtr->corner;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tabset operations
- *
- *---------------------------------------------------------------------------
- */
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Selects the tab to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ActivateOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    const char *string;
-
-    string = Tcl_GetString(objv[2]);
-    if (string[0] == '\0') {
-	tabPtr = NULL;
-    } else if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr != NULL) && (tabPtr->flags & (HIDE|DISABLED))) {
-	tabPtr = NULL;
-    }
-    if (tabPtr != setPtr->activePtr) {
-	setPtr->activePtr = tabPtr;
-	setPtr->flags |= TABS_ONLY;
-	EventuallyRedraw(setPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	  .t bind index sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ClientData tag;
-
-    if (objc == 2) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-	Tcl_Obj *listObjPtr, *objPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    objPtr = Blt_GetHashValue(hPtr);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    tag = MakeTag(setPtr, Tcl_GetString(objv[2]));
-    return Blt_ConfigureBindingsFromObj(interp, setPtr->bindTable, tag, 
-	objc - 3, objv + 3);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonActivateOp --
- *
- * 	This procedure is called to highlight the button.
- *
- *	  .h button highlight boolean
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonActivateOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    int state;
-
-    if (Tcl_GetBooleanFromObj(interp, objv[3], &state) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (state) {
-	setPtr->flags |= BUTTON_ACTIVE;
-    } else {
-	setPtr->flags &= ~BUTTON_ACTIVE;
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonCgetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    imageOption.clientData = setPtr;
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, buttonSpecs,
-	(char *)&setPtr->button, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for setPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ButtonConfigureOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    imageOption.clientData = setPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, buttonSpecs,
-	    (char *)&setPtr->button, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, buttonSpecs,
-	    (char *)&setPtr->button, objv[2], 0);
-    }
-    if (ConfigureButton(interp, setPtr, objc - 3, objv + 3, 
-			BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonInvokeOp --
- *
- * 	This procedure is called to invoke a button command.
- *
- *	  .t button invoke
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonInvokeOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Tcl_Obj *objPtr;
-    Tab *tabPtr;
-
-    if (setPtr->selectPtr == NULL) {
-	return TCL_OK;
-    }
-    tabPtr = setPtr->selectPtr;
-    objPtr = setPtr->button.cmdObjPtr;
-    if (objPtr != NULL) {
-	Tcl_Obj **args;
-	Tcl_Obj **cmdv;
-	int cmdc;
-	int i;
-	int result;
-
-	if (Tcl_ListObjGetElements(interp, objPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	args = Blt_AssertMalloc(sizeof(Tcl_Obj *) * (cmdc + 1));
-	for (i = 0; i < cmdc; i++) {
-	    args[i] = cmdv[i];
-	}
-	args[i] = Tcl_NewIntObj(tabPtr->index);
-	result = Blt_GlobalEvalObjv(interp, cmdc + 1, args);
-	Blt_Free(args);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonOp --
- *
- *	This procedure handles tab operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec buttonOps[] =
-{
-    {"activate",  1, ButtonActivateOp,  4, 4, "boolean" }, 
-    {"cget",      2, ButtonCgetOp,      4, 4, "option",},
-    {"configure", 2, ButtonConfigureOp, 3, 0, "?option value?...",},
-    {"invoke",    1, ButtonInvokeOp,    3, 3, "",},
-};
-static int nButtonOps = sizeof(buttonOps) / sizeof(Blt_OpSpec);
-
-static int
-ButtonOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    TabsetCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nButtonOps, buttonOps, 
-	BLT_OP_ARG2, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (setPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    imageOption.clientData = setPtr;
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, configSpecs,
-	(char *)setPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for setPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    imageOption.clientData = setPtr;
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, configSpecs,
-	    (char *)setPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, configSpecs,
-	    (char *)setPtr, objv[2], 0);
-    }
-    if (ConfigureTabset(interp, setPtr, objc - 2, objv + 2,
-	    BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes tab from the set. Deletes either a range of tabs or a single
- *	node.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashTable delTable;
-    int i;
-
-    Blt_InitHashTable(&delTable, BLT_ONE_WORD_KEYS);
-    for (i = 2; i < objc; i++) {
-	TabIterator iter;
-	Tab *tabPtr;
-
-	if (GetTabIterator(interp, setPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	     tabPtr = NextTaggedTab(&iter)) {
-	    Blt_HashEntry *hPtr;
-	    int isNew;
-
-	    hPtr = Blt_CreateHashEntry(&delTable, tabPtr, &isNew);
-	    Blt_SetHashValue(hPtr, tabPtr);
-	}
-    }
-    if (delTable.numEntries > 0) {
-	Blt_HashSearch iter;
-	Blt_HashEntry *hPtr;
-
-	for (hPtr = Blt_FirstHashEntry(&delTable, &iter); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Tab *tabPtr;
-
-	    tabPtr = Blt_GetHashValue(hPtr);
-	    DestroyTab(setPtr, tabPtr);
-	}
-	ReindexTabs(setPtr);
-	setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-	EventuallyRedraw(setPtr);
-    }
-    Blt_DeleteHashTable(&delTable);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DockallOp --
- *
- *	  .h dockall
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DockallOp(Tabset *bookPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(bookPtr->chain); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	Tab *tabPtr;
-
-	tabPtr = Blt_Chain_GetValue(link);
-	if (tabPtr->container != NULL) {
-	    Tcl_EventuallyFree(tabPtr, DestroyTearoff);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExtentsOp --
- *
- *	Selects the tab to get focus.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ExtentsOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tabPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[2]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (tabPtr->flags & ONSCREEN) {
-	Tcl_Obj *listObjPtr, *objPtr;
-	int rootX, rootY;
-	
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tk_GetRootCoords(setPtr->tkwin, &rootX, &rootY);
-	objPtr = Tcl_NewIntObj(tabPtr->screenX + rootX);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	objPtr = Tcl_NewIntObj(tabPtr->screenY + rootY);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	objPtr = Tcl_NewIntObj(tabPtr->screenX + rootX + tabPtr->screenWidth);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	objPtr = Tcl_NewIntObj(tabPtr->screenY + rootY + tabPtr->screenHeight);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FocusOp --
- *
- *	Selects the tab to get focus.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FocusOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr != NULL) && ((tabPtr->flags & (DISABLED|HIDE)) == 0)) {
-	setPtr->focusPtr = tabPtr;
-	Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-	EventuallyRedraw(setPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Converts a string representing a tab index.
- *
- * Results:
- *	A standard TCL result.  Interp->result will contain the identifier of
- *	each index found. If an index could not be found, then the serial
- *	identifier will be the empty string.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    int index;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    index = -1;
-    if (tabPtr != NULL) {
-	index = tabPtr->index;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), index);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IdOp --
- *
- *	Converts a tab index into the tab identifier.
- *
- * Results:
- *	A standard TCL result.  Interp->result will contain the identifier of
- *	each index found. If an index could not be found, then the serial
- *	identifier will be the empty string.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IdOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tabPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[2]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), tabPtr->name, -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Add new entries into a tab set.
- *
- *	.t insert position ?label? option-value label option-value...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InsertOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    Blt_ChainLink link, before;
-    char c;
-    const char *string;
-
-    string = Tcl_GetString(objv[2]);
-    c = string[0];
-    if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	before = NULL;
-    } else if (isdigit(UCHAR(c))) {
-	int pos;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &pos) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (pos < 0) {
-	    before = Blt_Chain_FirstLink(setPtr->chain);
-	} else if (pos > Blt_Chain_GetLength(setPtr->chain)) {
-	    before = NULL;
-	} else {
-	    before = Blt_Chain_GetNthLink(setPtr->chain, pos);
-	}
-    } else {
-	Tab *beforePtr;
-
-	if (GetTabFromObj(interp, setPtr, objv[2], &beforePtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (beforePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[2]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	before = beforePtr->link;
-    }
-    string = NULL;
-    if (objc > 3) {
-	const char *name;
-
-	name = Tcl_GetString(objv[3]);
-	if (name[0] != '-') {
-	    string = name;
-	    objc--, objv++;
-	}
-    } 
-    tabPtr = NewTab(setPtr, string);
-    if (tabPtr == NULL) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(setPtr);
-    imageOption.clientData = setPtr;
-    if (Blt_ConfigureComponentFromObj(interp, setPtr->tkwin, tabPtr->name, "Tab",
-	tabSpecs, objc - 3, objv + 3, (char *)tabPtr, 0) != TCL_OK) {
-	DestroyTab(setPtr, tabPtr);
-	return TCL_ERROR;
-    }
-    if (ConfigureTab(setPtr, tabPtr) != TCL_OK) {
-	DestroyTab(setPtr, tabPtr);
-	return TCL_ERROR;
-    }
-    link = Blt_Chain_NewLink();
-    if (before != NULL) {
-	Blt_Chain_LinkBefore(setPtr->chain, link, before);
-    } else {
-	Blt_Chain_AppendLink(setPtr->chain, link);
-    }
-    tabPtr->link = link;
-    Blt_Chain_SetValue(link, tabPtr);
-    ReindexTabs(setPtr);
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), tabPtr->name, -1);
-    return TCL_OK;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeOp --
- *
- * 	This procedure is called to invoke a selection command.
- *
- *	  .h invoke index
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set; old resources get freed, if there were any.  The widget is
- *	redisplayed if needed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InvokeOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    Tcl_Obj *cmdObjPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr == NULL) || (tabPtr->flags & (DISABLED|HIDE))) {
-	return TCL_OK;
-    }
-    cmdObjPtr = GETATTR(tabPtr, cmdObjPtr);
-    if (cmdObjPtr != NULL) {
-	Tcl_Obj **args;
-	Tcl_Obj **cmdv;
-	int cmdc;
-	int i;
-	int result;
-
-	if (Tcl_ListObjGetElements(interp, cmdObjPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	args = Blt_AssertMalloc(sizeof(Tcl_Obj *) * (cmdc + 1));
-	for (i = 0; i < cmdc; i++) {
-	    args[i] = cmdv[i];
-	}
-	args[i] = Tcl_NewIntObj(tabPtr->index);
-	result = Blt_GlobalEvalObjv(interp, cmdc + 1, args);
-	Blt_Free(args);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveOp --
- *
- *	Moves a tab to a new location.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MoveOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr, *fromPtr;
-    char c;
-    const char *string;
-    int isBefore;
-    int length;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr == NULL) || (tabPtr->flags & DISABLED)) {
-	return TCL_OK;
-    }
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    c = string[0];
-    if ((c == 'b') && (strncmp(string, "before", length) == 0)) {
-	isBefore = TRUE;
-    } else if ((c == 'a') && (strncmp(string, "after", length) == 0)) {
-	isBefore = FALSE;
-    } else {
-	Tcl_AppendResult(interp, "bad key word \"", string,
-	    "\": should be \"after\" or \"before\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetTabFromObj(interp, setPtr, objv[4], &fromPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (fromPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[4]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (tabPtr == fromPtr) {
-	return TCL_OK;
-    }
-    Blt_Chain_UnlinkLink(setPtr->chain, tabPtr->link);
-    if (isBefore) {
-	Blt_Chain_LinkBefore(setPtr->chain, tabPtr->link, fromPtr->link);
-    } else {
-	Blt_Chain_LinkAfter(setPtr->chain, tabPtr->link, fromPtr->link);
-    }
-    setPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	  .h names pattern
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)	
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 2) {
-	Tab *tabPtr;
-
-	for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, 0)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewStringObj(tabPtr->name, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Tab *tabPtr;
-
-	for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, 0)) {
-	    int i;
-
-	    for (i = 2; i < objc; i++) {
-		if (Tcl_StringMatch(tabPtr->name, Tcl_GetString(objv[i]))) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj(tabPtr->name, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-NearestOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;			/* Screen coordinates of the test point. */
-    Tab *tabPtr;
-
-    if ((Tk_GetPixelsFromObj(interp, setPtr->tkwin, objv[2], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, setPtr->tkwin, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (setPtr->nVisible > 0) {
-	tabPtr = (Tab *)PickTabProc(setPtr, x, y, NULL);
-	if ((tabPtr != NULL) && ((tabPtr->flags & DISABLED) == 0)) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), tabPtr->name, -1);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectOp --
- *
- * 	This procedure is called to select a tab.
- *
- *	  .h select index
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font,
- * 	etc. get set;  old resources get freed, if there were any.
- * 	The widget is redisplayed if needed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr == NULL) || (tabPtr->flags & (HIDE|DISABLED))) {
-	return TCL_OK;
-    }
-    if ((setPtr->selectPtr != NULL) && (setPtr->selectPtr != tabPtr) &&
-	(setPtr->selectPtr->tkwin != NULL)) {
-	if (setPtr->selectPtr->container == NULL) {
-	    if (Tk_IsMapped(setPtr->selectPtr->tkwin)) {
-		Tk_UnmapWindow(setPtr->selectPtr->tkwin);
-	    }
-	} else {
-	    /* Redraw now unselected container. */
-	    EventuallyRedrawTearoff(setPtr->selectPtr);
-	}
-    }
-    setPtr->selectPtr = tabPtr;
-    if ((setPtr->nTiers > 1) && (tabPtr->tier != setPtr->startPtr->tier)) {
-	RenumberTiers(setPtr, tabPtr);
-	Blt_PickCurrentItem(setPtr->bindTable);
-    }
-    setPtr->flags |= SCROLL_PENDING;
-    if (tabPtr->container != NULL) {
-	EventuallyRedrawTearoff(tabPtr);
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-static int
-ViewOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int width;
-
-    width = VPORTWIDTH(setPtr);
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr, *objPtr;
-
-	/* Report first and last fractions */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/*
-	 * Note: we are bounding the fractions between 0.0 and 1.0 to support
-	 * the "canvas"-style of scrolling.
-	 */
-	fract = (double)setPtr->scrollOffset / setPtr->worldWidth;
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	fract = (double)(setPtr->scrollOffset + width) / setPtr->worldWidth;
-	objPtr = Tcl_NewDoubleObj(FCLAMP(fract));
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, 
-		&setPtr->scrollOffset, setPtr->worldWidth, width, 
-		setPtr->scrollUnits, BLT_SCROLL_MODE_HIERBOX) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    setPtr->flags |= SCROLL_PENDING | TABS_ONLY;
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-
-static void
-AdoptWindow(ClientData clientData)
-{
-    Tab *tabPtr = clientData;
-    int x, y;
-    Tabset *setPtr = tabPtr->setPtr;
-
-    x = setPtr->inset + setPtr->inset2 + tabPtr->padLeft;
-#define TEAR_OFF_TAB_SIZE	5
-    y = setPtr->inset + setPtr->inset2 + setPtr->yPad +
-	setPtr->outerPad + TEAR_OFF_TAB_SIZE + tabPtr->padTop;
-    Blt_RelinkWindow(tabPtr->tkwin, tabPtr->container, x, y);
-    Tk_MapWindow(tabPtr->tkwin);
-}
-
-static void
-DestroyTearoff(DestroyData dataPtr)
-{
-    Tab *tabPtr = (Tab *)dataPtr;
-
-    if (tabPtr->container != NULL) {
-	Tabset *setPtr;
-	Tk_Window tkwin;
-	setPtr = tabPtr->setPtr;
-
-	tkwin = tabPtr->container;
-	if (tabPtr->flags & TEAROFF_REDRAW) {
-	    Tcl_CancelIdleCall(DisplayTearoff, tabPtr);
-	}
-	Tk_DeleteEventHandler(tkwin, StructureNotifyMask, TearoffEventProc,
-	    tabPtr);
-	if (tabPtr->tkwin != NULL) {
-	    XRectangle rect;
-
-	    GetWindowRectangle(tabPtr, setPtr->tkwin, FALSE, &rect);
-	    Blt_RelinkWindow(tabPtr->tkwin, setPtr->tkwin, rect.x, rect.y);
-	    if (tabPtr == setPtr->selectPtr) {
-		ArrangeWindow(tabPtr->tkwin, &rect, TRUE);
-	    } else {
-		Tk_UnmapWindow(tabPtr->tkwin);
-	    }
-	}
-	Tk_DestroyWindow(tkwin);
-	tabPtr->container = NULL;
-    }
-}
-
-static int
-NewTearoff(Tabset *setPtr, Tcl_Obj *objPtr, Tab *tabPtr)
-{
-    Tk_Window tkwin;
-    const char *name;
-    int w, h;
-
-    name = Tcl_GetString(objPtr);
-    tkwin = Tk_CreateWindowFromPath(setPtr->interp, setPtr->tkwin, name,
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    tabPtr->container = tkwin;
-    if (Tk_WindowId(tkwin) == None) {
-	Tk_MakeWindowExist(tkwin);
-    }
-    Tk_SetClass(tkwin, "Tearoff");
-    Tk_CreateEventHandler(tkwin, (ExposureMask | StructureNotifyMask),
-	TearoffEventProc, tabPtr);
-    if (Tk_WindowId(tabPtr->tkwin) == None) {
-	Tk_MakeWindowExist(tabPtr->tkwin);
-    }
-    w = Tk_Width(tabPtr->tkwin);
-    if (w < 2) {
-	w = (tabPtr->reqSlaveWidth > 0) 
-	    ? tabPtr->reqSlaveWidth : Tk_ReqWidth(tabPtr->tkwin);
-    }
-    w += PADDING(tabPtr->xPad) + 2 * Tk_Changes(tabPtr->tkwin)->border_width;
-    w += 2 * (setPtr->inset2 + setPtr->inset);
-#define TEAR_OFF_TAB_SIZE	5
-    h = Tk_Height(tabPtr->tkwin);
-    if (h < 2) {
-	h = (tabPtr->reqSlaveHeight > 0)
-	    ? tabPtr->reqSlaveHeight : Tk_ReqHeight(tabPtr->tkwin);
-    }
-    h += PADDING(tabPtr->yPad) + 2 * Tk_Changes(tabPtr->tkwin)->border_width;
-    h += setPtr->inset + setPtr->inset2 + setPtr->yPad + TEAR_OFF_TAB_SIZE + 
-	setPtr->outerPad;
-    Tk_GeometryRequest(tkwin, w, h);
-    Tk_UnmapWindow(tabPtr->tkwin);
-    /* Tk_MoveWindow(tabPtr->tkwin, 0, 0); */
-#ifdef WIN32
-    AdoptWindow(tabPtr);
-#else
-    Tcl_DoWhenIdle(AdoptWindow, tabPtr);
-#endif
-    Tcl_SetStringObj(Tcl_GetObjResult(setPtr->interp), Tk_PathName(tkwin), -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabCgetOp --
- *
- *	  .h tab cget index option
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TabCgetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[3], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tabPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[3]), "\" in \"", Tk_PathName(setPtr->tkwin), 
-			 "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    imageOption.clientData = setPtr;
-    return Blt_ConfigureValueFromObj(interp, setPtr->tkwin, tabSpecs,
-	(char *)tabPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure the options for one or more tabs in
- * 	the widget.
- *
- *	  .h tab configure index ?index...? ?option value?...
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side Effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set; old resources get freed, if there were any.  The widget is
- *	redisplayed if needed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TabConfigureOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    TabIterator iter;
-
-    imageOption.clientData = setPtr;
-    if ((objc == 4) || (objc == 5)) {
-	if (GetTabFromObj(interp, setPtr, objv[3], &tabPtr) != TCL_OK) {
-	    return TCL_ERROR;	/* Can't find node. */
-	}
-	if (tabPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tab \"", 
-		Tcl_GetString(objv[3]), "\" in \"", 
-			     Tk_PathName(setPtr->tkwin), 
-			     "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (objc == 4) {
-	    return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, tabSpecs, 
-		(char *)tabPtr, (Tcl_Obj *)NULL, 0);
-	} else if (objc == 5) {
-	    return Blt_ConfigureInfoFromObj(interp, setPtr->tkwin, tabSpecs, 
-		(char *)tabPtr, objv[4], 0);
-	}
-    }
-    if (GetTabIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;	/* Can't find node. */
-    }
-    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	 tabPtr = NextTaggedTab(&iter)) {
-	int result;
-
-	Tcl_Preserve(tabPtr);
-	result = Blt_ConfigureWidgetFromObj(interp, setPtr->tkwin, tabSpecs, 
-		objc - 4, objv + 4, (char *)tabPtr, BLT_CONFIG_OBJV_ONLY);
-	Tcl_Release(tabPtr);
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	if (ConfigureTab(setPtr, tabPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabOp --
- *
- *	This procedure handles tab operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tabOps[] =
-{
-    {"cget",      2, TabCgetOp,	     5, 5, "tab option",},
-    {"configure", 2, TabConfigureOp, 4, 0, "tab ?option value?...",},
-};
-
-static int nTabOps = sizeof(tabOps) / sizeof(Blt_OpSpec);
-
-static int
-TabOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TabsetCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTabOps, tabOps, BLT_OP_ARG2, 
-		    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (setPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PerforationActivateOp --
- *
- * 	This procedure is called to highlight the perforation.
- *
- *	  .h perforation highlight boolean
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PerforationActivateOp(
-    Tabset *setPtr,
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int bool;
-
-    if (Tcl_GetBooleanFromObj(interp, objv[3], &bool) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (bool) {
-	setPtr->flags |= PERFORATION_ACTIVE;
-    } else {
-	setPtr->flags &= ~PERFORATION_ACTIVE;
-    }
-    EventuallyRedraw(setPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PerforationInvokeOp --
- *
- * 	This procedure is called to invoke a perforation command.
- *
- *	  .t perforation invoke
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PerforationInvokeOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-		    Tcl_Obj *const *objv)
-{
-    Tcl_Obj *objPtr;
-    Tab *tabPtr;
-
-    if (setPtr->selectPtr == NULL) {
-	return TCL_OK;
-    }
-    tabPtr = setPtr->selectPtr;
-    objPtr = GETATTR(tabPtr, perfCmdObjPtr);
-    if (objPtr != NULL) {
-	Tcl_Obj **args;
-	Tcl_Obj **cmdv;
-	int cmdc;
-	int i;
-	int result;
-
-	if (Tcl_ListObjGetElements(interp, objPtr, &cmdc, &cmdv) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	args = Blt_AssertMalloc(sizeof(Tcl_Obj *) * (cmdc + 1));
-	for (i = 0; i < cmdc; i++) {
-	    args[i] = cmdv[i];
-	}
-	args[i] = Tcl_NewIntObj(tabPtr->index);
-	result = Blt_GlobalEvalObjv(interp, cmdc + 1, args);
-	Blt_Free(args);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PerforationOp --
- *
- *	This procedure handles tab operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec perforationOps[] =
-{
-    {"activate", 1, PerforationActivateOp, 4, 4, "boolean" }, 
-    {"invoke",   1, PerforationInvokeOp,   3, 3, "",},
-};
-
-static int nPerforationOps = sizeof(perforationOps) / sizeof(Blt_OpSpec);
-
-static int
-PerforationOp(Tabset *setPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    TabsetCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nPerforationOps, perforationOps, 
-	BLT_OP_ARG2, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (setPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    char c;
-    const char *string;
-    int length;
-    int oper;
-    int x, y;
-
-#define SCAN_MARK	1
-#define SCAN_DRAGTO	2
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	oper = SCAN_MARK;
-    } else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	oper = SCAN_DRAGTO;
-    } else {
-	Tcl_AppendResult(interp, "bad scan operation \"", string,
-	    "\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tk_GetPixelsFromObj(interp, setPtr->tkwin, objv[3], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, setPtr->tkwin, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (oper == SCAN_MARK) {
-	if (ISVERTICAL(setPtr->side)) {
-	    setPtr->scanAnchor = y;
-	} else {
-	    setPtr->scanAnchor = x;
-	}
-	setPtr->scanOffset = setPtr->scrollOffset;
-    } else {
-	int offset, delta;
-
-	if (ISVERTICAL(setPtr->side)) {
-	    delta = setPtr->scanAnchor - y;
-	} else {
-	    delta = setPtr->scanAnchor - x;
-	}
-	offset = setPtr->scanOffset + (10 * delta);
-	offset = Blt_AdjustViewport(offset, setPtr->worldWidth,
-	    VPORTWIDTH(setPtr), setPtr->scrollUnits, BLT_SCROLL_MODE_HIERBOX);
-	setPtr->scrollOffset = offset;
-	setPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(setPtr);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SeeOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tabPtr != NULL) {
-	int left, right, width;
-
-	width = VPORTWIDTH(setPtr);
-	left = setPtr->scrollOffset + setPtr->xSelectPad;
-	right = setPtr->scrollOffset + width - setPtr->xSelectPad;
-
-	/* If the tab is partially obscured, scroll so that it's
-	 * entirely in view. */
-	if (tabPtr->worldX < left) {
-	    setPtr->scrollOffset = tabPtr->worldX;
-	    if (tabPtr->index > 0) {
-		setPtr->scrollOffset -= TAB_SCROLL_OFFSET;
-	    }
-	} else if ((tabPtr->worldX + tabPtr->worldWidth) >= right) {
-	    Blt_ChainLink link;
-
-	    setPtr->scrollOffset = tabPtr->worldX + tabPtr->worldWidth -
-		(width - 2 * setPtr->xSelectPad);
-	    link = Blt_Chain_NextLink(tabPtr->link); 
-	    if (link != NULL) {
-		Tab *nextPtr;
-
-		nextPtr = Blt_Chain_GetValue(link);
-		if (nextPtr->tier == tabPtr->tier) {
-		    setPtr->scrollOffset += TAB_SCROLL_OFFSET;
-		}
-	    }
-	}
-	setPtr->flags |= SCROLL_PENDING;
-	EventuallyRedraw(setPtr);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SizeOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int nTabs;
-
-    nTabs = Blt_Chain_GetLength(setPtr->chain);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), nTabs);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagAddOp --
- *
- *	.t tag add tagName tab1 tab2 tab2 tab4
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagAddOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *tag;
-
-    tag = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(tag[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", tag, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (strcmp(tag, "all") == 0) {
-	Tcl_AppendResult(interp, "can't add reserved tag \"", tag, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	/* No nodes specified.  Just add the tag. */
-	AddTag(setPtr, NULL, tag);
-    } else {
-	int i;
-
-	for (i = 4; i < objc; i++) {
-	    Tab *tabPtr;
-	    TabIterator iter;
-	    
-	    if (GetTabIterator(interp, setPtr, objv[i], &iter) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-		 tabPtr = NextTaggedTab(&iter)) {
-		AddTag(setPtr, tabPtr, tag);
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagDeleteOp --
- *
- *	.t delete tagName tab1 tab2 tab3
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagDeleteOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    const char *tag;
-    Blt_HashTable *tablePtr;
-
-    tag = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(tag[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", tag, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (strcmp(tag, "all") == 0) {
-	Tcl_AppendResult(interp, "can't delete reserved tag \"", tag, "\"", 
-			 (char *)NULL);
-        return TCL_ERROR;
-    }
-    tablePtr = GetTagTable(setPtr, tag);
-    if (tablePtr != NULL) {
-        int i;
-      
-        for (i = 4; i < objc; i++) {
-	    Tab *tabPtr;
-	    TabIterator iter;
-
-	    if (GetTabIterator(interp, setPtr, objv[i], &iter) != TCL_OK) {
-	        return TCL_ERROR;
-	    }
-	    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-		 tabPtr = NextTaggedTab(&iter)) {
-		Blt_HashEntry *hPtr;
-
-	        hPtr = Blt_FindHashEntry(tablePtr, (char *)tabPtr);
-	        if (hPtr != NULL) {
-		    Blt_DeleteHashEntry(tablePtr, hPtr);
-	        }
-	   }
-       }
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagExistsOp --
- *
- *	Returns the existence of the one or more tags in the given node.  If
- *	the node has any the tags, true is return in the interpreter.
- *
- *	.t tag exists tab tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagExistsOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    TabIterator iter;
-
-    if (GetTabIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	const char *tag;
-	Tab *tabPtr;
-
-	tag = Tcl_GetString(objv[i]);
-	for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	     tabPtr = NextTaggedTab(&iter)) {
-	    if (HasTag(tabPtr, tag)) {
-		Tcl_SetBooleanObj(Tcl_GetObjResult(interp), TRUE);
-		return TCL_OK;
-	    }
-	}
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), FALSE);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagForgetOp --
- *
- *	Removes the given tags from all tabs.
- *
- *	.ts tab forget tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagForgetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	const char *tag;
-
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-			     "\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	ForgetTag(setPtr, tag);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagGetOp --
- *
- *	Returns tag names for a given node.  If one of more pattern arguments
- *	are provided, then only those matching tags are returned.
- *
- *	.t tag get tab pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagGetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr; 
-    TabIterator iter;
-    Tcl_Obj *listObjPtr;
-
-    if (GetTabIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	 tabPtr = NextTaggedTab(&iter)) {
-	if (objc == 4) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch hiter;
-
-	    for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		 hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		Blt_HashTable *tablePtr;
-
-		tablePtr = Blt_GetHashValue(hPtr);
-		if (Blt_FindHashEntry(tablePtr, (char *)tabPtr) != NULL) {
-		    const char *tag;
-		    Tcl_Obj *objPtr;
-
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    objPtr = Tcl_NewStringObj(tag, -1);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		}
-	    }
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				     Tcl_NewStringObj("all", 3));
-	} else {
-	    int i;
-	    
-	    /* Check if we need to add the special tags "all" */
-	    for (i = 4; i < objc; i++) {
-		const char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch("all", pattern)) {
-		    Tcl_Obj *objPtr;
-
-		    objPtr = Tcl_NewStringObj("all", 3);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;
-		}
-	    }
-	    /* Now process any standard tags. */
-	    for (i = 4; i < objc; i++) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch hiter;
-		const char *pattern;
-		
-		pattern = Tcl_GetString(objv[i]);
-		for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		    const char *tag;
-		    Blt_HashTable *tablePtr;
-
-		    tablePtr = Blt_GetHashValue(hPtr);
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    if (!Tcl_StringMatch(tag, pattern)) {
-			continue;
-		    }
-		    if (Blt_FindHashEntry(tablePtr, (char *)tabPtr) != NULL) {
-			Tcl_Obj *objPtr;
-
-			objPtr = Tcl_NewStringObj(tag, -1);
-			Tcl_ListObjAppendElement(interp, listObjPtr,objPtr);
-		    }
-		}
-	    }
-	}    
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNamesOp --
- *
- *	Returns the names of all the tags in the tabset.  If one of more node
- *	arguments are provided, then only the tags found in those nodes are
- *	returned.
- *
- *	.t tag names tab tab tab...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNamesOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    objPtr = Tcl_NewStringObj("all", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    const char *tag;
-	    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-	    objPtr = Tcl_NewStringObj(tag, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_HashTable uniqTable;
-	int i;
-
-	Blt_InitHashTable(&uniqTable, BLT_STRING_KEYS);
-	for (i = 3; i < objc; i++) {
-	    TabIterator iter;
-	    Tab *tabPtr;
-
-	    if (GetTabIterator(interp, setPtr, objPtr, &iter) != TCL_OK) {
-		goto error;
-	    }
-	    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-		 tabPtr = NextTaggedTab(&iter)) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch hiter;
-		for (hPtr = Blt_FirstHashEntry(&setPtr->tagTable, &hiter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&hiter)) {
-		    const char *tag;
-		    Blt_HashTable *tablePtr;
-
-		    tag = Blt_GetHashKey(&setPtr->tagTable, hPtr);
-		    tablePtr = Blt_GetHashValue(hPtr);
-		    if (Blt_FindHashEntry(tablePtr, tabPtr) != NULL) {
-			int isNew;
-
-			Blt_CreateHashEntry(&uniqTable, tag, &isNew);
-		    }
-		}
-	    }
-	}
-	{
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch hiter;
-
-	    for (hPtr = Blt_FirstHashEntry(&uniqTable, &hiter); hPtr != NULL;
-		 hPtr = Blt_NextHashEntry(&hiter)) {
-		objPtr = Tcl_NewStringObj(Blt_GetHashKey(&uniqTable, hPtr), -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-	Blt_DeleteHashTable(&uniqTable);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
- error:
-    Tcl_DecrRefCount(listObjPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagIndicesOp --
- *
- *	Returns the indices associated with the given tags.  The indices
- *	returned will represent the union of tabs for all the given tags.
- *
- *	.t tag indices tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagIndicesOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashTable tabTable;
-    int i;
-	
-    Blt_InitHashTable(&tabTable, BLT_ONE_WORD_KEYS);
-    for (i = 3; i < objc; i++) {
-	const char *tag;
-
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-			     "\": can't start with a digit", (char *)NULL);
-	    goto error;
-	}
-	if (strcmp(tag, "all") == 0) {
-	    break;
-	} else {
-	    Blt_HashTable *tablePtr;
-	    
-	    tablePtr = GetTagTable(setPtr, tag);
-	    if (tablePtr != NULL) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch iter;
-
-		for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		    Tab *tabPtr;
-		    int isNew;
-
-		    tabPtr = Blt_GetHashValue(hPtr);
-		    if (tabPtr != NULL) {
-			Blt_CreateHashEntry(&tabTable, (char *)tabPtr, &isNew);
-		    }
-		}
-		continue;
-	    }
-	}
-	Tcl_AppendResult(interp, "can't find a tag \"", tag, "\"",
-			 (char *)NULL);
-	goto error;
-    }
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (hPtr = Blt_FirstHashEntry(&tabTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Tab *tabPtr;
-	    Tcl_Obj *objPtr;
-
-	    tabPtr = (Tab *)Blt_GetHashKey(&tabTable, hPtr);
-	    objPtr = Tcl_NewLongObj(tabPtr->index);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_DeleteHashTable(&tabTable);
-    return TCL_OK;
-
- error:
-    Blt_DeleteHashTable(&tabTable);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagSetOp --
- *
- *	Sets one or more tags for a given tab.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("all").
- *
- *	.t tag set tab tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagSetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    TabIterator iter;
-
-    if (GetTabIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	const char *tag;
-	Tab *tabPtr;
-	
-	tag = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(tag[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", tag, 
-			     "\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (strcmp(tag, "all") == 0) {
-	    Tcl_AppendResult(interp, "can't add reserved tag \"", tag, "\"",
-			     (char *)NULL);	
-	    return TCL_ERROR;
-	}
-	for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	     tabPtr = NextTaggedTab(&iter)) {
-	    AddTag(setPtr, tabPtr, tag);
-	}    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagUnsetOp --
- *
- *	Removes one or more tags from a given tab. If a tag doesn't exist or
- *	is a reserved tag ("all"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t tag unset tab tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagUnsetOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    TabIterator iter;
-
-    if (GetTabIterator(interp, setPtr, objv[3], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (tabPtr = FirstTaggedTab(&iter); tabPtr != NULL; 
-	 tabPtr = NextTaggedTab(&iter)) {
-	int i;
-	for (i = 4; i < objc; i++) {
-	    RemoveTag(tabPtr, Tcl_GetString(objv[i]));
-	}    
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagOp --
- *
- * 	This procedure is invoked to process tag operations.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tagOps[] =
-{
-    {"add",     1, TagAddOp,      4, 0, "tab ?tag...?",},
-    {"delete",  1, TagDeleteOp,   4, 0, "tab ?tag...?",},
-    {"exists",  1, TagExistsOp,   4, 0, "tab ?tag...?",},
-    {"forget",  1, TagForgetOp,   3, 0, "?tag...?",},
-    {"get",     1, TagGetOp,      4, 0, "tab ?pattern...?",},
-    {"indices", 1, TagIndicesOp,  3, 0, "?tag...?",},
-    {"names",   2, TagNamesOp,    3, 0, "?tab...?",},
-    {"set",     1, TagSetOp,      4, 0, "tab ?tag...",},
-    {"unset",   1, TagUnsetOp,    4, 0, "tab ?tag...",},
-};
-
-static int nTagOps = sizeof(tagOps) / sizeof(Blt_OpSpec);
-
-static int
-TagOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TabsetCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTagOps, tagOps, BLT_OP_ARG2,
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(setPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TearoffOp --
- *
- *	  .h tearoff index ?title?
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TearoffOp(Tabset *setPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tab *tabPtr;
-    Tk_Window tkwin;
-    const char *string;
-    int result;
-
-    if (GetTabFromObj(interp, setPtr, objv[2], &tabPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tabPtr == NULL) || (tabPtr->tkwin == NULL) || 
-	(tabPtr->flags & (DISABLED|HIDE))) {
-	return TCL_OK;		/* No-op */
-    }
-    if (objc == 3) {
-	Tk_Window parent;
-
-	parent = (tabPtr->container == NULL) ? setPtr->tkwin : tabPtr->container;
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(parent), -1);
-	return TCL_OK;
-    }
-    Tcl_Preserve(tabPtr);
-    result = TCL_OK;
-
-    string = Tcl_GetString(objv[3]);
-    tkwin = Tk_NameToWindow(interp, string, setPtr->tkwin);
-    Tcl_ResetResult(interp);
-
-    if (tabPtr->container != NULL) {
-	Tcl_EventuallyFree(tabPtr, DestroyTearoff);
-    }
-    if ((tkwin != setPtr->tkwin) && (tabPtr->container == NULL)) {
-	result = NewTearoff(setPtr, objv[3], tabPtr);
-    }
-    Tcl_Release(tabPtr);
-    EventuallyRedraw(setPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeWorldGeometry --
- *
- *	Compute the sizes of the tabset and each tab in world coordinates.
- *	World coordinates are not rotated according to the side the widget 
- *	where the tabs are located.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ComputeWorldGeometry(Tabset *setPtr)
-{
-    int count;
-    int pageWidth, pageHeight;
-    int maxWidth,  maxHeight;
-    int tabWidth,  tabHeight;
-    Tab *tabPtr;
-
-    pageWidth = pageHeight = 0;
-    count = 0;
-
-    maxWidth = maxHeight = 0;
-
-    /*
-     * Pass 1:  Figure out the maximum area needed for a label and a
-     *		page.  Both the label and page dimensions are adjusted
-     *		for orientation.  In addition, reset the visibility
-     *		flags and reorder the tabs.
-     */
-    for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	 tabPtr = NextTab(tabPtr, 0)) {
-	int width, height;
-
-	/* Reset visibility flag and order of tabs. */
-	tabPtr->flags &= ~ONSCREEN;
-	if (tabPtr->flags & HIDE) {
-	    continue;
-	}
-	count++;
-	if (tabPtr->tkwin != NULL) {
-	    width = GetReqWidth(tabPtr);
-	    if (pageWidth < width) {
-		pageWidth = width;
-	    }
-	    height = GetReqHeight(tabPtr);
-	    if (pageHeight < height) {
-		pageHeight = height;
-	    }
-	}
-	width = tabPtr->labelWidth;
-	height = tabPtr->labelHeight;
-	if (ISVERTICAL(setPtr->side)) {
-	    width = MAX(width, setPtr->button.width);
-	    height += setPtr->button.height;
-	} else {
-	    width += setPtr->button.height;
-	    height = MAX(height, setPtr->button.width);
-	}
-	if (maxWidth < width) {
-	    maxWidth = width;
-	}
-	if (maxHeight < height) {
-	    maxHeight = height;
-	}
-    }
-
-    setPtr->overlap = 0;
-
-    /*
-     * Pass 2:	Set the sizes for each tab.  This is different
-     *		for constant and variable width tabs.  Add the extra space
-     *		needed for slanted tabs, now that we know maximum tab
-     *		height.
-     */
-    if (setPtr->defStyle.reqTabWidth != TABWIDTH_VARIABLE) {
-	int slant;
-	Tab *tabPtr;
-
-	tabWidth  = 2 * (setPtr->defStyle.borderWidth + LABEL_PAD);
-	tabHeight = 2 * setPtr->inset2;
-	if (setPtr->defStyle.reqTabWidth > 0) {
-	    /* User sets tab width. */
-	    if (ISVERTICAL(setPtr->side)) {
-		tabHeight = setPtr->defStyle.reqTabWidth;
-		tabWidth  += maxHeight;
-		slant = tabHeight;
-	    } else {
-		tabWidth  = setPtr->defStyle.reqTabWidth;
-		tabHeight += maxHeight;
-		slant = tabWidth;
-	    }
-	} else {
-	    /* Use maximum width/height of all the tabs. */
-	    if (ISVERTICAL(setPtr->side)) {
-		tabWidth  += maxHeight;
-		tabHeight += maxWidth;
-		slant = maxWidth;
-	    } else {
-		tabWidth  += maxWidth;
-		tabHeight += maxHeight;
-		slant = maxHeight;
-	    }
-	}
-	tabWidth += (setPtr->flags & SLANT_LEFT)  ? slant : setPtr->corner;
-	tabWidth += (setPtr->flags & SLANT_RIGHT) ? slant : setPtr->corner;
-	if (setPtr->flags & SLANT_LEFT) {
-	    setPtr->overlap += slant / 2;
-	}
-	if (setPtr->flags & SLANT_RIGHT) {
-	    setPtr->overlap += slant / 2;
-	}
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL; 
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    if (tabPtr->reqTabWidth > 0) {
-		int tw;
-
-		tw  = 2 * (setPtr->defStyle.borderWidth + LABEL_PAD);
-		tw += tabPtr->labelWidth;
-		tw += (setPtr->flags & SLANT_LEFT)  ? slant : setPtr->corner;
-		tw += (setPtr->flags & SLANT_RIGHT) ? slant : setPtr->corner;
-		tabPtr->worldWidth = tw;
-	    } else {
-		tabPtr->worldWidth = tabWidth;
-	    }
-	    tabPtr->worldHeight = tabHeight;
-	}
-    } else {				/* Variable width tabs. */
-	int slant;
-	Tab *tabPtr;
-
-	tabWidth = tabHeight = 0;
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    int width, height;
-
-	    width  = 2 * (setPtr->defStyle.borderWidth + LABEL_PAD);
-	    height = 2 * setPtr->inset2;
-	    if (ISVERTICAL(setPtr->side)) {
-		width += tabPtr->labelHeight;
-		height += maxWidth;
-		slant = maxWidth;
-	    } else {
-		width += tabPtr->labelWidth;
-		height += maxHeight;
-		slant = maxHeight;
-	    }
-	    width += (setPtr->flags & SLANT_LEFT) ? slant : setPtr->corner;
-	    width += (setPtr->flags & SLANT_RIGHT) ? slant : setPtr->corner;
-
-	    tabPtr->worldWidth = width;
-	    tabPtr->worldHeight = height;
-
-	    if (tabWidth < width) {
-		tabWidth = width;
-	    }
-	    if (tabHeight < height) {
-		tabHeight = height;
-	    }
-	}
-	if (setPtr->flags & SLANT_LEFT) {
-	    setPtr->overlap += tabHeight / 2;
-	}
-	if (setPtr->flags & SLANT_RIGHT) {
-	    setPtr->overlap += tabHeight / 2;
-	}
-    }
-
-    setPtr->tabWidth  = tabWidth;
-    setPtr->tabHeight = tabHeight;
-
-    /*
-     * Let the user override any page dimension.
-     */
-    setPtr->pageWidth = pageWidth;
-    setPtr->pageHeight = pageHeight;
-    if (setPtr->reqPageWidth > 0) {
-	setPtr->pageWidth = setPtr->reqPageWidth;
-    }
-    if (setPtr->reqPageHeight > 0) {
-	setPtr->pageHeight = setPtr->reqPageHeight;
-    }
-    return count;
-}
-
-
-static void
-WidenTabs(Tabset *setPtr, Tab *startPtr, int nTabs, int adjustment)
-{
-    int x;
-    int i;
-    Tab *tabPtr;
-
-    x = startPtr->tier;
-    while (adjustment > 0) {
-	int count;
-	int ration;
-	Tab *tabPtr;
-
-	count = 0;
-	for (tabPtr = startPtr, i = 0; 
-	     (tabPtr != NULL) && (i < nTabs) && (adjustment > 0); 
-	     tabPtr = NextTab(tabPtr, HIDE), i++) {
-	    if (tabPtr->reqTabWidth == 0) {
-		count++;
-	    }
-	}
-	ration = adjustment / count;
-	if (ration == 0) {
-	    ration = 1;
-	}
-	
-	for (tabPtr = startPtr, i = 0; 
-	     (tabPtr != NULL) && (i < nTabs) && (adjustment > 0); 
-	     tabPtr = NextTab(tabPtr, HIDE), i++) {
-	    if (tabPtr->reqTabWidth == 0) {
-		adjustment -= ration;
-		tabPtr->worldWidth += ration;
-		assert(x == tabPtr->tier);
-	    }
-	}
-    }
-    /*
-     * Go back and reset the world X-coordinates of the tabs,
-     * now that their widths have changed.
-     */
-    x = 0;
-    for (tabPtr = startPtr, i = 0; (i < nTabs) && (tabPtr != NULL); 
-	 tabPtr = NextTab(tabPtr, HIDE), i++) {
-	if (tabPtr->reqTabWidth == 0) {
-	    tabPtr->worldX = x;
-	    x += tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-	}
-    }
-}
-
-static void
-AdjustTabSizes(Tabset *setPtr, int nTabs)
-{
-    int tabsPerTier;
-    int total, count, extra;
-    Tab *startPtr, *nextPtr;
-    Blt_ChainLink link;
-    Tab *tabPtr;
-    int x, maxWidth;
-
-    tabsPerTier = (nTabs + (setPtr->nTiers - 1)) / setPtr->nTiers;
-    x = 0;
-    maxWidth = 0;
-    if (setPtr->defStyle.reqTabWidth != TABWIDTH_VARIABLE) {
-	link = Blt_Chain_FirstLink(setPtr->chain);
-	count = 1;
-	while (link != NULL) {
-	    int i;
-
-	    for (i = 0; i < tabsPerTier; i++) {
-		tabPtr = Blt_Chain_GetValue(link);
-		if ((tabPtr->flags & HIDE) == 0) {
-		    tabPtr->tier = count;
-		    tabPtr->worldX = x;
-		    x += tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-		    if (x > maxWidth) {
-			maxWidth = x;
-		    }
-		}
-		link = Blt_Chain_NextLink(link);
-		if (link == NULL) {
-		    goto done;
-		}
-	    }
-	    count++;
-	    x = 0;
-	}
-    }
-  done:
-    /* Add to tab widths to fill out row. */
-    if (((nTabs % tabsPerTier) != 0) && 
-	(setPtr->defStyle.reqTabWidth != TABWIDTH_VARIABLE)) {
-	return;
-    }
-    startPtr = NULL;
-    count = total = 0;
-    for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	 tabPtr = NextTab(tabPtr, HIDE)) {
-	if (startPtr == NULL) {
-	    startPtr = tabPtr;
-	}
-	count++;
-	total += tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-	link = Blt_Chain_NextLink(link);
-	if (link != NULL) {
-	    nextPtr = Blt_Chain_GetValue(link);
-	    if (tabPtr->tier == nextPtr->tier) {
-		continue;
-	    }
-	}
-	total += setPtr->overlap;
-	extra = setPtr->worldWidth - total;
-	assert(count > 0);
-	if (extra > 0) {
-	    WidenTabs(setPtr, startPtr, count, extra);
-	}
-	count = total = 0;
-	startPtr = NULL;
-    }
-}
-
-/*
- *
- * tabWidth = textWidth + gap + (2 * (pad + outerBW));
- *
- * tabHeight = textHeight + 2 * (pad + outerBW) + topMargin;
- *
- */
-static void
-ComputeLayout(Tabset *setPtr)
-{
-    int width;
-    Blt_ChainLink link;
-    int x, extra;
-    int nTiers, nTabs;
-
-    setPtr->nTiers = 0;
-    setPtr->pageTop = 0;
-    setPtr->worldWidth = 1;
-    setPtr->yPad = 0;
-
-    nTabs = ComputeWorldGeometry(setPtr);
-    if (nTabs == 0) {
-	return;
-    }
-    /* Reset the pointers to the selected and starting tab. */
-    if (setPtr->selectPtr == NULL) {
-	link = Blt_Chain_FirstLink(setPtr->chain);
-	if (link != NULL) {
-	    setPtr->selectPtr = Blt_Chain_GetValue(link);
-	}
-    }
-    if (setPtr->startPtr == NULL) {
-	setPtr->startPtr = setPtr->selectPtr;
-    }
-    if (setPtr->focusPtr == NULL) {
-	setPtr->focusPtr = setPtr->selectPtr;
-	Blt_SetFocusItem(setPtr->bindTable, setPtr->focusPtr, NULL);
-    }
-
-    if (ISVERTICAL(setPtr->side)) {
-        width = Tk_Height(setPtr->tkwin) - 2 * 
-	    (setPtr->corner + setPtr->xSelectPad);
-    } else {
-        width = Tk_Width(setPtr->tkwin) - (2 * setPtr->inset) -
-		setPtr->xSelectPad - setPtr->corner;
-    }
-    setPtr->flags &= ~SCROLLABLE;
-    if (setPtr->reqTiers > 1) {
-	int total, maxWidth;
-	Tab *tabPtr;
-
-	/* Static multiple tier mode. */
-
-	/* Sum tab widths and determine the number of tiers needed. */
-	nTiers = 1;
-	total = x = 0;
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    if ((x + tabPtr->worldWidth) > width) {
-		nTiers++;
-		x = 0;
-	    }
-	    tabPtr->worldX = x;
-	    tabPtr->tier = nTiers;
-	    extra = tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-	    total += extra, x += extra;
-	}
-	maxWidth = width;
-
-	if (nTiers > setPtr->reqTiers) {
-	    Tab *tabPtr;
-	    /*
-	     * The tabs do not fit into the requested number of tiers.
-             * Go into scrolling mode.
-	     */
-	    width = ((total + setPtr->tabWidth) / setPtr->reqTiers);
-	    x = 0;
-	    nTiers = 1;
-	    for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-		 tabPtr = NextTab(tabPtr, HIDE)) {
-		tabPtr->tier = nTiers;
-		/*
-		 * Keep adding tabs to a tier until we overfill it.
-		 */
-		tabPtr->worldX = x;
-		x += tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-		if (x > width) {
-		    nTiers++;
-		    if (x > maxWidth) {
-			maxWidth = x;
-		    }
-		    x = 0;
-		}
-	    }
-	    setPtr->flags |= SCROLLABLE;
-	}
-	setPtr->worldWidth = maxWidth;
-	setPtr->nTiers = nTiers;
-
-	if (nTiers > 1) {
-	    AdjustTabSizes(setPtr, nTabs);
-	}
-	if (setPtr->flags & SCROLLABLE) {
-	    /* Do you add an offset ? */
-	    setPtr->worldWidth += (setPtr->xSelectPad + setPtr->corner);
-	} else {
-	    setPtr->worldWidth = VPORTWIDTH(setPtr);
-	}
-	setPtr->worldWidth += setPtr->overlap;
-	if (setPtr->selectPtr != NULL) {
-	    RenumberTiers(setPtr, setPtr->selectPtr);
-	}
-    } else {
-	Tab *tabPtr;
-	/*
-	 * Scrollable single tier mode.
-	 */
-	nTiers = 1;
-	x = 0;
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    tabPtr->tier = nTiers;
-	    tabPtr->worldX = x;
-	    tabPtr->worldY = 0;
-	    x += tabPtr->worldWidth + setPtr->gap - setPtr->overlap;
-	}
-	/* Subtract off the last gap. */
-	setPtr->worldWidth = x + setPtr->corner - setPtr->gap +
-	    setPtr->xSelectPad + setPtr->overlap;
-	setPtr->flags |= SCROLLABLE;
-    }
-    if (nTiers == 1) {
-	/* We only need the extra space at top of the widget for selected tab
-	 * if there's only one tier. */
-	setPtr->yPad = setPtr->ySelectPad;
-    }
-    setPtr->nTiers = nTiers;
-    setPtr->pageTop = setPtr->inset + setPtr->inset2 + setPtr->yPad +
-	(setPtr->nTiers * setPtr->tabHeight);
-
-    if (ISVERTICAL(setPtr->side)) {
-	Tab *tabPtr;
-
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    tabPtr->screenWidth = (short int)setPtr->tabHeight;
-	    tabPtr->screenHeight = (short int)tabPtr->worldWidth;
-	}
-    } else {
-	Tab *tabPtr;
-
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    tabPtr->screenWidth = (short int)tabPtr->worldWidth;
-	    tabPtr->screenHeight = (short int)setPtr->tabHeight;
-	}
-    }
-}
-
-static void
-ComputeVisibleTabs(Tabset *setPtr)
-{
-    int nVisibleTabs;
-    Tab *tabPtr;
-
-    setPtr->nVisible = 0;
-    if (Blt_Chain_GetLength(setPtr->chain) == 0) {
-	return;
-    }
-    nVisibleTabs = 0;
-    if (setPtr->flags & SCROLLABLE) {
-	int width, offset;
-	Tab *tabPtr;
-
-	/*
-	 * Scrollable (single or multiple) tier mode.
-	 */
-	offset = setPtr->scrollOffset - (setPtr->outerPad + setPtr->xSelectPad);
-	width = VPORTWIDTH(setPtr) + setPtr->scrollOffset +
-	    2 * setPtr->outerPad;
-	for (tabPtr = FirstTab(setPtr, 0); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, 0)) {
-	    if (tabPtr->flags & HIDE) {
-		tabPtr->flags &= ~ONSCREEN;
-		continue;
-	    }
-	    if ((tabPtr->worldX >= width) ||
-		((tabPtr->worldX + tabPtr->worldWidth) < offset)) {
-		tabPtr->flags &= ~ONSCREEN;
-	    } else {
-		tabPtr->flags |= ONSCREEN;
-		nVisibleTabs++;
-	    }
-	}
-    } else {
-	Tab *tabPtr;
-	/* Static multiple tier mode. */
-
-	for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	     tabPtr = NextTab(tabPtr, HIDE)) {
-	    tabPtr->flags |= ONSCREEN;
-	    nVisibleTabs++;
-	}
-    }
-    for (tabPtr = FirstTab(setPtr, HIDE); tabPtr != NULL;
-	 tabPtr = NextTab(tabPtr, HIDE)) {
-	tabPtr->screenX = tabPtr->screenY = -1000;
-	if (tabPtr->flags & ONSCREEN) {
-	    WorldToScreen(setPtr, tabPtr->worldX, tabPtr->worldY,
-		&tabPtr->screenX, &tabPtr->screenY);
-	    switch (setPtr->side) {
-	    case SIDE_RIGHT:
-		tabPtr->screenX -= setPtr->tabHeight;
-		break;
-
-	    case SIDE_BOTTOM:
-		tabPtr->screenY -= setPtr->tabHeight;
-		break;
-	    }
-	}
-    }
-    setPtr->nVisible = nVisibleTabs;
-    Blt_PickCurrentItem(setPtr->bindTable);
-}
-
-
-static void
-Draw3dFolder(Tabset *setPtr, Tab *tabPtr, Drawable drawable, int side,
-	     XPoint *points, int nPoints)
-{
-    int relief, borderWidth;
-    Blt_Background bg;
-
-    if (tabPtr == setPtr->selectPtr) {
-	bg = GETATTR(tabPtr, selBg);
-    } else if (tabPtr == setPtr->activePtr) {
-	bg = GETATTR(tabPtr, activeBg);
-    } else if (tabPtr->bg != NULL) {
-	bg = tabPtr->bg;
-    } else {
-	bg = setPtr->defStyle.bg;
-    }
-    relief = setPtr->defStyle.relief;
-    if ((side == SIDE_RIGHT) || (side == SIDE_TOP)) {
-	borderWidth = -setPtr->defStyle.borderWidth;
-	if (relief == TK_RELIEF_SUNKEN) {
-	    relief = TK_RELIEF_RAISED;
-	} else if (relief == TK_RELIEF_RAISED) {
-	    relief = TK_RELIEF_SUNKEN;
-	}
-    } else {
-	borderWidth = setPtr->defStyle.borderWidth;
-    }
-    {
-#ifdef notdef
-	int i;
-
-	GC gc;
-	int dx, dy;
-	int oldType, newType;
-	int start;
-
-	dx = points[0].x - points[1].x;
-	dy = points[0].y - points[1].y;
-	oldType = ((dy < 0) || (dx > 0));
-	start = 0;
-	for (i = 1; i < nPoints; i++) {
-	    dx = points[i - 1].x - points[i].x;
-	    dy = points[i - 1].y - points[i].y;
-	    newType = ((dy < 0) || (dx > 0));
-	    if (newType != oldType) {
-		if (oldType) {
-		    gc = Tk_GCForColor(setPtr->shadowColor, drawable);
-		}  else {
-		    gc = Blt_BackgroundBorderGC(setPtr->tkwin, bg,TK_3D_FLAT_GC);
-		}		    
-		XDrawLines(setPtr->display, drawable, gc, points + start, 
-			   i - start, CoordModeOrigin);
-		start = i - 1;
-      		oldType = newType;
-	    }
-	}
-	if (start != i) {
-	    if (oldType) {
-		gc = Tk_GCForColor(setPtr->shadowColor, drawable);
-	    }  else {
-		gc = Blt_BackgroundBorderGC(setPtr->tkwin, bg, TK_3D_FLAT_GC);
-	    }		    
-	    XDrawLines(setPtr->display, drawable, gc, points + start, 
-		       i - start, CoordModeOrigin);
-	}
-#else
-#ifdef notdef
-	/* Draw the outline of the folder. */
-	gc = Tk_GCForColor(setPtr->shadowColor, drawable);
-	XDrawLines(setPtr->display, drawable, gc, points, nPoints, 
-		   CoordModeOrigin);
-#endif
-#endif
-    }
-#ifdef notdef
-    fprintf(stderr, "tab %s relief=%s borderWidth=%d, active=%d\n", 
-	    tabPtr->name, Tk_NameOfRelief(relief), borderWidth,
-	    tabPtr == setPtr->activePtr);
-#endif
-    Blt_FillBackgroundPolygon(setPtr->tkwin, drawable, bg, points, nPoints,
-	    borderWidth, relief);
-}
-
-/*
- *   x,y
- *    |1|2|3| 4 |5|  4  |3|2|1|
- *
- *   1. tab borderwidth
- *   2. corner offset or slant
- *   3. label pad
- *   4. label or text width
- *   5. pad
- */
-static void
-DrawLabel(Tabset *setPtr, Tab *tabPtr, Drawable drawable)
-{
-    int x, y, w, h;
-    int ax, ay, bx, by;
-    int tx, ty, ix, iy, maxLength;
-    int imgWidth, imgHeight;
-    int tabWidth, tabHeight;
-    XColor *bgColor;
-    Blt_Background bg;
-    TabStyle *stylePtr;
-
-    if (!(tabPtr->flags & ONSCREEN)) {
-	return;
-    }
-    stylePtr = &setPtr->defStyle;
-    bg = GETATTR(tabPtr, bg);
-    if (tabPtr == setPtr->selectPtr) {
-	bg = GETATTR(tabPtr, selBg);
-    }
-    bgColor = Blt_BackgroundBorderColor(bg);
-    if (tabPtr == setPtr->activePtr) {
-	Blt_Background activeBg;
-
-	activeBg = GETATTR(tabPtr, activeBg);
-	bgColor = Blt_BackgroundBorderColor(activeBg);
-    }
-    ay = tabPtr->worldY + stylePtr->borderWidth + setPtr->corner;
-    by = tabPtr->worldY + tabPtr->worldHeight - stylePtr->borderWidth - 
-	setPtr->corner;
-    ax = tabPtr->worldX + stylePtr->borderWidth;
-    bx = tabPtr->worldX + tabPtr->worldWidth - stylePtr->borderWidth;
-    ax += (setPtr->flags & SLANT_LEFT)  ? tabPtr->worldHeight : setPtr->corner;
-    bx -= (setPtr->flags & SLANT_RIGHT) ? tabPtr->worldHeight : setPtr->corner;
-    WorldToScreen(setPtr, ax, ay, &ax, &ay);
-    WorldToScreen(setPtr, bx, by, &bx, &by);
-    if (ax > bx) {
-	x = ax, ax = bx, bx = x;
-    }
-    if (ay > by) {
-	y = ay, ay = by, by = y;
-    }
-    if ((setPtr->flags & FOCUS) && (setPtr->focusPtr == tabPtr)) {
-	if (ISVERTICAL(setPtr->side)) {
-	    XDrawRectangle(setPtr->display, drawable, stylePtr->activeGC,
-			   ax + setPtr->xOffset, 
-			   ay + setPtr->yOffset - setPtr->xSelectPad/2, 
-			   bx - ax,
-			   by - ay - 1 + setPtr->xSelectPad);
-	} else {
-	    XDrawRectangle(setPtr->display, drawable, stylePtr->activeGC,
-			   ax + setPtr->xOffset - setPtr->xSelectPad/2, 
-			   ay + setPtr->yOffset, 
-			   bx - ax - 1 + setPtr->xSelectPad, 
-			   by - ay);
-	}
-    }
-    ax += LABEL_PAD;
-    bx -= LABEL_PAD;
-    ay += LABEL_PAD;
-    by -= LABEL_PAD;
-    tabWidth = bx - ax;
-    tabHeight = by - ay;
-    if (tabWidth > tabPtr->labelWidth) {
-	if (setPtr->defStyle.justify == TK_JUSTIFY_CENTER) {
-	    ax += (tabWidth - tabPtr->labelWidth) / 2;
-	} else if (setPtr->defStyle.justify == TK_JUSTIFY_RIGHT) {
-	    ax += (tabWidth - tabPtr->labelWidth);
-	}
-	tabWidth = tabPtr->labelWidth;
-    }
-    if (tabHeight > tabPtr->labelHeight) {
-	int justify;
-
-	justify = (setPtr->side == SIDE_RIGHT) 
-	    ? TK_JUSTIFY_RIGHT : TK_JUSTIFY_LEFT;
-	if (setPtr->defStyle.justify == TK_JUSTIFY_CENTER) {
-	    ay += (tabHeight - tabPtr->labelHeight) / 2;
-	} else if (setPtr->defStyle.justify == justify) {
-	    ay += (tabHeight - tabPtr->labelHeight);
-	}
-	tabHeight = tabPtr->labelHeight;
-    }
-    imgWidth = imgHeight = 0;
-    if (tabPtr->imagePtr != NULL) {
-	imgWidth = ImageWidth(tabPtr->imagePtr);
-	imgHeight = ImageHeight(tabPtr->imagePtr);
-    }
-    w = bx - ax;
-    h = by - ay;
-#ifdef notdef
-    fprintf(stderr, "2. ax=%d,ay=%d bx=%d,by=%d tx=%d,ty=%d ix=%d,iy=%d textWidth=%d, textHeight=%d, imgWidth=%d, imgHeight=%d, w=%d,h=%d, labelWidth=%d,labelHeight=%d worldWidth=%d,worldHeight=%d\n", 
-	    ax, ay, bx, by, tx, ty, ix, iy, tabPtr->textWidth, 
-	    tabPtr->textHeight,
-	    imgWidth, imgHeight, w, h, tabPtr->labelWidth, tabPtr->labelHeight,
-	    tabPtr->worldWidth, tabPtr->worldHeight);
-#endif
-    switch (setPtr->defStyle.textPos) {
-    case SIDE_LEFT:
-	tx = 0;
-	ty = (tabHeight - tabPtr->textHeight) / 2;
-	ix = tabWidth - imgWidth;
-	iy = (tabHeight - imgHeight) / 2;
-	break;
-    case SIDE_RIGHT:
-	ix = 0;
-	iy = (tabHeight - imgHeight) / 2;
-	tx = tabWidth - tabPtr->textWidth;
-	ty = (tabHeight - tabPtr->textHeight) / 2;
-	break;
-    case SIDE_BOTTOM:
-	ix = (tabPtr->labelWidth - imgWidth) / 2;
-	iy = 0;
-	tx = (tabWidth - tabPtr->textWidth) / 2;
-	ty = tabHeight - tabPtr->textHeight;
-	break;
-    case SIDE_TOP:
-	tx = (tabPtr->labelWidth - tabPtr->textWidth) / 2;
-	ty = 0;
-	ix = (tabWidth - imgWidth) / 2;
-	iy = tabHeight - imgHeight;
-	break;
-    }
-
-#ifdef notdef
-    fprintf(stderr, "ax=%d,ay=%d bx=%d,by=%d tx=%d,ty=%d ix=%d,iy=%d textWidth=%d, textHeight=%d, imgWidth=%d, imgHeight=%d, w=%d,h=%d, labelWidth=%d,labelHeight=%d worldWidth=%d,worldHeight=%d\n", 
-	    ax, ay, bx, by, tx, ty, ix, iy, tabPtr->textWidth, 
-	    tabPtr->textHeight,
-	    imgWidth, imgHeight, w, h, tabPtr->labelWidth, tabPtr->labelHeight,
-	    tabPtr->worldWidth, tabPtr->worldHeight);
-#endif
-    /* FIXME: rotated text is broken. Need to consider text rotation with image
-     * width or height. */
-    maxLength = (bx - ax);
-    maxLength = 1000;
-    if (imgWidth > 0) {
-	maxLength -= imgWidth + LABEL_PAD; 
-    }
-#ifdef notdef
-    fprintf(stderr, "labelWidth=%d, labelHeight=%d, textWidth=%d, textHeight=%d, worldWidth=%d, worldHeight=%d screenWidth=%d, screenHeight=%d w=%d h=%d\n", 
-	    tabPtr->labelWidth, tabPtr->labelHeightbbb,
-	    tabPtr->textWidth, tabPtr->textHeight,
-	    tabPtr->worldWidth, tabPtr->worldHeight,
-	    tabPtr->screenWidth, tabPtr->screenHeight,
-	    w, h);
-#endif
-    tx += ax + setPtr->xOffset;
-    ty += ay + setPtr->yOffset;
-    ix += ax + setPtr->xOffset;
-    iy += ay + setPtr->yOffset;
-    if (tabPtr->imagePtr != NULL) {
-	Tk_RedrawImage(ImageBits(tabPtr->imagePtr), 0, 0, imgWidth, 
-		imgHeight, drawable, ix, iy);
-    }
-    if (tabPtr->text != NULL) {
-	TextStyle ts;
-	XColor *fgColor;
-	Blt_Font font;
-
-	font = GETATTR(tabPtr, font);
-	if (tabPtr == setPtr->selectPtr) {
-	    fgColor = GETATTR(tabPtr, selColor);
-	} else if (tabPtr == setPtr->activePtr) {
-	    fgColor = GETATTR(tabPtr, activeFgColor);
-	} else {
-	    fgColor = GETATTR(tabPtr, textColor);
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetAngle(ts, setPtr->defStyle.angle);
-	Blt_Ts_SetBackground(ts, bg);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetPadding(ts, 2, 2, 0, 0);
-	if (tabPtr->flags & DISABLED) {
-	    Blt_Ts_SetState(ts, STATE_DISABLED);
-	} else if (tabPtr->flags & ACTIVE) {
-	    Blt_Ts_SetState(ts, STATE_ACTIVE);
-	}
-	Blt_Ts_SetForeground(ts, fgColor);
-	Blt_Ts_DrawLayout(setPtr->tkwin, drawable, tabPtr->layoutPtr, &ts, 
-			  tx, ty, maxLength);
-    }
-}
-
-static void
-DrawPerforation(Tabset *setPtr, Tab *tabPtr, Drawable drawable)
-{
-    int x, y;
-    int segmentWidth, max;
-    Blt_Background bg, perfBg;
-
-    if ((tabPtr->container != NULL) || (tabPtr->tkwin == NULL)) {
-	return;
-    }
-    WorldToScreen(setPtr, tabPtr->worldX + 2, 
-	  tabPtr->worldY + tabPtr->worldHeight + 2, &x, &y);
-    x += setPtr->xOffset;
-    y += setPtr->yOffset;
-    bg = GETATTR(tabPtr, selBg);
-    segmentWidth = 3;
-    if (setPtr->flags & PERFORATION_ACTIVE) {
-	perfBg = GETATTR(tabPtr, activeBg);
-    } else {
-	perfBg = GETATTR(tabPtr, selBg);
-    }	
-    if (ISHORIZONTAL(setPtr->side)) {
-	XPoint points[2];
-
-	points[0].x = x;
-	points[0].y = points[1].y = y;
-	max = tabPtr->screenX + setPtr->xOffset + tabPtr->screenWidth - 2;
-	Blt_FillBackgroundRectangle(setPtr->tkwin, drawable, perfBg, x-2, y-4, 
-		tabPtr->screenWidth, 8, 0, TK_RELIEF_FLAT);
-	while (points[0].x < max) {
-	    points[1].x = points[0].x + segmentWidth;
-	    if (points[1].x > max) {
-		points[1].x = max;
-	    }
-	    Blt_DrawBackgroundPolygon(setPtr->tkwin, drawable, bg, points, 
-		2, 1, TK_RELIEF_RAISED);
-	    points[0].x += 2 * segmentWidth;
-	}
-    } else {
-	XPoint points[2];
-
-	points[0].x = points[1].x = x;
-	points[0].y = y;
-	max  = tabPtr->screenY + tabPtr->screenHeight - 2;
-	Blt_FillBackgroundRectangle(setPtr->tkwin, drawable, perfBg,
-	       x - 4, y - 2, 8, tabPtr->screenHeight, 0, TK_RELIEF_FLAT);
-	while (points[0].y < max) {
-	    points[1].y = points[0].y + segmentWidth;
-	    if (points[1].y > max) {
-		points[1].y = max;
-	    }
-	    Blt_DrawBackgroundPolygon(setPtr->tkwin, drawable, bg, points, 
-		2, 1, TK_RELIEF_RAISED);
-	    points[0].y += 2 * segmentWidth;
-	}
-    }
-}
-
-#define NextPoint(px, py) \
-	pointPtr->x = (px), pointPtr->y = (py), pointPtr++, nPoints++
-#define EndPoint(px, py) \
-	pointPtr->x = (px), pointPtr->y = (py), nPoints++
-
-#define BottomLeft(px, py) \
-	NextPoint((px) + setPtr->corner, (py)), \
-	NextPoint((px), (py) - setPtr->corner)
-
-#define TopLeft(px, py) \
-	NextPoint((px), (py) + setPtr->corner), \
-	NextPoint((px) + setPtr->corner, (py))
-
-#define TopRight(px, py) \
-	NextPoint((px) - setPtr->corner, (py)), \
-	NextPoint((px), (py) + setPtr->corner)
-
-#define BottomRight(px, py) \
-	NextPoint((px), (py) - setPtr->corner), \
-	NextPoint((px) - setPtr->corner, (py))
-
-/*
- * From the left edge:
- *
- *   |a|b|c|d|e| f |d|e|g|h| i |h|g|e|d|f|    j    |e|d|c|b|a|
- *
- *	a. highlight ring
- *	b. tabset 3D border
- *	c. outer gap
- *      d. page border
- *	e. page corner
- *	f. gap + select pad
- *	g. label pad x (worldX)
- *	h. internal pad x
- *	i. label width
- *	j. rest of page width
- *
- *  worldX, worldY
- *          |
- *          |
- *          * 4+ . . +5
- *          3+         +6
- *           .         .
- *           .         .
- *   1+. . .2+         +7 . . . .+8
- * 0+                              +9
- *  .                              .
- *  .                              .
- *13+                              +10
- *  12+-------------------------+11
- *
- */
-static void
-DrawFolder(Tabset *setPtr, Tab *tabPtr, Drawable drawable)
-{
-    XPoint points[16];
-    XPoint *pointPtr;
-    int width, height;
-    int left, bottom, right, top, yBot, yTop;
-    int x, y;
-    int i;
-    int nPoints;
-
-    width = VPORTWIDTH(setPtr);
-    height = VPORTHEIGHT(setPtr);
-
-    x = tabPtr->worldX;
-    y = tabPtr->worldY;
-
-    nPoints = 0;
-    pointPtr = points;
-
-    /* Remember these are all world coordinates. */
-    /*
-     * x	Left side of tab.
-     * y	Top of tab.
-     * yTop	Top of folder.
-     * yBot	Bottom of the tab.
-     * left	Left side of the folder.
-     * right	Right side of the folder.
-     * top	Top of folder.
-     * bottom	Bottom of folder.
-     */
-    left = setPtr->scrollOffset - setPtr->xSelectPad;
-    right = left + width;
-    yTop = y + tabPtr->worldHeight;
-    yBot = setPtr->pageTop - (setPtr->inset + setPtr->yPad);
-    top = yBot - setPtr->inset2 /* - 4 */;
-
-    if (setPtr->pageHeight == 0) {
-	bottom = yBot + setPtr->corner;
-    } else {
-	bottom = height - setPtr->yPad - 1;
-    }
-    if (tabPtr != setPtr->selectPtr) {
-
-	/*
-	 * Case 1: Unselected tab
-	 *
-	 * * 3+ . . +4
-	 * 2+         +5
-	 *  .         .
-	 * 1+         +6
-	 *   0+ . . +7
-	 *
-	 */
-	
-	if (setPtr->flags & SLANT_LEFT) {
-	    NextPoint(x, yBot);
-	    NextPoint(x, yTop);
-	    NextPoint(x + setPtr->tabHeight, y);
-	} else {
-	    BottomLeft(x, yBot);
-	    TopLeft(x, y);
-	}
-	x += tabPtr->worldWidth;
-	if (setPtr->flags & SLANT_RIGHT) {
-	    NextPoint(x - setPtr->tabHeight, y);
-	    NextPoint(x, yTop);
-	    NextPoint(x, yBot);
-	} else {
-	    TopRight(x, y);
-	    BottomRight(x, yBot);
-	}
-    } else if ((tabPtr->flags & ONSCREEN) == 0) {
-	/*
-	 * Case 2: Selected tab not visible in viewport.  Draw folder only.
-	 *
-	 * * 3+ . . +4
-	 * 2+         +5
-	 *  .         .
-	 * 1+         +6
-	 *   0+------+7
-	 *
-	 */
-
-	TopLeft(left, top);
-	TopRight(right, top);
-	BottomRight(right, bottom);
-	BottomLeft(left, bottom);
-    } else {
-	int flags;
-	int tabWidth;
-
-	x -= setPtr->xSelectPad;
-	y -= setPtr->yPad;
-	tabWidth = tabPtr->worldWidth + 2 * setPtr->xSelectPad;
-
-#define CLIP_NONE	0
-#define CLIP_LEFT	(1<<0)
-#define CLIP_RIGHT	(1<<1)
-	flags = 0;
-	if (x < left) {
-	    flags |= CLIP_LEFT;
-	}
-	if ((x + tabWidth) > right) {
-	    flags |= CLIP_RIGHT;
-	}
-	switch (flags) {
-	case CLIP_NONE:
-
-	    /*
-	     *  worldX, worldY
-	     *          |
-	     *          * 4+ . . +5
-	     *          3+         +6
-	     *           .         .
-	     *           .         .
-	     *   1+. . .2+---------+7 . . . .+8
-	     * 0+                              +9
-	     *  .                              .
-	     *  .                              .
-	     *  .                              .
-	     *11+ . . . . . . . . . . . . .  . +10
-	     */
-
-	    if (x < (left + setPtr->corner)) {
-		NextPoint(left, top);
-	    } else {
-		TopLeft(left, top);
-	    }
-	    if (setPtr->flags & SLANT_LEFT) {
-		NextPoint(x, yTop);
-		NextPoint(x + setPtr->tabHeight + setPtr->yPad, y);
-	    } else {
-		NextPoint(x, top);
-		TopLeft(x, y);
-	    }
-	    x += tabWidth;
-	    if (setPtr->flags & SLANT_RIGHT) {
-		NextPoint(x - setPtr->tabHeight - setPtr->yPad, y);
-		NextPoint(x, yTop);
-	    } else {
-		TopRight(x, y);
-		NextPoint(x, top);
-	    }
-	    if (x > (right - setPtr->corner)) {
-		NextPoint(right, top + setPtr->corner);
-	    } else {
-		TopRight(right, top);
-	    }
-	    NextPoint(right, bottom);
-	    NextPoint(left, bottom);
-	    break;
-
-	case CLIP_LEFT:
-
-	    /*
-	     *  worldX, worldY
-	     *          |
-	     *          * 4+ . . +5
-	     *          3+         +6
-	     *           .         .
-	     *           .         .
-	     *          2+--------+7 . . . .+8
-	     *            1+ . . . +0          +9
-	     *                     .           .
-	     *                     .           .
-	     *                     .           .
-	     *                   11+ . . . . . +10
-	     */
-
-	    NextPoint(left, yBot);
-	    if (setPtr->flags & SLANT_LEFT) {
-		NextPoint(x, yBot);
-		NextPoint(x, yTop);
-		NextPoint(x + setPtr->tabHeight + setPtr->yPad, y);
-	    } else {
-		BottomLeft(x, yBot);
-		TopLeft(x, y);
-	    }
-
-	    x += tabWidth;
-	    if (setPtr->flags & SLANT_RIGHT) {
-		NextPoint(x - setPtr->tabHeight - setPtr->yPad, y);
-		NextPoint(x, yTop);
-		NextPoint(x, top);
-	    } else {
-		TopRight(x, y);
-		NextPoint(x, top);
-	    }
-	    if (x > (right - setPtr->corner)) {
-		NextPoint(right, top + setPtr->corner);
-	    } else {
-		TopRight(right, top);
-	    }
-	    NextPoint(right, bottom);
-	    NextPoint(left, bottom);
-	    break;
-
-	case CLIP_RIGHT:
-
-	    /*
-	     *              worldX, worldY
-	     *                     |
-	     *                     * 7+ . . +8
-	     *                     6+         +9
-	     *                      .         .
-	     *                      .         .
-	     *           4+ . . . .5+---------+10
-	     *         3+          0+ . . . +11
-	     *          .           .
-	     *          .           .
-	     *          .           .
-	     *         2+ . . . . . +1
-	     */
-
-	    NextPoint(right, yBot);
-	    NextPoint(right, bottom);
-	    NextPoint(left, bottom);
-	    if (x < (left + setPtr->corner)) {
-		NextPoint(left, top);
-	    } else {
-		TopLeft(left, top);
-	    }
-	    NextPoint(x, top);
-
-	    if (setPtr->flags & SLANT_LEFT) {
-		NextPoint(x, yTop);
-		NextPoint(x + setPtr->tabHeight + setPtr->yPad, y);
-	    } else {
-		TopLeft(x, y);
-	    }
-	    x += tabWidth;
-	    if (setPtr->flags & SLANT_RIGHT) {
-		NextPoint(x - setPtr->tabHeight - setPtr->yPad, y);
-		NextPoint(x, yTop);
-		NextPoint(x, yBot);
-	    } else {
-		TopRight(x, y);
-		BottomRight(x, yBot);
-	    }
-	    break;
-
-	case (CLIP_LEFT | CLIP_RIGHT):
-
-	    /*
-	     *  worldX, worldY
-	     *     |
-	     *     * 4+ . . . . . . . . +5
-	     *     3+                     +6
-	     *      .                     .
-	     *      .                     .
-	     *     1+---------------------+7
-	     *       2+ 0+          +9 .+8
-	     *           .          .
-	     *           .          .
-	     *           .          .
-	     *         11+ . . . . .+10
-	     */
-
-	    NextPoint(left, yBot);
-	    if (setPtr->flags & SLANT_LEFT) {
-		NextPoint(x, yBot);
-		NextPoint(x, yTop);
-		NextPoint(x + setPtr->tabHeight + setPtr->yPad, y);
-	    } else {
-		BottomLeft(x, yBot);
-		TopLeft(x, y);
-	    }
-	    x += tabPtr->worldWidth;
-	    if (setPtr->flags & SLANT_RIGHT) {
-		NextPoint(x - setPtr->tabHeight - setPtr->yPad, y);
-		NextPoint(x, yTop);
-		NextPoint(x, yBot);
-	    } else {
-		TopRight(x, y);
-		BottomRight(x, yBot);
-	    }
-	    NextPoint(right, yBot);
-	    NextPoint(right, bottom);
-	    NextPoint(left, bottom);
-	    break;
-	}
-    }
-    EndPoint(points[0].x, points[0].y);
-    for (i = 0; i < nPoints; i++) {
-	WorldToScreen(setPtr, points[i].x, points[i].y, &x, &y);
-	points[i].x = x + setPtr->xOffset;
-	points[i].y = y + setPtr->yOffset;
-    }
-    Draw3dFolder(setPtr, tabPtr, drawable, setPtr->side, points, nPoints);
-    DrawLabel(setPtr, tabPtr, drawable);
-    if (tabPtr->container != NULL) {
-	XRectangle rect;
-
-	/* Draw a rectangle covering the spot representing the window  */
-	GetWindowRectangle(tabPtr, setPtr->tkwin, FALSE, &rect);
-	XFillRectangles(setPtr->display, drawable, tabPtr->backGC,
-	    &rect, 1);
-    }
-}
-
-static void
-DrawOuterBorders(Tabset *setPtr, Drawable drawable)
-{
-    /*
-     * Draw 3D border just inside of the focus highlight ring.  We draw the
-     * border even if the relief is flat so that any tabs that hang over the
-     * edge will be clipped.
-     */
-    if (setPtr->borderWidth > 0) {
-	Blt_DrawBackgroundRectangle(setPtr->tkwin, drawable, setPtr->bg,
-		setPtr->highlightWidth + setPtr->xOffset, 
-		setPtr->highlightWidth + setPtr->yOffset,
-		Tk_Width(setPtr->tkwin) - 2 * setPtr->highlightWidth,
-		Tk_Height(setPtr->tkwin) - 2 * setPtr->highlightWidth,
-		setPtr->borderWidth, setPtr->relief);
-    }
-    /* Draw focus highlight ring. */
-    if (setPtr->highlightWidth > 0) {
-	XColor *color;
-	GC gc;
-
-	color = (setPtr->flags & FOCUS)
-	    ? setPtr->highlightColor : setPtr->highlightBgColor;
-	gc = Tk_GCForColor(color, drawable);
-	Tk_DrawFocusHighlight(setPtr->tkwin, gc, setPtr->highlightWidth, 
-	      drawable);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayTabset --
- *
- * 	This procedure is invoked to display the widget.
- *
- *      Recomputes the layout of the widget if necessary. This is necessary if
- *      the world coordinate system has changed.  Sets the vertical and
- *      horizontal scrollbars.  This is done here since the window width and
- *      height are needed for the scrollbar calculations.
- *
- * Results:
- *	None.
- *
- * Side effects:
- * 	The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayTabset(ClientData clientData)	/* Information about widget. */
-{
-    Tabset *setPtr = clientData;
-    Pixmap pixmap;
-    int width, height;
-    int tabsOnly;
-    
-    tabsOnly = setPtr->flags & TABS_ONLY;
-    setPtr->flags &= ~(REDRAW_PENDING | TABS_ONLY);
-    if (setPtr->tkwin == NULL) {
-	return;				/* Window has been destroyed. */
-    }
-    if (setPtr->flags & LAYOUT_PENDING) {
-	ComputeLayout(setPtr);
-	setPtr->flags &= ~LAYOUT_PENDING;
-    }
-    if ((setPtr->reqHeight == 0) || (setPtr->reqWidth == 0)) {
-	width = height = 0;
-	if (ISVERTICAL(setPtr->side)) {
-	    height = setPtr->worldWidth;
-	} else {
-	    width = setPtr->worldWidth;
-	}
-	if (setPtr->reqWidth > 0) {
-	    width = setPtr->reqWidth;
-	} else if (setPtr->pageWidth > 0) {
-	    width = setPtr->pageWidth;
-	}
-	if (setPtr->reqHeight > 0) {
-	    height = setPtr->reqHeight;
-	} else if (setPtr->pageHeight > 0) {
-	    height = setPtr->pageHeight;
-	}
-	if (ISVERTICAL(setPtr->side)) {
-	    width += setPtr->pageTop + setPtr->inset + setPtr->inset2;
-	    height += setPtr->inset + setPtr->inset2;
-	} else {
-	    height += setPtr->pageTop + setPtr->inset + setPtr->inset2;
-	    width += setPtr->inset + setPtr->inset2;
-	}
-	if ((Tk_ReqWidth(setPtr->tkwin) != width) ||
-	    (Tk_ReqHeight(setPtr->tkwin) != height)) {
-	    Tk_GeometryRequest(setPtr->tkwin, width, height);
-	}
-    }
-    if (setPtr->flags & SCROLL_PENDING) {
-	width = VPORTWIDTH(setPtr);
-	setPtr->scrollOffset = Blt_AdjustViewport(setPtr->scrollOffset,
-		setPtr->worldWidth, width, setPtr->scrollUnits, 
-		BLT_SCROLL_MODE_HIERBOX);
-	if (setPtr->scrollCmdObjPtr != NULL) {
-	    Blt_UpdateScrollbar(setPtr->interp, setPtr->scrollCmdObjPtr,
-		setPtr->scrollOffset, setPtr->scrollOffset + width,
-		setPtr->worldWidth);
-	}
-	ComputeVisibleTabs(setPtr);
-	setPtr->flags &= ~SCROLL_PENDING;
-    }
-    if (!Tk_IsMapped(setPtr->tkwin)) {
-	return;
-    }
-    width = Tk_Width(setPtr->tkwin);
-    height = Tk_Height(setPtr->tkwin);
-    setPtr->xOffset = setPtr->yOffset = 0;  /* Offset of the window origin
-					     * from the pixmap created
-					     * below. */
-    if (tabsOnly) {
-	/* Create a pixmap only the size of the tab region. This saves the X
-	 * server from rendering the entire folder background polygon each
-	 * time. This is good for scrolling and active tabs. */
-	switch (setPtr->side) {
-	case SIDE_TOP:
-	    height = setPtr->pageTop; 
-	    break;
-	case SIDE_BOTTOM:
-	    setPtr->yOffset = setPtr->pageTop - height;
-	    height = setPtr->pageTop;
-	    break;
-	case SIDE_LEFT:
-	    width = setPtr->pageTop;
-	    break;
-	case SIDE_RIGHT:
-	    setPtr->xOffset = setPtr->pageTop - width;
-	    width = setPtr->pageTop;
-	    break;
-	}
-    }
-    pixmap = Tk_GetPixmap(setPtr->display, Tk_WindowId(setPtr->tkwin),
-	width, height, Tk_Depth(setPtr->tkwin));
-    /*
-     * Clear the background either by tiling a pixmap or filling with a solid
-     * color. Tiling takes precedence.
-     */
-    Blt_FillBackgroundRectangle(setPtr->tkwin, pixmap, setPtr->bg, 
-	setPtr->xOffset, setPtr->yOffset, 
-	Tk_Width(setPtr->tkwin), Tk_Height(setPtr->tkwin), 
-	0, TK_RELIEF_FLAT);
-
-    if (setPtr->nVisible > 0) {
-	int i;
-	Tab *tabPtr;
-	Blt_ChainLink link;
-
-	link = setPtr->startPtr->link;
-	for (i = 0; i < Blt_Chain_GetLength(setPtr->chain); i++) {
-	    link = Blt_Chain_PrevLink(link);
-	    if (link == NULL) {
-		link = Blt_Chain_LastLink(setPtr->chain);
-	    }
-	    tabPtr = Blt_Chain_GetValue(link);
-	    if ((tabPtr != setPtr->selectPtr) &&
-		(tabPtr->flags & ONSCREEN)) {
-		DrawFolder(setPtr, tabPtr, pixmap);
-	    }
-	}
-	DrawFolder(setPtr, setPtr->selectPtr, pixmap);
-	if (setPtr->flags & TEAROFF) {
-	    DrawPerforation(setPtr, setPtr->selectPtr, pixmap);
-	}
-
-	if ((setPtr->selectPtr->tkwin != NULL) &&
-	    (setPtr->selectPtr->container == NULL)) {
-	    XRectangle rect;
-
-	    GetWindowRectangle(setPtr->selectPtr, setPtr->tkwin, FALSE, &rect);
-	    ArrangeWindow(setPtr->selectPtr->tkwin, &rect, 0);
-	}
-    }
-    DrawOuterBorders(setPtr, pixmap);
-    XCopyArea(setPtr->display, pixmap, Tk_WindowId(setPtr->tkwin),
-	setPtr->highlightGC, 0, 0, width, height, -setPtr->xOffset, 
-	      -setPtr->yOffset);
-    Tk_FreePixmap(setPtr->display, pixmap);
-}
-
-/*
- * From the left edge:
- *
- *   |a|b|c|d|e| f |d|e|g|h| i |h|g|e|d|f|    j    |e|d|c|b|a|
- *
- *	a. highlight ring
- *	b. tabset 3D border
- *	c. outer gap
- *      d. page border
- *	e. page corner
- *	f. gap + select pad
- *	g. label pad x (worldX)
- *	h. internal pad x
- *	i. label width
- *	j. rest of page width
- *
- *  worldX, worldY
- *          |
- *          |
- *          * 4+ . . +5
- *          3+         +6
- *           .         .
- *           .         .
- *   1+. . .2+         +7 . . . .+8
- * 0+                              +9
- *  .                              .
- *  .                              .
- *  .                              .
- *11+------------------------------+10
- *
- */
-static void
-DisplayTearoff(ClientData clientData)
-{
-    Tabset *setPtr;
-    Tab *tabPtr;
-    Drawable drawable;
-    XPoint points[16];
-    XPoint *pointPtr;
-    int width, height;
-    int left, bottom, right, top;
-    int x, y;
-    int nPoints;
-    Tk_Window tkwin;
-    Tk_Window parent;
-    XRectangle rect;
-
-    tabPtr = clientData;
-    if (tabPtr == NULL) {
-	return;
-    }
-    tabPtr->flags &= ~TEAROFF_REDRAW;
-    setPtr = tabPtr->setPtr;
-    if (setPtr->tkwin == NULL) {
-	return;
-    }
-    tkwin = tabPtr->container;
-    drawable = Tk_WindowId(tkwin);
-
-    Blt_FillBackgroundRectangle(tkwin, drawable, setPtr->bg, 0, 0, 
-	Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT);
-
-    width = Tk_Width(tkwin) - 2 * setPtr->inset;
-    height = Tk_Height(tkwin) - 2 * setPtr->inset;
-    x = setPtr->inset + setPtr->gap + setPtr->corner;
-    y = setPtr->inset;
-
-    left = setPtr->inset;
-    right = setPtr->inset + width;
-    top = setPtr->inset + setPtr->corner + setPtr->xSelectPad;
-    bottom = setPtr->inset + height;
-
-    /*
-     *  worldX, worldY
-     *          |
-     *          * 4+ . . +5
-     *          3+         +6
-     *           .         .
-     *           .         .
-     *   1+. . .2+         +7 . . . .+8
-     * 0+                              +9
-     *  .                              .
-     *  .                              .
-     *  .                              .
-     *11+------------------------------+10
-     */
-
-    nPoints = 0;
-    pointPtr = points;
-
-    TopLeft(left, top);
-    NextPoint(x, top);
-    TopLeft(x, y);
-    x += tabPtr->worldWidth;
-    TopRight(x, y);
-    NextPoint(x, top);
-    TopRight(right, top);
-    NextPoint(right, bottom);
-    NextPoint(left, bottom);
-    EndPoint(points[0].x, points[0].y);
-    Draw3dFolder(setPtr, tabPtr, drawable, SIDE_TOP, points, nPoints);
-
-    parent = (tabPtr->container == NULL) ? setPtr->tkwin : tabPtr->container;
-    GetWindowRectangle(tabPtr, parent, TRUE, &rect);
-    ArrangeWindow(tabPtr->tkwin, &rect, TRUE);
-
-    /* Draw 3D border. */
-    if ((setPtr->borderWidth > 0) && (setPtr->relief != TK_RELIEF_FLAT)) {
-	Blt_DrawBackgroundRectangle(tkwin, drawable, setPtr->bg, 0, 0,
-	    Tk_Width(tkwin), Tk_Height(tkwin), setPtr->borderWidth,
-	    setPtr->relief);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabsetCmd --
- *
- * 	This procedure is invoked to process the "tabset" command.  See the
- * 	user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tabsetOps[] =
-{
-    {"activate",    1, ActivateOp,    3, 3, "tab",},
-    {"bind",        2, BindOp,	      2, 5, "tab ?sequence command?",},
-    {"button",      2, ButtonOp,      2, 0, "args",},
-    {"cget",        2, CgetOp,	      3, 3, "option",},
-    {"configure",   2, ConfigureOp,   2, 0, "?option value?...",},
-    {"delete",      2, DeleteOp,      2, 0, "?tab...?",},
-    {"dockall",     2, DockallOp,     2, 2, "" }, 
-    {"extents",     1, ExtentsOp,     3, 3, "tab",},
-    {"focus",       1, FocusOp,	      3, 3, "tab",},
-    {"highlight",   1, ActivateOp,    3, 3, "tab",},
-    {"id",          2, IdOp,	      3, 3, "tab",},
-    {"index",       3, IndexOp,	      3, 5, "tab",},
-    {"insert",      3, InsertOp,      3, 0, "position ?option value?",},
-    {"invoke",      3, InvokeOp,      3, 3, "tab",},
-    {"move",        1, MoveOp,	      5, 5, "tab after|before tab",},
-    {"names",       2, NamesOp,       2, 0, "?pattern...?",},
-    {"nearest",     2, NearestOp,     4, 4, "x y",},
-    {"perforation", 1, PerforationOp, 2, 0, "args",},
-    {"scan",        2, ScanOp,	      5, 5, "dragto|mark x y",},
-    {"see",         3, SeeOp,	      3, 3, "tab",},
-    {"select",      3, SelectOp,      3, 3, "tab",},
-    {"size",        2, SizeOp,	      2, 2, "",},
-    {"tab",         2, TabOp,	      2, 0, "oper args",},
-    {"tag",         2, TagOp,	      2, 0, "oper args",},
-    {"tearoff",     2, TearoffOp,     3, 4, "tab ?parent?",},
-    {"view",        1, ViewOp,	      2, 5, 
-	"?moveto fract? ?scroll number what?",},
-};
-
-static int nTabsetOps = sizeof(tabsetOps) / sizeof(Blt_OpSpec);
-
-static int
-TabsetInstCmd(
-    ClientData clientData,		/* Information about the widget. */
-    Tcl_Interp *interp,			/* Interpreter to report errors. */
-    int objc,				/* # of arguments. */
-    Tcl_Obj *const *objv)		/* Vector of argument strings. */
-{
-    TabsetCmdProc *proc;
-    Tabset *setPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTabsetOps, tabsetOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(setPtr);
-    result = (*proc) (setPtr, interp, objc, objv);
-    Tcl_Release(setPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabsetInstDeletedCmd --
- *
- *	This procedure can be called if the window was destroyed (tkwin will
- *	be NULL) and the command was deleted automatically.  In this case, we
- *	need to do nothing.
- *
- *	Otherwise this routine was called because the command was deleted.
- *	Then we need to clean-up and destroy the widget.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TabsetInstDeletedCmd(ClientData clientData)
-{
-    Tabset *setPtr = clientData;
-
-    if (setPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = setPtr->tkwin;
-	setPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TabsetCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds
- * 	to a widget managed by this module. See the user documentation for
- * 	details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	See the user documentation.
- *
- *
- *	blt::tabset pathName ?option value?...
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-TabsetCmd(
-    ClientData clientData,	/* Main window associated with interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Tabset *setPtr;
-    Tk_Window tkwin;
-    unsigned int mask;
-    Tcl_CmdInfo cmdInfo;
-    const char *pathName;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " pathName ?option value?...\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    pathName = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), pathName,
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    setPtr = NewTabset(interp, tkwin);
-    if (ConfigureTabset(interp, setPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(setPtr->tkwin);
-	return TCL_ERROR;
-    }
-    if (ConfigureButton(interp, setPtr, 0, NULL, 0) != TCL_OK) {
-	Tk_DestroyWindow(setPtr->tkwin);
-	return TCL_ERROR;
-    }
-    mask = (ExposureMask | StructureNotifyMask | FocusChangeMask);
-    Tk_CreateEventHandler(tkwin, mask, TabsetEventProc, setPtr);
-    setPtr->cmdToken = Tcl_CreateObjCommand(interp, pathName, TabsetInstCmd, 
-	setPtr, TabsetInstDeletedCmd);
-	
-    /*
-     * Try to invoke a procedure to initialize various bindings on tabs.
-     * Source the file containing the procedure now if the procedure isn't
-     * currently defined.  We deferred this to now so that the user could set
-     * the variable "blt_library" within the script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::Tabset::Init", &cmdInfo)) {
-	static char initCmd[] = 
-	    "source [file join $blt_library tabset.tcl]";
- 
-	if (Tcl_GlobalEval(interp, initCmd) != TCL_OK) {
-	    char info[200];
-
-	    sprintf_s(info, 200, "\n    (while loading bindings for %s)", 
-		Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    Tk_DestroyWindow(setPtr->tkwin);
-	    return TCL_ERROR;
-	}
-    }
-    if (Tcl_VarEval(interp, "::blt::Tabset::Init ", 
-		Tk_PathName(setPtr->tkwin), (char *)NULL) != TCL_OK) {
-	Tk_DestroyWindow(setPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), pathName, -1);
-    return TCL_OK;
-}
-
-int
-Blt_TabsetCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[2] = { 
-	{ "tabset", TabsetCmd, },
-	{ "tabnotebook", TabsetCmd, },
-    };
-    return Blt_InitCmds(interp, "::blt", cmdSpecs, 2);
-}
-
-#endif /* NO_TABSET */
diff --git a/blt3.0/src/bltTed.c b/blt3.0/src/bltTed.c
deleted file mode 100644
index 879bfad..0000000
--- a/blt3.0/src/bltTed.c
+++ /dev/null
@@ -1,1826 +0,0 @@
-
-/*
- * bltTed.c --
- *
- * This module implements an editor for the table geometry manager in the BLT
- * toolkit.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include "bltSwitch.h"
-#include "bltTable.h"
-#include "bltFont.h"
-#include "bltText.h"
-
-typedef struct _TableEditor TableEditor;
-
-#define TABLE_THREAD_KEY	"BLT Table Data"
-
-typedef struct {
-    Blt_HashTable tableTable;	/* Hash table of table structures keyed by 
-				 * the address of the reference Tk window */
-} TableData;
-
-
-typedef struct {
-    int flags;
-    Tcl_Interp *interp;
-    Tk_Window tkwin;		/* Entry window */
-    TableEntry *tePtr;		/* Entry it represents */
-    Table *tablePtr;		/* Table where it can be found */
-    TableEditor *tedPtr;		/* Table editor */
-    int mapped;			/* Indicates if the debugging windows are
-				 * mapped */
-} EntryRep;
-
-
-typedef struct {
-    Blt_Font font;
-    XColor *widgetColor;
-    XColor *cntlColor;
-    XColor *normalFg, *normalBg;
-    XColor *activeFg, *activeBg;
-
-    Tk_Cursor cursor;		/* Cursor to display inside of this window */
-    Pixmap stipple;
-
-    GC drawGC;			/* GC to draw grid, outlines */
-    GC fillGC;			/* GC to fill entry area */
-    GC widgetFillGC;		/* GC to fill widget area */
-    GC cntlGC;			/* GC to fill rectangles */
-
-} EntryAttributes;
-
-typedef struct {
-    int count;
-    XRectangle *array;
-} Rectangles;
-
-struct _TableEditor {
-    int gridLineWidth;		/* Width of grid lines */
-    int buttonHeight;		/* Height of row/column buttons */
-    int cavityPad;		/* Extra padding to add to entry cavity */
-    int min;			/* Minimum size for partitions */
-
-    EditorDrawProc *drawProc;
-    EditorDestroyProc *destroyProc;
-
-    Display *display;
-    Blt_Font font;
-    Table *tablePtr;		/* Pointer to table being debugged */
-    Tcl_Interp *interp;
-    int flags;
-    Tk_Window tkwin;		/* Grid window */
-    Tk_Window input;		/* InputOnly window to receive events */
-    int inputIsSibling;
-
-    /* Form the grid */
-    XSegment *segArr;
-    int nSegs;
-    XRectangle *padRectArr;
-    int nPadRects;
-    XRectangle *widgetPadRectArr;
-    int nWidgetPadRects;
-
-    XRectangle *cntlRectArr;
-    int nCntlRects;
-
-    XRectangle *rects;
-    int nRects;
-
-    XRectangle activeRectArr[5];
-    int spanActive;
-
-    GC rectGC;			/* GC to fill rectangles */
-    GC drawGC;			/* GC to draw grid, outlines */
-    GC fillGC;			/* GC to fill window */
-    GC spanGC;			/* GC to fill spans */
-    GC padRectGC;		/* GC to draw padding  */
-
-    Tk_3DBorder border;		/* Border to use with buttons */
-    int relief;
-    int borderWidth;		/* Border width of buttons */
-    XColor *normalBg;
-    XColor *padColor;
-    XColor *gridColor;
-    XColor *buttonColor;
-    XColor *spanColor;
-
-    Pixmap padStipple;
-    Pixmap spanStipple;
-    Blt_Dashes dashes;
-    char *fileName;		/* If non-NULL, indicates name of file
-				 * to write final table output to */
-    int mapped;			/* Indicates if the debugging windows are
-				 * mapped */
-    int gripSize;
-    int doubleBuffer;
-    Tk_Cursor cursor;
-    Blt_Chain chain;
-    int nextWindowId;
-
-    EntryAttributes attributes;	/* Entry attributes */
-};
-
-#define REDRAW_PENDING	(1<<0)	/* A DoWhenIdle handler has already
-				 * been queued to redraw the window */
-#define LAYOUT_PENDING	(1<<1)
-
-/*  
- * 
- *
- *	|Cavity|1|2|
- *
- *
- */
-#define DEF_ENTRY_ACTIVE_BG_MONO	RGB_BLACK
-#define DEF_ENTRY_ACTIVE_FG_MONO	RGB_WHITE
-#define DEF_ENTRY_ACTIVE_BACKGROUND	RGB_BLACK
-#define DEF_ENTRY_ACTIVE_FOREGROUND	RGB_WHITE
-#define DEF_ENTRY_CURSOR		(char *)NULL
-#define DEF_ENTRY_FONT			"Helvetica 10 Bold"
-#define DEF_ENTRY_NORMAL_BACKGROUND	RGB_BLUE
-#define DEF_ENTRY_NORMAL_BG_MONO	RGB_BLACK
-#define DEF_ENTRY_NORMAL_FOREGROUND	RGB_WHITE
-#define DEF_ENTRY_NORMAL_FG_MONO	RGB_WHITE
-#define DEF_ENTRY_WIDGET_BACKGROUND	RGB_GREEN
-#define DEF_ENTRY_CONTROL_BACKGROUND	RGB_YELLOW
-#define DEF_ENTRY_WIDGET_BG_MONO	RGB_BLACK
-#define DEF_ENTRY_STIPPLE		"gray50"
-#define DEF_GRID_BACKGROUND		RGB_WHITE
-#define DEF_GRID_BG_MONO		RGB_WHITE
-#define DEF_GRID_CURSOR			"crosshair"
-#define DEF_GRID_DASHES			(char *)NULL
-#define DEF_GRID_FOREGROUND		RGB_BLACK
-#define DEF_GRID_FG_MONO		RGB_BLACK
-#define DEF_GRID_FONT			"Helvetica 10 Bold"
-#define DEF_GRID_LINE_WIDTH		"1"
-#define DEF_GRID_PAD_COLOR		RGB_RED
-#define DEF_GRID_PAD_MONO		RGB_BLACK
-#define DEF_GRID_PAD_STIPPLE		"gray25"
-#define DEF_GRID_PAD_CAVITY		"0"
-#define DEF_GRID_PAD_MIN		"8"
-#define DEF_ROWCOL_BACKGROUND		RGB_RED
-#define DEF_ROWCOL_BG_MONO		RGB_BLACK
-#define DEF_ROWCOL_BORDER_COLOR		RGB_RED
-#define DEF_ROWCOL_BORDER_MONO		RGB_BLACK
-#define DEF_ROWCOL_BORDERWIDTH		"2"
-#define DEF_ROWCOL_HEIGHT		"8"
-#define DEF_ROWCOL_RELIEF		"raised"
-#define DEF_SPAN_STIPPLE		"gray50"
-#define DEF_SPAN_COLOR			RGB_BLACK
-#define DEF_SPAN_MONO			RGB_BLACK
-#define DEF_SPAN_GRIP_SIZE		"5"
-#define DEF_GRID_DOUBLE_BUFFER		"1"
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-bg", "tedBorder", (char *)NULL,
-	DEF_ROWCOL_BORDER_COLOR, Blt_Offset(TableEditor, border), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BORDER, "-bg", "tedBorder", (char *)NULL,
-	DEF_ROWCOL_BORDER_MONO, Blt_Offset(TableEditor, border), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-background", "tedBackground", (char *)NULL,
-	DEF_GRID_BACKGROUND, Blt_Offset(TableEditor, normalBg), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-background", "tedBackground", (char *)NULL,
-	DEF_GRID_BG_MONO, Blt_Offset(TableEditor, normalBg), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", (char *)NULL,
-	DEF_GRID_CURSOR, Blt_Offset(TableEditor, cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-gridcolor", "gridColor", (char *)NULL,
-	DEF_GRID_FOREGROUND, Blt_Offset(TableEditor, gridColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-gridcolor", "gridColor", (char *)NULL,
-	DEF_GRID_FG_MONO, Blt_Offset(TableEditor, gridColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-buttoncolor", "buttonColor", (char *)NULL,
-	DEF_ROWCOL_BACKGROUND, Blt_Offset(TableEditor, buttonColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-buttoncolor", "buttonColor", (char *)NULL,
-	DEF_ROWCOL_BG_MONO, Blt_Offset(TableEditor, buttonColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-padcolor", "padColor", (char *)NULL,
-	DEF_GRID_PAD_COLOR, Blt_Offset(TableEditor, padColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-padcolor", "padColor", (char *)NULL,
-	DEF_GRID_PAD_MONO, Blt_Offset(TableEditor, padColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_BITMAP, "-padstipple", "padStipple", (char *)NULL,
-	DEF_GRID_PAD_STIPPLE, Blt_Offset(TableEditor, padStipple), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FONT, "-font", "font", (char *)NULL,
-	DEF_GRID_FONT, Blt_Offset(TableEditor, font), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-gridlinewidth", "gridLineWidth", (char *)NULL,
-	DEF_GRID_LINE_WIDTH, Blt_Offset(TableEditor, gridLineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-buttonheight", "buttonHeight", (char *)NULL,
-	DEF_ROWCOL_HEIGHT, Blt_Offset(TableEditor, buttonHeight),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-cavitypad", "cavityPad", (char *)NULL,
-	DEF_GRID_PAD_CAVITY, Blt_Offset(TableEditor, cavityPad),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-minsize", "minSize", (char *)NULL,
-	DEF_GRID_PAD_MIN, Blt_Offset(TableEditor, min), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", (char *)NULL,
-	DEF_GRID_DASHES, Blt_Offset(TableEditor, dashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", (char *)NULL,
-	DEF_ROWCOL_RELIEF, Blt_Offset(TableEditor, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", (char *)NULL,
-	DEF_ROWCOL_BORDERWIDTH, Blt_Offset(TableEditor, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CURSOR, "-entrycursor", "entryCursor", (char *)NULL,
-	DEF_ENTRY_CURSOR, Blt_Offset(TableEditor, attributes.cursor),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_FONT, "-entryfont", "entryFont", (char *)NULL,
-	DEF_ENTRY_FONT, Blt_Offset(TableEditor, attributes.font), 0},
-    {BLT_CONFIG_BITMAP, "-entrystipple", "entryStipple", (char *)NULL,
-	DEF_ENTRY_STIPPLE, Blt_Offset(TableEditor, attributes.stipple),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-widgetbackground", "widgetBackground", (char *)NULL,
-	DEF_ENTRY_WIDGET_BACKGROUND, Blt_Offset(TableEditor, attributes.widgetColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-widgetbackground", "widgetBackground", (char *)NULL,
-	DEF_ENTRY_WIDGET_BG_MONO, Blt_Offset(TableEditor, attributes.widgetColor),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-controlbackground", "controlBackground", (char *)NULL,
-	DEF_ENTRY_CONTROL_BACKGROUND, Blt_Offset(TableEditor, attributes.cntlColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-controlbackground", "controlBackground", (char *)NULL,
-	DEF_ENTRY_WIDGET_BG_MONO, Blt_Offset(TableEditor, attributes.cntlColor),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-entrybackground", "entryBackground", (char *)NULL,
-	DEF_ENTRY_NORMAL_BACKGROUND, Blt_Offset(TableEditor, attributes.normalBg),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-entrybackground", "entryBackground", (char *)NULL,
-	DEF_ENTRY_NORMAL_BG_MONO, Blt_Offset(TableEditor, attributes.normalBg),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-entryactivebackground", "entryActiveBackground", (char *)NULL,
-	DEF_ENTRY_ACTIVE_BACKGROUND, Blt_Offset(TableEditor, attributes.activeBg),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-entryactivebackground", "entryActiveBackground", (char *)NULL,
-	DEF_ENTRY_ACTIVE_BG_MONO, Blt_Offset(TableEditor, attributes.activeBg),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-entryactiveforeground", "entryActiveForeground", (char *)NULL,
-	DEF_ENTRY_ACTIVE_FOREGROUND, Blt_Offset(TableEditor, attributes.activeFg),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-entryactiveforeground", "entryActiveForeground", (char *)NULL,
-	DEF_ENTRY_ACTIVE_FG_MONO, Blt_Offset(TableEditor, attributes.activeFg),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-entryforeground", "entryForeground", (char *)NULL,
-	DEF_ENTRY_NORMAL_FOREGROUND, Blt_Offset(TableEditor, attributes.normalFg),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-entryforeground", "entryForeground", (char *)NULL,
-	DEF_ENTRY_NORMAL_FG_MONO, Blt_Offset(TableEditor, attributes.normalFg),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-spancolor", "spanColor", (char *)NULL,
-	DEF_SPAN_COLOR, Blt_Offset(TableEditor, spanColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-spancolor", "spanColor", (char *)NULL,
-	DEF_SPAN_MONO, Blt_Offset(TableEditor, spanColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_BITMAP, "-spanstipple", "spanStipple", (char *)NULL,
-	DEF_SPAN_STIPPLE, Blt_Offset(TableEditor, spanStipple), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-gripsize", "gripSize", (char *)NULL,
-	DEF_SPAN_GRIP_SIZE, Blt_Offset(TableEditor, gripSize),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-dbl", "doubleBuffer", (char *)NULL,
-	DEF_GRID_DOUBLE_BUFFER, Blt_Offset(TableEditor, doubleBuffer),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-
-
-static Tcl_FreeProc DestroyEditor;
-static Tcl_FreeProc DestroyEntry;
-static Tcl_FreeProc DestroyTableEditor;
-static Tcl_IdleProc DisplayEntry;
-static Tcl_IdleProc DisplayTableEditor;
-static Tcl_ObjCmdProc TedCmd;
-static Tk_EventProc EntryEventProc;
-static Tk_EventProc TableEditorEventProc;
-
-static void DrawEditor(Editor *editor);
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the text window at the next idle
- *	point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.  This doesn't
- *	seem to hurt performance noticeably, but if it does then this
- *	could be changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(TableEditor *tedPtr)
-{
-    if ((tedPtr->tkwin != NULL) && !(tedPtr->flags & REDRAW_PENDING)) {
-	tedPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayTableEditor, tedPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the text window at the next idle
- *	point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.  This doesn't
- *	seem to hurt performance noticeably, but if it does then this
- *	could be changed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedrawEntry(EntryRep *repPtr)
-{
-    if ((repPtr->tkwin != NULL) && !(repPtr->flags & REDRAW_PENDING)) {
-	repPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayEntry, repPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on the editing grid for the table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EntryEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    EntryRep *repPtr = (EntryRep *)clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedrawEntry(repPtr);
-    } else if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedrawEntry(repPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	repPtr->tkwin = NULL;
-	if (repPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayEntry, repPtr);
-	}
-	Tcl_EventuallyFree(repPtr, DestroyEntry);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TableEditorEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on the editing grid for the table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TableEditorEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    TableEditor *tedPtr = (TableEditor *) clientData;
-
-    if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(tedPtr);
-    } else if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(tedPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	tedPtr->tkwin = NULL;
-	if (tedPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayTableEditor, tedPtr);
-	}
-	Tcl_EventuallyFree(tedPtr, DestroyTableEditor);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateGrid --
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateGrid(TableEditor *tedPtr)
-{
-    Tcl_Interp *interp;
-    Tk_Window tkwin;
-    Tk_Window master;
-    /*
-     * Create a sibling window to cover the master window. It will
-     * be stacked just above the master window.
-     */
-    interp = tedPtr->tablePtr->interp;
-    master = tedPtr->tablePtr->tkwin;
-    tkwin = Tk_CreateWindow(interp, master, "ted_%output%", (char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    Tk_SetClass(tkwin, "BltTableEditor");
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	TableEditorEventProc, tedPtr);
-    Tk_MoveResizeWindow(tkwin, 0, 0, Tk_Width(master), Tk_Height(master));
-    Tk_RestackWindow(tkwin, Below, (Tk_Window)NULL);
-    Tk_MapWindow(tkwin);
-    tedPtr->tkwin = tkwin;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEventWindow --
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateEventWindow(TableEditor *tedPtr)
-{
-    Tcl_Interp *interp;
-    Tk_Window tkwin;
-    Tk_Window master;
-    Tk_Window parent;
-
-    interp = tedPtr->tablePtr->interp;
-    master = tedPtr->tablePtr->tkwin;
-    /*
-     * Create an InputOnly window which sits above the table to
-     * collect and dispatch user events.
-     */
-    if (Tk_IsTopLevel(master)) {
-	/*
-	 * If master is a top-level window, it's also the parent of
-	 * the widgets (it can't have a sibling).
-	 * In this case, the InputOnly window is a child of the
-	 * master instead of a sibling.
-	 */
-	parent = master;
-	tkwin = Tk_CreateWindow(interp, parent, "ted_%input%", (char *)NULL);
-	if (tkwin != NULL) {
-	    Tk_ResizeWindow(tkwin, Tk_Width(parent), Tk_Height(parent));
-	}
-	tedPtr->inputIsSibling = 0;
-    } else {
-	char *namePtr;		/* Name of InputOnly window. */
-
-	parent = Tk_Parent(master);
-	namePtr = Blt_AssertMalloc(strlen(Tk_Name(master)) + 5);
-	sprintf_s(namePtr, strlen(Tk_Name(master)) + 5, "ted_%s", 
-		 Tk_Name(master));
-	tkwin = Tk_CreateWindow(interp, parent, namePtr, (char *)NULL);
-	Blt_Free(namePtr);
-	if (tkwin != NULL) {
-	    Tk_MoveResizeWindow(tkwin, Tk_X(master), Tk_Y(master),
-		Tk_Width(master), Tk_Height(master));
-	}
-	tedPtr->inputIsSibling = 1;
-    }
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    Blt_MakeTransparentWindowExist(tkwin, Tk_WindowId(parent), TRUE);
-    Tk_RestackWindow(tkwin, Above, (Tk_Window)NULL);
-    Tk_MapWindow(tkwin);
-    tedPtr->input = tkwin;
-    return TCL_OK;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * CreateEntry --
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateEntry(TableEditor *tedPtr, TableEntry *tePtr)
-{
-    Tk_Window tkwin, master;
-    char string[200];
-    EntryRep *repPtr;
-
-    repPtr = Blt_AssertCalloc(1, sizeof(EntryRep));
-    repPtr->tablePtr = tedPtr->tablePtr;
-    repPtr->tedPtr = tedPtr;
-    repPtr->interp = tedPtr->interp;
-    repPtr->tePtr = tePtr;
-    repPtr->mapped = 0;
-
-    /*
-     * Create a sibling window to cover the master window. It will
-     * be stacked just above the master window.
-     */
-
-    master = tedPtr->tablePtr->tkwin;
-    sprintf_s(string, 200, "bltTableEditor%d", tedPtr->nextWindowId);
-    tedPtr->nextWindowId++;
-    tkwin = Tk_CreateWindow(tedPtr->interp, master, string, (char *)NULL);
-    if (tkwin == NULL) {
-	Blt_Free(repPtr);
-	return TCL_ERROR;
-    }
-    Tk_SetClass(tkwin, "BltTableEditor");
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	EntryEventProc, repPtr);
-    repPtr->tkwin = tkwin;
-    Blt_Chain_Append(tedPtr->chain, repPtr);
-    return TCL_OK;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyEntry --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyEntry(DestroyData data)
-{
-    EntryRep *repPtr = (EntryRep *)data;
-    Blt_ChainLink link;
-    TableEntry *tePtr;
-
-    for (link = Blt_Chain_FirstLink(repPtr->tedPtr->chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	tePtr = Blt_Chain_GetValue(link);
-	if (tePtr == repPtr->tePtr) {
-	    Blt_Chain_DeleteLink(repPtr->tedPtr->chain, link);
-	    Blt_Free(repPtr);
-	    return;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayEntry --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayEntry(ClientData clientData)
-{
-    EntryRep *repPtr = (EntryRep *) clientData;
-    TableEditor *tedPtr;
-    TableEntry *tePtr;
-    Tk_Window tkwin;
-    int x, y, width, height;
-
-    repPtr->flags &= ~REDRAW_PENDING;
-    if ((repPtr->tkwin == NULL) || (repPtr->tePtr == NULL)) {
-	return;
-    }
-    if (!Tk_IsMapped(repPtr->tkwin)) {
-	return;
-    }
-    tedPtr = repPtr->tedPtr;
-    tePtr = repPtr->tePtr;
-    tkwin = repPtr->tkwin;
-
-    /*
-     * Check if the entry size and position.
-     * Move and resize the window accordingly.
-     */
-    x = Tk_X(tePtr->tkwin) - (tePtr->padLeft + tedPtr->cavityPad);
-    y = Tk_Y(tePtr->tkwin) - (tePtr->padTop + tedPtr->cavityPad);
-    width = Tk_Width(tePtr->tkwin) + PADDING(tePtr->xPad) +
-	(2 * tedPtr->cavityPad);
-    height = Tk_Height(tePtr->tkwin) + PADDING(tePtr->yPad) +
-	(2 * tedPtr->cavityPad);
-
-
-    if ((Tk_X(tkwin) != x) || (Tk_Y(tkwin) != y) || 
-	(Tk_Width(tkwin) != width) || (Tk_Height(tkwin) != height)) {
-	Tk_MoveResizeWindow(tkwin, x, y, width, height);
-	Tk_RestackWindow(tkwin, Above, (Tk_Window)NULL);
-    }
-    /* Clear the background of the entry */
-
-    XFillRectangle(Tk_Display(tkwin), Tk_WindowId(tkwin),
-	tedPtr->attributes.fillGC, 0, 0, width, height);
-
-    /* Draw the window */
-
-    x = tePtr->padLeft + tedPtr->cavityPad;
-    y = tePtr->padTop + tedPtr->cavityPad;
-
-    XFillRectangle(Tk_Display(tkwin), Tk_WindowId(tkwin),
-	tedPtr->attributes.widgetFillGC, x, y, Tk_Width(tePtr->tkwin),
-	Tk_Height(tePtr->tkwin));
-    XDrawRectangle(Tk_Display(tkwin), Tk_WindowId(tkwin),
-	tedPtr->attributes.drawGC, x, y, Tk_Width(tePtr->tkwin),
-	Tk_Height(tePtr->tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindEditor --
- *
- *	Searches for a table associated with the window given by its
- *	pathname.  This window represents the master window of the table.
- *
- *	Errors may occur because
- *	  1) pathName does not represent a valid Tk window or
- *	  2) the window is not associated with any table as its master.
- *
- * Results:
- *	If a table entry exists, a pointer to the Table structure is
- *	returned. Otherwise NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static TableEditor *
-FindEditor(ClientData clientData, Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Table *tablePtr;
-
-    if (Blt_GetTableFromObj(clientData, interp, objPtr, &tablePtr) != TCL_OK) {
-	return NULL;
-    }
-    if (tablePtr->editPtr == NULL) {
-	Tcl_AppendResult(interp, "no editor exists for table \"",
-	    Tk_PathName(tablePtr->tkwin), "\"", (char *)NULL);
-	return NULL;
-    }
-    return (TableEditor *) tablePtr->editPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTableEditor --
- *
- *---------------------------------------------------------------------------
- */
-static TableEditor *
-CreateTableEditor(Table *tablePtr, Tcl_Interp *interp)
-{
-    TableEditor *tedPtr;
-
-    tedPtr = Blt_AssertCalloc(1, sizeof(TableEditor));
-    tedPtr->nextWindowId = 0;
-    tedPtr->interp = interp;
-    tedPtr->tablePtr = tablePtr;
-    tedPtr->gridLineWidth = 1;
-    tedPtr->buttonHeight = 0;
-    tedPtr->cavityPad = 0;
-    tedPtr->min = 3;
-    tedPtr->gripSize = 5;
-    tedPtr->drawProc = DrawEditor;
-    tedPtr->destroyProc = DestroyEditor;
-    tedPtr->display = Tk_Display(tablePtr->tkwin);
-    tedPtr->relief = TK_RELIEF_RAISED;
-    tedPtr->borderWidth = 2;
-    tedPtr->doubleBuffer = 1;
-    tedPtr->chain = Blt_Chain_Create();
-    /* Create the grid window */
-
-    if (CreateGrid(tedPtr) != TCL_OK) {
-	return NULL;
-    }
-    /* Create an InputOnly window to collect user events */
-    if (CreateEventWindow(tedPtr) != TCL_OK) {
-	return NULL;
-    }
-    tablePtr->editPtr = (Editor *)tedPtr;
-    return tedPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTableEditor --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTableEditor(DestroyData freeProcData)
-{
-    TableEditor *tedPtr = (TableEditor *) freeProcData;
-
-    if (tedPtr->rects != NULL) {
-	Blt_Free(tedPtr->rects);
-    }
-    if (tedPtr->segArr != NULL) {
-	Blt_Free(tedPtr->segArr);
-    }
-    if (tedPtr->fillGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->fillGC);
-    }
-    if (tedPtr->drawGC != NULL) {
-	Blt_FreePrivateGC(tedPtr->display, tedPtr->drawGC);
-    }
-    if (tedPtr->rectGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->rectGC);
-    }
-    if (tedPtr->padRectGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->padRectGC);
-    }
-    /* Is this save ? */
-    tedPtr->tablePtr->editPtr = NULL;
-    Blt_Free(tedPtr);
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureTableEditor --
- *
- *	This procedure is called to process an objv/objc list in order to
- *	configure the table geometry manager.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Table configuration options (padx, pady, rows, columns, etc) get
- *	set.   The table is recalculated and arranged at the next idle
- *	point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureTableEditor(TableEditor *tedPtr, int objc, Tcl_Obj *const *objv,
-		     int flags)
-{
-    XGCValues gcValues;
-    GC newGC;
-    unsigned long gcMask;
-
-    if (Blt_ConfigureWidgetFromObj(tedPtr->interp, tedPtr->tkwin, configSpecs,
-	    objc, objv, (char *)tedPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* GC for filling background of edit window */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->normalBg->pixel;
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->fillGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->fillGC);
-    }
-    tedPtr->fillGC = newGC;
-
-    /* GC for drawing grid lines */
-
-    gcMask = (GCForeground | GCBackground | GCLineWidth | GCLineStyle |
-	GCCapStyle | GCJoinStyle | GCFont);
-    gcValues.font = Blt_FontId(tedPtr->font);
-    gcValues.foreground = tedPtr->gridColor->pixel;
-    gcValues.background = tedPtr->normalBg->pixel;
-    gcValues.line_width = LineWidth(tedPtr->gridLineWidth);
-    gcValues.cap_style = CapRound;
-    gcValues.join_style = JoinRound;
-    gcValues.line_style = LineSolid;
-    if (LineIsDashed(tedPtr->dashes)) {
-	gcValues.line_style = LineOnOffDash;
-    }
-    newGC = Blt_GetPrivateGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->drawGC != NULL) {
-	Blt_FreePrivateGC(tedPtr->display, tedPtr->drawGC);
-    }
-    if (LineIsDashed(tedPtr->dashes)) {
-	XSetDashes(tedPtr->display, newGC, 0, 
-		   (const char *)tedPtr->dashes.values,
-		   strlen((char *)tedPtr->dashes.values));
-    }
-    tedPtr->drawGC = newGC;
-
-    /* GC for button rectangles */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->buttonColor->pixel;
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->rectGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->rectGC);
-    }
-    tedPtr->rectGC = newGC;
-
-    /* GC for button rectangles */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->padColor->pixel;
-    if (tedPtr->padStipple != None) {
-	gcMask |= GCStipple | GCFillStyle;
-	gcValues.stipple = tedPtr->padStipple;
-	gcValues.fill_style = FillStippled;
-    }
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->padRectGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->padRectGC);
-    }
-    tedPtr->padRectGC = newGC;
-
-    /* GC for filling entrys */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->attributes.normalBg->pixel;
-    if (tedPtr->attributes.stipple != None) {
-	gcMask |= GCStipple | GCFillStyle;
-	gcValues.stipple = tedPtr->attributes.stipple;
-	gcValues.fill_style = FillStippled;
-    }
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->attributes.fillGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->attributes.fillGC);
-    }
-    tedPtr->attributes.fillGC = newGC;
-
-    /* GC for drawing entrys */
-
-    gcMask = GCForeground | GCBackground | GCFont;
-    gcValues.foreground = tedPtr->attributes.normalFg->pixel;
-    gcValues.background = tedPtr->attributes.normalBg->pixel;
-    gcValues.font = Blt_FontId(tedPtr->attributes.font);
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->attributes.drawGC != NULL) {
-	Blt_FreePrivateGC(tedPtr->display, tedPtr->attributes.drawGC);
-    }
-    tedPtr->attributes.drawGC = newGC;
-
-    /* GC for filling widget rectangles */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->attributes.widgetColor->pixel;
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->attributes.widgetFillGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->attributes.widgetFillGC);
-    }
-    tedPtr->attributes.widgetFillGC = newGC;
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->attributes.cntlColor->pixel;
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->attributes.cntlGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->attributes.cntlGC);
-    }
-    tedPtr->attributes.cntlGC = newGC;
-
-    /* GC for filling span rectangle */
-
-    gcMask = GCForeground;
-    gcValues.foreground = tedPtr->spanColor->pixel;
-    if (tedPtr->spanStipple != None) {
-	gcMask |= GCStipple | GCFillStyle;
-	gcValues.stipple = tedPtr->spanStipple;
-	gcValues.fill_style = FillStippled;
-    }
-    newGC = Tk_GetGC(tedPtr->tkwin, gcMask, &gcValues);
-    if (tedPtr->spanGC != NULL) {
-	Tk_FreeGC(tedPtr->display, tedPtr->spanGC);
-    }
-    tedPtr->spanGC = newGC;
-
-    /* Define cursor for grid events */
-    if (tedPtr->cursor != None) {
-	Tk_DefineCursor(tedPtr->input, tedPtr->cursor);
-    } else {
-	Tk_UndefineCursor(tedPtr->input);
-    }
-    return TCL_OK;
-}
-
-
-static void
-LayoutGrid(TableEditor *tedPtr)
-{
-    int needed;
-    XSegment *segArr;
-    Table *tablePtr;
-    Blt_ChainLink link;
-    RowColumn *rcPtr;
-    int startX, endX;
-    int startY, endY;
-    int count;
-
-    tablePtr = tedPtr->tablePtr;
-    if (tedPtr->segArr != NULL) {
-	Blt_Free(tedPtr->segArr);
-	tedPtr->segArr = NULL;
-    }
-    tedPtr->nSegs = 0;
-    if ((tablePtr->nRows == 0) || (tablePtr->nColumns == 0)) {
-	return;
-    }
-    needed = tablePtr->nRows + tablePtr->nColumns + 2;
-    segArr = Blt_Calloc(needed, sizeof(XSegment));
-    if (segArr == NULL) {
-	return;
-    }
-    link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    startX = rcPtr->offset - tedPtr->gridLineWidth;
-
-    link = Blt_Chain_LastLink(tablePtr->cols.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    endX = rcPtr->offset + rcPtr->size - 1;
-
-    link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    startY = rcPtr->offset - tedPtr->gridLineWidth;
-
-    link = Blt_Chain_LastLink(tablePtr->rows.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    endY = rcPtr->offset + rcPtr->size - 1;
-
-    count = 0;			/* Reset segment counter */
-
-    for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	segArr[count].x1 = startX;
-	segArr[count].x2 = endX;
-	segArr[count].y1 = segArr[count].y2 = rcPtr->offset - 
-	    tedPtr->gridLineWidth;
-	count++;
-    }
-    segArr[count].x1 = startX;
-    segArr[count].x2 = endX;
-    segArr[count].y1 = segArr[count].y2 = endY;
-    count++;
-
-    for (link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	segArr[count].y1 = startY;
-	segArr[count].y2 = endY;
-	segArr[count].x1 = segArr[count].x2 = rcPtr->offset - 
-	    tedPtr->gridLineWidth;
-	count++;
-    }
-    segArr[count].x1 = segArr[count].x2 = endX;
-    segArr[count].y1 = startY;
-    segArr[count].y2 = endY;
-    count++;
-    assert(count == needed);
-    if (tedPtr->segArr != NULL) {
-	Blt_Free(tedPtr->segArr);
-    }
-    tedPtr->segArr = segArr;
-    tedPtr->nSegs = count;
-}
-
-
-static void
-LayoutPads(TableEditor *tedPtr)
-{
-    int needed;
-    XRectangle *rects, *rectPtr;
-    Table *tablePtr;
-    Blt_ChainLink link;
-    RowColumn *rcPtr;
-    int startX, endX;
-    int startY, endY;
-    int count;
-
-    tablePtr = tedPtr->tablePtr;
-    if (tedPtr->padRectArr != NULL) {
-	Blt_Free(tedPtr->padRectArr);
-	tedPtr->padRectArr = NULL;
-    }
-    tedPtr->nPadRects = 0;
-    if ((tablePtr->nRows == 0) || (tablePtr->nColumns == 0)) {
-	return;
-    }
-    needed = 2 * (tablePtr->nRows + tablePtr->nColumns);
-    rects = Blt_Calloc(needed, sizeof(XRectangle));
-    if (rects == NULL) {
-	return;
-    }
-    link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    startX = rcPtr->offset;
-
-    link = Blt_Chain_LastLink(tablePtr->cols.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    endX = (rcPtr->offset + rcPtr->size);
-
-    link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    startY = rcPtr->offset;
-
-    link = Blt_Chain_LastLink(tablePtr->rows.chain);
-    rcPtr = Blt_Chain_GetValue(link);
-    endY = (rcPtr->offset + rcPtr->size);
-
-    count = 0;			/* Reset segment counter */
-    rectPtr = rects;
-    for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	if (rcPtr->pad.side1 > 0) {
-	    rectPtr->x = startX;
-	    rectPtr->y = rcPtr->offset;
-	    rectPtr->height = rcPtr->pad.side1;
-	    rectPtr->width = endX - startX - 1;
-	    rectPtr++, count++;
-	}
-	if (rcPtr->pad.side2 > 0) {
-	    rectPtr->x = startX;
-	    rectPtr->y = rcPtr->offset + rcPtr->size - rcPtr->pad.side2 - 1;
-	    rectPtr->height = rcPtr->pad.side2;
-	    rectPtr->width = endX - startX - 1;
-	    rectPtr++, count++;
-	}
-    }
-    for (link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	if (rcPtr->pad.side1 > 0) {
-	    rectPtr->x = rcPtr->offset;
-	    rectPtr->y = startY;
-	    rectPtr->height = endY - startY - 1;
-	    rectPtr->width = rcPtr->pad.side1;
-	    rectPtr++, count++;
-	}
-	if (rcPtr->pad.side2 > 0) {
-	    rectPtr->x = rcPtr->offset + rcPtr->size - rcPtr->pad.side2;
-	    rectPtr->y = startY;
-	    rectPtr->height = endY - startY - 1;
-	    rectPtr->width = rcPtr->pad.side2;
-	    rectPtr++, count++;
-	}
-    }
-    if (count == 0) {
-	Blt_Free(rects);
-	return;
-    }
-    tedPtr->padRectArr = rects;
-    tedPtr->nPadRects = count;
-}
-
-static void
-LayoutEntries(TableEditor *tedPtr)
-{
-    TableEntry *tePtr;
-    XRectangle *rects;
-    int needed;
-    int count;
-    Blt_ChainLink link;
-
-    if (tedPtr->widgetPadRectArr != NULL) {
-	Blt_Free(tedPtr->widgetPadRectArr);
-	tedPtr->widgetPadRectArr = NULL;
-    }
-    tedPtr->nWidgetPadRects = 0;
-
-    needed = Blt_Chain_GetLength(tedPtr->tablePtr->chain);
-    rects = Blt_Calloc(needed, sizeof(XRectangle));
-    if (rects == NULL) {
-	return;
-    }
-    /* Draw any entry windows */
-    count = 0;
-    for (link = Blt_Chain_FirstLink(tedPtr->tablePtr->chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	tePtr = Blt_Chain_GetValue(link);
-	if ((PADDING(tePtr->xPad) + PADDING(tePtr->yPad)) == 0) {
-	    continue;
-	}
-	rects[count].x = Tk_X(tePtr->tkwin) - tePtr->padLeft;
-	rects[count].y = Tk_Y(tePtr->tkwin) - tePtr->padTop;
-	rects[count].width = Tk_Width(tePtr->tkwin) +
-	    PADDING(tePtr->xPad);
-	rects[count].height = Tk_Height(tePtr->tkwin) +
-	    PADDING(tePtr->yPad);
-	count++;
-    }
-    if (count == 0) {
-	Blt_Free(rects);
-	return;
-    }
-    tedPtr->widgetPadRectArr = rects;
-    tedPtr->nWidgetPadRects = count;
-}
-
-static void
-LayoutControlEntries(TableEditor *tedPtr)
-{
-    TableEntry *tePtr;
-    XRectangle *rects;
-    int needed;
-    int count;
-    Table *tablePtr = tedPtr->tablePtr;
-    Blt_ChainLink link;
-    RowColumn *rcPtr;
-
-    if (tedPtr->cntlRectArr != NULL) {
-	Blt_Free(tedPtr->cntlRectArr);
-	tedPtr->cntlRectArr = NULL;
-    }
-    tedPtr->nCntlRects = 0;
-
-    needed = (tablePtr->nRows + tablePtr->nColumns);
-    rects = Blt_Calloc(needed, sizeof(XRectangle));
-    if (rects == NULL) {
-	return;
-    }
-    /* Draw any entry windows */
-    count = 0;
-    for (link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	tePtr = rcPtr->control;
-	if (tePtr != NULL) {
-	    rects[count].x = Tk_X(tePtr->tkwin) - tePtr->padLeft;
-	    rects[count].y = Tk_Y(tePtr->tkwin) - tePtr->padTop;
-	    rects[count].width = Tk_Width(tePtr->tkwin) +
-		PADDING(tePtr->xPad);
-	    rects[count].height = Tk_Height(tePtr->tkwin) +
-		PADDING(tePtr->yPad);
-	    count++;
-	}
-    }
-    for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	tePtr = rcPtr->control;
-	if (tePtr != NULL) {
-	    rects[count].x = Tk_X(tePtr->tkwin) - tePtr->padLeft;
-	    rects[count].y = Tk_Y(tePtr->tkwin) - tePtr->padTop;
-	    rects[count].width = Tk_Width(tePtr->tkwin) +
-		PADDING(tePtr->xPad);
-	    rects[count].height = Tk_Height(tePtr->tkwin) +
-		PADDING(tePtr->yPad);
-	    count++;
-	}
-    }
-    if (count == 0) {
-	Blt_Free(rects);
-	return;
-    }
-    tedPtr->cntlRectArr = rects;
-    tedPtr->nCntlRects = count;
-}
-
-static void
-LayoutButtons(TableEditor *tedPtr)
-{
-    int needed;
-    XRectangle *rects;
-    Table *tablePtr;
-    Blt_ChainLink link;
-    RowColumn *rcPtr;
-    int count;
-
-    tablePtr = tedPtr->tablePtr;
-    if ((tablePtr->nRows == 0) || (tablePtr->nColumns == 0)) {
-	if (tedPtr->rects != NULL) {
-	    Blt_Free(tedPtr->rects);
-	}
-	tedPtr->rects = NULL;
-	tedPtr->nRects = 0;
-	return;			/* Nothing to display, empty table */
-    }
-    needed = 2 * (tablePtr->nRows + tablePtr->nColumns);
-    rects = Blt_Calloc(needed, sizeof(XRectangle));
-    if (rects == NULL) {
-	return;			/* Can't allocate rectangles */
-    }
-    count = 0;
-    for (link = Blt_Chain_FirstLink(tablePtr->rows.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	rects[count].x = 0;
-	rects[count].y = rcPtr->offset - rcPtr->pad.side1;
-	rects[count].width = tedPtr->buttonHeight;
-	rects[count].height = rcPtr->size - 2;
-	count++;
-	rects[count].x = Tk_Width(tedPtr->tkwin) - tedPtr->buttonHeight;
-	rects[count].y = rcPtr->offset - rcPtr->pad.side1;
-	rects[count].width = tedPtr->buttonHeight;
-	rects[count].height = rcPtr->size - 2;
-	count++;
-    }
-    for (link = Blt_Chain_FirstLink(tablePtr->cols.chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	rcPtr = Blt_Chain_GetValue(link);
-	rects[count].x = rcPtr->offset - rcPtr->pad.side1;
-	rects[count].y = 0;
-	rects[count].width = rcPtr->size - 2;
-	rects[count].height = tedPtr->buttonHeight;
-	count++;
-	rects[count].x = rcPtr->offset - rcPtr->pad.side1;
-	rects[count].y = Tk_Height(tedPtr->tkwin) - tedPtr->buttonHeight;
-	rects[count].width = rcPtr->size - 2;
-	rects[count].height = tedPtr->buttonHeight;
-	count++;
-    }
-    assert(count == needed);
-    if (tedPtr->rects != NULL) {
-	Blt_Free(tedPtr->rects);
-    }
-    tedPtr->rects = rects;
-    tedPtr->nRects = count;
-}
-
-
-static void
-DisplayTableEditor(ClientData clientData)
-{
-    TableEditor *tedPtr = (TableEditor *) clientData;
-    Tk_Window master;
-    Tk_Window tkwin;
-    Blt_ChainLink link;
-    EntryRep *repPtr;
-    Drawable drawable;
-    Pixmap pixmap;
-
-#ifdef notdef
-    fprintf(stderr, "display grid\n");
-#endif
-    tedPtr->flags &= ~REDRAW_PENDING;
-    if (!Tk_IsMapped(tedPtr->tkwin)) {
-	return;
-    }
-    /*
-     * Check if the master window has changed size and resize the
-     * grid and input windows accordingly.
-     */
-    master = tedPtr->tablePtr->tkwin;
-    if ((Tk_Width(master) != Tk_Width(tedPtr->tkwin)) ||
-	(Tk_Height(master) != Tk_Height(tedPtr->tkwin))) {
-#ifdef notdef
-	fprintf(stderr, "resizing windows\n");
-#endif
-	Tk_ResizeWindow(tedPtr->tkwin, Tk_Width(master), Tk_Height(master));
-	Tk_ResizeWindow(tedPtr->input, Tk_Width(master), Tk_Height(master));
-	if (tedPtr->inputIsSibling) {
-	    Tk_MoveWindow(tedPtr->input, Tk_X(master), Tk_X(master));
-	}
-	tedPtr->flags |= LAYOUT_PENDING;
-    }
-    if (tedPtr->flags & LAYOUT_PENDING) {
-#ifdef notdef
-	fprintf(stderr, "layout of grid\n");
-#endif
-	LayoutPads(tedPtr);
-	LayoutEntries(tedPtr);
-	LayoutControlEntries(tedPtr);
-	LayoutGrid(tedPtr);
-	LayoutButtons(tedPtr);
-	tedPtr->flags &= ~LAYOUT_PENDING;
-    }
-    tkwin = tedPtr->tkwin;
-
-    pixmap = None;		/* Suppress compiler warning. */
-    drawable = Tk_WindowId(tkwin);
-    if (tedPtr->doubleBuffer) {
-	/* Create an off-screen pixmap for semi-smooth scrolling. */
-	pixmap = Tk_GetPixmap(tedPtr->display, Tk_WindowId(tkwin),
-	    Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-	drawable = pixmap;
-    }
-    /* Clear the background of the grid */
-
-    XFillRectangle(Tk_Display(tkwin), drawable, tedPtr->fillGC, 0, 0,
-	Tk_Width(tkwin), Tk_Height(tkwin));
-
-    /* Draw the row and column buttons */
-
-    if (tedPtr->nRects > 0) {
-	int i;
-
-	for (i = 0; i < tedPtr->nRects; i++) {
-	    Blt_Fill3DRectangle(tkwin, drawable, tedPtr->border,
-		tedPtr->rects[i].x, tedPtr->rects[i].y,
-		tedPtr->rects[i].width, tedPtr->rects[i].height,
-		tedPtr->borderWidth, tedPtr->relief);
-	}
-#ifdef notdef
-	XFillRectangles(tedPtr->display, drawable, tedPtr->rectGC,
-	    tedPtr->rects, tedPtr->nRects);
-	XDrawRectangles(tedPtr->display, drawable, tedPtr->drawGC,
-	    tedPtr->rects, tedPtr->nRects);
-#endif
-    }
-    if (tedPtr->nPadRects > 0) {
-	XFillRectangles(tedPtr->display, drawable, tedPtr->padRectGC,
-	    tedPtr->padRectArr, tedPtr->nPadRects);
-    }
-    if (tedPtr->spanActive) {
-	XFillRectangles(tedPtr->display, drawable, tedPtr->spanGC,
-	    tedPtr->activeRectArr, 1);
-	XFillRectangles(tedPtr->display, drawable, tedPtr->drawGC,
-	    tedPtr->activeRectArr + 1, 4);
-    }
-    if (tedPtr->nWidgetPadRects > 0) {
-	XFillRectangles(tedPtr->display, drawable, tedPtr->attributes.fillGC,
-	    tedPtr->widgetPadRectArr, tedPtr->nWidgetPadRects);
-    }
-    if (tedPtr->nCntlRects > 0) {
-	XFillRectangles(tedPtr->display, drawable, tedPtr->attributes.cntlGC,
-	    tedPtr->cntlRectArr, tedPtr->nCntlRects);
-    }
-    /* Draw the grid lines */
-    if (tedPtr->nSegs > 0) {
-	XDrawSegments(tedPtr->display, drawable, tedPtr->drawGC,
-	    tedPtr->segArr, tedPtr->nSegs);
-    }
-#ifndef notdef
-    /* Draw any entry windows */
-    for (link = Blt_Chain_FirstLink(tedPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	repPtr = Blt_Chain_GetValue(link);
-	if (repPtr->mapped) {
-	    DisplayEntry(repPtr);
-	}
-    }
-#endif
-    if (tedPtr->doubleBuffer) {
-	XCopyArea(tedPtr->display, drawable, Tk_WindowId(tkwin), tedPtr->fillGC,
-	    0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, 0);
-	Tk_FreePixmap(tedPtr->display, pixmap);
-    }
-}
-
-
-static void
-DrawEditor(Editor *editPtr)
-{
-    TableEditor *tedPtr = (TableEditor *) editPtr;
-
-    tedPtr->flags |= LAYOUT_PENDING;
-    if ((tedPtr->tkwin != NULL) && !(tedPtr->flags & REDRAW_PENDING)) {
-	tedPtr->flags |= REDRAW_PENDING;
-#ifdef notdef
-	fprintf(stderr, "from draw editor\n");
-#endif
-	Tcl_DoWhenIdle(DisplayTableEditor, tedPtr);
-    }
-}
-
-static void
-DestroyEditor(DestroyData destroyData)
-{
-    TableEditor *tedPtr = (TableEditor *) destroyData;
-
-    tedPtr->tkwin = NULL;
-    if (tedPtr->flags & REDRAW_PENDING) {
-	Tcl_CancelIdleCall(DisplayTableEditor, tedPtr);
-    }
-    Tcl_EventuallyFree(tedPtr, DestroyTableEditor);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EditOp --
- *
- *	Processes an objv/objc list of table entries to add and configure
- *	new widgets into the table.  A table entry consists of the
- *	window path name, table index, and optional configuration options.
- *	The first argument in the objv list is the name of the table.  If
- *	no table exists for the given window, a new one is created.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side Effects:
- *	Memory is allocated, a new master table is possibly created, etc.
- *	The table is re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EditOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return list of names to */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    TableEditor *tedPtr;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tablePtr->editPtr != NULL) {	/* Already editing this table */
-	tedPtr = (TableEditor *) tablePtr->editPtr;
-    } else {
-	tedPtr = CreateTableEditor(tablePtr, interp);
-	if (tedPtr == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (ConfigureTableEditor(tedPtr, objc - 3, objv + 3, 0) != TCL_OK) {
-	tedPtr->tkwin = NULL;
-	if (tedPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayTableEditor, tedPtr);
-	}
-	Tcl_EventuallyFree(tedPtr, DestroyTableEditor);
-	return TCL_ERROR;
-    }
-    /* Rearrange the table */
-    if (!(tablePtr->flags & ARRANGE_PENDING)) {
-	tablePtr->flags |= ARRANGE_PENDING;
-	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(tedPtr->tkwin), -1);
-    tedPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(tedPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetCmd --
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to report results back to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Option-value pairs */
-{
-    TableEditor *tedPtr;
-
-    tedPtr = FindEditor(dataPtr, interp, objv[2]);
-    if (tedPtr == NULL) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, tedPtr->tkwin, configSpecs,
-	    (char *)tedPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureCmd --
- *
- *	This procedure is called to process an objv/objc list in order to
- *	configure the table geometry manager.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Table configuration options (padx, pady, rows, columns, etc) get
- *	set.   The table is recalculated and arranged at the next idle
- *	point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to report results back to */
-    int objc,
-    Tcl_Obj *const *objv)		/* Option-value pairs */
-{
-    TableEditor *tedPtr;
-
-    tedPtr = FindEditor(dataPtr, interp, objv[2]);
-    if (tedPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, tedPtr->tkwin, configSpecs,
-		(char *)tedPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, tedPtr->tkwin, configSpecs,
-		(char *)tedPtr, objv[3], 0);
-    }
-    if (ConfigureTableEditor(tedPtr, objc - 3, objv + 3, BLT_CONFIG_OBJV_ONLY) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    EventuallyRedraw(tedPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return list of names to */
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Table *tablePtr;
-    TableEditor *tedPtr;
-    TableEntry *tePtr;
-    int active;
-    int x, y, width, height;
-    int ix, iy;
-    Blt_ChainLink link;
-    Tk_Window tkwin;
-
-    /* ted select master @x,y */
-    tkwin = dataPtr->tkMain;
-    tedPtr = FindEditor(dataPtr, interp, objv[2]);
-    if (tedPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Blt_GetXY(interp, tkwin, Tcl_GetString(objv[3]), &ix, &iy) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tablePtr = tedPtr->tablePtr;
-    active = 0;
-    for (link = Blt_Chain_FirstLink(tablePtr->chain);
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	tePtr = Blt_Chain_GetValue(link);
-	x = tePtr->x - tePtr->xPad.side1;
-	y = tePtr->y - tePtr->yPad.side1;
-	width = Tk_Width(tePtr->tkwin) + PADDING(tePtr->xPad);
-	height = Tk_Height(tePtr->tkwin) + PADDING(tePtr->yPad);
-	if ((ix >= x) && (ix <= (x + width)) &&
-	    (iy >= y) && (iy <= (y + height))) {
-	    int left, right, top, bottom;
-	    int last;
-	    int grip;
-	    RowColumn *rcPtr;
-
-	    last = tePtr->column.rcPtr->index + tePtr->column.span - 1;
-	    link = Blt_Chain_GetNthLink(tablePtr->cols.chain, last);
-	    rcPtr = Blt_Chain_GetValue(link);
-
-	    /* Calculate the span rectangle */
-	    left = (tePtr->column.rcPtr->offset -
-		tePtr->column.rcPtr->pad.side1);
-	    right = (rcPtr->offset - rcPtr->pad.side1) + rcPtr->size;
-
-	    top = (tePtr->row.rcPtr->offset -
-		tePtr->row.rcPtr->pad.side1);
-
-	    last = tePtr->row.rcPtr->index + tePtr->row.span - 1;
-	    link = Blt_Chain_GetNthLink(tablePtr->rows.chain, last);
-	    rcPtr = Blt_Chain_GetValue(link);
-	    bottom = (rcPtr->offset - rcPtr->pad.side1) + rcPtr->size;
-
-	    tedPtr->activeRectArr[0].x = left;
-	    tedPtr->activeRectArr[0].y = top;
-	    tedPtr->activeRectArr[0].width = (right - left);
-	    tedPtr->activeRectArr[0].height = (bottom - top);
-
-	    grip = tedPtr->gripSize;
-	    tedPtr->activeRectArr[1].x = (left + right - grip) / 2;
-	    tedPtr->activeRectArr[1].y = top;
-	    tedPtr->activeRectArr[1].width = grip - 1;
-	    tedPtr->activeRectArr[1].height = grip - 1;
-
-	    tedPtr->activeRectArr[2].x = left;
-	    tedPtr->activeRectArr[2].y = (top + bottom - grip) / 2;
-	    tedPtr->activeRectArr[2].width = grip - 1;
-	    tedPtr->activeRectArr[2].height = grip - 1;
-
-	    tedPtr->activeRectArr[3].x = (left + right - grip) / 2;
-	    tedPtr->activeRectArr[3].y = bottom - grip;
-	    tedPtr->activeRectArr[3].width = grip - 1;
-	    tedPtr->activeRectArr[3].height = grip - 1;
-
-	    tedPtr->activeRectArr[4].x = right - grip;
-	    tedPtr->activeRectArr[4].y = (top + bottom - grip) / 2;
-	    tedPtr->activeRectArr[4].width = grip - 1;
-	    tedPtr->activeRectArr[4].height = grip - 1;
-
-	    interp->result = Tk_PathName(tePtr->tkwin);
-	    active = 1;
-	    break;
-	}
-    }
-    if ((active) || (active != tedPtr->spanActive)) {
-	tedPtr->spanActive = active;
-	EventuallyRedraw(tedPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EditOp --
- *
- *	Processes an objv/objc list of table entries to add and configure
- *	new widgets into the table.  A table entry consists of the
- *	window path name, table index, and optional configuration options.
- *	The first argument in the objv list is the name of the table.  If
- *	no table exists for the given window, a new one is created.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred, TCL_ERROR is
- *	returned and an error message is left in interp->result.
- *
- * Side Effects:
- *	Memory is allocated, a new master table is possibly created, etc.
- *	The table is re-computed and arranged at the next idle point.
- *
- *---------------------------------------------------------------------------
- */
-static int
-RepOp(
-    TableInterpData *dataPtr,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Interpreter to return list of names to */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const *objv)
-{
-    Tk_Window tkwin;
-    Table *tablePtr;
-    TableEditor *tedPtr;
-
-    if (Blt_GetTableFromObj(dataPtr, interp, objv[2], &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* ted rep master index */
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[3]), dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    if (tablePtr->editPtr != NULL) {	/* Already editing this table */
-	tedPtr = (TableEditor *) tablePtr->editPtr;
-    } else {
-	tedPtr = CreateTableEditor(tablePtr, interp);
-	if (tedPtr == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if (ConfigureTableEditor(tedPtr, objc - 3, objv + 3, 0) != TCL_OK) {
-	tedPtr->tkwin = NULL;
-	if (tedPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayTableEditor, tedPtr);
-	}
-	Tcl_EventuallyFree(tedPtr, DestroyTableEditor);
-	return TCL_ERROR;
-    }
-    /* Rearrange the table */
-    if (!(tablePtr->flags & ARRANGE_PENDING)) {
-	tablePtr->flags |= ARRANGE_PENDING;
-	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(tedPtr->tkwin), -1);
-    tedPtr->flags |= LAYOUT_PENDING;
-    EventuallyRedraw(tedPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Command options for the table editor.
- *
- * The fields for Blt_OperSpec are as follows:
- *
- *   - option name
- *   - minimum number of characters required to disambiguate the option name.
- *   - function associated with command option.
- *   - minimum number of arguments required.
- *   - maximum number of arguments allowed (0 indicates no limit).
- *   - usage string
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tedOps[] =
-{
-    {"cget", 2, CgetOp, 4, 4, "master option",},
-    {"configure", 2, ConfigureOp, 3, 0,
-	"master ?option...?",},
-    {"edit", 1, EditOp, 3, 0, "master ?options...?",},
-    {"rep", 1, RepOp, 2, 0, "master index ?options...?",},
-    {"select", 1, SelectOp, 4, 0, "master @x,y",},
- /* {"forget", 1, ForgetOp, 3, 0, "master ?master...?",},
-    {"index", 1, IndexOp, 3, 0, "master ?item...?",}, */
-};
-static int nTedOps = sizeof(tedOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * TedCmd --
- *
- *	This procedure is invoked to process the TCL command that
- *	corresponds to the table geometry manager.  See the user
- *	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TedCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTedOps, tedOps, BLT_OP_ARG1, objc, objv, 
-	    0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-static TableData *
-GetTableInterpData(Tcl_Interp *interp)
-{
-    TableData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (TableData *)Tcl_GetAssocData(interp, TABLE_THREAD_KEY, &proc);
-    assert(dataPtr);
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TedCmdInitProc --
- *
- *	This procedure is invoked to initialize the TCL command that
- *	corresponds to the table geometry manager.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new command and adds an entry into a global Tcl
- *	associative array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TedCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"ted", TedCmd, };
-
-    cmdSpec.clientData = GetTableInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltText.c b/blt3.0/src/bltText.c
deleted file mode 100644
index 5477f98..0000000
--- a/blt3.0/src/bltText.c
+++ /dev/null
@@ -1,2080 +0,0 @@
-
-/*
- * bltText.c --
- *
- * This module implements multi-line, rotate-able text for the BLT toolkit.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include <X11/Xutil.h>
-#include "tkIntBorder.h"
-#include "tkDisplay.h"
-#include "bltImage.h"
-#include "bltBitmap.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltBgStyle.h"
-
-#define WINDEBUG	0
-
-static Blt_HashTable bitmapGCTable;
-static int initialized;
-
-GC
-Blt_GetBitmapGC(Tk_Window tkwin)
-{
-    int isNew;
-    GC gc;
-    Display *display;
-    Blt_HashEntry *hPtr;
-
-    if (!initialized) {
-	Blt_InitHashTable(&bitmapGCTable, BLT_ONE_WORD_KEYS);
-	initialized = TRUE;
-    }
-    display = Tk_Display(tkwin);
-    hPtr = Blt_CreateHashEntry(&bitmapGCTable, (char *)display, &isNew);
-    if (isNew) {
-	Pixmap bitmap;
-	XGCValues gcValues;
-	unsigned long gcMask;
-	Window root;
-
-	root = Tk_RootWindow(tkwin);
-	bitmap = Tk_GetPixmap(display, root, 1, 1, 1);
-	gcValues.foreground = gcValues.background = 0;
-	gcMask = (GCForeground | GCBackground);
-	gc = Blt_GetPrivateGCFromDrawable(display, bitmap, gcMask, &gcValues);
-	Tk_FreePixmap(display, bitmap);
-	Blt_SetHashValue(hPtr, gc);
-    } else {
-	gc = (GC)Blt_GetHashValue(hPtr);
-    }
-    return gc;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ts_CreateLayout --
- *
- *	Get the extents of a possibly multiple-lined text string.
- *
- * Results:
- *	Returns via *widthPtr* and *heightPtr* the dimensions of the text
- *	string.
- *
- *---------------------------------------------------------------------------
- */
-TextLayout *
-Blt_Ts_CreateLayout(const char *text, int textLen, TextStyle *tsPtr)
-{
-    TextFragment *fp;
-    TextLayout *layoutPtr;
-    Blt_FontMetrics fm;
-    int count;			/* Count # of characters on each line */
-    int lineHeight;
-    size_t maxHeight, maxWidth;
-    size_t nFrags;
-    int width;			/* Running dimensions of the text */
-    const char *p, *endp, *start;
-    int i;
-    size_t size;
-
-    nFrags = 0;
-    endp = text + ((textLen < 0) ? strlen(text) : textLen);
-    for (p = text; p < endp; p++) {
-	if (*p == '\n') {
-	    nFrags++;
-	}
-    }
-    if ((p != text) && (*(p - 1) != '\n')) {
-	nFrags++;
-    }
-    size = sizeof(TextLayout) + (sizeof(TextFragment) * (nFrags - 1));
-
-    layoutPtr = Blt_AssertCalloc(1, size);
-    layoutPtr->nFrags = nFrags;
-
-    nFrags = count = 0;
-    width = maxWidth = 0;
-    maxHeight = tsPtr->padTop;
-    Blt_GetFontMetrics(tsPtr->font, &fm);
-    lineHeight = fm.linespace + tsPtr->leader;
-
-    fp = layoutPtr->fragments;
-    for (p = start = text; p < endp; p++) {
-	if (*p == '\n') {
-	    if (count > 0) {
-		width = Blt_TextWidth(tsPtr->font, start, count);
-		if (width > maxWidth) {
-		    maxWidth = width;
-		}
-	    } else {
-		width = 0;
-	    }
-	    fp->width = width;
-	    fp->count = count;
-	    fp->sy = fp->y = maxHeight + fm.ascent;
-	    fp->text = start;
-	    maxHeight += lineHeight;
-	    fp++;
-	    nFrags++;
-	    start = p + 1;	/* Start the text on the next line */
-	    count = 0;		/* Reset to indicate the start of a new
-				 * line */
-	    continue;
-	}
-	count++;
-    }
-    if (nFrags < layoutPtr->nFrags) {
-	width = Blt_TextWidth(tsPtr->font, start, count);
-	if (width > maxWidth) {
-	    maxWidth = width;
-	}
-	fp->width = width;
-	fp->count = count;
-	fp->sy = fp->y = maxHeight + fm.ascent;
-	fp->text = start;
-	maxHeight += lineHeight;
-	nFrags++;
-    }
-    maxHeight += tsPtr->padBottom;
-    maxWidth += PADDING(tsPtr->xPad);
-    fp = layoutPtr->fragments;
-    for (i = 0; i < nFrags; i++, fp++) {
-	switch (tsPtr->justify) {
-	default:
-	case TK_JUSTIFY_LEFT:
-	    /* No offset for left justified text strings */
-	    fp->x = fp->sx = tsPtr->padLeft;
-	    break;
-	case TK_JUSTIFY_RIGHT:
-	    fp->x = fp->sx = (maxWidth - fp->width) - tsPtr->padRight;
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    fp->x = fp->sx = (maxWidth - fp->width) / 2;
-	    break;
-	}
-    }
-    if (tsPtr->underline >= 0) {
-	fp = layoutPtr->fragments;
-	for (i = 0; i < nFrags; i++, fp++) {
-	    int first, last;
-
-	    first = fp->text - text;
-	    last = first + fp->count;
-	    if ((tsPtr->underline >= first) && (tsPtr->underline < last)) {
-		layoutPtr->underlinePtr = fp;
-		layoutPtr->underline = tsPtr->underline - first;
-		break;
-	    }
-	}
-    }
-    layoutPtr->width = maxWidth;
-    layoutPtr->height = maxHeight - tsPtr->leader;
-#ifdef notdef
-    fprintf(stderr, "w = %d, h = %d\n", maxWidth, maxHeight);
-#endif
-    return layoutPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetTextExtents --
- *
- *	Get the extents of a possibly multiple-lined text string.
- *
- * Results:
- *	Returns via *widthPtr* and *heightPtr* the dimensions of the text
- *	string.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_GetTextExtents(
-    Blt_Font font, 
-    int leader,
-    const char *text,		/* Text string to be measured. */
-    int textLen,		/* Length of the text. If -1, indicates that
-				 * text is an ASCIZ string that the length
-				 * should be computed with strlen. */
-    unsigned int *widthPtr, 
-    unsigned int *heightPtr)
-{
-    unsigned int lineHeight;
-
-    if (text == NULL) {
-	return;			/* NULL string? */
-    }
-    {
-	Blt_FontMetrics fm;
-
-	Blt_GetFontMetrics(font, &fm);
-	lineHeight = fm.linespace;
-    }
-    if (textLen < 0) {
-	textLen = strlen(text);
-    }
-    { 
-	unsigned int lineLen;		/* # of characters on each line */
-	const char *p, *pend;
-	const char *line;
-	unsigned int maxWidth, maxHeight;
-
-	maxWidth = maxHeight = 0;
-	lineLen = 0;
-	for (p = line = text, pend = text + textLen; p < pend; p++) {
-	    if (*p == '\n') {
-		if (lineLen > 0) {
-		    unsigned int lineWidth;
-		    
-		    lineWidth = Blt_TextWidth(font, line, lineLen);
-		    if (lineWidth > maxWidth) {
-			maxWidth = lineWidth;
-		    }
-		}
-		maxHeight += lineHeight;
-		line = p + 1;	/* Point to the start of the next line. */
-		lineLen = 0;	/* Reset counter to indicate the start of a
-				 * new line. */
-		continue;
-	    }
-	    lineLen++;
-	}
-	if ((lineLen > 0) && (*(p - 1) != '\n')) {
-	    unsigned int lineWidth;
-	    
-	    maxHeight += lineHeight;
-	    lineWidth = Blt_TextWidth(font, line, lineLen);
-	    if (lineWidth > maxWidth) {
-		maxWidth = lineWidth;
-	    }
-	}
-	*widthPtr = maxWidth;
-	*heightPtr = maxHeight;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ts_GetExtents --
- *
- *	Get the extents of a possibly multiple-lined text string.
- *
- * Results:
- *	Returns via *widthPtr* and *heightPtr* the dimensions of
- *	the text string.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ts_GetExtents(TextStyle *tsPtr, const char *text, unsigned int *widthPtr, 
-		  unsigned int *heightPtr)
-{
-
-    if (text == NULL) {
-	*widthPtr = *heightPtr = 0;
-    } else {
-	unsigned int w, h;
-
-	Blt_GetTextExtents(tsPtr->font, tsPtr->leader, text, -1, &w, &h);
-	*widthPtr = w + PADDING(tsPtr->xPad);
-	*heightPtr = h + PADDING(tsPtr->yPad);
-    } 
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetBoundingBox
- *
- *	Computes the dimensions of the bounding box surrounding a rectangle
- *	rotated about its center.  If pointArr isn't NULL, the coordinates of
- *	the rotated rectangle are also returned.
- *
- *	The dimensions are determined by rotating the rectangle, and doubling
- *	the maximum x-coordinate and y-coordinate.
- *
- *		w = 2 * maxX,  h = 2 * maxY
- *
- *	Since the rectangle is centered at 0,0, the coordinates of the
- *	bounding box are (-w/2,-h/2 w/2,-h/2, w/2,h/2 -w/2,h/2).
- *
- *  		0 ------- 1
- *  		|         |
- *  		|    x    |
- *  		|         |
- *  		3 ------- 2
- *
- * Results:
- *	The width and height of the bounding box containing the rotated
- *	rectangle are returned.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_GetBoundingBox(
-    int width, int height,	/* Unrotated region */
-    float angle,		/* Rotation of box */
-    double *rotWidthPtr, 
-    double *rotHeightPtr,	/* (out) Bounding box region */
-    Point2d *bbox)		/* (out) Points of the rotated box */
-{
-    int i;
-    double sinTheta, cosTheta;
-    double radians;
-    double xMax, yMax;
-    double x, y;
-    Point2d corner[4];
-
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int ll, ur, ul, lr;
-	double rotWidth, rotHeight;
-	int quadrant;
-
-	/* Handle right-angle rotations specially. */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    ul = 3, ur = 0, lr = 1, ll = 2;
-	    rotWidth = (double)height;
-	    rotHeight = (double)width;
-	    break;
-	case ROTATE_90:		/* 90 degrees */
-	    ul = 1, ur = 2, lr = 3, ll = 0;
-	    rotWidth = (double)height;
-	    rotHeight = (double)width;
-	    break;
-	case ROTATE_180:	/* 180 degrees */
-	    ul = 2, ur = 3, lr = 0, ll = 1;
-	    rotWidth = (double)width;
-	    rotHeight = (double)height;
-	    break;
-	default:
-	case ROTATE_0:		/* 0 degrees */
-	    ul = 0, ur = 1, lr = 2, ll = 3;
-	    rotWidth = (double)width;
-	    rotHeight = (double)height;
-	    break;
-	}
-	if (bbox != NULL) {
-	    x = rotWidth * 0.5;
-	    y = rotHeight * 0.5;
-	    bbox[ll].x = bbox[ul].x = -x;
-	    bbox[ur].y = bbox[ul].y = -y;
-	    bbox[lr].x = bbox[ur].x = x;
-	    bbox[ll].y = bbox[lr].y = y;
-	}
-	*rotWidthPtr = rotWidth;
-	*rotHeightPtr = rotHeight;
-	return;
-    }
-    /* Set the four corners of the rectangle whose center is the origin. */
-    corner[1].x = corner[2].x = (double)width * 0.5;
-    corner[0].x = corner[3].x = -corner[1].x;
-    corner[2].y = corner[3].y = (double)height * 0.5;
-    corner[0].y = corner[1].y = -corner[2].y;
-
-    radians = (-angle / 180.0) * M_PI;
-    sinTheta = sin(radians), cosTheta = cos(radians);
-    xMax = yMax = 0.0;
-
-    /* Rotate the four corners and find the maximum X and Y coordinates */
-
-    for (i = 0; i < 4; i++) {
-	x = (corner[i].x * cosTheta) - (corner[i].y * sinTheta);
-	y = (corner[i].x * sinTheta) + (corner[i].y * cosTheta);
-	if (x > xMax) {
-	    xMax = x;
-	}
-	if (y > yMax) {
-	    yMax = y;
-	}
-	if (bbox != NULL) {
-	    bbox[i].x = x;
-	    bbox[i].y = y;
-	}
-    }
-
-    /*
-     * By symmetry, the width and height of the bounding box are twice the
-     * maximum x and y coordinates.
-     */
-    *rotWidthPtr = xMax + xMax;
-    *rotHeightPtr = yMax + yMax;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given x-y position
- * 	is in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |
- *  		w   center   e
- *  		|            |
- *  		sw --- s --- se
- *
- * 	The coordinates returned are translated to the origin of the bounding
- * 	box (suitable for giving to XCopyArea, XCopyPlane, etc.)
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TranslateAnchor(
-    int x, int y,		/* Window coordinates of anchor */
-    int w, int h,		/* Extents of the bounding box */
-    Tk_Anchor anchor,		/* Direction of the anchor */
-    int *xPtr, int *yPtr)
-{
-    switch (anchor) {
-    case TK_ANCHOR_NW:		/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:		/* Left center */
-	y -= (h / 2);
-	break;
-    case TK_ANCHOR_SW:		/* Lower left corner */
-	y -= h;
-	break;
-    case TK_ANCHOR_N:		/* Top center */
-	x -= (w / 2);
-	break;
-    case TK_ANCHOR_CENTER:	/* Center */
-	x -= (w / 2);
-	y -= (h / 2);
-	break;
-    case TK_ANCHOR_S:		/* Bottom center */
-	x -= (w / 2);
-	y -= h;
-	break;
-    case TK_ANCHOR_NE:		/* Upper right corner */
-	x -= w;
-	break;
-    case TK_ANCHOR_E:		/* Right center */
-	x -= w;
-	y -= (h / 2);
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	x -= w;
-	y -= h;
-	break;
-    }
-    *xPtr = x;
-    *yPtr = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_AnchorPoint --
- *
- * 	Translates a position, using both the dimensions of the bounding box,
- * 	and the anchor direction, returning the coordinates of the upper-left
- * 	corner of the box. The anchor indicates where the given x-y position
- * 	is in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |
- *  		w   center   e
- *  		|            |
- *  		sw --- s --- se
- *
- * 	The coordinates returned are translated to the origin of the bounding
- * 	box (suitable for giving to XCopyArea, XCopyPlane, etc.)
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-Point2d
-Blt_AnchorPoint(
-    double x, double y,		/* Coordinates of anchor. */
-    double w, double h,		/* Extents of the bounding box */
-    Tk_Anchor anchor)		/* Direction of the anchor */
-{
-    Point2d t;
-
-    switch (anchor) {
-    case TK_ANCHOR_NW:		/* Upper left corner */
-	break;
-    case TK_ANCHOR_W:		/* Left center */
-	y -= (h * 0.5);
-	break;
-    case TK_ANCHOR_SW:		/* Lower left corner */
-	y -= h;
-	break;
-    case TK_ANCHOR_N:		/* Top center */
-	x -= (w * 0.5);
-	break;
-    case TK_ANCHOR_CENTER:	/* Center */
-	x -= (w * 0.5);
-	y -= (h * 0.5);
-	break;
-    case TK_ANCHOR_S:		/* Bottom center */
-	x -= (w * 0.5);
-	y -= h;
-	break;
-    case TK_ANCHOR_NE:		/* Upper right corner */
-	x -= w;
-	break;
-    case TK_ANCHOR_E:		/* Right center */
-	x -= w;
-	y -= (h * 0.5);
-	break;
-    case TK_ANCHOR_SE:		/* Lower right corner */
-	x -= w;
-	y -= h;
-	break;
-    }
-    t.x = x;
-    t.y = y;
-    return t;
-}
-
-static INLINE int
-SizeOfUtfChar(const char *s)	/* Buffer in which the UTF-8 representation of
-				 * the Tcl_UniChar is stored.  Buffer must be
-				 * large enough to hold the UTF-8 character
-				 * (at most TCL_UTF_MAX bytes). */
-{
-    int byte;
-    
-    byte = *((unsigned char *)s);
-    if (byte < 0xC0) {
-	return 1;
-    } else if ((byte < 0xE0) && ((s[1] & 0xC0) == 0x80)) {
-	return 2;
-    } else if ((byte < 0xF0) && 
-	       ((s[1] & 0xC0) == 0x80) && ((s[2] & 0xC0) == 0x80)) {
-	return 3;
-    }
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawCharsWithEllipsis --
- *
- *	Draw a string of characters on the screen.  Blt_DrawChars()
- *	expands control characters that occur in the string to 
- *	\xNN sequences.  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets drawn on the screen.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DrawCharsWithEllipsis(
-    Tk_Window tkwin,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for drawing characters. */
-    Blt_Font font,		/* Font in which characters will be drawn;
-				 * must be the same as font used in GC. */
-    int depth,
-    float angle,
-    const char *text,		/* UTF-8 string to be displayed.  Need not be
-				 * '\0' terminated.  All Tk meta-characters
-				 * (tabs, control characters, and newlines)
-				 * should be stripped out of the string that
-				 * is passed to this function.  If they are
-				 * not stripped out, they will be displayed as
-				 * regular printing characters. */
-    int textLen,		/* # of bytes to draw in text string. */
-    int x, int y,		/* Coordinates at which to place origin of
-				 * string when drawing. */
-    int maxLength)
-{
-    const char *s, *send;
-    Tcl_DString dString;
-    int nBytes;
-    int accum, threshold;
-#if HAVE_UTF
-    Tcl_UniChar ch;
-#endif /* HAVE_UTF */
-    accum = 0;
-    threshold = maxLength - Blt_TextWidth(font, "...", 3);
-    Tcl_DStringInit(&dString);
-#if !HAVE_UTF
-    nBytes = 1;
-#endif /* !HAVE_UTF */
-    for (s = text, send = s + textLen; s < send; s += nBytes) {
-#if HAVE_UTF
-	nBytes =  Tcl_UtfToUniChar (s, &ch);
-#endif /* HAVE_UTF */
-	accum += Blt_TextWidth(font, s, nBytes);
-	if (accum > threshold) {
-	    break;
-	}
-	Tcl_DStringAppend(&dString, s, nBytes);
-    }
-    Tcl_DStringAppend(&dString, "...", 3);
-    Blt_DrawChars(Tk_Display(tkwin), drawable, gc, font, depth, angle, 
-	Tcl_DStringValue(&dString), Tcl_DStringLength(&dString), x, y);
-    Tcl_DStringFree(&dString);
-}
-
-void
-Blt_DrawLayout(Tk_Window tkwin, Drawable drawable, GC gc, Blt_Font font,
-	       int depth, float angle, int x, int y, TextLayout *layoutPtr,
-	       int maxLength)
-{
-    TextFragment *fp, *fend;
-    Blt_FontMetrics fm;
-
-    Blt_GetFontMetrics(font, &fm);
-    for (fp = layoutPtr->fragments, fend = fp + layoutPtr->nFrags; 
-	 fp < fend; fp++) {
-	int sx, sy;
-
-	sx = x + fp->sx, sy = y + fp->sy;
-	if ((maxLength > 0) && ((fp->sx + fp->width) > maxLength)) {
-	    Blt_DrawCharsWithEllipsis(tkwin, drawable, gc, font, depth, angle, 
-		fp->text, fp->count, sx, sy, maxLength);
-	} else {
- 	    Blt_DrawChars(Tk_Display(tkwin), drawable, gc, font, depth, angle, 
-		fp->text, fp->count, sx, sy);
-	}
-    }
-    if (layoutPtr->underlinePtr != NULL) {
-	fp = layoutPtr->underlinePtr;
-	Blt_UnderlineChars(Tk_Display(tkwin), drawable, gc, font, 
-		fp->text, x + fp->sx, y + fp->sy, layoutPtr->underline, 
-		layoutPtr->underline + 1);
-    }
-}
-
-
-#ifdef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ts_Bitmap --
- *
- *	Draw a bitmap, using the the given window coordinates as an anchor for
- *	the text bounding box.
- *
- * Results:
- *	Returns the bitmap representing the text string.
- *
- * Side Effects:
- *	Bitmap is drawn using the given font and GC in the drawable at the
- *	given coordinates, anchor, and rotation.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_Ts_Bitmap(
-    Tk_Window tkwin,
-    TextLayout *layoutPtr,	/* Text string to draw */
-    TextStyle *tsPtr,		/* Text attributes: rotation, color, font,
-				 * linespacing, justification, etc. */
-    int *bmWidthPtr,
-    int *bmHeightPtr,		/* Extents of rotated text string */
-    int maxLength)
-{
-    Pixmap bitmap;
-    Window root;
-    GC gc;
-    HDC hDC;
-    TkWinDCState state;
-
-    /* Create a temporary bitmap to contain the text string */
-    root = Tk_RootWindow(tkwin);
-    bitmap = Tk_GetPixmap(Tk_Display(tkwin), root, layoutPtr->width, 
-	layoutPtr->height, 1);
-    assert(bitmap != None);
-    if (bitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    gc = Blt_GetBitmapGC(tkwin);
-
-    /* Clear the pixmap and draw the text string into it */
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), bitmap, &state);
-    PatBlt(hDC, 0, 0, layoutPtr->width, layoutPtr->height, WHITENESS);
-    TkWinReleaseDrawableDC(bitmap, hDC, &state);
-
-    XSetFont(Tk_Display(tkwin), gc, Blt_FontId(tsPtr->font));
-    XSetForeground(Tk_Display(tkwin), gc, 1);
-    Blt_DrawLayout(tkwin, bitmap, gc, tsPtr->font, 1, 0.0f, 0, 0, layoutPtr, 
-	maxLength);
-
-    /*
-     * Under Win32, 1 is off and 0 is on. That's why we're inverting the
-     * bitmap here.
-     */
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), bitmap, &state);
-    PatBlt(hDC, 0, 0, layoutPtr->width, layoutPtr->height, DSTINVERT);
-    TkWinReleaseDrawableDC(bitmap, hDC, &state);
-
-    *bmWidthPtr = layoutPtr->width, *bmHeightPtr = layoutPtr->height;
-    return bitmap;
-}
-#else 
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ts_Bitmap --
- *
- *	Draw a bitmap, using the the given window coordinates as an anchor for
- *	the text bounding box.
- *
- * Results:
- *	Returns the bitmap representing the text string.
- *
- * Side Effects:
- *	Bitmap is drawn using the given font and GC in the drawable at the
- *	given coordinates, anchor, and rotation.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_Ts_Bitmap(
-    Tk_Window tkwin,
-    TextLayout *layoutPtr,	/* Text string to draw */
-    TextStyle *tsPtr,		/* Text attributes: rotation, color, font,
-				 * linespacing, justification, etc. */
-    int *bmWidthPtr,
-    int *bmHeightPtr,		/* Extents of rotated text string */
-    int maxLength)
-{
-    Pixmap bitmap;
-    GC gc;
-
-    /* Create a bitmap big enough to contain the text. */
-    bitmap = Tk_GetPixmap(Tk_Display(tkwin), Tk_RootWindow(tkwin), 
-	layoutPtr->width, layoutPtr->height, 1);
-    assert(bitmap != None);
-    if (bitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    gc = Blt_GetBitmapGC(tkwin);
-
-    /* Clear the bitmap.  Background is 0. */
-    XSetForeground(Tk_Display(tkwin), gc, 0);
-    XFillRectangle(Tk_Display(tkwin), bitmap, gc, 0, 0, 
-		   layoutPtr->width, layoutPtr->height);
-
-    /* Draw the text into the bitmap. Foreground is 1. */
-    XSetFont(Tk_Display(tkwin), gc, Blt_FontId(tsPtr->font));
-    XSetForeground(Tk_Display(tkwin), gc, 1);
-    Blt_DrawLayout(tkwin, bitmap, gc, tsPtr->font, 1, 0.0f, 0, 0, layoutPtr, 
-		   maxLength);
-    *bmWidthPtr = layoutPtr->width, *bmHeightPtr = layoutPtr->height;
-    return bitmap;
-}
-#endif /* WIN32 */
-
-void
-Blt_Ts_SetDrawStyle(
-    TextStyle *tsPtr,
-    Blt_Font font,
-    GC gc,
-    XColor *normalColor, 
-    float angle,
-    Tk_Anchor anchor,
-    Tk_Justify justify,
-    int leader)
-{
-    tsPtr->xPad.side1 = tsPtr->xPad.side2 = 0;
-    tsPtr->yPad.side1 = tsPtr->yPad.side2 = 0;
-    tsPtr->state = 0;
-    tsPtr->anchor = anchor;
-    tsPtr->color = normalColor;
-    tsPtr->font = font;
-    tsPtr->gc = gc;
-    tsPtr->justify = justify;
-    tsPtr->leader = leader;
-    tsPtr->angle = (float)angle;
-}
-
-static void
-DrawStandardLayout(
-    Tk_Window tkwin,
-    Drawable drawable, 
-    TextStyle *tsPtr, 
-    TextLayout *layoutPtr, 
-    int x, int y, 
-    int maxLength)		/* If text crossing this threshold,
-				 * draw ellipsis.  */
-{
-    int width, height;
-    /*
-     * This is the easy case of no rotation. Simply draw the text
-     * using the standard drawing routines.  Handle offset printing
-     * for engraved (disabled) text.
-     */
-    width = layoutPtr->width, height = layoutPtr->height;
-    Blt_TranslateAnchor(x, y, width, height, tsPtr->anchor, &x, &y);
-    if (tsPtr->state & (STATE_DISABLED | STATE_EMPHASIS)) {
-	TkBorder *borderPtr = (TkBorder *) Blt_BackgroundBorder(tsPtr->bg);
-	XColor *color1, *color2;
-
-	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
-	if (tsPtr->state & STATE_EMPHASIS) {
-	    XColor *hold;
-	    
-	    hold = color1, color1 = color2, color2 = hold;
-	}
-	if (color1 != NULL) {
-	    XSetForeground(Tk_Display(tkwin), tsPtr->gc, color1->pixel);
-	}
-	Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, Tk_Depth(tkwin),
-		0.0f, x + 1, y + 1, layoutPtr, maxLength);
-	if (color2 != NULL) {
-	    XSetForeground(Tk_Display(tkwin), tsPtr->gc, color2->pixel);
-	}
-	Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, Tk_Depth(tkwin),
-		0.0f, x, y, layoutPtr, maxLength);
-	
-	/* Reset the foreground color back to its original setting, so not to
-	 * invalidate the GC cache. */
-	XSetForeground(Tk_Display(tkwin), tsPtr->gc, tsPtr->color->pixel);
-	
-	return;		/* Done */
-    }
-    Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, Tk_Depth(tkwin), 
-	0.0f, x, y, layoutPtr, maxLength);
-}
-
-
-void
-Blt_RotateStartingTextPositions(TextLayout *textPtr, float angle)
-{
-    Point2d off1, off2;
-    TextFragment *fp, *fend;
-    double radians;
-    double rotWidth, rotHeight;
-    double sinTheta, cosTheta;
-    
-    Blt_GetBoundingBox(textPtr->width, textPtr->height, angle, &rotWidth, 
-		       &rotHeight, (Point2d *)NULL);
-    off1.x = (double)textPtr->width * 0.5;
-    off1.y = (double)textPtr->height * 0.5;
-    off2.x = rotWidth * 0.5;
-    off2.y = rotHeight * 0.5;
-    radians = (-angle / 180.0) * M_PI;
-    
-    sinTheta = sin(radians), cosTheta = cos(radians);
-    for (fp = textPtr->fragments, fend = fp + textPtr->nFrags; fp < fend; 
-	 fp++) {
-	Point2d p, q;
-	
-	p.x = fp->x - off1.x;
-	p.y = fp->y - off1.y;
-	q.x = (p.x * cosTheta) - (p.y * sinTheta);
-	q.y = (p.x * sinTheta) + (p.y * cosTheta);
-	q.x += off2.x;
-	q.y += off2.y;
-	fp->sx = ROUND(q.x);
-	fp->sy = ROUND(q.y);
-    }
-}
-
-int
-Blt_DrawTextWithRotatedFont(Tk_Window tkwin, Drawable drawable, float angle,
-			    TextStyle *tsPtr, TextLayout *layoutPtr, 
-			    int x, int y, int maxLength)
-{
-    double rotWidth, rotHeight;
-
-    Blt_RotateStartingTextPositions(layoutPtr, angle);
-    Blt_GetBoundingBox(layoutPtr->width, layoutPtr->height, angle, 
-		&rotWidth, &rotHeight, (Point2d *)NULL);
-    Blt_TranslateAnchor(x, y, (int)(rotWidth), (int)(rotHeight), tsPtr->anchor, 
-		&x, &y);
-#ifdef notdef
-    XFillRectangle(Tk_Display(tkwin), drawable, tsPtr->gc, x-1, y-1, 3, 3);
-    XFillRectangle(Tk_Display(tkwin), drawable, tsPtr->gc, x+rotWidth-1, y+rotHeight-1, 3, 3);
-#endif
-    if (tsPtr->state & (STATE_DISABLED | STATE_EMPHASIS)) {
-	TkBorder *borderPtr = (TkBorder *)Blt_BackgroundBorder(tsPtr->bg);
-	XColor *color1, *color2;
-	
-	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
-	if (tsPtr->state & STATE_EMPHASIS) {
-	    XColor *hold;
-	    
-	    hold = color1, color1 = color2, color2 = hold;
-	}
-	if (color1 != NULL) {
-	    XSetForeground(Tk_Display(tkwin), tsPtr->gc, color1->pixel);
-	    Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, 
-			   Tk_Depth(tkwin), angle, x, y, layoutPtr, maxLength); 
-	}
-	if (color2 != NULL) {
-	    XSetForeground(Tk_Display(tkwin), tsPtr->gc, color2->pixel);
-	    Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, 
-			   Tk_Depth(tkwin), angle, x, y, layoutPtr, maxLength); 
-	}
-	XSetForeground(Tk_Display(tkwin), tsPtr->gc, tsPtr->color->pixel);
-	return TRUE;
-    }
-    {
-	XSetForeground(Tk_Display(tkwin), tsPtr->gc, tsPtr->color->pixel);
-	Blt_DrawLayout(tkwin, drawable, tsPtr->gc, tsPtr->font, 
-		Tk_Depth(tkwin), angle, x, y, layoutPtr, maxLength); 
-    }
-    return TRUE;
-}
-
-static void
-Blt_DrawTextWithRotatedBitmap(
-    Tk_Window tkwin,
-    Drawable drawable,
-    float angle,
-    TextStyle *tsPtr,		/* Text attribute information */
-    TextLayout *layoutPtr,
-    int x, int y,		/* Window coordinates to draw text */
-    int maxLength)
-{
-    int width, height;
-    Display *display;
-    Pixmap bitmap;
-
-    display = Tk_Display(tkwin);
-    /*
-     * Rotate the text by writing the text into a bitmap and rotating the
-     * bitmap.  Set the clip mask and origin in the GC first.  And make sure
-     * we restore the GC because it may be shared.
-     */
-    tsPtr->angle = angle;
-
-    bitmap = Blt_Ts_Bitmap(tkwin, layoutPtr, tsPtr, &width, &height, maxLength);
-    if (bitmap == None) {
-	return;
-    }
-    if ((bitmap != None) && (tsPtr->angle != 0.0)) {
-	Pixmap rotated;
-
-	rotated = Blt_RotateBitmap(tkwin, bitmap, width, height, tsPtr->angle, 
-		&width, &height);
-	Tk_FreePixmap(display, bitmap);
-	bitmap = rotated;
-    }
-    Blt_TranslateAnchor(x, y, width, height, tsPtr->anchor, &x, &y);
-    XSetClipMask(display, tsPtr->gc, bitmap);
-
-    if (tsPtr->state & (STATE_DISABLED | STATE_EMPHASIS)) {
-	TkBorder *borderPtr = (TkBorder *) Blt_BackgroundBorder(tsPtr->bg);
-	XColor *color1, *color2;
-
-	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
-	if (tsPtr->state & STATE_EMPHASIS) {
-	    XColor *hold;
-
-	    hold = color1, color1 = color2, color2 = hold;
-	}
-	if (color1 != NULL) {
-	    XSetForeground(display, tsPtr->gc, color1->pixel);
-	}
-	XSetClipOrigin(display, tsPtr->gc, x + 1, y + 1);
-	XCopyPlane(display, bitmap, drawable, tsPtr->gc, 0, 0, width, 
-		height, x + 1, y + 1, 1);
-	if (color2 != NULL) {
-	    XSetForeground(display, tsPtr->gc, color2->pixel);
-	}
-	XSetClipOrigin(display, tsPtr->gc, x, y);
-	XCopyPlane(display, bitmap, drawable, tsPtr->gc, 0, 0, width, 
-		height, x, y, 1);
-	XSetForeground(display, tsPtr->gc, tsPtr->color->pixel);
-    } else {
-	XSetForeground(display, tsPtr->gc, tsPtr->color->pixel);
-	XSetClipOrigin(display, tsPtr->gc, x, y);
-	XCopyPlane(display, bitmap, drawable, tsPtr->gc, 0, 0, width, height, 
-		x, y, 1);
-    }
-    XSetClipMask(display, tsPtr->gc, None);
-    Tk_FreePixmap(display, bitmap);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Ts_DrawLayout --
- *
- *	Draw a text string, possibly rotated, using the the given window
- *	coordinates as an anchor for the text bounding box.  If the text is
- *	not rotated, simply use the X text drawing routines. Otherwise,
- *	generate a bitmap of the rotated text.
- *
- * Results:
- *	Returns the x-coordinate to the right of the text.
- *
- * Side Effects:
- *	Text string is drawn using the given font and GC at the the given
- *	window coordinates.
- *
- *      The Stipple, FillStyle, and TSOrigin fields of the GC are modified for
- *      rotated text.  This assumes the GC is private, *not* shared (via
- *      Tk_GetGC)
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Ts_DrawLayout(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TextLayout *layoutPtr,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y,		/* Window coordinates to draw text */
-    int xMax)
-{
-    float angle;
-
-    if ((tsPtr->gc == NULL) || (tsPtr->flags & UPDATE_GC)) {
-	Blt_Ts_ResetStyle(tkwin, tsPtr);
-    }
-    angle = (float)FMOD(tsPtr->angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    if (angle == 0.0) {
-	/*
-	 * This is the easy case of no rotation. Simply draw the text using
-	 * the standard drawing routines.  Handle offset printing for engraved
-	 * (disabled) text.
-	 */
-	DrawStandardLayout(tkwin, drawable, tsPtr, layoutPtr, x, y, xMax);
-	return;
-    }
-    if (Blt_CanRotateFont(tsPtr->font, angle)) {
-	if (Blt_DrawTextWithRotatedFont(tkwin, drawable, angle, tsPtr, 
-		layoutPtr, x, y, xMax)) {
-	    return;		/* Success. */
-	}
-    }
-    /*Fallthru*/
-    tsPtr->angle = (float)angle;
-    Blt_DrawTextWithRotatedBitmap(tkwin, drawable, angle, tsPtr, layoutPtr,
-		x, y, xMax);
-}
-
-void
-Blt_Ts_UnderlineLayout(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TextLayout *layoutPtr,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y,		/* Window coordinates to draw text */
-    int xMax)
-{
-    float angle;
-
-    if ((tsPtr->gc == NULL) || (tsPtr->flags & UPDATE_GC)) {
-	Blt_Ts_ResetStyle(tkwin, tsPtr);
-    }
-    angle = (float)FMOD(tsPtr->angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    if (angle == 0.0) {
-	TextFragment *fp, *fend;
-
-	for (fp = layoutPtr->fragments, fend = fp + layoutPtr->nFrags; 
-	     fp < fend; fp++) {
-	    int sx, sy;
-
-	    sx = x + fp->sx, sy = y + fp->sy;
-	    Blt_UnderlineChars(Tk_Display(tkwin), drawable, tsPtr->gc, 
-		tsPtr->font, fp->text, sx, sy, 0, fp->count);
-	}
-    }
-}
-
-void
-Blt_DrawText2(
-    Tk_Window tkwin,
-    Drawable drawable,
-    const char *string,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y,		/* Window coordinates to draw text */
-    Dim2D *areaPtr)
-{
-    TextLayout *layoutPtr;
-    int width, height;
-    float angle;
-
-    if ((string == NULL) || (*string == '\0')) {
-	return;			/* Empty string, do nothing */
-    }
-    layoutPtr = Blt_Ts_CreateLayout(string, -1, tsPtr);
-    Blt_Ts_DrawLayout(tkwin, drawable, layoutPtr, tsPtr, x, y, -1);
-    angle = FMOD(tsPtr->angle, 360.0);
-    if (angle < 0.0) {
-	angle += 360.0;
-    }
-    width = layoutPtr->width;
-    height = layoutPtr->height;
-    if (angle != 0.0) {
-	double rotWidth, rotHeight;
-
-	Blt_GetBoundingBox(width, height, angle, &rotWidth, &rotHeight, 
-	   (Point2d *)NULL);
-	width = ROUND(rotWidth);
-	height = ROUND(rotHeight);
-    }
-    areaPtr->width = width;
-    areaPtr->height = height;
-    Blt_Free(layoutPtr);
-}
-
-void
-Blt_DrawText(
-    Tk_Window tkwin,
-    Drawable drawable,
-    const char *string,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y)		/* Window coordinates to draw text */
-{
-    TextLayout *layoutPtr;
-
-    if ((string == NULL) || (*string == '\0')) {
-	return;			/* Empty string, do nothing */
-    }
-    layoutPtr = Blt_Ts_CreateLayout(string, -1, tsPtr);
-    Blt_Ts_DrawLayout(tkwin, drawable, layoutPtr, tsPtr, x, y, -1);
-    Blt_Free(layoutPtr);
-}
-
-void
-Blt_Ts_ResetStyle(Tk_Window tkwin, TextStyle *tsPtr)
-{
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcMask = GCFont;
-    gcValues.font = Blt_FontId(tsPtr->font);
-    if (tsPtr->color != NULL) {
-	gcMask |= GCForeground;
-	gcValues.foreground = tsPtr->color->pixel;
-    }
-    newGC = Tk_GetGC(tkwin, gcMask, &gcValues);
-    if (tsPtr->gc != NULL) {
-	Tk_FreeGC(Tk_Display(tkwin), tsPtr->gc);
-    }
-    tsPtr->gc = newGC;
-    tsPtr->flags &= ~UPDATE_GC;
-}
-
-void
-Blt_Ts_FreeStyle(Display *display, TextStyle *tsPtr)
-{
-    if (tsPtr->gc != NULL) {
-	Tk_FreeGC(display, tsPtr->gc);
-    }
-}
-
-
-#ifdef notdef
-int
-Blt_Ts_DrawLayoutPlus(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TextLayout *layoutPtr,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y,		/* Window coordinates to draw text */
-    int maxLength)
-{
-    Blt_Painter painter;
-    Blt_Picture picture, rotated;
-    Blt_Pixel fg, bg;
-    Pixmap bitmap;
-    int width, height;
-
-    bitmap = Blt_Ts_Bitmap(tkwin, layoutPtr, tsPtr, &width, &height, maxLength);
-    if (bitmap == None) {
-	return FALSE;
-    }
-    if (tsPtr->color == NULL) {
-	fg.u32 = 0x00000000;
-    } else {
-	fg.Red = tsPtr->color->red >> 8;
-	fg.Green = tsPtr->color->green >> 8;
-	fg.Blue = tsPtr->color->blue >> 8;
-	fg.Alpha = 0xFF;
-    }
-    if (tsPtr->bg == NULL) {
-	bg.u32 = fg.u32;	/* Transparent pixel. */
-	bg.Alpha = 0x00;
-    } else {
-	XColor *colorPtr;
-
-	colorPtr = Blt_BackgroundBorderColor(tsPtr->bg);
-	bg.Red = colorPtr->red >> 8;
-	bg.Green = colorPtr->green >> 8;
-	bg.Blue = colorPtr->blue >> 8;
-	bg.Alpha = 0xFF;
-    }
-    picture = Blt_BitmapToPicture(Tk_Display(tkwin), bitmap, width, height, 
-	&fg, &bg);
-    if (picture == NULL) {
-	return FALSE;
-    }
-    rotated = Blt_RotatePicture(picture, tsPtr->angle);
-    Blt_FreePicture(picture);
-    if (rotated == NULL) {
-	return FALSE;
-    }
-    picture = rotated;
-
-    Blt_TranslateRotatedAnchor(x, y, width, height, tsPtr->anchor, 
-	tsPtr->angle, &x, &y);
-    painter = Blt_GetPainter(tkwin, 1.0);
-    width = Blt_PictureWidth(picture);
-    height = Blt_PictureHeight(picture);
-    if ((x + width) > Tk_Width(tkwin)) {
-	width = Tk_Width(tkwin) - x;
-    }
-    if ((y + height) > Tk_Height(tkwin)) {
-	height = Tk_Height(tkwin) - y;
-    }
-    Blt_PaintPicture(painter, drawable, picture, 0, 0, width, height, x, y, 0);
-    Blt_FreePainter(painter);
-    Blt_FreePicture(picture);
-    return TRUE;
-}
-
-void
-Blt_DrawText3(
-    Tk_Window tkwin,
-    Drawable drawable,
-    char *string,
-    TextStyle *tsPtr,		/* Text attribute information */
-    int x, int y)		/* Window coordinates to draw text */
-{
-    TextLayout *layoutPtr;
-
-    if ((string == NULL) || (*string == '\0')) {
-	return;			/* Empty string, do nothing */
-    }
-    layoutPtr = Blt_Ts_CreateLayout(string, -1, tsPtr);
-    Blt_Ts_DrawLayoutPlus(tkwin, drawable, layoutPtr, tsPtr, x, y, -1);
-    Blt_Free(layoutPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TranslateAnchor --
- *
- * 	Translate the coordinates of a given bounding box based upon the
- * 	anchor specified.  The anchor indicates where the given x-y position
- * 	is in relation to the bounding box.
- *
- *  		nw --- n --- ne
- *  		|            |
- *  		w   center   e
- *  		|            |
- *  		sw --- s --- se
- *
- * 	The coordinates returned are translated to the origin of the bounding
- * 	box (suitable for giving to XCopyArea, XCopyPlane, etc.)
- *
- * Results:
- *	The translated coordinates of the bounding box are returned.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TranslateRotatedAnchor(
-    int x, int y,		/* Window coordinates of anchor */
-    int width, int height,	/* Extents of the bounding box */
-    Tk_Anchor anchor,		/* Direction of the anchor */
-    float angle,
-    int *xPtr, int *yPtr)
-{
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-
-	quadrant = (int)(angle / 90.0);
-	if ((quadrant == ROTATE_270) || (quadrant == ROTATE_90)) {
-	    Blt_TranslateAnchor(x, y, height, width, anchor, xPtr, yPtr);
-	} else {
-	    Blt_TranslateAnchor(x, y, width, height, anchor, xPtr, yPtr);
-	}
-    } else {
-	double rWidth, rHeight;
-	Point2d points[4];
-
-	Blt_GetBoundingBox(width, height, angle, &rWidth, &rHeight, points);
-	if (anchor <= TK_ANCHOR_CENTER) {
-	    Blt_TranslateAnchor(x, y, ROUND(rWidth), ROUND(rHeight), anchor, 
-		xPtr, yPtr);
-	} else {
-	    Point2d top, bottom, left, right;
-	    int i;
-	    
-	    top = bottom = left = right = points[0];
-	    for (i = 1; i < 4; i++) {
-		if (points[i].y < top.y) {
-		    top = points[i];
-		} 
-		if (points[i].y > bottom.y) {
-		    bottom = points[i];
-		}
-		if (points[i].x < left.x) {
-		    left = points[i];
-		}
-		if (points[i].x > right.x) {
-		    right = points[i];
-		}
-	    }	
-	    switch ((int)anchor) {
-	    case BLT_ANCHOR_LEFT: /* Left */
-		y -= (rHeight / 2) - left.y;
-		break;
-		
-	    case BLT_ANCHOR_RIGHT: /* Right */
-		x -= rWidth;
-		y -= (rHeight / 2) - right.y;
-		break;
-		
-	    case BLT_ANCHOR_TOP: /* Top */
-		x -= (rWidth / 2) - top.x;
-		break;
-		
-	    case BLT_ANCHOR_BOTTOM: /* Bottom */
-		x -= (rWidth / 2) - bottom.x;
-		y -= height;
-		break;
-	    }
-	    *xPtr = x, *yPtr = y;
-	}
-    }
-}
-
-#endif
-
-/*
- * The following two structures are used to keep track of string
- * measurement information when using the text layout facilities.
- *
- * A LayoutChunk represents a contiguous range of text that can be measured
- * and displayed by low-level text calls.  In general, chunks will be
- * delimited by newlines and tabs.  Low-level, platform-specific things
- * like kerning and non-integer character widths may occur between the
- * characters in a single chunk, but not between characters in different
- * chunks.
- *
- * A TextLayout is a collection of LayoutChunks.  It can be displayed with
- * respect to any origin.  It is the implementation of the Tk_TextLayout
- * opaque token.
- */
-
-typedef struct LayoutChunk {
-    const char *start;		/* Pointer to simple string to be displayed.
-				 * This is a pointer into the TkTextLayout's
-				 * string. */
-    int numBytes;		/* The number of bytes in this chunk. */
-    int numChars;		/* The number of characters in this chunk. */
-    int numDisplayChars;	/* The number of characters to display when
-				 * this chunk is displayed.  Can be less than
-				 * numChars if extra space characters were
-				 * absorbed by the end of the chunk.  This
-				 * will be < 0 if this is a chunk that is
-				 * holding a tab or newline. */
-    int x, y;			/* The origin of the first character in this
-				 * chunk with respect to the upper-left hand
-				 * corner of the TextLayout. */
-    int totalWidth;		/* Width in pixels of this chunk.  Used
-				 * when hit testing the invisible spaces at
-				 * the end of a chunk. */
-    int displayWidth;		/* Width in pixels of the displayable
-				 * characters in this chunk.  Can be less than
-				 * width if extra space characters were
-				 * absorbed by the end of the chunk. */
-} LayoutChunk;
-
-typedef struct TkTextLayout {
-    Blt_Font font;		/* The font used when laying out the text. */
-    const char *string;		/* The string that was layed out. */
-    int width;			/* The maximum width of all lines in the
-				 * text layout. */
-    int numChunks;		/* Number of chunks actually used in
-				 * following array. */
-    LayoutChunk chunks[1];	/* Array of chunks.  The actual size will
-				 * be maxChunks.  THIS FIELD MUST BE THE LAST
-				 * IN THE STRUCTURE. */
-} TkTextLayout;
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeTextLayout --
- *
- *	This procedure is called to release the storage associated with
- *	a Tk_TextLayout when it is no longer needed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory is freed.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-Blt_FreeTextLayout(Tk_TextLayout textLayout)
-{
-    TkTextLayout *layoutPtr = (TkTextLayout *) textLayout;
-
-    if (layoutPtr != NULL) {
-	Blt_Free(layoutPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewChunk --
- *
- *	Helper function for Blt_ComputeTextLayout().  Encapsulates a
- *	measured set of characters in a chunk that can be quickly
- *	drawn.
- *
- * Results:
- *	A pointer to the new chunk in the text layout.
- *
- * Side effects:
- *	The text layout is reallocated to hold more chunks as necessary.
- *
- *	Currently, Tk_ComputeTextLayout() stores contiguous ranges of
- *	"normal" characters in a chunk, along with individual tab
- *	and newline chars in their own chunks.  All characters in the
- *	text layout are accounted for.
- *
- *---------------------------------------------------------------------------
- */
-static LayoutChunk *
-NewChunk(TkTextLayout **layoutPtrPtr, int *maxPtr, const char *start, 
-	 int numBytes, int curX, int newX, int y)
-{
-    TkTextLayout *layoutPtr;
-    LayoutChunk *chunkPtr;
-    int maxChunks, numChars;
-    size_t s;
-    
-    layoutPtr = *layoutPtrPtr;
-    maxChunks = *maxPtr;
-    if (layoutPtr->numChunks == maxChunks) {
-	maxChunks *= 2;
-	s = sizeof(TkTextLayout) + ((maxChunks - 1) * sizeof(LayoutChunk));
-	layoutPtr = Blt_Realloc(layoutPtr, s);
-	*layoutPtrPtr = layoutPtr;
-	*maxPtr = maxChunks;
-    }
-    numChars = Tcl_NumUtfChars(start, numBytes);
-    chunkPtr = &layoutPtr->chunks[layoutPtr->numChunks];
-    chunkPtr->start		= start;
-    chunkPtr->numBytes		= numBytes;
-    chunkPtr->numChars		= numChars;
-    chunkPtr->numDisplayChars	= numChars;
-    chunkPtr->x			= curX;
-    chunkPtr->y			= y;
-    chunkPtr->totalWidth	= newX - curX;
-    chunkPtr->displayWidth	= newX - curX;
-    layoutPtr->numChunks++;
-
-    return chunkPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ComputeTextLayout --
- *
- *	Computes the amount of screen space needed to display a multi-line,
- *	justified string of text.  Records all the measurements that were done
- *	to determine to size and positioning of the individual lines of text;
- *	this information can be used by the Tk_DrawTextLayout() procedure to
- *	display the text quickly (without remeasuring it).
- *
- *	This procedure is useful for simple widgets that want to display
- *	single-font, multi-line text and want Tk to handle the details.
- *
- * Results:
- *	The return value is a Tk_TextLayout token that holds the measurement
- *	information for the given string.  The token is only valid for the
- *	given string.  If the string is freed, the token is no longer valid
- *	and must also be freed.  To free the token, call Tk_FreeTextLayout().
- *
- *	The dimensions of the screen area needed to display the text are
- *	stored in *widthPtr and *heightPtr.
- *
- * Side effects:
- *	Memory is allocated to hold the measurement information.  
- *
- *---------------------------------------------------------------------------
- */
-
-Tk_TextLayout
-Blt_ComputeTextLayout(
-    Blt_Font font,		/* Font that will be used to display text. */
-    const char *string,		/* String whose dimensions are to be
-				 * computed. */
-    int numChars,		/* Number of characters to consider from
-				 * string, or < 0 for strlen(). */
-    int wrapLength,		/* Longest permissible line length, in
-				 * pixels.  <= 0 means no automatic wrapping:
-				 * just let lines get as long as needed. */
-    Tk_Justify justify,		/* How to justify lines. */
-    int flags,			/* Flag bits OR-ed together.
-				 * TK_IGNORE_TABS means that tab characters
-				 * should not be expanded.  TK_IGNORE_NEWLINES
-				 * means that newline characters should not
-				 * cause a line break. */
-    int *widthPtr,		/* Filled with width of string. */
-    int *heightPtr)		/* Filled with height of string. */
-{
-    const char *start, *end, *special;
-    int n, y, bytesThisChunk, maxChunks;
-    int baseline, height, curX, newX, maxWidth;
-    TkTextLayout *layoutPtr;
-    LayoutChunk *chunkPtr;
-    Blt_FontMetrics fm;
-    Tcl_DString lineBuffer;
-    int *lineLengths;
-    int curLine, layoutHeight;
-
-    Tcl_DStringInit(&lineBuffer);
-    
-    if ((font == NULL) || (string == NULL)) {
-	if (widthPtr != NULL) {
-	    *widthPtr = 0;
-	}
-	if (heightPtr != NULL) {
-	    *heightPtr = 0;
-	}
-	return NULL;
-    }
-
-    Blt_GetFontMetrics(font, &fm);
-    height = fm.ascent + fm.descent;
-
-    if (numChars < 0) {
-	numChars = Tcl_NumUtfChars(string, -1);
-    }
-    if (wrapLength == 0) {
-	wrapLength = -1;
-    }
-
-    maxChunks = 1;
-
-    layoutPtr = Blt_AssertMalloc(sizeof(TkTextLayout) + (maxChunks - 1) * 
-				sizeof(LayoutChunk));
-    layoutPtr->font	    = font;
-    layoutPtr->string	    = string;
-    layoutPtr->numChunks    = 0;
-
-    baseline = fm.ascent;
-    maxWidth = 0;
-
-    /*
-     * Divide the string up into simple strings and measure each string.
-     */
-
-    curX = 0;
-
-    end = Tcl_UtfAtIndex(string, numChars);
-    special = string;
-
-    flags &= TK_IGNORE_TABS | TK_IGNORE_NEWLINES;
-    flags |= TK_WHOLE_WORDS | TK_AT_LEAST_ONE;	    
-    for (start = string; start < end; ) {
-	if (start >= special) {
-	    /*
-	     * Find the next special character in the string.
-	     *
-	     * INTL: Note that it is safe to increment by byte, because we are
-	     * looking for 7-bit characters that will appear unchanged in
-	     * UTF-8.  At some point we may need to support the full Unicode
-	     * whitespace set.
-	     */
-
-	    for (special = start; special < end; special++) {
-		if (!(flags & TK_IGNORE_NEWLINES)) {
-		    if ((*special == '\n') || (*special == '\r')) {
-			break;
-		    }
-		}
-		if (!(flags & TK_IGNORE_TABS)) {
-		    if (*special == '\t') {
-			break;
-		    }
-		}
-	    }
-	}
-
-	/*
-	 * Special points at the next special character (or the end of the
-	 * string).  Process characters between start and special.
-	 */
-
-	chunkPtr = NULL;
-	if (start < special) {
-	    bytesThisChunk = Blt_MeasureChars(font, start, special - start,
-		    wrapLength - curX, flags, &newX);
-	    newX += curX;
-	    flags &= ~TK_AT_LEAST_ONE;
-	    if (bytesThisChunk > 0) {
-		chunkPtr = NewChunk(&layoutPtr, &maxChunks, start,
-			bytesThisChunk, curX, newX, baseline);
-			
-		start += bytesThisChunk;
-		curX = newX;
-	    }
-	}
-
-	if ((start == special) && (special < end)) {
-	    /*
-	     * Handle the special character.
-	     *
-	     * INTL: Special will be pointing at a 7-bit character so we
-	     * can safely treat it as a single byte.
-	     */
-
-	    chunkPtr = NULL;
-	    if (*special == '\t') {
-		newX = curX + fm.tabWidth;
-		newX -= newX % fm.tabWidth;
-		NewChunk(&layoutPtr, &maxChunks, start, 1, curX, newX,
-			baseline)->numDisplayChars = -1;
-		start++;
-		if ((start < end) &&
-			((wrapLength <= 0) || (newX <= wrapLength))) {
-		    /*
-		     * More chars can still fit on this line.
-		     */
-
-		    curX = newX;
-		    flags &= ~TK_AT_LEAST_ONE;
-		    continue;
-		}
-	    } else {	
-		NewChunk(&layoutPtr, &maxChunks, start, 1, curX, curX,
-			baseline)->numDisplayChars = -1;
-		start++;
-		goto wrapLine;
-	    }
-	}
-
-	/*
-	 * No more characters are going to go on this line, either because
-	 * no more characters can fit or there are no more characters left.
-	 * Consume all extra spaces at end of line.  
-	 */
-
-	while ((start < end) && isspace(UCHAR(*start))) { /* INTL: ISO space */
-	    if (!(flags & TK_IGNORE_NEWLINES)) {
-		if ((*start == '\n') || (*start == '\r')) {
-		    break;
-		}
-	    }
-	    if (!(flags & TK_IGNORE_TABS)) {
-		if (*start == '\t') {
-		    break;
-		}
-	    }
-	    start++;
-	}
-	if (chunkPtr != NULL) {
-	    const char *end;
-
-	    /*
-	     * Append all the extra spaces on this line to the end of the
-	     * last text chunk.  This is a little tricky because we are
-	     * switching back and forth between characters and bytes.
-	     */
-
-	    end = chunkPtr->start + chunkPtr->numBytes;
-	    bytesThisChunk = start - end;
-	    if (bytesThisChunk > 0) {
-		bytesThisChunk = Blt_MeasureChars(font, end, bytesThisChunk,
-			-1, 0, &chunkPtr->totalWidth);
-		chunkPtr->numBytes += bytesThisChunk;
-		chunkPtr->numChars += Tcl_NumUtfChars(end, bytesThisChunk);
-		chunkPtr->totalWidth += curX;
-	    }
-	}
-
-        wrapLine: 
-	flags |= TK_AT_LEAST_ONE;
-
-	/*
-	 * Save current line length, then move current position to start of
-	 * next line.
-	 */
-
-	if (curX > maxWidth) {
-	    maxWidth = curX;
-	}
-
-	/*
-	 * Remember width of this line, so that all chunks on this line
-	 * can be centered or right justified, if necessary.
-	 */
-
-	Tcl_DStringAppend(&lineBuffer, (char *) &curX, sizeof(curX));
-
-	curX = 0;
-	baseline += height;
-    }
-
-    /*
-     * If last line ends with a newline, then we need to make a 0 width
-     * chunk on the next line.  Otherwise "Hello" and "Hello\n" are the
-     * same height.
-     */
-
-    if ((layoutPtr->numChunks > 0) && ((flags & TK_IGNORE_NEWLINES) == 0)) {
-	if (layoutPtr->chunks[layoutPtr->numChunks - 1].start[0] == '\n') {
-	    chunkPtr = NewChunk(&layoutPtr, &maxChunks, start, 0, curX,
-		    curX, baseline);
-	    chunkPtr->numDisplayChars = -1;
-	    Tcl_DStringAppend(&lineBuffer, (char *) &curX, sizeof(curX));
-	    baseline += height;
-	}
-    }	    
-
-    layoutPtr->width = maxWidth;
-    layoutHeight = baseline - fm.ascent;
-    if (layoutPtr->numChunks == 0) {
-	layoutHeight = height;
-
-	/*
-	 * This fake chunk is used by the other procedures so that they can
-	 * pretend that there is a chunk with no chars in it, which makes
-	 * the coding simpler.
-	 */
-
-	layoutPtr->numChunks = 1;
-	layoutPtr->chunks[0].start		= string;
-	layoutPtr->chunks[0].numBytes		= 0;
-	layoutPtr->chunks[0].numChars		= 0;
-	layoutPtr->chunks[0].numDisplayChars	= -1;
-	layoutPtr->chunks[0].x			= 0;
-	layoutPtr->chunks[0].y			= fm.ascent;
-	layoutPtr->chunks[0].totalWidth		= 0;
-	layoutPtr->chunks[0].displayWidth	= 0;
-    } else {
-	/*
-	 * Using maximum line length, shift all the chunks so that the lines
-	 * are all justified correctly.
-	 */
-    
-	curLine = 0;
-	chunkPtr = layoutPtr->chunks;
-	y = chunkPtr->y;
-	lineLengths = (int *) Tcl_DStringValue(&lineBuffer);
-	for (n = 0; n < layoutPtr->numChunks; n++) {
-	    int extra;
-
-	    if (chunkPtr->y != y) {
-		curLine++;
-		y = chunkPtr->y;
-	    }
-	    extra = maxWidth - lineLengths[curLine];
-	    if (justify == TK_JUSTIFY_CENTER) {
-		chunkPtr->x += extra / 2;
-	    } else if (justify == TK_JUSTIFY_RIGHT) {
-		chunkPtr->x += extra;
-	    }
-	    chunkPtr++;
-	}
-    }
-
-    if (widthPtr != NULL) {
-	*widthPtr = layoutPtr->width;
-    }
-    if (heightPtr != NULL) {
-	*heightPtr = layoutHeight;
-    }
-    Tcl_DStringFree(&lineBuffer);
-
-    return (Tk_TextLayout) layoutPtr;
-}
-
-void
-Blt_DrawTextLayout(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context to use for drawing text. */
-    Tk_TextLayout layout,	/* Layout information, from a previous call
-				 * to Blt_ComputeTextLayout(). */
-    int x, int y,		/* Upper-left hand corner of rectangle in
-				 * which to draw (pixels). */
-    int firstChar,		/* The index of the first character to draw
-				 * from the given text item.  0 specfies the
-				 * beginning. */
-    int lastChar)		/* The index just after the last character
-				 * to draw from the given text item.  A number
-				 * < 0 means to draw all characters. */
-{
-    TkTextLayout *layoutPtr;
-    int i, numDisplayChars, drawX;
-    const char *firstByte;
-    const char *lastByte;
-    LayoutChunk *chunkPtr;
-    int depth = 24;
-
-    layoutPtr = (TkTextLayout *) layout;
-    if (layoutPtr == NULL) {
-	return;
-    }
-
-    if (lastChar < 0) {
-	lastChar = 100000000;
-    }
-    chunkPtr = layoutPtr->chunks;
-    for (i = 0; i < layoutPtr->numChunks; i++) {
-	numDisplayChars = chunkPtr->numDisplayChars;
-	if ((numDisplayChars > 0) && (firstChar < numDisplayChars)) {
-	    if (firstChar <= 0) {
-		drawX = 0;
-		firstChar = 0;
-		firstByte = chunkPtr->start;
-	    } else {
-		firstByte = Tcl_UtfAtIndex(chunkPtr->start, firstChar);
-		Blt_MeasureChars(layoutPtr->font, chunkPtr->start,
-			firstByte - chunkPtr->start, -1, 0, &drawX);
-	    }
-	    if (lastChar < numDisplayChars) {
-		numDisplayChars = lastChar;
-	    }
-	    lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars);
-	    Blt_DrawChars(display, drawable, gc, layoutPtr->font, depth, 0.0f,
-		    firstByte, lastByte - firstByte,
-		    x + chunkPtr->x + drawX, y + chunkPtr->y);
-	}
-	firstChar -= chunkPtr->numChars;
-	lastChar -= chunkPtr->numChars;
-	if (lastChar <= 0) {
-	    break;
-	}
-	chunkPtr++;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_CharBbox --
- *
- *	Use the information in the Tk_TextLayout token to return the
- *	bounding box for the character specified by index.  
- *
- *	The width of the bounding box is the advance width of the
- *	character, and does not include and left- or right-bearing.
- *	Any character that extends partially outside of the
- *	text layout is considered to be truncated at the edge.  Any
- *	character which is located completely outside of the text
- *	layout is considered to be zero-width and pegged against
- *	the edge.
- *
- *	The height of the bounding box is the line height for this font,
- *	extending from the top of the ascent to the bottom of the
- *	descent.  Information about the actual height of the individual
- *	letter is not available.
- *
- *	A text layout that contains no characters is considered to
- *	contain a single zero-width placeholder character.
- * 
- * Results:
- *	The return value is 0 if the index did not specify a character
- *	in the text layout, or non-zero otherwise.  In that case,
- *	*bbox is filled with the bounding box of the character.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_CharBbox(
-    Tk_TextLayout layout,   /* Layout information, from a previous call to
-			     * Tk_ComputeTextLayout(). */
-    int index,		    /* The index of the character whose bbox is
-			     * desired. */
-    int *xPtr, int *yPtr,    /* Filled with the upper-left hand corner, in
-			     * pixels, of the bounding box for the character
-			     * specified by index, if non-NULL. */
-    int *widthPtr, 
-    int *heightPtr)	    /* Filled with the width and height of the
-			     * bounding box for the character specified by
-			     * index, if non-NULL. */
-{
-    TkTextLayout *layoutPtr;
-    LayoutChunk *chunkPtr;
-    int i, x, w;
-    Blt_Font font;
-    const char *end;
-    Blt_FontMetrics fm;
-
-    if (index < 0) {
-	return 0;
-    }
-
-    layoutPtr = (TkTextLayout *) layout;
-    chunkPtr = layoutPtr->chunks;
-    font = layoutPtr->font;
-
-    Blt_GetFontMetrics(font, &fm);
-    for (i = 0; i < layoutPtr->numChunks; i++) {
-	if (chunkPtr->numDisplayChars < 0) {
-	    if (index == 0) {
-		x = chunkPtr->x;
-		w = chunkPtr->totalWidth;
-		goto check;
-	    }
-	} else if (index < chunkPtr->numChars) {
-	    end = Tcl_UtfAtIndex(chunkPtr->start, index);
-	    if (xPtr != NULL) {
-		Blt_MeasureChars(font, chunkPtr->start,
-			end -  chunkPtr->start, -1, 0, &x);
-		x += chunkPtr->x;
-	    }
-	    if (widthPtr != NULL) {
-		Blt_MeasureChars(font, end, Tcl_UtfNext(end) - end, -1, 0, &w);
-	    }
-	    goto check;
-	}
-	index -= chunkPtr->numChars;
-	chunkPtr++;
-    }
-    if (index == 0) {
-	/*
-	 * Special case to get location just past last char in layout.
-	 */
-
-	chunkPtr--;
-	x = chunkPtr->x + chunkPtr->totalWidth;
-	w = 0;
-    } else {
-	return 0;
-    }
-
-    /*
-     * Ensure that the bbox lies within the text layout.  This forces all
-     * chars that extend off the right edge of the text layout to have
-     * truncated widths, and all chars that are completely off the right
-     * edge of the text layout to peg to the edge and have 0 width.
-     */
-    check:
-    if (yPtr != NULL) {
-	*yPtr = chunkPtr->y - fm.ascent;
-    }
-    if (heightPtr != NULL) {
-	*heightPtr = fm.ascent + fm.descent;
-    }
-
-    if (x > layoutPtr->width) {
-	x = layoutPtr->width;
-    }
-    if (xPtr != NULL) {
-	*xPtr = x;
-    }
-    if (widthPtr != NULL) {
-	if (x + w > layoutPtr->width) {
-	    w = layoutPtr->width - x;
-	}
-	*widthPtr = w;
-    }
-
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UnderlineTextLayout --
- *
- *	Use the information in the Tk_TextLayout token to display an
- *	underline below an individual character.  This procedure does
- *	not draw the text, just the underline.
- *
- *	This procedure is useful for simple widgets that need to
- *	display single-font, multi-line text with an individual
- *	character underlined and want Tk to handle the details.
- *	To display larger amounts of underlined text, construct
- *	and use an underlined font.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Underline drawn on the screen.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-Blt_UnderlineTextLayout(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context to use for drawing text. */
-    Tk_TextLayout layout,	/* Layout information, from a previous call
-				 * to Tk_ComputeTextLayout(). */
-    int x, int y,		/* Upper-left hand corner of rectangle in
-				 * which to draw (pixels). */
-    int underline)		/* Index of the single character to
-				 * underline, or -1 for no underline. */
-{
-    TkTextLayout *layoutPtr;
-    int xx, yy, width, height;
-
-    if ((Blt_CharBbox(layout, underline, &xx, &yy, &width, &height) != 0)
-	    && (width != 0)) {
-	Blt_FontMetrics fm;
-	layoutPtr = (TkTextLayout *) layout;
-	Blt_GetFontMetrics(layoutPtr->font, &fm);
-	XFillRectangle(display, drawable, gc, x + xx, 
-		y + yy + fm.ascent + fm.underlinePos, 
-		(unsigned int) width, fm.underlineHeight);
-    }
-}
diff --git a/blt3.0/src/bltText.h b/blt3.0/src/bltText.h
deleted file mode 100644
index bbec061..0000000
--- a/blt3.0/src/bltText.h
+++ /dev/null
@@ -1,252 +0,0 @@
-
-/*
- * bltText.h --
- *
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_TEXT_H
-#define _BLT_TEXT_H
-
-#include "bltBgStyle.h"
-
-#define DEF_TEXT_FLAGS (TK_PARTIAL_OK | TK_IGNORE_NEWLINES)
-#define UPDATE_GC	1
-
-/*
- * TextFragment --
- */
-typedef struct {
-    const char *text;			/* Text string to be displayed */
-
-    size_t count;			/* Number of bytes in text. The actual
-					 * character count may differ because of
-					 * multi-byte UTF encodings. */
-
-    short x, y;				/* X-Y offset of the baseline from the
-					 * upper-left corner of the bbox. */
-
-    short sx, sy;			/* Starting offset of text using rotated
-					 * font. */
-
-    int width;				/* Width of segment in pixels. This
-					 * information is used to draw
-					 * PostScript strings the same width
-					 * as X. */
-} TextFragment;
-
-
-/*
- * TextItem --
- * 
- *	Parsed form for markup string.  Each item is a scrap of text
- *	describes the font, position, and characters to be displayed.
- *	
- *	subscript x_y  very small subset of latex markup.
- *	superscript x^y
- *	grouping a^{x+y} a_{i,j}
- *	supersuper a^{10^8}
- *	\hat{a} \bar{b} \vec{c}
- *	\overline{} \underline{}
- *	\frac \tfrac
- *	\Alpha \Beta ...
- *	\mathbf{} \mathit{} \mathrm{}  \boldsymbol{}
- *	\angstrom \degree 
- *
- *	-mathtext instead of -text 
- *
- *	Can use TextItem where you don't directly edit the text:
- *	  label, treeview, graph, barchart...
- *
- *	Font selector (bold, italic, size adjust) from base font.
- *	Global font table reference counted. 
- *
- */
-typedef struct {
-    const char *text;			/* Text string to be displayed */
-
-    size_t count;			/* Number of bytes in text. The actual
-					 * character count may differ because of
-					 * multi-byte UTF encodings. */
-
-    short int x, y;			/* X-Y offset of the baseline from the
-					 * upper-left corner of the bbox. */
-
-    short int sx, sy;			/* Starting offset of text using rotated
-					 * font. */
-
-    Blt_Font font;			/* Allocated font for this chunk. 
-					 * If NULL, use the global font. */
-
-    int underline;			/* Text is underlined */
-
-    int width;				/* Width of segment in pixels. This
-					 * information is used to draw
-					 * PostScript strings the same width
-					 * as X. (deprecated) */
-} TextItem;
-
-/*
- * TextLayout --
- */
-typedef struct {
-    TextFragment *underlinePtr;
-    int underline;
-    size_t width, height;	/* Dimensions of text bounding box */
-    size_t nFrags;		/* # fragments of text */
-    TextFragment fragments[1];	/* Information about each fragment of text */
-} TextLayout;
-
-/*
- * TextStyle --
- *
- * 	A somewhat convenient structure to hold text attributes that determine
- * 	how a text string is to be displayed on the screen or drawn with
- * 	PostScript commands.  The alternative is to pass lots of parameters to
- * 	the drawing and printing routines. This seems like a more efficient
- * 	and less cumbersome way of passing parameters.
- */
-typedef struct {
-    unsigned int state;		/* If non-zero, indicates to draw text
-				 * in the active color */
-    XColor *color;		/* Color to draw the text. */
-    Blt_Font font;		/* Font to use to draw text */
-    Blt_Background bg;		/* Background color of text.  This is also
-				 * used for drawing disabled text. */
-    float angle;		/* Rotation of text in degrees. */
-    Tk_Justify justify;		/* Justification of the text string. This
-				 * only matters if the text is composed
-				 * of multiple lines. */
-    Tk_Anchor anchor;		/* Indicates how the text is anchored around
-				 * its x,y coordinates. */
-    Blt_Pad xPad, yPad;		/* # pixels padding of around text region. */
-    unsigned short int leader;	/* # pixels spacing between lines of text. */
-    short int underline;
-    /* Private fields. */
-    unsigned short flags;
-    GC gc;			/* GC used to draw the text */
-} TextStyle;
-
-BLT_EXTERN TextLayout *Blt_Ts_CreateLayout(const char *string, int length, 
-	TextStyle *tsPtr);
-
-BLT_EXTERN void Blt_Ts_DrawLayout(Tk_Window tkwin, Drawable drawable, 
-	TextLayout *textPtr, TextStyle *tsPtr, int x, int y, int maxLength);
-
-BLT_EXTERN void Blt_Ts_GetExtents(TextStyle *tsPtr, const char *text, 
-	unsigned int *widthPtr, unsigned int *heightPtr);
-
-BLT_EXTERN void Blt_Ts_ResetStyle(Tk_Window tkwin, TextStyle *tsPtr);
-
-BLT_EXTERN void Blt_Ts_FreeStyle(Display *display, TextStyle *tsPtr);
-
-BLT_EXTERN void Blt_Ts_SetDrawStyle (TextStyle *tsPtr, Blt_Font font, GC gc, 
-	XColor *fgColor, float angle, Tk_Anchor anchor, Tk_Justify justify, 
-	int leader);
-
-BLT_EXTERN void Blt_Ts_SetPrintStyle(TextStyle *tsPtr, Blt_Font font, 
-	XColor *fgColor, XColor *bgColor, float angle, Tk_Anchor anchor, 
-	Tk_Justify justify, int leader);
-
-BLT_EXTERN void Blt_DrawText(Tk_Window tkwin, Drawable drawable, 
-	const char *string, TextStyle *tsPtr, int x, int y);
-
-BLT_EXTERN void Blt_DrawText2(Tk_Window tkwin, Drawable drawable, 
-	const char *string, TextStyle *tsPtr, int x, int y, Dim2D * dimPtr);
-
-BLT_EXTERN Pixmap Blt_Ts_Bitmap(Tk_Window tkwin, TextLayout *textPtr, 
-	TextStyle *tsPtr, int *widthPtr, int *heightPtr, int maxLength);
-
-BLT_EXTERN int Blt_DrawTextWithRotatedFont(Tk_Window tkwin, Drawable drawable, 
-	float angle, TextStyle *tsPtr, TextLayout *textPtr, int x, int y, 
-	int maxLength);
-
-BLT_EXTERN void Blt_DrawLayout(Tk_Window tkwin, Drawable drawable, GC gc, 
-	Blt_Font font, int depth, float angle, int x, int y, 
-	TextLayout *layoutPtr, int maxLength);
-
-BLT_EXTERN void Blt_GetTextExtents(Blt_Font font, int leader, const char *text, 
-	int textLen, unsigned int *widthPtr, unsigned int *heightPtr);
-
-BLT_EXTERN void Blt_RotateStartingTextPositions(TextLayout *textPtr, 
-	float angle);
-
-BLT_EXTERN Tk_TextLayout Blt_ComputeTextLayout(Blt_Font font, 
-	const char *string, int numChars, int wrapLength, Tk_Justify justify, 
-	int flags, int *widthPtr, int *heightPtr);
-
-BLT_EXTERN void Blt_DrawTextLayout(Display *display, Drawable drawable, GC gc, 
-	Tk_TextLayout layout, int x, int y, int firstChar, int lastChar);
-
-BLT_EXTERN int Blt_CharBbox(Tk_TextLayout layout, int index, int *xPtr, 
-	int *yPtr, int *widthPtr, int *heightPtr);
-
-BLT_EXTERN void Blt_UnderlineTextLayout(Display *display, Drawable drawable,
-	GC gc, Tk_TextLayout layout, int x, int y, int underline);
-
-BLT_EXTERN void Blt_Ts_UnderlineLayout(Tk_Window tkwin, Drawable drawable,
-	TextLayout *layoutPtr, TextStyle *tsPtr, int x, int y, int xMax);
-
-BLT_EXTERN void Blt_FreeTextLayout(Tk_TextLayout layout);
-
-#define Blt_Ts_GetAnchor(ts)		((ts).anchor)
-#define Blt_Ts_GetAngle(ts)		((ts).angle)
-#define Blt_Ts_GetBackground(ts)	((ts).bg)
-#define Blt_Ts_GetFont(ts)		((ts).font)
-#define Blt_Ts_GetForeground(ts)	((ts).color)
-#define Blt_Ts_GetJustify(ts)		((ts).justify)
-#define Blt_Ts_GetLeader(ts)		((ts).leader)
-
-#define Blt_Ts_SetAnchor(ts, a)	((ts).anchor = (a))
-#define Blt_Ts_SetAngle(ts, r)		((ts).angle = (float)(r))
-#define Blt_Ts_SetBackground(ts, b)	((ts).bg = (b))
-#define Blt_Ts_SetFont(ts, f)		\
-	(((ts).font != (f)) ? ((ts).font = (f), (ts).flags |= UPDATE_GC) : 0)
-#define Blt_Ts_SetForeground(ts, c)    \
-	(((ts).color != (c)) ? ((ts).color = (c), (ts).flags |= UPDATE_GC) : 0)
-#define Blt_Ts_SetGC(ts, g)	((ts).gc = (g))
-#define Blt_Ts_SetJustify(ts, j)	((ts).justify = (j))
-#define Blt_Ts_SetLeader(ts, l)	((ts).leader = (l))
-#define Blt_Ts_SetPadding(ts, l, r, t, b)    \
-	((ts).xPad.side1 = (l), \
-	(ts).xPad.side2 = (r),  \
-	(ts).yPad.side1 = (t),  \
-	(ts).yPad.side2 = (b))
-#define Blt_Ts_SetState(ts, s)		((ts).state = (s))
-#define Blt_Ts_SetUnderline(ts, ul)	((ts).underline = (ul))
-
-#define Blt_Ts_InitStyle(ts)		\
-	((ts).anchor = TK_ANCHOR_NW, \
-	(ts).color = (XColor *)NULL, \
-	(ts).font = NULL, \
-	(ts).justify = TK_JUSTIFY_LEFT, \
-	(ts).leader = 0, \
-	(ts).underline = -1, \
-	(ts).xPad.side1 = (ts).xPad.side2 = 0, \
-	(ts).yPad.side1 = (ts).yPad.side2 = 0, \
-	(ts).state = 0, \
-	(ts).flags = 0, \
-        (ts).gc = NULL, \
-	(ts).angle = 0.0)
-
-#endif /* _BLT_TEXT_H */
diff --git a/blt3.0/src/bltTile.c b/blt3.0/src/bltTile.c
deleted file mode 100644
index 4271bf8..0000000
--- a/blt3.0/src/bltTile.c
+++ /dev/null
@@ -1,1315 +0,0 @@
-
-/*
- * bltTile.c --
- *
- * This module manages images for tiled backgrounds for the BLT toolkit.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltChain.h"
-#include "bltHash.h"
-#include "bltImage.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-#include "bltTile.h"
-#include "bltBitmap.h"
-
-#define TILE_THREAD_KEY	"BLT Tile Data"
-#define TILE_MAGIC ((unsigned int) 0x46170277)
-
-typedef struct {
-    Blt_HashTable tileTable;	/* Hash table of tile structures keyed by the
-				 * name of the image. */
-    Tcl_Interp *interp;
-} TileInterpData;
-
-typedef struct {
-    char *name;			/* Name of image used to generate the pixmap.*/
-    Display *display;		/* Display where pixmap was created. */
-    int flags;			/* See definitions below. */
-    Tcl_Interp *interp;
-
-    Blt_HashEntry *hashPtr;	/* Pointer to hash table location */
-
-    Blt_HashTable *tablePtr;
-
-    Pixmap pixmap;		/* Pixmap generated from image. */
-
-    Pixmap mask;		/* Monochrome pixmap used as a transparency
-				 * mask. */
-
-    GC gc;			/* GC */
-    Tk_Image tkImage;		/* Tk image token. */
-    Blt_Chain clients;		/* Chain of clients sharing this tile. */
-
-    int width, height;		/* Dimensions of the tile itself. */
-} Tile;
-
-#define NOTIFY_PENDING	1	/* If set, indicates that the image associated
-				 * with the tile has been updated or deleted.
-				 * The tile pixmap will be changed and the
-				 * clients of the tile will be notified (if
-				 * they supplied a TileChangedProc routine. */
-
-typedef struct _Blt_TileClient {
-    unsigned int magic;
-
-    Tk_Window tkwin;		/* Reference window. */
-
-    int xOrigin, yOrigin;	/* Origin of tile relative to the reference
-				 * window. */
-
-    Blt_TileChangedProc *notifyProc; /* If non-NULL, routine to call to when
-				 * tile image changes. */
-    ClientData clientData;	/* Data to pass to when calling the above
-				 * routine. */
-    Tile *tilePtr;		/* Pointer to actual tile information */
-    Blt_ChainLink link;		/* Pointer to client entry in the server's
-				 * client list.  Used to delete the client */
-} TileClient;
-
-typedef struct {
-    Display *display;
-    Tk_Uid nameId;
-    int depth;
-} TileKey;
-
-#ifdef notdef    
-#define DEF_TILE_BORDER		STD_BACKGROUND
-#define DEF_TILE_BORDER_WIDTH	"0"
-#define DEF_TILE_RESIZE		"none"
-#define DEF_TILE_X_ORIGIN	"0"
-#define DEF_TILE_Y_ORIGIN	"0"
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_TILE_BORDER_COLOR, Blt_Offset(Tile, border), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_TILE_BORDERWIDTH, Blt_Offset(Tile, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-image", "image", "Image", (char *)NULL,
-        Blt_Offset(Tile, image), BLT_CONFIG_DONT_SET_DEFAULT, &imageOption},
-    {BLT_CONFIG_CUSTOM, "-relativeto", "relativeTo", "RelativeTo", (char *)NULL,
-        Blt_Offset(Tile, relative), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&relativeOption},
-    {BLT_CONFIG_CUSTOM, "-resize", "resize", "Resize", (char *)NULL,
-        Blt_Offset(Tile, resize), BLT_CONFIG_DONT_SET_DEFAULT, 
-	&resizeOption},
-    {BLT_CONFIG_INT, "-xorigin", "xOrigin", "Origin", DEF_TILE_X_ORIGIN, 
-	Blt_Offset(Tile, xOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_INT, "-yorigin", "yOrigin", "Origin", DEF_TILE_Y_ORIGIN, 
-	Blt_Offset(Tile, yOrigin), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0}
-};
-#endif
-
-static Tcl_IdleProc UpdateTile;
-static Tk_ImageChangedProc ImageChangedProc;
-static Tcl_InterpDeleteProc TileInterpDeleteProc;
-
-static TileInterpData *GetTileInterpData(Tcl_Interp *interp);
-static void DestroyClient(TileClient *clientPtr);
-static void DestroyTile(Tile *tilePtr);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * RedrawTile --
- *
- *	Generates a pixmap and draws the tile image into it.  Also a
- *	tranparency mask is possibly generated from the image.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RedrawTile(Tk_Window tkwin, Tile *tilePtr)
-{
-    GC newGC;
-    Tk_PhotoHandle photo;
-    XGCValues gcValues;
-    int width, height;
-    unsigned int gcMask;
-    
-    Tk_SizeOfImage(tilePtr->tkImage, &width, &height);
-
-    Tk_MakeWindowExist(tkwin);
-    if ((width != tilePtr->width) || (height != tilePtr->height)) {
-	Pixmap pixmap;
-
-	/*
-	 * Create the new pixmap *before* destroying the old one.  I don't why
-	 * this happens, but if you delete the old pixmap first, the old
-	 * pixmap sometimes gets used in the client's GCs.  I suspect it has
-	 * something to do with the way Tk reallocates X resource identifiers.
-	 */
-	pixmap = Tk_GetPixmap(Tk_Display(tkwin), Tk_WindowId(tkwin), width, 
-			      height, Tk_Depth(tkwin));
-	if (tilePtr->pixmap != None) {
-	    Tk_FreePixmap(Tk_Display(tkwin), tilePtr->pixmap);
-	}
-	tilePtr->pixmap = pixmap;
-    }
-    Tk_RedrawImage(tilePtr->tkImage, 0, 0, width, height, tilePtr->pixmap, 
-	0, 0);
-    
-    gcMask = (GCTile | GCFillStyle);
-    gcValues.fill_style = FillTiled;
-    gcValues.tile = tilePtr->pixmap;
-    newGC = Tk_GetGC(tkwin, gcMask, &gcValues);
-    if (tilePtr->gc != NULL) {
-	Tk_FreeGC(Tk_Display(tkwin), tilePtr->gc);
-    }
-    tilePtr->gc = newGC;
-    tilePtr->width = width;
-    tilePtr->height = height;
-
-    if (tilePtr->mask != None) {
-#if defined(WIN32) || defined(MACOSX)
-	Tk_FreePixmap(Tk_Display(tkwin), tilePtr->mask);
-#else 
-	XFreePixmap(Tk_Display(tkwin), tilePtr->mask);
-#endif /* WIN32 or MACOSX */
-	tilePtr->mask = None;
-    }
-    photo = Tk_FindPhoto(tilePtr->interp, 
-		  Blt_Image_Name(tilePtr->tkImage));
-    if (photo != NULL) {
-	Tk_PhotoImageBlock src;
-
-	Tk_PhotoGetImage(photo, &src);
-	if ((src.offset[3] < src.pixelSize) && (src.offset[3] >= 0)) {
-	    tilePtr->mask = Blt_PhotoImageMask(tkwin, src);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UpdateTile --
- *
- *	It would be better if Tk checked for NULL proc pointers.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UpdateTile(ClientData clientData)
-{
-    Tile *tilePtr = (Tile *)clientData;
-    TileClient *clientPtr;
-    Blt_ChainLink link;
-
-    tilePtr->flags &= ~NOTIFY_PENDING;
-    if (Blt_Image_IsDeleted(tilePtr->tkImage)) {
-	if (tilePtr->pixmap != None) {
-	    Tk_FreePixmap(tilePtr->display, tilePtr->pixmap);
-	}
-	tilePtr->pixmap = None;
-    } else {
-	/* Pick any client window to generate the new pixmap. */
-	link = Blt_Chain_FirstLink(tilePtr->clients);
-	clientPtr = Blt_Chain_GetValue(link);
-	RedrawTile(clientPtr->tkwin, tilePtr);
-    }
-
-    /* Notify each of the tile's clients that the pixmap has changed. */
-
-    for (link = Blt_ChainFirstLink(tilePtr->clients); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	clientPtr = Blt_Chain_GetValue(link);
-	if (clientPtr->notifyProc != NULL) {
-	    (*clientPtr->notifyProc) (clientPtr->clientData, clientPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImageChangedProc
- *
- *	The Tk image has changed or been deleted, redraw the pixmap
- *	tile.
- *
- *	Note:	As of Tk 4.2 (rechecked in 8.3), if you redraw Tk 
- *		images from a Tk_ImageChangedProc you'll get a coredump.  As a
- *		workaround, we have to simulate how the Tk widgets use images
- *		and redraw within an idle event.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-ImageChangedProc(
-    ClientData clientData,
-    int x, int y,		/* Not used. */
-    int width, int height,	/* Not used. */
-    int imageWidth, int imageHeight) /* Not used. */
-{
-    Tile *tilePtr = (Tile *) clientData;
-
-    if (!(tilePtr->flags & NOTIFY_PENDING)) {
-	Tcl_DoWhenIdle(UpdateTile, tilePtr);
-	tilePtr->flags |= NOTIFY_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTile --
- *
- *	Deletes the core tile structure, including the pixmap representing the
- *	tile.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTile(Tile *tilePtr)
-{
-    Blt_ChainLink link;
-    TileClient *clientPtr;
-
-    if (tilePtr->flags & NOTIFY_PENDING) {
-	Tcl_CancelIdleCall(UpdateTile, tilePtr);
-    }
-    for (link = Blt_Chain_FirstLink(tilePtr->clients); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	clientPtr = Blt_Chain_GetValue(link);
-	Blt_Free(clientPtr);
-    }
-    Blt_Chain_Destroy(tilePtr->clients);
-
-    if (tilePtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(tilePtr->tablePtr, tilePtr->hashPtr);
-    }
-    if (tilePtr->pixmap != None) {
-	Tk_FreePixmap(tilePtr->display, tilePtr->pixmap);
-    }
-    Tk_FreeImage(tilePtr->tkImage);
-
-    if (tilePtr->gc != NULL) {
-	Tk_FreeGC(tilePtr->display, tilePtr->gc);
-    }
-    if (tilePtr->name != NULL) {
-	Blt_Free(tilePtr->name);
-    }
-    Blt_Free(tilePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTile --
- *
- *	Creates a tile server.  A tile server manages a single image, possibly
- *	shared by several clients.  Clients will be updated (if requested) by
- *	the server if the image changes, so they know to redraw themselves.
- *	For X11 the image is drawn into a pixmap that is used in a new GC as
- *	its tile.  For Windows we have to do the tiling ourselves by redrawing
- *	the image across the drawing area (see Blt_TileRectangle and
- *	Blt_TilePolygon).
- *
- * Results:
- *	Returns a pointer to the new tile server.  If the image name does not
- *	represent a Tk image, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Tile *
-CreateTile(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-    char *imageName)
-{
-    Tile *tilePtr;
-    Tk_Image tkImage;
-
-    tilePtr = Blt_AssertCalloc(1, sizeof(Tile));
-
-    /* Get the image. Funnel all change notifications to a single routine. */
-    tkImage = Tk_GetImage(interp, tkwin, imageName, ImageChangedProc,
-	tilePtr);
-    if (tkImage == NULL) {
-	Blt_Free(tilePtr);
-	return NULL;
-    }
-
-    /* Initialize the tile server. */
-    tilePtr->display = Tk_Display(tkwin);
-    tilePtr->interp = interp;
-    tilePtr->name = Blt_AssertStrdup(imageName);
-    tilePtr->clients = Blt_Chain_Create();
-    tilePtr->tkImage = tkImage;
-    RedrawTile(tkwin, tilePtr);
-    return tilePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyClient --
- *
- *	Removes the client from the servers's list of clients and memory used
- *	by the client token is released.  When the last client is deleted, the
- *	server is also removed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyClient(TileClient *clientPtr)
-{
-    Tile *tilePtr;
-    tilePtr = clientPtr->tilePtr;
-
-    /* Remove the client from the server's list */
-    if (clientPtr->link != NULL) {
-	Blt_Chain_DeleteLink(tilePtr->clients, clientPtr->link);
-    }
-    if (Blt_Chain_GetLength(tilePtr->clients) == 0) {
-	/*
-	 * If there are no more clients of the tile, then remove the pixmap,
-	 * image, and the server record.
-	 */
-	DestroyTile(tilePtr);
-    }
-    Blt_Free(clientPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateClient --
- *
- *	Returns a token to a tile (possibly shared by many clients).  A client
- *	uses the token to query or display the tile.  Clients request tiles by
- *	their image names.  Each tile is known by its display, screen depth,
- *	and image name.  The tile server tracks what clients are using the
- *	tile and notifies them (via a callback) whenever the tile changes. If
- *	no server exists already, one is created on-the-fly.
- *
- * Results:
- *	A pointer to the newly created client (i.e. tile).
- *
- *---------------------------------------------------------------------------
- */
-static TileClient *
-CreateClient(
-    Tcl_Interp *interp,
-    Tk_Window tkwin,
-
-    char *name)
-{
-    TileClient *clientPtr;
-    Tile *tilePtr;
-    TileInterpData *dataPtr;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    TileKey key;
-
-    dataPtr = GetTileInterpData(interp);
-
-    key.nameId = Tk_GetUid(name);
-    key.display = Tk_Display(tkwin);
-    key.depth = Tk_Depth(tkwin);
-    hPtr = Blt_CreateHashEntry(&dataPtr->tileTable, (char *)&key, &isNew);
-    if (isNew) {
-	tilePtr = CreateTile(interp, tkwin, name);
-	if (tilePtr == NULL) {
-	    Blt_DeleteHashEntry(&dataPtr->tileTable, hPtr);
-	    return NULL;
-	}
-	tilePtr->hashPtr = hPtr;
-	tilePtr->tablePtr = &dataPtr->tileTable;
-	Blt_SetHashValue(hPtr, tilePtr);
-    } else {
-	tilePtr = Blt_GetHashValue(hPtr);
-    }
-    clientPtr = Blt_AssertCalloc(1, sizeof(TileClient));
-    /* Initialize client information. */
-    clientPtr->magic = TILE_MAGIC;
-    clientPtr->tkwin = tkwin;
-    clientPtr->link = Blt_Chain_Append(tilePtr->clients, clientPtr);
-    clientPtr->tilePtr = tilePtr;
-    return clientPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TileInterpDeleteProc --
- *
- *	This is called when the interpreter is deleted. All the tiles are
- *	specific to that interpreter are destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys the tile table.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TileInterpDeleteProc(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp)
-{
-    TileInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Tile *tilePtr;
-    
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->tileTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	tilePtr = Blt_GetHashValue(hPtr);
-	tilePtr->hashPtr = NULL;
-	DestroyTile(tilePtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->tileTable);
-    Tcl_DeleteAssocData(interp, TILE_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-static TileInterpData *
-GetTileInterpData(Tcl_Interp *interp)
-{
-    TileInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (TileInterpData *)
-	Tcl_GetAssocData(interp, TILE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(TileInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, TILE_THREAD_KEY, TileInterpDeleteProc, 
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->tileTable, sizeof(TileKey)/sizeof(int));
-    }
-    return dataPtr;
-}
-
-/* Public API for tiles. */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetTile
- *
- *	Convert the named image into a tile.
- *
- * Results:
- *	If the image is valid, a new tile is returned.  If the name does not
- *	represent a proper image, an error message is left in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-int
-Blt_GetTile(
-    Tcl_Interp *interp,		/* Interpreter to report results back to */
-    Tk_Window tkwin,		/* Window on the same display as tile */
-    char *imageName,		/* Name of image */
-    Blt_Tile *tokenPtr)		/* (out) Returns the allocated tile token. */
-{
-    TileClient *clientPtr;
-
-    clientPtr = CreateClient(interp, tkwin, imageName);
-    if (clientPtr == NULL) {
-	return TCL_ERROR;
-    } 
-    *tokenPtr = clientPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeTile
- *
- *	Release the resources associated with the tile.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Memory and X resources are freed.  Bookkeeping information about the
- *	tile (i.e. width, height, and name) is discarded.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_FreeTile(TileClient *clientPtr) /* Tile to be deleted */
-{
-    if ((clientPtr == NULL) || (clientPtr->magic != TILE_MAGIC)) {
-	return;			/* No tile */
-    }
-    DestroyClient(clientPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NameOfTile
- *
- *	Returns the name of the image from which the tile was generated.
- *
- * Results:
- *	The name of the image is returned.  The name is not unique.  Many
- *	tiles may use the same image.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-const char *
-Blt_NameOfTile(TileClient *clientPtr) /* Tile to query */
-{
-    if (clientPtr == NULL) {
-	return "";
-    }
-    if (clientPtr->magic != TILE_MAGIC) {
-	return "not a tile";
-    }
-    return clientPtr->tilePtr->name;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PixmapOfTile
- *
- *	Returns the pixmap of the tile.
- *
- * Results:
- *	The X pixmap used as the tile is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-Pixmap
-Blt_PixmapOfTile(TileClient *clientPtr) /* Tile to query */
-{
-    if ((clientPtr == NULL) || (clientPtr->magic != TILE_MAGIC)) {
-	return None;
-    }
-    return clientPtr->tilePtr->pixmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SizeOfTile
- *
- *	Returns the width and height of the tile.
- *
- * Results:
- *	The width and height of the tile are returned.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_SizeOfTile(
-    TileClient *clientPtr,	/* Tile to query */
-    int *widthPtr, 
-    int *heightPtr)		/* Returned dimensions of the tile (out) */
-{
-    if ((clientPtr == NULL) || (clientPtr->magic != TILE_MAGIC)) {
-	*widthPtr = *heightPtr = 0;
-	return;			/* No tile given. */
-    }
-    *widthPtr = clientPtr->tilePtr->width;
-    *heightPtr = clientPtr->tilePtr->height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SetTileChangedProc
- *
- *	Sets the routine to called when an image changes.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The designated routine will be called the next time the image
- *	associated with the tile changes.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-void
-Blt_SetTileChangedProc(
-    TileClient *clientPtr,		/* Tile to query */
-    Blt_TileChangedProc *notifyProc,
-    ClientData clientData)
-{
-    if ((clientPtr != NULL) && (clientPtr->magic == TILE_MAGIC)) {
-	clientPtr->notifyProc = notifyProc;
-	clientPtr->clientData = clientData;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SetTileOrigin --
- *
- *	Set the pattern origin of the tile to a common point (i.e. the origin
- *	(0,0) of the top level window) so that tiles from two different
- *	widgets will match up.  This done by setting the GCTileStipOrigin
- *	field is set to the translated origin of the toplevel window in the
- *	hierarchy.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The GCTileStipOrigin is reset in the GC.  This will cause the tile
- *	origin to change when the GC is used for drawing.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-void
-Blt_SetTileOrigin(
-    Tk_Window tkwin,
-    TileClient *clientPtr,
-    int x, int y)
-{
-    while (!Tk_IsTopLevel(tkwin)) {
-	x += Tk_X(tkwin) + Tk_Changes(tkwin)->border_width;
-	y += Tk_Y(tkwin) + Tk_Changes(tkwin)->border_width;
-	tkwin = Tk_Parent(tkwin);
-    }
-    XSetTSOrigin(Tk_Display(tkwin), clientPtr->tilePtr->gc, -x, -y);
-    clientPtr->xOrigin = -x;
-    clientPtr->yOrigin = -y;
-}
-
-void
-Blt_SetTSOrigin(
-    Tk_Window tkwin,
-    TileClient *clientPtr,
-    int x, int y)
-{
-    XSetTSOrigin(Tk_Display(tkwin), clientPtr->tilePtr->gc, x, y);
-    clientPtr->xOrigin = x;
-    clientPtr->yOrigin = y;
-}
-
-#ifdef WIN32
-static int tkpWinRopModes[] =
-{
-    R2_BLACK,			/* GXclear */
-    R2_MASKPEN,			/* GXand */
-    R2_MASKPENNOT,		/* GXandReverse */
-    R2_COPYPEN,			/* GXcopy */
-    R2_MASKNOTPEN,		/* GXandInverted */
-    R2_NOT,			/* GXnoop */
-    R2_XORPEN,			/* GXxor */
-    R2_MERGEPEN,		/* GXor */
-    R2_NOTMERGEPEN,		/* GXnor */
-    R2_NOTXORPEN,		/* GXequiv */
-    R2_NOT,			/* GXinvert */
-    R2_MERGEPENNOT,		/* GXorReverse */
-    R2_NOTCOPYPEN,		/* GXcopyInverted */
-    R2_MERGENOTPEN,		/* GXorInverted */
-    R2_NOTMASKPEN,		/* GXnand */
-    R2_WHITE			/* GXset */
-};
-#define MASKPAT		0x00E20746 /* dest = (src & pat) | (!src & dst) */
-#define COPYFG		0x00CA0749 /* dest = (pat & src) | (!pat & dst) */
-#define COPYBG		0x00AC0744 /* dest = (!pat & src) | (pat & dst) */
-
-static void
-TileArea(
-    HDC srcDC,			/* Source device context. */
-    HDC destDC,			/* Destination device context. */
-    HDC maskDC,			/* If non-NULL, device context of the tile
-				 * mask. */
-    TileClient *clientPtr,
-    int x, int y, 
-    int width, int height)
-{
-    Tile *tilePtr = clientPtr->tilePtr;
-    int destX, destY;
-    int destWidth, destHeight;
-    int srcX, srcY;
-    int startX, startY;		/* Starting upper left corner of region. */
-    int delta;
-    int left, top, right, bottom;
-
-    startX = x;
-    if (x < clientPtr->xOrigin) {
-	delta = (clientPtr->xOrigin - x) % tilePtr->width;
-	if (delta > 0) {
-	    startX -= (tilePtr->width - delta);
-	}
-    } else if (x > clientPtr->xOrigin) {
-	delta = (x - clientPtr->xOrigin) % tilePtr->width;
-	if (delta > 0) {
-	    startX -= delta;
-	}
-    }
-    startY = y;
-    if (y < clientPtr->yOrigin) {
-	delta = (clientPtr->yOrigin - y) % tilePtr->height;
-	if (delta > 0) {
-	    startY -= (tilePtr->height - delta);
-	}
-    } else if (y >= clientPtr->yOrigin) {
-	delta = (y - clientPtr->yOrigin) % tilePtr->height;
-	if (delta > 0) {
-	    startY -= delta;
-	}
-    }
-#ifdef notdef
-    PurifyPrintf("tile is (%d,%d,%d,%d)\n", 
-		 clientPtr->xOrigin, clientPtr->yOrigin, 
-		 tilePtr->width, tilePtr->height);
-    PurifyPrintf("region is (%d,%d,%d,%d)\n", x, y, width, height);
-    PurifyPrintf("starting at %d,%d\n", startX, startY);
-#endif
-    left = x;
-    right = x + width;
-    top = y;
-    bottom = y + height;
-    for (y = startY; y < bottom; y += tilePtr->height) {
-	srcY = 0;
-	destY = y;
-	destHeight = tilePtr->height;
-	if (y < top) {
-	    srcY = (top - y);
-	    destHeight = tilePtr->height - srcY;
-	    destY = top;
-	} 
-	if ((destY + destHeight) > bottom) {
-	    destHeight = (bottom - destY);
-	}
-	for (x = startX; x < right; x += tilePtr->width) {
-	    srcX = 0;
-	    destX = x;
-	    destWidth = tilePtr->width;
-	    if (x < left) {
-		srcX = (left - x);
-		destWidth = tilePtr->width - srcX;
-		destX = left;
-	    } 
-	    if ((destX + destWidth) > right) {
-		destWidth = (right - destX);
-	    }
-#ifdef notdef
-	    PurifyPrintf("drawing pattern (%d,%d,%d,%d) at %d,%d\n",
-		 srcX , srcY, destWidth, destHeight, destX, destY);
-#endif
-	    if (tilePtr->mask != None) { /* With transparency. */
-#ifdef notdef
-		HDC maskDC;
-		TkWinDCState maskState;
-
-		maskDC = TkWinGetDrawableDC(tilePtr->display, 
-			tilePtr->mask, &maskState);
-		SetBkColor(destDC, RGB(255, 255, 255));      
-		SetTextColor(destDC, RGB(0, 0, 0));
-#endif
-		BitBlt(destDC, destX, destY, destWidth, destHeight, maskDC, 
-		       0, 0, SRCAND);
-		BitBlt(destDC, destX, destY, destWidth, destHeight, srcDC, 
-		       srcX, srcY, SRCPAINT);
-#ifdef notdef
-		TkWinReleaseDrawableDC(tilePtr->mask, maskDC, &maskState);
-#endif
-	    } else {		/* Opaque tile. */
-	        BitBlt(destDC, destX, destY, destWidth, destHeight, 
-		       srcDC, srcX, srcY, SRCCOPY);
-	    }
-	}
-    }
-}
-
-void
-Blt_TilePolygon(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    XPoint *points,
-    int nPoints)
-{
-    HBITMAP oldBitmap;
-    HDC hDC, memDC;
-    HRGN hRgn;
-    POINT *wp, *winPts;
-    int left, right, top, bottom;
-    Tile *tilePtr;
-    TkWinDCState state;
-    TkWinDrawable *twdPtr;
-    XPoint *pend, *p;
-    int fillMode;    
-    int width, height;
-    
-    if (drawable == None) {
-	return;
-    }
-    tilePtr = clientPtr->tilePtr;
-
-    /* Determine the bounding box of the polygon. */
-    left = right = points[0].x;
-    top = bottom = points[0].y;
-    for (p = points, pend = p + nPoints; p < pend; p++) {
-	if (p->x < left) {
-	    left = p->x;
-	} 
-	if (p->x > right) {
-	    right = p->x;
-	}
-	if (p->y < top) {
-	    top = p->y;
-	} 
-	if (p->y > bottom) {
-	    bottom = p->y;
-	}
-    }
-    width = right - left + 1;
-    height = bottom - top + 1;
-
-    /* Allocate and fill an array of POINTS to create the polygon path. */
-    wp = winPts = Blt_AssertMalloc(sizeof(POINT) * nPoints);
-    for (p = points; p < pend; p++) {
-	wp->x = p->x - left;
-	wp->y = p->y - top;
-	wp++;
-    }
-
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[tilePtr->gc->function]);
-    fillMode = (tilePtr->gc->fill_rule == EvenOddRule) ? ALTERNATE : WINDING;
-
-    /* Use the polygon as a clip path. */
-    LPtoDP(hDC, winPts, nPoints);
-    hRgn = CreatePolygonRgn(winPts, nPoints, fillMode);
-    SelectClipRgn(hDC, hRgn);
-    OffsetClipRgn(hDC, left, top);
-
-    Blt_Free(winPts);
-
-    twdPtr = (TkWinDrawable *)tilePtr->pixmap;
-    memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-    
-    /* Tile the bounding box. */
-    if (tilePtr->mask != None) {
-	TkWinDCState maskState;
-	HDC maskDC;
-
-	maskDC = TkWinGetDrawableDC(tilePtr->display, tilePtr->mask, 
-	    &maskState);
-	SetBkColor(hDC, RGB(255, 255, 255));      
-	SetTextColor(hDC, RGB(0, 0, 0));
-	TileArea(memDC, hDC, maskDC, clientPtr, left, top, width, height);
-	TkWinReleaseDrawableDC(tilePtr->mask, maskDC, &maskState);
-    } else {
-	TileArea(memDC, hDC, NULL, clientPtr, left, top, width, height);
-    }
-    SelectBitmap(memDC, oldBitmap);
-    DeleteDC(memDC);
-    SelectClipRgn(hDC, NULL);
-    DeleteRgn(hRgn);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-void
-Blt_TileRectangle(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    int x, int y,
-    unsigned int width, 
-    unsigned int height)
-{
-    HBITMAP oldBitmap;
-    HDC hDC, memDC;
-    Tile *tilePtr;
-    TkWinDCState state;
-    TkWinDrawable *twdPtr;
-
-    if (drawable == None) {
-	return;
-    }
-    tilePtr = clientPtr->tilePtr;
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[tilePtr->gc->function]);
-
-    twdPtr = (TkWinDrawable *)tilePtr->pixmap;
-    memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-
-    /* Tile the bounding box. */
-    if (tilePtr->mask != None) {
-	TkWinDCState maskState;
-	HDC maskDC;
-
-	maskDC = TkWinGetDrawableDC(tilePtr->display, tilePtr->mask, 
-	    &maskState);
-	SetBkColor(hDC, RGB(255, 255, 255));      
-	SetTextColor(hDC, RGB(0, 0, 0));
-	TileArea(memDC, hDC, maskDC, clientPtr, x, y, width, height);
-	TkWinReleaseDrawableDC(tilePtr->mask, maskDC, &maskState);
-    } else {
-	TileArea(memDC, hDC, NULL, clientPtr, x, y, width, height);
-    }
-    SelectBitmap(memDC, oldBitmap);
-    DeleteDC(memDC);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-void
-Blt_TileRectangles(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    XRectangle *rectangles,
-    int nRectangles)
-{
-    HBITMAP oldBitmap;
-    HDC hDC, memDC;
-    Tile *tilePtr;
-    TkWinDCState state;
-    TkWinDrawable *twdPtr;
-
-    if (drawable == None) {
-	return;
-    }
-
-    tilePtr = clientPtr->tilePtr;
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[tilePtr->gc->function]);
-
-    twdPtr = (TkWinDrawable *)tilePtr->pixmap;
-    memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-
-    /* Tile the bounding box. */
-    if (tilePtr->mask != None) {
-	XRectangle *rp, *rend;
-	TkWinDCState maskState;
-	HDC maskDC;
-
-	maskDC = TkWinGetDrawableDC(tilePtr->display, tilePtr->mask, 
-	    &maskState);
-	SetBkColor(hDC, RGB(255, 255, 255));      
-	SetTextColor(hDC, RGB(0, 0, 0));
-	for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	    TileArea(memDC, hDC, maskDC, clientPtr, (int)rp->x, (int)rp->y, 
-		(int)rp->width, (int)rp->height);
-	}
-	TkWinReleaseDrawableDC(tilePtr->mask, maskDC, &maskState);
-    } else {
-	XRectangle *rp, *rend;
-
-	for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	    TileArea(memDC, hDC, NULL, clientPtr, (int)rp->x, (int)rp->y, 
-		(int)rp->width, (int)rp->height);
-	}
-    }
-    SelectBitmap(memDC, oldBitmap);
-    DeleteDC(memDC);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-#else 
-
-/*
- *---------------------------------------------------------------------------
- *
- * RectangleMask --
- *
- *	Creates a rectangular mask also stippled by the mask of the tile.
- *	This is used to draw the tiled polygon images with transparent areas.
- *
- * Results:
- *	A bitmap mask is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Pixmap
-RectangleMask(
-    Display *display,
-    Drawable drawable,
-    int x, int y,
-    unsigned int width, unsigned int height,
-    Pixmap mask,
-    int xOrigin, int yOrigin)
-{
-    GC gc;
-    Pixmap bitmap;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    bitmap = Tk_GetPixmap(display, drawable, width, height, 1);
-    gcMask = (GCForeground | GCBackground | GCFillStyle | 
-	      GCTileStipXOrigin | GCTileStipYOrigin | GCStipple);
-    gcValues.foreground = 0x1;
-    gcValues.background = 0x0;
-    gcValues.fill_style = FillOpaqueStippled;
-    gcValues.ts_x_origin = xOrigin - x;
-    gcValues.ts_y_origin = yOrigin - y;
-    gcValues.stipple = mask;
-    gc = XCreateGC(display, bitmap, gcMask, &gcValues);
-    XFillRectangle(display, bitmap, gc, 0, 0, width, height);
-    Blt_FreePrivateGC(display, gc);
-    return bitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TileRectangle --
- *
- *	Draws a rectangle filled by a tiled image.  This differs from the
- *	normal XFillRectangle call in that we also try to handle a
- *	transparency mask.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws the rectangle.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TileRectangle(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    int x, int y,
-    unsigned int width, unsigned int height)
-{
-    Tile *tilePtr;
-    Display *display;
-
-    display = Tk_Display(tkwin);
-    tilePtr = clientPtr->tilePtr;
-    if (clientPtr->tilePtr->mask != None) {
-	Pixmap mask;
-
-	mask = RectangleMask(display, drawable, x, y, width, height,
-		tilePtr->mask, clientPtr->xOrigin, clientPtr->yOrigin);
-	XSetClipMask(display, tilePtr->gc, mask);
-	XSetClipOrigin(display, tilePtr->gc, x, y);
-	XFillRectangle(display, drawable, tilePtr->gc, x, y, width, height);
-	XSetClipMask(display, tilePtr->gc, None);
-	XSetClipOrigin(display, tilePtr->gc, 0, 0);
-	Tk_FreePixmap(display, mask);
-    } else {
-	XFillRectangle(display, drawable, tilePtr->gc, x, y, width, height);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TileRectangles --
- *
- *	Draws rectangles filled by a tiled image.  This differs from the
- *	normal XFillRectangles call in that we also try to handle a
- *	transparency mask.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws the given rectangles.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TileRectangles(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    XRectangle rectangles[],
-    int nRectangles)
-{
-    Tile *tilePtr;
-
-    tilePtr = clientPtr->tilePtr;
-    if (tilePtr->mask != None) {
-	XRectangle *rp, *rend;
-
-	for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	    Blt_TileRectangle(tkwin, drawable, clientPtr, rp->x, rp->y, 
-		rp->width, rp->height);
-	}
-    } else {
-	XFillRectangles(Tk_Display(tkwin), drawable, tilePtr->gc, rectangles, 
-		nRectangles);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PolygonMask --
- *
- *	Creates a polygon shaped mask also stippled by the mask of the tile.
- *	This is used to draw the tiled polygon images with transparent areas.
- *
- * Results:
- *	A bitmap mask is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Pixmap
-PolygonMask(
-    Display *display,
-    XPoint *points,
-    int nPoints,
-    int x, int y, int width, int height,
-    Pixmap mask,
-    int xOrigin, int yOrigin)
-{
-    Pixmap bitmap;
-    XPoint *maskPts;
-
-    maskPts = Blt_Malloc(sizeof(XPoint) * nPoints);
-    if (maskPts == NULL) {
-	return None;
-    }
-    {
-	XPoint *dp, *pp, *pend;
-
-	dp = maskPts;
-	for (pp = points, pend = pp + nPoints; pp < pend; pp++) {
-	    dp->x = pp->x - x;
-	    dp->y = pp->y - y;
-	    dp++;
-	}
-    }
-
-    bitmap = Tk_GetPixmap(display, DefaultRootWindow(display), width, height,1);
-    {
-	GC gc;
-
-	gc = XCreateGC(display, bitmap, 0, NULL);
-	XFillRectangle(display, bitmap, gc, 0, 0, width, height);
-	XSetForeground(display, gc, 0x01);
-	XSetFillStyle(display, gc, FillStippled);
-	XSetTSOrigin(display, gc, xOrigin - x, yOrigin - y);
-	XSetStipple(display, gc, mask);
-	XFillPolygon(display, bitmap, gc, maskPts, nPoints, Complex, 
-		     CoordModeOrigin);
-	XFreeGC(display, gc);
-    }
-    Blt_Free(maskPts);
-    return bitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TilePolygon --
- *
- *	Draws a polygon filled by a tiled image.  This differs from the normal
- *	XFillPolygon call in that we also try to handle a transparency mask.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Draws the polygon.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TilePolygon(
-    Tk_Window tkwin,
-    Drawable drawable,
-    TileClient *clientPtr,
-    XPoint *points,
-    int nPoints)
-{
-    Tile *tilePtr;
-    Display *display;
-    
-    display = Tk_Display(tkwin);
-    tilePtr = clientPtr->tilePtr;
-    if (tilePtr->mask != None) {
-	XPoint *pp, *pend;
-	int left, right, top, bottom;
-	Pixmap mask;
-
-	/* Determine the bounding box of the polygon. */
-	left = right = points[0].x;
-	top = bottom = points[0].y;
-	for (pp = points, pend = pp + nPoints; pp < pend; pp++) {
-	    if (left > pp->x) {
-		left = pp->x;
-	    } else if (right < pp->x) {
-		right = pp->x;
-	    }
-	    if (top > pp->y) {
-		top = pp->y;
-	    } else if (bottom < pp->y) {
-		bottom = pp->y;
-	    }
-	}
-	mask = PolygonMask(display, points, nPoints, left, top, 
-		right - left + 1, bottom - top + 1, tilePtr->mask, 
-		clientPtr->xOrigin, clientPtr->yOrigin);
-	XSetClipMask(display, tilePtr->gc, mask);
-	XSetClipOrigin(display, tilePtr->gc, left, top);
-	XFillPolygon(display, drawable, tilePtr->gc, points, nPoints, 
-		Complex, CoordModeOrigin);
-	XSetClipMask(display, tilePtr->gc, None);
-	XSetClipOrigin(display, tilePtr->gc, 0, 0);
-	Tk_FreePixmap(display, mask);
-    } else {
-	XFillPolygon(display, drawable, tilePtr->gc, points, nPoints, Complex, 
-		CoordModeOrigin);
-    }
-}
-#endif /* WIN32 */
-
diff --git a/blt3.0/src/bltTile.h b/blt3.0/src/bltTile.h
deleted file mode 100644
index 48b484c..0000000
--- a/blt3.0/src/bltTile.h
+++ /dev/null
@@ -1,61 +0,0 @@
-
-/*
- * bltTile.h --
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef BLT_TILE_H
-#define BLT_TILE_H
-
-#define TILE_THREAD_KEY	"BLT Tile Data"
-#define TILE_MAGIC ((unsigned int) 0x46170277)
-
-typedef struct _Blt_TileClient *Blt_Tile; /* Opaque type for tiles */
-
-typedef void (Blt_TileChangedProc)(ClientData clientData, Blt_Tile tile);
-
-BLT_EXTERN int Blt_GetTile(Tcl_Interp *interp, Tk_Window tkwin, char *imageName,
-	Blt_Tile *tilePtr);
-
-BLT_EXTERN void Blt_FreeTile(Blt_Tile tile);
-
-BLT_EXTERN const char *Blt_NameOfTile(Blt_Tile tile);
-
-BLT_EXTERN void Blt_SetTileChangedProc(Blt_Tile tile, 
-	Blt_TileChangedProc *changeProc, ClientData clientData);
-
-BLT_EXTERN void Blt_TileRectangle(Tk_Window tkwin, Drawable drawable, 
-	Blt_Tile tile, int x, int y, unsigned int width, unsigned int height);
-BLT_EXTERN void Blt_TileRectangles(Tk_Window tkwin, Drawable drawable,
-	Blt_Tile tile, XRectangle *rectArr, int nRects);
-BLT_EXTERN void Blt_TilePolygon(Tk_Window tkwin, Drawable drawable, 
-	Blt_Tile tile, XPoint *pointArr, int nPoints);
-BLT_EXTERN Pixmap Blt_PixmapOfTile(Blt_Tile tile);
-
-BLT_EXTERN void Blt_SizeOfTile(Blt_Tile tile, int *widthPtr, int *heightPtr);
-
-BLT_EXTERN void Blt_SetTileOrigin(Tk_Window tkwin, Blt_Tile tile, int x, int y);
-
-BLT_EXTERN void Blt_SetTSOrigin(Tk_Window tkwin, Blt_Tile tile, int x, int y);
-
-#endif /* BLT_TILE_H */
diff --git a/blt3.0/src/bltTree.c b/blt3.0/src/bltTree.c
deleted file mode 100644
index da23c43..0000000
--- a/blt3.0/src/bltTree.c
+++ /dev/null
@@ -1,4349 +0,0 @@
-
-/*
- * bltTree.c --
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-/* TODO:
- *	Traces and notifiers should be in one list in tree object.
- *	Notifier is always fired.
- *	Incorporate first/next tag routines ?
- */
-
-#include "bltNsUtil.h"
-#include "bltArrayObj.h"
-#include "bltTree.h"
-
-static Tcl_InterpDeleteProc TreeInterpDeleteProc;
-static Blt_TreeApplyProc SizeApplyProc;
-static Tcl_IdleProc NotifyIdleProc;
-static Tcl_IdleProc TraceIdleProc;
-
-#define TREE_THREAD_KEY		"BLT Tree Data"
-#define TREE_MAGIC		((unsigned int) 0x46170277)
-#define TREE_DESTROYED		(1<<0)
-
-#define TREE_NODE_REBUILD_SIZE	3U
-
-typedef struct _Blt_TreeNode Node;
-typedef struct _Blt_Tree Tree;
-typedef struct _Blt_TreeObject TreeObject;
-typedef struct _Blt_TreeValue Value;
-
-/*
- * Blt_TreeValue --
- *
- *	A tree node may have zero or more data fields or values that are
- *	represented by these container structures.  Each data field has both
- *	the name of the field (Blt_TreeKey) and its data (Tcl_Obj).  Values
- *	are private or public.  Private values are only be seen by the tree
- *	client that created the field.
- * 
- *	Values are organized in two ways. They are stored in a linked list in
- *	order that they were created.  In addition, they may be placed into a
- *	hash table when the number of values reaches a high-water mark.
- *
- */
-struct _Blt_TreeValue {
-    Blt_TreeKey key;		/* String identifying the data field */
-    Tcl_Obj *objPtr;		/* Data representation. */
-    Blt_Tree owner;		/* Non-NULL if privately owned. */
-    Blt_TreeValue next;		/* Next value in the chain. */
-    Blt_TreeValue hnext;	/* Next value in hash table. */
-};
-
-typedef struct {
-    Tree *treePtr;
-    unsigned int flags;
-    Node *rootPtr;
-    Blt_HashTable idTable;
-    int nLines;
-    Blt_HashTable dataTable;
-} RestoreInfo;
-
-#include <stdio.h>
-#include <string.h>
-/* The following header is required for LP64 compilation */
-#include <stdlib.h>
-
-#include "bltHash.h"
-
-static void TreeDestroyValues(Blt_TreeNode node);
-
-static Value *TreeFindValue(Blt_TreeNode node, Blt_TreeKey key);
-static Value *TreeCreateValue(Blt_TreeNode node, Blt_TreeKey key, int *newPtr);
-
-static int TreeDeleteValue(Blt_TreeNode node, Blt_TreeValue value);
-
-static Value *TreeFirstValue(Blt_TreeNode, Blt_TreeKeyIterator *iterPtr);
-
-static Value *TreeNextValue(Blt_TreeKeyIterator *iterPtr);
-
-/*
- * When there are this many entries per bucket, on average, rebuild the hash
- * table to make it larger.
- */
-#define REBUILD_MULTIPLIER  3
-#define START_LOGSIZE       5	/* Initial hash table size is 32. */
-#define HASH_HIGH_WATER	    20	/* Start a hash table when a node has this
-				 * many values or child nodes. */
-#define HASH_LOW_WATER	    (HASH_HIGH_WATER << 1)
-
-#if (SIZEOF_VOID_P == 8)
-#define RANDOM_INDEX(i)		HashOneWord(mask, downshift, i)
-static Blt_Hash HashOneWord(uint64_t mask, unsigned int downshift, 
-	const void *key);
-#define BITSPERWORD		64
-#else 
-
-/*
- * The following macro takes a preliminary integer hash value and produces an
- * index into a hash tables bucket list.  The idea is to make it so that
- * preliminary values that are arbitrarily similar will end up in different
- * buckets.  The hash function was taken from a random-number generator.
- */
-#define RANDOM_INDEX(i) \
-    (((((long) (i))*1103515245) >> downshift) & mask)
-#define BITSPERWORD		32
-#endif /* SIZEOF_VOID_P == 8 */
-
-#define DOWNSHIFT_START		(BITSPERWORD - 2) 
-
-/*
- * The hash table below is used to keep track of all the Blt_TreeKeys created
- * so far.
- */
-typedef struct _Blt_TreeInterpData {
-    Tcl_Interp *interp;
-    Blt_HashTable treeTable;	/* Table of trees. */
-    Blt_HashTable keyTable;	/* Table of string keys, shared among all the
-				 * trees within an interpreter. */
-    unsigned int nextId;	/* Identifier used to generate automatic tree
-				 * names. */
-} TreeInterpData;
-
-typedef struct {
-    Tcl_Interp *interp;
-    ClientData clientData;
-    Blt_TreeKey key;
-    Blt_TreeNotifyEventProc *proc;
-    Blt_TreeNotifyEvent event;
-    unsigned int mask;
-    int notifyPending;
-} EventHandler;
-
-typedef struct {
-    Tcl_Interp *interp;
-    ClientData clientData;
-    Blt_TreeKey key;			/* Saved key for -whenidle */
-    int flags;				/* Saved flags for -whenidle */
-    const char *keyPattern;
-    const char *withTag;
-    Node *nodePtr;
-    Blt_TreeTraceProc *proc;
-    Tree *treePtr;
-    Blt_ChainLink link;
-    unsigned int mask;
-    int notifyPending;
-} TraceHandler;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_GetInterpData --
- *
- *	Creates or retrieves data associated with tree data objects for a
- *	particular thread.  We're using Tcl_GetAssocData rather than the Tcl
- *	thread routines so BLT can work with pre-8.0 TCL versions that don't
- *	have thread support.
- *
- * Results:
- *	Returns a pointer to the tree interpreter data.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_TreeInterpData *
-Blt_Tree_GetInterpData(Tcl_Interp *interp)
-{
-    Tcl_InterpDeleteProc *proc;
-    TreeInterpData *dataPtr;
-
-    dataPtr = (TreeInterpData *)
-	Tcl_GetAssocData(interp, TREE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(TreeInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, TREE_THREAD_KEY, TreeInterpDeleteProc,
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->treeTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&dataPtr->keyTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-const char *
-Blt_Tree_NodeIdAscii(Node *nodePtr)
-{
-    static char stringRep[200];
-
-    sprintf_s(stringRep, 200, "%ld", nodePtr->inode);
-    return stringRep;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewNode --
- *
- *	Creates a new node in the tree without installing it.  The number of
- *	nodes in the tree is incremented and a unique serial number is
- *	generated for the node.
- *
- *	Also, all nodes have a label.  If no label was provided (name is NULL)
- *	then automatically generate one in the form "nodeN" where N is the
- *	serial number of the node.
- *
- * Results:
- *	Returns a pointer to the new node.
- *
- * -------------------------------------------------------------- 
- */
-static Node *
-NewNode(TreeObject *corePtr, const char *name, long inode)
-{
-    Node *np;
-
-    /* Create the node structure */
-    np = Blt_PoolAllocItem(corePtr->nodePool, sizeof(Node));
-    np->inode = inode;
-    np->corePtr = corePtr;
-    np->parent = NULL;
-    np->depth = 0;
-    np->flags = 0;
-    np->next = np->prev = NULL;
-    np->first = np->last = NULL;
-    np->nChildren = 0;
-    np->values = NULL;     
-    np->valueTable = NULL;     
-    np->valueTableSize2 = 0;
-    np->nValues = 0;
-    np->nodeTable = NULL;
-    np->nodeTableSize2 = 0;
-    np->hnext = NULL;
-
-    np->label = NULL;
-    if (name != NULL) {
-	np->label = Blt_Tree_GetKeyFromNode(np, name);
-    }
-    corePtr->nNodes++;
-    return np;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReleaseTagTable --
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReleaseTagTable(Blt_TreeTagTable *tablePtr)
-{
-    tablePtr->refCount--;
-    if (tablePtr->refCount <= 0) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for(hPtr = Blt_FirstHashEntry(&tablePtr->tagTable, &cursor); 
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_TreeTagEntry *tePtr;
-
-	    tePtr = Blt_GetHashValue(hPtr);
-	    Blt_DeleteHashTable(&tePtr->nodeTable);
-	    Blt_Free(tePtr);
-	}
-	Blt_DeleteHashTable(&tablePtr->tagTable);
-	Blt_Free(tablePtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetDepths --
- *
- *	Called after moving a node, resets the depths of each node for the
- *	entire branch (node and it's decendants).
- *
- * Results: 
- *	None.
- *
- * ---------------------------------------------------------------------- 
- */
-static void
-ResetDepths(Node *branchPtr, long depth)
-{
-    Node *np;
-
-    branchPtr->depth = depth;
-
-    /* Also reset the depth for each descendant node. */
-    for (np = branchPtr->first; np != NULL; np = np->next) {
-	ResetDepths(np, depth + 1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RebuildNodeTable --
- *
- *	This procedure is invoked when the ratio of entries to hash buckets
- *	becomes too large.  It creates a new table with a larger bucket array
- *	and moves all of the entries into the new table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory gets reallocated and entries get re-hashed to new
- *	buckets.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RebuildNodeTable(Node *parentPtr) /* Table to enlarge. */
-{
-    Node **bp, **bend;
-    unsigned int downshift;
-    unsigned long mask;
-    Node **buckets;
-    size_t nBuckets;
-
-    nBuckets = (1 << parentPtr->nodeTableSize2);
-    bend = parentPtr->nodeTable + nBuckets;
-
-    /*
-     * Allocate and initialize the new bucket array, and set up hashing
-     * constants for new array size.
-     */
-    parentPtr->nodeTableSize2 += 2;
-    nBuckets = (1 << parentPtr->nodeTableSize2);
-    buckets = Blt_AssertCalloc(nBuckets, sizeof(Node *));
-    /*
-     * Move all of the existing entries into the new bucket array, based on
-     * their new hash values.
-     */
-    mask = nBuckets - 1;
-    downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-    for (bp = parentPtr->nodeTable; bp < bend; bp++) {
-	Node *np, *nextPtr;
-
-	for (np = *bp; np != NULL; np = nextPtr) {
-	    Node **bucketPtr;
-    
-	    nextPtr = np->hnext;
-	    bucketPtr = buckets + RANDOM_INDEX(np->label);
-	    np->hnext = *bucketPtr;
-	    *bucketPtr = np;
-	}
-    }
-    Blt_Free(parentPtr->nodeTable);
-    parentPtr->nodeTable = buckets;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MakeNodeTable --
- *
- *	Generates a hash table from the nodes list of children.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Hash table for child nodes is created.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MakeNodeTable(Node *parentPtr)
-{
-    Node **buckets;
-    Node *np, *nextPtr;
-    int downshift;
-    unsigned int mask;
-    unsigned int nBuckets;
-
-    assert(parentPtr->nodeTable == NULL);
-    parentPtr->nodeTableSize2 = START_LOGSIZE;
-    nBuckets = 1 << parentPtr->nodeTableSize2;
-    buckets = Blt_AssertCalloc(nBuckets, sizeof(Node *));
-    mask = nBuckets - 1;
-    downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-    for (np = parentPtr->first; np != NULL; np = nextPtr) {
-	Node **bucketPtr;
-
-	nextPtr = np->next;
-	bucketPtr = buckets + RANDOM_INDEX(np->label);
-	np->hnext = *bucketPtr;
-	*bucketPtr = np;
-    }
-    parentPtr->nodeTable = buckets;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LinkBefore --
- *
- *	Inserts a link preceding a given link.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LinkBefore(
-    Node *parentPtr,	/* Parent to hold the new entry. */
-    Node *nodePtr,	/* New node to be inserted. */
-    Node *beforePtr)	/* Node to link before. */
-{
-    if (parentPtr->first == NULL) {
-	parentPtr->last = parentPtr->first = nodePtr;
-    } else if (beforePtr == NULL) { /* Append onto the end of the chain */
-	nodePtr->next = NULL;
-	nodePtr->prev = parentPtr->last;
-	parentPtr->last->next = nodePtr;
-	parentPtr->last = nodePtr;
-    } else {
-	nodePtr->prev = beforePtr->prev;
-	nodePtr->next = beforePtr;
-	if (beforePtr == parentPtr->first) {
-	    parentPtr->first = nodePtr;
-	} else {
-	    beforePtr->prev->next = nodePtr;
-	}
-	beforePtr->prev = nodePtr;
-    }
-    parentPtr->nChildren++;
-    nodePtr->parent = parentPtr;
-
-    /* 
-     * Check if there as so many children that an addition hash table should
-     * be created.
-     */
-    if (parentPtr->nodeTable == NULL) {
-	if (parentPtr->nChildren > HASH_HIGH_WATER) {
-	    MakeNodeTable(parentPtr);
-	}
-    } else {
-	Node **bucketPtr;
-	size_t nBuckets;
-	unsigned int downshift;
-	unsigned long mask;
-
-	nBuckets = (1 << parentPtr->nodeTableSize2);
-	mask = nBuckets - 1;
-	downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-	bucketPtr = parentPtr->nodeTable + RANDOM_INDEX(nodePtr->label);
-	nodePtr->hnext = *bucketPtr;
-	*bucketPtr = nodePtr;
-	/*
-	 * If the table has exceeded a decent size, rebuild it with many more
-	 * buckets.
-	 */
-	if (parentPtr->nChildren >= (nBuckets * TREE_NODE_REBUILD_SIZE)) {
-	    RebuildNodeTable(parentPtr);
-	}
-    } 
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnlinkNode --
- *
- *	Unlinks a link from the chain. The link is not deallocated, but only
- *	removed from the chain.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UnlinkNode(Node *nodePtr)
-{
-    Node *parentPtr;
-    int unlinked;		/* Indicates if the link is actually removed
-				 * from the chain. */
-    parentPtr = nodePtr->parent;
-    unlinked = FALSE;
-    if (parentPtr->first == nodePtr) {
-	parentPtr->first = nodePtr->next;
-	unlinked = TRUE;
-    }
-    if (parentPtr->last == nodePtr) {
-	parentPtr->last = nodePtr->prev;
-	unlinked = TRUE;
-    }
-    if (nodePtr->next != NULL) {
-	nodePtr->next->prev = nodePtr->prev;
-	unlinked = TRUE;
-    }
-    if (nodePtr->prev != NULL) {
-	nodePtr->prev->next = nodePtr->next;
-	unlinked = TRUE;
-    }
-    if (unlinked) {
-	parentPtr->nChildren--;
-    }
-    nodePtr->prev = nodePtr->next = NULL;
-    if (parentPtr->nodeTable != NULL) {
-	Node **bucketPtr;
-	unsigned int downshift;
-	unsigned long mask;
-
-	mask = (1 << parentPtr->nodeTableSize2) - 1;
-	downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-	bucketPtr = parentPtr->nodeTable + RANDOM_INDEX(nodePtr->label);
-	if (*bucketPtr == nodePtr) {
-	    *bucketPtr = nodePtr->hnext;
-	} else {
-	    Node *np;
-
-	    for (np = *bucketPtr; /*empty*/; np = np->hnext) {
-		if (np == NULL) {
-		    return;	/* Can't find node in hash bucket. */
-		}
-		if (np->hnext == nodePtr) {
-		    np->hnext = nodePtr->hnext;
-		    break;
-		}
-	    }
-	}
-    } 
-    nodePtr->hnext = NULL;
-    if (parentPtr->nChildren < HASH_LOW_WATER) {
-	Blt_Free(parentPtr->nodeTable);
-	parentPtr->nodeTable = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeNode --
- *
- *	Unlinks a given node from the tree, removes its data, and frees memory
- *	allocated to the node.
- *
- * Results:
- *	None.
- *
- * -------------------------------------------------------------- 
- */
-static void
-FreeNode(TreeObject *corePtr, Node *nodePtr)
-{
-    Blt_HashEntry *hPtr;
-
-    /* Destroy any data fields associated with this node. */
-    if (nodePtr->values != NULL) { 
-	TreeDestroyValues(nodePtr);
-    }
-    if (nodePtr->nodeTable != NULL) {
-	Blt_Free(nodePtr->nodeTable);
-    } 
-    UnlinkNode(nodePtr);
-    corePtr->nNodes--;
-    hPtr = Blt_FindHashEntry(&corePtr->nodeTable, (char *)nodePtr->inode);
-    assert(hPtr);
-    Blt_DeleteHashEntry(&corePtr->nodeTable, hPtr);
-    Blt_PoolFreeItem(corePtr->nodePool, nodePtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TeardownTree --
- *
- *	Destroys an entire branch.  This is a special purpose routine used to
- *	speed up the final clean up of the tree.
- *
- * Results: 
- *	None.
- *
- * ---------------------------------------------------------------------- 
- */
-static void
-TeardownTree(TreeObject *corePtr, Node *branchPtr)
-{
-    Node *np, *nextPtr;
-    
-    if (branchPtr->nodeTable != NULL) {
-	Blt_Free(branchPtr->nodeTable);
-	branchPtr->nodeTable = NULL;
-    } 
-    if (branchPtr->values != NULL) {
-	TreeDestroyValues(branchPtr);
-    }
-    for (np = branchPtr->first; np != NULL; np = nextPtr) {
-	nextPtr = np->next;
-	TeardownTree(corePtr, np);
-    }
-    Blt_PoolFreeItem(corePtr->nodePool, branchPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTreeObject --
- *
- *	Destroys a tree object, freeing its nodes and memory.
- *
- * Results: 
- *	None.
- *
- * ---------------------------------------------------------------------- 
- */
-static void
-DestroyTreeObject(TreeObject *corePtr)
-{
-    corePtr->flags |= TREE_DESTROYED;
-    corePtr->nNodes = 0;
-
-    assert(Blt_Chain_GetLength(corePtr->clients) == 0);
-    Blt_Chain_Destroy(corePtr->clients);
-
-    TeardownTree(corePtr, corePtr->root);
-    Blt_PoolDestroy(corePtr->nodePool);
-    Blt_PoolDestroy(corePtr->valuePool);
-    Blt_DeleteHashTable(&corePtr->nodeTable);
-    Blt_Free(corePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReleaseTreeObject --
- *
- *	Removes the client from the core tree object's list of clients.  If
- *	there are no more clients, then the tree object itself is destroyed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The client is detached from the tree object.  The tree object is
- *	possibly destroyed, freeing memory.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReleaseTreeObject(Tree *treePtr) 
-{
-    if ((treePtr->link != NULL) && (treePtr->corePtr != NULL)) {
-	/* Remove the client from the core's list */
-	Blt_Chain_DeleteLink(treePtr->corePtr->clients, treePtr->link);
-	if (Blt_Chain_GetLength(treePtr->corePtr->clients) == 0) {
-	    DestroyTreeObject(treePtr->corePtr);
-	}
-	treePtr->corePtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewTreeObject --
- *
- *	Creates and initializes a new tree object. Trees always contain a root
- *	node, so one is allocated here.
- *
- * Results:
- *	Returns a pointer to the new tree object is successful, NULL
- *	otherwise.  If a tree can't be generated, interp->result will contain
- *	an error message.
- *
- *---------------------------------------------------------------------------
- */
-static TreeObject *
-NewTreeObject(TreeInterpData *dataPtr)
-{
-    TreeObject *corePtr;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    corePtr = Blt_Calloc(1, sizeof(TreeObject));
-    if (corePtr == NULL) {
-	return NULL;
-    }
-    corePtr->dataPtr = dataPtr;
-    corePtr->valuePool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    corePtr->nodePool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    corePtr->clients = Blt_Chain_Create();
-    corePtr->depth = 1;
-    corePtr->notifyFlags = 0;
-    Blt_InitHashTableWithPool(&corePtr->nodeTable, BLT_ONE_WORD_KEYS);
-    hPtr = Blt_CreateHashEntry(&corePtr->nodeTable, (char *)0, &isNew);
-    corePtr->root = NewNode(corePtr, "", 0);
-    Blt_SetHashValue(hPtr, corePtr->root);
-    return corePtr;
-}
-
-static Tree *
-FindClientInNamespace(TreeInterpData *dataPtr, Blt_ObjectName *objNamePtr)
-{
-    Tcl_DString ds;
-    const char *qualName;
-    Blt_HashEntry *hPtr;
-
-    qualName = Blt_MakeQualifiedName(objNamePtr, &ds);
-    hPtr = Blt_FindHashEntry(&dataPtr->treeTable, qualName);
-    Tcl_DStringFree(&ds);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTree --
- *
- *	Searches for the tree object associated by the name given.
- *
- * Results:
- *	Returns a pointer to the tree if found, otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-static Tree *
-GetTree(TreeInterpData *dataPtr, const char *name, int flags)
-{
-    Blt_ObjectName objName;
-    Tree *treePtr;
-    Tcl_Interp *interp;
-
-    treePtr = NULL;
-    interp = dataPtr->interp;
-    if (!Blt_ParseObjectName(interp, name, &objName, BLT_NO_DEFAULT_NS)) {
-	return NULL;
-    }
-    if (objName.nsPtr != NULL) { 
-	treePtr = FindClientInNamespace(dataPtr, &objName);
-    } else { 
-	if (flags & NS_SEARCH_CURRENT) {
-	    /* Look first in the current namespace. */
-	    objName.nsPtr = Tcl_GetCurrentNamespace(interp);
-	    treePtr = FindClientInNamespace(dataPtr, &objName);
-	}
-	if ((treePtr == NULL) && (flags & NS_SEARCH_GLOBAL)) {
-	    objName.nsPtr = Tcl_GetGlobalNamespace(interp);
-	    treePtr = FindClientInNamespace(dataPtr, &objName);
-	}
-    }
-    return treePtr;
-}
-
-static void
-ResetTree(Tree *treePtr) 
-{
-    Blt_ChainLink link;
-
-    /* Remove any traces that may be set. */
-    for (link = Blt_Chain_FirstLink(treePtr->traces); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	TraceHandler *tracePtr;
-	
-	tracePtr = Blt_Chain_GetValue(link);
-	if (tracePtr->keyPattern != NULL) {
-	    Blt_Free(tracePtr->keyPattern);
-	}
-	if (tracePtr->notifyPending) {
-	    Tcl_CancelIdleCall(TraceIdleProc, tracePtr);
-	}
-	Blt_Free(tracePtr);
-    }
-    Blt_Chain_Reset(treePtr->traces);
-    /* And any event handlers. */
-    for(link = Blt_Chain_FirstLink(treePtr->events); 
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	EventHandler *notifyPtr;
-
-	notifyPtr = Blt_Chain_GetValue(link);
-	if (notifyPtr->notifyPending) {
-	    Tcl_CancelIdleCall(NotifyIdleProc, notifyPtr);
-	}
-	Blt_Free(notifyPtr);
-    }
-    Blt_Chain_Reset(treePtr->events);
-}
-
-static void
-DestroyTree(Tree *treePtr) 
-{
-    TreeInterpData *dataPtr;
-
-    dataPtr = treePtr->corePtr->dataPtr;
-    if (treePtr->tagTablePtr != NULL) {
-	ReleaseTagTable(treePtr->tagTablePtr);
-    }
-    ResetTree(treePtr);
-    if (treePtr->hPtr != NULL) {
-	Blt_DeleteHashEntry(&dataPtr->treeTable, treePtr->hPtr);
-    }
-    Blt_Chain_Destroy(treePtr->traces);
-    Blt_Chain_Destroy(treePtr->events);
-    treePtr->magic = 0;
-    ReleaseTreeObject(treePtr);
-    Blt_Free(treePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the tree object is deleted
- *	from the interpreter.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys all remaining trees and removes the hash table used to
- *	register tree names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TreeInterpDeleteProc(ClientData clientData, Tcl_Interp *interp)
-{
-    TreeInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->treeTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Tree *treePtr;
-
-	treePtr = Blt_GetHashValue(hPtr);
-	treePtr->hPtr = NULL;
-	DestroyTree(treePtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->treeTable);
-    Blt_DeleteHashTable(&dataPtr->keyTable);
-    Tcl_DeleteAssocData(interp, TREE_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyIdleProc --
- *
- *	Used to invoke event handler routines at some idle point.  This
- *	routine is called from the TCL event loop.  Errors generated by the
- *	event handler routines are backgrounded.
- *	
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-NotifyIdleProc(ClientData clientData)
-{
-    EventHandler *notifyPtr = clientData;
-    int result;
-
-    notifyPtr->notifyPending = FALSE;
-    notifyPtr->mask |= TREE_NOTIFY_ACTIVE;
-    result = (*notifyPtr->proc)(notifyPtr->clientData, &notifyPtr->event);
-    notifyPtr->mask &= ~TREE_NOTIFY_ACTIVE;
-    if (result != TCL_OK) {
-	Tcl_BackgroundError(notifyPtr->interp);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CheckEventHandlers --
- *
- *	Traverses the list of client event callbacks and checks if one matches
- *	the given event.  A client may trigger an action that causes the tree
- *	to notify it.  The can be prevented by setting the
- *	TREE_NOTIFY_FOREIGN_ONLY bit in the event handler.
- *
- *	If a matching handler is found, a callback may be called either
- *	immediately or at the next idle time depending upon the
- *	TREE_NOTIFY_WHENIDLE bit.
- *
- *	Since a handler routine may trigger yet another call to itself,
- *	callbacks are ignored while the event handler is executing.
- *	
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CheckEventHandlers(Tree *treePtr, int isSource, Blt_TreeNotifyEvent *eventPtr)
-{
-    Blt_ChainLink link, next;
-
-    eventPtr->tree = treePtr;
-    for (link = Blt_Chain_FirstLink(treePtr->events); link != NULL; 
-	link = next) {
-	EventHandler *notifyPtr;
-
-	next = Blt_Chain_NextLink(link);
-	notifyPtr = Blt_Chain_GetValue(link);
-	if ((notifyPtr->mask & TREE_NOTIFY_ACTIVE) ||
-	    (notifyPtr->mask & eventPtr->type) == 0) {
-	    continue;		/* Ignore callbacks that are generated inside
-				 * of a notify handler routine. */
-	}
-	if ((isSource) && (notifyPtr->mask & TREE_NOTIFY_FOREIGN_ONLY)) {
-	    continue;		/* Don't notify yourself. */
-	}
-	if (notifyPtr->mask & TREE_NOTIFY_WHENIDLE) {
-	    if (!notifyPtr->notifyPending) {
-		notifyPtr->notifyPending = TRUE;
-		notifyPtr->event = *eventPtr;
-		Tcl_DoWhenIdle(NotifyIdleProc, notifyPtr);
-	    }
-	} else {
-	    int result;
-
-	    notifyPtr->mask |= TREE_NOTIFY_ACTIVE;
-	    result = (*notifyPtr->proc) (notifyPtr->clientData, eventPtr);
-	    notifyPtr->mask &= ~TREE_NOTIFY_ACTIVE;
-	    if (result != TCL_OK) {
-		Tcl_BackgroundError(notifyPtr->interp);
-	    }
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyClients --
- *
- *	Traverses the list of clients for a particular tree and notifies each
- *	client that an event occurred.  Clients indicate interest in a
- *	particular event through a bit flag.
- *
- *---------------------------------------------------------------------------
- */
-static void
-NotifyClients(Tree *sourcePtr, TreeObject *corePtr, Node *nodePtr, 
-	      int eventFlag)
-{
-    Blt_ChainLink link;
-    Blt_TreeNotifyEvent event;
-
-    event.type = eventFlag;
-    event.inode = nodePtr->inode;
-
-    /* 
-     * Issue callbacks to each client indicating that a new node has been
-     * created.
-     */
-    for (link = Blt_Chain_FirstLink(corePtr->clients); link != NULL; 
-	link = Blt_Chain_NextLink(link)) {
-	Tree *treePtr;
-	int isSource;
-
-	treePtr = Blt_Chain_GetValue(link);
-	isSource = (treePtr == sourcePtr);
-	CheckEventHandlers(treePtr, isSource, &event);
-    }
-}
-
-static void
-FreeValue(Node *nodePtr, Value *valuePtr)
-{
-    if (valuePtr->objPtr != NULL) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-    }
-    Blt_PoolFreeItem(nodePtr->corePtr->valuePool, valuePtr);
-}
-
-
-
-#if (SIZEOF_VOID_P == 8)
-/*
- *---------------------------------------------------------------------------
- *
- * HashOneWord --
- *
- *	Compute a one-word hash value of a 64-bit word, which then can be used
- *	to generate a hash index.
- *
- *	From Knuth, it's a multiplicative hash.  Multiplies an unsigned 64-bit
- *	value with the golden ratio (sqrt(5) - 1) / 2.  The downshift value is
- *	64 - n, when n is the log2 of the size of the hash table.
- *		
- * Results:
- *	The return value is a one-word summary of the information in 64 bit
- *	word.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Hash
-HashOneWord(uint64_t mask, unsigned int downshift, const void *key)
-{
-    uint64_t a0, a1;
-    uint64_t y0, y1;
-    uint64_t y2, y3; 
-    uint64_t p1, p2;
-    uint64_t result;
-
-    /* Compute key * GOLDEN_RATIO in 128-bit arithmetic */
-    a0 = (uint64_t)key & 0x00000000FFFFFFFF; 
-    a1 = (uint64_t)key >> 32;
-    
-    y0 = a0 * 0x000000007f4a7c13;
-    y1 = a0 * 0x000000009e3779b9; 
-    y2 = a1 * 0x000000007f4a7c13;
-    y3 = a1 * 0x000000009e3779b9; 
-    y1 += y0 >> 32;		/* Can't carry */ 
-    y1 += y2;			/* Might carry */
-    if (y1 < y2) {
-	y3 += (1LL << 32);	/* Propagate */ 
-    }
-
-    /* 128-bit product: p1 = loword, p2 = hiword */
-    p1 = ((y1 & 0x00000000FFFFFFFF) << 32) + (y0 & 0x00000000FFFFFFFF);
-    p2 = y3 + (y1 >> 32);
-    
-    /* Left shift the value downward by the size of the table */
-    if (downshift > 0) { 
-	if (downshift < 64) { 
-	    result = ((p2 << (64 - downshift)) | (p1 >> (downshift & 63))); 
-	} else { 
-	    result = p2 >> (downshift & 63); 
-	} 
-    } else { 
-	result = p1;
-    } 
-    /* Finally mask off the high bits */
-    return (Blt_Hash)(result & mask);
-}
-
-#endif /* SIZEOF_VOID_P == 8 */
-
-/*
- *---------------------------------------------------------------------------
- *
- * RebuildTable --
- *
- *	This procedure is invoked when the ratio of entries to hash buckets
- *	becomes too large.  It creates a new table with a larger bucket array
- *	and moves all of the entries into the new table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory gets reallocated and entries get re-hashed to new buckets.
- *
- *---------------------------------------------------------------------------
- */
-static void
-RebuildValueTable(Node *nodePtr)		/* Table to enlarge. */
-{
-    Value **bp, **bend, **buckets, **oldBuckets;
-    size_t nBuckets;
-    unsigned int downshift;
-    unsigned long mask;
-
-    oldBuckets = nodePtr->valueTable;
-    nBuckets = (1 << nodePtr->valueTableSize2);
-    bend = oldBuckets + nBuckets;
-
-    /*
-     * Allocate and initialize the new bucket array, and set up hashing
-     * constants for new array size.
-     */
-    nodePtr->valueTableSize2 += 2;
-    nBuckets = (1 << nodePtr->valueTableSize2);
-    buckets = Blt_AssertCalloc(nBuckets, sizeof(Value *));
-
-    /*
-     * Move all of the existing entries into the new bucket array, based on
-     * their hash values.
-     */
-    mask = nBuckets - 1;
-    downshift = DOWNSHIFT_START - nodePtr->valueTableSize2;
-    for (bp = oldBuckets; bp < bend; bp++) {
-	Value *vp, *nextPtr;
-
-	for (vp = *bp; vp != NULL; vp = nextPtr) {
-	    Value **bucketPtr;
-
-	    nextPtr = vp->hnext;
-	    bucketPtr = buckets + RANDOM_INDEX(vp->key);
-	    vp->hnext = *bucketPtr;
-	    *bucketPtr = vp;
-	}
-    }
-    nodePtr->valueTable = buckets;
-    Blt_Free(oldBuckets);
-}
-
-static void
-MakeValueTable(Node *nodePtr)
-{
-    unsigned int nBuckets;
-    Value **buckets;
-    unsigned int mask;
-    int downshift;
-    Value *vp, *nextPtr;
-
-    assert(nodePtr->valueTable == NULL);
-
-    /* Generate hash table from list of values. */
-    nodePtr->valueTableSize2 = START_LOGSIZE;
-    nBuckets = 1 << nodePtr->valueTableSize2;
-    buckets = Blt_AssertCalloc(nBuckets, sizeof(Value *));
-    mask = nBuckets - 1;
-    downshift = DOWNSHIFT_START - nodePtr->valueTableSize2;
-    for (vp = nodePtr->values; vp != NULL; vp = nextPtr) {
-	Value **bucketPtr;
-
-	nextPtr = vp->next;
-	bucketPtr = buckets + RANDOM_INDEX(vp->key);
-	vp->hnext = *bucketPtr;
-	*bucketPtr = vp;
-    }
-    nodePtr->valueTable = buckets;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeDeleteValue --
- *
- *	Remove a single entry from a hash table.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The entry given by entryPtr is deleted from its table and should never
- *	again be used by the caller.  It is up to the caller to free the
- *	clientData field of the entry, if that is relevant.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TreeDeleteValue(Node *nodePtr, Blt_TreeValue value)
-{
-    Value *vp, *prevPtr;
-    
-    if (nodePtr->valueTable != NULL) {
-	Value **bucketPtr;
-	unsigned int downshift;
-	unsigned long mask;
-
-	mask = (1 << nodePtr->valueTableSize2) - 1;
-	downshift = DOWNSHIFT_START - nodePtr->valueTableSize2;
-	bucketPtr = nodePtr->valueTable + RANDOM_INDEX(((Value *)value)->key);
-	if (*bucketPtr == value) {
-	    *bucketPtr = ((Value *)value)->hnext;
-	} else {
-	    Value *pp;
-
-	    for (pp = *bucketPtr; /*empty*/; pp = pp->hnext) {
-		if (pp == NULL) {
-		    return TCL_ERROR; /* Can't find value in hash bucket. */
-		}
-		if (pp->hnext == value) {
-		    pp->hnext = ((Value *)value)->hnext;
-		    break;
-		}
-	    }
-	}
-    } 
-    prevPtr = NULL;
-    for (vp = nodePtr->values; vp != NULL; vp = vp->next) {
-	if (vp == value) {
-	    break;
-	}
-	prevPtr = vp;
-    }
-    if (vp == NULL) {
-	return TCL_ERROR;	/* Can't find value in list. */
-    }
-    if (prevPtr == NULL) {
-	nodePtr->values = vp->next;
-    } else {
-	prevPtr->next = vp->next;
-    }
-    nodePtr->nValues--;
-    FreeValue(nodePtr, value);
-    if (nodePtr->nValues < HASH_LOW_WATER) {
-	Blt_Free(nodePtr->valueTable);
-	nodePtr->valueTable = NULL;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeDestroyValues --
- *
- *	Free up everything associated with a hash table except for the record
- *	for the table itself.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The hash table is no longer useable.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TreeDestroyValues(Node *nodePtr)
-{
-    Value *vp;
-    Value *nextPtr;
-
-    /* Free value hash table. */
-    if (nodePtr->valueTable != NULL) {
-	Blt_Free(nodePtr->valueTable);
-    } 
-
-    /* Free all the entries in the value list. */
-    for (vp = nodePtr->values; vp != NULL; vp = nextPtr) {
-	nextPtr = vp->next;
-	FreeValue(nodePtr, vp);
-    }
-    nodePtr->values = NULL;
-    nodePtr->valueTable = NULL;
-    nodePtr->nValues = 0;
-    nodePtr->valueTableSize2 = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeFirstValue --
- *
- *	Locate the first entry in a hash table and set up a record that can be
- *	used to step through all the remaining entries of the table.
- *
- * Results:
- *	The return value is a pointer to the first value in tablePtr, or NULL
- *	if tablePtr has no entries in it.  The memory at *searchPtr is
- *	initialized so that subsequent calls to Blt_Tree_NextValue will return
- *	all of the values in the table, one at a time.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Value *
-TreeFirstValue(
-    Node *nodePtr,
-    Blt_TreeKeyIterator *iterPtr) /* Place to store information about progress
-				   * through the table. */
-{
-    iterPtr->node = nodePtr;
-    iterPtr->nextIndex = 0;
-    iterPtr->nextValue = nodePtr->values;
-    return TreeNextValue(iterPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeNextValue --
- *
- *	Once a hash table enumeration has been initiated by calling
- *	Blt_Tree_FirstValue, this procedure may be called to return successive
- *	elements of the table.
- *
- * Results:
- *	The return value is the next entry in the hash table being enumerated,
- *	or NULL if the end of the table is reached.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Value *
-TreeNextValue(
-    Blt_TreeKeyIterator *iterPtr) /* Place to store information about progress
-				   * through the table.  Must have been
-				   * initialized by calling
-				   * Blt_Tree_FirstValue. */
-{
-    Value *valuePtr;
-
-    valuePtr = iterPtr->nextValue;
-    if (valuePtr != NULL) {
-	iterPtr->nextValue = valuePtr->next;
-    }
-    return valuePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeFindValue --
- *
- *	Given a hash table with one-word keys, and a one-word key, find the
- *	entry with a matching key.
- *
- * Results:
- *	The return value is a token for the matching entry in the hash table,
- *	or NULL if there was no matching entry.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static Value *
-TreeFindValue(
-    Node *nodePtr,
-    Blt_TreeKey key)		/* Key to use to find matching entry. */
-{
-    Value *vp;
-
-    if (nodePtr->valueTable != NULL) {
-	unsigned int downshift;
-	unsigned long mask;
-	Value *bucket;
-
-	mask = (1 << nodePtr->valueTableSize2) - 1;
-	downshift = DOWNSHIFT_START - nodePtr->valueTableSize2;
-	bucket = nodePtr->valueTable[RANDOM_INDEX(key)];
-
-	/* Search all of the entries in the appropriate bucket. */
-	for (vp = bucket; (vp != NULL) && (vp->key != key); vp = vp->hnext) {
-	    /* empty */;
-	}
-    } else {
-	for (vp = nodePtr->values; (vp != NULL) && (vp->key != key); 
-	     vp = vp->next) {
-	    /* empty */;
-	}
-    }
-    return vp;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeCreateValue --
- *
- *	Find the value with a matching key.  If there is no matching value,
- *	then create a new one.
- *
- * Results:
- *	The return value is a pointer to the matching value.  If this is a
- *	newly-created value, then *newPtr will be set to a non-zero value;
- *	otherwise *newPtr will be set to 0.
- *
- * Side effects:
- *	A new value may be added to the hash table.
- *
- *---------------------------------------------------------------------------
- */
-static Value *
-TreeCreateValue(
-    Node *nodePtr,
-    Blt_TreeKey key,		/* Key to use to find or create matching
-				 * entry. */
-    int *isNewPtr)		/* (out) If non-zero, indicates a new hash
-				 * entry was created. */
-{
-    Value *vp, *prevPtr;
-    
-    prevPtr = NULL;
-    *isNewPtr = FALSE;
-    for (vp = nodePtr->values; vp != NULL; vp = vp->next) {
-	if (vp->key == key) {
-	    return vp;
-	}
-	prevPtr = vp;
-    }
-    /* Value not found. Add a new value to the list. */
-    *isNewPtr = TRUE;
-    vp = Blt_PoolAllocItem(nodePtr->corePtr->valuePool, sizeof(Value));
-    vp->key = key;
-    vp->owner = NULL;
-    vp->next = NULL;
-    vp->hnext = NULL;
-    vp->objPtr = NULL;
-    if (prevPtr == NULL) {
-	nodePtr->values = vp;
-    } else {
-	prevPtr->next = vp;
-    }
-    nodePtr->nValues++;
-
-    if (nodePtr->valueTable == NULL) {
-	/* 
-	 * If we reach a threshold number of values, create a hash table of
-	 * values.
-	 */
-	if (nodePtr->nValues > HASH_HIGH_WATER) {
-	    MakeValueTable(nodePtr);
-	}
-    } else {
-	Value **bucketPtr;
-	size_t nBuckets;
-	unsigned int downshift;
-	unsigned long mask;
-
-	nBuckets = (1 << nodePtr->valueTableSize2);
-	mask = nBuckets - 1;
-	downshift = DOWNSHIFT_START - nodePtr->valueTableSize2;
-	bucketPtr = nodePtr->valueTable + RANDOM_INDEX((void *)key);
-	vp->hnext = *bucketPtr;
-	*bucketPtr = vp;
-	/*
-	 * If the table has exceeded a decent size, rebuild it with many more
-	 * buckets.
-	 */
-	if ((unsigned int)nodePtr->nValues >= (nBuckets * 3)) {
-	    RebuildValueTable(nodePtr);
-	}
-    } 
-    return vp;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseDumpRecord --
- *
- *	Gets the next full record in the dump string, returning the record as
- *	a list. Blank lines and comments are ignored.
- *
- * Results: 
- *	TCL_RETURN	The end of the string is reached.
- *	TCL_ERROR	An error occurred and an error message 
- *			is left in the interpreter result.  
- *	TCL_OK		The next record has been successfully parsed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseDumpRecord(
-    Tcl_Interp *interp,
-    const char **stringPtr,	/* (in/out) points to current location in in
-				 * dump string. Updated after parsing
-				 * record. */
-    int *argcPtr,		/* (out) Will contain the length of the
-				 * record's list. */
-    const char ***argvPtr,	/* (out) Will contain the list representing
-				 * the dump record of the node. */
-    RestoreInfo *restorePtr)
-{
-    char *entry, *eol;
-    char saved;
-    int result;
-
-    entry = (char *)*stringPtr;
-    /* Get first line, ignoring blank lines and comments. */
-    for (;;) {
-	char *first;
-
-	first = NULL;
-	restorePtr->nLines++;
-	/* Find the end of the first line. */
-	for (eol = entry; (*eol != '\n') && (*eol != '\0'); eol++) {
-	    if ((first == NULL) && (!isspace(UCHAR(*eol)))) {
-		first = eol;	/* Track first non-whitespace character. */
-	    }
-	}
-	if (first == NULL) {
-	    if (*eol == '\0') {
-		return TCL_RETURN;
-	    }
-	} else if (*first != '#') {
-	    break;		/* Not a comment or blank line. */
-	}
-	entry = eol + 1;
-    }
-    saved = *eol;
-    *eol = '\0';
-    while (!Tcl_CommandComplete(entry)) {
-	*eol = saved;
-	if (*eol == '\0') {
-	    Tcl_AppendResult(interp, "incomplete dump record: \"", entry, 
-		"\"", (char *)NULL);
-	    return TCL_ERROR;	/* Found EOF (incomplete entry) or error. */
-	}
-	/* Get the next line. */
-	for (eol = eol + 1; (*eol != '\n') && (*eol != '\0'); eol++) {
-	    /*empty*/
-	}
-	restorePtr->nLines++;
-	saved = *eol;
-	*eol = '\0';
-    }
-    if (entry == eol) {
-	return TCL_RETURN;
-    }
-    result = Tcl_SplitList(interp, entry, argcPtr, argvPtr);
-    *eol = saved;
-    *stringPtr = eol + 1;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReadDumpRecord --
- *
- *	Reads the next full record from the given channel, returning the
- *	record as a list. Blank lines and comments are ignored.
- *
- * Results: 
- *	TCL_RETURN	The end of the file has been reached.
- *	TCL_ERROR	A read error has occurred and an error message 
- *			is left in the interpreter result.  
- *	TCL_OK		The next record has been successfully parsed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ReadDumpRecord(
-    Tcl_Interp *interp,
-    Tcl_Channel channel,	/* Channel from which to read the next
-				 * record. */
-    int *argcPtr,		/* (out) Will contain the length of the
-				 * record's list. */
-    const char ***argvPtr,	/* (out) Will contain the list representing
-				 * the dump record of the node. */
-    RestoreInfo *restorePtr)
-{
-    int result;
-    Tcl_DString ds;
-
-    Tcl_DStringInit(&ds);
-    /* Get first line, ignoring blank lines and comments. */
-    for (;;) {
-	char *cp;
-	int nBytes;
-
-	Tcl_DStringSetLength(&ds, 0);
-	nBytes = Tcl_Gets(channel, &ds);
-	if (nBytes < 0) {
-	    if (Tcl_Eof(channel)) {
-		return TCL_RETURN;
-	    }
-	    return TCL_ERROR;
-	}
-	restorePtr->nLines++;
-	for (cp = Tcl_DStringValue(&ds); *cp != '\0'; cp++) {
-	    if (!isspace(UCHAR(*cp))) {
-		break;
-	    }
-	}
-	if ((*cp != '\0') && (*cp != '#')) {
-	    break;		/* Not a comment or blank line. */
-	}
-    }
-
-    Tcl_DStringAppend(&ds, "\n", 1);
-    while (!Tcl_CommandComplete(Tcl_DStringValue(&ds))) {
-	int nBytes;
-
-	if (Tcl_Eof(channel)) {
-	    Tcl_AppendResult(interp, "unexpected EOF: short record.", 
-			     (char *)NULL);
-	    Tcl_DStringFree(&ds);
-	    return TCL_ERROR;	/* Found EOF (incomplete entry) or error. */
-	}
-	/* Process additional lines if needed */
-	nBytes = Tcl_Gets(channel, &ds);
-	if (nBytes < 0) {
-	    Tcl_AppendResult(interp, "read error: ", 
-			     Tcl_PosixError(interp), (char *)NULL);
-	    Tcl_DStringFree(&ds);
-	    return TCL_ERROR;	/* Found EOF (incomplete entry) or error. */
-	}
-	restorePtr->nLines++;
-	Tcl_DStringAppend(&ds, "\n", 1);
-    }
-    result = Tcl_SplitList(interp, Tcl_DStringValue(&ds), argcPtr, argvPtr);
-    Tcl_DStringFree(&ds);
-    return result;
-}
-
-static Tcl_Obj *
-GetStringObj(RestoreInfo *restorePtr, const char *string, int length)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&restorePtr->dataTable, string, &isNew);
-    if (isNew) {
-	Tcl_Obj *objPtr;
-
-	if (length == -1) {
-	    length = strlen(string);
-	}
-	objPtr = Tcl_NewStringObj(string, length);
-	Blt_SetHashValue(hPtr, objPtr);
-	return objPtr;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static int
-RestoreValues(
-    RestoreInfo *restorePtr,
-    Tcl_Interp *interp, 
-    Node *nodePtr, 
-    int nValues, 
-    const char **values)
-{
-    int i;
-
-    for (i = 0; i < nValues; i += 2) {
-	Tcl_Obj *valueObjPtr;
-	int result;
-
-	if ((i + 1) < nValues) {
-	    valueObjPtr = GetStringObj(restorePtr, values[i + 1], -1);
-	} else {
-	    valueObjPtr = Blt_EmptyStringObj();
-	}
-	Tcl_IncrRefCount(valueObjPtr);
-	result = Blt_Tree_SetValue(interp, restorePtr->treePtr, nodePtr, 
-		values[i], valueObjPtr);
-	Tcl_DecrRefCount(valueObjPtr);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int 
-RestoreTags(
-    Tree *treePtr, 
-    Node *nodePtr, 
-    int nTags, 
-    const char **tags) 
-{
-    int i;
-
-    for (i = 0; i < nTags; i++) {
-	Blt_Tree_AddTag(treePtr, nodePtr, tags[i]);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestoreNode5 --
- *
- *	Parses and creates a node based upon the first 3 fields of a five
- *	field entry.  This is the new restore file format.
- *
- *	   parentId nodeId pathList dataList tagList ?attrList?
- *
- *	The purpose is to attempt to save and restore the node ids embedded in
- *	the restore file information.  The old format could not distinquish
- *	between two sibling nodes with the same label unless they were both
- *	leaves.  I'm trying to avoid dependencies upon labels.
- *
- *	If you're starting from an empty tree, this obviously should work
- *	without a hitch.  We only need to map the file's root id to 0.  It's a
- *	little more complicated when adding node to an already full tree.
- *
- *	First see if the node id isn't already in use.  Otherwise, map the
- *	node id (via a hashtable) to the real node. We'll need it later when
- *	subsequent entries refer to their parent id.
- *
- *	If a parent id is unknown (the restore file may be out of order), then
- *	follow plan B and use its path.
- *	
- *---------------------------------------------------------------------------
- */
-static int
-RestoreNode5(
-    Tcl_Interp *interp,
-    int argc, 			/* Not used. */
-    const char **argv, 
-    RestoreInfo *restorePtr)
-{
-    Tree *treePtr;
-    Blt_HashEntry *hPtr;
-    Node *nodePtr, *parentPtr;
-    int isNew;
-    long pid, id;
-    const char **attrs, **tags, **values, **names;
-    int nTags, nValues, nNames;
-
-    treePtr = restorePtr->treePtr;
-
-    /* 
-     * The second and first fields respectively are the ids of the node and
-     * its parent.  The parent id of the root node is always -1.
-     */
-
-    if ((Tcl_GetLong(interp, argv[0], &pid) != TCL_OK) ||
-	(Tcl_GetLong(interp, argv[1], &id) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    names = values = tags = attrs = NULL;
-    nodePtr = NULL;
-
-    /* 
-     * The third, fourth, and fifth fields respectively are the list of
-     * component names representing the path to the node including the name of
-     * the node, a key-value list of data values, and a list of tag names.
-     */     
-
-    if ((Tcl_SplitList(interp, argv[2], &nNames, &names) != TCL_OK) ||
-	(Tcl_SplitList(interp, argv[3], &nValues, &values) != TCL_OK)  || 
-	(Tcl_SplitList(interp, argv[4], &nTags, &tags) != TCL_OK)) {
-	goto error;
-    }    
-
-    /* Get the parent of the node. */
-
-    if (pid == -1) {	/* Map -1 id to the root node of the subtree. */
-	nodePtr = restorePtr->rootPtr;
-	hPtr = Blt_CreateHashEntry(&restorePtr->idTable, (char *)id, &isNew);
-	Blt_SetHashValue(hPtr, nodePtr);
-	Blt_Tree_RelabelNode(treePtr, nodePtr, names[0]);
-    } else {
-
-	/* 
-	 * Check if the parent has been mapped to another id in the tree.
-	 * This can happen when there's a id collision with an existing node.
-	 */
-
-	hPtr = Blt_FindHashEntry(&restorePtr->idTable, (char *)pid);
-	if (hPtr != NULL) {
-	    parentPtr = Blt_GetHashValue(hPtr);
-	} else {
-	    parentPtr = Blt_Tree_GetNode(treePtr, pid);
-	    if (parentPtr == NULL) {
-		/* 
-		 * Normally the parent node should already exist in the tree,
-		 * but in a partial restore it might not.  "Plan B" is to use
-		 * the list of path components to create the missing
-		 * components, including the parent.
-		 */
-		if (nNames == 0) {
-		    parentPtr = restorePtr->rootPtr;
-		} else {
-		    int i;
-
-		    for (i = 1; i < (nNames - 2); i++) {
-			nodePtr = Blt_Tree_FindChild(parentPtr, names[i]);
-			if (nodePtr == NULL) {
-			    nodePtr = Blt_Tree_CreateNode(treePtr, parentPtr, 
-				names[i], -1);
-			}
-			parentPtr = nodePtr;
-		    }
-		    /* 
-		     * If there's a node with the same label as the parent,
-		     * we'll use that node. Otherwise, try to create a new
-		     * node with the desired parent id.
-		     */
-		    nodePtr = Blt_Tree_FindChild(parentPtr, names[nNames - 2]);
-		    if (nodePtr == NULL) {
-			nodePtr = Blt_Tree_CreateNodeWithId(treePtr, parentPtr,
-				names[nNames - 2], pid, -1);
-			if (nodePtr == NULL) {
-			    goto error;
-			}
-		    }
-		    parentPtr = nodePtr;
-		}
-	    }
-	} 
-
-	/* 
-	 * It's an error if the desired id has already been remapped.  That
-	 * means there were two nodes in the dump with the same id.
-	 */
-	hPtr = Blt_FindHashEntry(&restorePtr->idTable, (char *)id);
- 	if (hPtr != NULL) {
-	    Tcl_AppendResult(interp, "node \"", Blt_Ltoa(id), 
-		"\" has already been restored", (char *)NULL);
-	    goto error;
-	}
-
-
-	if (restorePtr->flags & TREE_RESTORE_OVERWRITE) {
-	    /* Can you find the child by name. */
-	    nodePtr = Blt_Tree_FindChild(parentPtr, names[nNames - 1]);
-	    if (nodePtr != NULL) {
-		hPtr = Blt_CreateHashEntry(&restorePtr->idTable, (char *)id,
-					   &isNew);
-		Blt_SetHashValue(hPtr, nodePtr);
-	    }
-	}
-
-	if (nodePtr == NULL) {
-	    nodePtr = Blt_Tree_GetNode(treePtr, id);
-	    if (nodePtr == NULL) {
-		nodePtr = Blt_Tree_CreateNodeWithId(treePtr, parentPtr, 
-			names[nNames - 1], id, -1);
-	    } else {
-		nodePtr = Blt_Tree_CreateNode(treePtr, parentPtr, 
-			names[nNames - 1], -1);
-		hPtr = Blt_CreateHashEntry(&restorePtr->idTable, (char *)id,
-			&isNew);
-		Blt_SetHashValue(hPtr, nodePtr);
-	    }
-	}
-    } 
-	
-    if (nodePtr == NULL) {
-	goto error;		/* Couldn't create node with requested id. */
-    }
-    Blt_Free(names);
-    names = NULL;
-
-    /* Values */
-    if (RestoreValues(restorePtr, interp, nodePtr, nValues, values) != TCL_OK) {
-	goto error;
-    }
-    Blt_Free(values);
-    values = NULL;
-
-    /* Tags */
-    if (!(restorePtr->flags & TREE_RESTORE_NO_TAGS)) {
-	RestoreTags(treePtr, nodePtr, nTags, tags);
-    }
-    Blt_Free(tags);
-    tags = NULL;
-    return TCL_OK;
-
- error:
-    if (attrs != NULL) {
-	Blt_Free(attrs);
-    }
-    if (tags != NULL) {
-	Blt_Free(tags);
-    }
-    if (values != NULL) {
-	Blt_Free(values);
-    }
-    if (names != NULL) {
-	Blt_Free(names);
-    }
-    if (nodePtr != NULL) {
-	Blt_Tree_DeleteNode(treePtr, nodePtr);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestoreNode3 --
- *
- *	Parses and creates a node based upon the first field of a three field
- *	entry.  This is the old restore file format.
- *
- *		pathList dataList tagList
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RestoreNode3(
-    Tcl_Interp *interp, 
-    int argc,			/* Not used. */
-    const char **argv, 
-    RestoreInfo *restorePtr)
-{
-    Tree *treePtr;
-    Node *nodePtr, *parentPtr;
-    int i;
-    const char **names, **values, **tags;
-    int nNames, nValues, nTags;
-
-    /* The first field is a list of component names representing the path to
-     * the node, including the name of the node. */
-
-    if (Tcl_SplitList(interp, argv[0], &nNames, &names) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    nodePtr = parentPtr = restorePtr->rootPtr;
-    treePtr = restorePtr->treePtr;
-    /* Automatically create ancestor nodes as needed. */
-    for (i = 0; i < (nNames - 1); i++) {
-	nodePtr = Blt_Tree_FindChild(parentPtr, names[i]);
-	if (nodePtr == NULL) {
-	    nodePtr = Blt_Tree_CreateNode(treePtr, parentPtr, names[i], -1);
-	}
-	parentPtr = nodePtr;
-    }
-    if (nNames > 0) {
-
-	/* 
-	 * By default duplicate nodes (two sibling nodes with the same label)
-	 * unless the -overwrite switch was given.
-	 */
-
-	nodePtr = NULL;
-	if (restorePtr->flags & TREE_RESTORE_OVERWRITE) {
-	    nodePtr = Blt_Tree_FindChild(parentPtr, names[i]);
-	}
-	if (nodePtr == NULL) {
-	    nodePtr = Blt_Tree_CreateNode(treePtr, parentPtr, names[i], -1);
-	}
-    }
-    Blt_Free(names);
-
-    /* The second field is a key-value list of the node's values. */
-
-    if (Tcl_SplitList(interp, argv[1], &nValues, &values) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (RestoreValues(restorePtr, interp, nodePtr, nValues, values) != TCL_OK) {
-	goto error;
-    }
-    Blt_Free(values);
-
-    /* The third field is a list of tags. */
-
-    if (!(restorePtr->flags & TREE_RESTORE_NO_TAGS)) {
-	/* Parse the tag list. */
-	if (Tcl_SplitList(interp, argv[2], &nTags, &tags) != TCL_OK) {
-	    goto error;
-	}
-	RestoreTags(treePtr, nodePtr, nTags, tags);
-	Blt_Free(tags);
-    }
-    return TCL_OK;
-
- error:
-    Blt_Free(argv);
-    Blt_Tree_DeleteNode(treePtr, nodePtr);
-    return TCL_ERROR;
-}
-
-/* Public Routines */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_GetKey --
- *
- *	Given a string, returns a unique identifier for the string.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeKey
-Blt_Tree_GetKey(Tree *treePtr, const char *string) /* String to convert. */
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Blt_HashTable *tablePtr;
-
-    tablePtr = &treePtr->corePtr->dataPtr->keyTable;
-    hPtr = Blt_CreateHashEntry(tablePtr, string, &isNew);
-    return (Blt_TreeKey)Blt_GetHashKey(tablePtr, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_GetKeyFromNode --
- *
- *	Given a string, returns a unique identifier for the string.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeKey
-Blt_Tree_GetKeyFromNode(Node *nodePtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Blt_HashTable *tablePtr;
-
-    tablePtr = &nodePtr->corePtr->dataPtr->keyTable;
-    hPtr = Blt_CreateHashEntry(tablePtr, string, &isNew);
-    return (Blt_TreeKey)Blt_GetHashKey(tablePtr, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_GetKeyFromInterp --
- *
- *	Given a string, returns a unique identifier for the string.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeKey
-Blt_Tree_GetKeyFromInterp(Tcl_Interp *interp, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    TreeInterpData *dataPtr;
-    int isNew;
-
-    dataPtr = Blt_Tree_GetInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->keyTable, string, &isNew);
-    return (Blt_TreeKey)Blt_GetHashKey(&dataPtr->keyTable, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_CreateNode --
- *
- *	Creates a new node in the given parent node.  The name and position in
- *	the parent are also provided.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeNode
-Blt_Tree_CreateNode(
-    Tree *treePtr,		/* The tree client that is creating this node.
-				 * If NULL, indicates to trigger notify events
-				 * on behalf of the initiating client also. */
-    Node *parentPtr,		/* Parent node where the new node will be
-				 * inserted. */
-    const char *name,		/* Name of node. */
-    long position)		/* Position in the parent's list of children
-				 * where to insert the new node. */
-{
-    Blt_HashEntry *hPtr;
-    Node *beforePtr;
-    Node *nodePtr;	/* Node to be inserted. */
-    TreeObject *corePtr;
-    long inode;
-    int isNew;
-
-    corePtr = parentPtr->corePtr;
-
-    /* Generate an unique serial number for this node.  */
-    do {
-	inode = corePtr->nextInode++;
-	hPtr = Blt_CreateHashEntry(&corePtr->nodeTable,(char *)inode, 
-		   &isNew);
-    } while (!isNew);
-    nodePtr = NewNode(corePtr, name, inode);
-    Blt_SetHashValue(hPtr, nodePtr);
-
-    if ((position == -1) || ((size_t)position >= parentPtr->nChildren)) {
-	beforePtr = NULL;
-    } else {
-	beforePtr = parentPtr->first;
-	while ((position > 0) && (beforePtr != NULL)) {
-	    position--;
-	    beforePtr = beforePtr->next;
-	}
-    }
-    LinkBefore(parentPtr, nodePtr, beforePtr);
-    nodePtr->depth = parentPtr->depth + 1;
-    /* 
-     * Issue callbacks to each client indicating that a new node has been
-     * created.
-     */
-    NotifyClients(treePtr, corePtr, nodePtr, TREE_NOTIFY_CREATE);
-    return nodePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_CreateNodeWithId --
- *
- *	Like Blt_Tree_CreateNode, but provides a specific id to use for the
- *	node.  If the tree already contains a node by that id, NULL is
- *	returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeNode
-Blt_Tree_CreateNodeWithId(
-    Tree *treePtr,
-    Node *parentPtr,		/* Parent node where the new node will be
-				 * inserted. */
-    const char *name,		/* Name of node. */
-    long inode,			/* Requested id of the new node. If a node by
-				 * this id already exists in the tree, no node
-				 * is created. */
-    long position)		/* Position in the parent's list of children
-				 * where to insert the new node. */
-{
-    Blt_HashEntry *hPtr;
-    Node *beforePtr;
-    Node *nodePtr;	/* Node to be inserted. */
-    TreeObject *corePtr;
-    int isNew;
-
-    corePtr = parentPtr->corePtr;
-    hPtr = Blt_CreateHashEntry(&corePtr->nodeTable, (char *)inode, &isNew);
-    if (!isNew) {
-	return NULL;
-    }
-    nodePtr = NewNode(corePtr, name, inode);
-    Blt_SetHashValue(hPtr, nodePtr);
-
-    if ((position == -1) || ((size_t)position >= parentPtr->nChildren)) {
-	beforePtr = NULL;
-    } else {
-	beforePtr = parentPtr->first;
-	while ((position > 0) && (beforePtr != NULL)) {
-	    position--;
-	    beforePtr = beforePtr->next;
-	}
-    }
-    LinkBefore(parentPtr, nodePtr, beforePtr);
-    nodePtr->depth = parentPtr->depth + 1;
-    /* 
-     * Issue callbacks to each client indicating that a new node has been
-     * created.
-     */
-    NotifyClients(treePtr, corePtr, nodePtr, TREE_NOTIFY_CREATE);
-    return nodePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_MoveNode --
- *
- *	Move an entry into a new location in the hierarchy.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_Tree_MoveNode(
-    Tree *treePtr,
-    Node *nodePtr, 
-    Node *parentPtr, 
-    Node *beforePtr)
-{
-    TreeObject *corePtr = nodePtr->corePtr;
-    size_t newDepth;
-
-    if (nodePtr == beforePtr) {
-	return TCL_ERROR;
-    }
-    if ((beforePtr != NULL) && (beforePtr->parent != parentPtr)) {
-	return TCL_ERROR;
-    }
-    if (nodePtr->parent == NULL) {
-	return TCL_ERROR;	/* Can't move root. */
-    }
-    /* Verify that the node isn't an ancestor of the new parent. */
-    if (Blt_Tree_IsAncestor(nodePtr, parentPtr)) {
-	return TCL_ERROR;
-    }
-    UnlinkNode(nodePtr);
-
-    /* Relink the node as a child of the new parent. */
-    LinkBefore(parentPtr, nodePtr, beforePtr);
-    newDepth = parentPtr->depth + 1;
-    if (nodePtr->depth != newDepth) { 
-	/* Recursively reset the depths of all descendant nodes. */
-	ResetDepths(nodePtr, newDepth);
-    }
-
-    /* 
-     * Issue callbacks to each client indicating that a node has been moved.
-     */
-    NotifyClients(treePtr, corePtr, nodePtr, TREE_NOTIFY_MOVE);
-    return TCL_OK;
-}
-
-int
-Blt_Tree_DeleteNode(Tree *treePtr, Node *nodePtr)
-{
-    TreeObject *corePtr = nodePtr->corePtr;
-    Node *np, *nextPtr;
-
-    /* In depth-first order, delete each descendant node. */
-    for (np = nodePtr->first; np != NULL; np = nextPtr) {
-	nextPtr = np->next;
-	Blt_Tree_DeleteNode(treePtr, np);
-    }
-    /* 
-     * Issue callbacks to each client indicating that the node can no longer
-     * be used.
-     */
-    NotifyClients(treePtr, corePtr, nodePtr, TREE_NOTIFY_DELETE);
-
-    /* Now remove the actual node. */
-    FreeNode(corePtr, nodePtr);
-    return TCL_OK;
-}
-
-Blt_TreeNode
-Blt_Tree_GetNode(Tree *treePtr, long inode)
-{
-    TreeObject *corePtr = treePtr->corePtr;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&corePtr->nodeTable, (char *)inode);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return NULL;
-}
-
-Blt_TreeTrace
-Blt_Tree_CreateTrace(
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *keyPattern,
-    const char *tagName,
-    unsigned int mask,
-    Blt_TreeTraceProc *proc,
-    ClientData clientData)
-{
-    TraceHandler *tracePtr;
-
-    tracePtr = Blt_AssertCalloc(1, sizeof (TraceHandler));
-    tracePtr->link = Blt_Chain_Append(treePtr->traces, tracePtr);
-    if (keyPattern != NULL) {
-	tracePtr->keyPattern = Blt_AssertStrdup(keyPattern);
-    }
-    if (tagName != NULL) {
-	tracePtr->withTag = Blt_AssertStrdup(tagName);
-    }
-    tracePtr->treePtr = treePtr;
-    tracePtr->proc = proc;
-    tracePtr->clientData = clientData;
-    tracePtr->mask = mask;
-    tracePtr->nodePtr = nodePtr;
-    tracePtr->interp = treePtr->interp;
-    return (Blt_TreeTrace)tracePtr;
-}
-
-void
-Blt_Tree_DeleteTrace(Blt_TreeTrace trace)
-{
-    TraceHandler *tracePtr = (TraceHandler *)trace;
-
-    Blt_Chain_DeleteLink(tracePtr->treePtr->traces, tracePtr->link);
-    if (tracePtr->keyPattern != NULL) {
-	Blt_Free(tracePtr->keyPattern);
-    }
-    if (tracePtr->withTag != NULL) {
-	Blt_Free(tracePtr->withTag);
-    }
-    Blt_Free(tracePtr);
-}
-
-void
-Blt_Tree_RelabelNodeWithoutNotify(Node *nodePtr, const char *string)
-{
-    Blt_TreeKey oldLabel;
-    Node **bucketPtr;
-    Node *parentPtr;
-    Node *np;
-    unsigned int downshift;
-    unsigned long mask;
-
-    oldLabel = nodePtr->label;
-    nodePtr->label = Blt_Tree_GetKeyFromNode(nodePtr, string);
-    parentPtr = nodePtr->parent;
-    if ((parentPtr == NULL) || (parentPtr->nodeTable == NULL)) {
-	return;			/* Root node. */
-    }
-    /* Changing the node's name requires that we rehash the node in the
-     * parent's table of children. */
-    mask = (1 << parentPtr->nodeTableSize2) - 1;
-    downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-    bucketPtr = parentPtr->nodeTable + RANDOM_INDEX(oldLabel);
-    if (*bucketPtr == nodePtr) {
-	*bucketPtr = nodePtr->hnext;
-    } else {
-	for (np = *bucketPtr; /*empty*/; np = np->hnext) {
-	    if (np == NULL) {
-		return;	/* Can't find node in hash bucket. */
-	    }
-	    if (np->hnext == nodePtr) {
-		np->hnext = nodePtr->hnext;
-		break;
-	    }
-	}
-    }
-    bucketPtr = parentPtr->nodeTable + RANDOM_INDEX(nodePtr->label);
-    nodePtr->hnext = *bucketPtr;
-    *bucketPtr = nodePtr;
-} 
-
-void
-Blt_Tree_RelabelNode(Tree *treePtr, Node *nodePtr, const char *string)
-{
-    Blt_Tree_RelabelNodeWithoutNotify(nodePtr, string);
-    NotifyClients(treePtr, treePtr->corePtr, nodePtr, 
-	TREE_NOTIFY_RELABEL);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_FindChild --
- *
- *	Searches for the named node in a parent's chain of siblings.  
- *
- *
- * Results:
- *	If found, the child node is returned, otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeNode
-Blt_Tree_FindChild(Node *parentPtr, const char *string)
-{
-    Blt_TreeKey key;
-    Node *np;
-    
-    key = Blt_Tree_GetKeyFromNode(parentPtr, string);
-    if (parentPtr->nodeTable != NULL) {
-	unsigned int downshift;
-	unsigned long mask;
-	Node *bucket;
-
-	mask = (1 << parentPtr->nodeTableSize2) - 1;
-	downshift = DOWNSHIFT_START - parentPtr->nodeTableSize2;
-	bucket = parentPtr->nodeTable[RANDOM_INDEX(key)];
-
-	/* Search all of the entries in the appropriate bucket. */
-	for (np = bucket; np != NULL; np = np->hnext) {
-	    if (key == np->label) {
-		return np;
-	    }
-	}
-    } else {
-	for (np = parentPtr->first; np != NULL; np = np->next) {
-	    if (key == np->label) {
-		return np;
-	    }
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_NodePosition --
- *
- *	Returns the position of the node in its parent's list of children.
- *	The root's position is 0.
- *
- *---------------------------------------------------------------------------
- */
-long
-Blt_Tree_NodePosition(Node *nodePtr)
-{
-    Node *parentPtr;
-    long count;
-
-    count = 0;
-    parentPtr = nodePtr->parent;
-    if (parentPtr != NULL) {
-	Node *np;
-
-	for (np = parentPtr->first; np != NULL; np = np->next) {
-	    if (nodePtr == np) {
-		break;
-	    }
-	    count++;
-	}
-    }
-    return count;
-}
-
-Blt_TreeNode 
-Blt_Tree_FirstChild(Node *parentPtr)
-{
-    return parentPtr->first;
-}
-
-Blt_TreeNode 
-Blt_Tree_LastChild(Node *parentPtr)
-{
-    return parentPtr->last;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_PrevNode --
- *
- *	Returns the "previous" node in the tree.  This node (in depth-first
- *	order) is its parent, if the node has no siblings that are previous to
- *	it.  Otherwise it is the last descendant of the last sibling.  In this
- *	case, descend the sibling's hierarchy, using the last child at any
- *	ancestor, with we we find a leaf.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeNode
-Blt_Tree_PrevNode(
-    Node *rootPtr,		/* Root of subtree. If NULL, indicates the
-				 * tree's root. */
-    Node *nodePtr)		/* Current node in subtree. */
-{
-    Node *prevPtr;
-
-    if (rootPtr == NULL) {
-	rootPtr = nodePtr->corePtr->root;
-    }
-    if (nodePtr == rootPtr) {
-	return NULL;		/* The root is the first node. */
-    }
-    prevPtr = nodePtr->prev;
-    if (prevPtr == NULL) {
-	/* There are no siblings previous to this one, so pick the parent. */
-	return nodePtr->parent;
-    }
-    /*
-     * Traverse down the right-most thread, in order to select the next entry.
-     * Stop when we reach a leaf.
-     */
-    nodePtr = prevPtr;
-    while ((prevPtr = nodePtr->last) != NULL) {
-	nodePtr = prevPtr;
-    }
-    return nodePtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_NextNode --
- *
- *	Returns the "next" node in relation to the given node.  The next node
- *	(in depth-first order) is either the first child of the given node the
- *	next sibling if the node has no children (the node is a leaf).  If the
- *	given node is the last sibling, then try it's parent next sibling.
- *	Continue until we either find a next sibling for some ancestor or we
- *	reach the root node.  In this case the current node is the last node
- *	in the tree.
- *
- *---------------------------------------------------------------------------
- */
-Blt_TreeNode
-Blt_Tree_NextNode(
-    Node *rootPtr,		/* Root of subtree. If NULL, indicates the
-				 * tree's root. */
-    Node *nodePtr)		/* Current node in subtree. */
-{
-    Node *nextPtr;
-
-    /* Pick the first sub-node. */
-    nextPtr = nodePtr->first;
-    if (nextPtr != NULL) {
-	return nextPtr;
-    }
-    /* 
-     * Back up until we can find a level where we can pick a "next sibling".
-     * For the last entry we'll thread our way back to the root.
-     */
-    if (rootPtr == NULL) {
-	rootPtr = nodePtr->corePtr->root;
-    }
-    while (nodePtr != rootPtr) {
-	nextPtr = nodePtr->next;
-	if (nextPtr != NULL) {
-	    return nextPtr;
-	}
-	nodePtr = nodePtr->parent;
-    }
-    return NULL;		/* At root, no next node. */
-}
-
-
-int
-Blt_Tree_IsBefore(Node *n1Ptr, Node *n2Ptr)
-{
-    long depth;
-    long i;
-    Node *nodePtr;
-
-    if (n1Ptr == n2Ptr) {
-	return FALSE;
-    }
-    depth = MIN(n1Ptr->depth, n2Ptr->depth);
-    if (depth == 0) {		/* One of the nodes is root. */
-	return (n1Ptr->parent == NULL);
-    }
-    /* 
-     * Traverse back from the deepest node, until both nodes are at the same
-     * depth.  Check if this ancestor node is the same for both nodes.
-     */
-    for (i = n1Ptr->depth; i > depth; i--) {
-	n1Ptr = n1Ptr->parent;
-    }
-    if (n1Ptr == n2Ptr) {
-	return FALSE;
-    }
-    for (i = n2Ptr->depth; i > depth; i--) {
-	n2Ptr = n2Ptr->parent;
-    }
-    if (n2Ptr == n1Ptr) {
-	return TRUE;
-    }
-
-    /* 
-     * First find the mutual ancestor of both nodes.  Look at each preceding
-     * ancestor level-by-level for both nodes.  Eventually we'll find a node
-     * that's the parent of both ancestors.  Then find the first ancestor in
-     * the parent's list of subnodes.
-     */
-    for (i = depth; i > 0; i--) {
-	if (n1Ptr->parent == n2Ptr->parent) {
-	    break;
-	}
-	n1Ptr = n1Ptr->parent;
-	n2Ptr = n2Ptr->parent;
-    }
-    for (nodePtr = n1Ptr->parent->first; nodePtr != NULL; 
-	 nodePtr = nodePtr->next) {
-	if (nodePtr == n1Ptr) {
-	    return TRUE;
-	} else if (nodePtr == n2Ptr) {
-	    return FALSE;
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceIdleProc --
- *
- *	Used to invoke event handler routines at some idle point.  This
- *	routine is called from the TCL event loop.  Errors generated by the
- *	event handler routines are backgrounded.
- *	
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TraceIdleProc(ClientData clientData)
-{
-    TraceHandler *tracePtr = clientData;
-    Node *nodePtr;
-
-    nodePtr = tracePtr->nodePtr;
-    tracePtr->notifyPending = FALSE;
-    nodePtr->flags |= TREE_TRACE_ACTIVE;
-    if ((*tracePtr->proc) (tracePtr->clientData, tracePtr->interp, 
-	tracePtr->nodePtr, tracePtr->key, tracePtr->flags) != TCL_OK) {
-	Tcl_BackgroundError(tracePtr->interp);
-    }
-    nodePtr->flags &= ~TREE_TRACE_ACTIVE;
-}
-
-static void
-CallTraces(
-    Tcl_Interp *interp,
-    Tree *sourcePtr,		/* Client holding a reference to the tree.  If
-				 * NULL, indicates to execute all handlers,
-				 * including those of the caller. */
-    TreeObject *corePtr,	/* Tree that was changed. */
-    Node *nodePtr,		/* Node that received the event. */
-    Blt_TreeKey key,
-    unsigned int flags)
-{
-    Blt_ChainLink link1;
-
-    for(link1 = Blt_Chain_FirstLink(corePtr->clients); link1 != NULL; 
-	link1 = Blt_Chain_NextLink(link1)) {
-	Blt_ChainLink link2;
-	Tree *treePtr;
-
-	treePtr = Blt_Chain_GetValue(link1);
-	for(link2 = Blt_Chain_FirstLink(treePtr->traces); link2 != NULL; 
-	    link2 = Blt_Chain_NextLink(link2)) {
-	    TraceHandler *tracePtr;	
-
-	    tracePtr = Blt_Chain_GetValue(link2);
-	    if ((tracePtr->keyPattern != NULL) && 
-		(!Tcl_StringMatch(key, tracePtr->keyPattern))) {
-		continue;		/* Key pattern doesn't match. */
-	    }
-	    if ((tracePtr->withTag != NULL) && 
-		(!Blt_Tree_HasTag(treePtr, nodePtr, tracePtr->withTag))) {
-		continue;		/* Doesn't have the tag. */
-	    }
-	    if ((tracePtr->mask & flags) == 0) {
-		continue;		/* Flags don't match. */
-	    }
-	    if ((treePtr == sourcePtr) && 
-		(tracePtr->mask & TREE_TRACE_FOREIGN_ONLY)) {
-		continue;		/* This client initiated the trace. */
-	    }
-	    if ((tracePtr->nodePtr != NULL) && (tracePtr->nodePtr != nodePtr)) {
-		continue;		/* Nodes don't match. */
-	    }
-	    if (tracePtr->mask & TREE_TRACE_WHENIDLE) {
-		if (!tracePtr->notifyPending) {
-		    tracePtr->notifyPending = TRUE;
-		    tracePtr->key = key;
-		    tracePtr->flags = flags;
-		    Tcl_DoWhenIdle(TraceIdleProc, tracePtr);
-		}
-	    } else {
-		nodePtr->flags |= TREE_TRACE_ACTIVE;
-		if ((*tracePtr->proc) (tracePtr->clientData, sourcePtr->interp, 
-				       nodePtr, key, flags) != TCL_OK) {
-		    if (interp != NULL) {
-			Tcl_BackgroundError(interp);
-		    }
-		}
-		nodePtr->flags &= ~TREE_TRACE_ACTIVE;
-	    }
-	}
-    }
-}
-
-static Value *
-GetTreeValue(Tcl_Interp *interp, Tree *treePtr, Node *nodePtr, Blt_TreeKey key)
-{
-    Value *valuePtr;
-
-    valuePtr = TreeFindValue(nodePtr, key); 
-    if (valuePtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find field \"", key, "\"", 
-			     (char *)NULL);
-	}
-	return NULL;
-    }	
-    if ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't access private field \"", 
-			     key, "\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    return valuePtr;
-}
-
-int
-Blt_Tree_PrivateValue(Tcl_Interp *interp, Tree *treePtr, Node *nodePtr,
-		      Blt_TreeKey key)
-{
-    Value *valuePtr;
-
-    valuePtr = TreeFindValue(nodePtr, key); 
-    if (valuePtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find field \"", key, "\".", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    valuePtr->owner = treePtr;
-    return TCL_OK;
-}
-
-int
-Blt_Tree_PublicValue(Tcl_Interp *interp, Tree *treePtr, Node *nodePtr,
-		     Blt_TreeKey key)
-{
-    Value *valuePtr;
-
-    valuePtr = TreeFindValue(nodePtr, key); 
-    if (valuePtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find field \"", key, "\"", 
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (valuePtr->owner != treePtr) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "not the owner of \"", key, "\"", 
-		     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    valuePtr->owner = NULL;
-    return TCL_OK;
-}
-
-int
-Blt_Tree_ValueExistsByKey(Tree *treePtr, Node *nodePtr, Blt_TreeKey key)
-{
-    Value *valuePtr;
-
-    valuePtr = GetTreeValue((Tcl_Interp *)NULL, treePtr, nodePtr, key);
-    if (valuePtr == NULL) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-int
-Blt_Tree_GetValueByKey(Tcl_Interp *interp, Tree *treePtr, Node *nodePtr,
-		       Blt_TreeKey key, Tcl_Obj **valueObjPtrPtr)
-{
-    Value *valuePtr;
-    TreeObject *corePtr = nodePtr->corePtr;
-
-    valuePtr = GetTreeValue(interp, treePtr, nodePtr, key);
-    if (valuePtr == NULL) {
-	return TCL_ERROR;
-    }
-    *valueObjPtrPtr = valuePtr->objPtr;
-    if (!(nodePtr->flags & TREE_TRACE_ACTIVE)) {
-	CallTraces(interp, treePtr, corePtr, nodePtr, key, 
-		   TREE_TRACE_READ);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_SetValueByKey(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,			/* Node to be updated. */
-    Blt_TreeKey key,			/* Identifies the field key. */
-    Tcl_Obj *valueObjPtr)		/* New value of field. */
-{
-    TreeObject *corePtr = nodePtr->corePtr;
-    Value *valuePtr;
-    unsigned int flags;
-    int isNew;
-
-    if (valueObjPtr == NULL) {
-	return Blt_Tree_UnsetValueByKey(interp, treePtr, nodePtr, key);
-    }
-    valuePtr = TreeCreateValue(nodePtr, key, &isNew);
-    if ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't set private field \"", 
-			     key, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (valueObjPtr != valuePtr->objPtr) {
-	Tcl_IncrRefCount(valueObjPtr);
-	if (valuePtr->objPtr != NULL) {
-	    Tcl_DecrRefCount(valuePtr->objPtr);
-	}
-	valuePtr->objPtr = valueObjPtr;
-    }
-    flags = TREE_TRACE_WRITE;
-    if (isNew) {
-	flags |= TREE_TRACE_CREATE;
-    }
-    if (!(nodePtr->flags & TREE_TRACE_ACTIVE)) {
-	CallTraces(interp, treePtr, corePtr, nodePtr, valuePtr->key, 
-		flags);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_UnsetValueByKey(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,		/* Node to be updated. */
-    Blt_TreeKey key)		/* Name of field in node. */
-{
-    TreeObject *corePtr = nodePtr->corePtr;
-    Value *valuePtr;
-
-    valuePtr = TreeFindValue(nodePtr, key);
-    if (valuePtr == NULL) {
-	return TCL_OK;		/* It's okay to unset values that don't exist
-				 * in the node. */
-    }
-    if ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't unset private field \"", 
-			     key, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    TreeDeleteValue(nodePtr, valuePtr);
-    CallTraces(interp, treePtr, corePtr, nodePtr, key, TREE_TRACE_UNSET);
-    return TCL_OK;
-}
-
-static int
-ParseParentheses(Tcl_Interp *interp, const char *string, 
-		 char **leftPtr, char **rightPtr)
-{
-    char *p;
-    char *left, *right;
-
-    left = right = NULL;
-    for (p = (char *)string; *p != '\0'; p++) {
-	if (*p == '(') {
-	    left = p;
-	} else if (*p == ')') {
-	    right = p;
-	}
-    }
-    if (left != right) {
-	if (((left != NULL) && (right == NULL)) ||
-	    ((left == NULL) && (right != NULL)) ||
-	    (left > right) || (right != (p - 1))) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad array specification \"", string,
-			     "\"", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    *leftPtr = left;
-    *rightPtr = right;
-    return TCL_OK;
-}
-
-static Tree *
-NewTree(TreeInterpData *dataPtr, TreeObject *corePtr, const char *qualName)
-{
-    Tree *treePtr;
-    int isNew;
-
-    treePtr = Blt_Calloc(1, sizeof(Tree));
-    if (treePtr == NULL) {
-	return NULL;
-    }
-
-    treePtr->magic = TREE_MAGIC;
-    treePtr->interp = dataPtr->interp;
-    /* Add client to table object's list of clients. */
-    treePtr->link = Blt_Chain_Append(corePtr->clients, treePtr);
-    treePtr->corePtr = corePtr;
-    treePtr->root = corePtr->root;
-
-    /* By default, use own sets of tags. */
-    Blt_Tree_NewTagTable(treePtr);
-
-    treePtr->hPtr = Blt_CreateHashEntry(&dataPtr->treeTable, qualName, &isNew);
-    Blt_SetHashValue(treePtr->hPtr, treePtr);
-    treePtr->name = Blt_GetHashKey(&dataPtr->treeTable, treePtr->hPtr);
-    treePtr->events = Blt_Chain_Create();
-    treePtr->traces = Blt_Chain_Create();
-    return treePtr;
-}
-
-static const char *
-MakeTreeName(TreeInterpData *dataPtr, char *string)
-{
-    /* Generate a unique tree name in the current namespace. */
-    do  {
-	sprintf_s(string, 200, "tree%d", dataPtr->nextId++);
-    } while (GetTree(dataPtr, string, NS_SEARCH_CURRENT) != NULL);
-    return string;
-} 
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShareTagTable --
- *
- *---------------------------------------------------------------------------
- */
-static void
-ShareTagTable(Tree *sourcePtr, Tree *targetPtr)
-{
-    sourcePtr->tagTablePtr->refCount++;
-    if (targetPtr->tagTablePtr != NULL) {
-	ReleaseTagTable(targetPtr->tagTablePtr);
-    }
-    targetPtr->tagTablePtr = sourcePtr->tagTablePtr;
-}
-
-int
-Blt_Tree_GetValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *string,		/* String identifying the field in node. */
-    Tcl_Obj **valueObjPtrPtr)
-{
-    char *left, *right;
-    int result;
-
-    if (ParseParentheses(interp, string, &left, &right) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (left != NULL) {
-	*left = *right = '\0';
-	result = Blt_Tree_GetArrayValue(interp, treePtr, nodePtr, string, 
-		left + 1, valueObjPtrPtr);
-	*left = '(', *right = ')';
-    } else {
-	result = Blt_Tree_GetValueByKey(interp, treePtr, nodePtr, 
-		Blt_Tree_GetKey(treePtr, string), valueObjPtrPtr);
-    }
-    return result;
-}
-
-int
-Blt_Tree_SetValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,		/* Node to be updated. */
-    const char *string,		/* String identifying the field in node. */
-    Tcl_Obj *valueObjPtr)	/* New value of field. If NULL, field is
-				 * deleted. */
-{
-    char *left, *right;
-    int result;
-
-    if (ParseParentheses(interp, string, &left, &right) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (left != NULL) {
-	*left = *right = '\0';
-	result = Blt_Tree_SetArrayValue(interp, treePtr, nodePtr, string, 
-		left + 1, valueObjPtr);
-	*left = '(', *right = ')';
-    } else {
-	result = Blt_Tree_SetValueByKey(interp, treePtr, nodePtr, 
-		Blt_Tree_GetKey(treePtr, string), valueObjPtr);
-    }
-    return result;
-}
-
-int
-Blt_Tree_UnsetValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,		/* Node to be updated. */
-    const char *string)		/* String identifying the field in node. */
-{
-    char *left, *right;
-    int result;
-
-    if (ParseParentheses(interp, string, &left, &right) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (left != NULL) {
-	*left = *right = '\0';
-	result = Blt_Tree_UnsetArrayValue(interp, treePtr, nodePtr, string, 
-		left + 1);
-	*left = '(', *right = ')';
-    } else {
-	result = Blt_Tree_UnsetValueByKey(interp, treePtr, nodePtr, 
-		Blt_Tree_GetKey(treePtr, string));
-    }
-    return result;
-}
-
-int
-Blt_Tree_ValueExists(Tree *treePtr, Node *nodePtr, const char *string)
-{
-    char *left, *right;
-    int result;
-
-    if (ParseParentheses((Tcl_Interp *)NULL, string, &left, &right) != TCL_OK) {
-	return FALSE;
-    }
-    if (left != NULL) {
-	*left = *right = '\0';
-	result = Blt_Tree_ArrayValueExists(treePtr, nodePtr, string, left + 1);
-	*left = '(', *right = ')';
-    } else {
-	result = Blt_Tree_ValueExistsByKey(treePtr, nodePtr, 
-		Blt_Tree_GetKey(treePtr, string));
-    }
-    return result;
-}
-
-Blt_TreeKey
-Blt_Tree_FirstKey(Tree *treePtr, Node *nodePtr, Blt_TreeKeyIterator *iterPtr)
-{
-    Value *valuePtr;
-    
-    valuePtr = TreeFirstValue(nodePtr, iterPtr);
-    if (valuePtr == NULL) {
-	return NULL;
-    }
-    while ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	valuePtr = TreeNextValue(iterPtr);
-	if (valuePtr == NULL) {
-	    return NULL;
-	}
-    }
-    return valuePtr->key;
-}
-
-Blt_TreeKey
-Blt_Tree_NextKey(Tree *treePtr, Blt_TreeKeyIterator *iterPtr)
-{
-    Value *valuePtr;
-
-    valuePtr = TreeNextValue(iterPtr);
-    if (valuePtr == NULL) {
-	return NULL;
-    }
-    while ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	valuePtr = TreeNextValue(iterPtr);
-	if (valuePtr == NULL) {
-	    return NULL;
-	}
-    }
-    return valuePtr->key;
-}
-
-int
-Blt_Tree_IsAncestor(Node *n1Ptr, Node *n2Ptr)
-{
-    if (n2Ptr != NULL) {
-	n2Ptr = n2Ptr->parent;
-	while (n2Ptr != NULL) {
-	    if (n2Ptr == n1Ptr) {
-		return TRUE;
-	    }
-	    n2Ptr = n2Ptr->parent;
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_SortNode --
- *
- *	Sorts the subnodes at a given node.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_SortNode(Tree *treePtr, Node *nodePtr, Blt_TreeCompareNodesProc *proc)
-{
-    Node **nodes;
-    int nNodes;
-    Node *np, **npp;
-
-    nNodes = nodePtr->nChildren;
-    if (nNodes < 2) {
-	return TCL_OK;
-    }
-    nodes = Blt_Malloc((nNodes + 1) * sizeof(Node *));
-    if (nodes == NULL) {
-	return TCL_ERROR;	/* Out of memory. */
-    }
-    for (npp = nodes, np = nodePtr->first; np != NULL; np = np->next, npp++) {
-	*npp = np;
-    }
-    *npp = NULL;
-
-    qsort(nodes, nNodes, sizeof(Node *), (QSortCompareProc *)proc);
-    for (npp = nodes; *npp != NULL; npp++) {
-	UnlinkNode(*npp);
-	LinkBefore(nodePtr, *npp, (Blt_TreeNode)NULL);
-    }
-    Blt_Free(nodes);
-    NotifyClients(treePtr, nodePtr->corePtr, nodePtr, TREE_NOTIFY_SORT);
-    return TCL_OK;
-}
-
-#define TEST_RESULT(result) \
-	switch (result) { \
-	case TCL_CONTINUE: \
-	    return TCL_OK; \
-	case TCL_OK: \
-	    break; \
-	default: \
-	    return (result); \
-	}
-
-int
-Blt_Tree_Apply(
-    Node *branchPtr,		/* Root node of subtree. */
-    Blt_TreeApplyProc *proc,	/* Procedure to call for each node. */
-    ClientData clientData)	/* One-word of data passed when calling
-				 * proc. */
-{
-    Node *np, *nextPtr;
-
-    for (np = branchPtr->first; np != NULL; np = nextPtr) {
-	int result;
-
-	/* 
-	 * Get the next link in the chain before calling Blt_TreeApply
-	 * recursively.  This is because the apply callback may delete the
-	 * node and its link.
-	 */
-	nextPtr = np->next;
-
-	result = Blt_Tree_Apply(np, proc, clientData);
-	TEST_RESULT(result);
-    }
-    return (*proc) (branchPtr, clientData, TREE_POSTORDER);
-}
-
-int
-Blt_Tree_ApplyDFS(
-    Node *branchPtr,		/* Root node of subtree. */
-    Blt_TreeApplyProc *proc,	/* Procedure to call for each node. */
-    ClientData clientData,	/* One-word of data passed when calling
-				 * proc. */
-    int order)			/* Order of traversal. */
-{
-    Node *nodePtr, *nextPtr;
-    int result;
-
-    if (order & TREE_PREORDER) {
-	result = (*proc) (branchPtr, clientData, TREE_PREORDER);
-	TEST_RESULT(result);
-    }
-    nodePtr = branchPtr->first;
-    if (order & TREE_INORDER) {
-	if (nodePtr != NULL) {
-	    result = Blt_Tree_ApplyDFS(nodePtr, proc, clientData, order);
-	    TEST_RESULT(result);
-	    nodePtr = nodePtr->next;
-	}
-	result = (*proc) (branchPtr, clientData, TREE_INORDER);
-	TEST_RESULT(result);
-    }
-    for (/* empty */; nodePtr != NULL; nodePtr = nextPtr) {
-	/* 
-	 * Get the next link in the chain before calling Blt_Tree_Apply
-	 * recursively.  This is because the apply callback may delete the
-	 * node and its link.
-	 */
-	nextPtr = nodePtr->next;
-	result = Blt_Tree_ApplyDFS(nodePtr, proc, clientData, order);
-	TEST_RESULT(result);
-    }
-    if (order & TREE_POSTORDER) {
-	return (*proc) (branchPtr, clientData, TREE_POSTORDER);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_ApplyBFS(
-    Node *branchPtr,		/* Root node of subtree. */
-    Blt_TreeApplyProc *proc,	/* Procedure to call for each node. */
-    ClientData clientData)	/* One-word of data passed when calling
-				 * proc. */
-{
-    Blt_Chain queue;
-    Blt_ChainLink link, next;
-    Node *nodePtr;
-    int result;
-
-    queue = Blt_Chain_Create();
-    link = Blt_Chain_Append(queue, branchPtr);
-    while (link != NULL) {
-	Node *np;
-
-	nodePtr = Blt_Chain_GetValue(link);
-	/* Add the children to the queue. */
-	for (np = nodePtr->first; np != NULL; np = np->next) {
-	    Blt_Chain_Append(queue, np);
-	}
-	/* Process the node. */
-	result = (*proc) (nodePtr, clientData, TREE_BREADTHFIRST);
-	switch (result) { 
-	case TCL_CONTINUE: 
-	    Blt_Chain_Destroy(queue);
-	    return TCL_OK; 
-	case TCL_OK: 
-	    break; 
-	default: 
-	    Blt_Chain_Destroy(queue);
-	    return result; 
-	}
-	/* Remove the node from the queue. */
-	next = Blt_Chain_NextLink(link);
-	Blt_Chain_DeleteLink(queue, link);
-	link = next;
-    }
-    Blt_Chain_Destroy(queue);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_Attach --
- *
- *	Attaches the tree object of the named tree to the current one.  This
- *	lets a tree client change its core tree object.  If the name of the
- *	tree (used to get the tree object) is the empty string (""), then
- *	create a new tree object.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurs, TCL_ERROR is
- *	returned and an error message if left in the interpreter result.
- *
- * Side Effects:
- *	The tree's traces and notifiers are deactivated and removed.  The
- *	tree's old core tree object is released.  This may destroy the old
- *	tree object is no client is still using it.  The tag table is also
- *	reset or shared with the named client.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_Attach(Tcl_Interp *interp, Tree *treePtr, const char *name)
-{
-    TreeObject *corePtr;
-    Blt_ChainLink link;
-    TreeInterpData *dataPtr;
-
-    dataPtr = treePtr->corePtr->dataPtr;
-    if (name[0] == '\0') {
-	/* Create a new tree object. */
-	corePtr = NewTreeObject(dataPtr);
-	if (corePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate a new tree object.", 
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	Tree *newPtr;
-
-	newPtr = GetTree(dataPtr, name, NS_SEARCH_BOTH);
-	if ((newPtr == NULL) || (newPtr->corePtr == NULL)) {
-	    Tcl_AppendResult(interp, "can't find a tree named \"", name, "\"", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	corePtr = newPtr->corePtr;
-	ShareTagTable(newPtr, treePtr);
-    }
-    /* 
-     * Be sure to add the client to new tree object, before releasing the old
-     * tree object. This is so that reattaching to the same tree object
-     * doesn't delete the tree object.
-     */
-    link = Blt_Chain_Append(corePtr->clients, treePtr);
-    ReleaseTreeObject(treePtr);
-    ResetTree(treePtr);		/* Reset the client's traces and notifiers. */
-    /* Update pointers in the client. */
-    treePtr->link = link;
-    treePtr->corePtr = corePtr;
-    treePtr->root = corePtr->root;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_Open --
- *
- *	Creates a tree using an existing or new tree object.  The returned
- *	tree must be freed by the caller using Blt_Tree_Close.  If the name of
- *	the tree (used to get the tree object) is the empty string (""), then
- *	create a new tree object.  The following flags may be used:
- *
- *	TREE_CREATE	Create a tree named "name". A new tree object is 
- *			automatically created. If the "name" is NULL, then 
- *			automatically generate a new name.
- *	
- *	TREE_ATTACH     Create a tree and use the tree object from an 
- *			existing tree given by "name". By default
- *			the tag table is shared. 
- *
- *	TREE_NEWTAGS    By default the tag table is shared.  This flag 
- *			indicates to not share tags and to start with an 
- *			empty tag table.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurs, TCL_ERROR
- *	is returned and an error message if left in the interpreter result.
- *
- * Side Effects:
- *	The tree's traces and notifiers are deactivated and removed.  The
- *	tree's old core tree object is release.  This may destroy the tree
- *	object is no client is still using it.  The tag table is also reset or
- *	shared with the named client.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Tree
-Blt_Tree_Open(
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    const char *name,		/* Name of tree in namespace. */
-    int flags)			/* TREE_ATTACH|TREE_NEWTAGS */
-{
-    Blt_ObjectName objName;
-    Tree *srcPtr, *destPtr;
-    TreeObject *corePtr;
-    Tcl_DString ds;
-    TreeInterpData *dataPtr;
-    const char *qualName;
-    char string[200];
-
-    dataPtr = Blt_Tree_GetInterpData(interp);
-    srcPtr = NULL;
-    /* If there's a name available, see it's a tree. */
-    if (name != NULL) {
-	srcPtr = GetTree(dataPtr, name, NS_SEARCH_BOTH);
-    } else if ((flags & TREE_CREATE) == 0) {
-	Tcl_AppendResult(interp, "no tree name given to attach", (char *)NULL);
-	return NULL;
-    }	
-    /* Either create a core tree object or use the one from the named tree.*/
-    if (flags & TREE_CREATE) {
-	if (srcPtr != NULL) {
-	    Tcl_AppendResult(interp, "tree \"", name, "\" already exists", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	corePtr = NewTreeObject(dataPtr);
-	if (corePtr == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate tree object.", 
-			     (char *)NULL);
-	    return NULL;
-	}
-    } else {
-	if ((srcPtr == NULL) || (srcPtr->corePtr == NULL)) {	
-	    Tcl_AppendResult(interp, "can't find a tree named \"", name, "\"", 
-			     (char *)NULL);
-	    return NULL;
-	}
-	corePtr = srcPtr->corePtr;
-    }    
-    /* Generate a new tree name if one wasn't already provided. */
-    if (name == NULL) {
-	name = MakeTreeName(dataPtr, string);
-    }
-    /* 
-     * Tear apart and put back together the namespace-qualified name of the
-     * tree. This is to ensure that naming is consistent.
-     */ 
-    if (!Blt_ParseObjectName(interp, name, &objName, 0)) {
-	return NULL;
-    }
-    qualName = Blt_MakeQualifiedName(&objName, &ds);
-    destPtr = NewTree(dataPtr, corePtr, qualName);
-    Tcl_DStringFree(&ds);
-    if (destPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate tree token", (char *)NULL);
-	return NULL;
-    }
-    if (((flags & TREE_NEWTAGS) == 0) && (srcPtr != NULL)) {
-	ShareTagTable(srcPtr, destPtr);
-    }
-    return destPtr;
-}
-
-void
-Blt_Tree_Close(Tree *treePtr)
-{
-    if (treePtr->magic != TREE_MAGIC) {
-	fprintf(stderr, "invalid tree object token 0x%lx\n", 
-		(unsigned long)treePtr);
-	return;
-    }
-    DestroyTree(treePtr);
-}
-
-int
-Blt_Tree_Exists(
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    const char *name)		/* Namespace-qualifed name of tree. */
-{
-    TreeInterpData *dataPtr;
-
-    dataPtr = Blt_Tree_GetInterpData(interp);
-    return (GetTree(dataPtr, name, NS_SEARCH_BOTH) != NULL);
-}
-
-/*ARGSUSED*/
-static int
-SizeApplyProc(
-    Node *nodePtr,		/* Not used. */
-    ClientData clientData,
-    int order)			/* Not used. */
-{
-    int *sumPtr = clientData;
-    *sumPtr = *sumPtr + 1;
-    return TCL_OK;
-}
-
-int
-Blt_Tree_Size(Node *nodePtr)
-{
-    int sum;
-
-    sum = 0;
-    Blt_Tree_Apply(nodePtr, SizeApplyProc, &sum);
-    return sum;
-}
-
-
-void
-Blt_Tree_CreateEventHandler(
-    Tree *treePtr,
-    unsigned int mask,
-    Blt_TreeNotifyEventProc *proc,
-    ClientData clientData)
-{
-    Blt_ChainLink link;
-    EventHandler *notifyPtr;
-
-    notifyPtr = NULL;		/* Suppress compiler warning. */
-
-    /* Check if the event is already handled. */
-    for(link = Blt_Chain_FirstLink(treePtr->events); 
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	notifyPtr = Blt_Chain_GetValue(link);
-	if ((notifyPtr->proc == proc) && 
-	    (notifyPtr->mask == mask) &&
-	    (notifyPtr->clientData == clientData)) {
-	    break;
-	}
-    }
-    if (link == NULL) {
-	notifyPtr = Blt_AssertMalloc(sizeof (EventHandler));
-	link = Blt_Chain_Append(treePtr->events, notifyPtr);
-    }
-    if (proc == NULL) {
-	Blt_Chain_DeleteLink(treePtr->events, link);
-	Blt_Free(notifyPtr);
-    } else {
-	notifyPtr->proc = proc;
-	notifyPtr->clientData = clientData;
-	notifyPtr->mask = mask;
-	notifyPtr->notifyPending = FALSE;
-	notifyPtr->interp = treePtr->interp;
-    }
-}
-
-void
-Blt_Tree_DeleteEventHandler(
-    Tree *treePtr,
-    unsigned int mask,
-    Blt_TreeNotifyEventProc *proc,
-    ClientData clientData)
-{
-    Blt_ChainLink link;
-    EventHandler *notifyPtr;
-
-    for(link = Blt_Chain_FirstLink(treePtr->events); 
-	link != NULL; link = Blt_Chain_NextLink(link)) {
-	notifyPtr = Blt_Chain_GetValue(link);
-	if ((notifyPtr->proc == proc) && (notifyPtr->mask == mask) &&
-	    (notifyPtr->clientData == clientData)) {
-	    if (notifyPtr->notifyPending) {
-		Tcl_CancelIdleCall(NotifyIdleProc, notifyPtr);
-	    }
-	    Blt_Chain_DeleteLink(treePtr->events, link);
-	    Blt_Free(notifyPtr);
-	    return;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_PathFromNode --
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_Tree_NodeRelativePath(
-    Node *rootPtr,		/* Root of subtree. */
-    Node *nodePtr,		/* Node whose path is to be returned. */
-    const char *separator,	/* Character string to separator elements. */
-    unsigned int flags,		/* Indicates how to print the path. */
-    Tcl_DString *dsPtr)		/* (out) Contains the path of the node. */
-{
-    const char **names;		/* Used to stack the component names. */
-    const char *staticSpace[64];
-    long i;
-    long nLevels;
-
-    if (rootPtr == NULL) {
-	rootPtr = nodePtr->corePtr->root;
-    }
-    nLevels = Blt_Tree_NodeDepth(nodePtr) - Blt_Tree_NodeDepth(rootPtr);
-    if (flags & TREE_INCLUDE_ROOT) {
-	nLevels++;
-    }
-    if (nLevels > 64) {
-	names = Blt_AssertMalloc(nLevels * sizeof(const char *));
-    } else {
-	names = staticSpace;
-    }
-    for (i = nLevels; i > 0; i--) {
-	/* Save the name of each ancestor in the name array.  Note that we
-	 * ignore the root. */
-	names[i - 1] = nodePtr->label;
-	nodePtr = nodePtr->parent;
-    }
-    /* Append each the names in the array. */
-    if ((nLevels > 0) && (separator != NULL)) {
-	Tcl_DStringAppend(dsPtr, names[0], -1);
-	for (i = 1; i < nLevels; i++) {
-	    Tcl_DStringAppend(dsPtr, separator, -1);
-	    Tcl_DStringAppend(dsPtr, names[i], -1);
-	}
-    } else {
-	for (i = 0; i < nLevels; i++) {
-	    Tcl_DStringAppendElement(dsPtr, names[i]);
-	}
-    }
-    if (names != staticSpace) {
-	Blt_Free(names);
-    }
-    return Tcl_DStringValue(dsPtr);
-}
-    
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_NodePath --
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_Tree_NodePath(Node *nodePtr, Tcl_DString *dsPtr)
-{
-    Blt_TreeNode root;
-
-    root = nodePtr->corePtr->root;
-    return Blt_Tree_NodeRelativePath(root, nodePtr, NULL, 0, dsPtr);
-}
-
-int
-Blt_Tree_ArrayValueExists(
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *arrayName, 
-    const char *elemName)
-{
-    Blt_TreeKey key;
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    Value *valuePtr;
-
-    key = Blt_Tree_GetKey(treePtr, arrayName);
-    valuePtr = GetTreeValue((Tcl_Interp *)NULL, treePtr, nodePtr, key);
-    if (valuePtr == NULL) {
-	return FALSE;
-    }
-    if (Tcl_IsShared(valuePtr->objPtr)) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-	valuePtr->objPtr = Tcl_DuplicateObj(valuePtr->objPtr);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-    }
-    if (Blt_GetArrayFromObj((Tcl_Interp *)NULL, valuePtr->objPtr, &tablePtr) 
-	!= TCL_OK) {
-	return FALSE;
-    }
-    hPtr = Blt_FindHashEntry(tablePtr, elemName);
-    return (hPtr != NULL);
-}
-
-int
-Blt_Tree_GetArrayValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *arrayName,
-    const char *elemName,
-    Tcl_Obj **valueObjPtrPtr)
-{
-    Blt_TreeKey key;
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    Value *valuePtr;
-
-    key = Blt_Tree_GetKey(treePtr, arrayName);
-    valuePtr = GetTreeValue(interp, treePtr, nodePtr, key);
-    if (valuePtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_IsShared(valuePtr->objPtr)) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-	valuePtr->objPtr = Tcl_DuplicateObj(valuePtr->objPtr);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-    }
-    if (Blt_GetArrayFromObj(interp, valuePtr->objPtr, &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(tablePtr, elemName);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find \"", arrayName, "(",
-			     elemName, ")\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *valueObjPtrPtr = Blt_GetHashValue(hPtr);
-
-    /* Reading any element of the array can cause a trace to fire. */
-    if (!(nodePtr->flags & TREE_TRACE_ACTIVE)) {
-	CallTraces(interp, treePtr, nodePtr->corePtr, nodePtr, key, 
-		   TREE_TRACE_READ);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_SetArrayValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,		/* Node to be updated. */
-    const char *arrayName,
-    const char *elemName,
-    Tcl_Obj *valueObjPtr)	/* New value of element. */
-{
-    Blt_TreeKey key;
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    Value *valuePtr;
-    unsigned int flags;
-    int isNew;
-
-    assert(valueObjPtr != NULL);
-
-    /* 
-     * Search for the array in the list of data fields.  If one doesn't exist,
-     * create it.
-     */
-    key = Blt_Tree_GetKey(treePtr, arrayName);
-    valuePtr = TreeCreateValue(nodePtr, key, &isNew);
-    if ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't set private field \"", 
-			     key, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    flags = TREE_TRACE_WRITE;
-    if (isNew) {
-	valuePtr->objPtr = Blt_NewArrayObj(0, (Tcl_Obj **)NULL);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-	flags |= TREE_TRACE_CREATE;
-    } else if (Tcl_IsShared(valuePtr->objPtr)) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-	valuePtr->objPtr = Tcl_DuplicateObj(valuePtr->objPtr);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-    }
-    if (Blt_GetArrayFromObj(interp, valuePtr->objPtr, &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_InvalidateStringRep(valuePtr->objPtr);
-    hPtr = Blt_CreateHashEntry(tablePtr, elemName, &isNew);
-    Tcl_IncrRefCount(valueObjPtr);
-    if (!isNew) {
-	Tcl_Obj *oldValueObjPtr;
-
-	/* An element by the same name already exists. Decrement the reference
-	 * count of the old value. */
-
-	oldValueObjPtr = Blt_GetHashValue(hPtr);
-	if (oldValueObjPtr != NULL) {
-	    Tcl_DecrRefCount(oldValueObjPtr);
-	}
-    }
-    Blt_SetHashValue(hPtr, valueObjPtr);
-
-    /*
-     * We don't handle traces on a per array element basis.  Setting any
-     * element can fire traces for the value.
-     */
-    if (!(nodePtr->flags & TREE_TRACE_ACTIVE)) {
-	CallTraces(interp, treePtr, nodePtr->corePtr, nodePtr, 
-		valuePtr->key, flags);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_UnsetArrayValue(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,		/* Node to be updated. */
-    const char *arrayName,
-    const char *elemName)
-{
-    Blt_TreeKey key;		/* Name of field in node. */
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    Tcl_Obj *valueObjPtr;
-    Value *valuePtr;
-
-    key = Blt_Tree_GetKey(treePtr, arrayName);
-    valuePtr = TreeFindValue(nodePtr, key);
-    if (valuePtr == NULL) {
-	return TCL_OK;
-    }
-    if ((valuePtr->owner != NULL) && (valuePtr->owner != treePtr)) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't unset private field \"", 
-			     key, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    if (Tcl_IsShared(valuePtr->objPtr)) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-	valuePtr->objPtr = Tcl_DuplicateObj(valuePtr->objPtr);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-    }
-    if (Blt_GetArrayFromObj(interp, valuePtr->objPtr, &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(tablePtr, elemName);
-    if (hPtr == NULL) {
-	return TCL_OK;		/* Element doesn't exist, Ok. */
-    }
-    valueObjPtr = Blt_GetHashValue(hPtr);
-    Tcl_DecrRefCount(valueObjPtr);
-    Blt_DeleteHashEntry(tablePtr, hPtr);
-
-    /*
-     * Un-setting any element in the array can cause the trace on the value to
-     * fire.
-     */
-    if (!(nodePtr->flags & TREE_TRACE_ACTIVE)) {
-	CallTraces(interp, treePtr, nodePtr->corePtr, nodePtr, 
-		valuePtr->key, TREE_TRACE_WRITE);
-    }
-    return TCL_OK;
-}
-
-int
-Blt_Tree_ArrayNames(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *arrayName,
-    Tcl_Obj *listObjPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Blt_HashTable *tablePtr;
-    Value *valuePtr;
-    const char *key;
-
-    key = Blt_Tree_GetKey(treePtr, arrayName);
-    valuePtr = GetTreeValue(interp, treePtr, nodePtr, key);
-    if (valuePtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_IsShared(valuePtr->objPtr)) {
-	Tcl_DecrRefCount(valuePtr->objPtr);
-	valuePtr->objPtr = Tcl_DuplicateObj(valuePtr->objPtr);
-	Tcl_IncrRefCount(valuePtr->objPtr);
-    }
-    if (Blt_GetArrayFromObj(interp, valuePtr->objPtr, &tablePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tablePtr = (Blt_HashTable *)valuePtr->objPtr;
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &cursor); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewStringObj(Blt_GetHashKey(tablePtr, hPtr), -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    return TCL_OK;
-}
-
-void
-Blt_Tree_NewTagTable(Tree *treePtr)
-{
-    Blt_TreeTagTable *tagTablePtr;
-
-    if (treePtr->tagTablePtr != NULL) {
-	ReleaseTagTable(treePtr->tagTablePtr);
-    }
-    /* By default, use own sets of tags. */
-    tagTablePtr = Blt_AssertMalloc(sizeof(Blt_TreeTagTable));
-    tagTablePtr->refCount = 1;
-    Blt_InitHashTable(&tagTablePtr->tagTable, BLT_STRING_KEYS);
-    treePtr->tagTablePtr = tagTablePtr;
-}
-
-int
-Blt_Tree_TagTableIsShared(Tree *treePtr)
-{
-    return (treePtr->tagTablePtr->refCount > 1);
-}   
-
-void
-Blt_Tree_ClearTags(Tree *treePtr, Node *nodePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&treePtr->tagTablePtr->tagTable, &cursor); 
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Blt_TreeTagEntry *tePtr;
-	Blt_HashEntry *h2Ptr;
-
-	tePtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(&tePtr->nodeTable, (char *)nodePtr);
-	if (h2Ptr != NULL) {
-	    Blt_DeleteHashEntry(&tePtr->nodeTable, h2Ptr);
-	}
-    }
-}
-
-Blt_TreeTagEntry *
-Blt_Tree_RememberTag(Tree *treePtr, const char *tagName)
-{
-    int isNew;
-    Blt_HashEntry *hPtr;
-    Blt_TreeTagEntry *tePtr;
-    Blt_HashTable *tablePtr;
-
-    tablePtr = &treePtr->tagTablePtr->tagTable;
-    hPtr = Blt_CreateHashEntry(tablePtr, tagName, &isNew);
-    if (isNew) {
-	tePtr = Blt_AssertMalloc(sizeof(Blt_TreeTagEntry));
-	Blt_InitHashTable(&tePtr->nodeTable, BLT_ONE_WORD_KEYS);
-	Blt_SetHashValue(hPtr, tePtr);
-	tePtr->hashPtr = hPtr;
-	tePtr->tagName = Blt_GetHashKey(tablePtr, hPtr);
-    } else {
-	tePtr = Blt_GetHashValue(hPtr);
-    }
-    return tePtr;
-}
-
-void
-Blt_Tree_ForgetTag(Tree *treePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_TreeTagEntry *tePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "root") == 0)) {
-	return;
-    }
-	
-    hPtr = Blt_FindHashEntry(&treePtr->tagTablePtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return;
-    }
-    tePtr = Blt_GetHashValue(hPtr);
-    Blt_DeleteHashTable(&tePtr->nodeTable);
-    Blt_Free(tePtr);
-    Blt_DeleteHashEntry(&treePtr->tagTablePtr->tagTable, hPtr);
-}
-
-int
-Blt_Tree_HasTag(
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_TreeTagEntry *tePtr;
-
-    if (strcmp(tagName, "all") == 0) {
-	return TRUE;
-    }
-    if ((strcmp(tagName, "root") == 0) && 
-	(nodePtr == Blt_Tree_RootNode(treePtr))) {
-	return TRUE;
-    }
-    hPtr = Blt_FindHashEntry(&treePtr->tagTablePtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return FALSE;
-    }
-    tePtr = Blt_GetHashValue(hPtr);
-    hPtr = Blt_FindHashEntry(&tePtr->nodeTable, (char *)nodePtr);
-    if (hPtr == NULL) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-void
-Blt_Tree_AddTag(
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *tagName)
-{
-    Blt_TreeTagEntry *tePtr;
-
-    if ((strcmp(tagName, "all") == 0) || (strcmp(tagName, "root") == 0)) {
-	return;
-    }
-    tePtr = Blt_Tree_RememberTag(treePtr, tagName);
-    if (nodePtr != NULL) {
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	hPtr = Blt_CreateHashEntry(&tePtr->nodeTable, (char *)nodePtr, &isNew);
-	if (isNew) {
-	    Blt_SetHashValue(hPtr, nodePtr);
-	}
-    }
-}
-
-void
-Blt_Tree_RemoveTag(
-    Tree *treePtr,
-    Node *nodePtr,
-    const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-    Blt_TreeTagEntry *tePtr;
-    
-    if (strcmp(tagName, "all") == 0) {
-	return;			/* Can't remove tag "all". */
-    }
-    if ((strcmp(tagName, "root") == 0) && 
-	(nodePtr == Blt_Tree_RootNode(treePtr))) {
-	return;			/* Can't remove tag "root" from root node. */
-    }
-    hPtr = Blt_FindHashEntry(&treePtr->tagTablePtr->tagTable, tagName);
-    if (hPtr == NULL) {
-	return;			/* No such tag. */
-    }
-    tePtr = Blt_GetHashValue(hPtr);
-    hPtr = Blt_FindHashEntry(&tePtr->nodeTable, (char *)nodePtr);
-    if (hPtr == NULL) {
-	return;			/* Node isn't tagged. */
-    }
-    Blt_DeleteHashEntry(&tePtr->nodeTable, hPtr);
-    return;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_TagHashTable --
- *
- *---------------------------------------------------------------------------
- */
-Blt_HashTable *
-Blt_Tree_TagHashTable(Tree *treePtr, const char *tagName)
-{
-    Blt_HashEntry *hPtr;
-   
-    hPtr = Blt_FindHashEntry(&treePtr->tagTablePtr->tagTable, tagName);
-    if (hPtr != NULL) {
-	Blt_TreeTagEntry *tePtr;
-	
-	tePtr = Blt_GetHashValue(hPtr);
-	return &tePtr->nodeTable;
-    }
-    return NULL;
-}
-
-Blt_HashEntry *
-Blt_Tree_FirstTag(Tree *treePtr, Blt_HashSearch *cursorPtr)
-{
-    return Blt_FirstHashEntry(&treePtr->tagTablePtr->tagTable, cursorPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_DumpNode --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Tree_DumpNode(Tree *treePtr, Node *rootPtr, Node *nodePtr, 
-		  Tcl_DString *dsPtr)
-{
-    if (nodePtr == rootPtr) {
-	Tcl_DStringAppendElement(dsPtr, "-1");
-    } else {
-	Tcl_DStringAppendElement(dsPtr, 
-		Blt_Tree_NodeIdAscii(nodePtr->parent));
-    }	
-    Tcl_DStringAppendElement(dsPtr, Blt_Tree_NodeIdAscii(nodePtr));
-
-    Tcl_DStringStartSublist(dsPtr);
-    Blt_Tree_NodeRelativePath(rootPtr, nodePtr, NULL, TREE_INCLUDE_ROOT, dsPtr);
-    Tcl_DStringEndSublist(dsPtr);
-
-    Tcl_DStringStartSublist(dsPtr);
-    {
-	Blt_TreeKeyIterator iter;
-	Blt_TreeKey key;
-
-	/* Add list of key-value pairs. */
-	for (key = Blt_Tree_FirstKey(treePtr, nodePtr, &iter); key != NULL; 
-	     key = Blt_Tree_NextKey(treePtr, &iter)) {
-	    Tcl_Obj *objPtr;
-
-	    if (Blt_Tree_GetValueByKey((Tcl_Interp *)NULL, treePtr, nodePtr, 
-			key, &objPtr) == TCL_OK) {
-		Tcl_DStringAppendElement(dsPtr, key);
-		Tcl_DStringAppendElement(dsPtr, Tcl_GetString(objPtr));
-	    }
-	}	    
-    }
-    Tcl_DStringEndSublist(dsPtr);
-    Tcl_DStringStartSublist(dsPtr);
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	/* Add list of tags. */
-	for (hPtr = Blt_Tree_FirstTag(treePtr, &cursor); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_TreeTagEntry *tePtr;
-
-	    tePtr = Blt_GetHashValue(hPtr);
-	    if (Blt_FindHashEntry(&tePtr->nodeTable, (char *)nodePtr) != NULL) {
-		Tcl_DStringAppendElement(dsPtr, tePtr->tagName);
-	    }
-	}
-    }
-    Tcl_DStringEndSublist(dsPtr);
-    Tcl_DStringAppend(dsPtr, "\n", -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_Dump --
- *
- *	Dumps node information recursively from the given tree based starting
- *	at *rootPtr*. The dump information is written to the TCL dynamic
- *	string provided. It the caller's responsibility to initialize and free
- *	the dynamic string.
- *	
- * Results:
- *	Always returns TCL_OK.
- *
- * Side Effects:
- *	Dump information is written to the dynamic string provided.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_Dump(
-    Tree *treePtr,
-    Node *rootPtr,		/* Root node of sub-tree. */
-    Tcl_DString *dsPtr)
-{
-    Node *np;
-
-    for (np = rootPtr; np != NULL; np = Blt_Tree_NextNode(rootPtr, np)) {
-	Blt_Tree_DumpNode(treePtr, rootPtr, np, dsPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_DumpToFile --
- *
- *	Dumps node information recursively from the given tree based starting
- *	at *rootPtr*. The dump information is written to the file named. If
- *	the file name starts with an '@', then it is the name of an already
- *	opened channel to be used.
- *	
- * Results:
- *	A standard TCL result.  If the dump was successful, TCL_OK is
- *	returned.  Otherwise, TCL_ERROR is returned and an error message is
- *	left in the interpreter result.
- *
- * Side Effects:
- *	Dump information is written to the named file.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_DumpToFile(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *rootPtr,			/* Root node of subtree. */
-    const char *fileName)
-{
-    Tcl_Channel channel;
-    Node *np;
-    Tcl_DString ds;
-    int closeChannel;
-    
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-	if ((mode & TCL_WRITABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for writing", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_DStringInit(&ds);
-    for (np = rootPtr; np != NULL; np = Blt_Tree_NextNode(rootPtr, np)) {
-	int nWritten, length;
-
-	Tcl_DStringSetLength(&ds, 0);
-	Blt_Tree_DumpNode(treePtr, rootPtr, np, &ds);
-	length = Tcl_DStringLength(&ds);
-#if HAVE_UTF
-	nWritten = Tcl_WriteChars(channel, Tcl_DStringValue(&ds), length);
-#else
-	nWritten = Tcl_Write(channel, Tcl_DStringValue(&ds), length);
-#endif
-	if (nWritten < 0) {
-	    Tcl_AppendResult(interp, fileName, ": write error:", 
-			     Tcl_PosixError(interp), (char *)NULL);
-	    Tcl_DStringFree(&ds);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_DStringFree(&ds);
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_RestoreFromFile --
- *
- *	Restores nodes to the given tree based upon the dump file
- *	provided. The dump file should have been generated by Blt_Tree_Dump or
- *	Blt_Tree_DumpToFile.  If the file name starts with an '@', then it is
- *	the name of an already opened channel to be used. Nodes are added
- *	relative to the node *rootPtr* as the root of the sub-tree.  Two bit
- *	flags may be set.
- *	
- *	TREE_RESTORE_NO_TAGS	Don't restore tag information.
- *	TREE_RESTORE_OVERWRITE	Look for nodes with the same label.
- *				Overwrite if necessary.
- *
- * Results:
- *	A standard TCL result.  If the restore was successful, TCL_OK is
- *	returned.  Otherwise, TCL_ERROR is returned and an error message is
- *	left in the interpreter result.
- *
- * Side Effects:
- *	New nodes are created in the tree and may possibly generate notify
- *	callbacks.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_RestoreFromFile(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *rootPtr,		     /* Root node of branch to be restored. */
-    const char *fileName,
-    unsigned int flags)
-{
-    Tcl_Channel channel;
-    RestoreInfo restore;
-    int argc;
-    const char **argv;
-    int closeChannel;
-    int result;
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return TCL_ERROR;
-	}
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for reading", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return TCL_ERROR;		/* Can't open dump file. */
-	}
-    }
-    memset((char *)&restore, 0, sizeof(restore));
-    Blt_InitHashTable(&restore.idTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&restore.dataTable, BLT_STRING_KEYS);
-    restore.rootPtr = rootPtr;
-    restore.flags = flags;
-    restore.treePtr = treePtr;
-
-    argv = NULL;
-    result = TCL_ERROR;		
-    for (;;) {
-	result = ReadDumpRecord(interp, channel, &argc, &argv, &restore);
-	if (result != TCL_OK) {
-	    break;			/* Found error or EOF */
-	}
-	if (argc == 0) {
-	    result = TCL_OK;		/* Do nothing. */
-	} else if (argc == 3) {
-	    result = RestoreNode3(interp, argc, argv, &restore);
-	} else if ((argc == 5) || (argc == 6)) {
-	    result = RestoreNode5(interp, argc, argv, &restore);
-	} else {
-	    Tcl_AppendResult(interp, "line #", Blt_Itoa(restore.nLines), 
-		": wrong # elements in restore entry", (char *)NULL);
-	    result = TCL_ERROR;
-	}
-	Blt_Free(argv);
-	if (result != TCL_OK) {
-	    break;
-	}
-    } 
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    Blt_DeleteHashTable(&restore.idTable);
-    Blt_DeleteHashTable(&restore.dataTable);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Tree_Restore --
- *
- *	Restores nodes to the given tree based upon the dump string.  The dump
- *	string should have been generated by Blt_Tree_Dump.  Nodes are added
- *	relative to the node *rootPtr* as the root of the sub-tree.  Two bit
- *	flags may be set.
- *	
- *	TREE_RESTORE_NO_TAGS	Don't restore tag information.
- *	TREE_RESTORE_OVERWRITE	Look for nodes with the same label.
- *				Overwrite if necessary.
- *
- * Results:
- *	A standard TCL result.  If the restore was successful, TCL_OK is
- *	returned.  Otherwise, TCL_ERROR is returned and an error message is
- *	left in the interpreter result.
- *
- * Side Effects:
- *	New nodes are created in the tree and may possibly generate
- *	notify callbacks.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Tree_Restore(
-    Tcl_Interp *interp,
-    Tree *treePtr,
-    Node *rootPtr,		/* Root node of branch to be restored. */
-    const char *string,
-    unsigned int flags)
-{
-    RestoreInfo restore;
-    int result;
-	
-    memset((char *)&restore, 0, sizeof(restore));
-    Blt_InitHashTable(&restore.idTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&restore.dataTable, BLT_STRING_KEYS);
-    restore.treePtr = treePtr;
-    restore.rootPtr = rootPtr;
-    restore.flags = flags;
-    result = TCL_ERROR;
-    for (;;) {
-	const char **argv;
-	int argc;
-
-	result = ParseDumpRecord(interp, &string, &argc, &argv, &restore);
-	if (result != TCL_OK) {
-	    break;		/* Found error or EOF */
-	}
-	if (argc == 0) {
-	    result = TCL_OK; /* Do nothing. */
-	} else if (argc == 3) {
-	    result = RestoreNode3(interp, argc, argv, &restore);
-	} else if ((argc == 5) || (argc == 6)) {
-	    result = RestoreNode5(interp, argc, argv, &restore);
-	} else {
-	    Tcl_AppendResult(interp, "line #", Blt_Itoa(restore.nLines), 
-		": wrong # elements in restore entry", (char *)NULL);
-	    result = TCL_ERROR;
-	}
-	Blt_Free(argv);
-	if (result != TCL_OK) {
-	    break;
-	}
-    } 
-    Blt_DeleteHashTable(&restore.idTable);
-    Blt_DeleteHashTable(&restore.dataTable);
-
-    /* result will be TCL_RETURN if successful, TCL_ERROR otherwise. */
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltTree.h b/blt3.0/src/bltTree.h
deleted file mode 100644
index fc26a45..0000000
--- a/blt3.0/src/bltTree.h
+++ /dev/null
@@ -1,496 +0,0 @@
-
-/*
- * bltTree.h --
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_TREE_H
-#define _BLT_TREE_H
-
-#include <bltChain.h>
-#include <bltHash.h>
-#include <bltPool.h>
-
-typedef struct _Blt_TreeSlink *Blt_TreeSlink;
-typedef struct _Blt_TreeNode *Blt_TreeNode;
-typedef struct _Blt_TreeObject *Blt_TreeObject;
-typedef struct _Blt_Tree *Blt_Tree;
-typedef struct _Blt_TreeTrace *Blt_TreeTrace;
-typedef struct _Blt_TreeValue *Blt_TreeValue;
-typedef struct _Blt_TreeTagEntry Blt_TreeTagEntry;
-typedef struct _Blt_TreeTagTable Blt_TreeTagTable;
-typedef struct _Blt_TreeInterpData Blt_TreeInterpData;
-
-typedef const char *Blt_TreeKey;
-
-#define TREE_CREATE		(1<<0)
-#define TREE_NEWTAGS		(1<<1)
-
-#define TREE_PREORDER		(1<<0)
-#define TREE_POSTORDER		(1<<1)
-#define TREE_INORDER		(1<<2)
-#define TREE_BREADTHFIRST	(1<<3)
-
-#define TREE_NODE_LINK		(1<<0)
-
-#define TREE_TRACE_UNSET	(1<<3)
-#define TREE_TRACE_WRITE	(1<<4)
-#define TREE_TRACE_READ		(1<<5)
-#define TREE_TRACE_CREATE	(1<<6)
-#define TREE_TRACE_ALL		\
-    (TREE_TRACE_UNSET | TREE_TRACE_WRITE | TREE_TRACE_READ | TREE_TRACE_CREATE)
-#define TREE_TRACE_MASK		(TREE_TRACE_ALL)
-
-#define TREE_TRACE_WHENIDLE	(1<<8)
-#define TREE_TRACE_FOREIGN_ONLY	(1<<9)
-#define TREE_TRACE_ACTIVE	(1<<10)
-
-#define TREE_NOTIFY_CREATE	(1<<0)
-#define TREE_NOTIFY_DELETE	(1<<1)
-#define TREE_NOTIFY_MOVE	(1<<2)
-#define TREE_NOTIFY_SORT	(1<<3)
-#define TREE_NOTIFY_RELABEL	(1<<4)
-#define TREE_NOTIFY_ALL		\
-    (TREE_NOTIFY_CREATE | TREE_NOTIFY_DELETE | TREE_NOTIFY_MOVE | \
-	TREE_NOTIFY_SORT | TREE_NOTIFY_RELABEL)
-#define TREE_NOTIFY_MASK	(TREE_NOTIFY_ALL)
-
-#define TREE_NOTIFY_WHENIDLE	 (1<<8)
-#define TREE_NOTIFY_FOREIGN_ONLY (1<<9)
-#define TREE_NOTIFY_ACTIVE	 (1<<10)
-
-#define TREE_RESTORE_NO_TAGS	(1<<0)
-#define TREE_RESTORE_OVERWRITE	(1<<1)
-
-#define TREE_INCLUDE_ROOT	(1<<0)
-
-typedef struct {
-    int type;
-    Blt_Tree tree;
-    long inode;			/* Node of event */
-    Tcl_Interp *interp;
-} Blt_TreeNotifyEvent;
-
-typedef struct {
-    Blt_TreeNode node;		/* Node being searched. */
-    unsigned long nextIndex;	/* Index of next bucket to be enumerated after
-				 * present one. */
-    Blt_TreeValue nextValue;	/* Next entry to be enumerated in the the
-				 * current bucket. */
-} Blt_TreeKeyIterator;
-
-/*
- * Blt_TreeObject --
- *
- *	Structure providing the internal representation of the tree object. A
- *	tree is uniquely identified by a combination of its name and
- *	originating namespace.  Two trees in the same interpreter can have the
- *	same names but must reside in different namespaces.
- *
- *	The tree object represents a general-ordered tree of nodes.  Each node
- *	may contain a heterogeneous collection of data values. Each value is
- *	identified by a field name and nodes do not need to contain the same
- *	data fields. Data field names are saved as reference counted strings
- *	and can be shared among nodes.
- *
- *	The tree is threaded.  Each node contains pointers to back its parents
- *	to its next sibling.  
- * 
- *	A tree object can be shared by several clients.  When a client wants
- *	to use a tree object, it is given a token that represents the tree.
- *	The tree object uses the tokens to keep track of its clients.  When
- *	all clients have released their tokens the tree is automatically
- *	destroyed.
- */
-
-struct _Blt_TreeObject {
-    Blt_TreeNode root;		/* Root of the entire tree. */
-
-    const char *sortNodesCmd;	/* TCL command to invoke to sort entries */
-
-    Blt_Chain clients;		/* List of clients using this tree */
-
-    Blt_Pool nodePool;
-    Blt_Pool valuePool;
-    
-    Blt_HashTable nodeTable;	/* Table of node identifiers. Used to
-				 * search for a node pointer given an inode.*/
-    Blt_TreeInterpData *dataPtr;
-    long nextInode;
-
-    long nNodes;		/* Always counts root node. */
-
-    long depth;			/* Maximum depth of the tree. */
-
-    unsigned int flags;		/* Internal flags. See definitions below. */
-    unsigned int notifyFlags;	/* Notification flags. See definitions
-				 * below. */
-};
-
-/*
- * _Blt_TreeNode --
- *
- *	Structure representing a node in a general ordered tree.  Nodes are
- *	identified by their index, or inode.  Nodes also have names, but nodes
- *	names are not unique and can be changed.  Inodes are valid even if the
- *	node is moved.
- *
- *	Each node can contain a list of data fields.  Fields are name-value
- *	pairs.  The values are represented by Tcl_Objs.
- *	
- */
-struct _Blt_TreeNode {
-    Blt_TreeNode parent;	/* Parent node. If NULL, then this is the root
-				   node. */
-    Blt_TreeNode next, prev;	/* Next/previous sibling nodes. */
-    Blt_TreeNode hnext;		/* Next node in the hash bucket. */
-    
-    Blt_TreeKey label;		/* Node label (doesn't have to be unique). */
-    long inode;			/* Serial number of the node. */
-
-    Blt_TreeObject corePtr;	/* Pointer back to the tree object that
-				 * contains this node. */
-    size_t depth;		/* The depth of this node in the tree. */
-    size_t nChildren;		/* # of children for this node. */
-    Blt_TreeNode first, last;	/* First/last nodes of child nodes stored as a
-				 * linked list. */
-    Blt_TreeNode *nodeTable;    /* Hash table of child nodes. */
-    size_t nodeTableSize2;	/* Log2 size of child node hash table. */
-
-    Blt_TreeValue values;	/* Chain of Blt_TreeValue structures.  Each
-				 * value structure contains a key/value data
-				 * pair.  The data value is a Tcl_Obj. */
-
-    Blt_TreeValue *valueTable;	/* Hash table for values. When the number of
-				 * values reaches exceeds a threshold, values
-				 * will also be linked into this hash
-				 * table. */
-
-    unsigned short nValues;	/* # of values for this node. */
-    unsigned short valueTableSize2; /* Size of hash table indicated as a power
-				 * of 2 (e.g. if logSize=3, then table size is
-				 * 8). If 0, this indicates that the node's
-				 * values are stored as a list. */
-    unsigned int flags;		/* Indicates if this node is currently used
-				 * within an active trace. */
-};
-
-struct _Blt_TreeTagEntry {
-    const char *tagName;
-    Blt_HashEntry *hashPtr;
-    Blt_HashTable nodeTable;
-};
-
-struct _Blt_TreeTagTable {
-    Blt_HashTable tagTable;
-    int refCount;
-};
-
-/*
- * _Blt_Tree --
- *
- *	A tree may be shared by several clients.  Each client allocates this
- *	structure which acts as a ticket for using the tree.  Each client can
- *
- *      - Designate notifier routines that are automatically invoked by the
- *        tree object when nodes are created, deleted, moved, etc. by other
- *        clients.
- *      - Place traces on the values of specific nodes.
- *      - Manage its own set or common of tags for nodes of the tree. By
- *        default, clients share tags.
- */
-
-struct _Blt_Tree {
-    unsigned int magic;		/* Magic value indicating whether a generic
-				 * pointer is really a datatable token or
-				 * not. */
-    const char *name;		/* Fully namespace-qualified name of the
-				 * client. */
-    Blt_TreeObject corePtr;	/* Pointer to the structure containing the
-				 * master information about the tree used by
-				 * the client.  If NULL, this indicates that
-				 * the tree has been destroyed (but as of yet,
-				 * this client hasn't recognized it). */
-    Tcl_Interp *interp;		/* Interpreter associated with this tree. */
-
-    Blt_HashEntry *hPtr;	/* This client's entry in the above
-				 * table. This is a list of clients that all
-				 * have the same qualified table name
-				 * (i.e. are sharing the same table. */
-
-    Blt_ChainLink link;		/* Pointer to this link in the server's chain
-				 * of clients. */
-    
-    Blt_Chain events;		/* Chain of node event handlers. */
-    Blt_Chain traces;		/* Chain of data field callbacks. */
-    Blt_TreeNode root;		/* Designated root for this client */
-    Blt_TreeTagTable *tagTablePtr; /* Tag table used by this client. */ 
-};
-
-
-typedef int (Blt_TreeNotifyEventProc)(ClientData clientData, 
-	Blt_TreeNotifyEvent *eventPtr);
-
-typedef int (Blt_TreeTraceProc)(ClientData clientData, Tcl_Interp *interp, 
-	Blt_TreeNode node, Blt_TreeKey key, unsigned int flags);
-
-typedef int (Blt_TreeEnumProc)(Blt_TreeNode node, Blt_TreeKey key, 
-	Tcl_Obj *valuePtr);
-
-typedef int (Blt_TreeCompareNodesProc)(Blt_TreeNode *n1Ptr, 
-	Blt_TreeNode *n2Ptr);
-
-typedef int (Blt_TreeApplyProc) _ANSI_ARGS_((Blt_TreeNode node, 
-	ClientData clientData, int order));
-
-struct _Blt_TreeTrace {
-    ClientData clientData;
-    Blt_TreeKey key;
-    Blt_TreeNode node;
-    unsigned int mask;
-    Blt_TreeTraceProc *proc;
-};
-
-/*
- * Structure definition for information used to keep track of searches through
- * hash tables:
- */
-struct _Blt_TreeKeyIterator {
-    Blt_TreeNode node;		/* Table being searched. */
-    unsigned long nextIndex;	/* Index of next bucket to be enumerated after
-				 * present one. */
-    Blt_TreeValue nextValue;	/* Next entry to be enumerated in the the
-				 * current bucket. */
-};
-
-BLT_EXTERN Blt_TreeKey Blt_Tree_GetKey(Blt_Tree tree, const char *string);
-BLT_EXTERN Blt_TreeKey Blt_Tree_GetKeyFromNode(Blt_TreeNode node, 
-	const char *string);
-BLT_EXTERN Blt_TreeKey Blt_Tree_GetKeyFromInterp(Tcl_Interp *interp,
-	const char *string);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_CreateNode(Blt_Tree tree, Blt_TreeNode parent, 
-	const char *name, long position); 
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_CreateNodeWithId(Blt_Tree tree, 
-	Blt_TreeNode parent, const char *name, long inode, long position); 
-
-BLT_EXTERN int Blt_Tree_DeleteNode(Blt_Tree tree, Blt_TreeNode node);
-
-BLT_EXTERN int Blt_Tree_MoveNode(Blt_Tree tree, Blt_TreeNode node, 
-	Blt_TreeNode parent, Blt_TreeNode before);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_GetNode(Blt_Tree tree, long inode);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_FindChild(Blt_TreeNode parent, 
-	const char *name);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_NextNode(Blt_TreeNode root, Blt_TreeNode node);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_PrevNode(Blt_TreeNode root, Blt_TreeNode node);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_FirstChild(Blt_TreeNode parent);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_LastChild(Blt_TreeNode parent);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_ChangeRoot(Blt_Tree tree, Blt_TreeNode node);
-
-BLT_EXTERN Blt_TreeNode Blt_Tree_EndNode(Blt_TreeNode node, 
-	unsigned int nodeFlags);
-
-BLT_EXTERN int Blt_Tree_IsBefore(Blt_TreeNode node1, Blt_TreeNode node2);
-
-BLT_EXTERN int Blt_Tree_IsAncestor(Blt_TreeNode node1, Blt_TreeNode node2);
-
-BLT_EXTERN int Blt_Tree_PrivateValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, Blt_TreeKey key);
-
-BLT_EXTERN int Blt_Tree_PublicValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, Blt_TreeKey key);
-
-BLT_EXTERN int Blt_Tree_GetValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *string, Tcl_Obj **valuePtr);
-
-BLT_EXTERN int Blt_Tree_ValueExists(Blt_Tree tree, Blt_TreeNode node, 
-	const char *string);
-
-BLT_EXTERN int Blt_Tree_SetValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *string, Tcl_Obj *valuePtr);
-
-BLT_EXTERN int Blt_Tree_UnsetValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *string);
-
-BLT_EXTERN int Blt_Tree_GetArrayValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *arrayName, const char *elemName, 
-	Tcl_Obj **valueObjPtrPtr);
-
-BLT_EXTERN int Blt_Tree_SetArrayValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *arrayName, const char *elemName, 
-	Tcl_Obj *valueObjPtr);
-
-BLT_EXTERN int Blt_Tree_UnsetArrayValue(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *arrayName, const char *elemName);
-
-BLT_EXTERN int Blt_Tree_ArrayValueExists(Blt_Tree tree, Blt_TreeNode node, 
-	const char *arrayName, const char *elemName);
-
-BLT_EXTERN int Blt_Tree_ArrayNames(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, const char *arrayName, Tcl_Obj *listObjPtr);
-
-BLT_EXTERN int Blt_Tree_GetValueByKey(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, Blt_TreeKey key, Tcl_Obj **valuePtr);
-
-BLT_EXTERN int Blt_Tree_SetValueByKey(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, Blt_TreeKey key, Tcl_Obj *valuePtr);
-
-BLT_EXTERN int Blt_Tree_UnsetValueByKey(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode node, Blt_TreeKey key);
-
-BLT_EXTERN int Blt_Tree_ValueExistsByKey(Blt_Tree tree, Blt_TreeNode node, 
-	Blt_TreeKey key);
-
-BLT_EXTERN Blt_TreeKey Blt_Tree_FirstKey(Blt_Tree tree, Blt_TreeNode node, 
-	Blt_TreeKeyIterator *iterPtr);
-
-BLT_EXTERN Blt_TreeKey Blt_Tree_NextKey(Blt_Tree tree, 
-	Blt_TreeKeyIterator *iterPtr);
-
-BLT_EXTERN int Blt_Tree_Apply(Blt_TreeNode root, Blt_TreeApplyProc *proc, 
-	ClientData clientData);
-
-BLT_EXTERN int Blt_Tree_ApplyDFS(Blt_TreeNode root, Blt_TreeApplyProc *proc, 
-	ClientData clientData, int order);
-
-BLT_EXTERN int Blt_Tree_ApplyBFS(Blt_TreeNode root, Blt_TreeApplyProc *proc, 
-	ClientData clientData);
-
-BLT_EXTERN int Blt_Tree_SortNode(Blt_Tree tree, Blt_TreeNode node, 
-	Blt_TreeCompareNodesProc *proc);
-
-BLT_EXTERN int Blt_Tree_Exists(Tcl_Interp *interp, const char *name);
-
-BLT_EXTERN Blt_Tree Blt_Tree_Open(Tcl_Interp *interp, const char *name, 
-	int flags);
-
-BLT_EXTERN void Blt_Tree_Close(Blt_Tree tree);
-
-BLT_EXTERN int Blt_Tree_Attach(Tcl_Interp *interp, Blt_Tree tree, 
-	const char *name);
-
-BLT_EXTERN int Blt_Tree_Size(Blt_TreeNode node);
-
-BLT_EXTERN Blt_TreeTrace Blt_Tree_CreateTrace(Blt_Tree tree, Blt_TreeNode node, 
-	const char *keyPattern, const char *tagName, unsigned int mask, 
-	Blt_TreeTraceProc *proc, ClientData clientData);
-
-BLT_EXTERN void Blt_Tree_DeleteTrace(Blt_TreeTrace token);
-
-BLT_EXTERN void Blt_Tree_CreateEventHandler(Blt_Tree tree, unsigned int mask, 
-	Blt_TreeNotifyEventProc *proc, ClientData clientData);
-
-BLT_EXTERN void Blt_Tree_DeleteEventHandler(Blt_Tree tree, unsigned int mask, 
-	Blt_TreeNotifyEventProc *proc, ClientData clientData);
-
-BLT_EXTERN void Blt_Tree_RelabelNode(Blt_Tree tree, Blt_TreeNode node, 
-	const char *string);
-BLT_EXTERN void Blt_Tree_RelabelNodeWithoutNotify(Blt_TreeNode node,
-	const char *string);
-
-BLT_EXTERN const char *Blt_Tree_NodeIdAscii(Blt_TreeNode node);
-
-BLT_EXTERN const char *Blt_Tree_NodePath(Blt_TreeNode node, 
-	Tcl_DString *resultPtr);	
-
-BLT_EXTERN const char *Blt_Tree_NodeRelativePath(Blt_TreeNode root, 
-	Blt_TreeNode node, const char *separator, unsigned int flags, 
-	Tcl_DString *resultPtr);
-
-BLT_EXTERN long Blt_Tree_NodePosition(Blt_TreeNode node);
-
-BLT_EXTERN void Blt_Tree_ClearTags(Blt_Tree tree, Blt_TreeNode node);
-BLT_EXTERN int Blt_Tree_HasTag(Blt_Tree tree, Blt_TreeNode node, 
-	const char *tagName);
-BLT_EXTERN void Blt_Tree_AddTag(Blt_Tree tree, Blt_TreeNode node, 
-	const char *tagName);
-BLT_EXTERN void Blt_Tree_RemoveTag(Blt_Tree tree, Blt_TreeNode node,
-	const char *tagName);
-BLT_EXTERN void Blt_Tree_ForgetTag(Blt_Tree tree, const char *tagName);
-BLT_EXTERN Blt_HashTable *Blt_Tree_TagHashTable(Blt_Tree tree, 
-	const char *tagName);
-BLT_EXTERN int Blt_Tree_TagTableIsShared(Blt_Tree tree);
-BLT_EXTERN void Blt_Tree_NewTagTable(Blt_Tree tree);
-
-BLT_EXTERN Blt_HashEntry *Blt_Tree_FirstTag(Blt_Tree tree, 
-	Blt_HashSearch *searchPtr);
-
-BLT_EXTERN int Blt_Tree_ImportData(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode root, Tcl_Obj *objPtr, unsigned int flags);
-
-BLT_EXTERN int Blt_Tree_ImportFile(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode root, Tcl_Obj *objPtr, unsigned int flags);
-
-BLT_EXTERN void Blt_Tree_DumpNode(Blt_Tree tree, Blt_TreeNode root, 
-	Blt_TreeNode node, Tcl_DString *resultPtr);
-
-BLT_EXTERN int Blt_Tree_Dump(Blt_Tree tree, Blt_TreeNode root, 
-	Tcl_DString *resultPtr);
-
-BLT_EXTERN int Blt_Tree_DumpToFile(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode root, const char *fileName);
-
-BLT_EXTERN int Blt_Tree_Restore _ANSI_ARGS_((Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode root, const char *string, unsigned int flags));
-
-BLT_EXTERN int Blt_Tree_RestoreFromFile(Tcl_Interp *interp, Blt_Tree tree, 
-	Blt_TreeNode root, const char *fileName, unsigned int flags);
-
-#define Blt_Tree_Name(token)	((token)->name)
-#define Blt_Tree_RootNode(token) ((token)->root)
-
-#define Blt_Tree_NodeDegree(node) ((node)->nChildren)
-#define Blt_Tree_NodeDepth(node) ((node)->depth)
-#define Blt_Tree_NodeLabel(node) ((node)->label)
-#define Blt_Tree_NodeId(node)	 ((node)->inode)
-#define Blt_Tree_NextNodeId(token)     ((token)->corePtr->nextInode)
-#define Blt_Tree_ParentNode(node) ((node == NULL) ? NULL : (node)->parent)
-
-#define Blt_Tree_IsLeaf(node)     ((node)->nChildren == 0)
-#define Blt_Tree_IsLink(node)     ((node)->flags & TREE_NODE_LINK)
-
-#define Blt_Tree_NextSibling(node) (((node) == NULL) ? NULL : (node)->next)
-#define Blt_Tree_PrevSibling(node) (((node) == NULL) ? NULL : (node)->prev)
-
-typedef int (Blt_TreeImportProc)(Tcl_Interp *interp, Blt_Tree tree, int objc, 
-	Tcl_Obj *const *objv);
-
-typedef int (Blt_TreeExportProc)(Tcl_Interp *interp, Blt_Tree tree, int objc, 
-	Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_Tree_RegisterFormat(Tcl_Interp *interp, const char *fmtName, 
-	Blt_TreeImportProc *importProc, Blt_TreeExportProc *exportProc);
-
-BLT_EXTERN Blt_TreeTagEntry *Blt_Tree_RememberTag(Blt_Tree tree, 
-	const char *name);
-
-#endif /* _BLT_TREE_H */
-
diff --git a/blt3.0/src/bltTreeCmd.c b/blt3.0/src/bltTreeCmd.c
deleted file mode 100644
index d48f76b..0000000
--- a/blt3.0/src/bltTreeCmd.c
+++ /dev/null
@@ -1,6032 +0,0 @@
-
-/*
- *
- * bltTreeCmd.c --
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
-  tree create t0 t1 t2
-  tree names
-  t0 destroy
-     -or-
-  tree destroy t0
-  tree copy tree at node tree at node -recurse -tags
-
-  tree move node after|before|into t2 at node
-
-  $t apply -recurse $root command arg arg			
-
-  $t attach treename				
-
-  $t children $n
-  t0 copy node1 node2 node3 node4 node5 destName 
-  $t delete $n...				
-  $t depth $n
-  $t dump $root
-  $t dumpfile $root fileName
-  $t dup $t2		
-  $t find $root -name pat -name pattern
-  $t firstchild $n
-  $t get $n $key
-  $t get $n $key(abc)
-  $t index $n
-  $t insert $parent $switches?
-  $t isancestor $n1 $n2
-  $t isbefore $n1 $n2
-  $t isleaf $n
-  $t lastchild $n
-  $t move $n1 after|before|into $n2
-  $t next $n
-  $t nextsibling $n
-  $t path $n1 $n2 $n3...
-  $t parent $n
-  $t previous $n
-  $t prevsibling $n
-  $t restore $root data -overwrite
-  $t root ?$n?
-
-  $t set $n $key $value ?$key $value?
-  $t size $n
-  $t slink $n $t2@$node				???
-  $t sort -recurse $root		
-
-  $t tag delete tag1 tag2 tag3...
-  $t tag names
-  $t tag nodes $tag
-  $t tag set $n tag1 tag2 tag3...
-  $t tag unset $n tag1 tag2 tag3...
-
-  $t trace create $n $key how -whenidle command 
-  $t trace delete id1 id2 id3...
-  $t trace names
-  $t trace info $id
-
-  $t unset $n key1 key2 key3...
-  
-  $t notify create -oncreate -ondelete -onmove command 
-  $t notify create -oncreate -ondelete -onmove -onsort command arg arg arg 
-  $t notify delete id1 id2 id3
-  $t notify names
-  $t notify info id
-
-  for { set n [$t firstchild $node] } { $n >= 0 } { 
-        set n [$t nextsibling $n] } {
-  }
-  foreach n [$t children $node] { 
-	  
-  }
-  set n [$t next $node]
-  set n [$t previous $node]
-
-*/
-
-#include <bltInt.h>
-
-#ifndef NO_TREE
-#include "bltOp.h"
-#include <bltTree.h>
-#include <bltHash.h>
-#include <bltList.h>
-#include "bltNsUtil.h"
-#include "bltSwitch.h"
-#include <ctype.h>
-
-#define TREE_THREAD_KEY "BLT Tree Command Data"
-#define TREE_MAGIC ((unsigned int) 0x46170277)
-
-enum TagTypes { TAG_TYPE_NONE, TAG_TYPE_ALL, TAG_TYPE_TAG };
-
-typedef struct {
-    char *name;			/* Name of format. */
-    int isLoaded;			
-    Blt_TreeImportProc    *importProc;
-    Blt_TreeExportProc    *exportProc;
-} DataFormat;
-
-typedef struct {
-    Tcl_Interp *interp;
-    Blt_HashTable treeTable;	/* Hash table of trees keyed by address. */
-    Blt_HashTable fmtTable;
-} TreeCmdInterpData;
-
-typedef struct {
-    Tcl_Interp *interp;
-    Tcl_Command cmdToken;	/* Token for tree's TCL command. */
-    Blt_Tree tree;		/* Token holding internal tree. */
-
-    Blt_HashEntry *hashPtr;
-    Blt_HashTable *tablePtr;
-
-    TreeCmdInterpData *tdPtr;	/*  */
-
-    int traceCounter;		/* Used to generate trace id strings.  */
-    Blt_HashTable traceTable;	/* Table of active traces. Maps trace ids back
-				 * to their TraceInfo records. */
-
-    int notifyCounter;		/* Used to generate notify id strings. */
-    Blt_HashTable notifyTable;	/* Table of event handlers. Maps notify ids
-				 * back to their NotifyInfo records. */
-} TreeCmd;
-
-typedef struct {
-    TreeCmd *cmdPtr;
-    Blt_TreeNode node;
-    Blt_TreeTrace traceToken;
-
-    char *withTag;		/* If non-NULL, the event or trace was
-				 * specified with this tag.  This value is
-				 * saved for informational purposes.  The
-				 * tree's trace matching routines do the real
-				 * checking, not the client's callback.  */
-
-    char command[1];		/* Command prefix for the trace or notify Tcl
-				 * callback.  Extra arguments will be appended
-				 * to the end. Extra space will be allocated
-				 * for the length of the string
-				 */
-} TraceInfo;
-
-typedef struct {
-    TreeCmd *cmdPtr;
-    int mask;
-    Tcl_Obj **objv;
-    int objc;
-    Blt_TreeNode node;		/* Node affected by event. */
-    Blt_TreeTrace notifyToken;
-} NotifyInfo;
-
-typedef struct {
-    int mask;
-} AttachSwitches;
-
-static Blt_SwitchSpec attachSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-newtags", "",
-	Blt_Offset(AttachSwitches, mask), 0, TREE_NEWTAGS},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int mask;
-} NotifySwitches;
-
-static Blt_SwitchSpec notifySwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-create", "",
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_CREATE},
-    {BLT_SWITCH_BITMASK, "-delete", "",
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_DELETE},
-    {BLT_SWITCH_BITMASK, "-move", "",
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_MOVE},
-    {BLT_SWITCH_BITMASK, "-sort", "", 
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_SORT},
-    {BLT_SWITCH_BITMASK, "-relabel", "", 
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_RELABEL},
-    {BLT_SWITCH_BITMASK, "-allevents", "",
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_ALL},
-    {BLT_SWITCH_BITMASK, "-whenidle", "",
-	Blt_Offset(NotifySwitches, mask), 0, TREE_NOTIFY_WHENIDLE},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchParseProc ChildSwitch;
-#define INSERT_BEFORE	(ClientData)0
-#define INSERT_AFTER	(ClientData)1
-static Blt_SwitchCustom beforeSwitch = {
-    ChildSwitch, NULL, INSERT_BEFORE,
-};
-static Blt_SwitchCustom afterSwitch = {
-    ChildSwitch, NULL, INSERT_AFTER,
-};
-
-typedef struct {
-    char *label;
-    long position;
-    long inode;
-    char **tags;
-    char **dataPairs;
-    Blt_TreeNode parent;
-} InsertSwitches;
-
-static Blt_SwitchSpec insertSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-after", "position",
-	Blt_Offset(InsertSwitches, position), 0, 0, &afterSwitch},
-    {BLT_SWITCH_LONG_NNEG, "-at", "position",
-	Blt_Offset(InsertSwitches, position), 0},
-    {BLT_SWITCH_CUSTOM, "-before", "position",
-	Blt_Offset(InsertSwitches, position), 0, 0, &beforeSwitch},
-    {BLT_SWITCH_LIST, "-data", "{name value ?name value?...}",
-	Blt_Offset(InsertSwitches, dataPairs), 0},
-    {BLT_SWITCH_STRING, "-label", "string",
-	Blt_Offset(InsertSwitches, label), 0},
-    {BLT_SWITCH_LONG_NNEG, "-node", "number",
-	Blt_Offset(InsertSwitches, inode), 0},
-    {BLT_SWITCH_LIST, "-tags", "{?tagName?...}",
-	Blt_Offset(InsertSwitches, tags), 0},
-    {BLT_SWITCH_END}
-};
-
-#define MATCH_INVERT		(1<<8)
-#define MATCH_LEAFONLY		(1<<4)
-#define MATCH_NOCASE		(1<<5)
-#define MATCH_PATHNAME		(1<<6)
-#define PATTERN_NONE		(0)
-#define PATTERN_EXACT		(1)
-#define PATTERN_GLOB		(2)
-#define PATTERN_REGEXP		(3)
-#define PATTERN_MASK		(0x3)
-
-typedef struct {
-    TreeCmd *cmdPtr;		/* Tree to examine. */
-    Tcl_Obj *listObjPtr;	/* List to accumulate the indices of matching
-				 * nodes. */
-    Tcl_Obj **objv;		/* Command converted into an array of
-				 * Tcl_Obj's. */
-    int objc;			/* Number of Tcl_Objs in above array. */
-
-    unsigned int flags;		/* See flags definitions above. */
-
-    size_t nMatches;		/* Current number of matches. */
-    size_t maxMatches;		/* If > 0, stop after this many matches. */
-
-    unsigned int order;		/* Order of search: Can be either
-				 * TREE_PREORDER, TREE_POSTORDER,
-				 * TREE_INORDER, TREE_BREADTHFIRST. */
-
-    long maxDepth;		/* If >= 0, don't descend more than this many
-				 * levels. */
-
-    Blt_List patternList;	/* List of patterns to compare with labels or
-				 * values.  */
-    char *addTag;		/* If non-NULL, tag added to selected nodes. */
-
-    char **command;		/* Command split into a TCL list. */
-
-    Blt_List keyList;		/* List of key name patterns. */
-    Blt_List tagList;		/* List of tag names. */
-    Blt_HashTable excludeTable;	/* Table of nodes to exclude. */
-} FindSwitches;
-
-static Blt_SwitchParseProc OrderSwitch;
-static Blt_SwitchCustom orderSwitch = {
-    OrderSwitch, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc PatternSwitch;
-static Blt_SwitchFreeProc FreePatterns;
-
-static Blt_SwitchCustom regexpSwitch = {
-    PatternSwitch, FreePatterns, (ClientData)PATTERN_REGEXP,
-};
-static Blt_SwitchCustom globSwitch = {
-    PatternSwitch, FreePatterns, (ClientData)PATTERN_GLOB,
-};
-static Blt_SwitchCustom exactSwitch = {
-    PatternSwitch, FreePatterns, (ClientData)PATTERN_EXACT,
-};
-
-static Blt_SwitchCustom tagSwitch = {
-    PatternSwitch, FreePatterns, (ClientData)PATTERN_EXACT,
-};
-
-static Blt_SwitchParseProc NodesSwitch;
-static Blt_SwitchFreeProc FreeNodes;
-static Blt_SwitchCustom nodesSwitch = {
-    NodesSwitch, FreeNodes, (ClientData)0,
-};
-
-
-static Blt_SwitchSpec findSwitches[] = {
-    {BLT_SWITCH_STRING,    "-addtag",	"tagName",
-	Blt_Offset(FindSwitches, addTag),     0},
-    {BLT_SWITCH_LONG_NNEG, "-count",	"number",
-	Blt_Offset(FindSwitches, maxMatches), 0},
-    {BLT_SWITCH_LONG_NNEG, "-depth",	"number",
-	Blt_Offset(FindSwitches, maxDepth),   0},
-    {BLT_SWITCH_CUSTOM,    "-exact",	"string",
-	Blt_Offset(FindSwitches, patternList),0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM,    "-excludes", "nodes",
-	Blt_Offset(FindSwitches, excludeTable),0, 0, &nodesSwitch},
-    {BLT_SWITCH_LIST,      "-exec",	"command",
-	Blt_Offset(FindSwitches, command),    0},
-    {BLT_SWITCH_CUSTOM,    "-glob",	"pattern",
-	Blt_Offset(FindSwitches, patternList),0, 0, &globSwitch},
-    {BLT_SWITCH_BITMASK,   "-invert",	"",
-	Blt_Offset(FindSwitches, flags),      0, MATCH_INVERT},
-    {BLT_SWITCH_CUSTOM,    "-key",	"string",
-	Blt_Offset(FindSwitches, keyList),    0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM,    "-keyexact", "string",
-	Blt_Offset(FindSwitches, keyList),    0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM,    "-keyglob",	"pattern",
-	Blt_Offset(FindSwitches, keyList),    0, 0, &globSwitch},
-    {BLT_SWITCH_CUSTOM,    "-keyregexp","pattern",
-	Blt_Offset(FindSwitches, keyList),    0, 0, &regexpSwitch},
-    {BLT_SWITCH_BITMASK,   "-leafonly", "",
-	Blt_Offset(FindSwitches, flags),	  0, MATCH_LEAFONLY},
-    {BLT_SWITCH_BITMASK,   "-nocase",	"",
-	Blt_Offset(FindSwitches, flags),	  0, MATCH_NOCASE},
-    {BLT_SWITCH_CUSTOM,	   "-order",	"order",
-	Blt_Offset(FindSwitches, order),	  0, 0, &orderSwitch},
-    {BLT_SWITCH_BITMASK,   "-path",	"",
-	Blt_Offset(FindSwitches, flags),	  0, MATCH_PATHNAME},
-    {BLT_SWITCH_CUSTOM,	   "-regexp",	"pattern",
-	Blt_Offset(FindSwitches, patternList),0, 0, &regexpSwitch},
-    {BLT_SWITCH_CUSTOM,    "-tag",	"{?tag?...}",
-	Blt_Offset(FindSwitches, tagList),    0, 0, &tagSwitch},
-    {BLT_SWITCH_END}
-};
-#undef _off
-
-BLT_EXTERN Blt_SwitchParseProc Blt_TreeNodeSwitchProc;
-static Blt_SwitchCustom nodeSwitch = {
-    Blt_TreeNodeSwitchProc, NULL, (ClientData)0,
-};
-
-typedef struct {
-    TreeCmd *cmdPtr;		/* Tree to move nodes. */
-    Blt_TreeNode node;
-    long movePos;
-} MoveSwitches;
-
-static Blt_SwitchSpec moveSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM,    "-after",  "child",
-	Blt_Offset(MoveSwitches, node),    0, 0, &nodeSwitch},
-    {BLT_SWITCH_LONG_NNEG, "-at",     "position",
-	Blt_Offset(MoveSwitches, movePos), 0},
-    {BLT_SWITCH_CUSTOM,    "-before", "child",
-	Blt_Offset(MoveSwitches, node),    0, 0, &nodeSwitch},
-    {BLT_SWITCH_END}
-};
-#undef _off
-
-typedef struct {
-    Blt_TreeNode srcNode;
-    Blt_Tree srcTree, destTree;
-    TreeCmd *srcPtr, *destPtr;
-    char *label;
-    unsigned int flags;
-} CopySwitches;
-
-#define COPY_RECURSE	(1<<0)
-#define COPY_TAGS	(1<<1)
-#define COPY_OVERWRITE	(1<<2)
-
-static Blt_SwitchSpec copySwitches[] = 
-{
-    {BLT_SWITCH_STRING,  "-label",     "string",
-	Blt_Offset(CopySwitches, label), 0},
-    {BLT_SWITCH_BITMASK, "-recurse",   "",
-	Blt_Offset(CopySwitches, flags), 0, COPY_RECURSE},
-    {BLT_SWITCH_BITMASK, "-tags",      "",
-	Blt_Offset(CopySwitches, flags), 0, COPY_TAGS},
-    {BLT_SWITCH_BITMASK, "-overwrite", "",
-	Blt_Offset(CopySwitches, flags), 0, COPY_OVERWRITE},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    TreeCmd *cmdPtr;		/* Tree to examine. */
-    Tcl_Obj **preObjv;		/* Command converted into an array of
-				 * Tcl_Obj's. */
-    int preObjc;		/* Number of Tcl_Objs in above array. */
-
-    Tcl_Obj **postObjv;		/* Command converted into an array of
-				 * Tcl_Obj's. */
-    int postObjc;		/* Number of Tcl_Objs in above array. */
-
-    unsigned int flags;		/* See flags definitions above. */
-
-    size_t maxDepth;		/* If >= 0, don't descend more than this many
-				 * levels. */
-    /* String options. */
-    Blt_List patternList;	/* List of label or value patterns. */
-    char **preCmd;		/* Pre-command split into a TCL list. */
-    char **postCmd;		/* Post-command split into a TCL list. */
-
-    Blt_List keyList;		/* List of key-name patterns. */
-    Blt_List tagList;
-} ApplySwitches;
-
-static Blt_SwitchSpec applySwitches[] = 
-{
-    {BLT_SWITCH_LIST, "-precommand", "command",
-	Blt_Offset(ApplySwitches, preCmd), 0},
-    {BLT_SWITCH_LIST, "-postcommand", "command",
-	Blt_Offset(ApplySwitches, postCmd), 0},
-    {BLT_SWITCH_LONG_NNEG, "-depth", "number",
-	Blt_Offset(ApplySwitches, maxDepth), 0},
-    {BLT_SWITCH_CUSTOM, "-exact", "string",
-	Blt_Offset(ApplySwitches, patternList), 0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM, "-glob", "pattern",
-	Blt_Offset(ApplySwitches, patternList), 0, 0, &globSwitch},
-    {BLT_SWITCH_BITMASK, "-invert", "",
-	Blt_Offset(ApplySwitches, flags), 0, MATCH_INVERT},
-    {BLT_SWITCH_CUSTOM, "-key", "pattern",
-	Blt_Offset(ApplySwitches, keyList), 0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM, "-keyexact", "string",
-	Blt_Offset(ApplySwitches, keyList), 0, 0, &exactSwitch},
-    {BLT_SWITCH_CUSTOM, "-keyglob", "pattern",
-	Blt_Offset(ApplySwitches, keyList), 0, 0, &globSwitch},
-    {BLT_SWITCH_CUSTOM, "-keyregexp", "pattern",
-	Blt_Offset(ApplySwitches, keyList), 0, 0, &regexpSwitch},
-    {BLT_SWITCH_BITMASK, "-leafonly", "",
-	Blt_Offset(ApplySwitches, flags), 0, MATCH_LEAFONLY},
-    {BLT_SWITCH_BITMASK, "-nocase", "",
-	Blt_Offset(ApplySwitches, flags), 0, MATCH_NOCASE},
-    {BLT_SWITCH_BITMASK, "-path", "", 
-	Blt_Offset(ApplySwitches, flags), 0, MATCH_PATHNAME},
-    {BLT_SWITCH_CUSTOM, "-regexp", "pattern",
-	Blt_Offset(ApplySwitches, patternList), 0, 0, &regexpSwitch},
-    {BLT_SWITCH_CUSTOM, "-tag", "{?tag?...}",
-	Blt_Offset(ApplySwitches, tagList), 0, 0, &tagSwitch},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    unsigned int flags;
-} RestoreSwitches;
-
-
-#define RESTORE_NO_TAGS		(1<<0)
-#define RESTORE_OVERWRITE	(1<<1)
-
-static Blt_SwitchSpec restoreSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-notags", "",
-	Blt_Offset(RestoreSwitches, flags), 0, RESTORE_NO_TAGS},
-    {BLT_SWITCH_BITMASK, "-overwrite", "",
-	Blt_Offset(RestoreSwitches, flags), 0, RESTORE_OVERWRITE},
-    {BLT_SWITCH_END}
-};
-
-static Blt_SwitchParseProc FormatSwitch;
-static Blt_SwitchCustom formatSwitch =
-{
-    FormatSwitch, NULL, (ClientData)0,
-};
-
-typedef struct {
-    int sort;			/* If non-zero, sort the nodes.  */
-    int withParent;		/* If non-zero, add the parent node id to the
-				 * output of the command.*/
-    int withId;			/* If non-zero, echo the node id in the output
-				 * of the command. */
-} PositionSwitches;
-
-#define POSITION_SORTED		(1<<0)
-
-static Blt_SwitchSpec positionSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-sort", "",
-	Blt_Offset(PositionSwitches, sort), 0, POSITION_SORTED},
-    {BLT_SWITCH_CUSTOM, "-format", "format", 
-        0, 0, 0, &formatSwitch},
-    {BLT_SWITCH_END}
-};
-
-#define PARSE_NEWLEAF		(1<<0)
-#define PARSE_AUTOCREATE	(1<<1)
-
-typedef struct {
-    unsigned int flags;		/* Parse flags. */
-    char *separator;		/* Path separator. */
-} ParsePathSwitches;
-
-static Blt_SwitchSpec parsePathSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-autocreate", "",
-	Blt_Offset(ParsePathSwitches, flags), 0, PARSE_AUTOCREATE},
-    {BLT_SWITCH_BITMASK, "-newleaf", "",
-	Blt_Offset(ParsePathSwitches, flags), 0, PARSE_NEWLEAF},
-    {BLT_SWITCH_STRING, "-separator", "char",
-	Blt_Offset(ParsePathSwitches, separator), 0}, 
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    int mask;
-} TraceSwitches;
-
-static Blt_SwitchSpec traceSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-whenidle", "",
-	Blt_Offset(TraceSwitches, mask), 0, TREE_NOTIFY_WHENIDLE},
-    {BLT_SWITCH_END}
-};
-
-static Tcl_InterpDeleteProc TreeInterpDeleteProc;
-static Blt_TreeApplyProc MatchNodeProc, SortApplyProc;
-static Blt_TreeApplyProc ApplyNodeProc;
-static Blt_TreeTraceProc TreeTraceProc;
-static Tcl_CmdDeleteProc TreeInstDeleteProc;
-static Blt_TreeCompareNodesProc CompareNodes;
-
-static Tcl_ObjCmdProc TreeObjCmd;
-static Tcl_ObjCmdProc CompareDictionaryCmd;
-static Tcl_ObjCmdProc ExitCmd;
-static Blt_TreeNotifyEventProc TreeEventProc;
-
-typedef int (TreeCmdProc)(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc,
-	Tcl_Obj *const *objv);
-
-static int GetNodeFromObj(Tcl_Interp *interp, Blt_Tree tree, Tcl_Obj *objPtr, 
-	Blt_TreeNode *nodePtr);
-
-static int
-IsNodeIdOrModifier(const char *string)
-{
-    const char *p;
-
-    if (strstr(string, "->") == NULL) {
-	for (p = string; *p != '\0'; p++) {
-	    if (!isdigit(UCHAR(*p))) {
-		return FALSE;
-	    }
-	}
-    }
-    return TRUE;
-}
-
-static int
-IsNodeId(const char *string)
-{
-    const char *p;
-
-    for (p = string; *p != '\0'; p++) {
-	if (!isdigit(UCHAR(*p))) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildSwitch --
- *
- *	Convert a Tcl_Obj representing the label of a child node into its
- *	integer node id.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ChildSwitch(
-    ClientData clientData,	/* Flag indicating if the node is considered
-				 * before or after the insertion position. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    InsertSwitches *insertPtr = (InsertSwitches *)record;
-    Blt_TreeNode node;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    node = Blt_Tree_FindChild(insertPtr->parent, string);
-    if (node == NULL) {
-	Tcl_AppendResult(interp, "can't find a child named \"", string, 
-		 "\" in \"", Blt_Tree_NodeLabel(insertPtr->parent), "\"",
-		 (char *)NULL);	 
-	return TCL_ERROR;
-    }			  
-    insertPtr->position = Blt_Tree_NodeDegree(node);
-    if (clientData == INSERT_AFTER) {
-	insertPtr->position++;
-    } 
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeNodeSwitchProc --
- *
- *	Convert a Tcl_Obj representing a node number into its integer value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_TreeNodeSwitchProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Blt_TreeNode *nodePtr = (Blt_TreeNode *)(record + offset);
-    Blt_TreeNode node;
-    Blt_Tree tree  = clientData;
-    int result;
-
-    result = GetNodeFromObj(interp, tree, objPtr, &node);
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *nodePtr = node;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * OrderSwitch --
- *
- *	Convert a string represent a node number into its integer
- *	value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OrderSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    int *orderPtr = (int *)(record + offset);
-    char c;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 'b') && (strcmp(string, "breadthfirst") == 0)) {
-	*orderPtr = TREE_BREADTHFIRST;
-    } else if ((c == 'i') && (strcmp(string, "inorder") == 0)) {
-	*orderPtr = TREE_INORDER;
-    } else if ((c == 'p') && (strcmp(string, "preorder") == 0)) {
-	*orderPtr = TREE_PREORDER;
-    } else if ((c == 'p') && (strcmp(string, "postorder") == 0)) {
-	*orderPtr = TREE_POSTORDER;
-    } else {
-	Tcl_AppendResult(interp, "bad order \"", string, 
-		 "\": should be breadthfirst, inorder, preorder, or postorder",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PatternSwitch --
- *
- *	Convert a string represent a node number into its integer
- *	value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PatternSwitch(
-    ClientData clientData,	/* Flag indicating type of pattern. */
-    Tcl_Interp *interp,		/* Not used. */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Blt_List *listPtr = (Blt_List *)(record + offset);
-
-    if (*listPtr == NULL) {
-	*listPtr = Blt_List_Create(BLT_STRING_KEYS);
-    }
-    Blt_List_Append(*listPtr, Tcl_GetString(objPtr), clientData);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePatterns --
- *
- *	Convert a string represent a node number into its integer
- *	value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreePatterns(char *record, int offset, int flags)
-{
-    Blt_List *listPtr = (Blt_List *)(record + offset);
-
-    if (*listPtr != NULL) {
-	Blt_List_Destroy(*listPtr);
-	/* 
-	 * This routine can be called several times for each switch that
-	 * appends to this list. Mark it NULL, so we don't try to destroy the
-	 * list again.
-	 */
-	*listPtr = NULL;
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FormatSwitch --
- *
- *	Convert a string represent a node number into its integer value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FormatSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    PositionSwitches *pdPtr = (PositionSwitches *)record;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "position") == 0) {
-	pdPtr->withParent = FALSE;
-	pdPtr->withId = FALSE;
-    } else if (strcmp(string, "id+position") == 0) {
-	pdPtr->withParent = FALSE;
-	pdPtr->withId = TRUE;
-    } else if (strcmp(string, "parent-at-position") == 0) {
-	pdPtr->withParent = TRUE;
-	pdPtr->withId = FALSE;
-    } else if (strcmp(string, "id+parent-at-position") == 0) {
-	pdPtr->withParent = TRUE;
-	pdPtr->withId  = TRUE;
-    } else {
-	Tcl_AppendResult(interp, "bad format \"", string, 
- "\": should be position, parent-at-position, id+position, or id+parent-at-position",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeNodes --
- *
- *	Convert a string represent a node number into its integer value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreeNodes(char *record, int offset, int flags)
-{
-    Blt_HashTable *tablePtr = (Blt_HashTable *)(record + offset);
-
-    Blt_DeleteHashTable(tablePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NodesSwitch --
- *
- *	Convert a Tcl_Obj representing a node number into its integer
- *	value.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NodesSwitch(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* String representation */
-    char *record,		/* Structure record */
-    int offset,			/* Not used. */
-    int flags)			/* Not used. */
-{
-    FindSwitches *findPtr = (FindSwitches *)record;
-    int objc;
-    Tcl_Obj **objv;
-    int i;
-    
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	int isNew;
-	Blt_TreeNode node;
-
-	if (GetNodeFromObj(interp, findPtr->cmdPtr->tree, objv[i], &node) 
-	    != TCL_OK) {
-	    Blt_DeleteHashTable(&findPtr->excludeTable);
-	    return TCL_ERROR;
-	}
-	Blt_CreateHashEntry(&findPtr->excludeTable, (char *)node, &isNew);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTreeCmdInterpData --
- *
- *---------------------------------------------------------------------------
- */
-static TreeCmdInterpData *
-GetTreeCmdInterpData(Tcl_Interp *interp)
-{
-    TreeCmdInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (TreeCmdInterpData *)
-	Tcl_GetAssocData(interp, TREE_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(TreeCmdInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, TREE_THREAD_KEY, TreeInterpDeleteProc,
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->treeTable, BLT_ONE_WORD_KEYS);
-	Blt_InitHashTable(&dataPtr->fmtTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTreeCmd --
- *
- *	Find the tree command associated with the TCL command "string".
- *	
- *	We have to do multiple lookups to get this right.  
- *
- *	The first step is to generate a canonical command name.  If an
- *	unqualified command name (i.e. no namespace qualifier) is given, we
- *	should search first the current namespace and then the global one.
- *	Most TCL commands (like Tcl_GetCmdInfo) look only at the global
- *	namespace.
- *
- *	Next check if the string is 
- *		a) a TCL command and 
- *		b) really is a command for a tree object.  
- *	Tcl_GetCommandInfo will get us the objClientData field that should be
- *	a cmdPtr.  We can verify that by searching our hashtable of cmdPtr
- *	addresses.
- *
- * Results:
- *	A pointer to the tree command.  If no associated tree command can be
- *	found, NULL is returned.  It's up to the calling routines to generate
- *	an error message.
- *
- *---------------------------------------------------------------------------
- */
-static TreeCmd *
-GetTreeCmd(
-    TreeCmdInterpData *tdPtr, 
-    Tcl_Interp *interp, 
-    const char *string)
-{
-    Blt_ObjectName objName;
-    Tcl_CmdInfo cmdInfo;
-    Blt_HashEntry *hPtr;
-    Tcl_DString dString;
-    char *treeName;
-    int result;
-
-    /* Pull apart the tree name and put it back together in a standard
-     * format. */
-    if (!Blt_ParseObjectName(interp, string, &objName, BLT_NO_ERROR_MSG)) {
-	return NULL;		/* No such parent namespace. */
-    }
-    /* Rebuild the fully qualified name. */
-    treeName = Blt_MakeQualifiedName(&objName, &dString);
-    result = Tcl_GetCommandInfo(interp, treeName, &cmdInfo);
-    Tcl_DStringFree(&dString);
-
-    if (!result) {
-	return NULL;
-    }
-    hPtr = Blt_FindHashEntry(&tdPtr->treeTable, 
-			     (char *)(cmdInfo.objClientData));
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static Blt_TreeNode 
-ParseModifiers(
-    Tcl_Interp *interp,
-    Blt_Tree tree,
-    Blt_TreeNode node,
-    char *modifiers)
-{
-    char *p, *token;
-
-    p = modifiers;
-    do {
-	p += 2;			/* Skip the initial "->" */
-	token = strstr(p, "->");
-	if (token != NULL) {
-	    *token = '\0';
-	}
-	if (IsNodeId(p)) {
-	    long inode;
-	    
-	    if (Tcl_GetLong(interp, p, &inode) != TCL_OK) {
-		node = NULL;
-	    } else {
-		node = Blt_Tree_GetNode(tree, inode);
-	    }
-	} else if ((*p == 'p') && (strcmp(p, "parent") == 0)) {
-	    node = Blt_Tree_ParentNode(node);
-	} else if ((*p == 'f') && (strcmp(p, "firstchild") == 0)) {
-	    node = Blt_Tree_FirstChild(node);
-	} else if ((*p == 'l') && (strcmp(p, "lastchild") == 0)) {
-	    node = Blt_Tree_LastChild(node);
-	} else if ((*p == 'n') && (strcmp(p, "next") == 0)) {
-	    node = Blt_Tree_NextNode(NULL, node);
-	} else if ((*p == 'n') && (strcmp(p, "nextsibling") == 0)) {
-	    node = Blt_Tree_NextSibling(node);
-	} else if ((*p == 'p') && (strcmp(p, "previous") == 0)) {
-	    node = Blt_Tree_PrevNode(NULL, node);
-	} else if ((*p == 'p') && (strcmp(p, "prevsibling") == 0)) {
-	    node = Blt_Tree_PrevSibling(node);
-	} else {
-	    int length;
-
-	    length = strlen(p);
-	    if (length > 0) {
-		char *endp;
-
-		endp = p + length - 1;
-		if ((*p == '"') && (*endp == '"')) {
-		    *endp = '\0';
-		    node = Blt_Tree_FindChild(node, p + 1);
-		    *endp = '"';
-		} else {
-		    node = Blt_Tree_FindChild(node, p);
-		}		
-	    }
-	}
-	if (node == NULL) {
-	    goto error;
-	}
-	if (token != NULL) {
-	    *token = '-';	/* Repair the string */
-	}
-	p = token;
-    } while (token != NULL);
-    return node;
- error:
-    if (token != NULL) {
-	*token = '-';		/* Repair the string */
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetForeignNode --
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetForeignNode(
-    Tcl_Interp *interp,
-    Blt_Tree tree,
-    Tcl_Obj *objPtr,
-    Blt_TreeNode *nodePtr)
-{
-    Blt_TreeNode node;
-    char *string;
-    char *p;
-    char save;
-
-    save = '\0';		/* Suppress compiler warning. */
-    string = Tcl_GetString(objPtr);
-
-    /* Check if modifiers are present. */
-    p = strstr(string, "->");
-    if (p != NULL) {
-	save = *p;
-	*p = '\0';
-    }
-    if (IsNodeId(string)) {
-	long inode;
-
-	if (p != NULL) {
-	    if (TclGetLong(interp, string, &inode) != TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    if (Tcl_GetLongFromObj(interp, objPtr, &inode) != TCL_OK) {
-		goto error;
-	    }
-	}
-	node = Blt_Tree_GetNode(tree, inode);
-	if (p != NULL) {
-	    node = ParseModifiers(interp, tree, node, p);
-	}
-	if (node != NULL) {
-	    *nodePtr = node;
-	    if (p != NULL) {
-		*p = save;
-	    }
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "can't find tag or id \"", string, "\" in ",
-	 Blt_Tree_Name(tree), (char *)NULL);
- error:
-    if (p != NULL) {
-	*p = save;		/* Restore the string */
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetNodeFromObj --
- *
- *---------------------------------------------------------------------------
- */
-static int 
-GetNodeFromObj(
-    Tcl_Interp *interp, 
-    Blt_Tree tree,
-    Tcl_Obj *objPtr, 
-    Blt_TreeNode *nodePtr)
-{
-    Blt_TreeNode node;
-    char *string;
-    char *p;
-    char save;
-
-    node = NULL;		/* Suppress compiler warnings. */
-    save = '\0';
-
-    string = Tcl_GetString(objPtr);
-
-    /* Check if modifiers are present. */
-    p = strstr(string, "->");
-    if (p != NULL) {
-	save = *p;
-	*p = '\0';
-    }
-    if (IsNodeId(string)) {
-	long inode;
-
-	if (p != NULL) {
-	    if (TclGetLong(interp, string, &inode) != TCL_OK) {
-		goto error;
-	    }
-	} else {
-	    if (Tcl_GetLongFromObj(interp, objPtr, &inode) != TCL_OK) {
-		goto error;
-	    }
-	}
-	node = Blt_Tree_GetNode(tree, inode);
-    }  else if (tree != NULL) {
-	if (strcmp(string, "all") == 0) {
-	    if (Blt_Tree_Size(Blt_Tree_RootNode(tree)) > 1) {
-		if (interp != NULL) {
-		    Tcl_AppendResult(interp, "more than one node tagged as \"", 
-				     string, "\"", (char *)NULL);
-		}
-		goto error;
-	    }
-	    node = Blt_Tree_RootNode(tree);
-	} else if (strcmp(string, "root") == 0) {
-	    node = Blt_Tree_RootNode(tree);
-	} else {
-	    Blt_HashTable *tablePtr;
-	    Blt_HashSearch cursor;
-	    Blt_HashEntry *hPtr;
-
-	    node = NULL;
-	    tablePtr = Blt_Tree_TagHashTable(tree, string);
-	    if (tablePtr == NULL) {
-		if (interp != NULL) {
-		    Tcl_AppendResult(interp, "can't find tag or id \"", string, 
-			"\" in ", Blt_Tree_Name(tree), (char *)NULL);
-		}
-		goto error;
-	    } else if (tablePtr->numEntries > 1) {
-		if (interp != NULL) {
-		    Tcl_AppendResult(interp, "more than one node tagged as \"", 
-			 string, "\"", (char *)NULL);
-		}
-		goto error;
-	    } else if (tablePtr->numEntries > 0) {
-		hPtr = Blt_FirstHashEntry(tablePtr, &cursor);
-		node = Blt_GetHashValue(hPtr);
-		if (p != NULL) {
-		    *p = save;
-		}
-	    }
-	}
-    }
-    if (node != NULL) {
-	if (p != NULL) {
-	    node = ParseModifiers(interp, tree, node, p);
-	    if (node == NULL) {
-		if (interp != NULL) {
-		    *p = save;	/* Need entire string. */
-		    Tcl_AppendResult(interp, "can't find tag or id \"", string, 
-			     "\" in ", Blt_Tree_Name(tree), (char *)NULL);
-		}
-		goto error;
-	    }
-	}
-	if (p != NULL) {
-	    *p = save;
-	}
-	*nodePtr = node;
-	return TCL_OK;
-    } 
-    if (interp != NULL) {
-	Tcl_AppendResult(interp, "can't find tag or id \"", string, "\" in ", 
-			 Blt_Tree_Name(tree), (char *)NULL);
-    }
- error:
-    if (p != NULL) {
-	*p = save;
-    }
-    return TCL_ERROR;
-}
-
-typedef struct {
-    int tagType;
-    Blt_TreeNode root;
-    Blt_HashSearch cursor;
-} TagSearch;
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstTaggedNode --
- *
- *	Returns the id of the first node tagged by the given tag in objPtr.
- *	It basically hides much of the cumbersome special case details.  For
- *	example, the special tags "root" and "all" always exist, so they don't
- *	have entries in the tag hashtable.  If it's a hashed tag (not "root"
- *	or "all"), we have to save the place of where we are in the table for
- *	the next call to NextTaggedNode.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FirstTaggedNode(
-    Tcl_Interp *interp,
-    TreeCmd *cmdPtr,
-    Tcl_Obj *objPtr,
-    TagSearch *cursorPtr,
-    Blt_TreeNode *nodePtr)
-{
-    char *string;
-
-    *nodePtr = NULL;
-    string = Tcl_GetString(objPtr);
-    cursorPtr->tagType = TAG_TYPE_NONE;
-    cursorPtr->root = Blt_Tree_RootNode(cmdPtr->tree);
-
-    /* Process strings with modifiers or digits as simple ids, not tags. */
-    if (GetNodeFromObj(NULL, cmdPtr->tree, objPtr, nodePtr) == TCL_OK) {
-	return TCL_OK;
-    }
-
-    if (strcmp(string, "all") == 0) {
-	cursorPtr->tagType = TAG_TYPE_ALL;
-	*nodePtr = cursorPtr->root;
-	return TCL_OK;
-    } else if (strcmp(string, "root") == 0)  {
-	*nodePtr = cursorPtr->root;
-	return TCL_OK;
-    } else {
-	Blt_HashTable *tablePtr;
-	
-	tablePtr = Blt_Tree_TagHashTable(cmdPtr->tree, string);
-	if (tablePtr != NULL) {
-	    Blt_HashEntry *hPtr;
-	    
-	    cursorPtr->tagType = TAG_TYPE_TAG;
-	    hPtr = Blt_FirstHashEntry(tablePtr, &cursorPtr->cursor); 
-	    if (hPtr == NULL) {
-		*nodePtr = NULL;
-		return TCL_OK;
-	    }
-	    *nodePtr = Blt_GetHashValue(hPtr);
-	    return TCL_OK;
-	}
-    }
-    Tcl_AppendResult(interp, "can't find tag or id \"", string, "\" in ", 
-	Blt_Tree_Name(cmdPtr->tree), (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SkipSeparators --
- *
- *	Moves the character pointer past one of more separators.
- *
- * Results:
- *	Returns the updates character pointer.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-SkipSeparators(char *path, const char *separator, int length)
-{
-    while ((*path == *separator) && (strncmp(path, separator, length) == 0)) {
-	path += length;
-    }
-    return path;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SplitPath --
- *
- *	Returns the trailing component of the given path.  Trailing separators
- *	are ignored.
- *
- * Results:
- *	Returns the string of the tail component.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SplitPath(
-    Tcl_Interp *interp, 
-    char *path, 
-    const char *separator, 
-    int *argcPtr, 
-    const char ***argvPtr)
-{
-    int skipLen, pathLen;
-    int depth;
-    size_t listSize;
-    const char **components;
-    char *p;
-    char *sp;
-
-    if ((separator == NULL) || (*separator == '\0')) {
-	if (Tcl_SplitList(interp, path, argcPtr, argvPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	return TCL_OK;
-    }
-    pathLen = strlen(path);
-    skipLen = strlen(separator);
-    path = SkipSeparators(path, separator, skipLen);
-    depth = pathLen / skipLen;
-
-    listSize = (depth + 1) * sizeof(char *);
-    components = Blt_AssertMalloc(listSize + (pathLen + 1));
-    p = (char *)components + listSize;
-    strcpy(p, path);
-
-    depth = 0;
-    for (sp = strstr(p, separator); ((*p != '\0') && (sp != NULL)); 
-	 sp = strstr(p, separator)) {
-	*sp = '\0';
-	components[depth++] = p;
-	p = SkipSeparators(sp + skipLen, separator, skipLen);
-    }
-    if (*p != '\0') {
-	components[depth++] = p;
-    }
-    components[depth] = NULL;
-    *argcPtr = depth;
-    *argvPtr = components;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextTaggedNode --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_TreeNode
-NextTaggedNode(Blt_TreeNode node, TagSearch *cursorPtr)
-{
-    if (cursorPtr->tagType == TAG_TYPE_ALL) {
-	return Blt_Tree_NextNode(NULL, node);
-    }
-    if (cursorPtr->tagType == TAG_TYPE_TAG) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_NextHashEntry(&cursorPtr->cursor);
-	if (hPtr == NULL) {
-	    return NULL;
-	}
-	return Blt_GetHashValue(hPtr);
-    }
-    return NULL;
-}
-
-static int
-AddTag(TreeCmd *cmdPtr, Blt_TreeNode node, const char *tagName)
-{
-    if (strcmp(tagName, "root") == 0) {
-	Tcl_AppendResult(cmdPtr->interp, "can't add reserved tag \"",
-			 tagName, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Blt_Tree_AddTag(cmdPtr->tree, node, tagName);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteNode --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DeleteNode(TreeCmd *cmdPtr, Blt_TreeNode node)
-{
-    Blt_TreeNode root;
-
-    if (!Blt_Tree_TagTableIsShared(cmdPtr->tree)) {
-	Blt_Tree_ClearTags(cmdPtr->tree, node);
-    }
-    root = Blt_Tree_RootNode(cmdPtr->tree);
-    if (node == root) {
-	Blt_TreeNode next;
-
-	/* Don't delete the root node. Simply clean out the tree. */
-	for (node = Blt_Tree_FirstChild(node); node != NULL; node = next) {
-	    next = Blt_Tree_NextSibling(node);
-	    Blt_Tree_DeleteNode(cmdPtr->tree, node);
-	}	    
-    } else if (Blt_Tree_IsAncestor(root, node)) {
-	Blt_Tree_DeleteNode(cmdPtr->tree, node);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrintTraceFlags --
- *
- *---------------------------------------------------------------------------
- */
-static void
-PrintTraceFlags(unsigned int flags, char *string)
-{
-    char *s;
-
-    s = string;
-    if (flags & TREE_TRACE_READ) {
-	*s++ = 'r';
-    } 
-    if (flags & TREE_TRACE_WRITE) {
-	*s++ = 'w';
-    } 
-    if (flags & TREE_TRACE_UNSET) {
-	*s++ = 'u';
-    } 
-    if (flags & TREE_TRACE_CREATE) {
-	*s++ = 'c';
-    } 
-    *s = '\0';
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetTraceFlags --
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetTraceFlags(char *string)
-{
-    char *s;
-    unsigned int flags;
-
-    flags = 0;
-    for (s = string; *s != '\0'; s++) {
-	switch (toupper(*s)) {
-	case 'R':
-	    flags |= TREE_TRACE_READ;
-	    break;
-	case 'W':
-	    flags |= TREE_TRACE_WRITE;
-	    break;
-	case 'U':
-	    flags |= TREE_TRACE_UNSET;
-	    break;
-	case 'C':
-	    flags |= TREE_TRACE_CREATE;
-	    break;
-	default:
-	    return -1;
-	}
-    }
-    return flags;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetValues --
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetValues(TreeCmd *cmdPtr, Blt_TreeNode node, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 0; i < objc; i += 2) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if ((i + 1) == objc) {
-	    Tcl_AppendResult(cmdPtr->interp, "missing value for field \"", 
-		string, "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Blt_Tree_SetValue(cmdPtr->interp, cmdPtr->tree, node, string, 
-			     objv[i + 1]) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnsetValues --
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnsetValues(TreeCmd *cmdPtr, Blt_TreeNode node, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 0) {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-
-	for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &iter); key != NULL;
-	     key = Blt_Tree_NextKey(cmdPtr->tree, &iter)) {
-	    if (Blt_Tree_UnsetValueByKey(cmdPtr->interp, cmdPtr->tree, node, 
-			key) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    } else {
-	int i;
-
-	for (i = 0; i < objc; i ++) {
-	    if (Blt_Tree_UnsetValue(cmdPtr->interp, cmdPtr->tree, node, 
-		Tcl_GetString(objv[i])) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-ComparePatterns(Blt_List patternList, const char *string, int nocase)
-{
-    Blt_ListNode node;
-    int result;
-
-    if (nocase) {
-	string = Blt_AssertStrdup(string);
-	strtolower((char *)string);
-    }
-    result = FALSE;
-    for (node = Blt_List_FirstNode(patternList); node != NULL; 
-	node = Blt_List_NextNode(node)) {
-	size_t type;
-	char *pattern;
-		
-	type = (size_t)Blt_List_GetValue(node);
-	pattern = (char *)Blt_List_GetKey(node);
-	switch (type) {
-	case PATTERN_EXACT:
-	    result = (strcmp(string, pattern) == 0);
-	    break;
-	    
-	case PATTERN_GLOB:
-	    result = Tcl_StringMatch(string, pattern);
-	    break;
-		    
-	case PATTERN_REGEXP:
-	    result = Tcl_RegExpMatch((Tcl_Interp *)NULL, string, pattern); 
-	    break;
-	}
-    }
-    if (nocase) {
-	Blt_Free((char *)string);
-    }
-    return result;
-}
-
-
-static int
-CompareTags(
-    Blt_Tree tree,
-    Blt_TreeNode node,
-    Blt_List tagList)
-{
-    Blt_ListNode tn;
-
-    for (tn = Blt_List_FirstNode(tagList); tn != NULL; 
-	 tn = Blt_List_NextNode(tn)) {
-	char *tag;
-
-	tag = (char *)Blt_List_GetKey(tn);
-			if (Blt_Tree_HasTag(tree, node, tag)) {
-	    return TRUE;
-	}
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MatchNodeProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MatchNodeProc(Blt_TreeNode node, ClientData clientData, int order)
-{
-    FindSwitches *findPtr = clientData;
-    Tcl_DString dString;
-    TreeCmd *cmdPtr = findPtr->cmdPtr;
-    Tcl_Interp *interp = findPtr->cmdPtr->interp;
-    int result, invert;
-
-    if ((findPtr->flags & MATCH_LEAFONLY) && (!Blt_Tree_IsLeaf(node))) {
-	return TCL_OK;
-    }
-    if ((findPtr->maxDepth >= 0) &&
-	(findPtr->maxDepth < Blt_Tree_NodeDepth(node))) {
-	return TCL_OK;
-    }
-    result = TRUE;
-    Tcl_DStringInit(&dString);
-    if (findPtr->keyList != NULL) {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-
-	result = FALSE;		/* It's false if no keys match. */
-	for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &iter); key != NULL;
-	     key = Blt_Tree_NextKey(cmdPtr->tree, &iter)) {
-	    
-	    result = ComparePatterns(findPtr->keyList, key, 0);
-	    if (!result) {
-		continue;
-	    }
-	    if (findPtr->patternList != NULL) {
-		const char *string;
-		Tcl_Obj *objPtr;
-
-		Blt_Tree_GetValue(interp, cmdPtr->tree, node, key, &objPtr);
-		string = (objPtr == NULL) ? "" : Tcl_GetString(objPtr);
-		result = ComparePatterns(findPtr->patternList, string, 
-			 findPtr->flags & MATCH_NOCASE);
-		if (!result) {
-		    continue;
-		}
-	    }
-	    break;
-	}
-    } else if (findPtr->patternList != NULL) {	    
-	const char *string;
-
-	if (findPtr->flags & MATCH_PATHNAME) {
-	    string = Blt_Tree_NodePath(node, &dString);
-	} else {
-	    string = Blt_Tree_NodeLabel(node);
-	}
-	result = ComparePatterns(findPtr->patternList, string, 
-		findPtr->flags & MATCH_NOCASE);		     
-    }
-    if (findPtr->tagList != NULL) {
-	result = CompareTags(cmdPtr->tree, node, findPtr->tagList);
-    }
-    Tcl_DStringFree(&dString);
-    
-    invert = (findPtr->flags & MATCH_INVERT) ? TRUE : FALSE;
-    if ((result != invert) &&
-	/* Check if the matching node is on the exclude list. */	
-	((findPtr->excludeTable.numEntries == 0) || 
-	(Blt_FindHashEntry(&findPtr->excludeTable, (char *)node) == NULL))) {
-	Tcl_Obj *objPtr;
-
-	if (findPtr->addTag != NULL) {
-	    if (AddTag(cmdPtr, node, findPtr->addTag) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	/* Save the node id in our list. */
-	objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-	Tcl_ListObjAppendElement(interp, findPtr->listObjPtr, objPtr);
-	
-	/* Execute a procedure for the matching node. */
-	if (findPtr->objv != NULL) {
-	    findPtr->objv[findPtr->objc - 1] = objPtr;
-	    Tcl_IncrRefCount(objPtr);
-	    result = Tcl_EvalObjv(interp, findPtr->objc, findPtr->objv, 0);
-	    Tcl_DecrRefCount(objPtr);
-	    findPtr->objv[findPtr->objc - 1] = NULL;
-	    if (result != TCL_OK) {
-		return result;
-	    }
-	}
-	findPtr->nMatches++;
-	if ((findPtr->maxMatches > 0) && 
-	    (findPtr->nMatches >= findPtr->maxMatches)) {
-	    return TCL_BREAK;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ApplyNodeProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ApplyNodeProc(Blt_TreeNode node, ClientData clientData, int order)
-{
-    ApplySwitches *applyPtr = clientData;
-    TreeCmd *cmdPtr = applyPtr->cmdPtr;
-    Tcl_Interp *interp = cmdPtr->interp;
-    int invert, result;
-    Tcl_DString dString;
-
-    if ((applyPtr->flags & MATCH_LEAFONLY) && (!Blt_Tree_IsLeaf(node))) {
-	return TCL_OK;
-    }
-    if ((applyPtr->maxDepth >= 0) &&
-	(applyPtr->maxDepth < Blt_Tree_NodeDepth(node))) {
-	return TCL_OK;
-    }
-    Tcl_DStringInit(&dString);
-    result = TRUE;
-    if (applyPtr->keyList != NULL) {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-
-	result = FALSE;		/* It's false if no keys match. */
-	for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &iter);
-	     key != NULL; key = Blt_Tree_NextKey(cmdPtr->tree, &iter)) {
-	    
-	    result = ComparePatterns(applyPtr->keyList, key, 0);
-	    if (!result) {
-		continue;
-	    }
-	    if (applyPtr->patternList != NULL) {
-		const char *string;
-		Tcl_Obj *objPtr;
-
-		Blt_Tree_GetValue(interp, cmdPtr->tree, node, key, &objPtr);
-		string = (objPtr == NULL) ? "" : Tcl_GetString(objPtr);
-		result = ComparePatterns(applyPtr->patternList, string, 
-			 applyPtr->flags & MATCH_NOCASE);
-		if (!result) {
-		    continue;
-		}
-	    }
-	    break;
-	}
-    } else if (applyPtr->patternList != NULL) {	    
-	const char *string;
-
-	if (applyPtr->flags & MATCH_PATHNAME) {
-	    string = Blt_Tree_NodePath(node, &dString);
-	} else {
-	    string = Blt_Tree_NodeLabel(node);
-	}
-	result = ComparePatterns(applyPtr->patternList, string, 
-		applyPtr->flags & MATCH_NOCASE);		     
-    }
-    Tcl_DStringFree(&dString);
-    if (applyPtr->tagList != NULL) {
-	result = CompareTags(cmdPtr->tree, node, applyPtr->tagList);
-    }
-    invert = (applyPtr->flags & MATCH_INVERT) ? 1 : 0;
-    if (result != invert) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-	if (order == TREE_PREORDER) {
-	    applyPtr->preObjv[applyPtr->preObjc - 1] = objPtr;
-	    return 
-		Tcl_EvalObjv(interp, applyPtr->preObjc, applyPtr->preObjv, 0);
-	} else if (order == TREE_POSTORDER) {
-	    applyPtr->postObjv[applyPtr->postObjc - 1] = objPtr;
-	    return 
-		Tcl_EvalObjv(interp, applyPtr->postObjc, applyPtr->postObjv, 0);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClearTracesAndEvents --
- *
- *---------------------------------------------------------------------------
- */
-static void
-ClearTracesAndEvents(TreeCmd *cmdPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    /* 
-     * When the tree token is released, all the traces and notification events
-     * are automatically removed.  But we still need to clean up the
-     * bookkeeping kept for traces. Clear all the tags and trace information.
-     */
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->traceTable, &iter); hPtr != NULL;
-	hPtr = Blt_NextHashEntry(&iter)) {
-	TraceInfo *tracePtr;
-
-	tracePtr = Blt_GetHashValue(hPtr);
-	Blt_Free(tracePtr);
-    }
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter); hPtr != NULL;
-	hPtr = Blt_NextHashEntry(&iter)) {
-	NotifyInfo *notifyPtr;
-	int i;
-
-	notifyPtr = Blt_GetHashValue(hPtr);
-	for (i = 0; i < notifyPtr->objc - 2; i++) {
-	    Tcl_DecrRefCount(notifyPtr->objv[i]);
-	}
-	Blt_Free(notifyPtr->objv);
-	Blt_Free(notifyPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ReleaseTreeObject --
- *
- *---------------------------------------------------------------------------
- */
-static void
-ReleaseTreeObject(TreeCmd *cmdPtr)
-{
-    ClearTracesAndEvents(cmdPtr);
-    Blt_Tree_Close(cmdPtr->tree);
-    cmdPtr->tree = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeTraceProc --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeTraceProc(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    Blt_TreeNode node,		/* Node that has just been updated. */
-    Blt_TreeKey key,		/* Field that's updated. */
-    unsigned int flags)
-{
-    TraceInfo *tracePtr = clientData; 
-    Tcl_DString dsCmd, dsName;
-    char string[5];
-    char *qualName;
-    int result;
-    Blt_ObjectName objName;
-
-    Tcl_DStringInit(&dsCmd);
-    Tcl_DStringAppend(&dsCmd, tracePtr->command, -1);
-    Tcl_DStringInit(&dsName);
-    objName.name = Tcl_GetCommandName(interp, tracePtr->cmdPtr->cmdToken);
-    objName.nsPtr = Blt_GetCommandNamespace(tracePtr->cmdPtr->cmdToken);
-    qualName = Blt_MakeQualifiedName(&objName, &dsName);
-    Tcl_DStringAppendElement(&dsCmd, qualName);
-    Tcl_DStringFree(&dsName);
-    if (node != NULL) {
-	Tcl_DStringAppendElement(&dsCmd, Blt_Tree_NodeIdAscii(node));
-    } else {
-	Tcl_DStringAppendElement(&dsCmd, "");
-    }
-    Tcl_DStringAppendElement(&dsCmd, key);
-    PrintTraceFlags(flags, string);
-    Tcl_DStringAppendElement(&dsCmd, string);
-    result = Tcl_Eval(interp, Tcl_DStringValue(&dsCmd));
-    Tcl_DStringFree(&dsCmd);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeEventProc --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TreeEventProc(ClientData clientData, Blt_TreeNotifyEvent *eventPtr)
-{
-    TreeCmd *cmdPtr = clientData; 
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Blt_TreeNode node;
-    const char *string;
-
-    switch (eventPtr->type) {
-    case TREE_NOTIFY_CREATE:
-	string = "-create";
-	break;
-
-    case TREE_NOTIFY_DELETE:
-	node = Blt_Tree_GetNode(cmdPtr->tree, eventPtr->inode);
-	if (node != NULL) {
-	    Blt_Tree_ClearTags(cmdPtr->tree, node);
-	}
-	string = "-delete";
-	break;
-
-    case TREE_NOTIFY_MOVE:
-	string = "-move";
-	break;
-
-    case TREE_NOTIFY_SORT:
-	string = "-sort";
-	break;
-
-    case TREE_NOTIFY_RELABEL:
-	string = "-relabel";
-	break;
-
-    default:
-	/* empty */
-	string = "???";
-	break;
-    }	
-
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	NotifyInfo *notifyPtr;
-
-	notifyPtr = Blt_GetHashValue(hPtr);
-	if (notifyPtr->mask & eventPtr->type) {
-	    int result;
-	    Tcl_Obj *flagObjPtr, *nodeObjPtr;
-
-	    flagObjPtr = Tcl_NewStringObj(string, -1);
-	    nodeObjPtr = Tcl_NewLongObj(eventPtr->inode);
-	    Tcl_IncrRefCount(flagObjPtr);
-	    Tcl_IncrRefCount(nodeObjPtr);
-	    notifyPtr->objv[notifyPtr->objc - 2] = flagObjPtr;
-	    notifyPtr->objv[notifyPtr->objc - 1] = nodeObjPtr;
-	    result = Tcl_EvalObjv(cmdPtr->interp, notifyPtr->objc, 
-		notifyPtr->objv, 0);
-	    Tcl_DecrRefCount(nodeObjPtr);
-	    Tcl_DecrRefCount(flagObjPtr);
-	    if (result != TCL_OK) {
-		Tcl_BackgroundError(cmdPtr->interp);
-		return TCL_ERROR;
-	    }
-	    Tcl_ResetResult(cmdPtr->interp);
-	}
-    }
-    return TCL_OK;
-}
-
-
-/* Tree command operations. */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ApplyOp --
- *
- * t0 apply root -precommand {command} -postcommand {command}
- *
- *---------------------------------------------------------------------------
- */
-static int
-ApplyOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int result;
-    Blt_TreeNode node;
-    int i;
-    Tcl_Obj **objArr;
-    int count;
-    ApplySwitches switches;
-    int order;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    switches.maxDepth = -1;
-    switches.cmdPtr = cmdPtr;
-    
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, applySwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    order = 0;
-    if (switches.flags & MATCH_NOCASE) {
-	Blt_ListNode ln;
-
-	for (ln = Blt_List_FirstNode(switches.patternList); ln != NULL;
-	     ln = Blt_List_NextNode(ln)) {
-	    strtolower((char *)Blt_List_GetKey(ln));
-	}
-    }
-    if (switches.preCmd != NULL) {
-	char **p;
-
-	count = 0;
-	for (p = switches.preCmd; *p != NULL; p++) {
-	    count++;
-	}
-	objArr = Blt_AssertMalloc((count + 1) * sizeof(Tcl_Obj *));
-	for (i = 0; i < count; i++) {
-	    objArr[i] = Tcl_NewStringObj(switches.preCmd[i], -1);
-	    Tcl_IncrRefCount(objArr[i]);
-	}
-	switches.preObjv = objArr;
-	switches.preObjc = count + 1;
-	order |= TREE_PREORDER;
-    }
-    if (switches.postCmd != NULL) {
-	char **p;
-
-	count = 0;
-	for (p = switches.postCmd; *p != NULL; p++) {
-	    count++;
-	}
-	objArr = Blt_AssertMalloc((count + 1) * sizeof(Tcl_Obj *));
-	for (i = 0; i < count; i++) {
-	    objArr[i] = Tcl_NewStringObj(switches.postCmd[i], -1);
-	    Tcl_IncrRefCount(objArr[i]);
-	}
-	switches.postObjv = objArr;
-	switches.postObjc = count + 1;
-	order |= TREE_POSTORDER;
-    }
-    result = Blt_Tree_ApplyDFS(node, ApplyNodeProc, &switches, order);
-    if (switches.preObjv != NULL) {
-	for (i = 0; i < (switches.preObjc - 1); i++) {
-	    Tcl_DecrRefCount(switches.preObjv[i]);
-	}
-	Blt_Free(switches.preObjv);
-    }
-    if (switches.postObjv != NULL) {
-	for (i = 0; i < (switches.postObjc - 1); i++) {
-	    Tcl_DecrRefCount(switches.postObjv[i]);
-	}
-	Blt_Free(switches.postObjv);
-    }
-    Blt_FreeSwitches(applySwitches, (char *)&switches, 0);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-AncestorOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    long d1, d2, minDepth;
-    long i;
-    Blt_TreeNode ancestor, node1, node2;
-
-    if ((GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node1) != TCL_OK) ||
-	(GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (node1 == node2) {
-	ancestor = node1;
-	goto done;
-    }
-    d1 = Blt_Tree_NodeDepth(node1);
-    d2 = Blt_Tree_NodeDepth(node2);
-    minDepth = MIN(d1, d2);
-    if (minDepth == 0) {	/* One of the nodes is root. */
-	ancestor = Blt_Tree_RootNode(cmdPtr->tree);
-	goto done;
-    }
-    /* 
-     * Traverse back from the deepest node, until the both nodes are at the
-     * same depth.  Check if the ancestor node found is the other node.
-     */
-    for (i = d1; i > minDepth; i--) {
-	node1 = Blt_Tree_ParentNode(node1);
-    }
-    if (node1 == node2) {
-	ancestor = node2;
-	goto done;
-    }
-    for (i = d2; i > minDepth; i--) {
-	node2 = Blt_Tree_ParentNode(node2);
-    }
-    if (node2 == node1) {
-	ancestor = node1;
-	goto done;
-    }
-
-    /* 
-     * First find the mutual ancestor of both nodes.  Look at each preceding
-     * ancestor level-by-level for both nodes.  Eventually we'll find a node
-     * that's the parent of both ancestors.  Then find the first ancestor in
-     * the parent's list of subnodes.
-     */
-    for (i = minDepth; i > 0; i--) {
-	node1 = Blt_Tree_ParentNode(node1);
-	node2 = Blt_Tree_ParentNode(node2);
-	if (node1 == node2) {
-	    ancestor = node2;
-	    goto done;
-	}
-    }
-    Tcl_AppendResult(interp, "unknown ancestor", (char *)NULL);
-    return TCL_ERROR;
- done:
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeId(ancestor));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AttachOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-AttachOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    const char *treeName;
-    AttachSwitches switches;
-
-    treeName = Tcl_GetString(objv[2]);
-    switches.mask = 0;
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, attachSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (Blt_Tree_Attach(interp, cmdPtr->tree, treeName) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (switches.mask & TREE_NEWTAGS) {
-	Blt_Tree_NewTagTable(cmdPtr->tree);
-    }
-    ClearTracesAndEvents(cmdPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ChildrenOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ChildrenOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (node = Blt_Tree_FirstChild(node); node != NULL;
-	     node = Blt_Tree_NextSibling(node)) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else if (objc == 4) {
-	long childPos;
-	long inode;
-	long count;
-	
-	/* Get the node at  */
-	if (Tcl_GetLongFromObj(interp, objv[3], &childPos) != TCL_OK) {
-		return TCL_ERROR;
-	}
-	count = 0;
-	inode = -1;
-	for (node = Blt_Tree_FirstChild(node); node != NULL;
-	     node = Blt_Tree_NextSibling(node)) {
-	    if (count == childPos) {
-		inode = Blt_Tree_NodeId(node);
-		break;
-	    }
-	    count++;
-	}
-	Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-	return TCL_OK;
-    } else if (objc == 5) {
-	long firstPos, lastPos;
-	long count;
-	Tcl_Obj *listObjPtr;
-	char *string;
-
-	firstPos = lastPos = Blt_Tree_NodeDegree(node) - 1;
-	string = Tcl_GetString(objv[3]);
-	if ((strcmp(string, "end") != 0) &&
-	    (Tcl_GetLongFromObj(interp, objv[3], &firstPos) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetString(objv[4]);
-	if ((strcmp(string, "end") != 0) &&
-	    (Tcl_GetLongFromObj(interp, objv[4], &lastPos) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-
-	count = 0;
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (node = Blt_Tree_FirstChild(node); node != NULL;
-	     node = Blt_Tree_NextSibling(node)) {
-	    if ((count >= firstPos) && (count <= lastPos)) {
-		Tcl_Obj *objPtr;
-
-		objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	    count++;
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-
-static Blt_TreeNode 
-CopyNodes(
-    CopySwitches *copyPtr,
-    Blt_TreeNode node,		/* Node to be copied. */
-    Blt_TreeNode parent)	/* New parent for the copied node. */
-{
-    Blt_TreeNode newNode;	/* Newly created copy. */
-    const char *label;
-
-    newNode = NULL;
-    label = Blt_Tree_NodeLabel(node);
-    if (copyPtr->flags & COPY_OVERWRITE) {
-	newNode = Blt_Tree_FindChild(parent, label);
-    }
-    if (newNode == NULL) {	/* Create node in new parent. */
-	newNode = Blt_Tree_CreateNode(copyPtr->destTree, parent, label, -1);
-    }
-    /* Copy the data fields. */
-    {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-
-	for (key = Blt_Tree_FirstKey(copyPtr->srcTree, node, &iter); 
-	     key != NULL; key = Blt_Tree_NextKey(copyPtr->srcTree, &iter)) {
-	    Tcl_Obj *objPtr;
-
-	    if (Blt_Tree_GetValueByKey((Tcl_Interp *)NULL, copyPtr->srcTree, 
-			node, key, &objPtr) == TCL_OK) {
-		Blt_Tree_SetValueByKey((Tcl_Interp *)NULL, copyPtr->destTree, 
-			newNode, key, objPtr);
-	    } 
-	}
-    }
-    /* Add tags to destination tree command. */
-    if ((copyPtr->destPtr != NULL) && (copyPtr->flags & COPY_TAGS)) {
-	Blt_HashSearch iter;
-	Blt_HashEntry *hPtr;
-
-	for (hPtr = Blt_Tree_FirstTag(copyPtr->srcPtr->tree, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_HashEntry *h2Ptr;
-	    Blt_TreeTagEntry *tPtr;
-
-	    tPtr = Blt_GetHashValue(hPtr);
-	    h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
-	    if (h2Ptr != NULL) {
-		if (AddTag(copyPtr->destPtr, newNode, tPtr->tagName)!= TCL_OK) {
-		    return NULL;
-		}
-	    }
-	}
-    }
-    if (copyPtr->flags & COPY_RECURSE) {
-	Blt_TreeNode child;
-
-	for (child = Blt_Tree_FirstChild(node); child != NULL;
-	     child = Blt_Tree_NextSibling(child)) {
-	    if (CopyNodes(copyPtr, child, newNode) == NULL) {
-		return NULL;
-	    }
-	}
-    }
-    return newNode;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CopyOp --
- * 
- *	t0 copy node tree node 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CopyOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmd *srcPtr, *destPtr;
-    Blt_Tree srcTree, destTree;
-    Blt_TreeNode copyNode;
-    Blt_TreeNode parent;
-    CopySwitches switches;
-    int nArgs, nSwitches;
-    Blt_TreeNode root;
-    int i;
-    
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &parent) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    srcTree = destTree = cmdPtr->tree;
-    srcPtr = destPtr = cmdPtr;
-
-    /* Find the first switch. */
-    for(i = 3; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-    }
-    nArgs = i - 2;
-    nSwitches = objc - i;
-    if ((nArgs < 2) || (nArgs > 3)) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-			Tcl_GetString(objv[0]), 
-			 " copy parent ?tree? node ?switches?", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (nArgs == 3) {
-	char *string;
-
-	/* 
-	 * The tree name is either the name of a tree command (first choice)
-	 * or an internal tree object.
-	 */
-	string = Tcl_GetString(objv[3]);
-	srcPtr = GetTreeCmd(cmdPtr->tdPtr, interp, string);
-	if (srcPtr != NULL) {
-	    srcTree = srcPtr->tree;
-	} else {
-	    /* Try to get the tree as an internal tree data object. */
-	    srcTree = Blt_Tree_Open(interp, string, 0);
-	    if (srcTree == NULL) {
-		return TCL_ERROR;
-	    }
-	}
-	objv++;
-    }
-
-    root = NULL;
-    if (srcPtr == NULL) {
-	if (GetForeignNode(interp, srcTree, objv[3], &copyNode) != TCL_OK) {
-	    goto error;
-	}
-    } else {
-	if (GetNodeFromObj(interp, srcPtr->tree, objv[3], &copyNode) != TCL_OK) {
-	    goto error;
-	}
-    }
-    memset((char *)&switches, 0, sizeof(switches));
-    switches.destPtr = destPtr;
-    switches.destTree = destTree;
-    switches.srcPtr = srcPtr;
-    switches.srcTree = srcTree;
-
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, copySwitches, nSwitches, objv + 4, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    if ((switches.flags & COPY_OVERWRITE) && 
-	(Blt_Tree_ParentNode(copyNode) == parent)) {
-	Tcl_AppendResult(interp, "source and destination nodes are the same",
-		 (char *)NULL);	     
-	goto error;
-    }
-    if ((srcTree == destTree) && (switches.flags & COPY_RECURSE) &&
-	(Blt_Tree_IsAncestor(copyNode, parent))) {    
-	Tcl_AppendResult(interp, "can't make cyclic copy: ",
-			 "source node is an ancestor of the destination",
-			 (char *)NULL);	     
-	goto error;
-    }
-
-    /* Copy nodes to destination. */
-    root = CopyNodes(&switches, copyNode, parent);
-    if (root != NULL) {
-	if (switches.label != NULL) {
-	    Blt_Tree_RelabelNode(switches.destTree, root, switches.label);
-	}
-	Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeId(root));
-    }
- error:
-    if (srcPtr == NULL) {
-	Blt_Tree_Close(srcTree);
-    }
-    return (root == NULL) ? TCL_ERROR : TCL_OK;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DepthOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DegreeOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeDegree(node));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes one or more nodes from the tree.  Nodes may be specified by
- *	their id (a number) or a tag.
- *	
- *	Tags have to be handled carefully here.  We can't use the normal
- *	GetTaggedNode, NextTaggedNode, etc. routines because they walk
- *	hashtables while we're deleting nodes.  Also, remember that deleting a
- *	node recursively deletes all its children. If a parent and its
- *	children have the same tag, its possible that the tag list may contain
- *	nodes than no longer exist. So save the node indices in a list and
- *	then delete then in a second pass.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DeleteOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    char *string;
-
-    string = NULL;
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if (IsNodeIdOrModifier(string)) {
-	    Blt_TreeNode node;
-
-	    if (GetNodeFromObj(interp, cmdPtr->tree, objv[i], &node) != TCL_OK){
-		return TCL_ERROR;
-	    }
-	    DeleteNode(cmdPtr, node);
-	} else {
-	    Blt_Chain chain;
-	    Blt_ChainLink link, next;
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch iter;
-	    Blt_HashTable *tablePtr;
-
-	    if ((strcmp(string, "all") == 0) || (strcmp(string, "root") == 0)) {
-		Blt_TreeNode node;
-
-		node = Blt_Tree_RootNode(cmdPtr->tree);
-		DeleteNode(cmdPtr, node);
-		continue;
-	    }
-	    tablePtr = Blt_Tree_TagHashTable(cmdPtr->tree, string);
-	    if (tablePtr == NULL) {
-		goto error;
-	    }
-	    /* 
-	     * Generate a list of tagged nodes. Save the inode instead of the
-	     * node itself since a pruned branch may contain more tagged
-	     * nodes.
-	     */
-	    chain = Blt_Chain_Create();
-	    for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); 
-		hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		Blt_TreeNode node;
-
-		node = Blt_GetHashValue(hPtr);
-		Blt_Chain_Append(chain, (ClientData)Blt_Tree_NodeId(node));
-	    }   
-	    /*  
-	     * Iterate through this list to delete the nodes.  By side-effect
-	     * the tag table is deleted and Uids are released.
-	     */
-	    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-		 link = next) {
-		Blt_TreeNode node;
-		long inode;
-
-		next = Blt_Chain_NextLink(link);
-		inode = (long)Blt_Chain_GetValue(link);
-		node = Blt_Tree_GetNode(cmdPtr->tree, inode);
-		if (node != NULL) {
-		    DeleteNode(cmdPtr, node);
-		}
-	    }
-	    Blt_Chain_Destroy(chain);
-	}
-    }
-    return TCL_OK;
- error:
-    Tcl_AppendResult(interp, "can't find tag or id \"", string, "\" in ", 
-		     Blt_Tree_Name(cmdPtr->tree), (char *)NULL);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DepthOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DepthOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeDepth(node));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DumpOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode top;
-    Tcl_DString dString;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &top) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    Blt_Tree_Dump(cmdPtr->tree, top, &dString);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DumpfileOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DumpfileOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode top;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &top) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_Tree_DumpToFile(interp, cmdPtr->tree, top, 
-	Tcl_GetString(objv[3]));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExistsOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ExistsOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    int bool;
-    
-    bool = TRUE;
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	bool = FALSE;
-    } else if (objc == 4) { 
-	Tcl_Obj *valueObjPtr;
-	char *string;
-	
-	string = Tcl_GetString(objv[3]);
-	if (Blt_Tree_GetValue((Tcl_Interp *)NULL, cmdPtr->tree, node, 
-			     string, &valueObjPtr) != TCL_OK) {
-	    bool = FALSE;
-	}
-    } 
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExportOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ExportOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TreeCmdInterpData *dataPtr;
-
-    dataPtr = GetTreeCmdInterpData(interp);
-    if (objc == 2) {
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->fmtTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    fmtPtr = Blt_GetHashValue(hPtr);
-	    if (fmtPtr->exportProc != NULL) {
-		Tcl_AppendElement(interp, fmtPtr->name);
-	    }
-	}
-	return TCL_OK;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, Tcl_GetString(objv[2]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't export \"", Tcl_GetString(objv[2]),
-			 "\": format not registered", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if (fmtPtr->exportProc == NULL) {
-	Tcl_AppendResult(interp, "no export procedure registered for \"", 
-			 fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return (*fmtPtr->exportProc) (interp, cmdPtr->tree, objc, objv);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    FindSwitches switches;
-    int result;
-    Tcl_Obj **objArr;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    switches.maxDepth = -1;
-    switches.order = TREE_POSTORDER;
-    switches.cmdPtr = cmdPtr;
-    Blt_InitHashTable(&switches.excludeTable, BLT_ONE_WORD_KEYS);
-    objArr = NULL;
-
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, findSwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.maxDepth >= 0) {
-	switches.maxDepth += Blt_Tree_NodeDepth(node);
-    }
-    if (switches.flags & MATCH_NOCASE) {
-	Blt_ListNode lnode;
-
-	for (lnode = Blt_List_FirstNode(switches.patternList); lnode != NULL;
-	     lnode = Blt_List_NextNode(lnode)) {
-	    strtolower((char *)Blt_List_GetKey(lnode));
-	}
-    }
-    if (switches.command != NULL) {
-	int count;
-	char **p;
-	int i;
-
-	count = 0;
-	for (p = switches.command; *p != NULL; p++) {
-	    count++;
-	}
-	/* Leave room for node Id argument to be appended */
-	objArr = Blt_AssertCalloc(count + 2, sizeof(Tcl_Obj *));
-	for (i = 0; i < count; i++) {
-	    objArr[i] = Tcl_NewStringObj(switches.command[i], -1);
-	    Tcl_IncrRefCount(objArr[i]);
-	}
-	switches.objv = objArr;
-	switches.objc = count + 1;
-    }
-    switches.listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    switches.cmdPtr = cmdPtr;
-    if (switches.order == TREE_BREADTHFIRST) {
-	result = Blt_Tree_ApplyBFS(node, MatchNodeProc, &switches);
-    } else {
-	result = Blt_Tree_ApplyDFS(node, MatchNodeProc, &switches, 
-		switches.order);
-    }
-    if (switches.command != NULL) {
-	Tcl_Obj **objPtrPtr;
-
-	for (objPtrPtr = objArr; *objPtrPtr != NULL; objPtrPtr++) {
-	    Tcl_DecrRefCount(*objPtrPtr);
-	}
-	Blt_Free(objArr);
-    }
-    Blt_FreeSwitches(findSwitches, (char *)&switches, 0);
-    if (result == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, switches.listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindChildOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FindChildOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode parent, child;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &parent) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    inode = -1;
-    child = Blt_Tree_FindChild(parent, Tcl_GetString(objv[3]));
-    if (child != NULL) {
-	inode = Blt_Tree_NodeId(child);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FirstChildOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FirstChildOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    inode = -1;
-    node = Blt_Tree_FirstChild(node);
-    if (node != NULL) {
-	inode = Blt_Tree_NodeId(node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(
-    TreeCmd *cmdPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	Blt_TreeKey key;
-	Tcl_Obj *valueObjPtr, *listObjPtr;
-	Blt_TreeKeyIterator iter;
-
-	/* Add the key-value pairs to a new Tcl_Obj */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &iter); key != NULL; 
-	     key = Blt_Tree_NextKey(cmdPtr->tree, &iter)) {
-	    if (Blt_Tree_GetValue((Tcl_Interp *)NULL, cmdPtr->tree, node, key,
-				 &valueObjPtr) == TCL_OK) {
-		Tcl_Obj *objPtr;
-
-		objPtr = Tcl_NewStringObj(key, -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		Tcl_ListObjAppendElement(interp, listObjPtr, valueObjPtr);
-	    }
-	}	    
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    } else {
-	Tcl_Obj *valueObjPtr;
-	const char *string;
-
-	string = Tcl_GetString(objv[3]); 
-	if (Blt_Tree_GetValue((Tcl_Interp *)NULL, cmdPtr->tree, node, string,
-		     &valueObjPtr) != TCL_OK) {
-	    if (objc == 4) {
-		Tcl_DString dString;
-		const char *path;
-
-		Tcl_DStringInit(&dString);
-		path = Blt_Tree_NodePath(node, &dString);		
-		Tcl_AppendResult(interp, "can't find field \"", string, 
-			"\" in \"", path, "\"", (char *)NULL);
-		Tcl_DStringFree(&dString);
-		return TCL_ERROR;
-	    } 
-	    /* Default to given value */
-	    valueObjPtr = objv[4];
-	} 
-	Tcl_SetObjResult(interp, valueObjPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ImportOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ImportOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TreeCmdInterpData *dataPtr;
-
-    dataPtr = GetTreeCmdInterpData(interp);
-    if (objc == 2) {
-	Blt_HashSearch iter;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->fmtTable, &iter); 
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	    fmtPtr = Blt_GetHashValue(hPtr);
-	    if (fmtPtr->importProc != NULL) {
-		Tcl_AppendElement(interp, fmtPtr->name);
-	    }
-	}
-	return TCL_OK;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, Tcl_GetString(objv[2]));
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't import \"", Tcl_GetString(objv[2]),
-			 "\": format not registered", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmtPtr = Blt_GetHashValue(hPtr);
-    if (fmtPtr->importProc == NULL) {
-	Tcl_AppendResult(interp, "no import procedure registered for \"", 
-			 fmtPtr->name, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return (*fmtPtr->importProc) (interp, cmdPtr->tree, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-    char *string;
-
-    inode = -1;
-    string = Tcl_GetString(objv[2]);
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) == TCL_OK) {
-	if (node != NULL) {
-	    inode = Blt_Tree_NodeId(node);
-	}
-    } else {
-	int i;
-	Blt_TreeNode parent;
-	Tcl_Obj **pathv;
-	int pathc;
-
-	if (Tcl_ListObjGetElements(interp, objv[2], &pathc, &pathv) != TCL_OK) {
-	    goto done;		/* Can't split object. */
-	}
-	/* Start from the root and verify each path component. */
-	parent = Blt_Tree_RootNode(cmdPtr->tree);
-	for (i = 0; i < pathc; i++) {
-	    string = Tcl_GetString(pathv[i]);
-	    if (string[0] == '\0') {
-		continue;	/* Skip null separators. */
-	    }
-	    node = Blt_Tree_FindChild(parent, string);
-	    if (node == NULL) {
-		goto done;	/* Can't find component */
-	    }
-	    parent = node;
-	}
-	inode = Blt_Tree_NodeId(node);
-    }
- done:
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-InsertOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode parent, child;
-    InsertSwitches switches;
-
-    child = NULL;
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &parent) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Initialize switch flags */
-    memset(&switches, 0, sizeof(switches));
-    switches.position = -1;	/* Default to append node. */
-    switches.parent = parent;
-    switches.inode = -1;
-
-    if (Blt_ParseSwitches(interp, insertSwitches, objc - 3, objv + 3, &switches,
-	BLT_SWITCH_DEFAULTS) < 0) {
-	goto error;
-    }
-    if (switches.inode > 0) {
-	Blt_TreeNode node;
-
-	node = Blt_Tree_GetNode(cmdPtr->tree, switches.inode);
-	if (node != NULL) {
-	    Tcl_AppendResult(interp, "can't reissue node id \"", 
-		Blt_Ltoa(switches.inode), "\": id already exists.", 
-		(char *)NULL);
-	    goto error;
-	}
-	child = Blt_Tree_CreateNodeWithId(cmdPtr->tree, parent, switches.label, 
-		switches.inode, switches.position);
-    } else {
-	child = Blt_Tree_CreateNode(cmdPtr->tree, parent, switches.label, 
-		switches.position);
-    }
-    if (child == NULL) {
-	Tcl_AppendResult(interp, "can't allocate new node", (char *)NULL);
-	goto error;
-    }
-    if (switches.label == NULL) {
-	char string[200];
-
-	sprintf_s(string, 200, "node%ld", Blt_Tree_NodeId(child));
-	Blt_Tree_RelabelNodeWithoutNotify(child, string);
-    } 
-    if (switches.tags != NULL) {
-	char **p;
-
-	for (p = switches.tags; *p != NULL; p++) {
-	    if (AddTag(cmdPtr, child, *p) != TCL_OK) {
-		goto error;
-	    }
-	}
-    }
-    if (switches.dataPairs != NULL) {
-	char **p;
-
-	for (p = switches.dataPairs; *p != NULL; p++) {
-	    Tcl_Obj *objPtr;
-	    char *key;
-
-	    key = *p;
-	    p++;
-	    if (*p == NULL) {
-		Tcl_AppendResult(interp, "missing value for \"", key, "\"",
-				 (char *)NULL);
-		goto error;
-	    }
-	    objPtr = Tcl_NewStringObj(*p, -1);
-	    if (Blt_Tree_SetValue(interp, cmdPtr->tree, child, key, objPtr) 
-		!= TCL_OK) {
-		Tcl_DecrRefCount(objPtr);
-		goto error;
-	    }
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeId(child));
-    Blt_FreeSwitches(insertSwitches, (char *)&switches, 0);
-    return TCL_OK;
-
- error:
-    if (child != NULL) {
-	Blt_Tree_DeleteNode(cmdPtr->tree, child);
-    }
-    Blt_FreeSwitches(insertSwitches, (char *)&switches, 0);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsAncestorOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsAncestorOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node1, node2;
-    int bool;
-
-    if ((GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node1) != TCL_OK) ||
-	(GetNodeFromObj(interp, cmdPtr->tree, objv[4], &node2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    bool = Blt_Tree_IsAncestor(node1, node2);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsBeforeOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsBeforeOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node1, node2;
-    int bool;
-
-    if ((GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node1) != TCL_OK) ||
-	(GetNodeFromObj(interp, cmdPtr->tree, objv[4], &node2) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    bool = Blt_Tree_IsBefore(node1, node2);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsLeafOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsLeafOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), Blt_Tree_IsLeaf(node));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsRootOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IsRootOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    int bool;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = (node == Blt_Tree_RootNode(cmdPtr->tree));
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IsOp --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec isOps[] =
-{
-    {"ancestor", 1, IsAncestorOp, 5, 5, "node1 node2",},
-    {"before",   1, IsBeforeOp,   5, 5, "node1 node2",},
-    {"leaf",     2, IsLeafOp,     4, 4, "node",},
-    {"root",     1, IsRootOp,     4, 4, "node",},
-};
-
-static int nIsOps = sizeof(isOps) / sizeof(Blt_OpSpec);
-
-static int
-IsOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nIsOps, isOps, BLT_OP_ARG2, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * KeysOp --
- *
- *	Returns the key names of values for a node or array value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-KeysOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_HashTable keyTable;
-    int i;
-
-    Blt_InitHashTableWithPool(&keyTable, BLT_ONE_WORD_KEYS);
-    for (i = 2; i < objc; i++) {
-	Blt_TreeNode node;
-	TagSearch iter;
-	int isNew;
-
-	if (FirstTaggedNode(interp, cmdPtr, objv[i], &iter, &node) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (/* empty */; node != NULL; node = NextTaggedNode(node, &iter)) {
-	    Blt_TreeKey key;
-	    Blt_TreeKeyIterator keyIter;
-
-	    for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &keyIter); 
-		 key != NULL; key = Blt_Tree_NextKey(cmdPtr->tree, &keyIter)) {
-		Blt_CreateHashEntry(&keyTable, key, &isNew);
-	    }
-	}
-    }
-    {
-	Blt_HashSearch tagSearch;
-	Blt_HashEntry *hPtr;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (hPtr = Blt_FirstHashEntry(&keyTable, &tagSearch); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&tagSearch)) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewStringObj(Blt_GetHashKey(&keyTable, hPtr), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_DeleteHashTable(&keyTable);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LabelOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-LabelOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	Blt_Tree_RelabelNode(cmdPtr->tree, node, Tcl_GetString(objv[3]));
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Blt_Tree_NodeLabel(node), -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LastChildOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-LastChildOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    node = Blt_Tree_LastChild(node);
-    inode = (node != NULL) ? Blt_Tree_NodeId(node) : -1 ;
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveOp --
- *
- *	The trick here is to not consider the node to be moved in determining
- *	it's new location.  Ideally, you would temporarily pull it from the
- *	tree and replace it (back in its old location if something went
- *	wrong), but you could still pick the node by its serial number.  So
- *	here we make lots of checks for the node to be moved.
- * 
- *---------------------------------------------------------------------------
- */
-static int
-MoveOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode root, parent, node;
-    Blt_TreeNode before;
-    MoveSwitches switches;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &parent) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    root = Blt_Tree_RootNode(cmdPtr->tree);
-    if (node == root) {
-	Tcl_AppendResult(interp, "can't move root node", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (parent == node) {
-	Tcl_AppendResult(interp, "can't move node to self", (char *)NULL);
-	return TCL_ERROR;
-    }
-    switches.node = NULL;
-    switches.cmdPtr = cmdPtr;
-    switches.movePos = -1;
-    nodeSwitch.clientData = cmdPtr->tree;
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, moveSwitches, objc - 4, objv + 4, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    /* Verify they aren't ancestors. */
-    if (Blt_Tree_IsAncestor(node, parent)) {
-	Tcl_AppendResult(interp, "can't move node: \"", 
-		 Tcl_GetString(objv[2]), (char *)NULL);
-	Tcl_AppendResult(interp, "\" is an ancestor of \"", 
-		 Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    before = NULL;		/* If before is NULL, this appends the node to
-				 * the parent's child list.  */
-
-    if (switches.node != NULL) {	/* -before or -after */
-	if (Blt_Tree_ParentNode(switches.node) != parent) {
-	    Tcl_AppendResult(interp, Tcl_GetString(objv[2]), 
-		     " isn't the parent of ", Blt_Tree_NodeLabel(switches.node),
-		     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Blt_SwitchChanged(moveSwitches, "-before", (char *)NULL)) {
-	    before = switches.node;
-	    if (before == node) {
-		Tcl_AppendResult(interp, "can't move node before itself", 
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	} else {
-	    before = Blt_Tree_NextSibling(switches.node);
-	    if (before == node) {
-		Tcl_AppendResult(interp, "can't move node after itself", 
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	}
-    } else if (switches.movePos >= 0) { /* -at */
-	int count;		/* Tracks the current list index. */
-	Blt_TreeNode child;
-
-	/* 
-	 * If the node is in the list, ignore it when determining the "before"
-	 * node using the -at index.  An index of -1 means to append the node
-	 * to the list.
-	 */
-	count = 0;
-	for(child = Blt_Tree_FirstChild(parent); child != NULL; 
-	    child = Blt_Tree_NextSibling(child)) {
-	    if (child == node) {
-		continue;	/* Ignore the node to be moved. */
-	    }
-	    if (count == switches.movePos) {
-		before = child;
-		break;		
-	    }
-	    count++;	
-	}
-    }
-    if (Blt_Tree_MoveNode(cmdPtr->tree, node, parent, before) != TCL_OK) {
-	Tcl_AppendResult(interp, "can't move node ", Tcl_GetString(objv[2]), 
-		 " to ", Tcl_GetString(objv[3]), (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NextOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    node = Blt_Tree_NextNode(NULL, node);
-    inode = (node != NULL) ? Blt_Tree_NodeId(node) : -1;
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextSiblingOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NextSiblingOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    inode = -1;
-    node = Blt_Tree_NextSibling(node);
-    if (node != NULL) {
-	inode = Blt_Tree_NodeId(node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyCreateOp --
- *
- *	tree0 notify create ?flags? command arg
- *---------------------------------------------------------------------------
- */
-static int
-NotifyCreateOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    NotifyInfo *notifyPtr;
-    NotifySwitches switches;
-    int nArgs;
-    int count;
-    int i;
-
-    count = 0;
-    for (i = 3; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] != '-') {
-	    break;
-	}
-	count++;
-    }
-    switches.mask = 0;
-    /* Process switches  */
-    if (Blt_ParseSwitches(interp, notifySwitches, count, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    notifyPtr = Blt_AssertMalloc(sizeof(NotifyInfo));
-
-    nArgs = objc - i;
-
-    /* Stash away the command in structure and pass that to the notifier. */
-    notifyPtr->objv = Blt_AssertMalloc((nArgs + 2) * sizeof(Tcl_Obj *));
-    for (count = 0; i < objc; i++, count++) {
-	Tcl_IncrRefCount(objv[i]);
-	notifyPtr->objv[count] = objv[i];
-    }
-    notifyPtr->objc = nArgs + 2;
-    notifyPtr->cmdPtr = cmdPtr;
-    if (switches.mask == 0) {
-	switches.mask = TREE_NOTIFY_ALL;
-    }
-    notifyPtr->mask = switches.mask;
-
-    {
-	Blt_HashEntry *hPtr;
-	char idString[200];
-	int isNew;
-
-	sprintf_s(idString, 200, "notify%d", cmdPtr->notifyCounter++);
-	hPtr = Blt_CreateHashEntry(&cmdPtr->notifyTable, idString, &isNew);
-	Blt_SetHashValue(hPtr, notifyPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), idString, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyDeleteOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-NotifyDeleteOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	NotifyInfo *notifyPtr;
-	char *string;
-	int j;
-
-	string = Tcl_GetString(objv[i]);
-	hPtr = Blt_FindHashEntry(&cmdPtr->notifyTable, string);
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown notify name \"", string, "\"", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	notifyPtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashEntry(&cmdPtr->notifyTable, hPtr);
-	for (j = 0; j < (notifyPtr->objc - 2); j++) {
-	    Tcl_DecrRefCount(notifyPtr->objv[j]);
-	}
-	Blt_Free(notifyPtr->objv);
-	Blt_Free(notifyPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyInfoOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NotifyInfoOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    NotifyInfo *notifyPtr;
-    Blt_HashEntry *hPtr;
-    Tcl_DString dString;
-    char *string;
-    int i;
-
-    string = Tcl_GetString(objv[3]);
-    hPtr = Blt_FindHashEntry(&cmdPtr->notifyTable, string);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown notify name \"", string, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    notifyPtr = Blt_GetHashValue(hPtr);
-
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppendElement(&dString, string);	/* Copy notify Id */
-    Tcl_DStringStartSublist(&dString);
-    if (notifyPtr->mask & TREE_NOTIFY_CREATE) {
-	Tcl_DStringAppendElement(&dString, "-create");
-    }
-    if (notifyPtr->mask & TREE_NOTIFY_DELETE) {
-	Tcl_DStringAppendElement(&dString, "-delete");
-    }
-    if (notifyPtr->mask & TREE_NOTIFY_MOVE) {
-	Tcl_DStringAppendElement(&dString, "-move");
-    }
-    if (notifyPtr->mask & TREE_NOTIFY_SORT) {
-	Tcl_DStringAppendElement(&dString, "-sort");
-    }
-    if (notifyPtr->mask & TREE_NOTIFY_RELABEL) {
-	Tcl_DStringAppendElement(&dString, "-relabel");
-    }
-    if (notifyPtr->mask & TREE_NOTIFY_WHENIDLE) {
-	Tcl_DStringAppendElement(&dString, "-whenidle");
-    }
-    Tcl_DStringEndSublist(&dString);
-    Tcl_DStringStartSublist(&dString);
-    for (i = 0; i < (notifyPtr->objc - 2); i++) {
-	Tcl_DStringAppendElement(&dString, Tcl_GetString(notifyPtr->objv[i]));
-    }
-    Tcl_DStringEndSublist(&dString);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyNamesOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NotifyNamesOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->notifyTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *objPtr;
-	char *notifyId;
-
-	notifyId = Blt_GetHashKey(&cmdPtr->notifyTable, hPtr);
-	objPtr = Tcl_NewStringObj(notifyId, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyOp --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec notifyOps[] =
-{
-    {"create", 1, NotifyCreateOp, 4, 0, "?flags? command",},
-    {"delete", 1, NotifyDeleteOp, 3, 0, "notifyId...",},
-    {"info",   1, NotifyInfoOp,   4, 4, "notifyId",},
-    {"names",  1, NotifyNamesOp,  3, 3, "",},
-};
-
-static int nNotifyOps = sizeof(notifyOps) / sizeof(Blt_OpSpec);
-
-static int
-NotifyOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nNotifyOps, notifyOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-
-/*ARGSUSED*/
-static int
-ParentOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    inode = -1;
-    node = Blt_Tree_ParentNode(node);
-    if (node != NULL) {
-	inode = Blt_Tree_NodeId(node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-ParsePathOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode parent, child;
-    ParsePathSwitches switches;
-    const char **argv;
-    int argc;
-    int i;
-    int result;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &parent) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, parsePathSwitches, objc - 4, objv + 4, 
-			  &switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = SplitPath(interp, Tcl_GetString(objv[3]), switches.separator, 
-		       &argc, &argv);
-    Blt_FreeSwitches(parsePathSwitches, (char *)&switches, 0);
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 0; i < (argc - 1); i++) {
-	Blt_TreeNode child;
-
-	child = Blt_Tree_FindChild(parent, argv[i]);
-	if (child == NULL) {
-	    if (switches.flags & PARSE_AUTOCREATE) {
-		child = Blt_Tree_CreateNode(cmdPtr->tree, parent, argv[i], -1);
-	    } else {
-		Tcl_DString dString;
-
-		Tcl_DStringInit(&dString);
-		Tcl_AppendResult(interp, "can't find \"", argv[i], "\" in ", 
-			Blt_Tree_NodePath(parent, &dString), "\"", (char *)NULL);
-		Tcl_DStringFree(&dString);
-		Blt_Free(argv);
-		return TCL_ERROR;
-	    
-	    }
-	}
-	parent = child;
-    }
-    child = Blt_Tree_FindChild(parent, argv[i]);
-    if (child == NULL) {
-	if (switches.flags & (PARSE_AUTOCREATE | PARSE_NEWLEAF)) {
-	    child = Blt_Tree_CreateNode(cmdPtr->tree, parent, argv[i], -1);
-	} else {
-	    Tcl_DString dString;
-	    
-	    Tcl_DStringInit(&dString);
-	    Tcl_AppendResult(interp, "can't find \"", argv[i], "\" in ", 
-		Blt_Tree_NodePath(parent, &dString), "\"", (char *)NULL);
-	    Tcl_DStringFree(&dString);
-	    Blt_Free(argv);
-	    return TCL_ERROR;
-	}
-	parent = child;
-    }
-    Blt_Free(argv);
-    inode = -1;
-    if (parent != NULL) {
-	inode = Blt_Tree_NodeId(parent);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PathOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PathOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    Tcl_DString dString;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    Blt_Tree_NodePath(node, &dString);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-
-static int
-ComparePositions(Blt_TreeNode *n1Ptr, Blt_TreeNode *n2Ptr)
-{
-    if (*n1Ptr == *n2Ptr) {
-        return 0;
-    }
-    if (Blt_Tree_IsBefore(*n1Ptr, *n2Ptr)) {
-        return -1;
-    }
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PositionOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PositionOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PositionSwitches switches;
-    Blt_TreeNode *nodeArr, *nodePtr;
-    Blt_TreeNode lastParent;
-    Tcl_Obj *listObjPtr, *objPtr;
-    int i;
-    long position;
-    Tcl_DString dString;
-    int n;
-
-    memset((char *)&switches, 0, sizeof(switches));
-    /* Process switches  */
-    n = Blt_ParseSwitches(interp, positionSwitches, objc - 2, objv + 2, 
-	&switches, BLT_SWITCH_OBJV_PARTIAL);
-    if (n < 0) {
-	return TCL_ERROR;
-    }
-    objc -= n + 2, objv += n + 2;
-
-    /* Collect the node ids into an array */
-    nodeArr = Blt_AssertMalloc((objc + 1) * sizeof(Blt_TreeNode));
-    for (i = 0; i < objc; i++) {
-	Blt_TreeNode node;
-
-	if (GetNodeFromObj(interp, cmdPtr->tree, objv[i], &node) != TCL_OK) {
-	    Blt_Free(nodeArr);
-	    return TCL_ERROR;
-	}
-	nodeArr[i] = node;
-    }
-    nodeArr[i] = NULL;
-
-    if (switches.sort) {		/* Sort the nodes by depth-first order 
-					 * if requested. */
-	qsort((char *)nodeArr, objc, sizeof(Blt_TreeNode), 
-	      (QSortCompareProc *)ComparePositions);
-    }
-
-    position = 0;		/* Suppress compiler warning. */
-    lastParent = NULL;
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    Tcl_DStringInit(&dString);
-    for (nodePtr = nodeArr; *nodePtr != NULL; nodePtr++) {
-	Blt_TreeNode parent;
-
-	parent = Blt_Tree_ParentNode(*nodePtr);
-	if ((parent != NULL) && (parent == lastParent)) {
-	    Blt_TreeNode node;
-
-	    /* 
-	     * Since we've sorted the nodes already, we can safely assume that
-	     * if two consecutive nodes have the same parent, the first node
-	     * came before the second. If this is the case, use the last node
-	     * as a starting point.
-	     */
-	    
-	    /*
-	     * Note that we start comparing from the last node, not its
-	     * successor.  Some one may give us the same node more than once.
-	     */
-	    node = *(nodePtr - 1); /* Can't get here unless there's more than
-				    * one node. */
-	    for(/*empty*/; node != NULL; node = Blt_Tree_NextSibling(node)) {
-		if (node == *nodePtr) {
-		    break;
-		}
-		position++;
-	    }
-	} else {
-	    /* 
-	     * The fallback is to linearly search through the parent's list of
-	     * children, counting the number of preceding siblings. Except for
-	     * nodes with many siblings (100+), this should be okay.
-	     */
-	    position = Blt_Tree_NodePosition(*nodePtr);
-	}
-	if (switches.sort) {
-	    lastParent = parent; /* Update the last parent. */
-	}	    
-	/* 
-	 * Add an element in the form "parent -at position" to the list that
-	 * we're generating.
-	 */
-	if (switches.withId) {
-	    objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(*nodePtr));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	if (switches.withParent) {
-	    const char *string;
-	    
-	    Tcl_DStringSetLength(&dString, 0); /* Clear the string. */
-	    string = (parent == NULL) ? "" : Blt_Tree_NodeIdAscii(parent);
-	    Tcl_DStringAppendElement(&dString, string);
-	    Tcl_DStringAppendElement(&dString, "-at");
-	    Tcl_DStringAppendElement(&dString, Blt_Ltoa(position));
-	    objPtr = Tcl_NewStringObj(Tcl_DStringValue(&dString), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	} else {
-	    objPtr = Tcl_NewLongObj(position);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    Tcl_DStringFree(&dString);
-    Blt_Free(nodeArr);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PreviousOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PreviousOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    node = Blt_Tree_PrevNode(NULL, node);
-    inode = (node != NULL) ? Blt_Tree_NodeId(node) : -1;
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-PrevSiblingOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    long inode;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    inode = -1;
-    node = Blt_Tree_PrevSibling(node);
-    if (node != NULL) {
-	inode = Blt_Tree_NodeId(node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestoreOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RestoreOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode root;		/* Root node of restored subtree. */
-    RestoreSwitches switches;
-    char *string;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &root) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    memset((char *)&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, restoreSwitches, objc - 4, objv + 4, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetString(objv[3]);
-    if (strcmp(Tcl_GetString(objv[1]), "restore") == 0) {
-	return Blt_Tree_Restore(interp, cmdPtr->tree, root, string, 
-		switches.flags);
-    } else {
-	return Blt_Tree_RestoreFromFile(interp, cmdPtr->tree, root, string,
-		switches.flags);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RootOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RootOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    Blt_TreeNode root;
-
-    root = Blt_Tree_RootNode(cmdPtr->tree);
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_NodeId(root));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    TagSearch iter;
-
-    if (FirstTaggedNode(interp, cmdPtr, objv[2], &iter, &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    while (node != NULL) {
-	if (SetValues(cmdPtr, node, objc - 3, objv + 3) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = NextTaggedNode(node, &iter);
-    } 
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SizeOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SizeOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), Blt_Tree_Size(node));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagAddOp --
- *
- *	.t tag add tagName node1 node2 node3
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagAddOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(string[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", string, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((strcmp(string, "all") == 0) || (strcmp(string, "root") == 0)) {
-	Tcl_AppendResult(cmdPtr->interp, "can't add reserved tag \"",
-			 string, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	/* No nodes specified.  Just add the tag. */
-	if (AddTag(cmdPtr, NULL, string) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	int i;
-
-	for (i = 4; i < objc; i++) {
-	    Blt_TreeNode node;
-	    TagSearch iter;
-	    
-	    if (FirstTaggedNode(interp, cmdPtr, objv[i], &iter, &node) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    for (/* empty */; node != NULL; 
-			    node = NextTaggedNode(node, &iter)) {
-		if (AddTag(cmdPtr, node, string) != TCL_OK) {
-		    return TCL_ERROR;
-		}
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagDeleteOp --
- *
- *	.t add tag node1 node2 node3
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagDeleteOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    char *string;
-    Blt_HashTable *tablePtr;
-
-    string = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(string[0]))) {
-	Tcl_AppendResult(interp, "bad tag \"", string, 
-		 "\": can't start with a digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((strcmp(string, "all") == 0) || (strcmp(string, "root") == 0)) {
-	Tcl_AppendResult(interp, "can't delete reserved tag \"", string, "\"", 
-			 (char *)NULL);
-        return TCL_ERROR;
-    }
-    tablePtr = Blt_Tree_TagHashTable(cmdPtr->tree, string);
-    if (tablePtr != NULL) {
-        int i;
-      
-        for (i = 4; i < objc; i++) {
-	    Blt_TreeNode node;
-	    TagSearch iter;
-
-	    if (FirstTaggedNode(interp, cmdPtr, objv[i], &iter, &node) 
-		!= TCL_OK) {
-	        return TCL_ERROR;
-	    }
-	    for (/* empty */; node != NULL; 
-			    node = NextTaggedNode(node, &iter)) {
-		Blt_HashEntry *hPtr;
-
-	        hPtr = Blt_FindHashEntry(tablePtr, (char *)node);
-	        if (hPtr != NULL) {
-		    Blt_DeleteHashEntry(tablePtr, hPtr);
-	        }
-	   }
-       }
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagDumpOp --
- *
- *	Like "dump", but dumps only the contents of nodes tagged by a given
- *	tag.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagDumpOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode root;
-    Tcl_DString dString;
-    int i;
-
-    Tcl_DStringInit(&dString);
-    root = Blt_Tree_RootNode(cmdPtr->tree);
-    for (i = 3; i < objc; i++) {
-	Blt_TreeNode node;
-	TagSearch iter;
-
-	if (FirstTaggedNode(interp, cmdPtr, objv[i], &iter, &node) 
-	    != TCL_OK) {
-	    Tcl_DStringFree(&dString);
-	    return TCL_ERROR;
-	}
-	for (/* empty */; node != NULL; node = NextTaggedNode(node, &iter)) {
-	    Blt_Tree_DumpNode(cmdPtr->tree, root, node, &dString);
-	}
-    }
-    Tcl_DStringResult(interp, &dString);
-    Tcl_DStringFree(&dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagExistsOp --
- *
- *	Returns the existence of the one or more tags in the given node.  If
- *	the node has any the tags, true is return in the interpreter.
- *
- *	.t tag exists tag1 node
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagExistsOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int bool;
-    const char *tagName;
-
-    tagName = Tcl_GetString(objv[3]);
-    bool = (Blt_Tree_TagHashTable(cmdPtr->tree, tagName) != NULL);
-    if (objc == 5) {
-	Blt_TreeNode node;
-
-	if (GetNodeFromObj(interp, cmdPtr->tree, objv[4], &node) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	bool = Blt_Tree_HasTag(cmdPtr->tree, node, tagName);
-    } 
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagForgetOp --
- *
- *	Removes the given tags from all nodes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagForgetOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(string[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", string, 
-			     "\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Blt_Tree_ForgetTag(cmdPtr->tree, string);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagGetOp --
- *
- *	Returns tag names for a given node.  If one of more pattern arguments
- *	are provided, then only those matching tags are returned.
- *
- *	.t tag get node pat1 pat2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagGetOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node; 
-    Tcl_Obj *listObjPtr;
-   
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 4) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *objPtr;
-
-	/* Dump all tags for this node. */
-	if (node == Blt_Tree_RootNode(cmdPtr->tree)) {
-	    objPtr = Tcl_NewStringObj("root", 4);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	for (hPtr = Blt_Tree_FirstTag(cmdPtr->tree, &iter); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_TreeTagEntry *tPtr;
-	    Blt_HashEntry *h2Ptr;
-
-	    tPtr = Blt_GetHashValue(hPtr);
-	    h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
-	    if (h2Ptr != NULL) {
-		objPtr = Tcl_NewStringObj(tPtr->tagName, -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-	objPtr = Tcl_NewStringObj("all", 3);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    } else {
-	int i;
-	Tcl_Obj *objPtr;
-
-	/* Check if we need to add the special tags "all" and "root" */
-	for (i = 4; i < objc; i++) {
-	    char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    if (Tcl_StringMatch("all", pattern)) {
-		objPtr = Tcl_NewStringObj("all", 3);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		break;
-	    }
-	}
-	if (node == Blt_Tree_RootNode(cmdPtr->tree)) {
-	    for (i = 4; i < objc; i++) {
-		char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch("root", pattern)) {
-		    objPtr = Tcl_NewStringObj("root", 4);
-		    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    break;
-		}
-	    }
-	}
-	/* Now process any standard tags. */
-	for (i = 4; i < objc; i++) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch iter;
-	    char *pattern;
-
-	    pattern = Tcl_GetString(objv[i]);
-	    for (hPtr = Blt_Tree_FirstTag(cmdPtr->tree, &iter); hPtr != NULL;
-		 hPtr = Blt_NextHashEntry(&iter)) {
-		Blt_TreeTagEntry *tPtr;
-
-		tPtr = Blt_GetHashValue(hPtr);
-		if (Tcl_StringMatch(tPtr->tagName, pattern)) {
-		    Blt_HashEntry *h2Ptr;
-
-		    h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
-		    if (h2Ptr != NULL) {
-			objPtr = Tcl_NewStringObj(tPtr->tagName, -1);
-			Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		    }
-		}
-	    }
-	}
-    }    
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNamesOp --
- *
- *	Returns the names of all the tags in the tree.  If one of more node
- *	arguments are provided, then only the tags found in those nodes are
- *	returned.
- *
- *	.t tag names node node node...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNamesOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    objPtr = Tcl_NewStringObj("all", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-
-	objPtr = Tcl_NewStringObj("root", -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	for (hPtr = Blt_Tree_FirstTag(cmdPtr->tree, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_TreeTagEntry *tPtr;
-
-	    tPtr = Blt_GetHashValue(hPtr);
-	    objPtr = Tcl_NewStringObj(tPtr->tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	Blt_HashTable uniqTable;
-	int i;
-
-	Blt_InitHashTable(&uniqTable, BLT_STRING_KEYS);
-	for (i = 3; i < objc; i++) {
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch iter;
-	    Blt_TreeNode node;
-	    int isNew;
-
-	    if (GetNodeFromObj(interp, cmdPtr->tree, objv[i], &node) != TCL_OK) {
-		goto error;
-	    }
-	    if (node == Blt_Tree_RootNode(cmdPtr->tree)) {
-		Blt_CreateHashEntry(&uniqTable, "root", &isNew);
-	    }
-	    for (hPtr = Blt_Tree_FirstTag(cmdPtr->tree, &iter); hPtr != NULL;
-		 hPtr = Blt_NextHashEntry(&iter)) {
-		Blt_TreeTagEntry *tPtr;
-		Blt_HashEntry *h2Ptr;
-
-		tPtr = Blt_GetHashValue(hPtr);
-		h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
-		if (h2Ptr != NULL) {
-		    Blt_CreateHashEntry(&uniqTable, tPtr->tagName, &isNew);
-		}
-	    }
-	}
-	{
-	    Blt_HashEntry *hPtr;
-	    Blt_HashSearch iter;
-
-	    for (hPtr = Blt_FirstHashEntry(&uniqTable, &iter); hPtr != NULL;
-		 hPtr = Blt_NextHashEntry(&iter)) {
-		objPtr = Tcl_NewStringObj(Blt_GetHashKey(&uniqTable, hPtr), -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-	Blt_DeleteHashTable(&uniqTable);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
- error:
-    Tcl_DecrRefCount(listObjPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNodesOp --
- *
- *	Returns the node ids for the given tags.  The ids returned will
- *	represent the union of nodes for all the given tags.
- *
- *	.t nodes tag1 tag2 tag3...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNodesOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_HashTable nodeTable;
-    int i;
-	
-    Blt_InitHashTable(&nodeTable, BLT_ONE_WORD_KEYS);
-    for (i = 3; i < objc; i++) {
-	char *string;
-	int isNew;
-
-	string = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(string[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", string, 
-			     "\": can't start with a digit", (char *)NULL);
-	    goto error;
-	}
-	if (strcmp(string, "all") == 0) {
-	    break;
-	} else if (strcmp(string, "root") == 0) {
-	    Blt_CreateHashEntry(&nodeTable, 
-		(char *)Blt_Tree_RootNode(cmdPtr->tree), &isNew);
-	    continue;
-	} else {
-	    Blt_HashTable *tablePtr;
-	    
-	    tablePtr = Blt_Tree_TagHashTable(cmdPtr->tree, string);
-	    if (tablePtr != NULL) {
-		Blt_HashEntry *hPtr;
-		Blt_HashSearch iter;
-
-		for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); 
-		     hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-		    Blt_TreeNode node;
-
-		    node = Blt_GetHashValue(hPtr);
-		    Blt_CreateHashEntry(&nodeTable, (char *)node, &isNew);
-		}
-		continue;
-	    }
-	}
-	Tcl_AppendResult(interp, "can't find a tag \"", string, "\"",
-			 (char *)NULL);
-	goto error;
-    }
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch iter;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (hPtr = Blt_FirstHashEntry(&nodeTable, &iter); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&iter)) {
-	    Blt_TreeNode node;
-	    Tcl_Obj *objPtr;
-
-	    node = (Blt_TreeNode)Blt_GetHashKey(&nodeTable, hPtr);
-	    objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_DeleteHashTable(&nodeTable);
-    return TCL_OK;
-
- error:
-    Blt_DeleteHashTable(&nodeTable);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagSetOp --
- *
- *	Sets one or more tags for a given node.  Tag names can't start with a
- *	digit (to distinquish them from node ids) and can't be a reserved tag
- *	("root" or "all").
- *
- *	.t tag set node tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagSetOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    int i;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (isdigit(UCHAR(string[0]))) {
-	    Tcl_AppendResult(interp, "bad tag \"", string, 
-			     "\": can't start with a digit", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if ((strcmp(string, "all") == 0) || (strcmp(string, "root") == 0)) {
-	    Tcl_AppendResult(interp, "can't add reserved tag \"", string, "\"",
-		 (char *)NULL);	
-	    return TCL_ERROR;
-	}
-	if (AddTag(cmdPtr, node, string) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }    
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagUnsetOp --
- *
- *	Removes one or more tags from a given node. If a tag doesn't exist or
- *	is a reserved tag ("root" or "all"), nothing will be done and no error
- *	message will be returned.
- *
- *	.t tag unset node tag1 tag2...
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagUnsetOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    int i;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	Blt_Tree_RemoveTag(cmdPtr->tree, node, Tcl_GetString(objv[i]));
-    }    
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagOp --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tagOps[] = {
-    {"add",    1, TagAddOp,    4, 0, "tag ?node...?",},
-    {"delete", 2, TagDeleteOp, 5, 0, "tag node...",},
-    {"dump",   2, TagDumpOp,   4, 0, "tag...",},
-    {"exists", 1, TagExistsOp, 4, 5, "tag ?node?",},
-    {"forget", 1, TagForgetOp, 4, 0, "tag...",},
-    {"get",    1, TagGetOp,    4, 0, "node ?pattern...?",},
-    {"names",  2, TagNamesOp,  3, 0, "?node...?",},
-    {"nodes",  2, TagNodesOp,  4, 0, "tag ?tag...?",},
-    {"set",    1, TagSetOp,    4, 0, "node tag...",},
-    {"unset",  1, TagUnsetOp,  4, 0, "node tag...",},
-};
-
-static int nTagOps = sizeof(tagOps) / sizeof(Blt_OpSpec);
-
-static int
-TagOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTagOps, tagOps, BLT_OP_ARG2, objc, objv, 
-	0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceCreateOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceCreateOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    TraceInfo *tracePtr;
-    char *string, *key, *command;
-    char *tagName;
-    int flags;
-    int length;
-    int n;
-    TraceSwitches switches;
-
-    string = Tcl_GetString(objv[3]);
-    if (isdigit(UCHAR(*string))) {
-	if (GetNodeFromObj(interp, cmdPtr->tree, objv[3], &node) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	tagName = NULL;
-    } else {
-	tagName = Blt_AssertStrdup(string);
-	node = NULL;
-    }
-    key = Tcl_GetString(objv[4]);
-    string = Tcl_GetString(objv[5]);
-    flags = GetTraceFlags(string);
-    if (flags < 0) {
-	Tcl_AppendResult(interp, "unknown flag in \"", string, "\"", 
-		     (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    switches.mask = 0;
-    n = Blt_ParseSwitches(interp, traceSwitches, objc - 5, objv + 5, &switches, 
-			  BLT_SWITCH_DEFAULTS | BLT_SWITCH_OBJV_PARTIAL);
-    if (n < 0) {
-	return TCL_ERROR;
-    }
-    objv += n;
-    objc -= n;
-    command = Tcl_GetStringFromObj(objv[6], &length);
-    /* Stash away the command in structure and pass that to the trace. */
-    tracePtr = Blt_AssertMalloc(length + sizeof(TraceInfo));
-    strcpy(tracePtr->command, command);
-    tracePtr->cmdPtr = cmdPtr;
-    tracePtr->withTag = tagName;
-    tracePtr->node = node;
-    flags |= switches.mask;
-    tracePtr->traceToken = Blt_Tree_CreateTrace(cmdPtr->tree, node, key, tagName,
-	flags, TreeTraceProc, tracePtr);
-
-    {
-	Blt_HashEntry *hPtr;
-	char idString[200];
-	int isNew;
-
-	sprintf_s(idString, 200, "trace%d", cmdPtr->traceCounter++);
-	hPtr = Blt_CreateHashEntry(&cmdPtr->traceTable, idString, &isNew);
-	Blt_SetHashValue(hPtr, tracePtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), idString, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceDeleteOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TraceDeleteOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc,
-	      Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Blt_HashEntry *hPtr;
-	TraceInfo *tracePtr;
-	char *key;
-
-	key = Tcl_GetString(objv[i]);
-	hPtr = Blt_FindHashEntry(&cmdPtr->traceTable, key);
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "unknown trace \"", key, "\"", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	tracePtr = Blt_GetHashValue(hPtr);
-	Blt_DeleteHashEntry(&cmdPtr->traceTable, hPtr); 
-	Blt_Tree_DeleteTrace(tracePtr->traceToken);
-	if (tracePtr->withTag != NULL) {
-	    Blt_Free(tracePtr->withTag);
-	}
-	Blt_Free(tracePtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceNamesOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceNamesOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(&cmdPtr->traceTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	Tcl_AppendElement(interp, Blt_GetHashKey(&cmdPtr->traceTable, hPtr));
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceInfoOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TraceInfoOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TraceInfo *tracePtr;
-    struct _Blt_TreeTrace *tokenPtr;
-    Blt_HashEntry *hPtr;
-    Tcl_DString dString;
-    char string[5];
-    char *key;
-
-    key = Tcl_GetString(objv[3]);
-    hPtr = Blt_FindHashEntry(&cmdPtr->traceTable, key);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "unknown trace \"", key, "\"", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    tracePtr = Blt_GetHashValue(hPtr);
-    if (tracePtr->withTag != NULL) {
-	Tcl_DStringAppendElement(&dString, tracePtr->withTag);
-    } else {
-	Tcl_DStringAppendElement(&dString,Blt_Tree_NodeIdAscii(tracePtr->node));
-    }
-    tokenPtr = (struct _Blt_TreeTrace *)tracePtr->traceToken;
-    Tcl_DStringAppendElement(&dString, tokenPtr->key);
-    PrintTraceFlags(tokenPtr->mask, string);
-    Tcl_DStringAppendElement(&dString, string);
-    Tcl_DStringAppendElement(&dString, tracePtr->command);
-    Tcl_DStringResult(interp, &dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TraceOp --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec traceOps[] =
-{
-    {"create", 1, TraceCreateOp, 7, 7, "node key how ?-whenidle? command",},
-    {"delete", 1, TraceDeleteOp, 3, 0, "id...",},
-    {"info",   1, TraceInfoOp,   4, 4, "id",},
-    {"names",  1, TraceNamesOp,  3, 3, "",},
-};
-
-static int nTraceOps = sizeof(traceOps) / sizeof(Blt_OpSpec);
-
-static int
-TraceOp(TreeCmd *cmdPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTraceOps, traceOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TypeOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    Tcl_Obj *valueObjPtr;
-    char *string;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    string = Tcl_GetString(objv[3]);
-    if (Blt_Tree_GetValue(interp, cmdPtr->tree, node, string, &valueObjPtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (valueObjPtr->typePtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), valueObjPtr->typePtr->name, 
-			 -1);
-    } else {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), "string", 6);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnsetOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-UnsetOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    char *string;
-	
-    string = Tcl_GetString(objv[2]);
-    if (isdigit(UCHAR(*string))) {
-	if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (UnsetValues(cmdPtr, node, objc - 3, objv + 3) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	TagSearch iter;
-
-	if (FirstTaggedNode(interp, cmdPtr, objv[2], &iter, &node) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (/* empty */; node != NULL; node = NextTaggedNode(node, &iter)) {
-	    if (UnsetValues(cmdPtr, node, objc - 3, objv + 3) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-typedef struct {
-    TreeCmd *cmdPtr;
-    unsigned int flags;
-    int type;
-    int mode;
-    char *key;
-    char *command;
-} SortSwitches;
-
-#define SORT_RECURSE		(1<<2)
-#define SORT_DECREASING		(1<<3)
-#define SORT_PATHNAME		(1<<4)
-
-enum SortTypes { SORT_DICTIONARY, SORT_REAL, SORT_INTEGER, SORT_ASCII, 
-	SORT_COMMAND };
-
-enum SortModes { SORT_FLAT, SORT_REORDER };
-
-#define _off(x) Blt_Offset(SortSwitches, x)
-static Blt_SwitchSpec sortSwitches[] = 
-{
-    {BLT_SWITCH_VALUE,   "-ascii",	"",
-	Blt_Offset(SortSwitches, type),    0, SORT_ASCII},
-    {BLT_SWITCH_STRING,  "-command",	"command",
-	Blt_Offset(SortSwitches, command), 0},
-    {BLT_SWITCH_BITMASK, "-decreasing", "",
-	Blt_Offset(SortSwitches, flags),   0, SORT_DECREASING},
-    {BLT_SWITCH_VALUE,   "-dictionary", "",
-	Blt_Offset(SortSwitches, type),    0, SORT_DICTIONARY},
-    {BLT_SWITCH_VALUE,   "-integer",	"",
-	Blt_Offset(SortSwitches, type),    0, SORT_INTEGER},
-    {BLT_SWITCH_STRING,  "-key",	"string",
-	Blt_Offset(SortSwitches, key),     0},
-    {BLT_SWITCH_BITMASK, "-path",	"",
-	Blt_Offset(SortSwitches, flags),   0, SORT_PATHNAME},
-    {BLT_SWITCH_VALUE,   "-real",	"",
-	Blt_Offset(SortSwitches, type),    0, SORT_REAL},
-    {BLT_SWITCH_VALUE,   "-recurse",	"",
-	Blt_Offset(SortSwitches, flags),   0, SORT_RECURSE},
-    {BLT_SWITCH_VALUE,   "-reorder",	"",
-	Blt_Offset(SortSwitches, mode),    0, SORT_REORDER},
-    {BLT_SWITCH_END}
-};
-#undef _off
-
-static SortSwitches sortData;
-
-static int
-CompareNodes(Blt_TreeNode *n1Ptr, Blt_TreeNode *n2Ptr)
-{
-    TreeCmd *cmdPtr = sortData.cmdPtr;
-    const char *s1, *s2;
-    int result;
-    Tcl_DString dString1, dString2;
-
-    s1 = s2 = "";
-    result = 0;
-
-    if (sortData.flags & SORT_PATHNAME) {
-	Tcl_DStringInit(&dString1);
-	Tcl_DStringInit(&dString2);
-    }
-    if (sortData.key != NULL) {
-	Tcl_Obj *valueObjPtr;
-
-	if (Blt_Tree_GetValue((Tcl_Interp *)NULL, cmdPtr->tree, *n1Ptr, 
-	     sortData.key, &valueObjPtr) == TCL_OK) {
-	    s1 = Tcl_GetString(valueObjPtr);
-	}
-	if (Blt_Tree_GetValue((Tcl_Interp *)NULL, cmdPtr->tree, *n2Ptr, 
-	     sortData.key, &valueObjPtr) == TCL_OK) {
-	    s2 = Tcl_GetString(valueObjPtr);
-	}
-    } else if (sortData.flags & SORT_PATHNAME)  {
-	Blt_TreeNode root;
-	
-	root = Blt_Tree_RootNode(cmdPtr->tree);
-	Tcl_DStringInit(&dString1), Tcl_DStringInit(&dString2);
-	s1 = Blt_Tree_NodeRelativePath(root, *n1Ptr, NULL, 0, &dString1);
-	s2 = Blt_Tree_NodeRelativePath(root, *n2Ptr, NULL, 0, &dString2);
-    } else {
-	s1 = Blt_Tree_NodeLabel(*n1Ptr);
-	s2 = Blt_Tree_NodeLabel(*n2Ptr);
-    }
-    switch (sortData.type) {
-    case SORT_ASCII:
-	result = strcmp(s1, s2);
-	break;
-
-    case SORT_COMMAND:
-	if (sortData.command == NULL) {
-	    result = Blt_DictionaryCompare(s1, s2);
-	} else {
-	    Blt_ObjectName objName;
-	    Tcl_DString dsCmd, dsName;
-	    char *qualName;
-
-	    result = 0;	/* Hopefully this will be okay even if the TCL command
-			 * fails to return the correct result. */
-	    Tcl_DStringInit(&dsCmd);
-	    Tcl_DStringAppend(&dsCmd, sortData.command, -1);
-	    Tcl_DStringInit(&dsName);
-	    objName.name = Tcl_GetCommandName(cmdPtr->interp, cmdPtr->cmdToken);
-	    objName.nsPtr = Blt_GetCommandNamespace(cmdPtr->cmdToken);
-	    qualName = Blt_MakeQualifiedName(&objName, &dsName);
-	    Tcl_DStringAppendElement(&dsCmd, qualName);
-	    Tcl_DStringFree(&dsName);
-	    Tcl_DStringAppendElement(&dsCmd, Blt_Tree_NodeIdAscii(*n1Ptr));
-	    Tcl_DStringAppendElement(&dsCmd, Blt_Tree_NodeIdAscii(*n2Ptr));
-	    Tcl_DStringAppendElement(&dsCmd, s1);
-	    Tcl_DStringAppendElement(&dsCmd, s2);
-	    result = Tcl_GlobalEval(cmdPtr->interp, Tcl_DStringValue(&dsCmd));
-	    Tcl_DStringFree(&dsCmd);
-	    
-	    if ((result != TCL_OK) ||
-		(Tcl_GetInt(cmdPtr->interp, 
-		    Tcl_GetStringResult(cmdPtr->interp), &result) != TCL_OK)) {
-		Tcl_BackgroundError(cmdPtr->interp);
-	    }
-	    Tcl_ResetResult(cmdPtr->interp);
-	}
-	break;
-
-    case SORT_DICTIONARY:
-	result = Blt_DictionaryCompare(s1, s2);
-	break;
-
-    case SORT_INTEGER:
-	{
-	    int i1, i2;
-
-	    if (Tcl_GetInt(NULL, s1, &i1) == TCL_OK) {
-		if (Tcl_GetInt(NULL, s2, &i2) == TCL_OK) {
-		    result = i1 - i2;
-		} else {
-		    result = -1;
-		} 
-	    } else if (Tcl_GetInt(NULL, s2, &i2) == TCL_OK) {
-		result = 1;
-	    } else {
-		result = Blt_DictionaryCompare(s1, s2);
-	    }
-	}
-	break;
-
-    case SORT_REAL:
-	{
-	    double r1, r2;
-
-	    if (Tcl_GetDouble(NULL, s1, &r1) == TCL_OK) {
-		if (Tcl_GetDouble(NULL, s2, &r2) == TCL_OK) {
-		    result = (r1 < r2) ? -1 : (r1 > r2) ? 1 : 0;
-		} else {
-		    result = -1;
-		} 
-	    } else if (Tcl_GetDouble(NULL, s2, &r2) == TCL_OK) {
-		result = 1;
-	    } else {
-		result = Blt_DictionaryCompare(s1, s2);
-	    }
-	}
-	break;
-    }
-    if (result == 0) {
-	result = Blt_Tree_NodeId(*n1Ptr) - Blt_Tree_NodeId(*n2Ptr);
-    }
-    if (sortData.flags & SORT_DECREASING) {
-	result = -result;
-    } 
-    if (sortData.flags & SORT_PATHNAME) {
-	Tcl_DStringFree(&dString1);
-	Tcl_DStringFree(&dString2);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortApplyProc --
- *
- *	Sorts the subnodes at a given node.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SortApplyProc(
-    Blt_TreeNode node,
-    ClientData clientData,
-    int order)			/* Not used. */
-{
-    TreeCmd *cmdPtr = clientData;
-
-    if (!Blt_Tree_IsLeaf(node)) {
-	Blt_Tree_SortNode(cmdPtr->tree, node, CompareNodes);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortOp --
- *  
- *---------------------------------------------------------------------------
- */
-static int
-SortOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode top;
-    SortSwitches switches;
-    int result;
-
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &top) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Process switches  */
-    memset(&switches, 0, sizeof(switches));
-    switches.cmdPtr = cmdPtr;
-    if (Blt_ParseSwitches(interp, sortSwitches, objc - 3, objv + 3, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.command != NULL) {
-	switches.type = SORT_COMMAND;
-    }
-    switches.cmdPtr = cmdPtr;
-    sortData = switches;
-    if (switches.mode == SORT_FLAT) {
-	Blt_TreeNode *nodeArr;
-	long nNodes;
-	long i;
-
-	if (switches.flags & SORT_RECURSE) {
-	    nNodes = Blt_Tree_Size(top);
-	} else {
-	    nNodes = Blt_Tree_NodeDegree(top);
-	}
-	nodeArr = Blt_AssertMalloc(nNodes * sizeof(Blt_TreeNode));
-	if (switches.flags & SORT_RECURSE) {
-	    Blt_TreeNode node, *p;
-
-	    p = nodeArr;
-	    for(p = nodeArr, node = top; node != NULL; 
-		node = Blt_Tree_NextNode(top, node)) {
-		*p++ = node;
-	    }
-	} else {
-	    Blt_TreeNode node, *p;
-
-	    for (p = nodeArr, node = Blt_Tree_FirstChild(top); node != NULL;
-		 node = Blt_Tree_NextSibling(node)) {
-		*p++ = node;
-	    }
-	}
-	qsort((char *)nodeArr, nNodes, sizeof(Blt_TreeNode),
-	      (QSortCompareProc *)CompareNodes);
-	{
-	    Tcl_Obj *listObjPtr;
-	    Blt_TreeNode *p;
-
-	    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	    for (p = nodeArr, i = 0; i < nNodes; i++, p++) {
-		Tcl_Obj *objPtr;
-
-		objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(*p));
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	    Tcl_SetObjResult(interp, listObjPtr);
-	}
-	Blt_Free(nodeArr);
-	result = TCL_OK;
-    } else {
-	if (switches.flags & SORT_RECURSE) {
-	    result = Blt_Tree_Apply(top, SortApplyProc, cmdPtr);
-	} else {
-	    result = SortApplyProc(top, cmdPtr, TREE_PREORDER);
-	}
-    }
-    Blt_FreeSwitches(sortSwitches, (char *)&switches, 0);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ValuesOp --
- *
- *	Returns the names of values for a node or array value.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ValuesOp(
-    TreeCmd *cmdPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node;
-    Tcl_Obj *listObjPtr;
-    
-    if (GetNodeFromObj(interp, cmdPtr->tree, objv[2], &node) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 4) { 
-	char *string;
-
-	string = Tcl_GetString(objv[3]);
-	if (Blt_Tree_ArrayNames(interp, cmdPtr->tree, node, string, listObjPtr)
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	Blt_TreeKey key;
-	Blt_TreeKeyIterator iter;
-
-	for (key = Blt_Tree_FirstKey(cmdPtr->tree, node, &iter); key != NULL; 
-	     key = Blt_Tree_NextKey(cmdPtr->tree, &iter)) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(key, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}	    
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeInstObjCmd --
- *
- * 	This procedure is invoked to process commands on behalf of the tree
- * 	object.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec treeOps[] =
-{
-    {"ancestor",    2, AncestorOp,    4, 4, "node1 node2",},
-    {"apply",       1, ApplyOp,       3, 0, "node ?switches?",},
-    {"attach",      2, AttachOp,      3, 0, "tree ?switches?",},
-    {"children",    2, ChildrenOp,    3, 5, "node ?first? ?last?",},
-    {"copy",        2, CopyOp,        4, 0, "parent ?tree? node ?switches?",},
-    {"degree",      2, DegreeOp,      3, 0, "node",},
-    {"delete",      2, DeleteOp,      3, 0, "node ?node...?",},
-    {"depth",       3, DepthOp,       3, 3, "node",},
-    {"dump",        4, DumpOp,        3, 3, "node",},
-    {"dumpfile",    5, DumpfileOp,    4, 4, "node fileName",},
-    {"exists",      3, ExistsOp,      3, 4, "node ?key?",},
-    {"export",      3, ExportOp,      2, 0, "format ?switches?",},
-    {"find",        4, FindOp,        3, 0, "node ?switches?",},
-    {"findchild",   5, FindChildOp,   4, 4, "node label",},
-    {"firstchild",  3, FirstChildOp,  3, 3, "node",},
-    {"get",         1, GetOp,         3, 5, "node ?key? ?defaultValue?",},
-    {"import",      2, ImportOp,      2, 0, "format ?switches?",},
-    {"index",       3, IndexOp,       3, 3, "label|list",},
-    {"insert",      3, InsertOp,      3, 0, "parent ?switches?",},
-    {"is",          2, IsOp,          2, 0, "oper args...",},
-    {"keys",        1, KeysOp,        3, 0, "node ?node...?",},
-    {"label",       3, LabelOp,       3, 4, "node ?newLabel?",},
-    {"lastchild",   3, LastChildOp,   3, 3, "node",},
-    {"move",        1, MoveOp,        4, 0, "node newParent ?switches?",},
-    {"next",        4, NextOp,        3, 3, "node",},
-    {"nextsibling", 5, NextSiblingOp, 3, 3, "node",},
-    {"notify",      2, NotifyOp,      2, 0, "args...",},
-    {"parent",      4, ParentOp,      3, 3, "node",},
-    {"parsepath",   4, ParsePathOp,   4, 5, "node string ?separator?",},
-    {"path",        3, PathOp,        3, 3, "node",},
-    {"position",    2, PositionOp,    3, 0, "?switches? node...",},
-    {"previous",    5, PreviousOp,    3, 3, "node",},
-    {"prevsibling", 5, PrevSiblingOp, 3, 3, "node",},
-    {"restore",     7, RestoreOp,     4, 5, "node data ?switches?",},
-    {"restorefile", 8, RestoreOp,     4, 5, "node fileName ?switches?",},
-    {"root",        2, RootOp,        2, 2, "",},
-    {"set",         3, SetOp,         3, 0, "node ?key value...?",},
-    {"size",        2, SizeOp,        3, 3, "node",},
-    {"sort",        2, SortOp,        3, 0, "node ?flags...?",},
-    {"tag",         2, TagOp,         3, 0, "args...",},
-    {"trace",       2, TraceOp,       2, 0, "args...",},
-    {"type",        2, TypeOp,        4, 4, "node key",},
-    {"unset",       3, UnsetOp,       3, 0, "node ?key...?",},
-    {"values",      1, ValuesOp,      3, 4, "node ?key?",},
-};
-
-static int nTreeOps = sizeof(treeOps) / sizeof(Blt_OpSpec);
-
-static int
-TreeInstObjCmd(
-    ClientData clientData,	/* Information about the widget. */
-    Tcl_Interp *interp,		/* Interpreter to report errors back to. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Vector of argument strings. */
-{
-    TreeCmdProc *proc;
-    TreeCmd *cmdPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTreeOps, treeOps, BLT_OP_ARG1, objc, objv,
-		0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(cmdPtr);
-    result = (*proc) (cmdPtr, interp, objc, objv);
-    Tcl_Release(cmdPtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeInstDeleteProc --
- *
- *	Deletes the command associated with the tree.  This is called only
- *	when the command associated with the tree is destroyed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TreeInstDeleteProc(ClientData clientData)
-{
-    TreeCmd *cmdPtr = clientData;
-
-    ReleaseTreeObject(cmdPtr);
-    if (cmdPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(cmdPtr->tablePtr, cmdPtr->hashPtr);
-    }
-    Blt_DeleteHashTable(&cmdPtr->traceTable);
-    Blt_Free(cmdPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GenerateName --
- *
- *	Generates an unique tree command name.  Tree names are in the form
- *	"treeN", where N is a non-negative integer. Check each name generated
- *	to see if it is already a tree. We want to recycle names if possible.
- *	
- * Results:
- *	Returns the unique name.  The string itself is stored in the dynamic
- *	string passed into the routine.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-GenerateName(
-    Tcl_Interp *interp,
-    const char *prefix, 
-    const char *suffix,
-    Tcl_DString *resultPtr)
-{
-
-    int i;
-    const char *treeName;
-
-    /* 
-     * Parse the command and put back so that it's in a consistent
-     * format.  
-     *
-     *	t1         <current namespace>::t1
-     *	n1::t1     <current namespace>::n1::t1
-     *	::t1	   ::t1
-     *  ::n1::t1   ::n1::t1
-     */
-    treeName = NULL;		/* Suppress compiler warning. */
-    for (i = 0; i < INT_MAX; i++) {
-	Blt_ObjectName objName;
-	Tcl_CmdInfo cmdInfo;
-	Tcl_DString ds;
-	char string[200];
-
-	Tcl_DStringInit(&ds);
-	Tcl_DStringAppend(&ds, prefix, -1);
-	sprintf_s(string, 200, "tree%d", i);
-	Tcl_DStringAppend(&ds, string, -1);
-	Tcl_DStringAppend(&ds, suffix, -1);
-	if (!Blt_ParseObjectName(interp, Tcl_DStringValue(&ds), &objName, 0)) {
-	    Tcl_DStringFree(&ds);
-	    return NULL;
-	}
-	treeName = Blt_MakeQualifiedName(&objName, resultPtr);
-	Tcl_DStringFree(&ds);
-
-	if (Blt_Tree_Exists(interp, treeName)) {
-	    continue;	       /* A tree by this name already exists. */
-	}
-	if (Tcl_GetCommandInfo(interp, (char *)treeName, &cmdInfo)) {
-	    continue;		/* A command by this name already exists. */
-	}
-	break;
-    }
-    return treeName;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeCreateOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeCreateOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdInterpData *tdPtr = clientData;
-    const char *name;
-    Tcl_DString ds;
-    Blt_Tree tree;
-
-    name = NULL;
-    if (objc == 3) {
-	name = Tcl_GetString(objv[2]);
-    }
-    Tcl_DStringInit(&ds);
-    if (name == NULL) {
-	name = GenerateName(interp, "", "", &ds);
-    } else {
-	char *p;
-
-	p = strstr(name, "#auto");
-	if (p != NULL) {
-	    *p = '\0';
-	    name = GenerateName(interp, name, p + 5, &ds);
-	    *p = '#';
-	} else {
-	    Blt_ObjectName objName;
-	    Tcl_CmdInfo cmdInfo;
-
-	    /* 
-	     * Parse the command and put back so that it's in a consistent
-	     * format.
-	     *
-	     *	t1         <current namespace>::t1
-	     *	n1::t1     <current namespace>::n1::t1
-	     *	::t1	   ::t1
-	     *  ::n1::t1   ::n1::t1
-	     */
-	    if (!Blt_ParseObjectName(interp, name, &objName, 0)) {
-		return TCL_ERROR;
-	    }
-	    name = Blt_MakeQualifiedName(&objName, &ds);
-	    /* 
-	     * Check if the command already exists. 
-	     */
-	    if (Tcl_GetCommandInfo(interp, (char *)name, &cmdInfo)) {
-		Tcl_AppendResult(interp, "a command \"", name,
-				 "\" already exists", (char *)NULL);
-		goto error;
-	    }
-	    if (Blt_Tree_Exists(interp, name)) {
-		Tcl_AppendResult(interp, "a tree \"", name, 
-			"\" already exists", (char *)NULL);
-		goto error;
-	    }
-	} 
-    } 
-    if (name == NULL) {
-	goto error;
-    }
-    tree = Blt_Tree_Open(interp, name, TREE_CREATE);
-    if (tree != NULL) {
-	int isNew;
-	TreeCmd *cmdPtr;
-
-	cmdPtr = Blt_AssertCalloc(1, sizeof(TreeCmd));
-	cmdPtr->tdPtr = tdPtr;
-	cmdPtr->tree = tree;
-	cmdPtr->interp = interp;
-	Blt_InitHashTable(&cmdPtr->traceTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&cmdPtr->notifyTable, BLT_STRING_KEYS);
-	cmdPtr->cmdToken = Tcl_CreateObjCommand(interp, (char *)name, 
-		(Tcl_ObjCmdProc *)TreeInstObjCmd, cmdPtr, TreeInstDeleteProc);
-	cmdPtr->tablePtr = &tdPtr->treeTable;
-	cmdPtr->hashPtr = Blt_CreateHashEntry(cmdPtr->tablePtr, (char *)cmdPtr,
-	      &isNew);
-	Blt_SetHashValue(cmdPtr->hashPtr, cmdPtr);
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), (char *)name, -1);
-	Tcl_DStringFree(&ds);
-	Blt_Tree_CreateEventHandler(cmdPtr->tree, TREE_NOTIFY_ALL, 
-	     TreeEventProc, cmdPtr);
-	return TCL_OK;
-    }
- error:
-    Tcl_DStringFree(&ds);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeDestroyOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeDestroyOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdInterpData *tdPtr = clientData;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	TreeCmd *cmdPtr;
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	cmdPtr = GetTreeCmd(tdPtr, interp, string);
-	if (cmdPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find a tree named \"", string,
-			     "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	Tcl_DeleteCommandFromToken(interp, cmdPtr->cmdToken);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeNamesOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeNamesOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TreeCmdInterpData *tdPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    Tcl_Obj *listObjPtr;
-    Tcl_DString ds;
-
-    Tcl_DStringInit(&ds);
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    for (hPtr = Blt_FirstHashEntry(&tdPtr->treeTable, &iter); hPtr != NULL; 
-	hPtr = Blt_NextHashEntry(&iter)) {
-	Blt_ObjectName objName;
-	TreeCmd *cmdPtr;
-	char *qualName;
-	Tcl_Obj *objPtr;
-
-	cmdPtr = Blt_GetHashValue(hPtr);
-	objName.name = Tcl_GetCommandName(interp, cmdPtr->cmdToken);
-	objName.nsPtr = Blt_GetCommandNamespace(cmdPtr->cmdToken);
-	qualName = Blt_MakeQualifiedName(&objName, &ds);
-	if (objc == 3) {
-	    if (!Tcl_StringMatch(qualName, Tcl_GetString(objv[2]))) {
-		continue;
-	    }
-	}
-	objPtr = Tcl_NewStringObj(qualName, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    Tcl_DStringFree(&ds);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-TreeLoadOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    TreeCmdInterpData *dataPtr = clientData;
-    Tcl_DString libName;
-    char *fmt;
-    char *safeProcName, *initProcName;
-    int result;
-    int length;
-
-    fmt = Tcl_GetStringFromObj(objv[2], &length);
-    hPtr = Blt_FindHashEntry(&dataPtr->fmtTable, fmt);
-    if (hPtr != NULL) {
-	return TCL_OK;		/* Converter for format is already loaded. */
-    }
-    Tcl_DStringInit(&libName);
-    {
-	Tcl_DString pathName;
-	const char *path;
-
-	Tcl_DStringInit(&pathName);
-	path = Tcl_TranslateFileName(interp, Tcl_GetString(objv[3]), &pathName);
-	if (path == NULL) {
-	    Tcl_DStringFree(&pathName);
-	    return TCL_ERROR;
-	}
-	Tcl_DStringAppend(&libName, path, -1);
-	Tcl_DStringFree(&pathName);
-    }
-    Tcl_DStringAppend(&libName, "/", -1);
-    Tcl_UtfToTitle(fmt);
-    Tcl_DStringAppend(&libName, "Tree", 4);
-    Tcl_DStringAppend(&libName, fmt, -1);
-    Tcl_DStringAppend(&libName, Blt_Itoa(BLT_MAJOR_VERSION), 1);
-    Tcl_DStringAppend(&libName, Blt_Itoa(BLT_MINOR_VERSION), 1);
-    Tcl_DStringAppend(&libName, BLT_LIB_SUFFIX, -1);
-    Tcl_DStringAppend(&libName, BLT_SO_EXT, -1);
-
-    initProcName = Blt_AssertMalloc(8 + length + 4 + 1);
-    sprintf_s(initProcName, 8 + length + 4 + 1, "Blt_Tree%sInit", fmt);
-    safeProcName = Blt_AssertMalloc(8 + length + 8 + 1);
-    sprintf_s(safeProcName, 8 + length + 9 + 1, "Blt_Tree%sSafeInit", fmt);
-    result = Blt_LoadLibrary(interp, Tcl_DStringValue(&libName), initProcName, 
-	safeProcName); 
-    Tcl_DStringFree(&libName);
-    if (safeProcName != NULL) {
-	Blt_Free(safeProcName);
-    }
-    if (initProcName != NULL) {
-	Blt_Free(initProcName);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeObjCmd --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec treeCmdOps[] =
-{
-    {"create",  1, TreeCreateOp,  2, 3, "?name?",},
-    {"destroy", 1, TreeDestroyOp, 3, 0, "name...",},
-    {"load",    1, TreeLoadOp,    4, 4, "name libpath",},
-    {"names",   1, TreeNamesOp,   2, 3, "?pattern?...",},
-};
-
-static int nCmdOps = sizeof(treeCmdOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-TreeObjCmd(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-
-    proc = Blt_GetOpFromObj(interp, nCmdOps, treeCmdOps, BLT_OP_ARG1, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "tree" command
- *	is deleted.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Removes the hash table managing all tree names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-TreeInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    TreeCmdInterpData *tdPtr = clientData;
-
-    /* 
-     * All tree instances should already have been destroyed when their
-     * respective TCL commands were deleted. 
-     */
-    Blt_DeleteHashTable(&tdPtr->treeTable);
-    Tcl_DeleteAssocData(interp, TREE_THREAD_KEY);
-    Blt_Free(tdPtr);
-}
-
-/*ARGSUSED*/
-static int
-CompareDictionaryCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    int result;
-    const char *s1, *s2;
-
-    s1 = Tcl_GetString(objv[1]);
-    s2 = Tcl_GetString(objv[2]);
-    result = Blt_DictionaryCompare(s1, s2);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), result);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-ExitCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    int code;
-
-    if (Tcl_GetIntFromObj(interp, objv[1], &code) != TCL_OK) {
-	return TCL_ERROR;
-    }
-#ifdef TCL_THREADS
-    Tcl_Exit(code);
-#else 
-    exit(code);
-#endif
-    /*NOTREACHED*/
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeCmdInitProc --
- *
- *	This procedure is invoked to initialize the "tree" command.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new command and adds a new entry into a global Tcl
- *	associative array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TreeCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { 
-	"tree", TreeObjCmd, 
-    };
-    static Blt_InitCmdSpec utilSpecs[] = { 
-	{ "compare", CompareDictionaryCmd, },
-	{ "_exit", ExitCmd, }
-    };
-    if (Blt_InitCmds(interp, "::blt::util", utilSpecs, 2) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    cmdSpec.clientData = GetTreeCmdInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-/* Dump tree to dbm */
-/* Convert node data to datablock */
-
-
-int
-Blt_Tree_RegisterFormat(
-    Tcl_Interp *interp, 			  
-    const char *fmt,
-    Blt_TreeImportProc *importProc,
-    Blt_TreeExportProc *exportProc)
-{
-    Blt_HashEntry *hPtr;
-    DataFormat *fmtPtr;
-    TreeCmdInterpData *dataPtr;
-    int isNew;
-
-    dataPtr = GetTreeCmdInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->fmtTable, fmt, &isNew);
-    if (isNew) {
-	fmtPtr = Blt_AssertMalloc(sizeof(DataFormat));
-	fmtPtr->name = Blt_AssertStrdup(fmt);
-	Blt_SetHashValue(hPtr, fmtPtr);
-    } else {
-	fmtPtr = Blt_GetHashValue(hPtr);
-    }
-    fmtPtr->isLoaded = TRUE;
-    fmtPtr->importProc = importProc;
-    fmtPtr->exportProc = exportProc;
-    return TCL_OK;
-}
-
-#endif /* NO_TREE */
-
diff --git a/blt3.0/src/bltTreeView.c b/blt3.0/src/bltTreeView.c
deleted file mode 100644
index e825ed6..0000000
--- a/blt3.0/src/bltTreeView.c
+++ /dev/null
@@ -1,5434 +0,0 @@
-
-/*
- * bltTreeView.c --
- *
- * This module implements an hierarchy widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *
- * BUGS:
- *   1.  "open" operation should change scroll offset so that as many
- *	 new entries (up to half a screen) can be seen.
- *   2.  "open" needs to adjust the scrolloffset so that the same entry
- *	 is seen at the same place.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_TREEVIEW
-
-#include "bltTreeView.h"
-
-#define BUTTON_PAD		2
-#define BUTTON_IPAD		1
-#define BUTTON_SIZE		7
-#define COLUMN_PAD		2
-#define FOCUS_WIDTH		1
-#define ICON_PADX		2
-#define ICON_PADY		1
-#define INSET_PAD		0
-#define LABEL_PADX		0
-#define LABEL_PADY		0
-
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-#define DEF_ICON_WIDTH		16
-#define DEF_ICON_HEIGHT		16
-
-typedef ClientData (TagProc)(TreeView *viewPtr, const char *string);
-
-static Blt_TreeApplyProc DeleteApplyProc;
-static Blt_TreeApplyProc CreateApplyProc;
-
-BLT_EXTERN Blt_CustomOption bltTreeViewDataOption;
-
-static Blt_OptionParseProc ObjToTree;
-static Blt_OptionPrintProc TreeToObj;
-static Blt_OptionFreeProc FreeTree;
-Blt_CustomOption bltTreeViewTreeOption =
-{
-    ObjToTree, TreeToObj, FreeTree, NULL,
-};
-
-static Blt_OptionParseProc ObjToIcons;
-static Blt_OptionPrintProc IconsToObj;
-static Blt_OptionFreeProc FreeIcons;
-
-Blt_CustomOption bltTreeViewIconsOption =
-{
-    ObjToIcons, IconsToObj, FreeIcons, NULL,
-};
-
-static Blt_OptionParseProc ObjToButton;
-static Blt_OptionPrintProc ButtonToObj;
-static Blt_CustomOption buttonOption = {
-    ObjToButton, ButtonToObj, NULL, NULL,
-};
-
-static Blt_OptionParseProc ObjToUid;
-static Blt_OptionPrintProc UidToObj;
-static Blt_OptionFreeProc FreeUid;
-Blt_CustomOption bltTreeViewUidOption = {
-    ObjToUid, UidToObj, FreeUid, NULL,
-};
-
-static Blt_OptionParseProc ObjToScrollmode;
-static Blt_OptionPrintProc ScrollmodeToObj;
-static Blt_CustomOption scrollmodeOption = {
-    ObjToScrollmode, ScrollmodeToObj, NULL, NULL,
-};
-
-static Blt_OptionParseProc ObjToSelectmode;
-static Blt_OptionPrintProc SelectmodeToObj;
-static Blt_CustomOption selectmodeOption = {
-    ObjToSelectmode, SelectmodeToObj, NULL, NULL,
-};
-
-static Blt_OptionParseProc ObjToSeparator;
-static Blt_OptionPrintProc SeparatorToObj;
-static Blt_OptionFreeProc FreeSeparator;
-static Blt_CustomOption separatorOption = {
-    ObjToSeparator, SeparatorToObj, FreeSeparator, NULL,
-};
-
-static Blt_OptionParseProc ObjToLabel;
-static Blt_OptionPrintProc LabelToObj;
-static Blt_OptionFreeProc FreeLabel;
-static Blt_CustomOption labelOption = {
-    ObjToLabel, LabelToObj, FreeLabel, NULL,
-};
-
-static Blt_OptionParseProc ObjToStyles;
-static Blt_OptionPrintProc StylesToObj;
-static Blt_CustomOption stylesOption = {
-    ObjToStyles, StylesToObj, NULL, NULL,
-};
-
-#define DEF_BUTTON_ACTIVE_BACKGROUND	RGB_WHITE
-#define DEF_BUTTON_ACTIVE_BG_MONO	STD_ACTIVE_BG_MONO
-#define DEF_BUTTON_ACTIVE_FOREGROUND	STD_ACTIVE_FOREGROUND
-#define DEF_BUTTON_ACTIVE_FG_MONO	STD_ACTIVE_FG_MONO
-#define DEF_BUTTON_BORDERWIDTH		"1"
-#define DEF_BUTTON_CLOSE_RELIEF		"solid"
-#define DEF_BUTTON_OPEN_RELIEF		"solid"
-#define DEF_BUTTON_NORMAL_BACKGROUND	RGB_WHITE
-#define DEF_BUTTON_NORMAL_BG_MONO	STD_NORMAL_BG_MONO
-#define DEF_BUTTON_NORMAL_FOREGROUND	STD_NORMAL_FOREGROUND
-#define DEF_BUTTON_NORMAL_FG_MONO	STD_NORMAL_FG_MONO
-#define DEF_BUTTON_SIZE			"7"
-
-/* RGB_LIGHTBLUE1 */
-
-#define DEF_ACTIVE_FOREGROUND	RBG_BLACK
-#define DEF_ACTIVE_RELIEF	"flat"
-#define DEF_ALLOW_DUPLICATES	"yes"
-#define DEF_BACKGROUND		RGB_WHITE
-#define DEF_ALT_BACKGROUND	RGB_GREY95
-#define DEF_BORDERWIDTH		STD_BORDERWIDTH
-#define DEF_BUTTON		"auto"
-#define DEF_DASHES		"dot"
-#define DEF_EXPORT_SELECTION	"no"
-#define DEF_FOREGROUND		STD_NORMAL_FOREGROUND
-#define DEF_FG_MONO		STD_NORMAL_FG_MONO
-#define DEF_FLAT		"no"
-#define DEF_FOCUS_DASHES	"dot"
-#define DEF_FOCUS_EDIT		"no"
-#define DEF_FOCUS_FOREGROUND	STD_ACTIVE_FOREGROUND
-#define DEF_FOCUS_FG_MONO	STD_ACTIVE_FG_MONO
-#define DEF_FONT		STD_FONT_SMALL
-#define DEF_HEIGHT		"400"
-#define DEF_HIDE_LEAVES		"no"
-#define DEF_HIDE_ROOT		"yes"
-#define DEF_FOCUS_HIGHLIGHT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_FOCUS_HIGHLIGHT_COLOR	RGB_BLACK
-#define DEF_FOCUS_HIGHLIGHT_WIDTH	"2"
-#define DEF_ICONS "::blt::TreeView::openIcon ::blt::TreeView::closeIcon"
-#define DEF_LINECOLOR		RGB_GREY30
-#define DEF_LINECOLOR_MONO	STD_NORMAL_FG_MONO
-#define DEF_LINESPACING		"0"
-#define DEF_LINEWIDTH		"1"
-#define DEF_MAKE_PATH		"no"
-#define DEF_NEW_TAGS		"no"
-#define DEF_NORMAL_BACKGROUND 	STD_NORMAL_BACKGROUND
-#define DEF_NORMAL_FG_MONO	STD_ACTIVE_FG_MONO
-#define DEF_RELIEF		"sunken"
-#define DEF_RESIZE_CURSOR	"arrow"
-#define DEF_SCROLL_INCREMENT	"20"
-#define DEF_SCROLL_MODE		"hierbox"
-#define DEF_SELECT_BACKGROUND 	STD_SELECT_BACKGROUND 
-#define DEF_SELECT_BG_MONO  	STD_SELECT_BG_MONO
-#define DEF_SELECT_BORDERWIDTH	"1"
-#define DEF_SELECT_FOREGROUND 	STD_SELECT_FOREGROUND
-#define DEF_SELECT_FG_MONO  	STD_SELECT_FG_MONO
-#define DEF_SELECT_MODE		"single"
-#define DEF_SELECT_RELIEF	"flat"
-#define DEF_SHOW_ROOT		"yes"
-#define DEF_SHOW_TITLES		"yes"
-#define DEF_SORT_SELECTION	"no"
-#define DEF_TAKE_FOCUS		"1"
-#define DEF_TEXT_COLOR		STD_NORMAL_FOREGROUND
-#define DEF_TEXT_MONO		STD_NORMAL_FG_MONO
-#define DEF_TRIMLEFT		""
-#define DEF_WIDTH		"200"
-
-#define TvOffset(x)	Blt_Offset(TreeView, x)
-
-Blt_ConfigSpec bltTreeViewButtonSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"Background", DEF_BUTTON_ACTIVE_BACKGROUND, TvOffset(button.activeBg), 0},
-    {BLT_CONFIG_SYNONYM, "-activebg", "activeBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-activefg", "activeForeground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", "Foreground",
-	DEF_BUTTON_ACTIVE_FOREGROUND, TvOffset(button.activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BUTTON_NORMAL_BACKGROUND, TvOffset(button.bg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BUTTON_BORDERWIDTH, TvOffset(button.borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-closerelief", "closeRelief", "Relief",
-	DEF_BUTTON_CLOSE_RELIEF, TvOffset(button.closeRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_BUTTON_NORMAL_FOREGROUND, TvOffset(button.fgColor), 0},
-    {BLT_CONFIG_CUSTOM, "-images", "images", "Icons", (char *)NULL, 
-	TvOffset(button.icons), BLT_CONFIG_NULL_OK, &bltTreeViewIconsOption},
-    {BLT_CONFIG_RELIEF, "-openrelief", "openRelief", "Relief",
-	DEF_BUTTON_OPEN_RELIEF, TvOffset(button.openRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-size", "size", "Size", DEF_BUTTON_SIZE, 
-	TvOffset(button.reqSize), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 0, 0}
-};
-
-#define EntryOffset(x)	Blt_Offset(TreeViewEntry, x)
-
-Blt_ConfigSpec bltTreeViewEntrySpecs[] =
-{
-    {BLT_CONFIG_CUSTOM, "-bindtags", (char *)NULL, (char *)NULL, (char *)NULL, 
-	EntryOffset(tagsUid), BLT_CONFIG_NULL_OK, &bltTreeViewUidOption},
-    {BLT_CONFIG_CUSTOM, "-button", (char *)NULL, (char *)NULL, DEF_BUTTON, 
-	EntryOffset(flags), BLT_CONFIG_DONT_SET_DEFAULT, &buttonOption},
-    {BLT_CONFIG_CUSTOM, "-closecommand", (char *)NULL, (char *)NULL,
-	(char *)NULL, EntryOffset(closeCmd), BLT_CONFIG_NULL_OK, 
-	&bltTreeViewUidOption},
-    {BLT_CONFIG_CUSTOM, "-data", (char *)NULL, (char *)NULL, (char *)NULL, 0, 
-	BLT_CONFIG_NULL_OK, &bltTreeViewDataOption},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", (char *)NULL, (char *)NULL, (char *)NULL, 
-	EntryOffset(font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", (char *)NULL, (char *)NULL,
-	 EntryOffset(color), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", (char *)NULL, (char *)NULL, 
-	(char *)NULL, EntryOffset(reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icons", (char *)NULL, (char *)NULL, (char *)NULL, 
-	EntryOffset(icons), BLT_CONFIG_NULL_OK, &bltTreeViewIconsOption},
-    {BLT_CONFIG_CUSTOM, "-label", (char *)NULL, (char *)NULL, (char *)NULL, 
-	EntryOffset(labelUid), 0, &labelOption},
-    {BLT_CONFIG_CUSTOM, "-opencommand", (char *)NULL, (char *)NULL, 
-	(char *)NULL, EntryOffset(openCmd), BLT_CONFIG_NULL_OK, 
-	&bltTreeViewUidOption},
-    {BLT_CONFIG_CUSTOM, "-styles", (char *)NULL, (char *)NULL, 
-	(char *)NULL, EntryOffset(values), BLT_CONFIG_NULL_OK, &stylesOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-Blt_ConfigSpec bltTreeViewSpecs[] =
-{
-    {BLT_CONFIG_BITMASK, "-allowduplicates", "allowDuplicates", 
-	"AllowDuplicates", DEF_ALLOW_DUPLICATES, TvOffset(flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)TV_ALLOW_DUPLICATES},
-    {BLT_CONFIG_BACKGROUND, "-alternatebackground", "alternateBackground", 
-	"Background", DEF_ALT_BACKGROUND, TvOffset(altBg), 0},
-    {BLT_CONFIG_BITMASK, "-autocreate", "autoCreate", "AutoCreate", DEF_MAKE_PATH,
-	 TvOffset(flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)TV_FILL_ANCESTORS},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BACKGROUND, TvOffset(bg), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BORDERWIDTH, TvOffset(borderWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-button", "button", "Button", DEF_BUTTON, 
-	TvOffset(buttonFlags), BLT_CONFIG_DONT_SET_DEFAULT, &buttonOption},
-    {BLT_CONFIG_STRING, "-closecommand", "closeCommand", "CloseCommand",
-	(char *)NULL, TvOffset(closeCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", (char *)NULL, 
-	TvOffset(cursor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", 	DEF_DASHES, 
-	TvOffset(dashes), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-exportselection", "exportSelection",
-	"ExportSelection", DEF_EXPORT_SELECTION, TvOffset(flags),
-	BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)TV_SELECT_EXPORT},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_BOOLEAN, "-flat", "flat", "Flat", DEF_FLAT, TvOffset(flatView), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DASHES, "-focusdashes", "focusDashes", "FocusDashes",
-	DEF_FOCUS_DASHES, TvOffset(focusDashes), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-focusforeground", "focusForeground", "FocusForeground",
-	DEF_FOCUS_FOREGROUND, TvOffset(focusColor),BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-focusforeground", "focusForeground", "FocusForeground",
-	DEF_FOCUS_FG_MONO, TvOffset(focusColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_FONT, TvOffset(font), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_TEXT_COLOR,
-	TvOffset(fgColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_TEXT_MONO, 
-	TvOffset(fgColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_HEIGHT, 
-	TvOffset(reqHeight), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BITMASK, "-hideleaves", "hideLeaves", "HideLeaves",
-	DEF_HIDE_LEAVES, TvOffset(flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)TV_HIDE_LEAVES},
-    {BLT_CONFIG_BITMASK, "-hideroot", "hideRoot", "HideRoot", DEF_HIDE_ROOT,
-	TvOffset(flags), BLT_CONFIG_DONT_SET_DEFAULT, 
-	(Blt_CustomOption *)HIDE_ROOT},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_FOCUS_HIGHLIGHT_BACKGROUND, 
-        TvOffset(highlightBgColor), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_FOCUS_HIGHLIGHT_COLOR, TvOffset(highlightColor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_FOCUS_HIGHLIGHT_WIDTH, TvOffset(highlightWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icons", "icons", "Icons", DEF_ICONS, 
-	TvOffset(icons), BLT_CONFIG_NULL_OK, &bltTreeViewIconsOption},
-    {BLT_CONFIG_COLOR, "-linecolor", "lineColor", "LineColor",
-	DEF_LINECOLOR, TvOffset(lineColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-linecolor", "lineColor", "LineColor", 
-	DEF_LINECOLOR_MONO, TvOffset(lineColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_PIXELS_NNEG, "-linespacing", "lineSpacing", "LineSpacing",
-	DEF_LINESPACING, TvOffset(leader), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", 
-	DEF_LINEWIDTH, TvOffset(lineWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-opencommand", "openCommand", "OpenCommand",
-	(char *)NULL, TvOffset(openCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_RELIEF, 
-	TvOffset(relief), 0},
-    {BLT_CONFIG_CURSOR, "-resizecursor", "resizeCursor", "ResizeCursor",
-	DEF_RESIZE_CURSOR, TvOffset(resizeCursor), 0},
-    {BLT_CONFIG_CUSTOM, "-scrollmode", "scrollMode", "ScrollMode",
-	DEF_SCROLL_MODE, TvOffset(scrollMode),
-	BLT_CONFIG_DONT_SET_DEFAULT, &scrollmodeOption},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", DEF_SELECT_BACKGROUND, TvOffset(selBg), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", 
-	"BorderWidth", DEF_SELECT_BORDERWIDTH, TvOffset(selBW), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-selectcommand", "selectCommand", "SelectCommand",
-	(char *)NULL, TvOffset(selectCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	DEF_SELECT_FOREGROUND, TvOffset(selFgColor), 0},
-    {BLT_CONFIG_CUSTOM, "-selectmode", "selectMode", "SelectMode",
-	DEF_SELECT_MODE, TvOffset(selectMode), 
-	BLT_CONFIG_DONT_SET_DEFAULT, &selectmodeOption},
-    {BLT_CONFIG_RELIEF, "-selectrelief", "selectRelief", "Relief",
-	DEF_SELECT_RELIEF, TvOffset(selRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-separator", "separator", "Separator", (char *)NULL, 
-	TvOffset(pathSep), BLT_CONFIG_NULL_OK, &separatorOption},
-    {BLT_CONFIG_BITMASK, "-newtags", "newTags", "newTags", 
-	DEF_NEW_TAGS, TvOffset(flags), 
-        BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)TV_NEW_TAGS},
-    {BLT_CONFIG_BITMASK, "-showtitles", "showTitles", "ShowTitles",
-	DEF_SHOW_TITLES, TvOffset(flags), 0,
-        (Blt_CustomOption *)TV_SHOW_COLUMN_TITLES},
-    {BLT_CONFIG_BITMASK, "-sortselection", "sortSelection", "SortSelection",
-	DEF_SORT_SELECTION, TvOffset(flags), 
-        BLT_CONFIG_DONT_SET_DEFAULT, (Blt_CustomOption *)TV_SELECT_SORTED},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_TAKE_FOCUS, TvOffset(takeFocus), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-tree", "tree", "Tree", (char *)NULL, 
-	TvOffset(treeName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-trim", "trim", "Trim", DEF_TRIMLEFT, 
-	TvOffset(trimLeft), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_WIDTH, 
-	TvOffset(reqWidth), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
-	(char *)NULL, TvOffset(xScrollCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-xscrollincrement", "xScrollIncrement", 
-	"ScrollIncrement", DEF_SCROLL_INCREMENT, TvOffset(xScrollUnits), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_OBJ, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
-	(char *)NULL, TvOffset(yScrollCmdObjPtr), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-yscrollincrement", "yScrollIncrement", 
-	"ScrollIncrement", DEF_SCROLL_INCREMENT, 
-	TvOffset(yScrollUnits), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-/* Forward Declarations */
-BLT_EXTERN Blt_TreeApplyProc TreeViewSortApplyProc;
-static Blt_BindPickProc PickItem;
-static Blt_BindTagProc GetTags;
-static Blt_TreeNotifyEventProc TreeEventProc;
-static Blt_TreeTraceProc TreeTraceProc;
-static Tcl_CmdDeleteProc WidgetInstCmdDeleteProc;
-static Tcl_FreeProc DestroyEntry;
-static Tcl_FreeProc DestroyTreeView;
-static Tcl_IdleProc DisplayTreeView;
-static Tcl_ObjCmdProc TreeViewObjCmd;
-static Tk_EventProc TreeViewEventProc;
-static Tk_ImageChangedProc IconChangedProc;
-static Tk_SelectionProc SelectionProc;
-
-static int ComputeVisibleEntries(TreeView *viewPtr);
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_EventuallyRedraw --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_EventuallyRedraw(TreeView *viewPtr)
-{
-    if ((viewPtr->tkwin != NULL) && ((viewPtr->flags & REDRAW_PENDING) == 0)) {
-	viewPtr->flags |= REDRAW_PENDING;
-	Tcl_DoWhenIdle(DisplayTreeView, viewPtr);
-    }
-}
-
-void
-Blt_TreeView_TraceColumn(TreeView *viewPtr, TreeViewColumn *cp)
-{
-    Blt_Tree_CreateTrace(viewPtr->tree, NULL /* Node */, cp->key, NULL,
-	TREE_TRACE_FOREIGN_ONLY | TREE_TRACE_WRITE | TREE_TRACE_UNSET, 
-	TreeTraceProc, viewPtr);
-}
-
-static void
-TraceColumns(TreeView *viewPtr)
-{
-    Blt_ChainLink link;
-
-    for(link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	TreeViewColumn *cp;
-
-	cp = Blt_Chain_GetValue(link);
-	Blt_Tree_CreateTrace(
-		viewPtr->tree, 
-		NULL		/* Node */, 
-		cp->key	/* Key pattern */, 
-		NULL		/* Tag */,
-	        TREE_TRACE_FOREIGN_ONLY | TREE_TRACE_WRITE | TREE_TRACE_UNSET, 
-	        TreeTraceProc	/* Callback routine */, 
-		viewPtr		/* Client data */);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToTree --
- *
- *	Convert the string representing the name of a tree object 
- *	into a tree token.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToTree(
-    ClientData clientData,		  /* Not used. */
-    Tcl_Interp *interp,		          /* Interpreter to send results back
-					   * to */
-    Tk_Window tkwin,			  /* Not used. */
-    Tcl_Obj *objPtr,		          /* Tcl_Obj representing the new
-					   * value. */  
-    char *widgRec,
-    int offset,				  /* Offset to field in structure */
-    int flags)	
-{
-    Blt_Tree tree = *(Blt_Tree *)(widgRec + offset);
-
-    if (Blt_Tree_Attach(interp, tree, Tcl_GetString(objPtr)) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeToObj --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-TreeToObj(
-    ClientData clientData,		  /* Not used. */
-    Tcl_Interp *interp,		
-    Tk_Window tkwin,			  /* Not used. */
-    char *widgRec,
-    int offset,				  /* Offset to field in structure */
-    int flags)	
-{
-    Blt_Tree tree = *(Blt_Tree *)(widgRec + offset);
-
-    if (tree == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(Blt_Tree_Name(tree), -1);
-    }
-}
-
-/*ARGSUSED*/
-static void
-FreeTree(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    Blt_Tree *treePtr = (Blt_Tree *)(widgRec + offset);
-
-    if (*treePtr != NULL) {
-	Blt_TreeNode root;
-	TreeView *viewPtr = clientData;
-
-	/* 
-	 * Release the current tree, removing any entry fields. 
-	 */
-	root = Blt_Tree_RootNode(*treePtr);
-	Blt_Tree_Apply(root, DeleteApplyProc, viewPtr);
-	Blt_TreeView_ClearSelection(viewPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToScrollmode --
- *
- *	Convert the string reprsenting a scroll mode, to its numeric
- *	form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToScrollmode(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* New legend position string */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    char *string;
-    char c;
-    int *modePtr = (int *)(widgRec + offset);
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 'l') && (strcmp(string, "listbox") == 0)) {
-	*modePtr = BLT_SCROLL_MODE_LISTBOX;
-    } else if ((c == 't') && (strcmp(string, "treeview") == 0)) {
-	*modePtr = BLT_SCROLL_MODE_HIERBOX;
-    } else if ((c == 'c') && (strcmp(string, "canvas") == 0)) {
-	*modePtr = BLT_SCROLL_MODE_CANVAS;
-    } else {
-	Tcl_AppendResult(interp, "bad scroll mode \"", string,
-	    "\": should be \"treeview\", \"listbox\", or \"canvas\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScrollmodeToObj --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ScrollmodeToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int mode = *(int *)(widgRec + offset);
-
-    switch (mode) {
-    case BLT_SCROLL_MODE_LISTBOX:
-	return Tcl_NewStringObj("listbox", -1);
-    case BLT_SCROLL_MODE_HIERBOX:
-	return Tcl_NewStringObj("hierbox", -1);
-    case BLT_SCROLL_MODE_CANVAS:
-	return Tcl_NewStringObj("canvas", -1);
-    default:
-	return Tcl_NewStringObj("unknown scroll mode", -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToSelectmode --
- *
- *	Convert the string reprsenting a scroll mode, to its numeric
- *	form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSelectmode(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    char *string;
-    char c;
-    int *modePtr = (int *)(widgRec + offset);
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    if ((c == 's') && (strcmp(string, "single") == 0)) {
-	*modePtr = SELECT_MODE_SINGLE;
-    } else if ((c == 'm') && (strcmp(string, "multiple") == 0)) {
-	*modePtr = SELECT_MODE_MULTIPLE;
-    } else if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	*modePtr = SELECT_MODE_SINGLE;
-    } else {
-	Tcl_AppendResult(interp, "bad select mode \"", string,
-	    "\": should be \"single\" or \"multiple\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectmodeToObj --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SelectmodeToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int mode = *(int *)(widgRec + offset);
-
-    switch (mode) {
-    case SELECT_MODE_SINGLE:
-	return Tcl_NewStringObj("single", -1);
-    case SELECT_MODE_MULTIPLE:
-	return Tcl_NewStringObj("multiple", -1);
-    default:
-	return Tcl_NewStringObj("unknown scroll mode", -1);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToButton --
- *
- *	Convert a string to one of three values.
- *		0 - false, no, off
- *		1 - true, yes, on
- *		2 - auto
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToButton(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    char *string;
-    int *flagsPtr = (int *)(widgRec + offset);
-
-    string = Tcl_GetString(objPtr);
-    if ((string[0] == 'a') && (strcmp(string, "auto") == 0)) {
-	*flagsPtr &= ~BUTTON_MASK;
-	*flagsPtr |= BUTTON_AUTO;
-    } else {
-	int bool;
-
-	if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	*flagsPtr &= ~BUTTON_MASK;
-	if (bool) {
-	    *flagsPtr |= BUTTON_SHOW;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonToObj --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ButtonToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    int bool;
-    unsigned int buttonFlags = *(int *)(widgRec + offset);
-
-    bool = (buttonFlags & BUTTON_MASK);
-    if (bool == BUTTON_AUTO) {
-	return Tcl_NewStringObj("auto", 4);
-    } else {
-	return Tcl_NewBooleanObj(bool);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToScrollmode --
- *
- *	Convert the string reprsenting a scroll mode, to its numeric
- *	form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToSeparator(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    char **sepPtr = (char **)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	*sepPtr = SEPARATOR_LIST;
-    } else if (strcmp(string, "none") == 0) {
-	*sepPtr = SEPARATOR_NONE;
-    } else {
-	*sepPtr = Blt_AssertStrdup(string);
-    } 
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SeparatorToObj --
- *
- * Results:
- *	The string representation of the separator is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-SeparatorToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    char *separator = *(char **)(widgRec + offset);
-
-    if (separator == SEPARATOR_NONE) {
-	return Tcl_NewStringObj("", -1);
-    } else if (separator == SEPARATOR_LIST) {
-	return Tcl_NewStringObj("list", -1);
-    }  else {
-	return Tcl_NewStringObj(separator, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeSeparator --
- *
- *	Free the UID from the widget record, setting it to NULL.
- *
- * Results:
- *	The UID in the widget record is set to NULL.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreeSeparator(ClientData clientData, Display *display, char *widgRec, 
-	      int offset)
-{
-    char **sepPtr = (char **)(widgRec + offset);
-
-    if ((*sepPtr != SEPARATOR_LIST) && (*sepPtr != SEPARATOR_NONE)) {
-	Blt_Free(*sepPtr);
-	*sepPtr = SEPARATOR_NONE;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToLabel --
- *
- *	Convert the string representing the label. 
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToLabel(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    UID *labelPtr = (UID *)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] != '\0') {
-	TreeView *viewPtr = clientData;
-
-	*labelPtr = Blt_TreeView_GetUid(viewPtr, string);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeToObj --
- *
- * Results:
- *	The string of the entry's label is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-LabelToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    UID labelUid = *(UID *)(widgRec + offset);
-    const char *string;
-
-    if (labelUid == NULL) {
-	TreeViewEntry *entryPtr  = (TreeViewEntry *)widgRec;
-
-	string = Blt_Tree_NodeLabel(entryPtr->node);
-    } else {
-	string = labelUid;
-    }
-    return Tcl_NewStringObj(string, -1);
-}
-
-/*ARGSUSED*/
-static void
-FreeLabel(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    UID *labelPtr = (UID *)(widgRec + offset);
-
-    if (*labelPtr != NULL) {
-	TreeView *viewPtr = clientData;
-
-	Blt_TreeView_FreeUid(viewPtr, *labelPtr);
-	*labelPtr = NULL;
-    }
-}
-/*
-
- *---------------------------------------------------------------------------
- *
- * ObjToStyles --
- *
- *	Convert the list representing the field-name style-name pairs into
- *	stylePtr's.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStyles(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewEntry *entryPtr = (TreeViewEntry *)widgRec;
-    TreeView *viewPtr;
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc & 1) {
-	Tcl_AppendResult(interp, "odd number of field/style pairs in \"",
-			 Tcl_GetString(objPtr), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    viewPtr = entryPtr->viewPtr;
-    for (i = 0; i < objc; i += 2) {
-	TreeViewValue *valuePtr;
-	TreeViewStyle *stylePtr;
-	TreeViewColumn *cp;
-	char *string;
-
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[i], &cp)!=TCL_OK) {
-	    return TCL_ERROR;
-	}
-	valuePtr = Blt_TreeView_FindValue(entryPtr, cp);
-	if (valuePtr == NULL) {
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetString(objv[i+1]);
-	stylePtr = NULL;
-	if ((*string != '\0') && (Blt_TreeView_GetStyle(interp, viewPtr, string, 
-		&stylePtr) != TCL_OK)) {
-	    return TCL_ERROR;			/* No data ??? */
-	}
-	if (valuePtr->stylePtr != NULL) {
-	    Blt_TreeView_FreeStyle(viewPtr, valuePtr->stylePtr);
-	}
-	valuePtr->stylePtr = stylePtr;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StylesToObj --
- *
- * Results:
- *	The string representation of the button boolean is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StylesToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewEntry *entryPtr = (TreeViewEntry *)widgRec;
-    TreeViewValue *vp;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (vp = entryPtr->values; vp != NULL; vp = vp->nextPtr) {
-	const char *styleName;
-
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj(vp->columnPtr->key, -1));
-	styleName = (vp->stylePtr != NULL) ? vp->stylePtr->name : "";
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewStringObj(styleName, -1));
-    }
-    return listObjPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_GetUid --
- *
- *	Gets or creates a unique string identifier.  Strings are reference
- *	counted.  The string is placed into a hashed table local to the
- *	treeview.
- *
- * Results:
- *	Returns the pointer to the hashed string.
- *
- *---------------------------------------------------------------------------
- */
-UID
-Blt_TreeView_GetUid(TreeView *viewPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    size_t refCount;
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->uidTable, string, &isNew);
-    if (isNew) {
-	refCount = 1;
-    } else {
-	refCount = (size_t)Blt_GetHashValue(hPtr);
-	refCount++;
-    }
-    Blt_SetHashValue(hPtr, refCount);
-    return Blt_GetHashKey(&viewPtr->uidTable, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_FreeUid --
- *
- *	Releases the uid.  Uids are reference counted, so only when the
- *	reference count is zero (i.e. no one else is using the string) is the
- *	entry removed from the hash table.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_FreeUid(TreeView *viewPtr, UID uid)
-{
-    Blt_HashEntry *hPtr;
-    size_t refCount;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->uidTable, uid);
-    assert(hPtr != NULL);
-    refCount = (size_t)Blt_GetHashValue(hPtr);
-    refCount--;
-    if (refCount > 0) {
-	Blt_SetHashValue(hPtr, refCount);
-    } else {
-	Blt_DeleteHashEntry(&viewPtr->uidTable, hPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToUid --
- *
- *	Converts the string to a Uid. Uid's are hashed, reference counted
- *	strings.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToUid(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeView *viewPtr = clientData;
-    UID *uidPtr = (UID *)(widgRec + offset);
-
-    *uidPtr = Blt_TreeView_GetUid(viewPtr, Tcl_GetString(objPtr));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UidToObj --
- *
- *	Returns the uid as a string.
- *
- * Results:
- *	The fill style string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-UidToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    UID uid = *(UID *)(widgRec + offset);
-
-    if (uid == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(uid, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeUid --
- *
- *	Free the UID from the widget record, setting it to NULL.
- *
- * Results:
- *	The UID in the widget record is set to NULL.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-FreeUid(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    UID *uidPtr = (UID *)(widgRec + offset);
-
-    if (*uidPtr != NULL) {
-	TreeView *viewPtr = clientData;
-
-	Blt_TreeView_FreeUid(viewPtr, *uidPtr);
-	*uidPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconChangedProc
- *
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-IconChangedProc(
-    ClientData clientData,
-    int x,				/* Not used. */
-    int y,				/* Not used. */
-    int width,				/* Not used. */
-    int height,				/* Not used. */
-    int imageWidth,			/* Not used. */
-    int imageHeight)			/* Not used. */
-{
-    TreeView *viewPtr = clientData;
-
-    viewPtr->flags |= (DIRTY | LAYOUT_PENDING | SCROLL_PENDING);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-}
-
-TreeViewIcon
-Blt_TreeView_GetIcon(TreeView *viewPtr, const char *iconName)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    struct _TreeViewIcon *iconPtr;
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->iconTable, iconName, &isNew);
-    if (isNew) {
-	Tk_Image tkImage;
-	int width, height;
-
-	tkImage = Tk_GetImage(viewPtr->interp, viewPtr->tkwin, (char *)iconName, 
-		IconChangedProc, viewPtr);
-	if (tkImage == NULL) {
-	    Blt_DeleteHashEntry(&viewPtr->iconTable, hPtr);
-	    return NULL;
-	}
-	Tk_SizeOfImage(tkImage, &width, &height);
-	iconPtr = Blt_AssertMalloc(sizeof(struct _TreeViewIcon));
-	iconPtr->tkImage = tkImage;
-	iconPtr->hashPtr = hPtr;
-	iconPtr->refCount = 1;
-	iconPtr->width = width;
-	iconPtr->height = height;
-	Blt_SetHashValue(hPtr, iconPtr);
-    } else {
-	iconPtr = Blt_GetHashValue(hPtr);
-	iconPtr->refCount++;
-    }
-    return iconPtr;
-}
-
-void
-Blt_TreeView_FreeIcon(TreeView *viewPtr, TreeViewIcon icon)
-{
-    struct _TreeViewIcon *iconPtr = icon;
-
-    iconPtr->refCount--;
-    if (iconPtr->refCount == 0) {
-	Blt_DeleteHashEntry(&viewPtr->iconTable, iconPtr->hashPtr);
-	Tk_FreeImage(iconPtr->tkImage);
-	Blt_Free(iconPtr);
-    }
-}
-
-static void
-DumpIconTable(TreeView *viewPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-    struct _TreeViewIcon *iconPtr;
-
-    for (hPtr = Blt_FirstHashEntry(&viewPtr->iconTable, &iter);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&iter)) {
-	iconPtr = Blt_GetHashValue(hPtr);
-	Tk_FreeImage(iconPtr->tkImage);
-	Blt_Free(iconPtr);
-    }
-    Blt_DeleteHashTable(&viewPtr->iconTable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIcons --
- *
- *	Convert a list of image names into Tk images.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIcons(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,			/* Interpreter to send results back
-					 * to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,			/* Tcl_Obj representing the new
-					 * value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj **objv;
-    TreeView *viewPtr = clientData;
-    TreeViewIcon **iconPtrPtr = (TreeViewIcon **)(widgRec + offset);
-    TreeViewIcon *icons;
-    int objc;
-    int result;
-
-    result = TCL_OK;
-    icons = NULL;
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 0) {
-	int i;
-	
-	icons = Blt_AssertMalloc(sizeof(TreeViewIcon *) * (objc + 1));
-	for (i = 0; i < objc; i++) {
-	    icons[i] = Blt_TreeView_GetIcon(viewPtr, Tcl_GetString(objv[i]));
-	    if (icons[i] == NULL) {
-		result = TCL_ERROR;
-		break;
-	    }
-	}
-	icons[i] = NULL;
-    }
-    *iconPtrPtr = icons;
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconsToObj --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconsToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewIcon *icons = *(TreeViewIcon **)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-    
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (icons != NULL) {
-	TreeViewIcon *iconPtr;
-
-	for (iconPtr = icons; *iconPtr != NULL; iconPtr++) {
-	    Tcl_Obj *objPtr;
-
-	    objPtr = Tcl_NewStringObj(Blt_Image_Name((*iconPtr)->tkImage), -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-
-	}
-    }
-    return listObjPtr;
-}
-
-/*ARGSUSED*/
-static void
-FreeIcons(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    TreeViewIcon **iconsPtr = (TreeViewIcon **)(widgRec + offset);
-
-    if (*iconsPtr != NULL) {
-	TreeViewIcon *ip;
-	TreeView *viewPtr = clientData;
-
-	for (ip = *iconsPtr; *ip != NULL; ip++) {
-	    Blt_TreeView_FreeIcon(viewPtr, *ip);
-	}
-	Blt_Free(*iconsPtr);
-	*iconsPtr = NULL;
-    }
-}
-
-TreeViewEntry *
-Blt_TreeView_NodeToEntry(TreeView *viewPtr, Blt_TreeNode node)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->entryTable, (char *)node);
-    if (hPtr == NULL) {
-	fprintf(stderr, "Blt_TreeView_NodeToEntry: can't find node %s\n", 
-		Blt_Tree_NodeLabel(node));
-	abort();
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-TreeViewEntry *
-Blt_TreeView_FindEntry(TreeView *viewPtr, Blt_TreeNode node)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->entryTable, (char *)node);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-int
-Blt_TreeView_Apply(
-    TreeView *viewPtr,
-    TreeViewEntry *entryPtr,		/* Root entry of subtree. */
-    TreeViewApplyProc *proc,		/* Procedure called for each entry. */
-    unsigned int flags)
-{
-    if ((flags & ENTRY_HIDE) && 
-	(Blt_TreeView_EntryIsHidden(entryPtr))) {
-	return TCL_OK;			/* Hidden node. */
-    }
-    if ((flags & ENTRY_HIDE) && (entryPtr->flags & ENTRY_HIDE)) {
-	return TCL_OK;			/* Hidden node. */
-    }
-    if (((flags & ENTRY_CLOSED) == 0) || 
-	((entryPtr->flags & ENTRY_CLOSED) == 0)) {
-	TreeViewEntry *childPtr;
-	Blt_TreeNode node, next;
-
-	for (node = Blt_Tree_FirstChild(entryPtr->node); node != NULL; 
-	     node = next) {
-	    next = Blt_Tree_NextSibling(node);
-	    /* 
-	     * Get the next child before calling Blt_TreeView_Apply
-	     * recursively.  This is because the apply callback may delete the
-	     * node and its link.
-	     */
-	    childPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	    if (Blt_TreeView_Apply(viewPtr, childPtr, proc, flags) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if ((*proc) (viewPtr, entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_TreeView_EntryIsHidden(TreeViewEntry *entryPtr)
-{
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    if ((viewPtr->flags & TV_HIDE_LEAVES) && (Blt_Tree_IsLeaf(entryPtr->node))) {
-	return TRUE;
-    }
-    return (entryPtr->flags & ENTRY_HIDE) ? TRUE : FALSE;
-}
-
-#ifdef notdef
-int
-TreeViewEntryIsMapped(TreeViewEntry *entryPtr)
-{
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    /* Don't check if the entry itself is open, only that its ancestors
-     * are. */
-    if (TreeViewEntryIsHidden(entryPtr)) {
-	return FALSE;
-    }
-    if (entryPtr == viewPtr->rootPtr) {
-	return TRUE;
-    }
-    entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-    while (entryPtr != viewPtr->rootPtr) {
-	if (entryPtr->flags & (ENTRY_CLOSED | ENTRY_HIDE)) {
-	    return FALSE;
-	}
-	entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-    }
-    return TRUE;
-}
-#endif
-
-TreeViewEntry *
-Blt_TreeView_FirstChild(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    for (node = Blt_Tree_FirstChild(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_NextSibling(node)) {
-	entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) || 
-	    (!Blt_TreeView_EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-TreeViewEntry *
-Blt_TreeView_LastChild(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    for (node = Blt_Tree_LastChild(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_PrevSibling(node)) {
-	entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) ||
-	    (!Blt_TreeView_EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-TreeViewEntry *
-Blt_TreeView_NextSibling(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    for (node = Blt_Tree_NextSibling(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_NextSibling(node)) {
-	entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) ||
-	    (!Blt_TreeView_EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-TreeViewEntry *
-Blt_TreeView_PrevSibling(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode node;
-    TreeView *viewPtr = entryPtr->viewPtr; 
-
-    for (node = Blt_Tree_PrevSibling(entryPtr->node); node != NULL; 
-	 node = Blt_Tree_PrevSibling(node)) {
-	entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	if (((mask & ENTRY_HIDE) == 0) ||
-	    (!Blt_TreeView_EntryIsHidden(entryPtr))) {
-	    return entryPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_PrevEntry --
- *
- *	Returns the "previous" node in the tree.  This node (in depth-first
- *	order) is its parent if the node has no siblings that are previous to
- *	it.  Otherwise it is the last descendant of the last sibling.  In this
- *	case, descend the sibling's hierarchy, using the last child at any
- *	ancestor, until we we find a leaf.
- *
- *---------------------------------------------------------------------------
- */
-TreeViewEntry *
-Blt_TreeView_PrevEntry(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    TreeView *viewPtr = entryPtr->viewPtr; 
-    TreeViewEntry *prevPtr;
-
-    if (entryPtr->node == Blt_Tree_RootNode(viewPtr->tree)) {
-	return NULL;			/* The root is the first node. */
-    }
-    prevPtr = Blt_TreeView_PrevSibling(entryPtr, mask);
-    if (prevPtr == NULL) {
-	/* There are no siblings previous to this one, so pick the parent. */
-	prevPtr = Blt_TreeView_ParentEntry(entryPtr);
-    } else {
-	/*
-	 * Traverse down the right-most thread in order to select the last
-	 * entry.  Stop if we find a "closed" entry or reach a leaf.
-	 */
-	entryPtr = prevPtr;
-	while ((entryPtr->flags & mask) == 0) {
-	    entryPtr = Blt_TreeView_LastChild(entryPtr, mask);
-	    if (entryPtr == NULL) {
-		break;			/* Found a leaf. */
-	    }
-	    prevPtr = entryPtr;
-	}
-    }
-    if (prevPtr == NULL) {
-	return NULL;
-    }
-    return prevPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_NextEntry --
- *
- *	Returns the "next" node in relation to the given node.  The next node
- *	(in depth-first order) is either the first child of the given node the
- *	next sibling if the node has no children (the node is a leaf).  If the
- *	given node is the last sibling, then try it's parent next sibling.
- *	Continue until we either find a next sibling for some ancestor or we
- *	reach the root node.  In this case the current node is the last node
- *	in the tree.
- *
- *---------------------------------------------------------------------------
- */
-TreeViewEntry *
-Blt_TreeView_NextEntry(TreeViewEntry *entryPtr, unsigned int mask)
-{
-    TreeView *viewPtr = entryPtr->viewPtr; 
-    TreeViewEntry *nextPtr;
-    int ignoreLeaf;
-
-    ignoreLeaf = ((viewPtr->flags & TV_HIDE_LEAVES) && 
-		  (Blt_Tree_IsLeaf(entryPtr->node)));
-
-    if ((!ignoreLeaf) && ((entryPtr->flags & mask) == 0)) {
-	nextPtr = Blt_TreeView_FirstChild(entryPtr, mask); 
-	if (nextPtr != NULL) {
-	    return nextPtr;		/* Pick the first sub-node. */
-	}
-    }
-    /* 
-     * Back up until to a level where we can pick a "next sibling".  For the
-     * last entry we'll thread our way back to the root.
-     */
-    while (entryPtr != viewPtr->rootPtr) {
-	nextPtr = Blt_TreeView_NextSibling(entryPtr, mask);
-	if (nextPtr != NULL) {
-	    return nextPtr;
-	}
-	entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-    }
-    return NULL;			/* At root, no next node. */
-}
-
-void
-Blt_TreeView_ConfigureButtons(TreeView *viewPtr)
-{
-    GC newGC;
-    TreeViewButton *buttonPtr = &viewPtr->button;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcMask = GCForeground;
-    gcValues.foreground = buttonPtr->fgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (buttonPtr->normalGC != NULL) {
-	Tk_FreeGC(viewPtr->display, buttonPtr->normalGC);
-    }
-    buttonPtr->normalGC = newGC;
-
-    gcMask = GCForeground;
-    gcValues.foreground = buttonPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (buttonPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, buttonPtr->activeGC);
-    }
-    buttonPtr->activeGC = newGC;
-
-    buttonPtr->width = buttonPtr->height = ODD(buttonPtr->reqSize);
-    if (buttonPtr->icons != NULL) {
-	int i;
-
-	for (i = 0; i < 2; i++) {
-	    int width, height;
-
-	    if (buttonPtr->icons[i] == NULL) {
-		break;
-	    }
-	    width = TreeView_IconWidth(buttonPtr->icons[i]);
-	    height = TreeView_IconWidth(buttonPtr->icons[i]);
-	    if (buttonPtr->width < width) {
-		buttonPtr->width = width;
-	    }
-	    if (buttonPtr->height < height) {
-		buttonPtr->height = height;
-	    }
-	}
-    }
-    buttonPtr->width += 2 * buttonPtr->borderWidth;
-    buttonPtr->height += 2 * buttonPtr->borderWidth;
-}
-
-int
-Blt_TreeView_ConfigureEntry(TreeView *viewPtr, TreeViewEntry *entryPtr,
-			    int objc, Tcl_Obj *const *objv, int flags)
-{
-    GC newGC;
-    Blt_ChainLink link;
-    TreeViewColumn *cp;
-
-    bltTreeViewIconsOption.clientData = viewPtr;
-    bltTreeViewUidOption.clientData = viewPtr;
-    labelOption.clientData = viewPtr;
-    if (Blt_ConfigureWidgetFromObj(viewPtr->interp, viewPtr->tkwin, 
-	bltTreeViewEntrySpecs, objc, objv, (char *)entryPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* 
-     * Check if there are values that need to be added 
-     */
-    for(link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	cp = Blt_Chain_GetValue(link);
-	Blt_TreeView_AddValue(entryPtr, cp);
-    }
-
-    newGC = NULL;
-    if ((entryPtr->font != NULL) || (entryPtr->color != NULL)) {
-	Blt_Font font;
-	XColor *colorPtr;
-	XGCValues gcValues;
-	unsigned long gcMask;
-
-	font = entryPtr->font;
-	if (font == NULL) {
-	    font = Blt_TreeView_GetStyleFont(viewPtr, 
-		viewPtr->treeColumn.stylePtr);
-	}
-	colorPtr = CHOOSE(viewPtr->fgColor, entryPtr->color);
-	gcMask = GCForeground | GCFont;
-	gcValues.foreground = colorPtr->pixel;
-	gcValues.font = Blt_FontId(font);
-	newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    }
-    if (entryPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, entryPtr->gc);
-    }
-    /* Assume all changes require a new layout. */
-    entryPtr->gc = newGC;
-    entryPtr->flags |= ENTRY_LAYOUT_PENDING;
-    if (Blt_ConfigModified(bltTreeViewEntrySpecs, "-font", (char *)NULL)) {
-	viewPtr->flags |= UPDATE;
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    return TCL_OK;
-}
-
-void
-Blt_TreeView_DestroyValue(TreeView *viewPtr, TreeViewValue *valuePtr)
-{
-    if (valuePtr->stylePtr != NULL) {
-	Blt_TreeView_FreeStyle(viewPtr, valuePtr->stylePtr);
-    }
-    if (valuePtr->textPtr != NULL) {
-	Blt_Free(valuePtr->textPtr);
-    }
-}
-
-
-static void
-DestroyEntry(DestroyData data)
-{
-    TreeViewEntry *entryPtr = (TreeViewEntry *)data;
-    TreeView *viewPtr;
-    
-    viewPtr = entryPtr->viewPtr;
-    bltTreeViewIconsOption.clientData = viewPtr;
-    bltTreeViewUidOption.clientData = viewPtr;
-    labelOption.clientData = viewPtr;
-    Blt_FreeOptions(bltTreeViewEntrySpecs, (char *)entryPtr, viewPtr->display,
-	0);
-    if (!Blt_Tree_TagTableIsShared(viewPtr->tree)) {
-	/* Don't clear tags unless this client is the only one using
-	 * the tag table.*/
-	Blt_Tree_ClearTags(viewPtr->tree, entryPtr->node);
-    }
-    if (entryPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, entryPtr->gc);
-    }
-    /* Delete the chain of data values from the entry. */
-    if (entryPtr->values != NULL) {
-	TreeViewValue *valuePtr, *nextPtr;
-	
-	for (valuePtr = entryPtr->values; valuePtr != NULL; 
-	     valuePtr = nextPtr) {
-	    nextPtr = valuePtr->nextPtr;
-	    Blt_TreeView_DestroyValue(viewPtr, valuePtr);
-	}
-	entryPtr->values = NULL;
-    }
-    if (entryPtr->fullName != NULL) {
-	Blt_Free(entryPtr->fullName);
-    }
-    if (entryPtr->textPtr != NULL) {
-	Blt_Free(entryPtr->textPtr);
-    }
-    Blt_PoolFreeItem(viewPtr->entryPool, entryPtr);
-}
-
-TreeViewEntry *
-Blt_TreeView_ParentEntry(TreeViewEntry *entryPtr)
-{
-    TreeView *viewPtr = entryPtr->viewPtr; 
-    Blt_TreeNode node;
-
-    if (entryPtr->node == Blt_Tree_RootNode(viewPtr->tree)) {
-	return NULL;
-    }
-    node = Blt_Tree_ParentNode(entryPtr->node);
-    if (node == NULL) {
-	return NULL;
-    }
-    return Blt_TreeView_NodeToEntry(viewPtr, node);
-}
-
-static void
-FreeEntry(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    if (entryPtr == viewPtr->activePtr) {
-	viewPtr->activePtr = Blt_TreeView_ParentEntry(entryPtr);
-    }
-    if (entryPtr == viewPtr->activeBtnPtr) {
-	viewPtr->activeBtnPtr = NULL;
-    }
-    if (entryPtr == viewPtr->focusPtr) {
-	viewPtr->focusPtr = Blt_TreeView_ParentEntry(entryPtr);
-	Blt_SetFocusItem(viewPtr->bindTable, viewPtr->focusPtr, ITEM_ENTRY);
-    }
-    if (entryPtr == viewPtr->selAnchorPtr) {
-	viewPtr->selMarkPtr = viewPtr->selAnchorPtr = NULL;
-    }
-    Blt_TreeView_DeselectEntry(viewPtr, entryPtr);
-    Blt_TreeView_PruneSelection(viewPtr, entryPtr);
-    Blt_DeleteBindings(viewPtr->bindTable, entryPtr);
-    hPtr = Blt_FindHashEntry(&viewPtr->entryTable, entryPtr->node);
-    if (hPtr != NULL) {
-	Blt_DeleteHashEntry(&viewPtr->entryTable, hPtr);
-    }
-    entryPtr->node = NULL;
-
-    Tcl_EventuallyFree(entryPtr, DestroyEntry);
-    /*
-     * Indicate that the screen layout of the hierarchy may have changed
-     * because this node was deleted.  The screen positions of the nodes in
-     * viewPtr->visibleArr are invalidated.
-     */
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-}
-
-int
-Blt_TreeView_EntryIsSelected(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->selectTable, (char *)entryPtr);
-    return (hPtr != NULL);
-}
-
-void
-Blt_TreeView_SelectEntry(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->selectTable, (char *)entryPtr, &isNew);
-    if (isNew) {
-	Blt_ChainLink link;
-
-	link = Blt_Chain_Append(viewPtr->selected, entryPtr);
-	Blt_SetHashValue(hPtr, link);
-    }
-}
-
-void
-Blt_TreeView_DeselectEntry(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->selectTable, (char *)entryPtr);
-    if (hPtr != NULL) {
-	Blt_ChainLink link;
-
-	link = Blt_GetHashValue(hPtr);
-	Blt_Chain_DeleteLink(viewPtr->selected, link);
-	Blt_DeleteHashEntry(&viewPtr->selectTable, hPtr);
-    }
-}
-
-const char *
-Blt_TreeView_GetFullName(TreeView *viewPtr, TreeViewEntry *entryPtr,
-			 int checkEntryLabel, Tcl_DString *resultPtr)
-{
-    const char **names;		       /* Used the stack the component names. */
-    const char *staticSpace[64+2];
-    int level;
-    int i;
-
-    level = Blt_Tree_NodeDepth(entryPtr->node);
-    if (viewPtr->rootPtr->labelUid == NULL) {
-	level--;
-    }
-    if (level > 64) {
-	names = Blt_AssertMalloc((level + 2) * sizeof(char *));
-    } else {
-	names = staticSpace;
-    }
-    for (i = level; i >= 0; i--) {
-	Blt_TreeNode node;
-
-	/* Save the name of each ancestor in the name array. */
-	if (checkEntryLabel) {
-	    names[i] = GETLABEL(entryPtr);
-	} else {
-	    names[i] = Blt_Tree_NodeLabel(entryPtr->node);
-	}
-	node = Blt_Tree_ParentNode(entryPtr->node);
-	if (node != NULL) {
-	    entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	}
-    }
-    Tcl_DStringInit(resultPtr);
-    if (level >= 0) {
-	if ((viewPtr->pathSep == SEPARATOR_LIST) || 
-	    (viewPtr->pathSep == SEPARATOR_NONE)) {
-	    for (i = 0; i <= level; i++) {
-		Tcl_DStringAppendElement(resultPtr, names[i]);
-	    }
-	} else {
-	    Tcl_DStringAppend(resultPtr, names[0], -1);
-	    for (i = 1; i <= level; i++) {
-		Tcl_DStringAppend(resultPtr, viewPtr->pathSep, -1);
-		Tcl_DStringAppend(resultPtr, names[i], -1);
-	    }
-	}
-    } else {
-	if ((viewPtr->pathSep != SEPARATOR_LIST) &&
-	    (viewPtr->pathSep != SEPARATOR_NONE)) {
-	    Tcl_DStringAppend(resultPtr, viewPtr->pathSep, -1);
-	}
-    }
-    if (names != staticSpace) {
-	Blt_Free(names);
-    }
-    return Tcl_DStringValue(resultPtr);
-}
-
-
-int
-Blt_TreeView_CloseEntry(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    const char *cmd;
-
-    if (entryPtr->flags & ENTRY_CLOSED) {
-	return TCL_OK;			/* Entry is already closed. */
-    }
-    entryPtr->flags |= ENTRY_CLOSED;
-    viewPtr->flags |= LAYOUT_PENDING;
-
-    /*
-     * Invoke the entry's "close" command, if there is one. Otherwise try the
-     * treeview's global "close" command.
-     */
-    cmd = CHOOSE(viewPtr->closeCmd, entryPtr->closeCmd);
-    if (cmd != NULL) {
-	Tcl_DString dString;
-	int result;
-
-	Blt_TreeView_PercentSubst(viewPtr, entryPtr, cmd, &dString);
-	Tcl_Preserve(entryPtr);
-	result = Tcl_GlobalEval(viewPtr->interp, Tcl_DStringValue(&dString));
-	Tcl_Release(entryPtr);
-	Tcl_DStringFree(&dString);
-	if (result != TCL_OK) {
-	    viewPtr->flags |= DIRTY;
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-
-int
-Blt_TreeView_OpenEntry(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    const char *cmd;
-
-    if ((entryPtr->flags & ENTRY_CLOSED) == 0) {
-	return TCL_OK;			/* Entry is already open. */
-    }
-    entryPtr->flags &= ~ENTRY_CLOSED;
-    viewPtr->flags |= LAYOUT_PENDING;
-
-    /*
-     * If there's a "open" command proc specified for the entry, use that
-     * instead of the more general "open" proc for the entire treeview.
-     * Be careful because the "open" command may perform an update.
-     */
-    cmd = CHOOSE(viewPtr->openCmd, entryPtr->openCmd);
-    if (cmd != NULL) {
-	Tcl_DString dString;
-	int result;
-
-	Blt_TreeView_PercentSubst(viewPtr, entryPtr, cmd, &dString);
-	Tcl_Preserve(entryPtr);
-	result = Tcl_GlobalEval(viewPtr->interp, Tcl_DStringValue(&dString));
-	Tcl_Release(entryPtr);
-	Tcl_DStringFree(&dString);
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_CreateEntry --
- *
- *	This procedure is called by the Tree object when a node is created and
- *	inserted into the tree.  It adds a new treeview entry field to the node.
- *
- * Results:
- *	Returns the entry.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TreeView_CreateEntry(
-    TreeView *viewPtr,
-    Blt_TreeNode node,			/* Node that has just been created. */
-    int objc,
-    Tcl_Obj *const *objv,
-    int flags)
-{
-    TreeViewEntry *entryPtr;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->entryTable, (char *)node, &isNew);
-    if (isNew) {
-	/* Create the entry structure */
-	entryPtr = Blt_PoolAllocItem(viewPtr->entryPool, sizeof(TreeViewEntry));
-	memset(entryPtr, 0, sizeof(TreeViewEntry));
-	entryPtr->flags = (unsigned short)(viewPtr->buttonFlags | ENTRY_CLOSED);
-	entryPtr->viewPtr = viewPtr;
-	entryPtr->labelUid = NULL;
-	entryPtr->node = node;
-	Blt_SetHashValue(hPtr, entryPtr);
-
-    } else {
-	entryPtr = Blt_GetHashValue(hPtr);
-    }
-    if (Blt_TreeView_ConfigureEntry(viewPtr, entryPtr, objc, objv, flags) 
-	!= TCL_OK) {
-	FreeEntry(viewPtr, entryPtr);
-	return TCL_ERROR;		/* Error configuring the entry. */
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-CreateApplyProc(Blt_TreeNode node, ClientData clientData, int order)
-{
-    TreeView *viewPtr = clientData; 
-    return Blt_TreeView_CreateEntry(viewPtr, node, 0, NULL, 0);
-}
-
-/*ARGSUSED*/
-static int
-DeleteApplyProc(Blt_TreeNode node, ClientData clientData, int order)
-{
-    TreeView *viewPtr = clientData;
-    /* 
-     * Unsetting the tree value triggers a call back to destroy the entry and
-     * also releases the Tcl_Obj that contains it.
-     */
-    return Blt_Tree_UnsetValueByKey(viewPtr->interp, viewPtr->tree, node, 
-	viewPtr->treeColumn.key);
-}
-
-static int
-TreeEventProc(ClientData clientData, Blt_TreeNotifyEvent *eventPtr)
-{
-    Blt_TreeNode node;
-    TreeView *viewPtr = clientData; 
-
-    node = Blt_Tree_GetNode(eventPtr->tree, eventPtr->inode);
-    switch (eventPtr->type) {
-    case TREE_NOTIFY_CREATE:
-	return Blt_TreeView_CreateEntry(viewPtr, node, 0, NULL, 0);
-    case TREE_NOTIFY_DELETE:
-	/*  
-	 * Deleting the tree node triggers a call back to free the treeview
-	 * entry that is associated with it.
-	 */
-	if (node != NULL) {
-	    TreeViewEntry *entryPtr;
-
-	    entryPtr = Blt_TreeView_FindEntry(viewPtr, node);
-	    if (entryPtr != NULL) {
-		FreeEntry(viewPtr, entryPtr);
-	    }
-	}
-	break;
-    case TREE_NOTIFY_RELABEL:
-	if (node != NULL) {
-	    TreeViewEntry *entryPtr;
-
-	    entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	    entryPtr->flags |= ENTRY_DIRTY;
-	}
-	/*FALLTHRU*/
-    case TREE_NOTIFY_MOVE:
-    case TREE_NOTIFY_SORT:
-	viewPtr->flags |= (LAYOUT_PENDING | RESORT | DIRTY);
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-	break;
-    default:
-	/* empty */
-	break;
-    }	
-    return TCL_OK;
-}
-
-TreeViewValue *
-Blt_TreeView_FindValue(TreeViewEntry *entryPtr, TreeViewColumn *cp)
-{
-    TreeViewValue *vp;
-
-    for (vp = entryPtr->values; vp != NULL; vp = vp->nextPtr) {
-	if (vp->columnPtr == cp) {
-	    return vp;
-	}
-    }
-    return NULL;
-}
-
-void
-Blt_TreeView_AddValue(TreeViewEntry *entryPtr, TreeViewColumn *cp)
-{
-    if (Blt_TreeView_FindValue(entryPtr, cp) == NULL) {
-	Tcl_Obj *objPtr;
-
-	if (Blt_TreeView_GetData(entryPtr, cp->key, &objPtr) == TCL_OK) {
-	    TreeViewValue *valuePtr;
-
-	    /* Add a new value only if a data entry exists. */
-	    valuePtr = Blt_PoolAllocItem(entryPtr->viewPtr->valuePool, 
-			 sizeof(TreeViewValue));
-	    valuePtr->columnPtr = cp;
-	    valuePtr->nextPtr = entryPtr->values;
-	    valuePtr->textPtr = NULL;
-	    valuePtr->width = valuePtr->height = 0;
-	    valuePtr->stylePtr = NULL;
-	    valuePtr->string = NULL;
-	    entryPtr->values = valuePtr;
-	}
-    }
-    entryPtr->viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    entryPtr->flags |= ENTRY_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeTraceProc --
- *
- *	Mirrors the individual values of the tree object (they must also be
- *	listed in the widget's columns chain). This is because it must track and
- *	save the sizes of each individual data entry, rather than re-computing
- *	all the sizes each time the widget is redrawn.
- *
- *	This procedure is called by the Tree object when a node data value is
- *	set unset.
- *
- * Results:
- *	Returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TreeTraceProc(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    Blt_TreeNode node,			/* Node that has just been updated. */
-    Blt_TreeKey key,			/* Key of value that's been updated. */
-    unsigned int flags)
-{
-    Blt_HashEntry *hPtr;
-    TreeView *viewPtr = clientData; 
-    TreeViewColumn *cp;
-    TreeViewEntry *entryPtr;
-    TreeViewValue *valuePtr, *nextPtr, *lastPtr;
-    
-    hPtr = Blt_FindHashEntry(&viewPtr->entryTable, (char *)node);
-    if (hPtr == NULL) {
-	return TCL_OK;			/* Not a node that we're interested
-					 * in. */
-    }
-    entryPtr = Blt_GetHashValue(hPtr);
-    flags &= TREE_TRACE_WRITE | TREE_TRACE_READ | TREE_TRACE_UNSET;
-    switch (flags) {
-    case TREE_TRACE_WRITE:
-	hPtr = Blt_FindHashEntry(&viewPtr->columnTable, key);
-	if (hPtr == NULL) {
-	    return TCL_OK;		/* Data value isn't used by widget. */
-	}
-	cp = Blt_GetHashValue(hPtr);
-	if (cp != &viewPtr->treeColumn) {
-	    Blt_TreeView_AddValue(entryPtr, cp);
-	}
-	entryPtr->flags |= ENTRY_DIRTY;
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-	viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-	break;
-
-    case TREE_TRACE_UNSET:
-	lastPtr = NULL;
-	for(valuePtr = entryPtr->values; valuePtr != NULL; 
-	    valuePtr = nextPtr) {
-	    nextPtr = valuePtr->nextPtr;
-	    if (valuePtr->columnPtr->key == key) { 
-		Blt_TreeView_DestroyValue(viewPtr, valuePtr);
-		if (lastPtr == NULL) {
-		    entryPtr->values = nextPtr;
-		} else {
-		    lastPtr->nextPtr = nextPtr;
-		}
-		entryPtr->flags |= ENTRY_DIRTY;
-		Blt_TreeView_EventuallyRedraw(viewPtr);
-		viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-		break;
-	    }
-	    lastPtr = valuePtr;
-	}		
-	break;
-
-    default:
-	break;
-    }
-    return TCL_OK;
-}
-
-
-static void
-GetValueSize(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-	     TreeViewValue *valuePtr, TreeViewStyle *stylePtr)
-{
-    TreeViewColumn *cp;
-
-    cp = valuePtr->columnPtr;
-    valuePtr->width = valuePtr->height = 0;
-    if (entryPtr->flags & ENTRY_DIRTY) { /* Reparse the data. */
-	char *string;
-	TreeViewIcon icon;
-
-	Tcl_Obj *objPtr;
-	TreeViewStyle *newStylePtr;
-    
-	icon = NULL;
-	newStylePtr = NULL;
-	if (Blt_TreeView_GetData(entryPtr, valuePtr->columnPtr->key, &objPtr) 
-	    != TCL_OK) {
-	    return;			/* No data ??? */
-	}
-	string = Tcl_GetString(objPtr);
-	valuePtr->string = string;
-	if (string[0] == '@') {		/* Name of style or Tk image. */
-	    int objc;
-	    Tcl_Obj **objv;
-	    
-	    if ((Tcl_ListObjGetElements(viewPtr->interp, objPtr, &objc, 
-		&objv) != TCL_OK) || (objc < 1) || (objc > 2)) {
-		goto handleString;
-	    }
-	    if (objc > 0) {
-		const char *name;
-		
-		name = Tcl_GetString(objv[0]) + 1;
-		if (Blt_TreeView_GetStyle((Tcl_Interp *)NULL, viewPtr, name, 
-					 &newStylePtr) != TCL_OK) {
-		    icon = Blt_TreeView_GetIcon(viewPtr, name);
-		    if (icon == NULL) {
-			goto handleString;
-		    }
-		    /* Create a new style by the name of the image. */
-		    newStylePtr = Blt_TreeView_CreateStyle((Tcl_Interp *)NULL, 
-			viewPtr, STYLE_TEXTBOX, name);
-		    assert(newStylePtr);
-		    Blt_TreeView_UpdateStyleGCs(viewPtr, newStylePtr);
-		}
-		
-	    }
-	    if (valuePtr->stylePtr != NULL) {
-		Blt_TreeView_FreeStyle(viewPtr, valuePtr->stylePtr);
-	    }
-	    if (icon != NULL) {
-		Blt_TreeView_SetStyleIcon(viewPtr, newStylePtr, icon);
-	    }
-	    valuePtr->stylePtr = newStylePtr;
-	    valuePtr->string = (objc > 1) ? Tcl_GetString(objv[1]) : NULL;
-	}
-    }
- handleString:
-    stylePtr = CHOOSE(cp->stylePtr, valuePtr->stylePtr);
-    /* Measure the text string. */
-    (*stylePtr->classPtr->measProc)(viewPtr, stylePtr, valuePtr);
-    if (Blt_Tree_NodeId(entryPtr->node) == 6169) {
-	fprintf(stderr, "sizeof node is %lu %lu\n", 
-		(unsigned long)valuePtr->width, 
-		(unsigned long)valuePtr->height);
-    }
-}
-
-static void
-GetRowExtents(TreeView *viewPtr, TreeViewEntry *entryPtr, int *widthPtr, 
-	      int *heightPtr)
-{
-    TreeViewValue *valuePtr;
-    int valueWidth;			/* Width of individual value.  */
-    int width, height;			/* Compute dimensions of row. */
-    TreeViewStyle *stylePtr;
-
-    width = height = 0;
-    for (valuePtr = entryPtr->values; valuePtr != NULL; 
-	valuePtr = valuePtr->nextPtr) {
-	stylePtr = valuePtr->stylePtr;
-	if (stylePtr == NULL) {
-	    stylePtr = valuePtr->columnPtr->stylePtr;
-	}
-	if ((entryPtr->flags & ENTRY_DIRTY) || 
-	    (stylePtr->flags & STYLE_DIRTY)) {
-	    GetValueSize(viewPtr, entryPtr, valuePtr, stylePtr);
-	}
-	if (valuePtr->height > height) {
-	    height = valuePtr->height;
-	}
-	valueWidth = valuePtr->width;
-	width += valueWidth;
-    }	    
-    *widthPtr = width;
-    *heightPtr = height;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_NearestEntry --
- *
- *	Finds the entry closest to the given screen X-Y coordinates in the
- *	viewport.
- *
- * Results:
- *	Returns the pointer to the closest node.  If no node is visible (nodes
- *	may be hidden), NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-TreeViewEntry *
-Blt_TreeView_NearestEntry(TreeView *viewPtr, int x, int y, int selectOne)
-{
-    TreeViewEntry *lastPtr;
-    TreeViewEntry **p;
-
-    /*
-     * We implicitly can pick only visible entries.  So make sure that the
-     * tree exists.
-     */
-    if (viewPtr->nVisible == 0) {
-	return NULL;
-    }
-    if (y < viewPtr->titleHeight) {
-	return (selectOne) ? viewPtr->visibleArr[0] : NULL;
-    }
-    /*
-     * Since the entry positions were previously computed in world
-     * coordinates, convert Y-coordinate from screen to world coordinates too.
-     */
-    y = WORLDY(viewPtr, y);
-    lastPtr = viewPtr->visibleArr[0];
-    for (p = viewPtr->visibleArr; *p != NULL; p++) {
-	TreeViewEntry *entryPtr;
-
-	entryPtr = *p;
-	/*
-	 * If the start of the next entry starts beyond the point, use the last
-	 * entry.
-	 */
-	if (entryPtr->worldY > y) {
-	    return (selectOne) ? entryPtr : NULL;
-	}
-	if (y < (entryPtr->worldY + entryPtr->height)) {
-	    return entryPtr;		/* Found it. */
-	}
-	lastPtr = entryPtr;
-    }
-    return (selectOne) ? lastPtr : NULL;
-}
-
-
-ClientData
-Blt_TreeView_EntryTag(TreeView *viewPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;				/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->entryTagTable, string, &isNew);
-    return Blt_GetHashKey(&viewPtr->entryTagTable, hPtr);
-}
-
-ClientData
-Blt_TreeView_ButtonTag(TreeView *viewPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;				/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->buttonTagTable, string, &isNew);
-    return Blt_GetHashKey(&viewPtr->buttonTagTable, hPtr);
-}
-
-ClientData
-Blt_TreeView_ColumnTag(TreeView *viewPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;				/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->columnTagTable, string, &isNew);
-    return Blt_GetHashKey(&viewPtr->columnTagTable, hPtr);
-}
-
-#ifdef notdef
-ClientData
-TreeViewStyleTag(TreeView *viewPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;				/* Not used. */
-
-    hPtr = Blt_CreateHashEntry(&viewPtr->styleTagTable, string, &isNew);
-    return Blt_GetHashKey(&viewPtr->styleTagTable, hPtr);
-}
-#endif
-
-static void
-AddIdsToList(TreeView *viewPtr, Blt_List ids, const char *string, 
-	     TagProc *tagProc)
-{
-    int argc;
-    const char **argv;
-    
-    if (Tcl_SplitList((Tcl_Interp *)NULL, string, &argc, &argv) == TCL_OK) {
-	const char **p;
-
-	for (p = argv; *p != NULL; p++) {
-	    Blt_List_Append(ids, (*tagProc)(viewPtr, *p), 0);
-	}
-	Blt_Free(argv);
-    }
-}
-
-static void
-GetTags(
-    Blt_BindTable table,
-    ClientData object,			/* Object picked. */
-    ClientData context,			/* Context of object. */
-    Blt_List ids)			/* (out) List of binding ids to be
-					 * applied for this object. */
-{
-    TreeView *viewPtr;
-
-    viewPtr = Blt_GetBindingData(table);
-    if (context == (ClientData)ITEM_ENTRY_BUTTON) {
-	TreeViewEntry *entryPtr = object;
-
-	Blt_List_Append(ids, Blt_TreeView_ButtonTag(viewPtr, "Button"), 0);
-	if (entryPtr->tagsUid != NULL) {
-	    AddIdsToList(viewPtr, ids, entryPtr->tagsUid, Blt_TreeView_ButtonTag);
-	} else {
-	    Blt_List_Append(ids, Blt_TreeView_ButtonTag(viewPtr, "Entry"), 0);
-	    Blt_List_Append(ids, Blt_TreeView_ButtonTag(viewPtr, "all"), 0);
-	}
-    } else if (context == (ClientData)ITEM_COLUMN_TITLE) {
-	TreeViewColumn *cp = object;
-
-	Blt_List_Append(ids, (char *)cp, 0);
-	if (cp->tagsUid != NULL) {
-	    AddIdsToList(viewPtr, ids, cp->tagsUid, 
-			 Blt_TreeView_ColumnTag);
-	}
-    } else if (context == ITEM_COLUMN_RULE) {
-	Blt_List_Append(ids, Blt_TreeView_ColumnTag(viewPtr, "Rule"), 0);
-    } else {
-	TreeViewEntry *entryPtr = object;
-
-	Blt_List_Append(ids, (char *)entryPtr, 0);
-	if (entryPtr->tagsUid != NULL) {
-	    AddIdsToList(viewPtr, ids, entryPtr->tagsUid, Blt_TreeView_EntryTag);
-	} else if (context == ITEM_ENTRY){
-	    Blt_List_Append(ids, Blt_TreeView_EntryTag(viewPtr, "Entry"), 0);
-	    Blt_List_Append(ids, Blt_TreeView_EntryTag(viewPtr, "all"), 0);
-	} else {
-	    TreeViewValue *valuePtr = context;
-
-	    if (valuePtr != NULL) {
-		TreeViewStyle *stylePtr = valuePtr->stylePtr;
-
-		if (stylePtr == NULL) {
-		    stylePtr = valuePtr->columnPtr->stylePtr;
-		}
-		Blt_List_Append(ids, 
-	            Blt_TreeView_EntryTag(viewPtr, stylePtr->name), 0);
-		Blt_List_Append(ids, 
-		    Blt_TreeView_EntryTag(viewPtr, valuePtr->columnPtr->key), 0);
-		Blt_List_Append(ids, 
-		    Blt_TreeView_EntryTag(viewPtr, stylePtr->classPtr->className),
-		    0);
-#ifndef notdef
-		Blt_List_Append(ids, Blt_TreeView_EntryTag(viewPtr, "Entry"), 0);
-		Blt_List_Append(ids, Blt_TreeView_EntryTag(viewPtr, "all"), 0);
-#endif
-	    }
-	}
-    }
-}
-
-/*ARGSUSED*/
-static ClientData
-PickItem(
-    ClientData clientData,
-    int x, int y,			/* Screen coordinates of the test
-					 * point. */
-    ClientData *contextPtr)		/* (out) Context of item selected:
-					 * should be ITEM_ENTRY,
-					 * ITEM_ENTRY_BUTTON, ITEM_COLUMN_TITLE,
-					 * ITEM_COLUMN_RULE, or ITEM_STYLE. */
-{
-    TreeView *viewPtr = clientData;
-    TreeViewEntry *entryPtr;
-    TreeViewColumn *cp;
-
-    if (contextPtr != NULL) {
-	*contextPtr = NULL;
-    }
-    if (viewPtr->flags & DIRTY) {
-	/* Can't trust the selected entry if nodes have been added or
-	 * deleted. So recompute the layout. */
-	if (viewPtr->flags & LAYOUT_PENDING) {
-	    Blt_TreeView_ComputeLayout(viewPtr);
-	} 
-	ComputeVisibleEntries(viewPtr);
-    }
-    cp = Blt_TreeView_NearestColumn(viewPtr, x, y, contextPtr);
-    if ((*contextPtr != NULL) && (viewPtr->flags & TV_SHOW_COLUMN_TITLES)) {
-	return cp;
-    }
-    if (viewPtr->nVisible == 0) {
-	return NULL;
-    }
-    entryPtr = Blt_TreeView_NearestEntry(viewPtr, x, y, FALSE);
-    if (entryPtr == NULL) {
-	return NULL;
-    }
-    x = WORLDX(viewPtr, x);
-    y = WORLDY(viewPtr, y);
-    if (contextPtr != NULL) {
-	*contextPtr = ITEM_ENTRY;
-	if (cp != NULL) {
-	    TreeViewValue *valuePtr;
-
-	    valuePtr = Blt_TreeView_FindValue(entryPtr, cp);
-	    if (valuePtr != NULL) {
-		TreeViewStyle *stylePtr;
-		
-		stylePtr = valuePtr->stylePtr;
-		if (stylePtr == NULL) {
-		    stylePtr = valuePtr->columnPtr->stylePtr;
-		}
-		if ((stylePtr->classPtr->pickProc == NULL) ||
-		    ((*stylePtr->classPtr->pickProc)(entryPtr, valuePtr, 
-			stylePtr, x, y))) {
-		    *contextPtr = valuePtr;
-		} 
-	    }
-	}
-	if (entryPtr->flags & ENTRY_HAS_BUTTON) {
-	    TreeViewButton *buttonPtr = &viewPtr->button;
-	    int left, right, top, bottom;
-	    
-	    left = entryPtr->worldX + entryPtr->buttonX - BUTTON_PAD;
-	    right = left + buttonPtr->width + 2 * BUTTON_PAD;
-	    top = entryPtr->worldY + entryPtr->buttonY - BUTTON_PAD;
-	    bottom = top + buttonPtr->height + 2 * BUTTON_PAD;
-	    if ((x >= left) && (x < right) && (y >= top) && (y < bottom)) {
-		*contextPtr = (ClientData)ITEM_ENTRY_BUTTON;
-	    }
-	}
-    }
-    return entryPtr;
-}
-
-static void
-GetEntryExtents(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    int entryWidth, entryHeight;
-    int width, height;
-
-    /*
-     * FIXME: Use of DIRTY flag inconsistent.  When does it
-     *	      mean "dirty entry"? When does it mean "dirty column"?
-     *	      Does it matter? probably
-     */
-    if ((entryPtr->flags & ENTRY_DIRTY) || (viewPtr->flags & UPDATE)) {
-	Blt_Font font;
-	Blt_FontMetrics fontMetrics;
-	TreeViewIcon *icons;
-	const char *label;
-
-	entryPtr->iconWidth = entryPtr->iconHeight = 0;
-	icons = CHOOSE(viewPtr->icons, entryPtr->icons);
-	if (icons != NULL) {
-	    int i;
-	    
-	    for (i = 0; i < 2; i++) {
-		if (icons[i] == NULL) {
-		    break;
-		}
-		if (entryPtr->iconWidth < TreeView_IconWidth(icons[i])) {
-		    entryPtr->iconWidth = TreeView_IconWidth(icons[i]);
-		}
-		if (entryPtr->iconHeight < TreeView_IconHeight(icons[i])) {
-		    entryPtr->iconHeight = TreeView_IconHeight(icons[i]);
-		}
-	    }
-	}
-	if ((icons == NULL) || (icons[0] == NULL)) {
-	    entryPtr->iconWidth = DEF_ICON_WIDTH;
-	    entryPtr->iconHeight = DEF_ICON_HEIGHT;
-	}
-	entryPtr->iconWidth += 2 * ICON_PADX;
-	entryPtr->iconHeight += 2 * ICON_PADY;
-	entryHeight = MAX(entryPtr->iconHeight, viewPtr->button.height);
-	font = entryPtr->font;
-	if (font == NULL) {
-	    font = Blt_TreeView_GetStyleFont(viewPtr, 
-		viewPtr->treeColumn.stylePtr);
-	}
-	if (entryPtr->fullName != NULL) {
-	    Blt_Free(entryPtr->fullName);
-	    entryPtr->fullName = NULL;
-	}
-	if (entryPtr->textPtr != NULL) {
-	    Blt_Free(entryPtr->textPtr);
-	    entryPtr->textPtr = NULL;
-	}
-	
-	Blt_GetFontMetrics(font, &fontMetrics);
-	entryPtr->lineHeight = fontMetrics.linespace;
-	entryPtr->lineHeight += 2 * (FOCUS_WIDTH + LABEL_PADY + 
-				    viewPtr->selBW) + viewPtr->leader;
-	label = GETLABEL(entryPtr);
-	if (label[0] == '\0') {
-	    width = height = entryPtr->lineHeight;
-	} else {
-	    TextStyle ts;
-
-	    Blt_Ts_InitStyle(ts);
-	    Blt_Ts_SetFont(ts, font);
-	    
-	    if (viewPtr->flatView) {
-		Tcl_DString dString;
-
-		Blt_TreeView_GetFullName(viewPtr, entryPtr, TRUE, &dString);
-		entryPtr->fullName = 
-		    Blt_AssertStrdup(Tcl_DStringValue(&dString));
-		Tcl_DStringFree(&dString);
-		entryPtr->textPtr = Blt_Ts_CreateLayout(entryPtr->fullName, -1,
-			&ts);
-	    } else {
-		entryPtr->textPtr = Blt_Ts_CreateLayout(label, -1, &ts);
-	    }
-	    width = entryPtr->textPtr->width;
-	    height = entryPtr->textPtr->height;
-	}
-	width += 2 * (FOCUS_WIDTH + LABEL_PADX + viewPtr->selBW);
-	height += 2 * (FOCUS_WIDTH + LABEL_PADY + viewPtr->selBW);
-	width = ODD(width);
-	if (entryPtr->reqHeight > height) {
-	    height = entryPtr->reqHeight;
-	} 
-	height = ODD(height);
-	entryWidth = width;
-	if (entryHeight < height) {
-	    entryHeight = height;
-	}
-	entryPtr->labelWidth = width;
-	entryPtr->labelHeight = height;
-    } else {
-	entryHeight = entryPtr->labelHeight;
-	entryWidth = entryPtr->labelWidth;
-    }
-    /*  
-     * Find the maximum height of the data value entries. This also has the
-     * side effect of contributing the maximum width of the column.
-     */
-    GetRowExtents(viewPtr, entryPtr, &width, &height);
-    if (entryHeight < height) {
-	entryHeight = height;
-    }
-    entryPtr->width = entryWidth + COLUMN_PAD;
-    entryPtr->height = entryHeight + viewPtr->leader;
-    /*
-     * Force the height of the entry to an even number. This is to make the
-     * dots or the vertical line segments coincide with the start of the
-     * horizontal lines.
-     */
-    if (entryPtr->height & 0x01) {
-	entryPtr->height++;
-    }
-    entryPtr->flags &= ~ENTRY_DIRTY;
-}
-
-/*
- * TreeView Procedures
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTreeView --
- *
- *---------------------------------------------------------------------------
- */
-static TreeView *
-CreateTreeView(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Tk_Window tkwin;
-    TreeView *viewPtr;
-    char *name;
-    Tcl_DString dString;
-    int result;
-
-    name = Tcl_GetString(objPtr);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), name,
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return NULL;
-
-    }
-    Tk_SetClass(tkwin, "TreeView");
-
-    viewPtr = Blt_AssertCalloc(1, sizeof(TreeView));
-    viewPtr->tkwin = tkwin;
-    viewPtr->display = Tk_Display(tkwin);
-    viewPtr->interp = interp;
-    viewPtr->flags = (HIDE_ROOT | TV_SHOW_COLUMN_TITLES | DIRTY | 
-		      LAYOUT_PENDING | REPOPULATE);
-    viewPtr->leader = 0;
-    viewPtr->dashes = 1;
-    viewPtr->highlightWidth = 2;
-    viewPtr->selBW = 1;
-    viewPtr->borderWidth = 2;
-    viewPtr->relief = TK_RELIEF_SUNKEN;
-    viewPtr->selRelief = TK_RELIEF_FLAT;
-    viewPtr->scrollMode = BLT_SCROLL_MODE_HIERBOX;
-    viewPtr->selectMode = SELECT_MODE_SINGLE;
-    viewPtr->button.closeRelief = viewPtr->button.openRelief = TK_RELIEF_SOLID;
-    viewPtr->reqWidth = 200;
-    viewPtr->reqHeight = 400;
-    viewPtr->xScrollUnits = viewPtr->yScrollUnits = 20;
-    viewPtr->lineWidth = 1;
-    viewPtr->button.borderWidth = 1;
-    viewPtr->columns = Blt_Chain_Create();
-    viewPtr->buttonFlags = BUTTON_AUTO;
-    viewPtr->selected = Blt_Chain_Create();
-    viewPtr->userStyles = Blt_Chain_Create();
-    viewPtr->sortColumnPtr = &viewPtr->treeColumn;
-    Blt_InitHashTableWithPool(&viewPtr->entryTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&viewPtr->columnTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&viewPtr->iconTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&viewPtr->selectTable, BLT_ONE_WORD_KEYS);
-    Blt_InitHashTable(&viewPtr->uidTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&viewPtr->styleTable, BLT_STRING_KEYS);
-    viewPtr->bindTable = Blt_CreateBindingTable(interp, tkwin, viewPtr, PickItem, 
-	GetTags);
-    Blt_InitHashTable(&viewPtr->entryTagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&viewPtr->columnTagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&viewPtr->buttonTagTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&viewPtr->styleTagTable, BLT_STRING_KEYS);
-
-    viewPtr->entryPool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    viewPtr->valuePool = Blt_PoolCreate(BLT_FIXED_SIZE_ITEMS);
-    Blt_SetWindowInstanceData(tkwin, viewPtr);
-    viewPtr->cmdToken = Tcl_CreateObjCommand(interp, Tk_PathName(viewPtr->tkwin), 
-	Blt_TreeView_WidgetInstCmd, viewPtr, WidgetInstCmdDeleteProc);
-
-    Tk_CreateSelHandler(viewPtr->tkwin, XA_PRIMARY, XA_STRING, SelectionProc,
-	viewPtr, XA_STRING);
-    Tk_CreateEventHandler(viewPtr->tkwin, ExposureMask | StructureNotifyMask |
-	FocusChangeMask, TreeViewEventProc, viewPtr);
-    /* 
-     * Create a default style. This must exist before we can create the
-     * treeview column.
-     */  
-    viewPtr->stylePtr = Blt_TreeView_CreateStyle(interp, viewPtr, STYLE_TEXTBOX,
-	"text");
-    if (viewPtr->stylePtr == NULL) {
-	return NULL;
-    }
-    /*
-     * By default create a tree. The name will be the same as the widget
-     * pathname.
-     */
-    viewPtr->tree = Blt_Tree_Open(interp, Tk_PathName(viewPtr->tkwin), TREE_CREATE);
-    if (viewPtr->tree == NULL) {
-	return NULL;
-    }
-    /* Create a default column to display the view of the tree. */
-    Tcl_DStringInit(&dString);
-    Tcl_DStringAppend(&dString, "BLT TreeView ", -1);
-    Tcl_DStringAppend(&dString, Tk_PathName(viewPtr->tkwin), -1);
-    result = Blt_TreeView_CreateColumn(viewPtr, &viewPtr->treeColumn, 
-				      Tcl_DStringValue(&dString), "");
-    Tcl_DStringFree(&dString);
-    if (result != TCL_OK) {
-	return NULL;
-    }
-    Blt_Chain_Append(viewPtr->columns, &viewPtr->treeColumn);
-    return viewPtr;
-}
-
-static void
-TeardownEntries(TreeView *viewPtr)
-{
-    Blt_HashSearch iter;
-    Blt_HashEntry *hPtr;
-
-    /* Release the current tree, removing any entry fields. */
-    for (hPtr = Blt_FirstHashEntry(&viewPtr->entryTable, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	TreeViewEntry *entryPtr;
-
-	entryPtr = Blt_GetHashValue(hPtr);
-	DestroyEntry((ClientData)entryPtr);
-    }
-    Blt_DeleteHashTable(&viewPtr->entryTable);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyTreeView --
- *
- * 	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release to
- * 	clean up the internal structure of a TreeView at a safe time (when
- * 	no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyTreeView(DestroyData dataPtr)	/* Pointer to the widget record. */
-{
-    Blt_ChainLink link;
-    TreeView *viewPtr = (TreeView *)dataPtr;
-    TreeViewButton *buttonPtr;
-    TreeViewStyle *stylePtr;
-
-    TeardownEntries(viewPtr);
-    if (viewPtr->tree != NULL) {
-	Blt_Tree_Close(viewPtr->tree);
-    }
-    bltTreeViewTreeOption.clientData = viewPtr;
-    bltTreeViewIconsOption.clientData = viewPtr;
-    Blt_FreeOptions(bltTreeViewSpecs, (char *)viewPtr, viewPtr->display, 0);
-    if (viewPtr->tkwin != NULL) {
-	Tk_DeleteSelHandler(viewPtr->tkwin, XA_PRIMARY, XA_STRING);
-    }
-    if (viewPtr->lineGC != NULL) {
-	Tk_FreeGC(viewPtr->display, viewPtr->lineGC);
-    }
-    if (viewPtr->focusGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, viewPtr->focusGC);
-    }
-    if (viewPtr->selGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, viewPtr->selGC);
-    }
-    if (viewPtr->visibleArr != NULL) {
-	Blt_Free(viewPtr->visibleArr);
-    }
-    if (viewPtr->flatArr != NULL) {
-	Blt_Free(viewPtr->flatArr);
-    }
-    if (viewPtr->levelInfo != NULL) {
-	Blt_Free(viewPtr->levelInfo);
-    }
-    buttonPtr = &viewPtr->button;
-    if (buttonPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, buttonPtr->activeGC);
-    }
-    if (buttonPtr->normalGC != NULL) {
-	Tk_FreeGC(viewPtr->display, buttonPtr->normalGC);
-    }
-    if (viewPtr->stylePtr != NULL) {
-	Blt_TreeView_FreeStyle(viewPtr, viewPtr->stylePtr);
-    }
-    Blt_TreeView_DestroyColumns(viewPtr);
-    Blt_DestroyBindingTable(viewPtr->bindTable);
-    Blt_Chain_Destroy(viewPtr->selected);
-    Blt_DeleteHashTable(&viewPtr->entryTagTable);
-    Blt_DeleteHashTable(&viewPtr->columnTagTable);
-    Blt_DeleteHashTable(&viewPtr->buttonTagTable);
-    Blt_DeleteHashTable(&viewPtr->styleTagTable);
-
-    /* Remove any user-specified style that might remain. */
-    for (link = Blt_Chain_FirstLink(viewPtr->userStyles); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	stylePtr = Blt_Chain_GetValue(link);
-	stylePtr->link = NULL;
-	Blt_TreeView_FreeStyle(viewPtr, stylePtr);
-    }
-    Blt_Chain_Destroy(viewPtr->userStyles);
-    if (viewPtr->comboWin != NULL) {
-	Tk_DestroyWindow(viewPtr->comboWin);
-    }
-    Blt_DeleteHashTable(&viewPtr->styleTable);
-    Blt_DeleteHashTable(&viewPtr->selectTable);
-    Blt_DeleteHashTable(&viewPtr->uidTable);
-    Blt_PoolDestroy(viewPtr->entryPool);
-    Blt_PoolDestroy(viewPtr->valuePool);
-    DumpIconTable(viewPtr);
-    Blt_Free(viewPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeViewEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various events on
- * 	treeview widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get cleaned up.
- *	When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TreeViewEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    TreeView *viewPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    Blt_TreeView_EventuallyRedraw(viewPtr);
-	    Blt_PickCurrentItem(viewPtr->bindTable);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    if (eventPtr->type == FocusIn) {
-		viewPtr->flags |= FOCUS;
-	    } else {
-		viewPtr->flags &= ~FOCUS;
-	    }
-	    Blt_TreeView_EventuallyRedraw(viewPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	if (viewPtr->tkwin != NULL) {
-	    viewPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(viewPtr->interp, viewPtr->cmdToken);
-	}
-	if (viewPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayTreeView, viewPtr);
-	}
-	if (viewPtr->flags & TV_SELECT_PENDING) {
-	    Tcl_CancelIdleCall(Blt_TreeView_SelectCmdProc, viewPtr);
-	}
-	Tcl_EventuallyFree(viewPtr, DestroyTreeView);
-    }
-}
-
-/* Selection Procedures */
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionProc --
- *
- *	This procedure is called back by Tk when the selection is requested by
- *	someone.  It returns part or all of the selection in a buffer provided
- *	by the caller.
- *
- * Results:
- *	The return value is the number of non-NULL bytes stored at buffer.
- *	Buffer is filled (or partially filled) with a NUL-terminated string
- *	containing part or all of the selection, as given by offset and
- *	maxBytes.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectionProc(
-    ClientData clientData,		/* Information about the widget. */
-    int offset,				/* Offset within selection of first
-					 * character to be returned. */
-    char *buffer,			/* Location in which to place
-					 * selection. */
-    int maxBytes)			/* Maximum number of bytes to place at
-					 * buffer, not including terminating
-					 * NULL character. */
-{
-    Tcl_DString dString;
-    TreeView *viewPtr = clientData;
-    TreeViewEntry *entryPtr;
-    int size;
-
-    if ((viewPtr->flags & TV_SELECT_EXPORT) == 0) {
-	return -1;
-    }
-    /*
-     * Retrieve the names of the selected entries.
-     */
-    Tcl_DStringInit(&dString);
-    if (viewPtr->flags & TV_SELECT_SORTED) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(viewPtr->selected); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    entryPtr = Blt_Chain_GetValue(link);
-	    Tcl_DStringAppend(&dString, GETLABEL(entryPtr), -1);
-	    Tcl_DStringAppend(&dString, "\n", -1);
-	}
-    } else {
-	for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK)) {
-	    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-		Tcl_DStringAppend(&dString, GETLABEL(entryPtr), -1);
-		Tcl_DStringAppend(&dString, "\n", -1);
-	    }
-	}
-    }
-    size = Tcl_DStringLength(&dString) - offset;
-    strncpy(buffer, Tcl_DStringValue(&dString) + offset, maxBytes);
-    Tcl_DStringFree(&dString);
-    buffer[maxBytes] = '\0';
-    return (size > maxBytes) ? maxBytes : size;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WidgetInstCmdDeleteProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If the
- *	widget isn't already in the process of being destroyed, this command
- *	destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-WidgetInstCmdDeleteProc(ClientData clientData)
-{
-    TreeView *viewPtr = clientData;
-
-    /*
-     * This procedure could be invoked either because the window was destroyed
-     * and the command was then deleted (in which case tkwin is NULL) or
-     * because the command was deleted, and then this procedure destroys the
-     * widget.
-     */
-    if (viewPtr->tkwin != NULL) {
-	Tk_Window tkwin;
-
-	tkwin = viewPtr->tkwin;
-	viewPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_UpdateWidget --
- *
- *	Updates the GCs and other information associated with the treeview
- *	widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is returned,
- *	then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for viewPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TreeView_UpdateWidget(Tcl_Interp *interp, TreeView *viewPtr)	
-{
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    /*
-     * GC for dotted vertical line.
-     */
-    gcMask = (GCForeground | GCLineWidth);
-    gcValues.foreground = viewPtr->lineColor->pixel;
-    gcValues.line_width = viewPtr->lineWidth;
-    if (viewPtr->dashes > 0) {
-	gcMask |= (GCLineStyle | GCDashList);
-	gcValues.line_style = LineOnOffDash;
-	gcValues.dashes = viewPtr->dashes;
-    }
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (viewPtr->lineGC != NULL) {
-	Tk_FreeGC(viewPtr->display, viewPtr->lineGC);
-    }
-    viewPtr->lineGC = newGC;
-
-    /*
-     * GC for active label. Dashed outline.
-     */
-    gcMask = GCForeground | GCLineStyle;
-    gcValues.foreground = viewPtr->focusColor->pixel;
-    gcValues.line_style = (LineIsDashed(viewPtr->focusDashes))
-	? LineOnOffDash : LineSolid;
-    newGC = Blt_GetPrivateGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(viewPtr->focusDashes)) {
-	viewPtr->focusDashes.offset = 2;
-	Blt_SetDashes(viewPtr->display, newGC, &viewPtr->focusDashes);
-    }
-    if (viewPtr->focusGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, viewPtr->focusGC);
-    }
-    viewPtr->focusGC = newGC;
-
-    /*
-     * GC for selection. Dashed outline.
-     */
-    gcMask = GCForeground | GCLineStyle;
-    gcValues.foreground = viewPtr->selFgColor->pixel;
-    gcValues.line_style = (LineIsDashed(viewPtr->focusDashes))
-	? LineOnOffDash : LineSolid;
-    newGC = Blt_GetPrivateGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (LineIsDashed(viewPtr->focusDashes)) {
-	viewPtr->focusDashes.offset = 2;
-	Blt_SetDashes(viewPtr->display, newGC, &viewPtr->focusDashes);
-    }
-    if (viewPtr->selGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, viewPtr->selGC);
-    }
-    viewPtr->selGC = newGC;
-
-    Blt_TreeView_ConfigureButtons(viewPtr);
-    viewPtr->inset = viewPtr->highlightWidth + viewPtr->borderWidth + INSET_PAD;
-
-    /*
-     * If the tree object was changed, we need to setup the new one.
-     */
-    if (Blt_ConfigModified(bltTreeViewSpecs, "-tree", (char *)NULL)) {
-	TeardownEntries(viewPtr);
-	Blt_InitHashTableWithPool(&viewPtr->entryTable, BLT_ONE_WORD_KEYS);
-	Blt_TreeView_ClearSelection(viewPtr);
-	if (Blt_Tree_Attach(interp, viewPtr->tree, viewPtr->treeName) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	viewPtr->flags |= REPOPULATE;
-    }
-
-    /*
-     * These options change the layout of the box.  Mark the widget for update.
-     */
-    if (Blt_ConfigModified(bltTreeViewSpecs, "-font", 
-	"-linespacing", "-*width", "-height", "-hide*", "-tree", "-flat", 
-	(char *)NULL)) {
-	viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    }
-    /*
-     * If the tree view was changed, mark all the nodes dirty (we'll be
-     * switching back to either the full path name or the label) and free the
-     * array representing the flattened view of the tree.
-     */
-    if (Blt_ConfigModified(bltTreeViewSpecs, "-hideleaves", "-flat",
-			      (char *)NULL)) {
-	TreeViewEntry *entryPtr;
-	
-	viewPtr->flags |= DIRTY;
-	/* Mark all entries dirty. */
-	for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextEntry(entryPtr, 0)) {
-	    entryPtr->flags |= ENTRY_DIRTY;
-	}
-	if ((!viewPtr->flatView) && (viewPtr->flatArr != NULL)) {
-	    Blt_Free(viewPtr->flatArr);
-	    viewPtr->flatArr = NULL;
-	}
-    }
-
-    if (viewPtr->flags & REPOPULATE) {
-	Blt_TreeNode root;
-
-	Blt_Tree_CreateEventHandler(viewPtr->tree, TREE_NOTIFY_ALL, 
-		TreeEventProc, viewPtr);
-	TraceColumns(viewPtr);
-	root = Blt_Tree_RootNode(viewPtr->tree);
-
-	/* Automatically add view-entry values to the new tree. */
-	Blt_Tree_Apply(root, CreateApplyProc, viewPtr);
-	viewPtr->focusPtr = viewPtr->rootPtr = 
-	    Blt_TreeView_NodeToEntry(viewPtr,root);
-	viewPtr->selMarkPtr = viewPtr->selAnchorPtr = NULL;
-	Blt_SetFocusItem(viewPtr->bindTable, viewPtr->rootPtr, ITEM_ENTRY);
-
-	/* Automatically open the root node. */
-	if (Blt_TreeView_OpenEntry(viewPtr, viewPtr->rootPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (viewPtr->flags & TV_NEW_TAGS) {
-	    Blt_Tree_NewTagTable(viewPtr->tree);
-	}
-	viewPtr->flags &= ~REPOPULATE;
-    }
-
-    if (Blt_ConfigModified(bltTreeViewSpecs, "-font", "-color", 
-	(char *)NULL)) {
-	Blt_TreeView_UpdateColumnGCs(viewPtr, &viewPtr->treeColumn);
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResetCoordinates --
- *
- *	Determines the maximum height of all visible entries.
- *
- *	1. Sets the worldY coordinate for all mapped/open entries.
- *	2. Determines if entry needs a button.
- *	3. Collects the minimum height of open/mapped entries. (Do for all
- *	   entries upon insert).
- *	4. Figures out horizontal extent of each entry (will be width of 
- *	   tree view column).
- *	5. Collects maximum icon size for each level.
- *	6. The height of its vertical line
- *
- * Results:
- *	Returns 1 if beyond the last visible entry, 0 otherwise.
- *
- * Side effects:
- *	The array of visible nodes is filled.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ResetCoordinates(TreeView *viewPtr, TreeViewEntry *entryPtr, int *yPtr, 
-		 int *indexPtr)
-{
-    int depth, height;
-
-    entryPtr->worldY = -1;
-    entryPtr->vertLineLength = -1;
-    if ((entryPtr != viewPtr->rootPtr) && 
-	(Blt_TreeView_EntryIsHidden(entryPtr))) {
-	return;				/* If the entry is hidden, then do
-					 * nothing. */
-    }
-    entryPtr->worldY = *yPtr;
-    height = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-		  viewPtr->button.height);
-    entryPtr->vertLineLength = -(*yPtr + height / 2);
-    *yPtr += entryPtr->height;
-    entryPtr->flatIndex = *indexPtr;
-    (*indexPtr)++;
-    depth = DEPTH(viewPtr, entryPtr->node) + 1;
-    if (viewPtr->levelInfo[depth].labelWidth < entryPtr->labelWidth) {
-	viewPtr->levelInfo[depth].labelWidth = entryPtr->labelWidth;
-    }
-    if (viewPtr->levelInfo[depth].iconWidth < entryPtr->iconWidth) {
-	viewPtr->levelInfo[depth].iconWidth = entryPtr->iconWidth;
-    }
-    viewPtr->levelInfo[depth].iconWidth |= 0x01;
-    if ((entryPtr->flags & ENTRY_CLOSED) == 0) {
-	TreeViewEntry *bottomPtr, *childPtr;
-
-	bottomPtr = entryPtr;
-	for (childPtr = Blt_TreeView_FirstChild(entryPtr, ENTRY_HIDE); 
-	     childPtr != NULL; 
-	     childPtr = Blt_TreeView_NextSibling(childPtr, ENTRY_HIDE)){
-	    ResetCoordinates(viewPtr, childPtr, yPtr, indexPtr);
-	    bottomPtr = childPtr;
-	}
-	height = MAX3(bottomPtr->lineHeight, bottomPtr->iconHeight, 
-		      viewPtr->button.height);
-	entryPtr->vertLineLength += bottomPtr->worldY + height / 2;
-    }
-}
-
-static void
-AdjustColumns(TreeView *viewPtr)
-{
-    Blt_ChainLink link;
-    TreeViewColumn *cp;
-    double weight;
-    int nOpen;
-    int size, avail, ration, growth;
-
-    growth = VPORTWIDTH(viewPtr) - viewPtr->worldWidth;
-    nOpen = 0;
-    weight = 0.0;
-    /* Find out how many columns still have space available */
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	cp = Blt_Chain_GetValue(link);
-	if ((cp->hidden) || 
-	    (cp->weight == 0.0) || 
-	    (cp->width >= cp->max) || 
-	    (cp->reqWidth > 0)) {
-	    continue;
-	}
-	nOpen++;
-	weight += cp->weight;
-    }
-
-    while ((nOpen > 0) && (weight > 0.0) && (growth > 0)) {
-	ration = (int)(growth / weight);
-	if (ration == 0) {
-	    ration = 1;
-	}
-	for (link = Blt_Chain_FirstLink(viewPtr->columns); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    cp = Blt_Chain_GetValue(link);
-	    if ((cp->hidden) || 
-		(cp->weight == 0.0) ||
-		(cp->width >= cp->max) || 
-		(cp->reqWidth > 0)) {
-		continue;
-	    }
-	    size = (int)(ration * cp->weight);
-	    if (size > growth) {
-		size = growth; 
-	    }
-	    avail = cp->max - cp->width;
-	    if (size > avail) {
-		size = avail;
-		nOpen--;
-		weight -= cp->weight;
-	    }
-	    growth -= size;
-	    cp->width += size;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeFlatLayout --
- *
- *	Recompute the layout when entries are opened/closed, inserted/deleted,
- *	or when text attributes change (such as font, linespacing).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The world coordinates are set for all the opened entries.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeFlatLayout(TreeView *viewPtr)
-{
-    Blt_ChainLink link;
-    TreeViewColumn *cp;
-    TreeViewEntry **p;
-    TreeViewEntry *entryPtr;
-    int count;
-    int maxX;
-    int y;
-
-    /* 
-     * Pass 1:	Reinitialize column sizes and loop through all nodes. 
-     *
-     *		1. Recalculate the size of each entry as needed. 
-     *		2. The maximum depth of the tree. 
-     *		3. Minimum height of an entry.  Dividing this by the
-     *		   height of the widget gives a rough estimate of the 
-     *		   maximum number of visible entries.
-     *		4. Build an array to hold level information to be filled
-     *		   in on pass 2.
-     */
-    if (viewPtr->flags & (DIRTY | UPDATE)) {
-	int position;
-
-	/* Reset the positions of all the columns and initialize the column used
-	 * to track the widest value. */
-	position = 1;
-	for (link = Blt_Chain_FirstLink(viewPtr->columns); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    cp = Blt_Chain_GetValue(link);
-	    cp->maxWidth = 0;
-	    cp->max = SHRT_MAX;
-	    if (cp->reqMax > 0) {
-		cp->max = cp->reqMax;
-	    }
-	    cp->position = position;
-	    position++;
-	}
-
-	/* If the view needs to be resorted, free the old view. */
-	if ((viewPtr->flags & (DIRTY|RESORT|SORT_PENDING|TV_SORT_AUTO)) && 
-	     (viewPtr->flatArr != NULL)) {
-	    Blt_Free(viewPtr->flatArr);
-	    viewPtr->flatArr = NULL;
-	}
-
-	/* Recreate the flat view of all the open and not-hidden entries. */
-	if (viewPtr->flatArr == NULL) {
-	    count = 0;
-	    /* Count the number of open entries to allocate for the array. */
-	    for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK)) {
-		if ((viewPtr->flags & HIDE_ROOT) && 
-		    (entryPtr == viewPtr->rootPtr)) {
-		    continue;
-		}
-		count++;
-	    }
-	    viewPtr->nEntries = count;
-
-	    /* Allocate an array for the flat view. */
-	    viewPtr->flatArr = Blt_AssertCalloc((count + 1), 
-		sizeof(TreeViewEntry *));
-	    /* Fill the array with open and not-hidden entries */
-	    p = viewPtr->flatArr;
-	    for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK)) {
-		if ((viewPtr->flags & HIDE_ROOT) && 
-		    (entryPtr == viewPtr->rootPtr)) {
-		    continue;
-		}
-		*p++ = entryPtr;
-	    }
-	    *p = NULL;
-	    viewPtr->flags &= ~SORTED;		/* Indicate the view isn't
-						 * sorted. */
-	}
-
-	/* Collect the extents of the entries in the flat view. */
-	viewPtr->depth = 0;
-	viewPtr->minHeight = SHRT_MAX;
-	for (p = viewPtr->flatArr; *p != NULL; p++) {
-	    entryPtr = *p;
-	    GetEntryExtents(viewPtr, entryPtr);
-	    if (viewPtr->minHeight > entryPtr->height) {
-		viewPtr->minHeight = entryPtr->height;
-	    }
-	    entryPtr->flags &= ~ENTRY_HAS_BUTTON;
-	}
-	if (viewPtr->levelInfo != NULL) {
-	    Blt_Free(viewPtr->levelInfo);
-	}
-	viewPtr->levelInfo = 
-	    Blt_AssertCalloc(viewPtr->depth+2, sizeof(LevelInfo));
-	viewPtr->flags &= ~(DIRTY | UPDATE | RESORT);
-	if (viewPtr->flags & TV_SORT_AUTO) {
-	    /* If we're auto-sorting, schedule the view to be resorted. */
-	    viewPtr->flags |= SORT_PENDING;
-	}
-    } 
-
-    if (viewPtr->flags & SORT_PENDING) {
-	Blt_TreeView_SortFlatView(viewPtr);
-    }
-
-    viewPtr->levelInfo[0].labelWidth = viewPtr->levelInfo[0].x = 
-	    viewPtr->levelInfo[0].iconWidth = 0;
-    /* 
-     * Pass 2:	Loop through all open/mapped nodes. 
-     *
-     *		1. Set world y-coordinates for entries. We must defer
-     *		   setting the x-coordinates until we know the maximum 
-     *		   icon sizes at each level.
-     *		2. Compute the maximum depth of the tree. 
-     *		3. Build an array to hold level information.
-     */
-    y = 0;			
-    count = 0;
-    for(p = viewPtr->flatArr; *p != NULL; p++) {
-	entryPtr = *p;
-	entryPtr->flatIndex = count++;
-	entryPtr->worldY = y;
-	entryPtr->vertLineLength = 0;
-	y += entryPtr->height;
-	if (viewPtr->levelInfo[0].labelWidth < entryPtr->labelWidth) {
-	    viewPtr->levelInfo[0].labelWidth = entryPtr->labelWidth;
-	}
-	if (viewPtr->levelInfo[0].iconWidth < entryPtr->iconWidth) {
-	    viewPtr->levelInfo[0].iconWidth = entryPtr->iconWidth;
-	}
-    }
-    viewPtr->levelInfo[0].iconWidth |= 0x01;
-    viewPtr->worldHeight = y;		/* Set the scroll height of the
-					 * hierarchy. */
-    if (viewPtr->worldHeight < 1) {
-	viewPtr->worldHeight = 1;
-    }
-    maxX = viewPtr->levelInfo[0].iconWidth + viewPtr->levelInfo[0].labelWidth;
-    viewPtr->treeColumn.maxWidth = maxX;
-    viewPtr->treeWidth = maxX;
-    viewPtr->flags |= VIEWPORT;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeTreeLayout --
- *
- *	Recompute the layout when entries are opened/closed, inserted/deleted,
- *	or when text attributes change (such as font, linespacing).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The world coordinates are set for all the opened entries.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeTreeLayout(TreeView *viewPtr)
-{
-    int y;
-    int index;
-    /* 
-     * Pass 1:	Reinitialize column sizes and loop through all nodes. 
-     *
-     *		1. Recalculate the size of each entry as needed. 
-     *		2. The maximum depth of the tree. 
-     *		3. Minimum height of an entry.  Dividing this by the
-     *		   height of the widget gives a rough estimate of the 
-     *		   maximum number of visible entries.
-     *		4. Build an array to hold level information to be filled
-     *		   in on pass 2.
-     */
-    if (viewPtr->flags & DIRTY) {
-	Blt_ChainLink link;
-	TreeViewEntry *ep;
-	int position;
-
-	position = 1;
-	for (link = Blt_Chain_FirstLink(viewPtr->columns); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    TreeViewColumn *cp;
-
-	    cp = Blt_Chain_GetValue(link);
-	    cp->maxWidth = 0;
-	    cp->max = SHRT_MAX;
-	    if (cp->reqMax > 0) {
-		cp->max = cp->reqMax;
-	    }
-	    cp->position = position;
-	    position++;
-	}
-	viewPtr->minHeight = SHRT_MAX;
-	viewPtr->depth = 0;
-	for (ep = viewPtr->rootPtr; ep != NULL; 
-	     ep = Blt_TreeView_NextEntry(ep, 0)){
-	    GetEntryExtents(viewPtr, ep);
-	    if (viewPtr->minHeight > ep->height) {
-		viewPtr->minHeight = ep->height;
-	    }
-	    /* 
-	     * Determine if the entry should display a button (indicating that
-	     * it has children) and mark the entry accordingly.
-	     */
-	    ep->flags &= ~ENTRY_HAS_BUTTON;
-	    if (ep->flags & BUTTON_SHOW) {
-		ep->flags |= ENTRY_HAS_BUTTON;
-	    } else if (ep->flags & BUTTON_AUTO) {
-		if (viewPtr->flags & TV_HIDE_LEAVES) {
-		    /* Check that a non-leaf child exists */
-		    if (Blt_TreeView_FirstChild(ep, ENTRY_HIDE) != NULL) {
-			ep->flags |= ENTRY_HAS_BUTTON;
-		    }
-		} else if (!Blt_Tree_IsLeaf(ep->node)) {
-		    ep->flags |= ENTRY_HAS_BUTTON;
-		}
-	    }
-	    /* Determine the depth of the tree. */
-	    if (viewPtr->depth < DEPTH(viewPtr, ep->node)) {
-		viewPtr->depth = DEPTH(viewPtr, ep->node);
-	    }
-	}
-	if (viewPtr->flags & SORT_PENDING) {
-	    Blt_TreeView_SortView(viewPtr);
-	}
-	if (viewPtr->levelInfo != NULL) {
-	    Blt_Free(viewPtr->levelInfo);
-	}
-	viewPtr->levelInfo = Blt_AssertCalloc(viewPtr->depth+2, 
-					      sizeof(LevelInfo));
-	viewPtr->flags &= ~(DIRTY | RESORT);
-    }
-    { 
-	size_t i;
-
-	for (i = 0; i <= (viewPtr->depth + 1); i++) {
-	    viewPtr->levelInfo[i].labelWidth = viewPtr->levelInfo[i].x = 
-		viewPtr->levelInfo[i].iconWidth = 0;
-	}
-    }
-    /* 
-     * Pass 2:	Loop through all open/mapped nodes. 
-     *
-     *		1. Set world y-coordinates for entries. We must defer
-     *		   setting the x-coordinates until we know the maximum 
-     *		   icon sizes at each level.
-     *		2. Compute the maximum depth of the tree. 
-     *		3. Build an array to hold level information.
-     */
-    y = 0;
-    if (viewPtr->flags & HIDE_ROOT) {
-	/* If the root entry is to be hidden, cheat by offsetting the
-	 * y-coordinates by the height of the entry. */
-	y = -(viewPtr->rootPtr->height);
-    } 
-    index = 0;
-    ResetCoordinates(viewPtr, viewPtr->rootPtr, &y, &index);
-    viewPtr->worldHeight = y;		/* Set the scroll height of the
-					 * hierarchy. */
-    if (viewPtr->worldHeight < 1) {
-	viewPtr->worldHeight = 1;
-    }
-    {
-	int maxX;
-	int sum;
-	size_t i;
-
-	sum = maxX = 0;
-	i = 0;
-	for (/*empty*/; i <= (viewPtr->depth + 1); i++) {
-	    int x;
-
-	    sum += viewPtr->levelInfo[i].iconWidth;
-	    if (i <= viewPtr->depth) {
-		viewPtr->levelInfo[i + 1].x = sum;
-	    }
-	    x = sum;
-	    if (((viewPtr->flags & HIDE_ROOT) == 0) || (i > 1)) {
-		x += viewPtr->levelInfo[i].labelWidth;
-	    }
-	    if (x > maxX) {
-		maxX = x;
-	    }
-	}
-	viewPtr->treeColumn.maxWidth = maxX;
-	viewPtr->treeWidth = maxX;
-    }
-}
-
-static void
-LayoutColumns(TreeView *viewPtr)
-{
-    Blt_ChainLink link;
-    int sum;
-
-    /* The width of the widget (in world coordinates) is the sum of the column
-     * widths. */
-
-    viewPtr->worldWidth = viewPtr->titleHeight = 0;
-    sum = 0;
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	TreeViewColumn *cp;
-
-	cp = Blt_Chain_GetValue(link);
-	cp->width = 0;
-	if (!cp->hidden) {
-	    if ((viewPtr->flags & TV_SHOW_COLUMN_TITLES) &&
-		(viewPtr->titleHeight < cp->titleHeight)) {
-		viewPtr->titleHeight = cp->titleHeight;
-	    }
-	    if (cp->reqWidth > 0) {
-		cp->width = cp->reqWidth;
-	    } else {
-		/* The computed width of a column is the maximum of the title
-		 * width and the widest entry. */
-		cp->width = MAX(cp->titleWidth, cp->maxWidth);
-
-		/* Check that the width stays within any constraints that have
-		 * been set. */
-		if ((cp->reqMin > 0) && (cp->reqMin > cp->width)) {
-		    cp->width = cp->reqMin;
-		}
-		if ((cp->reqMax > 0) && (cp->reqMax < cp->width)) {
-		    cp->width = cp->reqMax;
-		}
-	    }
-	    cp->width += PADDING(cp->pad) + 2 * cp->borderWidth;
-	}
-	cp->worldX = sum;
-	sum += cp->width;
-    }
-    viewPtr->worldWidth = sum;
-    if (VPORTWIDTH(viewPtr) > sum) {
-	AdjustColumns(viewPtr);
-    }
-    sum = 0;
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	TreeViewColumn *cp;
-
-	cp = Blt_Chain_GetValue(link);
-	cp->worldX = sum;
-	sum += cp->width;
-    }
-    if (viewPtr->titleHeight > 0) {
-	/* If any headings are displayed, add some extra padding to the
-	 * height. */
-	viewPtr->titleHeight += 4;
-    }
-    /* viewPtr->worldWidth += 10; */
-    if (viewPtr->yScrollUnits < 1) {
-	viewPtr->yScrollUnits = 1;
-    }
-    if (viewPtr->xScrollUnits < 1) {
-	viewPtr->xScrollUnits = 1;
-    }
-    if (viewPtr->worldWidth < 1) {
-	viewPtr->worldWidth = 1;
-    }
-    viewPtr->flags &= ~LAYOUT_PENDING;
-    viewPtr->flags |= SCROLL_PENDING;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_ComputeLayout --
- *
- *	Recompute the layout when entries are opened/closed, inserted/deleted,
- *	or when text attributes change (such as font, linespacing).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The world coordinates are set for all the opened entries.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_ComputeLayout(TreeView *viewPtr)
-{
-    Blt_ChainLink link;
-    TreeViewColumn *cp;
-    TreeViewEntry *entryPtr;
-    TreeViewValue *valuePtr;
-
-    if (viewPtr->flatView) {
-	ComputeFlatLayout(viewPtr);
-    } else {
-	ComputeTreeLayout(viewPtr);
-    }
-
-    /*
-     * Determine the width of each column based upon the entries that as open
-     * (not hidden).  The widest entry in a column determines the width of that
-     * column.
-     */
-    /* Initialize the columns. */
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); 
-	 link != NULL; link = Blt_Chain_NextLink(link)) {
-	cp = Blt_Chain_GetValue(link);
-	cp->maxWidth = 0;
-	cp->max = SHRT_MAX;
-	if (cp->reqMax > 0) {
-	    cp->max = cp->reqMax;
-	}
-    }
-    /* The treeview column width was computed earlier. */
-    viewPtr->treeColumn.maxWidth = viewPtr->treeWidth;
-
-    /* 
-     * Look at all open entries and their values.  Determine the column widths
-     * by tracking the maximum width value in each column.
-     */
-    for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-	 entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK)) {
-	for (valuePtr = entryPtr->values; valuePtr != NULL; 
-	     valuePtr = valuePtr->nextPtr) {
-	    if (valuePtr->columnPtr->maxWidth < valuePtr->width) {
-		valuePtr->columnPtr->maxWidth = valuePtr->width;
-	    }
-	}	    
-    }
-    /* Now layout the columns with the proper sizes. */
-    LayoutColumns(viewPtr);
-}
-
-#ifdef notdef
-static void
-PrintFlags(TreeView *viewPtr, char *string)
-{    
-    fprintf(stderr, "%s: flags=", string);
-    if (viewPtr->flags & LAYOUT_PENDING) {
-	fprintf(stderr, "layout ");
-    }
-    if (viewPtr->flags & REDRAW_PENDING) {
-	fprintf(stderr, "redraw ");
-    }
-    if (viewPtr->flags & SCROLLX) {
-	fprintf(stderr, "xscroll ");
-    }
-    if (viewPtr->flags & SCROLLY) {
-	fprintf(stderr, "yscroll ");
-    }
-    if (viewPtr->flags & FOCUS) {
-	fprintf(stderr, "focus ");
-    }
-    if (viewPtr->flags & DIRTY) {
-	fprintf(stderr, "dirty ");
-    }
-    if (viewPtr->flags & UPDATE) {
-	fprintf(stderr, "update ");
-    }
-    if (viewPtr->flags & RESORT) {
-	fprintf(stderr, "resort ");
-    }
-    if (viewPtr->flags & SORTED) {
-	fprintf(stderr, "sorted ");
-    }
-    if (viewPtr->flags & SORT_PENDING) {
-	fprintf(stderr, "sort_pending ");
-    }
-    if (viewPtr->flags & REDRAW_BORDERS) {
-	fprintf(stderr, "borders ");
-    }
-    if (viewPtr->flags & VIEWPORT) {
-	fprintf(stderr, "viewport ");
-    }
-    fprintf(stderr, "\n");
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeVisibleEntries --
- *
- *	The entries visible in the viewport (the widget's window) are inserted
- *	into the array of visible nodes.
- *
- * Results:
- *	Returns 1 if beyond the last visible entry, 0 otherwise.
- *
- * Side effects:
- *	The array of visible nodes is filled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ComputeVisibleEntries(TreeView *viewPtr)
-{
-    int height;
-    int nSlots;
-    int maxX;
-    int xOffset, yOffset;
-
-    xOffset = Blt_AdjustViewport(viewPtr->xOffset, viewPtr->worldWidth,
-	VPORTWIDTH(viewPtr), viewPtr->xScrollUnits, viewPtr->scrollMode);
-    yOffset = Blt_AdjustViewport(viewPtr->yOffset, 
-	viewPtr->worldHeight, VPORTHEIGHT(viewPtr), viewPtr->yScrollUnits, 
-	viewPtr->scrollMode);
-
-    if ((xOffset != viewPtr->xOffset) || (yOffset != viewPtr->yOffset)) {
-	viewPtr->yOffset = yOffset;
-	viewPtr->xOffset = xOffset;
-	viewPtr->flags |= VIEWPORT;
-    }
-    height = VPORTHEIGHT(viewPtr);
-
-    /* Allocate worst case number of slots for entry array. */
-    nSlots = (height / viewPtr->minHeight) + 3;
-    if (nSlots != viewPtr->nVisible) {
-	if (viewPtr->visibleArr != NULL) {
-	    Blt_Free(viewPtr->visibleArr);
-	}
-	viewPtr->visibleArr = Blt_AssertCalloc(nSlots + 1, 
-					       sizeof(TreeViewEntry *));
-    }
-    viewPtr->nVisible = 0;
-    viewPtr->visibleArr[nSlots] = viewPtr->visibleArr[0] = NULL;
-
-    if (viewPtr->rootPtr->flags & ENTRY_HIDE) {
-	return TCL_OK;			/* Root node is hidden. */
-    }
-    /* Find the node where the view port starts. */
-    if (viewPtr->flatView) {
-	TreeViewEntry **epp;
-
-	/* Find the starting entry visible in the viewport. It can't be hidden
-	 * or any of it's ancestors closed. */
-    again:
-	for (epp = viewPtr->flatArr; *epp != NULL; epp++) {
-	    if (((*epp)->worldY + (*epp)->height) > viewPtr->yOffset) {
-		break;
-	    }
-	}	    
-	/*
-	 * If we can't find the starting node, then the view must be scrolled
-	 * down, but some nodes were deleted.  Reset the view back to the top
-	 * and try again.
-	 */
-	if (*epp == NULL) {
-	    if (viewPtr->yOffset == 0) {
-		return TCL_OK;		/* All entries are hidden. */
-	    }
-	    viewPtr->yOffset = 0;
-	    goto again;
-	}
-
-	maxX = 0;
-	height += viewPtr->yOffset;
-	for (/*empty*/; *epp != NULL; epp++) {
-	    int x;
-
-	    (*epp)->worldX = LEVELX(0) + viewPtr->treeColumn.worldX;
-	    x = (*epp)->worldX + ICONWIDTH(0) + (*epp)->width;
-	    if (x > maxX) {
-		maxX = x;
-	    }
-	    if ((*epp)->worldY >= height) {
-		break;
-	    }
-	    viewPtr->visibleArr[viewPtr->nVisible] = *epp;
-	    viewPtr->nVisible++;
-	}
-	viewPtr->visibleArr[viewPtr->nVisible] = NULL;
-    } else {
-	TreeViewEntry *ep;
-
-	ep = viewPtr->rootPtr;
-	while ((ep->worldY + ep->height) <= viewPtr->yOffset) {
-	    for (ep = Blt_TreeView_LastChild(ep, ENTRY_HIDE); ep != NULL; 
-		 ep = Blt_TreeView_PrevSibling(ep, ENTRY_HIDE)) {
-		if (ep->worldY <= viewPtr->yOffset) {
-		    break;
-		}
-	    }
-	    /*
-	     * If we can't find the starting node, then the view must be
-	     * scrolled down, but some nodes were deleted.  Reset the view
-	     * back to the top and try again.
-	     */
-	    if (ep == NULL) {
-		if (viewPtr->yOffset == 0) {
-		    return TCL_OK;	/* All entries are hidden. */
-		}
-		viewPtr->yOffset = 0;
-		continue;
-	    }
-	}
-	
-	height += viewPtr->yOffset;
-	maxX = 0;
-	viewPtr->treeColumn.maxWidth = viewPtr->treeWidth;
-
-	for (; ep != NULL; ep = Blt_TreeView_NextEntry(ep, ENTRY_MASK)){
-	    int x;
-	    int level;
-
-	    /*
-	     * Compute and save the entry's X-coordinate now that we know the
-	     * maximum level offset for the entire widget.
-	     */
-	    level = DEPTH(viewPtr, ep->node);
-	    ep->worldX = LEVELX(level) + viewPtr->treeColumn.worldX;
-	    x = ep->worldX + ICONWIDTH(level) + ICONWIDTH(level+1) + ep->width;
-	    if (x > maxX) {
-		maxX = x;
-	    }
-	    if (ep->worldY >= height) {
-		break;
-	    }
-	    viewPtr->visibleArr[viewPtr->nVisible] = ep;
-	    viewPtr->nVisible++;
-	}
-	viewPtr->visibleArr[viewPtr->nVisible] = NULL;
-    }
-    /*
-     * Note:	It's assumed that the view port always starts at or
-     *		over an entry.  Check that a change in the hierarchy
-     *		(e.g. closing a node) hasn't left the viewport beyond
-     *		the last entry.  If so, adjust the viewport to start
-     *		on the last entry.
-     */
-    if (viewPtr->xOffset > (viewPtr->worldWidth - viewPtr->xScrollUnits)) {
-	viewPtr->xOffset = viewPtr->worldWidth - viewPtr->xScrollUnits;
-    }
-    if (viewPtr->yOffset > (viewPtr->worldHeight - viewPtr->yScrollUnits)) {
-	viewPtr->yOffset = viewPtr->worldHeight - viewPtr->yScrollUnits;
-    }
-    viewPtr->xOffset = Blt_AdjustViewport(viewPtr->xOffset, 
-	viewPtr->worldWidth, VPORTWIDTH(viewPtr), viewPtr->xScrollUnits, 
-	viewPtr->scrollMode);
-    viewPtr->yOffset = Blt_AdjustViewport(viewPtr->yOffset,
-	viewPtr->worldHeight, VPORTHEIGHT(viewPtr), viewPtr->yScrollUnits,
-	viewPtr->scrollMode);
-
-    viewPtr->flags &= ~DIRTY;
-    Blt_PickCurrentItem(viewPtr->bindTable);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawLines --
- *
- * 	Draws vertical lines for the ancestor nodes.  While the entry of the
- * 	ancestor may not be visible, its vertical line segment does extent
- * 	into the viewport.  So walk back up the hierarchy drawing lines
- * 	until we get to the root.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Vertical lines are drawn for the ancestor nodes.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawLines(
-    TreeView *viewPtr,			/* Widget record containing the
-					 * attribute information for buttons. */
-    GC gc,
-    Drawable drawable)			/* Pixmap or window to draw into. */
-{
-    TreeViewEntry **epp;
-    TreeViewButton *buttonPtr;
-    TreeViewEntry *entryPtr;		/* Entry to be drawn. */
-
-    entryPtr = viewPtr->visibleArr[0];
-    while (entryPtr != viewPtr->rootPtr) {
-	int level;
-	
-	entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-	if (entryPtr == NULL) {
-	    break;
-	}
-	level = DEPTH(viewPtr, entryPtr->node);
-	if (entryPtr->vertLineLength > 0) {
-	    int ax, ay, by;
-	    int x, y;
-	    int height;
-
-	    /*
-	     * World X-coordinates aren't computed for entries that are
-	     * outside the viewport.  So for each off-screen ancestor node
-	     * compute it here too.
-	     */
-	    entryPtr->worldX = LEVELX(level) + viewPtr->treeColumn.worldX;
-	    x = SCREENX(viewPtr, entryPtr->worldX);
-	    y = SCREENY(viewPtr, entryPtr->worldY);
-	    height = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-			  viewPtr->button.height);
-	    ax = x + ICONWIDTH(level) + ICONWIDTH(level + 1) / 2;
-	    ay = y + height / 2;
-	    by = ay + entryPtr->vertLineLength;
-	    if ((entryPtr == viewPtr->rootPtr) && (viewPtr->flags & HIDE_ROOT)){
-		TreeViewEntry *nextPtr;
-		int h;
-
-		/* If the root node is hidden, go to the next entry to start
-		 * the vertical line. */
-		nextPtr = Blt_TreeView_NextEntry(viewPtr->rootPtr, ENTRY_MASK);
-		h = MAX3(nextPtr->lineHeight, nextPtr->iconHeight, 
-			 viewPtr->button.height);
-		ay = SCREENY(viewPtr, nextPtr->worldY) + h / 2;
-	    }
-	    /*
-	     * Clip the line's Y-coordinates at the viewport's borders.
-	     */
-	    if (ay < 0) {
-		ay &= 0x1;		/* Make sure the dotted line starts on
-					 * the same even/odd pixel. */
-	    }
-	    if (by > Tk_Height(viewPtr->tkwin)) {
-		by = Tk_Height(viewPtr->tkwin);
-	    }
-	    if ((ay < Tk_Height(viewPtr->tkwin)) && (by > 0)) {
-		ay |= 0x1;
-		XDrawLine(viewPtr->display, drawable, gc, ax, ay, ax, by);
-	    }
-	}
-    }
-    buttonPtr = &viewPtr->button;
-    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-	int x, y, w, h;
-	int buttonY, level;
-	int x1, x2, y1, y2;
-
-	entryPtr = *epp;
-	/* Entry is open, draw vertical line. */
-	x = SCREENX(viewPtr, entryPtr->worldX);
-	y = SCREENY(viewPtr, entryPtr->worldY);
-	level = DEPTH(viewPtr, entryPtr->node);
-	w = ICONWIDTH(level);
-	h = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, buttonPtr->height);
-	entryPtr->buttonX = (w - buttonPtr->width) / 2;
-	entryPtr->buttonY = (h - buttonPtr->height) / 2;
-	buttonY = y + entryPtr->buttonY;
-	x1 = x + (w / 2);
-	y1 = buttonY + (buttonPtr->height / 2);
-	x2 = x1 + (ICONWIDTH(level) + ICONWIDTH(level + 1)) / 2;
-	if (Blt_Tree_ParentNode(entryPtr->node) != NULL) {
-	    /*
-	     * For every node except root, draw a horizontal line from the
-	     * vertical bar to the middle of the icon.
-	     */
-	    y1 |= 0x1;
-	    XDrawLine(viewPtr->display, drawable, gc, x1, y1, x2, y1);
-	}
-	if (((entryPtr->flags & ENTRY_CLOSED) == 0) && 
-	    (entryPtr->vertLineLength > 0)) {
-	    y2 = y1 + entryPtr->vertLineLength;
-	    if (y2 > Tk_Height(viewPtr->tkwin)) {
-		y2 = Tk_Height(viewPtr->tkwin); /* Clip line at window border.*/
-	    }
-	    XDrawLine(viewPtr->display, drawable, gc, x2, y1, x2, y2);
-	}
-    }	
-}
-
-void
-Blt_TreeView_DrawRule(
-    TreeView *viewPtr,			/* Widget record containing the
-					 * attribute information for rules. */
-    TreeViewColumn *cp,
-    Drawable drawable)			/* Pixmap or window to draw into. */
-{
-    int x, y1, y2;
-
-    x = SCREENX(viewPtr, cp->worldX) + 
-	cp->width + viewPtr->ruleMark - viewPtr->ruleAnchor - 1;
-
-    y1 = viewPtr->titleHeight + viewPtr->inset;
-    y2 = Tk_Height(viewPtr->tkwin) - viewPtr->inset;
-    XDrawLine(viewPtr->display, drawable, cp->ruleGC, x, y1, x, y2);
-    viewPtr->flags = TOGGLE(viewPtr->flags, TV_RULE_ACTIVE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_DrawButton --
- *
- * 	Draws a button for the given entry. The button is drawn centered in the
- * 	region immediately to the left of the origin of the entry (computed in
- * 	the layout routines). The height and width of the button were previously
- * 	calculated from the average row height.
- *
- *		button height = entry height - (2 * some arbitrary padding).
- *		button width = button height.
- *
- *	The button may have a border.  The symbol (either a plus or minus) is
- *	slight smaller than the width or height minus the border.
- *
- *	    x,y origin of entry
- *
- *              +---+
- *              | + | icon label
- *              +---+
- *             closed
- *
- *           |----|----| horizontal offset
- *
- *              +---+
- *              | - | icon label
- *              +---+
- *              open
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_DrawButton(
-    TreeView *viewPtr,			/* Widget record containing the
-					 * attribute information for buttons. */
-    TreeViewEntry *entryPtr,		/* Entry. */
-    Drawable drawable,			/* Pixmap or window to draw into. */
-    int x, int y)
-{
-    Blt_Background bg;
-    TreeViewButton *buttonPtr = &viewPtr->button;
-    TreeViewIcon icon;
-    int relief;
-    int width, height;
-
-    bg = (entryPtr == viewPtr->activeBtnPtr) 
-	? buttonPtr->activeBg : buttonPtr->bg;
-    relief = (entryPtr->flags & ENTRY_CLOSED) 
-	? buttonPtr->closeRelief : buttonPtr->openRelief;
-    if (relief == TK_RELIEF_SOLID) {
-	relief = TK_RELIEF_FLAT;
-    }
-    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y,
-	buttonPtr->width, buttonPtr->height, buttonPtr->borderWidth, relief);
-
-    x += buttonPtr->borderWidth;
-    y += buttonPtr->borderWidth;
-    width  = buttonPtr->width  - (2 * buttonPtr->borderWidth);
-    height = buttonPtr->height - (2 * buttonPtr->borderWidth);
-
-    icon = NULL;
-    if (buttonPtr->icons != NULL) {	/* Open or close button icon? */
-	icon = buttonPtr->icons[0];
-	if (((entryPtr->flags & ENTRY_CLOSED) == 0) && 
-	    (buttonPtr->icons[1] != NULL)) {
-	    icon = buttonPtr->icons[1];
-	}
-    }
-    if (icon != NULL) {			/* Icon or rectangle? */
-	Tk_RedrawImage(TreeView_IconBits(icon), 0, 0, width, height, 
-		drawable, x, y);
-    } else {
-	int top, bottom, left, right;
-	XSegment segments[6];
-	int count;
-	GC gc;
-
-	gc = (entryPtr == viewPtr->activeBtnPtr)
-	    ? buttonPtr->activeGC : buttonPtr->normalGC;
-	if (relief == TK_RELIEF_FLAT) {
-	    /* Draw the box outline */
-
-	    left = x - buttonPtr->borderWidth;
-	    top = y - buttonPtr->borderWidth;
-	    right = left + buttonPtr->width - 1;
-	    bottom = top + buttonPtr->height - 1;
-
-	    segments[0].x1 = left;
-	    segments[0].x2 = right;
-	    segments[0].y2 = segments[0].y1 = top;
-	    segments[1].x2 = segments[1].x1 = right;
-	    segments[1].y1 = top;
-	    segments[1].y2 = bottom;
-	    segments[2].x2 = segments[2].x1 = left;
-	    segments[2].y1 = top;
-	    segments[2].y2 = bottom;
-#ifdef WIN32
-	    segments[2].y2++;
-#endif
-	    segments[3].x1 = left;
-	    segments[3].x2 = right;
-	    segments[3].y2 = segments[3].y1 = bottom;
-#ifdef WIN32
-	    segments[3].x2++;
-#endif
-	}
-	top = y + height / 2;
-	left = x + BUTTON_IPAD;
-	right = x + width - BUTTON_IPAD;
-
-	segments[4].y1 = segments[4].y2 = top;
-	segments[4].x1 = left;
-	segments[4].x2 = right - 1;
-#ifdef WIN32
-	segments[4].x2++;
-#endif
-
-	count = 5;
-	if (entryPtr->flags & ENTRY_CLOSED) { /* Draw the vertical line for the
-					       * plus. */
-	    top = y + BUTTON_IPAD;
-	    bottom = y + height - BUTTON_IPAD;
-	    segments[5].y1 = top;
-	    segments[5].y2 = bottom - 1;
-	    segments[5].x1 = segments[5].x2 = x + width / 2;
-#ifdef WIN32
-	    segments[5].y2++;
-#endif
-	    count = 6;
-	}
-	XDrawSegments(viewPtr->display, drawable, gc, segments, count);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_GetEntryIcon --
- *
- * 	Selects the correct image for the entry's icon depending upon the
- * 	current state of the entry: active/inactive normal/selected.
- *
- *		active - normal
- *		active - selected
- *		inactive - normal
- *		inactive - selected
- *
- * Results:
- *	Returns the image for the icon.
- *
- *---------------------------------------------------------------------------
- */
-TreeViewIcon
-Blt_TreeView_GetEntryIcon(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    TreeViewIcon *icons;
-    TreeViewIcon icon;
-    int hasFocus;
-
-    hasFocus = (entryPtr == viewPtr->focusPtr);
-    icons = CHOOSE(viewPtr->icons, entryPtr->icons);
-    icon = NULL;
-    if (icons != NULL) {	/* Selected or normal icon? */
-	icon = icons[0];
-	if ((hasFocus) && (icons[1] != NULL)) {
-	    icon = icons[1];
-	}
-    }
-    return icon;
-}
-
-
-static int
-DrawIcon(
-    TreeView *viewPtr,			/* Widget record containing the
-					 * attribute information for buttons. */
-    TreeViewEntry *entryPtr,		/* Entry to display. */
-    Drawable drawable,			/* Pixmap or window to draw into. */
-    int x, int y)
-{
-    TreeViewIcon icon;
-
-    icon = Blt_TreeView_GetEntryIcon(viewPtr, entryPtr);
-
-    if (icon != NULL) {			/* Icon or default icon bitmap? */
-	int entryHeight;
-	int level;
-	int maxY;
-	int top, bottom;
-	int topInset, botInset;
-	int width, height;
-
-	level = DEPTH(viewPtr, entryPtr->node);
-	entryHeight = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-		viewPtr->button.height);
-	height = TreeView_IconHeight(icon);
-	width = TreeView_IconWidth(icon);
-	if (viewPtr->flatView) {
-	    x += (ICONWIDTH(0) - width) / 2;
-	} else {
-	    x += (ICONWIDTH(level + 1) - width) / 2;
-	}	    
-	y += (entryHeight - height) / 2;
-	botInset = viewPtr->inset - INSET_PAD;
-	topInset = viewPtr->titleHeight + viewPtr->inset;
-	maxY = Tk_Height(viewPtr->tkwin) - botInset;
-	top = 0;
-	bottom = y + height;
-	if (y < topInset) {
-	    height += y - topInset;
-	    top = -y + topInset;
-	    y = topInset;
-	} else if (bottom >= maxY) {
-	    height = maxY - y;
-	}
-	Tk_RedrawImage(TreeView_IconBits(icon), 0, top, width, height, 
-		drawable, x, y);
-    } 
-    return (icon != NULL);
-}
-
-static int
-DrawLabel(
-    TreeView *viewPtr,			/* Widget record. */
-    TreeViewEntry *entryPtr,		/* Entry attribute information. */
-    Drawable drawable,			/* Pixmap or window to draw into. */
-    int x, int y,
-    int maxLength)			
-{
-    const char *label;
-    int entryHeight;
-    int width, height;			/* Width and height of label. */
-    int isFocused, isSelected, isActive;
-
-    entryHeight = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-       viewPtr->button.height);
-    isFocused = ((entryPtr == viewPtr->focusPtr) && (viewPtr->flags & FOCUS));
-    isSelected = Blt_TreeView_EntryIsSelected(viewPtr, entryPtr);
-    isActive = (entryPtr == viewPtr->activePtr);
-
-    /* Includes padding, selection 3-D border, and focus outline. */
-    width = entryPtr->labelWidth;
-    height = entryPtr->labelHeight;
-
-    /* Center the label, if necessary, vertically along the entry row. */
-    if (height < entryHeight) {
-	y += (entryHeight - height) / 2;
-    }
-    if (isFocused) {			/* Focus outline */
-	if (isSelected) {
-	    XColor *color;
-
-	    color = viewPtr->selFgColor;
-	    XSetForeground(viewPtr->display, viewPtr->focusGC, color->pixel);
-	}
-	if (width > maxLength) {
-	    width = maxLength;
-	}
-	XDrawRectangle(viewPtr->display, drawable, viewPtr->focusGC, x, y+1, 
-		       width - 1, height - 3);
-	if (isSelected) {
-	    XSetForeground(viewPtr->display, viewPtr->focusGC, 
-		viewPtr->focusColor->pixel);
-	}
-    }
-    x += FOCUS_WIDTH + LABEL_PADX + viewPtr->selBW;
-    y += FOCUS_WIDTH + LABEL_PADY + viewPtr->selBW;
-
-    label = GETLABEL(entryPtr);
-    if (label[0] != '\0') {
-	TreeViewStyle *stylePtr;
-	TextStyle ts;
-	Blt_Font font;
-	XColor *color;
-
-	stylePtr = viewPtr->treeColumn.stylePtr;
-	font = entryPtr->font;
-	if (font == NULL) {
-	    font = Blt_TreeView_GetStyleFont(viewPtr, stylePtr);
-	}
-	if (isSelected) {
-	    color = viewPtr->selFgColor;
-	} else if (entryPtr->color != NULL) {
-	    color = entryPtr->color;
-	} else {
-	    color = Blt_TreeView_GetStyleFg(viewPtr, stylePtr);
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetForeground(ts, color);
-	Blt_Ts_DrawLayout(viewPtr->tkwin, drawable, entryPtr->textPtr, &ts, 
-		x, y, maxLength);
-	if (isActive) {
-	    Blt_Ts_UnderlineLayout(viewPtr->tkwin, drawable, entryPtr->textPtr, 
-		&ts, x, y, maxLength);
-	}
-    }
-    return entryHeight;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawFlatEntry --
- *
- * 	Draws a button for the given entry.  Note that buttons should only be
- * 	drawn if the entry has sub-entries to be opened or closed.  It's the
- * 	responsibility of the calling routine to ensure this.
- *
- *	The button is drawn centered in the region immediately to the left of
- *	the origin of the entry (computed in the layout routines). The height
- *	and width of the button were previously calculated from the average row
- *	height.
- *
- *		button height = entry height - (2 * some arbitrary padding).
- *		button width = button height.
- *
- *	The button has a border.  The symbol (either a plus or minus) is slight
- *	smaller than the width or height minus the border.
- *
- *	    x,y origin of entry
- *
- *              +---+
- *              | + | icon label
- *              +---+
- *             closed
- *
- *           |----|----| horizontal offset
- *
- *              +---+
- *              | - | icon label
- *              +---+
- *              open
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawFlatEntry(
-    TreeView *viewPtr,			/* Widget record containing the
-					 * attribute information for
-					 * buttons. */
-    TreeViewEntry *entryPtr,		/* Entry to be drawn. */
-    Drawable drawable)			/* Pixmap or window to draw into. */
-{
-    int level;
-    int x, y, xMax;
-
-    entryPtr->flags &= ~ENTRY_REDRAW;
-
-    x = SCREENX(viewPtr, entryPtr->worldX);
-    y = SCREENY(viewPtr, entryPtr->worldY);
-    if (!DrawIcon(viewPtr, entryPtr, drawable, x, y)) {
-	x -= (DEF_ICON_WIDTH * 2) / 3;
-    }
-    level = 0;
-    x += ICONWIDTH(level);
-    /* Entry label. */
-    xMax = SCREENX(viewPtr, viewPtr->treeColumn.worldX) + 
-	viewPtr->treeColumn.width - viewPtr->treeColumn.titleBW - 
-	viewPtr->treeColumn.pad.side2;
-    DrawLabel(viewPtr, entryPtr, drawable, x, y, xMax - x);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawTreeEntry --
- *
- * 	Draws a button for the given entry.  Note that buttons should only be
- * 	drawn if the entry has sub-entries to be opened or closed.  It's the
- * 	responsibility of the calling routine to ensure this.
- *
- *	The button is drawn centered in the region immediately to the left of
- *	the origin of the entry (computed in the layout routines). The height
- *	and width of the button were previously calculated from the average
- *	row height.
- *
- *		button height = entry height - (2 * some arbitrary padding).
- *		button width = button height.
- *
- *	The button has a border.  The symbol (either a plus or minus) is
- *	slight smaller than the width or height minus the border.
- *
- *	    x,y origin of entry
- *
- *              +---+
- *              | + | icon label
- *              +---+
- *             closed
- *
- *           |----|----| horizontal offset
- *
- *              +---+
- *              | - | icon label
- *              +---+
- *              open
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawTreeEntry(
-    TreeView *viewPtr,			/* Widget record. */
-    TreeViewEntry *entryPtr,		/* Entry to be drawn. */
-    Drawable drawable)			/* Pixmap or window to draw into. */
-{
-    TreeViewButton *buttonPtr = &viewPtr->button;
-    int buttonY;
-    int level;
-    int width, height;
-    int x, y, xMax;
-    int x1, y1, x2, y2;
-
-    entryPtr->flags &= ~ENTRY_REDRAW;
-    x = SCREENX(viewPtr, entryPtr->worldX);
-    y = SCREENY(viewPtr, entryPtr->worldY);
-
-    level = DEPTH(viewPtr, entryPtr->node);
-    width = ICONWIDTH(level);
-    height = MAX3(entryPtr->lineHeight, entryPtr->iconHeight, 
-	buttonPtr->height);
-
-    entryPtr->buttonX = (width - buttonPtr->width) / 2;
-    entryPtr->buttonY = (height - buttonPtr->height) / 2;
-
-    buttonY = y + entryPtr->buttonY;
-
-    x1 = x + (width / 2);
-    y1 = y2 = buttonY + (buttonPtr->height / 2);
-    x2 = x1 + (ICONWIDTH(level) + ICONWIDTH(level + 1)) / 2;
-
-    if ((entryPtr->flags & ENTRY_HAS_BUTTON) && (entryPtr != viewPtr->rootPtr)){
-	/*
-	 * Except for the root, draw a button for every entry that needs one.
-	 * The displayed button can be either an icon (Tk image) or a line
-	 * drawing (rectangle with plus or minus sign).
-	 */
-	Blt_TreeView_DrawButton(viewPtr, entryPtr, drawable, 
-		x + entryPtr->buttonX, y + entryPtr->buttonY);
-    }
-    x += ICONWIDTH(level);
-
-    if (!DrawIcon(viewPtr, entryPtr, drawable, x, y)) {
-	x -= (DEF_ICON_WIDTH * 2) / 3;
-    }
-    x += ICONWIDTH(level + 1);
-
-    /* Entry label. */
-    xMax = SCREENX(viewPtr, viewPtr->treeColumn.worldX) + 
-	viewPtr->treeColumn.width - viewPtr->treeColumn.titleBW - 
-	viewPtr->treeColumn.pad.side2;
-    DrawLabel(viewPtr, entryPtr, drawable, x, y, xMax - x);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_DrawValue --
- *
- * 	Draws a column value for the given entry.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A button is drawn for the entry.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_DrawValue(
-    TreeView *viewPtr,			/* Widget record. */
-    TreeViewEntry *entryPtr,		/* Node of entry to be drawn. */
-    TreeViewValue *valuePtr,
-    Drawable drawable,			/* Pixmap or window to draw into. */
-    int x, int y)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = CHOOSE(valuePtr->columnPtr->stylePtr, valuePtr->stylePtr);
-    (*stylePtr->classPtr->drawProc)(viewPtr, drawable, entryPtr, valuePtr, 
-		stylePtr, x, y);
-}
-
-static void
-DrawTitle(TreeView *viewPtr, TreeViewColumn *cp, Drawable drawable, 
-	int x)				/* Starting x-coordinate of the column.
-					 * May be off-screen because of
-					 * scrolling. */
-{
-    Blt_Background bg;
-    XColor *fgColor;
-    int drawWidth, drawX;
-    int avail, need;
-    int startX, arrowX;
-    int needArrow;
-
-    if (viewPtr->titleHeight < 1) {
-	return;
-    }
-    startX = drawX = x;
-    drawWidth = cp->width;
-    if (cp->position == Blt_Chain_GetLength(viewPtr->columns)) {
-	/* If there's any room left over, let the last column take it. */
-	drawWidth = Tk_Width(viewPtr->tkwin) - x;
-    } else if (cp->position == 1) {
-	drawWidth += x;
-	drawX = 0;
-    }
-    if (cp == viewPtr->activeTitleColumnPtr) {
-	bg = cp->activeTitleBg;
-	fgColor = cp->activeTitleFgColor;
-    } else {
-	bg = cp->titleBg;
-	fgColor = cp->titleFgColor;
-    }
-    /* Clear the title area by drawing the background. */
-    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, drawX, 
-	viewPtr->inset, drawWidth, viewPtr->titleHeight, 0, TK_RELIEF_FLAT);
-
-    x += cp->pad.side1 + cp->titleBW;
-    startX = x;
-    needArrow = ((cp == viewPtr->sortColumnPtr) && (viewPtr->flatView));
-    avail = cp->width - (2 * cp->titleBW) - PADDING(cp->pad);
-    need = cp->titleWidth - (2 * cp->titleBW) - TV_ARROW_WIDTH;
-    if (avail > need) {
-	x += (avail - need) / 2;
-    }
-    arrowX = 0;			/* Suppress compiler warning. */
-    if (needArrow) {
-	arrowX = drawX + cp->width - cp->pad.side2 - TV_ARROW_WIDTH;
-	if ((x + need) > arrowX) {
-	    x -= (x + need) - arrowX;
-	}
-	if (x < startX) {
-	    avail -= (startX - x);
-	    x = startX;
-	}
-    }
-    if (cp->titleIcon != NULL) {
-	int iconX, iconY, iconWidth, iconHeight;
-
-	iconHeight = TreeView_IconHeight(cp->titleIcon);
-	iconWidth = TreeView_IconWidth(cp->titleIcon);
-	iconX = x;
-
-	/* Center the icon vertically.  We already know the column title is at
-	 * least as tall as the icon. */
-	iconY = viewPtr->inset + (viewPtr->titleHeight - iconHeight) / 2;
-
-	Tk_RedrawImage(TreeView_IconBits(cp->titleIcon), 0, 0, iconWidth, 
-		iconHeight, drawable, iconX, iconY);
-	x += iconWidth + 6;
-	avail -= iconWidth + 6;
-    }
-    if (cp->titleTextPtr != NULL) {
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, cp->titleFont);
-	Blt_Ts_SetForeground(ts, fgColor);
-	Blt_Ts_DrawLayout(viewPtr->tkwin, drawable, cp->titleTextPtr, &ts, 
-		x, viewPtr->inset + 1, avail);
-    }
-    if (needArrow) {
-	Blt_DrawArrow(viewPtr->display, drawable, fgColor, arrowX, 
-		viewPtr->inset, TV_ARROW_WIDTH, viewPtr->titleHeight, cp->titleBW,
-		(viewPtr->sortDecreasing) ? ARROW_UP : ARROW_DOWN);
-    }
-    Blt_DrawBackgroundRectangle(viewPtr->tkwin, drawable, bg, drawX, 
-	viewPtr->inset, drawWidth, viewPtr->titleHeight, cp->titleBW, 
-	cp->titleRelief);
-}
-
-void
-Blt_TreeView_DrawHeadings(TreeView *viewPtr, Drawable drawable)
-{
-    Blt_ChainLink link;
-    TreeViewColumn *cp;
-    int x;
-
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	 link = Blt_Chain_NextLink(link)) {
-	cp = Blt_Chain_GetValue(link);
-	if (cp->hidden) {
-	    continue;
-	}
-	x = SCREENX(viewPtr, cp->worldX);
-	if ((x + cp->width) < 0) {
-	    continue;			/* Don't draw columns before the left
-					 * edge. */
-	}
-	if (x > Tk_Width(viewPtr->tkwin)) {
-	    break;			/* Discontinue when a column starts
-					 * beyond the right edge. */
-	}
-	DrawTitle(viewPtr, cp, drawable, x);
-    }
-}
-
-static void
-DrawNormalBackground(TreeView *viewPtr, Drawable drawable, int x, int w)
-{
-    Blt_Background bg;
-
-    bg = Blt_TreeView_GetStyleBackground(viewPtr, viewPtr->stylePtr);
-    /* This also fills the background where there are no entries. */
-    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, 0, w, 
-	Tk_Height(viewPtr->tkwin), 0, TK_RELIEF_FLAT);
-    if (viewPtr->altBg != NULL) {
-	TreeViewEntry **epp;
-	int count;
-
- 	for (count = 0, epp = viewPtr->visibleArr; *epp != NULL; epp++, 
-		 count++) {
-	    if ((*epp)->flatIndex & 0x1) {
-		int y;
-
-		y = SCREENY(viewPtr, (*epp)->worldY);
-		Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, 
-			viewPtr->altBg, x, y, w, (*epp)->height, 
-			viewPtr->selBW, viewPtr->selRelief);
-	    }
-	}
-    }
-}
-
-static void
-DrawSelectionBackground(TreeView *viewPtr, Drawable drawable, int x, int w)
-{
-    TreeViewEntry **epp;
-
-    /* 
-     * Draw the backgrounds of selected entries first.  The vertical lines
-     * connecting child entries will be draw on top.
-     */
-    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-	if (Blt_TreeView_EntryIsSelected(viewPtr, *epp)) {
-	    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, 
-		viewPtr->selBg, x, SCREENY(viewPtr, (*epp)->worldY), 
-		w, (*epp)->height, viewPtr->selBW, viewPtr->selRelief);
-	}
-    }
-}
-
-static void
-DrawTreeView(TreeView *viewPtr, Drawable drawable, int x)
-{
-    TreeViewEntry **epp;
-    int count;
-
-    count = 0;
-    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-	(*epp)->flags &= ~ENTRY_SELECTED;
-	if (Blt_TreeView_EntryIsSelected(viewPtr, *epp)) {
-	    (*epp)->flags |= ENTRY_SELECTED;
-	    count++;
-	}
-    }
-    if ((viewPtr->lineWidth > 0) && (viewPtr->nVisible > 0)) { 
-	/* Draw all the vertical lines from topmost node. */
-	DrawLines(viewPtr, viewPtr->lineGC, drawable);
-	if (count > 0) {
-	    XRectangle *rects, *rp;
-
-	    rects = Blt_AssertMalloc(count * sizeof(XRectangle));
-	    for (rp = rects, epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-		if ((*epp)->flags & ENTRY_SELECTED) {
-		    rp->x = 0;
-		    rp->y = SCREENY(viewPtr, (*epp)->worldY);
-		    rp->width = Tk_Width(viewPtr->tkwin);
-		    rp->height = (*epp)->height;
-		    rp++;
-		}
-	    }
-	    XSetClipRectangles(viewPtr->display, viewPtr->selGC, 0, 0, rects, 
-		count, YSorted);
-	    DrawLines(viewPtr, viewPtr->selGC, drawable);
-	    Blt_Free(rects);
-	}
-    }
-    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-	DrawTreeEntry(viewPtr, *epp, drawable);
-    }
-}
-
-
-static void
-DrawFlatView(TreeView *viewPtr, Drawable drawable, int x)
-{
-    TreeViewEntry **epp;
-
-    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-	DrawFlatEntry(viewPtr, *epp, drawable);
-    }
-}
-
-void
-Blt_TreeView_DrawOuterBorders(TreeView *viewPtr, Drawable drawable)
-{
-    /* Draw 3D border just inside of the focus highlight ring. */
-    if (viewPtr->borderWidth > 0) {
-	Blt_DrawBackgroundRectangle(viewPtr->tkwin, drawable, viewPtr->bg,
-	    viewPtr->highlightWidth, viewPtr->highlightWidth,
-	    Tk_Width(viewPtr->tkwin) - 2 * viewPtr->highlightWidth,
-	    Tk_Height(viewPtr->tkwin) - 2 * viewPtr->highlightWidth,
-	    viewPtr->borderWidth, viewPtr->relief);
-    }
-    /* Draw focus highlight ring. */
-    if (viewPtr->highlightWidth > 0) {
-	XColor *color;
-	GC gc;
-
-	color = (viewPtr->flags & FOCUS)
-	    ? viewPtr->highlightColor : viewPtr->highlightBgColor;
-	gc = Tk_GCForColor(color, drawable);
-	Tk_DrawFocusHighlight(viewPtr->tkwin, gc, viewPtr->highlightWidth,
-	    drawable);
-    }
-    viewPtr->flags &= ~REDRAW_BORDERS;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayTreeView --
- *
- * 	This procedure is invoked to display the widget.
- *
- *      Recompute the layout of the text if necessary. This is necessary if the
- *      world coordinate system has changed.  Specifically, the following may
- *      have occurred:
- *
- *	  1.  a text attribute has changed (font, linespacing, etc.).
- *	  2.  an entry's option changed, possibly resizing the entry.
- *
- *      This is deferred to the display routine since potentially many of
- *      these may occur.
- *
- *	Set the vertical and horizontal scrollbars.  This is done here since the
- *	window width and height are needed for the scrollbar calculations.
- *
- * Results:
- *	None.
- *
- * Side effects:
- * 	The widget is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayTreeView(ClientData clientData)	/* Information about widget. */
-{
-    Blt_ChainLink link;
-    Pixmap drawable; 
-    TreeView *viewPtr = clientData;
-    int reqWidth, reqHeight;
-
-    viewPtr->flags &= ~REDRAW_PENDING;
-    if (viewPtr->tkwin == NULL) {
-	return;				/* Window has been destroyed. */
-    }
-    if (viewPtr->flags & LAYOUT_PENDING) {
-	/*
-	 * Recompute the layout when entries are opened/closed,
-	 * inserted/deleted, or when text attributes change (such as font,
-	 * linespacing).
-	 */
-	Blt_TreeView_ComputeLayout(viewPtr);
-    }
-    if (viewPtr->flags & (SCROLL_PENDING | DIRTY)) {
-	int width, height;
-	/* 
-	 * Scrolling means that the view port has changed and that the visible
-	 * entries need to be recomputed.
-	 */
-	ComputeVisibleEntries(viewPtr);
-	width = VPORTWIDTH(viewPtr);
-	height = VPORTHEIGHT(viewPtr);
-	if ((viewPtr->flags & SCROLLX) && (viewPtr->xScrollCmdObjPtr != NULL)) {
-	    Blt_UpdateScrollbar(viewPtr->interp, viewPtr->xScrollCmdObjPtr, 
-		viewPtr->xOffset, viewPtr->xOffset + width, viewPtr->worldWidth);
-	}
-	if ((viewPtr->flags & SCROLLY) && (viewPtr->yScrollCmdObjPtr != NULL)) {
-	    Blt_UpdateScrollbar(viewPtr->interp, viewPtr->yScrollCmdObjPtr,
-		viewPtr->yOffset, viewPtr->yOffset+height, viewPtr->worldHeight);
-	}
-	viewPtr->flags &= ~SCROLL_PENDING;
-    }
-
-    reqHeight = (viewPtr->reqHeight > 0) ? viewPtr->reqHeight : 
-	viewPtr->worldHeight + viewPtr->titleHeight + 2 * viewPtr->inset + 1;
-    reqWidth = (viewPtr->reqWidth > 0) ? viewPtr->reqWidth : 
-	viewPtr->worldWidth + 2 * viewPtr->inset;
-    if ((reqWidth != Tk_ReqWidth(viewPtr->tkwin)) || 
-	(reqHeight != Tk_ReqHeight(viewPtr->tkwin))) {
-	Tk_GeometryRequest(viewPtr->tkwin, reqWidth, reqHeight);
-    }
-#ifdef notdef
-    if (viewPtr->reqWidth == 0) {
-	int w;
-	/* 
-	 * The first time through this routine, set the requested width to the
-	 * computed width.  All we want is to automatically set the width of
-	 * the widget, not dynamically grow/shrink it as attributes change.
-	 */
-	w = viewPtr->worldWidth + 2 * viewPtr->inset;
-	Tk_GeometryRequest(viewPtr->tkwin, w, viewPtr->reqHeight);
-    }
-#endif
-    if (!Tk_IsMapped(viewPtr->tkwin)) {
-	return;
-    }
-    drawable = Tk_GetPixmap(viewPtr->display, Tk_WindowId(viewPtr->tkwin), 
-	Tk_Width(viewPtr->tkwin), Tk_Height(viewPtr->tkwin), 
-	Tk_Depth(viewPtr->tkwin));
-
-    if ((viewPtr->focusPtr == NULL) && (viewPtr->nVisible > 0)) {
-	/* Re-establish the focus entry at the top entry. */
-	viewPtr->focusPtr = viewPtr->visibleArr[0];
-    }
-    viewPtr->flags |= VIEWPORT;
-    if ((viewPtr->flags & TV_RULE_ACTIVE) && (viewPtr->resizeColumnPtr!=NULL)) {
-	Blt_TreeView_DrawRule(viewPtr, viewPtr->resizeColumnPtr, drawable);
-    }
-    for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL; 
-	 link = Blt_Chain_NextLink(link)) {
-	TreeViewColumn *cp;
-	int x;
-
-	cp = Blt_Chain_GetValue(link);
-	cp->flags &= ~COLUMN_DIRTY;
-	if (cp->hidden) {
-	    continue;
-	}
-	x = SCREENX(viewPtr, cp->worldX);
-	if ((x + cp->width) < 0) {
-	    continue;			/* Don't draw columns before the left
-					 * edge. */
-	}
-	if (x > Tk_Width(viewPtr->tkwin)) {
-	    break;			/* Discontinue when a column starts
-					 * beyond the right edge. */
-	}
-	/* Clear the column background. */
-	DrawNormalBackground(viewPtr, drawable, x, cp->width);
-	DrawSelectionBackground(viewPtr, drawable, x, cp->width);
-	if (cp != &viewPtr->treeColumn) {
-	    TreeViewEntry **epp;
-	    
-	    for (epp = viewPtr->visibleArr; *epp != NULL; epp++) {
-		TreeViewValue *vp;
-		
-		/* Check if there's a corresponding value in the entry. */
-		vp = Blt_TreeView_FindValue(*epp, cp);
-		if (vp != NULL) {
-		    Blt_TreeView_DrawValue(viewPtr, *epp, vp, drawable, 
-			x + cp->pad.side1, SCREENY(viewPtr, (*epp)->worldY));
-		}
-	    }
-	} else {
-	    if (viewPtr->flatView) {
-		DrawFlatView(viewPtr, drawable, x);
-	    } else {
-		DrawTreeView(viewPtr, drawable, x);
-	    }
-	}
- 	if (cp->relief != TK_RELIEF_FLAT) {
-	    Blt_Background bg;
-
-	    /* Draw a 3D border around the column. */
-	    bg = Blt_TreeView_GetStyleBackground(viewPtr, viewPtr->stylePtr);
-	    Blt_DrawBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, 0, 
-		cp->width, Tk_Height(viewPtr->tkwin), cp->borderWidth, 
-		cp->relief);
-	}
-    }
-    if (viewPtr->flags & TV_SHOW_COLUMN_TITLES) {
-	Blt_TreeView_DrawHeadings(viewPtr, drawable);
-    }
-    Blt_TreeView_DrawOuterBorders(viewPtr, drawable);
-    if ((viewPtr->flags & TV_RULE_NEEDED) &&
-	(viewPtr->resizeColumnPtr != NULL)) {
-	Blt_TreeView_DrawRule(viewPtr, viewPtr->resizeColumnPtr, drawable);
-    }
-    /* Now copy the new view to the window. */
-    XCopyArea(viewPtr->display, drawable, Tk_WindowId(viewPtr->tkwin), 
-	viewPtr->lineGC, 0, 0, Tk_Width(viewPtr->tkwin), 
-	Tk_Height(viewPtr->tkwin), 0, 0);
-    Tk_FreePixmap(viewPtr->display, drawable);
-    viewPtr->flags &= ~VIEWPORT;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_SelectCmdProc --
- *
- *      Invoked at the next idle point whenever the current selection changes.
- *      Executes some application-specific code in the -selectcommand option.
- *      This provides a way for applications to handle selection changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_SelectCmdProc(ClientData clientData) 
-{
-    TreeView *viewPtr = clientData;
-
-    Tcl_Preserve(viewPtr);
-    if (viewPtr->selectCmd != NULL) {
-	viewPtr->flags &= ~TV_SELECT_PENDING;
-	if (Tcl_GlobalEval(viewPtr->interp, viewPtr->selectCmd) != TCL_OK) {
-	    Tcl_BackgroundError(viewPtr->interp);
-	}
-    }
-    Tcl_Release(viewPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeViewObjCmd --
- *
- * 	This procedure is invoked to process the TCL command that corresponds to
- * 	a widget managed by this module. See the user documentation for details
- * 	on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-TreeViewObjCmd(
-    ClientData clientData,		/* Main window associated with
-					 * interpreter. */
-    Tcl_Interp *interp,			/* Current interpreter. */
-    int objc,				/* Number of arguments. */
-    Tcl_Obj *const *objv)		/* Argument strings. */
-{
-    TreeView *viewPtr;
-    Tcl_CmdInfo cmdInfo;
-    Tcl_Obj *initObjv[2];
-    char *string;
-    int result;
-
-    string = Tcl_GetString(objv[0]);
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", string, 
-		" pathName ?option value?...\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    viewPtr = CreateTreeView(interp, objv[1]);
-    if (viewPtr == NULL) {
-	goto error;
-    }
-
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     * If the procedure doesn't already exist, source it from
-     * "$blt_library/treeview.tcl".  We deferred sourcing the file until now so
-     * that the variable $blt_library could be set within a script.
-     */
-    if (!Tcl_GetCommandInfo(interp, "::blt::TreeView::Initialize", &cmdInfo)) {
-	if (Tcl_GlobalEval(interp, 
-		"source [file join $blt_library treeview.tcl]") != TCL_OK) {
-	    char info[200];
-
-	    sprintf_s(info, 200, "\n    (while loading bindings for %.50s)", 
-		    Tcl_GetString(objv[0]));
-	    Tcl_AddErrorInfo(interp, info);
-	    goto error;
-	}
-    }
-    /* 
-     * Initialize the widget's configuration options here. The options need to
-     * be set first, so that entry, column, and style components can use them
-     * for their own GCs.
-     */
-    bltTreeViewIconsOption.clientData = viewPtr;
-    bltTreeViewTreeOption.clientData = viewPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, viewPtr->tkwin, bltTreeViewSpecs, 
-	objc - 2, objv + 2, (char *)viewPtr, 0) != TCL_OK) {
-	goto error;
-    }
-    if (Blt_ConfigureComponentFromObj(interp, viewPtr->tkwin, "button", 
-	"Button", bltTreeViewButtonSpecs, 0, (Tcl_Obj **)NULL, (char *)viewPtr,
-	0) != TCL_OK) {
-	goto error;
-    }
-
-    /* 
-     * Rebuild the widget's GC and other resources that are predicated by the
-     * widget's configuration options.  Do the same for the default column.
-     */
-    if (Blt_TreeView_UpdateWidget(interp, viewPtr) != TCL_OK) {
-	goto error;
-    }
-    Blt_TreeView_UpdateColumnGCs(viewPtr, &viewPtr->treeColumn);
-    Blt_TreeView_UpdateStyleGCs(viewPtr, viewPtr->stylePtr);
-
-    /*
-     * Invoke a procedure to initialize various bindings on treeview entries.
-     * If the procedure doesn't already exist, source it from
-     * "$blt_library/treeview.tcl".  We deferred sourcing the file until now
-     * so that the variable $blt_library could be set within a script.
-     */
-    initObjv[0] = Tcl_NewStringObj("::blt::TreeView::Initialize", -1);
-    initObjv[1] = objv[1];
-    Tcl_IncrRefCount(initObjv[0]);
-    Tcl_IncrRefCount(initObjv[1]);
-    result = Tcl_EvalObjv(interp, 2, initObjv, TCL_EVAL_GLOBAL);
-    Tcl_DecrRefCount(initObjv[1]);
-    Tcl_DecrRefCount(initObjv[0]);
-    if (result != TCL_OK) {
-	goto error;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(viewPtr->tkwin), -1);
-    return TCL_OK;
-  error:
-    if (viewPtr != NULL) {
-	Tk_DestroyWindow(viewPtr->tkwin);
-    }
-    return TCL_ERROR;
-}
-
-int
-Blt_TreeViewCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[] = { 
-	{ "treeview", TreeViewObjCmd, },
-	{ "hiertable", TreeViewObjCmd, }
-    };
-
-    return Blt_InitCmds(interp, "::blt", cmdSpecs, 2);
-}
-
-#endif /* NO_TREEVIEW */
-
-
-int
-Blt_TreeView_DrawLabel(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-		       Drawable drawable)
-{
-    Blt_Background bg;
-    TreeViewIcon icon;
-    int level;
-    int overlap;
-    int srcX, srcY, destX, destY, pixWidth, pixHeight;
-    int y2, y1, x1, x2;
-    int dx, dy;
-    int x, y, xMax, w, h;
-
-    x = SCREENX(viewPtr, entryPtr->worldX);
-    y = SCREENY(viewPtr, entryPtr->worldY);
-    h = entryPtr->height - 1;
-    w = viewPtr->treeColumn.width - 
-	(entryPtr->worldX - viewPtr->treeColumn.worldX);
-    xMax = SCREENX(viewPtr, viewPtr->treeColumn.worldX) + 
-	viewPtr->treeColumn.width - viewPtr->treeColumn.titleBW - 
-	viewPtr->treeColumn.pad.side2;
-
-    icon = Blt_TreeView_GetEntryIcon(viewPtr, entryPtr);
-    entryPtr->flags |= ENTRY_ICON;
-    if (viewPtr->flatView) {
-	x += ICONWIDTH(0);
-	w -= ICONWIDTH(0);
-	if (icon == NULL) {
-	    x -= (DEF_ICON_WIDTH * 2) / 3;
-	}
-    } else {
-	level = DEPTH(viewPtr, entryPtr->node);
-	if (!viewPtr->flatView) {
-	    x += ICONWIDTH(level);
-	    w -= ICONWIDTH(level);
-	}
-	if (icon != NULL) {
-	    x += ICONWIDTH(level + 1);
-	    w -= ICONWIDTH(level + 1);
-	}
-    }
-    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	bg = viewPtr->selBg;
-    } else {
-	bg = Blt_TreeView_GetStyleBackground(viewPtr, viewPtr->stylePtr);
-	if ((viewPtr->altBg != NULL) && (entryPtr->flatIndex & 0x1))  {
-	    bg = viewPtr->altBg;
-	}
-    }
-    x1 = viewPtr->inset;
-    x2 = Tk_Width(viewPtr->tkwin) - viewPtr->inset;
-    y1 = viewPtr->titleHeight + viewPtr->inset;
-    y2 = Tk_Height(viewPtr->tkwin) - viewPtr->inset - INSET_PAD;
-
-    /* Verify that the label is currently visible on screen. */
-    if (((x + w) <  x1) || (x > x2) || ((y + h) < y1) || (y > y2)) {
-	return 0;
-    }
-    /* 
-     * sx, sy
-     *  +================+
-     *  |  +-------------|--------------+
-     *  |  | dx, dy      | h            |
-     *  +================+              |
-     *     |<---- w ---->               |
-     *     |                            |
-     *     +----------------------------+
-     */
-    overlap = FALSE;
-    destX = x;
-    destY = y;
-    srcX = srcY = 0;
-    pixWidth = w, pixHeight = h;
-    dy = y1 - y;
-    if (dy > 0) {
-	overlap = TRUE;
-	pixHeight -= dy;		/* Reduce the height of the pixmap. */
-	srcY = -dy;			/* Offset from the origin of the
-					 * pixmap. */
-	destY = y1;
-    } 
-    dy = (y + h) - y2;
-    if (dy > 0) {
-	overlap = TRUE;
-	pixHeight -= dy;
-    }
-    dx = x1 - x;
-    if (dx > 0) {
-	overlap = TRUE;
-	pixWidth -= dx;
-	srcX = -dx;
-	destX = x1;
-    } 
-    dx = (x + w) - x2;
-    if (dx > 0) {
-	overlap = TRUE;
-	pixWidth -= dx;
-    }
-    if (overlap) {
-	Pixmap pixmap;
-
-	pixmap = Tk_GetPixmap(viewPtr->display, Tk_WindowId(viewPtr->tkwin), 
-		pixWidth, pixHeight, Tk_Depth(viewPtr->tkwin));
-	/* Clear the entry label background. */
-	Blt_FillBackgroundRectangle(viewPtr->tkwin, pixmap, bg, 0, 0, 
-		pixWidth, pixHeight, 0, TK_RELIEF_FLAT);
-	DrawLabel(viewPtr, entryPtr, pixmap, srcX, srcY, xMax - x);
-	XCopyArea(viewPtr->display, pixmap, drawable, viewPtr->lineGC, 0, 0, 
-		pixWidth, pixHeight, destX, destY);
-	Tk_FreePixmap(viewPtr->display, pixmap);
-    } else {
-	/* Clear the entry label background. */
-	Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y, w, h,
-		0, TK_RELIEF_FLAT);
-	DrawLabel(viewPtr, entryPtr, drawable, x, y, xMax - x);
-    }
-    return 1;
-}
diff --git a/blt3.0/src/bltTreeView.h b/blt3.0/src/bltTreeView.h
deleted file mode 100644
index e4bf41e..0000000
--- a/blt3.0/src/bltTreeView.h
+++ /dev/null
@@ -1,1071 +0,0 @@
-
-/*
- * bltTreeView.h --
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *
- * BUGS:
- *   1.  "open" operation should change scroll offset so that as many
- *	 new entries (up to half a screen) can be seen.
- *   2.  "open" needs to adjust the scrolloffset so that the same entry
- *	 is seen at the same place.
- */
-
-#ifndef BLT_TREEVIEW_H
-#define BLT_TREEVIEW_H
-
-#include "bltImage.h"
-#include "bltHash.h"
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltChain.h"
-#include "bltTree.h"
-#include "bltTile.h"
-#include "bltBind.h"
-#include "bltBgStyle.h"
-
-#define ITEM_ENTRY		(ClientData)0
-#define ITEM_ENTRY_BUTTON	(ClientData)1
-#define ITEM_COLUMN_TITLE	(ClientData)2
-#define ITEM_COLUMN_RULE	(ClientData)3
-#define ITEM_STYLE		(ClientData)0x10004
-
-#if HAVE_UTF
-#else
-#define Tcl_NumUtfChars(s,n)	(((n) == -1) ? strlen((s)) : (n))
-#define Tcl_UtfAtIndex(s,i)	((s) + (i))
-#endif
-
-#define ODD(x)			((x) | 0x01)
-
-#define END			(-1)
-#define SEPARATOR_LIST		((char *)NULL)
-#define SEPARATOR_NONE		((char *)-1)
-
-#define SEARCH_Y		1
-
-#define TV_ARROW_WIDTH 17
-#define TV_ARROW_HEIGHT 17
-
-typedef const char *UID;
-
-/*
- * The macro below is used to modify a "char" value (e.g. by casting it to an
- * unsigned character) so that it can be used safely with macros such as
- * isspace.
- */
-#define UCHAR(c)	((unsigned char) (c))
-
-#define TOGGLE(x, mask) (((x) & (mask)) ? ((x) & ~(mask)) : ((x) | (mask)))
-
-
-#define SCREENX(h, wx)	((wx) - (h)->xOffset + (h)->inset)
-#define SCREENY(h, wy)	((wy) - (h)->yOffset + (h)->inset + (h)->titleHeight)
-
-#define WORLDX(h, sx)	((sx) - (h)->inset + (h)->xOffset)
-#define WORLDY(h, sy)	((sy) - ((h)->inset + (h)->titleHeight) + (h)->yOffset)
-
-#define VPORTWIDTH(h)	(Tk_Width((h)->tkwin) - 2 * (h)->inset)
-#define VPORTHEIGHT(h) \
-	(Tk_Height((h)->tkwin) - (h)->titleHeight - 2 * (h)->inset)
-
-#define ICONWIDTH(d)	(viewPtr->levelInfo[(d)].iconWidth)
-#define LEVELX(d)	(viewPtr->levelInfo[(d)].x)
-
-#define DEPTH(h, n)	(((h)->flatView) ? 0 : Blt_Tree_NodeDepth(n))
-
-#define SELECT_MODE_SINGLE	(1<<0)
-#define SELECT_MODE_MULTIPLE	(1<<1)
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Internal treeview widget flags:
- *
- *	LAYOUT_PENDING	The layout of the hierarchy needs to be recomputed.
- *
- *	REDRAW_PENDING	A redraw request is pending for the widget.
- *
- *	SCROLLX	X-scroll request is pending.
- *
- *	SCROLLY	Y-scroll request is pending.
- *
- *	SCROLL_PENDING	Both X-scroll and  Y-scroll requests are pending.
- *
- *	FOCUS		The widget is receiving keyboard events.
- *			Draw the focus highlight border around the widget.
- *
- *	DIRTY		The hierarchy has changed. It may invalidate
- *			the locations and pointers to entries.  The widget 
- *			will need to recompute its layout.
- *
- *	RESORT		The tree has changed such that the view needs to
- *			be resorted.  This can happen when an entry is
- *			open or closed, it's label changes, a column value
- *			changes, etc.
- *
- *	REDRAW_BORDERS  The borders of the widget (highlight ring and
- *			3-D border) need to be redrawn.
- *
- *	VIEWPORT	Indicates that the viewport has changed in some
- *			way: the size of the viewport, the location of 
- *			the viewport, or the contents of the viewport.
- *
- */
-
-#define LAYOUT_PENDING	(1<<0)
-#define REDRAW_PENDING	(1<<1)
-#define SCROLLX		(1<<2)
-#define SCROLLY		(1<<3)
-#define SCROLL_PENDING	(SCROLLX | SCROLLY)
-#define FOCUS		(1<<4)
-#define DIRTY		(1<<5)
-#define SORTED		(1<<8)
-#define UPDATE		(1<<6)
-#define VIEWPORT	(1<<11)
-#define RESORT		(1<<7)
-#define SORT_PENDING	(1<<9)
-#define REDRAW_BORDERS	(1<<10)
-#define REPOPULATE	(1<<12)
-
-/*
- *  Rule related flags: Rules are XOR-ed lines. We need to track whether
- *			they have been drawn or not. 
- *
- *	TV_RULE_ACTIVE  Indicates that a rule is currently being drawn
- *			for a column.
- *			
- *
- *	TV_RULE_NEEDED  Indicates that a rule is needed (but not yet
- *			drawn) for a column.
- */
-
-#define TV_RULE_ACTIVE	(1<<15)
-#define TV_RULE_NEEDED	(1<<16)
-
-/*
- *  Selection related flags:
- *
- *	TV_SELECT_Blt_Export	Export the selection to X11.
- *
- *	TV_SELECT_PENDING	A "selection" command idle task is pending.
- *
- *	TV_SELECT_CLEAR		Clear selection flag of entry.
- *
- *	TV_SELECT_SET		Set selection flag of entry.
- *
- *	TV_SELECT_TOGGLE	Toggle selection flag of entry.
- *
- *	TV_SELECT_MASK		Mask of selection set/clear/toggle flags.
- *
- *	TV_SELECT_SORTED	Indicates if the entries in the selection 
- *				should be sorted or displayed in the order 
- *				they were selected.
- *
- */
-#define TV_SELECT_CLEAR		(1<<16)
-#define TV_SELECT_EXPORT	(1<<17) 
-#define TV_SELECT_PENDING	(1<<18)
-#define TV_SELECT_SET		(1<<19)
-#define TV_SELECT_TOGGLE	(TV_SELECT_SET | TV_SELECT_CLEAR)
-#define TV_SELECT_MASK		(TV_SELECT_SET | TV_SELECT_CLEAR)
-#define TV_SELECT_SORTED	(1<<20)
-
-/*
- *  Miscellaneous flags:
- *
- *	TV_ALLOW_DUPLICATES	When inserting new entries, create 
- *			        duplicate entries.
- *
- *	TV_FILL_ANCESTORS	Automatically create ancestor entries 
- *				as needed when inserting a new entry.
- *
- *	HIDE_ROOT		Don't display the root entry.
- *
- *	TV_HIDE_LEAVES		Don't display entries that are leaves.
- *
- *	TV_SHOW_COLUMN_TITLES	Indicates whether to draw titles over each
- *				column.
- *
- */
-#define TV_ALLOW_DUPLICATES	(1<<21)
-#define TV_FILL_ANCESTORS	(1<<22)
-#define HIDE_ROOT		(1<<23) 
-#define TV_HIDE_LEAVES		(1<<24) 
-#define TV_SHOW_COLUMN_TITLES	(1<<25)
-#define TV_SORT_AUTO		(1<<26)
-#define TV_NEW_TAGS		(1<<27)
-#define TV_HIGHLIGHT_CELLS	(1<<28)
-
-#define TV_ITEM_COLUMN	1
-#define TV_ITEM_RULE	2
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Internal entry flags:
- *
- *	ENTRY_HAS_BUTTON	Indicates that a button needs to be
- *				drawn for this entry.
- *
- *	ENTRY_CLOSED		Indicates that the entry is closed and
- *				its subentries are not displayed.
- *
- *	ENTRY_HIDE		Indicates that the entry is hidden (i.e.
- *				can not be viewed by opening or scrolling).
- *
- *	BUTTON_AUTO
- *	BUTTON_SHOW
- *	BUTTON_MASK
- *
- *---------------------------------------------------------------------------
- */
-#define ENTRY_CLOSED		(1<<0)
-#define ENTRY_HIDE		(1<<1)
-#define ENTRY_NOT_LEAF		(1<<2)
-#define ENTRY_MASK		(ENTRY_CLOSED | ENTRY_HIDE)
-
-#define ENTRY_HAS_BUTTON	(1<<3)
-#define ENTRY_ICON		(1<<4)
-#define ENTRY_REDRAW		(1<<5)
-#define ENTRY_LAYOUT_PENDING	(1<<6)
-#define ENTRY_DATA_CHANGED	(1<<7)
-#define ENTRY_DIRTY		(ENTRY_DATA_CHANGED | ENTRY_LAYOUT_PENDING)
-
-#define BUTTON_AUTO		(1<<8)
-#define BUTTON_SHOW		(1<<9)
-#define BUTTON_MASK		(BUTTON_AUTO | BUTTON_SHOW)
-
-#define ENTRY_EDITABLE		(1<<10)
-#define ENTRY_SELECTED		(1<<11)
-
-#define COLUMN_RULE_PICKED	(1<<1)
-#define COLUMN_DIRTY		(1<<2)
-
-#define STYLE_TEXTBOX		(0)
-#define STYLE_COMBOBOX		(1)
-#define STYLE_CHECKBOX		(2)
-#define STYLE_TYPE		0x3
-
-#define STYLE_LAYOUT		(1<<3)
-#define STYLE_DIRTY		(1<<4)
-#define STYLE_HIGHLIGHT		(1<<5)
-#define STYLE_USER		(1<<6)
-
-#define STYLE_EDITABLE		(1<<10)
-
-typedef struct _TreeViewColumn TreeViewColumn;
-typedef struct _TreeViewCombobox TreeView_Combobox;
-typedef struct _TreeViewEntry TreeViewEntry;
-typedef struct _TreeView TreeView;
-typedef struct _TreeViewStyleClass TreeViewStyleClass;
-typedef struct _TreeViewStyle TreeViewStyle;
-
-typedef int (TreeViewCompareProc)(Tcl_Interp *interp, const char *name, 
-	const char *pattern);
-
-typedef TreeViewEntry *(TreeViewIterProc)(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-
-typedef struct {
-    int tagType;
-    TreeView *viewPtr;
-    Blt_HashSearch cursor;
-    TreeViewEntry *entryPtr;
-} TreeViewTagIter;
-
-/*
- * TreeViewIcon --
- *
- *	Since instances of the same Tk image can be displayed in
- *	different windows with possibly different color palettes, Tk
- *	internally stores each instance in a linked list.  But if
- *	the instances are used in the same widget and therefore use
- *	the same color palette, this adds a lot of overhead,
- *	especially when deleting instances from the linked list.
- *
- *	For the treeview widget, we never need more than a single
- *	instance of an image, regardless of how many times it's used.
- *	Cache the image, maintaining a reference count for each
- *	image used in the widget.  It's likely that the treeview
- *	widget will use many instances of the same image (for example
- *	the open/close icons).
- */
-
-typedef struct _TreeViewIcon {
-    Tk_Image tkImage;			/* The Tk image being cached. */
-    int refCount;			/* Reference count for this image. */
-    short int width, height;		/* Dimensions of the cached image. */
-    Blt_HashEntry *hashPtr;		/* Hash table pointer to the image. */
-} *TreeViewIcon;
-
-#define TreeView_IconHeight(icon)	((icon)->height)
-#define TreeView_IconWidth(icon)	((icon)->width)
-#define TreeView_IconBits(icon)		((icon)->tkImage)
-
-/*
- * TreeViewColumn --
- *
- *	A column describes how to display a field of data in the tree.  It may
- *	display a title that you can bind to. It may display a rule for
- *	resizing the column.  Columns may be hidden, and have attributes
- *	(foreground color, background color, font, etc) that override those
- *	designated globally for the treeview widget.
- */
-struct _TreeViewColumn {
-    int type;				/* Always TV_COLUMN */
-    Blt_TreeKey key;			/* Data cell identifier for current
-					 * tree. */
-    int position;			/* Position of column in list.  Used
-					 * to indicate the first and last
-					 * columns. */
-    UID tagsUid;			/* List of binding tags for this
-					 * entry.  UID, not a string, because
-					 * in the typical case most columns
-					 * will have the same bindtags. */
-
-    TreeView *viewPtr;
-    unsigned int flags;
-
-    /* Title-related information */
-    const char *title;			/* Text displayed in column heading as
-					 * its title. By default, this is the
-					 * same as the data cell name. */
-    Blt_Font titleFont;			/* Font to draw title in. */
-    XColor *titleFgColor;		/* Foreground color of text displayed
-					 * in the heading */
-    Blt_Background titleBg;		/* Background color of the heading. */
-    GC titleGC;
-    XColor *activeTitleFgColor;		/* Foreground color of the heading
-					 * when the column is activated.*/
-    Blt_Background activeTitleBg;	
-
-    int titleBW;
-    int titleRelief;
-
-    GC activeTitleGC;
-
-    TextLayout *titleTextPtr;
-    short int titleWidth, titleHeight;
-
-    TreeViewIcon titleIcon;		/* Icon displayed in column heading */
-    const char *titleCmd;		/* TCL script to be executed by the
-					 * column's "invoke" operation. */
-    const char *sortCmd;		/* TCL script used to compare two
-					 * columns. */
-
-    /* General information. */
-    int hidden;				/* Indicates if the column is
-					 * displayed */
-    int state;				/* Indicates if column title can
-					 * invoked. */
-    int editable;			/* Indicates if column can be
-					   edited. */
-
-    int max;				/* Maximum space allowed for
-					 * column. */
-    int reqMin, reqMax;			/* Requested bounds on the width of
-					 * column.  Does not include any
-					 * padding or the borderwidth of
-					 * column.  If non-zero, overrides the
-					 * computed width of the column. */
-
-    int reqWidth;			/* User-requested width of
-					 * column. Does not include any
-					 * padding or the borderwidth of
-					 * column.  If non-zero, overrides the
-					 * computed column width. */
-
-    int maxWidth;			/* Width of the widest entry in the
-					 * column. */
-
-    int worldX;			/* Starting world x-coordinate of the
-				 * column. */
-
-    double weight;		/* Growth factor for column.  Zero indicates
-				 * that the column can not be resized. */
-
-    int width;			/* Computed width of column. */
-
-    TreeViewStyle *stylePtr;	/* Default style for column. */
-
-    Blt_Background bg;		/* Background color of column. */
-    int borderWidth;		/* Border width of the column. */
-    int relief;			/* Relief of the column. */
-    Blt_Pad pad;		/* Horizontal padding on either side of the
-				 * column. */
-
-    Tk_Justify justify;		/* Indicates how the text or icon is
-				 * justified within the column. */
-
-    Blt_ChainLink link;
-    
-    int ruleLineWidth;
-    Blt_Dashes ruleDashes;
-    GC ruleGC;
-};
-
-
-struct _TreeViewStyle {
-    int refCount;		/* Usage reference count.  A reference count
-				 * of zero indicates that the style may be
-				 * freed. */
-    unsigned int flags;		/* Bit field containing both the style type
-				 * and various flags. */
-    const char *name;		/* Instance name. */
-    TreeViewStyleClass *classPtr; 
-				/* Contains class-specific information such as
-				 * configuration specifications and configure,
-				 * draw, etc. routines. */
-    Blt_HashEntry *hashPtr;	/* If non-NULL, points to the hash table entry
-				 * for the style.  A style that's been
-				 * deleted, but still in use (non-zero
-				 * reference count) will have no hash table
-				 * entry.
-				 */
-    Blt_ChainLink link;		/* If non-NULL, container for the style in a
-				 * list of all newly created styles. */
-    /* General style fields. */
-    Tk_Cursor cursor;			/* X Cursor */
-
-    TreeViewIcon icon;			/* If non-NULL, is a Tk_Image to be
-					 * drawn in the cell. */
-    int gap;				/* # pixels gap between icon and
-					 * text. */
-    Blt_Font font;
-    XColor *fgColor;			/* Normal foreground color of cell. */
-    XColor *highlightFgColor;		/* Foreground color of cell when
-					 * highlighted. */
-    XColor *activeFgColor;		/* Foreground color of cell when
-					 * active. */
-    XColor *selFgColor;			/* Foreground color of a selected
-					 * cell. If non-NULL, overrides
-					 * default foreground color
-					 * specification. */
-    Blt_Background bg;			/* Normal background color of cell. */
-    Blt_Background highlightBg;		/* Background color of cell when
-					 * highlighted. */
-    Blt_Background activeBg;		/* Background color of cell when
-					 * active. */
-
-    Blt_Background selBg;		/* Background color of a selected
-					 * cell.  If non-NULL, overrides the
-					 * default background * color
-					 * specification. */
-    const char *validateCmd;
-
-};
-
-typedef struct _TreeViewValue {
-    TreeViewColumn *columnPtr;		/* Column in which the value is
-					 * located. */
-    size_t width, height;		/* Dimensions of value. */
-    TreeViewStyle *stylePtr;		/* Style information for cell
-					 * displaying value. */
-    const char *string;			/* Raw text string. */
-    TextLayout *textPtr;	       /* Processes string to be displayed .*/
-    struct _TreeViewValue *nextPtr;
-} TreeViewValue;
-    
-typedef void (StyleConfigProc)(TreeView *viewPtr, TreeViewStyle *stylePtr);
-typedef void (StyleDrawProc)(TreeView *viewPtr, Drawable drawable, 
-	TreeViewEntry *entryPtr, TreeViewValue *valuePtr, 
-	TreeViewStyle *stylePtr, int x, int y);
-typedef int (StyleEditProc)(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-	TreeViewColumn *colPtr, TreeViewStyle *stylePtr);
-typedef void (StyleFreeProc)(TreeView *viewPtr, TreeViewStyle *stylePtr);
-typedef void (StyleMeasureProc)(TreeView *viewPtr, TreeViewStyle *stylePtr, 
-	TreeViewValue *valuePtr);
-typedef int (StylePickProc)(TreeViewEntry *entryPtr, TreeViewValue *valuePtr, 
-	TreeViewStyle *stylePtr, int x, int y);
-
-struct _TreeViewStyleClass {
-    const char *className;		/* Class name of the style */
-    Blt_ConfigSpec *specsPtr;		/* Style configuration
-					 * specifications */
-    StyleConfigProc *configProc;	/* Sets the GCs for style. */
-    StyleMeasureProc *measProc;		/* Measures the area needed for the
-					 * value with this style. */
-    StyleDrawProc *drawProc;		/* Draw the value in it's style. */
-    StylePickProc *pickProc;		/* Routine to pick the style's button.
-					 * Indicates if the mouse pointer is
-					 * over the style's button (if it has
-					 * one). */
-    StyleEditProc *editProc;		/* Routine to edit the style's
-					 * value. */
-    StyleFreeProc *freeProc;		/* Routine to free the style's
-					 * resources. */
-};
-
-/*
- * TreeViewEntry --
- *
- *	Contains data-specific information how to represent the data
- *	of a node of the hierarchy.
- *
- */
-struct _TreeViewEntry {
-    Blt_TreeNode node;			/* Node containing entry */
-    int worldX, worldY;			/* X-Y position in world coordinates
-					 * where the entry is positioned. */
-    size_t width, height;		/* Dimensions of the entry. This
-					 * includes the size of its columns. */
-    int reqHeight;			/* Requested height of the entry.
-					 * Overrides computed height. */
-    int vertLineLength;			/* Length of the vertical line
-					 * segment. */
-    short int lineHeight;		/* Height of first line of text. */
-    unsigned short int flags;		/* Flags for this entry. For the
-					 * definitions of the various bit
-					 * fields see below. */
-    UID tagsUid;			/* List of binding tags for this
-					 * entry. UID, not a string, because
-					 * in the typical case most entries
-					 * will have the same bindtags. */
-    TreeView *viewPtr;
-    UID openCmd, closeCmd;		/* TCL commands to invoke when entries
-					 * are opened or closed. They override
-					 * those specified globally. */
-    /*
-     * Button information:
-     */
-    short int buttonX, buttonY;		/* X-Y coordinate offsets from to
-					 * upper left corner of the entry to
-					 * the upper-left corner of the
-					 * button.  Used to pick the button
-					 * quickly */
-    TreeViewIcon *icons;		/* Tk images displayed for the entry.
-					 * The first image is the icon
-					 * displayed to the left of the
-					 * entry's label. The second is icon
-					 * displayed when entry is "open". */
-    TreeViewIcon *activeIcons;		/* Tk images displayed for the entry.
-					 * The first image is the icon
-					 * displayed to the left of the
-					 * entry's label. The second * is icon
-					 * displayed when entry is "open". */
-    short int iconWidth;
-    short int iconHeight;		/* Maximum dimensions for icons and
-					 * buttons for this entry. This is
-					 * used to align the button, icon, and
-					 * text. */
-    /*
-     * Label information:
-     */
-    TextLayout *textPtr;
-    short int labelWidth;
-    short int labelHeight;
-    UID labelUid;			/* Text displayed right of the
-					 * icon. */
-    Blt_Font font;			/* Font of label. Overrides global
-					 * font specification. */
-    const char *fullName;
-    int flatIndex;			/* Used to navigate to next/last entry
-					 * when the view is flat. */
-    Tcl_Obj *dataObjPtr;		/* pre-fetched data for sorting */
-    XColor *color;			/* Color of label. If non-NULL,
-					 * overrides default text color
-					 * specification. */
-    GC gc;
-    TreeViewValue *values;		/* List of column-related information
-					 * for each data value in the node.
-					 * Non-NULL only if there are value
-					 * entries. */
-};
-
-/*
- * TreeViewButton --
- *
- *	A button is the open/close indicator at the far left of the entry.  It
- *	is displayed as a plus or minus in a solid colored box with optionally
- *	an border. It has both "active" and "normal" colors.
- */
-typedef struct {
-    XColor *fgColor;			/* Foreground color. */
-
-    Blt_Background bg;			/* Background color. */
-
-    XColor *activeFgColor;		/* Active foreground color. */
-
-    Blt_Background activeBg;		/* Active background color. */
-
-    GC normalGC;
-    GC activeGC;
-
-    int reqSize;
-
-    int borderWidth;
-
-    int openRelief, closeRelief;
-
-    int width, height;
-
-    TreeViewIcon *icons;
-
-} TreeViewButton;
-
-/*
- * LevelInfo --
- *
- */
-typedef struct {
-    int x;
-    int iconWidth;
-    int labelWidth;
-} LevelInfo;
-
-/*
- * TreeView --
- *
- *	A TreeView is a widget that displays an hierarchical table of one
- *	or more entries.
- *
- *	Entries are positioned in "world" coordinates, referring to the
- *	virtual treeview.  Coordinate 0,0 is the upper-left corner of the root
- *	entry and the bottom is the end of the last entry.  The widget's Tk
- *	window acts as view port into this virtual space. The treeview's
- *	xOffset and yOffset fields specify the location of the view port in
- *	the virtual world.  Scrolling the viewport is therefore simply
- *	changing the xOffset and/or yOffset fields and redrawing.
- *
- *	Note that world coordinates are integers, not signed short integers
- *	like X11 screen coordinates.  It's very easy to create a hierarchy
- *	taller than 0x7FFF pixels.
- */
-struct _TreeView {
-    Tcl_Interp *interp;
-
-    Tcl_Command cmdToken;	/* Token for widget's TCL command. */
-
-    Blt_Tree tree;		/* Token holding internal tree. */
-    const char *treeName;	/* In non-NULL, is the name of the tree we are
-				 * attached to */
-    Blt_HashEntry *hashPtr;
-
-    /* TreeView_ specific fields. */ 
-
-    Tk_Window tkwin;		/* Window that embodies the widget.  NULL
-                                 * means that the window has been destroyed
-                                 * but the data structures haven't yet been
-                                 * cleaned up.*/
-
-    Display *display;		/* Display containing widget; needed, among
-                                 * other things, to release resources after
-                                 * tkwin has already gone away. */
-
-    Blt_HashTable entryTable;	/* Table of entry information, keyed by the
-				 * node pointer. */
-
-    Blt_HashTable columnTable;	/* Table of column information. */
-    Blt_Chain columns;		/* Chain of columns. Same as the hash table
-				 * above but maintains the order in which
-				 * columns are displayed. */
-
-    unsigned int flags;		/* For bitfield definitions, see below */
-
-    int inset;			/* Total width of all borders, including
-				 * traversal highlight and 3-D border.
-				 * Indicates how much interior stuff must be
-				 * offset from outside edges to leave room for
-				 * borders. */
-
-    Blt_Font font;
-    XColor *fgColor;
-
-    Blt_Background bg;		/* 3D border surrounding the window
-				 * (viewport). */
-    Blt_Background altBg;
-
-    int borderWidth;		/* Width of 3D border. */
-
-    int relief;			/* 3D border relief. */
-
-    int highlightWidth;		/* Width in pixels of highlight to draw around
-				 * widget when it has the focus.  <= 0 means
-				 * don't draw a highlight. */
-
-    XColor *highlightBgColor;	/* Color for drawing traversal highlight area
-				 * when highlight is off. */
-
-    XColor *highlightColor;	/* Color for drawing traversal highlight. */
-
-    const char *pathSep;	/* Pathname separators */
-
-    const char *trimLeft;	/* Leading characters to trim from
-				 * pathnames */
-
-    /*
-     * Entries are connected by horizontal and vertical lines. They may be
-     * drawn dashed or solid.
-     */
-    int lineWidth;		/* Width of lines connecting entries */
-
-    int dashes;			/* Dash on-off value. */
-
-    XColor *lineColor;		/* Color of connecting lines. */
-
-    /*
-     * Button Information:
-     *
-     * The button is the open/close indicator at the far left of the entry.
-     * It is usually displayed as a plus or minus in a solid colored box with
-     * optionally an border. It has both "active" and "normal" colors.
-     */
-    TreeViewButton button;
-
-    /*
-     * Selection Information:
-     *
-     * The selection is the rectangle that contains a selected entry.  There
-     * may be many selected entries.  It is displayed as a solid colored box
-     * with optionally a 3D border.
-     */
-    int selRelief;			/* Relief of selected items. Currently is
-					 * always raised. */
-
-    int selBW;				/* Border width of a selected entry.*/
-
-    XColor *selFgColor;			/* Text color of a selected entry. */
-    Blt_Background selBg;
-
-    TreeViewEntry *selAnchorPtr;	/* Fixed end of selection (i.e. entry
-					 * at which selection was started.) */
-    TreeViewEntry *selMarkPtr;
-    
-    GC selGC;
-    int	selectMode;			/* Selection style: "single" or
-					 * "multiple".  */
-
-    const char *selectCmd;		/* TCL script that's invoked whenever the
-					 * selection changes. */
-
-    Blt_HashTable selectTable;		/* Hash table of currently selected
-					 * entries. */
-
-    Blt_Chain selected;		       /* Chain of currently selected entries.
-					* Contains the same information as the
-					* above hash table, but maintains the
-					* order in which entries are
-					* selected. */
-
-    int leader;				/* Number of pixels padding between
-					 * entries. */
-
-    Tk_Cursor cursor;			/* X Cursor */
-
-    Tk_Cursor resizeCursor;		/* Resize Cursor */
-
-    int reqWidth, reqHeight;	       /* Requested dimensions of the treeview
-					* widget's window. */
-
-    GC lineGC;				/* GC for drawing dotted line between
-					 * entries. */
-
-    XColor *focusColor;
-
-    Blt_Dashes focusDashes;		/* Dash on-off value. */
-
-    GC focusGC;				/* Graphics context for the active
-					 * label. */
-
-    Tk_Window comboWin;		
-
-    TreeViewEntry *activePtr;		/* Last active entry. */ 
-
-    TreeViewEntry *focusPtr;		/* Entry that currently has focus. */
-
-    TreeViewEntry *activeBtnPtr;	/* Pointer to last active button */
-
-    TreeViewEntry *fromPtr;
-
-    TreeViewValue *activeValuePtr;	/* Last active value. */ 
-
-    int xScrollUnits, yScrollUnits;	/* # of pixels per scroll unit. */
-
-    /* Command strings to control horizontal and vertical scrollbars. */
-    Tcl_Obj *xScrollCmdObjPtr, *yScrollCmdObjPtr;
-
-    int scrollMode;			/* Selects mode of scrolling: either
-					 * BLT_SCROLL_MODE_HIERBOX, 
-					 * BLT_SCROLL_MODE_LISTBOX, or 
-					 * BLT_SCROLL_MODE_CANVAS. */
-    /*
-     * Total size of all "open" entries. This represents the range of world
-     * coordinates.
-     */
-    int worldWidth, worldHeight;
-
-    int xOffset, yOffset;		/* Translation between view port and
-					 * world origin. */
-    short int minHeight;		/* Minimum entry height. Used to to
-					 * compute what the y-scroll unit
-					 * should * be. */
-    short int titleHeight;		/* Height of column titles. */
-
-    LevelInfo *levelInfo;
-
-    /* Scanning information: */
-    int scanAnchorX, scanAnchorY;	/* Scan anchor in screen
-					 * coordinates. */
-    int scanX, scanY;			/* X-Y world coordinate where the scan
-					 * started. */
-    Blt_HashTable iconTable;		/* Table of Tk images */
-    Blt_HashTable uidTable;		/* Table of strings. */
-    Blt_HashTable styleTable;		/* Table of cell styles. */
-    Blt_Chain userStyles;		/* List of user-created styles. */
-    TreeViewEntry *rootPtr;		/* Root entry of tree. */
-    TreeViewEntry **visibleArr;		/* Array of visible entries. */
-    int nVisible;			/* # of entries in the visible array. */
-    int nEntries;			/* # of entries in tree. */
-    int treeWidth;			/* Computed width of the tree. */
-
-    int buttonFlags;			/* Global button indicator for all
-					 * entries.  This may be overridden by
-					 * the entry's -button option. */
-
-    const char *openCmd, *closeCmd;	/* TCL commands to invoke when entries
-					 * are opened or closed. */
-
-    TreeViewIcon *icons;		/* Tk images displayed for the entry.
-					 * The first image is the icon
-					 * displayed to the left of the
-					 * entry's label. The second is icon
-					 * displayed when entry is "open". */
-    TreeViewIcon *activeIcons;		/* Tk images displayed for the entry.
-					 * The first image is the icon
-					 * displayed to the left of the
-					 * entry's label. The second is icon
-					 * displayed when entry is "open". */
-    const char *takeFocus;
-
-    ClientData clientData;
-
-    Blt_BindTable bindTable;		/* Binding information for entries. */
-
-    Blt_HashTable entryTagTable;
-    Blt_HashTable buttonTagTable;
-    Blt_HashTable columnTagTable;
-    Blt_HashTable styleTagTable;
-
-    TreeViewStyle *stylePtr;		/* Default style for text cells */
-
-    TreeViewColumn treeColumn;
-    
-    TreeViewColumn *activeColumnPtr; 
-    TreeViewColumn *activeTitleColumnPtr;/* Column title currently active. */
-
-    TreeViewColumn *resizeColumnPtr;	/* Column that is being resized. */
-
-    size_t depth;
-    int flatView;			/* Indicates if the view of the tree
-					 * has been flattened. */
-    TreeViewEntry **flatArr;		/* Flattened array of entries. */
-    const char *sortField;		/* Field to be sorted. */
-
-    int sortType;			/* Type of sorting to be
-					 * performed. See below for valid
-					 * values. */
-    const char *sortCmd;		/* Sort command. */
-
-    int sortDecreasing;			/* Indicates entries should be sorted
-					 * in decreasing order. */
-    int viewIsDecreasing;		/* Current sorting direction */
-
-    TreeViewColumn *sortColumnPtr;	/* Column to use for sorting
-					 * criteria. */
-
-#ifdef notdef
-    Pixmap drawable;			/* Pixmap used to cache the entries
-					 * displayed.  The pixmap is saved so
-					 * that only selected elements can be
-					 * drawn quicky. */
-    short int drawWidth, drawHeight;
-#endif
-    short int ruleAnchor, ruleMark;
-
-    Blt_Pool entryPool;
-    Blt_Pool valuePool;
-};
-
-BLT_EXTERN UID Blt_TreeView_GetUid(TreeView *viewPtr, const char *string);
-BLT_EXTERN void Blt_TreeView_FreeUid(TreeView *viewPtr, UID uid);
-
-BLT_EXTERN void Blt_TreeView_EventuallyRedraw(TreeView *viewPtr);
-BLT_EXTERN Tcl_ObjCmdProc Blt_TreeView_WidgetInstCmd;
-BLT_EXTERN TreeViewEntry *Blt_TreeView_NearestEntry(TreeView *viewPtr, int x, 
-	int y, int flags);
-BLT_EXTERN const char *Blt_TreeView_GetFullName(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, int checkEntryLabel, Tcl_DString *dsPtr);
-BLT_EXTERN void Blt_TreeView_SelectCmdProc(ClientData clientData);
-BLT_EXTERN void Blt_TreeView_InsertText(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, const char *string, int extra, int insertPos);
-BLT_EXTERN void Blt_TreeView_ComputeLayout(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_PercentSubst(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, const char *command, Tcl_DString *resultPtr);
-BLT_EXTERN void Blt_TreeView_DrawButton(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, Drawable drawable, int x, int y);
-BLT_EXTERN void Blt_TreeView_DrawValue(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, TreeViewValue *valuePtr, Drawable drawable, 
-	int x, int y);
-BLT_EXTERN void Blt_TreeView_DrawOuterBorders(TreeView *viewPtr, 
-	Drawable drawable);
-BLT_EXTERN int Blt_TreeView_DrawLabel(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, Drawable drawable);
-BLT_EXTERN void Blt_TreeView_DrawHeadings(TreeView *viewPtr, Drawable drawable);
-BLT_EXTERN void Blt_TreeView_DrawRule(TreeView *viewPtr, TreeViewColumn *colPtr,
-	Drawable drawable);
-BLT_EXTERN void Blt_TreeView_ConfigureButtons(TreeView *viewPtr);
-BLT_EXTERN int Blt_TreeView_UpdateWidget(Tcl_Interp *interp, TreeView *viewPtr);
-BLT_EXTERN int Blt_TreeView_ScreenToIndex(TreeView *viewPtr, int x, int y);
-
-BLT_EXTERN void Blt_TreeView_FreeIcon(TreeView *viewPtr, TreeViewIcon icon);
-BLT_EXTERN TreeViewIcon Blt_TreeView_GetIcon(TreeView *viewPtr, 
-	const char *iconName);
-BLT_EXTERN void Blt_TreeView_AddValue(TreeViewEntry *entryPtr, 
-	TreeViewColumn *colPtr);
-BLT_EXTERN int Blt_TreeView_CreateColumn(TreeView *viewPtr, 
-	TreeViewColumn *colPtr, const char *name, const char *defLabel);
-BLT_EXTERN void Blt_TreeView_DestroyValue(TreeView *viewPtr, 
-	TreeViewValue *valuePtr);
-BLT_EXTERN TreeViewValue *Blt_TreeView_FindValue(TreeViewEntry *entryPtr, 
-	TreeViewColumn *colPtr);
-BLT_EXTERN void Blt_TreeView_DestroyColumns(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_AllocateColumnUids(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_FreeColumnUids(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_UpdateColumnGCs(TreeView *viewPtr, 
-	TreeViewColumn *colPtr);
-BLT_EXTERN TreeViewColumn *Blt_TreeView_NearestColumn(TreeView *viewPtr, 
-	int x, int y, ClientData *contextPtr);
-
-BLT_EXTERN int Blt_TreeView_TextOp(TreeView *viewPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-BLT_EXTERN int Blt_TreeView_CreateCombobox(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, TreeViewColumn *colPtr);
-BLT_EXTERN int Blt_TreeView_CreateEntry(TreeView *viewPtr, Blt_TreeNode node,
-	int objc, Tcl_Obj *const *objv, int flags);
-BLT_EXTERN int Blt_TreeView_ConfigureEntry(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, int objc, Tcl_Obj *const *objv, int flags);
-BLT_EXTERN int Blt_TreeView_OpenEntry(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN int Blt_TreeView_CloseEntry(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_NextEntry(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_PrevEntry(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-BLT_EXTERN int Blt_TreeView_GetEntry(TreeView *viewPtr, Tcl_Obj *objPtr, 
-	TreeViewEntry **entryPtrPtr);
-BLT_EXTERN int Blt_TreeView_EntryIsHidden(TreeViewEntry *entryPtr);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_NextSibling(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_PrevSibling(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_FirstChild(TreeViewEntry *parentPtr, 
-	unsigned int mask);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_LastChild(TreeViewEntry *entryPtr, 
-	unsigned int mask);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_ParentEntry(TreeViewEntry *entryPtr);
-
-typedef int (TreeViewApplyProc)(TreeView *viewPtr, TreeViewEntry *entryPtr);
-BLT_EXTERN int Blt_TreeView_Apply(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-	TreeViewApplyProc *proc, unsigned int mask);
-BLT_EXTERN int Blt_TreeView_ColumnOp(TreeView *viewPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-BLT_EXTERN int Blt_TreeView_SortOp(TreeView *viewPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-BLT_EXTERN int Blt_TreeView_GetColumn(Tcl_Interp *interp, TreeView *viewPtr, 
-	Tcl_Obj *objPtr, TreeViewColumn **colPtrPtr);
-
-BLT_EXTERN void Blt_TreeView_SortFlatView(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_SortView(TreeView *viewPtr);
-
-BLT_EXTERN int Blt_TreeView_EntryIsSelected(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN void Blt_TreeView_SelectEntry(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN void Blt_TreeView_DeselectEntry(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN void Blt_TreeView_PruneSelection(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN void Blt_TreeView_ClearSelection(TreeView *viewPtr);
-BLT_EXTERN void Blt_TreeView_ClearTags(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN int Blt_TreeView_FindTaggedEntries(TreeView *viewPtr, 
-	Tcl_Obj *objPtr, TreeViewTagIter *iterPtr);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_FirstTaggedEntry(
-	TreeViewTagIter *iterPtr); 
-BLT_EXTERN TreeViewEntry *Blt_TreeView_NextTaggedEntry(
-	TreeViewTagIter *iterPtr); 
-BLT_EXTERN ClientData Blt_TreeView_ButtonTag(TreeView *viewPtr, 
-	const char *string);
-BLT_EXTERN ClientData Blt_TreeView_EntryTag(TreeView *viewPtr, 
-	const char *string);
-BLT_EXTERN ClientData Blt_TreeView_ColumnTag(TreeView *viewPtr, 
-	const char *string);
-BLT_EXTERN void Blt_TreeView_GetTags(Tcl_Interp *interp, TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, Blt_List list);
-BLT_EXTERN void Blt_TreeView_TraceColumn(TreeView *viewPtr, 
-	TreeViewColumn *colPtr);
-BLT_EXTERN TreeViewIcon Blt_TreeView_GetEntryIcon(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr);
-BLT_EXTERN void Blt_TreeView_SetStyleIcon(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr, TreeViewIcon icon);
-BLT_EXTERN int Blt_TreeView_GetStyle(Tcl_Interp *interp, TreeView *viewPtr, 
-	const char *styleName, TreeViewStyle **stylePtrPtr);
-BLT_EXTERN void Blt_TreeView_FreeStyle(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr);
-BLT_EXTERN TreeViewStyle *Blt_TreeView_CreateStyle(Tcl_Interp *interp, 
-	TreeView *viewPtr, int type, const char *styleName);
-BLT_EXTERN void Blt_TreeView_UpdateStyleGCs(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr);
-BLT_EXTERN Blt_Background Blt_TreeView_GetStyleBackground(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr);
-BLT_EXTERN GC Blt_TreeView_GetStyleGC(TreeViewStyle *stylePtr);
-BLT_EXTERN Blt_Font Blt_TreeView_GetStyleFont(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr);
-BLT_EXTERN XColor *Blt_TreeView_GetStyleFg(TreeView *viewPtr, 
-	TreeViewStyle *stylePtr);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_NodeToEntry(TreeView *viewPtr, 
-	Blt_TreeNode node);
-BLT_EXTERN int Blt_TreeView_StyleOp(TreeView *viewPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-BLT_EXTERN TreeViewEntry *Blt_TreeView_FindEntry(TreeView *viewPtr, 
-	Blt_TreeNode node);
-BLT_EXTERN int Blt_TreeView_CreateTextbox(TreeView *viewPtr, 
-	TreeViewEntry *entryPtr, TreeViewColumn *colPtr);
-
-#define CHOOSE(default, override)	\
-	(((override) == NULL) ? (default) : (override))
-
-#define GETLABEL(e)		\
-	(((e)->labelUid != NULL)?(e)->labelUid:Blt_Tree_NodeLabel((e)->node))
-
-#define Blt_TreeView_GetData(entryPtr, key, objPtrPtr) \
-	Blt_Tree_GetValueByKey((Tcl_Interp *)NULL, (entryPtr)->viewPtr->tree, \
-	      (entryPtr)->node, key, objPtrPtr)
-
-#endif /* BLT_TREEVIEW_H */
diff --git a/blt3.0/src/bltTreeXml.c b/blt3.0/src/bltTreeXml.c
deleted file mode 100644
index 2ea76e6..0000000
--- a/blt3.0/src/bltTreeXml.c
+++ /dev/null
@@ -1,1040 +0,0 @@
-
-/*
- *
- * bltTreeXml.c --
- *
- *	Copyright 1998-2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <blt.h>
-
-#include "config.h"
-#include <tcl.h>
-
-#include <bltSwitch.h>
-#include <bltAssert.h>
-#include <bltAlloc.h>
-#include <bltTree.h>
-#include <string.h>
-
-#ifdef HAVE_CTYPE_H
-#  include <ctype.h>
-#endif /* HAVE_CTYPE_H */
-
-#define TRUE 	1
-#define FALSE 	0
-/*
- * The macro below is used to modify a "char" value (e.g. by casting
- * it to an unsigned character) so that it can be used safely with
- * macros such as isspace.
- */
-#define UCHAR(c) ((unsigned char) (c))
-
-DLLEXPORT extern Tcl_AppInitProc Blt_TreeXmlInit;
-
-static Blt_TreeImportProc ImportXmlProc;
-static Blt_TreeExportProc ExportXmlProc;
-
-extern char *Blt_Itoa(int);
-
-/*
- * Format	Import		Export
- * xml		file/data	file/data
- * html		file/data	file/data
- *
- * $tree import xml $node fileName -data dataString 
- * $table export xml $node -file defaultFileName 
- * $tree import html $node -file fileName -data dataString 
- * $table export html $node -file defaultFileName 
- */
-
-/*
- * ImportSwitches --
- */
-typedef struct {
-    Tcl_Obj *fileObj;	/* Name of file representing the channel. */
-    Tcl_Obj *dataObj;
-    Tcl_Interp *interp;
-    unsigned int flags;
-    Blt_TreeNode root;
-} ImportSwitches;
-
-#define IMPORT_TRIMCDATA  (1<<0)
-#define IMPORT_OVERWRITE  (1<<1)
-
-#define IMPORT_ATTRIBUTES (1<<2)
-#define IMPORT_BASEURI    (1<<3)
-#define IMPORT_CDATA	  (1<<4)
-#define IMPORT_COMMENTS	  (1<<5)
-#define IMPORT_DTD        (1<<6)
-#define IMPORT_LOCATION   (1<<7)
-#define IMPORT_PI         (1<<8)
-#define IMPORT_NS         (1<<9)
-#define IMPORT_ALL	  (IMPORT_ATTRIBUTES | IMPORT_COMMENTS | IMPORT_CDATA |\
-			   IMPORT_DTD |	IMPORT_PI | IMPORT_LOCATION | \
-			   IMPORT_BASEURI)
-
-#define SYM_BASEURI       "#baseuri"
-#define SYM_BYTEIDX       "#byteindex"
-#define SYM_CDATA         "#cdata"
-#define SYM_COLNO         "#column"
-#define SYM_COMMENT       "#comment"
-#define SYM_LINENO        "#line"
-#define SYM_NS		  "#namespace"
-#define SYM_NOTATION      "#notation"
-#define SYM_PI            "#pi"
-#define SYM_PUBID         "#publicid"
-#define SYM_SYSID         "#systemid"
-
-extern Blt_SwitchParseProc Blt_TreeNodeSwitchProc;
-
-static Blt_SwitchCustom nodeSwitch = {
-    Blt_TreeNodeSwitchProc, NULL, (ClientData)0,
-};
-
-static Blt_SwitchSpec importSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK,   "-all",		"",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_ALL},
-    {BLT_SWITCH_BOOLEAN,   "-comments",		"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_COMMENTS},
-    {BLT_SWITCH_OBJ,      "-data",		"data",
-	Blt_Offset(ImportSwitches, dataObj),	0, 0},
-    {BLT_SWITCH_OBJ,      "-file",		"fileName",
-	Blt_Offset(ImportSwitches, fileObj),	0, 0},
-    {BLT_SWITCH_BOOLEAN,  "-locations",		"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_LOCATION},
-    {BLT_SWITCH_CUSTOM,   "-root",		"node",
-	Blt_Offset(ImportSwitches, root),	0, 0, &nodeSwitch},
-    {BLT_SWITCH_BOOLEAN,  "-attributes",	"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_ATTRIBUTES},
-    {BLT_SWITCH_BOOLEAN,  "-namespace",		"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_NS},
-    {BLT_SWITCH_BOOLEAN,  "-cdata",		"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_CDATA},
-    {BLT_SWITCH_BOOLEAN,   "-overwrite",	"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_OVERWRITE},
-    {BLT_SWITCH_BOOLEAN,   "-processinginstructions",  "bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_PI},
-    {BLT_SWITCH_BOOLEAN,   "-trimwhitespace",	"bool",
-	Blt_Offset(ImportSwitches, flags),	0, IMPORT_TRIMCDATA},
-    {BLT_SWITCH_END}
-};
-
-/*
- * ExportSwitches --
- */
-typedef struct {
-    Tcl_Obj *fileObj;
-    Tcl_Obj *dataObj;
-    Blt_TreeNode root;
-
-    /* Private fields. */
-    Tcl_Interp *interp;
-    unsigned int flags;
-    Tcl_Channel channel;	/* If non-NULL, channel to write output to. */
-    Tcl_DString *dsPtr;
-} ExportSwitches;
-
-static Blt_SwitchSpec exportSwitches[] = 
-{
-    {BLT_SWITCH_OBJ, "-data", "data",
-	Blt_Offset(ExportSwitches, dataObj), 0, 0},
-    {BLT_SWITCH_OBJ, "-file", "fileName",
-	Blt_Offset(ExportSwitches, fileObj), 0, 0},
-    {BLT_SWITCH_END}
-};
-
-#ifdef HAVE_LIBEXPAT
-#include <expat.h>
-
-typedef struct {
-    Blt_Tree tree;
-    Blt_TreeNode root;
-    Blt_TreeNode parent;
-    Tcl_Interp *interp;
-    int flags;
-    Blt_HashTable stringTable;
-    XML_Parser parser;
-} ImportData;
-
-
-static Tcl_Obj *
-GetStringObj(ImportData *importPtr, const char *string)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    hPtr = Blt_CreateHashEntry(&importPtr->stringTable, string, &isNew);
-    if (isNew) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Tcl_NewStringObj(string, -1);
-	Tcl_IncrRefCount(objPtr);
-	Blt_SetHashValue(hPtr, objPtr);
-	return objPtr;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-static const char *
-GetBaseUri(ImportData *importPtr, Blt_TreeNode node)
-{
-    Blt_TreeNode top;
-
-    top = Blt_Tree_ParentNode(importPtr->root);
-    do {
-	if (Blt_Tree_ValueExists(importPtr->tree, node, SYM_BASEURI)) {
-	    Tcl_Obj *objPtr;
-
-	    if (Blt_Tree_GetValue((Tcl_Interp *)NULL, importPtr->tree, node, 
-			SYM_BASEURI, &objPtr) == TCL_OK) {
-		return Tcl_GetString(objPtr);
-	    }
-	}
-	node = Blt_Tree_ParentNode(node);
-    } while (node != top);
-    return NULL;
-}
-
-static void
-SetLocation(ImportData *importPtr, Blt_TreeNode node)
-{
-    Blt_Tree_SetValue(importPtr->interp, importPtr->tree, node, SYM_LINENO, 
-	Tcl_NewIntObj(XML_GetCurrentLineNumber(importPtr->parser)));
-    Blt_Tree_SetValue(importPtr->interp, importPtr->tree, node, SYM_COLNO, 
-	Tcl_NewIntObj(XML_GetCurrentColumnNumber(importPtr->parser)));
-    Blt_Tree_SetValue(importPtr->interp, importPtr->tree, node, SYM_BYTEIDX, 
-	Tcl_NewLongObj(XML_GetCurrentByteIndex(importPtr->parser)));
-}
-
-static void
-GetNotationProc(
-    void *userData,
-    const XML_Char *notationName,
-    const XML_Char *base,
-    const XML_Char *systemId,
-    const XML_Char *publicId)
-{
-    ImportData *importPtr = userData;
-
-    if (publicId != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, 
-		importPtr->parent, SYM_PUBID, Tcl_NewStringObj(publicId, -1));
-    }
-    if (systemId != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, 
-		importPtr->parent, SYM_SYSID, Tcl_NewStringObj(systemId, -1));
-    } 
-    if (base != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, 
-		importPtr->parent, SYM_BASEURI, Tcl_NewStringObj(base, -1));
-    }
-    if (notationName != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, 
-		importPtr->parent, SYM_NOTATION, 
-		Tcl_NewStringObj(notationName, -1));
-    }
-}
-
-static void
-GetCommentProc(void *userData, const XML_Char *string) 
-{
-    ImportData *importPtr = userData;
-
-    if ((importPtr->flags & IMPORT_DTD) == 0) {
-	Blt_Tree tree;
-	Blt_TreeNode child;
-	Tcl_Obj *objPtr;
-
-	tree = importPtr->tree;
-	objPtr = GetStringObj(importPtr, string);
-	child = Blt_Tree_CreateNode(tree, importPtr->parent, SYM_COMMENT, -1);
-	Blt_Tree_SetValue(importPtr->interp, tree, child, SYM_COMMENT, objPtr);
-	if (importPtr->flags & IMPORT_LOCATION) {
-	    SetLocation(importPtr, child);
-	}
-    }
-}
-
-static void
-GetProcessingInstructionProc(
-    void *userData, 
-    const char *target, 
-    const char *data)
-{
-    ImportData *importPtr = userData;
-
-    if ((importPtr->flags & IMPORT_DTD) == 0) {
-	Tcl_Obj *objPtr;
-	Blt_Tree tree;
-	Blt_TreeNode child;
-
-	tree = importPtr->tree;
-	objPtr = GetStringObj(importPtr, data);
-	child = Blt_Tree_CreateNode(tree, importPtr->parent, SYM_PI, -1);
-	Blt_Tree_SetValue(importPtr->interp, tree, child, target, objPtr);
-	if (importPtr->flags & IMPORT_LOCATION) {
-	    SetLocation(importPtr, child);
-	}
-    }
-}
-
-static void
-GetCharacterDataProc(void *userData, const XML_Char *string, int length) 
-{
-    ImportData *importPtr = userData;
-    Blt_Tree tree;
-    Blt_TreeNode child;
-    Tcl_Obj *objPtr;
-
-    if (importPtr->flags & IMPORT_TRIMCDATA) {
-	const char *p, *pend;
-
-	for (p = string, pend = p + length; p < pend; p++) {
-	    if (!isspace(UCHAR(*p))) {
-		break;
-	    }
-	}
-	if (p == pend) {
-	    return;
-	}
-	length = pend - p;
-	string = p;
-    }
-    tree = importPtr->tree;
-    child = Blt_Tree_LastChild(importPtr->parent);
-    if ((child != NULL) && (strcmp(Blt_Tree_NodeLabel(child), SYM_CDATA)==0)) {
-
-	/* Last child added was a CDATA node, append new data to it.  */
-	
-	if (Blt_Tree_GetValue(importPtr->interp, tree, child, SYM_CDATA, 
-		&objPtr) == TCL_OK) {
-	    Tcl_AppendToObj(objPtr, string, length);
-	    return;
-	}
-    } 
-    objPtr = Tcl_NewStringObj(string, length);
-    child = Blt_Tree_CreateNode(tree, importPtr->parent, SYM_CDATA,-1);
-    Blt_Tree_SetValue(importPtr->interp, tree, child, SYM_CDATA, objPtr);
-    if (importPtr->flags & IMPORT_LOCATION) {
-	SetLocation(importPtr, child);
-    }
-}
-
-static void
-DumpStringTable(Blt_HashTable *tablePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Tcl_Obj *objPtr;
-
-	objPtr = Blt_GetHashValue(hPtr);
-	Tcl_DecrRefCount(objPtr);
-    }
-    Blt_DeleteHashTable(tablePtr);
-}
-
-static void
-StartDocTypeProc(
-    void       *userData,
-    const char *doctypeName,
-    const char *systemId,
-    const char *publicId,
-    int         has_internal_subset)
-{   
-    ImportData *importPtr = userData;
-
-    if (publicId != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, importPtr->root, 
-		SYM_PUBID, Tcl_NewStringObj(publicId, -1));
-    }
-    if (systemId != NULL) {
-	Blt_Tree_SetValue(importPtr->interp, importPtr->tree, importPtr->root, 
-		SYM_SYSID, Tcl_NewStringObj(systemId, -1));
-    } 
-    importPtr->flags |= IMPORT_DTD;
-}
-
-static void
-EndDocTypeProc(void *userData)
-{
-    ImportData *importPtr = userData;
-
-    importPtr->flags &= ~IMPORT_DTD;
-}
-
-
-
-static void
-StartElementProc(void *userData, const char *element, const char **attr) 
-{
-    Blt_TreeNode child;
-    ImportData *importPtr = userData;
-    Blt_Tree tree;
-
-    tree = importPtr->tree;
-    child = NULL;
-    if (importPtr->flags & IMPORT_OVERWRITE) {
-	child = Blt_Tree_FindChild(importPtr->parent, element);
-    }
-    if (child == NULL) {
-	child = Blt_Tree_CreateNode(tree, importPtr->parent, element, -1);
-    }
-    if (importPtr->flags & IMPORT_ATTRIBUTES) {
-	const char **p;
-
-	for (p = attr; *p != NULL; p += 2) {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = GetStringObj(importPtr, *(p+1));
-	    Blt_Tree_SetValue(importPtr->interp, tree, child, *p, objPtr);
-	}
-    }
-    if (importPtr->flags & IMPORT_LOCATION) {
-	SetLocation(importPtr, child);
-    }
-    if (importPtr->flags & IMPORT_BASEURI) {
-	const char *oldBase, *newBase;
-
-	newBase = XML_GetBase(importPtr->parser);
-	oldBase = GetBaseUri(importPtr, importPtr->parent);
-	assert(oldBase != NULL);
-	if (strcmp(oldBase, newBase) != 0) {
-	    Blt_Tree_SetValue(importPtr->interp, tree, importPtr->parent, 
-		SYM_BASEURI, Tcl_NewStringObj(newBase, -1));
-	}
-    }
-    importPtr->parent = child;	/* Increase depth.  */
-}
-
-static void
-EndElementProc(void *userData, const char *element) 
-{
-    ImportData *importPtr = userData;
-
-    importPtr->parent = Blt_Tree_ParentNode(importPtr->parent);
-}
-
-static int
-ReadXmlFromFile(
-    Tcl_Interp *interp, 
-    XML_Parser parser, 
-    const char *fileName)
-{
-    int closeChannel;
-    int done;
-    Tcl_Channel channel;
-
-    closeChannel = TRUE;
-    if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	int mode;
-	
-	channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	if (channel == NULL) {
-	    return FALSE;
-	}
-	if ((mode & TCL_READABLE) == 0) {
-	    Tcl_AppendResult(interp, "channel \"", fileName, 
-		"\" not opened for reading", (char *)NULL);
-	    return FALSE;
-	}
-	closeChannel = FALSE;
-    } else {
-	channel = Tcl_OpenFileChannel(interp, fileName, "r", 0);
-	if (channel == NULL) {
-	    return FALSE;	/* Can't open dump file. */
-	}
-    }
-    done = FALSE;
-    while (!done) {
-	int length;
-#define BUFFSIZE	8191
-	char buffer[BUFFSIZE+1];
-	
-	length = Tcl_Read(channel, buffer, sizeof(char) * BUFFSIZE);
-	if (length < 0) {
-	    Tcl_AppendResult(interp, "\nread error: ", Tcl_PosixError(interp),
-			     (char *)NULL);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return FALSE;
-	}
-	done = Tcl_Eof(channel);
-	if (!XML_Parse(parser, buffer, length, done)) {
-	    Tcl_AppendResult(interp, "\n", fileName, ":",
-			Blt_Itoa(XML_GetCurrentLineNumber(parser)), ": ",
-			"error: ", 
-			XML_ErrorString(XML_GetErrorCode(parser)), 
-			(char *)NULL);
-	    Tcl_AppendResult(interp, "\n", fileName, ":",
-			Blt_Itoa(XML_GetCurrentByteIndex(parser)), ": ",
-			"error: ", 
-			XML_ErrorString(XML_GetErrorCode(parser)), 
-			(char *)NULL);
-	    fprintf(stderr, "buffer=%.*s\n", 
-		(int)XML_GetCurrentByteIndex(parser), 
-		buffer);
-	    if (closeChannel) {
-		Tcl_Close(interp, channel);
-	    }
-	    return FALSE;
-	}
-    }
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    return TRUE;
-}
-
-
-static int
-GetExternalEntityRefProc(
-    XML_Parser parser, 
-    const XML_Char *context,
-    const XML_Char *base,
-    const XML_Char *systemId,
-    const XML_Char *publicId)
-{
-    ImportData *importPtr;
-    Tcl_DString ds;
-    Tcl_Interp *interp;
-    XML_Parser newParser, oldParser;
-    int result;
-
-    importPtr = XML_GetUserData(parser);
-    assert(importPtr != NULL);
-    interp = importPtr->interp;
-    Tcl_DStringInit(&ds);
-    if ((base != NULL) && (Tcl_GetPathType(systemId) == TCL_PATH_RELATIVE)) {
-	const char **argv;
-	const char **baseNames, **sysIdNames;
-	int argc;
-	int i, j;
-	int nBase, nSysId;
-
-	Tcl_SplitPath(base, &nBase, &baseNames);
-	Tcl_SplitPath(systemId, &nSysId, &sysIdNames);
-	argc = nBase + nSysId;
-	argv = Blt_Malloc(sizeof(char *) * (argc + 1));
-	if (argv == NULL) {
-	    return FALSE;
-	}
-	for (i = 0; i < nBase; i++) {
-	    argv[i] = baseNames[i];
-	}
-	for (j = 0; j < nSysId; j++, i++) {
-	    argv[i] = sysIdNames[j];
-	}
-	argv[i] = NULL;
-	Tcl_JoinPath(argc, argv, &ds);
-	Blt_Free(baseNames);
-	Blt_Free(sysIdNames);
-	Blt_Free(argv);
-    } else {
-	Tcl_DStringAppend(&ds, systemId, -1);
-    }
-    newParser = XML_ExternalEntityParserCreate(parser, context, NULL);
-    if (newParser == NULL) {
-	Tcl_AppendResult(interp, "can't create external entity ref parser", 
-			 (char *)NULL);
-	return FALSE;
-    }
-    oldParser = importPtr->parser;
-    importPtr->parser = newParser;
-    result = ReadXmlFromFile(interp, newParser, Tcl_DStringValue(&ds));
-    importPtr->parser = oldParser;
-    Tcl_DStringFree(&ds);
-    XML_ParserFree(newParser);
-    return result;
-}
-
-static int
-ImportXmlFile(
-    Tcl_Interp *interp, 
-    Blt_Tree tree, 
-    Blt_TreeNode parent, 
-    Tcl_Obj *objPtr,
-    unsigned int flags) 
-{
-    ImportData import;
-    XML_Parser parser;
-    int result;
-    char *fileName;
-
-    if (flags & IMPORT_NS) {
-	parser = XML_ParserCreateNS(NULL, ':');
-    } else {
-	parser = XML_ParserCreate(NULL);
-    }
-    if (parser == NULL) {
-	Tcl_AppendResult(interp, "can't create XML parser", (char *)NULL);
-	return TCL_ERROR;
-    }
-    import.flags = flags;
-    import.interp = interp;
-    import.parent = parent;
-    import.parser = parser;
-    import.root = parent;
-    import.tree = tree;
-    Blt_InitHashTable(&import.stringTable, BLT_STRING_KEYS);
-    XML_SetUserData(parser, &import);
-
-    fileName = Tcl_GetString(objPtr);
-    /* Set baseURI */
-    {
-	Tcl_DString ds;
-	int argc;
-	const char **argv;
-
-	Tcl_DStringInit(&ds);
-	Tcl_SplitPath(fileName, &argc, &argv);
-	Tcl_JoinPath(argc - 1, argv, &ds);
-	XML_SetBase(parser, Tcl_DStringValue(&ds));
-	if (flags & IMPORT_BASEURI) {
-	    Blt_Tree_SetValue(interp, tree, parent, SYM_BASEURI, 
-	       Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)));
-	}
-	Blt_Free(argv);
-	Tcl_DStringFree(&ds);
-    }
-    XML_SetExternalEntityRefHandler(parser, GetExternalEntityRefProc);
-    XML_SetElementHandler(parser, StartElementProc, EndElementProc);
-    if (flags & IMPORT_CDATA) {
-	XML_SetCharacterDataHandler(parser, GetCharacterDataProc);
-    }
-    if (flags & IMPORT_BASEURI) {
-	XML_SetNotationDeclHandler(parser, GetNotationProc);
-	XML_SetDoctypeDeclHandler(parser, StartDocTypeProc, EndDocTypeProc);
-    }
-    if (flags & IMPORT_PI) {
-	XML_SetProcessingInstructionHandler(parser, 
-		GetProcessingInstructionProc);
-    }
-    if (flags & IMPORT_COMMENTS) {
-	XML_SetCommentHandler(parser, GetCommentProc);
-    }
-    result = ReadXmlFromFile(interp, parser, fileName);
-    XML_ParserFree(parser);
-    DumpStringTable(&import.stringTable);
-    return (result) ? TCL_OK : TCL_ERROR;
-} 
-
-
-static int
-ImportXmlData(
-    Tcl_Interp *interp, 
-    Blt_Tree tree, 
-    Blt_TreeNode parent, 
-    Tcl_Obj *dataObjPtr,
-    unsigned int flags) 
-{
-    ImportData import;
-    XML_Parser parser;
-    char *string;
-    int length;
-    int result;
-
-    if (flags & IMPORT_NS) {
-	parser = XML_ParserCreateNS(NULL, ':');
-    } else {
-	parser = XML_ParserCreate(NULL);
-    }
-    if (parser == NULL) {
-	Tcl_AppendResult(interp, "can't create parser", (char *)NULL);
-	return TCL_ERROR;
-    }
-    import.flags = flags;
-    import.interp = interp;
-    import.parent = parent;
-    import.parser = parser;
-    import.root = parent;
-    import.tree = tree;
-    Blt_InitHashTable(&import.stringTable, BLT_STRING_KEYS);
-    XML_SetBase(parser, ".");
-    XML_SetUserData(parser, &import);
-    XML_SetExternalEntityRefHandler(parser, GetExternalEntityRefProc);
-    XML_SetElementHandler(parser, StartElementProc, EndElementProc);
-    if (flags & IMPORT_CDATA) {
-	XML_SetCharacterDataHandler(parser, GetCharacterDataProc);
-    }
-    if (flags & IMPORT_BASEURI) {
-	XML_SetNotationDeclHandler(parser, GetNotationProc);
-	XML_SetDoctypeDeclHandler(parser, StartDocTypeProc, EndDocTypeProc);
-    }
-    if (flags & IMPORT_PI) {
-	XML_SetProcessingInstructionHandler(parser, 
-		GetProcessingInstructionProc);
-    }
-    if (flags & IMPORT_COMMENTS) {
-	XML_SetCommentHandler(parser, GetCommentProc);
-    }
-    string = Tcl_GetStringFromObj(dataObjPtr, &length);
-    result = XML_Parse(parser, string, length, 1);
-    if (!result) {
-	Tcl_AppendResult(interp, "\nparse error at line ",
-		Blt_Itoa(XML_GetCurrentLineNumber(parser)), ":  ",
-		XML_ErrorString(XML_GetErrorCode(parser)),
-		(char *)NULL);
-    }
-    XML_ParserFree(parser);
-    DumpStringTable(&import.stringTable);
-    return (result) ? TCL_OK : TCL_ERROR;
-} 
-
-static int
-ImportXmlProc(
-    Tcl_Interp *interp, 
-    Blt_Tree tree, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    int result;
-    ImportSwitches switches;
-
-    memset(&switches, 0, sizeof(switches));
-    nodeSwitch.clientData = tree;
-    switches.root = Blt_Tree_RootNode(tree);
-    switches.flags = IMPORT_ATTRIBUTES | IMPORT_CDATA;
-    if (Blt_ParseSwitches(interp, importSwitches, objc - 3, objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if ((switches.dataObj != NULL) && (switches.fileObj != NULL)) {
-	Tcl_AppendResult(interp, "can't set both -file and -data switches.",
-			 (char *)NULL);
-	goto error;
-    }
-    if (switches.fileObj != NULL) {
-	result = ImportXmlFile(interp, tree, switches.root, switches.fileObj, 
-		switches.flags);
-    } else if (switches.dataObj != NULL) {
-	result = ImportXmlData(interp, tree, switches.root, switches.dataObj, 
-		switches.flags);
-    } else {
-	result = TCL_OK;
-    }
- error:
-    Blt_FreeSwitches(importSwitches, (char *)&switches, 0);
-    return result;
-}
-
-#endif /* HAVE_LIBEXPAT */
-
-static int
-XmlFlush(ExportSwitches *exportPtr) 
-{
-    int nWritten;
-    char *line;
-    int length;
-
-    line = Tcl_DStringValue(exportPtr->dsPtr);
-    length = Tcl_DStringLength(exportPtr->dsPtr);
-    nWritten = Tcl_Write(exportPtr->channel, line, length);
-    if (nWritten != length) {
-	Tcl_AppendResult(exportPtr->interp, "can't write xml element: ",
-		Tcl_PosixError(exportPtr->interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-    return TCL_OK;
-}
-
-static void
-XmlPutEscapeString(const char *from, size_t length, ExportSwitches *exportPtr)
-{
-    const char *p, *pend;
-
-    for (p = from, pend = from + length; p < pend; /*empty*/) {
-	switch (*p) {
-	case '\'': 
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "'", 6);
-	    break;
-	case '&':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "&", 5);
-	    break;
-	case '>':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, ">", 4);
-	    break; 
-	case '<':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, "<", 4);
-	    break; 
-	case '"':  
-	    if (p > from) {
-		Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-	    }
-	    from = ++p;
-	    Tcl_DStringAppend(exportPtr->dsPtr, """, 6);
-	    break;
-	default:  
-	    p++;
-	    break;
-	}
-    }	
-    if (p > from) {
-	Tcl_DStringAppend(exportPtr->dsPtr, from, p - from);
-    }
-}
-
-static void
-XmlOpenStartElement(ExportSwitches *exportPtr, Blt_TreeNode node)
-{
-    size_t i;
-
-    if (exportPtr->channel != NULL) {
-	Tcl_DStringSetLength(exportPtr->dsPtr, 0);
-    }
-    for (i = 0; i < Blt_Tree_NodeDepth(node); i++) {
-	Tcl_DStringAppend(exportPtr->dsPtr, "  ", 2);
-    }
-    Tcl_DStringAppend(exportPtr->dsPtr, "<", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, Blt_Tree_NodeLabel(node), -1);
-}
-
-static int
-XmlCloseStartElement(ExportSwitches *exportPtr)
-{
-    Tcl_DStringAppend(exportPtr->dsPtr, ">\n", 2);
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static int
-XmlEndElement(ExportSwitches *exportPtr, Blt_TreeNode node)
-{
-    size_t i;
-
-    Tcl_DStringAppend(exportPtr->dsPtr, "\n", 1);
-    for (i = 0; i < Blt_Tree_NodeDepth(node); i++) {
-	Tcl_DStringAppend(exportPtr->dsPtr, "  ", 2);
-    }
-    Tcl_DStringAppend(exportPtr->dsPtr, "</", 2);
-    Tcl_DStringAppend(exportPtr->dsPtr, Blt_Tree_NodeLabel(node), -1);
-    Tcl_DStringAppend(exportPtr->dsPtr, ">\n", 2);
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static void
-XmlAppendAttribute(
-    ExportSwitches *exportPtr, 
-    const char *attrName, 
-    const char *value, 
-    int length)
-{
-    size_t valueLen;
-
-    if (length < 0) {
-	valueLen = strlen(value);
-    } else {
-	valueLen = (size_t)length;
-    }
-    Tcl_DStringAppend(exportPtr->dsPtr, " ", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, attrName, -1);
-    Tcl_DStringAppend(exportPtr->dsPtr, "=", 1);
-    Tcl_DStringAppend(exportPtr->dsPtr, "\"", 1);
-    XmlPutEscapeString(value, valueLen, exportPtr);
-    Tcl_DStringAppend(exportPtr->dsPtr, "\"", 1);
-}
-
-static void
-XmlAppendCharacterData(
-    ExportSwitches *exportPtr, 
-    const char *string, 
-    int length)
-{
-    if (length < 0) {
-	length = strlen(string);
-    } 
-    Tcl_DStringAppend(exportPtr->dsPtr, "CDATA=(", -1);
-    XmlPutEscapeString(string, length, exportPtr);
-    Tcl_DStringAppend(exportPtr->dsPtr, ")", -1);
-}
-
-static int
-XmlExportElement(Blt_Tree tree, Blt_TreeNode parent, ExportSwitches *exportPtr)
-{
-    Blt_TreeKey key;
-    Blt_TreeKeyIterator iter;
-    Blt_TreeNode child;
-
-    if (strcmp(Blt_Tree_NodeLabel(parent), SYM_CDATA) == 0) {
-	Tcl_Obj *valueObjPtr;
-	const char *value;
-	int nBytes;
-
-	/* Just output the CDATA field. */
-	if (Blt_Tree_GetValue(exportPtr->interp, tree, parent, SYM_CDATA, 
-		&valueObjPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	value = Tcl_GetStringFromObj(valueObjPtr, &nBytes);
-	XmlAppendCharacterData(exportPtr, value, nBytes);
-	return TCL_OK;
-    }
-    XmlOpenStartElement(exportPtr, parent);
-    for (key = Blt_Tree_FirstKey(tree, parent, &iter); key != NULL; 
-	 key = Blt_Tree_NextKey(tree, &iter)) {
-	Tcl_Obj *valueObjPtr;
-	const char *value;
-	int nBytes;
-
-	if (Blt_Tree_GetValueByKey(exportPtr->interp, tree, parent, key,
-		&valueObjPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	value = Tcl_GetStringFromObj(valueObjPtr, &nBytes);
-	XmlAppendAttribute(exportPtr, key, value, nBytes);
-    }
-    XmlCloseStartElement(exportPtr);
-    for (child = Blt_Tree_FirstChild(parent); child != NULL; 
-	 child = Blt_Tree_NextSibling(child)) {
-	if (XmlExportElement(tree, child, exportPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return XmlEndElement(exportPtr, parent);
-}
-
-static int
-XmlExport(Blt_Tree tree, ExportSwitches *exportPtr)
-{
-    if (XmlExportElement(tree, exportPtr->root, exportPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (exportPtr->channel != NULL) {
-	return XmlFlush(exportPtr);
-    }
-    return TCL_OK;
-}
-
-static int
-ExportXmlProc(
-    Tcl_Interp *interp, 
-    Blt_Tree tree, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    ExportSwitches switches;
-    Tcl_Channel channel;
-    Tcl_DString ds;
-    int closeChannel;
-    int result;
-
-    closeChannel = FALSE;
-    channel = NULL;
-
-    Tcl_DStringInit(&ds);
-    memset(&switches, 0, sizeof(switches));
-    nodeSwitch.clientData = tree;
-    switches.root = Blt_Tree_RootNode(tree);
-    switches.flags = IMPORT_ATTRIBUTES | IMPORT_CDATA;
-    if (Blt_ParseSwitches(interp, exportSwitches, objc - 3 , objv + 3, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-    if (switches.fileObj != NULL) {
-	char *fileName;
-
-	closeChannel = TRUE;
-	fileName = Tcl_GetString(switches.fileObj);
-	if ((fileName[0] == '@') && (fileName[1] != '\0')) {
-	    int mode;
-	    
-	    channel = Tcl_GetChannel(interp, fileName+1, &mode);
-	    if (channel == NULL) {
-		goto error;
-	    }
-	    if ((mode & TCL_WRITABLE) == 0) {
-		Tcl_AppendResult(interp, "channel \"", fileName, 
-			"\" not opened for writing", (char *)NULL);
-		goto error;
-	    }
-	    closeChannel = FALSE;
-	} else {
-	    channel = Tcl_OpenFileChannel(interp, fileName, "w", 0666);
-	    if (channel == NULL) {
-		goto error;	/* Can't open export file. */
-	    }
-	}
-    }
-    switches.interp = interp;
-    switches.dsPtr = &ds;
-    switches.channel = channel;
-    result = XmlExport(tree, &switches); 
-    if ((switches.channel == NULL) && (result == TCL_OK)) {
-	Tcl_DStringResult(interp, &ds);
-    } 
- error:
-    Tcl_DStringFree(&ds);
-    if (closeChannel) {
-	Tcl_Close(interp, channel);
-    }
-    Blt_FreeSwitches(exportSwitches, (char *)&switches, 0);
-    return result;
-}
-
-int 
-Blt_TreeXmlInit(Tcl_Interp *interp)
-{
-    if (Tcl_PkgRequire(interp, "blt_core", BLT_VERSION, /*Exact*/1) == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_PkgProvide(interp, "blt_tree_xml", BLT_VERSION) != TCL_OK) { 
-	return TCL_ERROR;
-    }
-    return Blt_Tree_RegisterFormat(interp,
-        "xml",			/* Name of format. */
-#ifdef HAVE_LIBEXPAT
-	ImportXmlProc,		/* Import procedure. */
-#else
-	NULL,			/* Import procedure. */
-#endif	/* HAVE_LIBEXPAT */
-	ExportXmlProc);		/* Export procedure. */
-
-}
diff --git a/blt3.0/src/bltTri.c b/blt3.0/src/bltTri.c
deleted file mode 100644
index 3db9bc2..0000000
--- a/blt3.0/src/bltTri.c
+++ /dev/null
@@ -1,746 +0,0 @@
-#include "bltInt.h"
-#include "bltChain.h"
-
-#define DELETED		((Edge *)-2)
-#define LE 0
-#define RE 1
-
-#define Dist(p,q)    \
-	hypot((p)->point.x - (q)->point.x, (p)->point.y - (q)->point.y)
-
-typedef struct _HalfEdge HalfEdge;
-typedef struct _FreeNode FreeNode;
-
-typedef struct {
-    int a, b, c;
-    float min, max;
-} Triplet;
-
-struct _FreeNode {
-    FreeNode *nextPtr;
-};
-
-typedef struct {
-    FreeNode *headPtr;
-    int nodesize;
-} FreeList;
-
-typedef struct {
-    Point2d point;
-    int neighbor;
-    int refCount;
-} Site;
-
-typedef struct {
-    double a, b, c;
-    Site *ep[2];
-    Site *leftReg, *rightReg;
-    int neighbor;
-} Edge;
-
-struct _HalfEdge {
-    HalfEdge *leftPtr, *rightPtr;
-    Edge *edgePtr;
-    int refCount;
-    int pm;
-    Site *vertex;
-    double ystar;
-    HalfEdge *pqNext;
-};
-
-/* Static variables */
-
-typedef struct {
-    double xMin, xMax, yMin, yMax, xDelta, yDelta;
-    Site *sites;
-    int nSites;
-    int siteIndex;
-    int sqrtNumSites;
-    int nVertices;
-    Site *bottomsite;
-    int nEdges;
-    FreeList freeSites;
-    FreeList freeEdges;
-    FreeList freeHalfEdges;
-    HalfEdge *elLeftEnd, *elRightEnd;
-    int elHashsize;
-    HalfEdge **elHash;
-    int pqHashsize;
-    HalfEdge *pqHash;
-    int pqCount;
-    int pqMin;
-    Blt_Chain allocChain;
-} Voronoi;
-
-static void
-FreeInit(FreeList *listPtr, int size)
-{
-    listPtr->headPtr = NULL;
-    listPtr->nodesize = size;
-}
-
-static void
-InitMemorySystem(Voronoi *v)
-{
-    if (v->allocChain == NULL) {
-	v->allocChain = Blt_Chain_Create();
-    }
-    FreeInit(&v->freeSites, sizeof(Site));
-}
-
-static void *
-AllocMemory(Voronoi *v, size_t size)
-{
-    void *ptr;
-
-    ptr = Blt_Malloc(size);
-    if (ptr == NULL) {
-	return NULL;
-    }
-    Blt_Chain_Append(v->allocChain, ptr);
-    return ptr;
-}
-    
-static void
-ReleaseMemorySystem(Voronoi *v)
-{
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_LastLink(v->allocChain); link != NULL;
-	link = Blt_Chain_PrevLink(link)) {
-	void *ptr;
-
-	ptr = Blt_Chain_GetValue(link);
-	if (ptr != NULL) {
-	    Blt_Free(ptr);
-	}
-    }
-    Blt_Chain_Destroy(v->allocChain);
-    v->allocChain = NULL;
-}
-
-INLINE static void
-MakeFree(void *item, FreeList *listPtr)
-{
-    FreeNode *nodePtr = item;
-
-    nodePtr->nextPtr = listPtr->headPtr;
-    listPtr->headPtr = nodePtr;
-}
-
-
-static void *
-GetFree(Voronoi *v, FreeList *listPtr)
-{
-    FreeNode *nodePtr;
-
-    if (listPtr->headPtr == NULL) {
-	int i;
-
-	nodePtr = AllocMemory(v, v->sqrtNumSites * listPtr->nodesize);
-	/* Thread the free nodes as a list */
-	for (i = 0; i < v->sqrtNumSites; i++) {
-	    MakeFree(((char *)nodePtr + i * listPtr->nodesize), listPtr);
-	}
-    }
-    nodePtr = listPtr->headPtr;
-    listPtr->headPtr = listPtr->headPtr->nextPtr;
-    return nodePtr;
-}
-
-INLINE static void
-DecrRefCount(Voronoi *v, Site *vertexPtr)
-{
-    vertexPtr->refCount--;
-    if (vertexPtr->refCount == 0) {
-	MakeFree(vertexPtr, &v->freeSites);
-    }
-}
-
-INLINE static void
-IncrRefCount(Site *vertexPtr)
-{
-    vertexPtr->refCount++;
-}
-
-INLINE static HalfEdge *
-HECreate(Voronoi *v, Edge *edgePtr, int pm)
-{
-    HalfEdge *hePtr;
-
-    hePtr = GetFree(v, &v->freeHalfEdges);
-    hePtr->edgePtr = edgePtr;
-    hePtr->pm = pm;
-    hePtr->pqNext = NULL;
-    hePtr->vertex = NULL;
-    hePtr->refCount = 0;
-    return hePtr;
-}
-
-
-static void
-ElInitialize(Voronoi *v)
-{
-    FreeInit(&v->freeHalfEdges, sizeof(HalfEdge));
-
-    v->elHashsize = 2 * v->sqrtNumSites;
-    v->elHash = AllocMemory(v, v->elHashsize * sizeof(HalfEdge *));
-    assert(v->elHash);
-    memset(v->elHash, 0, v->elHashsize * sizeof(HalfEdge *));
-
-    v->elLeftEnd = HECreate(v, (Edge *)NULL, 0);
-    v->elRightEnd = HECreate(v, (Edge *)NULL, 0);
-    v->elLeftEnd->leftPtr = NULL;
-    v->elLeftEnd->rightPtr = v->elRightEnd;
-    v->elRightEnd->leftPtr = v->elLeftEnd;
-    v->elRightEnd->rightPtr = NULL;
-    v->elHash[0] = v->elLeftEnd;
-    v->elHash[v->elHashsize - 1] = v->elRightEnd;
-}
-
-INLINE static void
-ElInsert(HalfEdge *lb, HalfEdge *edgePtr)
-{
-    edgePtr->leftPtr = lb;
-    edgePtr->rightPtr = lb->rightPtr;
-    lb->rightPtr->leftPtr = edgePtr;
-    lb->rightPtr = edgePtr;
-}
-
-static HalfEdge *
-ElGetHash(Voronoi *v, int b)
-{
-    HalfEdge *hePtr;
-
-    if ((b < 0) || (b >= v->elHashsize)) {
-	return NULL;
-    }
-    hePtr = v->elHash[b];
-    if ((hePtr == NULL) || (hePtr->edgePtr != DELETED)) {
-	return hePtr;
-    }
-    /* Hash table points to deleted half edge.  Patch as necessary. */
-
-    v->elHash[b] = NULL;
-    hePtr->refCount--;
-    if (hePtr->refCount == 0) {
-	MakeFree(hePtr, &v->freeHalfEdges);
-    }
-    return NULL;
-}
-
-static int
-RightOf(HalfEdge *hePtr, Point2d *p)
-{
-    Edge *e;
-    Site *topsite;
-    int rightOfSite, above, fast;
-    double dxp, dyp, dxs, t1, t2, t3, yl;
-
-    e = hePtr->edgePtr;
-    topsite = e->rightReg;
-    rightOfSite = p->x > topsite->point.x;
-    if ((rightOfSite) && (hePtr->pm == LE)) {
-	return 1;
-    }
-    if ((!rightOfSite) && (hePtr->pm == RE)) {
-	return 0;
-    }
-    if (e->a == 1.0) {
-	dyp = p->y - topsite->point.y;
-	dxp = p->x - topsite->point.x;
-	fast = 0;
-	if ((!rightOfSite & e->b < 0.0) | (rightOfSite & e->b >= 0.0)) {
-	    above = dyp >= e->b * dxp;
-	    fast = above;
-	} else {
-	    above = p->x + p->y * e->b > e->c;
-	    if (e->b < 0.0) {
-		above = !above;
-	    }
-	    if (!above) {
-		fast = 1;
-	    }
-	}
-	if (!fast) {
-	    dxs = topsite->point.x - (e->leftReg)->point.x;
-	    above = e->b * (dxp * dxp - dyp * dyp) <
-		dxs * dyp * (1.0 + 2.0 * dxp / dxs + e->b * e->b);
-	    if (e->b < 0.0) {
-		above = !above;
-	    }
-	}
-    } else {			/* e->b==1.0 */
-	yl = e->c - e->a * p->x;
-	t1 = p->y - yl;
-	t2 = p->x - topsite->point.x;
-	t3 = yl - topsite->point.y;
-	above = t1 * t1 > t2 * t2 + t3 * t3;
-    }
-    return (hePtr->pm == LE ? above : !above);
-}
-
-static HalfEdge *
-ElLeftBnd(Voronoi *v, Point2d *p)
-{
-    int i, bucket;
-    HalfEdge *hePtr;
-
-    /* Use hash table to get close to desired halfedge */
-
-    bucket = (p->x - v->xMin) / v->xDelta * v->elHashsize;
-    if (bucket < 0) {
-	bucket = 0;
-    } else if (bucket >= v->elHashsize) {
-	bucket = v->elHashsize - 1;
-    }
-    hePtr = ElGetHash(v, bucket);
-    if (hePtr == NULL) {
-	for (i = 1; /* empty */ ; i++) {
-	    hePtr = ElGetHash(v, bucket - i);
-	    if (hePtr != NULL) {
-		break;
-	    }
-	    hePtr = ElGetHash(v, bucket + i);
-	    if (hePtr != NULL) {
-		break;
-	    }
-	}
-    }
-
-    /* Now search linear list of halfedges for the correct one */
-
-    if ((hePtr == v->elLeftEnd) || 
-	(hePtr != v->elRightEnd && RightOf(hePtr, p))) {
-	do {
-	    hePtr = hePtr->rightPtr;
-	} while ((hePtr != v->elRightEnd) && (RightOf(hePtr, p)));
-	hePtr = hePtr->leftPtr;
-    } else {
-	do {
-	    hePtr = hePtr->leftPtr;
-	} while ((hePtr != v->elLeftEnd) && (!RightOf(hePtr, p)));
-    }
-
-    /* Update hash table and reference counts */
-
-    if ((bucket > 0) && (bucket < (v->elHashsize - 1))) {
-	if (v->elHash[bucket] != NULL) {
-	    v->elHash[bucket]->refCount--;
-	}
-	v->elHash[bucket] = hePtr;
-	v->elHash[bucket]->refCount++;
-    }
-    return hePtr;
-}
-
-/* 
- * This delete routine can't reclaim node, since pointers from hash table may
- * be present.
- */
-INLINE static void
-ElDelete(HalfEdge *hePtr)
-{
-    hePtr->leftPtr->rightPtr = hePtr->rightPtr;
-    hePtr->rightPtr->leftPtr = hePtr->leftPtr;
-    hePtr->edgePtr = DELETED;
-}
-
-INLINE static Site *
-LeftRegion(Voronoi *v, HalfEdge *hePtr)
-{
-    if (hePtr->edgePtr == NULL) {
-	return v->bottomsite;
-    }
-    return (hePtr->pm == LE) ? hePtr->edgePtr->leftReg : hePtr->edgePtr->rightReg;
-}
-
-INLINE static Site *
-RightRegion(Voronoi *v, HalfEdge *hePtr)
-{
-    if (hePtr->edgePtr == NULL) {
-	return v->bottomsite;
-    }
-    return (hePtr->pm == LE) ? hePtr->edgePtr->rightReg : hePtr->edgePtr->leftReg;
-}
-
-static void
-GeomInit(Voronoi *v)
-{
-    FreeInit(&v->freeEdges, sizeof(Edge));
-    v->nVertices = v->nEdges = 0;
-    v->sqrtNumSites = sqrt((double)(v->nSites + 4));
-    v->yDelta = v->xMax - v->xMax;
-    v->xDelta = v->yMax - v->yMin;
-}
-
-static Edge *
-Bisect(Voronoi *v, Site *s1, Site *s2)
-{
-    double dx, dy, adx, ady;
-    Edge *edgePtr;
-
-    edgePtr = GetFree(v, &v->freeEdges);
-
-    edgePtr->leftReg = s1;
-    edgePtr->rightReg = s2;
-    IncrRefCount(s1);
-    IncrRefCount(s2);
-    edgePtr->ep[0] = edgePtr->ep[1] = NULL;
-
-    dx = s2->point.x - s1->point.x;
-    dy = s2->point.y - s1->point.y;
-    adx = FABS(dx);
-    ady = FABS(dy);
-    edgePtr->c = (s1->point.x * dx) + (s1->point.y * dy) +
-	((dx * dx) + (dy * dy)) * 0.5;
-    if (adx > ady) {
-	edgePtr->a = 1.0;
-	edgePtr->b = dy / dx;
-	edgePtr->c /= dx;
-    } else {
-	edgePtr->b = 1.0;
-	edgePtr->a = dx / dy;
-	edgePtr->c /= dy;
-    }
-
-    edgePtr->neighbor = v->nEdges;
-    v->nEdges++;
-    return edgePtr;
-}
-
-static Site *
-Intersect(Voronoi *v, HalfEdge *hePtr1, HalfEdge *hePtr2)
-{
-    Edge *e1, *e2, *e;
-    HalfEdge *hePtr;
-    double d, xint, yint;
-    int rightOfSite;
-    Site *sitePtr;
-
-    e1 = hePtr1->edgePtr;
-    e2 = hePtr2->edgePtr;
-    if ((e1 == NULL) || (e2 == NULL)) {
-	return NULL;
-    }
-    if (e1->rightReg == e2->rightReg) {
-	return NULL;
-    }
-    d = (e1->a * e2->b) - (e1->b * e2->a);
-    if ((-1.0e-10 < d) && (d < 1.0e-10)) {
-	return NULL;
-    }
-    xint = ((e1->c * e2->b) - (e2->c * e1->b)) / d;
-    yint = ((e2->c * e1->a) - (e1->c * e2->a)) / d;
-
-    if ((e1->rightReg->point.y < e2->rightReg->point.y) ||
-	((e1->rightReg->point.y == e2->rightReg->point.y) &&
-	    (e1->rightReg->point.x < e2->rightReg->point.x))) {
-	hePtr = hePtr1;
-	e = e1;
-    } else {
-	hePtr = hePtr2;
-	e = e2;
-    }
-    rightOfSite = (xint >= e->rightReg->point.x);
-    if ((rightOfSite && hePtr->pm == LE) || (!rightOfSite && hePtr->pm == RE)) {
-	return NULL;
-    }
-    sitePtr = GetFree(v, &v->freeSites);
-    sitePtr->refCount = 0;
-    sitePtr->point.x = xint;
-    sitePtr->point.y = yint;
-    return sitePtr;
-}
-
-INLINE static void
-EndPoint(Voronoi *v, Edge *e, int lr, Site *s)
-{
-    e->ep[lr] = s;
-    IncrRefCount(s);
-    if (e->ep[RE - lr] == NULL) {
-	return;
-    }
-    DecrRefCount(v, e->leftReg);
-    DecrRefCount(v, e->rightReg);
-    MakeFree(e, &v->freeEdges);
-}
-
-INLINE static void
-MakeVertex(Voronoi *v, Site *vertex)
-{
-    vertex->neighbor = v->nVertices;
-    v->nVertices++;
-}
-
-static int
-PQBucket(Voronoi *v, HalfEdge *hePtr)
-{
-    int bucket;
-
-    bucket = (hePtr->ystar - v->yMin) / v->yDelta * v->pqHashsize;
-    if (bucket < 0) {
-	bucket = 0;
-    }
-    if (bucket >= v->pqHashsize) {
-	bucket = v->pqHashsize - 1;
-    }
-    if (bucket < v->pqMin) {
-	v->pqMin = bucket;
-    }
-    return bucket;
-}
-
-static void
-PQInsert(Voronoi *v, HalfEdge *hePtr, Site *vertex, double offset)
-{
-    HalfEdge *last, *next;
-
-    hePtr->vertex = vertex;
-    IncrRefCount(vertex);
-    hePtr->ystar = vertex->point.y + offset;
-    last = v->pqHash + PQBucket(v, hePtr);
-    while (((next = last->pqNext) != NULL) &&
-	   ((hePtr->ystar > next->ystar) || 
-	    ((hePtr->ystar == next->ystar) &&
-	     (vertex->point.x > next->vertex->point.x)))) {
-	last = next;
-    }
-    hePtr->pqNext = last->pqNext;
-    last->pqNext = hePtr;
-    v->pqCount++;
-}
-
-static void
-PQDelete(Voronoi *v, HalfEdge *hePtr)
-{
-    if (hePtr->vertex != NULL) {
-	HalfEdge *last;
-
-	last = v->pqHash + PQBucket(v, hePtr);
-	while (last->pqNext != hePtr) {
-	    last = last->pqNext;
-	}
-	last->pqNext = hePtr->pqNext;
-	v->pqCount--;
-	DecrRefCount(v, hePtr->vertex);
-	hePtr->vertex = NULL;
-    }
-}
-
-INLINE static int
-PQEmpty(Voronoi *v)
-{
-    return (v->pqCount == 0);
-}
-
-INLINE static Point2d
-PQMin(Voronoi *v)
-{
-    Point2d p;
-
-    while (v->pqHash[v->pqMin].pqNext == NULL) {
-	v->pqMin++;
-    }
-    p.x = v->pqHash[v->pqMin].pqNext->vertex->point.x;
-    p.y = v->pqHash[v->pqMin].pqNext->ystar;
-    return p;
-}
-
-INLINE static HalfEdge *
-PQExtractMin(Voronoi *v)
-{
-    HalfEdge *curr;
-
-    curr = v->pqHash[v->pqMin].pqNext;
-    v->pqHash[v->pqMin].pqNext = curr->pqNext;
-    v->pqCount--;
-    return curr;
-}
-
-static void
-PQInitialize(Voronoi *v)
-{
-    size_t nBytes;
-
-    v->pqCount = v->pqMin = 0;
-    v->pqHashsize = 4 * v->sqrtNumSites;
-    nBytes = v->pqHashsize * sizeof(HalfEdge);
-    v->pqHash = AllocMemory(v, nBytes);
-    assert(v->pqHash);
-    memset(v->pqHash, 0, nBytes);
-}
-
-INLINE static Site *
-NextSite(Voronoi *v)
-{
-    if (v->siteIndex < v->nSites) {
-	Site *s;
-
-	s = v->sites + v->siteIndex;
-	v->siteIndex++;
-	return s;
-    }
-    return NULL;
-}
-
-static int
-ComputeVoronoi(Voronoi *v, Triplet *triplets)
-{
-    Site *newsite, *bot, *top, *temp, *p;
-    Site *vertex;
-    Point2d newintstar;
-    int pm, count = 0;
-    HalfEdge *lbnd, *rbnd, *llbnd, *rrbnd, *bisector;
-    Edge *e;
-
-    PQInitialize(v);
-    v->bottomsite = NextSite(v);
-    ElInitialize(v);
-
-    newsite = NextSite(v);
-    for (;;) {
-	if (!PQEmpty(v)) {
-	    newintstar = PQMin(v);
-	}
-	if ((newsite != NULL)
-	    && ((PQEmpty(v)) || 
-		(newsite->point.y < newintstar.y) ||
-		(newsite->point.y == newintstar.y) && 
-		(newsite->point.x < newintstar.x))) {
-
-	    /* New site is smallest */
-
-	    lbnd = ElLeftBnd(v, &newsite->point);
-	    rbnd = lbnd->rightPtr;
-	    bot = RightRegion(v, lbnd);
-	    e = Bisect(v, bot, newsite);
-	    bisector = HECreate(v, e, LE);
-	    ElInsert(lbnd, bisector);
-	    p = Intersect(v, lbnd, bisector);
-	    if (p != NULL) {
-		PQDelete(v, lbnd);
-		PQInsert(v, lbnd, p, Dist(p, newsite));
-	    }
-	    lbnd = bisector;
-	    bisector = HECreate(v, e, RE);
-	    ElInsert(lbnd, bisector);
-	    p = Intersect(v, bisector, rbnd);
-	    if (p != NULL) {
-		PQInsert(v, bisector, p, Dist(p, newsite));
-	    }
-	    newsite = NextSite(v);
-	} else if (!PQEmpty(v)) {
-
-	    /* Intersection is smallest */
-
-	    lbnd = PQExtractMin(v);
-	    llbnd = lbnd->leftPtr;
-	    rbnd = lbnd->rightPtr;
-	    rrbnd = rbnd->rightPtr;
-	    bot = LeftRegion(v, lbnd);
-	    top = RightRegion(v, rbnd);
-	    triplets[count].a = bot->neighbor;
-	    triplets[count].b = top->neighbor;
-	    triplets[count].c = RightRegion(v, lbnd)->neighbor;
-	    ++count;
-	    vertex = lbnd->vertex;
-	    MakeVertex(v, vertex);
-	    EndPoint(v, lbnd->edgePtr, lbnd->pm, vertex);
-	    EndPoint(v, rbnd->edgePtr, rbnd->pm, vertex);
-	    ElDelete(lbnd);
-	    PQDelete(v, rbnd);
-	    ElDelete(rbnd);
-	    pm = LE;
-	    if (bot->point.y > top->point.y) {
-		temp = bot, bot = top, top = temp;
-		pm = RE;
-	    }
-	    e = Bisect(v, bot, top);
-	    bisector = HECreate(v, e, pm);
-	    ElInsert(llbnd, bisector);
-	    EndPoint(v, e, RE - pm, vertex);
-	    DecrRefCount(v, vertex);
-	    p = Intersect(v, llbnd, bisector);
-	    if (p != NULL) {
-		PQDelete(v, llbnd);
-		PQInsert(v, llbnd, p, Dist(p, bot));
-	    }
-	    p = Intersect(v, bisector, rrbnd);
-	    if (p != NULL) {
-		PQInsert(v, bisector, p, Dist(p, bot));
-	    }
-	} else {
-	    break;
-	}
-    }
-    return count;
-}
-
-static int
-CompareSites(const void *a, const void *b)
-{
-    const Site *s1 = a;
-    const Site *s2 = b;
-
-    if (s1->point.y < s2->point.y) {
-	return -1;
-    }
-    if (s1->point.y > s2->point.y) {
-	return 1;
-    }
-    if (s1->point.x < s2->point.x) {
-	return -1;
-    }
-    if (s1->point.x > s2->point.x) {
-	return 1;
-    }
-    return 0;
-}
-
-int
-Blt_Triangulate(Tcl_Interp *interp, size_t nPoints, Point2f *points, 
-		int sorted, int *nTrianglesPtr, Triplet **trianglesPtr)
-{
-    int i;
-    Site *sp, *send;
-    int n;
-    Voronoi v;
-    Triplet *triangles;
-    
-    memset(&v, 0, sizeof(v));
-
-    InitMemorySystem(&v);
-
-    v.nSites = nPoints;
-    v.sites = AllocMemory(&v, nPoints * sizeof(Site));
-    
-    for (sp = v.sites, send = sp + nPoints, i = 0; sp < send; i++, sp++) {
-	sp->point.x = points[i].x;
-	sp->point.y = points[i].y;
-	sp->neighbor = i;
-	sp->refCount = 0;
-    }
-    if (!sorted) {
-	qsort(v.sites, v.nSites, sizeof(Site), CompareSites);
-    }
-    sp = v.sites;
-    v.xMin = v.xMax = sp->point.x;
-    v.yMin = sp->point.y;
-    v.yMax = v.sites[nPoints - 1].point.y;
-    for (sp++, send = v.sites + nPoints; sp < send; sp++) {
-	if (sp->point.x < v.xMin) {
-	    v.xMin = sp->point.x;
-	} else if (sp->point.x > v.xMax) {
-	    v.xMax = sp->point.x;
-	}
-    }
-    v.siteIndex = 0;
-    GeomInit(&v);
-    n = ComputeVoronoi(&v, triangles);
-    /* Release memory allocated for triangulation */
-    ReleaseMemorySystem(&v);
-    *nTrianglesPtr = n;
-    *trianglesPtr = triangles;
-    return TCL_OK;
-}
diff --git a/blt3.0/src/bltTvCmd.c b/blt3.0/src/bltTvCmd.c
deleted file mode 100644
index 158e93d..0000000
--- a/blt3.0/src/bltTvCmd.c
+++ /dev/null
@@ -1,4641 +0,0 @@
-
-/*
- * bltTvCmd.c --
- *
- * This module implements an hierarchy widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *
- * BUGS:
- *   1.  "open" operation should change scroll offset so that as many
- *	 new entries (up to half a screen) can be seen.
- *   2.  "open" needs to adjust the scrolloffset so that the same entry
- *	 is seen at the same place.
- */
-#include "bltInt.h"
-
-#ifndef NO_TREEVIEW
-#include "bltOp.h"
-#include "bltTreeView.h"
-#include "bltList.h"
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-#define FCLAMP(x)	((((x) < 0.0) ? 0.0 : ((x) > 1.0) ? 1.0 : (x)))
-
-#define DEF_ICON_WIDTH		16
-
-static TreeViewCompareProc ExactCompare, GlobCompare, RegexpCompare;
-static TreeViewApplyProc ShowEntryApplyProc, HideEntryApplyProc, 
-	MapAncestorsApplyProc, FixSelectionsApplyProc;
-static Tk_LostSelProc LostSelection;
-static TreeViewApplyProc SelectEntryApplyProc;
-
-BLT_EXTERN Blt_CustomOption bltTreeViewIconsOption;
-BLT_EXTERN Blt_CustomOption bltTreeViewUidOption;
-BLT_EXTERN Blt_CustomOption bltTreeViewTreeOption;
-
-BLT_EXTERN Blt_ConfigSpec bltTreeViewButtonSpecs[];
-BLT_EXTERN Blt_ConfigSpec bltTreeViewSpecs[];
-BLT_EXTERN Blt_ConfigSpec bltTreeViewEntrySpecs[];
-
-typedef int (TvCmdProc)(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-#define TAG_UNKNOWN	 (1<<0)
-#define TAG_RESERVED	 (1<<1)
-#define TAG_USER_DEFINED (1<<2)
-
-#define TAG_SINGLE	(1<<3)
-#define TAG_MULTIPLE	(1<<4)
-#define TAG_ALL		(1<<5)
-
-
-#define NodeToObj(n) Tcl_NewLongObj(Blt_Tree_NodeId(n))
-
-/*
- *---------------------------------------------------------------------------
- *
- * SkipSeparators --
- *
- *	Moves the character pointer past one of more separators.
- *
- * Results:
- *	Returns the updates character pointer.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-SkipSeparators(const char *path, const char *separator, int length)
-{
-    while ((path[0] == separator[0]) && 
-	   (strncmp(path, separator, length) == 0)) {
-	path += length;
-    }
-    return path;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteNode --
- *
- *	Delete the node and its descendants.  Don't remove the root node,
- *	though.  If the root node is specified, simply remove all its
- *	children.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DeleteNode(TreeView *viewPtr, Blt_TreeNode node)
-{
-    Blt_TreeNode root;
-
-    if (!Blt_Tree_TagTableIsShared(viewPtr->tree)) {
-	Blt_Tree_ClearTags(viewPtr->tree, node);
-    }
-    root = Blt_Tree_RootNode(viewPtr->tree);
-    if (node == root) {
-	Blt_TreeNode next;
-	/* Don't delete the root node. Simply clean out the tree. */
-	for (node = Blt_Tree_FirstChild(node); node != NULL; node = next) {
-	    next = Blt_Tree_NextSibling(node);
-	    Blt_Tree_DeleteNode(viewPtr->tree, node);
-	}	    
-    } else if (Blt_Tree_IsAncestor(root, node)) {
-	Blt_Tree_DeleteNode(viewPtr->tree, node);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SplitPath --
- *
- *	Returns the trailing component of the given path.  Trailing separators
- *	are ignored.
- *
- * Results:
- *	Returns the string of the tail component.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SplitPath(TreeView *viewPtr, const char *path, long *depthPtr, 
-	  const char ***argvPtr)
-{
-    int skipLen, pathLen;
-    long depth;
-    size_t listSize;
-    char **argv;
-    char *p;
-    char *sep;
-
-    if (viewPtr->pathSep == SEPARATOR_LIST) {
-	int nElem;
-	if (Tcl_SplitList(viewPtr->interp, path, &nElem, argvPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	*depthPtr = (long)nElem;
-	return TCL_OK;
-    }
-    pathLen = strlen(path);
-    skipLen = strlen(viewPtr->pathSep);
-    path = SkipSeparators(path, viewPtr->pathSep, skipLen);
-    depth = pathLen / skipLen;
-
-    listSize = (depth + 1) * sizeof(char *);
-    argv = Blt_AssertMalloc(listSize + (pathLen + 1));
-    p = (char *)argv + listSize;
-    strcpy(p, path);
-
-    sep = strstr(p, viewPtr->pathSep);
-    depth = 0;
-    while ((*p != '\0') && (sep != NULL)) {
-	*sep = '\0';
-	argv[depth++] = p;
-	p = (char *)SkipSeparators(sep + skipLen, viewPtr->pathSep, skipLen);
-	sep = strstr(p, viewPtr->pathSep);
-    }
-    if (*p != '\0') {
-	argv[depth++] = p;
-    }
-    argv[depth] = NULL;
-    *depthPtr = depth;
-    *argvPtr = (const char **)argv;
-    return TCL_OK;
-}
-
-
-static TreeViewEntry *
-LastEntry(TreeView *viewPtr, TreeViewEntry *entryPtr, unsigned int mask)
-{
-    Blt_TreeNode next;
-    TreeViewEntry *nextPtr;
-
-    next = Blt_Tree_LastChild(entryPtr->node);
-    while (next != NULL) {
-	nextPtr = Blt_TreeView_NodeToEntry(viewPtr, next);
-	if (nextPtr->flags & mask) {
-	    break;
-	}
-	entryPtr = nextPtr;
-	next = Blt_Tree_LastChild(next);
-    }
-    return entryPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShowEntryApplyProc --
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ShowEntryApplyProc(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    entryPtr->flags &= ~ENTRY_HIDE;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HideEntryApplyProc --
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-HideEntryApplyProc(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    entryPtr->flags |= ENTRY_HIDE;
-    return TCL_OK;
-}
-
-static void
-MapAncestors(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    while (entryPtr != viewPtr->rootPtr) {
-	entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-	if (entryPtr->flags & (ENTRY_CLOSED | ENTRY_HIDE)) {
-	    viewPtr->flags |= LAYOUT_PENDING;
-	    entryPtr->flags &= ~(ENTRY_CLOSED | ENTRY_HIDE);
-	} 
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapAncestorsApplyProc --
- *
- *	If a node in mapped, then all its ancestors must be mapped also.  This
- *	routine traverses upwards and maps each unmapped ancestor.  It's
- *	assumed that for any mapped ancestor, all it's ancestors will already
- *	be mapped too.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static int
-MapAncestorsApplyProc(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    /*
-     * Make sure that all the ancestors of this entry are mapped too.
-     */
-    while (entryPtr != viewPtr->rootPtr) {
-	entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-	if ((entryPtr->flags & (ENTRY_HIDE | ENTRY_CLOSED)) == 0) {
-	    break;		/* Assume ancestors are also mapped. */
-	}
-	entryPtr->flags &= ~(ENTRY_HIDE | ENTRY_CLOSED);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindPath --
- *
- *	Finds the node designated by the given path.  Each path component is
- *	searched for as the tree is traversed.
- *
- *	A leading character string is trimmed off the path if it matches the
- *	one designated (see the -trimleft option).
- *
- *	If no separator is designated (see the -separator configuration
- *	option), the path is considered a TCL list.  Otherwise the each
- *	component of the path is separated by a character string.  Leading and
- *	trailing separators are ignored.  Multiple separators are treated as
- *	one.
- *
- * Results:
- *	Returns the pointer to the designated node.  If any component can't be
- *	found, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static TreeViewEntry *
-FindPath(TreeView *viewPtr, TreeViewEntry *rootPtr, const char *path)
-{
-    Blt_TreeNode child;
-    const char **argv;
-    const char *name;
-    long nComp;
-    const char **p;
-    TreeViewEntry *entryPtr;
-
-    /* Trim off characters that we don't want */
-    if (viewPtr->trimLeft != NULL) {
-	const char *s1, *s2;
-	
-	/* Trim off leading character string if one exists. */
-	for (s1 = path, s2 = viewPtr->trimLeft; *s2 != '\0'; s2++, s1++) {
-	    if (*s1 != *s2) {
-		break;
-	    }
-	}
-	if (*s2 == '\0') {
-	    path = s1;
-	}
-    }
-    if (*path == '\0') {
-	return rootPtr;
-    }
-    name = path;
-    entryPtr = rootPtr;
-    if (viewPtr->pathSep == SEPARATOR_NONE) {
-	child = Blt_Tree_FindChild(entryPtr->node, name);
-	if (child == NULL) {
-	    goto error;
-	}
-	return Blt_TreeView_NodeToEntry(viewPtr, child);
-    }
-
-    if (SplitPath(viewPtr, path, &nComp, &argv) != TCL_OK) {
-	return NULL;
-    }
-    for (p = argv; *p != NULL; p++) {
-	name = *p;
-	child = Blt_Tree_FindChild(entryPtr->node, name);
-	if (child == NULL) {
-	    Blt_Free(argv);
-	    goto error;
-	}
-	entryPtr = Blt_TreeView_NodeToEntry(viewPtr, child);
-    }
-    Blt_Free(argv);
-    return entryPtr;
- error:
-    {
-	Tcl_DString dString;
-
-	Blt_TreeView_GetFullName(viewPtr, entryPtr, FALSE, &dString);
-	Tcl_AppendResult(viewPtr->interp, "can't find node \"", name,
-		 "\" in parent node \"", Tcl_DStringValue(&dString), "\"", 
-		(char *)NULL);
-	Tcl_DStringFree(&dString);
-    }
-    return NULL;
-
-}
-
-static int
-GetEntryFromSpecialId(TreeView *viewPtr, const char *string, 
-		      TreeViewEntry **entryPtrPtr)
-{
-    Blt_TreeNode node;
-    TreeViewEntry *fromPtr, *entryPtr;
-    char c;
-
-    entryPtr = NULL;
-    fromPtr = viewPtr->fromPtr;
-    if (fromPtr == NULL) {
-	fromPtr = viewPtr->focusPtr;
-    } 
-    if (fromPtr == NULL) {
-	fromPtr = viewPtr->rootPtr;
-    }
-    c = string[0];
-    if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(viewPtr->interp, viewPtr->tkwin, string, &x, &y) == TCL_OK) {
-	    *entryPtrPtr = Blt_TreeView_NearestEntry(viewPtr, x, y, TRUE);
-	}
-    } else if ((c == 'b') && (strcmp(string, "bottom") == 0)) {
-	if (viewPtr->flatView) {
-	    entryPtr = viewPtr->flatArr[viewPtr->nEntries - 1];
-	} else {
-	    entryPtr = LastEntry(viewPtr, viewPtr->rootPtr, ENTRY_MASK);
-	}
-    } else if ((c == 't') && (strcmp(string, "top") == 0)) {
-	if (viewPtr->flatView) {
-	    entryPtr = viewPtr->flatArr[0];
-	} else {
-	    entryPtr = viewPtr->rootPtr;
-	    if (viewPtr->flags & HIDE_ROOT) {
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK);
-	    }
-	}
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	entryPtr = LastEntry(viewPtr, viewPtr->rootPtr, ENTRY_MASK);
-    } else if ((c == 'a') && (strcmp(string, "anchor") == 0)) {
-	entryPtr = viewPtr->selAnchorPtr;
-    } else if ((c == 'f') && (strcmp(string, "focus") == 0)) {
-	entryPtr = viewPtr->focusPtr;
-	if ((entryPtr == viewPtr->rootPtr) && (viewPtr->flags & HIDE_ROOT)) {
-	    entryPtr = Blt_TreeView_NextEntry(viewPtr->rootPtr, ENTRY_MASK);
-	}
-    } else if ((c == 'r') && (strcmp(string, "root") == 0)) {
-	entryPtr = viewPtr->rootPtr;
-    } else if ((c == 'p') && (strcmp(string, "parent") == 0)) {
-	if (fromPtr != viewPtr->rootPtr) {
-	    entryPtr = Blt_TreeView_ParentEntry(fromPtr);
-	}
-    } else if ((c == 'c') && (strcmp(string, "current") == 0)) {
-	/* Can't trust picked item, if entries have been added or deleted. */
-	if (!(viewPtr->flags & DIRTY)) {
-	    ClientData context;
-
-	    context = Blt_GetCurrentContext(viewPtr->bindTable);
-	    if ((context == ITEM_ENTRY) || 
-		(context == ITEM_ENTRY_BUTTON) ||
-		(context >= ITEM_STYLE)) {
-		entryPtr = Blt_GetCurrentItem(viewPtr->bindTable);
-	    }
-	}
-    } else if ((c == 'u') && (strcmp(string, "up") == 0)) {
-	entryPtr = fromPtr;
-	if (viewPtr->flatView) {
-	    int i;
-
-	    i = entryPtr->flatIndex - 1;
-	    if (i >= 0) {
-		entryPtr = viewPtr->flatArr[i];
-	    }
-	} else {
-	    entryPtr = Blt_TreeView_PrevEntry(fromPtr, ENTRY_MASK);
-	    if (entryPtr == NULL) {
-		entryPtr = fromPtr;
-	    }
-	    if ((entryPtr == viewPtr->rootPtr) && 
-		(viewPtr->flags & HIDE_ROOT)) {
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK);
-	    }
-	}
-    } else if ((c == 'd') && (strcmp(string, "down") == 0)) {
-	entryPtr = fromPtr;
-	if (viewPtr->flatView) {
-	    int i;
-
-	    i = entryPtr->flatIndex + 1;
-	    if (i < viewPtr->nEntries) {
-		entryPtr = viewPtr->flatArr[i];
-	    }
-	} else {
-	    entryPtr = Blt_TreeView_NextEntry(fromPtr, ENTRY_MASK);
-	    if (entryPtr == NULL) {
-		entryPtr = fromPtr;
-	    }
-	    if ((entryPtr == viewPtr->rootPtr) && 
-		(viewPtr->flags & HIDE_ROOT)) {
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK);
-	    }
-	}
-    } else if (((c == 'l') && (strcmp(string, "last") == 0)) ||
-	       ((c == 'p') && (strcmp(string, "prev") == 0))) {
-	entryPtr = fromPtr;
-	if (viewPtr->flatView) {
-	    int i;
-
-	    i = entryPtr->flatIndex - 1;
-	    if (i < 0) {
-		i = viewPtr->nEntries - 1;
-	    }
-	    entryPtr = viewPtr->flatArr[i];
-	} else {
-	    entryPtr = Blt_TreeView_PrevEntry(fromPtr, ENTRY_MASK);
-	    if (entryPtr == NULL) {
-		entryPtr = LastEntry(viewPtr, viewPtr->rootPtr, ENTRY_MASK);
-	    }
-	    if ((entryPtr == viewPtr->rootPtr) && 
-		(viewPtr->flags & HIDE_ROOT)) {
-		entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK);
-	    }
-	}
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-	entryPtr = fromPtr;
-	if (viewPtr->flatView) {
-	    int i;
-
-	    i = entryPtr->flatIndex + 1; 
-	    if (i >= viewPtr->nEntries) {
-		i = 0;
-	    }
-	    entryPtr = viewPtr->flatArr[i];
-	} else {
-	    entryPtr = Blt_TreeView_NextEntry(fromPtr, ENTRY_MASK);
-	    if (entryPtr == NULL) {
-		if (viewPtr->flags & HIDE_ROOT) {
-		    entryPtr = Blt_TreeView_NextEntry(viewPtr->rootPtr,ENTRY_MASK);
-		} else {
-		    entryPtr = viewPtr->rootPtr;
-		}
-	    }
-	}
-    } else if ((c == 'n') && (strcmp(string, "nextsibling") == 0)) {
-	node = Blt_Tree_NextSibling(fromPtr->node);
-	if (node != NULL) {
-	    entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	}
-    } else if ((c == 'p') && (strcmp(string, "prevsibling") == 0)) {
-	node = Blt_Tree_PrevSibling(fromPtr->node);
-	if (node != NULL) {
-	    entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	}
-    } else if ((c == 'v') && (strcmp(string, "view.top") == 0)) {
-	if (viewPtr->nVisible > 0) {
-	    entryPtr = viewPtr->visibleArr[0];
-	}
-    } else if ((c == 'v') && (strcmp(string, "view.bottom") == 0)) {
-	if (viewPtr->nVisible > 0) {
-	    entryPtr = viewPtr->visibleArr[viewPtr->nVisible - 1];
-	} 
-    } else {
-	return TCL_ERROR;
-    }
-    *entryPtrPtr = entryPtr;
-    return TCL_OK;
-}
-
-static int
-GetTagIter(TreeView *viewPtr, char *tagName, TreeViewTagIter *iterPtr)
-{
-    
-    iterPtr->tagType = TAG_RESERVED | TAG_SINGLE;
-    iterPtr->entryPtr = NULL;
-
-    if (strcmp(tagName, "all") == 0) {
-	iterPtr->entryPtr = viewPtr->rootPtr;
-	iterPtr->tagType |= TAG_ALL;
-    } else {
-	Blt_HashTable *tablePtr;
-
-	tablePtr = Blt_Tree_TagHashTable(viewPtr->tree, tagName);
-	if (tablePtr != NULL) {
-	    Blt_HashEntry *hPtr;
-	    
-	    iterPtr->tagType = TAG_USER_DEFINED; /* Empty tags are not an
-						  * error. */
-	    hPtr = Blt_FirstHashEntry(tablePtr, &iterPtr->cursor); 
-	    if (hPtr != NULL) {
-		Blt_TreeNode node;
-
-		node = Blt_GetHashValue(hPtr);
-		iterPtr->entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-		if (tablePtr->numEntries > 1) {
-		    iterPtr->tagType |= TAG_MULTIPLE;
-		}
-	    }
-	}  else {
-	    iterPtr->tagType = TAG_UNKNOWN;
-	    Tcl_AppendResult(viewPtr->interp, "can't find tag or id \"", tagName, 
-		"\" in \"", Tk_PathName(viewPtr->tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-void
-Blt_TreeView_GetTags(Tcl_Interp *interp, TreeView *viewPtr, 
-		     TreeViewEntry *entryPtr, Blt_List list)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Blt_TreeTagEntry *tPtr;
-
-    for (hPtr = Blt_Tree_FirstTag(viewPtr->tree, &cursor); hPtr != NULL; 
-	hPtr = Blt_NextHashEntry(&cursor)) {
-	tPtr = Blt_GetHashValue(hPtr);
-	hPtr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)entryPtr->node);
-	if (hPtr != NULL) {
-	    Blt_List_Append(list, Blt_TreeView_GetUid(viewPtr, tPtr->tagName), 
-		0);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AddTag --
- *
- *---------------------------------------------------------------------------
- */
-static int
-AddTag(TreeView *viewPtr, Blt_TreeNode node, const char *tagName)
-{
-    TreeViewEntry *entryPtr;
-
-    if (strcmp(tagName, "root") == 0) {
-	Tcl_AppendResult(viewPtr->interp, "can't add reserved tag \"",
-			 tagName, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (isdigit(UCHAR(tagName[0]))) {
-	Tcl_AppendResult(viewPtr->interp, "invalid tag \"", tagName, 
-		"\": can't start with digit", (char *)NULL);
-	return TCL_ERROR;
-    } 
-    if (isdigit(UCHAR(tagName[0]))) {
-	Tcl_AppendResult(viewPtr->interp, "invalid tag \"", tagName, 
-		"\": can't start with digit", (char *)NULL);
-	return TCL_ERROR;
-    } 
-    if (tagName[0] == '@') {
-	Tcl_AppendResult(viewPtr->interp, "invalid tag \"", tagName, 
-		"\": can't start with \"@\"", (char *)NULL);
-	return TCL_ERROR;
-    } 
-    viewPtr->fromPtr = NULL;
-    if (GetEntryFromSpecialId(viewPtr, tagName, &entryPtr) == TCL_OK) {
-	Tcl_AppendResult(viewPtr->interp, "invalid tag \"", tagName, 
-		"\": is a special id", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Add the tag to the node. */
-    Blt_Tree_AddTag(viewPtr->tree, node, tagName);
-    return TCL_OK;
-}
-    
-TreeViewEntry *
-Blt_TreeView_FirstTaggedEntry(TreeViewTagIter *iterPtr)
-{
-    return iterPtr->entryPtr;
-}
-
-int
-Blt_TreeView_FindTaggedEntries(TreeView *viewPtr, Tcl_Obj *objPtr, 
-			 TreeViewTagIter *iterPtr)
-{
-    char *tagName;
-    TreeViewEntry *entryPtr;
-
-    tagName = Tcl_GetString(objPtr); 
-    viewPtr->fromPtr = NULL;
-    if (isdigit(UCHAR(tagName[0]))) {
-	long inode;
-	Blt_TreeNode node;
-
-	if (Tcl_GetLongFromObj(viewPtr->interp, objPtr, &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(viewPtr->tree, inode);
-	if (node == NULL) {
-	    Tcl_AppendResult(viewPtr->interp, "can't find node \"", 
-			     Tcl_GetString(objPtr), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	iterPtr->entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	iterPtr->tagType = (TAG_RESERVED | TAG_SINGLE);
-    } else if (GetEntryFromSpecialId(viewPtr, tagName, &entryPtr) == TCL_OK) {
-	iterPtr->entryPtr = entryPtr;
-	iterPtr->tagType = (TAG_RESERVED | TAG_SINGLE);
-    } else {
-	if (GetTagIter(viewPtr, tagName, iterPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-TreeViewEntry *
-Blt_TreeView_NextTaggedEntry(TreeViewTagIter *iterPtr)
-{
-    TreeViewEntry *entryPtr;
-
-    entryPtr = NULL;
-    if (iterPtr->entryPtr != NULL) {
-	TreeView *viewPtr = iterPtr->entryPtr->viewPtr;
-
-	if (iterPtr->tagType & TAG_ALL) {
-	    entryPtr = Blt_TreeView_NextEntry(iterPtr->entryPtr, 0);
-	} else if (iterPtr->tagType & TAG_MULTIPLE) {
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_NextHashEntry(&iterPtr->cursor);
-	    if (hPtr != NULL) {
-		Blt_TreeNode node;
-
-		node = Blt_GetHashValue(hPtr);
-		entryPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	    }
-	} 
-	iterPtr->entryPtr = entryPtr;
-    }
-    return entryPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetEntryFromObj2 --
- *
- *	Converts a string into node pointer.  The string may be in one of the
- *	following forms:
- *
- *	    NNN			- inode.
- *	    "active"		- Currently active node.
- *	    "anchor"		- anchor of selected region.
- *	    "current"		- Currently picked node in bindtable.
- *	    "focus"		- The node currently with focus.
- *	    "root"		- Root node.
- *	    "end"		- Last open node in the entire hierarchy.
- *	    "next"		- Next open node from the currently active
- *				  node. Wraps around back to top.
- *	    "last"		- Previous open node from the currently active
- *				  node. Wraps around back to bottom.
- *	    "up"		- Next open node from the currently active
- *				  node. Does not wrap around.
- *	    "down"		- Previous open node from the currently active
- *				  node. Does not wrap around.
- *	    "nextsibling"	- Next sibling of the current node.
- *	    "prevsibling"	- Previous sibling of the current node.
- *	    "parent"		- Parent of the current node.
- *	    "view.top"		- Top of viewport.
- *	    "view.bottom"	- Bottom of viewport.
- *	    @x,y		- Closest node to the specified X-Y position.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via nodePtr.  Otherwise, TCL_ERROR is
- *	returned and an error message is left in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetEntryFromObj2(TreeView *viewPtr, Tcl_Obj *objPtr, TreeViewEntry **entryPtrPtr)
-{
-    Tcl_Interp *interp;
-    char *string;
-    TreeViewTagIter iter;
-
-    interp = viewPtr->interp;
-
-    string = Tcl_GetString(objPtr);
-    *entryPtrPtr = NULL;
-    if (isdigit(UCHAR(string[0]))) {    
-	Blt_TreeNode node;
-	long inode;
-
-	if (Tcl_GetLongFromObj(interp, objPtr, &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(viewPtr->tree, inode);
-	if (node != NULL) {
-	    *entryPtrPtr = Blt_TreeView_NodeToEntry(viewPtr, node);
-	}
-	return TCL_OK;		/* Node Id. */
-    }
-    if (GetEntryFromSpecialId(viewPtr, string, entryPtrPtr) == TCL_OK) {
-	return TCL_OK;		/* Special Id. */
-    }
-    if (GetTagIter(viewPtr, string, &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (iter.tagType & TAG_MULTIPLE) {
-	Tcl_AppendResult(interp, "more than one entry tagged as \"", string, 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *entryPtrPtr = iter.entryPtr;
-    return TCL_OK;		/* Singleton tag. */
-}
-
-static int
-GetEntryFromObj(TreeView *viewPtr, Tcl_Obj *objPtr, TreeViewEntry **entryPtrPtr)
-{
-    viewPtr->fromPtr = NULL;
-    return GetEntryFromObj2(viewPtr, objPtr, entryPtrPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_GetEntry --
- *
- *	Returns an entry based upon its index.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.  The
- *	pointer to the node is returned via nodePtr.  Otherwise, TCL_ERROR is
- *	returned and an error message is left in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TreeView_GetEntry(TreeView *viewPtr, Tcl_Obj *objPtr, TreeViewEntry **entryPtrPtr)
-{
-    TreeViewEntry *entryPtr;
-
-    if (GetEntryFromObj(viewPtr, objPtr, &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (entryPtr == NULL) {
-	Tcl_ResetResult(viewPtr->interp);
-	Tcl_AppendResult(viewPtr->interp, "can't find entry \"", 
-		Tcl_GetString(objPtr), "\" in \"", Tk_PathName(viewPtr->tkwin), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *entryPtrPtr = entryPtr;
-    return TCL_OK;
-}
-
-static Blt_TreeNode 
-GetNthNode(Blt_TreeNode parent, long position)
-{
-    Blt_TreeNode node;
-    long count;
-
-    count = 0;
-    for(node = Blt_Tree_FirstChild(parent); node != NULL; 
-	node = Blt_Tree_NextSibling(node)) {
-	if (count == position) {
-	    return node;
-	}
-    }
-    return Blt_Tree_LastChild(parent);
-}
-
-static TreeViewEntry *
-GetNthEntry(TreeViewEntry *parentPtr, int position, unsigned int mask)
-{
-    TreeViewEntry *entryPtr;
-    int count;
-
-    count = 0;
-    for(entryPtr = Blt_TreeView_FirstChild(parentPtr, mask); entryPtr != NULL; 
-	entryPtr = Blt_TreeView_NextSibling(entryPtr, mask)) {
-	if (count == position) {
-	    return entryPtr;
-	}
-    }
-    return Blt_TreeView_LastChild(parentPtr, mask);
-}
-
-/*
- * Preprocess the command string for percent substitution.
- */
-void
-Blt_TreeView_PercentSubst(
-    TreeView *viewPtr,
-    TreeViewEntry *entryPtr,
-    const char *command,
-    Tcl_DString *resultPtr)
-{
-    const char *last, *p;
-    const char *fullName;
-    Tcl_DString dString;
-
-    /*
-     * Get the full path name of the node, in case we need to substitute for
-     * it.
-     */
-    Tcl_DStringInit(&dString);
-    fullName = Blt_TreeView_GetFullName(viewPtr, entryPtr, TRUE, &dString);
-    Tcl_DStringInit(resultPtr);
-    /* Append the widget name and the node .t 0 */
-    for (last = p = command; *p != '\0'; p++) {
-	if (*p == '%') {
-	    const char *string;
-	    char buf[3];
-
-	    if (p > last) {
-		Tcl_DStringAppend(resultPtr, last, p - last);
-	    }
-	    switch (*(p + 1)) {
-	    case '%':		/* Percent sign */
-		string = "%";
-		break;
-	    case 'W':		/* Widget name */
-		string = Tk_PathName(viewPtr->tkwin);
-		break;
-	    case 'P':		/* Full pathname */
-		string = fullName;
-		break;
-	    case 'p':		/* Name of the node */
-		string = GETLABEL(entryPtr);
-		break;
-	    case '#':		/* Node identifier */
-		string = Blt_Tree_NodeIdAscii(entryPtr->node);
-		break;
-	    default:
-		if (*(p + 1) == '\0') {
-		    p--;
-		}
-		buf[0] = *p, buf[1] = *(p + 1), buf[2] = '\0';
-		string = buf;
-		break;
-	    }
-	    Tcl_DStringAppend(resultPtr, string, -1);
-	    p++;
-	    last = p + 1;
-	}
-    }
-    if (p > last) {
-	Tcl_DStringAppend(resultPtr, last, p-last);
-    }
-    Tcl_DStringFree(&dString);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectEntryApplyProc --
- *
- *	Sets the selection flag for a node.  The selection flag is
- *	set/cleared/toggled based upon the flag set in the treeview widget.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectEntryApplyProc(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    switch (viewPtr->flags & TV_SELECT_MASK) {
-    case TV_SELECT_CLEAR:
-	Blt_TreeView_DeselectEntry(viewPtr, entryPtr);
-	break;
-
-    case TV_SELECT_SET:
-	Blt_TreeView_SelectEntry(viewPtr, entryPtr);
-	break;
-
-    case TV_SELECT_TOGGLE:
-	hPtr = Blt_FindHashEntry(&viewPtr->selectTable, (char *)entryPtr);
-	if (hPtr != NULL) {
-	    Blt_TreeView_DeselectEntry(viewPtr, entryPtr);
-	} else {
-	    Blt_TreeView_SelectEntry(viewPtr, entryPtr);
-	}
-	break;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyInvokeSelectCmd --
- *
- *      Queues a request to execute the -selectcommand code associated with
- *      the widget at the next idle point.  Invoked whenever the selection
- *      changes.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      TCL code gets executed for some application-specific task.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyInvokeSelectCmd(TreeView *viewPtr)
-{
-    if (!(viewPtr->flags & TV_SELECT_PENDING)) {
-	viewPtr->flags |= TV_SELECT_PENDING;
-	Tcl_DoWhenIdle(Blt_TreeView_SelectCmdProc, viewPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_PruneSelection --
- *
- *	The root entry being deleted or closed.  Deselect any of its
- *	descendants that are currently selected.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      If any of the entry's descendants are deselected the widget is
- *      redrawn and the a selection command callback is invoked (if there's
- *      one configured).
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_PruneSelection(TreeView *viewPtr, TreeViewEntry *rootPtr)
-{
-    Blt_ChainLink link, next;
-    TreeViewEntry *entryPtr;
-    int selectionChanged;
-
-    /* 
-     * Check if any of the currently selected entries are a descendant of of
-     * the current root entry.  Deselect the entry and indicate that the
-     * treeview widget needs to be redrawn.
-     */
-    selectionChanged = FALSE;
-    for (link = Blt_Chain_FirstLink(viewPtr->selected); link != NULL; 
-	 link = next) {
-	next = Blt_Chain_NextLink(link);
-	entryPtr = Blt_Chain_GetValue(link);
-	if (Blt_Tree_IsAncestor(rootPtr->node, entryPtr->node)) {
-	    Blt_TreeView_DeselectEntry(viewPtr, entryPtr);
-	    selectionChanged = TRUE;
-	}
-    }
-    if (selectionChanged) {
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-	if (viewPtr->selectCmd != NULL) {
-	    EventuallyInvokeSelectCmd(viewPtr);
-	}
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeView operations
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-FocusOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    long inode;
-
-    if (objc == 3) {
-	TreeViewEntry *entryPtr;
-
-	if (GetEntryFromObj(viewPtr, objv[2], &entryPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((entryPtr != NULL) && (entryPtr != viewPtr->focusPtr)) {
-	    if (entryPtr->flags & ENTRY_HIDE) {
-		/* Doesn't make sense to set focus to a node you can't see. */
-		MapAncestors(viewPtr, entryPtr);
-	    }
-	    /* Changing focus can only affect the visible entries.  The entry
-	     * layout stays the same. */
-	    if (viewPtr->focusPtr != NULL) {
-		viewPtr->focusPtr->flags |= ENTRY_REDRAW;
-	    } 
-	    entryPtr->flags |= ENTRY_REDRAW;
-	    viewPtr->flags |= SCROLL_PENDING;
-	    viewPtr->focusPtr = entryPtr;
-	}
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-    }
-    Blt_SetFocusItem(viewPtr->bindTable, viewPtr->focusPtr, ITEM_ENTRY);
-    inode = -1;
-    if (viewPtr->focusPtr != NULL) {
-	inode = Blt_Tree_NodeId(viewPtr->focusPtr->node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BboxOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BboxOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    TreeViewEntry *entryPtr;
-    int width, height, yBot;
-    int left, top, right, bottom;
-    int screen;
-    int lWidth;
-    char *string;
-
-    if (viewPtr->flags & LAYOUT_PENDING) {
-	/*
-	 * The layout is dirty.  Recompute it now, before we use the world
-	 * dimensions.  But remember, the "bbox" operation isn't valid for
-	 * hidden entries (since they're not visible, they don't have world
-	 * coordinates).
-	 */
-	Blt_TreeView_ComputeLayout(viewPtr);
-    }
-    left = viewPtr->worldWidth;
-    top = viewPtr->worldHeight;
-    right = bottom = 0;
-
-    screen = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] == '-') && (strcmp(string, "-screen") == 0)) {
-	screen = TRUE;
-	objc--, objv++;
-    }
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if ((string[0] == 'a') && (strcmp(string, "all") == 0)) {
-	    left = top = 0;
-	    right = viewPtr->worldWidth;
-	    bottom = viewPtr->worldHeight;
-	    break;
-	}
-	if (GetEntryFromObj(viewPtr, objv[i], &entryPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (entryPtr == NULL) {
-	    continue;
-	}
-	if (entryPtr->flags & ENTRY_HIDE) {
-	    continue;
-	}
-	yBot = entryPtr->worldY + entryPtr->height;
-	height = VPORTHEIGHT(viewPtr);
-	if ((yBot <= viewPtr->yOffset) &&
-	    (entryPtr->worldY >= (viewPtr->yOffset + height))) {
-	    continue;
-	}
-	if (bottom < yBot) {
-	    bottom = yBot;
-	}
-	if (top > entryPtr->worldY) {
-	    top = entryPtr->worldY;
-	}
-	lWidth = ICONWIDTH(DEPTH(viewPtr, entryPtr->node));
-	if (right < (entryPtr->worldX + entryPtr->width + lWidth)) {
-	    right = (entryPtr->worldX + entryPtr->width + lWidth);
-	}
-	if (left > entryPtr->worldX) {
-	    left = entryPtr->worldX;
-	}
-    }
-
-    if (screen) {
-	width = VPORTWIDTH(viewPtr);
-	height = VPORTHEIGHT(viewPtr);
-	/*
-	 * Do a min-max text for the intersection of the viewport and the
-	 * computed bounding box.  If there is no intersection, return the
-	 * empty string.
-	 */
-	if ((right < viewPtr->xOffset) || (bottom < viewPtr->yOffset) ||
-	    (left >= (viewPtr->xOffset + width)) ||
-	    (top >= (viewPtr->yOffset + height))) {
-	    return TCL_OK;
-	}
-	/* Otherwise clip the coordinates at the view port boundaries. */
-	if (left < viewPtr->xOffset) {
-	    left = viewPtr->xOffset;
-	} else if (right > (viewPtr->xOffset + width)) {
-	    right = viewPtr->xOffset + width;
-	}
-	if (top < viewPtr->yOffset) {
-	    top = viewPtr->yOffset;
-	} else if (bottom > (viewPtr->yOffset + height)) {
-	    bottom = viewPtr->yOffset + height;
-	}
-	left = SCREENX(viewPtr, left), top = SCREENY(viewPtr, top);
-	right = SCREENX(viewPtr, right), bottom = SCREENY(viewPtr, bottom);
-    }
-    if ((left < right) && (top < bottom)) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(left));
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(top));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(right - left));
-	Tcl_ListObjAppendElement(interp, listObjPtr, 
-				 Tcl_NewIntObj(bottom - top));
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-static void
-DrawButton(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    Drawable drawable;
-    int sx, sy, dx, dy;
-    int width, height;
-    int left, right, top, bottom;
-
-    dx = SCREENX(viewPtr, entryPtr->worldX) + entryPtr->buttonX;
-    dy = SCREENY(viewPtr, entryPtr->worldY) + entryPtr->buttonY;
-    width = viewPtr->button.width;
-    height = viewPtr->button.height;
-
-    top = viewPtr->titleHeight + viewPtr->inset;
-    bottom = Tk_Height(viewPtr->tkwin) - viewPtr->inset;
-    left = viewPtr->inset;
-    right = Tk_Width(viewPtr->tkwin) - viewPtr->inset;
-
-    if (((dx + width) < left) || (dx > right) ||
-	((dy + height) < top) || (dy > bottom)) {
-	return;			/* Value is clipped. */
-    }
-    drawable = Tk_GetPixmap(viewPtr->display, Tk_WindowId(viewPtr->tkwin), 
-	width, height, Tk_Depth(viewPtr->tkwin));
-    /* Draw the background of the value. */
-    Blt_TreeView_DrawButton(viewPtr, entryPtr, drawable, 0, 0);
-
-    /* Clip the drawable if necessary */
-    sx = sy = 0;
-    if (dx < left) {
-	width -= left - dx;
-	sx += left - dx;
-	dx = left;
-    }
-    if ((dx + width) >= right) {
-	width -= (dx + width) - right;
-    }
-    if (dy < top) {
-	height -= top - dy;
-	sy += top - dy;
-	dy = top;
-    }
-    if ((dy + height) >= bottom) {
-	height -= (dy + height) - bottom;
-    }
-    XCopyArea(viewPtr->display, drawable, Tk_WindowId(viewPtr->tkwin), 
-      viewPtr->lineGC, sx, sy, width,  height, dx, dy);
-    Tk_FreePixmap(viewPtr->display, drawable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonActivateOp --
- *
- *	Selects the button to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonActivateOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    TreeViewEntry *oldPtr, *newPtr;
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '\0') {
-	newPtr = NULL;
-    } else if (GetEntryFromObj(viewPtr, objv[3], &newPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (viewPtr->treeColumn.hidden) {
-	return TCL_OK;
-    }
-    if ((newPtr != NULL) && !(newPtr->flags & ENTRY_HAS_BUTTON)) {
-	newPtr = NULL;
-    }
-    oldPtr = viewPtr->activeBtnPtr;
-    viewPtr->activeBtnPtr = newPtr;
-    if (!(viewPtr->flags & REDRAW_PENDING) && (newPtr != oldPtr)) {
-	if ((oldPtr != NULL) && (oldPtr != viewPtr->rootPtr)) {
-	    DrawButton(viewPtr, oldPtr);
-	}
-	if ((newPtr != NULL) && (newPtr != viewPtr->rootPtr)) {
-	    DrawButton(viewPtr, newPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonBindOp --
- *
- *	  .t bind tag sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonBindOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ClientData object;
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    /* Assume that this is a binding tag. */
-    object = Blt_TreeView_ButtonTag(viewPtr, string);
-    return Blt_ConfigureBindingsFromObj(interp, viewPtr->bindTable, object, 
-	objc - 4, objv + 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ButtonCgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, bltTreeViewButtonSpecs, 
-	(char *)viewPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure the one of more entries in the
- * 	widget.
- *
- *	  .h button configure option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for viewPtr; old resources get freed, if there were any.  The
- *	hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ButtonConfigureOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-	    bltTreeViewButtonSpecs, (char *)viewPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewButtonSpecs, (char *)viewPtr, objv[3], 0);
-    }
-    bltTreeViewIconsOption.clientData = viewPtr;
-    if (Blt_ConfigureWidgetFromObj(viewPtr->interp, viewPtr->tkwin, 
-		bltTreeViewButtonSpecs, objc - 3, objv + 3, (char *)viewPtr, 
-		BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_TreeView_ConfigureButtons(viewPtr);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonOp --
- *
- *	This procedure handles button operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec buttonOps[] =
-{
-    {"activate",  1, ButtonActivateOp,  4, 4, "tagOrId",},
-    {"bind",      1, ButtonBindOp,      4, 6, "tagName ?sequence command?",},
-    {"cget",      2, ButtonCgetOp,      4, 4, "option",},
-    {"configure", 2, ButtonConfigureOp, 3, 0, "?option value?...",},
-    {"highlight", 1, ButtonActivateOp,  4, 4, "tagOrId",},
-};
-
-static int nButtonOps = sizeof(buttonOps) / sizeof(Blt_OpSpec);
-
-static int
-ButtonOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TvCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nButtonOps, buttonOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, bltTreeViewSpecs,
-	(char *)viewPtr, objv[2], 0);
-}
-
-/*ARGSUSED*/
-static int
-CloseOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    TreeViewTagIter iter;
-    int recurse, result;
-    int i;
-
-    recurse = FALSE;
-
-    if (objc > 2) {
-	char *string;
-	int length;
-
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	if ((string[0] == '-') && (length > 1) && 
-	    (strncmp(string, "-recurse", length) == 0)) {
-	    objv++, objc--;
-	    recurse = TRUE;
-	}
-    }
-    for (i = 2; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    /* 
-	     * Clear the selections for any entries that may have become
-	     * hidden by closing the node.
-	     */
-	    Blt_TreeView_PruneSelection(viewPtr, entryPtr);
-	    
-	    /*
-	     *  Check if either the "focus" entry or selection anchor is in
-	     *  this hierarchy.  Must move it or disable it before we close
-	     *  the node.  Otherwise it may be deleted by a TCL "close"
-	     *  script, and we'll be left pointing to a bogus memory location.
-	     */
-	    if ((viewPtr->focusPtr != NULL) && 
-		(Blt_Tree_IsAncestor(entryPtr->node, viewPtr->focusPtr->node))){
-		viewPtr->focusPtr = entryPtr;
-		Blt_SetFocusItem(viewPtr->bindTable, viewPtr->focusPtr, 
-			ITEM_ENTRY);
-	    }
-	    if ((viewPtr->selAnchorPtr != NULL) && 
-		(Blt_Tree_IsAncestor(entryPtr->node, 
-				    viewPtr->selAnchorPtr->node))) {
-		viewPtr->selMarkPtr = viewPtr->selAnchorPtr = NULL;
-	    }
-	    if ((viewPtr->activePtr != NULL) && 
-		(Blt_Tree_IsAncestor(entryPtr->node,viewPtr->activePtr->node))){
-		viewPtr->activePtr = entryPtr;
-	    }
-	    if (recurse) {
-		result = Blt_TreeView_Apply(viewPtr, entryPtr, 
-			Blt_TreeView_CloseEntry, 0);
-	    } else {
-		result = Blt_TreeView_CloseEntry(viewPtr, entryPtr);
-	    }
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }	
-	}
-    }
-    /* Closing a node may affect the visible entries and the the world layout
-     * of the entries. */
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process an objv/objc list, plus the Tk
- * 	option database, in order to configure (or reconfigure) the widget.
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for viewPtr; old resources get freed, if there were any.  The widget
- *	is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewSpecs, (char *)viewPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewSpecs, (char *)viewPtr, objv[2], 0);
-    } 
-    bltTreeViewIconsOption.clientData = viewPtr;
-    bltTreeViewTreeOption.clientData = viewPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, viewPtr->tkwin, bltTreeViewSpecs, 
-	objc - 2, objv + 2, (char *)viewPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_TreeView_UpdateWidget(interp, viewPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-CurselectionOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (viewPtr->flags & TV_SELECT_SORTED) {
-	Blt_ChainLink link;
-
-	for (link = Blt_Chain_FirstLink(viewPtr->selected); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    TreeViewEntry *entryPtr;
-	    Tcl_Obj *objPtr;
-
-	    entryPtr = Blt_Chain_GetValue(link);
-	    objPtr = NodeToObj(entryPtr->node);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-			
-	}
-    } else {
-	TreeViewEntry *entryPtr;
-
-	for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextEntry(entryPtr, ENTRY_MASK)) {
-
-	    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-		Tcl_Obj *objPtr;
-
-		objPtr = NodeToObj(entryPtr->node);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BindOp --
- *
- *	  .t bind tagOrId sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BindOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    ClientData object;
-    TreeViewEntry *entryPtr;
-    char *string;
-
-    /*
-     * Entries are selected by id only.  All other strings are interpreted as
-     * a binding tag.
-     */
-    string = Tcl_GetString(objv[2]);
-    if (isdigit(UCHAR(string[0]))) {
-	Blt_TreeNode node;
-	long inode;
-
-	if (Tcl_GetLongFromObj(viewPtr->interp, objv[2], &inode) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	node = Blt_Tree_GetNode(viewPtr->tree, inode);
-	object = Blt_TreeView_NodeToEntry(viewPtr, node);
-    } else if (GetEntryFromSpecialId(viewPtr, string, &entryPtr) == TCL_OK) {
-	if (entryPtr != NULL) {
-	    return TCL_OK;	/* Special id doesn't currently exist. */
-	}
-	object = entryPtr;
-    } else {
-	/* Assume that this is a binding tag. */
-	object = Blt_TreeView_EntryTag(viewPtr, string);
-    } 
-    return Blt_ConfigureBindingsFromObj(interp, viewPtr->bindTable, object, 
-	 objc - 3, objv + 3);
-}
-
-
-/*ARGSUSED*/
-static int
-EditOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    char *string;
-    int isRoot, isTest;
-    int x, y;
-
-    isRoot = isTest = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    }
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-test", string) == 0) {
-	isTest = TRUE;
-	objv++, objc--;
-    }
-    if (objc != 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-			" ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (isRoot) {
-	int rootX, rootY;
-
-	Tk_GetRootCoords(viewPtr->tkwin, &rootX, &rootY);
-	x -= rootX;
-	y -= rootY;
-    }
-    entryPtr = Blt_TreeView_NearestEntry(viewPtr, x, y, FALSE);
-    if (entryPtr != NULL) {
-	Blt_ChainLink link;
-	TreeViewColumn *columnPtr;
-	int worldX;
-
-	worldX = WORLDX(viewPtr, x);
-	for (link = Blt_Chain_FirstLink(viewPtr->columns); 
-	     link != NULL; link = Blt_Chain_NextLink(link)) {
-	    columnPtr = Blt_Chain_GetValue(link);
-	    if (!columnPtr->editable) {
-		continue;		/* Column isn't editable. */
-	    }
-	    if ((worldX >= columnPtr->worldX) && 
-		(worldX < (columnPtr->worldX + columnPtr->width))) {
-		TreeViewStyle *stylePtr;
-	
-		stylePtr = NULL;
-		if (columnPtr != &viewPtr->treeColumn) {
-		    TreeViewValue *valuePtr;
-		
-		    valuePtr = Blt_TreeView_FindValue(entryPtr, columnPtr);
-		    stylePtr = valuePtr->stylePtr;
-		} 
-		if (stylePtr == NULL) {
-		    stylePtr = columnPtr->stylePtr;
-		}
-		if ((!columnPtr->editable) || 
-		     (stylePtr->classPtr->editProc == NULL)) {
-		    continue;
-		}
-		if (!isTest) {
-		    if ((*stylePtr->classPtr->editProc)(viewPtr, entryPtr, 
-			columnPtr, stylePtr) != TCL_OK) {
-			return TCL_ERROR;
-		    }
-		    Blt_TreeView_EventuallyRedraw(viewPtr);
-		}
-		Tcl_SetBooleanObj(Tcl_GetObjResult(interp), TRUE);
-		return TCL_OK;
-	    }
-	}
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), FALSE);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryActivateOp --
- *
- *	Selects the entry to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryActivateOp(
-    TreeView *viewPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    TreeViewEntry *newPtr, *oldPtr;
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '\0') {
-	newPtr = NULL;
-    } else if (GetEntryFromObj(viewPtr, objv[3], &newPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (viewPtr->treeColumn.hidden) {
-	return TCL_OK;
-    }
-    oldPtr = viewPtr->activePtr;
-    viewPtr->activePtr = newPtr;
-    if (!(viewPtr->flags & REDRAW_PENDING) && (newPtr != oldPtr)) {
-	Drawable drawable;
-
-	drawable = Tk_WindowId(viewPtr->tkwin);
-	if (oldPtr != NULL) {
-	    Blt_TreeView_DrawLabel(viewPtr, oldPtr, drawable);
-	}
-	if (newPtr != NULL) {
-	    Blt_TreeView_DrawLabel(viewPtr, newPtr, drawable);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryCgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewEntrySpecs, (char *)entryPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure the one of more entries in the
- * 	widget.
- *
- *	  .h entryconfigure node node node node option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for viewPtr; old resources get freed, if there were any.  The
- *	hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EntryConfigureOp(
-    TreeView *viewPtr,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int nIds, configObjc;
-    Tcl_Obj *const *configObjv;
-    int i;
-    TreeViewEntry *entryPtr;
-    TreeViewTagIter iter;
-    char *string;
-
-    /* Figure out where the option value pairs begin */
-    objc -= 3, objv += 3;
-    for (i = 0; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-    }
-    nIds = i;			/* # of tags or ids specified */
-    configObjc = objc - i;	/* # of options specified */
-    configObjv = objv + i;	/* Start of options in objv  */
-
-    bltTreeViewIconsOption.clientData = viewPtr;
-    bltTreeViewUidOption.clientData = viewPtr;
-
-    for (i = 0; i < nIds; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    if (configObjc == 0) {
-		return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-			bltTreeViewEntrySpecs, (char *)entryPtr, 
-			(Tcl_Obj *)NULL, 0);
-	    } else if (configObjc == 1) {
-		return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-			bltTreeViewEntrySpecs, (char *)entryPtr, 
-			configObjv[0], 0);
-	    }
-	    if (Blt_TreeView_ConfigureEntry(viewPtr, entryPtr, configObjc, 
-		configObjv, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    viewPtr->flags |= (DIRTY | LAYOUT_PENDING | SCROLL_PENDING /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryIsOpenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryIsBeforeOp(
-    TreeView *viewPtr, 
-    Tcl_Interp *interp, 
-    int objc, 
-    Tcl_Obj *const *objv)
-{
-    TreeViewEntry *e1Ptr, *e2Ptr;
-    int bool;
-
-    if ((Blt_TreeView_GetEntry(viewPtr, objv[3], &e1Ptr) != TCL_OK) ||
-	(Blt_TreeView_GetEntry(viewPtr, objv[4], &e2Ptr) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    bool = Blt_Tree_IsBefore(e1Ptr->node, e2Ptr->node);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryIsHiddenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryIsHiddenOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int bool;
-
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = (entryPtr->flags & ENTRY_HIDE);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryIsOpenOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryIsOpenOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int bool;
-
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = ((entryPtr->flags & ENTRY_CLOSED) == 0);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-EntryChildrenOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewEntry *parentPtr;
-    Tcl_Obj *listObjPtr, *objPtr;
-    unsigned int mask;
-
-    mask = 0;
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &parentPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (objc == 4) {
-	TreeViewEntry *entryPtr;
-
-	for (entryPtr = Blt_TreeView_FirstChild(parentPtr, mask); 
-	     entryPtr != NULL;
-	     entryPtr = Blt_TreeView_NextSibling(entryPtr, mask)) {
-	    objPtr = NodeToObj(entryPtr->node);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else if (objc == 6) {
-	TreeViewEntry *entryPtr, *lastPtr, *firstPtr;
-	long firstPos, lastPos;
-	long nNodes;
-
-	if ((Blt_GetPositionFromObj(interp, objv[4], &firstPos) != TCL_OK) ||
-	    (Blt_GetPositionFromObj(interp, objv[5], &lastPos) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	nNodes = Blt_Tree_NodeDegree(parentPtr->node);
-	if (nNodes == 0) {
-	    return TCL_OK;
-	}
-	if ((lastPos == END) || (lastPos >= nNodes)) {
-	    lastPtr = Blt_TreeView_LastChild(parentPtr, mask);
-	} else {
-	    lastPtr = GetNthEntry(parentPtr, lastPos, mask);
-	}
-	if ((firstPos == END) || (firstPos >= nNodes)) {
-	    firstPtr = Blt_TreeView_LastChild(parentPtr, mask);
-	} else {
-	    firstPtr = GetNthEntry(parentPtr, firstPos, mask);
-	}
-	if ((lastPos != END) && (firstPos > lastPos)) {
-	    for (entryPtr = lastPtr; entryPtr != NULL; 
-		entryPtr = Blt_TreeView_PrevEntry(entryPtr, mask)) {
-		objPtr = NodeToObj(entryPtr->node);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		if (entryPtr == firstPtr) {
-		    break;
-		}
-	    }
-	} else {
-	    for (entryPtr = firstPtr; entryPtr != NULL; 
-		 entryPtr = Blt_TreeView_NextEntry(entryPtr, mask)) {
-		objPtr = NodeToObj(entryPtr->node);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-		if (entryPtr == lastPtr) {
-		    break;
-		}
-	    }
-	}
-    } else {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-			 Tcl_GetString(objv[0]), " ",
-			 Tcl_GetString(objv[1]), " ", 
-			 Tcl_GetString(objv[2]), " tagOrId ?first last?", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryDeleteOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EntryDeleteOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 5) {
-	long entryPos;
-	Blt_TreeNode node;
-	/*
-	 * Delete a single child node from a hierarchy specified by its
-	 * numeric position.
-	 */
-	if (Blt_GetPositionFromObj(interp, objv[3], &entryPos) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (entryPos >= (long)Blt_Tree_NodeDegree(entryPtr->node)) {
-	    return TCL_OK;	/* Bad first index */
-	}
-	if (entryPos == END) {
-	    node = Blt_Tree_LastChild(entryPtr->node);
-	} else {
-	    node = GetNthNode(entryPtr->node, entryPos);
-	}
-	DeleteNode(viewPtr, node);
-    } else {
-	long firstPos, lastPos;
-	Blt_TreeNode node, first, last, next;
-	long nEntries;
-	/*
-	 * Delete range of nodes in hierarchy specified by first/last
-	 * positions.
-	 */
-	if ((Blt_GetPositionFromObj(interp, objv[4], &firstPos) != TCL_OK) ||
-	    (Blt_GetPositionFromObj(interp, objv[5], &lastPos) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	nEntries = Blt_Tree_NodeDegree(entryPtr->node);
-	if (nEntries == 0) {
-	    return TCL_OK;
-	}
-	if (firstPos == END) {
-	    firstPos = nEntries - 1;
-	}
-	if (firstPos >= nEntries) {
-	    Tcl_AppendResult(interp, "first position \"", 
-		Tcl_GetString(objv[4]), " is out of range", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if ((lastPos == END) || (lastPos >= nEntries)) {
-	    lastPos = nEntries - 1;
-	}
-	if (firstPos > lastPos) {
-	    Tcl_AppendResult(interp, "bad range: \"", Tcl_GetString(objv[4]), 
-		" > ", Tcl_GetString(objv[5]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	first = GetNthNode(entryPtr->node, firstPos);
-	last = GetNthNode(entryPtr->node, lastPos);
-	for (node = first; node != NULL; node = next) {
-	    next = Blt_Tree_NextSibling(node);
-	    DeleteNode(viewPtr, node);
-	    if (node == last) {
-		break;
-	    }
-	}
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntrySizeOp --
- *
- *	Counts the number of entries at this node.
- *
- * Results:
- *	A standard TCL result.  If an error occurred TCL_ERROR is returned and
- *	interp->result will contain an error message.  Otherwise, TCL_OK is
- *	returned and interp->result contains the number of entries.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EntrySizeOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int length, recurse;
-    long sum;
-    char *string;
-
-    recurse = FALSE;
-    string = Tcl_GetStringFromObj(objv[3], &length);
-    if ((string[0] == '-') && (length > 1) &&
-	(strncmp(string, "-recurse", length) == 0)) {
-	objv++, objc--;
-	recurse = TRUE;
-    }
-    if (objc == 3) {
-	Tcl_AppendResult(interp, "missing node argument: should be \"",
-	    Tcl_GetString(objv[0]), " entry open node\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (recurse) {
-	sum = Blt_Tree_Size(entryPtr->node);
-    } else {
-	sum = Blt_Tree_NodeDegree(entryPtr->node);
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), sum);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EntryOp --
- *
- *	This procedure handles entry operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec entryOps[] =
-{
-    {"activate",  1, EntryActivateOp,  4, 4, "tagOrId",},
-    /*bbox*/
-    /*bind*/
-    {"cget",      2, EntryCgetOp,      5, 5, "tagOrId option",},
-    {"children",  2, EntryChildrenOp,  4, 6, "tagOrId firstPos lastPos",},
-    /*close*/
-    {"configure", 2, EntryConfigureOp, 4, 0, 
-	"tagOrId ?tagOrId...? ?option value?...",},
-    {"delete",    2, EntryDeleteOp,    5, 6, "tagOrId firstPos ?lastPos?",},
-    /*focus*/
-    /*hide*/
-    {"highlight", 1, EntryActivateOp,  4, 4, "tagOrId",},
-    /*index*/
-    {"isbefore",  3, EntryIsBeforeOp,  5, 5, "tagOrId tagOrId",},
-    {"ishidden",  3, EntryIsHiddenOp,  4, 4, "tagOrId",},
-    {"isopen",    3, EntryIsOpenOp,    4, 4, "tagOrId",},
-    /*move*/
-    /*nearest*/
-    /*open*/
-    /*see*/
-    /*show*/
-    {"size",      1, EntrySizeOp,      4, 5, "?-recurse? tagOrId",},
-    /*toggle*/
-};
-static int nEntryOps = sizeof(entryOps) / sizeof(Blt_OpSpec);
-
-static int
-EntryOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TvCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nEntryOps, entryOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-ExactCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return (strcmp(name, pattern) == 0);
-}
-
-/*ARGSUSED*/
-static int
-GlobCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return Tcl_StringMatch(name, pattern);
-}
-
-static int
-RegexpCompare(Tcl_Interp *interp, const char *name, const char *pattern)
-{
-    return Tcl_RegExpMatch(interp, name, pattern);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindOp --
- *
- *	Find one or more nodes based upon the pattern provided.
- *
- * Results:
- *	A standard TCL result.  The interpreter result will contain a list of
- *	the node serial identifiers.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *firstPtr, *lastPtr;
-    int nMatches, maxMatches;
-    char c;
-    int length;
-    TreeViewCompareProc *compareProc;
-    TreeViewIterProc *nextProc;
-    int invertMatch;		/* normal search mode (matching entries) */
-    char *namePattern, *fullPattern;
-    char *execCmd;
-    int i;
-    int result;
-    char *pattern, *option;
-    Blt_List options;
-    Blt_ListNode node;
-    char *addTag, *withTag;
-    TreeViewEntry *entryPtr;
-    char *string;
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    invertMatch = FALSE;
-    maxMatches = 0;
-    execCmd = namePattern = fullPattern = NULL;
-    compareProc = ExactCompare;
-    nextProc = Blt_TreeView_NextEntry;
-    options = Blt_List_Create(BLT_ONE_WORD_KEYS);
-    withTag = addTag = NULL;
-
-    entryPtr = viewPtr->rootPtr;
-    /*
-     * Step 1:  Process flags for find operation.
-     */
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetStringFromObj(objv[i], &length);
-	if (string[0] != '-') {
-	    break;
-	}
-	option = string + 1;
-	length--;
-	c = option[0];
-	if ((c == 'e') && (length > 2) &&
-	    (strncmp(option, "exact", length) == 0)) {
-	    compareProc = ExactCompare;
-	} else if ((c == 'g') && (strncmp(option, "glob", length) == 0)) {
-	    compareProc = GlobCompare;
-	} else if ((c == 'r') && (strncmp(option, "regexp", length) == 0)) {
-	    compareProc = RegexpCompare;
-	} else if ((c == 'n') && (length > 1) &&
-	    (strncmp(option, "nonmatching", length) == 0)) {
-	    invertMatch = TRUE;
-	} else if ((c == 'n') && (length > 1) &&
-	    (strncmp(option, "name", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    namePattern = Tcl_GetString(objv[i]);
-	} else if ((c == 'f') && (strncmp(option, "full", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    fullPattern = Tcl_GetString(objv[i]);
-	} else if ((c == 'e') && (length > 2) &&
-	    (strncmp(option, "exec", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    execCmd = Tcl_GetString(objv[i]);
-	} else if ((c == 'a') && (length > 1) &&
-		   (strncmp(option, "addtag", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    addTag = Tcl_GetString(objv[i]);
-	} else if ((c == 't') && (length > 1) && 
-		   (strncmp(option, "tag", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    withTag = Tcl_GetString(objv[i]);
-	} else if ((c == 'c') && (strncmp(option, "count", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    if (Tcl_GetIntFromObj(interp, objv[i], &maxMatches) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (maxMatches < 0) {
-		Tcl_AppendResult(interp, "bad match count \"", objv[i],
-		    "\": should be a positive number", (char *)NULL);
-		Blt_List_Destroy(options);
-		return TCL_ERROR;
-	    }
-	} else if ((option[0] == '-') && (option[1] == '\0')) {
-	    break;
-	} else {
-	    /*
-	     * Verify that the switch is actually an entry configuration
-	     * option.
-	     */
-	    if (Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-		  bltTreeViewEntrySpecs, (char *)entryPtr, objv[i], 0) 
-		!= TCL_OK) {
-		Tcl_ResetResult(interp);
-		Tcl_AppendResult(interp, "bad find switch \"", string, "\"",
-		    (char *)NULL);
-		Blt_List_Destroy(options);
-		return TCL_ERROR;
-	    }
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    /* Save the option in the list of configuration options */
-	    node = Blt_List_GetNode(options, (char *)objv[i]);
-	    if (node == NULL) {
-		node = Blt_List_CreateNode(options, (char *)objv[i]);
-		Blt_List_AppendNode(options, node);
-	    }
-	    i++;
-	    Blt_List_SetValue(node, Tcl_GetString(objv[i]));
-	}
-    }
-
-    if ((objc - i) > 2) {
-	Blt_List_Destroy(options);
-	Tcl_AppendResult(interp, "too many args", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Step 2:  Find the range of the search.  Check the order of two
-     *		nodes and arrange the search accordingly.
-     *
-     *	Note:	Be careful to treat "end" as the end of all nodes, instead
-     *		of the end of visible nodes.  That way, we can search the
-     *		entire tree, even if the last folder is closed.
-     */
-    firstPtr = viewPtr->rootPtr;	/* Default to root node */
-    lastPtr = LastEntry(viewPtr, firstPtr, 0);
-
-    if (i < objc) {
-	string = Tcl_GetString(objv[i]);
-	if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-	    firstPtr = LastEntry(viewPtr, viewPtr->rootPtr, 0);
-	} else if (Blt_TreeView_GetEntry(viewPtr, objv[i], &firstPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	i++;
-    }
-    if (i < objc) {
-	string = Tcl_GetString(objv[i]);
-	if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-	    lastPtr = LastEntry(viewPtr, viewPtr->rootPtr, 0);
-	} else if (Blt_TreeView_GetEntry(viewPtr, objv[i], &lastPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (Blt_Tree_IsBefore(lastPtr->node, firstPtr->node)) {
-	nextProc = Blt_TreeView_PrevEntry;
-    }
-    nMatches = 0;
-
-    /*
-     * Step 3:	Search through the tree and look for nodes that match the
-     *		current pattern specifications.  Save the name of each of
-     *		the matching nodes.
-     */
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (entryPtr = firstPtr; entryPtr != NULL; 
-	 entryPtr = (*nextProc) (entryPtr, 0)) {
-	if (namePattern != NULL) {
-	    result = (*compareProc)(interp, Blt_Tree_NodeLabel(entryPtr->node),
-		     namePattern);
-	    if (result == invertMatch) {
-		goto nextEntry;	/* Failed to match */
-	    }
-	}
-	if (fullPattern != NULL) {
-	    Tcl_DString fullName;
-
-	    Blt_TreeView_GetFullName(viewPtr, entryPtr, FALSE, &fullName);
-	    result = (*compareProc) (interp, Tcl_DStringValue(&fullName), 
-		fullPattern);
-	    Tcl_DStringFree(&fullName);
-	    if (result == invertMatch) {
-		goto nextEntry;	/* Failed to match */
-	    }
-	}
-	if (withTag != NULL) {
-	    result = Blt_Tree_HasTag(viewPtr->tree, entryPtr->node, withTag);
-	    if (result == invertMatch) {
-		goto nextEntry;	/* Failed to match */
-	    }
-	}
-	for (node = Blt_List_FirstNode(options); node != NULL;
-	    node = Blt_List_NextNode(node)) {
-	    objPtr = (Tcl_Obj *)Blt_List_GetKey(node);
-	    Tcl_ResetResult(interp);
-	    Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewEntrySpecs, (char *)entryPtr, objPtr, 0);
-	    pattern = Blt_List_GetValue(node);
-	    objPtr = Tcl_GetObjResult(interp);
-	    result = (*compareProc) (interp, Tcl_GetString(objPtr), pattern);
-	    if (result == invertMatch) {
-		goto nextEntry;	/* Failed to match */
-	    }
-	}
-	/* 
-	 * Someone may actually delete the current node in the "exec"
-	 * callback.  Preserve the entry.
-	 */
-	Tcl_Preserve(entryPtr);
-	if (execCmd != NULL) {
-	    Tcl_DString cmdString;
-
-	    Blt_TreeView_PercentSubst(viewPtr, entryPtr, execCmd, &cmdString);
-	    result = Tcl_GlobalEval(interp, Tcl_DStringValue(&cmdString));
-	    Tcl_DStringFree(&cmdString);
-	    if (result != TCL_OK) {
-		Tcl_Release(entryPtr);
-		goto error;
-	    }
-	}
-	/* A NULL node reference in an entry indicates that the entry
-	 * was deleted, but its memory not released yet. */
-	if (entryPtr->node != NULL) {
-	    /* Finally, save the matching node name. */
-	    objPtr = NodeToObj(entryPtr->node);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    if (addTag != NULL) {
-		if (AddTag(viewPtr, entryPtr->node, addTag) != TCL_OK) {
-		    goto error;
-		}
-	    }
-	}
-	    
-	Tcl_Release(entryPtr);
-	nMatches++;
-	if ((nMatches == maxMatches) && (maxMatches > 0)) {
-	    break;
-	}
-      nextEntry:
-	if (entryPtr == lastPtr) {
-	    break;
-	}
-    }
-    Tcl_ResetResult(interp);
-    Blt_List_Destroy(options);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-
-  missingArg:
-    Tcl_AppendResult(interp, "missing argument for find option \"", objv[i],
-	"\"", (char *)NULL);
-  error:
-    Blt_List_Destroy(options);
-    return TCL_ERROR;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetOp --
- *
- *	Converts one or more node identifiers to its path component.  The path
- *	may be either the single entry name or the full path of the entry.
- *
- * Results:
- *	A standard TCL result.  The interpreter result will contain a list of
- *	the convert names.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewTagIter iter;
-    TreeViewEntry *entryPtr;
-    int useFullName;
-    int i;
-    Tcl_DString d1, d2;
-    int count;
-
-    useFullName = FALSE;
-    if (objc > 2) {
-	char *string;
-
-	string = Tcl_GetString(objv[2]);
-	if ((string[0] == '-') && (strcmp(string, "-full") == 0)) {
-	    useFullName = TRUE;
-	    objv++, objc--;
-	}
-    }
-    Tcl_DStringInit(&d1);	/* Result. */
-    Tcl_DStringInit(&d2);	/* Last element. */
-    count = 0;
-    for (i = 2; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    Tcl_DStringSetLength(&d2, 0);
-	    count++;
-	    if (entryPtr->node != NULL) {
-		if (useFullName) {
-		    Blt_TreeView_GetFullName(viewPtr, entryPtr, FALSE, &d2);
-		} else {
-		    Tcl_DStringAppend(&d2,Blt_Tree_NodeLabel(entryPtr->node),-1);
-		}
-		Tcl_DStringAppendElement(&d1, Tcl_DStringValue(&d2));
-	    }
-	}
-    }
-    /* This handles the single element list problem. */
-    if (count == 1) {
-	Tcl_DStringResult(interp, &d2);
-	Tcl_DStringFree(&d1);
-    } else {
-	Tcl_DStringResult(interp, &d1);
-	Tcl_DStringFree(&d2);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchAndApplyToTree --
- *
- *	Searches through the current tree and applies a procedure to matching
- *	nodes.  The search specification is taken from the following
- *	command-line arguments:
- *
- *      ?-exact? ?-glob? ?-regexp? ?-nonmatching?
- *      ?-data string?
- *      ?-name string?
- *      ?-full string?
- *      ?--?
- *      ?inode...?
- *
- * Results:
- *	A standard TCL result.  If the result is valid, and if the nonmatchPtr
- *	is specified, it returns a boolean value indicating whether or not the
- *	search was inverted.  This is needed to fix things properly for the
- *	"hide nonmatching" case.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SearchAndApplyToTree(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, TreeViewApplyProc *proc, int *nonMatchPtr)
-{
-    TreeViewCompareProc *compareProc;
-    int invertMatch;		/* normal search mode (matching entries) */
-    char *namePattern, *fullPattern;
-    int i;
-    int length;
-    int result;
-    char *option, *pattern;
-    char c;
-    Blt_List options;
-    TreeViewEntry *entryPtr;
-    Blt_ListNode node;
-    char *string;
-    char *withTag;
-    Tcl_Obj *objPtr;
-    TreeViewTagIter iter;
-
-    options = Blt_List_Create(BLT_ONE_WORD_KEYS);
-    invertMatch = FALSE;
-    namePattern = fullPattern = NULL;
-    compareProc = ExactCompare;
-    withTag = NULL;
-
-    entryPtr = viewPtr->rootPtr;
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetStringFromObj(objv[i], &length);
-	if (string[0] != '-') {
-	    break;
-	}
-	option = string + 1;
-	length--;
-	c = option[0];
-	if ((c == 'e') && (strncmp(option, "exact", length) == 0)) {
-	    compareProc = ExactCompare;
-	} else if ((c == 'g') && (strncmp(option, "glob", length) == 0)) {
-	    compareProc = GlobCompare;
-	} else if ((c == 'r') && (strncmp(option, "regexp", length) == 0)) {
-	    compareProc = RegexpCompare;
-	} else if ((c == 'n') && (length > 1) &&
-	    (strncmp(option, "nonmatching", length) == 0)) {
-	    invertMatch = TRUE;
-	} else if ((c == 'f') && (strncmp(option, "full", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    fullPattern = Tcl_GetString(objv[i]);
-	} else if ((c == 'n') && (length > 1) &&
-	    (strncmp(option, "name", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    namePattern = Tcl_GetString(objv[i]);
-	} else if ((c == 't') && (length > 1) && 
-		   (strncmp(option, "tag", length) == 0)) {
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    i++;
-	    withTag = Tcl_GetString(objv[i]);
-	} else if ((option[0] == '-') && (option[1] == '\0')) {
-	    break;
-	} else {
-	    /*
-	     * Verify that the switch is actually an entry configuration
-	     * option.
-	     */
-	    if (Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-		bltTreeViewEntrySpecs, (char *)entryPtr, objv[i], 0) 
-		!= TCL_OK) {
-		Tcl_ResetResult(interp);
-		Tcl_AppendResult(interp, "bad switch \"", string,
-	    "\": must be -exact, -glob, -regexp, -name, -full, or -nonmatching",
-		    (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    if ((i + 1) == objc) {
-		goto missingArg;
-	    }
-	    /* Save the option in the list of configuration options */
-	    node = Blt_List_GetNode(options, (char *)objv[i]);
-	    if (node == NULL) {
-		node = Blt_List_CreateNode(options, (char *)objv[i]);
-		Blt_List_AppendNode(options, node);
-	    }
-	    i++;
-	    Blt_List_SetValue(node, Tcl_GetString(objv[i]));
-	}
-    }
-
-    if ((namePattern != NULL) || (fullPattern != NULL) ||
-	(Blt_List_GetLength(options) > 0)) {
-	/*
-	 * Search through the tree and look for nodes that match the current
-	 * spec.  Apply the input procedure to each of the matching nodes.
-	 */
-	for (entryPtr = viewPtr->rootPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextEntry(entryPtr, 0)) {
-	    if (namePattern != NULL) {
-		result = (*compareProc) (interp, 
-			Blt_Tree_NodeLabel(entryPtr->node), namePattern);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    if (fullPattern != NULL) {
-		Tcl_DString dString;
-
-		Blt_TreeView_GetFullName(viewPtr, entryPtr, FALSE, &dString);
-		result = (*compareProc) (interp, Tcl_DStringValue(&dString), 
-			fullPattern);
-		Tcl_DStringFree(&dString);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    if (withTag != NULL) {
-		result = Blt_Tree_HasTag(viewPtr->tree, entryPtr->node, withTag);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    for (node = Blt_List_FirstNode(options); node != NULL;
-		node = Blt_List_NextNode(node)) {
-		objPtr = (Tcl_Obj *)Blt_List_GetKey(node);
-		Tcl_ResetResult(interp);
-		if (Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-			bltTreeViewEntrySpecs, (char *)entryPtr, objPtr, 0) 
-		    != TCL_OK) {
-		    return TCL_ERROR;	/* This shouldn't happen. */
-		}
-		pattern = Blt_List_GetValue(node);
-		objPtr = Tcl_GetObjResult(interp);
-		result = (*compareProc)(interp, Tcl_GetString(objPtr), pattern);
-		if (result == invertMatch) {
-		    continue;	/* Failed to match */
-		}
-	    }
-	    /* Finally, apply the procedure to the node */
-	    (*proc) (viewPtr, entryPtr);
-	}
-	Tcl_ResetResult(interp);
-	Blt_List_Destroy(options);
-    }
-    /*
-     * Apply the procedure to nodes that have been specified individually.
-     */
-    for ( /*empty*/ ; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    if ((*proc) (viewPtr, entryPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    if (nonMatchPtr != NULL) {
-	*nonMatchPtr = invertMatch;	/* return "inverted search" status */
-    }
-    return TCL_OK;
-
-  missingArg:
-    Blt_List_Destroy(options);
-    Tcl_AppendResult(interp, "missing pattern for search option \"", objv[i],
-	"\"", (char *)NULL);
-    return TCL_ERROR;
-
-}
-
-static int
-FixSelectionsApplyProc(TreeView *viewPtr, TreeViewEntry *entryPtr)
-{
-    if (entryPtr->flags & ENTRY_HIDE) {
-	Blt_TreeView_DeselectEntry(viewPtr, entryPtr);
-	if ((viewPtr->focusPtr != NULL) &&
-	    (Blt_Tree_IsAncestor(entryPtr->node, viewPtr->focusPtr->node))) {
-	    if (entryPtr != viewPtr->rootPtr) {
-		entryPtr = Blt_TreeView_ParentEntry(entryPtr);
-		viewPtr->focusPtr = (entryPtr == NULL) 
-		    ? viewPtr->focusPtr : entryPtr;
-		Blt_SetFocusItem(viewPtr->bindTable, viewPtr->focusPtr, ITEM_ENTRY);
-	    }
-	}
-	if ((viewPtr->selAnchorPtr != NULL) &&
-	    (Blt_Tree_IsAncestor(entryPtr->node, viewPtr->selAnchorPtr->node))) {
-	    viewPtr->selMarkPtr = viewPtr->selAnchorPtr = NULL;
-	}
-	if ((viewPtr->activePtr != NULL) &&
-	    (Blt_Tree_IsAncestor(entryPtr->node, viewPtr->activePtr->node))) {
-	    viewPtr->activePtr = NULL;
-	}
-	Blt_TreeView_PruneSelection(viewPtr, entryPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HideOp --
- *
- *	Hides one or more nodes.  Nodes can be specified by their inode, or by
- *	matching a name or data value pattern.  By default, the patterns are
- *	matched exactly.  They can also be matched using glob-style and
- *	regular expression rules.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-HideOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int status, nonmatching;
-
-    status = SearchAndApplyToTree(viewPtr, interp, objc, objv, 
-	HideEntryApplyProc, &nonmatching);
-
-    if (status != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * If this was an inverted search, scan back through the tree and make
-     * sure that the parents for all visible nodes are also visible.  After
-     * all, if a node is supposed to be visible, its parent can't be hidden.
-     */
-    if (nonmatching) {
-	Blt_TreeView_Apply(viewPtr, viewPtr->rootPtr, MapAncestorsApplyProc, 0);
-    }
-    /*
-     * Make sure that selections are cleared from any hidden nodes.  This
-     * wasn't done earlier--we had to delay it until we fixed the visibility
-     * status for the parents.
-     */
-    Blt_TreeView_Apply(viewPtr, viewPtr->rootPtr, FixSelectionsApplyProc, 0);
-
-    /* Hiding an entry only effects the visible nodes. */
-    viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ShowOp --
- *
- *	Mark one or more nodes to be exposed.  Nodes can be specified by their
- *	inode, or by matching a name or data value pattern.  By default, the
- *	patterns are matched exactly.  They can also be matched using
- *	glob-style and regular expression rules.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ShowOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (SearchAndApplyToTree(viewPtr, interp, objc, objv, ShowEntryApplyProc,
-	    (int *)NULL) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Converts one of more words representing indices of the entries in the
- *	treeview widget to their respective serial identifiers.
- *
- * Results:
- *	A standard TCL result.  Interp->result will contain the identifier of
- *	each inode found. If an inode could not be found, then the serial
- *	identifier will be the empty string.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    char *string;
-    TreeViewEntry *fromPtr;
-    int usePath;
-    long inode;
-
-    usePath = FALSE;
-    fromPtr = NULL;
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] == '-') && (strcmp(string, "-path") == 0)) {
-	usePath = TRUE;
-	objv++, objc--;
-    }
-    if ((string[0] == '-') && (strcmp(string, "-at") == 0)) {
-	if (Blt_TreeView_GetEntry(viewPtr, objv[3], &fromPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	objv += 2, objc -= 2;
-    }
-    if (objc != 3) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), 
-		" index ?-at tagOrId? ?-path? tagOrId\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    viewPtr->fromPtr = fromPtr;
-    if (viewPtr->fromPtr == NULL) {
-	viewPtr->fromPtr = viewPtr->focusPtr;
-    }
-    if (viewPtr->fromPtr == NULL) {
-	viewPtr->fromPtr = viewPtr->rootPtr;
-    }
-    inode = -1;
-    if (usePath) {
-	if (fromPtr == NULL) {
-	    fromPtr = viewPtr->rootPtr;
-	}
-	string = Tcl_GetString(objv[2]);
-	entryPtr = FindPath(viewPtr, fromPtr, string);
-	if (entryPtr != NULL) {
-	    inode = Blt_Tree_NodeId(entryPtr->node);
-	}
-    } else {
-	if ((GetEntryFromObj2(viewPtr, objv[2], &entryPtr) == TCL_OK) && 
-	    (entryPtr != NULL)) {
-	    inode = Blt_Tree_NodeId(entryPtr->node);
-	}
-    }
-    Tcl_SetLongObj(Tcl_GetObjResult(interp), inode);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Add new entries into a hierarchy.  If no node is specified, new
- *	entries will be added to the root of the hierarchy.
- *
- *---------------------------------------------------------------------------
- */
-static int
-InsertOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node, parent;
-    Tcl_Obj *const *options;
-    Tcl_Obj *listObjPtr;
-    TreeViewEntry *rootPtr;
-    const char **argv;
-    const char **p;
-    const char *path;
-    char *string;
-    int count;
-    int n;
-    long depth;
-    long insertPos;
-
-    rootPtr = viewPtr->rootPtr;
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] == '-') && (strcmp(string, "-at") == 0)) {
-	if (objc > 2) {
-	    if (Blt_TreeView_GetEntry(viewPtr, objv[3], &rootPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    objv += 2, objc -= 2;
-	} else {
-	    Tcl_AppendResult(interp, "missing argument for \"-at\" flag",
-		     (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (objc == 2) {
-	Tcl_AppendResult(interp, "missing position argument", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_GetPositionFromObj(interp, objv[2], &insertPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    node = NULL;
-    objc -= 3, objv += 3;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    while (objc > 0) {
-	path = Tcl_GetString(objv[0]);
-	objv++, objc--;
-
-	/*
-	 * Count the option-value pairs that follow.  Count until we spot one
-	 * that looks like an entry name (i.e. doesn't start with a minus
-	 * "-").
-	 */
-	for (count = 0; count < objc; count += 2) {
-	    string = Tcl_GetString(objv[count]);
-	    if (string[0] != '-') {
-		break;
-	    }
-	}
-	if (count > objc) {
-	    count = objc;
-	}
-	options = objv;
-	objc -= count, objv += count;
-
-	if (viewPtr->trimLeft != NULL) {
-	    const char *s1, *s2;
-
-	    /* Trim off leading character string if one exists. */
-	    for (s1 = path, s2 = viewPtr->trimLeft; *s2 != '\0'; s2++, s1++) {
-		if (*s1 != *s2) {
-		    break;
-		}
-	    }
-	    if (*s2 == '\0') {
-		path = s1;
-	    }
-	}
-	/* Split the path and find the parent node of the path. */
-	argv = &path;
-	depth = 1;
-	if (viewPtr->pathSep != SEPARATOR_NONE) {
-	    if (SplitPath(viewPtr, path, &depth, &argv) != TCL_OK) {
-		goto error;
-	    }
-	    if (depth == 0) {
-		Blt_Free(argv);
-		continue;		/* Root already exists. */
-	    }
-	}
-	parent = rootPtr->node;
-	depth--;		
-
-	/* Verify each component in the path preceding the tail.  */
-	for (n = 0, p = argv; n < depth; n++, p++) {
-	    node = Blt_Tree_FindChild(parent, *p);
-	    if (node == NULL) {
-		if ((viewPtr->flags & TV_FILL_ANCESTORS) == 0) {
-		    Tcl_AppendResult(interp, "can't find path component \"",
-		         *p, "\" in \"", path, "\"", (char *)NULL);
-		    goto error;
-		}
-		node = Blt_Tree_CreateNode(viewPtr->tree, parent, *p, END);
-		if (node == NULL) {
-		    goto error;
-		}
-	    }
-	    parent = node;
-	}
-	node = NULL;
-	if (((viewPtr->flags & TV_ALLOW_DUPLICATES) == 0) && 
-	    (Blt_Tree_FindChild(parent, *p) != NULL)) {
-	    Tcl_AppendResult(interp, "entry \"", *p, "\" already exists in \"",
-		 path, "\"", (char *)NULL);
-	    goto error;
-	}
-	node = Blt_Tree_CreateNode(viewPtr->tree, parent, *p, insertPos);
-	if (node == NULL) {
-	    goto error;
-	}
-	if (Blt_TreeView_CreateEntry(viewPtr, node, count, options, 0) != TCL_OK) {
-	    goto error;
-	}
-	if (argv != &path) {
-	    Blt_Free(argv);
-	}
-	Tcl_ListObjAppendElement(interp, listObjPtr, NodeToObj(node));
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-
-  error:
-    if (argv != &path) {
-	Blt_Free(argv);
-    }
-    Tcl_DecrRefCount(listObjPtr);
-    if (node != NULL) {
-	DeleteNode(viewPtr, node);
-    }
-    return TCL_ERROR;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * AddOp --
- *
- *	Add new entries into a hierarchy.  If no node is specified,
- *	new entries will be added to the root of the hierarchy.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_SwitchParseProc StringToChild;
-#define INSERT_BEFORE	(ClientData)0
-#define INSERT_AFTER	(ClientData)1
-static Blt_SwitchCustom beforeSwitch = {
-    ObjToChild, NULL, INSERT_BEFORE,
-};
-static Blt_SwitchCustom afterSwitch = {
-    ObjToChild, NULL, INSERT_AFTER,
-};
-
-typedef struct {
-    long insertPos;
-    Blt_TreeNode parent;
-} InsertData;
-
-static Blt_SwitchSpec insertSwitches[] = 
-{
-    {BLT_SWITCH_CUSTOM, "-after", "position",
-	Blt_Offset(InsertData, insertPos), 0, 0, &afterSwitch},
-    {BLT_SWITCH_LONG_NNEG, "-at", "position",
-	Blt_Offset(InsertData, insertPos), 0},
-    {BLT_SWITCH_CUSTOM, "-before", "position",
-	Blt_Offset(InsertData, insertPos), 0, 0, &beforeSwitch},
-    {BLT_SWITCH_END}
-};
-
-static int
-AddOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode node, parent;
-    Tcl_Obj *const *options;
-    Tcl_Obj *listObjPtr;
-    TreeViewEntry *rootPtr;
-    const char **argv;
-    const char **p;
-    char *path;
-    char *string;
-    int count;
-    int n;
-    long depth;
-    long insertPos;
-
-    memset(&data, 0, sizeof(data));
-    data.maxDepth = -1;
-    data.cmdPtr = cmdPtr;
-
-    /* Process any leading switches  */
-    i = Blt_ProcessObjSwitches(interp, addSwitches, objc - 2, objv + 2, 
-	     (char *)&data, BLT_CONFIG_OBJV_PARTIAL);
-    if (i < 0) {
-	return TCL_ERROR;
-    }
-    i += 2;
-    /* Should have at the starting node */
-    if (i >= objc) {
-	Tcl_AppendResult(interp, "starting node argument is missing", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_TreeView_GetEntry(viewPtr, objv[i], &rootPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    objv += i, objc -= i;
-    node = NULL;
-
-    /* Process sections of path ?options? */
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    while (objc > 0) {
-	path = Tcl_GetString(objv[0]);
-	objv++, objc--;
-	/*
-	 * Count the option-value pairs that follow.  Count until we spot one
-	 * that looks like an entry name (i.e. doesn't start with a minus
-	 * "-").
-	 */
-	for (count = 0; count < objc; count += 2) {
-	    if (!Blt_ObjIsOption(bltTreeViewEntrySpecs, objv[count], 0)) {
-		break;
-	    }
-	}
-	if (count > objc) {
-	    count = objc;
-	}
-	options = objv;
-	objc -= count, objv += count;
-
-	if (viewPtr->trimLeft != NULL) {
-	    char *s1, *s2;
-
-	    /* Trim off leading character string if one exists. */
-	    for (s1 = path, s2 = viewPtr->trimLeft; *s2 != '\0'; s2++, s1++) {
-		if (*s1 != *s2) {
-		    break;
-		}
-	    }
-	    if (*s2 == '\0') {
-		path = s1;
-	    }
-	}
-	/* Split the path and find the parent node of the path. */
-	argv = &path;
-	depth = 1;
-	if (viewPtr->pathSep != SEPARATOR_NONE) {
-	    if (SplitPath(viewPtr, path, &depth, &argv) != TCL_OK) {
-		goto error;
-	    }
-	    if (depth == 0) {
-		Blt_Free(argv);
-		continue;		/* Root already exists. */
-	    }
-	}
-	parent = rootPtr->node;
-	depth--;		
-
-	/* Verify each component in the path preceding the tail.  */
-	for (n = 0, p = argv; n < depth; n++, p++) {
-	    node = Blt_Tree_FindChild(parent, *p);
-	    if (node == NULL) {
-		if ((viewPtr->flags & TV_FILL_ANCESTORS) == 0) {
-		    Tcl_AppendResult(interp, "can't find path component \"",
-		         *p, "\" in \"", path, "\"", (char *)NULL);
-		    goto error;
-		}
-		node = Blt_Tree_CreateNode(viewPtr->tree, parent, *p, END);
-		if (node == NULL) {
-		    goto error;
-		}
-	    }
-	    parent = node;
-	}
-	node = NULL;
-	if (((viewPtr->flags & TV_ALLOW_DUPLICATES) == 0) && 
-	    (Blt_Tree_FindChild(parent, *p) != NULL)) {
-	    Tcl_AppendResult(interp, "entry \"", *p, "\" already exists in \"",
-		 path, "\"", (char *)NULL);
-	    goto error;
-	}
-	node = Blt_Tree_CreateNode(viewPtr->tree, parent, *p, insertPos);
-	if (node == NULL) {
-	    goto error;
-	}
-	if (Blt_TreeView_CreateEntry(viewPtr, node, count, options, 0) != TCL_OK) {
-	    goto error;
-	}
-	if (argv != &path) {
-	    Blt_Free(argv);
-	}
-	Tcl_ListObjAppendElement(interp, listObjPtr, NodeToObj(node));
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | SCROLL_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-
-  error:
-    if (argv != &path) {
-	Blt_Free(argv);
-    }
-    Tcl_DecrRefCount(listObjPtr);
-    if (node != NULL) {
-	DeleteNode(viewPtr, node);
-    }
-    return TCL_ERROR;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes nodes from the hierarchy. Deletes one or more entries (except
- *	root). In all cases, nodes are removed recursively.
- *
- *	Note: There's no need to explicitly clean up Entry structures 
- *	      or request a redraw of the widget. When a node is 
- *	      deleted in the tree, all of the Tcl_Objs representing
- *	      the various data fields are also removed.  The treeview 
- *	      widget store the Entry structure in a data field. So it's
- *	      automatically cleaned up when FreeEntryInternalRep is
- *	      called.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewTagIter iter;
-    TreeViewEntry *entryPtr;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    if (entryPtr == viewPtr->rootPtr) {
-		Blt_TreeNode next, node;
-
-		/* 
-		 *   Don't delete the root node.  We implicitly assume that
-		 *   even an empty tree has at a root.  Instead delete all the
-		 *   children regardless if they're closed or hidden.
-		 */
-		for (node = Blt_Tree_FirstChild(entryPtr->node); node != NULL; 
-		     node = next) {
-		    next = Blt_Tree_NextSibling(node);
-		    DeleteNode(viewPtr, node);
-		}
-	    } else {
-		DeleteNode(viewPtr, entryPtr->node);
-	    }
-	}
-    } 
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MoveOp --
- *
- *	Move an entry into a new location in the hierarchy.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MoveOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_TreeNode parent;
-    TreeViewEntry *srcPtr, *destPtr;
-    char c;
-    int action;
-    char *string;
-    TreeViewTagIter iter;
-
-#define MOVE_INTO	(1<<0)
-#define MOVE_BEFORE	(1<<1)
-#define MOVE_AFTER	(1<<2)
-    if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetString(objv[3]);
-    c = string[0];
-    if ((c == 'i') && (strcmp(string, "into") == 0)) {
-	action = MOVE_INTO;
-    } else if ((c == 'b') && (strcmp(string, "before") == 0)) {
-	action = MOVE_BEFORE;
-    } else if ((c == 'a') && (strcmp(string, "after") == 0)) {
-	action = MOVE_AFTER;
-    } else {
-	Tcl_AppendResult(interp, "bad position \"", string,
-	    "\": should be into, before, or after", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (Blt_TreeView_GetEntry(viewPtr, objv[4], &destPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (srcPtr = Blt_TreeView_FirstTaggedEntry(&iter); srcPtr != NULL; 
-	 srcPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	/* Verify they aren't ancestors. */
-	if (Blt_Tree_IsAncestor(srcPtr->node, destPtr->node)) {
-	    Tcl_DString dString;
-	    const char *path;
-
-	    path = Blt_TreeView_GetFullName(viewPtr, srcPtr, 1, &dString);
-	    Tcl_AppendResult(interp, "can't move node: \"", path, 
-			"\" is an ancestor of \"", Tcl_GetString(objv[4]), 
-			"\"", (char *)NULL);
-	    Tcl_DStringFree(&dString);
-	    return TCL_ERROR;
-	}
-	parent = Blt_Tree_ParentNode(destPtr->node);
-	if (parent == NULL) {
-	    action = MOVE_INTO;
-	}
-	switch (action) {
-	case MOVE_INTO:
-	    Blt_Tree_MoveNode(viewPtr->tree, srcPtr->node, destPtr->node, 
-			     (Blt_TreeNode)NULL);
-	    break;
-	    
-	case MOVE_BEFORE:
-	    Blt_Tree_MoveNode(viewPtr->tree, srcPtr->node, parent, destPtr->node);
-	    break;
-	    
-	case MOVE_AFTER:
-	    Blt_Tree_MoveNode(viewPtr->tree, srcPtr->node, parent, 
-			     Blt_Tree_NextSibling(destPtr->node));
-	    break;
-	}
-    }
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-NearestOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewButton *buttonPtr = &viewPtr->button;
-    int x, y;			/* Screen coordinates of the test point. */
-    TreeViewEntry *entryPtr;
-    int isRoot;
-    char *string;
-
-    isRoot = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    } 
-    if (objc < 4) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-		" ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-    if ((Tk_GetPixelsFromObj(interp, viewPtr->tkwin, objv[2], &x) != TCL_OK) ||
-	(Tk_GetPixelsFromObj(interp, viewPtr->tkwin, objv[3], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (viewPtr->nVisible == 0) {
-	return TCL_OK;
-    }
-    if (isRoot) {
-	int rootX, rootY;
-
-	Tk_GetRootCoords(viewPtr->tkwin, &rootX, &rootY);
-	x -= rootX;
-	y -= rootY;
-    }
-    entryPtr = Blt_TreeView_NearestEntry(viewPtr, x, y, TRUE);
-    if (entryPtr == NULL) {
-	return TCL_OK;
-    }
-    x = WORLDX(viewPtr, x);
-    y = WORLDY(viewPtr, y);
-    if (objc > 4) {
-	const char *where;
-	int labelX, labelY, depth;
-	TreeViewIcon icon;
-
-	where = "";
-	if (entryPtr->flags & ENTRY_HAS_BUTTON) {
-	    int buttonX, buttonY;
-
-	    buttonX = entryPtr->worldX + entryPtr->buttonX;
-	    buttonY = entryPtr->worldY + entryPtr->buttonY;
-	    if ((x >= buttonX) && (x < (buttonX + buttonPtr->width)) &&
-		(y >= buttonY) && (y < (buttonY + buttonPtr->height))) {
-		where = "button";
-		goto done;
-	    }
-	} 
-	depth = DEPTH(viewPtr, entryPtr->node);
-
-	icon = Blt_TreeView_GetEntryIcon(viewPtr, entryPtr);
-	if (icon != NULL) {
-	    int iconWidth, iconHeight, entryHeight;
-	    int iconX, iconY;
-	    
-	    entryHeight = MAX(entryPtr->iconHeight, viewPtr->button.height);
-	    iconHeight = TreeView_IconHeight(icon);
-	    iconWidth = TreeView_IconWidth(icon);
-	    iconX = entryPtr->worldX + ICONWIDTH(depth);
-	    iconY = entryPtr->worldY;
-	    if (viewPtr->flatView) {
-		iconX += (ICONWIDTH(0) - iconWidth) / 2;
-	    } else {
-		iconX += (ICONWIDTH(depth + 1) - iconWidth) / 2;
-	    }	    
-	    iconY += (entryHeight - iconHeight) / 2;
-	    if ((x >= iconX) && (x <= (iconX + iconWidth)) &&
-		(y >= iconY) && (y < (iconY + iconHeight))) {
-		where = "icon";
-		goto done;
-	    }
-	}
-	labelX = entryPtr->worldX + ICONWIDTH(depth);
-	labelY = entryPtr->worldY;
-	if (!viewPtr->flatView) {
-	    labelX += ICONWIDTH(depth + 1) + 4;
-	}	    
-	if ((x >= labelX) && (x < (labelX + entryPtr->labelWidth)) &&
-	    (y >= labelY) && (y < (labelY + entryPtr->labelHeight))) {
-	    where = "label";
-	}
-    done:
-	if (Tcl_SetVar(interp, Tcl_GetString(objv[4]), where, 
-		TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    Tcl_SetObjResult(interp, NodeToObj(entryPtr->node));
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-OpenOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    TreeViewTagIter iter;
-    int recurse, result;
-    int i;
-
-    recurse = FALSE;
-    if (objc > 2) {
-	int length;
-	char *string;
-
-	string = Tcl_GetStringFromObj(objv[2], &length);
-	if ((string[0] == '-') && (length > 1) && 
-	    (strncmp(string, "-recurse", length) == 0)) {
-	    objv++, objc--;
-	    recurse = TRUE;
-	}
-    }
-    for (i = 2; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    if (recurse) {
-		result = Blt_TreeView_Apply(viewPtr, entryPtr, 
-					   Blt_TreeView_OpenEntry, 0);
-	    } else {
-		result = Blt_TreeView_OpenEntry(viewPtr, entryPtr);
-	    }
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    /* Make sure ancestors of this node aren't hidden. */
-	    MapAncestors(viewPtr, entryPtr);
-	}
-    }
-    /*FIXME: This is only for flattened entries.  */
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RangeOp --
- *
- *	Returns the node identifiers in a given range.
- *
- *---------------------------------------------------------------------------
- */
-static int
-RangeOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr, *firstPtr, *lastPtr;
-    unsigned int mask;
-    int length;
-    Tcl_Obj *listObjPtr, *objPtr;
-    char *string;
-
-    mask = 0;
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    if ((string[0] == '-') && (length > 1) && 
-	(strncmp(string, "-open", length) == 0)) {
-	objv++, objc--;
-	mask |= ENTRY_CLOSED;
-    }
-    if (Blt_TreeView_GetEntry(viewPtr, objv[2], &firstPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 3) {
-	if (Blt_TreeView_GetEntry(viewPtr, objv[3], &lastPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	lastPtr = LastEntry(viewPtr, firstPtr, mask);
-    }    
-    if (mask & ENTRY_CLOSED) {
-	if (firstPtr->flags & ENTRY_HIDE) {
-	    Tcl_AppendResult(interp, "first node \"", Tcl_GetString(objv[2]), 
-		"\" is hidden.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (lastPtr->flags & ENTRY_HIDE) {
-	    Tcl_AppendResult(interp, "last node \"", Tcl_GetString(objv[3]), 
-		"\" is hidden.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-
-    /*
-     * The relative order of the first/last markers determines the
-     * direction.
-     */
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (Blt_Tree_IsBefore(lastPtr->node, firstPtr->node)) {
-	for (entryPtr = lastPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_PrevEntry(entryPtr, mask)) {
-	    objPtr = NodeToObj(entryPtr->node);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    if (entryPtr == firstPtr) {
-		break;
-	    }
-	}
-    } else {
-	for (entryPtr = firstPtr; entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextEntry(entryPtr, mask)) {
-	    objPtr = NodeToObj(entryPtr->node);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    if (entryPtr == lastPtr) {
-		break;
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ScanOp --
- *
- *	Implements the quick scan.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ScanOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    char c;
-    int length;
-    int oper;
-    char *string;
-    Tk_Window tkwin;
-
-#define SCAN_MARK	1
-#define SCAN_DRAGTO	2
-    string = Tcl_GetStringFromObj(objv[2], &length);
-    c = string[0];
-    tkwin = viewPtr->tkwin;
-    if ((c == 'm') && (strncmp(string, "mark", length) == 0)) {
-	oper = SCAN_MARK;
-    } else if ((c == 'd') && (strncmp(string, "dragto", length) == 0)) {
-	oper = SCAN_DRAGTO;
-    } else {
-	Tcl_AppendResult(interp, "bad scan operation \"", string,
-	    "\": should be either \"mark\" or \"dragto\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Blt_GetPixelsFromObj(interp, tkwin, objv[3], PIXELS_ANY, &x) 
-	 != TCL_OK) ||
-	(Blt_GetPixelsFromObj(interp, tkwin, objv[4], PIXELS_ANY, &y) 
-	 != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (oper == SCAN_MARK) {
-	viewPtr->scanAnchorX = x;
-	viewPtr->scanAnchorY = y;
-	viewPtr->scanX = viewPtr->xOffset;
-	viewPtr->scanY = viewPtr->yOffset;
-    } else {
-	int worldX, worldY;
-	int dx, dy;
-
-	dx = viewPtr->scanAnchorX - x;
-	dy = viewPtr->scanAnchorY - y;
-	worldX = viewPtr->scanX + (10 * dx);
-	worldY = viewPtr->scanY + (10 * dy);
-
-	if (worldX < 0) {
-	    worldX = 0;
-	} else if (worldX >= viewPtr->worldWidth) {
-	    worldX = viewPtr->worldWidth - viewPtr->xScrollUnits;
-	}
-	if (worldY < 0) {
-	    worldY = 0;
-	} else if (worldY >= viewPtr->worldHeight) {
-	    worldY = viewPtr->worldHeight - viewPtr->yScrollUnits;
-	}
-	viewPtr->xOffset = worldX;
-	viewPtr->yOffset = worldY;
-	viewPtr->flags |= SCROLL_PENDING;
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SeeOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int width, height;
-    int x, y;
-    Tk_Anchor anchor;
-    int left, right, top, bottom;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    anchor = TK_ANCHOR_W;	/* Default anchor is West */
-    if ((string[0] == '-') && (strcmp(string, "-anchor") == 0)) {
-	if (objc == 3) {
-	    Tcl_AppendResult(interp, "missing \"-anchor\" argument",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Tk_GetAnchorFromObj(interp, objv[3], &anchor) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	objc -= 2, objv += 2;
-    }
-    if (objc == 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", objv[0],
-	    "see ?-anchor anchor? tagOrId\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (GetEntryFromObj(viewPtr, objv[2], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (entryPtr == NULL) {
-	return TCL_OK;
-    }
-    if (entryPtr->flags & ENTRY_HIDE) {
-	MapAncestors(viewPtr, entryPtr);
-	viewPtr->flags |= SCROLL_PENDING;
-	/*
-	 * If the entry wasn't previously exposed, its world coordinates
-	 * aren't likely to be valid.  So re-compute the layout before we try
-	 * to see the viewport to the entry's location.
-	 */
-	Blt_TreeView_ComputeLayout(viewPtr);
-    }
-    width = VPORTWIDTH(viewPtr);
-    height = VPORTHEIGHT(viewPtr);
-
-    /*
-     * XVIEW:	If the entry is left or right of the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    left = viewPtr->xOffset;
-    right = viewPtr->xOffset + width;
-
-    switch (anchor) {
-    case TK_ANCHOR_W:
-    case TK_ANCHOR_NW:
-    case TK_ANCHOR_SW:
-	x = 0;
-	break;
-    case TK_ANCHOR_E:
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_SE:
-	x = entryPtr->worldX + entryPtr->width + 
-	    ICONWIDTH(DEPTH(viewPtr, entryPtr->node)) - width;
-	break;
-    default:
-	if (entryPtr->worldX < left) {
-	    x = entryPtr->worldX;
-	} else if ((entryPtr->worldX + entryPtr->width) > right) {
-	    x = entryPtr->worldX + entryPtr->width - width;
-	} else {
-	    x = viewPtr->xOffset;
-	}
-	break;
-    }
-    /*
-     * YVIEW:	If the entry is above or below the current view, adjust
-     *		the offset.  If the entry is nearby, adjust the view just
-     *		a bit.  Otherwise, center the entry.
-     */
-    top = viewPtr->yOffset;
-    bottom = viewPtr->yOffset + height;
-
-    switch (anchor) {
-    case TK_ANCHOR_N:
-	y = viewPtr->yOffset;
-	break;
-    case TK_ANCHOR_NE:
-    case TK_ANCHOR_NW:
-	y = entryPtr->worldY - (height / 2);
-	break;
-    case TK_ANCHOR_S:
-    case TK_ANCHOR_SE:
-    case TK_ANCHOR_SW:
-	y = entryPtr->worldY + entryPtr->height - height;
-	break;
-    default:
-	if (entryPtr->worldY < top) {
-	    y = entryPtr->worldY;
-	} else if ((entryPtr->worldY + entryPtr->height) > bottom) {
-	    y = entryPtr->worldY + entryPtr->height - height;
-	} else {
-	    y = viewPtr->yOffset;
-	}
-	break;
-    }
-    if ((y != viewPtr->yOffset) || (x != viewPtr->xOffset)) {
-	/* viewPtr->xOffset = x; */
-	viewPtr->yOffset = y;
-	viewPtr->flags |= SCROLL_PENDING;
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-void
-Blt_TreeView_ClearSelection(TreeView *viewPtr)
-{
-    Blt_DeleteHashTable(&viewPtr->selectTable);
-    Blt_InitHashTable(&viewPtr->selectTable, BLT_ONE_WORD_KEYS);
-    Blt_Chain_Reset(viewPtr->selected);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    if (viewPtr->selectCmd != NULL) {
-	EventuallyInvokeSelectCmd(viewPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LostSelection --
- *
- *	This procedure is called back by Tk when the selection is grabbed
- *	away.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The existing selection is unhighlighted, and the window is
- *	marked as not containing a selection.
- *
- *---------------------------------------------------------------------------
- */
-static void
-LostSelection(ClientData clientData)
-{
-    TreeView *viewPtr = clientData;
-
-    if ((viewPtr->flags & TV_SELECT_EXPORT) == 0) {
-	return;
-    }
-    Blt_TreeView_ClearSelection(viewPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectRange --
- *
- *	Sets the selection flag for a range of nodes.  The range is
- *	determined by two pointers which designate the first/last
- *	nodes of the range.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectRange(TreeView *viewPtr, TreeViewEntry *fromPtr, TreeViewEntry *toPtr)
-{
-    if (viewPtr->flatView) {
-	int i;
-
-	if (fromPtr->flatIndex > toPtr->flatIndex) {
-	    for (i = fromPtr->flatIndex; i >= toPtr->flatIndex; i--) {
-		SelectEntryApplyProc(viewPtr, viewPtr->flatArr[i]);
-	    }
-	} else {
-	    for (i = fromPtr->flatIndex; i <= toPtr->flatIndex; i++) {
-		SelectEntryApplyProc(viewPtr, viewPtr->flatArr[i]);
-	    }
-	}	    
-    } else {
-	TreeViewEntry *entryPtr;
-	TreeViewIterProc *proc;
-	/* From the range determine the direction to select entries. */
-
-	proc = (Blt_Tree_IsBefore(toPtr->node, fromPtr->node)) 
-	    ? Blt_TreeView_PrevEntry : Blt_TreeView_NextEntry;
-	for (entryPtr = fromPtr; entryPtr != NULL;
-	     entryPtr = (*proc)(entryPtr, ENTRY_MASK)) {
-	    SelectEntryApplyProc(viewPtr, entryPtr);
-	    if (entryPtr == toPtr) {
-		break;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionAnchorOp --
- *
- *	Sets the selection anchor to the element given by a index.  The
- *	selection anchor is the end of the selection that is fixed while
- *	dragging out a selection with the mouse.  The index "anchor" may be
- *	used to refer to the anchor element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionAnchorOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-
-    if (GetEntryFromObj(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Set both the anchor and the mark. Indicates that a single entry
-     * is selected. */
-    viewPtr->selAnchorPtr = entryPtr;
-    viewPtr->selMarkPtr = NULL;
-    if (entryPtr != NULL) {
-	Tcl_SetObjResult(interp, NodeToObj(entryPtr->node));
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionClearallOp
- *
- *	Clears the entire selection.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionClearallOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		    Tcl_Obj *const *objv)
-{
-    Blt_TreeView_ClearSelection(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionIncludesOp
- *
- *	Returns 1 if the element indicated by index is currently
- *	selected, 0 if it isn't.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionIncludesOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		    Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int bool;
-
-    if (GetEntryFromObj(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    bool = FALSE;
-    if (entryPtr == NULL) {
-	bool = Blt_TreeView_EntryIsSelected(viewPtr, entryPtr);
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionMarkOp --
- *
- *	Sets the selection mark to the element given by a index.  The
- *	selection anchor is the end of the selection that is movable while
- *	dragging out a selection with the mouse.  The index "mark" may be used
- *	to refer to the anchor element.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionMarkOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-
-    if (GetEntryFromObj(viewPtr, objv[3], &entryPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (viewPtr->selAnchorPtr == NULL) {
-	Tcl_AppendResult(interp, "selection anchor must be set first", 
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (viewPtr->selMarkPtr != entryPtr) {
-	Blt_ChainLink link, next;
-
-	/* Deselect entry from the list all the way back to the anchor. */
-	for (link = Blt_Chain_LastLink(viewPtr->selected); link != NULL; 
-	     link = next) {
-	    TreeViewEntry *selectPtr;
-
-	    next = Blt_Chain_PrevLink(link);
-	    selectPtr = Blt_Chain_GetValue(link);
-	    if (selectPtr == viewPtr->selAnchorPtr) {
-		break;
-	    }
-	    Blt_TreeView_DeselectEntry(viewPtr, selectPtr);
-	}
-	viewPtr->flags &= ~TV_SELECT_MASK;
-	viewPtr->flags |= TV_SELECT_SET;
-	SelectRange(viewPtr, viewPtr->selAnchorPtr, entryPtr);
-	Tcl_SetObjResult(interp, NodeToObj(entryPtr->node));
-	viewPtr->selMarkPtr = entryPtr;
-
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-	if (viewPtr->selectCmd != NULL) {
-	    EventuallyInvokeSelectCmd(viewPtr);
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionPresentOp
- *
- *	Returns 1 if there is a selection and 0 if it isn't.
- *
- * Results:
- *	A standard TCL result.  interp->result will contain a boolean string
- *	indicating if there is a selection.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionPresentOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		   Tcl_Obj *const *objv)
-{
-    int bool;
-
-    bool = (Blt_Chain_GetLength(viewPtr->selected) > 0);
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionSetOp
- *
- *	Selects, deselects, or toggles all of the elements in the range
- *	between first and last, inclusive, without affecting the selection
- *	state of elements outside that range.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectionSetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    TreeViewEntry *firstPtr, *lastPtr;
-    char *string;
-
-    viewPtr->flags &= ~TV_SELECT_MASK;
-    string = Tcl_GetString(objv[2]);
-    switch (string[0]) {
-    case 's':
-	viewPtr->flags |= TV_SELECT_SET;
-	break;
-    case 'c':
-	viewPtr->flags |= TV_SELECT_CLEAR;
-	break;
-    case 't':
-	viewPtr->flags |= TV_SELECT_TOGGLE;
-	break;
-    }
-    if (GetEntryFromObj(viewPtr, objv[3], &firstPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (firstPtr == NULL) {
-	return TCL_OK;			/* Didn't pick an entry. */
-    }
-    if ((firstPtr->flags & ENTRY_HIDE) && 
-	(!(viewPtr->flags & TV_SELECT_CLEAR))) {
-	Tcl_AppendResult(interp, "can't select hidden node \"", 
-		Tcl_GetString(objv[3]), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    lastPtr = firstPtr;
-    if (objc > 4) {
-	if (Blt_TreeView_GetEntry(viewPtr, objv[4], &lastPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if ((lastPtr->flags & ENTRY_HIDE) && 
-		(!(viewPtr->flags & TV_SELECT_CLEAR))) {
-	    Tcl_AppendResult(interp, "can't select hidden node \"", 
-		     Tcl_GetString(objv[4]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (firstPtr == lastPtr) {
-	SelectEntryApplyProc(viewPtr, firstPtr);
-    } else {
-	SelectRange(viewPtr, firstPtr, lastPtr);
-    }
-    /* Set both the anchor and the mark. Indicates that a single entry is
-     * selected. */
-    if (viewPtr->selAnchorPtr == NULL) {
-	viewPtr->selAnchorPtr = firstPtr;
-    }
-    if (viewPtr->flags & TV_SELECT_EXPORT) {
-	Tk_OwnSelection(viewPtr->tkwin, XA_PRIMARY, LostSelection, viewPtr);
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    if (viewPtr->selectCmd != NULL) {
-	EventuallyInvokeSelectCmd(viewPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectionOp --
- *
- *	This procedure handles the individual options for text selections.
- *	The selected text is designated by start and end indices into the text
- *	pool.  The selected segment has both a anchored and unanchored ends.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec selectionOps[] =
-{
-    {"anchor",   1, SelectionAnchorOp,   4, 4, "tagOrId",},
-    {"clear",    5, SelectionSetOp,      4, 5, "first ?last?",},
-    {"clearall", 6, SelectionClearallOp, 3, 3, "",},
-    {"includes", 1, SelectionIncludesOp, 4, 4, "tagOrId",},
-    {"mark",     1, SelectionMarkOp,     4, 4, "tagOrId",},
-    {"present",  1, SelectionPresentOp,  3, 3, "",},
-    {"set",      1, SelectionSetOp,      4, 5, "first ?last?",},
-    {"toggle",   1, SelectionSetOp,      4, 5, "first ?last?",},
-};
-static int nSelectionOps = sizeof(selectionOps) / sizeof(Blt_OpSpec);
-
-static int
-SelectionOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TvCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSelectionOps, selectionOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagForgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagForgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	Blt_Tree_ForgetTag(viewPtr->tree, Tcl_GetString(objv[i]));
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNamesOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNamesOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr, *objPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    objPtr = Tcl_NewStringObj("all", -1);
-    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-	Blt_TreeTagEntry *tPtr;
-
-	objPtr = Tcl_NewStringObj("root", -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	for (hPtr = Blt_Tree_FirstTag(viewPtr->tree, &cursor); hPtr != NULL;
-	     hPtr = Blt_NextHashEntry(&cursor)) {
-	    tPtr = Blt_GetHashValue(hPtr);
-	    objPtr = Tcl_NewStringObj(tPtr->tagName, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    } else {
-	int i;
-
-	for (i = 3; i < objc; i++) {
-	    Blt_List list;
-	    Blt_ListNode listNode;
-	    TreeViewEntry *entryPtr;
-
-	    if (Blt_TreeView_GetEntry(viewPtr, objv[i], &entryPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    list = Blt_List_Create(BLT_ONE_WORD_KEYS);
-	    Blt_TreeView_GetTags(interp, viewPtr, entryPtr, list);
-	    for (listNode = Blt_List_FirstNode(list); listNode != NULL; 
-		 listNode = Blt_List_NextNode(listNode)) {
-		objPtr = 
-		    Tcl_NewStringObj((char *)Blt_List_GetKey(listNode), -1);
-		Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    }
-	    Blt_List_Destroy(list);
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagNodesOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagNodesOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_HashTable nodeTable;
-    int i;
-
-    Blt_InitHashTable(&nodeTable, BLT_ONE_WORD_KEYS);
-    for (i = 3; i < objc; i++) {
-	TreeViewTagIter iter;
-	TreeViewEntry *entryPtr;
-
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    int isNew;
-
-	    Blt_CreateHashEntry(&nodeTable, (char *)entryPtr->node, &isNew);
-	}
-    }
-    {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (hPtr = Blt_FirstHashEntry(&nodeTable, &cursor); hPtr != NULL; 
-	     hPtr = Blt_NextHashEntry(&cursor)) {
-	    Blt_TreeNode node;
-	    Tcl_Obj *objPtr;
-	    
-	    node = (Blt_TreeNode)Blt_GetHashKey(&nodeTable, hPtr);
-	    objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(node));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_DeleteHashTable(&nodeTable);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagAddOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TagAddOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    int i;
-    char *tagName;
-    TreeViewTagIter iter;
-
-    tagName = Tcl_GetString(objv[3]);
-    viewPtr->fromPtr = NULL;
-    if (strcmp(tagName, "root") == 0) {
-	Tcl_AppendResult(interp, "can't add reserved tag \"", tagName, "\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if (isdigit(UCHAR(tagName[0]))) {
-	Tcl_AppendResult(interp, "invalid tag \"", tagName, 
-		 "\": can't start with digit", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (tagName[0] == '@') {
-	Tcl_AppendResult(viewPtr->interp, "invalid tag \"", tagName, 
-		"\": can't start with \"@\"", (char *)NULL);
-	return TCL_ERROR;
-    } 
-    if (GetEntryFromSpecialId(viewPtr, tagName, &entryPtr) == TCL_OK) {
-	Tcl_AppendResult(interp, "invalid tag \"", tagName, 
-		 "\": is a special id", (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (i = 4; i < objc; i++) {
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    if (AddTag(viewPtr, entryPtr->node, tagName) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagDeleteOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-TagDeleteOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    char *tagName;
-    Blt_HashTable *tablePtr;
-
-    tagName = Tcl_GetString(objv[3]);
-    tablePtr = Blt_Tree_TagHashTable(viewPtr->tree, tagName);
-    if (tablePtr != NULL) {
-        int i;
-
-        for (i = 4; i < objc; i++) {
-	    TreeViewEntry *entryPtr;
-	    TreeViewTagIter iter;
-
-	    if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter)!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); 
-		entryPtr != NULL; 
-		entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-		Blt_HashEntry *hPtr;
-
-	        hPtr = Blt_FindHashEntry(tablePtr, (char *)entryPtr->node);
-	        if (hPtr != NULL) {
-		    Blt_DeleteHashEntry(tablePtr, hPtr);
-	        }
-	   }
-       }
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TagOp --
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tagOps[] = {
-    {"add",    1, TagAddOp,    5, 0, "tag id...",},
-    {"delete", 2, TagDeleteOp, 5, 0, "tag id...",},
-    {"forget", 1, TagForgetOp, 4, 0, "tag...",},
-    {"names",  2, TagNamesOp,  3, 0, "?id...?",}, 
-    {"nodes",  2, TagNodesOp,  4, 0, "tag ?tag...?",},
-};
-
-static int nTagOps = sizeof(tagOps) / sizeof(Blt_OpSpec);
-
-static int
-TagOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TvCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTagOps, tagOps, BLT_OP_ARG2, objc, objv, 
-	0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(viewPtr, interp, objc, objv);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-ToggleOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    TreeViewTagIter iter;
-    int result;
-
-    if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[2], &iter) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	 entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	if (entryPtr == NULL) {
-	    return TCL_OK;
-	}
-	if (entryPtr->flags & ENTRY_CLOSED) {
-	    result = Blt_TreeView_OpenEntry(viewPtr, entryPtr);
-	} else {
-	    Blt_TreeView_PruneSelection(viewPtr, viewPtr->focusPtr);
-	    if ((viewPtr->focusPtr != NULL) && 
-		(Blt_Tree_IsAncestor(entryPtr->node, viewPtr->focusPtr->node))){
-		viewPtr->focusPtr = entryPtr;
-		Blt_SetFocusItem(viewPtr->bindTable, entryPtr, ITEM_ENTRY);
-	    }
-	    if ((viewPtr->selAnchorPtr != NULL) &&
-		(Blt_Tree_IsAncestor(entryPtr->node, 
-				    viewPtr->selAnchorPtr->node))) {
-		viewPtr->selAnchorPtr = NULL;
-	    }
-	    result = Blt_TreeView_CloseEntry(viewPtr, entryPtr);
-	}
-    }
-    viewPtr->flags |= SCROLL_PENDING;
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return result;
-}
-
-static int
-XViewOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int width, worldWidth;
-
-    width = VPORTWIDTH(viewPtr);
-    worldWidth = viewPtr->worldWidth;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	/*
-	 * Note that we are bounding the fractions between 0.0 and 1.0
-	 * to support the "canvas"-style of scrolling.
-	 */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	fract = (double)viewPtr->xOffset / worldWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	fract = (double)(viewPtr->xOffset + width) / worldWidth;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &viewPtr->xOffset,
-	    worldWidth, width, viewPtr->xScrollUnits, viewPtr->scrollMode) 
-	    != TCL_OK) {
-	return TCL_ERROR;
-    }
-    viewPtr->flags |= SCROLLX;
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-static int
-YViewOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int height, worldHeight;
-
-    height = VPORTHEIGHT(viewPtr);
-    worldHeight = viewPtr->worldHeight;
-    if (objc == 2) {
-	double fract;
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	/* Report first and last fractions */
-	fract = (double)viewPtr->yOffset / worldHeight;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	fract = (double)(viewPtr->yOffset + height) / worldHeight;
-	fract = FCLAMP(fract);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(fract));
-	Tcl_SetObjResult(interp, listObjPtr);
-	return TCL_OK;
-    }
-    if (Blt_GetScrollInfoFromObj(interp, objc - 2, objv + 2, &viewPtr->yOffset,
-	    worldHeight, height, viewPtr->yScrollUnits, viewPtr->scrollMode)
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    viewPtr->flags |= SCROLL_PENDING;
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_WidgetInstCmd --
- *
- * 	This procedure is invoked to process commands on behalf of the
- * 	treeview widget.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec tvOps[] =
-{
-    {"bbox",         2, BboxOp,          3, 0, "tagOrId...",}, 
-    {"bind",         2, BindOp,          3, 5, "tagName ?sequence command?",}, 
-    {"button",       2, ButtonOp,        2, 0, "args",},
-    {"cget",         2, CgetOp,          3, 3, "option",}, 
-    {"close",        2, CloseOp,         2, 0, "?-recurse? tagOrId...",}, 
-    {"column",       3, Blt_TreeView_ColumnOp, 2, 0, "oper args",}, 
-    {"configure",    3, ConfigureOp,     2, 0, "?option value?...",},
-    {"curselection", 2, CurselectionOp,  2, 2, "",},
-    {"delete",       1, DeleteOp,        2, 0, "tagOrId ?tagOrId...?",}, 
-    {"edit",         2, EditOp,          4, 6, "?-root|-test? x y",},
-    {"entry",        2, EntryOp,         2, 0, "oper args",},
-    {"find",         2, FindOp,          2, 0, "?flags...? ?first last?",}, 
-    {"focus",        2, FocusOp,         3, 3, "tagOrId",}, 
-    {"get",          1, GetOp,           2, 0, "?-full? tagOrId ?tagOrId...?",},
-    {"hide",         1, HideOp,          2, 0, "?-exact? ?-glob? ?-regexp? ?-nonmatching? ?-name string? ?-full string? ?-data string? ?--? ?tagOrId...?",},
-    {"index",        3, IndexOp,         3, 6, "?-at tagOrId? ?-path? string",},
-    {"insert",       3, InsertOp,        3, 0, 
-	"?-at tagOrId? position label ?label...? ?option value?",},
-    {"move",         1, MoveOp,          5, 5, 
-	"tagOrId into|before|after tagOrId",},
-    {"nearest",      1, NearestOp,       4, 5, "x y ?varName?",}, 
-    {"open",         1, OpenOp,          2, 0, "?-recurse? tagOrId...",}, 
-    {"range",        1, RangeOp,         4, 5, "?-open? tagOrId tagOrId",},
-    {"scan",         2, ScanOp,          5, 5, "dragto|mark x y",},
-    {"see",          3, SeeOp,           3, 0, "?-anchor anchor? tagOrId",},
-    {"selection",    3, SelectionOp,     2, 0, "oper args",},
-    {"show",         2, ShowOp,          2, 0, "?-exact? ?-glob? ?-regexp? ?-nonmatching? ?-name string? ?-full string? ?-data string? ?--? ?tagOrId...?",},
-    {"sort",         2, Blt_TreeView_SortOp,   2, 0, "args",},
-    {"style",        2, Blt_TreeView_StyleOp,  2, 0, "args",},
-    {"tag",          2, TagOp,           2, 0, "oper args",},
-    {"toggle",       2, ToggleOp,        3, 3, "tagOrId",},
-    {"xview",        1, XViewOp,         2, 5, 
-	"?moveto fract? ?scroll number what?",},
-    {"yview",        1, YViewOp,         2, 5, 
-	"?moveto fract? ?scroll number what?",},
-};
-
-static int nTvOps = sizeof(tvOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_TreeView_WidgetInstCmd(ClientData clientData, Tcl_Interp *interp, int objc,
-		     Tcl_Obj *const *objv)
-{
-    TvCmdProc *proc;
-    TreeView *viewPtr = clientData;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTvOps, tvOps, BLT_OP_ARG1, objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(viewPtr);
-    result = (*proc) (viewPtr, interp, objc, objv);
-    Tcl_Release(viewPtr);
-    return result;
-}
-
-#endif /* NO_TREEVIEW */
diff --git a/blt3.0/src/bltTvCol.c b/blt3.0/src/bltTvCol.c
deleted file mode 100644
index d2cef3a..0000000
--- a/blt3.0/src/bltTvCol.c
+++ /dev/null
@@ -1,2060 +0,0 @@
-
-/*
- * bltTvCol.c --
- *
- * This module implements an hierarchy widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *
- * BUGS:
- *   1.  "open" operation should change scroll offset so that as many
- *	 new entries (up to half a screen) can be seen.
- *   2.  "open" needs to adjust the scrolloffset so that the same entry
- *	 is seen at the same place.
- */
-#include "bltInt.h"
-
-#ifndef NO_TREEVIEW
-#include "bltOp.h"
-#include "bltTreeView.h"
-#include <X11/Xutil.h>
-
-#define RULE_AREA		(8)
-
-typedef int (TreeViewCmdProc)(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-static const char *sortTypeStrings[] = {
-    "dictionary", "ascii", "integer", "real", "command", "none", NULL
-};
-
-enum SortTypeValues { 
-    SORT_DICTIONARY, SORT_ASCII, SORT_INTEGER, 
-    SORT_REAL, SORT_COMMAND, SORT_NONE
-};
-
-#define DEF_SORT_COLUMN		(char *)NULL
-#define DEF_SORT_COMMAND	(char *)NULL
-#define DEF_SORT_DECREASING	"no"
-#define DEF_SORT_TYPE		"dictionary"
-
-#ifdef WIN32
-#define DEF_COLUMN_ACTIVE_TITLE_BG	RGB_GREY85
-#else
-#define DEF_COLUMN_ACTIVE_TITLE_BG	RGB_GREY90
-#endif
-#define DEF_COLUMN_ACTIVE_TITLE_FG	STD_ACTIVE_FOREGROUND
-#define DEF_COLUMN_BACKGROUND		(char *)NULL
-#define DEF_COLUMN_BIND_TAGS		"all"
-#define DEF_COLUMN_BORDERWIDTH		STD_BORDERWIDTH
-#define DEF_COLUMN_COLOR		RGB_BLACK
-#define DEF_COLUMN_EDIT			"yes"
-#define DEF_COLUMN_FONT			STD_FONT
-#define DEF_COLUMN_COMMAND		(char *)NULL
-#define DEF_COLUMN_FORMAT_COMMAND	(char *)NULL
-#define DEF_COLUMN_HIDE			"no"
-#define DEF_COLUMN_JUSTIFY		"center"
-#define DEF_COLUMN_MAX			"0"
-#define DEF_COLUMN_MIN			"0"
-#define DEF_COLUMN_PAD			"2"
-#define DEF_COLUMN_RELIEF		"flat"
-#define DEF_COLUMN_STATE		"normal"
-#define DEF_COLUMN_STYLE		"text"
-#define DEF_COLUMN_TITLE_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_COLUMN_TITLE_BORDERWIDTH	STD_BORDERWIDTH
-#define DEF_COLUMN_TITLE_FONT		STD_FONT_SMALL
-#define DEF_COLUMN_TITLE_FOREGROUND	STD_NORMAL_FOREGROUND
-#define DEF_COLUMN_TITLE_RELIEF		"raised"
-#define DEF_COLUMN_WEIGHT		"1.0"
-#define DEF_COLUMN_WIDTH		"0"
-#define DEF_COLUMN_RULE_DASHES		"dot"
-
-static Blt_OptionParseProc ObjToEnum;
-static Blt_OptionPrintProc EnumToObj;
-static Blt_CustomOption typeOption =
-{
-    ObjToEnum, EnumToObj, NULL, (ClientData)sortTypeStrings
-};
-
-static Blt_OptionParseProc ObjToColumn;
-static Blt_OptionPrintProc ColumnToObj;
-static Blt_CustomOption columnOption =
-{
-    ObjToColumn, ColumnToObj, NULL, (ClientData)0
-};
-
-static Blt_OptionParseProc ObjToData;
-static Blt_OptionPrintProc DataToObj;
-Blt_CustomOption bltTreeViewDataOption =
-{
-    ObjToData, DataToObj, NULL, (ClientData)0,
-};
-
-static Blt_OptionParseProc ObjToStyle;
-static Blt_OptionPrintProc StyleToObj;
-static Blt_OptionFreeProc FreeStyle;
-static Blt_CustomOption styleOption =
-{
-    /* Contains a pointer to the widget that's currently being
-     * configured.  This is used in the custom configuration parse
-     * routine for icons.  */
-    ObjToStyle, StyleToObj, FreeStyle, NULL,
-};
-
-BLT_EXTERN Blt_CustomOption bltTreeViewUidOption;
-BLT_EXTERN Blt_CustomOption bltTreeViewIconOption;
-
-static Blt_ConfigSpec columnSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activetitlebackground", "activeTitleBackground", 
-	"Background", DEF_COLUMN_ACTIVE_TITLE_BG, 
-	Blt_Offset(TreeViewColumn, activeTitleBg), 0},
-    {BLT_CONFIG_COLOR, "-activetitleforeground", "activeTitleForeground", 
-	"Foreground", DEF_COLUMN_ACTIVE_TITLE_FG, 
-	Blt_Offset(TreeViewColumn, activeTitleFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_COLUMN_BACKGROUND, Blt_Offset(TreeViewColumn, bg), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_CUSTOM, "-bindtags", "bindTags", "BindTags",
-	DEF_COLUMN_BIND_TAGS, Blt_Offset(TreeViewColumn, tagsUid),
-	BLT_CONFIG_NULL_OK, &bltTreeViewUidOption},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_COLUMN_BORDERWIDTH, Blt_Offset(TreeViewColumn, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-command", "command", "Command",
-	DEF_COLUMN_COMMAND, Blt_Offset(TreeViewColumn, titleCmd),
-	BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK}, 
-    {BLT_CONFIG_BOOLEAN, "-edit", "edit", "Edit",
-	DEF_COLUMN_STATE, Blt_Offset(TreeViewColumn, editable), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-hide", "hide", "Hide",
-	DEF_COLUMN_HIDE, Blt_Offset(TreeViewColumn, hidden),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "icon",
-	(char *)NULL, Blt_Offset(TreeViewColumn, titleIcon),
-        BLT_CONFIG_NULL_OK | BLT_CONFIG_DONT_SET_DEFAULT, 
-	&bltTreeViewIconOption},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify",
-	DEF_COLUMN_JUSTIFY, Blt_Offset(TreeViewColumn, justify), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-max", "max", "Max",
-	DEF_COLUMN_MAX, Blt_Offset(TreeViewColumn, reqMax), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-min", "min", "Min",
-	DEF_COLUMN_MIN, Blt_Offset(TreeViewColumn, reqMin), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PAD, "-pad", "pad", "Pad",
-	DEF_COLUMN_PAD, Blt_Offset(TreeViewColumn, pad), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_COLUMN_RELIEF, Blt_Offset(TreeViewColumn, relief), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DASHES, "-ruledashes", "ruleDashes", "RuleDashes",
-	DEF_COLUMN_RULE_DASHES, Blt_Offset(TreeViewColumn, ruleDashes),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-sortcommand", "sortCommand", "SortCommand",
-	DEF_SORT_COMMAND, Blt_Offset(TreeViewColumn, sortCmd), 
-	BLT_CONFIG_NULL_OK}, 
-    {BLT_CONFIG_STATE, "-state", "state", "State",
-	DEF_COLUMN_STATE, Blt_Offset(TreeViewColumn, state), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CUSTOM, "-style", "style", "Style", DEF_COLUMN_STYLE, 
-	Blt_Offset(TreeViewColumn, stylePtr), BLT_CONFIG_NULL_OK, &styleOption},
-    {BLT_CONFIG_STRING, "-text", "text", "Text",
-	(char *)NULL, Blt_Offset(TreeViewColumn, title), 0},
-    {BLT_CONFIG_STRING, "-title", "title", "Title",
-	(char *)NULL, Blt_Offset(TreeViewColumn, title), 0},
-    {BLT_CONFIG_BACKGROUND, "-titlebackground", "titleBackground", 
-	"TitleBackground", DEF_COLUMN_TITLE_BACKGROUND, 
-	Blt_Offset(TreeViewColumn, titleBg),0},
-    {BLT_CONFIG_PIXELS_NNEG, "-titleborderwidth", "BorderWidth", 
-	"TitleBorderWidth", DEF_COLUMN_TITLE_BORDERWIDTH, 
-	Blt_Offset(TreeViewColumn, titleBW), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_FONT, "-titlefont", "titleFont", "Font",
-	DEF_COLUMN_TITLE_FONT, Blt_Offset(TreeViewColumn, titleFont), 0},
-    {BLT_CONFIG_COLOR, "-titleforeground", "titleForeground", "TitleForeground",
-	DEF_COLUMN_TITLE_FOREGROUND, 
-	Blt_Offset(TreeViewColumn, titleFgColor), 0},
-    {BLT_CONFIG_RELIEF, "-titlerelief", "titleRelief", "TitleRelief",
-	DEF_COLUMN_TITLE_RELIEF, Blt_Offset(TreeViewColumn, titleRelief), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_DOUBLE, "-weight", (char *)NULL, (char *)NULL,
-	DEF_COLUMN_WEIGHT, Blt_Offset(TreeViewColumn, weight), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width",
-	DEF_COLUMN_WIDTH, Blt_Offset(TreeViewColumn, reqWidth), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static Blt_ConfigSpec sortSpecs[] =
-{
-    {BLT_CONFIG_STRING, "-command", "command", "Command",
-	DEF_SORT_COMMAND, Blt_Offset(TreeView, sortCmd),
-	BLT_CONFIG_DONT_SET_DEFAULT | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_CUSTOM, "-column", "column", "Column",
-	DEF_SORT_COLUMN, Blt_Offset(TreeView, sortColumnPtr),
-        BLT_CONFIG_NULL_OK | BLT_CONFIG_DONT_SET_DEFAULT, &columnOption},
-    {BLT_CONFIG_BOOLEAN, "-decreasing", "decreasing", "Decreasing",
-	DEF_SORT_DECREASING, Blt_Offset(TreeView, sortDecreasing),
-        BLT_CONFIG_DONT_SET_DEFAULT}, 
-    {BLT_CONFIG_CUSTOM, "-mode", "mode", "Mode", DEF_SORT_TYPE, 
-	Blt_Offset(TreeView, sortType), 0, &typeOption},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-static Blt_TreeApplyProc SortApplyProc;
-static Blt_TreeCompareNodesProc CompareNodes;
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToEnum --
- *
- *	Converts the string into its enumerated type.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToEnum(
-    ClientData clientData,	/* Vectors of valid strings. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,
-    char *widgRec,		/* Widget record. */
-    int offset,			/* Offset of field in record */
-    int flags)			
-{
-    int *enumPtr = (int *)(widgRec + offset);
-    char c;
-    char **p;
-    int i;
-    int count;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    c = string[0];
-    count = 0;
-    for (p = (char **)clientData; *p != NULL; p++) {
-	if ((c == p[0][0]) && (strcmp(string, *p) == 0)) {
-	    *enumPtr = count;
-	    return TCL_OK;
-	}
-	count++;
-    }
-    *enumPtr = -1;
-
-    Tcl_AppendResult(interp, "bad value \"", string, "\": should be ", 
-	(char *)NULL);
-    p = (char **)clientData; 
-    if (count > 0) {
-	Tcl_AppendResult(interp, p[0], (char *)NULL);
-    }
-    for (i = 1; i < (count - 1); i++) {
-	Tcl_AppendResult(interp, " ", p[i], ", ", (char *)NULL);
-    }
-    if (count > 1) {
-	Tcl_AppendResult(interp, " or ", p[count - 1], ".", (char *)NULL);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EnumToObj --
- *
- *	Returns the string associated with the enumerated type.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-EnumToObj(
-    ClientData clientData,	/* List of strings. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Widget record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int value = *(int *)(widgRec + offset);
-    char **strings = (char **)clientData;
-    char **p;
-    int count;
-
-    count = 0;
-    for (p = strings; *p != NULL; p++) {
-	if (value == count) {
-	    return Tcl_NewStringObj(*p, -1);
-	}
-	count++;
-    }
-    return Tcl_NewStringObj("unknown value", -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToColumn --
- *
- *	Convert the string reprsenting a column, to its numeric
- *	form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToColumn(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* New legend position string */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    TreeView *viewPtr = (TreeView *)widgRec;
-    TreeViewColumn **columnPtrPtr = (TreeViewColumn **)(widgRec + offset);
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '\0') {
-	*columnPtrPtr = &viewPtr->treeColumn;
-    } else {
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objPtr, columnPtrPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnToString --
- *
- * Results:
- *	The string representation of the column is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-ColumnToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewColumn *columnPtr = *(TreeViewColumn **)(widgRec + offset);
-
-    if (columnPtr == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(columnPtr->key, -1);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToData --
- *
- *	Convert the string reprsenting a scroll mode, to its numeric
- *	form.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left
- *	in interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToData(
-    ClientData clientData,	/* Node of entry. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing new data. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj **objv;
-    TreeViewEntry *entryPtr = (TreeViewEntry *)widgRec;
-    char *string;
-    int objc;
-    int i;
-
-    string = Tcl_GetString(objPtr);
-    if (*string == '\0') {
-	return TCL_OK;
-    } 
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 0) {
-	return TCL_OK;
-    }
-    if (objc & 0x1) {
-	Tcl_AppendResult(interp, "data \"", string, 
-		 "\" must be in even name-value pairs", (char *)NULL);
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i += 2) {
-	TreeViewColumn *columnPtr;
-	TreeView *viewPtr = entryPtr->viewPtr;
-
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[i], &columnPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Blt_Tree_SetValueByKey(viewPtr->interp, viewPtr->tree, entryPtr->node, 
-		columnPtr->key, objv[i + 1]) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	Blt_TreeView_AddValue(entryPtr, columnPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DataToObj --
- *
- * Results:
- *	The string representation of the data is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-DataToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tcl_Obj *listObjPtr, *objPtr;
-    TreeViewEntry *entryPtr = (TreeViewEntry *)widgRec;
-    TreeViewValue *valuePtr;
-
-    /* Add the key-value pairs to a new Tcl_Obj */
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (valuePtr = entryPtr->values; valuePtr != NULL; 
-	valuePtr = valuePtr->nextPtr) {
-	objPtr = Tcl_NewStringObj(valuePtr->columnPtr->key, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	if (Blt_TreeView_GetData(entryPtr, valuePtr->columnPtr->key, &objPtr)
-	    != TCL_OK) {
-	    objPtr = Blt_EmptyStringObj();
-	    Tcl_IncrRefCount(objPtr);
-	} 
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    return listObjPtr;
-}
-
-int
-Blt_TreeView_GetColumn(Tcl_Interp *interp, TreeView *viewPtr, Tcl_Obj *objPtr, 
-		 TreeViewColumn **columnPtrPtr)
-{
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (strcmp(string, "treeView") == 0) {
-	*columnPtrPtr = &viewPtr->treeColumn;
-    } else {
-	Blt_HashEntry *hPtr;
-    
-	hPtr = Blt_FindHashEntry(&viewPtr->columnTable, 
-		Blt_Tree_GetKey(viewPtr->tree, string));
-	if (hPtr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't find column \"", string, 
-			"\" in \"", Tk_PathName(viewPtr->tkwin), "\"", 
-			(char *)NULL);
-	    }
-	    return TCL_ERROR;
-	} 
-	*columnPtrPtr = Blt_GetHashValue(hPtr);
-    }
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static void
-FreeStyle(ClientData clientData, Display *display, char *widgRec, int offset)
-{
-    TreeView *viewPtr = clientData;
-    TreeViewStyle **stylePtrPtr = (TreeViewStyle **)(widgRec + offset);
-
-    if (*stylePtrPtr != NULL) {
-	Blt_TreeView_FreeStyle(viewPtr, *stylePtrPtr);
-	*stylePtrPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToStyle --
- *
- *	Convert the name of an icon into a treeview style.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToStyle(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    TreeView *viewPtr = clientData;
-    TreeViewStyle **stylePtrPtr = (TreeViewStyle **)(widgRec + offset);
-    TreeViewStyle *stylePtr;
-
-    if (Blt_TreeView_GetStyle(interp, viewPtr, Tcl_GetString(objPtr), 
-	     &stylePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    stylePtr->flags |= STYLE_DIRTY;
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    if (*stylePtrPtr != NULL) {
-	Blt_TreeView_FreeStyle(viewPtr, *stylePtrPtr);
-    }
-    *stylePtrPtr = stylePtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObj --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-StyleToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewStyle *stylePtr = *(TreeViewStyle **)(widgRec + offset);
-
-    if (stylePtr == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(stylePtr->name, -1);
-    }
-}
-
-
-void
-Blt_TreeView_UpdateColumnGCs(TreeView *viewPtr, TreeViewColumn *columnPtr)
-{
-    Drawable drawable;
-    GC newGC;
-    Blt_Background bg;
-    XGCValues gcValues;
-    int ruleDrawn;
-    unsigned long gcMask;
-    int iconWidth, iconHeight;
-    int textWidth, textHeight;
-
-    gcMask = GCForeground | GCFont;
-    gcValues.font = Blt_FontId(columnPtr->titleFont);
-
-    /* Normal title text */
-    gcValues.foreground = columnPtr->titleFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (columnPtr->titleGC != NULL) {
-	Tk_FreeGC(viewPtr->display, columnPtr->titleGC);
-    }
-    columnPtr->titleGC = newGC;
-
-    /* Active title text */
-    gcValues.foreground = columnPtr->activeTitleFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (columnPtr->activeTitleGC != NULL) {
-	Tk_FreeGC(viewPtr->display, columnPtr->activeTitleGC);
-    }
-    columnPtr->activeTitleGC = newGC;
-
-    columnPtr->titleWidth = 2 * columnPtr->titleBW;
-    iconWidth = iconHeight = 0;
-    if (columnPtr->titleIcon != NULL) {
-	iconWidth = TreeView_IconWidth(columnPtr->titleIcon);
-	iconHeight = TreeView_IconHeight(columnPtr->titleIcon);
-	columnPtr->titleWidth += iconWidth;
-    }
-    if (columnPtr->titleTextPtr != NULL) {
-	Blt_Free(columnPtr->titleTextPtr);
-	columnPtr->titleTextPtr = NULL;
-    }
-    textWidth = textHeight = 0;
-    if (columnPtr->title != NULL) {
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, columnPtr->titleFont);
-	columnPtr->titleTextPtr = Blt_Ts_CreateLayout(columnPtr->title, -1,&ts);
-	textHeight = columnPtr->titleTextPtr->height;
-	textWidth = columnPtr->titleTextPtr->width;
-	columnPtr->titleWidth += textWidth;
-    }
-    if ((iconWidth > 0) && (textWidth > 0)) {
-	columnPtr->titleWidth += 8;
-    }
-    columnPtr->titleWidth += TV_ARROW_WIDTH + 2;
-    columnPtr->titleHeight = MAX(iconHeight, textHeight);
-    gcMask = (GCFunction | GCLineWidth | GCLineStyle | GCForeground);
-
-    /* 
-     * If the rule is active, turn it off (i.e. draw again to erase
-     * it) before changing the GC.  If the color changes, we won't be
-     * able to erase the old line, since it will no longer be
-     * correctly XOR-ed with the background.
-     */
-    drawable = Tk_WindowId(viewPtr->tkwin);
-    ruleDrawn = ((viewPtr->flags & TV_RULE_ACTIVE) &&
-		 (viewPtr->activeTitleColumnPtr == columnPtr) && 
-		 (drawable != None));
-    if (ruleDrawn) {
-	Blt_TreeView_DrawRule(viewPtr, columnPtr, drawable);
-    }
-    /* XOR-ed rule column divider */ 
-    gcValues.line_width = LineWidth(columnPtr->ruleLineWidth);
-    gcValues.foreground = 
-	Blt_TreeView_GetStyleFg(viewPtr, columnPtr->stylePtr)->pixel;
-    if (LineIsDashed(columnPtr->ruleDashes)) {
-	gcValues.line_style = LineOnOffDash;
-    } else {
-	gcValues.line_style = LineSolid;
-    }
-    gcValues.function = GXxor;
-
-    bg = CHOOSE(viewPtr->bg, columnPtr->bg);
-    gcValues.foreground ^= Blt_BackgroundBorderColor(bg)->pixel; 
-    newGC = Blt_GetPrivateGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (columnPtr->ruleGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, columnPtr->ruleGC);
-    }
-    if (LineIsDashed(columnPtr->ruleDashes)) {
-	Blt_SetDashes(viewPtr->display, newGC, &columnPtr->ruleDashes);
-    }
-    columnPtr->ruleGC = newGC;
-    if (ruleDrawn) {
-	Blt_TreeView_DrawRule(viewPtr, columnPtr, drawable);
-    }
-    columnPtr->flags |= COLUMN_DIRTY;
-    viewPtr->flags |= UPDATE;
-}
-
-static void
-DestroyColumn(TreeView *viewPtr, TreeViewColumn *columnPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    bltTreeViewUidOption.clientData = viewPtr;
-    bltTreeViewIconOption.clientData = viewPtr;
-    styleOption.clientData = viewPtr;
-    Blt_FreeOptions(columnSpecs, (char *)columnPtr, viewPtr->display, 0);
-    if (columnPtr->titleGC != NULL) {
-	Tk_FreeGC(viewPtr->display, columnPtr->titleGC);
-    }
-    if (columnPtr->ruleGC != NULL) {
-	Blt_FreePrivateGC(viewPtr->display, columnPtr->ruleGC);
-    }
-    hPtr = Blt_FindHashEntry(&viewPtr->columnTable, columnPtr->key);
-    if (hPtr != NULL) {
-	Blt_DeleteHashEntry(&viewPtr->columnTable, hPtr);
-    }
-    if (columnPtr->link != NULL) {
-	Blt_Chain_DeleteLink(viewPtr->columns, columnPtr->link);
-    }
-    if (columnPtr->titleTextPtr != NULL) {
-	Blt_Free(columnPtr->titleTextPtr);
-    }
-    if (columnPtr == &viewPtr->treeColumn) {
-	columnPtr->titleTextPtr = NULL;
-	columnPtr->link = NULL;
-    } else {
-	Blt_Free(columnPtr);
-    }
-}
-
-void
-Blt_TreeView_DestroyColumns(TreeView *viewPtr)
-{
-    if (viewPtr->columns != NULL) {
-	Blt_ChainLink link;
-	TreeViewColumn *columnPtr;
-	
-	for (link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	     link = Blt_Chain_NextLink(link)) {
-	    columnPtr = Blt_Chain_GetValue(link);
-	    columnPtr->link = NULL;
-	    DestroyColumn(viewPtr, columnPtr);
-	}
-	Blt_Chain_Destroy(viewPtr->columns);
-	viewPtr->columns = NULL;
-    }
-    Blt_DeleteHashTable(&viewPtr->columnTable);
-}
-
-int
-Blt_TreeView_CreateColumn(TreeView *viewPtr, TreeViewColumn *columnPtr, const char *name, 
-		    const char *defTitle)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    columnPtr->key = Blt_Tree_GetKeyFromInterp(viewPtr->interp, name);
-    columnPtr->title = Blt_AssertStrdup(defTitle);
-    columnPtr->justify = TK_JUSTIFY_CENTER;
-    columnPtr->relief = TK_RELIEF_FLAT;
-    columnPtr->borderWidth = 1;
-    columnPtr->pad.side1 = columnPtr->pad.side2 = 2;
-    columnPtr->state = STATE_NORMAL;
-    columnPtr->weight = 1.0;
-    columnPtr->editable = FALSE;
-    columnPtr->ruleLineWidth = 1;
-    columnPtr->titleBW = 2;
-    columnPtr->titleRelief = TK_RELIEF_RAISED;
-    columnPtr->titleIcon = NULL;
-    hPtr = Blt_CreateHashEntry(&viewPtr->columnTable, columnPtr->key, &isNew);
-    Blt_SetHashValue(hPtr, columnPtr);
-
-    bltTreeViewUidOption.clientData = viewPtr;
-    bltTreeViewIconOption.clientData = viewPtr;
-    styleOption.clientData = viewPtr;
-    if (Blt_ConfigureComponentFromObj(viewPtr->interp, viewPtr->tkwin, name, 
-	"Column", columnSpecs, 0, (Tcl_Obj **)NULL, (char *)columnPtr, 0) 
-	!= TCL_OK) {
-	DestroyColumn(viewPtr, columnPtr);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static TreeViewColumn *
-CreateColumn(TreeView *viewPtr, Tcl_Obj *nameObjPtr, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewColumn *columnPtr;
-
-    columnPtr = Blt_AssertCalloc(1, sizeof(TreeViewColumn));
-    if (Blt_TreeView_CreateColumn(viewPtr, columnPtr, Tcl_GetString(nameObjPtr), 
-	Tcl_GetString(nameObjPtr)) != TCL_OK) {
-	return NULL;
-    }
-    bltTreeViewUidOption.clientData = viewPtr;
-    bltTreeViewIconOption.clientData = viewPtr;
-    styleOption.clientData = viewPtr;
-    if (Blt_ConfigureComponentFromObj(viewPtr->interp, viewPtr->tkwin, 
-	columnPtr->key, "Column", columnSpecs, objc, objv, (char *)columnPtr, 
-	BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	DestroyColumn(viewPtr, columnPtr);
-	return NULL;
-    }
-    Blt_TreeView_UpdateColumnGCs(viewPtr, columnPtr);
-    return columnPtr;
-}
-
-TreeViewColumn *
-Blt_TreeView_NearestColumn(TreeView *viewPtr, int x, int y, ClientData *contextPtr)
-{
-    if (viewPtr->nVisible > 0) {
-	Blt_ChainLink link;
-	TreeViewColumn *columnPtr;
-	int right;
-
-	/*
-	 * Determine if the pointer is over the rightmost portion of the
-	 * column.  This activates the rule.
-	 */
-	x = WORLDX(viewPtr, x);
-	for(link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    columnPtr = Blt_Chain_GetValue(link);
-	    right = columnPtr->worldX + columnPtr->width;
-	    if ((x >= columnPtr->worldX) && (x <= right)) {
-		if (contextPtr != NULL) {
-		    *contextPtr = NULL;
-		    if ((viewPtr->flags & TV_SHOW_COLUMN_TITLES) && 
-			(y >= viewPtr->inset) &&
-			(y < (viewPtr->titleHeight + viewPtr->inset))) {
-			*contextPtr = (x >= (right - RULE_AREA)) 
-			    ? ITEM_COLUMN_RULE : ITEM_COLUMN_TITLE;
-		    } 
-		}
-		return columnPtr;
-	    }
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnActivateOp --
- *
- *	Selects the button to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnActivateOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    if (objc == 4) {
-	Drawable drawable;
-	TreeViewColumn *columnPtr;
-	char *string;
-
-	string = Tcl_GetString(objv[3]);
-	if (string[0] == '\0') {
-	    columnPtr = NULL;
-	} else {
-	    if (Blt_TreeView_GetColumn(interp, viewPtr, objv[3], &columnPtr) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (((viewPtr->flags & TV_SHOW_COLUMN_TITLES) == 0) || 
-		(columnPtr->hidden) || (columnPtr->state == STATE_DISABLED)) {
-		columnPtr = NULL;
-	    }
-	}
-	viewPtr->activeTitleColumnPtr = viewPtr->activeColumnPtr = columnPtr;
-	drawable = Tk_WindowId(viewPtr->tkwin);
-	if (drawable != None) {
-	    Blt_TreeView_DrawHeadings(viewPtr, drawable);
-	    Blt_TreeView_DrawOuterBorders(viewPtr, drawable);
-	}
-    }
-    if (viewPtr->activeTitleColumnPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-			 viewPtr->activeTitleColumnPtr->key, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnBindOp --
- *
- *	  .t bind tag sequence command
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnBindOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    ClientData object;
-    TreeViewColumn *columnPtr;
-
-    if (Blt_TreeView_GetColumn(NULL, viewPtr, objv[3], &columnPtr) == TCL_OK) {
-	object = Blt_TreeView_ColumnTag(viewPtr, columnPtr->key);
-    } else {
-	object = Blt_TreeView_ColumnTag(viewPtr, Tcl_GetString(objv[3]));
-    }
-    return Blt_ConfigureBindingsFromObj(interp, viewPtr->bindTable, object,
-	objc - 4, objv + 4);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnCgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    TreeViewColumn *columnPtr;
-
-    if (Blt_TreeView_GetColumn(interp, viewPtr, objv[3], &columnPtr) != TCL_OK){
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, columnSpecs, 
-	(char *)columnPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnConfigureOp --
- *
- * 	This procedure is called to process a list of configuration
- *	options database, in order to reconfigure the one of more
- *	entries in the widget.
- *
- *	  .h entryconfigure node node node node option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for viewPtr; old resources get freed, if there
- *	were any.  The hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnConfigureOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    int nOptions, start;
-    int i;
-
-    /* Figure out where the option value pairs begin */
-    for(i = 3; i < objc; i++) {
-	TreeViewColumn *columnPtr;
-
-	if (Blt_ObjIsOption(columnSpecs, objv[i], 0)) {
-	    break;
-	}
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[i], &columnPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    start = i;
-    nOptions = objc - start;
-    
-    bltTreeViewUidOption.clientData = viewPtr;
-    bltTreeViewIconOption.clientData = viewPtr;
-    styleOption.clientData = viewPtr;
-    for (i = 3; i < start; i++) {
-	TreeViewColumn *columnPtr;
-
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[i], &columnPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (nOptions == 0) {
-	    return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, columnSpecs, 
-		(char *)columnPtr, (Tcl_Obj *)NULL, 0);
-	} else if (nOptions == 1) {
-	    return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, columnSpecs, 
-		(char *)columnPtr, objv[start], 0);
-	}
-	if (Blt_ConfigureWidgetFromObj(viewPtr->interp, viewPtr->tkwin, 
-	       columnSpecs, nOptions, objv + start, (char *)columnPtr, 
-		BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	Blt_TreeView_UpdateColumnGCs(viewPtr, columnPtr);
-    }
-    /*FIXME: Makes every change redo everything. */
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnDeleteOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnDeleteOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-	       Tcl_Obj *const *objv)
-{
-    int i;
-
-    for(i = 3; i < objc; i++) {
-	TreeViewColumn *columnPtr;
-	TreeViewEntry *entryPtr;
-
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[i], &columnPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* Traverse the tree deleting values associated with the column.  */
-	for(entryPtr = viewPtr->rootPtr; entryPtr != NULL;
-	    entryPtr = Blt_TreeView_NextEntry(entryPtr, 0)) {
-	    if (entryPtr != NULL) {
-		TreeViewValue *valuePtr, *lastPtr, *nextPtr;
-		
-		lastPtr = NULL;
-		for (valuePtr = entryPtr->values; valuePtr != NULL; 
-		     valuePtr = nextPtr) {
-		    nextPtr = valuePtr->nextPtr;
-		    if (valuePtr->columnPtr == columnPtr) {
-			Blt_TreeView_DestroyValue(viewPtr, valuePtr);
-			if (lastPtr == NULL) {
-			    entryPtr->values = nextPtr;
-			} else {
-			    lastPtr->nextPtr = nextPtr;
-			}
-			break;
-		    }
-		    lastPtr = valuePtr;
-		}
-	    }
-	}
-	DestroyColumn(viewPtr, columnPtr);
-    }
-    /* Deleting a column may affect the height of an entry. */
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY /*| RESORT */);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnInsertOp --
- *
- *	Add new columns to the tree.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnInsertOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Blt_ChainLink before;
-    Tcl_Obj *const *options;
-    int i;
-    int nOptions;
-    int start;
-    long insertPos;
-
-    if (Blt_GetPositionFromObj(viewPtr->interp, objv[3], &insertPos) != TCL_OK){
-	return TCL_ERROR;
-    }
-    if ((insertPos == -1) || 
-	(insertPos >= Blt_Chain_GetLength(viewPtr->columns))) {
-	before = NULL;		/* Insert at end of list. */
-    } else {
-	before =  Blt_Chain_GetNthLink(viewPtr->columns, insertPos);
-    }
-    /*
-     * Count the column names that follow.  Count the arguments until we spot
-     * one that looks like a configuration option (i.e. starts with a minus
-     * ("-")).
-     */
-    for (i = 4; i < objc; i++) {
-	if (Blt_ObjIsOption(columnSpecs, objv[i], 0)) {
-	    break;
-	}
-    }
-    start = i;
-    nOptions = objc - i;
-    options = objv + start;
-
-    for (i = 4; i < start; i++) {
-	TreeViewColumn *columnPtr;
-	TreeViewEntry *entryPtr;
-
-	if (Blt_TreeView_GetColumn(NULL, viewPtr, objv[i], &columnPtr) == 
-	    TCL_OK) {
-	    Tcl_AppendResult(interp, "column \"", Tcl_GetString(objv[i]), 
-		"\" already exists", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	columnPtr = CreateColumn(viewPtr, objv[i], nOptions, options);
-	if (columnPtr == NULL) {
-	    return TCL_ERROR;
-	}
-	if (before == NULL) {
-	    columnPtr->link = Blt_Chain_Append(viewPtr->columns, columnPtr);
-	} else {
-	    columnPtr->link = Blt_Chain_NewLink();
-	    Blt_Chain_SetValue(columnPtr->link, columnPtr);
-	    Blt_Chain_LinkBefore(viewPtr->columns, columnPtr->link, before);
-	}
-	/* 
-	 * Traverse the tree adding column entries where needed.
-	 */
-	for(entryPtr = viewPtr->rootPtr; entryPtr != NULL;
-	    entryPtr = Blt_TreeView_NextEntry(entryPtr, 0)) {
-	    Blt_TreeView_AddValue(entryPtr, columnPtr);
-	}
-	Blt_TreeView_TraceColumn(viewPtr, columnPtr);
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnCurrentOp --
- *
- *	Make the rule to appear active.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnCurrentOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    ClientData context;
-    TreeViewColumn *columnPtr;
-
-    columnPtr = NULL;
-    context = Blt_GetCurrentContext(viewPtr->bindTable);
-    if ((context == ITEM_COLUMN_TITLE) || (context == ITEM_COLUMN_RULE)) {
-	columnPtr = Blt_GetCurrentItem(viewPtr->bindTable);
-    }
-    if (context >= ITEM_STYLE) {
-	TreeViewValue *valuePtr = context;
-	
-	columnPtr = valuePtr->columnPtr;
-    }
-    if (columnPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), columnPtr->key, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnInvokeOp --
- *
- * 	This procedure is called to invoke a column command.
- *
- *	  .h column invoke columnName
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnInvokeOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    TreeViewColumn *columnPtr;
-    char *string;
-
-    string = Tcl_GetString(objv[3]);
-    if (string[0] == '\0') {
-	return TCL_OK;
-    }
-    if (Blt_TreeView_GetColumn(interp, viewPtr, objv[3], &columnPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((columnPtr->state == STATE_NORMAL) && (columnPtr->titleCmd != NULL)) {
-	int result;
-
-	Tcl_Preserve(viewPtr);
-	Tcl_Preserve(columnPtr);
-	result = Tcl_GlobalEval(interp, columnPtr->titleCmd);
-	Tcl_Release(columnPtr);
-	Tcl_Release(viewPtr);
-	return result;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnMoveOp --
- *
- *	Move a column.
- *
- * .h column move field1 position
- *---------------------------------------------------------------------------
- */
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnNamesOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ColumnNamesOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Blt_ChainLink link;
-    Tcl_Obj *listObjPtr, *objPtr;
-    TreeViewColumn *columnPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for(link = Blt_Chain_FirstLink(viewPtr->columns); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	columnPtr = Blt_Chain_GetValue(link);
-	objPtr = Tcl_NewStringObj(columnPtr->key, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-ColumnNearestOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    int x, y;			/* Screen coordinates of the test point. */
-    TreeViewColumn *columnPtr;
-    ClientData context;
-    int checkTitle;
-#ifdef notdef
-    int isRoot;
-
-    isRoot = FALSE;
-    string = Tcl_GetString(objv[3]);
-
-    if (strcmp("-root", string) == 0) {
-	isRoot = TRUE;
-	objv++, objc--;
-    }
-    if (objc != 5) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " ", Tcl_GetString(objv[1]), 
-		Tcl_GetString(objv[2]), " ?-root? x y\"", (char *)NULL);
-	return TCL_ERROR;
-			 
-    }
-#endif
-    if (Tk_GetPixelsFromObj(interp, viewPtr->tkwin, objv[3], &x) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    y = 0;
-    checkTitle = FALSE;
-    if (objc == 5) {
-	if (Tk_GetPixelsFromObj(interp, viewPtr->tkwin, objv[4], &y) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	checkTitle = TRUE;
-    }
-    columnPtr = Blt_TreeView_NearestColumn(viewPtr, x, y, &context);
-    if ((checkTitle) && (context == NULL)) {
-	columnPtr = NULL;
-    }
-    if (columnPtr != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), columnPtr->key, -1);
-    }
-    return TCL_OK;
-}
-
-static void
-UpdateMark(TreeView *viewPtr, int newMark)
-{
-    Drawable drawable;
-    TreeViewColumn *cp;
-    int dx;
-    int width;
-
-    cp = viewPtr->resizeColumnPtr;
-    if (cp == NULL) {
-	return;
-    }
-    drawable = Tk_WindowId(viewPtr->tkwin);
-    if (drawable == None) {
-	return;
-    }
-
-    /* Erase any existing rule. */
-    if (viewPtr->flags & TV_RULE_ACTIVE) { 
-	Blt_TreeView_DrawRule(viewPtr, cp, drawable);
-    }
-    
-    dx = newMark - viewPtr->ruleAnchor; 
-    width = cp->width - (PADDING(cp->pad) + 2 * cp->borderWidth);
-    if ((cp->reqMin > 0) && ((width + dx) < cp->reqMin)) {
-	dx = cp->reqMin - width;
-    }
-    if ((cp->reqMax > 0) && ((width + dx) > cp->reqMax)) {
-	dx = cp->reqMax - width;
-    }
-    if ((width + dx) < 4) {
-	dx = 4 - width;
-    }
-    viewPtr->ruleMark = viewPtr->ruleAnchor + dx;
-
-    /* Redraw the rule if required. */
-    if (viewPtr->flags & TV_RULE_NEEDED) {
-	Blt_TreeView_DrawRule(viewPtr, cp, drawable);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResizeActivateOp --
- *
- *	Turns on/off the resize cursor.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ResizeActivateOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    TreeViewColumn *columnPtr;
-    char *string;
-
-    string = Tcl_GetString(objv[4]);
-    if (string[0] == '\0') {
-	if (viewPtr->cursor != None) {
-	    Tk_DefineCursor(viewPtr->tkwin, viewPtr->cursor);
-	} else {
-	    Tk_UndefineCursor(viewPtr->tkwin);
-	}
-	viewPtr->resizeColumnPtr = NULL;
-    } else if (Blt_TreeView_GetColumn(interp, viewPtr, objv[4], &columnPtr) 
-	       == TCL_OK) {
-	if (viewPtr->resizeCursor != None) {
-	    Tk_DefineCursor(viewPtr->tkwin, viewPtr->resizeCursor);
-	} 
-	viewPtr->resizeColumnPtr = columnPtr;
-    } else {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResizeAnchorOp --
- *
- *	Set the anchor for the resize.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ResizeAnchorOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    int x;
-
-    if (Tcl_GetIntFromObj(NULL, objv[4], &x) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    viewPtr->ruleAnchor = x;
-    viewPtr->flags |= TV_RULE_NEEDED;
-    UpdateMark(viewPtr, x);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResizeMarkOp --
- *
- *	Sets the resize mark.  The distance between the mark and the anchor
- *	is the delta to change the width of the active column.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ResizeMarkOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    int x;
-
-    if (Tcl_GetIntFromObj(NULL, objv[4], &x) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-    viewPtr->flags |= TV_RULE_NEEDED;
-    UpdateMark(viewPtr, x);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ResizeSetOp --
- *
- *	Returns the new width of the column including the resize delta.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ResizeSetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    viewPtr->flags &= ~TV_RULE_NEEDED;
-    UpdateMark(viewPtr, viewPtr->ruleMark);
-    if (viewPtr->resizeColumnPtr != NULL) {
-	int width, delta;
-	TreeViewColumn *columnPtr;
-
-	columnPtr = viewPtr->resizeColumnPtr;
-	delta = (viewPtr->ruleMark - viewPtr->ruleAnchor);
-	width = viewPtr->resizeColumnPtr->width + delta - 
-	    (PADDING(columnPtr->pad) + 2 * columnPtr->borderWidth) - 1;
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), width);
-    }
-    return TCL_OK;
-}
-
-static Blt_OpSpec resizeOps[] =
-{ 
-    {"activate", 2, ResizeActivateOp, 5, 5, "column"},
-    {"anchor",   2, ResizeAnchorOp,   5, 5, "x"},
-    {"mark",     1, ResizeMarkOp,     5, 5, "x"},
-    {"set",      1, ResizeSetOp,      4, 4, "",},
-};
-
-static int nResizeOps = sizeof(resizeOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColumnResizeOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColumnResizeOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    TreeViewCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nResizeOps, resizeOps, BLT_OP_ARG3, 
-	objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-
-static Blt_OpSpec columnOps[] =
-{
-    {"activate",  1, ColumnActivateOp,  3, 4, "?field?",},
-    {"bind",      1, ColumnBindOp,      4, 6, "tagName ?sequence command?",},
-    {"cget",      2, ColumnCgetOp,      5, 5, "field option",},
-    {"configure", 2, ColumnConfigureOp, 4, 0, "field ?option value?...",},
-    {"current",   2, ColumnCurrentOp,   3, 3, "",},
-    {"delete",    1, ColumnDeleteOp,    3, 0, "?field...?",},
-    {"highlight", 1, ColumnActivateOp,  3, 4, "?field?",},
-    {"insert",    3, ColumnInsertOp,    5, 0, 
-	"position field ?field...? ?option value?...",},
-    {"invoke",    3, ColumnInvokeOp,    4, 4, "field",},
-    {"names",     2, ColumnNamesOp,     3, 3, "",},
-    {"nearest",   2, ColumnNearestOp,   4, 5, "x ?y?",},
-    {"resize",    1, ColumnResizeOp,    3, 0, "arg",},
-};
-static int nColumnOps = sizeof(columnOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeViewColumnOp --
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_TreeView_ColumnOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nColumnOps, columnOps, BLT_OP_ARG2, 
-	objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-
-static int
-InvokeCompare(TreeView *viewPtr, TreeViewEntry *e1Ptr, TreeViewEntry *e2Ptr, 
-	      const char *command)
-{
-    int result;
-    Tcl_Obj *objv[8];
-    int i;
-
-    objv[0] = Tcl_NewStringObj(command, -1);
-    objv[1] = Tcl_NewStringObj(Tk_PathName(viewPtr->tkwin), -1);
-    objv[2] = Tcl_NewLongObj(Blt_Tree_NodeId(e1Ptr->node));
-    objv[3] = Tcl_NewLongObj(Blt_Tree_NodeId(e2Ptr->node));
-    objv[4] = Tcl_NewStringObj(viewPtr->sortColumnPtr->key, -1);
-	     
-    if (viewPtr->flatView) {
-	objv[5] = Tcl_NewStringObj(e1Ptr->fullName, -1);
-	objv[6] = Tcl_NewStringObj(e2Ptr->fullName, -1);
-    } else {
-	objv[5] = Tcl_NewStringObj(GETLABEL(e1Ptr), -1);
-	objv[6] = Tcl_NewStringObj(GETLABEL(e2Ptr), -1);
-    }
-    for(i = 0; i < 7; i++) {
-	Tcl_IncrRefCount(objv[i]);
-    }
-    objv[7] = NULL;
-    result = Tcl_EvalObjv(viewPtr->interp, 7, objv, TCL_EVAL_GLOBAL);
-    if ((result != TCL_OK) ||
-	(Tcl_GetIntFromObj(viewPtr->interp, Tcl_GetObjResult(viewPtr->interp), 
-			   &result) != TCL_OK)) {
-	Tcl_BackgroundError(viewPtr->interp);
-    }
-    for(i = 0; i < 7; i++) {
-	Tcl_DecrRefCount(objv[i]);
-    }
-    Tcl_ResetResult(viewPtr->interp);
-    return result;
-}
-
-static TreeView *treeViewInstance;
-
-static int
-CompareEntries(const void *a, const void *b)
-{
-    TreeView *viewPtr;
-    TreeViewEntry **e1PtrPtr = (TreeViewEntry **)a;
-    TreeViewEntry **e2PtrPtr = (TreeViewEntry **)b;
-    Tcl_Obj *obj1, *obj2;
-    const char *s1, *s2;
-    int result;
-
-    viewPtr = (*e1PtrPtr)->viewPtr;
-    obj1 = (*e1PtrPtr)->dataObjPtr;
-    obj2 = (*e2PtrPtr)->dataObjPtr;
-    s1 = Tcl_GetString(obj1);
-    s2 = Tcl_GetString(obj2);
-    result = 0;
-    switch (viewPtr->sortType) {
-    case SORT_ASCII:
-	result = strcmp(s1, s2);
-	break;
-
-    case SORT_COMMAND:
-	{
-	    const char *cmd;
-
-	    cmd = viewPtr->sortColumnPtr->sortCmd;
-	    if (cmd == NULL) {
-		cmd = viewPtr->sortCmd;
-	    }
-	    if (cmd == NULL) {
-		result = Blt_DictionaryCompare(s1, s2);
-	    } else {
-		result = InvokeCompare(viewPtr, *e1PtrPtr, *e2PtrPtr, cmd);
-	    }
-	}
-	break;
-
-    case SORT_DICTIONARY:
-	result = Blt_DictionaryCompare(s1, s2);
-	break;
-
-    case SORT_INTEGER:
-	{
-	    int i1, i2;
-
-	    if (Tcl_GetIntFromObj(NULL, obj1, &i1)==TCL_OK) {
-		if (Tcl_GetIntFromObj(NULL, obj2, &i2) == TCL_OK) {
-		    result = i1 - i2;
-		} else {
-		    result = -1;
-		} 
-	    } else if (Tcl_GetIntFromObj(NULL, obj2, &i2) == TCL_OK) {
-		result = 1;
-	    } else {
-		result = Blt_DictionaryCompare(s1, s2);
-	    }
-	}
-	break;
-
-    case SORT_REAL:
-	{
-	    double r1, r2;
-
-	    if (Tcl_GetDoubleFromObj(NULL, obj1, &r1) == TCL_OK) {
-		if (Tcl_GetDoubleFromObj(NULL, obj2, &r2) == TCL_OK) {
-		    result = (r1 < r2) ? -1 : (r1 > r2) ? 1 : 0;
-		} else {
-		    result = -1;
-		} 
-	    } else if (Tcl_GetDoubleFromObj(NULL, obj2, &r2) == TCL_OK) {
-		result = 1;
-	    } else {
-		result = Blt_DictionaryCompare(s1, s2);
-	    }
-	}
-	break;
-    }
-    if (viewPtr->sortDecreasing) {
-	return -result;
-    } 
-    return result;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CompareNodes --
- *
- *	Comparison routine (used by qsort) to sort a chain of subnodes.
- *
- * Results:
- *	1 is the first is greater, -1 is the second is greater, 0
- *	if equal.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CompareNodes(Blt_TreeNode *n1Ptr, Blt_TreeNode *n2Ptr)
-{
-    TreeView *viewPtr = treeViewInstance;
-    TreeViewEntry *e1Ptr, *e2Ptr;
-
-    e1Ptr = Blt_TreeView_NodeToEntry(viewPtr, *n1Ptr);
-    e2Ptr = Blt_TreeView_NodeToEntry(viewPtr, *n2Ptr);
-
-    /* Fetch the data for sorting. */
-    if (viewPtr->sortType == SORT_COMMAND) {
-	e1Ptr->dataObjPtr = Tcl_NewLongObj(Blt_Tree_NodeId(*n1Ptr));
-	e2Ptr->dataObjPtr = Tcl_NewLongObj(Blt_Tree_NodeId(*n2Ptr));
-    } else if (viewPtr->sortColumnPtr == &viewPtr->treeColumn) {
-	Tcl_DString dString;
-
-	Tcl_DStringInit(&dString);
-	if (e1Ptr->fullName == NULL) {
-	    Blt_TreeView_GetFullName(viewPtr, e1Ptr, TRUE, &dString);
-	    e1Ptr->fullName = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-	}
-	e1Ptr->dataObjPtr = Tcl_NewStringObj(e1Ptr->fullName, -1);
-	if (e2Ptr->fullName == NULL) {
-	    Blt_TreeView_GetFullName(viewPtr, e2Ptr, TRUE, &dString);
-	    e2Ptr->fullName = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-	}
-	e2Ptr->dataObjPtr = Tcl_NewStringObj(e2Ptr->fullName, -1);
-	Tcl_DStringFree(&dString);
-    } else {
-	Blt_TreeKey key;
-	Tcl_Obj *objPtr;
-
-	key = viewPtr->sortColumnPtr->key;
-	if (Blt_TreeView_GetData(e1Ptr, key, &objPtr) != TCL_OK) {
-	    e1Ptr->dataObjPtr = Blt_EmptyStringObj();
-	} else {
-	    e1Ptr->dataObjPtr = objPtr;
-	}
-	if (Blt_TreeView_GetData(e2Ptr, key, &objPtr) != TCL_OK) {
-	    e2Ptr->dataObjPtr = Blt_EmptyStringObj();
-	} else {
-	    e2Ptr->dataObjPtr = objPtr;
-	}
-    }
-    return CompareEntries(&e1Ptr, &e2Ptr);
-}
-
-static int
-SortAutoOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-
-    if (objc == 4) {
-	int bool;
-	int isAuto;
-
-	isAuto = ((viewPtr->flags & TV_SORT_AUTO) != 0);
-	if (Tcl_GetBooleanFromObj(interp, objv[3], &bool) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (isAuto != bool) {
-	    viewPtr->flags |= (LAYOUT_PENDING | DIRTY | RESORT);
-	    Blt_TreeView_EventuallyRedraw(viewPtr);
-	}
-	if (bool) {
-	    viewPtr->flags |= TV_SORT_AUTO;
-	} else {
-	    viewPtr->flags &= ~TV_SORT_AUTO;
-	}
-    }
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (viewPtr->flags & TV_SORT_AUTO));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortCgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SortCgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, sortSpecs, 
-	(char *)viewPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortConfigureOp --
- *
- * 	This procedure is called to process a list of configuration
- *	options database, in order to reconfigure the one of more
- *	entries in the widget.
- *
- *	  .h sort configure option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for viewPtr; old resources get freed, if there
- *	were any.  The hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SortConfigureOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    int oldType;
-    const char *oldCommand;
-    TreeViewColumn *oldColumn;
-
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, sortSpecs, 
-		(char *)viewPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, sortSpecs, 
-		(char *)viewPtr, objv[3], 0);
-    }
-    oldColumn = viewPtr->sortColumnPtr;
-    oldType = viewPtr->sortType;
-    oldCommand = viewPtr->sortCmd;
-    if (Blt_ConfigureWidgetFromObj(interp, viewPtr->tkwin, sortSpecs, 
-	objc - 3, objv + 3, (char *)viewPtr, BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((oldColumn != viewPtr->sortColumnPtr) || (oldType != viewPtr->sortType) ||
-	(oldCommand != viewPtr->sortCmd)) {
-	viewPtr->flags &= ~SORTED;
-	viewPtr->flags |= (DIRTY | RESORT);
-    } 
-    if (viewPtr->flags & TV_SORT_AUTO) {
-	viewPtr->flags |= SORT_PENDING;
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SortOnceOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    int recurse;
-
-    recurse = FALSE;
-    if (objc > 3) {
-	char *string;
-	int length;
-
-	string = Tcl_GetStringFromObj(objv[3], &length);
-	if ((string[0] == '-') && (length > 1) &&
-	    (strncmp(string, "-recurse", length) == 0)) {
-	    objv++, objc--;
-	    recurse = TRUE;
-	}
-    }
-#ifdef notdef
-    { 
-	int i;
-
-	treeViewInstance = viewPtr;
-	for (i = 3; i < objc; i++) {
-	    TreeViewEntry *entryPtr;
-	    int result;
-	    
-	    if (Blt_TreeView_GetEntry(viewPtr, objv[i], &entryPtr) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (recurse) {
-		result = Blt_Tree_Apply(entryPtr->node, SortApplyProc, viewPtr);
-	    } else {
-		result = SortApplyProc(entryPtr->node, viewPtr, TREE_PREORDER);
-	    }
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-#endif
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY | UPDATE | SORT_PENDING | 
-		     RESORT);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_SortOp --
- *
- *	Comparison routine (used by qsort) to sort a chain of subnodes.
- *	A simple string comparison is performed on each node name.
- *
- *	.h sort auto
- *	.h sort once -recurse root
- *
- * Results:
- *	1 is the first is greater, -1 is the second is greater, 0
- *	if equal.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec sortOps[] =
-{
-    {"auto",      1, SortAutoOp,      3, 4, "?boolean?",},
-    {"cget",      2, SortCgetOp,      4, 4, "option",},
-    {"configure", 2, SortConfigureOp, 3, 0, "?option value?...",},
-    {"once",      1, SortOnceOp,      3, 0, "?-recurse? node...",},
-};
-static int nSortOps = sizeof(sortOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-int
-Blt_TreeView_SortOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		    Tcl_Obj *const *objv)
-{
-    TreeViewCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSortOps, sortOps, BLT_OP_ARG2, objc, 
-	    objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (viewPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortApplyProc --
- *
- *	Sorts the subnodes at a given node.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SortApplyProc(Blt_TreeNode node, ClientData clientData, int order)
-{
-    TreeView *viewPtr = clientData;
-
-    if (!Blt_Tree_IsLeaf(node)) {
-	Blt_Tree_SortNode(viewPtr->tree, node, CompareNodes);
-    }
-    return TCL_OK;
-}
- 
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_SortFlatView --
- *
- *	Sorts the flatten array of entries.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_SortFlatView(TreeView *viewPtr)
-{
-    TreeViewEntry *entryPtr, **p;
-
-    viewPtr->flags &= ~SORT_PENDING;
-    if ((viewPtr->sortType == SORT_NONE) || (viewPtr->nEntries < 2)) {
-	return;
-    }
-    if (viewPtr->flags & SORTED) {
-	int first, last;
-	TreeViewEntry *hold;
-
-	if (viewPtr->sortDecreasing == viewPtr->viewIsDecreasing) {
-	    return;
-	}
-
-	/* 
-	 * The view is already sorted but in the wrong direction. 
-	 * Reverse the entries in the array.
-	 */
- 	for (first = 0, last = viewPtr->nEntries - 1; last > first; 
-	     first++, last--) {
-	    hold = viewPtr->flatArr[first];
-	    viewPtr->flatArr[first] = viewPtr->flatArr[last];
-	    viewPtr->flatArr[last] = hold;
-	}
-	viewPtr->viewIsDecreasing = viewPtr->sortDecreasing;
-	viewPtr->flags |= SORTED | LAYOUT_PENDING;
-	return;
-    }
-    /* Fetch each entry's data as Tcl_Objs for sorting. */
-    if (viewPtr->sortColumnPtr == &viewPtr->treeColumn) {
-	for(p = viewPtr->flatArr; *p != NULL; p++) {
-	    entryPtr = *p;
-	    if (entryPtr->fullName == NULL) {
-		Tcl_DString dString;
-
-		Blt_TreeView_GetFullName(viewPtr, entryPtr, TRUE, &dString);
-		entryPtr->fullName = 
-		    Blt_AssertStrdup(Tcl_DStringValue(&dString));
-		Tcl_DStringFree(&dString);
-	    }
-	    entryPtr->dataObjPtr = Tcl_NewStringObj(entryPtr->fullName, -1);
-	    Tcl_IncrRefCount(entryPtr->dataObjPtr);
-	}
-    } else {
-	Blt_TreeKey key;
-	Tcl_Obj *objPtr;
-
-	key = viewPtr->sortColumnPtr->key;
-	for(p = viewPtr->flatArr; *p != NULL; p++) {
-	    entryPtr = *p;
-	    if (Blt_TreeView_GetData(entryPtr, key, &objPtr) != TCL_OK) {
-		objPtr = Blt_EmptyStringObj();
-	    }
-	    entryPtr->dataObjPtr = objPtr;
-	    Tcl_IncrRefCount(entryPtr->dataObjPtr);
-	}
-    }
-    qsort((char *)viewPtr->flatArr, viewPtr->nEntries, sizeof(TreeViewEntry *),
-	  (QSortCompareProc *)CompareEntries);
-
-    /* Free all the Tcl_Objs used for comparison data. */
-    for(p = viewPtr->flatArr; *p != NULL; p++) {
-	Tcl_DecrRefCount((*p)->dataObjPtr);
-    }
-    viewPtr->viewIsDecreasing = viewPtr->sortDecreasing;
-    viewPtr->flags |= SORTED;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_TreeView_SortView --
- *
- *	Sorts the tree array of entries.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_TreeView_SortView(TreeView *viewPtr)
-{
-    viewPtr->flags &= ~SORT_PENDING;
-    if (viewPtr->sortType != SORT_NONE) {
-	treeViewInstance = viewPtr;
-	Blt_Tree_Apply(viewPtr->rootPtr->node, SortApplyProc, viewPtr);
-    }
-    viewPtr->viewIsDecreasing = viewPtr->sortDecreasing;
-}
-
-
-#endif /* NO_TREEVIEW */
diff --git a/blt3.0/src/bltTvEdit.c b/blt3.0/src/bltTvEdit.c
deleted file mode 100644
index f667a88..0000000
--- a/blt3.0/src/bltTvEdit.c
+++ /dev/null
@@ -1,1703 +0,0 @@
-
-/*
-  Remember row,column where string was acquired.
-  postcombobox x y 
-	icon?, text, row, column position, fg, bg button?
-	based upon style.
-  grab set
-  SetIcon
-  SetText
-  SetBg
-  SetFg
-  SetFont
-  SetButton  
- */
-
-/*
- * bltTvEdit.c --
- *
- * This module implements an hierarchy widget for the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_TREEVIEW
-#include "bltOp.h"
-#include "bltTreeView.h"
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-#define TEXTBOX_FOCUS	(1<<0)
-#define TEXTBOX_REDRAW	(1<<1)
-
-static Tcl_IdleProc DisplayTextbox;
-static Tcl_FreeProc DestroyTextbox;
-static Tcl_TimerProc BlinkCursorProc;
-static Tcl_ObjCmdProc TextboxCmd;
-
-/*
- * Textbox --
- *
- *	This structure is shared by entries when their labels are
- *	edited via the keyboard.  It maintains the location of the
- *	insertion cursor and the text selection for the editted entry.
- *	The structure is shared since we need only one.  The "focus"
- *	entry should be the only entry receiving KeyPress/KeyRelease
- *	events at any time.  Information from the previously editted
- *	entry is overwritten.
- *
- *	Note that all the indices internally are in terms of bytes,
- *	not characters.  This is because UTF-8 strings may encode a
- *	single character into a multi-byte sequence.  To find the
- *	respective character position
- *
- *		n = Tcl_NumUtfChars(string, index);
- *
- *	where n is the resulting character number.
- */
-typedef struct {
-
-    /*
-     * This is a SNAFU in the Tk API.  It assumes that only an official
-     * Tk "toplevel" widget will ever become a toplevel window (i.e. a
-     * window whose parent is the root window).  Because under Win32,
-     * Tk tries to use the widget record associated with the TopLevel
-     * as a Tk frame widget, to read its menu name.  What this means
-     * is that any widget that's going to be a toplevel, must also look
-     * like a frame. Therefore we've copied the frame widget structure
-     * fields into the token.
-     */
-
-    Tk_Window tkwin;		/* Window that embodies the frame.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up. */
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-    Tcl_Interp *interp;		/* Interpreter associated with widget.  Used
-				 * to delete widget command. */
-    Tcl_Command widgetCmd;	/* Token for frame's widget command. */
-    char *className;		/* Class name for widget (from configuration
-				 * option).  Malloc-ed. */
-    int mask;			/* Either FRAME or TOPLEVEL;  used to select
-				 * which configuration options are valid for
-				 * widget. */
-    char *screenName;		/* Screen on which widget is created.  Non-null
-				 * only for top-levels.  Malloc-ed, may be
-				 * NULL. */
-    char *visualName;		/* Textual description of visual for window,
-				 * from -visual option.  Malloc-ed, may be
-				 * NULL. */
-    char *colormapName;		/* Textual description of colormap for window,
-				 * from -colormap option.  Malloc-ed, may be
-				 * NULL. */
-    char *menuName;		/* Textual description of menu to use for
-				 * menubar. Malloc-ed, may be NULL. */
-    Colormap colormap;		/* If not None, identifies a colormap
-				 * allocated for this window, which must be
-				 * freed when the window is deleted. */
-    Tk_3DBorder border;		/* Structure used to draw 3-D border and
-				 * background.  NULL means no background
-				 * or border. */
-    int borderWidth;		/* Width of 3-D border (if any). */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED etc. */
-    int highlightWidth;		/* Width in pixels of highlight to draw
-				 * around widget when it has the focus.
-				 * 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
-				/* Color for drawing traversal highlight
-				 * area when highlight is off. */
-    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
-    int width;			/* Width to request for window.  <= 0 means
-				 * don't request any size. */
-    int height;			/* Height to request for window.  <= 0 means
-				 * don't request any size. */
-    Tk_Cursor cursor;		/* Current cursor for window, or None. */
-    char *takeFocus;		/* Value of -takefocus option;  not used in
-				 * the C code, but used by keyboard traversal
-				 * scripts.  Malloc'ed, but may be NULL. */
-    int isContainer;		/* 1 means this window is a container, 0 means
-				 * that it isn't. */
-    char *useThis;		/* If the window is embedded, this points to
-				 * the name of the window in which it is
-				 * embedded (malloc'ed).  For non-embedded
-				 * windows this is NULL. */
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-
-    /* Textbox-specific fields */
-    TreeView *viewPtr;
-    int x, y;			/* Position of window. */
-
-    int active;			/* Indicates that the frame is active. */
-    int exportSelection;
-
-    int insertPos;		/* Position of the cursor within the
-				 * array of bytes of the entry's label. */
-
-    int cursorX, cursorY;	/* Position of the insertion cursor in the
-				 * textbox window. */
-    short int cursorWidth;	/* Size of the insertion cursor symbol. */
-    short int cursorHeight;
-
-    int selAnchor;		/* Fixed end of selection. Used to extend
-				 * the selection while maintaining the
-				 * other end of the selection. */
-    int selFirst;		/* Position of the first character in the
-				 * selection. */
-    int selLast;		/* Position of the last character in the
-				 * selection. */
-
-    int cursorOn;		/* Indicates if the cursor is displayed. */
-    int onTime, offTime;	/* Time in milliseconds to wait before
-				 * changing the cursor from off-to-on
-				 * and on-to-off. Setting offTime to 0 makes
-				 * the cursor steady. */
-    Tcl_TimerToken timerToken;	/* Handle for a timer event called periodically
-				 * to blink the cursor. */
-    /* Data-specific fields. */
-    TreeViewEntry *entryPtr;	/* Selected entry */
-    TreeViewColumn *columnPtr;	/* Column of entry to be edited */
-    TreeViewStyle *stylePtr;
-    TreeViewIcon icon;
-    int gap;
-    char *string;
-    TextLayout *textPtr;
-    Blt_Font font;
-    GC gc;
-
-    Tk_3DBorder selBorder;
-    int selRelief;
-    int selBW;
-    XColor *selFgColor;		/* Text color of a selected entry. */
-    int buttonBW;
-    Tk_3DBorder buttonBorder;
-    int buttonRelief;
-} Textbox;
-
-#define DEF_TEXTBOX_BACKGROUND		RGB_WHITE
-#define DEF_TEXTBOX_BORDERWIDTH	STD_BORDERWIDTH
-#ifdef WIN32
-#define DEF_TEXTBOX_BUTTON_BACKGROUND  RGB_GREY85
-#else
-#define DEF_TEXTBOX_BUTTON_BACKGROUND  RGB_GREY90
-#endif
-#define DEF_TEXTBOX_BUTTON_BORDERWIDTH	"2"
-#define DEF_TEXTBOX_BUTTON_RELIEF	"raised"
-#define DEF_TEXTBOX_CURSOR		(char *)NULL
-#define DEF_TEXTBOX_EXPORT_SELECTION	"no"
-#define DEF_TEXTBOX_NORMAL_BACKGROUND 	STD_NORMAL_BACKGROUND
-#define DEF_TEXTBOX_NORMAL_FG_MONO	STD_ACTIVE_FG_MONO
-#define DEF_TEXTBOX_RELIEF		"solid"
-#define DEF_TEXTBOX_SELECT_BACKGROUND 	RGB_LIGHTBLUE0
-#define DEF_TEXTBOX_SELECT_BG_MONO  	STD_SELECT_BG_MONO
-#define DEF_TEXTBOX_SELECT_BORDERWIDTH "1"
-#define DEF_TEXTBOX_SELECT_FOREGROUND 	STD_SELECT_FOREGROUND
-#define DEF_TEXTBOX_SELECT_FG_MONO  	STD_SELECT_FG_MONO
-#define DEF_TEXTBOX_SELECT_RELIEF	"flat"
-
-/* Textbox Procedures */
-static Blt_ConfigSpec textboxConfigSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_TEXTBOX_BACKGROUND, Blt_Offset(Textbox, border), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0,0},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_TEXTBOX_CURSOR, Blt_Offset(Textbox, cursor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_TEXTBOX_BORDERWIDTH, Blt_Offset(Textbox, borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BORDER, "-buttonbackground", "buttonBackground", 
-	"ButtonBackground", DEF_TEXTBOX_BUTTON_BACKGROUND,
-	Blt_Offset(Textbox, buttonBorder), 0},
-    {BLT_CONFIG_RELIEF, "-buttonrelief", "buttonRelief", "ButtonRelief",
-	DEF_TEXTBOX_BUTTON_RELIEF, Blt_Offset(Textbox, buttonRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-buttonborderwidth", "buttonBorderWidth", 
-	"ButtonBorderWidth", DEF_TEXTBOX_BUTTON_BORDERWIDTH, 
-	Blt_Offset(Textbox, buttonBW),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BOOLEAN, "-exportselection", "exportSelection",
-	"ExportSelection", DEF_TEXTBOX_EXPORT_SELECTION, 
-	Blt_Offset(Textbox, exportSelection), 
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_TEXTBOX_RELIEF, 
-	Blt_Offset(Textbox, relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BORDER, "-selectbackground", "selectBackground", "Background",
-	DEF_TEXTBOX_SELECT_BG_MONO, Blt_Offset(Textbox, selBorder),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_BORDER, "-selectbackground", "selectBackground", "Background",
-	DEF_TEXTBOX_SELECT_BACKGROUND, Blt_Offset(Textbox, selBorder),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", 
-        "BorderWidth", DEF_TEXTBOX_SELECT_BORDERWIDTH, 
-	Blt_Offset(Textbox, selBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-
-	DEF_TEXTBOX_SELECT_FG_MONO, Blt_Offset(Textbox, selFgColor),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Foreground",
-	DEF_TEXTBOX_SELECT_FOREGROUND, Blt_Offset(Textbox, selFgColor),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_RELIEF, "-selectrelief", "selectRelief", "Relief",
-	DEF_TEXTBOX_SELECT_RELIEF, Blt_Offset(Textbox, selRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-static Tk_LostSelProc TextboxLostSelectionProc;
-static Tk_SelectionProc TextboxSelectionProc;
-static Tk_EventProc TextboxEventProc;
-
-typedef int (TextboxCmdProc)(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedraw --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedraw(Textbox *tbPtr)
-{
-    if ((tbPtr->tkwin != NULL) && 
-	((tbPtr->flags & TEXTBOX_REDRAW) == 0)) {
-	tbPtr->flags |= TEXTBOX_REDRAW;
-	Tcl_DoWhenIdle(DisplayTextbox, tbPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BlinkCursorProc --
- *
- *	This procedure is called as a timer handler to blink the
- *	insertion cursor off and on.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The cursor gets turned on or off, redisplay gets invoked,
- *	and this procedure reschedules itself.
- *
- *---------------------------------------------------------------------------
- */
-static void
-BlinkCursorProc(ClientData clientData)
-{
-    Textbox *tbPtr = clientData;
-    int interval;
-
-    if (!(tbPtr->flags & TEXTBOX_FOCUS) || (tbPtr->offTime == 0)) {
-	return;
-    }
-    if (tbPtr->active) {
-	tbPtr->cursorOn ^= 1;
-	interval = (tbPtr->cursorOn) ? tbPtr->onTime : tbPtr->offTime;
-	tbPtr->timerToken = 
-	    Tcl_CreateTimerHandler(interval, BlinkCursorProc, tbPtr);
-	EventuallyRedraw(tbPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextboxEventProc --
- *
- * 	This procedure is invoked by the Tk dispatcher for various
- * 	events on treeview widgets.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TextboxEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Textbox *tbPtr = clientData;
-
-    if (eventPtr->type == Expose) {
-	if (eventPtr->xexpose.count == 0) {
-	    EventuallyRedraw(tbPtr);
-	}
-    } else if (eventPtr->type == ConfigureNotify) {
-	EventuallyRedraw(tbPtr);
-    } else if ((eventPtr->type == FocusIn) || (eventPtr->type == FocusOut)) {
-	if (eventPtr->xfocus.detail == NotifyInferior) {
-	    return;
-	}
-	if (eventPtr->type == FocusIn) {
-	    tbPtr->flags |= TEXTBOX_FOCUS;
-	} else {
-	    tbPtr->flags &= ~TEXTBOX_FOCUS;
-	}
-	Tcl_DeleteTimerHandler(tbPtr->timerToken);
-	if ((tbPtr->active) && (tbPtr->flags & TEXTBOX_FOCUS)) {
-	    tbPtr->cursorOn = TRUE;
-	    if (tbPtr->offTime != 0) {
-		tbPtr->timerToken = Tcl_CreateTimerHandler(tbPtr->onTime, 
-		   BlinkCursorProc, tbPtr);
-	    }
-	} else {
-	    tbPtr->cursorOn = FALSE;
-	    tbPtr->timerToken = (Tcl_TimerToken) NULL;
-	}
-	EventuallyRedraw(tbPtr);
-    } else if (eventPtr->type == DestroyNotify) {
-	if (tbPtr->tkwin != NULL) {
-	    tbPtr->tkwin = NULL;
-	}
-	if (tbPtr->flags & TEXTBOX_REDRAW) {
-	    Tcl_CancelIdleCall(DisplayTextbox, tbPtr);
-	}
-	if (tbPtr->timerToken != NULL) {
-	    Tcl_DeleteTimerHandler(tbPtr->timerToken);
-	}
-	tbPtr->viewPtr->comboWin = NULL;
-	Tcl_EventuallyFree(tbPtr, DestroyTextbox);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextboxLostSelectionProc --
- *
- *	This procedure is called back by Tk when the selection is
- *	grabbed away from a Text widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The existing selection is unhighlighted, and the window is
- *	marked as not containing a selection.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TextboxLostSelectionProc(ClientData clientData)
-{
-    Textbox *tbPtr = clientData;
-
-    if ((tbPtr->selFirst >= 0) && (tbPtr->exportSelection)) {
-	tbPtr->selFirst = tbPtr->selLast = -1;
-	EventuallyRedraw(tbPtr);
-    }
-}
-
-static int
-PointerToIndex(Textbox *tbPtr, int x, int y)
-{
-    TextLayout *textPtr;
-    Blt_FontMetrics fontMetrics;
-    TextFragment *fragPtr;
-    int nBytes;
-    int i;
-    int total;
-
-    if ((tbPtr->string == NULL) || (tbPtr->string[0] == '\0')) {
-	return 0;
-    }
-    x -= tbPtr->selBW;
-    y -= tbPtr->selBW;
-
-    textPtr = tbPtr->textPtr;
-
-    /* Bound the y-coordinate within the window. */
-    if (y < 0) {
-	y = 0;
-    } else if (y >= textPtr->height) {
-	y = textPtr->height - 1;
-    }
-    /* 
-     * Compute the line that contains the y-coordinate. 
-     *
-     * FIXME: This assumes that segments are distributed 
-     *	     line-by-line.  This may change in the future.
-     */
-    Blt_GetFontMetrics(tbPtr->font, &fontMetrics);
-    fragPtr = textPtr->fragments;
-    total = 0;
-    for (i = (y / fontMetrics.linespace); i > 0; i--) {
-	total += fragPtr->count;
-	fragPtr++;
-    }
-    if (x < 0) {
-	nBytes = 0;
-    } else if (x >= textPtr->width) {
-	nBytes = fragPtr->count;
-    } else {
-	int newX;
-
-	/* Find the character underneath the pointer. */
-	nBytes = Blt_MeasureChars(tbPtr->font, fragPtr->text, fragPtr->count, 
-		 x, 0, &newX);
-	if ((newX < x) && (nBytes < fragPtr->count)) {
-	    double fract;
-	    int length, charSize;
-	    const char *next;
-
-	    next = fragPtr->text + nBytes;
-#if HAVE_UTF
-	    {
-		Tcl_UniChar dummy;
-
-		length = Tcl_UtfToUniChar(next, &dummy);
-	    }
-#else
-	    length = 1;
-#endif
-	    charSize = Blt_TextWidth(tbPtr->font, next, length);
-	    fract = ((double)(x - newX) / (double)charSize);
-	    if (ROUND(fract)) {
-		nBytes += length;
-	    }
-	}
-    }
-    return nBytes + total;
-}
-
-static int
-IndexToPointer(Textbox *tbPtr)
-{
-    int x, y;
-    int maxLines;
-    TextLayout *textPtr;
-    Blt_FontMetrics fontMetrics;
-    int nBytes;
-    int sum;
-    TextFragment *fragPtr;
-    int i;
-
-    textPtr = tbPtr->textPtr;
-    Blt_GetFontMetrics(tbPtr->font, &fontMetrics);
-    maxLines = (textPtr->height / fontMetrics.linespace) - 1;
-
-    sum = 0;
-    x = y = tbPtr->borderWidth;
-    if (tbPtr->icon != NULL) {
-	x += TreeView_IconWidth(tbPtr->icon) + 2 * tbPtr->gap;
-    }
-    fragPtr = textPtr->fragments;
-    for (i = 0; i <= maxLines; i++) {
-	/* Total the number of bytes on each line.  Include newlines. */
-	nBytes = fragPtr->count + 1;
-	if ((sum + nBytes) > tbPtr->insertPos) {
-	    x += Blt_TextWidth(tbPtr->font, fragPtr->text, 
-		tbPtr->insertPos - sum);
-	    break;
-	}
-	y += fontMetrics.linespace;
-	sum += nBytes;
-	fragPtr++;
-    }
-    tbPtr->cursorX = x;
-    tbPtr->cursorY = y;
-    tbPtr->cursorHeight = fontMetrics.linespace;
-    tbPtr->cursorWidth = 3;
-    return TCL_OK;
-}
-
-static void
-UpdateLayout(Textbox *tbPtr)
-{
-    TreeView *viewPtr;
-    TextStyle ts;
-    int width, height;
-    TextLayout *textPtr;
-    int gap, offset;
-    int iw, ih;
-
-    viewPtr = tbPtr->viewPtr;
-    offset = gap = iw = ih = 0;
-    if (tbPtr->icon != NULL) {
-	iw = TreeView_IconWidth(tbPtr->icon) + 4;
-	ih = TreeView_IconHeight(tbPtr->icon);
-	gap = tbPtr->gap;
-    }
-
-    /* The layout is based upon the current font. */
-    Blt_Ts_InitStyle(ts);
-    Blt_Ts_SetFont(ts, tbPtr->font);
-    textPtr = Blt_Ts_CreateLayout(tbPtr->string, -1, &ts);
-    if (tbPtr->textPtr != NULL) {
-	Blt_Free(tbPtr->textPtr);
-    }
-    tbPtr->textPtr = textPtr;
-
-    width = iw + textPtr->width + gap * 2;
-    height = MAX(ih, textPtr->height);
-    if ((tbPtr->columnPtr == &viewPtr->treeColumn) && (!viewPtr->flatView)) {
-	int level;
-	
-	level = DEPTH(viewPtr, tbPtr->entryPtr->node);
-	offset = -(ICONWIDTH(level) + 2);
-    }
-
-    if (width <= (tbPtr->columnPtr->width + offset)) {
-	width = (tbPtr->columnPtr->width + offset);
-    } 
-    if (height < tbPtr->entryPtr->height) {
-	height = tbPtr->entryPtr->height;
-    }
-    tbPtr->width = width + (2 * tbPtr->borderWidth);
-    tbPtr->height = height + (2 * tbPtr->borderWidth);
-    IndexToPointer(tbPtr);
-    Tk_MoveResizeWindow(tbPtr->tkwin, tbPtr->x, tbPtr->y, 
-	      tbPtr->width, tbPtr->height);
-    Tk_MapWindow(tbPtr->tkwin);
-    XRaiseWindow(tbPtr->display, Tk_WindowId(tbPtr->tkwin));
-}
-
-static void
-InsertText(Textbox *tbPtr, char *insertText, int insertPos, int nBytes)
-{
-    int oldSize, newSize;
-    char *oldText, *newText;
-
-    oldText = tbPtr->string;
-    oldSize = (int)strlen(oldText);
-    newSize = oldSize + nBytes + 1;
-    newText = Blt_AssertMalloc(sizeof(char) * newSize);
-    if (insertPos == oldSize) {	/* Append */
-	sprintf_s(newText, newSize, "%s%s", oldText, insertText);
-    } else if (insertPos == 0) {/* Prepend */
-	sprintf_s(newText, newSize, "%s%s", insertText, oldText);
-    } else {			/* Insert into existing. */
-	sprintf_s(newText, newSize, "%.*s%s%s", insertPos, oldText, insertText,
-		oldText + insertPos);
-    }
-
-    /* 
-     * All indices from the start of the insertion to the end of the
-     * string need to be updated.  Simply move the indices down by the
-     * number of characters added.  
-     */
-    if (tbPtr->selFirst >= insertPos) {
-	tbPtr->selFirst += nBytes;
-    }
-    if (tbPtr->selLast > insertPos) {
-	tbPtr->selLast += nBytes;
-    }
-    if ((tbPtr->selAnchor > insertPos) || (tbPtr->selFirst >= insertPos)) {
-	tbPtr->selAnchor += nBytes;
-    }
-    if (tbPtr->string != NULL) {
-	Blt_Free(tbPtr->string);
-    }
-    tbPtr->string = newText;
-    tbPtr->insertPos = insertPos + nBytes;
-    UpdateLayout(tbPtr);
-}
-
-static int
-DeleteText(Textbox *tbPtr, int firstPos, int lastPos)
-{
-    char *oldText, *newText;
-    int oldSize, newSize;
-    int nBytes;
-    char *p;
-
-    oldText = tbPtr->string;
-    if (firstPos > lastPos) {
-	return TCL_OK;
-    }
-    lastPos++;			/* Now is the position after the last
-				 * character. */
-
-    nBytes = lastPos - firstPos;
-    oldSize = strlen(oldText) + 1;
-    newSize = oldSize - nBytes + 1;
-    newText = Blt_AssertMalloc(sizeof(char) * newSize);
-    p = newText;
-    if (firstPos > 0) {
-	strncpy(p, oldText, firstPos);
-	p += firstPos;
-    }
-    *p = '\0';
-    if (lastPos < oldSize) {
-	strcpy(p, oldText + lastPos);
-    }
-    Blt_Free(oldText);
-
-    /*
-     * Since deleting characters compacts the character array, we need to
-     * update the various character indices according.  It depends where
-     * the index occurs in relation to range of deleted characters:
-     *
-     *	 before		Ignore.
-     *   within		Move the index back to the start of the deletion.
-     *	 after		Subtract off the deleted number of characters,
-     *			since the array has been compressed by that
-     *			many characters.
-     *
-     */
-    if (tbPtr->selFirst >= firstPos) {
-	if (tbPtr->selFirst >= lastPos) {
-	    tbPtr->selFirst -= nBytes;
-	} else {
-	    tbPtr->selFirst = firstPos;
-	}
-    }
-    if (tbPtr->selLast >= firstPos) {
-	if (tbPtr->selLast >= lastPos) {
-	    tbPtr->selLast -= nBytes;
-	} else {
-	    tbPtr->selLast = firstPos;
-	}
-    }
-    if (tbPtr->selLast <= tbPtr->selFirst) {
-	tbPtr->selFirst = tbPtr->selLast = -1; /* Cut away the entire
-						    * selection. */ 
-    }
-    if (tbPtr->selAnchor >= firstPos) {
-	if (tbPtr->selAnchor >= lastPos) {
-	    tbPtr->selAnchor -= nBytes;
-	} else {
-	    tbPtr->selAnchor = firstPos;
-	}
-    }
-    if (tbPtr->insertPos >= firstPos) {
-	if (tbPtr->insertPos >= lastPos) {
-	    tbPtr->insertPos -= nBytes;
-	} else {
-	    tbPtr->insertPos = firstPos;
-	}
-    }
-    tbPtr->string = newText;
-    UpdateLayout(tbPtr);
-    EventuallyRedraw(tbPtr);
-    return TCL_OK;
-}
-
-static int
-AcquireText(TreeView *viewPtr, Textbox *tbPtr, TreeViewEntry *entryPtr, 
-	    TreeViewColumn *columnPtr)
-{
-    TreeViewStyle *stylePtr;
-    int x, y;
-    const char *string;
-    TreeViewIcon icon;
-
-    if (columnPtr == &viewPtr->treeColumn) {
-	int level;
-
-	level = DEPTH(viewPtr, entryPtr->node);
-	x = SCREENX(viewPtr, entryPtr->worldX);
-	y = SCREENY(viewPtr, entryPtr->worldY);
-#ifdef notdef
-	x += ICONWIDTH(level) + ICONWIDTH(level + 1) + 4;
-#endif
-	if (!viewPtr->flatView) {
-	    x += ICONWIDTH(level);
-	}
-	string = GETLABEL(entryPtr);
-	stylePtr = columnPtr->stylePtr;
-	icon = Blt_TreeView_GetEntryIcon(viewPtr, entryPtr);
-    } else {
-	TreeViewValue *valuePtr;
-
-	x = SCREENX(viewPtr, columnPtr->worldX);
-	y = SCREENY(viewPtr, entryPtr->worldY);
-	stylePtr = columnPtr->stylePtr;
-	valuePtr = Blt_TreeView_FindValue(entryPtr, columnPtr);
-	string = valuePtr->string;
-	if (valuePtr->stylePtr != NULL) {
-	    stylePtr = valuePtr->stylePtr;
-	}
-	icon = stylePtr->icon;
-    }
-    if (tbPtr->textPtr != NULL) {
-	Blt_Free(tbPtr->textPtr);
-	tbPtr->textPtr = NULL;
-    }
-    if (tbPtr->string != NULL) {
-	Blt_Free(tbPtr->string);
-    }
-    if (string == NULL) {
-	string = "";
-    }
-    tbPtr->icon = icon;
-    tbPtr->entryPtr = entryPtr;
-    tbPtr->columnPtr = columnPtr;
-    tbPtr->x = x - tbPtr->borderWidth;
-    tbPtr->y = y - tbPtr->borderWidth;
-    
-    tbPtr->gap = stylePtr->gap;
-    tbPtr->string = Blt_AssertStrdup(string);
-    tbPtr->gc = Blt_TreeView_GetStyleGC(stylePtr);
-    tbPtr->font = Blt_TreeView_GetStyleFont(viewPtr, stylePtr);
-    tbPtr->selFirst = tbPtr->selLast = -1;
-    UpdateLayout(tbPtr);
-    Tk_MapWindow(tbPtr->tkwin);
-    EventuallyRedraw(tbPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetIndexFromObj --
- *
- *	Parse an index into an entry and return either its value
- *	or an error.
- *
- * Results:
- *	A standard TCL result.  If all went well, then *indexPtr is
- *	filled in with the character index (into entryPtr) corresponding to
- *	string.  The index value is guaranteed to lie between 0 and
- *	the number of characters in the string, inclusive.  If an
- *	error occurs then an error message is left in the interp's result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetIndexFromObj(Tcl_Interp *interp, Textbox *tbPtr, Tcl_Obj *objPtr, 
-		int *indexPtr)
-{
-    int textPos;
-    char c;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if ((tbPtr->string == NULL) || (tbPtr->string[0] == '\0')) {
-	*indexPtr = 0;
-	return TCL_OK;
-    }
-    c = string[0];
-    if ((c == 'a') && (strcmp(string, "anchor") == 0)) {
-	textPos = tbPtr->selAnchor;
-    } else if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	textPos = strlen(tbPtr->string);
-    } else if ((c == 'i') && (strcmp(string, "insert") == 0)) {
-	textPos = tbPtr->insertPos;
-    } else if ((c == 'n') && (strcmp(string, "next") == 0)) {
-	textPos = tbPtr->insertPos;
-	if (textPos < (int)strlen(tbPtr->string)) {
-	    textPos++;
-	}
-    } else if ((c == 'l') && (strcmp(string, "last") == 0)) {
-	textPos = tbPtr->insertPos;
-	if (textPos > 0) {
-	    textPos--;
-	}
-    } else if ((c == 's') && (strcmp(string, "sel.first") == 0)) {
-	if (tbPtr->selFirst < 0) {
-	    textPos = -1;
-	} else {
-	    textPos = tbPtr->selFirst;
-	}
-    } else if ((c == 's') && (strcmp(string, "sel.last") == 0)) {
-	if (tbPtr->selLast < 0) {
-	    textPos = -1;
-	} else {
-	    textPos = tbPtr->selLast;
-	}
-    } else if (c == '@') {
-	int x, y;
-
-	if (Blt_GetXY(interp, tbPtr->tkwin, string, &x, &y) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	textPos = PointerToIndex(tbPtr, x, y);
-    } else if (isdigit((int)c)) {
-	int number;
-	int maxChars;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &number) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	/* Don't allow the index to point outside the label. */
-	maxChars = Tcl_NumUtfChars(tbPtr->string, -1);
-	if (number < 0) {
-	    textPos = 0;
-	} else if (number > maxChars) {
-	    textPos = strlen(tbPtr->string);
-	} else {
-	    textPos = Tcl_UtfAtIndex(tbPtr->string, number) - tbPtr->string;
-	}
-    } else {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "bad label index \"", string, "\"",
-			     (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *indexPtr = textPos;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SelectText --
- *
- *	Modify the selection by moving its un-anchored end.  This
- *	could make the selection either larger or smaller.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The selection changes.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SelectText(Textbox *tbPtr, int textPos)
-{
-    int selFirst, selLast;
-
-    /*
-     * Grab the selection if we don't own it already.
-     */
-    if ((tbPtr->exportSelection) && (tbPtr->selFirst == -1)) {
-	Tk_OwnSelection(tbPtr->tkwin, XA_PRIMARY, 
-			TextboxLostSelectionProc, tbPtr);
-    }
-    /*  If the anchor hasn't been set yet, assume the beginning of the text*/
-    if (tbPtr->selAnchor < 0) {
-	tbPtr->selAnchor = 0;
-    }
-    if (tbPtr->selAnchor <= textPos) {
-	selFirst = tbPtr->selAnchor;
-	selLast = textPos;
-    } else {
-	selFirst = textPos;
-	selLast = tbPtr->selAnchor;
-    }
-    if ((tbPtr->selFirst != selFirst) || (tbPtr->selLast != selLast)) {
-	tbPtr->selFirst = selFirst;
-	tbPtr->selLast = selLast;
-	EventuallyRedraw(tbPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextboxSelectionProc --
- *
- *	This procedure is called back by Tk when the selection is
- *	requested by someone.  It returns part or all of the selection
- *	in a buffer provided by the caller.
- *
- * Results:
- *	The return value is the number of non-NULL bytes stored at
- *	buffer.  Buffer is filled (or partially filled) with a
- *	NUL-terminated string containing part or all of the
- *	selection, as given by offset and maxBytes.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-TextboxSelectionProc(
-    ClientData clientData,	/* Information about the widget. */
-    int offset,			/* Offset within selection of first
-				 * character to be returned. */
-    char *buffer,		/* Location in which to place
-				 * selection. */
-    int maxBytes)		/* Maximum number of bytes to place
-				 * at buffer, not including terminating
-				 * NULL character. */
-{
-    Textbox *tbPtr = clientData;
-    int size;
-
-    size = (int)strlen(tbPtr->string + offset);
-    /*
-     * Return the string currently in the textbox.
-     */
-    strncpy(buffer, tbPtr->string + offset, maxBytes);
-    buffer[maxBytes] = '\0';
-    return (size > maxBytes) ? maxBytes : size;
-}
-
-
-static void
-DestroyTextbox(DestroyData data)
-{
-    Textbox *tbPtr = (Textbox *)data;
-
-    Blt_FreeOptions(textboxConfigSpecs, (char *)tbPtr, 
-	tbPtr->display, 0);
-
-    if (tbPtr->string != NULL) {
-	Blt_Free(tbPtr->string);
-    }
-    if (tbPtr->textPtr != NULL) {
-	Blt_Free(tbPtr->textPtr);
-    }
-    if (tbPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tbPtr->timerToken);
-    }
-    if (tbPtr->tkwin != NULL) {
-	Tk_DeleteSelHandler(tbPtr->tkwin, XA_PRIMARY, XA_STRING);
-    }
-    Blt_Free(tbPtr);
-}
-
-static void
-ConfigureTextbox(Textbox *tbPtr)
-{
-#ifdef notdef
-    GC newGC;
-    Textbox *tbPtr = viewPtr->tbPtr;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    /*
-     * GC for edit window.
-     */
-    gcMask = 0;
-    newGC = Tk_GetGC(tbPtr->tkwin, gcMask, &gcValues);
-    if (tbPtr->gc != NULL) {
-	Tk_FreeGC(tbPtr->display, tbPtr->gc);
-    }
-    tbPtr->gc = newGC;
-    tbPtr->width = tbPtr->textPtr->width + 
-	2 * (tbPtr->borderWidth + tbPtr->highlightWidth);
-    tbPtr->height = tbPtr->textPtr->height + 
-	2 * (tbPtr->borderWidth + tbPtr->highlightWidth);
-    
-    if (Tk_IsMapped(tbPtr->tkwin)) {
-	if ((tbPtr->height != Tk_Height(tbPtr->tkwin)) ||
-	    (tbPtr->width != Tk_Width(tbPtr->tkwin))) {
-	    Tk_ResizeWindow(tbPtr->tkwin, tbPtr->width, tbPtr->height);
-	}
-    }
-#endif
-}
-
-int
-Blt_TreeView_CreateTextbox(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-			   TreeViewColumn *columnPtr)
-{
-    Tk_Window tkwin;
-    Textbox *tbPtr;
-
-    if (viewPtr->comboWin != NULL) {
-	Tk_DestroyWindow(viewPtr->comboWin);
-    }
-    tkwin = Tk_CreateWindow(viewPtr->interp, viewPtr->tkwin, "edit", 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-
-    Tk_MakeWindowExist(tkwin);
-
-    Tk_SetClass(tkwin, "TreeViewEditor"); 
-
-    tbPtr = Blt_AssertCalloc(1, sizeof(Textbox));
-
-    tbPtr->interp = viewPtr->interp;
-    tbPtr->display = Tk_Display(tkwin);
-    tbPtr->tkwin = tkwin;
-    tbPtr->borderWidth = 1;
-    tbPtr->relief = TK_RELIEF_SOLID;
-    tbPtr->selRelief = TK_RELIEF_FLAT;
-    tbPtr->selBW = 1;
-    tbPtr->selAnchor = -1;
-    tbPtr->selFirst = tbPtr->selLast = -1;
-    tbPtr->onTime = 600;
-    tbPtr->active = TRUE;
-    tbPtr->offTime = 300;
-    tbPtr->viewPtr = viewPtr;
-    tbPtr->buttonRelief = TK_RELIEF_SUNKEN;
-    tbPtr->buttonBW = 1;
-    viewPtr->comboWin = tkwin;
-    Blt_SetWindowInstanceData(tkwin, tbPtr);
-    Tk_CreateSelHandler(tkwin, XA_PRIMARY, XA_STRING, 
-	TextboxSelectionProc, tbPtr, XA_STRING);
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask |
-	FocusChangeMask, TextboxEventProc, tbPtr);
-    Tcl_CreateObjCommand(viewPtr->interp, Tk_PathName(tkwin), 
-	TextboxCmd, tbPtr, NULL);
-    if (Blt_ConfigureWidgetFromObj(viewPtr->interp, tkwin, textboxConfigSpecs, 0, 
-	(Tcl_Obj **)NULL, (char *)tbPtr, 0) != TCL_OK) {
-	Tk_DestroyWindow(tkwin);
-	return TCL_ERROR;
-    }
-    AcquireText(viewPtr, tbPtr, entryPtr, columnPtr);
-    tbPtr->insertPos = strlen(tbPtr->string);
-    
-    Tk_MoveResizeWindow(tkwin, tbPtr->x, tbPtr->y, tbPtr->width, tbPtr->height);
-    Tk_MapWindow(tkwin);
-    Tk_MakeWindowExist(tkwin);
-    XRaiseWindow(tbPtr->display, Tk_WindowId(tkwin));
-    EventuallyRedraw(tbPtr);
-    return TCL_OK;
-}
-
-static void
-DisplayTextbox(ClientData clientData)
-{
-    Textbox *tbPtr = clientData;
-    Pixmap drawable;
-    int i;
-    int x1, x2;
-    int count, nChars;
-    int selStart, selEnd, selLength;
-    int x, y;
-    TextFragment *fragPtr;
-    Blt_FontMetrics fontMetrics;
-#ifdef notdef
-    int buttonX, buttonY, buttonWidth, buttonHeight;
-#endif
-    tbPtr->flags &= ~TEXTBOX_REDRAW;
-    if (!Tk_IsMapped(tbPtr->tkwin)) {
-	return;
-    }
-    if (tbPtr->columnPtr == NULL) {
-	return;
-    }
-    drawable = Tk_GetPixmap(tbPtr->display, Tk_WindowId(tbPtr->tkwin), 
-	Tk_Width(tbPtr->tkwin), Tk_Height(tbPtr->tkwin), 
-	Tk_Depth(tbPtr->tkwin));
-
-    Blt_Fill3DRectangle(tbPtr->tkwin, drawable, tbPtr->border, 0, 0,
-	Tk_Width(tbPtr->tkwin), Tk_Height(tbPtr->tkwin), 
-	tbPtr->borderWidth, tbPtr->relief);
-
-    x = tbPtr->borderWidth + tbPtr->gap;
-    y = tbPtr->borderWidth;
-
-#ifdef notdef
-    buttonX = Tk_Width(tbPtr->tkwin) - 
-	(tbPtr->borderWidth + tbPtr->gap + 1);
-    buttonY = tbPtr->borderWidth + 1;
-#endif
-
-    if (tbPtr->icon != NULL) {
-	y += (tbPtr->height - TreeView_IconHeight(tbPtr->icon)) / 2;
-	Tk_RedrawImage(TreeView_IconBits(tbPtr->icon), 0, 0, 
-		       TreeView_IconWidth(tbPtr->icon), 
-		       TreeView_IconHeight(tbPtr->icon), 
-		       drawable, x, y);
-	x += TreeView_IconWidth(tbPtr->icon) + tbPtr->gap;
-    }
-    
-    Blt_GetFontMetrics(tbPtr->font, &fontMetrics);
-    fragPtr = tbPtr->textPtr->fragments;
-    count = 0;
-    y = tbPtr->borderWidth;
-    if (tbPtr->height > fontMetrics.linespace) {
-	y += (tbPtr->height - fontMetrics.linespace) / 2;
-    }
-    for (i = 0; i < tbPtr->textPtr->nFrags; i++, fragPtr++) {
-	int leftPos, rightPos;
-
-	leftPos = count;
-	count += fragPtr->count;
-	rightPos = count;
-	if ((rightPos < tbPtr->selFirst) || (leftPos > tbPtr->selLast)) {
-	    /* No part of the text fragment is selected. */
-	    Blt_DrawChars(Tk_Display(tbPtr->tkwin), drawable, tbPtr->gc, 
-		tbPtr->font, Tk_Depth(tbPtr->tkwin), 0.0f, fragPtr->text, 
-		fragPtr->count, x + fragPtr->x, y + fragPtr->y);
-	    continue;
-	}
-
-	/*
-	 *  A text fragment can have up to 3 regions:
-	 *
-	 *	1. Text before the start the selection
-	 *	2. Selected text itself (drawn in a raised border)
-	 *	3. Text following the selection.
-	 */
-
-	selStart = leftPos;
-	selEnd = rightPos;
-	/* First adjust selected region for current line. */
-	if (tbPtr->selFirst > leftPos) {
-	    selStart = tbPtr->selFirst;
-	}
-	if (tbPtr->selLast < rightPos) {
-	    selEnd = tbPtr->selLast;
-	}
-	selLength = (selEnd - selStart);
-	x1 = x;
-
-	if (selStart > leftPos) { /* Normal text preceding the selection */
-	    nChars = (selStart - leftPos);
-	    Blt_MeasureChars(tbPtr->font, tbPtr->string + leftPos,
-		    nChars, 10000, DEF_TEXT_FLAGS, &x1);
-	    x1 += x;
-	}
-	if (selLength > 0) {	/* The selection itself */
-	    int width;
-
-	    Blt_MeasureChars(tbPtr->font, fragPtr->text + selStart, selLength,
-		10000, DEF_TEXT_FLAGS, &x2);
-	    x2 += x;
-	    width = (x2 - x1) + 1;
-	    Blt_Fill3DRectangle(tbPtr->tkwin, drawable, tbPtr->selBorder,
-		x1, y + fragPtr->y - fontMetrics.ascent, 
-	        width, fontMetrics.linespace,
-		tbPtr->selBW, tbPtr->selRelief);
-	}
-	Blt_DrawChars(Tk_Display(tbPtr->tkwin), drawable, tbPtr->gc, 
-		tbPtr->font, Tk_Depth(tbPtr->tkwin), 0.0f, fragPtr->text, 
-		fragPtr->count, fragPtr->x + x, fragPtr->y + y);
-    }
-    if ((tbPtr->flags & TEXTBOX_FOCUS) && (tbPtr->cursorOn)) {
-	int left, top, right, bottom;
-
-	IndexToPointer(tbPtr);
-	left = tbPtr->cursorX + 1;
-	right = left + 1;
-	top = tbPtr->cursorY;
-	if (tbPtr->height > fontMetrics.linespace) {
-	    top += (tbPtr->height - fontMetrics.linespace) / 2;
-	}
-	bottom = top + tbPtr->cursorHeight - 1;
-	XDrawLine(tbPtr->display, drawable, tbPtr->gc, left, top, left,
-		bottom);
-	XDrawLine(tbPtr->display, drawable, tbPtr->gc, left - 1, top, right,
-		top);
-	XDrawLine(tbPtr->display, drawable, tbPtr->gc, left - 1, bottom, 
-		right, bottom);
-    }
-    Blt_Draw3DRectangle(tbPtr->tkwin, drawable, tbPtr->border, 0, 0,
-	Tk_Width(tbPtr->tkwin), Tk_Height(tbPtr->tkwin), 
-	tbPtr->borderWidth, tbPtr->relief);
-    XCopyArea(tbPtr->display, drawable, Tk_WindowId(tbPtr->tkwin),
-	tbPtr->gc, 0, 0, Tk_Width(tbPtr->tkwin), 
-	Tk_Height(tbPtr->tkwin), 0, 0);
-    Tk_FreePixmap(tbPtr->display, drawable);
-}
-
-/*ARGSUSED*/
-static int
-ApplyOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TreeViewEntry *entryPtr;
-    TreeView *viewPtr = tbPtr->viewPtr;
-    TreeViewColumn *columnPtr;
-    int valid;
-    TreeViewStyle *stylePtr;
-    char *newValue;
-
-    entryPtr = tbPtr->entryPtr;
-    valid = TRUE;
-    newValue = tbPtr->string;
-
-    columnPtr = tbPtr->columnPtr;
-    stylePtr = NULL;
-    if (columnPtr != &viewPtr->treeColumn) {
-	TreeViewValue *valuePtr;
-
-	valuePtr = Blt_TreeView_FindValue(tbPtr->entryPtr, columnPtr);
-	if (valuePtr != NULL) {
-	    stylePtr = valuePtr->stylePtr;
-	}
-    }
-    if (stylePtr == NULL) {
-	stylePtr = columnPtr->stylePtr;
-    }
-    if (stylePtr->validateCmd != NULL) {
-	Tcl_DString dString;
-	int result;
-
-	Blt_TreeView_PercentSubst(viewPtr, entryPtr, stylePtr->validateCmd, &dString);
-	Tcl_DStringAppend(&dString, " ", -1);
-	Tcl_DStringAppend(&dString, tbPtr->string, -1);
-	result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-	if (result == TCL_OK) {
-	    newValue = Tcl_GetString(Tcl_GetObjResult(interp));
-	} else {
-	    valid = FALSE;
-	}
-    }
-    if (valid) {
-	if (columnPtr == &viewPtr->treeColumn) {
-	    if (entryPtr->labelUid != NULL) {
-		Blt_TreeView_FreeUid(viewPtr, entryPtr->labelUid);
-	    }
-	    if (newValue == NULL) {
-		entryPtr->labelUid = Blt_TreeView_GetUid(viewPtr, "");
-	    } else {
-		entryPtr->labelUid = Blt_TreeView_GetUid(viewPtr, newValue);
-	    }
-	} else {
-	    Tcl_Obj *objPtr;
-	    
-	    objPtr = Tcl_NewStringObj(newValue, -1);
-	    if (Blt_Tree_SetValueByKey(interp, viewPtr->tree, entryPtr->node, 
-		columnPtr->key, objPtr) != TCL_OK) {
-		Tcl_DecrRefCount(objPtr);
-		return TCL_ERROR;
-	    }
-	    entryPtr->flags |= ENTRY_DIRTY;
-	}	
-    }
-    if (viewPtr != NULL) {
-	Blt_TreeView_ConfigureEntry(viewPtr, entryPtr, 0, NULL, BLT_CONFIG_OBJV_ONLY);
-	viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-    }
-    Tk_DestroyWindow(tbPtr->tkwin);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-CancelOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tk_DestroyWindow(tbPtr->tkwin);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CgetOp --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CgetOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    return Blt_ConfigureValueFromObj(interp, tbPtr->tkwin, 
-	textboxConfigSpecs, (char *)tbPtr, objv[2], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- * 	This procedure is called to process a list of configuration
- *	options database, in order to reconfigure the one of more
- *	entries in the widget.
- *
- *	  .c configure option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for viewPtr; old resources get freed, if there
- *	were any.  The hypertext is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 2) {
-	return Blt_ConfigureInfoFromObj(interp, tbPtr->tkwin, 
-		textboxConfigSpecs, (char *)tbPtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, tbPtr->tkwin, 
-		textboxConfigSpecs, (char *)tbPtr, objv[3], 0);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, tbPtr->tkwin, 
-	textboxConfigSpecs, objc - 2, objv + 2, (char *)tbPtr, 
-	BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    ConfigureTextbox(tbPtr);
-    EventuallyRedraw(tbPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Remove one or more characters from the label of an entry.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Memory gets freed, the entry gets modified and (eventually)
- *	redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int firstPos, lastPos;
-
-    if (tbPtr->entryPtr == NULL) {
-	return TCL_OK;
-    }
-    if (GetIndexFromObj(interp, tbPtr, objv[2], &firstPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    lastPos = firstPos;
-    if ((objc == 4) && 
-	(GetIndexFromObj(interp, tbPtr, objv[3], &lastPos) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (firstPos > lastPos) {
-	return TCL_OK;
-    }
-    return DeleteText(tbPtr, firstPos, lastPos);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IcursorOp --
- *
- *	Returns the numeric index of the given string. Indices can be
- *	one of the following:
- *
- *	"anchor"	Selection anchor.
- *	"end"		End of the label.
- *	"insert"	Insertion cursor.
- *	"sel.first"	First character selected.
- *	"sel.last"	Last character selected.
- *	@x,y		Index at X-Y screen coordinate.
- *	number		Returns the same number.
- *
- * Results:
- *	A standard TCL result.  If the argument does not represent a
- *	valid label index, then TCL_ERROR is returned and the interpreter
- *	result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IcursorOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int textPos;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[2], &textPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (tbPtr->columnPtr != NULL) {
-	tbPtr->insertPos = textPos;
-	IndexToPointer(tbPtr);
-	EventuallyRedraw(tbPtr);
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Returns the numeric index of the given string. Indices can be
- *	one of the following:
- *
- *	"anchor"	Selection anchor.
- *	"end"		End of the label.
- *	"insert"	Insertion cursor.
- *	"sel.first"	First character selected.
- *	"sel.last"	Last character selected.
- *	@x,y		Index at X-Y screen coordinate.
- *	number		Returns the same number.
- *
- * Results:
- *	A standard TCL result.  If the argument does not represent a
- *	valid label index, then TCL_ERROR is returned and the interpreter
- *	result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-IndexOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int textPos;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[2], &textPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((tbPtr->columnPtr != NULL) && (tbPtr->string != NULL)) {
-	int nChars;
-
-	nChars = Tcl_NumUtfChars(tbPtr->string, textPos);
-	Tcl_SetIntObj(Tcl_GetObjResult(interp), nChars);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InsertOp --
- *
- *	Add new characters to the label of an entry.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	New information gets added to tbPtr;  it will be redisplayed
- *	soon, but not necessarily immediately.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InsertOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int extra;
-    int insertPos;
-    char *string;
-
-    if (tbPtr->entryPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (GetIndexFromObj(interp, tbPtr, objv[2], &insertPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetStringFromObj(objv[3], &extra);
-    if (extra == 0) {	/* Nothing to insert. Move the cursor anyways. */
-	tbPtr->insertPos = insertPos;
-    } else {
-	InsertText(tbPtr, string, insertPos, extra);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SelectionAdjustOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-		  Tcl_Obj *const *objv)
-{
-    int textPos;
-    int half1, half2;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[3], &textPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    half1 = (tbPtr->selFirst + tbPtr->selLast) / 2;
-    half2 = (tbPtr->selFirst + tbPtr->selLast + 1) / 2;
-    if (textPos < half1) {
-	tbPtr->selAnchor = tbPtr->selLast;
-    } else if (textPos > half2) {
-	tbPtr->selAnchor = tbPtr->selFirst;
-    }
-    return SelectText(tbPtr, textPos);
-}
-
-/*ARGSUSED*/
-static int
-SelectionClearOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    if (tbPtr->selFirst != -1) {
-	tbPtr->selFirst = tbPtr->selLast = -1;
-	EventuallyRedraw(tbPtr);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SelectionFromOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    int textPos;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[3], &textPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tbPtr->selAnchor = textPos;
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SelectionPresentOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-		   Tcl_Obj *const *objv)
-{
-    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (tbPtr->selFirst != -1));
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-SelectionRangeOp(Textbox *tbPtr, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    int selFirst, selLast;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[3], &selFirst) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (GetIndexFromObj(interp, tbPtr, objv[4], &selLast) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tbPtr->selAnchor = selFirst;
-    return SelectText(tbPtr, selLast);
-}
-
-/*ARGSUSED*/
-static int
-SelectionToOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    int textPos;
-
-    if (GetIndexFromObj(interp, tbPtr, objv[3], &textPos) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return SelectText(tbPtr, textPos);
-}
-
-
-static Blt_OpSpec selectionOps[] =
-{
-    {"adjust", 1, SelectionAdjustOp, 4, 4, "index",},
-    {"clear", 1, SelectionClearOp, 3, 3, "",},
-    {"from", 1, SelectionFromOp, 4, 4, "index"},
-    {"present", 1, SelectionPresentOp, 3, 3, ""},
-    {"range", 1, SelectionRangeOp, 5, 5, "start end",},
-    {"to", 1, SelectionToOp, 4, 4, "index"},
-};
-
-static int nSelectionOps = sizeof(selectionOps) / sizeof(Blt_OpSpec);
-
-/*
- *	This procedure handles the individual options for text
- *	selections.  The selected text is designated by start and end
- *	indices into the text pool.  The selected segment has both a
- *	anchored and unanchored ends.  The following selection
- *	operations are implemented:
- *
- *	  "adjust"	- resets either the first or last index
- *			  of the selection.
- *	  "clear"	- clears the selection. Sets first/last
- *			  indices to -1.
- *	  "from"	- sets the index of the selection anchor.
- *	  "present"	- return "1" if a selection is available,
- *			  "0" otherwise.
- *	  "range"	- sets the first and last indices.
- *	  "to"		- sets the index of the un-anchored end.
- */
-static int
-SelectionOp(Textbox *tbPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    TextboxCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nSelectionOps, selectionOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (tbPtr, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TextboxCmd --
- *
- *	This procedure handles entry operations.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec comboOps[] =
-{
-    {"apply", 1, ApplyOp, 2, 2, "",},
-    {"cancel", 2, CancelOp, 2, 2, "",},
-    {"cget", 2, CgetOp, 3, 3, "value",},
-    {"configure", 2, ConfigureOp, 2, 0, "?option value...?",},
-    {"delete", 1, DeleteOp, 3, 4, "first ?last?"},
-    {"icursor", 2, IcursorOp, 3, 3, "index"},
-    {"index", 3, IndexOp, 3, 3, "index"},
-    {"insert", 3, InsertOp, 4, 4, "index string"},
-    {"selection", 1, SelectionOp, 2, 0, "args"},
-};
-static int nComboOps = sizeof(comboOps) / sizeof(Blt_OpSpec);
-
-static int
-TextboxCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Textbox *tbPtr = clientData;
-    TextboxCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nComboOps, comboOps, BLT_OP_ARG1, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (tbPtr, interp, objc, objv);
-    return result;
-}
-
-#endif
-
diff --git a/blt3.0/src/bltTvStyle.c b/blt3.0/src/bltTvStyle.c
deleted file mode 100644
index 99302c5..0000000
--- a/blt3.0/src/bltTvStyle.c
+++ /dev/null
@@ -1,2659 +0,0 @@
-
-/*
- * bltTvStyle.c --
- *
- * This module implements styles for treeview widget cells.
- *
- *	Copyright 1998-2008 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_TREEVIEW
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include "bltOp.h"
-#include "bltTreeView.h"
-#include "bltList.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-
-typedef int (TreeViewCmdProc)(TreeView *viewPtr, Tcl_Interp *interp, 
-			      int objc, Tcl_Obj *const *objv);
-
-#define STYLE_GAP		2
-#define ARROW_WIDTH		13
-
-static Blt_OptionParseProc ObjToIcon;
-static Blt_OptionPrintProc IconToObj;
-static Blt_OptionFreeProc FreeIcon;
-
-Blt_CustomOption bltTreeViewIconOption =
-{
-    ObjToIcon, IconToObj, FreeIcon, NULL,
-};
-
-#define DEF_STYLE_HIGHLIGHT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_STYLE_HIGHLIGHT_FOREGROUND	STD_NORMAL_FOREGROUND
-#ifdef WIN32
-#define DEF_STYLE_ACTIVE_BACKGROUND	RGB_GREY85
-#else
-#define DEF_STYLE_ACTIVE_BACKGROUND	RGB_GREY95
-#endif
-#define DEF_STYLE_ACTIVE_FOREGROUND 	STD_ACTIVE_FOREGROUND
-#define DEF_STYLE_GAP			"2"
-
-typedef struct {
-    int refCount;			/* Usage reference count. */
-    unsigned int flags;
-    const char *name;			
-    TreeViewStyleClass *classPtr;	/* Class-specific routines to manage
-					 * style. */
-    Blt_HashEntry *hashPtr;
-    Blt_ChainLink link;
-
-    /* General style fields. */
-    Tk_Cursor cursor;			/* X Cursor */
-    TreeViewIcon icon;			/* If non-NULL, is a Tk_Image to be
-					 * drawn in the cell. */
-    int gap;				/* # pixels gap between icon and
-					 * text. */
-    Blt_Font font;
-    XColor *fgColor;			/* Normal foreground color of cell. */
-    XColor *highlightFgColor;		/* Foreground color of cell when
-					 * highlighted. */
-    XColor *activeFgColor;		/* Foreground color of cell when
-					 * active. */
-    XColor *selFgColor;			/* Foreground color of a selected
-					 * cell. If non-NULL, overrides default
-					 * foreground color specification. */
-    Blt_Background bg;			/* Normal background color of cell. */
-    Blt_Background highlightBg;		/* Background color of cell when
-					 * highlighted. */
-    Blt_Background activeBg;		/* Background color of cell when
-					 * active. */
-    Blt_Background selBg;		/* Background color of a selected
-					 * cell.  If non-NULL, overrides the
-					 * default background color
-					 * specification. */
-    const char *validateCmd;
-
-    /* TextBox-specific fields */
-    GC gc;
-    GC highlightGC;
-    GC activeGC;
-    int side;				/* Position of the text in relation to
-					 * the icon.  */
-    Blt_TreeKey key;			/* Actual data resides in this tree
-					   value. */
-} TreeViewTextBox;
-
-#ifdef WIN32
-#define DEF_TEXTBOX_CURSOR		"arrow"
-#else
-#define DEF_TEXTBOX_CURSOR		"hand2"
-#endif /*WIN32*/
-#define DEF_TEXTBOX_SIDE		"left"
-#define DEF_TEXTBOX_VALIDATE_COMMAND	(char *)NULL
-
-#define TextBoxOffset(x)	Blt_Offset(TreeViewTextBox, x)
-
-static Blt_ConfigSpec textBoxSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"ActiveBackground", DEF_STYLE_ACTIVE_BACKGROUND, 
-	TextBoxOffset(activeBg), 0},
-    {BLT_CONFIG_SYNONYM, "-activebg", "activeBackground", 
-	(char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-activefg", "activeFackground", 
-	(char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_STYLE_ACTIVE_FOREGROUND, 
-	TextBoxOffset(activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	(char *)NULL, TextBoxOffset(bg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", "Cursor", DEF_TEXTBOX_CURSOR, 
-	TextBoxOffset(cursor), 0},
-    {BLT_CONFIG_BITMASK, "-edit", "edit", "Edit", (char *)NULL, 
-	TextBoxOffset(flags), BLT_CONFIG_DONT_SET_DEFAULT,
-	(Blt_CustomOption *)STYLE_EDITABLE},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", (char *)NULL, 
-	TextBoxOffset(font), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", (char *)NULL,
-	TextBoxOffset(fgColor),BLT_CONFIG_NULL_OK },
-    {BLT_CONFIG_PIXELS_NNEG, "-gap", "gap", "Gap", DEF_STYLE_GAP, 
-	TextBoxOffset(gap), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_STYLE_HIGHLIGHT_BACKGROUND, 
-        TextBoxOffset(highlightBg), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-highlightforeground", "highlightForeground", 
-	"HighlightForeground", DEF_STYLE_HIGHLIGHT_FOREGROUND, 
-	TextBoxOffset(highlightFgColor), 0},
-    {BLT_CONFIG_SYNONYM, "-highlightbg", "highlightBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-highlightfg", "highlightForeground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", (char *)NULL, 
-	TextBoxOffset(icon), BLT_CONFIG_NULL_OK, &bltTreeViewIconOption},
-    {BLT_CONFIG_STRING, "-key", "key", "key", 	(char *)NULL, 
-	TextBoxOffset(key), BLT_CONFIG_NULL_OK, 0},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", (char *)NULL, TextBoxOffset(selBg), 0},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	(char *)NULL, TextBoxOffset(selFgColor), 0},
-    {BLT_CONFIG_SIDE, "-side", "side", "side", DEF_TEXTBOX_SIDE, 
-	TextBoxOffset(side), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_STRING, "-validatecommand", "validateCommand", 
-	"ValidateCommand", DEF_TEXTBOX_VALIDATE_COMMAND, 
-	TextBoxOffset(validateCmd), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0}
-};
-
-
-typedef struct {
-    int refCount;			/* Usage reference count. */
-    unsigned int flags;			/* Contains style type and update
-					 * flags. */
-    const char *name;			/* Instance name. */
-    TreeViewStyleClass *classPtr;	/* Class-specific routines to manage
-					 * style. */
-    Blt_HashEntry *hashPtr;	
-    Blt_ChainLink link;
-
-    /* General style fields. */
-    Tk_Cursor cursor;			/* X Cursor */
-    TreeViewIcon icon;			/* If non-NULL, is a Tk_Image to be
-					 * drawn in the cell. */
-    int gap;				/* # pixels gap between icon and
-					 * text. */
-    Blt_Font font;
-    XColor *fgColor;			/* Normal foreground color of cell. */
-    XColor *highlightFgColor;		/* Foreground color of cell when
-					 * highlighted. */
-    XColor *activeFgColor;		/* Foreground color of cell when
-					 * active. */
-    XColor *selFgColor;			/* Foreground color of a selected
-					 * cell. If non-NULL, overrides
-					 * default foreground color
-					 * specification. */
-
-    Blt_Background bg;			/* Normal background color of cell. */
-    Blt_Background highlightBg;		/* Background color of cell when
-					 * highlighted. */
-    Blt_Background activeBg;		/* Background color of cell when
-					 * active. */
-    Blt_Background selBg;		/* Background color of a selected
-					 * cell.  If non-NULL, overrides the
-					 * default background color
-					 * specification. */
-    const char *validateCmd;
-
-    /* Checkbox specific fields. */
-    GC gc;
-    GC highlightGC;
-    GC activeGC;
-    Blt_TreeKey key;			/* Actual data resides in this tree
-					   value. */
-    int size;				/* Size of the checkbox. */
-    int showValue;			/* If non-zero, display the on/off
-					 * value.  */
-    const char *onValue;
-    const char *offValue;
-    int lineWidth;			/* Linewidth of the surrounding
-					 * box. */
-    XColor *boxColor;			/* Rectangle (box) color (grey). */
-    XColor *fillColor;			/* Fill color (white) */
-    XColor *checkColor;			/* Check color (red). */
-
-    TextLayout *onPtr, *offPtr;
-    
-    Blt_Painter painter;
-    Blt_Picture selectedPicture;
-    Blt_Picture normalPicture;
-    Blt_Picture disabledPicture;
-
-} TreeViewCheckBox;
-
-#define DEF_CHECKBOX_BOX_COLOR		(char *)NULL
-#define DEF_CHECKBOX_CHECK_COLOR	"red"
-#define DEF_CHECKBOX_FILL_COLOR		(char *)NULL
-#define DEF_CHECKBOX_OFFVALUE		"0"
-#define DEF_CHECKBOX_ONVALUE		"1"
-#define DEF_CHECKBOX_SHOWVALUE		"yes"
-#define DEF_CHECKBOX_SIZE		"11"
-#define DEF_CHECKBOX_LINEWIDTH		"2"
-#define DEF_CHECKBOX_GAP		"4"
-#ifdef WIN32
-#define DEF_CHECKBOX_CURSOR		"arrow"
-#else
-#define DEF_CHECKBOX_CURSOR		"hand2"
-#endif /*WIN32*/
-
-#define CheckBoxOffset(x)	Blt_Offset(TreeViewCheckBox, x)
-
-static Blt_ConfigSpec checkBoxSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"ActiveBackground", DEF_STYLE_ACTIVE_BACKGROUND, 
-	CheckBoxOffset(activeBg), 0},
-    {BLT_CONFIG_SYNONYM, "-activebg", "activeBackground", 
-	(char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-activefg", "activeFackground", 
-	(char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_STYLE_ACTIVE_FOREGROUND, 
-	CheckBoxOffset(activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	(char *)NULL, CheckBoxOffset(bg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_PIXELS_POS, "-boxsize", "boxSize", "BoxSize", DEF_CHECKBOX_SIZE,
-	CheckBoxOffset(size), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", "Cursor", DEF_CHECKBOX_CURSOR, 
-	CheckBoxOffset(cursor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", (char *)NULL, 
-	CheckBoxOffset(font), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", (char *)NULL,
-	CheckBoxOffset(fgColor), BLT_CONFIG_NULL_OK },
-    {BLT_CONFIG_PIXELS_NNEG, "-gap", "gap", "Gap", DEF_CHECKBOX_GAP, 
-	CheckBoxOffset(gap), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_STYLE_HIGHLIGHT_BACKGROUND, 
-        CheckBoxOffset(highlightBg), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-highlightforeground", "highlightForeground", 
-	"HighlightForeground", DEF_STYLE_HIGHLIGHT_FOREGROUND, 
-	 CheckBoxOffset(highlightFgColor), 0},
-    {BLT_CONFIG_SYNONYM, "-highlightbg", "highlightBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-highlightfg", "highlightForeground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", (char *)NULL, 
-	CheckBoxOffset(icon), BLT_CONFIG_NULL_OK, &bltTreeViewIconOption},
-    {BLT_CONFIG_STRING, "-key", "key", "key", (char *)NULL, 
-	CheckBoxOffset(key), BLT_CONFIG_NULL_OK, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth",
-	DEF_CHECKBOX_LINEWIDTH, CheckBoxOffset(lineWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_COLOR, "-checkcolor", "checkColor", "CheckColor", 
-	DEF_CHECKBOX_CHECK_COLOR, CheckBoxOffset(checkColor), 0},
-    {BLT_CONFIG_COLOR, "-boxcolor", "boxColor", "BoxColor", 
-	DEF_CHECKBOX_BOX_COLOR, CheckBoxOffset(boxColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-fillcolor", "fillColor", "FillColor", 
-	DEF_CHECKBOX_FILL_COLOR, CheckBoxOffset(fillColor), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-offvalue", "offValue", "OffValue",
-	DEF_CHECKBOX_OFFVALUE, CheckBoxOffset(offValue), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-onvalue", "onValue", "OnValue",
-	DEF_CHECKBOX_ONVALUE, CheckBoxOffset(onValue), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-key", "key", "key", (char *)NULL, CheckBoxOffset(key),
-	BLT_CONFIG_NULL_OK, 0},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", (char *)NULL, CheckBoxOffset(selBg), 0},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	(char *)NULL, CheckBoxOffset(selFgColor), 0},
-    {BLT_CONFIG_BOOLEAN, "-showvalue", "showValue", "ShowValue",
-	DEF_CHECKBOX_SHOWVALUE, CheckBoxOffset(showValue), 
-        BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-typedef struct {
-    int refCount;			/* Usage reference count. */
-    unsigned int flags;
-    const char *name;			
-    TreeViewStyleClass *classPtr;	/* Class-specific style routines. */
-    Blt_HashEntry *hashPtr;
-    Blt_ChainLink link;
-
-    /* General style fields. */
-    Tk_Cursor cursor;			/* X Cursor */
-    TreeViewIcon icon;			/* If non-NULL, is a Tk_Image to be
-					 * drawn in the cell. */  
-    int gap;				/* # pixels gap between icon and
-					 * text. */
-    Blt_Font font;
-    XColor *fgColor;			/* Normal foreground color of cell. */
-    XColor *highlightFgColor;		/* Foreground color of cell when
-					 * highlighted. */
-    XColor *activeFgColor;		/* Foreground color of cell when
-					 * active. */
-    XColor *selFgColor;			/* Foreground color of a selected
-					 * cell. If non-NULL, overrides
-					 * default foreground color
-					 * specification. */
-    Blt_Background bg;			/* Normal background color of cell. */
-    Blt_Background highlightBg;		/* Background color of cell when
-					 * highlighted. */
-    Blt_Background activeBg;		/* Background color of cell when
-					 * active. */
-
-    Blt_Background selBg;		/* Background color of a selected
-					 * cell.  If non-NULL, overrides the
-					 * default background color
-					 * specification. */
-    const char *validateCmd;
-
-    /* ComboBox-specific fields */
-    GC gc;
-    GC highlightGC;
-    GC activeGC;
-
-    int borderWidth;			/* Width of outer border surrounding
-					 * the entire box. */
-    int relief;				/* Relief of outer border. */
-
-    Blt_TreeKey key;			/* Actual data resides in this tree
-					   value. */
-
-    const char *choices;		/* List of available choices. */
-    const char *choiceIcons;		/* List of icons associated with
-					 * choices. */
-    int scrollWidth;
-    int arrow;
-    int arrowWidth;
-    int arrowBW;			/* Border width of arrow. */
-    int arrowRelief;			/* Normal relief of arrow. */
-} TreeViewComboBox;
-
-#define DEF_COMBOBOX_BORDERWIDTH	"1"
-#define DEF_COMBOBOX_ARROW_BORDERWIDTH	"1"
-#define DEF_COMBOBOX_ARROW_RELIEF	"raised"
-#define DEF_COMBOBOX_RELIEF		"flat"
-#ifdef WIN32
-#define DEF_COMBOBOX_CURSOR		"arrow"
-#else
-#define DEF_COMBOBOX_CURSOR		"hand2"
-#endif /*WIN32*/
-
-
-#define ComboBoxOffset(x)	Blt_Offset(TreeViewComboBox, x)
-
-static Blt_ConfigSpec comboBoxSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", 
-	"ActiveBackground", DEF_STYLE_ACTIVE_BACKGROUND, 
-	ComboBoxOffset(activeBg), 0},
-    {BLT_CONFIG_SYNONYM, "-activebg", "activeBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-activefg", "activeFackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", 
-	"ActiveForeground", DEF_STYLE_ACTIVE_FOREGROUND, 
-	ComboBoxOffset(activeFgColor), 0},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	(char *)NULL, ComboBoxOffset(bg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 
-	0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_COMBOBOX_BORDERWIDTH, ComboBoxOffset(borderWidth),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_RELIEF, "-arrowrelief", "arrowRelief", "ArrowRelief",
-	DEF_COMBOBOX_ARROW_RELIEF, ComboBoxOffset(arrowRelief),
-	BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_PIXELS_NNEG, "-arrowborderwidth", "arrowBorderWidth", 
-	"ArrowBorderWidth", DEF_COMBOBOX_ARROW_BORDERWIDTH, 
-	ComboBoxOffset(arrowBW), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_CURSOR, "-cursor", "cursor", "Cursor", DEF_COMBOBOX_CURSOR, 
-	ComboBoxOffset(cursor), 0},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 
-	0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", (char *)NULL, 
-	ComboBoxOffset(font), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	(char *)NULL, ComboBoxOffset(fgColor), BLT_CONFIG_NULL_OK },
-    {BLT_CONFIG_PIXELS_NNEG, "-gap", "gap", "Gap", DEF_STYLE_GAP, 
-	ComboBoxOffset(gap), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_STYLE_HIGHLIGHT_BACKGROUND, 
-        ComboBoxOffset(highlightBg), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-highlightforeground", "highlightForeground", 
-	"HighlightForeground", DEF_STYLE_HIGHLIGHT_FOREGROUND, 
-	 ComboBoxOffset(highlightFgColor), 0},
-    {BLT_CONFIG_SYNONYM, "-highlightbg", "highlightBackground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-highlightfg", "highlightForeground", (char *)NULL, 
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_CUSTOM, "-icon", "icon", "Icon", (char *)NULL, 
-	ComboBoxOffset(icon), BLT_CONFIG_NULL_OK, &bltTreeViewIconOption},
-    {BLT_CONFIG_STRING, "-key", "key", "key", (char *)NULL, ComboBoxOffset(key),
-	BLT_CONFIG_NULL_OK, 0},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_COMBOBOX_RELIEF, 
-	ComboBoxOffset(relief), BLT_CONFIG_DONT_SET_DEFAULT},
-    {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", 
-	"Foreground", (char *)NULL, ComboBoxOffset(selBg), 0},
-    {BLT_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
-	(char *)NULL, ComboBoxOffset(selFgColor), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-typedef TreeViewStyle *(StyleCreateProc)(TreeView *viewPtr,Blt_HashEntry *hPtr);
-
-static StyleConfigProc ConfigureTextBox, ConfigureCheckBox, ConfigureComboBox;
-static StyleCreateProc CreateTextBox, CreateCheckBox, CreateComboBox;
-static StyleDrawProc DrawTextBox, DrawCheckBox, DrawComboBox;
-static StyleEditProc EditTextBox, EditCheckBox, EditComboBox;
-static StyleFreeProc FreeTextBox, FreeCheckBox, FreeComboBox;
-static StyleMeasureProc MeasureTextBox, MeasureCheckBox, MeasureComboBox;
-#ifdef notdef
-static StylePickProc PickCheckBox;
-#endif
-static StylePickProc PickComboBox;
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIcon --
- *
- *	Convert the name of an icon into a Tk image.
- *
- * Results:
- *	If the string is successfully converted, TCL_OK is returned.
- *	Otherwise, TCL_ERROR is returned and an error message is left in
- *	interpreter's result field.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIcon(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,		     /* Interpreter to send results back to */
-    Tk_Window tkwin,			/* Not used. */
-    Tcl_Obj *objPtr,		     /* Tcl_Obj representing the new value. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeView *viewPtr = clientData;
-    TreeViewIcon *iconPtr = (TreeViewIcon *)(widgRec + offset);
-    TreeViewIcon icon;
-
-    icon = Blt_TreeView_GetIcon(viewPtr, Tcl_GetString(objPtr));
-    if (icon == NULL) {
-	return TCL_ERROR;
-    }
-    *iconPtr = icon;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * IconToObj --
- *
- *	Converts the icon into its string representation (its name).
- *
- * Results:
- *	The name of the icon is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-IconToObj(
-    ClientData clientData,		/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,			/* Not used. */
-    char *widgRec,
-    int offset,				/* Offset to field in structure */
-    int flags)	
-{
-    TreeViewIcon icon = *(TreeViewIcon *)(widgRec + offset);
-
-    if (icon == NULL) {
-	return Tcl_NewStringObj("", -1);
-    } else {
-	return Tcl_NewStringObj(Blt_Image_Name((icon)->tkImage), -1);
-    }
-}
-
-/*ARGSUSED*/
-static void
-FreeIcon(
-    ClientData clientData,
-    Display *display,		/* Not used. */
-    char *widgRec,
-    int offset)
-{
-    TreeViewIcon *iconPtr = (TreeViewIcon *)(widgRec + offset);
-    TreeView *viewPtr = clientData;
-
-    if (*iconPtr != NULL) {
-	Blt_TreeView_FreeIcon(viewPtr, *iconPtr);
-	*iconPtr = NULL;
-    }
-}
-
-static TreeViewStyleClass textBoxClass = {
-    "TextBoxStyle",
-    textBoxSpecs,
-    ConfigureTextBox,
-    MeasureTextBox,
-    DrawTextBox,
-    NULL,
-    EditTextBox,
-    FreeTextBox,
-};
-
-static TreeViewStyleClass checkBoxClass = {
-    "CheckBoxStyle",
-    checkBoxSpecs,
-    ConfigureCheckBox,
-    MeasureCheckBox,
-    DrawCheckBox,
-    NULL,
-    EditCheckBox,
-    FreeCheckBox,
-};
-
-static TreeViewStyleClass comboBoxClass = {
-    "ComboBoxStyle", 
-    comboBoxSpecs,
-    ConfigureComboBox,
-    MeasureComboBox,
-    DrawComboBox,
-    NULL,
-    EditComboBox,
-    FreeComboBox,
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTextBox --
- *
- *	Creates a "textbox" style.
- *
- * Results:
- *	A pointer to the new style structure.
- *
- *---------------------------------------------------------------------------
- */
-static TreeViewStyle *
-CreateTextBox(TreeView *viewPtr, Blt_HashEntry *hPtr)
-{
-    TreeViewTextBox *tbPtr;
-
-    tbPtr = Blt_AssertCalloc(1, sizeof(TreeViewTextBox));
-    tbPtr->classPtr = &textBoxClass;
-    tbPtr->side = SIDE_LEFT;
-    tbPtr->gap = STYLE_GAP;
-    tbPtr->name = Blt_AssertStrdup(Blt_GetHashKey(&viewPtr->styleTable, hPtr));
-    tbPtr->hashPtr = hPtr;
-    tbPtr->link = NULL;
-    tbPtr->flags = STYLE_TEXTBOX;
-    tbPtr->refCount = 1;
-    Blt_SetHashValue(hPtr, tbPtr);
-    return (TreeViewStyle *)tbPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureTextBox --
- *
- *	Configures a "textbox" style.  This routine performs generates the GCs
- *	required for a textbox style.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs are created for the style.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ConfigureTextBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-    GC newGC;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcMask = GCForeground | GCFont;
-    gcValues.font = Blt_FontId(CHOOSE(viewPtr->font, tbPtr->font));
-
-    /* Normal GC */
-    gcValues.foreground = CHOOSE(viewPtr->fgColor, tbPtr->fgColor)->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (tbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->gc);
-    }
-    tbPtr->gc = newGC;
-
-    /* Highlight GC  */
-    gcValues.foreground = tbPtr->highlightFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (tbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->highlightGC);
-    }
-    tbPtr->highlightGC = newGC;
-
-    /* Active GC  */
-    gcValues.foreground = tbPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (tbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->activeGC);
-    }
-    tbPtr->activeGC = newGC;
-    tbPtr->flags |= STYLE_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MeasureTextBox --
- *
- *	Determines the space requirements for the "textbox" given the value to
- *	be displayed.  Depending upon whether an icon or text is displayed and
- *	their relative placements, this routine computes the space needed for
- *	the text entry.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The width and height fields of *valuePtr* are set with the computed
- *	dimensions.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MeasureTextBox(
-    TreeView *viewPtr, 
-    TreeViewStyle *stylePtr, 
-    TreeViewValue *valuePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-    int iconWidth, iconHeight;
-    int textWidth, textHeight;
-    int gap;
-
-    textWidth = textHeight = 0;
-    iconWidth = iconHeight = 0;
-    valuePtr->width = valuePtr->height = 0;
-
-    if (tbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(tbPtr->icon);
-	iconHeight = TreeView_IconHeight(tbPtr->icon);
-    } 
-    if (valuePtr->textPtr != NULL) {
-	Blt_Free(valuePtr->textPtr);
-	valuePtr->textPtr = NULL;
-    }
-    if (valuePtr->string != NULL) {	/* New string defined. */
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, CHOOSE(viewPtr->font, tbPtr->font));
-	valuePtr->textPtr = Blt_Ts_CreateLayout(valuePtr->string, -1, &ts);
-    } 
-    gap = 0;
-    if (valuePtr->textPtr != NULL) {
-	textWidth = valuePtr->textPtr->width;
-	textHeight = valuePtr->textPtr->height;
-	if (tbPtr->icon != NULL) {
-	    gap = tbPtr->gap;
-	}
-    }
-    if (tbPtr->side & (SIDE_TOP | SIDE_BOTTOM)) {
-	valuePtr->width = MAX(textWidth, iconWidth);
-	valuePtr->height = iconHeight + gap + textHeight;
-    } else {
-	valuePtr->width = iconWidth + gap + textWidth;
-	valuePtr->height = MAX(textHeight, iconHeight);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawTextBox --
- *
- *	Draws the "textbox" given the screen coordinates and the value to be
- *	displayed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The textbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawTextBox(
-    TreeView *viewPtr,
-    Drawable drawable,
-    TreeViewEntry *entryPtr,
-    TreeViewValue *valuePtr,
-    TreeViewStyle *stylePtr,
-    int x, int y)
-{
-    TreeViewColumn *colPtr;
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-    int iconX, iconY, iconWidth, iconHeight;
-    int textX, textY, textWidth, textHeight;
-    int gap, columnWidth;
-    Blt_Background bg;
-    XColor *fgColor;
-
-    colPtr = valuePtr->columnPtr;
-
-    if (stylePtr->flags & STYLE_HIGHLIGHT) {
-	bg = tbPtr->highlightBg;
-	fgColor = tbPtr->highlightFgColor;
-    } else {
-	if (tbPtr->bg != NULL) {
-	    bg = tbPtr->bg;
-	} else {
-	    bg = ((viewPtr->altBg != NULL) && (entryPtr->flatIndex & 0x1)) 
-		? viewPtr->altBg : viewPtr->bg;
-	}
-	fgColor = CHOOSE(viewPtr->fgColor, tbPtr->fgColor);
-    }
-    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	if (stylePtr->selBg != NULL) {
-	    bg = stylePtr->selBg;
-	} else {
-	    bg = viewPtr->selBg;
-	}
-    } 
-    /*
-     * Draw the active or normal background color over the entire label area.
-     * This includes both the tab's text and image.  The rectangle should be 2
-     * pixels wider/taller than this area. So if the label consists of just an
-     * image, we get an halo around the image when the tab is active.
-     */
-    if (bg != NULL) {
-	Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y, 
-		colPtr->width, entryPtr->height + 1, 0, TK_RELIEF_FLAT);
-    }
-
-    columnWidth = colPtr->width - 
-	(2 * colPtr->borderWidth + PADDING(colPtr->pad));
-    if (columnWidth > valuePtr->width) {
-	switch(colPtr->justify) {
-	case TK_JUSTIFY_RIGHT:
-	    x += (columnWidth - valuePtr->width);
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    x += (columnWidth - valuePtr->width) / 2;
-	    break;
-	case TK_JUSTIFY_LEFT:
-	    break;
-	}
-    }
-
-    textX = textY = iconX = iconY = 0;	/* Suppress compiler warning. */
-    
-    iconWidth = iconHeight = 0;
-    if (tbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(tbPtr->icon);
-	iconHeight = TreeView_IconHeight(tbPtr->icon);
-    }
-    textWidth = textHeight = 0;
-    if (valuePtr->textPtr != NULL) {
-	textWidth = valuePtr->textPtr->width;
-	textHeight = valuePtr->textPtr->height;
-    }
-    gap = 0;
-    if ((tbPtr->icon != NULL) && (valuePtr->textPtr != NULL)) {
-	gap = tbPtr->gap;
-    }
-    switch (tbPtr->side) {
-    case SIDE_RIGHT:
-	textX = x;
-	textY = y + (entryPtr->height - textHeight) / 2;
-	iconX = textX + textWidth + gap;
-	iconY = y + (entryPtr->height - iconHeight) / 2;
-	break;
-    case SIDE_LEFT:
-	iconX = x;
-	iconY = y + (entryPtr->height - iconHeight) / 2;
-	textX = iconX + iconWidth + gap;
-	textY = y + (entryPtr->height - textHeight) / 2;
-	break;
-    case SIDE_TOP:
-	iconY = y;
-	iconX = x + (columnWidth - iconWidth) / 2;
-	textY = iconY + iconHeight + gap;
-	textX = x + (columnWidth - textWidth) / 2;
-	break;
-    case SIDE_BOTTOM:
-	textY = y;
-	textX = x + (columnWidth - textWidth) / 2;
-	iconY = textY + textHeight + gap;
-	iconX = x + (columnWidth - iconWidth) / 2;
-	break;
-    }
-    if (tbPtr->icon != NULL) {
-	Tk_RedrawImage(TreeView_IconBits(tbPtr->icon), 0, 0, iconWidth, 
-		       iconHeight, drawable, iconX, iconY);
-    }
-    if (valuePtr->textPtr != NULL) {
-	TextStyle ts;
-	XColor *color;
-	Blt_Font font;
-	int xMax;
-
-	font = CHOOSE(viewPtr->font, tbPtr->font);
-	if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	    if (stylePtr->selFgColor != NULL) {
-		color = stylePtr->selFgColor;
-	    } else {
-		color = viewPtr->selFgColor;
-	    }
-	} else if (entryPtr->color != NULL) {
-	    color = entryPtr->color;
-	} else {
-	    color = fgColor;
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetForeground(ts, color);
-	xMax = SCREENX(viewPtr, colPtr->worldX) + colPtr->width - 
-		colPtr->titleBW - colPtr->pad.side2;
-	Blt_Ts_DrawLayout(viewPtr->tkwin, drawable, valuePtr->textPtr, &ts, 
-		textX, textY, xMax - textX);
-    }
-    stylePtr->flags &= ~STYLE_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EditCombobox --
- *
- *	Edits the "combobox".
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EditTextBox(TreeView *viewPtr, TreeViewEntry *entryPtr, TreeViewColumn *colPtr,
-	    TreeViewStyle *stylePtr)
-{
-    return Blt_TreeView_CreateTextbox(viewPtr, entryPtr, colPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeTextBox --
- *
- *	Releases resources allocated for the textbox. The resources freed by
- *	this routine are specific only to the "textbox".  Other resources
- *	(common to all styles) are freed in the Blt_TreeView_FreeStyle
- *	routine.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs allocated for the textbox are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeTextBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-
-    if (tbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->highlightGC);
-    }
-    if (tbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->activeGC);
-    }
-    if (tbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, tbPtr->gc);
-    }
-    if (tbPtr->icon != NULL) {
-	Blt_TreeView_FreeIcon(viewPtr, tbPtr->icon);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateCheckbox --
- *
- *	Creates a "checkbox" style.
- *
- * Results:
- *	A pointer to the new style structure.
- *
- *---------------------------------------------------------------------------
- */
-static TreeViewStyle *
-CreateCheckBox(TreeView *viewPtr, Blt_HashEntry *hPtr)
-{
-    TreeViewCheckBox *cbPtr;
-
-    cbPtr = Blt_AssertCalloc(1, sizeof(TreeViewCheckBox));
-    cbPtr->classPtr = &checkBoxClass;
-    cbPtr->gap = 4;
-    cbPtr->size = 18;
-    cbPtr->lineWidth = 2;
-    cbPtr->showValue = TRUE;
-    cbPtr->name = Blt_AssertStrdup(Blt_GetHashKey(&viewPtr->styleTable, hPtr));
-    cbPtr->hashPtr = hPtr;
-    cbPtr->link = NULL;
-    cbPtr->flags = STYLE_CHECKBOX;
-    cbPtr->refCount = 1;
-    Blt_SetHashValue(hPtr, cbPtr);
-    return (TreeViewStyle *)cbPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureCheckbox --
- *
- *	Configures a "checkbox" style.  This routine performs generates the
- *	GCs required for a checkbox style.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs are created for the style.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ConfigureCheckBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    GC newGC;
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-    XColor *bgColor;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcMask = GCForeground | GCBackground | GCFont;
-    gcValues.font = Blt_FontId(CHOOSE(viewPtr->font, cbPtr->font));
-    bgColor = Blt_BackgroundBorderColor(CHOOSE(viewPtr->bg, cbPtr->bg));
-
-    gcValues.background = bgColor->pixel;
-    gcValues.foreground = CHOOSE(viewPtr->fgColor, cbPtr->fgColor)->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->gc);
-    }
-    cbPtr->gc = newGC;
-    gcValues.background = Blt_BackgroundBorderColor(cbPtr->highlightBg)->pixel;
-    gcValues.foreground = cbPtr->highlightFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->highlightGC);
-    }
-    cbPtr->highlightGC = newGC;
-
-    gcValues.background = Blt_BackgroundBorderColor(cbPtr->activeBg)->pixel;
-    gcValues.foreground = cbPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->activeGC);
-    }
-    cbPtr->activeGC = newGC;
-
-    cbPtr->flags |= STYLE_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MeasureCheckbox --
- *
- *	Determines the space requirements for the "checkbox" given the value
- *	to be displayed.  Depending upon whether an icon or text is displayed
- *	and their relative placements, this routine computes the space needed
- *	for the text entry.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The width and height fields of *valuePtr* are set with the
- *	computed dimensions.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MeasureCheckBox(TreeView *viewPtr, TreeViewStyle *stylePtr, 
-		TreeViewValue *valuePtr)
-{
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-    int iconWidth, iconHeight;
-    int textWidth, textHeight;
-    int gap;
-    int boxWidth, boxHeight;
-
-    boxWidth = boxHeight = ODD(cbPtr->size);
-
-    textWidth = textHeight = iconWidth = iconHeight = 0;
-    valuePtr->width = valuePtr->height = 0;
-    if (cbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(cbPtr->icon);
-	iconHeight = TreeView_IconHeight(cbPtr->icon);
-    } 
-    if (cbPtr->onPtr != NULL) {
-	Blt_Free(cbPtr->onPtr);
-	cbPtr->onPtr = NULL;
-    }
-    if (cbPtr->offPtr != NULL) {
-	Blt_Free(cbPtr->offPtr);
-	cbPtr->offPtr = NULL;
-    }
-    gap = 0;
-    if (cbPtr->showValue) {
-	TextStyle ts;
-	const char *string;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, CHOOSE(viewPtr->font, cbPtr->font));
-	string = (cbPtr->onValue != NULL) ? cbPtr->onValue : valuePtr->string;
-	cbPtr->onPtr = Blt_Ts_CreateLayout(string, -1, &ts);
-	string = (cbPtr->offValue != NULL) ? cbPtr->offValue : valuePtr->string;
-	cbPtr->offPtr = Blt_Ts_CreateLayout(string, -1, &ts);
-	textWidth = MAX(cbPtr->offPtr->width, cbPtr->onPtr->width);
-	textHeight = MAX(cbPtr->offPtr->height, cbPtr->onPtr->height);
-	if (cbPtr->icon != NULL) {
-	    gap = cbPtr->gap;
-	}
-    }
-    valuePtr->width = cbPtr->gap * 2 + boxWidth + iconWidth + gap + textWidth;
-    valuePtr->height = MAX3(boxHeight, textHeight, iconHeight) | 0x1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawCheckbox --
- *
- *	Draws the "checkbox" given the screen coordinates and the
- *	value to be displayed.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawCheckBox(TreeView *viewPtr, Drawable drawable, TreeViewEntry *entryPtr, 
-	     TreeViewValue *valuePtr, TreeViewStyle *stylePtr, int x, int y)
-{
-    Blt_Background bg;
-    Blt_Font font;
-    TextLayout *textPtr;
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-    TreeViewColumn *colPtr;
-    XColor *fgColor;
-    int bool;
-    int borderWidth, relief;
-    int gap, columnWidth;
-    int iconX, iconY, iconWidth, iconHeight;
-    int textX, textY, textHeight;
-    int xBox, yBox, boxWidth, boxHeight;
-
-    font = CHOOSE(viewPtr->font, cbPtr->font);
-    colPtr = valuePtr->columnPtr;
-    borderWidth = 0;
-    relief = TK_RELIEF_FLAT;
-    if (valuePtr == viewPtr->activeValuePtr) {
-	bg = cbPtr->activeBg;
-	fgColor = cbPtr->activeFgColor;
-	borderWidth = 1;
-	relief = TK_RELIEF_RAISED;
-    } else if (stylePtr->flags & STYLE_HIGHLIGHT) {
-	bg = cbPtr->highlightBg;
-	fgColor = cbPtr->highlightFgColor;
-    } else {
-	/* If a background was specified, override the current background.
-	 * Otherwise, use the standard background taking into consideration if
-	 * its the odd or even color. */
-	if (cbPtr->bg != NULL) {
-	    bg = cbPtr->bg;
-	} else {
-	    bg = ((viewPtr->altBg != NULL) && (entryPtr->flatIndex & 0x1)) 
-		? viewPtr->altBg : viewPtr->bg;
-	}
-	fgColor = CHOOSE(viewPtr->fgColor, cbPtr->fgColor);
-    }
-    columnWidth = colPtr->width - PADDING(colPtr->pad);
-
-    /*
-     * Draw the active or normal background color over the entire label area.
-     * This includes both the tab's text and image.  The rectangle should be 2
-     * pixels wider/taller than this area. So if the label consists of just an
-     * image, we get an halo around the image when the tab is active.
-     */
-    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	bg = CHOOSE(viewPtr->selBg, stylePtr->selBg);
-    }
-    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y+1, 
-	columnWidth, entryPtr->height - 2, borderWidth, relief);
-
-    if (columnWidth > valuePtr->width) {
-	switch(colPtr->justify) {
-	case TK_JUSTIFY_RIGHT:
-	    x += (columnWidth - valuePtr->width);
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    x += (columnWidth - valuePtr->width) / 2;
-	    break;
-	case TK_JUSTIFY_LEFT:
-	    break;
-	}
-    }
-
-    bool = (strcmp(valuePtr->string, cbPtr->onValue) == 0);
-    textPtr = (bool) ? cbPtr->onPtr : cbPtr->offPtr;
-
-    /*
-     * Draw the box and check. 
-     *
-     *		+-----------+
-     *		|           |
-     *		|         * |
-     *          |        *  |
-     *          | *     *   |
-     *          |  *   *    |
-     *          |   * *     |
-     *		|    *      |
-     *		+-----------+
-     */
-    boxWidth = boxHeight = ODD(cbPtr->size);
-    xBox = x + cbPtr->gap;
-    yBox = y + (entryPtr->height - boxHeight) / 2;
-    {
-	Blt_Picture picture;
-	
-	if (0) {
-	    if (cbPtr->disabledPicture == NULL) {
-		cbPtr->disabledPicture = Blt_PaintCheckbox(boxWidth, boxHeight, 
-			cbPtr->fillColor, cbPtr->boxColor, cbPtr->boxColor, 
-			bool);
-	    } 
-	    picture = cbPtr->disabledPicture;
-	} else if (bool) {
-	    if (cbPtr->selectedPicture == NULL) {
-		cbPtr->selectedPicture = Blt_PaintCheckbox(boxWidth, boxHeight, 
-			cbPtr->fillColor, cbPtr->boxColor, cbPtr->checkColor, 
-			TRUE);
-	    } 
-	    picture = cbPtr->selectedPicture;
-	} else {
-	    if (cbPtr->normalPicture == NULL) {
-		cbPtr->normalPicture = Blt_PaintCheckbox(boxWidth, boxHeight, 
-			cbPtr->fillColor, cbPtr->boxColor, cbPtr->checkColor, 
-			FALSE);
-	    } 
-	    picture = cbPtr->normalPicture;
-	}
-	if (cbPtr->painter == NULL) {
-	    cbPtr->painter = Blt_GetPainter(viewPtr->tkwin, 1.0);
-	}
-	Blt_PaintPicture(cbPtr->painter, drawable, picture, 0, 0, 
-			 boxWidth, boxHeight, xBox, yBox, 0);
-    }
-    iconWidth = iconHeight = 0;
-    if (cbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(cbPtr->icon);
-	iconHeight = TreeView_IconHeight(cbPtr->icon);
-    }
-    textHeight = 0;
-    gap = 0;
-    if (cbPtr->showValue) {
-	textHeight = textPtr->height;
-	if (cbPtr->icon != NULL) {
-	    gap = cbPtr->gap;
-	}
-    }
-    x = xBox + boxWidth + cbPtr->gap;
-
-    /* The icon sits to the left of the text. */
-    iconX = x;
-    iconY = y + (entryPtr->height - iconHeight) / 2;
-    textX = iconX + iconWidth + gap;
-    textY = y + (entryPtr->height - textHeight) / 2;
-    if (cbPtr->icon != NULL) {
-	Tk_RedrawImage(TreeView_IconBits(cbPtr->icon), 0, 0, iconWidth, 
-		       iconHeight, drawable, iconX, iconY);
-    }
-    if ((cbPtr->showValue) && (textPtr != NULL)) {
-	TextStyle ts;
-	XColor *color;
-	int xMax;
-
-	if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	    if (stylePtr->selFgColor != NULL) {
-		color = stylePtr->selFgColor;
-	    } else {
-		color = viewPtr->selFgColor;
-	    }
-	} else if (entryPtr->color != NULL) {
-	    color = entryPtr->color;
-	} else {
-	    color = fgColor;
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetForeground(ts, color);
-	xMax = SCREENX(viewPtr, colPtr->worldX) + colPtr->width - colPtr->titleBW - 
-	    colPtr->pad.side2;
-	Blt_Ts_DrawLayout(viewPtr->tkwin, drawable, textPtr, &ts, textX, textY, 
-		xMax - textX);
-    }
-    stylePtr->flags &= ~STYLE_DIRTY;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * PickCheckbox --
- *
- *	Draws the "checkbox" given the screen coordinates and the value to be
- *	displayed.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PickCheckBox(TreeViewEntry *entryPtr, TreeViewValue *valuePtr, 
-	     TreeViewStyle *stylePtr, int worldX, int worldY)
-{
-    TreeViewColumn *colPtr;
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-    int columnWidth;
-    int x, y, width, height;
-
-    colPtr = valuePtr->columnPtr;
-    columnWidth = colPtr->width - 
-	(2 * colPtr->borderWidth + PADDING(colPtr->pad));
-    if (columnWidth > valuePtr->width) {
-	switch(colPtr->justify) {
-	case TK_JUSTIFY_RIGHT:
-	    worldX += (columnWidth - valuePtr->width);
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    worldX += (columnWidth - valuePtr->width) / 2;
-	    break;
-	case TK_JUSTIFY_LEFT:
-	    break;
-	}
-    }
-    width = height = ODD(cbPtr->size) + 2 * cbPtr->lineWidth;
-    x = colPtr->worldX + colPtr->pad.side1 + cbPtr->gap - cbPtr->lineWidth;
-    y = entryPtr->worldY + (entryPtr->height - height) / 2;
-    if ((worldX >= x) && (worldX < (x + width)) && 
-	(worldY >= y) && (worldY < (y + height))) {
-	return TRUE;
-    }
-    return FALSE;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * EditCheckbox --
- *
- *	Edits the "checkbox".
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EditCheckBox(TreeView *viewPtr, TreeViewEntry *entryPtr, 
-	     TreeViewColumn *colPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-    Tcl_Obj *objPtr;
-
-    if (Blt_Tree_GetValueByKey(viewPtr->interp, viewPtr->tree, entryPtr->node, 
-	colPtr->key, &objPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (strcmp(Tcl_GetString(objPtr), cbPtr->onValue) == 0) {
-	objPtr = Tcl_NewStringObj(cbPtr->offValue, -1);
-    } else {
-	objPtr = Tcl_NewStringObj(cbPtr->onValue, -1);
-    }
-    entryPtr->flags |= ENTRY_DIRTY;
-    viewPtr->flags |= (DIRTY | LAYOUT_PENDING | SCROLL_PENDING);
-    if (Blt_Tree_SetValueByKey(viewPtr->interp, viewPtr->tree, 
-	      entryPtr->node, colPtr->key, objPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeCheckbox --
- *
- *	Releases resources allocated for the checkbox. The resources freed by
- *	this routine are specific only to the "checkbox".  Other resources
- *	(common to all styles) are freed in the Blt_TreeView_FreeStyle
- *	routine.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs allocated for the checkbox are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeCheckBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewCheckBox *cbPtr = (TreeViewCheckBox *)stylePtr;
-
-    if (cbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->highlightGC);
-    }
-    if (cbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->activeGC);
-    }
-    if (cbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->gc);
-    }
-    if (cbPtr->icon != NULL) {
-	Blt_TreeView_FreeIcon(viewPtr, cbPtr->icon);
-    }
-    if (cbPtr->offPtr != NULL) {
-	Blt_Free(cbPtr->offPtr);
-    }
-    if (cbPtr->onPtr != NULL) {
-	Blt_Free(cbPtr->onPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateComboBox --
- *
- *	Creates a "combobox" style.
- *
- * Results:
- *	A pointer to the new style structure.
- *
- *---------------------------------------------------------------------------
- */
-static TreeViewStyle *
-CreateComboBox(TreeView *viewPtr, Blt_HashEntry *hPtr)
-{
-    TreeViewComboBox *cbPtr;
-
-    cbPtr = Blt_AssertCalloc(1, sizeof(TreeViewComboBox));
-    cbPtr->classPtr = &comboBoxClass;
-    cbPtr->gap = STYLE_GAP;
-    cbPtr->arrowRelief = TK_RELIEF_RAISED;
-    cbPtr->arrowBW = 1;
-    cbPtr->borderWidth = 1;
-    cbPtr->relief = TK_RELIEF_FLAT;
-    cbPtr->name = Blt_AssertStrdup(Blt_GetHashKey(&viewPtr->styleTable, hPtr));
-    cbPtr->hashPtr = hPtr;
-    cbPtr->link = NULL;
-    cbPtr->flags = STYLE_COMBOBOX;
-    cbPtr->refCount = 1;
-    Blt_SetHashValue(hPtr, cbPtr);
-    return (TreeViewStyle *)cbPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureComboBox --
- *
- *	Configures a "combobox" style.  This routine performs generates the
- *	GCs required for a combobox style.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs are created for the style.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ConfigureComboBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    GC newGC;
-    TreeViewComboBox *cbPtr = (TreeViewComboBox *)stylePtr;
-    XColor *bgColor;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    gcValues.font = Blt_FontId(CHOOSE(viewPtr->font, cbPtr->font));
-    bgColor = Blt_BackgroundBorderColor(CHOOSE(viewPtr->bg, cbPtr->bg));
-    gcMask = GCForeground | GCBackground | GCFont;
-
-    /* Normal foreground */
-    gcValues.background = bgColor->pixel;
-    gcValues.foreground = CHOOSE(viewPtr->fgColor, cbPtr->fgColor)->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->gc);
-    }
-    cbPtr->gc = newGC;
-
-    /* Highlight foreground */
-    gcValues.background = Blt_BackgroundBorderColor(cbPtr->highlightBg)->pixel;
-    gcValues.foreground = cbPtr->highlightFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->highlightGC);
-    }
-    cbPtr->highlightGC = newGC;
-
-    /* Active foreground */
-    gcValues.background = Blt_BackgroundBorderColor(cbPtr->activeBg)->pixel;
-    gcValues.foreground = cbPtr->activeFgColor->pixel;
-    newGC = Tk_GetGC(viewPtr->tkwin, gcMask, &gcValues);
-    if (cbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->activeGC);
-    }
-    cbPtr->activeGC = newGC;
-    cbPtr->flags |= STYLE_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MeasureComboBox --
- *
- *	Determines the space requirements for the "combobox" given the value
- *	to be displayed.  Depending upon whether an icon or text is displayed
- *	and their relative placements, this routine computes the space needed
- *	for the text entry.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The width and height fields of *valuePtr* are set with the computed
- *	dimensions.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MeasureComboBox(TreeView *viewPtr, TreeViewStyle *stylePtr, 
-		TreeViewValue *valuePtr)
-{
-    TreeViewComboBox *cbPtr = (TreeViewComboBox *)stylePtr;
-    int iconWidth, iconHeight;
-    int textWidth, textHeight;
-    int gap;
-    Blt_Font font;
-
-    textWidth = textHeight = 0;
-    iconWidth = iconHeight = 0;
-    valuePtr->width = valuePtr->height = 0;
-
-    if (cbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(cbPtr->icon);
-	iconHeight = TreeView_IconHeight(cbPtr->icon);
-    } 
-    if (valuePtr->textPtr != NULL) {
-	Blt_Free(valuePtr->textPtr);
-	valuePtr->textPtr = NULL;
-    }
-    font = CHOOSE(viewPtr->font, cbPtr->font);
-    if (valuePtr->string != NULL) {	/* New string defined. */
-	TextStyle ts;
-
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	valuePtr->textPtr = Blt_Ts_CreateLayout(valuePtr->string, -1, &ts);
-    } 
-    gap = 0;
-    if (valuePtr->textPtr != NULL) {
-	textWidth = valuePtr->textPtr->width;
-	textHeight = valuePtr->textPtr->height;
-	if (cbPtr->icon != NULL) {
-	    gap = cbPtr->gap;
-	}
-    }
-    cbPtr->arrowWidth = ARROW_WIDTH + 2 * cbPtr->arrowBW;
-    valuePtr->width = 2 * cbPtr->borderWidth + iconWidth + 4 * gap + 
-	cbPtr->arrowWidth + textWidth;
-    valuePtr->height = MAX(textHeight, iconHeight) + 2 * cbPtr->borderWidth;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawComboBox --
- *
- *	Draws the "combobox" given the screen coordinates and the
- *	value to be displayed.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The combobox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawComboBox(TreeView *viewPtr, Drawable drawable, TreeViewEntry *entryPtr,
-	     TreeViewValue *valuePtr, TreeViewStyle *stylePtr, int x, int y)
-{
-    Blt_Background bg;
-    TreeViewColumn *colPtr;
-    TreeViewComboBox *cbPtr = (TreeViewComboBox *)stylePtr;
-    XColor *fgColor;
-    int arrowX, arrowY;
-    int gap, columnWidth;
-    int iconX, iconY, iconWidth, iconHeight;
-    int textX, textY, textHeight;
-    int relief;
-    int borderWidth;
-
-    borderWidth = 0;
-    relief = TK_RELIEF_FLAT;
-    colPtr = valuePtr->columnPtr;
-    if (valuePtr == viewPtr->activeValuePtr) {
-	bg = cbPtr->activeBg;
-	fgColor = cbPtr->activeFgColor;
-	borderWidth = 1;
-	relief = TK_RELIEF_RAISED;
-    } else if (stylePtr->flags & STYLE_HIGHLIGHT) {
-	bg = cbPtr->highlightBg;
-	fgColor = cbPtr->highlightFgColor;
-    } else {
-	/* If a background was specified, override the current background.
-	 * Otherwise, use the standard background taking into consideration if
-	 * its the odd or even color. */
-	if (cbPtr->bg != NULL) {
-	    bg = cbPtr->bg;
-	} else {
-	    bg = ((viewPtr->altBg != NULL) && (entryPtr->flatIndex & 0x1)) 
-		? viewPtr->altBg : viewPtr->bg;
-	}
-	fgColor = CHOOSE(viewPtr->fgColor, cbPtr->fgColor);
-    }
-
-    columnWidth = colPtr->width - PADDING(colPtr->pad);
-    /* if (valuePtr == viewPtr->activeValuePtr) */ {
-	/*
-	 * Draw the active or normal background color over the entire label
-	 * area.  This includes both the tab's text and image.  The rectangle
-	 * should be 2 pixels wider/taller than this area. So if the label
-	 * consists of just an image, we get an halo around the image when the
-	 * tab is active.
-	 */
-	if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	    if (stylePtr->selBg != NULL) {
-		bg = stylePtr->selBg;
-	    } else {
-		bg = viewPtr->selBg;
-	    }
-	    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y+1, 
-		columnWidth, entryPtr->height - 2, borderWidth, relief);
-	} else {
-	    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y+1, 
-		columnWidth, entryPtr->height - 2, borderWidth, relief);
-	}
-    }   
-    if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	fgColor = viewPtr->selFgColor;
-    }
-    arrowX = x + colPtr->width;
-    arrowX -= colPtr->pad.side2 + cbPtr->borderWidth  + cbPtr->arrowWidth + 
-	cbPtr->gap;
-    arrowY = y;
-
-    if (columnWidth > valuePtr->width) {
-	switch(colPtr->justify) {
-	case TK_JUSTIFY_RIGHT:
-	    x += (columnWidth - valuePtr->width);
-	    break;
-	case TK_JUSTIFY_CENTER:
-	    x += (columnWidth - valuePtr->width) / 2;
-	    break;
-	case TK_JUSTIFY_LEFT:
-	    break;
-	}
-    }
-
-#ifdef notdef
-    textX = textY = iconX = iconY = 0;	/* Suppress compiler warning. */
-#endif
-    
-    iconWidth = iconHeight = 0;
-    if (cbPtr->icon != NULL) {
-	iconWidth = TreeView_IconWidth(cbPtr->icon);
-	iconHeight = TreeView_IconHeight(cbPtr->icon);
-    }
-    textHeight = 0;
-    if (valuePtr->textPtr != NULL) {
-	textHeight = valuePtr->textPtr->height;
-    }
-    gap = 0;
-    if ((cbPtr->icon != NULL) && (valuePtr->textPtr != NULL)) {
-	gap = cbPtr->gap;
-    }
-
-    iconX = x + gap;
-    iconY = y + (entryPtr->height - iconHeight) / 2;
-    textX = iconX + iconWidth + gap;
-    textY = y + (entryPtr->height - textHeight) / 2;
-
-    if (cbPtr->icon != NULL) {
-	Tk_RedrawImage(TreeView_IconBits(cbPtr->icon), 0, 0, iconWidth, 
-	       iconHeight, drawable, iconX, iconY);
-    }
-    if (valuePtr->textPtr != NULL) {
-	TextStyle ts;
-	XColor *color;
-	Blt_Font font;
-	int xMax;
-	
-	font = CHOOSE(viewPtr->font, cbPtr->font);
-	if (Blt_TreeView_EntryIsSelected(viewPtr, entryPtr)) {
-	    color = CHOOSE(viewPtr->selFgColor, stylePtr->selFgColor);
-	} else if (entryPtr->color != NULL) {
-	    color = entryPtr->color;
-	} else {
-	    color = fgColor;
-	}
-	Blt_Ts_InitStyle(ts);
-	Blt_Ts_SetFont(ts, font);
-	Blt_Ts_SetForeground(ts, color);
-
-	xMax = SCREENX(viewPtr, colPtr->worldX) + colPtr->width - 
-	    colPtr->titleBW - colPtr->pad.side2 - cbPtr->arrowWidth;
-	Blt_Ts_DrawLayout(viewPtr->tkwin, drawable, valuePtr->textPtr, &ts, 
-		textX, textY, xMax - textX);
-    }
-    if (valuePtr == viewPtr->activeValuePtr) {
-	bg = stylePtr->activeBg;
-    } else {
-	bg = colPtr->titleBg;
-#ifdef notdef
-	bg = CHOOSE(viewPtr->bg, cbPtr->bg);
-#endif
-    }
-#ifdef notdef
-    Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, arrowX, 
-	arrowY + cbPtr->borderWidth, cbPtr->arrowWidth, 
-	entryPtr->height - 2 * cbPtr->borderWidth, cbPtr->arrowBW, 
-	cbPtr->arrowRelief); 
-#endif
-    Blt_DrawArrow(viewPtr->display, drawable, fgColor, arrowX, arrowY - 1, 
-	cbPtr->arrowWidth, entryPtr->height, cbPtr->arrowBW, ARROW_DOWN);
-    stylePtr->flags &= ~STYLE_DIRTY;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PickCombobox --
- *
- *	Draws the "checkbox" given the screen coordinates and the
- *	value to be displayed.  
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PickComboBox(TreeViewEntry *entryPtr, TreeViewValue *valuePtr,
-	     TreeViewStyle *stylePtr, int worldX, int worldY)
-{
-    TreeViewColumn *colPtr;
-    TreeViewComboBox *cbPtr = (TreeViewComboBox *)stylePtr;
-    int x, y, width, height;
-
-    colPtr = valuePtr->columnPtr;
-    width = colPtr->width;
-    height = entryPtr->height - 4;
-    x = colPtr->worldX + cbPtr->borderWidth;
-    y = entryPtr->worldY + cbPtr->borderWidth;
-    if ((worldX >= x) && (worldX < (x + width)) && 
-	(worldY >= y) && (worldY < (y + height))) {
-	return TRUE;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EditCombobox --
- *
- *	Edits the "combobox".
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The checkbox value is drawn.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-EditComboBox(
-    TreeView *viewPtr,
-    TreeViewEntry *entryPtr,
-    TreeViewColumn *colPtr,
-    TreeViewStyle *stylePtr)		/* Not used. */
-{
-    return Blt_TreeView_CreateTextbox(viewPtr, entryPtr, colPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreeComboBox --
- *
- *	Releases resources allocated for the combobox. The resources freed by
- *	this routine are specific only to the "combobox".  Other resources
- *	(common to all styles) are freed in the Blt_TreeView_FreeStyle
- *	routine.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	GCs allocated for the combobox are freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeComboBox(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewComboBox *cbPtr = (TreeViewComboBox *)stylePtr;
-
-    if (cbPtr->highlightGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->highlightGC);
-    }
-    if (cbPtr->activeGC != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->activeGC);
-    }
-    if (cbPtr->gc != NULL) {
-	Tk_FreeGC(viewPtr->display, cbPtr->gc);
-    }
-    if (cbPtr->icon != NULL) {
-	Blt_TreeView_FreeIcon(viewPtr, cbPtr->icon);
-    }
-}
-
-static TreeViewStyle *
-GetStyle(Tcl_Interp *interp, TreeView *viewPtr, const char *styleName)
-{
-    Blt_HashEntry *hPtr;
-
-    hPtr = Blt_FindHashEntry(&viewPtr->styleTable, styleName);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find cell style \"", styleName, 
-		"\"", (char *)NULL);
-	}
-	return NULL;
-    }
-    return Blt_GetHashValue(hPtr);
-}
-
-int
-Blt_TreeView_GetStyle(Tcl_Interp *interp, TreeView *viewPtr, 
-		      const char *styleName, TreeViewStyle **stylePtrPtr)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = GetStyle(interp, viewPtr, styleName);
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    stylePtr->refCount++;
-    *stylePtrPtr = stylePtr;
-    return TCL_OK;
-}
-
-#ifdef notdef
-int
-Blt_TreeView_GetStyleFromObj(Tcl_Interp *interp, TreeView *viewPtr, 
-	Tcl_Obj *objPtr, TreeViewStyle **stylePtrPtr)
-{
-    return Blt_TreeView_GetStyle(interp, viewPtr, Tcl_GetString(objPtr), stylePtrPtr);
-}
-#endif
-
-static TreeViewStyle *
-CreateStyle(
-     Tcl_Interp *interp,
-     TreeView *viewPtr,			/* Blt_TreeView_ widget. */
-     int type,				/* Type of style: either
-					 * STYLE_TEXTBOX,
-					 * STYLE_COMBOBOX, or
-					 * STYLE_CHECKBOX */
-    const char *styleName,		/* Name of the new style. */
-    int objc,
-    Tcl_Obj *const *objv)
-{    
-    Blt_HashEntry *hPtr;
-    int isNew;
-    TreeViewStyle *stylePtr;
-    
-    hPtr = Blt_CreateHashEntry(&viewPtr->styleTable, styleName, &isNew);
-    if (!isNew) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "cell style \"", styleName, 
-			     "\" already exists", (char *)NULL);
-	}
-	return NULL;
-    }
-    /* Create the new marker based upon the given type */
-    switch (type) {
-    case STYLE_TEXTBOX:
-	stylePtr = CreateTextBox(viewPtr, hPtr);
-	break;
-    case STYLE_COMBOBOX:
-	stylePtr = CreateComboBox(viewPtr, hPtr);
-	break;
-    case STYLE_CHECKBOX:
-	stylePtr = CreateCheckBox(viewPtr, hPtr);
-	break;
-    default:
-	return NULL;
-    }
-    bltTreeViewIconOption.clientData = viewPtr;
-    if (Blt_ConfigureComponentFromObj(interp, viewPtr->tkwin, styleName, 
-	stylePtr->classPtr->className, stylePtr->classPtr->specsPtr, 
-	objc, objv, (char *)stylePtr, 0) != TCL_OK) {
-	Blt_TreeView_FreeStyle(viewPtr, stylePtr);
-	return NULL;
-    }
-    return stylePtr;
-}
-
-void
-Blt_TreeView_UpdateStyleGCs(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    (*stylePtr->classPtr->configProc)(viewPtr, stylePtr);
-    stylePtr->flags |= STYLE_DIRTY;
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-}
-
-TreeViewStyle *
-Blt_TreeView_CreateStyle(
-     Tcl_Interp *interp,
-     TreeView *viewPtr,	/* Blt_TreeView_ widget. */
-     int type,			/* Type of style: either
-				 * STYLE_TEXTBOX,
-				 * STYLE_COMBOBOX, or
-				 * STYLE_CHECKBOX */
-    const char *styleName)	/* Name of the new style. */
-{    
-    TreeViewStyle *stylePtr;
-
-    stylePtr = CreateStyle(interp, viewPtr, type, styleName, 0, (Tcl_Obj **)NULL);
-    if (stylePtr == NULL) {
-	return NULL;
-    }
-    return stylePtr;
-}
-
-void
-Blt_TreeView_FreeStyle(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    stylePtr->refCount--;
-#ifdef notdef
-    fprintf(stderr, "Blt_TreeView_FreeStyle %s count=%d\n", stylePtr->name,
-	     stylePtr->refCount);
-#endif
-    /* Remove the style from the hash table so that it's name can be used.*/
-    /* If no cell is using the style, remove it.*/
-    if (stylePtr->refCount <= 0) {
-#ifdef notdef
-	fprintf(stderr, "freeing %s\n", stylePtr->name);
-#endif
-	bltTreeViewIconOption.clientData = viewPtr;
-	Blt_FreeOptions(stylePtr->classPtr->specsPtr, (char *)stylePtr, 
-			   viewPtr->display, 0);
-	(*stylePtr->classPtr->freeProc)(viewPtr, stylePtr); 
-	if (stylePtr->hashPtr != NULL) {
-	    Blt_DeleteHashEntry(&viewPtr->styleTable, stylePtr->hashPtr);
-	} 
-	if (stylePtr->link != NULL) {
-	    /* Only user-generated styles will be in the list. */
-	    Blt_Chain_DeleteLink(viewPtr->userStyles, stylePtr->link);
-	}
-	if (stylePtr->name != NULL) {
-	    Blt_Free(stylePtr->name);
-	}
-	Blt_Free(stylePtr);
-    } 
-}
-
-void
-Blt_TreeView_SetStyleIcon(TreeView *viewPtr, TreeViewStyle *stylePtr, 
-			  TreeViewIcon icon)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-
-    if (tbPtr->icon != NULL) {
-	Blt_TreeView_FreeIcon(viewPtr, tbPtr->icon);
-    }
-    tbPtr->icon = icon;
-}
-
-GC
-Blt_TreeView_GetStyleGC(TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-    return tbPtr->gc;
-}
-
-Blt_Background
-Blt_TreeView_GetStyleBackground(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-    Blt_Background bg;
-
-    bg = (tbPtr->flags & STYLE_HIGHLIGHT) ? tbPtr->highlightBg : tbPtr->bg;
-    return (bg != NULL) ? bg : viewPtr->bg;
-}
-
-Blt_Font
-Blt_TreeView_GetStyleFont(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-
-    if (tbPtr->font != NULL) {
-	return tbPtr->font;
-    }
-    return viewPtr->font;
-}
-
-XColor *
-Blt_TreeView_GetStyleFg(TreeView *viewPtr, TreeViewStyle *stylePtr)
-{
-    TreeViewTextBox *tbPtr = (TreeViewTextBox *)stylePtr;
-
-    if (tbPtr->fgColor != NULL) {
-	return tbPtr->fgColor;
-    }
-    return viewPtr->fgColor;
-}
-
-static void
-DrawValue(TreeView *viewPtr, TreeViewEntry *entryPtr, TreeViewValue *valuePtr)
-{
-    int srcX, srcY, x, y;
-    int w, h;
-    int pixWidth, pixHeight;
-    int x1, x2, y1, y2;
-    TreeViewColumn *colPtr;
-    TreeViewStyle *stylePtr;
-    Blt_Background bg;
-    int overlap;
-
-    stylePtr = valuePtr->stylePtr;
-    if (stylePtr == NULL) {
-	stylePtr = valuePtr->columnPtr->stylePtr;
-    }
-    if (stylePtr->cursor != None) {
-	if (valuePtr == viewPtr->activeValuePtr) {
-	    Tk_DefineCursor(viewPtr->tkwin, stylePtr->cursor);
-	} else {
-	    if (viewPtr->cursor != None) {
-		Tk_DefineCursor(viewPtr->tkwin, viewPtr->cursor);
-	    } else {
-		Tk_UndefineCursor(viewPtr->tkwin);
-	    }
-	}
-    }
-    colPtr = valuePtr->columnPtr;
-    x = SCREENX(viewPtr, colPtr->worldX) + colPtr->pad.side1;
-    y = SCREENY(viewPtr, entryPtr->worldY);
-    h = entryPtr->height - 2;
-    w = valuePtr->columnPtr->width - PADDING(colPtr->pad);
-
-    y1 = viewPtr->titleHeight + viewPtr->inset;
-    y2 = Tk_Height(viewPtr->tkwin) - viewPtr->inset;
-    x1 = viewPtr->inset;
-    x2 = Tk_Width(viewPtr->tkwin) - viewPtr->inset;
-
-    if (((x + w) < x1) || (x > x2) || ((y + h) < y1) || (y > y2)) {
-	return;				/* Value is entirely clipped. */
-    }
-
-    /* Draw the background of the value. */
-    if ((valuePtr == viewPtr->activeValuePtr) ||
-	(!Blt_TreeView_EntryIsSelected(viewPtr, entryPtr))) {
-	bg = Blt_TreeView_GetStyleBackground(viewPtr, viewPtr->stylePtr);
-    } else {
-	bg = CHOOSE(viewPtr->selBg, stylePtr->selBg);
-    }
-    /*FIXME*/
-    /* bg = CHOOSE(viewPtr->selBg, stylePtr->selBg);  */
-    overlap = FALSE;
-    /* Clip the drawable if necessary */
-    srcX = srcY = 0;
-    pixWidth = w, pixHeight = h;
-    if (x < x1) {
-	pixWidth -= x1 - x;
-	srcX += x1 - x;
-	x = x1;
-	overlap = TRUE;
-    }
-    if ((x + w) >= x2) {
-	pixWidth -= (x + w) - x2;
-	overlap = TRUE;
-    }
-    if (y < y1) {
-	pixHeight -= y1 - y;
-	srcY += y1 - y;
-	y = y1;
-	overlap = TRUE;
-    }
-    if ((y + h) >= y2) {
-	pixHeight -= (y + h) - y2;
-	overlap = TRUE;
-    }
-    if (overlap) {
-	Drawable drawable;
-
-	drawable = Tk_GetPixmap(viewPtr->display, Tk_WindowId(viewPtr->tkwin), 
-		pixWidth, pixHeight, Tk_Depth(viewPtr->tkwin));
-	Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, 0, 0, 
-		pixWidth, pixHeight, 0, TK_RELIEF_FLAT);
-	Blt_TreeView_DrawValue(viewPtr, entryPtr, valuePtr, drawable, srcX, srcY);
-	XCopyArea(viewPtr->display, drawable, Tk_WindowId(viewPtr->tkwin), 
-		  viewPtr->lineGC, 0, 0, pixWidth, pixHeight, x, y+1);
-	Tk_FreePixmap(viewPtr->display, drawable);
-    } else {
-	Drawable drawable;
-
-	drawable = Tk_WindowId(viewPtr->tkwin);
-	Blt_FillBackgroundRectangle(viewPtr->tkwin, drawable, bg, x, y+1, w, h, 
-		0, TK_RELIEF_FLAT);
-	Blt_TreeView_DrawValue(viewPtr, entryPtr, valuePtr, drawable, x, y);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleActivateOp --
- *
- * 	Turns on/off highlighting for a particular style.
- *
- *	  .t style activate entry column
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleActivateOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewValue *oldValuePtr;
-
-    oldValuePtr = viewPtr->activeValuePtr;
-    if (objc == 3) {
-	Tcl_Obj *listObjPtr; 
-	TreeViewEntry *ep;
-	TreeViewValue *vp;
-
-	vp = viewPtr->activeValuePtr;
-	ep = viewPtr->activePtr;
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	if ((ep != NULL) && (vp != NULL)) {
-	    Tcl_Obj *objPtr; 
-	    objPtr = Tcl_NewLongObj(Blt_Tree_NodeId(ep->node));
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	    objPtr = Tcl_NewStringObj(vp->columnPtr->key, -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	} 
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else if (objc == 4) {
-	viewPtr->activeValuePtr = NULL;
-	if ((oldValuePtr != NULL)  && (viewPtr->activePtr != NULL)) {
-	    DrawValue(viewPtr, viewPtr->activePtr, oldValuePtr);
-	}
-    } else {
-	TreeViewColumn *colPtr;
-	TreeViewEntry *ep;
-	TreeViewValue *vp;
-
-	if (Blt_TreeView_GetEntry(viewPtr, objv[3], &ep) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Blt_TreeView_GetColumn(interp, viewPtr, objv[4], &colPtr) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	vp = Blt_TreeView_FindValue(ep, colPtr);
-	if (vp != NULL) {
-	    viewPtr->activePtr = ep;
-	    viewPtr->activeColumnPtr = colPtr;
-	    oldValuePtr = viewPtr->activeValuePtr;
-	    viewPtr->activeValuePtr = vp;
-	    if (vp != oldValuePtr) {
-		if (oldValuePtr != NULL) {
-		    DrawValue(viewPtr, ep, oldValuePtr);
-		}
-		DrawValue(viewPtr, ep, vp);
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleCgetOp --
- *
- *	  .t style cget "styleName" -background
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleCgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[3]));
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, viewPtr->tkwin, 
-	stylePtr->classPtr->specsPtr, (char *)viewPtr, objv[4], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleCheckBoxOp --
- *
- *	  .t style checkbox "styleName" -background blue
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleCheckBoxOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = CreateStyle(interp, viewPtr, STYLE_CHECKBOX, 
-	Tcl_GetString(objv[3]), objc - 4, objv + 4);
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    stylePtr->link = Blt_Chain_Append(viewPtr->userStyles, stylePtr);
-    Blt_TreeView_UpdateStyleGCs(viewPtr, stylePtr);
-    Tcl_SetObjResult(interp, objv[3]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleComboBoxOp --
- *
- *	  .t style combobox "styleName" -background blue
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleComboBoxOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = CreateStyle(interp, viewPtr, STYLE_COMBOBOX, 
-	Tcl_GetString(objv[3]), objc - 4, objv + 4);
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    stylePtr->link = Blt_Chain_Append(viewPtr->userStyles, stylePtr);
-    Blt_TreeView_UpdateStyleGCs(viewPtr, stylePtr);
-    Tcl_SetObjResult(interp, objv[3]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleConfigureOp --
- *
- * 	This procedure is called to process a list of configuration options
- * 	database, in order to reconfigure a style.
- *
- *	  .t style configure "styleName" option value
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font, etc. get
- *	set for stylePtr; old resources get freed, if there were any.
- *
- *---------------------------------------------------------------------------
- */
-static int
-StyleConfigureOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		 Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[3]));
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-	    stylePtr->classPtr->specsPtr, (char *)stylePtr, (Tcl_Obj *)NULL, 0);
-    } else if (objc == 5) {
-	return Blt_ConfigureInfoFromObj(interp, viewPtr->tkwin, 
-		stylePtr->classPtr->specsPtr, (char *)stylePtr, objv[5], 0);
-    }
-    bltTreeViewIconOption.clientData = viewPtr;
-    if (Blt_ConfigureWidgetFromObj(interp, viewPtr->tkwin, 
-	stylePtr->classPtr->specsPtr, objc - 4, objv + 4, (char *)stylePtr, 
-	BLT_CONFIG_OBJV_ONLY) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    (*stylePtr->classPtr->configProc)(viewPtr, stylePtr);
-    stylePtr->flags |= STYLE_DIRTY;
-    viewPtr->flags |= (LAYOUT_PENDING | DIRTY);
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleForgetOp --
- *
- * 	Eliminates one or more style names.  A style still may be in use after
- * 	its name has been officially removed.  Only its hash table entry is
- * 	removed.  The style itself remains until its reference count returns
- * 	to zero (i.e. no one else is using it).
- *
- *	  .t style forget "styleName"...
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-StyleForgetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-    int i;
-
-    for (i = 3; i < objc; i++) {
-	stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[i]));
-	if (stylePtr == NULL) {
-	    return TCL_ERROR;
-	}
-	/* 
-	 * Removing the style from the hash tables frees up the style
-	 * name again.  The style itself may not be removed until it's
-	 * been released by everything using it.
-	 */
-	if (stylePtr->hashPtr != NULL) {
-	    Blt_DeleteHashEntry(&viewPtr->styleTable, stylePtr->hashPtr);
-	    stylePtr->hashPtr = NULL;
-	} 
-	Blt_TreeView_FreeStyle(viewPtr, stylePtr);
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleHighlightOp --
- *
- * 	Turns on/off highlighting for a particular style.
- *
- *	  .t style highlight styleName on|off
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleHighlightOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-		 Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-    int bool, oldBool;
-
-    stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[3]));
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetBooleanFromObj(interp, objv[4], &bool) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    oldBool = ((stylePtr->flags & STYLE_HIGHLIGHT) != 0);
-    if (oldBool != bool) {
-	if (bool) {
-	    stylePtr->flags |= STYLE_HIGHLIGHT;
-	} else {
-	    stylePtr->flags &= ~STYLE_HIGHLIGHT;
-	}
-	Blt_TreeView_EventuallyRedraw(viewPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleNamesOp --
- *
- * 	Lists the names of all the current styles in the treeview widget.
- *
- *	  .t style names
- *
- * Results:
- *	Always TCL_OK.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleNamesOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	     Tcl_Obj *const *objv)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Tcl_Obj *listObjPtr, *objPtr;
-    TreeViewStyle *stylePtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&viewPtr->styleTable, &cursor); hPtr != NULL;
-	 hPtr = Blt_NextHashEntry(&cursor)) {
-	stylePtr = Blt_GetHashValue(hPtr);
-	objPtr = Tcl_NewStringObj(stylePtr->name, -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleSetOp --
- *
- * 	Sets a style for a given key for all the ids given.
- *
- *	  .t style set styleName key node...
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then interp->result
- *	contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-StyleSetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    Blt_TreeKey key;
-    TreeViewStyle *stylePtr;
-    int i;
-
-    stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[3]));
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    key = Blt_Tree_GetKey(viewPtr->tree, Tcl_GetString(objv[4]));
-    stylePtr->flags |= STYLE_LAYOUT;
-    for (i = 5; i < objc; i++) {
-	TreeViewEntry *entryPtr;
-	TreeViewTagIter iter;
-
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    TreeViewValue *vp;
-
-	    for (vp = entryPtr->values; vp != NULL; vp = vp->nextPtr) {
-		if (vp->columnPtr->key == key) {
-		    TreeViewStyle *oldStylePtr;
-
-		    stylePtr->refCount++;
-		    oldStylePtr = vp->stylePtr;
-		    vp->stylePtr = stylePtr;
-		    if (oldStylePtr != NULL) {
-			Blt_TreeView_FreeStyle(viewPtr, oldStylePtr);
-		    }
-		    break;
-		}
-	    }
-	}
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleTextBoxOp --
- *
- *	  .t style text "styleName" -background blue
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StyleTextBoxOp(TreeView *viewPtr, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    TreeViewStyle *stylePtr;
-
-    stylePtr = CreateStyle(interp, viewPtr, STYLE_TEXTBOX, 
-	Tcl_GetString(objv[3]), objc - 4, objv + 4);
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    stylePtr->link = Blt_Chain_Append(viewPtr->userStyles, stylePtr);
-    Blt_TreeView_UpdateStyleGCs(viewPtr, stylePtr);
-    Tcl_SetObjResult(interp, objv[3]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleUnsetOp --
- *
- * 	Removes a style for a given key for all the ids given.
- *	The cell's style is returned to its default state.
- *
- *	  .t style unset styleName key node...
- *
- * Results:
- *	A standard TCL result.  If TCL_ERROR is returned, then
- *	interp->result contains an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-StyleUnsetOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-	     Tcl_Obj *const *objv)
-{
-    Blt_TreeKey key;
-    TreeViewStyle *stylePtr;
-    int i;
-
-    stylePtr = GetStyle(interp, viewPtr, Tcl_GetString(objv[3]));
-    if (stylePtr == NULL) {
-	return TCL_ERROR;
-    }
-    key = Blt_Tree_GetKey(viewPtr->tree, Tcl_GetString(objv[4]));
-    stylePtr->flags |= STYLE_LAYOUT;
-    for (i = 5; i < objc; i++) {
-	TreeViewTagIter iter;
-	TreeViewEntry *entryPtr;
-
-	if (Blt_TreeView_FindTaggedEntries(viewPtr, objv[i], &iter) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (entryPtr = Blt_TreeView_FirstTaggedEntry(&iter); entryPtr != NULL; 
-	     entryPtr = Blt_TreeView_NextTaggedEntry(&iter)) {
-	    TreeViewValue *vp;
-
-	    for (vp = entryPtr->values; vp != NULL; vp = vp->nextPtr) {
-		if (vp->columnPtr->key == key) {
-		    if (vp->stylePtr != NULL) {
-			Blt_TreeView_FreeStyle(viewPtr, vp->stylePtr);
-			vp->stylePtr = NULL;
-		    }
-		    break;
-		}
-	    }
-	}
-    }
-    Blt_TreeView_EventuallyRedraw(viewPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StyleOp --
- *
- *	.t style activate $node $column
- *	.t style activate 
- *	.t style cget "highlight" -foreground
- *	.t style configure "highlight" -fg blue -bg green
- *	.t style checkbox "highlight"
- *	.t style highlight "highlight" on|off
- *	.t style combobox "highlight"
- *	.t style text "highlight"
- *	.t style forget "highlight"
- *	.t style get "mtime" $node
- *	.t style names
- *	.t style set "mtime" "highlight" all
- *	.t style unset "mtime" all
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec styleOps[] = {
-    {"activate",  1, StyleActivateOp,  3, 5, "entry column",},
-    {"cget",      2, StyleCgetOp,      5, 5, "styleName option",},
-    {"checkbox",  2, StyleCheckBoxOp,  4, 0, "styleName options...",},
-    {"combobox",  3, StyleComboBoxOp,  4, 0, "styleName options...",},
-    {"configure", 3, StyleConfigureOp, 4, 0, "styleName options...",},
-    {"forget",    1, StyleForgetOp,    3, 0, "styleName...",},
-    {"highlight", 1, StyleHighlightOp, 5, 5, "styleName boolean",},
-    {"names",     1, StyleNamesOp,     3, 3, "",}, 
-    {"set",       1, StyleSetOp,       6, 6, "key styleName tagOrId...",},
-    {"textbox",   1, StyleTextBoxOp,   4, 0, "styleName options...",},
-    {"unset",     1, StyleUnsetOp,     5, 5, "key tagOrId",},
-};
-
-static int nStyleOps = sizeof(styleOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_TreeView_StyleOp(TreeView *viewPtr, Tcl_Interp *interp, int objc,
-		     Tcl_Obj *const *objv)
-{
-    TreeViewCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nStyleOps, styleOps, BLT_OP_ARG2, objc, 
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc)(viewPtr, interp, objc, objv);
-    return result;
-}
-#endif /* NO_TREEVIEW */
diff --git a/blt3.0/src/bltTypes.h b/blt3.0/src/bltTypes.h
deleted file mode 100644
index dbee65b..0000000
--- a/blt3.0/src/bltTypes.h
+++ /dev/null
@@ -1,141 +0,0 @@
-
-/*
- * ----------------------------------------------------------------------
- *
- * Blt_Pad --
- *
- * 	Specifies vertical and horizontal padding.
- *
- *	Padding can be specified on a per side basis.  The fields
- *	side1 and side2 refer to the opposite sides, either
- *	horizontally or vertically.
- *
- *		side1	side2
- *              -----   -----
- *          x | left    right
- *	    y | top     bottom
- *
- * ----------------------------------------------------------------------
- */
-typedef struct {
-    unsigned short int side1, side2;
-} Blt_Pad;
-
-#define padLeft  	xPad.side1
-#define padRight  	xPad.side2
-#define padTop		yPad.side1
-#define padBottom	yPad.side2
-#define PADDING(x)	((x).side1 + (x).side2)
-
-/*
- * ----------------------------------------------------------------------
- *
- * The following enumerated values are used as bit flags.
- *	FILL_NONE		Neither coordinate plane is specified 
- *	FILL_X			Horizontal plane.
- *	FILL_Y			Vertical plane.
- *	FILL_BOTH		Both vertical and horizontal planes.
- *
- * ----------------------------------------------------------------------
- */
-#define FILL_NONE	0
-#define FILL_X		1
-#define FILL_Y		2
-#define FILL_BOTH	3
-
-/*
- * ----------------------------------------------------------------------
- *
- * Blt_Dashes --
- *
- * 	List of dash values (maximum 11 based upon PostScript limit).
- *
- * ----------------------------------------------------------------------
- */
-typedef struct {
-    unsigned char values[12];
-    int offset;
-} Blt_Dashes;
-
-#define LineIsDashed(d) ((d).values[0] != 0)
-
-/*
- * -------------------------------------------------------------------
- *
- * Point2D --
- *
- *	2-D coordinate.
- *
- * -------------------------------------------------------------------
- */
-typedef struct {
-    double x, y;
-} Point2D;
-
-/*
- * -------------------------------------------------------------------
- *
- * Point3D --
- *
- *	3-D coordinate.
- *
- * -------------------------------------------------------------------
- */
-typedef struct {
-    double x, y, z;
-} Point3D;
-
-/*
- * -------------------------------------------------------------------
- *
- * Segment2D --
- *
- *	2-D line segment.
- *
- * -------------------------------------------------------------------
- */
-typedef struct {
-    Point2D p, q;		/* The two end points of the segment. */
-} Segment2D;
-
-/*
- * -------------------------------------------------------------------
- *
- * Dim2D --
- *
- *	2-D dimension.
- *
- * -------------------------------------------------------------------
- */
-typedef struct {
-    short int width, height;
-} Dim2D;
-
-/*
- *----------------------------------------------------------------------
- *
- * Region2D --
- *
- *      2-D region.  Used to copy parts of images.
- *
- *----------------------------------------------------------------------
- */
-typedef struct {
-    double left, right, top, bottom;
-} Region2D;
-
-typedef struct {
-    double left, right, top, bottom, front, back;
-} Region3D;
-
-#define RegionWidth(r)		((r)->right - (r)->left + 1)
-#define RegionHeight(r)		((r)->bottom - (r)->top + 1)
-
-#define PointInRegion(e,x,y) \
-	(((x) <= (e)->right) && ((x) >= (e)->left) && \
-	 ((y) <= (e)->bottom) && ((y) >= (e)->top))
-
-#define PointInRectangle(r,x0,y0) \
-	(((x0) <= (int)((r)->x + (r)->width - 1)) && ((x0) >= (int)(r)->x) && \
-	 ((y0) <= (int)((r)->y + (r)->height - 1)) && ((y0) >= (int)(r)->y))
-
diff --git a/blt3.0/src/bltUnixBitmap.c b/blt3.0/src/bltUnixBitmap.c
deleted file mode 100644
index 98ce0f8..0000000
--- a/blt3.0/src/bltUnixBitmap.c
+++ /dev/null
@@ -1,672 +0,0 @@
-
-/*
- * bltUnixBitmap.c --
- *
- * This module implements X11-specific bitmap processing procedures for the
- * BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the Tk
- * library distrubution.  The photo image type was designed and implemented by
- * Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#include "bltInt.h"
-#include "bltHash.h"
-#ifdef notdef
-#include "bltPicture.h"
-#endif
-#include <X11/Xutil.h>
-#include <X11/Xproto.h>
-#include "bltBitmap.h"
-
-#define ROTATE_0	0
-#define ROTATE_90	1
-#define ROTATE_180	2
-#define ROTATE_270	3
-
-Pixmap
-Blt_PhotoImageMask(Tk_Window tkwin, Tk_PhotoImageBlock src)
-{
-    Pixmap bitmap;
-    int arraySize, bytes_per_line;
-    int offset, count;
-    int y;
-    unsigned char *bits;
-    unsigned char *dp;
-
-    bytes_per_line = (src.width + 7) / 8;
-    arraySize = src.height * bytes_per_line;
-    bits = Blt_AssertMalloc(sizeof(unsigned char) * arraySize);
-    dp = bits;
-    offset = count = 0;
-    for (y = 0; y < src.height; y++) {
-	int value, bitMask;
-	int x;
-	unsigned char *sp;
-
-	value = 0, bitMask = 1;
-	sp = src.pixelPtr + offset;
-	for (x = 0; x < src.width; /*empty*/ ) {
-	    unsigned long pixel;
-
-	    pixel = (sp[src.offset[3]] != 0x00);
-	    if (pixel) {
-		value |= bitMask;
-	    } else {
-		count++;	/* Count the number of transparent pixels. */
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		*dp++ = (unsigned char)value;
-		value = 0, bitMask = 1;
-	    }
-	    sp += src.pixelSize;
-	}
-	if (x & 7) {
-	    *dp++ = (unsigned char)value;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	Tk_MakeWindowExist(tkwin);
-	bitmap = XCreateBitmapFromData(Tk_Display(tkwin), Tk_WindowId(tkwin),
-	    (char *)bits, (unsigned int)src.width, (unsigned int)src.height);
-    } else {
-	bitmap = None;		/* Image is opaque. */
-    }
-    Blt_Free(bits);
-    return bitmap;
-}
-
-#ifdef notdef
-Pixmap
-Blt_PictureMask(Tk_Window tkwin, Picture *srcPtr)
-{
-    Blt_Pixel *srcRowPtr;
-    Pixmap bitmap;
-    int bytesPerLine;
-    int count;
-    int x, y;
-    unsigned char *bits;
-    unsigned char *destRowPtr;
-
-    bytesPerLine = (srcPtr->width + 7) / 8;
-    bits = Blt_AssertMalloc(sizeof(unsigned char)*srcPtr->height*bytesPerLine);
-    count = 0;
-    srcRowPtr = srcPtr->bits;
-    destRowPtr = bits;
-    for (y = 0; y < srcPtr->height; y++) {
-	int value, bitMask;
-	Blt_Pixel *sp;
-	unsigned char *dp;
-
-	sp = srcRowPtr, dp = destRowPtr;
-	value = 0, bitMask = 1;
-	for (x = 0; x < srcPtr->width; /*empty*/ ) {
-	    unsigned long pixel;
-
-	    pixel = (sp->Alpha != ALPHA_TRANSPARENT);
-	    if (pixel) {
-		value |= bitMask;
-	    } else {
-		count++;	/* Count the number of transparent pixels. */
-	    }
-	    bitMask <<= 1;
-	    x++;
-	    if (!(x & 7)) {
-		*dp++ = (unsigned char)value;
-		value = 0, bitMask = 1;
-	    }
-	    sp++;
-	}
-	if (x & 7) {
-	    *dp++ = (unsigned char)value;
-	}
-	srcRowPtr += srcPtr->pixelsPerRow;
-	destRowPtr += bytesPerLine;
-    }
-    if (count > 0) {
-	Tk_MakeWindowExist(tkwin);
-	bitmap = XCreateBitmapFromData(Tk_Display(tkwin), Tk_WindowId(tkwin),
-		(char *)bits, (unsigned int)srcPtr->width, 
-		(unsigned int)srcPtr->height);
-    } else {
-	bitmap = None;		/* Image is opaque. */
-    }
-    Blt_Free(bits);
-    return bitmap;
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given bitmap.
- *	We also need a special GC of depth 1, so that we do not need to rotate
- *	more than one plane of the bitmap.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, int srcHeight, /* Width and height of the source bitmap */
-    float angle,		/* # of degrees to rotate the bitmap. */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    GC bitmapGC;
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    XImage *srcImgPtr, *destImgPtr;
-    double rotWidth, rotHeight;
-    int destWidth, destHeight;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-    destWidth = ROUND(rotWidth);
-    destHeight = ROUND(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, destWidth, destHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, destWidth, destHeight, 
-	1, ZPixmap);
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sx;
-
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-		    
-		    sy = destWidth - x - 1;
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sy;
-
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = destWidth - x - 1, 
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x, sx;
-
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = x;
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		int x;
-
-		for (x = 0; x < destWidth; x++) {
-		    unsigned long pixel;
-
-		    pixel = XGetPixel(srcImgPtr, x, y);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double sox, soy;	/* Offset from the center of the source
-				 * rectangle. */
-	double destCX, destCY;	/* Offset to the center of the destination
-				 * rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/* Coordinates of the centers of source and destination rectangles */
-	sox = srcWidth * 0.5;
-	soy = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < destHeight; y++) {
-	    double ty;
-	    int x;
-
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-		double tx, rx, ry, sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += sox;
-		ry += soy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = XGetPixel(srcImgPtr, sx, sy);
-		if (pixel) {
-		    XPutPixel(destImgPtr, x, y, pixel);
-		}
-	    }
-	}
-    }
-    /* Write the rotated image into the destination bitmap. */
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	destWidth, destHeight);
-
-    /* Clean up the temporary resources used. */
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. The new bitmap is
- *	bounded by a specified region. Only this portion of the bitmap is
- *	scaled from the original bitmap.
- *
- *	By bounding scaling to a region we can generate a new bitmap which is
- *	no bigger than the specified viewport.
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, int srcHeight, 
-    int destWidth, int destHeight)
-{
-    Display *display;
-    GC bitmapGC;
-    Pixmap destBitmap;
-    Window root;
-    XImage *srcImgPtr, *destImgPtr;
-    double xScale, yScale;
-    int y;		/* Destination bitmap coordinates */
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-
-    root = Tk_RootWindow(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, destWidth, destHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, destWidth, destHeight, 
-	1, ZPixmap);
-
-    /*
-     * Scale each pixel of destination image from results of source
-     * image. Verify the coordinates, since the destination image can be
-     * bigger than the source
-     */
-    xScale = (double)srcWidth / (double)destWidth;
-    yScale = (double)srcHeight / (double)destHeight;
-
-    /* Map each pixel in the destination image back to the source. */
-    for (y = 0; y < destHeight; y++) {
-	int x, sy;
-
-	sy = (int)(yScale * (double)y);
-	for (x = 0; x < destWidth; x++) {
-	    int sx;
-	    unsigned long pixel;
-
-	    sx = (int)(xScale * (double)x);
-	    pixel = XGetPixel(srcImgPtr, sx, sy);
-	    if (pixel) {
-		XPutPixel(destImgPtr, x, y, pixel);
-	    }
-	}
-    }
-    /* Write the scaled image into the destination bitmap */
-
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	destWidth, destHeight);
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-    return destBitmap;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateScaleBitmapArea --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The caller
- *	also provides (offsets and dimensions) the region of interest in the
- *	destination bitmap.  This saves having to process the entire
- *	destination bitmap is only part of it is showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the destination
- *	image.  For each pixel, the corresponding pixel in the source bitmap
- *	is used.  This means that destination coordinates are first scaled to
- *	the size of the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapArea(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, int regionY,	/* Offset of region in virtual destination
-				 * bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int destWidth,		
-    unsigned int destHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    XImage *srcImgPtr, *destImgPtr;
-    double xScale, yScale;
-    double rotWidth, rotHeight;
-    GC bitmapGC;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    bitmapGC = Blt_GetBitmapGC(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    XSetForeground(display, bitmapGC, 0x0);
-    XFillRectangle(display, destBitmap, bitmapGC, 0, 0, regionWidth, 
-	regionHeight);
-
-    srcImgPtr = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, 
-	ZPixmap);
-    destImgPtr = XGetImage(display, destBitmap, 0, 0, regionWidth, 
-	regionHeight, 1, ZPixmap);
-    angle = FMOD(angle, 360.0);
-
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    xScale = rotWidth / (double)destWidth;
-    yScale = rotHeight / (double)destHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int x, y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sx;	
-
-		sx = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < regionWidth; x++) {
-		    int sy;	
-		    unsigned long pixel;
-
-		    sy = (int)(xScale *(double)(destWidth - (x + regionX) - 1));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sy;	
-
-		sy = (int)(yScale * (double)(destHeight - (y + regionY) - 1));
-		for (x = 0; x < regionWidth; x++) {
-		    int sx;	
-		    unsigned long pixel;
-
-		    sx = (int)(xScale *(double)(destWidth - (x + regionX) - 1));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sx;	
-
-		sx = (int)(yScale * (double)(destHeight - (y + regionY) - 1));
-		for (x = 0; x < regionWidth; x++) {
-		    int sy;	
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < regionHeight; y++) {
-		int sy;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < regionWidth; x++) {
-		    int sx;	
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = XGetPixel(srcImgPtr, sx, sy);
-		    if (pixel) {
-			XPutPixel(destImgPtr, x, y, pixel);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double sox, soy; 	/* Offset from the center of the source
-				 * rectangle. */
-	double rox, roy; 	/* Offset to the center of the rotated
-				 * rectangle. */
-	int x, y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	sox = srcWidth * 0.5;
-	soy = srcHeight * 0.5;
-	rox = rotWidth * 0.5;
-	roy = rotHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < regionHeight; y++) {
-	    double ty;
-
-	    ty = (yScale * (double)(y + regionY)) - roy;
-	    for (x = 0; x < regionWidth; x++) {
-		double tx, rx, ry;
-		int sx, sy;	
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rox;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += sox;
-		ry += soy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = XGetPixel(srcImgPtr, sx, sy);
-		if (pixel) {
-		    XPutPixel(destImgPtr, x, y, pixel);
-		}
-	    }
-	}
-    }
-    /* Write the rotated image into the destination bitmap. */
-    XPutImage(display, destBitmap, bitmapGC, destImgPtr, 0, 0, 0, 0, 
-	regionWidth, regionHeight);
-
-    /* Clean up the temporary resources used. */
-    XDestroyImage(srcImgPtr), XDestroyImage(destImgPtr);
-    return destBitmap;
-}
diff --git a/blt3.0/src/bltUnixDnd.c b/blt3.0/src/bltUnixDnd.c
deleted file mode 100644
index e76e463..0000000
--- a/blt3.0/src/bltUnixDnd.c
+++ /dev/null
@@ -1,5116 +0,0 @@
-
-
-/*
- *  bltUnixDnd.c --
- *
- * This module implements a drag-and-drop manager for the BLT Toolkit.
- * Allows widgets to be registered as drag&drop sources and targets
- * for handling "drag-and-drop" operations between Tcl/Tk
- * applications.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_DRAGDROP
-#include "bltOp.h"
-#include <bltHash.h>
-#include <bltChain.h>
-
-
-#include <X11/Xatom.h>
-#include <X11/Xproto.h>
-
-#define DND_THREAD_KEY	"BLT Dnd Data"
-
-#define DND_SELECTED	(1<<0)
-#define DND_INITIATED	(1<<1)
-#define DND_ACTIVE	(DND_SELECTED | DND_INITIATED)
-#define DND_IN_PACKAGE  (1<<2)	/* Indicates if a token package command is
-				 * currently active. The user may invoke
-				 * "update" or "tkwait" commands from within
-				 * the package command script. This allows the
-				 * "drag" operation to preempt itself. */
-#define DND_VOIDED	(1<<3)
-#define DND_DELETED	(1<<4)
-
-#define PACK(lo,hi)	(((hi) << 16) | ((lo) & 0x0000FFFF))
-#define UNPACK(x,lo,hi) ((lo) = (x & 0x0000FFFF), (hi) = (x >> 16))
-
-#define WATCH_ENTER	(1<<0)
-#define WATCH_LEAVE	(1<<1)
-#define WATCH_MOTION	(1<<2)
-#define WATCH_MASK	(WATCH_ENTER | WATCH_LEAVE | WATCH_MOTION)
-
-/* Source-to-Target Message Types */
-
-#define ST_DRAG_ENTER	0x1001
-#define ST_DRAG_LEAVE	0x1002
-#define ST_DRAG_MOTION	0x1003
-#define ST_DROP		0x1004
-
-/* Target-to-Source Message Types */
-
-#define TS_DRAG_STATUS	0x1005
-#define TS_START_DROP	0x1006
-#define TS_DROP_RESULT	0x1007
-
-/* Indices of information fields in ClientMessage array. */
-
-#define MESG_TYPE	0	/* Message type. */
-#define MESG_WINDOW	1	/* Window id of remote. */
-#define MESG_TIMESTAMP	2	/* Transaction timestamp. */
-#define MESG_POINT	3	/* Root X-Y coordinate. */
-#define MESG_STATE	4	/* Button and key state. */
-#define MESG_RESPONSE	3	/* Response to drag/drop message. */
-#define MESG_FORMAT	3	/* Format atom. */
-#define MESG_PROPERTY	4	/* Index of button #/key state. */
-
-/* Drop Status Values (actions included) */
-
-#define DROP_CONTINUE	-2
-#define DROP_FAIL	-1
-#define DROP_CANCEL	0
-#define DROP_OK		1
-#define DROP_COPY	1
-#define DROP_LINK	2
-#define DROP_MOVE	3
-
-#define PROP_WATCH_FLAGS	0
-#define PROP_DATA_FORMATS	1
-#define PROP_MAX_SIZE		1000	/* Maximum size of property. */
-
-#define PROTO_BLT	0
-#define PROTO_XDND	1
-
-#define TOKEN_OFFSET	0
-#define TOKEN_REDRAW	(1<<0)
-
-#define TOKEN_NORMAL	0
-#define TOKEN_REJECT	-1
-#define TOKEN_ACTIVE	1
-#define TOKEN_TIMEOUT	5000	/* 5 second timeout for drop requests. */
-
-/*
- *   Each widget representing a drag & drop target is tagged with 
- *   a "BltDndTarget" property in XA_STRING format.  This property 
- *   identifies the window as a target.  It's formated as a TCL list 
- *   and contains the following information:
- *
- *	"flags DATA_TYPE DATA_TYPE ..."
- *
- *	"INTERP_NAME TARGET_NAME WINDOW_ID DATA_TYPE DATA_TYPE ..."
- *
- *	INTERP_NAME	Name of the target application's interpreter.
- *	TARGET_NAME	Path name of widget registered as the drop target.  
- *	WINDOW_ID	Window Id of the target's communication window. 
- *			Used to forward Enter/Leave/Motion event information 
- *			to the target.
- *	DATA_TYPE	One or more "types" handled by the target.
- *
- *   When the user invokes the "drag" operation, the window hierarchy
- *   is progressively examined.  Window information is cached during
- *   the operation, to minimize X server traffic. Windows carrying a
- *   "BltDndTarget" property are identified.  When the token is dropped 
- *   over a valid site, the drop information is sent to the application 
- *   via the usual "send" command.  If communication fails, the drag&drop 
- *   facility automatically posts a rejection symbol on the token window.  
- */
-
-/* 
- * Drop Protocol:
- *
- *		Source				Target
- *              ------                          ------
- *   ButtonRelease-? event.
- *   Invokes blt::dnd drop
- *		   +
- *   Send "drop" message to target (via 
- *   ClientMessage). Contains X-Y, key/ --> Gets "drop" message. 
- *   button state, source window XID.       Invokes LeaveCmd proc.
- *					    Gets property from source of 
- *					    ordered matching formats.  
- *					            +
- *					    Invokes DropCmd proc. Arguments
- *					    are X-Y coordinate, key/button 
- *					    state, transaction timestamp, 
- *					    list of matching formats.  
- *						    +
- *					    Target selects format and invokes
- *					    blt::dnd pull to transfer the data
- *					    in the selected format.
- *						    +
- *					    Sends "drop start" message to 
- *					    source.  Contains selected format
- *   Gets "drop start" message.		<-- (as atom), ?action?, target window
- *   Invokes data handler for the     	    ID, transaction timestamp. 
- *   selected format.				    +
- *                +			    Waits for property to change on
- *   Places first packet of data in         its window.  Time out set for
- *   property on target window.         --> no response.
- *                +                                 +
- *   Waits for response property            After each packet, sets zero-length
- *   change. Time out set for no resp.  <-- property on source window.
- *   If non-zero length packet, error               +
- *   occurred, packet is error message.     Sends "drop finished" message.
- *					    Contains transaction timestamp, 
- *   Gets "drop finished" message.      <-- status, ?action?.
- *   Invokes FinishCmd proc. 
- */
-
-/* Configuration Parameters */
-
-#define DEF_DND_BUTTON_BACKGROUND		RGB_YELLOW
-#define DEF_DND_BUTTON_BG_MONO		STD_NORMAL_BG_MONO
-#define DEF_DND_BUTTON_NUMBER		"3"
-#define DEF_DND_ENTER_COMMAND		(char *)NULL
-#define DEF_DND_LEAVE_COMMAND		(char *)NULL
-#define DEF_DND_MOTION_COMMAND		(char *)NULL
-#define DEF_DND_DROP_COMMAND		(char *)NULL
-#define DEF_DND_RESULT_COMMAND		(char *)NULL
-#define DEF_DND_PACKAGE_COMMAND		(char *)NULL
-#define DEF_DND_SELF_TARGET		"no"
-#define DEF_DND_SEND			(char *)NULL
-#define DEF_DND_IS_TARGET		"no"
-#define DEF_DND_IS_SOURCE		"no"
-#define DEF_DND_SITE_COMMAND		(char *)NULL
-
-#define DEF_DND_DRAG_THRESHOLD		"0"
-#define DEF_TOKEN_ACTIVE_BACKGROUND	STD_ACTIVE_BACKGROUND
-#define DEF_TOKEN_ACTIVE_BG_MONO	STD_ACTIVE_BG_MONO
-#define DEF_TOKEN_ACTIVE_BORDERWIDTH	"3"
-#define DEF_TOKEN_ACTIVE_RELIEF		"sunken"
-#define DEF_TOKEN_ANCHOR		"se"
-#define DEF_TOKEN_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_TOKEN_BG_MONO		STD_NORMAL_BG_MONO
-#define DEF_TOKEN_BORDERWIDTH		"3"
-#define DEF_TOKEN_CURSOR		"top_left_arrow"
-#define DEF_TOKEN_REJECT_BACKGROUND	STD_NORMAL_BACKGROUND
-#define DEF_TOKEN_REJECT_BG_MONO	RGB_WHITE
-#define DEF_TOKEN_REJECT_FOREGROUND	RGB_RED
-#define DEF_TOKEN_REJECT_FG_MONO	RGB_BLACK
-#define DEF_TOKEN_REJECT_STIPPLE_COLOR	(char *)NULL
-#define DEF_TOKEN_REJECT_STIPPLE_MONO	RGB_GREY50
-#define DEF_TOKEN_RELIEF		"raised"
-
-static Blt_OptionFreeProc FreeCursors;
-static Blt_OptionParseProc ObjToCursors;
-static Blt_OptionPrintProc CursorsToObj;
-static Blt_CustomOption cursorsOption =
-{
-    ObjToCursors, CursorsToObj, FreeCursors, (ClientData)0
-};
-
-typedef struct {
-    Blt_HashTable dndTable;	/* Hash table of dnd structures keyed by 
-				 * the address of the reference Tk window */
-    Tk_Window tkMain;
-    Display *display;
-    Atom mesgAtom;		/* Atom signifying a drag-and-drop message. */
-    Atom formatsAtom;		/* Source formats property atom.  */
-    Atom targetAtom;		/* Target property atom. */
-    Atom commAtom;		/* Communication property atom. */
-
-#ifdef HAVE_XDND
-    Blt_HashTable handlerTable; /* Table of toplevel windows with XdndAware 
-				 * properties attached to them. */
-    Atom XdndActionListAtom;
-    Atom XdndAwareAtom;
-    Atom XdndEnterAtom;
-    Atom XdndFinishedAtom;
-    Atom XdndLeaveAtom;
-    Atom XdndPositionAtom;
-    Atom XdndSelectionAtom;
-    Atom XdndStatusAtom;
-    Atom XdndTypeListAtom;
-
-    Atom XdndActionCopyAtom;
-    Atom XdndActionMoveAtom;
-    Atom XdndActionLinkAtom;
-    Atom XdndActionAskAtom;
-    Atom XdndActionPrivateAtom;
-    Atom XdndActionDescriptionAtom;
-#endif
-} DndInterpData;
-
-
-typedef struct {
-    Tcl_DString dString;
-    Window window;		/* Source/Target window */
-    Display *display;
-    Atom commAtom;		/* Data communication property atom. */
-    int packetSize;
-    Tcl_TimerToken timerToken;
-    int status;			/* Status of transaction:  CONTINUE, OK, FAIL,
-				 * or TIMEOUT. */
-    int timestamp;		/* Timestamp of the transaction. */
-    int offset;
-    int protocol;		/* Drag-and-drop protocol used by the source:
-				 * either PROTO_BLT or PROTO_XDND. */
-} DropPending;
-
-/* 
- * SubstDescriptors --
- *
- *	Structure to hold letter-value pairs for percent substitutions.
- */
-typedef struct {
-    char letter;		/* character like 'x' in "%x" */
-    const char *value;		/* value to be substituted in place of "%x" */
-} SubstDescriptors;
-
-/*
- *  Drag&Drop Registration Data
- */
-typedef struct {
-    Tk_Window tkwin;		/* Window that embodies the token.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up. */
-
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-    Tcl_Interp *interp;		/* Interpreter associated with widget.  Used
-				 * to delete widget command. */
-    Tk_3DBorder border;		/* Structure used to draw 3-D border and
-				 * background.  NULL means no background
-				 * or border. */
-    int borderWidth;		/* Width of 3-D border (if any). */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED etc. */
-
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-
-    /* Token specific fields */
-    int x, y;			/* Last position of token window */
-    int startX, startY;
-
-    int status;			/* Indicates the current status of the token:
-				 * 0 is normal, 1 is active. */
-    int lastStatus;		/* Indicates the last status of the token. */
-    Tcl_TimerToken timerToken;	/* Token for routine to hide tokenwin */
-    GC fillGC;			/* GC used to draw rejection fg: (\) */
-    GC outlineGC;		/* GC used to draw rejection bg: (\) */
-    int width, height;
-
-    /* User-configurable fields */
-
-    Tk_Anchor anchor;		/* Position of token win relative to mouse */
-    Tk_3DBorder normalBorder;	/* Border/background for token window */
-    Tk_3DBorder activeBorder;	/* Border/background for token window */
-    int activeRelief;
-    int activeBW;	/* Border width in pixels */
-    XColor *fillColor;		/* Color used to draw rejection fg: (\) */
-    XColor *outlineColor;	/* Color used to draw rejection bg: (\) */
-    Pixmap rejectStipple;	/* Stipple used to draw rejection: (\) */
-    int reqWidth, reqHeight;
-
-    int nSteps;
-
-} Token;
-
-/*
- *  Winfo --
- *
- *	This structure represents a window hierarchy examined during a single
- *	"drag" operation.  It's used to cache information to reduce the round
- *	trip calls to the server needed to query window geometry information
- *	and grab the target property.  
- */
-typedef struct _Winfo {
-    Window window;		/* Window in hierarchy. */
-    
-    int initialized;		/* If zero, the rest of this structure's
-				 * information hasn't been set. */
-    
-    int x1, y1, x2, y2;		/* Extents of the window (upper-left and
-				 * lower-right corners). */
-    
-    struct _Winfo *parentPtr;	/* Parent node. NULL if root. Used to
-				 * compute offset for X11 windows. */
-    
-    Blt_Chain chain;		/* List of this window's children. If NULL,
-				 * there are no children. */
-    
-    int isTarget;		/* Indicates if this window is a drag&drop
-				 * target. */
-    int lookedForProperty;	/* Indicates if this window  */
-    
-    int eventFlags;		/* Retrieved from the target's drag&drop 
-				 * property, indicates what kinds of pointer
-				 * events should be relayed to the target via
-				 * ClientMessages. Possible values are OR-ed 
-				 * combinations of the following bits: 
-				 *	001 Enter events.  
-				 *	010 Motion events.
-				 *	100 Leave events.  
-				 */
-    const char *matches;
-    
-} Winfo;
-
-/*
- *  Dnd --
- *
- *	This structure represents the drag&drop manager.  It is associated
- *	with a widget as a drag&drop source, target, or both.  It contains
- *	both the source and target components, since a widget can be both 
- *	a drag source and a drop target.  
- */
-typedef struct {
-    Tcl_Interp *interp;		/* Interpreter associated with the drag&drop
-				 * manager. */
-    
-    Tk_Window tkwin;		/* Tk window representing the drag&drop 
-				 * manager (can be source and/or target). */
-
-    Display *display;		/* Display for drag&drop widget. Saved to free
-				 * resources after window has been destroyed. */
-
-    int isSource;		/* Indicates if this drag&drop manager can act
-				 * as a drag source. */
-    int isTarget;		/* Indicates if this drag&drop manager can act
-				 * as a drop target. */
-
-    int targetPropertyExists;	/* Indicates is the drop target property has 
-				 * been set. */
-
-    unsigned int flags;		/* Various flags;  see below for
-				 * definitions. */
-    int timestamp;		/* Id of the current drag&drop transaction. */
-
-    int x, y;			/* Last known location of the mouse pointer. */
-
-    Blt_HashEntry *hashPtr;
-
-    DndInterpData *dataPtr;	
-
-    /* Source component. */
-    
-    Blt_HashTable getDataTable;	/* Table of data handlers (converters)
-				 * registered for this source. */
-
-    int reqButton;		/* Button used to invoke drag operation. */
-
-    int button;			/* Last button press detected. */
-    int keyState;		/* Last key state.  */
-
-    Tk_Cursor cursor;		/* Cursor restored after dragging */
-
-    int selfTarget;		/* Indicated if the source should drop onto 
-				 * itself. */
-
-    const char **reqFormats;	/* List of requested data formats. The
-				 * list should be ordered with the more 
-				 * desireable formats first. You can also
-				 * temporarily turn off a source by setting 
-				 * the value to the empty string. */
-
-    Winfo *rootPtr;		/* Cached window information: Gathered
-				 * and used during the "drag" operation 
-				 * to see if the mouse pointer is over a 
-				 * valid target. */
-
-    Winfo *windowPtr;		/* Points to information about the last 
-				 * target the pointer was over. If NULL, 
-				 * the pointer was not over a valid target. */
-
-    const char **packageCmd;	/* TCL command executed at start of the drag
-				 * operation to initialize token. */
-
-    const char **resultCmd;	/* TCL command executed at the end of the
-				 * "drop" operation to indicate its status. */
-
-    const char **siteCmd;	/* TCL command executed to update token 
-				 * window. */
-
-    Token *tokenPtr;		/* Token used to provide special cursor. */
-    
-
-    Tcl_TimerToken timerToken;
-
-    Tk_Cursor *cursors;		/* Array of drag-and-drop cursors. */
-    int cursorPos;
-
-    int dragStart;		/* Minimum number of pixels movement
-				 * before B1-Motion is considered to
-				 * start dragging. */
-
-    /* Target component. */
-
-    Blt_HashTable setDataTable;	/* Table of data handlers (converters)
-				 * registered for this target. */
-    const char **enterCmd;	/* TCL proc called when the mouse enters the
-				 * target. */
-    const char **leaveCmd;	/* TCL proc called when the mouse leaves the
-				 * target. */
-    const char **motionCmd;	/* TCL proc called when the mouse is moved
-				 * over the target. */
-    const char **dropCmd;	/* TCL proc called when the mouse button
-				 * is released over the target. */
-
-    const char *matchingFormats;  /*  */
-    int lastId;			/* The last transaction id used. This is used
-				 * to cache the above formats string. */
-
-    DropPending *pendingPtr;	/* Points to structure containing information
-				 * about a current drop in progress. If NULL,
-				 * no drop is in progress. */
-
-    short int dropX, dropY;	/* Location of the current drop. */
-    short int dragX, dragY;	/* Starting position of token window */
-} Dnd;
-
-
-typedef struct {
-    Tk_Window tkwin;		/* Toplevel window of the drop target. */
-    int refCount;		/* # of targets referencing this structure. */
-    Dnd *dndPtr;		/* Last drop target selected.  Used the 
-				 * implement Enter/Leave events for targets. 
-				 * If NULL, indicates that no drop target was 
-				 * previously selected. */
-    int lastRepsonse;		/* Indicates what the last response was. */
-    Window window;		/* Window id of the top-level window (ie.
-				 * the wrapper). */
-    const char **formatArr;	/* List of formats available from source. 
-				 * Must be pruned down to matching list. */
-    DndInterpData *dataPtr;
-    int x, y;
-    
-} XDndHandler;
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_LIST, "-allowformats", "allowFormats", "AllowFormats", 
-	DEF_DND_SEND, Blt_Offset(Dnd, reqFormats), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_INT, "-button", "buttonNumber", "ButtonNumber",
-	DEF_DND_BUTTON_NUMBER, Blt_Offset(Dnd, reqButton), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-dragthreshold", "dragThreshold", "DragThreshold",
-	DEF_DND_DRAG_THRESHOLD, Blt_Offset(Dnd, dragStart), 0},
-    {BLT_CONFIG_CUSTOM, "-cursors", "cursors", "cursors", DEF_TOKEN_CURSOR, 
-	Blt_Offset(Dnd, cursors), BLT_CONFIG_NULL_OK, &cursorsOption },
-    {BLT_CONFIG_LIST, "-onenter", "onEnter", "OnEnter", DEF_DND_ENTER_COMMAND, 
-	Blt_Offset(Dnd, enterCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-onmotion", "onMotion", "OnMotion", 
-	DEF_DND_MOTION_COMMAND, Blt_Offset(Dnd, motionCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-onleave", "onLeave", "OnLeave", DEF_DND_LEAVE_COMMAND, 
-	Blt_Offset(Dnd, leaveCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-ondrop", "onDrop", "OnDrop", DEF_DND_DROP_COMMAND, 
-	Blt_Offset(Dnd, dropCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-package", "packageCommand", "PackageCommand",
-	DEF_DND_PACKAGE_COMMAND, Blt_Offset(Dnd, packageCmd), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_LIST, "-result", "result", "Result", DEF_DND_RESULT_COMMAND, 
-	Blt_Offset(Dnd, resultCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-selftarget", "selfTarget", "SelfTarget",
-	DEF_DND_SELF_TARGET, Blt_Offset(Dnd, selfTarget), 0},
-    {BLT_CONFIG_LIST, "-site", "siteCommand", "Command", DEF_DND_SITE_COMMAND, 
-	Blt_Offset(Dnd, siteCmd), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-source", "source", "Source", DEF_DND_IS_SOURCE, 
-	Blt_Offset(Dnd, isSource), 0},
-    {BLT_CONFIG_BOOLEAN, "-target", "target", "Target", DEF_DND_IS_TARGET, 
-	Blt_Offset(Dnd, isTarget), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0},
-};
-
-static Blt_ConfigSpec tokenConfigSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_TOKEN_ACTIVE_BACKGROUND,
-	Blt_Offset(Token, activeBorder), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BORDER, "-activebackground", "activeBackground",
-	"ActiveBackground", DEF_TOKEN_ACTIVE_BG_MONO, 
-	Blt_Offset(Token, activeBorder), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_RELIEF, "-activerelief", "activeRelief", "activeRelief",
-	DEF_TOKEN_ACTIVE_RELIEF, Blt_Offset(Token, activeRelief), 0},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
-	DEF_TOKEN_ANCHOR, Blt_Offset(Token, anchor), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-activeborderwidth", "activeBorderWidth",
-	"ActiveBorderWidth", DEF_TOKEN_ACTIVE_BORDERWIDTH, 
-	Blt_Offset(Token, activeBW), 0},
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_TOKEN_BACKGROUND, Blt_Offset(Token, normalBorder),
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_TOKEN_BG_MONO, Blt_Offset(Token, normalBorder),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_TOKEN_BORDERWIDTH, Blt_Offset(Token, borderWidth), 0},
-    {BLT_CONFIG_COLOR, "-outline", "outline", "Outline", 
-	DEF_TOKEN_REJECT_BACKGROUND, Blt_Offset(Token, outlineColor), 
-	BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-outline", "outline", "Outline", 
-	DEF_TOKEN_REJECT_BG_MONO, Blt_Offset(Token, outlineColor), 
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-fill", "fill", "Fill", DEF_TOKEN_REJECT_FOREGROUND, 
-	Blt_Offset(Token, fillColor), BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-fill", "fill", "Fill", DEF_TOKEN_REJECT_BACKGROUND, 
-	Blt_Offset(Token, fillColor), BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_BITMAP, "-rejectstipple", "rejectStipple", "Stipple",
-	DEF_TOKEN_REJECT_STIPPLE_COLOR, Blt_Offset(Token, rejectStipple),
-	BLT_CONFIG_COLOR_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BITMAP, "-rejectstipple", "rejectStipple", "Stipple",
-	DEF_TOKEN_REJECT_STIPPLE_MONO, Blt_Offset(Token, rejectStipple),
-	BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_TOKEN_RELIEF, 
-	Blt_Offset(Token, relief), 0},
-    {BLT_CONFIG_INT, "-width", "width", "Width", (char *)NULL, 
-	Blt_Offset(Token, reqWidth), 0},
-    {BLT_CONFIG_INT, "-height", "height", "Height", (char *)NULL, 
-	Blt_Offset(Token, reqHeight), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, 
-	0, 0},
-};
-
-/*
- *  Forward Declarations
- */
-
-static Tcl_ObjCmdProc DndCmd;
-static Tcl_FreeProc DestroyDnd;
-static Tk_GenericProc DndEventProc;
-static Tk_EventProc TokenEventProc;
-static Tcl_IdleProc DisplayToken;
-
-static Winfo *InitRoot (Dnd *dndPtr);
-static Winfo *OverTarget (Dnd *dndPtr);
-static int ConfigureToken (Tcl_Interp *interp, Dnd *dndPtr, int objc,	
-	Tcl_Obj *const *objv, int flags);
-static int GetDndFromObj (ClientData clientData, Tcl_Interp *interp,
-	Tcl_Obj *objPtr, Dnd **dndPtrPtr);
-static void AddTargetProperty (Dnd *dndPtr);
-static void CancelDrag (Dnd *dndPtr);
-static void DrawRejectSymbol (Dnd *dndPtr);
-static void FreeWinfo (Winfo *wr);
-static void GetWinfo (Display *display, Winfo * windowPtr);
-static void HideToken (Dnd *dndPtr);
-static void MoveToken (Dnd *dndPtr);
-static Dnd *CreateDnd (Tcl_Interp *interp, Tk_Window tkwin);
-
-/*ARGSUSED*/
-static void
-FreeCursors(
-    ClientData clientData,	/* Not used. */
-    Display *display,		
-    char *widgRec,
-    int offset)
-{
-    Tk_Cursor **cursorsPtr = (Tk_Cursor **)(widgRec + offset);
-
-    if (*cursorsPtr != NULL) {
-	Tk_Cursor *cp;
-
-	for (cp = *cursorsPtr; *cp != None; cp++) {
-	    Tk_FreeCursor(display, *cp);
-	}
-	Blt_Free(*cursorsPtr);
-	*cursorsPtr = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToCursors --
- *
- *	Converts the resize mode into its numeric representation.  Valid
- *	mode strings are "none", "expand", "shrink", or "both".
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToCursors(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    Tk_Window tkwin,		/* Not used. */
-    Tcl_Obj *objPtr,		/* String representing cursors. */
-    char *widgRec,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    int objc;
-    Tcl_Obj **objv;
-
-    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 0) {
-	Tk_Cursor **cursorsPtr = (Tk_Cursor **)(widgRec + offset);
-	Tk_Cursor *cursors;
-	int i;
-
-	cursors = Blt_AssertCalloc(objc + 1, sizeof(Tk_Cursor));
-	for (i = 0; i < objc; i++) {
-	    cursors[i] = Tk_AllocCursorFromObj(interp, tkwin, objv[i]);
-	    if (cursors[i] == None) {
-		Tk_Cursor *cp;
-
-		for (cp = cursors; *cp != None; cp++) {
-		    Tk_FreeCursor(Tk_Display(tkwin), *cp);
-		}
-		return TCL_ERROR;
-	    }
-	}    
-	*cursorsPtr = cursors;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CursorsToObj --
- *
- *	Returns resize mode string based upon the resize flags.
- *
- * Results:
- *	The resize mode string is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static Tcl_Obj *
-CursorsToObj(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    Tk_Window tkwin,		/* Not used. */
-    char *widgRec,		/* Cursor record */
-    int offset,			/* Offset to field in structure */
-    int flags)	
-{
-    Tk_Cursor *cursors = *(Tk_Cursor **)(widgRec + offset);
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (cursors != NULL) {
-	Tcl_Obj *objPtr;
-	Tk_Cursor *cp;
-
-	for (cp = cursors; *cp != NULL; cp++) {
-	    objPtr = Tcl_NewStringObj(Tk_NameOfCursor(Tk_Display(tkwin), *cp),
-		-1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-    }
-    return listObjPtr;
-}
-
-
-static Tcl_Obj *
-PrintList(Tcl_Interp *interp, const char **list)
-{
-    Tcl_Obj *listObjPtr;
-    const char **p;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for(p = list; *p != NULL; p++) {
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(*p, -1));
-    }
-    return listObjPtr;
-}
-
-
-/* ARGSUSED */
-static int
-XSendEventErrorProc(
-    ClientData clientData, 
-    XErrorEvent *errEventPtr)
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-static void
-SendClientMsg(
-    Display *display,
-    Window window,
-    Atom mesgAtom,
-    int data0, int data1, int data2, int data3, int data4)
-{
-    XEvent event;
-    Tk_ErrorHandler handler;
-    int result;
-    int any = -1;
-
-    event.xclient.type = ClientMessage;
-    event.xclient.serial = 0;
-    event.xclient.send_event = True;
-    event.xclient.display = display;
-    event.xclient.window = window;
-    event.xclient.message_type = mesgAtom;
-    event.xclient.format = 32;
-    event.xclient.data.l[0] = data0;
-    event.xclient.data.l[1] = data1;
-    event.xclient.data.l[2] = data2;
-    event.xclient.data.l[3] = data3;
-    event.xclient.data.l[4] = data4;
-
-    result = TCL_OK;
-    handler = Tk_CreateErrorHandler(display, any, X_SendEvent, any,
-	XSendEventErrorProc, &result);
-    if (!XSendEvent(display, window, False, ClientMessage, &event)) {
-	result = TCL_ERROR;
-    }
-    Tk_DeleteErrorHandler(handler);
-    XSync(display, False);
-    if (result != TCL_OK) {
-	fprintf(stderr, "XSendEvent response to drop: Protocol failed\n");
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWindowZOrder --
- *
- *	Returns a chain of the child windows according to their stacking
- *	order. The window ids are ordered from top to bottom.
- *
- * ------------------------------------------------------------------------ 
- */
-static Blt_Chain
-GetWindowZOrder(Display *display, Window window)
-{
-    Blt_Chain chain;
-    Window *winv;
-    unsigned int winc;
-    Window dummy;
-
-    chain = NULL;
-    if ((XQueryTree(display, window, &dummy, &dummy, &winv, &winc)) && 
-	(winc > 0)) {
-	unsigned int i;
-
-	chain = Blt_Chain_Create();
-	for (i = 0; i < winc; i++) {
-	    /* 
-	     * XQuery returns windows in bottom to top order.  We only care
-	     * about the top window.  
-	     */
-	    Blt_Chain_Prepend(chain, (ClientData)winv[i]);
-	}
-	if (winv != NULL) {
-	    XFree((char *)winv);	/* done with list of kids */
-	}
-    }
-    return chain;
-}
-
-static int
-GetMaxPropertySize(Display *display)
-{
-    int size;
-
-    size = Blt_MaxRequestSize(display, sizeof(char));
-    size -= 32;
-    return size;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetProperty --
- *
- *	Returns the data associated with the named property on the
- *	given window.  All data is assumed to be 8-bit string data.
- *
- * ------------------------------------------------------------------------ 
- */
-static unsigned char *
-GetProperty(Display *display, Window window, Atom atom)
-{
-    unsigned char *data;
-    int result, format;
-    Atom typeAtom;
-    unsigned long nItems, bytesAfter;
-
-    if (window == None) {
-	return NULL;
-    }
-    data = NULL;
-    result = XGetWindowProperty(
-        display,		/* Display of window. */
-	window,			/* Window holding the property. */
-        atom,			/* Name of property. */
-        0,			/* Offset of data (for multiple reads). */
-	GetMaxPropertySize(display), /* Maximum number of items to read. */
-	False,			/* If true, delete the property. */
-        XA_STRING,		/* Desired type of property. */
-        &typeAtom,		/* (out) Actual type of the property. */
-        &format,		/* (out) Actual format of the property. */
-        &nItems,		/* (out) # of items in specified format. */
-        &bytesAfter,		/* (out) # of bytes remaining to be read. */
-	&data);
-    if ((result != Success) || (format != 8) || (typeAtom != XA_STRING)) {
-	if (data != NULL) {
-	    XFree((char *)data);
-	    data = NULL;
-	}
-    }
-    return data;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SetProperty --
- *
- *	Associates the given data with the a property on a given window.
- *	All data is assumed to be 8-bit string data.
- *
- * ------------------------------------------------------------------------ 
- */
-static void
-SetProperty(Tk_Window tkwin, Atom atom, const char *data)
-{
-    XChangeProperty(Tk_Display(tkwin), Tk_WindowId(tkwin), atom, XA_STRING,
-	8, PropModeReplace, (unsigned char *)data, strlen(data) + 1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWindowArea --
- *
- *	Queries for the upper-left and lower-right corners of the 
- *	given window.  
- *
- *  Results:
- *	Returns if the window is currently viewable.  The coordinates
- *	of the window are returned via parameters.
- *
- * ------------------------------------------------------------------------ 
- */
-static int
-GetWindowArea(Display *display, Winfo *windowPtr)
-{
-    XWindowAttributes winAttrs;
-
-    if (XGetWindowAttributes(display, windowPtr->window, &winAttrs)) {
-	windowPtr->x1 = winAttrs.x;
-	windowPtr->y1 = winAttrs.y;
-	windowPtr->x2 = winAttrs.x + winAttrs.width - 1;
-	windowPtr->y2 = winAttrs.y + winAttrs.height - 1;
-    }
-    return (winAttrs.map_state == IsViewable);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  FindTopWindow --
- *
- *	Searches for the topmost window at a given pair of X-Y coordinates.
- *
- *  Results:
- *	Returns a pointer to the node representing the window containing
- *	the point.  If one can't be found, NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Winfo *
-FindTopWindow(Dnd *dndPtr, int x, int y)
-{
-    Winfo *rootPtr;
-    Blt_ChainLink link;
-    Winfo *windowPtr;
-
-    rootPtr = dndPtr->rootPtr;
-    if (!rootPtr->initialized) {
-	GetWinfo(dndPtr->display, rootPtr);
-    }
-    if ((x < rootPtr->x1) || (x > rootPtr->x2) ||
-	(y < rootPtr->y1) || (y > rootPtr->y2)) {
-	return NULL;		/* Point is not over window  */
-    }
-    windowPtr = rootPtr;
-
-    /*  
-     * The window list is ordered top to bottom, so stop when we find the
-     * first child that contains the X-Y coordinate. It will be the topmost
-     * window in that hierarchy.  If none exists, then we already have the
-     * topmost window.  
-     */
-  descend:
-    for (link = Blt_Chain_FirstLink(rootPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	rootPtr = Blt_Chain_GetValue(link);
-	if (!rootPtr->initialized) {
-	    GetWinfo(dndPtr->display, rootPtr);
-	}
-	if (rootPtr->window == Blt_GetWindowId(dndPtr->tokenPtr->tkwin)) {
-	    continue;		/* Don't examine the token window. */
-	}
-	if ((x >= rootPtr->x1) && (x <= rootPtr->x2) &&
-	    (y >= rootPtr->y1) && (y <= rootPtr->y2)) {
-	    /*   
-	     * Remember the last window containing the pointer and descend
-	     * into its window hierarchy. We'll look for a child that also
-	     * contains the pointer.  
-	     */
-	    windowPtr = rootPtr;
-	    goto descend;
-	}
-    }
-    return windowPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWidgetCursor --
- *
- *	Queries a widget for its current cursor.   The given window
- *	may or may not be a Tk widget that has a -cursor option. 
- *
- *  Results:
- *	Returns the current cursor of the widget.
- *
- * ------------------------------------------------------------------------ 
- */
-static Tk_Cursor
-GetWidgetCursor(
-    Tcl_Interp *interp,		/* Interpreter to evaluate widget command. */
-    Tk_Window tkwin)		/* Window of drag&drop source. */
-{
-    Tk_Cursor cursor;
-    Tcl_DString dString, savedResult;
-
-    cursor = None;
-    Tcl_DStringInit(&dString);
-    Blt_DStringAppendElements(&dString, Tk_PathName(tkwin), "cget", "-cursor",
-	      (char *)NULL);
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    if (Tcl_GlobalEval(interp, Tcl_DStringValue(&dString)) == TCL_OK) {
-	const char *name;
-
-	name = Tcl_GetStringResult(interp);
-	if ((name != NULL) && (name[0] != '\0')) {
-	    cursor = Tk_GetCursor(interp, tkwin, Tk_GetUid(name));
-	}
-    }
-    Tcl_DStringResult(interp, &savedResult);
-    Tcl_DStringFree(&dString);
-    return cursor;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  NameOfStatus --
- *
- *	Converts a numeric drop result into its string representation.
- *
- *  Results:
- *	Returns a static string representing the drop result.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfStatus(int status)
-{
-    switch (status) {
-    case DROP_OK:
-	return "active";
-    case DROP_CONTINUE:
-	return "normal";
-    case DROP_FAIL:
-	return "reject";
-    case DROP_CANCEL:
-	return "cancel";
-    default:
-	return "unknown status value";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  NameOfAction --
- *
- *	Converts a numeric drop result into its string representation.
- *
- *  Results:
- *	Returns a static string representing the drop result.
- *
- *---------------------------------------------------------------------------
- */
-static const char *
-NameOfAction(int action)
-{
-    switch (action) {
-    case DROP_COPY:
-	return "copy";
-    case DROP_CANCEL:
-	return "cancel";
-    case DROP_MOVE:
-	return "move";
-	break;
-    case DROP_LINK:
-	return "link";
-    case DROP_FAIL:
-	return "fail";
-    default:
-	return "unknown action";
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetAction --
- *
- *	Converts a string to its numeric drop result value.
- *
- *  Results:
- *	Returns the drop result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetAction(const char *string)
-{
-    char c;
-
-    c = string[0];
-    if ((c == 'c') && (strcmp(string, "cancel") == 0)) {
-	return DROP_CANCEL;
-    } else if ((c == 'f') && (strcmp(string, "fail") == 0)) {
-	return DROP_FAIL;
-    } else if ((c == 'm') && (strcmp(string, "move") == 0)) {
-	return DROP_MOVE;
-    } else if ((c == 'l') && (strcmp(string, "link") == 0)) {
-	return DROP_LINK;
-    } else if ((c == 'c') && (strcmp(string, "copy") == 0)) {
-	return DROP_COPY;
-    } else {
-	return DROP_COPY;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetDragResult --
- *
- *	Converts a string to its numeric drag result value.
- *
- *  Results:
- *	Returns the drag result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetDragResult(Tcl_Interp *interp, const char *string)
-{
-    char c;
-    int bool;
-
-    c = string[0];
-    if ((c == 'c') && (strcmp(string, "cancel") == 0)) {
-	return DROP_CANCEL;
-    } else if (Tcl_GetBoolean(interp, string, &bool) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-	return DROP_CANCEL;
-    }
-    return bool;
-}
-
-static void
-AnimateActiveCursor(ClientData clientData)
-{
-    Dnd *dndPtr = clientData;    
-    Tk_Cursor cursor;
-
-    dndPtr->cursorPos++;
-    cursor = dndPtr->cursors[dndPtr->cursorPos];
-    if (cursor == None) {
-	cursor = dndPtr->cursors[1];
-	dndPtr->cursorPos = 1;
-    }
-    Tk_DefineCursor(dndPtr->tkwin, cursor);
-    dndPtr->timerToken = Tcl_CreateTimerHandler(100, AnimateActiveCursor,
-	    dndPtr);
-}
-
-static void
-StartActiveCursor(Dnd *dndPtr)
-{
-    if (dndPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(dndPtr->timerToken);
-    }
-    if (dndPtr->cursors != NULL) {
-	Tk_Cursor cursor;
-
-	dndPtr->cursorPos = 1;
-	cursor = dndPtr->cursors[1];
-	if (cursor != None) {
-	    Tk_DefineCursor(dndPtr->tkwin, cursor);
-	    dndPtr->timerToken = Tcl_CreateTimerHandler(125, 
-		AnimateActiveCursor, dndPtr);
-	}
-    }
-}
-
-static void
-StopActiveCursor(Dnd *dndPtr)
-{
-    if (dndPtr->cursorPos > 0) {
-	dndPtr->cursorPos = 0;
-    }
-    if (dndPtr->cursors != NULL) {
-	Tk_DefineCursor(dndPtr->tkwin, dndPtr->cursors[0]);
-    }
-    if (dndPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(dndPtr->timerToken);
-	dndPtr->timerToken = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EventuallyRedrawToken --
- *
- *	Queues a request to redraw the widget at the next idle point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets redisplayed.  Right now we don't do selective
- *	redisplays:  the whole window will be redrawn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-EventuallyRedrawToken(Dnd *dndPtr)
-{
-    Token *tokenPtr;
-
-    if (dndPtr->tokenPtr == NULL) {
-	return;
-    }
-    tokenPtr = dndPtr->tokenPtr;
-    if ((tokenPtr->tkwin != NULL) && (tokenPtr->tkwin != NULL) && 
-	!(tokenPtr->flags & TOKEN_REDRAW)) {
-	tokenPtr->flags |= TOKEN_REDRAW;
-	Tcl_DoWhenIdle(DisplayToken, dndPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  RaiseToken --
- *
- *---------------------------------------------------------------------------
- */
-static void
-RaiseToken(Dnd *dndPtr)
-{
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    if (dndPtr->flags & DND_INITIATED) {
-	if ((Tk_Width(tokenPtr->tkwin) != Tk_ReqWidth(tokenPtr->tkwin)) ||
-	    (Tk_Height(tokenPtr->tkwin) != Tk_ReqHeight(tokenPtr->tkwin))) {
-	    Blt_ResizeToplevelWindow(tokenPtr->tkwin, 
-		Tk_ReqWidth(tokenPtr->tkwin),
-		Tk_ReqHeight(tokenPtr->tkwin));
-	}
-	Blt_MapToplevelWindow(tokenPtr->tkwin);
-	Blt_RaiseToplevelWindow(tokenPtr->tkwin);
-    }
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DisplayToken --
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayToken(ClientData clientData)
-{
-    Dnd *dndPtr = clientData;
-    Token *tokenPtr = dndPtr->tokenPtr;
-    int relief;
-    Tk_3DBorder border;
-    int borderWidth;
-
-    tokenPtr->flags &= ~TOKEN_REDRAW;
-    if (tokenPtr->status == DROP_OK) {
-	relief = tokenPtr->activeRelief;
-	border = tokenPtr->activeBorder;
-	borderWidth = tokenPtr->activeBW;
-	if ((dndPtr->cursors != NULL) && (dndPtr->cursorPos == 0)) {
-	    StartActiveCursor(dndPtr);
-	}
-    } else {
-	relief = tokenPtr->relief;
-	border = tokenPtr->normalBorder;
-	borderWidth = tokenPtr->borderWidth;
-	StopActiveCursor(dndPtr);
-    } 
-    Blt_Fill3DRectangle(tokenPtr->tkwin, Tk_WindowId(tokenPtr->tkwin), border, 
-	0, 0, Tk_Width(tokenPtr->tkwin), Tk_Height(tokenPtr->tkwin), 
-	borderWidth, relief);
-    tokenPtr->lastStatus = tokenPtr->status;
-    if (tokenPtr->status == DROP_FAIL) {
-	DrawRejectSymbol(dndPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  FadeToken --
- *
- *	Fades the token into the target.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FadeToken(Dnd *dndPtr)		/* Drag-and-drop manager (source). */
-{ 
-    Token *tokenPtr = dndPtr->tokenPtr;
-    int w, h;
-    int dx, dy;
-    Window window;
-
-    if (tokenPtr->status == DROP_FAIL) {
-	tokenPtr->nSteps = 1;
-	return;
-    }
-    if (tokenPtr->nSteps == 1) {
-	HideToken(dndPtr);
-	dndPtr->flags &= ~(DND_ACTIVE | DND_VOIDED);
-	return;
-    }
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    tokenPtr->timerToken = Tcl_CreateTimerHandler(10, 
-		  (Tcl_TimerProc *)FadeToken, dndPtr);
-    tokenPtr->nSteps--;
-
-    w = Tk_ReqWidth(tokenPtr->tkwin) * tokenPtr->nSteps / 10;
-    h = Tk_ReqHeight(tokenPtr->tkwin) * tokenPtr->nSteps / 10;
-    if (w < 1) {
-	w = 1;
-    } 
-    if (h < 1) {
-	h = 1;
-    }
-    dx = (Tk_ReqWidth(tokenPtr->tkwin) - w) / 2;
-    dy = (Tk_ReqHeight(tokenPtr->tkwin) - h) / 2;
-    window = Blt_GetWindowId(tokenPtr->tkwin);
-    XMoveResizeWindow(dndPtr->display, window, tokenPtr->x + dx, 
-	     tokenPtr->y + dy, (unsigned int)w, (unsigned int)h);
-    tokenPtr->width = w, tokenPtr->height = h;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SnapToken --
- *
- *	Snaps the token back to the source.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SnapToken(Dnd *dndPtr)
-{ 
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    if (tokenPtr->nSteps == 1) {
-	HideToken(dndPtr);
-	return;
-    }
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    tokenPtr->timerToken = Tcl_CreateTimerHandler(10, 
-	(Tcl_TimerProc *)SnapToken, dndPtr);
-    tokenPtr->nSteps--;
-    tokenPtr->x -= (tokenPtr->x - tokenPtr->startX) / tokenPtr->nSteps;
-    tokenPtr->y -= (tokenPtr->y - tokenPtr->startY) / tokenPtr->nSteps;
-    if ((tokenPtr->x != Tk_X(tokenPtr->tkwin)) || 
-	(tokenPtr->y != Tk_Y(tokenPtr->tkwin))) {
-	Tk_MoveToplevelWindow(tokenPtr->tkwin, tokenPtr->x, tokenPtr->y);
-    }
-    RaiseToken(dndPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  HideToken --
- *
- *	Unmaps the drag&drop token.  Invoked directly at the end of a
- *	successful communication, or after a delay if the communication
- *	fails (allowing the user to see a graphical picture of failure).
- *
- *---------------------------------------------------------------------------
- */
-static void
-HideToken(Dnd *dndPtr)
-{
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-	tokenPtr->timerToken = NULL;
-    }
-    if (dndPtr->flags & DND_INITIATED) {
-	/* Reset the cursor back to its normal state.  */
-	StopActiveCursor(dndPtr);
-	if (dndPtr->cursor == None) {
-	    Tk_UndefineCursor(dndPtr->tkwin);
-	} else {
-	    Tk_DefineCursor(dndPtr->tkwin, dndPtr->cursor);
-	}
-	if (tokenPtr->tkwin != NULL) {
-	    Tk_UnmapWindow(tokenPtr->tkwin); 
-	    Blt_ResizeToplevelWindow(tokenPtr->tkwin, 
-			Tk_ReqWidth(tokenPtr->tkwin), 
-			Tk_ReqHeight(tokenPtr->tkwin));
-	}
-    }
-    if (dndPtr->rootPtr != NULL) {
-	FreeWinfo(dndPtr->rootPtr);
-	dndPtr->rootPtr = NULL;
-    }
-    dndPtr->flags &= ~(DND_ACTIVE | DND_VOIDED);
-    tokenPtr->status = DROP_CONTINUE;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- *  MorphToken --
- *
- *	Fades the token into the target.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MorphToken(Dnd *dndPtr)		/* Drag-and-drop manager (source). */
-{ 
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    if (tokenPtr->status == DROP_FAIL) {
-	tokenPtr->nSteps = 1;
-	return;
-    }
-    if (tokenPtr->nSteps == 1) {
-	HideToken(dndPtr);
-	dndPtr->flags &= ~(DND_ACTIVE | DND_VOIDED);
-	return;
-    }
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    tokenPtr->timerToken = Tcl_CreateTimerHandler(10, 
-	(Tcl_TimerProc *)MorphToken, dndPtr);
-    tokenPtr->nSteps--;
-
-    if (dndPtr->flags & DROP_CANCEL) {
-	tokenPtr->nSteps--;
-	tokenPtr->x -= (tokenPtr->x - tokenPtr->startX) / tokenPtr->nSteps;
-	tokenPtr->y -= (tokenPtr->y - tokenPtr->startY) / tokenPtr->nSteps;
-	if ((tokenPtr->x != Tk_X(tokenPtr->tkwin)) || 
-	    (tokenPtr->y != Tk_Y(tokenPtr->tkwin))) {
-	    Tk_MoveToplevelWindow(tokenPtr->tkwin, tokenPtr->x, tokenPtr->y);
-	}
-    } else {
-	int w, h;
-	int dx, dy;
-	Window window;
-
-	w = Tk_ReqWidth(tokenPtr->tkwin) * tokenPtr->nSteps / 10;
-	h = Tk_ReqHeight(tokenPtr->tkwin) * tokenPtr->nSteps / 10;
-	if (w < 1) {
-	    w = 1;
-	} 
-	if (h < 1) {
-	    h = 1;
-	}
-	dx = (Tk_ReqWidth(tokenPtr->tkwin) - w) / 2;
-	dy = (Tk_ReqHeight(tokenPtr->tkwin) - h) / 2;
-	window = Blt_GetWindowId(tokenPtr->tkwin);
-	XMoveResizeWindow(dndPtr->display, window, tokenPtr->x + dx, 
-			  tokenPtr->y + dy, (unsigned int)w, (unsigned int)h);
-	tokenPtr->width = w, tokenPtr->height = h;
-    }
-    RaiseToken(dndPtr);
-}
-#endif
-
-static void
-GetTokenPosition(Dnd *dndPtr, int x, int y)
-{ 
-    Token *tokenPtr = dndPtr->tokenPtr;
-    int maxX, maxY;
-    int vx, vy, dummy;
-    Screen *screenPtr;
-
-    /* Adjust current location for virtual root windows.  */
-    Tk_GetVRootGeometry(dndPtr->tkwin, &vx, &vy, &dummy, &dummy);
-    x += vx - TOKEN_OFFSET;
-    y += vy - TOKEN_OFFSET;
-
-    screenPtr = Tk_Screen(tokenPtr->tkwin);
-    maxX = WidthOfScreen(screenPtr) - Tk_Width(tokenPtr->tkwin);
-    maxY = HeightOfScreen(screenPtr) - Tk_Height(tokenPtr->tkwin);
-    Blt_TranslateAnchor(x, y, Tk_Width(tokenPtr->tkwin),
-	Tk_Height(tokenPtr->tkwin), tokenPtr->anchor, &x, &y);
-    if (x > maxX) {
-	x = maxX;
-    } else if (x < 0) {
-	x = 0;
-    }
-    if (y > maxY) {
-	y = maxY;
-    } else if (y < 0) {
-	y = 0;
-    }
-    tokenPtr->x = x, tokenPtr->y  = y;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  MoveToken --
- *
- *	Invoked during "drag" operations to move a token window to its
- *	current "drag" coordinate.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MoveToken(Dnd *dndPtr)		/* drag&drop source window data */
-{ 
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    GetTokenPosition(dndPtr, dndPtr->x, dndPtr->y);
-    if ((tokenPtr->x != Tk_X(tokenPtr->tkwin)) || 
-	(tokenPtr->y != Tk_Y(tokenPtr->tkwin))) {
-	Tk_MoveToplevelWindow(tokenPtr->tkwin, tokenPtr->x, tokenPtr->y);
-    }
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ChangeToken --
- *
- *	Invoked when the event loop is idle to determine whether or not
- *	the current drag&drop token position is over another drag&drop
- *	target.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ChangeToken(Dnd *dndPtr, int status)
-{
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    tokenPtr->status = status;
-    EventuallyRedrawToken(dndPtr);
-
-    /*
-     *  If the source has a site command, then invoke it to
-     *  modify the appearance of the token window.  Pass any
-     *  errors onto the drag&drop error handler.
-     */
-    if (dndPtr->siteCmd) {
-	Tcl_Interp *interp = dndPtr->interp;
-	Tcl_DString dString, savedResult;
-	const char **p;
-	
-	Tcl_DStringInit(&dString);
-	for (p = dndPtr->siteCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&dString, *p);
-	}
-	Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-	Tcl_DStringAppendElement(&dString, "timestamp");
-	Tcl_DStringAppendElement(&dString, Blt_Utoa(dndPtr->timestamp));
-	Tcl_DStringAppendElement(&dString, "status");
-	Tcl_DStringAppendElement(&dString, NameOfStatus(status));
-	Tcl_DStringInit(&savedResult);
-	Tcl_DStringGetResult(interp, &savedResult);
-	if (Tcl_GlobalEval(interp, Tcl_DStringValue(&dString)) != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-	Tcl_DStringFree(&dString);
-	Tcl_DStringResult(interp, &savedResult);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DrawRejectSymbol --
- *
- *	Draws a rejection mark on the current drag&drop token, and arranges
- *	for the token to be unmapped after a small delay.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawRejectSymbol(Dnd *dndPtr)
-{
-    Token *tokenPtr = dndPtr->tokenPtr;
-    int divisor = 6;		/* controls size of rejection symbol */
-    int w, h, lineWidth, x, y, margin;
-
-    margin = 2 * tokenPtr->borderWidth;
-    w = Tk_Width(tokenPtr->tkwin) - 2 * margin;
-    h = Tk_Height(tokenPtr->tkwin) - 2 * margin;
-    lineWidth = (w < h) ? w / divisor : h / divisor;
-    lineWidth = (lineWidth < 1) ? 1 : lineWidth;
-
-    w = h = lineWidth * (divisor - 1);
-    x = (Tk_Width(tokenPtr->tkwin) - w) / 2;
-    y = (Tk_Height(tokenPtr->tkwin) - h) / 2;
-
-    /*
-     *  Draw the rejection symbol background (\) on the token window...
-     */
-    XSetLineAttributes(Tk_Display(tokenPtr->tkwin), tokenPtr->outlineGC,
-	lineWidth + 2, LineSolid, CapButt, JoinBevel);
-
-    XDrawArc(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->outlineGC, x, y, w, h, 0, 23040);
-
-    XDrawLine(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->outlineGC, x + lineWidth, y + lineWidth, x + w - lineWidth,
-	y + h - lineWidth);
-
-    /*
-     *  Draw the rejection symbol foreground (\) on the token window...
-     */
-    XSetLineAttributes(Tk_Display(tokenPtr->tkwin), tokenPtr->fillGC,
-	lineWidth, LineSolid, CapButt, JoinBevel);
-
-    XDrawArc(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->fillGC, x, y, w, h, 0, 23040);
-
-    XDrawLine(Tk_Display(tokenPtr->tkwin), Tk_WindowId(tokenPtr->tkwin),
-	tokenPtr->fillGC, x + lineWidth, y + lineWidth, x + w - lineWidth,
-	y + h - lineWidth);
-
-    tokenPtr->status = DROP_FAIL;
-    /*
-     *  Arrange for token window to disappear eventually.
-     */
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    tokenPtr->timerToken = Tcl_CreateTimerHandler(1000, 
-	(Tcl_TimerProc *)HideToken, dndPtr);
-    RaiseToken(dndPtr);
-    dndPtr->flags &= ~(DND_ACTIVE | DND_VOIDED);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateToken --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Creates a new record if the widget name is not already
- *	registered.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyToken(DestroyData data)
-{
-    Dnd *dndPtr = (Dnd *)data;
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    dndPtr->tokenPtr = NULL;
-    if (tokenPtr == NULL) {
-	return;
-    }
-    if (tokenPtr->flags & TOKEN_REDRAW) {
-	Tcl_CancelIdleCall(DisplayToken, dndPtr);
-    }
-    Blt_FreeOptions(tokenConfigSpecs, (char *)tokenPtr, dndPtr->display, 0);
-    if (tokenPtr->timerToken) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    if (tokenPtr->fillGC != NULL) {
-	Tk_FreeGC(dndPtr->display, tokenPtr->fillGC);
-    }
-    if (tokenPtr->outlineGC != NULL) {
-	Tk_FreeGC(dndPtr->display, tokenPtr->outlineGC);
-    }
-    if (tokenPtr->tkwin != NULL) {
-	Tk_DeleteEventHandler(tokenPtr->tkwin, 
-	      ExposureMask | StructureNotifyMask, TokenEventProc, dndPtr);
-	Tk_DestroyWindow(tokenPtr->tkwin);
-    }
-    Blt_Free(tokenPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenEventProc --
- *
- *	Invoked by the Tk dispatcher to handle widget events.
- *	Manages redraws for the drag&drop token window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TokenEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Dnd *dndPtr = clientData;
-    Token *tokenPtr = dndPtr->tokenPtr;
-
-    if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
-	if (tokenPtr->tkwin != NULL) {
-	    EventuallyRedrawToken(dndPtr);
-	}
-    } else if (eventPtr->type == DestroyNotify) {
-	tokenPtr->tkwin = NULL;
-	if (tokenPtr->flags & TOKEN_REDRAW) {
-	    tokenPtr->flags &= ~TOKEN_REDRAW;
-	    Tcl_CancelIdleCall(DisplayToken, dndPtr);
-	}
-	Tcl_EventuallyFree(dndPtr, DestroyToken);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateToken --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Creates a new record if the widget name is not already
- *	registered.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CreateToken(
-    Tcl_Interp *interp,
-    Dnd *dndPtr)
-{
-    XSetWindowAttributes attrs;
-    Tk_Window tkwin;
-    unsigned int mask;
-    Token *tokenPtr;
-
-    tokenPtr = Blt_AssertCalloc(1, sizeof(Token));
-    tokenPtr->anchor = TK_ANCHOR_SE;
-    tokenPtr->relief = TK_RELIEF_RAISED;
-    tokenPtr->activeRelief = TK_RELIEF_SUNKEN;
-    tokenPtr->borderWidth = tokenPtr->activeBW = 3;
-
-    /* Create toplevel on parent's screen. */
-    tkwin = Tk_CreateWindow(interp, dndPtr->tkwin, "dndtoken", "");
-    if (tkwin == NULL) {
-	Blt_Free(tokenPtr);
-	return TCL_ERROR;
-    }
-    tokenPtr->tkwin = tkwin;
-    Tk_SetClass(tkwin, "DndToken"); 
-    Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask,
-	TokenEventProc, dndPtr);
-    attrs.override_redirect = True;
-    attrs.backing_store = WhenMapped;
-    attrs.save_under = True;
-    mask = CWOverrideRedirect | CWSaveUnder | CWBackingStore;
-    Tk_ChangeWindowAttributes(tkwin, mask, &attrs);
-    Tk_SetInternalBorder(tkwin, tokenPtr->borderWidth + 2);
-    Tk_MakeWindowExist(tkwin);
-    dndPtr->tokenPtr = tokenPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ConfigureToken --
- *
- *	Called to process an (objc,objv) list to configure (or
- *	reconfigure) a drag&drop source widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureToken(
-    Tcl_Interp *interp,		/* current interpreter */
-    Dnd *dndPtr,		/* Drag&drop source widget record */
-    int objc,			/* number of arguments */
-    Tcl_Obj *const *objv,		/* argument strings */
-    int flags)			/* flags controlling interpretation */
-{
-    GC newGC;
-    Token *tokenPtr = dndPtr->tokenPtr;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    Tk_MakeWindowExist(tokenPtr->tkwin);
-    if (Blt_ConfigureWidgetFromObj(interp, tokenPtr->tkwin, tokenConfigSpecs, 
-		objc, objv, (char *)tokenPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     *  Set up the rejection outline GC for the token window...
-     */
-    gcValues.foreground = tokenPtr->outlineColor->pixel;
-    gcValues.subwindow_mode = IncludeInferiors;
-    gcValues.graphics_exposures = False;
-    gcValues.line_style = LineSolid;
-    gcValues.cap_style = CapButt;
-    gcValues.join_style = JoinBevel;
-
-    gcMask = GCForeground | GCSubwindowMode | GCLineStyle |
-	GCCapStyle | GCJoinStyle | GCGraphicsExposures;
-    newGC = Tk_GetGC(dndPtr->tkwin, gcMask, &gcValues);
-
-    if (tokenPtr->outlineGC != NULL) {
-	Tk_FreeGC(dndPtr->display, tokenPtr->outlineGC);
-    }
-    tokenPtr->outlineGC = newGC;
-
-    /*
-     *  Set up the rejection fill GC for the token window...
-     */
-    gcValues.foreground = tokenPtr->fillColor->pixel;
-    if (tokenPtr->rejectStipple != None) {
-	gcValues.stipple = tokenPtr->rejectStipple;
-	gcValues.fill_style = FillStippled;
-	gcMask |= GCStipple | GCFillStyle;
-    }
-    newGC = Tk_GetGC(dndPtr->tkwin, gcMask, &gcValues);
-
-    if (tokenPtr->fillGC != NULL) {
-	Tk_FreeGC(dndPtr->display, tokenPtr->fillGC);
-    }
-    tokenPtr->fillGC = newGC;
-
-    if ((tokenPtr->reqWidth > 0) && (tokenPtr->reqHeight > 0)) {
-	Tk_GeometryRequest(tokenPtr->tkwin, tokenPtr->reqWidth, 
-		tokenPtr->reqHeight);
-    }
-    /*
-     *  Reset the border width in case it has changed...
-     */
-    Tk_SetInternalBorder(tokenPtr->tkwin, tokenPtr->borderWidth + 2);
-    return TCL_OK;
-}
-
-static int
-GetFormattedData(
-    Dnd *dndPtr, 
-    char *format, 
-    int timestamp, 
-    Tcl_DString *resultPtr)
-{
-    Tcl_Interp *interp = dndPtr->interp;
-    Blt_HashEntry *hPtr;
-    char **formatCmd;
-    Tcl_DString savedResult;
-    Tcl_DString dString;
-    char **p;
-    int x, y;
-
-    /* Find the data converter for the prescribed format. */
-    hPtr = Blt_FindHashEntry(&dndPtr->getDataTable, format);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find format \"", format, 
-	 "\" in source \"", Tk_PathName(dndPtr->tkwin), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    formatCmd = Blt_GetHashValue(hPtr);
-    Tcl_DStringInit(&dString);
-    for (p = formatCmd; *p != NULL; p++) {
-	Tcl_DStringAppendElement(&dString, *p);
-    }
-    x = dndPtr->dragX - Blt_RootX(dndPtr->tkwin);
-    y = dndPtr->dragY - Blt_RootY(dndPtr->tkwin);
-    Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-    Tcl_DStringAppendElement(&dString, "x");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(x));
-    Tcl_DStringAppendElement(&dString, "y");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(y));
-    Tcl_DStringAppendElement(&dString, "timestamp");
-    Tcl_DStringAppendElement(&dString, Blt_Utoa(timestamp));
-    Tcl_DStringAppendElement(&dString, "format");
-    Tcl_DStringAppendElement(&dString, format);
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    if (Tcl_GlobalEval(interp, Tcl_DStringValue(&dString)) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-    Tcl_DStringFree(&dString);
-    Tcl_DStringInit(resultPtr);
-    Tcl_DStringGetResult(interp, resultPtr);
-
-    /* Restore the interpreter result. */
-    Tcl_DStringResult(interp, &savedResult);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DestroyDnd --
- *
- *	Free resources allocated for the drag&drop window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyDnd(DestroyData data)
-{
-    Dnd *dndPtr = (Dnd *)data;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    char **cmd;
-
-    Blt_FreeOptions(configSpecs, (char *)dndPtr, dndPtr->display, 0);
-    Tk_DeleteGenericHandler(DndEventProc, dndPtr);
-    for (hPtr = Blt_FirstHashEntry(&dndPtr->getDataTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	cmd = Blt_GetHashValue(hPtr);
-	if (cmd != NULL) {
-	    Blt_Free(cmd);
-	}
-    }
-    Blt_DeleteHashTable(&dndPtr->getDataTable);
-
-    for (hPtr = Blt_FirstHashEntry(&dndPtr->setDataTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	cmd = Blt_GetHashValue(hPtr);
-	if (cmd != NULL) {
-	    Blt_Free(cmd);
-	}
-    }
-    Blt_DeleteHashTable(&dndPtr->setDataTable);
-    if (dndPtr->rootPtr != NULL) {
-	FreeWinfo(dndPtr->rootPtr);
-    }
-    if (dndPtr->cursor != None) {
-	Tk_FreeCursor(dndPtr->display, dndPtr->cursor);
-    }
-    if (dndPtr->reqFormats != NULL) {
-	Blt_Free(dndPtr->reqFormats);
-    }
-    if (dndPtr->matchingFormats != NULL) {
-	Blt_Free(dndPtr->matchingFormats);
-    }
-
-    /* Now that the various commands are custom list options, we need
-     * to explicitly free them. */
-    if (dndPtr->motionCmd != NULL) {
-	Blt_Free(dndPtr->motionCmd);
-    }
-    if (dndPtr->leaveCmd != NULL) {
-	Blt_Free(dndPtr->leaveCmd);
-    }
-    if (dndPtr->enterCmd != NULL) {
-	Blt_Free(dndPtr->enterCmd);
-    }
-    if (dndPtr->dropCmd != NULL) {
-	Blt_Free(dndPtr->dropCmd);
-    }
-    if (dndPtr->resultCmd != NULL) {
-	Blt_Free(dndPtr->resultCmd);
-    }
-    if (dndPtr->packageCmd != NULL) {
-	Blt_Free(dndPtr->packageCmd);
-    }
-    if (dndPtr->siteCmd != NULL) {
-	Blt_Free(dndPtr->siteCmd);
-    }
-
-    if (dndPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&dndPtr->dataPtr->dndTable, dndPtr->hashPtr);
-    }
-    if (dndPtr->tokenPtr != NULL) {
-	DestroyToken((DestroyData)dndPtr);
-    }
-    if (dndPtr->tkwin != NULL) {
-	XDeleteProperty(dndPtr->display, Tk_WindowId(dndPtr->tkwin),
-			dndPtr->dataPtr->targetAtom);
-	XDeleteProperty(dndPtr->display, Tk_WindowId(dndPtr->tkwin),
-			dndPtr->dataPtr->commAtom);
-    }
-    Blt_Free(dndPtr);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetDnd --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetDndFromObj(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,		/* widget pathname for desired record */
-    Dnd **dndPtrPtr)
-{
-    DndInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Tk_Window tkwin;
-    char *pathName;
-
-    pathName = Tcl_GetString(objPtr);
-    assert(interp != NULL);
-    tkwin = Tk_NameToWindow(interp, pathName, dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->dndTable, (char *)tkwin);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "window \"", pathName,
-	     "\" is not a drag&drop source/target", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *dndPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CreateDnd --
- *
- *	Looks for a Source record in the hash table for drag&drop source
- *	widgets.  Creates a new record if the widget name is not already
- *	registered.  Returns a pointer to the desired record.
- *
- *---------------------------------------------------------------------------
- */
-static Dnd *
-CreateDnd(
-    Tcl_Interp *interp,
-    Tk_Window tkwin)		/* Widget for desired record */
-{
-    Dnd *dndPtr;
-
-    dndPtr = Blt_AssertCalloc(1, sizeof(Dnd));
-    dndPtr->interp = interp;
-    dndPtr->display = Tk_Display(tkwin);
-    dndPtr->tkwin = tkwin;
-    Tk_MakeWindowExist(tkwin);
-    Blt_InitHashTable(&dndPtr->setDataTable, BLT_STRING_KEYS);
-    Blt_InitHashTable(&dndPtr->getDataTable, BLT_STRING_KEYS);
-    Tk_CreateGenericHandler(DndEventProc, dndPtr);
-    return dndPtr;
-}
-
-static int
-ConfigureDnd(Tcl_Interp *interp, Dnd *dndPtr)
-{
-    Tcl_CmdInfo cmdInfo;
-    Tcl_DString dString;
-    int button, result;
-
-    if (!Tcl_GetCommandInfo(interp, "::blt::DndInit", &cmdInfo)) {
-	static char cmd[] = "source [file join $blt_library dnd.tcl]";
-	/* 
-	 * If the "DndInit" routine hasn't been sourced, do it now.
-	 */
-	if (Tcl_GlobalEval(interp, cmd) != TCL_OK) {
-	    Tcl_AddErrorInfo(interp,
-		     "\n    (while loading bindings for blt::drag&drop)");
-	    return TCL_ERROR;
-	}
-    }
-    /*  
-     * Reset the target property if it's changed state or
-     * added/subtracted one of its callback procedures.  
-     */
-    if (Blt_ConfigModified(configSpecs, "-target", "-onenter",  "-onmotion",
-	   "-onleave", (char *)NULL)) {
-	if (dndPtr->targetPropertyExists) {
-	    XDeleteProperty(dndPtr->display, Tk_WindowId(dndPtr->tkwin),
-			    dndPtr->dataPtr->targetAtom);
-	    dndPtr->targetPropertyExists = FALSE;
-	}
-	if (dndPtr->isTarget) {
-	    AddTargetProperty(dndPtr);
-	    dndPtr->targetPropertyExists = TRUE;
-	}
-    }
-    if (dndPtr->isSource) {
-	/* Check the button binding for valid range (0 or 1-5) */
-	if ((dndPtr->reqButton < 0) || (dndPtr->reqButton > 5)) {
-	    Tcl_AppendResult(interp, 
-			     "button must be 1-5, or 0 for no bindings",
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	button = dndPtr->reqButton;
-    } else {
-	button = 0;
-    }
-    Tcl_DStringInit(&dString);
-    Blt_DStringAppendElements(&dString, "::blt::DndInit", 
-	Tk_PathName(dndPtr->tkwin), Blt_Itoa(button), (char *)NULL);
-    result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SendRestrictProc --
- *
- *	This procedure filters incoming events when a "send" command
- *	is outstanding.  It defers all events except those containing
- *	send commands and results.
- *
- * Results:
- *	False is returned except for property-change events on a
- *	commWindow.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-/* ARGSUSED */
-static Tk_RestrictAction
-SendRestrictProc(
-    ClientData clientData,	/* Drag-and-drop manager. */
-    XEvent *eventPtr)		/* Event that just arrived. */
-{
-    Dnd *dndPtr = clientData;
-
-    if (eventPtr->xproperty.window != Tk_WindowId(dndPtr->tkwin)) {
-	return TK_PROCESS_EVENT; /* Event not in our window. */
-    }
-    if ((eventPtr->type == PropertyNotify) &&
-	(eventPtr->xproperty.state == PropertyNewValue)) {
-	return TK_PROCESS_EVENT; /* This is the one we want to process. */
-    }
-    if (eventPtr->type == Expose) {
-	return TK_PROCESS_EVENT; /* Let expose events also get
-				  * handled. */
-    }
-    return TK_DEFER_EVENT;	/* Defer everything else. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SendTimerProc --
- *
- *	Procedure called when the timer event elapses.  Used to wait
- *	between attempts checking for the designated window.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Sets a flag, indicating the timeout occurred.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SendTimerProc(ClientData clientData)
-{
-    int *statusPtr = clientData;
-
-    /* 
-     * An unusually long amount of time has elapsed since the drag
-     * start message was sent.  Assume that the other party has died
-     * and abort the operation.  
-     */
-    *statusPtr = DROP_FAIL;
-}
-
-#define WAIT_INTERVAL	2000	/* Twenty seconds. */
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TargetPropertyEventProc --
- *
- *	Invoked by the Tk dispatcher to handle widget events.  Manages redraws
- *	for the drag&drop token window.
- *
- *---------------------------------------------------------------------------
- */
-static void
-TargetPropertyEventProc(
-    ClientData clientData,		/* Data associated with transaction. */
-    XEvent *eventPtr)			/* information about event */
-{
-    DropPending *pendingPtr = clientData;
-    unsigned char *data;
-    int result, format;
-    Atom typeAtom;
-    unsigned long nItems, bytesAfter;
-
-#ifdef notdef
-    fprintf(stderr, "TargetPropertyEventProc\n");
-#endif
-    if ((eventPtr->type != PropertyNotify) ||
-	(eventPtr->xproperty.atom != pendingPtr->commAtom) || 
-	(eventPtr->xproperty.state != PropertyNewValue)) {
-	return;
-    }
-    Tcl_DeleteTimerHandler(pendingPtr->timerToken);
-    data = NULL;
-    result = XGetWindowProperty(
-        eventPtr->xproperty.display,	/* Display of window. */
-	eventPtr->xproperty.window,     /* Window holding the property. */
-        eventPtr->xproperty.atom,	/* Name of property. */
-        0,				/* Offset of data (for multiple
-					 * reads). */
-	pendingPtr->packetSize,		/* Maximum number of items to read. */
-	False,				/* If true, delete the property. */
-        XA_STRING,			/* Desired type of property. */
-        &typeAtom,			/* (out) Actual type of the property. */
-        &format,			/* (out) Actual format of the
-					 * property. */
-        &nItems,			/* (out) # of items in specified
-					 * format. */
-        &bytesAfter,			/* (out) # of bytes remaining to be
-					 * read. */
-	&data);
-#ifdef notdef
-    fprintf(stderr, 
-	"TargetPropertyEventProc: result=%d, typeAtom=%d, format=%d, nItems=%d\n",
-	    result, typeAtom, format, nItems);
-#endif
-    pendingPtr->status = DROP_FAIL;
-    if ((result == Success) && (typeAtom == XA_STRING) && (format == 8)) {
-	pendingPtr->status = DROP_OK;
-#ifdef notdef
-	fprintf(stderr, "data found is (%s)\n", data);
-#endif
-	Tcl_DStringAppend(&pendingPtr->dString, (char *)data, -1);
-	XFree(data);
-	if (nItems == pendingPtr->packetSize) {
-	    /* Normally, we'll receive the data in one chunk. But if more are
-	     * required, reset the timer and go back into the wait loop
-	     * again. */
-	    pendingPtr->timerToken = Tcl_CreateTimerHandler(WAIT_INTERVAL, 
-		SendTimerProc, &pendingPtr->status);
-	    pendingPtr->status = DROP_CONTINUE;
-	}
-    } 
-    /* Set an empty, zero-length value on the source's property. This acts as a
-     * handshake, indicating that the target received the latest chunk. */
-#ifdef notdef
-    fprintf(stderr, "TargetPropertyEventProc: set response property\n");
-#endif
-    XChangeProperty(pendingPtr->display, pendingPtr->window, 
-	pendingPtr->commAtom, XA_STRING, 8, PropModeReplace, 
-	(unsigned char *)"", 0);
-}
-
-#ifdef HAVE_XDND
-
-static int 
-XDndSelectionProc(clientData, interp, portion)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    char *portion;
-{
-    DropPending *pendingPtr = clientData;
-
-    Tcl_DStringAppend(&pendingPtr->dString, portion, -1);
-#ifdef notdef
-    fprintf(stderr, "-> XDndGetSelectionProc\n");
-#endif
-    return TCL_OK;
-}
-
-#endif /* HAVE_XDND */
-
-static void
-CompleteDataTransaction(Dnd *dndPtr, char *format, DropPending *pendingPtr)
-{
-    DndInterpData *dataPtr = dndPtr->dataPtr;
-    Tk_Window tkwin;
-    Atom formatAtom;
-
-#ifdef notdef
-    fprintf(stderr, "-> CompleteDataTransaction\n");
-#endif
-    /* Check if the source is local to the application. */
-    tkwin = Tk_IdToWindow(dndPtr->display, pendingPtr->window);
-    if (tkwin != NULL) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FindHashEntry(&dndPtr->dataPtr->dndTable, (char *)tkwin);
-	if (hPtr != NULL) {
-	    Dnd *srcPtr;
-
-	    srcPtr = Blt_GetHashValue(hPtr);
-	    GetFormattedData(srcPtr, format, pendingPtr->timestamp, 
-		&pendingPtr->dString);
-	}
-	return;
-    }
-
-    formatAtom = XInternAtom(pendingPtr->display, format, False);
-
-    if (pendingPtr->protocol == PROTO_XDND) { 
-#ifdef HAVE_XDND
-	if (Tk_GetSelection(dndPtr->interp, dndPtr->tkwin, 
-		dataPtr->XdndSelectionAtom, formatAtom, XDndSelectionProc, 
-		pendingPtr) != TCL_OK) {
-	    pendingPtr->status = DROP_FAIL;
-	}
-#endif
-	pendingPtr->status = DROP_OK;
-    } else {
-	Tk_RestrictProc *proc;
-	ClientData arg;
-
-	SendClientMsg(pendingPtr->display, pendingPtr->window, 
-		dataPtr->mesgAtom, 
-		TS_START_DROP, 
-		(int)Tk_WindowId(dndPtr->tkwin),
-		pendingPtr->timestamp, 
-		(int)formatAtom, 
-		(int)pendingPtr->commAtom);
-
-	pendingPtr->commAtom = dndPtr->dataPtr->commAtom;
-	pendingPtr->status = DROP_CONTINUE;
-	pendingPtr->display = dndPtr->display;
-	proc = Tk_RestrictEvents(SendRestrictProc, dndPtr, &arg);
-	Tk_CreateEventHandler(dndPtr->tkwin, PropertyChangeMask, 
-		TargetPropertyEventProc, pendingPtr);
-	pendingPtr->timerToken = Tcl_CreateTimerHandler(WAIT_INTERVAL, 
-		SendTimerProc, &pendingPtr->status);
-	/*  
-	 * Enter a loop processing X events until the all the data is received
-	 * or the source is declared to be dead (i.e. we timeout).  While
-	 * waiting for a result, restrict handling to just property-related
-	 * events so that the transfer is synchronous with respect to other
-	 * events in the widget.
-	 */
-	while (pendingPtr->status == DROP_CONTINUE) { 
-	    Tcl_DoOneEvent(TCL_ALL_EVENTS);	/* Wait for property event. */
-	}
-	Tk_RestrictEvents(proc, arg, &arg);
-	Tcl_DeleteTimerHandler(pendingPtr->timerToken);
-	Tk_DeleteEventHandler(dndPtr->tkwin, PropertyChangeMask, 
-	      TargetPropertyEventProc, pendingPtr);
-    }
-#ifdef notdef
-    fprintf(stderr, "<- CompleteDataTransaction\n");
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SourcePropertyEventProc --
- *
- *	Invoked by the Tk dispatcher when a PropertyNotify event occurs on the
- *	source window.  The event acts as a handshake between the target and the
- *	source.  The source acknowledges the target has received the last packet
- *	of data and sends the next packet.
- *
- *	Note a special case.  If the data is divisible by the packetsize, then
- *	an extra zero-length packet is sent to mark the end of the data.  A
- *	packetsize length packet indicates more is to follow.
- *
- *	Normally the property is empty (zero-length).  But if an errored
- *	occurred on the target, it will contain the error message.
- *
- * ------------------------------------------------------------------------ 
- */
-static void
-SourcePropertyEventProc(
-    ClientData clientData,		/* data associated with widget */
-    XEvent *eventPtr)			/* information about event */
-{
-    DropPending *pendingPtr = clientData;
-    unsigned char *data;
-    int result, format;
-    Atom typeAtom;
-    unsigned long nItems, bytesAfter;
-    int size, bytesLeft;
-    unsigned char *p;
-
-#ifdef notdef
-    fprintf(stderr, "-> SourcePropertyEventProc\n");
-#endif
-    if ((eventPtr->xproperty.atom != pendingPtr->commAtom)
-	|| (eventPtr->xproperty.state != PropertyNewValue)) {
-	return;
-    }
-    Tcl_DeleteTimerHandler(pendingPtr->timerToken);
-    data = NULL;
-    result = XGetWindowProperty(
-        eventPtr->xproperty.display,	/* Display of window. */
-	eventPtr->xproperty.window,     /* Window holding the property. */
-        eventPtr->xproperty.atom,	/* Name of property. */
-        0,				/* Offset of data (for multiple
-					 * reads). */
-	pendingPtr->packetSize,		/* Maximum number of items to read. */
-	True,				/* If true, delete the property. */
-        XA_STRING,			/* Desired type of property. */
-        &typeAtom,			/* (out) Actual type of the property. */
-        &format,			/* (out) Actual format of the
-					 * property. */
-        &nItems,			/* (out) # of items in specified
-					 * format. */
-        &bytesAfter,			/* (out) # of bytes remaining to be
-					 * read. */
-	&data);
-
-    if ((result != Success) || (typeAtom != XA_STRING) || (format != 8)) {
-	pendingPtr->status = DROP_FAIL;
-#ifdef notdef
-    fprintf(stderr, "<- SourcePropertyEventProc: wrong format\n");
-#endif
-	return;				/* Wrong data format. */
-    }
-    if (nItems > 0) {
-	pendingPtr->status = DROP_FAIL;
-	Tcl_DStringFree(&pendingPtr->dString);
-	Tcl_DStringAppend(&pendingPtr->dString, (char *)data, -1);
-	XFree(data);
-#ifdef notdef
-    fprintf(stderr, "<- SourcePropertyEventProc: error\n");
-#endif
-	return;				/* Error occurred on target. */
-    }    
-    bytesLeft = Tcl_DStringLength(&pendingPtr->dString) - pendingPtr->offset;
-    if (bytesLeft <= 0) {
-#ifdef notdef
-	fprintf(stderr, "<- SourcePropertyEventProc: done\n");
-#endif
-	pendingPtr->status = DROP_OK;
-	size = 0;
-    } else {
-	size = MIN(bytesLeft, pendingPtr->packetSize);
-	pendingPtr->status = DROP_CONTINUE;
-    }
-    p = (unsigned char *)Tcl_DStringValue(&pendingPtr->dString) + 
-	pendingPtr->offset;
-    XChangeProperty(pendingPtr->display, pendingPtr->window, 
-	pendingPtr->commAtom, XA_STRING, 8, PropModeReplace, p, size);
-    pendingPtr->offset += size;
-    pendingPtr->timerToken = Tcl_CreateTimerHandler(WAIT_INTERVAL, 
-	   SendTimerProc, &pendingPtr->status);
-#ifdef notdef
-    fprintf(stderr, "<- SourcePropertyEventProc\n");
-#endif
-}
-
-
-static void
-SendDataToTarget(Dnd *dndPtr, DropPending *pendingPtr)
-{
-    int size;
-    Tk_RestrictProc *proc;
-    ClientData arg;
-
-#ifdef notdef
-    fprintf(stderr, "-> SendDataToTarget\n");
-#endif
-    Tk_CreateEventHandler(dndPtr->tkwin, PropertyChangeMask, 
-	SourcePropertyEventProc, pendingPtr);
-    pendingPtr->timerToken = Tcl_CreateTimerHandler(WAIT_INTERVAL, 
-	SendTimerProc, &pendingPtr->status);
-    size = MIN(Tcl_DStringLength(&pendingPtr->dString), pendingPtr->packetSize);
-
-    proc = Tk_RestrictEvents(SendRestrictProc, dndPtr, &arg);
-
-    /* 
-     * Setting the property starts the process.  The target will see the
-     * PropertyChange event and respond accordingly.
-     */
-    XChangeProperty(dndPtr->display, pendingPtr->window, 
-	pendingPtr->commAtom, XA_STRING, 8, PropModeReplace, 
-	(unsigned char *)Tcl_DStringValue(&pendingPtr->dString), size);
-    pendingPtr->offset += size;
-
-    /*
-     * Enter a loop processing X events until the result comes in or the target
-     * is declared to be dead.  While waiting for a result, look only at
-     * property-related events so that the handshake is synchronous with respect
-     * to other events in the application.
-     */
-    pendingPtr->status = DROP_CONTINUE;
-    while (pendingPtr->status == DROP_CONTINUE) {
-	/* Wait for the property change event. */
-	Tcl_DoOneEvent(TCL_ALL_EVENTS);
-    }
-    Tk_RestrictEvents(proc, arg, &arg);
-    Tcl_DeleteTimerHandler(pendingPtr->timerToken);
-    Tk_DeleteEventHandler(dndPtr->tkwin, PropertyChangeMask, 
-	  SourcePropertyEventProc, pendingPtr);
-#ifdef notdef
-    fprintf(stderr, "<- SendDataToTarget\n");
-#endif
-}
-
-static void
-DoDrop(Dnd *dndPtr, XEvent *eventPtr)
-{
-    DndInterpData *dataPtr = dndPtr->dataPtr;
-    Token *tokenPtr = dndPtr->tokenPtr;
-    Tcl_Interp *interp = dndPtr->interp;
-    struct DropRequest {
-	int mesg;			/* TS_DROP_RESULT message. */
-	Window window;			/* Target window. */
-	int timestamp;			/* Transaction timestamp. */
-	Atom formatAtom;		/* Format requested. */
-    } *dropPtr;
-    char *format;
-    DropPending pending;
-
-    if (tokenPtr->timerToken != NULL) {
-	Tcl_DeleteTimerHandler(tokenPtr->timerToken);
-    }
-    dropPtr = (struct DropRequest *)eventPtr->xclient.data.l;
-    format = XGetAtomName(dndPtr->display, dropPtr->formatAtom);
-#ifdef notdef
-    fprintf(stderr, "DoDrop %s 0x%x\n", Tk_PathName(dndPtr->tkwin), 
-	    dropPtr->window);
-#endif
-    if (GetFormattedData(dndPtr, format, dropPtr->timestamp, &pending.dString)
-	!= TCL_OK) {
-	Tcl_BackgroundError(interp);
-	/* Send empty string to break target's wait loop. */
-	XChangeProperty(dndPtr->display, dropPtr->window, dataPtr->commAtom, 
-		XA_STRING, 8, PropModeReplace, (unsigned char *)"", 0);
-	return;
-    } 
-    pending.window = dropPtr->window;
-    pending.display = dndPtr->display;
-    pending.commAtom = dataPtr->commAtom;
-    pending.offset = 0;
-    pending.packetSize = GetMaxPropertySize(dndPtr->display);
-    SendDataToTarget(dndPtr, &pending);
-    Tcl_DStringFree(&pending.dString);
-#ifdef notdef
-    fprintf(stderr, "<- DoDrop\n");
-#endif
-}
-
-static void
-DropFinished(Dnd *dndPtr, XEvent *eventPtr)
-{
-    Tcl_Interp *interp = dndPtr->interp;
-    Tcl_DString dString, savedResult;
-    int result;
-    const char **p;
-    struct DropResult {
-	int mesg;			/* TS_DROP_RESULT message. */
-	Window window;			/* Target window. */
-	int timestamp;			/* Transaction timestamp. */
-	int result;			/* Result of transaction. */
-    } *dropPtr;
-
-#ifdef notdef
-    fprintf(stderr, "DropFinished\n");
-#endif
-    dropPtr = (struct DropResult *)eventPtr->xclient.data.l;
-
-    Tcl_DStringInit(&dString);
-    for (p = dndPtr->resultCmd; *p != NULL; p++) {
-	Tcl_DStringAppendElement(&dString, *p);
-    }
-    Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-    Tcl_DStringAppendElement(&dString, "action");
-    Tcl_DStringAppendElement(&dString, NameOfAction(dropPtr->result));
-    Tcl_DStringAppendElement(&dString, "timestamp");
-    Tcl_DStringAppendElement(&dString, Blt_Utoa(dropPtr->timestamp));
-
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    if (result != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-    Tcl_DStringResult(interp, &savedResult);
-}
-
-
-static void
-FreeFormats(Dnd *dndPtr)
-{
-    if (dndPtr->matchingFormats != NULL) {
-	Blt_Free(dndPtr->matchingFormats);
-	dndPtr->matchingFormats = NULL;
-    }
-    dndPtr->lastId = None;
-}
-
-static const char *
-GetSourceFormats(Dnd *dndPtr, Window window, int timestamp)
-{
-    if (dndPtr->lastId != timestamp) {
-	unsigned char *data;
-	
-	FreeFormats(dndPtr);
-	data = GetProperty(dndPtr->display, window, 
-		   dndPtr->dataPtr->formatsAtom);
-	if (data != NULL) {
-	    dndPtr->matchingFormats = Blt_AssertStrdup((char *)data);
-	    XFree(data);
-	}
-	dndPtr->lastId = timestamp;
-    }
-    if (dndPtr->matchingFormats == NULL) {
-	return "";
-    }
-    return dndPtr->matchingFormats;
-}
- 
-
-static int
-InvokeCallback(
-    Dnd *dndPtr,
-    const char **cmd,
-    int x, int y,
-    const char *formats,
-    int button, 
-    int keyState, 
-    int timestamp)
-{
-    Tcl_DString dString, savedResult;
-    Tcl_Interp *interp = dndPtr->interp;
-    int result;
-    const char **p;
-
-    Tcl_DStringInit(&dString);
-    for (p = cmd; *p != NULL; p++) {
-	Tcl_DStringAppendElement(&dString, *p);
-    }
-    Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-    /* Send coordinates relative to target. */
-    x -= Blt_RootX(dndPtr->tkwin);    
-    y -= Blt_RootY(dndPtr->tkwin);
-    Tcl_DStringAppendElement(&dString, "x");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(x));
-    Tcl_DStringAppendElement(&dString, "y");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(y));
-    Tcl_DStringAppendElement(&dString, "formats");
-    if (formats == NULL) {
-	formats = "";
-    }
-    Tcl_DStringAppendElement(&dString, formats);
-    Tcl_DStringAppendElement(&dString, "button");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(button));
-    Tcl_DStringAppendElement(&dString, "state");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(keyState));
-    Tcl_DStringAppendElement(&dString, "timestamp");
-    Tcl_DStringAppendElement(&dString, Blt_Utoa(timestamp));
-    Tcl_Preserve(interp);
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    if (result == TCL_OK) {
-	result = GetDragResult(interp, Tcl_GetStringResult(interp));
-    } else {
-	result = DROP_CANCEL;
-	Tcl_BackgroundError(interp);
-    }
-    Tcl_DStringResult(interp, &savedResult);
-    Tcl_Release(interp);
-    return result;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- *  AcceptDrop --
- *	
- *	Invokes a TCL procedure to handle the target's side of the drop.  A Tcl
- *	procedure is invoked, either one designated for this target by the user
- *	(-ondrop) or a default TCL procedure.  It is passed the following
- *	arguments:
- *
- *		widget		The path name of the target. 
- *		x		X-coordinate of the mouse relative to the 
- *				widget.
- *		y		Y-coordinate of the mouse relative to the 
- *				widget.
- *		formats		A list of data formats acceptable to both
- *				the source and target.
- *		button		Button pressed.
- *		state		Key state.
- *		timestamp	Timestamp of transaction.
- *		action		Requested action from source.
- *
- *	If the TCL procedure returns "cancel", this indicates that the drop was
- *	not accepted by the target and the reject symbol should be displayed.
- *	Otherwise one of the following strings may be recognized:
- *
- *		"cancel"	Drop was canceled.
- *		"copy"		Source data has been successfully copied.
- *		"link"		Target has made a link to the data. It's 
- *				Ok for the source to remove it's association
- *				with the data, but not to delete the data
- *				itself.
- *		"move"		Source data has been successfully copied,
- *				it's Ok for the source to delete its
- *				association with the data and the data itself.
- *
- *	The result is relayed back to the source via another client message.
- *	The source may or may not be waiting for the result.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A TCL procedure is invoked in the target to handle the drop event.
- *	The result of the drop is sent (via another ClientMessage) to the
- *	source.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AcceptDrop(
-    Dnd *dndPtr,		/* Target where the drop event occurred. */
-    int x, int y,
-    const char *formats,
-    int button, 
-    int keyState, 
-    int timestamp)
-{
-    Tcl_Interp *interp = dndPtr->interp;
-    const char **cmd;
-    Tcl_DString dString, savedResult;
-    int result;
-    
-    if (dndPtr->motionCmd != NULL) {
-	result = InvokeCallback(dndPtr, dndPtr->motionCmd, x, y, formats, 
-		button, keyState, timestamp);
-	if (result != DROP_OK) {
-	    return result;
-	}
-    }
-    if (dndPtr->leaveCmd != NULL) {
-	InvokeCallback(dndPtr, dndPtr->leaveCmd, x, y, formats, button, 
-	       keyState, timestamp);
-    }
-    Tcl_DStringInit(&dString);
-    cmd = dndPtr->dropCmd;
-    if (cmd != NULL) {
-	const char **p;
-
-	for (p = cmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&dString, *p);
-	}
-    } else {
-	Tcl_DStringAppendElement(&dString, "::blt::DndStdDrop");
-    }
-    Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-    dndPtr->dropX = x - Blt_RootX(dndPtr->tkwin);
-    dndPtr->dropY = y - Blt_RootY(dndPtr->tkwin);
-    Tcl_DStringAppendElement(&dString, "x");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->dropX));
-    Tcl_DStringAppendElement(&dString, "y");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->dropY));
-    Tcl_DStringAppendElement(&dString, "formats");
-    Tcl_DStringAppendElement(&dString, formats);
-    Tcl_DStringAppendElement(&dString, "button");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(button));
-    Tcl_DStringAppendElement(&dString, "state");
-    Tcl_DStringAppendElement(&dString, Blt_Itoa(keyState));
-    Tcl_DStringAppendElement(&dString, "timestamp");
-    Tcl_DStringAppendElement(&dString, Blt_Utoa(timestamp));
-    Tcl_Preserve(interp);
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    result = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-    Tcl_DStringFree(&dString);
-    if (result == TCL_OK) {
-	result = GetAction(Tcl_GetStringResult(interp));
-    } else {
-	result = DROP_CANCEL;
-	Tcl_BackgroundError(interp);
-    }
-    Tcl_DStringResult(interp, &savedResult);
-    Tcl_Release(interp);
-    return result;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- *  HandleDropEvent --
- *	
- *	Invokes a TCL procedure to handle the target's side of the drop.  This
- *	routine is triggered via a client message from the drag source
- *	indicating that the token was dropped over this target. The fields of
- *	the incoming message are:
- *
- *		data.l[0]	Message type.
- *		data.l[1]	Window Id of the source.
- *		data.l[2]	Screen X-coordinate of the pointer.
- *		data.l[3]	Screen Y-coordinate of the pointer.
- *		data.l[4]	Id of the drag&drop transaction.
- *
- *	A TCL procedure is invoked, either one designated for this target by the
- *	user (-ondrop) or a default TCL procedure. It is passed the following
- *	arguments:
- *
- *		widget		The path name of the target. 
- *		x		X-coordinate of the mouse relative to the 
- *				widget.
- *		y		Y-coordinate of the mouse relative to the 
- *				widget.
- *		formats		A list of data formats acceptable to both
- *				the source and target.
- *
- *	If the TCL procedure returns "cancel", this indicates that the drop was
- *	not accepted by the target and the reject symbol should be displayed.
- *	Otherwise one of the following strings may be recognized:
- *
- *		"cancel"	Drop was canceled.
- *		"copy"		Source data has been successfully copied.
- *		"link"		Target has made a link to the data. It's 
- *				Ok for the source to remove it's association
- *				with the data, but not to delete the data
- *				itself.
- *		"move"		Source data has been successfully copied,
- *				it's Ok for the source to delete its
- *				association with the data and the data itself.
- *
- *	The result is relayed back to the source via another client message.
- *	The source may or may not be waiting for the result.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A TCL procedure is invoked in the target to handle the drop event.
- *	The result of the drop is sent (via another ClientMessage) to the
- *	source.
- *
- *---------------------------------------------------------------------------
- */
-static void
-HandleDropEvent(
-    Dnd *dndPtr,			/* Target where the drop event
-					 * occurred. */
-    XEvent *eventPtr)			/* Message sent from the drag source. */
-{
-    int button, keyState;
-    int x, y;
-    const char *formats;
-    int result;
-    struct DropInfo {
-	int mesg;			/* TS_DROP message. */
-	Window window;			/* Source window. */
-	int timestamp;			/* Transaction timestamp. */
-	int point;			/* Root X-Y coordinate of pointer. */
-	int flags;			/* Button/keystate information. */
-    } *dropPtr;
-    DropPending pending;
-
-    dropPtr = (struct DropInfo *)eventPtr->xclient.data.l;
-    UNPACK(dropPtr->point, x, y);
-    UNPACK(dropPtr->flags, button, keyState);
-
-    /* Set up temporary bookkeeping for the drop transaction */
-    memset (&pending, 0, sizeof(pending));
-    pending.window = dropPtr->window;
-    pending.display = eventPtr->xclient.display;
-    pending.timestamp = dropPtr->timestamp;
-    pending.protocol = PROTO_BLT;
-    pending.packetSize = GetMaxPropertySize(pending.display);
-    Tcl_DStringInit(&pending.dString);
-
-    formats = GetSourceFormats(dndPtr, dropPtr->window, dropPtr->timestamp);
-
-    dndPtr->pendingPtr = &pending;
-    result = AcceptDrop(dndPtr, x, y, formats, button, keyState, 
-	dropPtr->timestamp);
-    dndPtr->pendingPtr = NULL;
-
-    /* Target-to-Source: Drop result message. */
-    SendClientMsg(dndPtr->display, dropPtr->window, dndPtr->dataPtr->mesgAtom,
-	TS_DROP_RESULT, (int)Tk_WindowId(dndPtr->tkwin), dropPtr->timestamp, 
-	result, 0);
-    FreeFormats(dndPtr);
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- *  HandleDragEvent --
- *	
- *	Invokes one of 3 TCL procedures to handle the target's side of the drag
- *	operation.  This routine is triggered via a ClientMessage from the drag
- *	source indicating that the token as either entered, moved, or left this
- *	target.  The source sends messages only if TCL procedures on the target
- *	have been defined to watch the events. The message_type field can be
- *	either
- *
- *	  ST_DRAG_ENTER		The mouse has entered the target.
- *	  ST_DRAG_MOTION	The mouse has moved within the target.
- *	  ST_DRAG_LEAVE		The mouse has left the target.
- *
- *	The data fields are as follows:
- *	  data.l[0]		Message type.
- *	  data.l[1]		Window Id of the source.
- *	  data.l[2]		Timestamp of the drag&drop transaction.
- *	  data.l[3]		Root X-Y coordinate of the pointer.
- *	  data.l[4]		Button and key state information.
- *
- *	For any of the 3 TCL procedures, the following arguments are passed:
- *
- *	  widget		The path name of the target. 
- *	  x			X-coordinate of the mouse in the widget.
- *	  y			Y-coordinate of the mouse in the widget.
- *	  formats		A list of data formats acceptable to both
- *				the source and target.
- *
- *	If the TCL procedure returns "cancel", this indicates that the drag
- *	operation has been canceled and the reject symbol should be displayed.
- *	Otherwise it should return a boolean:
- *
- *	  true			Target will accept drop.
- *	  false			Target will not accept the drop.
- *
- *	The purpose of the Enter and Leave procedure is to allow the target to
- *	provide visual feedback that the drop can occur or not.  The Motion
- *	procedure is for cases where the drop area is a smaller area within the
- *	target, such as a canvas item on a canvas. The procedure can determine
- *	(based upon the X-Y coordinates) whether the pointer is over the canvas
- *	item and return a value accordingly.
- *
- *	The result of the TCL procedure is then relayed back to the source by a
- *	ClientMessage.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A TCL procedure is invoked in the target to handle the drag event.
- *	The result of the drag is sent (via another ClientMessage) to the
- *	source.
- *
- *---------------------------------------------------------------------------
- */
-static void
-HandleDragEvent(
-    Dnd *dndPtr,			/* Target where the drag event
-					 * occurred. */
-    XEvent *eventPtr)			/* Message sent from the drag source. */
-{
-    const char **cmd;
-    int resp;
-    int x, y;
-    int button, keyState;
-    const char *formats;
-    struct DragInfo {
-	int mesg;			/* Drag-and-drop message type. */
-	Window window;			/* Source window. */
-	int timestamp;			/* Transaction timestamp. */
-	int point;			/* Root X-Y coordinate of pointer. */
-	int flags;			/* Button/keystate information. */
-    } *dragPtr;
-
-    dragPtr = (struct DragInfo *)eventPtr->xclient.data.l;
-
-    cmd = NULL;
-    switch (dragPtr->mesg) {
-    case ST_DRAG_ENTER:
-	cmd = dndPtr->enterCmd;
-	break;
-    case ST_DRAG_MOTION:
-	cmd = dndPtr->motionCmd;
-	break;
-    case ST_DRAG_LEAVE:
-	cmd = dndPtr->leaveCmd;
-	break;
-    } 
-    if (cmd == NULL) {
-	return;				/* Nothing to do. */
-    }
-    UNPACK(dragPtr->point, x, y);
-    UNPACK(dragPtr->flags, button, keyState);
-    formats = GetSourceFormats(dndPtr, dragPtr->window, dragPtr->timestamp);
-    resp = InvokeCallback(dndPtr, cmd, x, y, formats, button, keyState,
-		  dragPtr->timestamp);
-
-    /* Target-to-Source: Drag result message. */
-    SendClientMsg(dndPtr->display, dragPtr->window, dndPtr->dataPtr->mesgAtom,
-	TS_DRAG_STATUS, (int)Tk_WindowId(dndPtr->tkwin), dragPtr->timestamp, 
-	resp, 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DndEventProc --
- *
- *	Invoked by Tk_HandleEvent whenever a DestroyNotify event is received
- *	on a registered drag&drop source widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DndEventProc(
-    ClientData clientData,		/* Drag&drop record. */
-    XEvent *eventPtr)			/* Event description. */
-{
-    Dnd *dndPtr = clientData;
-
-    if (eventPtr->xany.window != Tk_WindowId(dndPtr->tkwin)) {
-	return 0;
-    }
-    if (eventPtr->type == DestroyNotify) {
-	dndPtr->tkwin = NULL;
-	dndPtr->flags |= DND_DELETED;
-	Tcl_EventuallyFree(dndPtr, DestroyDnd);
-	return 0;		/* Other handlers have to see this event too.*/
-    } else if (eventPtr->type == ButtonPress) {
-	dndPtr->keyState = eventPtr->xbutton.state;
-	dndPtr->button =  eventPtr->xbutton.button;
-	return 0;
-    } else if (eventPtr->type == ButtonRelease) {
-	dndPtr->keyState = eventPtr->xbutton.state;
-	dndPtr->button =  eventPtr->xbutton.button;
-	return 0;
-    } else if (eventPtr->type == MotionNotify) {
-	dndPtr->keyState = eventPtr->xmotion.state;
-	return 0;
-    } else if ((eventPtr->type == ClientMessage) &&
-	(eventPtr->xclient.message_type == dndPtr->dataPtr->mesgAtom)) {
-	int result;
-
-	switch((unsigned int)eventPtr->xclient.data.l[0]) {
-	case TS_START_DROP:
-	    DoDrop(dndPtr, eventPtr);
-	    return 1;
-	    
-	case TS_DROP_RESULT:
-	    result = eventPtr->xclient.data.l[MESG_RESPONSE];
-	    dndPtr->tokenPtr->status = result;
-	    if (result == DROP_CANCEL) {
-		CancelDrag(dndPtr);
-	    } else if (result == DROP_FAIL) {
-		EventuallyRedrawToken(dndPtr);
-	    } else {
-		dndPtr->tokenPtr->nSteps = 10;
-		FadeToken(dndPtr);
-	    }
-	    if (dndPtr->resultCmd != NULL) {
-		DropFinished(dndPtr, eventPtr);
-	    }
-	    return 1;
-
-	case TS_DRAG_STATUS:
-	    result = eventPtr->xclient.data.l[MESG_RESPONSE];
-	    ChangeToken(dndPtr, result);
-	    return 1;
-
-	case ST_DROP:
-	    HandleDropEvent(dndPtr, eventPtr);
-	    return 1;
-
-	case ST_DRAG_ENTER:
-	case ST_DRAG_MOTION:
-	case ST_DRAG_LEAVE:
-	    HandleDragEvent(dndPtr, eventPtr);
-	    return 1;
-	}
-    }
-    return 0;
-}
-
-static void
-SendPointerMessage(
-    Dnd *dndPtr,		/* Source drag&drop manager. */
-    int eventType,		/* Type of event to relay. */
-    Winfo *windowPtr,		/* Generic window information. */
-    int x, int y)		/* Root coordinates of mouse. */
-{
-    /* Source-to-Target: Pointer event messages. */
-    SendClientMsg(
-	dndPtr->display,	/* Display of recipient window. */
-	windowPtr->window,	/* Recipient window. */
-	dndPtr->dataPtr->mesgAtom, /* Message type. */
-	eventType,		/* Data 1 */
-	(int)Tk_WindowId(dndPtr->tkwin), /* Data 2 */
-	dndPtr->timestamp,	/* Data 3  */
-	PACK(x, y),		/* Data 4 */
-	PACK(dndPtr->button, dndPtr->keyState)); /* Data 5 */
-    /* Don't wait the response. */
-}
-
-static void
-RelayEnterEvent(Dnd *dndPtr, Winfo *windowPtr, int x, int y)
-{
-    if ((windowPtr != NULL) && (windowPtr->eventFlags & WATCH_ENTER)) {
-	SendPointerMessage(dndPtr, ST_DRAG_ENTER, windowPtr, x, y);
-    }
-}
-
-static void
-RelayLeaveEvent(Dnd *dndPtr, Winfo *windowPtr, int x, int y)
-{ 
-    if ((windowPtr != NULL) && (windowPtr->eventFlags & WATCH_LEAVE)) {
-	SendPointerMessage(dndPtr, ST_DRAG_LEAVE, windowPtr, x, y);
-    }
-}
-
-static void
-RelayMotionEvent(Dnd *dndPtr, Winfo *windowPtr, int x, int y)
-{
-    if ((windowPtr != NULL) && (windowPtr->eventFlags & WATCH_MOTION)) {
-	SendPointerMessage(dndPtr, ST_DRAG_MOTION, windowPtr, x, y);
-    }
-}
-
-static void
-RelayDropEvent(Dnd *dndPtr, Winfo *windowPtr, int x, int y)
-{
-    SendPointerMessage(dndPtr, ST_DROP, windowPtr, x, y);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  FreeWinfo --
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreeWinfo(Winfo *windowPtr)	/* Window rep to be freed */
-{
-    Winfo *childPtr;
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(windowPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	childPtr = Blt_Chain_GetValue(link);
-	FreeWinfo(childPtr);	/* Recursively free children. */
-    }
-    if (windowPtr->matches != NULL) {
-	Blt_Free(windowPtr->matches);
-    }
-    Blt_Chain_Destroy(windowPtr->chain);
-    Blt_Free(windowPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetWinfo --
- *
- *	Invoked during "drag" operations. Digs into the root window
- *	hierarchy and caches the window-related information.
- *	If the current point lies over an uninitialized window (i.e.
- *	one that already has an allocated Winfo structure, but has
- *	not been filled in yet), this routine is called to query 
- *	window coordinates.  If the window has any children, more 
- *	uninitialized Winfo structures are allocated.  Further queries 
- *	will cause these structures to be initialized in turn.
- *
- *---------------------------------------------------------------------------
- */
-static void
-GetWinfo(Display *display, Winfo *windowPtr) /* window rep to be initialized */
-{
-    int visible;
-
-    if (windowPtr->initialized) {
-	return;
-    }
-    /* Query for the window coordinates.  */
-    visible = GetWindowArea(display, windowPtr);
-    if (visible) {
-	Blt_ChainLink link;
-	Blt_Chain chain;
-	Winfo *childPtr;
-
-	/* Add offset from parent's origin to coordinates */
-	if (windowPtr->parentPtr != NULL) {
-	    windowPtr->x1 += windowPtr->parentPtr->x1;
-	    windowPtr->y1 += windowPtr->parentPtr->y1;
-	    windowPtr->x2 += windowPtr->parentPtr->x1;
-	    windowPtr->y2 += windowPtr->parentPtr->y1;
-	}
-	/*
-	 * Collect a list of child windows, sorted in z-order.  The
-	 * topmost window will be first in the list.
-	 */
-	chain = GetWindowZOrder(display, windowPtr->window);
-
-	/* Add and initialize extra slots if needed. */
-	for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    childPtr = Blt_AssertCalloc(1, sizeof(Winfo));
-	    childPtr->initialized = FALSE;
-	    childPtr->window = (Window)Blt_Chain_GetValue(link);
-	    childPtr->parentPtr = windowPtr;
-	    Blt_Chain_SetValue(link, childPtr);
-	}
-	windowPtr->chain = chain;
-    } else {
-	/* If it's not viewable don't bother doing anything else. */
-	windowPtr->x1 = windowPtr->y1 = windowPtr->x2 = windowPtr->y2 = -1;
-	windowPtr->chain = NULL;
-    }
-    windowPtr->initialized = TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  InitRoot --
- *
- *	Invoked at the start of a "drag" operation to capture the
- *	positions of all windows on the current root.  Queries the
- *	entire window hierarchy and determines the placement of each
- *	window.  Queries the "BltDndTarget" property info where
- *	appropriate.  This information is used during the drag
- *	operation to determine when the drag&drop token is over a
- *	valid drag&drop target.
- *
- *  Results:
- *	Returns the record for the root window, which contains records
- *	for all other windows as children.
- *
- *---------------------------------------------------------------------------
- */
-static Winfo *
-InitRoot(Dnd *dndPtr)
-{
-    Winfo *rootPtr;
-
-    rootPtr = Blt_AssertCalloc(1, sizeof(Winfo));
-    rootPtr->window = DefaultRootWindow(dndPtr->display);
-    dndPtr->windowPtr = NULL;
-    GetWinfo(dndPtr->display, rootPtr);
-    return rootPtr;
-}
-
-
-static int
-ParseProperty(Tcl_Interp *interp, Dnd *dndPtr, Winfo *windowPtr, char *data)
-{
-    int argc;
-    const char **argv;
-    int eventFlags;
-    Tcl_DString dString;
-    int count;
-    int i;
-    
-    if (Tcl_SplitList(interp, data, &argc, &argv) != TCL_OK) {
-	return TCL_ERROR;	/* Malformed property list. */
-    }
-    if (argc < 1) {
-	Tcl_AppendResult(interp, "Malformed property \"", data, "\"", 
-			 (char *)NULL);
-	goto error;
-    }
-    if (Tcl_GetInt(interp, argv[PROP_WATCH_FLAGS], &eventFlags) != TCL_OK) {
-	goto error;
-    }
-
-    /* target flags, type1, type2, ... */
-    /*
-     * The target property contains a list of possible formats.
-     * Compare this with what formats the source is willing to
-     * convert and compress the list down to just the matching
-     * formats.  It's up to the target to request the specific 
-     * type (or types) that it wants.
-     */
-    count = 0;
-    Tcl_DStringInit(&dString);
-    if (dndPtr->reqFormats == NULL) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-	char *fmt;
-
-	for (i = 1; i < argc; i++) {
-	    for(hPtr = Blt_FirstHashEntry(&dndPtr->getDataTable, &cursor);
-		hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-		fmt = Blt_GetHashKey(&dndPtr->getDataTable, hPtr);
-		if ((*fmt == argv[i][0]) && (strcmp(fmt, argv[i]) == 0)) {
-		    Tcl_DStringAppendElement(&dString, argv[i]);
-		    count++;
-		    break;
-		}
-	    }
-	}
-    } else {
-	const char **s;
-
-	for (i = 1; i < argc; i++) {
-	    for (s = dndPtr->reqFormats; *s != NULL; s++) {
-		if ((**s == argv[i][0]) && (strcmp(*s, argv[i]) == 0)) {
-		    Tcl_DStringAppendElement(&dString, argv[i]);
-		    count++;
-		}
-	    }
-	}
-    }
-    if (count == 0) {
-#ifdef notdef
-	fprintf(stderr, "source/target mismatch: No matching types\n");
-#endif
-	return TCL_BREAK;
-    } 
-    if (eventFlags != 0) {
-	SetProperty(dndPtr->tkwin, dndPtr->dataPtr->formatsAtom, 
-		    Tcl_DStringValue(&dString));
-	windowPtr->matches = NULL;
-    } else {
-	windowPtr->matches = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-    }
-    Tcl_DStringFree(&dString);	
-    windowPtr->eventFlags = eventFlags;
-    return TCL_OK;
- error:
-    Blt_Free(argv);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  OverTarget --
- *
- *      Checks to see if a compatible drag&drop target exists at the
- *      given position.  A target is "compatible" if it is a drag&drop
- *      window, and if it has a handler that is compatible with the
- *      current source window.
- *
- *  Results:
- *	Returns a pointer to a structure describing the target, or NULL
- *	if no compatible target is found.
- *
- *---------------------------------------------------------------------------
- */
-static Winfo *
-OverTarget(Dnd *dndPtr)		/* drag&drop source window */
-{
-    Tcl_Interp *interp = dndPtr->interp;
-    int x, y;
-    int vx, vy;
-    int dummy;
-    Winfo *windowPtr;
-
-    /* 
-     * If no window info has been been gathered yet for this target,
-     * then abort this call.  This probably means that the token is
-     * moved before it has been properly built.  
-     */
-    if (dndPtr->rootPtr == NULL) {
-	fprintf(stderr, "rootPtr not initialized\n");
-	return NULL;
-    }
-    /* Adjust current location for virtual root windows.  */
-    Tk_GetVRootGeometry(dndPtr->tkwin, &vx, &vy, &dummy, &dummy);
-    x = dndPtr->x + vx;
-    y = dndPtr->y + vy;
-
-    windowPtr = FindTopWindow(dndPtr, x, y);
-    if (windowPtr == NULL) {
-	return NULL;		/* Not over a window. */
-    }
-    if ((!dndPtr->selfTarget) && 
-	(Tk_WindowId(dndPtr->tkwin) == windowPtr->window)) {
-	return NULL;		/* If the self-target flag isn't set,
-				 *  don't allow the source window to
-				 *  drop onto itself.  */
-    }
-    if (!windowPtr->lookedForProperty) {
-	unsigned char *data;
-	int result;
-
-	windowPtr->lookedForProperty = TRUE;
-	/* See if this window has a "BltDndTarget" property. */
-	data = GetProperty(dndPtr->display, windowPtr->window, 
-		dndPtr->dataPtr->targetAtom);
-	if (data == NULL) {
-#ifdef notdef
-	    fprintf(stderr, "No property on 0x%x\n", windowPtr->window);
-#endif
-	    return NULL;		/* No such property on window. */
-	}
-	result = ParseProperty(interp, dndPtr, windowPtr, (char *)data);
-	XFree(data);
-	if (result == TCL_BREAK) {
-#ifdef notdef
-	    fprintf(stderr, "No matching formats\n");
-#endif
-	    return NULL;
-	}
-	if (result != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	    return NULL;		/* Malformed property list. */
-	} 
-	windowPtr->isTarget = TRUE;
-    }
-    if (!windowPtr->isTarget) {
-	return NULL;
-    }
-    return windowPtr;
-
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  AddTargetProperty --
- *
- *	Attaches a drag&drop property to the given target window.
- *	This property allows us to recognize the window later as a
- *	valid target. It also stores important information including
- *	the interpreter managing the target and the pathname of the
- *	target window.  Usually this routine is called when the target
- *	is first registered or first exposed (so that the X-window
- *	really exists).
- *
- *---------------------------------------------------------------------------
- */
-static void
-AddTargetProperty(Dnd *dndPtr)	/* drag&drop target window data */
-{
-    Tcl_DString dString;
-    Blt_HashEntry *hPtr;
-    unsigned int eventFlags;
-    Blt_HashSearch cursor;
-    char *fmt;
-    char string[200];
-
-    Tcl_DStringInit(&dString);
-    /*
-     * Each target window's dnd property contains
-     *
-     *	1. Mouse event flags.
-     *  2. List of all the data types that can be handled. If none
-     *     are listed, then all can be handled.
-     */
-    eventFlags = 0;
-    if (dndPtr->enterCmd != NULL) {
-	eventFlags |= WATCH_ENTER;
-    }
-    if (dndPtr->leaveCmd != NULL) {
-	eventFlags |= WATCH_LEAVE;
-    }
-    if (dndPtr->motionCmd != NULL) {
-	eventFlags |= WATCH_MOTION;
-    }
-    sprintf_s(string, 200, "0x%x", eventFlags);
-    Tcl_DStringAppendElement(&dString, string);
-    for (hPtr = Blt_FirstHashEntry(&dndPtr->setDataTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	fmt = Blt_GetHashKey(&dndPtr->setDataTable, hPtr);
-	Tcl_DStringAppendElement(&dString, fmt);
-    }
-    SetProperty(dndPtr->tkwin, dndPtr->dataPtr->targetAtom, 
-		Tcl_DStringValue(&dString));
-    dndPtr->targetPropertyExists = TRUE;
-    Tcl_DStringFree(&dString);
-}
-
-static void
-CancelDrag(Dnd *dndPtr)
-{
-    if (dndPtr->flags & DND_INITIATED) {
-	dndPtr->tokenPtr->nSteps = 10;
-	SnapToken(dndPtr);
-	StopActiveCursor(dndPtr);
-	if (dndPtr->cursor == None) {
-	    Tk_UndefineCursor(dndPtr->tkwin);
-	} else {
-	    Tk_DefineCursor(dndPtr->tkwin, dndPtr->cursor);
-	}
-    }
-    if (dndPtr->rootPtr != NULL) {
-	FreeWinfo(dndPtr->rootPtr);
-	dndPtr->rootPtr = NULL;
-    }
-}
-
-static int
-DragInit(Dnd *dndPtr, int x, int y)
-{
-    Token *tokenPtr = dndPtr->tokenPtr;
-    int result;
-    Winfo *newPtr;
-
-    assert((dndPtr->flags & DND_ACTIVE) == DND_SELECTED);
-    
-    if (dndPtr->rootPtr != NULL) {
-	FreeWinfo(dndPtr->rootPtr);
-    }
-    dndPtr->rootPtr = InitRoot(dndPtr); /* Reset information cache. */ 
-    dndPtr->flags &= ~DND_VOIDED;
-
-    dndPtr->x = x;	/* Save current location. */
-    dndPtr->y = y;
-    result = TRUE;
-    Tcl_Preserve(dndPtr);
-    if (dndPtr->packageCmd != NULL) {
-	Tcl_DString dString, savedResult;
-	Tcl_Interp *interp = dndPtr->interp;
-	int status;
-	const char **p;
-	int rx, ry;
-
-	Tcl_DStringInit(&dString);
-	for (p = dndPtr->packageCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&dString, *p);
-	}
-	Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-	rx = dndPtr->dragX - Blt_RootX(dndPtr->tkwin);
-	ry = dndPtr->dragY - Blt_RootY(dndPtr->tkwin);
-	Tcl_DStringAppendElement(&dString, "x");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(rx));
-	Tcl_DStringAppendElement(&dString, "y");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(ry));
-	Tcl_DStringAppendElement(&dString, "button");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->button));
-	Tcl_DStringAppendElement(&dString, "state");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->keyState));
-	Tcl_DStringAppendElement(&dString, "timestamp");
-	Tcl_DStringAppendElement(&dString, Blt_Utoa(dndPtr->timestamp));
-	Tcl_DStringAppendElement(&dString, "token");
-	Tcl_DStringAppendElement(&dString, Tk_PathName(tokenPtr->tkwin));
-
-	Tcl_DStringInit(&savedResult);
-	Tcl_DStringGetResult(interp, &savedResult);
-	dndPtr->flags |= DND_IN_PACKAGE;
-	status = Tcl_GlobalEval(interp, Tcl_DStringValue(&dString));
-	dndPtr->flags &= ~DND_IN_PACKAGE;
-	if (status == TCL_OK) {
-	    result = GetDragResult(interp, Tcl_GetStringResult(interp));
-	} else {
-	    Tcl_BackgroundError(interp);
-	}
-	Tcl_DStringFree(&dString);
-	Tcl_DStringResult(interp, &savedResult);
-	Tcl_DStringFree(&dString);
-	if (status != TCL_OK) {
-	    HideToken(dndPtr);
-	    Tcl_Release(dndPtr);
-	    return TCL_ERROR;
-	}
-    }
-    if (dndPtr->flags & DND_VOIDED) {
-	HideToken(dndPtr);
-	Tcl_Release(dndPtr);
-	return TCL_RETURN;
-    }
-    if ((!result) || (dndPtr->flags & DND_DELETED)) {
-	HideToken(dndPtr);
-	Tcl_Release(dndPtr);
-	return TCL_RETURN;
-    }
-    Tcl_Release(dndPtr);
-
-    if (dndPtr->cursor != None) {
-	Tk_Cursor cursor;
-	
-	/* Save the old cursor */
-	cursor = GetWidgetCursor(dndPtr->interp, dndPtr->tkwin);
-	if (dndPtr->cursor != None) {
-	    Tk_FreeCursor(dndPtr->display, dndPtr->cursor);
-	}
-	dndPtr->cursor = cursor;
-	if (dndPtr->cursors != NULL) {
-	    /* Temporarily install the drag-and-drop cursor. */
-	    Tk_DefineCursor(dndPtr->tkwin, dndPtr->cursors[0]);
-	}
-    }
-    if (Tk_WindowId(tokenPtr->tkwin) == None) {
-	Tk_MakeWindowExist(tokenPtr->tkwin);
-    }
-    if (!Tk_IsMapped(tokenPtr->tkwin)) {
-	Tk_MapWindow(tokenPtr->tkwin);
-    }
-    dndPtr->flags |= DND_INITIATED;
-    newPtr = OverTarget(dndPtr);
-    RelayEnterEvent(dndPtr, newPtr, x, y);
-    dndPtr->windowPtr = newPtr;
-    tokenPtr->status = (newPtr != NULL) ? DROP_OK : DROP_CONTINUE;
-    if (tokenPtr->lastStatus != tokenPtr->status) {
-	EventuallyRedrawToken(dndPtr);
-    }
-    MoveToken(dndPtr);		/* Move token to current drag point. */ 
-    RaiseToken(dndPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CancelOp --
- *
- *	Cancels the current drag&drop operation for the source.  Calling
- *	this operation does not affect the transfer of data from the 
- *	source to the target, once the drop has been made.  From the 
- *	source's point of view, the drag&drop operation is already over. 
- *
- *	Example: dnd cancel .widget
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Hides the token and sets a flag indicating that further "drag"
- *	and "drop" operations should be ignored.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CancelOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (!dndPtr->isSource) {
-	Tcl_AppendResult(interp, "widget \"", Tk_PathName(dndPtr->tkwin), 
-	 "\" is not a registered drag&drop source.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Send the target a Leave message so it can change back. */
-    RelayLeaveEvent(dndPtr, dndPtr->windowPtr, 0, 0);
-    CancelDrag(dndPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  CgetOp --
- *
- *	Called to process an (objc,objv) list to configure (or
- *	reconfigure) a drag&drop widget.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED*/
-static int
-CgetOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, dndPtr->tkwin, configSpecs, 
-	(char *)dndPtr, objv[3], 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  ConfigureOp --
- *
- *	Called to process an (objc,objv) list to configure (or
- *	reconfigure) a drag&drop widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,		/* current interpreter */
-    int objc,			/* number of arguments */
-    Tcl_Obj *const *objv)		/* argument strings */
-{
-    Dnd *dndPtr;
-    int flags;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, dndPtr->tkwin, configSpecs, 
-		(char *)dndPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, dndPtr->tkwin, configSpecs,
-	    (char *)dndPtr, objv[3], flags);
-    } 
-    if (Blt_ConfigureWidgetFromObj(interp, dndPtr->tkwin, configSpecs, objc - 3,
-		   objv + 3, (char *)dndPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (ConfigureDnd(interp, dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DeleteOp --
- *
- *	Deletes the drag&drop manager from the widget.  If a "-source"
- *	or "-target" switch is present, only that component of the
- *	drag&drop manager is shutdown.  The manager is not deleted
- *	unless both the target and source components are shutdown.
- *
- *	Example: dnd delete .widget
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Deletes the drag&drop manager.  Also the source and target window 
- *	properties are removed from the widget.
- *
- * ------------------------------------------------------------------------ 
- */
-static int
-DeleteOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    int i;
-
-    for(i = 3; i < objc; i++) {
-	Dnd *dndPtr;
-
-	if (GetDndFromObj(clientData, interp, objv[i], &dndPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	dndPtr->flags |= DND_DELETED;
-	Tcl_EventuallyFree(dndPtr, DestroyDnd);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SelectOp --
- *
- *	Initializes a drag&drop transaction.  Typically this operation
- *	is called from a ButtonPress event on a source widget.  The
- *	window information cache is initialized, and the token is 
- *	initialized and displayed.  
- *
- *	Example: dnd pickup .widget x y 
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	The token is initialized and displayed.  This may require invoking
- *	a user-defined package command.  The window information cache is
- *	also initialized.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SelectOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-    int x, y, timestamp;
-    Token *tokenPtr;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (!dndPtr->isSource) {
-	Tcl_AppendResult(interp, "widget \"", Tk_PathName(dndPtr->tkwin), 
-	 "\" is not a registered drag&drop source.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    tokenPtr = dndPtr->tokenPtr;
-    if (tokenPtr == NULL) {
-	Tcl_AppendResult(interp, "no drag&drop token created for \"", 
-		 objv[2], "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (Tcl_GetIntFromObj(interp, objv[5], &timestamp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (dndPtr->flags & (DND_IN_PACKAGE | DND_ACTIVE | DND_VOIDED)) {
-	return TCL_OK;
-    }
-
-    if (tokenPtr->timerToken != NULL) {
-	HideToken(dndPtr);	/* If the user selected again before the
-				 * token snap/melt has completed, first 
-				 * disable the token timer callback. */
-    }
-    /* At this point, simply save the starting pointer location. */
-    dndPtr->dragX = x, dndPtr->dragY = y;
-    GetTokenPosition(dndPtr, x, y);
-    tokenPtr->startX = tokenPtr->x;
-    tokenPtr->startY = tokenPtr->y;
-    dndPtr->timestamp = timestamp;
-    dndPtr->flags |= DND_SELECTED;
-    
-    if (dndPtr->dragStart == 0) {
-	if (DragInit(dndPtr, x, y) == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DragOp --
- *
- *	Continues the drag&drop transaction.  Typically this operation
- *	is called from a button Motion event on a source widget.  Pointer
- *	event messages are possibly sent to the target, indicating Enter,
- *	Leave, and Motion events.
- *
- *	Example: dnd drag .widget x y 
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Pointer events are relayed to the target (if the mouse is over
- *	one).
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DragOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Winfo *newPtr, *oldPtr;
-    Dnd *dndPtr;
-    int x, y;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (!dndPtr->isSource) {
-	Tcl_AppendResult(interp, "widget \"", Tk_PathName(dndPtr->tkwin), 
-	 "\" is not a registered drag&drop source.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (dndPtr->tokenPtr == NULL) {
-	Tcl_AppendResult(interp, "no drag&drop token created for \"", 
-		 objv[2], "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-
-    if ((dndPtr->flags & DND_SELECTED) == 0) {
-	return TCL_OK;		/* Re-entered this routine. */
-    }	
-    /* 
-     * The following code gets tricky because the package command may 
-     * call "update" or "tkwait".  A motion event may then trigger 
-     * this routine, before the token has been initialized. Until the 
-     * package command finishes, no target messages are sent and drops 
-     * are silently ignored.  Note that we do still track mouse 
-     * movements, so that when the package command completes, it will 
-     * have the latest pointer position.  
-     */
-    dndPtr->x = x;	/* Save current location. */
-    dndPtr->y = y;
-
-    if (dndPtr->flags & DND_IN_PACKAGE) {
-	return TCL_OK;		/* Re-entered this routine. */
-    }
-    if ((dndPtr->flags & DND_INITIATED) == 0) {
-	int dx, dy;
-	int result;
-
-	dx = dndPtr->dragX - x;
-	dy = dndPtr->dragY - y;
-	if ((ABS(dx) < dndPtr->dragStart) && (ABS(dy) < dndPtr->dragStart)) {
-	    return TCL_OK;
-	}
-	result = DragInit(dndPtr, x, y);
-	if (result == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	if (result == TCL_RETURN) {
-	    return TCL_OK;
-	}
-    }
-    if (dndPtr->flags & DND_VOIDED) {
-	return TCL_OK;
-    }
-    oldPtr = dndPtr->windowPtr;
-    newPtr = OverTarget(dndPtr);
-    if (newPtr == oldPtr) {
-	RelayMotionEvent(dndPtr, oldPtr, x, y); 
-	dndPtr->windowPtr = oldPtr;
-    } else {
-	RelayLeaveEvent(dndPtr, oldPtr, x, y);
-	RelayEnterEvent(dndPtr, newPtr, x, y);
-	dndPtr->windowPtr = newPtr;
-    } 
-    dndPtr->tokenPtr->status = (newPtr != NULL) ? DROP_OK : DROP_CONTINUE;
-    if (dndPtr->tokenPtr->lastStatus != dndPtr->tokenPtr->status) {
-	EventuallyRedrawToken(dndPtr);
-    }
-    MoveToken(dndPtr);		/* Move token to current drag point. */ 
-    RaiseToken(dndPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DropOp --
- *
- *	Finishes the drag&drop transaction by dropping the data on the
- *	selected target.  Typically this operation is called from a 
- *	ButtonRelease event on a source widget.  Note that a Leave message
- *	is always sent to the target so that is can un-highlight itself.
- *	The token is hidden and a drop message is sent to the target.
- *
- *	Example: dnd drop .widget x y 
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	The token is hidden and a drop message is sent to the target.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DropOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Winfo *windowPtr;
-    Dnd *dndPtr;
-    int x, y;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (!dndPtr->isSource) {
-	Tcl_AppendResult(interp, "widget \"", Tk_PathName(dndPtr->tkwin), 
-	 "\" is not a registered drag&drop source.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) ||
-	(Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    dndPtr->x = x;	/* Save drag&drop location */
-    dndPtr->y = y;
-    if ((dndPtr->flags & DND_INITIATED) == 0) {
-	return TCL_OK;		/* Never initiated any drag operation. */
-    }
-    if (dndPtr->flags & DND_VOIDED) {
-	HideToken(dndPtr);
-	return TCL_OK;
-    }
-    windowPtr = OverTarget(dndPtr);
-    if (windowPtr != NULL) {
-	if (windowPtr->matches != NULL) {
-	    SetProperty(dndPtr->tkwin, dndPtr->dataPtr->formatsAtom, 
-			windowPtr->matches);
-	}
-	MoveToken(dndPtr);	/* Move token to current drag point. */ 
-	RaiseToken(dndPtr);
-	RelayDropEvent(dndPtr, windowPtr, x, y);
-#ifdef notdef
-	tokenPtr->nSteps = 10;
-	FadeToken(dndPtr);
-#endif
-    } else {
-	CancelDrag(dndPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  GetdataOp --
- *
- *	Registers one or more data formats with a drag&drop source.  
- *	Each format has a TCL command associated with it.  This command
- *	is automatically invoked whenever data is pulled from the source
- *	to a target requesting the data in that particular format.  The 
- *	purpose of the TCL command is to get the data from in the 
- *	application. When the TCL command is invoked, special percent 
- *	substitutions are made:
- *
- *		%#		Drag&drop transaction timestamp.
- *		%W		Source widget.
- *
- *	If a converter (command) already exists for a format, it 
- *	overwrites the existing command.
- *
- *	Example: dnd getdata .widget "color" { %W cget -bg }
- *
- * Results:
- *	A standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetdataOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-    int i;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	/* Return list of source data formats */
-	for (hPtr = Blt_FirstHashEntry(&dndPtr->getDataTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Tcl_AppendElement(interp,
-		Blt_GetHashKey(&dndPtr->getDataTable, hPtr));
-	}
-	return TCL_OK;
-    }
-
-    if (objc == 4) {
-	Blt_HashEntry *hPtr;
-	const char *string;
-	const char **argv;
-
-	string = Tcl_GetString(objv[3]);
-	hPtr = Blt_FindHashEntry(&dndPtr->getDataTable, string);
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find handler for format \"", 
-		string, "\" for source \"", Tk_PathName(dndPtr->tkwin), "\"",
-	     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	argv = Blt_GetHashValue(hPtr);
-	if (argv == NULL) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), "", -1);
-	} else {
-	    Tcl_SetObjResult(interp, PrintList(interp, argv));
-	}
-	return TCL_OK;
-    }
-
-    for (i = 3; i < objc; i += 2) {
-	Blt_HashEntry *hPtr;
-	const char **argv;
-	int argc;
-	int isNew;
-
-	hPtr = Blt_CreateHashEntry(&dndPtr->getDataTable, 
-		Tcl_GetString(objv[i]), &isNew);
-	if (!isNew) {
-	    argv = Blt_GetHashValue(hPtr);
-	    Blt_Free(argv);
-	}
-	if (Tcl_SplitList(interp, Tcl_GetString(objv[i + 1]), &argc, &argv) 
-	    != TCL_OK) {
-	    Blt_DeleteHashEntry(&dndPtr->getDataTable, hPtr);
-	    return TCL_ERROR;
-	}
-	Blt_SetHashValue(hPtr, argv);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  NamesOp --
- *
- *	Returns the names of all the drag&drop managers.  If either
- *	a "-source" or "-target" switch is present, only the names of
- *	managers acting as sources or targets respectively are returned.
- *	A pattern argument may also be given.  Only those managers
- *	matching the pattern are returned.
- *
- *	Examples: dnd names
- *		  dnd names -source
- *		  dnd names -target
- *		  dnd names .*label
- * Results:
- *	A standard TCL result.  A TCL list of drag&drop manager
- *	names is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NamesOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    DndInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Dnd *dndPtr;
-    int findSources, findTargets;
-    char *string;
-    Tcl_Obj *listObjPtr;
-
-    findSources = findTargets = TRUE;
-    if (objc > 2) {
-	string = Tcl_GetString(objv[2]);
-	if ((string[0] == '-') && (strcmp(string, "-source") == 0)) {
-	    findTargets = FALSE;
-	    objc--, objv++;
-	} else if ((string[0] == '-') && (strcmp(string, "-target") == 0)) {
-	    findSources = FALSE;
-	    objc--, objv++;
-	}
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->dndTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	dndPtr = Blt_GetHashValue(hPtr);
-	if (objc > 3) {
-	    string = Tcl_GetString(objv[3]);
-	    if (!Tcl_StringMatch(Tk_PathName(dndPtr->tkwin), string)) {
-		continue;
-	    }
-	}
-	if (((findSources) && (dndPtr->isSource)) ||
-	    ((findTargets) && (dndPtr->isTarget))) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr,
-			Tcl_NewStringObj(Tk_PathName(dndPtr->tkwin), -1));
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-
-#ifdef notdef
-RunCommand(Dnd *dndPtr, char **formatCmd)
-{
-    Tcl_DString dString, savedResult;
-    Tcl_Obj **objv;
-    char **p;
-    
-    objc = 0;
-    for (objc = 0, p = formatCmd; *p != NULL; p++) {
-	objc++;
-    }
-    objc += 12;
-    objv = Blt_AssertMalloc(sizeof(Tcl_Obj *) * (objc + 1));
-    for (i = 0; p = formatCmd; *p != NULL; p++, i++) {
-	objv[i] = Tcl_NewStringObj(*p, -1);
-    }
-    objv[i++] = Tcl_NewStringObj(Tk_PathName(dndPtr->tkwin), -1);
-    objv[i++] = Tcl_NewStringObj("x", 1);
-    objv[i++] = Tcl_NewStringObj("x", 1);
-    objv[i++] = Tcl_NewIntObj(dndPtr->dropX);
-    objv[i++] = Tcl_NewStringObj("y", 1);
-    objv[i++] = Tcl_NewIntObj(dndPtr->dropY);
-    objv[i++] = Tcl_NewStringObj("timestamp", 9);
-    objv[i++] = Tcl_NewStringObj(Blt_Utoa(dndPtr->pendingPtr->timestamp), -1);
-    objv[i++] = Tcl_NewStringObj("format", 6);
-    objv[i++] = Tcl_NewStringObj(fmt, -1);
-    objv[i++] = Tcl_NewStringObj("value", 5);
-    objv[i++] = Tcl_NewStringObj(
-	Tcl_DStringValue(&dndPtr->pendingPtr->dString),
-	Tcl_DStringLength(&dndPtr->pendingPtr->dString));
-    for (i = 0; i < objc; i++) {
-	Tcl_IncrRefCount(objv[i]);
-    }
-    Tcl_DStringInit(&savedResult);
-    Tcl_DStringGetResult(interp, &savedResult);
-    if (Tcl_EvalObjv(interp, objc, objv, 0) != TCL_OK) {
-	Tcl_BackgroundError(interp);
-    }
-    Tcl_DStringResult(interp, &savedResult);
-    for (i = 0; i < objc; i++) {
-	Tcl_DecrRefCount(objv[i]);
-    }
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- *  PullOp --
- *
- *	Pulls the current data from the source in the given format.
- *	application.
- *
- *	dnd pull .widget format data
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	Invokes the target's data converter to store the data. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PullOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;		/* drag&drop source record */
-    int result;
-    char **formatCmd;
-    char *fmt;
-    Blt_HashEntry *hPtr;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (!dndPtr->isTarget) {
-	Tcl_AppendResult(interp, "widget \"", Tk_PathName(dndPtr->tkwin), 
-	 "\" is not a registered drag&drop target.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    fmt = Tcl_GetString(objv[3]);
-    hPtr = Blt_FindHashEntry(&dndPtr->setDataTable, fmt);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find format \"", fmt, 
-	 "\" in target \"", Tk_PathName(dndPtr->tkwin), "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    formatCmd = Blt_GetHashValue(hPtr);
-    if (dndPtr->pendingPtr == NULL) {
-	Tcl_AppendResult(interp, "no drop in progress", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    CompleteDataTransaction(dndPtr, fmt, dndPtr->pendingPtr);
-    result = TCL_OK;
-    if (Tcl_DStringLength(&dndPtr->pendingPtr->dString) > 0) {
-	Tcl_DString dString, savedResult;
-	char **p;
-
-	Tcl_DStringInit(&dString);
-	for (p = formatCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&dString, *p);
-	}
-	Tcl_DStringAppendElement(&dString, Tk_PathName(dndPtr->tkwin));
-	Tcl_DStringAppendElement(&dString, "x");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->dropX));
-	Tcl_DStringAppendElement(&dString, "y");
-	Tcl_DStringAppendElement(&dString, Blt_Itoa(dndPtr->dropY));
-	Tcl_DStringAppendElement(&dString, "timestamp");
-	Tcl_DStringAppendElement(&dString, 
-		Blt_Utoa(dndPtr->pendingPtr->timestamp));
-	Tcl_DStringAppendElement(&dString, "format");
-	Tcl_DStringAppendElement(&dString, Tcl_GetString(objv[3]));
-	Tcl_DStringAppendElement(&dString, "value");
-	Tcl_DStringAppendElement(&dString, 
-		Tcl_DStringValue(&dndPtr->pendingPtr->dString));
-	Tcl_DStringInit(&savedResult);
-	Tcl_DStringGetResult(interp, &savedResult);
-	if (Tcl_GlobalEval(interp, Tcl_DStringValue(&dString)) != TCL_OK) {
-	    Tcl_BackgroundError(interp);
-	}
-	Tcl_DStringResult(interp, &savedResult);
-	Tcl_DStringFree(&dString);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  SetdataOp --
- *
- *	Registers one or more data formats with a drag&drop target.  
- *	Each format has a TCL command associated with it.  This command
- *	is automatically invoked whenever data arrives from a source
- *	to be converted to that particular format.  The purpose of the 
- *	command is to set the data somewhere in the application (either 
- *	using a TCL command or variable).   When the TCL command is invoked, 
- *	special percent substitutions are made:
- *
- *		%#		Drag&drop transaction timestamp.
- *		%W		Target widget.
- *		%v		Data value transfered from the source to
- *				be converted into the correct format.
- *
- *	If a converter (command) already exists for a format, it 
- *	overwrites the existing command.
- *
- *	Example: dnd setdata .widget color { . configure -bg %v }
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SetdataOp(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    int i;
-
-    if (GetDndFromObj(clientData, interp, objv[2], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 3) {
-	/* Show target handler data formats */
-	for (hPtr = Blt_FirstHashEntry(&dndPtr->setDataTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    Tcl_AppendElement(interp,
-		Blt_GetHashKey(&dndPtr->setDataTable, hPtr));
-	}
-	return TCL_OK;
-    }
-    if (objc == 4) {
-	const char **argv;
-
-	hPtr = Blt_FindHashEntry(&dndPtr->setDataTable, objv[3]);
-	if (hPtr == NULL) {
-	    Tcl_AppendResult(interp, "can't find handler for format \"", 
-	     objv[3], "\" for target \"", Tk_PathName(dndPtr->tkwin), "\"",
-	     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	argv = Blt_GetHashValue(hPtr);
-	if (argv == NULL) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), "", -1);
-	} else {
-	    Tcl_SetObjResult(interp, PrintList(interp, argv));
-	}
-	return TCL_OK;
-    }
-    for (i = 3; i < objc; i += 2) {
-	const char **argv;
-	int isNew, argc;
-
-	hPtr = Blt_CreateHashEntry(&dndPtr->setDataTable, 
-		Tcl_GetString(objv[i]), &isNew);
-	if (!isNew) {
-	    argv = Blt_GetHashValue(hPtr);
-	    Blt_Free(argv);
-	}
-	if (Tcl_SplitList(interp, Tcl_GetString(objv[i + 1]), &argc, &argv) 
-	    != TCL_OK) {
-	    Blt_DeleteHashEntry(&dndPtr->setDataTable, hPtr);
-	    return TCL_ERROR;
-	}
-	Blt_SetHashValue(hPtr, argv);
-    }
-    AddTargetProperty(dndPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  RegisterOp --
- *
- *  dnd register .window 
- *---------------------------------------------------------------------------
- */
-static int
-RegisterOp(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    DndInterpData *dataPtr = clientData;
-    Tk_Window tkwin;
-    Blt_HashEntry *hPtr;
-    Dnd *dndPtr;
-    int isNew;
-
-    tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), dataPtr->tkMain);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    hPtr = Blt_CreateHashEntry(&dataPtr->dndTable, (char *)tkwin, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "\"", Tk_PathName(tkwin), 
-	     "\" is already registered as a drag&drop manager", (char *)NULL);
-	return TCL_ERROR;
-    }
-    dndPtr = CreateDnd(interp, tkwin);
-    dndPtr->hashPtr = hPtr;
-    dndPtr->dataPtr = dataPtr;
-    Blt_SetHashValue(hPtr, dndPtr);
-    if (Blt_ConfigureWidgetFromObj(interp, dndPtr->tkwin, configSpecs, objc - 3,
-	   objv + 3, (char *)dndPtr, 0) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (ConfigureDnd(interp, dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenWindowOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TokenWindowOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-    int flags;
-
-    if (GetDndFromObj(clientData, interp, objv[3], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = 0;
-    if (dndPtr->tokenPtr == NULL) {
-	if (CreateToken(interp, dndPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    } else {
-	flags = BLT_CONFIG_OBJV_ONLY;
-    }
-    if (ConfigureToken(interp, dndPtr, objc - 4, objv + 4, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-		     Tk_PathName(dndPtr->tokenPtr->tkwin), -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenCgetOp --
- *
- *	Called to process an (objc,objv) list to configure (or
- *	reconfigure) a drag&drop widget.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED*/
-static int
-TokenCgetOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    Dnd *dndPtr;
-
-    if (GetDndFromObj(clientData, interp, objv[3], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (dndPtr->tokenPtr == NULL) {
-	Tcl_AppendResult(interp, "no token created for \"", objv[3], "\"",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    return Blt_ConfigureValueFromObj(interp, dndPtr->tokenPtr->tkwin, 
-	tokenConfigSpecs, (char *)dndPtr->tokenPtr, objv[4], 
-	BLT_CONFIG_OBJV_ONLY);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenConfigureOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TokenConfigureOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Token *tokenPtr;
-    Dnd *dndPtr;
-    int flags;
-
-    if (GetDndFromObj(clientData, interp, objv[3], &dndPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    flags = BLT_CONFIG_OBJV_ONLY;
-    if (dndPtr->tokenPtr == NULL) {
-	Tcl_AppendResult(interp, "no token created for \"", objv[3], "\"",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    tokenPtr = dndPtr->tokenPtr;
-    if (objc == 3) {
-	return Blt_ConfigureInfoFromObj(interp, tokenPtr->tkwin, 
-		tokenConfigSpecs, (char *)tokenPtr, (Tcl_Obj *)NULL, flags);
-    } else if (objc == 4) {
-	return Blt_ConfigureInfoFromObj(interp, tokenPtr->tkwin, 
-		tokenConfigSpecs, (char *)tokenPtr, objv[3], flags);
-    } 
-    return ConfigureToken(interp, dndPtr, objc - 4, objv + 4, flags);
-}
-
-static Blt_OpSpec tokenOps[] =
-{
-    {"cget", 2, TokenCgetOp, 5, 5, "widget option",},
-    {"configure", 2, TokenConfigureOp, 4, 0, 
-	"widget ?option value?...",},
-    {"window", 5, TokenWindowOp, 4, 0, 
-	"widget ?option value?...",},
-};
-
-static int nTokenOps = sizeof(tokenOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- *  TokenOp --
- *
- *---------------------------------------------------------------------------
- */
-static int
-TokenOp(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nTokenOps, tokenOps, BLT_OP_ARG2, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-static Blt_OpSpec dndOps[] =
-{
-    {"cancel", 2, CancelOp, 3, 3, "widget",},
-    {"cget", 2, CgetOp, 4, 4, "widget option",},
-    {"configure", 4, ConfigureOp, 3, 0, 
-	"widget ?option value?...",},
-#ifdef notdef
-    {"convert", 4, ConvertOp, 5, 5, "widget data format",},
-#endif
-    {"delete", 2, DeleteOp, 3, 0,"?-source|-target? widget...",},
-    {"drag", 3, DragOp, 3, 0, "widget x y ?token?",},
-    {"drop", 3, DropOp, 3, 0, "widget x y ?token?",},
-    {"getdata", 1, GetdataOp, 3, 0, "widget ?format command?",},
-    {"names", 1, NamesOp, 2, 4, "?-source|-target? ?pattern?",},
-    {"pull", 1, PullOp, 4, 4, "widget format",},
-    {"register", 1, RegisterOp, 3, 0, "widget ?option value?...",},
-    {"select", 3, SelectOp, 6, 6, "widget x y timestamp",},
-    {"setdata", 3, SetdataOp, 3, 0, "widget ?format command?",},
-    {"token", 5, TokenOp, 3, 0, "args...",},
-};
-
-static int nDndOps = sizeof(dndOps) / sizeof(Blt_OpSpec);
-
-/*
- *---------------------------------------------------------------------------
- *
- *  DndCmd --
- *
- *	Invoked by TCL whenever the user issues a drag&drop command.
- *
- *---------------------------------------------------------------------------
- */
-static int
-DndCmd(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp,		/* current interpreter */
-    int objc,			/* number of arguments */
-    Tcl_Obj *const *objv)	/* Argument strings */
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nDndOps, dndOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DndInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "dnd" command is 
- *	destroyed.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys the hash table containing the drag&drop managers.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-DndInterpDeleteProc(
-    ClientData clientData,	/* Thread-specific data. */
-    Tcl_Interp *interp)
-{
-    DndInterpData *dataPtr = clientData;
-    Dnd *dndPtr;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->dndTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	dndPtr = Blt_GetHashValue(hPtr);
-	dndPtr->hashPtr = NULL;
-	DestroyDnd((DestroyData)dndPtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->dndTable);
-    Tcl_DeleteAssocData(interp, DND_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-static DndInterpData *
-GetDndInterpData(Tcl_Interp *interp)
-{
-    DndInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (DndInterpData *)Tcl_GetAssocData(interp, DND_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	Display *display;
-	Tk_Window tkwin;
-
-	dataPtr = Blt_AssertMalloc(sizeof(DndInterpData));
-	tkwin = Tk_MainWindow(interp);
-	display = Tk_Display(tkwin);
-	dataPtr->tkMain = tkwin;
-	dataPtr->display = display;
-	Tcl_SetAssocData(interp, DND_THREAD_KEY, DndInterpDeleteProc,
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->dndTable, BLT_ONE_WORD_KEYS);
-	dataPtr->mesgAtom = XInternAtom(display, "BLT Dnd Message", False);
-	dataPtr->targetAtom = XInternAtom(display, "BLT Dnd Target", False);
-	dataPtr->formatsAtom = XInternAtom(display, "BLT Dnd Formats",False);
-	dataPtr->commAtom = XInternAtom(display, "BLT Dnd CommData", False);
-
-#ifdef HAVE_XDND
-	dataPtr->XdndActionListAtom = XInternAtom(display, "XdndActionList", 
-		False);
-	dataPtr->XdndAwareAtom = XInternAtom(display, "XdndAware", False);
-	dataPtr->XdndEnterAtom = XInternAtom(display, "XdndEnter", False);
-	dataPtr->XdndFinishedAtom = XInternAtom(display, "XdndFinished", False);
-	dataPtr->XdndLeaveAtom = XInternAtom(display, "XdndLeave", False);
-	dataPtr->XdndPositionAtom = XInternAtom(display, "XdndPosition", False);
-	dataPtr->XdndSelectionAtom = XInternAtom(display, "XdndSelection", 
-						 False);
-	dataPtr->XdndStatusAtom = XInternAtom(display, "XdndStatus", False);
-	dataPtr->XdndTypeListAtom = XInternAtom(display, "XdndTypeList", False);
-#endif /* HAVE_XDND */
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  Blt_DndCmdInitProc --
- *
- *	Adds the drag&drop command to the given interpreter.  Should
- *	be invoked to properly install the command whenever a new
- *	interpreter is created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_DndCmdInitProc(Tcl_Interp *interp) /* Interpreter to be updated */
-{
-    static Blt_InitCmdSpec cmdSpec = { "dnd", DndCmd };
-
-    cmdSpec.clientData = GetDndInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#ifdef notdef
-/*
- * Registers bitmap outline of dragged data, used to indicate
- * what is being dragged by source.  Bitmap is XOR-ed as cursor/token
- * is moved around the screen.
- */
-static void
-Blt_DndSetOutlineBitmap(Tk_Window tkwin, Pixmap bitmap, int x, int y)
-{
-    
-}
-#endif
-
-#ifdef HAVE_XDND
-
-static void
-XDndFreeFormats(XDndHandler *handlerPtr)
-{
-    if (handlerPtr->formatArr != NULL) {
-	char **p;
-
-	for (p = handlerPtr->formatArr; *p != NULL; p++) {
-	    XFree(*p);
-	}
-	Blt_Free(handlerPtr->formatArr);
-	handlerPtr->formatArr = NULL;
-    }
-}
-
-static char **
-XDndGetFormats(XDndHandler *handlerPtr, XEvent *eventPtr)
-{
-    int flags;
-    Window window;
-    unsigned char *data;
-    Atom typeAtom;
-    Atom format;
-    int nItems, bytesAfter;
-    Atom *atomArr;
-    char *nameArr[XDND_MAX_TYPES + 1];
-    Display *display;
-
-    XDndFreeFormats(handlerPtr);
-    display = eventPtr->xclient.display;
-    window = eventPtr->xclient.data.l[0];
-    flags = eventPtr->xclient.data.l[1];
-    data = NULL;
-    if (flags & 0x01) {
-	result = XGetWindowProperty(
-	    display,		/* Display of window. */
-	    window,		/* Window holding the property. */
-	    handlerPtr->dataPtr->XdndTypeListAtom, /* Name of property. */
-	    0,			/* Offset of data (for multiple reads). */
-	    XDND_MAX_TYPES,	/* Maximum number of items to read. */
-	    False,		/* If true, delete the property. */
-	    XA_ATOM,		/* Desired type of property. */
-	    &typeAtom,		/* (out) Actual type of the property. */
-	    &format,		/* (out) Actual format of the property. */
-	    &nItems,		/* (out) # of items in specified format. */
-	    &bytesAfter,	/* (out) # of bytes remaining to be read. */
-	    (unsigned char **)&data);
-	if ((result != Success) || (format != 32) || (typeAtom != XA_ATOM)) {
-	    if (data != NULL) {
-		XFree((char *)data);
-		return (char **)NULL;
-	    }
-	}
-	atomArr = (Atom *)data;
-	nAtoms = nItems;
-    } else {
-	atomArr = &(eventPtr->xclient.data.l[2]);
-	nAtoms = 3;
-    }
-    formatArr = Blt_AssertCalloc(nAtoms + 1, sizeof(char *));
-    for (i = 0; (i < nAtoms) && (atomArr[i] != None); i++) {
-	formatArr[i] = XGetAtomName(display, atomArr[i]);
-    }
-    if (data != NULL) {
-	XFree((char *)data);
-    }
-    handlerPtr->formatArr = formatArr;
-}
-
-static char *
-GetMatchingFormats(Dnd *dndPtr, char **formatArr)
-{
-    int nMatches;
-
-    nMatches = 0;
-    Tcl_DStringInit(&dString);
-    for (p = formatArr; *p != NULL; p++) {
-	for(hPtr = Blt_FirstHashEntry(&dndPtr->setDataTable, &cursor);
-	    hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    fmt = Blt_GetHashKey(&dndPtr->setDataTable, hPtr);
-	    if ((*fmt == **p) && (strcmp(fmt, *p) == 0)) {
-		Tcl_DStringAppendElement(&dString, *p);
-		nMatches++;
-		break;
-	    }
-	}
-    }
-    if (nMatches > 0) {
-	char *string;
-
-	string = Blt_AssertStrdup(Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-	return string;
-    }
-    return NULL;
-}
-
-static void
-XDndPointerEvent(XDndHandler *handlerPtr, XEvent *eventPtr)
-{
-    Tk_Window tkwin;
-    int flags;
-    Atom action;
-    Window window;
-    
-    flags = 0;
-    action = None;
-    window = eventPtr->xclient.data.l[MESG_XDND_WINDOW];
-
-    /* 
-     * If the XDND source has no formats specified, don't process any
-     * further.  Simply send a "no accept" action with the message.
-     */
-    if (handlerPtr->formatArr != NULL) { 
-	Dnd *newPtr, *oldPtr;
-	int point;
-	int button, keyState;
-	int x, y;
-	char *formats;
-
-	point = (int)eventPtr->xclient.data.l[MESG_XDND_POINT];
-	UNPACK(point, x, y);
-
-	/*  
-	 * See if the mouse pointer currently over a drop target. We first
-	 * determine what Tk window is under the mouse, and then check if 
-	 * that window is registered as a drop target.  
-	 */
-	newPtr = NULL;
-	tkwin = Tk_CoordsToWindow(x, y, handlerPtr->tkwin);
-	if (tkwin != NULL) {
-	    Blt_HashEntry *hPtr;
-	    
-	    hPtr = Blt_FindHashEntry(&handlerPtr->dataPtr->dndTable, 
-				     (char *)tkwin);
-	    if (hPtr != NULL) {
-		newPtr = Blt_GetHashValue(hPtr);
-		if (!newPtr->isTarget) {
-		    newPtr = NULL; /* Not a DND target. */
-		}
-		formats = GetMatchingFormats(newPtr, handlerPtr->formatArr);
-		if (formats == NULL) {
-		    newPtr = NULL; /* Source has no matching formats. */
-		} 
-	    }
-	}
-	button = keyState = 0;
-	oldPtr = handlerPtr->dndPtr;
-	resp = DROP_CANCEL;
-	if (newPtr == oldPtr) {
-	    if ((oldPtr != NULL) && (oldPtr->motionCmd != NULL)) {
-		resp = InvokeCallback(oldPtr, oldPtr->motionCmd, x, y, formats,
-			 button, keyState, dndPtr->timestamp);
-	    }
-	} else {
-	    if ((oldPtr != NULL) && (oldPtr->leaveCmd != NULL)) {
-		InvokeCallback(oldPtr, oldPtr->leaveCmd, x, y, formats, button,
-			 keyState, dndPtr->timestamp);
-	    }
-	    if ((newPtr != NULL) && (newPtr->enterCmd != NULL)) {
-		resp = InvokeCallback(newPtr, newPtr->enterCmd, x, y, formats, 
-			button, keyState, dndPtr->timestamp);
-	    }
-	    handlerPtr->dndPtr = newPtr;
-	    /* 
-	     * Save the current mouse position, since we get them from the
-	     * drop message. 
-	     */
-	    newPtr->x = x;	
-	    newPtr->y = y;
-	} 
-	if (formats != NULL) {
-	    Blt_Free(formats);
-	}
-	flags = XDND_FLAGS_WANT_POSITION_MSGS;
-	if (resp) {
-	    flags |= XDND_FLAGS_ACCEPT_DROP;
-	    action = handlerPtr->dataPtr->XdndActionCopyAtom;
-	}
-    }
-    /* Target-to-Source: Drag result message. */
-    SendClientMsg(handlerPtr->display, window, 
-	handlerPtr->dataPtr->XdndStatusAtom, handlerPtr->window, 
-	flags, 0, 0, action);
-}
-
-static void
-XDndDropEvent(XDndHandler *handlerPtr, XEvent *eventPtr)
-{
-    Tk_Window tkwin;
-    int flags;
-    Atom action;
-    Window window;
-    int timestamp;
-
-    flags = 0;
-    action = None;
-    window = eventPtr->xclient.data.l[MESG_XDND_WINDOW];
-    timestamp = eventPtr->xclient.data.l[MESG_XDND_TIMESTAMP];
-
-    /* 
-     * If no formats were specified for the XDND source or if the last 
-     * motion event did not place the mouse over a valid drop target, 
-     * don't process any further. Simply send a "no accept" action with 
-     * the message.
-     */
-    if ((handlerPtr->formatArr != NULL) && (handlerPtr->dndPtr != NULL)) { 
-	int button, keyState;
-	Dnd *dndPtr = handlerPtr->dndPtr;
-	DropPending pending;
-	int resp;
-
-	button = keyState = 0;		/* Protocol doesn't supply this
-					 * information. */
-
-	/* Set up temporary bookkeeping for the drop transaction */
-	memset (&pending, 0, sizeof(pending));
-	pending.window = window;
-	pending.display = eventPtr->xclient.display;
-	pending.timestamp = timestamp;
-	pending.protocol = PROTO_XDND;
-	pending.packetSize = GetMaxPropertySize(pending.display);
-	Tcl_DStringInit(&pending.dString);
-	
-	formats = GetMatchingFormats(handlerPtr->dndPtr, handlerPtr->formatArr);
-	if (formats == NULL) {
-	}
-	dndPtr->pendingPtr = &pending;
-	resp = AcceptDrop(dndPtr, dndPtr->x, dndPtr->y, formats, button,
-	     keyState, action, timestamp);
-	dndPtr->pendingPtr = NULL;
-	if (resp) {
-	    flags |= XDND_FLAGS_ACCEPT_DROP;
-	    action = handlerPtr->dataPtr->XdndActionCopyAtom;
-	}
-    }
-    /* Target-to-Source: Drag result message. */
-    SendClientMsg(handlerPtr->display, window, 
-	handlerPtr->dataPtr->XdndStatusAtom, handlerPtr->window, 
-	flags, 0, 0, action);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- *  XDndProtoEventProc --
- *
- *	Invoked by Tk_HandleEvent whenever a DestroyNotify event is received
- *	on a registered drag&drop source widget.
- *
- *---------------------------------------------------------------------------
- */
-static int
-XDndProtoEventProc(
-    ClientData clientData,		/* Drag&drop record. */
-    XEvent *eventPtr)			/* Event description. */
-{
-    DndInterpData *dataPtr = clientData;
-    Tk_Window tkwin;
-    Blt_HashEntry *hPtr;
-    XDndHandler *handlerPtr;
-    int point;
-    int x, y;
-    Atom mesg;
-
-    if (eventPtr->type != ClientMessage) {
-	return 0;			/* Not a ClientMessage event. */
-    }
-    /* Was the recipient a registered toplevel window? */
-    hPtr = Blt_FindHashEntry(&dataPtr->handlerTable, 
-	     (char *)eventPtr->xclient.window);
-    if (hPtr == NULL) {
-	return 0;			/* No handler registered with window. */
-    }
-    handlerPtr = Blt_GetHashValue(hPtr);
-    mesg = eventPtr->xclient.message_type;
-    if (mesg == dataPtr->XdndEnterAtom) {
-	XDndGetFormats(handlerPtr, eventPtr);
-	handlerPtr->dndPtr = NULL;
-    } else if (mesg == dataPtr->XdndPositionAtom) {
-	XDndPointerEvent(handlerPtr, eventPtr);
-    } else if (mesg == dataPtr->XdndLeaveAtom) {
-	XDndFreeFormats(handlerPtr);	/* Free up any collected formats. */
-	if (handlerPtr->dndPtr != NULL) {
-	    InvokeCallback(handlerPtr->dndPtr, handlerPtr->dndPtr->leaveCmd, 
-		-1, -1, NULL, 0, 0);
-	    /* Send leave event to drop target. */
-	}
-    } else if (mesg == dataPtr->XdndDropAtom) {
-	XDndDropEvent(handlerPtr, eventPtr);
-    } else {
-	fprintf(stderr, "Unknown client message type = 0x%x\n", mesg);
-	return 0;			/* Unknown message type.  */
-    }
-    return 1;
-}
-
-static XDndHandler *
-XDndCreateHandler(Dnd *dndPtr)
-{
-    Tk_Window tkwin;
-    Window window;
-    Blt_HashEntry *hPtr;
-    int isNew;
-    XDndHandler *handlerPtr;
-
-    /* 
-     * Find the containing toplevel of this window. See if an XDND handler is
-     * already registered for it.
-     */
-    tkwin = Blt_GetToplevelWindow(dndPtr->tkwin);
-    window = Blt_GetWindowId(tkwin);	/* Use the wrapper window as
-					 * the real toplevel window. */
-    hPtr = Blt_CreateHashEntry(&dataPtr->XDndHandlerTable, (char *)window, 
-	&isNew);
-    if (!isNew) {
-	handlerPtr = (XDndHandler *)Blt_GetHashEntry(hPtr);
-	handlerPtr->refCount++;
-    } else {
-	handlerPtr = Blt_AssertMalloc(sizeof(XDndHandler));
-	handlerPtr->tkwin = tkwin;
-	handlerPtr->dndPtr = NULL;
-	handlerPtr->refCount = 1;
-	handlerPtr->dataPtr = dataPtr;
-	/* FIXME */
-	SetProperty(window, dataPtr->XdndAwareAtom, "3");
-	Blt_SetHashValue(hPtr, handlerPtr);
-    }
-    return handlerPtr;
-}
-
-static void
-XDndDeleteHandler(Dnd *dndPtr)
-{
-    Tk_Window tkwin;
-    Window window;
-    Blt_HashEntry *hPtr;
-
-    tkwin = Blt_GetToplevelWindow(dndPtr->tkwin);
-    window = Blt_GetWindowId(tkwin);	/* Use the wrapper window as the real
-					 * toplevel window. */
-    hPtr = Blt_FindHashEntry(&dataPtr->XDndHandlerTable, (char *)window);
-    if (hPtr != NULL) {
-	XDndHandler *handlerPtr;
-
-	handlerPtr = (XDndHandler *)Blt_GetHashEntry(hPtr);
-	handlerPtr->refCount--;
-	if (handlerPtr->refCount == 0) {
-	    XDndFreeFormats(handlerPtr); 
-	    XDeleteProperty(dndPtr->display, window, 
-		dndPtr->dataPtr->XdndAwareAtom);
-	    Blt_DeleteHashEntry(&dataPtr->XDndHandlerTable, hPtr);
-	    Blt_Free(handlerPtr);
-	}
-    }
-}
-
-#endif /* HAVE_XDND */
-
-#endif /* NO_DRAGDROP */
diff --git a/blt3.0/src/bltUnixFont.c b/blt3.0/src/bltUnixFont.c
deleted file mode 100644
index 3aeccfc..0000000
--- a/blt3.0/src/bltUnixFont.c
+++ /dev/null
@@ -1,2742 +0,0 @@
-
-/*
- * bltUnixFont.c --
- *
- * This module implements freetype (Xft) and Tk fonts for the BLT toolkit.
- * 
- * The Blt_Font is a wrapper around the existing Tk font structure, adding
- * Freetype fonts (via the XRender extension).  The original Tk font
- * procedures act as a fallback if a suitable Xft enabled server can't be
- * found.
- *
- *	Copyright 2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <ctype.h>
-#include "bltInt.h"
-#include <bltHash.h>
-#include "tkDisplay.h"
-#include "tkFont.h"
-
-#ifdef HAVE_LIBXFT
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include <X11/Xft/Xft.h>
-#endif
-
-#include "bltFont.h"
-#include "bltPs.h"
-
-#undef isspace
-
-/*
- * This module provides antialiased fonts via Freetype as now does Tk 8.5.
- * This version also includes rotated fonts. No subfont matching is done to
- * avoid rotating dozens of subfonts for every rotated font.  It's possible
- * that glyphs may be missing that exist in the Tk version.  The trade-off
- * seems fair when weighing the benefit of high-quality antialiased rotated
- * fonts.
- *
- * Font rotation is done via the freetype font matrix for outline fonts.  For
- * bitmap fonts we fall back on drawing the text into a bitmap and rotate the
- * bitmap.  This requires depth-aware versions of Tk_DrawChars, since Xft is
- * drawing into a drawable of a different depth (depth is 1).
- * 
- * The best tactic is to 1) not use bitmapped fonts if better outline fonts
- * are available and 2) provide our own font handling routines that allow font
- * rotation and font aliasing.  The font aliases allow us to use a font name
- * like "Sans Serif" that translates into a good font for that platform and
- * set of fonts available (Xft or Xlfd font).
- */
- 
-#define DEBUG_FONT_SELECTION	0
-#define DEBUG_FONT_SELECTION2	0
-
-typedef struct _Blt_Font _Blt_Font;
-
-enum FontTypes { 
-    FONT_UNKNOWN, 		/* Unknown font type. */
-    FONT_TK, 			/* Normal Tk font. */
-    FONT_FT 			/* Freetype font. */
-};
-
-#ifndef HAVE_LIBXFT
-#define FC_WEIGHT_THIN		    0
-#define FC_WEIGHT_EXTRALIGHT	    40
-#define FC_WEIGHT_ULTRALIGHT	    FC_WEIGHT_EXTRALIGHT
-#define FC_WEIGHT_LIGHT		    50
-#define FC_WEIGHT_BOOK		    75
-#define FC_WEIGHT_REGULAR	    80
-#define FC_WEIGHT_NORMAL	    FC_WEIGHT_REGULAR
-#define FC_WEIGHT_MEDIUM	    100
-#define FC_WEIGHT_DEMIBOLD	    180
-#define FC_WEIGHT_SEMIBOLD	    FC_WEIGHT_DEMIBOLD
-#define FC_WEIGHT_BOLD		    200
-#define FC_WEIGHT_EXTRABOLD	    205
-#define FC_WEIGHT_ULTRABOLD	    FC_WEIGHT_EXTRABOLD
-#define FC_WEIGHT_BLACK		    210
-#define FC_WEIGHT_HEAVY		    FC_WEIGHT_BLACK
-#define FC_WEIGHT_EXTRABLACK	    215
-#define FC_WEIGHT_ULTRABLACK	    FC_WEIGHT_EXTRABLACK
-
-#define FC_SLANT_ROMAN		    0
-#define FC_SLANT_ITALIC		    100
-#define FC_SLANT_OBLIQUE	    110
-
-#define FC_WIDTH_ULTRACONDENSED	    50
-#define FC_WIDTH_EXTRACONDENSED	    63
-#define FC_WIDTH_CONDENSED	    75
-#define FC_WIDTH_SEMICONDENSED	    87
-#define FC_WIDTH_NORMAL		    100
-#define FC_WIDTH_SEMIEXPANDED	    113
-#define FC_WIDTH_EXPANDED	    125
-#define FC_WIDTH_EXTRAEXPANDED	    150
-#define FC_WIDTH_ULTRAEXPANDED	    200
-
-#define FC_PROPORTIONAL		    0
-#define FC_DUAL			    90
-#define FC_MONO			    100
-#define FC_CHARCELL		    110
-
-#define FC_ANTIALIAS	    "antialias"		/* Bool (depends) */
-#define FC_AUTOHINT	    "autohint"		/* Bool (false) */
-#define FC_DECORATIVE	    "decorative"	/* Bool  */
-#define FC_EMBEDDED_BITMAP  "embeddedbitmap"	/* Bool  */
-#define FC_EMBOLDEN	    "embolden"		/* Bool */
-#define FC_FAMILY	    "family"		/* String */
-#define FC_GLOBAL_ADVANCE   "globaladvance"	/* Bool (true) */
-#define FC_HINTING	    "hinting"		/* Bool (true) */
-#define FC_MINSPACE	    "minspace"		/* Bool */
-#define FC_OUTLINE	    "outline"		/* Bool */
-#define FC_SCALABLE	    "scalable"		/* Bool */
-#define FC_SIZE		    "size"		/* Double */
-#define FC_SLANT	    "slant"		/* Int */
-#define FC_SPACING	    "spacing"		/* Int */
-#define FC_STYLE	    "style"		/* String */
-#define FC_VERTICAL_LAYOUT  "verticallayout"	/* Bool (false) */
-#define FC_WEIGHT	    "weight"		/* Int */
-#define FC_WIDTH	    "width"		/* Int */
-
-#endif
-
-#ifndef FC_WEIGHT_EXTRABLACK
-#define FC_WEIGHT_EXTRABLACK	    215
-#define FC_WEIGHT_ULTRABLACK	    FC_WEIGHT_EXTRABLACK
-#endif
-
-typedef struct {
-    char *family;
-    const char *weight;
-    const char *slant;
-    const char *width;
-    const char *spacing;
-    int size;			/* If negative, pixels, else points */
-} TkFontPattern;
-
-typedef struct {
-    const char *name;
-    int minChars;
-    const char *key;
-    int value;
-    const char *oldvalue;
-} FontSpec;
-    
-static FontSpec fontSpecs[] = {
-    { "black",        2, FC_WEIGHT,  FC_WEIGHT_BLACK,     "*"},
-    { "bold",         3, FC_WEIGHT,  FC_WEIGHT_BOLD,      "bold"},
-    { "book",         3, FC_WEIGHT,  FC_WEIGHT_MEDIUM,	  "medium"},
-    { "charcell",     2, FC_SPACING, FC_CHARCELL,	  "c"},
-    { "condensed",    2, FC_WIDTH,   FC_WIDTH_CONDENSED,  "condensed"},
-    { "demi",         4, FC_WEIGHT,  FC_WEIGHT_BOLD,      "semi"},
-    { "demibold",     5, FC_WEIGHT,  FC_WEIGHT_DEMIBOLD,  "semibold"},
-    { "dual",         2, FC_SPACING, FC_DUAL,		  "*"},
-    { "i",            1, FC_SLANT,   FC_SLANT_ITALIC,	  "i"},
-    { "italic",       2, FC_SLANT,   FC_SLANT_ITALIC,	  "i"},
-    { "light",        1, FC_WEIGHT,  FC_WEIGHT_LIGHT,	  "light"},
-    { "medium",       2, FC_WEIGHT,  FC_WEIGHT_MEDIUM,	  "medium"},
-    { "mono",         2, FC_SPACING, FC_MONO,		  "m"},
-    { "normal",       1, FC_WIDTH,   FC_WIDTH_NORMAL,	  "normal"},
-    { "o",            1, FC_SLANT,   FC_SLANT_OBLIQUE,	  "o"},
-    { "obilque",      2, FC_SLANT,   FC_SLANT_OBLIQUE,	  "o"},
-    { "overstrike",   2, NULL,       0,			  "*"},
-    { "proportional", 1, FC_SPACING, FC_PROPORTIONAL,	  "p"},
-    { "r",            1, FC_SLANT,   FC_SLANT_ROMAN,      "r"},
-    { "roman",        2, FC_SLANT,   FC_SLANT_ROMAN,      "r"},
-    { "semibold",     5, FC_WEIGHT,  FC_WEIGHT_DEMIBOLD,  "semibold"},
-    { "semicondensed",5, FC_WIDTH,   FC_WIDTH_SEMICONDENSED,  "semicondensed"},
-    { "underline",    1, NULL,       0,		          "*"},
-};
-static int nFontSpecs = sizeof(fontSpecs) / sizeof(FontSpec);
-
-static FontSpec weightSpecs[] ={
-    { "black",		2, FC_WEIGHT, FC_WEIGHT_BLACK,	    "bold"},
-    { "bold",		3, FC_WEIGHT, FC_WEIGHT_BOLD,	    "bold"},
-    { "book",		3, FC_WEIGHT, FC_WEIGHT_MEDIUM,	    "*"},
-    { "demi",		4, FC_WEIGHT, FC_WEIGHT_BOLD,	    "*"},
-    { "demibold",	5, FC_WEIGHT, FC_WEIGHT_DEMIBOLD,   "*"},
-    { "extrablack",	6, FC_WEIGHT, FC_WEIGHT_EXTRABLACK, "*"},
-    { "extralight",	6, FC_WEIGHT, FC_WEIGHT_EXTRALIGHT, "*"},
-    { "heavy",		1, FC_WEIGHT, FC_WEIGHT_HEAVY,      "*"},
-    { "light",		1, FC_WEIGHT, FC_WEIGHT_LIGHT,	    "light"},
-    { "medium",		1, FC_WEIGHT, FC_WEIGHT_MEDIUM,	    "medium"},
-    { "normal",         1, FC_WEIGHT, FC_WEIGHT_MEDIUM,     "normal"},
-    { "regular",	1, FC_WEIGHT, FC_WEIGHT_REGULAR,    "medium"},
-    { "semibold",	1, FC_WEIGHT, FC_WEIGHT_SEMIBOLD,   "semibold"},
-    { "thin",		1, FC_WEIGHT, FC_WEIGHT_THIN,       "thin"},
-    { "ultrablack",	7, FC_WEIGHT, FC_WEIGHT_ULTRABLACK, "*"},
-    { "ultrabold",	7, FC_WEIGHT, FC_WEIGHT_ULTRABOLD,  "*"},
-    { "ultralight",	6, FC_WEIGHT, FC_WEIGHT_ULTRALIGHT, "*"},
-};
-static int nWeightSpecs = sizeof(weightSpecs) / sizeof(FontSpec);
-
-static FontSpec slantSpecs[] ={
-    { "i",		1, FC_SLANT, FC_SLANT_ITALIC,	"i"},
-    { "italic",		2, FC_SLANT, FC_SLANT_ITALIC,	"i"},
-    { "o",		1, FC_SLANT, FC_SLANT_OBLIQUE,	"o"},
-    { "obilque",	3, FC_SLANT, FC_SLANT_OBLIQUE,	"o"},
-    { "r",		1, FC_SLANT, FC_SLANT_ROMAN,	"r"},
-    { "roman",		2, FC_SLANT, FC_SLANT_ROMAN,	"r"},
-};
-static int nSlantSpecs = sizeof(slantSpecs) / sizeof(FontSpec);
-
-static FontSpec widthSpecs[] ={
-    { "condensed",	1, FC_WIDTH, FC_WIDTH_CONDENSED,      "condensed"},
-    { "expanded",	3, FC_WIDTH, FC_WIDTH_EXPANDED,	      "*"},
-    { "extracondensed", 6, FC_WIDTH, FC_WIDTH_EXTRACONDENSED, "*"},
-    { "extraexpanded",	6, FC_WIDTH, FC_WIDTH_EXTRAEXPANDED,  "*"},
-    { "narrow",		2, FC_WIDTH, FC_WIDTH_CONDENSED,      "narrow"},
-    { "normal",		2, FC_WIDTH, FC_WIDTH_NORMAL,	      "normal"},
-    { "semicondensed",	5, FC_WIDTH, FC_WIDTH_SEMICONDENSED,  "semicondensed"},
-    { "semiexpanded",	5, FC_WIDTH, FC_WIDTH_SEMIEXPANDED,   "*"},
-    { "ultracondensed",	6, FC_WIDTH, FC_WIDTH_ULTRACONDENSED, "*"},
-    { "ultraexpanded",	6, FC_WIDTH, FC_WIDTH_ULTRAEXPANDED,  "*"},
-};
-static int nWidthSpecs = sizeof(widthSpecs) / sizeof(FontSpec);
-
-static FontSpec spacingSpecs[] = {
-    { "charcell",     2, FC_SPACING, FC_CHARCELL,	  "c"},
-    { "dual",         2, FC_SPACING, FC_DUAL,		  "*"},
-    { "mono",         2, FC_SPACING, FC_MONO,		  "m"},
-    { "proportional", 1, FC_SPACING, FC_PROPORTIONAL,	  "p"},
-};
-static int nSpacingSpecs = sizeof(spacingSpecs) / sizeof(FontSpec);
-
-static FontSpec boolSpecs[] ={
-    { "antialias",	1, FC_ANTIALIAS,	},
-    { "decorative",	1, FC_DECORATIVE,	},
-    { "embeddedbitmap", 4, FC_EMBEDDED_BITMAP,	},
-    { "embolden",	4, FC_EMBOLDEN,		},
-    { "globaladvance",	1, FC_GLOBAL_ADVANCE,	},
-    { "hinting",	1, FC_HINTING,		},
-    { "minspace",	1, FC_MINSPACE,		},
-    { "outline",	1, FC_OUTLINE,		},
-    { "scalable",	1, FC_SCALABLE,		},
-    { "verticallayout", 1, FC_VERTICAL_LAYOUT,	},
-};
-static int nBoolSpecs = sizeof(boolSpecs) / sizeof(FontSpec);
-
-static Blt_HashTable fontTable;
-static void TkGetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr);
-
-enum XLFDFields { 
-    XLFD_FOUNDRY, 
-    XLFD_FAMILY, 
-    XLFD_WEIGHT, 
-    XLFD_SLANT,	
-    XLFD_SETWIDTH, 
-    XLFD_ADD_STYLE, 
-    XLFD_PIXEL_SIZE,
-    XLFD_POINT_SIZE, 
-    XLFD_RESOLUTION_X, 
-    XLFD_RESOLUTION_Y,
-    XLFD_SPACING, 
-    XLFD_AVERAGE_WIDTH, 
-    XLFD_CHARSET,
-    XLFD_NUMFIELDS
-};
-
-
-#ifdef HAVE_LIBXFT
-static void FtGetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr);
-static int initialized = FALSE;
-
-static int
-IsXRenderAvailable(Tk_Window tkwin)
-{
-    static int isXRenderAvail = -1;
-
-    if (isXRenderAvail < 0) {
-	int eventBase, errorBase;
-
-	isXRenderAvail = FALSE;
-	Blt_InitHashTable(&fontTable, BLT_STRING_KEYS);
-	initialized = TRUE;
-	if (!XRenderQueryExtension(Tk_Display(tkwin), &eventBase, &errorBase)) {
-	    return FALSE;
-	}
-	if (XRenderFindVisualFormat(Tk_Display(tkwin), Tk_Visual(tkwin)) == 0) {
-	    return FALSE;
-	}
-	isXRenderAvail = TRUE;
-    }
-    return isXRenderAvail;
-}
-#endif
-
-static double
-PointsToPixels(Tk_Window tkwin, int size)
-{
-    double d;
-
-    if (size < 0) {
-        return -size;
-    }
-    d = size * 25.4 / 72.0;
-    d *= WidthOfScreen(Tk_Screen(tkwin));
-    d /= WidthMMOfScreen(Tk_Screen(tkwin));
-    return d;
-}
-
-static double
-PixelsToPoints(Tk_Window tkwin, int size)
-{
-    double d;
-
-    if (size >= 0) {
-	return size;
-    }
-    d = -size * 72.0 / 25.4;
-    d *= WidthMMOfScreen(Tk_Screen(tkwin));
-    d /= WidthOfScreen(Tk_Screen(tkwin));
-    return d;
-}
-
-static void
-ParseXLFD(const char *fontName, int *argcPtr, char ***argvPtr)
-{
-    char *p, *pend, *desc, *buf;
-    size_t arrayLen, stringLen;
-    int count;
-    char **field;
-
-    arrayLen = (sizeof(char *) * (XLFD_NUMFIELDS + 1));
-    stringLen = strlen(fontName);
-    buf = Blt_AssertCalloc(1, arrayLen + stringLen + 1);
-    desc = buf + arrayLen;
-    strcpy(desc, fontName);
-    field = (char **)buf;
-
-    count = 0;
-    for (p = desc, pend = p + stringLen; p < pend; p++, count++) {
-	char *word;
-
-	field[count] = NULL;
-	/* Get the next word, separated by dashes (-). */
-	word = p;
-	while ((*p != '\0') && (*p != '-')) {
-	    if (((*p & 0x80) == 0) && Tcl_UniCharIsUpper(UCHAR(*p))) {
-		*p = (char)Tcl_UniCharToLower(UCHAR(*p));
-	    }
-	    p++;
-	}
-	if (*p != '\0') {
-	    *p = '\0';
-	}
-	if ((word[0] == '\0') || 
-	    (((word[0] == '*') || (word[0] == '?')) && (word[1] == '\0'))) {
-	    continue;		/* Field not specified. -- -*- -?- */
-	}
-	field[count] = word;
-    }
-
-    /*
-     * An XLFD of the form -adobe-times-medium-r-*-12-*-* is pretty common,
-     * but it is (strictly) malformed, because the first * is eliding both the
-     * Setwidth and the Addstyle fields. If the Addstyle field is a number,
-     * then assume the above incorrect form was used and shift all the rest of
-     * the fields right by one, so the number gets interpreted as a pixelsize.
-     * This fix is so that we don't get a million reports that "it works under
-     * X (as a native font name), but gives a syntax error under Windows (as a
-     * parsed set of attributes)".
-     */
-
-    if ((count > XLFD_ADD_STYLE) && (field[XLFD_ADD_STYLE] != NULL)) {
-	int dummy;
-
-	if (Tcl_GetInt(NULL, field[XLFD_ADD_STYLE], &dummy) == TCL_OK) {
-	    int j;
-	    
-	    for (j = XLFD_NUMFIELDS - 1; j >= XLFD_ADD_STYLE; j--) {
-		field[j + 1] = field[j];
-	    }
-	    field[XLFD_ADD_STYLE] = NULL;
-	    count++;
-	}
-    }
-    *argcPtr = count;
-    *argvPtr = field;
-
-    field[XLFD_NUMFIELDS] = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchForFontSpec --
- *
- *      Performs a binary search on the array of font specification to find a
- *      partial, anchored match for the given option string.
- *
- * Results:
- *	If the string matches unambiguously the index of the specification in
- *	the array is returned.  If the string does not match, even as an
- *	abbreviation, any operation, -1 is returned.  If the string matches,
- *	but ambiguously -2 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SearchForFontSpec(
-    FontSpec *table,		/* Table of font options.  */
-    int nSpecs,			/* # specifications in font spec table. */
-    const char *string)		/* Name of font option to search for. */
-{
-    char c;
-    int high, low;
-    size_t length;
-
-    low = 0;
-    high = nSpecs - 1;
-    c = tolower((unsigned char)string[0]);
-    length = strlen(string);
-    while (low <= high) {
-	FontSpec *sp;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	sp = table + median;
-
-	/* Test the first character */
-	compare = c - sp->name[0];
-	if (compare == 0) {
-	    /* Now test the entire string */
-	    compare = strncasecmp(string, sp->name, length);
-	    if (compare == 0) {
-		if ((int)length < sp->minChars) {
-		    return -2;	/* Ambiguous spec name */
-		}
-	    }
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return median;	/* Spec found. */
-	}
-    }
-    return -1;			/* Can't find spec */
-}
-
-static FontSpec *
-FindSpec(Tcl_Interp *interp, FontSpec *tablePtr, int nSpecs, const char *string)
-{
-    int n;
-    
-    n = SearchForFontSpec(tablePtr, nSpecs, string);
-    if (n < 0) {
-	if (n == -1) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "unknown ", tablePtr[0].key,
-			     " specification \"", string, "\"", (char *)NULL); 
-	    }
-	}
-	if (n == -2) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "ambiguous ", tablePtr[0].key,
-			     " specification \"", string, "\"", (char *)NULL); 
-	    }
-	}
-	return NULL;
-    }
-    return tablePtr + n;
-}
-
-static Blt_HashTable aliasTable;
-static int alias_initialized = 0;
-
-typedef struct {
-    const char *name, *aliases[10];
-} FontAlias;
-
-#ifdef HAVE_LIBXFT
-static FontAlias xftFontAliases[] = {
-    { "math",	{ "mathematica1",  "nimbus sans l condensed", "courier"}},
-    { "serif",  { "times new roman", "nimbus roman no9 l" "times" }},
-    { "sans serif", { "arial", "nimbus sans l", "helvetica" }},
-    { "monospace", { "courier new", "nimbus mono l", "courier" }},
-    { "symbol", { "standard symbols l", "symbol" }},
-    { NULL }
-};
-#endif
-
-static FontAlias xlfdFontAliases[] = {
-    { "math",		{"courier"}},
-    { "serif",		{"times"}},
-    { "sans serif",	{ "helvetica" }},
-    { "monospace",	{ "courier" }},
-    { NULL }
-};
-
-static void
-MakeAliasTable(Tk_Window tkwin)
-{
-    Blt_HashTable familyTable;
-    FontAlias *fp;
-    FontAlias *table;
-
-    Blt_InitHashTable(&familyTable, TCL_STRING_KEYS);
-#ifdef HAVE_LIBXFT
-    if (IsXRenderAvailable(tkwin)) {
-	FtGetFontFamilies(tkwin, &familyTable);
-    } else {
-	TkGetFontFamilies(tkwin, &familyTable);
-    }
-#else 
-    TkGetFontFamilies(tkwin, &familyTable);
-#endif
-    Blt_InitHashTable(&aliasTable, TCL_STRING_KEYS);
-#ifdef HAVE_LIBXFT
-    table = (IsXRenderAvailable(tkwin)) ? xftFontAliases : xlfdFontAliases;
-#else 
-    table = xlfdFontAliases;
-#endif
-    for(fp = table; fp->name != NULL; fp++) {
-	Blt_HashEntry *hPtr;
-	const char **alias;
-	   
-	for (alias = fp->aliases; *alias != NULL; alias++) {
-	    hPtr = Blt_FindHashEntry(&familyTable, *alias);
-	    if (hPtr != NULL) {
-		int isNew;
-		
-		hPtr = Blt_CreateHashEntry(&aliasTable, fp->name, &isNew);
-		Blt_SetHashValue(hPtr, *alias);
-		break;
-	    }
-	}
-    }
-    Blt_DeleteHashTable(&familyTable);
-}
-
-static const char *
-GetAlias(const char *family)
-{
-    Blt_HashEntry *hPtr;
-
-    strtolower((char *)family);
-    hPtr = Blt_FindHashEntry(&aliasTable, family);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return family;
-}
-
-static Blt_NameOfFontProc		TkNameOfFontProc;
-static Blt_GetFontMetricsProc		TkGetFontMetricsProc;
-static Blt_FontIdProc			TkFontIdProc;
-static Blt_MeasureCharsProc		TkMeasureCharsProc;
-static Blt_TextStringWidthProc		TkTextStringWidthProc;
-static Blt_FreeFontProc			TkFreeFontProc;
-static Blt_DrawCharsProc		TkDrawCharsProc;
-static Blt_PostscriptFontNameProc	TkPostscriptFontNameProc;
-static Blt_FamilyOfFontProc		TkFamilyOfFontProc;
-static Blt_CanRotateFontProc		TkCanRotateFontProc;
-static Blt_UnderlineCharsProc		TkUnderlineCharsProc;
-
-static Blt_FontClass tkFontClass = {
-    FONT_TK,
-    TkNameOfFontProc,		/* Blt_NameOfFontProc */
-    TkFamilyOfFontProc,		/* Blt_FamilyOfFontProc */
-    TkFontIdProc,		/* Blt_FontIdProc */
-    TkGetFontMetricsProc,	/* Blt_GetFontMetricsProc */
-    TkMeasureCharsProc,		/* Blt_MeasureCharsProc */
-    TkTextStringWidthProc,	/* Blt_TextWidthProc */
-    TkCanRotateFontProc,	/* Blt_CanRotateFontProc */
-    TkDrawCharsProc,		/* Blt_DrawCharsProc */
-    TkPostscriptFontNameProc,	/* Blt_PostscriptFontNameProc */
-    TkFreeFontProc,		/* Blt_FreeFontProc */
-    TkUnderlineCharsProc,	/* Blt_UnderlineCharsProc */
-};
-
-static TkFontPattern *
-TkNewFontPattern(void)
-{
-    TkFontPattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(TkFontPattern));
-    return patternPtr;
-}
-
-static void
-TkFreeFontPattern(TkFontPattern *patternPtr)
-{
-    if (patternPtr->family != NULL) {
-	Blt_Free((char *)patternPtr->family);
-    }
-    Blt_Free(patternPtr);
-}
-
-
-static void
-TkGetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr)
-{
-    char **list, **np, **nend;
-    const char *pat;
-    int n;
-    
-    pat = "-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
-    list = XListFonts(Tk_Display(tkwin), pat, 10000, &n);
-    for (np = list, nend = np + n; np < nend; np++) {
-	Blt_HashEntry *hPtr;
-	int isNew;
-	char *family, *dash;
-	
-	/* Parse out the family name. Assume the names are all lower case. */
-	dash = strchr(*np+1, '-');
-	if (dash == NULL) {
-	    continue;
-	}
-	family = dash+1;
-	dash = strchr(family, '-');
-	if (dash != NULL) {
-	    *dash = '\0';
-	}
-	hPtr = Blt_CreateHashEntry(tablePtr, family, &isNew);
-	Blt_SetHashValue(hPtr, NULL);
-    }
-    XFreeFontNames(list);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkParseTkDesc --
- *
- *	Parses an array of Tcl_Objs as a Tk style font description .  
- *	
- *	      "family [size] [optionList]"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a  Tk font description.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static TkFontPattern *
-TkParseTkDesc(Tcl_Interp *interp, int objc, Tcl_Obj **objv)
-{
-    TkFontPattern *patternPtr;
-    Tcl_Obj **aobjv;
-    int aobjc;
-    int i;
-
-    patternPtr = TkNewFontPattern();
-
-    /* Font family. */
-    {
-	char *family, *dash;
-	family = Tcl_GetString(objv[0]);
-	dash = strchr(family, '-');
-	if (dash != NULL) {
-	    int size;
-	    
-	    if (Tcl_GetInt(NULL, dash + 1, &size) != TCL_OK) {
-		goto error;
-	    }
-	    patternPtr->size = size;
-	}
-	if (dash != NULL) {
-	    *dash = '\0';
-	}
-	patternPtr->family = Blt_AssertStrdup(GetAlias(family));
-	if (dash != NULL) {
-	    *dash = '-';
-	    i = 1;
-	}
-	objv++, objc--;
-    }
-    if (objc > 0) {
-	int size;
-
-	if (Tcl_GetIntFromObj(NULL, objv[0], &size) == TCL_OK) {
-	    patternPtr->size = size;
-	    objv++, objc--;
-	}
-    }
-    aobjc = objc, aobjv = objv;
-    if (objc > 0) {
-	if (Tcl_ListObjGetElements(NULL, objv[0], &aobjc, &aobjv) != TCL_OK) {
-	    goto error;
-	}
-    }
-    for (i = 0; i < aobjc; i++) {
-	FontSpec *specPtr;
-	const char *key;
-
-	key = Tcl_GetString(aobjv[i]);
-	specPtr = FindSpec(interp, fontSpecs, nFontSpecs, key);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	if (specPtr->key == NULL) {
-	    continue;
-	}
-	if (strcmp(specPtr->key, FC_WEIGHT) == 0) {
-	    patternPtr->weight = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_SLANT) == 0) {
-	    patternPtr->slant = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_SPACING) == 0) {
-	    patternPtr->spacing = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_WIDTH) == 0) {
-	    patternPtr->width = specPtr->oldvalue;
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "found TkDesc => Tk font \"%s\"\n", patternPtr->family);
-#endif
-    return patternPtr;
- error:
-    TkFreeFontPattern(patternPtr);
-    return NULL;
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkParseNameValuePairs --
- *
- *	Given Tcl_Obj list of name value pairs, parse the list saving
- *	in the values in a font pattern structure.
- *	
- *	      "-family family -size size -weight weight"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a valid name-value list 
- *	describing a font.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static TkFontPattern *
-TkParseNameValuePairs(Tcl_Interp *interp, Tcl_Obj *objPtr) 
-{
-    TkFontPattern *patternPtr;
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-
-    if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) ||
-	(objc < 1)) {
-	return NULL;		/* Can't split list or list is empty. */
-    }
-    if (objc & 0x1) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "odd number of elements, missing value",
-			 (char *)NULL);
-	}
-	return NULL;		/* Odd number of elements in list. */
-    }
-    patternPtr = TkNewFontPattern();
-    for (i = 0; i < objc; i += 2) {
-	const char *key, *value;
-
-	key = Tcl_GetString(objv[i]);
-	value = Tcl_GetString(objv[i+1]);
-	if (strcmp(key, "-family") == 0) {
-	    if (patternPtr->family != NULL) {
-		Blt_Free(patternPtr->family);
-	    }
-	    patternPtr->family = Blt_AssertStrdup(GetAlias(value));
-	} else if (strcmp(key, "-size") == 0) {
-	    int size;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i+1], &size) != TCL_OK) {
-		goto error;
-	    }
-	    patternPtr->size = size;
-	} else if (strcmp(key, "-weight") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, weightSpecs, nWeightSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->weight = specPtr->oldvalue;
-	} else if (strcmp(key, "-slant") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, slantSpecs, nSlantSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->slant = specPtr->oldvalue;
-	} else if (strcmp(key, "-spacing") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, spacingSpecs, nSpacingSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->spacing = specPtr->oldvalue;
-	} else if (strcmp(key, "-hint") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-rgba") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-underline") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-overstrike") == 0) {
-	    /* Ignore */
-	} else {
-	    /* Ignore */
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "found TkAttrList => Tk font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-#endif
-    return patternPtr;
- error:
-    TkFreeFontPattern(patternPtr);
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkParseNameValuePairs --
- *
- *	Given the name of a Tk font object, get its configuration values 
- *	save the data in a font pattern structure.
- *	
- *	      "-family family -size size -weight weight"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a valid name-value list 
- *	describing a font.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static TkFontPattern *
-TkParseFontObj(Tcl_Interp *interp, Tcl_Obj *objPtr) 
-{
-    TkFontPattern *patternPtr;
-    Tcl_Obj *cmd[3];
-    int result;
-
-    patternPtr = NULL;
-    cmd[0] = Tcl_NewStringObj("font", -1);
-    cmd[1] = Tcl_NewStringObj("configure", -1);
-    cmd[2] = objPtr;
-    Tcl_IncrRefCount(cmd[0]);
-    Tcl_IncrRefCount(cmd[1]);
-    Tcl_IncrRefCount(cmd[2]);
-    result = Tcl_EvalObjv(interp, 3, cmd, 0);
-    Tcl_DecrRefCount(cmd[2]);
-    Tcl_DecrRefCount(cmd[1]);
-    Tcl_DecrRefCount(cmd[0]);
-    if (result == TCL_OK) {
-	patternPtr = TkParseNameValuePairs(interp, Tcl_GetObjResult(interp));
-    }
-    Tcl_ResetResult(interp);
-#if DEBUG_FONT_SELECTION
-    if (patternPtr != NULL) {
-	fprintf(stderr, "found FontObject => Tk font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-    }
-#endif
-    return patternPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * TkGetPattern --
- * 
- *	Parses the font description so that the font can rewritten with an
- *	aliased font name.  This allows us to use
- *
- *	  "Sans Serif", "Serif", "Math", "Monospace"
- *
- *	font names that correspond to the proper font regardless if the
- *	standard X fonts or XFT fonts are being used.
- *
- *	Leave XLFD font descriptions alone.  Let users describe exactly the
- *	font they wish.
- *
- *---------------------------------------------------------------------------
- */
-static TkFontPattern *
-TkGetPattern(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    TkFontPattern *patternPtr;
-    char *desc;
-
-    desc = Tcl_GetString(objPtr);
-    while (isspace(*desc)) {
-	desc++;			/* Skip leading blanks. */
-    }
-    if (*desc == '-') {
-	/* 
-	 * Case 1: XLFD font description or Tk attribute list.   
-	 *
-	 *   If the font description starts with a '-', it could be either an
-	 *   old fashion XLFD font description or a Tk font attribute
-	 *   option-value list.
-	 */
-	patternPtr = TkParseNameValuePairs(interp, objPtr);
-	if (patternPtr == NULL) {
-	    return NULL;		/* XLFD font description */
-	}
-    } else if (*desc == '*') {
-	return NULL;		/* XLFD font description */
-    } else if (strpbrk(desc, "::") != NULL) {
-	patternPtr = TkParseFontObj(interp, objPtr);
-    } else {
-	int objc;
-	Tcl_Obj **objv;
-	/* 
-	 * Case 3: Tk-style description.   
-	 */
-	if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) || 
-	    (objc < 1)) {
-	    return NULL;		/* Can't split into a list or
-					 * list is empty. */
-	}
-	patternPtr = NULL;
-	if (objc == 1) {
-	    /* 
-	     * Case 3a: Tk font object name.
-	     *
-	     *   Assuming that Tk font object names won't contain whitespace,
-	     *   see if its a font object.
-	     */
-	    patternPtr = TkParseFontObj(interp, objv[0]);
-	} 
-	if (patternPtr == NULL) {
-	    /* 
-	     * Case 3b: List of font attributes in the form "family size
-	     *		?attrs?"
-	     */
-	    patternPtr = TkParseTkDesc(interp, objc, objv);
-	}
-    }	
-    return patternPtr;
-}
-
-static void
-TkWriteXLFDDescription(Tk_Window tkwin, TkFontPattern *patternPtr, 
-		       Tcl_DString *resultPtr)
-{
-    const char *string;
-    int size;
-    
-    /* Rewrite the font description using the aliased family. */
-    Tcl_DStringInit(resultPtr);
-
-    /* Foundry */
-    Tcl_DStringAppend(resultPtr, "-*-", 3);
-    /* Family */
-    string = (patternPtr->family != NULL) ? patternPtr->family : "*";
-    Tcl_DStringAppend(resultPtr, string, -1);
-    Tcl_DStringAppend(resultPtr, "-", 1);
-    /* Weight */
-    string = (patternPtr->weight == NULL) ? "*" : patternPtr->weight;
-    Tcl_DStringAppend(resultPtr, string, -1);
-    Tcl_DStringAppend(resultPtr, "-", 1);
-    /* Slant */
-    string = (patternPtr->slant == NULL) ? "*" : patternPtr->slant;
-    Tcl_DStringAppend(resultPtr, string, -1);
-    Tcl_DStringAppend(resultPtr, "-", 1);
-    /* Width */
-    string = (patternPtr->width == NULL) ? "*" : patternPtr->width;
-    Tcl_DStringAppend(resultPtr, string, -1);
-    /* Style */
-    Tcl_DStringAppend(resultPtr, "-*-", 3);
-    /* Pixel size */
-    size = (int)(PointsToPixels(tkwin, patternPtr->size) + 0.5);
-    string = (size == 0) ? "*" : Blt_Itoa(size);
-    Tcl_DStringAppend(resultPtr, string, -1);
-    /* Point size */
-    Tcl_DStringAppend(resultPtr, "-", 1);
-    size = (int)(PixelsToPoints(tkwin, patternPtr->size) + 0.5);
-    string = (size == 0) ? "*" : Blt_Itoa(size);
-    Tcl_DStringAppend(resultPtr, string, -1);
-    
-    /* resx, resy */
-    Tcl_DStringAppend(resultPtr, "-*-*-", 5);
-    /* Spacing */
-    string = (patternPtr->spacing == NULL) ? "*" : patternPtr->spacing;
-    Tcl_DStringAppend(resultPtr, string, -1);
-    /* Average Width, Registry, Encoding */
-    Tcl_DStringAppend(resultPtr, "-*-*-*-", 7);
-}
-    
-/* 
- *---------------------------------------------------------------------------
- *
- * TkGetFontFromObj --
- * 
- *	Opens a Tk font based on the description in the Tcl_Obj.  We first
- *	parse the description and if necessary rewrite it using the proper
- *	font aliases.  The font names
- *
- *	  "Sans Serif", "Serif", "Math", "Monospace"
- *
- *	correspond to the proper font regardless if the standard X fonts or
- *	XFT fonts are being used.
- *
- *	Leave XLFD font descriptions alone.  Let users describe exactly the
- *	font they wish.
- *
- *	Outside of reimplementing the Tk font mechanism, rewriting the
- *	font allows use to better handle programs that must work with
- *	X servers with and without the XRender extension.  It means 
- *	that the widget's default font settings do not have to use
- *	XLFD fonts even if XRender is available.
- *	
- *---------------------------------------------------------------------------
- */
-static Tk_Font
-TkGetFontFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    Tk_Font tkFont;
-    TkFontPattern *patternPtr;
-
-    if (!alias_initialized) {
-	MakeAliasTable(tkwin);
-	alias_initialized++;
-    }
-    patternPtr = TkGetPattern(interp, objPtr);
-    if (patternPtr == NULL) {
-	tkFont = Tk_GetFont(interp, tkwin, Tcl_GetString(objPtr));
-    } else {
-	Tcl_DString ds;
-
-	/* Rewrite the font description using the aliased family. */
-	TkWriteXLFDDescription(tkwin, patternPtr, &ds);
-	tkFont = Tk_GetFont(interp, tkwin, Tcl_DStringValue(&ds));
-	fprintf(stderr, "Tkfont: %s => %s\n", Tcl_GetString(objPtr),
-		Tcl_DStringValue(&ds));
-	Tcl_DStringFree(&ds);
-	TkFreeFontPattern(patternPtr);
-    }
-    return tkFont;
-}
-
-static const char *
-TkNameOfFontProc(_Blt_Font *fontPtr) 
-{
-    return Tk_NameOfFont(fontPtr->clientData);
-}
-
-static const char *
-TkFamilyOfFontProc(_Blt_Font *fontPtr) 
-{
-    return ((TkFont *)fontPtr->clientData)->fa.family;
-}
-
-static Font
-TkFontIdProc(_Blt_Font *fontPtr) 
-{
-    return Tk_FontId(fontPtr->clientData);
-}
-
-static void
-TkGetFontMetricsProc(_Blt_Font *fontPtr, Blt_FontMetrics *fmPtr)
-{
-    TkFont *tkFontPtr = fontPtr->clientData;
-    Tk_FontMetrics fm;
-
-    Tk_GetFontMetrics(fontPtr->clientData, &fm);
-    fmPtr->ascent = fm.ascent;
-    fmPtr->descent = fm.descent;
-    fmPtr->linespace = fm.linespace;
-    fmPtr->tabWidth = tkFontPtr->tabWidth;
-    fmPtr->underlinePos = tkFontPtr->underlinePos;
-    fmPtr->underlineHeight = tkFontPtr->underlineHeight;
-}
-
-static int
-TkMeasureCharsProc(_Blt_Font *fontPtr, const char *text, int nBytes, int max, 
-		   int flags, int *lengthPtr)
-{
-    return Tk_MeasureChars(fontPtr->clientData, text, nBytes, max, flags, 
-	lengthPtr);
-}
-
-static int
-TkTextStringWidthProc(_Blt_Font *fontPtr, const char *string, int nBytes)
-{
-    return Tk_TextWidth(fontPtr->clientData, string, nBytes);
-}    
-
-static void
-TkDrawCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for drawing characters. */
-    _Blt_Font *fontPtr,		/* Font in which characters will be drawn;
-				 * must be the same as font used in GC. */
-    int depth,			/* Not used. */
-    float angle,		/* Not used. */
-    const char *text,		/* UTF-8 string to be displayed.  Need not be
-				 * '\0' terminated.  All Tk meta-characters
-				 * (tabs, control characters, and newlines)
-				 * should be stripped out of the string that
-				 * is passed to this function.  If they are
-				 * not stripped out, they will be displayed as
-				 * regular printing characters. */
-    int nBytes,			/* Number of bytes in string. */
-    int x, int y)		/* Coordinates at which to place origin of
-				 * string when drawing. */
-{
-    Tk_DrawChars(display, drawable, gc, fontPtr->clientData,text, nBytes, x, y);
-}
-
-static int
-TkPostscriptFontNameProc(_Blt_Font *fontPtr, Tcl_DString *resultPtr) 
-{
-    TkFont *tkFontPtr;
-    unsigned int flags;
-
-    tkFontPtr = (TkFont *)fontPtr->clientData;
-    flags = 0;
-    if (tkFontPtr->fa.slant != TK_FS_ROMAN) {
-	flags |= FONT_ITALIC;
-    }
-    if (tkFontPtr->fa.weight != TK_FW_NORMAL) {
-	flags |= FONT_BOLD;
-    }
-    Blt_Ps_FontName(tkFontPtr->fa.family, flags, resultPtr);
-    return tkFontPtr->fa.size;
-}
-
-static int
-TkCanRotateFontProc(_Blt_Font *fontPtr, float angle) 
-{
-    return FALSE;
-}
-
-static void
-TkFreeFontProc(_Blt_Font *fontPtr) 
-{
-    Tk_FreeFont(fontPtr->clientData);
-    Blt_Free(fontPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkUnderlineCharsProc --
- *
- *	This procedure draws an underline for a given range of characters in a
- *	given string.  It doesn't draw the characters (which are assumed to
- *	have been displayed previously); it just draws the underline.  This
- *	procedure would mainly be used to quickly underline a few characters
- *	without having to construct an underlined font.  To produce properly
- *	underlined text, the appropriate underlined font should be constructed
- *	and used.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets displayed in "drawable".
- *
- *---------------------------------------------------------------------------
- */
-static void
-TkUnderlineCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for actually drawing
-				 * line. */
-    _Blt_Font *fontPtr,		/* Font used in GC; must have been
-				 * allocated by Tk_GetFont().  Used for
-				 * character dimensions, etc. */
-    const char *string,		/* String containing characters to be
-				 * underlined or overstruck. */
-    int x, int y,		/* Coordinates at which first character of
-				 * string is drawn. */
-    int first,			/* Byte offset of the first character. */
-    int last)			/* Byte offset after the last character. */
-{
-    Tk_UnderlineChars(display, drawable, gc, fontPtr->clientData, string, x, y, 
-	first, last);
-}
-
-
-#ifdef HAVE_LIBXFT
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include <X11/Xft/Xft.h>
-
-static Blt_NameOfFontProc		FtNameOfFontProc;
-static Blt_FamilyOfFontProc		FtFamilyOfFontProc;
-static Blt_FontIdProc			FtFontIdProc;
-static Blt_GetFontMetricsProc		FtGetFontMetricsProc;
-static Blt_MeasureCharsProc		FtMeasureCharsProc;
-static Blt_TextStringWidthProc		FtTextStringWidthProc;
-static Blt_FreeFontProc			FtFreeFontProc;
-static Blt_DrawCharsProc		FtDrawCharsProc;
-static Blt_PostscriptFontNameProc	FtPostscriptFontNameProc;
-static Blt_CanRotateFontProc		FtCanRotateFontProc;
-static Blt_UnderlineCharsProc		FtUnderlineCharsProc;
-
-static Blt_FontClass ftFontClass = {
-    FONT_FT,
-    FtNameOfFontProc,			/* Blt_NameOfFontProc */
-    FtFamilyOfFontProc,			/* Blt_FamilyOfFontProc */
-    FtFontIdProc,			/* Blt_FontIdProc */
-    FtGetFontMetricsProc,		/* Blt_GetFontMetricsProc */
-    FtMeasureCharsProc,			/* Blt_MeasureCharsProc */
-    FtTextStringWidthProc,		/* Blt_TextStringWidthProc */
-    FtCanRotateFontProc,		/* Blt_CanRotateFontProc */
-    FtDrawCharsProc,			/* Blt_DrawCharsProc */
-    FtPostscriptFontNameProc,		/* Blt_PostscriptFontNameProc */
-    FtFreeFontProc,			/* Blt_FreeFontProc */
-    FtUnderlineCharsProc,		/* Blt_UnderlineCharsProc */
-};
-
-/* 
- * Freetype font container.
- */
-typedef struct {
-    char *name;				/* Name of the font (malloc-ed). */
-    int refCount;			/* Reference count for this structure.
-					 * When refCount reaches zero, it
-					 * means to free the resources
-					 * associated with this structure. */
-    Blt_HashEntry *hashPtr;		/* Pointer to this entry in global
-					 * font hash table. Used to remove the
-					 * entry * from the table. */
-    Font fid;				/* Font id used to fake out
-					 * Tk_FontId. */
-    FcPattern *pattern;			/* Pattern matching the current
-					 * non-rotated font. Used to create
-					 * rotated fonts by duplicating the
-					 * pattern and adding  a rotation
-					 * matrix. */
-
-    Blt_HashTable fontTable;		/* Hash table containing an Xft font
-					 * for each angle it's used at. Will
-					 * always contain a 0 degree
-					 * entry. */
-
-    /* Information specific to the display/drawable being used. The drawables
-     * are changed as the drawable changes for each drawing request.
-     * Typically this will change for each pixmap. */
-
-    Drawable drawable;			/* Drawable associated with draw. */
-    XftDraw *draw;			/* Current Xft drawable. */
-    int drawDepth;			/* Depth of current drawable. */
-
-    XftColor color;			/* Color to be displayed.  We don't
-					 * actually allocate this color, since
-					 * we assume it's been already
-					 * allocated by the standard Tk
-					 * procedures. */
-
-    /* Saved Information from the Tk_Window used to created the initial
-     * font. */
-    Display *display;		
-    Visual *visual;
-    int screenNum;
-    Colormap colormap;
-
-    int underlineHeight;		/* Thickness of underline
-					 * rectangle. */
-    int underlinePos;			/* Offset of underline. */
-    int tabWidth;
-} FtFont;
-
-static FontSpec rgbaSpecs[] = {
-    { "bgr",	 1, FC_RGBA, FC_RGBA_BGR,     },
-    { "none",	 1, FC_RGBA, FC_RGBA_NONE,    },
-    { "rgb",	 1, FC_RGBA, FC_RGBA_RGB,     },
-    { "unknown", 1, FC_RGBA, FC_RGBA_UNKNOWN, },
-    { "vbgr",	 2, FC_RGBA, FC_RGBA_VBGR,    },
-    { "vrgb",	 2, FC_RGBA, FC_RGBA_VRGB,    },
-};
-static int nRgbaSpecs = sizeof(rgbaSpecs) / sizeof(FontSpec);
-
-static FontSpec hintSpecs[] = {
-    { "full",	 1, FC_HINT_STYLE, FC_HINT_FULL,    },
-    { "medium",	 1, FC_HINT_STYLE, FC_HINT_MEDIUM,  },
-    { "none",    1, FC_HINT_STYLE, FC_HINT_NONE,    },
-    { "slight",	 1, FC_HINT_STYLE, FC_HINT_SLIGHT,  },
-};
-static int nHintSpecs = sizeof(hintSpecs) / sizeof(FontSpec);
-
-static void
-FtGetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr)
-{
-    XftFontSet *fsPtr;
-    int i;
-    
-    fsPtr = XftListFonts(Tk_Display(tkwin), 
-			 Tk_ScreenNumber(tkwin), 
-			 (char*)NULL, /* pattern elements */
-			 XFT_FAMILY, (char*)NULL); /* fields */
-    for (i = 0; i < fsPtr->nfont; i++) {
-	FcResult result;
-	FcChar8 *family;
-	
-	result = FcPatternGetString(fsPtr->fonts[i], FC_FAMILY, 0, &family);
-	if (result == FcResultMatch) {
-	    int isNew;
-	    char *name;
-
-	    /* Family names must be all lower case in the hash table. */
-	    name = Blt_AssertStrdup((const char *)family);
-	    strtolower(name);
-	    Blt_CreateHashEntry(tablePtr, name, &isNew);
-	    Blt_Free(name);
-	}
-    }
-    XftFontSetDestroy(fsPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FtParseTkDesc --
- *
- *	Try to open a Xft font from an Tk style font description.
- *
- * Results:
- *	Return value is TCL_ERROR if string was not a fully specified XLFD.
- *	Otherwise, fills font attribute buffer with the values parsed from the
- *	XLFD and returns TCL_OK.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static FcPattern *
-FtParseTkDesc(Tcl_Interp *interp, Tk_Window tkwin, int objc, Tcl_Obj **objv)
-{
-    FcPattern *pattern;
-    int i;
-    const char *family;
-
-    pattern = FcPatternCreate();
-    FcPatternAddBool(pattern, FC_ANTIALIAS, FcTrue);
-
-    /* Font family. */
-    family = GetAlias(Tcl_GetString(objv[0]));
-    FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *)family);
-
-    /* Size */
-    if (objc > 1) {
-	int size;
-
-	if (Tcl_GetIntFromObj(NULL, objv[1], &size) != TCL_OK) {
-	    goto error;
-	}
-	FcPatternAddDouble(pattern, FC_SIZE, PixelsToPoints(tkwin, size));
-    }
-    i = 2;
-    if (objc == 3) {
-	if (Tcl_ListObjGetElements(interp, objv[2], &objc, &objv) != TCL_OK) {
-	    goto error;
-	}
-	i = 0;
-    }
-    for (/*empty*/; i < objc; i++) {
-	FontSpec *specPtr;
-	
-	specPtr = FindSpec(interp, fontSpecs, nFontSpecs, 
-			   Tcl_GetString(objv[i]));
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	if (specPtr->key != NULL) {
-	    FcPatternAddInteger(pattern, specPtr->key, specPtr->value);
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "parsed TkDesc-XFT font \"%s\"\n", Tcl_GetString(objv[0]));
-#endif
-    return pattern;
- error:
-    if (pattern != NULL) {
-	FcPatternDestroy(pattern);
-    }
-    return NULL;
-}	
-
-static FcPattern *
-FtParseTkFontAttributeList(Tcl_Interp *interp, Tk_Window tkwin, 
-			   Tcl_Obj *objPtr) 
-{
-    FcPattern *pattern;
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-
-    if ((Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) ||
-	(objc < 1)) {
-	return NULL;		/* Can't split list or list is empty. */
-    }
-    if (objc & 0x1) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "odd number of elements, missing value",
-			 (char *)NULL);
-	}
-	return NULL;		/* Odd number of elements in list. */
-    }
-    pattern = FcPatternCreate();
-    FcPatternAddBool(pattern, FC_ANTIALIAS, FcTrue);
-    for (i = 0; i < objc; i += 2) {
-	char *key, *value;
-
-	key = Tcl_GetString(objv[i]);
-	value = Tcl_GetString(objv[i+1]);
-	if (strcmp(key, "-family") == 0) {
-	    const char *family;
-
-	    family = GetAlias(value);
-	    FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *)family);
-	} else if (strcmp(key, "-size") == 0) {
-	    int size;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i+1], &size) != TCL_OK) {
-		goto error;
-	    }
-	    FcPatternAddDouble(pattern, FC_SIZE, PixelsToPoints(tkwin, size));
-	} else if (strcmp(key, "-weight") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, weightSpecs, nWeightSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    FcPatternAddInteger(pattern, FC_WEIGHT, specPtr->value);
-	} else if (strcmp(key, "-slant") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, slantSpecs, nSlantSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    FcPatternAddInteger(pattern, FC_SLANT, specPtr->value);
-	} else if (strcmp(key, "-hint") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, hintSpecs, nHintSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    FcPatternAddInteger(pattern, FC_HINT_STYLE, specPtr->value);
-	} else if (strcmp(key, "-rgba") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(interp, rgbaSpecs, nRgbaSpecs, value);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    FcPatternAddInteger(pattern, FC_RGBA, specPtr->value);
-	} else if (strcmp(key, "-underline") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-overstrike") == 0) {
-	    /* Ignore */
-	} else {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "unknown switch \"", key, 
-			     "\" in font description.", (char *)NULL);
-	    }
-	    goto error;
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "parsed TkAttrList-XFT font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-#endif
-    return pattern;
- error:
-    FcPatternDestroy(pattern);
-    return NULL;
-}
-
-static FcPattern *
-FtGetAttributesFromFontObj(Tk_Window tkwin, Tcl_Interp *interp, 
-			   Tcl_Obj *objPtr) 
-{
-    FcPattern *pattern;
-    Tcl_Obj *cmd[3];
-    int result;
-
-    cmd[0] = Tcl_NewStringObj("font", -1);
-    cmd[1] = Tcl_NewStringObj("configure", -1);
-    cmd[2] = objPtr;
-    result = Blt_GlobalEvalObjv(interp, 3, cmd);
-    if (result == TCL_OK) {
-	pattern = FtParseTkFontAttributeList(interp, tkwin, 
-		Tcl_GetObjResult(interp));
-    } else {
-	pattern = NULL;
-    }
-    Tcl_ResetResult(interp);
-#if DEBUG_FONT_SELECTION
-    if (pattern != NULL) {
-	fprintf(stderr, "found FontObject => XFT font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-    }
-#endif
-    return pattern;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FtParseXLFD --
- *
- *	Try to open a Xft font from an XLFD description.
- *
- * Results:
- *	Return value is TCL_ERROR if string was not a fully specified XLFD.
- *	Otherwise, fills font attribute buffer with the values parsed from the
- *	XLFD and returns TCL_OK.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static FcPattern *
-FtParseXLFD(Tcl_Interp *interp, Tk_Window tkwin, char *fontName)
-{
-    FcPattern *pattern;
-    FontSpec *specPtr;
-    int argc;
-    char **argv;
-    double size;
-
-    if (fontName[0] == '-') {
-	fontName++;
-    }
-    ParseXLFD(fontName, &argc, &argv);
-
-    pattern = FcPatternCreate();
-    FcPatternAddBool(pattern, FC_ANTIALIAS, FcTrue);
-
-    if (argv[XLFD_FOUNDRY] != NULL) {
-	FcPatternAddString(pattern, FC_FOUNDRY, 
-		(const FcChar8 *)argv[XLFD_FOUNDRY]);
-    }
-    if (argv[XLFD_FAMILY] != NULL) {
-	FcPatternAddString(pattern, FC_FAMILY, 
-		(const FcChar8 *)argv[XLFD_FAMILY]);
-    }
-    if (argv[XLFD_WEIGHT] != NULL) {
-	specPtr = FindSpec(interp, weightSpecs, nWeightSpecs, 
-			   argv[XLFD_WEIGHT]);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	FcPatternAddInteger(pattern, FC_WEIGHT, specPtr->value);
-    }
-    if (argv[XLFD_SLANT] != NULL) {
-	specPtr = FindSpec(interp, slantSpecs, nSlantSpecs, argv[XLFD_SLANT]);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	FcPatternAddInteger(pattern, FC_SLANT, specPtr->value);
-    }
-    if (argv[XLFD_SETWIDTH] != NULL) {
-	specPtr = FindSpec(interp, widthSpecs, nWidthSpecs, 
-			   argv[XLFD_SETWIDTH]);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	FcPatternAddInteger(pattern, FC_WIDTH, specPtr->value);
-    }
-    if (argv[XLFD_ADD_STYLE] != NULL) {
-	FcPatternAddString(pattern, FC_STYLE, 
-		(const FcChar8 *)argv[XLFD_ADD_STYLE]);
-    }
-    size = 12.0;
-    if (argv[XLFD_PIXEL_SIZE] != NULL) {
-	int value;
-	if (argv[XLFD_PIXEL_SIZE][0] == '[') {
-	    /*
-	     * Some X fonts have the point size specified as follows:
-	     *
-	     *	    [ N1 N2 N3 N4 ]
-	     *
-	     * where N1 is the point size (in points, not decipoints!), and
-	     * N2, N3, and N4 are some additional numbers that I don't know
-	     * the purpose of, so I ignore them.
-	     */
-	    value = atoi(argv[XLFD_PIXEL_SIZE]+1);
-	} else if (Tcl_GetInt(NULL, argv[XLFD_PIXEL_SIZE], &value) == TCL_OK) {
-	    /* empty */
-	} else {
-	    goto error;
-	}
-	size = PixelsToPoints(tkwin, -value);
-    }
-#ifndef notdef
-    if (argv[XLFD_POINT_SIZE] != NULL) {
-	int value;
-	if (argv[XLFD_POINT_SIZE][0] == '[') {
-	    /*
-	     * Some X fonts have the point size specified as follows:
-	     *
-	     *	    [ N1 N2 N3 N4 ]
-	     *
-	     * where N1 is the point size (in points, not decipoints!), and
-	     * N2, N3, and N4 are some additional numbers that I don't know
-	     * the purpose of, so I ignore them.
-	     */
-	    value = atoi(argv[XLFD_POINT_SIZE]+1);
-	} else if (Tcl_GetInt(NULL, argv[XLFD_POINT_SIZE], &value) == TCL_OK) {
-	    /* empty */
-	} else {
-	    goto error;
-	}
-	size = PixelsToPoints(tkwin, -value) * 0.1;
-    }
-#endif
-    FcPatternAddDouble(pattern, FC_SIZE, (double)size);
-
-    if (argv[XLFD_SPACING] != NULL) {
-	specPtr = FindSpec(interp, spacingSpecs, nSpacingSpecs, 
-			   argv[XLFD_SPACING]);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	FcPatternAddInteger(pattern, FC_SPACING, specPtr->value);
-    }
-#ifdef notdef
-    if (argv[XLFD_CHARSET] != NULL) {
-	FcPatternAddString(pattern, FC_CHARSET, 
-		(const FcChar8 *)argv[XLFD_CHARSET]);
-    } else {
-	FcPatternAddString(pattern, FC_CHARSET, (const FcChar8 *)"iso8859-1");
-    }
-#endif
-    Blt_Free((char *)argv);
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "parsed Xlfd-XFT font \"%s\"\n", fontName);
-#endif
-    return pattern;
- error:
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "can't open font \"%s\" as XLFD\n", fontName);
-#endif
-    Blt_Free((char *)argv);
-    FcPatternDestroy(pattern);
-    return NULL;
-}
-
-
-static void
-FtDeleteFont(FtFont *ftPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&ftPtr->fontTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	XftFont *xftPtr;
-	
-	xftPtr = Blt_GetHashValue(hPtr);
-	XftFontClose(ftPtr->display, xftPtr);
-    }
-    Blt_DeleteHashTable(&ftPtr->fontTable);
-    
-    if (ftPtr->name != NULL) {
-	Blt_Free(ftPtr->name);
-    }
-    if (ftPtr->draw != 0) {
-	XftDrawDestroy(ftPtr->draw);
-    }
-    if (ftPtr->fid) {
-	XUnloadFont(ftPtr->display, ftPtr->fid);
-    }
-    Blt_DeleteHashEntry(&fontTable, ftPtr->hashPtr);
-    Blt_Free(ftPtr);
-}
-
-static int
-FtMeasureChars(FtFont *ftPtr, const char *source, int nBytes, int maxLength,
-	       int flags, int *lengthPtr)
-{
-    FcChar32 c;
-    XGlyphInfo extents;
-    int clen;
-    int curX, newX;
-    int termByte = 0, termX = 0;
-    int curByte, newByte, sawNonSpace;
-#if 0
-    char string[256];
-    int len = 0;
-#endif
-    XftFont *xftPtr;
-    Blt_HashEntry *hPtr;
-    
-    hPtr = Blt_FindHashEntry(&ftPtr->fontTable, (char *)0L);
-    if (hPtr == NULL) {
-	return 0;
-    }
-    xftPtr = Blt_GetHashValue(hPtr);
-    curX = 0;
-    curByte = 0;
-    sawNonSpace = 0;
-    while (nBytes > 0) {
-	Tcl_UniChar unichar;
-
-	clen = Tcl_UtfToUniChar(source, &unichar);
-	c = (FcChar32)unichar;
-
-	if (clen <= 0) {
-	    /* This can't happen (but see #1185640) */
-	    *lengthPtr = curX;
-	    return curByte;
-	}
-
-	source += clen;
-	nBytes -= clen;
-	if (c < 256 && isspace(c)) {		/* I18N: ??? */
-	    if (sawNonSpace) {
-		termByte = curByte;
-		termX = curX;
-		sawNonSpace = 0;
-	    }
-	} else {
-	    sawNonSpace = 1;
-	}
-
-#if 0
-	string[len++] = (char) c;
-#endif
-	XftTextExtents32(ftPtr->display, xftPtr, &c, 1, &extents);
-
-	newX = curX + extents.xOff;
-	newByte = curByte + clen;
-	if (maxLength >= 0 && newX > maxLength) {
-	    if ((flags & TK_PARTIAL_OK) ||
-		((flags & TK_AT_LEAST_ONE && curByte == 0))) {
-		curX = newX;
-		curByte = newByte;
-	    } else if ((flags & TK_WHOLE_WORDS) && (termX != 0)) {
-		curX = termX;
-		curByte = termByte;
-	    }
-	    break;
-	}
-
-	curX = newX;
-	curByte = newByte;
-    }
-#if 0
-    string[len] = '\0';
-    printf("MeasureChars %s length %d bytes %d\n", string, curX, curByte);
-#endif
-    *lengthPtr = curX;
-    return curByte;
-}
-
-static void
-FtSetFontParams(Tk_Window tkwin, FtFont *ftPtr, XftFont *xftPtr)
-{
-    FT_UInt glyph;
-    XGlyphInfo metrics;
-    double size;
-    FcResult result;
-
-    /*
-     * Get information used for drawing underlines from the 0 angle font.
-     */
-    glyph = XftCharIndex(ftPtr->display, xftPtr, '0');
-    XftGlyphExtents(ftPtr->display, xftPtr, &glyph, 1, &metrics);
-    
-    ftPtr->underlinePos = xftPtr->descent / 2;
-    result = FcPatternGetDouble(xftPtr->pattern, FC_SIZE, 0, &size);
-    if (result != FcResultMatch) {
-	size = 12.0;
-    }
-    ftPtr->underlineHeight = (int)(PointsToPixels(tkwin,(int)size)/10.0 + 0.5);
-    if (ftPtr->underlineHeight == 0) {
-	ftPtr->underlineHeight = 1;
-    }
-    if ((ftPtr->underlinePos + ftPtr->underlineHeight) > xftPtr->descent) {
-	/*
-	 * If this set of values would cause the bottom of the underline bar
-	 * to stick below the descent of the font, jack the underline up a bit
-	 * higher.
-	 */
-	ftPtr->underlineHeight = xftPtr->descent - ftPtr->underlinePos;
-	if (ftPtr->underlineHeight == 0) {
-	    ftPtr->underlinePos--;
-	    ftPtr->underlineHeight = 1;
-	}
-    }
-    FtMeasureChars(ftPtr, "0", 1, -1, 0, &ftPtr->tabWidth);
-    if (ftPtr->tabWidth == 0) {
-	ftPtr->tabWidth = xftPtr->max_advance_width;
-    }
-    ftPtr->tabWidth *= 8;
-    /*
-     * Make sure the tab width isn't zero (some fonts may not have enough
-     * information to set a reasonable tab width).
-     */
-    if (ftPtr->tabWidth == 0) {
-	ftPtr->tabWidth = 1;
-    }
-}
-
-static FtFont *
-FtNewFont(Tcl_Interp *interp, Tk_Window tkwin, const char *fontName, 
-	  XftFont *xftPtr)
-{
-    Blt_HashEntry *hPtr;
-    FtFont *ftPtr;
-    int isNew;
-
-    ftPtr = Blt_AssertCalloc(1, sizeof(FtFont));
-    ftPtr->name = Blt_AssertStrdup(fontName);
-    ftPtr->visual = Tk_Visual(tkwin);
-    ftPtr->colormap = Tk_Colormap(tkwin);
-    ftPtr->display = Tk_Display(tkwin);
-    ftPtr->fid = XLoadFont(Tk_Display(tkwin), "fixed");
-    ftPtr->color.pixel = 0xFFFFFFFF;
-    ftPtr->pattern = xftPtr->pattern;
-    ftPtr->refCount = 1;
-    /* 
-     * Initialize the Xft font table for this font.  Add the initial Xft font
-     * for the case of 0 degrees rotation.
-     */
-    Blt_InitHashTable(&ftPtr->fontTable, BLT_ONE_WORD_KEYS);
-    hPtr = Blt_CreateHashEntry(&ftPtr->fontTable, (char *)0L, &isNew);
-    assert(isNew);
-    Blt_SetHashValue(hPtr, xftPtr);
-
-#ifdef notdef
-    /* Try to use the Freetype routine FT_Get_Postscript_Name.  If this fails,
-     * build a string from the various fields of the font. */
-    {
-	FT_Face face;
-	const char *string;
-	
-	face = XftLockFace(xftPtr);
-	string = FT_Get_Postscript_Name(face);
-	XftUnlockFace(xftPtr);
-	if (string != NULL) {
-	    fprintf(stderr, "%s: psfont=(%s)\n", fontName, string);
-	}
-    }
-#endif
-    /* Add the font information to the font table. */
-    hPtr = Blt_CreateHashEntry(&fontTable, fontName, &isNew);
-    assert(isNew);
-    Blt_SetHashValue(hPtr, ftPtr);
-    ftPtr->hashPtr = hPtr;
-    FtSetFontParams(tkwin, ftPtr, xftPtr);
-    return ftPtr;
-}
-
-/*
- * FtGetPattern --
- *
- *	Generates an pattern based upon the font description provided.  The
- *	description is parsed base upon Tk's font selection rules (listed
- *	below).
- *
- *      Tk's Font Selection Rules:
- *
- *	When font description font is used, the system attempts to parse the
- *	description according to each of the above five rules, in the order
- *	specified.  Cases [1] and [2] must match the name of an existing named
- *	font or of a system font.  Cases [3], [4], and [5] are accepted on all
- *	platforms and the closest available font will be used.  In some
- *	situations it may not be possible to find any close font (e.g., the
- *	font family was a garbage value); in that case, some system-dependant
- *	default font is chosen.  If the font description does not match any of
- *	the above patterns, an error is generated.
- *
- * [1] fontname
- *	The name of a named font, created using the font create command.  When
- *	a widget uses a named font, it is guaranteed that this will never
- *	cause an error, as long as the named font exists, no mat- ter what
- *	potentially invalid or meaningless set of attributes the named font
- *	has.  If the named font cannot be displayed with exactly the specified
- *	attributes, some other close font will be substituted automatically.
- *	
- *	[Query the named font (using "font configure") and generate an Xft
- *	font with the same attributes.  It's assumed that these names don't
- *	start with a '*' or '-'.]
- *
- * [2] systemfont
- *	The platform-specific name of a font, interpreted by the graphics
- *	server.  This also includes, under X, an XLFD (see [4]) for which a
- *	single ``*'' character was used to elide more than one field in the
- *	middle of the name.  See PLATFORM-SPECIFIC issues for a list of the
- *	system fonts.
- *
- *	[Same as above. Query the named font (using "font configure") and
- *	generate an Xft font with the same attributes.]
- *
- * [3] family ?size? ?style? ?style ...? 
- *	A properly formed list whose first element is the desired font family
- *	and whose optional second element is the desired size.  The
- *	interpretation of the size attribute follows the same rules described
- *	for -size in FONT OPTIONS below.  Any additional optional arguments
- *	following the size are font styles.  Possible values for the style
- *	arguments are as follows:
- *
- *	   normal, bold, roman, italic, underline, overstrike 
- *
- *	[Parse the list of attributes and generate a corresponding Xft font.]
- *
- * [4] X-font names (XLFD)
- *	A Unix-centric font name of the form -foundry-family-weight
- *	slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width
- *	charset-encoding.  The ``*'' character may be used to skip indi vidual
- *	fields that the user does not care about.  There must be exactly one
- *	``*'' for each field skipped, except that a ``*'' at the end of the
- *	XLFD skips any remaining fields; the shortest valid XLFD is simply
- *	``*'', signifying all fields as defaults.  Any fields that were
- *	skipped are given default values.  For compatibility, an XLFD always
- *	chooses a font of the specified pixel size (not point size); although
- *	this interpretation is not strictly correct, all existing applications
- *	using XLFDs assumed that one ``point'' was in fact one pixel and would
- *	display incorrectly (generally larger) if the correct size font were
- *	actually used.
- *
- *	[Parse the font description and generate a corresponding Xft font.]
- *
- * [5] option value ?option value ...?
- *	A properly formed list of option-value pairs that specify the desired
- *	attributes of the font, in the same format used when defining a named
- *	font.
- *
- *	[Parse the option-value list and generate a corresponding Xft font.]
- *
- *  Extra:
- * [6] Xft font description.
- *
- *	[Handle the newer Xft font descriptions.]
- */
-
-static FcPattern *
-FtGetPattern(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    FcPattern *pattern;
-    char *desc;
-
-    desc = Tcl_GetString(objPtr);
-    while (isspace(*desc)) {
-	desc++;			/* Skip leading blanks. */
-    }
-    if (*desc == '-') {
-	/* 
-	 * Case 1: XLFD font description or Tk attribute list.   
-	 *
-	 *   If the font description starts with a '-', it could be either an
-	 *   old fashion XLFD font description or a Tk font attribute
-	 *   option-value list.
-	 */
-	pattern = FtParseTkFontAttributeList(NULL, tkwin, objPtr);
-	if (pattern == NULL) {
-	    /* Try parsing it as an XLFD font description. */
-	    pattern = FtParseXLFD(interp, tkwin, desc);
-	}
-    } else if (*desc == '*') {
-	pattern = FtParseXLFD(interp, tkwin, desc);
-    } else if (strpbrk(desc, ":,=") != NULL) {
-	/* 
-	 * Case 2: XFT font description.   
-	 *
-	 *   If the font description contains a ':', '=', or ',' in it, we
-	 *   assume it's a new XFT font description. We want to allow these
-	 *   font descriptions too.
-	 */
-	pattern = NULL;
-	if (strstr(desc, "::") != NULL) {
-	    pattern = FtGetAttributesFromFontObj(tkwin, interp, objPtr);
-	} 
-	if (pattern == NULL) {
-	    pattern = FcNameParse((const FcChar8 *)desc);
-	}
-#if DEBUG_FONT_SELECTION
-	if (pattern != NULL) {
-	    fprintf(stderr, "found XFT => XFT font \"%s\"\n", desc);
-	}
-#endif
-    } else {
-	int objc;
-	Tcl_Obj **objv;
-	/* 
-	 * Case 3: Tk-style description.   
-	 */
-	if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) || 
-	    (objc < 1)) {
-	    return NULL;		/* Can't split into a list or list is
-					 * empty. */
-	}
-	if (objc == 1) {
-	    /* 
-	     * Case 3a: Tk font object name.
-	     *
-	     *   Assuming that Tk font object names won't contain whitespace,
-	     *   see if its a font object.
-	     */
-
-	    pattern = FtGetAttributesFromFontObj(tkwin, interp, objv[0]);
-	    if (pattern == NULL) {
-		pattern = FcNameParse((const FcChar8 *)desc);
-#if DEBUG_FONT_SELECTION
-		if (pattern != NULL) {
-		    fprintf(stderr, "found XFT => XFT font \"%s\"\n", desc);
-		}
-#endif
-	    }
-	} else {
-	    /* 
-	     * Case 3b: List of font attributes in the form "family size
-	     *		?attrs?"
-	     */
-	    pattern = FtParseTkDesc(interp, tkwin, objc, objv);
-	}
-    }	
-    return pattern;
-}
-
-static XftFont *
-FtOpenFont(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    FcPattern *pattern;
-
-    pattern = FtGetPattern(interp, tkwin, objPtr);
-    if (pattern != NULL) {
-	FcPattern *match;
-	FcResult result;
-
-	/* 
-	 * XftFontMatch only sets *result* on complete match failures.  So
-	 * initialize it here for a successful match. We'll accept partial
-	 * matches.
-	 */
-	result = FcResultMatch; 
-	match = XftFontMatch(Tk_Display(tkwin), Tk_ScreenNumber(tkwin), 
-		pattern, &result);
-#if DEBUG_FONT_SELECTION
-	if (match != NULL) {
-	    FcChar8 *name;
-
-	    name = FcNameUnparse(pattern);
-	    fprintf(stderr, "\nfont=%s\n", Tcl_GetString(objPtr));
-	    fprintf(stderr, "original spec was %s\n", name);
-	    free(name);
-	    name = FcNameUnparse(match);
-	    fprintf(stderr, "matching spec is %s\n", name);
-	    free(name);
-	}
-#endif
-	FcPatternDestroy(pattern);
-	if ((match != NULL) && (result == FcResultMatch)) {
-	    return XftFontOpenPattern(Tk_Display(tkwin), match);
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "can't open font pattern \"%s\"\n", Tcl_GetString(objPtr));
-#endif
-    return NULL;
-}
-
-
-XftFont *
-Blt_OpenXftFontFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    Tk_Window tkwin;
-    XftFont *xftFont;
-
-    tkwin = Tk_MainWindow(interp);
-    if (!alias_initialized) {
-	MakeAliasTable(tkwin);
-	alias_initialized++;
-    }
-    if (!IsXRenderAvailable(tkwin)) {
-	Tcl_AppendResult(interp, "can't open Xft font: ",
-		"X server doesn't support XRENDER extension",
-		(char *)NULL);
-	return NULL;
-    }
-    xftFont = FtOpenFont(interp, tkwin, objPtr);
-    if (xftFont != NULL) {
-	xftFont = XftFontCopy(Tk_Display(tkwin), xftFont);
-    }
-    return xftFont;
-}
-
-XftFont *
-Blt_OpenXftFont(Tcl_Interp *interp, const char *fontName)
-{
-    XftFont *xftPtr;
-    Tcl_Obj *objPtr;
-
-    objPtr = Tcl_NewStringObj(fontName, strlen(fontName));
-    Tcl_IncrRefCount(objPtr);
-    xftPtr = Blt_OpenXftFontFromObj(interp, objPtr);
-    Tcl_DecrRefCount(objPtr);
-    return xftPtr;
-}
-
-static FtFont *
-FtGetFontFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    Blt_HashEntry *hPtr;
-    char *desc;
-
-    desc = Tcl_GetString(objPtr);
-    while (isspace(*desc)) {
-	desc++;			/* Skip leading blanks. */
-    }
-    /* Is the font already in the cache? */
-    hPtr = Blt_FindHashEntry(&fontTable, desc);
-    if (hPtr != NULL) {
-	FtFont *ftPtr;
-
-	ftPtr = Tcl_GetHashValue(hPtr);
-	ftPtr->refCount++;
-	return ftPtr;
-    } else {
-	XftFont *xftPtr;
-
-	xftPtr = FtOpenFont(interp, tkwin, objPtr);
-	if (xftPtr != NULL) {
-	    return FtNewFont(interp, tkwin, desc, xftPtr);
-	}
-    }
-    return NULL;
-}
-
-static const char *
-FtNameOfFontProc(_Blt_Font *fontPtr) 
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    return ftPtr->name;
-}
-
-static const char *
-FtFamilyOfFontProc(_Blt_Font *fontPtr) 
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    FcChar8 *string; 
-    FcResult result;
-
-    result = FcPatternGetString(ftPtr->pattern, FC_FAMILY, 0, &string);
-    if (result == FcResultMatch) {
-	return (const char *)string;
-    }
-    return NULL;
-}
-
-
-static Font
-FtFontIdProc(_Blt_Font *fontPtr)
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    return ftPtr->fid;
-}
-
-static void
-FtGetFontMetricsProc(_Blt_Font *fontPtr, Blt_FontMetrics *mPtr)
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    Blt_HashEntry *hPtr;
-
-    /* Always take font metrics from the non-rotated font. */
-    hPtr = Blt_FindHashEntry(&ftPtr->fontTable, (char *)0L);
-    if (hPtr != NULL) {
-	FT_UInt glyph;
-	XGlyphInfo metrics;
-	XftFont *xftPtr;
-
-	xftPtr = Blt_GetHashValue(hPtr);
-	glyph = XftCharIndex(ftPtr->display, xftPtr, '0');
-	XftGlyphExtents(ftPtr->display, xftPtr, &glyph, 1, &metrics);
-	mPtr->ascent = xftPtr->ascent;
-	mPtr->descent = xftPtr->descent;
-	mPtr->linespace = mPtr->ascent + mPtr->descent;
-	mPtr->tabWidth = ftPtr->tabWidth;
-	mPtr->underlinePos = ftPtr->underlinePos;
-	mPtr->underlineHeight = ftPtr->underlineHeight;
-    }
-}
-
-static int
-FtMeasureCharsProc(
-    _Blt_Font *fontPtr,
-    const char *source,	
-    int nBytes,
-    int maxLength,
-    int flags,
-    int *lengthPtr)
-{
-    FtFont *ftPtr = fontPtr->clientData;
-
-    return FtMeasureChars(ftPtr, source, nBytes, maxLength, flags, lengthPtr);
-}
-
-static int
-FtTextStringWidthProc(Blt_Font font, const char *string, int nBytes)
-{
-    int width;
-
-    FtMeasureCharsProc(font, string, nBytes, -1, 0, &width);
-    return width;
-}    
-
-/*
- *---------------------------------------------------------------------------
- *
- * FtPostscriptFontNameProc --
- *
- *	Given a Xft font, return the name of the corresponding Postscript
- *	font.
- *
- * Results:
- *	The return value is the pointsize of the given Xft font.  The name of
- *	the Postscript font is appended to dsPtr.
- *
- * Side effects:
- *	If the font does not exist on the printer, the print job will fail at
- *	print time.  Given a "reasonable" Postscript printer, the following
- *	Tk_Font font families should print correctly:
- *
- *	    Avant Garde, Arial, Bookman, Courier, Courier New, Geneva,
- *	    Helvetica, Monaco, New Century Schoolbook, New York, Palatino,
- *	    Symbol, Times, Times New Roman, Zapf Chancery, and Zapf Dingbats.
- *
- *	Any other Xft font families may not print correctly because the
- *	computed Postscript font name may be incorrect.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-FtPostscriptFontNameProc(_Blt_Font *fontPtr, Tcl_DString *resultPtr)	
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    FcChar8 *string;
-    const char *family;
-    FcResult result;
-    int weight, slant;
-    double size;
-    int flags;
-
-    result = FcPatternGetString(ftPtr->pattern, FC_FAMILY, 0, &string);
-    family = (result == FcResultMatch) ? (const char *)string : "Unknown";
-    result = FcPatternGetInteger(ftPtr->pattern, FC_WEIGHT, 0, &weight);
-    if (result != FcResultMatch) {
-	weight = FC_WEIGHT_MEDIUM;
-    }
-    result = FcPatternGetInteger(ftPtr->pattern, FC_SLANT, 0, &slant);
-    if (result != FcResultMatch) {
-	slant = FC_SLANT_ROMAN;
-    }
-    flags = 0;
-    if (weight > FC_WEIGHT_MEDIUM) {
-	flags |= FONT_BOLD;
-    } 
-    if (slant > FC_SLANT_ROMAN) {
-	flags |= FONT_ITALIC;
-    }
-    Blt_Ps_FontName(family, flags, resultPtr);
-    result = FcPatternGetDouble(ftPtr->pattern, FC_SIZE, 0, &size);
-    if (result != FcResultMatch) {
-	size = 12.0;
-    }
-    return (int)size;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FtUnderlineCharsProc --
- *
- *	This procedure draws an underline for a given range of characters in a
- *	given string.  It doesn't draw the characters (which are assumed to
- *	have been displayed previously); it just draws the underline.  This
- *	procedure would mainly be used to quickly underline a few characters
- *	without having to construct an underlined font.  To produce properly
- *	underlined text, the appropriate underlined font should be constructed
- *	and used.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets displayed in "drawable".
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-FtUnderlineCharsProc(
-    Display *display,			/* Display on which to draw. */
-    Drawable drawable,			/* Window or pixmap in which to
-					 * draw. */
-    GC gc,				/* Graphics context for actually
-					 * drawing line. */
-    _Blt_Font *fontPtr,
-    const char *string,			/* String containing characters to be
-					 * underlined or overstruck. */
-    int x, int y,			/* Coordinates at which first
-					 * character of string is drawn. */
-    int first,				/* Index of first byte of first
-					 * character. */
-    int last)				/* Index of first byte after the last
-					 * character. */
-{
-    FtFont *ftPtr = fontPtr->clientData;
-    int firstX, lastX;
-
-    Blt_MeasureChars(fontPtr, string, first, -1, 0, &firstX);
-    Blt_MeasureChars(fontPtr, string, last, -1, 0, &lastX);
-
-    x += firstX;
-    y += ftPtr->underlinePos;
-    XFillRectangle(display, drawable, gc, x, y, (unsigned int)(lastX - firstX),
-	    (unsigned int)ftPtr->underlineHeight);
-}
-
-static int
-FtCanRotateFontProc(_Blt_Font *fontPtr, float angle) 
-{
-    FcPattern *pattern;
-    FcResult result;
-    FtFont *ftPtr = fontPtr->clientData;
-    int boolean;
-    long angle10;
-
-    angle10 = (long)((double)angle * 10.0);
-    if (Blt_FindHashEntry(&ftPtr->fontTable, (char *)angle10) != NULL) {
-	return TRUE;			/* Rotated font already exists. */
-    }
-
-    /* 
-     * I don't know if this is correct.  Some PCF fonts don't rotate properly.
-     * The chararcter positions are rotated but the glyph itself is drawn with
-     * no rotation.  The standard Adobe Helvetica font is a good example of
-     * this.  So I need to bail on those fonts.  I check if antialias=True in
-     * the Xft font pattern to determine if the font will rotate properly.
-     */
-    result = FcPatternGetBool(ftPtr->pattern, FC_ANTIALIAS, 0, &boolean);
-    if ((result == FcResultMatch) && (!boolean)) {
-	return FALSE;
-    }
-
-    {
-	XftMatrix matrix;
-	double cosTheta, sinTheta, theta;
-
-	theta = ((double)angle / 180.0) * M_PI;
-	sinTheta = sin(theta);
-	cosTheta = cos(theta);
-	
-	XftMatrixInit(&matrix);
-	XftMatrixRotate(&matrix, cosTheta, sinTheta);
-	pattern = FcPatternDuplicate(ftPtr->pattern);
-	FcPatternAddMatrix(pattern, FC_MATRIX, &matrix);
-    }
-
-    {
-	FcResult result;
-	FcPattern *match;
-
-	/* 
-	 * XftFontMatch only sets *result* on complete match failures.  So
-	 * initialize it here for a successful match. We'll accept partial
-	 * matches. 
-	 */
-	result = FcResultMatch; 
-	match = XftFontMatch(ftPtr->display, ftPtr->screenNum, pattern,&result);
-	if ((match != NULL) && (result == FcResultMatch)) {
-	    XftFont *xftPtr;
-	
-	    xftPtr = XftFontOpenPattern(ftPtr->display, match);
-	    /* Add the new rotated font to the hash table. */
-	    if (xftPtr != NULL) {
-		Blt_HashEntry *hPtr;
-		int isNew;
-		
-		hPtr = Blt_CreateHashEntry(&ftPtr->fontTable, (char *)angle10, 
-			&isNew);
-		assert(isNew);
-		Blt_SetHashValue(hPtr, xftPtr);
-		FcPatternDestroy(pattern);
-		return TRUE;
-	    }
-	}
-	FcPatternDestroy(pattern);
-    }
-    return FALSE;
-}
-
-static void
-FtDrawCharsProc(
-    Display *display,			/* Display on which to draw. */
-    Drawable drawable,			/* Window or pixmap in which to draw. */
-    GC gc,				/* Graphics context for drawing
-					 * characters. */
-    _Blt_Font *fontPtr,			/* Font in which characters will be
-					 * drawn; must be the same as font
-					 * used in *GC. */
-    int depth,
-    float angle,
-    const char *source,			/* UTF-8 string to be displayed.  Need
-					 * not be '\0' terminated.  All Tk
-					 * meta-characters (tabs, control
-					 * characters, and newlines) should be
-					 * stripped out of the string that is
-					 * passed to this function.  If they
-					 * are not stripped out, they will be
-					 * displayed as regular printing
-					 * characters. */
-    int nBytes,				/* # of bytes in string. */
-    int x, int y)			/* Coordinates at which to place
-					 * origin of string when drawing. */
-{
-    XftFont *xftPtr;
-    FtFont *ftPtr = fontPtr->clientData;
-    Blt_HashEntry *hPtr;
-    long angle10;
-
-    angle10 = (long)(angle * 10.0);
-    hPtr = Blt_FindHashEntry(&ftPtr->fontTable, (char *)angle10);
-    if (hPtr == NULL) {
-	fprintf(stderr, "can't find font %s rotated at %g degrees\n", 
-		ftPtr->name, angle);
-	return;			/* Can't find instance at requested angle. */
-    }
-    xftPtr = Blt_GetHashValue(hPtr);
-    if ((ftPtr->draw == 0) || (ftPtr->drawDepth != depth)) {
-	XftDraw *draw;
-
-	if (depth == 1) {
-	    draw = XftDrawCreateBitmap(display, drawable);
-	} else {
-	    draw = XftDrawCreate(display, drawable, ftPtr->visual, 
-				 ftPtr->colormap);
-	}
-	if (ftPtr->draw != 0) {
-	    XftDrawDestroy(ftPtr->draw);
-	}
-	ftPtr->drawDepth = depth;
-	ftPtr->draw = draw;
-	ftPtr->drawable = drawable;
-    } else {
-	Tk_ErrorHandler handler;
-#if 0
-	printf("Switch to drawable 0x%x\n", drawable);
-#endif
-        handler = Tk_CreateErrorHandler(display, -1, -1, -1, 
-		(Tk_ErrorProc *)NULL, (ClientData) NULL);
-	XftDrawChange(ftPtr->draw, drawable);
-	ftPtr->drawable = drawable;
-	Tk_DeleteErrorHandler(handler);
-    }
-    {
-	XGCValues values;
-
-	XGetGCValues(display, gc, GCForeground, &values);
-	if (values.foreground != ftPtr->color.pixel) {
-	    XColor xc;
-	    
-	    xc.pixel = values.foreground;
-	    XQueryColor(display, ftPtr->colormap, &xc);
-	    ftPtr->color.color.red = xc.red;
-	    ftPtr->color.color.green = xc.green;
-	    ftPtr->color.color.blue = xc.blue;
-	    ftPtr->color.color.alpha = 0xffff; /* Assume opaque. */
-	    ftPtr->color.pixel = values.foreground;
-	}
-    }
-
-    {
-#define NUM_SPEC    1024
-	XftGlyphFontSpec *specPtr;
-	XftGlyphFontSpec specs[NUM_SPEC];
-	int nSpecs;
-	const int maxCoord = 0x7FFF; /* Xft coordinates are 16 bit values */
-
-	nSpecs = 0;
-	specPtr = specs;
-	while ((nBytes > 0) && (x <= maxCoord) && (y <= maxCoord)) {
-	    XftChar32 c;
-	    int charLen;
-	    XGlyphInfo metrics;
-	    
-	    charLen = XftUtf8ToUcs4((XftChar8 *)source, &c, nBytes);
-	    if (charLen <= 0) {
-		/* This should not happen, but it can. */
-		return;
-	    }
-	    source += charLen;
-	    nBytes -= charLen;
-	    
-	    specPtr = specs + nSpecs;
-	    specPtr->font = xftPtr;
-	    specPtr->glyph = XftCharIndex(display, xftPtr, c);
-	    specPtr->x = x;
-	    specPtr->y = y;
-	    XftGlyphExtents(display, xftPtr, &specPtr->glyph, 1, &metrics);
-	    x += metrics.xOff;
-	    y += metrics.yOff;
-	    nSpecs++, specPtr++;
-	    if (nSpecs == NUM_SPEC) {
-		XftDrawGlyphFontSpec(ftPtr->draw, &ftPtr->color, specs, 
-			nSpecs);
-		nSpecs = 0;
-		specPtr = specs;
-	    }
-	}
-	if (nSpecs > 0) {
-	    XftDrawGlyphFontSpec(ftPtr->draw, &ftPtr->color, specs, nSpecs);
-	}
-    }
-}
-
-static void
-FtFreeFontProc(_Blt_Font *fontPtr)
-{
-    FtFont *ftPtr = fontPtr->clientData;
-
-    ftPtr->refCount--;
-    if (ftPtr->refCount <= 0) {
-	FtDeleteFont(ftPtr);
-    }
-    Blt_Free(fontPtr);
-}
-
-#endif	/* HAVE_LIBXFT */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetFontFromObj -- 
- *
- *	Given a string description of a font, map the description to a
- *	corresponding Tk_Font that represents the font.
- *
- * Results:
- *	The return value is token for the font, or NULL if an error prevented
- *	the font from being created.  If NULL is returned, an error message
- *	will be left in the interp's result.
- *
- * Side effects:
- *	The font is added to an internal database with a reference count.  For
- *	each call to this procedure, there should eventually be a call to
- *	Tk_FreeFont() or Tk_FreeFontFromObj() so that the database is cleaned
- *	up when fonts aren't in use anymore.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Font
-Blt_GetFontFromObj(
-    Tcl_Interp *interp,			/* Interp for database and error
-					 * return. */
-    Tk_Window tkwin,			/* For display on which font will be
-					 * used. */
-    Tcl_Obj *objPtr)			/* String describing font, as: named
-					 * font, native format, or parseable
-					 * string. */
-{
-    _Blt_Font *fontPtr; 
-    
-    fontPtr = Blt_Calloc(1, sizeof(_Blt_Font));
-    if (fontPtr == NULL) {
-	return NULL;		/* Out of memory. */
-    }
-    if (!alias_initialized) {
-	MakeAliasTable(tkwin);
-	alias_initialized++;
-    }
-#ifdef HAVE_LIBXFT
-    if (IsXRenderAvailable(tkwin)) {
-	FtFont *ftPtr;
-
-	/* Check first if we open the specified font as an XFT font. */
-	ftPtr = FtGetFontFromObj(interp, tkwin, objPtr);
-	if (ftPtr != NULL) {
-	    fontPtr->classPtr = &ftFontClass;
-	    fontPtr->clientData = ftPtr;
-	    fontPtr->interp = interp;
-	    fontPtr->display = Tk_Display(tkwin);
-#if DEBUG_FONT_SELECTION2
-	    fprintf(stderr, "SUCCESS: Found XFT font \"%s\"\n", 
-		    Tcl_GetString(objPtr));
-#endif
-	    return fontPtr;		/* Found Xft font.  */
-	}
-	/* Otherwise fall thru and try to open font as a normal Tk font. */
-    }
-#endif	/* HAVE_LIBXFT */
-    fontPtr->clientData = TkGetFontFromObj(interp, tkwin, objPtr);
-    if (fontPtr->clientData == NULL) {
-	Blt_Free(fontPtr);
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "FAILED to find either Xft or Tk font \"%s\"\n", Tcl_GetString(objPtr));
-#endif
-	return NULL;			/* Failed to find either Xft or Tk
-					 * fonts. */
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "SUCCESS: Found Tk font \"%s\"\n", Tcl_GetString(objPtr));
-#endif
-    fontPtr->classPtr = &tkFontClass;
-    fontPtr->interp = interp;
-    fontPtr->display = Tk_Display(tkwin);
-    return fontPtr;			/* Found Tk font. */
-}
-
-
-Blt_Font
-Blt_AllocFontFromObj(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For screen on which font will be used. */
-    Tcl_Obj *objPtr)		/* Object describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    return Blt_GetFontFromObj(interp, tkwin, objPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetFont -- 
- *
- *	Given a string description of a font, map the description to a
- *	corresponding Tk_Font that represents the font.
- *
- * Results:
- *	The return value is token for the font, or NULL if an error prevented
- *	the font from being created.  If NULL is returned, an error message
- *	will be left in interp's result object.
- *
- * Side effects:
- * 	The font is added to an internal database with a reference count.  For
- * 	each call to this procedure, there should eventually be a call to
- * 	Blt_FreeFont so that the database is cleaned up when fonts aren't in
- * 	use anymore.
- *
- *---------------------------------------------------------------------------
- */
-
-Blt_Font
-Blt_GetFont(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For screen on which font will be used. */
-    const char *string)		/* Object describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    Blt_Font font;
-    Tcl_Obj *objPtr;
-
-    objPtr = Tcl_NewStringObj(string, strlen(string));
-    Tcl_IncrRefCount(objPtr);
-    font = Blt_GetFontFromObj(interp, tkwin, objPtr);
-    Tcl_DecrRefCount(objPtr);
-    return font;
-}
-
-Tcl_Interp *
-Blt_GetFontInterp(_Blt_Font *fontPtr) 
-{
-    return fontPtr->interp;
-}
-
-int
-Blt_TextWidth(_Blt_Font *fontPtr, const char *string, int length)
-{
-    if (Blt_Ps_IsPrinting()) {
-	int width;
-
-	width = Blt_Ps_TextWidth(fontPtr, string, length);
-	if (width >= 0) {
-	  /* fprintf(stderr, "from Ps_TextWidth(%s)=%d\n", string, width);*/
-	    return width;
-	}
-    }
-    return (*fontPtr->classPtr->textWidth)(fontPtr, string, length);
-}
-
-void
-Blt_GetFontMetrics(_Blt_Font *fontPtr, Blt_FontMetrics *fmPtr)
-{
-    if (Blt_Ps_IsPrinting()) {
-	if (Blt_Ps_GetFontMetrics(fontPtr, fmPtr) == TCL_OK) {
-	    return;
-	}
-    }
-    return (*fontPtr->classPtr->getFontMetrics)(fontPtr, fmPtr);
-}
-
-#ifdef notdef
-
-static Blt_FontClass psFontClass = {
-    FONT_PS,
-    PsNameOfFontProc,			/* Blt_NameOfFontProc */
-    PsFamilyOfFontProc,			/* Blt_FamilyOfFontProc */
-    NULL,				/* Blt_FontIdProc */
-    PsGetFontMetricsProc,		/* Blt_GetFontMetricsProc */
-    PsMeasureCharsProc,			/* Blt_MeasureCharsProc */
-    PsTextWidthProc,			/* Blt_TextWidthProc */
-    NULL,				/* Blt_CanRotateFontProc */
-    NULL,				/* Blt_DrawCharsProc */
-    PsPostscriptFontNameProc,		/* Blt_PostscriptFontNameProc */
-    PsFreeFontProc,			/* Blt_FreeFontProc */
-    NULL,				/* Blt_UnderlineCharsProc */
-};
-
-#endif
-
diff --git a/blt3.0/src/bltUnixMain.c b/blt3.0/src/bltUnixMain.c
deleted file mode 100644
index 155977c..0000000
--- a/blt3.0/src/bltUnixMain.c
+++ /dev/null
@@ -1,327 +0,0 @@
-
-/*
- * bltUnixMain.c --
- *
- * Provides a default version of the Tcl_AppInit procedure for
- * use in wish and similar Tk-based applications.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from the Tk distribution.
- *
- *	Copyright (c) 1993 The Regents of the University of
- *	California. All rights reserved.
- *
- *	Permission is hereby granted, without written agreement and
- *	without license or royalty fees, to use, copy, modify, and
- *	distribute this software and its documentation for any
- *	purpose, provided that the above copyright notice and the
- *	following two paragraphs appear in all copies of this
- *	software.
- *
- *	IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO
- *	ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
- *	CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
- *	SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- *	CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
- *	WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *	PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
- *	BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO *
- *	PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
- *	MODIFICATIONS.
- *
- */
-
-#include <blt.h>
-#include <tcl.h>
-#ifndef TCL_ONLY
-#include <tk.h>
-#endif
-#include "config.h"
-/*
- * The following variable is a special hack that is needed in order for
- * Sun shared libraries to be used for Tcl.
- */
-
-#ifdef NEED_MATHERR
-BLT_EXTERN int matherr();
-int *tclDummyMathPtr = (int *)matherr;
-#endif
-
-
-BLT_EXTERN Tcl_AppInitProc Blt_core_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_core_SafeInit;
-
-#ifndef TCL_ONLY
-BLT_EXTERN Tcl_AppInitProc Blt_x_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_x_SafeInit;
-#endif
-
-#ifdef STATIC_PKGS
-
-/* Picture format packages. */
-#ifndef TCL_ONLY
-BLT_EXTERN Tcl_AppInitProc Blt_PictureBmpInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureGifInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureJpgInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePbmInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePhotoInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePdfInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePngInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePsInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureTifInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureXbmInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureXpmInit;
-#endif /* TCL_ONLY */
-
-/* Data table format packages. */
-BLT_EXTERN Tcl_AppInitProc Blt_Table_CsvInit;
-#ifdef HAVE_LIBMYSQL
-BLT_EXTERN Tcl_AppInitProc Blt_Table_MysqlInit;
-#endif	/* HAVE_LIBMYSQL */
-BLT_EXTERN Tcl_AppInitProc Blt_Table_TreeInit;
-BLT_EXTERN Tcl_AppInitProc Blt_Table_VectorInit;
-#ifdef HAVE_LIBEXPAT
-BLT_EXTERN Tcl_AppInitProc Blt_Table_XmlInit;
-#endif
-
-/* Tree format packages. */
-#ifdef HAVE_LIBEXPAT
-BLT_EXTERN Tcl_AppInitProc Blt_TreeXmlInit;
-#endif
-
-#endif /* STATIC_PKGS */
-
-static int
-Initialize(Tcl_Interp *interp)	/* Interpreter for application. */
-{
-#ifdef TCLLIBPATH
-    /* 
-     * It seems that some distributions of TCL don't compile-in a
-     * default location of the library.  This causes Tcl_Init to fail
-     * if bltwish and bltsh are moved to another directory. The
-     * workaround is to set the magic variable "tclDefaultLibrary".
-     */
-    Tcl_SetVar(interp, "tclDefaultLibrary", TCLLIBPATH, TCL_GLOBAL_ONLY);
-#endif /* TCLLIBPATH */
-    if (Tcl_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    /*
-     * Call the init procedures for included packages.  Each call should
-     * look like this:
-     *
-     * if (Mod_Init(interp) == TCL_ERROR) {
-     *     return TCL_ERROR;
-     * }
-     *
-     * where "Mod" is the name of the module.
-     */
-    if (Blt_core_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_core", Blt_core_Init, Blt_core_SafeInit);
-
-#ifdef STATIC_PKGS
-    /* Tcl-only static packages */
-    if (Blt_Table_CsvInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    /* Data table packages. */
-    Tcl_StaticPackage(interp, "blt_datatable_csv", Blt_Table_CsvInit, 
-	Blt_Table_CsvInit);
-
-#ifdef HAVE_LIBMYSQL
-    if (Blt_Table_MysqlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_mysql", Blt_Table_MysqlInit, 
-	Blt_Table_MysqlInit);
-#endif	/* HAVE_LIBMYSQL */
-
-    if (Blt_Table_TreeInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_tree", Blt_Table_TreeInit, 
-	Blt_Table_TreeInit);
-
-    if (Blt_Table_VectorInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_vector", Blt_Table_VectorInit,
-	Blt_Table_VectorInit);
-
-#ifdef HAVE_LIBEXPAT
-    if (Blt_Table_XmlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_xml", Blt_Table_XmlInit, 
-	Blt_Table_XmlInit);
-#endif	/* HAVE_LIBEXPAT */
-
-    /* Tree packages. */
-#ifdef HAVE_LIBEXPAT
-    if (Blt_TreeXmlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_tree_xml", Blt_TreeXmlInit, Blt_TreeXmlInit);
-#endif	/* HAVE_LIBEXPAT */
-
-#endif /* STATIC_PKGS */
-
-#ifndef TCL_ONLY
-    if (Tk_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    if (Blt_x_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_extra", Blt_x_Init, Blt_x_SafeInit);
-
-#ifdef STATIC_PKGS
-
-    /* Picture packages. */
-
-    if (Blt_PictureBmpInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_bmp", Blt_PictureBmpInit, 
-	Blt_PictureBmpInit);
-
-    if (Blt_PictureGifInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_gif", Blt_PictureGifInit, 
-	Blt_PictureGifInit);
-
-#ifdef HAVE_LIBJPG
-    if (Blt_PictureJpgInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_jpg", Blt_PictureJpgInit, 
-		      Blt_PictureJpgInit);
-#endif /*HAVE_LIBJPG*/
-
-    if (Blt_PicturePbmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_pbm", Blt_PicturePbmInit, 
-	Blt_PicturePbmInit);
-
-    if (Blt_PicturePhotoInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_photo", Blt_PicturePhotoInit, 
-	Blt_PicturePhotoInit);
-
-#ifdef HAVE_LIBPNG
-    if (Blt_PicturePngInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_png", Blt_PicturePngInit, 
-	Blt_PicturePngInit);
-#endif /*HAVE_LIBPNG*/
-
-    if (Blt_PicturePsInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_ps", Blt_PicturePsInit, 
-	Blt_PicturePsInit);
-
-    if (Blt_PicturePdfInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_pdf", Blt_PicturePdfInit, 
-	Blt_PicturePdfInit);
-
-#ifdef HAVE_LIBTIF
-    if (Blt_PictureTifInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_tif", Blt_PictureTifInit, 
-		      Blt_PictureTifInit);
-#endif /*HAVE_LIBTIF*/
-
-    if (Blt_PictureXbmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_xbm", Blt_PictureXbmInit, 
-	Blt_PictureXbmInit);
-
-#ifdef HAVE_LIBXPM
-    if (Blt_PictureXpmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_xpm", Blt_PictureXpmInit, 
-	Blt_PictureXpmInit);
-#endif /*HAVE_LIBXPM*/
-
-#endif /* STATIC_PKGS */
-#endif /*TCL_ONLY*/
-    /*
-     * Specify a user-specific startup file to invoke if the application
-     * is run interactively.  Typically the startup file is "~/.apprc"
-     * where "app" is the name of the application.  If this line is deleted
-     * then no user-specific startup file will be run under any conditions.
-     */
-#ifdef TCL_ONLY
-    Tcl_SetVar(interp, "tcl_rcFileName", "~/tclshrc.tcl", TCL_GLOBAL_ONLY);
-#else 
-    Tcl_SetVar(interp, "tcl_rcFileName", "~/wishrc.tcl", TCL_GLOBAL_ONLY);
-#endif
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * main --
- *
- *	This is the main program for the application.
- *
- * Results:
- *	None: Tk_Main never returns here, so this procedure never
- *	returns either.
- *
- * Side effects:
- *	Whatever the application does.
- *
- *---------------------------------------------------------------------------
- */
-int
-main(int argc, char **argv)
-{
-#ifdef TCL_ONLY
-    Tcl_Main(argc, argv, Initialize);
-#else 
-    Tk_Main(argc, argv, Initialize);
-#endif
-    return 0;			/* Needed only to prevent compiler warning. */
-}
-
diff --git a/blt3.0/src/bltUnixPainter.c b/blt3.0/src/bltUnixPainter.c
deleted file mode 100644
index 8b63c2b..0000000
--- a/blt3.0/src/bltUnixPainter.c
+++ /dev/null
@@ -1,1992 +0,0 @@
-
-/*
- * bltUnixPainter.c --
- *
- * This module implements X11-specific image processing procedures for the BLT
- * toolkit.
- *
- *	Copyright (c) 1998 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining a
- *	copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be included
- *	in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- *	OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the Tk library
- * distrubution.  The photo image type was designed and implemented by Paul
- * Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-
-#include "bltInt.h"
-#include "bltHash.h"
-#include "bltPicture.h"
-#include "bltUnixPainter.h"
-#include "bltPainter.h"
-#include <X11/Xutil.h>
-#include <X11/Xproto.h>
-
-typedef struct _Blt_Picture Pict;
-
-#define CFRAC(i, n)	((i) * 65535 / (n))
-/* As for CFRAC, but apply exponent of g. */
-#define CGFRAC(i, n, g)	((int)(65535 * pow((double)(i) / (n), (g))))
-
-#define MAXIMAGESIZE(dpy)	(XMaxRequestSize(dpy) << 2) - 24
-
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-
-
-static Blt_HashTable painterTable;
-static int initialized = 0;
-
-#define COLOR_WINDOW		(1<<0)
-#define BLACK_AND_WHITE		(1<<1)
-#define MAP_COLORS		(1<<2)
-
-/*
- * PainterKey --
- *
- * This structure represents the key used to uniquely identify painters.  A
- * painter is specified by a combination of display, visual, colormap, depth,
- * and monitor gamma value.
- */
-typedef struct {
-    Display *display;			/* Display of painter. Used to free
-					 * colors allocated. */
-    Visual *visualPtr;			/* Visual information for the class of
-					 * windows displaying the image. */
-    Colormap colormap;			/* Colormap used.  This may be the
-					 * default colormap, or an allocated
-					 * private map. */
-    int depth;				/* Pixel depth of the display. */
-    float gamma;			/* Gamma correction value for the
-					 * monitor. */
-} PainterKey;
-
-
-#define GC_PRIVATE	1		/* Indicates if the GC in the painter
-					 * was shared (allocated by Tk_GetGC) or
-					 * private (by XCreateGC). */
-
-static Tcl_FreeProc FreePainter;
-
-/*
- *---------------------------------------------------------------------------
- *
- * FindShift --
- *
- *	Returns the position of the least significant (low) bit in the given
- *	mask.
- *
- *	For TrueColor and DirectColor visuals, a pixel value is formed by
- *	OR-ing the red, green, and blue colormap indices into a single 32-bit
- *	word.  The visual's color masks tell you where in the word the indices
- *	are supposed to be.  The masks contain bits only where the index is
- *	found.  By counting the leading zeros in the mask, we know how many
- *	bits to shift to the individual red, green, and blue values to form a
- *	pixel.
- *
- * Results:
- *      The number of the least significant bit.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FindShift(unsigned int mask)	/* 32-bit word */
-{
-    int bit;
-
-    for (bit = 0; bit < 32; bit++) {
-	if (mask & (1 << bit)) {
-	    break;
-	}
-    }
-    return bit;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CountBits --
- *
- *	Returns the number of bits set in the given 32-bit mask.
- *
- *	    Reference: Graphics Gems Volume II.
- *	
- * Results:
- *      The number of bits to set in the mask.
- *
- *---------------------------------------------------------------------------
- */
-static int
-CountBits(unsigned long mask)	/* 32  1-bit tallies */
-{
-    /* 16  2-bit tallies */
-    mask = (mask & 0x55555555) + ((mask >> 1) & (0x55555555));  
-    /* 8  4-bit tallies */
-    mask = (mask & 0x33333333) + ((mask >> 2) & (0x33333333)); 
-    /* 4  8-bit tallies */
-    mask = (mask & 0x07070707) + ((mask >> 4) & (0x07070707));  
-    /* 2 16-bit tallies */
-    mask = (mask & 0x000F000F) + ((mask >> 8) & (0x000F000F));  
-    /* 1 32-bit tally */
-    mask = (mask & 0x0000001F) + ((mask >> 16) & (0x0000001F));  
-    return mask;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeGammaTables --
- *
- *	Initializes both the power and inverse power tables for the painter with
- *	a given gamma value.  These tables are used to/from map linear RGB
- *	values to/from non-linear monitor intensities.
- *	
- * Results:
- *      The *gammaTable* and *igammaTable* arrays are filled out to
- *      contain the mapped values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeGammaTables(Painter *p)
-{
-    int i;
-    double igamma, gamma;
-    
-    gamma = (double)p->gamma;
-    igamma = 1.0 / gamma;
-    for (i = 0; i < 256; i++) {
-	double value, y;
-
-	y = i / 255.0;
-	value = pow(y, gamma) * 255.0 + 0.5;
-	p->gammaTable[i] = (unsigned char)CLAMP(value);
-	value = pow(y, igamma) * 255.0 + 0.5;
-	p->igammaTable[i] = (unsigned char)CLAMP(value);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * QueryPalette --
- *
- *	Queries the X display server for the colors currently used in the
- *	colormap.  These values will then be used to map screen pixels back to
- *	RGB values (see Blt_DrawableToPicture). The queried non-linear color
- *	intensities are reverse mapped back to to linear RGB values.
- *	
- * Results:
- *      The *palette* array is filled in with the RGB color values of the
- *      colors allocated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-QueryPalette(Painter *p, Blt_Pixel *palette)
-{
-    Visual *visualPtr;
-    XColor colors[256];
-
-    visualPtr = p->visualPtr;
-    assert(visualPtr->map_entries <= 256);
-
-    if ((visualPtr->class == DirectColor) || (visualPtr->class == TrueColor)) {
-	XColor *cp, *cend;
-	int nRed, nGreen, nBlue;
-	unsigned int  r, g, b;
-	
-	r = g = b = 0;
-	nRed =   (p->rMask >> p->rShift) + 1;
-	nGreen = (p->gMask >> p->gShift) + 1;
-	nBlue =  (p->bMask >> p->bShift) + 1;
-
-	for (cp = colors, cend = cp + visualPtr->map_entries; cp < cend; cp++) {
-	    cp->pixel = ((r << p->rShift)|(g << p->gShift) | (b << p->bShift));
-	    cp->pad = 0;
-	    r++, b++, g++;
-	    if (r >= nRed) {
-		r = 0;
-	    }
-	    if (g >= nGreen) {
-		g = 0;
-	    }
-	    if (b >= nBlue) {
-		b = 0;
-	    }
-	}
-    } else {
-	XColor *cp;
-	int i;
-
-	for (cp = colors, i = 0; i < visualPtr->map_entries; i++, cp++) {
-	    cp->pixel = i;
-	    cp->pad = 0;
-	}
-    }
-
-    XQueryColors(p->display, p->colormap, colors, visualPtr->map_entries);
-    
-    /* Scale to convert XColor component value (0..65535) to unsigned
-     * char (0..255). */
-    if (p->gamma == 1.0f) {
-	Blt_Pixel *dp;
-	XColor *cp;
-	int i;
-	double a;
-	
-	a = 1.0 / 257.0;
-	cp = colors, dp = palette;
-	for (i = 0; i < visualPtr->map_entries; i++) {
-	    dp->Red =   (unsigned char)(cp->red * a + 0.5);
-	    dp->Green = (unsigned char)(cp->green * a + 0.5);
-	    dp->Blue =  (unsigned char)(cp->blue * a + 0.5);
-	    cp++, dp++;
-	}
-    } else {
-	Blt_Pixel *dp;
-	XColor *cp;
-	int i;
-	double a;
-
-	a = 1.0 / 257.0;
-	cp = colors, dp = palette;
-	for (i = 0; i < visualPtr->map_entries; i++) {
-	    dp->Red =   p->gammaTable[(int)(cp->red * a + 0.5)];
-	    dp->Green = p->gammaTable[(int)(cp->green * a + 0.5)];
-	    dp->Blue =  p->gammaTable[(int)(cp->blue * a + 0.5)];
-	    cp++, dp++;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ColorRamp --
- *
- *	Computes a smooth color ramp based upon the number of colors available
- *	for each color component.  It returns an array of the desired colors
- *	(XColor structures).  The screen gamma is factored into the desired
- *	colors.
- *	
- * Results:
- *      Returns the number of colors desired.  The *colors* array is filled
- *      out to contain the component values.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ColorRamp(Painter *p, XColor *colors)
-{
-    int nColors;
-    XColor *cp;
-    double rScale, gScale, bScale;
-    double igamma;
-    int i;
-
-    nColors = 0;			/* Suppress compiler warning. */
-
-    /*
-     * Calculate the RGB coordinates of the colors we want to allocate and
-     * store them in *colors.
-     */
-    igamma = 1.0 / (double)p->gamma;
-
-    rScale = 255.0 / (p->nRed - 1);
-    gScale = 255.0 / (p->nGreen - 1);
-    bScale = 255.0 / (p->nBlue - 1);
-
-    switch (p->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	
-	nColors = MAX3(p->nRed, p->nGreen, p->nBlue);
-	if (p->isMonochrome) {
-	    nColors = p->nBlue = p->nGreen = p->nRed;
-	} 
-
-	/* Compute the 16-bit RGB values from each possible 8-bit value. */
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    int r, g, b;
-	    
-	    r = (int)(i * rScale + 0.5);
-	    g = (int)(i * gScale + 0.5);
-	    b = (int)(i * bScale + 0.5);
-
-	    r = p->igammaTable[r];
-	    g = p->igammaTable[g];
-	    b = p->igammaTable[b];
-
-	    cp->red = (r << 8) + r;
-	    cp->green = (g << 8) + g;
-	    cp->blue = (b << 8) + b;
-	    cp++;
-	}
-	break;
-
-    case PseudoColor:
-    case StaticColor:
-    case GrayScale:
-    case StaticGray:
-
-	nColors = (p->nRed * p->nGreen * p->nBlue);
-	if (p->isMonochrome) {
-	    nColors = p->nRed;
-	} 
-	if (!p->isMonochrome) {
-	    XColor *cp;
-	    int i;
-	    
-	    cp = colors;
-	    for (i = 0; i < p->nRed; i++) {
-		int j;
-		unsigned char r;
-		
-		r = (unsigned char)(i * rScale + 0.5);
-		r = p->igammaTable[r];
-		for (j = 0; j < p->nGreen; j++) {
-		    int k;
-		    unsigned int g;
-
-		    g = (unsigned char)(j * gScale + 0.5);
-		    g = p->igammaTable[g];
-		    for (k = 0; k < p->nBlue; k++) {
-			unsigned int b;
-
-			b = (unsigned char)(k * bScale + 0.5);
-			b = p->igammaTable[b];
-			cp->red = (r << 8) | r;
-			cp->green = (g << 8) | g;
-			cp->blue = (b << 8) | b;
-			cp++;
-		    } 
-		}
-	    }
-	}
-	break;
-
-    default:				/* Monochrome */
-	{
-	    XColor *cp;
-	    double scale;
-	    int i;
-
-	    scale = 255.0 / (nColors - 1);
-
-	    cp = colors;
-	    for (i = 0; i < nColors; ++i) {
-		int c;
-
-		c = (int)(i * scale + 0.5);
-		c = p->igammaTable[c];
-		cp->red = cp->green = cp->blue = (c << 8) | c;
-		cp++;
-	    }
-	}
-    } /* end switch */
-    return nColors;
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocateColors --
- *
- *	Individually allocates each of the desired colors (as specified by the
- *	*colors* array).  If a color can't be allocated the desired colors
- *	allocated to that point as released, the number of component
- *	intensities is reduced, and 0 is returned.
- *
- *	For TrueColor visuals, we don't need to allocate colors at all, since
- *	we can compute them directly.
- *	
- * Results:
- *      Returns 1 if all desired colors were allocated successfully.  If
- *      unsuccessful, returns 0.  All colors allocated up to that point are
- *      freed and a smaller color palette size is computed and reset in the
- *      painter structure.
- *
- *---------------------------------------------------------------------------
- */
-static int 
-AllocateColors(Painter *p, XColor *colors, int nColors)
-{
-    if (p->visualPtr->class == TrueColor) {
-	XColor *cp, *cend;
-
-	/* 
-	 * For TrueColor visuals, don't call XAllocColor, compute the pixel
-	 * value directly.
-	 */
-	for (cp = colors, cend = cp + nColors; cp < cend; cp++) {
-	    unsigned int r, g, b;
-
-	    r = ((cp->red >> 8) >> p->rAdjust);
-	    g = ((cp->green >> 8) >> p->gAdjust);
-	    b = ((cp->blue >> 8) >> p->bAdjust);
-
-	    /* Shift each color into the proper location of the pixel index. */
-	    r = (r << p->rShift) & p->rMask;
-	    g = (g << p->gShift) & p->gMask;
-	    b = (b << p->bShift) & p->bMask;
-	    cp->pixel = (r | g | b);
-	}
-	p->nPixels = 0;			/* This will indicate that we didn't use
-					 * XAllocColor to obtain pixel
-					 * values. */
-	return TRUE;
-    } else {
-	int i;
-	XColor *cp;
-
-	cp = colors;
-	for (i = 0; i < nColors; i++) {
-	    if (!XAllocColor(p->display, p->colormap, cp)){
-#ifdef notdef
-		fprintf(stderr, "can't allocate color #%d: r=%x g=%x b=%x\n", 
-			i, cp->red, cp->green, cp->blue);
-#endif
-		break;
-	    }
-#ifdef notdef
-	    fprintf(stderr, "picture: allocated r=%x g=%x b=%x\n",
-		colors[i].red, colors[i].green, colors[i].blue);
-#endif
-	    p->pixels[i] = cp->pixel;
-	    cp++;
-	}
-	p->nPixels = i;			/* # of pixels in array */
-	if (i == nColors) {
-	    fprintf(stderr, "painter palette %d/%d/%d colors okay\n", p->nRed, 
-		p->nGreen, p->nBlue);
-	    return TRUE;		/* Success. */
-	}
-    }
-    /*
-     * If we didn't get all of the colors, free the current palette, reduce
-     * the palette RGB component sizes.
-     */
-#ifdef notdef
-    fprintf(stderr, "can't allocate %d/%d/%d colors\n", p->nRed, p->nGreen, 
-	p->nBlue);
-#endif
-    XFreeColors(p->display, p->colormap, p->pixels, p->nPixels, 0);
-
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FillPalette --
- *
- *	Base upon the colors allocated, generate two mappings from the
- *	picture's 8-bit RGB components.
- *
- *	1) Map 8-bit RGB values to the bits of the pixel.  Each component
- *	   contains a portion of the pixel value.  For mapped visuals
- *	   (pseudocolor, staticcolor, grayscale, and staticgray) this pixel 
- *	   value will be translated to the actual pixel used by the display.
- *
- *	2) Map 8-bit RGB values to the actual color values used.  The
- *	   color ramp generated may be only a subset of the possible
- *	   color values.  The resulting palette is used in dithering the
- *	   image, using the error between the desired picture RGB value
- *	   and the actual value used.
- *
- * Results:
- *	Color palette and pixel maps are filled in.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FillPalette(Painter *p, XColor *colors, int nColors) 
-{
-    p->nColors = nColors;
-    if (!p->isMonochrome) {
-	p->flags |= COLOR_WINDOW;
-	
-	if ((p->visualPtr->class != DirectColor) && 
-	    (p->visualPtr->class != TrueColor)) {
-	    p->flags |= MAP_COLORS;
-	}
-    }
-    if (p->isMonochrome) {
-	int i;
-	
-	for (i = 0; i < 256; i++) {
-	    int c;
-	    
-	    c = (i + 127) / 255;
-	    p->rBits[i] = colors[c].pixel;
-	    p->palette[i].Blue = p->palette[i].Green = p->palette[i].Red = 
-		(unsigned char)(c * 255 + 0.5);
-	} 
-    } else {
-	int i, rMult;
-	double rScale, gScale, bScale;
-	
-	rMult = p->nGreen * p->nBlue;
-	
-	rScale = 255.0 / (p->nRed - 1);
-	gScale = 255.0 / (p->nGreen - 1);
-	bScale = 255.0 / (p->nBlue - 1);
-	
-	for (i = 0; i < 256; i++) {
-	    int r, g, b;
-	    
-	    r = (i * (p->nRed   - 1) + 127) / 255;
-	    g = (i * (p->nGreen - 1) + 127) / 255;
-	    b = (i * (p->nBlue  - 1) + 127) / 255;
-	    
-	    if ((p->visualPtr->class == DirectColor) || 
-		(p->visualPtr->class == TrueColor)) {
-		p->rBits[i] = colors[r].pixel & p->rMask;
-		p->gBits[i] = colors[g].pixel & p->gMask;
-		p->bBits[i] = colors[b].pixel & p->bMask;
-	    } else {
-		p->rBits[i] = r * rMult;
-		p->gBits[i] = g * p->nBlue;
-		p->bBits[i] = b;
-	    }
-	    p->palette[i].Red = (unsigned char)(r * rScale + 0.5);
-	    p->palette[i].Green = (unsigned char)(g * gScale + 0.5);
-	    p->palette[i].Blue = (unsigned char)(b * bScale + 0.5);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * AllocatePalette --
- *
- *	This procedure allocates the colors required by a color table, and
- *	sets up the fields in the color table data structure which are used in
- *	dithering.
- *
- *	This routine essentially mimics what is done in tkImgPhoto.c.  It's
- *	purpose is to allocate exactly the same color ramp as the photo
- *	image. That way both image types can co-exist without fighting over
- *	available colors.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Colors are allocated from the X server.  The color palette and pixel
- *	indices are updated.
- *
- *---------------------------------------------------------------------------
- */
-static void
-AllocatePalette(Painter *p)		/* Pointer to the color table requiring
-					 * colors to be allocated. */
-{
-    XColor colors[256];
-    int nColors;
-    static int stdPalettes[13][3] = {
-     /* nRed, nGreen, nBlue */
-	{ 2,  2,  2  },			/* 3 bits, 8 colors */
-	{ 2,  3,  2  },			/* 4 bits, 12 colors */
-	{ 3,  4,  2  },			/* 5 bits, 24 colors */
-	{ 4,  5,  3  },			/* 6 bits, 60 colors */
-	{ 5,  6,  4  },			/* 7 bits, 120 colors */ 
-	{ 7,  7,  4  },			/* 8 bits, 198 colors */
-	{ 8,  10, 6  },			/* 9 bits, 480 colors */
-	{ 10, 12, 8  },			/* 10 bits, 960 colors */
-	{ 14, 15, 9  },			/* 11 bits, 1890 colors */
-	{ 16, 20, 12 },			/* 12 bits, 3840 colors */
-	{ 20, 24, 16 },			/* 13 bits, 7680 colors */
-	{ 26, 30, 20 },			/* 14 bits, 15600 colors */
-	{ 32, 32, 30 },			/* 15 bits, 30720 colors */
-    };
-
-    p->isMonochrome = FALSE; 
-    switch (p->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	p->nRed =   1 << CountBits(p->rMask);
-	p->nGreen = 1 << CountBits(p->gMask);
-	p->nBlue =  1 << CountBits(p->bMask);
-	break;
-
-    case GrayScale:
-    case StaticGray:
-    case PseudoColor:
-    case StaticColor:
-	if (p->depth > 15) {
-	    p->nRed = p->nGreen = p->nBlue = 32;
-	} else if (p->depth >= 3) {
-	    int *ip = stdPalettes[p->depth - 3];
-	    p->nRed =   ip[0];
-	    p->nGreen = ip[1];
-	    p->nBlue =  ip[2];
-	}
-	break;
-
-    default:
-	p->nGreen = p->nBlue = 0;
-	p->nRed = 1 << p->depth;
-	p->isMonochrome = TRUE;
-	break;
-    }
-
-    /*
-     * Each time around this loop, we reduce the number of colors we're trying
-     * to allocate until we succeed in allocating all of the colors we need.
-     */
-    for (;;) {
-	/*
-	 * If we are using 1 bit/pixel, we don't need to allocate any colors (we
-	 * just use the foreground and background colors in the GC).
-	 */
-	if ((p->isMonochrome) && (p->nRed <= 2)) {
-	    p->flags |= BLACK_AND_WHITE;
-	    /* return; */
-	}
-	/*
-	 * Calculate the RGB values of a color ramp, given the some number of
-	 * red, green, blue intensities available.
-	 */
-	nColors = ColorRamp(p, colors);
-
-	/* Now try to allocate the colors we've calculated. */
-
-	if (AllocateColors(p, colors, nColors)) {
-	    break;		/* Success. */
-	}
-	if (!p->isMonochrome) {
-	    if ((p->nRed == 2) && (p->nGreen == 2) && (p->nBlue == 2)) {
-		break;
-		/* Fall back to 1-bit monochrome display. */
-		/* p->mono = TRUE; */
-	    } else {
-		/*
-		 * Reduce the number of shades of each primary to about 3/4 of
-		 * the previous value.  This will reduce the total number of
-		 * colors required to less than half (27/64) the previous value
-		 * for PseudoColor displays.
-		 */
-		p->nRed = (p->nRed * 3 + 2) / 4;
-		p->nGreen = (p->nGreen * 3 + 2) / 4;
-		p->nBlue = (p->nBlue * 3 + 2) / 4;
-	    }
-	} else {
-	    p->nRed /= 2;
-	}
-    }
-    FillPalette(p, colors, nColors);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPainter --
- *
- *	Creates a new painter to be used to paint pictures. Painters are keyed
- *	by the combination of display, colormap, visual, depth, and gamma value
- *	used.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	A color ramp is allocated (not true for TrueColor visuals).  Gamma
- *	tables are computed and filled.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-NewPainter(PainterKey *keyPtr)
-{
-    Painter *p;
-    
-    p = Blt_AssertCalloc(1, sizeof(Painter));
-    p->colormap = keyPtr->colormap;
-    p->depth = keyPtr->depth;
-    p->display = keyPtr->display;
-    p->gamma = keyPtr->gamma;
-    p->visualPtr = keyPtr->visualPtr;
-    
-    p->refCount = 0;
-    p->rMask = (unsigned int)p->visualPtr->red_mask;
-    p->gMask = (unsigned int)p->visualPtr->green_mask;
-    p->bMask = (unsigned int)p->visualPtr->blue_mask;
-
-    p->rShift = FindShift(p->rMask);
-    p->gShift = FindShift(p->gMask);
-    p->bShift = FindShift(p->bMask);
-
-    p->rAdjust = p->gAdjust = p->bAdjust = 0;
-
-    {
-	int nRedBits, nGreenBits, nBlueBits;
-
-	nRedBits = CountBits(p->rMask);
-	nGreenBits = CountBits(p->gMask);
-	nBlueBits = CountBits(p->bMask);
-	if (nRedBits < 8) {
-	    p->rAdjust = 8 - nRedBits;
-	}
-	if (nGreenBits < 8) {
-	    p->gAdjust = 8 - nGreenBits;
-	}
-	if (nBlueBits < 8) {
-	    p->bAdjust = 8 - nBlueBits;
-	}
-    }
-    ComputeGammaTables(p);
-    AllocatePalette(p);
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePainter --
- *
- *	Called when the TCL interpreter is idle, this routine frees the
- *	painter. Painters are reference counted. Only when no clients are using
- *	the painter (the count is zero) is the painter actually freed.  By
- *	deferring its deletion, this allows client code to call Blt_GetPainter
- *	after Blt_FreePainter without incurring a performance penalty.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreePainter(DestroyData data)
-{
-    Painter *p = (Painter *)data;
-
-    if (p->refCount <= 0) {
-	if (p->nColors > 0) {
-	    XFreeColors(p->display, p->colormap,
-		p->pixels, p->nPixels, 0);
-	}
-	Blt_DeleteHashEntry(&painterTable, p->hashPtr);
-	if (p->gc != NULL) {
-	    if (p->flags & GC_PRIVATE) {
-		XFreeGC(p->display, p->gc);
-	    } else {
-		Tk_FreeGC(p->display, p->gc);
-	    }
-	    p->gc = NULL;
-	}
-	Blt_Free(p);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPainter --
- *
- *	Attempts to retrieve a painter for a particular combination of display,
- *	colormap, visual, depth, and gamma value.  If no specific painter
- *	exists, then one is created.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	If no current painter exists, a new painter is added to the hash table
- *	of painters.  Otherwise, the current painter's reference count is
- *	incremented indicated how many clients are using the painter.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-GetPainter(
-    Display *display, 
-    Colormap colormap, 
-    Visual *visualPtr,
-    int depth,
-    float gamma)
-{
-    Painter *p;
-    PainterKey key;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    if (!initialized) {
-	Blt_InitHashTable(&painterTable, sizeof(PainterKey) / sizeof(int));
-	initialized = TRUE;
-    }
-    key.display = display;
-    key.colormap = colormap;
-    key.visualPtr = visualPtr;
-    key.depth = depth;
-    key.gamma = gamma;
-
-    hPtr = Blt_CreateHashEntry(&painterTable, (char *)&key, &isNew);
-    if (isNew) {
-	p = NewPainter(&key);
-	p->hashPtr = hPtr;
-	Blt_SetHashValue(hPtr, p);
-    } else {
-	p = Blt_GetHashValue(hPtr);
-    }
-    p->refCount++;
-    return p;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintXImage --
- *
- *	Draw the given XImage. If the size of the image exceeds the maximum
- *	request size of the X11 protocol, the image is drawn using XPutImage in
- *	multiples of rows that fit within the limit.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PaintXImage(Painter *p, Drawable drawable, XImage *imgPtr, int sx, int sy,
-	    int w, int h, int dx, int dy)
-{
-    int y;
-    int n;
-    long maxPixels;
-
-    maxPixels = Blt_MaxRequestSize(p->display, sizeof(Blt_Pixel));
-    n = (maxPixels + w - 1) / w;
-    if (n < 1) {
-	n = 1;
-    } 
-    if (n > h ) {
-	n = h;
-    }
-    for (y = 0; y < h; y += n) {
-	if ((y + n) > h) {
-	    n = h - y;
-	}
-	XPutImage(p->display, drawable, p->gc, imgPtr, sx, sy+y, 
-		  dx, dy+y, w, n);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XGetImageErrorProc --
- *
- *	Error handling routine for the XGetImage request below. Sets the flag
- *	passed via *clientData* to TCL_ERROR indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-XGetImageErrorProc(
-    ClientData clientData, 
-    XErrorEvent *errEventPtr)	/* Not used. */
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToXImage --
- *
- *	Attempts to snap the image from the drawable into an XImage structure
- *	(using XGetImage).  This may fail is the coordinates of the region in
- *	the drawable are obscured.
- *
- * Results:
- *	Returns a pointer to the XImage if successful. Otherwise NULL is
- *	returned.
- *
- *---------------------------------------------------------------------------
- */
-static XImage *
-DrawableToXImage(
-    Display *display,
-    Drawable drawable, 
-    int x, int y, int w, int h)
-{
-    XImage *imgPtr;
-    Tk_ErrorHandler errHandler;
-    int result;
-
-    result = TCL_OK;
-    errHandler = Tk_CreateErrorHandler(display, BadMatch, X_GetImage, -1, 
-	XGetImageErrorProc, &result);
-    imgPtr = XGetImage(display, drawable, x, y, w, h, AllPlanes, ZPixmap);
-    Tk_DeleteErrorHandler(errHandler);
-    XSync(display, False);
-    if (result != TCL_OK) {
-#ifdef notdef
-	fprintf(stderr, "can't snap picture of drawable\n");
-#endif
-	return NULL;
-    }
-    return imgPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and converts it
- *      to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred (a portion of
- *      the region specified is obscured), then NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Picture
-DrawableToPicture(
-    Painter *p,
-    Drawable drawable,
-    int x, int y,			/* Coordinates of region in source
-					 * drawable. */
-    int w, int h)			/* Dimension of the region in the source
-					 * drawable. Region must be completely
-					 * contained by the drawable. */
-{
-    Pict *destPtr;
-    Blt_Pixel *destRowPtr;
-    Blt_Pixel palette[256];
-    XImage *imgPtr;
-    int shift[4];
-    unsigned char *srcRowPtr;
-
-    imgPtr = DrawableToXImage(p->display, drawable, x, y, w, h);
-    if (imgPtr == NULL) {
-	int dx, dy, dw, dh;
-
-	/* 
-	 * Failed to acquire an XImage from the drawable. The drawable may be
-	 * partially obscured or too small for the requested area.  Try it
-	 * again, after fixing the area with the dimensions of the drawable.
-	 */
-	if (Blt_GetWindowRegion(p->display, drawable, &dx, &dy, &dw, &dh) 
-	    == TCL_OK) {
-	    if ((x + w) > dw) {
-		w = dw - x;
-	    }
-	    if ((y + h) > dh) {
-		h = dh - y;
-	    }
-	    imgPtr = DrawableToXImage(p->display, drawable, x, y, w, h);
-	}
-    }
-    if (imgPtr == NULL) {
-	return NULL;
-    }
-
-    /* Allocate a picture to hold the screen snapshot. */
-    destPtr = Blt_CreatePicture(w, h);
-
-    /* Get the palette of the current painter/window */
-    QueryPalette(p, palette);
-
-    /* Suppress compiler warnings. */
-    shift[0] = shift[1] = shift[2] = shift[3] = 0; 
-
-    switch (p->visualPtr->class) {
-    case TrueColor:
-    case DirectColor:
-	if (imgPtr->byte_order == MSBFirst) {
-	    shift[0] = 24, shift[1] = 16, shift[2] = 8, shift[3] = 0;
-	} else {
-	    switch (imgPtr->bits_per_pixel) {
-	    case 32:
-		shift[0] = 0, shift[1] = 8, shift[2] = 16, shift[3] = 24;
-		break;
-	    case 24:
-		shift[1] = 0, shift[2] = 8, shift[3] = 16;
-		break;
-	    case 16:
-		shift[2] = 0, shift[3] = 8;
-		break;
-	    case 8:
-		shift[3] = 0;
-		break;
-	    }
-	}
-	srcRowPtr = (unsigned char *)imgPtr->data;
-	destRowPtr = destPtr->bits;
-	switch (imgPtr->bits_per_pixel) {
-	case 32:
-	    for (y = 0; y < h; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    int r, g, b;
-		    unsigned long pixel;
-		    
-		    /* Get the next pixel from the image. */
-		    pixel = ((sp[0] << shift[0]) | (sp[1] << shift[1]) |
-			     (sp[2] << shift[2]) | (sp[3] << shift[3]));
-		    
-		    /* Convert the pixel to RGB, correcting for input gamma. */
-		    r = ((pixel & p->rMask) >> p->rShift);
-		    g = ((pixel & p->gMask) >> p->gShift);
-		    b = ((pixel & p->bMask) >> p->bShift);
-		    dp->Red = palette[r].Red;
-		    dp->Green = palette[g].Green;
-		    dp->Blue = palette[b].Blue;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 4;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-		srcRowPtr += imgPtr->bytes_per_line;
-	    }
-	    break;
-
-	case 24:
-	    for (y = 0; y < h; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    int r, g, b;
-		    unsigned long pixel;
-		    
-		    /* Get the next pixel from the image. */
-		    pixel = ((sp[0] << shift[1]) | (sp[1] << shift[2]) |
-			     (sp[2] << shift[3]));
-		    
-		    /* Convert the pixel to RGB, correcting for input gamma. */
-		    r = ((pixel & p->rMask) >> p->rShift);
-		    g = ((pixel & p->gMask) >> p->gShift);
-		    b = ((pixel & p->bMask) >> p->bShift);
-		    dp->Red = palette[r].Red;
-		    dp->Green = palette[g].Green;
-		    dp->Blue = palette[b].Blue;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 3;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-		srcRowPtr += imgPtr->bytes_per_line;
-	    }
-	    break;
-	    
-	case 16:
-	    for (y = 0; y < h; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    int r, g, b;
-		    unsigned long pixel;
-		    
-		    /* Get the next pixel from the image. */
-		    pixel = ((sp[0] << shift[2]) | (sp[1] << shift[3]));
-
-		    /* Convert the pixel to RGB, correcting for input gamma. */
-		    r = ((pixel & p->rMask) >> p->rShift);
-		    g = ((pixel & p->gMask) >> p->gShift);
-		    b = ((pixel & p->bMask) >> p->bShift);
-		    dp->Red = palette[r].Red;
-		    dp->Green = palette[g].Green;
-		    dp->Blue = palette[b].Blue;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp += 2;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-		srcRowPtr += imgPtr->bytes_per_line;
-	    }
-	    break;
-	    
-	case 8:
-	    for (y = 0; y < h; y++) {
-		unsigned char *sp;
-		Blt_Pixel *dp, *dend;
-		
-		sp = srcRowPtr;
-		for (dp = destRowPtr, dend = dp + w; dp < dend; dp++) {
-		    int r, g, b;
-		    unsigned long pixel;
-		    
-		    /* Get the next pixel from the image. */
-		    pixel = (*sp << shift[3]);
-
-		    /* Convert the pixel to RGB, correcting for input gamma. */
-		    r = ((pixel & p->rMask) >> p->rShift);
-		    g = ((pixel & p->gMask) >> p->gShift);
-		    b = ((pixel & p->bMask) >> p->bShift);
-		    dp->Red = palette[r].Red;
-		    dp->Green = palette[g].Green;
-		    dp->Blue = palette[b].Blue;
-		    dp->Alpha = ALPHA_OPAQUE;
-		    sp++;
-		}
-		destRowPtr += destPtr->pixelsPerRow;
-		srcRowPtr += imgPtr->bytes_per_line;
-	    }
-	    break;
-	}
-	break;
-
-    case PseudoColor:
-    case StaticColor:
-    case GrayScale:
-    case StaticGray:
-	if ((imgPtr->bits_per_pixel != 8) && (imgPtr->bits_per_pixel != 4)) {
-	    return NULL;		/* Can only handle 4 or 8 bit pixels. */
-	}
-	srcRowPtr = (unsigned char *)imgPtr->data;
-	destRowPtr = destPtr->bits;
-	for (y = 0; y < h; y++) {
-	    unsigned char *sp;
-	    Blt_Pixel *dp;
-
-	    sp = srcRowPtr, dp = destRowPtr;
-	    for (x = 0; x < w; x++) {
-		unsigned long pixel;
-
-		if (imgPtr->bits_per_pixel == 8) {
-		    pixel = *sp++;
-		} else {
-		    if (x & 1) {	/* Odd: pixel is high nybble. */
-			pixel = (*sp & 0xF0) >> 4;
-			sp++;
-		    } else {		/* Even: pixel is low nybble. */
-			pixel = (*sp & 0x0F);
-		    }
-		} 
-		/* Convert the pixel to RGB, correcting for input gamma. */
-		dp->Red = palette[pixel].Red;
-		dp->Green = palette[pixel].Green;
-		dp->Blue = palette[pixel].Blue;
-		dp->Alpha = ALPHA_OPAQUE;
-		dp++;
-	    }
-	    srcRowPtr += imgPtr->bytes_per_line;
-	    destRowPtr += destPtr->pixelsPerRow;
-	}
-	break;
-    default:
-	break;
-    }
-    XDestroyImage(imgPtr);
-    return destPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPicture --
- *
- *	Paints the picture to the given drawable. The region of the picture is
- *	specified and the coordinates where in the destination drawable is the
- *	image to be displayed.
- *
- *	The image may be dithered depending upon the bit set in the flags
- *	parameter: 0 no dithering, 1 for dithering.
- * 
- * Results:
- *	Returns TRUE is the picture was successfully displayed.  Otherwise FALSE
- *	is returned if the particular combination visual and image depth is not
- *	handled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPicture(
-    Painter *p,
-    Drawable drawable,
-    Pict *srcPtr,
-    int sx, int sy,		/* Coordinates of region in the
-				 * picture. */
-    int w, int h,		/* Dimension of the source region.
-				 * Area cannot extend beyond the end
-				 * of the picture. */
-    int dx, int dy,		/* Coordinates of destination region
-				 * in the drawable.  */
-    unsigned int flags)
-{
-#ifdef WORD_BIGENDIAN
-    static int nativeByteOrder = MSBFirst;
-#else
-    static int nativeByteOrder = LSBFirst;
-#endif
-    int dw, dh;
-    Pict *ditherPtr;
-    Blt_Pixel *srcRowPtr;
-    XImage *imgPtr;
-    int y;
-    unsigned char *destRowPtr;
-
-#ifdef notdef
-    fprintf(stderr, "PaintPicture: x=%d,y=%d,w=%d,h=%d,dx=%d,dy=%d\n",
-	    sx, sy, w, h, dx, dy);
-#endif
-    ditherPtr = NULL;
-    if (flags & BLT_PAINTER_DITHER) {
-	ditherPtr = Blt_DitherPicture(srcPtr, p->palette);
-	if (ditherPtr != NULL) {
-	    srcPtr = ditherPtr;
-	}
-    }
-    imgPtr = XCreateImage(p->display, p->visualPtr, p->depth, ZPixmap, 0, 
-	(char *)NULL, w, h, 32, 0);
-    assert(imgPtr);
-
-    /* 
-     * Set the byte order to the platform's native byte order. We'll let Xlib
-     * handle byte swapping.
-     */
-    imgPtr->byte_order = nativeByteOrder;
-    imgPtr->data = Blt_AssertMalloc(sizeof(Blt_Pixel) * w * h);
-    srcRowPtr = srcPtr->bits + ((sy * srcPtr->pixelsPerRow) + sx);
-    destRowPtr = (unsigned char *)imgPtr->data;
-
-    dw = MIN(w, srcPtr->width);
-    dh = MIN(h, srcPtr->height);
-    switch (p->visualPtr->class) {
-    case TrueColor:
-
-	/* Directly compute the pixel 8, 16, 24, or 32 bit values from the RGB
-	 * components. */
-
-	switch (imgPtr->bits_per_pixel) {
-	case 32:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned int *dp;
-
-		dp = (unsigned int *)destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned int r, g, b;
-
-		    r = (p->igammaTable[sp->Red] >> p->rAdjust) << p->rShift;
-		    g = (p->igammaTable[sp->Green] >> p->gAdjust) << p->gShift;
-		    b = (p->igammaTable[sp->Blue] >> p->bAdjust) << p->bShift;
-		    *dp = r | g | b;
-		    dp++;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	case 24:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    unsigned int r, g, b;
-		    
-		    r = (p->igammaTable[sp->Red] >> p->rAdjust) << p->rShift;
-		    g = (p->igammaTable[sp->Green] >> p->gAdjust) << p->gShift;
-		    b = (p->igammaTable[sp->Blue] >> p->bAdjust) << p->bShift;
-		    pixel = r | g | b;
-		    
-		    *dp++ = pixel & 0xFF;
-		    *dp++ = (pixel >> 8) & 0xFF;
-		    *dp++ = (pixel >> 16) & 0xFF;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 16:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned short *dp;
-
-		dp = (unsigned short *)destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    unsigned int r, g, b;
-		    
-		    r = (p->igammaTable[sp->Red] >> p->rAdjust) << p->rShift;
-		    g = (p->igammaTable[sp->Green] >> p->gAdjust) << p->gShift;
-		    b = (p->igammaTable[sp->Blue] >> p->bAdjust) << p->bShift;
-		    pixel = r | g | b;
-		    *dp = pixel;
-		    dp++;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 8:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    unsigned int r, g, b;
-		    
-		    r = (p->igammaTable[sp->Red] >> p->rAdjust) << p->rShift;
-		    g = (p->igammaTable[sp->Green] >> p->gAdjust) << p->gShift;
-		    b = (p->igammaTable[sp->Blue] >> p->bAdjust) << p->bShift;
-
-		    pixel = r | g | b;
-		    *dp++ = pixel & 0xFF;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-	}
-	break;
-
-    case DirectColor:
-
-	/* Translate the RGB components to 8, 16, 24, or 32-bit pixel
-	 * values. */
-
-	switch (imgPtr->bits_per_pixel) {
-	case 32:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    
-		    pixel = (p->rBits[sp->Red] | p->gBits[sp->Green] |
-			     p->bBits[sp->Blue]);
-		    *(unsigned int *)dp = pixel;
-		    dp += 4;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 24:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    
-		    pixel = (p->rBits[sp->Red] | p->gBits[sp->Green] |
-			     p->bBits[sp->Blue]);
-		    *dp++ = pixel & 0xFF;
-		    *dp++ = (pixel >> 8) & 0xFF;
-		    *dp++ = (pixel >> 16) & 0xFF;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 16:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    
-		    pixel = (p->rBits[sp->Red] | p->gBits[sp->Green] |
-			     p->bBits[sp->Blue]);
-		    *(unsigned short *)dp = pixel;
-		    dp += 2;
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	    break;
-
-	case 8:
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-		
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-		    
-		    pixel = (p->rBits[sp->Red] | p->gBits[sp->Green] |
-			     p->bBits[sp->Blue]);
-		    *dp++ = pixel & 0xFF;
-		}
-		break;
-	    }
-	    destRowPtr += imgPtr->bytes_per_line;
-	    srcRowPtr += srcPtr->pixelsPerRow;
-	}
-	break;
-
-    case PseudoColor:
-    case StaticColor:
-    case GrayScale:
-    case StaticGray:
-
-	/* Translate RGB components to the correct 8-bit or 4-bit
-	 * pixel values. */
-
-	if (imgPtr->bits_per_pixel == 8) {
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp, *send;
-		unsigned char *dp;
-
-		dp = destRowPtr;
-		for (sp = srcRowPtr, send = sp + dw; sp < send; sp++) {
-		    unsigned long pixel;
-
-		    pixel = (p->rBits[sp->Red] + p->gBits[sp->Green] +
-			     p->bBits[sp->Blue]);
-		    pixel = p->pixels[pixel];
-		    *dp++ = (pixel & 0xFF);
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	} else {
-	    for (y = 0; y < dh; y++) {
-		Blt_Pixel *sp;
-		int x;
-		unsigned char *dp;
-
-		dp = destRowPtr, sp = srcRowPtr;
-		for (x = 0; x < dw; x++, sp++) {
-		    unsigned long pixel;
-
-		    pixel = (p->rBits[sp->Red] + p->gBits[sp->Green] +
-			     p->bBits[sp->Blue]);
-		    pixel = p->pixels[pixel];
-		    if (x & 1) {	
-			*dp |= (pixel & 0x0F) << 4;
-			/* Move to the next address after odd nybbles. */
-			dp++;
-		    } else {
-			*dp = (pixel & 0x0F);
-		    }
-		}
-		destRowPtr += imgPtr->bytes_per_line;
-		srcRowPtr += srcPtr->pixelsPerRow;
-	    }
-	}
-	break;
-
-    default:
-	if (ditherPtr != NULL) {
-	    Blt_FreePicture(ditherPtr);
-	}
-	XDestroyImage(imgPtr);
-	return FALSE;
-    }
-    PaintXImage(p, drawable, imgPtr, 0, 0, w, h, dx, dy);
-
-    if (ditherPtr != NULL) {
-	Blt_FreePicture(ditherPtr);
-    }
-    XDestroyImage(imgPtr);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPictureWithBlend --
- *
- *	Blends and paints the picture in the given drawable. The region of the
- *	picture is specified and the coordinates where in the destination
- *	drawable is the image to be displayed.
- *
- *	The background is snapped from the drawable and converted into a
- *	picture.  This picture is then blended with the current picture (the
- *	background always assumed to be 100% opaque).
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display, Otherwise FALSE is
- *	returned.  This may happen if the background can not be obtained from
- *	the drawable.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPictureWithBlend(
-    Painter *p,
-    Drawable drawable,
-    Blt_Picture fg,
-    int x, int y,			/* Coordinates of source region in the
-					 * picture. */
-    int w, int h,			/* Dimension of the source region.
-					 * Region cannot extend beyond the end
-					 * of the picture. */
-    int dx, int dy,			/* Coordinates of destination region in
-					 * the drawable.  */
-    unsigned int flags, 
-    int alpha)
-{
-    Pict *bgPtr;
-
-#ifdef notdef
-    fprintf(stderr, "PaintPictureWithBlend: x=%d,y=%d,w=%d,h=%d,dx=%d,dy=%d\n",
-	    x, y, w, h, dx, dy);
-#endif
-    if (dx < 0) {
-	w -= -dx;			/* Shrink the width. */
-	x += -dx;			/* Change the left of the source
-					 * region. */
-	dx = 0;				/* Start at the left of the
-					 * destination. */
-    } 
-    if (dy < 0) {
-	h -= -dy;			/* Shrink the height. */
-	y += -dy;			/* Change the top of the source
-					 * region. */
-	dy = 0;				/* Start at the top of the
-					 * destination. */
-    }
-    if ((w < 0) || (h < 0)) {
-	return FALSE;
-    }
-    bgPtr = DrawableToPicture(p, drawable, dx, dy, w, h);
-    if (bgPtr == NULL) {
-	return FALSE;
-    }
-    /* Dimension of source region may be adjusted by the actual size of the
-     * drawable.  This is reflected in the size of the background picture. */
-    Blt_BlendPictures(bgPtr, fg, x, y, bgPtr->width, bgPtr->height, 0, 0);
-    PaintPicture(p, drawable, bgPtr, 0, 0, bgPtr->width, bgPtr->height, dx, dy,
-		 flags);
-    Blt_FreePicture(bgPtr);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and converts it
- *      to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred, NULL is
- *      returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_DrawableToPicture(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int x, int y,			/* Offset of image from the drawable's
-					 * origin. */
-    int w, int h,			/* Dimension of the image.  Image must
-					 * be completely contained by the
-					 * drawable. */
-    float gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainter(tkwin, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, w, h);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WindowToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and converts it
- *      to a picture.
- *
- *	This routine is used to snap foreign (non-Tk) windows. For pixmaps and
- *	Tk windows, Blt_DrawableToPicture is preferred.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred, NULL is
- *      returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture
-Blt_WindowToPicture(
-    Display *display,
-    Drawable drawable,
-    int x, int y,			/* Offset of image from the drawable's
-					 * origin. */
-    int w, int h,			/* Dimension of the image.  Image must
-					 * be completely contained by the
-					 * drawable. */
-    float gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture picture;
-
-    painter = Blt_GetPainterFromDrawable(display, drawable, gamma);
-    picture =  DrawableToPicture(painter, drawable, x, y, w, h);
-    Blt_FreePainter(painter);
-    return picture;
-}
-
-int
-Blt_PaintPicture(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,			/* Starting coordinates of subregion in
-					 * the picture to be painted. */
-    int w, int h,			/* Dimension of the subregion.  */
-    int dx, int dy,			/* Coordinates of region in the
-					 * drawable.  */
-    unsigned int flags)
-{
-    /* 
-     * Nothing to draw. The region offset starts beyond the end of
-     * the picture. 
-     *
-     *  +---------------+    	
-     *  |               |    	
-     *  |               |    	
-     *  |    Picture    |  x,y   
-     *  |               |   +---------+
-     *  |               |   |         |
-     *  +---------------+   |         | h
-     *			    |         |
-     *                      +---------+
-     *			         w
-     */			        
-    if ((picture == NULL) || (x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture))) {
-	return TRUE;	
-    }
-    /* 
-     * Correct the dimensions if the origin starts before the picture
-     * (i.e. coordinate is negative).  Reset the coordinate the 0. 
-     *
-     *  x,y		       
-     *   +---------+ 	           0,0		       
-     *   |  +------|--------+       +------+--------+
-     *   |  |      | h      |       |      |        |
-     *   |  |      |        |       |      | h+y    |
-     *   +--|------+        |       +------+        |
-     *      | w             |       | w+x           |
-     *      |               |       |               |
-     *      +---------------+       +---------------+ 
-     *
-     */
-    if (x < 0) {		
-        w += x;
-        x = 0;
-    }
-    if (y < 0) {
-        h += y;
-        y = 0;
-    }
-    /* 
-     * Check that the given area does not extend beyond the end of the
-     * picture.
-     *
-     *   0,0                        0,0
-     *    +-----------------+	     +-----------------+	  	
-     *    |                 |	     |                 |	  	
-     *    |        x,y      |	     |        x,y      |	  	
-     *    |         +---------+      |         +-------+
-     *    |         |       | |      |         |       |
-     *    |         |       | | h    |         |       | 
-     *    +---------|-------+ |      +---------+-------+
-     * 	            +---------+   	         
-     *                   w                                 
-     * Clip the end of the area if it's too big.
-     */
-    if ((w + x) > Blt_PictureWidth(picture)) {
-	w = Blt_PictureWidth(picture) - x;
-    }
-    if ((h + y) > Blt_PictureHeight(picture)) {
-	h = Blt_PictureHeight(picture) - y;
-    }
-    /* Check that there's still something to paint. */
-    if ((w <= 0) || (h <= 0)) {
-	return TRUE;
-    }
-#ifdef notdef
-    if (dx < 0) {
-	dx = 0;
-    } 
-    if (dy < 0) {
-	dy = 0;
-    }
-#endif
-    if (Blt_PictureIsOpaque(picture)) {
-	return PaintPicture(painter, drawable, picture, x, y, w, h, 
-		dx, dy, flags);
-    } else {
-	int alpha = 128;
-
-	return PaintPictureWithBlend(painter, drawable, picture, x, y, w, h, 
-		dx, dy, flags, alpha);
-    }
-}
-
-int
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,			/* Coordinates of region in the
-					 * picture. */
-    int w, int h,			/* Dimension of the region.  Area
-					 * cannot extend beyond the end of the
-					 * picture. */
-    int dx, int dy,			/* Coordinates of region in the
-					 * drawable.  */
-    unsigned int flags,			/* Indicates whether to dither the
-					 * picture before displaying. */
-    double falpha)
-{
-    int alpha;
-
-    alpha = (int)(falpha * 255.0 + 0.5);
-
-    /* 
-     * Nothing to draw. The selected region is outside of the picture.
-     *
-     *   0,0
-     *    +---------+
-     *    |         |
-     *    | Picture |
-     *	  |         |
-     *    +---------+
-     *              x,y
-     *               +-------+
-     *		     |       |
-     *               |       | h
-     *		     +-------+
-     *			 w
-     */
-    if ((picture == NULL) || 
-	(x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture)) ||
-	((x + w) <= 0) || ((y + h) <= 0)) {
-	return TRUE;	
-    }
-    /* 
-     * Correct the dimensions if the origin starts before the picture
-     * (i.e. coordinate is negative).  Reset the coordinate the 0.
-     *
-     * x,y		       
-     *   +---------+ 	           0,0		       
-     *   |  +------|--------+       +------+--------+
-     * h |  |0,0   |        |       |      |        |
-     *   |  |      |        |       |      |        |
-     *   +--|------+        |       +------+        |
-     *    w |               |       |               |
-     *      |               |       |               |
-     *      +---------------+       +---------------+ 
-     *
-     */
-    if (x < 0) {		
-        w += x;
-        x = 0;
-    }
-    if (y < 0) {
-        h += y;
-        y = 0;
-    }
-
-    /* 
-     * Check that the given area does not extend beyond the end of the
-     * picture.
-     * 
-     *   0,0                        0,0
-     *    +-----------------+	     +-----------------+	  	
-     *    |		    |        |                 |
-     *    |        x,y      |	     |        x,y      |	  	
-     *    |         +---------+      |         +-------+
-     *    |         |       | |      |         |       |
-     *    |         |       | | w    |         |       |
-     *    +---------|-------+ |      +---------+-------+
-     * 	            +---------+   	           
-     *                   h
-     *                                                    
-     * Clip the end of the area if it's too big.
-     */
-    if ((x + w) > Blt_PictureWidth(picture)) {
-	w = Blt_PictureWidth(picture) - x;
-    }
-    if ((y + h) > Blt_PictureHeight(picture)) {
-	h = Blt_PictureHeight(picture) - y;
-    }
-    if (dx < 0) {
-	dx = 0;
-    } 
-    if (dy < 0) {
-	dy = 0;
-    }
-    /* Check that there's still something to paint. */
-    if ((w <= 0) || (h <= 0)) {
-	return TRUE;
-    }
-    return PaintPictureWithBlend(painter, drawable, picture, x, y, w, h, dx, dy,
-	flags, alpha);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainterFromDrawable --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information is retrieved from
- *	the drawable which is assumed to be a window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainterFromDrawable(Display *display, Drawable drawable, float gamma)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Painter *p;
-
-    {
-	Blt_DrawableAttributes *attrPtr;
-
-	attrPtr = Blt_GetDrawableAttribs(display, drawable);
-	if ((attrPtr != NULL) && (attrPtr->visual != NULL)) {
-	    p = GetPainter(display, attrPtr->colormap, attrPtr->visual, 
-		attrPtr->depth, gamma);
-	} else {
-	    XWindowAttributes a;
-	    XGetWindowAttributes(display, drawable, &a);
-	    p = GetPainter(display, a.colormap, a.visual, a.depth, gamma);
-	}
-    }
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-	    
-    p->gc = XCreateGC(display, drawable, gcMask, &gcValues);
-    p->flags |= GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainter --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information (except for the
- *	monitor's gamma value) is retrieved from the given Tk window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainter(Tk_Window tkwin, float gamma)
-{
-    Painter *p;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    p = GetPainter(Tk_Display(tkwin), Tk_Colormap(tkwin), 
-	Tk_Visual(tkwin), Tk_Depth(tkwin), gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-    p->gc = Tk_GetGC(tkwin, gcMask, &gcValues);
-    p->flags &= ~GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreePainter --
- *
- *	Frees the painter. Painters are reference counted. Only when no clients
- *	are using the painter (the count is zero) is the painter actually freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreePainter(Painter *p)
-{
-    p->refCount--;
-    if (p->refCount <= 0) {
-	Tcl_EventuallyFree(p, FreePainter);
-    }
-}
-
-GC 
-Blt_PainterGC(Painter *p)
-{
-    return p->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *p)
-{
-    return p->depth;
-}
-
-Visual *
-Blt_PainterVisual(Painter *p)
-{
-    return p->visualPtr;
-}
-
-Colormap
-Blt_PainterColormap(Painter *p)
-{
-    return p->colormap;
-}
diff --git a/blt3.0/src/bltUnixPainter.h b/blt3.0/src/bltUnixPainter.h
deleted file mode 100644
index 63749a1..0000000
--- a/blt3.0/src/bltUnixPainter.h
+++ /dev/null
@@ -1,143 +0,0 @@
-
-/*
- * bltUnixPainter.h --
- *
- * This header contains the private definitions for a painter in 
- * the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the
- * Tk library distrubution.  The photo image type was designed and
- * implemented by Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#ifndef _BLT_UNIX_PAINTER_H
-#define _BLT_UNIX_PAINTER_H
-
-#ifdef notdef
-#define PAINTER_COLOR_WINDOW		(1<<0)
-#define PAINTER_BW			(1<<1)
-#define PAINTER_MAP_COLORS		(1<<2)
-#endif
-
-/*
- * Painter --
- *
- * This structure represents a painter used to display picture images.  A
- * painter is specified by a combination of display, visual, colormap, depth,
- * and monitor gamma value.  Painters contain information necessary to display
- * a picture.  This includes both an RGB to pixel map, and a RGB to allocated
- * color map.
- *
- * Painters may be shared by more than one client and are reference counted.
- * When no clients are using the painter, it is freed.
- */
-
-struct _Blt_Painter {
-    Display *display;		/* Display of painter. Used to free colors
-				 * allocated. */
-
-    Visual *visualPtr;		/* Visual information for the class of windows
-				 * displaying the image. */
-
-    Colormap colormap;		/* Colormap used.  This may be the default
-				 * colormap, or an allocated private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    float gamma;		/* Gamma correction value of monitor. */
-
-    unsigned int flags;		/* Flags listed below. */
-
-    int refCount;		/* # of clients using this painter. If zero,
-				 * # the painter is freed. */
-
-    Blt_HashEntry *hashPtr;	/* Used to delete the painter entry from the
-				 * hash table of painters. */
-
-    int nColors;		/* # of colors allocated.  */
-    int nRed, nGreen, nBlue;	/* # of intensities for each RGB component. */
-
-    unsigned long pixels[256];	/* Array of pixel values. Needed to deallocate
-				 * the color palette. Also contains the
-				 * mapping between linear pixel values (rBits,
-				 * gBits, bBits) and the actual pixel for
-				 * PsuedoColor, StaticColor, Greyscale, and
-				 * StaticGrey visuals.
-				 */
-
-    int nPixels;		/* # of pixels allocated in above array. */
-
-
-    GC gc;			/* GC used to draw the image. */
-
-    /* 
-     * The following arrays are used for DirectColor, PsuedoColor,
-     * StaticColor, Greyscale, and StaticGrey visuals to convert RGB triplets
-     * to a parts of a pixel index.
-     */
-    unsigned int rBits[256], gBits[256], bBits[256];
-
-    /* 
-     * This following as used for TrueColor and DirectColor visuals only.
-     * They are used to directly compute of pixel values from picture RGB
-     * components.
-     */
-    unsigned int rAdjust, gAdjust, bAdjust;
-    unsigned int rShift, gShift, bShift;
-    unsigned int rMask, gMask, bMask;
-
-    unsigned char gammaTable[256]; /* Input gamma lookup table. Used to map
-				 * non-linear monitor values back to RGB
-				 * values. This is used whenever we take a
-				 * snapshot of the screen (e.g. alpha
-				 * blending).  Computes the power mapping.  D
-				 * = I^gamma. */
-
-    unsigned char igammaTable[256]; /* Output gamma lookup table. Used to map
-				 * RGB values to non-linear monitor
-				 * values. Computes the inverse power mapping.
-				 * I~ = D^1/gamma. */
-
-    int isMonochrome;		/* Indicates if the display uses a single
-				 * color component (e.g. 4-bit grayscale). */
-
-    Blt_Pixel palette[256];	/* Maps the picture's 8-bit RGB values to the
-				 * RGB values of the colors actually
-				 * allocated. This is used for dithering the
-				 * picture. */
-
-};
-
-typedef struct _Blt_Painter Painter;
-
-#endif /* _BLT_UNIX_PAINTER_H */
diff --git a/blt3.0/src/bltUnixPipe.c b/blt3.0/src/bltUnixPipe.c
deleted file mode 100644
index e58b683..0000000
--- a/blt3.0/src/bltUnixPipe.c
+++ /dev/null
@@ -1,1130 +0,0 @@
-
-/*
- * bltUnixPipe.c --
- *
- * This module implements the former Tcl_CreatePipeline API. This file
- * contains the generic portion of the command channel driver as well
- * as various utility routines used in managing subprocesses.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from tclPipe.c and tclUnixPipe.c of the Tcl
- * distribution.
- *
- *	Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#include "bltInt.h"
-#include <fcntl.h>
-#include <signal.h>
-
-#include "bltWait.h"
-
-typedef int Tcl_File;
-
-static int
-GetFdFromChannel(Tcl_Channel channel, int direction)
-{
-    long f;
-    ClientData clientData;
-	    
-    if (Tcl_GetChannelHandle(channel, direction, &clientData) != TCL_OK) {
-	return -1;
-    }
-    f = (long)clientData;
-    return (int)f;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpenFile --
- *
- *	Open a file for use in a pipeline.
- *
- * Results:
- *	Returns a new TclFile handle or NULL on failure.
- *
- * Side effects:
- *	May cause a file to be created on the file system.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-OpenFile(
-    char *fname,		/* The name of the file to open. */
-    int mode)			/* In what mode to open the file? */
-{
-    int fd;
-
-    fd = open(fname, mode, 0666);
-    if (fd != -1) {
-	fcntl(fd, F_SETFD, FD_CLOEXEC);
-
-	/*
-	 * If the file is being opened for writing, seek to the end
-	 * so we can append to any data already in the file.
-	 */
-
-	if (mode & O_WRONLY) {
-	    lseek(fd, 0, SEEK_END);
-	}
-	return fd;
-    }
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTempFile --
- *
- *	This function creates a temporary file initialized with an
- *	optional string, and returns a file handle with the file pointer
- *	at the beginning of the file.
- *
- * Results:
- *	A handle to a file.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-CreateTempFile(char *contents)	/* String to write into temp file, or NULL. */
-{
-    char fileName[L_tmpnam];
-    int fd;
-    size_t length = (contents == NULL) ? 0 : strlen(contents);
-
-    if (mkstemp(fileName) < 0) {
-	panic("can't create temp file");
-    }
-    fd = OpenFile(fileName, O_RDWR | O_CREAT | O_TRUNC);
-    unlink(fileName);
-
-    if ((fd >= 0) && (length > 0)) {
-	for (;;) {
-	    if (write(fd, contents, length) != -1) {
-		break;
-	    } else if (errno != EINTR) {
-		close(fd);
-		return -1;
-	    }
-	}
-	lseek(fd, 0, SEEK_SET);
-    }
-    return fd;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreatePipe --
- *
- *      Creates a pipe by simply calling the pipe() function.  
- *
- * Results:
- *      Returns 1 on success, 0 on failure.
- *
- * Side effects:
- *      Creates a pipe.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-CreatePipe(
-    int *inPtr,				/* (out) Descriptor for read side of
-					 * pipe. */
-    int *outPtr)			/* (out) Descriptor for write side of
-					 * pipe. */
-{
-    int fd[2];
-
-    if (pipe(fd) != 0) {
-	return 0;
-    }
-    fcntl(fd[0], F_SETFD, FD_CLOEXEC);
-    fcntl(fd[1], F_SETFD, FD_CLOEXEC);
-
-    *inPtr = fd[0];
-    *outPtr = fd[1];
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CloseFile --
- *
- *	Implements a mechanism to close a UNIX file.
- *
- * Results:
- *	Returns 0 on success, or -1 on error, setting errno.
- *
- * Side effects:
- *	The file is closed.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-CloseFile(int fd)			/* File descriptor to be closed. */
-{
-    if ((fd == 0) || (fd == 1) || (fd == 2)) {
-	return 0;			/* Don't close stdin, stdout or
-					 * stderr. */
-    }
-    Tcl_DeleteFileHandler(fd);
-    return close(fd);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RestoreSignals --
- *
- *      This procedure is invoked in a forked child process just before
- *      exec-ing a new program to restore all signals to their default
- *      settings.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      Signal settings get changed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-RestoreSignals(void)
-{
-#ifdef SIGABRT
-    signal(SIGABRT, SIG_DFL);
-#endif
-#ifdef SIGALRM
-    signal(SIGALRM, SIG_DFL);
-#endif
-#ifdef SIGFPE
-    signal(SIGFPE, SIG_DFL);
-#endif
-#ifdef SIGHUP
-    signal(SIGHUP, SIG_DFL);
-#endif
-#ifdef SIGILL
-    signal(SIGILL, SIG_DFL);
-#endif
-#ifdef SIGINT
-    signal(SIGINT, SIG_DFL);
-#endif
-#ifdef SIGPIPE
-    signal(SIGPIPE, SIG_DFL);
-#endif
-#ifdef SIGQUIT
-    signal(SIGQUIT, SIG_DFL);
-#endif
-#ifdef SIGSEGV
-    signal(SIGSEGV, SIG_DFL);
-#endif
-#ifdef SIGTERM
-    signal(SIGTERM, SIG_DFL);
-#endif
-#ifdef SIGUSR1
-    signal(SIGUSR1, SIG_DFL);
-#endif
-#ifdef SIGUSR2
-    signal(SIGUSR2, SIG_DFL);
-#endif
-#ifdef SIGCHLD
-    signal(SIGCHLD, SIG_DFL);
-#endif
-#ifdef SIGCONT
-    signal(SIGCONT, SIG_DFL);
-#endif
-#ifdef SIGTSTP
-    signal(SIGTSTP, SIG_DFL);
-#endif
-#ifdef SIGTTIN
-    signal(SIGTTIN, SIG_DFL);
-#endif
-#ifdef SIGTTOU
-    signal(SIGTTOU, SIG_DFL);
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetupStdFile --
- *
- *	Set up stdio file handles for the child process, using the
- *	current standard channels if no other files are specified.
- *	If no standard channel is defined, or if no file is associated
- *	with the channel, then the corresponding standard fd is closed.
- *
- * Results:
- *	Returns 1 on success, or 0 on failure.
- *
- * Side effects:
- *	Replaces stdio fds.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-SetupStdFile(
-    int fd,				/* File descriptor to dup, or -1. */
-    int type)				/* One of TCL_STDIN, TCL_STDOUT,
-					 * TCL_STDERR */
-{
-    int targetFd = 0;			/* Initializations here needed only
-					 * to */
-    int direction = 0;			/* Prevent warnings about using
-					 * uninitialized variables. */
-    switch (type) {
-    case TCL_STDIN:
-	targetFd = 0;
-	direction = TCL_READABLE;
-	break;
-    case TCL_STDOUT:
-	targetFd = 1;
-	direction = TCL_WRITABLE;
-	break;
-    case TCL_STDERR:
-	targetFd = 2;
-	direction = TCL_WRITABLE;
-	break;
-    }
-    if (fd < 0) {
-	Tcl_Channel channel;
-
-	channel = Tcl_GetStdChannel(type);
-	if (channel) {
-	    fd = GetFdFromChannel(channel, direction);
-	}
-    }
-    if (fd >= 0) {
-	if (fd != targetFd) {
-	    if (dup2(fd, targetFd) == -1) {
-		return 0;
-	    }
-	    /*
-             * Must clear the close-on-exec flag for the target FD, since some
-             * systems (e.g. Ultrix) do not clear the CLOEXEC flag on the
-             * target FD.
-             */
-
-	    fcntl(targetFd, F_SETFD, 0);
-	} else {
-	    /*
-	     * Since we aren't dup'ing the file, we need to explicitly clear
-	     * the close-on-exec flag.
-	     */
-	    fcntl(fd, F_SETFD, 0);
-	}
-    } else {
-	close(targetFd);
-    }
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateProcess --
- *
- *	Create a child process that has the specified files as its standard
- *	input, output, and error.  The child process runs asynchronously and
- *	runs with the same environment variables as the creating process.
- *
- *	The path is searched to find the specified executable.
- *
- * Results:
- *	The return value is TCL_ERROR and an error message is left in
- *	interp->result if there was a problem creating the child process.
- *	Otherwise, the return value is TCL_OK and *pidPtr is filled with the
- *	process id of the child process.
- *
- * Side effects:
- *	A process is created.
- *
- *---------------------------------------------------------------------------
- */
-
-/* ARGSUSED */
-static int
-CreateProcess(
-    Tcl_Interp *interp,		/* Interpreter in which to leave errors that
-				 * occurred when creating the child process.
-				 * Error messages from the child process
-				 * itself are sent to stderrFd. */
-    int argc,			/* Number of arguments in following array. */
-    char **argv,		/* Array of argument strings.  argv[0]
-				 * contains the name of the executable
-				 * converted to native format (using the
-				 * Tcl_TranslateFileName call).  Additional
-				 * arguments have not been converted. */
-    int stdinFd,		/* The file to use as input for the child
-				 * process.  If stdinFd file is -1, input is
-				 * read from the standard input channel. If
-				 * the file isn't readable, the child will
-				 * receive no standard input. */
-    int stdoutFd,		/* The file that receives output from the
-				 * child process.  If stdoutFd is -1, output
-				 * is sent to the standard output channel.  If
-				 * the file is not writeable, output from the
-				 * child will be discarded. */
-    int stderrFd,		/* The file that receives errors from the
-				 * child process.  If stderrFd file is -1,
-				 * errors will be sent to the standard error
-				 * channel. If the file isn't writeable,
-				 * errors from the child will be discarded.
-				 * stderrFd may be the same as stdoutFd. */
-    int *pidPtr)		/* (out) If this procedure is successful,
-				 * pidPtr is filled with the process id of the
-				 * child process. */
-{
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    Tcl_DString *dsArr;
-    Tcl_Encoding encoding;
-#endif
-    char errSpace[200];
-    int errPipeIn, errPipeOut;
-    int i;
-    int joinThisError, status, fd;
-    long pid;
-    size_t count;
-
-    errPipeIn = errPipeOut = -1;
-    pid = -1;
-
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    dsArr = Blt_AssertMalloc(argc * sizeof(Tcl_DString));
-    encoding = Tcl_GetEncoding(interp, NULL);
-    for(i = 0; i < argc; i++) {
-	argv[i] = Tcl_UtfToExternalDString(encoding, argv[i], 
-		strlen(argv[i]), dsArr + i);
-    }
-#endif
-    /*
-     * Create a pipe that the child can use to return error information if
-     * anything goes wrong.
-     */
-    if (CreatePipe(&errPipeIn, &errPipeOut) == 0) {
-	Tcl_AppendResult(interp, "can't create pipe: ",
-	    Tcl_PosixError(interp), (char *)NULL);
-	goto error;
-    }
-    joinThisError = (stderrFd == stdoutFd);
-    pid = fork();
-    if (pid == 0) {
-	ssize_t nWritten;
-
-	fd = errPipeOut;
-
-	/*
-	 * Set up stdio file handles for the child process.
-	 */
-
-	if (!SetupStdFile(stdinFd, TCL_STDIN) ||
-	    !SetupStdFile(stdoutFd, TCL_STDOUT) ||
-	    (!joinThisError && !SetupStdFile(stderrFd, TCL_STDERR)) ||
-	    (joinThisError &&
-		((dup2(1, 2) == -1) || (fcntl(2, F_SETFD, 0) != 0)))) {
-	    sprintf_s(errSpace, 200, 
-		"%dforked process can't set up input/output: ", errno);
-	    nWritten = write(fd, errSpace, (size_t) strlen(errSpace));
-	    _exit(1);
-	}
-	/*
-	 * Close the input side of the error pipe.
-	 */
-	RestoreSignals();
-	fprintf(stderr, "pid=%d, getpgrp=%d\n", getpid(), getpgrp());
-	execvp(argv[0], &argv[0]);
-	sprintf_s(errSpace, 200, "%dcan't execute \"%.150s\": ", errno, argv[0]);
- 	nWritten = write(fd, errSpace, (size_t) strlen(errSpace));
-	_exit(1);
-    }
-    if (pid == -1) {
-	Tcl_AppendResult(interp, "can't fork child process: ",
-	    Tcl_PosixError(interp), (char *)NULL);
-	goto error;
-    }
-
-    /*
-     * Read back from the error pipe to see if the child started up OK.  The
-     * info in the pipe (if any) consists of a decimal errno value followed by
-     * an error message.
-     */
-    CloseFile(errPipeOut);
-    errPipeOut = -1;
-
-    fd = errPipeIn;
-    count = read(fd, errSpace, (size_t) (sizeof(errSpace) - 1));
-    if (count > 0) {
-	char *end;
-
-	errSpace[count] = 0;
-	errno = strtol(errSpace, &end, 10);
-	Tcl_AppendResult(interp, end, Tcl_PosixError(interp), (char *)NULL);
-	goto error;
-    }
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    for(i = 0; i < argc; i++) {
-	Tcl_DStringFree(dsArr + i);
-    }
-    Blt_Free(dsArr);
-#endif
-    CloseFile(errPipeIn);
-    *pidPtr = pid;
-    return TCL_OK;
-
-  error:
-    if (pid != -1) {
-	/*
-	 * Reap the child process now if an error occurred during its startup.
-	 */
-	Tcl_WaitPid((Tcl_Pid)pid, &status, WNOHANG);
-    }
-    if (errPipeIn >= 0) {
-	CloseFile(errPipeIn);
-    }
-    if (errPipeOut >= 0) {
-	CloseFile(errPipeOut);
-    }
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    for(i = 0; i < argc; i++) {
-	Tcl_DStringFree(dsArr + i);
-    }
-    Blt_Free(dsArr);
-#endif
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FileForRedirect --
- *
- *	This procedure does much of the work of parsing redirection operators.
- *	It handles "@" if specified and allowed, and a file name, and opens
- *	the file if necessary.
- *
- * Results:
- *	The return value is the descriptor number for the file.  If an error
- *	occurs then NULL is returned and an error message is left in
- *	interp->result.  Several arguments are side-effected; see the argument
- *	list below for details.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-FileForRedirect(
-    Tcl_Interp *interp,		/* Intepreter to use for error reporting. */
-    char *spec,			/* Points to character just after redirection
-				 * character. */
-    char *arg,			/* Pointer to entire argument containing spec:
-				 * used for error reporting. */
-    int atOK,			/* Non-zero means that '@' notation can be
-				 * used to specify a channel, zero means that
-				 * it isn't. */
-    char *nextArg,		/* Next argument in argc/argv array, if needed
-				 * for file name or channel name.  May be
-				 * NULL. */
-    int flags,			/* Flags to use for opening file or to specify
-				 * mode for channel. */
-    int *skipPtr,		/* (out) Filled with 1 if redirection target
-				 * was in spec, 2 if it was in nextArg. */
-    int *closePtr)		/* (out) Filled with one if the caller should
-				 * close the file when done with it, zero
-				 * otherwise. */
-{
-    int writing = (flags & O_WRONLY);
-    int fd;
-
-    *skipPtr = 1;
-    if ((atOK != 0) && (*spec == '@')) {
-	int direction;
-	Tcl_Channel chan;
-
-	spec++;
-	if (*spec == '\0') {
-	    spec = nextArg;
-	    if (spec == NULL) {
-		goto badLastArg;
-	    }
-	    *skipPtr = 2;
-	}
-	chan = Tcl_GetChannel(interp, spec, NULL);
-	if (chan == NULL) {
-	    return -1;
-	}
-	direction = (writing) ? TCL_WRITABLE : TCL_READABLE;
-	fd = GetFdFromChannel(chan, direction);
-	if (fd < 0) {
-	    Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan),
-		"\" wasn't opened for ",
-		((writing) ? "writing" : "reading"), (char *)NULL);
-	    return -1;
-	}
-	if (writing) {
-	    /*
-	     * Be sure to flush output to the file, so that anything
-	     * written by the child appears after stuff we've already
-	     * written.
-	     */
-	    Tcl_Flush(chan);
-	}
-    } else {
-	char *name;
-	Tcl_DString nameString;
-
-	if (*spec == '\0') {
-	    spec = nextArg;
-	    if (spec == NULL) {
-		goto badLastArg;
-	    }
-	    *skipPtr = 2;
-	}
-	name = Tcl_TranslateFileName(interp, spec, &nameString);
-
-	if (name != NULL) {
-	    fd = OpenFile(name, flags);
-	} else {
-	    fd = -1;
-	}
-	Tcl_DStringFree(&nameString);
-	if (fd < 0) {
-	    Tcl_AppendResult(interp, "can't ",
-		((writing) ? "write" : "read"), " file \"", spec, "\": ",
-		Tcl_PosixError(interp), (char *)NULL);
-	    return -1;
-	}
-	*closePtr = TRUE;
-    }
-    return fd;
-
-  badLastArg:
-    Tcl_AppendResult(interp, "can't specify \"", arg,
-	"\" as last word in command", (char *)NULL);
-    return -1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreatePipeline --
- *
- *	Given an objc/objv array, instantiate a pipeline of processes as
- *	described by the objv.
- *
- * Results:
- *	The return value is a count of the number of new processes created, or
- *	-1 if an error occurred while creating the pipeline.  *pidArrayPtr is
- *	filled in with the address of a dynamically allocated array giving the
- *	ids of all of the processes.
- *
- *	It is up to the caller to free this array when it isn't needed
- *	anymore.
- *
- *	If stdinPipePtr isn't NULL, then *stdinPipePtr is filled with the file
- *	id for the input pipe for the pipeline (if any): the caller must
- *	eventually close this file.
- *
- *	If stdoutPipePtr isn't NULL, then *stdoutPipePtr is filled with the
- *	file id for the output pipe from the pipeline: the caller must close
- *	this file.
- *
- *	If stderrPipePtr isn't NULL, then *stderrPipePtr is filled with a file
- *	id that may be used to read error output after the pipeline completes.
- *
- * Side effects:
- *	Processes and pipes are created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CreatePipeline(
-    Tcl_Interp *interp,		/* Interpreter to use for error reporting. */
-    int objc,			/* Number of entries in objv. */
-    Tcl_Obj *const *objv,	/* Array of strings describing commands in
-				 * pipeline plus I/O redirection with <, <<,
-				 * >, etc.  Objv[objc] must be NULL. */
-    ProcessId **pidArrayPtr,	/* (out) Word at *pidArrayPtr gets filled in
-				 * with address of array of pids for processes
-				 * in pipeline (first pid is first process in
-				 * pipeline). */
-    int *stdinPipePtr,		/* (out) If non-NULL, input to the pipeline
-				 * comes from a pipe (unless overridden by
-				 * redirection in the command).  The file id
-				 * with which to write to this pipe is stored
-				 * at *stdinPipePtr.  NULL means command
-				 * specified its own input source. */
-    int *stdoutPipePtr,		/* (out) If non-NULL, output to the pipeline
-				 * goes to a pipe, unless overriden by
-				 * redirection in the command.  The file id
-				 * with which to read frome this pipe is
-				 * stored at *stdoutPipePtr.  NULL means
-				 * command specified its own output sink. */
-    int *stderrPipePtr)		/* (out) If non-NULL, all stderr output from
-				 * the pipeline will go to a temporary file
-				 * created here, and a descriptor to read the
-				 * file will be left at *stderrPipePtr.  The
-				 * file will be removed already, so closing
-				 * this descriptor will be the end of the
-				 * file.  If this is NULL, then all stderr
-				 * output goes to our stderr.  If the pipeline
-				 * specifies redirection then the file will
-				 * still be created but it will never get any
-				 * data. */
-{
-    int *pids = NULL;		/* Points to malloc-ed array holding all the
-				 * pids of child processes. */
-    int nPids;			/* Actual number of processes that exist at
-				 * *pids right now. */
-    int cmdCount;		/* Count of number of distinct commands found
-				 * in objc/objv. */
-    char *inputLiteral = NULL;	/* If non-null, then this points to a string
-				 * containing input data (specified via <<) to
-				 * be piped to the first process in the
-				 * pipeline. */
-    int stdinFd;		/* If != NULL, gives file to use as input for
-				 * first process in pipeline (specified via <
-				 * or <@). */
-    int stdoutFd;		/* Writable file for output from last command
-				 * in pipeline (could be file or pipe).  NULL
-				 * means use stdout. */
-    int stderrFd;		/* Writable file for error output from all
-				 * commands in pipeline.  NULL means use
-				 * stderr. */
-    int stdinIsOpen;		/* If non-zero, then stdinFd should be closed
-    				 * when cleaning up. */
-    int stdoutIsOpen;		/* If non-zero, then stdoutFd should be closed
-    				 * when cleaning up. */
-    int stderrIsOpen;		/* If non-zero, then stderrFd should be closed
-    				 * when cleaning up. */
-    char *p;
-    int skip, lastBar, lastArg, i, j, atOK, flags, errorToOutput;
-    Tcl_DString execBuffer;
-    int pipeIn;
-    int stdinCurrFd, stdoutCurrFd, stderrCurrFd;
-    char **argv;
-
-    stdinFd = stdoutFd = stderrFd = -1;
-    stdinIsOpen = stdoutIsOpen = stderrIsOpen = FALSE;
-    if (stdinPipePtr != NULL) {
-	*stdinPipePtr = -1;
-    }
-    if (stdoutPipePtr != NULL) {
-	*stdoutPipePtr = -1;
-    }
-    if (stderrPipePtr != NULL) {
-	*stderrPipePtr = -1;
-    }
-    Tcl_DStringInit(&execBuffer);
-
-    pipeIn = stdinCurrFd = stdoutCurrFd = -1;
-    nPids = 0;
-
-    /*
-     * First, scan through all the arguments to figure out the structure of
-     * the pipeline.  Process all of the input and output redirection
-     * arguments and remove them from the argument list in the pipeline.
-     * Count the number of distinct processes (it's the number of "|"
-     * arguments plus one) but don't remove the "|" arguments because they'll
-     * be used in the second pass to seperate the individual child processes.
-     *
-     * Cannot start the child processes in this pass because the redirection
-     * symbols may appear anywhere in the command line -- e.g., the '<' that
-     * specifies the input to the entire pipe may appear at the very end of
-     * the argument list.
-     */
-
-    /* Convert all the Tcl_Objs to strings. */
-    argv = Blt_AssertMalloc((objc + 1) *  sizeof(char *));
-    for (i = 0; i < objc; i++) {
-	argv[i] = Tcl_GetString(objv[i]);
-    }
-    argv[i] = NULL;
-
-    lastBar = -1;
-    cmdCount = 1;
-    for (i = 0; i < objc; i++) {
-	skip = 0;
-	p = argv[i];
-	switch (*p++) {
-	case '\\':
-	    p++;
-	    continue;
-
-	case '|':
-	    if (*p == '&') {
-		p++;
-	    }
-	    if (*p == '\0') {
-		if ((i == (lastBar + 1)) || (i == (objc - 1))) {
-		    Tcl_AppendResult(interp, 
-			"illegal use of | or |& in command", (char *)NULL);
-		    goto error;
-		}
-	    }
-	    lastBar = i;
-	    cmdCount++;
-	    break;
-
-	case '<':
-	    if (stdinIsOpen != 0) {
-		stdinIsOpen = FALSE;
-		CloseFile(stdinFd);
-	    }
-	    if (*p == '<') {
-		stdinFd = -1;
-		inputLiteral = p + 1;
-		skip = 1;
-		if (*inputLiteral == '\0') {
-		    inputLiteral = argv[i + 1];
-		    if (inputLiteral == NULL) {
-			Tcl_AppendResult(interp, "can't specify \"", argv[i], 
-				"\" as last word in command", (char *)NULL);
-			goto error;
-		    }
-		    skip = 2;
-		}
-	    } else {
-		inputLiteral = NULL;
-		stdinFd = FileForRedirect(interp, p, argv[i], TRUE, argv[i + 1],
-			O_RDONLY, &skip, &stdinIsOpen);
-		if (stdinFd < 0) {
-		    goto error;
-		}
-	    }
-	    break;
-
-	case '>':
-	    atOK = TRUE;
-	    flags = O_WRONLY | O_CREAT | O_TRUNC;
-	    errorToOutput = FALSE;
-	    if (*p == '>') {
-		p++;
-		atOK = FALSE;
-		flags = O_WRONLY | O_CREAT;
-	    }
-	    if (*p == '&') {
-		if (stderrIsOpen != 0) {
-		    stderrIsOpen = FALSE;
-		    CloseFile(stderrFd);
-		}
-		errorToOutput = TRUE;
-		p++;
-	    }
-	    if (stdoutIsOpen != 0) {
-		stdoutIsOpen = FALSE;
-		CloseFile(stdoutFd);
-	    }
-	    stdoutFd = FileForRedirect(interp, p, argv[i], atOK, argv[i + 1], 
-		flags, &skip, &stdoutIsOpen);
-	    if (stdoutFd < 0) {
-		goto error;
-	    }
-	    if (errorToOutput) {
-		stderrIsOpen = FALSE;
-		stderrFd = stdoutFd;
-	    }
-	    break;
-
-	case '2':
-	    if (*p != '>') {
-		break;
-	    }
-	    p++;
-	    atOK = TRUE;
-	    flags = O_WRONLY | O_CREAT | O_TRUNC;
-	    if (*p == '>') {
-		p++;
-		atOK = FALSE;
-		flags = O_WRONLY | O_CREAT;
-	    }
-	    if (stderrIsOpen != 0) {
-		stderrIsOpen = FALSE;
-		CloseFile(stderrFd);
-	    }
-	    stderrFd = FileForRedirect(interp, p, argv[i], atOK, argv[i + 1], 
-		flags, &skip, &stderrIsOpen);
-	    if (stderrFd < 0) {
-		goto error;
-	    }
-	    break;
-	}
-
-	if (skip != 0) {
-	    for (j = i + skip; j < objc; j++) {
-		argv[j - skip] = argv[j];
-	    }
-	    objc -= skip;
-	    i -= 1;
-	}
-    }
-
-    if (stdinFd == -1) {
-	if (inputLiteral != NULL) {
-	    /*
-	     * The input for the first process is immediate data coming from
-	     * Tcl.  Create a temporary file for it and put the data into the
-	     * file.
-	     */
-	    stdinFd = CreateTempFile(inputLiteral);
-	    if (stdinFd < 0) {
-		Tcl_AppendResult(interp,
-		    "can't create input file for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    stdinIsOpen = TRUE;
-	} else if (stdinPipePtr != NULL) {
-	    /*
-	     * The input for the first process in the pipeline is to come from
-	     * a pipe that can be written from by the caller.
-	     */
-
-	    if (CreatePipe(&stdinFd, stdinPipePtr) == 0) {
-		Tcl_AppendResult(interp,
-		    "can't create input pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    stdinIsOpen = TRUE;
-	} else {
-	    /*
-	     * The input for the first process comes from stdin.
-	     */
-	    stdinFd = 0;
-	}
-    }
-    if (stdoutFd == -1) {
-	if (stdoutPipePtr != NULL) {
-	    /*
-	     * Output from the last process in the pipeline is to go to a pipe
-	     * that can be read by the caller.
-	     */
-
-	    if (CreatePipe(stdoutPipePtr, &stdoutFd) == 0) {
-		Tcl_AppendResult(interp,
-		    "can't create output pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    stdoutIsOpen = TRUE;
-	} else {
-	    /*
-	     * The output for the last process goes to stdout.
-	     */
-	    stdoutFd = 1;
-	}
-    }
-    if (stderrFd == -1) {
-	if (stderrPipePtr != NULL) {
-	    /*
-	     * Stderr from the last process in the pipeline is to go to a pipe
-	     * that can be read by the caller.
-	     */
-	    if (CreatePipe(stderrPipePtr, &stderrFd) == 0) {
-		Tcl_AppendResult(interp,
-		    "can't create error pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    stderrIsOpen = TRUE;
-	} else {
-	    /*
-	     * Errors from the pipeline go to stderr.
-	     */
-	    stderrFd = 2;
-	}
-    }
-    /*
-     * Scan through the objc array, creating a process for each group of
-     * arguments between the "|" characters.
-     */
-
-    Tcl_ReapDetachedProcs();
-    pids = Blt_AssertMalloc(cmdCount * sizeof(int));
-    stdinCurrFd = stdinFd;
-
-    lastArg = 0;		/* Suppress compiler warning */
-    for (i = 0; i < objc; i = lastArg + 1) {
-	int joinThisError;
-	int pid;
-
-	/*
-	 * Convert the program name into native form.
-	 */
-
-	argv[i] = Tcl_TranslateFileName(interp, argv[i], &execBuffer);
-	if (argv[i] == NULL) {
-	    goto error;
-	}
-	/*
-	 * Find the end of the current segment of the pipeline.
-	 */
-	joinThisError = 0;
-	for (lastArg = i + 1; lastArg < objc; lastArg++) {
-	    if (argv[lastArg][0] == '|') {
-		if (argv[lastArg][1] == '\0') {
-		    break;
-		}
-		if ((argv[lastArg][1] == '&') && (argv[lastArg][2] == '\0')) {
-		    joinThisError = 1;
-		    break;
-		}
-	    }
-	}
-	argv[lastArg] = NULL;
-
-	/*
-	 * If this is the last segment, use the specified stdoutFd.  Otherwise
-	 * create an intermediate pipe.  pipeIn will become the curInFile for
-	 * the next segment of the pipe.
-	 */
-
-	if (lastArg == objc) {
-	    stdoutCurrFd = stdoutFd;
-	} else {
-	    if (CreatePipe(&pipeIn, &stdoutCurrFd) == 0) {
-		Tcl_AppendResult(interp, "can't create pipe: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	}
-
-	if (joinThisError != 0) {
-	    stderrCurrFd = stdoutCurrFd;
-	} else {
-	    stderrCurrFd = stderrFd;
-	}
-
-	if (CreateProcess(interp, lastArg - i, argv + i, stdinCurrFd, 
-		stdoutCurrFd, stderrCurrFd, &pid) != TCL_OK) {
-	    goto error;
-	}
-	Tcl_DStringFree(&execBuffer);
-
-	pids[nPids] = pid;
-	nPids++;
-
-
-	/*
-	 * Close off our copies of file descriptors that were set up for this
-	 * child, then set up the input for the next child.
-	 */
-
-	if ((stdinCurrFd >= 0) && (stdinCurrFd != stdinFd)) {
-	    CloseFile(stdinCurrFd);
-	}
-	stdinCurrFd = pipeIn;
-	pipeIn = -1;
-
-	if ((stdoutCurrFd >= 0) && (stdoutCurrFd != stdoutFd)) {
-	    CloseFile(stdoutCurrFd);
-	}
-	stdoutCurrFd = -1;
-    }
-
-    *pidArrayPtr = pids;
-
-    /*
-     * All done.  Cleanup open files lying around and then return.
-     */
-
-  cleanup:
-    Tcl_DStringFree(&execBuffer);
-
-    if (stdinIsOpen) {
-	CloseFile(stdinFd);
-    }
-    if (stdoutIsOpen) {
-	CloseFile(stdoutFd);
-    }
-    if (stderrIsOpen) {
-	CloseFile(stderrFd);
-    }
-    if (argv != NULL) {
-	Blt_Free(argv);
-    }
-    return nPids;
-
-    /*
-     * An error occurred.  There could have been extra files open, such as
-     * pipes between children.  Clean them all up.  Detach any child processes
-     * that have been created.
-     */
-
-  error:
-    if (pipeIn >= 0) {
-	CloseFile(pipeIn);
-    }
-    if ((stdoutCurrFd >= 0) && (stdoutCurrFd != stdoutFd)) {
-	CloseFile(stdoutCurrFd);
-    }
-    if ((stdinCurrFd >= 0) && (stdinCurrFd != stdinFd)) {
-	CloseFile(stdinCurrFd);
-    }
-    if ((stdinPipePtr != NULL) && (*stdinPipePtr >= 0)) {
-	CloseFile(*stdinPipePtr);
-	*stdinPipePtr = -1;
-    }
-    if ((stdoutPipePtr != NULL) && (*stdoutPipePtr >= 0)) {
-	CloseFile(*stdoutPipePtr);
-	*stdoutPipePtr = -1;
-    }
-    if ((stderrPipePtr != NULL) && (*stderrPipePtr >= 0)) {
-	CloseFile(*stderrPipePtr);
-	*stderrPipePtr = -1;
-    }
-    if (pids != NULL) {
-	for (i = 0; i < nPids; i++) {
-	    if (pids[i] != -1) {
-		Tcl_DetachPids(1, (Tcl_Pid *)(pids + i));
-	    }
-	}
-	Blt_Free(pids);
-    }
-    nPids = -1;
-    goto cleanup;
-}
diff --git a/blt3.0/src/bltUnixWindow.c b/blt3.0/src/bltUnixWindow.c
deleted file mode 100644
index a7a0ebf..0000000
--- a/blt3.0/src/bltUnixWindow.c
+++ /dev/null
@@ -1,480 +0,0 @@
-
-/*
- * bltUnixWindow.c --
- *
- * This module implements additional window functionality for the BLT
- * toolkit, such as transparent Tk windows, and reparenting Tk
- * windows.
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#include <X11/Xlib.h>
-#ifndef WIN32
-#include <X11/Xproto.h>
-#endif
-#include "tkDisplay.h"
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoConfigureNotify --
- *
- *	Generate a ConfigureNotify event describing the current
- *	configuration of a window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	An event is generated and processed by Tk_HandleEvent.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DoConfigureNotify(Tk_FakeWin *winPtr)
-{
-    XEvent event;
-
-    event.type = ConfigureNotify;
-    event.xconfigure.serial = LastKnownRequestProcessed(winPtr->display);
-    event.xconfigure.send_event = False;
-    event.xconfigure.display = winPtr->display;
-    event.xconfigure.event = winPtr->window;
-    event.xconfigure.window = winPtr->window;
-    event.xconfigure.x = winPtr->changes.x;
-    event.xconfigure.y = winPtr->changes.y;
-    event.xconfigure.width = winPtr->changes.width;
-    event.xconfigure.height = winPtr->changes.height;
-    event.xconfigure.border_width = winPtr->changes.border_width;
-    if (winPtr->changes.stack_mode == Above) {
-	event.xconfigure.above = winPtr->changes.sibling;
-    } else {
-	event.xconfigure.above = None;
-    }
-    event.xconfigure.override_redirect = winPtr->atts.override_redirect;
-    Tk_HandleEvent(&event);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MakeTransparentWindowExist --
- *
- *	Similar to Tk_MakeWindowExist but instead creates a
- *	transparent window to block for user events from sibling
- *	windows.
- *
- *	Differences from Tk_MakeWindowExist.
- *
- *	1. This is always a "busy" window. There's never a
- *	   platform-specific class procedure to execute instead.
- *	2. The window is transparent and never will contain children,
- *	   so colormap information is irrelevant.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the procedure returns, the internal window associated
- *	with tkwin is guaranteed to exist.  This may require the
- *	window's ancestors to be created too.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MakeTransparentWindowExist(Tk_Window tkwin, Window parent, int isBusy)
-{
-    TkWindow *winPtr = (TkWindow *) tkwin;
-    TkWindow *winPtr2;
-    Tcl_HashEntry *hPtr;
-    int notUsed;
-    TkDisplay *dispPtr;
-    long int mask;
-
-    if (winPtr->window != None) {
-	return;			/* Window already exists. */
-    }
-
-    /* Create a transparent window and put it on top.  */
-
-    mask = (!isBusy) ? 0 : (CWDontPropagate | CWEventMask);
-    /* Ignore the important events while the window is mapped.  */
-#define USER_EVENTS  (EnterWindowMask | LeaveWindowMask | KeyPressMask | \
-	KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \
-	PointerMotionMask)
-#define PROP_EVENTS  (KeyPressMask | KeyReleaseMask | ButtonPressMask | \
-	ButtonReleaseMask | PointerMotionMask)
-
-    winPtr->atts.do_not_propagate_mask = PROP_EVENTS;
-    winPtr->atts.event_mask = USER_EVENTS;
-    winPtr->changes.border_width = 0;
-    winPtr->depth = 0; 
-
-    winPtr->window = XCreateWindow(winPtr->display, parent,
-	winPtr->changes.x, winPtr->changes.y,
-	(unsigned)winPtr->changes.width,	/* width */
-	(unsigned)winPtr->changes.height,	/* height */
-	(unsigned)winPtr->changes.border_width,	/* border_width */
-	winPtr->depth,		/* depth */
-	InputOnly,		/* class */
-	winPtr->visual,		/* visual */
-        mask,			/* valuemask */
-	&winPtr->atts		/* attributes */ );
-
-    dispPtr = winPtr->dispPtr;
-    hPtr = Tcl_CreateHashEntry(&dispPtr->winTable, (char *)winPtr->window,
-	&notUsed);
-    Tcl_SetHashValue(hPtr, winPtr);
-    winPtr->dirtyAtts = 0;
-    winPtr->dirtyChanges = 0;
-#ifdef TK_USE_INPUT_METHODS
-    winPtr->inputContext = NULL;
-#endif /* TK_USE_INPUT_METHODS */
-    if (!(winPtr->flags & TK_TOP_LEVEL)) {
-	/*
-	 * If any siblings higher up in the stacking order have already
-	 * been created then move this window to its rightful position
-	 * in the stacking order.
-	 *
-	 * NOTE: this code ignores any changes anyone might have made
-	 * to the sibling and stack_mode field of the window's attributes,
-	 * so it really isn't safe for these to be manipulated except
-	 * by calling Tk_RestackWindow.
-	 */
-	for (winPtr2 = winPtr->nextPtr; winPtr2 != NULL;
-	    winPtr2 = winPtr2->nextPtr) {
-	    if ((winPtr2->window != None) && !(winPtr2->flags & TK_TOP_LEVEL)) {
-		XWindowChanges changes;
-		changes.sibling = winPtr2->window;
-		changes.stack_mode = Below;
-		XConfigureWindow(winPtr->display, winPtr->window,
-		    CWSibling | CWStackMode, &changes);
-		break;
-	    }
-	}
-    }
-
-    /*
-     * Issue a ConfigureNotify event if there were deferred configuration
-     * changes (but skip it if the window is being deleted;  the
-     * ConfigureNotify event could cause problems if we're being called
-     * from Tk_DestroyWindow under some conditions).
-     */
-    if ((winPtr->flags & TK_NEED_CONFIG_NOTIFY)
-	&& !(winPtr->flags & TK_ALREADY_DEAD)) {
-	winPtr->flags &= ~TK_NEED_CONFIG_NOTIFY;
-	DoConfigureNotify((Tk_FakeWin *) tkwin);
-    }
-}
-
-Window
-Blt_GetParentWindow(Display *display, Window window)
-{
-    Window root, parent;
-    Window *dummy;
-    unsigned int count;
-
-    if (XQueryTree(display, window, &root, &parent, &dummy, &count) > 0) {
-	XFree(dummy);
-	return parent;
-    }
-    return None;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetWindowId --
- *
- *      Returns the XID for the Tk_Window given.  Starting in Tk 8.0,
- *      the toplevel widgets are wrapped by another window.  Currently
- *      there's no way to get at that window, other than what is done
- *      here: query the X window hierarchy and retrieve the parent.
- *
- * Results:
- *      Returns the X Window ID of the widget.  If it's a toplevel, then
- *	the XID of the wrapper is returned.
- *
- *---------------------------------------------------------------------------
- */
-Window
-Blt_GetWindowId(Tk_Window tkwin)
-{
-    Window window;
-
-    Tk_MakeWindowExist(tkwin);
-    window = Tk_WindowId(tkwin);
-    if (Tk_IsTopLevel(tkwin)) {
-	Window parent;
-
-	parent = Blt_GetParentWindow(Tk_Display(tkwin), window);
-	if (parent != None) {
-	    window = parent;
-	}
-	window = parent;
-    }
-    return window;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XGeometryErrorProc --
- *
- *	Flags errors generated from XGetGeometry calls to the X server.
- *
- * Results:
- *	Always returns 0.
- *
- * Side Effects:
- *	Sets a flag, indicating an error occurred.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static int
-XGeometryErrorProc(ClientData clientData, XErrorEvent *errEventPtr)
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = FALSE;
-    return 0;
-}
-
-int
-Blt_GetWindowRegion(
-    Display *display,
-    Window window,
-    int *xPtr, int *yPtr, 
-    int *widthPtr, int *heightPtr)
-{
-    Tk_ErrorHandler handler;
-    Window root;
-    int any = -1;
-    int result;
-    int x, y;
-    unsigned int width, height, borderWidth, depth;
-
-    handler = Tk_CreateErrorHandler(display, any, X_GetGeometry, any, 
-	XGeometryErrorProc, &result);
-    result = XGetGeometry(display, window, &root, &x, &y, &width, &height, 
-	&borderWidth, &depth);
-    Tk_DeleteErrorHandler(handler);
-    XSync(display, False);
-    if (!result) {
-	return TCL_ERROR;
-    }
-    if (xPtr != NULL) {
-	*xPtr = x;
-    }
-    if (yPtr != NULL) {
-	*yPtr = y;
-    }
-    if (widthPtr != NULL) {
-	*widthPtr = (int)width;
-    }
-    if (heightPtr != NULL) {
-	*heightPtr = (int)height;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RaiseToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RaiseToplevelWindow(Tk_Window tkwin)
-{
-    XRaiseWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_LowerToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_LowerToplevelWindow(Tk_Window tkwin)
-{
-    XLowerWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_ResizeToplevelWindow(Tk_Window tkwin, int width, int height)
-{
-    XResizeWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), width, height);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MoveResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MoveResizeToplevelWindow(Tk_Window tkwin, int x, int y, int w, int h)
-{
-    XMoveResizeWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), x, y, w, h);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MoveToplevelWindow(Tk_Window tkwin, int x, int y)
-{
-    XMoveWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin), x, y);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MapToplevelWindow(Tk_Window tkwin)
-{
-    XMapWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UnmapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UnmapToplevelWindow(Tk_Window tkwin)
-{
-    XUnmapWindow(Tk_Display(tkwin), Blt_GetWindowId(tkwin));
-}
-
-/* ARGSUSED */
-static int
-XReparentWindowErrorProc(ClientData clientData, XErrorEvent *errEventPtr)
-{
-    int *errorPtr = clientData;
-
-    *errorPtr = TCL_ERROR;
-    return 0;
-}
-
-int
-Blt_ReparentWindow(
-    Display *display,
-    Window window, 
-    Window newParent,
-    int x, int y)
-{
-    Tk_ErrorHandler handler;
-    int result;
-    int any = -1;
-
-    result = TCL_OK;
-    handler = Tk_CreateErrorHandler(display, any, X_ReparentWindow, any,
-	XReparentWindowErrorProc, &result);
-    XReparentWindow(display, window, newParent, x, y);
-    Tk_DeleteErrorHandler(handler);
-    XSync(display, False);
-    return result;
-}
-
-int
-Blt_GetWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Window *windowPtr)
-{
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '.') {
-	Tk_Window tkwin;
-
-	tkwin = Tk_NameToWindow(interp, string, Tk_MainWindow(interp));
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Tk_WindowId(tkwin) == None) {
-	    Tk_MakeWindowExist(tkwin);
-	}
-	*windowPtr = (Tk_IsTopLevel(tkwin)) ? Blt_GetWindowId(tkwin) : 
-	    Tk_WindowId(tkwin);
-    } else if (strcmp(string, "root") == 0) {
-	*windowPtr = Tk_RootWindow(Tk_MainWindow(interp));
-    } else {
-
-	int id;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &id) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	*windowPtr = (Window)id;
-    }
-    return TCL_OK;
-}
-
diff --git a/blt3.0/src/bltUtil.c b/blt3.0/src/bltUtil.c
deleted file mode 100644
index 1df929d..0000000
--- a/blt3.0/src/bltUtil.c
+++ /dev/null
@@ -1,1287 +0,0 @@
-
-/*
- * bltUtil.c --
- *
- * This module implements utility procedures for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include <stdarg.h>
-#include <bltHash.h>
-#include <bltDBuffer.h>
-
-#ifndef HAVE_STRTOLOWER
-void
-strtolower(char *s)
-{
-    while (*s != '\0') {
-	*s = tolower(UCHAR(*s));
-	s++;
-    }
-}
-#endif /* !HAVE_STRTOLOWER */
-
-#ifndef HAVE_STRCASECMP
-
-static unsigned char caseTable[] =
-{
-    (unsigned char)'\000', (unsigned char)'\001', 
-    (unsigned char)'\002', (unsigned char)'\003', 
-    (unsigned char)'\004', (unsigned char)'\005', 
-    (unsigned char)'\006', (unsigned char)'\007',
-    (unsigned char)'\010', (unsigned char)'\011', 
-    (unsigned char)'\012', (unsigned char)'\013', 
-    (unsigned char)'\014', (unsigned char)'\015', 
-    (unsigned char)'\016', (unsigned char)'\017',
-    (unsigned char)'\020', (unsigned char)'\021', 
-    (unsigned char)'\022', (unsigned char)'\023', 
-    (unsigned char)'\024', (unsigned char)'\025', 
-    (unsigned char)'\026', (unsigned char)'\027',
-    (unsigned char)'\030', (unsigned char)'\031', 
-    (unsigned char)'\032', (unsigned char)'\033', 
-    (unsigned char)'\034', (unsigned char)'\035', 
-    (unsigned char)'\036', (unsigned char)'\037',
-    (unsigned char)'\040', (unsigned char)'\041', 
-    (unsigned char)'\042', (unsigned char)'\043', 
-    (unsigned char)'\044', (unsigned char)'\045', 
-    (unsigned char)'\046', (unsigned char)'\047',
-    (unsigned char)'\050', (unsigned char)'\051', 
-    (unsigned char)'\052', (unsigned char)'\053', 
-    (unsigned char)'\054', (unsigned char)'\055', 
-    (unsigned char)'\056', (unsigned char)'\057',
-    (unsigned char)'\060', (unsigned char)'\061', 
-    (unsigned char)'\062', (unsigned char)'\063', 
-    (unsigned char)'\064', (unsigned char)'\065', 
-    (unsigned char)'\066', (unsigned char)'\067',
-    (unsigned char)'\070', (unsigned char)'\071', 
-    (unsigned char)'\072', (unsigned char)'\073', 
-    (unsigned char)'\074', (unsigned char)'\075', 
-    (unsigned char)'\076', (unsigned char)'\077',
-    (unsigned char)'\100', (unsigned char)'\141', 
-    (unsigned char)'\142', (unsigned char)'\143', 
-    (unsigned char)'\144', (unsigned char)'\145', 
-    (unsigned char)'\146', (unsigned char)'\147',
-    (unsigned char)'\150', (unsigned char)'\151', 
-    (unsigned char)'\152', (unsigned char)'\153', 
-    (unsigned char)'\154', (unsigned char)'\155', 
-    (unsigned char)'\156', (unsigned char)'\157',
-    (unsigned char)'\160', (unsigned char)'\161', 
-    (unsigned char)'\162', (unsigned char)'\163', 
-    (unsigned char)'\164', (unsigned char)'\165', 
-    (unsigned char)'\166', (unsigned char)'\167',
-    (unsigned char)'\170', (unsigned char)'\171', 
-    (unsigned char)'\172', (unsigned char)'\133', 
-    (unsigned char)'\134', (unsigned char)'\135', 
-    (unsigned char)'\136', (unsigned char)'\137',
-    (unsigned char)'\140', (unsigned char)'\141', 
-    (unsigned char)'\142', (unsigned char)'\143', 
-    (unsigned char)'\144', (unsigned char)'\145', 
-    (unsigned char)'\146', (unsigned char)'\147',
-    (unsigned char)'\150', (unsigned char)'\151', 
-    (unsigned char)'\152', (unsigned char)'\153', 
-    (unsigned char)'\154', (unsigned char)'\155', 
-    (unsigned char)'\156', (unsigned char)'\157',
-    (unsigned char)'\160', (unsigned char)'\161',
-    (unsigned char)'\162', (unsigned char)'\163', 
-    (unsigned char)'\164', (unsigned char)'\165', 
-    (unsigned char)'\166', (unsigned char)'\167',
-    (unsigned char)'\170', (unsigned char)'\171', 
-    (unsigned char)'\172', (unsigned char)'\173', 
-    (unsigned char)'\174', (unsigned char)'\175', 
-    (unsigned char)'\176', (unsigned char)'\177',
-    (unsigned char)'\200', (unsigned char)'\201', 
-    (unsigned char)'\202', (unsigned char)'\203', 
-    (unsigned char)'\204', (unsigned char)'\205', 
-    (unsigned char)'\206', (unsigned char)'\207',
-    (unsigned char)'\210', (unsigned char)'\211', 
-    (unsigned char)'\212', (unsigned char)'\213', 
-    (unsigned char)'\214', (unsigned char)'\215', 
-    (unsigned char)'\216', (unsigned char)'\217',
-    (unsigned char)'\220', (unsigned char)'\221', 
-    (unsigned char)'\222', (unsigned char)'\223', 
-    (unsigned char)'\224', (unsigned char)'\225', 
-    (unsigned char)'\226', (unsigned char)'\227',
-    (unsigned char)'\230', (unsigned char)'\231', 
-    (unsigned char)'\232', (unsigned char)'\233', 
-    (unsigned char)'\234', (unsigned char)'\235', 
-    (unsigned char)'\236', (unsigned char)'\237',
-    (unsigned char)'\240', (unsigned char)'\241', 
-    (unsigned char)'\242', (unsigned char)'\243', 
-    (unsigned char)'\244', (unsigned char)'\245', 
-    (unsigned char)'\246', (unsigned char)'\247',
-    (unsigned char)'\250', (unsigned char)'\251', 
-    (unsigned char)'\252', (unsigned char)'\253', 
-    (unsigned char)'\254', (unsigned char)'\255', 
-    (unsigned char)'\256', (unsigned char)'\257',
-    (unsigned char)'\260', (unsigned char)'\261', 
-    (unsigned char)'\262', (unsigned char)'\263', 
-    (unsigned char)'\264', (unsigned char)'\265', 
-    (unsigned char)'\266', (unsigned char)'\267',
-    (unsigned char)'\270', (unsigned char)'\271', 
-    (unsigned char)'\272', (unsigned char)'\273', 
-    (unsigned char)'\274', (unsigned char)'\275', 
-    (unsigned char)'\276', (unsigned char)'\277',
-    (unsigned char)'\300', (unsigned char)'\341', 
-    (unsigned char)'\342', (unsigned char)'\343', 
-    (unsigned char)'\344', (unsigned char)'\345', 
-    (unsigned char)'\346', (unsigned char)'\347',
-    (unsigned char)'\350', (unsigned char)'\351', 
-    (unsigned char)'\352', (unsigned char)'\353', 
-    (unsigned char)'\354', (unsigned char)'\355', 
-    (unsigned char)'\356', (unsigned char)'\357',
-    (unsigned char)'\360', (unsigned char)'\361', 
-    (unsigned char)'\362', (unsigned char)'\363', 
-    (unsigned char)'\364', (unsigned char)'\365', 
-    (unsigned char)'\366', (unsigned char)'\367',
-    (unsigned char)'\370', (unsigned char)'\371', 
-    (unsigned char)'\372', (unsigned char)'\333', 
-    (unsigned char)'\334', (unsigned char)'\335', 
-    (unsigned char)'\336', (unsigned char)'\337',
-    (unsigned char)'\340', (unsigned char)'\341', 
-    (unsigned char)'\342', (unsigned char)'\343', 
-    (unsigned char)'\344', (unsigned char)'\345', 
-    (unsigned char)'\346', (unsigned char)'\347',
-    (unsigned char)'\350', (unsigned char)'\351', 
-    (unsigned char)'\352', (unsigned char)'\353', 
-    (unsigned char)'\354', (unsigned char)'\355', 
-    (unsigned char)'\356', (unsigned char)'\357',
-    (unsigned char)'\360', (unsigned char)'\361', 
-    (unsigned char)'\362', (unsigned char)'\363', 
-    (unsigned char)'\364', (unsigned char)'\365', 
-    (unsigned char)'\366', (unsigned char)'\367',
-    (unsigned char)'\370', (unsigned char)'\371', 
-    (unsigned char)'\372', (unsigned char)'\373', 
-    (unsigned char)'\374', (unsigned char)'\375', 
-    (unsigned char)'\376', (unsigned char)'\377',
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * strcasecmp --
- *
- *      Compare two strings, disregarding case.
- *
- * Results:
- *      Returns a signed integer representing the following:
- *
- *	zero      - two strings are equal
- *	negative  - first string is less than second
- *	positive  - first string is greater than second
- *
- *---------------------------------------------------------------------------
- */
-int
-strcasecmp(const char *s1, const char *s2)
-{
-    unsigned char *s = (unsigned char *)s1;
-    unsigned char *t = (unsigned char *)s2;
-
-    for ( /* empty */ ; (caseTable[*s] == caseTable[*t]); s++, t++) {
-	if (*s == '\0') {
-	    return 0;
-	}
-    }
-    return (caseTable[*s] - caseTable[*t]);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * strncasecmp --
- *
- *      Compare two strings, disregarding case, up to a given length.
- *
- * Results:
- *      Returns a signed integer representing the following:
- *
- *	zero      - two strings are equal
- *	negative  - first string is less than second
- *	positive  - first string is greater than second
- *
- *---------------------------------------------------------------------------
- */
-int
-strncasecmp(const char *s1, const char *s2, size_t length)
-{
-    unsigned char *s = (unsigned char *)s1;
-    unsigned char *t = (unsigned char *)s2;
-
-    for ( /* empty */ ; (length > 0); s++, t++, length--) {
-	if (caseTable[*s] != caseTable[*t]) {
-	    return (caseTable[*s] - caseTable[*t]);
-	}
-	if (*s == '\0') {
-	    return 0;
-	}
-    }
-    return 0;
-}
-
-#endif /* !HAVE_STRCASECMP */
-
-
-#if !HAVE_DRAND48
-#define XDR48   0x000100010001LL
-#define MNDR48  0x0005deece66dLL
-#define DODDR48 0xbLL
-
-static long long int xdr48 = XDR48;
-double 
-drand48(void)  // works only on compilers with long long int!
-{
-    xdr48 = MNDR48 * xdr48 + DODDR48; 
-    xdr48 &= 0xffffffffffffLL;
-    return xdr48 / 281474976710656.0;
-}
-
-// Random number generator initialization 
-// parameters:
-//		s - seed
-// return:
-void 
-srand48(long x0)
-{
-    xdr48 = ((unsigned long)x0<<16) + 0x330e; 
-}
-#endif /*HAVE_DRAND48*/
-
-#if (_TCL_VERSION < _VERSION(8,1,0)) 
-
-char *
-Tcl_GetString(Tcl_Obj *objPtr)
-{
-    unsigned int dummy;
-
-    return Tcl_GetStringFromObj(objPtr, &dummy);
-}
-
-int 
-Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj **objv, int flags)
-{
-    Tcl_DString dString;
-    int i;
-    int result;
-
-    Tcl_DStringInit(&dString);
-    for (i = 0; i < objc; i++) {
-	Tcl_DStringAppendElement(&dString, Tcl_GetString(objv[i]));
-    }
-    result = Tcl_Eval(interp, Tcl_DStringValue(&dString)); 
-    Tcl_DStringFree(&dString);
-    return result;
-}
-
-int 
-Tcl_WriteObj(Tcl_Channel channel, Tcl_Obj *objPtr)
-{
-    char *string;
-    int nBytes;
-
-    string = Tcl_GetStringFromObj(objPtr, &nBytes);
-    return Tcl_Write(channel, string, nBytes);
-}
-
-char *
-Tcl_SetVar2Ex(
-    Tcl_Interp *interp, 
-    char *part1, 
-    char *part2, 
-    Tcl_Obj *objPtr, 
-    int flags)
-{
-    return Tcl_SetVar2(interp, part1, part2, Tcl_GetString(objPtr), flags);
-}
-
-Tcl_Obj *
-Tcl_GetVar2Ex(
-    Tcl_Interp *interp,
-    char *part1, 
-    char *part2,
-    int flags)
-{
-    char *result;
-    
-    result = Tcl_GetVar2(interp, part1, part2, flags);
-    if (result == NULL) {
-	return NULL;
-    }
-    return Tcl_NewStringObj(result, -1);
-}
-
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CompareDictionary
- *
- *	This function compares two strings as if they were being used in
- *	an index or card catalog.  The case of alphabetic characters is
- *	ignored, except to break ties.  Thus "B" comes before "b" but
- *	after "a".  Also, integers embedded in the strings compare in
- *	numerical order.  In other words, "x10y" comes after "x9y", not
- *      before it as it would when using strcmp().
- *
- * Results:
- *      A negative result means that the first element comes before the
- *      second, and a positive result means that the second element
- *      should come first.  A result of zero means the two elements
- *      are equal and it doesn't matter which comes first.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-#if HAVE_UTF
-int
-Blt_DictionaryCompare(const char *left, const char *right)
-{
-    Tcl_UniChar uniLeft, uniRight, uniLeftLower, uniRightLower;
-    int diff, zeros;
-    int secondaryDiff = 0;
-
-    for(;;) {
-	if ((isdigit(UCHAR(*right))) && (isdigit(UCHAR(*left)))) { 
-	    /*
-	     * There are decimal numbers embedded in the two
-	     * strings.  Compare them as numbers, rather than
-	     * strings.  If one number has more leading zeros than
-	     * the other, the number with more leading zeros sorts
-	     * later, but only as a secondary choice.
-	     */
-
-	    zeros = 0;
-	    while ((*right == '0') && (isdigit(UCHAR(right[1])))) {
-		right++;
-		zeros--;
-	    }
-	    while ((*left == '0') && (isdigit(UCHAR(left[1])))) {
-		left++;
-		zeros++;
-	    }
-	    if (secondaryDiff == 0) {
-		secondaryDiff = zeros;
-	    }
-
-	    /*
-	     * The code below compares the numbers in the two
-	     * strings without ever converting them to integers.  It
-	     * does this by first comparing the lengths of the
-	     * numbers and then comparing the digit values.
-	     */
-
-	    diff = 0;
-	    for (;;) {
-		if (diff == 0) {
-		    diff = UCHAR(*left) - UCHAR(*right);
-		}
-		right++;
-		left++;
-
-		/* Ignore commas in numbers. */
-		if (*left == ',') {
-		    left++;
-		}
-		if (*right == ',') {
-		    right++;
-		}
-
-		if (!isdigit(UCHAR(*right))) { /* INTL: digit */
-		    if (isdigit(UCHAR(*left))) { /* INTL: digit */
-			return 1;
-		    } else {
-			/*
-			 * The two numbers have the same length. See
-			 * if their values are different.
-			 */
-
-			if (diff != 0) {
-			    return diff;
-			}
-			break;
-		    }
-		} else if (!isdigit(UCHAR(*left))) { /* INTL: digit */
-		    return -1;
-		}
-	    }
-	    continue;
-	}
-
-	/*
-	 * Convert character to Unicode for comparison purposes.  If either
-	 * string is at the terminating null, do a byte-wise comparison and
-	 * bail out immediately.
-	 */
-	if ((*left != '\0') && (*right != '\0')) {
-	    left += Tcl_UtfToUniChar(left, &uniLeft);
-	    right += Tcl_UtfToUniChar(right, &uniRight);
-	    /*
-	     * Convert both chars to lower for the comparison, because
-	     * dictionary sorts are case insensitve.  Convert to lower, not
-	     * upper, so chars between Z and a will sort before A (where most
-	     * other interesting punctuations occur)
-	     */
-	    uniLeftLower = Tcl_UniCharToLower(uniLeft);
-	    uniRightLower = Tcl_UniCharToLower(uniRight);
-	} else {
-	    diff = UCHAR(*left) - UCHAR(*right);
-	    break;
-	}
-
-        diff = uniLeftLower - uniRightLower;
-        if (diff) {
-	    return diff;
-	} else if (secondaryDiff == 0) {
-	    if (Tcl_UniCharIsUpper(uniLeft) &&
-		    Tcl_UniCharIsLower(uniRight)) {
-		secondaryDiff = -1;
-	    } else if (Tcl_UniCharIsUpper(uniRight)
-		    && Tcl_UniCharIsLower(uniLeft)) {
-		secondaryDiff = 1;
-	    }
-        }
-    }
-    if (diff == 0) {
-	diff = secondaryDiff;
-    }
-    return diff;
-}
-
-#else 
-
-int
-Blt_DictionaryCompare(const char *left, const char *right) 
-{
-    int diff, zeros;
-    int secondaryDiff = 0;
-
-    while (1) {
-	if (isdigit(UCHAR(*right)) && isdigit(UCHAR(*left))) {
-	    /*
-	     * There are decimal numbers embedded in the two
-	     * strings.  Compare them as numbers, rather than
-	     * strings.  If one number has more leading zeros than
-	     * the other, the number with more leading zeros sorts
-	     * later, but only as a secondary choice.
-	     */
-
-	    zeros = 0;
-	    while ((*right == '0') && (isdigit(UCHAR(right[1])))) {
-		right++;
-		zeros--;
-	    }
-	    while ((*left == '0') && (isdigit(UCHAR(left[1])))) {
-		left++;
-		zeros++;
-	    }
-	    if (secondaryDiff == 0) {
-		secondaryDiff = zeros;
-	    }
-
-	    /*
-	     * The code below compares the numbers in the two
-	     * strings without ever converting them to integers.  It
-	     * does this by first comparing the lengths of the
-	     * numbers and then comparing the digit values.
-	     */
-
-	    diff = 0;
-	    while (1) {
-		if (diff == 0) {
-		    diff = UCHAR(*left) - UCHAR(*right);
-		}
-		right++;
-		left++;
-		/* Ignore commas in numbers. */
-		if (*left == ',') {
-		    left++;
-		}
-		if (*right == ',') {
-		    right++;
-		}
-		if (!isdigit(UCHAR(*right))) {
-		    if (isdigit(UCHAR(*left))) {
-			return 1;
-		    } else {
-			/*
-			 * The two numbers have the same length. See
-			 * if their values are different.
-			 */
-
-			if (diff != 0) {
-			    return diff;
-			}
-			break;
-		    }
-		} else if (!isdigit(UCHAR(*left))) {
-		    return -1;
-		}
-	    }
-	    continue;
-	}
-        diff = UCHAR(*left) - UCHAR(*right);
-        if (diff) {
-            if (isupper(UCHAR(*left)) && islower(UCHAR(*right))) {
-                diff = UCHAR(tolower(*left)) - UCHAR(*right);
-                if (diff) {
-		    return diff;
-                } else if (secondaryDiff == 0) {
-		    secondaryDiff = -1;
-                }
-            } else if (isupper(UCHAR(*right)) && islower(UCHAR(*left))) {
-                diff = UCHAR(*left) - UCHAR(tolower(UCHAR(*right)));
-                if (diff) {
-		    return diff;
-                } else if (secondaryDiff == 0) {
-		    secondaryDiff = 1;
-                }
-            } else {
-                return diff;
-            }
-        }
-        if (*left == 0) {
-	    break;
-	}
-        left++;
-        right++;
-    }
-    if (diff == 0) {
-	diff = secondaryDiff;
-    }
-    return diff;
-}
-#endif
-
-#ifndef NDEBUG
-
-void
-Blt_Assert(const char *testExpr, const char *fileName, int lineNumber)
-{
-#ifdef WINDEBUG
-    PurifyPrintf("line %d of %s: Assert \"%s\" failed\n", lineNumber,
-	fileName, testExpr);
-#endif
-    fprintf(stderr, "line %d of %s: Assert \"%s\" failed\n",
-	lineNumber, fileName, testExpr);
-    fflush(stderr);
-    abort();
-}
-#endif	/* NDEBUG */
-
-/*ARGSUSED*/
-void
-Blt_Panic TCL_VARARGS_DEF(const char *, arg1)
-{
-    const char *format;
-    va_list args;
-
-    format = TCL_VARARGS_START(const char *, arg1, args);
-    vfprintf(stderr, format, args);
-    fprintf(stderr, "\n");
-    fflush(stderr);
-    abort();
-}
-
-void 
-Blt_DStringAppendElements
-TCL_VARARGS_DEF(Tcl_DString *, arg1)
-{
-    Tcl_DString *dsPtr;
-    char *elem;
-    va_list args;
-
-    dsPtr = TCL_VARARGS_START(Tcl_DString *, arg1, args);
-    while ((elem = va_arg(args, char *)) != NULL) {
-	Tcl_DStringAppendElement(dsPtr, elem);
-    }
-    va_end(args);
-}
-
-/*ARGSUSED*/
-#ifndef HAVE_SPRINTF_S
-int 
-sprintf_s(char *s, size_t size, const char *fmt, /*args*/ ...) 
-{
-    va_list ap;
-    int n;
-
-    va_start(ap, fmt);
-    n = vsnprintf(s, size, fmt, ap);
-    if ((n != (int)size) && (size > 0)) {
-	s[size-1] = '\0';
-    }
-    va_end(ap);
-    return n;
-}
-#endif /* HAVE_SPRINTF_S */
-
-static char stringRep[200];
-
-const char *
-Blt_Itoa(int value)
-{
-    sprintf_s(stringRep, 200, "%d", value);
-    return stringRep;
-}
-
-const char *
-Blt_Ltoa(long value)
-{
-    sprintf_s(stringRep, 200, "%ld", value);
-    return stringRep;
-}
-
-const char *
-Blt_Utoa(unsigned int value)
-{
-    sprintf_s(stringRep, 200, "%u", value);
-    return stringRep;
-}
-
-const char *
-Blt_Dtoa(Tcl_Interp *interp, double value)
-{
-    Tcl_PrintDouble(interp, value, stringRep);
-    return stringRep;
-}
-
-FILE *
-Blt_OpenFile(Tcl_Interp *interp, const char *fileName, const char *mode)
-{
-    FILE *f;
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    Tcl_DString dString, nativeDString;
-    char *native;
-
-    native = Tcl_TranslateFileName(interp, fileName, &nativeDString);
-    if (native == NULL) {
-	return NULL;
-    }
-    fileName = Tcl_UtfToExternalDString(NULL, native, -1, &dString);
-    if (fileName == NULL) {
-	Tcl_AppendResult(interp, "can't convert filename \"", native, 
-		 "\" to system encoding", (char *)NULL);
-	Tcl_DStringFree(&nativeDString);
-	return NULL;
-    }
-    f = fopen(fileName, mode);
-#else
-    f = fopen(fileName, mode);
-#endif
-    if (f == NULL) {
-	Tcl_AppendResult(interp, "can't open \"", fileName, "\": ",
-			 Tcl_PosixError(interp), (char *)NULL);
-    }
-    Tcl_DStringFree(&dString);
-    Tcl_DStringFree(&nativeDString);
-    return f;
-}
-
-int
-Blt_GlobalEvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    int result;
-
-    for (i = 0; i < objc; i++) {
-	Tcl_IncrRefCount(objv[i]);
-    }
-    result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_GLOBAL);
-    for (i = 0; i < objc; i++) {
-	Tcl_DecrRefCount(objv[i]);
-    }
-    return result;
-}
-
-int
-Blt_GlobalEvalListObj(Tcl_Interp *interp, Tcl_Obj *cmdObjPtr)
-{
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-    int result;
-    
-    if (Tcl_ListObjGetElements(interp, cmdObjPtr, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	Tcl_IncrRefCount(objv[i]);
-    }
-    result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_GLOBAL);
-    for (i = 0; i < objc; i++) {
-	Tcl_DecrRefCount(objv[i]);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_InitHexTable --
- *
- *	Table index for the hex values. Initialized once, first time.
- *	Used for translation value or delimiter significance lookup.
- *
- *	We build the table at run time for several reasons:
- *
- *     	  1.  portable to non-ASCII machines.
- *	  2.  still reentrant since we set the init flag after setting
- *            table.
- *        3.  easier to extend.
- *        4.  less prone to bugs.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_InitHexTable(unsigned char *hexTable)
-{
-    memset(hexTable, 0xFF, 256);
-    hexTable['0'] = 0;
-    hexTable['1'] = 1;
-    hexTable['2'] = 2;
-    hexTable['3'] = 3;
-    hexTable['4'] = 4;
-    hexTable['5'] = 5;
-    hexTable['6'] = 6;
-    hexTable['7'] = 7;
-    hexTable['8'] = 8;
-    hexTable['9'] = 9;
-    hexTable['a'] = hexTable['A'] = 10;
-    hexTable['b'] = hexTable['B'] = 11;
-    hexTable['c'] = hexTable['C'] = 12;
-    hexTable['d'] = hexTable['D'] = 13;
-    hexTable['e'] = hexTable['E'] = 14;
-    hexTable['f'] = hexTable['F'] = 15;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPosition --
- *
- *	Convert a string representing a numeric position.
- *	A position can be in one of the following forms.
- *
- * 	  number	- number of the item in the hierarchy, indexed
- *			  from zero.
- *	  "end"		- last position in the hierarchy.
- *
- * Results:
- *	A standard TCL result.  If "string" is a valid index, then
- *	*indexPtr is filled with the corresponding numeric index.
- *	If "end" was selected then *indexPtr is set to -1.
- *	Otherwise an error message is left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetPosition(
-    Tcl_Interp *interp,		/* Interpreter to report results back
-				 * to. */
-    const char *string,		/* String representation of the index.
-				 * Can be an integer or "end" to refer
-				 * to the last index. */
-    long *indexPtr)		/* Holds the converted index. */
-{
-    if ((string[0] == 'e') && (strcmp(string, "end") == 0)) {
-	*indexPtr = -1;		/* Indicates last position in hierarchy. */
-    } else {
-	long position;
-
-	if (Tcl_GetLong(interp, string, &position) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (position < 0) {
-	    Tcl_AppendResult(interp, "bad position \"", string, "\"",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	*indexPtr = position;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_GetCountFromObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    int check,			/* Can be COUNT_POS, COUNT_NNEG,
-				 * or COUNT_ANY, */
-    long *valuePtr)
-{
-    long count;
-
-    if (Tcl_GetLongFromObj(interp, objPtr, &count) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    switch (check) {
-    case COUNT_NNEG:
-	if (count < 0) {
-	    Tcl_AppendResult(interp, "bad value \"", Tcl_GetString(objPtr), 
-		"\": can't be negative", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-    case COUNT_POS:
-	if (count <= 0) {
-	    Tcl_AppendResult(interp, "bad value \"", Tcl_GetString(objPtr), 
-		"\": must be positive", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	break;
-    case COUNT_ANY:
-	break;
-    }
-    *valuePtr = count;
-    return TCL_OK;
-}
-
-/*
- * The hash table below is used to keep track of all the Blt_Uids created
- * so far.
- */
-static Blt_HashTable uidTable;
-static int uidInitialized = 0;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetUid --
- *
- *	Given a string, returns a unique identifier for the string.  A
- *	reference count is maintained, so that the identifier can be freed
- *	when it is not needed any more. This can be used in many places to
- *	replace Tcl_GetUid.
- *
- * Results:
- *	This procedure returns a Blt_Uid corresponding to the "string"
- *	argument.  The Blt_Uid has a string value identical to string (strcmp
- *	will return 0), but it's guaranteed that any other calls to this
- *	procedure with a string equal to "string" will return exactly the same
- *	result (i.e. can compare Blt_Uid *values* directly, without having to
- *	call strcmp on what they point to).
- *
- * Side effects:
- *	New information may be entered into the identifier table.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Uid
-Blt_GetUid(const char *string)	/* String to convert. */
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    size_t refCount;
-    
-    if (!uidInitialized) {
-	Blt_InitHashTable(&uidTable, BLT_STRING_KEYS);
-	uidInitialized = 1;
-    }
-    hPtr = Blt_CreateHashEntry(&uidTable, string, &isNew);
-    if (isNew) {
-	refCount = 0;
-    } else {
-	refCount = (size_t)Blt_GetHashValue(hPtr);
-    }
-    refCount++;
-    Blt_SetHashValue(hPtr, (ClientData)refCount);
-    return (Blt_Uid)Blt_GetHashKey(&uidTable, hPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeUid --
- *
- *	Frees the Blt_Uid if there are no more clients using this identifier.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The identifier may be deleted from the identifier table.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreeUid(Blt_Uid uid)	/* Identifier to release. */
-{
-    Blt_HashEntry *hPtr;
-
-    if (!uidInitialized) {
-	Blt_InitHashTable(&uidTable, BLT_STRING_KEYS);
-	uidInitialized = 1;
-    }
-    hPtr = Blt_FindHashEntry(&uidTable, uid);
-    if (hPtr) {
-	size_t refCount;
-
-	refCount = (size_t)Blt_GetHashValue(hPtr);
-	refCount--;
-	if (refCount == 0) {
-	    Blt_DeleteHashEntry(&uidTable, hPtr);
-	} else {
-	    Blt_SetHashValue(hPtr, refCount);
-	}
-    } else {
-	fprintf(stderr, "tried to release unknown identifier \"%s\"\n", uid);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FindUid --
- *
- *	Returns a Blt_Uid associated with a given string, if one exists.
- *
- * Results:
- *	A Blt_Uid for the string if one exists. Otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Uid
-Blt_FindUid(const char *string)	/* String to find. */
-{
-    Blt_HashEntry *hPtr;
-
-    if (!uidInitialized) {
-	Blt_InitHashTable(&uidTable, BLT_STRING_KEYS);
-	uidInitialized = 1;
-    }
-    hPtr = Blt_FindHashEntry(&uidTable, string);
-    if (hPtr == NULL) {
-	return NULL;
-    }
-    return (Blt_Uid) Blt_GetHashKey(&uidTable, hPtr);
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * BinaryOpSearch --
- *
- *      Performs a binary search on the array of command operation
- *      specifications to find a partial, anchored match for the given
- *      operation string.
- *
- * Results:
- *	If the string matches unambiguously the index of the specification in
- *	the array is returned.  If the string does not match, even as an
- *	abbreviation, any operation, -1 is returned.  If the string matches,
- *	but ambiguously -2 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-BinaryOpSearch(Blt_OpSpec *specs, int nSpecs, const char *string, int length)
-{
-    char c;
-    int high, low;
-
-    low = 0;
-    high = nSpecs - 1;
-    c = string[0];
-    while (low <= high) {
-	Blt_OpSpec *specPtr;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	specPtr = specs + median;
-
-	/* Test the first character */
-	compare = c - specPtr->name[0];
-	if (compare == 0) {
-	    /* Now test the entire string */
-	    compare = strncmp(string, specPtr->name, length);
-	    if (compare == 0) {
-		if ((int)length < specPtr->minChars) {
-		    return -2;	/* Ambiguous operation name */
-		}
-	    }
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return median;	/* Op found. */
-	}
-    }
-    return -1;			/* Can't find operation */
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * LinearOpSearch --
- *
- *      Performs a binary search on the array of command operation
- *      specifications to find a partial, anchored match for the given
- *      operation string.
- *
- * Results:
- *	If the string matches unambiguously the index of the specification in
- *	the array is returned.  If the string does not match, even as an
- *	abbreviation, any operation, -1 is returned.  If the string matches,
- *	but ambiguously -2 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LinearOpSearch(Blt_OpSpec *specs, int nSpecs, const char *string, int length)
-{
-    Blt_OpSpec *specPtr;
-    char c;
-    int nMatches, last;
-    int i;
-
-    c = string[0];
-    nMatches = 0;
-    last = -1;
-    for (specPtr = specs, i = 0; i < nSpecs; i++, specPtr++) {
-	if ((c == specPtr->name[0]) && 
-	    (strncmp(string, specPtr->name, length) == 0)) {
-	    last = i;
-	    nMatches++;
-	    if ((int)length == specPtr->minChars) {
-		break;
-	    }
-	}
-    }
-    if (nMatches > 1) {
-	return -2;		/* Ambiguous operation name */
-    } 
-    if (nMatches == 0) {
-	return -1;		/* Can't find operation */
-    } 
-    return last;		/* Op found. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetOpFromObj --
- *
- *      Find the command operation given a string name.  This is useful where
- *      a group of command operations have the same argument signature.
- *
- * Results:
- *      If found, a pointer to the procedure (function pointer) is returned.
- *      Otherwise NULL is returned and an error message containing a list of
- *      the possible commands is returned in interp->result.
- *
- *---------------------------------------------------------------------------
- */
-void *
-Blt_GetOpFromObj(
-    Tcl_Interp *interp,		/* Interpreter to report errors to */
-    int nSpecs,			/* Number of specifications in array */
-    Blt_OpSpec *specs,		/* Op specification array */
-    int operPos,		/* Position of operation in argument list. */
-    int objc,			/* Number of arguments in the argument vector.
-				 * This includes any prefixed arguments */
-    Tcl_Obj *const *objv,	/* Argument vector */
-    int flags)
-{
-    Blt_OpSpec *specPtr;
-    const char *string;
-    int length;
-    int n;
-
-    if (objc <= operPos) {	/* No operation argument */
-	Tcl_AppendResult(interp, "wrong # args: ", (char *)NULL);
-      usage:
-	Tcl_AppendResult(interp, "should be one of...", (char *)NULL);
-	for (n = 0; n < nSpecs; n++) {
-	    int i;
-
-	    Tcl_AppendResult(interp, "\n  ", (char *)NULL);
-	    for (i = 0; i < operPos; i++) {
-		Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ", 
-			 (char *)NULL);
-	    }
-	    specPtr = specs + n;
-	    Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage,
-		(char *)NULL);
-	}
-	return NULL;
-    }
-    string = Tcl_GetStringFromObj(objv[operPos], &length);
-    if (flags & BLT_OP_LINEAR_SEARCH) {
-	n = LinearOpSearch(specs, nSpecs, string, length);
-    } else {
-	n = BinaryOpSearch(specs, nSpecs, string, length);
-    }
-    if (n == -2) {
-	char c;
-
-	Tcl_AppendResult(interp, "ambiguous", (char *)NULL);
-	if (operPos > 2) {
-	    Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]), 
-		(char *)NULL);
-	}
-	Tcl_AppendResult(interp, " operation \"", string, "\" matches: ",
-	    (char *)NULL);
-
-	c = string[0];
-	for (n = 0; n < nSpecs; n++) {
-	    specPtr = specs + n;
-	    if ((c == specPtr->name[0]) &&
-		(strncmp(string, specPtr->name, length) == 0)) {
-		Tcl_AppendResult(interp, " ", specPtr->name, (char *)NULL);
-	    }
-	}
-	return NULL;
-
-    } else if (n == -1) {	/* Can't find operation, display help */
-	Tcl_AppendResult(interp, "bad", (char *)NULL);
-	if (operPos > 2) {
-	    Tcl_AppendResult(interp, " ", Tcl_GetString(objv[operPos - 1]), 
-		(char *)NULL);
-	}
-	Tcl_AppendResult(interp, " operation \"", string, "\": ", (char *)NULL);
-	goto usage;
-    }
-    specPtr = specs + n;
-    if ((objc < specPtr->minArgs) || 
-	((specPtr->maxArgs > 0) && (objc > specPtr->maxArgs))) {
-	int i;
-
-	Tcl_AppendResult(interp, "wrong # args: should be \"", (char *)NULL);
-	for (i = 0; i < operPos; i++) {
-	    Tcl_AppendResult(interp, Tcl_GetString(objv[i]), " ", 
-		(char *)NULL);
-	}
-	Tcl_AppendResult(interp, specPtr->name, " ", specPtr->usage, "\"",
-	    (char *)NULL);
-	return NULL;
-    }
-    return specPtr->proc;
-}
-
-#if (_TCL_VERSION >= _VERSION(8,4,0)) 
-/*ARGSUSED*/
-int
-Blt_LoadLibrary(Tcl_Interp *interp, const char *libPath, 
-		const char *initProcName, const char *safeProcName)
-{
-    Tcl_FSUnloadFileProc *unLoadProcPtr = NULL;
-    Tcl_LoadHandle loadHandle;
-    Tcl_PackageInitProc *initProc, *safeProc;
-    int result;
-    Tcl_Obj *objPtr;
-
-    objPtr = Tcl_NewStringObj(libPath, -1);
-    Tcl_IncrRefCount(objPtr);
-    result = Tcl_FSLoadFile(interp, objPtr, initProcName, safeProcName, 
-	&initProc, &safeProc, &loadHandle, &unLoadProcPtr);
-    if (result != TCL_OK) {
-	goto done;
-    }
-    if (initProc == NULL) {
-	Tcl_AppendResult(interp, "couldn't find procedure ", initProcName, 
-		(char *) NULL);
-	result = TCL_ERROR;
-	goto done;
-    }
-    if (Tcl_IsSafe(interp)) {
-        if (safeProc == NULL) {
-            Tcl_AppendResult(interp, 
-		"can't use package in a safe interpreter: ", "no ", 
-		safeProcName, " procedure", (char *) NULL);
-	    result = TCL_ERROR;
-            goto done;
-	}
-	result = (*safeProc)(interp);
-    } else {
-	result = (*initProc)(interp);
-    }
- done:
-    Tcl_DecrRefCount(objPtr);
-    if (result != TCL_OK) {
-	if (unLoadProcPtr != NULL) {
-	    (*unLoadProcPtr)(loadHandle);
-	}
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-#else 
-int
-Blt_LoadLibrary(Tcl_Interp *interp, const char *libPath, 
-		const char *initProcName, const char *safeProcName)
-{
-    ClientData loadData;
-    Tcl_PackageInitProc *initProc, *safeProc;
-    int result;
-
-    result = TclpLoadFile(interp, libPath, initProcName, safeProcName, 
-	&initProc, &safeProc, &loadData); 
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (initProc == NULL) {
-	Tcl_AppendResult(interp, "couldn't find procedure ", initProcName, 
-		(char *) NULL);
-	result = TCL_ERROR;
-	goto done;
-    }
-    if (Tcl_IsSafe(interp)) {
-        if (safeProc == NULL) {
-            Tcl_AppendResult(interp, 
-		"can't use package in a safe interpreter: ", "no ", 
-		safeProcName, " procedure", (char *) NULL);
-	    result = TCL_ERROR;
-            goto done;
-	}
-	result = (*safeProc)(interp);
-    } else {
-	result = (*initProc)(interp);
-    }
- done:
-    if (result != TCL_OK) {
-	TclpUnloadFile(loadData);
-	return TCL_ERROR;
-    }	
-    return TCL_OK;
-}
-#endif
diff --git a/blt3.0/src/bltVar.c b/blt3.0/src/bltVar.c
deleted file mode 100644
index db16b65..0000000
--- a/blt3.0/src/bltVar.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/*
- * bltVar.c --
- *
- * This module implements TCL variable handler procedures for the BLT
- * toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include "bltNsUtil.h"
-#include "bltVar.h"
-#include <bltList.h>
-
-#if (_TK_VERSION > _VERSION(8,5,0))
-#include "bltVar85.c"
-#else
-#include "bltVar84.c"
-#endif
diff --git a/blt3.0/src/bltVar.h b/blt3.0/src/bltVar.h
deleted file mode 100644
index 811ef34..0000000
--- a/blt3.0/src/bltVar.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-/*
- * bltVar.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_VAR_H
-#define _BLT_VAR_H
-
-/*
- * The following procedures are helper routines to build TCL variables
- * for special variable resolvers.  
- */
-BLT_EXTERN Tcl_Var Blt_GetCachedVar(Blt_HashTable *tablePtr, const char *label,
-	Tcl_Obj *objPtr);
-
-BLT_EXTERN void Blt_FreeCachedVars(Blt_HashTable *tablePtr);
-
-/*
- * The following declarations are missing from the TCL public API.
- */
-#ifndef USE_TCL_STUBS
-typedef struct _Tcl_ResolvedVarInfo Tcl_ResolvedVarInfo;
-
-typedef int (Tcl_ResolveCmdProc)(Tcl_Interp* interp, const char *name, 
-	Tcl_Namespace *context, int flags, Tcl_Command *rPtr);
-
-typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name, 
-	Tcl_Namespace *context, int flags, Tcl_Var *rPtr);
-
-typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp* interp, const char *name,
-	int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr);
-
-BLT_EXTERN void Tcl_SetNamespaceResolvers(Tcl_Namespace *nsPtr, 
-	Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, 
-	Tcl_ResolveCompiledVarProc *compiledVarProc);
-#endif
-
-#endif /* _BLT_VAR_H */
diff --git a/blt3.0/src/bltVar84.c b/blt3.0/src/bltVar84.c
deleted file mode 100644
index c8b7adc..0000000
--- a/blt3.0/src/bltVar84.c
+++ /dev/null
@@ -1,284 +0,0 @@
-
-/*
- * bltVar84.c --
- *
- * This module implements TCL 8.4 variable handler procedures for the BLT
- * toolkit.
- *
- *	Copyright 1997-2008 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include "bltNsUtil.h"
-#include "bltVar.h"
-#include <bltList.h>
-
-/* 
- * Variable resolver routines.
- *
- * The following bit of magic is from [incr Tcl].  The following routine are
- * taken from [incr Tcl] to roughly duplicate how TCL internally creates
- * variables.
- *
- * Note: There is no API for the variable resolver routines in the Tcl
- *	 library.  The resolver callback is supposed to return a Tcl_Var
- *	 back. But the definition of Tcl_Var in tcl.h is opaque.
- */
-
-#define VAR_SCALAR		0x1
-#define VAR_ARRAY		0x2
-#define VAR_LINK		0x4
-#define VAR_UNDEFINED		0x8
-#define VAR_IN_HASHTABLE	0x10
-#define VAR_TRACE_ACTIVE	0x20
-#define VAR_ARRAY_ELEMENT	0x40
-#define VAR_NAMESPACE_VAR	0x80
-
-#define VAR_ARGUMENT		0x100
-#define VAR_TEMPORARY		0x200
-#define VAR_RESOLVED		0x400	
-
-typedef struct ArraySearch ArraySearch;
-typedef struct VarTrace VarTrace;
-typedef struct Namespace Namespace;
-
-typedef struct Var {
-    union {
-	Tcl_Obj *objPtr;	/* The variable's object value. Used for
-				 * scalar variables and array elements. */
-	Tcl_HashTable *tablePtr;/* For array variables, this points to
-				 * information about the hash table used to
-				 * implement the associative array.  Points to
-				 * malloc-ed data. */
-	struct Var *linkPtr;	/* If this is a global variable being referred
-				 * to in a procedure, or a variable created by
-				 * "upvar", this field points to the
-				 * referenced variable's Var struct. */
-    } value;
-    char *name;			/* NULL if the variable is in a hashtable,
-				 * otherwise points to the variable's name. It
-				 * is used, e.g., by TclLookupVar and "info
-				 * locals". The storage for the characters of
-				 * the name is not owned by the Var and must
-				 * not be freed when freeing the Var. */
-    Namespace *nsPtr;		/* Points to the namespace that contains this
-				 * variable or NULL if the variable is a local
-				 * variable in a TCL procedure. */
-    Tcl_HashEntry *hPtr;	/* If variable is in a hashtable, either the
-				 * hash table entry that refers to this
-				 * variable or NULL if the variable has been
-				 * detached from its hash table (e.g. an array
-				 * is deleted, but some of its elements are
-				 * still referred to in upvars). NULL if the
-				 * variable is not in a hashtable. This is
-				 * used to delete an variable from its
-				 * hashtable if it is no longer needed. */
-    int refCount;		/* Counts number of active uses of this
-				 * variable, not including its entry in the
-				 * call frame or the hash table: 1 for each
-				 * additional variable whose linkPtr points
-				 * here, 1 for each nested trace active on
-				 * variable, and 1 if the variable is a
-				 * namespace variable. This record can't be
-				 * deleted until refCount becomes 0. */
-    VarTrace *tracePtr;		/* First in list of all traces set for this
-				 * variable. */
-    ArraySearch *searchPtr;	/* First in list of all searches active for
-				 * this variable, or NULL if none. */
-    int flags;			/* Miscellaneous bits of information about
-				 * variable. See below for definitions. */
-} Var;
-
-static INLINE Tcl_Namespace *
-NamespaceOfVariable(Tcl_Var var)
-{
-    Var *varPtr = (Var *)var;
-
-    return (Tcl_Namespace *)varPtr->nsPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewVar --
- *
- *	Create a new heap-allocated variable that will eventually be entered
- *	into a hashtable.
- *
- * Results:
- *	The return value is a pointer to the new variable structure. It is
- *	marked as a scalar variable (and not a link or array variable). Its
- *	value initially is NULL. The variable is not part of any hash table
- *	yet. Since it will be in a hashtable and not in a call frame, its name
- *	field is set NULL. It is initially marked as undefined.
- *
- * Side effects:
- *	Storage gets allocated.
- *
- *---------------------------------------------------------------------------
- */
-static Var *
-NewVar(const char *label, Tcl_Obj *objPtr)
-{
-    Var *varPtr;
-
-    varPtr = Blt_AssertMalloc(sizeof(Var));
-    varPtr->value.objPtr = objPtr;
-#ifdef notdef
-    if (objPtr != NULL) {
-	Tcl_IncrRefCount(objPtr);
-    }
-#endif
-    varPtr->name = (char *)label;
-    varPtr->nsPtr = NULL;
-    /*
-     *  NOTE:  TCL reports a "dangling upvar" error for variables
-     *         with a null "hPtr" field.  Put something non-zero
-     *         in here to keep Tcl_SetVar2() happy.  The only time
-     *         this field is really used is it remove a variable
-     *         from the hash table that contains it in CleanupVar,
-     *         but since these variables are protected by their
-     *         higher refCount, they will not be deleted by CleanupVar
-     *         anyway.  These variables are unset and removed in
-     *         FreeCachedVars.
-     */
-    varPtr->hPtr = (Tcl_HashEntry *)0x01;
-    varPtr->refCount = 1;  /* protect from being deleted */
-    varPtr->tracePtr = NULL;
-    varPtr->searchPtr = NULL;
-    varPtr->flags = (VAR_SCALAR | VAR_IN_HASHTABLE);
-    return varPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetVariableNamespace --
- *
- *	Returns the namespace context of the named variable.  The variable
- *	named may be fully qualified or not.  Variables in the current 
- *	namespace supersede the global namespace.
- *
- * Results:
- *	Returns the context of the namespace in an opaque type. If return
- *	value is NULL, this indicates that the variable is local to the call
- *	frame.
- *
- *---------------------------------------------------------------------------
- */
-
-Tcl_Namespace *
-Blt_GetVariableNamespace(Tcl_Interp *interp, const char *path)
-{
-    Blt_ObjectName objName;
-
-    if (!Blt_ParseObjectName(interp, path, &objName, BLT_NO_DEFAULT_NS)) {
-	return NULL;
-    }
-    if (objName.nsPtr == NULL) {
-	Tcl_Var var;
-
-	/* Search the current namespace and */
-	var = Tcl_FindNamespaceVar(interp, (char *)path, NULL, 
-		TCL_NAMESPACE_ONLY);
-	if (var != NULL) {
-	    return NamespaceOfVariable(var);
-	}
-	/* then search the global namespace. */
-	var = Tcl_FindNamespaceVar(interp, (char *)path, NULL,
-		TCL_GLOBAL_ONLY);
-	if (var != NULL) {
-	    return NamespaceOfVariable(var);
-	}
-    }
-    return objName.nsPtr;    
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetCachedVar --
- *
- *	Returns an opaque TCL variable reference by *name* with the value
- *	pointed to by *objPtr*.  The purpose of this routine is to return a
- *	Tcl_Var for a NamespaceResolver callback and to set the value of that
- *	variable.  The variable is stored in a hash table associated with the
- *	(temporary) namespace.
- *
- * Results:
- *	Returns the opaque type of a Tcl_Var. 
- *
- * Side Effects:
- *	If the variable does not already exist in the hash table, it is
- *	created.  The value of the variable is set to *objPtr*.
- *
- *---------------------------------------------------------------------------
- */
-
-Tcl_Var
-Blt_GetCachedVar(Blt_HashTable *tablePtr, const char *label, Tcl_Obj *objPtr)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Var *varPtr;
-
-    /* Check if the variable has been cached already. */
-    hPtr = Blt_CreateHashEntry(tablePtr, label, &isNew);
-    if (isNew) {
-	varPtr = NewVar(label, objPtr);
-	Blt_SetHashValue(hPtr, varPtr);
-    } else {
-	varPtr = Blt_GetHashValue(hPtr);
-	varPtr->value.objPtr = objPtr;
-#ifdef notdef
-	if (objPtr != NULL) {
-	    Tcl_IncrRefCount(objPtr);
-	}
-#endif
-    }
-    return (Tcl_Var)varPtr;
-}
-
-void
-Blt_FreeCachedVars(Blt_HashTable *tablePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Var *varPtr;
-
-	varPtr = Blt_GetHashValue(hPtr);
-	varPtr->refCount--;
-	if (varPtr->refCount > 1) {
-#ifdef notdef
-	    if (varPtr->value.objPtr != NULL) {
-		Tcl_DecrRefCount(varPtr->value.objPtr);
-	    }
-#endif
-	    Blt_Free(varPtr);
-	}
-    }
-    Blt_DeleteHashTable(tablePtr);
-}
diff --git a/blt3.0/src/bltVar85.c b/blt3.0/src/bltVar85.c
deleted file mode 100644
index e6a7b95..0000000
--- a/blt3.0/src/bltVar85.c
+++ /dev/null
@@ -1,465 +0,0 @@
-
-/*
- * bltVar85.c --
- *
- * This module implements TCL 8.5 variable handler procedures for the BLT
- * toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include "bltNsUtil.h"
-#include "bltVar.h"
-#include <bltList.h>
-
-
-/* 
- * Variable resolver routines.
- *
- * The following bit of magic is from [incr Tcl].  The following
- * routine are taken from [incr Tcl] to roughly duplicate how Tcl
- * internally creates variables.
- *
- * Note: There is no API for the variable resolver routines in the Tcl
- *	 library.  The resolver callback is supposed to return a Tcl_Var
- *	 back. But the definition of Tcl_Var in tcl.h is opaque.
- */
-
-typedef struct TclVarHashTable {
-    Tcl_HashTable table;
-    Tcl_Namespace *nsPtr;
-} TclVarHashTable;
-
-/*
- * The structure below defines a variable, which associates a string name with
- * a Tcl_Obj value. These structures are kept in procedure call frames (for
- * local variables recognized by the compiler) or in the heap (for global
- * variables and any variable not known to the compiler). For each Var
- * structure in the heap, a hash table entry holds the variable name and a
- * pointer to the Var structure.
- */
-
-typedef struct Var {
-    int flags;			/* Miscellaneous bits of information about
-				 * variable. See below for definitions. */
-    union {
-	Tcl_Obj *objPtr;	/* The variable's object value. Used for
-				 * scalar variables and array elements. */
-	TclVarHashTable *tablePtr;/* For array variables, this points to
-				 * information about the hash table used to
-				 * implement the associative array. Points to
-				 * ckalloc-ed data. */
-	struct Var *linkPtr;	/* If this is a global variable being referred
-				 * to in a procedure, or a variable created by
-				 * "upvar", this field points to the
-				 * referenced variable's Var struct. */
-    } value;
-} Var;
-
-typedef struct VarInHash {
-    Var var;
-    int refCount;		/* Counts number of active uses of this
-				 * variable: 1 for the entry in the hash
-				 * table, 1 for each additional variable whose
-				 * linkPtr points here, 1 for each nested
-				 * trace active on variable, and 1 if the
-				 * variable is a namespace variable. This
-				 * record can't be deleted until refCount
-				 * becomes 0. */
-    Tcl_HashEntry entry;	/* The hash table entry that refers to this
-				 * variable. This is used to find the name of
-				 * the variable and to delete it from its
-				 * hashtable if it is no longer needed. It
-				 * also holds the variable's name. */
-} VarInHash;
-
-/*
- * Flag bits for variables. The first two (VAR_ARRAY and VAR_LINK) are
- * mutually exclusive and give the "type" of the variable. If none is set,
- * this is a scalar variable.
- *
- * VAR_ARRAY -			1 means this is an array variable rather than
- *				a scalar variable or link. The "tablePtr"
- *				field points to the array's hashtable for its
- *				elements.
- * VAR_LINK -			1 means this Var structure contains a pointer
- *				to another Var structure that either has the
- *				real value or is itself another VAR_LINK
- *				pointer. Variables like this come about
- *				through "upvar" and "global" commands, or
- *				through references to variables in enclosing
- *				namespaces.
- *
- * Flags that indicate the type and status of storage; none is set for
- * compiled local variables (Var structs).
- *
- * VAR_IN_HASHTABLE -		1 means this variable is in a hashtable and
- *				the Var structure is malloced. 0 if it is a
- *				local variable that was assigned a slot in a
- *				procedure frame by the compiler so the Var
- *				storage is part of the call frame.
- * VAR_DEAD_HASH                1 means that this var's entry in the hashtable
- *                              has already been deleted.
- * VAR_ARRAY_ELEMENT -		1 means that this variable is an array
- *				element, so it is not legal for it to be an
- *				array itself (the VAR_ARRAY flag had better
- *				not be set).
- * VAR_NAMESPACE_VAR -		1 means that this variable was declared as a
- *				namespace variable. This flag ensures it
- *				persists until its namespace is destroyed or
- *				until the variable is unset; it will persist
- *				even if it has not been initialized and is
- *				marked undefined. The variable's refCount is
- *				incremented to reflect the "reference" from
- *				its namespace.
- *
- * Flag values relating to the variable's trace and search status.
- *
- * VAR_TRACED_READ
- * VAR_TRACED_WRITE
- * VAR_TRACED_UNSET
- * VAR_TRACED_ARRAY
- * VAR_TRACE_ACTIVE -		1 means that trace processing is currently
- *				underway for a read or write access, so new
- *				read or write accesses should not cause trace
- *				procedures to be called and the variable can't
- *				be deleted.
- * VAR_SEARCH_ACTIVE
- *
- * The following additional flags are used with the CompiledLocal type defined
- * below:
- *
- * VAR_ARGUMENT -		1 means that this variable holds a procedure
- *				argument.
- * VAR_TEMPORARY -		1 if the local variable is an anonymous
- *				temporary variable. Temporaries have a NULL
- *				name.
- * VAR_RESOLVED -		1 if name resolution has been done for this
- *				variable.
- * VAR_IS_ARGS                  1 if this variable is the last argument and is
- *                              named "args".
- */
-
-/*
- * FLAGS RENUMBERED: everything breaks already, make things simpler.
- *
- * IMPORTANT: skip the values 0x10, 0x20, 0x40, 0x800 corresponding to
- * TCL_TRACE_(READS/WRITES/UNSETS/ARRAY): makes code simpler in tclTrace.c
- *
- * Keep the flag values for VAR_ARGUMENT and VAR_TEMPORARY so that old values
- * in precompiled scripts keep working.
- */
-
-
-/* Type of value (0 is scalar) */
-#define VAR_ARRAY		0x1
-#define VAR_LINK		0x2
-
-/* Type of storage (0 is compiled local) */
-#define VAR_IN_HASHTABLE	0x4
-#define VAR_DEAD_HASH           0x8
-#define VAR_ARRAY_ELEMENT	0x1000
-#define VAR_NAMESPACE_VAR	0x80      /* KEEP OLD VALUE for Itcl */
-
-#define VAR_ALL_HASH \
-	(VAR_IN_HASHTABLE|VAR_DEAD_HASH|VAR_NAMESPACE_VAR|VAR_ARRAY_ELEMENT)
-
-/* Trace and search state */
-
-#define VAR_TRACED_READ        0x10       /* TCL_TRACE_READS  */
-#define VAR_TRACED_WRITE       0x20       /* TCL_TRACE_WRITES */
-#define VAR_TRACED_UNSET       0x40       /* TCL_TRACE_UNSETS */
-#define VAR_TRACED_ARRAY       0x800	  /* TCL_TRACE_ARRAY  */
-#define VAR_TRACE_ACTIVE       0x2000
-#define VAR_SEARCH_ACTIVE      0x4000
-#define VAR_ALL_TRACES \
-	(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET)
-
-
-/* Special handling on initialisation (only CompiledLocal) */
-#define VAR_ARGUMENT		0x100	  /* KEEP OLD VALUE! See tclProc.c */
-#define VAR_TEMPORARY		0x200	  /* KEEP OLD VALUE! See tclProc.c */
-#define VAR_IS_ARGS		0x400
-#define VAR_RESOLVED		0x8000
-
-/*
- * Macros to ensure that various flag bits are set properly for variables.
- * The ANSI C "prototypes" for these macros are:
- *
- * MODULE_SCOPE void	TclSetVarScalar(Var *varPtr);
- * MODULE_SCOPE void	TclSetVarArray(Var *varPtr);
- * MODULE_SCOPE void	TclSetVarLink(Var *varPtr);
- * MODULE_SCOPE void	TclSetVarArrayElement(Var *varPtr);
- * MODULE_SCOPE void	TclSetVarUndefined(Var *varPtr);
- * MODULE_SCOPE void	TclClearVarUndefined(Var *varPtr);
- */
-
-#define TclSetVarScalar(varPtr) \
-    (varPtr)->flags &= ~(VAR_ARRAY|VAR_LINK)
-
-#define TclSetVarArray(varPtr) \
-    (varPtr)->flags = ((varPtr)->flags & ~VAR_LINK) | VAR_ARRAY
-
-#define TclSetVarLink(varPtr) \
-    (varPtr)->flags = ((varPtr)->flags & ~VAR_ARRAY) | VAR_LINK
-
-#define TclSetVarArrayElement(varPtr) \
-    (varPtr)->flags = ((varPtr)->flags & ~VAR_ARRAY) | VAR_ARRAY_ELEMENT
-
-#define TclSetVarUndefined(varPtr) \
-    (varPtr)->flags &= ~(VAR_ARRAY|VAR_LINK);\
-    (varPtr)->value.objPtr = NULL
-
-#define TclClearVarUndefined(varPtr)
-
-#define TclSetVarTraceActive(varPtr) \
-    (varPtr)->flags |= VAR_TRACE_ACTIVE
-
-#define TclClearVarTraceActive(varPtr) \
-    (varPtr)->flags &= ~VAR_TRACE_ACTIVE
-
-#define TclSetVarNamespaceVar(varPtr) \
-    if (!TclIsVarNamespaceVar(varPtr)) {\
-	(varPtr)->flags |= VAR_NAMESPACE_VAR;\
-	((VarInHash *)(varPtr))->refCount++;\
-    }
-
-#define TclClearVarNamespaceVar(varPtr) \
-    if (TclIsVarNamespaceVar(varPtr)) {\
-	(varPtr)->flags &= ~VAR_NAMESPACE_VAR;\
-	((VarInHash *)(varPtr))->refCount--;\
-    }
-
-/*
- * Macros to read various flag bits of variables.
- * The ANSI C "prototypes" for these macros are:
- *
- * MODULE_SCOPE int	TclIsVarScalar(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarLink(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarArray(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarUndefined(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarArrayElement(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarTemporary(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarArgument(Var *varPtr);
- * MODULE_SCOPE int	TclIsVarResolved(Var *varPtr);
- */
-
-#define TclIsVarScalar(varPtr) \
-    !((varPtr)->flags & (VAR_ARRAY|VAR_LINK))
-
-#define TclIsVarLink(varPtr) \
-    ((varPtr)->flags & VAR_LINK)
-
-#define TclIsVarArray(varPtr) \
-    ((varPtr)->flags & VAR_ARRAY)
-
-#define TclIsVarUndefined(varPtr) \
-    ((varPtr)->value.objPtr == NULL)
-
-#define TclIsVarArrayElement(varPtr) \
-    ((varPtr)->flags & VAR_ARRAY_ELEMENT)
-
-#define TclIsVarNamespaceVar(varPtr) \
-    ((varPtr)->flags & VAR_NAMESPACE_VAR)
-
-#define TclIsVarTemporary(varPtr) \
-    ((varPtr)->flags & VAR_TEMPORARY)
-
-#define TclIsVarArgument(varPtr) \
-    ((varPtr)->flags & VAR_ARGUMENT)
-
-#define TclIsVarResolved(varPtr) \
-    ((varPtr)->flags & VAR_RESOLVED)
-
-#define TclIsVarTraceActive(varPtr) \
-    ((varPtr)->flags & VAR_TRACE_ACTIVE)
-
-#define TclIsVarTraced(varPtr) \
-   ((varPtr)->flags & VAR_ALL_TRACES)
-
-#define TclIsVarInHash(varPtr) \
-    ((varPtr)->flags & VAR_IN_HASHTABLE)
-
-#define TclIsVarDeadHash(varPtr) \
-    ((varPtr)->flags & VAR_DEAD_HASH)
-
-#define TclGetVarNsPtr(varPtr) \
-    (TclIsVarInHash(varPtr) \
-         ? ((TclVarHashTable *) ((((VarInHash *) (varPtr))->entry.tablePtr)))->nsPtr \
-	 : NULL)
-
-#define VarHashRefCount(varPtr) \
-    ((VarInHash *) (varPtr))->refCount
-
-/*
- * Macros for direct variable access by TEBC
- */
-
-#define TclIsVarDirectReadable(varPtr) \
-    (   !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_READ)) \
-    &&  (varPtr)->value.objPtr)
-
-#define TclIsVarDirectWritable(varPtr) \
-    !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH))
-
-#define TclIsVarDirectModifyable(varPtr) \
-    (   !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE)) \
-    &&  (varPtr)->value.objPtr)
-
-#define TclIsVarDirectReadable2(varPtr, arrayPtr) \
-    (TclIsVarDirectReadable(varPtr) &&\
-        (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_READ)))
-
-#define TclIsVarDirectWritable2(varPtr, arrayPtr) \
-    (TclIsVarDirectWritable(varPtr) &&\
-        (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_WRITE)))
-
-#define TclIsVarDirectModifyable2(varPtr, arrayPtr) \
-    (TclIsVarDirectModifyable(varPtr) &&\
-        (!(arrayPtr) || !((arrayPtr)->flags & (VAR_TRACED_READ|VAR_TRACED_WRITE))))
-
-#define VarHashGetValue(hPtr) \
-    ((Var *) ((char *)hPtr - Blt_Offset(VarInHash, entry)))
-
-static INLINE Tcl_Namespace *
-NamespaceOfVariable(Var *varPtr)
-{
-    if (varPtr->flags & VAR_IN_HASHTABLE) {
-	VarInHash *vhashPtr = (VarInHash *)varPtr;
-	TclVarHashTable *vtablePtr;
-
-	vtablePtr = (TclVarHashTable *)vhashPtr->entry.tablePtr;
-	return vtablePtr->nsPtr;
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewVar --
- *
- *	Create a new heap-allocated variable that will eventually be
- *	entered into a hashtable.
- *
- * Results:
- *	The return value is a pointer to the new variable structure. It is
- *	marked as a scalar variable (and not a link or array variable). Its
- *	value initially is NULL. The variable is not part of any hash table
- *	yet. Since it will be in a hashtable and not in a call frame, its
- *	name field is set NULL. It is initially marked as undefined.
- *
- * Side effects:
- *	Storage gets allocated.
- *
- *---------------------------------------------------------------------------
- */
-static Var *
-NewVar(Tcl_Obj *objPtr)
-{
-    Var *varPtr;
-
-    varPtr = Blt_AssertMalloc(sizeof(Var));
-    varPtr->value.objPtr = objPtr;
-    varPtr->flags = 0;
-    return varPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetVariableNamespace --
- *
- *	Returns the namespace context of the variable.  If NULL, this
- *	indicates that the variable is local to the call frame.
- *
- * Results:
- *	Returns the context of the namespace in an opaque type.
- *
- *---------------------------------------------------------------------------
- */
-
-Tcl_Namespace *
-Blt_GetVariableNamespace(Tcl_Interp *interp, const char *path)
-{
-    Blt_ObjectName objName;
-
-    if (!Blt_ParseObjectName(interp, path, &objName, BLT_NO_DEFAULT_NS)) {
-	return NULL;
-    }
-    if (objName.nsPtr == NULL) {
-	Var *varPtr;
-
-	varPtr = (Var *)Tcl_FindNamespaceVar(interp, (char *)path, 
-		(Tcl_Namespace *)NULL, TCL_NAMESPACE_ONLY);
-	if (varPtr != NULL) {
-	    return NamespaceOfVariable(varPtr);
-	}
-	varPtr = (Var *)Tcl_FindNamespaceVar(interp, (char *)path, 
-		(Tcl_Namespace *)NULL, TCL_GLOBAL_ONLY);
-	if (varPtr != NULL) {
-	    return NamespaceOfVariable(varPtr);
-	}
-    }
-    return objName.nsPtr;    
-}
-
-Tcl_Var
-Blt_GetCachedVar(Blt_HashTable *cacheTablePtr, const char *label, 
-		 Tcl_Obj *objPtr)
-{
-    Blt_HashEntry *hPtr;
-    int isNew;
-    Var *varPtr;
-
-    /* Check if the variable has been cached already. */
-    hPtr = Blt_CreateHashEntry(cacheTablePtr, label, &isNew);
-    if (isNew) {
-	varPtr = NewVar(objPtr);
-	Blt_SetHashValue(hPtr, varPtr);
-    } else {
-	varPtr = Blt_GetHashValue(hPtr);
-	varPtr->value.objPtr = objPtr;
-    }
-    return (Tcl_Var)varPtr;
-}
-
-void
-Blt_FreeCachedVars(Blt_HashTable *tablePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch iter;
-
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &iter); hPtr != NULL; 
-	 hPtr = Blt_NextHashEntry(&iter)) {
-	Var *varPtr;
-
-	varPtr = Blt_GetHashValue(hPtr);
-	Blt_Free(varPtr);
-    }
-    Blt_DeleteHashTable(tablePtr);
-}
diff --git a/blt3.0/src/bltVecCmd.c b/blt3.0/src/bltVecCmd.c
deleted file mode 100644
index 0819f22..0000000
--- a/blt3.0/src/bltVecCmd.c
+++ /dev/null
@@ -1,2414 +0,0 @@
-
-/*
- * bltVecCmd.c --
- *
- * This module implements vector data objects.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Code for binary data read operation was donated by Harold Kirsch.
- *
- */
-
-/*
- * TODO:
- *	o Add H. Kirsch's vector binary read operation
- *		x binread file0
- *		x binread -file file0
- *
- *	o Add ASCII/binary file reader
- *		x read fileName
- *
- *	o Allow Tcl-based client notifications.
- *		vector x
- *		x notify call Display
- *		x notify delete Display
- *		x notify reorder #1 #2
- */
-
-#include "bltVecInt.h"
-#include "bltOp.h"
-#include "bltNsUtil.h"
-#include "bltSwitch.h"
-
-typedef int (VectorCmdProc)(Vector *vPtr, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv);
-
-static Blt_SwitchParseProc ObjToFFTVector;
-static Blt_SwitchCustom fftVectorSwitch = {
-    ObjToFFTVector, NULL, (ClientData)0,
-};
-
-static Blt_SwitchParseProc ObjToIndex;
-static Blt_SwitchCustom indexSwitch = {
-    ObjToIndex, NULL, (ClientData)0,
-};
-
-typedef struct {
-    Tcl_Obj *formatObjPtr;
-    int from, to;
-} PrintSwitches;
-
-static Blt_SwitchSpec printSwitches[] = 
-{
-    {BLT_SWITCH_OBJ,    "-format", "string",
-	Blt_Offset(PrintSwitches, formatObjPtr), 0},
-    {BLT_SWITCH_CUSTOM, "-from",   "index",
-	Blt_Offset(PrintSwitches, from),         0, 0, &indexSwitch},
-    {BLT_SWITCH_CUSTOM, "-to",     "index",
-	Blt_Offset(PrintSwitches, to),           0, 0, &indexSwitch},
-    {BLT_SWITCH_END}
-};
-
-
-typedef struct {
-    int flags;
-} SortSwitches;
-
-#define SORT_DECREASING (1<<0)
-#define SORT_UNIQUE	(1<<1)
-
-static Blt_SwitchSpec sortSwitches[] = 
-{
-    {BLT_SWITCH_BITMASK, "-decreasing", "",
-	Blt_Offset(SortSwitches, flags),   0, SORT_DECREASING},
-    {BLT_SWITCH_BITMASK, "-reverse",   "",
-	Blt_Offset(SortSwitches, flags),   0, SORT_DECREASING},
-    {BLT_SWITCH_BITMASK, "-uniq",     "", 
-	Blt_Offset(SortSwitches, flags),   0, SORT_UNIQUE},
-    {BLT_SWITCH_END}
-};
-
-typedef struct {
-    double delta;
-    Vector *imagPtr;	/* Vector containing imaginary part. */
-    Vector *freqPtr;	/* Vector containing frequencies. */
-    VectorInterpData *dataPtr;
-    int mask;			/* Flags controlling FFT. */
-} FFTData;
-
-
-static Blt_SwitchSpec fftSwitches[] = {
-    {BLT_SWITCH_CUSTOM, "-imagpart",    "vector",
-	Blt_Offset(FFTData, imagPtr), 0, 0, &fftVectorSwitch},
-    {BLT_SWITCH_BITMASK, "-noconstant", "",
-	Blt_Offset(FFTData, mask), 0, FFT_NO_CONSTANT},
-    {BLT_SWITCH_BITMASK, "-spectrum", "",
-	  Blt_Offset(FFTData, mask), 0, FFT_SPECTRUM},
-    {BLT_SWITCH_BITMASK, "-bartlett",  "",
-	 Blt_Offset(FFTData, mask), 0, FFT_BARTLETT},
-    {BLT_SWITCH_DOUBLE, "-delta",   "float",
-	Blt_Offset(FFTData, mask), 0, 0, },
-    {BLT_SWITCH_CUSTOM, "-frequencies", "vector",
-	Blt_Offset(FFTData, freqPtr), 0, 0, &fftVectorSwitch},
-    {BLT_SWITCH_END}
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToFFTVector --
- *
- *	Convert a string representing a vector into its vector structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToFFTVector(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* Name of vector. */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    FFTData *dataPtr = (FFTData *)record;
-    Vector *vPtr;
-    Vector **vPtrPtr = (Vector **)(record + offset);
-    int isNew;			/* Not used. */
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    vPtr = Blt_Vec_Create(dataPtr->dataPtr, string, string, string, &isNew);
-    if (vPtr == NULL) {
-	return TCL_ERROR;
-    }
-    *vPtrPtr = vPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ObjToIndex --
- *
- *	Convert a string representing a vector into its vector structure.
- *
- * Results:
- *	The return value is a standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ObjToIndex(
-    ClientData clientData,	/* Contains the vector in question to verify
-				 * its length. */
-    Tcl_Interp *interp,		/* Interpreter to send results back to */
-    const char *switchName,	/* Not used. */
-    Tcl_Obj *objPtr,		/* Name of vector. */
-    char *record,		/* Structure record */
-    int offset,			/* Offset to field in structure */
-    int flags)			/* Not used. */
-{
-    Vector *vPtr = clientData;
-    int *indexPtr = (int *)(record + offset);
-    int index;
-
-    if (Blt_Vec_GetIndex(interp, vPtr, Tcl_GetString(objPtr), &index, 
-	INDEX_CHECK, (Blt_VectorIndexProc **)NULL) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    *indexPtr = index;
-    return TCL_OK;
-
-}
-
-static Tcl_Obj *
-GetValues(Vector *vPtr, int first, int last)
-{ 
-    Tcl_Obj *listObjPtr;
-    double *vp, *vend;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (vp = vPtr->valueArr + first, vend = vPtr->valueArr + last; vp <= vend;
-	vp++) { 
-	Tcl_ListObjAppendElement(vPtr->interp, listObjPtr, 
-		Tcl_NewDoubleObj(*vp));
-    } 
-    return listObjPtr;
-}
-
-static void
-ReplicateValue(Vector *vPtr, int first, int last, double value)
-{ 
-    double *vp, *vend;
- 
-    for (vp = vPtr->valueArr + first, vend = vPtr->valueArr + last; 
-	 vp <= vend; vp++) { 
-	*vp = value; 
-    } 
-    vPtr->notifyFlags |= UPDATE_RANGE; 
-}
-
-static int
-CopyList(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    if (Blt_Vec_SetLength(interp, vPtr, objc) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    for (i = 0; i < objc; i++) {
-	double value;
-
-	if (Blt_ExprDoubleFromObj(interp, objv[i], &value) != TCL_OK) {
-	    Blt_Vec_SetLength(interp, vPtr, i);
-	    return TCL_ERROR;
-	}
-	vPtr->valueArr[i] = value;
-    }
-    return TCL_OK;
-}
-
-static int
-AppendVector(Vector *destPtr, Vector *srcPtr)
-{
-    size_t nBytes;
-    size_t oldSize, newSize;
-
-    oldSize = destPtr->length;
-    newSize = oldSize + srcPtr->last - srcPtr->first + 1;
-    if (Blt_Vec_ChangeLength(destPtr->interp, destPtr, newSize) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    nBytes = (newSize - oldSize) * sizeof(double);
-    memcpy((char *)(destPtr->valueArr + oldSize),
-	(srcPtr->valueArr + srcPtr->first), nBytes);
-    destPtr->notifyFlags |= UPDATE_RANGE;
-    return TCL_OK;
-}
-
-static int
-AppendList(Vector *vPtr, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Interp *interp = vPtr->interp;
-    int count;
-    int i;
-    double value;
-    int oldSize;
-
-    oldSize = vPtr->length;
-    if (Blt_Vec_ChangeLength(interp, vPtr, vPtr->length + objc) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    count = oldSize;
-    for (i = 0; i < objc; i++) {
-	if (Blt_ExprDoubleFromObj(interp, objv[i], &value) != TCL_OK) {
-	    Blt_Vec_ChangeLength(interp, vPtr, count);
-	    return TCL_ERROR;
-	}
-	vPtr->valueArr[count++] = value;
-    }
-    vPtr->notifyFlags |= UPDATE_RANGE;
-    return TCL_OK;
-}
-
-/* Vector instance option commands */
-
-/*
- *---------------------------------------------------------------------------
- *
- * AppendOp --
- *
- *	Appends one of more TCL lists of values, or vector objects onto the
- *	end of the current vector object.
- *
- * Results:
- *	A standard TCL result.  If a current vector can't be created, 
- *	resized, any of the named vectors can't be found, or one of lists of
- *	values is invalid, TCL_ERROR is returned.
- *
- * Side Effects:
- *	Clients of current vector will be notified of the change.
- *
- *---------------------------------------------------------------------------
- */
-static int
-AppendOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    int result;
-    Vector *v2Ptr;
-
-    for (i = 2; i < objc; i++) {
-	v2Ptr = Blt_Vec_ParseElement((Tcl_Interp *)NULL, vPtr->dataPtr, 
-	       Tcl_GetString(objv[i]), (const char **)NULL, NS_SEARCH_BOTH);
-	if (v2Ptr != NULL) {
-	    result = AppendVector(vPtr, v2Ptr);
-	} else {
-	    int nElem;
-	    Tcl_Obj **elemObjArr;
-
-	    if (Tcl_ListObjGetElements(interp, objv[i], &nElem, &elemObjArr) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    result = AppendList(vPtr, nElem, elemObjArr);
-	}
-	if (result != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (objc > 2) {
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ClearOp --
- *
- *	Deletes all the accumulated array indices for the TCL array associated
- *	will the vector.  This routine can be used to free excess memory from
- *	a large vector.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- * Side Effects:
- *	Memory used for the entries of the TCL array variable is freed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ClearOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Blt_Vec_FlushCache(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes the given indices from the vector.  If no indices are provided
- *	the entire vector is deleted.
- *
- * Results:
- *	A standard TCL result.  If any of the given indices is invalid,
- *	interp->result will an error message and TCL_ERROR is returned.
- *
- * Side Effects:
- *	The clients of the vector will be notified of the vector
- *	deletions.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    unsigned char *unsetArr;
-    int i, j;
-    int count;
-    char *string;
-
-    /* FIXME: Don't delete vector with no indices.  */
-    if (objc == 2) {
-	Blt_Vec_Free(vPtr);
-	return TCL_OK;
-    }
-
-    /* Allocate an "unset" bitmap the size of the vector. */
-    unsetArr = Blt_AssertCalloc(sizeof(unsigned char), (vPtr->length + 7) / 8);
-#define SetBit(i) \
-    unsetArr[(i) >> 3] |= (1 << ((i) & 0x07))
-#define GetBit(i) \
-    (unsetArr[(i) >> 3] & (1 << ((i) & 0x07)))
-
-    for (i = 2; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if (Blt_Vec_GetIndexRange(interp, vPtr, string, 
-		(INDEX_COLON | INDEX_CHECK), (Blt_VectorIndexProc **) NULL) 
-		!= TCL_OK) {
-	    Blt_Free(unsetArr);
-	    return TCL_ERROR;
-	}
-	for (j = vPtr->first; j <= vPtr->last; j++) {
-	    SetBit(j);		/* Mark the range of elements for deletion. */
-	}
-    }
-    count = 0;
-    for (i = 0; i < vPtr->length; i++) {
-	if (GetBit(i)) {
-	    continue;		/* Skip elements marked for deletion. */
-	}
-	if (count < i) {
-	    vPtr->valueArr[count] = vPtr->valueArr[i];
-	}
-	count++;
-    }
-    Blt_Free(unsetArr);
-    vPtr->length = count;
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DupOp --
- *
- *	Creates one or more duplicates of the vector object.
- *
- * Results:
- *	A standard TCL result.  If a new vector can't be created,
- *      or and existing vector resized, TCL_ERROR is returned.
- *
- * Side Effects:
- *	Clients of existing vectors will be notified of the change.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DupOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Vector *v2Ptr;
-	char *name;
-	int isNew;
-
-	name = Tcl_GetString(objv[i]);
-	v2Ptr = Blt_Vec_Create(vPtr->dataPtr, name, name, name, &isNew);
-	if (v2Ptr == NULL) {
-	    return TCL_ERROR;
-	}
-	if (v2Ptr == vPtr) {
-	    continue;
-	}
-	if (Blt_Vec_Duplicate(v2Ptr, vPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (!isNew) {
-	    if (v2Ptr->flush) {
-		Blt_Vec_FlushCache(v2Ptr);
-	    }
-	    Blt_Vec_UpdateClients(v2Ptr);
-	}
-    }
-    return TCL_OK;
-}
-
-
-/* spinellia at acm.org START */
-
-/* fft implementation */
-/*ARGSUSED*/
-static int
-FFTOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Vector *v2Ptr = NULL;
-    int isNew;
-    FFTData data;
-    char *realVecName;
-
-    memset(&data, 0, sizeof(data));
-    data.delta = 1.0;
-
-    realVecName = Tcl_GetString(objv[2]);
-    v2Ptr = Blt_Vec_Create(vPtr->dataPtr, realVecName, realVecName, 
-	realVecName, &isNew);
-    if (v2Ptr == NULL) {
-        return TCL_ERROR;
-    }
-    if (v2Ptr == vPtr) {
-	Tcl_AppendResult(interp, "real vector \"", realVecName, "\"", 
-		" can't be the same as the source", (char *)NULL);
-        return TCL_ERROR;
-    }
-    if (Blt_ParseSwitches(interp, fftSwitches, objc - 3, objv + 3, &data, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (Blt_Vec_FFT(interp, v2Ptr, data.imagPtr, data.freqPtr, data.delta,
-	      data.mask, vPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /* Update bookkeeping. */
-    if (!isNew) {
-	if (v2Ptr->flush) {
-	    Blt_Vec_FlushCache(v2Ptr);
-	}
-	Blt_Vec_UpdateClients(v2Ptr);
-    }
-    if (data.imagPtr != NULL) {
-        if (data.imagPtr->flush) {
-            Blt_Vec_FlushCache(data.imagPtr);
-        }
-        Blt_Vec_UpdateClients(data.imagPtr);
-    }
-    if (data.freqPtr != NULL) {
-        if (data.freqPtr->flush) {
-            Blt_Vec_FlushCache(data.freqPtr);
-        }
-        Blt_Vec_UpdateClients(data.freqPtr);
-    }
-    return TCL_OK;
-}	
-
-/*ARGSUSED*/
-static int
-InverseFFTOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int isNew;
-    char *name;
-    Vector *srcImagPtr;
-    Vector *destRealPtr;
-    Vector *destImagPtr;
-
-    name = Tcl_GetString(objv[2]);
-    if (Blt_Vec_LookupName(vPtr->dataPtr, name, &srcImagPtr) != TCL_OK ) {
-	return TCL_ERROR;
-    }
-    name = Tcl_GetString(objv[3]);
-    destRealPtr = Blt_Vec_Create(vPtr->dataPtr, name, name, name, &isNew);
-    name = Tcl_GetString(objv[4]);
-    destImagPtr = Blt_Vec_Create(vPtr->dataPtr, name, name, name, &isNew);
-
-    if (Blt_Vec_InverseFFT(interp, srcImagPtr, destRealPtr, destImagPtr, vPtr) 
-	!= TCL_OK ){
-	return TCL_ERROR;
-    }
-    if (destRealPtr->flush) {
-	Blt_Vec_FlushCache(destRealPtr);
-    }
-    Blt_Vec_UpdateClients(destRealPtr);
-
-    if (destImagPtr->flush) {
-	Blt_Vec_FlushCache(destImagPtr);
-    }
-    Blt_Vec_UpdateClients(destImagPtr);
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * IndexOp --
- *
- *	Sets or reads the value of the index.  This simulates what the
- *	vector's variable does.
- *
- * Results:
- *	A standard TCL result.  If the index is invalid,
- *	interp->result will an error message and TCL_ERROR is returned.
- *	Otherwise interp->result will contain the values.
- *
- *---------------------------------------------------------------------------
- */
-static int
-IndexOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int first, last;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    if (Blt_Vec_GetIndexRange(interp, vPtr, string, INDEX_ALL_FLAGS, 
-		(Blt_VectorIndexProc **) NULL) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    first = vPtr->first, last = vPtr->last;
-    if (objc == 3) {
-	Tcl_Obj *listObjPtr;
-
-	if (first == vPtr->length) {
-	    Tcl_AppendResult(interp, "can't get index \"", string, "\"",
-		(char *)NULL);
-	    return TCL_ERROR;	/* Can't read from index "++end" */
-	}
-	listObjPtr = GetValues(vPtr, first, last);
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	double value;
-
-	/* FIXME: huh? Why set values here?.  */
-	if (first == SPECIAL_INDEX) {
-	    Tcl_AppendResult(interp, "can't set index \"", string, "\"",
-		(char *)NULL);
-	    return TCL_ERROR;	/* Tried to set "min" or "max" */
-	}
-	if (Blt_ExprDoubleFromObj(interp, objv[3], &value) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (first == vPtr->length) {
-	    if (Blt_Vec_ChangeLength(interp, vPtr, vPtr->length + 1) 
-		!= TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-	ReplicateValue(vPtr, first, last, value);
-	Tcl_SetObjResult(interp, objv[3]);
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * LengthOp --
- *
- *	Returns the length of the vector.  If a new size is given, the
- *	vector is resized to the new vector.
- *
- * Results:
- *	A standard TCL result.  If the new length is invalid,
- *	interp->result will an error message and TCL_ERROR is returned.
- *	Otherwise interp->result will contain the length of the vector.
- *
- *---------------------------------------------------------------------------
- */
-static int
-LengthOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	int nElem;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &nElem) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (nElem < 0) {
-	    Tcl_AppendResult(interp, "bad vector size \"", 
-		Tcl_GetString(objv[2]), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if ((Blt_Vec_SetSize(interp, vPtr, nElem) != TCL_OK) ||
-	    (Blt_Vec_SetLength(interp, vPtr, nElem) != TCL_OK)) {
-	    return TCL_ERROR;
-	} 
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), vPtr->length);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapOp --
- *
- *	Queries or sets the offset of the array index from the base
- *	address of the data array of values.
- *
- * Results:
- *	A standard TCL result.  If the source vector doesn't exist
- *	or the source list is not a valid list of numbers, TCL_ERROR
- *	returned.  Otherwise TCL_OK is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MapOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc > 2) {
-	if (Blt_Vec_MapVariable(interp, vPtr, Tcl_GetString(objv[2])) 
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (vPtr->arrayName != NULL) {
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), vPtr->arrayName, -1);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MaxOp --
- *
- *	Returns the maximum value of the vector.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MaxOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetDoubleObj(Tcl_GetObjResult(interp), Blt_Vec_Max(vPtr));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MergeOp --
- *
- *	Merges the values from the given vectors to the current vector.
- *
- * Results:
- *	A standard TCL result.  If any of the given vectors differ in size,
- *	TCL_ERROR is returned.  Otherwise TCL_OK is returned and the
- *	vector data will contain merged values of the given vectors.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MergeOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Vector **vecArr;
-    int refSize, nElem;
-    int i;
-    double *valuePtr, *valueArr;
-    Vector **vPtrPtr;
-    
-    /* Allocate an array of vector pointers of each vector to be
-     * merged in the current vector.  */
-    vecArr = Blt_AssertMalloc(sizeof(Vector *) * objc);
-    vPtrPtr = vecArr;
-
-    refSize = -1;
-    nElem = 0;
-    for (i = 2; i < objc; i++) {
-	Vector *v2Ptr;
-	int length;
-
-	if (Blt_Vec_LookupName(vPtr->dataPtr, Tcl_GetString(objv[i]), &v2Ptr)
-		!= TCL_OK) {
-	    Blt_Free(vecArr);
-	    return TCL_ERROR;
-	}
-	/* Check that all the vectors are the same length */
-	length = v2Ptr->last - v2Ptr->first + 1;
-	if (refSize < 0) {
-	    refSize = length;
-	} else if (length != refSize) {
-	    Tcl_AppendResult(vPtr->interp, "vectors \"", vPtr->name,
-		"\" and \"", v2Ptr->name, "\" differ in length",
-		(char *)NULL);
-	    Blt_Free(vecArr);
-	    return TCL_ERROR;
-	}
-	*vPtrPtr++ = v2Ptr;
-	nElem += refSize;
-    }
-    *vPtrPtr = NULL;
-
-    valueArr = Blt_Malloc(sizeof(double) * nElem);
-    if (valueArr == NULL) {
-	Tcl_AppendResult(vPtr->interp, "not enough memory to allocate ", 
-		 Blt_Itoa(nElem), " vector elements", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Merge the values from each of the vectors into the current vector */
-    valuePtr = valueArr;
-    for (i = 0; i < refSize; i++) {
-	Vector **vpp;
-
-	for (vpp = vecArr; *vpp != NULL; vpp++) {
-	    *valuePtr++ = (*vpp)->valueArr[i + (*vpp)->first];
-	}
-    }
-    Blt_Free(vecArr);
-    Blt_Vec_Reset(vPtr, valueArr, nElem, nElem, TCL_DYNAMIC);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MinOp --
- *
- *	Returns the minimum value of the vector.
- *
- * Results:
- *	A standard TCL result. 
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-MinOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_SetDoubleObj(Tcl_GetObjResult(interp), Blt_Vec_Min(vPtr));
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NormalizeOp --
- *
- *	Normalizes the vector.
- *
- * Results:
- *	A standard TCL result.  If the density is invalid, TCL_ERROR
- *	is returned.  Otherwise TCL_OK is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NormalizeOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-    double range;
-
-    Blt_Vec_UpdateRange(vPtr);
-    range = vPtr->max - vPtr->min;
-    if (objc > 2) {
-	Vector *v2Ptr;
-	int isNew;
-	char *string;
-
-	string = Tcl_GetString(objv[2]);
-	v2Ptr = Blt_Vec_Create(vPtr->dataPtr, string, string, string, &isNew);
-	if (v2Ptr == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Blt_Vec_SetLength(interp, v2Ptr, vPtr->length) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	for (i = 0; i < vPtr->length; i++) {
-	    v2Ptr->valueArr[i] = (vPtr->valueArr[i] - vPtr->min) / range;
-	}
-	Blt_Vec_UpdateRange(v2Ptr);
-	if (!isNew) {
-	    if (v2Ptr->flush) {
-		Blt_Vec_FlushCache(v2Ptr);
-	    }
-	    Blt_Vec_UpdateClients(v2Ptr);
-	}
-    } else {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (i = 0; i < vPtr->length; i++) {
-	    double norm;
-
-	    norm = (vPtr->valueArr[i] - vPtr->min) / range;
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(norm));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifyOp --
- *
- *	Notify clients of vector.
- *
- * Results:
- *	A standard TCL result.  If any of the given vectors differ in size,
- *	TCL_ERROR is returned.  Otherwise TCL_OK is returned and the
- *	vector data will contain merged values of the given vectors.
- *
- *  x vector notify now
- *  x vector notify always
- *  x vector notify whenidle
- *  x vector notify update {}
- *  x vector notify delete {}
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NotifyOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int option;
-    int bool;
-    enum optionIndices {
-	OPTION_ALWAYS, OPTION_NEVER, OPTION_WHENIDLE, 
-	OPTION_NOW, OPTION_CANCEL, OPTION_PENDING
-    };
-    static const char *optionArr[] = {
-	"always", "never", "whenidle", "now", "cancel", "pending", NULL
-    };
-
-    if (Tcl_GetIndexFromObj(interp, objv[2], optionArr, "qualifier", TCL_EXACT,
-	    &option) != TCL_OK) {
-	return TCL_OK;
-    }
-    switch (option) {
-    case OPTION_ALWAYS:
-	vPtr->notifyFlags &= ~NOTIFY_WHEN_MASK;
-	vPtr->notifyFlags |= NOTIFY_ALWAYS;
-	break;
-    case OPTION_NEVER:
-	vPtr->notifyFlags &= ~NOTIFY_WHEN_MASK;
-	vPtr->notifyFlags |= NOTIFY_NEVER;
-	break;
-    case OPTION_WHENIDLE:
-	vPtr->notifyFlags &= ~NOTIFY_WHEN_MASK;
-	vPtr->notifyFlags |= NOTIFY_WHENIDLE;
-	break;
-    case OPTION_NOW:
-	/* FIXME: How does this play when an update is pending? */
-	Blt_Vec_NotifyClients(vPtr);
-	break;
-    case OPTION_CANCEL:
-	if (vPtr->notifyFlags & NOTIFY_PENDING) {
-	    vPtr->notifyFlags &= ~NOTIFY_PENDING;
-	    Tcl_CancelIdleCall(Blt_Vec_NotifyClients, (ClientData)vPtr);
-	}
-	break;
-    case OPTION_PENDING:
-	bool = (vPtr->notifyFlags & NOTIFY_PENDING);
-	Tcl_SetBooleanObj(Tcl_GetObjResult(interp), bool);
-	break;
-    }	
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PopulateOp --
- *
- *	Creates or resizes a new vector based upon the density specified.
- *
- * Results:
- *	A standard TCL result.  If the density is invalid, TCL_ERROR
- *	is returned.  Otherwise TCL_OK is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PopulateOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Vector *v2Ptr;
-    int size, density;
-    int isNew;
-    int i, j;
-    double *valuePtr;
-    int count;
-    char *string;
-
-    string = Tcl_GetString(objv[2]);
-    v2Ptr = Blt_Vec_Create(vPtr->dataPtr, string, string, string, &isNew);
-    if (v2Ptr == NULL) {
-	return TCL_ERROR;
-    }
-    if (vPtr->length == 0) {
-	return TCL_OK;		/* Source vector is empty. */
-    }
-    if (Tcl_GetIntFromObj(interp, objv[3], &density) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (density < 1) {
-	Tcl_AppendResult(interp, "bad density \"", Tcl_GetString(objv[3]), 
-		"\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    size = (vPtr->length - 1) * (density + 1) + 1;
-    if (Blt_Vec_SetLength(interp, v2Ptr, size) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    count = 0;
-    valuePtr = v2Ptr->valueArr;
-    for (i = 0; i < (vPtr->length - 1); i++) {
-	double slice, range;
-
-	range = vPtr->valueArr[i + 1] - vPtr->valueArr[i];
-	slice = range / (double)(density + 1);
-	for (j = 0; j <= density; j++) {
-	    *valuePtr = vPtr->valueArr[i] + (slice * (double)j);
-	    valuePtr++;
-	    count++;
-	}
-    }
-    count++;
-    *valuePtr = vPtr->valueArr[i];
-    assert(count == v2Ptr->length);
-    if (!isNew) {
-	if (v2Ptr->flush) {
-	    Blt_Vec_FlushCache(v2Ptr);
-	}
-	Blt_Vec_UpdateClients(v2Ptr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrintOp --
- *
- *	Print the vector.
- *
- * Results:
- *	A standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PrintOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    PrintSwitches switches;
-
-    switches.formatObjPtr = NULL;
-    switches.from = 0;
-    switches.to = vPtr->length - 1;
-    indexSwitch.clientData = vPtr;
-    if (Blt_ParseSwitches(interp, printSwitches, objc - 2, objv + 2, &switches, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (switches.from > switches.to) {
-	int tmp;
-	/* swap positions. */
-	tmp = switches.to;
-	switches.to = switches.from;
-	switches.from = tmp;
-    }
-    if (switches.formatObjPtr == NULL) {
-	Tcl_Obj *listObjPtr;
-	int i;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	for (i = switches.from; i <= switches.to; i++) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(vPtr->valueArr[i]));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	Tcl_DString ds;
-	char buffer[200];
-	const char *fmt;
-	int i;
-
-	Tcl_DStringInit(&ds);
-	fmt = Tcl_GetString(switches.formatObjPtr);
-	for (i = switches.from; i <= switches.to; i++) {
-	    sprintf(buffer, fmt, vPtr->valueArr[i]);
-	    Tcl_DStringAppend(&ds, buffer, -1);
-	}
-	Tcl_DStringResult(interp, &ds);
-	Tcl_DStringFree(&ds);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RangeOp --
- *
- *	Returns a TCL list of the range of vector values specified.
- *
- * Results:
- *	A standard TCL result.  If the given range is invalid, TCL_ERROR
- *	is returned.  Otherwise TCL_OK is returned and interp->result
- *	will contain the list of values.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RangeOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Obj *listObjPtr;
-    int first, last;
-    int i;
-
-    if (objc == 2) {
-	first = 0;
-	last = vPtr->length - 1;
-    } else if (objc == 4) {
-	if ((Blt_Vec_GetIndex(interp, vPtr, Tcl_GetString(objv[2]), &first, 
-		INDEX_CHECK, (Blt_VectorIndexProc **) NULL) != TCL_OK) ||
-	    (Blt_Vec_GetIndex(interp, vPtr, Tcl_GetString(objv[3]), &last, 
-		INDEX_CHECK, (Blt_VectorIndexProc **) NULL) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-    } else {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " range ?first last?", (char *)NULL);
-	return TCL_ERROR;
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (first > last) {
-	/* Return the list reversed */
-	for (i = last; i <= first; i++) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(vPtr->valueArr[i]));
-	}
-    } else {
-	for (i = first; i <= last; i++) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewDoubleObj(vPtr->valueArr[i]));
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InRange --
- *
- *	Determines if a value lies within a given range.
- *
- *	The value is normalized and compared against the interval
- *	[0..1], where 0.0 is the minimum and 1.0 is the maximum.
- *	DBL_EPSILON is the smallest number that can be represented
- *	on the host machine, such that (1.0 + epsilon) != 1.0.
- *
- *	Please note, min cannot be greater than max.
- *
- * Results:
- *	If the value is within of the interval [min..max], 1 is 
- *	returned; 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-INLINE static int
-InRange(double value, double min, double max)
-{
-    double range;
-
-    range = max - min;
-    if (range < DBL_EPSILON) {
-	return (FABS(max - value) < DBL_EPSILON);
-    } else {
-	double norm;
-
-	norm = (value - min) / range;
-	return ((norm >= -DBL_EPSILON) && ((norm - 1.0) < DBL_EPSILON));
-    }
-}
-
-enum NativeFormats {
-    FMT_UNKNOWN = -1,
-    FMT_UCHAR, FMT_CHAR,
-    FMT_USHORT, FMT_SHORT,
-    FMT_UINT, FMT_INT,
-    FMT_ULONG, FMT_LONG,
-    FMT_FLOAT, FMT_DOUBLE
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetBinaryFormat
- *
- *      Translates a format string into a native type.  Valid formats are
- *
- *		signed		i1, i2, i4, i8
- *		unsigned 	u1, u2, u4, u8
- *		real		r4, r8, r16
- *
- *	There must be a corresponding native type.  For example, this for
- *	reading 2-byte binary integers from an instrument and converting them
- *	to unsigned shorts or ints.
- *
- *---------------------------------------------------------------------------
- */
-static enum NativeFormats
-GetBinaryFormat(Tcl_Interp *interp, char *string, int *sizePtr)
-{
-    char c;
-
-    c = tolower(string[0]);
-    if (Tcl_GetInt(interp, string + 1, sizePtr) != TCL_OK) {
-	Tcl_AppendResult(interp, "unknown binary format \"", string,
-	    "\": incorrect byte size", (char *)NULL);
-	return FMT_UNKNOWN;
-    }
-    switch (c) {
-    case 'r':
-	if (*sizePtr == sizeof(double)) {
-	    return FMT_DOUBLE;
-	} else if (*sizePtr == sizeof(float)) {
-	    return FMT_FLOAT;
-	}
-	break;
-
-    case 'i':
-	if (*sizePtr == sizeof(char)) {
-	    return FMT_CHAR;
-	} else if (*sizePtr == sizeof(int)) {
-	    return FMT_INT;
-	} else if (*sizePtr == sizeof(long)) {
-	    return FMT_LONG;
-	} else if (*sizePtr == sizeof(short)) {
-	    return FMT_SHORT;
-	}
-	break;
-
-    case 'u':
-	if (*sizePtr == sizeof(unsigned char)) {
-	    return FMT_UCHAR;
-	} else if (*sizePtr == sizeof(unsigned int)) {
-	    return FMT_UINT;
-	} else if (*sizePtr == sizeof(unsigned long)) {
-	    return FMT_ULONG;
-	} else if (*sizePtr == sizeof(unsigned short)) {
-	    return FMT_USHORT;
-	}
-	break;
-
-    default:
-	Tcl_AppendResult(interp, "unknown binary format \"", string,
-	    "\": should be either i#, r#, u# (where # is size in bytes)",
-	    (char *)NULL);
-	return FMT_UNKNOWN;
-    }
-    Tcl_AppendResult(interp, "can't handle format \"", string, "\"", 
-		     (char *)NULL);
-    return FMT_UNKNOWN;
-}
-
-static int
-CopyValues(Vector *vPtr, char *byteArr, enum NativeFormats fmt, int size, 
-	int length, int swap, int *indexPtr)
-{
-    int i, n;
-    int newSize;
-
-    if ((swap) && (size > 1)) {
-	int nBytes = size * length;
-	unsigned char *p;
-	int left, right;
-
-	for (i = 0; i < nBytes; i += size) {
-	    p = (unsigned char *)(byteArr + i);
-	    for (left = 0, right = size - 1; left < right; left++, right--) {
-		p[left] ^= p[right];
-		p[right] ^= p[left];
-		p[left] ^= p[right];
-	    }
-
-	}
-    }
-    newSize = *indexPtr + length;
-    if (newSize > vPtr->length) {
-	if (Blt_Vec_ChangeLength(vPtr->interp, vPtr, newSize) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-#define CopyArrayToVector(vPtr, arr) \
-    for (i = 0, n = *indexPtr; i < length; i++, n++) { \
-	(vPtr)->valueArr[n] = (double)(arr)[i]; \
-    }
-
-    switch (fmt) {
-    case FMT_CHAR:
-	CopyArrayToVector(vPtr, (char *)byteArr);
-	break;
-
-    case FMT_UCHAR:
-	CopyArrayToVector(vPtr, (unsigned char *)byteArr);
-	break;
-
-    case FMT_INT:
-	CopyArrayToVector(vPtr, (int *)byteArr);
-	break;
-
-    case FMT_UINT:
-	CopyArrayToVector(vPtr, (unsigned int *)byteArr);
-	break;
-
-    case FMT_LONG:
-	CopyArrayToVector(vPtr, (long *)byteArr);
-	break;
-
-    case FMT_ULONG:
-	CopyArrayToVector(vPtr, (unsigned long *)byteArr);
-	break;
-
-    case FMT_SHORT:
-	CopyArrayToVector(vPtr, (short int *)byteArr);
-	break;
-
-    case FMT_USHORT:
-	CopyArrayToVector(vPtr, (unsigned short int *)byteArr);
-	break;
-
-    case FMT_FLOAT:
-	CopyArrayToVector(vPtr, (float *)byteArr);
-	break;
-
-    case FMT_DOUBLE:
-	CopyArrayToVector(vPtr, (double *)byteArr);
-	break;
-
-    case FMT_UNKNOWN:
-	break;
-    }
-    *indexPtr += length;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * BinreadOp --
- *
- *	Reads binary values from a TCL channel. Values are either appended to
- *	the end of the vector or placed at a given index (using the "-at"
- *	option), overwriting existing values.  Data is read until EOF is found
- *	on the channel or a specified number of values are read.  (note that
- *	this is not necessarily the same as the number of bytes).
- *
- *	The following flags are supported:
- *		-swap		Swap bytes
- *		-at index	Start writing data at the index.
- *		-format fmt	Specifies the format of the data.
- *
- *	This binary reader was created and graciously donated by Harald Kirsch
- *	(kir at iitb.fhg.de).  Anything that's wrong is due to my (gah) munging
- *	of the code.
- *
- * Results:
- *	Returns a standard TCL result. The interpreter result will contain the
- *	number of values (not the number of bytes) read.
- *
- * Caveats:
- *	Channel reads must end on an element boundary.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-BinreadOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tcl_Channel channel;
-    char *byteArr;
-    char *string;
-    enum NativeFormats fmt;
-    int arraySize, bytesRead;
-    int count, total;
-    int first;
-    int size, length, mode;
-    int swap;
-    int i;
-
-    string = Tcl_GetString(objv[2]);
-    channel = Tcl_GetChannel(interp, string, &mode);
-    if (channel == NULL) {
-	return TCL_ERROR;
-    }
-    if ((mode & TCL_READABLE) == 0) {
-	Tcl_AppendResult(interp, "channel \"", string,
-	    "\" wasn't opened for reading", (char *)NULL);
-	return TCL_ERROR;
-    }
-    first = vPtr->length;
-    fmt = FMT_DOUBLE;
-    size = sizeof(double);
-    swap = FALSE;
-    count = 0;
-
-    if (objc > 3) {
-	string = Tcl_GetString(objv[3]);
-	if (string[0] != '-') {
-	    long int value;
-	    /* Get the number of values to read.  */
-	    if (Tcl_GetLongFromObj(interp, objv[3], &value) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (value < 0) {
-		Tcl_AppendResult(interp, "count can't be negative", 
-				 (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    count = (size_t)value;
-	    objc--, objv++;
-	}
-    }
-    /* Process any option-value pairs that remain.  */
-    for (i = 3; i < objc; i++) {
-	string = Tcl_GetString(objv[i]);
-	if (strcmp(string, "-swap") == 0) {
-	    swap = TRUE;
-	} else if (strcmp(string, "-format") == 0) {
-	    i++;
-	    if (i >= objc) {
-		Tcl_AppendResult(interp, "missing arg after \"", string,
-		    "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    string = Tcl_GetString(objv[i]);
-	    fmt = GetBinaryFormat(interp, string, &size);
-	    if (fmt == FMT_UNKNOWN) {
-		return TCL_ERROR;
-	    }
-	} else if (strcmp(string, "-at") == 0) {
-	    i++;
-	    if (i >= objc) {
-		Tcl_AppendResult(interp, "missing arg after \"", string,
-		    "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    string = Tcl_GetString(objv[i]);
-	    if (Blt_Vec_GetIndex(interp, vPtr, string, &first, 0, 
-			 (Blt_VectorIndexProc **)NULL) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (first > vPtr->length) {
-		Tcl_AppendResult(interp, "index \"", string,
-		    "\" is out of range", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	}
-    }
-
-#define BUFFER_SIZE 1024
-    if (count == 0) {
-	arraySize = BUFFER_SIZE * size;
-    } else {
-	arraySize = count * size;
-    }
-
-    byteArr = Blt_AssertMalloc(arraySize);
-    /* FIXME: restore old channel translation later? */
-    if (Tcl_SetChannelOption(interp, channel, "-translation",
-	    "binary") != TCL_OK) {
-	return TCL_ERROR;
-    }
-    total = 0;
-    while (!Tcl_Eof(channel)) {
-	bytesRead = Tcl_Read(channel, byteArr, arraySize);
-	if (bytesRead < 0) {
-	    Tcl_AppendResult(interp, "error reading channel: ",
-		Tcl_PosixError(interp), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if ((bytesRead % size) != 0) {
-	    Tcl_AppendResult(interp, "error reading channel: short read",
-		(char *)NULL);
-	    return TCL_ERROR;
-	}
-	length = bytesRead / size;
-	if (CopyValues(vPtr, byteArr, fmt, size, length, swap, &first)
-	    != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	total += length;
-	if (count > 0) {
-	    break;
-	}
-    }
-    Blt_Free(byteArr);
-
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-
-    /* Set the result as the number of values read.  */
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), total);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchOp --
- *
- *	Searches for a value in the vector. Returns the indices of all vector
- *	elements matching a particular value.
- *
- * Results:
- *	Always returns TCL_OK.  interp->result will contain a list of the
- *	indices of array elements matching value. If no elements match,
- *	interp->result will contain the empty string.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SearchOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    double min, max;
-    int i;
-    int wantValue;
-    char *string;
-    Tcl_Obj *listObjPtr;
-
-    wantValue = FALSE;
-    string = Tcl_GetString(objv[2]);
-    if ((string[0] == '-') && (strcmp(string, "-value") == 0)) {
-	wantValue = TRUE;
-	objv++, objc--;
-    }
-    if (Blt_ExprDoubleFromObj(interp, objv[2], &min) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    max = min;
-    if (objc > 4) {
- 	Tcl_AppendResult(interp, "wrong # arguments: should be \"",
-		Tcl_GetString(objv[0]), " search ?-value? min ?max?", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    if ((objc > 3) && 
-	(Blt_ExprDoubleFromObj(interp, objv[3], &max) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if ((min - max) >= DBL_EPSILON) {
-	return TCL_OK;		/* Bogus range. Don't bother looking. */
-    }
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    if (wantValue) {
-	for (i = 0; i < vPtr->length; i++) {
-	    if (InRange(vPtr->valueArr[i], min, max)) {
-		Tcl_ListObjAppendElement(interp, listObjPtr, 
-			Tcl_NewDoubleObj(vPtr->valueArr[i]));
-	    }
-	}
-    } else {
-	for (i = 0; i < vPtr->length; i++) {
-	    if (InRange(vPtr->valueArr[i], min, max)) {
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewIntObj(i + vPtr->offset));
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OffsetOp --
- *
- *	Queries or sets the offset of the array index from the base address of
- *	the data array of values.
- *
- * Results:
- *	A standard TCL result.  If the source vector doesn't exist or the
- *	source list is not a valid list of numbers, TCL_ERROR returned.
- *	Otherwise TCL_OK is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-OffsetOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	int newOffset;
-
-	if (Tcl_GetIntFromObj(interp, objv[2], &newOffset) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	vPtr->offset = newOffset;
-    }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), vPtr->offset);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * RandomOp --
- *
- *	Generates random values for the length of the vector.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-RandomOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 0; i < vPtr->length; i++) {
-	vPtr->valueArr[i] = drand48();
-    }
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SeqOp --
- *
- *	Generates a sequence of values in the vector.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SeqOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int n;
-    double start, stop;
-    
-    if (Blt_ExprDoubleFromObj(interp, objv[2], &start) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_ExprDoubleFromObj(interp, objv[3], &stop) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    n = vPtr->length;
-    if ((objc > 4) && (Blt_ExprIntFromObj(interp, objv[4], &n) != TCL_OK)) {
-	return TCL_ERROR;
-    }
-    if (n > 1) {
-	int i;
-	double step;
-
-	if (Blt_Vec_SetLength(interp, vPtr, n) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	step = (stop - start) / (double)(n - 1);
-	for (i = 0; i < n; i++) { 
-	    vPtr->valueArr[i] = start + (step * i);
-	}
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetOp --
- *
- *	Sets the data of the vector object from a list of values.
- *
- * Results:
- *	A standard TCL result.  If the source vector doesn't exist or the
- *	source list is not a valid list of numbers, TCL_ERROR returned.
- *	Otherwise TCL_OK is returned.
- *
- * Side Effects:
- *	The vector data is reset.  Clients of the vector are notified.  Any
- *	cached array indices are flushed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SetOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int result;
-    Vector *v2Ptr;
-    int nElem;
-    Tcl_Obj **elemObjArr;
-
-    /* The source can be either a list of numbers or another vector.  */
-
-    v2Ptr = Blt_Vec_ParseElement((Tcl_Interp *)NULL, vPtr->dataPtr, 
-	   Tcl_GetString(objv[2]), NULL, NS_SEARCH_BOTH);
-    if (v2Ptr != NULL) {
-	if (vPtr == v2Ptr) {
-	    Vector *tmpPtr;
-	    /* 
-	     * Source and destination vectors are the same.  Copy the source
-	     * first into a temporary vector to avoid memory overlaps.
-	     */
-	    tmpPtr = Blt_Vec_New(vPtr->dataPtr);
-	    result = Blt_Vec_Duplicate(tmpPtr, v2Ptr);
-	    if (result == TCL_OK) {
-		result = Blt_Vec_Duplicate(vPtr, tmpPtr);
-	    }
-	    Blt_Vec_Free(tmpPtr);
-	} else {
-	    result = Blt_Vec_Duplicate(vPtr, v2Ptr);
-	}
-    } else if (Tcl_ListObjGetElements(interp, objv[2], &nElem, &elemObjArr) 
-	       == TCL_OK) {
-	result = CopyList(vPtr, interp, nElem, elemObjArr);
-    } else {
-	return TCL_ERROR;
-    }
-
-    if (result == TCL_OK) {
-	/*
-	 * The vector has changed; so flush the array indices (they're wrong
-	 * now), find the new range of the data, and notify the vector's
-	 * clients that it's been modified.
-	 */
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SimplifyOp --
- *
- *	Sets the data of the vector object from a list of values.
- *
- * Results:
- *	A standard TCL result.  If the source vector doesn't exist or the
- *	source list is not a valid list of numbers, TCL_ERROR returned.
- *	Otherwise TCL_OK is returned.
- *
- * Side Effects:
- *	The vector data is reset.  Clients of the vector are notified.  Any
- *	cached array indices are flushed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SimplifyOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    size_t i, n;
-    int length, nPoints;
-    int *simple;
-    double tolerance = 10.0;
-    Point2d *orig, *reduced;
-
-    length = vPtr->length;
-    nPoints = vPtr->length / 2;
-    simple  = Blt_AssertMalloc(nPoints * sizeof(int));
-    reduced = Blt_AssertMalloc(nPoints * sizeof(Point2d));
-    orig = (Point2d *)vPtr->valueArr;
-    n = Blt_SimplifyLine(orig, 0, nPoints - 1, tolerance, simple);
-    for (i = 0; i < n; i++) {
-	reduced[i] = orig[simple[i]];
-    }
-    Blt_Free(simple);
-    Blt_Vec_Reset(vPtr, (double *)reduced, n * 2, vPtr->length, TCL_DYNAMIC);
-    /*
-     * The vector has changed; so flush the array indices (they're wrong
-     * now), find the new range of the data, and notify the vector's
-     * clients that it's been modified.
-     */
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SplitOp --
- *
- *	Copies the values from the vector evenly into one of more vectors.
- *
- * Results:
- *	A standard TCL result.  
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-SplitOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int nVectors;
-
-    nVectors = objc - 2;
-    if ((vPtr->length % nVectors) != 0) {
-	Tcl_AppendResult(interp, "can't split vector \"", vPtr->name, 
-	   "\" into ", Blt_Itoa(nVectors), " even parts.", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (nVectors > 0) {
-	Vector *v2Ptr;
-	char *string;		/* Name of vector. */
-	int i, j, k;
-	int oldSize, newSize, extra, isNew;
-
-	extra = vPtr->length / nVectors;
-	for (i = 0; i < nVectors; i++) {
-	    string = Tcl_GetString(objv[i+2]);
-	    v2Ptr = Blt_Vec_Create(vPtr->dataPtr, string, string, string,
-		&isNew);
-	    oldSize = v2Ptr->length;
-	    newSize = oldSize + extra;
-	    if (Blt_Vec_SetLength(interp, v2Ptr, newSize) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    for (j = i, k = oldSize; j < vPtr->length; j += nVectors, k++) {
-		v2Ptr->valueArr[k] = vPtr->valueArr[j];
-	    }
-	    Blt_Vec_UpdateClients(v2Ptr);
-	    if (v2Ptr->flush) {
-		Blt_Vec_FlushCache(v2Ptr);
-	    }
-	}
-    }
-    return TCL_OK;
-}
-
-
-static Vector **sortVectors;	/* Pointer to the array of values currently
-				 * being sorted. */
-static int nSortVectors;
-static int sortDecreasing;	/* Indicates the ordering of the sort. If
-				 * non-zero, the vectors are sorted in
-				 * decreasing order */
-
-static int
-CompareVectors(void *a, void *b)
-{
-    double delta;
-    int i;
-    int sign;
-    Vector *vPtr;
-
-    sign = (sortDecreasing) ? -1 : 1;
-    for (i = 0; i < nSortVectors; i++) {
-	vPtr = sortVectors[i];
-	delta = vPtr->valueArr[*(int *)a] - vPtr->valueArr[*(int *)b];
-	if (delta < 0.0) {
-	    return (-1 * sign);
-	} else if (delta > 0.0) {
-	    return (1 * sign);
-	}
-    }
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_SortMap --
- *
- *	Returns an array of indices that represents the sorted mapping of the
- *	original vector.
- *
- * Results:
- *	A standard TCL result.  If any of the auxiliary vectors are a
- *	different size than the sorted vector object, TCL_ERROR is returned.
- *	Otherwise TCL_OK is returned.
- *
- * Side Effects:
- *	The vectors are sorted.
- *
- *	vecName sort ?switches? vecName vecName...
- *---------------------------------------------------------------------------
- */
-size_t *
-Blt_Vec_SortMap(Vector **vectors, int nVectors)
-{
-    size_t *map;
-    int i;
-    Vector *vPtr = *vectors;
-    int length;
-
-    length = vPtr->last - vPtr->first + 1;
-    map = Blt_AssertMalloc(sizeof(size_t) * length);
-    for (i = vPtr->first; i <= vPtr->last; i++) {
-	map[i] = i;
-    }
-    /* Set global variables for sorting routine. */
-    sortVectors = vectors;
-    nSortVectors = nVectors;
-    qsort((char *)map, length, sizeof(size_t), 
-	  (QSortCompareProc *)CompareVectors);
-    return map;
-}
-
-static size_t *
-SortVectors(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Vector **vectors, *v2Ptr;
-    size_t *map;
-    int i;
-
-    vectors = Blt_AssertMalloc(sizeof(Vector *) * (objc + 1));
-    vectors[0] = vPtr;
-    map = NULL;
-    for (i = 0; i < objc; i++) {
-	if (Blt_Vec_LookupName(vPtr->dataPtr, Tcl_GetString(objv[i]), 
-		&v2Ptr) != TCL_OK) {
-	    goto error;
-	}
-	if (v2Ptr->length != vPtr->length) {
-	    Tcl_AppendResult(interp, "vector \"", v2Ptr->name,
-		"\" is not the same size as \"", vPtr->name, "\"",
-		(char *)NULL);
-	    goto error;
-	}
-	vectors[i + 1] = v2Ptr;
-    }
-    map = Blt_Vec_SortMap(vectors, objc + 1);
-  error:
-    Blt_Free(vectors);
-    return map;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * SortOp --
- *
- *	Sorts the vector object and any other vectors according to sorting
- *	order of the vector object.
- *
- * Results:
- *	A standard TCL result.  If any of the auxiliary vectors are a
- *	different size than the sorted vector object, TCL_ERROR is returned.
- *	Otherwise TCL_OK is returned.
- *
- * Side Effects:
- *	The vectors are sorted.
- *
- *	vecName sort ?switches? vecName vecName...
- *---------------------------------------------------------------------------
- */
-static int
-SortOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Vector *v2Ptr;
-    double *copy;
-    size_t *map;
-    size_t sortLength, nBytes;
-    int result;
-    int i;
-    unsigned int n;
-    SortSwitches switches;
-
-    sortDecreasing = FALSE;
-    switches.flags = 0;
-    i = Blt_ParseSwitches(interp, sortSwitches, objc - 2, objv + 2, &switches, 
-		BLT_SWITCH_OBJV_PARTIAL);
-    if (i < 0) {
-	return TCL_ERROR;
-    }
-    objc -= i, objv += i;
-    sortDecreasing = (switches.flags & SORT_DECREASING);
-    if (objc > 2) {
-	map = SortVectors(vPtr, interp, objc - 2, objv + 2);
-    } else {
-	map = Blt_Vec_SortMap(&vPtr, 1);
-    }
-    if (map == NULL) {
-	return TCL_ERROR;
-    }
-    sortLength = vPtr->length;
-    /*
-     * Create an array to store a copy of the current values of the
-     * vector. We'll merge the values back into the vector based upon the
-     * indices found in the index array.
-     */
-    nBytes = sizeof(double) * sortLength;
-    copy = Blt_AssertMalloc(nBytes);
-    memcpy((char *)copy, (char *)vPtr->valueArr, nBytes);
-    if (switches.flags & SORT_UNIQUE) {
-	int count;
-
-	for (count = n = 1; n < sortLength; n++) {
-	    size_t next, prev;
-
-	    next = map[n];
-	    prev = map[n - 1];
-	    if (copy[next] != copy[prev]) {
-		map[count] = next;
-		count++;
-	    }
-	}
-	sortLength = count;
-	nBytes = sortLength * sizeof(double);
-    }
-    if (sortLength != vPtr->length) {
-	Blt_Vec_SetLength(interp, vPtr, sortLength);
-    }
-    for (n = 0; n < sortLength; n++) {
-	vPtr->valueArr[n] = copy[map[n]];
-    }
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-
-    /* Now sort any other vectors in the same fashion.  The vectors must be
-     * the same size as the map though.  */
-    result = TCL_ERROR;
-    for (i = 2; i < objc; i++) {
-	if (Blt_Vec_LookupName(vPtr->dataPtr, Tcl_GetString(objv[i]), 
-		&v2Ptr) != TCL_OK) {
-	    goto error;
-	}
-	if (sortLength != v2Ptr->length) {
-	    Blt_Vec_SetLength(interp, v2Ptr, sortLength);
-	}
-	memcpy((char *)copy, (char *)v2Ptr->valueArr, nBytes);
-	for (n = 0; n < sortLength; n++) {
-	    v2Ptr->valueArr[n] = copy[map[n]];
-	}
-	Blt_Vec_UpdateClients(v2Ptr);
-	if (v2Ptr->flush) {
-	    Blt_Vec_FlushCache(v2Ptr);
-	}
-    }
-    result = TCL_OK;
-  error:
-    Blt_Free(copy);
-    Blt_Free(map);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InstExprOp --
- *
- *	Computes the result of the expression which may be either a scalar
- *	(single value) or vector (list of values).
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InstExprOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-
-    if (Blt_ExprVector(interp, Tcl_GetString(objv[2]), (Blt_Vector *)vPtr) 
-	!= TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ArithOp --
- *
- * Results:
- *	A standard TCL result.  If the source vector doesn't exist or the
- *	source list is not a valid list of numbers, TCL_ERROR returned.
- *	Otherwise TCL_OK is returned.
- *
- * Side Effects:
- *	The vector data is reset.  Clients of the vector are notified.
- *	Any cached array indices are flushed.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ArithOp(Vector *vPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    double value;
-    int i;
-    Vector *v2Ptr;
-    double scalar;
-    Tcl_Obj *listObjPtr;
-    char *string;
-
-    v2Ptr = Blt_Vec_ParseElement((Tcl_Interp *)NULL, vPtr->dataPtr, 
-	Tcl_GetString(objv[2]), NULL, NS_SEARCH_BOTH);
-    if (v2Ptr != NULL) {
-	int j;
-	int length;
-
-	length = v2Ptr->last - v2Ptr->first + 1;
-	if (length != vPtr->length) {
-	    Tcl_AppendResult(interp, "vectors \"", Tcl_GetString(objv[0]), 
-		"\" and \"", Tcl_GetString(objv[2]), 
-		"\" are not the same length", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	string = Tcl_GetString(objv[1]);
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	switch (string[0]) {
-	case '*':
-	    for (i = 0, j = v2Ptr->first; i < vPtr->length; i++, j++) {
-		value = vPtr->valueArr[i] * v2Ptr->valueArr[j];
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '/':
-	    for (i = 0, j = v2Ptr->first; i < vPtr->length; i++, j++) {
-		value = vPtr->valueArr[i] / v2Ptr->valueArr[j];
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '-':
-	    for (i = 0, j = v2Ptr->first; i < vPtr->length; i++, j++) {
-		value = vPtr->valueArr[i] - v2Ptr->valueArr[j];
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '+':
-	    for (i = 0, j = v2Ptr->first; i < vPtr->length; i++, j++) {
-		value = vPtr->valueArr[i] + v2Ptr->valueArr[j];
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-
-    } else if (Blt_ExprDoubleFromObj(interp, objv[2], &scalar) == TCL_OK) {
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	string = Tcl_GetString(objv[1]);
-	switch (string[0]) {
-	case '*':
-	    for (i = 0; i < vPtr->length; i++) {
-		value = vPtr->valueArr[i] * scalar;
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '/':
-	    for (i = 0; i < vPtr->length; i++) {
-		value = vPtr->valueArr[i] / scalar;
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '-':
-	    for (i = 0; i < vPtr->length; i++) {
-		value = vPtr->valueArr[i] - scalar;
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-
-	case '+':
-	    for (i = 0; i < vPtr->length; i++) {
-		value = vPtr->valueArr[i] + scalar;
-		Tcl_ListObjAppendElement(interp, listObjPtr,
-			 Tcl_NewDoubleObj(value));
-	    }
-	    break;
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    } else {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorInstCmd --
- *
- *	Parses and invokes the appropriate vector instance command option.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_OpSpec vectorInstOps[] =
-{
-    {"*",         1, ArithOp,     3, 3, "item",},	/*Deprecated*/
-    {"+",         1, ArithOp,     3, 3, "item",},	/*Deprecated*/
-    {"-",         1, ArithOp,     3, 3, "item",},	/*Deprecated*/
-    {"/",         1, ArithOp,     3, 3, "item",},	/*Deprecated*/
-    {"append",    1, AppendOp,    3, 0, "item ?item...?",},
-    {"binread",   1, BinreadOp,   3, 0, "channel ?numValues? ?flags?",},
-    {"clear",     1, ClearOp,     2, 2, "",},
-    {"delete",    2, DeleteOp,    2, 0, "index ?index...?",},
-    {"dup",       2, DupOp,       3, 0, "vecName",},
-    {"expr",      1, InstExprOp,  3, 3, "expression",},
-    {"fft",	  1, FFTOp,	  3, 0, "vecName ?switches?",},
-    {"index",     3, IndexOp,     3, 4, "index ?value?",},
-    {"inversefft",3, InverseFFTOp,4, 4, "vecName vecName",},
-    {"length",    1, LengthOp,    2, 3, "?newSize?",},
-    {"max",       2, MaxOp,       2, 2, "",},
-    {"merge",     2, MergeOp,     3, 0, "vecName ?vecName...?",},
-    {"min",       2, MinOp,       2, 2, "",},
-    {"normalize", 3, NormalizeOp, 2, 3, "?vecName?",},	/*Deprecated*/
-    {"notify",    3, NotifyOp,    3, 3, "keyword",},
-    {"offset",    1, OffsetOp,    2, 3, "?offset?",},
-    {"populate",  2, PopulateOp,  4, 4, "vecName density",},
-    {"print",     2, PrintOp,     2, 0, "?switches?",},
-    {"random",    4, RandomOp,    2, 2, "",},	/*Deprecated*/
-    {"range",     4, RangeOp,     2, 4, "first last",},
-    {"search",    3, SearchOp,    3, 5, "?-value? value ?value?",},
-    {"seq",       3, SeqOp,       4, 5, "begin end ?num?",},
-    {"set",       3, SetOp,       3, 3, "list",},
-    {"simplify",  2, SimplifyOp,  2, 2, },
-    {"sort",      2, SortOp,      2, 0, "?switches? ?vecName...?",},
-    {"split",     2, SplitOp,     2, 0, "?vecName...?",},
-    {"variable",  1, MapOp,       2, 3, "?varName?",},
-};
-
-static int nInstOps = sizeof(vectorInstOps) / sizeof(Blt_OpSpec);
-
-int
-Blt_Vec_InstCmd(ClientData clientData, Tcl_Interp *interp, int objc,
-		Tcl_Obj *const *objv)
-{
-    VectorCmdProc *proc;
-    Vector *vPtr = clientData;
-
-    vPtr->first = 0;
-    vPtr->last = vPtr->length - 1;
-    proc = Blt_GetOpFromObj(interp, nInstOps, vectorInstOps, BLT_OP_ARG1, objc,
-	objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (vPtr, interp, objc, objv);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_VarTrace --
- *
- * Results:
- *	Returns NULL on success.  Only called from a variable trace.
- *
- * Side effects:
- *
- *---------------------------------------------------------------------------
- */
-char *
-Blt_Vec_VarTrace(ClientData clientData, Tcl_Interp *interp, const char *part1, 
-		 const char *part2, int flags)
-{
-    Blt_VectorIndexProc *indexProc;
-    Vector *vPtr = clientData;
-    int first, last;
-    int varFlags;
-#define MAX_ERR_MSG	1023
-    static char message[MAX_ERR_MSG + 1];
-
-    if (part2 == NULL) {
-	if (flags & TCL_TRACE_UNSETS) {
-	    Blt_Free(vPtr->arrayName);
-	    vPtr->arrayName = NULL;
-	    if (vPtr->freeOnUnset) {
-		Blt_Vec_Free(vPtr);
-	    }
-	}
-	return NULL;
-    }
-    if (Blt_Vec_GetIndexRange(interp, vPtr, part2, INDEX_ALL_FLAGS, &indexProc)
-	 != TCL_OK) {
-	goto error;
-    }
-    first = vPtr->first, last = vPtr->last;
-    varFlags = TCL_LEAVE_ERR_MSG | (TCL_GLOBAL_ONLY & flags);
-    if (flags & TCL_TRACE_WRITES) {
-	double value;
-	Tcl_Obj *objPtr;
-
-	if (first == SPECIAL_INDEX) { /* Tried to set "min" or "max" */
-	    return (char *)"read-only index";
-	}
-	objPtr = Tcl_GetVar2Ex(interp, part1, part2, varFlags);
-	if (objPtr == NULL) {
-	    goto error;
-	}
-	if (Blt_ExprDoubleFromObj(interp, objPtr, &value) != TCL_OK) {
-	    if ((last == first) && (first >= 0)) {
-		/* Single numeric index. Reset the array element to
-		 * its old value on errors */
-		Tcl_SetVar2Ex(interp, part1, part2, objPtr, varFlags);
-	    }
-	    goto error;
-	}
-	if (first == vPtr->length) {
-	    if (Blt_Vec_ChangeLength((Tcl_Interp *)NULL, vPtr, vPtr->length + 1)
-		 != TCL_OK) {
-		return (char *)"error resizing vector";
-	    }
-	}
-	/* Set possibly an entire range of values */
-	ReplicateValue(vPtr, first, last, value);
-    } else if (flags & TCL_TRACE_READS) {
-	double value;
-	Tcl_Obj *objPtr;
-
-	if (vPtr->length == 0) {
-	    if (Tcl_SetVar2(interp, part1, part2, "", varFlags) == NULL) {
-		goto error;
-	    }
-	    return NULL;
-	}
-	if  (first == vPtr->length) {
-	    return (char *)"write-only index";
-	}
-	if (first == last) {
-	    if (first >= 0) {
-		value = vPtr->valueArr[first];
-	    } else {
-		vPtr->first = 0, vPtr->last = vPtr->length - 1;
-		value = (*indexProc) ((Blt_Vector *) vPtr);
-	    }
-	    objPtr = Tcl_NewDoubleObj(value);
-	    if (Tcl_SetVar2Ex(interp, part1, part2, objPtr, varFlags) == NULL) {
-		Tcl_DecrRefCount(objPtr);
-		goto error;
-	    }
-	} else {
-	    objPtr = GetValues(vPtr, first, last);
-	    if (Tcl_SetVar2Ex(interp, part1, part2, objPtr, varFlags) == NULL) {
-		Tcl_DecrRefCount(objPtr);
-		goto error;
-	    }
-	}
-    } else if (flags & TCL_TRACE_UNSETS) {
-	int i, j;
-
-	if ((first == vPtr->length) || (first == SPECIAL_INDEX)) {
-	    return (char *)"special vector index";
-	}
-	/*
-	 * Collapse the vector from the point of the first unset element.
-	 * Also flush any array variable entries so that the shift is
-	 * reflected when the array variable is read.
-	 */
-	for (i = first, j = last + 1; j < vPtr->length; i++, j++) {
-	    vPtr->valueArr[i] = vPtr->valueArr[j];
-	}
-	vPtr->length -= ((last - first) + 1);
-	if (vPtr->flush) {
-	    Blt_Vec_FlushCache(vPtr);
-	}
-    } else {
-	return (char *)"unknown variable trace flag";
-    }
-    if (flags & (TCL_TRACE_UNSETS | TCL_TRACE_WRITES)) {
-	Blt_Vec_UpdateClients(vPtr);
-    }
-    Tcl_ResetResult(interp);
-    return NULL;
-
- error: 
-    strncpy(message, Tcl_GetStringResult(interp), MAX_ERR_MSG);
-    message[MAX_ERR_MSG] = '\0';
-    return message;
-}
diff --git a/blt3.0/src/bltVecInt.h b/blt3.0/src/bltVecInt.h
deleted file mode 100644
index 5d30f97..0000000
--- a/blt3.0/src/bltVecInt.h
+++ /dev/null
@@ -1,251 +0,0 @@
-
-/*
- * bltVecInt.h --
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include <bltChain.h>
-#include <bltVector.h>
-
-#define VECTOR_THREAD_KEY	"BLT Vector Data"
-#define VECTOR_MAGIC		((unsigned int) 0x46170277)
-
-/* These defines allow parsing of different types of indices */
-
-#define INDEX_SPECIAL	(1<<0)	/* Recognize "min", "max", and "++end" as
-				 * valid indices */
-#define INDEX_COLON	(1<<1)	/* Also recognize a range of indices separated
-				 * by a colon */
-#define INDEX_CHECK	(1<<2)	/* Verify that the specified index or range of
-				 * indices are within limits */
-#define INDEX_ALL_FLAGS    (INDEX_SPECIAL | INDEX_COLON | INDEX_CHECK)
-
-#define SPECIAL_INDEX		-2
-
-#define FFT_NO_CONSTANT		(1<<0)
-#define FFT_BARTLETT		(1<<1)
-#define FFT_SPECTRUM		(1<<2)
-
-typedef struct {
-    Blt_HashTable vectorTable;	/* Table of vectors */
-    Blt_HashTable mathProcTable; /* Table of vector math functions */
-    Blt_HashTable indexProcTable;
-    Tcl_Interp *interp;
-    unsigned int nextId;
-} VectorInterpData;
-
-/*
- * Vector --
- *
- *	A vector is an array of double precision values.  It can be accessed
- *	through a TCL command, a TCL array variable, or C API. The storage for
- *	the array points initially to a statically allocated buffer, but to
- *	malloc-ed memory if more is necessary.
- *
- *	Vectors can be shared by several clients (for example, two different
- *	graph widgets).  The data is shared. When a client wants to use a
- *	vector, it allocates a vector identifier, which identifies the client.
- *	Clients use this ID to specify a callback routine to be invoked
- *	whenever the vector is modified or destroyed.  Whenever the vector is
- *	updated or destroyed, each client is notified of the change by their
- *	callback routine.
- */
-
-typedef struct {
-
-    /*
-     * If you change these fields, make sure you change the definition of
-     * Blt_Vector in bltInt.h and blt.h too.
-     */
-
-    double *valueArr;		/* Array of values (malloc-ed) */
-
-    int length;			/* Current number of values in the array. */
-
-    int size;			/* Maximum number of values that can be stored
-				 * in the value array. */
-
-    double min, max;		/* Minimum and maximum values in the vector */
-
-    int dirty;			/* Indicates if the vector has been updated */
-
-    int reserved;
-
-    /* The following fields are local to this module  */
-
-    const char *name;		/* The namespace-qualified name of the vector.
-				 * It points to the hash key allocated for the
-				 * entry in the vector hash table. */
-
-    VectorInterpData *dataPtr;
-    Tcl_Interp *interp;		/* Interpreter associated with the
-				 * vector */
-
-    Blt_HashEntry *hashPtr;	/* If non-NULL, pointer in a hash table to
-				 * track the vectors in use. */
-
-    Tcl_FreeProc *freeProc;	/* Address of procedure to call to release
-				 * storage for the value array, Optionally can
-				 * be one of the following: TCL_STATIC,
-				 * TCL_DYNAMIC, or TCL_VOLATILE. */
-
-    const char *arrayName;	/* The name of the TCL array variable mapped
-				 * to the vector (malloc'ed). If NULL,
-				 * indicates that the vector isn't mapped to
-				 * any variable */
-
-    Tcl_Namespace *nsPtr;	/* Namespace context of the vector itself. */
-
-    int offset;			/* Offset from zero of the vector's starting
-				 * index */
-
-    Tcl_Command cmdToken;	/* Token for vector's TCL command. */
-
-    Blt_Chain chain;		/* List of clients using this vector */
-
-    int notifyFlags;		/* Notification flags. See definitions
-				 * below */
-
-    int varFlags;		/* Indicate if the variable is global,
-				 * namespace, or local */
-
-    int freeOnUnset;		/* For backward compatibility only: If
-				 * non-zero, free the vector when its variable
-				 * is unset. */
-    int flush;
-
-    int first, last;		/* Selected region of vector. This is used
-				 * mostly for the math routines */
-} Vector;
-
-#define NOTIFY_UPDATED		((int)BLT_VECTOR_NOTIFY_UPDATE)
-#define NOTIFY_DESTROYED	((int)BLT_VECTOR_NOTIFY_DESTROY)
-
-#define NOTIFY_NEVER		(1<<3)	/* Never notify clients of updates to
-					 * the vector */
-#define NOTIFY_ALWAYS		(1<<4)	/* Notify clients after each update
-					 * of the vector is made */
-#define NOTIFY_WHENIDLE		(1<<5)	/* Notify clients at the next idle point
-					 * that the vector has been updated. */
-
-#define NOTIFY_PENDING		(1<<6)	/* A do-when-idle notification of the
-					 * vector's clients is pending. */
-#define NOTIFY_NOW		(1<<7)	/* Notify clients of changes once
-					 * immediately */
-
-#define NOTIFY_WHEN_MASK	(NOTIFY_NEVER|NOTIFY_ALWAYS|NOTIFY_WHENIDLE)
-
-#define UPDATE_RANGE		(1<<9)	/* The data of the vector has changed.
-					 * Update the min and max limits when
-					 * they are needed */
-
-#define FindRange(array, first, last, min, max) \
-{ \
-    min = max = 0.0; \
-    if (first <= last) { \
-	register int i; \
-	min = max = array[first]; \
-	for (i = first + 1; i <= last; i++) { \
-	    if (min > array[i]) { \
-		min = array[i]; \
-	    } else if (max < array[i]) { \
-		max = array[i]; \
-	    } \
-	} \
-    } \
-}
-
-BLT_EXTERN void Blt_Vec_InstallSpecialIndices(Blt_HashTable *tablePtr);
-
-BLT_EXTERN void Blt_Vec_InstallMathFunctions(Blt_HashTable *tablePtr);
-
-BLT_EXTERN void Blt_Vec_UninstallMathFunctions(Blt_HashTable *tablePtr);
-
-BLT_EXTERN VectorInterpData *Blt_Vec_GetInterpData (Tcl_Interp *interp);
-
-BLT_EXTERN double Blt_Vec_Max(Vector *vecObjPtr);
-BLT_EXTERN double Blt_Vec_Min(Vector *vecObjPtr);
-
-BLT_EXTERN Vector *Blt_Vec_New(VectorInterpData *dataPtr);
-
-BLT_EXTERN int Blt_Vec_Duplicate(Vector *destPtr, Vector *srcPtr);
-
-BLT_EXTERN int Blt_Vec_SetLength(Tcl_Interp *interp, Vector *vPtr, 
-	int length);
-
-BLT_EXTERN int Blt_Vec_SetSize(Tcl_Interp *interp, Vector *vPtr, 
-	int size);
-
-BLT_EXTERN int Blt_Vec_ChangeLength(Tcl_Interp *interp, Vector *vPtr, 
-	int length);
-
-BLT_EXTERN Vector *Blt_Vec_ParseElement(Tcl_Interp *interp, 
-	VectorInterpData *dataPtr, const char *start, const char **endPtr, 
-	int flags);
-
-BLT_EXTERN void Blt_Vec_Free(Vector *vPtr);
-
-BLT_EXTERN size_t *Blt_Vec_SortMap(Vector **vectors, int nVectors);
-
-BLT_EXTERN int Blt_Vec_LookupName(VectorInterpData *dataPtr, 
-	const char *vecName, Vector **vPtrPtr);
-
-BLT_EXTERN Vector *Blt_Vec_Create(VectorInterpData *dataPtr, 
-	const char *name, const char *cmdName, const char *varName, 
-	int *newPtr);
-
-BLT_EXTERN void Blt_Vec_UpdateRange(Vector *vPtr);
-
-BLT_EXTERN void Blt_Vec_UpdateClients(Vector *vPtr);
-
-BLT_EXTERN void Blt_Vec_FlushCache(Vector *vPtr);
-
-BLT_EXTERN int Blt_Vec_Reset(Vector *vPtr, double *dataArr,
-	int nValues, int arraySize, Tcl_FreeProc *freeProc);
-
-BLT_EXTERN int  Blt_Vec_GetIndex(Tcl_Interp *interp, Vector *vPtr, 
-	const char *string, int *indexPtr, int flags, 
-	Blt_VectorIndexProc **procPtrPtr);
-
-BLT_EXTERN int  Blt_Vec_GetIndexRange(Tcl_Interp *interp, Vector *vPtr, 
-	const char *string, int flags, Blt_VectorIndexProc **procPtrPtr);
-
-BLT_EXTERN int Blt_Vec_MapVariable(Tcl_Interp *interp, Vector *vPtr, 
-	const char *name);
-
-BLT_EXTERN int Blt_Vec_FFT(Tcl_Interp *interp, Vector *realPtr,
-	Vector *phasesPtr, Vector *freqPtr, double delta, 
-	int flags, Vector *srcPtr);
-
-BLT_EXTERN int Blt_Vec_InverseFFT(Tcl_Interp *interp, Vector *iSrcPtr, 
-	Vector *rDestPtr, Vector *iDestPtr, Vector *srcPtr);
-
-BLT_EXTERN Tcl_ObjCmdProc Blt_Vec_InstCmd;
-
-BLT_EXTERN Tcl_VarTraceProc Blt_Vec_VarTrace;
-
-BLT_EXTERN Tcl_IdleProc Blt_Vec_NotifyClients;
-
diff --git a/blt3.0/src/bltVecMath.c b/blt3.0/src/bltVecMath.c
deleted file mode 100644
index a0bd4af..0000000
--- a/blt3.0/src/bltVecMath.c
+++ /dev/null
@@ -1,1895 +0,0 @@
-
-/*
- * bltVecMath.c --
- *
- * This module implements mathematical expressions with vector data
- * objects.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltVecInt.h"
-#include "bltNsUtil.h"
-#include "bltParse.h"
-
-/*
- * Three types of math functions:
- *
- *	ComponentProc		Function is applied in multiple calls to
- *				each component of the vector.
- *	VectorProc		Entire vector is passed, each component is
- *				modified.
- *	ScalarProc		Entire vector is passed, single scalar value
- *				is returned.
- */
-
-typedef double (ComponentProc)(double value);
-typedef int (VectorProc)(Vector *vPtr);
-typedef double (ScalarProc)(Vector *vPtr);
-
-/*
- * Built-in math functions:
- */
-typedef int (GenericMathProc) _ANSI_ARGS_(ANYARGS);
-
-/*
- * MathFunction --
- *
- *	Contains information about math functions that can be called
- *	for vectors.  The table of math functions is global within the
- *	application.  So you can't define two different "sqrt"
- *	functions.
- */
-typedef struct {
-    const char *name;		/* Name of built-in math function.  If
-				 * NULL, indicates that the function
-				 * was user-defined and dynamically
-				 * allocated.  Function names are
-				 * global across all interpreters. */
-
-    void *proc;			/* Procedure that implements this math
-				 * function. */
-
-    ClientData clientData;	/* Argument to pass when invoking the
-				 * function. */
-
-} MathFunction;
-
-
-/*
- * Macros for testing floating-point values for certain special cases:
- *
- *	IS_NAN	Test for not-a-number by comparing a value against itself
- *	IF_INF	Test for infinity by comparing against the largest floating
- *		point value.
- */
-
-#define IS_NAN(v) ((v) != (v))
-
-#ifdef DBL_MAX
-#   define IS_INF(v) (((v) > DBL_MAX) || ((v) < -DBL_MAX))
-#else
-#   define IS_INF(v) 0
-#endif
-
-/* The data structure below is used to describe an expression value,
- * which can be either a double-precision floating-point value, or a
- * string.  A given number has only one value at a time.  */
-
-#define STATIC_STRING_SPACE 150
-
-/*
- * Tokens --
- *
- *	The token types are defined below.  In addition, there is a
- *	table associating a precedence with each operator.  The order
- *	of types is important.  Consult the code before changing it.
- */
-enum Tokens {
-    VALUE, OPEN_PAREN, CLOSE_PAREN, COMMA, END, UNKNOWN,
-    MULT = 8, DIVIDE, MOD, PLUS, MINUS,
-    LEFT_SHIFT, RIGHT_SHIFT,
-    LESS, GREATER, LEQ, GEQ, EQUAL, NEQ,
-    OLD_BIT_AND, EXPONENT, OLD_BIT_OR, OLD_QUESTY, OLD_COLON,
-    AND, OR, UNARY_MINUS, OLD_UNARY_PLUS, NOT, OLD_BIT_NOT
-};
-
-typedef struct {
-    Vector *vPtr;
-    char staticSpace[STATIC_STRING_SPACE];
-    ParseValue pv;		/* Used to hold a string value, if any. */
-} Value;
-
-/*
- * ParseInfo --
- *
- *	The data structure below describes the state of parsing an
- *	expression.  It's passed among the routines in this module.
- */
-typedef struct {
-    const char *expr;		/* The entire right-hand side of the
-				 * expression, as originally passed to
-				 * Blt_ExprVector. */
-
-    const char *nextPtr;	/* Position of the next character to
-				 * be scanned from the expression
-				 * string. */
-
-    enum Tokens token;		/* Type of the last token to be parsed
-				 * from nextPtr.  See below for
-				 * definitions.  Corresponds to the
-				 * characters just before nextPtr. */
-
-} ParseInfo;
-
-/*
- * Precedence table.  The values for non-operator token types are ignored.
- */
-static int precTable[] =
-{
-    0, 0, 0, 0, 0, 0, 0, 0,
-    12, 12, 12,			/* MULT, DIVIDE, MOD */
-    11, 11,			/* PLUS, MINUS */
-    10, 10,			/* LEFT_SHIFT, RIGHT_SHIFT */
-    9, 9, 9, 9,			/* LESS, GREATER, LEQ, GEQ */
-    8, 8,			/* EQUAL, NEQ */
-    7,				/* OLD_BIT_AND */
-    13,				/* EXPONENTIATION */
-    5,				/* OLD_BIT_OR */
-    4,				/* AND */
-    3,				/* OR */
-    2,				/* OLD_QUESTY */
-    1,				/* OLD_COLON */
-    14, 14, 14, 14		/* UNARY_MINUS, OLD_UNARY_PLUS, NOT,
-				 * OLD_BIT_NOT */
-};
-
-
-/*
- * Forward declarations.
- */
-
-static int NextValue(Tcl_Interp *interp, ParseInfo *piPtr, int prec, 
-	Value *valuePtr);
-
-#include <bltMath.h>
-
-/*
- *---------------------------------------------------------------------------
- *
- * Sort --
- *
- *	A vector math function.  Sorts the values of the given 
- *	vector.
- *
- * Results:
- *	Always TCL_OK.
- *
- * Side Effects:
- *	The vector is sorted.
- *
- *---------------------------------------------------------------------------
- */
-static int
-Sort(Vector *vPtr)
-{
-    size_t *map;
-    double *values;
-    int i;
-
-    map = Blt_Vec_SortMap(&vPtr, 1);
-    values = Blt_AssertMalloc(sizeof(double) * vPtr->length);
-    for(i = vPtr->first; i <= vPtr->last; i++) {
-	values[i] = vPtr->valueArr[map[i]];
-    }
-    Blt_Free(map);
-    for (i = vPtr->first; i <= vPtr->last; i++) {
-	vPtr->valueArr[i] = values[i];
-    }
-    Blt_Free(values);
-    return TCL_OK;
-}
-
-static double
-Length(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-
-    return (double)(vPtr->last - vPtr->first + 1);
-}
-
-double
-Blt_VecMax(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-
-    return Blt_Vec_Max(vPtr);
-}
-
-double
-Blt_VecMin(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-
-    return Blt_Vec_Min(vPtr);
-}
-
-
-static double
-Product(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double prod;
-    double *vp, *vend;
-
-    prod = 1.0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	prod *= *vp;
-    }
-    return prod;
-}
-
-static double
-Sum(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double sum, c;
-    double *vp, *vend;
-
-    /* Kahan summation algorithm */
-
-    vp = vPtr->valueArr + vPtr->first;
-    sum = *vp++;
-    c = 0.0;			/* A running compensation for lost
-				 * low-order bits.*/
-    for (vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	double y, t;
-	
-        y = *vp - c;		/* So far, so good: c is zero.*/
-        t = sum + y;		/* Alas, sum is big, y small, so
-				 * low-order digits of y are lost.*/
-        c = (t - sum) - y;	/* (t - sum) recovers the high-order
-				 * part of y; subtracting y recovers
-				 * -(low part of y) */
-	sum = t;
-    }
-    return sum;
-}
-
-static double
-Mean(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double sum;
-    int n;
-
-    sum = Sum(vectorPtr);
-    n = vPtr->last - vPtr->first + 1;
-    return sum / (double)n;
-}
-
-/*
- *  var = 1/N Sum( (x[i] - mean)^2 )
- */
-static double
-Variance(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double var, mean;
-    double *vp, *vend;
-    int count;
-
-    mean = Mean(vectorPtr);
-    var = 0.0;
-    count = 0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	double dx;
-
-	dx = *vp - mean;
-	var += dx * dx;
-	count++;
-    }
-    if (count < 2) {
-	return 0.0;
-    }
-    var /= (double)(count - 1);
-    return var;
-}
-
-/*
- *  skew = Sum( (x[i] - mean)^3 ) / (var^3/2)
- */
-static double
-Skew(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double diff, var, skew, mean, diffsq;
-    double *vp, *vend;
-    int count;
-
-    mean = Mean(vectorPtr);
-    var = skew = 0.0;
-    count = 0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	diff = *vp - mean;
-	diff = FABS(diff);
-	diffsq = diff * diff;
-	var += diffsq;
-	skew += diffsq * diff;
-	count++;
-    }
-    if (count < 2) {
-	return 0.0;
-    }
-    var /= (double)(count - 1);
-    skew /= count * var * sqrt(var);
-    return skew;
-}
-
-static double
-StdDeviation(Blt_Vector *vectorPtr)
-{
-    double var;
-
-    var = Variance(vectorPtr);
-    if (var > 0.0) {
-	return sqrt(var);
-    }
-    return 0.0;
-}
-
-
-static double
-AvgDeviation(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double diff, avg, mean;
-    double *vp, *vend;
-    int count;
-
-    mean = Mean(vectorPtr);
-    avg = 0.0;
-    count = 0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	diff = *vp - mean;
-	avg += FABS(diff);
-	count++;
-    }
-    if (count < 2) {
-	return 0.0;
-    }
-    avg /= (double)count;
-    return avg;
-}
-
-
-static double
-Kurtosis(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double diff, diffsq, kurt, var, mean;
-    double *vp, *vend;
-    int count;
-
-    mean = Mean(vectorPtr);
-    var = kurt = 0.0;
-    count = 0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	diff = *vp - mean;
-	diffsq = diff * diff;
-	var += diffsq;
-	kurt += diffsq * diffsq;
-	count++;
-    }
-    if (count < 2) {
-	return 0.0;
-    }
-    var /= (double)(count - 1);
-    if (var == 0.0) {
-	return 0.0;
-    }
-    kurt /= (count * var * var);
-    return kurt - 3.0;		/* Fisher Kurtosis */
-}
-
-
-static double
-Median(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    size_t *map;
-    double q2;
-    int mid;
-
-    if (vPtr->length == 0) {
-	return -DBL_MAX;
-    }
-    map = Blt_Vec_SortMap(&vPtr, 1);
-    mid = (vPtr->length - 1) / 2;
-
-    /*  
-     * Determine Q2 by checking if the number of elements [0..n-1] is
-     * odd or even.  If even, we must take the average of the two
-     * middle values.  
-     */
-    if (vPtr->length & 1) { /* Odd */
-	q2 = vPtr->valueArr[map[mid]];
-    } else {			/* Even */
-	q2 = (vPtr->valueArr[map[mid]] + 
-	      vPtr->valueArr[map[mid + 1]]) * 0.5;
-    }
-    Blt_Free(map);
-    return q2;
-}
-
-static double
-Q1(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double q1;
-    size_t *map;
-
-    if (vPtr->length == 0) {
-	return -DBL_MAX;
-    } 
-    map = Blt_Vec_SortMap(&vPtr, 1);
-
-    if (vPtr->length < 4) {
-	q1 = vPtr->valueArr[map[0]];
-    } else {
-	int mid, q;
-
-	mid = (vPtr->length - 1) / 2;
-	q = mid / 2;
-
-	/* 
-	 * Determine Q1 by checking if the number of elements in the
-	 * bottom half [0..mid) is odd or even.   If even, we must
-	 * take the average of the two middle values.
-	 */
-	if (mid & 1) {		/* Odd */
-	    q1 = vPtr->valueArr[map[q]]; 
-	} else {		/* Even */
-	    q1 = (vPtr->valueArr[map[q]] + 
-		  vPtr->valueArr[map[q + 1]]) * 0.5; 
-	}
-    }
-    Blt_Free(map);
-    return q1;
-}
-
-static double
-Q3(Blt_Vector *vectorPtr)
-{
-    Vector *vPtr = (Vector *)vectorPtr;
-    double q3;
-    size_t *map;
-
-    if (vPtr->length == 0) {
-	return -DBL_MAX;
-    } 
-
-    map = Blt_Vec_SortMap(&vPtr, 1);
-
-    if (vPtr->length < 4) {
-	q3 = vPtr->valueArr[map[vPtr->length - 1]];
-    } else {
-	int mid, q;
-
-	mid = (vPtr->length - 1) / 2;
-	q = (vPtr->length + mid) / 2;
-
-	/* 
-	 * Determine Q3 by checking if the number of elements in the
-	 * upper half (mid..n-1] is odd or even.   If even, we must
-	 * take the average of the two middle values.
-	 */
-	if (mid & 1) {		/* Odd */
-	    q3 = vPtr->valueArr[map[q]];
-	} else {		/* Even */
-	    q3 = (vPtr->valueArr[map[q]] + 
-		  vPtr->valueArr[map[q + 1]]) * 0.5; 
-	}
-    }
-    Blt_Free(map);
-    return q3;
-}
-
-
-static int
-Norm(Blt_Vector *vector)
-{
-    Vector *vPtr = (Vector *)vector;
-    double norm, range, min, max;
-    int i;
-
-    min = Blt_Vec_Min(vPtr);
-    max = Blt_Vec_Max(vPtr);
-    range = max - min;
-    for (i = 0; i < vPtr->length; i++) {
-	norm = (vPtr->valueArr[i] - min) / range;
-	vPtr->valueArr[i] = norm;
-    }
-    return TCL_OK;
-}
-
-
-static double
-Nonzeros(Blt_Vector *vector)
-{
-    Vector *vPtr = (Vector *)vector;
-    int count;
-    double *vp, *vend;
-
-    count = 0;
-    for(vp = vPtr->valueArr + vPtr->first,
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	if (*vp == 0.0) {
-	    count++;
-	}
-    }
-    return (double) count;
-}
-
-static double
-Fabs(double value)
-{
-    if (value < 0.0) {
-	return -value;
-    }
-    return value;
-}
-
-static double
-Round(double value)
-{
-    if (value < 0.0) {
-	return ceil(value - 0.5);
-    } else {
-	return floor(value + 0.5);
-    }
-}
-
-static double
-Fmod(double x, double y)
-{
-    if (y == 0.0) {
-	return 0.0;
-    }
-    return x - (floor(x / y) * y);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MathError --
- *
- *	This procedure is called when an error occurs during a
- *	floating-point operation.  It reads errno and sets
- *	interp->result accordingly.
- *
- * Results:
- *	Interp->result is set to hold an error message.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MathError(
-    Tcl_Interp *interp,		/* Where to store error message. */
-    double value)		/* Value returned after error; used to
-				 * distinguish underflows from
-				 * overflows. */
-{
-    if ((errno == EDOM) || (value != value)) {
-	Tcl_AppendResult(interp, "domain error: argument not in valid range",
-	    (char *)NULL);
-	Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", interp->result,
-	    (char *)NULL);
-    } else if ((errno == ERANGE) || IS_INF(value)) {
-	if (value == 0.0) {
-	    Tcl_AppendResult(interp, 
-			     "floating-point value too small to represent",
-		(char *)NULL);
-	    Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", interp->result,
-		(char *)NULL);
-	} else {
-	    Tcl_AppendResult(interp, 
-			     "floating-point value too large to represent",
-		(char *)NULL);
-	    Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", interp->result,
-		(char *)NULL);
-	}
-    } else {
-	Tcl_AppendResult(interp, "unknown floating-point error, ",
-		"errno = ", Blt_Itoa(errno), (char *)NULL);
-	Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", interp->result,
-	    (char *)NULL);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseString --
- *
- *	Given a string (such as one coming from command or variable
- *	substitution), make a Value based on the string.  The value
- *	will be a floating-point or integer, if possible, or else it
- *	will just be a copy of the string.
- *
- * Results:
- *	TCL_OK is returned under normal circumstances, and TCL_ERROR
- *	is returned if a floating-point overflow or underflow occurred
- *	while reading in a number.  The value at *valuePtr is modified
- *	to hold a number, if possible.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ParseString(
-    Tcl_Interp *interp,		/* Where to store error message. */
-    const char *string,		/* String to turn into value. */
-    Value *valuePtr)		/* Where to store value information.
-				 * Caller must have initialized pv field. */
-{
-    const char *endPtr;
-    double value;
-
-    errno = 0;
-
-    /*   
-     * The string can be either a number or a vector.  First try to
-     * convert the string to a number.  If that fails then see if
-     * we can find a vector by that name.
-     */
-
-    value = strtod(string, (char **)&endPtr);
-    if ((endPtr != string) && (*endPtr == '\0')) {
-	if (errno != 0) {
-	    Tcl_ResetResult(interp);
-	    MathError(interp, value);
-	    return TCL_ERROR;
-	}
-	/* Numbers are stored as single element vectors. */
-	if (Blt_Vec_ChangeLength(interp, valuePtr->vPtr, 1) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	valuePtr->vPtr->valueArr[0] = value;
-	return TCL_OK;
-    } else {
-	Vector *vPtr;
-
-	while (isspace(UCHAR(*string))) {
-	    string++;		/* Skip spaces leading the vector name. */    
-	}
-	vPtr = Blt_Vec_ParseElement(interp, valuePtr->vPtr->dataPtr, 
-		string, &endPtr, NS_SEARCH_BOTH);
-	if (vPtr == NULL) {
-	    return TCL_ERROR;
-	}
-	if (*endPtr != '\0') {
-	    Tcl_AppendResult(interp, "extra characters after vector", 
-			     (char *)NULL);
-	    return TCL_ERROR;
-	}
-	/* Copy the designated vector to our temporary. */
-	Blt_Vec_Duplicate(valuePtr->vPtr, vPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseMathFunction --
- *
- *	This procedure is invoked to parse a math function from an
- *	expression string, carry out the function, and return the
- *	value computed.
- *
- * Results:
- *	TCL_OK is returned if all went well and the function's value
- *	was computed successfully.  If the name doesn't match any
- *	known math function, returns TCL_RETURN. And if a format error
- *	was found, TCL_ERROR is returned and an error message is left
- *	in interp->result.
- *
- *	After a successful return piPtr will be updated to point to
- *	the character just after the function call, the token is set
- *	to VALUE, and the value is stored in valuePtr.
- *
- * Side effects:
- *	Embedded commands could have arbitrary side-effects.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ParseMathFunction(
-    Tcl_Interp *interp,		/* Interpreter to use for error reporting. */
-    const char *start,		/* Start of string to parse */
-    ParseInfo *piPtr,		/* Describes the state of the parse.
-				 * piPtr->nextPtr must point to the
-				 * first character of the function's
-				 * name. */
-    Value *valuePtr)		/* Where to store value, if that is
-				 * what's parsed from string.  Caller
-				 * must have initialized pv field
-				 * correctly. */
-{
-    Blt_HashEntry *hPtr;
-    MathFunction *mathPtr;	/* Info about math function. */
-    char *p;
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    GenericMathProc *proc;
-
-    /*
-     * Find the end of the math function's name and lookup the
-     * record for the function.
-     */
-    p = (char *)start;
-    while (isspace(UCHAR(*p))) {
-	p++;
-    }
-    piPtr->nextPtr = p;
-    while (isalnum(UCHAR(*p)) || (*p == '_')) {
-	p++;
-    }
-    if (*p != '(') {
-	return TCL_RETURN;	/* Must start with open parenthesis */
-    }
-    dataPtr = valuePtr->vPtr->dataPtr;
-    *p = '\0';
-    hPtr = Blt_FindHashEntry(&dataPtr->mathProcTable, piPtr->nextPtr);
-    *p = '(';
-    if (hPtr == NULL) {
-	return TCL_RETURN;	/* Name doesn't match any known function */
-    }
-    /* Pick up the single value as the argument to the function */
-    piPtr->token = OPEN_PAREN;
-    piPtr->nextPtr = p + 1;
-    valuePtr->pv.next = valuePtr->pv.buffer;
-    if (NextValue(interp, piPtr, -1, valuePtr) != TCL_OK) {
-	return TCL_ERROR;	/* Parse error */
-    }
-    if (piPtr->token != CLOSE_PAREN) {
-	Tcl_AppendResult(interp, "unmatched parentheses in expression \"",
-	    piPtr->expr, "\"", (char *)NULL);
-	return TCL_ERROR;	/* Missing right parenthesis */
-    }
-    mathPtr = Blt_GetHashValue(hPtr);
-    proc = mathPtr->proc;
-    if ((*proc) (mathPtr->clientData, interp, valuePtr->vPtr) != TCL_OK) {
-	return TCL_ERROR;	/* Function invocation error */
-    }
-    piPtr->token = VALUE;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextToken --
- *
- *	Lexical analyzer for expression parser:  parses a single value,
- *	operator, or other syntactic element from an expression string.
- *
- * Results:
- *	TCL_OK is returned unless an error occurred while doing lexical
- *	analysis or executing an embedded command.  In that case a
- *	standard TCL error is returned, using interp->result to hold
- *	an error message.  In the event of a successful return, the token
- *	and field in piPtr is updated to refer to the next symbol in
- *	the expression string, and the expr field is advanced past that
- *	token;  if the token is a value, then the value is stored at
- *	valuePtr.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NextToken(
-    Tcl_Interp *interp,		/* Interpreter to use for error reporting. */
-    ParseInfo *piPtr,		/* Describes the state of the parse. */
-    Value *valuePtr)		/* Where to store value, if that is
-				 * what's parsed from string.  Caller
-				 * must have initialized pv field
-				 * correctly. */
-{
-    const char *p;
-    const char *endPtr;
-    const char *var;
-    int result;
-
-    p = piPtr->nextPtr;
-    while (isspace(UCHAR(*p))) {
-	p++;
-    }
-    if (*p == '\0') {
-	piPtr->token = END;
-	piPtr->nextPtr = p;
-	return TCL_OK;
-    }
-    /*
-     * Try to parse the token as a floating-point number. But check
-     * that the first character isn't a "-" or "+", which "strtod"
-     * will happily accept as an unary operator.  Otherwise, we might
-     * accidently treat a binary operator as unary by mistake, which
-     * will eventually cause a syntax error.
-     */
-    if ((*p != '-') && (*p != '+')) {
-	double value;
-
-	errno = 0;
-	value = strtod(p, (char **)&endPtr);
-	if (endPtr != p) {
-	    if (errno != 0) {
-		MathError(interp, value);
-		return TCL_ERROR;
-	    }
-	    piPtr->token = VALUE;
-	    piPtr->nextPtr = endPtr;
-
-	    /*
-	     * Save the single floating-point value as an 1-component vector.
-	     */
-	    if (Blt_Vec_ChangeLength(interp, valuePtr->vPtr, 1) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    valuePtr->vPtr->valueArr[0] = value;
-	    return TCL_OK;
-	}
-    }
-    piPtr->nextPtr = p + 1;
-    switch (*p) {
-    case '$':
-	piPtr->token = VALUE;
-	var = Tcl_ParseVar(interp, p, &endPtr);
-	if (var == NULL) {
-	    return TCL_ERROR;
-	}
-	piPtr->nextPtr = endPtr;
-	Tcl_ResetResult(interp);
-	result = ParseString(interp, var, valuePtr);
-	return result;
-
-    case '[':
-	piPtr->token = VALUE;
-	result = Blt_ParseNestedCmd(interp, p + 1, 0, &endPtr, &valuePtr->pv);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	piPtr->nextPtr = endPtr;
-	Tcl_ResetResult(interp);
-	result = ParseString(interp, valuePtr->pv.buffer, valuePtr);
-	return result;
-
-    case '"':
-	piPtr->token = VALUE;
-	result = Blt_ParseQuotes(interp, p + 1, '"', 0, &endPtr, &valuePtr->pv);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	piPtr->nextPtr = endPtr;
-	Tcl_ResetResult(interp);
-	result = ParseString(interp, valuePtr->pv.buffer, valuePtr);
-	return result;
-
-    case '{':
-	piPtr->token = VALUE;
-	result = Blt_ParseBraces(interp, p + 1, &endPtr, &valuePtr->pv);
-	if (result != TCL_OK) {
-	    return result;
-	}
-	piPtr->nextPtr = endPtr;
-	Tcl_ResetResult(interp);
-	result = ParseString(interp, valuePtr->pv.buffer, valuePtr);
-	return result;
-
-    case '(':
-	piPtr->token = OPEN_PAREN;
-	break;
-
-    case ')':
-	piPtr->token = CLOSE_PAREN;
-	break;
-
-    case ',':
-	piPtr->token = COMMA;
-	break;
-
-    case '*':
-	piPtr->token = MULT;
-	break;
-
-    case '/':
-	piPtr->token = DIVIDE;
-	break;
-
-    case '%':
-	piPtr->token = MOD;
-	break;
-
-    case '+':
-	piPtr->token = PLUS;
-	break;
-
-    case '-':
-	piPtr->token = MINUS;
-	break;
-
-    case '^':
-	piPtr->token = EXPONENT;
-	break;
-
-    case '<':
-	switch (*(p + 1)) {
-	case '<':
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = LEFT_SHIFT;
-	    break;
-	case '=':
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = LEQ;
-	    break;
-	default:
-	    piPtr->token = LESS;
-	    break;
-	}
-	break;
-
-    case '>':
-	switch (*(p + 1)) {
-	case '>':
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = RIGHT_SHIFT;
-	    break;
-	case '=':
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = GEQ;
-	    break;
-	default:
-	    piPtr->token = GREATER;
-	    break;
-	}
-	break;
-
-    case '=':
-	if (*(p + 1) == '=') {
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = EQUAL;
-	} else {
-	    piPtr->token = UNKNOWN;
-	}
-	break;
-
-    case '&':
-	if (*(p + 1) == '&') {
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = AND;
-	} else {
-	    piPtr->token = UNKNOWN;
-	}
-	break;
-
-    case '|':
-	if (*(p + 1) == '|') {
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = OR;
-	} else {
-	    piPtr->token = UNKNOWN;
-	}
-	break;
-
-    case '!':
-	if (*(p + 1) == '=') {
-	    piPtr->nextPtr = p + 2;
-	    piPtr->token = NEQ;
-	} else {
-	    piPtr->token = NOT;
-	}
-	break;
-
-    default:
-	piPtr->token = VALUE;
-	result = ParseMathFunction(interp, p, piPtr, valuePtr);
-	if ((result == TCL_OK) || (result == TCL_ERROR)) {
-	    return result;
-	} else {
-	    Vector *vPtr;
-
-	    while (isspace(UCHAR(*p))) {
-		p++;		/* Skip spaces leading the vector name. */    
-	    }
-	    vPtr = Blt_Vec_ParseElement(interp, valuePtr->vPtr->dataPtr, 
-			p, &endPtr, NS_SEARCH_BOTH);
-	    if (vPtr == NULL) {
-		return TCL_ERROR;
-	    }
-	    Blt_Vec_Duplicate(valuePtr->vPtr, vPtr);
-	    piPtr->nextPtr = endPtr;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NextValue --
- *
- *	Parse a "value" from the remainder of the expression in piPtr.
- *
- * Results:
- *	Normally TCL_OK is returned.  The value of the expression is
- *	returned in *valuePtr.  If an error occurred, then interp->result
- *	contains an error message and TCL_ERROR is returned.
- *	InfoPtr->token will be left pointing to the token AFTER the
- *	expression, and piPtr->nextPtr will point to the character just
- *	after the terminating token.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-NextValue(
-    Tcl_Interp *interp,		/* Interpreter to use for error reporting. */
-    ParseInfo *piPtr,	/* Describes the state of the parse
-				 * just before the value (i.e. NextToken will
-				 * be called to get first token of value). */
-    int prec,			/* Treat any un-parenthesized operator
-				 * with precedence <= this as the end
-				 * of the expression. */
-    Value *valuePtr)		/* Where to store the value of the expression.
-				 * Caller must have initialized pv field. */
-{
-    Value value2;		/* Second operand for current operator.  */
-    int operator;		/* Current operator (either unary or binary). */
-    int gotOp;			/* Non-zero means already lexed the operator
-				 * (while picking up value for unary operator).
-				 * Don't lex again. */
-    int result;
-    Vector *vPtr, *v2Ptr;
-    int i;
-
-    /*
-     * There are two phases to this procedure.  First, pick off an initial
-     * value.  Then, parse (binary operator, value) pairs until done.
-     */
-
-    vPtr = valuePtr->vPtr;
-    v2Ptr = Blt_Vec_New(vPtr->dataPtr);
-    gotOp = FALSE;
-    value2.vPtr = v2Ptr;
-    value2.pv.buffer = value2.pv.next = value2.staticSpace;
-    value2.pv.end = value2.pv.buffer + STATIC_STRING_SPACE - 1;
-    value2.pv.expandProc = Blt_ExpandParseValue;
-    value2.pv.clientData = NULL;
-
-    result = NextToken(interp, piPtr, valuePtr);
-    if (result != TCL_OK) {
-	goto done;
-    }
-    if (piPtr->token == OPEN_PAREN) {
-
-	/* Parenthesized sub-expression. */
-
-	result = NextValue(interp, piPtr, -1, valuePtr);
-	if (result != TCL_OK) {
-	    goto done;
-	}
-	if (piPtr->token != CLOSE_PAREN) {
-	    Tcl_AppendResult(interp, "unmatched parentheses in expression \"",
-		piPtr->expr, "\"", (char *)NULL);
-	    result = TCL_ERROR;
-	    goto done;
-	}
-    } else {
-	if (piPtr->token == MINUS) {
-	    piPtr->token = UNARY_MINUS;
-	}
-	if (piPtr->token >= UNARY_MINUS) {
-	    operator = piPtr->token;
-	    result = NextValue(interp, piPtr, precTable[operator], valuePtr);
-	    if (result != TCL_OK) {
-		goto done;
-	    }
-	    gotOp = TRUE;
-	    /* Process unary operators. */
-	    switch (operator) {
-	    case UNARY_MINUS:
-		for(i = 0; i < vPtr->length; i++) {
-		    vPtr->valueArr[i] = -(vPtr->valueArr[i]);
-		}
-		break;
-
-	    case NOT:
-		for(i = 0; i < vPtr->length; i++) {
-		    vPtr->valueArr[i] = (double)(!vPtr->valueArr[i]);
-		}
-		break;
-	    default:
-		Tcl_AppendResult(interp, "unknown operator", (char *)NULL);
-		goto error;
-	    }
-	} else if (piPtr->token != VALUE) {
-	    Tcl_AppendResult(interp, "missing operand", (char *)NULL);
-	    goto error;
-	}
-    }
-    if (!gotOp) {
-	result = NextToken(interp, piPtr, &value2);
-	if (result != TCL_OK) {
-	    goto done;
-	}
-    }
-    /*
-     * Got the first operand.  Now fetch (operator, operand) pairs.
-     */
-    for (;;) {
-	operator = piPtr->token;
-
-	value2.pv.next = value2.pv.buffer;
-	if ((operator < MULT) || (operator >= UNARY_MINUS)) {
-	    if ((operator == END) || (operator == CLOSE_PAREN) || 
-		(operator == COMMA)) {
-		result = TCL_OK;
-		goto done;
-	    } else {
-		Tcl_AppendResult(interp, "bad operator", (char *)NULL);
-		goto error;
-	    }
-	}
-	if (precTable[operator] <= prec) {
-	    result = TCL_OK;
-	    goto done;
-	}
-	result = NextValue(interp, piPtr, precTable[operator], &value2);
-	if (result != TCL_OK) {
-	    goto done;
-	}
-	if ((piPtr->token < MULT) && (piPtr->token != VALUE) &&
-	    (piPtr->token != END) && (piPtr->token != CLOSE_PAREN) &&
-	    (piPtr->token != COMMA)) {
-	    Tcl_AppendResult(interp, "unexpected token in expression",
-		(char *)NULL);
-	    goto error;
-	}
-	/*
-	 * At this point we have two vectors and an operator.
-	 */
-
-	if (v2Ptr->length == 1) {
-	    double *opnd;
-	    double scalar;
-
-	    /*
-	     * 2nd operand is a scalar.
-	     */
-	    scalar = v2Ptr->valueArr[0];
-	    opnd = vPtr->valueArr;
-	    switch (operator) {
-	    case MULT:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] *= scalar;
-		}
-		break;
-
-	    case DIVIDE:
-		if (scalar == 0.0) {
-		    Tcl_AppendResult(interp, "divide by zero", (char *)NULL);
-		    goto error;
-		}
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] /= scalar;
-		}
-		break;
-
-	    case PLUS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] += scalar;
-		}
-		break;
-
-	    case MINUS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] -= scalar;
-		}
-		break;
-
-	    case EXPONENT:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = pow(opnd[i], scalar);
-		}
-		break;
-
-	    case MOD:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = Fmod(opnd[i], scalar);
-		}
-		break;
-
-	    case LESS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] < scalar);
-		}
-		break;
-
-	    case GREATER:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] > scalar);
-		}
-		break;
-
-	    case LEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] <= scalar);
-		}
-		break;
-
-	    case GEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] >= scalar);
-		}
-		break;
-
-	    case EQUAL:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] == scalar);
-		}
-		break;
-
-	    case NEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] != scalar);
-		}
-		break;
-
-	    case AND:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] && scalar);
-		}
-		break;
-
-	    case OR:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] || scalar);
-		}
-		break;
-
-	    case LEFT_SHIFT:
-		{
-		    int offset;
-
-		    offset = (int)scalar % vPtr->length;
-		    if (offset > 0) {
-			double *hold;
-			int j;
-
-			hold = Blt_AssertMalloc(sizeof(double) * offset);
-			for (i = 0; i < offset; i++) {
-			    hold[i] = opnd[i];
-			}
-			for (i = offset, j = 0; i < vPtr->length; i++, j++) {
-			    opnd[j] = opnd[i];
-			}
-			for (i = 0, j = vPtr->length - offset;
-			     j < vPtr->length; i++, j++) {
-			    opnd[j] = hold[i];
-			}
-			Blt_Free(hold);
-		    }
-		}
-		break;
-
-	    case RIGHT_SHIFT:
-		{
-		    int offset;
-
-		    offset = (int)scalar % vPtr->length;
-		    if (offset > 0) {
-			double *hold;
-			int j;
-			
-			hold = Blt_AssertMalloc(sizeof(double) * offset);
-			for (i = vPtr->length - offset, j = 0; 
-			     i < vPtr->length; i++, j++) {
-			    hold[j] = opnd[i];
-			}
-			for (i = vPtr->length - offset - 1, 
-				 j = vPtr->length - 1; i >= 0; i--, j--) {
-			    opnd[j] = opnd[i];
-			}
-			for (i = 0; i < offset; i++) {
-			    opnd[i] = hold[i];
-			}
-			Blt_Free(hold);
-		    }
-		}
-		break;
-
-	    default:
-		Tcl_AppendResult(interp, "unknown operator in expression",
-		    (char *)NULL);
-		goto error;
-	    }
-
-	} else if (vPtr->length == 1) {
-	    double *opnd;
-	    double scalar;
-
-	    /*
-	     * 1st operand is a scalar.
-	     */
-	    scalar = vPtr->valueArr[0];
-	    Blt_Vec_Duplicate(vPtr, v2Ptr);
-	    opnd = vPtr->valueArr;
-	    switch (operator) {
-	    case MULT:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] *= scalar;
-		}
-		break;
-
-	    case PLUS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] += scalar;
-		}
-		break;
-
-	    case DIVIDE:
-		for(i = 0; i < vPtr->length; i++) {
-		    if (opnd[i] == 0.0) {
-			Tcl_AppendResult(interp, "divide by zero",
-			    (char *)NULL);
-			goto error;
-		    }
-		    opnd[i] = (scalar / opnd[i]);
-		}
-		break;
-
-	    case MINUS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = scalar - opnd[i];
-		}
-		break;
-
-	    case EXPONENT:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = pow(scalar, opnd[i]);
-		}
-		break;
-
-	    case MOD:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = Fmod(scalar, opnd[i]);
-		}
-		break;
-
-	    case LESS:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(scalar < opnd[i]);
-		}
-		break;
-
-	    case GREATER:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(scalar > opnd[i]);
-		}
-		break;
-
-	    case LEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(scalar >= opnd[i]);
-		}
-		break;
-
-	    case GEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(scalar <= opnd[i]);
-		}
-		break;
-
-	    case EQUAL:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] == scalar);
-		}
-		break;
-
-	    case NEQ:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] != scalar);
-		}
-		break;
-
-	    case AND:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] && scalar);
-		}
-		break;
-
-	    case OR:
-		for(i = 0; i < vPtr->length; i++) {
-		    opnd[i] = (double)(opnd[i] || scalar);
-		}
-		break;
-
-	    case LEFT_SHIFT:
-	    case RIGHT_SHIFT:
-		Tcl_AppendResult(interp, "second shift operand must be scalar",
-		    (char *)NULL);
-		goto error;
-
-	    default:
-		Tcl_AppendResult(interp, "unknown operator in expression",
-		    (char *)NULL);
-		goto error;
-	    }
-	} else {
-	    double *opnd1, *opnd2;
-	    /*
-	     * Carry out the function of the specified operator.
-	     */
-	    if (vPtr->length != v2Ptr->length) {
-		Tcl_AppendResult(interp, "vectors are different lengths",
-		    (char *)NULL);
-		goto error;
-	    }
-	    opnd1 = vPtr->valueArr, opnd2 = v2Ptr->valueArr;
-	    switch (operator) {
-	    case MULT:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] *= opnd2[i];
-		}
-		break;
-
-	    case DIVIDE:
-		for (i = 0; i < vPtr->length; i++) {
-		    if (opnd2[i] == 0.0) {
-			Tcl_AppendResult(interp,
-			    "can't divide by 0.0 vector component",
-			    (char *)NULL);
-			goto error;
-		    }
-		    opnd1[i] /= opnd2[i];
-		}
-		break;
-
-	    case PLUS:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] += opnd2[i];
-		}
-		break;
-
-	    case MINUS:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] -= opnd2[i];
-		}
-		break;
-
-	    case MOD:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = Fmod(opnd1[i], opnd2[i]);
-		}
-		break;
-
-	    case EXPONENT:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = pow(opnd1[i], opnd2[i]);
-		}
-		break;
-
-	    case LESS:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] < opnd2[i]);
-		}
-		break;
-
-	    case GREATER:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] > opnd2[i]);
-		}
-		break;
-
-	    case LEQ:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] <= opnd2[i]);
-		}
-		break;
-
-	    case GEQ:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] >= opnd2[i]);
-		}
-		break;
-
-	    case EQUAL:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] == opnd2[i]);
-		}
-		break;
-
-	    case NEQ:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] != opnd2[i]);
-		}
-		break;
-
-	    case AND:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] && opnd2[i]);
-		}
-		break;
-
-	    case OR:
-		for (i = 0; i < vPtr->length; i++) {
-		    opnd1[i] = (double)(opnd1[i] || opnd2[i]);
-		}
-		break;
-
-	    case LEFT_SHIFT:
-	    case RIGHT_SHIFT:
-		Tcl_AppendResult(interp, "second shift operand must be scalar",
-		    (char *)NULL);
-		goto error;
-
-	    default:
-		Tcl_AppendResult(interp, "unknown operator in expression",
-		    (char *)NULL);
-		goto error;
-	    }
-	}
-    }
-  done:
-    if (value2.pv.buffer != value2.staticSpace) {
-	Blt_Free(value2.pv.buffer);
-    }
-    Blt_Vec_Free(v2Ptr);
-    return result;
-
-  error:
-    if (value2.pv.buffer != value2.staticSpace) {
-	Blt_Free(value2.pv.buffer);
-    }
-    Blt_Vec_Free(v2Ptr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * EvaluateExpression --
- *
- *	This procedure provides top-level functionality shared by
- *	procedures like Tcl_ExprInt, Tcl_ExprDouble, etc.
- *
- * Results:
- *	The result is a standard TCL return value.  If an error
- *	occurs then an error message is left in interp->result.
- *	The value of the expression is returned in *valuePtr, in
- *	whatever form it ends up in (could be string or integer
- *	or double).  Caller may need to convert result.  Caller
- *	is also responsible for freeing string memory in *valuePtr,
- *	if any was allocated.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-EvaluateExpression(
-    Tcl_Interp *interp,		/* Context in which to evaluate the
-				 * expression. */
-    char *string,		/* Expression to evaluate. */
-    Value *valuePtr)		/* Where to store result.  Should
-				 * not be initialized by caller. */
-{
-    ParseInfo info;
-    int result;
-    Vector *vPtr;
-    double *vp, *vend;
-
-    info.expr = info.nextPtr = string;
-    valuePtr->pv.buffer = valuePtr->pv.next = valuePtr->staticSpace;
-    valuePtr->pv.end = valuePtr->pv.buffer + STATIC_STRING_SPACE - 1;
-    valuePtr->pv.expandProc = Blt_ExpandParseValue;
-    valuePtr->pv.clientData = NULL;
-
-    result = NextValue(interp, &info, -1, valuePtr);
-    if (result != TCL_OK) {
-	return result;
-    }
-    if (info.token != END) {
-	Tcl_AppendResult(interp, ": syntax error in expression \"",
-	    string, "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    vPtr = valuePtr->vPtr;
-
-    /* Check for NaN's and overflows. */
-    for (vp = vPtr->valueArr, vend = vp + vPtr->length; vp < vend; vp++) {
-	if (!FINITE(*vp)) {
-	    /*
-	     * IEEE floating-point error.
-	     */
-	    MathError(interp, *vp);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Math Functions --
- *
- *	This page contains the procedures that implement all of the
- *	built-in math functions for expressions.
- *
- * Results:
- *	Each procedure returns TCL_OK if it succeeds and places result
- *	information at *resultPtr.  If it fails it returns TCL_ERROR
- *	and leaves an error message in interp->result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ComponentFunc(
-    ClientData clientData,	/* Contains address of procedure that
-				 * takes one double argument and
-				 * returns a double result. */
-    Tcl_Interp *interp,
-    Vector *vPtr)
-{
-    ComponentProc *procPtr = (ComponentProc *) clientData;
-    double *vp, *vend;
-
-    errno = 0;
-    for(vp = vPtr->valueArr + vPtr->first, 
-	    vend = vPtr->valueArr + vPtr->last; vp <= vend; vp++) {
-	*vp = (*procPtr) (*vp);
-	if (errno != 0) {
-	    MathError(interp, *vp);
-	    return TCL_ERROR;
-	}
-	if (!FINITE(*vp)) {
-	    /*
-	     * IEEE floating-point error.
-	     */
-	    MathError(interp, *vp);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-ScalarFunc(ClientData clientData, Tcl_Interp *interp, Vector *vPtr)
-{
-    double value;
-    ScalarProc *procPtr = (ScalarProc *) clientData;
-
-    errno = 0;
-    value = (*procPtr) (vPtr);
-    if (errno != 0) {
-	MathError(interp, value);
-	return TCL_ERROR;
-    }
-    if (Blt_Vec_ChangeLength(interp, vPtr, 1) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    vPtr->valueArr[0] = value;
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-VectorFunc(ClientData clientData, Tcl_Interp *interp, Vector *vPtr)
-{
-    VectorProc *procPtr = (VectorProc *) clientData;
-
-    return (*procPtr) (vPtr);
-}
-
-
-static MathFunction mathFunctions[] =
-{
-    {"abs",     ComponentFunc, Fabs},
-    {"acos",	ComponentFunc, acos},
-    {"asin",	ComponentFunc, asin},
-    {"atan",	ComponentFunc, atan},
-    {"adev",	ScalarFunc,    AvgDeviation},
-    {"ceil",	ComponentFunc, ceil},
-    {"cos",	ComponentFunc, cos},
-    {"cosh",	ComponentFunc, cosh},
-    {"exp",	ComponentFunc, exp},
-    {"floor",	ComponentFunc, floor},
-    {"kurtosis",ScalarFunc,    Kurtosis},
-    {"length",	ScalarFunc,    Length},
-    {"log",	ComponentFunc, log},
-    {"log10",	ComponentFunc, log10},
-    {"max",	ScalarFunc,    Blt_VecMax},
-    {"mean",	ScalarFunc,    Mean},
-    {"median",	ScalarFunc,    Median},
-    {"min",	ScalarFunc,    Blt_VecMin},
-    {"norm",	VectorFunc,    Norm},
-    {"nz",	ScalarFunc,    Nonzeros},
-    {"q1",	ScalarFunc,    Q1},
-    {"q3",	ScalarFunc,    Q3},
-    {"prod",	ScalarFunc,    Product},
-    {"random",	ComponentFunc, drand48},
-    {"round",	ComponentFunc, Round},
-    {"sdev",	ScalarFunc,    StdDeviation},
-    {"sin",	ComponentFunc, sin},
-    {"sinh",	ComponentFunc, sinh},
-    {"skew",	ScalarFunc,    Skew},
-    {"sort",	VectorFunc,    Sort},
-    {"sqrt",	ComponentFunc, sqrt},
-    {"sum",	ScalarFunc,    Sum},
-    {"tan",	ComponentFunc, tan},
-    {"tanh",	ComponentFunc, tanh},
-    {"var",	ScalarFunc,    Variance},
-    {(char *)NULL,},
-};
-
-void
-Blt_Vec_InstallMathFunctions(Blt_HashTable *tablePtr)
-{
-    MathFunction *mathPtr;
-
-    for (mathPtr = mathFunctions; mathPtr->name != NULL; mathPtr++) {
-	Blt_HashEntry *hPtr;
-	int isNew;
-
-	hPtr = Blt_CreateHashEntry(tablePtr, mathPtr->name, &isNew);
-	Blt_SetHashValue(hPtr, (ClientData)mathPtr);
-    }
-}
-
-void
-Blt_Vec_UninstallMathFunctions(Blt_HashTable *tablePtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(tablePtr, &cursor); hPtr != NULL; 
-	hPtr = Blt_NextHashEntry(&cursor)) {
-	MathFunction *mathPtr;
-
-	mathPtr = Blt_GetHashValue(hPtr);
-	if (mathPtr->name == NULL) {
-	    Blt_Free(mathPtr);
-	}
-    }
-}
-
-
-static void
-InstallIndexProc(
-    Blt_HashTable *tablePtr,
-    const char *string,
-    Blt_VectorIndexProc *procPtr) /* Pointer to function to be called
-				   * when the vector finds the named index.
-				   * If NULL, this indicates to remove
-				   * the index from the table.
-				   */
-{
-    Blt_HashEntry *hPtr;
-    int dummy;
-
-    hPtr = Blt_CreateHashEntry(tablePtr, string, &dummy);
-    if (procPtr == NULL) {
-	Blt_DeleteHashEntry(tablePtr, hPtr);
-    } else {
-	Blt_SetHashValue(hPtr, (ClientData)procPtr);
-    }
-}
-
-void
-Blt_Vec_InstallSpecialIndices(Blt_HashTable *tablePtr)
-{
-    InstallIndexProc(tablePtr, "min",  Blt_VecMin);
-    InstallIndexProc(tablePtr, "max",  Blt_VecMax);
-    InstallIndexProc(tablePtr, "mean", Mean);
-    InstallIndexProc(tablePtr, "sum",  Sum);
-    InstallIndexProc(tablePtr, "prod", Product);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ExprVector --
- *
- *	Evaluates an vector expression and returns its value(s).
- *
- * Results:
- *	Each of the procedures below returns a standard TCL result.
- *	If an error occurs then an error message is left in
- *	interp->result.  Otherwise the value of the expression,
- *	in the appropriate form, is stored at *resultPtr.  If
- *	the expression had a result that was incompatible with the
- *	desired form then an error is returned.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ExprVector(
-    Tcl_Interp *interp,		/* Context in which to evaluate the
-				 * expression. */
-    char *string,		/* Expression to evaluate. */
-    Blt_Vector *vector)		/* Where to store result. */
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr = (Vector *)vector;
-    Value value;
-
-    dataPtr = (vector != NULL) 
-	? vPtr->dataPtr : Blt_Vec_GetInterpData(interp);
-    value.vPtr = Blt_Vec_New(dataPtr);
-    if (EvaluateExpression(interp, string, &value) != TCL_OK) {
-	Blt_Vec_Free(value.vPtr);
-	return TCL_ERROR;
-    }
-    if (vPtr != NULL) {
-	Blt_Vec_Duplicate(vPtr, value.vPtr);
-    } else {
-	Tcl_Obj *listObjPtr;
-	double *vp, *vend;
-
-	/* No result vector.  Put values in interp->result.  */
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	for (vp = value.vPtr->valueArr, vend = vp + value.vPtr->length; 
-	     vp < vend; vp++) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewDoubleObj(*vp));
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    Blt_Vec_Free(value.vPtr);
-    return TCL_OK;
-}
diff --git a/blt3.0/src/bltVector.c b/blt3.0/src/bltVector.c
deleted file mode 100644
index e332b9d..0000000
--- a/blt3.0/src/bltVector.c
+++ /dev/null
@@ -1,2808 +0,0 @@
-
-/*
- * bltVector.c --
- *
- * This module implements vector data objects.
- *
- *	Copyright 1995-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * TODO:
- *	o Add H. Kirsch's vector binary read operation
- *		x binread file0
- *		x binread -file file0
- *
- *	o Add ASCII/binary file reader
- *		x read fileName
- *
- *	o Allow Tcl-based client notifications.
- *		vector x
- *		x notify call Display
- *		x notify delete Display
- *		x notify reorder #1 #2
- */
-
-#include "bltVecInt.h"
-#include "bltOp.h"
-#include "bltNsUtil.h"
-#include "bltSwitch.h"
-#include <bltMath.h>
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif /* HAVE_SYS_TIME_H */
-#endif /* TIME_WITH_SYS_TIME */
-
-#ifndef TCL_NAMESPACE_ONLY
-#define TCL_NAMESPACE_ONLY TCL_GLOBAL_ONLY
-#endif
-
-#define DEF_ARRAY_SIZE		64
-#define TRACE_ALL  (TCL_TRACE_WRITES | TCL_TRACE_READS | TCL_TRACE_UNSETS)
-
-
-#define VECTOR_CHAR(c)	((isalnum(UCHAR(c))) || \
-	(c == '_') || (c == ':') || (c == '@') || (c == '.'))
-
-
-/*
- * VectorClient --
- *
- *	A vector can be shared by several clients.  Each client allocates this
- *	structure that acts as its key for using the vector.  Clients can also
- *	designate a callback routine that is executed whenever the vector is
- *	updated or destroyed.
- *
- */
-typedef struct {
-    unsigned int magic;		/* Magic value designating whether this really
-				 * is a vector token or not */
-
-    Vector *serverPtr;		/* Pointer to the master record of the vector.
-				 * If NULL, indicates that the vector has been
-				 * destroyed but as of yet, this client hasn't
-				 * recognized it. */
-
-    Blt_VectorChangedProc *proc;/* Routine to call when the contents of the
-				 * vector change or the vector is deleted. */
-
-    ClientData clientData;	/* Data passed whenever the vector change
-				 * procedure is called. */
-
-    Blt_ChainLink link;		/* Used to quickly remove this entry from its
-				 * server's client chain. */
-} VectorClient;
-
-static Tcl_CmdDeleteProc VectorInstDeleteProc;
-static Tcl_ObjCmdProc VectorCmd;
-static Tcl_InterpDeleteProc VectorInterpDeleteProc;
-
-typedef struct {
-    char *varName;		/* Requested variable name. */
-    char *cmdName;		/* Requested command name. */
-    int flush;			/* Flush */
-    int watchUnset;		/* Watch when variable is unset. */
-} CreateSwitches;
-
-static Blt_SwitchSpec createSwitches[] = 
-{
-    {BLT_SWITCH_STRING, "-variable", "varName",
-	Blt_Offset(CreateSwitches, varName), BLT_SWITCH_NULL_OK},
-    {BLT_SWITCH_STRING, "-command", "command",
-	Blt_Offset(CreateSwitches, cmdName), BLT_SWITCH_NULL_OK},
-    {BLT_SWITCH_BOOLEAN, "-watchunset", "bool",
-	Blt_Offset(CreateSwitches, watchUnset), 0},
-    {BLT_SWITCH_BOOLEAN, "-flush", "bool",
-	Blt_Offset(CreateSwitches, flush), 0},
-    {BLT_SWITCH_END}
-};
-
-typedef int (VectorCmdProc)(Vector *vecObjPtr, Tcl_Interp *interp, 
-	int objc, Tcl_Obj *const *objv);
-
-static Vector *
-FindVectorInNamespace(
-    VectorInterpData *dataPtr,	/* Interpreter-specific data. */
-    Blt_ObjectName *objNamePtr)
-{
-    Tcl_DString dString;
-    const char *name;
-    Blt_HashEntry *hPtr;
-
-    name = Blt_MakeQualifiedName(objNamePtr, &dString);
-    hPtr = Blt_FindHashEntry(&dataPtr->vectorTable, name);
-    Tcl_DStringFree(&dString);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetVectorObject --
- *
- *	Searches for the vector associated with the name given.  Allow for a
- *	range specification.
- *
- * Results:
- *	Returns a pointer to the vector if found, otherwise NULL.
- *
- *---------------------------------------------------------------------------
- */
-static Vector *
-GetVectorObject(
-    VectorInterpData *dataPtr,	/* Interpreter-specific data. */
-    const char *name,
-    int flags)
-{
-    Blt_ObjectName objName;
-    Vector *vPtr;
-    Tcl_Interp *interp;
-
-    interp = dataPtr->interp;
-    if (!Blt_ParseObjectName(interp, name, &objName, 
-		BLT_NO_ERROR_MSG | BLT_NO_DEFAULT_NS)) {
-	return NULL;		/* Can't find namespace. */
-    } 
-    vPtr = NULL;
-    if (objName.nsPtr != NULL) {
-	vPtr = FindVectorInNamespace(dataPtr, &objName);
-    } else {
-	if (flags & NS_SEARCH_CURRENT) {
-	    objName.nsPtr = Tcl_GetCurrentNamespace(interp);
-	    vPtr = FindVectorInNamespace(dataPtr, &objName);
-	}
-	if ((vPtr == NULL) && (flags & NS_SEARCH_GLOBAL)) {
-	    objName.nsPtr = Tcl_GetGlobalNamespace(interp);
-	    vPtr = FindVectorInNamespace(dataPtr, &objName);
-	}
-    }
-    return vPtr;
-}
-
-void
-Blt_Vec_UpdateRange(Vector *vPtr)
-{
-    double min, max;
-    double *vp, *vend;
-
-    vp = vPtr->valueArr + vPtr->first;
-    vend = vPtr->valueArr + vPtr->last;
-    min = max = *vp++;
-    for (/* empty */; vp <= vend; vp++) {
-	if (min > *vp) {
-	    min = *vp; 
-	} else if (max < *vp) { 
-	    max = *vp; 
-	} 
-    } 
-    vPtr->min = min;
-    vPtr->max = max;
-    vPtr->notifyFlags &= ~UPDATE_RANGE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_GetIndex --
- *
- *	Converts the string representing an index in the vector, to its
- *	numeric value.  A valid index may be an numeric string of the string
- *	"end" (indicating the last element in the string).
- *
- * Results:
- *	A standard TCL result.  If the string is a valid index, TCL_OK is
- *	returned.  Otherwise TCL_ERROR is returned and interp->result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_GetIndex(
-    Tcl_Interp *interp,
-    Vector *vPtr,
-    const char *string,
-    int *indexPtr,
-    int flags,
-    Blt_VectorIndexProc **procPtrPtr)
-{
-    char c;
-    int value;
-
-    c = string[0];
-
-    /* Treat the index "end" like a numeric index.  */
-
-    if ((c == 'e') && (strcmp(string, "end") == 0)) {
-	if (vPtr->length < 1) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad index \"end\": vector is empty", 
-				 (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	*indexPtr = vPtr->length - 1;
-	return TCL_OK;
-    } else if ((c == '+') && (strcmp(string, "++end") == 0)) {
-	*indexPtr = vPtr->length;
-	return TCL_OK;
-    }
-    if (procPtrPtr != NULL) {
-	Blt_HashEntry *hPtr;
-
-	hPtr = Blt_FindHashEntry(&vPtr->dataPtr->indexProcTable, string);
-	if (hPtr != NULL) {
-	    *indexPtr = SPECIAL_INDEX;
-	    *procPtrPtr = Blt_GetHashValue(hPtr);
-	    return TCL_OK;
-	}
-    }
-    if (Tcl_GetInt(interp, (char *)string, &value) != TCL_OK) {
-	long int lvalue;
-	/*   
-	 * Unlike Tcl_GetInt, Tcl_ExprLong needs a valid interpreter, but the
-	 * interp passed in may be NULL.  So we have to use vPtr->interp and
-	 * then reset the result.
-	 */
-	if (Tcl_ExprLong(vPtr->interp, (char *)string, &lvalue) != TCL_OK) {
-	    Tcl_ResetResult(vPtr->interp);
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad index \"", string, "\"", 
-				 (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-	value = (int)lvalue;
-    }
-    /*
-     * Correct the index by the current value of the offset. This makes all
-     * the numeric indices non-negative, which is how we distinguish the
-     * special non-numeric indices.
-     */
-    value -= vPtr->offset;
-
-    if ((value < 0) || ((flags & INDEX_CHECK) && (value >= vPtr->length))) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "index \"", string, "\" is out of range", 
-			 (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *indexPtr = (int)value;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_GetIndexRange --
- *
- *	Converts the string representing an index in the vector, to its
- *	numeric value.  A valid index may be an numeric string of the string
- *	"end" (indicating the last element in the string).
- *
- * Results:
- *	A standard TCL result.  If the string is a valid index, TCL_OK is
- *	returned.  Otherwise TCL_ERROR is returned and interp->result will
- *	contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_GetIndexRange(
-    Tcl_Interp *interp,
-    Vector *vPtr,
-    const char *string,
-    int flags,
-    Blt_VectorIndexProc **procPtrPtr)
-{
-    int ielem;
-    char *colon;
-
-    colon = NULL;
-    if (flags & INDEX_COLON) {
-	colon = strchr(string, ':');
-    }
-    if (colon != NULL) {
-	if (string == colon) {
-	    vPtr->first = 0;	/* Default to the first index */
-	} else {
-	    int result;
-
-	    *colon = '\0';
-	    result = Blt_Vec_GetIndex(interp, vPtr, string, &ielem, flags,
-		(Blt_VectorIndexProc **) NULL);
-	    *colon = ':';
-	    if (result != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    vPtr->first = ielem;
-	}
-	if (*(colon + 1) == '\0') {
-	    /* Default to the last index */
-	    vPtr->last = (vPtr->length > 0) ? vPtr->length - 1 : 0;
-	} else {
-	    if (Blt_Vec_GetIndex(interp, vPtr, colon + 1, &ielem, flags,
-		    (Blt_VectorIndexProc **) NULL) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    vPtr->last = ielem;
-	}
-	if (vPtr->first > vPtr->last) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "bad range \"", string,
-			 "\" (first > last)", (char *)NULL);
-	    }
-	    return TCL_ERROR;
-	}
-    } else {
-	if (Blt_Vec_GetIndex(interp, vPtr, string, &ielem, flags, 
-		       procPtrPtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	vPtr->last = vPtr->first = ielem;
-    }
-    return TCL_OK;
-}
-
-Vector *
-Blt_Vec_ParseElement(
-    Tcl_Interp *interp,
-    VectorInterpData *dataPtr,	/* Interpreter-specific data. */
-    const char *start,
-    const char **endPtr,
-    int flags)
-{
-    char *p;
-    char saved;
-    Vector *vPtr;
-
-    p = (char *)start;
-    /* Find the end of the vector name */
-    while (VECTOR_CHAR(*p)) {
-	p++;
-    }
-    saved = *p;
-    *p = '\0';
-
-    vPtr = GetVectorObject(dataPtr, start, flags);
-    if (vPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find vector \"", start, "\"", 
-			     (char *)NULL);
-	}
-	*p = saved;
-	return NULL;
-    }
-    *p = saved;
-    vPtr->first = 0;
-    vPtr->last = vPtr->length - 1;
-    if (*p == '(') {
-	int count, result;
-
-	start = p + 1;
-	p++;
-
-	/* Find the matching right parenthesis */
-	count = 1;
-	while (*p != '\0') {
-	    if (*p == ')') {
-		count--;
-		if (count == 0) {
-		    break;
-		}
-	    } else if (*p == '(') {
-		count++;
-	    }
-	    p++;
-	}
-	if (count > 0) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "unbalanced parentheses \"", start, 
-			"\"", (char *)NULL);
-	    }
-	    return NULL;
-	}
-	*p = '\0';
-	result = Blt_Vec_GetIndexRange(interp, vPtr, start, 
-		(INDEX_COLON | INDEX_CHECK), (Blt_VectorIndexProc **) NULL);
-	*p = ')';
-	if (result != TCL_OK) {
-	    return NULL;
-	}
-	p++;
-    }
-    if (endPtr != NULL) {
-      *endPtr = p;
-    }
-    return vPtr;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_NotifyClients --
- *
- *	Notifies each client of the vector that the vector has changed
- *	(updated or destroyed) by calling the provided function back.  The
- *	function pointer may be NULL, in that case the client is not notified.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The results depend upon what actions the client callbacks
- *	take.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Vec_NotifyClients(ClientData clientData)
-{
-    Vector *vPtr = clientData;
-    Blt_ChainLink link, next;
-    Blt_VectorNotify notify;
-
-    notify = (vPtr->notifyFlags & NOTIFY_DESTROYED)
-	? BLT_VECTOR_NOTIFY_DESTROY : BLT_VECTOR_NOTIFY_UPDATE;
-    vPtr->notifyFlags &= ~(NOTIFY_UPDATED | NOTIFY_DESTROYED | NOTIFY_PENDING);
-    for (link = Blt_Chain_FirstLink(vPtr->chain); link != NULL; link = next) {
-	VectorClient *clientPtr;
-
-	next = Blt_Chain_NextLink(link);
-	clientPtr = Blt_Chain_GetValue(link);
-	if ((clientPtr->proc != NULL) && (clientPtr->serverPtr != NULL)) {
-	    (*clientPtr->proc) (vPtr->interp, clientPtr->clientData, notify);
-	}
-    }
-    /*
-     * Some clients may not handle the "destroy" callback properly (they
-     * should call Blt_FreeVectorId to release the client identifier), so mark
-     * any remaining clients to indicate that vector's server has gone away.
-     */
-    if (notify == BLT_VECTOR_NOTIFY_DESTROY) {
-	for (link = Blt_Chain_FirstLink(vPtr->chain); link != NULL;
-	    link = Blt_Chain_NextLink(link)) {
-	    VectorClient *clientPtr;
-
-	    clientPtr = Blt_Chain_GetValue(link);
-	    clientPtr->serverPtr = NULL;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_UpdateClients --
- *
- *	Notifies each client of the vector that the vector has changed
- *	(updated or destroyed) by calling the provided function back.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The individual client callbacks are eventually invoked.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Vec_UpdateClients(Vector *vPtr)
-{
-    vPtr->dirty++;
-    vPtr->max = vPtr->min = Blt_NaN();
-    if (vPtr->notifyFlags & NOTIFY_NEVER) {
-	return;
-    }
-    vPtr->notifyFlags |= NOTIFY_UPDATED;
-    if (vPtr->notifyFlags & NOTIFY_ALWAYS) {
-	Blt_Vec_NotifyClients(vPtr);
-	return;
-    }
-    if (!(vPtr->notifyFlags & NOTIFY_PENDING)) {
-	vPtr->notifyFlags |= NOTIFY_PENDING;
-	Tcl_DoWhenIdle(Blt_Vec_NotifyClients, vPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_FlushCache --
- *
- *	Unsets all the elements of the TCL array variable associated with the
- *	vector, freeing memory associated with the variable.  This includes
- *	both the hash table and the hash keys.  The down side is that this
- *	effectively flushes the caching of vector elements in the array.  This
- *	means that the subsequent reads of the array will require a decimal to
- *	string conversion.
- *
- *	This is needed when the vector changes its values, making the array
- *	variable out-of-sync.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	All elements of array variable (except one) are unset, freeing
- *	the memory associated with the variable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Vec_FlushCache(Vector *vPtr)
-{
-    Tcl_Interp *interp = vPtr->interp;
-
-    if (vPtr->arrayName == NULL) {
-	return;			/* Doesn't use the variable API */
-    }
-    /* Turn off the trace temporarily so that we can unset all the
-     * elements in the array.  */
-
-    Tcl_UntraceVar2(interp, vPtr->arrayName, (char *)NULL,
-	TRACE_ALL | vPtr->varFlags, Blt_Vec_VarTrace, vPtr);
-
-    /* Clear all the element entries from the entire array */
-    Tcl_UnsetVar2(interp, vPtr->arrayName, (char *)NULL, vPtr->varFlags);
-
-    /* Restore the "end" index by default and the trace on the entire array */
-    Tcl_SetVar2(interp, vPtr->arrayName, "end", "", vPtr->varFlags);
-    Tcl_TraceVar2(interp, vPtr->arrayName, (char *)NULL,
-	TRACE_ALL | vPtr->varFlags, Blt_Vec_VarTrace, vPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_LookupName --
- *
- *	Searches for the vector associated with the name given.  Allow for a
- *	range specification.
- *
- * Results:
- *	Returns a pointer to the vector if found, otherwise NULL.  If the name
- *	is not associated with a vector and the TCL_LEAVE_ERR_MSG flag is set,
- *	and interp->result will contain an error message.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_LookupName(
-    VectorInterpData *dataPtr,	/* Interpreter-specific data. */
-    const char *vecName,
-    Vector **vPtrPtr)
-{
-    Vector *vPtr;
-    const char *endPtr;
-
-    vPtr = Blt_Vec_ParseElement(dataPtr->interp, dataPtr, vecName, &endPtr, 
-	NS_SEARCH_BOTH);
-    if (vPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (*endPtr != '\0') {
-	Tcl_AppendResult(dataPtr->interp, 
-			 "extra characters after vector name", (char *)NULL);
-	return TCL_ERROR;
-    }
-    *vPtrPtr = vPtr;
-    return TCL_OK;
-}
-
-double
-Blt_Vec_Min(Vector *vecObjPtr)
-{
-    double *vp, *vend;
-    double min;
-
-    vp = vecObjPtr->valueArr + vecObjPtr->first;
-    vend = vecObjPtr->valueArr + vecObjPtr->last;
-    min = *vp++;
-    for (/* empty */; vp <= vend; vp++) {
-	if (min > *vp) {
-	    min = *vp; 
-	} 
-    } 
-    vecObjPtr->min = min;
-    return vecObjPtr->min;
-}
-
-double
-Blt_Vec_Max(Vector *vecObjPtr)
-{
-    double max;
-    double *vp, *vend;
-
-    max = Blt_NaN();
-    vp = vecObjPtr->valueArr + vecObjPtr->first;
-    vend = vecObjPtr->valueArr + vecObjPtr->last;
-    max = *vp++;
-    for (/* empty */; vp <= vend; vp++) {
-	if (max < *vp) {
-	    max = *vp; 
-	} 
-    } 
-    vecObjPtr->max = max;
-    return vecObjPtr->max;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteCommand --
- *
- *	Deletes the TCL command associated with the vector, without triggering
- *	a callback to "VectorInstDeleteProc".
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DeleteCommand(Vector *vPtr) /* Vector associated with the TCL command. */
-{
-    Tcl_Interp *interp = vPtr->interp;
-    char *qualName;		/* Name of TCL command. */
-    Tcl_CmdInfo cmdInfo;
-    Tcl_DString dString;
-    Blt_ObjectName objName;
-
-    Tcl_DStringInit(&dString);
-    objName.name = Tcl_GetCommandName(interp, vPtr->cmdToken);
-    objName.nsPtr = Blt_GetCommandNamespace(vPtr->cmdToken);
-    qualName = Blt_MakeQualifiedName(&objName, &dString);
-    if (Tcl_GetCommandInfo(interp, qualName, &cmdInfo)) {
-	/* Disable the callback before deleting the TCL command.*/	
-	cmdInfo.deleteProc = NULL;	
-	Tcl_SetCommandInfo(interp, qualName, &cmdInfo);
-	Tcl_DeleteCommandFromToken(interp, vPtr->cmdToken);
-    }
-    Tcl_DStringFree(&dString);
-    vPtr->cmdToken = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnmapVariable --
- *
- *	Destroys the trace on the current TCL variable designated to access
- *	the vector.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UnmapVariable(Vector *vPtr)
-{
-    Tcl_Interp *interp = vPtr->interp;
-
-    /* Unset the entire array */
-    Tcl_UntraceVar2(interp, vPtr->arrayName, (char *)NULL,
-	(TRACE_ALL | vPtr->varFlags), Blt_Vec_VarTrace, vPtr);
-    Tcl_UnsetVar2(interp, vPtr->arrayName, (char *)NULL, vPtr->varFlags);
-
-    if (vPtr->arrayName != NULL) {
-	Blt_Free(vPtr->arrayName);
-	vPtr->arrayName = NULL;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_MapVariable --
- *
- *	Sets up traces on a TCL variable to access the vector.
- *
- *	If another variable is already mapped, it's first untraced and
- *	removed.  Don't do anything else for variables named "" (even though
- *	Tcl allows this pathology). Saves the name of the new array variable.
- *
- * Results:
- *	A standard TCL result. If an error occurs setting the variable
- *	TCL_ERROR is returned and an error message is left in the interpreter.
- *
- * Side effects:
- *	Traces are set for the new variable. The new variable name is saved in
- *	a malloc'ed string in vPtr->arrayName.  If this variable is non-NULL,
- *	it indicates that a TCL variable has been mapped to this vector.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_MapVariable(
-    Tcl_Interp *interp, 
-    Vector *vPtr, 
-    const char *path)
-{
-    Blt_ObjectName objName;
-    char *newPath;
-    const char *result;
-    Tcl_DString dString;
-
-    if (vPtr->arrayName != NULL) {
-	UnmapVariable(vPtr);
-    }
-    if ((path == NULL) || (path[0] == '\0')) {
-	return TCL_OK;		/* If the variable pathname is the empty
-				 * string, simply return after removing any
-				 * existing variable. */
-    }
-    /* Get the variable name (without the namespace qualifier). */
-    if (!Blt_ParseObjectName(interp, path, &objName, BLT_NO_DEFAULT_NS)) {
-	return TCL_ERROR;
-    }
-    if (objName.nsPtr == NULL) {
-	/* 
-	 * If there was no namespace qualifier, try harder to see if the
-	 * variable is non-local.
-	 */
-	objName.nsPtr = Blt_GetVariableNamespace(interp, objName.name);
-    } 
-    Tcl_DStringInit(&dString);
-    vPtr->varFlags = 0;
-    if (objName.nsPtr != NULL) {	/* Global or namespace variable. */
-	newPath = Blt_MakeQualifiedName(&objName, &dString);
-	vPtr->varFlags |= (TCL_NAMESPACE_ONLY | TCL_GLOBAL_ONLY);
-    } else {			/* Local variable. */
-	newPath = (char *)objName.name;
-    }
-
-    /*
-     * To play it safe, delete the variable first.  This has the benefical
-     * side-effect of unmapping the variable from another vector that may be
-     * currently associated with it.
-     */
-    Tcl_UnsetVar2(interp, newPath, (char *)NULL, 0);
-
-    /* 
-     * Set the index "end" in the array.  This will create the variable
-     * immediately so that we can check its namespace context.
-     */
-    result = Tcl_SetVar2(interp, newPath, "end", "", TCL_LEAVE_ERR_MSG);
-    if (result == NULL) {
-	Tcl_DStringFree(&dString);
-	return TCL_ERROR;
-    }
-    /* Create a full-array trace on reads, writes, and unsets. */
-    Tcl_TraceVar2(interp, newPath, (char *)NULL, TRACE_ALL, Blt_Vec_VarTrace,
-	vPtr);
-    vPtr->arrayName = Blt_AssertStrdup(newPath);
-    Tcl_DStringFree(&dString);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_SetSize --
- *
- *	Resizes the vector to the designated new size.
- *
- *	If the new size is the same as the old, simply return.  Otherwise
- *	we're copying the data from one memory location to another.
- *
- *	If the storage changed memory locations, free up the old location if
- *	it was dynamically allocated.
- *
- * Results:
- *	A standard TCL result.  If the reallocation is successful,
- *	TCL_OK is returned, otherwise TCL_ERROR.
- *
- * Side effects:
- *	Memory for the array is reallocated.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_SetSize(
-    Tcl_Interp *interp, 
-    Vector *vPtr, 
-    int newSize)		/* Size of array in elements */
-{
-    if (newSize <= 0) {
-	newSize = DEF_ARRAY_SIZE;
-    }
-    if (newSize == vPtr->size) {
-	/* Same size, use the current array. */
-	return TCL_OK;
-    } 
-    if (vPtr->freeProc == TCL_DYNAMIC) {
-	double *newArr;
-
-	/* Old memory was dynamically allocated, so use realloc. */
-	newArr = Blt_Realloc(vPtr->valueArr, newSize * sizeof(double));
-	if (newArr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't reallocate ", 
-				 Blt_Itoa(newSize), " elements for vector \"", 
-				 vPtr->name, "\"", (char *)NULL); 
-	    }
-	    return TCL_ERROR;
-	}
-	vPtr->size = newSize;
-	vPtr->valueArr = newArr;
-	return TCL_OK;
-    }
-
-    {
-	double *newArr;
-
-	/* Old memory was created specially (static or special allocator).
-	 * Replace with dynamically allocated memory (malloc-ed). */
-
-	newArr = Blt_Calloc(newSize, sizeof(double));
-	if (newArr == NULL) {
-	    if (interp != NULL) {
-		Tcl_AppendResult(interp, "can't allocate ", 
-				 Blt_Itoa(newSize), " elements for vector \"", 
-				 vPtr->name, "\"", (char *)NULL); 
-	    }
-	    return TCL_ERROR;
-	}
-	{
-	    int used, wanted;
-	    
-	    /* Copy the contents of the old memory into the new. */
-	    used = vPtr->length;
-	    wanted = newSize;
-	    
-	    if (used > wanted) {
-		used = wanted;
-	    }
-	    /* Copy any previous data */
-	    if (used > 0) {
-		memcpy(newArr, vPtr->valueArr, used * sizeof(double));
-	    }
-	}
-	
-	assert(vPtr->valueArr != NULL);
-	
-	/* 
-	 * We're not using the old storage anymore, so free it if it's not
-	 * TCL_STATIC.  It's static because the user previously reset the
-	 * vector with a statically allocated array (setting freeProc to
-	 * TCL_STATIC).
-	 */
-	if (vPtr->freeProc != TCL_STATIC) {
-	    if (vPtr->freeProc == TCL_DYNAMIC) {
-		Blt_Free(vPtr->valueArr);
-	    } else {
-		(*vPtr->freeProc) ((char *)vPtr->valueArr);
-	    }
-	}
-	vPtr->freeProc = TCL_DYNAMIC; /* Set the type of the new storage */
-	vPtr->valueArr = newArr;
-	vPtr->size = newSize;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_SetSize --
- *
- *	Set the length (the number of elements currently in use) of the
- *	vector.  If the new length is greater than the size (total number of
- *	slots), then the vector is grown.
- *
- * Results:
- *	A standard TCL result.  If the reallocation is successful, TCL_OK is
- *	returned, otherwise TCL_ERROR.
- *
- * Side effects:
- *	Memory for the array is possibly reallocated.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_SetLength(
-    Tcl_Interp *interp, 
-    Vector *vPtr, 
-    int newLength)		/* Size of array in elements */
-{
-    if (vPtr->size < newLength) {
-	if (Blt_Vec_SetSize(interp, vPtr, newLength) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    vPtr->length = newLength;
-    vPtr->first = 0;
-    vPtr->last = newLength - 1;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_ChangeLength --
- *
- *	Resizes the vector to the new size.
- *
- *	The new size of the vector is computed by doubling the size of the
- *	vector until it fits the number of slots needed (designated by
- *	*length*).
- *
- *	If the new size is the same as the old, simply adjust the length of
- *	the vector.  Otherwise we're copying the data from one memory location
- *	to another. The trailing elements of the vector need to be reset to
- *	zero.
- *
- *	If the storage changed memory locations, free up the old location if
- *	it was dynamically allocated.
- *
- * Results:
- *	A standard TCL result.  If the reallocation is successful,
- *	TCL_OK is returned, otherwise TCL_ERROR.
- *
- * Side effects:
- *	Memory for the array is reallocated.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_Vec_ChangeLength(
-    Tcl_Interp *interp, 
-    Vector *vPtr, 
-    int newLength)
-{
-    if (newLength < 0) {
-	newLength = 0;
-    } 
-    if (newLength > vPtr->size) {
-	int newSize;		/* Size of array in elements */
-    
-	/* Compute the new size of the array.  It's a multiple of
-	 * DEF_ARRAY_SIZE. */
-	newSize = DEF_ARRAY_SIZE;
-	while (newSize < newLength) {
-	    newSize += newSize;
-	}
-	if (newSize != vPtr->size) {
-	    if (Blt_Vec_SetSize(interp, vPtr, newSize) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	}
-    }
-    vPtr->length = newLength;
-    vPtr->first = 0;
-    vPtr->last = newLength - 1;
-    return TCL_OK;
-    
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_Reset --
- *
- *	Resets the vector data.  This is called by a client to indicate that
- *	the vector data has changed.  The vector does not need to point to
- *	different memory.  Any clients of the vector will be notified of the
- *	change.
- *
- * Results:
- *	A standard TCL result.  If the new array size is invalid, TCL_ERROR is
- *	returned.  Otherwise TCL_OK is returned and the new vector data is
- *	recorded.
- *
- * Side Effects:
- *	Any client designated callbacks will be posted.  Memory may be changed
- *	for the vector array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_Vec_Reset(
-    Vector *vPtr,
-    double *valueArr,		/* Array containing the elements of the
-				 * vector. If NULL, indicates to reset the 
-				 * vector size to the default. */
-    int length,			/* The number of elements that the vector 
-				 * currently holds. */
-    int size,			/* The maximum number of elements that the
-				 * array can hold. */
-    Tcl_FreeProc *freeProc)	/* Address of memory deallocation routine
-				 * for the array of values.  Can also be
-				 * TCL_STATIC, TCL_DYNAMIC, or TCL_VOLATILE. */
-{
-    if (vPtr->valueArr != valueArr) {	/* New array of values resides
-					 * in different memory than
-					 * the current vector.  */
-	if ((valueArr == NULL) || (size == 0)) {
-	    /* Empty array. Set up default values */
-	    valueArr = Blt_Malloc(sizeof(double) * DEF_ARRAY_SIZE);
-	    size = DEF_ARRAY_SIZE;
-	    if (valueArr == NULL) {
-		Tcl_AppendResult(vPtr->interp, "can't allocate ", 
-			Blt_Itoa(size), " elements for vector \"", 
-			vPtr->name, "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    freeProc = TCL_DYNAMIC;
-	    length = 0;
-	} else if (freeProc == TCL_VOLATILE) {
-	    double *newArr;
-	    /* Data is volatile. Make a copy of the value array.  */
-	    newArr = Blt_Malloc(size * sizeof(double));
-	    if (newArr == NULL) {
-		Tcl_AppendResult(vPtr->interp, "can't allocate ", 
-			Blt_Itoa(size), " elements for vector \"", 
-			vPtr->name, "\"", (char *)NULL);
-		return TCL_ERROR;
-	    }
-	    memcpy((char *)newArr, (char *)valueArr, 
-		   sizeof(double) * length);
-	    valueArr = newArr;
-	    freeProc = TCL_DYNAMIC;
-	} 
-
-	if (vPtr->freeProc != TCL_STATIC) {
-	    /* Old data was dynamically allocated. Free it before attaching
-	     * new data.  */
-	    if (vPtr->freeProc == TCL_DYNAMIC) {
-		Blt_Free(vPtr->valueArr);
-	    } else {
-		(*freeProc) ((char *)vPtr->valueArr);
-	    }
-	}
-	vPtr->freeProc = freeProc;
-	vPtr->valueArr = valueArr;
-	vPtr->size = size;
-    }
-
-    vPtr->length = length;
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-Vector *
-Blt_Vec_New(VectorInterpData *dataPtr) /* Interpreter-specific data. */
-{
-    Vector *vPtr;
-
-    vPtr = Blt_AssertCalloc(1, sizeof(Vector));
-    vPtr->valueArr = Blt_Malloc(sizeof(double) * DEF_ARRAY_SIZE);
-    if (vPtr->valueArr == NULL) {
-	Blt_Free(vPtr);
-	return NULL;
-    }
-    vPtr->size = DEF_ARRAY_SIZE;
-    vPtr->freeProc = TCL_DYNAMIC;
-    vPtr->length = 0;
-    vPtr->interp = dataPtr->interp;
-    vPtr->hashPtr = NULL;
-    vPtr->chain = Blt_Chain_Create();
-    vPtr->flush = FALSE;
-    vPtr->min = vPtr->max = Blt_NaN();
-    vPtr->notifyFlags = NOTIFY_WHENIDLE;
-    vPtr->dataPtr = dataPtr;
-    return vPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_Free --
- *
- *	Removes the memory and frees resources associated with the vector.
- *
- *	o Removes the trace and the TCL array variable and unsets
- *	  the variable.
- *	o Notifies clients of the vector that the vector is being
- *	  destroyed.
- *	o Removes any clients that are left after notification.
- *	o Frees the memory (if necessary) allocated for the array.
- *	o Removes the entry from the hash table of vectors.
- *	o Frees the memory allocated for the name.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_Vec_Free(Vector *vPtr)
-{
-    Blt_ChainLink link;
-
-    if (vPtr->cmdToken != 0) {
-	DeleteCommand(vPtr);
-    }
-    if (vPtr->arrayName != NULL) {
-	UnmapVariable(vPtr);
-    }
-    vPtr->length = 0;
-
-    /* Immediately notify clients that vector is going away */
-    if (vPtr->notifyFlags & NOTIFY_PENDING) {
-	vPtr->notifyFlags &= ~NOTIFY_PENDING;
-	Tcl_CancelIdleCall(Blt_Vec_NotifyClients, vPtr);
-    }
-    vPtr->notifyFlags |= NOTIFY_DESTROYED;
-    Blt_Vec_NotifyClients(vPtr);
-
-    for (link = Blt_Chain_FirstLink(vPtr->chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	VectorClient *clientPtr;
-
-	clientPtr = Blt_Chain_GetValue(link);
-	Blt_Free(clientPtr);
-    }
-    Blt_Chain_Destroy(vPtr->chain);
-    if ((vPtr->valueArr != NULL) && (vPtr->freeProc != TCL_STATIC)) {
-	if (vPtr->freeProc == TCL_DYNAMIC) {
-	    Blt_Free(vPtr->valueArr);
-	} else {
-	    (*vPtr->freeProc) ((char *)vPtr->valueArr);
-	}
-    }
-    if (vPtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(&vPtr->dataPtr->vectorTable, vPtr->hashPtr);
-    }
-#ifdef NAMESPACE_DELETE_NOTIFY
-    if (vPtr->nsPtr != NULL) {
-	Blt_DestroyNsDeleteNotify(vPtr->interp, vPtr->nsPtr, vPtr);
-    }
-#endif /* NAMESPACE_DELETE_NOTIFY */
-    Blt_Free(vPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorInstDeleteProc --
- *
- *	Deletes the command associated with the vector.  This is called only
- *	when the command associated with the vector is destroyed.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static void
-VectorInstDeleteProc(ClientData clientData)
-{
-    Vector *vPtr = clientData;
-
-    vPtr->cmdToken = 0;
-    Blt_Vec_Free(vPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Vec_Create --
- *
- *	Creates a vector structure and the following items:
- *
- *	o TCL command
- *	o TCL array variable and establishes traces on the variable
- *	o Adds a  new entry in the vector hash table
- *
- * Results:
- *	A pointer to the new vector structure.  If an error occurred NULL is
- *	returned and an error message is left in interp->result.
- *
- * Side effects:
- *	A new TCL command and array variable is added to the interpreter.
- *
- * ---------------------------------------------------------------------- 
- */
-Vector *
-Blt_Vec_Create(
-    VectorInterpData *dataPtr,	/* Interpreter-specific data. */
-    const char *vecName,	/* Namespace-qualified name of the vector */
-    const char *cmdName,	/* Name of the TCL command mapped to
-				 * the vector */
-    const char *varName,	/* Name of the TCL array mapped to the
-				 * vector */
-    int *isNewPtr)
-{
-    Tcl_DString dString;
-    Vector *vPtr;
-    int isNew;
-    Blt_ObjectName objName;
-    char *qualName;
-    Blt_HashEntry *hPtr;
-    Tcl_Interp *interp = dataPtr->interp;
-
-    isNew = 0;
-    vPtr = NULL;
-
-    if (!Blt_ParseObjectName(interp, vecName, &objName, 0)) {
-	return NULL;
-    }
-    Tcl_DStringInit(&dString);
-    if ((objName.name[0] == '#') && (strcmp(objName.name, "#auto") == 0)) {
-
-	do {	/* Generate a unique vector name. */
-	    char string[200];
-
-	    sprintf_s(string, 200, "vector%d", dataPtr->nextId++);
-	    objName.name = string;
-	    qualName = Blt_MakeQualifiedName(&objName, &dString);
-	    hPtr = Blt_FindHashEntry(&dataPtr->vectorTable, qualName);
-	} while (hPtr != NULL);
-    } else {
-	const char *p;
-
-	for (p = objName.name; *p != '\0'; p++) {
-	    if (!VECTOR_CHAR(*p)) {
-		Tcl_AppendResult(interp, "bad vector name \"", objName.name,
-		    "\": must contain digits, letters, underscore, or period",
-		    (char *)NULL);
-		goto error;
-	    }
-	}
-	qualName = Blt_MakeQualifiedName(&objName, &dString);
-	vPtr = Blt_Vec_ParseElement((Tcl_Interp *)NULL, dataPtr, qualName, 
-		NULL, NS_SEARCH_CURRENT);
-    }
-    if (vPtr == NULL) {
-	hPtr = Blt_CreateHashEntry(&dataPtr->vectorTable, qualName, &isNew);
-	vPtr = Blt_Vec_New(dataPtr);
-	vPtr->hashPtr = hPtr;
-	vPtr->nsPtr = objName.nsPtr;
-
-	vPtr->name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr);
-#ifdef NAMESPACE_DELETE_NOTIFY
-	Blt_CreateNsDeleteNotify(interp, objName.nsPtr, vPtr, 
-		VectorInstDeleteProc);
-#endif /* NAMESPACE_DELETE_NOTIFY */
-	Blt_SetHashValue(hPtr, vPtr);
-    }
-    if (cmdName != NULL) {
-	Tcl_CmdInfo cmdInfo;
-
-	if ((cmdName == vecName) ||
-	    ((cmdName[0] == '#') && (strcmp(cmdName, "#auto")==0))) {
-	    cmdName = qualName;
-	} 
-	if (Tcl_GetCommandInfo(interp, (char *)cmdName, &cmdInfo)) {
-	    if (vPtr != cmdInfo.objClientData) {
-		Tcl_AppendResult(interp, "command \"", cmdName,
-			 "\" already exists", (char *)NULL);
-		goto error;
-	    }
-	    /* We get here only if the old name is the same as the new. */
-	    goto checkVariable;
-	}
-    }
-    if (vPtr->cmdToken != 0) {
-	DeleteCommand(vPtr);	/* Command already exists, delete old first */
-    }
-    if (cmdName != NULL) {
-	Tcl_DString dString2;
-	
-	Tcl_DStringInit(&dString2);
-	if (cmdName != qualName) {
-	    if (!Blt_ParseObjectName(interp, cmdName, &objName, 0)) {
-		goto error;
-	    }
-	    cmdName = Blt_MakeQualifiedName(&objName, &dString2);
-	}
-	vPtr->cmdToken = Tcl_CreateObjCommand(interp, (char *)cmdName, 
-		Blt_Vec_InstCmd, vPtr, VectorInstDeleteProc);
-	Tcl_DStringFree(&dString2);
-    }
-  checkVariable:
-    if (varName != NULL) {
-	if ((varName[0] == '#') && (strcmp(varName, "#auto") == 0)) {
-	    varName = qualName;
-	}
-	if (Blt_Vec_MapVariable(interp, vPtr, varName) != TCL_OK) {
-	    goto error;
-	}
-    }
-
-    Tcl_DStringFree(&dString);
-    *isNewPtr = isNew;
-    return vPtr;
-
-  error:
-    Tcl_DStringFree(&dString);
-    if (vPtr != NULL) {
-	Blt_Vec_Free(vPtr);
-    }
-    return NULL;
-}
-
-
-int
-Blt_Vec_Duplicate(Vector *destPtr, Vector *srcPtr)
-{
-    size_t nBytes;
-    size_t length;
-
-    if (destPtr == srcPtr) {
-	/* Copying the same vector. */
-    }
-    length = srcPtr->last - srcPtr->first + 1;
-    if (Blt_Vec_ChangeLength(destPtr->interp, destPtr, length) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    nBytes = length * sizeof(double);
-    memcpy(destPtr->valueArr, srcPtr->valueArr + srcPtr->first, nBytes);
-    destPtr->offset = srcPtr->offset;
-    return TCL_OK;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorNamesOp --
- *
- *	Reports the names of all the current vectors in the interpreter.
- *
- * Results:
- *	A standard TCL result.  interp->result will contain a list of
- *	all the names of the vector instances.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-VectorNamesOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    VectorInterpData *dataPtr = clientData;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    if (objc == 2) {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    char *name;
-
-	    name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-		Tcl_NewStringObj(name, -1));
-	}
-    } else {
-	Blt_HashEntry *hPtr;
-	Blt_HashSearch cursor;
-
-	for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor);
-	     hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	    char *name;
-	    int i;
-
-	    name = Blt_GetHashKey(&dataPtr->vectorTable, hPtr);
-	    for (i = 2; i < objc; i++) {
-		char *pattern;
-
-		pattern = Tcl_GetString(objv[i]);
-		if (Tcl_StringMatch(name, pattern)) {
-		    Tcl_ListObjAppendElement(interp, listObjPtr, 
-				Tcl_NewStringObj(name, -1));
-		    break;
-		}
-	    }
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorCreateOp --
- *
- *	Creates a TCL command, and array variable representing an instance of
- *	a vector.
- *
- *	vector a
- *	vector b(20)
- *	vector c(-5:14)
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static int
-VectorCreate2(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int argStart,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    VectorInterpData *dataPtr = clientData;
-    Vector *vPtr;
-    int count, i;
-    CreateSwitches switches;
-
-    /*
-     * Handle switches to the vector command and collect the vector name
-     * arguments into an array.
-     */
-    count = 0;
-    vPtr = NULL;
-    for (i = argStart; i < objc; i++) {
-	char *string;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '-') {
-	    break;
-	}
-    }
-    count = i - argStart;
-    if (count == 0) {
-	Tcl_AppendResult(interp, "no vector names supplied", (char *)NULL);
-	return TCL_ERROR;
-    }
-    memset(&switches, 0, sizeof(switches));
-    if (Blt_ParseSwitches(interp, createSwitches, objc - i, objv + i, 
-	&switches, BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    if (count > 1) {
-	if (switches.cmdName != NULL) {
-	    Tcl_AppendResult(interp, 
-		"can't specify more than one vector with \"-command\" switch",
-		(char *)NULL);
-	    goto error;
-	}
-	if (switches.varName != NULL) {
-	    Tcl_AppendResult(interp,
-		"can't specify more than one vector with \"-variable\" switch",
-		(char *)NULL);
-	    goto error;
-	}
-    }
-    for (i = 0; i < count; i++) {
-	char *leftParen, *rightParen;
-	char *string;
-	int isNew;
-	int size, first, last;
-
-	size = first = last = 0;
-	string = Tcl_GetString(objv[i + argStart]);
-	leftParen = strchr(string, '(');
-	rightParen = strchr(string, ')');
-	if (((leftParen != NULL) && (rightParen == NULL)) ||
-	    ((leftParen == NULL) && (rightParen != NULL)) ||
-	    (leftParen > rightParen)) {
-	    Tcl_AppendResult(interp, "bad vector specification \"", string,
-		"\"", (char *)NULL);
-	    goto error;
-	}
-	if (leftParen != NULL) {
-	    int result;
-	    char *colon;
-
-	    *rightParen = '\0';
-	    colon = strchr(leftParen + 1, ':');
-	    if (colon != NULL) {
-
-		/* Specification is in the form vecName(first:last) */
-		*colon = '\0';
-		result = Tcl_GetInt(interp, leftParen + 1, &first);
-		if ((*(colon + 1) != '\0') && (result == TCL_OK)) {
-		    result = Tcl_GetInt(interp, colon + 1, &last);
-		    if (first > last) {
-			Tcl_AppendResult(interp, "bad vector range \"",
-			    string, "\"", (char *)NULL);
-			result = TCL_ERROR;
-		    }
-		    size = (last - first) + 1;
-		}
-		*colon = ':';
-	    } else {
-		/* Specification is in the form vecName(size) */
-		result = Tcl_GetInt(interp, leftParen + 1, &size);
-	    }
-	    *rightParen = ')';
-	    if (result != TCL_OK) {
-		goto error;
-	    }
-	    if (size < 0) {
-		Tcl_AppendResult(interp, "bad vector size \"", string, "\"",
-		    (char *)NULL);
-		goto error;
-	    }
-	}
-	if (leftParen != NULL) {
-	    *leftParen = '\0';
-	}
-	/*
-	 * By default, we create a TCL command by the name of the vector.
-	 */
-	vPtr = Blt_Vec_Create(dataPtr, string,
-	    (switches.cmdName == NULL) ? string : switches.cmdName,
-	    (switches.varName == NULL) ? string : switches.varName, &isNew);
-	if (leftParen != NULL) {
-	    *leftParen = '(';
-	}
-	if (vPtr == NULL) {
-	    goto error;
-	}
-	vPtr->freeOnUnset = switches.watchUnset;
-	vPtr->flush = switches.flush;
-	vPtr->offset = first;
-	if (size > 0) {
-	    if (Blt_Vec_ChangeLength(interp, vPtr, size) != TCL_OK) {
-		goto error;
-	    }
-	}
-	if (!isNew) {
-	    if (vPtr->flush) {
-		Blt_Vec_FlushCache(vPtr);
-	    }
-	    Blt_Vec_UpdateClients(vPtr);
-	}
-    }
-    Blt_FreeSwitches(createSwitches, (char *)&switches, 0);
-    if (vPtr != NULL) {
-	/* Return the name of the last vector created  */
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), vPtr->name, -1);
-    }
-    return TCL_OK;
-  error:
-    Blt_FreeSwitches(createSwitches, (char *)&switches, 0);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorCreateOp --
- *
- *	Creates a TCL command, and array variable representing an instance of
- *	a vector.
- *
- *	vector a
- *	vector b(20)
- *	vector c(-5:14)
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-VectorCreateOp(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    return VectorCreate2(clientData, interp, 2, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorDestroyOp --
- *
- *	Destroys the vector and its related TCL command and array variable (if
- *	they exist).
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	Deletes the vector.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-VectorDestroyOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,		/* Not used. */
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    VectorInterpData *dataPtr = clientData;
-    Vector *vPtr;
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	if (Blt_Vec_LookupName(dataPtr, Tcl_GetString(objv[i]), &vPtr) 
-		!= TCL_OK) {
-	    return TCL_ERROR;
-	}
-	Blt_Vec_Free(vPtr);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorExprOp --
- *
- *	Computes the result of the expression which may be either a scalar
- *	(single value) or vector (list of values).
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-VectorExprOp(
-    ClientData clientData,	/* Not Used. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    return Blt_ExprVector(interp, Tcl_GetString(objv[2]), (Blt_Vector *)NULL);
-}
-
-static Blt_OpSpec vectorCmdOps[] =
-{
-    {"create", 1, VectorCreateOp, 3, 0,
-	"vecName ?vecName...? ?switches...?",},
-    {"destroy", 1, VectorDestroyOp, 3, 0,
-	"vecName ?vecName...?",},
-    {"expr", 1, VectorExprOp, 3, 3, "expression",},
-    {"names", 1, VectorNamesOp, 2, 3, "?pattern?...",},
-};
-
-static int nCmdOps = sizeof(vectorCmdOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-VectorCmd(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    VectorCmdProc *proc;
-    /*
-     * Try to replicate the old vector command's behavior:
-     */
-    if (objc > 1) {
-	char *string;
-	char c;
-	int i;
-	Blt_OpSpec *specPtr;
-
-	string = Tcl_GetString(objv[1]);
-	c = string[0];
-	for (specPtr = vectorCmdOps, i = 0; i < nCmdOps; i++, specPtr++) {
-	    if ((c == specPtr->name[0]) &&
-		(strcmp(string, specPtr->name) == 0)) {
-		goto doOp;
-	    }
-	}
-	/*
-	 * The first argument is not an operation, so assume that its
-	 * actually the name of a vector to be created
-	 */
-	return VectorCreate2(clientData, interp, 1, objc, objv);
-    }
-  doOp:
-    /* Do the usual vector operation lookup now. */
-    proc = Blt_GetOpFromObj(interp, nCmdOps, vectorCmdOps, BLT_OP_ARG1, 
-	objc, objv,0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    return (*proc) (clientData, interp, objc, objv);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * VectorInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "vector" command
- *	is deleted.  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Destroys the math and index hash tables.  In addition removes
- *	the hash table managing all vector names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-VectorInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    VectorInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->vectorTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Vector *vPtr;
-
-	vPtr = Blt_GetHashValue(hPtr);
-	vPtr->hashPtr = NULL;
-	Blt_Vec_Free(vPtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->vectorTable);
-
-    /* If any user-defined math functions were installed, remove them.  */
-    Blt_Vec_UninstallMathFunctions(&dataPtr->mathProcTable);
-    Blt_DeleteHashTable(&dataPtr->mathProcTable);
-
-    Blt_DeleteHashTable(&dataPtr->indexProcTable);
-    Tcl_DeleteAssocData(interp, VECTOR_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-VectorInterpData *
-Blt_Vec_GetInterpData(Tcl_Interp *interp)
-{
-    VectorInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (VectorInterpData *)
-	Tcl_GetAssocData(interp, VECTOR_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(VectorInterpData));
-	dataPtr->interp = interp;
-	dataPtr->nextId = 0;
-	Tcl_SetAssocData(interp, VECTOR_THREAD_KEY, VectorInterpDeleteProc,
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->vectorTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&dataPtr->mathProcTable, BLT_STRING_KEYS);
-	Blt_InitHashTable(&dataPtr->indexProcTable, BLT_STRING_KEYS);
-	Blt_Vec_InstallMathFunctions(&dataPtr->mathProcTable);
-	Blt_Vec_InstallSpecialIndices(&dataPtr->indexProcTable);
-#ifdef HAVE_SRAND48
-	srand48(time((time_t *) NULL));
-#endif
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_VectorCmdInitProc --
- *
- *	This procedure is invoked to initialize the "vector" command.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new command and adds a new entry into a global Tcl
- *	associative array.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_VectorCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"vector", VectorCmd, };
-    
-    cmdSpec.clientData = Blt_Vec_GetInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-
-
-/* C Application interface to vectors */
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreateVector --
- *
- *	Creates a new vector by the name and size.
- *
- * Results:
- *	A standard TCL result.  If the new array size is invalid or a vector
- *	already exists by that name, TCL_ERROR is returned.  Otherwise TCL_OK
- *	is returned and the new vector is created.
- *
- * Side Effects:
- *	Memory will be allocated for the new vector.  A new TCL command and
- *	Tcl array variable will be created.
- *
- *---------------------------------------------------------------------------
- */
-
-/*LINTLIBRARY*/
-int
-Blt_CreateVector2(
-    Tcl_Interp *interp,
-    const char *vecName, const char *cmdName, const char *varName,
-    int initialSize,
-    Blt_Vector **vecPtrPtr)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr;
-    int isNew;
-    char *nameCopy;
-
-    if (initialSize < 0) {
-	Tcl_AppendResult(interp, "bad vector size \"", Blt_Itoa(initialSize),
-	    "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    dataPtr = Blt_Vec_GetInterpData(interp);
-
-    nameCopy = Blt_AssertStrdup(vecName);
-    vPtr = Blt_Vec_Create(dataPtr, nameCopy, cmdName, varName, &isNew);
-    Blt_Free(nameCopy);
-
-    if (vPtr == NULL) {
-	return TCL_ERROR;
-    }
-    if (initialSize > 0) {
-	if (Blt_Vec_ChangeLength(interp, vPtr, initialSize) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (vecPtrPtr != NULL) {
-	*vecPtrPtr = (Blt_Vector *) vPtr;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_CreateVector(
-    Tcl_Interp *interp,
-    const char *name,
-    int size,
-    Blt_Vector **vecPtrPtr)
-{
-    return Blt_CreateVector2(interp, name, name, name, size, vecPtrPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DeleteVector --
- *
- *	Deletes the vector of the given name.  All clients with designated
- *	callback routines will be notified.
- *
- * Results:
- *	A standard TCL result.  If no vector exists by that name, TCL_ERROR is
- *	returned.  Otherwise TCL_OK is returned and vector is deleted.
- *
- * Side Effects:
- *	Memory will be released for the new vector.  Both the TCL command and
- *	array variable will be deleted.  All clients which set call back
- *	procedures will be notified.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-int
-Blt_DeleteVector(Blt_Vector *vecPtr)
-{
-    Vector *vPtr = (Vector *)vecPtr;
-
-    Blt_Vec_Free(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DeleteVectorByName --
- *
- *	Deletes the vector of the given name.  All clients with designated
- *	callback routines will be notified.
- *
- * Results:
- *	A standard TCL result.  If no vector exists by that name, TCL_ERROR is
- *	returned.  Otherwise TCL_OK is returned and vector is deleted.
- *
- * Side Effects:
- *	Memory will be released for the new vector.  Both the TCL command and
- *	array variable will be deleted.  All clients which set call back
- *	procedures will be notified.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-int
-Blt_DeleteVectorByName(Tcl_Interp *interp, const char *name)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr;
-    char *nameCopy;
-    int result;
-
-    /*
-     * If the vector name was passed via a read-only string (e.g. "x"), the
-     * Blt_Vec_ParseElement routine will segfault when it tries to write into
-     * the string.  Therefore make a writable copy and free it when we're
-     * done.
-     */
-    nameCopy = Blt_AssertStrdup(name);
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    result = Blt_Vec_LookupName(dataPtr, nameCopy, &vPtr);
-    Blt_Free(nameCopy);
-
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_Vec_Free(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_VectorExists2 --
- *
- *	Returns whether the vector associated with the client token still
- *	exists.
- *
- * Results:
- *	Returns 1 is the vector still exists, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_VectorExists2(Tcl_Interp *interp, const char *vecName)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    if (GetVectorObject(dataPtr, vecName, NS_SEARCH_BOTH) != NULL) {
-	return TRUE;
-    }
-    return FALSE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_VectorExists --
- *
- *	Returns whether the vector associated with the client token
- *	still exists.
- *
- * Results:
- *	Returns 1 is the vector still exists, 0 otherwise.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_VectorExists(Tcl_Interp *interp, const char *vecName)
-{
-    char *nameCopy;
-    int result;
-
-    /*
-     * If the vector name was passed via a read-only string (e.g. "x"), the
-     * Blt_VectorParseName routine will segfault when it tries to write into
-     * the string.  Therefore make a writable copy and free it when we're
-     * done.
-     */
-    nameCopy = Blt_AssertStrdup(vecName);
-    result = Blt_VectorExists2(interp, nameCopy);
-    Blt_Free(nameCopy);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetVector --
- *
- *	Returns a pointer to the vector associated with the given name.
- *
- * Results:
- *	A standard TCL result.  If there is no vector "name", TCL_ERROR is
- *	returned.  Otherwise TCL_OK is returned and vecPtrPtr will point to
- *	the vector.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetVector(Tcl_Interp *interp, const char *name, Blt_Vector **vecPtrPtr)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr;
-    char *nameCopy;
-    int result;
-
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    /*
-     * If the vector name was passed via a read-only string (e.g. "x"), the
-     * Blt_VectorParseName routine will segfault when it tries to write into
-     * the string.  Therefore make a writable copy and free it when we're
-     * done.
-     */
-    nameCopy = Blt_AssertStrdup(name);
-    result = Blt_Vec_LookupName(dataPtr, nameCopy, &vPtr);
-    Blt_Free(nameCopy);
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_Vec_UpdateRange(vPtr);
-    *vecPtrPtr = (Blt_Vector *) vPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetVectorFromObj --
- *
- *	Returns a pointer to the vector associated with the given name.
- *
- * Results:
- *	A standard TCL result.  If there is no vector "name", TCL_ERROR
- *	is returned.  Otherwise TCL_OK is returned and vecPtrPtr will
- *	point to the vector.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetVectorFromObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    Blt_Vector **vecPtrPtr)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr;
-
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    if (Blt_Vec_LookupName(dataPtr, Tcl_GetString(objPtr), &vPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Blt_Vec_UpdateRange(vPtr);
-    *vecPtrPtr = (Blt_Vector *) vPtr;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResetVector --
- *
- *	Resets the vector data.  This is called by a client to indicate that
- *	the vector data has changed.  The vector does not need to point to
- *	different memory.  Any clients of the vector will be notified of the
- *	change.
- *
- * Results:
- *	A standard TCL result.  If the new array size is invalid,
- *	TCL_ERROR is returned.  Otherwise TCL_OK is returned and the
- *	new vector data is recorded.
- *
- * Side Effects:
- *	Any client designated callbacks will be posted.  Memory may
- *	be changed for the vector array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ResetVector(
-    Blt_Vector *vecPtr,
-    double *valueArr,		/* Array containing the elements of the
-				 * vector. If NULL, indicates to reset the 
-				 * vector.*/
-    int length,			/* The number of elements that the vector 
-				 * currently holds. */
-    int size,			/* The maximum number of elements that the
-				 * array can hold. */
-    Tcl_FreeProc *freeProc)	/* Address of memory deallocation routine
-				 * for the array of values.  Can also be
-				 * TCL_STATIC, TCL_DYNAMIC, or TCL_VOLATILE. */
-{
-    Vector *vPtr = (Vector *)vecPtr;
-
-    if (size < 0) {
-	Tcl_AppendResult(vPtr->interp, "bad array size", (char *)NULL);
-	return TCL_ERROR;
-    }
-    return Blt_Vec_Reset(vPtr, valueArr, length, size, freeProc);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ResizeVector --
- *
- *	Changes the size of the vector.  All clients with designated callback
- *	routines will be notified of the size change.
- *
- * Results:
- *	A standard TCL result.  If no vector exists by that name, TCL_ERROR is
- *	returned.  Otherwise TCL_OK is returned and vector is resized.
- *
- * Side Effects:
- *	Memory may be reallocated for the new vector size.  All clients which
- *	set call back procedures will be notified.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_ResizeVector(Blt_Vector *vecPtr, int length)
-{
-    Vector *vPtr = (Vector *)vecPtr;
-
-    if (Blt_Vec_ChangeLength((Tcl_Interp *)NULL, vPtr, length) != TCL_OK) {
-	Tcl_AppendResult(vPtr->interp, "can't resize vector \"", vPtr->name,
-	    "\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (vPtr->flush) {
-	Blt_Vec_FlushCache(vPtr);
-    }
-    Blt_Vec_UpdateClients(vPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_AllocVectorId --
- *
- *	Creates an identifier token for an existing vector.  The identifier is
- *	used by the client routines to get call backs when (and if) the vector
- *	changes.
- *
- * Results:
- *	A standard TCL result.  If "vecName" is not associated with a vector,
- *	TCL_ERROR is returned and interp->result is filled with an error
- *	message.
- *
- *---------------------------------------------------------------------------
- */
-Blt_VectorId
-Blt_AllocVectorId(Tcl_Interp *interp, const char *name)
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Vector *vPtr;
-    VectorClient *clientPtr;
-    Blt_VectorId clientId;
-    int result;
-    char *nameCopy;
-
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    /*
-     * If the vector name was passed via a read-only string (e.g. "x"), the
-     * Blt_VectorParseName routine will segfault when it tries to write into
-     * the string.  Therefore make a writable copy and free it when we're
-     * done.
-     */
-    nameCopy = Blt_AssertStrdup(name);
-    result = Blt_Vec_LookupName(dataPtr, nameCopy, &vPtr);
-    Blt_Free(nameCopy);
-
-    if (result != TCL_OK) {
-	return (Blt_VectorId) 0;
-    }
-    /* Allocate a new client structure */
-    clientPtr = Blt_AssertCalloc(1, sizeof(VectorClient));
-    clientPtr->magic = VECTOR_MAGIC;
-
-    /* Add the new client to the server's list of clients */
-    clientPtr->link = Blt_Chain_Append(vPtr->chain, clientPtr);
-    clientPtr->serverPtr = vPtr;
-    clientId = (Blt_VectorId) clientPtr;
-    return clientId;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_SetVectorChangedProc --
- *
- *	Sets the routine to be called back when the vector is changed or
- *	deleted.  *clientData* will be provided as an argument. If *proc* is
- *	NULL, no callback will be made.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The designated routine will be called when the vector is changed
- *	or deleted.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_SetVectorChangedProc(
-    Blt_VectorId clientId,	/* Client token identifying the vector */
-    Blt_VectorChangedProc *proc,/* Address of routine to call when the contents
-				 * of the vector change. If NULL, no routine
-				 * will be called */
-    ClientData clientData)	/* One word of information to pass along when
-				 * the above routine is called */
-{
-    VectorClient *clientPtr = (VectorClient *)clientId;
-
-    if (clientPtr->magic != VECTOR_MAGIC) {
-	return;			/* Not a valid token */
-    }
-    clientPtr->clientData = clientData;
-    clientPtr->proc = proc;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreeVectorId --
- *
- *	Releases the token for an existing vector.  This indicates that the
- *	client is no longer interested the vector.  Any previously specified
- *	callback routine will no longer be invoked when (and if) the vector
- *	changes.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Any previously specified callback routine will no longer be
- *	invoked when (and if) the vector changes.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreeVectorId(Blt_VectorId clientId)
-{
-    VectorClient *clientPtr = (VectorClient *)clientId;
-
-    if (clientPtr->magic != VECTOR_MAGIC) {
-	return;			/* Not a valid token */
-    }
-    if (clientPtr->serverPtr != NULL) {
-	/* Remove the client from the server's list */
-	Blt_Chain_DeleteLink(clientPtr->serverPtr->chain, clientPtr->link);
-    }
-    Blt_Free(clientPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_NameOfVectorId --
- *
- *	Returns the name of the vector (and array variable).
- *
- * Results:
- *	The name of the array variable is returned.
- *
- *---------------------------------------------------------------------------
- */
-const char *
-Blt_NameOfVectorId(Blt_VectorId clientId) 
-{
-    VectorClient *clientPtr = (VectorClient *)clientId;
-
-    if ((clientPtr->magic != VECTOR_MAGIC) || (clientPtr->serverPtr == NULL)) {
-	return NULL;
-    }
-    return clientPtr->serverPtr->name;
-}
-
-const char *
-Blt_NameOfVector(Blt_Vector *vecPtr) /* Vector to query. */
-{
-    Vector *vPtr = (Vector *)vecPtr;
-    return vPtr->name;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_VectorNotifyPending --
- *
- *	Returns the name of the vector (and array variable).
- *
- * Results:
- *	The name of the array variable is returned.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_VectorNotifyPending(Blt_VectorId clientId)
-{
-    VectorClient *clientPtr = (VectorClient *)clientId;
-
-    if ((clientPtr == NULL) || (clientPtr->magic != VECTOR_MAGIC) || 
-	(clientPtr->serverPtr == NULL)) {
-	return 0;
-    }
-    return (clientPtr->serverPtr->notifyFlags & NOTIFY_PENDING);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetVectorById --
- *
- *	Returns a pointer to the vector associated with the client
- *	token.
- *
- * Results:
- *	A standard TCL result.  If the client token is not associated
- *	with a vector any longer, TCL_ERROR is returned. Otherwise,
- *	TCL_OK is returned and vecPtrPtr will point to vector.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_GetVectorById(
-    Tcl_Interp *interp,
-    Blt_VectorId clientId,	/* Client token identifying the vector */
-    Blt_Vector **vecPtrPtr)
-{
-    VectorClient *clientPtr = (VectorClient *)clientId;
-
-    if (clientPtr->magic != VECTOR_MAGIC) {
-	Tcl_AppendResult(interp, "bad vector token", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (clientPtr->serverPtr == NULL) {
-	Tcl_AppendResult(interp, "vector no longer exists", (char *)NULL);
-	return TCL_ERROR;
-    }
-    Blt_Vec_UpdateRange(clientPtr->serverPtr);
-    *vecPtrPtr = (Blt_Vector *) clientPtr->serverPtr;
-    return TCL_OK;
-}
-
-/*LINTLIBRARY*/
-void
-Blt_InstallIndexProc(Tcl_Interp *interp, const char *string, 
-		     Blt_VectorIndexProc *procPtr) 
-{
-    VectorInterpData *dataPtr;	/* Interpreter-specific data. */
-    Blt_HashEntry *hPtr;
-    int isNew;
-
-    dataPtr = Blt_Vec_GetInterpData(interp);
-    hPtr = Blt_CreateHashEntry(&dataPtr->indexProcTable, string, &isNew);
-    if (procPtr == NULL) {
-	Blt_DeleteHashEntry(&dataPtr->indexProcTable, hPtr);
-    } else {
-	Blt_SetHashValue(hPtr, procPtr);
-    }
-}
-
-/* spinellia at acm.org START */
-
-
-#define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr
-
-/* routine by Brenner
- * data is the array of complex data points, perversely
- * starting at 1
- * nn is the number of complex points, i.e. half the length of data
- * isign is 1 for forward, -1 for inverse
- */
-static void 
-four1(double *data, unsigned long nn, int isign)
-{
-    unsigned long n,mmax,m,j,istep,i;
-    double wtemp,wr,wpr,wpi,wi,theta;
-    double tempr,tempi;
-    
-    n=nn << 1;
-    j=1;
-    for (i = 1;i<n;i+=2) {
-	if (j > i) {
-	    SWAP(data[j],data[i]);
-	    SWAP(data[j+1],data[i+1]);
-	}
-	m=n >> 1;
-	while (m >= 2 && j > m) {
-	    j -= m;
-	    m >>= 1;
-	}
-	j += m;
-    }
-    mmax=2;
-    while (n > mmax) {
-	istep=mmax << 1;
-	theta=isign*(6.28318530717959/mmax);
-	wtemp=sin(0.5*theta);
-	wpr = -2.0*wtemp*wtemp;
-	wpi=sin(theta);
-	wr=1.0;
-	wi=0.0;
-	for (m=1;m<mmax;m+=2) {
-	    for (i=m;i<=n;i+=istep) {
-		j=i+mmax;
-		tempr=wr*data[j]-wi*data[j+1];
-		tempi=wr*data[j+1]+wi*data[j];
-		data[j]=data[i]-tempr;
-		data[j+1]=data[i+1]-tempi;
-		data[i] += tempr;
-		data[i+1] += tempi;
-	    }
-	    wr=(wtemp=wr)*wpr-wi*wpi+wr;
-	    wi=wi*wpr+wtemp*wpi+wi;
-	}
-	mmax=istep;
-    }
-}
-#undef SWAP
-
-static int 
-smallest_power_of_2_not_less_than(int x)
-{
-    int pow2 = 1;
-
-    while (pow2 < x){
-	pow2 <<= 1;
-    }
-    return pow2;
-}
-
-
-int
-Blt_Vec_FFT(
-    Tcl_Interp *interp,		/* Interpreter to report errors to */
-    Vector *realPtr,	/* If non-NULL, indicates to compute and
-				   store the real values in this vector.  */
-    Vector *phasesPtr,	/* If non-NULL, indicates to compute
-				 * and store the imaginary values in
-				 * this vector. */
-    Vector *freqPtr,	/* If non-NULL, indicates to compute
-				 * and store the frequency values in
-				 * this vector.  */
-    double delta,		/*  */
-    int flags,			/* Bit mask representing various
-				 * flags: FFT_NO_constANT,
-				 * FFT_SPECTRUM, and FFT_BARTLETT. */
-    Vector *srcPtr) 
-{
-    int length;
-    int pow2len;
-    double *paddedData;
-    int i;
-    double Wss = 0.0;
-    /* TENTATIVE */
-    int middle = 1;
-    int noconstant;
-
-    noconstant = (flags & FFT_NO_CONSTANT) ? 1 : 0;
-
-    /* Length of the original vector. */
-    length = srcPtr->last - srcPtr->first + 1;
-    /* new length */
-    pow2len = smallest_power_of_2_not_less_than( length );
-
-    /* We do not do in-place FFTs */
-    if (realPtr == srcPtr) {
-	Tcl_AppendResult(interp, "real vector \"", realPtr->name, 
-		 "\" can't be the same as the source", (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (phasesPtr != NULL) {
-	if (phasesPtr == srcPtr) {
-	    Tcl_AppendResult(interp, "imaginary vector \"", phasesPtr->name, 
-			"\" can't be the same as the source", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Blt_Vec_ChangeLength(interp, phasesPtr, 
-		pow2len/2-noconstant+middle) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-    if (freqPtr != NULL) {
-	if (freqPtr == srcPtr) {
-	    Tcl_AppendResult(interp, "frequency vector \"", freqPtr->name, 
-		     "\" can't be the same as the source", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	if (Blt_Vec_ChangeLength(interp, freqPtr, 
-			   pow2len/2-noconstant+middle) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-
-    /* Allocate memory zero-filled array. */
-    paddedData = Blt_Calloc(pow2len * 2, sizeof(double));
-    if (paddedData == NULL) {
-	Tcl_AppendResult(interp, "can't allocate memory for padded data",
-		 (char *)NULL);
-	return TCL_ERROR;
-    }
-    
-    /*
-     * Since we just do real transforms, only even locations will be
-     * filled with data.
-     */
-    if (flags & FFT_BARTLETT) {	/* Bartlett window 1 - ( (x - N/2) / (N/2) ) */
-	double Nhalf = pow2len*0.5;
-	double Nhalf_1 = 1.0 / Nhalf;
-	double w;
-
-	for (i = 0; i < length; i++) {
-	    w = 1.0 - fabs( (i-Nhalf) * Nhalf_1 );
-	    Wss += w;
-	    paddedData[2*i] = w * srcPtr->valueArr[i];
-	}
-	for(/*empty*/; i < pow2len; i++) {
-	    w = 1.0 - fabs((i-Nhalf) * Nhalf_1);
-	    Wss += w;
-	}
-    } else {			/* Squared window, i.e. no data windowing. */
-	for (i = 0; i < length; i++) { 
-	    paddedData[2*i] = srcPtr->valueArr[i]; 
-	}
-	Wss = pow2len;
-    }
-    
-    /* Fourier */
-    four1(paddedData-1, pow2len, 1);
-    
-    /*
-      for(i=0;i<pow2len;i++){
-      printf( "(%f %f) ", paddedData[2*i], paddedData[2*i+1] );
-      }
-    */
-    
-    /* the spectrum is the modulus of the transforms, scaled by 1/N^2 */
-    /* or 1/(N * Wss) for windowed data */
-    if (flags & FFT_SPECTRUM) {
-	double re, im, reS, imS;
-	double factor = 1.0 / (pow2len*Wss);
-	double *v = realPtr->valueArr;
-	
-	for (i = 0 + noconstant; i < pow2len / 2; i++) {
-	    re = paddedData[2*i];
-	    im = paddedData[2*i+1];
-	    reS = paddedData[2*pow2len-2*i-2];
-	    imS = paddedData[2*pow2len-2*i-1];
-	    v[i - noconstant] = factor * (
-# if 0
-			  hypot( paddedData[2*i], paddedData[2*i+1] )
-			  + hypot(
-				  paddedData[pow2len*2-2*i-2],
-				  paddedData[pow2len*2-2*i-1]
-			)
-# else
-			  sqrt( re*re + im* im ) + sqrt( reS*reS + imS*imS )
-# endif
-		   );
-	}
-    } else {
-	for(i = 0 + noconstant; i < pow2len / 2 + middle; i++) {
-	    realPtr->valueArr[i - noconstant] = paddedData[2*i];
-	}
-    }
-    if( phasesPtr != NULL ){
-        for (i = 0 + noconstant; i < pow2len / 2 + middle; i++) {
-	    phasesPtr->valueArr[i-noconstant] = paddedData[2*i+1];
-	}
-    }
-    
-    /* Compute frequencies */
-    if (freqPtr != NULL) {
-        double N = pow2len;
-	double denom = 1.0 / N / delta;
-        for( i=0+noconstant; i<pow2len/2+middle; i++ ){
-	    freqPtr->valueArr[i-noconstant] = ((double) i) * denom;
-	}
-    }
-    
-    /* Memory is necessarily dynamic, because nobody touched it ! */
-    Blt_Free(paddedData);
-    
-    realPtr->offset = 0;
-    return TCL_OK;
-}
-
-
-int
-Blt_Vec_InverseFFT(Tcl_Interp *interp, Vector *srcImagPtr, Vector *destRealPtr, 
-    Vector *destImagPtr, Vector *srcPtr)
-{
-    int length;
-    int pow2len;
-    double *paddedData;
-    int i;
-    double oneOverN;
-
-    if ((destRealPtr == srcPtr) || (destImagPtr == srcPtr )){
-/* we do not do in-place FFTs */
-	return TCL_ERROR;
-    }
-    length = srcPtr->last - srcPtr->first + 1;
-
-/* minus one because of the magical middle element! */
-    pow2len = smallest_power_of_2_not_less_than( (length-1)*2 );
-    oneOverN = 1.0 / pow2len;
-
-    if (Blt_Vec_ChangeLength(interp, destRealPtr, pow2len) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Blt_Vec_ChangeLength(interp, destImagPtr, pow2len) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    if( length != (srcImagPtr->last - srcImagPtr->first + 1) ){
-	Tcl_AppendResult(srcPtr->interp,
-		"the length of the imagPart vector must ",
-		"be the same as the real one", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    paddedData = Blt_AssertMalloc( pow2len*2*sizeof(double) );
-    if( paddedData == NULL ){
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "memory allocation failed", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    for(i=0;i<pow2len*2;i++) { paddedData[i] = 0.0; }
-    for(i=0;i<length-1;i++){
-	paddedData[2*i] = srcPtr->valueArr[i];
-	paddedData[2*i+1] = srcImagPtr->valueArr[i];
-	paddedData[pow2len*2 - 2*i - 2 ] = srcPtr->valueArr[i+1];
-	paddedData[pow2len*2 - 2*i - 1 ] = - srcImagPtr->valueArr[i+1];
-    }
-/* mythical middle element */
-    paddedData[(length-1)*2] = srcPtr->valueArr[length-1];
-    paddedData[(length-1)*2+1] = srcImagPtr->valueArr[length-1];
-
-/*
-for(i=0;i<pow2len;i++){
-	printf( "(%f %f) ", paddedData[2*i], paddedData[2*i+1] );
-}
- */
-
-/* fourier */
-    four1( paddedData-1, pow2len, -1 );
-
-/* put values in their places, normalising by 1/N */
-    for(i=0;i<pow2len;i++){
-	destRealPtr->valueArr[i] = paddedData[2*i] * oneOverN;
-	destImagPtr->valueArr[i] = paddedData[2*i+1] * oneOverN;
-    }
-
-/* memory is necessarily dynamic, because nobody touched it ! */
-    Blt_Free( paddedData );
-
-    return TCL_OK;
-}
-
-
-/* spinellia at acm.org STOP */
-
-
-
-static double
-FindSplit(Point2d *points, int i, int j, int *split)	
-{    
-    double maxDist2;
-    
-    maxDist2 = -1.0;
-    if ((i + 1) < j) {
-	int k;
-	double a, b, c;	
-
-	/* 
-	 * 
-	 *  dist2 P(k) =  |  1  P(i).x  P(i).y  |
-	 *		  |  1  P(j).x  P(j).y  |
-	 *                |  1  P(k).x  P(k).y  |
-	 *       ------------------------------------------
- 	 *       (P(i).x - P(j).x)^2 + (P(i).y - P(j).y)^2
-	 */
-
-	a = points[i].y - points[j].y;
-	b = points[j].x - points[i].x;
-	c = (points[i].x * points[j].y) - (points[i].y * points[j].x);
-	for (k = (i + 1); k < j; k++) {
-	    double dist2;
-
-	    dist2 = (points[k].x * a) + (points[k].y * b) + c;
-	    if (dist2 < 0.0) {
-		dist2 = -dist2;	
-	    }
-	    if (dist2 > maxDist2) {
-		maxDist2 = dist2;	/* Track the maximum. */
-		*split = k;
-	    }
-	}
-	/* Correction for segment length---should be redone if can == 0 */
-	maxDist2 *= maxDist2 / (a * a + b * b);
-    } 
-    return maxDist2;
-}
-
-
-/* Douglas-Peucker line simplification algorithm */
-int
-Blt_SimplifyLine(Point2d *inputPts, int low, int high, double tolerance,
-		 int *indices)
-{
-#define StackPush(a)	s++, stack[s] = (a)
-#define StackPop(a)	(a) = stack[s], s--
-#define StackEmpty()	(s < 0)
-#define StackTop()	stack[s]
-    int *stack;
-    int split = -1; 
-    double dist2, tolerance2;
-    int s = -1;			/* Points to top stack item. */
-    int count;
-
-    stack = Blt_AssertMalloc(sizeof(int) * (high - low + 1));
-    StackPush(high);
-    count = 0;
-    indices[count++] = 0;
-    tolerance2 = tolerance * tolerance;
-    while (!StackEmpty()) {
-	dist2 = FindSplit(inputPts, low, StackTop(), &split);
-	if (dist2 > tolerance2) {
-	    StackPush(split);
-	} else {
-	    indices[count++] = StackTop();
-	    StackPop(low);
-	}
-    } 
-    Blt_Free(stack);
-    return count;
-}
diff --git a/blt3.0/src/bltVector.h b/blt3.0/src/bltVector.h
deleted file mode 100644
index 78eddc5..0000000
--- a/blt3.0/src/bltVector.h
+++ /dev/null
@@ -1,137 +0,0 @@
-
-/*
- * bltVector.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_VECTOR_H
-#define _BLT_VECTOR_H
-
-typedef enum {
-    BLT_VECTOR_NOTIFY_UPDATE = 1, /* The vector's values has been updated */
-    BLT_VECTOR_NOTIFY_DESTROY	/* The vector has been destroyed and the client
-				 * should no longer use its data (calling
-				 * Blt_FreeVectorId) */
-} Blt_VectorNotify;
-
-typedef struct _Blt_VectorId *Blt_VectorId;
-
-typedef void (Blt_VectorChangedProc)(Tcl_Interp *interp, ClientData clientData,
-	Blt_VectorNotify notify);
-
-typedef struct {
-    double *valueArr;		/* Array of values (possibly malloc-ed) */
-    int numValues;		/* Number of values in the array */
-    int arraySize;		/* Size of the allocated space */
-    double min, max;		/* Minimum and maximum values in the vector */
-    int dirty;			/* Indicates if the vector has been updated */
-    int reserved;		/* Reserved for future use */
-
-} Blt_Vector;
-
-typedef double (Blt_VectorIndexProc)(Blt_Vector * vecPtr);
-
-typedef enum {
-    BLT_MATH_FUNC_SCALAR = 1,	/* The function returns a single double
-				 * precision value. */
-    BLT_MATH_FUNC_VECTOR	/* The function processes the entire vector. */
-} Blt_MathFuncType;
-
-/*
- * To be safe, use the macros below, rather than the fields of the
- * structure directly.
- *
- * The Blt_Vector is basically an opaque type.  But it's also the
- * actual memory address of the vector itself.  I wanted to make the
- * API as unobtrusive as possible.  So instead of giving you a copy of
- * the vector, providing various functions to access and update the
- * vector, you get your hands on the actual memory (array of doubles)
- * shared by all the vector's clients.
- *
- * The trade-off for speed and convenience is safety.  You can easily
- * break things by writing into the vector when other clients are
- * using it.  Use Blt_ResetVector to get around this.  At least the
- * macros are a reminder it isn't really safe to reset the data
- * fields, except by the API routines.  
- */
-#define Blt_VecData(v)		((v)->valueArr)
-#define Blt_VecLength(v)	((v)->numValues)
-#define Blt_VecSize(v)		((v)->arraySize)
-#define Blt_VecDirty(v)		((v)->dirty)
-
-BLT_EXTERN double Blt_VecMin(Blt_Vector *vPtr);
-BLT_EXTERN double Blt_VecMax(Blt_Vector *vPtr);
-
-BLT_EXTERN Blt_VectorId Blt_AllocVectorId(Tcl_Interp *interp, 
-	const char *vecName);
-
-BLT_EXTERN void Blt_SetVectorChangedProc(Blt_VectorId clientId, 
-	Blt_VectorChangedProc *proc, ClientData clientData);
-
-BLT_EXTERN void Blt_FreeVectorId(Blt_VectorId clientId);
-
-BLT_EXTERN int Blt_GetVectorById(Tcl_Interp *interp, Blt_VectorId clientId, 
-	Blt_Vector **vecPtrPtr);
-
-BLT_EXTERN const char *Blt_NameOfVectorId(Blt_VectorId clientId);
-
-BLT_EXTERN const char *Blt_NameOfVector(Blt_Vector *vecPtr);
-
-BLT_EXTERN int Blt_VectorNotifyPending(Blt_VectorId clientId);
-
-BLT_EXTERN int Blt_CreateVector(Tcl_Interp *interp, const char *vecName, 
-	int size, Blt_Vector ** vecPtrPtr);
-
-BLT_EXTERN int Blt_CreateVector2(Tcl_Interp *interp, const char *vecName, 
-	const char *cmdName, const char *varName, int initialSize, 
-	Blt_Vector **vecPtrPtr);
-
-BLT_EXTERN int Blt_GetVector(Tcl_Interp *interp, const char *vecName, 
-	Blt_Vector **vecPtrPtr);
-
-BLT_EXTERN int Blt_GetVectorFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-	Blt_Vector **vecPtrPtr);
-
-BLT_EXTERN int Blt_VectorExists(Tcl_Interp *interp, const char *vecName);
-
-BLT_EXTERN int Blt_ResetVector(Blt_Vector *vecPtr, double *dataArr, int n, 
-	int arraySize, Tcl_FreeProc *freeProc);
-
-BLT_EXTERN int Blt_ResizeVector(Blt_Vector *vecPtr, int n);
-
-BLT_EXTERN int Blt_DeleteVectorByName(Tcl_Interp *interp, const char *vecName);
-
-BLT_EXTERN int Blt_DeleteVector(Blt_Vector *vecPtr);
-
-BLT_EXTERN int Blt_ExprVector(Tcl_Interp *interp, char *expr, 
-	Blt_Vector *vecPtr);
-
-BLT_EXTERN void Blt_InstallIndexProc(Tcl_Interp *interp, const char *indexName,
-	Blt_VectorIndexProc * procPtr);
-
-BLT_EXTERN int Blt_VectorExists2(Tcl_Interp *interp, const char *vecName);
-
-#endif /* _BLT_VECTOR_H */
diff --git a/blt3.0/src/bltWait.h b/blt3.0/src/bltWait.h
deleted file mode 100644
index 6f43f21..0000000
--- a/blt3.0/src/bltWait.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * bltWait.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_WAIT_H
-#define _BLT_WAIT_H
-
-#ifdef HAVE_WAITFLAGS_H
-#   include <waitflags.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#   include <sys/wait.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>
-#endif
-
-/*
- * Define EINPROGRESS in terms of WSAEINPROGRESS.
- */
-
-#ifndef	EINPROGRESS
-#define EINPROGRESS WSAEINPROGRESS
-#endif
-
-/*
- * If ENOTSUP is not defined, define it to a value that will never occur.
- */
-
-#ifndef ENOTSUP
-#define	ENOTSUP		-1030507
-#endif
-
-/*
- * The following defines redefine the Windows Socket errors as
- * BSD errors so Tcl_PosixError can do the right thing.
- */
-
-#ifndef EWOULDBLOCK
-#define EWOULDBLOCK             EAGAIN
-#endif
-#ifndef EALREADY
-#define EALREADY	149	/* operation already in progress */
-#endif
-#ifndef ENOTSOCK
-#define ENOTSOCK	95	/* Socket operation on non-socket */
-#endif
-#ifndef EDESTADDRREQ
-#define EDESTADDRREQ	96	/* Destination address required */
-#endif
-#ifndef EMSGSIZE
-#define EMSGSIZE	97	/* Message too long */
-#endif
-#ifndef EPROTOTYPE
-#define EPROTOTYPE	98	/* Protocol wrong type for socket */
-#endif
-#ifndef ENOPROTOOPT
-#define ENOPROTOOPT	99	/* Protocol not available */
-#endif
-#ifndef EPROTONOSUPPORT
-#define EPROTONOSUPPORT	120	/* Protocol not supported */
-#endif
-#ifndef ESOCKTNOSUPPORT
-#define ESOCKTNOSUPPORT	121	/* Socket type not supported */
-#endif
-#ifndef EOPNOTSUPP
-#define EOPNOTSUPP	122	/* Operation not supported on socket */
-#endif
-#ifndef EPFNOSUPPORT
-#define EPFNOSUPPORT	123	/* Protocol family not supported */
-#endif
-#ifndef EAFNOSUPPORT
-#define EAFNOSUPPORT	124	/* Address family not supported */
-#endif
-#ifndef EADDRINUSE
-#define EADDRINUSE	125	/* Address already in use */
-#endif
-#ifndef EADDRNOTAVAIL
-#define EADDRNOTAVAIL	126	/* Can't assign requested address */
-#endif
-#ifndef ENETDOWN
-#define ENETDOWN	127	/* Network is down */
-#endif
-#ifndef ENETUNREACH
-#define ENETUNREACH	128	/* Network is unreachable */
-#endif
-#ifndef ENETRESET
-#define ENETRESET	129	/* Network dropped connection on reset */
-#endif
-#ifndef ECONNABORTED
-#define ECONNABORTED	130	/* Software caused connection abort */
-#endif
-#ifndef ECONNRESET
-#define ECONNRESET	131	/* Connection reset by peer */
-#endif
-#ifndef ENOBUFS
-#define ENOBUFS		132	/* No buffer space available */
-#endif
-#ifndef EISCONN
-#define EISCONN		133	/* Socket is already connected */
-#endif
-#ifndef ENOTCONN
-#define ENOTCONN	134	/* Socket is not connected */
-#endif
-#ifndef ESHUTDOWN
-#define ESHUTDOWN	143	/* Can't send after socket shutdown */
-#endif
-#ifndef ETOOMANYREFS
-#define ETOOMANYREFS	144	/* Too many references: can't splice */
-#endif
-#ifndef ETIMEDOUT
-#define ETIMEDOUT	145	/* Connection timed out */
-#endif
-#ifndef ECONNREFUSED
-#define ECONNREFUSED	146	/* Connection refused */
-#endif
-#ifndef ELOOP
-#define ELOOP		90	/* Symbolic link loop */
-#endif
-#ifndef EHOSTDOWN
-#define EHOSTDOWN	147	/* Host is down */
-#endif
-#ifndef EHOSTUNREACH
-#define EHOSTUNREACH	148	/* No route to host */
-#endif
-#ifndef ENOTEMPTY
-#define ENOTEMPTY 	93	/* directory not empty */
-#endif
-#ifndef EUSERS
-#define EUSERS		94	/* Too many users (for UFS) */
-#endif
-#ifndef EDQUOT
-#define EDQUOT		49	/* Disc quota exceeded */
-#endif
-#ifndef ESTALE
-#define ESTALE		151	/* Stale NFS file handle */
-#endif
-#ifndef EREMOTE
-#define EREMOTE		66	/* The object is remote */
-#endif
-
-#ifndef WIFEXITED
-#   define WIFEXITED(stat)  (((*((int *) &(stat))) & 0xff) == 0)
-#endif
-
-#ifndef WEXITSTATUS
-#   define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff)
-#endif
-
-#ifndef WIFSIGNALED
-#   define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff)))
-#endif
-
-#ifndef WTERMSIG
-#   define WTERMSIG(stat)    ((*((int *) &(stat))) & 0x7f)
-#endif
-
-#ifndef WIFSTOPPED
-#   define WIFSTOPPED(stat)  (((*((int *) &(stat))) & 0xff) == 0177)
-#endif
-
-#ifndef WSTOPSIG
-#   define WSTOPSIG(stat)    (((*((int *) &(stat))) >> 8) & 0xff)
-#endif
-
-/*
- * Define constants for waitpid() system call if they aren't defined
- * by a system header file.
- */
-
-#ifndef WNOHANG
-#   define WNOHANG 1
-#endif
-#ifndef WUNTRACED
-#   define WUNTRACED 2
-#endif
-
-/*
- * The type of the status returned by wait varies from UNIX system
- * to UNIX system.  The macro below defines it:
- */
-
-#ifdef AIX
-#   define WAIT_STATUS_TYPE pid_t
-#else
-#ifdef HAVE_UNION_WAIT
-#   define WAIT_STATUS_TYPE union wait
-#else
-#   define WAIT_STATUS_TYPE int
-#endif
-#endif
-
-/*
- * Supply definitions for macros to query wait status, if not already
- * defined in header files above.
- */
-
-#ifndef WIFEXITED
-#   define WIFEXITED(stat)  (((*((int *) &(stat))) & 0xff) == 0)
-#endif
-
-#ifndef WEXITSTATUS
-#   define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff)
-#endif
-
-#ifndef WIFSIGNALED
-#   define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff)))
-#endif
-
-#ifndef WTERMSIG
-#   define WTERMSIG(stat)    ((*((int *) &(stat))) & 0x7f)
-#endif
-
-#ifndef WIFSTOPPED
-#   define WIFSTOPPED(stat)  (((*((int *) &(stat))) & 0xff) == 0177)
-#endif
-
-#ifndef WSTOPSIG
-#   define WSTOPSIG(stat)    (((*((int *) &(stat))) >> 8) & 0xff)
-#endif
-
-#endif /* _BLT_WAIT_H */
diff --git a/blt3.0/src/bltWatch.c b/blt3.0/src/bltWatch.c
deleted file mode 100644
index 93b1b30..0000000
--- a/blt3.0/src/bltWatch.c
+++ /dev/null
@@ -1,856 +0,0 @@
-
-/*
- * bltWatch.c --
- *
- * This module implements watch procedure callbacks for TCL commands
- * and procedures.
- *
- *	Copyright 1994-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltOp.h"
-#include <bltHash.h>
-#include "bltSwitch.h"
-
-#define UNKNOWN_RETURN_CODE	5
-static const char *codeNames[] =
-{
-    "OK", "ERROR", "RETURN", "BREAK", "CONTINUE"
-};
-
-#define WATCH_THREAD_KEY "BLT Watch Command Data"
-#define WATCH_MAX_LEVEL	10000	/* Maximum depth of TCL traces. */
-
-enum WatchStates {
-    WATCH_STATE_DONT_CARE = -1,	/* Select watch regardless of state */
-    WATCH_STATE_IDLE = 0,	/*  */
-    WATCH_STATE_ACTIVE = 1
-};
-
-typedef struct {
-    Tcl_Interp *interp;		/* Interpreter associated with the watch */
-    char *name;			/* Watch identifier */
-
-    /* User-configurable fields */
-    enum WatchStates state;	/* Current state of watch: either
-				 * WATCH_STATE_IDLE or WATCH_STATE_ACTIVE */
-    int maxLevel;		/* Maximum depth of tracing allowed */
-    char **preCmd;		/* Procedure to be invoked before the
-				 * command is executed (but after
-				 * substitutions have occurred). */
-    char **postCmd;		/* Procedure to be invoked after the command
-				 * is executed. */
-    Tcl_Trace trace;		/* Trace handler which activates "pre"
-				 * command procedures */
-    Tcl_AsyncHandler asyncHandle; /* Async handler which triggers the
-				 * "post" command procedure (if one
-				 * exists) */
-    int active;			/* Indicates if a trace is currently
-				 * active.  This prevents recursive
-				 * tracing of the "pre" and "post"
-				 * procedures. */
-    int level;			/* Current level of traced command. */
-    char *cmdPtr;		/* Command string before substitutions.
-				 * Points to a original command buffer. */
-    char *args;			/* TCL list of the command after
-				 * substitutions. List is malloc-ed by
-				 * Tcl_Merge. Must be freed in handler
-				 * procs */
-} Watch;
-
-typedef struct {
-    Blt_HashTable watchTable;	/* Hash table of trees keyed by address. */
-    Tcl_Interp *interp;
-} WatchCmdInterpData;
-
-static Blt_SwitchSpec switchSpecs[] = 
-{
-    {BLT_SWITCH_LIST, "-precmd", "command",
-	Blt_Offset(Watch, preCmd), 0},
-    {BLT_SWITCH_LIST, "-postcmd", "command",
-	Blt_Offset(Watch, postCmd), 0},
-    {BLT_SWITCH_BOOLEAN, "-active", "bool",
-	Blt_Offset(Watch, state), 0},
-    {BLT_SWITCH_INT_NNEG, "-maxlevel", "number",
-	Blt_Offset(Watch, maxLevel), 0},
-    {BLT_SWITCH_END}
-};
-
-static Tcl_CmdTraceProc PreCmdProc;
-static Tcl_AsyncProc PostCmdProc;
-static Tcl_ObjCmdProc WatchCmd;
-
-/*
- *---------------------------------------------------------------------------
- *
- * TreeInterpDeleteProc --
- *
- *	This is called when the interpreter hosting the "tree" command
- *	is deleted.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Removes the hash table managing all tree names.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-WatchInterpDeleteProc(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-
-    /* All tree instances should already have been destroyed when
-     * their respective TCL commands were deleted. */
-    Blt_DeleteHashTable(&dataPtr->watchTable);
-    Tcl_DeleteAssocData(interp, WATCH_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetWatchCmdInterpData --
- *
- *---------------------------------------------------------------------------
- */
-static WatchCmdInterpData *
-GetWatchCmdInterpData(Tcl_Interp *interp)
-{
-    WatchCmdInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (WatchCmdInterpData *)
-	Tcl_GetAssocData(interp, WATCH_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(WatchCmdInterpData));
-	dataPtr->interp = interp;
-	Tcl_SetAssocData(interp, WATCH_THREAD_KEY, WatchInterpDeleteProc,
-		 dataPtr);
-	Blt_InitHashTable(&dataPtr->watchTable, BLT_ONE_WORD_KEYS);
-    }
-    return dataPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PreCmdProc --
- *
- *	Procedure callback for Tcl_Trace. Gets called before the
- * 	command is executed, but after substitutions have occurred.
- *	If a watch procedure is active, it evals a TCL command.
- *	Activates the "precmd" callback, if one exists.
- *
- *	Stashes some information for the "pre" callback: command
- *	string, substituted argument list, and current level.
- *
- * 	Format of "pre" proc:
- *
- * 	proc beforeCmd { level cmdStr argList } {
- *
- * 	}
- *
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	A Tcl_AsyncHandler may be triggered, if a "post" procedure is
- *	defined.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static void
-PreCmdProc(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,		/* Not used. */
-    int level,			/* Current level */
-    char *command,		/* Command before substitution */
-    Tcl_CmdProc *cmdProc,	/* Not used. */
-    ClientData cmdClientData,	/* Not used. */
-    int argc,
-    const char **argv)		/* Command after parsing, but before
-				 * evaluation */
-{
-    Watch *watchPtr = clientData;
-
-    if (watchPtr->active) {
-	return;			/* Don't re-enter from Tcl_Eval below */
-    }
-    watchPtr->cmdPtr = command;
-    watchPtr->level = level;
-    /*
-     * There's no guarantee that the calls to PreCmdProc will match
-     * up with PostCmdProc.  So free up argument lists that are still
-     * hanging around before allocating a new one.
-     */
-    if (watchPtr->args != NULL) {
-	Blt_Free(watchPtr->args);
-    }
-    watchPtr->args = Tcl_Merge(argc, argv);
-
-    if (watchPtr->preCmd != NULL) {
-	Tcl_DString buffer;
-	char string[200];
-	int status;
-	char **p;
-
-	/* Create the "pre" command procedure call */
-	Tcl_DStringInit(&buffer);
-	for (p = watchPtr->preCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&buffer, *p);
-	}
-	sprintf_s(string, 200, "%d", watchPtr->level);
-	Tcl_DStringAppendElement(&buffer, string);
-	Tcl_DStringAppendElement(&buffer, watchPtr->cmdPtr);
-	Tcl_DStringAppendElement(&buffer, watchPtr->args);
-
-	watchPtr->active = 1;
-	status = Tcl_Eval(interp, Tcl_DStringValue(&buffer));
-	watchPtr->active = 0;
-
-	Tcl_DStringFree(&buffer);
-	if (status != TCL_OK) {
-	    fprintf(stderr, "%s failed: %s\n", watchPtr->preCmd[0],
-		Tcl_GetStringResult(interp));
-	}
-    }
-    /* Set the trigger for the "post" command procedure */
-    if (watchPtr->postCmd != NULL) {
-	Tcl_AsyncMark(watchPtr->asyncHandle);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PostCmdProc --
- *
- *	Procedure callback for Tcl_AsyncHandler. Gets called after
- *	the command has executed.  It tests for a "post" command, but
- *	you really can't get here, if one doesn't exist.
- *
- *	Save the current contents of interp->result before calling
- *	the "post" command, and restore it afterwards.
- *
- * 	Format of "post" proc:
- *
- * 	proc afterCmd { level cmdStr argList retCode results } {
- *
- *	}
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Memory for argument list is released.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-PostCmdProc(ClientData clientData, Tcl_Interp *interp, int code)
-{
-    Watch *watchPtr = clientData;
-
-    if (watchPtr->active) {
-	return code;
-    }
-    if (watchPtr->postCmd != NULL) {
-	int status;
-	Tcl_DString buffer;
-	char string[200];
-	const char *results;
-	char **p;
-	const char *retCode;
-	char *errorCode, *errorInfo;
-	errorInfo = errorCode = NULL;
-
-	results = "NO INTERPRETER AVAILABLE";
-
-	/*
-	 * Save the state of the interpreter.
-	 */
-	if (interp != NULL) {
-	    errorInfo = (char *)Tcl_GetVar2(interp, "errorInfo", (char *)NULL,
-		TCL_GLOBAL_ONLY);
-	    if (errorInfo != NULL) {
-		errorInfo = Blt_AssertStrdup(errorInfo);
-	    }
-	    errorCode = (char *)Tcl_GetVar2(interp, "errorCode", (char *)NULL,
-		TCL_GLOBAL_ONLY);
-	    if (errorCode != NULL) {
-		errorCode = Blt_AssertStrdup(errorCode);
-	    }
-	    results = Blt_AssertStrdup(Tcl_GetStringResult(interp));
-	}
-	/* Create the "post" command procedure call */
-	Tcl_DStringInit(&buffer);
-	for (p = watchPtr->postCmd; *p != NULL; p++) {
-	    Tcl_DStringAppendElement(&buffer, *p);
-	}
-	sprintf_s(string, 200, "%d", watchPtr->level);
-	Tcl_DStringAppendElement(&buffer, string);
-	Tcl_DStringAppendElement(&buffer, watchPtr->cmdPtr);
-	Tcl_DStringAppendElement(&buffer, watchPtr->args);
-	if (code < UNKNOWN_RETURN_CODE) {
-	    retCode = codeNames[code];
-	} else {
-	    sprintf_s(string, 200, "%d", code);
-	    retCode = string;
-	}
-	Tcl_DStringAppendElement(&buffer, retCode);
-	Tcl_DStringAppendElement(&buffer, results);
-
-	watchPtr->active = 1;
-	status = Tcl_Eval(watchPtr->interp, Tcl_DStringValue(&buffer));
-	watchPtr->active = 0;
-
-	Tcl_DStringFree(&buffer);
-	Blt_Free(watchPtr->args);
-	watchPtr->args = NULL;
-
-	if (status != TCL_OK) {
-	    fprintf(stderr, "%s failed: %s\n", watchPtr->postCmd[0],
-		Tcl_GetStringResult(watchPtr->interp));
-	}
-	/*
-	 * Restore the state of the interpreter.
-	 */
-	if (interp != NULL) {
-	    if (errorInfo != NULL) {
-		Tcl_SetVar2(interp, "errorInfo", (char *)NULL, errorInfo,
-		    TCL_GLOBAL_ONLY);
-		Blt_Free(errorInfo);
-	    }
-	    if (errorCode != NULL) {
-		Tcl_SetVar2(interp, "errorCode", (char *)NULL, errorCode,
-		    TCL_GLOBAL_ONLY);
-		Blt_Free(errorCode);
-	    }
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp), results, -1);
-	}
-    }
-    return code;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewWatch --
- *
- *	Creates a new watch. The new watch is registered into the
- *	"watchTable" hash table. Also creates a Tcl_AsyncHandler for
- *	triggering "post" events.
- *
- * Results:
- *	If memory for the watch could be allocated, a pointer to
- *	the new watch is returned.  Otherwise NULL, and interp->result
- *	points to an error message.
- *
- * Side Effects:
- *	A new Tcl_AsyncHandler is created. A new hash table entry
- *	is created. Memory the watch structure is allocated.
- *
- *---------------------------------------------------------------------------
- */
-static Watch *
-NewWatch(Tcl_Interp *interp, const char *name)
-{
-    Watch *watchPtr;
-
-    watchPtr = Blt_Calloc(1, sizeof(Watch));
-    if (watchPtr == NULL) {
-	Tcl_AppendResult(interp, "can't allocate watch structure", (char *)NULL);
-	return NULL;
-    }
-    watchPtr->state = WATCH_STATE_ACTIVE;
-    watchPtr->maxLevel = WATCH_MAX_LEVEL;
-    watchPtr->name = Blt_AssertStrdup(name);
-    watchPtr->interp = interp;
-    watchPtr->asyncHandle = Tcl_AsyncCreate(PostCmdProc, watchPtr);
-    return watchPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyWatch --
- *
- *	Removes the watch. The resources used by the watch
- *	are released.
- *	  1) If the watch is active, its trace is deleted.
- *	  2) Memory for command strings is free-ed.
- *	  3) Entry is removed from watch registry.
- *	  4) Async handler is deleted.
- *	  5) Memory for watch itself is released.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Everything associated with the watch is freed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyWatch(WatchCmdInterpData *dataPtr, Watch *watchPtr)
-{
-    Blt_HashEntry *hPtr;
-
-    Tcl_AsyncDelete(watchPtr->asyncHandle);
-    if (watchPtr->state == WATCH_STATE_ACTIVE) {
-	Tcl_DeleteTrace(watchPtr->interp, watchPtr->trace);
-    }
-    if (watchPtr->preCmd != NULL) {
-	Blt_Free(watchPtr->preCmd);
-    }
-    if (watchPtr->postCmd != NULL) {
-	Blt_Free(watchPtr->postCmd);
-    }
-    if (watchPtr->args != NULL) {
-	Blt_Free(watchPtr->args);
-    }
-    hPtr = Blt_FindHashEntry(&dataPtr->watchTable, (char *)watchPtr->name);
-    Blt_DeleteHashEntry(&dataPtr->watchTable, hPtr);
-    if (watchPtr->name != NULL) {
-	Blt_Free(watchPtr->name);
-    }
-    Blt_Free(watchPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetWatchFromObj --
- *
- *	Searches for the watch represented by the watch name and its
- *	associated interpreter in its directory.
- *
- * Results:
- *	If found, the pointer to the watch structure is returned,
- *	otherwise NULL. If requested, interp-result will be filled
- *	with an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetWatchFromObj(
-    WatchCmdInterpData *dataPtr,
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    Watch **watchPtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&dataPtr->watchTable, (char *)string);
-    if (hPtr == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "can't find any watch named \"", 
-			     string, "\"", (char *)NULL);
-	}
-	return TCL_ERROR;
-    }
-    *watchPtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ListWatches --
- *
- *	Creates a list of all watches in the interpreter.  The
- *	list search may be restricted to selected states by
- *	setting "state" to something other than WATCH_STATE_DONT_CARE.
- *
- * Results:
- *	A standard TCL result.  Interp->result will contain a list
- *	of all watches matches the state criteria.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ListWatches(WatchCmdInterpData *dataPtr, Tcl_Interp *interp, 
-	    enum WatchStates state)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    Tcl_Obj *listObjPtr;
-
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->watchTable, &cursor);
-	hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	Watch *watchPtr;
-
-	watchPtr = Blt_GetHashValue(hPtr);
-	if ((state == WATCH_STATE_DONT_CARE) ||
-	    (state == watchPtr->state)) {
-	    Tcl_ListObjAppendElement(interp, listObjPtr, 
-			     Tcl_NewStringObj(watchPtr->name, -1));
-	}
-    }
-    Tcl_SetObjResult(interp, listObjPtr);
-    return TCL_OK;
-}
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigWatch --
- *
- *	Processes argument list of switches and values, setting
- *	Watch fields.
- *
- * Results:
- *	If found, the pointer to the watch structure is returned,
- *	otherwise NULL. If requested, interp-result will be filled
- *	with an error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigWatch(Watch *watchPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (Blt_ParseSwitches(interp, switchSpecs, objc, objv, watchPtr, 
-	BLT_SWITCH_DEFAULTS) < 0) {
-	return TCL_ERROR;
-    }
-    /*
-     * If the watch's max depth changed or its state, reset the traces.
-     */
-    if (watchPtr->trace != (Tcl_Trace) 0) {
-	Tcl_DeleteTrace(interp, watchPtr->trace);
-	watchPtr->trace = (Tcl_Trace) 0;
-    }
-    if (watchPtr->state == WATCH_STATE_ACTIVE) {
-	watchPtr->trace = Tcl_CreateTrace(interp, watchPtr->maxLevel,
-	    PreCmdProc, watchPtr);
-    }
-    return TCL_OK;
-}
-
-/* TCL interface routines */
-/*
- *---------------------------------------------------------------------------
- *
- * CreateOp --
- *
- *	Creates a new watch and processes any extra switches.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side Effects:
- *	A new watch is created.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-CreateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-    Watch *watchPtr;
-    int isNew;
-    char *string;
-    Blt_HashEntry *hPtr;
-
-    string = Tcl_GetString(objv[2]);
-    hPtr = Blt_CreateHashEntry(&dataPtr->watchTable, string, &isNew);
-    if (!isNew) {
-	Tcl_AppendResult(interp, "a watch \"", string, "\" already exists", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    watchPtr = NewWatch(interp, string);
-    if (watchPtr == NULL) {
-	return TCL_ERROR;	/* Can't create new watch */
-    }
-    Blt_SetHashValue(hPtr, watchPtr);
-    return ConfigWatch(watchPtr, interp, objc - 3, objv + 3);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteOp --
- *
- *	Deletes the watch.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-DeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Watch *watchPtr;
-    WatchCmdInterpData *dataPtr = clientData;
-
-    if (GetWatchFromObj(dataPtr, interp, objv[2], &watchPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    DestroyWatch(dataPtr, watchPtr);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ActivateOp --
- *
- *	Activate/deactivates the named watch.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ActivateOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	   Tcl_Obj *const *objv)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-    Watch *watchPtr;
-    enum WatchStates state;
-    char *string;
-
-    if (GetWatchFromObj(dataPtr, interp, objv[2], &watchPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    string = Tcl_GetString(objv[1]);
-    state = (string[0] == 'a') ? WATCH_STATE_ACTIVE : WATCH_STATE_IDLE;
-    if (state != watchPtr->state) {
-	if (watchPtr->trace == (Tcl_Trace) 0) {
-	    watchPtr->trace = Tcl_CreateTrace(interp, watchPtr->maxLevel,
-		PreCmdProc, watchPtr);
-	} else {
-	    Tcl_DeleteTrace(interp, watchPtr->trace);
-	    watchPtr->trace = (Tcl_Trace) 0;
-	}
-	watchPtr->state = state;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NamesOp --
- *
- *	Returns the names of all watches in the interpreter.
- *
- * Results:
- *	A standard TCL result.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-NamesOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-    enum WatchStates state;
-
-    state = WATCH_STATE_DONT_CARE;
-    if (objc == 3) {
-	char c;
-	char *string;
-
-	string = Tcl_GetString(objv[2]);
-	c = string[0];
-	if ((c == 'a') && (strcmp(string, "active") == 0)) {
-	    state = WATCH_STATE_ACTIVE;
-	} else if ((c == 'i') && (strcmp(string, "idle") == 0)) {
-	    state = WATCH_STATE_IDLE;
-	} else if ((c == 'i') && (strcmp(string, "ignore") == 0)) {
-	    state = WATCH_STATE_DONT_CARE;
-	} else {
-	    Tcl_AppendResult(interp, "bad state \"", string, "\" should be \
-\"active\", \"idle\", or \"ignore\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return ListWatches(dataPtr, interp, state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureOp --
- *
- *	Convert the range of the pixel values allowed into a list.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-ConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-	    Tcl_Obj *const *objv)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-    Watch *watchPtr;
-
-    if (GetWatchFromObj(dataPtr, interp, objv[2], &watchPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return ConfigWatch(watchPtr, interp, objc - 3, objv + 3);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InfoOp --
- *
- *	Convert the limits of the pixel values allowed into a list.
- *
- * Results:
- *	The string representation of the limits is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-InfoOp(ClientData clientData, Tcl_Interp *interp, int objc, 
-       Tcl_Obj *const *objv)
-{
-    WatchCmdInterpData *dataPtr = clientData;
-    Watch *watchPtr;
-    char **p;
-
-    if (GetWatchFromObj(dataPtr, interp, objv[2], &watchPtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (watchPtr->preCmd != NULL) {
-	Tcl_AppendResult(interp, "-precmd", (char *)NULL);
-	for (p = watchPtr->preCmd; *p != NULL; p++) {
-	    Tcl_AppendResult(interp, " ", *p, (char *)NULL);
-	}
-    }
-    if (watchPtr->postCmd != NULL) {
-	Tcl_AppendResult(interp, "-postcmd", (char *)NULL);
-	for (p = watchPtr->postCmd; *p != NULL; p++) {
-	    Tcl_AppendResult(interp, " ", *p, (char *)NULL);
-	}
-    }
-    Tcl_AppendResult(interp, "-maxlevel ", Blt_Itoa(watchPtr->maxLevel), " ", 
-		     (char *)NULL);
-    Tcl_AppendResult(interp, "-active ", (watchPtr->state == WATCH_STATE_ACTIVE)
-	? "true" : "false", " ", (char *)NULL);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WatchCmd --
- *
- *	This procedure is invoked to process the TCL "blt_watch"
- *	command. See the user documentation for details on what
- *	it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static Blt_OpSpec watchOps[] =
-{
-    {"activate", 1, ActivateOp, 3, 3, "watchName",},
-    {"configure", 2, ConfigureOp, 3, 0,
-	"watchName ?options...?"},
-    {"create", 2, CreateOp, 3, 0, "watchName ?switches?",},
-    {"deactivate", 3, ActivateOp, 3, 3, "watchName",},
-    {"delete", 3, DeleteOp, 3, 3, "watchName",},
-    {"info", 1, InfoOp, 3, 3, "watchName",},
-    {"names", 1, NamesOp, 2, 3, "?state?",},
-};
-static int nWatchOps = sizeof(watchOps) / sizeof(Blt_OpSpec);
-
-/*ARGSUSED*/
-static int
-WatchCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nWatchOps, watchOps, BLT_OP_ARG1, 
-	objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-/* Public initialization routine */
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WatchCmdInitProc --
- *
- *	This procedure is invoked to initialize the TCL command
- *	"blt_watch".
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the new command and adds a new entry into a
- *	global	Tcl associative array.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_WatchCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"watch", WatchCmd, NULL};
-
-    cmdSpec.clientData = GetWatchCmdInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
diff --git a/blt3.0/src/bltWin.h b/blt3.0/src/bltWin.h
deleted file mode 100644
index 932077d..0000000
--- a/blt3.0/src/bltWin.h
+++ /dev/null
@@ -1,265 +0,0 @@
-
-/*
- * bltWin.h --
- *
- *	Copyright 1993-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _BLT_WIN_H
-#define _BLT_WIN_H
-
-#define _CRT_SECURE_NO_DEPRECATE
-
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef STRICT
-#undef WIN32_LEAN_AND_MEAN
-#include <windowsx.h>
-
-#undef STD_NORMAL_BACKGROUND
-#undef STD_NORMAL_FOREGROUND
-#undef STD_SELECT_BACKGROUND
-#undef STD_SELECT_FOREGROUND
-#undef STD_TEXT_FOREGROUND
-#undef STD_FONT
-#undef STD_FONT_LARGE
-#undef STD_FONT_SMALL
-
-#define STD_NORMAL_BACKGROUND	"SystemButtonFace"
-#define STD_NORMAL_FOREGROUND	"SystemButtonText"
-#define STD_SELECT_BACKGROUND	"SystemHighlight"
-#define STD_SELECT_FOREGROUND	"SystemHighlightText"
-#define STD_TEXT_FOREGROUND	"SystemWindowText"
-#define STD_FONT		"Arial 8"
-#define STD_FONT_LARGE		"Arial 12"
-#define STD_FONT_SMALL		"Arial 6"
-
-#ifdef CHECK_UNICODE_CALLS
-#define _UNICODE
-#define UNICODE
-#define __TCHAR_DEFINED
-typedef float *_TCHAR;
-#define _TCHAR_DEFINED
-typedef float *TCHAR;
-#endif /* CHECK_UNICODE_CALLS */
-
-/* DOS Encapsulated PostScript File Header */
-#pragma pack(2)
-typedef struct {
-    BYTE magic[4];		/* Magic number for a DOS EPS file
-				 * C5,D0,D3,C6 */
-    DWORD psStart;		/* Offset of PostScript section. */
-    DWORD psLength;		/* Length of the PostScript section. */
-    DWORD wmfStart;		/* Offset of Windows Meta File section. */
-    DWORD wmfLength;		/* Length of Meta file section. */
-    DWORD tiffStart;		/* Offset of TIFF section. */
-    DWORD tiffLength;		/* Length of TIFF section. */
-    WORD checksum;		/* Checksum of header. If FFFF, ignore. */
-} DOSEPSHEADER;
-
-#pragma pack()
-
-/* Aldus Portable Metafile Header */
-#pragma pack(2)
-typedef struct {
-    DWORD key;			/* Type of metafile */
-    WORD hmf;			/* Unused. Must be NULL. */
-    SMALL_RECT bbox;		/* Bounding rectangle */
-    WORD inch;			/* Units per inch. */
-    DWORD reserved;		/* Unused. */
-    WORD checksum;		/* XOR of previous fields (10 32-bit words). */
-} APMHEADER;
-#pragma pack()
-
-#undef Blt_Export
-#define Blt_Export __declspec(dllexport)
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#define fstat	 _fstat
-#define stat	 _stat
-#ifdef _MSC_VER
-#define fileno	 _fileno
-#endif
-#define isnan(x)		_isnan(x)
-#define strcasecmp(s1,s2)	_stricmp(s1,s2)
-#define strncasecmp(s1,s2,n)	_strnicmp(s1,s2,n)
-#define vsnprintf		_vsnprintf
-#define isascii(c)		__isascii(c)
-#endif /* _MSC_VER || __BORLANDC__ */
-
-#ifdef __BORLANDC__
-#define isnan(x)		_isnan(x)
-#endif
-
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-#ifdef FINITE
-#undef FINITE
-#define FINITE(x)		_finite(x)
-#endif
-#endif /* __BORLANDC__ || _MSC_VER */
-
-#ifdef __GNUC__ 
-#include <wingdi.h>
-#include <windowsx.h>
-#undef Status
-#include <winspool.h>
-#define Status int
-/*
- * Add definitions missing from windgi.h, windowsx.h, and winspool.h
- */
-#include <missing.h> 
-#endif /* __GNUC__ */
-
-#undef XCopyArea		
-#define XCopyArea		Blt_EmulateXCopyArea
-#undef XCopyPlane		
-#define XCopyPlane		Blt_EmulateXCopyPlane
-#undef XDrawArcs		
-#define XDrawArcs		Blt_EmulateXDrawArcs
-#undef XDrawLine		
-#define XDrawLine		Blt_EmulateXDrawLine
-#undef XDrawLines		
-#define XDrawLines		Blt_EmulateXDrawLines
-#undef XDrawPoints		
-#define XDrawPoints		Blt_EmulateXDrawPoints
-#undef XDrawRectangle		
-#define XDrawRectangle		Blt_EmulateXDrawRectangle
-#undef XDrawRectangles		
-#define XDrawRectangles		Blt_EmulateXDrawRectangles
-#undef XDrawSegments		
-#define XDrawSegments		Blt_EmulateXDrawSegments
-#undef XDrawString		
-#define XDrawString		Blt_EmulateXDrawString
-#undef XFillArcs		
-#define XFillArcs		Blt_EmulateXFillArcs
-#undef XFillPolygon		
-#define XFillPolygon		Blt_EmulateXFillPolygon
-#undef XFillRectangle		
-#define XFillRectangle		Blt_EmulateXFillRectangle
-#undef XFillRectangles		
-#define XFillRectangles		Blt_EmulateXFillRectangles
-#undef XFree			
-#define XFree			Blt_EmulateXFree
-#undef XGetWindowAttributes	
-#define XGetWindowAttributes	Blt_EmulateXGetWindowAttributes
-#undef XLowerWindow		
-#define XLowerWindow		Blt_EmulateXLowerWindow
-#undef XMaxRequestSize		
-#define XMaxRequestSize		Blt_EmulateXMaxRequestSize
-#undef XRaiseWindow		
-#define XRaiseWindow		Blt_EmulateXRaiseWindow
-#undef XReparentWindow		
-#define XReparentWindow		Blt_EmulateXReparentWindow
-#undef XSetDashes		
-#define XSetDashes		Blt_EmulateXSetDashes
-#undef XUnmapWindow		
-#define XUnmapWindow		Blt_EmulateXUnmapWindow
-#undef XWarpPointer		
-#define XWarpPointer		Blt_EmulateXWarpPointer
-
-BLT_EXTERN GC Blt_EmulateXCreateGC(Display *display, Drawable drawable,
-    unsigned long mask, XGCValues *valuesPtr);
-BLT_EXTERN void Blt_EmulateXCopyArea(Display *display, Drawable src, Drawable dest,
-    GC gc, int src_x, int src_y, unsigned int width, unsigned int height,
-    int dest_x, int dest_y);
-BLT_EXTERN void Blt_EmulateXCopyPlane(Display *display, Drawable src,
-    Drawable dest, GC gc, int src_x, int src_y, unsigned int width,
-    unsigned int height, int dest_x, int dest_y, unsigned long plane);
-BLT_EXTERN void Blt_EmulateXDrawArcs(Display *display, Drawable drawable, GC gc,
-    XArc *arcArr, int nArcs);
-BLT_EXTERN void Blt_EmulateXDrawLine(Display *display, Drawable drawable, GC gc,
-    int x1, int y1, int x2, int y2);
-BLT_EXTERN void Blt_EmulateXDrawLines(Display *display, Drawable drawable, GC gc,
-    XPoint *pointArr, int nPoints, int mode);
-BLT_EXTERN void Blt_EmulateXDrawPoints(Display *display, Drawable drawable, GC gc,
-    XPoint *pointArr, int nPoints, int mode);
-BLT_EXTERN void Blt_EmulateXDrawRectangle(Display *display, Drawable drawable,
-    GC gc, int x, int y, unsigned int width, unsigned int height);
-BLT_EXTERN void Blt_EmulateXDrawRectangles(Display *display, Drawable drawable,
-    GC gc, XRectangle *rectArr, int nRects);
-BLT_EXTERN void Blt_EmulateXDrawSegments(Display *display, Drawable drawable,
-    GC gc, XSegment *segArr, int nSegments);
-BLT_EXTERN void Blt_EmulateXDrawSegments(Display *display, Drawable drawable,
-    GC gc, XSegment *segArr, int nSegments);
-BLT_EXTERN void Blt_EmulateXDrawString(Display *display, Drawable drawable, GC gc,
-    int x, int y, _Xconst char *string, int length);
-BLT_EXTERN void Blt_EmulateXFillArcs(Display *display, Drawable drawable, GC gc,
-    XArc *arcArr, int nArcs);
-BLT_EXTERN void Blt_EmulateXFillPolygon(Display *display, Drawable drawable,
-    GC gc, XPoint *points, int nPoints,  int shape, int mode);
-BLT_EXTERN void Blt_EmulateXFillRectangle(Display *display, Drawable drawable,
-    GC gc, int x, int y, unsigned int width, unsigned int height);
-BLT_EXTERN void Blt_EmulateXFillRectangles(Display *display, Drawable drawable,
-    GC gc, XRectangle *rectArr, int nRects);
-BLT_EXTERN void Blt_EmulateXFree(void *ptr);
-BLT_EXTERN int Blt_EmulateXGetWindowAttributes(Display *display, Window window,
-    XWindowAttributes * attrsPtr);
-BLT_EXTERN void Blt_EmulateXLowerWindow(Display *display, Window window);
-BLT_EXTERN void Blt_EmulateXMapWindow(Display *display, Window window);
-BLT_EXTERN long Blt_EmulateXMaxRequestSize(Display *display);
-BLT_EXTERN void Blt_EmulateXRaiseWindow(Display *display, Window window);
-BLT_EXTERN void Blt_EmulateXReparentWindow(Display *display, Window window,
-    Window parent, int x, int y);
-BLT_EXTERN void Blt_EmulateXSetDashes(Display *display, GC gc, int dashOffset,
-    _Xconst char *dashList, int n);
-BLT_EXTERN void Blt_EmulateXUnmapWindow(Display *display, Window window);
-BLT_EXTERN void Blt_EmulateXWarpPointer(Display *display, Window srcWindow,
-    Window destWindow, int srcX, int srcY, unsigned int srcWidth,
-    unsigned int srcHeight, int destX, int destY);
-
-BLT_EXTERN void Blt_DrawLine2D(Display *display, Drawable drawable, GC gc,
-    POINT *screenPts, int nScreenPts);
-
-BLT_EXTERN unsigned char *Blt_GetBitmapData(Display *display, Pixmap bitmap, 
-	int width, int height, int *pitchPtr);
-
-BLT_EXTERN HFONT Blt_CreateRotatedFont(Tk_Window tkwin, unsigned long font, 
-	float angle);
-
-BLT_EXTERN HPALETTE Blt_GetSystemPalette(void);
-
-BLT_EXTERN HPEN Blt_GCToPen(HDC dc, GC gc);
-
-BLT_EXTERN double hypot(double x, double y);
-BLT_EXTERN int Blt_AsyncRead(int fd, char *buffer, unsigned int size);
-BLT_EXTERN int Blt_AsyncWrite(int fd, const char *buffer, unsigned int size);
-BLT_EXTERN void Blt_CreateFileHandler(int fd, int flags, 
-	Tcl_FileProc * proc, ClientData clientData);
-BLT_EXTERN void Blt_DeleteFileHandler(int fd);
-BLT_EXTERN int Blt_GetPlatformId(void);
-BLT_EXTERN const char *Blt_LastError(void);
-BLT_EXTERN const char *Blt_PrintError(int error);
-
-BLT_EXTERN int Blt_GetOpenPrinter(Tcl_Interp *interp, const char *id,
-    Drawable *drawablePtr);
-BLT_EXTERN int Blt_PrintDialog(Tcl_Interp *interp, Drawable *drawablePtr);
-BLT_EXTERN int Blt_OpenPrinterDoc(Tcl_Interp *interp, const char *id);
-BLT_EXTERN int Blt_ClosePrinterDoc(Tcl_Interp *interp, const char *id);
-BLT_EXTERN void Blt_GetPrinterScale(HDC dc, double *xRatio, double *yRatio);
-BLT_EXTERN int Blt_StartPrintJob(Tcl_Interp *interp, Drawable drawable);
-BLT_EXTERN int Blt_EndPrintJob(Tcl_Interp *interp, Drawable drawable);
-
-#endif /*_BLT_WIN_H*/
diff --git a/blt3.0/src/bltWinBitmap.c b/blt3.0/src/bltWinBitmap.c
deleted file mode 100644
index a6653c0..0000000
--- a/blt3.0/src/bltWinBitmap.c
+++ /dev/null
@@ -1,917 +0,0 @@
-
-/*
- * bltWinPainter.c --
- *
- * This module implements Win32-specific image processing procedures for the
- * BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltBitmap.h"
-#include "bltPicture.h"
-#include "bltPictInt.h"
-#include "bltPainter.h"
-#include "bltWinPainter.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-
-#define GetBit(x, y) \
-   srcBits[(srcBytesPerRow * (srcHeight - y - 1)) + (x>>3)] & (0x80 >> (x&7))
-#define SetBit(x, y) \
-   destBits[(destBytesPerRow * (destHeight - y - 1)) + (x>>3)] |= (0x80 >>(x&7))
-
-Pixmap
-Blt_PhotoImageMask(
-    Tk_Window tkwin,
-    Tk_PhotoImageBlock src)
-{
-    TkWinBitmap *twdPtr;
-    int offset, count;
-    int x, y;
-    unsigned char *srcPtr;
-    int destBytesPerRow;
-    int destHeight;
-    unsigned char *destBits;
-
-    destBytesPerRow = ((src.width + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(src.height, destBytesPerRow);
-    destHeight = src.height;
-
-    offset = count = 0;
-
-    /* FIXME: figure out why this is so! */
-    for (y = src.height - 1; y >= 0; y--) {
-	srcPtr = src.pixelPtr + offset;
-	for (x = 0; x < src.width; x++) {
-	    if (srcPtr[src.offset[3]] == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    srcPtr += src.pixelSize;
-	}
-	offset += src.pitch;
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = src.width;
-	bm.bmHeight = src.height;
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-Pixmap
-Blt_PictureMask(
-    Tk_Window tkwin,
-    Blt_Picture pict)
-{
-    TkWinBitmap *twdPtr;
-    int count;
-    int x, y;
-    Blt_Pixel *sp;
-    int destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *destBits;
-
-    destWidth = Blt_PictureWidth(pict);
-    destHeight = Blt_PictureHeight(pict);
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-    count = 0;
-    sp = Blt_PictureBits(pict);
-    for (y = 0; y < destHeight; y++) {
-	for (x = 0; x < destWidth; x++) {
-	    if (sp->Alpha == 0x00) {
-		SetBit(x, y);
-		count++;
-	    }
-	    sp++;
-	}
-    }
-    if (count > 0) {
-	HBITMAP hBitmap;
-	BITMAP bm;
-
-	bm.bmType = 0;
-	bm.bmWidth = Blt_PictureWidth(pict);
-	bm.bmHeight = Blt_PictureHeight(pict);
-	bm.bmWidthBytes = destBytesPerRow;
-	bm.bmPlanes = 1;
-	bm.bmBitsPixel = 1;
-	bm.bmBits = destBits;
-	hBitmap = CreateBitmapIndirect(&bm);
-
-	twdPtr = Blt_AssertMalloc(sizeof(TkWinBitmap));
-	twdPtr->type = TWD_BITMAP;
-	twdPtr->handle = hBitmap;
-	twdPtr->depth = 1;
-	if (Tk_WindowId(tkwin) == None) {
-	    twdPtr->colormap = DefaultColormap(Tk_Display(tkwin), 
-			 DefaultScreen(Tk_Display(tkwin)));
-	} else {
-	    twdPtr->colormap = Tk_Colormap(tkwin);
-	}
-    } else {
-	twdPtr = NULL;
-    }
-    if (destBits != NULL) {
-	Blt_Free(destBits);
-    }
-    return (Pixmap)twdPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RotateBitmap --
- *
- *	Creates a new bitmap containing the rotated image of the given
- *	bitmap.  We also need a special GC of depth 1, so that we do
- *	not need to rotate more than one plane of the bitmap.
- *
- *	Note that under Windows, monochrome bitmaps are stored
- *	bottom-to-top.  This is why the right angle rotations 0/180
- *	and 90/270 look reversed.
- *
- * Results:
- *	Returns a new bitmap containing the rotated image.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_RotateBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap to be rotated */
-    int srcWidth, 
-    int srcHeight,		/* Width and height of the source bitmap */
-    float angle,		/* Right angle rotation to perform */
-    int *destWidthPtr, 
-    int *destHeightPtr)
-{
-    Display *display;		/* X display */
-    Window root;		/* Root window drawable */
-    Pixmap destBitmap;
-    double rotWidth, rotHeight;
-    HDC hDC;
-    TkWinDCState state;
-    int x, y;			/* Destination bitmap coordinates */
-    int sx, sy;			/* Source bitmap coordinates */
-    unsigned long pixel;
-    HBITMAP hBitmap;
-    int result;
-    struct MonoBitmap {
-	BITMAPINFOHEADER bi;
-	RGBQUAD colors[2];
-    } mb;
-    int srcBytesPerRow, destBytesPerRow;
-    int destWidth, destHeight;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rotWidth, &rotHeight,
-	(Point2d *)NULL);
-
-    destWidth = (int)ceil(rotWidth);
-    destHeight = (int)ceil(rotHeight);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((destWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(destHeight, destBytesPerRow);
-
-    angle = FMOD(angle, 360.0);
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-
-	/* Handle right-angle rotations specially. */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = y;
-		for (x = 0; x < destWidth; x++) {
-		    sy = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:		/* 180 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sy = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sx = destWidth - x - 1;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		sx = destHeight - y - 1;
-		for (x = 0; x < destWidth; x++) {
-		    sy = x;
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < destHeight; y++) {
-		for (x = 0; x < destWidth; x++) {
-		    pixel = GetBit(x, y);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double srcCX, srcCY;	/* Center of source rectangle */
-	double destCX, destCY;	/* Center of destination rectangle */
-	double tx, ty;
-	double rx, ry;		/* Angle of rotation for x and y coordinates */
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	srcCX = srcWidth * 0.5;
-	srcCY = srcHeight * 0.5;
-	destCX = destWidth * 0.5;
-	destCY = destHeight * 0.5;
-
-	/* Rotate each pixel of dest image, placing results in source image */
-
-	for (y = 0; y < destHeight; y++) {
-	    ty = y - destCY;
-	    for (x = 0; x < destWidth; x++) {
-
-		/* Translate origin to center of destination image */
-		tx = x - destCX;
-
-		/* Rotate the coordinates about the origin */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image */
-		rx += srcCX;
-		ry += srcCY;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source
-		 */
-
-		if ((sx >= srcWidth) || (sx < 0) || (sy >= srcHeight) ||
-		    (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-    ZeroMemory(&mb, sizeof(mb));
-    mb.bi.biSize = sizeof(BITMAPINFOHEADER);
-    mb.bi.biPlanes = 1;
-    mb.bi.biBitCount = 1;
-    mb.bi.biCompression = BI_RGB;
-    mb.bi.biWidth = destWidth;
-    mb.bi.biHeight = destHeight;
-    mb.bi.biSizeImage = destBytesPerRow * destHeight;
-    mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 0x0;
-    mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 0xFF;
-    hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-    result = SetDIBits(hDC, hBitmap, 0, destHeight, (LPVOID)destBits, 
-	(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-
-    *destWidthPtr = destWidth;
-    *destHeightPtr = destHeight;
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleBitmap --
- *
- *	Creates a new scaled bitmap from another bitmap. 
- *
- * Results:
- *	The new scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleBitmap(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,
-    int srcWidth, 
-    int srcHeight, 
-    int destWidth, 
-    int destHeight)
-{
-    TkWinDCState srcState, destState;
-    HDC src, dest;
-    Pixmap destBitmap;
-    Window root;
-    Display *display;
-
-    /* Create a new bitmap the size of the region and clear it */
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-    destBitmap = Tk_GetPixmap(display, root, destWidth, destHeight, 1);
-    if (destBitmap == None) {
-	return None;
-    }
-    src = TkWinGetDrawableDC(display, srcBitmap, &srcState);
-    dest = TkWinGetDrawableDC(display, destBitmap, &destState);
-
-    StretchBlt(dest, 0, 0, destWidth, destHeight, src, 0, 0,
-	srcWidth, srcHeight, SRCCOPY);
-
-    TkWinReleaseDrawableDC(srcBitmap, src, &srcState);
-    TkWinReleaseDrawableDC(destBitmap, dest, &destState);
-    return destBitmap;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ScaleRotateBitmapArea --
- *
- *	Creates a scaled and rotated bitmap from a given bitmap.  The
- *	caller also provides (offsets and dimensions) the region of
- *	interest in the destination bitmap.  This saves having to
- *	process the entire destination bitmap is only part of it is
- *	showing in the viewport.
- *
- *	This uses a simple rotation/scaling of each pixel in the 
- *	destination image.  For each pixel, the corresponding 
- *	pixel in the source bitmap is used.  This means that 
- *	destination coordinates are first scaled to the size of 
- *	the rotated source bitmap.  These coordinates are then
- *	rotated back to their original orientation in the source.
- *
- * Results:
- *	The new rotated and scaled bitmap is returned.
- *
- * Side Effects:
- *	A new pixmap is allocated. The caller must release this.
- *
- *---------------------------------------------------------------------------
- */
-Pixmap
-Blt_ScaleRotateBitmapArea(
-    Tk_Window tkwin,
-    Pixmap srcBitmap,		/* Source bitmap. */
-    unsigned int srcWidth, 
-    unsigned int srcHeight,	/* Size of source bitmap */
-    int regionX, 
-    int regionY,		/* Offset of region in virtual
-				 * destination bitmap. */
-    unsigned int regionWidth, 
-    unsigned int regionHeight,	/* Desire size of bitmap region. */
-    unsigned int virtWidth,		
-    unsigned int virtHeight,	/* Virtual size of destination bitmap. */
-    float angle)		/* Angle to rotate bitmap.  */
-{
-    Display *display;		/* X display */
-    Pixmap destBitmap;
-    Window root;		/* Root window drawable */
-    double rWidth, rHeight;
-    double xScale, yScale;
-    int srcBytesPerRow, destBytesPerRow;
-    int destHeight;
-    int result;
-    unsigned char *srcBits, *destBits;
-
-    display = Tk_Display(tkwin);
-    root = Tk_RootWindow(tkwin);
-
-    /* Create a bitmap and image big enough to contain the rotated text */
-    destBitmap = Tk_GetPixmap(display, root, regionWidth, regionHeight, 1);
-    if (destBitmap == None) {
-	return None;		/* Can't allocate pixmap. */
-    }
-    srcBits = Blt_GetBitmapData(display, srcBitmap, srcWidth, srcHeight,
-	&srcBytesPerRow);
-    if (srcBits == NULL) {
-	OutputDebugString("Blt_GetBitmapData failed");
-	return None;
-    }
-    destBytesPerRow = ((regionWidth + 31) & ~31) / 8;
-    destBits = Blt_AssertCalloc(regionHeight, destBytesPerRow);
-    destHeight = regionHeight;
-
-    angle = FMOD(angle, 360.0);
-    Blt_GetBoundingBox(srcWidth, srcHeight, angle, &rWidth, &rHeight,
-	       (Point2d *)NULL);
-    xScale = rWidth / (double)virtWidth;
-    yScale = rHeight / (double)virtHeight;
-
-    if (FMOD(angle, (double)90.0) == 0.0) {
-	int quadrant;
-	int y;
-
-	/* Handle right-angle rotations specifically */
-
-	quadrant = (int)(angle / 90.0);
-	switch (quadrant) {
-	case ROTATE_270:	/* 270 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(y+regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sy;
-
-		    sy = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_180:	/* 180 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    unsigned long pixel;
-		    int sx;
-
-		    sx = (int)(xScale *(double)(virtWidth - (x+regionX) - 1));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_90:		/* 90 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sx, x;
-
-		sx = (int)(yScale * (double)(virtHeight - (y + regionY) - 1));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sy;
-		    unsigned long pixel;
-
-		    sy = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	case ROTATE_0:		/* 0 degrees */
-	    for (y = 0; y < (int)regionHeight; y++) {
-		int sy, x;
-
-		sy = (int)(yScale * (double)(y + regionY));
-		for (x = 0; x < (int)regionWidth; x++) {
-		    int sx;
-		    unsigned long pixel;
-
-		    sx = (int)(xScale * (double)(x + regionX));
-		    pixel = GetBit(sx, sy);
-		    if (pixel) {
-			SetBit(x, y);
-		    }
-		}
-	    }
-	    break;
-
-	default:
-	    /* The calling routine should never let this happen. */
-	    break;
-	}
-    } else {
-	double radians, sinTheta, cosTheta;
-	double scx, scy; 	/* Offset from the center of the
-				 * source rectangle. */
-	double rcx, rcy; 	/* Offset to the center of the
-				 * rotated rectangle. */
-	int y;
-
-	radians = (angle / 180.0) * M_PI;
-	sinTheta = sin(radians), cosTheta = cos(radians);
-
-	/*
-	 * Coordinates of the centers of the source and destination rectangles
-	 */
-	scx = srcWidth * 0.5;
-	scy = srcHeight * 0.5;
-	rcx = rWidth * 0.5;
-	rcy = rHeight * 0.5;
-
-	/* For each pixel of the destination image, transform back to the
-	 * associated pixel in the source image. */
-
-	for (y = 0; y < (int)regionHeight; y++) {
-	    int x;
-	    double ty;		/* Translated coordinates from center */
-
-	    ty = (yScale * (double)(y + regionY)) - rcy;
-	    for (x = 0; x < (int)regionWidth; x++) {
-		double rx, ry;	/* Angle of rotation for x and y coordinates */
-		double tx;	/* Translated coordinates from center */
-		int sx, sy;
-		unsigned long pixel;
-
-		/* Translate origin to center of destination image. */
-		tx = (xScale * (double)(x + regionX)) - rcx;
-
-		/* Rotate the coordinates about the origin. */
-		rx = (tx * cosTheta) - (ty * sinTheta);
-		ry = (tx * sinTheta) + (ty * cosTheta);
-
-		/* Translate back to the center of the source image. */
-		rx += scx;
-		ry += scy;
-
-		sx = ROUND(rx);
-		sy = ROUND(ry);
-
-		/*
-		 * Verify the coordinates, since the destination image can be
-		 * bigger than the source.
-		 */
-
-		if ((sx >= (int)srcWidth) || (sx < 0) || 
-		    (sy >= (int)srcHeight) || (sy < 0)) {
-		    continue;
-		}
-		pixel = GetBit(sx, sy);
-		if (pixel) {
-		    SetBit(x, y);
-		}
-	    }
-	}
-    }
-    {
-	HBITMAP hBitmap;
-	HDC hDC;
-	TkWinDCState state;
-	struct MonoBitmap {
-	    BITMAPINFOHEADER bmiHeader;
-	    RGBQUAD colors[2];
-	} mb;
-	
-	/* Write the rotated image into the destination bitmap. */
-	hBitmap = ((TkWinDrawable *)destBitmap)->bitmap.handle;
-	ZeroMemory(&mb, sizeof(mb));
-	mb.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-	mb.bmiHeader.biPlanes = 1;
-	mb.bmiHeader.biBitCount = 1;
-	mb.bmiHeader.biCompression = BI_RGB;
-	mb.bmiHeader.biWidth = regionWidth;
-	mb.bmiHeader.biHeight = regionHeight;
-	mb.bmiHeader.biSizeImage = destBytesPerRow * regionHeight;
-	mb.colors[0].rgbBlue = mb.colors[0].rgbRed = mb.colors[0].rgbGreen = 
-	    0x0;
-	mb.colors[1].rgbBlue = mb.colors[1].rgbRed = mb.colors[1].rgbGreen = 
-	    0xFF;
-	hDC = TkWinGetDrawableDC(display, destBitmap, &state);
-	result = SetDIBits(hDC, hBitmap, 0, regionHeight, (LPVOID)destBits, 
-		(BITMAPINFO *)&mb, DIB_RGB_COLORS);
-	TkWinReleaseDrawableDC(destBitmap, hDC, &state);
-    }
-    if (!result) {
-#if WINDEBUG
-	PurifyPrintf("can't setDIBits: %s\n", Blt_LastError());
-#endif
-	destBitmap = None;
-    }
-    if (destBits != NULL) {
-         Blt_Free(destBits);
-    }
-    if (srcBits != NULL) {
-         Blt_Free(srcBits);
-    }
-    return destBitmap;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PaintPictureWithBlend --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    int width, int height,	/* Dimension of the drawable. */
-    Region2d *regionPtr)	/* Area to be snapped. */
-{
-    void *data;
-    BITMAPINFO bmi;
-    DIBSECTION ds;
-    HBITMAP hBitmap, oldBitmap;
-    HDC memDC;
-    unsigned char *bits;
-    unsigned char *srcPtr;
-    HDC hDC;
-    TkWinDCState state;
-    Blt_Pixel *destRowPtr;
-    Pict *destPtr;
-    int x, y;
-
-    if (regionPtr == NULL) {
-	regionPtr = Blt_SetRegion(0, 0, PictureWidth(pict), 
-		PictureHeight(pict), &region);
-    }
-    if (regionPtr->left < 0) {
-	regionPtr->left = 0;
-    }
-    if (regionPtr->right >= destWidth) {
-	regionPtr->right = destWidth - 1;
-    }
-    if (regionPtr->top < 0) {
-	regionPtr->top = 0;
-    }
-    if (regionPtr->bottom >= destHeight) {
-	regionPtr->bottom = destHeight - 1;
-    }
-    width = RegionWidth(regionPtr);
-    height = RegionHeight(regionPtr);
-
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-
-    /* Create the intermediate drawing surface at window resolution. */
-    ZeroMemory(&bmi, sizeof(bmi));
-    bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    bmi.bmiHeader.biWidth = width;
-    bmi.bmiHeader.biHeight = height;
-    bmi.bmiHeader.biPlanes = 1;
-    bmi.bmiHeader.biBitCount = 32;
-    bmi.bmiHeader.biCompression = BI_RGB;
-    hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &data, NULL, 0);
-    memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, hBitmap);
-
-#ifdef notdef
-    if (GetDeviceCaps(hDC, RASTERCAPS) & RC_PALETTE) {
-	TkWinColormap *cmap;
-
-	cmap = (TkWinColormap *)painterPtr->colormap;
-	SelectPalette(hDC, cmap->palette, FALSE);
-	RealizePalette(hDC);
-	SelectPalette(memDC, cmap->palette, FALSE);
-	RealizePalette(memDC);
-    }
-#endif
-    pict = NULL;
-    /* Copy the window contents to the memory surface. */
-    if (!BitBlt(memDC, 0, 0, width, height, hDC, regionPtr->left, 
-	regionPtr->top, SRCCOPY)) {
-#ifdef notdef
-	PurifyPrintf("can't blit: %s\n", Blt_LastError());
-#endif
-	goto done;
-    }
-    if (GetObject(hBitmap, sizeof(DIBSECTION), &ds) == 0) {
-#ifdef notdef
-	PurifyPrintf("can't get object: %s\n", Blt_LastError());
-#endif
-	goto done;
-    }
-    bits = (unsigned char *)ds.dsBm.bmBits;
-    destPtr = Blt_CreatePicture(width, height);
-    destRowPtr = destPtr->bits;
-
-    /* 
-     * Copy the DIB RGB data into the picture. The DIB scanlines
-     * are stored bottom-to-top and the order of the RGBA color
-     * components is BGRA. Who says Win32 GDI programming isn't
-     * backwards?  
-     */
-    for (y = height - 1; y >= 0; y--) {
-	unsigned char *sp;
-	Blt_Pixel *dp;
-
-	sp = bits + (y * ds.dsBm.bmWidthBytes);
-	dp = destRowPtr;
-	for (dp = destRowPtr, dend = dp + destPtr->width; dp < dend, dp++) {
-	    if (dp->Alpha > 0) {
-		/* Blend picture with background. */
-		dp->Blue = *sp++;
-		dp->Green = *sp++;
-		dp->Red = *sp++;
-		dp->Alpha = ALPHA_OPAQUE;
-		sp++;
-	    }
-	}
-	destRowPtr += destPtr->pixelsPerRow;
-    }
-  done:
-    DeleteBitmap(SelectBitmap(memDC, oldBitmap));
-    DeleteDC(memDC);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-    return pict;
-}
-#endif
-
-#ifdef HAVE_IJL_H
-
-#include <ijl.h>
-
-Blt_Picture
-Blt_JPEGToPicture(interp, fileName)
-    Tcl_Interp *interp;
-    char *fileName;
-{
-    JPEG_CORE_PROPERTIES jpgProps;
-    Blt_Picture pict;
-
-    ZeroMemory(&jpgProps, sizeof(JPEG_CORE_PROPERTIES));
-    if(ijlInit(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't initialize Intel JPEG library",
-			 (char *)NULL);
-	return NULL;
-    }
-    jpgProps.JPGFile = fileName;
-    if (ijlRead(&jpgProps, IJL_JFILE_READPARAMS) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read JPEG file header from \"",
-			 fileName, "\" file.", (char *)NULL);
-	goto error;
-    }
-
-    // !dudnik: to fix bug case 584680, [OT:287A305B]
-    // Set the JPG color space ... this will always be
-    // somewhat of an educated guess at best because JPEG
-    // is "color blind" (i.e., nothing in the bit stream
-    // tells you what color space the data was encoded from).
-    // However, in this example we assume that we are
-    // reading JFIF files which means that 3 channel images
-    // are in the YCbCr color space and 1 channel images are
-    // in the Y color space.
-    switch(jpgProps.JPGChannels) {
-    case 1:
-	jpgProps.JPGColor = IJL_G;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-	
-    case 3:
-	jpgProps.JPGColor = IJL_YCBCR;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    case 4:
-	jpgProps.JPGColor = IJL_YCBCRA_FPX;
-	jpgProps.DIBChannels = 4;
-	jpgProps.DIBColor = IJL_RGBA_FPX;
-	break;
-
-    default:
-	/* This catches everything else, but no color twist will be
-           performed by the IJL. */
-	jpgProps.DIBColor = (IJL_COLOR)IJL_OTHER;
- 	jpgProps.JPGColor = (IJL_COLOR)IJL_OTHER;
-	jpgProps.DIBChannels = jpgProps.JPGChannels;
-	break;
-    }
-
-    jpgProps.DIBWidth    = jpgProps.JPGWidth;
-    jpgProps.DIBHeight   = jpgProps.JPGHeight;
-    jpgProps.DIBPadBytes = IJL_DIB_PAD_BYTES(jpgProps.DIBWidth, 
-					     jpgProps.DIBChannels);
-
-    pict = Blt_CreatePicture(jpgProps.JPGWidth, jpgProps.JPGHeight);
-
-    jpgProps.DIBBytes = (BYTE *)Blt_PictureBits(pict);
-    if (ijlRead(&jpgProps, IJL_JFILE_READWHOLEIMAGE) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't read image data from \"", fileName,
-		 "\"", (char *)NULL);
-	goto error;
-    }
-    if (ijlFree(&jpgProps) != IJL_OK) {
-	Tcl_AppendResult(interp, "can't free Intel(R) JPEG library.", 
-			 (char *)NULL);
-    }
-    return pict;
-
- error:
-    ijlFree(&jpgProps);
-    if (pict != NULL) {
-	Blt_FreePicture(pict);
-    }
-    ijlFree(&jpgProps);
-    return NULL;
-} 
-
-#endif /* HAVE_IJL_H */
diff --git a/blt3.0/src/bltWinConfig.h b/blt3.0/src/bltWinConfig.h
deleted file mode 100644
index 2a02fdb..0000000
--- a/blt3.0/src/bltWinConfig.h
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifndef _BLT_WIN_CONFIG_H
-#define _BLT_WIN_CONFIG_H
-/* src/bltConfig.h.  Generated automatically by configure.  */
-/* src/bltConfig.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#define pid_t int
-#endif /* _MSC_VER || __BORLANDC__ */
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define if you have the ANSI C header files.  */
-#define STDC_HEADERS	1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#undef TIME_WITH_SYS_TIME
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN	
-
-/* Define if DBL_EPSILON is not defined in float.h */
-#undef BLT_DBL_EPSILON
-
-/* Define if drand48 is declared in math.h. */
-#define HAVE_DECL_DRAND48	0
-
-/* Define if srand48 is declared in math.h. */
-#define HAVE_DECL_SRAND48	0
-
-/* Define if j1 is declared in a standard header file. */
-#define HAVE_DECL_J1		0
-
-/* Define if union wait type is defined incorrectly.  */
-#undef HAVE_UNION_WAIT
-
-/* Define if isfinite is found in libm.  */
-#undef HAVE_ISFINITE
-
-/* The number of bytes in a long.  */
-#define SIZEOF_LONG		4
-
-/* The number of bytes in a long long.  */
-#define SIZEOF_LONG_LONG	8
-
-/* The number of bytes in a void *.  */
-#define SIZEOF_VOID_P		4
-
-/* Define if you have the XExtendedMaxRequestSize function.  */
-#undef HAVE_XEXTENDEDMAXREQUESTSIZE
-
-/* Define if you have the drand48 function.  */
-#define HAVE_DRAND48		1
-
-/* Define if you have the finite function.  */
-#undef HAVE_FINITE
-
-/* Define if you have the srand48 function.  */
-#define HAVE_SRAND48		1
-
-/* Define if you have the strdup function.  */
-#define HAVE_STRDUP		1
-
-#ifndef __BORLANDC__
-/* Define if you have the strcasecmp function.  */
-#define HAVE_STRCASECMP		1
-
-/* Define if you have the strncasecmp function.  */
-#define HAVE_STRNCASECMP		1
-#endif
-
-/* Define if you have the <ctype.h> header file.  */
-#define HAVE_CTYPE_H		1
-
-/* Define if you have the <errno.h> header file.  */
-#define HAVE_ERRNO_H		1
-
-/* Define if you have the <float.h> header file.  */
-#define HAVE_FLOAT_H		1
-
-/* Define if you have the <ieeefp.h> header file.  */
-#undef HAVE_IEEEFP_H
-
-/* Define if you have the <jpeglib.h> header file.  */
-/* Defined in Makefile */
-/* #undef HAVE_JPEGLIB_H */
-
-/* Define if you have the <limits.h> header file.  */
-#define HAVE_LIMITS_H		1
-
-/* Define if you have the <malloc.h> header file.  */
-#define HAVE_MALLOC_H		1
-
-/* Define if you have the <math.h> header file.  */
-#define HAVE_MATH_H		1
-
-/* Define if you have the <memory.h> header file.  */
-#define HAVE_MEMORY_H		1
-
-/* Define if you have the <setjmp.h> header file.  */
-#define HAVE_SETJMP_H		1
-
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H		1
-
-/* Define if you have the <string.h> header file.  */
-#define HAVE_STRING_H		1
-
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H		
-
-/* Define if you have the <sys/wait.h> header file.  */
-#undef HAVE_SYS_WAIT_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <waitflags.h> header file.  */
-#undef HAVE_WAITFLAGS_H
-
-/* Define if you have the m library (-lm).  */
-#define HAVE_LIBM		1
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
-
-
-#if (_MSC_VER == 1400)
-#define HAVE_SPRINTF_S
-#endif
-
-#define WIN32	1
-#endif _BLT_WIN_CONFIG_H
diff --git a/blt3.0/src/bltWinDde.c b/blt3.0/src/bltWinDde.c
deleted file mode 100644
index 6c1b1d9..0000000
--- a/blt3.0/src/bltWinDde.c
+++ /dev/null
@@ -1,1350 +0,0 @@
-
-/* 
- * bltWinDde.c --
- *
- * This file provides procedures that implement the "send" command,
- * allowing commands to be passed from interpreter to interpreter.
- *
- *	Copyright 1994-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This was copied from tclWinDde.c of the TCL library distribution.
- *
- *	Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#include "bltInt.h"
-
-#ifndef NO_DDE
-
-#include <ddeml.h>
-
-/* 
- * The following structure is used to keep track of the interpreters
- * registered by this process.
- */
-
-typedef struct RegisteredInterp {
-    struct RegisteredInterp *nextPtr;
-				/* The next interp this application knows
-				 * about. */
-    Tcl_Interp *interp;		/* The interpreter attached to this name. */
-    char name[1];		/* Interpreter's name. Malloc-ed as
-				 * part of the structure. */
-} RegisteredInterp;
-
-/*
- * Used to keep track of conversations.
- */
-
-typedef struct Conversation {
-    struct Conversation *nextPtr;
-				/* The next conversation in the list. */
-    RegisteredInterp *riPtr;	/* The info we know about the conversation. */
-    HCONV hConv;		/* The DDE handle for this conversation. */
-    Tcl_Obj *returnPackagePtr;	/* The result package for this conversation. */
-
-} Conversation;
-
-static Conversation *conversations; /* A list of conversations currently
-				     * being processed. */
-static RegisteredInterp *interps; /* List of all interpreters registered
-				   * in the current process. */
-static HSZ globalService;		
-static DWORD instance;		/* The application instance handle given
-				 * to us by DdeInitialize. */ 
-static int isServer;
-
-#define TCL_DDE_VERSION		"1.2"
-#define TCL_DDE_PACKAGE_NAME	"dde"
-#define TCL_DDE_SERVICE_NAME	"TclEval"
-
-/*
- * Forward declarations for procedures defined later in this file.
- */
-
-static Tcl_Obj *ExecuteRemoteObject(Tcl_Interp *interp, Tcl_Obj *objPtr);
-static int MakeConnection(Tcl_Interp *interp, const char *name, HCONV *convPtr);
-static HDDEDATA CALLBACK ServerProc(UINT uType, UINT uFmt, HCONV hConv, 
-	HSZ topic, HSZ item, HDDEDATA hData, DWORD dwData1, DWORD dwData2);
-
-static Tcl_ExitProc ExitProc;
-static Tcl_CmdDeleteProc DeleteProc;
-static void SetError(Tcl_Interp *interp);
-
-static Tcl_ObjCmdProc DdeObjCmd;
-
-/*
- *---------------------------------------------------------------------------
- *
- * Initialize --
- *
- *	Initialize the global DDE instance.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Registers the DDE server proc.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-Initialize(void)
-{
-    int nameFound = 0;
-
-    /*
-     * See if the application is already registered; if so, remove its
-     * current name from the registry. The deletion of the command
-     * will take care of disposing of this entry.
-     */
-
-    if (interps != NULL) {
-	nameFound = 1;
-    }
-
-    /*
-     * Make sure that the DDE server is there. This is done only once,
-     * add an exit handler tear it down.
-     */
-
-    if (instance == 0) {
-	if (instance == 0) {
-	    unsigned int flags;
-
-	    flags = (CBF_SKIP_REGISTRATIONS | CBF_SKIP_UNREGISTRATIONS | 
-		    CBF_FAIL_POKES);
-	    if (DdeInitialize(&instance, ServerProc, flags, 0) 
-		!= DMLERR_NO_ERROR) {
-		instance = 0;
-	    }
-	}
-    }
-    if ((globalService == 0) && (nameFound != 0)) {
-	if ((globalService == 0) && (nameFound != 0)) {
-	    isServer = TRUE;
-	    Tcl_CreateExitHandler(ExitProc, NULL);
-	    globalService = DdeCreateStringHandle(instance, 
-		TCL_DDE_SERVICE_NAME, 0);
-	    DdeNameService(instance, globalService, 0L, DNS_REGISTER);
-	} else {
-	    isServer = FALSE;
-	}
-    }
-}    
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetServerName --
- *
- *	This procedure is called to associate an ASCII name with a Dde
- *	server.  If the interpreter has already been named, the
- *	name replaces the old one.
- *
- * Results:
- *	The return value is the name actually given to the interp.
- *	This will normally be the same as name, but if name was already
- *	in use for a Dde Server then a name of the form "name #2" will
- *	be chosen,  with a high enough number to make the name unique.
- *
- * Side effects:
- *	Registration info is saved, thereby allowing the "send" command
- *	to be used later to invoke commands in the application.  In
- *	addition, the "send" command is created in the application's
- *	interpreter.  The registration will be removed automatically
- *	if the interpreter is deleted or the "send" command is removed.
- *
- *---------------------------------------------------------------------------
- */
-
-static const char *
-SetServerName(
-    Tcl_Interp *interp,
-    const char *name)		/* The name that will be used to
-				 * refer to the interpreter in later
-				 * "send" commands.  Must be globally
-				 * unique. */
-{
-    int suffix, offset;
-    RegisteredInterp *riPtr, *prevPtr;
-    Tcl_DString dString;
-
-    /*
-     * See if the application is already registered; if so, remove its
-     * current name from the registry. The deletion of the command
-     * will take care of disposing of this entry.
-     */
-
-    for (riPtr = interps, prevPtr = NULL; riPtr != NULL; 
-	    prevPtr = riPtr, riPtr = riPtr->nextPtr) {
-	if (riPtr->interp == interp) {
-	    if (name != NULL) {
-		if (prevPtr == NULL) {
-		    interps = interps->nextPtr;
-		} else {
-		    prevPtr->nextPtr = riPtr->nextPtr;
-		}
-		break;
-	    } else {
-		/*
-		 * the name was NULL, so the caller is asking for
-		 * the name of the current interp.
-		 */
-
-		return riPtr->name;
-	    }
-	}
-    }
-
-    if (name == NULL) {
-	/*
-	 * the name was NULL, so the caller is asking for
-	 * the name of the current interp, but it doesn't
-	 * have a name.
-	 */
-
-	return "";
-    }
-    
-    /*
-     * Pick a name to use for the application.  Use "name" if it's not
-     * already in use.  Otherwise add a suffix such as " #2", trying
-     * larger and larger numbers until we eventually find one that is
-     * unique.
-     */
-
-    suffix = 1;
-    offset = 0;
-    Tcl_DStringInit(&dString);
-
-    /*
-     * We have found a unique name. Now add it to the registry.
-     */
-
-    riPtr = Blt_AssertMalloc(sizeof(RegisteredInterp) + strlen(name));
-    riPtr->interp = interp;
-    riPtr->nextPtr = interps;
-    interps = riPtr;
-    strcpy(riPtr->name, name);
-
-    Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, riPtr, DeleteProc);
-    if (Tcl_IsSafe(interp)) {
-	Tcl_HideCommand(interp, "dde", "dde");
-    }
-    Tcl_DStringFree(&dString);
-
-    /*
-     * re-initialize with the new name
-     */
-    Initialize();
-    
-    return riPtr->name;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DeleteProc
- *
- *	This procedure is called when the command "dde" is destroyed.
- *
- * Results:
- *	none
- *
- * Side effects:
- *	The interpreter given by riPtr is unregistered.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DeleteProc(clientData)
-    ClientData clientData;	/* The interp we are deleting passed
-				 * as ClientData. */
-{
-    RegisteredInterp *riPtr = clientData;
-    RegisteredInterp *searchPtr, *prevPtr;
-
-    for (searchPtr = interps, prevPtr = NULL;
-	    (searchPtr != NULL) && (searchPtr != riPtr);
-	    prevPtr = searchPtr, searchPtr = searchPtr->nextPtr) {
-	/*
-	 * Empty loop body.
-	 */
-    }
-
-    if (searchPtr != NULL) {
-	if (prevPtr == NULL) {
-	    interps = interps->nextPtr;
-	} else {
-	    prevPtr->nextPtr = searchPtr->nextPtr;
-	}
-    }
-    Tcl_EventuallyFree(clientData, TCL_DYNAMIC);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExecuteRemoteObject --
- *
- *	Takes the package delivered by DDE and executes it in
- *	the server's interpreter.
- *
- * Results:
- *	A list Tcl_Obj * that describes what happened. The first
- *	element is the numerical return code (TCL_ERROR, etc.).
- *	The second element is the result of the script. If the
- *	return result was TCL_ERROR, then the third element
- *	will be the value of the global "errorCode", and the
- *	fourth will be the value of the global "errorInfo".
- *	The return result will have a refCount of 0.
- *
- * Side effects:
- *	A TCL script is run, which can cause all kinds of other
- *	things to happen.
- *
- *---------------------------------------------------------------------------
- */
-
-static Tcl_Obj *
-ExecuteRemoteObject(
-    Tcl_Interp *interp,		/* Remote interpreter. */
-    Tcl_Obj *objPtr)		/* The object to execute. */
-{
-    Tcl_Obj *listObjPtr;
-    int result;
-
-    result = Tcl_GlobalEval(interp, Tcl_GetString(objPtr));
-    listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-    Tcl_ListObjAppendElement(NULL, listObjPtr, Tcl_NewIntObj(result));
-    Tcl_ListObjAppendElement(NULL, listObjPtr, Tcl_GetObjResult(interp));
-    if (result == TCL_ERROR) {
-	const char *value;
-	Tcl_Obj *objPtr;
-
-	value = Tcl_GetVar2(interp, "errorCode", NULL, TCL_GLOBAL_ONLY);
-	objPtr = Tcl_NewStringObj(value, -1);
-	Tcl_ListObjAppendElement(NULL, listObjPtr, objPtr);
-	value = Tcl_GetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
-	objPtr = Tcl_NewStringObj(value, -1);
-        Tcl_ListObjAppendElement(NULL, listObjPtr, objPtr);
-    }
-    return listObjPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ServerProc --
- *
- *	Handles all transactions for this server. Can handle
- *	execute, request, and connect protocols. Dde will
- *	call this routine when a client attempts to run a dde
- *	command using this server.
- *
- * Results:
- *	A DDE Handle with the result of the dde command.
- *
- * Side effects:
- *	Depending on which command is executed, arbitrary
- *	Tcl scripts can be run.
- *
- *---------------------------------------------------------------------------
- */
-
-static HDDEDATA CALLBACK
-ServerProc (
-    UINT uType,			/* The type of DDE transaction we
-				 * are performing. */
-    UINT uFmt,			/* The format that data is sent or
-				 * received. */
-    HCONV hConv,		/* The conversation associated with the 
-				 * current transaction. */
-    HSZ topic,			/* A string handle. Transaction-type 
-				 * dependent. */
-    HSZ item,			/* A string handle. Transaction-type 
-				 * dependent. */
-    HDDEDATA hData,		/* DDE data. Transaction-type dependent. */
-    DWORD dwData1,		/* Transaction-dependent data. */
-    DWORD dwData2)		/* Transaction-dependent data. */
-{
-    Tcl_DString dString;
-    char *utilString;
-    Tcl_Obj *objPtr;
-    HDDEDATA code = NULL;
-    RegisteredInterp *riPtr;
-    Conversation *convPtr, *prevConvPtr;
-
-    switch(uType) {
-    case XTYP_CONNECT:
-	{
-	    int length;
-
-	    /*
-	     * Dde is trying to initialize a conversation with us. Check
-	     * and make sure we have a valid topic.
-	     */
-
-	    length = DdeQueryString(instance, topic, NULL, 0, 0);
-	    Tcl_DStringInit(&dString);
-	    Tcl_DStringSetLength(&dString, length);
-	    utilString = Tcl_DStringValue(&dString);
-	    DdeQueryString(instance, topic, utilString, length + 1, 
-			   CP_WINANSI);
-
-	    for (riPtr = interps; riPtr != NULL; riPtr = riPtr->nextPtr) {
-		if (strcasecmp(utilString, riPtr->name) == 0) {
-		    Tcl_DStringFree(&dString);
-		    return (HDDEDATA) TRUE;
-		}
-	    }
-
-	    Tcl_DStringFree(&dString);
-	    return (HDDEDATA) FALSE;
-	}
-    case XTYP_CONNECT_CONFIRM: 
-	{
-	    DWORD length;
-
-	    /*
-	     * Dde has decided that we can connect, so it gives us a 
-	     * conversation handle. We need to keep track of it
-	     * so we know which execution result to return in an
-	     * XTYP_REQUEST.
-	     */
-
-	    length = DdeQueryString(instance, topic, NULL, 0, 0);
-	    Tcl_DStringInit(&dString);
-	    Tcl_DStringSetLength(&dString, length);
-	    utilString = Tcl_DStringValue(&dString);
-	    DdeQueryString(instance, topic, utilString, length + 1, 
-		    CP_WINANSI);
-	    for (riPtr = interps; riPtr != NULL; riPtr = riPtr->nextPtr) {
-		if (strcasecmp(riPtr->name, utilString) == 0) {
-		    convPtr = Blt_AssertMalloc(sizeof(Conversation));
-		    convPtr->nextPtr = conversations;
-		    convPtr->returnPackagePtr = NULL;
-		    convPtr->hConv = hConv;
-		    convPtr->riPtr = riPtr;
-		    conversations = convPtr;
-		    break;
-		}
-	    }
-	    Tcl_DStringFree(&dString);
-	    return (HDDEDATA) TRUE;
-	}
-    case XTYP_DISCONNECT:
-	{
-	    /*
-	     * The client has disconnected from our server. Forget this
-	     * conversation.
-	     */
-
-	    for (convPtr = conversations, prevConvPtr = NULL;
-		    convPtr != NULL; 
-		    prevConvPtr = convPtr, convPtr = convPtr->nextPtr) {
-		if (hConv == convPtr->hConv) {
-		    if (prevConvPtr == NULL) {
-			conversations = convPtr->nextPtr;
-		    } else {
-			prevConvPtr->nextPtr = convPtr->nextPtr;
-		    }
-		    if (convPtr->returnPackagePtr != NULL) {
-			Tcl_DecrRefCount(convPtr->returnPackagePtr);
-		    }
-		    Blt_Free(convPtr);
-		    break;
-		}
-	    }
-	    return (HDDEDATA) TRUE;
-	}
-    case XTYP_REQUEST:
-	{
-	    int length;
-
-	    /*
-	     * This could be either a request for a value of a TCL variable,
-	     * or it could be the send command requesting the results of the
-	     * last execute.
-	     */
-
-	    if (uFmt != CF_TEXT) {
-		return (HDDEDATA) FALSE;
-	    }
-
-	    code = (HDDEDATA) FALSE;
-	    for (convPtr = conversations; (convPtr != NULL)
-		    && (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
-		/*
-		 * Empty loop body.
-		 */
-	    }
-
-	    if (convPtr != NULL) {
-		length = DdeQueryString(instance, item, NULL, 0, CP_WINANSI);
-		Tcl_DStringInit(&dString);
-		Tcl_DStringSetLength(&dString, length);
-		utilString = Tcl_DStringValue(&dString);
-		DdeQueryString(instance, item, utilString, length + 1, 
-			CP_WINANSI);
-		if (strcasecmp(utilString, "$TCLEVAL$EXECUTE$RESULT") == 0) {
-		    const char *value;
-
-		    value = Tcl_GetStringFromObj(convPtr->returnPackagePtr, 
-				 &length);
-		    code = DdeCreateDataHandle(instance, (char *)value, 
-			length+1, 0, item, CF_TEXT, 0);
-		} else {
-		    const char *value;
-
-		    value = Tcl_GetVar2(convPtr->riPtr->interp, utilString, 
-				NULL, TCL_GLOBAL_ONLY);
-		    if (value != NULL) {
-			length = strlen(value);
-			code = DdeCreateDataHandle(instance, (char *)value, 
-				length+1, 0, item, CF_TEXT, 0);
-		    } else {
-			code = NULL;
-		    }
-		}
-		Tcl_DStringFree(&dString);
-	    }
-	    return code;
-	}
-    case XTYP_EXECUTE: 
-	{
-	    DWORD length;
-	    /*
-	     * Execute this script. The results will be saved into
-	     * a list object which will be retreived later. See
-	     * ExecuteRemoteObject.
-	     */
-
-	    Tcl_Obj *returnPackagePtr;
-
-	    for (convPtr = conversations; (convPtr != NULL)
-		    && (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
-		/*
-		 * Empty loop body.
-		 */
-
-	    }
-
-	    if (convPtr == NULL) {
-		return (HDDEDATA) DDE_FNOTPROCESSED;
-	    }
-
-	    utilString = (char *) DdeAccessData(hData, &length);
-	    objPtr = Tcl_NewStringObj(utilString, -1);
-	    Tcl_IncrRefCount(objPtr);
-	    DdeUnaccessData(hData);
-	    if (convPtr->returnPackagePtr != NULL) {
-		Tcl_DecrRefCount(convPtr->returnPackagePtr);
-	    }
-	    convPtr->returnPackagePtr = NULL;
-	    returnPackagePtr = ExecuteRemoteObject(convPtr->riPtr->interp, 
-		objPtr);
-	    for (convPtr = conversations; (convPtr != NULL)
- 		    && (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
-		/*
-		 * Empty loop body.
-		 */
-
-	    }
-	    if (convPtr != NULL) {
-		Tcl_IncrRefCount(returnPackagePtr);
-		convPtr->returnPackagePtr = returnPackagePtr;
-	    }
-	    Tcl_DecrRefCount(objPtr);
-	    if (returnPackagePtr == NULL) {
-		return (HDDEDATA) DDE_FNOTPROCESSED;
-	    } else {
-		return (HDDEDATA) DDE_FACK;
-	    }
-	}
-    case XTYP_WILDCONNECT: 
-	{
-	    DWORD length;
-
-	    /*
-	     * Dde wants a list of services and topics that we support.
-	     */
-
-	    HSZPAIR *returnPtr;
-	    int i;
-	    int numItems;
-
-	    for (i = 0, riPtr = interps; riPtr != NULL;
-		    i++, riPtr = riPtr->nextPtr) {
-		/*
-		 * Empty loop body.
-		 */
-
-	    }
-
-	    numItems = i;
-	    code = DdeCreateDataHandle(instance, NULL, 
-		(numItems + 1) * sizeof(HSZPAIR), 0, 0, 0, 0);
-	    returnPtr = (HSZPAIR *) DdeAccessData(code, &length);
-	    for (i = 0, riPtr = interps; i < numItems; 
-		    i++, riPtr = riPtr->nextPtr) {
-		returnPtr[i].hszSvc = DdeCreateStringHandle(
-                        instance, "TclEval", CP_WINANSI);
-		returnPtr[i].hszTopic = DdeCreateStringHandle(
-                        instance, riPtr->name, CP_WINANSI);
-	    }
-	    returnPtr[i].hszSvc = NULL;
-	    returnPtr[i].hszTopic = NULL;
-	    DdeUnaccessData(code);
-	    return code;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ExitProc --
- *
- *	Gets rid of our DDE server when we go away.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The DDE server is deleted.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ExitProc(
-    ClientData clientData)	    /* Not used in this handler. */
-{
-    DdeNameService(instance, NULL, 0, DNS_UNREGISTER);
-    DdeUninitialize(instance);
-    instance = 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MakeConnection --
- *
- *	This procedure is a utility used to connect to a DDE
- *	server when given a server name and a topic name.
- *
- * Results:
- *	A standard TCL result.
- *	
- *
- * Side effects:
- *	Passes back a conversation through ddeConvPtr
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-MakeConnection(
-    Tcl_Interp *interp,		/* Used to report errors. */
-    const char *name,		/* The connection to use. */
-    HCONV *convPtr)
-{
-    HSZ topic, service;
-    HCONV conv;
-    
-    service = DdeCreateStringHandle(instance, "TclEval", 0);
-    topic = DdeCreateStringHandle(instance, name, 0);
-
-    conv = DdeConnect(instance, service, topic, NULL);
-    DdeFreeStringHandle(instance, service);
-    DdeFreeStringHandle(instance, topic);
-
-    if (conv == NULL) {
-	if (interp != NULL) {
-	    Tcl_AppendResult(interp, "no registered server named \"", name, 
-		"\"", (char *) NULL);
-	}
-	return TCL_ERROR;
-    }
-
-    *convPtr = conv;
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetError --
- *
- *	Sets the interp result to a cogent error message
- *	describing the last DDE error.
- *
- * Results:
- *	None.
- *	
- *
- * Side effects:
- *	The interp's result object is changed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-SetError(
-    Tcl_Interp *interp)	    /* The interp to put the message in.*/
-{
-    int err;
-    const char *mesg;
-
-    err = DdeGetLastError(instance);
-    switch (err) {
-	case DMLERR_DATAACKTIMEOUT:
-	case DMLERR_EXECACKTIMEOUT:
-	case DMLERR_POKEACKTIMEOUT:
-	    mesg = "remote interpreter did not respond";
-	    break;
-
-	case DMLERR_BUSY:
-	    mesg = "remote server is busy";
-	    break;
-
-	case DMLERR_NOTPROCESSED:
-	    mesg = "remote server cannot handle this command";
-	    break;
-
-	default:
-	    mesg = "dde command failed";
-	    break;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), mesg, -1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DdeObjCmd --
- *
- *	This procedure is invoked to process the "dde" TCL command.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-DdeObjCmd(
-    ClientData clientData,	/* Used only for deletion */
-    Tcl_Interp *interp,		/* The interp we are sending from */
-    int objc,			/* Number of arguments */
-    Tcl_Obj *const objv[])	/* The arguments */
-{
-    enum {
-	DDE_SERVERNAME,
-	DDE_EXECUTE,
-	DDE_POKE,
-	DDE_REQUEST,
-	DDE_SERVICES,
-	DDE_EVAL
-    };
-
-    static const char *commands[] = {
-	"servername", "execute", "poke", "request", "services", "eval", 
-	(char *) NULL
-    };
-    static const char *options[] = {
-	"-async", (char *) NULL
-    };
-    int index, argIndex;
-    int async = 0, binary = 0;
-    int result = TCL_OK;
-    HSZ service = NULL;
-    HSZ topic = NULL;
-    HSZ item = NULL;
-    HDDEDATA data = NULL;
-    HDDEDATA itemData = NULL;
-    HCONV hConv = NULL;
-    HSZ cookie = 0;
-    const char *serviceName, *topicName, *itemString, *dataString;
-    const char *string;
-    int firstArg, length, dataLength;
-    HDDEDATA code;
-    RegisteredInterp *riPtr;
-    Tcl_Interp *sendInterp;
-    Tcl_Obj *objPtr;
-
-    /*
-     * Initialize DDE server/client
-     */
-    
-    if (objc < 2) {
-	Tcl_WrongNumArgs(interp, 1, objv, 
-		"?-async? serviceName topicName value");
-	return TCL_ERROR;
-    }
-
-    if (Tcl_GetIndexFromObj(interp, objv[1], commands, "command", 0,
-	    &index) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    serviceName = NULL;		/* Suppress compiler warning. */
-    firstArg = 1;
-    switch (index) {
-    case DDE_SERVERNAME:
-	if ((objc != 3) && (objc != 2)) {
-	    Tcl_WrongNumArgs(interp, 1, objv, "servername ?serverName?");
-	    return TCL_ERROR;
-	}
-	firstArg = (objc - 1);
-	break;
-	
-    case DDE_EXECUTE:
-	if ((objc < 5) || (objc > 6)) {
-	    Tcl_WrongNumArgs(interp, 1, objv, 
-			"execute ?-async? serviceName topicName value");
-	    return TCL_ERROR;
-	}
-	if (Tcl_GetIndexFromObj(NULL, objv[2], options, "option", 0,
-				&argIndex) != TCL_OK) {
-	    if (objc != 5) {
-		Tcl_WrongNumArgs(interp, 1, objv,
-			"execute ?-async? serviceName topicName value");
-		return TCL_ERROR;
-	    }
-	    async = 0;
-	    firstArg = 2;
-	} else {
-	    if (objc != 6) {
-		Tcl_WrongNumArgs(interp, 1, objv,
-			 "execute ?-async? serviceName topicName value");
-		return TCL_ERROR;
-	    }
-	    async = 1;
-	    firstArg = 3;
-	}
-	break;
-    case DDE_POKE:
-	if (objc != 6) {
-	    Tcl_WrongNumArgs(interp, 1, objv,
-			"poke serviceName topicName item value");
-	    return TCL_ERROR;
-	}
-	firstArg = 2;
-	break;
-
-    case DDE_REQUEST:
-	if (objc != 5) {
-	    Tcl_WrongNumArgs(interp, 1, objv,
-			     "request serviceName topicName value");
-	    return TCL_ERROR;
-	}
-	binary = 0;
-	firstArg = 2;
-	break;
-
-    case DDE_SERVICES:
-	if (objc != 4) {
-	    Tcl_WrongNumArgs(interp, 1, objv,
-			     "services serviceName topicName");
-	    return TCL_ERROR;
-	}
-	firstArg = 2;
-	break;
-
-    case DDE_EVAL:
-	if (objc < 4) {
-	    Tcl_WrongNumArgs(interp, 1, objv, 
-			     "eval ?-async? serviceName args");
-	    return TCL_ERROR;
-	}
-	if (Tcl_GetIndexFromObj(NULL, objv[2], options, "option", 0,
-				&argIndex) != TCL_OK) {
-	    if (objc < 4) {
-		Tcl_WrongNumArgs(interp, 1, objv,
-				 "eval ?-async? serviceName args");
-		return TCL_ERROR;
-	    }
-	    async = 0;
-	    firstArg = 2;
-	} else {
-	    if (objc < 5) {
-		Tcl_WrongNumArgs(interp, 1, objv,
-				 "eval ?-async? serviceName args");
-		return TCL_ERROR;
-	    }
-	    async = 1;
-	    firstArg = 3;
-	}
-	break;
-    }
-
-    Initialize();
-
-    if (firstArg != 1) {
-	serviceName = Tcl_GetStringFromObj(objv[firstArg], &length);
-    } else {
-	length = 0;
-    }
-
-    if (length == 0) {
-	serviceName = NULL;
-    } else if ((index != DDE_SERVERNAME) && (index != DDE_EVAL)) {
-	service = DdeCreateStringHandle(instance, serviceName,
-		CP_WINANSI);
-    }
-
-    if ((index != DDE_SERVERNAME) && (index != DDE_EVAL)) {
-	topicName = Tcl_GetStringFromObj(objv[firstArg + 1], &length);
-	if (length == 0) {
-	    topicName = NULL;
-	} else {
-	    topic = DdeCreateStringHandle(instance, topicName, CP_WINANSI);
-	}
-    }
-
-    switch (index) {
-    case DDE_SERVERNAME: 
-	serviceName = SetServerName(interp, serviceName);
-	if (serviceName != NULL) {
-	    Tcl_SetStringObj(Tcl_GetObjResult(interp),
-			     serviceName, -1);
-	} else {
-	    Tcl_ResetResult(interp);
-	}
-	break;
-
-    case DDE_EXECUTE: 
-	{
-	    dataString = Tcl_GetStringFromObj(objv[firstArg + 2], &dataLength);
-	    if (dataLength == 0) {
-		Tcl_SetStringObj(Tcl_GetObjResult(interp),
-				 "cannot execute null data", -1);
-		result = TCL_ERROR;
-		break;
-	    }
-	    hConv = DdeConnect(instance, service, topic, NULL);
-	    DdeFreeStringHandle(instance, service);
-	    DdeFreeStringHandle(instance, topic);
-
-	    if (hConv == NULL) {
-		SetError(interp);
-		result = TCL_ERROR;
-		break;
-	    }
-
-	    data = DdeCreateDataHandle(instance, (char *)dataString, 
-		dataLength + 1, 0, 0, CF_TEXT, 0);
-	    if (data != NULL) {
-		if (async) {
-		    DWORD status;
-
-		    DdeClientTransaction((LPBYTE) data, 0xFFFFFFFF, hConv, 0, 
-			    CF_TEXT, XTYP_EXECUTE, TIMEOUT_ASYNC, &status);
-		    DdeAbandonTransaction(instance, hConv, status);
-		} else {
-		    code = DdeClientTransaction((LPBYTE) data, 0xFFFFFFFF,
-			    hConv, 0, CF_TEXT, XTYP_EXECUTE, 30000, NULL);
-		    if (code == 0) {
-			SetError(interp);
-			result = TCL_ERROR;
-		    }
-		}
-		DdeFreeDataHandle(data);
-	    } else {
-		SetError(interp);
-		result = TCL_ERROR;
-	    }
-	    break;
-	}
-    case DDE_REQUEST: 
-	{
-	    itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length);
-	    if (length == 0) {
-		Tcl_SetStringObj(Tcl_GetObjResult(interp),
-			"cannot request value of null data", -1);
-		return TCL_ERROR;
-	    }
-	    hConv = DdeConnect(instance, service, topic, NULL);
-	    DdeFreeStringHandle(instance, service);
-	    DdeFreeStringHandle(instance, topic);
-	    
-	    if (hConv == NULL) {
-		SetError(interp);
-		result = TCL_ERROR;
-	    } else {
-		item = DdeCreateStringHandle(instance, itemString, CP_WINANSI);
-		if (item != NULL) {
-		    data = DdeClientTransaction(NULL, 0, hConv, item, CF_TEXT,
-			XTYP_REQUEST, 5000, NULL);
-		    if (data == NULL) {
-			SetError(interp);
-			result = TCL_ERROR;
-		    } else {
-			Tcl_Obj *objPtr;
-			DWORD dataLength;
-
-			dataString = DdeAccessData(data, &dataLength);
-			objPtr = Tcl_NewStringObj(dataString, -1);
-			DdeUnaccessData(data);
-			DdeFreeDataHandle(data);
-			Tcl_SetObjResult(interp, objPtr);
-		    }
-		} else {
-		    SetError(interp);
-		    result = TCL_ERROR;
-		}
-	    }
-
-	    break;
-	}
-    case DDE_POKE: 
-	{
-	    itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length);
-	    if (length == 0) {
-		Tcl_SetStringObj(Tcl_GetObjResult(interp),
-			"cannot have a null item", -1);
-		return TCL_ERROR;
-	    }
-	    dataString = Tcl_GetStringFromObj(objv[firstArg + 3], &length);
-	    
-	    hConv = DdeConnect(instance, service, topic, NULL);
-	    DdeFreeStringHandle(instance, service);
-	    DdeFreeStringHandle(instance, topic);
-
-	    if (hConv == NULL) {
-		SetError(interp);
-		result = TCL_ERROR;
-	    } else {
-		item = DdeCreateStringHandle(instance, itemString,
-			CP_WINANSI);
-		if (item != NULL) {
-		    data = DdeClientTransaction((char *)dataString, length+1,
-			    hConv, item, CF_TEXT, XTYP_POKE, 5000, NULL);
-		    if (data == NULL) {
-			SetError(interp);
-			result = TCL_ERROR;
-		    }
-		} else {
-		    SetError(interp);
-		    result = TCL_ERROR;
-		}
-	    }
-	    break;
-	}
-
-    case DDE_SERVICES: 
-	{
-	    HCONVLIST hConvList;
-	    CONVINFO convInfo;
-	    Tcl_Obj *convListObjPtr, *elementObjPtr;
-	    Tcl_DString dString;
-	    const char *name;
-	    
-	    convInfo.cb = sizeof(CONVINFO);
-	    hConvList = DdeConnectList(instance, service, 
-                    topic, 0, NULL);
-	    DdeFreeStringHandle(instance, service);
-	    DdeFreeStringHandle(instance, topic);
-	    hConv = 0;
-	    convListObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-	    Tcl_DStringInit(&dString);
-
-	    while (hConv = DdeQueryNextServer(hConvList, hConv), hConv != 0) {
-		elementObjPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
-		DdeQueryConvInfo(hConv, QID_SYNC, &convInfo);
-		length = DdeQueryString(instance, 
-                        convInfo.hszSvcPartner, NULL, 0, CP_WINANSI);
-		Tcl_DStringSetLength(&dString, length);
-		name = Tcl_DStringValue(&dString);
-		DdeQueryString(instance, convInfo.hszSvcPartner, (char *)name, 
-			length + 1, CP_WINANSI);
-		Tcl_ListObjAppendElement(interp, elementObjPtr,
-			Tcl_NewStringObj(name, length));
-		length = DdeQueryString(instance, convInfo.hszTopic,
-			NULL, 0, CP_WINANSI);
-		Tcl_DStringSetLength(&dString, length);
-		name = Tcl_DStringValue(&dString);
-		DdeQueryString(instance, convInfo.hszTopic, (char *)name,
-			length + 1, CP_WINANSI);
-		Tcl_ListObjAppendElement(interp, elementObjPtr,
-			Tcl_NewStringObj(name, length));
-		Tcl_ListObjAppendElement(interp, convListObjPtr,
-			elementObjPtr);
-	    }
-	    DdeDisconnectList(hConvList);
-	    Tcl_SetObjResult(interp, convListObjPtr);
-	    Tcl_DStringFree(&dString);
-	    break;
-	}
-    case DDE_EVAL: 
-	{
-	    objc -= (async + 3);
-	    objv += (async + 3);
-
-            /*
-	     * See if the target interpreter is local.  If so, execute
-	     * the command directly without going through the DDE
-	     * server.  Don't exchange objects between interps.  The
-	     * target interp could compile an object, producing a
-	     * bytecode structure that refers to other objects owned
-	     * by the target interp.  If the target interp is then
-	     * deleted, the bytecode structure would be referring to
-	     * deallocated objects.
-	     */
-	    
-	    for (riPtr = interps; riPtr != NULL;
-		 riPtr = riPtr->nextPtr) {
-		if (strcasecmp(serviceName, riPtr->name) == 0) {
-		    break;
-		}
-	    }
-
-	    if (riPtr != NULL) {
-		/*
-		 * This command is to a local interp. No need to go through
-		 * the server.
-		 */
-		
-		Tcl_Preserve(riPtr);
-		sendInterp = riPtr->interp;
-		Tcl_Preserve(sendInterp);
-		
-		/*
-		 * Don't exchange objects between interps.  The target interp
-		 * would compile an object, producing a bytecode structure that
-		 * refers to other objects owned by the target interp.  If the
-		 * target interp is then deleted, the bytecode structure would
-		 * be referring to deallocated objects.
-		 */
-
-		if (objc == 1) {
-		    result = Tcl_GlobalEval(sendInterp,Tcl_GetString(objv[0]));
-		} else {
-		    objPtr = Tcl_ConcatObj(objc, objv);
-		    Tcl_IncrRefCount(objPtr);
-		    result = Tcl_GlobalEval(sendInterp, Tcl_GetString(objPtr));
-		    Tcl_DecrRefCount(objPtr);
-		}
-		if (interp != sendInterp) {
-		    if (result == TCL_ERROR) {
-			const char *value;
-			/*
-			 * An error occurred, so transfer error information
-			 * from the destination interpreter back to our
-			 * interpreter.
-			 */
-			
-			Tcl_ResetResult(interp);
-			value = Tcl_GetVar2(sendInterp, "errorInfo", NULL, 
-				TCL_GLOBAL_ONLY);
-			Tcl_AddObjErrorInfo(interp, value, length);
-			
-			value = Tcl_GetVar2(sendInterp, "errorCode", NULL,
-				TCL_GLOBAL_ONLY);
-			Tcl_SetErrorCode(interp, value, (char *)NULL);
-		    }
-		    Tcl_SetObjResult(interp, Tcl_GetObjResult(sendInterp));
-		}
-		Tcl_Release(riPtr);
-		Tcl_Release(sendInterp);
-	    } else {
-		/*
-		 * This is a non-local request. Send the script to the server
-		 * and poll it for a result.
-		 */
-		
-		if (MakeConnection(interp, serviceName, &hConv) != TCL_OK) {
-		    goto error;
-		}
-		
-		objPtr = Tcl_ConcatObj(objc, objv);
-		string = Tcl_GetStringFromObj(objPtr, &length);
-		itemData = DdeCreateDataHandle(instance, (char *)string,
-			length+1, 0, 0, CF_TEXT, 0);
-		
-		if (async) {
-		    DWORD status;
-
-		    data = DdeClientTransaction((LPBYTE) itemData, 0xFFFFFFFF,
-			hConv, 0, CF_TEXT, XTYP_EXECUTE, TIMEOUT_ASYNC,
-			&status);
-		    DdeAbandonTransaction(instance, hConv, status);
-		} else {
-		    data = DdeClientTransaction((LPBYTE) itemData,
-			    0xFFFFFFFF, hConv, 0,
-			    CF_TEXT, XTYP_EXECUTE, 30000, NULL);
-		    if (data != 0) {
-			
-			cookie = DdeCreateStringHandle(instance, 
-				"$TCLEVAL$EXECUTE$RESULT", CP_WINANSI);
-			data = DdeClientTransaction(NULL, 0, hConv,
-				cookie, CF_TEXT, XTYP_REQUEST, 30000, NULL);
-		    }
-		}
-
-		Tcl_DecrRefCount(objPtr);
-		
-		if (data == 0) {
-		    SetError(interp);
-		    goto errorNoResult;
-		}
-		
-		if (async == 0) {
-		    Tcl_Obj *resultPtr;
-		    
-		    /*
-		     * The return handle has a two or four element list in
-		     * it. The first element is the return code (TCL_OK,
-		     * TCL_ERROR, etc.). The second is the result of the
-		     * script. If the return code is TCL_ERROR, then the third
-		     * element is the value of the variable "errorCode", and
-		     * the fourth is the value of the variable "errorInfo".
-		     */
-		    
-		    resultPtr = Tcl_NewObj();
-		    length = DdeGetData(data, NULL, 0, 0);
-		    Tcl_SetObjLength(resultPtr, length);
-		    string = Tcl_GetStringFromObj(resultPtr, length);
-		    DdeGetData(data, (char *)string, length, 0);
-		    Tcl_SetObjLength(resultPtr, strlen(string));
-		    
-		    if (Tcl_ListObjIndex(NULL, resultPtr, 0, &objPtr)
-			    != TCL_OK) {
-			Tcl_DecrRefCount(resultPtr);
-			goto error;
-		    }
-		    if (Tcl_GetIntFromObj(NULL, objPtr, &result) != TCL_OK) {
-			Tcl_DecrRefCount(resultPtr);
-			goto error;
-		    }
-		    if (result == TCL_ERROR) {
-			Tcl_ResetResult(interp);
-
-			if (Tcl_ListObjIndex(NULL, resultPtr, 3, &objPtr)
-				!= TCL_OK) {
-			    Tcl_DecrRefCount(resultPtr);
-			    goto error;
-			}
-			length = -1;
-			string = Tcl_GetStringFromObj(objPtr, &length);
-			Tcl_AddObjErrorInfo(interp, string, length);
-			
-			Tcl_ListObjIndex(NULL, resultPtr, 2, &objPtr);
-			Tcl_SetObjErrorCode(interp, objPtr);
-		    }
-		    if (Tcl_ListObjIndex(NULL, resultPtr, 1, &objPtr)
-			    != TCL_OK) {
-			Tcl_DecrRefCount(resultPtr);
-			goto error;
-		    }
-		    Tcl_SetObjResult(interp, objPtr);
-		    Tcl_DecrRefCount(resultPtr);
-		}
-	    }
-	}
-    }
-    if (cookie != NULL) {
-	DdeFreeStringHandle(instance, cookie);
-    }
-    if (item != NULL) {
-	DdeFreeStringHandle(instance, item);
-    }
-    if (itemData != NULL) {
-	DdeFreeDataHandle(itemData);
-    }
-    if (data != NULL) {
-	DdeFreeDataHandle(data);
-    }
-    if (hConv != NULL) {
-	DdeDisconnect(hConv);
-    }
-    return result;
-
-    error:
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), 
-	     "invalid data returned from server", -1);
-
-    errorNoResult:
-    if (cookie != NULL) {
-	DdeFreeStringHandle(instance, cookie);
-    }
-    if (item != NULL) {
-	DdeFreeStringHandle(instance, item);
-    }
-    if (itemData != NULL) {
-	DdeFreeDataHandle(itemData);
-    }
-    if (data != NULL) {
-	DdeFreeDataHandle(data);
-    }
-    if (hConv != NULL) {
-	DdeDisconnect(hConv);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DdeCmdInitProc --
- *
- *	This procedure initializes the dde command.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_DdeCmdInitProc(interp)
-    Tcl_Interp *interp;
-{
-    Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, NULL, NULL);
-    conversations = NULL;
-    interps = NULL;
-    Tcl_CreateExitHandler(ExitProc, NULL);
-    return Tcl_PkgProvide(interp, TCL_DDE_PACKAGE_NAME, TCL_DDE_VERSION);
-}
-
-#endif /* NO_DDE */
diff --git a/blt3.0/src/bltWinDll.c b/blt3.0/src/bltWinDll.c
deleted file mode 100644
index 45608d5..0000000
--- a/blt3.0/src/bltWinDll.c
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/*
- * bltWinDll.c --
- *
- * This module initials the non-Tk command of the BLT toolkit,
- * registering the commands with the TCL interpreter.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifdef WIN32
-/*
- *---------------------------------------------------------------------------
- *
- * DllMain --
- *
- *	This wrapper function is used by Windows to invoke the
- *	initialization code for the DLL.
- *
- * Results:
- *	Returns TRUE;
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-BOOL APIENTRY
-DllMain(
-    HINSTANCE hInst,		/* Library instance handle. */
-    DWORD reason,		/* Reason this function is being called. */
-    LPVOID reserved)		/* Not used. */
-{
-    return TRUE;
-}
-
-BOOL APIENTRY
-DllEntryPoint(hInst, reason, reserved)
-    HINSTANCE hInst;            /* Library instance handle. */
-    DWORD reason;               /* Reason this function is being called. */
-    LPVOID reserved;            /* Not used. */
-{
-    return DllMain(hInst, reason, reserved);
-}
-#endif /* WIN32 */
-
diff --git a/blt3.0/src/bltWinDraw.c b/blt3.0/src/bltWinDraw.c
deleted file mode 100644
index 5ea7026..0000000
--- a/blt3.0/src/bltWinDraw.c
+++ /dev/null
@@ -1,2928 +0,0 @@
-
-/*
- * bltWinDraw.c --
- *
- * This module contains WIN32 routines not included in the Tcl/Tk
- * libraries.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <bltInt.h>
-#include <X11/Xutil.h>
-#include <X11/Xlib.h>
-#include <bltFont.h>
-#include <bltText.h>
-#include "tkDisplay.h"
-#include "tkFont.h"
-#include "tkIntBorder.h"
-
-#define WINDEBUG 0
-
-/*
- * Data structure for setting graphics context.
- */
-typedef struct {
-    int function;		/* logical operation */
-    unsigned long plane_mask;	/* plane mask */
-    unsigned long foreground;	/* foreground pixel */
-    unsigned long background;	/* background pixel */
-    int line_width;		/* line width */
-    int line_style;		/* LineSolid, LineOnOffDash, LineDoubleDash */
-    int cap_style;		/* CapNotLast, CapButt,
-				   CapRound, CapProjecting */
-    int join_style;		/* JoinMiter, JoinRound, JoinBevel */
-    int fill_style;		/* FillSolid, FillTiled,
-				   FillStippled, FillOpaeueStippled */
-    int fill_rule;		/* EvenOddRule, WindingRule */
-    int arc_mode;		/* ArcChord, ArcPieSlice */
-    Pixmap tile;		/* tile pixmap for tiling operations */
-    Pixmap stipple;		/* stipple 1 plane pixmap for stipping */
-    int ts_x_origin;		/* offset for tile or stipple operations */
-    int ts_y_origin;
-    Font font;			/* default text font for text operations */
-    int subwindow_mode;		/* ClipByChildren, IncludeInferiors */
-    Bool graphics_exposures;	/* boolean, should exposures be generated */
-    int clip_x_origin;		/* origin for clipping */
-    int clip_y_origin;
-    Pixmap clip_mask;		/* bitmap clipping; other calls for rects */
-    int dash_offset;		/* patterned/dashed line information */
-    char dashes;		/* If -1, indicates that the extended
-				 * information below is available. */
-    int nDashValues;
-    char dashValues[12];
-} XGCValuesEx;
-
-static int tkpWinRopModes[] =
-{
-    R2_BLACK,			/* GXclear */
-    R2_MASKPEN,			/* GXand */
-    R2_MASKPENNOT,		/* GXandReverse */
-    R2_COPYPEN,			/* GXcopy */
-    R2_MASKNOTPEN,		/* GXandInverted */
-    R2_NOT,			/* GXnoop */
-    R2_XORPEN,			/* GXxor */
-    R2_MERGEPEN,		/* GXor */
-    R2_NOTMERGEPEN,		/* GXnor */
-    R2_NOTXORPEN,		/* GXequiv */
-    R2_NOT,			/* GXinvert */
-    R2_MERGEPENNOT,		/* GXorReverse */
-    R2_NOTCOPYPEN,		/* GXcopyInverted */
-    R2_MERGENOTPEN,		/* GXorInverted */
-    R2_NOTMASKPEN,		/* GXnand */
-    R2_WHITE			/* GXset */
-};
-
-#define MASKPAT		0x00E20746 /* dest = (src & pat) | (!src & dst) */
-#define COPYFG		0x00CA0749 /* dest = (pat & src) | (!pat & dst) */
-#define COPYBG		0x00AC0744 /* dest = (!pat & src) | (pat & dst) */
-/*
- * Translation table between X gc functions and Win32 BitBlt op modes.  Some
- * of the operations defined in X don't have names, so we have to construct
- * new opcodes for those functions.  This is arcane and probably not all that
- * useful, but at least it's accurate.
- */
-
-#define NOTSRCAND	(DWORD)0x00220326 /* dest = (NOT src) AND dest */
-#define NOTSRCINVERT	(DWORD)0x00990066 /* dest = (NOT src) XOR dest */
-#define SRCORREVERSE	(DWORD)0x00DD0228 /* dest = src OR (NOT dest) */
-#define SRCNAND		(DWORD)0x007700E6 /* dest = NOT (src AND dest) */
-
-static int bltModes[] =
-{
-    BLACKNESS,			/* GXclear */
-    SRCAND,			/* GXand */
-    SRCERASE,			/* GXandReverse */
-    SRCCOPY,			/* GXcopy */
-    NOTSRCAND,			/* GXandInverted */
-    PATCOPY,			/* GXnoop */
-    SRCINVERT,			/* GXxor */
-    SRCPAINT,			/* GXor */
-    NOTSRCERASE,		/* GXnor */
-    NOTSRCINVERT,		/* GXequiv */
-    DSTINVERT,			/* GXinvert */
-    SRCORREVERSE,		/* GXorReverse */
-    NOTSRCCOPY,			/* GXcopyInverted */
-    MERGEPAINT,			/* GXorInverted */
-    SRCNAND,			/* GXnand */
-    WHITENESS			/* GXset */
-};
-
-#if (_TCL_VERSION <  _VERSION(8,1,0)) 
-typedef void *Tcl_Encoding;	/* Make up dummy type for encoding.  */
-#else 
-static Tcl_Encoding systemEncoding = NULL;
-#endif
-
-HPALETTE
-Blt_GetSystemPalette(void)
-{
-    HDC hDC;
-    HPALETTE hPalette;
-    DWORD flags;
-
-    hPalette = NULL;
-    hDC = GetDC(NULL);		/* Get the desktop device context */
-    flags = GetDeviceCaps(hDC, RASTERCAPS);
-    if (flags & RC_PALETTE) {
-	LOGPALETTE *palettePtr;
-
-	palettePtr = (LOGPALETTE *)
-	    GlobalAlloc(GPTR, sizeof(LOGPALETTE) + 256 * sizeof(PALETTEENTRY));
-	palettePtr->palVersion = 0x300;
-	palettePtr->palNumEntries = 256;
-	GetSystemPaletteEntries(hDC, 0, 256, palettePtr->palPalEntry);
-	hPalette = CreatePalette(palettePtr);
-	GlobalFree(palettePtr);
-    }
-    ReleaseDC(NULL, hDC);
-    return hPalette;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateRotatedFont --
- *
- *	Creates a rotated copy of the given font.  This only works 
- *	for TrueType fonts.
- *
- * Results:
- *	Returns the newly create font or NULL if the font could not
- *	be created.
- *
- *---------------------------------------------------------------------------
- */
-static HFONT
-CreateRotatedFont(
-    unsigned long fontId,	/* Font identifier (actually a Tk_Font) */
-    float angle)
-{				/* Number of degrees to rotate font */
-    TkFontAttributes *faPtr;	/* Set of attributes to match. */
-    TkFont *fontPtr;
-    HFONT hFont;
-    LOGFONTW lf;
-
-    fontPtr = (TkFont *) fontId;
-    faPtr = &fontPtr->fa;
-    ZeroMemory(&lf, sizeof(LOGFONT));
-    lf.lfHeight = -faPtr->size;
-    if (lf.lfHeight < 0) {
-	HDC dc;
-
-	dc = GetDC(NULL);
-	lf.lfHeight = -MulDiv(faPtr->size, GetDeviceCaps(dc, LOGPIXELSY), 72);
-	ReleaseDC(NULL, dc);
-    }
-    lf.lfWidth = 0;
-    lf.lfEscapement = lf.lfOrientation = ROUND(angle * 10.0);
-#define TK_FW_NORMAL	0
-    lf.lfWeight = (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD;
-    lf.lfItalic = faPtr->slant;
-    lf.lfUnderline = faPtr->underline;
-    lf.lfStrikeOut = faPtr->overstrike;
-    lf.lfCharSet = DEFAULT_CHARSET;
-    lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;
-    lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
-    lf.lfQuality = DEFAULT_QUALITY;
-    lf.lfQuality = ANTIALIASED_QUALITY;
-    lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
-
-    hFont = NULL;
-    if (faPtr->family == NULL) {
-	lf.lfFaceName[0] = '\0';
-    } else {
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-	Tcl_DString dString;
-
-	Tcl_UtfToExternalDString(systemEncoding, faPtr->family, -1, &dString);
-
-	if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	    Tcl_UniChar *src, *dst;
-	    
-	    /*
-	     * We can only store up to LF_FACESIZE wide characters
-	     */
-	    if (Tcl_DStringLength(&dString) >= (LF_FACESIZE * sizeof(WCHAR))) {
-		Tcl_DStringSetLength(&dString, LF_FACESIZE);
-	    }
-	    src = (Tcl_UniChar *)Tcl_DStringValue(&dString);
-	    dst = (Tcl_UniChar *)lf.lfFaceName;
-	    while (*src != '\0') {
-		*dst++ = *src++;
-	    }
-	    *dst = '\0';
-	    hFont = CreateFontIndirectW((LOGFONTW *)&lf);
-	} else {
-	    /*
-	     * We can only store up to LF_FACESIZE characters
-	     */
-	    if (Tcl_DStringLength(&dString) >= LF_FACESIZE) {
-		Tcl_DStringSetLength(&dString, LF_FACESIZE);
-	    }
-	    strcpy((char *)lf.lfFaceName, Tcl_DStringValue(&dString));
-	    hFont = CreateFontIndirectA((LOGFONTA *)&lf);
-	}
-	Tcl_DStringFree(&dString);
-#else
-	strncpy((char *)lf.lfFaceName, faPtr->family, LF_FACESIZE - 1);
-	lf.lfFaceName[LF_FACESIZE] = '\0';
-#endif /* _TCL_VERSION >= 8.1.0 */
-    }
-
-    if (hFont == NULL) {
-#if WINDEBUG
-	PurifyPrintf("can't create font: %s\n", Blt_LastError());
-#endif
-    } else { 
-	HFONT oldFont;
-	TEXTMETRIC tm;
-	HDC hRefDC;
-	int result;
-
-	/* Check if the rotated font is really a TrueType font. */
-
-	hRefDC = GetDC(NULL);		/* Get the desktop device context */
-	oldFont = SelectFont(hRefDC, hFont);
-	result = ((GetTextMetrics(hRefDC, &tm)) && 
-		  (tm.tmPitchAndFamily & TMPF_TRUETYPE));
-	SelectFont(hRefDC, oldFont);
-	ReleaseDC(NULL, hRefDC);
-	if (!result) {
-#if WINDEBUG
-	    PurifyPrintf("not a true type font\n");
-#endif
-	    DeleteFont(hFont);
-	    return NULL;
-	}
-    }
-    return hFont;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetBitmapData --
- *
- *	Returns the DIB bits from a bitmap.
- *
- * Results:
- *	Returns a byte array of bitmap data or NULL if an error
- *	occurred.  The parameter pitchPtr returns the number
- *	of bytes per row.
- *
- *---------------------------------------------------------------------------
- */
-unsigned char *
-Blt_GetBitmapData(
-    Display *display,		/* Display of bitmap */
-    Pixmap bitmap,		/* Bitmap to query */
-    int width,			/* Width of bitmap */
-    int height,			/* Height of bitmap */
-    int *pitchPtr)		/* (out) Number of bytes per row */
-{			
-    TkWinDCState state;
-    HDC hDC;
-    int result;
-    unsigned char *bits;
-    unsigned int size;
-    HBITMAP hBitmap;
-    BITMAPINFOHEADER *bmihPtr;
-    HANDLE hMem, hMem2;
-    int bytesPerRow, imageSize;
-
-    size = sizeof(BITMAPINFOHEADER) + 2 * sizeof(RGBQUAD);
-    hMem = GlobalAlloc(GHND, size);
-    bmihPtr = (BITMAPINFOHEADER *)GlobalLock(hMem);
-    bmihPtr->biSize = sizeof(BITMAPINFOHEADER);
-    bmihPtr->biPlanes = 1;
-    bmihPtr->biBitCount = 1;
-    bmihPtr->biCompression = BI_RGB;
-    bmihPtr->biWidth = width;
-    bmihPtr->biHeight = height;
-
-    hBitmap = ((TkWinDrawable *)bitmap)->bitmap.handle;
-    hDC = TkWinGetDrawableDC(display, bitmap, &state);
-    result = GetDIBits(hDC, hBitmap, 0, height, (LPVOID)NULL, 
-	(BITMAPINFO *)bmihPtr, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(bitmap, hDC, &state);
-    if (!result) {
-	GlobalUnlock(hMem);
-	GlobalFree(hMem);
-	return NULL;
-    }
-    imageSize = bmihPtr->biSizeImage;
-    GlobalUnlock(hMem);
-    bytesPerRow = ((width + 31) & ~31) / 8;
-    if (imageSize == 0) {
-         imageSize = bytesPerRow * height;
-    }	
-    hMem2 = GlobalReAlloc(hMem, size + imageSize, 0);
-    if (hMem2 == NULL) {
-	GlobalFree(hMem);
-        return NULL;
-    }
-    hMem = hMem2;
-    bmihPtr = (BITMAPINFOHEADER *)GlobalLock(hMem);
-    hDC = TkWinGetDrawableDC(display, bitmap, &state);
-    result = GetDIBits(hDC, hBitmap, 0, height, (unsigned char *)bmihPtr + size, 
-        (BITMAPINFO *)bmihPtr, DIB_RGB_COLORS);
-    TkWinReleaseDrawableDC(bitmap, hDC, &state);
-    bits = NULL;
-    if (!result) {
-	OutputDebugString("GetDIBits failed\n");
-    } else {
-	bits = Blt_Malloc(imageSize);
-	if (bits != NULL) {
-	    memcpy (bits, (unsigned char *)bmihPtr + size, imageSize);
-	}
-    }
-    GlobalUnlock(hMem);
-    GlobalFree(hMem);
-    *pitchPtr = bytesPerRow;
-    return bits;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XFree --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXFree(void *ptr)
-{
-    Blt_Free(ptr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XMaxRequestSize --
- *
- *---------------------------------------------------------------------------
- */
-long
-Blt_EmulateXMaxRequestSize(Display *display)
-{
-    return (SHRT_MAX / 4);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XLowerWindow --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXLowerWindow(
-    Display *display, 
-    Window window)
-{
-    HWND hWnd;
-
-    hWnd = Tk_GetHWND(window);
-    display->request++;
-    SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XRaiseWindow --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXRaiseWindow(
-    Display *display, 
-    Window window)
-{
-    HWND hWnd;
-
-    hWnd = Tk_GetHWND(window);
-    display->request++;
-    SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XUnmapWindow --
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXUnmapWindow(
-    Display *display, 
-    Window window)
-{
-    HWND hWnd;
-
-    hWnd = Tk_GetHWND(window);
-    display->request++;
-    ShowWindow(hWnd, SW_HIDE);
-    /* SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XWarpPointer --
- *
- *	If destWindow is None, moves the pointer by the offsets (destX,
- *	destY) relative to the current position of the pointer.
- *	If destWindow is a window, moves the pointer to the offsets
- *	(destX, destY) relative to the origin of destWindow.  However,
- *	if srcWindow is a window, the move only takes place if the window
- *	srcWindow contains the pointer and if the specified rectangle of
- *	srcWindow contains the pointer.
- *
- *	The srcX and srcY coordinates are relative to the origin of
- *	srcWindow.  If srcHeight is zero, it is replaced with the current
- *	height of srcWindow minus srcY.  If srcWidth is zero, it is
- *	replaced with the current width of srcWindow minus srcX.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXWarpPointer(
-    Display *display,
-    Window srcWindow,
-    Window destWindow,
-    int srcX,
-    int srcY,
-    unsigned int srcWidth,
-    unsigned int srcHeight,
-    int destX,
-    int destY)
-{
-    HWND hWnd;
-    POINT point;
-
-    hWnd = Tk_GetHWND(destWindow);
-    point.x = destX, point.y = destY;
-    if (ClientToScreen(hWnd, &point)) {
-	SetCursorPos(point.x, point.y);
-    }
-}
-
-#ifdef notdef
-static Blt_HashTable gcTable;
-static int gcInitialized = FALSE;
-#endif
-
-typedef struct {
-    HDC dc;
-    int count;
-    COLORREF color;
-    int offset, nBits;
-} DashInfo;
-
-void
-Blt_SetDashes(Display *display, GC gc, Blt_Dashes *dashesPtr)
-{
-    XGCValuesEx *gcPtr = (XGCValuesEx *)gc;
-
-    /* This must be used only with a privately created GC */
-    assert((int)gcPtr->dashes == -1);
-    gcPtr->nDashValues = strlen(dashesPtr->values);
-    gcPtr->dash_offset = dashesPtr->offset;
-    strcpy(gcPtr->dashValues, dashesPtr->values);
-}
-
-static int
-GetDashInfo(
-    HDC dc, 
-    GC gc, 
-    DashInfo *infoPtr)
-{
-    int dashOffset, dashValue;
-
-    dashValue = 0;
-    dashOffset = gc->dash_offset;
-    if ((int)gc->dashes == -1) {
-	XGCValuesEx *gcPtr = (XGCValuesEx *)gc;
-
-	if (gcPtr->nDashValues == 1) {
-	    dashValue = gcPtr->dashValues[0];
-	}
-    } else if (gc->dashes > 0) {
-	dashValue = (int)gc->dashes;
-    }
-    if (dashValue == 0) {
-	return FALSE;
-    }
-    infoPtr->dc = dc;
-    infoPtr->nBits = dashValue;
-    infoPtr->offset = dashOffset;
-    infoPtr->count = 0;
-    infoPtr->color = gc->foreground;
-    return TRUE;
-}
-
-void
-Blt_SetROP2(HDC dc, int function)
-{
-    SetROP2(dc, tkpWinRopModes[function]);
-}
-
-static XGCValuesEx *
-CreateGC()
-{
-    XGCValuesEx *gcPtr;
-
-    gcPtr = Blt_Malloc(sizeof(XGCValuesEx));
-    if (gcPtr == NULL) {
-	return NULL;
-    }
-    gcPtr->arc_mode = ArcPieSlice;
-    gcPtr->background = 0xffffff;
-    gcPtr->cap_style = CapNotLast;
-    gcPtr->clip_mask = None;
-    gcPtr->clip_x_origin = gcPtr->clip_y_origin = 0;
-    gcPtr->dash_offset	= 0;
-    gcPtr->fill_rule = WindingRule;
-    gcPtr->fill_style = FillSolid;
-    gcPtr->font = None;
-    gcPtr->foreground = 0;
-    gcPtr->function = GXcopy;
-    gcPtr->graphics_exposures = True;
-    gcPtr->join_style = JoinMiter;
-    gcPtr->line_style = LineSolid;
-    gcPtr->line_width = 0;
-    gcPtr->plane_mask = ~0;
-    gcPtr->stipple = None;
-    gcPtr->subwindow_mode = ClipByChildren;
-    gcPtr->tile = None;
-    gcPtr->ts_x_origin = gcPtr->ts_y_origin = 0;
-
-    gcPtr->dashes = -1;    /* Mark that this an extended GC */
-    gcPtr->nDashValues	= 0;
-
-    return gcPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmulateXCreateGC --
- *
- *	Allocate a new extended GC, and initialize the specified fields.
- *
- * Results:
- *	Returns a newly allocated GC.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-GC
-Blt_EmulateXCreateGC(
-    Display *display,
-    Drawable drawable,
-    unsigned long mask,
-    XGCValues *srcPtr)
-{
-    XGCValuesEx *destPtr;
-
-    destPtr = CreateGC();
-    if (destPtr == NULL) {
-	return None;
-    }
-    if (mask & GCFunction) {
-        destPtr->function = srcPtr->function;
-    }
-    if (mask & GCPlaneMask) {
-	destPtr->plane_mask = srcPtr->plane_mask;
-    }
-    if (mask & GCForeground) {
-	destPtr->foreground = srcPtr->foreground;
-    }
-    if (mask & GCBackground) {
-        destPtr->background = srcPtr->background;
-    }
-    if (mask & GCLineWidth) {
-	destPtr->line_width = srcPtr->line_width;
-    }
-    if (mask & GCLineStyle) {
-	destPtr->line_style = srcPtr->line_style;
-    }
-    if (mask & GCCapStyle) {
-	destPtr->cap_style = srcPtr->cap_style;
-    }
-    if (mask & GCJoinStyle) {
-	destPtr->join_style = srcPtr->join_style;
-    }
-    if (mask & GCFillStyle) {
-	destPtr->fill_style = srcPtr->fill_style;
-    }
-    if (mask & GCFillRule) {
-        destPtr->fill_rule = srcPtr->fill_rule;
-    }
-    if (mask & GCArcMode) {
-        destPtr->arc_mode = srcPtr->arc_mode;
-    }
-    if (mask & GCTile) {
-	destPtr->tile = srcPtr->tile;
-    }
-    if (mask & GCStipple) {
-        destPtr->stipple = srcPtr->stipple;
-    }
-    if (mask & GCTileStipXOrigin) {
-	destPtr->ts_x_origin = srcPtr->ts_x_origin;
-    }
-    if (mask & GCTileStipXOrigin) {
-	destPtr->ts_y_origin = srcPtr->ts_y_origin;
-    }
-    if (mask & GCFont) {
-        destPtr->font = srcPtr->font;
-    }
-    if (mask & GCSubwindowMode) {
-	destPtr->subwindow_mode = srcPtr->subwindow_mode;
-    }
-    if (mask & GCGraphicsExposures) {
-	destPtr->graphics_exposures = srcPtr->graphics_exposures;
-    }
-    if (mask & GCClipXOrigin) {
-	destPtr->clip_x_origin = srcPtr->clip_x_origin;
-    }
-    if (mask & GCClipYOrigin) {
-	destPtr->clip_y_origin = srcPtr->clip_y_origin;
-    }
-    if (mask & GCDashOffset) {
-	destPtr->dash_offset = srcPtr->dash_offset;
-    }
-    if (mask & GCDashList) {
-        destPtr->dashes = srcPtr->dashes;
-    }
-    if (mask & GCClipMask) {
-	struct ClipMask {
-	    int type;		/* TKP_CLIP_PIXMAP or TKP_CLIP_REGION */
-	    Pixmap pixmap;
-	} *clipPtr;
-
-	clipPtr = Blt_AssertMalloc(sizeof(struct ClipMask));
-#define TKP_CLIP_PIXMAP 0
-	clipPtr->type = TKP_CLIP_PIXMAP;
-	clipPtr->pixmap = srcPtr->clip_mask;
-	destPtr->clip_mask = (Pixmap) clipPtr;
-    }
-    return (GC)destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GCToPen --
- *
- *	Set up the graphics port from the given GC.
- *
- *	Geometric and cosmetic pens available under both 95 and NT.  
- *	Geometric pens differ from cosmetic pens in that they can 
- *	  1. Draw in world units (can have thick lines: line width > 1).
- *	  2. Under NT, allow arbitrary line style.
- *	  3. Can have caps and join (needed for thick lines).
- *	  4. Draw very, very slowly.
- *
- *	Cosmetic pens are single line width only.
- *
- * 			 95	 98	 NT
- *	  PS_SOLID	c,g	c,g	c,g
- *	  PS_DASH		c,g	c,g	c,g
- *	  PS_DOT		  c	  c	c,g
- *	  PS_DASHDOT	  c	  - 	c,g
- *	  PS_DASHDOTDOT	  c	  -	c,g
- *	  PS_USERSTYLE	  -       -	c,g
- *	  PS_ALTERNATE	  -	  - 	  c
- *
- *	Geometric only for 95/98
- *
- *	  PS_ENDCAP_ROUND
- *	  PS_ENDCAP_SQUARE
- *	  PS_ENDCAP_FLAT
- *	  PS_JOIN_BEVEL
- *	  PS_JOIN_ROUND
- *	  PS_JOIN_MITER
- * 
- * Results:
- *	None.
- *
- * Side effects:
- *	The current port is adjusted.
- *
- *---------------------------------------------------------------------------
- */
-HPEN
-Blt_GCToPen(HDC dc, GC gc)
-{
-    DWORD lineAttrs, lineStyle;
-    DWORD dashArr[12];
-    DWORD *dashPtr;
-    int nValues, lineWidth;
-    LOGBRUSH lBrush;
-    HPEN pen;
-
-    nValues = 0;
-    lineWidth = (gc->line_width < 1) ? 1 : gc->line_width;
-    if ((gc->line_style == LineOnOffDash) ||
-	(gc->line_style == LineDoubleDash)) {
-	XGCValuesEx *gcPtr = (XGCValuesEx *)gc;
-
-	if ((int)gc->dashes == -1) {
-	    int i;
-
-	    nValues = strlen(gcPtr->dashValues);
-	    for (i = 0; i < nValues; i++) {
-		dashArr[i] = (DWORD)gcPtr->dashValues[i];
-	    }
-	    if (nValues == 1) {
-		dashArr[1] = dashArr[0];
-		nValues = 2;
-	    }
-	} else {
-	    dashArr[1] = dashArr[0] = (DWORD) gc->dashes;
-	    nValues = 2;
-	    gc->dashes = -1;
-	}
-    }
-
-    switch (nValues) {
-    case 0:
-	lineStyle = PS_SOLID;
-	break;
-    case 3:
-	lineStyle = PS_DASHDOT;
-	break;
-    case 4:
-	lineStyle = PS_DASHDOTDOT;
-	break;
-    case 2:
-    default:
-	/* PS_DASH style dash length is too long. */
-	lineStyle = PS_DOT;
-	break;
-    }
-
-    lBrush.lbStyle = BS_SOLID;
-    lBrush.lbColor = gc->foreground;
-    lBrush.lbHatch = 0;		/* Value is ignored when style is BS_SOLID. */
-
-    lineAttrs = 0;
-    switch (gc->cap_style) {
-    case CapNotLast:
-    case CapButt:
-	lineAttrs |= PS_ENDCAP_FLAT;
-	break;
-    case CapRound:
-	lineAttrs |= PS_ENDCAP_ROUND;
-	break;
-    default:
-	lineAttrs |= PS_ENDCAP_SQUARE;
-	break;
-    }
-    switch (gc->join_style) {
-    case JoinMiter:
-	lineAttrs |= PS_JOIN_MITER;
-	break;
-    case JoinBevel:
-	lineAttrs |= PS_JOIN_BEVEL;
-	break;
-    case JoinRound:
-    default:
-	lineAttrs |= PS_JOIN_ROUND;
-	break;
-    }
-    SetBkMode(dc, TRANSPARENT);
-
-    if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	/* Windows NT/2000/XP. */
-	if (nValues > 0) {
-	    lineStyle = PS_USERSTYLE;
-	    dashPtr = dashArr;
-	} else {
-	    dashPtr = NULL;
-	}
-	if (lineWidth > 1) {
-	    /* Limit the use of geometric pens to thick lines. */
-	    pen = ExtCreatePen(PS_GEOMETRIC | lineAttrs | lineStyle, lineWidth,
-		       &lBrush, nValues, dashPtr);
-	} else {
-	    /* Cosmetic pens are much faster. */
-	    pen = ExtCreatePen(PS_COSMETIC | lineAttrs | lineStyle, 1, &lBrush,
-		       nValues, dashPtr);
-	}	    
-    } else {
-	/* Windows 95/98. */
-	if ((lineStyle == PS_SOLID) && (lineWidth > 1)) {
-	    /* Use geometric pens with solid, thick lines only. */
-	    pen = ExtCreatePen(PS_GEOMETRIC | lineAttrs | lineStyle, lineWidth,
-		       &lBrush, 0, NULL);
-	} else {
-	    /* Otherwise sacrifice thick lines for dashes. */
-	    pen = ExtCreatePen(PS_COSMETIC | lineStyle, 1, &lBrush, 0, NULL);
-	}
-    } 
-    assert(pen != NULL);
-    return pen;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XDrawRectangles --
- *
- *       Draws the outlines of the specified rectangles as if a
- *       five-point PolyLine protocol request were specified for each
- *       rectangle:
- *
- *             [x,y] [x+width,y] [x+width,y+height] [x,y+height]
- *             [x,y]
- *
- *      For the specified rectangles, these functions do not draw a
- *      pixel more than once.  XDrawRectangles draws the rectangles in
- *      the order listed in the array.  If rectangles intersect, the
- *      intersecting pixels are drawn multiple times.  Draws a
- *      rectangle.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws rectangles on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawRectangles(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XRectangle *rectangles,
-    int nRectangles)
-{
-    HBRUSH hBrush, oldBrush;
-    HDC hDC;
-    HPEN hPen, oldPen;
-    TkWinDCState state;
-    XRectangle *rp, *rend;
-
-    if (drawable == None) {
-	return;
-    }
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-
-    hPen = Blt_GCToPen(hDC, gc);
-    oldPen = SelectPen(hDC, hPen);
-
-    hBrush = GetStockObject(NULL_BRUSH);
-    oldBrush = SelectBrush(hDC, hBrush);
-
-    SetROP2(hDC, tkpWinRopModes[gc->function]);
-    for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	Rectangle(hDC, (int)rp->x, (int)rp->y, (int)(rp->x + rp->width + 1),
-	    (int)(rp->y + rp->height + 1));
-    }
-    SelectPen(hDC, oldPen), DeletePen(hPen);
-    SelectBrush(hDC, oldBrush), DeleteBrush(hBrush);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-#ifdef notdef
-/*
- * Implements the "pixeling" of small arcs, because GDI-performance
- * for this is awful
- * was made especially for BLT, graph4 demo now runs 4x faster
- *
- */
-/* O-outer , I-inner, B-both */
-#define NEITHER_ 0
-#define OUTLINE 1
-#define FILL 2
-#define BOTH (OUTLINE|FILL)
-#define MINIARCS 5
-static int arcus0[1] =
-{
-    BOTH
-};
-static int arcus1[4] =
-{
-    BOTH, BOTH,
-    BOTH, BOTH
-};
-
-static int arcus2[9] =
-{
-    NEITHER, OUTLINE, NEITHER,
-    OUTLINE, FILL, OUTLINE,
-    NEITHER, OUTLINE, NEITHER
-};
-
-static int arcus3[16] =
-{
-    NEITHER, OUTLINE, OUTLINE, NEITHER,
-    OUTLINE, FILL, FILL, OUTLINE,
-    OUTLINE, FILL, FILL, OUTLINE,
-    NEITHER, OUTLINE, OUTLINE, NEITHER
-};
-
-static int arcus4[25] =
-{
-    NEITHER, OUTLINE, OUTLINE, OUTLINE, NEITHER,
-    OUTLINE, FILL, FILL, FILL, OUTLINE,
-    OUTLINE, FILL, FILL, FILL, OUTLINE,
-    OUTLINE, FILL, FILL, FILL, OUTLINE,
-    NEITHER, OUTLINE, OUTLINE, OUTLINE, NEITHER
-};
-
-static int *arcis[MINIARCS] =
-{
-    arcus0, arcus1, arcus2, arcus3, arcus4
-};
-
-static void
-DrawMiniArc(
-    HDC dc,
-    int width,
-    int x,
-    int y,
-    int mask,
-    COLORREF inner,
-    COLORREF outer)
-{
-    int *arc;
-    int i, j;
-
-    if (width > MINIARCS) {
-	return;
-    }
-    arc = arcis[width];
-    for (i = 0; i <= width; i++) {
-	for (j = 0; j <= width; j++) {
-	    bit = (mask & *arc);
-	    if (bit & OUTLINE) {
-		SetPixelV(dc, x + i, y + j, outer);
-	    } else if (bit & FILL) {
-		SetPixelV(dc, x + i, y + j, inner);
-	    }
-	    arc++;
-	}
-    }
-}
-
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawArc --
- *
- *	This procedure handles the rendering of drawn or filled
- *	arcs and chords.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Renders the requested arcs.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DrawArc(
-    HDC dc,
-    int arcMode,		/* Mode: either ArcChord or ArcPieSlice */
-    XArc *arcPtr,
-    HPEN pen,
-    HBRUSH brush)
-{
-    int start, extent, clockwise;
-    int xstart, ystart, xend, yend;
-    double radian_start, radian_end, xr, yr;
-    double dx, dy;
-
-    if ((arcPtr->angle1 == 0) && (arcPtr->angle2 == 23040)) {
-	/* Handle special case of circle or ellipse */
-	Ellipse(dc, arcPtr->x, arcPtr->y, arcPtr->x + arcPtr->width + 1,
-	    arcPtr->y + arcPtr->height + 1);
-	return;
-    }
-    start = arcPtr->angle1, extent = arcPtr->angle2;
-    clockwise = (extent < 0);	/* Non-zero if clockwise */
-
-    /*
-     * Compute the absolute starting and ending angles in normalized radians.
-     * Swap the start and end if drawing clockwise.
-     */
-    start = start % (64 * 360);
-    if (start < 0) {
-	start += (64 * 360);
-    }
-    extent = (start + extent) % (64 * 360);
-    if (extent < 0) {
-	extent += (64 * 360);
-    }
-    if (clockwise) {
-	int tmp = start;
-	start = extent;
-	extent = tmp;
-    }
-#define XAngleToRadians(a) ((double)(a) / 64 * M_PI / 180);
-    radian_start = XAngleToRadians(start);
-    radian_end = XAngleToRadians(extent);
-
-    /*
-     * Now compute points on the radial lines that define the starting and
-     * ending angles.  Be sure to take into account that the y-coordinate
-     * system is inverted.
-     */
-    dx = arcPtr->width * 0.5;
-    dy = arcPtr->height * 0.5;
-
-    xr = arcPtr->x + dx;
-    yr = arcPtr->y + dy;
-    xstart = (int)((xr + cos(radian_start) * dx) + 0.5);
-    ystart = (int)((yr + sin(-radian_start) * dy) + 0.5);
-    xend = (int)((xr + cos(radian_end) * dx) + 0.5);
-    yend = (int)((yr + sin(-radian_end) * dy) + 0.5);
-
-    /*
-     * Now draw a filled or open figure.  Note that we have to
-     * increase the size of the bounding box by one to account for the
-     * difference in pixel definitions between X and Windows.
-     */
-
-    if (brush == 0) {
-	/*
-	 * Note that this call will leave a gap of one pixel at the
-	 * end of the arc for thin arcs.  We can't use ArcTo because
-	 * it's only supported under Windows NT.
-	 */
-	Arc(dc, arcPtr->x, arcPtr->y, arcPtr->x + arcPtr->width + 1,
-	    arcPtr->y + arcPtr->height + 1, xstart, ystart, xend, yend);
-	/* FIXME: */
-    } else {
-	if (arcMode == ArcChord) {
-	    Chord(dc, arcPtr->x, arcPtr->y, arcPtr->x + arcPtr->width + 1,
-		arcPtr->y + arcPtr->height + 1, xstart, ystart, xend, yend);
-	} else if (arcMode == ArcPieSlice) {
-	    Pie(dc, arcPtr->x, arcPtr->y, arcPtr->x + arcPtr->width + 1,
-		arcPtr->y + arcPtr->height + 1, xstart, ystart, xend, yend);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XDrawArcs --
- *
- *	Draws multiple circular or elliptical arcs.  Each arc is
- *	specified by a rectangle and two angles.  The center of the
- *	circle or ellipse is the center of the rect- angle, and the
- *	major and minor axes are specified by the width and height.
- *	Positive angles indicate counterclock- wise motion, and
- *	negative angles indicate clockwise motion.  If the magnitude
- *	of angle2 is greater than 360 degrees, XDrawArcs truncates it
- *	to 360 degrees.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws an arc for each array element on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawArcs(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XArc *arcArr,
-    int nArcs)
-{
-    HPEN pen, oldPen;
-    HBRUSH brush, oldBrush;
-    HDC dc;
-    TkWinDCState state;
-    
-    display->request++;
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    pen = Blt_GCToPen(dc, gc);
-    oldPen = SelectPen(dc, pen);
-    brush = GetStockBrush(NULL_BRUSH);
-    oldBrush = SelectBrush(dc, brush);
-    {
-	XArc *ap, *aend;
-
-	for (ap = arcArr, aend = ap + nArcs; ap < aend; ap++) {
-	    DrawArc(dc, gc->arc_mode, ap, pen, 0);
-	}
-    }
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    DeletePen(SelectPen(dc, oldPen));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XFillArcs --
- *
- *	Draw a filled arc.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws a filled arc for each array element on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXFillArcs(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XArc *arcArr,
-    int nArcs)
-{
-    HBRUSH brush, oldBrush;
-    HPEN pen, oldPen;
-    HDC dc;
-    TkWinDCState state;
-
-    display->request++;
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    pen = Blt_GCToPen(dc, gc);
-    oldPen = SelectPen(dc, pen);
-    brush = CreateSolidBrush(gc->foreground);
-    oldBrush = SelectBrush(dc, brush);
-    {
-	XArc *ap, *aend;
-
-	for (ap = arcArr, aend = ap + nArcs; ap < aend; ap++) {
-	    DrawArc(dc, gc->arc_mode, ap, pen, brush);
-	}
-    }
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    DeletePen(SelectPen(dc, oldPen));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * XDrawLines --
- *
- *	Draw connected lines.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Renders a series of connected lines.
- *
- *---------------------------------------------------------------------------
- */
-
-static void CALLBACK
-DrawDot(
-    int x, int y,		/* Coordinates of point */
-    LPARAM clientData)
-{				/* Line information */
-    DashInfo *infoPtr = (DashInfo *) clientData;
-    int count;
-
-    infoPtr->count++;
-    count = (infoPtr->count + infoPtr->offset) / infoPtr->nBits;
-    if (count & 0x1) {
-	SetPixelV(infoPtr->dc, x, y, infoPtr->color);
-    }
-}
-
-
-void
-Blt_EmulateXDrawLine(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    int x1, int y1,
-    int x2, int y2)
-{
-    TkWinDCState state;
-    HDC dc;
-
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    if (gc->line_style != LineSolid) {
-	/* Handle dotted lines specially */
-	DashInfo info;
-	int count;
-
-	if (!GetDashInfo(dc, gc, &info)) {
-	    goto solidLine;
-	}
-	count = info.offset / info.nBits;
-	if (x1 == x2) {		/* Vertical line */
-	    int y;
-
-	    for (y = y1; y <= y2; y += 2) {
-		SetPixelV(dc, x1, y + count, info.color);
-	    }
-	} else if (y1 == y2) {	/* Horizontal line */
-	    int x;
-
-	    for (x = x1; x <= x2; x += 2) {
-		SetPixelV(dc, x + count, y1, info.color);
-	    }
-	} else {
-	    LineDDA(x1, y1, x2, y2, DrawDot, (LPARAM)&info);
-	}
-    } else {
-	HPEN pen, oldPen;
-	HBRUSH brush, oldBrush;
-
-      solidLine:
-	pen = Blt_GCToPen(dc, gc);
-	oldPen = SelectPen(dc, pen);
-	brush = CreateSolidBrush(gc->foreground);
-	oldBrush = SelectBrush(dc, brush);
-	MoveToEx(dc, x1, y1, (LPPOINT)NULL);
-	LineTo(dc, x2, y2);
-	DeletePen(SelectPen(dc, oldPen));
-	DeleteBrush(SelectBrush(dc, oldBrush));
-    }
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-static void
-DrawLine(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    POINT *points,
-    int nPoints)
-{
-    TkWinDCState state;
-    HDC dc;
-    int i, n;
-    int start, extra, size;
-    HPEN pen, oldPen;
-    HBRUSH brush, oldBrush;
-
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    pen = Blt_GCToPen(dc, gc);
-    oldPen = SelectPen(dc, pen);
-    brush = CreateSolidBrush(gc->foreground);
-    oldBrush = SelectBrush(dc, brush);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    
-    start = extra = 0;
-    /*  
-     * Depending if the line is wide (> 1 pixel), arbitrarily break
-     * the line in sections of 100 points.  This bit of weirdness has
-     * to do with wide geometric pens.  The longer the polyline, the
-     * slower it draws.  The trade off is that we lose dash and 
-     * cap uniformity for unbearably slow polyline draws.  
-     */
-    if (gc->line_width > 1) {
-	size = 100;
-    } else {
-	size = nPoints;
-    }
-    for (i = nPoints; i > 0; i -= size) {
-	n = MIN(i, size);
-	Polyline(dc, points + start, n + extra);
-	start += (n - 1);
-	extra = 1;
-    }
-    DeletePen(SelectPen(dc, oldPen));
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-void
-Blt_EmulateXDrawLines(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XPoint *pointArr,
-    int nPoints,
-    int mode)
-{
-    if (drawable == None) {
-	return;
-    }
-    if (gc->line_style != LineSolid) { /* Handle dotted lines specially */
-	DashInfo info;
-	TkWinDCState state;
-	HDC dc;
-	int result;
-
-	dc = TkWinGetDrawableDC(display, drawable, &state);
-	SetROP2(dc, tkpWinRopModes[gc->function]);
-	result = GetDashInfo(dc, gc, &info);
-	if (result) {
-	    XPoint *p1, *p2;
-	    int i;
-
-	    p1 = pointArr;
-	    p2 = p1 + 1;
-	    for (i = 1; i < nPoints; i++, p1++, p2++) {
-		LineDDA(p1->x, p1->y, p2->x, p2->y, DrawDot, (LPARAM)&info);
-	    }
-	    result = TCL_OK;
-	}
-	TkWinReleaseDrawableDC(drawable, dc, &state);
-	if (result) {
-	    return;
-	}
-    } else {
-	POINT *points;
-
-	points = Blt_Malloc(sizeof(POINT) * nPoints);
-	if (points == NULL) {
-	    return;
-	}
-	if (mode == CoordModeOrigin) {
-	    POINT *destPtr;
-	    XPoint *sp, *send;
-
-	    destPtr = points;
-	    for (sp = pointArr, send = sp + nPoints; sp < send; sp++) {
-		destPtr->x = (int)sp->x;
-		destPtr->y = (int)sp->y;
-		destPtr++;
-	    }
-	} else {
-	    XPoint *sp, *send;
-	    POINT *destPtr, *lastPtr;
-	    
-	    sp = pointArr;
-	    destPtr = points;
-	    destPtr->x = (int)sp->x;
-	    destPtr->y = (int)sp->y;
-	    lastPtr = destPtr;
-	    sp++, destPtr++;
-	    for (send = pointArr + nPoints; sp < send; sp++) {
-		destPtr->x = lastPtr->x + (int)sp->x;
-		destPtr->y = lastPtr->y + (int)sp->y;
-		lastPtr = destPtr;
-		destPtr++;
-	    }
-	}
-	DrawLine(display, drawable, gc, points, nPoints);
-	Blt_Free(points);
-    }
-}
-
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmultateXDrawSegments --
- *
- *	Draws multiple, unconnected lines. For each segment, draws a
- *	line between (x1, y1) and (x2, y2).  It draws the lines in the
- *	order listed in the array of XSegment structures and does not
- *	perform joining at coincident endpoints.  For any given line,
- *	does not draw a pixel more than once. If lines intersect, the
- *	intersecting pixels are drawn multiple times.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws unconnected line segments on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawSegments(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XSegment *segArr,
-    int nSegments)
-{
-    HDC dc;
-    TkWinDCState state;
-
-    display->request++;
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    if (gc->line_style != LineSolid) {
-	XSegment *sp, *send;
-
-	/* Handle dotted lines specially */
-	DashInfo info;
-
-	if (!GetDashInfo(dc, gc, &info)) {
-	    goto solidLine;
-	}
-	for (sp = segArr, send = sp + nSegments; sp < send; sp++) {
-	    info.count = 0; /* Reset dash counter after every segment. */
-	    LineDDA(sp->x1, sp->y1, sp->x2, sp->y2, DrawDot, (LPARAM)&info);
-	}
-    } else {
-	XSegment *sp, *send;
-	HPEN pen, oldPen;
-
-      solidLine:
-	pen = Blt_GCToPen(dc, gc);
-	oldPen = SelectPen(dc, pen);
-	for (sp = segArr, send = sp + nSegments; sp < send; sp++) {
-	    MoveToEx(dc, sp->x1, sp->y1, (LPPOINT)NULL);
-	    LineTo(dc, sp->x2, sp->y2);
-	}
-	DeletePen(SelectPen(dc, oldPen));
-    }
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmultateXDrawRectangle --
- *
- *       Draws the outlines of the specified rectangle as if a
- *       five-point PolyLine protocol request were specified for each
- *       rectangle:
- *
- *             [x,y] [x+width,y] [x+width,y+height] [x,y+height]
- *             [x,y]
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws a rectangle on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawRectangle(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    int x, int y,
-    unsigned int width,
-    unsigned int height)
-{
-    TkWinDCState state;
-    HPEN pen, oldPen;
-    HBRUSH brush, oldBrush;
-    HDC dc;
-
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    pen = Blt_GCToPen(dc, gc);
-    brush = GetStockObject(NULL_BRUSH);
-    oldPen = SelectPen(dc, pen);
-    oldBrush = SelectBrush(dc, brush);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    if (gc->line_style != LineSolid) {
-	/* Handle dotted lines specially */
-	int x2, y2;
-	DashInfo info;
-
-	if (!GetDashInfo(dc, gc, &info)) {
-	    goto solidLine;
-	}
-	x2 = x + width;
-	y2 = y + height;
-	LineDDA(x, y, x2, y, DrawDot, (LPARAM)&info);
-	LineDDA(x2, y, x2, y2, DrawDot, (LPARAM)&info);
-	LineDDA(x2, y2, x, y2, DrawDot, (LPARAM)&info);
-	LineDDA(x, y2, x, y, DrawDot, (LPARAM)&info);
-    } else {
-      solidLine:
-	Rectangle(dc, x, y, x + width + 1, y + height + 1);
-    }
-    DeletePen(SelectPen(dc, oldPen));
-    DeleteBrush(SelectBrush(dc, oldBrush));
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmulateXDrawPoints --
- *
- *	Uses the foreground pixel and function components of the GC to
- *	draw a multiple points into the specified drawable.
- *      CoordModeOrigin treats all coordinates as relative to the
- *	origin, and CoordModePrevious treats all coordinates after
- *	the first as relative to the previous point.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws points on the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawPoints(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XPoint *points,
-    int nPoints,
-    int mode)
-{				/* Ignored. CoordModeOrigin is assumed. */
-    HDC dc;
-    XPoint *pp, *pend;
-    TkWinDCState state;
-
-    display->request++;
-    if (drawable == None) {
-	return;
-    }
-    dc = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(dc, tkpWinRopModes[gc->function]);
-    for (pp = points, pend = pp + nPoints; pp < pend; pp++) {
-	SetPixelV(dc, pp->x, pp->y, gc->foreground);
-    }
-    TkWinReleaseDrawableDC(drawable, dc, &state);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmultateXReparentWindow --
- *
- *	If the specified window is mapped, automatically performs an
- *	UnmapWindow request on it, removes it from its current
- *	position in the hierarchy, and inserts it as the child of the
- *	specified parent.  The window is placed in the stacking order
- *	on top with respect to sibling windows.
- *
- *	Note: In WIN32 you can't reparent to/from another application.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Reparents the specified window.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXReparentWindow(
-    Display *display,
-    Window window,
-    Window parent,
-    int x, int y)
-{
-    HWND child, newParent;
-
-    child = Tk_GetHWND(window);
-    newParent = Tk_GetHWND(parent);
-    SetParent(child, newParent);
-    SetWindowLong(child, GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN |
-	WS_CLIPSIBLINGS);
-
-    XMoveWindow(display, window, x, y);
-    XRaiseWindow(display, window);
-    XMapWindow(display, window);
-}
-
-void
-Blt_EmulateXSetDashes(
-    Display *display,
-    GC gc,
-    int dashOffset,
-    _Xconst char *dashList,
-    int n)
-{
-    gc->dashes = (unsigned char)strlen(dashList);
-    gc->dash_offset = (int)dashList;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmultateXDrawString --
- *
- *	Draw a single string in the current font.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Renders the specified string in the drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXDrawString(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    int x, int y,
-    _Xconst char *string,
-    int length)
-{
-    if (drawable == None) {
-	return;
-    }
-    Tk_DrawChars(display, drawable, gc, (Tk_Font)gc->font, string, length, 
-	x, y);
-}
-
-static void
-TileArea(
-    HDC destDC, HDC srcDC,
-    int tileOriginX, int tileOriginY, int tileWidth,  int tileHeight,
-    int x, int y, int width, int height)
-{
-    int destX, destY;
-    int destWidth, destHeight;
-    int srcX, srcY;
-    int xOrigin, yOrigin;
-    int delta;
-    int left, top, right, bottom;
-
-    xOrigin = x, yOrigin = y;
-    if (x < tileOriginX) {
-	delta = (tileOriginX - x) % tileWidth;
-	if (delta > 0) {
-	    xOrigin -= (tileWidth - delta);
-	}
-    } else if (x > tileOriginX) {
-	delta = (x - tileOriginX) % tileWidth;
-	if (delta > 0) {
-	    xOrigin -= delta;
-	}
-    }
-    if (y < tileOriginY) {
-	delta = (tileOriginY - y) % tileHeight;
-	if (delta > 0) {
-	    yOrigin -= (tileHeight - delta);
-	}
-    } else if (y >= tileOriginY) {
-	delta = (y - tileOriginY) % tileHeight;
-	if (delta > 0) {
-	    yOrigin -= delta;
-	}
-    }
-#ifdef notdef
-    PurifyPrintf("tile is (%d,%d,%d,%d)\n", tileOriginX, tileOriginY, 
-		 tileWidth, tileHeight);
-    PurifyPrintf("region is (%d,%d,%d,%d)\n", x, y, width, height);
-    PurifyPrintf("starting at %d,%d\n", xOrigin, yOrigin);
-#endif
-    left = x;
-    right = x + width;
-    top = y;
-    bottom = y + height;
-    for (y = yOrigin; y < bottom; y += tileHeight) {
-	srcY = 0;
-	destY = y;
-	destHeight = tileHeight;
-	if (y < top) {
-	    srcY = (top - y);
-	    destHeight = tileHeight - srcY;
-	    destY = top;
-	} 
-	if ((destY + destHeight) > bottom) {
-	    destHeight = (bottom - destY);
-	}
-	for (x = xOrigin; x < right; x += tileWidth) {
-	    srcX = 0;
-	    destX = x;
-	    destWidth = tileWidth;
-	    if (x < left) {
-		srcX = (left - x);
-		destWidth = tileWidth - srcX;
-		destX = left;
-	    } 
-	    if ((destX + destWidth) > right) {
-		destWidth = (right - destX);
-	    }
-#ifdef notdef
-	    PurifyPrintf("drawing pattern (%d,%d,%d,%d) at %d,%d\n",
-		 srcX , srcY, destWidth, destHeight, destX, destY);
-#endif
-	    BitBlt(destDC, destX, destY, destWidth, destHeight, 
-		srcDC, srcX, srcY, SRCCOPY);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmultateXFillRectangles --
- *
- *	Fill multiple rectangular areas in the given drawable.
- *	Handles tiling.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws onto the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-Blt_EmulateXFillRectangles(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    XRectangle *rectangles,
-    int nRectangles)
-{
-    HBRUSH oldBrush, hFgBrush, hBgBrush, hBrush;
-    HDC hDC;
-    HDC memDC;
-    TkWinDCState state;
-    TkWinDrawable *twdPtr;
-    XRectangle *rp, *rend;
-    
-    if (drawable == None) {
-	return;
-    }
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[gc->function]);
-
-    switch(gc->fill_style) {
-    case FillTiled:
-	if (gc->tile == None) {
-	    goto fillSolid;
-        }
-#ifdef notdef
-	if ((GetDeviceCaps(hDC, RASTERCAPS) & RC_BITBLT) == 0) {
-	    goto fillSolid;
-	}
-#endif
-        twdPtr = (TkWinDrawable *)gc->tile;
-	{
-	    HBITMAP oldBitmap;
-	    BITMAP bm;
-
-	    GetObject(twdPtr->bitmap.handle, sizeof(BITMAP), &bm);
-	    memDC = CreateCompatibleDC(hDC);
-	    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-	    for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-		TileArea(hDC, memDC, gc->ts_x_origin, gc->ts_y_origin, 
-			 bm.bmWidth, bm.bmHeight, 
-			 (int)rp->x, (int)rp->y, (int)rp->width, 
-			 (int)rp->height);
-	    }
-	    SelectBitmap(memDC, oldBitmap);
-	    DeleteDC(memDC);
-	}
-        break; 
-
-    case FillOpaqueStippled:
-    case FillStippled:
-	if (gc->stipple == None) {
-	    goto fillSolid;
-	}
-        twdPtr = (TkWinDrawable *)gc->stipple;
-	if (twdPtr->type != TWD_BITMAP) {
-	    panic("unexpected drawable type in stipple");
-	}
-	hBrush = CreatePatternBrush(twdPtr->bitmap.handle);
-	SetBrushOrgEx(hDC, gc->ts_x_origin, gc->ts_y_origin, NULL);
-	oldBrush = SelectBrush(hDC, hBrush);
-	memDC = CreateCompatibleDC(hDC);
-
-	/*
-	 * For each rectangle, create a drawing surface which is the size of
-	 * the rectangle and fill it with the background color.  Then merge the
-	 * result with the stipple pattern.
-	 */
-        hFgBrush = CreateSolidBrush(gc->foreground);
-	hBgBrush = CreateSolidBrush(gc->background);
-        for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	    RECT rect;
-	    HBITMAP oldBitmap, hBitmap;
-
-	    hBitmap = CreateCompatibleBitmap(hDC, rp->width, rp->height);
-	    oldBitmap = SelectObject(memDC, hBitmap);
-	    rect.left = rect.top = 0;
-	    rect.right = rp->width;
-	    rect.bottom = rp->height;
-	    FillRect(memDC, &rect, hFgBrush);
-	    BitBlt(hDC, rp->x, rp->y, rp->width, rp->height, memDC, 0, 0, 
-		   COPYBG);
-	    if (gc->fill_style == FillOpaqueStippled) {
-		FillRect(memDC, &rect, hBgBrush);
-		BitBlt(hDC, rp->x, rp->y, rp->width, rp->height, memDC, 0, 0, 
-		       COPYFG);
-	    }
-	    SelectObject(memDC, oldBitmap);
-	    DeleteObject(hBitmap);
-	}
-	DeleteBrush(hFgBrush);
-	DeleteBrush(hBgBrush);
-	DeleteDC(memDC);
-	SelectBrush(hDC, oldBrush);
-	DeleteBrush(hBrush);
- 	break;
-
-    case FillSolid:
-	fillSolid:
-#ifdef notdef
-	memDC = CreateCompatibleDC(hDC);
-#endif
-        hFgBrush = CreateSolidBrush(gc->foreground);
-        for (rp = rectangles, rend = rp + nRectangles; rp < rend; rp++) {
-	    RECT rect;
-#ifdef notdef
-	    HBITMAP oldBitmap, hBitmap;
-
-	    hBitmap = CreateCompatibleBitmap(hDC, rp->width, rp->height);
-	    oldBitmap = SelectObject(memDC, hBitmap);
-#endif
-	    /* Note that width and height is already assumed to be
-	     * subtracted by one. */
-	    rect.left = rp->x, rect.top = rp->y;
-	    rect.right = rp->x + rp->width;
-	    rect.bottom = rp->y + rp->height;
-	    FillRect(hDC, &rect, hFgBrush);
-#ifdef notdef
-	    BitBlt(hDC, rp->x, rp->y, rp->width, rp->height, memDC, 0, 0, 
-		SRCCOPY);
-	    SelectObject(memDC, oldBitmap);
-	    DeleteObject(hBitmap);
-#endif
-	}
-	DeleteBrush(hFgBrush);
-#ifdef notdef
-	DeleteDC(memDC);
-#endif
- 	break;
-    }
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-void
-Blt_EmulateXFillRectangle(
-    Display *display,
-    Drawable drawable,
-    GC gc,
-    int x, int y,
-    unsigned int width,
-    unsigned int height)
-{
-    HDC hDC;
-    RECT rect;
-    TkWinDCState state;
-
-    if (drawable == None) {
-	return;
-    }
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[gc->function]);
-    rect.left = rect.top = 0;
-    rect.right = width;
-    rect.bottom = height;
-
-    switch(gc->fill_style) {
-    case FillTiled:
-	{
-	    TkWinDrawable *twdPtr;
-	    HBITMAP oldBitmap;
-	    HDC memDC;
-	    BITMAP bm;
-
-	    if (gc->tile == None) { 
-		goto fillSolid;
-	    }
-#ifdef notdef
-	    if ((GetDeviceCaps(hDC, RASTERCAPS) & RC_BITBLT) == 0) {
-		goto fillSolid;
-	    }
-#endif
-	    twdPtr = (TkWinDrawable *)gc->tile;
-	    /* The tiling routine needs to know the size of the bitmap */
-	    GetObject(twdPtr->bitmap.handle, sizeof(BITMAP), &bm);
-
-	    memDC = CreateCompatibleDC(hDC);
-	    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-	    TileArea(hDC, memDC, gc->ts_x_origin, gc->ts_y_origin, bm.bmWidth, 
-		     bm.bmHeight, x, y, width, height);
-	    SelectBitmap(memDC, oldBitmap);
-	    DeleteDC(memDC);
-	}
-	break; 
-	    
-    case FillOpaqueStippled:
-    case FillStippled:
-	{
-	    TkWinDrawable *twdPtr;
-	    HBRUSH oldBrush, hBrush;
-	    HBRUSH hBrushFg, hBrushBg;
-	    HBITMAP oldBitmap, hBitmap;
-	    HDC memDC;
-
-	    if (gc->stipple == None) {
-		goto fillSolid;
-	    }
-	    twdPtr = (TkWinDrawable *)gc->stipple;
-	    if (twdPtr->type != TWD_BITMAP) {
-		panic("unexpected drawable type in stipple");
-	    }
-	    hBrush = CreatePatternBrush(twdPtr->bitmap.handle);
-	    SetBrushOrgEx(hDC, gc->ts_x_origin, gc->ts_y_origin, NULL);
-	    oldBrush = SelectBrush(hDC, hBrush);
-	    memDC = CreateCompatibleDC(hDC);
-	    
-	    hBrushFg = CreateSolidBrush(gc->foreground);
-	    hBrushBg = CreateSolidBrush(gc->background);
-	    hBitmap = CreateCompatibleBitmap(hDC, width, height);
-	    oldBitmap = SelectObject(memDC, hBitmap);
-	    FillRect(memDC, &rect, hBrushFg);
-	    SetBkMode(hDC, TRANSPARENT);
-	    BitBlt(hDC, x, y, width, height, memDC, 0, 0, COPYFG);
-	    if (gc->fill_style == FillOpaqueStippled) {
-		FillRect(memDC, &rect, hBrushBg);
-		BitBlt(hDC, x, y, width, height, memDC, 0, 0, COPYBG);
-	    }
-	    SelectBrush(hDC, oldBrush);
-	    SelectBitmap(memDC, oldBitmap);
-	    DeleteBrush(hBrushFg);
-	    DeleteBrush(hBrushBg);
-	    DeleteBrush(hBrush);
-	    DeleteBitmap(hBitmap);
-	    DeleteDC(memDC);
-	}
-	break;
-
-    case FillSolid:
-	{
-	    HBRUSH hBrush;
-	    HBITMAP oldBitmap, hBitmap;
-	    HDC memDC;
-
-	fillSolid:
-	    /* TkWinFillRect(hDC, x, y, width, height, gc->foreground);  */
-	    memDC = CreateCompatibleDC(hDC);
-	    hBrush = CreateSolidBrush(gc->foreground);
-	    hBitmap = CreateCompatibleBitmap(hDC, width, height);
-	    oldBitmap = SelectBitmap(memDC, hBitmap);
-	    rect.left = rect.top = 0;
-	    rect.right = width;
-	    rect.bottom = height;
-	    FillRect(memDC, &rect, hBrush);
-	    BitBlt(hDC, x, y, width, height, memDC, 0, 0, SRCCOPY);
-	    SelectObject(memDC, oldBitmap);
-	    DeleteBitmap(hBitmap);
-	    DeleteBrush(hBrush);
-	    DeleteDC(memDC);
-	}
-	break;
-    }
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-static BOOL
-DrawChars(HDC dc, int x, int y, char *string, int length)
-{
-    BOOL result;
-
-    if (systemEncoding == NULL) {
-	result = TextOutA(dc, x, y, string, length);
-    } else {
-	Tcl_DString dString;
-	const unsigned short *wstring;
-	int wlength;
-
-	Tcl_DStringInit(&dString);
-	Tcl_UtfToExternalDString(systemEncoding, string, length, &dString);
-	wlength = Tcl_DStringLength(&dString) >> 1;
-	wstring = (const unsigned short *)Tcl_DStringValue(&dString);
-	result = TextOutW(dc, x, y, wstring, wlength);
-	Tcl_DStringFree(&dString);
-    }
-    return result;
-}
-#else
-static BOOL
-DrawChars(HDC dc, int x, int y, char *string, int length)
-{
-    return TextOutA(dc, x, y, string, length);
-}
-#endif /* _TCL_VERSION >= _VERSION(8,1,0) */
-
-#ifdef notef
-int
-Blt_DrawTextWithRotatedFont(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int depth,
-    float angle,
-    TextStyle *tsPtr,
-    TextLayout *textPtr,
-    int x, int y,
-    int xMax)
-{
-    Display *display;
-    HFONT hFont, oldFont;
-    TkWinDCState state;
-    HDC hDC;
-    int isActive;
-    int bbWidth, bbHeight;
-    double rotWidth, rotHeight;
-    double sinTheta, cosTheta;
-    double radians;
-    Point2d p, q, center;
-    TextFragment *fp, *fend;
-
-#if (_TCL_VERSION >=  _VERSION(8,1,0)) 
-    static int initialized = 0;
-
-    if (!initialized) {
-	if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	    /*
-	     * If running NT, then we will be calling some Unicode
-	     * functions explictly.  So, even if the TCL system
-	     * encoding isn't Unicode, make sure we convert to/from
-	     * the Unicode char set.
-	     */
-	    systemEncoding = Tcl_GetEncoding(NULL, "unicode");
-	} 
-	initialized = 1;
-    }
-#endif
-    display = Tk_Display(tkwin);
-    hFont = CreateRotatedFont(tsPtr->gc->font, angle);
-    if (hFont == NULL) {
-	return FALSE;
-    }
-    Blt_RotateStartingTextPositions(layoutPtr, angle);
-    Blt_GetBoundingBox(layoutPtr->width, layoutPtr->height, angle, 
-		&rotWidth, &rotHeight, (Point2d *)NULL);
-    Blt_TranslateAnchor(x, y, ROUND(rotWidth), ROUND(rotHeight), tsPtr->anchor, 
-		&x, &y);
-
-    isActive = (tsPtr->state & STATE_ACTIVE);
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(hDC, tsPtr->gc->function);
-    oldFont = SelectFont(hDC, hFont);
-
-    SetBkMode(hDC, TRANSPARENT);
-    SetTextAlign(hDC, TA_LEFT | TA_BASELINE);
-
-    if (tsPtr->state & (STATE_DISABLED | STATE_EMPHASIS)) {
-	TkBorder *borderPtr = (TkBorder *) tsPtr->border;
-	XColor *color1, *color2;
-	
-	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
-	if (tsPtr->state & STATE_EMPHASIS) {
-	    XColor *hold;
-	    
-	    hold = color1, color1 = color2, color2 = hold;
-	}
-	if (color1 != NULL) {
-	    SetTextColor(hDC, color1->pixel);
-	    for (fp = textPtr->fragments, fend = fp + textPtr->nFrags; 
-		 fp < fend; fp++) {
-		DrawChars(hDC, fp->sx, fp->sy, fp->text, fp->count); 
-	    }
-	}
-	if (color2 != NULL) {
-	    SetTextColor(hDC, color2->pixel);
-	    for (fp = textPtr->fragments, fend = fp + textPtr->nFrags; 
-		 fp < fend; fp++) {
-		DrawChars(hDC, fp->sx + 1, fp->sy + 1, fp->text, fp->count);
-	    }
-	}
-	goto done;		/* Done */
-    }
-    SetBkMode(hDC, TRANSPARENT);
-    SetTextColor(hDC, tsPtr->color->pixel);
-    for (fp = textPtr->fragments, fend = fp + textPtr->nFrags; fp < fend; 
-	 fp++) {
-	DrawChars(hDC, fp->sx, fp->sy, fp->text, fp->count);
-    }
- done:
-    SelectFont(hDC, oldFont);
-    DeleteFont(hFont);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-    return TRUE;
-}
-#endif
-
-static void
-DrawPixel(
-    HDC hDC, 
-    int x, int y, 
-    COLORREF color)
-{
-    HDC memDC;
-    HBRUSH hBrushFg;
-    HBITMAP oldBitmap, hBitmap;
-    RECT rect;
-    int size;
- 
-    size = 1;
-    memDC = CreateCompatibleDC(hDC);
-    hBrushFg = CreateSolidBrush(color);
-    hBitmap = CreateCompatibleBitmap(hDC, size, size);
-    oldBitmap = SelectObject(memDC, hBitmap);
-    rect.left = rect.top = 0;
-    rect.right = rect.bottom = size;
-    FillRect(memDC, &rect, hBrushFg);
-    BitBlt(hDC, x, y, size, size, memDC, 0, 0, SRCCOPY);
-    SelectObject(memDC, oldBitmap);
-    DeleteObject(hBitmap);
-    DeleteBrush(hBrushFg);
-    DeleteDC(memDC);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PixelateBitmap --
- *
- *	Draws a masked bitmap in given device (should be printer)
- *	context.  Bit operations on print devices usually fail because
- *	there's no way to read back from the device surface to get the
- *	previous pixel values, rendering BitBlt useless. The bandaid
- *	solution here is to draw 1x1 pixel rectangles at each
- *	coordinate as directed by the the mask and source bitmaps.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Draws onto the specified drawable.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PixelateBitmap(
-    Display *display,
-    Drawable drawable,
-    Pixmap srcBitmap,
-    Pixmap maskBitmap,
-    int width,
-    int height,
-    GC gc,
-    int destX,
-    int destY)
-{
-    int x, y;
-    int dx, dy;
-    int pixel;
-    unsigned char *srcBits;
-    unsigned char *srcPtr;
-    int bitPos, bytesPerRow;
-    HDC hDC;
-    TkWinDCState state;
-
-    srcBits = Blt_GetBitmapData(display, srcBitmap, width, height, 
-	&bytesPerRow);
-    if (srcBits == NULL) {
-	return;
-    }
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-    if (maskBitmap != None) {
-        unsigned char *maskPtr;
-        unsigned char *maskBits;
-        maskBits = Blt_GetBitmapData(display, maskBitmap, width, height,
-	    &bytesPerRow);
-        bytesPerRow = ((width + 31) & ~31) / 8;
-        for (dy = destY, y = height - 1; y >= 0; y--, dy++) {
-	    maskPtr = maskBits + (bytesPerRow * y);
-	    srcPtr = srcBits + (bytesPerRow * y);
-	    for (dx = destX, x = 0; x < width; x++, dx++) {
-	        bitPos = x % 8;
-	        pixel = (*maskPtr & (0x80 >> bitPos));
-	        if (pixel) {
-		    pixel = (*srcPtr & (0x80 >> bitPos));
-		    DrawPixel(hDC, dx, dy, 
-		        (pixel) ? gc->foreground : gc->background);
-	        }
-	        if (bitPos == 7) {
-		    srcPtr++, maskPtr++;
-	        }
-	    }			/* x */
-        }
-        Blt_Free(maskBits);
-    } else {
-        bytesPerRow = ((width + 31) & ~31) / 8;
-        for (dy = destY, y = height - 1; y >= 0; y--, dy++) {
-	    srcPtr = srcBits + (bytesPerRow * y);
-	    for (dx = destX, x = 0; x < width; x++, dx++) {
-	        bitPos = x % 8;
-		pixel = (*srcPtr & (0x80 >> bitPos));
-		DrawPixel(hDC, dx, dy, 
-		        (pixel) ? gc->foreground : gc->background);
-	        if (bitPos == 7) {
-		    srcPtr++;
-	        }
-	    }
-	}
-    }
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-    Blt_Free(srcBits);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmulateXCopyPlane --
- *
- *	Simplified version of XCopyPlane.  Right now it ignores
- *		function, 
- *		clip_x_origin, 
- *		clip_y_origin
- *
- *	The plane argument must always be 1.
- *
- *	This routine differs from the Tk version in how it handles 
- *	transparency.  It uses a different method of drawing transparent
- *	bitmaps that doesn't copy the background or use brushes.  The
- *	second change is to call a special routine when the destDC is
- *	a printer.   Stippling is done by a very slow brute-force
- *	method of drawing 1x1 rectangles for each pixel (bleech).  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Changes the destination drawable.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXCopyPlane(
-    Display *display,
-    Drawable src, Drawable dest,
-    GC gc,
-    int srcX, int srcY,
-    unsigned int width, unsigned int height,
-    int destX, int destY,
-    unsigned long plane)
-{
-    HDC srcDC, destDC;
-    TkWinDCState srcState, destState;
-    TkpClipMask *clipPtr = (TkpClipMask *) gc->clip_mask;
-
-    display->request++;
-
-    if (plane != 1) {
-	panic("Unexpected plane specified for XCopyPlane");
-    }
-    srcDC = TkWinGetDrawableDC(display, src, &srcState);
-
-    if (src != dest) {
-	destDC = TkWinGetDrawableDC(display, dest, &destState);
-    } else {
-	destDC = srcDC;
-    }
-    if ((clipPtr == NULL) || (clipPtr->type == TKP_CLIP_REGION)) {
-	/*
-	 * Case 1: opaque bitmaps.  Windows handles the conversion
-	 * from one bit to multiple bits by setting 0 to the
-	 * foreground color, and 1 to the background color (seems
-	 * backwards, but there you are).
-	 */
-	if ((clipPtr != NULL) && (clipPtr->type == TKP_CLIP_REGION)) {
-	    SelectClipRgn(destDC, (HRGN) clipPtr->value.region);
-	    OffsetClipRgn(destDC, gc->clip_x_origin, gc->clip_y_origin);
-	}
-	SetBkMode(destDC, OPAQUE);
-	SetBkColor(destDC, gc->foreground);
-	SetTextColor(destDC, gc->background);
-	BitBlt(destDC, destX, destY, width, height, srcDC, srcX, srcY,
-	    SRCCOPY);
-
-	SelectClipRgn(destDC, NULL);
-
-    } else if (clipPtr->type == TKP_CLIP_PIXMAP) {
-	Drawable mask;
-	/*
-	 * Case 2: transparent bitmaps are handled by setting the
-	 * destination to the foreground color whenever the source
-	 * pixel is set.
-	 */
-	/*
-	 * Case 3: two arbitrary bitmaps.  Copy the source rectangle
-	 * into a color pixmap.  Use the result as a brush when
-	 * copying the clip mask into the destination.
-	 */
-	mask = clipPtr->value.pixmap;
-
-#if WINDEBUG
-	PurifyPrintf("mask %s src\n", (mask == src) ? "==" : "!=");
-	PurifyPrintf("GetDeviceCaps=%x\n", 
-		GetDeviceCaps(destDC, TECHNOLOGY) & TABLE_RASDISPLAY);
-#endif
-	{
-	    HDC maskDC;
-	    TkWinDCState maskState;
-
-	    if (mask != src) {
-		maskDC = TkWinGetDrawableDC(display, mask, &maskState);
-	    } else {
-		maskDC = srcDC;
-	    }
-	    SetBkMode(destDC, OPAQUE);
-	    SetTextColor(destDC, gc->background);
-	    SetBkColor(destDC, gc->foreground);
-	    BitBlt(destDC, destX, destY, width, height, srcDC, srcX, srcY, 
-		   SRCINVERT);
-	    /* 
-	     * Make sure we treat the mask as a monochrome bitmap. 
-	     * We can get alpha-blending with non-black/white fg/bg 
-	     * color selections.
-	     */
-	    SetTextColor(destDC, RGB(255,255,255));
-	    SetBkColor(destDC, RGB(0,0,0));
-
-	    /* FIXME: Handle gc->clip_?_origin's */ 
-	    BitBlt(destDC, destX, destY, width, height, maskDC, 0, 0, SRCAND);
-
-	    SetTextColor(destDC, gc->background);
-	    SetBkColor(destDC, gc->foreground);
-	    BitBlt(destDC, destX, destY, width, height, srcDC, srcX, srcY, 
-		   SRCINVERT);
-	    if (mask != src) {
-		TkWinReleaseDrawableDC(mask, maskDC, &maskState);
-	    }
-	}
-    }
-    if (src != dest) {
-	TkWinReleaseDrawableDC(dest, destDC, &destState);
-    }
-    TkWinReleaseDrawableDC(src, srcDC, &srcState);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmulateXCopyArea --
- *
- *	Copies data from one drawable to another using block transfer
- *	routines.  The small enhancement over the version in Tk is
- *	that it doesn't assume that the source and destination devices
- *	have the same resolution. This isn't true when the destination
- *	device is a printer.
- *
- *	FIXME: not true anymore.  delete this routine.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Data is moved from a window or bitmap to a second window,
- *	bitmap, or printer.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXCopyArea(
-    Display *display,
-    Drawable src,
-    Drawable dest,
-    GC gc,
-    int srcX,			/* Source X-coordinate */
-    int srcY,			/* Source Y-coordinate. */
-    unsigned int width,		/* Width of area. */
-    unsigned int height,	/* Height of area. */
-    int destX,			/* Destination X-coordinate (in screen 
-				 * coordinates). */
-    int destY)			/* Destination Y-coordinate (in screen
-				 * coordinates). */
-{
-    HDC srcDC, destDC;
-    TkWinDCState srcState, destState;
-    TkpClipMask *clipPtr;
-
-    srcDC = TkWinGetDrawableDC(display, src, &srcState);
-    if (src != dest) {
-	destDC = TkWinGetDrawableDC(display, dest, &destState);
-    } else {
-	destDC = srcDC;
-    }
-    clipPtr = (TkpClipMask *)gc->clip_mask;
-    if ((clipPtr != NULL) && (clipPtr->type == TKP_CLIP_REGION)) {
-	SelectClipRgn(destDC, (HRGN)clipPtr->value.region);
-	OffsetClipRgn(destDC, gc->clip_x_origin, gc->clip_y_origin);
-    }
-
-    BitBlt(destDC, destX, destY, width, height, srcDC, srcX, srcY, 
-		bltModes[gc->function]);
-    SelectClipRgn(destDC, NULL);
-
-    if (src != dest) {
-	TkWinReleaseDrawableDC(dest, destDC, &destState);
-    }
-    TkWinReleaseDrawableDC(src, srcDC, &srcState);
-}
-
-static void
-StippleArea(
-    Display *display,
-    HDC hDC,			/* Device context: For polygons, clip
-				 * region will be installed. */
-    GC gc,
-    int x, int y,
-    int width, int height)
-{
-    BITMAP bm;
-    HBITMAP oldBitmap;
-    HDC maskDC, memDC;
-    Pixmap mask;
-    TkWinDCState maskState;
-    TkWinDrawable *twdPtr;
-    int dx, dy;
-    int left, top, right, bottom;
-    int startX, startY;		/* Starting upper left corner of region. */
-    
-    twdPtr = (TkWinDrawable *)gc->stipple;
-    GetObject(twdPtr->bitmap.handle, sizeof(BITMAP), &bm);
-
-    startX = x;
-    if (x < gc->ts_x_origin) {
-	dx = (gc->ts_x_origin - x) % bm.bmWidth;
-	if (dx > 0) {
-	    startX -= (bm.bmWidth - dx);
-	}
-    } else if (x > gc->ts_x_origin) {
-	dx = (x - gc->ts_x_origin) % bm.bmWidth;
-	if (dx > 0) {
-	    startX -= dx;
-	}
-    }
-    startY = y;
-    if (y < gc->ts_y_origin) {
-	dy = (gc->ts_y_origin - y) % bm.bmHeight;
-	if (dy > 0) {
-	    startY -= (bm.bmHeight - dy);
-	}
-    } else if (y >= gc->ts_y_origin) {
-	dy = (y - gc->ts_y_origin) % bm.bmHeight;
-	if (dy > 0) {
-	    startY -= dy;
-	}
-    }
-#ifdef notdef
-    PurifyPrintf("tile is (%d,%d,%d,%d)\n", gc->ts_x_origin, gc->ts_y_origin, 
-		 bm.bmWidth, bm.bmHeight);
-    PurifyPrintf("region is (%d,%d,%d,%d)\n", x, y, width, height);
-    PurifyPrintf("starting at %d,%d\n", startX, startY);
-#endif
-    left = x;
-    right = x + width;
-    top = y;
-    bottom = y + height;
-
-    maskDC = memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, twdPtr->bitmap.handle);
-    mask = gc->stipple;
-    if (gc->fill_style == FillStippled) { /* With transparency. */
-	if (gc->clip_mask != None) {
-	    TkpClipMask *clipPtr;
-	    
-	    mask = gc->stipple;
-	    clipPtr = (TkpClipMask *)gc->clip_mask;
-	    if  (clipPtr->type == TKP_CLIP_PIXMAP) {
-		mask = clipPtr->value.pixmap;
-	    }
-	}
-	if (mask != gc->stipple) {
-	    maskDC = TkWinGetDrawableDC(display, mask, &maskState);
-	}
-    }
-
-    for (y = startY; y < bottom; y += bm.bmHeight) {
-	int srcX, srcY;
-	int destX, destY, destWidth, destHeight;
-
-	srcY = 0;
-	destY = y;
-	destHeight = bm.bmHeight;
-	if (y < top) {
-	    srcY = (top - y);
-	    destHeight = bm.bmHeight - srcY;
-	    destY = top;
-	} 
-	if ((destY + destHeight) > bottom) {
-	    destHeight = (bottom - destY);
-	}
-	for (x = startX; x < right; x += bm.bmWidth) {
-	    srcX = 0;
-	    destX = x;
-	    destWidth = bm.bmWidth;
-	    if (x < left) {
-		srcX = (left - x);
-		destWidth = bm.bmWidth - srcX;
-		destX = left;
-	    } 
-	    if ((destX + destWidth) > right) {
-		destWidth = (right - destX);
-	    }
-#ifdef notdef
-	    PurifyPrintf("drawing pattern (%d,%d,%d,%d) at %d,%d\n",
-		 srcX , srcY, destWidth, destHeight, destX, destY);
-#endif
-	    if (gc->fill_style == FillStippled) { /* With transparency. */
-		SetBkMode(hDC, OPAQUE);
-		SetTextColor(hDC, gc->background);
-		SetBkColor(hDC, gc->foreground);
-		BitBlt(hDC, destX, destY, destWidth, destHeight, memDC, 
-		       srcX, srcY, SRCINVERT);
-		SetTextColor(hDC, RGB(255,255,255));
-		SetBkColor(hDC, RGB(0,0,0));
-		BitBlt(hDC, destX, destY, destWidth, destHeight, maskDC, 
-		       srcX, srcY, SRCAND);
-		SetTextColor(hDC, gc->background);
-		SetBkColor(hDC, gc->foreground);
-		BitBlt(hDC, destX, destY, destWidth, destHeight, memDC, 
-		       srcX, srcY, SRCINVERT);
-	    } else if (gc->fill_style == FillOpaqueStippled) { /* Opaque. */
-		SetBkColor(hDC, gc->foreground);
-		SetTextColor(hDC, gc->background);
-	        BitBlt(hDC, destX, destY, destWidth, destHeight, memDC, 
-			srcX, srcY, SRCCOPY);
-	    }
-	}
-    }
-    SelectBitmap(memDC, oldBitmap);
-    if (maskDC != memDC) {
-	TkWinReleaseDrawableDC(mask, maskDC, &maskState);
-    }
-    DeleteDC(memDC);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_EmulateXFillPolygon --
- *
- *	This differs from Tk's XFillPolygon in that it works around
- *	deficencies in Windows 95/98: 
- *		1. Stippling bitmap is limited to 8x8.
- *		2. No tiling (with or without mask).
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_EmulateXFillPolygon(
-    Display *display, 
-    Drawable drawable, 
-    GC gc,
-    XPoint *points, 
-    int nPoints, 
-    int shape, 
-    int mode) 
-{
-    HDC hDC;
-    int left, right, top, bottom;
-    TkWinDCState state;
-    int fillMode;
-    POINT *winPts;
-
-    if (drawable == None) {
-	return;
-    }
-    /* Allocate array of POINTS to create the polygon's path. */
-    winPts = Blt_Malloc(sizeof(POINT) * nPoints);
-    if (winPts == NULL) {
-	return;
-    }
-    {
-	POINT *wp;
-	XPoint *p, *pend;
-
-	/* Determine the bounding box of the polygon. */
-	left = right = points[0].x;
-	top = bottom = points[0].y;
-
-	wp = winPts;
-	for (p = points, pend = p + nPoints; p < pend; p++) {
-	    if (p->x < left) {
-		left = p->x;
-	    } 
-	    if (p->x > right) {
-		right = p->x;
-	    }
-	    if (p->y < top) {
-		top = p->y;
-	    } 
-	    if (p->y > bottom) {
-		bottom = p->y;
-	    }
-	    wp->x = p->x;
-	    wp->y = p->y;
-	    wp++;
-	}
-    }
-
-    hDC = TkWinGetDrawableDC(display, drawable, &state);
-    SetROP2(hDC, tkpWinRopModes[gc->function]);
-    fillMode = (gc->fill_rule == EvenOddRule) ? ALTERNATE : WINDING;
-
-    if ((gc->fill_style == FillStippled) || 
-	(gc->fill_style == FillOpaqueStippled)) {
-#ifndef notdef
-	POINT *wp, *wend;
-	HRGN hRgn;
-
-	/* Points are offsets within the bounding box. */
-	for (wp = winPts, wend = wp + nPoints; wp < wend; wp++) {
-	    wp->x -= left;
-	    wp->y -= top;
-	}
-	/* Use the polygon as a clip path. */
-	LPtoDP(hDC, winPts, nPoints);
-	hRgn = CreatePolygonRgn(winPts, nPoints, fillMode);
-	SelectClipRgn(hDC, hRgn);
-	OffsetClipRgn(hDC, left, top);
-	
-	/* Tile the bounding box. */
-	StippleArea(display, hDC, gc, left, top, right - left + 1, bottom - top + 1);
-	SelectClipRgn(hDC, NULL), DeleteRgn(hRgn);
-#else 
-	TkWinDrawable *twdPtr;
-	HBITMAP hBitmap;
-	HBRUSH hBrush, oldBrush;
-	HPEN hPen, oldPen;
-	HDC hMem;
-	HBITMAP oldBitmap;
-
-	twdPtr = (TkWinDrawable *)gc->stipple;
-	if (twdPtr->type != TWD_BITMAP) {
-	    panic("unexpected drawable type in stipple");
-	}
-	{
-	    BITMAP bm;
-	    int bytesPerRow;
-	    int y;
-	    unsigned char *srcRowPtr;
-	    unsigned char *bits;
-	    
-	    GetObject(twdPtr->bitmap.handle, sizeof(BITMAP), &bm);
-	    bits = Blt_GetBitmapData(display, gc->stipple, bm.bmWidth, bm.bmHeight,
-				     &bytesPerRow);
-	    if (bits == NULL) {
-		panic("help me");
-	    }
-	    srcRowPtr = bits;
-	    for (y = 0; y < bm.bmHeight; y++) {
-		unsigned char *bp, *bend;
-		for (bp = srcRowPtr, bend = bp + bytesPerRow; bp < bend; bp++) {
-		    *bp = ~*bp;
-		}
-		srcRowPtr += bytesPerRow;
-	    }
-	    bm.bmBits = bits;
-	    bm.bmType = 0;
-	    bm.bmPlanes = 1;
-	    bm.bmBitsPixel = 1;
-	    hBitmap = CreateBitmapIndirect(&bm);
-	    Blt_Free(bits);
-	}
-	/* hBrush = CreatePatternBrush(twdPtr->bitmap.handle); */
-	hBrush = CreateHatchBrush(HS_VERTICAL, gc->foreground);
-	SetBrushOrgEx(hDC, gc->ts_x_origin, gc->ts_y_origin, NULL);
-	hPen = GetStockObject(NULL_PEN);
-	SetTextColor(hDC, gc->foreground);
-	SetBkMode(hDC, TRANSPARENT);
-	oldPen = SelectPen(hDC, hPen);
-	oldBrush = SelectBrush(hDC, hBrush);
-	if (gc->fill_style == FillOpaqueStippled) {
-	    SetBkColor(hDC, gc->background);
-	} else {
-	    SetBkMode(hDC, TRANSPARENT);
-	}
-	SetPolyFillMode(hDC, fillMode);
-	Polygon(hDC, winPts, nPoints);
-	SelectPen(hDC, oldPen), DeletePen(hPen);
-	SelectBrush(hDC, oldBrush), DeleteBrush(hBrush);
-#endif
-    } else {
-	HPEN hPen, oldPen;
-	HBRUSH hBrush, oldBrush;
-
-	/* 
-	 * FIXME: Right now, we're assuming that it's solid or
-	 * stippled and ignoring tiling. I'll merge the bits from
-	 * Blt_TilePolygon later. 
-	 */
-	hPen = GetStockObject(NULL_PEN);
-	oldPen = SelectPen(hDC, hPen);
-	hBrush = CreateSolidBrush(gc->foreground);
-	oldBrush = SelectBrush(hDC, hBrush);
-	SetPolyFillMode(hDC, fillMode);
-	Polygon(hDC, winPts, nPoints);
-	SelectPen(hDC, oldPen), DeletePen(hPen);
-	SelectBrush(hDC, oldBrush), DeleteBrush(hBrush);
-    }
-    Blt_Free(winPts);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-}
-
-
-static void
-DrawTextOut(
-    HDC hDC,			/* HDC to draw into. */
-    HFONT hFont,		/* Contains set of fonts to use when drawing
-				 * following string. */
-    const char *text,		/* Potentially multilingual UTF-8 string. */
-    size_t length,		/* Length of string in bytes. */
-    int x, int y)		/* Coordinates at which to place origin *
-				 * of string when drawing. */
-{
-    HFONT oldFont;
-    Tcl_Encoding encoding;
-    TEXTMETRIC tm;
-
-    oldFont = SelectFont(hDC, hFont);
-    encoding = Tcl_GetEncoding(NULL, "unicode");
-    GetTextMetrics(hDC, &tm);
-    x -= tm.tmOverhang /2;
-    if (encoding == NULL) {
-	TextOutA(hDC, x, y, text, length);
-    } else {
-	Tcl_DString ds;
-	const unsigned short *wideText;
-	int wideLength;
-
-	Tcl_DStringInit(&ds);
-	Tcl_UtfToExternalDString(encoding, text, length, &ds);
-	wideLength = Tcl_DStringLength(&ds) >> 1;
-	wideText = (const unsigned short *)Tcl_DStringValue(&ds);
-	TextOutW(hDC, x, y, wideText, wideLength);
-	Tcl_DStringFree(&ds);
-    }
-    SelectFont(hDC, oldFont);
-}
-
-void
-Blt_TextOut(
-    HDC hDC,
-    GC gc,			/* Graphics context for drawing characters. */
-    HFONT hFont,		/* Font in which characters will be drawn;
-				 * must be the same as font used in GC. */
-    const char *text,		/* UTF-8 string to be displayed.  Need not be
-				 * '\0' terminated.  All Tk meta-characters
-				 * (tabs, control characters, and newlines)
-				 * should be stripped out of the string that
-				 * is passed to this function.  If they are
-				 * not stripped out, they will be displayed as
-				 * regular printing characters. */
-    int nBytes,			/* Number of bytes in string. */
-    int x, int y)		/* Coordinates at which to place origin of
-				 * string when drawing. */
-{
-    TEXTMETRIC tm;
-
-
-    SetROP2(hDC, bltModes[gc->function]);
-    if ((gc->clip_mask != None) && 
-	((TkpClipMask*)gc->clip_mask)->type == TKP_CLIP_REGION) {
-        SelectClipRgn(hDC, (HRGN)((TkpClipMask*)gc->clip_mask)->value.region);
-    }
-    if (((gc->fill_style == FillStippled) || 
-	 (gc->fill_style == FillOpaqueStippled)) && 
-	(gc->stipple != None)) {
-	TkWinDrawable *twdPtr = (TkWinDrawable *)gc->stipple;
-	HBRUSH oldBrush, hBrush;
-	HBITMAP oldBitmap, hBitmap;
-	HDC memDC;
-	TEXTMETRIC tm;
-	SIZE size;
-
-	if (twdPtr->type != TWD_BITMAP) {
-	    Tcl_Panic("unexpected drawable type in stipple");
-	}
-
-	/*
-	 * Select stipple pattern into destination dc.
-	 */
-	memDC = CreateCompatibleDC(hDC);
-	hBrush = CreatePatternBrush(twdPtr->bitmap.handle);
-	SetBrushOrgEx(hDC, gc->ts_x_origin, gc->ts_y_origin, NULL);
-	oldBrush = SelectBrush(hDC, hBrush);
-
-	SetTextAlign(memDC, TA_LEFT | TA_BASELINE);
-	SetTextColor(memDC, gc->foreground);
-	SetBkMode(memDC, TRANSPARENT);
-	SetBkColor(memDC, RGB(0, 0, 0));
-
-	/*
-	 * Compute the bounding box and create a compatible bitmap.
-	 */
-	GetTextExtentPoint(memDC, text, nBytes, &size);
-	GetTextMetrics(memDC, &tm);
-	size.cx -= tm.tmOverhang;
-	hBitmap = CreateCompatibleBitmap(hDC, size.cx, size.cy);
-	oldBitmap = SelectBitmap(memDC, hBitmap);
-	/*
-	 * The following code is tricky because fonts are rendered in multiple
-	 * colors.  First we draw onto a black background and copy the white
-	 * bits.  Then we draw onto a white background and copy the black bits.
-	 * Both the foreground and background bits of the font are ANDed with
-	 * the stipple pattern as they are copied.
-	 */
-	PatBlt(memDC, 0, 0, size.cx, size.cy, BLACKNESS);
-	DrawTextOut(hDC, hFont, text, nBytes, x, y);
-	BitBlt(hDC, x, y-tm.tmAscent, size.cx, size.cy, memDC, 0, 0, 0xEA02E9);
-	PatBlt(memDC, 0, 0, size.cx, size.cy, WHITENESS);
-	DrawTextOut(hDC, hFont, text, nBytes, x, y);
-	BitBlt(hDC, x, y-tm.tmAscent, size.cx, size.cy, memDC, 0, 0, 0x8A0E06);
-
-	/*
-	 * Destroy the temporary bitmap and restore the device context.
-	 */
-	SelectBrush(memDC, oldBitmap);
-	DeleteBitmap(hBitmap);
-	DeleteDC(memDC);
-	SelectBrush(hDC, oldBrush);
-	DeleteBrush(hBrush);
-    } else if (gc->function == GXcopy) {
-	SetTextAlign(hDC, TA_LEFT | TA_BASELINE);
-	SetTextColor(hDC, gc->foreground);
-	SetBkMode(hDC, TRANSPARENT);
-	DrawTextOut(hDC, hFont, text, nBytes, x, y);
-    } else {
-	HBITMAP oldBitmap, hBitmap;
-	HDC memDC;
-	TEXTMETRIC tm;
-	SIZE size;
-
-	memDC = CreateCompatibleDC(hDC);
-	SetTextAlign(memDC, TA_LEFT | TA_BASELINE);
-	SetTextColor(memDC, gc->foreground);
-	SetBkMode(memDC, TRANSPARENT);
-	SetBkColor(memDC, RGB(0, 0, 0));
-
-	/*
-	 * Compute the bounding box and create a compatible bitmap.
-	 */
-	GetTextExtentPoint(memDC, text, nBytes, &size);
-	GetTextMetrics(memDC, &tm);
-	size.cx -= tm.tmOverhang;
-	hBitmap = CreateCompatibleBitmap(hDC, size.cx, size.cy);
-	oldBitmap = SelectObject(memDC, hBitmap);
-
-	DrawTextOut(memDC, hFont, text, nBytes, 0, tm.tmAscent);
-	BitBlt(hDC, x, y - tm.tmAscent, size.cx, size.cy, memDC, 0, 0, 
-		bltModes[gc->function]);
-	SelectBitmap(memDC, oldBitmap);
-	DeleteBitmap(hBitmap);
-	DeleteDC(memDC);
-    }
-}
diff --git a/blt3.0/src/bltWinFont.c b/blt3.0/src/bltWinFont.c
deleted file mode 100644
index 778aa5c..0000000
--- a/blt3.0/src/bltWinFont.c
+++ /dev/null
@@ -1,1684 +0,0 @@
-
-/*
- * bltWinFont.c --
- *
- * This module implements rotated fonts for the BLT toolkit.
- *
- *	Copyright 2005 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include <bltHash.h>
-#include "tkDisplay.h"
-#include "tkFont.h"
-
-#include "bltFont.h"
-
-#define WINDEBUG		0
-#define DEBUG_FONT_SELECTION	1
-#define DEBUG_FONT_SELECTION2	0
-
-typedef struct _Blt_Font _Blt_Font;
-
-enum FontTypes { 
-    FONT_UNKNOWN, 		/* Unknown font type. */
-    FONT_TK, 			/* Normal Tk font. */
-    FONT_WIN 			/* Windows font. */
-};
-
-#ifndef HAVE_LIBXFT
-#define FC_WEIGHT_THIN		    0
-#define FC_WEIGHT_EXTRALIGHT	    40
-#define FC_WEIGHT_ULTRALIGHT	    FC_WEIGHT_EXTRALIGHT
-#define FC_WEIGHT_LIGHT		    50
-#define FC_WEIGHT_BOOK		    75
-#define FC_WEIGHT_REGULAR	    80
-#define FC_WEIGHT_NORMAL	    FC_WEIGHT_REGULAR
-#define FC_WEIGHT_MEDIUM	    100
-#define FC_WEIGHT_DEMIBOLD	    180
-#define FC_WEIGHT_SEMIBOLD	    FC_WEIGHT_DEMIBOLD
-#define FC_WEIGHT_BOLD		    200
-#define FC_WEIGHT_EXTRABOLD	    205
-#define FC_WEIGHT_ULTRABOLD	    FC_WEIGHT_EXTRABOLD
-#define FC_WEIGHT_BLACK		    210
-#define FC_WEIGHT_HEAVY		    FC_WEIGHT_BLACK
-#define FC_WEIGHT_EXTRABLACK	    215
-#define FC_WEIGHT_ULTRABLACK	    FC_WEIGHT_EXTRABLACK
-
-#define FC_SLANT_ROMAN		    0
-#define FC_SLANT_ITALIC		    100
-#define FC_SLANT_OBLIQUE	    110
-
-#define FC_WIDTH_ULTRACONDENSED	    50
-#define FC_WIDTH_EXTRACONDENSED	    63
-#define FC_WIDTH_CONDENSED	    75
-#define FC_WIDTH_SEMICONDENSED	    87
-#define FC_WIDTH_NORMAL		    100
-#define FC_WIDTH_SEMIEXPANDED	    113
-#define FC_WIDTH_EXPANDED	    125
-#define FC_WIDTH_EXTRAEXPANDED	    150
-#define FC_WIDTH_ULTRAEXPANDED	    200
-
-#define FC_PROPORTIONAL		    0
-#define FC_DUAL			    90
-#define FC_MONO			    100
-#define FC_CHARCELL		    110
-
-#define FC_ANTIALIAS	    "antialias"		/* Bool (depends) */
-#define FC_AUTOHINT	    "autohint"		/* Bool (false) */
-#define FC_DECORATIVE	    "decorative"	/* Bool  */
-#define FC_EMBEDDED_BITMAP  "embeddedbitmap"	/* Bool  */
-#define FC_EMBOLDEN	    "embolden"		/* Bool */
-#define FC_FAMILY	    "family"		/* String */
-#define FC_GLOBAL_ADVANCE   "globaladvance"	/* Bool (true) */
-#define FC_HINTING	    "hinting"		/* Bool (true) */
-#define FC_MINSPACE	    "minspace"		/* Bool */
-#define FC_OUTLINE	    "outline"		/* Bool */
-#define FC_SCALABLE	    "scalable"		/* Bool */
-#define FC_SIZE		    "size"		/* Double */
-#define FC_SLANT	    "slant"		/* Int */
-#define FC_SPACING	    "spacing"		/* Int */
-#define FC_STYLE	    "style"		/* String */
-#define FC_VERTICAL_LAYOUT  "verticallayout"	/* Bool (false) */
-#define FC_WEIGHT	    "weight"		/* Int */
-#define FC_WIDTH	    "width"		/* Int */
-
-#endif
-
-#ifndef FC_WEIGHT_EXTRABLACK
-#define FC_WEIGHT_EXTRABLACK	    215
-#define FC_WEIGHT_ULTRABLACK	    FC_WEIGHT_EXTRABLACK
-#endif
-
-typedef struct {
-    char *family;
-    const char *weight;
-    const char *slant;
-    const char *width;
-    const char *spacing;
-    int size;			/* If negative, pixels, else points */
-} FontPattern;
-
-typedef struct {
-    const char *name;
-    int minChars;
-    const char *key;
-    int value;
-    const char *oldvalue;
-} FontSpec;
-    
-static FontSpec fontSpecs[] = {
-    { "black",        2, FC_WEIGHT,  FC_WEIGHT_BLACK,     "*"},
-    { "bold",         3, FC_WEIGHT,  FC_WEIGHT_BOLD,      "bold"},
-    { "book",         3, FC_WEIGHT,  FC_WEIGHT_MEDIUM,	  "medium"},
-    { "charcell",     2, FC_SPACING, FC_CHARCELL,	  "c"},
-    { "condensed",    2, FC_WIDTH,   FC_WIDTH_CONDENSED,  "condensed"},
-    { "demi",         4, FC_WEIGHT,  FC_WEIGHT_BOLD,      "semi"},
-    { "demibold",     5, FC_WEIGHT,  FC_WEIGHT_DEMIBOLD,  "semibold"},
-    { "dual",         2, FC_SPACING, FC_DUAL,		  "*"},
-    { "i",            1, FC_SLANT,   FC_SLANT_ITALIC,	  "i"},
-    { "italic",       2, FC_SLANT,   FC_SLANT_ITALIC,	  "i"},
-    { "light",        1, FC_WEIGHT,  FC_WEIGHT_LIGHT,	  "light"},
-    { "medium",       2, FC_WEIGHT,  FC_WEIGHT_MEDIUM,	  "medium"},
-    { "mono",         2, FC_SPACING, FC_MONO,		  "m"},
-    { "normal",       1, FC_WIDTH,   FC_WIDTH_NORMAL,	  "normal"},
-    { "o",            1, FC_SLANT,   FC_SLANT_OBLIQUE,	  "o"},
-    { "obilque",      2, FC_SLANT,   FC_SLANT_OBLIQUE,	  "o"},
-    { "overstrike",   2, NULL,       0,			  "*"},
-    { "proportional", 1, FC_SPACING, FC_PROPORTIONAL,	  "p"},
-    { "r",            1, FC_SLANT,   FC_SLANT_ROMAN,      "r"},
-    { "roman",        2, FC_SLANT,   FC_SLANT_ROMAN,      "r"},
-    { "semibold",     5, FC_WEIGHT,  FC_WEIGHT_DEMIBOLD,  "semibold"},
-    { "semicondensed",5, FC_WIDTH,   FC_WIDTH_SEMICONDENSED,  "semicondensed"},
-    { "underline",    1, NULL,       0,		          "*"},
-};
-static int nFontSpecs = sizeof(fontSpecs) / sizeof(FontSpec);
-
-static FontSpec weightSpecs[] ={
-    { "black",		2, FC_WEIGHT, FC_WEIGHT_BLACK,	    "bold"},
-    { "bold",		3, FC_WEIGHT, FC_WEIGHT_BOLD,	    "bold"},
-    { "book",		3, FC_WEIGHT, FC_WEIGHT_MEDIUM,	    "*"},
-    { "demi",		4, FC_WEIGHT, FC_WEIGHT_BOLD,	    "*"},
-    { "demibold",	5, FC_WEIGHT, FC_WEIGHT_DEMIBOLD,   "*"},
-    { "extrablack",	6, FC_WEIGHT, FC_WEIGHT_EXTRABLACK, "*"},
-    { "extralight",	6, FC_WEIGHT, FC_WEIGHT_EXTRALIGHT, "*"},
-    { "heavy",		1, FC_WEIGHT, FC_WEIGHT_HEAVY,      "*"},
-    { "light",		1, FC_WEIGHT, FC_WEIGHT_LIGHT,	    "light"},
-    { "medium",		1, FC_WEIGHT, FC_WEIGHT_MEDIUM,	    "medium"},
-    { "regular",	1, FC_WEIGHT, FC_WEIGHT_REGULAR,    "medium"},
-    { "semibold",	1, FC_WEIGHT, FC_WEIGHT_SEMIBOLD,   "semibold"},
-    { "thin",		1, FC_WEIGHT, FC_WEIGHT_THIN,       "thin"},
-    { "ultrablack",	7, FC_WEIGHT, FC_WEIGHT_ULTRABLACK, "*"},
-    { "ultrabold",	7, FC_WEIGHT, FC_WEIGHT_ULTRABOLD,  "*"},
-    { "ultralight",	6, FC_WEIGHT, FC_WEIGHT_ULTRALIGHT, "*"},
-};
-static int nWeightSpecs = sizeof(weightSpecs) / sizeof(FontSpec);
-
-static FontSpec slantSpecs[] ={
-    { "i",		1, FC_SLANT, FC_SLANT_ITALIC,	"i"},
-    { "italic",		2, FC_SLANT, FC_SLANT_ITALIC,	"i"},
-    { "o",		1, FC_SLANT, FC_SLANT_OBLIQUE,	"o"},
-    { "obilque",	3, FC_SLANT, FC_SLANT_OBLIQUE,	"o"},
-    { "r",		1, FC_SLANT, FC_SLANT_ROMAN,	"r"},
-    { "roman",		2, FC_SLANT, FC_SLANT_ROMAN,	"r"},
-};
-static int nSlantSpecs = sizeof(slantSpecs) / sizeof(FontSpec);
-
-static FontSpec spacingSpecs[] = {
-    { "charcell",     2, FC_SPACING, FC_CHARCELL,	  "c"},
-    { "dual",         2, FC_SPACING, FC_DUAL,		  "*"},
-    { "mono",         2, FC_SPACING, FC_MONO,		  "m"},
-    { "proportional", 1, FC_SPACING, FC_PROPORTIONAL,	  "p"},
-};
-static int nSpacingSpecs = sizeof(spacingSpecs) / sizeof(FontSpec);
-
-#ifdef notdef
-static FontSpec widthSpecs[] ={
-    { "condensed",	1, FC_WIDTH, FC_WIDTH_CONDENSED,      "condensed"},
-    { "expanded",	3, FC_WIDTH, FC_WIDTH_EXPANDED,	      "*"},
-    { "extracondensed", 6, FC_WIDTH, FC_WIDTH_EXTRACONDENSED, "*"},
-    { "extraexpanded",	6, FC_WIDTH, FC_WIDTH_EXTRAEXPANDED,  "*"},
-    { "normal",		1, FC_WIDTH, FC_WIDTH_NORMAL,	      "normal"},
-    { "semicondensed",	5, FC_WIDTH, FC_WIDTH_SEMICONDENSED,  "semicondensed"},
-    { "semiexpanded",	5, FC_WIDTH, FC_WIDTH_SEMIEXPANDED,   "*"},
-    { "ultracondensed",	6, FC_WIDTH, FC_WIDTH_ULTRACONDENSED, "*"},
-    { "ultraexpanded",	6, FC_WIDTH, FC_WIDTH_ULTRAEXPANDED,  "*"},
-};
-static int nWidthSpecs = sizeof(widthSpecs) / sizeof(FontSpec);
-
-static FontSpec boolSpecs[] ={
-    { "antialias",	1, FC_ANTIALIAS,	},
-    { "decorative",	1, FC_DECORATIVE,	},
-    { "embeddedbitmap", 4, FC_EMBEDDED_BITMAP,	},
-    { "embolden",	4, FC_EMBOLDEN,		},
-    { "globaladvance",	1, FC_GLOBAL_ADVANCE,	},
-    { "hinting",	1, FC_HINTING,		},
-    { "minspace",	1, FC_MINSPACE,		},
-    { "outline",	1, FC_OUTLINE,		},
-    { "scalable",	1, FC_SCALABLE,		},
-    { "verticallayout", 1, FC_VERTICAL_LAYOUT,	},
-};
-static int nBoolSpecs = sizeof(boolSpecs) / sizeof(FontSpec);
-#endif
-
-static Blt_HashTable fontTable;
-static Blt_HashTable aliasTable;
-static int initialized = 0;
-static void GetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr);
-
-enum XLFDFields { 
-    XLFD_FOUNDRY, 
-    XLFD_FAMILY, 
-    XLFD_WEIGHT, 
-    XLFD_SLANT,	
-    XLFD_SETWIDTH, 
-    XLFD_ADD_STYLE, 
-    XLFD_PIXEL_SIZE,
-    XLFD_POINT_SIZE, 
-    XLFD_RESOLUTION_X, 
-    XLFD_RESOLUTION_Y,
-    XLFD_SPACING, 
-    XLFD_AVERAGE_WIDTH, 
-    XLFD_CHARSET,
-    XLFD_NUMFIELDS
-};
-
-/* 
- * Freetype font container.
- */
-typedef struct {
-    char *name;			/* Name of the font (malloc-ed). */
-    int refCount;		/* Reference count for this structure.  When
-				 * refCount reaches zero, it means to free the
-				 * resources associated with this
-				 * structure. */
-
-    Blt_HashEntry *hashPtr;	/* Pointer to this entry in global font hash
-				 * table. Used to remove the entry from the
-				 * table. */
-
-    Blt_HashTable fontTable;	/* Hash table containing an Xft font for each
-				 * angle it's used at. Will always contain a 0
-				 * degree entry. */
-    Tk_Font tkfont;		
-
-} RotatedFont;
-
-static double
-PointsToPixels(Tk_Window tkwin, int size)
-{
-    double d;
-
-    if (size < 0) {
-        return -size;
-    }
-    d = size * 25.4 / 72.0;
-    d *= WidthOfScreen(Tk_Screen(tkwin));
-    d /= WidthMMOfScreen(Tk_Screen(tkwin));
-    return d;
-}
-
-static double
-PixelsToPoints(Tk_Window tkwin, int size)		
-{
-    double d;
-
-    if (size >= 0) {
-	return size;
-    }
-    d = -size * 72.0 / 25.4;
-    d *= WidthMMOfScreen(Tk_Screen(tkwin));
-    d /= WidthOfScreen(Tk_Screen(tkwin));
-    return d;
-}
-
-static void
-ParseXLFD(const char *fontName, int *argcPtr, char ***argvPtr)
-{
-    char *p, *pend, *desc, *buf;
-    size_t arrayLen, stringLen;
-    int count;
-    char **field;
-
-    arrayLen = (sizeof(char *) * (XLFD_NUMFIELDS + 1));
-    stringLen = strlen(fontName);
-    buf = Blt_AssertCalloc(1, arrayLen + stringLen + 1);
-    desc = buf + arrayLen;
-    strcpy(desc, fontName);
-    field = (char **)buf;
-
-    count = 0;
-    for (p = desc, pend = p + stringLen; p < pend; p++, count++) {
-	char *word;
-
-	field[count] = NULL;
-	/* Get the next word, separated by dashes (-). */
-	word = p;
-	while ((*p != '\0') && (*p != '-')) {
-	    if (((*p & 0x80) == 0) && Tcl_UniCharIsUpper(UCHAR(*p))) {
-		*p = (char)Tcl_UniCharToLower(UCHAR(*p));
-	    }
-	    p++;
-	}
-	if (*p != '\0') {
-	    *p = '\0';
-	}
-	if ((word[0] == '\0') || 
-	    (((word[0] == '*') || (word[0] == '?')) && (word[1] == '\0'))) {
-	    continue;		/* Field not specified. -- -*- -?- */
-	}
-	field[count] = word;
-    }
-
-    /*
-     * An XLFD of the form -adobe-times-medium-r-*-12-*-* is pretty common,
-     * but it is (strictly) malformed, because the first * is eliding both the
-     * Setwidth and the Addstyle fields. If the Addstyle field is a number,
-     * then assume the above incorrect form was used and shift all the rest of
-     * the fields right by one, so the number gets interpreted as a pixelsize.
-     * This fix is so that we don't get a million reports that "it works under
-     * X (as a native font name), but gives a syntax error under Windows (as a
-     * parsed set of attributes)".
-     */
-
-    if ((count > XLFD_ADD_STYLE) && (field[XLFD_ADD_STYLE] != NULL)) {
-	int dummy;
-
-	if (Tcl_GetInt(NULL, field[XLFD_ADD_STYLE], &dummy) == TCL_OK) {
-	    int j;
-	    
-	    for (j = XLFD_NUMFIELDS - 1; j >= XLFD_ADD_STYLE; j--) {
-		field[j + 1] = field[j];
-	    }
-	    field[XLFD_ADD_STYLE] = NULL;
-	    count++;
-	}
-    }
-    *argcPtr = count;
-    *argvPtr = field;
-
-    field[XLFD_NUMFIELDS] = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SearchForFontSpec --
- *
- *      Performs a binary search on the array of font specification to find a
- *      partial, anchored match for the given option string.
- *
- * Results:
- *	If the string matches unambiguously the index of the specification in
- *	the array is returned.  If the string does not match, even as an
- *	abbreviation, any operation, -1 is returned.  If the string matches,
- *	but ambiguously -2 is returned.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SearchForFontSpec(FontSpec *table, int nSpecs, const char *string, int length)
-{
-    char c;
-    int high, low;
-
-    low = 0;
-    high = nSpecs - 1;
-    c = tolower((unsigned char)string[0]);
-    while (low <= high) {
-	FontSpec *sp;
-	int compare;
-	int median;
-	
-	median = (low + high) >> 1;
-	sp = table + median;
-
-	/* Test the first character */
-	compare = c - sp->name[0];
-	if (compare == 0) {
-	    /* Now test the entire string */
-	    compare = strncasecmp(string, sp->name, length);
-	    if (compare == 0) {
-		if ((int)length < sp->minChars) {
-		    return -2;	/* Ambiguous spec name */
-		}
-	    }
-	}
-	if (compare < 0) {
-	    high = median - 1;
-	} else if (compare > 0) {
-	    low = median + 1;
-	} else {
-	    return median;	/* Spec found. */
-	}
-    }
-    return -1;			/* Can't find spec */
-}
-
-static FontSpec *
-FindSpec(FontSpec *tablePtr, int nSpecs, const char *string, int length)
-{
-    int n;
-    
-    n = SearchForFontSpec(tablePtr, nSpecs, string, length);
-    if (n < 0) {
-	if (n == -1) {
-	    fprintf(stderr, "unknown %s specification \"%s\"\n", 
-		    tablePtr[n].key, string);
-	}
-	if (n == -2) {
-	    fprintf(stderr, "ambiguous %s specification \"%s\"\n", 
-		    tablePtr[n].key, string);
-	}
-	return NULL;
-    }
-    return tablePtr + n;
-}
-
-
-typedef struct {
-    const char *name, *aliases[10];
-} FontAlias;
-
-static FontAlias xlfdFontAliases[] = {
-    { "math",		{"mathematica1", "courier"}},
-    { "serif",		{"times"}},
-    { "sans serif",	{ "arial" }},
-    { "monospace",	{ "courier new" }},
-    { NULL }
-};
-
-static void
-MakeAliasTable(Tk_Window tkwin)
-{
-    Blt_HashTable familyTable;
-    FontAlias *fp;
-    FontAlias *table;
-
-    Blt_InitHashTable(&familyTable, TCL_STRING_KEYS);
-    GetFontFamilies(tkwin, &familyTable);
-    Blt_InitHashTable(&aliasTable, TCL_STRING_KEYS);
-    table = xlfdFontAliases;
-    for(fp = table; fp->name != NULL; fp++) {
-	Blt_HashEntry *hPtr;
-	const char **alias;
-	   
-	for (alias = fp->aliases; *alias != NULL; alias++) {
-	    hPtr = Blt_FindHashEntry(&familyTable, *alias);
-	    if (hPtr != NULL) {
-		int isNew;
-		
-		hPtr = Blt_CreateHashEntry(&aliasTable, fp->name, &isNew);
-		Blt_SetHashValue(hPtr, *alias);
-		break;
-	    }
-	}
-    }
-    Blt_DeleteHashTable(&familyTable);
-}
-
-static const char *
-GetAlias(const char *family)
-{
-    Blt_HashEntry *hPtr;
-
-    strtolower((char *)family);
-    hPtr = Blt_FindHashEntry(&aliasTable, family);
-    if (hPtr != NULL) {
-	return Blt_GetHashValue(hPtr);
-    }
-    return family;
-}
-
-static Blt_NameOfFontProc		TkNameOfFontProc;
-static Blt_GetFontMetricsProc		TkGetFontMetricsProc;
-static Blt_FontIdProc			TkFontIdProc;
-static Blt_MeasureCharsProc		TkMeasureCharsProc;
-static Blt_TextWidthProc		TkTextWidthProc;
-static Blt_FreeFontProc			TkFreeFontProc;
-static Blt_DrawCharsProc		TkDrawCharsProc;
-static Blt_PostscriptFontNameProc	TkPostscriptFontNameProc;
-static Blt_FamilyOfFontProc		TkFamilyOfFontProc;
-static Blt_CanRotateFontProc		TkCanRotateFontProc;
-static Blt_UnderlineCharsProc		TkUnderlineCharsProc;
-
-static Blt_FontClass tkFontClass = {
-    FONT_TK,
-    TkNameOfFontProc,		/* Blt_NameOfFontProc */
-    TkFamilyOfFontProc,		/* Blt_FamilyOfFontProc */
-    TkFontIdProc,		/* Blt_FontIdProc */
-    TkGetFontMetricsProc,	/* Blt_GetFontMetricsProc */
-    TkMeasureCharsProc,		/* Blt_MeasureCharsProc */
-    TkTextWidthProc,		/* Blt_TextWidthProc */
-    TkCanRotateFontProc,	/* Blt_CanRotateFontProc */
-    TkDrawCharsProc,		/* Blt_DrawCharsProc */
-    TkPostscriptFontNameProc,	/* Blt_PostscriptFontNameProc */
-    TkFreeFontProc,		/* Blt_FreeFontProc */
-    TkUnderlineCharsProc,	/* Blt_UnderlineCharsProc */
-};
-
-static FontPattern *
-NewFontPattern(void)
-{
-    FontPattern *patternPtr;
-
-    patternPtr = Blt_Calloc(1, sizeof(FontPattern));
-    return patternPtr;
-}
-
-static void
-FreeFontPattern(FontPattern *patternPtr)
-{
-    if (patternPtr->family != NULL) {
-	Blt_Free((char *)patternPtr->family);
-    }
-    Blt_Free(patternPtr);
-}
-
-static int CALLBACK
-FontFamilyEnumProc(
-    ENUMLOGFONT *lfPtr,		/* Logical-font data. */
-    NEWTEXTMETRIC *tmPtr,	/* Physical-font data (not used). */
-    int fontType,		/* Type of font (not used). */
-    LPARAM lParam)		/* Result object to hold result. */
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashTable *tablePtr;
-    Tcl_DString ds;
-    const char *faceName;
-    Tcl_Encoding encoding;
-    int isNew;
-
-    tablePtr = (Blt_HashTable *)lParam;
-    faceName = lfPtr->elfLogFont.lfFaceName;
-    encoding = Tcl_GetEncoding(NULL, "Unicode");
-    Tcl_ExternalToUtfDString(encoding, faceName, -1, &ds);
-    faceName = Tcl_DStringValue(&ds);
-    strtolower((char *)faceName);
-    hPtr = Blt_CreateHashEntry(tablePtr, faceName, &isNew);
-    Blt_SetHashValue(hPtr, NULL);
-    Tcl_DStringFree(&ds);
-    return 1;
-}
-
-static void
-GetFontFamilies(Tk_Window tkwin, Blt_HashTable *tablePtr)
-{    
-    HDC hDC;
-    HWND hWnd;
-    Window window;
-
-    window = Tk_WindowId(tkwin);
-    hWnd = (window == None) ? (HWND)NULL : Tk_GetHWND(window);
-    hDC = GetDC(hWnd);
-
-    /*
-     * On any version NT, there may fonts with international names.  
-     * Use the NT-only Unicode version of EnumFontFamilies to get the 
-     * font names.  If we used the ANSI version on a non-internationalized 
-     * version of NT, we would get font names with '?' replacing all 
-     * the international characters.
-     *
-     * On a non-internationalized verson of 95, fonts with international
-     * names are not allowed, so the ANSI version of EnumFontFamilies will 
-     * work.  On an internationalized version of 95, there may be fonts with 
-     * international names; the ANSI version will work, fetching the 
-     * name in the system code page.  Can't use the Unicode version of 
-     * EnumFontFamilies because it only exists under NT.
-     */
-
-    if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	EnumFontFamiliesW(hDC, NULL, (FONTENUMPROCW)FontFamilyEnumProc,
-		(LPARAM)tablePtr);
-    } else {
-	EnumFontFamiliesA(hDC, NULL, (FONTENUMPROCA)FontFamilyEnumProc,
-		(LPARAM)tablePtr);
-    }	    
-    ReleaseDC(hWnd, hDC);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseTkDesc --
- *
- *	Parses an array of Tcl_Objs as a Tk style font description .  
- *	
- *	      "family [size] [optionList]"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a  Tk font description.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static FontPattern *
-ParseTkDesc(int objc, Tcl_Obj **objv)
-{
-    FontPattern *patternPtr;
-    Tcl_Obj **aobjv;
-    int aobjc;
-    int i;
-
-    patternPtr = NewFontPattern();
-
-    /* Font family. */
-    {
-	char *family, *dash;
-	family = Tcl_GetString(objv[0]);
-	dash = strchr(family, '-');
-	if (dash != NULL) {
-	    int size;
-	    
-	    if (Tcl_GetInt(NULL, dash + 1, &size) != TCL_OK) {
-		goto error;
-	    }
-	    patternPtr->size = size;
-	}
-	if (dash != NULL) {
-	    *dash = '\0';
-	}
-	patternPtr->family = Blt_AssertStrdup(GetAlias(family));
-	if (dash != NULL) {
-	    *dash = '-';
-	    i = 1;
-	}
-	objv++, objc--;
-    }
-    if (objc > 0) {
-	int size;
-
-	if (Tcl_GetIntFromObj(NULL, objv[0], &size) == TCL_OK) {
-	    patternPtr->size = size;
-	    objv++, objc--;
-	}
-    }
-    aobjc = objc, aobjv = objv;
-    if (objc > 0) {
-	if (Tcl_ListObjGetElements(NULL, objv[0], &aobjc, &aobjv) != TCL_OK) {
-	    goto error;
-	}
-    }
-    for (i = 0; i < aobjc; i++) {
-	FontSpec *specPtr;
-	const char *key;
-	int length;
-
-	key = Tcl_GetStringFromObj(aobjv[i], &length);
-	specPtr = FindSpec(fontSpecs, nFontSpecs, key, length);
-	if (specPtr == NULL) {
-	    goto error;
-	}
-	if (specPtr->key == NULL) {
-	    continue;
-	}
-	if (strcmp(specPtr->key, FC_WEIGHT) == 0) {
-	    patternPtr->weight = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_SLANT) == 0) {
-	    patternPtr->slant = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_SPACING) == 0) {
-	    patternPtr->spacing = specPtr->oldvalue;
-	} else if (strcmp(specPtr->key, FC_WIDTH) == 0) {
-	    patternPtr->width = specPtr->oldvalue;
-	}
-    }
-    return patternPtr;
- error:
-    FreeFontPattern(patternPtr);
-    return NULL;
-}	
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseNameValuePairs --
- *
- *	Given Tcl_Obj list of name value pairs, parse the list saving in the
- *	values in a font pattern structure.
- *	
- *	      "-family family -size size -weight weight"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a valid name-value list 
- *	describing a font.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static FontPattern *
-ParseNameValuePairs(Tcl_Interp *interp, Tcl_Obj *objPtr) 
-{
-    FontPattern *patternPtr;
-    Tcl_Obj **objv;
-    int objc;
-    int i;
-
-    if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) ||
-	(objc < 1)) {
-	return NULL;		/* Can't split list or list is empty. */
-    }
-    if (objc & 0x1) {
-	return NULL;		/* Odd number of elements in list. */
-    }
-    patternPtr = NewFontPattern();
-    for (i = 0; i < objc; i += 2) {
-	const char *key, *value;
-	int length;
-
-	key = Tcl_GetString(objv[i]);
-	value = Tcl_GetStringFromObj(objv[i+1], &length);
-	if (strcmp(key, "-family") == 0) {
-	    if (patternPtr->family != NULL) {
-		Blt_Free(patternPtr->family);
-	    }
-	    patternPtr->family = Blt_AssertStrdup(GetAlias(value));
-	} else if (strcmp(key, "-size") == 0) {
-	    int size;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i+1], &size) != TCL_OK) {
-		goto error;
-	    }
-	    patternPtr->size = size;
-	} else if (strcmp(key, "-weight") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(weightSpecs, nWeightSpecs, value, length);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->weight = specPtr->oldvalue;
-	} else if (strcmp(key, "-slant") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(slantSpecs, nSlantSpecs, value, length);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->slant = specPtr->oldvalue;
-	} else if (strcmp(key, "-spacing") == 0) {
-	    FontSpec *specPtr;
-
-	    specPtr = FindSpec(spacingSpecs, nSpacingSpecs, value, length);
-	    if (specPtr == NULL) {
-		goto error;
-	    }
-	    patternPtr->spacing = specPtr->oldvalue;
-	} else if (strcmp(key, "-hint") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-rgba") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-underline") == 0) {
-	    /* Ignore */
-	} else if (strcmp(key, "-overstrike") == 0) {
-	    /* Ignore */
-	} else {
-	    /* Ignore */
-	}
-    }
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "found TkAttrList => Tk font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-#endif
-    return patternPtr;
- error:
-    FreeFontPattern(patternPtr);
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ParseFontObj --
- *
- *	Given the name of a Tk font object, get its configuration values 
- *	save the data in a font pattern structure.
- *	
- *	      "-family family -size size -weight weight"
- *
- * Results:
- *	Returns a pattern structure, filling in with the necessary fields.
- *	Returns NULL if objv doesn't contain a valid name-value list 
- *	describing a font.
- *
- * Side effects:
- *	Memory is allocated for the font pattern and the its strings.
- *
- *---------------------------------------------------------------------------
- */
-static FontPattern *
-ParseFontObj(Tcl_Interp *interp, Tcl_Obj *objPtr) 
-{
-    FontPattern *patternPtr;
-    Tcl_Obj *cmd[3];
-    int result;
-
-    patternPtr = NULL;
-    cmd[0] = Tcl_NewStringObj("font", -1);
-    cmd[1] = Tcl_NewStringObj("configure", -1);
-    cmd[2] = objPtr;
-    Tcl_IncrRefCount(cmd[0]);
-    Tcl_IncrRefCount(cmd[1]);
-    Tcl_IncrRefCount(cmd[2]);
-    result = Tcl_EvalObjv(interp, 3, cmd, 0);
-    Tcl_DecrRefCount(cmd[2]);
-    Tcl_DecrRefCount(cmd[1]);
-    Tcl_DecrRefCount(cmd[0]);
-    if (result == TCL_OK) {
-	patternPtr = ParseNameValuePairs(interp, Tcl_GetObjResult(interp));
-    }
-    Tcl_ResetResult(interp);
-#if DEBUG_FONT_SELECTION
-    if (patternPtr != NULL) {
-	fprintf(stderr, "found FontObject => Tk font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-    }
-#endif
-    return patternPtr;
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * GetPattern --
- * 
- *	Parses the font description so that the font can rewritten with an
- *	aliased font name.  This allows us to use
- *
- *	  "Sans Serif", "Serif", "Math", "Monospace"
- *
- *	font names that correspond to the proper font regardless if the
- *	standard X fonts or XFT fonts are being used.
- *
- *	Leave XLFD font descriptions alone.  Let users describe exactly the
- *	font they wish.
- *
- *---------------------------------------------------------------------------
- */
-static FontPattern *
-GetPattern(Tcl_Interp *interp, Tcl_Obj *objPtr)
-{
-    FontPattern *patternPtr;
-    const char *desc;
-
-    desc = Tcl_GetString(objPtr);
-    while (isspace(UCHAR(*desc))) {
-	desc++;			/* Skip leading blanks. */
-    }
-    if (*desc == '-') {
-	/* 
-	 * Case 1: XLFD font description or Tk attribute list.   
-	 *
-	 *   If the font description starts with a '-', it could be either an
-	 *   old fashion XLFD font description or a Tk font attribute
-	 *   option-value list.
-	 */
-	patternPtr = ParseNameValuePairs(interp, objPtr);
-	if (patternPtr == NULL) {
-	    return NULL;		/* XLFD font description */
-	}
-    } else if (*desc == '*') {
-	return NULL;		/* XLFD font description */
-    } else if (strpbrk(desc, "::") != NULL) {
-	patternPtr = ParseFontObj(interp, objPtr);
-    } else {
-	int objc;
-	Tcl_Obj **objv;
-	/* 
-	 * Case 3: Tk-style description.   
-	 */
-	if ((Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv) != TCL_OK) || 
-	    (objc < 1)) {
-	    return NULL;		/* Can't split into a list or
-					 * list is empty. */
-	}
-	patternPtr = NULL;
-	if (objc == 1) {
-	    /* 
-	     * Case 3a: Tk font object name.
-	     *
-	     *   Assuming that Tk font object names won't contain whitespace,
-	     *   see if its a font object.
-	     */
-	    patternPtr = ParseFontObj(interp, objv[0]);
-	} 
-	if (patternPtr == NULL) {
-	    /* 
-	     * Case 3b: List of font attributes in the form "family size
-	     *		?attrs?"
-	     */
-	    patternPtr = ParseTkDesc(objc, objv);
-	}
-    }	
-    return patternPtr;
-}
-
-static void
-WriteXLFDDescription(Tk_Window tkwin, FontPattern *patternPtr, 
-		       Tcl_DString *resultPtr)
-{
-    int size;
-    
-    /* Rewrite the font description using the aliased family. */
-    Tcl_DStringInit(resultPtr);
-
-    /* Family */
-    if (patternPtr->family != NULL) {
-	Tcl_DStringAppendElement(resultPtr, "-family");
-	Tcl_DStringAppendElement(resultPtr, patternPtr->family);
-    }
-    /* Weight */
-    if (patternPtr->weight != NULL) {
-	Tcl_DStringAppendElement(resultPtr, "-weight");
-	Tcl_DStringAppendElement(resultPtr, patternPtr->weight);
-    }
-    /* Slant */
-    if (patternPtr->slant != NULL) {
-	Tcl_DStringAppendElement(resultPtr, "-slant");
-	Tcl_DStringAppendElement(resultPtr, patternPtr->slant);
-    }
-    /* Width */
-    if (patternPtr->width != NULL) {
-	Tcl_DStringAppendElement(resultPtr, "-width");
-	Tcl_DStringAppendElement(resultPtr, patternPtr->width);
-    }
-    /* Size */
-    Tcl_DStringAppendElement(resultPtr, "-size");
-    size = (int)(PointsToPixels(tkwin, patternPtr->size) + 0.5);
-    size = patternPtr->size;
-    Tcl_DStringAppendElement(resultPtr, Blt_Itoa(size));
-}
-    
-
-static Tk_Font 
-OpenTkFont(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    Tk_Font tkFont;
-    FontPattern *patternPtr;
-    Blt_HashEntry *hPtr;
-    const char *desc;
-
-    desc = Tcl_GetString(objPtr);
-    hPtr = Blt_FindHashEntry(&fontTable, desc);
-    patternPtr = GetPattern(interp, objPtr);
-    if (patternPtr == NULL) {
-	tkFont = Tk_GetFont(interp, tkwin, Tcl_GetString(objPtr));
-    } else {
-	Tcl_DString ds;
-
-	/* Rewrite the font description using the aliased family. */
-	WriteXLFDDescription(tkwin, patternPtr, &ds);
-	tkFont = Tk_GetFont(interp, tkwin, Tcl_DStringValue(&ds));
-	fprintf(stderr, "Tkfont: %s => %s\n", Tcl_GetString(objPtr),
-		Tcl_DStringValue(&ds));
-	Tcl_DStringFree(&ds);
-	FreeFontPattern(patternPtr);
-    }
-    return tkFont;
-}
-
-
-static const char *
-TkNameOfFontProc(_Blt_Font *fontPtr) 
-{
-    return Tk_NameOfFont(fontPtr->clientData);
-}
-
-static const char *
-TkFamilyOfFontProc(_Blt_Font *fontPtr) 
-{
-    return ((TkFont *)fontPtr->clientData)->fa.family;
-}
-
-static Font
-TkFontIdProc(_Blt_Font *fontPtr) 
-{
-    return Tk_FontId(fontPtr->clientData);
-}
-
-static void
-TkGetFontMetricsProc(_Blt_Font *fontPtr, Blt_FontMetrics *fmPtr)
-{
-    TkFont *tkFontPtr = fontPtr->clientData;
-    Tk_FontMetrics fm;
-
-    Tk_GetFontMetrics(fontPtr->clientData, &fm);
-    fmPtr->ascent = fm.ascent;
-    fmPtr->descent = fm.descent;
-    fmPtr->linespace = fm.linespace;
-    fmPtr->tabWidth = tkFontPtr->tabWidth;
-    fmPtr->underlinePos = tkFontPtr->underlinePos;
-    fmPtr->underlineHeight = tkFontPtr->underlineHeight;
-}
-
-static int
-TkMeasureCharsProc(_Blt_Font *fontPtr, const char *text, int nBytes, int max, 
-		   int flags, int *lengthPtr)
-{
-    return Tk_MeasureChars(fontPtr->clientData, text, nBytes, max, flags, 
-	lengthPtr);
-}
-
-static int
-TkTextWidthProc(_Blt_Font *fontPtr, const char *string, int nBytes)
-{
-    return Tk_TextWidth(fontPtr->clientData, string, nBytes);
-}    
-
-static void
-TkDrawCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for drawing characters. */
-    _Blt_Font *fontPtr,		/* Font in which characters will be drawn;
-				 * must be the same as font used in GC. */
-    int depth,			/* Not used. */
-    float angle,		/* Not used. */
-    const char *text,		/* UTF-8 string to be displayed.  Need not be
-				 * '\0' terminated.  All Tk meta-characters
-				 * (tabs, control characters, and newlines)
-				 * should be stripped out of the string that
-				 * is passed to this function.  If they are
-				 * not stripped out, they will be displayed as
-				 * regular printing characters. */
-    int nBytes,			/* Number of bytes in string. */
-    int x, int y)		/* Coordinates at which to place origin of
-				 * string when drawing. */
-{
-    Tk_DrawChars(display, drawable, gc, fontPtr->clientData, text, nBytes, 
-		 x, y);
-}
-
-static int
-TkPostscriptFontNameProc(_Blt_Font *fontPtr, Tcl_DString *resultPtr) 
-{
-    return Tk_PostscriptFontName(fontPtr->clientData, resultPtr);
-}
-
-static int
-TkCanRotateFontProc(_Blt_Font *fontPtr, float angle) 
-{
-    return FALSE;
-}
-
-static void
-TkFreeFontProc(_Blt_Font *fontPtr) 
-{
-    Tk_FreeFont(fontPtr->clientData);
-    Blt_Free(fontPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkUnderlineCharsProc --
- *
- *	This procedure draws an underline for a given range of characters in a
- *	given string.  It doesn't draw the characters (which are assumed to
- *	have been displayed previously); it just draws the underline.  This
- *	procedure would mainly be used to quickly underline a few characters
- *	without having to construct an underlined font.  To produce properly
- *	underlined text, the appropriate underlined font should be constructed
- *	and used.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets displayed in "drawable".
- *
- *---------------------------------------------------------------------------
- */
-static void
-TkUnderlineCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for actually drawing
-				 * line. */
-    _Blt_Font *fontPtr,		/* Font used in GC; must have been
-				 * allocated by Tk_GetFont().  Used for
-				 * character dimensions, etc. */
-    const char *string,		/* String containing characters to be
-				 * underlined or overstruck. */
-    int x, int y,		/* Coordinates at which first character of
-				 * string is drawn. */
-    int first,			/* Byte offset of the first character. */
-    int last)			/* Byte offset after the last character. */
-{
-    Tk_UnderlineChars(display, drawable, gc, fontPtr->clientData, string, x, y, 
-	first, last);
-}
-
-static Blt_NameOfFontProc		WinNameOfFontProc;
-static Blt_GetFontMetricsProc		WinGetFontMetricsProc;
-static Blt_FontIdProc			WinFontIdProc;
-static Blt_MeasureCharsProc		WinMeasureCharsProc;
-static Blt_TextWidthProc		WinTextWidthProc;
-static Blt_FreeFontProc			WinFreeFontProc;
-static Blt_DrawCharsProc		WinDrawCharsProc;
-static Blt_PostscriptFontNameProc	WinPostscriptFontNameProc;
-static Blt_FamilyOfFontProc		WinFamilyOfFontProc;
-static Blt_CanRotateFontProc		WinCanRotateFontProc;
-static Blt_UnderlineCharsProc		WinUnderlineCharsProc;
-
-static Blt_FontClass winFontClass = {
-    FONT_WIN,
-    WinNameOfFontProc,		/* Blt_NameOfFontProc */
-    WinFamilyOfFontProc,	/* Blt_FamilyOfFontProc */
-    WinFontIdProc,		/* Blt_FontIdProc */
-    WinGetFontMetricsProc,	/* Blt_GetFontMetricsProc */
-    WinMeasureCharsProc,	/* Blt_MeasureCharsProc */
-    WinTextWidthProc,		/* Blt_TextWidthProc */
-    WinCanRotateFontProc,	/* Blt_CanRotateFontProc */
-    WinDrawCharsProc,		/* Blt_DrawCharsProc */
-    WinPostscriptFontNameProc,	/* Blt_PostscriptFontNameProc */
-    WinFreeFontProc,		/* Blt_FreeFontProc */
-    WinUnderlineCharsProc,	/* Blt_UnderlineCharsProc */
-};
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateRotatedFont --
- *
- *	Creates a rotated copy of the given font.  This only works for
- *	TrueType fonts.
- *
- * Results:
- *	Returns the newly create font or NULL if the font could not be
- *	created.
- *
- *---------------------------------------------------------------------------
- */
-static HFONT
-CreateRotatedFont(
-    TkFont *fontPtr,		/* Font identifier (actually a Tk_Font) */
-    long angle10)
-{				/* Number of degrees to rotate font */
-    TkFontAttributes *faPtr;	/* Set of attributes to match. */
-    HFONT hfont;
-    LOGFONTW lf;
-
-    faPtr = &fontPtr->fa;
-    ZeroMemory(&lf, sizeof(LOGFONT));
-    lf.lfHeight = -faPtr->size;
-    if (lf.lfHeight < 0) {
-	HDC dc;
-
-	dc = GetDC(NULL);
-	lf.lfHeight = -MulDiv(faPtr->size, GetDeviceCaps(dc, LOGPIXELSY), 72);
-	ReleaseDC(NULL, dc);
-    }
-    lf.lfWidth = 0;
-    lf.lfEscapement = lf.lfOrientation = angle10;
-#define TK_FW_NORMAL	0
-    lf.lfWeight = (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD;
-    lf.lfItalic = faPtr->slant;
-    lf.lfUnderline = faPtr->underline;
-    lf.lfStrikeOut = faPtr->overstrike;
-    lf.lfCharSet = DEFAULT_CHARSET;
-    lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;
-    lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
-    lf.lfQuality = DEFAULT_QUALITY;
-    lf.lfQuality = ANTIALIASED_QUALITY;
-    lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
-
-    hfont = NULL;
-    if (faPtr->family == NULL) {
-	lf.lfFaceName[0] = '\0';
-    } else {
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-	Tcl_DString dString;
-	Tcl_Encoding encoding;
-
-	encoding = Tcl_GetEncoding(NULL, "unicode");
-	Tcl_UtfToExternalDString(encoding, faPtr->family, -1, &dString);
-	if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	    Tcl_UniChar *src, *dst;
-	    
-	    /*
-	     * We can only store up to LF_FACESIZE wide characters
-	     */
-	    if (Tcl_DStringLength(&dString) >= (LF_FACESIZE * sizeof(WCHAR))) {
-		Tcl_DStringSetLength(&dString, LF_FACESIZE);
-	    }
-	    src = (Tcl_UniChar *)Tcl_DStringValue(&dString);
-	    dst = (Tcl_UniChar *)lf.lfFaceName;
-	    while (*src != '\0') {
-		*dst++ = *src++;
-	    }
-	    *dst = '\0';
-	    hfont = CreateFontIndirectW((LOGFONTW *)&lf);
-	} else {
-	    /*
-	     * We can only store up to LF_FACESIZE characters
-	     */
-	    if (Tcl_DStringLength(&dString) >= LF_FACESIZE) {
-		Tcl_DStringSetLength(&dString, LF_FACESIZE);
-	    }
-	    strcpy((char *)lf.lfFaceName, Tcl_DStringValue(&dString));
-	    hfont = CreateFontIndirectA((LOGFONTA *)&lf);
-	}
-	Tcl_DStringFree(&dString);
-#else
-	strncpy((char *)lf.lfFaceName, faPtr->family, LF_FACESIZE - 1);
-	lf.lfFaceName[LF_FACESIZE] = '\0';
-#endif /* _TCL_VERSION >= 8.1.0 */
-    }
-
-    if (hfont == NULL) {
-#if WINDEBUG
-	PurifyPrintf("can't create font: %s\n", Blt_LastError());
-#endif
-    } else { 
-	HFONT oldFont;
-	TEXTMETRIC tm;
-	HDC hdc;
-	int result;
-
-	/* Check if the rotated font is really a TrueType font. */
-
-	hdc = GetDC(NULL);		/* Get the desktop device context */
-	oldFont = SelectFont(hdc, hfont);
-	result = ((GetTextMetrics(hdc, &tm)) && 
-		  (tm.tmPitchAndFamily & TMPF_TRUETYPE));
-	SelectFont(hdc, oldFont);
-	ReleaseDC(NULL, hdc);
-	if (!result) {
-#if WINDEBUG
-	    PurifyPrintf("not a true type font\n");
-#endif
-	    DeleteFont(hfont);
-	    return NULL;
-	}
-    }
-    return hfont;
-}
-
-static void
-DestroyFont(RotatedFont *rotFontPtr)
-{
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-    
-    for (hPtr = Blt_FirstHashEntry(&rotFontPtr->fontTable, &cursor); 
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	HFONT hfont;
-	
-	hfont = Blt_GetHashValue(hPtr);
-	DeleteFont(hfont);
-    }
-    Tk_FreeFont(rotFontPtr->tkfont);
-    Blt_DeleteHashTable(&rotFontPtr->fontTable);
-    Blt_DeleteHashEntry(&fontTable, rotFontPtr->hashPtr);
-    Blt_Free(rotFontPtr);
-}
-
-/* 
- *---------------------------------------------------------------------------
- *
- * GetRotatedFontFromObj --
- * 
- *	Opens a Tk font based on the description in the Tcl_Obj.  We first
- *	parse the description and if necessary rewrite it using the proper
- *	font aliases.  The font names
- *
- *	  "Sans Serif", "Serif", "Math", "Monospace"
- *
- *	correspond to the proper font regardless if the standard X fonts or
- *	XFT fonts are being used.
- *
- *	Leave XLFD font descriptions alone.  Let users describe exactly the
- *	font they wish.
- *
- *	Outside of reimplementing the Tk font mechanism, rewriting the
- *	font allows use to better handle programs that must work with
- *	X servers with and without the XRender extension.  It means 
- *	that the widget's default font settings do not have to use
- *	XLFD fonts even if XRender is available.
- *	
- *---------------------------------------------------------------------------
- */
-static RotatedFont *
-GetRotatedFontFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
-{
-    Blt_HashEntry *hPtr;
-    RotatedFont *rotFontPtr;
-    const char *desc;
-    int isNew;
-
-    desc = Tcl_GetString(objPtr);
-    while (isspace(UCHAR(*desc))) {
-	desc++;			/* Skip leading blanks. */
-    }
-    /* Is the font already in the cache? */
-    hPtr = Blt_CreateHashEntry(&fontTable, desc, &isNew);
-    if (isNew) {
-	Tk_Font tkFont;
-
-	tkFont = OpenTkFont(interp, tkwin, objPtr);
-	if (tkFont == NULL) {
-	    Blt_DeleteHashEntry(&fontTable, hPtr);
-	    return NULL;
-	}
-	rotFontPtr = Blt_AssertMalloc(sizeof(RotatedFont));
-	rotFontPtr->refCount = 1;
-	rotFontPtr->tkfont = tkFont;
-	rotFontPtr->name = Blt_AssertStrdup(desc);
-	Blt_SetHashValue(hPtr, rotFontPtr);
-	Blt_InitHashTable(&rotFontPtr->fontTable, BLT_ONE_WORD_KEYS);
-    } else {
-	rotFontPtr = Tcl_GetHashValue(hPtr);
-	rotFontPtr->refCount++;
-    }
-    return rotFontPtr;
-}
-
-static const char *
-WinNameOfFontProc(_Blt_Font *fontPtr) 
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return Tk_NameOfFont(rotFontPtr->tkfont);
-}
-
-static const char *
-WinFamilyOfFontProc(_Blt_Font *fontPtr) 
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return ((TkFont *)rotFontPtr->tkfont)->fa.family;
-}
-
-static Font
-WinFontIdProc(_Blt_Font *fontPtr) 
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return Tk_FontId(rotFontPtr->tkfont);
-}
-
-static void
-WinGetFontMetricsProc(_Blt_Font *fontPtr, Blt_FontMetrics *fmPtr)
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-    TkFont *tkFontPtr = (TkFont *)rotFontPtr->tkfont;
-    Tk_FontMetrics fm;
-
-    Tk_GetFontMetrics(rotFontPtr->tkfont, &fm);
-    fmPtr->ascent = fm.ascent;
-    fmPtr->descent = fm.descent;
-    fmPtr->linespace = fm.linespace;
-    fmPtr->tabWidth = tkFontPtr->tabWidth;
-    fmPtr->underlinePos = tkFontPtr->underlinePos;
-    fmPtr->underlineHeight = tkFontPtr->underlineHeight;
-}
-
-static int
-WinMeasureCharsProc(_Blt_Font *fontPtr, const char *text, int nBytes,
-		   int max, int flags, int *lengthPtr)
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return Tk_MeasureChars(rotFontPtr->tkfont, text, nBytes, max, flags, 
-		lengthPtr);
-}
-
-static int
-WinTextWidthProc(_Blt_Font *fontPtr, const char *text, int nBytes)
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return Tk_TextWidth(rotFontPtr->tkfont, text, nBytes);
-}    
-
-
-static void
-WinDrawCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for drawing characters. */
-    _Blt_Font *fontPtr,		/* Font in which characters will be drawn;
-				 * must be the same as font used in GC. */
-    int depth,			/* Not used. */
-    float angle,		/* Not used. */
-    const char *text,		/* UTF-8 string to be displayed.  Need not be
-				 * '\0' terminated.  All Tk meta-characters
-				 * (tabs, control characters, and newlines)
-				 * should be stripped out of the string that
-				 * is passed to this function.  If they are
-				 * not stripped out, they will be displayed as
-				 * regular printing characters. */
-    int nBytes,			/* Number of bytes in string. */
-    int x, int y)		/* Coordinates at which to place origin of
-				 * string when drawing. */
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    if (angle != 0.0) {
-	long angle10;
-	Blt_HashEntry *hPtr;
-    
-	angle *= 10.0f;
-	angle10 = ROUND(angle);
-	hPtr = Blt_FindHashEntry(&rotFontPtr->fontTable, (char *)angle10);
-	if (hPtr == NULL) {
-	    fprintf(stderr, "can't find font %s at %g rotated\n", 
-		    rotFontPtr->name, angle);
-           return;		/* Can't find instance at requested angle. */
-	}
-	display->request++;
-	if (drawable != None) {
-	    HDC hdc;
-	    HFONT hfont;
-	    TkWinDCState state;
-	    
-	    hfont = Blt_GetHashValue(hPtr);
-	    hdc = TkWinGetDrawableDC(display, drawable, &state);
-	    Blt_TextOut(hdc, gc, hfont, text, nBytes, x, y);
-	    TkWinReleaseDrawableDC(drawable, hdc, &state);
-	}
-    } else {
-	Tk_DrawChars(display, drawable, gc, rotFontPtr->tkfont, text, nBytes, 
-		     x, y);
-    }
-}
-
-
-static int
-WinPostscriptFontNameProc(_Blt_Font *fontPtr, Tcl_DString *resultPtr) 
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    return Tk_PostscriptFontName(rotFontPtr->tkfont, resultPtr);
-}
-
-static int
-WinCanRotateFontProc(_Blt_Font *fontPtr, float angle) 
-{
-    Blt_HashEntry *hPtr;
-    HFONT hfont;
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-    int isNew;
-    long angle10;
-
-    angle *= 10.0f;
-    angle10 = ROUND(angle);
-    if (angle == 0L) {
-	return TRUE;
-    }
-    hPtr = Blt_CreateHashEntry(&rotFontPtr->fontTable, (char *)angle10, &isNew);
-    if (!isNew) {
-	return TRUE;		/* Rotated font already exists. */
-    }
-    hfont = CreateRotatedFont((TkFont *)Blt_FontId(fontPtr), angle10);
-    if (hfont == NULL) {
-	Blt_DeleteHashEntry(&rotFontPtr->fontTable, hPtr);
-	return FALSE;
-    }
-    Blt_SetHashValue(hPtr, hfont);
-    return TRUE;
-}
-
-static void
-WinFreeFontProc(_Blt_Font *fontPtr) 
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    rotFontPtr->refCount--;
-    if (rotFontPtr->refCount <= 0) {
-	DestroyFont(rotFontPtr);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WinUnderlineCharsProc --
- *
- *	This procedure draws an underline for a given range of characters in a
- *	given string.  It doesn't draw the characters (which are assumed to
- *	have been displayed previously); it just draws the underline.  This
- *	procedure would mainly be used to quickly underline a few characters
- *	without having to construct an underlined font.  To produce properly
- *	underlined text, the appropriate underlined font should be constructed
- *	and used.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Information gets displayed in "drawable".
- *
- *---------------------------------------------------------------------------
- */
-static void
-WinUnderlineCharsProc(
-    Display *display,		/* Display on which to draw. */
-    Drawable drawable,		/* Window or pixmap in which to draw. */
-    GC gc,			/* Graphics context for actually drawing
-				 * line. */
-    _Blt_Font *fontPtr,		/* Font used in GC; must have been
-				 * allocated by Tk_GetFont().  Used for
-				 * character dimensions, etc. */
-    const char *string,		/* String containing characters to be
-				 * underlined or overstruck. */
-    int x, int y,		/* Coordinates at which first character of
-				 * string is drawn. */
-    int first,			/* Byte offset of the first character. */
-    int last)			/* Byte offset after the last character. */
-{
-    RotatedFont *rotFontPtr = fontPtr->clientData;
-
-    Tk_UnderlineChars(display, drawable, gc, rotFontPtr->tkfont, string, x, y, 
-	first, last);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetFontFromObj -- 
- *
- *	Given a string description of a font, map the description to a
- *	corresponding Tk_Font that represents the font.
- *
- * Results:
- *	The return value is token for the font, or NULL if an error prevented
- *	the font from being created.  If NULL is returned, an error message
- *	will be left in the interp's result.
- *
- * Side effects:
- *	The font is added to an internal database with a reference count.  For
- *	each call to this procedure, there should eventually be a call to
- *	Tk_FreeFont() or Tk_FreeFontFromObj() so that the database is cleaned
- *	up when fonts aren't in use anymore.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Font
-Blt_GetFontFromObj(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For display on which font will be used. */
-    Tcl_Obj *objPtr)		/* String describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    _Blt_Font *fontPtr; 
-   
-    fontPtr = Blt_Calloc(1, sizeof(_Blt_Font));
-    if (fontPtr == NULL) {
-	return NULL;		/* Out of memory. */
-    }
-    if (!initialized) {
-	Blt_InitHashTable(&fontTable, BLT_STRING_KEYS);
-	MakeAliasTable(tkwin);
-	initialized++;
-    }
-    fontPtr->clientData = OpenTkFont(interp, tkwin, objPtr);
-
-    if (fontPtr->clientData == NULL) {
-	Blt_Free(fontPtr);
-#if DEBUG_FONT_SELECTION
-	fprintf(stderr, "FAILED to find either Xft or Tk font \"%s\"\n", 
-	    Tcl_GetString(objPtr));
-#endif
-	return NULL;		/* Failed to find either Xft or Tk fonts. */
-    }
-    fontPtr->classPtr = &tkFontClass;
-#ifdef notdef
-    fontPtr->clientData = GetRotatedFontFromObj(interp, tkwin, objPtr);
-#if DEBUG_FONT_SELECTION
-    fprintf(stderr, "SUCCESS: Found Tk font \"%s\"\n", Tcl_GetString(objPtr));
-#endif
-    fontPtr->classPtr = &winFontClass;
-#endif
-    fontPtr->interp = interp;
-    fontPtr->display = Tk_Display(tkwin);
-    return fontPtr;		/* Found Tk font. */
-}
-
-
-Blt_Font
-Blt_AllocFontFromObj(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For screen on which font will be used. */
-    Tcl_Obj *objPtr)		/* Object describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    return Blt_GetFontFromObj(interp, tkwin, objPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetFont -- 
- *
- *	Given a string description of a font, map the description to a
- *	corresponding Tk_Font that represents the font.
- *
- * Results:
- *	The return value is token for the font, or NULL if an error prevented
- *	the font from being created.  If NULL is returned, an error message
- *	will be left in interp's result object.
- *
- * Side effects:
- * 	The font is added to an internal database with a reference count.  For
- * 	each call to this procedure, there should eventually be a call to
- * 	Blt_FreeFont so that the database is cleaned up when fonts aren't in
- * 	use anymore.
- *
- *---------------------------------------------------------------------------
- */
-
-Blt_Font
-Blt_GetFont(
-    Tcl_Interp *interp,		/* Interp for database and error return. */
-    Tk_Window tkwin,		/* For screen on which font will be used. */
-    const char *string)		/* Object describing font, as: named font,
-				 * native format, or parseable string. */
-{
-    Blt_Font font;
-    Tcl_Obj *objPtr;
-
-    objPtr = Tcl_NewStringObj(string, strlen(string));
-    Tcl_IncrRefCount(objPtr);
-    font = Blt_GetFontFromObj(interp, tkwin, objPtr);
-    Tcl_DecrRefCount(objPtr);
-    return font;
-}
-
-Tcl_Interp *
-Blt_GetFontInterp(_Blt_Font *fontPtr) 
-{
-    return fontPtr->interp;
-}
-
-int
-Blt_TextWidth(_Blt_Font *fontPtr, char *string, int length)
-{
-    if (Blt_Ps_IsPrinting()) {
-	int width;
-
-	width = Blt_Ps_TextWidth(fontPtr, string, length);
-	if (width >= 0) {
-	    return width;
-	}
-    }
-    return (*fontPtr->classPtr->textWidth)(fontPtr, string, length);
-}
-
-void
-Blt_GetFontMetrics(_Blt_Font *fontPtr, Blt_FontMetrics *fmPtr)
-{
-    if (Blt_Ps_IsPrinting()) {
-	if (Blt_Ps_GetFontMetrics(fontPtr, fmPtr) == TCL_OK) {
-	    return;
-	}
-    }
-    return (*fontPtr->classPtr->getFontMetrics)(fontPtr, fmPtr);
-}
diff --git a/blt3.0/src/bltWinMain.c b/blt3.0/src/bltWinMain.c
deleted file mode 100644
index 64e3f93..0000000
--- a/blt3.0/src/bltWinMain.c
+++ /dev/null
@@ -1,630 +0,0 @@
-
-/*
- * bltWinMain.c --
- *
- * Main entry point for wish and other Tk-based applications.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from the Tk library distribution.
- *
- *	Copyright (c) 1995-1997 Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#include "config.h"
-#undef USE_TK_STUBS
-#undef USE_TCL_STUBS
-#include "blt.h"
-#include <tcl.h>
-#include <tk.h>
-#include <locale.h>
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#define _VERSION(a,b,c)	    (((a) << 16) + ((b) << 8) + (c))
-
-#define _TCL_VERSION _VERSION(TCL_MAJOR_VERSION, TCL_MINOR_VERSION, TCL_RELEASE_SERIAL)
-#define _TK_VERSION _VERSION(TK_MAJOR_VERSION, TK_MINOR_VERSION, TK_RELEASE_SERIAL)
-
-#ifdef WIN32
-#  define STRICT
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  undef STRICT
-#  undef WIN32_LEAN_AND_MEAN
-#  include <windowsx.h>
-#endif /* WIN32 */
-
-#define vsnprintf		_vsnprintf
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-
-static void setargv(int *argcPtr, char ***argvPtr);
-
-#ifndef TCL_ONLY
-#if (_TCL_VERSION >= _VERSION(8,2,0)) 
-static BOOL consoleRequired = TRUE;
-#endif
-#endif
-
-static Tcl_AppInitProc Initialize;
-#ifndef TCL_ONLY
-static Tcl_PanicProc WishPanic;
-#endif
-
-#if (_TK_VERSION < _VERSION(8,2,0)) 
-/*
- * The following declarations refer to internal Tk routines.  These interfaces
- * are available for use, but are not supported.
- */
-extern void Blt_ConsoleCreate(void);
-extern int Blt_ConsoleInit(Tcl_Interp *interp);
-
-#endif /* _TK_VERSION < 8.2.0 */
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * setargv --
- *
- *	Parse the Windows command line string into argc/argv.  Done here
- *	because we don't trust the builtin argument parser in crt0.  Windows
- *	applications are responsible for breaking their command line into
- *	arguments.
- *
- *	2N backslashes + quote -> N backslashes + begin quoted string
- *	2N + 1 backslashes + quote -> literal
- *	N backslashes + non-quote -> literal
- *	quote + quote in a quoted string -> single quote
- *	quote + quote not in quoted string -> empty string
- *	quote -> begin quoted string
- *
- * Results:
- *	Fills argcPtr with the number of arguments and argvPtr with the
- *	array of arguments.
- *
- * Side effects:
- *	Memory allocated.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-setargv(
-    int *argcPtr,		/* Filled with number of argument strings. */
-    char ***argvPtr)
-{				/* Filled with argument strings (malloc'd). */
-    char *cmdLine, *p, *arg, *argSpace;
-    char **argv;
-    int argc, size, inquote, copy, slashes;
-
-    cmdLine = GetCommandLine();	/* INTL: BUG */
-
-    /*
-     * Precompute an overly pessimistic guess at the number of arguments in
-     * the command line by counting non-space spans.
-     */
-
-    size = 2;
-    for (p = cmdLine; *p != '\0'; p++) {
-	if ((*p == ' ') || (*p == '\t')) {	/* INTL: ISO space. */
-	    size++;
-	    while ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */
-		p++;
-	    }
-	    if (*p == '\0') {
-		break;
-	    }
-	}
-    }
-    argSpace = (char *)Tcl_Alloc(
-	(unsigned)(size * sizeof(char *) + strlen(cmdLine) + 1));
-    argv = (char **)argSpace;
-    argSpace += size * sizeof(char *);
-    size--;
-
-    p = cmdLine;
-    for (argc = 0; argc < size; argc++) {
-	argv[argc] = arg = argSpace;
-	while ((*p == ' ') || (*p == '\t')) {	/* INTL: ISO space. */
-	    p++;
-	}
-	if (*p == '\0') {
-	    break;
-	}
-	inquote = 0;
-	slashes = 0;
-	while (1) {
-	    copy = 1;
-	    while (*p == '\\') {
-		slashes++;
-		p++;
-	    }
-	    if (*p == '"') {
-		if ((slashes & 1) == 0) {
-		    copy = 0;
-		    if ((inquote) && (p[1] == '"')) {
-			p++;
-			copy = 1;
-		    } else {
-			inquote = !inquote;
-		    }
-		}
-		slashes >>= 1;
-	    }
-	    while (slashes) {
-		*arg = '\\';
-		arg++;
-		slashes--;
-	    }
-
-	    if ((*p == '\0') || (!inquote && ((*p == ' ') || 
-	      (*p == '\t')))) {	/* INTL: ISO space. */
-		break;
-	    }
-	    if (copy != 0) {
-		*arg = *p;
-		arg++;
-	    }
-	    p++;
-	}
-	*arg = '\0';
-	argSpace = arg + 1;
-    }
-    argv[argc] = NULL;
-
-    *argcPtr = argc;
-    *argvPtr = argv;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Initialize --
- *
- *	This procedure performs application-specific initialization.  Most
- *	applications, especially those that incorporate additional packages,
- *	will have their own version of this procedure.
- *
- * Results:
- *	Returns a standard TCL completion code, and leaves an error message in
- *	the interp's result if an error occurs.
- *
- * Side effects:
- *	Depends on the startup script.
- *
- *---------------------------------------------------------------------------
- */
-
-BLT_EXTERN Tcl_AppInitProc Blt_core_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_core_SafeInit;
-
-#ifndef TCL_ONLY
-BLT_EXTERN Tcl_AppInitProc Blt_x_Init;
-BLT_EXTERN Tcl_AppInitProc Blt_x_SafeInit;
-#endif
-
-#ifdef STATIC_PKGS
-
-/* Picture format packages. */
-#ifndef TCL_ONLY
-BLT_EXTERN Tcl_AppInitProc Blt_PictureBmpInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureGifInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureJpgInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePbmInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePdfInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePhotoInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePngInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PicturePsInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureTifInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureXbmInit;
-BLT_EXTERN Tcl_AppInitProc Blt_PictureXpmInit;
-#endif /* TCL_ONLY */
-
-/* Data table format packages. */
-BLT_EXTERN Tcl_AppInitProc Blt_Table_CsvInit;
-#ifdef HAVE_LIBMYSQL
-BLT_EXTERN Tcl_AppInitProc Blt_Table_MysqlInit;
-#endif	/* HAVE_LIBMYSQL */
-BLT_EXTERN Tcl_AppInitProc Blt_Table_TreeInit;
-BLT_EXTERN Tcl_AppInitProc Blt_Table_VectorInit;
-#ifdef HAVE_LIBEXPAT
-BLT_EXTERN Tcl_AppInitProc Blt_Table_XmlInit;
-#endif
-
-/* Tree format packages. */
-#ifdef HAVE_LIBEXPAT
-BLT_EXTERN Tcl_AppInitProc Blt_TreeXmlInit;
-#endif
-
-#endif /* STATIC_PKGS */
-
-int
-Initialize(Tcl_Interp *interp)	/* Interpreter for application. */
-{
-#ifdef TCLLIBPATH
-    /* 
-     * It seems that some distributions of TCL don't compile-in a
-     * default location of the library.  This causes Tcl_Init to fail
-     * if bltwish and bltsh are moved to another directory. The
-     * workaround is to set the magic variable "tclDefaultLibrary".
-     */
-    Tcl_SetVar(interp, "tclDefaultLibrary", TCLLIBPATH, TCL_GLOBAL_ONLY);
-#endif /* TCLLIBPATH */
-    if (Tcl_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    /*
-     * Call the init procedures for included packages.  Each call should
-     * look like this:
-     *
-     * if (Mod_Init(interp) == TCL_ERROR) {
-     *     return TCL_ERROR;
-     * }
-     *
-     * where "Mod" is the name of the module.
-     */
-    if (Blt_core_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_core", Blt_core_Init, Blt_core_SafeInit);
-
-#ifdef STATIC_PKGS
-    /* Tcl-only static packages */
-    if (Blt_Table_CsvInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    /* Data table packages. */
-    Tcl_StaticPackage(interp, "blt_datatable_csv", Blt_Table_CsvInit, 
-	Blt_Table_CsvInit);
-
-#ifdef HAVE_LIBMYSQL
-    if (Blt_Table_MysqlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_mysql", Blt_Table_MysqlInit, 
-	Blt_Table_MysqlInit);
-#endif	/* HAVE_LIBMYSQL */
-
-    if (Blt_Table_TreeInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_tree", Blt_Table_TreeInit, 
-	Blt_Table_TreeInit);
-
-    if (Blt_Table_VectorInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_vector", Blt_Table_VectorInit,
-	Blt_Table_VectorInit);
-
-#ifdef HAVE_LIBEXPAT
-    if (Blt_Table_XmlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_datatable_xml", Blt_Table_XmlInit, 
-	Blt_Table_XmlInit);
-#endif	/* HAVE_LIBEXPAT */
-
-    /* Tree packages. */
-#ifdef HAVE_LIBEXPAT
-    if (Blt_TreeXmlInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_tree_xml", Blt_TreeXmlInit, Blt_TreeXmlInit);
-#endif	/* HAVE_LIBEXPAT */
-
-#endif /* STATIC_PKGS */
-
-#ifndef TCL_ONLY
-    if (Tk_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    if (Blt_x_Init(interp) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_extra", Blt_x_Init, Blt_x_SafeInit);
-
-#ifdef STATIC_PKGS
-
-    /* Picture packages. */
-
-    if (Blt_PictureBmpInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_bmp", Blt_PictureBmpInit, 
-	Blt_PictureBmpInit);
-
-    if (Blt_PictureGifInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_gif", Blt_PictureGifInit, 
-	Blt_PictureGifInit);
-
-#ifdef HAVE_LIBJPG
-    if (Blt_PictureJpgInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_jpg", Blt_PictureJpgInit, 
-		      Blt_PictureJpgInit);
-#endif /*HAVE_LIBJPG*/
-
-    if (Blt_PicturePbmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_pbm", Blt_PicturePbmInit, 
-	Blt_PicturePbmInit);
-
-    if (Blt_PicturePhotoInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_photo", Blt_PicturePhotoInit, 
-	Blt_PicturePhotoInit);
-
-#ifdef HAVE_LIBPNG
-    if (Blt_PicturePngInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_png", Blt_PicturePngInit, 
-	Blt_PicturePngInit);
-#endif /*HAVE_LIBPNG*/
-
-    if (Blt_PicturePsInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_ps", Blt_PicturePsInit, 
-	Blt_PicturePsInit);
-
-    if (Blt_PicturePdfInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_pdf", Blt_PicturePdfInit, 
-	Blt_PicturePdfInit);
-
-#ifdef HAVE_LIBTIF
-    if (Blt_PictureTifInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_tif", Blt_PictureTifInit, 
-		      Blt_PictureTifInit);
-#endif /*HAVE_LIBTIF*/
-
-    if (Blt_PictureXbmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_xbm", Blt_PictureXbmInit, 
-	Blt_PictureXbmInit);
-
-#ifdef HAVE_LIBXPM
-    if (Blt_PictureXpmInit(interp) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_StaticPackage(interp, "blt_picture_xpm", Blt_PictureXpmInit, 
-	Blt_PictureXpmInit);
-#endif /*HAVE_LIBXPM*/
-
-#endif /* STATIC_PKGS */
-#endif /*TCL_ONLY*/
-    /*
-     * Specify a user-specific startup file to invoke if the application
-     * is run interactively.  Typically the startup file is "~/.apprc"
-     * where "app" is the name of the application.  If this line is deleted
-     * then no user-specific startup file will be run under any conditions.
-     */
-#ifdef TCL_ONLY
-    Tcl_SetVar(interp, "tcl_rcFileName", "~/tclshrc.tcl", TCL_GLOBAL_ONLY);
-#else 
-    Tcl_SetVar(interp, "tcl_rcFileName", "~/wishrc.tcl", TCL_GLOBAL_ONLY);
-#endif
-
-#ifndef TCL_ONLY
-#if (_TCL_VERSION >= _VERSION(8,2,0)) 
-    if (consoleRequired) {
-	if (Tk_CreateConsoleWindow(interp) == TCL_ERROR) {
-	    goto error;
-	}
-    }
-#else
-    /*
-     * Initialize the console only if we are running as an interactive
-     * application.
-     */
-    if (Blt_ConsoleInit(interp) == TCL_ERROR) {
-	goto error;
-    }
-#endif	/* _TCL_VERSION >= 8.2.0 */
-#endif	/* TCL_ONLY */
-    return TCL_OK;
-#ifndef TCL_ONLY
-  error:
-    WishPanic(Tcl_GetStringResult(interp));
-#endif
-    return TCL_ERROR;
-}
-
-#ifdef TCL_ONLY
-/*
- *---------------------------------------------------------------------------
- *
- * main --
- *
- *	This is the main program for the application.
- *
- * Results:
- *	None: Tcl_Main never returns here, so this procedure never returns
- *	either.
- *
- * Side effects:
- *	Whatever the application does.
- *
- *---------------------------------------------------------------------------
- */
-int
-main(argc, argv)
-    int argc;			/* Number of command-line arguments. */
-    char **argv;		/* Values of command-line arguments. */
-{
-    char buffer[MAX_PATH +1];
-    char *p;
-
-    /*
-     * Set up the default locale to be standard "C" locale so parsing is
-     * performed correctly.
-     */
-
-    setlocale(LC_ALL, "C");
-    setargv(&argc, &argv);
-
-    /*
-     * Replace argv[0] with full pathname of executable, and forward slashes
-     * substituted for backslashes.
-     */
-
-    GetModuleFileName(NULL, buffer, sizeof(buffer));
-    argv[0] = buffer;
-    for (p = buffer; *p != '\0'; p++) {
-	if (*p == '\\') {
-	    *p = '/';
-	}
-    }
-    Tcl_Main(argc, argv, Initialize);
-    return 0;			/* Needed only to prevent compiler warning. */
-}
-
-#else /* TCL_ONLY */
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * WishPanic --
- *
- *	Display a message and exit.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Exits the program.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-WishPanic 
-TCL_VARARGS_DEF(const char *, arg1)
-{
-    va_list argList;
-    char buf[1024];
-    const char *format;
-
-    format = TCL_VARARGS_START(char *, arg1, argList);
-    vsnprintf(buf, 1024, format, argList);
-    buf[1023] = '\0';
-    MessageBeep(MB_ICONEXCLAMATION);
-    MessageBox(NULL, buf, "Fatal Error in Wish",
-	MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-    DebugBreak();
-#ifdef notdef			/* Panics shouldn't cause exceptions.  Simply
-				 * let the program exit. */
-    _asm {
-	int 3
-    }
-#endif
-#endif /* _MSC_VER || __BORLANDC__ */
-    ExitProcess(1);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * WinMain --
- *
- *	Main entry point from Windows.
- *
- * Results:
- *	Returns false if initialization fails, otherwise it never returns.
- *
- * Side effects:
- *	Just about anything, since from here we call arbitrary TCL code.
- *
- *---------------------------------------------------------------------------
- */
-
-int APIENTRY
-WinMain(
-    HINSTANCE hInstance,
-    HINSTANCE hPrevInstance,
-    LPSTR lpszCmdLine,
-    int nCmdShow)
-{
-    char **argv;
-    int argc;
-
-    Tcl_SetPanicProc(WishPanic);
-
-    /*
-     * Set up the default locale to be standard "C" locale so parsing is
-     * performed correctly.
-     */
-
-    setlocale(LC_ALL, "C");
-    setargv(&argc, &argv);
-
-    /*
-     * Increase the application queue size from default value of 8.  At the
-     * default value, cross application SendMessage of WM_KILLFOCUS will fail
-     * because the handler will not be able to do a PostMessage!  This is only
-     * needed for Windows 3.x, since NT dynamically expands the queue.
-     */
-
-    SetMessageQueue(64);
-
-    /*
-     * Create the console channels and install them as the standard channels.
-     * All I/O will be discarded until Blt_ConsoleInit is called to attach the
-     * console to a text widget.
-     */
-#if (_TCL_VERSION >= _VERSION(8,2,0)) 
-    consoleRequired = TRUE;
-#else
-    Blt_ConsoleCreate();
-#endif
-    Tk_Main(argc, argv, Initialize);
-    return 1;
-}
-
-#endif /* TCL_ONLY */
-
-
diff --git a/blt3.0/src/bltWinPainter.c b/blt3.0/src/bltWinPainter.c
deleted file mode 100644
index 3367fd3..0000000
--- a/blt3.0/src/bltWinPainter.c
+++ /dev/null
@@ -1,957 +0,0 @@
-
-/*
- * bltWinPainter.c --
- *
- * This module implements Win32-specific image processing procedures for the
- * BLT toolkit.
- *
- *	Copyright 1997-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-#include "bltWinPainter.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-
-
-#define CFRAC(i, n)	((i) * 65535 / (n))
-/* As for CFRAC, but apply exponent of g. */
-#define CGFRAC(i, n, g)	((int)(65535 * pow((double)(i) / (n), (g))))
-
-typedef struct _Blt_Picture Pict;
-
-/*
- * The following structure is used to encapsulate palette information.
- */
-
-typedef struct {
-    HPALETTE palette;		/* Palette handle used when drawing. */
-    UINT size;			/* Number of entries in the palette. */
-    int stale;			/* 1 if palette needs to be realized,
-				 * otherwise 0.  If the palette is stale,
-				 * then an idle handler is scheduled to
-				 * realize the palette. */
-    Tcl_HashTable refCounts;	/* Hash table of palette entry reference counts
-				 * indexed by pixel value. */
-} TkWinColormap;
-
-/*
- * PainterKey --
- *
- * This structure represents the key used to uniquely identify painters.  A
- * painter is specified by a combination of display, visual, colormap, depth,
- * and monitor gamma value.
- */
-typedef struct {
-    Display *display;		/* Display of painter. Used to free colors
-				 * allocated. */
-
-    Colormap colormap;		/* Colormap used.  This may be the default
-				 * colormap, or an allocated private map. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    float gamma;		/* Gamma correction value of monitor. */
-
-} PainterKey;
-
-
-#define GC_PRIVATE	1	/* Indicates if the GC in the painter was
-				 * shared (allocated by Tk_GetGC) or private
-				 * (by XCreateGC). */
-
-static Tcl_FreeProc FreePainter;
-
-static Blt_HashTable painterTable;
-static int initialized = 0;
-
-static void
-GetPaletteColors(HDC hDC, Painter *p, Blt_Pixel *colors)
-{
-    DWORD flags;
-
-    flags = GetDeviceCaps(hDC, RASTERCAPS);
-    if (flags & RC_PALETTE) {
-	LOGPALETTE *logPalPtr;
-	PALETTEENTRY *pePtr;
-	Blt_Pixel *dp, *dend;
-	TkWinColormap *cmap;
-
-	logPalPtr = (LOGPALETTE *) GlobalAlloc(GPTR, 
-		sizeof(LOGPALETTE) + 256 * sizeof(PALETTEENTRY));
-	logPalPtr->palVersion = 0x300;
-	cmap = (TkWinColormap *)p->colormap;
-	logPalPtr->palNumEntries = GetPaletteEntries(cmap->palette, 0, 256, 
-		logPalPtr->palPalEntry);
-	pePtr = logPalPtr->palPalEntry;
-	for (dp = colors, dend = dp + logPalPtr->palNumEntries; dp < dend; 
-		dp++, pePtr++) {
-#ifdef notdef
-	    int r, g, b;
-	    r = p->igammaTable[r];
-	    g = p->igammaTable[g];
-	    b = p->igammaTable[b];
-#endif
-	    dp->Red = pePtr->peRed;
-	    dp->Green = pePtr->peGreen;
-	    dp->Blue = pePtr->peBlue;
-	    dp->Alpha = 0xFF;
-	}
-	GlobalFree(logPalPtr);
-    } else {
-	Blt_Pixel *dp, *dend;
-	double rScale, gScale, bScale;
-	double igamma;
-	int i;
-	int nRed, nGreen, nBlue;
-
-	/*
-	 * Calculate the RGB coordinates of the colors we want to allocate and
-	 * store them in *colors.
-	 */
-	igamma = 1.0 / (double)p->gamma;
-
-	nRed = nGreen = 8, nBlue = 4;
-	rScale = 255.0 / (nRed - 1);
-	gScale = 255.0 / (nGreen - 1);
-	bScale = 255.0 / (nBlue - 1);
-	
-	for (i = 0, dp = colors, dend = dp + 256; dp < dend; dp++, i++) {
-	    int r, g, b;
-	    
-	    r = (int)(i * rScale + 0.5);
-	    g = (int)(i * gScale + 0.5);
-	    b = (int)(i * bScale + 0.5);
-
-	    r = p->igammaTable[r];
-	    g = p->igammaTable[g];
-	    b = p->igammaTable[b];
-
-	    dp->Red = (r << 8) + r;
-	    dp->Green = (g << 8) + g;
-	    dp->Blue = (b << 8) + b;
-	    dp->Alpha = 0xFF;
-	}
-    }
-    ReleaseDC(NULL, hDC);
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeGammaTables --
- *
- *	Initializes both the power and inverse power tables for the painter
- *	with a given gamma value.  These tables are used to/from map linear
- *	RGB values to/from non-linear monitor intensities.
- *	
- * Results:
- *      The *gammaTable* and *igammaTable* arrays are filled out to contain
- *      the mapped values.
- *
- *---------------------------------------------------------------------------
- */
-static void
-ComputeGammaTables(Painter *p)
-{
-    int i;
-    double igamma, gamma;
-    
-    gamma = (double)p->gamma;
-    igamma = 1.0 / gamma;
-    for (i = 0; i < 256; i++) {
-	double value, y;
-
-	y = i / 255.0;
-	value = pow(y, gamma) * 255.0 + 0.5;
-	p->gammaTable[i] = (unsigned char)CLAMP(value);
-	value = pow(y, igamma) * 255.0 + 0.5;
-	p->igammaTable[i] = (unsigned char)CLAMP(value);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NewPainter --
- *
- *	Creates a new painter to be used to paint pictures. Painters are keyed
- *	by the combination of display, colormap, visual, depth, and gamma
- *	value used.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	A color ramp is allocated (not true for TrueColor visuals).  Gamma
- *	tables are computed and filled.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-NewPainter(PainterKey *keyPtr)
-{
-    Painter *p;
-    
-    p = Blt_AssertCalloc(1, sizeof(Painter));
-    p->colormap = keyPtr->colormap;
-    p->depth = keyPtr->depth;
-    p->display = keyPtr->display;
-    p->gamma = keyPtr->gamma;
-    p->refCount = 0;
-
-    ComputeGammaTables(p);
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FreePainter --
- *
- *	Called when the TCL interpreter is idle, this routine frees the
- *	painter. Painters are reference counted.  Only when no clients are using
- *	the painter (the count is zero) is the painter actually freed.  By
- *	deferring its deletion, this allows client code to call Blt_GetPainter
- *	after Blt_FreePainter without incurring a performance penalty.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FreePainter(DestroyData data)
-{
-    Painter *p = (Painter *)data;
-
-    if (p->refCount <= 0) {
-	Blt_DeleteHashEntry(&painterTable, p->hashPtr);
-	if (p->gc != NULL) {
-	    if (p->flags & GC_PRIVATE) {
-		XFreeGC(p->display, p->gc);
-	    } else {
-		Tk_FreeGC(p->display, p->gc);
-	    }
-	    p->gc = NULL;
-	}
-	Blt_Free(p);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetPainter --
- *
- *	Attempts to retrieve a painter for a particular combination of
- *	display, colormap, visual, depth, and gamma value.  If no specific
- *	painter exists, then one is created.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- * Side Effects:
- *	If no current painter exists, a new painter is added to the hash table
- *	of painters.  Otherwise, the current painter's reference count is
- *	incremented indicated how many clients are using the painter.
- *
- *---------------------------------------------------------------------------
- */
-static Painter *
-GetPainter(Display *display, Colormap colormap, int depth, float gamma)
-{
-    Painter *p;
-    PainterKey key;
-    int isNew;
-    Blt_HashEntry *hPtr;
-
-    if (!initialized) {
-	Blt_InitHashTable(&painterTable, sizeof(PainterKey) / sizeof(int));
-	initialized = TRUE;
-    }
-    key.display = display;
-    key.colormap = colormap;
-    key.depth = depth;
-    key.gamma = gamma;
-
-    hPtr = Blt_CreateHashEntry(&painterTable, (char *)&key, &isNew);
-    if (isNew) {
-	p = NewPainter(&key);
-	p->hashPtr = hPtr;
-	Blt_SetHashValue(hPtr, p);
-    } else {
-	p = Blt_GetHashValue(hPtr);
-    }
-    p->refCount++;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DrawableToPicture --
- *
- *      Takes a snapshot of a DC and converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred, NULL is
- *      returned.
- *
- *---------------------------------------------------------------------------
- */
-static Blt_Picture
-DrawableToPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    int x, int y,
-    int width, int height)	/* Dimension of the drawable. */
-{
-    BITMAPINFO bmi;
-    DIBSECTION ds;
-    HBITMAP hBitmap, oldBitmap;
-    HDC hDC;
-    HDC memDC;
-    Pict *destPtr;
-    TkWinDCState state;
-    void *data;
-
-    hDC = TkWinGetDrawableDC(painterPtr->display, drawable, &state);
-
-    /* Create the intermediate drawing surface at window resolution. */
-    ZeroMemory(&bmi, sizeof(bmi));
-    bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    bmi.bmiHeader.biWidth = width;
-    bmi.bmiHeader.biHeight = height;
-    bmi.bmiHeader.biPlanes = 1;
-    bmi.bmiHeader.biBitCount = 32;
-    bmi.bmiHeader.biCompression = BI_RGB;
-
-    hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &data, NULL, 0);
-    memDC = CreateCompatibleDC(hDC);
-    oldBitmap = SelectBitmap(memDC, hBitmap);
-
-    if (GetDeviceCaps(hDC, RASTERCAPS) & RC_PALETTE) {
-	TkWinColormap *cmap;
-
-	cmap = (TkWinColormap *)painterPtr->colormap;
-	SelectPalette(hDC, cmap->palette, FALSE);
-	RealizePalette(hDC);
-	SelectPalette(memDC, cmap->palette, FALSE);
-	RealizePalette(memDC);
-    }
-    destPtr = NULL;
-
-    /* Copy the window contents to the memory surface. */
-    if (!BitBlt(memDC, 0, 0, width, height, hDC, x, y, SRCCOPY)) {
-#ifdef notdef
-	PurifyPrintf("can't blit: %s\n", Blt_LastError());
-#endif
-	goto done;
-    }
-    if (GetObject(hBitmap, sizeof(DIBSECTION), &ds) == 0) {
-#ifdef notdef
-	PurifyPrintf("can't get object: %s\n", Blt_LastError());
-#endif
-    } else {
-	Blt_Pixel *destRowPtr;
-	unsigned char *bits, *sp;
-
-	bits = (unsigned char *)ds.dsBm.bmBits;
-	destPtr = Blt_CreatePicture(width, height);
-	destRowPtr = destPtr->bits;
-	
-	/* 
-	 * Copy the DIB RGB data into the picture. The DIB origin is the
-	 * bottom-left corner, so the scanlines are stored in reverse order
-	 * from that of a picture.  
-	 */
-	destRowPtr = destPtr->bits + ((height - 1) * destPtr->pixelsPerRow);
-	sp = bits;
-	for (y = 0; y < height; y++) {
-	    Blt_Pixel *dp, *dend;
-	    
-	    for (dp = destRowPtr, dend = dp + width; dp < dend; dp++) {
-		dp->Blue  = painterPtr->gammaTable[sp[0]];
-		dp->Green = painterPtr->gammaTable[sp[1]];
-		dp->Red   = painterPtr->gammaTable[sp[2]];
-		dp->Alpha = ALPHA_OPAQUE; 
-		sp += 4;
-	    }
-	    destRowPtr -= destPtr->pixelsPerRow;
-	}
-    }
-  done:
-    DeleteBitmap(hBitmap);
-    DeleteDC(memDC);
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-    return destPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPicture --
- *
- *	Paints the picture to the given drawable. The region of the picture is
- *	specified and the coordinates where in the destination drawable is the
- *	image to be displayed.
- *
- *	The image may be dithered depending upon the bit set in the flags
- *	parameter: 0 no dithering, 1 for dithering.
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display, Otherwise FALSE
- *	is returned if the particular combination visual and image depth is
- *	not handled.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPicture(
-    Painter *painterPtr,
-    Drawable drawable,
-    Pict *srcPtr,
-    int x, int y,		/* Coordinates of region in the picture. */
-    int w, int h,		/* Dimension of the region.  Area cannot
-				 * extend beyond the end of the picture. */
-    int dx, int dy,		/* Coordinates of region in the drawable.  */
-    unsigned int flags)
-{
-    HDC hDC, memDC;
-    Pict *ditherPtr;
-    TkWinDCState state;
-
-    ditherPtr = NULL;
-    hDC = TkWinGetDrawableDC(painterPtr->display, drawable, &state);
-    memDC = CreateCompatibleDC(hDC);
-    if (GetDeviceCaps(hDC, RASTERCAPS) & RC_PALETTE) {
-	TkWinColormap *cmap;
-
-	cmap = (TkWinColormap *)painterPtr->colormap;
-	SelectPalette(hDC, cmap->palette, FALSE);
-	RealizePalette(hDC);
-    }
-    if (flags & BLT_PAINTER_DITHER) {
-	Blt_Pixel colors[256];
-
-	GetPaletteColors(hDC, painterPtr, colors);
-	ditherPtr = Blt_DitherPicture(srcPtr, colors);
-	if (ditherPtr != NULL) {
-	    srcPtr = ditherPtr;
-	}
-    }
-    assert((x + w) <= srcPtr->width);
-    assert((y + h) <= srcPtr->height);
-    {
-	BITMAPINFO bmi;
-	Blt_Pixel *srcRowPtr;
-	int sy;
-	unsigned char *dp, *bits;
-
-	bits = Blt_AssertMalloc(w * h * sizeof(Blt_Pixel));
-
-	/* 
-	 * Copy the DIB RGB data into the picture. The DIB scanlines are
-	 * stored bottom-to-top and the order of the color components is BGRA.
-	 */
-	srcRowPtr = srcPtr->bits + ((y + h - 1) * srcPtr->pixelsPerRow) + x;
-	dp = bits;
-	for (sy = 0; sy < h; sy++) {
-	    Blt_Pixel *sp, *send;
-	    
-	    for (sp = srcRowPtr, send = sp + w; sp < send; sp++) {
-		dp[0] = sp->Blue;
-		dp[1] = sp->Green;
-		dp[2] = sp->Red;
-		dp[3] = ALPHA_OPAQUE;
-		dp += 4;
-	    }
-	    srcRowPtr -= srcPtr->pixelsPerRow;
-	}
-	
-	/* Create the intermediate drawing surface at window resolution. */
-	ZeroMemory(&bmi, sizeof(bmi));
-	bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-	bmi.bmiHeader.biWidth = w;
-	bmi.bmiHeader.biHeight = h;
-	bmi.bmiHeader.biPlanes = 1;
-	bmi.bmiHeader.biBitCount = 32;
-	bmi.bmiHeader.biCompression = BI_RGB;
-	
-	SetDIBitsToDevice(hDC, dx, dy, w, h, 0, 0, 0, h, bits, &bmi, 
-		DIB_RGB_COLORS);
-	Blt_Free(bits);
-    }
-    TkWinReleaseDrawableDC(drawable, hDC, &state);
-    if (ditherPtr != NULL) {
-	Blt_FreePicture(ditherPtr);
-    }
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PaintPictureWithBlend --
- *
- *	Blends and paints the picture in the given drawable. The region of the
- *	picture is specified and the coordinates where in the destination
- *	drawable is the image to be displayed.
- *
- *	The background is snapped from the drawable and converted into a
- *	picture.  This picture is then blended with the current picture (the
- *	background always assumed to be 100% opaque).
- * 
- * Results:
- *	Returns TRUE is the picture was successfully display, Otherwise FALSE
- *	is returned.  This may happen if the background can not be obtained
- *	from the drawable.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PaintPictureWithBlend(
-    Painter *p,
-    Drawable drawable,
-    Blt_Picture fg,
-    int x, int y,		/* Coordinates of source region in the
-				 * picture. */
-    int w, int h,		/* Dimension of the source region.  Region
-				 * cannot extend beyond the end of the
-				 * picture. */
-    int dx, int dy,		/* Coordinates of destination region in the
-				 * drawable.  */
-    unsigned int flags, 
-    int alpha)
-{
-    Blt_Picture bg;
-
-#ifdef notdef
-    fprintf(stderr, "PaintPictureWithBlend: x=%d,y=%d,w=%d,h=%d,dx=%d,dy=%d\n",
-	    x, y, w, h, dx, dy);
-#endif
-    if (dx < 0) {
-	w += dx;
-	x -= dx;
-	dx = 0;
-    } 
-    if (dy < 0) {
-	h += dy;
-	y -= dy;
-	dy = 0;
-    }
-    if (dx < 0) {
-	dx = 0;
-    } 
-    if (dy < 0) {
-	dy = 0;
-    }
-    if ((w < 0) || (h < 0)) {
-	return FALSE;
-    }
-    bg = DrawableToPicture(p, drawable, dx, dy, w, h);
-    if (bg == NULL) {
-	return FALSE;
-    }
-    Blt_BlendPictures(bg, fg, x, y, w, h, 0, 0);
-    PaintPicture(p, drawable, bg, 0, 0, w, h, dx, dy, flags);
-    Blt_FreePicture(bg);
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainterFromDrawable --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information is retrieved from
- *	the drawable which is assumed to be a window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainterFromDrawable(Display *display, Drawable drawable, float gamma)
-{
-    XGCValues gcValues;
-    unsigned long gcMask;
-    Painter *p;
-    TkWinBitmap *bmPtr;
-
-    bmPtr = (TkWinBitmap *)drawable;
-    assert(bmPtr->type != TWD_BITMAP);
-    p = GetPainter(display, bmPtr->colormap, bmPtr->depth, gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-	    
-    p->gc = XCreateGC(display, drawable, gcMask, &gcValues);
-    p->flags |= GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetPainter --
- *
- *	Gets a painter for a particular combination of display, colormap,
- *	visual, depth, and gamma value.  This information (except for the
- *	monitor's gamma value) is retrieved from the given Tk window.
- *
- * Results:
- *      A pointer to the new painter is returned.
- *
- *---------------------------------------------------------------------------
- */
-Painter *
-Blt_GetPainter(Tk_Window tkwin, float gamma)
-{
-    Painter *p;
-    XGCValues gcValues;
-    unsigned long gcMask;
-
-    p = GetPainter(Tk_Display(tkwin), Tk_Colormap(tkwin), Tk_Depth(tkwin), 
-	gamma);
-
-    /*
-     * Make a GC with background = black and foreground = white.
-     */
-    gcMask = GCGraphicsExposures;
-    gcValues.graphics_exposures = False;
-    p->gc = Tk_GetGC(tkwin, gcMask, &gcValues);
-    p->flags &= ~GC_PRIVATE;
-    return p;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FreePainter --
- *
- *	Frees the painter. Painters are reference counted. Only when no
- *	clients are using the painter (the count is zero) is the painter
- *	actually freed.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_FreePainter(Painter *p)
-{
-    p->refCount--;
-    if (p->refCount <= 0) {
-	Tcl_EventuallyFree(p, FreePainter);
-    }
-}
-
-GC 
-Blt_PainterGC(Painter *p)
-{
-    return p->gc;
-}
-
-int 
-Blt_PainterDepth(Painter *p)
-{
-    return p->depth;
-}
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_WindowToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- *	This routine is used to snap foreign (non-Tk) windows. For
- *	pixmaps and Tk windows, Blt_DrawableToPicture is preferred.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture 
-Blt_WindowToPicture(
-    Display *display,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    float gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture dump;		/* Picture containing dump of window. */
-
-    painter = Blt_GetPainterFromDrawable(display, drawable, gamma);
-    dump = DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return dump;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DrawableToPicture --
- *
- *      Takes a snapshot of an X drawable (pixmap or window) and
- *	converts it to a picture.
- *
- * Results:
- *      Returns a picture of the drawable.  If an error occurred,
- *	NULL is returned.
- *
- *---------------------------------------------------------------------------
- */
-Blt_Picture 
-Blt_DrawableToPicture(
-    Tk_Window tkwin,
-    Drawable drawable,
-    int x, int y,		/* Offset of image from the drawable's
-				 * origin. */
-    int width, int height,	/* Dimension of the image.  Image must
-				 * be completely contained by the
-				 * drawable. */
-    float gamma)
-{
-    Blt_Painter painter;
-    Blt_Picture dump;		/* Picture containing dump of drawable. */
-
-    painter = Blt_GetPainter(tkwin, gamma);
-    dump =  DrawableToPicture(painter, drawable, x, y, width, height);
-    Blt_FreePainter(painter);
-    return dump;
-}
-
-
-
-int
-Blt_PaintPicture(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int ax, int ay,		/* Starting coordinates of subregion in the
-				 * picture to be painted. */
-    int aw, int ah,		/* Dimension of the subregion.  */
-    int x, int y,		/* Coordinates of region in the drawable.  */
-    unsigned int flags)
-{
-    /* 
-     * Nothing to draw. The region offset starts beyond the end of the
-     * picture.
-     *
-     *  +---------------+    	
-     *  |               |    	
-     *  |               |    	
-     *  |               | ax,ay   
-     *  |               |   +---------+
-     *  |               |   |         |
-     *  +---------------+   |         |
-     *			    |         |
-     *                      +---------+
-     */			        
-    if ((picture == NULL) || 
-	(ax >= Blt_PictureWidth(picture)) || 
-	(ay >= Blt_PictureHeight(picture))) {
-	return TRUE;	
-    }
-    /* 
-     * Correct the dimensions if the origin starts before the picture
-     * (i.e. coordinate is negative).  Reset the coordinate the 0.
-     *
-     * ax,ay		       
-     *   +---------+ 	          ax,ay		       
-     *   |  +------|--------+       +------+--------+
-     *   |  |      |        |       |      |        |
-     *   |  |      |        |       |      |        |
-     *   +--|------+        |       +------+        |
-     *      |               |       |               |
-     *      |               |       |               |
-     *      +---------------+       +---------------+ 
-     *
-     */
-    if (ax < 0) {		
-        aw += ax;
-        ax = 0;
-    }
-    if (ay < 0) {
-        ah += ay;
-        ay = 0;
-    }
-    /* 
-     * Check that the given area does not extend beyond the end of the
-     * picture.
-     * 
-     *    +-----------------+	     +-----------------+	  	
-     *    |                 |	     |                 |	  	
-     *    |      ax,ay      |	     |      ax,ay      |	  	
-     *    |         +---------+      |         +-------+
-     *    |         |       | |      |         |       |
-     *    |         |       | |      |         |       |
-     *    +---------|-------+ |      +---------+-------+
-     * 	            +---------+   	           
-     *                                                    
-     * Clip the end of the area if it's too big.
-     */
-    if ((aw + ax) > Blt_PictureWidth(picture)) {
-	aw = Blt_PictureWidth(picture) - ax;
-    }
-    if ((ah + ay) > Blt_PictureHeight(picture)) {
-	ah = Blt_PictureHeight(picture) - ay;
-    }
-    /* Check that there's still something to paint. */
-    if ((aw <= 0) || (ah <= 0)) {
-	return TRUE;
-    }
-#ifdef notdef
-    if (x < 0) {
-	x = 0;
-    } 
-    if (y < 0) {
-	y = 0;
-    }
-#endif
-    if (Blt_PictureIsOpaque(picture)) {
-	return PaintPicture(painter, drawable, picture, ax, ay, 
-		aw, ah, x, y, flags);
-    } else {
-	int alpha = 128;
-
-	return PaintPictureWithBlend(painter, drawable, picture, ax, ay, 
-		aw, ah, x, y, flags, alpha);
-    }
-}
-
-int
-Blt_PaintPictureWithBlend(
-    Blt_Painter painter,
-    Drawable drawable,
-    Blt_Picture picture,
-    int x, int y,		/* Coordinates of region in the picture. */
-    int w, int h,		/* Dimension of the region.  Area cannot
-				 * extend beyond the end of the picture. */
-    int dx, int dy,		/* Coordinates of region in the drawable.  */
-    unsigned int flags,		/* Indicates whether to dither the picture
-				 * before displaying. */
-    double falpha)
-{
-    int alpha;
-
-    alpha = (int)(falpha * 255.0 + 0.5);
-
-    /* 
-     * Nothing to draw. The selected region is outside of the picture.
-     *
-     *   0,0
-     *    +---------+
-     *    |         |
-     *    | Picture |
-     *	  |         |
-     *    +---------+
-     *              x,y
-     *               +-------+
-     *		     |       |
-     *               |       | h
-     *		     +-------+
-     *			 w
-     */
-    if ((picture == NULL) || 
-	(x >= Blt_PictureWidth(picture)) || 
-	(y >= Blt_PictureHeight(picture)) ||
-	((x + w) <= 0) || ((y + h) <= 0)) {
-	return TRUE;	
-    }
-    /* 
-     * Correct the dimensions if the origin starts before the picture
-     * (i.e. coordinate is negative).  Reset the coordinate the 0.
-     *
-     * x,y		       
-     *   +---------+ 	          x,y = 0,0		       
-     *   |  +------|--------+       +------+--------+
-     * h |  |0,0   |        |       |      |        |
-     *   |  |      |        |       |      |        |
-     *   +--|------+        |       +------+        |
-     *    w |               |       |               |
-     *      |               |       |               |
-     *      +---------------+       +---------------+ 
-     *
-     */
-    if (x < 0) {		
-        w += x;
-        x = 0;
-    }
-    if (y < 0) {
-        h += y;
-        y = 0;
-    }
-
-    /* 
-     * Check that the given area does not extend beyond the end of the
-     * picture.
-     * 
-     *   0,0                        0,0
-     *    +-----------------+	     +-----------------+	  	
-     *    |		    |        |                 |
-     *    |        x,y      |	     |        x,y      |	  	
-     *    |         +---------+      |         +-------+
-     *    |         |       | |      |         |       |
-     *    |         |       | | w    |         |       |
-     *    +---------|-------+ |      +---------+-------+
-     * 	            +---------+   	           
-     *                   h
-     *                                                    
-     * Clip the end of the area if it's too big.
-     */
-    if ((x + w) > Blt_PictureWidth(picture)) {
-	w = Blt_PictureWidth(picture) - x;
-    }
-    if ((y + h) > Blt_PictureHeight(picture)) {
-	h = Blt_PictureHeight(picture) - y;
-    }
-    if (dx < 0) {
-	dx = 0;
-    } 
-    if (dy < 0) {
-	dy = 0;
-    }
-    /* Check that there's still something to paint. */
-    if ((w <= 0) || (h <= 0)) {
-	return TRUE;
-    }
-    return PaintPictureWithBlend(painter, drawable, picture, x, y, w, h, dx, dy,
-	flags, alpha);
-}
-
diff --git a/blt3.0/src/bltWinPainter.h b/blt3.0/src/bltWinPainter.h
deleted file mode 100644
index a3072ad..0000000
--- a/blt3.0/src/bltWinPainter.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/*
- * bltWinPainter.h --
- *
- * This header contains the private definitions for a painter in 
- * the BLT toolkit.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The color allocation routines are adapted from tkImgPhoto.c of the
- * Tk library distrubution.  The photo image type was designed and
- * implemented by Paul Mackerras.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 19941998 Sun Microsystems, Inc.
- * 
- */
-
-#ifndef _BLT_WIN_PAINTER_H
-#define _BLT_WIN_PAINTER_H
-
-#ifdef notdef
-#define PAINTER_COLOR_WINDOW		(1<<0)
-#define PAINTER_BW			(1<<1)
-#define PAINTER_MAP_COLORS		(1<<2)
-#endif
-
-/*
- * Painter --
- *
- * This structure represents a painter used to display picture images.  A
- * painter is specified by a combination of display, colormap, depth, and
- * monitor gamma value.  Painters contain information necessary to display a
- * picture.  This includes both an RGB to pixel map, and a RGB to allocated
- * color map.
- *
- * Painters may be shared by more than one client and are reference counted.
- * When no clients are using the painter, it is freed.
- */
-
-struct _Blt_Painter {
-    Display *display;		/* Display of painter. Used to free colors
-				 * allocated. */
-
-    int depth;			/* Pixel depth of the display. */
-
-    float gamma;		/* Gamma correction value of monitor. */
-
-    Colormap colormap;
-
-    unsigned int flags;		/* Flags listed below. */
-
-    int refCount;		/* # of clients using this painter. If zero,
-				 * # the painter is freed. */
-
-    Blt_HashEntry *hashPtr;	/* Used to delete the painter entry from the
-				 * hash table of painters. */
-
-    GC gc;			/* GC used to draw the image. */
-
-    unsigned char gammaTable[256]; /* Input gamma lookup table. Used to map
-				 * non-linear monitor values back to RGB
-				 * values. This is used whenever we take a
-				 * snapshot of the screen (e.g. alpha
-				 * blending).  Computes the power mapping.  D
-				 * = I^gamma. */
-
-    unsigned char igammaTable[256]; /* Output gamma lookup table. Used to map
-				 * RGB values to non-linear monitor
-				 * values. Computes the inverse power mapping.
-				 * I~ = D^1/gamma. */
-
-    Blt_Pixel palette[256];	/* Maps the picture's 8-bit RGB values to the
-				 * RGB values of the colors actually
-				 * allocated. This is used for dithering the
-				 * picture. */
-
-};
-
-typedef struct _Blt_Painter Painter;
-
-#endif /* _BLT_WIN_PAINTER_H */
diff --git a/blt3.0/src/bltWinPipe.c b/blt3.0/src/bltWinPipe.c
deleted file mode 100644
index 1b94cb9..0000000
--- a/blt3.0/src/bltWinPipe.c
+++ /dev/null
@@ -1,2481 +0,0 @@
-
-/*
- * bltWinPipe.c --
- *
- * This modules replacements for the former Tcl_CreatePipeline API
- * under Windows.  This file contains the generic portion of the
- * command channel driver as well as various utility routines used in
- * managing subprocesses.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Parts taken from tclPipe.c and tclWinPipe.c in the TCL distribution.
- *
- *	Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-/*
- * Todo:
- *	Test on win95
- *	Does terminating bltwish kill child processes?
- *	Handle EOL translation more cleanly.
- */
-
-#include "bltInt.h"
-#include "bltChain.h"
-#include <fcntl.h>
-
-#define PEEK_DEBUG 0
-#define QUEUE_DEBUG 0
-#define READER_DEBUG 0
-#define ASYNC_DEBUG 0
-#define KILL_DEBUG 0
-
-/*
- * The following type identifies the various types of applications that
- * run under windows.  There is special case code for the various types.
- */
-typedef enum ApplicationTypes {
-    APPL_NONE, 
-    APPL_DOS, 
-    APPL_WIN3X, 
-    APPL_WIN32, 
-    APPL_INTERP
-} ApplicationType;
-
-#ifndef IMAGE_OS2_SIGNATURE
-#   define IMAGE_OS2_SIGNATURE    (0x454E)
-#endif
-#ifndef IMAGE_VXD_SIGNATURE
-#   define IMAGE_VXD_SIGNATURE    (0x454C)
-#endif
-
-#define PIPE_BUFSIZ	(BUFSIZ*2)	/* Size of pipe read buffer. */
-
-#define PIPE_PENDING	(1<<13)	/* Message is pending in the queue. */
-#define PIPE_EOF	(1<<14)	/* Pipe has reached EOF. */
-#define PIPE_DELETED	(1<<15)	/* Indicates if the pipe has been deleted
-				 * but its memory hasn't been freed yet. */
-
-typedef struct {
-    int flags;			/* State flags, see above for a list. */
-    HANDLE hPipe;		/* Pipe handle */
-    HANDLE thread;		/* Thread watching I/O on this pipe. */
-    HANDLE parent;		/* Handle of main thread. */
-    DWORD parentId;		/* Main thread ID. */
-    HWND hWindow;		/* Notifier window in main thread. Used to
-				 * goose the TCL notifier system indicating
-				 * that an event has occurred that it
-				 * needs to process. */
-    HANDLE idleEvent;		/* Signals that the pipe is idle (no one
-				 * is reading/writing from it). */
-    HANDLE readyEvent;		/* Signals that the pipe is ready for
-				 * the next I/O operation. */
-
-    DWORD lastError;		/* Error. */
-
-    char *buffer;		/* Current background output buffer. */
-    size_t start, end;		/* Pointers into the output buffer */
-    size_t size;		/* Size of buffer. */
-
-    Tcl_FileProc *proc;
-    ClientData clientData;
-
-} PipeHandler;
-
-
-typedef struct {
-    Tcl_Event header;		/* Information that is standard for
-				 * all events. */
-
-    PipeHandler *pipePtr;	/* Pointer to pipe handler structure.
-				 * Note that we still have to verify
-				 * that the pipe exists before
-				 * dereferencing this pointer.  */
-} PipeEvent;
-
-static int initialized = 0;
-static struct _Blt_Chain pipeChain;
-static CRITICAL_SECTION pipeCriticalSection;
-
-static DWORD WINAPI PipeWriterThread(void *clientData);
-static DWORD WINAPI PipeReaderThread(void *clientData);
-
-static Tcl_FreeProc DestroyPipe;
-
-BLT_EXTERN void Blt_MapPid(HANDLE hProcess, DWORD pid);
-
-#ifndef USE_TCL_STUBS
-BLT_EXTERN HINSTANCE TclWinGetTclInstance(void);
-BLT_EXTERN void TclWinConvertError(DWORD lastError);
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * NotifierWindowProc --
- *
- *	This procedure is called to goose the TCL notifier layer when
- *	service pending events.  The notifier is built upon the
- *	Windows message system.  The Windows event loop may need to be
- *	awakened if it's blocked waiting on messages.  Our psuedo
- *	pipes (e.g.  data available on a pipe) won't do that.  While
- *	there may be events pending in the TCL queue, Windows knows
- *	nothing about TCL events and won't unblock until the next
- *	Windows message arrives.
- *
- *	This routine sits in the main thread and is triggered by
- *	messages posted to a notifier window (we set it up earlier)
- *	from the reader/writer pipe threads.  It's purpose is two
- *	fold.
- *
- *      1) unblock Windows (posting the message does that) and 
- *      2) call Tcl_ServiceAll from the main thread.
- *
- * Results:
- *	A standard Windows result.
- *
- * Side effects:
- *	Services any pending TCL events.
- *
- *---------------------------------------------------------------------------
- */
-static LRESULT CALLBACK
-NotifierWindowProc(
-    HWND hWindow,
-    UINT message,
-    WPARAM wParam,
-    LPARAM lParam)
-{
-    switch (message) {
-    case WM_USER:
-    case WM_TIMER:
-	break;
-
-    default:
-	return DefWindowProc(hWindow, message, wParam, lParam);
-    }
-
-    Tcl_ServiceAll();		/* Process all run-able events. */
-    return 0;
-}
-
-static void
-WakeupNotifier(HWND hWindow)
-{
-    PostMessage(hWindow, WM_USER, 0, 0);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetNotifierWindow --
- *
- *	Initializes the platform specific notifier state.
- *
- * Results:
- *	Returns a handle to the notifier state for this thread..
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static HWND
-GetNotifierWindow(void)
-{
-    static HWND hWindow = NULL;
-    /*
-     * Register Notifier window class if this is the first thread to
-     * use this module.
-     */
-    if (hWindow == NULL) {
-	WNDCLASS class;
-	HINSTANCE hInstance;
-
-	memset(&class, 0, sizeof(WNDCLASS));
-	hInstance = TclWinGetTclInstance();
-	class.hInstance = hInstance;
-	class.lpszClassName = "PipeNotifier";
-	class.lpfnWndProc = NotifierWindowProc;
-
-	if (!RegisterClassA(&class)) {
-	    panic("Unable to register PipeNotifier window class");
-	}
-	/*
-	 * Create a window for communication with the notifier.
-	 */
-	hWindow = CreateWindowA("PipeNotifier", "PipeNotifier", WS_TILED,
-	    0, 0, 0, 0, NULL, NULL, hInstance, NULL);
-    }
-    return hWindow;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PeekOnPipe --
- *
- *	See if some data is available, the pipe is at EOF, or the
- *	reader thread is currently blocked waiting for data.
- *
- * Results:
- *	Return TRUE if data is available, FALSE if otherwise.  Note
- *	that errors and EOF always return TRUE.  We always make the
- *	condition available until the caller handles it by deleting
- *	the pipe event handler.
- *
- *	On TRUE, the number of bytes returned indicates the following:
- *	  0	EOF.
- *	  -1	An error has occured or the thread is currently
- *		blocked reading.  In that last case, errno is set
- *		to EAGAIN.
- *        >0    Number of bytes of data in the buffer.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PeekOnPipe(
-    PipeHandler *pipePtr,	/* Pipe state. */
-    int *nAvailPtr)
-{
-    int state;
-
-    *nAvailPtr = -1;
-#if PEEK_DEBUG
-    PurifyPrintf("PEEK(%d): waiting for reader\n", pipePtr->hPipe);
-#endif
-    state = WaitForSingleObject(pipePtr->readyEvent, 0);
-#if PEEK_DEBUG
-    PurifyPrintf("PEEK(%d): state is %d\n", pipePtr->hPipe, state);
-#endif
-    if (state == WAIT_TIMEOUT) {
-#if PEEK_DEBUG
-	PurifyPrintf("PEEK(%d): try again, %d\n", pipePtr->hPipe, state);
-#endif
-	errno = EAGAIN;
-	return FALSE;		/* Reader thread is currently blocked. */
-    }
-    /*
-     * At this point the two threads are synchronized. So it's safe
-     * to access shared information.
-     */
-    if (state == WAIT_OBJECT_0) {
-	int nAvail;
-
-	nAvail = pipePtr->end - pipePtr->start;
-#if PEEK_DEBUG
-	PurifyPrintf("PEEK(%d): Found %d bytes available\n", 
-		pipePtr->hPipe, nAvail);
-#endif
-	if ((nAvail <= 0) && !(pipePtr->flags & PIPE_EOF)) {
-	    TclWinConvertError(pipePtr->lastError);
-#if PEEK_DEBUG
-	    PurifyPrintf("PEEK(%d): Error = %d\n", 
-		pipePtr->hPipe, pipePtr->lastError);
-#endif
-	    nAvail = -1;
-	}
-	*nAvailPtr = nAvail;
-    }
-#if PEEK_DEBUG
-    PurifyPrintf("PEEK(%d): Reseting events\n", pipePtr->hPipe);
-#endif
-    return TRUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PipeEventProc --
- *
- *	This function is invoked by Tcl_ServiceEvent when a file event
- *	reaches the front of the event queue.  This procedure calls back
- *	the handler procedure designated for this pipe.
- *
- * Results:
- *	Returns 1 if the event was handled, meaning it should be removed
- *	from the queue.  Returns 0 if the event was not handled, meaning
- *	it should stay on the queue.  The only time the event isn't
- *	handled is if the TCL_FILE_EVENTS flag bit isn't set.
- *
- * Side effects:
- *	Whatever the pipe handler callback does.
- *
- *---------------------------------------------------------------------------
- */
-static int
-PipeEventProc(Tcl_Event * eventPtr, int flags)
-{
-    PipeHandler *pipePtr;
-
-    if (!(flags & TCL_FILE_EVENTS)) {
-	return 0;
-    }
-    pipePtr = ((PipeEvent *) eventPtr)->pipePtr;
-    if ((pipePtr != NULL) && !(pipePtr->flags & PIPE_DELETED)) {
-	Tcl_Preserve(pipePtr);
-	if (pipePtr->proc != NULL) {
-	    (*pipePtr->proc) (pipePtr->clientData, flags);
-	}
-	/* Allow more events again. */
-	pipePtr->flags &= ~PIPE_PENDING;
-	Tcl_Release(pipePtr);
-    }
-    return 1;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SetupHandlers --
- *
- *	This procedure is invoked before Tcl_DoOneEvent blocks waiting
- *	for an event.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Adjusts the block time if needed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-SetupHandlers(ClientData clientData, int flags)
-{
-    Blt_Chain chain = clientData;
-    PipeHandler *pipePtr;
-    Blt_ChainLink link;
-    int dontBlock, nBytes;
-    Tcl_Time blockTime;
-
-    if (!(flags & TCL_FILE_EVENTS)) {
-	return;
-    }
-    /*
-     * Loop through the list of pipe handlers.  Check if any I/O
-     * events are currently pending.
-     */
-    dontBlock = FALSE;
-    blockTime.sec = blockTime.usec = 0L;
-#if QUEUE_DEBUG
-    PurifyPrintf("SetupHandlers: before loop\n");
-#endif
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	pipePtr = Blt_Chain_GetValue(link);
-	if (pipePtr->flags & PIPE_DELETED) {
-	    continue;		/* Ignore pipes pending to be freed. */
-	}
-	if (pipePtr->flags & TCL_READABLE) {
-	    if (PeekOnPipe(pipePtr, &nBytes)) {
-		dontBlock = TRUE;
-	    }
-	}
-	if (pipePtr->flags & TCL_WRITABLE) {
-	    if (WaitForSingleObject(pipePtr->readyEvent, 0) != WAIT_TIMEOUT) {
-		dontBlock = TRUE;
-	    }
-	}
-    }
-#if QUEUE_DEBUG
-    PurifyPrintf("SetupHandlers: after loop\n");
-#endif
-    if (dontBlock) {
-	Tcl_SetMaxBlockTime(&blockTime);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CheckHandlers --
- *
- *	This procedure is called by Tcl_DoOneEvent to check the pipe
- *	event source for events.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	May queue an event.
- *
- *---------------------------------------------------------------------------
- */
-static void
-CheckHandlers(ClientData clientData, int flags)
-{
-    Blt_Chain chain = clientData;
-    PipeHandler *pipePtr;
-    Blt_ChainLink link;
-    int queueEvent, nBytes;
-
-    if ((flags & TCL_FILE_EVENTS) == 0) {
-	return;
-    }
-    /* Queue events for any ready pipes that aren't already queued.  */
-
-    for (link = Blt_Chain_FirstLink(chain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	pipePtr = Blt_Chain_GetValue(link);
-	if (pipePtr->flags & (PIPE_PENDING | PIPE_DELETED)) {
-	    continue;		/* If this pipe already is scheduled to
-				 * service an event, wait for it to handle
-				 * it. */
-	}
-	/* Queue an event if the pipe is signaled for reading or writing.  */
-	queueEvent = FALSE;
-	if (pipePtr->flags & TCL_READABLE) {
-	    if (PeekOnPipe(pipePtr, &nBytes)) {
-		queueEvent = TRUE;
-	    }
-	}
-	if (pipePtr->flags & TCL_WRITABLE) {
-	    if (WaitForSingleObject(pipePtr->readyEvent, 0) != WAIT_TIMEOUT) {
-		queueEvent = TRUE;
-	    }
-	}
-#if QUEUE_DEBUG
-	PurifyPrintf("Queue event is %d \n", queueEvent);
-#endif
-	if (queueEvent) {
-	    PipeEvent *eventPtr;
-
-	    pipePtr->flags |= PIPE_PENDING;
-	    eventPtr = Blt_AssertMalloc(sizeof(PipeEvent));
-	    eventPtr->header.proc = PipeEventProc;
-	    eventPtr->pipePtr = pipePtr;
-	    Tcl_QueueEvent((Tcl_Event *) eventPtr, TCL_QUEUE_TAIL);
-	}
-    }
-}
-
-static PipeHandler *
-CreatePipeHandler(HANDLE hFile, int flags)
-{
-    DWORD id;
-    PipeHandler *pipePtr;
-    LPTHREAD_START_ROUTINE threadProc;
-
-    pipePtr = Blt_AssertCalloc(1, sizeof(PipeHandler));
-    pipePtr->hPipe = hFile;
-    pipePtr->flags = flags;
-    pipePtr->parentId = GetCurrentThreadId();
-    pipePtr->parent = GetCurrentThread();
-    pipePtr->hWindow = GetNotifierWindow();
-    pipePtr->readyEvent = CreateEvent(
-	NULL,			/* Security attributes. */
-	TRUE,			/* Manual reset event */
-	FALSE,			/* Initially not signaled. */
-	NULL);			/* Event object's name. */
-    pipePtr->idleEvent = CreateEvent(
-	NULL,			/* Security attributes. */
-	FALSE,			/* Auto reset event. */
-	TRUE,			/* Initially signaled. */
-	NULL);			/* Event object's name. */
-
-    if (flags & TCL_READABLE) {
-	threadProc = (LPTHREAD_START_ROUTINE) PipeReaderThread;
-	pipePtr->buffer = Blt_AssertCalloc(1, PIPE_BUFSIZ);
-	pipePtr->size = PIPE_BUFSIZ;
-    } else {
-	threadProc = (LPTHREAD_START_ROUTINE) PipeWriterThread;
-    }
-
-    pipePtr->thread = CreateThread(
-	NULL,			/* Security attributes */
-	8000,			/* Initial stack size. */
-	threadProc,		/* Starting address of thread routine */
-	(DWORD *) pipePtr,	/* One-word of data passed to routine. */
-	0,			/* Creation flags */
-	&id);			/* (out) Will contain Id of new thread. */
-    return pipePtr;
-}
-
-static void
-DestroyPipe(DestroyData data)
-{
-    PipeHandler *pipePtr = (PipeHandler *)data;
-
-    if (pipePtr->buffer != NULL) {
-	Blt_Free(pipePtr->buffer);
-    }
-    Blt_Free(pipePtr);
-}
-
-static void
-DeletePipeHandler(PipeHandler * pipePtr)
-{
-#if KILL_DEBUG
-    PurifyPrintf("DestroyPipeHandler(%d)\n", pipePtr->hPipe);
-#endif
-    if ((pipePtr->flags & TCL_WRITABLE) &&
-	(pipePtr->hPipe != INVALID_HANDLE_VALUE)) {
-	/* Wait for the writer thread to finish with the current buffer */
-	WaitForSingleObject(pipePtr->idleEvent, INFINITE);
-    }
-    if (pipePtr->hPipe != INVALID_HANDLE_VALUE) {
-	CloseHandle(pipePtr->hPipe);
-    }
-    CloseHandle(pipePtr->readyEvent);
-    CloseHandle(pipePtr->idleEvent);
-    CloseHandle(pipePtr->thread);
-
-    pipePtr->idleEvent = pipePtr->readyEvent = INVALID_HANDLE_VALUE;
-    pipePtr->thread = pipePtr->hPipe = INVALID_HANDLE_VALUE;
-    pipePtr->flags |= PIPE_DELETED; /* Mark the pipe has deleted. */
-
-    Tcl_EventuallyFree(pipePtr, DestroyPipe);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PipeInit --
- *
- *	This function initializes the static variables for this file.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates a new event source.
- *
- *---------------------------------------------------------------------------
- */
-static void
-PipeInit(void)
-{
-    initialized = TRUE;
-    InitializeCriticalSection(&pipeCriticalSection);
-    Blt_ChainInit(&pipeChain);
-    Tcl_CreateEventSource(SetupHandlers, CheckHandlers, &pipeChain);
-}
-
-static PipeHandler *
-GetPipeHandler(HANDLE hPipe)
-{
-    PipeHandler *pipePtr;
-    Blt_ChainLink link;
-
-    for (link = Blt_Chain_FirstLink(&pipeChain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	pipePtr = Blt_Chain_GetValue(link);
-	if ((pipePtr->hPipe == hPipe) && !(pipePtr->flags & PIPE_DELETED)){
-	    return pipePtr;
-	}
-    }
-    return NULL;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_PipeTeardown --
- *
- *	This function releases any storage allocated for this file.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates a new event source.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_PipeTeardown(void)
-{
-    Blt_ChainLink link;
-    PipeHandler *pipePtr;
-
-    if (!initialized) {
-	return;			/* Was never initialized. */
-    }
-    initialized = FALSE;
-    EnterCriticalSection(&pipeCriticalSection);
-    for (link = Blt_Chain_FirstLink(&pipeChain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	pipePtr = Blt_Chain_GetValue(link);
-	if ((pipePtr != NULL) && !(pipePtr->flags & PIPE_DELETED)) {
-	    DeletePipeHandler(pipePtr);
-	}
-    }
-    DestroyWindow(GetNotifierWindow());
-    UnregisterClassA("PipeNotifier", TclWinGetTclInstance());
-
-    Blt_Chain_Reset(&pipeChain);
-    LeaveCriticalSection(&pipeCriticalSection);
-    Tcl_DeleteEventSource(SetupHandlers, CheckHandlers, &pipeChain);
-    DeleteCriticalSection(&pipeCriticalSection);
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * PipeReaderThread --
- *
- *	This function runs in a separate thread and waits for input
- *	to become available on a pipe.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Signals the main thread when input become available.  May
- *	cause the main thread to wake up by posting a message.
- *
- *---------------------------------------------------------------------------
- */
-static DWORD WINAPI
-PipeReaderThread(void *clientData)
-{
-    PipeHandler *pipePtr = (PipeHandler *) clientData;
-    DWORD count;
-    BOOL result;
-
-    for (;;) {
-	if (pipePtr->flags & PIPE_DELETED) {
-	    break;
-	}
-	/* Synchronize with the main thread so that we don't try to
-	 * read from the pipe while it's copying to the buffer.  */
-#if READER_DEBUG
-	PurifyPrintf("READER(%d): waiting\n", pipePtr->hPipe);
-#endif
-	WaitForSingleObject(pipePtr->idleEvent, INFINITE);
-#if READER_DEBUG
-	PurifyPrintf("READER(%d): ok\n", pipePtr->hPipe);
-#endif
-	/* Read from the pipe. The thread will block here until some
-	 * data is read into its buffer.  */
-#if READER_DEBUG
-	PurifyPrintf("READER(%d): before read\n", pipePtr->hPipe);
-#endif
-	assert(pipePtr->start == pipePtr->end);
-	result = ReadFile(
-	    pipePtr->hPipe,	/* Handle to anonymous pipe. */
-	    pipePtr->buffer,	/* Data buffer. */
-	    pipePtr->size,	/* Requested number of bytes (the size
-				 * of the buffer) */
-	    &count,		/* (out) Number of bytes actually read. */
-	    NULL);		/* Overlapping I/O */
-
-	if (result) {
-#if READER_DEBUG
-	    PurifyPrintf("READER(%d): after read. status=%d, count=%d\n", 
-		pipePtr->hPipe, result, count);
-#endif
-	}
-	/*
-	 * Reset counters to indicate that the buffer has been refreshed.
-	 */
-	pipePtr->start = 0;
-	pipePtr->end = count;
-	if (count == 0) {
-	    /* We've hit EOF or an error. */
-	    pipePtr->lastError = GetLastError();
-	    if ((pipePtr->lastError == ERROR_BROKEN_PIPE) ||
-		(pipePtr->lastError == ERROR_HANDLE_EOF)) {
-		pipePtr->flags |= PIPE_EOF;
-	    }
-#if READER_DEBUG
-	    PurifyPrintf("READER(%d): error is %s\n", 
-		pipePtr->hPipe, Blt_LastError());
-#endif
-	}
-	WakeupNotifier(pipePtr->hWindow);
-	SetEvent(pipePtr->readyEvent);
-	if (count == 0) {
-#if READER_DEBUG
-	    PurifyPrintf("READER(%d): exiting\n", pipePtr->hPipe);
-#endif
-	    ExitThread(0);
-	}
-    }
-    /* NOTREACHED */
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PipeWriterThread --
- *
- *	This function runs in a separate thread and writes data
- *	to the process' standard input pipe.
- *
- * Results:
- *	Always returns 0.
- *
- * Side effects:
- *	Signals the main thread when an output operation is completed.
- *	May cause the main thread to wake up by posting a message.
- *
- *---------------------------------------------------------------------------
- */
-static DWORD WINAPI
-PipeWriterThread(void *clientData)
-{
-    PipeHandler *pipePtr = (PipeHandler *) clientData;
-    DWORD count, bytesLeft;
-    char *ptr;
-
-    for (;;) {
-	if (pipePtr->flags & PIPE_DELETED) {
-	    break;
-	}
-
-	/*
-	 * Synchronize with the main thread so that we don't test the
-	 * pipe until its done writing.
-	 */
-
-	WaitForSingleObject(pipePtr->idleEvent, INFINITE);
-
-	ptr = pipePtr->buffer;
-	bytesLeft = pipePtr->end;
-
-	/* Loop until all of the bytes are written or an error occurs.  */
-
-	while (bytesLeft > 0) {
-	    if (!WriteFile(pipePtr->hPipe, ptr, bytesLeft, &count, NULL)) {
-		pipePtr->lastError = GetLastError();
-		break;
-	    }
-	    bytesLeft -= count;
-	    ptr += count;
-	}
-
-	/* Tell the main thread that data can be written to the pipe.
-	 * Remember to wake up the notifier thread.  */
-
-	SetEvent(pipePtr->readyEvent);
-	WakeupNotifier(pipePtr->hWindow);
-    }
-    /* NOTREACHED */
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TempFileName --
- *
- *	Gets a temporary file name and deals with the fact that the
- *	temporary file path provided by Windows may not actually exist
- *	if the TMP or TEMP environment variables refer to a
- *	non-existent directory.
- *
- * Results:
- *	0 if error, non-zero otherwise.  If non-zero is returned, the
- *	name buffer will be filled with a name that can be used to
- *	construct a temporary file.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-TempFileName(char *name)	/* (out) Buffer to hold name of
-				 * temporary file. */
-{
-    if ((GetTempPath(MAX_PATH, name) > 0) &&
-	(GetTempFileName(name, "TCL", 0, name))) {
-	return 1;
-    }
-    /* Bail out and use the current working directory. */
-    return GetTempFileName(".", "TCL", 0, name);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * OpenRedirectFile --
- *
- *	Open a file for use in a pipeline.
- *
- * Results:
- *	Returns a new handle or NULL on failure.
- *
- * Side effects:
- *	May cause a file to be created on the file system.
- *
- *---------------------------------------------------------------------------
- */
-static HANDLE
-OpenRedirectFile(
-    const char *path, 
-    DWORD accessFlags, 
-    DWORD createFlags)
-{
-    HANDLE hFile;
-    DWORD attribFlags;
-    int useExisting;
-
-    attribFlags = 0;
-    useExisting = (createFlags & (TRUNCATE_EXISTING | OPEN_EXISTING));
-    if (useExisting) {
-	attribFlags = GetFileAttributes(path);
-	if (attribFlags == 0xFFFFFFFF) {
-	    attribFlags = 0;
-	}
-    }
-    hFile = CreateFile(path,
-	accessFlags,		/* Access mode flags */
-	FILE_SHARE_READ | FILE_SHARE_WRITE,
-	NULL,			/* No security */
-	createFlags,		/* Creation attributes */
-	attribFlags,		/* File attribute flags */
-	NULL);			/* Template file */
-
-    if (hFile == INVALID_HANDLE_VALUE) {
-	DWORD lastError;
-
-	lastError = GetLastError();
-	if ((lastError & 0xffffL) == ERROR_OPEN_FAILED) {
-	    lastError = (useExisting)
-		? ERROR_FILE_NOT_FOUND : ERROR_FILE_EXISTS;
-	}
-	TclWinConvertError(lastError);
-	return INVALID_HANDLE_VALUE;
-    }
-    /*
-     * Seek to the end of file if we are writing.
-     */
-    if (createFlags & GENERIC_WRITE) {
-	SetFilePointer(hFile, 0, NULL, FILE_END);
-    }
-    return hFile;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * CreateTempFile --
- *
- *	This function creates a temporary file initialized with an
- *	optional string, and returns a file handle with the file pointer
- *	at the beginning of the file.
- *
- * Results:
- *	A handle to a file.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static HANDLE
-CreateTempFile(const char *data) /* String to write into temp file, or
-				  *  NULL. */
-{
-    char fileName[MAX_PATH + 1];
-    HANDLE hFile;
-    DWORD lastError;
-
-    if (!TempFileName(fileName)) {
-	return INVALID_HANDLE_VALUE;
-    }
-    hFile = CreateFile(
-	fileName,		/* File path */
-	GENERIC_READ | GENERIC_WRITE,	/* Access mode */
-	0,			/* No sharing. */
-	NULL,			/* Security attributes */
-	CREATE_ALWAYS,		/* Overwrite any existing file */
-	FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE,
-	NULL);			/* No template file */
-
-    if (hFile == INVALID_HANDLE_VALUE) {
-	goto error;
-    }
-    if (data != NULL) {
-	DWORD result, length;
-	const char *p;
-	const char *string;
-
-	string = data;
-	for (p = string; *p != '\0'; p++) {
-	    if (*p == '\n') {
-		length = p - string;
-		if (length > 0) {
-		    if (!WriteFile(hFile, string, length, &result, NULL)) {
-			goto error;
-		    }
-		}
-		if (!WriteFile(hFile, "\r\n", 2, &result, NULL)) {
-		    goto error;
-		}
-		string = p + 1;
-	    }
-	}
-	length = p - string;
-	if (length > 0) {
-	    if (!WriteFile(hFile, string, length, &result, NULL)) {
-		goto error;
-	    }
-	}
-	if (SetFilePointer(hFile, 0, NULL, FILE_BEGIN) == (DWORD) - 1) {
-	    goto error;
-	}
-    }
-    return hFile;
-
-  error:
-    lastError = GetLastError();
-    CloseHandle(hFile);
-    DeleteFile(fileName);	/* Do I need this? Delete on close? */
-    TclWinConvertError(lastError);
-    return INVALID_HANDLE_VALUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * HasConsole --
- *
- *	Determines whether the current application is attached to a
- *	console.
- *
- * Results:
- *	Returns TRUE if this application has a console, else FALSE.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static BOOL
-HasConsole(void)
-{
-    HANDLE hFile;
-
-    hFile = CreateFileA("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, NULL,
-	OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-    if (hFile == INVALID_HANDLE_VALUE) {
-	return FALSE;
-    }
-    CloseHandle(hFile);
-    return TRUE;
-}
-
-static ApplicationType
-GetApplicationType(const char *file, char *cmdPrefix)
-{
-    char *dot;
-    HANDLE hFile;
-    IMAGE_DOS_HEADER imageDosHeader;
-    ULONG signature;
-    BOOL result;
-    DWORD offset;
-    DWORD nBytes;
-    ApplicationType type;
-
-    dot = strrchr(file, '.');
-    if ((dot != NULL) && (strcasecmp(dot, ".bat") == 0)) {
-	return APPL_DOS;
-    }
-    /* Work a little harder. Open the binary and read the header */
-    hFile = CreateFileA(file, GENERIC_READ, FILE_SHARE_READ, NULL,
-	OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-    if (hFile == INVALID_HANDLE_VALUE) {
-	return APPL_NONE;
-    }
-    type = APPL_NONE;
-    result = ReadFile(hFile, &imageDosHeader, sizeof(IMAGE_DOS_HEADER),
-	&nBytes, NULL);
-    if ((!result) || (nBytes != sizeof(IMAGE_DOS_HEADER))) {
-	goto done;
-    }
-#if KILL_DEBUG
-    PurifyPrintf("magic number is %x\n", imageDosHeader.e_magic);
-#endif
-    if (imageDosHeader.e_magic == 0x2123) {	/* #! */
-	char *p;
-	unsigned int i;
-
-	offset = SetFilePointer(hFile, 2, NULL, FILE_BEGIN);
-	if (offset == (DWORD) - 1) {
-	    goto done;
-	}
-	result = ReadFile(hFile, cmdPrefix, MAX_PATH + 1, &nBytes, NULL);
-	if ((!result) || (nBytes < 1)) {
-	    goto done;
-	}
-	for (p = cmdPrefix, i = 0; i < nBytes; i++, p++) {
-	    if ((*p == '\n') || (*p == '\r')) {
-		break;
-	    }
-	}
-	*p = '\0';
-	type = APPL_INTERP;
-	goto done;
-    }
-    /*
-     * Doesn't have the magic number for relocatable executables.  If
-     * filename ends with .com, assume it's a DOS application anyhow.
-     * Note that we didn't make this assumption at first, because some
-     * supposed .com files are really 32-bit executables with all the
-     * magic numbers and everything.
-     */
-    if ((dot != NULL) && (strcmp(dot, ".com") == 0)) {
-#if KILL_DEBUG
-	PurifyPrintf(".com\n");
-#endif
-	type = APPL_DOS;
-	goto done;
-    }
-    if (imageDosHeader.e_magic != IMAGE_DOS_SIGNATURE) {
-#if KILL_DEBUG
-	PurifyPrintf("Application doesn't have correct sig?\n");
-#endif
-    }
-    if (imageDosHeader.e_lfarlc != sizeof(IMAGE_DOS_HEADER)) {
-	/* This assumes that all 3.x and Win32 programs have their
-	 * file relocation table immediately following this header. */
-	/*
-	 * All Windows 3.X and Win32 and some DOS programs have this value
-	 * set here.  If it doesn't, assume that since it already had the
-	 * other magic number it was a DOS application.
-	 */
-#if KILL_DEBUG
-	PurifyPrintf("wrong reloc table address\n");
-#endif
-	type = APPL_DOS;
-	goto done;
-    }
-    offset = SetFilePointer(hFile, imageDosHeader.e_lfanew, NULL, FILE_BEGIN);
-    if (offset == (DWORD) - 1) {
-	goto done;
-    }
-    result = ReadFile(hFile, &signature, sizeof(ULONG), &nBytes, NULL);
-    if ((!result) || (nBytes != sizeof(ULONG))) {
-	goto done;
-    }
-#if KILL_DEBUG
-    PurifyPrintf("signature is %x\n", signature);
-#endif
-    switch (signature) {
-    case IMAGE_NT_SIGNATURE:
-	type = APPL_WIN32;
-	break;
-    case IMAGE_OS2_SIGNATURE:
-	type = APPL_WIN3X;
-	break;
-    case IMAGE_VXD_SIGNATURE:
-	type = APPL_WIN32;
-	break;
-    default:
-	type = APPL_DOS;
-	break;
-    }
-  done:
-    CloseHandle(hFile);
-    return type;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * GetFullPath --
- *
- *	Look for the program as an external program.  First try the
- *	name as it is, then try adding .com, .exe, and .bat, in that
- *	order, to the name, looking for an executable.
- *
- *	Using the raw SearchPath() procedure doesn't do quite what is
- *	necessary.  If the name of the executable already contains a
- *	'.'  character, it will not try appending the specified
- *	extension when searching (in other words, SearchPath will
- *	not find the program "a.b.exe" if the arguments specified
- *	"a.b" and ".exe").  So, first look for the file as it is
- *	named.  Then manually append extensions, looking for a
- *	match.
- *
- * Results:
- *	Always returns TCL_OK.
- *
- * Side Effects:
- *
- *---------------------------------------------------------------------------
- */
-static int
-GetFullPath(
-    Tcl_Interp *interp,		/* Interpreter to report errors to */
-    const char *program,	/* Name of program. */
-    char *fullPath,		/* (out) Returned full path. */
-    char *cmdPrefix,		/* (out) If program is a script, this contains
-				 * the name of the interpreter. */
-    ApplicationType * typePtr)
-{				/* (out) Type of program */
-    TCHAR *rest;
-    DWORD attr;
-    int length;
-    char cmd[MAX_PATH + 5];
-    const char **p;
-    char *ext;
-
-    static const char *dosExts[] =
-    {
-	"", ".com", ".exe", ".bat", NULL
-    };
-
-    *typePtr = APPL_NONE;
-
-    length = strlen(program);
-    strcpy(cmd, program);
-    cmdPrefix[0] = '\0';
-    ext = cmd + length;
-    for (p = dosExts; *p != NULL; p++) {
-	*ext = '\0';		/* Reset to original program name. */
-	strcpy(ext, *p);	/* Append the DOS extension to the
-				 * program name. */
-
-	if (!SearchPath(
-		NULL,		/* Use standard Windows search paths */
-		cmd,		/* Program name */
-		NULL,		/* Extension provided by program name. */
-		MAX_PATH,	/* Buffer size */
-		fullPath,	/* Buffer for absolute path of program */
-		&rest)) {
-	    continue;		/* Can't find program with that extension */
-	}
-	/*
-	 * Ignore matches on directories or data files. 
-	 * Return when we identify a known program type.
-	 */
-	attr = GetFileAttributesA(fullPath);
-	if ((attr == (DWORD)-1) || (attr & FILE_ATTRIBUTE_DIRECTORY)) {
-	    continue;
-	}
-	*typePtr = GetApplicationType(fullPath, cmdPrefix);
-	if (*typePtr != APPL_NONE) {
-	    break;
-	}
-    }
-    if (*typePtr == APPL_NONE) {
-	/*
-	 * Can't find the program.  Check if it's an internal shell command
-	 * like "copy" or "dir" and let cmd.exe deal with it.
-	 */
-	static const char *shellCmds[] =
-	{
-	    "copy", "del", "dir", "echo", "edit", "erase", "label",
-	    "md", "rd", "ren", "start", "time", "type", "ver", "vol", NULL
-	};
-
-	for (p = shellCmds; *p != NULL; p++) {
-	    if (((*p)[0] == program[0]) && (strcmp(*p, program) == 0)) {
-		break;
-	    }
-	}
-	if (*p == NULL) {
-	    Tcl_AppendResult(interp, "can't execute \"", program, 
-			     "\": no such file or directory", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	*typePtr = APPL_DOS;
-	strcpy(fullPath, program);
-    }
-    if ((*typePtr == APPL_DOS) || (*typePtr == APPL_WIN3X)) {
-
-	/* For 16-bit applications, convert the long executable path
-	 * name to a short one.  Otherwise the application may not be
-	 * able to correctly parse its own command line.  */
-
-	GetShortPathName(fullPath, fullPath, MAX_PATH);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConcatCmdArgs --
- *
- *	Concatonates command line arguments parsed from TCL into a
- *	single string.  If an argument contain spaces, it is grouped
- *	with surrounding double quotes. Must also escape any quotes we
- *	find.
- *
- * Results:
- *	Returns a malloc-ed string containing the concatonated command
- *	line.
- *
- *---------------------------------------------------------------------------
- */
-static char *
-ConcatCmdArgs(
-    Tcl_Interp *interp,
-    int argc, 
-    char **argv, 
-    Tcl_DString *resultPtr)
-{
-    BOOL needQuote;
-    const char *s;
-    char *cp;
-    char *string;		/* Will contain the new command line */
-    int count;
-    int i;
-
-    /*
-     * Pass 1.	Compute how much space we need for an array to hold the entire
-     *		command line.  Then allocate the string.
-     */
-    count = 0;
-    for (i = 0; i < argc; i++) {
-	needQuote = FALSE;
-	if (*argv[i] == '\0') {
-	    needQuote = TRUE;	/* Zero length args also need quotes. */
-	}
-	for (s = argv[i]; *s != '\0'; s++) {
-	    if (*s == '"') {
-		const char *bp;
-
-		count++;	/* +1 Backslash needed to escape quote */
-		for (bp = s - 1; (*bp == '\\') && (bp >= argv[i]); bp--) {
-		    count++;	/* +? one for each preceding backslash */
-		}
-	    } else if (isspace(*s)) {
-		needQuote = TRUE;
-	    }
-	    count++;		/* +1 Normal character */
-	}
-	if (needQuote) {
-	    count += 2;		/* +2 Pair of quotes */
-	}
-	count++;		/* +1 Space separating arguments */
-    }
-
-    string = Blt_AssertMalloc(count + 1);
-    /*
-     * Pass 2.	Copy the arguments, quoting arguments with embedded spaces and
-     *		escaping all other quotes in the string.
-     */
-    cp = string;
-    for (i = 0; i < argc; i++) {
-	needQuote = FALSE;
-
-	if (*argv[i] == '\0') {
-	    needQuote = TRUE;
-	}
-	for (s = argv[i]; *s != '\0'; s++) {
-	    if (isspace(*s)) {
-		needQuote = TRUE;
-	    }
-	}
-	if (needQuote) {
-	    *cp++ = '"';
-	}
-	for (s = argv[i]; *s; s++) {
-	    if (*s == '"') {
-		const char *bp;
-
-		for (bp = s - 1; (*bp == '\\') && (bp >= argv[i]); bp--) {
-		    *cp++ = '\\';
-		}
-		*cp++ = '\\';
-	    }
-	    *cp++ = *s;
-	}
-	if (needQuote) {
-	    *cp++ = '"';
-	}
-	*cp++ = ' ';
-    }
-    *cp = '\0';
-    assert((cp - string) == count);
-
-#if (_TCL_VERSION >= _VERSION(8,1,0)) 
-    {
-	Tcl_DString dString;
-	Tcl_Encoding encoding;
-
-	/* Convert to external encoding */
-	encoding = Tcl_GetEncoding(interp, NULL);
-	Tcl_UtfToExternalDString(encoding, string, count, &dString);
-	Tcl_DStringAppend(resultPtr, Tcl_DStringValue(&dString), -1);
-	Tcl_DStringFree(&dString);
-    }
-#else
-    Tcl_DStringAppend(resultPtr, string, count);
-#endif 
-    Blt_Free(string);
-    return Tcl_DStringValue(resultPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * StartProcess --
- *
- *	Create a child process that has the specified files as its
- *	standard input, output, and error.
- *
- *	The complete Windows search path is searched to find the specified
- *	executable.  If an executable by the given name is not found,
- *	automatically tries appending ".com", ".exe", and ".bat" to the
- *	executable name.
- *
- * Results:
- *	The return value is TCL_ERROR and an error message is left in
- *	the interp's result if there was a problem creating the child
- *	process.  Otherwise, the return value is TCL_OK and *pidPtr is
- *	filled with the process id of the child process.
- *
- * Side effects:
- *	A process is created.
- *
- *---------------------------------------------------------------------------
- */
-static int
-StartProcess(
-    Tcl_Interp *interp,		/* Interpreter to report errors that
-				 * occurred when creating the child process.
-				 * Error messages from the child process
-				 * itself are sent to errorFile. */
-    int argc,			/* Number of arguments. */
-    char **argv,		/* Command line arguments. */
-    HANDLE hStdin,		/* File handle to use as input (stdin) for the
-				 * child process. If handle is -1, no
-				 * standard input. */
-    HANDLE hStdout,		/* File handle to receive output (stdout)
-				 * from the child process.  If -1, output
-				 * is discarded. */
-    HANDLE hStderr,		/* File handle to receive errors (stderr)
-				 * from the child process.  If -1, stderr
-				 * will be discarded. Can be the same handle
-				 * as hStdOut */
-    HANDLE *hProcessPtr,	/* (out) Handle of child process. */
-    DWORD *pidPtr)		/* (out) Id of child process. */
-{
-    int result, createFlags;
-    ApplicationType applType;
-    Tcl_DString dString;	/* Complete command line */
-    char *command;
-    BOOL hasConsole;
-#ifdef notdef
-    DWORD idleResult;
-#endif
-    STARTUPINFOA si;
-    PROCESS_INFORMATION pi;
-    SECURITY_ATTRIBUTES securityAttrs;
-    HANDLE hProcess, hPipe;
-    char progPath[MAX_PATH];
-    char cmdPrefix[MAX_PATH];
-
-    *hProcessPtr = INVALID_HANDLE_VALUE;
-    GetFullPath(interp, argv[0], progPath, cmdPrefix, &applType);
-#if KILL_DEBUG
-    PurifyPrintf("Application type is %d\n", (int)applType);
-#endif
-    if (applType == APPL_NONE) {
-	return TCL_ERROR;
-    }
-    result = TCL_ERROR;
-
-    hProcess = GetCurrentProcess();
-
-    ZeroMemory(&si, sizeof(STARTUPINFOA));
-    si.cb = sizeof(STARTUPINFOA);
-
-    /*
-     * The flag STARTF_USESTDHANDLES must be set to pass handles to
-     * the child process.  Using SetStdHandle and/or dup2 works only
-     * when a console mode parent process is spawning an attached
-     * console mode child process.
-     */
-
-    si.dwFlags = STARTF_USESTDHANDLES;
-    si.hStdInput = si.hStdOutput = si.hStdError = INVALID_HANDLE_VALUE;
-
-    securityAttrs.nLength = sizeof(SECURITY_ATTRIBUTES);
-    securityAttrs.lpSecurityDescriptor = NULL;
-    securityAttrs.bInheritHandle = TRUE;
-
-    /*
-     * Duplicate all the handles to be passed off as stdin, stdout and
-     * stderr of the child process. The duplicate handles are set to
-     * be inheritable, so the child process can use them.
-     */
-    if (hStdin == INVALID_HANDLE_VALUE) {
-	/*
-	 * If handle was not set, stdin should return immediate EOF.
-	 * Under Windows95, some applications (both 16 and 32 bit!)
-	 * can't read from the NUL device; they read from console
-	 * instead.  When running tk, this is fatal because the child
-	 * process would hang forever waiting for EOF from the unmapped
-	 * console window used by the helper application.
-	 *
-	 * Fortunately, the helper application detects a closed pipe
-	 * as an immediate EOF and can pass that information to the
-	 * child process.
-	 */
-	if (CreatePipe(&si.hStdInput, &hPipe, &securityAttrs, 0)) {
-	    CloseHandle(hPipe);
-	}
-    } else {
-	DuplicateHandle(hProcess, hStdin, hProcess, &si.hStdInput, 0, TRUE,
-	    DUPLICATE_SAME_ACCESS);
-    }
-
-    if (si.hStdInput == INVALID_HANDLE_VALUE) {
-	Tcl_AppendResult(interp, "can't duplicate input handle: ",
-	    Blt_LastError(), (char *)NULL);
-	goto closeHandles;
-    }
-    if (hStdout == INVALID_HANDLE_VALUE) {
-	/*
-	 * If handle was not set, output should be sent to an infinitely
-	 * deep sink.  Under Windows 95, some 16 bit applications cannot
-	 * have stdout redirected to NUL; they send their output to
-	 * the console instead.  Some applications, like "more" or "dir /p",
-	 * when outputting multiple pages to the console, also then try and
-	 * read from the console to go the next page.  When running tk, this
-	 * is fatal because the child process would hang forever waiting
-	 * for input from the unmapped console window used by the helper
-	 * application.
-	 *
-	 * Fortunately, the helper application will detect a closed pipe
-	 * as a sink.
-	 */
-	if ((Blt_GetPlatformId() == VER_PLATFORM_WIN32_WINDOWS)
-	    && (applType == APPL_DOS)) {
-	    if (CreatePipe(&hPipe, &si.hStdOutput, &securityAttrs, 0)) {
-		CloseHandle(hPipe);
-	    }
-	} else {
-	    si.hStdOutput = CreateFileA("NUL:", GENERIC_WRITE, 0,
-		&securityAttrs, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-	}
-    } else {
-	DuplicateHandle(hProcess, hStdout, hProcess, &si.hStdOutput, 0, TRUE,
-	    DUPLICATE_SAME_ACCESS);
-    }
-    if (si.hStdOutput == INVALID_HANDLE_VALUE) {
-	Tcl_AppendResult(interp, "can't duplicate output handle: ",
-	    Blt_LastError(), (char *)NULL);
-	goto closeHandles;
-    }
-    if (hStderr == INVALID_HANDLE_VALUE) {
-	/*
-	 * If handle was not set, errors should be sent to an infinitely
-	 * deep sink.
-	 */
-	si.hStdError = CreateFileA("NUL:", GENERIC_WRITE, 0,
-	    &securityAttrs, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-    } else {
-	DuplicateHandle(hProcess, hStderr, hProcess, &si.hStdError, 0, TRUE,
-	    DUPLICATE_SAME_ACCESS);
-    }
-    if (si.hStdError == INVALID_HANDLE_VALUE) {
-	Tcl_AppendResult(interp, "can't duplicate error handle: ",
-	    Blt_LastError(), (char *)NULL);
-	goto closeHandles;
-    }
-    Tcl_DStringInit(&dString);
-    createFlags = 0;
-    hasConsole = HasConsole();
-    if (!hasConsole) {
-	createFlags |= DETACHED_PROCESS;
-    }
-    /*
-     * If we do not have a console window, then we must run DOS and
-     * WIN32 console mode applications as detached processes. This tells
-     * the loader that the child application should not inherit the
-     * console, and that it should not create a new console window for
-     * the child application.  The child application should get its stdio
-     * from the redirection handles provided by this application, and run
-     * in the background.
-     *
-     * If we are starting a GUI process, they don't automatically get a
-     * console, so it doesn't matter if they are started as foreground or
-     * detached processes.  The GUI window will still pop up to the
-     * foreground.
-     */
-    if (applType == APPL_DOS) {
-	if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	    /*
-	     * Under NT, 16-bit DOS applications will not run unless they
-	     * can be attached to a console.  If we are running without a
-	     * console, run the 16-bit program as an normal process inside
-	     * of a hidden console application, and then run that hidden
-	     * console as a detached process.
-	     */
-	    si.wShowWindow = SW_HIDE;
-	    si.dwFlags |= STARTF_USESHOWWINDOW;
-	    createFlags = CREATE_NEW_CONSOLE;
-	    Tcl_DStringAppend(&dString, "cmd.exe /c ", -1);
-	} else {
-	    /*
-	     * Under Windows 95, 16-bit DOS applications do not work well
-	     * with pipes:
-	     *
-	     * 1. EOF on a pipe between a detached 16-bit DOS application
-	     *	  and another application is not seen at the other
-	     *	  end of the pipe, so the listening process blocks forever on
-	     *	  reads.  This inablity to detect EOF happens when either a
-	     *    16-bit app or the 32-bit app is the listener.
-	     *
-	     * 2. If a 16-bit DOS application (detached or not) blocks when
-	     *    writing to a pipe, it will never wake up again, and it
-	     *    eventually brings the whole system down around it.
-	     *
-	     * The 16-bit application is run as a normal process
-	     * inside of a hidden helper console app, and this helper
-	     * may be run as a detached process.  If a stdio handle is
-	     * a pipe, the helper application accumulates information
-	     * into temp files and forwards it to or from the DOS
-	     * application as appropriate.  This means that DOS apps
-	     * must receive EOF from a stdin pipe before they will
-	     * actually begin, and must finish generating stdout or
-	     * stderr before the data will be sent to the next stage
-	     * of the pipe.
-	     *
-	     * The helper app should be located in the same directory
-	     * as the tcl dll.
-	     */
-	    if (!hasConsole) {
-		si.wShowWindow = SW_HIDE;
-		si.dwFlags |= STARTF_USESHOWWINDOW;
-		createFlags = CREATE_NEW_CONSOLE;
-	    }
-	    Tcl_DStringAppend(&dString, "tclpip" STRINGIFY(TCL_MAJOR_VERSION)
-		STRINGIFY(TCL_MINOR_VERSION) ".dll ", -1);
-	}
-    } else if (applType == APPL_INTERP) {
-	Tcl_DStringAppend(&dString, cmdPrefix, -1);
-	Tcl_DStringAppend(&dString, " ", -1);
-    }
-    argv[0] = progPath;
-
-    command = ConcatCmdArgs(interp, argc, argv, &dString);
-#if KILL_DEBUG
-    PurifyPrintf("command is %s\n", command);
-#endif
-    result = CreateProcess(
-	NULL,			/* Module name. */
-	(TCHAR *)command,	/* Command line */
-	NULL,			/* Process security */
-	NULL,			/* Thread security */
-	TRUE,			/* Inherit handles */
-	createFlags,		/* Creation flags */
-	NULL,			/* Environment */
-	NULL,			/* Current working directory */
-	&si,			/* Initialization for process: includes
-				 * standard handles, appearance and location
-				 * of window */
-	&pi);			/* (out) Information about newly
-				   created process */
-    Tcl_DStringFree(&dString);
-
-    if (!result) {
-	Tcl_AppendResult(interp, "can't execute \"", argv[0], "\": ",
-	    Blt_LastError(), (char *)NULL);
-	goto closeHandles;
-    }
-#if KILL_DEBUG
-    PurifyPrintf("Starting process with handle of %d\n", pi.hProcess);
-    PurifyPrintf("Starting process with id of %d\n", pi.dwProcessId);
-#endif
-    if (applType == APPL_DOS) {
-	/* Force the OS to give some time to the DOS process. */
-	WaitForSingleObject(hProcess, 50);
-    }
-#ifdef notdef			/* FIXME: I don't think this actually
-				 * ever worked. WaitForInputIdle
-				 * usually fails with "Access is
-				 * denied" (maybe the process handle
-				 * isn't valid yet?).  When you add a
-				 * delay, WaitForInputIdle will time
-				 * out instead. */
-    /*
-     * PSS ID Number: Q124121
-     *
-     *	  "When an application spawns a process repeatedly, a new
-     *	  thread instance will be created for each process but the
-     *	  previous instances may not be cleaned up.  This results in
-     *	  a significant virtual memory loss each time the process is
-     *	  spawned.  If there is a WaitForInputIdle() call between
-     *	  CreateProcess() and CloseHandle(), the problem does not
-     *    occur."  */
-    idleResult = WaitForInputIdle(pi.hProcess, 1000);
-    if (idleResult == (DWORD) - 1) {
-#if KILL_DEBUG
-	PurifyPrintf("wait failed on %d: %s\n", pi.hProcess, Blt_LastError());
-#endif
-    }
-#endif
-    CloseHandle(pi.hThread);
-
-    *hProcessPtr = pi.hProcess;
-
-    /*
-     * Add the entry to mapping table. Its purpose is to translate
-     * process handles to process ids. Most things we do with the
-     * Win32 API take handles, but we still want to present process
-     * ids to the user.  */
-    *pidPtr = pi.dwProcessId;
-    result = TCL_OK;
-
-  closeHandles:
-    if (si.hStdInput != INVALID_HANDLE_VALUE) {
-	CloseHandle(si.hStdInput);
-    }
-    if (si.hStdOutput != INVALID_HANDLE_VALUE) {
-	CloseHandle(si.hStdOutput);
-    }
-    if (si.hStdError != INVALID_HANDLE_VALUE) {
-	CloseHandle(si.hStdError);
-    }
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FileForRedirect --
- *
- *	This procedure does much of the work of parsing redirection
- *	operators.  It handles "@" if specified and allowed, and a file
- *	name, and opens the file if necessary.
- *
- * Results:
- *	The return value is the descriptor number for the file.  If an
- *	error occurs then NULL is returned and an error message is left
- *	in interp->result.  Several arguments are side-effected; see
- *	the argument list below for details.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-static HANDLE
-FileForRedirect(
-    Tcl_Interp *interp,		/* Intepreter to use for error reporting. */
-    char *spec,			/* Points to character just after
-				 * redirection character. */
-    BOOL atOK,			/* Non-zero means that '@' notation can be
-				 * used to specify a channel, zero means that
-				 * it isn't. */
-    char *arg,			/* Pointer to entire argument containing
-				 * spec:  used for error reporting. */
-    char *nextArg,		/* Next argument in argc/argv array, if needed
-				 * for file name or channel name.  May be
-				 * NULL. */
-    DWORD accessFlags,		/* Flags to use for opening file or to
-				 * specify mode for channel. */
-    DWORD createFlags,		/* Flags to use for opening file or to
-				 * specify mode for channel. */
-    int *skipPtr,		/* Filled with 1 if redirection target was
-				 * in spec, 2 if it was in nextArg. */
-    int *closePtr)		/* Filled with one if the caller should
-				 * close the file when done with it, zero
-				 * otherwise. */
-{
-    int writing = (accessFlags & GENERIC_WRITE);
-    Tcl_Channel chan;
-    HANDLE hFile;
-
-    *skipPtr = 1;
-    *closePtr = FALSE;
-    if ((atOK) && (*spec == '@')) {
-	spec++;
-	if (*spec == '\0') {
-	    spec = nextArg;
-	    if (spec == NULL) {
-		goto badLastArg;
-	    }
-	    *skipPtr = 2;
-	}
-	chan = Tcl_GetChannel(interp, spec, NULL);
-	if (chan == NULL) {
-	    return INVALID_HANDLE_VALUE;
-	}
-	if (Tcl_GetChannelHandle(chan, (writing) ? TCL_WRITABLE : TCL_READABLE,
-		(ClientData *)&hFile) != TCL_OK) {
-	    hFile = INVALID_HANDLE_VALUE;
-	}
-	if (hFile == INVALID_HANDLE_VALUE) {
-	    Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan),
-		"\" wasn't opened for ",
-		((writing) ? "writing" : "reading"), (char *)NULL);
-	    return INVALID_HANDLE_VALUE;
-	}
-	if (writing) {
-	    /*
-	     * Be sure to flush output to the file, so that anything
-	     * written by the child appears after stuff we've already
-	     * written.
-	     */
-	    Tcl_Flush(chan);
-	}
-    } else {
-	char *name;
-	Tcl_DString dString;
-
-	if (*spec == '\0') {
-	    spec = nextArg;
-	    if (spec == NULL) {
-		goto badLastArg;
-	    }
-	    *skipPtr = 2;
-	}
-	name = Tcl_TranslateFileName(interp, spec, &dString);
-	if (name != NULL) {
-	    hFile = OpenRedirectFile(name, accessFlags, createFlags);
-	} else {
-	    hFile = INVALID_HANDLE_VALUE;
-	}
-	Tcl_DStringFree(&dString);
-
-	if (hFile == INVALID_HANDLE_VALUE) {
-	    Tcl_AppendResult(interp, "can't ", (writing) ? "write" : "read",
-		" file \"", spec, "\": ", Tcl_PosixError(interp),
-		(char *)NULL);
-	    return INVALID_HANDLE_VALUE;
-	}
-	*closePtr = TRUE;
-    }
-    return hFile;
-
-  badLastArg:
-    Tcl_AppendResult(interp, "can't specify \"", arg,
-	"\" as last word in command", (char *)NULL);
-    return INVALID_HANDLE_VALUE;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreatePipeline --
- *
- *	Given an argc/argv array, instantiate a pipeline of processes
- *	as described by the argv.
- *
- * Results:
- *	The return value is a count of the number of new processes
- *	created, or -1 if an error occurred while creating the pipeline.
- *	*pidArrayPtr is filled in with the address of a dynamically
- *	allocated array giving the ids of all of the processes.  It
- *	is up to the caller to free this array when it isn't needed
- *	anymore.  If inPipePtr is non-NULL, *inPipePtr is filled in
- *	with the file id for the input pipe for the pipeline (if any):
- *	the caller must eventually close this file.  If outPipePtr
- *	isn't NULL, then *outPipePtr is filled in with the file id
- *	for the output pipe from the pipeline:  the caller must close
- *	this file.  If errPipePtr isn't NULL, then *errPipePtr is filled
- *	with a file id that may be used to read error output after the
- *	pipeline completes.
- *
- * Side effects:
- *	Processes and pipes are created.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_CreatePipeline(
-    Tcl_Interp *interp,		/* Interpreter to use for error reporting. */
-    int objc,			/* Number of entries in objv. */
-    Tcl_Obj *const *objv,	/* Array of strings describing commands in
-				 * pipeline plus I/O redirection with <,
-				 * <<,  >, etc.  Objv[objc] must be NULL. */
-    ProcessId **pidsPtr,	/* *pidsPtr gets filled in with
-				 * address of array of pids for processes
-				 * in pipeline (first pid is first process
-				 * in pipeline). */
-    int *inPipePtr,		/* If non-NULL, input to the pipeline comes
-				 * from a pipe (unless overridden by
-				 * redirection in the command).  The file
-				 * id with which to write to this pipe is
-				 * stored at *inPipePtr.  NULL means command
-				 * specified its own input source. */
-    int *outPipePtr,		/* If non-NULL, output to the pipeline goes
-				 * to a pipe, unless overriden by redirection
-				 * in the command.  The file id with which to
-				 * read frome this pipe is stored at
-				 * *outPipePtr.  NULL means command specified
-				 * its own output sink. */
-    int *errPipePtr)		/* If non-NULL, all stderr output from the
-				 * pipeline will go to a temporary file
-				 * created here, and a descriptor to read
-				 * the file will be left at *errPipePtr.
-				 * The file will be removed already, so
-				 * closing this descriptor will be the end
-				 * of the file.  If this is NULL, then
-				 * all stderr output goes to our stderr.
-				 * If the pipeline specifies redirection
-				 * then the file will still be created
-				 * but it will never get any data. */
-{
-    ProcessId *pids = NULL;	/* Points to malloc-ed array holding all
-				 * the handles of child processes. */
-    int nPids;			/* Actual number of processes that exist
-				 * at *pids right now. */
-    int cmdCount;		/* Count of number of distinct commands
-				 * found in objc/argv. */
-    char *inputLiteral = NULL;	/* If non-null, then this points to a
-				 * string containing input data (specified
-				 * via <<) to be piped to the first process
-				 * in the pipeline. */
-    HANDLE hStdin;		/* If != -1, gives file to use as input for
-				 * first process in pipeline (specified via <
-				 * or <@). */
-    BOOL closeStdin;		/* If non-zero, then hStdin should be
-				 * closed when cleaning up. */
-    HANDLE hStdout;		/* Writable file for output from last command
-				 * in pipeline (could be file or pipe).  NULL
-				 * means use stdout. */
-    BOOL closeStdout;		/* If non-zero, then hStdout should be
-				 * closed when cleaning up. */
-    HANDLE hStderr;		/* Writable file for error output from all
-				 * commands in pipeline.  NULL means use
-				 * stderr. */
-    BOOL closeStderr;		/* If non-zero, then hStderr should be
-				 * closed when cleaning up. */
-
-    HANDLE hInPipe, hOutPipe, hErrPipe;
-    char *p;
-    int skip, lastBar, lastArg, i, j, flags;
-    int pid;
-    BOOL atOK, errorToOutput;
-    Tcl_DString dString;
-    HANDLE hPipe;
-    HANDLE thisInput, thisOutput, thisError;
-    char **argv;
-
-    if (inPipePtr != NULL) {
-	*inPipePtr = -1;
-    }
-    if (outPipePtr != NULL) {
-	*outPipePtr = -1;
-    }
-    if (errPipePtr != NULL) {
-	*errPipePtr = -1;
-    }
-    Tcl_DStringInit(&dString);
-
-    hStdin = hStdout = hStderr = INVALID_HANDLE_VALUE;
-    hPipe = thisInput = thisOutput = INVALID_HANDLE_VALUE;
-    hInPipe = hOutPipe = hErrPipe = INVALID_HANDLE_VALUE;
-    closeStdin = closeStdout = closeStderr = FALSE;
-    nPids = 0;
-
-    /*
-     * First, scan through all the arguments to figure out the structure
-     * of the pipeline.  Process all of the input and output redirection
-     * arguments and remove them from the argument list in the pipeline.
-     * Count the number of distinct processes (it's the number of "|"
-     * arguments plus one) but don't remove the "|" arguments because
-     * they'll be used in the second pass to seperate the individual
-     * child processes.  Cannot start the child processes in this pass
-     * because the redirection symbols may appear anywhere in the
-     * command line -- e.g., the '<' that specifies the input to the
-     * entire pipe may appear at the very end of the argument list.
-     */
-
-    /* Convert all the Tcl_Objs to strings. */
-    argv = Blt_AssertMalloc((objc + 1) *  sizeof(char *));
-    for (i = 0; i < objc; i++) {
-	argv[i] = Tcl_GetString(objv[i]);
-    }
-    argv[i] = NULL;
-
-    lastBar = -1;
-    cmdCount = 1;
-    for (i = 0; i < objc; i++) {
-	skip = 0;
-	p = argv[i];
-	switch (*p++) {
-	case '|':
-	    if (*p == '&') {
-		p++;
-	    }
-	    if (*p == '\0') {
-		if ((i == (lastBar + 1)) || (i == (objc - 1))) {
-		    Tcl_AppendResult(interp, 
-				     "illegal use of | or |& in command",
-				     (char *)NULL);
-		    goto error;
-		}
-	    }
-	    lastBar = i;
-	    cmdCount++;
-	    break;
-
-	case '<':
-	    if (closeStdin) {
-		closeStdin = FALSE;
-		CloseHandle(hStdin);
-	    }
-	    if (*p == '<') {
-		hStdin = INVALID_HANDLE_VALUE;
-		inputLiteral = p + 1;
-		skip = 1;
-		if (*inputLiteral == '\0') {
-		    inputLiteral = argv[i + 1];
-		    if (inputLiteral == NULL) {
-			Tcl_AppendResult(interp, "can't specify \"", argv[i],
-			    "\" as last word in command", (char *)NULL);
-			goto error;
-		    }
-		    skip = 2;
-		}
-	    } else {
-		inputLiteral = NULL;
-		hStdin = FileForRedirect(interp, p, TRUE, argv[i], argv[i + 1],
-		    GENERIC_READ, OPEN_EXISTING, &skip, &closeStdin);
-		if (hStdin == INVALID_HANDLE_VALUE) {
-		    goto error;
-		}
-	    }
-	    break;
-
-	case '>':
-	    atOK = 1;
-	    flags = CREATE_ALWAYS;
-	    errorToOutput = FALSE;
-	    if (*p == '>') {
-		p++;
-		atOK = 0;
-		flags = OPEN_ALWAYS;
-	    }
-	    if (*p == '&') {
-		if (closeStderr) {
-		    closeStderr = FALSE;
-		    CloseHandle(hStderr);
-		}
-		errorToOutput = TRUE;
-		p++;
-	    }
-	    if (closeStdout) {
-		closeStdout = FALSE;
-		CloseHandle(hStdout);
-	    }
-	    hStdout = FileForRedirect(interp, p, atOK, argv[i], argv[i + 1],
-		GENERIC_WRITE, flags, &skip, &closeStdout);
-	    if (hStdout == INVALID_HANDLE_VALUE) {
-		goto error;
-	    }
-	    if (errorToOutput) {
-		closeStderr = FALSE;
-		hStderr = hStdout;
-	    }
-	    break;
-
-	case '2':
-	    if (*p != '>') {
-		break;
-	    }
-	    p++;
-	    atOK = TRUE;
-	    flags = CREATE_ALWAYS;
-	    if (*p == '>') {
-		p++;
-		atOK = FALSE;
-		flags = OPEN_ALWAYS;
-	    }
-	    if (closeStderr) {
-		closeStderr = FALSE;
-		CloseHandle(hStderr);
-	    }
-	    hStderr = FileForRedirect(interp, p, atOK, argv[i], argv[i + 1],
-		GENERIC_WRITE, flags, &skip, &closeStderr);
-	    if (hStderr == INVALID_HANDLE_VALUE) {
-		goto error;
-	    }
-	    break;
-	}
-
-	if (skip != 0) {
-	    for (j = i + skip; j < objc; j++) {
-		argv[j - skip] = argv[j];
-	    }
-	    objc -= skip;
-	    i -= 1;
-	}
-    }
-
-    if (hStdin == INVALID_HANDLE_VALUE) {
-	if (inputLiteral != NULL) {
-	    /*
-	     * The input for the first process is immediate data coming from
-	     * Tcl.  Create a temporary file for it and put the data into the
-	     * file.
-	     */
-	    hStdin = CreateTempFile(inputLiteral);
-	    if (hStdin == INVALID_HANDLE_VALUE) {
-		Tcl_AppendResult(interp,
-		    "can't create input file for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    closeStdin = TRUE;
-	} else if (inPipePtr != NULL) {
-	    /*
-	     * The input for the first process in the pipeline is to
-	     * come from a pipe that can be written from by the caller.
-	     */
-
-	    if (!CreatePipe(&hStdin, &hInPipe, NULL, 0)) {
-		Tcl_AppendResult(interp,
-		    "can't create input pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    closeStdin = TRUE;
-	} else {
-	    /*
-	     * The input for the first process comes from stdin.
-	     */
-	}
-    }
-    if (hStdout == INVALID_HANDLE_VALUE) {
-	if (outPipePtr != NULL) {
-	    /*
-	     * Output from the last process in the pipeline is to go to a
-	     * pipe that can be read by the caller.
-	     */
-
-	    if (!CreatePipe(&hOutPipe, &hStdout, NULL, 0)) {
-		Tcl_AppendResult(interp,
-		    "can't create output pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    closeStdout = TRUE;
-	} else {
-	    /*
-	     * The output for the last process goes to stdout.
-	     */
-	}
-    }
-    if (hStderr == INVALID_HANDLE_VALUE) {
-	if (errPipePtr != NULL) {
-	    /*
-	     * Stderr from the last process in the pipeline is to go to a
-	     * pipe that can be read by the caller.
-	     */
-	    if (CreatePipe(&hErrPipe, &hStderr, NULL, 0) == 0) {
-		Tcl_AppendResult(interp,
-		    "can't create error pipe for command: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	    closeStderr = TRUE;
-	} else {
-	    /*
-	     * Errors from the pipeline go to stderr.
-	     */
-	}
-    }
-
-    /*
-     * Scan through the objc array, creating a process for each
-     * group of arguments between the "|" characters.
-     */
-
-    Tcl_ReapDetachedProcs();
-    pids = Blt_AssertMalloc((unsigned)((cmdCount + 1) * sizeof(ProcessId)));
-    thisInput = hStdin;
-    if (objc == 0) {
-	Tcl_AppendResult(interp, "invalid null command", (char *)NULL);
-	goto error;
-    }
-
-    lastArg = 0;		/* Suppress compiler warning */
-    for (i = 0; i < objc; i = lastArg + 1) {
-	BOOL joinThisError;
-	HANDLE hProcess;
-	DWORD dw_pid;
-	/* Convert the program name into native form. */
-	argv[i] = Tcl_TranslateFileName(interp, argv[i], &dString);
-	if (argv[i] == NULL) {
-	    goto error;
-	}
-	/* Find the end of the current segment of the pipeline. */
-	joinThisError = FALSE;
-	for (lastArg = i; lastArg < objc; lastArg++) {
-	    if (argv[lastArg][0] == '|') {
-		if (argv[lastArg][1] == '\0') {
-		    break;
-		}
-		if ((argv[lastArg][1] == '&') && (argv[lastArg][2] == '\0')) {
-		    joinThisError = TRUE;
-		    break;
-		}
-	    }
-	}
-	argv[lastArg] = NULL;
-	if ((lastArg - i) == 0) {
-	    Tcl_AppendResult(interp, "invalid null command", (char *)NULL);
-	    goto error;
-	}
-
-	/*
-	 * If this is the last segment, use the specified output handle.
-	 * Otherwise create an intermediate pipe.  hPipe will become the
-	 * input for the next segment of the pipe.
-	 */
-	if (lastArg == objc) {
-	    thisOutput = hStdout;
-	} else {
-	    if (CreatePipe(&hPipe, &thisOutput, NULL, 0) == 0) {
-		Tcl_AppendResult(interp, "can't create pipe: ",
-		    Tcl_PosixError(interp), (char *)NULL);
-		goto error;
-	    }
-	}
-
-	if (joinThisError) {
-	    thisError = thisOutput;
-	} else {
-	    thisError = hStderr;
-	}
-
-	if (StartProcess(interp, lastArg - i, argv + i, thisInput, thisOutput,
-		thisError, &hProcess, &dw_pid) != TCL_OK) {
-	    goto error;
-	}
-	pid = (int)dw_pid;
-	Tcl_DStringFree(&dString);
-
-	pids[nPids].hProcess = hProcess;
-	pids[nPids].pid = pid;
-	nPids++;
-
-	/*
-	 * Close off our copies of file descriptors that were set up for
-	 * this child, then set up the input for the next child.
-	 */
-
-	if ((thisInput != INVALID_HANDLE_VALUE) && (thisInput != hStdin)) {
-	    CloseHandle(thisInput);
-	}
-	thisInput = hPipe;
-	hPipe = INVALID_HANDLE_VALUE;
-
-	if ((thisOutput != INVALID_HANDLE_VALUE) && (thisOutput != hStdout)) {
-	    CloseHandle(thisOutput);
-	}
-	thisOutput = INVALID_HANDLE_VALUE;
-    }
-
-    *pidsPtr = pids;
-
-    if (inPipePtr != NULL) {
-	*inPipePtr = (int)hInPipe;
-    }
-    if (outPipePtr != NULL) {
-	*outPipePtr = (int)hOutPipe;
-    }
-    if (errPipePtr != NULL) {
-	*errPipePtr = (int)hErrPipe;
-    }
-    /*
-     * All done.  Cleanup open files lying around and then return.
-     */
-  cleanup:
-    Tcl_DStringFree(&dString);
-
-    if (closeStdin) {
-	CloseHandle(hStdin);
-    }
-    if (closeStdout) {
-	CloseHandle(hStdout);
-    }
-    if (closeStderr) {
-	CloseHandle(hStderr);
-    }
-    if (argv != NULL) {
-	Blt_Free(argv);
-    }
-    return nPids;
-
-    /*
-     * An error occurred.  There could have been extra files open, such
-     * as pipes between children.  Clean them all up.  Detach any child
-     * processes that have been created.
-     */
-  error:
-    if (hPipe != INVALID_HANDLE_VALUE) {
-	CloseHandle(hPipe);
-    }
-    if ((thisOutput != INVALID_HANDLE_VALUE) && (thisOutput != hStdout)) {
-	CloseHandle(thisOutput);
-    }
-    if ((thisInput != INVALID_HANDLE_VALUE) && (thisInput != hStdin)) {
-	CloseHandle(thisInput);
-    }
-    if (hInPipe != INVALID_HANDLE_VALUE) {
-	CloseHandle(hInPipe);
-    }
-    if (hOutPipe != INVALID_HANDLE_VALUE) {
-	CloseHandle(hOutPipe);
-    }
-    if (hErrPipe != INVALID_HANDLE_VALUE) {
-	CloseHandle(hErrPipe);
-    }
-    if (pids != NULL) {
-	for (i = 0; i < nPids; i++) {
-	    if (pids[i].hProcess != INVALID_HANDLE_VALUE) {
-		/* It's Ok to use Tcl_DetachPids, since for WIN32 it's really
-		 * using process handles, not process ids. */
-		Tcl_DetachPids(1, (Tcl_Pid *)&pids[i].pid);
-	    }
-	}
-	Blt_Free(pids);
-    }
-    nPids = -1;
-    goto cleanup;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_CreateFileHandler --
- *
- *	Limited emulation Tcl_CreateFileHandler for Win32. Works
- *	with pipes. Don't know if anything else will (such as sockets).
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Registers procedure and data to call back when data
- *	is available on the pipe.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_CreateFileHandler(
-    int fd,			/* Descriptor or handle of file */
-    int flags,			/* TCL_READABLE or TCL_WRITABLE  */
-    Tcl_FileProc *proc,
-    ClientData clientData)
-{
-    PipeHandler *pipePtr;
-
-    if (!initialized) {
-	PipeInit();
-    }
-    if ((flags != TCL_READABLE) && (flags != TCL_WRITABLE)) {
-	return;			/* Only one of the flags can be set. */
-    }
-    pipePtr = CreatePipeHandler((HANDLE) fd, flags);
-    pipePtr->proc = proc;
-    pipePtr->clientData = clientData;
-
-    /* Add the handler to the list of managed pipes. */
-    EnterCriticalSection(&pipeCriticalSection);
-    Blt_Chain_Append(&pipeChain, pipePtr);
-    LeaveCriticalSection(&pipeCriticalSection);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_DeleteFileHandler --
- *
- *	Win32 emulation Tcl_DeleteFileHandler.  Cleans up resources
- *	used.
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_DeleteFileHandler(int fd)	/* Descriptor or handle of file */
-{
-    PipeHandler *pipePtr;
-    Blt_ChainLink link;
-    HANDLE hPipe;
-
-    if (!initialized) {
-	PipeInit();
-    }
-#if KILL_DEBUG
-    PurifyPrintf("Blt_DeleteFileHandler(%d)\n", fd);
-#endif
-    hPipe = (HANDLE) fd;
-    EnterCriticalSection(&pipeCriticalSection);
-
-    for (link = Blt_Chain_FirstLink(&pipeChain); link != NULL;
-	link = Blt_Chain_NextLink(link)) {
-	pipePtr = Blt_Chain_GetValue(link);
-	if ((pipePtr->hPipe == hPipe) && !(pipePtr->flags & PIPE_DELETED)) {
-	    Blt_Chain_DeleteLink(&pipeChain, link);
-	    DeletePipeHandler(pipePtr);
-	    break;
-	}
-    }
-    LeaveCriticalSection(&pipeCriticalSection);
-#if KILL_DEBUG
-    PurifyPrintf("Blt_DeleteFileHandler: done\n");
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_AsyncRead --
- *
- *	Reads input from the pipe into the given buffer.
- *
- * Results:
- *	Returns the number of bytes read.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_AsyncRead(
-    int f,
-    char *buffer,
-    unsigned int size)
-{
-    PipeHandler *pipePtr;
-    unsigned int count;
-    int nBytes;
-
-#if ASYNC_DEBUG
-    PurifyPrintf("Blt_AsyncRead(f=%d)\n", f);
-#endif
-    pipePtr = GetPipeHandler((HANDLE) f);
-    if ((pipePtr == NULL) || (pipePtr->flags & PIPE_DELETED)) {
-	errno = EBADF;
-#if ASYNC_DEBUG
-	PurifyPrintf("Blt_AsyncRead: bad file\n");
-#endif
-	return -1;
-    }
-    if (!PeekOnPipe(pipePtr, &nBytes)) {
-#if ASYNC_DEBUG
-	PurifyPrintf("Blt_AsyncRead: pipe is drained (nBytes=%d).\n", nBytes);
-#endif
-	return -1;		/* No data available. */
-    }
-    /*
-     * nBytes is	0	EOF found.
-     *			-1	Error occured.
-     *			1+	Number of bytes available.
-     */
-    if (nBytes == -1) {
-#if ASYNC_DEBUG
-	PurifyPrintf("Blt_AsyncRead: Error\n");
-#endif
-	return -1;
-    }
-    if (nBytes == 0) {
-#if ASYNC_DEBUG
-	PurifyPrintf("Blt_AsyncRead: EOF\n");
-#endif
-	return 0;
-    }
-    count = pipePtr->end - pipePtr->start;
-#if ASYNC_DEBUG
-    PurifyPrintf("Blt_AsyncRead: nBytes is %d, %d\n", nBytes, count);
-#endif
-    assert(count == (unsigned int)nBytes);
-    if (size > count) {
-	size = count;		/* Reset request to what's available. */
-    }
-    memcpy(buffer, pipePtr->buffer + pipePtr->start, size);
-    pipePtr->start += size;
-    if (pipePtr->start == pipePtr->end) {
-#if ASYNC_DEBUG
-	PurifyPrintf("Blt_AsyncRead: signaling idle\n");
-#endif
-	ResetEvent(pipePtr->readyEvent);
-	SetEvent(pipePtr->idleEvent);
-    }
-    return size;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_AsyncWrite --
- *
- *	Writes output to the pipe from the given buffer.
- *
- * Results:
- *	Returns the number of bytes written.
- *
- *---------------------------------------------------------------------------
- */
-int
-Blt_AsyncWrite(
-    int f,
-    const char *buffer,
-    unsigned int size)
-{
-    PipeHandler *pipePtr;
-
-    pipePtr = GetPipeHandler((HANDLE) f);
-    if ((pipePtr == NULL) || (pipePtr->flags & PIPE_DELETED)) {
-	errno = EBADF;
-	return -1;
-    }
-    if (WaitForSingleObject(pipePtr->readyEvent, 0) == WAIT_TIMEOUT) {
-	/*
-	 * Writer thread is currently blocked waiting for a write to
-	 * complete.
-	 */
-	errno = EAGAIN;
-	return -1;
-    }
-    /* Check for a background error on the last write. */
-    if (pipePtr->lastError) {
-	TclWinConvertError(pipePtr->lastError);
-	pipePtr->lastError = 0;
-	return -1;
-    }
-    /* Reallocate the buffer to be large enough to hold the data. */
-    if (size > pipePtr->size) {
-	char *ptr;
-
-	ptr = Blt_AssertMalloc(size);
-	Blt_Free(pipePtr->buffer);
-	pipePtr->buffer = ptr;
-    }
-    memcpy(pipePtr->buffer, buffer, size);
-    pipePtr->end = pipePtr->size = size;
-    ResetEvent(pipePtr->readyEvent);
-    SetEvent(pipePtr->idleEvent);
-    return size;
-}
diff --git a/blt3.0/src/bltWinPrnt.c b/blt3.0/src/bltWinPrnt.c
deleted file mode 100644
index f8da3de..0000000
--- a/blt3.0/src/bltWinPrnt.c
+++ /dev/null
@@ -1,1658 +0,0 @@
-
-/*
- * bltWinPrnt.c --
- *
- * This module implements Win32 printer access.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <bltInt.h>
-#include "bltOp.h"
-#include <bltHash.h>
-#ifndef NO_PRINTER
-#include <X11/Xutil.h>
-#undef Status
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-#include <winspool.h>
-#endif /* _MSC_VER || __BORLANDC__ */
-#include "tkDisplay.h"
-
-/*
-  set pid [printer open name]
-  printer close $pid
-  printer write $pid $data
-  printer snap $pid .window
-  printer names
-  printer enum things
-  printer getattr $pid
-  printer setattr $pid
-
-  set pid [open ]
-  blt::printer open {\\alprint\2a211} p1
-  p1 getattr varName
-  p1 setattr varName
-  p1 write $data
-  .graph print p1
-  p1 snap .window
-  p1 close
-  blt::printer names
-  blt::printer emum things
-*/
-
-#define PRINTER_THREAD_KEY	"BLT Printer Data"
-
-#ifdef notdef
-#define DM_SPECVERSION 0x0401
-
-#define DMPAPER_ISO_B4              42	/* B4 (ISO) 250 x 353 mm              */
-#define DMPAPER_JAPANESE_POSTCARD   43	/* Japanese Postcard 100 x 148 mm     */
-#define DMPAPER_9X11                44	/* 9 x 11 in                          */
-#define DMPAPER_10X11               45	/* 10 x 11 in                         */
-#define DMPAPER_15X11               46	/* 15 x 11 in                         */
-#define DMPAPER_ENV_INVITE          47	/* Envelope Invite 220 x 220 mm       */
-#define DMPAPER_RESERVED_48         48	/* RESERVED--DO NOT USE               */
-#define DMPAPER_RESERVED_49         49	/* RESERVED--DO NOT USE               */
-#define DMPAPER_LETTER_EXTRA        50	/* Letter Extra 9 \275 x 12 in        */
-#define DMPAPER_LEGAL_EXTRA         51	/* Legal Extra 9 \275 x 15 in         */
-#define DMPAPER_TABLOID_EXTRA       52	/* Tabloid Extra 11.69 x 18 in        */
-#define DMPAPER_A4_EXTRA            53	/* A4 Extra 9.27 x 12.69 in           */
-#define DMPAPER_LETTER_TRANSVERSE   54	/* Letter Transverse 8 \275 x 11 in   */
-#define DMPAPER_A4_TRANSVERSE       55	/* A4 Transverse 210 x 297 mm         */
-#define DMPAPER_LETTER_EXTRA_TRANSVERSE 56	/* Letter Extra Transverse 9\275 x 12 in */
-#define DMPAPER_A_PLUS              57	/* SuperA/SuperA/A4 227 x 356 mm      */
-#define DMPAPER_B_PLUS              58	/* SuperB/SuperB/A3 305 x 487 mm      */
-#define DMPAPER_LETTER_PLUS         59	/* Letter Plus 8.5 x 12.69 in         */
-#define DMPAPER_A4_PLUS             60	/* A4 Plus 210 x 330 mm               */
-#define DMPAPER_A5_TRANSVERSE       61	/* A5 Transverse 148 x 210 mm         */
-#define DMPAPER_B5_TRANSVERSE       62	/* B5 (JIS) Transverse 182 x 257 mm   */
-#define DMPAPER_A3_EXTRA            63	/* A3 Extra 322 x 445 mm              */
-#define DMPAPER_A5_EXTRA            64	/* A5 Extra 174 x 235 mm              */
-#define DMPAPER_B5_EXTRA            65	/* B5 (ISO) Extra 201 x 276 mm        */
-#define DMPAPER_A2                  66	/* A2 420 x 594 mm                    */
-#define DMPAPER_A3_TRANSVERSE       67	/* A3 Transverse 297 x 420 mm         */
-#define DMPAPER_A3_EXTRA_TRANSVERSE 68	/* A3 Extra Transverse 322 x 445 mm   */
-#ifndef DMPAPER_LAST
-#define DMPAPER_LAST                DMPAPER_A3_EXTRA_TRANSVERSE
-#endif /*DMPAPER_LAST */
-
-#define DMPAPER_USER                256
-
-/* bin selections */
-#ifndef DMPAPER_FIRST
-#define DMBIN_FIRST         DMBIN_UPPER
-#endif /*DMPAPER_FIRST*/
-
-#define DMBIN_UPPER         1
-#define DMBIN_ONLYONE       1
-#define DMBIN_LOWER         2
-#define DMBIN_MIDDLE        3
-#define DMBIN_MANUAL        4
-#define DMBIN_ENVELOPE      5
-#define DMBIN_ENVMANUAL     6
-#define DMBIN_AUTO          7
-#define DMBIN_TRACTOR       8
-#define DMBIN_SMALLFMT      9
-#define DMBIN_LARGEFMT      10
-#define DMBIN_LARGECAPACITY 11
-#define DMBIN_CASSETTE      14
-#define DMBIN_FORMSOURCE    15
-
-#ifndef DMBIN_LAST 
-#define DMBIN_LAST          DMBIN_FORMSOURCE
-#endif /*DMBIN_LAST*/
-
-#define DMBIN_USER          256	/* device specific bins start here */
-
-/* print qualities */
-#define DMRES_DRAFT         (-1)
-#define DMRES_LOW           (-2)
-#define DMRES_MEDIUM        (-3)
-#define DMRES_HIGH          (-4)
-
-#define DMTT_DOWNLOAD_OUTLINE 4	/* download TT fonts as outline soft fonts */
-#endif /* DM */
-
-typedef struct {
-    Blt_HashTable printerTable;	/* Hash table of printer structures keyed by 
-				 * the name of the printer. */
-    int nextId;
-} PrinterInterpData;
-
-typedef struct {
-    int type;
-    HDC hDC;
-} PrintDrawable;
-
-typedef struct {
-    Tcl_Interp *interp;
-    Tcl_Command cmdToken;	/* Token for vector's TCL command. */
-    char *name;
-    char *fileName;
-    PrintDrawable drawable;
-    HANDLE hPrinter;
-    Blt_HashEntry *hashPtr;
-    Blt_HashTable *tablePtr;
-    char *driverName;
-    char *deviceName;
-    char *printerName;
-    char *docName;
-    char *portName;
-    DEVMODE *dmPtr;
-    int dmSize;
-} PrinterQueue;
-
-typedef struct {
-    DWORD token;
-    const char *string;
-} TokenString;
-
-static TokenString sizeTable[] =
-{
- /* Letter 8 1/2 x 11 in */
-    { DMPAPER_LETTER, "Letter" },
- /* Letter Small 8 1/2 x 11 in */
-    { DMPAPER_LETTERSMALL, "Letter Small" },
- /* Tabloid 11 x 17 in */
-    { DMPAPER_TABLOID, "Tabloid" },
- /* Ledger 17 x 11 in */
-    { DMPAPER_LEDGER, "Ledger" },
- /* Legal 8 1/2 x 14 in */
-    { DMPAPER_LEGAL, "Legal" },
- /* Statement 5 1/2 x 8 1/2 in */
-    { DMPAPER_STATEMENT, "Statement" },
- /* Executive 7 1/4 x 10 1/2 in */
-    { DMPAPER_EXECUTIVE, "Executive" },
- /* A3 297 x 420 mm */
-    { DMPAPER_A3, "A3" },
- /* A4 210 x 297 mm */
-    { DMPAPER_A4, "A4" },
- /* A4 Small 210 x 297 mm */
-    { DMPAPER_A4SMALL, "A4 Small" },
- /* A5 148 x 210 mm */
-    { DMPAPER_A5, "A5" },
- /* B4 (JIS) 250 x 354 */
-    { DMPAPER_B4, "B4 (JIS)" },
- /* B5 (JIS) 182 x 257 mm */
-    { DMPAPER_B5, "B5 (JIS)" },
- /* Folio 8 1/2 x 13 in */
-    { DMPAPER_FOLIO, "Folio" },
- /* Quarto 215 x 275 mm */
-    { DMPAPER_QUARTO, "Quarto" },
- /* 10x14 in */
-    { DMPAPER_10X14, "10x14" },
- /* 11x17 in */
-    { DMPAPER_11X17, "11x17" },
- /* Note 8 1/2 x 11 in */
-    { DMPAPER_NOTE, "Note" },
- /* Envelope #9 3 7/8 x 8 7/8 */
-    { DMPAPER_ENV_9, "Envelope #9" },
- /* Envelope #10 4 1/8 x 9 1/2 */
-    { DMPAPER_ENV_10, "Envelope #10" },
- /* Envelope #11 4 1/2 x 10 3/8 */
-    { DMPAPER_ENV_11, "Envelope #11" },
- /* Envelope #12 4 \276 x 11 */
-    { DMPAPER_ENV_12, "Envelope #12" },
- /* Envelope #14 5 x 11 1/2 */
-    { DMPAPER_ENV_14, "Envelope #14" },
- /* C size sheet */
-    { DMPAPER_CSHEET, "C size sheet" },
- /* D size sheet */
-    { DMPAPER_DSHEET, "D size sheet" },
- /* E size sheet */
-    { DMPAPER_ESHEET, "E size sheet" },
- /* Envelope DL 110 x 220mm */
-    { DMPAPER_ENV_DL, "Envelope DL" },
- /* Envelope C5 162 x 229 mm */
-    { DMPAPER_ENV_C5, "Envelope C5" },
- /* Envelope C3  324 x 458 mm */
-    { DMPAPER_ENV_C3, "Envelope C3" },
- /* Envelope C4  229 x 324 mm */
-    { DMPAPER_ENV_C4, "Envelope C4" },
- /* Envelope C6  114 x 162 mm */
-    { DMPAPER_ENV_C6, "Envelope C6" },
- /* Envelope C65 114 x 229 mm */
-    { DMPAPER_ENV_C65, "Envelope C65" },
- /* Envelope B4  250 x 353 mm */
-    { DMPAPER_ENV_B4, "Envelope B4" },
- /* Envelope B5  176 x 250 mm */
-    { DMPAPER_ENV_B5, "Envelope B5" },
- /* Envelope B6  176 x 125 mm */
-    { DMPAPER_ENV_B6, "Envelope B6" },
- /* Envelope 110 x 230 mm */
-    { DMPAPER_ENV_ITALY, "Envelope Italy" },
- /* Env Monarch 3 7/8 x 7 1/2 in */
-    { DMPAPER_ENV_MONARCH, "Envelope Monarch" },
- /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
-    { DMPAPER_ENV_PERSONAL, "6 3/4 Envelope" },
- /* US Std Fanfold 14 7/8 x 11 in */
-    { DMPAPER_FANFOLD_US, "US Std Fanfold" },
- /* German Std Fanfold 8 1/2 x 12 in */
-    { DMPAPER_FANFOLD_STD_GERMAN, "German Std Fanfold" },
- /* German Legal Fanfold 8 1/2 x 13 in */
-    { DMPAPER_FANFOLD_LGL_GERMAN, "German Legal Fanfold" },
- /* B4 (ISO) 250 x 353 mm */
-    { DMPAPER_ISO_B4, "ISOB4" },
- /* Japanese Postcard 100 x 148 mm */
-    { DMPAPER_JAPANESE_POSTCARD, "Postcard (JIS)" },
- /* 9 x 11 in */
-    { DMPAPER_9X11, "9x11" },
- /* 10 x 11 in */
-    { DMPAPER_10X11, "10x11" },
- /* 15 x 11 in */
-    { DMPAPER_15X11, "15x11" },
- /* Envelope Invite 220 x 220 mm */
-    { DMPAPER_ENV_INVITE, "Envelope Invite" },
- /* Letter Extra 9 \275 x 12 in */
-    { DMPAPER_LETTER_EXTRA, "Letter Extra" },
- /* Legal Extra 9 \275 x 15 in */
-    { DMPAPER_LEGAL_EXTRA, "Legal Extra" },
- /* Tabloid Extra 11.69 x 18 in */
-    { DMPAPER_TABLOID_EXTRA, "Tabloid Extra" },
- /* A4 Extra 9.27 x 12.69 in */
-    { DMPAPER_A4_EXTRA, "A4 Extra" },
- /* Letter Transverse 8 \275 x 11 in */
-    { DMPAPER_LETTER_TRANSVERSE, "Letter Transverse" },
- /* A4 Transverse 210 x 297 mm */
-    { DMPAPER_A4_TRANSVERSE, "A4 Transverse" },
- /* Letter Extra Transverse 9\275 x 12 in */
-    { DMPAPER_LETTER_EXTRA_TRANSVERSE, "Letter Extra Transverse" },
- /* SuperA/SuperA/A4 227 x 356 mm */
-    { DMPAPER_A_PLUS, "Super A Plus" },
- /* SuperB/SuperB/A3 305 x 487 mm */
-    { DMPAPER_B_PLUS, "Super B Plus" },
- /* Letter Plus 8.5 x 12.69 in */
-    { DMPAPER_LETTER_PLUS, "Letter Plus" },
- /* A4 Plus 210 x 330 mm */
-    { DMPAPER_A4_PLUS, "A4 Plus" },
- /* A5 Transverse 148 x 210 mm */
-    { DMPAPER_A5_TRANSVERSE, "A5 Transverse" },
- /* B5 (JIS) Transverse 182 x 257 mm */
-    { DMPAPER_B5_TRANSVERSE, "B5 Transverse" },
- /* A3 Extra 322 x 445 mm */
-    { DMPAPER_A3_EXTRA, "A3 Extra" },
- /* A5 Extra 174 x 235 mm */
-    { DMPAPER_A5_EXTRA, "A5 Extra" },
- /* B5 (ISO) Extra 201 x 276 mm */
-    { DMPAPER_B5_EXTRA, "B5 Extra" },
- /* A2 420 x 594 mm */
-    { DMPAPER_A2, "A2" },
- /* A3 Transverse 297 x 420 mm */
-    { DMPAPER_A3_TRANSVERSE, "A3 Transverse" },
- /* A3 Extra Transverse 322 x 445 mm   */
-    { DMPAPER_A3_EXTRA_TRANSVERSE, "A3 Extra Transverse" },
-    { 0, NULL }
-};
-
-static TokenString statusTable[] =
-{
-    { PRINTER_STATUS_BUSY, "Busy" },
-    { PRINTER_STATUS_DOOR_OPEN, "Door Open" },
-    { PRINTER_STATUS_ERROR, "Error" },
-    { PRINTER_STATUS_INITIALIZING, "Initializing" },
-    { PRINTER_STATUS_IO_ACTIVE, "IO Active" },
-    { PRINTER_STATUS_MANUAL_FEED, "Manual Feed" },
-    { PRINTER_STATUS_NOT_AVAILABLE, "Not Available" },
-    { PRINTER_STATUS_NO_TONER, "No Toner" },
-    { PRINTER_STATUS_OFFLINE, "Offline" },
-    { PRINTER_STATUS_OUTPUT_BIN_FULL, "Bin Full" },
-    { PRINTER_STATUS_OUT_OF_MEMORY, "Out Of Memory" },
-    { PRINTER_STATUS_PAGE_PUNT, "Page Punt" },
-    { PRINTER_STATUS_PAPER_JAM, "Paper Jam" },
-    { PRINTER_STATUS_PAPER_OUT, "Paper Out" },
-    { PRINTER_STATUS_PAPER_PROBLEM, "Paper Problem" },
-    { PRINTER_STATUS_PAUSED, "Paused" },
-    { PRINTER_STATUS_PENDING_DELETION, "Pending Deletion" },
-    { PRINTER_STATUS_POWER_SAVE, "Power Save" },
-    { PRINTER_STATUS_PRINTING, "Printing" },
-    { PRINTER_STATUS_PROCESSING, "Processing" },
-    { PRINTER_STATUS_SERVER_UNKNOWN, "Server Unknown" },
-    { PRINTER_STATUS_TONER_LOW, "Toner Low" },
-    { PRINTER_STATUS_USER_INTERVENTION, "User Intervention" },
-    { PRINTER_STATUS_WAITING, "Waiting" },
-    { PRINTER_STATUS_WARMING_UP, "Warming Up" },
-    { 0, NULL }
-};
-
-static TokenString attributeTable[] =
-{
-    { PRINTER_ATTRIBUTE_DEFAULT, "Default" },
-    { PRINTER_ATTRIBUTE_DIRECT, "Direct" },
-    { PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, "Do Complete First" },
-    { PRINTER_ATTRIBUTE_ENABLE_BIDI, "Enable BIDI" },
-    { PRINTER_ATTRIBUTE_ENABLE_DEVQ, "Enable Devq" },
-    { PRINTER_ATTRIBUTE_HIDE, "Hidden" },
-    { PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, "Keep Printed Jobs" },
-    { PRINTER_ATTRIBUTE_LOCAL, "Local" },
-    { PRINTER_ATTRIBUTE_NETWORK, "Network" },
-    { PRINTER_ATTRIBUTE_QUEUED, "Queued" },
-    { PRINTER_ATTRIBUTE_RAW_ONLY, "Raw Only" },
-    { PRINTER_ATTRIBUTE_SHARED, "Shared" },
-    { PRINTER_ATTRIBUTE_WORK_OFFLINE, "Offline" },
-    { 0, NULL }
-};
-
-static TokenString binTable[] =
-{
-    { DMBIN_UPPER, "Upper" },
-    { DMBIN_LOWER, "Lower" },
-    { DMBIN_MIDDLE, "Middle" },
-    { DMBIN_MANUAL, "Manual" },
-    { DMBIN_ENVELOPE, "Envelope" },
-    { DMBIN_ENVMANUAL, "Envelope Manual" },
-    { DMBIN_AUTO, "Automatic" },
-    { DMBIN_TRACTOR, "Tractor" },
-    { DMBIN_SMALLFMT, "Small Format" },
-    { DMBIN_LARGEFMT, "Large Format" },
-    { DMBIN_LARGECAPACITY, "Large Capacity" },
-    { DMBIN_CASSETTE, "Cassette" },
-    { DMBIN_FORMSOURCE, "Form Source" },
-    { 0, NULL }
-};
-
-static TokenString orientationTable[] =
-{
-    { DMORIENT_PORTRAIT, "Portrait" },
-    { DMORIENT_LANDSCAPE, "Landscape" },
-    { 0, NULL }
-};
-
-static TokenString qualityTable[] =
-{
-    { DMRES_HIGH, "High" },
-    { DMRES_MEDIUM, "Medium" },
-    { DMRES_LOW, "Low" },
-    { DMRES_DRAFT, "Draft" },
-    { 0, NULL }
-};
-
-static TokenString colorTable[] =
-{
-    { DMCOLOR_COLOR, "Color" },
-    { DMCOLOR_MONOCHROME, "Monochrome" },
-    { 0, NULL }
-};
-
-static TokenString duplexTable[] =
-{
-    { DMDUP_SIMPLEX, "Simplex" },
-    { DMDUP_HORIZONTAL, "Horizontal" },
-    { DMDUP_VERTICAL, "Vertical" },
-    { 0, NULL }
-};
-
-static TokenString ttOptionTable[] =
-{
-    { DMTT_BITMAP, "Bitmap" },
-    { DMTT_DOWNLOAD, "Download" },
-    { DMTT_SUBDEV, "Substitute Device" },
-    { DMTT_DOWNLOAD_OUTLINE, "Download Outline" },
-    { 0, NULL }
-};
-
-static Tcl_ObjCmdProc PrinterCmd;
-static Tcl_InterpDeleteProc PrinterInterpDeleteProc;
-
-void
-Blt_GetPrinterScale(HDC printerDC, double *xRatioPtr, double *yRatioPtr)
-{
-    double xScreen, yScreen;
-    double xPrinter, yPrinter;
-    HDC screenDC;
-
-    xPrinter = (double)GetDeviceCaps(printerDC, LOGPIXELSX);
-    yPrinter = (double)GetDeviceCaps(printerDC, LOGPIXELSY);
-    screenDC = GetDC(NULL);
-    xScreen = (double)GetDeviceCaps(screenDC, LOGPIXELSX);
-    yScreen = (double)GetDeviceCaps(screenDC, LOGPIXELSY);
-    ReleaseDC(NULL, screenDC);
-    *xRatioPtr = (xPrinter / xScreen);
-    *yRatioPtr = (yPrinter / yScreen);
-}
-
-static PrinterInterpData *
-GetPrinterInterpData(Tcl_Interp *interp)
-{
-    PrinterInterpData *dataPtr;
-    Tcl_InterpDeleteProc *proc;
-
-    dataPtr = (PrinterInterpData *)
-	Tcl_GetAssocData(interp, PRINTER_THREAD_KEY, &proc);
-    if (dataPtr == NULL) {
-	dataPtr = Blt_AssertMalloc(sizeof(PrinterInterpData));
-	dataPtr->nextId = 0;
-	Tcl_SetAssocData(interp, PRINTER_THREAD_KEY, PrinterInterpDeleteProc,
-		dataPtr);
-	Blt_InitHashTable(&dataPtr->printerTable, BLT_STRING_KEYS);
-    }
-    return dataPtr;
-}
-
-static int
-GetQueue(
-    Tcl_Interp *interp,
-    const char *name,
-    PrinterQueue **queuePtrPtr)
-{
-    Blt_HashEntry *hPtr;
-    PrinterInterpData *dataPtr;
-
-    dataPtr = GetPrinterInterpData(interp);
-    hPtr = Blt_FindHashEntry(&dataPtr->printerTable, name);
-    if (hPtr == NULL) {
-	Tcl_AppendResult(interp, "can't find printer \"", name, "\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    *queuePtrPtr = Blt_GetHashValue(hPtr);
-    return TCL_OK;
-}
-
-static int
-GetQueueFromObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr,
-    PrinterQueue **queuePtrPtr)
-{
-    return GetQueue(interp, Tcl_GetString(objPtr), queuePtrPtr);
-}
-
-static void
-CloseQueue(
-    PrinterQueue *queuePtr)
-{
-    ClosePrinter(queuePtr->hPrinter);
-    queuePtr->hPrinter = NULL;
-}
-
-static int
-OpenQueue(
-    Tcl_Interp *interp,
-    PrinterQueue *queuePtr)
-{
-    PRINTER_DEFAULTS pd;
-    HANDLE hPrinter;
-
-    ZeroMemory(&pd, sizeof(pd));
-    pd.DesiredAccess = PRINTER_ALL_ACCESS;
-    if (!OpenPrinter(queuePtr->printerName, &hPrinter, &pd)) {
-        Tcl_AppendResult(interp, "can't open printer \"", 
-		queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	queuePtr->hPrinter = NULL;
-	return TCL_ERROR;
-    }
-    queuePtr->hPrinter = hPrinter;
-    return TCL_OK;
-}
-
-static HGLOBAL
-GetQueueProperties(
-    PrinterQueue *queuePtr,
-    DEVMODE **dmPtrPtr)
-{
-    HWND hWnd;
-    unsigned int dmSize;
-    HGLOBAL hMem;
-    DEVMODE *dmPtr;
-
-    hWnd = GetDesktopWindow();
-    dmSize = DocumentProperties(hWnd, queuePtr->hPrinter, 
-	queuePtr->printerName, NULL, NULL, 0);
-    if (dmSize == 0) {
-	Tcl_AppendResult(queuePtr->interp,
-		"can't get document properties for \"", 
-		queuePtr->printerName,
-		"\": ", Blt_LastError(), (char *)NULL);
-	return NULL;
-    }
-    hMem = GlobalAlloc(GHND, dmSize);
-    dmPtr = (DEVMODE *)GlobalLock(hMem);
-    if (!DocumentProperties(hWnd, queuePtr->hPrinter, queuePtr->printerName, 
-	dmPtr, NULL, DM_OUT_BUFFER)) {
-	Tcl_AppendResult(queuePtr->interp,
-		"can't allocate document properties for \"",
-		queuePtr->printerName, "\": ", Blt_LastError(), 
-		(char *)NULL);
-	GlobalUnlock(hMem);
-	GlobalFree(hMem);
-	return NULL;
-    }
-    *dmPtrPtr = dmPtr;
-    queuePtr->dmSize = dmSize;
-    return hMem;
-}
-
-static int
-SetQueueProperties(
-    Tcl_Interp *interp, 
-    PrinterQueue *queuePtr,
-    DEVMODE *dmPtr)
-{
-    HWND hWnd;
-    int result;
-
-    hWnd = GetDesktopWindow();
-    result = DocumentProperties(hWnd, queuePtr->hPrinter, 
-	queuePtr->printerName, dmPtr, dmPtr, DM_IN_BUFFER | DM_OUT_BUFFER);
-    if (result == 0) {
-	Tcl_AppendResult(interp, "can't set document properties for \"", 
-	    queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    } 
-    if (queuePtr->dmPtr != NULL) {
-	Blt_Free(queuePtr->dmPtr);
-    }
-    queuePtr->dmPtr = Blt_AssertMalloc(queuePtr->dmSize);
-    *queuePtr->dmPtr = *dmPtr;
-    return TCL_OK;
-}
-
-static void
-DestroyQueue(PrinterQueue *queuePtr)
-{
-    if (queuePtr->drawable.hDC != NULL) {
-	DeleteDC(queuePtr->drawable.hDC);
-    }
-    if (queuePtr->printerName != NULL) {
-	Blt_Free(queuePtr->printerName);
-    }
-    if (queuePtr->deviceName != NULL) {
-	Blt_Free(queuePtr->deviceName);
-    }
-    if (queuePtr->portName != NULL) {
-	Blt_Free(queuePtr->portName);
-    }
-    if (queuePtr->driverName != NULL) {
-	Blt_Free(queuePtr->driverName);
-    }
-    if (queuePtr->hashPtr != NULL) {
-	Blt_DeleteHashEntry(queuePtr->tablePtr, queuePtr->hashPtr);
-    }
-    if (queuePtr->dmPtr != NULL) {
-	Blt_Free(queuePtr->dmPtr);
-    }
-    Blt_Free(queuePtr);
-}
-
-static char *
-AttributesToString(DWORD attributes, Tcl_DString * resultPtr)
-{
-    TokenString *p;
-
-    Tcl_DStringInit(resultPtr);
-    for (p = attributeTable; p->string != NULL; p++) {
-	if (attributes & p->token) {
-	    Tcl_DStringAppendElement(resultPtr, p->string);
-	}
-    }
-    return Tcl_DStringValue(resultPtr);
-}
-
-static char *
-StatusToString(DWORD status, Tcl_DString * resultPtr)
-{
-    TokenString *p;
-
-    Tcl_DStringInit(resultPtr);
-    for (p = statusTable; p->string != NULL; p++) {
-	if (status & p->token) {
-	    Tcl_DStringAppendElement(resultPtr, p->string);
-	}
-    }
-    return Tcl_DStringValue(resultPtr);
-}
-
-static const char *
-TokenToString(TokenString *table, DWORD token)
-{
-    TokenString *p;
-
-    for (p = table; p->string != NULL; p++) {
-	if (token == p->token) {
-	    return p->string;
-	}
-    }
-    return "???";
-}
-
-static DWORD
-StringToToken(TokenString * table, char *string)
-{
-    TokenString *p;
-    char c;
-
-    c = toupper(string[0]);
-    for (p = table; p->string != NULL; p++) {
-	if ((c == toupper(p->string[0])) &&
-	    (strcasecmp(string, p->string) == 0)) {
-	    return p->token;
-	}
-    }
-    return 0;
-}
-
-static void
-GetFormInfo(
-    Tcl_Interp *interp,
-    FORM_INFO_1 * infoArr,
-    int nForms,
-    const char *varName)
-{
-    Tcl_DString dString;
-    int i;
-
-    Tcl_DStringInit(&dString);
-    for (i = 0; i < nForms; i++) {
-	Tcl_DStringAppendElement(&dString, infoArr[i].pName);
-    }
-    Tcl_SetVar2(interp, varName, "EnumForms", Tcl_DStringValue(&dString),
-	TCL_LEAVE_ERR_MSG);
-    Tcl_DStringFree(&dString);
-}
-
-
-static int
-GetPrinterAttributes(
-    Tcl_Interp *interp,		/* Interpreter context. */
-    PrinterQueue *queuePtr,
-    Tcl_Obj *objPtr)		/* Name of array variable to contain
-				 * printer device information. */
-{	
-    const char *string;
-    Tcl_DString dString;
-    DEVMODE *dmPtr;
-    DWORD bytesNeeded;
-    HGLOBAL hMem1, hMem2;
-    PRINTER_INFO_2* pi2Ptr;
-    LPVOID buffer;
-    int result = TCL_ERROR;
-    const char *varName;
-
-    if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    Tcl_DStringInit(&dString);
-    hMem2 = NULL;
-
-    GetPrinter(queuePtr->hPrinter, 2, NULL, 0, &bytesNeeded);
-
-    /* Windows 95/98 seems to only want locked memory. Allocating
-     * unlocked memory will sometimes crash the printer driver and
-     * therefore Windows itself.  */
-
-    hMem1 = GlobalAlloc(GHND, bytesNeeded);
-    if (hMem1 == NULL) {
-        Tcl_AppendResult(interp, "can't allocate memory for printer \"", 
-		queuePtr->name, "\": ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    buffer = (LPVOID)GlobalLock(hMem1);
-    if (!GetPrinter(queuePtr->hPrinter, 2, buffer, bytesNeeded, 
-	&bytesNeeded)) {
-        Tcl_AppendResult(interp, "can't get printer \"", queuePtr->name, "\": ",
-	    Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    hMem2 = GetQueueProperties(queuePtr, &dmPtr);
-    if (hMem2 == NULL) {
-        Tcl_AppendResult(interp, "can't allocate memory for printer \"", 
-		queuePtr->name, "\" properties: ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    pi2Ptr = (PRINTER_INFO_2 *)buffer;
-    varName = Tcl_GetString(objPtr);
-    Tcl_SetVar2(interp, varName, "ServerName", pi2Ptr->pServerName, 0);
-    Tcl_SetVar2(interp, varName, "PrinterName", pi2Ptr->pPrinterName, 0);
-    Tcl_SetVar2(interp, varName, "PortName", pi2Ptr->pPortName, 0);
-    Tcl_SetVar2(interp, varName, "DriverName", pi2Ptr->pDriverName, 0);
-    Tcl_SetVar2(interp, varName, "Comment", pi2Ptr->pComment, 0);
-    Tcl_SetVar2(interp, varName, "Location", pi2Ptr->pLocation, 0);
-    Tcl_SetVar2(interp, varName, "SepFile", pi2Ptr->pSepFile, 0);
-    Tcl_SetVar2(interp, varName, "PrintProcessor", pi2Ptr->pPrintProcessor, 0);
-    Tcl_SetVar2(interp, varName, "Datatype", pi2Ptr->pDatatype, 0);
-    Tcl_SetVar2(interp, varName, "Parameters", pi2Ptr->pParameters, 0);
-    Tcl_SetVar2(interp, varName, "Attributes",
-		AttributesToString(pi2Ptr->Attributes, &dString), 0);
-    Tcl_SetVar2(interp, varName, "Priority", Blt_Itoa(pi2Ptr->Priority), 0);
-    Tcl_SetVar2(interp, varName, "DefaultPriority",
-		Blt_Itoa(pi2Ptr->DefaultPriority), 0);
-    Tcl_SetVar2(interp, varName, "StartTime", Blt_Itoa(pi2Ptr->StartTime), 0);
-    Tcl_SetVar2(interp, varName, "UntilTime", Blt_Itoa(pi2Ptr->UntilTime), 0);
-    Tcl_SetVar2(interp, varName, "Status",
-		StatusToString(pi2Ptr->Status, &dString), 0);
-    Tcl_SetVar2(interp, varName, "Jobs", Blt_Itoa(pi2Ptr->cJobs), 0);
-    Tcl_SetVar2(interp, varName, "AveragePPM", Blt_Itoa(pi2Ptr->AveragePPM), 0);
-
-    if (dmPtr->dmFields & DM_ORIENTATION) {
-	Tcl_SetVar2(interp, varName, "Orientation",
-	    TokenToString(orientationTable, dmPtr->dmOrientation), 0);
-    }
-    if (dmPtr->dmFields & DM_PAPERSIZE) {
-	Tcl_SetVar2(interp, varName, "PaperSize",
-	    TokenToString(sizeTable, dmPtr->dmPaperSize), 0);
-    }
-    if (dmPtr->dmFields & DM_PAPERWIDTH) {
-	Tcl_SetVar2(interp, varName, "PaperWidth",
-	    Blt_Itoa(dmPtr->dmPaperWidth), 0);
-    }
-    if (dmPtr->dmFields & DM_PAPERLENGTH) {
-	Tcl_SetVar2(interp, varName, "PaperLength",
-	    Blt_Itoa(dmPtr->dmPaperLength), 0);
-    }
-    if (dmPtr->dmFields & DM_SCALE) {
-	Tcl_SetVar2(interp, varName, "Scale", Blt_Itoa(dmPtr->dmScale), 0);
-    }
-    if (dmPtr->dmFields & DM_COPIES) {
-	Tcl_SetVar2(interp, varName, "Copies", Blt_Itoa(dmPtr->dmCopies), 0);
-    }
-    if (dmPtr->dmFields & DM_DEFAULTSOURCE) {
-	Tcl_SetVar2(interp, varName, "DefaultSource",
-	    TokenToString(binTable, dmPtr->dmDefaultSource), 0);
-    }
-    if (dmPtr->dmFields & DM_PRINTQUALITY) {
-	if (dmPtr->dmPrintQuality < 0) {
-	    string = TokenToString(qualityTable, dmPtr->dmPrintQuality);
-	} else {
-	    string = Blt_Itoa(dmPtr->dmPrintQuality);
-	}
-	Tcl_SetVar2(interp, varName, "PrintQuality", string, 0);
-    }
-    if (dmPtr->dmFields & DM_COLOR) {
-	Tcl_SetVar2(interp, varName, "Color",
-	    TokenToString(colorTable, dmPtr->dmColor), 0);
-    }
-    if (dmPtr->dmFields & DM_DUPLEX) {
-	Tcl_SetVar2(interp, varName, "Duplex",
-	    TokenToString(duplexTable, dmPtr->dmDuplex), 0);
-    }
-    if (dmPtr->dmFields & DM_YRESOLUTION) {
-	Tcl_SetVar2(interp, varName, "YResolution",
-	    Blt_Itoa(dmPtr->dmYResolution), 0);
-    }
-    if (dmPtr->dmFields & DM_TTOPTION) {
-	Tcl_SetVar2(interp, varName, "TTOption",
-	    TokenToString(ttOptionTable, dmPtr->dmTTOption), 0);
-    }
-    if (dmPtr->dmFields & DM_COLLATE) {
-	if (dmPtr->dmCollate == DMCOLLATE_TRUE) {
-	    string = "true";
-	} else if (dmPtr->dmCollate == DMCOLLATE_FALSE) {
-	    string = "false";
-	} else {
-	    string = "???";
-	}
-	Tcl_SetVar2(interp, varName, "Collate", string, 0);
-    }
-    if (dmPtr->dmFields & DM_FORMNAME) {
-	Tcl_SetVar2(interp, varName, "FormName", dmPtr->dmFormName, 0);
-    }
-    Tcl_SetVar2(interp, varName, "OutputFile", dmPtr->dmDeviceName, 0);
-    result = TCL_OK;
-
- error:
-    Tcl_DStringFree(&dString);
-    CloseQueue(queuePtr);
-    if (hMem1 != NULL) {
-	GlobalUnlock(hMem1);
-	GlobalFree(hMem1);
-    }
-    if (hMem2 != NULL) {
-	GlobalUnlock(hMem2);
-	GlobalFree(hMem2);
-    }
-    return result;
-}
-
-static int
-SetQueueAttributes(
-    Tcl_Interp *interp,
-    PrinterQueue *queuePtr,
-    Tcl_Obj *objPtr)
-{
-    char *string;
-    DEVMODE *dmPtr;
-    int value;
-    HGLOBAL hMem;
-    int result;
-    char *varName;
-
-    if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    hMem = GetQueueProperties(queuePtr, &dmPtr);
-    CloseQueue(queuePtr);
-    if (hMem == NULL) {
-       return TCL_ERROR;
-    }
-    dmPtr->dmFields = 0;
-    varName = Tcl_GetString(objPtr);
-    string = (char *)Tcl_GetVar2(interp, varName, "Orientation", 0);
-    if (string != NULL) {
-	value = StringToToken(orientationTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_ORIENTATION;
-	    dmPtr->dmOrientation = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "PaperSize", 0);
-    if (string != NULL) {
-	value = StringToToken(sizeTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_PAPERSIZE;
-	    dmPtr->dmPaperSize = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "PaperWidth", 0);
-    if (string != NULL) {
-	if (Tcl_GetInt(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_PAPERWIDTH;
-	    dmPtr->dmPaperWidth = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "PaperLength", 0);
-    if (string != NULL) {
-	if (Tcl_GetInt(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_PAPERLENGTH;
-	    dmPtr->dmPaperLength = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "Scale", 0);
-    if (string != NULL) {
-	if (Tcl_GetInt(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_SCALE;
-	    dmPtr->dmScale = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "Copies", 0);
-    if (string != NULL) {
-	if (Tcl_GetInt(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_COPIES;
-	    dmPtr->dmCopies = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "DefaultSource", 0);
-    if (string != NULL) {
-	value = StringToToken(binTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_DEFAULTSOURCE;
-	    dmPtr->dmDefaultSource = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "PrintQuality", 0);
-    if (string != NULL) {
-	value = StringToToken(qualityTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_PRINTQUALITY;
-	    dmPtr->dmPrintQuality = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "Color", 0);
-    if (string != NULL) {
-	value = StringToToken(colorTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_COLOR;
-	    dmPtr->dmColor = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "Duplex", 0);
-    if (string != NULL) {
-	value = StringToToken(duplexTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_DUPLEX;
-	    dmPtr->dmDuplex = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "YResolution", 0);
-    if (string != NULL) {
-	if (Tcl_GetInt(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_YRESOLUTION;
-	    dmPtr->dmYResolution = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "TTOption", 0);
-    if (string != NULL) {
-	value = StringToToken(ttOptionTable, string);
-	if (value > 0) {
-	    dmPtr->dmFields |= DM_TTOPTION;
-	    dmPtr->dmTTOption = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "Collate", 0);
-    if (string != NULL) {
-	if (Tcl_GetBoolean(interp, string, &value) == TCL_OK) {
-	    dmPtr->dmFields |= DM_COLLATE;
-	    dmPtr->dmCollate = value;
-	}
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "OutputFile", 0);
-    if (string != NULL) {
-	if (queuePtr->fileName != NULL) {
-	    Blt_Free(queuePtr->fileName);
-	}
-	queuePtr->fileName = Blt_AssertStrdup(string);
-    }
-    if (queuePtr->dmPtr != NULL) {
-	Blt_Free(queuePtr->dmPtr);
-    }
-    string = (char *)Tcl_GetVar2(interp, varName, "DocumentName", 0);
-    if (string != NULL) {
-	if (queuePtr->docName != NULL) {
-	    Blt_Free(queuePtr->docName);
-	}
-	queuePtr->docName = Blt_AssertStrdup(string);
-    }
-    result = SetQueueProperties(interp, queuePtr, dmPtr);
-    GlobalUnlock(hMem);
-    GlobalFree(hMem);
-    CloseQueue(queuePtr);
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-EnumOp(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    TokenString *p;
-    char c;
-    unsigned int length;
-    char *attr;
-
-    attr = Tcl_GetStringFromObj(objv[2], &length);
-    c = attr[0];
-    if ((c == 'p') && (strncmp(attr, "paper", length) == 0)) {
-	p = sizeTable;
-    } else if ((c == 'q') && (strncmp(attr, "quality", length) == 0)) {
-	p = qualityTable;
-    } else if ((c == 'b') && (strncmp(attr, "bin", length) == 0)) {
-	p = binTable;
-    } else if ((c == 'o') && (strncmp(attr, "orientation", length) == 0)) {
-	p = orientationTable;
-    } else if ((c == 'c') && (strncmp(attr, "color", length) == 0)) {
-	p = colorTable;
-    } else if ((c == 'd') && (strncmp(attr, "duplex", length) == 0)) {
-	p = duplexTable;
-    } else if ((c == 't') && (strncmp(attr, "ttoption", length) == 0)) {
-	p = ttOptionTable;
-    } else {
-	Tcl_AppendResult(interp, "bad enumeration field \"", attr, 
-"\": should be \"paper\", \"quality\", \"bin\", \"orientation\", \"color\", \"duplex\", or \"ttoption\"",
-	    (char *)NULL);
-	return TCL_ERROR;
-    }
-    for ( /*empty*/ ; p->string != NULL; p++) {
-	Tcl_AppendElement(interp, p->string);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-OpenOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    PrinterInterpData *dataPtr = clientData;
-    PrinterQueue *queuePtr;
-    LPVOID buffer;
-    PRINTER_INFO_2* pi2Ptr;
-    DWORD bytesNeeded;
-    int isNew;
-    Blt_HashEntry *hPtr;
-    HANDLE hMem;
-    char *name;
-
-    name = Tcl_GetString(objv[2]);
-    hPtr = Blt_CreateHashEntry(&dataPtr->printerTable, name, &isNew);
-    if (isNew) {
-	queuePtr = Blt_AssertCalloc(1, sizeof(PrinterQueue));
-	queuePtr->name = Blt_GetHashKey(&dataPtr->printerTable, hPtr);
-	queuePtr->interp = interp;
-	Tcl_SetStringObj(Tcl_GetObjResult(interp), name, -1);
-	Blt_SetHashValue(hPtr, queuePtr);
-	queuePtr->hashPtr = hPtr;
-	queuePtr->tablePtr = &dataPtr->printerTable;
-	queuePtr->printerName = Blt_AssertStrdup(name);
-    } else {
-	Tcl_AppendResult(interp, "printer \"", name, "\" is already open",
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	DestroyQueue(queuePtr);
-	return TCL_ERROR;
-    }
-    /* Call the first time to determine the amount of memory needed. */
-    GetPrinter(queuePtr->hPrinter, 2, NULL, 0, &bytesNeeded);
-    if ((bytesNeeded == 0) || (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) {
-	Tcl_AppendResult(interp, "can't get size of attribute buffer for \"",
-			 name, "\": ", Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    /* Allocate a buffer to contain all printer information. */
-    hMem = GlobalAlloc(GHND, bytesNeeded);
-    if (hMem == NULL) {
-	return TCL_ERROR;
-    }
-    buffer = (LPVOID)GlobalLock(hMem);
-
-    /* And call the again to actually get the printer. */
-    if (!GetPrinter(queuePtr->hPrinter, 2, buffer, bytesNeeded, 
-		    &bytesNeeded)) {
-	Tcl_AppendResult(interp, "can't get printer attributes for \"",
-	    name, "\": ", Blt_LastError(), (char *)NULL);
-        GlobalUnlock(hMem);
-        GlobalFree(hMem);
-	return TCL_ERROR;
-    }
-    pi2Ptr = (PRINTER_INFO_2 *)buffer;
-    if (pi2Ptr->pDevMode != NULL) {
-	queuePtr->deviceName = Blt_AssertStrdup(pi2Ptr->pDevMode->dmDeviceName);
-    }
-    queuePtr->driverName = Blt_AssertStrdup(pi2Ptr->pDriverName);
-    /*
-    queuePtr->printerName = Blt_AssertStrdup(pi2Ptr->pPrinterName);
-    */
-    queuePtr->portName = Blt_AssertStrdup(pi2Ptr->pPortName);
-    GlobalUnlock(hMem);
-    GlobalFree(hMem);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-NamesOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)	/* Not used. */
-{
-    DWORD nPrinters, bytesNeeded;
-    int elemSize, level;
-    unsigned char *buffer;
-    int result, flags;
-    HANDLE hMem;
-
-    if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	level = 4;
-	elemSize = sizeof(PRINTER_INFO_4);
-	flags = PRINTER_ENUM_NAME;
-    } else {
-	level = 5;
-	elemSize = sizeof(PRINTER_INFO_5);
-	flags = PRINTER_ENUM_LOCAL;
-    }
-    result = EnumPrinters(
-	flags,			/* Flags */
-	NULL,			/* Printer name */
-	level,			/* Information level: 1, 2, 4, or 5 */
-	NULL,			/* Array of returned information */
-	0,			/* Size of array */
-	&bytesNeeded,		/* Size needed for array */
-	&nPrinters);		/* Number of structures returned */
-
-    if ((!result) && (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) {
-	Tcl_AppendResult(interp, "can't enumerate printers (memory alloc): ",
-	    Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    hMem = GlobalAlloc(GHND, bytesNeeded);
-    buffer = (unsigned char *)GlobalLock(hMem);
-
-    result = EnumPrinters(
-	flags,			/* Flags */
-	NULL,			/* Printer name */
-	level,			/* Information level: 1, 2, 4, or 5 */
-	buffer,			/* Array of returned information */
-	bytesNeeded,		/* Size of array */
-	&bytesNeeded,		/* Size needed for array */
-	&nPrinters);		/* Number of structures returned */
-
-    if (!result) {
-	Tcl_AppendResult(interp, "can't enumerate printers: ",
-	    Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    if (objc > 2) {	
-	unsigned int i;
-	char *pattern;
-	char *p;
-
-	p = buffer;
-        pattern = Tcl_GetString(objv[2]);
-	for (i = 0; i < nPrinters; i++) {
-	    if (Tcl_StringMatch(p, pattern)) {
-		Tcl_AppendElement(interp, *(char **)p);
-	    }
-	    p += elemSize;
-	}
-    } else {
-	unsigned int i;
-	char *p;
-
-	p = buffer;
-	for (i = 0; i < nPrinters; i++) {
-	    Tcl_AppendElement(interp, *(char **)p);
-	    p += elemSize;
-	}
-    }
-    GlobalUnlock(hMem);
-    GlobalFree(hMem);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-CloseOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PrinterQueue *queuePtr;
-
-    if (GetQueueFromObj(interp, objv[2], &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    DestroyQueue(queuePtr);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-GetAttrOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PrinterQueue *queuePtr;
-
-    if (GetQueueFromObj(interp, objv[2], &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return GetPrinterAttributes(interp, queuePtr, objv[3]);
-}
-
-/*ARGSUSED*/
-static int
-SetAttrOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    PrinterQueue *queuePtr;
-
-    if (GetQueueFromObj(interp, objv[2], &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    return SetQueueAttributes(interp, queuePtr, objv[3]);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * SnapOp --
- *
- *	Prints a snapshot of a Tk_Window to the designated printer.
- *
- * Results:
- *	Returns a standard TCL result.  If an error occurred
- *	TCL_ERROR is returned and interp->result will contain an
- *	error message.
- *
- *---------------------------------------------------------------------------
- */
-static int
-SnapOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    BITMAPINFO bi;
-    DIBSECTION ds;
-    HBITMAP hBitmap;
-    HPALETTE hPalette;
-    HDC hDC, printDC, memDC;
-    void *data;
-    Tk_Window tkwin;
-    TkWinDCState state;
-    int result;
-    PrinterQueue *queuePtr;
-    DOCINFO di;
-    double pageWidth, pageHeight;
-    int jobId;
-    char *driverName;
-    DEVMODE *dmPtr;
-    HGLOBAL hMem;
-    Tcl_DString dString;
-    char *path;
-
-    Tcl_DStringInit(&dString);
-    if (GetQueueFromObj(interp, objv[2], &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    path = Tcl_GetString(objv[3]);
-    tkwin = Tk_NameToWindow(interp, path, Tk_MainWindow(interp));
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_WindowId(tkwin) == None) {
-	Tk_MakeWindowExist(tkwin);
-    }
-    
-    result = TCL_ERROR;
-    hDC = TkWinGetDrawableDC(Tk_Display(tkwin), Tk_WindowId(tkwin), &state);
-
-    ZeroMemory(&bi, sizeof(bi));
-    bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    bi.bmiHeader.biWidth = Tk_Width(tkwin);
-    bi.bmiHeader.biHeight = Tk_Height(tkwin);
-    bi.bmiHeader.biPlanes = 1;
-    bi.bmiHeader.biBitCount = 32;
-    bi.bmiHeader.biCompression = BI_RGB;
-    hBitmap = CreateDIBSection(hDC, &bi, DIB_RGB_COLORS, &data, NULL, 0);
-    memDC = CreateCompatibleDC(hDC);
-    SelectBitmap(memDC, hBitmap);
-    hPalette = Blt_GetSystemPalette();
-    if (hPalette != NULL) {
-	SelectPalette(hDC, hPalette, FALSE);
-	RealizePalette(hDC);
-	SelectPalette(memDC, hPalette, FALSE);
-	RealizePalette(memDC);
-    }
-    /* Copy the window contents to the memory surface. */
-    if (!BitBlt(memDC, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), hDC, 0, 0,
-		SRCCOPY)) {
-	Tcl_AppendResult(interp, "can't blit \"", Tk_PathName(tkwin), "\": ",
-			 Blt_LastError(), (char *)NULL);
-	goto done;
-    }
-    /* Now that the DIB contains the image of the window, get the
-     * databits and write them to the printer device, stretching the
-     * image to the fit the printer's resolution.  */
-    if (GetObject(hBitmap, sizeof(DIBSECTION), &ds) == 0) {
-	Tcl_AppendResult(interp, "can't get DIB object: ", Blt_LastError(), 
-			 (char *)NULL);
-	goto done;
-    } 
-    driverName = NULL;
-    if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	driverName = queuePtr->driverName;
-    }
-    if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	goto done;
-    }
-    hMem = GetQueueProperties(queuePtr, &dmPtr);
-    if (hMem == NULL) {
-	goto done;
-    }
-    printDC = CreateDC(driverName, queuePtr->deviceName, NULL, dmPtr);
-    GlobalUnlock(hMem);
-    GlobalFree(hMem);
-    if (printDC == NULL) {
-	Tcl_AppendResult(interp, "can't allocate printer DC for \"",
-		queuePtr->name, "\": ", Blt_LastError(), (char *)NULL);
-	goto done;
-    }
-    {
-	double scale, sx, sy;
-
-	/* Get the resolution of the printer device. */
-	sx = (double)GetDeviceCaps(printDC, HORZRES)/(double)Tk_Width(tkwin);
-	sy = (double)GetDeviceCaps(printDC, VERTRES)/(double)Tk_Height(tkwin);
-	scale = MIN(sx, sy);
-	pageWidth = scale * Tk_Width(tkwin);
-	pageHeight = scale * Tk_Height(tkwin);
-    }
-    ZeroMemory(&di, sizeof(di));
-    di.cbSize = sizeof(di);
-    Tcl_DStringAppend(&dString, "Snapshot of \"", -1);
-    Tcl_DStringAppend(&dString, Tk_PathName(tkwin), -1);
-    Tcl_DStringAppend(&dString, "\"", -1);
-    di.lpszDocName = Tcl_DStringValue(&dString);
-    jobId = StartDoc(printDC, &di);
-    if (jobId <= 0) {
-	Tcl_AppendResult(interp, "can't start document: ", Blt_LastError(), 
-		(char *)NULL);
-	goto done;
-    }
-    if (StartPage(printDC) <= 0) {
-	Tcl_AppendResult(interp, "error starting page: ", Blt_LastError(), 
-		(char *)NULL);
-	goto done;
-    }
-    StretchDIBits(printDC, 0, 0, ROUND(pageWidth), ROUND(pageHeight), 0, 0, 
-	Tk_Width(tkwin), Tk_Height(tkwin), ds.dsBm.bmBits, 
-	(LPBITMAPINFO)&ds.dsBmih, DIB_RGB_COLORS, SRCCOPY);
-    EndPage(printDC);
-    EndDoc(printDC);
-    DeleteDC(printDC);
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), jobId);
-    result = TCL_OK;
-
-  done:
-    Tcl_DStringFree(&dString);
-    if (queuePtr->hPrinter != NULL) {
-	CloseQueue(queuePtr);
-    }    
-    DeleteBitmap(hBitmap);
-    DeleteDC(memDC);
-    TkWinReleaseDrawableDC(Tk_WindowId(tkwin), hDC, &state);
-    if (hPalette != NULL) {
-	DeletePalette(hPalette);
-    }
-    return result;
-}
-
-/*ARGSUSED*/
-static int
-WriteOp(
-    ClientData clientData,	/* Interpreter-specific data. */
-    Tcl_Interp *interp,
-    int objc,			/* Not used. */
-    Tcl_Obj *const *objv)
-{
-    DWORD bytesLeft, nBytes;
-    DOC_INFO_1 di1;
-    DWORD jobId;
-    char *title;
-    char *data;
-    static int nextJob = 0;
-    char string[200];
-    PrinterQueue *queuePtr;
-    int result;
-    int size;
-
-    if (GetQueueFromObj(interp, objv[2], &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc == 5) {
-	title = Tcl_GetString(objv[3]);
-	data = Tcl_GetStringFromObj(objv[4], &size);
-    } else {
-	sprintf_s(string, 200, "Print Job #%d", nextJob++);
-	title = string;
-	data = Tcl_GetStringFromObj(objv[3], &size);
-    }
-    ZeroMemory(&di1, sizeof(DOC_INFO_1));
-    di1.pDocName = title;
-    if (queuePtr->fileName != NULL) {
-	di1.pOutputFile = queuePtr->fileName;
-    } else {
-	di1.pOutputFile = NULL;
-    }
-    di1.pDatatype = (char *)"RAW";
-
-    result = TCL_ERROR;
-    /* Start new document */
-    jobId = StartDocPrinter(queuePtr->hPrinter, 1, (unsigned char *)&di1);
-    if (jobId == 0) {
-	Tcl_AppendResult(interp, "error starting document on \"", 
-	 queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    /* Start new page */
-    if (!StartPagePrinter(queuePtr->hPrinter)) {
-	Tcl_AppendResult(interp, "error starting page on \"", 
-	 queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    bytesLeft = size;
-    do {
-	if (!WritePrinter(queuePtr->hPrinter, data, bytesLeft, &nBytes)) {
-	    Tcl_AppendResult(interp, "can't write data to \"", 
-		queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	    EndDocPrinter(queuePtr->hPrinter);
-	    goto error;
-	}
-	data += nBytes;
-	bytesLeft -= nBytes;
-    } while (bytesLeft > 0);
-    /* End last page */
-    if (!EndPagePrinter(queuePtr->hPrinter)) {
-	Tcl_AppendResult(interp, "error ending page on \"", 
-		queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    /* End document */
-    if (!EndDocPrinter(queuePtr->hPrinter)) {
-	Tcl_AppendResult(interp, "error ending document on \"", 
-		queuePtr->printerName, "\": ", Blt_LastError(), (char *)NULL);
-	goto error;
-    }
-    result = TCL_OK;
- error:
-    CloseQueue(queuePtr);
-    return result;
-}
-
-static Blt_OpSpec printerOps[] =
-{
-    {"close", 1, CloseOp, 3, 3, "pid",},
-    {"enum", 1, EnumOp, 3, 3, "attribute",},
-    {"getattrs", 1, GetAttrOp, 4, 4, "pid varName",},
-    {"names", 1, NamesOp, 2, 3, "?pattern?",},
-    {"open", 1, OpenOp, 3, 3, "printerName",},
-    {"setattrs", 1, SetAttrOp, 4, 4, "pid varName",},
-    {"snap", 1, SnapOp, 4, 4, "pid window",},
-    {"write", 1, WriteOp, 4, 5, "pid ?title? string",},
-};
-static int nPrinterOps = sizeof(printerOps) / sizeof(Blt_OpSpec);
-
-/* ARGSUSED */
-static int
-PrinterCmd(
-    ClientData clientData,	/* Not used. */
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-
-    proc = Blt_GetOpFromObj(interp, nPrinterOps, printerOps, BLT_OP_ARG1, 
-		    objc, objv, 0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    result = (*proc) (clientData, interp, objc, objv);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * PrinterInterpDeleteProc --
- *
- *	This is called when the interpreter hosting one or more printer 
- *	commands is destroyed.  
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Closes and removes all open printers.
- *
- *---------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static void
-PrinterInterpDeleteProc(clientData, interp)
-    ClientData clientData;	/* Interpreter-specific data. */
-    Tcl_Interp *interp;
-{
-    PrinterInterpData *dataPtr = clientData;
-    Blt_HashEntry *hPtr;
-    Blt_HashSearch cursor;
-
-    for (hPtr = Blt_FirstHashEntry(&dataPtr->printerTable, &cursor);
-	 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
-	PrinterQueue *queuePtr;
-
-	queuePtr = Blt_GetHashValue(hPtr);
-	queuePtr->hashPtr = NULL;
-	DestroyQueue(queuePtr);
-    }
-    Blt_DeleteHashTable(&dataPtr->printerTable);
-    Tcl_DeleteAssocData(interp, PRINTER_THREAD_KEY);
-    Blt_Free(dataPtr);
-}
-
-
-int
-Blt_PrinterCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = { "printer", PrinterCmd };
-
-    cmdSpec.clientData = GetPrinterInterpData(interp);
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-
-/* Public routines */
-int
-Blt_GetOpenPrinter(
-    Tcl_Interp *interp,
-    const char *name,
-    Drawable *drawablePtr)
-{
-    PrinterQueue *queuePtr;
-    
-    if (GetQueue(interp, name, &queuePtr) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (queuePtr->drawable.hDC == NULL) {
-	char *driverName;
-	HGLOBAL hMem;
-	DEVMODE *dmPtr;
-	HDC hDC;
-
-	driverName = NULL;
-	if (Blt_GetPlatformId() == VER_PLATFORM_WIN32_NT) {
-	    driverName = queuePtr->driverName;
-	}
-	if (OpenQueue(interp, queuePtr) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	hMem = GetQueueProperties(queuePtr, &dmPtr);
-	if (hMem == NULL) {
-	    CloseQueue(queuePtr);
-	    return TCL_ERROR;
-	}
-	if (queuePtr->dmPtr != NULL) {
-	    *dmPtr = *queuePtr->dmPtr;
-	}
-	hDC = CreateDC(driverName, queuePtr->deviceName, NULL, dmPtr);
-	GlobalUnlock(hMem);
-	GlobalFree(hMem);
-	CloseQueue(queuePtr);
-	if (hDC == NULL) {
-	    Tcl_AppendResult(interp, "can't allocate printer DC for \"",
-		queuePtr->name, "\": ", Blt_LastError(), (char *)NULL);
-	    return TCL_ERROR;
-	}
-	queuePtr->drawable.hDC = hDC;
-	queuePtr->drawable.type = TWD_WINDC;
-    }
-    *drawablePtr = (Drawable)(&queuePtr->drawable);
-    return TCL_OK;
-}
-
-#include <commdlg.h>
-
-int
-Blt_PrintDialog(
-    Tcl_Interp *interp,
-    Drawable *drawablePtr)
-{
-    PRINTDLG dlg;
-    static PrintDrawable drawable;
-    int mode, result;
-    
-    ZeroMemory(&dlg, sizeof(PRINTDLG));
-    dlg._lSize = sizeof(PRINTDLG);
-    dlg.Flags = PD_RETURNDC | PD_NOPAGENUMS | PD_NOSELECTION;
-    mode = Tcl_SetServiceMode(TCL_SERVICE_NONE);
-    result = PrintDlg(&dlg);
-    Tcl_SetServiceMode(mode);
-    if (!result) {
-	if (!CommDlgExtendedError()) {
-	    return TCL_RETURN;	/* Canceled by user. */
-	}
-	Tcl_AppendResult(interp, "can't access printer:", Blt_LastError(), 
-			 (char *)NULL);
-	return TCL_ERROR;
-    } 
-    *drawablePtr = (Drawable)&drawable;
-    drawable.type = TWD_WINDC;
-    drawable.hDC = dlg.hDC;
-    return TCL_OK;
-}
-
-int
-Blt_StartPrintJob(
-    Tcl_Interp *interp,
-    Drawable drawable)
-{
-    DOCINFO di;
-    PrintDrawable *drawPtr = (PrintDrawable *)drawable;
-    int jobId;
-
-    ZeroMemory((char *)&di, sizeof(DOCINFO));
-    di.cbSize = sizeof(DOCINFO);
-    di.lpszDocName = "Unknown";
-    jobId = StartDoc(drawPtr->hDC, &di);
-    if (jobId == 0) {
-	Tcl_AppendResult(interp, "error starting document: ",
- 			 Blt_LastError(), (char *)NULL);
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-int
-Blt_EndPrintJob(
-    Tcl_Interp *interp,
-    Drawable drawable)
-{
-    PrintDrawable *drawPtr = (PrintDrawable *)drawable;
-
-    EndPage(drawPtr->hDC);
-    EndDoc(drawPtr->hDC);
-    return TCL_OK;
-}
-
-#endif /*NO_PRINTER*/
diff --git a/blt3.0/src/bltWinUtil.c b/blt3.0/src/bltWinUtil.c
deleted file mode 100644
index ca45a30..0000000
--- a/blt3.0/src/bltWinUtil.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * bltWinUtil.c --
- *
- * This module contains WIN32 routines not included in the Tcl/Tk
- * libraries.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <bltInt.h>
-
-#ifdef notdef
-double
-drand48(void)
-{
-    return (double) rand() / (double)RAND_MAX;
-}
-
-void
-srand48(long int seed)
-{
-    srand(seed);
-}
-#endif
-
-int
-Blt_GetPlatformId(void)
-{
-    static int platformId = 0;
-
-    if (platformId == 0) {
-	OSVERSIONINFO opsysInfo;
-
-	opsysInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-	if (GetVersionEx(&opsysInfo)) {
-	    platformId = opsysInfo.dwPlatformId;
-	}
-    }
-    return platformId;
-}
-
-const char *
-Blt_PrintError(int error)
-{
-    static char buffer[1024];
-    int length;
-
-    FormatMessage(
-	FORMAT_MESSAGE_FROM_SYSTEM,
-	NULL,
-	error,
-	MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),	/* Default language */
-	buffer,
-	1024,
-	NULL);
-    length = strlen(buffer);
-    if (buffer[length - 2] == '\r') {
-	buffer[length - 2] = '\0';
-    }
-    return buffer;
-}
-
-const char *
-Blt_LastError(void)
-{
-    return Blt_PrintError(GetLastError());
-}
-
diff --git a/blt3.0/src/bltWinWindow.c b/blt3.0/src/bltWinWindow.c
deleted file mode 100644
index 055dc29..0000000
--- a/blt3.0/src/bltWinWindow.c
+++ /dev/null
@@ -1,411 +0,0 @@
-
-/*
- * bltWinWindow.c --
- *
- * This module implements additional window functionality for the BLT toolkit,
- * such as transparent Tk windows, and reparenting Tk windows.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#include <X11/Xlib.h>
-#include "tkDisplay.h"
-
-/*
- *---------------------------------------------------------------------------
- *
- * WindowToHandle --
- *
- *---------------------------------------------------------------------------
- */
-static HWND
-WindowToHandle(Tk_Window tkwin)
-{
-    HWND hWnd;
-    Window window;
-    
-    window = Tk_WindowId(tkwin);
-    if (window == None) {
-	Tk_MakeWindowExist(tkwin);
-    }
-    hWnd = Tk_GetHWND(Tk_WindowId(tkwin));
-    if (Tk_IsTopLevel(tkwin)) {
-	hWnd = GetParent(hWnd);
-    }
-    return hWnd;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DoConfigureNotify --
- *
- *	Generate a ConfigureNotify event describing the current configuration
- *	of a window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	An event is generated and processed by Tk_HandleEvent.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DoConfigureNotify(Tk_FakeWin *winPtr) /* Window whose configuration
-				       * was just changed. */
-{
-    XEvent event;
-
-    event.type = ConfigureNotify;
-    event.xconfigure.serial = LastKnownRequestProcessed(winPtr->display);
-    event.xconfigure.send_event = False;
-    event.xconfigure.display = winPtr->display;
-    event.xconfigure.event = winPtr->window;
-    event.xconfigure.window = winPtr->window;
-    event.xconfigure.x = winPtr->changes.x;
-    event.xconfigure.y = winPtr->changes.y;
-    event.xconfigure.width = winPtr->changes.width;
-    event.xconfigure.height = winPtr->changes.height;
-    event.xconfigure.border_width = winPtr->changes.border_width;
-    if (winPtr->changes.stack_mode == Above) {
-	event.xconfigure.above = winPtr->changes.sibling;
-    } else {
-	event.xconfigure.above = None;
-    }
-    event.xconfigure.override_redirect = winPtr->atts.override_redirect;
-    Tk_HandleEvent(&event);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MakeTransparentWindowExist --
- *
- *	Similar to Tk_MakeWindowExist but instead creates a transparent window
- *	to block for user events from sibling windows.
- *
- *	Differences from Tk_MakeWindowExist.
- *
- *	1. This is always a "busy" window. There's never a platform-specific
- *	   class procedure to execute.
- *
- *	2. The window is transparent and never will have children, so
- *	   colormap information is irrelevant.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the procedure returns, the internal window associated with tkwin
- *	is guaranteed to exist.  This may require the window's ancestors to be
- *	created too.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MakeTransparentWindowExist(
-    Tk_Window tkwin,		/* Token for window. */
-    Window parent,		/* Parent window. */
-    int isBusy)			/*  */
-{
-    TkWindow *winPtr = (TkWindow *) tkwin;
-    TkWindow *winPtr2;
-    Tcl_HashEntry *hPtr;
-    int notUsed;
-    TkDisplay *dispPtr;
-    HWND hParent;
-    int style;
-    DWORD exStyle;
-    HWND hWnd;
-
-    if (winPtr->window != None) {
-	return;			/* Window already exists. */
-    }
-    /* Create a transparent window and put it on top.  */
-
-    hParent = (HWND) parent;
-    style = (WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
-    exStyle = (WS_EX_TRANSPARENT | WS_EX_TOPMOST);
-#define TK_WIN_CHILD_CLASS_NAME "TkChild"
-    hWnd = CreateWindowEx(exStyle, TK_WIN_CHILD_CLASS_NAME, NULL, style,
-	Tk_X(tkwin), Tk_Y(tkwin), Tk_Width(tkwin), Tk_Height(tkwin),
-	hParent, NULL, (HINSTANCE)Tk_GetHINSTANCE(), NULL);
-    winPtr->window = Tk_AttachHWND(tkwin, hWnd);
-
-    dispPtr = winPtr->dispPtr;
-    hPtr = Tcl_CreateHashEntry(&dispPtr->winTable, (char *)winPtr->window,
-	&notUsed);
-    Tcl_SetHashValue(hPtr, winPtr);
-    winPtr->dirtyAtts = 0;
-    winPtr->dirtyChanges = 0;
-#ifdef TK_USE_INPUT_METHODS
-    winPtr->inputContext = NULL;
-#endif /* TK_USE_INPUT_METHODS */
-    if (!(winPtr->flags & TK_TOP_LEVEL)) {
-	/*
-	 * If any siblings higher up in the stacking order have already been
-	 * created then move this window to its rightful position in the
-	 * stacking order.
-	 *
-	 * NOTE: this code ignores any changes anyone might have made to the
-	 * sibling and stack_mode field of the window's attributes, so it
-	 * really isn't safe for these to be manipulated except by calling
-	 * Tk_RestackWindow.
-	 */
-	for (winPtr2 = winPtr->nextPtr; winPtr2 != NULL;
-	    winPtr2 = winPtr2->nextPtr) {
-	    if ((winPtr2->window != None) && !(winPtr2->flags & TK_TOP_LEVEL)) {
-		XWindowChanges changes;
-		changes.sibling = winPtr2->window;
-		changes.stack_mode = Below;
-		XConfigureWindow(winPtr->display, winPtr->window,
-		    CWSibling | CWStackMode, &changes);
-		break;
-	    }
-	}
-    }
-    /*
-     * Issue a ConfigureNotify event if there were deferred configuration
-     * changes (but skip it if the window is being deleted; the
-     * ConfigureNotify event could cause problems if we're being called from
-     * Tk_DestroyWindow under some conditions).
-     */
-    if ((winPtr->flags & TK_NEED_CONFIG_NOTIFY)
-	&& !(winPtr->flags & TK_ALREADY_DEAD)) {
-	winPtr->flags &= ~TK_NEED_CONFIG_NOTIFY;
-	DoConfigureNotify((Tk_FakeWin *)tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetWindowRegion --
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-int
-Blt_GetWindowRegion(
-    Display *display,		/* Not used. */
-    Window window,
-    int *xPtr, int *yPtr, int *widthPtr, int *heightPtr)
-{
-    int result;
-    RECT region;
-    TkWinWindow *winPtr = (TkWinWindow *)window;
-
-    result = GetWindowRect(winPtr->handle, &region);
-    if (!result) {
-	return TCL_ERROR;
-    }
-    if (xPtr != NULL) {
-	*xPtr = region.left;
-    }
-    if (yPtr != NULL) {
-	*yPtr = region.top;
-    }
-    if (widthPtr != NULL) {
-	*widthPtr = region.right - region.left;
-    }
-    if (heightPtr != NULL) {
-	*heightPtr = region.bottom - region.top;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetWindowId --
- *
- *      Returns the XID for the Tk_Window given.  Starting in Tk 8.0, the
- *      toplevel widgets are wrapped by another window.  Currently there's no
- *      way to get at that window, other than what is done here: query the X
- *      window hierarchy and grab the parent.
- *
- * Results:
- *      Returns the X Window ID of the widget.  If it's a toplevel, then * the
- *      XID of the wrapper is returned.
- *
- *---------------------------------------------------------------------------
- */
-Window
-Blt_GetWindowId(Tk_Window tkwin)
-{
-    return (Window) WindowToHandle(tkwin);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_GetToplevelWindow --
- *
- *      Retrieves the toplevel window which is the nearest ancestor of of the
- *      specified window.
- *
- * Results:
- *      Returns the toplevel window or NULL if the window has no ancestor
- *      which is a toplevel.
- *
- * Side effects:
- *      None.
- *
- *---------------------------------------------------------------------------
- */
-Tk_Window
-Blt_GetToplevelWindow(Tk_Window tkwin) /* Window for which the toplevel
-					* should be deterined. */
-{
-     while (!Tk_IsTopLevel(tkwin)) {
-         tkwin = Tk_Parent(tkwin);
-	 if (tkwin == NULL) {
-             return NULL;
-         }
-     }
-     return tkwin;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RaiseTopLevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RaiseToplevelWindow(Tk_Window tkwin)
-{
-    SetWindowPos(WindowToHandle(tkwin), HWND_TOP, 0, 0, 0, 0,
-	SWP_NOMOVE | SWP_NOSIZE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MapToplevelWindow(Tk_Window tkwin)
-{
-    ShowWindow(WindowToHandle(tkwin), SW_SHOWNORMAL);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_UnmapToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_UnmapToplevelWindow(Tk_Window tkwin)
-{
-    ShowWindow(WindowToHandle(tkwin), SW_HIDE);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_MoveResizeToplevelWindow --
- *
- * Results:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_MoveResizeToplevelWindow(Tk_Window tkwin, int x, int y, int w, int h)
-{
-    SetWindowPos(WindowToHandle(tkwin), HWND_TOP, x, y, w, h, 0);
-}
-
-int
-Blt_ReparentWindow(
-    Display *display, 
-    Window window, 
-    Window newParent, 
-    int x, int y)
-{
-    XReparentWindow(display, window, newParent, x, y);
-    return TCL_OK;
-}
-
-int
-Blt_GetWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Window *windowPtr)
-{
-    char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '.') {
-	Tk_Window tkwin;
-
-	tkwin = Tk_NameToWindow(interp, string, Tk_MainWindow(interp));
-	if (tkwin == NULL) {
-	    return TCL_ERROR;
-	}
-	if (Tk_WindowId(tkwin) == None) {
-	    Tk_MakeWindowExist(tkwin);
-	}
-	*windowPtr = (Tk_IsTopLevel(tkwin)) ? Blt_GetWindowId(tkwin) : 
-	    Tk_WindowId(tkwin);
-    } else if (strcmp(string, "root") == 0) {
-	*windowPtr = Tk_RootWindow(Tk_MainWindow(interp));
-    } else {
-	static TkWinWindow tkWinWindow;
-	int id;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &id) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	tkWinWindow.handle = (HWND)id;
-	tkWinWindow.winPtr = NULL;
-	tkWinWindow.type = TWD_WINDOW;
-	*windowPtr = (Window)&tkWinWindow;
-    }
-    return TCL_OK;
-}
-
-
-Window
-Blt_GetParentWindow(Display *display, Window window) 
-{
-    HWND hWnd;
-    
-    hWnd = Tk_GetHWND(window);
-    hWnd = GetParent(hWnd);
-    return (Window)hWnd;
-}
diff --git a/blt3.0/src/bltWindow.c b/blt3.0/src/bltWindow.c
deleted file mode 100644
index dc36e88..0000000
--- a/blt3.0/src/bltWindow.c
+++ /dev/null
@@ -1,518 +0,0 @@
-
-/*
- * bltWindow.c --
- *
- * This module implements additional window functions for the BLT
- * toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#include <X11/Xlib.h>
-#ifdef notdef /* WIN32 */
-#include <X11/Xproto.h>
-#endif
-#include "tkDisplay.h"
-#include "bltHash.h"
-
-/* 
- * Cache drawable information.
- *
- * There are specific times when we need information about the drawable
- * that is not available via the normal argument passing.  For example,
- * XFT font rendering requires that the correct depth XftDraw be used.
- * If we create a painter from a drawable, we need to know its depth,
- * colormap, and visual also.
- * 
- * We can usually get this information using XGetWindowAttributes at
- * the cost of a round-trip to the X server.  Instead we'll cache it
- * in a hash table.  We don't have to cache every window. We need to
- * watch destroy events and freeing pixmaps.
- */
-
-typedef struct {
-    Display *display;
-    Drawable drawable;
-} DrawableKey;
-
-static Blt_HashTable attribTable;
-static int initialized = FALSE;
-
-Blt_DrawableAttributes *
-Blt_GetDrawableAttribs(Display *display, Drawable drawable)
-{
-    if (drawable != None) {
-	Blt_HashEntry *hPtr;
-	DrawableKey key;
-
-	if (!initialized) {
-	    Blt_InitHashTable(&attribTable, sizeof(DrawableKey)/sizeof(int));
-	    initialized = TRUE;
-	}
-	memset(&key, 0, sizeof(key));
-	key.drawable = drawable;
-	key.display = display;
-	hPtr = Blt_FindHashEntry(&attribTable, &key);
-	if (hPtr != NULL) {
-	    return Blt_GetHashValue(hPtr);
-	}
-    }
-    return NULL;		/* Don't have any information about this
-				 * drawable. */
-}
-
-void
-Blt_SetDrawableAttribs(
-    Display *display,
-    Drawable drawable, 
-    int depth,
-    int width, int height,
-    Colormap colormap,
-    Visual *visual)
-{
-    if (drawable != None) {
-	Blt_DrawableAttributes *attrPtr;
-	Blt_HashEntry *hPtr;
-	int isNew;
-	DrawableKey key;
-
-	if (!initialized) {
-	    Blt_InitHashTable(&attribTable, sizeof(DrawableKey)/sizeof(int));
-	    initialized = TRUE;
-	}
-	memset(&key, 0, sizeof(key));
-	key.drawable = drawable;
-	key.display = display;
-	hPtr = Blt_CreateHashEntry(&attribTable, &key, &isNew);
-	if (isNew) {
-	    attrPtr = Blt_AssertMalloc(sizeof(Blt_DrawableAttributes));
-	    Blt_SetHashValue(hPtr, attrPtr);
-	}  else {
-	    attrPtr = Blt_GetHashValue(hPtr);
-	}
-	/* Set or reset information for drawable. */
-	attrPtr->id = drawable;
-	attrPtr->depth = depth;
-	attrPtr->colormap = colormap;
-	attrPtr->visual = visual;
-	attrPtr->width = width;
-	attrPtr->height = height;
-    }
-}
-
-void
-Blt_SetDrawableAttribsFromWindow(Tk_Window tkwin, Drawable drawable)
-{
-    if (drawable != None) {
-	Blt_SetDrawableAttribs(Tk_Display(tkwin), drawable, Tk_Width(tkwin), 
-		Tk_Height(tkwin), Tk_Depth(tkwin), Tk_Colormap(tkwin), 
-		Tk_Visual(tkwin));
-    }
-}
-
-void
-Blt_FreeDrawableAttribs(Display *display, Drawable drawable)
-{
-    Blt_HashEntry *hPtr;
-    DrawableKey key;
-
-    if (drawable != None) {
-	if (!initialized) {
-	    Blt_InitHashTable(&attribTable, sizeof(DrawableKey)/sizeof(int));
-	    initialized = TRUE;
-	}
-	memset(&key, 0, sizeof(key));
-	key.drawable = drawable;
-	key.display = display;
-	hPtr = Blt_FindHashEntry(&attribTable, &key);
-	if (hPtr != NULL) {
-	    Blt_DrawableAttributes *attrPtr;
-	    
-	    attrPtr = Blt_GetHashValue(hPtr);
-	    Blt_DeleteHashEntry(&attribTable, hPtr);
-	    Blt_Free(attrPtr);
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FindChild --
- *
- *      Performs a linear search for the named child window in a given
- *	parent window.
- *
- *	This can be done via Tcl, but not through Tk's C API.  It's 
- *	simple enough, if you peek into the Tk_Window structure.
- *
- * Results:
- *      The child Tk_Window. If the named child can't be found, NULL
- *	is returned.
- *
- *---------------------------------------------------------------------------
- */
-
-/*LINTLIBRARY*/
-Tk_Window
-Blt_FindChild(Tk_Window parent, char *name)
-{
-    TkWindow *winPtr;
-    TkWindow *parentPtr = (TkWindow *)parent;
-
-    for (winPtr = parentPtr->childList; winPtr != NULL; 
-	winPtr = winPtr->nextPtr) {
-	if (strcmp(name, winPtr->nameUid) == 0) {
-	    return (Tk_Window)winPtr;
-	}
-    }
-    return NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FirstChildWindow --
- *
- *      Performs a linear search for the named child window in a given
- *	parent window.
- *
- *	This can be done via Tcl, but not through Tk's C API.  It's 
- *	simple enough, if you peek into the Tk_Window structure.
- *
- * Results:
- *      The child Tk_Window. If the named child can't be found, NULL
- *	is returned.
- *
- *---------------------------------------------------------------------------
- */
-/*LINTLIBRARY*/
-Tk_Window
-Blt_FirstChild(Tk_Window parent)
-{
-    TkWindow *parentPtr = (TkWindow *)parent;
-    return (Tk_Window)parentPtr->childList;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_FindChild --
- *
- *      Performs a linear search for the named child window in a given
- *	parent window.
- *
- *	This can be done via Tcl, but not through Tk's C API.  It's 
- *	simple enough, if you peek into the Tk_Window structure.
- *
- * Results:
- *      The child Tk_Window. If the named child can't be found, NULL
- *	is returned.
- *
- *---------------------------------------------------------------------------
- */
-
-/*LINTLIBRARY*/
-Tk_Window
-Blt_NextChild(Tk_Window tkwin)
-{
-    TkWindow *winPtr = (TkWindow *)tkwin;
-
-    if (winPtr == NULL) {
-	return NULL;
-    }
-    return (Tk_Window)winPtr->nextPtr;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * UnlinkWindow --
- *
- *	This procedure removes a window from the childList of its
- *	parent.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The window is unlinked from its childList.
- *
- *---------------------------------------------------------------------------
- */
-static void
-UnlinkWindow(TkWindow *winPtr)
-{
-    TkWindow *prevPtr;
-
-    prevPtr = winPtr->parentPtr->childList;
-    if (prevPtr == winPtr) {
-	winPtr->parentPtr->childList = winPtr->nextPtr;
-	if (winPtr->nextPtr == NULL) {
-	    winPtr->parentPtr->lastChildPtr = NULL;
-	}
-    } else {
-	while (prevPtr->nextPtr != winPtr) {
-	    prevPtr = prevPtr->nextPtr;
-	    if (prevPtr == NULL) {
-		panic("UnlinkWindow couldn't find child in parent");
-	    }
-	}
-	prevPtr->nextPtr = winPtr->nextPtr;
-	if (winPtr->nextPtr == NULL) {
-	    winPtr->parentPtr->lastChildPtr = prevPtr;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RelinkWindow --
- *
- *	Relinks a window into a new parent.  The window is unlinked
- *	from its original parent's child list and added onto the end
- *	of the new parent's list.
- *
- *	FIXME:  If the window has focus, the focus should be moved
- *		to an ancestor.  Otherwise, Tk becomes confused 
- *		about which Toplevel turns on focus for the window. 
- *		Right now this is done at the TCL layer.  For example,
- *		see blt::CreateTearoff in tabset.tcl.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The window is unlinked from its childList.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RelinkWindow(
-    Tk_Window tkwin,		/* Child window to be linked. */
-    Tk_Window newParent,
-    int x, int y)
-{
-    TkWindow *winPtr, *parentWinPtr;
-
-    if (Blt_ReparentWindow(Tk_Display(tkwin), Tk_WindowId(tkwin), 
-		Tk_WindowId(newParent), x, y) != TCL_OK) {
-	return;
-    }
-    winPtr = (TkWindow *)tkwin;
-    parentWinPtr = (TkWindow *)newParent;
-
-    winPtr->flags &= ~TK_REPARENTED;
-    UnlinkWindow(winPtr);	/* Remove the window from its parent's list */
-
-    /* Append the window onto the end of the parent's list of children */
-    winPtr->parentPtr = parentWinPtr;
-    winPtr->nextPtr = NULL;
-    if (parentWinPtr->childList == NULL) {
-	parentWinPtr->childList = winPtr;
-    } else {
-	parentWinPtr->lastChildPtr->nextPtr = winPtr;
-    }
-    parentWinPtr->lastChildPtr = winPtr;
-}
-
-#ifdef notdef
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_RelinkWindow --
- *
- *	Relinks a window into a new parent.  The window is unlinked
- *	from its original parent's child list and added onto the end
- *	of the new parent's list.
- *
- *	FIXME:  If the window has focus, the focus should be moved
- *		to an ancestor.  Otherwise, Tk becomes confused 
- *		about which Toplevel turns on focus for the window. 
- *		Right now this is done at the TCL layer.  For example,
- *		see blt::CreateTearoff in tabset.tcl.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The window is unlinked from its childList.
- *
- *---------------------------------------------------------------------------
- */
-void
-Blt_RelinkWindow2(
-    Tk_Window tkwin,		/* Child window to be linked. */
-    Window window,
-    Tk_Window newParent,
-    int x, int y)
-{
-#ifdef notdef
-    TkWindow *winPtr, *parentWinPtr;
-#endif
-    if (Blt_ReparentWindow(Tk_Display(tkwin), window,
-	    Tk_WindowId(newParent), x, y) != TCL_OK) {
-	return;
-    }
-#ifdef notdef
-    winPtr = (TkWindow *)tkwin;
-    parentWinPtr = (TkWindow *)newParent;
-
-    winPtr->flags &= ~TK_REPARENTED;
-    UnlinkWindow(winPtr);	/* Remove the window from its parent's list */
-
-    /* Append the window onto the end of the parent's list of children */
-    winPtr->parentPtr = parentWinPtr;
-    winPtr->nextPtr = NULL;
-    if (parentWinPtr->childList == NULL) {
-	parentWinPtr->childList = winPtr;
-    } else {
-	parentWinPtr->lastChildPtr->nextPtr = winPtr;
-    }
-    parentWinPtr->lastChildPtr = winPtr;
-#endif
-}
-
-void
-Blt_UnlinkWindow(Tk_Window tkwin) /* Child window to be linked. */
-{
-    TkWindow *winPtr;
-    Window root;
-
-    root = Tk_RootWindow(tkwin);
-    if (Blt_ReparentWindow(Tk_Display(tkwin), Tk_WindowId(tkwin), root, 0, 0) 
-	!= TCL_OK) {
-	return;
-    }
-    winPtr = (TkWindow *)tkwin;
-    winPtr->flags &= ~TK_REPARENTED;
-#ifdef notdef
-    UnlinkWindow(winPtr);	/* Remove the window from its parent's list */
-#endif
-}
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_Toplevel --
- *
- *      Climbs up the widget hierarchy to find the top level window of
- *      the window given.
- *
- * Results:
- *      Returns the Tk_Window of the toplevel widget.
- *
- *---------------------------------------------------------------------------
- */
-Tk_Window
-Blt_Toplevel(Tk_Window tkwin)
-{
-    while (!Tk_IsTopLevel(tkwin)) {
-	tkwin = Tk_Parent(tkwin);
-    }
-    return tkwin;
-}
-
-void
-Blt_RootCoordinates(
-    Tk_Window tkwin, 
-    int x, int y, 
-    int *rootXPtr, int *rootYPtr)
-{
-    int vx, vy, vw, vh;
-    int rootX, rootY;
-
-    Tk_GetRootCoords(tkwin, &rootX, &rootY);
-    x += rootX;
-    y += rootY;
-    Tk_GetVRootGeometry(tkwin, &vx, &vy, &vw, &vh);
-    x += vx;
-    y += vy;
-    *rootXPtr = x;
-    *rootYPtr = y;
-}
-
-
-/* Find the toplevel then  */
-int
-Blt_RootX(Tk_Window tkwin)
-{
-    int x;
-    
-    for (x = 0; tkwin != NULL;  tkwin = Tk_Parent(tkwin)) {
-	x += Tk_X(tkwin) + Tk_Changes(tkwin)->border_width;
-	if (Tk_IsTopLevel(tkwin)) {
-	    break;
-	}
-    }
-    return x;
-}
-
-int
-Blt_RootY(Tk_Window tkwin)
-{
-    int y;
-    
-    for (y = 0; tkwin != NULL;  tkwin = Tk_Parent(tkwin)) {
-	y += Tk_Y(tkwin) + Tk_Changes(tkwin)->border_width;
-	if (Tk_IsTopLevel(tkwin)) {
-	    break;
-	}
-    }
-    return y;
-}
-
-void
-Blt_SetWindowInstanceData(Tk_Window tkwin, ClientData instanceData)
-{
-    TkWindow *winPtr = (TkWindow *)tkwin;
-
-    winPtr->instanceData = instanceData;
-}
-
-ClientData
-Blt_GetWindowInstanceData(Tk_Window tkwin)
-{
-    TkWindow *winPtr;
-
-    while (tkwin != NULL) {
-	winPtr = (TkWindow *)tkwin;
-	if (winPtr->instanceData != NULL) {
-	    return (ClientData)winPtr->instanceData;
-	}
-	tkwin = Tk_Parent(tkwin);
-    }
-    return NULL;
-}
-
-void
-Blt_DeleteWindowInstanceData(Tk_Window tkwin)
-{
-    /* empty */
-}
diff --git a/blt3.0/src/bltWinop.c b/blt3.0/src/bltWinop.c
deleted file mode 100644
index 2f4f0c8..0000000
--- a/blt3.0/src/bltWinop.c
+++ /dev/null
@@ -1,448 +0,0 @@
-
-/*
- * bltWinop.c --
- *
- * This module implements simple window commands for the BLT toolkit.
- *
- *	Copyright 1991-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "bltInt.h"
-
-#ifndef NO_WINOP
-#include "bltOp.h"
-#include "bltPicture.h"
-#include "bltImage.h"
-#include <X11/Xutil.h>
-#include "tkDisplay.h"
-
-#define CLAMP(c)	((((c) < 0.0) ? 0.0 : ((c) > 255.0) ? 255.0 : (c)))
-static Tcl_ObjCmdProc WinopCmd;
-
-static int
-GetRealizedWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, 
-			 Tk_Window *tkwinPtr)
-{
-    const char *string;
-    Tk_Window tkwin;
-
-    string = Tcl_GetString(objPtr);
-    assert(interp != NULL);
-    tkwin = Tk_NameToWindow(interp, string, Tk_MainWindow(interp));
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    if (Tk_WindowId(tkwin) == None) {
-	Tk_MakeWindowExist(tkwin);
-    }
-    *tkwinPtr = tkwin;
-    return TCL_OK;
-}
-
-static int
-GetWindowFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Window *windowPtr)
-{
-    const char *string;
-
-    string = Tcl_GetString(objPtr);
-    if (string[0] == '.') {
-	Tk_Window tkwin;
-
-	if (GetRealizedWindowFromObj(interp, objPtr, &tkwin) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (Tk_IsTopLevel(tkwin)) {
-	    *windowPtr = Blt_GetWindowId(tkwin);
-	} else {
-	    *windowPtr = Tk_WindowId(tkwin);
-	}
-    } else if (strcmp(string, "root") == 0) {
-	*windowPtr = Tk_RootWindow(Tk_MainWindow(interp));
-    } else {
-	int xid;
-
-	if (Tcl_GetIntFromObj(interp, objPtr, &xid) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-#ifdef WIN32
-	{ 
-	    static TkWinWindow tkWinWindow;
-	    
-	    tkWinWindow.handle = (HWND)xid;
-	    tkWinWindow.winPtr = NULL;
-	    tkWinWindow.type = TWD_WINDOW;
-	    *windowPtr = (Window)&tkWinWindow;
-	}
-#else
-	*windowPtr = (Window)xid;
-#endif
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-LowerOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Window window;
-
-	if (GetWindowFromObj(interp, objv[i], &window) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	XLowerWindow(Tk_Display(tkMain), window);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-RaiseOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	Window window;
-
-	if (GetWindowFromObj(interp, objv[i], &window) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	XRaiseWindow(Tk_Display(tkMain), window);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-MapOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	const char *string;
-	Window window;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '.') {
-	    Tk_Window tkwin;
-	    Tk_FakeWin *fakePtr;
-
-	    if (GetRealizedWindowFromObj(interp, objv[i], &tkwin) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-#ifdef  WIN32
-	Tk_MapWindow(tkwin);		
-#endif
-	    fakePtr = (Tk_FakeWin *) tkwin;
-	    fakePtr->flags |= TK_MAPPED;
-	    window = Tk_WindowId(tkwin);
-	} else {
-	    int xid;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i], &xid) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    window = (Window)xid;
-	}
-	XMapWindow(Tk_Display(tkMain), window);
-    }
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-MoveOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int x, y;
-    Window window;
-
-    if (GetWindowFromObj(interp, objv[2], &window) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tk_GetPixelsFromObj(interp, tkMain, objv[3], &x) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tk_GetPixelsFromObj(interp, tkMain, objv[4], &y) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    XMoveWindow(Tk_Display(tkMain), window, x, y);
-    return TCL_OK;
-}
-
-/*ARGSUSED*/
-static int
-UnmapOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int i;
-
-    for (i = 2; i < objc; i++) {
-	const char *string;
-	Window window;
-
-	string = Tcl_GetString(objv[i]);
-	if (string[0] == '.') {
-	    Tk_Window tkwin;
-	    Tk_FakeWin *fakePtr;
-
-	    if (GetRealizedWindowFromObj(interp, objv[i], &tkwin) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    fakePtr = (Tk_FakeWin *) tkwin;
-	    fakePtr->flags &= ~TK_MAPPED;
-	    window = Tk_WindowId(tkwin);
-	} else {
-	    int xid;
-
-	    if (Tcl_GetIntFromObj(interp, objv[i], &xid) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    window = (Window)xid;
-	}
-	XMapWindow(Tk_Display(tkMain), window);
-    }
-    return TCL_OK;
-}
-
-/* ARGSUSED */
-static int
-ChangesOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Tk_Window tkwin;
-
-    if (GetRealizedWindowFromObj(interp, objv[2], &tkwin) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (Tk_IsTopLevel(tkwin)) {
-	XSetWindowAttributes attrs;
-	Window window;
-	unsigned int mask;
-
-	window = Blt_GetWindowId(tkwin);
-	attrs.backing_store = WhenMapped;
-	attrs.save_under = True;
-	mask = CWBackingStore | CWSaveUnder;
-	XChangeWindowAttributes(Tk_Display(tkwin), window, mask, &attrs);
-    }
-    return TCL_OK;
-}
-
-/* ARGSUSED */
-static int
-QueryOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    int rootX, rootY, childX, childY;
-    Window root, child;
-    unsigned int mask;
-
-    /* GetCursorPos */
-    if (XQueryPointer(Tk_Display(tkMain), Tk_WindowId(tkMain), &root,
-	    &child, &rootX, &rootY, &childX, &childY, &mask)) {
-	Tcl_Obj *listObjPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(rootX));
-	Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewIntObj(rootY));
-	Tcl_SetObjResult(interp, listObjPtr);
-    }
-    return TCL_OK;
-}
-
-/* ARGSUSED */
-static int
-TreeOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    Window *ancestors, window, root, parent;
-    unsigned int nAncestors;
-
-    if (GetWindowFromObj(interp, objv[2], &window) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if ((XQueryTree(Tk_Display(tkMain), window, &root, &parent, &ancestors, 
-		&nAncestors)) && (nAncestors > 0)) {
-	unsigned int i;
-	Tcl_Obj *listObjPtr;
-	char string[200];
-	Tcl_Obj *objPtr;
-
-	listObjPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL);
-	sprintf(string, "0x%x", (unsigned int)root);
-	objPtr = Tcl_NewStringObj(string , -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	sprintf(string, "0x%x", (unsigned int)parent);
-	objPtr = Tcl_NewStringObj(string , -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	sprintf(string, "0x%x", (unsigned int)window);
-	objPtr = Tcl_NewStringObj(string , -1);
-	Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	for (i = 0; i < nAncestors; i++) {
-	    sprintf(string, "0x%x", (unsigned int)ancestors[i]);
-	    objPtr = Tcl_NewStringObj(string , -1);
-	    Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
-	}
-	Tcl_SetObjResult(interp, listObjPtr);
-	if (ancestors != NULL) {
-	    XFree((char *)ancestors); 
-	}
-    }
-    return TCL_OK;
-}
-
-
-/*ARGSUSED*/
-static int
-WarpToOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
-{
-    if (objc == 3) {
-	Tk_Window tkwin;
-
-	if (GetRealizedWindowFromObj(interp, objv[2], &tkwin) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-	if (!Tk_IsMapped(tkwin)) {
-	    Tcl_AppendResult(interp, "can't warp to unmapped window \"",
-		     Tk_PathName(tkwin), "\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-	XWarpPointer(Tk_Display(tkwin), None, Tk_WindowId(tkwin),
-	     0, 0, 0, 0, Tk_Width(tkwin) / 2, Tk_Height(tkwin) / 2);
-    } else if (objc == 4) {
-	int x, y;
-	Window root;
-	
-	if ((Tk_GetPixelsFromObj(interp, tkMain, objv[2], &x) != TCL_OK) ||
-	    (Tk_GetPixelsFromObj(interp, tkMain, objv[3], &y) != TCL_OK)) {
-	    return TCL_ERROR;
-	}
-	root = Tk_RootWindow(tkMain);
-	XWarpPointer(Tk_Display(tkMain), None, root, 0, 0, 0, 0, x, y);
-    }
-    return QueryOp(tkMain, interp, 0, (Tcl_Obj **)NULL);
-}
-
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>
-#include <X11/Xproto.h>
-#include <X11/extensions/randr.h>
-#include <X11/extensions/Xrandr.h>
-#include <X11/extensions/Xrender.h>	/* we share subpixel information */
-
-/* ARGSUSED */
-static int
-ScreenHeightOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    Rotation current_rotation;
-    SizeID index;
-    XRRScreenConfiguration *sc;
-    XRRScreenSize *sizes;
-    int h;
-    int nSizes;
-    
-    sc = XRRGetScreenInfo(Tk_Display(tkMain), Tk_RootWindow(tkMain));
-    if (sc == NULL) {
-	Tcl_AppendResult(interp, "can't get screen configuration", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    index = XRRConfigCurrentConfiguration (sc, &current_rotation);
-    sizes = XRRConfigSizes(sc, &nSizes);
-    h = sizes[index].height;
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), h);
-    return TCL_OK;
-}
-
-/* ARGSUSED */
-static int
-ScreenWidthOp(Tk_Window tkMain, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    Rotation current_rotation;
-    SizeID index;
-    XRRScreenConfiguration *sc;
-    XRRScreenSize *sizes;
-    int nSizes;
-    int w;
-
-    sc = XRRGetScreenInfo(Tk_Display(tkMain), Tk_RootWindow(tkMain));
-    if (sc == NULL) {
-	Tcl_AppendResult(interp, "can't get screen configuration", 
-			 (char *)NULL);
-	return TCL_ERROR;
-    }
-    index = XRRConfigCurrentConfiguration (sc, &current_rotation);
-    sizes = XRRConfigSizes(sc, &nSizes);
-    w = sizes[index].width;
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), w);
-    return TCL_OK;
-}
-
-
-static Blt_OpSpec winOps[] =
-{
-    {"changes", 1, ChangesOp, 3, 3, "window",},
-    {"lower",   1, LowerOp,   2, 0, "window ?window?...",},
-    {"map",     2, MapOp,     2, 0, "window ?window?...",},
-    {"move",    2, MoveOp,    5, 5, "window x y",},
-    {"query",   1, QueryOp,   2, 2, "",},
-    {"raise",   1, RaiseOp,   2, 0, "window ?window?...",},
-    {"screenheight", 7, ScreenHeightOp, 2, 2, "",},
-    {"screenwidth",  7, ScreenWidthOp,  2, 2, "",},
-    {"tree",    1, TreeOp,    3, 3, "window",},
-    {"unmap",   1, UnmapOp,   2, 0, "window ?window?...",},
-    {"warpto",  1, WarpToOp,  2, 5, "?window?",},
-};
-
-static int nWinOps = sizeof(winOps) / sizeof(Blt_OpSpec);
-
-/* ARGSUSED */
-static int
-WinopCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    Tcl_ObjCmdProc *proc;
-    int result;
-    Tk_Window tkwin;
-
-    proc = Blt_GetOpFromObj(interp, nWinOps, winOps, BLT_OP_ARG1,  objc, objv, 
-	0);
-    if (proc == NULL) {
-	return TCL_ERROR;
-    }
-    tkwin = Tk_MainWindow(interp);
-    result = (*proc) (tkwin, interp, objc, objv);
-    return result;
-}
-
-int
-Blt_WinopCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpec = {"winop", WinopCmd,};
-
-    return Blt_InitCmd(interp, "::blt", &cmdSpec);
-}
-
-#endif /* NO_WINOP */
diff --git a/blt3.0/src/config.h.in b/blt3.0/src/config.h.in
deleted file mode 100644
index 156667f..0000000
--- a/blt3.0/src/config.h.in
+++ /dev/null
@@ -1,296 +0,0 @@
-/* src/config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define the smallest machine value DBL_EPILSON. */
-#undef BLT_DBL_EPSILON
-
-/* Define 'suffix' as the suffix for library names. */
-#undef BLT_LIB_SUFFIX
-
-/* Define 'soext' as the extension for shared libraries. */
-#undef BLT_SO_EXT
-
-/* Define 'prefix' as the prefix for shared library names. */
-#undef BLT_SO_PREFIX
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define to 1 if you have the declaration of `drand48', and to 0 if you
-   don't. */
-#undef HAVE_DECL_DRAND48
-
-/* Define to 1 if you have the declaration of `finite', and to 0 if you don't.
-   */
-#undef HAVE_DECL_FINITE
-
-/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
-   */
-#undef HAVE_DECL_FREE
-
-/* Define to 1 if you have the declaration of `hypot', and to 0 if you don't.
-   */
-#undef HAVE_DECL_HYPOT
-
-/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
-   don't. */
-#undef HAVE_DECL_ISFINITE
-
-/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
-   */
-#undef HAVE_DECL_ISNAN
-
-/* Define to 1 if you have the declaration of `j1', and to 0 if you don't. */
-#undef HAVE_DECL_J1
-
-/* Define to 1 if you have the declaration of `srand48', and to 0 if you
-   don't. */
-#undef HAVE_DECL_SRAND48
-
-/* Define to 1 if you have the declaration of `strcasecmp', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRCASECMP
-
-/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRNCASECMP
-
-/* Define to 1 if you have the declaration of `strtolower', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRTOLOWER
-
-/* Define to 1 if you have the `drand48' function. */
-#undef HAVE_DRAND48
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <expat.h> header file. */
-#undef HAVE_EXPAT_H
-
-/* Define to 1 if you have the `finite' function. */
-#undef HAVE_FINITE
-
-/* Define to 1 if you have the <float.h> header file. */
-#undef HAVE_FLOAT_H
-
-/* Define to 1 if you have the <ft2build.h> header file. */
-#undef HAVE_FT2BUILD_H
-
-/* Define to 1 if you have the <ieeefp.h> header file. */
-#undef HAVE_IEEEFP_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if we have a working 'isinfinite'. */
-#undef HAVE_ISFINITE
-
-/* Define to 1 if you have the `isnan' function. */
-#undef HAVE_ISNAN
-
-/* Define to 1 if you have the <jpeglib.h> header file. */
-#undef HAVE_JPEGLIB_H
-
-/* Define to 1 if you have the `EXPAT' library (-lexpat). */
-#undef HAVE_LIBEXPAT
-
-/* Define to 1 if you have the `FT2' library (-lfreetype). */
-#undef HAVE_LIBFT2
-
-/* Define to 1 if you have the `FTCFG' library (-lfontconfig). */
-#undef HAVE_LIBFTCFG
-
-/* Define to 1 if you have the `JPG' library (-ljpeg). */
-#undef HAVE_LIBJPG
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the `MYSQL' library (-lmysqlclient). */
-#undef HAVE_LIBMYSQL
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define to 1 if you have the `PNG' library (-lpng). */
-#undef HAVE_LIBPNG
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the `TIF' library (-ltiff). */
-#undef HAVE_LIBTIF
-
-/* Define to 1 if you have the `XAU' library (-lXau). */
-#undef HAVE_LIBXAU
-
-/* Define to 1 if you have the `XDMCP' library (-lXdmcp). */
-#undef HAVE_LIBXDMCP
-
-/* Define to 1 if you have the `XFT' library (-lXft -lexpat). */
-#undef HAVE_LIBXFT
-
-/* Define to 1 if you have the `XPM' library (-lXpm). */
-#undef HAVE_LIBXPM
-
-/* Define to 1 if you have the `XRANDR' library (-lXrandr). */
-#undef HAVE_LIBXRANDR
-
-/* Define to 1 if you have the `XRENDER' library (-lXrender). */
-#undef HAVE_LIBXRENDER
-
-/* Define to 1 if you have the `Z' library (-lz). */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the <math.h> header file. */
-#undef HAVE_MATH_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <mysql/mysql.h> header file. */
-#undef HAVE_MYSQL_MYSQL_H
-
-/* Define to 1 if you have the <png.h> header file. */
-#undef HAVE_PNG_H
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#undef HAVE_SETJMP_H
-
-/* Define to 1 if you have the `srand48' function. */
-#undef HAVE_SRAND48
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strncasecmp' function. */
-#undef HAVE_STRNCASECMP
-
-/* Define to 1 if you have the `strtolower' function. */
-#undef HAVE_STRTOLOWER
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <tiff.h> header file. */
-#undef HAVE_TIFF_H
-
-/* Define if 'wait' is a union. */
-#undef HAVE_UNION_WAIT
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <waitflags.h> header file. */
-#undef HAVE_WAITFLAGS_H
-
-/* Define to 1 if you have the <X11/Xft/Xft.h> header file. */
-#undef HAVE_X11_XFT_XFT_H
-
-/* Define to 1 if you have the <X11/xpm.h> header file. */
-#undef HAVE_X11_XPM_H
-
-/* Define if we're compiling for an X86. */
-#undef HAVE_X86
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* The size of `float', as computed by sizeof. */
-#undef SIZEOF_FLOAT
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `void *', as computed by sizeof. */
-#undef SIZEOF_VOID_P
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define if Tcl stubs are used. */
-#undef USE_TCL_STUBS
-
-/* Define if Tk stubs are used. */
-#undef USE_TK_STUBS
-
-/* Define if building for Win32. */
-#undef WIN32
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
diff --git a/blt3.0/src/missing.h b/blt3.0/src/missing.h
deleted file mode 100644
index 373ea51..0000000
--- a/blt3.0/src/missing.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _MISSING_H
-#define _MISSING_H
-
-#include <winspool.h>
-
-#ifndef DeleteBitmap
-#define DeleteBitmap(hbm)       DeleteObject((HGDIOBJ)(HBITMAP)(hbm))
-#endif
-#ifndef DeleteBrush
-#define DeleteBrush(hbr)	DeleteObject((HGDIOBJ)(HBRUSH)(hbr))
-#endif
-#ifndef DeleteFont
-#define DeleteFont(hfont)	DeleteObject((HGDIOBJ)(HFONT)(hfont))
-#endif
-#ifndef DeletePalette
-#define DeletePalette(hpal)     DeleteObject((HGDIOBJ)(HPALETTE)(hpal))
-#endif
-#ifndef DeletePen
-#define DeletePen(hpen)		DeleteObject((HGDIOBJ)(HPEN)(hpen))
-#endif
-#ifndef SelectBitmap
-#define SelectBitmap(hdc, hbm)  ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm)))
-#endif
-#ifndef SelectBrush
-#define SelectBrush(hdc, hbr)   ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr)))
-#endif
-#ifndef SelectFont
-#define SelectFont(hdc, hfont)  ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont)))
-#endif
-#ifndef SelectPen
-#define SelectPen(hdc, hpen)    ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen)))
-#endif
-#ifndef GetNextWindow
-#define GetNextWindow(hWnd,wCmd) GetWindow((hWnd),(wCmd))
-#endif
-#ifndef GetStockBrush
-#define GetStockBrush(i)     ((HBRUSH)GetStockObject(i))
-#endif
-#ifndef GetStockPen
-#define GetStockPen(i)       ((HPEN)GetStockObject(i))
-#endif
-
-
-#endif /* _MISSING_H */
diff --git a/blt3.0/src/pure_api.c b/blt3.0/src/pure_api.c
deleted file mode 100644
index a863c7d..0000000
--- a/blt3.0/src/pure_api.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Header file of Pure API function declarations.
- *
- * Explicitly no copyright.
- * You may recompile and redistribute these definitions as required.
- *
- * NOTE1: In some situations when compiling with MFC, you should
- *        enable the setting 'Not using precompiled headers' in Visual C++
- *        to avoid a compiler diagnostic.
- *
- * NOTE2: This file works through the use of deep magic.  Calls to functions
- *        in this file are replaced with calls into the OCI runtime system
- *        when an instrumented version of this program is run.
- *
- * NOTE3: The static vars avoidGy_n (where n is a unique number) are used
- *        to prevent optimizing the functions away when compiler option
- *        /Gy is set. This is needed so that NOTE2 works properly.
- */
-static int avoidGy_1;
-static int avoidGy_2;
-static int avoidGy_3;
-static int avoidGy_4;
-static int avoidGy_5;
-static int avoidGy_6;
-static int avoidGy_7;
-static int avoidGy_8;
-static int avoidGy_9;
-static int avoidGy_10;
-static int avoidGy_11;
-static int avoidGy_12;
-static int avoidGy_13;
-static int avoidGy_14;
-static int avoidGy_15;
-static int avoidGy_16;
-static int avoidGy_17;
-static int avoidGy_18;
-static int avoidGy_19;
-static int avoidGy_20;
-static int avoidGy_21;
-static int avoidGy_22;
-static int avoidGy_23;
-static int avoidGy_24;
-static int avoidGy_25;
-static int avoidGy_26;
-static int avoidGy_27;
-static int avoidGy_28;
-static int avoidGy_29;
-static int avoidGy_30;
-static int avoidGy_31;
-static int avoidGy_32;
-static int avoidGy_33;
-static int avoidGy_34;
-static int avoidGy_35;
-static int avoidGy_36;
-static int avoidGy_37;
-static int avoidGy_38;
-static int avoidGy_39;
-static int avoidGy_40;
-static int avoidGy_41;
-static int avoidGy_42;
-static int avoidGy_43;
-static int avoidGy_44;
-static int avoidGy_45;
-static int avoidGy_46;
-static int avoidGy_47;
-static int avoidGy_48;
-static int avoidGy_49;
-static int avoidGy_50;
-static int avoidGy_51;
-static int avoidGy_52;
-static int avoidGy_53;
-static int avoidGy_54;
-static int avoidGy_55;
-static int avoidGy_56;
-static int avoidGy_57;
-static int avoidGy_58;
-static int avoidGy_59;
-static int avoidGy_60;
-static int avoidGy_PL_01;
-__declspec(dllexport) int __cdecl PurePrintf(const char *fmt, ...) { avoidGy_1++; fmt; return 0; }
-__declspec(dllexport) int __cdecl PurifyIsRunning(void) { avoidGy_2++; return 0; }
-__declspec(dllexport) int __cdecl PurifyPrintf(const char *fmt, ...) { avoidGy_3++; fmt; return 0; }
-__declspec(dllexport) int __cdecl PurifyNewInuse(void) { avoidGy_4++; return 0; }
-__declspec(dllexport) int __cdecl PurifyAllInuse(void) { avoidGy_5++; return 0; }
-__declspec(dllexport) int __cdecl PurifyClearInuse(void) { avoidGy_6++; return 0; }
-__declspec(dllexport) int __cdecl PurifyNewLeaks(void) { avoidGy_7++; return 0; }
-__declspec(dllexport) int __cdecl PurifyAllLeaks(void) { avoidGy_8++; return 0; }
-__declspec(dllexport) int __cdecl PurifyClearLeaks(void) { avoidGy_9++; return 0; }
-__declspec(dllexport) int __cdecl PurifyAllHandlesInuse(void) { avoidGy_10++; return 0; }
-__declspec(dllexport) int __cdecl PurifyNewHandlesInuse(void) { avoidGy_11++; return 0; }
-__declspec(dllexport) int __cdecl PurifyDescribe(void *addr) { avoidGy_12++; addr; return 0; }
-__declspec(dllexport) int __cdecl PurifyWhatColors(void *addr, int size) { avoidGy_13++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyAssertIsReadable(const void *addr, int size) { avoidGy_14++; addr; size; return 1; }
-__declspec(dllexport) int __cdecl PurifyAssertIsWritable(const void *addr, int size) { avoidGy_15++; addr; size; return 1; }
-__declspec(dllexport) int __cdecl PurifyIsReadable(const void *addr, int size) { avoidGy_16++; addr; size; return 1; }
-__declspec(dllexport) int __cdecl PurifyIsWritable(const void *addr, int size) { avoidGy_17++; addr; size; return 1; }
-__declspec(dllexport) int __cdecl PurifyIsInitialized(const void *addr, int size) { avoidGy_18++; addr; size; return 1; }
-__declspec(dllexport) int __cdecl PurifyRed(void *addr, int size) { avoidGy_19++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyGreen(void *addr, int size) { avoidGy_20++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyYellow(void *addr, int size) { avoidGy_21++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyBlue(void *addr, int size) { avoidGy_22++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyMarkAsInitialized(void *addr, int size) { avoidGy_23++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyMarkAsUninitialized(void *addr, int size) { avoidGy_24++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyMarkForTrap(void *addr, int size) { avoidGy_25++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyMarkForNoTrap(void *addr, int size) { avoidGy_26++; addr; size; return 0; }
-__declspec(dllexport) int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) 
- { avoidGy_27++; hHeap; dwFlags; addr; return 1; }
-__declspec(dllexport) int __cdecl PurifySetLateDetectScanCounter(int counter) { avoidGy_28++; counter; return 0; };
-__declspec(dllexport) int __cdecl PurifySetLateDetectScanInterval(int seconds) { avoidGy_29++; seconds; return 0; };
-__declspec(dllexport) int __cdecl CoverageIsRunning(void) { avoidGy_30++; return 0; }
-__declspec(dllexport) int __cdecl CoverageDisableRecordingData(void) { avoidGy_31++; return 0; }
-__declspec(dllexport) int __cdecl CoverageStartRecordingData(void) { avoidGy_32++; return 0; }
-__declspec(dllexport) int __cdecl CoverageStopRecordingData(void) { avoidGy_33++; return 0; }
-__declspec(dllexport) int __cdecl CoverageClearData(void) { avoidGy_34++; return 0; }
-__declspec(dllexport) int __cdecl CoverageIsRecordingData(void) { avoidGy_35++; return 0; }
-__declspec(dllexport) int __cdecl CoverageAddAnnotation(char *str) { avoidGy_36++; str; return 0; }
-__declspec(dllexport) int __cdecl CoverageSaveData(void) { avoidGy_37++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyIsRunning(void) { avoidGy_42++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyDisableRecordingData(void) { avoidGy_43++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyStartRecordingData(void) { avoidGy_44++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyStopRecordingData(void) { avoidGy_45++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyClearData(void) { avoidGy_46++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyIsRecordingData(void) { avoidGy_47++; return 0; }
-__declspec(dllexport) int __cdecl QuantifyAddAnnotation(char *str) { avoidGy_48++; str; return 0; }
-__declspec(dllexport) int __cdecl QuantifySaveData(void) { avoidGy_49++; return 0; }
-__declspec(dllexport) int __cdecl PurelockIsRunning(void) { avoidGy_PL_01++; return 0; }
diff --git a/blt3.0/src/shared/Makefile.in b/blt3.0/src/shared/Makefile.in
deleted file mode 100644
index e79dcab..0000000
--- a/blt3.0/src/shared/Makefile.in
+++ /dev/null
@@ -1,534 +0,0 @@
-# ------------------------------------------------------------------------
-# 	Makefile for shared version of BLT library
-# ------------------------------------------------------------------------
-
-SO_SUFFIX =		@SO_SUFFIX@
-version =		@BLT_MAJOR_VERSION@@BLT_MINOR_VERSION@
-
-# ------------------------------------------------------------------------
-# 	C Compiler options 
-# ------------------------------------------------------------------------
-
-CC =			@CC@
-CFLAGS =		@CFLAGS@ 
-DBG =			@LIB_SUFFIX@
-DEFINES =		@DEFINES@ 
-DEF_BLTINIT =		-DBLT_LIBRARY=\"$(pkgdir)\"
-EXTRA_CFLAGS =		@GCCFLAGS@ @SO_CFLAGS@
-EXTRA_LIBS =		@EXTRA_LIBS@
-LDFLAGS =		@LDFLAGS@ @LD_RUN_PATH@
-LIB_PREFIX =		@LIB_PREFIX@
-
-SO_LD =			@SO_LD@
-SO_LD_FLAGS =		@SO_LD_FLAGS@ @LD_RUN_PATH@
-SO_STD_LIBS =		@SO_LIBS@ 
-SO_TCL_ONLY_LIBS =	@SO_TCL_ONLY_LIBS@ 
-
-STD_LIBS =		@LIBS@ 
-
-STUB_DEFINES =		@TCL_STUB_DEFINES@
-TCL_STUB_SPEC =		@TCL_STUB_SPEC@
-TK_STUB_SPEC =		@TK_STUB_SPEC@
-cyg_prefix =		@LIB_PREFIX@
-
-EXPAT_INC_SPEC =	@EXPAT_INC_SPEC@
-EXPAT_LIB_SPEC =	@EXPAT_LIB_SPEC@
-FT_INC_SPEC =		@FT_INC_SPEC@
-FT_LIB_SPEC =		@FT_LIB_SPEC@
-JPG_INC_SPEC =		@JPG_INC_SPEC@
-JPG_LIB_SPEC =		@JPG_LIB_SPEC@
-MYSQL_INC_SPEC =	@MYSQL_INC_SPEC@
-MYSQL_LIB_SPEC =	@MYSQL_LIB_SPEC@
-PNG_INC_SPEC =		@PNG_INC_SPEC@
-PNG_LIB_SPEC =		@PNG_LIB_SPEC@
-TCL_INC_SPEC =		@TCL_INC_SPEC@
-TCL_LIB_SPEC =		@TCL_LIB_SPEC@
-TIF_INC_SPEC =		@TIF_INC_SPEC@
-TIF_LIB_SPEC =		@TIF_LIB_SPEC@
-TK_INC_SPEC =		@TK_INC_SPEC@
-TK_LIB_SPEC =		@TK_LIB_SPEC@
-X11_INC_SPEC =		@X11_INC_SPEC@
-X11_LIB_SPEC =		@X11_LIB_SPEC@
-XFT_INC_SPEC =		@XFT_INC_SPEC@
-XFT_LIB_SPEC =		@XFT_LIB_SPEC@
-XPM_INC_SPEC =		@XPM_INC_SPEC@
-XPM_LIB_SPEC =		@XPM_LIB_SPEC@
-
-prefix =		@prefix@
-exec_prefix =		@exec_prefix@
-libdir =		@libdir@
-bindir =		$(exec_prefix)/bin
-srcdir =		@srcdir@/..
-
-instdirs =		$(exec_prefix) $(libdir) 
-
-pkgdir =		@BLT_LIBRARY@
-
-BLT_LIBS =		$(TK_LIB_SPEC) \
-			$(TCL_LIB_SPEC) \
-			$(FT_LIB_SPEC) \
-			$(XFT_LIB_SPEC) \
-			$(X11_LIB_SPEC)  \
-			$(EXTRA_LIBS) 	
-
-BLT_LITE_LIBS =		$(TCL_LIB_SPEC) \
-			$(EXTRA_LIBS) 
-
-# ------------------------------------------------------------------------
-# 	Don't edit anything beyond this point
-# ------------------------------------------------------------------------
-
-N_OBJS =	bltTed.o
-V3_OBJS =	bltTri.o bltGrMt.o 
-
-TK_OBJS =	tkButton.o tkFrame.o bltScrollbar.o 
-
-GRAPH_OBJS =	bltGrAxis.o \
-		bltGrBar.o \
-		bltGrElem.o \
-		bltGrHairs.o \
-		bltGrLegd.o \
-		bltGrLine.o \
-		bltGrMarker.o \
-		bltGrMisc.o \
-		bltGrPen.o \
-		bltGrPs.o \
-		bltGraph.o 
-
-PICTURE_OBJS =  bltPicture.o \
-		bltPictCmd.o \
-		bltPictDraw.o \
-		bltPictMmx.o 
-
-TREEVIEW_OBJS = bltTreeView.o \
-		bltTvCmd.o \
-		bltTvCol.o \
-		bltTvEdit.o \
-		bltTvStyle.o 
-
-TREE_OBJS =     bltTree.o \
-		bltTreeCmd.o  
-
-DATATABLE_OBJS = bltDataTable.o \
-		bltDtCmd.o 
-
-BLT_LITE_OBJS =	bltAlloc.o \
-		bltArrayObj.o \
-		bltBase64.o \
-		bltBgexec.o \
-		bltChain.o \
-		bltCrc32.o \
-		bltCsv.o \
-		$(DATATABLE_OBJS) \
-		bltDebug.o \
-		bltHash.o \
-		bltList.o \
-		bltNsUtil.o \
-		bltParse.o \
-		bltPool.o \
-		bltSink.o \
-		bltSpline.o \
-		bltSwitch.o \
-		$(TREE_OBJS) \
-		bltUnixPipe.o \
-		bltUtil.o \
-		bltVecCmd.o \
-		bltVecMath.o \
-		bltVector.o \
-		bltWatch.o  
-
-BLT_OBJS =	$(BLT_LITE_OBJS) \
-		$(GRAPH_OBJS) \
-		$(PICTURE_OBJS) \
-		$(TREEVIEW_OBJS) \
-		bltBeep.o \
-		bltBgStyle.o \
-		bltBind.o \
-		bltBitmap.o \
-		bltBusy.o \
-		bltCanvEps.o \
-		bltComboBtn.o \
-		bltComboEntry.o \
-		bltComboMenu.o \
-		bltComboTree.o \
-		bltConfig.o \
-		bltContainer.o \
-		bltCutbuffer.o \
-		bltDragdrop.o \
-		bltHtext.o \
-		bltImage.o \
-		bltOldConfig.o \
-		bltPainter.o \
-		bltPs.o \
-		bltTable.o \
-		bltTabnotebook.o \
-		bltTabset.o \
-		bltText.o \
-		bltTile.o \
-		bltUnixBitmap.o \
-		bltUnixFont.o \
-		bltUnixDnd.o \
-		bltUnixPainter.o \
-		bltUnixWindow.o \
-		bltWindow.o \
-		bltWinop.o  \
-		$(TK_OBJS) $(N_OBJS) 
-
-INCLUDES =	-I.. -I$(srcdir) -I$(srcdir)/.. @INCLUDES@
-CC_OPTS =	$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(STUB_DEFINES) $(INCLUDES)
-MAIN_CC_OPTS =	$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
-INSTALL =	@INSTALL@
-INSTALL_DATA =	@INSTALL_DATA@
-INSTALL_ROOT =  
-SHELL =		/bin/sh
-RM =		rm -f
-LN_S =		@LN_S@
-bltwish =	bltwish$(version)
-bltsh =		bltsh$(version)
-
-lib_blt_so =	$(LIB_PREFIX)BLT$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_lite_so = $(LIB_PREFIX)BLTlite$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_dt_xml_so = $(LIB_PREFIX)BltDataTableXml$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_dt_mysql_so = $(LIB_PREFIX)BltDataTableMysql$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_dt_tree_so = $(LIB_PREFIX)BltDataTableTree$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_dt_vec_so = $(LIB_PREFIX)BltDataTableVector$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_dt_csv_so = $(LIB_PREFIX)BltDataTableCsv$(version)$(DBG)$(SO_SUFFIX)
-
-lib_blt_pict_gif_so = $(LIB_PREFIX)BltPictureGif$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_jpg_so = $(LIB_PREFIX)BltPictureJpg$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_png_so = $(LIB_PREFIX)BltPicturePng$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_tif_so = $(LIB_PREFIX)BltPictureTif$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_xbm_so = $(LIB_PREFIX)BltPictureXbm$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_xpm_so = $(LIB_PREFIX)BltPictureXpm$(version)$(DBG)$(SO_SUFFIX)
-lib_blt_pict_photo_so = $(LIB_PREFIX)BltPicturePhoto$(version)$(DBG)$(SO_SUFFIX)
-
-lib_blt_tree_xml_so = $(LIB_PREFIX)BltTreeXml$(version)$(DBG)$(SO_SUFFIX)
-
-blt_libs_so = \
-	$(lib_blt_lite_so) \
-	$(lib_blt_so) \
-	$(blt_pkg_libs_so)
-
-blt_pkg_libs_so = \
-	$(lib_blt_dt_csv_so) \
-	$(lib_blt_dt_mysql_so) \
-	$(lib_blt_dt_tree_so) \
-	$(lib_blt_dt_vec_so) \
-	$(lib_blt_dt_xml_so) \
-	$(lib_blt_pict_gif_so) \
-	$(lib_blt_pict_jpg_so) \
-	$(lib_blt_pict_photo_so) \
-	$(lib_blt_pict_png_so) \
-	$(lib_blt_pict_tif_so) \
-	$(lib_blt_pict_xbm_so) \
-	$(lib_blt_pict_xpm_so) \
-	$(lib_blt_tree_xml_so)
-
-all: build_demo
-
-build_demo: $(blt_libs_so) $(bltsh) $(bltwish) 
-
-$(bltwish): $(lib_blt_so) 
-	$(RM) $(bltwish)
-	$(CC) $(MAIN_CC_OPTS) $(LDFLAGS) -o $(bltwish) $(srcdir)/bltUnixMain.c \
-		$(lib_blt_so) $(BLT_LIBS) 
-
-$(bltsh): $(lib_blt_lite_so)
-	$(RM) $(bltsh)
-	$(CC) $(MAIN_CC_OPTS) $(LDFLAGS) -DTCL_ONLY -o $(bltsh) \
-		$(srcdir)/bltUnixMain.c $(lib_blt_lite_so) \
-		$(BLT_LITE_LIBS) 
-
-build_lib: $(blt_libs_so)
-
-$(lib_blt_so): $(BLT_OBJS) $(srcdir)/bltInit.c
-	$(CC) -c $(CC_OPTS) -DBLT_LIBRARY=\"$(pkgdir)\" \
-		$(srcdir)/bltInit.c
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltInit.o $(BLT_OBJS) $(BLT_LIBS) \
-		$(TK_STUB_SPEC) $(TCL_STUB_SPEC)
-
-$(lib_blt_lite_so): $(BLT_LITE_OBJS) $(srcdir)/bltInit.c
-	$(CC) -c $(CC_OPTS) -DTCL_ONLY -DBLT_LIBRARY=\"$(pkgdir)\" \
-		$(srcdir)/bltInit.c
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltInit.o $(BLT_LITE_OBJS) \
-		$(BLT_LITE_LIBS) $(TCL_STUB_SPEC)
-
-$(lib_blt_dt_mysql_so): bltDtMysql.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtMysql.o $(MYSQL_LIB_SPEC)
-
-$(lib_blt_dt_xml_so): bltDtXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtXml.o $(EXPAT_LIB_SPEC)
-
-$(lib_blt_dt_csv_so): bltDtCsv.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtCsv.o 
-
-$(lib_blt_dt_vec_so): bltDtVec.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtVec.o 
-
-$(lib_blt_dt_tree_so): bltDtTree.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltDtTree.o 
-
-$(lib_blt_pict_gif_so): bltPictGif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictGif.o 
-
-$(lib_blt_pict_jpg_so): bltPictJpg.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictJpg.o $(JPG_LIB_SPEC)
-
-$(lib_blt_pict_png_so): bltPictPng.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictPng.o $(PNG_LIB_SPEC)
-
-$(lib_blt_pict_tif_so): bltPictTif.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictTif.o $(TIF_LIB_SPEC)
-
-$(lib_blt_pict_xbm_so): bltPictXbm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictXbm.o 
-
-$(lib_blt_pict_xpm_so): bltPictXpm.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictXpm.o $(X11_LIB_SPEC) $(XPM_LIB_SPEC)
-
-$(lib_blt_pict_photo_so): bltPictPhoto.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltPictPhoto.o 
-
-$(lib_blt_tree_xml_so): bltTreeXml.o
-	$(RM) $@
-	$(SO_LD) $(SO_LD_FLAGS) -o $@ bltTreeXml.o $(EXPAT_LIB_SPEC)
-
-install: mkdirs install-libs install-demo
-
-install-demo: $(bltwish) $(bltsh)
-	$(INSTALL) -m 0755 bltwish$(version) $(INSTALL_ROOT)$(bindir)
-	$(INSTALL) -m 0755 bltsh$(version) $(INSTALL_ROOT)$(bindir)
-
-install-libs: $(lib_blt_so) $(lib_blt_lite_so) $(blt_pkg_libs_so)
-	$(INSTALL) -m 0755 $(lib_blt_so) $(INSTALL_ROOT)$(libdir)
-	$(INSTALL) -m 0755 $(lib_blt_lite_so) $(INSTALL_ROOT)$(libdir)
-	@for i in $(blt_pkg_libs_so) ; do \
-	  echo $(RM) $(INSTALL_ROOT)$(libdir)/$$i ; \
-	  $(RM) $(INSTALL_ROOT)$(libdir)/$$i ; \
-	  echo $(INSTALL) -m 0755 $$i $(INSTALL_ROOT)$(pkgdir) ; \
-	  $(INSTALL) -m 0755 $$i $(INSTALL_ROOT)$(pkgdir) ; \
-        done
-
-mkdirs:
-	@for i in $(instdirs) ; do \
-          if test -d $(INSTALL_ROOT)$$i ; then \
-	    : ;\
-	  else \
-	    echo " mkdir $(INSTALL_ROOT)$$i" ; \
-            mkdir $(INSTALL_ROOT)$$i ; \
-	  fi ; \
-        done
-clean:
-	$(RM) $(BLT_OBJS) bltInit.o $(lib_blt_so) $(lib_blt_lite_so) \
-		$(bltsh) $(bltwish) *pure* .pure*
-
-distclean: clean
-	$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*  Makefile TAGS
-
-# ------------------------------------------------------------------------
-# 	in lieu of viewpath-ing...
-#
-bltAlloc.o: 	$(srcdir)/bltAlloc.c
-	$(CC) -c $(CC_OPTS) $?
-bltArrayObj.o: 	$(srcdir)/bltArrayObj.c
-	$(CC) -c $(CC_OPTS) $?
-bltBase64.o: 	$(srcdir)/bltBase64.c
-	$(CC) -c $(CC_OPTS) $?
-bltBeep.o: 	$(srcdir)/bltBeep.c 
-	$(CC) -c $(CC_OPTS) $?
-bltBgexec.o: 	$(srcdir)/bltBgexec.c
-	$(CC) -c $(CC_OPTS) $?
-bltBind.o: 	$(srcdir)/bltBind.c
-	$(CC) -c $(CC_OPTS) $?
-bltBitmap.o: 	$(srcdir)/bltBitmap.c
-	$(CC) -c $(CC_OPTS) $?
-bltBusy.o: 	$(srcdir)/bltBusy.c
-	$(CC) -c $(CC_OPTS) $?
-bltCanvEps.o: 	$(srcdir)/bltCanvEps.c
-	$(CC) -c $(CC_OPTS) $?
-bltChain.o: 	$(srcdir)/bltChain.c
-	$(CC) -c $(CC_OPTS) $?
-bltComboBtn.o: $(srcdir)/bltComboBtn.c
-	$(CC) -c $(CC_OPTS) $?
-bltComboEntry.o: $(srcdir)/bltComboEntry.c
-	$(CC) -c $(CC_OPTS) $?
-bltComboMenu.o: $(srcdir)/bltComboMenu.c
-	$(CC) -c $(CC_OPTS) $?
-bltComboTree.o: $(srcdir)/bltComboTree.c
-	$(CC) -c $(CC_OPTS) $?
-bltConfig.o: 	$(srcdir)/bltConfig.c       
-	$(CC) -c $(CC_OPTS) $?
-bltContainer.o: $(srcdir)/bltContainer.c
-	$(CC) -c $(CC_OPTS) $?
-bltCrc32.o: 	$(srcdir)/bltCrc32.c
-	$(CC) -c $(CC_OPTS) $?
-bltCsv.o: 	$(srcdir)/bltCsv.c
-	$(CC) -c $(CC_OPTS) $?
-bltCutbuffer.o: $(srcdir)/bltCutbuffer.c
-	$(CC) -c $(CC_OPTS) $?
-bltDebug.o: $(srcdir)/bltDebug.c
-	$(CC) -c $(CC_OPTS) $?
-bltDragdrop.o: $(srcdir)/bltDragdrop.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrAxis.o:	$(srcdir)/bltGrAxis.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrBar.o:	$(srcdir)/bltGrBar.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrElem.o:	$(srcdir)/bltGrElem.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrHairs.o:	$(srcdir)/bltGrHairs.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrLegd.o: 	$(srcdir)/bltGrLegd.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrLine.o:	$(srcdir)/bltGrLine.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrMisc.o: 	$(srcdir)/bltGrMisc.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrPen.o: 	$(srcdir)/bltGrPen.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrPs.o: 	$(srcdir)/bltGrPs.c
-	$(CC) -c $(CC_OPTS) $?
-bltGrMarker.o: 	$(srcdir)/bltGrMarker.c
-	$(CC) -c $(CC_OPTS) $?
-bltGraph.o:	$(srcdir)/bltGraph.c
-	$(CC) -c $(CC_OPTS) $?
-bltHash.o: 	$(srcdir)/bltHash.c
-	$(CC) -c $(CC_OPTS) $?
-bltHtext.o: 	$(srcdir)/bltHtext.c
-	$(CC) -c $(CC_OPTS) $?
-bltImage.o: 	$(srcdir)/bltImage.c 
-	$(CC) -c $(CC_OPTS) $(srcdir)/bltImage.c
-bltList.o: 	$(srcdir)/bltList.c
-	$(CC) -c $(CC_OPTS) $?
-bltNsUtil.o: 	$(srcdir)/bltNsUtil.c
-	$(CC) -c $(CC_OPTS) $?
-bltOldConfig.o: $(srcdir)/bltOldConfig.c       
-	$(CC) -c $(CC_OPTS) $?
-bltPicture.o: 	$(srcdir)/bltPicture.c
-	$(CC) -c $(CC_OPTS) $(srcdir)/bltPicture.c
-bltPictCmd.o: 	$(srcdir)/bltPictCmd.c       
-	$(CC) -c $(CC_OPTS) $?
-bltPictDraw.o: $(srcdir)/bltPictDraw.c $(srcdir)/bltPaintDraw.c
-	$(CC) -c $(CC_OPTS) $(FT_INC_SPEC) $<
-bltPictJpg.o: $(srcdir)/bltPictJpg.c       
-	$(CC) -c $(CC_OPTS) $(JPG_INC_SPEC) $?
-bltPictTif.o: $(srcdir)/bltPictTif.c       
-	$(CC) -c $(CC_OPTS) $(TIF_INC_SPEC) $?
-bltPictPng.o: $(srcdir)/bltPictPng.c       
-	$(CC) -c $(CC_OPTS) $(PNG_INC_SPEC) $?
-bltPictXpm.o: $(srcdir)/bltPictXpm.c       
-	$(CC) -c $(CC_OPTS) $(XPM_INC_SPEC) $?
-bltPictXbm.o: $(srcdir)/bltPictXbm.c       
-	$(CC) -c $(CC_OPTS) $?
-bltPictGif.o: $(srcdir)/bltPictGif.c       
-	$(CC) -c $(CC_OPTS) $?
-bltPictPhoto.o: $(srcdir)/bltPictPhoto.c       
-	$(CC) -c $(CC_OPTS) $?
-bltPictMmx.o: $(srcdir)/bltPictMmx.c
-	$(CC) -c $(CC_OPTS) $(srcdir)/bltPictMmx.c
-bltPainter.o: 	$(srcdir)/bltPainter.c
-	$(CC) -c $(CC_OPTS) $(srcdir)/bltPainter.c
-bltParse.o: 	$(srcdir)/bltParse.c
-	$(CC) -c $(CC_OPTS) $?
-bltPool.o: 	$(srcdir)/bltPool.c
-	$(CC) -c $(CC_OPTS) $?
-bltPs.o: 	$(srcdir)/bltPs.c
-	$(CC) -c $(CC_OPTS) $?
-bltSink.o: 	$(srcdir)/bltSink.c
-	$(CC) -c $(CC_OPTS) $?
-bltSpline.o: 	$(srcdir)/bltSpline.c
-	$(CC) -c $(CC_OPTS) $?
-bltSwitch.o: 	$(srcdir)/bltSwitch.c
-	$(CC) -c $(CC_OPTS) $?
-bltTable.o: 	$(srcdir)/bltTable.c
-	$(CC) -c $(CC_OPTS) $?
-bltTabset.o: 	$(srcdir)/bltTabset.c
-	$(CC) -c $(CC_OPTS) $?
-bltTabnotebook.o: $(srcdir)/bltTabnotebook.c
-	$(CC) -c $(CC_OPTS) $?
-bltTed.o: 	$(srcdir)/bltTed.c
-	$(CC) -c $(CC_OPTS) $?
-bltText.o: 	$(srcdir)/bltText.c
-	$(CC) -c $(CC_OPTS) $?
-bltTile.o: 	$(srcdir)/bltTile.c
-	$(CC) -c $(CC_OPTS) $?
-bltTree.o: 	$(srcdir)/bltTree.c
-	$(CC) -c $(CC_OPTS) $?
-bltTreeCmd.o: 	$(srcdir)/bltTreeCmd.c
-	$(CC) -c $(CC_OPTS) $?
-bltTreeXml.o: 	$(srcdir)/bltTreeXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-bltTreeView.o: 	$(srcdir)/bltTreeView.c
-	$(CC) -c $(CC_OPTS) $?
-bltTvCmd.o: $(srcdir)/bltTvCmd.c
-	$(CC) -c $(CC_OPTS) $?
-bltTvCol.o: $(srcdir)/bltTvCol.c
-	$(CC) -c $(CC_OPTS) $?
-bltTvEdit.o: $(srcdir)/bltTvEdit.c
-	$(CC) -c $(CC_OPTS) $?
-bltTvStyle.o: $(srcdir)/bltTvStyle.c
-	$(CC) -c $(CC_OPTS) $?
-bltDataTable.o: $(srcdir)/bltDataTable.c
-	$(CC) -c $(CC_OPTS) $?
-bltDtCmd.o: $(srcdir)/bltDtCmd.c
-	$(CC) -c $(CC_OPTS) $?
-bltDtCsv.o: $(srcdir)/bltDtCsv.c
-	$(CC) -c $(CC_OPTS) $?
-bltDtMysql.o: $(srcdir)/bltDtMysql.c
-	$(CC) -c $(CC_OPTS) $(MYSQL_INC_SPEC) $?
-bltDtTree.o: $(srcdir)/bltDtTree.c
-	$(CC) -c $(CC_OPTS) $?
-bltDtVec.o: $(srcdir)/bltDtVec.c
-	$(CC) -c $(CC_OPTS) $?
-bltDtXml.o: $(srcdir)/bltDtXml.c
-	$(CC) -c $(CC_OPTS) $(EXPAT_INC_SPEC) $?
-bltUnixBitmap.o: $(srcdir)/bltUnixBitmap.c       
-	$(CC) -c $(CC_OPTS) $?
-bltUnixDnd.o: $(srcdir)/bltUnixDnd.c
-	$(CC) -c $(CC_OPTS) $?
-bltUnixFont.o: $(srcdir)/bltUnixFont.c
-	$(CC) -c $(CC_OPTS) $(FT_INC_SPEC) $?
-bltUnixPainter.o: $(srcdir)/bltUnixPainter.c       
-	$(CC) -c $(CC_OPTS) $?
-bltUnixPipe.o: 	$(srcdir)/bltUnixPipe.c
-	$(CC) -c $(CC_OPTS) $?
-bltUnixWindow.o: $(srcdir)/bltUnixWindow.c       
-	$(CC) -c $(CC_OPTS) $?
-bltUtil.o: 	$(srcdir)/bltUtil.c
-	$(CC) -c $(CC_OPTS) $?
-bltVector.o: 	$(srcdir)/bltVector.c
-	$(CC) -c $(CC_OPTS) $?
-bltVecCmd.o: $(srcdir)/bltVecCmd.c
-	$(CC) -c $(CC_OPTS) $?
-bltVecMath.o: 	$(srcdir)/bltVecMath.c
-	$(CC) -c $(CC_OPTS) $?
-bltWatch.o:	$(srcdir)/bltWatch.c
-	$(CC) -c $(CC_OPTS) $?
-bltWindow.o: 	$(srcdir)/bltWindow.c       
-	$(CC) -c $(CC_OPTS) $?
-bltWinop.o:     $(srcdir)/bltWinop.c
-	$(CC) -c $(CC_OPTS) $?
-tkButton.o: 	$(srcdir)/tkButton.c
-	$(CC) -c $(CC_OPTS) $?
-tkFrame.o: 	$(srcdir)/tkFrame.c
-	$(CC) -c $(CC_OPTS) $?
-tkMenubutton.o: $(srcdir)/tkMenubutton.c
-	$(CC) -c $(CC_OPTS) $?
-bltScrollbar.o: $(srcdir)/bltScrollbar.c
-	$(CC) -c $(CC_OPTS) $?
-bltBgStyle.o: $(srcdir)/bltBgStyle.c
-	$(CC) -c $(CC_OPTS) $?
diff --git a/blt3.0/src/tclIntDecls.h b/blt3.0/src/tclIntDecls.h
deleted file mode 100644
index ff1a3d8..0000000
--- a/blt3.0/src/tclIntDecls.h
+++ /dev/null
@@ -1,401 +0,0 @@
-
-/*
- * tclIntDecls.h --
- *
- * This file contains the declarations for all unsupported functions
- * that are exported by the TCL library.  These interfaces are not
- * guaranteed to remain the same between versions.  Use at your own
- * risk.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from TclIntDecls.h of the TCL library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#ifndef _TCL_INT_DECLS_H
-#define _TCL_INT_DECLS_H
-
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script.  Any modifications to the function declarations below should be made
- * in the generic/tclInt.decls script.
- */
-
-typedef struct _Tcl_ResolvedVarInfo Tcl_ResolvedVarInfo;
-
-typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, const char *name,
-	int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr);
-
-typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name, 
-	Tcl_Namespace *context, int flags, Tcl_Var *rPtr);
-
-typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp, const char *name, 
-	Tcl_Namespace *context, int flags, Tcl_Command *rPtr);
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-/* 36 */
-extern int		TclGetLong(Tcl_Interp * interp, char *str, 
-				   long *longPtr);
-/* 69 */
-extern char *		TclpAlloc(unsigned int size);
-/* 74 */
-extern void		TclpFree(char * ptr);
-/* 81 */
-extern char *		TclpRealloc(char * ptr, unsigned int size);
-/* 113 */
-extern Tcl_Namespace *	Tcl_CreateNamespace(Tcl_Interp * interp, 
-				char * name, ClientData clientData, 
-				Tcl_NamespaceDeleteProc * deleteProc);
-/* 114 */
-extern void		Tcl_DeleteNamespace(Tcl_Namespace * nsPtr);
-/* 115 */
-extern int		Tcl_Export(Tcl_Interp * interp, 
-				Tcl_Namespace * nsPtr, char * pattern, 
-				int resetListFirst);
-/* 116 */
-extern Tcl_Command	Tcl_FindCommand(Tcl_Interp * interp, 
-				char * name, Tcl_Namespace * contextNsPtr, 
-				int flags);
-/* 117 */
-extern Tcl_Namespace *	Tcl_FindNamespace(Tcl_Interp * interp, 
-				char * name, Tcl_Namespace * contextNsPtr, 
-				int flags);
-/* 120 */
-extern Tcl_Var		Tcl_FindNamespaceVar(Tcl_Interp * interp, char * name, 
-				Tcl_Namespace * contextNsPtr, int flags);
-/* 124 */
-extern Tcl_Namespace *	Tcl_GetCurrentNamespace(Tcl_Interp * interp);
-/* 125 */
-extern Tcl_Namespace *	Tcl_GetGlobalNamespace(Tcl_Interp * interp);
-/* 128 */
-extern void		Tcl_PopCallFrame(Tcl_Interp* interp);
-/* 129 */
-extern int		Tcl_PushCallFrame(Tcl_Interp* interp, 
-				Tcl_CallFrame * framePtr, 
-				Tcl_Namespace * nsPtr, int isProcCallFrame);
-
-/* 131 */
-extern void		Tcl_SetNamespaceResolvers(
-				Tcl_Namespace *nsPtr, 
-				Tcl_ResolveCmdProc *cmdProc, 
-				Tcl_ResolveVarProc *varProc, 
-				Tcl_ResolveCompiledVarProc *compiledVarProc);
-
-typedef struct TclIntStubs {
-    int magic;
-    struct TclIntStubHooks *hooks;
-
-    void *tclAccess;		/* 0 */
-    void *tclAccessDeleteProc;	/* 1 */
-    void *tclAccessInsertProc;	/* 2 */
-    void *tclAllocateFreeObjects; /* 3 */
-    void *reserved4;
-    void *tclCleanupChildren;	/* 5 */
-    void *tclCleanupCommand;	/* 6 */
-    void *tclCopyAndCollapse;	/* 7 */
-    void *tclCopyChannel;	/* 8 */
-    void *tclCreatePipeline;	/* 9 */
-    void *tclCreateProc;	/* 10 */
-    void *tclDeleteCompiledLocalVars; /* 11 */
-    void *tclDeleteVars;	/* 12 */
-    void *tclDoGlob;		/* 13 */
-    void *tclDumpMemoryInfo;	/* 14 */
-    void *reserved15;
-    void *tclExprFloatError;	/* 16 */
-    void *tclFileAttrsCmd;	/* 17 */
-    void *tclFileCopyCmd;	/* 18 */
-    void *tclFileDeleteCmd;	/* 19 */
-    void *tclFileMakeDirsCmd;	/* 20 */
-    void *tclFileRenameCmd;	/* 21 */
-    void *tclFindElement;	/* 22 */
-    void *tclFindProc;		/* 23 */
-    void *tclFormatInt;		/* 24 */
-    void *tclFreePackageInfo;	/* 25 */
-    void *reserved26;
-    void *tclGetDate;		/* 27 */
-    void *tclpGetDefaultStdChannel; /* 28 */
-    void *tclGetElementOfIndexedArray; /* 29 */
-    void *reserved30;
-    void *tclGetExtension;	/* 31 */
-    void *tclGetFrame;		/* 32 */
-    void *tclGetInterpProc;	/* 33 */
-    void *tclGetIntForIndex;	/* 34 */
-    void *tclGetIndexedScalar;  /* 35 */
-
-    int (*tclGetLong)(Tcl_Interp *interp, char *string, long *longPtr);	/* 36 */
-
-    void *tclGetLoadedPackages; /* 37 */
-    void *tclGetNamespaceForQualName;  /* 38 */
-    void *tclGetObjInterpProc;	/* 39 */
-    void *tclGetOpenMode;	/* 40 */
-    void *tclGetOriginalCommand; /* 41 */
-    void *tclpGetUserHome;	/* 42 */
-    void *tclGlobalInvoke;	/* 43 */
-    void *tclGuessPackageName;  /* 44 */
-    void *tclHideUnsafeCommands; /* 45 */
-    void *tclInExit;		/* 46 */
-    void *tclIncrElementOfIndexedArray; /* 47 */
-    void *tclIncrIndexedScalar; /* 48 */
-    void *tclIncrVar2;		/* 49 */
-    void *tclInitCompiledLocals;  /* 50 */
-    void *tclInterpInit;	/* 51 */
-    void *tclInvoke;		/* 52 */
-    void *tclInvokeObjectCommand; /* 53 */
-    void *tclInvokeStringCommand; /* 54 */
-    void *tclIsProc;		/* 55 */
-    void *reserved56;
-    void *reserved57;
-    void *tclLookupVar;		/* 58 */
-    void *tclpMatchFiles;	/* 59 */
-    void *tclNeedSpace;		/* 60 */
-    void *tclNewProcBodyObj;	/* 61 */
-    void *tclObjCommandComplete; /* 62 */
-    void *tclObjInterpProc;	/* 63 */
-    void *tclObjInvoke;		/* 64 */
-    void *tclObjInvokeGlobal;	/* 65 */
-    void *tclOpenFileChannelDeleteProc;  /* 66 */
-    void *tclOpenFileChannelInsertProc;  /* 67 */
-    void *tclpAccess;		/* 68 */
-    void *tclpAlloc;		/* 69 */
-    void *tclpCopyFile;		/* 70 */
-    void *tclpCopyDirectory;	/* 71 */
-    void *tclpCreateDirectory;	/* 72 */
-    void *tclpDeleteFile;	/* 73 */
-
-    void (*tclpFree)(char * ptr); /* 74 */
-
-    void *tclpGetClicks;	/* 75 */
-    void *tclpGetSeconds;	/* 76 */
-    void *tclpGetTime;		/* 77 */
-    void *tclpGetTimeZone;	/* 78 */
-    void *tclpListVolumes;	/* 79 */
-    void *tclpOpenFileChannel;  /* 80 */
-
-    char *(*tclpRealloc)(char * ptr, unsigned int size); /* 81 */
-
-    void *tclpRemoveDirectory;	/* 82 */
-    void *tclpRenameFile;	/* 83 */
-    void *reserved84;
-    void *reserved85;
-    void *reserved86;
-    void *reserved87;
-    void *tclPrecTraceProc;	/* 88 */
-    void *tclPreventAliasLoop;  /* 89 */
-    void *reserved90;
-    void *tclProcCleanupProc;	/* 91 */
-    void *tclProcCompileProc;	/* 92 */
-    void *tclProcDeleteProc;	/* 93 */
-    void *tclProcInterpProc;	/* 94 */
-    void *tclpStat;		/* 95 */
-    void *tclRenameCommand;	/* 96 */
-    void *tclResetShadowedCmdRefs; /* 97 */
-    void *tclServiceIdle;	/* 98 */
-    void *tclSetElementOfIndexedArray; /* 99 */
-    void *tclSetIndexedScalar;	/* 100 */
-    void *tclSetPreInitScript;	/* 101 */
-    void *tclSetupEnv;		/* 102 */
-    void *tclSockGetPort;	/* 103 */
-    void *tclSockMinimumBuffers; /* 104 */
-    void *tclStat;		/* 105 */
-    void *tclStatDeleteProc;	/* 106 */
-    void *tclStatInsertProc;	/* 107 */
-    void *tclTeardownNamespace; /* 108 */
-    void *tclUpdateReturnInfo;	/* 109 */
-    void *reserved110;
-    void *tcl_AddInterpResolvers; /* 111 */
-    void *tcl_AppendExportList; /* 112 */
-
-    Tcl_Namespace * (*tcl_CreateNamespace)(Tcl_Interp *interp, char *name, 
-	ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc); /* 113 */
-
-    void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */
-
-    int (*tcl_Export) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, char *pattern,
-	int resetListFirst);	/* 115 */
-
-    Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, char *name, 
-	Tcl_Namespace *contextNsPtr, int flags); /* 116 */
-
-    Tcl_Namespace *(*tcl_FindNamespace)(Tcl_Interp *interp, char *name, 
-	Tcl_Namespace *contextNsPtr, int flags); /* 117 */
-
-    void *tcl_GetInterpResolvers; /* 118 */
-    void *tcl_GetNamespaceResolvers; /* 119 */
-
-    Tcl_Var (*tcl_FindNamespaceVar)(Tcl_Interp *interp, char *name, 
-	Tcl_Namespace *contextNsPtr, int flags); /* 120 */
-
-    void *tcl_ForgetImport;	/* 121 */
-    void *tcl_GetCommandFromObj; /* 122 */
-    void *tcl_GetCommandFullName; /* 123 */
-
-    Tcl_Namespace *(*tcl_GetCurrentNamespace)(Tcl_Interp *interp); /* 124 */
-
-    Tcl_Namespace *(*tcl_GetGlobalNamespace)(Tcl_Interp *interp); /* 125 */
-
-    void *tcl_GetVariableFullName; /* 126 */
-    void *tcl_Import;		/* 127 */
-
-    void (*tcl_PopCallFrame)(Tcl_Interp *interp); /* 128 */
-
-    int (*tcl_PushCallFrame)(Tcl_Interp *interp, Tcl_CallFrame *framePtr, 
-	Tcl_Namespace *nsPtr, int isProcCallFrame); /* 129 */
-
-    void *tcl_RemoveInterpResolvers; /* 130 */
-
-    void (*tcl_SetNamespaceResolvers) (Tcl_Namespace *nsPtr, 
-	Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, 
-	Tcl_ResolveCompiledVarProc *compiledVarProc);  /* 131 */
-
-    void *tclpHasSockets;	/* 132 */
-    void *tclpGetDate;		/* 133 */
-    void *tclpStrftime;		/* 134 */
-    void *tclpCheckStackSpace;  /* 135 */
-    void *reserved136;
-    void *tclpChdir;		/* 137 */
-    void *tclGetEnv;		/* 138 */
-    void *tclpLoadFile;		/* 139 */
-    void *tclLooksLikeInt;	/* 140 */
-    void *tclpGetCwd;		/* 141 */
-    void *tclSetByteCodeFromAny; /* 142 */
-    void *tclAddLiteralObj;	/* 143 */
-    void *tclHideLiteral;	/* 144 */
-    void *tclGetAuxDataType;	/* 145 */
-    void *tclHandleCreate;	/* 146 */
-    void *tclHandleFree;	/* 147 */
-    void *tclHandlePreserve;	/* 148 */
-    void *tclHandleRelease;	/* 149 */
-    void *tclRegAbout;		/* 150 */
-    void *tclRegExpRangeUniChar; /* 151 */
-    void *tclSetLibraryPath;	/* 152 */
-    void *tclGetLibraryPath;	/* 153 */
-    void *reserved154;
-    void *reserved155;
-    void *tclRegError;		/* 156 */
-    void *tclVarTraceExists;	/* 157 */
-    void *tclSetStartupScriptFileName; /* 158 */
-    void *tclGetStartupScriptFileName; /* 159 */
-    void *tclpMatchFilesTypes;  /* 160 */
-    void *tclChannelTransform;	/* 161 */
-    void *tclChannelEventScriptInvoker; /* 162 */
-    void *tclGetInstructionTable; /* 163 */
-    void *tclExpandCodeArray;	/* 164 */
-} TclIntStubs;
-
-extern TclIntStubs *tclIntStubsPtr;
-
-#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-#ifndef TclGetLong
-#define TclGetLong \
-	(tclIntStubsPtr->tclGetLong) /* 36 */
-#endif
-
-#ifndef TclpAlloc
-#define TclpAlloc \
-	(tclIntStubsPtr->tclpAlloc) /* 69 */
-#endif
-
-#ifndef TclpFree
-#define TclpFree \
-	(tclIntStubsPtr->tclpFree) /* 74 */
-#endif
-
-#ifndef TclpRealloc
-#define TclpRealloc \
-	(tclIntStubsPtr->tclpRealloc) /* 81 */
-#endif
-
-#ifndef Tcl_CreateNamespace
-#define Tcl_CreateNamespace \
-	(tclIntStubsPtr->tcl_CreateNamespace) /* 113 */
-#endif
-
-#ifndef Tcl_DeleteNamespace
-#define Tcl_DeleteNamespace \
-	(tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */
-#endif
-
-#ifndef Tcl_Export
-#define Tcl_Export \
-	(tclIntStubsPtr->tcl_Export) /* 115 */
-#endif
-
-#ifndef Tcl_FindCommand
-#define Tcl_FindCommand \
-	(tclIntStubsPtr->tcl_FindCommand) /* 116 */
-#endif
-
-#ifndef Tcl_FindNamespace
-#define Tcl_FindNamespace \
-	(tclIntStubsPtr->tcl_FindNamespace) /* 117 */
-#endif
-
-#ifndef Tcl_FindNamespaceVar
-#define Tcl_FindNamespaceVar \
-	(tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */
-#endif
-
-#ifndef Tcl_GetCurrentNamespace
-#define Tcl_GetCurrentNamespace \
-	(tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */
-#endif
-
-#ifndef Tcl_GetGlobalNamespace
-#define Tcl_GetGlobalNamespace \
-	(tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */
-#endif
-
-#ifndef Tcl_PopCallFrame
-#define Tcl_PopCallFrame \
-	(tclIntStubsPtr->tcl_PopCallFrame) /* 128 */
-#endif
-
-#ifndef Tcl_PushCallFrame
-#define Tcl_PushCallFrame \
-	(tclIntStubsPtr->tcl_PushCallFrame) /* 129 */
-#endif
-
-#ifndef Tcl_SetNamespaceResolvers
-#define Tcl_SetNamespaceResolvers \
-	(tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */
-#endif
-
-#endif 
-#endif /* _TCL_INT_DECLS_H */
diff --git a/blt3.0/src/tclIntPlatDecls.h b/blt3.0/src/tclIntPlatDecls.h
deleted file mode 100644
index 81535dd..0000000
--- a/blt3.0/src/tclIntPlatDecls.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * tclIntPlatDecls.h --
- *
- * This file contains the declarations for all platform dependent
- * unsupported functions that are exported by the TCL library.  These
- * * interfaces are not guaranteed to remain the same between
- * versions.  Use at your own risk.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from tclIntPlatDecls.h of the TCL library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.  All rights
- *	reserved.
- *
- */
-
-#ifndef _TCLINTPLATDECLS
-#define _TCLINTPLATDECLS
-
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script.  Any modifications to the function declarations below should be made
- * in the generic/tclInt.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-#ifdef __WIN32__
-/* 0 */
-extern void TclWinConvertError(DWORD errCode);
-
-/* 4 */
-extern HINSTANCE TclWinGetTclInstance(void);
-#endif /* __WIN32__ */
-
-typedef struct TclIntPlatStubs {
-    int magic;
-    struct TclIntPlatStubHooks *hooks;
-
-#ifdef WIN32
-    void (*tclWinConvertError)(DWORD errCode); /* 0 */
-#else
-    void *hook0;
-#endif
-    void *hook1;
-    void *hook2;
-    void *hook3;
-#ifdef WIN32
-    HINSTANCE (*tclWinGetTclInstance)(void); /* 4 */
-#else
-    void *hook4;
-#endif
-    void *hook5;
-    void *hook6;
-    void *hook7;
-    void *hook8;
-    void *hook9;
-    void *hook10;
-    void *hook11;
-    void *hook12;
-    void *hook13;
-    void *hook14;
-    void *hook15;
-    void *hook16;
-    void *hook17;
-    void *hook18;
-    void *hook19;
-    void *hook20;
-    void *hook21;
-    void *hook22;
-    void *hook23;
-    void *hook24;
-    void *hook25;
-
-} TclIntPlatStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TclIntPlatStubs *tclIntPlatStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifdef __WIN32__
-#ifndef TclWinConvertError
-#define TclWinConvertError \
-	(tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
-#endif
-#ifndef TclWinGetTclInstance
-#define TclWinGetTclInstance \
-	(tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
-#endif
-#endif /* __WIN32__ */
-
-#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _TCLINTPLATDECLS */
diff --git a/blt3.0/src/tclInterp.h b/blt3.0/src/tclInterp.h
deleted file mode 100644
index af222e9..0000000
--- a/blt3.0/src/tclInterp.h
+++ /dev/null
@@ -1,272 +0,0 @@
-
-/*
- * tclInterp.h --
- *
- * Excerpts from tclInt.h.  Used to examine interpreter internals.
- * Needed by the former parsing (bltParse.c) functions.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file contains excerpts from tclInt.h of the TCL library distribution.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 1994-1998 Sun Microsystems, Inc.
- *
- */
-
-/*
- *---------------------------------------------------------------------------
- * Data structures related to command parsing. These are used in
- * tclParse.c and its clients.
- *---------------------------------------------------------------------------
- */
-
-/*
- * The following data structure is used by various parsing procedures to hold
- * information about where to store the results of parsing (e.g. the
- * substituted contents of a quoted argument, or the result of a nested
- * command).  At any given time, the space available for output is fixed, but
- * a procedure may be called to expand the space available if the current
- * space runs out.
- */
-typedef struct _ParseValue ParseValue;
-
-struct _ParseValue {
-    char *buffer;
-    char *next;
-    char *end;
-    void (*expandProc)(ParseValue *pvPtr, int needed);
-    ClientData clientData;
-};
-
-
-/*
- * The definitions for the LiteralTable and LiteralEntry structures. Each
- * interpreter contains a LiteralTable. It is used to reduce the storage
- * needed for all the TCL objects that hold the literals of scripts compiled
- * by the interpreter. A literal's object is shared by all the ByteCodes that
- * refer to the literal. Each distinct literal has one LiteralEntry entry in
- * the LiteralTable. A literal table is a specialized hash table that is
- * indexed by the literal's string representation, which may contain null
- * characters.
- *
- * Note that we reduce the space needed for literals by sharing literal
- * objects both within a ByteCode (each ByteCode contains a local
- * LiteralTable) and across all an interpreter's ByteCodes (with the
- * interpreter's global LiteralTable).
- */
-
-typedef struct _LiteralEntry LiteralEntry;
-
-struct _LiteralEntry {
-    LiteralEntry *nextPtr;
-    Tcl_Obj *objPtr;
-    int refCount;
-};
-
-typedef struct {
-    LiteralEntry **buckets;
-    LiteralEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
-    int numBuckets;
-    int numEntries;
-    int rebuildSize;
-    int mask;
-} LiteralTable;
-
-/*
- * The following structure defines for each TCL interpreter various
- * statistics-related information about the bytecode compiler and
- * interpreter's operation in that interpreter.
- */
-
-#ifdef TCL_COMPILE_STATS
-typedef struct {
-    long numExecutions;
-    long numCompilations;
-    long numByteCodesFreed;
-    long instructionCount[256];
-    double totalSrcBytes;
-    double totalByteCodeBytes;
-    double currentSrcBytes;
-    double currentByteCodeBytes;
-    long srcCount[32];
-    long byteCodeCount[32];
-    long lifetimeCount[32];
-    double currentInstBytes;
-    double currentLitBytes;
-    double currentExceptBytes;
-    double currentAuxBytes;
-    double currentCmdMapBytes;
-    long numLiteralsCreated;
-    double totalLitStringBytes;
-    double currentLitStringBytes;
-    long literalCount[32];
-} ByteCodeStats;
-
-#endif /* TCL_COMPILE_STATS */
-
-
-/*
- *---------------------------------------------------------------------------
- *
- *   Data structures and procedures related to TclHandles, which are a very
- *   lightweight method of preserving enough information to determine if an
- *   arbitrary malloc'd block has been deleted.
- *   
- *---------------------------------------------------------------------------
- */
-
-typedef VOID **TclHandle;
-
-/*
- *   The following fills in dummy types for structure refered to internally by
- *   the TCL interpreter.  Since we don't need the actual size of the
- *   structures (they are only pointer references), we'll simply provide empty
- *   opaque types.
- *
- */
-
-typedef struct ActiveCommandTrace ActiveCommandTrace;
-typedef struct ActiveInterpTrace ActiveInterpTrace;
-typedef struct _ActiveVarTrace ActiveVarTrace;
-typedef struct _CallFrame CallFrame;
-typedef struct _ExecEnv ExecEnv;
-typedef struct _Namespace Namespace;
-typedef struct _Proc Proc;
-typedef struct ResolverScheme ResolverScheme;
-typedef struct _TclRegexp TclRegexp;
-typedef struct _Trace Trace;
-
-/*
- *---------------------------------------------------------------------------
- *
- *  This structure defines an interpreter, which is a collection of commands
- *  plus other state information related to interpreting commands, such as
- *  variable storage. Primary responsibility for this data structure is in
- *  tclBasic.c, but almost every TCL source file uses something in here.
- *  
- *---------------------------------------------------------------------------
- */
-
-
-typedef struct Interp {
-    char *result;
-    Tcl_FreeProc *freeProc;
-    int errorLine;
-
-#if (_TCL_VERSION >= _VERSION(8,1,0))
-    struct TclStubs *stubTable;
-    TclHandle handle;
-#else 
-    Tcl_Obj *objResultPtr;
-#endif /* >= 8.1.0 */
-
-    Namespace *globalNsPtr;
-
-#if (_TCL_VERSION >= _VERSION(8,1,0))
-    Tcl_HashTable *hiddenCmdTablePtr;
-    ClientData interpInfo;
-#endif /* >= 8.1.0 */
-
-    Tcl_HashTable mathFuncTable;
-    int numLevels;
-    int maxNestingDepth;
-    CallFrame *framePtr;
-    CallFrame *varFramePtr;
-    ActiveVarTrace *activeTracePtr;
-    int returnCode;
-    char *errorInfo;
-    char *errorCode;
-    char *appendResult;
-    int appendAvl;
-    int appendUsed;
-
-#if (_TCL_VERSION < _VERSION(8,1,0))
-    char *patterns[5];
-    int patLengths[5];
-    regexp *regexps[5];
-#endif /* < 8.1.0 */
-
-    Tcl_HashTable packageTable;
-    char *packageUnknown;
-    int cmdCount;
-    int evalFlags;
-    int termOffset;
-
-#if (_TCL_VERSION >= _VERSION(8,1,0))
-    LiteralTable literalTable;
-#endif
-
-    int compileEpoch;
-    Proc *compiledProcPtr;
-    ResolverScheme *resolverPtr;
-
-#if (_TCL_VERSION >= _VERSION(8,4,0))
-    Tcl_Obj *scriptFile;
-#else 
-    char *scriptFile;
-#endif /* >= 8.4.0 */
-
-    int flags;
-    long randSeed;
-    Trace *tracePtr;
-    Tcl_HashTable *assocData;
-    struct ExecEnv *execEnvPtr;
-    Tcl_Obj *emptyObjPtr;
-    char resultSpace[TCL_RESULT_SIZE+1];
-
-#if (_TCL_VERSION >= _VERSION(8,1,0))
-    Tcl_Obj *objResultPtr;
-    Tcl_ThreadId threadId;
-#endif /* >= 8.1.0 */
-
-#if (_TCL_VERSION >= _VERSION(8,4,0))
-    ActiveCommandTrace *activeCmdTracePtr;
-    ActiveInterpTrace *activeInterpTracePtr;
-    int tracesForbiddingInline;
-#endif /* >= 8.4.0 */
-
-#if (_TCL_VERSION >= _VERSION(8,4,1))
-#ifdef TCL_COMPILE_STATS
-    ByteCodeStats stats;	
-#endif /* TCL_COMPILE_STATS */	  
-#endif /* >= 8.4.1 */
-
-} Interp;
-
-/*
- * EvalFlag bits for Interp structures:
- *
- * TCL_BRACKET_TERM	1 means that the current script is terminated by
- *			a close bracket rather than the end of the string.
- * TCL_ALLOW_EXCEPTIONS	1 means it's OK for the script to terminate with
- *			a code other than TCL_OK or TCL_ERROR;  0 means
- *			codes other than these should be turned into errors.
- */
-
-#define TCL_BRACKET_TERM	  1
-#define TCL_ALLOW_EXCEPTIONS	  4
diff --git a/blt3.0/src/tkButton.c b/blt3.0/src/tkButton.c
deleted file mode 100644
index a9edc07..0000000
--- a/blt3.0/src/tkButton.c
+++ /dev/null
@@ -1,2149 +0,0 @@
-
-/*
- * tkButton.c --
- *
- *	This module implements a collection of button-like
- *	widgets for the Tk toolkit.  The widgets implemented
- *	include labels, buttons, check buttons, and radio
- *	buttons.
- *
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * SCCS: @(#) tkButton.c 1.128 96/03/01 17:34:49
- */
-
-#include "bltInt.h"
-#ifndef NO_TKBUTTON
-#include "bltBgStyle.h"
-
-#include "bltFont.h"
-#include "bltText.h"
-#include "bltPicture.h"
-#include "bltPainter.h"
-
-#define GAP 4
-
-/*
- * The definitions below provide symbolic names for the default colors.
- * NORMAL_BG -		Normal background color.
- * ACTIVE_BG -		Background color when widget is active.
- * SELECT_BG -		Background color for selected text.
- * TROUGH -		Background color for troughs in scales and scrollbars.
- * INDICATOR -		Color for indicator when button is selected.
- * DISABLED -		Foreground color when widget is disabled.
- */
-
-#define NORMAL_BG	"#d9d9d9"
-#define ACTIVE_BG	"#ececec"
-#define SELECT_BG	"#c3c3c3"
-#define TROUGH		"#c3c3c3"
-#define INDICATOR	"#b03060"
-#define DISABLED	"#a3a3a3"
-
-#define DEF_BUTTON_ANCHOR		"center"
-#define DEF_BUTTON_ACTIVE_BACKGROUND	STD_ACTIVE_BACKGROUND
-#define DEF_BUTTON_ACTIVE_BG_MONO	RGB_BLACK
-#define DEF_BUTTON_ACTIVE_FOREGROUND	RGB_BLACK
-#define DEF_BUTTON_ACTIVE_FG_MONO	RGB_WHITE
-#define DEF_BUTTON_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_BUTTON_BG_MONO		RGB_WHITE
-#define DEF_BUTTON_BITMAP		""
-#define DEF_BUTTON_BORDERWIDTH		"2"
-#define DEF_BUTTON_CURSOR		""
-#define DEF_BUTTON_COMMAND		""
-#define DEF_BUTTON_COMPOUND		"none"
-#define DEF_BUTTON_DEFAULT              "disabled"
-#define DEF_BUTTON_DISABLED_FOREGROUND	STD_DISABLED_FOREGROUND
-#define DEF_BUTTON_DISABLED_FG_MONO	""
-#define DEF_BUTTON_FG			RGB_BLACK
-#define DEF_BUTTON_FONT			STD_FONT
-#define DEF_BUTTON_HEIGHT		"0"
-#define DEF_BUTTON_HIGHLIGHT_BG		STD_NORMAL_BACKGROUND
-#define DEF_BUTTON_HIGHLIGHT		RGB_BLACK
-#define DEF_LABEL_HIGHLIGHT_WIDTH	"0"
-#define DEF_BUTTON_HIGHLIGHT_WIDTH	"2"
-#define DEF_BUTTON_IMAGE		(char *) NULL
-#define DEF_BUTTON_INDICATOR		"1"
-#define DEF_BUTTON_JUSTIFY		"center"
-#define DEF_BUTTON_OFF_VALUE		"0"
-#define DEF_BUTTON_ON_VALUE		"1"
-#define DEF_BUTTON_OVER_RELIEF		"raised"
-#define DEF_BUTTON_PADX			"3m"
-#define DEF_LABCHKRAD_PADX		"1"
-#define DEF_BUTTON_PADY			"1m"
-#define DEF_LABCHKRAD_PADY		"1"
-#define DEF_BUTTON_RELIEF		"raised"
-#define DEF_BUTTON_REPEAT_DELAY		"0"
-#define DEF_LABCHKRAD_RELIEF		"flat"
-#define DEF_LABCHKRAD_OVER_RELIEF	"flat"
-#define DEF_BUTTON_SELECT_COLOR		STD_INDICATOR_COLOR
-#define DEF_BUTTON_SELECT_MONO		RGB_BLACK
-#define DEF_BUTTON_SELECT_IMAGE		(char *)NULL
-#define DEF_BUTTON_STATE		"normal"
-#define DEF_LABEL_TAKE_FOCUS		"0"
-#define DEF_BUTTON_TAKE_FOCUS		(char *) NULL
-#define DEF_BUTTON_TEXT			""
-#define DEF_BUTTON_TEXT_VARIABLE	""
-#define DEF_BUTTON_UNDERLINE		"-1"
-#define DEF_BUTTON_VALUE		""
-#define DEF_BUTTON_WIDTH		"0"
-#define DEF_BUTTON_WRAP_LENGTH		"0"
-#define DEF_RADIOBUTTON_VARIABLE	"selectedButton"
-#define DEF_CHECKBUTTON_VARIABLE	""
-
-/*
- * A data structure of the following type is kept for each
- * widget managed by this file:
- */
-
-typedef struct {
-    Tk_Window tkwin;		/* Window that embodies the button.  NULL
-				 * means that the window has been destroyed. */
-    Display *display;		/* Display containing widget.  Needed to
-				 * free up resources after tkwin is gone. */
-    Tcl_Interp *interp;		/* Interpreter associated with button. */
-    Tcl_Command widgetCmd;	/* Token for button's widget command. */
-    int type;			/* Type of widget:  restricts operations
-				 * that may be performed on widget.  See
-				 * below for possible values. */
-
-    /*
-     * Information about what's in the button.
-     */
-
-    const char *text;		/* Text to display in button (malloc'ed)
-				 * or NULL. */
-    int numChars;		/* # of characters in text. */
-    int underline;		/* Index of character to underline.  < 0 means
-				 * don't underline anything. */
-    const char *textVarName;	/* Name of variable (malloc'ed) or NULL.
-				 * If non-NULL, button displays the contents
-				 * of this variable. */
-    Pixmap bitmap;		/* Bitmap to display or None.  If not None
-				 * then text and textVar are ignored. */
-    const char *imageString;	/* Name of image to display (malloc'ed), or
-				 * NULL.  If non-NULL, bitmap, text, and
-				 * textVarName are ignored. */
-    Tk_Image image;		/* Image to display in window, or NULL if
-				 * none. */
-    const char *selectImageString; /* Name of image to display when selected
-				 * (malloc'ed), or NULL. */
-    Tk_Image selectImage;	/* Image to display in window when selected,
-				 * or NULL if none.  Ignored if image is
-				 * NULL. */
-
-    /*
-     * Information used when displaying widget:
-     */
-
-    int state;			/* State of button for display purposes:
-				 * normal, active, or disabled. */
-    Blt_Background normalBg;	/* Structure used to draw 3-D
-				 * border and background when window
-				 * isn't active.  NULL means no such
-				 * border exists. */
-    Blt_Background activeBg;	/* Structure used to draw 3-D
-				 * border and background when window
-				 * is active.  NULL means no such
-				 * border exists. */
-    int borderWidth;		/* Width of border. */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED, etc. */
-    int overRelief;		/* Value of -overrelief option: specifies a 3-d
-				 * effect for the border, such as
-				 * TK_RELIEF_RAISED, to be used when the mouse
-				 * is over the button. */
-    int highlightWidth;		/* Width in pixels of highlight to draw
-				 * around widget when it has the focus.
-				 * <= 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
-    /* Color for drawing traversal highlight
-				 * area when highlight is off. */
-    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
-    int inset;			/* Total width of all borders, including
-				 * traversal highlight and 3-D border.
-				 * Indicates how much interior stuff must
-				 * be offset from outside edges to leave
-				 * room for borders. */
-    Blt_Font font;		/* Information about text font, or NULL. */
-    XColor *normalFg;		/* Foreground color in normal mode. */
-    XColor *activeFg;		/* Foreground color in active mode.  NULL
-				 * means use normalFg instead. */
-    XColor *disabledFg;		/* Foreground color when disabled.  NULL
-				 * means use normalFg with a 50% stipple
-				 * instead. */
-    GC normalTextGC;		/* GC for drawing text in normal mode.  Also
-				 * used to copy from off-screen pixmap onto
-				 * screen. */
-    GC activeTextGC;		/* GC for drawing text in active mode (NULL
-				 * means use normalTextGC). */
-    Pixmap gray;		/* Pixmap for displaying disabled text if
-				 * disabledFg is NULL. */
-    GC disabledGC;		/* Used to produce disabled effect.  If
-				 * disabledFg isn't NULL, this GC is used to
-				 * draw button text or icon.  Otherwise
-				 * text or icon is drawn with normalGC and
-				 * this GC is used to stipple background
-				 * across it.  For labels this is None. */
-    GC copyGC;			/* Used for copying information from an
-				 * off-screen pixmap to the screen. */
-    const char *widthString;	/* Value of -width option.  Malloc'ed. */
-    const char *heightString;	/* Value of -height option.  Malloc'ed. */
-    int width, height;		/* If > 0, these specify dimensions to request
-				 * for window, in characters for text and in
-				 * pixels for bitmaps.  In this case the actual
-				 * size of the text string or bitmap is
-				 * ignored in computing desired window size. */
-    int wrapLength;		/* Line length (in pixels) at which to wrap
-				 * onto next line.  <= 0 means don't wrap
-				 * except at newlines. */
-    int xPad, yPad;		/* Extra space around text (pixels to leave
-				 * on each side).  Ignored for bitmaps and
-				 * images. */
-    Tk_Anchor anchor;		/* Where text/bitmap should be displayed
-				 * inside button region. */
-    Tk_Justify justify;		/* Justification to use for multi-line text. */
-    int indicatorOn;		/* True means draw indicator, false means
-				 * don't draw it. */
-    Blt_Background selectBg;	/* For drawing indicator background, or perhaps
-				 * widget background, when selected. */
-    int textWidth;		/* Width needed to display text as requested,
-				 * in pixels. */
-    int textHeight;		/* Height needed to display text as requested,
-				 * in pixels. */
-    Tk_TextLayout textLayout;	/* Saved text layout information. */
-    int indicatorSpace;		/* Horizontal space (in pixels) allocated for
-				 * display of indicator. */
-    int indicatorDiameter;	/* Diameter of indicator, in pixels. */
-
-    int defaultState;		/* Used in 8.0 (not here)  */
-
-    /*
-     * For check and radio buttons, the fields below are used
-     * to manage the variable indicating the button's state.
-     */
-
-    const char *selVarName;	/* Name of variable used to control selected
-				 * state of button.  Malloc'ed (if
-				 * not NULL). */
-    const char *onValue;	/* Value to store in variable when
-				 * this button is selected.  Malloc'ed (if
-				 * not NULL). */
-    const char *offValue;	/* Value to store in variable when this
-				 * button isn't selected.  Malloc'ed
-				 * (if not NULL).  Valid only for check
-				 * buttons. */
-
-    /*
-     * Miscellaneous information:
-     */
-
-    Tk_Cursor cursor;		/* Current cursor for window, or None. */
-    const char *takeFocus;	/* Value of -takefocus option;  not used in
-				 * the C code, but used by keyboard traversal
-				 * scripts.  Malloc'ed, but may be NULL. */
-    const char *command;	/* Command to execute when button is
-				 * invoked; valid for buttons only.
-				 * If not NULL, it's malloc-ed. */
-    const char *compound;      /* Value of -compound option; specifies whether
-				 * the button should show both an image and
-				 * text, and, if so, how. */
-    int repeatDelay;		/* Value of -repeatdelay option; specifies
-				 * the number of ms after which the button will
-				 * start to auto-repeat its command. */
-    int repeatInterval;		/* Value of -repeatinterval option; specifies
-				 * the number of ms between auto-repeat
-				 * invocataions of the button command. */
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-    Blt_Picture selectedPicture;
-    Blt_Picture normalPicture;
-    Blt_Picture disabledPicture;
-} Button;
-
-/*
- * Possible "type" values for buttons.  These are the kinds of
- * widgets supported by this file.  The ordering of the type
- * numbers is significant:  greater means more features and is
- * used in the code.
- */
-
-#define TYPE_LABEL		0
-#define TYPE_BUTTON		1
-#define TYPE_PUSH_BUTTON	2
-#define TYPE_CHECK_BUTTON	3
-#define TYPE_RADIO_BUTTON	4
-
-/*
- * Class names for buttons, indexed by one of the type values above.
- */
-
-static const char *classNames[] = {
-    "Label", 
-    "Button", 
-    "Checkbutton", 
-    /*"Pushbutton",  */
-    "Checkbutton", 
-    "Radiobutton", 
-};
-
-/*
- * Flag bits for buttons:
- *
- * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler
- *				has already been queued to redraw
- *				this window.
- * SELECTED:			Non-zero means this button is selected,
- *				so special highlight should be drawn.
- * GOT_FOCUS:			Non-zero means this button currently
- *				has the input focus.
- */
-
-#define REDRAW_PENDING		1
-#define SELECTED		2
-#define GOT_FOCUS		4
-
-/*
- * Mask values used to selectively enable entries in the
- * configuration specs:
- */
-
-#define LABEL_MASK		BLT_CONFIG_USER_BIT
-#define BUTTON_MASK		BLT_CONFIG_USER_BIT << 1
-#define PUSH_BUTTON_MASK	BLT_CONFIG_USER_BIT << 2
-#define CHECK_BUTTON_MASK	BLT_CONFIG_USER_BIT << 3
-#define RADIO_BUTTON_MASK	BLT_CONFIG_USER_BIT << 4
-#define ALL_MASK		(LABEL_MASK | BUTTON_MASK \
-	| CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK)
-
-#define ALL_BUTTONS		(BUTTON_MASK | CHECK_BUTTON_MASK | \
-				 RADIO_BUTTON_MASK | PUSH_BUTTON_MASK)
-
-static int configFlags[] = {
-    LABEL_MASK, 
-    BUTTON_MASK,
-    PUSH_BUTTON_MASK,
-    CHECK_BUTTON_MASK, 
-    RADIO_BUTTON_MASK
-};
-
-/*
- * Information used for parsing configuration specs:
- */
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", "Foreground",
-	DEF_BUTTON_ACTIVE_BACKGROUND, Blt_Offset(Button, activeBg),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK |
-        BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", "Foreground",
-	DEF_BUTTON_ACTIVE_BG_MONO, Blt_Offset(Button, activeBg),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK
-	| BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", "Background",
-	DEF_BUTTON_ACTIVE_FOREGROUND, Blt_Offset(Button, activeFg),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK
-	| BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", "Background",
-	DEF_BUTTON_ACTIVE_FG_MONO, Blt_Offset(Button, activeFg),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK
-	| BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
-	DEF_BUTTON_ANCHOR, Blt_Offset(Button, anchor), ALL_MASK},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BUTTON_BACKGROUND, Blt_Offset(Button, normalBg),
-	ALL_MASK | BLT_CONFIG_COLOR_ONLY},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_BUTTON_BG_MONO, Blt_Offset(Button, normalBg),
-	ALL_MASK | BLT_CONFIG_MONO_ONLY},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, ALL_MASK},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, ALL_MASK},
-    {BLT_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap",
-	DEF_BUTTON_BITMAP, Blt_Offset(Button, bitmap),
-	ALL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_BUTTON_BORDERWIDTH, Blt_Offset(Button, borderWidth), ALL_MASK},
-    {BLT_CONFIG_STRING, "-command", "command", "Command",
-	DEF_BUTTON_COMMAND, Blt_Offset(Button, command),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK |
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-compound", "compound", "Compound",
-	DEF_BUTTON_COMPOUND, Blt_Offset(Button, compound), 
-	ALL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_BUTTON_CURSOR, Blt_Offset(Button, cursor),
-	ALL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STATE, "-default", "default", "Default",
-	DEF_BUTTON_DEFAULT, Blt_Offset(Button, defaultState), BUTTON_MASK},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_BUTTON_DISABLED_FOREGROUND,
-	Blt_Offset(Button, disabledFg), BUTTON_MASK | CHECK_BUTTON_MASK | 
-	RADIO_BUTTON_MASK | PUSH_BUTTON_MASK | BLT_CONFIG_COLOR_ONLY | 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_BUTTON_DISABLED_FG_MONO,
-	Blt_Offset(Button, disabledFg), BUTTON_MASK | CHECK_BUTTON_MASK
-	| RADIO_BUTTON_MASK | BLT_CONFIG_MONO_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL,
-	(char *)NULL, 0, ALL_MASK},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, 
-	Blt_Offset(Button, font), ALL_MASK},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_BUTTON_FG, Blt_Offset(Button, normalFg), ALL_MASK},
-    {BLT_CONFIG_STRING, "-height", "height", "Height",
-	DEF_BUTTON_HEIGHT, Blt_Offset(Button, heightString), ALL_MASK},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG,
-	Blt_Offset(Button, highlightBgColorPtr), ALL_MASK},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_BUTTON_HIGHLIGHT, Blt_Offset(Button, highlightColorPtr),
-	ALL_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness",
-	DEF_LABEL_HIGHLIGHT_WIDTH, Blt_Offset(Button, highlightWidth),
-	LABEL_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness",
-	DEF_BUTTON_HIGHLIGHT_WIDTH, Blt_Offset(Button, highlightWidth),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_STRING, "-image", "image", "Image",
-	DEF_BUTTON_IMAGE, Blt_Offset(Button, imageString),
-	ALL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
-	DEF_BUTTON_INDICATOR, Blt_Offset(Button, indicatorOn),
-	CHECK_BUTTON_MASK | RADIO_BUTTON_MASK},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify",
-	DEF_BUTTON_JUSTIFY, Blt_Offset(Button, justify), ALL_MASK},
-    {BLT_CONFIG_STRING, "-offvalue", "offValue", "Value",
-	DEF_BUTTON_OFF_VALUE, Blt_Offset(Button, offValue),
-	CHECK_BUTTON_MASK | PUSH_BUTTON_MASK },
-    {BLT_CONFIG_STRING, "-onvalue", "onValue", "Value",
-	DEF_BUTTON_ON_VALUE, Blt_Offset(Button, onValue),
-	CHECK_BUTTON_MASK | PUSH_BUTTON_MASK },
-    {BLT_CONFIG_RELIEF, "-overrelief", "overRelief", "OverRelief",
-	DEF_BUTTON_OVER_RELIEF, Blt_Offset(Button, overRelief),
-	BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_RELIEF, "-overrelief", "overRelief", "OverRelief",
-	DEF_LABCHKRAD_OVER_RELIEF, Blt_Offset(Button, overRelief),
-	LABEL_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-padx", "padX", "Pad",
-	DEF_BUTTON_PADX, Blt_Offset(Button, xPad), BUTTON_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-padx", "padX", "Pad",
-	DEF_LABCHKRAD_PADX, Blt_Offset(Button, xPad),
-	LABEL_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-pady", "padY", "Pad",
-	DEF_BUTTON_PADY, Blt_Offset(Button, yPad), BUTTON_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-pady", "padY", "Pad",
-	DEF_LABCHKRAD_PADY, Blt_Offset(Button, yPad),
-	LABEL_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_BUTTON_RELIEF, Blt_Offset(Button, relief), 
-	BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_LABCHKRAD_RELIEF, Blt_Offset(Button, relief),
-	LABEL_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK},
-    {BLT_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
-	DEF_BUTTON_REPEAT_DELAY, Blt_Offset(Button, repeatDelay),
- 	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_BACKGROUND, "-selectcolor", "selectColor", "Background",
-	DEF_BUTTON_SELECT_COLOR, Blt_Offset(Button, selectBg),
-	CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK | 
-	BLT_CONFIG_COLOR_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-selectcolor", "selectColor", "Background",
-	DEF_BUTTON_SELECT_MONO, Blt_Offset(Button, selectBg),
-	CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK | 
-        BLT_CONFIG_MONO_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-selectimage", "selectImage", "SelectImage",
-	DEF_BUTTON_SELECT_IMAGE, Blt_Offset(Button, selectImageString),
-	CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK | 
-        BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STATE, "-state", "state", "State",
-	DEF_BUTTON_STATE, Blt_Offset(Button, state),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_LABEL_TAKE_FOCUS, Blt_Offset(Button, takeFocus),
-	LABEL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_BUTTON_TAKE_FOCUS, Blt_Offset(Button, takeFocus),
-	BUTTON_MASK | CHECK_BUTTON_MASK | RADIO_BUTTON_MASK | PUSH_BUTTON_MASK |
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-text", "text", "Text",
-	DEF_BUTTON_TEXT, Blt_Offset(Button, text), ALL_MASK},
-    {BLT_CONFIG_STRING, "-textvariable", "textVariable", "Variable",
-	DEF_BUTTON_TEXT_VARIABLE, Blt_Offset(Button, textVarName),
-	ALL_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_INT, "-underline", "underline", "Underline",
-	DEF_BUTTON_UNDERLINE, Blt_Offset(Button, underline), ALL_MASK},
-    {BLT_CONFIG_STRING, "-value", "value", "Value",
-	DEF_BUTTON_VALUE, Blt_Offset(Button, onValue),
-	RADIO_BUTTON_MASK},
-    {BLT_CONFIG_STRING, "-variable", "variable", "Variable",
-	DEF_RADIOBUTTON_VARIABLE, Blt_Offset(Button, selVarName),
-	RADIO_BUTTON_MASK},
-    {BLT_CONFIG_STRING, "-variable", "variable", "Variable",
-	DEF_CHECKBUTTON_VARIABLE, Blt_Offset(Button, selVarName),
-	CHECK_BUTTON_MASK | PUSH_BUTTON_MASK | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-width", "width", "Width",
-	DEF_BUTTON_WIDTH, Blt_Offset(Button, widthString), ALL_MASK},
-    {BLT_CONFIG_PIXELS_NNEG, "-wraplength", "wrapLength", "WrapLength",
-	DEF_BUTTON_WRAP_LENGTH, Blt_Offset(Button, wrapLength), ALL_MASK},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * String to print out in error messages, identifying options for
- * widget commands for different types of labels or buttons:
- */
-
-static const char *optionStrings[] =
-{
-    "cget or configure",
-    "cget, configure, flash, or invoke",
-    "cget, configure, deselect, flash, invoke, select, or toggle",
-    "cget, configure, deselect, flash, invoke, or select"
-};
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-static void ButtonCmdDeletedProc _ANSI_ARGS_((ClientData clientData));
-static int ButtonCreate _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, int type));
-static void ButtonEventProc _ANSI_ARGS_((ClientData clientData,
-	XEvent *eventPtr));
-static void ButtonImageProc _ANSI_ARGS_((ClientData clientData,
-	int x, int y, int width, int height, int imgWidth, int imgHeight));
-static void ButtonSelectImageProc _ANSI_ARGS_((
-	ClientData clientData, int x, int y, int width,
-	int height, int imgWidth, int imgHeight));
-static char *ButtonTextVarProc _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, const char *name1, const char *name2,
-	int flags));
-static char *ButtonVarProc _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, const char *name1, const char *name2,
-	int flags));
-static int ButtonWidgetCmd _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, int objc, Tcl_Obj *const *objv));
-static void ComputeButtonGeometry _ANSI_ARGS_((Button *butPtr));
-static int ConfigureButton _ANSI_ARGS_((Tcl_Interp *interp,
-	Button *butPtr, int objc, Tcl_Obj *const *objv,
-	int flags));
-static void DestroyButton _ANSI_ARGS_((Button *butPtr));
-static void DisplayButton _ANSI_ARGS_((ClientData clientData));
-static int InvokeButton _ANSI_ARGS_((Button *butPtr));
-
-static Tcl_ObjCmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;
-
-#ifndef USE_TK_STUBS
-BLT_EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script));
-
-BLT_EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, 
-	int xPad, int yPad, int innerWidth, int innerHeight, int *xPtr, 
-	int *yPtr));
-#endif
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCmd, CheckbuttonCmd, LabelCmd, RadiobuttonCmd, PushbuttonCmd --
- *
- *	These procedures are invoked to process the "button", "label",
- *	"radiobutton", "checkbutton", and "pushbutton" TCL commands.  
- *	See the user documentation for details on what they do.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.  These procedures are just wrappers;
- *	they call ButtonCreate to do all of the real work.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ButtonCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	  Tcl_Obj *const *objv)
-{
-    return ButtonCreate(clientData, interp, objc, objv, TYPE_BUTTON);
-}
-
-static int
-CheckbuttonCmd(ClientData clientData, Tcl_Interp *interp, int objc,
-	       Tcl_Obj *const *objv)
-{
-    return ButtonCreate(clientData, interp, objc, objv, TYPE_CHECK_BUTTON);
-}
-
-static int
-LabelCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	 Tcl_Obj *const *objv)
-{
-    return ButtonCreate(clientData, interp, objc, objv, TYPE_LABEL);
-}
-
-static int
-RadiobuttonCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	       Tcl_Obj *const *objv)
-{
-    return ButtonCreate(clientData, interp, objc, objv, TYPE_RADIO_BUTTON);
-}
-
-static int
-PushbuttonCmd(ClientData clientData, Tcl_Interp *interp, int objc, 
-	      Tcl_Obj *const *objv)
-{
-    return ButtonCreate(clientData, interp, objc, objv, TYPE_PUSH_BUTTON);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCreate --
- *
- *	This procedure does all the real work of implementing the
- *	"button", "label", "radiobutton", and "checkbutton" Tcl
- *	commands.  See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static int
-ButtonCreate(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv,	/* Argument strings. */
-    int type)			/* Type of button to create: TYPE_LABEL,
-				 * TYPE_BUTTON, TYPE_CHECK_BUTTON, or
-				 * TYPE_RADIO_BUTTON. */
-{
-    Button *butPtr;
-    Tk_Window tkwin;
-    char *path;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " pathName ?options?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Create the new window.
-     */
-
-    path = Tcl_GetString(objv[1]);
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), path, 
-	(char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    /*
-     * Initialize the data structure for the button.
-     */
-
-    butPtr = Blt_AssertCalloc(1, sizeof(Button));
-    butPtr->tkwin = tkwin;
-    butPtr->display = Tk_Display(tkwin);
-    butPtr->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(butPtr->tkwin),
-	ButtonWidgetCmd, butPtr, ButtonCmdDeletedProc);
-
-    butPtr->interp = interp;
-    butPtr->type = type;
-    butPtr->underline = -1;
-    butPtr->state = STATE_NORMAL;
-    butPtr->relief = TK_RELIEF_FLAT;
-    butPtr->anchor = TK_ANCHOR_CENTER;
-    butPtr->justify = TK_JUSTIFY_CENTER;
-    butPtr->defaultState = STATE_DISABLED;
-    butPtr->overRelief = TK_RELIEF_RAISED;
-
-    Tk_SetClass(tkwin, classNames[type]);
-    Tk_CreateEventHandler(butPtr->tkwin,
-	ExposureMask | StructureNotifyMask | FocusChangeMask,
-	ButtonEventProc, butPtr);
-    if (ConfigureButton(interp, butPtr, objc - 2, objv + 2,
-	    configFlags[type]) != TCL_OK) {
-	Tk_DestroyWindow(butPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(butPtr->tkwin), -1);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonWidgetCmd --
- *
- *	This procedure is invoked to process the TCL command
- *	that corresponds to a widget managed by this module.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ButtonWidgetCmd(
-    ClientData clientData,	/* Information about button widget. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    Button *butPtr = clientData;
-    char *string;
-    int c;
-    int length;
-    int result = TCL_OK;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " option ?arg arg ...?\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(butPtr);
-    string = Tcl_GetStringFromObj(objv[1], &length);
-    c = string[0];
-    if ((c == 'c') && (length >= 2) && (strncmp(string, "cget", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " cget option\"", (char *)NULL);
-	    goto error;
-	}
-	result = Blt_ConfigureValueFromObj(interp, butPtr->tkwin, configSpecs,
-	    (char *)butPtr, objv[2], configFlags[butPtr->type]);
-    } else if ((c == 'c') && (length >= 2) && 
-	       (strncmp(string, "configure", length) == 0)) {
-	if (objc == 2) {
-	    result = Blt_ConfigureInfoFromObj(interp, butPtr->tkwin, 
-		configSpecs, (char *)butPtr, (Tcl_Obj *)NULL, 
-		configFlags[butPtr->type]);
-	} else if (objc == 3) {
-	    result = Blt_ConfigureInfoFromObj(interp, butPtr->tkwin, 
-		configSpecs, (char *)butPtr, objv[2], 
-		configFlags[butPtr->type]);
-	} else {
-	    result = ConfigureButton(interp, butPtr, objc - 2, objv + 2,
-		configFlags[butPtr->type] | BLT_CONFIG_OBJV_ONLY);
-	}
-    } else if ((c == 'd') && (strncmp(string, "deselect", length) == 0)
-	&& (butPtr->type >= TYPE_PUSH_BUTTON)) {
-	if (objc > 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " deselect\"", (char *)NULL);
-	    goto error;
-	}
-	if ((butPtr->type == TYPE_CHECK_BUTTON) ||
-	    (butPtr->type == TYPE_PUSH_BUTTON)) {
-	    if (Tcl_SetVar(interp, butPtr->selVarName, butPtr->offValue,
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		result = TCL_ERROR;
-	    }
-	} else if (butPtr->flags & SELECTED) {
-	    if (Tcl_SetVar(interp, butPtr->selVarName, "",
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		result = TCL_ERROR;
-	    };
-	}
-    } else if ((c == 'f') && (strncmp(string, "flash", length) == 0)
-	&& (butPtr->type != TYPE_LABEL)) {
-	int i;
-
-	if (objc > 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " flash\"", (char *)NULL);
-	    goto error;
-	}
-	if (butPtr->state != STATE_DISABLED) {
-	    for (i = 0; i < 4; i++) {
-		butPtr->state = (butPtr->state == STATE_NORMAL)
-		    ? STATE_ACTIVE : STATE_NORMAL;
-		Blt_SetBackgroundFromBackground(butPtr->tkwin,
-		    (butPtr->state == STATE_ACTIVE) ? butPtr->activeBg
-		    : butPtr->normalBg);
-		DisplayButton(butPtr);
-
-		/*
-		 * Special note: must cancel any existing idle handler
-		 * for DisplayButton;  it's no longer needed, and DisplayButton
-		 * cleared the REDRAW_PENDING flag.
-		 */
-
-		Tcl_CancelIdleCall(DisplayButton, butPtr);
-#if !defined(WIN32) && !defined(MACOSX)
-		XFlush(butPtr->display);
-#endif
-		Tcl_Sleep(50);
-	    }
-	}
-    } else if ((c == 'i') && (strncmp(string, "invoke", length) == 0)
-	&& (butPtr->type > TYPE_LABEL)) {
-	if (objc > 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " invoke\"", (char *)NULL);
-	    goto error;
-	}
-	if (butPtr->state != STATE_DISABLED) {
-	    result = InvokeButton(butPtr);
-	}
-    } else if ((c == 's') && (strncmp(string, "select", length) == 0) && 
-	       (butPtr->type >= TYPE_PUSH_BUTTON)) {
-	if (objc > 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " select\"", (char *)NULL);
-	    goto error;
-	}
-	if (Tcl_SetVar(interp, butPtr->selVarName, butPtr->onValue,
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-	    result = TCL_ERROR;
-	}
-    } else if ((c == 't') && (strncmp(string, "toggle", length) == 0) && 
-	       (length >= 2) && (butPtr->type == TYPE_PUSH_BUTTON)) {
-	if (objc > 2) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " toggle\"", (char *)NULL);
-	    goto error;
-	}
-	if (butPtr->flags & SELECTED) {
-	    if (Tcl_SetVar(interp, butPtr->selVarName, butPtr->offValue,
-		    TCL_GLOBAL_ONLY) == NULL) {
-		result = TCL_ERROR;
-	    }
-	} else {
-	    if (Tcl_SetVar(interp, butPtr->selVarName, butPtr->onValue,
-		    TCL_GLOBAL_ONLY) == NULL) {
-		result = TCL_ERROR;
-	    }
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]), 
-		"\": must be ", optionStrings[butPtr->type], (char *)NULL);
-	goto error;
-    }
-    Tcl_Release(butPtr);
-    return result;
-
-  error:
-    Tcl_Release(butPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyButton --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release
- *	to clean up the internal structure of a button at a safe time
- *	(when no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DestroyButton(Button *butPtr)
-{
-    /*
-     * Free up all the stuff that requires special handling, then
-     * let Blt_FreeOptions handle all the standard option-related
-     * stuff.
-     */
-
-    if (butPtr->textVarName != NULL) {
-	Tcl_UntraceVar(butPtr->interp, butPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonTextVarProc, butPtr);
-    }
-    if (butPtr->image != NULL) {
-	Tk_FreeImage(butPtr->image);
-    }
-    if (butPtr->selectImage != NULL) {
-	Tk_FreeImage(butPtr->selectImage);
-    }
-    if (butPtr->normalTextGC != None) {
-	Tk_FreeGC(butPtr->display, butPtr->normalTextGC);
-    }
-    if (butPtr->activeTextGC != None) {
-	Tk_FreeGC(butPtr->display, butPtr->activeTextGC);
-    }
-    if (butPtr->gray != None) {
-	Tk_FreeBitmap(butPtr->display, butPtr->gray);
-    }
-    if (butPtr->disabledGC != None) {
-	Tk_FreeGC(butPtr->display, butPtr->disabledGC);
-    }
-    if (butPtr->copyGC != None) {
-	Tk_FreeGC(butPtr->display, butPtr->copyGC);
-    }
-    if (butPtr->selVarName != NULL) {
-	Tcl_UntraceVar(butPtr->interp, butPtr->selVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonVarProc, (ClientData)butPtr);
-    }
-    Tk_FreeTextLayout(butPtr->textLayout);
-    Blt_FreeOptions(configSpecs, (char *)butPtr, butPtr->display,
-	configFlags[butPtr->type]);
-    Tcl_EventuallyFree((ClientData)butPtr, TCL_DYNAMIC);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureButton --
- *
- *	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or
- *	reconfigure) a button widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for butPtr;  old resources get freed, if there
- *	were any.  The button is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ConfigureButton(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    Button *butPtr,		/* Information about widget;  may or may
-				 * not already have values for some fields. */
-    int objc,			/* Number of valid entries in objv. */
-    Tcl_Obj *const *objv,	/* Arguments. */
-    int flags)			/* Flags to pass to Blt_ConfigureWidget. */
-{
-    XGCValues gcValues;
-    GC newGC;
-    unsigned long mask;
-    Tk_Image image;
-
-    /*
-     * Eliminate any existing trace on variables monitored by the button.
-     */
-
-    if (butPtr->textVarName != NULL) {
-	Tcl_UntraceVar(interp, butPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonTextVarProc, (ClientData)butPtr);
-    }
-    if (butPtr->selVarName != NULL) {
-	Tcl_UntraceVar(interp, butPtr->selVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonVarProc, (ClientData)butPtr);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, butPtr->tkwin, configSpecs,
-	    objc, objv, (char *)butPtr, flags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * A few options need special processing, such as setting the
-     * background from a 3-D border, or filling in complicated
-     * defaults that couldn't be specified to Blt_ConfigureWidget.
-     */
-
-    if ((butPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(butPtr->tkwin)) {
-	Blt_SetBackgroundFromBackground(butPtr->tkwin, butPtr->activeBg);
-    } else {
-	Blt_SetBackgroundFromBackground(butPtr->tkwin, butPtr->normalBg);
-	if ((butPtr->state != STATE_NORMAL) && (butPtr->state != STATE_ACTIVE)
-	    && (butPtr->state != STATE_DISABLED)) {
-	    Tcl_AppendResult(interp, "bad state value \"", 
-		Blt_Itoa(butPtr->state), 
-		"\": must be normal, active, or disabled", (char *)NULL);
-	    butPtr->state = STATE_NORMAL;
-	    return TCL_ERROR;
-	}
-    }
-
-    if ((butPtr->defaultState != STATE_ACTIVE)
-	&& (butPtr->defaultState != STATE_DISABLED)
-	&& (butPtr->defaultState != STATE_NORMAL)) {
-	Tcl_AppendResult(interp, "bad -default value \"", butPtr->defaultState,
-	    "\": must be normal, active, or disabled", (char *)NULL);
-	butPtr->defaultState = STATE_DISABLED;
-	return TCL_ERROR;
-    }
-    if (butPtr->highlightWidth < 0) {
-	butPtr->highlightWidth = 0;
-    }
-    gcValues.font = Blt_FontId(butPtr->font);
-    gcValues.foreground = butPtr->normalFg->pixel;
-    gcValues.background = Blt_BackgroundBorderColor(butPtr->normalBg)->pixel;
-
-    /*
-     * Note: GraphicsExpose events are disabled in normalTextGC because it's
-     * used to copy stuff from an off-screen pixmap onto the screen (we know
-     * that there's no problem with obscured areas).
-     */
-
-    gcValues.graphics_exposures = False;
-    newGC = Tk_GetGC(butPtr->tkwin,
-	GCForeground | GCBackground | GCFont | GCGraphicsExposures,
-	&gcValues);
-    if (butPtr->normalTextGC != None) {
-	Tk_FreeGC(butPtr->display, butPtr->normalTextGC);
-    }
-    butPtr->normalTextGC = newGC;
-
-    if (butPtr->activeFg != NULL) {
-	gcValues.font = Blt_FontId(butPtr->font);
-	gcValues.foreground = butPtr->activeFg->pixel;
-	gcValues.background = Blt_BackgroundBorderColor(butPtr->activeBg)->pixel;
-	newGC = Tk_GetGC(butPtr->tkwin,
-	    GCForeground | GCBackground | GCFont, &gcValues);
-	if (butPtr->activeTextGC != None) {
-	    Tk_FreeGC(butPtr->display, butPtr->activeTextGC);
-	}
-	butPtr->activeTextGC = newGC;
-    }
-    if (butPtr->type != TYPE_LABEL) {
-	gcValues.font = Blt_FontId(butPtr->font);
-	gcValues.background = Blt_BackgroundBorderColor(butPtr->normalBg)->pixel;
-	if ((butPtr->disabledFg != NULL) && (butPtr->imageString == NULL)) {
-	    gcValues.foreground = butPtr->disabledFg->pixel;
-	    mask = GCForeground | GCBackground | GCFont;
-	} else {
-	    gcValues.foreground = gcValues.background;
-	    if (butPtr->gray == None) {
-		butPtr->gray = Tk_GetBitmap(interp, butPtr->tkwin,
-		    Tk_GetUid("gray50"));
-		if (butPtr->gray == None) {
-		    return TCL_ERROR;
-		}
-	    }
-	    gcValues.fill_style = FillStippled;
-	    gcValues.stipple = butPtr->gray;
-	    mask = GCForeground | GCFillStyle | GCStipple;
-	}
-	newGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues);
-	if (butPtr->disabledGC != None) {
-	    Tk_FreeGC(butPtr->display, butPtr->disabledGC);
-	}
-	butPtr->disabledGC = newGC;
-    }
-    if (butPtr->copyGC == None) {
-	butPtr->copyGC = Tk_GetGC(butPtr->tkwin, 0, &gcValues);
-    }
-    if (butPtr->xPad < 0) {
-	butPtr->xPad = 0;
-    }
-    if (butPtr->yPad < 0) {
-	butPtr->yPad = 0;
-    }
-    if (butPtr->type >= TYPE_PUSH_BUTTON) {
-	const char *value;
-
-	if (butPtr->selVarName == NULL) {
-	    butPtr->selVarName = Blt_AssertStrdup(Tk_Name(butPtr->tkwin));
-	}
-	/*
-	 * Select the button if the associated variable has the
-	 * appropriate value, initialize the variable if it doesn't
-	 * exist, then set a trace on the variable to monitor future
-	 * changes to its value.
-	 */
-
-	value = Tcl_GetVar(interp, butPtr->selVarName, TCL_GLOBAL_ONLY);
-	butPtr->flags &= ~SELECTED;
-	if (value != NULL) {
-	    if (strcmp(value, butPtr->onValue) == 0) {
-		butPtr->flags |= SELECTED;
-	    }
-	} else {
-	    const char *value;
-	    value = ((butPtr->type == TYPE_CHECK_BUTTON) || 
-		(butPtr->type == TYPE_PUSH_BUTTON)) ? butPtr->offValue : "";
-	    if (Tcl_SetVar(interp, butPtr->selVarName, value,
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		return TCL_ERROR;
-	    }
-	}
-	Tcl_TraceVar(interp, butPtr->selVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonVarProc, (ClientData)butPtr);
-    }
-    /*
-     * Get the images for the widget, if there are any.  Allocate the
-     * new images before freeing the old ones, so that the reference
-     * counts don't go to zero and cause image data to be discarded.
-     */
-
-    if (butPtr->imageString != NULL) {
-	image = Tk_GetImage(butPtr->interp, butPtr->tkwin,
-	    butPtr->imageString, ButtonImageProc, (ClientData)butPtr);
-	if (image == NULL) {
-	    return TCL_ERROR;
-	}
-    } else {
-	image = NULL;
-    }
-    if (butPtr->image != NULL) {
-	Tk_FreeImage(butPtr->image);
-    }
-    butPtr->image = image;
-    if (butPtr->selectImageString != NULL) {
-	image = Tk_GetImage(butPtr->interp, butPtr->tkwin,
-	    butPtr->selectImageString, ButtonSelectImageProc,
-	    (ClientData)butPtr);
-	if (image == NULL) {
-	    return TCL_ERROR;
-	}
-    } else {
-	image = NULL;
-    }
-    if (butPtr->selectImage != NULL) {
-	Tk_FreeImage(butPtr->selectImage);
-    }
-    butPtr->selectImage = image;
-
-    if ((butPtr->image == NULL) && (butPtr->bitmap == None)
-	&& (butPtr->textVarName != NULL)) {
-	/*
-	 * The button must display the value of a variable: set up a trace
-	 * on the variable's value, create the variable if it doesn't
-	 * exist, and fetch its current value.
-	 */
-
-	const char *value;
-
-	value = Tcl_GetVar(interp, butPtr->textVarName, TCL_GLOBAL_ONLY);
-	if (value == NULL) {
-	    if (Tcl_SetVar(interp, butPtr->textVarName, butPtr->text,
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		return TCL_ERROR;
-	    }
-	} else {
-	    if (butPtr->text != NULL) {
-		Blt_Free(butPtr->text);
-	    }
-	    butPtr->text = Blt_AssertStrdup(value);
-	}
-	Tcl_TraceVar(interp, butPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    ButtonTextVarProc, (ClientData)butPtr);
-    }
-    if ((butPtr->bitmap != None) || (butPtr->image != NULL)) {
-	if (Tk_GetPixels(interp, butPtr->tkwin, butPtr->widthString,
-		&butPtr->width) != TCL_OK) {
-	  widthError:
-	    Tcl_AddErrorInfo(interp, "\n    (processing -width option)");
-	    return TCL_ERROR;
-	}
-	if (Tk_GetPixels(interp, butPtr->tkwin, butPtr->heightString,
-		&butPtr->height) != TCL_OK) {
-	  heightError:
-	    Tcl_AddErrorInfo(interp, "\n    (processing -height option)");
-	    return TCL_ERROR;
-	}
-    } else {
-	if (Tcl_GetInt(interp, butPtr->widthString, &butPtr->width)
-	    != TCL_OK) {
-	    goto widthError;
-	}
-	if (Tcl_GetInt(interp, butPtr->heightString, &butPtr->height)
-	    != TCL_OK) {
-	    goto heightError;
-	}
-    }
-    ComputeButtonGeometry(butPtr);
-
-    /*
-     * Lastly, arrange for the button to be redisplayed.
-     */
-
-    if (Tk_IsMapped(butPtr->tkwin) && !(butPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	butPtr->flags |= REDRAW_PENDING;
-    }
-    return TCL_OK;
-}
-
-static void
-DrawCheckButton(Tk_Window tkwin, Drawable drawable, Button *butPtr, 
-		int x, int y) 
-{
-#ifdef notdef
-    Blt_Background bg;
-    GC fillGC, boxGC, checkGC;
-    int boxWidth, boxHeight;
-    int dim;
-    int xBox, yBox;
-
-    dim = butPtr->indicatorDiameter - 2 * butPtr->borderWidth;
-    dim |= 0x1;
-    boxWidth = boxHeight = dim;
-    xBox = butPtr->borderWidth + GAP;
-    yBox = (Tk_Height(tkwin) - boxHeight) / 2;
-
-    bg = butPtr->normalBg;
-    if (butPtr->state & STATE_DISABLED) {
-	fillGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_FLAT_GC);
-    } else {
-	fillGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_LIGHT_GC);
-    }
-    boxGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_DARK_GC);
-    checkGC = butPtr->normalTextGC;
-
-    XFillRectangle(butPtr->display, drawable, fillGC, xBox, yBox, 
-	boxWidth, boxHeight);
-    XDrawRectangle(butPtr->display, drawable, boxGC, xBox, yBox, 
-	boxWidth, boxHeight);
-
-    if (butPtr->flags & SELECTED) {
-	int ax, ay, bx, by, cx, cy;
-	int i;
-
-	ax = xBox + 2, ay = yBox + 2 + (boxHeight / 3);
-	bx = xBox + (boxWidth / 2) - 1;
-	by = yBox + boxHeight - 4;
-	cx = xBox + boxWidth;
-	cy = yBox;
-	for (i = 0; i < 3; i++) {
-	    XDrawLine(butPtr->display, drawable, checkGC, ax, ay, bx, by);
-	    XDrawLine(butPtr->display, drawable, checkGC, bx, by, cx, cy);
-	    ay++, by++, cy++;
-	}
-    }
-#else
-    Blt_Picture picture;
-    Blt_Painter painter;
-    int on, dim;
-    int w, h;
-
-    dim = butPtr->indicatorDiameter;
-    x -= butPtr->indicatorSpace + butPtr->borderWidth;
-    y -= dim / 2 + butPtr->borderWidth;
-
-    w = h = butPtr->indicatorSpace /* - 2 * butPtr->borderWidth; */;
-    on = (butPtr->flags & SELECTED);
-    picture = NULL;
-    if (butPtr->state & STATE_DISABLED) {
-	if (butPtr->disabledPicture == NULL) {
-	    butPtr->disabledPicture = 
-		Blt_PaintCheckbox(w, h, 
-			Blt_BackgroundBorderColor(butPtr->normalBg), 
-			butPtr->disabledFg, butPtr->disabledFg, on);
-	} 
-	picture = butPtr->disabledPicture;
-    } else if (butPtr->flags & SELECTED) {
-	if (butPtr->selectedPicture == NULL) {
-	    butPtr->selectedPicture = 
-		Blt_PaintCheckbox(w, h, 
-			Blt_BackgroundBorderColor(butPtr->selectBg), 
-			butPtr->activeFg, 
-			Blt_BackgroundBorderColor(butPtr->selectBg),
-			TRUE);
-	} 
-	picture = butPtr->selectedPicture;
-    } else {
-	if (butPtr->normalPicture == NULL) {
-	    butPtr->normalPicture = 
-		Blt_PaintCheckbox(w, h, 
-			Blt_BackgroundBorderColor(butPtr->normalBg),
-			butPtr->normalFg, 
-			Blt_BackgroundBorderColor(butPtr->selectBg),
-			FALSE);
-	} 
-	picture = butPtr->normalPicture;
-    }
-    painter = Blt_GetPainter(tkwin, 1.0);
-    Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x, y, 0);
-#endif
-}
-
-static void
-DrawRadioButton(Tk_Window tkwin, Drawable drawable, Button *butPtr, int x, 
-		int y) 
-{
-#ifdef notdef
-    Blt_Background bg;
-    GC fillGC, boxGC, checkGC;
-    int boxWidth, boxHeight;
-    int dim;
-    int xBox, yBox;
-
-    dim = butPtr->indicatorDiameter - 2 * butPtr->borderWidth;
-    dim |= 0x1;
-    boxWidth = boxHeight = dim;
-    xBox = butPtr->borderWidth + GAP;
-    yBox = (Tk_Height(tkwin) - boxHeight) / 2;
-
-    bg = butPtr->normalBg;
-    if (butPtr->state & STATE_DISABLED) {
-	fillGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_FLAT_GC);
-    } else {
-	fillGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_LIGHT_GC);
-    }
-    boxGC = Blt_BackgroundBorderGC(tkwin, bg, TK_3D_DARK_GC);
-    checkGC = butPtr->normalTextGC;
-
-    XFillRectangle(butPtr->display, drawable, fillGC, xBox, yBox, 
-	boxWidth, boxHeight);
-    XDrawRectangle(butPtr->display, drawable, boxGC, xBox, yBox, 
-	boxWidth, boxHeight);
-
-    if (butPtr->flags & SELECTED) {
-	int ax, ay, bx, by, cx, cy;
-	int i;
-
-	ax = xBox + 2, ay = yBox + 2 + (boxHeight / 3);
-	bx = xBox + (boxWidth / 2) - 1;
-	by = yBox + boxHeight - 4;
-	cx = xBox + boxWidth;
-	cy = yBox;
-	for (i = 0; i < 3; i++) {
-	    XDrawLine(butPtr->display, drawable, checkGC, ax, ay, bx, by);
-	    XDrawLine(butPtr->display, drawable, checkGC, bx, by, cx, cy);
-	    ay++, by++, cy++;
-	}
-    }
-#else
-    Blt_Picture picture;
-    Blt_Painter painter;
-    int on, dim;
-    int w, h;
-
-    dim = butPtr->indicatorDiameter;
-    x -= butPtr->indicatorSpace + butPtr->borderWidth;
-    y -= dim / 2 + butPtr->borderWidth;
-
-    w = h = butPtr->indicatorSpace - 2 * butPtr->borderWidth; 
-    on = (butPtr->flags & SELECTED);
-    picture = NULL;
-    if (butPtr->state & STATE_DISABLED) {
-	if (butPtr->disabledPicture == NULL) {
-	    butPtr->disabledPicture = 
-		Blt_PaintRadioButton(w, h, 
-			Blt_BackgroundBorderColor(butPtr->normalBg), 
-			butPtr->disabledFg, butPtr->disabledFg, on);
-	} 
-	picture = butPtr->disabledPicture;
-    } else if (butPtr->flags & SELECTED) {
-	if (butPtr->selectedPicture == NULL) {
-	    butPtr->selectedPicture = 
-		Blt_PaintRadioButton(w, h, 
-			Blt_BackgroundBorderColor(butPtr->selectBg), 
-			butPtr->activeFg, 
-			butPtr->activeFg,
-			TRUE);
-	} 
-	picture = butPtr->selectedPicture;
-    } else {
-	if (butPtr->normalPicture == NULL) {
-	    butPtr->normalPicture = 
-		Blt_PaintRadioButton(w, h, 
-			Blt_BackgroundBorderColor(butPtr->normalBg),
-			butPtr->normalFg, 
-			Blt_BackgroundBorderColor(butPtr->selectBg),
-			FALSE);
-	} 
-	picture = butPtr->normalPicture;
-    }
-    painter = Blt_GetPainter(tkwin, 1.0);
-    Blt_PaintPicture(painter, drawable, picture, 0, 0, w, h, x, y, 0);
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayButton --
- *
- *	This procedure is invoked to display a button widget.  It is
- *	normally invoked as an idle handler.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the button in its
- *	current mode.  The REDRAW_PENDING flag is cleared.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DisplayButton(ClientData clientData)
-{
-    Button *butPtr = clientData;
-    GC gc;
-    Blt_Background bg;
-    Pixmap pixmap;
-    int x = 0;			/* Initialization only needed to stop
-				 * compiler warning. */
-    int y, relief;
-    Tk_Window tkwin = butPtr->tkwin;
-    int width, height;
-    int offset;			/* 0 means this is a label widget.  1 means
-				 * it is a flavor of button, so we offset
-				 * the text to make the button appear to
-				 * move up and down as the relief changes. */
-
-    butPtr->flags &= ~REDRAW_PENDING;
-    if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
-	return;
-    }
-    if ((Tk_Width(butPtr->tkwin) < 2) || (Tk_Height(butPtr->tkwin) < 2)) {
-	return;
-    }
-    bg = butPtr->normalBg;
-    if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) {
-	gc = butPtr->disabledGC;
-    } else if ((butPtr->state == STATE_ACTIVE)
-	&& !Tk_StrictMotif(butPtr->tkwin)) {
-	gc = butPtr->activeTextGC;
-	bg = butPtr->activeBg;
-    } else {
-	gc = butPtr->normalTextGC;
-    }
-    if ((butPtr->flags & SELECTED) && (butPtr->state != STATE_ACTIVE)
-	&& (butPtr->selectBg != NULL) && !butPtr->indicatorOn) {
-	bg = butPtr->selectBg;
-    }
-    if ((butPtr->type == TYPE_PUSH_BUTTON) && (butPtr->flags & SELECTED) && 
-	(butPtr->state == STATE_ACTIVE) && (butPtr->selectBg != NULL) && 
-	!butPtr->indicatorOn) {
-	bg = butPtr->selectBg;
-    }
-    /*
-     * Override the relief specified for the button if this is a
-     * checkbutton or radiobutton and there's no indicator.
-     */
-
-    relief = butPtr->relief;
-    if ((butPtr->type >= TYPE_PUSH_BUTTON) && !butPtr->indicatorOn) {
-	relief = (butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN
-	    : butPtr->relief;
-    }
-    offset = (butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin);
-
-    /*
-     * In order to avoid screen flashes, this procedure redraws
-     * the button in a pixmap, then copies the pixmap to the
-     * screen in a single operation.  This means that there's no
-     * point in time where the on-sreen image has been cleared.
-     */
-
-    pixmap = Tk_GetPixmap(butPtr->display, Tk_WindowId(tkwin),
-	Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-    Blt_FillBackgroundRectangle(tkwin, pixmap, bg, 0, 0, Tk_Width(tkwin),
-	Tk_Height(tkwin), 0, TK_RELIEF_FLAT);
-
-    /*
-     * Display image or bitmap or text for button.
-     */
-
-    if (butPtr->image != None) {
-	Tk_SizeOfImage(butPtr->image, &width, &height);
-
-      imageOrBitmap:
-	TkComputeAnchor(butPtr->anchor, tkwin, 0, 0,
-	    butPtr->indicatorSpace + width, height, &x, &y);
-	x += butPtr->indicatorSpace;
-
-	x += offset;
-	y += offset;
-	if (relief == TK_RELIEF_RAISED) {
-	    x -= offset;
-	    y -= offset;
-	} else if (relief == TK_RELIEF_SUNKEN) {
-	    x += offset;
-	    y += offset;
-	}
-	if (butPtr->image != NULL) {
-	    if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) {
-		Tk_RedrawImage(butPtr->selectImage, 0, 0, width, height, pixmap,
-		    x, y);
-	    } else {
-		Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap,
-		    x, y);
-	    }
-	} else {
-	    XSetClipOrigin(butPtr->display, gc, x, y);
-	    XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, gc, 0, 0,
-		(unsigned int)width, (unsigned int)height, x, y, 1);
-	    XSetClipOrigin(butPtr->display, gc, 0, 0);
-	}
-	y += height / 2;
-    } else if (butPtr->bitmap != None) {
-	Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height);
-	goto imageOrBitmap;
-    } else {
-	TkComputeAnchor(butPtr->anchor, tkwin, butPtr->xPad, butPtr->yPad,
-	    butPtr->indicatorSpace + butPtr->textWidth,
-	    butPtr->textHeight, &x, &y);
-
-	x += butPtr->indicatorSpace;
-
-	x += offset;
-	y += offset;
-	if (relief == TK_RELIEF_RAISED) {
-	    x -= offset;
-	    y -= offset;
-	} else if (relief == TK_RELIEF_SUNKEN) {
-	    x += offset;
-	    y += offset;
-	}
-	Blt_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout,
-	    x, y, 0, -1);
-	Blt_UnderlineTextLayout(butPtr->display, pixmap, gc,
-	    butPtr->textLayout, x, y, butPtr->underline);
-	y += butPtr->textHeight / 2;
-    }
-
-    /*
-     * Draw the indicator for check buttons and radio buttons.  At this
-     * point x and y refer to the top-left corner of the text or image
-     * or bitmap.
-     */
-    if ((butPtr->type == TYPE_CHECK_BUTTON) && butPtr->indicatorOn) {
-#ifdef notdef
-	int dim;
-
-	dim = butPtr->indicatorDiameter;
-	x -= butPtr->indicatorSpace;
-	y -= dim / 2;
-	if (dim > 2 * butPtr->borderWidth) {
-
-	    Blt_DrawBackgroundRectangle(tkwin, pixmap, bg, x, y, dim, dim,
-		butPtr->borderWidth,
-		(butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN :
-		TK_RELIEF_RAISED);
-	    x += butPtr->borderWidth;
-	    y += butPtr->borderWidth;
-	    dim -= 2 * butPtr->borderWidth;
-	    if (butPtr->flags & SELECTED) {
-		GC borderGC;
-
-		borderGC = Blt_BackgroundBorderGC(tkwin, 
-			(butPtr->selectBg != NULL)
-		    ? butPtr->selectBg : butPtr->normalBg, TK_3D_FLAT_GC);
-		XFillRectangle(butPtr->display, pixmap, borderGC, x, y,
-		    (unsigned int)dim, (unsigned int)dim);
-	    } else {
-		Blt_FillBackgroundRectangle(tkwin, pixmap, butPtr->normalBg, 
-			x, y, dim, dim, butPtr->borderWidth, TK_RELIEF_FLAT);
-	    }
-	}
-#else 
-	DrawCheckButton(tkwin, pixmap, butPtr, x, y);
-	x -= GAP;
-#endif
-    } else if ((butPtr->type == TYPE_RADIO_BUTTON) && butPtr->indicatorOn) {
-#ifdef notdef
-	XPoint points[4];
-	int radius;
-
-	radius = butPtr->indicatorDiameter / 2;
-	points[0].x = x - butPtr->indicatorSpace;
-	points[0].y = y;
-	points[1].x = points[0].x + radius;
-	points[1].y = points[0].y + radius;
-	points[2].x = points[1].x + radius;
-	points[2].y = points[0].y;
-	points[3].x = points[1].x;
-	points[3].y = points[0].y - radius;
-	if (butPtr->flags & SELECTED) {
-	    GC borderGC;
-
-	    borderGC = Blt_BackgroundBorderGC(tkwin, (butPtr->selectBg != NULL)
-		? butPtr->selectBg : butPtr->normalBg, TK_3D_FLAT_GC);
-	    XFillPolygon(butPtr->display, pixmap, borderGC, points, 4, Convex,
-		CoordModeOrigin);
-	} else {
-	    Tk_Fill3DPolygon(tkwin, pixmap, 
-		Blt_BackgroundBorder(butPtr->normalBg), points,
-		4, butPtr->borderWidth, TK_RELIEF_FLAT);
-	}
-	Tk_Draw3DPolygon(tkwin, pixmap, Blt_BackgroundBorder(bg), points, 4, 
-	    butPtr->borderWidth,
-	    (butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN :
-	    TK_RELIEF_RAISED);
-#else
-	DrawRadioButton(tkwin, pixmap, butPtr, x, y);
-#endif
-    }
-    /*
-     * If the button is disabled with a stipple rather than a special
-     * foreground color, generate the stippled effect.  If the widget
-     * is selected and we use a different background color when selected,
-     * must temporarily modify the GC.
-     */
-
-    if ((butPtr->state == STATE_DISABLED)
-	&& ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) {
-	if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn
-	    && (butPtr->selectBg != NULL)) {
-	    XSetForeground(butPtr->display, butPtr->disabledGC,
-		Blt_BackgroundBorderColor(butPtr->selectBg)->pixel);
-	}
-	XFillRectangle(butPtr->display, pixmap, butPtr->disabledGC,
-	    butPtr->inset, butPtr->inset,
-	    (unsigned)(Tk_Width(tkwin) - 2 * butPtr->inset),
-	    (unsigned)(Tk_Height(tkwin) - 2 * butPtr->inset));
-	if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn
-	    && (butPtr->selectBg != NULL)) {
-	    XSetForeground(butPtr->display, butPtr->disabledGC,
-		Blt_BackgroundBorderColor(butPtr->normalBg)->pixel);
-	}
-    }
-    /*
-     * Draw the border and traversal highlight last.  This way, if the
-     * button's contents overflow they'll be covered up by the border.
-     */
-
-    if (relief != TK_RELIEF_FLAT) {
-	int inset = butPtr->highlightWidth;
-	if (butPtr->defaultState == STATE_ACTIVE) {
-	    inset += 2;
-	    Blt_DrawBackgroundRectangle(tkwin, pixmap, bg, inset, inset,
-		Tk_Width(tkwin) - 2 * inset, Tk_Height(tkwin) - 2 * inset,
-		1, TK_RELIEF_SUNKEN);
-	    inset += 3;
-	}
-	Blt_DrawBackgroundRectangle(tkwin, pixmap, bg, inset, inset,
-	    Tk_Width(tkwin) - 2 * inset, Tk_Height(tkwin) - 2 * inset,
-	    butPtr->borderWidth, relief);
-    }
-    if (butPtr->highlightWidth != 0) {
-	GC highlightGC;
-
-	if (butPtr->flags & GOT_FOCUS) {
-	    highlightGC = Tk_GCForColor(butPtr->highlightColorPtr, pixmap);
-	} else {
-	    highlightGC = Tk_GCForColor(butPtr->highlightBgColorPtr, pixmap);
-	}
-	Tk_DrawFocusHighlight(tkwin, highlightGC, butPtr->highlightWidth, pixmap);
-    }
-    /*
-     * Copy the information from the off-screen pixmap onto the screen,
-     * then delete the pixmap.
-     */
-
-    XCopyArea(butPtr->display, pixmap, Tk_WindowId(tkwin),
-	butPtr->copyGC, 0, 0, (unsigned)Tk_Width(tkwin),
-	(unsigned)Tk_Height(tkwin), 0, 0);
-    Tk_FreePixmap(butPtr->display, pixmap);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeButtonGeometry --
- *
- *	After changes in a button's text or bitmap, this procedure
- *	recomputes the button's geometry and passes this information
- *	along to the geometry manager for the window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The button's window may change size.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ComputeButtonGeometry(Button *butPtr)
-{
-    int width, height;
-
-    if (butPtr->highlightWidth < 0) {
-	butPtr->highlightWidth = 0;
-    }
-    butPtr->inset = butPtr->highlightWidth + butPtr->borderWidth;
-
-    /*
-     * Leave room for the default ring if needed.
-     */
-
-    if (butPtr->defaultState == STATE_ACTIVE) {
-	butPtr->inset += 5;
-    }
-    butPtr->indicatorSpace = 0;
-    if (butPtr->image != NULL) {
-	Tk_SizeOfImage(butPtr->image, &width, &height);
-      imageOrBitmap:
-	if (butPtr->width > 0) {
-	    width = butPtr->width;
-	}
-	if (butPtr->height > 0) {
-	    height = butPtr->height;
-	}
-	if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) {
-	    butPtr->indicatorSpace = height;
-	    if (butPtr->type == TYPE_CHECK_BUTTON) {
-		butPtr->indicatorDiameter = (65 * height) / 100;
-	    } else {
-		butPtr->indicatorDiameter = (75 * height) / 100;
-	    }
-	}
-    } else if (butPtr->bitmap != None) {
-	Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height);
-	goto imageOrBitmap;
-    } else {
-	int avgWidth;
-	Blt_FontMetrics fm;
-
-	if (butPtr->textLayout != NULL) {
-	    Tk_FreeTextLayout(butPtr->textLayout);
-	}
-	butPtr->textLayout = Blt_ComputeTextLayout(butPtr->font,
-	    butPtr->text, -1, butPtr->wrapLength, butPtr->justify, 0,
-	    &butPtr->textWidth, &butPtr->textHeight);
-	width = butPtr->textWidth;
-	height = butPtr->textHeight;
-	avgWidth = Blt_TextWidth(butPtr->font, "0", 1);
-	Blt_GetFontMetrics(butPtr->font, &fm);
-
-	if (butPtr->width > 0) {
-	    width = butPtr->width * avgWidth;
-	}
-	if (butPtr->height > 0) {
-	    height = butPtr->height * fm.linespace;
-	}
-	if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) {
-	    butPtr->indicatorDiameter = fm.linespace;
-	    if (butPtr->type == TYPE_CHECK_BUTTON) {
-		butPtr->indicatorDiameter = 
-		    (70 * butPtr->indicatorDiameter) / 100;
-	    }
-	    butPtr->indicatorSpace = butPtr->indicatorDiameter + avgWidth;
-	}
-    }
-
-    /*
-     * When issuing the geometry request, add extra space for the indicator,
-     * if any, and for the border and padding, plus two extra pixels so the
-     * display can be offset by 1 pixel in either direction for the raised
-     * or lowered effect.
-     */
-
-    if ((butPtr->image == NULL) && (butPtr->bitmap == None)) {
-	width += 2 * butPtr->xPad;
-	height += 2 * butPtr->yPad;
-    }
-    if ((butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin)) {
-	width += 2;
-	height += 2;
-    }
-    Tk_GeometryRequest(butPtr->tkwin, (int)(width + butPtr->indicatorSpace
-	    + 2 * butPtr->inset), (int)(height + 2 * butPtr->inset));
-    Tk_SetInternalBorder(butPtr->tkwin, butPtr->inset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for various
- *	events on buttons.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ButtonEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    Button *butPtr = clientData;
-    if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
-	goto redraw;
-    } else if (eventPtr->type == ConfigureNotify) {
-	/*
-	 * Must redraw after size changes, since layout could have changed
-	 * and borders will need to be redrawn.
-	 */
-
-	goto redraw;
-    } else if (eventPtr->type == DestroyNotify) {
-	if (butPtr->tkwin != NULL) {
-	    butPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(butPtr->interp, butPtr->widgetCmd);
-	}
-	if (butPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayButton, (ClientData)butPtr);
-	}
-	/* This is a hack to workaround a bug in 8.3.3. */
-	DestroyButton((ClientData)butPtr);
-	/* Tcl_EventuallyFree((ClientData)butPtr, (Tcl_FreeProc *)Blt_Free); */
-    } else if (eventPtr->type == FocusIn) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    butPtr->flags |= GOT_FOCUS;
-	    if (butPtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    } else if (eventPtr->type == FocusOut) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    butPtr->flags &= ~GOT_FOCUS;
-	    if (butPtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    }
-    return;
-
-  redraw:
-    if ((butPtr->tkwin != NULL) && !(butPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	butPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonCmdDeletedProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If
- *	the widget isn't already in the process of being destroyed,
- *	this command destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ButtonCmdDeletedProc(ClientData clientData)
-{
-    Button *butPtr = clientData;
-    Tk_Window tkwin = butPtr->tkwin;
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin
-     * is NULL) or because the command was deleted, and then this procedure
-     * destroys the widget.
-     */
-
-    if (tkwin != NULL) {
-	butPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InvokeButton --
- *
- *	This procedure is called to carry out the actions associated
- *	with a button, such as invoking a TCL command or setting a
- *	variable.  This procedure is invoked, for example, when the
- *	button is invoked via the mouse.
- *
- * Results:
- *	A standard TCL return value.  Information is also left in
- *	interp->result.
- *
- * Side effects:
- *	Depends on the button and its associated command.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-InvokeButton(Button *butPtr)
-{
-    if ((butPtr->type == TYPE_CHECK_BUTTON) || 
-	(butPtr->type == TYPE_PUSH_BUTTON)) {
-	if (butPtr->flags & SELECTED) {
-	    if (Tcl_SetVar(butPtr->interp, butPtr->selVarName, 
-			   butPtr->offValue,
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		return TCL_ERROR;
-	    }
-	} else {
-	    if (Tcl_SetVar(butPtr->interp, butPtr->selVarName, butPtr->onValue,
-		    TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-		return TCL_ERROR;
-	    }
-	}
-    } else if (butPtr->type == TYPE_RADIO_BUTTON) {
-	if (Tcl_SetVar(butPtr->interp, butPtr->selVarName, butPtr->onValue,
-		TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
-	    return TCL_ERROR;
-	}
-    }
-    if ((butPtr->type != TYPE_LABEL) && (butPtr->command != NULL)) {
-	return TkCopyAndGlobalEval(butPtr->interp, (char *)butPtr->command);
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonVarProc --
- *
- *	This procedure is invoked when someone changes the
- *	state variable associated with a radio button.  Depending
- *	on the new value of the button's variable, the button
- *	may be selected or deselected.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The button may become selected or deselected.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static char *
-ButtonVarProc(
-    ClientData clientData,	/* Information about button. */
-    Tcl_Interp *interp,		/* Interpreter containing variable. */
-    const char *name1,		/* Name of variable. */
-    const char *name2,		/* Second part of variable name. */
-    int flags)			/* Information about what happened. */
-{
-    Button *butPtr = clientData;
-    const char *value;
-
-    /*
-     * If the variable is being unset, then just re-establish the
-     * trace unless the whole interpreter is going away.
-     */
-
-    if (flags & TCL_TRACE_UNSETS) {
-	butPtr->flags &= ~SELECTED;
-	if ((flags & TCL_TRACE_DESTROYED) && !(flags & TCL_INTERP_DESTROYED)) {
-	    Tcl_TraceVar(interp, butPtr->selVarName,
-		TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		ButtonVarProc, clientData);
-	}
-	goto redisplay;
-    }
-    /*
-     * Use the value of the variable to update the selected status of
-     * the button.
-     */
-
-    value = Tcl_GetVar(interp, butPtr->selVarName, TCL_GLOBAL_ONLY);
-    if (value == NULL) {
-	value = "";
-    }
-    if (strcmp(value, butPtr->onValue) == 0) {
-	if (butPtr->flags & SELECTED) {
-	    return (char *) NULL;
-	}
-	butPtr->flags |= SELECTED;
-    } else if (butPtr->flags & SELECTED) {
-	butPtr->flags &= ~SELECTED;
-    } else {
-	return (char *) NULL;
-    }
-
-  redisplay:
-    if ((butPtr->tkwin != NULL) && Tk_IsMapped(butPtr->tkwin)
-	&& !(butPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	butPtr->flags |= REDRAW_PENDING;
-    }
-    return (char *) NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonTextVarProc --
- *
- *	This procedure is invoked when someone changes the variable
- *	whose contents are to be displayed in a button.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The text displayed in the button will change to match the
- *	variable.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static char *
-ButtonTextVarProc(
-    ClientData clientData,	/* Information about button. */
-    Tcl_Interp *interp,		/* Interpreter containing variable. */
-    const char *name1,		/* Not used. */
-    const char *name2,		/* Not used. */
-    int flags)			/* Information about what happened. */
-{
-    Button *butPtr = clientData;
-    const char *value;
-
-    /*
-     * If the variable is unset, then immediately recreate it unless
-     * the whole interpreter is going away.
-     */
-
-    if (flags & TCL_TRACE_UNSETS) {
-	if ((flags & TCL_TRACE_DESTROYED) && !(flags & TCL_INTERP_DESTROYED)) {
-	    Tcl_SetVar(interp, butPtr->textVarName, butPtr->text,
-		TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, butPtr->textVarName,
-		TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		ButtonTextVarProc, clientData);
-	}
-	return (char *) NULL;
-    }
-    value = Tcl_GetVar(interp, butPtr->textVarName, TCL_GLOBAL_ONLY);
-    if (value == NULL) {
-	value = "";
-    }
-    if (butPtr->text != NULL) {
-	Blt_Free(butPtr->text);
-    }
-    butPtr->text = Blt_AssertStrdup(value);
-    ComputeButtonGeometry(butPtr);
-
-    if ((butPtr->tkwin != NULL) && Tk_IsMapped(butPtr->tkwin)
-	&& !(butPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	butPtr->flags |= REDRAW_PENDING;
-    }
-    return (char *) NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonImageProc --
- *
- *	This procedure is invoked by the image code whenever the manager
- *	for an image does something that affects the size of contents
- *	of an image displayed in a button.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the button to get redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static void
-ButtonImageProc(
-    ClientData clientData,	/* Pointer to widget record. */
-    int x, int y,		/* Upper left pixel (within image)
-				 * that must be redisplayed. */
-    int width, int height,	/* Dimensions of area to redisplay
-				 * (may be <= 0). */
-    int imgWidth, int imgHeight)/* New dimensions of image. */
-{
-    Button *butPtr = clientData;
-
-    if (butPtr->tkwin != NULL) {
-	ComputeButtonGeometry(butPtr);
-	if (Tk_IsMapped(butPtr->tkwin) && !(butPtr->flags & REDRAW_PENDING)) {
-	    Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	    butPtr->flags |= REDRAW_PENDING;
-	}
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ButtonSelectImageProc --
- *
- *	This procedure is invoked by the image code whenever the manager
- *	for an image does something that affects the size of contents
- *	of the image displayed in a button when it is selected.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	May arrange for the button to get redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-static void
-ButtonSelectImageProc(
-    ClientData clientData,	/* Pointer to widget record. */
-    int x, int y,		/* Upper left pixel (within image)
-				 * that must be redisplayed. */
-    int width, int height,	/* Dimensions of area to redisplay
-				 * (may be <= 0). */
-    int imgWidth, int imgHeight)/* New dimensions of image. */
-{
-    Button *butPtr = clientData;
-
-    /*
-     * Don't recompute geometry:  it's controlled by the primary image.
-     */
-    if ((butPtr->flags & SELECTED) && (butPtr->tkwin != NULL)
-	&& Tk_IsMapped(butPtr->tkwin)
-	&& !(butPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayButton, (ClientData)butPtr);
-	butPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-int
-Blt_ButtonCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[] = {
-	{"button", ButtonCmd,},
-	{"pushbutton", PushbuttonCmd,},
-	{"checkbutton", CheckbuttonCmd,},
-	{"radiobutton", RadiobuttonCmd,},
-	{"label", LabelCmd,},
-    };
-    return Blt_InitCmds(interp, "::blt::tk", cmdSpecs, 5);
-}
-
-#endif /* NO_TKBUTTON */
-
diff --git a/blt3.0/src/tkConsole.c b/blt3.0/src/tkConsole.c
deleted file mode 100644
index baefece..0000000
--- a/blt3.0/src/tkConsole.c
+++ /dev/null
@@ -1,652 +0,0 @@
-
-/*
- * tkConsole.c --
- *
- *	This file implements a TCL console for systems that may not
- *	otherwise have access to a console.  It uses the Text widget
- *	and provides special access via a console command.
- *
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * SCCS: @(#) tkConsole.c 1.55 98/01/02 17:40:37
- */
-
-#include "config.h"
-#undef USE_TK_STUBS
-#undef USE_TCL_STUBS
-#include "blt.h"
-#include <tcl.h>
-#include <tk.h>
-#include <locale.h>
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#define _VERSION(a,b,c)	    (((a) << 16) + ((b) << 8) + (c))
-
-#define _TCL_VERSION _VERSION(TCL_MAJOR_VERSION, TCL_MINOR_VERSION, TCL_RELEASE_SERIAL)
-#define _TK_VERSION _VERSION(TK_MAJOR_VERSION, TK_MINOR_VERSION, TK_RELEASE_SERIAL)
-
-#if (_TCL_VERSION < _VERSION(8,2,0))
-
-/*
- * A data structure of the following type holds information for each console
- * which a handler (i.e. a TCL command) has been defined for a particular
- * top-level window.
- */
-
-typedef struct {
-    Tcl_Interp *consoleInterp;	/* Interpreter for the console. */
-    Tcl_Interp *interp;		/* Interpreter to send console commands. */
-} ConsoleInfo;
-
-static Tcl_Interp *gStdoutInterp = NULL;
-
-#if (_TCL_VERSION < _VERSION(8,1,0))
-#define HAVE_BROKEN_LIB_PATH 1
-#undef HAVE_UTF
-#endif
-
-#if (_TCL_VERSION >= _VERSION(8,1,1)) 
-#define HAVE_UTF 1
-extern void TclInitSubsystems _ANSI_ARGS_((const char *argv0));
-#else 
-#endif
-
-/*
- * Forward declarations for procedures defined later in this file:
- *
- * The first three will be used in the tk app shells...
- */
-
-extern Tcl_AppInitProc Blt_ConsoleInit;
-extern void Blt_ConsoleCreate _ANSI_ARGS_((void));
-
-static Tcl_CmdDeleteProc ConsoleDeleteProc;
-static Tcl_CmdProc ConsoleCmd;
-static Tcl_CmdProc InterpreterCmd;
-static Tk_EventProc ConsoleEventProc;
-
-static void ConsolePrint _ANSI_ARGS_((Tcl_Interp *interp, int devId, 
-	const char *buffer, long size));
-
-static int ConsoleInput _ANSI_ARGS_((ClientData instanceData, char *buf, 
-	int toRead, int *errorCode));
-static int ConsoleOutput _ANSI_ARGS_((ClientData instanceData, char *buf, 
-	int toWrite, int *errorCode));
-static int ConsoleClose _ANSI_ARGS_((ClientData instanceData,
-	Tcl_Interp *interp));
-static void ConsoleWatch _ANSI_ARGS_((ClientData instanceData, int mask));
-static int ConsoleHandle _ANSI_ARGS_((ClientData instanceData, int direction, 
-	ClientData *handlePtr));
-
-/*
- * This structure describes the channel type structure for file based IO:
- */
-
-static Tcl_ChannelType consoleChannelType =
-{
-    "console",			/* Type name. */
-    NULL,			/* Always non-blocking.*/
-    ConsoleClose,		/* Close proc. */
-    ConsoleInput,		/* Input proc. */
-    ConsoleOutput,		/* Output proc. */
-    NULL,			/* Seek proc. */
-    NULL,			/* Set option proc. */
-    NULL,			/* Get option proc. */
-    ConsoleWatch,		/* Watch for events on console. */
-    ConsoleHandle,		/* Get a handle from the device. */
-};
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConsoleCreate --
- *
- * 	Create the console channels and install them as the standard
- * 	channels.  All I/O will be discarded until Blt_ConsoleInit is
- * 	called to attach the console to a text widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Creates the console channel and installs it as the standard
- *	channels.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-Blt_ConsoleCreate()
-{
-    Tcl_Channel channel;
-
-#ifdef HAVE_UTF
-    TclInitSubsystems(NULL);
-#endif
-    channel = Tcl_CreateChannel(&consoleChannelType, "console0",
-	(ClientData)TCL_STDIN, TCL_READABLE);
-    if (channel != NULL) {
-	Tcl_SetChannelOption(NULL, channel, "-translation", "lf");
-	Tcl_SetChannelOption(NULL, channel, "-buffering", "none");
-#ifdef HAVE_UTF
-	Tcl_SetChannelOption(NULL, channel, "-encoding", "utf-8");
-#endif
-    }
-    Tcl_SetStdChannel(channel, TCL_STDIN);
-    channel = Tcl_CreateChannel(&consoleChannelType, "console1",
-	(ClientData)TCL_STDOUT, TCL_WRITABLE);
-    if (channel != NULL) {
-	Tcl_SetChannelOption(NULL, channel, "-translation", "lf");
-	Tcl_SetChannelOption(NULL, channel, "-buffering", "none");
-#ifdef HAVE_UTF
-	Tcl_SetChannelOption(NULL, channel, "-encoding", "utf-8");
-#endif
-    }
-    Tcl_SetStdChannel(channel, TCL_STDOUT);
-    channel = Tcl_CreateChannel(&consoleChannelType, "console2",
-	(ClientData)TCL_STDERR, TCL_WRITABLE);
-    if (channel != NULL) {
-	Tcl_SetChannelOption(NULL, channel, "-translation", "lf");
-	Tcl_SetChannelOption(NULL, channel, "-buffering", "none");
-#ifdef HAVE_UTF
-	Tcl_SetChannelOption(NULL, channel, "-encoding", "utf-8");
-#endif
-    }
-    Tcl_SetStdChannel(channel, TCL_STDERR);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * Blt_ConsoleInit --
- *
- *	Initialize the console.  This code actually creates a new
- *	application and associated interpreter.  This effectivly hides
- *	the implementation from the main application.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	A new console it created.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Blt_ConsoleInit(interp)
-    Tcl_Interp *interp;		/* Interpreter to use for prompting. */
-{
-    Tcl_Interp *consoleInterp;
-    ConsoleInfo *info;
-    Tk_Window tkMain = Tk_MainWindow(interp);
-
-#ifdef MAC_TCL
-    static char initCmd[] = "source -rsrc {Console}";
-#else
-    static char initCmd[] = "source $tk_library/console.tcl";
-#endif
-
-    consoleInterp = Tcl_CreateInterp();
-    if (consoleInterp == NULL) {
-	goto error;
-    } 
-#if defined(HAVE_BROKEN_LIB_PATH) && defined(TCLLIBPATH)
-    Tcl_SetVar(consoleInterp, "tclDefaultLibrary", 
-	       TCLLIBPATH, TCL_GLOBAL_ONLY);
-#endif
-    /*
-     * Initialized TCL and Tk.
-     */
-    if (Tcl_Init(consoleInterp) != TCL_OK) {
-	goto error;
-    }
-    if (Tk_Init(consoleInterp) != TCL_OK) {
-	goto error;
-    }
-    gStdoutInterp = interp;
-
-    /*
-     * Add console commands to the interp
-     */
-    info = Tcl_Alloc(sizeof(ConsoleInfo));
-    info->interp = interp;
-    info->consoleInterp = consoleInterp;
-    Tcl_CreateCommand(interp, "console", ConsoleCmd, info,
-	(Tcl_CmdDeleteProc *)ConsoleDeleteProc);
-    Tcl_CreateCommand(consoleInterp, "consoleinterp", InterpreterCmd, info, 
-	(Tcl_CmdDeleteProc *)NULL);
-
-    Tk_CreateEventHandler(tkMain, StructureNotifyMask, ConsoleEventProc, info);
-
-    Tcl_Preserve(consoleInterp);
-    if (Tcl_Eval(consoleInterp, initCmd) == TCL_ERROR) {
-	/* goto error; -- no problem for now... */
-	printf("Eval error: %s", consoleInterp->result);
-    }
-    Tcl_Release((ClientData)consoleInterp);
-    return TCL_OK;
-
-  error:
-    if (consoleInterp != NULL) {
-	Tcl_DeleteInterp(consoleInterp);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsolePrint --
- *
- *	Prints to the give text to the console.  Given the main interp
- *	this functions find the appropiate console interp and forwards
- *	the text to be added to that console.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ConsolePrint(interp, devId, buffer, size)
-    Tcl_Interp *interp;		/* Main interpreter. */
-    int devId;			/* TCL_STDOUT for stdout, TCL_STDERR for
-                                 * stderr. */
-    const char *buffer;		/* Text buffer. */
-    long size;			/* Size of text buffer. */
-{
-    Tcl_DString command, output;
-    Tcl_CmdInfo cmdInfo;
-    char *cmd;
-    ConsoleInfo *info;
-    Tcl_Interp *consoleInterp;
-    int result;
-
-    if (interp == NULL) {
-	return;
-    }
-    if (devId == TCL_STDERR) {
-	cmd = "tkConsoleOutput stderr ";
-    } else {
-	cmd = "tkConsoleOutput stdout ";
-    }
-
-    result = Tcl_GetCommandInfo(interp, "console", &cmdInfo);
-    if (result == 0) {
-	return;
-    }
-    info = (ConsoleInfo *) cmdInfo.clientData;
-
-    Tcl_DStringInit(&output);
-    Tcl_DStringAppend(&output, buffer, size);
-
-    Tcl_DStringInit(&command);
-    Tcl_DStringAppend(&command, cmd, strlen(cmd));
-    Tcl_DStringAppendElement(&command, output.string);
-
-    consoleInterp = info->consoleInterp;
-    Tcl_Preserve((ClientData)consoleInterp);
-    Tcl_Eval(consoleInterp, command.string);
-    Tcl_Release((ClientData)consoleInterp);
-
-    Tcl_DStringFree(&command);
-    Tcl_DStringFree(&output);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleOutput--
- *
- *	Writes the given output on the IO channel. Returns count of how
- *	many characters were actually written, and an error indication.
- *
- * Results:
- *	A count of how many characters were written is returned and an
- *	error indication is returned in an output argument.
- *
- * Side effects:
- *	Writes output on the actual channel.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ConsoleOutput(instanceData, buf, toWrite, errorCode)
-    ClientData instanceData;	/* Indicates which device to use. */
-    char *buf;			/* The data buffer. */
-    int toWrite;		/* How many bytes to write? */
-    int *errorCode;		/* Where to store error code. */
-{
-    *errorCode = 0;
-    Tcl_SetErrno(0);
-
-    if (gStdoutInterp != NULL) {
-	ConsolePrint(gStdoutInterp, (int)instanceData, buf, toWrite);
-    }
-    return toWrite;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleInput --
- *
- *	Read input from the console.  Not currently implemented.
- *
- * Results:
- *	Always returns EOF.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static int
-ConsoleInput(instanceData, buf, bufSize, errorCode)
-    ClientData instanceData;	/* Not Used.. */
-    char *buf;			/* Where to store data read. */
-    int bufSize;		/* How much space is available
-                                         * in the buffer? */
-    int *errorCode;		/* Where to store error code. */
-{
-    return 0;			/* Always return EOF. */
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleClose --
- *
- *	Closes the IO channel.
- *
- * Results:
- *	Always returns 0 (success).
- *
- * Side effects:
- *	Frees the dummy file associated with the channel.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static int
-ConsoleClose(instanceData, interp)
-    ClientData instanceData;	/* Not Used.. */
-    Tcl_Interp *interp;		/* Not Used.. */
-{
-    return 0;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleWatch --
- *
- *	Called by the notifier to set up the console device so that
- *	events will be noticed. Since there are no events on the
- *	console, this routine just returns without doing anything.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static void
-ConsoleWatch(instanceData, mask)
-    ClientData instanceData;	/* Device ID for the channel. */
-    int mask;			/* OR-ed combination of
-                                         * TCL_READABLE, TCL_WRITABLE and
-                                         * TCL_EXCEPTION, for the events
-                                         * we are interested in. */
-{
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleHandle --
- *
- *	Invoked by the generic IO layer to get a handle from a channel.
- *	Because console channels are not devices, this function always
- *	fails.
- *
- * Results:
- *	Always returns TCL_ERROR.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static int
-ConsoleHandle(instanceData, direction, handlePtr)
-    ClientData instanceData;	/* Device ID for the channel. */
-    int direction;		/* TCL_READABLE or TCL_WRITABLE to indicate
-				 * which direction of the channel is being
-				 * requested. */
-    ClientData *handlePtr;	/* Where to store handle */
-{
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleCmd --
- *
- *	The console command implements a TCL interface to the various console
- *	options.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ConsoleCmd(clientData, interp, argc, argv)
-    ClientData clientData;	/* Not used. */
-    Tcl_Interp *interp;		/* Current interpreter. */
-    int argc;			/* Number of arguments. */
-    char **argv;		/* Argument strings. */
-{
-    ConsoleInfo *info = (ConsoleInfo *) clientData;
-    char c;
-    int length;
-    int result;
-    Tcl_Interp *consoleInterp;
-
-    if (argc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
-	    " option ?arg arg ...?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    c = argv[1][0];
-    length = strlen(argv[1]);
-    result = TCL_OK;
-    consoleInterp = info->consoleInterp;
-    Tcl_Preserve(consoleInterp);
-    if ((c == 't') && (strncmp(argv[1], "title", length)) == 0) {
-	Tcl_DString dString;
-
-	Tcl_DStringInit(&dString);
-	Tcl_DStringAppend(&dString, "wm title . ", -1);
-	if (argc == 3) {
-	    Tcl_DStringAppendElement(&dString, argv[2]);
-	}
-	Tcl_Eval(consoleInterp, Tcl_DStringValue(&dString));
-	Tcl_DStringFree(&dString);
-    } else if ((c == 'h') && (strncmp(argv[1], "hide", length)) == 0) {
-	Tcl_Eval(info->consoleInterp, "wm withdraw .");
-    } else if ((c == 's') && (strncmp(argv[1], "show", length)) == 0) {
-	Tcl_Eval(info->consoleInterp, "wm deiconify .");
-    } else if ((c == 'e') && (strncmp(argv[1], "eval", length)) == 0) {
-	if (argc == 3) {
-	    Tcl_Eval(info->consoleInterp, argv[2]);
-	} else {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
-		" eval command\"", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", argv[1],
-	    "\": should be hide, show, or title",
-	    (char *)NULL);
-	result = TCL_ERROR;
-    }
-    Tcl_Release(consoleInterp);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * InterpreterCmd --
- *
- *	This command allows the console interp to communicate with the
- *	main interpreter.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-InterpreterCmd(clientData, interp, argc, argv)
-    ClientData clientData;	/* Not used. */
-    Tcl_Interp *interp;		/* Current interpreter. */
-    int argc;			/* Number of arguments. */
-    char **argv;		/* Argument strings. */
-{
-    ConsoleInfo *info = (ConsoleInfo *) clientData;
-    char c;
-    int length;
-    int result;
-    Tcl_Interp *otherInterp;
-
-    if (argc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
-	    " option ?arg arg ...?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    c = argv[1][0];
-    length = strlen(argv[1]);
-    otherInterp = info->interp;
-    Tcl_Preserve(otherInterp);
-    if ((c == 'e') && (strncmp(argv[1], "eval", length)) == 0) {
-	result = Tcl_GlobalEval(otherInterp, argv[2]);
-	Tcl_AppendResult(interp, otherInterp->result, (char *)NULL);
-    } else if ((c == 'r') && (strncmp(argv[1], "record", length)) == 0) {
-	Tcl_RecordAndEval(otherInterp, argv[2], TCL_EVAL_GLOBAL);
-	result = TCL_OK;
-	Tcl_AppendResult(interp, otherInterp->result, (char *)NULL);
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", argv[1],
-	    "\": should be eval or record",
-	    (char *)NULL);
-	result = TCL_ERROR;
-    }
-    Tcl_Release(otherInterp);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleDeleteProc --
- *
- *	If the console command is deleted we destroy the console window
- *	and all associated data structures.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	A new console it created.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-ConsoleDeleteProc(clientData)
-    ClientData clientData;
-{
-    ConsoleInfo *info = (ConsoleInfo *) clientData;
-
-    Tcl_DeleteInterp(info->consoleInterp);
-    info->consoleInterp = NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConsoleEventProc --
- *
- *	This event procedure is registered on the main window of the
- *	slave interpreter.  If the user or a running script causes the
- *	main window to be destroyed, then we need to inform the console
- *	interpreter by invoking "tkConsoleExit".
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Invokes the "tkConsoleExit" procedure in the console interp.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ConsoleEventProc(ClientData clientData, XEvent *eventPtr)
-{
-    ConsoleInfo *info = clientData;
-    Tcl_Interp *consoleInterp;
-
-    if (eventPtr->type == DestroyNotify) {
-	consoleInterp = info->consoleInterp;
-
-	/*
-         * It is possible that the console interpreter itself has
-         * already been deleted. In that case the consoleInterp
-         * field will be set to NULL. If the interpreter is already
-         * gone, we do not have to do any work here.
-         */
-
-	if (consoleInterp == (Tcl_Interp *)NULL) {
-	    return;
-	}
-	Tcl_Preserve(consoleInterp);
-	Tcl_Eval(consoleInterp, "tkConsoleExit");
-	Tcl_Release(consoleInterp);
-    }
-}
-
-#endif /* _TCL_VERSION >= 8.2.0 */
diff --git a/blt3.0/src/tkDisplay.h b/blt3.0/src/tkDisplay.h
deleted file mode 100644
index d1bc9a5..0000000
--- a/blt3.0/src/tkDisplay.h
+++ /dev/null
@@ -1,906 +0,0 @@
-
-/*
- * tkDisplay.h --
- *
- * Excerpts from tkInt.h.  Used to examine window internals.
- *
- *	Copyright 1998-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file contains excerpts from tkInt.h of the TCL library distribution.
- *
- *	Copyright (c) 1987-1993 The Regents of the University of
- *	California.
- *
- *	Copyright (c) 1994-1998 Sun Microsystems, Inc.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#ifndef _TK_DISPLAY_H
-#define _TK_DISPLAY_H
-
-typedef struct _TkIdStack TkIdStack;
-typedef struct _TkErrorHandler TkErrorHandler;
-typedef struct _TkSelectionInfo TkSelectionInfo;
-typedef struct _TkClipboardTarget TkClipboardTarget;
-
-typedef struct _TkWindow TkWindow;
-typedef struct _TkWindowEvent TkWindowEvent;
-typedef struct _TkEventHandler TkEventHandler;
-typedef struct _TkSelHandler TkSelHandler;
-typedef struct _TkWinInfo TkWinInfo;
-typedef struct _TkClassProcs TkClassProcs;
-typedef struct _TkWindowPrivate TkWindowPrivate;
-typedef struct _TkGrabEvent TkGrabEvent;
-typedef struct _TkColormap TkColormap;
-typedef struct _TkStressedCmap TkStressedCmap;
-typedef struct _TkWmInfo TkWmInfo;
-
-typedef struct _TkBindInfo *TkBindInfo;
-typedef struct _TkRegion *TkRegion;
-typedef struct _TkpCursor *TkpCursor;
-
-#ifdef XNQueryInputStyle
-#define TK_USE_INPUT_METHODS
-#endif	/* XNQueryInputStyle */
-
-/*
- * This defines whether we should try to use XIM over-the-spot style
- * input.  Allow users to override it.  It is a much more elegant use
- * of XIM, but uses a bit more memory.
- */
-#ifndef TK_XIM_SPOT
-#   define TK_XIM_SPOT	1
-#endif	/* TK_XIM_SPOT */
-
-#ifndef TK_REPARENTED
-#define TK_REPARENTED 	0
-#endif /* TK_REPARENTED */
-
-/*
- * Tk keeps one of the following data structures for each main
- * window (created by a call to TkCreateMainWindow).  It stores
- * information that is shared by all of the windows associated
- * with a particular main window.
- */
-
-typedef struct TkMainInfo {
-    int refCount;		/* Number of windows whose "mainPtr" fields
-				 * point here.  When this becomes zero, can
-				 * free up the structure (the reference
-				 * count is zero because windows can get
-				 * deleted in almost any order;  the main
-				 * window isn't necessarily the last one
-				 * deleted). */
-    struct TkWindow *winPtr;	/* Pointer to main window. */
-    Tcl_Interp *interp;		/* Interpreter associated with application. */
-    Tcl_HashTable nameTable;	/* Hash table mapping path names to TkWindow
-				 * structs for all windows related to this
-				 * main window.  Managed by tkWindow.c. */
-    long deletionEpoch;		/* Incremented by window deletions */
-    Tk_BindingTable bindingTable;
-				/* Used in conjunction with "bind" command
-				 * to bind events to TCL commands. */
-    TkBindInfo bindInfo;	/* Information used by tkBind.c on a per
-				 * application basis. */
-    struct TkFontInfo *fontInfoPtr;
-				/* Information used by tkFont.c on a per
-				 * application basis. */
-
-    /*
-     * Information used only by tkFocus.c and tk*Embed.c:
-     */
-
-    struct TkToplevelFocusInfo *tlFocusPtr;
-				/* First in list of records containing focus
-				 * information for each top-level in the
-				 * application.  Used only by tkFocus.c. */
-    struct TkDisplayFocusInfo *displayFocusPtr;
-				/* First in list of records containing focus
-				 * information for each display that this
-				 * application has ever used.  Used only
-				 * by tkFocus.c. */
-
-    struct ElArray *optionRootPtr;
-				/* Top level of option hierarchy for this
-				 * main window.  NULL means uninitialized.
-				 * Managed by tkOption.c. */
-    Tcl_HashTable imageTable;	/* Maps from image names to Tk_ImageMaster
-				 * structures.  Managed by tkImage.c. */
-    int strictMotif;		/* This is linked to the tk_strictMotif
-				 * global variable. */
-
-#if (_TK_VERSION >= _VERSION(8,5,0))
-    int alwaysShowSelection;	/* This is linked to the
-				 * ::tk::AlwaysShowSelection variable. */
-#endif /* TK_VERSION >= 8.5.0 */
-    struct TkMainInfo *nextPtr;	/* Next in list of all main windows managed by
-				 * this process. */
-} TkMainInfo;
-
-#if (_TK_VERSION >= _VERSION(8,1,0))
-
-typedef struct TkCaret {
-    struct TkWindow *winPtr;	/* the window on which we requested caret
-				 * placement */
-    int x;			/* relative x coord of the caret */
-    int y;			/* relative y coord of the caret */
-    int height;			/* specified height of the window */
-} TkCaret;
-
-/*
- * One of the following structures is maintained for each display
- * containing a window managed by Tk.  In part, the structure is
- * used to store thread-specific data, since each thread will have
- * its own TkDisplay structure.
- */
-
-typedef struct _TkDisplay {
-    Display *display;		/* Xlib's info about display. */
-    struct _TkDisplay *nextPtr; /* Next in list of all displays. */
-    char *name;			/* Name of display (with any screen
-				 * identifier removed).  Malloc-ed. */
-    Time lastEventTime;		/* Time of last event received for this
-				 * display. */
-
-    /*
-     * Information used primarily by tk3d.c:
-     */
-
-    int borderInit;		/* 0 means borderTable needs initializing. */
-    Tcl_HashTable borderTable;	/* Maps from color name to TkBorder
-				 * structure. */
-
-    /*
-     * Information used by tkAtom.c only:
-     */
-
-    int atomInit;		/* 0 means stuff below hasn't been
-				 * initialized yet. */
-    Tcl_HashTable nameTable;	/* Maps from names to Atom's. */
-    Tcl_HashTable atomTable;	/* Maps from Atom's back to names. */
-
-    /*
-     * Information used primarily by tkBind.c:
-     */
-
-    int bindInfoStale;		/* Non-zero means the variables in this
-				 * part of the structure are potentially
-				 * incorrect and should be recomputed. */
-    unsigned int modeModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to "mode shift".  If no
-				 * such modifier, than this is zero. */
-    unsigned int metaModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to the "Meta" key.  If no
-				 * such modifier, then this is zero. */
-    unsigned int altModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to the "Meta" key.  If no
-				 * such modifier, then this is zero. */
-    enum {
-	LU_IGNORE, LU_CAPS, LU_SHIFT
-    } lockUsage;		/* Indicates how to interpret lock modifier. */
-    int numModKeyCodes;		/* Number of entries in modKeyCodes array
-				 * below. */
-    KeyCode *modKeyCodes;	/* Pointer to an array giving keycodes for
-				 * all of the keys that have modifiers
-				 * associated with them.  Malloc'ed, but
-				 * may be NULL. */
-
-    /*
-     * Information used by tkBitmap.c only:
-     */
-
-    int bitmapInit;		/* 0 means tables above need initializing. */
-    int bitmapAutoNumber;	/* Used to number bitmaps. */
-    Tcl_HashTable bitmapNameTable;
-				/* Maps from name of bitmap to the first
-				 * TkBitmap record for that name. */
-    Tcl_HashTable bitmapIdTable;/* Maps from bitmap id to the TkBitmap
-				 * structure for the bitmap. */
-    Tcl_HashTable bitmapDataTable;
-				/* Used by Tk_GetBitmapFromData to map from
-				 * a collection of in-core data about a
-				 * bitmap to a reference giving an auto-
-				 * matically-generated name for the bitmap. */
-
-    /*
-     * Information used by tkCanvas.c only:
-     */
-
-    int numIdSearches;
-    int numSlowSearches;
-
-    /*
-     * Used by tkColor.c only:
-     */
-
-    int colorInit;		/* 0 means color module needs initializing. */
-    TkStressedCmap *stressPtr;	/* First in list of colormaps that have
-				 * filled up, so we have to pick an
-				 * approximate color. */
-    Tcl_HashTable colorNameTable;
-				/* Maps from color name to TkColor structure
-				 * for that color. */
-    Tcl_HashTable colorValueTable;
-				/* Maps from integer RGB values to TkColor
-				 * structures. */
-
-    /*
-     * Used by tkCursor.c only:
-     */
-
-    int cursorInit;		/* 0 means cursor module need initializing. */
-    Tcl_HashTable cursorNameTable;
-				/* Maps from a string name to a cursor to the
-				 * TkCursor record for the cursor. */
-    Tcl_HashTable cursorDataTable;
-				/* Maps from a collection of in-core data
-				 * about a cursor to a TkCursor structure. */
-    Tcl_HashTable cursorIdTable;
-				/* Maps from a cursor id to the TkCursor
-				 * structure for the cursor. */
-    char cursorString[20];	/* Used to store a cursor id string. */
-    Font cursorFont;		/* Font to use for standard cursors.
-				 * None means font not loaded yet. */
-
-    /*
-     * Information used by tkError.c only:
-     */
-
-    struct TkErrorHandler *errorPtr;
-				/* First in list of error handlers
-				 * for this display.  NULL means
-				 * no handlers exist at present. */
-    int deleteCount;		/* Counts # of handlers deleted since
-				 * last time inactive handlers were
-				 * garbage-collected.  When this number
-				 * gets big, handlers get cleaned up. */
-
-    /*
-     * Used by tkEvent.c only:
-     */
-
-    struct TkWindowEvent *delayedMotionPtr;
-				/* Points to a malloc-ed motion event
-				 * whose processing has been delayed in
-				 * the hopes that another motion event
-				 * will come along right away and we can
-				 * merge the two of them together.  NULL
-				 * means that there is no delayed motion
-				 * event. */
-
-    /*
-     * Information used by tkFocus.c only:
-     */
-
-    int focusDebug;		/* 1 means collect focus debugging
-				 * statistics. */
-    struct TkWindow *implicitWinPtr;
-				/* If the focus arrived at a toplevel window
-				 * implicitly via an Enter event (rather
-				 * than via a FocusIn event), this points
-				 * to the toplevel window.  Otherwise it is
-				 * NULL. */
-    struct TkWindow *focusPtr;	/* Points to the window on this display that
-				 * should be receiving keyboard events.  When
-				 * multiple applications on the display have
-				 * the focus, this will refer to the
-				 * innermost window in the innermost
-				 * application.  This information isn't used
-				 * under Unix or Windows, but it's needed on
-				 * the Macintosh. */
-
-    /*
-     * Information used by tkGC.c only:
-     */
-
-    Tcl_HashTable gcValueTable;	/* Maps from a GC's values to a TkGC structure
-				 * describing a GC with those values. */
-    Tcl_HashTable gcIdTable;	/* Maps from a GC to a TkGC. */
-    int gcInit;			/* 0 means the tables below need
-				 * initializing. */
-
-    /*
-     * Information used by tkGeometry.c only:
-     */
-
-    Tcl_HashTable maintainHashTable;
-				/* Hash table that maps from a master's
-				 * Tk_Window token to a list of slaves
-				 * managed by that master. */
-    int geomInit;
-
-    /*
-     * Information used by tkGet.c only:
-     */
-
-    Tcl_HashTable uidTable;	/* Stores all Tk_Uids used in a thread. */
-    int uidInit;		/* 0 means uidTable needs initializing. */
-
-    /*
-     * Information used by tkGrab.c only:
-     */
-
-    struct TkWindow *grabWinPtr;
-				/* Window in which the pointer is currently
-				 * grabbed, or NULL if none. */
-    struct TkWindow *eventualGrabWinPtr;
-				/* Value that grabWinPtr will have once the
-				 * grab event queue (below) has been
-				 * completely emptied. */
-    struct TkWindow *buttonWinPtr;
-				/* Window in which first mouse button was
-				 * pressed while grab was in effect, or NULL
-				 * if no such press in effect. */
-    struct TkWindow *serverWinPtr;
-				/* If no application contains the pointer then
-				 * this is NULL.  Otherwise it contains the
-				 * last window for which we've gotten an
-				 * Enter or Leave event from the server (i.e.
-				 * the last window known to have contained
-				 * the pointer).  Doesn't reflect events
-				 * that were synthesized in tkGrab.c. */
-    TkGrabEvent *firstGrabEventPtr;
-				/* First in list of enter/leave events
-				 * synthesized by grab code.  These events
-				 * must be processed in order before any other
-				 * events are processed.  NULL means no such
-				 * events. */
-    TkGrabEvent *lastGrabEventPtr;
-				/* Last in list of synthesized events, or NULL
-				 * if list is empty. */
-    int grabFlags;		/* Miscellaneous flag values.  See definitions
-				 * in tkGrab.c. */
-
-    /*
-     * Information used by tkGrid.c only:
-     */
-
-    int gridInit;		/* 0 means table below needs initializing. */
-    Tcl_HashTable gridHashTable;/* Maps from Tk_Window tokens to
-				 * corresponding Grid structures. */
-
-    /*
-     * Information used by tkImage.c only:
-     */
-
-    int imageId;		/* Value used to number image ids. */
-
-    /*
-     * Information used by tkMacWinMenu.c only:
-     */
-
-    int postCommandGeneration;
-
-    /*
-     * Information used by tkOption.c only.
-     */
-
-
-
-    /*
-     * Information used by tkPack.c only.
-     */
-
-    int packInit;		/* 0 means table below needs initializing. */
-    Tcl_HashTable packerHashTable;
-				/* Maps from Tk_Window tokens to
-				 * corresponding Packer structures. */
-
-
-    /*
-     * Information used by tkPlace.c only.
-     */
-
-    int placeInit;		/* 0 means tables below need initializing. */
-    Tcl_HashTable masterTable;	/* Maps from Tk_Window toke to the Master
-				 * structure for the window, if it exists. */
-    Tcl_HashTable slaveTable;	/* Maps from Tk_Window toke to the Slave
-				 * structure for the window, if it exists. */
-
-    /*
-     * Information used by tkSelect.c and tkClipboard.c only:
-     */
-
-
-    struct TkSelectionInfo *selectionInfoPtr;
-    /* First in list of selection information
-				 * records.  Each entry contains information
-				 * about the current owner of a particular
-				 * selection on this display. */
-    Atom multipleAtom;		/* Atom for MULTIPLE.  None means
-				 * selection stuff isn't initialized. */
-    Atom incrAtom;		/* Atom for INCR. */
-    Atom targetsAtom;		/* Atom for TARGETS. */
-    Atom timestampAtom;		/* Atom for TIMESTAMP. */
-    Atom textAtom;		/* Atom for TEXT. */
-    Atom compoundTextAtom;	/* Atom for COMPOUND_TEXT. */
-    Atom applicationAtom;	/* Atom for TK_APPLICATION. */
-    Atom windowAtom;		/* Atom for TK_WINDOW. */
-    Atom clipboardAtom;		/* Atom for CLIPBOARD. */
-#if (_TK_VERSION >= _VERSION(8,4,0))
-    Atom utf8Atom;
-#endif	/* TK_VERSION >= 8.4.0 */
-    Tk_Window clipWindow;	/* Window used for clipboard ownership and to
-				 * retrieve selections between processes. NULL
-				 * means clipboard info hasn't been
-				 * initialized. */
-    int clipboardActive;	/* 1 means we currently own the clipboard
-				 * selection, 0 means we don't. */
-    struct TkMainInfo *clipboardAppPtr;
-				/* Last application that owned clipboard. */
-    struct TkClipboardTarget *clipTargetPtr;
-				/* First in list of clipboard type information
-				 * records.  Each entry contains information
-				 * about the buffers for a given selection
-				 * target. */
-
-    /*
-     * Information used by tkSend.c only:
-     */
-
-    Tk_Window commTkwin;	/* Window used for communication
-				 * between interpreters during "send"
-				 * commands.  NULL means send info hasn't
-				 * been initialized yet. */
-    Atom commProperty;		/* X's name for comm property. */
-    Atom registryProperty;	/* X's name for property containing
-				 * registry of interpreter names. */
-    Atom appNameProperty;	/* X's name for property used to hold the
-				 * application name on each comm window. */
-
-    /*
-     * Information used by tkXId.c only:
-     */
-
-    struct TkIdStack *idStackPtr;
-				/* First in list of chunks of free resource
-				 * identifiers, or NULL if there are no free
-				 * resources. */
-    XID(*defaultAllocProc)(Display *display);
-				/* Default resource allocator for display. */
-    struct TkIdStack *windowStackPtr;
-				/* First in list of chunks of window
-				 * identifers that can't be reused right
-				 * now. */
-#if (_TK_VERSION < _VERSION(8,4,0))
-    int idCleanupScheduled;	/* 1 means a call to WindowIdCleanup has
-				 * already been scheduled, 0 means it
-				 * hasn't. */
-#else
-    Tcl_TimerToken idCleanupScheduled;
-				/* If set, it means a call to WindowIdCleanup
-				 * has already been scheduled, 0 means it
-				 * hasn't. */
-#endif	/* TK_VERSION < 8.4.0 */
-    /*
-     * Information used by tkUnixWm.c and tkWinWm.c only:
-     */
-
-#if (_TK_VERSION < _VERSION(8,4,0))
-    int wmTracing;		/* Used to enable or disable tracing in
-				 * this module.  If tracing is enabled,
-				 * then information is printed on
-				 * standard output about interesting
-				 * interactions with the window manager. */
-#endif /* TK_VERSION < 8.4.0 */
-    struct TkWmInfo *firstWmPtr; /* Points to first top-level window. */
-    struct TkWmInfo *foregroundWmPtr;
-				/* Points to the foreground window. */
-
-    /*
-     * Information maintained by tkWindow.c for use later on by tkXId.c:
-     */
-
-
-    int destroyCount;		/* Number of Tk_DestroyWindow operations
-				 * in progress. */
-    unsigned long lastDestroyRequest;
-				/* Id of most recent XDestroyWindow request;
-				 * can re-use ids in windowStackPtr when
-				 * server has seen this request and event
-				 * queue is empty. */
-
-    /*
-     * Information used by tkVisual.c only:
-     */
-
-    TkColormap *cmapPtr;	/* First in list of all non-default colormaps
-				 * allocated for this display. */
-
-    /*
-     * Miscellaneous information:
-     */
-
-#ifdef TK_USE_INPUT_METHODS
-    XIM inputMethod;		/* Input method for this display */
-#  if (_TK_VERSION >= _VERSION(8,5,0))
-    XIMStyle inputStyle;	/* Input style selected for this display. */
-#  endif	/* TK_VERSION >= 8.5.0 */
-#  if (_TK_VERSION >= _VERSION(8,4,0))
-#    if TK_XIM_SPOT
-    XFontSet inputXfs;		/* XFontSet cached for over-the-spot XIM. */
-#    endif /* TK_XIM_SPOT */
-#  endif /* _TK_VERSION >= 8.4 */
-#endif /* TK_USE_INPUT_METHODS */
-    Tcl_HashTable winTable;	/* Maps from X window ids to TkWindow ptrs. */
-    int refCount;		/* Reference count of how many Tk applications
-                                 * are using this display. Used to clean up
-                                 * the display when we no longer have any
-                                 * Tk applications using it.
-                                 */
-    /*
-     * The following field were all added for Tk8.3
-     */
-    int mouseButtonState;       /* current mouse button state for this
-                                 * display */
-
-#if (_TK_VERSION < _VERSION(8,4,0))
-    int warpInProgress;
-#else 
-    Window mouseButtonWindow;	/* Window the button state was set in, added
-				 * in Tk 8.4. */
-#endif	/* TK_VERSION < 8.4.0 */
-    Window warpWindow;
-    int warpX;
-    int warpY;
-
-#if (_TK_VERSION < _VERSION(8,4,0))
-    int useInputMethods;        /* Whether to use input methods */
-    long deletionEpoch;		/* Incremented by window deletions */
-#endif	/* TK_VERSION < 8.4.0 */
-    /*
-     * The following field(s) were all added for Tk8.4
-     */
-    unsigned int flags;		/* Various flag values:  these are all
-				 * defined in below. */
-    TkCaret caret;		/* information about the caret for this
-				 * display.  This is not a pointer. */
-#if (_TK_VERSION >= _VERSION(8,4,0))
-    int iconDataSize;		/* Size of default iconphoto image data. */
-    unsigned char *iconDataPtr;	/* Default iconphoto image data, if set. */
-#endif	/* TK_VERSION > 8.4.0 */
-
-} TkDisplay;
-
-#else
-
-/*
- * One of the following structures is maintained for each display
- * containing a window managed by Tk:
- */
-typedef struct _TkDisplay {
-    Display *display;		/* Xlib's info about display. */
-    struct _TkDisplay *nextPtr; /* Next in list of all displays. */
-    char *name;			/* Name of display (with any screen
-				 * identifier removed).  Malloc-ed. */
-    Time lastEventTime;		/* Time of last event received for this
-				 * display. */
-
-    /*
-     * Information used primarily by tkBind.c:
-     */
-
-    int bindInfoStale;		/* Non-zero means the variables in this
-				 * part of the structure are potentially
-				 * incorrect and should be recomputed. */
-    unsigned int modeModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to "mode shift".  If no
-				 * such modifier, than this is zero. */
-    unsigned int metaModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to the "Meta" key.  If no
-				 * such modifier, then this is zero. */
-    unsigned int altModMask;	/* Has one bit set to indicate the modifier
-				 * corresponding to the "Meta" key.  If no
-				 * such modifier, then this is zero. */
-    enum {
-	LU_IGNORE, LU_CAPS, LU_SHIFT
-    } lockUsage;
-    /* Indicates how to interpret lock modifier. */
-    int numModKeyCodes;		/* Number of entries in modKeyCodes array
-				 * below. */
-    KeyCode *modKeyCodes;	/* Pointer to an array giving keycodes for
-				 * all of the keys that have modifiers
-				 * associated with them.  Malloc'ed, but
-				 * may be NULL. */
-
-    /*
-     * Information used by tkError.c only:
-     */
-
-    TkErrorHandler *errorPtr;
-    /* First in list of error handlers
-				 * for this display.  NULL means
-				 * no handlers exist at present. */
-     int deleteCount;		/* Counts # of handlers deleted since
-				 * last time inactive handlers were
-				 * garbage-collected.  When this number
-				 * gets big, handlers get cleaned up. */
-
-    /*
-     * Information used by tkSend.c only:
-     */
-
-    Tk_Window commTkwin;	/* Window used for communication
-				 * between interpreters during "send"
-				 * commands.  NULL means send info hasn't
-				 * been initialized yet. */
-    Atom commProperty;		/* X's name for comm property. */
-    Atom registryProperty;	/* X's name for property containing
-				 * registry of interpreter names. */
-    Atom appNameProperty;	/* X's name for property used to hold the
-				 * application name on each comm window. */
-
-    /*
-     * Information used by tkSelect.c and tkClipboard.c only:
-     */
-
-     TkSelectionInfo *selectionInfoPtr;
-    /* First in list of selection information
-				 * records.  Each entry contains information
-				 * about the current owner of a particular
-				 * selection on this display. */
-    Atom multipleAtom;		/* Atom for MULTIPLE.  None means
-				 * selection stuff isn't initialized. */
-    Atom incrAtom;		/* Atom for INCR. */
-    Atom targetsAtom;		/* Atom for TARGETS. */
-    Atom timestampAtom;		/* Atom for TIMESTAMP. */
-    Atom textAtom;		/* Atom for TEXT. */
-    Atom compoundTextAtom;	/* Atom for COMPOUND_TEXT. */
-    Atom applicationAtom;	/* Atom for TK_APPLICATION. */
-    Atom windowAtom;		/* Atom for TK_WINDOW. */
-    Atom clipboardAtom;		/* Atom for CLIPBOARD. */
-
-    Tk_Window clipWindow;	/* Window used for clipboard ownership and to
-				 * retrieve selections between processes. NULL
-				 * means clipboard info hasn't been
-				 * initialized. */
-    int clipboardActive;	/* 1 means we currently own the clipboard
-				 * selection, 0 means we don't. */
-     TkMainInfo *clipboardAppPtr;
-     /* Last application that owned clipboard. */
-     TkClipboardTarget *clipTargetPtr;
-     /* First in list of clipboard type information
-				 * records.  Each entry contains information
-				 * about the buffers for a given selection
-				 * target. */
-
-    /*
-     * Information used by tkAtom.c only:
-     */
-
-    int atomInit;		/* 0 means stuff below hasn't been
-				 * initialized yet. */
-    Tcl_HashTable nameTable;	/* Maps from names to Atom's. */
-    Tcl_HashTable atomTable;	/* Maps from Atom's back to names. */
-
-    /*
-     * Information used by tkCursor.c only:
-     */
-
-    Font cursorFont;		/* Font to use for standard cursors.
-				 * None means font not loaded yet. */
-
-    /*
-     * Information used by tkGrab.c only:
-     */
-
-     TkWindow *grabWinPtr;
-    /* Window in which the pointer is currently
-				 * grabbed, or NULL if none. */
-     TkWindow *eventualGrabWinPtr;
-    /* Value that grabWinPtr will have once the
-				 * grab event queue (below) has been
-				 * completely emptied. */
-     TkWindow *buttonWinPtr;
-    /* Window in which first mouse button was
-				 * pressed while grab was in effect, or NULL
-				 * if no such press in effect. */
-     TkWindow *serverWinPtr;
-    /* If no application contains the pointer then
-				 * this is NULL.  Otherwise it contains the
-				 * last window for which we've gotten an
-				 * Enter or Leave event from the server (i.e.
-				 * the last window known to have contained
-				 * the pointer).  Doesn't reflect events
-				 * that were synthesized in tkGrab.c. */
-    TkGrabEvent *firstGrabEventPtr;
-    /* First in list of enter/leave events
-				 * synthesized by grab code.  These events
-				 * must be processed in order before any other
-				 * events are processed.  NULL means no such
-				 * events. */
-    TkGrabEvent *lastGrabEventPtr;
-    /* Last in list of synthesized events, or NULL
-				 * if list is empty. */
-    int grabFlags;		/* Miscellaneous flag values.  See definitions
-				 * in tkGrab.c. */
-
-    /*
-     * Information used by tkXId.c only:
-     */
-
-     TkIdStack *idStackPtr;
-    /* First in list of chunks of free resource
-				 * identifiers, or NULL if there are no free
-				 * resources. */
-              XID(*defaultAllocProc)(Display *display);
-    /* Default resource allocator for display. */
-     TkIdStack *windowStackPtr;
-    /* First in list of chunks of window
-				 * identifers that can't be reused right
-				 * now. */
-    int idCleanupScheduled;	/* 1 means a call to WindowIdCleanup has
-				 * already been scheduled, 0 means it
-				 * hasn't. */
-
-    /*
-     * Information maintained by tkWindow.c for use later on by tkXId.c:
-     */
-
-
-    int destroyCount;		/* Number of Tk_DestroyWindow operations
-				 * in progress. */
-    unsigned long lastDestroyRequest;
-    /* Id of most recent XDestroyWindow request;
-				 * can re-use ids in windowStackPtr when
-				 * server has seen this request and event
-				 * queue is empty. */
-
-    /*
-     * Information used by tkVisual.c only:
-     */
-
-    TkColormap *cmapPtr;	/* First in list of all non-default colormaps
-				 * allocated for this display. */
-
-    /*
-     * Information used by tkFocus.c only:
-     */
-     TkWindow *implicitWinPtr;
-				/* If the focus arrived at a toplevel window
-				 * implicitly via an Enter event (rather
-				 * than via a FocusIn event), this points
-				 * to the toplevel window.  Otherwise it is
-				 * NULL. */
-     TkWindow *focusPtr;	/* Points to the window on this display that
-				 * should be receiving keyboard events.  When
-				 * multiple applications on the display have
-				 * the focus, this will refer to the
-				 * innermost window in the innermost
-				 * application.  This information isn't used
-				 * under Unix or Windows, but it's needed on
-				 * the Macintosh. */
-
-    /*
-     * Used by tkColor.c only:
-     */
-
-    TkStressedCmap *stressPtr;	/* First in list of colormaps that have
-				 * filled up, so we have to pick an
-				 * approximate color. */
-
-    /*
-     * Used by tkEvent.c only:
-     */
-
-     TkWindowEvent *delayedMotionPtr;
-				/* Points to a malloc-ed motion event
-				 * whose processing has been delayed in
-				 * the hopes that another motion event
-				 * will come along right away and we can
-				 * merge the two of them together.  NULL
-				 * means that there is no delayed motion
-				 * event. */
-    /*
-     * Miscellaneous information:
-     */
-
-#ifdef TK_USE_INPUT_METHODS
-    XIM inputMethod;		/* Input method for this display */
-#endif /* TK_USE_INPUT_METHODS */
-    Tcl_HashTable winTable;	/* Maps from X window ids to TkWindow ptrs. */
-    int refCount;		/* Reference count of how many Tk applications
-                                 * are using this display. Used to clean up
-                                 * the display when we no longer have any
-                                 * Tk applications using it.
-                                 */
-} TkDisplay;
-
-#endif /* _TK_VERSION >= _VERSION(8,1,0) */
-
-
-struct _TkWindow {
-    Display *display;
-    TkDisplay *dispPtr;
-    int screenNum;
-    Visual *visual;
-    int depth;
-    Window window;
-    TkWindow *childList;
-    TkWindow *lastChildPtr;
-    TkWindow *parentPtr;
-    TkWindow *nextPtr;
-    TkMainInfo *mainPtr;
-    char *pathName;
-    Tk_Uid nameUid;
-    Tk_Uid classUid;
-    XWindowChanges changes;
-    unsigned int dirtyChanges;
-    XSetWindowAttributes atts;
-    unsigned long dirtyAtts;
-    unsigned int flags;
-    TkEventHandler *handlerList;
-#ifdef TK_USE_INPUT_METHODS
-    XIC inputContext;
-#endif /* TK_USE_INPUT_METHODS */
-    ClientData *tagPtr;
-    int nTags;
-    int optionLevel;
-    TkSelHandler *selHandlerList;
-    Tk_GeomMgr *geomMgrPtr;
-    ClientData geomData;
-    int reqWidth, reqHeight;
-    int internalBW;
-    TkWinInfo *wmInfoPtr;
-    TkClassProcs *classProcsPtr;
-    ClientData instanceData;
-    TkWindowPrivate *privatePtr;
-
-#if (_TK_VERSION >= _VERSION(8,4,0))
-    /* The remaining fields of internal border. */
-    int internalBorderRight; 
-    int internalBorderTop;
-    int internalBorderBottom;
-    
-    int minReqWidth;		/* Minimum requested width. */
-    int minReqHeight;		/* Minimum requested height. */
-#endif
-};
-
-/*
- * This structure is used by the Mac and Window porting layers as
- * the internal representation of a clip_mask in a GC.
- */
-
-typedef struct {
-    int type;			/* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */
-    union {
-	Pixmap pixmap;
-	TkRegion region;
-    } value;
-} TkpClipMask;
-
-#define TKP_CLIP_PIXMAP 0
-#define TKP_CLIP_REGION 1
-
-#ifdef WIN32
-#include "tkWinDisplay.h"
-#endif
-
-#endif /* _TK_DISPLAY_H */
diff --git a/blt3.0/src/tkFont.h b/blt3.0/src/tkFont.h
deleted file mode 100644
index 9c28138..0000000
--- a/blt3.0/src/tkFont.h
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/*
- * tkFont.h --
- *
- *
- * This file contains definitions of internal Tk font structures.
- *
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#ifndef _TK_FONT_H
-#define _TK_FONT_H
-
-/*
- * Possible values for the "weight" field in a TkFontAttributes structure.
- * Weight is a subjective term and depends on what the company that created
- * the font considers bold.
- */
-
-#define TK_FW_NORMAL	0
-#define TK_FW_BOLD	1
-
-#define TK_FW_UNKNOWN	-1	/* Unknown weight.  This value is used for
-				 * error checking and is never actually stored
-				 * in the weight field. */
-
-/*
- * Possible values for the "slant" field in a TkFontAttributes structure.
- */
-
-#define TK_FS_ROMAN	0	
-#define TK_FS_ITALIC	1
-#define TK_FS_OBLIQUE	2	/* This value is only used when parsing X
-				 * font names to determine the closest
-				 * match.  It is only stored in the
-				 * XLFDAttributes structure, never in the
-				 * slant field of the TkFontAttributes. */
-
-#define TK_FS_UNKNOWN	-1	/* Unknown slant.  This value is used for
-				 * error checking and is never actually stored
-				 * in the slant field. */
-typedef struct {
-    Tk_Uid family;		/* Font family. The most important field. */
-    int size;			/* Pointsize of font, 0 for default size, or
-				 * negative number meaning pixel size. */
-    int weight;			/* Weight flag; see below for def'n. */
-    int slant;			/* Slant flag; see below for def'n. */
-    int underline;		/* Non-zero for underline font. */
-    int overstrike;		/* Non-zero for overstrike font. */
-} TkFontAttributes;
-
-typedef struct {
-    int ascent;			/* From baseline to top of font. */
-    int descent;		/* From baseline to bottom of font. */
-    int maxWidth;		/* Width of widest character in font. */
-    int fixed;			/* Non-zero if this is a fixed-width font,
-				 * 0 otherwise. */
-} TkFontMetrics;
-
-
-typedef struct _TkFont {
-    /*
-     * Fields used and maintained exclusively by generic code.
-     */
-#if (_TK_VERSION >= _VERSION(8,1,0))
-    int resourceRefCount;	/* Number of active uses of this font (each
-				 * active use corresponds to a call to
-				 * Tk_AllocFontFromTable or Tk_GetFont).
-				 * If this count is 0, then this TkFont
-				 * structure is no longer valid and it isn't
-				 * present in a hash table: it is being
-				 * kept around only because there are objects
-				 * referring to it.  The structure is freed
-				 * when resourceRefCount and objRefCount
-				 * are both 0. */
-    int objRefCount;		/* The number of TCL objects that reference
-				 * this structure. */
-#else
-    int refCount;		/* Number of users of the TkFont. */
-#endif
-    Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure,
-				 * used when deleting it. */
-    Tcl_HashEntry *namedHashPtr;/* Pointer to hash table entry that
-				 * corresponds to the named font that the
-				 * tkfont was based on, or NULL if the tkfont
-				 * was not based on a named font. */
-#if (_TK_VERSION >= _VERSION(8,1,0))
-    Screen *screen;		/* The screen where this font is valid. */
-#endif /* _TK_VERSION >= 8.1.0 */
-    int tabWidth;		/* Width of tabs in this font (pixels). */
-    int underlinePos;		/* Offset from baseline to origin of
-				 * underline bar (used for drawing underlines
-				 * on a non-underlined font). */
-    int underlineHeight;	/* Height of underline bar (used for drawing
-				 * underlines on a non-underlined font). */
-
-    /*
-     * Fields in the generic font structure that are filled in by
-     * platform-specific code.
-     */
-
-    Font fid;			/* For backwards compatibility with XGCValues
-				 * structures.  Remove when TkGCValues is
-				 * implemented.  */
-    TkFontAttributes fa;	/* Actual font attributes obtained when the
-				 * the font was created, as opposed to the
-				 * desired attributes passed in to
-				 * TkpGetFontFromAttributes().  The desired
-				 * metrics can be determined from the string
-				 * that was used to create this font. */
-    TkFontMetrics fm;		/* Font metrics determined when font was
-				 * created. */
-#if (_TK_VERSION >= _VERSION(8,1,0))
-    struct _TkFont *nextPtr;	/* Points to the next TkFont structure with
-				 * the same name.  All fonts with the
-				 * same name (but different displays) are
-				 * chained together off a single entry in
-				 * a hash table. */
-#endif /* _TK_VERSION >= 8.1.0 */
-} TkFont;
-
-typedef struct TkXLFDAttributes {
-    Tk_Uid foundry;		/* The foundry of the font. */
-    int slant;			/* The tristate value for the slant, which
-				 * is significant under X. */
-    int setwidth;		/* The proportionate width, see below for
-				 * definition. */
-    Tk_Uid charset;		/* The actual charset string. */
-} TkXLFDAttributes;
-
-
-#ifdef notdef
-static const char *encodingList[] = {
-    "ucs-2be", "iso8859-1", "jis0208", "jis0212", NULL
-};
-#endif
-/*
- * The following structure and definition is used to keep track of the
- * alternative names for various encodings.  Asking for an encoding that
- * matches one of the alias patterns will result in actually getting the
- * encoding by its real name.
- */
- 
-typedef struct EncodingAlias {
-    char *realName;		/* The real name of the encoding to load if
-				 * the provided name matched the pattern. */
-    char *aliasPattern;		/* Pattern for encoding name, of the form
-				 * that is acceptable to Tcl_StringMatch. */
-} EncodingAlias;
-
-/*
- * Just some utility structures used for passing around values in helper
- * procedures.
- */
- 
-typedef struct FontAttributes {
-    TkFontAttributes fa;
-    TkXLFDAttributes xa;
-} FontAttributes;
-
-typedef struct TkFontInfo {
-    Tcl_HashTable fontCache;	/* Map a string to an existing Tk_Font.
-				 * Keys are string font names, values are
-				 * TkFont pointers. */
-    Tcl_HashTable namedTable;	/* Map a name to a set of attributes for a
-				 * font, used when constructing a Tk_Font from
-				 * a named font description.  Keys are
-				 * strings, values are NamedFont pointers. */
-    TkMainInfo *mainPtr;	/* Application that owns this structure. */
-    int updatePending;		/* Non-zero when a World Changed event has
-				 * already been queued to handle a change to
-				 * a named font. */
-} TkFontInfo;
-
-#endif /* _TK_FONT_H */
diff --git a/blt3.0/src/tkFrame.c b/blt3.0/src/tkFrame.c
deleted file mode 100644
index 762e636..0000000
--- a/blt3.0/src/tkFrame.c
+++ /dev/null
@@ -1,974 +0,0 @@
-/*
- * tkFrame.c --
- *
- *	This module implements "frame"  and "toplevel" widgets for
- *	the Tk toolkit.  Frames are windows with a background color
- *	and possibly a 3-D effect, but not much else in the way of
- *	attributes.
- *
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * SCCS: @(#) tkFrame.c 1.68 96/02/15 18:53:30
- */
-
-#include "bltInt.h"
-#include "bltBgStyle.h"
-
-#ifndef NO_TKFRAME
-
-/*
- * Defaults for frames:
- */
-
-#define DEF_FRAME_BACKGROUND		STD_NORMAL_BACKGROUND
-#define DEF_FRAME_BG_MONO		STD_NORMAL_BG_MONO
-#define DEF_FRAME_BORDERWIDTH		"0"
-#define DEF_FRAME_CLASS			"Frame"
-#define DEF_FRAME_COLORMAP		""
-#define DEF_FRAME_CONTAINER		"0"
-#define DEF_FRAME_CURSOR		""
-#define DEF_FRAME_HEIGHT		"0"
-#define DEF_FRAME_HIGHLIGHT_BG		STD_NORMAL_BACKGROUND
-#define DEF_FRAME_HIGHLIGHT		RGB_BLACK
-#define DEF_FRAME_HIGHLIGHT_WIDTH	"0"
-#define DEF_FRAME_RELIEF		"flat"
-#define DEF_FRAME_TAKE_FOCUS		"0"
-#define DEF_FRAME_USE			""
-#define DEF_FRAME_VISUAL		""
-#define DEF_FRAME_WIDTH			"0"
-
-/*
- * Defaults for toplevels (most of the defaults for frames also apply
- * to toplevels):
- */
-
-#define DEF_TOPLEVEL_CLASS		"Toplevel"
-#define DEF_TOPLEVEL_SCREEN		""
-#define DEF_TOPLEVEL_MENU		""
-
-/*
- * A data structure of the following type is kept for each
- * frame that currently exists for this process:
- */
-
-typedef struct {
-    Tk_Window tkwin;		/* Window that embodies the frame.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up. */
-    Display *display;		/* Display containing widget.  Used, among
-				 * other things, so that resources can be
-				 * freed even after tkwin has gone away. */
-    Tcl_Interp *interp;		/* Interpreter associated with widget.  Used
-				 * to delete widget command. */
-    Tcl_Command widgetCmd;	/* Token for frame's widget command. */
-    char *className;		/* Class name for widget (from configuration
-				 * option).  Malloc-ed. */
-    int mask;			/* Either FRAME or TOPLEVEL;  used to select
-				 * which configuration options are valid for
-				 * widget. */
-    char *screenName;		/* Screen on which widget is created.  Non-null
-				 * only for top-levels.  Malloc-ed, may be
-				 * NULL. */
-    char *visualName;		/* Textual description of visual for window,
-				 * from -visual option.  Malloc-ed, may be
-				 * NULL. */
-    char *colormapName;		/* Textual description of colormap for window,
-				 * from -colormap option.  Malloc-ed, may be
-				 * NULL. */
-    char *menuName;		/* Textual description of menu to use for
-				 * menubar. Malloc-ed, may be NULL. */
-    Colormap colormap;		/* If not None, identifies a colormap
-				 * allocated for this window, which must be
-				 * freed when the window is deleted. */
-    Blt_Background normalBg;  /* Structure used to draw 3-D border and
-				 * background.  NULL means no background
-				 * or border. */
-    int borderWidth;		/* Width of 3-D border (if any). */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED etc. */
-    int highlightWidth;		/* Width in pixels of highlight to draw
-				 * around widget when it has the focus.
-				 * 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
-    /* Color for drawing traversal highlight
-				 * area when highlight is off. */
-    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
-    int width;			/* Width to request for window.  <= 0 means
-				 * don't request any size. */
-    int height;			/* Height to request for window.  <= 0 means
-				 * don't request any size. */
-    Tk_Cursor cursor;		/* Current cursor for window, or None. */
-    char *takeFocus;		/* Value of -takefocus option;  not used in
-				 * the C code, but used by keyboard traversal
-				 * scripts.  Malloc'ed, but may be NULL. */
-    int isContainer;		/* 1 means this window is a container, 0 means
-				 * that it isn't. */
-    char *useThis;		/* If the window is embedded, this points to
-				 * the name of the window in which it is
-				 * embedded (malloc'ed).  For non-embedded
-				 * windows this is NULL. */
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-} Frame;
-
-/*
- * Flag bits for frames:
- *
- * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler
- *				has already been queued to redraw
- *				this window.
- * GOT_FOCUS:			Non-zero means this widget currently
- *				has the input focus.
- */
-
-#define REDRAW_PENDING		1
-#define GOT_FOCUS		4
-
-/*
- * The following flag bits are used so that there can be separate
- * defaults for some configuration options for frames and toplevels.
- */
-
-#define FRAME		BLT_CONFIG_USER_BIT
-#define TOPLEVEL	(BLT_CONFIG_USER_BIT << 1)
-#define BOTH		(FRAME | TOPLEVEL)
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_FRAME_BACKGROUND, Blt_Offset(Frame, normalBg),
-	BOTH | BLT_CONFIG_COLOR_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BACKGROUND, "-background", "background", "Background",
-	DEF_FRAME_BG_MONO, Blt_Offset(Frame, normalBg),
-	BOTH | BLT_CONFIG_MONO_ONLY | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, BOTH},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, BOTH},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_FRAME_BORDERWIDTH, Blt_Offset(Frame, borderWidth), BOTH},
-    {BLT_CONFIG_STRING, "-class", "class", "Class",
-	DEF_FRAME_CLASS, Blt_Offset(Frame, className), FRAME},
-    {BLT_CONFIG_STRING, "-class", "class", "Class",
-	DEF_TOPLEVEL_CLASS, Blt_Offset(Frame, className), TOPLEVEL},
-    {BLT_CONFIG_STRING, "-colormap", "colormap", "Colormap",
-	DEF_FRAME_COLORMAP, Blt_Offset(Frame, colormapName),
-	BOTH | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-container", "container", "Container",
-	DEF_FRAME_CONTAINER, Blt_Offset(Frame, isContainer), BOTH},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
-	DEF_FRAME_CURSOR, Blt_Offset(Frame, cursor), BOTH | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height",
-	DEF_FRAME_HEIGHT, Blt_Offset(Frame, height), BOTH},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_FRAME_HIGHLIGHT_BG,
-	Blt_Offset(Frame, highlightBgColorPtr), BOTH},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_FRAME_HIGHLIGHT, Blt_Offset(Frame, highlightColorPtr), BOTH},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, 
-	Blt_Offset(Frame, highlightWidth), BOTH},
-    {BLT_CONFIG_STRING, "-menu", "menu", "Menu",
-	DEF_TOPLEVEL_MENU, Blt_Offset(Frame, menuName),
-	TOPLEVEL | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_FRAME_RELIEF, Blt_Offset(Frame, relief), BOTH},
-    {BLT_CONFIG_STRING, "-screen", "screen", "Screen",
-	DEF_TOPLEVEL_SCREEN, Blt_Offset(Frame, screenName),
-	TOPLEVEL | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_FRAME_TAKE_FOCUS, Blt_Offset(Frame, takeFocus),
-	BOTH | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-use", "use", "Use",
-	DEF_FRAME_USE, Blt_Offset(Frame, useThis), TOPLEVEL|BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-visual", "visual", "Visual",
-	DEF_FRAME_VISUAL, Blt_Offset(Frame, visualName),
-	BOTH | BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width",
-	DEF_FRAME_WIDTH, Blt_Offset(Frame, width), BOTH},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-
-static int ConfigureFrame (Tcl_Interp *interp, Frame * framePtr, 
-	int objc, Tcl_Obj *const *objv, int flags);
-
-static Tcl_FreeProc DestroyFrame;
-static Tcl_IdleProc DisplayFrame;
-static Tcl_CmdDeleteProc FrameCmdDeletedProc;
-static Tk_EventProc FrameEventProc;
-static Tcl_ObjCmdProc FrameWidgetCmd;
-static Tcl_IdleProc MapFrame;
-
-static Tcl_ObjCmdProc FrameCmd, ToplevelCmd;
-
-#ifdef TK_MAINWINDOW
-BLT_EXTERN 
-#else
-static
-#endif
-int TkCreateFrame (ClientData clientData, Tcl_Interp *interp, int objc, 
-	Tcl_Obj *const *objv, int toplevel, char *appName);
-
-#ifndef USE_TK_STUBS
-BLT_EXTERN void TkSetWindowMenuBar (Tcl_Interp *interp, Tk_Window tkwin,
-        char *oldMenuName, char *menuName);
-
-BLT_EXTERN Tk_Window TkCreateMainWindow (Tcl_Interp * interp, 
-	char *screenName, char *baseName);
-#if (_TK_VERSION >= _VERSION(8,4,0)) 
-#define TkSetClassProcs	Tk_SetClassProcs
-#else 
-BLT_EXTERN void TkSetClassProcs (Tk_Window tkwin, void *procs, 
-	ClientData instanceData);
-#endif /* TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION > 3 */
-
-BLT_EXTERN void TkpSetMainMenubar (Tcl_Interp * interp, Tk_Window tkwin, 
-	char *menuName);
-BLT_EXTERN int TkpUseWindow (Tcl_Interp * interp, Tk_Window tkwin, char * string);
-BLT_EXTERN void TkpMakeContainer (Tk_Window tkwin);
-#endif
-
-
-/*
- *---------------------------------------------------------------------------
- *
- * FrameCmd, ToplevelCmd --
- *
- *	These procedures are invoked to process the "frame" and
- *	"toplevel" TCL commands.  See the user documentation for
- *	details on what they do.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.  These procedures are just wrappers;
- *	they call ButtonCreate to do all of the real work.
- *
- *---------------------------------------------------------------------------
- */
-static int
-FrameCmd(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    return TkCreateFrame(clientData, interp, objc, objv, 0, (char *)NULL);
-}
-
-static int
-ToplevelCmd(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    return TkCreateFrame(clientData, interp, objc, objv, 1, (char *)NULL);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkFrameCreate --
- *
- *	This procedure is invoked to process the "frame" and "toplevel"
- *	Tcl commands;  it is also invoked directly by Tk_Init to create
- *	a new main window.  See the user documentation for the "frame"
- *	and "toplevel" commands for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-/*ARGSUSED*/
-#ifndef TK_MAINWINDOW
-static
-#endif /* TK_MAINWINDOW */
-int
-TkCreateFrame(
-    ClientData clientData,	/* Main window associated with interpreter.
-				 * If we're called by Tk_Init to create a
-				 * new application, then this is NULL. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv,		/* Argument strings. */
-    int toplevel,		/* Non-zero means create a toplevel window,
-				 * zero means create a frame. */
-    char *appName)		/* Should only be non-NULL if clientData is
-				 * NULL:  gives the base name to use for the
-				 * new application. */
-{
-    Frame *framePtr;
-    Tk_Window new;
-    const char *className, *screenName, *visualName, *colormapName, *arg, 
-	*useOption;
-    int i, c, depth;
-    unsigned int mask;
-    Colormap colormap;
-    Visual *visual;
-    Tk_Window tkwin;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-	    objv[0], " pathName ?options?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Pre-process the argument list.  Scan through it to find any
-     * "-class", "-screen", "-visual", and "-colormap" options.  These
-     * arguments need to be processed specially, before the window
-     * is configured using the usual Tk mechanisms.
-     */
-
-    className = colormapName = screenName = visualName = useOption = NULL;
-    colormap = None;
-    for (i = 2; i < objc; i += 2) {
-	int length;
-
-	arg = Tcl_GetStringFromObj(objv[i], &length);
-	if (length < 2) {
-	    continue;
-	}
-	c = arg[1];
-	if ((c == 'c') && (strncmp(arg, "-class", length) == 0)
-	    && (length >= 3)) {
-	    className = Tcl_GetString(objv[i + 1]);
-	} else if ((c == 'c')
-	    && (strncmp(arg, "-colormap", length) == 0)) {
-	    colormapName = Tcl_GetString(objv[i + 1]);
-	} else if ((c == 's') && (toplevel) && 
-		   (strncmp(arg, "-screen", length) == 0)) {
-	    screenName = Tcl_GetString(objv[i + 1]);
-	} else if ((c == 'u') && (toplevel) && 
-		   (strncmp(arg, "-use", length) == 0)) {
-	    useOption = Tcl_GetString(objv[i + 1]);
-	} else if ((c == 'v') && (strncmp(arg, "-visual", length) == 0)) {
-	    visualName = Tcl_GetString(objv[i + 1]);
-	}
-    }
-
-    /*
-     * Create the window, and deal with the special options -use,
-     * -classname, -colormap, -screenname, and -visual.  These options
-     * must be handle before calling ConfigureFrame below, and they must
-     * also be processed in a particular order, for the following
-     * reasons:
-     * 1. Must set the window's class before calling ConfigureFrame,
-     *    so that unspecified options are looked up in the option
-     *    database using the correct class.
-     * 2. Must set visual information before calling ConfigureFrame
-     *    so that colors are allocated in a proper colormap.
-     * 3. Must call TkpUseWindow before setting non-default visual
-     *    information, since TkpUseWindow changes the defaults.
-     */
-
-    if (screenName == NULL) {
-	screenName = (toplevel) ? "" : NULL;
-    }
-    tkwin = Tk_MainWindow(interp);
-    if (tkwin != NULL) {
-	new = Tk_CreateWindowFromPath(interp, tkwin, Tcl_GetString(objv[1]), 
-		screenName);
-    } else {
-	/*
-	 * We were called from Tk_Init;  create a new application.
-	 */
-
-	if (appName == NULL) {
-	    panic("TkCreateFrame didn't get application name");
-	}
-	new = (Tk_Window)TkCreateMainWindow(interp, (char *)screenName,appName);
-    }
-    if (new == NULL) {
-	goto error;
-    }
-    if (className == NULL) {
-	className = (char *)Tk_GetOption(new, "class", "Class");
-	if (className == NULL) {
-	    className = (toplevel) ? "Toplevel" : "Frame";
-	}
-    }
-    Tk_SetClass(new, className);
-    if (useOption == NULL) {
-	useOption = Tk_GetOption(new, "use", "Use");
-    }
-    if (useOption != NULL) {
-	if (TkpUseWindow(interp, new, (char *)useOption) != TCL_OK) {
-	    goto error;
-	}
-    }
-    if (visualName == NULL) {
-	visualName = (char *)Tk_GetOption(new, "visual", "Visual");
-    }
-    if (colormapName == NULL) {
-	colormapName = (char *)Tk_GetOption(new, "colormap", "Colormap");
-    }
-    if (visualName != NULL) {
-	visual = Tk_GetVisual(interp, new, visualName, &depth,
-	    (colormapName == NULL) ? &colormap : (Colormap *) NULL);
-	if (visual == NULL) {
-	    goto error;
-	}
-	Tk_SetWindowVisual(new, visual, depth, colormap);
-    }
-    if (colormapName != NULL) {
-	colormap = Tk_GetColormap(interp, new, colormapName);
-	if (colormap == None) {
-	    goto error;
-	}
-	Tk_SetWindowColormap(new, colormap);
-    }
-    /*
-     * For top-level windows, provide an initial geometry request of
-     * 200x200,  just so the window looks nicer on the screen if it
-     * doesn't request a size for itself.
-     */
-
-    if (toplevel) {
-	Tk_GeometryRequest(new, 200, 200);
-    }
-    /*
-     * Create the widget record, process configuration options, and
-     * create event handlers.  Then fill in a few additional fields
-     * in the widget record from the special options.
-     */
-
-    framePtr = Blt_AssertCalloc(1, sizeof(Frame));
-    framePtr->tkwin = new;
-    framePtr->display = Tk_Display(new);
-    framePtr->interp = interp;
-    framePtr->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(new), 
-	FrameWidgetCmd, (ClientData)framePtr, FrameCmdDeletedProc);
-    framePtr->mask = (toplevel) ? TOPLEVEL : FRAME;
-    framePtr->colormap = colormap;
-    framePtr->borderWidth = 0;
-    framePtr->relief = TK_RELIEF_FLAT;
-
-    /*
-     * Store backreference to frame widget in window structure.
-     */
-    TkSetClassProcs(new, NULL, (ClientData)framePtr);
-    mask = ExposureMask | StructureNotifyMask | FocusChangeMask;
-    if (toplevel) {
-	mask |= ActivateMask;
-    }
-    Tk_CreateEventHandler(new, mask, FrameEventProc, (ClientData)framePtr);
-    if (ConfigureFrame(interp, framePtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	goto error;
-    }
-    if ((framePtr->isContainer)) {
-	if (framePtr->useThis == NULL) {
-	    TkpMakeContainer(framePtr->tkwin);
-	} else {
-	    Tcl_AppendResult(interp, "A window cannot have both the -use ",
-		"and the -container option set.", (char *)NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (toplevel) {
-	Tcl_DoWhenIdle(MapFrame, (ClientData)framePtr);
-    }
-    Tcl_SetStringObj(Tcl_GetObjResult(interp), Tk_PathName(new), -1);
-    return TCL_OK;
-
-  error:
-    if (new != NULL) {
-	Tk_DestroyWindow(new);
-    }
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FrameWidgetCmd --
- *
- *	This procedure is invoked to process the TCL command
- *	that corresponds to a frame widget.  See the user
- *	documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-FrameWidgetCmd(ClientData clientData, Tcl_Interp *interp, int objc,
-	       Tcl_Obj *const *objv)
-{
-    register Frame *framePtr = (Frame *) clientData;
-    int result;
-    int length;
-    int c, i;
-    char *string;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " option ?arg arg ...?\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_Preserve((ClientData)framePtr);
-    string = Tcl_GetStringFromObj(objv[1], &length);
-    c = string[0];
-    if ((c == 'c') && (length >= 2) && (strncmp(string, "cget", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " cget option\"", (char *)NULL);
-	    result = TCL_ERROR;
-	    goto done;
-	}
-	result = Blt_ConfigureValueFromObj(interp, framePtr->tkwin, configSpecs,
-	    (char *)framePtr, objv[2], framePtr->mask);
-    } else if ((c == 'c') && (length >= 2) 
-	       && (strncmp(string, "configure", length) == 0)) {
-	if (objc == 2) {
-	    result = Blt_ConfigureInfoFromObj(interp, framePtr->tkwin, 
-		configSpecs, (char *)framePtr, (Tcl_Obj *)NULL, framePtr->mask);
-	} else if (objc == 3) {
-	    result = Blt_ConfigureInfoFromObj(interp, framePtr->tkwin, 
-		configSpecs, (char *)framePtr, objv[2], framePtr->mask);
-	} else {
-	    /*
-	     * Don't allow the options -class, -colormap, -container,
-	     * -newcmap, -screen, -use, or -visual to be changed.
-	     */
-
-	    for (i = 2; i < objc; i++) {
-		string = Tcl_GetStringFromObj(objv[i], &length);
-		if (length < 2) {
-		    continue;
-		}
-		c = string[1];
-		if (((c == 'c') && (strncmp(string, "-class", length) == 0)) ||
-		    ((c == 'c') && (framePtr->mask == TOPLEVEL) && 
-		     (length >= 3) && 
-		     (strncmp(string, "-colormap", length) == 0)) || 
-		    ((c == 'c') && (strncmp(string, "-container", length) == 0)
-			&& (length >= 3))
-		    || ((c == 's') && (framePtr->mask == TOPLEVEL)
-			&& (strncmp(string, "-screen", length) == 0))
-		    || ((c == 'u') && (framePtr->mask == TOPLEVEL)
-			&& (strncmp(string, "-use", length) == 0))
-		    || ((c == 'v') && (framePtr->mask == TOPLEVEL)
-			&& (strncmp(string, "-visual", length) == 0))) {
-		    Tcl_AppendResult(interp, "can't modify ", string,
-			" option after widget is created", (char *)NULL);
-		    result = TCL_ERROR;
-		    goto done;
-		}
-	    }
-	    result = ConfigureFrame(interp, framePtr, objc - 2, objv + 2,
-		BLT_CONFIG_OBJV_ONLY);
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", string,
-	    "\": must be cget or configure", (char *)NULL);
-	result = TCL_ERROR;
-    }
-
-  done:
-    Tcl_Release((ClientData)framePtr);
-    return result;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyFrame --
- *
- *	This procedure is invoked by Tcl_EventuallyFree or Tcl_Release
- *	to clean up the internal structure of a frame at a safe time
- *	(when no-one is using it anymore).
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the frame is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyFrame(DestroyData memPtr)	/* Info about frame widget. */
-{
-    register Frame *framePtr = (Frame *) memPtr;
-    
-    Blt_FreeOptions(configSpecs, (char *)framePtr, framePtr->display,
-	framePtr->mask);
-    if (framePtr->colormap != None) {
-	Tk_FreeColormap(framePtr->display, framePtr->colormap);
-    }
-    Blt_Free(framePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureFrame --
- *
- *	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or
- *	reconfigure) a frame widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for framePtr;  old resources get freed, if there
- *	were any.
- *
- *---------------------------------------------------------------------------
- */
-static int
-ConfigureFrame(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    register Frame *framePtr,	/* Information about widget;  may or may
-				 * not already have values for some fields. */
-    int objc,			/* Number of valid entries in objv. */
-    Tcl_Obj *const *objv,	/* Arguments. */
-    int flags)			/* Flags to pass to Blt_ConfigureWidget. */
-{
-    char *oldMenuName;
-
-    /*
-     * Need the old menubar name for the menu code to delete it.
-     */
-
-    if (framePtr->menuName == NULL) {
-	oldMenuName = NULL;
-    } else {
-	oldMenuName = Blt_AssertStrdup(framePtr->menuName);
-    }
-    if (Blt_ConfigureWidgetFromObj(interp, framePtr->tkwin, configSpecs,
-	    objc, objv, (char *)framePtr, flags | framePtr->mask) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (((oldMenuName == NULL) && (framePtr->menuName != NULL))
-	|| ((oldMenuName != NULL) && (framePtr->menuName == NULL))
-	|| ((oldMenuName != NULL) && (framePtr->menuName != NULL)
-	    && strcmp(oldMenuName, framePtr->menuName) != 0)) {
-	TkSetWindowMenuBar(interp, framePtr->tkwin, oldMenuName,
-	    framePtr->menuName);
-    }
-#ifdef notdef
-    if (framePtr->normalBg != NULL) {
-	Tk_SetBackgroundFromBorder(framePtr->tkwin, framePtr->normalBg);
-    } else {
-	Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None);
-    }
-#endif
-    Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None);
-    if (framePtr->highlightWidth < 0) {
-	framePtr->highlightWidth = 0;
-    }
-    Tk_SetInternalBorder(framePtr->tkwin,
-	framePtr->borderWidth + framePtr->highlightWidth);
-    if ((framePtr->width > 0) || (framePtr->height > 0)) {
-	Tk_GeometryRequest(framePtr->tkwin, framePtr->width,
-	    framePtr->height);
-    }
-    if (oldMenuName != NULL) {
-	Blt_Free(oldMenuName);
-    }
-    if (Tk_IsMapped(framePtr->tkwin)) {
-	if (!(framePtr->flags & REDRAW_PENDING)) {
-	    Tcl_DoWhenIdle(DisplayFrame, (ClientData)framePtr);
-	}
-	framePtr->flags |= REDRAW_PENDING;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayFrame --
- *
- *	This procedure is invoked to display a frame widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the frame in its
- *	current mode.
- *
- *---------------------------------------------------------------------------
- */
-static void
-DisplayFrame(ClientData clientData) /* Information about widget. */
-{
-    register Frame *framePtr = (Frame *) clientData;
-    register Tk_Window tkwin = framePtr->tkwin;
-    GC gc;
-
-    framePtr->flags &= ~REDRAW_PENDING;
-    if ((framePtr->tkwin == NULL) || !Tk_IsMapped(tkwin)
-	|| framePtr->isContainer) {
-	return;
-    }
-    Blt_FillBackgroundRectangle(tkwin, Tk_WindowId(tkwin), framePtr->normalBg, 
-	framePtr->highlightWidth, framePtr->highlightWidth,
-	Tk_Width(tkwin) - 2 * framePtr->highlightWidth,
-	Tk_Height(tkwin) - 2 * framePtr->highlightWidth,
-	framePtr->borderWidth, framePtr->relief);
-    if (framePtr->highlightWidth != 0) {
-	if (framePtr->flags & GOT_FOCUS) {
-	    gc = Tk_GCForColor(framePtr->highlightColorPtr,
-		Tk_WindowId(tkwin));
-	} else {
-	    gc = Tk_GCForColor(framePtr->highlightBgColorPtr,
-		Tk_WindowId(tkwin));
-	}
-	Tk_DrawFocusHighlight(tkwin, gc, framePtr->highlightWidth,
-	    Tk_WindowId(tkwin));
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FrameEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher on
- *	structure changes to a frame.  For frames with 3D
- *	borders, this procedure is also invoked for exposures.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-FrameEventProc(
-    ClientData clientData,	/* Information about window. */
-    register XEvent *eventPtr)	/* Information about event. */
-{
-    register Frame *framePtr = (Frame *) clientData;
-
-    if (((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0))
-	|| (eventPtr->type == ConfigureNotify)) {
-	goto redraw;
-    } else if (eventPtr->type == DestroyNotify) {
-	if (framePtr->menuName != NULL) {
-	    TkSetWindowMenuBar(framePtr->interp, framePtr->tkwin,
-		framePtr->menuName, NULL);
-	    Blt_Free(framePtr->menuName);
-	    framePtr->menuName = NULL;
-	}
-	if (framePtr->tkwin != NULL) {
-
-	    /*
-	     * If this window is a container, then this event could be
-	     * coming from the embedded application, in which case
-	     * Tk_DestroyWindow hasn't been called yet.  When Tk_DestroyWindow
-	     * is called later, then another destroy event will be generated.
-	     * We need to be sure we ignore the second event, since the frame
-	     * could be gone by then.  To do so, delete the event handler
-	     * explicitly (normally it's done implicitly by Tk_DestroyWindow).
-	     */
-	    Tk_DeleteEventHandler(framePtr->tkwin,
-		ExposureMask | StructureNotifyMask | FocusChangeMask,
-		FrameEventProc, (ClientData)framePtr);
-	    framePtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(framePtr->interp, framePtr->widgetCmd);
-	}
-	if (framePtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayFrame, (ClientData)framePtr);
-	}
-	Tcl_CancelIdleCall(MapFrame, (ClientData)framePtr);
-	Tcl_EventuallyFree((ClientData)framePtr, (Tcl_FreeProc *)DestroyFrame);
-    } else if (eventPtr->type == FocusIn) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    framePtr->flags |= GOT_FOCUS;
-	    if (framePtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    } else if (eventPtr->type == FocusOut) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    framePtr->flags &= ~GOT_FOCUS;
-	    if (framePtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    } else if (eventPtr->type == ActivateNotify) {
-	TkpSetMainMenubar(framePtr->interp, framePtr->tkwin,
-	    framePtr->menuName);
-    }
-    return;
-
-  redraw:
-    if ((framePtr->tkwin != NULL) && !(framePtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayFrame, (ClientData)framePtr);
-	framePtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * FrameCmdDeletedProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If
- *	the widget isn't already in the process of being destroyed,
- *	this command destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-static void
-FrameCmdDeletedProc(ClientData clientData) /* Pointer to widget record
-					      for widget. */
-{
-    Frame *framePtr = (Frame *) clientData;
-    Tk_Window tkwin = framePtr->tkwin;
-
-    if (framePtr->menuName != NULL) {
-	TkSetWindowMenuBar(framePtr->interp, framePtr->tkwin,
-	    framePtr->menuName, NULL);
-	Blt_Free(framePtr->menuName);
-	framePtr->menuName = NULL;
-    }
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin
-     * is NULL) or because the command was deleted, and then this procedure
-     * destroys the widget.
-     */
-
-    if (tkwin != NULL) {
-	framePtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MapFrame --
- *
- *	This procedure is invoked as a when-idle handler to map a
- *	newly-created top-level frame.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The frame given by the clientData argument is mapped.
- *
- *---------------------------------------------------------------------------
- */
-static void
-MapFrame(ClientData clientData)	/* Pointer to frame structure. */
-{
-    Frame *framePtr = (Frame *) clientData;
-
-    /*
-     * Wait for all other background events to be processed before
-     * mapping window.  This ensures that the window's correct geometry
-     * will have been determined before it is first mapped, so that the
-     * window manager doesn't get a false idea of its desired geometry.
-     */
-
-    Tcl_Preserve((ClientData)framePtr);
-    for(;;) {
-	if (Tcl_DoOneEvent(TCL_IDLE_EVENTS) == 0) {
-	    break;
-	}
-	/*
-	 * After each event, make sure that the window still exists
-	 * and quit if the window has been destroyed.
-	 */
-
-	if (framePtr->tkwin == NULL) {
-	    Tcl_Release((ClientData)framePtr);
-	    return;
-	}
-    }
-    Tk_MapWindow(framePtr->tkwin);
-    Tcl_Release((ClientData)framePtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TkInstallFrameMenu --
- *
- *	This function is needed when a Windows HWND is created
- *	and a menubar has been set to the window with a system
- *	menu. It notifies the menu package so that the system
- *	menu can be rebuilt.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The system menu (if any) is created for the menubar
- *	associated with this frame.
- *
- *---------------------------------------------------------------------------
- */
-#ifdef notdef	
-void
-TkInstallFrameMenu(Tk_Window tkwin) /* The window that was just created. */
-{
-#define Tk_InstanceData(tkwin)	(((Tk_FakeWin *)(tkwin))->dummy18)
-#define Tk_MainPtr(tkwin)	(((Tk_FakeWin *)(tkwin))->dummy5)
-    if (Tk_MainPtr(tkwin) != NULL) {
-	Frame *framePtr;
-
-	framePtr = (Frame *) Tk_InstanceData(tkwin);
-	TkpMenuNotifyToplevelCreate(framePtr->interp, framePtr->menuName);
-    }
-}
-
-#endif
-
-int
-Blt_FrameCmdInitProc(Tcl_Interp *interp)
-{
-    static Blt_InitCmdSpec cmdSpecs[2] = {
-	{"frame", FrameCmd,},
-	{"toplevel", ToplevelCmd,},
-    };
-    return Blt_InitCmds(interp, "::blt::tk", cmdSpecs, 2);
-}
-
-#endif /* NO_TKFRAME */
diff --git a/blt3.0/src/tkIntBorder.h b/blt3.0/src/tkIntBorder.h
deleted file mode 100644
index 13fe0f5..0000000
--- a/blt3.0/src/tkIntBorder.h
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/*
- * tkIntBorder.h --
- *
- *
- * The Border structure used internally by the Tk_3D* routines.
- * The following is a copy of it from tk3d.c.
- *
- *	Contains copies of internal Tk structures.
- *
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#ifndef _TK_BORDER_INT_H
-#define _TK_BORDER_INT_H
-
-typedef struct _TkBorder {
-    Screen *screen;		/* Screen on which the border will be used. */
-    Visual *visual;		/* Visual for all windows and pixmaps using
-				 * the border. */
-    int depth;			/* Number of bits per pixel of drawables where
-				 * the border will be used. */
-    Colormap colormap;		/* Colormap out of which pixels are
-				 * allocated. */
-    int refCount;		/* Number of different users of
-				 * this border.  */
-#if (_TK_VERSION >= _VERSION(8,1,0))
-    int objRefCount;		/* The number of TCL objects that reference
-				 * this structure. */
-#endif /* _TK_VERSION >= 8.1.0 */
-    XColor *bgColor;		/* Background color (intensity between 
-				 * lightColorPtr and darkColorPtr). */
-    XColor *darkColor;		/* Color for darker areas (must free when
-				 * deleting structure). NULL means shadows
-				 * haven't been allocated yet.*/
-    XColor *lightColor;		/* Color used for lighter areas of border
-				 * (must free this when deleting structure).
-				 * NULL means shadows haven't been allocated
-				 * yet. */
-    Pixmap shadow;		/* Stipple pattern to use for drawing
-				 * shadows areas.  Used for displays with
-				 * <= 64 colors or where colormap has filled
-				 * up. */
-    GC bgGC;			/* Used (if necessary) to draw areas in
-				 * the background color. */
-    GC darkGC;			/* Used to draw darker parts of the
-				 * border. None means the shadow colors
-				 * haven't been allocated yet.*/
-    GC lightGC;			/* Used to draw lighter parts of
-				 * the border. None means the shadow colors
-				 * haven't been allocated yet. */
-    Tcl_HashEntry *hashPtr;	/* Entry in borderTable (needed in
-				 * order to delete structure). */
-    struct _TkBorder *nextPtr; /* Points to the next TkBorder structure with
-				 * the same color name.  Borders with the
-				 * same name but different screens or
-				 * colormaps are chained together off a
-				 * single entry in borderTable. */
-} TkBorder;
-
-#endif /* _TK_BORDER_INT_H */
diff --git a/blt3.0/src/tkIntDecls.h b/blt3.0/src/tkIntDecls.h
deleted file mode 100644
index 4574ca7..0000000
--- a/blt3.0/src/tkIntDecls.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * tkIntDecls.h --
- *
- * This file contains the declarations for all unsupported functions
- * that are exported by the Tk library.  These interfaces are not
- * guaranteed to remain the same between versions.  Use at your own
- * risk.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from tkIntDecls.h of the Tk library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- */
-
-#ifndef _TKINTDECLS
-#define _TKINTDECLS
-
-#ifdef BUILD_tk
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
-#endif
-
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script.  Any modifications to the function declarations below should be made
- * in the generic/tkInt.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-/* 9 */
-extern void TkComputeAnchor(Tk_Anchor anchor, Tk_Window tkwin, int xPad, 
-	int yPad, int innerWidth, int innerHeight, int *xPtr, int *yPtr);
-/* 10 */
-extern int TkCopyAndGlobalEval(Tcl_Interp *interp, char * script);
-/* 14 */
-extern Tk_Window TkCreateMainWindow(Tcl_Interp *interp, char * screenName, 
-	char *baseName);
-/* 64 */
-extern void TkpMakeContainer(Tk_Window tkwin);
-/* 74 */
-extern void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, 
-	char *menuName);
-/* 75 */
-extern int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, char *string);
-/* 84 */
-extern void TkSetClassProcs(Tk_Window tkwin, void *procs, 
-	ClientData instanceData);
-/* 85 */
-extern void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, 
-	char *oldMenuName, char *menuName);
-/* 95 */
-extern void TkWmRestackToplevel(Tk_Window tkwin, int aboveBelow, 
-	Tk_Window otherPtr);
-
-typedef struct TkIntStubs {
-    int magic;
-    struct TkIntStubHooks *hooks;
-
-    void *tkAllocWindow;	/* 0 */
-    void *tkBezierPoints;	/* 1 */
-    void *tkBezierScreenPoints; /* 2 */
-    void *tkBindDeadWindow;	/* 3 */
-    void *tkBindEventProc;	/* 4 */
-    void *tkBindFree;		/* 5 */
-    void *tkBindInit;		/* 6 */
-    void *tkChangeEventWindow; /* 7 */
-    void *tkClipInit;		/* 8 */
-
-    void (*tkComputeAnchor)(Tk_Anchor anchor, Tk_Window tkwin, 
-	int xPad, int yPad, int innerWidth, int innerHeight, 
-	int *xPtr, int *yPtr);	/* 9 */
-
-    int (*tkCopyAndGlobalEval)(Tcl_Interp *interp, char *script); /* 10 */
-
-    void *tkCreateBindingProcedure; /* 11 */
-    void *tkCreateCursorFromData; /* 12 */
-    void *tkCreateFrame;	/* 13 */
-
-    Tk_Window (*tkCreateMainWindow)(Tcl_Interp *interp, char *screenName, 
-	char * baseName);	/* 14 */
-
-    void *tkCurrentTime;	/* 15 */
-    void *tkDeleteAllImages;	/* 16 */
-    void *tkDoConfigureNotify;	/* 17 */
-    void *tkDrawInsetFocusHighlight; /* 18 */
-    void *tkEventDeadWindow;	/* 19 */
-    void *tkFillPolygon;	/* 20 */
-    void *tkFindStateNum;	/* 21 */
-    void *tkFindStateString;	/* 22 */
-    void *tkFocusDeadWindow;	/* 23 */
-    void *tkFocusFilterEvent;	/* 24 */
-    void *tkFocusKeyEvent;	/* 25 */
-    void *tkFontPkgInit;	/* 26 */
-    void *tkFontPkgFree;	/* 27 */
-    void *tkFreeBindingTags;	/* 28 */
-    void *tkpFreeCursor;	/* 29 */
-    void *tkGetBitmapData;	/* 30 */
-    void *tkGetButtPoints;	/* 31 */
-    void *tkGetCursorByName;	/* 32 */
-    void *tkGetDefaultScreenName; /* 33 */
-    void *tkGetDisplay;		/* 34 */
-    void *tkGetDisplayOf;	/* 35 */
-    void *tkGetFocusWin;	/* 36 */
-    void *tkGetInterpNames;	/* 37 */
-    void *tkGetMiterPoints;	/* 38 */
-    void *tkGetPointerCoords;	/* 39 */
-    void *tkGetServerInfo;	/* 40 */
-    void *tkGrabDeadWindow;	/* 41 */
-    void *tkGrabState;		/* 42 */
-    void *tkIncludePoint;	/* 43 */
-    void *tkInOutEvents;	/* 44 */
-    void *tkInstallFrameMenu;	/* 45 */
-    void *tkKeysymToString;	/* 46 */
-    void *tkLineToArea;		/* 47 */
-    void *tkLineToPoint;	/* 48 */
-    void *tkMakeBezierCurve;	/* 49 */
-    void *tkMakeBezierPostscript; /* 50 */
-    void *tkOptionClassChanged; /* 51 */
-    void *tkOptionDeadWindow;	/* 52 */
-    void *tkOvalToArea;		/* 53 */
-    void *tkOvalToPoint;	/* 54 */
-    void *tkpChangeFocus;	/* 55 */
-    void *tkpCloseDisplay;	/* 56 */
-    void *tkpClaimFocus;	/* 57 */
-    void *tkpDisplayWarning;	/* 58 */
-    void *tkpGetAppName;	/* 59 */
-    void *tkpGetOtherWindow;	/* 60 */
-    void *tkpGetWrapperWindow;	/* 61 */
-    void *tkpInit;		/* 62 */
-    void *tkpInitializeMenuBindings; /* 63 */
-
-    void (*tkpMakeContainer)(Tk_Window tkwin); /* 64 */
-
-    void *tkpMakeMenuWindow;	/* 65 */
-    void *tkpMakeWindow;	/* 66 */
-    void *tkpMenuNotifyToplevelCreate; /* 67 */
-    void *tkpOpenDisplay;	/* 68 */
-    void *tkPointerEvent;	/* 69 */
-    void *tkPolygonToArea;	/* 70 */
-    void *tkPolygonToPoint;	/* 71 */
-    void *tkPositionInTree;	/* 72 */
-    void *tkpRedirectKeyEvent;	/* 73 */
-
-    void (*tkpSetMainMenubar)(Tcl_Interp *interp, Tk_Window tkwin, 
-	char *menuName);	/* 74 */
-
-    int (*tkpUseWindow)(Tcl_Interp *interp, Tk_Window tkwin, 
-	char *string);		/* 75 */
-
-    void *tkpWindowWasRecentlyDeleted; /* 76 */
-    void *tkQueueEventForAllChildren; /* 77 */
-    void *tkReadBitmapFile;	/* 78 */
-    void *tkScrollWindow;	/* 79 */
-    void *tkSelDeadWindow;	/* 80 */
-    void *tkSelEventProc;	/* 81 */
-    void *tkSelInit;		/* 82 */
-    void *tkSelPropProc;	/* 83 */
-
-    void (*tkSetClassProcs)(Tk_Window tkwin, void *procs, 
-	ClientData instanceData); /* 84 */
-
-    void (*tkSetWindowMenuBar)(Tcl_Interp *interp, Tk_Window tkwin, 
-	char *oldMenuName, char *menuName); /* 85 */
-
-    void *tkStringToKeysym;	/* 86 */
-    void *tkThickPolyLineToArea; /* 87 */
-    void *tkWmAddToColormapWindows; /* 88 */
-    void *tkWmDeadWindow;	/* 89 */
-    void *tkWmFocusToplevel;	/* 90 */
-    void *tkWmMapWindow;	/* 91 */
-    void *tkWmNewWindow;	/* 92 */
-    void *tkWmProtocolEventProc; /* 93 */
-    void *tkWmRemoveFromColormapWindows; /* 94 */
-
-    void (*tkWmRestackToplevel)(Tk_Window tkwin, int aboveBelow, 
-	Tk_Window other); /* 95 */
-
-    void *tkWmSetClass;		/* 96 */
-    void *tkWmUnmapWindow;	/* 97 */
-    void *tkDebugBitmap;	/* 98 */
-    void *tkDebugBorder;	/* 99 */
-    void *tkDebugCursor;	/* 100 */
-    void *tkDebugColor;		/* 101 */
-    void *tkDebugConfig;	/* 102 */
-    void *tkDebugFont;		/* 103 */
-    void *tkFindStateNumObj;	/* 104 */
-    void *tkGetBitmapPredefTable; /* 105 */
-    void *tkGetDisplayList;	/* 106 */
-    void *tkGetMainInfoList;	/* 107 */
-    void *tkGetWindowFromObj;	/* 108 */
-    void *tkpGetString;		/* 109 */
-    void *tkpGetSubFonts;	/* 110 */
-    void *tkpGetSystemDefault;	/* 111 */
-    void *tkpMenuThreadInit;	/* 112 */
-    void *tkClipBox;		/* 113 */
-    void *tkCreateRegion;	/* 114 */
-    void *tkDestroyRegion;	/* 115 */
-    void *tkIntersectRegion;	/* 116 */
-    void *tkRectInRegion;	/* 117 */
-    void *tkSetRegion;		/* 118 */
-    void *tkUnionRectWithRegion; /* 119 */
-    void *reserved120;
-    void *tkpCreateNativeBitmap; /* 121 */
-    void *tkpDefineNativeBitmaps; /* 122 */
-    void *reserved123;
-    void *tkpGetNativeAppBitmap; /* 124 */
-    void *reserved125;
-    void *reserved126;
-    void *reserved127;
-    void *reserved128;
-    void *reserved129;
-    void *reserved130;
-    void *reserved131;
-    void *reserved132;
-    void *reserved133;
-    void *reserved134;
-    void *tkpDrawHighlightBorder; /* 135 */
-    void *tkSetFocusWin;	/* 136 */
-    void *tkpSetKeycodeAndState; /* 137 */
-    void *tkpGetKeySym;		/* 138 */
-    void *tkpInitKeymapInfo;	/* 139 */
-} TkIntStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TkIntStubs *tkIntStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef TkComputeAnchor
-#define TkComputeAnchor \
-	(tkIntStubsPtr->tkComputeAnchor) /* 9 */
-#endif
-
-#ifndef TkCopyAndGlobalEval
-#define TkCopyAndGlobalEval \
-	(tkIntStubsPtr->tkCopyAndGlobalEval) /* 10 */
-#endif
-
-#ifndef TkCreateMainWindow
-#define TkCreateMainWindow \
-	(tkIntStubsPtr->tkCreateMainWindow) /* 14 */
-#endif
-
-#ifndef TkpMakeContainer
-#define TkpMakeContainer \
-	(tkIntStubsPtr->tkpMakeContainer) /* 64 */
-#endif
-
-#ifndef TkpSetMainMenubar
-#define TkpSetMainMenubar \
-	(tkIntStubsPtr->tkpSetMainMenubar) /* 74 */
-#endif
-
-#ifndef TkpUseWindow
-#define TkpUseWindow \
-	(tkIntStubsPtr->tkpUseWindow) /* 75 */
-#endif
-
-#ifndef TkSetClassProcs
-#define TkSetClassProcs \
-	(tkIntStubsPtr->tkSetClassProcs) /* 84 */
-#endif
-
-#ifndef TkSetWindowMenuBar
-#define TkSetWindowMenuBar \
-	(tkIntStubsPtr->tkSetWindowMenuBar) /* 85 */
-#endif
-
-#ifndef TkWmRestackToplevel
-#define TkWmRestackToplevel \
-        (tkIntStubsPtr->tkWmRestackToplevel) /* 95 */
-#endif
-
-#endif
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* _TKINTDECLS */
-
diff --git a/blt3.0/src/tkIntPlatDecls.h b/blt3.0/src/tkIntPlatDecls.h
deleted file mode 100644
index 789aeca..0000000
--- a/blt3.0/src/tkIntPlatDecls.h
+++ /dev/null
@@ -1,186 +0,0 @@
-
-/*
- * tkIntPlatDecls.h --
- *
- * This file contains the declarations for all platform dependent
- * unsupported functions that are exported by the Tk library. These
- * interfaces are not guaranteed to remain the same between versions.
- * Use at your own risk.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from tkIntPlatDecls.h of the Tk library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- */
-
-#ifndef _TKINTPLATDECLS
-#define _TKINTPLATDECLS
-
-#ifdef BUILD_tk
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
-#endif
-
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script.  Any modifications to the function declarations below should be made
- * in the generic/tkInt.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-#ifdef __WIN32__
-/* 16 */
-extern HDC TkWinGetDrawableDC(Display *display, Drawable drawable, 
-	TkWinDCState *state);
-/* 22 */
-extern void TkWinReleaseDrawableDC(Drawable drawable, HDC hdc, 
-	TkWinDCState *state);
-#endif /* __WIN32__ */
-
-typedef struct TkIntPlatStubs {
-    int magic;
-    struct TkIntPlatStubHooks *hooks;
-
-    void *hook0;
-    void *hook1;
-    void *hook2;
-    void *hook3;
-    void *hook4;
-    void *hook5;
-    void *hook6;
-    void *hook7;
-    void *hook8;
-    void *hook9;
-    void *hook10;
-    void *hook11;
-    void *hook12;
-    void *hook13;
-    void *hook14;
-    void *hook15;
-#ifdef WIN32
-    HDC (*tkWinGetDrawableDC)(Display *display, Drawable drawable, 
-	TkWinDCState *state);	/* 16 */
-#else 
-    void *hook16;
-#endif
-    void *hook17;
-    void *hook18;
-    void *hook19;
-    void *hook20;
-    void *hook21;
-#ifdef WIN32
-    void (*tkWinReleaseDrawableDC)(Drawable drawable, HDC hdc, 
-	TkWinDCState *state);	/* 22 */
-#else
-    void *hook22;
-#endif
-    void *hook23;
-    void *hook24;
-    void *hook25;
-    void *hook26;
-    void *hook27;
-    void *hook28;
-    void *hook29;
-    void *hook30;
-    void *hook31;
-    void *hook32;
-    void *hook33;
-    void *hook34;
-    void *hook35;
-    void *hook36;
-    void *hook37;
-    void *hook38;
-    void *hook39;
-    void *hook40;
-    void *hook41;
-    void *hook42;
-    void *hook43;
-    void *hook44;
-    void *hook45;
-    void *hook46;
-    void *hook47;
-    void *hook48;
-    void *hook49;
-    void *hook50;
-    void *hook51;
-    void *hook52;
-    void *hook53;
-    void *hook54;
-    void *hook55;
-    void *hook56;
-    void *hook57;
-    void *hook58;
-    void *hook59;
-    void *hook60;
-    void *hook61;
-    void *hook62;
-    void *hook63;
-    void *hook64;
-    void *hook65;
-    void *hook66;
-} TkIntPlatStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TkIntPlatStubs *tkIntPlatStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-#ifdef __WIN32__
-#ifndef TkWinGetDrawableDC
-#define TkWinGetDrawableDC \
-	(tkIntPlatStubsPtr->tkWinGetDrawableDC) /* 16 */
-#endif
-#ifndef TkWinReleaseDrawableDC
-#define TkWinReleaseDrawableDC \
-	(tkIntPlatStubsPtr->tkWinReleaseDrawableDC) /* 22 */
-#endif
-#endif /* __WIN32__ */
-
-#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* _TKINTPLATDECLS */
diff --git a/blt3.0/src/tkMenubutton.c b/blt3.0/src/tkMenubutton.c
deleted file mode 100644
index 10c6b69..0000000
--- a/blt3.0/src/tkMenubutton.c
+++ /dev/null
@@ -1,1200 +0,0 @@
-/*
- * tkMenubutton.c --
- *
- *	This module implements button-like widgets that are used
- *	to invoke pull-down menus.
- *
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * SCCS: @(#) tkMenubutton.c 1.77 96/02/15 18:52:22
- */
-
-#include "bltInt.h"
-
-/*
- * Defaults for menubuttons:
- */
-
-#define DEF_MENUBUTTON_ANCHOR		"center"
-#define DEF_MENUBUTTON_ACTIVE_BG	STD_ACTIVE_BACKGROUND
-#define DEF_MENUBUTTON_ACTIVE_FG	STD_ACTIVE_FOREGROUND
-#define DEF_MENUBUTTON_BG		STD_NORMAL_BACKGROUND
-#define DEF_MENUBUTTON_BITMAP		""
-#define DEF_MENUBUTTON_BORDERWIDTH	"2"
-#define DEF_MENUBUTTON_CURSOR		""
-#define DEF_MENUBUTTON_DIRECTION	"below"
-#define DEF_MENUBUTTON_DISABLED_FG	STD_DISABLED_FOREGROUND
-#define DEF_MENUBUTTON_FONT		"Helvetica -12 bold"
-#define DEF_MENUBUTTON_FG		STD_NORMAL_FOREGROUND
-#define DEF_MENUBUTTON_HEIGHT		"0"
-#define DEF_MENUBUTTON_HIGHLIGHT_BG	DEF_MENUBUTTON_BG
-#define DEF_MENUBUTTON_HIGHLIGHT	RGB_BLACK
-#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH	"0"
-#define DEF_MENUBUTTON_IMAGE		(char *) NULL
-#define DEF_MENUBUTTON_INDICATOR	"0"
-#define DEF_MENUBUTTON_JUSTIFY		"center"
-#define DEF_MENUBUTTON_MENU		""
-#define DEF_MENUBUTTON_PADX		"4p"
-#define DEF_MENUBUTTON_PADY		"3p"
-#define DEF_MENUBUTTON_RELIEF		"flat"
-#define DEF_MENUBUTTON_STATE		"normal"
-#define DEF_MENUBUTTON_TAKE_FOCUS	"0"
-#define DEF_MENUBUTTON_TEXT		""
-#define DEF_MENUBUTTON_TEXT_VARIABLE	""
-#define DEF_MENUBUTTON_UNDERLINE	"-1"
-#define DEF_MENUBUTTON_WIDTH		"0"
-#define DEF_MENUBUTTON_WRAP_LENGTH	"0"
-
-/*
- * A data structure of the following type is kept for each
- * widget managed by this file:
- */
-
-typedef struct {
-    Tk_Window tkwin;		/* Window that embodies the widget.  NULL
-				 * means that the window has been destroyed
-				 * but the data structures haven't yet been
-				 * cleaned up.*/
-    Display *display;		/* Display containing widget.  Needed, among
-				 * other things, so that resources can bee
-				 * freed up even after tkwin has gone away. */
-    Tcl_Interp *interp;		/* Interpreter associated with menubutton. */
-    Tcl_Command widgetCmd;	/* Token for menubutton's widget command. */
-    char *menuName;		/* Name of menu associated with widget.
-				 * Malloc-ed. */
-
-    /*
-     * Information about what's displayed in the menu button:
-     */
-
-    char *text;			/* Text to display in button (malloc'ed)
-				 * or NULL. */
-    int numChars;		/* # of characters in text. */
-    int underline;		/* Index of character to underline. */
-    char *textVarName;		/* Name of variable (malloc'ed) or NULL.
-				 * If non-NULL, button displays the contents
-				 * of this variable. */
-    Pixmap bitmap;		/* Bitmap to display or None.  If not None
-				 * then text and textVar and underline
-				 * are ignored. */
-    char *imageString;		/* Name of image to display (malloc'ed), or
-				 * NULL.  If non-NULL, bitmap, text, and
-				 * textVarName are ignored. */
-    Tk_Image image;		/* Image to display in window, or NULL if
-				 * none. */
-
-    /*
-     * Information used when displaying widget:
-     */
-
-    int state;			/* State of button for display purposes:
-				 * normal, active, or disabled. */
-    Tk_3DBorder normalBorder;	/* Structure used to draw 3-D
-				 * border and background when window
-				 * isn't active.  NULL means no such
-				 * border exists. */
-    Tk_3DBorder activeBorder;	/* Structure used to draw 3-D
-				 * border and background when window
-				 * is active.  NULL means no such
-				 * border exists. */
-    int borderWidth;		/* Width of border. */
-    int relief;			/* 3-d effect: TK_RELIEF_RAISED, etc. */
-    int highlightWidth;		/* Width in pixels of highlight to draw
-				 * around widget when it has the focus.
-				 * <= 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
-    /* Color for drawing traversal highlight
-				 * area when highlight is off. */
-    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
-    int inset;			/* Total width of all borders, including
-				 * traversal highlight and 3-D border.
-				 * Indicates how much interior stuff must
-				 * be offset from outside edges to leave
-				 * room for borders. */
-    XFontStruct *fontPtr;	/* Information about text font, or NULL. */
-    XColor *normalFg;		/* Foreground color in normal mode. */
-    XColor *activeFg;		/* Foreground color in active mode.  NULL
-				 * means use normalFg instead. */
-    XColor *disabledFg;		/* Foreground color when disabled.  NULL
-				 * means use normalFg with a 50% stipple
-				 * instead. */
-    GC normalTextGC;		/* GC for drawing text in normal mode. */
-    GC activeTextGC;		/* GC for drawing text in active mode (NULL
-				 * means use normalTextGC). */
-    Pixmap gray;		/* Pixmap for displaying disabled text/icon if
-				 * disabledFg is NULL. */
-    GC disabledGC;		/* Used to produce disabled effect.  If
-				 * disabledFg isn't NULL, this GC is used to
-				 * draw button text or icon.  Otherwise
-				 * text or icon is drawn with normalGC and
-				 * this GC is used to stipple background
-				 * across it. */
-    int leftBearing;		/* Distance from text origin to leftmost drawn
-				 * pixel (positive means to right). */
-    int rightBearing;		/* Amount text sticks right from its origin. */
-    char *widthString;		/* Value of -width option.  Malloc'ed. */
-    char *heightString;		/* Value of -height option.  Malloc'ed. */
-    int width, height;		/* If > 0, these specify dimensions to request
-				 * for window, in characters for text and in
-				 * pixels for bitmaps.  In this case the actual
-				 * size of the text string or bitmap is
-				 * ignored in computing desired window size. */
-    int wrapLength;		/* Line length (in pixels) at which to wrap
-				 * onto next line.  <= 0 means don't wrap
-				 * except at newlines. */
-    int xPad, yPad;		/* Extra space around text or bitmap (pixels
-				 * on each side). */
-    Tk_Anchor anchor;		/* Where text/bitmap should be displayed
-				 * inside window region. */
-    Tk_Justify justify;		/* Justification to use for multi-line text. */
-    int textWidth;		/* Width needed to display text as requested,
-				 * in pixels. */
-    int textHeight;		/* Height needed to display text as requested,
-				 * in pixels. */
-    int indicatorOn;		/* Non-zero means display indicator;  0 means
-				 * don't display. */
-    int indicatorHeight;	/* Height of indicator in pixels.  This same
-				 * amount of extra space is also left on each
-				 * side of the indicator. 0 if no indicator. */
-    int indicatorWidth;		/* Width of indicator in pixels, including
-				 * indicatorHeight in padding on each side.
-				 * 0 if no indicator. */
-
-    /*
-     * Miscellaneous information:
-     */
-
-    Tk_Cursor cursor;		/* Current cursor for window, or None. */
-    char *takeFocus;		/* Value of -takefocus option;  not used in
-				 * the C code, but used by keyboard traversal
-				 * scripts.  Malloc'ed, but may be NULL. */
-    int flags;			/* Various flags;  see below for
-				 * definitions. */
-} MenuButton;
-
-/*
- * Flag bits for buttons:
- *
- * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler
- *				has already been queued to redraw
- *				this window.
- * POSTED:			Non-zero means that the menu associated
- *				with this button has been posted (typically
- *				because of an active button press).
- * GOT_FOCUS:			Non-zero means this button currently
- *				has the input focus.
- */
-
-#define REDRAW_PENDING		1
-#define POSTED			2
-#define GOT_FOCUS		4
-
-/*
- * The following constants define the dimensions of the cascade indicator,
- * which is displayed if the "-indicatoron" option is true.  The units for
- * these options are 1/10 millimeters.
- */
-
-#define INDICATOR_WIDTH		40
-#define INDICATOR_HEIGHT	17
-
-/*
- * Information used for parsing configuration specs:
- */
-
-static Blt_ConfigSpec configSpecs[] =
-{
-    {BLT_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
-	DEF_MENUBUTTON_ACTIVE_BG, Blt_Offset(MenuButton, activeBorder), 0},
-    {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", "Background",
-	DEF_MENUBUTTON_ACTIVE_FG, Blt_Offset(MenuButton, activeFg), 0},
-    {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
-	DEF_MENUBUTTON_ANCHOR, Blt_Offset(MenuButton, anchor), 0},
-    {BLT_CONFIG_BORDER, "-background", "background", "Background",
-	DEF_MENUBUTTON_BG, Blt_Offset(MenuButton, normalBorder), 0},
-    {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL,
-	(char *)NULL, 0, 0},
-    {BLT_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_MENUBUTTON_BITMAP, 
-	Blt_Offset(MenuButton, bitmap), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_MENUBUTTON_BORDERWIDTH, Blt_Offset(MenuButton, borderWidth), 0},
-    {BLT_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", 
-	DEF_MENUBUTTON_CURSOR, Blt_Offset(MenuButton, cursor), 
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
-	"DisabledForeground", DEF_MENUBUTTON_DISABLED_FG, 
-	Blt_Offset(MenuButton, disabledFg), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0},
-    {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_MENUBUTTON_FONT, 
-	Blt_Offset(MenuButton, fontPtr), 0},
-    {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_MENUBUTTON_FG, Blt_Offset(MenuButton, normalFg), 0},
-    {BLT_CONFIG_STRING, "-height", "height", "Height",
-	DEF_MENUBUTTON_HEIGHT, Blt_Offset(MenuButton, heightString), 0},
-    {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
-	"HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG,
-	Blt_Offset(MenuButton, highlightBgColorPtr), 0},
-    {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_MENUBUTTON_HIGHLIGHT, Blt_Offset(MenuButton, highlightColorPtr), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness",
-	"HighlightThickness", DEF_MENUBUTTON_HIGHLIGHT_WIDTH,
-	Blt_Offset(MenuButton, highlightWidth), 0},
-    {BLT_CONFIG_STRING, "-image", "image", "Image", DEF_MENUBUTTON_IMAGE, 
-	Blt_Offset(MenuButton, imageString), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
-	DEF_MENUBUTTON_INDICATOR, Blt_Offset(MenuButton, indicatorOn), 0},
-    {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", 
-	DEF_MENUBUTTON_JUSTIFY, Blt_Offset(MenuButton, justify), 0},
-    {BLT_CONFIG_STRING, "-menu", "menu", "Menu", DEF_MENUBUTTON_MENU, 
-	Blt_Offset(MenuButton, menuName), BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_PIXELS_NNEG, "-padx", "padX", "Pad", DEF_MENUBUTTON_PADX, 
-	Blt_Offset(MenuButton, xPad), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-pady", "padY", "Pad", DEF_MENUBUTTON_PADY, 
-	Blt_Offset(MenuButton, yPad), 0}, 
-    {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_MENUBUTTON_RELIEF, 
-	Blt_Offset(MenuButton, relief), 0},
-    {BLT_CONFIG_STATE, "-state", "state", "State", DEF_MENUBUTTON_STATE, 
-	Blt_Offset(MenuButton, state), 0},
-    {BLT_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
-	DEF_MENUBUTTON_TAKE_FOCUS, Blt_Offset(MenuButton, takeFocus),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_STRING, "-text", "text", "Text", DEF_MENUBUTTON_TEXT, 
-	Blt_Offset(MenuButton, text), 0},
-    {BLT_CONFIG_STRING, "-textvariable", "textVariable", "Variable",
-	DEF_MENUBUTTON_TEXT_VARIABLE, Blt_Offset(MenuButton, textVarName),
-	BLT_CONFIG_NULL_OK},
-    {BLT_CONFIG_INT, "-underline", "underline", "Underline",
-	DEF_MENUBUTTON_UNDERLINE, Blt_Offset(MenuButton, underline), 0},
-    {BLT_CONFIG_STRING, "-width", "width", "Width", DEF_MENUBUTTON_WIDTH, 
-	Blt_Offset(MenuButton, widthString), 0},
-    {BLT_CONFIG_PIXELS_NNEG, "-wraplength", "wrapLength", "WrapLength",
-	DEF_MENUBUTTON_WRAP_LENGTH, Blt_Offset(MenuButton, wrapLength), 0},
-    {BLT_CONFIG_END, (char *)NULL, (char *)NULL, (char *)NULL,
-	(char *)NULL, 0, 0}
-};
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-
-static Tcl_CmdDeleteProc MenuButtonCmdDeletedProc;
-static Tk_EventProc MenuButtonEventProc;
-static Tk_ImageChangedProc MenuButtonImageProc;
-static Tcl_VarTraceProc MenuButtonTextVarProc;
-static Tcl_ObjCmdProc MenuButtonWidgetCmd;
-static Tcl_FreeProc DestroyMenuButton;
-static Tcl_IdleProc DisplayMenuButton;
-
-static int ConfigureMenuButton (Tcl_Interp *interp, MenuButton *mbPtr, 
-	int objc, Tcl_Obj *const *objv, int flags);
-static void ComputeMenuButtonGeometry (MenuButton *mbPtr);
-/*
- *---------------------------------------------------------------------------
- *
- * Tk_MenubuttonCmd --
- *
- *	This procedure is invoked to process the "button", "label",
- *	"radiobutton", and "checkbutton" TCL commands.  See the
- *	user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-int
-Tk_MenubuttonCmd(
-    ClientData clientData,	/* Main window associated with
-				 * interpreter. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    register MenuButton *mbPtr;
-    Tk_Window tkwin;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-	    Tcl_GetString(objv[0]), " pathName ?options?\"", (char *)NULL);
-	return TCL_ERROR;
-    }
-    /*
-     * Create the new window.
-     */
-
-    tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), 
-		Tcl_GetString(objv[1]), (char *)NULL);
-    if (tkwin == NULL) {
-	return TCL_ERROR;
-    }
-    /*
-     * Initialize the data structure for the button.
-     */
-
-    mbPtr = Blt_AssertCalloc(1, sizeof(MenuButton));
-    mbPtr->tkwin = tkwin;
-    mbPtr->display = Tk_Display(tkwin);
-    mbPtr->interp = interp;
-    mbPtr->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(mbPtr->tkwin),
-	MenuButtonWidgetCmd, (ClientData)mbPtr, MenuButtonCmdDeletedProc);
-    mbPtr->underline = -1;
-    mbPtr->state = STATE_NORMAL;
-    mbPtr->relief = TK_RELIEF_FLAT;
-    mbPtr->anchor = TK_ANCHOR_CENTER;
-    mbPtr->justify = TK_JUSTIFY_CENTER;
-
-    Tk_SetClass(mbPtr->tkwin, "Menubutton");
-    Tk_CreateEventHandler(mbPtr->tkwin,
-	ExposureMask | StructureNotifyMask | FocusChangeMask,
-	MenuButtonEventProc, (ClientData)mbPtr);
-    if (ConfigureMenuButton(interp, mbPtr, objc - 2, objv + 2, 0) != TCL_OK) {
-	Tk_DestroyWindow(mbPtr->tkwin);
-	return TCL_ERROR;
-    }
-    Tcl_SetObjResult(interp, objv[1]);
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenuButtonWidgetCmd --
- *
- *	This procedure is invoked to process the TCL command
- *	that corresponds to a widget managed by this module.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard TCL result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-MenuButtonWidgetCmd(
-    ClientData clientData,	/* Information about button widget. */
-    Tcl_Interp *interp,		/* Current interpreter. */
-    int objc,			/* Number of arguments. */
-    Tcl_Obj *const *objv)	/* Argument strings. */
-{
-    MenuButton *mbPtr = clientData;
-    char *string;
-    int c;
-    int length;
-    int result = TCL_OK;
-
-    if (objc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"", 
-		Tcl_GetString(objv[0]), " option ?arg arg ...?\"", 
-		(char *)NULL);
-	return TCL_ERROR;
-    }
-    Tcl_Preserve(mbPtr);
-    string = Tcl_GetString(objv[1], &length);
-    c = string[0];
-    if ((c == 'c') && (length >= 2) && (strncmp(string, "cget", length) == 0)) {
-	if (objc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		Tcl_GetString(objv[0]), " cget option\"", (char *)NULL);
-	    goto error;
-	}
-	result = Blt_ConfigureValueFromObj(interp, mbPtr->tkwin, configSpecs,
-	    (char *)mbPtr, objv[2], 0);
-    } else if ((c == 'c') && (length >= 2) && 
-	       (strncmp(string, "configure", length) == 0)) {
-	if (objc == 2) {
-	    result = Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, configSpecs,
-		(char *)mbPtr, (Tcl_Obj *)NULL, 0);
-	} else if (objc == 3) {
-	    result = Blt_ConfigureInfoFromObj(interp, mbPtr->tkwin, configSpecs,
-		(char *)mbPtr, objv[2], 0);
-	} else {
-	    result = ConfigureMenuButton(interp, mbPtr, objc - 2, objv + 2,
-		BLT_CONFIG_OBJV_ONLY);
-	}
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", string,
-	    "\": must be cget or configure", (char *)NULL);
-	goto error;
-    }
-    Tcl_Release(mbPtr);
-    return result;
-
-  error:
-    Tcl_Release(mbPtr);
-    return TCL_ERROR;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DestroyMenuButton --
- *
- *	This procedure is invoked to recycle all of the resources
- *	associated with a button widget.  It is invoked as a
- *	when-idle handler in order to make sure that there is no
- *	other use of the button pending at the time of the deletion.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Everything associated with the widget is freed up.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DestroyMenuButton(char *memPtr)	/* Info about button widget. */
-{
-    register MenuButton *mbPtr = (MenuButton *)memPtr;
-
-    /*
-     * Free up all the stuff that requires special handling, then
-     * let Blt_FreeOptions handle all the standard option-related
-     * stuff.
-     */
-
-    if (mbPtr->textVarName != NULL) {
-	Tcl_UntraceVar(mbPtr->interp, mbPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    MenuButtonTextVarProc, (ClientData)mbPtr);
-    }
-    if (mbPtr->image != NULL) {
-	Tk_FreeImage(mbPtr->image);
-    }
-    if (mbPtr->normalTextGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->normalTextGC);
-    }
-    if (mbPtr->activeTextGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->activeTextGC);
-    }
-    if (mbPtr->gray != None) {
-	Tk_FreeBitmap(mbPtr->display, mbPtr->gray);
-    }
-    if (mbPtr->disabledGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->disabledGC);
-    }
-    Blt_FreeOptions(configSpecs, (char *)mbPtr, mbPtr->display, 0);
-    Blt_Free(mbPtr);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ConfigureMenuButton --
- *
- *	This procedure is called to process an objv/objc list, plus
- *	the Tk option database, in order to configure (or
- *	reconfigure) a menubutton widget.
- *
- * Results:
- *	The return value is a standard TCL result.  If TCL_ERROR is
- *	returned, then interp->result contains an error message.
- *
- * Side effects:
- *	Configuration information, such as text string, colors, font,
- *	etc. get set for mbPtr;  old resources get freed, if there
- *	were any.  The menubutton is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-ConfigureMenuButton(
-    Tcl_Interp *interp,		/* Used for error reporting. */
-    MenuButton *mbPtr,		/* Information about widget;  may or may
-				 * not already have values for some fields. */
-    int objc,			/* Number of valid entries in objv. */
-    Tcl_Obj *const *objv,	/* Arguments. */
-    int flags)			/* Flags to pass to Blt_ConfigureWidget. */
-{
-    XGCValues gcValues;
-    GC newGC;
-    unsigned long mask;
-    int result;
-    Tk_Image image;
-
-    /*
-     * Eliminate any existing trace on variables monitored by the menubutton.
-     */
-
-    if (mbPtr->textVarName != NULL) {
-	Tcl_UntraceVar(interp, mbPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    MenuButtonTextVarProc, (ClientData)mbPtr);
-    }
-    result = Blt_ConfigureWidgetFromObj(interp, mbPtr->tkwin, configSpecs,
-	objc, objv, (char *)mbPtr, flags);
-    if (result != TCL_OK) {
-	return TCL_ERROR;
-    }
-    /*
-     * A few options need special processing, such as setting the
-     * background from a 3-D border, or filling in complicated
-     * defaults that couldn't be specified to Blt_ConfigureWidget.
-     */
-
-    if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) {
-	Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->activeBorder);
-    } else {
-	Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->normalBorder);
-	if ((mbPtr->state != STATE_NORMAL) && (mbPtr->state != STATE_ACTIVE)
-	    && (mbPtr->state != STATE_DISABLED)) {
-	    Tcl_AppendResult(interp, "bad state value \"", 
-		Blt_Itoa(mbPtr->state),
-		"\": must be normal, active, or disabled", (char *)NULL);
-	    mbPtr->state = STATE_NORMAL;
-	    return TCL_ERROR;
-	}
-    }
-
-    if (mbPtr->highlightWidth < 0) {
-	mbPtr->highlightWidth = 0;
-    }
-    gcValues.font = mbPtr->fontPtr->fid;
-    gcValues.foreground = mbPtr->normalFg->pixel;
-    gcValues.background = Tk_3DBorderColor(mbPtr->normalBorder)->pixel;
-
-    /*
-     * Note: GraphicsExpose events are disabled in GC's because they're
-     * used to copy stuff from an off-screen pixmap onto the screen (we know
-     * that there's no problem with obscured areas).
-     */
-
-    gcValues.graphics_exposures = False;
-    newGC = Tk_GetGC(mbPtr->tkwin,
-	GCForeground | GCBackground | GCFont | GCGraphicsExposures, &gcValues);
-    if (mbPtr->normalTextGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->normalTextGC);
-    }
-    mbPtr->normalTextGC = newGC;
-
-    gcValues.font = mbPtr->fontPtr->fid;
-    gcValues.foreground = mbPtr->activeFg->pixel;
-    gcValues.background = Tk_3DBorderColor(mbPtr->activeBorder)->pixel;
-    newGC = Tk_GetGC(mbPtr->tkwin, GCForeground | GCBackground | GCFont,
-	&gcValues);
-    if (mbPtr->activeTextGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->activeTextGC);
-    }
-    mbPtr->activeTextGC = newGC;
-
-    gcValues.font = mbPtr->fontPtr->fid;
-    gcValues.background = Tk_3DBorderColor(mbPtr->normalBorder)->pixel;
-    if ((mbPtr->disabledFg != NULL) && (mbPtr->imageString == NULL)) {
-	gcValues.foreground = mbPtr->disabledFg->pixel;
-	mask = GCForeground | GCBackground | GCFont;
-    } else {
-	gcValues.foreground = gcValues.background;
-	if (mbPtr->gray == None) {
-	    mbPtr->gray = Tk_GetBitmap(interp, mbPtr->tkwin,
-		Tk_GetUid("gray50"));
-	    if (mbPtr->gray == None) {
-		return TCL_ERROR;
-	    }
-	}
-	gcValues.fill_style = FillStippled;
-	gcValues.stipple = mbPtr->gray;
-	mask = GCForeground | GCFillStyle | GCStipple;
-    }
-    newGC = Tk_GetGC(mbPtr->tkwin, mask, &gcValues);
-    if (mbPtr->disabledGC != None) {
-	Tk_FreeGC(mbPtr->display, mbPtr->disabledGC);
-    }
-    mbPtr->disabledGC = newGC;
-
-    if (mbPtr->xPad < 0) {
-	mbPtr->xPad = 0;
-    }
-    if (mbPtr->yPad < 0) {
-	mbPtr->yPad = 0;
-    }
-    /*
-     * Get the image for the widget, if there is one.  Allocate the
-     * new image before freeing the old one, so that the reference
-     * count doesn't go to zero and cause image data to be discarded.
-     */
-
-    if (mbPtr->imageString != NULL) {
-	image = Tk_GetImage(mbPtr->interp, mbPtr->tkwin,
-	    mbPtr->imageString, MenuButtonImageProc, (ClientData)mbPtr);
-	if (image == NULL) {
-	    return TCL_ERROR;
-	}
-    } else {
-	image = NULL;
-    }
-    if (mbPtr->image != NULL) {
-	Tk_FreeImage(mbPtr->image);
-    }
-    mbPtr->image = image;
-
-    if ((mbPtr->image == NULL) && (mbPtr->bitmap == None)
-	&& (mbPtr->textVarName != NULL)) {
-	/*
-	 * The menubutton displays a variable.  Set up a trace to watch
-	 * for any changes in it.
-	 */
-
-	char *value;
-
-	value = Tcl_GetVar(interp, mbPtr->textVarName, TCL_GLOBAL_ONLY);
-	if (value == NULL) {
-	    Tcl_SetVar(interp, mbPtr->textVarName, mbPtr->text,
-		TCL_GLOBAL_ONLY);
-	} else {
-	    if (mbPtr->text != NULL) {
-		Blt_Free(mbPtr->text);
-	    }
-	    mbPtr->text = Blt_StrdupAsset(value);
-	}
-	Tcl_TraceVar(interp, mbPtr->textVarName,
-	    TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    MenuButtonTextVarProc, (ClientData)mbPtr);
-    }
-    /*
-     * Recompute the geometry for the button.
-     */
-
-    if ((mbPtr->bitmap != None) || (mbPtr->image != NULL)) {
-	if (Tk_GetPixels(interp, mbPtr->tkwin, mbPtr->widthString,
-		&mbPtr->width) != TCL_OK) {
-	  widthError:
-	    Tcl_AddErrorInfo(interp, "\n    (processing -width option)");
-	    return TCL_ERROR;
-	}
-	if (Tk_GetPixels(interp, mbPtr->tkwin, mbPtr->heightString,
-		&mbPtr->height) != TCL_OK) {
-	  heightError:
-	    Tcl_AddErrorInfo(interp, "\n    (processing -height option)");
-	    return TCL_ERROR;
-	}
-    } else {
-	if (Tcl_GetInt(interp, mbPtr->widthString, &mbPtr->width)
-	    != TCL_OK) {
-	    goto widthError;
-	}
-	if (Tcl_GetInt(interp, mbPtr->heightString, &mbPtr->height)
-	    != TCL_OK) {
-	    goto heightError;
-	}
-    }
-    ComputeMenuButtonGeometry(mbPtr);
-
-    /*
-     * Lastly, arrange for the button to be redisplayed.
-     */
-
-    if (Tk_IsMapped(mbPtr->tkwin) && !(mbPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayMenuButton, (ClientData)mbPtr);
-	mbPtr->flags |= REDRAW_PENDING;
-    }
-    return TCL_OK;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * DisplayMenuButton --
- *
- *	This procedure is invoked to display a menubutton widget.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Commands are output to X to display the menubutton in its
- *	current mode.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-DisplayMenuButton(ClientData clientData) /* Information about widget. */
-{
-    register MenuButton *mbPtr = clientData;
-    GC gc;
-    Tk_3DBorder border;
-    Pixmap pixmap;
-    int x = 0;			/* Initialization needed only to stop
-				 * compiler warning. */
-    int y;
-    register Tk_Window tkwin = mbPtr->tkwin;
-    int width, height;
-
-    mbPtr->flags &= ~REDRAW_PENDING;
-    if ((mbPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
-	return;
-    }
-    if ((mbPtr->state == STATE_DISABLED) && (mbPtr->disabledFg != NULL)) {
-	gc = mbPtr->disabledGC;
-	border = mbPtr->normalBorder;
-    } else if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) {
-	gc = mbPtr->activeTextGC;
-	border = mbPtr->activeBorder;
-    } else {
-	gc = mbPtr->normalTextGC;
-	border = mbPtr->normalBorder;
-    }
-
-    /*
-     * In order to avoid screen flashes, this procedure redraws
-     * the menu button in a pixmap, then copies the pixmap to the
-     * screen in a single operation.  This means that there's no
-     * point in time where the on-sreen image has been cleared.
-     */
-
-    pixmap = Tk_GetPixmap(mbPtr->display, Tk_WindowId(tkwin),
-	Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-    Blt_Fill3DRectangle(tkwin, pixmap, border, 0, 0, Tk_Width(tkwin),
-	Tk_Height(tkwin), 0, TK_RELIEF_FLAT);
-
-    /*
-     * Display image or bitmap or text for button.
-     */
-
-    if (mbPtr->image != None) {
-	Tk_SizeOfImage(mbPtr->image, &width, &height);
-
-      imageOrBitmap:
-	switch (mbPtr->anchor) {
-	case TK_ANCHOR_NW:
-	case TK_ANCHOR_W:
-	case TK_ANCHOR_SW:
-	    x += mbPtr->inset;
-	    break;
-	case TK_ANCHOR_N:
-	case TK_ANCHOR_CENTER:
-	case TK_ANCHOR_S:
-	    x += ((int)(Tk_Width(tkwin) - width
-		    - mbPtr->indicatorWidth)) / 2;
-	    break;
-	default:
-	    x += Tk_Width(tkwin) - mbPtr->inset - width
-		- mbPtr->indicatorWidth;
-	    break;
-	}
-	switch (mbPtr->anchor) {
-	case TK_ANCHOR_NW:
-	case TK_ANCHOR_N:
-	case TK_ANCHOR_NE:
-	    y = mbPtr->inset;
-	    break;
-	case TK_ANCHOR_W:
-	case TK_ANCHOR_CENTER:
-	case TK_ANCHOR_E:
-	    y = ((int)(Tk_Height(tkwin) - height)) / 2;
-	    break;
-	default:
-	    y = Tk_Height(tkwin) - mbPtr->inset - height;
-	    break;
-	}
-	if (mbPtr->image != NULL) {
-	    Tk_RedrawImage(mbPtr->image, 0, 0, width, height, pixmap,
-		x, y);
-	} else {
-	    XCopyPlane(mbPtr->display, mbPtr->bitmap, pixmap,
-		gc, 0, 0, (unsigned)width, (unsigned)height, x, y, 1);
-	}
-    } else if (mbPtr->bitmap != None) {
-	Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height);
-	goto imageOrBitmap;
-    } else {
-	width = mbPtr->textWidth;
-	height = mbPtr->textHeight;
-	switch (mbPtr->anchor) {
-	case TK_ANCHOR_NW:
-	case TK_ANCHOR_W:
-	case TK_ANCHOR_SW:
-	    x = mbPtr->inset + mbPtr->xPad;
-	    break;
-	case TK_ANCHOR_N:
-	case TK_ANCHOR_CENTER:
-	case TK_ANCHOR_S:
-	    x = ((int)(Tk_Width(tkwin) - width
-		    - mbPtr->indicatorWidth)) / 2;
-	    break;
-	default:
-	    x = Tk_Width(tkwin) - width - mbPtr->xPad - mbPtr->inset
-		- mbPtr->indicatorWidth;
-	    break;
-	}
-	switch (mbPtr->anchor) {
-	case TK_ANCHOR_NW:
-	case TK_ANCHOR_N:
-	case TK_ANCHOR_NE:
-	    y = mbPtr->inset + mbPtr->yPad;
-	    break;
-	case TK_ANCHOR_W:
-	case TK_ANCHOR_CENTER:
-	case TK_ANCHOR_E:
-	    y = ((int)(Tk_Height(tkwin) - height)) / 2;
-	    break;
-	default:
-	    y = Tk_Height(tkwin) - mbPtr->inset - mbPtr->yPad - height;
-	    break;
-	}
-	TkDisplayText(mbPtr->display, pixmap, mbPtr->fontPtr,
-	    mbPtr->text, mbPtr->numChars, x, y, mbPtr->textWidth,
-	    mbPtr->justify, mbPtr->underline, gc);
-    }
-
-    /*
-     * If the menu button is disabled with a stipple rather than a special
-     * foreground color, generate the stippled effect.
-     */
-
-    if ((mbPtr->state == STATE_DISABLED)
-	&& ((mbPtr->disabledFg == NULL) || (mbPtr->image != NULL))) {
-	XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC,
-	    mbPtr->inset, mbPtr->inset,
-	    (unsigned)(Tk_Width(tkwin) - 2 * mbPtr->inset),
-	    (unsigned)(Tk_Height(tkwin) - 2 * mbPtr->inset));
-    }
-    /*
-     * Draw the cascade indicator for the menu button on the
-     * right side of the window, if desired.
-     */
-
-    if (mbPtr->indicatorOn) {
-	int borderWidth;
-
-	borderWidth = (mbPtr->indicatorHeight + 1) / 3;
-	if (borderWidth < 1) {
-	    borderWidth = 1;
-	}
-	Blt_Fill3DRectangle(tkwin, pixmap, border,
-	    Tk_Width(tkwin) - mbPtr->inset - mbPtr->indicatorWidth
-	    + mbPtr->indicatorHeight,
-	    y + ((int)(height - mbPtr->indicatorHeight)) / 2,
-	    mbPtr->indicatorWidth - 2 * mbPtr->indicatorHeight,
-	    mbPtr->indicatorHeight, borderWidth, TK_RELIEF_RAISED);
-    }
-    /*
-     * Draw the border and traversal highlight last.  This way, if the
-     * menu button's contents overflow onto the border they'll be covered
-     * up by the border.
-     */
-
-    if (mbPtr->relief != TK_RELIEF_FLAT) {
-	Blt_Draw3DRectangle(tkwin, pixmap, border,
-	    mbPtr->highlightWidth, mbPtr->highlightWidth,
-	    Tk_Width(tkwin) - 2 * mbPtr->highlightWidth,
-	    Tk_Height(tkwin) - 2 * mbPtr->highlightWidth,
-	    mbPtr->borderWidth, mbPtr->relief);
-    }
-    if (mbPtr->highlightWidth != 0) {
-	GC gc;
-
-	if (mbPtr->flags & GOT_FOCUS) {
-	    gc = Tk_GCForColor(mbPtr->highlightColorPtr, pixmap);
-	} else {
-	    gc = Tk_GCForColor(mbPtr->highlightBgColorPtr, pixmap);
-	}
-	Tk_DrawFocusHighlight(tkwin, gc, mbPtr->highlightWidth, pixmap);
-    }
-    /*
-     * Copy the information from the off-screen pixmap onto the screen,
-     * then delete the pixmap.
-     */
-
-    XCopyArea(mbPtr->display, pixmap, Tk_WindowId(tkwin),
-	mbPtr->normalTextGC, 0, 0, (unsigned)Tk_Width(tkwin),
-	(unsigned)Tk_Height(tkwin), 0, 0);
-    Tk_FreePixmap(mbPtr->display, pixmap);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenuButtonEventProc --
- *
- *	This procedure is invoked by the Tk dispatcher for various
- *	events on buttons.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	When the window gets deleted, internal structures get
- *	cleaned up.  When it gets exposed, it is redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-MenuButtonEventProc(
-    ClientData clientData,	/* Information about window. */
-    XEvent *eventPtr)		/* Information about event. */
-{
-    MenuButton *mbPtr = clientData;
-    if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
-	goto redraw;
-    } else if (eventPtr->type == ConfigureNotify) {
-	/*
-	 * Must redraw after size changes, since layout could have changed
-	 * and borders will need to be redrawn.
-	 */
-
-	goto redraw;
-    } else if (eventPtr->type == DestroyNotify) {
-	if (mbPtr->tkwin != NULL) {
-	    mbPtr->tkwin = NULL;
-	    Tcl_DeleteCommandFromToken(mbPtr->interp, mbPtr->widgetCmd);
-	}
-	if (mbPtr->flags & REDRAW_PENDING) {
-	    Tcl_CancelIdleCall(DisplayMenuButton, (ClientData)mbPtr);
-	}
-	Tcl_EventuallyFree((ClientData)mbPtr, DestroyMenuButton);
-    } else if (eventPtr->type == FocusIn) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    mbPtr->flags |= GOT_FOCUS;
-	    if (mbPtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    } else if (eventPtr->type == FocusOut) {
-	if (eventPtr->xfocus.detail != NotifyInferior) {
-	    mbPtr->flags &= ~GOT_FOCUS;
-	    if (mbPtr->highlightWidth > 0) {
-		goto redraw;
-	    }
-	}
-    }
-    return;
-
-  redraw:
-    if ((mbPtr->tkwin != NULL) && !(mbPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayMenuButton, (ClientData)mbPtr);
-	mbPtr->flags |= REDRAW_PENDING;
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenuButtonCmdDeletedProc --
- *
- *	This procedure is invoked when a widget command is deleted.  If
- *	the widget isn't already in the process of being destroyed,
- *	this command destroys it.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The widget is destroyed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-MenuButtonCmdDeletedProc(ClientData clientData)	/* Pointer to widget
-						   record for
-						   widget. */
-{
-    MenuButton *mbPtr = clientData;
-    Tk_Window tkwin = mbPtr->tkwin;
-
-    /*
-     * This procedure could be invoked either because the window was
-     * destroyed and the command was then deleted (in which case tkwin
-     * is NULL) or because the command was deleted, and then this procedure
-     * destroys the widget.
-     */
-
-    if (tkwin != NULL) {
-	mbPtr->tkwin = NULL;
-	Tk_DestroyWindow(tkwin);
-    }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * ComputeMenuButtonGeometry --
- *
- *	After changes in a menu button's text or bitmap, this procedure
- *	recomputes the menu button's geometry and passes this information
- *	along to the geometry manager for the window.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The menu button's window may change size.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-ComputeMenuButtonGeometry(MenuButton *mbPtr) 
-{
-    int width, height, mm, pixels;
-
-    mbPtr->inset = mbPtr->highlightWidth + mbPtr->borderWidth;
-    if (mbPtr->image != None) {
-	Tk_SizeOfImage(mbPtr->image, &width, &height);
-	if (mbPtr->width > 0) {
-	    width = mbPtr->width;
-	}
-	if (mbPtr->height > 0) {
-	    height = mbPtr->height;
-	}
-    } else if (mbPtr->bitmap != None) {
-	Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height);
-	if (mbPtr->width > 0) {
-	    width = mbPtr->width;
-	}
-	if (mbPtr->height > 0) {
-	    height = mbPtr->height;
-	}
-    } else {
-	mbPtr->numChars = strlen(mbPtr->text);
-	TkComputeTextGeometry(mbPtr->fontPtr, mbPtr->text,
-	    mbPtr->numChars, mbPtr->wrapLength, &mbPtr->textWidth,
-	    &mbPtr->textHeight);
-	width = mbPtr->textWidth;
-	height = mbPtr->textHeight;
-	if (mbPtr->width > 0) {
-	    width = mbPtr->width * XTextWidth(mbPtr->fontPtr, "0", 1);
-	}
-	if (mbPtr->height > 0) {
-	    height = mbPtr->height * (mbPtr->fontPtr->ascent
-		+ mbPtr->fontPtr->descent);
-	}
-	width += 2 * mbPtr->xPad;
-	height += 2 * mbPtr->yPad;
-    }
-
-    if (mbPtr->indicatorOn) {
-	mm = WidthMMOfScreen(Tk_Screen(mbPtr->tkwin));
-	pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin));
-	mbPtr->indicatorHeight = (INDICATOR_HEIGHT * pixels) / (10 * mm);
-	mbPtr->indicatorWidth = (INDICATOR_WIDTH * pixels) / (10 * mm)
-	    + 2 * mbPtr->indicatorHeight;
-	width += mbPtr->indicatorWidth;
-    } else {
-	mbPtr->indicatorHeight = 0;
-	mbPtr->indicatorWidth = 0;
-    }
-
-    Tk_GeometryRequest(mbPtr->tkwin, (int)(width + 2 * mbPtr->inset),
-	(int)(height + 2 * mbPtr->inset));
-    Tk_SetInternalBorder(mbPtr->tkwin, mbPtr->inset);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenuButtonTextVarProc --
- *
- *	This procedure is invoked when someone changes the variable
- *	whose contents are to be displayed in a menu button.
- *
- * Results:
- *	NULL is always returned.
- *
- * Side effects:
- *	The text displayed in the menu button will change to match the
- *	variable.
- *
- *---------------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-static char *
-MenuButtonTextVarProc(
-    ClientData clientData,	/* Information about button. */
-    Tcl_Interp *interp,		/* Interpreter containing variable. */
-    char *name1,		/* Name of variable. */
-    char *name2,		/* Second part of variable name. */
-    int flags)			/* Information about what happened. */
-{
-    register MenuButton *mbPtr = clientData;
-    char *value;
-
-    /*
-     * If the variable is unset, then immediately recreate it unless
-     * the whole interpreter is going away.
-     */
-
-    if (flags & TCL_TRACE_UNSETS) {
-	if ((flags & TCL_TRACE_DESTROYED) && !(flags & TCL_INTERP_DESTROYED)) {
-	    Tcl_SetVar(interp, mbPtr->textVarName, mbPtr->text,
-		TCL_GLOBAL_ONLY);
-	    Tcl_TraceVar(interp, mbPtr->textVarName,
-		TCL_GLOBAL_ONLY | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		MenuButtonTextVarProc, clientData);
-	}
-	return (char *) NULL;
-    }
-    value = Tcl_GetVar(interp, mbPtr->textVarName, TCL_GLOBAL_ONLY);
-    if (value == NULL) {
-	value = "";
-    }
-    if (mbPtr->text != NULL) {
-	Blt_Free(mbPtr->text);
-    }
-    mbPtr->text = Blt_AssertStrdup(value);
-    ComputeMenuButtonGeometry(mbPtr);
-
-    if ((mbPtr->tkwin != NULL) && Tk_IsMapped(mbPtr->tkwin)
-	&& !(mbPtr->flags & REDRAW_PENDING)) {
-	Tcl_DoWhenIdle(DisplayMenuButton, (ClientData)mbPtr);
-	mbPtr->flags |= REDRAW_PENDING;
-    }
-    return (char *) NULL;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * MenuButtonImageProc --
- *
- *	This procedure is invoked by the image code whenever the manager
- *	for an image does something that affects the size of contents
- *	of an image displayed in a button.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Arranges for the button to get redisplayed.
- *
- *---------------------------------------------------------------------------
- */
-
-static void
-MenuButtonImageProc(
-    ClientData clientData,	/* Pointer to widget record. */
-    int x, int y,		/* Upper left pixel (within image)
-				 * that must be redisplayed. */
-    int width, int height,	/* Dimensions of area to redisplay
-				 * (may be <= 0). */
-    int imgWidth, int imgHeight) /* New dimensions of image. */
-{
-    register MenuButton *mbPtr = clientData;
-
-    if (mbPtr->tkwin != NULL) {
-	ComputeMenuButtonGeometry(mbPtr);
-	if (Tk_IsMapped(mbPtr->tkwin) && !(mbPtr->flags & REDRAW_PENDING)) {
-	    Tcl_DoWhenIdle(DisplayMenuButton, (ClientData)mbPtr);
-	    mbPtr->flags |= REDRAW_PENDING;
-	}
-    }
-}
diff --git a/blt3.0/src/tkPlatDecls.h b/blt3.0/src/tkPlatDecls.h
deleted file mode 100644
index 660c8f9..0000000
--- a/blt3.0/src/tkPlatDecls.h
+++ /dev/null
@@ -1,228 +0,0 @@
-
-/*
- * tkPlatDecls.h --
- *
- * Declarations of functions in the platform-specific public TCL API.
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person obtaining
- *	a copy of this software and associated documentation files (the
- *	"Software"), to deal in the Software without restriction, including
- *	without limitation the rights to use, copy, modify, merge, publish,
- *	distribute, sublicense, and/or sell copies of the Software, and to
- *	permit persons to whom the Software is furnished to do so, subject to
- *	the following conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- *	LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- *	OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *	WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file was adapted from tkPlatDecls.h of the Tk library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#ifndef _TKPLATDECLS
-#define _TKPLATDECLS
-
-#ifdef BUILD_tk
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
-#endif
-
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script.  Any modifications to the function declarations below should be made
- * in the generic/tk.decls script.
- */
-
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-#ifdef __WIN32__
-/* 0 */
-EXTERN Window		Tk_AttachHWND(Tk_Window tkwin, 
-				HWND hwnd);
-/* 1 */
-EXTERN HINSTANCE	Tk_GetHINSTANCE(void);
-/* 2 */
-EXTERN HWND		Tk_GetHWND(Window window);
-/* 3 */
-EXTERN Tk_Window	Tk_HWNDToWindow(HWND hwnd);
-/* 4 */
-EXTERN void		Tk_PointerEvent(HWND hwnd, int x, int y);
-/* 5 */
-EXTERN int		Tk_TranslateWinEvent(HWND hwnd, 
-				UINT message, WPARAM wParam, LPARAM lParam, 
-				LRESULT * result);
-#endif /* __WIN32__ */
-#ifdef MAC_TCL
-/* 0 */
-EXTERN void		Tk_MacSetEmbedHandler(
-				Tk_MacEmbedRegisterWinProc * registerWinProcPtr, 
-				Tk_MacEmbedGetGrafPortProc * getPortProcPtr, 
-				Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, 
-				Tk_MacEmbedGetClipProc * getClipProc, 
-				Tk_MacEmbedGetOffsetInParentProc * getOffsetProc);
-/* 1 */
-EXTERN void		Tk_MacTurnOffMenus(void);
-/* 2 */
-EXTERN void		Tk_MacTkOwnsCursor(int tkOwnsIt);
-/* 3 */
-EXTERN void		TkMacInitMenus(Tcl_Interp * interp);
-/* 4 */
-EXTERN void		TkMacInitAppleEvents(Tcl_Interp * interp);
-/* 5 */
-EXTERN int		TkMacConvertEvent(EventRecord * eventPtr);
-/* 6 */
-EXTERN int		TkMacConvertTkEvent(
-				EventRecord * eventPtr, Window window);
-/* 7 */
-EXTERN void		TkGenWMConfigureEvent(Tk_Window tkwin, 
-				int x, int y, int width, int height, 
-				int flags);
-/* 8 */
-EXTERN void		TkMacInvalClipRgns(TkWindow * winPtr);
-/* 9 */
-EXTERN int		TkMacHaveAppearance(void);
-/* 10 */
-EXTERN GWorldPtr	TkMacGetDrawablePort(Drawable drawable);
-#endif /* MAC_TCL */
-
-typedef struct TkPlatStubs {
-    int magic;
-    struct TkPlatStubHooks *hooks;
-
-#ifdef __WIN32__
-    Window (*tk_AttachHWND)(Tk_Window tkwin, HWND hwnd); /* 0 */
-    HINSTANCE (*tk_GetHINSTANCE)(void); /* 1 */
-    HWND (*tk_GetHWND)(Window window); /* 2 */
-    Tk_Window (*tk_HWNDToWindow)(HWND hwnd); /* 3 */
-    void (*tk_PointerEvent)(HWND hwnd, int x, int y); /* 4 */
-    int (*tk_TranslateWinEvent)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result); /* 5 */
-#endif /* __WIN32__ */
-#ifdef MAC_TCL
-    void (*tk_MacSetEmbedHandler)(Tk_MacEmbedRegisterWinProc * registerWinProcPtr, Tk_MacEmbedGetGrafPortProc * getPortProcPtr, Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacEmbedGetClipProc * getClipProc, Tk_MacEmbedGetOffsetInParentProc * getOffsetProc); /* 0 */
-    void (*tk_MacTurnOffMenus)(void); /* 1 */
-    void (*tk_MacTkOwnsCursor)(int tkOwnsIt); /* 2 */
-    void (*tkMacInitMenus)(Tcl_Interp * interp); /* 3 */
-    void (*tkMacInitAppleEvents)(Tcl_Interp * interp); /* 4 */
-    int (*tkMacConvertEvent)(EventRecord * eventPtr); /* 5 */
-    int (*tkMacConvertTkEvent)(EventRecord * eventPtr, Window window); /* 6 */
-    void (*tkGenWMConfigureEvent)(Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 7 */
-    void (*tkMacInvalClipRgns)(TkWindow * winPtr); /* 8 */
-    int (*tkMacHaveAppearance)(void); /* 9 */
-    GWorldPtr (*tkMacGetDrawablePort)(Drawable drawable); /* 10 */
-#endif /* MAC_TCL */
-} TkPlatStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TkPlatStubs *tkPlatStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifdef __WIN32__
-#ifndef Tk_AttachHWND
-#define Tk_AttachHWND \
-	(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
-#endif
-#ifndef Tk_GetHINSTANCE
-#define Tk_GetHINSTANCE \
-	(tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
-#endif
-#ifndef Tk_GetHWND
-#define Tk_GetHWND \
-	(tkPlatStubsPtr->tk_GetHWND) /* 2 */
-#endif
-#ifndef Tk_HWNDToWindow
-#define Tk_HWNDToWindow \
-	(tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
-#endif
-#ifndef Tk_PointerEvent
-#define Tk_PointerEvent \
-	(tkPlatStubsPtr->tk_PointerEvent) /* 4 */
-#endif
-#ifndef Tk_TranslateWinEvent
-#define Tk_TranslateWinEvent \
-	(tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
-#endif
-#endif /* __WIN32__ */
-#ifdef MAC_TCL
-#ifndef Tk_MacSetEmbedHandler
-#define Tk_MacSetEmbedHandler \
-	(tkPlatStubsPtr->tk_MacSetEmbedHandler) /* 0 */
-#endif
-#ifndef Tk_MacTurnOffMenus
-#define Tk_MacTurnOffMenus \
-	(tkPlatStubsPtr->tk_MacTurnOffMenus) /* 1 */
-#endif
-#ifndef Tk_MacTkOwnsCursor
-#define Tk_MacTkOwnsCursor \
-	(tkPlatStubsPtr->tk_MacTkOwnsCursor) /* 2 */
-#endif
-#ifndef TkMacInitMenus
-#define TkMacInitMenus \
-	(tkPlatStubsPtr->tkMacInitMenus) /* 3 */
-#endif
-#ifndef TkMacInitAppleEvents
-#define TkMacInitAppleEvents \
-	(tkPlatStubsPtr->tkMacInitAppleEvents) /* 4 */
-#endif
-#ifndef TkMacConvertEvent
-#define TkMacConvertEvent \
-	(tkPlatStubsPtr->tkMacConvertEvent) /* 5 */
-#endif
-#ifndef TkMacConvertTkEvent
-#define TkMacConvertTkEvent \
-	(tkPlatStubsPtr->tkMacConvertTkEvent) /* 6 */
-#endif
-#ifndef TkGenWMConfigureEvent
-#define TkGenWMConfigureEvent \
-	(tkPlatStubsPtr->tkGenWMConfigureEvent) /* 7 */
-#endif
-#ifndef TkMacInvalClipRgns
-#define TkMacInvalClipRgns \
-	(tkPlatStubsPtr->tkMacInvalClipRgns) /* 8 */
-#endif
-#ifndef TkMacHaveAppearance
-#define TkMacHaveAppearance \
-	(tkPlatStubsPtr->tkMacHaveAppearance) /* 9 */
-#endif
-#ifndef TkMacGetDrawablePort
-#define TkMacGetDrawablePort \
-	(tkPlatStubsPtr->tkMacGetDrawablePort) /* 10 */
-#endif
-#endif /* MAC_TCL */
-
-#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* _TKPLATDECLS */
diff --git a/blt3.0/src/tkUnixFont.h b/blt3.0/src/tkUnixFont.h
deleted file mode 100644
index b15ee3f..0000000
--- a/blt3.0/src/tkUnixFont.h
+++ /dev/null
@@ -1,128 +0,0 @@
-
-/*
- * tkUnixFont.h --
- *
- *
- * The Font structure used internally by the Tk_3D* routines.
- * The following is a copy of it from tk3d.c.
- *
- *	Contains copies of internal Tk structures.
- *
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#ifndef _TK_UNIXFONT_H
-#define _TK_UNIXFONT_H
-
-
-/*
- * The following structure represents a font family.  It is assumed that all
- * screen fonts constructed from the same "font family" share certain
- * properties; all screen fonts with the same "font family" point to a shared
- * instance of this structure.  The most important shared property is the
- * character existence metrics, used to determine if a screen font can display
- * a given Unicode character.
- *
- * Under Unix, there are three attributes that uniquely identify a "font
- * family": the foundry, face name, and charset.
- */
-
-#define FONTMAP_SHIFT		10
-
-#define FONTMAP_PAGES	    	(1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
-#define FONTMAP_BITSPERPAGE	(1 << FONTMAP_SHIFT)
-
-typedef struct _FontFamily {
-    struct _FontFamily *nextPtr; /* Next in list of all known font families. */
-    int refCount;		/* How many SubFonts are referring to this
-				 * FontFamily.  When the refCount drops to
-				 * zero, this FontFamily may be freed. */
-    /*
-     * Key.
-     */
-
-    Tk_Uid foundry;		/* Foundry key for this FontFamily. */
-    Tk_Uid faceName;		/* Face name key for this FontFamily. */
-    Tcl_Encoding encoding;	/* Encoding key for this FontFamily. */
-
-    /*
-     * Derived properties.
-     */
-
-    int isTwoByteFont;		/* 1 if this is a double-byte font, 0 
-				 * otherwise. */
-    char *fontMap[FONTMAP_PAGES];
-				/* Two-level sparse table used to determine
-				 * quickly if the specified character exists.
-				 * As characters are encountered, more pages
-				 * in this table are dynamically alloced.  The
-				 * contents of each page is a bitmask
-				 * consisting of FONTMAP_BITSPERPAGE bits,
-				 * representing whether this font can be used
-				 * to display the given character at the
-				 * corresponding bit position.  The high bits
-				 * of the character are used to pick which
-				 * page of the table is used. */
-} FontFamily;
-
-/*
- * The following structure encapsulates an individual screen font.  A font
- * object is made up of however many SubFonts are necessary to display a
- * stream of multilingual characters.
- */
-typedef struct _SubFont {
-    char **fontMap;		/* Pointer to font map from the FontFamily, 
-				 * cached here to save a dereference. */
-    XFontStruct *fontStructPtr;	/* The specific screen font that will be
-				 * used when displaying/measuring chars
-				 * belonging to the FontFamily. */
-    FontFamily *familyPtr;	/* The FontFamily for this SubFont. */
-} SubFont;
-
-/*
- * The following structure represents Unix's implementation of a font
- * object.
- */
- 
-#define SUBFONT_SPACE		3
-#define BASE_CHARS		256
-
-typedef struct _UnixFont {
-    TkFont font;		/* Stuff used by generic font package.  Must
-				 * be first in structure. */
-    SubFont staticSubFonts[SUBFONT_SPACE];
-				/* Builtin space for a limited number of
-				 * SubFonts. */
-    int numSubFonts;		/* Length of following array. */
-    SubFont *subFontArray;	/* Array of SubFonts that have been loaded
-				 * in order to draw/measure all the characters
-				 * encountered by this font so far.  All fonts
-				 * start off with one SubFont initialized by
-				 * AllocFont() from the original set of font
-				 * attributes.  Usually points to
-				 * staticSubFonts, but may point to malloced
-				 * space if there are lots of SubFonts. */
-    SubFont controlSubFont;	/* Font to use to display control-character
-				 * expansions. */
-
-    Display *display;		/* Display that owns font. */
-    int pixelSize;		/* Original pixel size used when font was
-				 * constructed. */
-    TkXLFDAttributes xa;	/* Additional attributes that specify the
-				 * preferred foundry and encoding to use when
-				 * constructing additional SubFonts. */
-    int widths[BASE_CHARS];	/* Widths of first 256 chars in the base
-				 * font, for handling common case. */
-    int underlinePos;		/* Offset from baseline to origin of
-				 * underline bar (used when drawing underlined
-				 * font) (pixels). */
-    int barHeight;		/* Height of underline or overstrike bar
-				 * (used when drawing underlined or strikeout
-				 * font) (pixels). */
-} UnixFont;
-
-#endif /* _TK_UNIXFONT_H */
diff --git a/blt3.0/src/tkWinDisplay.h b/blt3.0/src/tkWinDisplay.h
deleted file mode 100644
index f852bb7..0000000
--- a/blt3.0/src/tkWinDisplay.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/*
- * tkWinDisplay.h --
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file contains excerpts from tkInt.h of the Tk library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#ifndef _TK_WIN_DISPLAY_H
-#define _TK_WIN_DISPLAY_H
-
-/*
- * The TkWinDrawable is the internal implementation of an X Drawable
- * (either a Window or a Pixmap).  The following constants define the
- * valid Drawable types.
- */
-
-#define TWD_BITMAP	1
-#define TWD_WINDOW	2
-#define TWD_WINDC	3
-
-typedef struct {
-    int type;
-    HWND handle;
-    TkWindow *winPtr;
-} TkWinWindow;
-
-typedef struct {
-    int type;
-    HBITMAP handle;
-    Colormap colormap;
-    int depth;
-} TkWinBitmap;
-
-typedef struct {
-    int type;
-    HDC hdc;
-} TkWinDC;
-
-typedef union {
-    int type;
-    TkWinWindow window;
-    TkWinBitmap bitmap;
-    TkWinDC winDC;
-} TkWinDrawable;
-
-/*
- * The TkWinDCState is used to save the state of a device context
- * so that it can be restored later.
- */
-typedef struct {
-    HPALETTE palette;
-    int bkmode;			/* This field was added in Tk
-				 * 8.3.1. Be careful that you don't 
-				 * use this structure in a context
-				 * where its size is important.  */
-} TkWinDCState;
-
-#ifdef USE_TK_STUBS
-#include "tkIntPlatDecls.h"
-#else 
-extern HDC TkWinGetDrawableDC(Display *display, Drawable drawable, 
-	TkWinDCState *state);
-
-extern HDC TkWinReleaseDrawableDC(Drawable drawable, HDC dc, 
-	TkWinDCState *state);
-
-extern HINSTANCE Tk_GetHINSTANCE(void);
-
-extern HWND Tk_GetHWND(Window window);
-
-extern Window Tk_AttachHWND(Tk_Window tkwin, HWND hWnd);
-
-#endif /* USE_TK_STUBS */
-#endif /* _TK_WIN_DISPLAY_H */
-
diff --git a/blt3.0/src/tkWinFont.h b/blt3.0/src/tkWinFont.h
deleted file mode 100644
index 65f2f77..0000000
--- a/blt3.0/src/tkWinFont.h
+++ /dev/null
@@ -1,163 +0,0 @@
-
-/*
- * tkWinFont.h --
- *
- *	Copyright 2003-2004 George A Howlett.
- *
- *	Permission is hereby granted, free of charge, to any person
- *	obtaining a copy of this software and associated documentation
- *	files (the "Software"), to deal in the Software without
- *	restriction, including without limitation the rights to use,
- *	copy, modify, merge, publish, distribute, sublicense, and/or
- *	sell copies of the Software, and to permit persons to whom the
- *	Software is furnished to do so, subject to the following
- *	conditions:
- *
- *	The above copyright notice and this permission notice shall be
- *	included in all copies or substantial portions of the
- *	Software.
- *
- *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- *	KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- *	WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- *	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
- *	OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- *	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- *	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- *	SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * This file contains structure definitions from tkWinFont.h of the Tk
- * library distribution.
- *
- *	Copyright (c) 1998-1999 by Scriptics Corporation.
- *
- *	See the file "license.terms" for information on usage and
- *	redistribution of this file, and for a DISCLAIMER OF ALL
- *	WARRANTIES.
- *
- */
-
-#ifndef _TK_WINFONT_H
-#define _TK_WINFONT_H
-
-/*
- * The following structure represents a font family.  It is assumed that
- * all screen fonts constructed from the same "font family" share certain
- * properties; all screen fonts with the same "font family" point to a
- * shared instance of this structure.  The most important shared property
- * is the character existence metrics, used to determine if a screen font
- * can display a given Unicode character.
- *
- * Under Windows, a "font family" is uniquely identified by its face name.
- */
-
-#define FONTMAP_SHIFT	    10
-
-#define FONTMAP_PAGES	    	(1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
-#define FONTMAP_BITSPERPAGE	(1 << FONTMAP_SHIFT)
-
-
-typedef struct FontFamily {
-    struct FontFamily *nextPtr;	/* Next in list of all known font families. */
-    int refCount;		/* How many SubFonts are referring to this
-				 * FontFamily.  When the refCount drops to
-				 * zero, this FontFamily may be freed. */
-    /*
-     * Key.
-     */
-     
-    Tk_Uid faceName;		/* Face name key for this FontFamily. */
-
-    /*
-     * Derived properties.
-     */
-     
-    Tcl_Encoding encoding;	/* Encoding for this font family. */
-    int isSymbolFont;		/* Non-zero if this is a symbol font. */
-    int isWideFont;		/* 1 if this is a double-byte font, 0 
-				 * otherwise. */
-    BOOL (WINAPI *textOutProc)(HDC, int, int, TCHAR *, int);
-				/* The procedure to use to draw text after
-				 * it has been converted from UTF-8 to the 
-				 * encoding of this font. */
-    BOOL (WINAPI *getTextExtentPoint32Proc)(HDC, TCHAR *, int, LPSIZE);
-				/* The procedure to use to measure text after
-				 * it has been converted from UTF-8 to the 
-				 * encoding of this font. */
-
-    char *fontMap[FONTMAP_PAGES];
-				/* Two-level sparse table used to determine
-				 * quickly if the specified character exists.
-				 * As characters are encountered, more pages
-				 * in this table are dynamically added.  The
-				 * contents of each page is a bitmask
-				 * consisting of FONTMAP_BITSPERPAGE bits,
-				 * representing whether this font can be used
-				 * to display the given character at the
-				 * corresponding bit position.  The high bits
-				 * of the character are used to pick which
-				 * page of the table is used. */
-
-    /*
-     * Cached Truetype font info.
-     */
-     
-    int segCount;		/* The length of the following arrays. */
-    USHORT *startCount;		/* Truetype information about the font, */
-    USHORT *endCount;		/* indicating which characters this font
-				 * can display (malloced).  The format of
-				 * this information is (relatively) compact,
-				 * but would take longer to search than 
-				 * indexing into the fontMap[][] table. */
-} FontFamily;
-
-/*
- * The following structure encapsulates an individual screen font.  A font
- * object is made up of however many SubFonts are necessary to display a
- * stream of multilingual characters.
- */
-typedef struct SubFont {
-    char **fontMap;		/* Pointer to font map from the FontFamily, 
-				 * cached here to save a dereference. */
-    HFONT hFont;		/* The specific screen font that will be
-				 * used when displaying/measuring chars
-				 * belonging to the FontFamily. */
-    FontFamily *familyPtr;	/* The FontFamily for this SubFont. */
-} SubFont;
-
-/*
- * The following structure represents Windows' implementation of a font
- * object.
- */
-
-#define SUBFONT_SPACE		3
-#define BASE_CHARS		128
-
-typedef struct WinFont {
-    TkFont font;		/* Stuff used by generic font package.  Must
-				 * be first in structure. */
-    SubFont staticSubFonts[SUBFONT_SPACE];
-				/* Builtin space for a limited number of
-				 * SubFonts. */
-    int numSubFonts;		/* Length of following array. */
-    SubFont *subFontArray;	/* Array of SubFonts that have been loaded
-				 * in order to draw/measure all the characters
-				 * encountered by this font so far.  All fonts
-				 * start off with one SubFont initialized by
-				 * AllocFont() from the original set of font
-				 * attributes.  Usually points to
-				 * staticSubFonts, but may point to malloced
-				 * space if there are lots of SubFonts. */
-
-    HWND hwnd;			/* Toplevel window of application that owns
-				 * this font, used for getting HDC for
-				 * offscreen measurements. */
-    int pixelSize;		/* Original pixel size used when font was
-				 * constructed. */
-    int widths[BASE_CHARS];	/* Widths of first 128 chars in the base
-				 * font, for handling common case.  The base
-				 * font is always used to draw characters
-				 * between 0x0000 and 0x007f. */
-} WinFont;
-
-#endif /* _TK_WINFONT_H */
diff --git a/blt3.0/tests/datatable.tcl b/blt3.0/tests/datatable.tcl
deleted file mode 100644
index 86f61bf..0000000
--- a/blt3.0/tests/datatable.tcl
+++ /dev/null
@@ -1,4241 +0,0 @@
-
-if {[info procs test] != "test"} {
-    source defs
-}
-if [file exists ../library] {
-    set blt_library ../library
-}
-
-#set VERBOSE 1
-test datatable.1 {datatable no args} {
-    list [catch {blt::datatable} msg] $msg
-} {1 {wrong # args: should be one of...
-  blt::datatable create ?name?
-  blt::datatable destroy name...
-  blt::datatable load name libpath
-  blt::datatable names ?pattern?...}}
-
-test datatable.2 {datatable create #auto} {
-    list [catch {blt::datatable create #auto} msg] $msg
-} {0 ::datatable0}
-
-test datatable.3 {datatable create #auto.suffix} {
-    list [catch {
-	blt::datatable create #auto.suffix
-    } msg] $msg
-} {0 ::datatable0.suffix}
-
-test datatable.4 {datatable create prefix.#auto} {
-    list [catch {
-	blt::datatable create prefix.#auto
-    } msg] $msg
-} {0 ::prefix.datatable0}
-
-test datatable.5 {datatable create prefix.#auto.suffix} {
-    list [catch {
-	blt::datatable create prefix.#auto.suffix
-    } msg] $msg
-} {0 ::prefix.datatable0.suffix}
-
-test datatable.6 {datatable create prefix.#auto.suffix.#auto} {
-    list [catch {
-	blt::datatable create prefix.#auto.suffix.#auto
-    } msg] $msg
-} {0 ::prefix.datatable0.suffix.#auto}
-
-test datatable.7 {blt::datatable destroy [blt::datatable names *datatable0*]} {
-    list [catch {
-	eval blt::datatable destroy [blt::datatable names *datatable0*]
-    } msg] $msg
-} {0 {}}
-
-test datatable.8 {blt::datatable create} {
-    list [catch {
-	blt::datatable create
-    } msg] $msg
-} {0 ::datatable0}
-
-test datatable.9 {blt::datatable create} {
-    list [catch {
-	blt::datatable create
-    } msg] $msg
-} {0 ::datatable1}
-
-test datatable.10 {blt::datatable create fred} {
-    list [catch {
-	blt::datatable create fred
-    } msg] $msg
-} {0 ::fred}
-
-test datatable.11 {blt::datatable create fred} {
-    list [catch {
-	blt::datatable create fred
-    } msg] $msg
-} {1 {a command "::fred" already exists}}
-
-test datatable.12 {blt::datatable create if} {
-    list [catch {
-	blt::datatable create if
-    } msg] $msg
-} {1 {a command "::if" already exists}}
-
-test datatable.13 {blt::datatable create (bad namespace)} {
-    list [catch {
-	blt::datatable create badNs::fred
-    } msg] $msg
-} {1 {unknown namespace "badNs"}}
-
-test datatable.14 {blt::datatable create (wrong # args)} {
-    list [catch {
-	blt::datatable create a b
-    } msg] $msg
-} {1 {wrong # args: should be "blt::datatable create ?name?"}}
-
-test datatable.15 {names} {
-    list [catch {
-	blt::datatable names
-    } msg] [lsort $msg]
-} {0 {::datatable0 ::datatable1 ::fred}}
-
-test datatable.16 {names pattern)} {
-    list [catch {
-	blt::datatable names ::datatable*
-    } msg] [lsort $msg]
-} {0 {::datatable0 ::datatable1}}
-
-test datatable.17 {names badPattern)} {
-    list [catch {
-	blt::datatable names badPattern*
-    } msg] $msg
-} {0 {}}
-
-test datatable.18 {names pattern arg (wrong # args)} {
-    list [catch {
-	blt::datatable names pattern arg
-    } msg] $msg
-} {1 {wrong # args: should be "blt::datatable names ?pattern?..."}}
-
-test datatable.19 {destroy (wrong # args)} {
-    list [catch {
-	blt::datatable destroy
-    } msg] $msg
-} {1 {wrong # args: should be "blt::datatable destroy name..."}}
-
-test datatable.20 {destroy badName} {
-    list [catch {
-	blt::datatable destroy badName
-    } msg] $msg
-} {1 {can't find table "badName"}}
-
-test datatable.21 {destroy fred} {
-    list [catch {
-	blt::datatable destroy fred
-    } msg] $msg
-} {0 {}}
-
-test datatable.22 {destroy datatable0 datatable1} {
-    list [catch {
-	blt::datatable destroy datatable0 datatable1
-    } msg] $msg
-} {0 {}}
-
-test datatable.23 {create} {
-    list [catch {
-	blt::datatable create
-    } msg] $msg
-} {0 ::datatable0}
-
-test datatable.24 {datatable0} {
-    list [catch {
-	datatable0
-    } msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable0 append row column value ?value...?
-  datatable0 attach args...
-  datatable0 column op args...
-  datatable0 dump ?switches?
-  datatable0 emptyvalue ?newValue?
-  datatable0 exists row column
-  datatable0 export format args...
-  datatable0 find expr ?switches?
-  datatable0 get row column ?defValue?
-  datatable0 import format args...
-  datatable0 keys ?column...?
-  datatable0 lappend row column value ?value...?
-  datatable0 lookup ?value...?
-  datatable0 notify op args...
-  datatable0 restore ?switches?
-  datatable0 row op args...
-  datatable0 set ?row column value?...
-  datatable0 sort ?flags...?
-  datatable0 trace op args...
-  datatable0 unset row column ?row column?}}
-
-test datatable.25 {datatable0 badOp} {
-    list [catch {
-	datatable0 badOp
-    } msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  datatable0 append row column value ?value...?
-  datatable0 attach args...
-  datatable0 column op args...
-  datatable0 dump ?switches?
-  datatable0 emptyvalue ?newValue?
-  datatable0 exists row column
-  datatable0 export format args...
-  datatable0 find expr ?switches?
-  datatable0 get row column ?defValue?
-  datatable0 import format args...
-  datatable0 keys ?column...?
-  datatable0 lappend row column value ?value...?
-  datatable0 lookup ?value...?
-  datatable0 notify op args...
-  datatable0 restore ?switches?
-  datatable0 row op args...
-  datatable0 set ?row column value?...
-  datatable0 sort ?flags...?
-  datatable0 trace op args...
-  datatable0 unset row column ?row column?}}
-
-test datatable.26 {datatable0 column (wrong \# args)} {
-    list [catch {
-	datatable0 column
-    } msg] $msg
-} {1 {wrong # args: should be "datatable0 column op args..."}}
-
-
-test datatable.27 {datatable0 column badOp} {
-    list [catch {
-	datatable0 column badOp
-    } msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  datatable0 column copy src dest ?switches...?
-  datatable0 column create ?switches?
-  datatable0 column delete column...
-  datatable0 column dup column...
-  datatable0 column exists column
-  datatable0 column extend label ?label...?
-  datatable0 column get column ?switches?
-  datatable0 column index column
-  datatable0 column indices column ?column...?
-  datatable0 column label column ?label?
-  datatable0 column labels ?labelList?
-  datatable0 column length 
-  datatable0 column move from to ?count?
-  datatable0 column names ?pattern...?
-  datatable0 column notify column ?flags? command
-  datatable0 column set column row value...
-  datatable0 column tag op args...
-  datatable0 column trace column how command
-  datatable0 column type column ?type?
-  datatable0 column unique column
-  datatable0 column unset column...
-  datatable0 column values column ?valueList?}}
-
-test datatable.28 {datatable0 row (wrong \# args)} {
-    list [catch {
-	datatable0 row
-    } msg] $msg
-} {1 {wrong # args: should be "datatable0 row op args..."}}
-
-
-test datatable.29 {datatable0 row badOp} {
-    list [catch {
-	datatable0 row badOp
-    } msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  datatable0 row copy src dest ?switches...?
-  datatable0 row create ?switches...?
-  datatable0 row delete row...
-  datatable0 row dup row...
-  datatable0 row exists row
-  datatable0 row extend label ?label...?
-  datatable0 row get row ?switches?
-  datatable0 row index row
-  datatable0 row indices row ?row...?
-  datatable0 row label row ?label?
-  datatable0 row labels ?labelList?
-  datatable0 row length 
-  datatable0 row move from to ?count?
-  datatable0 row names ?pattern...?
-  datatable0 row notify row ?flags? command
-  datatable0 row set row column value...
-  datatable0 row tag op args...
-  datatable0 row trace row how command
-  datatable0 row unique row
-  datatable0 row unset row...
-  datatable0 row values row ?valueList?}}
-
-test datatable.30 {datatable0 column length} {
-    list [catch {datatable0 column length} msg] $msg
-} {0 0}
-
-test datatable.31 {datatable0 column length badArg} {
-    list [catch {datatable0 column length badArg} msg] $msg
-} {1 {wrong # args: should be "datatable0 column length "}}
-
-test datatable.32 {datatable0 column -label xyz insert} {
-    list [catch {datatable0 column -label xyz insert} msg] $msg
-} {1 {bad operation "-label": should be one of...
-  datatable0 column copy src dest ?switches...?
-  datatable0 column create ?switches?
-  datatable0 column delete column...
-  datatable0 column dup column...
-  datatable0 column exists column
-  datatable0 column extend label ?label...?
-  datatable0 column get column ?switches?
-  datatable0 column index column
-  datatable0 column indices column ?column...?
-  datatable0 column label column ?label?
-  datatable0 column labels ?labelList?
-  datatable0 column length 
-  datatable0 column move from to ?count?
-  datatable0 column names ?pattern...?
-  datatable0 column notify column ?flags? command
-  datatable0 column set column row value...
-  datatable0 column tag op args...
-  datatable0 column trace column how command
-  datatable0 column type column ?type?
-  datatable0 column unique column
-  datatable0 column unset column...
-  datatable0 column values column ?valueList?}}
-
-test datatable.33 {column extend 5} {
-    list [catch {datatable0 column extend 5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.34 {column length} {
-    list [catch {datatable0 column length} msg] $msg
-} {0 5}
-
-test datatable.35 {column index end} {
-    list [catch {datatable0 column index end} msg] $msg
-} {0 5}
-
-test datatable.36 {row extend 5} {
-    list [catch {datatable0 row extend 5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.37 {row length} {
-    list [catch {datatable0 row length} msg] $msg
-} {0 5}
-
-test datatable.38 {column index end} {
-    list [catch {datatable0 row index end} msg] $msg
-} {0 5}
-
-test datatable.39 {column index all} {
-    list [catch {datatable0 column index all} msg] $msg
-} {0 -1}
-
-test datatable.40 {column indices all} {
-    list [catch {datatable0 column indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.41 {column indices 1-end} {
-    list [catch {datatable0 column indices 1-end} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.42 {column indices range=1-end} {
-    list [catch {datatable0 column indices range=1-end} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.43 {column indices 1-all} {
-    list [catch {datatable0 column indices 1-all} msg] $msg
-} {1 {unknown column specification "1-all" in ::datatable0}}
-
-test datatable.44 {column indices range=1-all} {
-    list [catch {datatable0 column indices range=1-all} msg] $msg
-} {1 {multiple columns specified by "all"}}
-
-test datatable.45 {column indices 2-5} {
-    list [catch {datatable0 column indices 2-5} msg] $msg
-} {0 {2 3 4 5}}
-
-test datatable.46 {column indices 5-2} {
-    list [catch {datatable0 column indices 5-2} msg] $msg
-} {0 {}}
-
-test datatable.47 {column index end} {
-    list [catch {datatable0 column index end} msg] $msg
-} {0 5}
-
-test datatable.48 {column index end badArg} {
-    list [catch {datatable0 column index end badArg} msg] $msg
-} {1 {wrong # args: should be "datatable0 column index column"}}
-
-test datatable.49 {column label 1} {
-    list [catch {datatable0 column label 1} msg] $msg
-} {0 c1}
-
-test datatable.50 {column label 1 myLabel} {
-    list [catch {datatable0 column label 1 myLabel} msg] $msg
-} {0 {}}
-
-test datatable.51 {column label 1 myLabel} {
-    list [catch {datatable0 column label 1 myLabel} msg] $msg
-} {0 {}}
-
-test datatable.52 {column label 2 myLabel} {
-    list [catch {datatable0 column label 2 myLabel} msg] $msg
-} {0 {}}
-
-test datatable.53 {column index myLabel} {
-    list [catch {datatable0 column index myLabel} msg] $msg
-} {0 1}
-
-test datatable.54 {column label 1 newLabel} {
-    list [catch {datatable0 column label 1 newLabel} msg] $msg
-} {0 {}}
-
-test datatable.55 {column index myLabel} {
-    list [catch {datatable0 column index myLabel} msg] $msg
-} {0 2}
-
-test datatable.56 {column label 1} {
-    list [catch {datatable0 column label 1} msg] $msg
-} {0 newLabel}
-
-test datatable.57 {column label end end} {
-    list [catch {datatable0 column label end end} msg] $msg
-} {0 {}}
-
-test datatable.58 {column label end endLabel} {
-    list [catch {datatable0 column label end endLabel} msg] $msg
-} {0 {}}
-
-test datatable.59 {column label end label-with-minus} {
-    list [catch {datatable0 column label end label-with-minus} msg] $msg
-} {0 {}}
-
-test datatable.60 {column label end 1abc} {
-    list [catch {datatable0 column label end 1abc} msg] $msg
-} {0 {}}
-
-test datatable.61 {column label end -abc} {
-    list [catch {datatable0 column label end -abc} msg] $msg
-} {1 {column label "-abc" can't start with a '-'.}}
-
-test datatable.62 {column indices 1-5} {
-    list [catch {datatable0 column indices 1-5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.63 {column indices range=1-5} {
-    list [catch {datatable0 column indices range=1-5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.64 {column label 1-5 c1 } {
-    list [catch {datatable0 column label 1-5 c1} msg] $msg
-} {1 {multiple columns specified by "1-5"}}
-
-test datatable.65 {column label 1 c1 2 c2 3 c3 4 c4 5 c5 } {
-    list [catch {datatable0 column label 1 c1 2 c2 3 c3 4 c4 5 c5} msg] $msg
-} {0 {}}
-
-test datatable.66 {column label 1} {
-    list [catch {datatable0 column label 1} msg] $msg
-} {0 c1}
-
-test datatable.67 {column label 2} {
-    list [catch {datatable0 column label 2} msg] $msg
-} {0 c2}
-
-test datatable.68 {column label 3} {
-    list [catch {datatable0 column label 3} msg] $msg
-} {0 c3}
-
-test datatable.69 {column label 4} {
-    list [catch {datatable0 column label 4} msg] $msg
-} {0 c4}
-
-test datatable.70 {column label 5} {
-    list [catch {datatable0 column label 5} msg] $msg
-} {0 c5}
-
-test datatable.71 {column label 6} {
-    list [catch {datatable0 column label 6} msg] $msg
-} {1 {bad column index "6"}}
-
-test datatable.72 {column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {c1 c2 c3 c4 c5}}
-
-test datatable.73 {column names c*} {
-    list [catch {datatable0 column names c*} msg] $msg
-} {0 {c1 c2 c3 c4 c5}}
-
-test datatable.74 {column names {*[1-2]}} {
-    list [catch {datatable0 column names {*[1-2]}} msg] $msg
-} {0 {c1 c2}}
-
-test datatable.75 {column names noMatch} {
-    list [catch {datatable0 column names noMatch} msg] $msg
-} {0 {}}
-
-test datatable.76 {row label 1-5 r1} {
-    list [catch {datatable0 row label 1-5 r1} msg] $msg
-} {1 {multiple rows specified by "1-5"}}
-
-test datatable.77 {row label 1 r1 2 r2 3 r3 4 r4 5 r5} {
-    list [catch {datatable0 row label 1 r1 2 r2 3 r3 4 r4 5 r5} msg] $msg
-} {0 {}}
-
-test datatable.78 {row names} {
-    list [catch {datatable0 row names} msg] $msg
-} {0 {r1 r2 r3 r4 r5}}
-
-test datatable.79 {row names r*} {
-    list [catch {datatable0 row names r*} msg] $msg
-} {0 {r1 r2 r3 r4 r5}}
-
-test datatable.80 {row names noMatch} {
-    list [catch {datatable0 row names noMatch} msg] $msg
-} {0 {}}
-
-test datatable.81 {column get} {
-    list [catch {datatable0 column get} msg] $msg
-} {1 {wrong # args: should be "datatable0 column get column ?switches?"}}
-
-test datatable.82 {column get c1} {
-    list [catch {datatable0 column get c1} msg] $msg
-} {0 {1 {} 2 {} 3 {} 4 {} 5 {}}}
-
-test datatable.83 {column get badColumn} {
-    list [catch {datatable0 column get badColumn} msg] $msg
-} {1 {unknown column specification "badColumn" in ::datatable0}}
-
-test datatable.84 {column values} {
-    list [catch {datatable0 column values} msg] $msg
-} {1 {wrong # args: should be "datatable0 column values column ?valueList?"}}
-
-test datatable.85 {column values c1} {
-    list [catch {
-	datatable0 column values c1
-    } msg] $msg
-} {0 {{} {} {} {} {}}}
-
-test datatable.86 {column values c1 {1.01 2.01 3.01 4.01 5.01}} {
-    list [catch {
-	datatable0 column values c1 {1.01 2.01 3.01 4.01 5.01}
-    } msg] $msg
-} {0 {}}
-
-test datatable.87 {column get 1} {
-    list [catch {datatable0 column get 1} msg] $msg
-} {0 {1 1.01 2 2.01 3 3.01 4 4.01 5 5.01}}
-
-test datatable.88 {column set all 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0} {
-    list [catch {
-	datatable0 column set all 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0
-    } msg] $msg
-} {0 {}}
-
-test datatable.89 {column get all} {
-    list [catch {datatable0 column get all} msg] $msg
-} {1 {multiple columns specified by "all"}}
-
-test datatable.90 {column get 1-2} {
-    list [catch {datatable0 column get 1-2} msg] $msg
-} {1 {multiple columns specified by "1-2"}}
-
-test datatable.91 {datatable0 column get 2} {
-    list [catch {datatable0 column get 2} msg] $msg
-} {0 {1 1.0 2 2.0 3 3.0 4 4.0 5 5.0}}
-
-test datatable.92 {datatable0 column get 3} {
-    list [catch {datatable0 column get 3} msg] $msg
-} {0 {1 1.0 2 2.0 3 3.0 4 4.0 5 5.0}}
-
-test datatable.93 {datatable0 column get end} {
-    list [catch {datatable0 column get end} msg] $msg
-} {0 {1 1.0 2 2.0 3 3.0 4 4.0 5 5.0}}
-
-test datatable.94 {datatable0 column set 1 3 a 2 b 1 c} {
-    list [catch {datatable0 column set 1 3 a 2 b 1 c} msg] $msg
-} {0 {}}
-
-test datatable.95 {column values 1} {
-    list [catch {datatable0 column values 1} msg] $msg
-} {0 {c b a 4.0 5.0}}
-
-test datatable.96 {column set end 1 x 2 y} {
-    list [catch {datatable0 column set end 1 x 2 y} msg] $msg
-} {0 {}}
-
-test datatable.97 {column values end} {
-    list [catch {datatable0 column values end} msg] $msg
-} {0 {x y 3.0 4.0 5.0}}
-
-test datatable.98 {column index c5} {
-    list [catch {datatable0 column index c5} msg] $msg
-} {0 5}
-
-test datatable.99 {column indices all} {
-    list [catch {datatable0 column indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.100 {column index -1} {
-    list [catch {datatable0 column index -1} msg] $msg
-} {0 -1}
-
-test datatable.101 {column index 1000} {
-    list [catch {datatable0 column index 1000} msg] $msg
-} {0 -1}
-
-test datatable.102 {column type 1} {
-    list [catch {datatable0 column type 1} msg] $msg
-} {0 string}
-
-test datatable.103 {column type 2 integer} {
-    list [catch {datatable0 column type 2 integer} msg] $msg
-} {1 {expected integer but got "1.0"}}
-
-test datatable.104 {column type 4 double} {
-    list [catch {datatable0 column type 4 double} msg] $msg
-} {0 double}
-
-test datatable.106 {column type 1 string} {
-    list [catch {datatable0 column type 1 string} msg] $msg
-} {0 string}
-
-test datatable.107 {column type 1 string badArg} {
-    list [catch {datatable0 column type 1 string badArg} msg] $msg
-} {1 {wrong # args: should be "datatable0 column type column ?type?"}}
-
-test datatable.108 {column type badTag string} {
-    list [catch {datatable0 column type badTag string} msg] $msg
-} {1 {unknown column specification "badTag" in ::datatable0}}
-
-test datatable.109 {column type all string} {
-    list [catch {datatable0 column type all string} msg] $msg
-} {0 {string string string string string}}
-
-test datatable.110 {column tag badOp} {
-    list [catch {datatable0 column tag badOp} msg] $msg
-} {1 {bad tag operation "badOp": should be one of...
-  datatable0 column tag add tag ?column...?
-  datatable0 column tag delete tag ?column...?
-  datatable0 column tag exists tag ?column?
-  datatable0 column tag forget ?tag...?
-  datatable0 column tag get column ?pattern...?
-  datatable0 column tag indices ?tag...?
-  datatable0 column tag range from to ?tag...?
-  datatable0 column tag search column ?pattern?
-  datatable0 column tag set column tag...
-  datatable0 column tag unset column tag...}}
-
-test datatable.111 {column tag (missing args)} {
-    list [catch {datatable0 column tag} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable0 column tag add tag ?column...?
-  datatable0 column tag delete tag ?column...?
-  datatable0 column tag exists tag ?column?
-  datatable0 column tag forget ?tag...?
-  datatable0 column tag get column ?pattern...?
-  datatable0 column tag indices ?tag...?
-  datatable0 column tag range from to ?tag...?
-  datatable0 column tag search column ?pattern?
-  datatable0 column tag set column tag...
-  datatable0 column tag unset column tag...}}
-
-test datatable.112 {datatable0 column tag badOp} {
-    list [catch {datatable0 column tag badOp} msg] $msg
-} {1 {bad tag operation "badOp": should be one of...
-  datatable0 column tag add tag ?column...?
-  datatable0 column tag delete tag ?column...?
-  datatable0 column tag exists tag ?column?
-  datatable0 column tag forget ?tag...?
-  datatable0 column tag get column ?pattern...?
-  datatable0 column tag indices ?tag...?
-  datatable0 column tag range from to ?tag...?
-  datatable0 column tag search column ?pattern?
-  datatable0 column tag set column tag...
-  datatable0 column tag unset column tag...}}
-
-test datatable.113 {datatable0 column tag add} {
-    list [catch {datatable0 column tag add} msg] $msg
-} {1 {wrong # args: should be "datatable0 column tag add tag ?column...?"}}
-
-test datatable.114 {datatable0 column tag add newTag (no columns)} {
-    list [catch {datatable0 column tag add newTag} msg] $msg
-} {0 {}}
-
-test datatable.115 {datatable0 column tag add newTag badIndex} {
-    list [catch {datatable0 column tag add newTag badIndex} msg] $msg
-} {1 {unknown column specification "badIndex" in ::datatable0}}
-    
-test datatable.116 {datatable0 column tag add newTag 1} {
-    list [catch {datatable0 column tag add newTag 1} msg] $msg
-} {0 {}}
-
-test datatable.117 {datatable0 column tag add newTag1 1 2 3} {
-    list [catch {datatable0 column tag add newTag1 1 2 3} msg] $msg
-} {0 {}}
-
-test datatable.117 {datatable0 column tag add newTag2 all} {
-    list [catch {datatable0 column tag add newTag2 1} msg] $msg
-} {0 {}}
-
-test datatable.118 {datatable0 column tag search} {
-    list [catch {datatable0 column tag search} msg] $msg
-} {1 {wrong # args: should be "datatable0 column tag search column ?pattern?"}}
-
-test datatable.119 {datatable0 column tag search 1} {
-    list [catch {datatable0 column tag search 1} msg] [lsort $msg]
-} {0 {all newTag newTag1 newTag2}}
-
-test datatable.120 {datatable0 column tag search 1*Tag*} {
-    list [catch {datatable0 column tag search 1 *Tag*} msg] [lsort $msg]
-} {0 {newTag newTag1 newTag2}}
-
-test datatable.121 {datatable0 column tag search all} {
-    list [catch {datatable0 column tag search all} msg] $msg
-} {0 {newTag2 newTag newTag1 all end}}
-
-test datatable.122 {datatable0 column tag search end} {
-    list [catch {datatable0 column tag search end} msg] $msg
-} {0 {all end}}
-
-test datatable.123 {datatable0 column tag search end end} {
-    list [catch {datatable0 column tag search end end} msg] $msg
-} {0 end}
-
-test datatable.124 {datatable0 column tag search end e*} {
-    list [catch {datatable0 column tag search end e*} msg] $msg
-} {0 end}
-
-test datatable.125 {datatable0 column tag delete} {
-    list [catch {datatable0 column tag delete} msg] $msg
-} {1 {wrong # args: should be "datatable0 column tag delete tag ?column...?"}}
-
-test datatable.126 {datatable0 column tag delete badTag} {
-    list [catch {datatable0 column tag delete badTag} msg] $msg
-} {0 {}}
-
-test datatable.127 {datatable0 column tag delete newTag1} {
-    list [catch {datatable0 column tag delete newTag1} msg] $msg
-} {0 {}}
-
-test datatable.128 {datatable0 column tag delete newTags1 1} {
-    list [catch {datatable0 column tag delete newTag1 1} msg] $msg
-} {0 {}}
-
-test datatable.129 {column tag delete newTag2 1} {
-    list [catch {datatable0 column tag delete newTag2 1} msg] $msg
-} {0 {}}
-
-test datatable.130 {column tag delete badTag 1} {
-    list [catch {datatable0 column tag delete badTag 1} msg] $msg
-} {1 {unknown column tag "badTag"}}
-
-test datatable.131 {column tag delete someTag 1000} {
-    list [catch {datatable0 column tag delete someTag 1000} msg] $msg
-} {1 {bad column index "1000"}}
-
-test datatable.132 {column tag delete end 1} {
-    list [catch {datatable0 column tag delete end 1} msg] $msg
-} {0 {}}
-
-test datatable.133 {column tag delete all 1} {
-    list [catch {datatable0 column tag delete all 1} msg] $msg
-} {0 {}}
-
-test datatable.134 {column tag forget} {
-    list [catch {datatable0 column tag forget} msg] $msg
-} {0 {}}
-
-test datatable.135 {column tag forget all} {
-    list [catch {datatable0 column tag forget all} msg] $msg
-} {0 {}}
-
-test datatable.136 {column tag forget newTag1} {
-    list [catch {datatable0 column tag forget newTag1} msg] $msg
-} {0 {}}
-
-test datatable.137 {column tag forget newTag1} {
-    list [catch {datatable0 column tag forget newTag1} msg] $msg
-} {1 {unknown column tag "newTag1"}}
-
-test datatable.138 {column tag indices} {
-    list [catch {datatable0 column tag indices} msg] $msg
-} {0 {}}
-
-test datatable.139 {column tag indices all} {
-    list [catch {datatable0 column tag indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.140 {column tag indices end} {
-    list [catch {datatable0 column tag indices end} msg] $msg
-} {0 5}
-
-test datatable.141 {column tag indices newTag} {
-    list [catch {datatable0 column tag indices newTag} msg] $msg
-} {0 1}
-
-test datatable.142 {column tag range 1 3 midTag} {
-    list [catch {datatable0 column tag range 1 3 midTag} msg] $msg
-} {0 {}}
-
-test datatable.143 {column tag indices midTag} {
-    list [catch {datatable0 column tag indices midTag} msg] $msg
-} {0 {1 2 3}}
-
-test datatable.144 {column tag range end 1 myTag} {
-    list [catch {datatable0 column tag range end 1 myTag} msg] $msg
-} {0 {}}
-
-test datatable.145 {column tag indices myTag} {
-    list [catch {datatable0 column tag indices myTag} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.146 {column tag range -1 1 myTag} {
-    list [catch {datatable0 column tag range -1 1 myTag} msg] $msg
-} {1 {unknown column specification "-1" in ::datatable0}}
-
-test datatable.147 {column tag range 1 -1 myTag} {
-    list [catch {datatable0 column tag range 1 -1 myTag} msg] $msg
-} {1 {unknown column specification "-1" in ::datatable0}}
-
-test datatable.148 {column tag range 1 1000 myTag} {
-    list [catch {datatable0 column tag range 1 1000 myTag} msg] $msg
-} {1 {bad column index "1000"}}
-
-test datatable.149 {column unset} {
-    list [catch {datatable0 column unset} msg] $msg
-} {1 {wrong # args: should be "datatable0 column unset column..."}}
-
-test datatable.150 {column unset 1} {
-    list [catch {datatable0 column unset 1} msg] $msg
-} {0 {}}
-
-test datatable.151 {column unset 1 end} {
-    list [catch {datatable0 column unset 1 end} msg] $msg
-} {0 {}}
-
-test datatable.152 {column extend 5 badArg } {
-    list [catch {datatable0 column extend 5 badArg} msg] $msg
-} {1 {column label "5" can't be a number.}}
-
-test datatable.153 {column extend} {
-    list [catch {datatable0 column extend} msg] $msg
-} {1 {wrong # args: should be "datatable0 column extend label ?label...?"}}
-
-test datatable.154 {column extend -1} {
-    list [catch {datatable0 column extend -1} msg] $msg
-} {1 {bad count "-1": # columns can't be negative.}}
-
-if 0 {
-test datatable.155 {column extend 10000000000 } {
-    list [catch {datatable0 column extend 10000000000} msg] $msg
-} {1 {can't extend table by 10000000000 columns: out of memory.}}
-}
-test datatable.156 {column extend -10 } {
-    list [catch {datatable0 column extend -10} msg] $msg
-} {1 {bad count "-10": # columns can't be negative.}}
-
-test datatable.157 {column extend 10 } {
-    list [catch {datatable0 column extend 10} msg] $msg
-} {0 {8 9 10 11 12 13 14 15 16 17}}
-
-test datatable.158 {column label 6 c6 7 c7 8 c8...} {
-    list [catch {
-	datatable0 column label \
-		6 c6 7 c7 8 c8 9 c9 10 c10 11 c11 12 c12 13 c13 14 c14 15 c15
-    } msg] $msg
-} {0 {}}
-
-test datatable.159 {column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17}}
-
-test datatable.160 {column delete 10 } {
-    list [catch {datatable0 column delete 10} msg] $msg
-} {0 {}}
-
-test datatable.161 {column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c11 c12 c13 c14 c15 c16 c17}}
-
-test datatable.162 {column delete 10 } {
-    list [catch {datatable0 column delete 10} msg] $msg
-} {0 {}}
-
-test datatable.163 {column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c12 c13 c14 c15 c16 c17}}
-
-test datatable.164 {column length} {
-    list [catch {datatable0 column length} msg] $msg
-} {0 15}
-
-test datatable.165 {column create} {
-    list [catch {datatable0 column create} msg] $msg
-} {0 16}
-
-test datatable.166 {column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c12 c13 c14 c15 c16 c17 c18}}
-
-test datatable.167 {column label end fred} {
-    list [catch {
-	datatable0 column label end fred
-	datatable0 column names
-    } msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c12 c13 c14 c15 c16 c17 fred}}
-
-test datatable.168 {column label end c18} {
-    list [catch {
-	datatable0 column label end c18
-	datatable0 column names
-    } msg] $msg
-} {0 {c1 c2 c3 c4 c5 c6 c7 c8 c9 c12 c13 c14 c15 c16 c17 c18}}
-
-test datatable.169 {column create -before 1 -badSwitch} {
-    list [catch {datatable0 column create -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-test datatable.170 {datatable0 column create -badSwitch -before 1} {
-    list [catch {datatable0 column create -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-test datatable.171 {datatable0 column create -before 1 -badSwitch arg} {
-    list [catch {datatable0 column create -badSwitch arg} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-test datatable.172 {datatable0 column create -before 1 -label nc1} {
-    list [catch {datatable0 column create -before 1 -label nc1} msg] $msg
-} {0 1}
-
-test datatable.173 {datatable0 column create -before 2 -label nc2} {
-    list [catch {datatable0 column create -before 2 -label nc2} msg] $msg
-} {0 2}
-
-test datatable.174 {datatable0 column create -after 3 -label nc3} {
-    list [catch {datatable0 column create -after 3 -label nc3} msg] $msg
-} {0 4}
-
-test datatable.175 {datatable0 column length} {
-    list [catch {datatable0 column length} msg] $msg
-} {0 19}
-
-test datatable.176 {datatable0 column index end} {
-    list [catch {datatable0 column index end} msg] $msg
-} {0 19}
-
-test datatable.177 {datatable0 column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {nc1 nc2 c1 nc3 c2 c3 c4 c5 c6 c7 c8 c9 c12 c13 c14 c15 c16 c17 c18}}
-
-test datatable.178 {datatable0 column create -after end} {
-    list [catch {datatable0 column create -after end} msg] $msg
-} {0 20}
-
-test datatable.179 {datatable0 column create -after 1} {
-    list [catch {datatable0 column create -after 1} msg] $msg
-} {0 2}
-
-test datatable.180 {datatable0 column create -label -one} {
-    list [catch {datatable0 column create -label -one} msg] $msg
-} {1 {column label "-one" can't start with a '-'.}}
-
-test datatable.181 {datatable0 column create -label abc-one} {
-    list [catch {datatable0 column create -label abc-one} msg] $msg
-} {0 22}
-
-test datatable.182 {datatable0 column create -label} {
-    list [catch {datatable0 column create -label} msg] $msg
-} {1 {value for "-label" missing}}
-
-
-test datatable.183 {datatable0 column create -before 0} {
-    list [catch {datatable0 column create -before 0} msg] $msg
-} {1 {bad column index "0"}}
-
-test datatable.184 {datatable0 column length} {
-    list [catch {datatable0 column length} msg] $msg
-} {0 22}
-
-test datatable.185 {datatable0 column index fred} {
-    list [catch {datatable0 column index fred} msg] $msg
-} {0 -1}
-
-test datatable.186 {datatable0 column index one} {
-    list [catch {datatable0 column index one} msg] $msg
-} {0 -1}
-
-test datatable.187 {datatable0 column index end} {
-    list [catch {datatable0 column index end} msg] $msg
-} {0 22}
-
-test datatable.188 {datatable0 column create -after 40} {
-    list [catch {datatable0 column create -after 40} msg] $msg
-} {1 {bad column index "40"}}
-
-test datatable.189 {datatable0 column create -tags {myTag1 myTag2}} {
-    list [catch {
-	datatable0 column create -tags {myTag1 myTag2}
-    } msg] $msg
-} {0 23}
-
-test datatable.190 {datatable0 column create -after end -tags {myTag1 myTag2}} {
-    list [catch {
-	datatable0 column create -after end -tags {myTag1 myTag2} 
-    } msg] $msg
-} {0 24}
-
-test datatable.191 {datatable0 column tag indices myTag1 myTag2} {
-    list [catch {
-	datatable0 column tag indices myTag1 myTag2
-    } msg] $msg
-} {0 {23 24}}
-
-test datatable.192 {datatable0 column tag indices myTag1 myTag2} {
-    list [catch {
-	datatable0 column tag indices myTag1 myTag2
-    } msg] $msg
-} {0 {23 24}}
-
-test datatable.193 {datatable0 column move} {
-    list [catch {datatable0 column move} msg] $msg
-} {1 {wrong # args: should be "datatable0 column move from to ?count?"}}
-
-test datatable.194 {datatable0 column move 0} {
-    list [catch {datatable0 column move 0} msg] $msg
-} {1 {wrong # args: should be "datatable0 column move from to ?count?"}}
-
-test datatable.195 {datatable0 column move 0 0} {
-    list [catch {datatable0 column move 0 0} msg] $msg
-} {1 {bad column index "0"}}
-
-test datatable.196 {datatable0 column move 10 0} {
-    list [catch {datatable0 column move 10 0} msg] $msg
-} {1 {bad column index "0"}}
-
-test datatable.197 {datatable0 column move all 10} {
-    list [catch {datatable0 column move all 10} msg] $msg
-} {1 {multiple columns specified by "all"}}
-
-test datatable.198 {column label} {
-    list [catch {
-	set nCols [datatable0 column length]
-	for { set i 1} { $i <= $nCols } { incr i } {
-	    lappend labels $i c$i
-	}
-	eval datatable0 column label $labels
-    } msg] $msg
-} {0 {}}
-
-test datatable.199 {datatable0 column move 1 10 0} {
-    list [catch { 
-	# This should be a no-op.
-	set before [datatable0 column names]
-	datatable0 column move 1 10 0
-	set after [datatable0 column names]
-	expr {$before == $after}
-    } msg] $msg
-} {0 1}
-
-test datatable.200 {datatable0 column move 1 1} {
-    list [catch { 
-	# This should be a no-op.
-	set before [datatable0 column names]
-	datatable0 column move 1 1 
-	set after [datatable0 column names]
-	expr {$before == $after}
-    } msg] $msg
-} {0 1}
-
-test datatable.201 {datatable0 column move 1 10} {
-    list [catch { 
-	datatable0 column move 1 10 
-	datatable0 column names
-    } msg] $msg
-} {0 {c2 c3 c4 c5 c6 c7 c8 c9 c10 c1 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24}}
-
-test datatable.202 {datatable0 column move 1 2} {
-    list [catch {
-	datatable0 column move 1 2
-	datatable0 column names
-    } msg] $msg
-} {0 {c3 c2 c4 c5 c6 c7 c8 c9 c10 c1 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24}}
-
-test datatable.203 {datatable0 column move 0 2} {
-    list [catch {datatable0 column move 0 2} msg] $msg
-} {1 {bad column index "0"}}
-
-test datatable.204 {datatable0 column move 1 17} {
-    list [catch {datatable0 column move 1 17} msg] $msg
-} {0 {}}
-
-test datatable.205 {find expr} {
-    list [catch {
-	datatable0 column tag set 4 testTag
-	datatable0 find { $testTag > 3.0 }
-    } msg] $msg
-} {0 {4 5}}
-
-#exit 0
-test datatable.206 {datatable0 column trace} {
-    list [catch {datatable0 column trace} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-
-test datatable.207 {column trace all} {
-    list [catch {datatable0 column trace all} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-    
-test datatable.208 {column trace end} {
-    list [catch {datatable0 column trace end} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-
-test datatable.209 {column trace 1} {
-    list [catch {datatable0 column trace 1} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-
-test datatable.210 {column trace 1 rwuc} {
-    list [catch {datatable0 column trace 1 rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-
-test datatable.211 {column trace all rwuc} {
-    list [catch {datatable0 column trace all rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable0 column trace column how command"}}
-
-proc Doit { args } { 
-    global mylist; lappend mylist $args 
-}
-
-test datatable.212 {column trace all rwuc Doit} {
-    list [catch {datatable0 column trace all rwuc Doit} msg] $msg
-} {0 trace0}
-
-test datatable.213 {trace info trace0} {
-    list [catch {datatable0 trace info trace0} msg] $msg
-} {0 {id trace0 column all flags rwuc command Doit}}
-
-test datatable.214 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all 1 20
-	set mylist
-    } msg] $msg
-
-} {0 {{::datatable0 1 1 wc} {::datatable0 2 1 wc} {::datatable0 3 1 wc} {::datatable0 4 1 wc} {::datatable0 5 1 wc}}}
-
-test datatable.215 {test read trace} {
-    list [catch {
-	set mylist {}
-	datatable0 column get 1
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 1 1 r} {::datatable0 2 1 r} {::datatable0 3 1 r} {::datatable0 4 1 r} {::datatable0 5 1 r}}}
-
-test datatable.216 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable0 column set 1 1 a 2 b 3 c 4 d 5 e
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 1 1 w} {::datatable0 2 1 w} {::datatable0 3 1 w} {::datatable0 4 1 w} {::datatable0 5 1 w}}}
-
-test datatable.217 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable0 column unset 1 
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 1 1 u} {::datatable0 2 1 u} {::datatable0 3 1 u} {::datatable0 4 1 u} {::datatable0 5 1 u}}}
-
-test datatable.218 {trace delete} {
-    list [catch {datatable0 trace delete} msg] $msg
-} {0 {}}
-
-if 0 {
-puts stderr [datatable0 column type all double]
-datatable0 column set 4 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0
-datatable0 column set 5 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0
-datatable0 column set 6 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0
-puts stderr [datatable0 export csv]
-puts stderr [datatable0 export xml]
-puts stderr 1,1=[datatable0 get 1 1]
-}
-test datatable.219 {trace delete badId} {
-    list [catch {datatable0 trace delete badId} msg] $msg
-} {1 {unknown trace "badId"}}
-
-test datatable.220 {trace delete trace0} {
-    list [catch {datatable0 trace delete trace0} msg] $msg
-} {0 {}}
-
-test datatable.221 {export -file} {
-    list [catch {datatable0 export -file} msg] $msg
-} {1 {can't export "-file": format not registered}}
-
-test datatable.222 {export csv -file} {
-    list [catch {datatable0 export csv -file} msg] $msg
-} {1 {value for "-file" missing}}
-
-test datatable.223 {exportfile csv -file /badDir/badFile } {
-    list [catch {datatable0 export csv -file /badDir/badFile} msg] $msg
-} {1 {couldn't open "/badDir/badFile": no such file or directory}}
-
-test datatable.224 {exportfile csv -file @badChannel } {
-    list [catch {datatable0 export csv -file @badChannel} msg] $msg
-} {1 {can not find channel named "badChannel"}}
-
-test datatable.225 {export csv -file table.csv} {
-    list [catch {datatable0 export csv -file table.csv} msg] $msg
-} {0 {}}
-
-test datatable.109 {column type all double} {
-    list [catch {datatable0 column type all double} msg] $msg
-} {0 {double double double double double double double double double double double double double double double double double double double double double double double double}}
-
-
-test datatable.226 {export csv} {
-    list [catch {datatable0 export csv} msg] $msg
-} {0 {"*BLT*","c2","c4","c5","c6","c7","c8","c9","c10","c1","c11","c12","c13","c14","c15","c16","c17","c3","c18","c19","c20","c21","c22","c23","c24"
-"r1",,,,1.0,1.0,1.0,,,,,,,,,,,,,,,,,,
-"r2",,,,2.0,2.0,2.0,,,,,,,,,,,,,,,,,,
-"r3",,,,3.0,3.0,3.0,,,,,,,,,,,,,,,,,,
-"r4",,,,4.0,4.0,4.0,,,,,,,,,,,,,,,,,,
-"r5",,,,5.0,5.0,5.0,,,,,,,,,,,,,,,,,,
-}}
-
-test datatable.109 {column type all string} {
-    list [catch {datatable0 column type all string} msg] $msg
-} {0 {string string string string string string string string string string string string string string string string string string string string string string string string}}
-
-
-#----------------------
-test datatable.227 {dump -file table.dump} {
-    list [catch {datatable0 dump -file table.dump} msg] $msg
-} {0 {}}
-
-test datatable.228 {datatable0 set (no args)} {
-    list [catch { datatable0 set } msg] $msg
-} {1 {wrong # args: should be "datatable0 set ?row column value?..."}}
-
-test datatable.229 {datatable0 set 1 (no column)} {
-    list [catch { datatable0 set 1 } msg] $msg
-} {1 {wrong # args: should be "datatable0 set ?row column value?..."}}
-
-test datatable.230 {datatable0 set 1 1 (no value)} {
-    list [catch { datatable0 set 1 1 } msg] $msg
-} {1 {wrong # args: should be "datatable0 set ?row column value?..."}}
-
-test datatable.231 {datatable0 set 1 1 1.0 3.0 (too many args)} {
-    list [catch { datatable0 set 1 1 1.0 3.0} msg] $msg
-} {1 {wrong # args: should be "datatable0 set ?row column value?..."}}
-
-test datatable.232 {datatable0 set 1 1 1.0} {
-    list [catch { datatable0 set 1 1 1.0 }  msg] $msg
-} {0 {}}
-
-test datatable.233 {datatable0 get 1 1} {
-    list [catch { datatable0 get 1 1 }  msg] $msg
-} {0 1.0}
-
-test datatable.234 {datatable0 row exists newRow} {
-    list [catch { datatable0 row exists newRow } msg] $msg
-} {0 0}
-
-test datatable.235 {datatable0 set newRow 1 abc} {
-    list [catch { datatable0 set newRow 1 abc } msg] $msg
-} {0 {}}
-
-test datatable.236 {datatable0 get newRow 1} {
-    list [catch { datatable0 get newRow 1 } msg] $msg
-} {0 abc}
-
-test datatable.237 {datatable0 row exists newRow} {
-    list [catch { datatable0 row exists newRow } msg] $msg
-} {0 1}
-
-test datatable.238 {datatable0 column exists newColumn} {
-    list [catch { datatable0 column exists newColumn } msg] $msg
-} {0 0}
-
-test datatable.239 {datatable0 set 1 newColumn def} {
-    list [catch { datatable0 set 1 newColumn def } msg] $msg
-} {0 {}}
-
-test datatable.240 {datatable0 get 1 newColumn} {
-    list [catch { datatable0 get 1 newColumn } msg] $msg
-} {0 def}
-
-test datatable.241 {datatable0 row delete newRow} {
-    list [catch { datatable0 row delete newRow } msg] $msg
-} {0 {}}
-
-test datatable.242 {datatable0 row exists newRow} {
-    list [catch { datatable0 row exists newRow } msg] $msg
-} {0 0}
-
-test datatable.243 {datatable0 column delete newColumn} {
-    list [catch { datatable0 column delete newColumn } msg] $msg
-} {0 {}}
-
-test datatable.244 {datatable0 column exists newColumn} {
-    list [catch { datatable0 row exists newRow } msg] $msg
-} {0 0}
-
-test datatable.245 {datatable0 set newRow newColumn abc} {
-    list [catch { datatable0 set newRow newColumn abc } msg] $msg
-} {0 {}}
-
-test datatable.246 {datatable0 row delete newRow} {
-    list [catch { datatable0 row delete newRow } msg] $msg
-} {0 {}}
-
-test datatable.247 {datatable0 column delete newColumn} {
-    list [catch { datatable0 column delete newColumn } msg] $msg
-} {0 {}}
-
-test datatable.248 {datatable0 column type 1 double} {
-    list [catch { datatable0 column type 1 double } msg] $msg
-} {0 double}
-
-test datatable.249 {datatable0 set 1 1 1.0} {
-    list [catch { 
-	datatable0 set 1 1 1.0 
-	datatable0 get 1 1
-    } msg] $msg
-} {0 1.0}
-
-test datatable.249 {datatable0 set end 1 1.0 end 2 2.0 end 3 3.0 end 4 4.0 } {
-    list [catch { 
-	datatable0 set end 1 1.0  end 2 2.0 end 3 3.0 end 4 4.0 
-    } msg] $msg
-} {0 {}}
-
-test datatable.249 {datatable0 set 6 1 1.0 6 } {
-    list [catch { 
-	datatable0 set 6 1 1.0  6
-    } msg] $msg
-} {1 {wrong # args: should be "datatable0 set ?row column value?..."}}
-
-test datatable.250 {datatable0 set 1 1 abc} {
-    list [catch { datatable0 set 1 1 abc } msg] $msg
-} {1 {expected floating-point number but got "abc"}}
-
-test datatable.248 {datatable0 column type 1 string} {
-    list [catch { datatable0 column type 1 string } msg] $msg
-} {0 string}
-
-test datatable.250 {datatable0 unset 1 1} {
-    list [catch { datatable0 unset 1 1} msg] $msg
-} {0 {}}
-
-test datatable.250 {datatable0 append 1 1 abc (from empty)} {
-    list [catch { datatable0 append 1 1 abc} msg] $msg
-} {0 {}}
-
-test datatable.236 {datatable0 get 1 1} {
-    list [catch { datatable0 get 1 1 } msg] $msg
-} {0 abc}
-
-test datatable.250 {datatable0 append 1 1 def (from empty)} {
-    list [catch { datatable0 append 1 1 def} msg] $msg
-} {0 {}}
-
-test datatable.236 {datatable0 get 1 1} {
-    list [catch { datatable0 get 1 1 } msg] $msg
-} {0 abcdef}
-
-test datatable.236 {datatable0 get 1 2 defValue } {
-    list [catch { datatable0 get 2 1 defValue } msg] $msg
-} {0 defValue}
-
-test datatable.236 {datatable0 get 1 2 defValue (too many args) } {
-    list [catch { datatable0 get 2 1 defValue extraArg } msg] $msg
-} {1 {wrong # args: should be "datatable0 get row column ?defValue?"}}
-
-test datatable.250 {datatable0 append 1 1 123 456 789 (from empty)} {
-    list [catch { datatable0 append 1 1 123 456 789 } msg] $msg
-} {0 {}}
-
-test datatable.236 {datatable0 get 1 1} {
-    list [catch { datatable0 get 1 1 } msg] $msg
-} {0 abcdef123456789}
-
-test datatable.250 {datatable0 unset 1 1} {
-    list [catch { datatable0 unset 1 1} msg] $msg
-} {0 {}}
-
-test datatable.250 {datatable0 unset 1 1} {
-    list [catch { datatable0 unset 1 1} msg] $msg
-} {0 {}}
-
-test datatable.249 {datatable0 unset 1 1 1 } {
-    list [catch { datatable0 unset 1 1 1 } msg] $msg
-} {1 {wrong # args: should be "datatable0 unset ?row column?...}}
-
-test datatable.249 {datatable0 unset end 1 end 2 end 3 end 4 } {
-    list [catch { datatable0 unset end 1  end 2 end 3 end 4 } msg] $msg
-} {0 {}}
-
-test datatable.249 {datatable0 unset 0 0 } {
-    list [catch { datatable0 unset 0 0 } msg] $msg
-} {0 {}}
-
-test datatable.249 {datatable0 unset 10000 10000 } {
-    list [catch { datatable0 unset 10000 10000 } msg] $msg
-} {0 {}}
-
-test datatable.249 {datatable0 unset 10000 10000 } {
-    list [catch { datatable0 unset 10000 10000 } msg] $msg
-} {0 {}}
-
-#---------------------
-
-test datatable.251 {blt::datatable create} {
-    list [catch {blt::datatable create} msg] $msg
-} {0 ::datatable1}
-
-test datatable.252 {column extend 5} {
-    list [catch {datatable1 column extend 5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.253 {row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 0}
-
-test datatable.254 {row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 0}
-
-test datatable.255 {row length badArg} {
-    list [catch {datatable1 row length badArg} msg] $msg
-} {1 {wrong # args: should be "datatable1 row length "}}
-
-test datatable.256 {row -label xyz create} {
-    list [catch {datatable1 row -label xyz create} msg] $msg
-} {1 {bad operation "-label": should be one of...
-  datatable1 row copy src dest ?switches...?
-  datatable1 row create ?switches...?
-  datatable1 row delete row...
-  datatable1 row dup row...
-  datatable1 row exists row
-  datatable1 row extend label ?label...?
-  datatable1 row get row ?switches?
-  datatable1 row index row
-  datatable1 row indices row ?row...?
-  datatable1 row label row ?label?
-  datatable1 row labels ?labelList?
-  datatable1 row length 
-  datatable1 row move from to ?count?
-  datatable1 row names ?pattern...?
-  datatable1 row notify row ?flags? command
-  datatable1 row set row column value...
-  datatable1 row tag op args...
-  datatable1 row trace row how command
-  datatable1 row unique row
-  datatable1 row unset row...
-  datatable1 row values row ?valueList?}}
-
-test datatable.257 {row extend 5} {
-    list [catch {datatable1 row extend 5} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.258 {row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 5}
-
-test datatable.259 {row index end} {
-    list [catch {datatable1 row index end} msg] $msg
-} {0 5}
-
-test datatable.260 {row indices all} {
-    list [catch {datatable1 row indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.261 {row indices 1-end} {
-    list [catch {datatable1 row indices "1-end" } msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.262 {row indices 1-all} {
-    list [catch {datatable1 row indices "1-all" } msg] $msg
-} {1 {unknown row specification "1-all" in ::datatable1}}
-
-test datatable.263 {row indices 2-5} {
-    list [catch {datatable1 row indices 2-5} msg] $msg
-} {0 {2 3 4 5}}
-
-test datatable.264 {row indices 5-2} {
-    list [catch {datatable1 row indices 5-2} msg] $msg
-} {0 {}}
-
-test datatable.265 {row index end} {
-    list [catch {datatable1 row index end} msg] $msg
-} {0 5}
-
-test datatable.266 {row index end badArg} {
-    list [catch {datatable1 row index end badArg} msg] $msg
-} {1 {wrong # args: should be "datatable1 row index row"}}
-
-test datatable.267 {row label 1} {
-    list [catch {datatable1 row label 1} msg] $msg
-} {0 r1}
-
-test datatable.268 {row label 1 myLabel} {
-    list [catch {datatable1 row label 1 myLabel} msg] $msg
-} {0 {}}
-
-test datatable.269 {row label 1} {
-    list [catch {datatable1 row label 1} msg] $msg
-} {0 myLabel}
-
-test datatable.270 {row label 2 myLabel} {
-    list [catch {datatable1 row label 2 myLabel} msg] $msg
-} {0 {}}
-
-test datatable.271 {row label 1} {
-    list [catch {datatable1 row label 1} msg] $msg
-} {0 myLabel}
-
-test datatable.272 {row label end end} {
-    list [catch {datatable1 row label end end} msg] $msg
-} {0 {}}
-
-test datatable.273 {row label end endLabel} {
-    list [catch {datatable1 row label end endLabel} msg] $msg
-} {0 {}}
-
-test datatable.274 {row label end 1abc} {
-    list [catch {datatable1 row label end 1abc} msg] $msg
-} {0 {}}
-
-test datatable.275 {row label end label-with-minus} {
-    list [catch {datatable1 row label end label-with-minus} msg] $msg
-} {0 {}}
-
-test datatable.276 {row label end -abc} {
-    list [catch {datatable1 row label end -abc} msg] $msg
-} {1 {row label "-abc" can't start with a '-'.}}
-
-test datatable.277 {row names *Label} {
-    list [catch {datatable1 row names *Label} msg] $msg
-} {0 {myLabel myLabel}}
-
-test datatable.278 {row names} {
-    list [catch {datatable1 row names} msg] $msg
-} {0 {myLabel myLabel r3 r4 label-with-minus}}
-
-test datatable.279 {row names r*} {
-    list [catch {datatable1 row names r*} msg] $msg
-} {0 {r3 r4}}
-
-test datatable.280 {row names *-with-*} {
-    list [catch {datatable1 row names *-with-*} msg] $msg
-} {0 label-with-minus}
-
-test datatable.281 {datatable1 row names badPattern} {
-    list [catch {datatable1 row names badPattern} msg] $msg
-} {0 {}}
-
-test datatable.282 {datatable1 row get myLabel} {
-    list [catch {datatable1 row get myLabel} msg] $msg
-} {0 {1 {} 2 {} 3 {} 4 {} 5 {}}}
-
-test datatable.283 {datatable1 row get} {
-    list [catch {datatable1 row get} msg] $msg
-} {1 {wrong # args: should be "datatable1 row get row ?switches?"}}
-
-test datatable.284 {datatable1 row set myLabel} {
-    list [catch {datatable1 row set myLabel} msg] $msg
-} {1 {wrong # args: should be "datatable1 row set row column value..."}}
-
-test datatable.285 {row set all 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0} {
-    list [catch {
-	datatable1 row set all 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0
-    } msg] $msg
-} {0 {}}
-
-test datatable.286 {datatable1 row values 1} {
-    list [catch {datatable1 row values 1} msg] $msg
-} {0 {1.0 2.0 3.0 4.0 5.0}}
-
-test datatable.287 {datatable1 row values all} {
-    list [catch {datatable1 row values all} msg] $msg
-} {1 {multiple rows specified by "all"}}
-
-test datatable.288 {datatable1 row values 1-2} {
-    list [catch {datatable1 row values 1-2} msg] $msg
-} {1 {multiple rows specified by "1-2"}}
-
-test datatable.289 {datatable1 row values 2} {
-    list [catch {datatable1 row values 2} msg] $msg
-} {0 {1.0 2.0 3.0 4.0 5.0}}
-
-test datatable.290 {datatable1 row values 3} {
-    list [catch {datatable1 row values 3} msg] $msg
-} {0 {1.0 2.0 3.0 4.0 5.0}}
-
-test datatable.291 {datatable1 row values end} {
-    list [catch {datatable1 row values end} msg] $msg
-} {0 {1.0 2.0 3.0 4.0 5.0}}
-
-test datatable.292 {datatable1 row values 1 { a b c }} {
-    list [catch {datatable1 row values 1 { a b c }} msg] $msg
-} {0 {}}
-
-test datatable.293 {datatable1 row values 1} {
-    list [catch {datatable1 row values 1} msg] $msg
-} {0 {a b c 4.0 5.0}}
-
-test datatable.294 {datatable1 row values end { x y }} {
-    list [catch {datatable1 row values end { x y }} msg] $msg
-} {0 {}}
-
-test datatable.295 {datatable1 row values end} {
-    list [catch {datatable1 row values end} msg] $msg
-} {0 {x y 3.0 4.0 5.0}}
-
-test datatable.296 {datatable1 row index label-with-minus} {
-    list [catch {datatable1 row index label-with-minus} msg] $msg
-} {0 5}
-
-test datatable.297 {datatable1 row indices all} {
-    list [catch {datatable1 row indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.298 {datatable1 row index -1} {
-    list [catch {datatable1 row index -1} msg] $msg
-} {0 -1}
-
-test datatable.299 {datatable1 row index 1000} {
-    list [catch {datatable1 row index 1000} msg] $msg
-} {0 -1}
-
-test datatable.300 {datatable1 row tag badOp} {
-    list [catch {datatable1 row tag badOp} msg] $msg
-} {1 {bad tag operation "badOp": should be one of...
-  datatable1 row tag add tag ?row...?
-  datatable1 row tag delete tag ?row...?
-  datatable1 row tag exists tag ?row?
-  datatable1 row tag forget ?tag...?
-  datatable1 row tag get row ?pattern...?
-  datatable1 row tag indices ?tag...?
-  datatable1 row tag range from to ?tag...?
-  datatable1 row tag search row ?pattern?
-  datatable1 row tag set row tag...
-  datatable1 row tag unset row tag...}}
-
-test datatable.301 {datatable1 row tag (missing args)} {
-    list [catch {datatable1 row tag} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable1 row tag add tag ?row...?
-  datatable1 row tag delete tag ?row...?
-  datatable1 row tag exists tag ?row?
-  datatable1 row tag forget ?tag...?
-  datatable1 row tag get row ?pattern...?
-  datatable1 row tag indices ?tag...?
-  datatable1 row tag range from to ?tag...?
-  datatable1 row tag search row ?pattern?
-  datatable1 row tag set row tag...
-  datatable1 row tag unset row tag...}}
-
-test datatable.302 {datatable1 row tag badOp} {
-    list [catch {datatable1 row tag badOp} msg] $msg
-} {1 {bad tag operation "badOp": should be one of...
-  datatable1 row tag add tag ?row...?
-  datatable1 row tag delete tag ?row...?
-  datatable1 row tag exists tag ?row?
-  datatable1 row tag forget ?tag...?
-  datatable1 row tag get row ?pattern...?
-  datatable1 row tag indices ?tag...?
-  datatable1 row tag range from to ?tag...?
-  datatable1 row tag search row ?pattern?
-  datatable1 row tag set row tag...
-  datatable1 row tag unset row tag...}}
-
-test datatable.303 {datatable1 row tag add} {
-    list [catch {datatable1 row tag add} msg] $msg
-} {1 {wrong # args: should be "datatable1 row tag add tag ?row...?"}}
-
-test datatable.304 {datatable1 row tag add 1} {
-    list [catch {datatable1 row tag add 1} msg] $msg
-} {0 {}}
-
-test datatable.305 {datatable1 row tag add tag badIndex} {
-    list [catch {datatable1 row tag add tag badIndex} msg] $msg
-} {1 {unknown row specification "badIndex" in ::datatable1}}
-
-test datatable.306 {datatable1 row tag add newTag 1} {
-    list [catch {datatable1 row tag add newTag 1} msg] $msg
-} {0 {}}
-
-test datatable.307 {datatable1 row tag add newTag1 1} {
-    list [catch {datatable1 row tag add newTag1 1} msg] $msg
-} {0 {}}
-
-test datatable.307 {datatable1 row tag add newTag2 1} {
-    list [catch {datatable1 row tag add newTag2 1} msg] $msg
-} {0 {}}
-
-test datatable.308 {datatable1 row tag search} {
-    list [catch {datatable1 row tag search} msg] $msg
-} {1 {wrong # args: should be "datatable1 row tag search row ?pattern?"}}
-
-test datatable.309 {datatable1 row tag search 1} {
-    list [catch {datatable1 row tag search 1} msg] [lsort $msg]
-} {0 {all newTag newTag1 newTag2}}
-
-test datatable.310 {datatable1 row tag search 1*Tag*} {
-    list [catch {datatable1 row tag search 1 *Tag*} msg] [lsort $msg]
-} {0 {newTag newTag1 newTag2}}
-
-test datatable.311 {datatable1 row tag search all} {
-    list [catch {datatable1 row tag search all} msg] $msg
-} {0 {newTag2 newTag newTag1 all end}}
-
-test datatable.312 {datatable1 row tag search end} {
-    list [catch {datatable1 row tag search end} msg] $msg
-} {0 {all end}}
-
-test datatable.313 {datatable1 row tag search end end} {
-    list [catch {datatable1 row tag search end end} msg] $msg
-} {0 end}
-
-test datatable.314 {datatable1 row tag search end e*} {
-    list [catch {datatable1 row tag search end e*} msg] $msg
-} {0 end}
-
-test datatable.315 {datatable1 row tag delete} {
-    list [catch {datatable1 row tag delete} msg] $msg
-} {1 {wrong # args: should be "datatable1 row tag delete tag ?row...?"}}
-
-test datatable.316 {datatable1 row tag delete someTag} {
-    list [catch {datatable1 row tag delete someTag} msg] $msg
-} {0 {}}
-
-test datatable.317 {datatable1 row tag delete newTag1 1} {
-    list [catch {datatable1 row tag delete newTag1 1} msg] $msg
-} {0 {}}
-
-test datatable.318 {datatable1 row tag delete newTag1 1} {
-    list [catch {datatable1 row tag delete newTag1 1} msg] $msg
-} {0 {}}
-
-test datatable.319 {datatable1 row tag delete newTag2 1} {
-    list [catch {datatable1 row tag delete newTag2 1} msg] $msg
-} {0 {}}
-
-test datatable.320 {datatable1 row tag delete badTag 1} {
-    list [catch {datatable1 row tag delete badTag 1} msg] $msg
-} {1 {unknown row tag "badTag"}}
-
-test datatable.321 {datatable1 row tag delete someTag 1000} {
-    list [catch {datatable1 row tag delete someTag 1000} msg] $msg
-} {1 {bad row index "1000"}}
-
-test datatable.322 {datatable1 row tag delete end 1} {
-    list [catch {datatable1 row tag delete end 1} msg] $msg
-} {0 {}}
-
-test datatable.323 {datatable1 row tag delete all 1} {
-    list [catch {datatable1 row tag delete all 1} msg] $msg
-} {0 {}}
-
-test datatable.324 {datatable1 row tag forget} {
-    list [catch {datatable1 row tag forget} msg] $msg
-} {0 {}}
-
-test datatable.325 {row tag forget all} {
-    list [catch {datatable1 row tag forget all} msg] $msg
-} {0 {}}
-
-test datatable.326 {row tag forget newTag1} {
-    list [catch {datatable1 row tag forget newTag1} msg] $msg
-} {0 {}}
-
-test datatable.327 {row tag forget newTag1} {
-    list [catch {datatable1 row tag forget newTag1} msg] $msg
-} {1 {unknown row tag "newTag1"}}
-
-test datatable.328 {row tag indices} {
-    list [catch {datatable1 row tag indices} msg] $msg
-} {0 {}}
-
-test datatable.329 {row tag indices all} {
-    list [catch {datatable1 row tag indices all} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.330 {row tag indices end} {
-    list [catch {datatable1 row tag indices end} msg] $msg
-} {0 5}
-
-test datatable.331 {row tag indices newTag} {
-    list [catch {datatable1 row tag indices newTag} msg] $msg
-} {0 1}
-
-test datatable.332 {row tag range 1 3 midTag} {
-    list [catch {datatable1 row tag range 1 3 midTag} msg] $msg
-} {0 {}}
-
-test datatable.333 {row tag indices midTag} {
-    list [catch {datatable1 row tag indices midTag} msg] $msg
-} {0 {1 2 3}}
-
-test datatable.334 {row tag range end 1 myTag} {
-    list [catch {datatable1 row tag range end 1 myTag} msg] $msg
-} {0 {}}
-
-test datatable.335 {row tag indices myTag} {
-    list [catch {datatable1 row tag indices myTag} msg] $msg
-} {0 {1 2 3 4 5}}
-
-test datatable.336 {row tag range -1 1 myTag} {
-    list [catch {datatable1 row tag range -1 1 myTag} msg] $msg
-} {1 {unknown row specification "-1" in ::datatable1}}
-
-test datatable.337 {row tag range 1 -1 myTag} {
-    list [catch {datatable1 row tag range 1 -1 myTag} msg] $msg
-} {1 {unknown row specification "-1" in ::datatable1}}
-
-test datatable.338 {row tag range 1 1000 myTag} {
-    list [catch {datatable1 row tag range 1 1000 myTag} msg] $msg
-} {1 {bad row index "1000"}}
-
-test datatable.339 {row unset} {
-    list [catch {datatable1 row unset} msg] $msg
-} {1 {wrong # args: should be "datatable1 row unset row..."}}
-
-test datatable.340 {row unset 1} {
-    list [catch {datatable1 row unset 1} msg] $msg
-} {0 {}}
-
-test datatable.341 {dump} {
-    list [catch {datatable1 dump} msg] $msg
-} {0 {i 5 5 0 0
-c 1 c1 string {}
-c 2 c2 string {}
-c 3 c3 string {}
-c 4 c4 string {}
-c 5 c5 string {}
-r 1 myLabel {myTag midTag newTag}
-r 2 myLabel {myTag midTag}
-r 3 r3 {myTag midTag}
-r 4 r4 {myTag}
-r 5 label-with-minus {myTag}
-d 2 1 1.0
-d 3 1 1.0
-d 4 1 1.0
-d 5 1 x
-d 2 2 2.0
-d 3 2 2.0
-d 4 2 2.0
-d 5 2 y
-d 2 3 3.0
-d 3 3 3.0
-d 4 3 3.0
-d 5 3 3.0
-d 2 4 4.0
-d 3 4 4.0
-d 4 4 4.0
-d 5 4 4.0
-d 2 5 5.0
-d 3 5 5.0
-d 4 5 5.0
-d 5 5 5.0
-}}
-
-test datatable.342 {datatable1 row get 1 defValue} {
-    list [catch {
-	datatable1 emptyvalue defValue
-	set out [datatable1 row get 1]
-	datatable1 emptyvalue ""
-	eval list $out
-    } msg] $msg
-} {0 {1 defValue 2 defValue 3 defValue 4 defValue 5 defValue}}
-
-test datatable.343 {datatable1 row unset 1 end} {
-    list [catch {datatable1 row unset 1 end} msg] $msg
-} {0 {}}
-
-test datatable.344 {datatable1 row extend 5 badArg } {
-    list [catch {datatable1 row extend 5 badArg} msg] $msg
-} {1 {row label "5" can't be a number.}}
-
-test datatable.345 {datatable1 row extend} {
-    list [catch {datatable1 row extend} msg] $msg
-} {1 {wrong # args: should be "datatable1 row extend label ?label...?"}}
-
-test datatable.346 {datatable1 row extend myRow} {
-    list [catch {datatable1 row extend myRow} msg] $msg
-} {0 8}
-
-if 0 {
-test datatable.347 {datatable1 row extend 10000000000 } {
-    list [catch {datatable1 row extend 10000000000} msg] $msg
-} {1 {can't extend table by 10000000000 rows: out of memory.}}
-}
-
-test datatable.348 {datatable1 row extend -10 } {
-    list [catch {datatable1 row extend -10} msg] $msg
-} {1 {bad count "-10": # rows can't be negative.}}
-
-test datatable.349 {datatable1 row extend 10 } {
-    list [catch {datatable1 row extend 10} msg] $msg
-} {0 {9 10 11 12 13 14 15 16 17 18}}
-
-test datatable.350 {datatable1 row names} {
-    list [catch {datatable1 row names} msg] $msg
-} {0 {myLabel myLabel r3 r4 label-with-minus r6 r7 end r9 r10 r11 r12 r13 r14 r15 r16 r17 r18}}
-
-test datatable.351 {datatable1 row delete 10 } {
-    list [catch {datatable1 row delete 10} msg] $msg
-} {0 {}}
-
-test datatable.352 {datatable1 row names} {
-    list [catch {datatable1 row names} msg] $msg
-} {0 {myLabel myLabel r3 r4 label-with-minus r6 r7 end r9 r11 r12 r13 r14 r15 r16 r17 r18}}
-
-test datatable.353 {datatable1 row delete 10 } {
-    list [catch {datatable1 row delete 10} msg] $msg
-} {0 {}}
-
-test datatable.354 {datatable1 row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 16}
-
-test datatable.355 {datatable1 row create} {
-    list [catch {datatable1 row create} msg] $msg
-} {0 17}
-
-test datatable.356 {datatable1 row create -before 1 -badSwitch} {
-    list [catch {datatable1 row create -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-test datatable.357 {datatable1 row create -badSwitch -before 1} {
-    list [catch {datatable1 row create -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-test datatable.358 {datatable1 row create -before 1 -badSwitch arg} {
-    list [catch {datatable1 row create -badSwitch arg} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -after column
-   -after row
-   -before column
-   -before row
-   -label string
-   -tags tags
-   -type type}}
-
-
-test datatable.359 {datatable1 row create -before 1 -label one} {
-    list [catch {datatable1 row create -before 1 -label one} msg] $msg
-} {0 1}
-
-test datatable.360 {datatable1 row create -before 2 -label two} {
-    list [catch {datatable1 row create -before 2 -label two} msg] $msg
-} {0 2}
-
-test datatable.361 {datatable1 row create -after 3 -label three} {
-    list [catch {datatable1 row create -after 3 -label three} msg] $msg
-} {0 4}
-
-test datatable.362 {datatable1 row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 20}
-
-test datatable.363 {datatable1 row names} {
-    list [catch {datatable1 row names} msg] $msg
-} {0 20}
-
-test datatable.364 {datatable1 row index end} {
-    list [catch {datatable1 row index end} msg] $msg
-} {0 20}
-
-test datatable.365 {datatable1 row names} {
-    list [catch {datatable1 row names} msg] $msg
-} {0 {one two myLabel three myLabel r3 r4 label-with-minus r6 r7 end r9 r12 r13 r14 r15 r16 r17 r18 r19}}
-
-test datatable.366 {datatable1 row create -after end} {
-    list [catch {datatable1 row create -after end} msg] $msg
-} {0 21}
-
-test datatable.367 {datatable1 row create -after 1} {
-    list [catch {datatable1 row create -after 1} msg] $msg
-} {0 2}
-
-test datatable.368 {datatable1 row create -label one} {
-    list [catch {datatable1 row create -label one} msg] $msg
-} {0 23}
-
-test datatable.369 {datatable1 row create -label} {
-    list [catch {datatable1 row create -label} msg] $msg
-} {1 {value for "-label" missing}}
-
-test datatable.370 {datatable1 row create -before 0} {
-    list [catch {datatable1 row create -before 0} msg] $msg
-} {1 {bad row index "0"}}
-
-test datatable.371 {datatable1 row length} {
-    list [catch {datatable1 row length} msg] $msg
-} {0 23}
-
-test datatable.372 {datatable1 row index fred} {
-    list [catch {datatable1 row index fred} msg] $msg
-} {0 -1}
-
-test datatable.373 {datatable1 row index one} {
-    list [catch {datatable1 row index one} msg] $msg
-} {0 1}
-
-test datatable.374 {datatable1 row index end} {
-    list [catch {datatable1 row index end} msg] $msg
-} {0 23}
-
-test datatable.375 {datatable1 row create -after 40} {
-    list [catch {datatable1 row create -after 40} msg] $msg
-} {1 {bad row index "40"}}
-
-test datatable.376 {datatable1 row create -tags {myTag1 myTag2}} {
-    list [catch {
-	datatable1 row create -tags {myTag1 myTag2}
-    } msg] $msg
-} {0 24}
-
-test datatable.377 {datatable1 row create -after end -tags {myTag1 myTag2}} {
-    list [catch {
-	datatable1 row create -after end -tags {myTag1 myTag2} 
-    } msg] $msg
-} {0 25}
-
-test datatable.378 {datatable1 row tag indices myTag1 myTag2} {
-    list [catch {
-	datatable1 row tag indices myTag1 myTag2
-    } msg] $msg
-} {0 {24 25}}
-
-test datatable.379 {datatable1 row tag indices myTag1 myTag2} {
-    list [catch {
-	datatable1 row tag indices myTag1 myTag2
-    } msg] $msg
-} {0 {24 25}}
-
-test datatable.380 {datatable1 row move} {
-    list [catch {datatable1 row move} msg] $msg
-} {1 {wrong # args: should be "datatable1 row move from to ?count?"}}
-
-test datatable.381 {datatable1 row move 0} {
-    list [catch {datatable1 row move 0} msg] $msg
-} {1 {wrong # args: should be "datatable1 row move from to ?count?"}}
-
-test datatable.382 {datatable1 row move 0 0} {
-    list [catch {datatable1 row move 0 0} msg] $msg
-} {1 {bad row index "0"}}
-
-test datatable.383 {datatable1 row move 10 0} {
-    list [catch {datatable1 row move 10 0} msg] $msg
-} {1 {bad row index "0"}}
-
-test datatable.384 {datatable1 row move all 10} {
-    list [catch {datatable1 row move all 10} msg] $msg
-} {1 {multiple rows specified by "all"}}
-
-test datatable.385 {datatable1 row move 1 10 0} {
-    list [catch { 
-	datatable1 row move 1 10 0
-	datatable1 row names
-    } msg] $msg
-} {0 {one r24 two myLabel three myLabel r3 r4 label-with-minus r6 r7 end r9 r12 r13 r14 r15 r16 r17 r18 r19 r23 one r26 r27}}
-
-test datatable.386 {datatable1 row move 1 1} {
-    list [catch { 
-	datatable1 row move 1 1 
-	datatable1 row names
-    } msg] $msg
-} {0 {one r24 two myLabel three myLabel r3 r4 label-with-minus r6 r7 end r9 r12 r13 r14 r15 r16 r17 r18 r19 r23 one r26 r27}}
-
-test datatable.387 {datatable1 row move 1 10} {
-    list [catch { 
-	datatable1 row move 1 10 
-	datatable1 row names
-    } msg] $msg
-} {0 {r24 two myLabel three myLabel r3 r4 label-with-minus r6 one r7 end r9 r12 r13 r14 r15 r16 r17 r18 r19 r23 one r26 r27}}
-
-test datatable.388 {datatable1 row move 1 2} {
-    list [catch {
-	datatable1 row move 1 2
-	datatable1 row names
-    } msg] $msg
-} {0 {two r24 myLabel three myLabel r3 r4 label-with-minus r6 one r7 end r9 r12 r13 r14 r15 r16 r17 r18 r19 r23 one r26 r27}}
-
-test datatable.389 {export csv} {
-    list [catch {datatable1 export csv} msg] $msg
-} {0 {"*BLT*","c1","c2","c3","c4","c5"
-"two",,,,,
-"r24",,,,,
-"myLabel",,,,,
-"three",,,,,
-"myLabel","1.0","2.0","3.0","4.0","5.0"
-"r3","1.0","2.0","3.0","4.0","5.0"
-"r4","1.0","2.0","3.0","4.0","5.0"
-"label-with-minus",,,,,
-"r6",,,,,
-"one",,,,,
-"r7",,,,,
-"end",,,,,
-"r9",,,,,
-"r12",,,,,
-"r13",,,,,
-"r14",,,,,
-"r15",,,,,
-"r16",,,,,
-"r17",,,,,
-"r18",,,,,
-"r19",,,,,
-"r23",,,,,
-"one",,,,,
-"r26",,,,,
-"r27",,,,,
-}}
-
-test datatable.390 {datatable1 row move 0 2} {
-    list [catch {datatable1 row move 0 2} msg] $msg
-} {1 {bad row index "0"}}
-
-test datatable.391 {datatable1 row move 1 17} {
-    list [catch {datatable1 row move 1 17} msg] $msg
-} {0 {}}
-
-#exit 0
-test datatable.392 {datatable1 row trace} {
-    list [catch {datatable1 row trace} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-
-test datatable.393 {datatable1 row trace all} {
-    list [catch {datatable1 row trace all} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-    
-test datatable.394 {datatable1 row trace end} {
-    list [catch {datatable1 row trace end} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-
-test datatable.395 {datatable1 row trace 1} {
-    list [catch {datatable1 row trace 1} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-
-test datatable.396 {datatable1 row trace 1 rwuc} {
-    list [catch {datatable1 row trace 1 rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-
-test datatable.397 {datatable1 row trace all rwuc} {
-    list [catch {datatable1 row trace all rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable1 row trace row how command"}}
-
-proc Doit { args } { 
-    global mylist; lappend mylist $args 
-}
-
-test datatable.398 {datatable1 row trace all rwuc Doit} {
-    list [catch {datatable1 row trace all rwuc Doit} msg] $msg
-} {0 trace0}
-
-test datatable.399 {datatable1 trace info trace0} {
-    list [catch {datatable1 trace info trace0} msg] $msg
-} {0 {id trace0 row all flags rwuc command Doit}}
-
-test datatable.400 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable1 set all 1 20
-	set mylist
-    } msg] $msg
-} {0 {{::datatable1 1 1 wc} {::datatable1 2 1 wc} {::datatable1 3 1 wc} {::datatable1 4 1 w} {::datatable1 5 1 w} {::datatable1 6 1 w} {::datatable1 7 1 wc} {::datatable1 8 1 wc} {::datatable1 9 1 wc} {::datatable1 10 1 wc} {::datatable1 11 1 wc} {::datatable1 12 1 wc} {::datatable1 13 1 wc} {::datatable1 14 1 wc} {::datatable1 15 1 wc} {::datatable1 16 1 wc} {::datatable1 17 1 wc} {::datatable1 18 1 wc} {::datatable1 19 1 wc} {::datatable1 20 1 wc} {::datatable1 21 1 wc} {::datatable1 22 1 wc} {::datatable1 23 1 wc} {::datatable1 24 1 wc} {::datatable1 25 1 wc}}}
-
-test datatable.401 {test read trace} {
-    list [catch {
-	set mylist {}
-	datatable1 row get 1 -valuesonly
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 r} {::datatable1 1 2 r} {::datatable1 1 3 r} {::datatable1 1 4 r} {::datatable1 1 5 r}}}
-
-test datatable.402 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable1 row values 1 {a b c d e}
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 w} {::datatable1 1 2 wc} {::datatable1 1 3 wc} {::datatable1 1 4 wc} {::datatable1 1 5 wc}}}
-
-test datatable.403 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable1 row unset 1 
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 u} {::datatable1 1 2 u} {::datatable1 1 3 u} {::datatable1 1 4 u} {::datatable1 1 5 u}}}
-
-test datatable.404 {datatable1 trace delete} {
-    list [catch {datatable1 trace delete} msg] $msg
-} {0 {}}
-
-#---------------------
-
-test datatable.405 {datatable1 trace} {
-    list [catch {datatable1 trace} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable1 trace create row column how command
-  datatable1 trace delete traceId...
-  datatable1 trace info traceId
-  datatable1 trace names }}
-
-test datatable.406 {datatable1 trace create} {
-    list [catch {datatable1 trace create} msg] $msg
-} {1 {wrong # args: should be "datatable1 trace create row column how command"}}
-
-test datatable.407 {datatable1 trace create 1} {
-    list [catch {datatable1 trace create 1} msg] $msg
-} {1 {wrong # args: should be "datatable1 trace create row column how command"}}
-
-test datatable.408 {datatable1 trace create 1 1 } {
-    list [catch {datatable1 trace create 1 1 } msg] $msg
-} {1 {wrong # args: should be "datatable1 trace create row column how command"}}
-
-test datatable.409 {datatable1 trace create 1 1 rwuc} {
-    list [catch {datatable1 trace create 1 1 rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable1 trace create row column how command"}}
-
-proc Doit args { global mylist; lappend mylist $args }
-
-test datatable.410 {datatable1 trace names} {
-    list [catch {datatable1 trace names} msg] $msg
-} {0 trace0}
-
-test datatable.411 {datatable1 trace create 1 1 rwuc Doit} {
-    list [catch {datatable1 trace create 1 1 rwuc Doit} msg] $msg
-} {0 trace1}
-
-test datatable.412 {datatable1 trace names} {
-    list [catch {datatable1 trace names} msg] $msg
-} {0 {trace1 trace0}}
-
-test datatable.413 {datatable1 trace info trace1} {
-    list [catch {datatable1 trace info trace1} msg] $msg
-} {0 {id trace1 row 1 column 1 flags rwuc command Doit}}
-
-test datatable.414 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable1 set 1 1 "newValue"
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 wc} {::datatable1 1 1 wc}}}
-
-test datatable.415 {test read trace} {
-    list [catch {
-	set mylist {}
-	datatable1 get 1 1
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 r} {::datatable1 1 1 r}}}
-
-test datatable.416 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable1 column values 1 { a b c e d }
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 w} {::datatable1 1 1 w} {::datatable1 2 1 w} {::datatable1 3 1 w} {::datatable1 4 1 w} {::datatable1 5 1 w}}}
-
-test datatable.417 {trace delete trace0} {
-    list [catch {datatable1 trace delete trace0} msg] $msg
-} {0 {}}
-
-test datatable.418 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable1 row values 1 { a b c e d }
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 w}}}
-
-test datatable.419 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable1 set 1 1 "nextValue"
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 w}}}
-
-test datatable.420 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable1 unset 1 1
-	set mylist
-	} msg] $msg
-} {0 {{::datatable1 1 1 u}}}
-
-test datatable.421 {datatable1 trace delete} {
-    list [catch {datatable1 trace delete} msg] $msg
-} {0 {}}
-
-test datatable.422 {datatable1 trace delete badId} {
-    list [catch {datatable1 trace delete badId} msg] $msg
-} {1 {unknown trace "badId"}}
-
-test datatable.423 {datatable1 trace names} {
-    list [catch {datatable1 trace names} msg] $msg
-} {0 trace1}
-
-test datatable.424 {datatable1 trace names badArg} {
-    list [catch {datatable1 trace names badArg} msg] $msg
-} {1 {wrong # args: should be "datatable1 trace names "}}
-
-test datatable.425 {datatable1 trace delete trace1} {
-    list [catch {datatable1 trace delete trace1} msg] $msg
-} {0 {}}
-
-test datatable.426 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.427 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.428 {datatable0 dump -badSwitch} {
-    list [catch {datatable0 dump -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"}}
-
-
-test datatable.429 {datatable0 dump -rows 1} {
-    list [catch {datatable0 dump -rows 1} msg] $msg
-} {0 {i 1 22 0 0
-c 1 one string
-c 2 c14 string
-c 3 two string
-c 4 myLabel image {myTag midTag newTag}
-c 5 three string
-c 6 c2 image {myTag midTag}
-c 7 c3 image {myTag midTag}
-c 8 c4 image myTag
-c 9 endLabel image myTag
-c 10 c1 string
-c 11 c5 string
-c 12 c6 string
-c 13 c7 string
-c 14 c10 string
-c 15 c11 string
-c 16 c12 string
-c 17 c13 string
-c 18 c8 string
-c 19 c9 string
-c 20 c15 string
-c 21 c16 string {myTag2 myTag1}
-c 22 c17 string {myTag2 myTag1}
-r 1 r1
-d 1 6 1.0
-d 1 7 1.0
-d 1 8 1.0
-}}
-
-
-test datatable.430 {datatable0 dump -columns 1} {
-    list [catch {datatable0 dump -columns 1} msg] $msg
-} {0 {i 5 1 0 0
-c 1 one string
-r 1 r1
-r 2 r2
-r 3 r3
-r 4 r4
-r 5 r5
-}}
-
-test datatable.431 {dump -rows badTag} {
-    list [catch {datatable0 dump -rows badTag} msg] $msg
-} {1 {can't find row tag "badTag" in ::datatable0}}
-
-test datatable.432 {dump -columns badTag} {
-    list [catch {datatable0 dump -columns badTag} msg] $msg
-} {1 {can't find column tag "badTag" in ::datatable0}}
-
-test datatable.433 {dump -rows 1 -columns 1} {
-    list [catch {datatable0 dump -rows 1 -columns 1} msg] $msg
-} {0 {i 1 1 0 0
-c 1 one string
-r 1 r1
-}}
-
-test datatable.434 {dump -file myout.dump} {
-    list [catch {datatable0 dump -file myout.dump} msg] $msg
-} {0 {}}
-
-test datatable.435 {blt::datatable destroy datatable0} {
-    list [catch {blt::datatable destroy datatable0} msg] $msg
-} {0 {}}
-
-test datatable.436 {blt::datatable create} {
-    list [catch {blt::datatable create} msg] $msg
-} {0 ::datatable0}
-
-test datatable.437 {datatable0 column names} {
-    list [catch {datatable0 column names} msg] $msg
-} {0 {}}
-
-test datatable.438 {datatable0 dump} {
-    list [catch {datatable0 dump} msg] $msg
-} {0 {i 0 0 0 0
-}}
-
-test datatable.439 {datatable0 restore} {
-    list [catch {datatable0 restore} msg] $msg
-} {0 {}}
-
-test datatable.440 {datatable0 dump} {
-    list [catch {datatable0 dump} msg] $msg
-} {0 {i 5 22 0 0
-c 1 one string
-c 2 c14 string
-c 3 two string
-c 4 myLabel image {myTag midTag newTag}
-c 5 three string
-c 6 c2 image {myTag midTag}
-c 7 c3 image {myTag midTag}
-c 8 c4 image myTag
-c 9 endLabel image myTag
-c 10 c1 string
-c 11 c5 string
-c 12 c6 string
-c 13 c7 string
-c 14 c10 string
-c 15 c11 string
-c 16 c12 string
-c 17 c13 string
-c 18 c8 string
-c 19 c9 string
-c 20 c15 string
-c 21 c16 string {myTag2 myTag1}
-c 22 c17 string {myTag2 myTag1}
-r 1 r1
-r 2 r2
-r 3 r3
-r 4 r4
-r 5 r5
-d 1 6 1.0
-d 1 7 1.0
-d 1 8 1.0
-d 2 6 2.0
-d 2 7 2.0
-d 2 8 2.0
-d 3 6 3.0
-d 3 7 3.0
-d 3 8 3.0
-d 4 6 4.0
-d 4 7 4.0
-d 4 8 4.0
-d 5 6 5.0
-d 5 7 5.0
-d 5 8 5.0
-}}
-
-exit 0
-#----------------------
-
-test datatable.441 {datatable0 column tag names badNode} {
-    list [catch {datatable0 column tag names badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::datatable0}}
-
-test datatable.442 {datatable0 column tag names all} {
-    list [catch {datatable0 column tag names all} msg] $msg
-} {1 {multiple columns specified by "all"}}
-
-test datatable.443 {datatable0 column tag names root} {
-    list [catch {datatable0 column tag names root} msg] $msg
-} {0 {all hi newTag root tag2}}
-
-test datatable.444 {datatable0 column tag names 0 1} {
-    list [catch {datatable0 column tag names 0 1} msg] $msg
-} {0 {all hi newTag root tag2}}
-
-test datatable.445 {datatable0 column tag nodes (missing arg)} {
-    list [catch {datatable0 column tag nodes} msg] $msg
-} {1 {wrong # args: should be "datatable0 column tag nodes tag ?tag...?"}}
-
-test datatable.446 {datatable0 column tag nodes root badTag} {
-    list [catch {datatable0 column tag nodes root badTag} msg] $msg
-} {1 {can't find a tag "badTag"}}
-
-test datatable.447 {datatable0 column tag nodes root tag2} {
-    list [catch {datatable0 column tag nodes root tag2} msg] $msg
-} {0 {0 1 2 3 4}}
-
-
-test datatable.448 {datatable0 create 0} {
-    list [catch {datatable0 create 0} msg] $msg
-} {0 2}
-
-test datatable.449 {datatable0 create root} {
-    list [catch {datatable0 create root} msg] $msg
-} {0 3}
-
-test datatable.450 {datatable0 create all} {
-    list [catch {datatable0 create all} msg] $msg
-} {1 {multiple columns specified by "all"}}
-
-test datatable.451 {datatable0 create 0 -at badPosition} {
-    list [catch {datatable0 create 0 -at badPosition} msg] $msg
-} {1 {expected integer but got "badPosition"}}
-
-test datatable.452 {datatable0 create 0 -at -1} {
-    list [catch {datatable0 create 0 -at -1} msg] $msg
-} {1 {bad value "-1": can't be negative}}
-
-test datatable.453 {datatable0 create 0 -at 1000} {
-    list [catch {datatable0 create 0 -at 1000} msg] $msg
-} {0 4}
-
-test datatable.454 {datatable0 create 0 -at (no arg)} {
-    list [catch {datatable0 create 0 -at} msg] $msg
-} {1 {value for "-at" missing}}
-
-test datatable.455 {datatable0 create 0 -tags myTag} {
-    list [catch {datatable0 create 0 -tags myTag} msg] $msg
-} {0 5}
-
-test datatable.456 {datatable0 insert 0 -tags {myTag1 myTag2} } {
-    list [catch {datatable0 insert 0 -tags {myTag1 myTag2}} msg] $msg
-} {0 6}
-
-test datatable.457 {datatable0 insert 0 -tags root} {
-    list [catch {datatable0 insert 0 -tags root} msg] $msg
-} {1 {can't add reserved tag "root"}}
-
-test datatable.458 {datatable0 insert 0 -tags (missing arg)} {
-    list [catch {datatable0 insert 0 -tags} msg] $msg
-} {1 {value for "-tags" missing}}
-
-test datatable.459 {datatable0 insert 0 -label myLabel -tags thisTag} {
-    list [catch {datatable0 insert 0 -label myLabel -tags thisTag} msg] $msg
-} {0 8}
-
-test datatable.460 {datatable0 insert 0 -label (missing arg)} {
-    list [catch {datatable0 insert 0 -label} msg] $msg
-} {1 {value for "-label" missing}}
-
-test datatable.461 {datatable0 insert 1 -tags thisTag} {
-    list [catch {datatable0 insert 1 -tags thisTag} msg] $msg
-} {0 9}
-
-test datatable.462 {datatable0 insert 1 -data key (missing value)} {
-    list [catch {datatable0 insert 1 -data key} msg] $msg
-} {1 {missing value for "key"}}
-
-test datatable.463 {datatable0 insert 1 -data {key value}} {
-    list [catch {datatable0 insert 1 -data {key value}} msg] $msg
-} {0 11}
-
-test datatable.464 {datatable0 insert 1 -data {key1 value1 key2 value2}} {
-    list [catch {datatable0 insert 1 -data {key1 value1 key2 value2}} msg] $msg
-} {0 12}
-
-test datatable.465 {get} {
-    list [catch {
-	datatable0 get 12
-    } msg] $msg
-} {0 {key1 value1 key2 value2}}
-
-test datatable.466 {datatable0 children} {
-    list [catch {datatable0 children} msg] $msg
-} {1 {wrong # args: should be "datatable0 children node ?first? ?last?"}}
-
-test datatable.467 {datatable0 children 0} {
-    list [catch {datatable0 children 0} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test datatable.468 {datatable0 children root} {
-    list [catch {datatable0 children root} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test datatable.469 {datatable0 children 1} {
-    list [catch {datatable0 children 1} msg] $msg
-} {0 {9 11 12}}
-
-test datatable.470 {datatable0 insert myTag} {
-    list [catch {datatable0 insert myTag} msg] $msg
-} {0 13}
-
-test datatable.471 {datatable0 children myTag} {
-    list [catch {datatable0 children myTag} msg] $msg
-} {0 13}
-
-test datatable.472 {datatable0 children root 0 end} {
-    list [catch {datatable0 children root 0 end} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test datatable.473 {datatable0 children root 2} {
-    list [catch {datatable0 children root 2} msg] $msg
-} {0 3}
-
-test datatable.474 {datatable0 children root 2 end} {
-    list [catch {datatable0 children root 2 end} msg] $msg
-} {0 {3 4 5 6 8}}
-
-test datatable.475 {datatable0 children root end end} {
-    list [catch {datatable0 children root end end} msg] $msg
-} {0 8}
-
-test datatable.476 {datatable0 children root 0 2} {
-    list [catch {datatable0 children root 0 2} msg] $msg
-} {0 {1 2 3}}
-
-test datatable.477 {datatable0 children root -1 -20} {
-    list [catch {datatable0 children root -1 -20} msg] $msg
-} {0 {}}
-
-test datatable.478 {datatable0 firstchild (missing arg)} {
-    list [catch {datatable0 firstchild} msg] $msg
-} {1 {wrong # args: should be "datatable0 firstchild node"}}
-
-test datatable.479 {datatable0 firstchild root} {
-    list [catch {datatable0 firstchild root} msg] $msg
-} {0 1}
-
-test datatable.480 {datatable0 lastchild (missing arg)} {
-    list [catch {datatable0 lastchild} msg] $msg
-} {1 {wrong # args: should be "datatable0 lastchild node"}}
-
-test datatable.481 {datatable0 lastchild root} {
-    list [catch {datatable0 lastchild root} msg] $msg
-} {0 8}
-
-test datatable.482 {datatable0 nextsibling (missing arg)} {
-    list [catch {datatable0 nextsibling} msg] $msg
-} {1 {wrong # args: should be "datatable0 nextsibling node"}}
-
-test datatable.483 {datatable0 nextsibling 1)} {
-    list [catch {datatable0 nextsibling 1} msg] $msg
-} {0 2}
-
-test datatable.484 {datatable0 nextsibling 2)} {
-    list [catch {datatable0 nextsibling 2} msg] $msg
-} {0 3}
-
-test datatable.485 {datatable0 nextsibling 3)} {
-    list [catch {datatable0 nextsibling 3} msg] $msg
-} {0 4}
-
-test datatable.486 {datatable0 nextsibling 4)} {
-    list [catch {datatable0 nextsibling 4} msg] $msg
-} {0 5}
-
-test datatable.487 {datatable0 nextsibling 5)} {
-    list [catch {datatable0 nextsibling 5} msg] $msg
-} {0 6}
-
-test datatable.488 {datatable0 nextsibling 6)} {
-    list [catch {datatable0 nextsibling 6} msg] $msg
-} {0 8}
-
-test datatable.489 {datatable0 nextsibling 8)} {
-    list [catch {datatable0 nextsibling 8} msg] $msg
-} {0 -1}
-
-test datatable.490 {datatable0 nextsibling all)} {
-    list [catch {datatable0 nextsibling all} msg] $msg
-} {1 { than one node tagged as "all"}}
-
-test datatable.491 {datatable0 nextsibling badTag)} {
-    list [catch {datatable0 nextsibling badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::datatable0}}
-
-test datatable.492 {datatable0 nextsibling -1)} {
-    list [catch {datatable0 nextsibling -1} msg] $msg
-} {1 {can't find tag or id "-1" in ::datatable0}}
-
-test datatable.493 {datatable0 prevsibling 2)} {
-    list [catch {datatable0 prevsibling 2} msg] $msg
-} {0 1}
-
-test datatable.494 {datatable0 prevsibling 1)} {
-    list [catch {datatable0 prevsibling 1} msg] $msg
-} {0 -1}
-
-test datatable.495 {datatable0 prevsibling -1)} {
-    list [catch {datatable0 prevsibling -1} msg] $msg
-} {1 {can't find tag or id "-1" in ::datatable0}}
-
-test datatable.496 {datatable0 root)} {
-    list [catch {datatable0 root} msg] $msg
-} {0 0}
-
-test datatable.497 {datatable0 root badArg)} {
-    list [catch {datatable0 root badArgs} msg] $msg
-} {1 {wrong # args: should be "datatable0 root "}}
-
-test datatable.498 {datatable0 parent (missing arg))} {
-    list [catch {datatable0 parent} msg] $msg
-} {1 {wrong # args: should be "datatable0 parent node"}}
-
-test datatable.499 {datatable0 parent root)} {
-    list [catch {datatable0 parent root} msg] $msg
-} {0 -1}
-
-test datatable.500 {datatable0 parent 1)} {
-    list [catch {datatable0 parent 1} msg] $msg
-} {0 0}
-
-test datatable.501 {datatable0 parent myTag)} {
-    list [catch {datatable0 parent myTag} msg] $msg
-} {0 0}
-
-test datatable.502 {datatable0 next (missing arg))} {
-    list [catch {datatable0 next} msg] $msg
-} {1 {wrong # args: should be "datatable0 next node"}}
-
-
-test datatable.503 {datatable0 next (extra arg))} {
-    list [catch {datatable0 next root root} msg] $msg
-} {1 {wrong # args: should be "datatable0 next node"}}
-
-test datatable.504 {datatable0 next root} {
-    list [catch {datatable0 next root} msg] $msg
-} {0 1}
-
-test datatable.505 {datatable0 next 1)} {
-    list [catch {datatable0 next 1} msg] $msg
-} {0 9}
-
-test datatable.506 {datatable0 next 2)} {
-    list [catch {datatable0 next 2} msg] $msg
-} {0 3}
-
-test datatable.507 {datatable0 next 3)} {
-    list [catch {datatable0 next 3} msg] $msg
-} {0 4}
-
-test datatable.508 {datatable0 next 4)} {
-    list [catch {datatable0 next 4} msg] $msg
-} {0 5}
-
-test datatable.509 {datatable0 next 5)} {
-    list [catch {datatable0 next 5} msg] $msg
-} {0 13}
-
-test datatable.510 {datatable0 next 6)} {
-    list [catch {datatable0 next 6} msg] $msg
-} {0 8}
-
-test datatable.511 {datatable0 next 8)} {
-    list [catch {datatable0 next 8} msg] $msg
-} {0 -1}
-
-test datatable.512 {datatable0 previous 1)} {
-    list [catch {datatable0 previous 1} msg] $msg
-} {0 0}
-
-test datatable.513 {datatable0 previous 0)} {
-    list [catch {datatable0 previous 0} msg] $msg
-} {0 -1}
-
-test datatable.514 {datatable0 previous 8)} {
-    list [catch {datatable0 previous 8} msg] $msg
-} {0 6}
-
-test datatable.515 {datatable0 depth (no arg))} {
-    list [catch {datatable0 depth} msg] $msg
-} {1 {wrong # args: should be "datatable0 depth node"}}
-
-test datatable.516 {datatable0 depth root))} {
-    list [catch {datatable0 depth root} msg] $msg
-} {0 0}
-
-test datatable.517 {datatable0 depth myTag))} {
-    list [catch {datatable0 depth myTag} msg] $msg
-} {0 1}
-
-test datatable.518 {datatable0 depth myTag))} {
-    list [catch {datatable0 depth myTag} msg] $msg
-} {0 1}
-
-
-test datatable.519 {datatable0 dumpdata 1} {
-    list [catch {datatable0 dumpdata 1} msg] $msg
-} {0 {-1 1 {node1} {} {}
-1 9 {node1 node9} {} {thisTag}
-1 11 {node1 node11} {key value} {}
-1 12 {node1 node12} {key1 value1 key2 value2} {}
-}}
-
-test datatable.520 {datatable0 dumpdata this} {
-    list [catch {datatable0 dumpdata myTag} msg] $msg
-} {0 {-1 5 {node5} {} {myTag}
-5 13 {node5 node13} {} {}
-}}
-
-test datatable.521 {datatable0 dumpdata 1 badArg (too many args)} {
-    list [catch {datatable0 dumpdata 1 badArg} msg] $msg
-} {1 {wrong # args: should be "datatable0 dumpdata node"}}
-
-test datatable.522 {datatable0 dumpdata 11} {
-    list [catch {datatable0 dumpdata 11} msg] $msg
-} {0 {-1 11 {node11} {key value} {}
-}}
-
-test datatable.523 {datatable0 dumpdata all} {
-    list [catch {datatable0 dumpdata all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.524 {datatable0 dumpdata all} {
-    list [catch {datatable0 dumpdata all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.525 {datatable0 dumpfile 0 test.dump} {
-    list [catch {datatable0 dumpfile 0 test.dump} msg] $msg
-} {0 {}}
-
-test datatable.526 {datatable0 get 9} {
-    list [catch {datatable0 get 9} msg] $msg
-} {0 {}}
-
-test datatable.527 {datatable0 get all} {
-    list [catch {datatable0 get all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.528 {datatable0 get root} {
-    list [catch {datatable0 get root} msg] $msg
-} {0 {}}
-
-test datatable.529 {datatable0 get 9 key} {
-    list [catch {datatable0 get root} msg] $msg
-} {0 {}}
-
-test datatable.530 {datatable0 get 12} {
-    list [catch {datatable0 get 12} msg] $msg
-} {0 {key1 value1 key2 value2}}
-
-test datatable.531 {datatable0 get 12 key1} {
-    list [catch {datatable0 get 12 key1} msg] $msg
-} {0 value1}
-
-test datatable.532 {datatable0 get 12 key2} {
-    list [catch {datatable0 get 12 key2} msg] $msg
-} {0 value2}
-
-test datatable.533 {datatable0 get 12 key1 defValue } {
-    list [catch {datatable0 get 12 key1 defValue} msg] $msg
-} {0 value1}
-
-test datatable.534 {datatable0 get 12 key100 defValue } {
-    list [catch {datatable0 get 12 key100 defValue} msg] $msg
-} {0 defValue}
-
-test datatable.535 {datatable0 index (missing arg) } {
-    list [catch {datatable0 index} msg] $msg
-} {1 {wrong # args: should be "datatable0 index name"}}
-
-test datatable.536 {datatable0 index 0 10 (extra arg) } {
-    list [catch {datatable0 index 0 10} msg] $msg
-} {1 {wrong # args: should be "datatable0 index name"}}
-
-test datatable.537 {datatable0 index 0} {
-    list [catch {datatable0 index 0} msg] $msg
-} {0 0}
-
-test datatable.538 {datatable0 index root} {
-    list [catch {datatable0 index root} msg] $msg
-} {0 0}
-
-test datatable.539 {datatable0 index all} {
-    list [catch {datatable0 index all} msg] $msg
-} {0 -1}
-
-test datatable.540 {datatable0 index myTag} {
-    list [catch {datatable0 index myTag} msg] $msg
-} {0 5}
-
-test datatable.541 {datatable0 index thisTag} {
-    list [catch {datatable0 index thisTag} msg] $msg
-} {0 -1}
-
-test datatable.542 {datatable0 is (no args)} {
-    list [catch {datatable0 is} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable0 is ancestor node1 node2
-  datatable0 is before node1 node2
-  datatable0 is leaf node
-  datatable0 is link node
-  datatable0 is root node}}
-
-test datatable.543 {datatable0 is badOp} {
-    list [catch {datatable0 is badOp} msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  datatable0 is ancestor node1 node2
-  datatable0 is before node1 node2
-  datatable0 is leaf node
-  datatable0 is link node
-  datatable0 is root node}}
-
-test datatable.544 {datatable0 is before} {
-    list [catch {datatable0 is before} msg] $msg
-} {1 {wrong # args: should be "datatable0 is before node1 node2"}}
-
-test datatable.545 {datatable0 is before 0 10 20} {
-    list [catch {datatable0 is before 0 10 20} msg] $msg
-} {1 {wrong # args: should be "datatable0 is before node1 node2"}}
-
-test datatable.546 {datatable0 is before 0 12} {
-    list [catch {datatable0 is before 0 12} msg] $msg
-} {0 1}
-
-test datatable.547 {datatable0 is before 12 0} {
-    list [catch {datatable0 is before 12 0} msg] $msg
-} {0 0}
-
-test datatable.548 {datatable0 is before 0 0} {
-    list [catch {datatable0 is before 0 0} msg] $msg
-} {0 0}
-
-test datatable.549 {datatable0 is before root 0} {
-    list [catch {datatable0 is before root 0} msg] $msg
-} {0 0}
-
-test datatable.550 {datatable0 is before 0 all} {
-    list [catch {datatable0 is before 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.551 {datatable0 is ancestor} {
-    list [catch {datatable0 is ancestor} msg] $msg
-} {1 {wrong # args: should be "datatable0 is ancestor node1 node2"}}
-
-test datatable.552 {datatable0 is ancestor 0 12 20} {
-    list [catch {datatable0 is ancestor 0 12 20} msg] $msg
-} {1 {wrong # args: should be "datatable0 is ancestor node1 node2"}}
-
-test datatable.553 {datatable0 is ancestor 0 12} {
-    list [catch {datatable0 is ancestor 0 12} msg] $msg
-} {0 1}
-
-test datatable.554 {datatable0 is ancestor 12 0} {
-    list [catch {datatable0 is ancestor 12 0} msg] $msg
-} {0 0}
-
-test datatable.555 {datatable0 is ancestor 1 2} {
-    list [catch {datatable0 is ancestor 1 2} msg] $msg
-} {0 0}
-
-test datatable.556 {datatable0 is ancestor root 0} {
-    list [catch {datatable0 is ancestor root 0} msg] $msg
-} {0 0}
-
-test datatable.557 {datatable0 is ancestor 0 all} {
-    list [catch {datatable0 is ancestor 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.558 {datatable0 is root (missing arg)} {
-    list [catch {datatable0 is root} msg] $msg
-} {1 {wrong # args: should be "datatable0 is root node"}}
-
-test datatable.559 {datatable0 is root 0 20 (extra arg)} {
-    list [catch {datatable0 is root 0 20} msg] $msg
-} {1 {wrong # args: should be "datatable0 is root node"}}
-
-test datatable.560 {datatable0 is root 0} {
-    list [catch {datatable0 is root 0} msg] $msg
-} {0 1}
-
-test datatable.561 {datatable0 is root 12} {
-    list [catch {datatable0 is root 12} msg] $msg
-} {0 0}
-
-test datatable.562 {datatable0 is root 1} {
-    list [catch {datatable0 is root 1} msg] $msg
-} {0 0}
-
-test datatable.563 {datatable0 is root root} {
-    list [catch {datatable0 is root root} msg] $msg
-} {0 1}
-
-test datatable.564 {datatable0 is root all} {
-    list [catch {datatable0 is root all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.565 {datatable0 is leaf (missing arg)} {
-    list [catch {datatable0 is leaf} msg] $msg
-} {1 {wrong # args: should be "datatable0 is leaf node"}}
-
-test datatable.566 {datatable0 is leaf 0 20 (extra arg)} {
-    list [catch {datatable0 is leaf 0 20} msg] $msg
-} {1 {wrong # args: should be "datatable0 is leaf node"}}
-
-test datatable.567 {datatable0 is leaf 0} {
-    list [catch {datatable0 is leaf 0} msg] $msg
-} {0 0}
-
-test datatable.568 {datatable0 is leaf 12} {
-    list [catch {datatable0 is leaf 12} msg] $msg
-} {0 1}
-
-test datatable.569 {datatable0 is leaf 1} {
-    list [catch {datatable0 is leaf 1} msg] $msg
-} {0 0}
-
-test datatable.570 {datatable0 is leaf root} {
-    list [catch {datatable0 is leaf root} msg] $msg
-} {0 0}
-
-test datatable.571 {datatable0 is leaf all} {
-    list [catch {datatable0 is leaf all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.572 {datatable0 is leaf 1000} {
-    list [catch {datatable0 is leaf 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::datatable0}}
-
-test datatable.573 {datatable0 is leaf badTag} {
-    list [catch {datatable0 is leaf badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::datatable0}}
-
-test datatable.574 {datatable0 set (missing arg)} {
-    list [catch {datatable0 set} msg] $msg
-} {1 {wrong # args: should be "datatable0 set node ?key value...?"}}
-
-test datatable.575 {datatable0 set 0 (missing arg)} {
-    list [catch {datatable0 set 0} msg] $msg
-} {0 {}}
-
-test datatable.576 {datatable0 set 0 key (missing arg)} {
-    list [catch {datatable0 set 0 key} msg] $msg
-} {1 {missing value for field "key"}}
-
-test datatable.577 {datatable0 set 0 key value} {
-    list [catch {datatable0 set 0 key value} msg] $msg
-} {0 {}}
-
-test datatable.578 {datatable0 set 0 key1 value1 key2 value2 key3 value3} {
-    list [catch {datatable0 set 0 key1 value1 key2 value2 key3 value3} msg] $msg
-} {0 {}}
-
-test datatable.579 {datatable0 set 0 key1 value1 key2 (missing arg)} {
-    list [catch {datatable0 set 0 key1 value1 key2} msg] $msg
-} {1 {missing value for field "key2"}}
-
-test datatable.580 {datatable0 set 0 key value} {
-    list [catch {datatable0 set 0 key value} msg] $msg
-} {0 {}}
-
-test datatable.581 {datatable0 set 0 key1 value1 key2 (missing arg)} {
-    list [catch {datatable0 set 0 key1 value1 key2} msg] $msg
-} {1 {missing value for field "key2"}}
-
-test datatable.582 {datatable0 set all} {
-    list [catch {datatable0 set all} msg] $msg
-} {0 {}}
-
-test datatable.583 {datatable0 set all abc 123} {
-    list [catch {datatable0 set all abc 123} msg] $msg
-} {0 {}}
-
-test datatable.584 {datatable0 set root} {
-    list [catch {datatable0 set root} msg] $msg
-} {0 {}}
-
-test datatable.585 {datatable0 restore stuff} {
-    list [catch {
-	set data [datatable0 dumpdata root]
-	blt::datatable create
-	datatable1 restore root $data
-	set data [datatable1 dumpdata root]
-	blt::datatable destroy datatable1
-	set data
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {key value key1 value1 key2 value2 key3 value3 abc 123} {}
-0 1 {::datatable0 node1} {abc 123} {}
-1 9 {::datatable0 node1 node9} {abc 123} {thisTag}
-1 11 {::datatable0 node1 node11} {key value abc 123} {}
-1 12 {::datatable0 node1 node12} {key1 value1 key2 value2 abc 123} {}
-0 2 {::datatable0 node2} {abc 123} {}
-0 3 {::datatable0 node3} {abc 123} {}
-0 4 {::datatable0 node4} {abc 123} {}
-0 5 {::datatable0 node5} {abc 123} {myTag}
-5 13 {::datatable0 node5 node13} {abc 123} {}
-0 6 {::datatable0 node6} {abc 123} {myTag2 myTag1}
-0 8 {::datatable0 myLabel} {abc 123} {thisTag}
-}}
-
-test datatable.586 {datatable0 restorefile 0 test.dump} {
-    list [catch {
-	blt::datatable create
-	datatable1 restorefile root test.dump
-	set data [datatable1 dumpdata root]
-	blt::datatable destroy datatable1
-	set data
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-0 1 {::datatable0 node1} {} {}
-1 9 {::datatable0 node1 node9} {} {thisTag}
-1 11 {::datatable0 node1 node11} {key value} {}
-1 12 {::datatable0 node1 node12} {key1 value1 key2 value2} {}
-0 2 {::datatable0 node2} {} {}
-0 3 {::datatable0 node3} {} {}
-0 4 {::datatable0 node4} {} {}
-0 5 {::datatable0 node5} {} {myTag}
-5 13 {::datatable0 node5 node13} {} {}
-0 6 {::datatable0 node6} {} {myTag2 myTag1}
-0 8 {::datatable0 myLabel} {} {thisTag}
-}}
-
-
-test datatable.587 {datatable0 unset 0 key1} {
-    list [catch {datatable0 unset 0 key1} msg] $msg
-} {0 {}}
-
-test datatable.588 {datatable0 get 0} {
-    list [catch {datatable0 get 0} msg] $msg
-} {0 {key value key2 value2 key3 value3 abc 123}}
-
-test datatable.589 {datatable0 unset 0 key2 key3} {
-    list [catch {datatable0 unset 0 key2 key3} msg] $msg
-} {0 {}}
-
-test datatable.590 {datatable0 get 0} {
-    list [catch {datatable0 get 0} msg] $msg
-} {0 {key value abc 123}}
-
-test datatable.591 {datatable0 unset 0} {
-    list [catch {datatable0 unset 0} msg] $msg
-} {0 {}}
-
-test datatable.592 {datatable0 get 0} {
-    list [catch {datatable0 get 0} msg] $msg
-} {0 {}}
-
-test datatable.593 {datatable0 unset all abc} {
-    list [catch {datatable0 unset all abc} msg] $msg
-} {0 {}}
-
-test datatable.594 {datatable0 restore stuff} {
-    list [catch {
-	set data [datatable0 dumpdata root]
-	blt::datatable create datatable1
-	datatable1 restore root $data
-	set data [datatable1 dumpdata root]
-	blt::datatable destroy datatable1
-	set data
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-0 1 {::datatable0 node1} {} {}
-1 9 {::datatable0 node1 node9} {} {thisTag}
-1 11 {::datatable0 node1 node11} {key value} {}
-1 12 {::datatable0 node1 node12} {key1 value1 key2 value2} {}
-0 2 {::datatable0 node2} {} {}
-0 3 {::datatable0 node3} {} {}
-0 4 {::datatable0 node4} {} {}
-0 5 {::datatable0 node5} {} {myTag}
-5 13 {::datatable0 node5 node13} {} {}
-0 6 {::datatable0 node6} {} {myTag2 myTag1}
-0 8 {::datatable0 myLabel} {} {thisTag}
-}}
-
-test datatable.595 {datatable0 restore (missing arg)} {
-    list [catch {datatable0 restore} msg] $msg
-} {1 {wrong # args: should be "datatable0 restore node dataString ?switches?"}}
-
-test datatable.596 {datatable0 restore 0 badString} {
-    list [catch {datatable0 restore 0 badString} msg] $msg
-} {1 {line #1: wrong # elements in restore entry}}
-
-test datatable.597 {datatable0 restore 0 {} arg (extra arg)} {
-    list [catch {datatable0 restore 0 {} arg} msg] $msg
-} {1 {unknown option "arg"}}
-
-
-test datatable.598 {datatable0 size (missing arg)} {
-    list [catch {datatable0 size} msg] $msg
-} {1 {wrong # args: should be "datatable0 size node"}}
-
-test datatable.599 {datatable0 size 0} {
-    list [catch {datatable0 size 0} msg] $msg
-} {0 12}
-
-test datatable.600 {datatable0 size all} {
-    list [catch {datatable0 size all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.601 {datatable0 size 0 10 (extra arg)} {
-    list [catch {datatable0 size 0 10} msg] $msg
-} {1 {wrong # args: should be "datatable0 size node"}}
-
-test datatable.602 {datatable0 delete (missing arg)} {
-    list [catch {datatable0 delete} msg] $msg
-} {1 {wrong # args: should be "datatable0 delete node ?node...?"}}
-
-test datatable.603 {datatable0 delete 11} {
-    list [catch {datatable0 delete 11} msg] $msg
-} {0 {}}
-
-test datatable.604 {datatable0 delete 11} {
-    list [catch {datatable0 delete 11} msg] $msg
-} {1 {can't find tag or id "11" in ::datatable0}}
-
-test datatable.605 {datatable0 delete 9 12} {
-    list [catch {datatable0 delete 9 12} msg] $msg
-} {0 {}}
-
-test datatable.606 {datatable0 dumpdata 0} {
-    list [catch {datatable0 dump 0} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-0 1 {::datatable0 node1} {} {}
-0 2 {::datatable0 node2} {} {}
-0 3 {::datatable0 node3} {} {}
-0 4 {::datatable0 node4} {} {}
-0 5 {::datatable0 node5} {} {myTag}
-5 13 {::datatable0 node5 node13} {} {}
-0 6 {::datatable0 node6} {} {myTag2 myTag1}
-0 8 {::datatable0 myLabel} {} {thisTag}
-}}
-
-test datatable.607 {delete all} {
-    list [catch {
-	set data [datatable0 dump root]
-	blt::datatable create
-	datatable1 restore root $data
-	datatable1 delete all
-	set data [datatable1 dump root]
-	blt::datatable destroy datatable1
-	set data
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-}}
-
-test datatable.608 {delete all all} {
-    list [catch {
-	set data [datatable0 dump root]
-	blt::datatable create
-	datatable1 restore root $data
-	datatable1 delete all all
-	set data [datatable1 dump root]
-	blt::datatable destroy datatable1
-	set data
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-}}
-
-test datatable.609 {datatable0 apply (missing arg)} {
-    list [catch {datatable0 apply} msg] $msg
-} {1 {wrong # args: should be "datatable0 apply node ?switches?"}}
-
-test datatable.610 {datatable0 apply 0} {
-    list [catch {datatable0 apply 0} msg] $msg
-} {0 {}}
-
-test datatable.611 {datatable0 apply 0 -badOption} {
-    list [catch {datatable0 apply 0 -badOption} msg] $msg
-} {1 {unknown option "-badOption"}}
-
-test datatable.612 {datatable0 apply badTag} {
-    list [catch {datatable0 apply badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::datatable0}}
-
-test datatable.613 {datatable0 apply all} {
-    list [catch {datatable0 apply all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.614 {datatable0 apply myTag -precommand lappend} {
-    list [catch {
-	set mylist {}
-	datatable0 apply myTag -precommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {5 13}}
-
-test datatable.615 {datatable0 apply root -precommand lappend} {
-    list [catch {
-	set mylist {}
-	datatable0 apply root -precommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {0 1 2 3 4 5 13 6 8}}
-
-test datatable.616 {datatable0 apply -precommand -postcommand} {
-    list [catch {
-	set mylist {}
-	datatable0 apply root -precommand {lappend mylist} \
-		-postcommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {0 1 1 2 2 3 3 4 4 5 13 13 5 6 6 8 8 0}}
-
-test datatable.617 {datatable0 apply root -precommand lappend -depth 1} {
-    list [catch {
-	set mylist {}
-	datatable0 apply root -precommand {lappend mylist} -depth 1
-	set mylist
-    } msg] $msg
-} {0 {0 1 2 3 4 5 6 8}}
-
-
-test datatable.618 {datatable0 apply root -precommand -depth 0} {
-    list [catch {
-	set mylist {}
-	datatable0 apply root -precommand {lappend mylist} -depth 0
-	set mylist
-    } msg] $msg
-} {0 0}
-
-test datatable.619 {datatable0 apply root -precommand -tag myTag} {
-    list [catch {
-	set mylist {}
-	datatable0 apply root -precommand {lappend mylist} -tag myTag
-	set mylist
-    } msg] $msg
-} {0 5}
-
-
-test datatable.620 {datatable0 apply root -precommand -key key1} {
-    list [catch {
-	set mylist {}
-	datatable0 set myTag key1 0.0
-	datatable0 apply root -precommand {lappend mylist} -key key1
-	datatable0 unset myTag key1
-	set mylist
-    } msg] $msg
-} {0 5}
-
-test datatable.621 {datatable0 apply root -postcommand -regexp node.*} {
-    list [catch {
-	set mylist {}
-	datatable0 set myTag key1 0.0
-	datatable0 apply root -precommand {lappend mylist} -regexp {node5} 
-	datatable0 unset myTag key1
-	set mylist
-    } msg] $msg
-} {0 5}
-
-test datatable.622 {datatable0 find (missing arg)} {
-    list [catch {datatable0 find} msg] $msg
-} {1 {wrong # args: should be "datatable0 find node ?switches?"}}
-
-test datatable.623 {datatable0 find 0} {
-    list [catch {datatable0 find 0} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.624 {datatable0 find root} {
-    list [catch {datatable0 find root} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.625 {datatable0 find 0 -glob node*} {
-    list [catch {datatable0 find root -glob node*} msg] $msg
-} {0 {1 2 3 4 13 5 6}}
-
-test datatable.626 {datatable0 find 0 -glob nobody} {
-    list [catch {datatable0 find root -glob nobody} msg] $msg
-} {0 {}}
-
-test datatable.627 {datatable0 find 0 -regexp {node[0-3]}} {
-    list [catch {datatable0 find root -regexp {node[0-3]}} msg] $msg
-} {0 {1 2 3 13}}
-
-test datatable.628 {datatable0 find 0 -regexp {.*[A-Z].*}} {
-    list [catch {datatable0 find root -regexp {.*[A-Z].*}} msg] $msg
-} {0 8}
-
-test datatable.629 {datatable0 find 0 -exact myLabel} {
-    list [catch {datatable0 find root -exact myLabel} msg] $msg
-} {0 8}
-
-test datatable.630 {datatable0 find 0 -exact myLabel -invert} {
-    list [catch {datatable0 find root -exact myLabel -invert} msg] $msg
-} {0 {1 2 3 4 13 5 6 0}}
-
-test datatable.631 {datatable0 find 3 -exact node3} {
-    list [catch {datatable0 find 3 -exact node3} msg] $msg
-} {0 3}
-
-test datatable.632 {datatable0 find 0 -nocase -exact mylabel} {
-    list [catch {datatable0 find 0 -nocase -exact mylabel} msg] $msg
-} {0 8}
-
-test datatable.633 {datatable0 find 0 -nocase} {
-    list [catch {datatable0 find 0 -nocase} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.634 {datatable0 find 0 -path -nocase -glob *node1* } {
-    list [catch {datatable0 find 0 -path -nocase -glob *node1*} msg] $msg
-} {0 {1 13}}
-
-test datatable.635 {datatable0 find 0 -count 5 } {
-    list [catch {datatable0 find 0 -count 5} msg] $msg
-} {0 {1 2 3 4 13}}
-
-test datatable.636 {datatable0 find 0 -count -5 } {
-    list [catch {datatable0 find 0 -count -5} msg] $msg
-} {1 {bad value "-5": can't be negative}}
-
-test datatable.637 {datatable0 find 0 -count badValue } {
-    list [catch {datatable0 find 0 -count badValue} msg] $msg
-} {1 {expected integer but got "badValue"}}
-
-test datatable.638 {datatable0 find 0 -count badValue } {
-    list [catch {datatable0 find 0 -count badValue} msg] $msg
-} {1 {expected integer but got "badValue"}}
-
-test datatable.639 {datatable0 find 0 -leafonly} {
-    list [catch {datatable0 find 0 -leafonly} msg] $msg
-} {0 {1 2 3 4 13 6 8}}
-
-test datatable.640 {datatable0 find 0 -leafonly -glob {node[18]}} {
-    list [catch {datatable0 find 0 -glob {node[18]} -leafonly} msg] $msg
-} {0 1}
-
-test datatable.641 {datatable0 find 0 -depth 0} {
-    list [catch {datatable0 find 0 -depth 0} msg] $msg
-} {0 0}
-
-test datatable.642 {datatable0 find 0 -depth 1} {
-    list [catch {datatable0 find 0 -depth 1} msg] $msg
-} {0 {1 2 3 4 5 6 8 0}}
-
-test datatable.643 {datatable0 find 0 -depth 2} {
-    list [catch {datatable0 find 0 -depth 2} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.644 {datatable0 find 0 -depth 20} {
-    list [catch {datatable0 find 0 -depth 20} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.645 {datatable0 find 1 -depth 0} {
-    list [catch {datatable0 find 1 -depth 0} msg] $msg
-} {0 1}
-
-test datatable.646 {datatable0 find 1 -depth 1} {
-    list [catch {datatable0 find 1 -depth 1} msg] $msg
-} {0 1}
-
-test datatable.647 {datatable0 find 1 -depth 2} {
-    list [catch {datatable0 find 1 -depth 2} msg] $msg
-} {0 1}
-
-test datatable.648 {datatable0 find all} {
-    list [catch {datatable0 find all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.649 {datatable0 find badTag} {
-    list [catch {datatable0 find badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::datatable0}}
-
-test datatable.650 {datatable0 find 0 -addtag hi} {
-    list [catch {datatable0 find 0 -addtag hi} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.651 {datatable0 find 0 -addtag all} {
-    list [catch {datatable0 find 0 -addtag all} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test datatable.652 {datatable0 find 0 -addtag root} {
-    list [catch {datatable0 find 0 -addtag root} msg] $msg
-} {1 {can't add reserved tag "root"}}
-
-test datatable.653 {datatable0 find 0 -exec {lappend list} -leafonly} {
-    list [catch {
-	set list {}
-	datatable0 find 0 -exec {lappend list} -leafonly
-	set list
-	} msg] $msg
-} {0 {1 2 3 4 13 6 8}}
-
-test datatable.654 {datatable0 find 0 -tag root} {
-    list [catch {datatable0 find 0 -tag root} msg] $msg
-} {0 0}
-
-test datatable.655 {datatable0 find 0 -tag myTag} {
-    list [catch {datatable0 find 0 -tag myTag} msg] $msg
-} {0 5}
-
-test datatable.656 {datatable0 find 0 -tag badTag} {
-    list [catch {datatable0 find 0 -tag badTag} msg] $msg
-} {0 {}}
-
-test datatable.657 {datatable0 tag (missing args)} {
-    list [catch {datatable0 tag} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag args"}}
-
-test datatable.658 {datatable0 tag badOp} {
-    list [catch {datatable0 tag badOp} msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  datatable0 tag add tag node...
-  datatable0 tag delete tag node...
-  datatable0 tag dump tag...
-  datatable0 tag exists node tag...
-  datatable0 tag forget tag...
-  datatable0 tag get node ?pattern...?
-  datatable0 tag names ?node...?
-  datatable0 tag nodes tag ?tag...?
-  datatable0 tag set node tag...
-  datatable0 tag unset node tag...}}
-
-test datatable.659 {datatable0 tag add} {
-    list [catch {datatable0 tag add} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag add tag node..."}}
-
-test datatable.660 {datatable0 tag add tag} {
-    list [catch {datatable0 tag add tag} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag add tag node..."}}
-
-test datatable.661 {datatable0 tag add tag badNode} {
-    list [catch {datatable0 tag add tag badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::datatable0}}
-
-test datatable.662 {datatable0 tag add newTag root} {
-    list [catch {datatable0 tag add newTag root} msg] $msg
-} {0 {}}
-
-test datatable.663 {datatable0 tag add newTag all} {
-    list [catch {datatable0 tag add newTag all} msg] $msg
-} {0 {}}
-
-test datatable.664 {datatable0 tag add tag2 0 1 2 3 4} {
-    list [catch {datatable0 tag add tag2 0 1 2 3 4} msg] $msg
-} {0 {}}
-
-test datatable.665 {datatable0 tag add tag2 0 1 2 3 4 1000} {
-    list [catch {datatable0 tag add tag2 0 1 2 3 4 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::datatable0}}
-
-test datatable.666 {datatable0 tag names} {
-    list [catch {datatable0 tag names} msg] $msg
-} {0 {all hi myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test datatable.667 {datatable0 tag names badNode} {
-    list [catch {datatable0 tag names badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::datatable0}}
-
-test datatable.668 {datatable0 tag names all} {
-    list [catch {datatable0 tag names all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.669 {datatable0 tag names root} {
-    list [catch {datatable0 tag names root} msg] $msg
-} {0 {all hi newTag root tag2}}
-
-test datatable.670 {datatable0 tag names 0 1} {
-    list [catch {datatable0 tag names 0 1} msg] $msg
-} {0 {all hi newTag root tag2}}
-
-test datatable.671 {datatable0 tag nodes (missing arg)} {
-    list [catch {datatable0 tag nodes} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag nodes tag ?tag...?"}}
-
-test datatable.672 {datatable0 tag nodes root badTag} {
-    list [catch {datatable0 tag nodes root badTag} msg] $msg
-} {1 {can't find a tag "badTag"}}
-
-test datatable.673 {datatable0 tag nodes root tag2} {
-    list [catch {datatable0 tag nodes root tag2} msg] $msg
-} {0 {0 1 2 3 4}}
-
-test datatable.674 {datatable0 ancestor (missing arg)} {
-    list [catch {datatable0 ancestor} msg] $msg
-} {1 {wrong # args: should be "datatable0 ancestor node1 node2"}}
-
-test datatable.675 {datatable0 ancestor 0 (missing arg)} {
-    list [catch {datatable0 ancestor 0} msg] $msg
-} {1 {wrong # args: should be "datatable0 ancestor node1 node2"}}
-
-test datatable.676 {datatable0 ancestor 0 10} {
-    list [catch {datatable0 ancestor 0 10} msg] $msg
-} {1 {can't find tag or id "10" in ::datatable0}}
-
-test datatable.677 {datatable0 ancestor 0 4} {
-    list [catch {datatable0 ancestor 0 4} msg] $msg
-} {0 0}
-
-test datatable.678 {datatable0 ancestor 1 8} {
-    list [catch {datatable0 ancestor 1 8} msg] $msg
-} {0 0}
-
-test datatable.679 {datatable0 ancestor root 0} {
-    list [catch {datatable0 ancestor root 0} msg] $msg
-} {0 0}
-
-test datatable.680 {datatable0 ancestor 8 8} {
-    list [catch {datatable0 ancestor 8 8} msg] $msg
-} {0 8}
-
-test datatable.681 {datatable0 ancestor 0 all} {
-    list [catch {datatable0 ancestor 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.682 {datatable0 ancestor 7 9} {
-    list [catch {
-	set n1 1; set n2 1;
-	for { set i 0 } { $i < 4 } { incr i } {
-	    set n1 [datatable0 insert $n1]
-	    set n2 [datatable0 insert $n2]
-	}
-	datatable0 ancestor $n1 $n2
-	} msg] $msg
-} {0 1}
-
-test datatable.683 {datatable0 path (missing arg)} {
-    list [catch {datatable0 path} msg] $msg
-} {1 {wrong # args: should be "datatable0 path node"}}
-
-test datatable.684 {datatable0 path root} {
-    list [catch {datatable0 path root} msg] $msg
-} {0 {}}
-
-test datatable.685 {datatable0 path 0} {
-    list [catch {datatable0 path 0} msg] $msg
-} {0 {}}
-
-test datatable.686 {datatable0 path 15} {
-    list [catch {datatable0 path 15} msg] $msg
-} {0 {node1 node15}}
-
-test datatable.687 {datatable0 path all} {
-    list [catch {datatable0 path all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.688 {datatable0 path 0 1 2 4 (extra args)} {
-    list [catch {datatable0 path 0 1 2 4} msg] $msg
-} {1 {wrong # args: should be "datatable0 path node"}}
-
-test datatable.689 {datatable0 tag forget} {
-    list [catch {datatable0 tag forget} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag forget tag..."}}
-
-test datatable.690 {datatable0 tag forget badTag} {
-    list [catch {
-	datatable0 tag forget badTag
-	lsort [datatable0 tag names]
-    } msg] $msg
-} {0 {all hi myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test datatable.691 {datatable0 tag forget hi} {
-    list [catch {
-	datatable0 tag forget hi
-	lsort [datatable0 tag names]
-    } msg] $msg
-} {0 {all myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test datatable.692 {datatable0 tag forget tag1 tag2} {
-    list [catch {
-	datatable0 tag forget myTag1 myTag2
-	lsort [datatable0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test datatable.693 {datatable0 tag forget all} {
-    list [catch {
-	datatable0 tag forget all
-	lsort [datatable0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test datatable.694 {datatable0 tag forget root} {
-    list [catch {
-	datatable0 tag forget root
-	lsort [datatable0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test datatable.695 {datatable0 tag delete} {
-    list [catch {datatable0 tag delete} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag delete tag node..."}}
-
-test datatable.696 {datatable0 tag delete tag} {
-    list [catch {datatable0 tag delete tag} msg] $msg
-} {1 {wrong # args: should be "datatable0 tag delete tag node..."}}
-
-test datatable.697 {datatable0 tag delete tag 0} {
-    list [catch {datatable0 tag delete tag 0} msg] $msg
-} {0 {}}
-
-test datatable.698 {datatable0 tag delete root 0} {
-    list [catch {datatable0 tag delete root 0} msg] $msg
-} {1 {can't delete reserved tag "root"}}
-
-test datatable.699 {datatable0 attach} {
-    list [catch {datatable0 attach} msg] $msg
-} {0 ::datatable0}
-
-test datatable.700 {datatable0 attach datatable2 datatable3} {
-    list [catch {datatable0 attach datatable2 datatable3} msg] $msg
-} {1 {wrong # args: should be "datatable0 attach ?datatable?"}}
-
-test datatable.701 {datatable1 attach datatable0} {
-    list [catch {
-	blt::datatable create
-	datatable1 attach datatable0
-	datatable1 dump 0
-	} msg] $msg
-} {0 {-1 0 {::datatable0} {} {}
-0 2 {::datatable0 node2} {} {}
-2 1 {::datatable0 node2 node1} {} {}
-1 14 {::datatable0 node2 node1 node14} {} {}
-14 16 {::datatable0 node2 node1 node14 node16} {} {}
-16 18 {::datatable0 node2 node1 node14 node16 node18} {} {}
-18 20 {::datatable0 node2 node1 node14 node16 node18 node20} {} {}
-1 15 {::datatable0 node2 node1 node15} {} {}
-15 17 {::datatable0 node2 node1 node15 node17} {} {}
-17 19 {::datatable0 node2 node1 node15 node17 node19} {} {}
-19 21 {::datatable0 node2 node1 node15 node17 node19 node21} {} {}
-0 3 {::datatable0 node3} {} {}
-0 4 {::datatable0 node4} {} {}
-0 5 {::datatable0 node5} {} {}
-5 13 {::datatable0 node5 node13} {} {}
-0 6 {::datatable0 node6} {} {}
-0 8 {::datatable0 myLabel} {} {}
-}}
-
-test datatable.702 {datatable1 attach} {
-    list [catch {datatable1 attach} msg] $msg
-} {0 ::datatable0}
-
-
-test datatable.703 {blt::datatable destroy datatable1} {
-    list [catch {blt::datatable destroy datatable1} msg] $msg
-} {0 {}}
-
-test datatable.704 {datatable0 find root -badFlag} {
-    list [catch {datatable0 find root -badFlag} msg] $msg
-} {1 {unknown option "-badFlag"}}
-
-test datatable.705 {datatable0 find root -order} {
-    list [catch {datatable0 find root -order} msg] $msg
-} {1 {value for "-order" missing}}
-
-test datatable.706 {datatable0 find root ...} {
-    list [catch {datatable0 find root -order preorder -order postorder -order inorder} msg] $msg
-} {0 {20 18 16 14 1 21 19 17 15 2 0 3 4 13 5 6 8}}
-
-test datatable.707 {datatable0 find root -order preorder} {
-    list [catch {datatable0 find root -order preorder} msg] $msg
-} {0 {0 2 1 14 16 18 20 15 17 19 21 3 4 5 13 6 8}}
-
-test datatable.708 {datatable0 find root -order postorder} {
-    list [catch {datatable0 find root -order postorder} msg] $msg
-} {0 {20 18 16 14 21 19 17 15 1 2 3 4 13 5 6 8 0}}
-
-test datatable.709 {datatable0 find root -order inorder} {
-    list [catch {datatable0 find root -order inorder} msg] $msg
-} {0 {20 18 16 14 1 21 19 17 15 2 0 3 4 13 5 6 8}}
-
-test datatable.710 {datatable0 find root -order breadthfirst} {
-    list [catch {datatable0 find root -order breadthfirst} msg] $msg
-} {0 {0 2 3 4 5 6 8 1 13 14 15 16 17 18 19 20 21}}
-
-test datatable.711 {datatable0 set all key1 myValue} {
-    list [catch {datatable0 set all key1 myValue} msg] $msg
-} {0 {}}
-
-test datatable.712 {datatable0 set 15 key1 123} {
-    list [catch {datatable0 set 15 key1 123} msg] $msg
-} {0 {}}
-
-test datatable.713 {datatable0 set 16 key1 1234 key2 abc} {
-    list [catch {datatable0 set 16 key1 123 key2 abc} msg] $msg
-} {0 {}}
-
-test datatable.714 {datatable0 find root -key } {
-    list [catch {datatable0 find root -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test datatable.715 {datatable0 find root -key noKey} {
-    list [catch {datatable0 find root -key noKey} msg] $msg
-} {0 {}}
-
-test datatable.716 {datatable0 find root -key key1} {
-    list [catch {datatable0 find root -key key1} msg] $msg
-} {0 {20 18 16 14 21 19 17 15 1 2 3 4 13 5 6 8 0}}
-
-test datatable.717 {datatable0 find root -key key2} {
-    list [catch {datatable0 find root -key key2} msg] $msg
-} {0 16}
-
-test datatable.718 {datatable0 find root -key key2 -exact notThere } {
-    list [catch {datatable0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test datatable.719 {datatable0 find root -key key1 -glob notThere } {
-    list [catch {datatable0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test datatable.720 {datatable0 find root -key badKey -regexp notThere } {
-    list [catch {datatable0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test datatable.721 {datatable0 find root -key key1 -glob 12*} {
-    list [catch {datatable0 find root -key key1 -glob 12*} msg] $msg
-} {0 {16 15}}
-
-test datatable.722 {datatable0 sort} {
-    list [catch {datatable0 sort} msg] $msg
-} {1 {wrong # args: should be "datatable0 sort node ?flags...?"}}
-
-test datatable.723 {datatable0 sort all} {
-    list [catch {datatable0 sort all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test datatable.724 {datatable0 sort -recurse} {
-    list [catch {datatable0 sort -recurse} msg] $msg
-} {1 {can't find tag or id "-recurse" in ::datatable0}}
-
-test datatable.725 {datatable0 sort 0} {
-    list [catch {datatable0 sort 0} msg] $msg
-} {0 {8 2 3 4 5 6}}
-
-test datatable.726 {datatable0 sort 0 -recurse} {
-    list [catch {datatable0 sort 0 -recurse} msg] $msg
-} {0 {0 8 1 2 3 4 5 6 13 14 15 16 17 18 19 20 21}}
-
-test datatable.727 {datatable0 sort 0 -decreasing -key} {
-    list [catch {datatable0 sort 0 -decreasing -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test datatable.728 {datatable0 sort 0 -re} {
-    list [catch {datatable0 sort 0 -re} msg] $msg
-} {1 {ambiguous option "-re"}}
-
-test datatable.729 {datatable0 sort 0 -decreasing} {
-    list [catch {datatable0 sort 0 -decreasing} msg] $msg
-} {0 {6 5 4 3 2 8}}
-
-test datatable.730 {datatable0 sort 0} {
-    list [catch {
-	set list {}
-	foreach n [datatable0 sort 0] {
-	    lappend list [datatable0 label $n]
-	}	
-	set list
-    } msg] $msg
-} {0 {myLabel node2 node3 node4 node5 node6}}
-
-test datatable.731 {datatable0 sort 0 -decreasing} {
-    list [catch {datatable0 sort 0 -decreasing} msg] $msg
-} {0 {6 5 4 3 2 8}}
-
-
-test datatable.732 {datatable0 sort 0 -decreasing -key} {
-    list [catch {datatable0 sort 0 -decreasing -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test datatable.733 {datatable0 sort 0 -decreasing -key key1} {
-    list [catch {datatable0 sort 0 -decreasing -key key1} msg] $msg
-} {0 {8 6 5 4 3 2}}
-
-test datatable.734 {datatable0 sort 0 -decreasing -recurse -key key1} {
-    list [catch {datatable0 sort 0 -decreasing -recurse -key key1} msg] $msg
-} {0 {15 16 0 1 2 3 4 5 6 8 13 14 17 18 19 20 21}}
-
-test datatable.735 {datatable0 sort 0 -decreasing -key key1} {
-    list [catch {
-	set list {}
-	foreach n [datatable0 sort 0 -decreasing -key key1] {
-	    lappend list [datatable0 get $n key1]
-	}
-	set list
-    } msg] $msg
-} {0 {myValue myValue myValue myValue myValue myValue}}
-
-
-test datatable.736 {datatable0 index 1-firstchild} {
-    list [catch {datatable0 index 1-firstchild} msg] $msg
-} {0 14}
-
-test datatable.737 {datatable0 index root-to-firstchild} {
-    list [catch {datatable0 index root-to-firstchild} msg] $msg
-} {0 2}
-
-test datatable.738 {datatable0 label root-to-parent} {
-    list [catch {datatable0 label root-to-parent} msg] $msg
-} {1 {can't find tag or id "root-to-parent" in ::datatable0}}
-
-test datatable.739 {datatable0 index root-to-parent} {
-    list [catch {datatable0 index root-to-parent} msg] $msg
-} {0 -1}
-
-test datatable.740 {datatable0 index root-to-lastchild} {
-    list [catch {datatable0 index root-to-lastchild} msg] $msg
-} {0 8}
-
-test datatable.741 {datatable0 index root-to-next} {
-    list [catch {datatable0 index root-to-next} msg] $msg
-} {0 2}
-
-test datatable.742 {datatable0 index root-to-previous} {
-    list [catch {datatable0 index root-to-previous} msg] $msg
-} {0 -1}
-
-test datatable.743 {datatable0 label root-to-previous} {
-    list [catch {datatable0 label root-to-previous} msg] $msg
-} {1 {can't find tag or id "root-to-previous" in ::datatable0}}
-
-test datatable.744 {datatable0 index 1-previous} {
-    list [catch {datatable0 index 1-previous} msg] $msg
-} {0 2}
-
-test datatable.745 {datatable0 label root-to-badModifier} {
-    list [catch {datatable0 label root-to-badModifier} msg] $msg
-} {1 {can't find tag or id "root-to-badModifier" in ::datatable0}}
-
-test datatable.746 {datatable0 index root-to-badModifier} {
-    list [catch {datatable0 index root-to-badModifier} msg] $msg
-} {0 -1}
-
-test datatable.747 {datatable0 index root-to-firstchild-to-parent} {
-    list [catch {datatable0 index root-to-firstchild-to-parent} msg] $msg
-} {0 0}
-
-test datatable.748 {datatable0 trace} {
-    list [catch {datatable0 trace} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable0 trace create node key how command
-  datatable0 trace delete id...
-  datatable0 trace info id
-  datatable0 trace names }}
-
-
-test datatable.749 {datatable0 trace create} {
-    list [catch {datatable0 trace create} msg] $msg
-} {1 {wrong # args: should be "datatable0 trace create node key how command"}}
-
-test datatable.750 {datatable0 trace create root} {
-    list [catch {datatable0 trace create root} msg] $msg
-} {1 {wrong # args: should be "datatable0 trace create node key how command"}}
-
-test datatable.751 {datatable0 trace create root * } {
-    list [catch {datatable0 trace create root * } msg] $msg
-} {1 {wrong # args: should be "datatable0 trace create node key how command"}}
-
-test datatable.752 {datatable0 trace create root * rwuc} {
-    list [catch {datatable0 trace create root * rwuc} msg] $msg
-} {1 {wrong # args: should be "datatable0 trace create node key how command"}}
-
-proc Doit args { global mylist; lappend mylist $args }
-
-test datatable.753 {datatable0 trace create all newKey rwuc Doit} {
-    list [catch {datatable0 trace create all newKey rwuc Doit} msg] $msg
-} {0 trace0}
-
-test datatable.754 {datatable0 trace info trace0} {
-    list [catch {datatable0 trace info trace0} msg] $msg
-} {0 {all newKey {} Doit}}
-
-test datatable.755 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 0 newKey wc} {::datatable0 2 newKey wc} {::datatable0 1 newKey wc} {::datatable0 14 newKey wc} {::datatable0 16 newKey wc} {::datatable0 18 newKey wc} {::datatable0 20 newKey wc} {::datatable0 15 newKey wc} {::datatable0 17 newKey wc} {::datatable0 19 newKey wc} {::datatable0 21 newKey wc} {::datatable0 3 newKey wc} {::datatable0 4 newKey wc} {::datatable0 5 newKey wc} {::datatable0 13 newKey wc} {::datatable0 6 newKey wc} {::datatable0 8 newKey wc}}}
-
-test datatable.756 {test read trace} {
-    list [catch {
-	set mylist {}
-	datatable0 get root newKey
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 0 newKey r}}}
-
-test datatable.757 {test write trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 21
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 0 newKey w} {::datatable0 2 newKey w} {::datatable0 1 newKey w} {::datatable0 14 newKey w} {::datatable0 16 newKey w} {::datatable0 18 newKey w} {::datatable0 20 newKey w} {::datatable0 15 newKey w} {::datatable0 17 newKey w} {::datatable0 19 newKey w} {::datatable0 21 newKey w} {::datatable0 3 newKey w} {::datatable0 4 newKey w} {::datatable0 5 newKey w} {::datatable0 13 newKey w} {::datatable0 6 newKey w} {::datatable0 8 newKey w}}}
-
-test datatable.758 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 21
-	set mylist
-	} msg] $msg
-} {0 {{::datatable0 0 newKey w} {::datatable0 2 newKey w} {::datatable0 1 newKey w} {::datatable0 14 newKey w} {::datatable0 16 newKey w} {::datatable0 18 newKey w} {::datatable0 20 newKey w} {::datatable0 15 newKey w} {::datatable0 17 newKey w} {::datatable0 19 newKey w} {::datatable0 21 newKey w} {::datatable0 3 newKey w} {::datatable0 4 newKey w} {::datatable0 5 newKey w} {::datatable0 13 newKey w} {::datatable0 6 newKey w} {::datatable0 8 newKey w}}}
-
-test datatable.759 {datatable0 trace delete} {
-    list [catch {datatable0 trace delete} msg] $msg
-} {0 {}}
-
-test datatable.760 {datatable0 trace delete badId} {
-    list [catch {datatable0 trace delete badId} msg] $msg
-} {1 {unknown trace "badId"}}
-
-test datatable.761 {datatable0 trace delete trace0} {
-    list [catch {datatable0 trace delete trace0} msg] $msg
-} {0 {}}
-
-test datatable.762 {test create trace} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.763 {test unset trace} {
-    list [catch {
-	set mylist {}
-	datatable0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-
-test datatable.764 {datatable0 notify} {
-    list [catch {datatable0 notify} msg] $msg
-} {1 {wrong # args: should be one of...
-  datatable0 notify create ?flags? command
-  datatable0 notify delete notifyId...
-  datatable0 notify info notifyId
-  datatable0 notify names }}
-
-
-test datatable.765 {datatable0 notify create} {
-    list [catch {datatable0 notify create} msg] $msg
-} {1 {wrong # args: should be "datatable0 notify create ?flags? command"}}
-
-test datatable.766 {datatable0 notify create -allevents} {
-    list [catch {datatable0 notify create -allevents Doit} msg] $msg
-} {0 notify0}
-
-test datatable.767 {datatable0 notify info notify0} {
-    list [catch {datatable0 notify info notify0} msg] $msg
-} {0 {notify0 {-create -delete -move -sort -relabel} {Doit}}}
-
-test datatable.768 {datatable0 notify info badId} {
-    list [catch {datatable0 notify info badId} msg] $msg
-} {1 {unknown notify name "badId"}}
-
-test datatable.769 {datatable0 notify info} {
-    list [catch {datatable0 notify info} msg] $msg
-} {1 {wrong # args: should be "datatable0 notify info notifyId"}}
-
-test datatable.770 {datatable0 notify names} {
-    list [catch {datatable0 notify names} msg] $msg
-} {0 notify0}
-
-
-test datatable.771 {test create notify} {
-    list [catch {
-	set mylist {}
-	datatable0 insert 1 -tags test
-	set mylist
-	} msg] $msg
-} {0 {{-create 22}}}
-
-test datatable.772 {test move notify} {
-    list [catch {
-	set mylist {}
-	datatable0 move 8 test
-	set mylist
-	} msg] $msg
-} {0 {{-move 8}}}
-
-test datatable.773 {test sort notify} {
-    list [catch {
-	set mylist {}
-	datatable0 sort 0 -reorder 
-	set mylist
-	} msg] $msg
-} {0 {{-sort 0}}}
-
-test datatable.774 {test relabel notify} {
-    list [catch {
-	set mylist {}
-	datatable0 label test "newLabel"
-	set mylist
-	} msg] $msg
-} {0 {{-relabel 22}}}
-
-test datatable.775 {test delete notify} {
-    list [catch {
-	set mylist {}
-	datatable0 delete test
-	set mylist
-	} msg] $msg
-} {0 {{-delete 8} {-delete 22}}}
-
-
-test datatable.776 {datatable0 notify delete badId} {
-    list [catch {datatable0 notify delete badId} msg] $msg
-} {1 {unknown notify name "badId"}}
-
-
-test datatable.777 {test create notify} {
-    list [catch {
-	set mylist {}
-	datatable0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.778 {test delete notify} {
-    list [catch {
-	set mylist {}
-	datatable0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.779 {test delete notify} {
-    list [catch {
-	set mylist {}
-	datatable0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test datatable.780 {datatable0 copy} {
-    list [catch {datatable0 copy} msg] $msg
-} {1 {wrong # args: should be "datatable0 copy srcNode ?destDatatable? destNode ?switches?"}}
-
-test datatable.781 {datatable0 copy root} {
-    list [catch {datatable0 copy root} msg] $msg
-} {1 {wrong # args: should be "datatable0 copy srcNode ?destDatatable? destNode ?switches?"}}
-
-test datatable.782 {datatable0 copy root 14} {
-    list [catch {datatable0 copy root 14} msg] $msg
-} {0 23}
-
-test datatable.783 {datatable0 copy 14 root} {
-    list [catch {datatable0 copy 14 root} msg] $msg
-} {0 24}
-
-test datatable.784 {datatable0 copy root 14 -recurse} {
-    list [catch {datatable0 copy root 14 -recurse} msg] $msg
-} {1 {can't make cyclic copy: source node is an ancestor of the destination}}
-
-test datatable.785 {datatable0 copy 2 3 -recurse -tags} {
-    list [catch {datatable0 copy 2 3 -recurse -tags} msg] $msg
-} {0 25}
-
-test datatable.786 {datatable0 copy 2 3 -recurse -overwrite} {
-    list [catch {
-	blt::datatable create datatable1
-	foreach node [datatable0 children root] {
-	    datatable0 copy $node datatable1 root -recurse 
-	}
-	foreach node [datatable0 children root] {
-	    datatable0 copy $node datatable1 root -recurse 
-	}
-	datatable1 dump root
-    } msg] $msg
-} {0 {-1 0 {::datatable1} {} {}
-0 1 {::datatable1 node2} {key1 myValue} {}
-1 2 {::datatable1 node2 node1} {key1 myValue} {}
-2 3 {::datatable1 node2 node1 node14} {key1 myValue} {}
-3 4 {::datatable1 node2 node1 node14 node16} {key1 123 key2 abc} {}
-4 5 {::datatable1 node2 node1 node14 node16 node18} {key1 myValue} {}
-5 6 {::datatable1 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-3 7 {::datatable1 node2 node1 node14 ::datatable0} {key1 myValue} {}
-2 8 {::datatable1 node2 node1 node15} {key1 123} {}
-8 9 {::datatable1 node2 node1 node15 node17} {key1 myValue} {}
-9 10 {::datatable1 node2 node1 node15 node17 node19} {key1 myValue} {}
-10 11 {::datatable1 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 12 {::datatable1 node3} {key1 myValue} {}
-12 13 {::datatable1 node3 node2} {key1 myValue} {}
-13 14 {::datatable1 node3 node2 node1} {key1 myValue} {}
-14 15 {::datatable1 node3 node2 node1 node14} {key1 myValue} {}
-15 16 {::datatable1 node3 node2 node1 node14 node16} {key1 123 key2 abc} {}
-16 17 {::datatable1 node3 node2 node1 node14 node16 node18} {key1 myValue} {}
-17 18 {::datatable1 node3 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-15 19 {::datatable1 node3 node2 node1 node14 ::datatable0} {key1 myValue} {}
-14 20 {::datatable1 node3 node2 node1 node15} {key1 123} {}
-20 21 {::datatable1 node3 node2 node1 node15 node17} {key1 myValue} {}
-21 22 {::datatable1 node3 node2 node1 node15 node17 node19} {key1 myValue} {}
-22 23 {::datatable1 node3 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 24 {::datatable1 node4} {key1 myValue} {}
-0 25 {::datatable1 node5} {key1 myValue} {}
-25 26 {::datatable1 node5 node13} {key1 myValue} {}
-0 27 {::datatable1 node6} {key1 myValue} {}
-0 28 {::datatable1 node14} {key1 myValue} {}
-0 29 {::datatable1 node2} {key1 myValue} {}
-29 30 {::datatable1 node2 node1} {key1 myValue} {}
-30 31 {::datatable1 node2 node1 node14} {key1 myValue} {}
-31 32 {::datatable1 node2 node1 node14 node16} {key1 123 key2 abc} {}
-32 33 {::datatable1 node2 node1 node14 node16 node18} {key1 myValue} {}
-33 34 {::datatable1 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-31 35 {::datatable1 node2 node1 node14 ::datatable0} {key1 myValue} {}
-30 36 {::datatable1 node2 node1 node15} {key1 123} {}
-36 37 {::datatable1 node2 node1 node15 node17} {key1 myValue} {}
-37 38 {::datatable1 node2 node1 node15 node17 node19} {key1 myValue} {}
-38 39 {::datatable1 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 40 {::datatable1 node3} {key1 myValue} {}
-40 41 {::datatable1 node3 node2} {key1 myValue} {}
-41 42 {::datatable1 node3 node2 node1} {key1 myValue} {}
-42 43 {::datatable1 node3 node2 node1 node14} {key1 myValue} {}
-43 44 {::datatable1 node3 node2 node1 node14 node16} {key1 123 key2 abc} {}
-44 45 {::datatable1 node3 node2 node1 node14 node16 node18} {key1 myValue} {}
-45 46 {::datatable1 node3 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-43 47 {::datatable1 node3 node2 node1 node14 ::datatable0} {key1 myValue} {}
-42 48 {::datatable1 node3 node2 node1 node15} {key1 123} {}
-48 49 {::datatable1 node3 node2 node1 node15 node17} {key1 myValue} {}
-49 50 {::datatable1 node3 node2 node1 node15 node17 node19} {key1 myValue} {}
-50 51 {::datatable1 node3 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 52 {::datatable1 node4} {key1 myValue} {}
-0 53 {::datatable1 node5} {key1 myValue} {}
-53 54 {::datatable1 node5 node13} {key1 myValue} {}
-0 55 {::datatable1 node6} {key1 myValue} {}
-0 56 {::datatable1 node14} {key1 myValue} {}
-}}
-
-puts stderr "done testing datatablecmd.tcl"
-
-exit 0
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blt3.0/tests/defs b/blt3.0/tests/defs
deleted file mode 100644
index e061b97..0000000
--- a/blt3.0/tests/defs
+++ /dev/null
@@ -1,97 +0,0 @@
-# This file contains support code for the Tcl test suite.  It is
-# normally sourced by the individual files in the test suite before
-# they run their tests.  This improved approach to testing was designed
-# and initially implemented by Mary Ann May-Pumphrey of Sun Microsystems.
-
-if ![info exists VERBOSE] {
-    set VERBOSE 0
-}
-if ![info exists TESTS] {
-    set TESTS {}
-}
-
-# Some of the tests don't work on some system configurations due to
-# configuration quirks, not due to Tk problems;  in order to prevent
-# false alarms, these tests are only run in the master source directory
-# at Berkeley.  The presence of a file "Berkeley" in this directory is
-# used to indicate that these tests should be run.
-
-set atBerkeley [file exists Berkeley]
-
-proc print_verbose {test_name test_description contents_of_test code answer} {
-    puts stdout "\n"
-    puts stdout "==== $test_name $test_description"
-    puts stdout "==== Contents of test case:"
-    puts stdout "$contents_of_test"
-    if {$code != 0} {
-	if {$code == 1} {
-	    puts stdout "==== Test generated error:"
-	    puts stdout $answer
-	} elseif {$code == 2} {
-	    puts stdout "==== Test generated return exception;  result was:"
-	    puts stdout $answer
-	} elseif {$code == 3} {
-	    puts stdout "==== Test generated break exception"
-	} elseif {$code == 4} {
-	    puts stdout "==== Test generated continue exception"
-	} else {
-	    puts stdout "==== Test generated exception $code;  message was:"
-	    puts stdout $answer
-	}
-    } else {
-	puts stdout "==== Result was:"
-	puts stdout "$answer"
-    }
-}
-
-proc test {test_name test_description contents_of_test passing_results} {
-    global VERBOSE
-    global TESTS
-    if {[string compare $TESTS ""] != 0} then {
-	set ok 0
-	foreach test $TESTS {
-	    if [string match $test $test_name] then {
-		set ok 1
-		break
-	    }
-        }
-	if !$ok then return
-    }
-    set code [catch {uplevel $contents_of_test} answer]
-    if {$code != 0} {
-	print_verbose $test_name $test_description $contents_of_test \
-		$code $answer
-    } elseif {[string compare $answer $passing_results] == 0} then { 
-	if $VERBOSE then {
-	    print_verbose $test_name $test_description $contents_of_test \
-		    $code $answer
-	    puts stdout "++++ $test_name PASSED"
-	}
-    } else { 
-	print_verbose $test_name $test_description $contents_of_test \
-		$code $answer 
-	puts stdout "---- Result should have been:"
-	puts stdout "$passing_results"
-	puts stdout "---- $test_name FAILED" 
-    }
-}
-
-proc dotests {file args} {
-    global TESTS
-    set savedTests $TESTS
-    set TESTS $args
-    source $file
-    set TESTS $savedTests
-}
-
-# If the main window isn't already mapped (e.g. because the tests are
-# being run automatically) , specify a precise size for it so that the
-# user won't have to position it manually.
-
-if { [llength [info commands tk]] > 0 } {
-    if {![winfo ismapped .]} {		
-	wm geometry . +0+0
-	update
-    }
-}
-
diff --git a/blt3.0/tests/renumber.tcl b/blt3.0/tests/renumber.tcl
deleted file mode 100644
index 63a930a..0000000
--- a/blt3.0/tests/renumber.tcl
+++ /dev/null
@@ -1,17 +0,0 @@
-set infile [lindex $argv 0]
-set outfile [lindex $argv 1]
-set f [open $infile "r"]
-set data [read $f]
-close $f
-
-set test [file root [file tail $infile]]
-set f [open $outfile "w"]
-set count 1
-set pattern [subst -nocommands {^test ${test}\.[a-z0-9]+ }]
-foreach line [split $data \n] {
-    if { [regsub $pattern $line "test ${test}.${count} " line] } {
-	incr count
-    }
-    puts $f $line
-}
-close $f
\ No newline at end of file
diff --git a/blt3.0/tests/tree.tcl b/blt3.0/tests/tree.tcl
deleted file mode 100644
index 137abe6..0000000
--- a/blt3.0/tests/tree.tcl
+++ /dev/null
@@ -1,2107 +0,0 @@
-
-# Test switches
-#
-# -before, -after, -node for "insert" operation
-#
-
-if {[info procs test] != "test"} {
-    source defs
-}
-
-if [file exists ../library] {
-    set blt_library ../library
-}
-
-#set VERBOSE 1
-
-test tree.1 {tree no args} {
-    list [catch {blt::tree} msg] $msg
-} {1 {wrong # args: should be one of...
-  blt::tree create ?name?
-  blt::tree destroy name...
-  blt::tree load name libpath
-  blt::tree names ?pattern?...}}
-
-test tree.2 {tree create #auto} {
-    list [catch {blt::tree create #auto} msg] $msg
-} {0 ::tree0}
-
-test tree.3 {tree create #auto.suffix} {
-    list [catch {blt::tree create #auto.suffix} msg] $msg
-} {0 ::tree0.suffix}
-
-test tree.4 {tree create prefix.#auto} {
-    list [catch {blt::tree create prefix.#auto} msg] $msg
-} {0 ::prefix.tree0}
-
-test tree.5 {tree create prefix.#auto.suffix} {
-    list [catch {blt::tree create prefix.#auto.suffix} msg] $msg
-} {0 ::prefix.tree0.suffix}
-
-test tree.6 {tree create prefix.#auto.suffix.#auto} {
-    list [catch {blt::tree create prefix.#auto.suffix.#auto} msg] $msg
-} {0 ::prefix.tree0.suffix.#auto}
-
-test tree.7 {tree destroy [tree names *tree0*]} {
-    list [catch {eval blt::tree destroy [blt::tree names *tree0*]} msg] $msg
-} {0 {}}
-
-test tree.8 {create} {
-    list [catch {blt::tree create} msg] $msg
-} {0 ::tree0}
-
-test tree.9 {create} {
-    list [catch {blt::tree create} msg] $msg
-} {0 ::tree1}
-
-test tree.10 {create fred} {
-    list [catch {blt::tree create fred} msg] $msg
-} {0 ::fred}
-
-test tree.11 {create fred} {
-    list [catch {blt::tree create fred} msg] $msg
-} {1 {a command "::fred" already exists}}
-
-test tree.12 {create if} {
-    list [catch {blt::tree create if} msg] $msg
-} {1 {a command "::if" already exists}}
-
-test tree.13 {tree create (bad namespace)} {
-    list [catch {blt::tree create badName::fred} msg] $msg
-} {1 {unknown namespace "badName"}}
-
-test tree.14 {tree create (wrong # args)} {
-    list [catch {blt::tree create a b} msg] $msg
-} {1 {wrong # args: should be "blt::tree create ?name?"}}
-
-test tree.15 {tree names} {
-    list [catch {blt::tree names} msg] [lsort $msg]
-} {0 {::fred ::tree0 ::tree1}}
-
-test tree.16 {tree names pattern)} {
-    list [catch {blt::tree names ::tree*} msg] [lsort $msg]
-} {0 {::tree0 ::tree1}}
-
-test tree.17 {tree names badPattern)} {
-    list [catch {blt::tree names badPattern*} msg] $msg
-} {0 {}}
-
-test tree.18 {tree names pattern arg (wrong # args)} {
-    list [catch {blt::tree names pattern arg} msg] $msg
-} {1 {wrong # args: should be "blt::tree names ?pattern?..."}}
-
-test tree.19 {tree destroy (wrong # args)} {
-    list [catch {blt::tree destroy} msg] $msg
-} {1 {wrong # args: should be "blt::tree destroy name..."}}
-
-test tree.20 {tree destroy badTree} {
-    list [catch {blt::tree destroy badTree} msg] $msg
-} {1 {can't find a tree named "badTree"}}
-
-test tree.21 {tree destroy fred} {
-    list [catch {blt::tree destroy fred} msg] $msg
-} {0 {}}
-
-test tree.22 {tree destroy tree0 tree1} {
-    list [catch {blt::tree destroy tree0 tree1} msg] $msg
-} {0 {}}
-
-test tree.23 {create} {
-    list [catch {blt::tree create} msg] $msg
-} {0 ::tree0}
-
-test tree.24 {tree0} {
-    list [catch {tree0} msg] $msg
-} {1 {wrong # args: should be one of...
-  tree0 ancestor node1 node2
-  tree0 apply node ?switches?
-  tree0 attach tree ?switches?
-  tree0 children node ?first? ?last?
-  tree0 copy parent ?tree? node ?switches?
-  tree0 degree node
-  tree0 delete node ?node...?
-  tree0 depth node
-  tree0 dump node
-  tree0 dumpfile node fileName
-  tree0 exists node ?key?
-  tree0 export format ?switches?
-  tree0 find node ?switches?
-  tree0 findchild node label
-  tree0 firstchild node
-  tree0 get node ?key? ?defaultValue?
-  tree0 import format ?switches?
-  tree0 index label|list
-  tree0 insert parent ?switches?
-  tree0 is oper args...
-  tree0 keys node ?node...?
-  tree0 label node ?newLabel?
-  tree0 lastchild node
-  tree0 move node newParent ?switches?
-  tree0 next node
-  tree0 nextsibling node
-  tree0 notify args...
-  tree0 parent node
-  tree0 parsepath node string ?separator?
-  tree0 path node
-  tree0 position ?switches? node...
-  tree0 previous node
-  tree0 prevsibling node
-  tree0 restore node data ?switches?
-  tree0 restorefile node fileName ?switches?
-  tree0 root 
-  tree0 set node ?key value...?
-  tree0 size node
-  tree0 sort node ?flags...?
-  tree0 tag args...
-  tree0 trace args...
-  tree0 type node key
-  tree0 unset node ?key...?
-  tree0 values node ?key?}}
-
-test tree.25 {tree0 badOp} {
-    list [catch {tree0 badOp} msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  tree0 ancestor node1 node2
-  tree0 apply node ?switches?
-  tree0 attach tree ?switches?
-  tree0 children node ?first? ?last?
-  tree0 copy parent ?tree? node ?switches?
-  tree0 degree node
-  tree0 delete node ?node...?
-  tree0 depth node
-  tree0 dump node
-  tree0 dumpfile node fileName
-  tree0 exists node ?key?
-  tree0 export format ?switches?
-  tree0 find node ?switches?
-  tree0 findchild node label
-  tree0 firstchild node
-  tree0 get node ?key? ?defaultValue?
-  tree0 import format ?switches?
-  tree0 index label|list
-  tree0 insert parent ?switches?
-  tree0 is oper args...
-  tree0 keys node ?node...?
-  tree0 label node ?newLabel?
-  tree0 lastchild node
-  tree0 move node newParent ?switches?
-  tree0 next node
-  tree0 nextsibling node
-  tree0 notify args...
-  tree0 parent node
-  tree0 parsepath node string ?separator?
-  tree0 path node
-  tree0 position ?switches? node...
-  tree0 previous node
-  tree0 prevsibling node
-  tree0 restore node data ?switches?
-  tree0 restorefile node fileName ?switches?
-  tree0 root 
-  tree0 set node ?key value...?
-  tree0 size node
-  tree0 sort node ?flags...?
-  tree0 tag args...
-  tree0 trace args...
-  tree0 type node key
-  tree0 unset node ?key...?
-  tree0 values node ?key?}}
-
-test tree.26 {tree0 insert (wrong # args)} {
-    list [catch {tree0 insert} msg] $msg
-} {1 {wrong # args: should be "tree0 insert parent ?switches?"}}
-
-test tree.27 {tree0 insert badParent} {
-    list [catch {tree0 insert badParent} msg] $msg
-} {1 {can't find tag or id "badParent" in ::tree0}}
-
-test tree.28 {tree0 insert 1000} {
-    list [catch {tree0 insert 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::tree0}}
-
-test tree.29 {tree0 insert 0} {
-    list [catch {tree0 insert 0} msg] $msg
-} {0 1}
-
-test tree.30 {tree0 insert 0} {
-    list [catch {tree0 insert 0} msg] $msg
-} {0 2}
-
-test tree.31 {tree0 insert root} {
-    list [catch {tree0 insert root} msg] $msg
-} {0 3}
-
-test tree.32 {tree0 insert all} {
-    list [catch {tree0 insert all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.33 {tree0 insert 0 -at badPosition} {
-    list [catch {tree0 insert 0 -at badPosition} msg] $msg
-} {1 {expected integer but got "badPosition"}}
-
-test tree.34 {tree0 insert 0 -at -1} {
-    list [catch {tree0 insert 0 -at -1} msg] $msg
-} {1 {bad value "-1": can't be negative}}
-
-test tree.35 {tree0 insert 0 -at 1000} {
-    list [catch {tree0 insert 0 -at 1000} msg] $msg
-} {0 4}
-
-test tree.36 {tree0 insert 0 -at (no arg)} {
-    list [catch {tree0 insert 0 -at} msg] $msg
-} {1 {value for "-at" missing}}
-
-test tree.37 {tree0 insert 0 -tags myTag} {
-    list [catch {tree0 insert 0 -tags myTag} msg] $msg
-} {0 5}
-
-test tree.38 {tree0 insert 0 -tags {myTag1 myTag2} } {
-    list [catch {tree0 insert 0 -tags {myTag1 myTag2}} msg] $msg
-} {0 6}
-
-test tree.39 {tree0 insert 0 -tags root} {
-    list [catch {tree0 insert 0 -tags root} msg] $msg
-} {1 {can't add reserved tag "root"}}
-
-test tree.40 {tree0 insert 0 -tags (missing arg)} {
-    list [catch {tree0 insert 0 -tags} msg] $msg
-} {1 {value for "-tags" missing}}
-
-test tree.41 {tree0 insert 0 -label myLabel -tags thisTag} {
-    list [catch {tree0 insert 0 -label myLabel -tags thisTag} msg] $msg
-} {0 8}
-
-test tree.42 {tree0 insert 0 -label (missing arg)} {
-    list [catch {tree0 insert 0 -label} msg] $msg
-} {1 {value for "-label" missing}}
-
-test tree.43 {tree0 insert 1 -tags thisTag} {
-    list [catch {tree0 insert 1 -tags thisTag} msg] $msg
-} {0 9}
-
-test tree.44 {tree0 insert 1 -data key (missing value)} {
-    list [catch {tree0 insert 1 -data key} msg] $msg
-} {1 {missing value for "key"}}
-
-test tree.45 {tree0 insert 1 -data {key value}} {
-    list [catch {tree0 insert 1 -data {key value}} msg] $msg
-} {0 11}
-
-test tree.46 {tree0 insert 1 -data {key1 value1 key2 value2}} {
-    list [catch {tree0 insert 1 -data {key1 value1 key2 value2}} msg] $msg
-} {0 12}
-
-test tree.47 {get} {
-    list [catch {
-	tree0 get 12
-    } msg] $msg
-} {0 {key1 value1 key2 value2}}
-
-test tree.48 {tree0 children} {
-    list [catch {tree0 children} msg] $msg
-} {1 {wrong # args: should be "tree0 children node ?first? ?last?"}}
-
-test tree.49 {tree0 children 0} {
-    list [catch {tree0 children 0} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test tree.50 {tree0 children root} {
-    list [catch {tree0 children root} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test tree.51 {tree0 children 1} {
-    list [catch {tree0 children 1} msg] $msg
-} {0 {9 11 12}}
-
-test tree.52 {tree0 insert myTag} {
-    list [catch {tree0 insert myTag} msg] $msg
-} {0 13}
-
-test tree.53 {tree0 children myTag} {
-    list [catch {tree0 children myTag} msg] $msg
-} {0 13}
-
-test tree.54 {tree0 children root 0 end} {
-    list [catch {tree0 children root 0 end} msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test tree.55 {tree0 children root 2} {
-    list [catch {tree0 children root 2} msg] $msg
-} {0 3}
-
-test tree.56 {tree0 children root 2 end} {
-    list [catch {tree0 children root 2 end} msg] $msg
-} {0 {3 4 5 6 8}}
-
-test tree.57 {tree0 children root end end} {
-    list [catch {tree0 children root end end} msg] $msg
-} {0 8}
-
-test tree.58 {tree0 children root 0 2} {
-    list [catch {tree0 children root 0 2} msg] $msg
-} {0 {1 2 3}}
-
-test tree.59 {tree0 children root -1 -20} {
-    list [catch {tree0 children root -1 -20} msg] $msg
-} {0 {}}
-
-test tree.60 {tree0 firstchild (missing arg)} {
-    list [catch {tree0 firstchild} msg] $msg
-} {1 {wrong # args: should be "tree0 firstchild node"}}
-
-test tree.61 {tree0 firstchild root} {
-    list [catch {tree0 firstchild root} msg] $msg
-} {0 1}
-
-test tree.62 {tree0 lastchild (missing arg)} {
-    list [catch {tree0 lastchild} msg] $msg
-} {1 {wrong # args: should be "tree0 lastchild node"}}
-
-test tree.63 {tree0 lastchild root} {
-    list [catch {tree0 lastchild root} msg] $msg
-} {0 8}
-
-test tree.64 {tree0 nextsibling (missing arg)} {
-    list [catch {tree0 nextsibling} msg] $msg
-} {1 {wrong # args: should be "tree0 nextsibling node"}}
-
-test tree.65 {tree0 nextsibling 1)} {
-    list [catch {tree0 nextsibling 1} msg] $msg
-} {0 2}
-
-test tree.66 {tree0 nextsibling 2)} {
-    list [catch {tree0 nextsibling 2} msg] $msg
-} {0 3}
-
-test tree.67 {tree0 nextsibling 3)} {
-    list [catch {tree0 nextsibling 3} msg] $msg
-} {0 4}
-
-test tree.68 {tree0 nextsibling 4)} {
-    list [catch {tree0 nextsibling 4} msg] $msg
-} {0 5}
-
-test tree.69 {tree0 nextsibling 5)} {
-    list [catch {tree0 nextsibling 5} msg] $msg
-} {0 6}
-
-test tree.70 {tree0 nextsibling 6)} {
-    list [catch {tree0 nextsibling 6} msg] $msg
-} {0 8}
-
-test tree.71 {tree0 nextsibling 8)} {
-    list [catch {tree0 nextsibling 8} msg] $msg
-} {0 -1}
-
-test tree.72 {tree0 nextsibling all)} {
-    list [catch {tree0 nextsibling all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.73 {tree0 nextsibling badTag)} {
-    list [catch {tree0 nextsibling badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::tree0}}
-
-test tree.74 {tree0 nextsibling -1)} {
-    list [catch {tree0 nextsibling -1} msg] $msg
-} {1 {can't find tag or id "-1" in ::tree0}}
-
-test tree.75 {tree0 prevsibling 2)} {
-    list [catch {tree0 prevsibling 2} msg] $msg
-} {0 1}
-
-test tree.76 {tree0 prevsibling 1)} {
-    list [catch {tree0 prevsibling 1} msg] $msg
-} {0 -1}
-
-test tree.77 {tree0 prevsibling -1)} {
-    list [catch {tree0 prevsibling -1} msg] $msg
-} {1 {can't find tag or id "-1" in ::tree0}}
-
-test tree.78 {tree0 root)} {
-    list [catch {tree0 root} msg] $msg
-} {0 0}
-
-test tree.79 {tree0 root badArg)} {
-    list [catch {tree0 root badArgs} msg] $msg
-} {1 {wrong # args: should be "tree0 root "}}
-
-test tree.80 {tree0 parent (missing arg))} {
-    list [catch {tree0 parent} msg] $msg
-} {1 {wrong # args: should be "tree0 parent node"}}
-
-test tree.81 {tree0 parent root)} {
-    list [catch {tree0 parent root} msg] $msg
-} {0 -1}
-
-test tree.82 {tree0 parent 1)} {
-    list [catch {tree0 parent 1} msg] $msg
-} {0 0}
-
-test tree.83 {tree0 parent myTag)} {
-    list [catch {tree0 parent myTag} msg] $msg
-} {0 0}
-
-test tree.84 {tree0 next (missing arg))} {
-    list [catch {tree0 next} msg] $msg
-} {1 {wrong # args: should be "tree0 next node"}}
-
-
-test tree.85 {tree0 next (extra arg))} {
-    list [catch {tree0 next root root} msg] $msg
-} {1 {wrong # args: should be "tree0 next node"}}
-
-test tree.86 {tree0 next root} {
-    list [catch {tree0 next root} msg] $msg
-} {0 1}
-
-test tree.87 {tree0 next 1)} {
-    list [catch {tree0 next 1} msg] $msg
-} {0 9}
-
-test tree.88 {tree0 next 2)} {
-    list [catch {tree0 next 2} msg] $msg
-} {0 3}
-
-test tree.89 {tree0 next 3)} {
-    list [catch {tree0 next 3} msg] $msg
-} {0 4}
-
-test tree.90 {tree0 next 4)} {
-    list [catch {tree0 next 4} msg] $msg
-} {0 5}
-
-test tree.91 {tree0 next 5)} {
-    list [catch {tree0 next 5} msg] $msg
-} {0 13}
-
-test tree.92 {tree0 next 6)} {
-    list [catch {tree0 next 6} msg] $msg
-} {0 8}
-
-test tree.93 {tree0 next 8)} {
-    list [catch {tree0 next 8} msg] $msg
-} {0 -1}
-
-test tree.94 {tree0 previous 1)} {
-    list [catch {tree0 previous 1} msg] $msg
-} {0 0}
-
-test tree.95 {tree0 previous 0)} {
-    list [catch {tree0 previous 0} msg] $msg
-} {0 -1}
-
-test tree.96 {tree0 previous 8)} {
-    list [catch {tree0 previous 8} msg] $msg
-} {0 6}
-
-test tree.97 {tree0 depth (no arg))} {
-    list [catch {tree0 depth} msg] $msg
-} {1 {wrong # args: should be "tree0 depth node"}}
-
-test tree.98 {tree0 depth root))} {
-    list [catch {tree0 depth root} msg] $msg
-} {0 0}
-
-test tree.99 {tree0 depth myTag))} {
-    list [catch {tree0 depth myTag} msg] $msg
-} {0 1}
-
-test tree.100 {tree0 depth myTag))} {
-    list [catch {tree0 depth myTag} msg] $msg
-} {0 1}
-
-test tree.101 {tree0 dump (missing arg)))} {
-    list [catch {tree0 dump} msg] $msg
-} {1 {wrong # args: should be "tree0 dump node"}}
-
-test tree.102 {tree0 dump root} {
-    list [catch {tree0 dump root} msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 1 {{} node1} {} {}
-1 9 {{} node1 node9} {} {thisTag}
-1 11 {{} node1 node11} {key value} {}
-1 12 {{} node1 node12} {key1 value1 key2 value2} {}
-0 2 {{} node2} {} {}
-0 3 {{} node3} {} {}
-0 4 {{} node4} {} {}
-0 5 {{} node5} {} {myTag}
-5 13 {{} node5 node13} {} {}
-0 6 {{} node6} {} {myTag2 myTag1}
-0 8 {{} myLabel} {} {thisTag}
-}}
-
-test tree.103 {tree0 dump 1} {
-    list [catch {tree0 dump 1} msg] $msg
-} {0 {-1 1 {node1} {} {}
-1 9 {node1 node9} {} {thisTag}
-1 11 {node1 node11} {key value} {}
-1 12 {node1 node12} {key1 value1 key2 value2} {}
-}}
-
-test tree.104 {tree0 dump this} {
-    list [catch {tree0 dump myTag} msg] $msg
-} {0 {-1 5 {node5} {} {myTag}
-5 13 {node5 node13} {} {}
-}}
-
-test tree.105 {tree0 dump 1 badArg (too many args)} {
-    list [catch {tree0 dump 1 badArg} msg] $msg
-} {1 {wrong # args: should be "tree0 dump node"}}
-
-test tree.106 {tree0 dump 11} {
-    list [catch {tree0 dump 11} msg] $msg
-} {0 {-1 11 {node11} {key value} {}
-}}
-
-test tree.107 {tree0 dump all} {
-    list [catch {tree0 dump all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.108 {tree0 dump all} {
-    list [catch {tree0 dump all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.109 {tree0 dumpfile 0 test.dump} {
-    list [catch {tree0 dumpfile 0 test.dump} msg] $msg
-} {0 {}}
-
-test tree.110 {tree0 get 9} {
-    list [catch {tree0 get 9} msg] $msg
-} {0 {}}
-
-test tree.111 {tree0 get all} {
-    list [catch {tree0 get all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.112 {tree0 get root} {
-    list [catch {tree0 get root} msg] $msg
-} {0 {}}
-
-test tree.113 {tree0 get 9 key} {
-    list [catch {tree0 get root} msg] $msg
-} {0 {}}
-
-test tree.114 {tree0 get 12} {
-    list [catch {tree0 get 12} msg] $msg
-} {0 {key1 value1 key2 value2}}
-
-test tree.115 {tree0 get 12 key1} {
-    list [catch {tree0 get 12 key1} msg] $msg
-} {0 value1}
-
-test tree.116 {tree0 get 12 key2} {
-    list [catch {tree0 get 12 key2} msg] $msg
-} {0 value2}
-
-test tree.117 {tree0 get 12 key1 defValue } {
-    list [catch {tree0 get 12 key1 defValue} msg] $msg
-} {0 value1}
-
-test tree.118 {tree0 get 12 key100 defValue } {
-    list [catch {tree0 get 12 key100 defValue} msg] $msg
-} {0 defValue}
-
-test tree.119 {tree0 index (missing arg) } {
-    list [catch {tree0 index} msg] $msg
-} {1 {wrong # args: should be "tree0 index label|list"}}
-
-test tree.120 {tree0 index 0 10 (extra arg) } {
-    list [catch {tree0 index 0 10} msg] $msg
-} {1 {wrong # args: should be "tree0 index label|list"}}
-
-test tree.121 {tree0 index 0} {
-    list [catch {tree0 index 0} msg] $msg
-} {0 0}
-
-test tree.122 {tree0 index root} {
-    list [catch {tree0 index root} msg] $msg
-} {0 0}
-
-test tree.123 {tree0 index all} {
-    list [catch {tree0 index all} msg] $msg
-} {0 -1}
-
-test tree.124 {tree0 index myTag} {
-    list [catch {tree0 index myTag} msg] $msg
-} {0 5}
-
-test tree.125 {tree0 index thisTag} {
-    list [catch {tree0 index thisTag} msg] $msg
-} {0 -1}
-
-test tree.126 {tree0 is (no args)} {
-    list [catch {tree0 is} msg] $msg
-} {1 {wrong # args: should be one of...
-  tree0 is ancestor node1 node2
-  tree0 is before node1 node2
-  tree0 is leaf node
-  tree0 is root node}}
-
-test tree.127 {tree0 is badOp} {
-    list [catch {tree0 is badOp} msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  tree0 is ancestor node1 node2
-  tree0 is before node1 node2
-  tree0 is leaf node
-  tree0 is root node}}
-
-test tree.128 {tree0 is before} {
-    list [catch {tree0 is before} msg] $msg
-} {1 {wrong # args: should be "tree0 is before node1 node2"}}
-
-test tree.129 {tree0 is before 0 10 20} {
-    list [catch {tree0 is before 0 10 20} msg] $msg
-} {1 {wrong # args: should be "tree0 is before node1 node2"}}
-
-test tree.130 {tree0 is before 0 12} {
-    list [catch {tree0 is before 0 12} msg] $msg
-} {0 1}
-
-test tree.131 {tree0 is before 12 0} {
-    list [catch {tree0 is before 12 0} msg] $msg
-} {0 0}
-
-test tree.132 {tree0 is before 0 0} {
-    list [catch {tree0 is before 0 0} msg] $msg
-} {0 0}
-
-test tree.133 {tree0 is before root 0} {
-    list [catch {tree0 is before root 0} msg] $msg
-} {0 0}
-
-test tree.134 {tree0 is before 0 all} {
-    list [catch {tree0 is before 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.135 {tree0 is ancestor} {
-    list [catch {tree0 is ancestor} msg] $msg
-} {1 {wrong # args: should be "tree0 is ancestor node1 node2"}}
-
-test tree.136 {tree0 is ancestor 0 12 20} {
-    list [catch {tree0 is ancestor 0 12 20} msg] $msg
-} {1 {wrong # args: should be "tree0 is ancestor node1 node2"}}
-
-test tree.137 {tree0 is ancestor 0 12} {
-    list [catch {tree0 is ancestor 0 12} msg] $msg
-} {0 1}
-
-test tree.138 {tree0 is ancestor 12 0} {
-    list [catch {tree0 is ancestor 12 0} msg] $msg
-} {0 0}
-
-test tree.139 {tree0 is ancestor 1 2} {
-    list [catch {tree0 is ancestor 1 2} msg] $msg
-} {0 0}
-
-test tree.140 {tree0 is ancestor root 0} {
-    list [catch {tree0 is ancestor root 0} msg] $msg
-} {0 0}
-
-test tree.141 {tree0 is ancestor 0 all} {
-    list [catch {tree0 is ancestor 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.142 {tree0 is root (missing arg)} {
-    list [catch {tree0 is root} msg] $msg
-} {1 {wrong # args: should be "tree0 is root node"}}
-
-test tree.143 {tree0 is root 0 20 (extra arg)} {
-    list [catch {tree0 is root 0 20} msg] $msg
-} {1 {wrong # args: should be "tree0 is root node"}}
-
-test tree.144 {tree0 is root 0} {
-    list [catch {tree0 is root 0} msg] $msg
-} {0 1}
-
-test tree.145 {tree0 is root 12} {
-    list [catch {tree0 is root 12} msg] $msg
-} {0 0}
-
-test tree.146 {tree0 is root 1} {
-    list [catch {tree0 is root 1} msg] $msg
-} {0 0}
-
-test tree.147 {tree0 is root root} {
-    list [catch {tree0 is root root} msg] $msg
-} {0 1}
-
-test tree.148 {tree0 is root all} {
-    list [catch {tree0 is root all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.149 {tree0 is leaf (missing arg)} {
-    list [catch {tree0 is leaf} msg] $msg
-} {1 {wrong # args: should be "tree0 is leaf node"}}
-
-test tree.150 {tree0 is leaf 0 20 (extra arg)} {
-    list [catch {tree0 is leaf 0 20} msg] $msg
-} {1 {wrong # args: should be "tree0 is leaf node"}}
-
-test tree.151 {tree0 is leaf 0} {
-    list [catch {tree0 is leaf 0} msg] $msg
-} {0 0}
-
-test tree.152 {tree0 is leaf 12} {
-    list [catch {tree0 is leaf 12} msg] $msg
-} {0 1}
-
-test tree.153 {tree0 is leaf 1} {
-    list [catch {tree0 is leaf 1} msg] $msg
-} {0 0}
-
-test tree.154 {tree0 is leaf root} {
-    list [catch {tree0 is leaf root} msg] $msg
-} {0 0}
-
-test tree.155 {tree0 is leaf all} {
-    list [catch {tree0 is leaf all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.156 {tree0 is leaf 1000} {
-    list [catch {tree0 is leaf 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::tree0}}
-
-test tree.157 {tree0 is leaf badTag} {
-    list [catch {tree0 is leaf badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::tree0}}
-
-test tree.158 {tree0 set (missing arg)} {
-    list [catch {tree0 set} msg] $msg
-} {1 {wrong # args: should be "tree0 set node ?key value...?"}}
-
-test tree.159 {tree0 set 0 (missing arg)} {
-    list [catch {tree0 set 0} msg] $msg
-} {0 {}}
-
-test tree.160 {tree0 set 0 key (missing arg)} {
-    list [catch {tree0 set 0 key} msg] $msg
-} {1 {missing value for field "key"}}
-
-test tree.161 {tree0 set 0 key value} {
-    list [catch {tree0 set 0 key value} msg] $msg
-} {0 {}}
-
-test tree.162 {tree0 set 0 key1 value1 key2 value2 key3 value3} {
-    list [catch {tree0 set 0 key1 value1 key2 value2 key3 value3} msg] $msg
-} {0 {}}
-
-test tree.163 {tree0 set 0 key1 value1 key2 (missing arg)} {
-    list [catch {tree0 set 0 key1 value1 key2} msg] $msg
-} {1 {missing value for field "key2"}}
-
-test tree.164 {tree0 set 0 key value} {
-    list [catch {tree0 set 0 key value} msg] $msg
-} {0 {}}
-
-test tree.165 {tree0 set 0 key1 value1 key2 (missing arg)} {
-    list [catch {tree0 set 0 key1 value1 key2} msg] $msg
-} {1 {missing value for field "key2"}}
-
-test tree.166 {tree0 set all} {
-    list [catch {tree0 set all} msg] $msg
-} {0 {}}
-
-test tree.167 {tree0 set all abc 123} {
-    list [catch {tree0 set all abc 123} msg] $msg
-} {0 {}}
-
-test tree.168 {tree0 set root} {
-    list [catch {tree0 set root} msg] $msg
-} {0 {}}
-
-test tree.169 {tree0 restore stuff} {
-    list [catch {
-	set data [tree0 dump root]
-	blt::tree create
-	tree1 restore root $data
-	set data [tree1 dump root]
-	blt::tree destroy tree1
-	set data
-	} msg] $msg
-} {0 {-1 0 {{}} {key value key1 value1 key2 value2 key3 value3 abc 123} {}
-0 1 {{} node1} {abc 123} {}
-1 9 {{} node1 node9} {abc 123} {thisTag}
-1 11 {{} node1 node11} {key value abc 123} {}
-1 12 {{} node1 node12} {key1 value1 key2 value2 abc 123} {}
-0 2 {{} node2} {abc 123} {}
-0 3 {{} node3} {abc 123} {}
-0 4 {{} node4} {abc 123} {}
-0 5 {{} node5} {abc 123} {myTag}
-5 13 {{} node5 node13} {abc 123} {}
-0 6 {{} node6} {abc 123} {myTag2 myTag1}
-0 8 {{} myLabel} {abc 123} {thisTag}
-}}
-
-test tree.170 {tree0 restorefile 0 test.dump} {
-    list [catch {
-	blt::tree create
-	tree1 restorefile root test.dump
-	set data [tree1 dump root]
-	blt::tree destroy tree1
-	file delete test.dump
-	set data
-	} msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 1 {{} node1} {} {}
-1 9 {{} node1 node9} {} {thisTag}
-1 11 {{} node1 node11} {key value} {}
-1 12 {{} node1 node12} {key1 value1 key2 value2} {}
-0 2 {{} node2} {} {}
-0 3 {{} node3} {} {}
-0 4 {{} node4} {} {}
-0 5 {{} node5} {} {myTag}
-5 13 {{} node5 node13} {} {}
-0 6 {{} node6} {} {myTag2 myTag1}
-0 8 {{} myLabel} {} {thisTag}
-}}
-
-
-test tree.171 {tree0 unset 0 key1} {
-    list [catch {tree0 unset 0 key1} msg] $msg
-} {0 {}}
-
-test tree.172 {tree0 get 0} {
-    list [catch {tree0 get 0} msg] $msg
-} {0 {key value key2 value2 key3 value3 abc 123}}
-
-test tree.173 {tree0 unset 0 key2 key3} {
-    list [catch {tree0 unset 0 key2 key3} msg] $msg
-} {0 {}}
-
-test tree.174 {tree0 get 0} {
-    list [catch {tree0 get 0} msg] $msg
-} {0 {key value abc 123}}
-
-test tree.175 {tree0 unset 0} {
-    list [catch {tree0 unset 0} msg] $msg
-} {0 {}}
-
-test tree.176 {tree0 get 0} {
-    list [catch {tree0 get 0} msg] $msg
-} {0 {}}
-
-test tree.177 {tree0 unset all abc} {
-    list [catch {tree0 unset all abc} msg] $msg
-} {0 {}}
-
-test tree.178 {tree0 restore stuff} {
-    list [catch {
-	set data [tree0 dump root]
-	blt::tree create tree1
-	tree1 restore root $data
-	set data [tree1 dump root]
-	blt::tree destroy tree1
-	set data
-	} msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 1 {{} node1} {} {}
-1 9 {{} node1 node9} {} {thisTag}
-1 11 {{} node1 node11} {key value} {}
-1 12 {{} node1 node12} {key1 value1 key2 value2} {}
-0 2 {{} node2} {} {}
-0 3 {{} node3} {} {}
-0 4 {{} node4} {} {}
-0 5 {{} node5} {} {myTag}
-5 13 {{} node5 node13} {} {}
-0 6 {{} node6} {} {myTag2 myTag1}
-0 8 {{} myLabel} {} {thisTag}
-}}
-
-test tree.179 {tree0 restore (missing arg)} {
-    list [catch {tree0 restore} msg] $msg
-} {1 {wrong # args: should be "tree0 restore node data ?switches?"}}
-
-test tree.180 {tree0 restore 0 badString} {
-    list [catch {tree0 restore 0 badString} msg] $msg
-} {1 {line #1: wrong # elements in restore entry}}
-
-test tree.181 {tree0 restore 0 {} arg (extra arg)} {
-    list [catch {tree0 restore 0 {} arg} msg] $msg
-} {1 {unknown switch "arg"
-following switches are available:
-   -notags 
-   -overwrite }}
-
-
-test tree.182 {tree0 size (missing arg)} {
-    list [catch {tree0 size} msg] $msg
-} {1 {wrong # args: should be "tree0 size node"}}
-
-test tree.183 {tree0 size 0} {
-    list [catch {tree0 size 0} msg] $msg
-} {0 12}
-
-test tree.184 {tree0 size all} {
-    list [catch {tree0 size all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.185 {tree0 size 0 10 (extra arg)} {
-    list [catch {tree0 size 0 10} msg] $msg
-} {1 {wrong # args: should be "tree0 size node"}}
-
-test tree.186 {tree0 delete (missing arg)} {
-    list [catch {tree0 delete} msg] $msg
-} {1 {wrong # args: should be "tree0 delete node ?node...?"}}
-
-test tree.187 {tree0 delete 11} {
-    list [catch {tree0 delete 11} msg] $msg
-} {0 {}}
-
-test tree.188 {tree0 delete 11} {
-    list [catch {tree0 delete 11} msg] $msg
-} {1 {can't find tag or id "11" in ::tree0}}
-
-test tree.189 {tree0 delete 9 12} {
-    list [catch {tree0 delete 9 12} msg] $msg
-} {0 {}}
-
-test tree.190 {tree0 dump 0} {
-    list [catch {tree0 dump 0} msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 1 {{} node1} {} {}
-0 2 {{} node2} {} {}
-0 3 {{} node3} {} {}
-0 4 {{} node4} {} {}
-0 5 {{} node5} {} {myTag}
-5 13 {{} node5 node13} {} {}
-0 6 {{} node6} {} {myTag2 myTag1}
-0 8 {{} myLabel} {} {thisTag}
-}}
-
-test tree.191 {delete all} {
-    list [catch {
-	set data [tree0 dump root]
-	blt::tree create
-	tree1 restore root $data
-	tree1 delete all
-	set data [tree1 dump root]
-	blt::tree destroy tree1
-	set data
-	} msg] $msg
-} {0 {-1 0 {{}} {} {}
-}}
-
-test tree.192 {delete all all} {
-    list [catch {
-	set data [tree0 dump root]
-	blt::tree create
-	tree1 restore root $data
-	tree1 delete all all
-	set data [tree1 dump root]
-	blt::tree destroy tree1
-	set data
-	} msg] $msg
-} {0 {-1 0 {{}} {} {}
-}}
-
-test tree.193 {tree0 apply (missing arg)} {
-    list [catch {tree0 apply} msg] $msg
-} {1 {wrong # args: should be "tree0 apply node ?switches?"}}
-
-test tree.194 {tree0 apply 0} {
-    list [catch {tree0 apply 0} msg] $msg
-} {0 {}}
-
-test tree.195 {tree0 apply 0 -badSwitch} {
-    list [catch {tree0 apply 0 -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -precommand command
-   -postcommand command
-   -depth number
-   -exact string
-   -glob pattern
-   -invert 
-   -key pattern
-   -keyexact string
-   -keyglob pattern
-   -keyregexp pattern
-   -leafonly 
-   -nocase 
-   -path 
-   -regexp pattern
-   -tag {?tag?...}}}
-
-
-test tree.196 {tree0 apply badTag} {
-    list [catch {tree0 apply badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::tree0}}
-
-test tree.197 {tree0 apply all} {
-    list [catch {tree0 apply all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.198 {tree0 apply myTag -precommand lappend} {
-    list [catch {
-	set mylist {}
-	tree0 apply myTag -precommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {5 13}}
-
-test tree.199 {tree0 apply root -precommand lappend} {
-    list [catch {
-	set mylist {}
-	tree0 apply root -precommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {0 1 2 3 4 5 13 6 8}}
-
-test tree.200 {tree0 apply -precommand -postcommand} {
-    list [catch {
-	set mylist {}
-	tree0 apply root -precommand {lappend mylist} \
-		-postcommand {lappend mylist}
-	set mylist
-    } msg] $msg
-} {0 {0 1 1 2 2 3 3 4 4 5 13 13 5 6 6 8 8 0}}
-
-test tree.201 {tree0 apply root -precommand lappend -depth 1} {
-    list [catch {
-	set mylist {}
-	tree0 apply root -precommand {lappend mylist} -depth 1
-	set mylist
-    } msg] $msg
-} {0 {0 1 2 3 4 5 6 8}}
-
-
-test tree.202 {tree0 apply root -precommand -depth 0} {
-    list [catch {
-	set mylist {}
-	tree0 apply root -precommand {lappend mylist} -depth 0
-	set mylist
-    } msg] $msg
-} {0 0}
-
-test tree.203 {tree0 apply root -precommand -tag myTag} {
-    list [catch {
-	set mylist {}
-	tree0 apply root -precommand {lappend mylist} -tag myTag
-	set mylist
-    } msg] $msg
-} {0 5}
-
-
-test tree.204 {tree0 apply root -precommand -key key1} {
-    list [catch {
-	set mylist {}
-	tree0 set myTag key1 0.0
-	tree0 apply root -precommand {lappend mylist} -key key1
-	tree0 unset myTag key1
-	set mylist
-    } msg] $msg
-} {0 5}
-
-test tree.205 {tree0 apply root -postcommand -regexp node.*} {
-    list [catch {
-	set mylist {}
-	tree0 set myTag key1 0.0
-	tree0 apply root -precommand {lappend mylist} -regexp {node5} 
-	tree0 unset myTag key1
-	set mylist
-    } msg] $msg
-} {0 5}
-
-test tree.206 {tree0 find (missing arg)} {
-    list [catch {tree0 find} msg] $msg
-} {1 {wrong # args: should be "tree0 find node ?switches?"}}
-
-test tree.207 {tree0 find 0} {
-    list [catch {tree0 find 0} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.208 {tree0 find root} {
-    list [catch {tree0 find root} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.209 {tree0 find 0 -glob node*} {
-    list [catch {tree0 find root -glob node*} msg] $msg
-} {0 {1 2 3 4 13 5 6}}
-
-test tree.210 {tree0 find 0 -glob nobody} {
-    list [catch {tree0 find root -glob nobody} msg] $msg
-} {0 {}}
-
-test tree.211 {tree0 find 0 -regexp {node[0-3]}} {
-    list [catch {tree0 find root -regexp {node[0-3]}} msg] $msg
-} {0 {1 2 3 13}}
-
-test tree.212 {tree0 find 0 -regexp {.*[A-Z].*}} {
-    list [catch {tree0 find root -regexp {.*[A-Z].*}} msg] $msg
-} {0 8}
-
-test tree.213 {tree0 find 0 -exact myLabel} {
-    list [catch {tree0 find root -exact myLabel} msg] $msg
-} {0 8}
-
-test tree.214 {tree0 find 0 -exact myLabel -invert} {
-    list [catch {tree0 find root -exact myLabel -invert} msg] $msg
-} {0 {1 2 3 4 13 5 6 0}}
-
-
-test tree.215 {tree0 find 3 -exact node3} {
-    list [catch {tree0 find 3 -exact node3} msg] $msg
-} {0 3}
-
-test tree.216 {tree0 find 0 -nocase -exact mylabel} {
-    list [catch {tree0 find 0 -nocase -exact mylabel} msg] $msg
-} {0 8}
-
-test tree.217 {tree0 find 0 -nocase} {
-    list [catch {tree0 find 0 -nocase} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.218 {tree0 find 0 -path -nocase -glob *node1* } {
-    list [catch {tree0 find 0 -path -nocase -glob *node1*} msg] $msg
-} {0 {1 13}}
-
-test tree.219 {tree0 find 0 -count 5 } {
-    list [catch {tree0 find 0 -count 5} msg] $msg
-} {0 {1 2 3 4 13}}
-
-test tree.220 {tree0 find 0 -count -5 } {
-    list [catch {tree0 find 0 -count -5} msg] $msg
-} {1 {bad value "-5": can't be negative}}
-
-test tree.221 {tree0 find 0 -count badValue } {
-    list [catch {tree0 find 0 -count badValue} msg] $msg
-} {1 {expected integer but got "badValue"}}
-
-test tree.222 {tree0 find 0 -count badValue } {
-    list [catch {tree0 find 0 -count badValue} msg] $msg
-} {1 {expected integer but got "badValue"}}
-
-test tree.223 {tree0 find 0 -leafonly} {
-    list [catch {tree0 find 0 -leafonly} msg] $msg
-} {0 {1 2 3 4 13 6 8}}
-
-test tree.224 {tree0 find 0 -leafonly -glob {node[18]}} {
-    list [catch {tree0 find 0 -glob {node[18]} -leafonly} msg] $msg
-} {0 1}
-
-test tree.225 {tree0 find 0 -depth 0} {
-    list [catch {tree0 find 0 -depth 0} msg] $msg
-} {0 0}
-
-test tree.226 {tree0 find 0 -depth 1} {
-    list [catch {tree0 find 0 -depth 1} msg] $msg
-} {0 {1 2 3 4 5 6 8 0}}
-
-test tree.227 {tree0 find 0 -depth 2} {
-    list [catch {tree0 find 0 -depth 2} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.228 {tree0 find 0 -depth 20} {
-    list [catch {tree0 find 0 -depth 20} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.229 {tree0 find 1 -depth 0} {
-    list [catch {tree0 find 1 -depth 0} msg] $msg
-} {0 1}
-
-test tree.230 {tree0 find 1 -depth 1} {
-    list [catch {tree0 find 1 -depth 1} msg] $msg
-} {0 1}
-
-test tree.231 {tree0 find 1 -depth 2} {
-    list [catch {tree0 find 1 -depth 2} msg] $msg
-} {0 1}
-
-test tree.232 {tree0 find all} {
-    list [catch {tree0 find all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.233 {tree0 find badTag} {
-    list [catch {tree0 find badTag} msg] $msg
-} {1 {can't find tag or id "badTag" in ::tree0}}
-
-test tree.234 {tree0 find 0 -addtag hi} {
-    list [catch {tree0 find 0 -addtag hi} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.235 {tree0 find 0 -addtag all} {
-    list [catch {tree0 find 0 -addtag all} msg] $msg
-} {0 {1 2 3 4 13 5 6 8 0}}
-
-test tree.236 {tree0 find 0 -addtag root} {
-    list [catch {tree0 find 0 -addtag root} msg] $msg
-} {1 {can't add reserved tag "root"}}
-
-test tree.237 {tree0 find 0 -exec {lappend list} -leafonly} {
-    list [catch {
-	set list {}
-	tree0 find 0 -exec {lappend list} -leafonly
-	set list
-	} msg] $msg
-} {0 {1 2 3 4 13 6 8}}
-
-test tree.238 {tree0 find 0 -tag root} {
-    list [catch {tree0 find 0 -tag root} msg] $msg
-} {0 0}
-
-test tree.239 {tree0 find 0 -tag myTag} {
-    list [catch {tree0 find 0 -tag myTag} msg] $msg
-} {0 5}
-
-test tree.240 {tree0 find 0 -tag badTag} {
-    list [catch {tree0 find 0 -tag badTag} msg] $msg
-} {0 {}}
-
-test tree.241 {tree0 tag (missing args)} {
-    list [catch {tree0 tag} msg] $msg
-} {1 {wrong # args: should be "tree0 tag args..."}}
-
-test tree.242 {tree0 tag badOp} {
-    list [catch {tree0 tag badOp} msg] $msg
-} {1 {bad operation "badOp": should be one of...
-  tree0 tag add tag ?node...?
-  tree0 tag delete tag node...
-  tree0 tag dump tag...
-  tree0 tag exists tag ?node?
-  tree0 tag forget tag...
-  tree0 tag get node ?pattern...?
-  tree0 tag names ?node...?
-  tree0 tag nodes tag ?tag...?
-  tree0 tag set node tag...
-  tree0 tag unset node tag...}}
-
-test tree.243 {tree0 tag add} {
-    list [catch {tree0 tag add} msg] $msg
-} {1 {wrong # args: should be "tree0 tag add tag ?node...?"}}
-
-test tree.244 {tree0 tag add newTag} {
-    list [catch {tree0 tag add newTag} msg] $msg
-} {0 {}}
-
-test tree.245 {tree0 tag add tag badNode} {
-    list [catch {tree0 tag add tag badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::tree0}}
-
-test tree.246 {tree0 tag add newTag root} {
-    list [catch {tree0 tag add newTag root} msg] $msg
-} {0 {}}
-
-test tree.247 {tree0 tag add newTag all} {
-    list [catch {tree0 tag add newTag all} msg] $msg
-} {0 {}}
-
-test tree.248 {tree0 tag add tag2 0 1 2 3 4} {
-    list [catch {tree0 tag add tag2 0 1 2 3 4} msg] $msg
-} {0 {}}
-
-test tree.248 {tree0 tag exists tag2} {
-    list [catch {tree0 tag exists tag2} msg] $msg
-} {0 1}
-
-test tree.248 {tree0 tag exists tag2 0} {
-    list [catch {tree0 tag exists tag2 0} msg] $msg
-} {0 1}
-
-test tree.248 {tree0 tag exists tag2 5} {
-    list [catch {tree0 tag exists tag2 5} msg] $msg
-} {0 0}
-
-test tree.248 {tree0 tag exists badTag} {
-    list [catch {tree0 tag exists badTag} msg] $msg
-} {0 0}
-
-test tree.248 {tree0 tag exists badTag 1000} {
-    list [catch {tree0 tag exists badTag 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::tree0}}
-
-test tree.249 {tree0 tag add tag2 0 1 2 3 4 1000} {
-    list [catch {tree0 tag add tag2 0 1 2 3 4 1000} msg] $msg
-} {1 {can't find tag or id "1000" in ::tree0}}
-
-test tree.250 {tree0 tag names} {
-    list [catch {tree0 tag names} msg] [lsort $msg]
-} {0 {all hi myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test tree.251 {tree0 tag names badNode} {
-    list [catch {tree0 tag names badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::tree0}}
-
-test tree.252 {tree0 tag names all} {
-    list [catch {tree0 tag names all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.253 {tree0 tag names root} {
-    list [catch {tree0 tag names root} msg] [lsort $msg]
-} {0 {all hi newTag root tag2}}
-
-test tree.254 {tree0 tag names 0 1} {
-    list [catch {tree0 tag names 0 1} msg] [lsort $msg]
-} {0 {all hi newTag root tag2}}
-
-test tree.255 {tree0 tag nodes (missing arg)} {
-    list [catch {tree0 tag nodes} msg] $msg
-} {1 {wrong # args: should be "tree0 tag nodes tag ?tag...?"}}
-
-test tree.256 {tree0 tag nodes root badTag} {
-    list [catch {tree0 tag nodes root badTag} msg] $msg
-} {1 {can't find a tag "badTag"}}
-
-test tree.257 {tree0 tag nodes root tag2} {
-    list [catch {tree0 tag nodes root tag2} msg] [lsort $msg]
-} {0 {0 1 2 3 4}}
-
-test tree.258 {tree0 ancestor (missing arg)} {
-    list [catch {tree0 ancestor} msg] $msg
-} {1 {wrong # args: should be "tree0 ancestor node1 node2"}}
-
-test tree.259 {tree0 ancestor 0 (missing arg)} {
-    list [catch {tree0 ancestor 0} msg] $msg
-} {1 {wrong # args: should be "tree0 ancestor node1 node2"}}
-
-test tree.260 {tree0 ancestor 0 10} {
-    list [catch {tree0 ancestor 0 10} msg] $msg
-} {1 {can't find tag or id "10" in ::tree0}}
-
-test tree.261 {tree0 ancestor 0 4} {
-    list [catch {tree0 ancestor 0 4} msg] $msg
-} {0 0}
-
-test tree.262 {tree0 ancestor 1 8} {
-    list [catch {tree0 ancestor 1 8} msg] $msg
-} {0 0}
-
-test tree.263 {tree0 ancestor root 0} {
-    list [catch {tree0 ancestor root 0} msg] $msg
-} {0 0}
-
-test tree.264 {tree0 ancestor 8 8} {
-    list [catch {tree0 ancestor 8 8} msg] $msg
-} {0 8}
-
-test tree.265 {tree0 ancestor 0 all} {
-    list [catch {tree0 ancestor 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.266 {tree0 ancestor 7 9} {
-    list [catch {
-	set n1 1; set n2 1;
-	for { set i 0 } { $i < 4 } { incr i } {
-	    set n1 [tree0 insert $n1]
-	    set n2 [tree0 insert $n2]
-	}
-	tree0 ancestor $n1 $n2
-	} msg] $msg
-} {0 1}
-
-test tree.267 {tree0 path (missing arg)} {
-    list [catch {tree0 path} msg] $msg
-} {1 {wrong # args: should be "tree0 path node"}}
-
-test tree.268 {tree0 path root} {
-    list [catch {tree0 path root} msg] $msg
-} {0 {}}
-
-test tree.269 {tree0 path 0} {
-    list [catch {tree0 path 0} msg] $msg
-} {0 {}}
-
-test tree.270 {tree0 path 15} {
-    list [catch {tree0 path 15} msg] $msg
-} {0 {node1 node15}}
-
-test tree.271 {tree0 path all} {
-    list [catch {tree0 path all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.272 {tree0 path 0 1 2 4 (extra args)} {
-    list [catch {tree0 path 0 1 2 4} msg] $msg
-} {1 {wrong # args: should be "tree0 path node"}}
-
-test tree.273 {tree0 tag forget} {
-    list [catch {tree0 tag forget} msg] $msg
-} {1 {wrong # args: should be "tree0 tag forget tag..."}}
-
-test tree.274 {tree0 tag forget badTag} {
-    list [catch {
-	tree0 tag forget badTag
-	lsort [tree0 tag names]
-    } msg] $msg
-} {0 {all hi myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test tree.275 {tree0 tag forget hi} {
-    list [catch {
-	tree0 tag forget hi
-	lsort [tree0 tag names]
-    } msg] $msg
-} {0 {all myTag myTag1 myTag2 newTag root tag2 thisTag}}
-
-test tree.276 {tree0 tag forget tag1 tag2} {
-    list [catch {
-	tree0 tag forget myTag1 myTag2
-	lsort [tree0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test tree.277 {tree0 tag forget all} {
-    list [catch {
-	tree0 tag forget all
-	lsort [tree0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test tree.278 {tree0 tag forget root} {
-    list [catch {
-	tree0 tag forget root
-	lsort [tree0 tag names]
-    } msg] $msg
-} {0 {all myTag newTag root tag2 thisTag}}
-
-test tree.279 {tree0 tag delete} {
-    list [catch {tree0 tag delete} msg] $msg
-} {1 {wrong # args: should be "tree0 tag delete tag node..."}}
-
-test tree.280 {tree0 tag delete tag} {
-    list [catch {tree0 tag delete tag} msg] $msg
-} {1 {wrong # args: should be "tree0 tag delete tag node..."}}
-
-test tree.281 {tree0 tag delete tag 0} {
-    list [catch {tree0 tag delete tag 0} msg] $msg
-} {0 {}}
-
-test tree.282 {tree0 tag delete root 0} {
-    list [catch {tree0 tag delete root 0} msg] $msg
-} {1 {can't delete reserved tag "root"}}
-
-test tree.283 {tree0 move} {
-    list [catch {tree0 move} msg] $msg
-} {1 {wrong # args: should be "tree0 move node newParent ?switches?"}}
-
-test tree.284 {tree0 move 0} {
-    list [catch {tree0 move 0} msg] $msg
-} {1 {wrong # args: should be "tree0 move node newParent ?switches?"}}
-
-test tree.285 {tree0 move 0 0} {
-    list [catch {tree0 move 0 0} msg] $msg
-} {1 {can't move root node}}
-
-test tree.286 {tree0 move 0 badNode} {
-    list [catch {tree0 move 0 badNode} msg] $msg
-} {1 {can't find tag or id "badNode" in ::tree0}}
-
-test tree.287 {tree0 move 0 all} {
-    list [catch {tree0 move 0 all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.288 {tree0 move 1 0 -before 2} {
-    list [catch {
-	tree0 move 1 0 -before 2
-	tree0 children 0
-    } msg] $msg
-} {0 {1 2 3 4 5 6 8}}
-
-test tree.289 {tree0 move 1 0 -after 2} {
-    list [catch {
-	tree0 move 1 0 -after 2
-	tree0 children 0
-    } msg] $msg
-} {0 {2 1 3 4 5 6 8}}
-
-test tree.290 {tree0 move 1 2} {
-    list [catch {
-	tree0 move 1 2
-	tree0 children 0
-    } msg] $msg
-} {0 {2 3 4 5 6 8}}
-
-test tree.291 {tree0 move 0 2} {
-    list [catch {tree0 move 0 2} msg] $msg
-} {1 {can't move root node}}
-
-test tree.292 {tree0 move 1 17} {
-    list [catch {tree0 move 1 17} msg] $msg
-} {1 {can't move node: "1" is an ancestor of "17"}}
-
-test tree.293 {tree0 attach} {
-    list [catch {tree0 attach} msg] $msg
-} {1 {wrong # args: should be "tree0 attach tree ?switches?"}}
-
-test tree.294 {tree0 attach tree2 badArg} {
-    list [catch {tree0 attach tree2 badArg} msg] $msg
-} {1 {unknown switch "badArg"
-following switches are available:
-   -newtags }}
-
-
-test tree.295 {tree1 attach tree0 -newtags} {
-    list [catch {
-	blt::tree create
-	tree1 attach tree0 -newtags
-	tree1 dump 0
-	} msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 2 {{} node2} {} {}
-2 1 {{} node2 node1} {} {}
-1 14 {{} node2 node1 node14} {} {}
-14 16 {{} node2 node1 node14 node16} {} {}
-16 18 {{} node2 node1 node14 node16 node18} {} {}
-18 20 {{} node2 node1 node14 node16 node18 node20} {} {}
-1 15 {{} node2 node1 node15} {} {}
-15 17 {{} node2 node1 node15 node17} {} {}
-17 19 {{} node2 node1 node15 node17 node19} {} {}
-19 21 {{} node2 node1 node15 node17 node19 node21} {} {}
-0 3 {{} node3} {} {}
-0 4 {{} node4} {} {}
-0 5 {{} node5} {} {}
-5 13 {{} node5 node13} {} {}
-0 6 {{} node6} {} {}
-0 8 {{} myLabel} {} {}
-}}
-
-test tree.296 {tree1 attach tree0} {
-    list [catch {
-	blt::tree create
-	tree1 attach tree0
-	tree1 dump 0
-	} msg] $msg
-} {0 {-1 0 {{}} {} {tag2 newTag}
-0 2 {{} node2} {} {tag2 newTag}
-2 1 {{} node2 node1} {} {tag2 newTag}
-1 14 {{} node2 node1 node14} {} {}
-14 16 {{} node2 node1 node14 node16} {} {}
-16 18 {{} node2 node1 node14 node16 node18} {} {}
-18 20 {{} node2 node1 node14 node16 node18 node20} {} {}
-1 15 {{} node2 node1 node15} {} {}
-15 17 {{} node2 node1 node15 node17} {} {}
-17 19 {{} node2 node1 node15 node17 node19} {} {}
-19 21 {{} node2 node1 node15 node17 node19 node21} {} {}
-0 3 {{} node3} {} {tag2 newTag}
-0 4 {{} node4} {} {tag2 newTag}
-0 5 {{} node5} {} {newTag myTag}
-5 13 {{} node5 node13} {} {newTag}
-0 6 {{} node6} {} {newTag}
-0 8 {{} myLabel} {} {thisTag newTag}
-}}
-
-test tree.297 {tree1 attach ""} {
-    list [catch {tree1 attach ""} msg] $msg
-} {0 {}}
-
-
-test tree.298 {blt::tree destroy tree1} {
-    list [catch {blt::tree destroy tree1} msg] $msg
-} {0 {}}
-
-test tree.299 {tree0 find root -badSwitch} {
-    list [catch {tree0 find root -badSwitch} msg] $msg
-} {1 {unknown switch "-badSwitch"
-following switches are available:
-   -addtag tagName
-   -count number
-   -depth number
-   -exact string
-   -excludes nodes
-   -exec command
-   -glob pattern
-   -invert 
-   -key string
-   -keyexact string
-   -keyglob pattern
-   -keyregexp pattern
-   -leafonly 
-   -nocase 
-   -order order
-   -path 
-   -regexp pattern
-   -tag {?tag?...}}}
-
-
-test tree.300 {tree0 find root -order} {
-    list [catch {tree0 find root -order} msg] $msg
-} {1 {value for "-order" missing}}
-
-test tree.301 {tree0 find root ...} {
-    list [catch {tree0 find root -order preorder -order postorder -order inorder} msg] $msg
-} {0 {20 18 16 14 1 21 19 17 15 2 0 3 4 13 5 6 8}}
-
-test tree.302 {tree0 find root -order preorder} {
-    list [catch {tree0 find root -order preorder} msg] $msg
-} {0 {0 2 1 14 16 18 20 15 17 19 21 3 4 5 13 6 8}}
-
-test tree.303 {tree0 find root -order postorder} {
-    list [catch {tree0 find root -order postorder} msg] $msg
-} {0 {20 18 16 14 21 19 17 15 1 2 3 4 13 5 6 8 0}}
-
-test tree.304 {tree0 find root -order inorder} {
-    list [catch {tree0 find root -order inorder} msg] $msg
-} {0 {20 18 16 14 1 21 19 17 15 2 0 3 4 13 5 6 8}}
-
-test tree.305 {tree0 find root -order breadthfirst} {
-    list [catch {tree0 find root -order breadthfirst} msg] $msg
-} {0 {0 2 3 4 5 6 8 1 13 14 15 16 17 18 19 20 21}}
-
-test tree.306 {tree0 set all key1 myValue} {
-    list [catch {tree0 set all key1 myValue} msg] $msg
-} {0 {}}
-
-test tree.307 {tree0 set 15 key1 123} {
-    list [catch {tree0 set 15 key1 123} msg] $msg
-} {0 {}}
-
-test tree.308 {tree0 set 16 key1 1234 key2 abc} {
-    list [catch {tree0 set 16 key1 123 key2 abc} msg] $msg
-} {0 {}}
-
-test tree.309 {tree0 find root -key } {
-    list [catch {tree0 find root -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test tree.310 {tree0 find root -key noKey} {
-    list [catch {tree0 find root -key noKey} msg] $msg
-} {0 {}}
-
-test tree.311 {tree0 find root -key key1} {
-    list [catch {tree0 find root -key key1} msg] $msg
-} {0 {20 18 16 14 21 19 17 15 1 2 3 4 13 5 6 8 0}}
-
-test tree.312 {tree0 find root -key key2} {
-    list [catch {tree0 find root -key key2} msg] $msg
-} {0 16}
-
-test tree.313 {tree0 find root -key key2 -exact notThere } {
-    list [catch {tree0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test tree.314 {tree0 find root -key key1 -glob notThere } {
-    list [catch {tree0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test tree.315 {tree0 find root -key badKey -regexp notThere } {
-    list [catch {tree0 find root -key key2 -exact notThere } msg] $msg
-} {0 {}}
-
-test tree.316 {tree0 find root -key key1 -glob 12*} {
-    list [catch {tree0 find root -key key1 -glob 12*} msg] $msg
-} {0 {16 15}}
-
-test tree.317 {tree0 sort} {
-    list [catch {tree0 sort} msg] $msg
-} {1 {wrong # args: should be "tree0 sort node ?flags...?"}}
-
-test tree.318 {tree0 sort all} {
-    list [catch {tree0 sort all} msg] $msg
-} {1 {more than one node tagged as "all"}}
-
-test tree.319 {tree0 sort -recurse} {
-    list [catch {tree0 sort -recurse} msg] $msg
-} {1 {can't find tag or id "-recurse" in ::tree0}}
-
-test tree.320 {tree0 sort 0} {
-    list [catch {tree0 sort 0} msg] $msg
-} {0 {8 2 3 4 5 6}}
-
-test tree.321 {tree0 sort 0 -recurse} {
-    list [catch {tree0 sort 0 -recurse} msg] $msg
-} {0 {0 8 1 2 3 4 5 6 13 14 15 16 17 18 19 20 21}}
-
-test tree.322 {tree0 sort 0 -decreasing -key} {
-    list [catch {tree0 sort 0 -decreasing -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test tree.323 {tree0 sort 0 -re} {
-    list [catch {tree0 sort 0 -re} msg] $msg
-} {1 {ambiguous switch "-re"
-following switches are available:
-   -ascii 
-   -command command
-   -decreasing 
-   -dictionary 
-   -integer 
-   -key string
-   -path 
-   -real 
-   -recurse 
-   -reorder }}
-
-
-test tree.324 {tree0 sort 0 -decreasing} {
-    list [catch {tree0 sort 0 -decreasing} msg] $msg
-} {0 {6 5 4 3 2 8}}
-
-test tree.325 {tree0 sort 0} {
-    list [catch {
-	set list {}
-	foreach n [tree0 sort 0] {
-	    lappend list [tree0 label $n]
-	}	
-	set list
-    } msg] $msg
-} {0 {myLabel node2 node3 node4 node5 node6}}
-
-test tree.326 {tree0 sort 0 -decreasing} {
-    list [catch {tree0 sort 0 -decreasing} msg] $msg
-} {0 {6 5 4 3 2 8}}
-
-
-test tree.327 {tree0 sort 0 -decreasing -key} {
-    list [catch {tree0 sort 0 -decreasing -key} msg] $msg
-} {1 {value for "-key" missing}}
-
-test tree.328 {tree0 sort 0 -decreasing -key key1} {
-    list [catch {tree0 sort 0 -decreasing -key key1} msg] $msg
-} {0 {8 6 5 4 3 2}}
-
-test tree.329 {tree0 sort 0 -decreasing -recurse -key key1} {
-    list [catch {tree0 sort 0 -decreasing -recurse -key key1} msg] $msg
-} {0 {15 16 0 1 2 3 4 5 6 8 13 14 17 18 19 20 21}}
-
-test tree.330 {tree0 sort 0 -decreasing -key key1} {
-    list [catch {
-	set list {}
-	foreach n [tree0 sort 0 -decreasing -key key1] {
-	    lappend list [tree0 get $n key1]
-	}
-	set list
-    } msg] $msg
-} {0 {myValue myValue myValue myValue myValue myValue}}
-
-
-test tree.331 {tree0 index 1->firstchild} {
-    list [catch {tree0 index 1->firstchild} msg] $msg
-} {0 14}
-
-test tree.332 {tree0 index root->firstchild} {
-    list [catch {tree0 index root->firstchild} msg] $msg
-} {0 2}
-
-test tree.333 {tree0 label root->parent} {
-    list [catch {tree0 label root->parent} msg] $msg
-} {1 {can't find tag or id "root->parent" in ::tree0}}
-
-test tree.334 {tree0 index root->parent} {
-    list [catch {tree0 index root->parent} msg] $msg
-} {0 -1}
-
-test tree.335 {tree0 index root->lastchild} {
-    list [catch {tree0 index root->lastchild} msg] $msg
-} {0 8}
-
-test tree.336 {tree0 index root->next} {
-    list [catch {tree0 index root->next} msg] $msg
-} {0 2}
-
-test tree.337 {tree0 index root->previous} {
-    list [catch {tree0 index root->previous} msg] $msg
-} {0 -1}
-
-test tree.338 {tree0 label root->previous} {
-    list [catch {tree0 label root->previous} msg] $msg
-} {1 {can't find tag or id "root->previous" in ::tree0}}
-
-test tree.339 {tree0 index 1->previous} {
-    list [catch {tree0 index 1->previous} msg] $msg
-} {0 2}
-
-test tree.340 {tree0 label root->badModifier} {
-    list [catch {tree0 label root->badModifier} msg] $msg
-} {1 {can't find tag or id "root->badModifier" in ::tree0}}
-
-test tree.341 {tree0 index root->badModifier} {
-    list [catch {tree0 index root->badModifier} msg] $msg
-} {0 -1}
-
-test tree.342 {tree0 index root->firstchild->parent} {
-    list [catch {tree0 index root->firstchild->parent} msg] $msg
-} {0 0}
-
-test tree.343 {tree0 trace} {
-    list [catch {tree0 trace} msg] $msg
-} {1 {wrong # args: should be one of...
-  tree0 trace create node key how command
-  tree0 trace delete id...
-  tree0 trace info id
-  tree0 trace names }}
-
-
-test tree.344 {tree0 trace create} {
-    list [catch {tree0 trace create} msg] $msg
-} {1 {wrong # args: should be "tree0 trace create node key how command"}}
-
-test tree.345 {tree0 trace create root} {
-    list [catch {tree0 trace create root} msg] $msg
-} {1 {wrong # args: should be "tree0 trace create node key how command"}}
-
-test tree.346 {tree0 trace create root * } {
-    list [catch {tree0 trace create root * } msg] $msg
-} {1 {wrong # args: should be "tree0 trace create node key how command"}}
-
-test tree.347 {tree0 trace create root * rwuc} {
-    list [catch {tree0 trace create root * rwuc} msg] $msg
-} {1 {wrong # args: should be "tree0 trace create node key how command"}}
-
-proc Doit args { global mylist; lappend mylist $args }
-
-test tree.348 {tree0 trace create all newKey rwuc Doit} {
-    list [catch {tree0 trace create all newKey rwuc Doit} msg] $msg
-} {0 trace0}
-
-test tree.349 {tree0 trace info trace0} {
-    list [catch {tree0 trace info trace0} msg] $msg
-} {0 {all newKey {} Doit}}
-
-test tree.350 {test create trace} {
-    list [catch {
-	set mylist {}
-	tree0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {{::tree0 0 newKey wc} {::tree0 2 newKey wc} {::tree0 1 newKey wc} {::tree0 14 newKey wc} {::tree0 16 newKey wc} {::tree0 18 newKey wc} {::tree0 20 newKey wc} {::tree0 15 newKey wc} {::tree0 17 newKey wc} {::tree0 19 newKey wc} {::tree0 21 newKey wc} {::tree0 3 newKey wc} {::tree0 4 newKey wc} {::tree0 5 newKey wc} {::tree0 13 newKey wc} {::tree0 6 newKey wc} {::tree0 8 newKey wc}}}
-
-test tree.351 {test read trace} {
-    list [catch {
-	set mylist {}
-	tree0 get root newKey
-	set mylist
-	} msg] $msg
-} {0 {{::tree0 0 newKey r}}}
-
-test tree.352 {test write trace} {
-    list [catch {
-	set mylist {}
-	tree0 set all newKey 21
-	set mylist
-	} msg] $msg
-} {0 {{::tree0 0 newKey w} {::tree0 2 newKey w} {::tree0 1 newKey w} {::tree0 14 newKey w} {::tree0 16 newKey w} {::tree0 18 newKey w} {::tree0 20 newKey w} {::tree0 15 newKey w} {::tree0 17 newKey w} {::tree0 19 newKey w} {::tree0 21 newKey w} {::tree0 3 newKey w} {::tree0 4 newKey w} {::tree0 5 newKey w} {::tree0 13 newKey w} {::tree0 6 newKey w} {::tree0 8 newKey w}}}
-
-test tree.353 {test unset trace} {
-    list [catch {
-	set mylist {}
-	tree0 set all newKey 21
-	set mylist
-	} msg] $msg
-} {0 {{::tree0 0 newKey w} {::tree0 2 newKey w} {::tree0 1 newKey w} {::tree0 14 newKey w} {::tree0 16 newKey w} {::tree0 18 newKey w} {::tree0 20 newKey w} {::tree0 15 newKey w} {::tree0 17 newKey w} {::tree0 19 newKey w} {::tree0 21 newKey w} {::tree0 3 newKey w} {::tree0 4 newKey w} {::tree0 5 newKey w} {::tree0 13 newKey w} {::tree0 6 newKey w} {::tree0 8 newKey w}}}
-
-test tree.354 {tree0 trace delete} {
-    list [catch {tree0 trace delete} msg] $msg
-} {0 {}}
-
-test tree.355 {tree0 trace delete badId} {
-    list [catch {tree0 trace delete badId} msg] $msg
-} {1 {unknown trace "badId"}}
-
-test tree.356 {tree0 trace delete trace0} {
-    list [catch {tree0 trace delete trace0} msg] $msg
-} {0 {}}
-
-test tree.357 {test create trace} {
-    list [catch {
-	set mylist {}
-	tree0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test tree.358 {test unset trace} {
-    list [catch {
-	set mylist {}
-	tree0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-
-test tree.359 {tree0 notify} {
-    list [catch {tree0 notify} msg] $msg
-} {1 {wrong # args: should be one of...
-  tree0 notify create ?flags? command
-  tree0 notify delete notifyId...
-  tree0 notify info notifyId
-  tree0 notify names }}
-
-
-test tree.360 {tree0 notify create} {
-    list [catch {tree0 notify create} msg] $msg
-} {1 {wrong # args: should be "tree0 notify create ?flags? command"}}
-
-test tree.361 {tree0 notify create -allevents} {
-    list [catch {tree0 notify create -allevents Doit} msg] $msg
-} {0 notify0}
-
-test tree.362 {tree0 notify info notify0} {
-    list [catch {tree0 notify info notify0} msg] $msg
-} {0 {notify0 {-create -delete -move -sort -relabel} {Doit}}}
-
-test tree.363 {tree0 notify info badId} {
-    list [catch {tree0 notify info badId} msg] $msg
-} {1 {unknown notify name "badId"}}
-
-test tree.364 {tree0 notify info} {
-    list [catch {tree0 notify info} msg] $msg
-} {1 {wrong # args: should be "tree0 notify info notifyId"}}
-
-test tree.365 {tree0 notify names} {
-    list [catch {tree0 notify names} msg] $msg
-} {0 notify0}
-
-
-test tree.366 {test create notify} {
-    list [catch {
-	set mylist {}
-	tree0 insert 1 -tags test
-	set mylist
-	} msg] $msg
-} {0 {{-create 22}}}
-
-test tree.367 {test move notify} {
-    list [catch {
-	set mylist {}
-	tree0 move 8 test
-	set mylist
-	} msg] $msg
-} {0 {{-move 8}}}
-
-test tree.368 {test sort notify} {
-    list [catch {
-	set mylist {}
-	tree0 sort 0 -reorder 
-	set mylist
-	} msg] $msg
-} {0 {{-sort 0}}}
-
-test tree.369 {test relabel notify} {
-    list [catch {
-	set mylist {}
-	tree0 label test "newLabel"
-	set mylist
-	} msg] $msg
-} {0 {{-relabel 22}}}
-
-test tree.370 {test delete notify} {
-    list [catch {
-	set mylist {}
-	tree0 delete test
-	set mylist
-	} msg] $msg
-} {0 {{-delete 8} {-delete 22}}}
-
-
-test tree.371 {tree0 notify delete badId} {
-    list [catch {tree0 notify delete badId} msg] $msg
-} {1 {unknown notify name "badId"}}
-
-
-test tree.372 {test create notify} {
-    list [catch {
-	set mylist {}
-	tree0 set all newKey 20
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test tree.373 {test delete notify} {
-    list [catch {
-	set mylist {}
-	tree0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test tree.374 {test delete notify} {
-    list [catch {
-	set mylist {}
-	tree0 unset all newKey
-	set mylist
-	} msg] $msg
-} {0 {}}
-
-test tree.375 {tree0 copy} {
-    list [catch {tree0 copy} msg] $msg
-} {1 {wrong # args: should be "tree0 copy parent ?tree? node ?switches?"}}
-
-test tree.376 {tree0 copy root} {
-    list [catch {tree0 copy root} msg] $msg
-} {1 {wrong # args: should be "tree0 copy parent ?tree? node ?switches?"}}
-
-test tree.377 {tree0 copy root 14} {
-    list [catch {tree0 copy root 14} msg] $msg
-} {0 23}
-
-test tree.378 {tree0 copy 14 root} {
-    list [catch {tree0 copy 14 root} msg] $msg
-} {0 24}
-
-test tree.379 {tree0 copy 14 root -recurse} {
-    list [catch {tree0 copy 14 root -recurse} msg] $msg
-} {1 {can't make cyclic copy: source node is an ancestor of the destination}}
-
-test tree.380 {tree0 copy 3 2 -recurse -tags} {
-    list [catch {tree0 copy 3 2 -recurse -tags} msg] $msg
-} {0 25}
-
-test tree.381 {copy tree to tree -recurse} {
-    list [catch {
-	blt::tree create tree1
-	foreach node [tree0 children root] {
-	    tree1 copy root tree0 $node -recurse 
-	}
-	foreach node [tree0 children root] {
-	    tree1 copy root tree0 $node -recurse 
-	}
-	tree1 dump root
-    } msg] $msg
-} {0 {-1 0 {{}} {} {}
-0 1 {{} node2} {key1 myValue} {}
-1 2 {{} node2 node1} {key1 myValue} {}
-2 3 {{} node2 node1 node14} {key1 myValue} {}
-3 4 {{} node2 node1 node14 node16} {key1 123 key2 abc} {}
-4 5 {{} node2 node1 node14 node16 node18} {key1 myValue} {}
-5 6 {{} node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-3 7 {{} node2 node1 node14 {}} {key1 myValue} {}
-2 8 {{} node2 node1 node15} {key1 123} {}
-8 9 {{} node2 node1 node15 node17} {key1 myValue} {}
-9 10 {{} node2 node1 node15 node17 node19} {key1 myValue} {}
-10 11 {{} node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 12 {{} node3} {key1 myValue} {}
-12 13 {{} node3 node2} {key1 myValue} {}
-13 14 {{} node3 node2 node1} {key1 myValue} {}
-14 15 {{} node3 node2 node1 node14} {key1 myValue} {}
-15 16 {{} node3 node2 node1 node14 node16} {key1 123 key2 abc} {}
-16 17 {{} node3 node2 node1 node14 node16 node18} {key1 myValue} {}
-17 18 {{} node3 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-15 19 {{} node3 node2 node1 node14 {}} {key1 myValue} {}
-14 20 {{} node3 node2 node1 node15} {key1 123} {}
-20 21 {{} node3 node2 node1 node15 node17} {key1 myValue} {}
-21 22 {{} node3 node2 node1 node15 node17 node19} {key1 myValue} {}
-22 23 {{} node3 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 24 {{} node4} {key1 myValue} {}
-0 25 {{} node5} {key1 myValue} {}
-25 26 {{} node5 node13} {key1 myValue} {}
-0 27 {{} node6} {key1 myValue} {}
-0 28 {{} node14} {key1 myValue} {}
-0 29 {{} node2} {key1 myValue} {}
-29 30 {{} node2 node1} {key1 myValue} {}
-30 31 {{} node2 node1 node14} {key1 myValue} {}
-31 32 {{} node2 node1 node14 node16} {key1 123 key2 abc} {}
-32 33 {{} node2 node1 node14 node16 node18} {key1 myValue} {}
-33 34 {{} node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-31 35 {{} node2 node1 node14 {}} {key1 myValue} {}
-30 36 {{} node2 node1 node15} {key1 123} {}
-36 37 {{} node2 node1 node15 node17} {key1 myValue} {}
-37 38 {{} node2 node1 node15 node17 node19} {key1 myValue} {}
-38 39 {{} node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 40 {{} node3} {key1 myValue} {}
-40 41 {{} node3 node2} {key1 myValue} {}
-41 42 {{} node3 node2 node1} {key1 myValue} {}
-42 43 {{} node3 node2 node1 node14} {key1 myValue} {}
-43 44 {{} node3 node2 node1 node14 node16} {key1 123 key2 abc} {}
-44 45 {{} node3 node2 node1 node14 node16 node18} {key1 myValue} {}
-45 46 {{} node3 node2 node1 node14 node16 node18 node20} {key1 myValue} {}
-43 47 {{} node3 node2 node1 node14 {}} {key1 myValue} {}
-42 48 {{} node3 node2 node1 node15} {key1 123} {}
-48 49 {{} node3 node2 node1 node15 node17} {key1 myValue} {}
-49 50 {{} node3 node2 node1 node15 node17 node19} {key1 myValue} {}
-50 51 {{} node3 node2 node1 node15 node17 node19 node21} {key1 myValue} {}
-0 52 {{} node4} {key1 myValue} {}
-0 53 {{} node5} {key1 myValue} {}
-53 54 {{} node5 node13} {key1 myValue} {}
-0 55 {{} node6} {key1 myValue} {}
-0 56 {{} node14} {key1 myValue} {}
-}}
-
-puts stderr "done testing treecmd.tcl"
-
-exit 0
-
diff --git a/blt3.0/win/README b/blt3.0/win/README
deleted file mode 100644
index e17af25..0000000
--- a/blt3.0/win/README
+++ /dev/null
@@ -1,277 +0,0 @@
-
-This file describes how to build BLT under Windows 95/98/NT/2000/XP.
-
-It's not necessary to compile BLT for Windows 95/98/NT/2000/XP.
-Binary versions are available on ftp.tcltk.com/pub/blt.
-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.0.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.1.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.2.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.3.exe
-
-They will dynamically load into wish80.exe, wish81.exe, wish82.exe, or
-wish83.exe by invoking
-
-	package require BLT
-
-from within your script.
-
-If you really need to build BLT yourself, then hold onto your hat.
-It's a lot more difficult to build BLT under Windows than under Unix.
-Most Windows software is designed to be delivered as a self-installing
-binary executable, therefore it's rare to find the installation tools
-necessary to build and install BLT from the source code.  
-
-1. What versions of Tcl/Tk can I use?
-
-  Any stable release.  I've built and tested BLT with Tcl/Tk
-  versions 8.0.5, 8.1.1, and 8.2.3, and 8.3.4.  Avoid the alpha and
-  beta versions.
-
-2. What compiler can I use?
-
-  You can use one of the following compilers:
-
-   1. Microsoft Visual C++ 5.0/6.0
-   2. Cygwin's GNU CC 2.95.2 (with or without -mno-cygwin)
-   3. Borland Free compiler 5.5.1
-
-  I normally build with VC++ 6.0.  This is also what the binary Tcl/Tk
-  distribution use.  
-
-  Note: Unless it's your only option, I don't recommend using the
-        Borland free compiler right now.
-
-3. What "make" program do I need?
-
-  I highly recommend installing the Cygwin tool suite.  You can pick
-  this up from
-
-    http://sourceware.cygnus.com/cygwin/setup.exe
-
-  I normally use GNU make instead of Microsoft's nmake.  But you can
-  also nmake.  If you have a choice, use the Cygnus tools.  For
-  compiling with Borland's C compiler, you can use Borland's make.exe.
-
-4. Do I need to compile the Tcl/Tk libraries?
-
-  More than likely.  Unless you're compiling with Cygwin GCC and the
-  cygwin-version of the Tcl/Tk libraries, you'll need to obtain the
-  Tcl/Tk sources and compile them.
-
-5. Is there anything else I need?
-
-  By default, JPEG support is enabled.  It uses the jpeg-6b
-  libraries from ftp.uu.net.  You can pick up the sources from
-
-	ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
-
-  You can also use the Intel JPEG Libraries.  JPEG support is
-  optional.  You can disable it.
-
-6. Can I mix-and-match DLLs?
-
-   You can't really mix the Borland and VC++ compiled DLLs.  BLT isn't
-   stubbed and the symbol names are incompatible between versions.
-   The various workarounds are difficult.
-
-   I haven't tested this, but I believe you can load a GNU CC
-   (-mno-cygwin) BLT24.dll into a VC++ compiled wish.  
-
-   In general the best advice is to use the same compiler that
-   that you compiled Tcl/Tk to compile BLT.  
-   
-7. What compiler should I use?
-
-   Right now, probably Microsoft VC++.  This is what all Tcl/Tk
-   releases 8.0 to present have been built with.  So you shouldn't
-   have to work too hard to compile the Tcl and Tk libraries.
-   
-   Having said that, Cygwin's GNU CC works just fine.  You can
-   obtain versions from Mumit Khan to build Tcl and Tk.  I recommend
-   compiling the Tcl/Tk libraries yourself with the -mno-cygwin
-   option.
-
-   And if compiling Tcl and Tk is too much of a hassle, you can 
-   always built BLT with the cygwin Tcl/Tk libraries (cygtcl80.dll
-   and cygtk80.dll).  The downside is that the cygwin libraries are
-   1) pretty old (version 8.0) and 2) there may be some
-   incompatibilities between the native Win32 calls in BLT
-   and the cygwin emulation layer.
-  
-   I have built BLT with the Borland free compiler.  It's not 
-   100% yet.  The problems are 
-      1) If you automatically load BLT from a script file, you
-         will generate exception in the DLL.  Oddly enough, 
-         you can source the script manually.
-      2) Resampled images are blank (see the graph3.tcl and eps.tcl
-         demos).  The same code works with both GCC and VC++.
-      3) I can't even get wish83.exe to open a console window. 
-         Weirdly, bltwish.exe does this properly.
-      4) The turbo debugger is a pain.
-
-
-Building BLT with Microsoft VC++, nmake, and VC++ compiled Tcl/Tk
-libraries.
-====================================================================
-
-1. Install the Tcl/Tk sources.  They should reside in the
-   same directory tree as the BLT sources.  
-
-      	______________|______________
-     	|          |       |        |
-      blt2.4   tcl8.3.4  tk8.3.4   jpeg-6b
-
-   
-2. Build and install the Tcl and Tk libraries.
-
-   cd tcl8.3.4\win
-   nmake -f Makefile.vc 
-   nmake -f Makefile.vc install
-   cd ..\..\tk8.3.4\win
-   nmake -f Makefile.vc
-   nmake -f Makefile.vc install
-
-3. In the BLT directory, edit .\win\makedefs. Set the following
-   macros.
-
-
-     v1	= 8.3			Tcl/Tk version.
-     v2	= 83			Version number without dots.
-     v3	= 8.3.4			Suffix of Tcl/Tk directories 
-
-     prefix = C:/Program\ Files/Tcl
-				Location of installed Tcl/Tk files.
-     TOOLS32 = C:/Program\ Files/Microsoft\ Visual\ Studio/VC90
-				Location of MS C compiler and tools.
-     HAVE_JPEG = 0		
-
-4. Compile BLT.
-   
-   make -f blt.mak
-   
-5. Install BLT
-
-   Since Windows doesn't provide tools to install software, we'll
-   use Tcl/Tk to do it.  There's an install script in ./win/install.tcl.
-   Add the location of wish83.exe to your PATH and run wish83.exe.
-
-	wish83.exe ./win/install.tcl
-
-6. Test BLT
-	
-   cd demos
-   bltwish.exe graph1.tcl
-
-Building BLT with Cygwin GCC and mingw (-mno-cygwin) Tcl/Tk libraries.
-======================================================================
-
-1. Install the Tcl/Tk sources.  They should reside in the
-   same directory tree as the BLT sources.  
-
-      	______________|______________
-     	|          |       |        |
-      blt2.4   tcl8.3.4  tk8.3.4   jpeg-6b
-
-   
-2. Install the cygwin tool suite.
-
-3. Build and install the Tcl and Tk libraries.
-
-   cd tcl8.3.4/win
-   ./configure --prefix=/usr/local/tcl8.3.4
-   make 
-   make install
-   cd ../../tk8.3.4/win
-   ./configure  --prefix=/usr/local/tcl8.3.4
-   make 
-   make install
-
-3. Compile and install BLT.
-   
-   ./configure --disable-cygwin --prefix=/usr/local/tcl8.3.4
-   make 
-   make install
-
-4. Test BLT
-	
-   Add the location of wish83.exe to your PATH and run bltwish.exe.
-
-   cd demos
-   bltwish.exe graph1.tcl
-
-Building BLT with Cygwin GCC and the cygwin distribution Tcl/Tk
-libraries.
-=============================================================
-
-1. Install the cygwin tool suite.
-
-2. Compile and install BLT.
-   
-   ./configure --with-scriptdir=/usr/share --prefix=/usr
-   make 
-   make install
-
-3. Test BLT
-	
-   Add the location of wish83.exe to your PATH and run bltwish.exe.
-
-   cd demos
-   bltwish.exe graph1.tcl
-
-Building BLT with Borland bcc55 and Borland compiled Tcl/Tk libraries.
-======================================================================
-
-1. Install the Tcl/Tk sources.  They should reside in the
-   same directory tree as the BLT sources.  
-
-      	______________|______________
-     	|          |       |        |
-      blt2.4   tcl8.3.4  tk8.3.4   jpeg-6b
-
-   
-2. Build and install the Tcl and Tk libraries.
-
-   cd tcl8.3.4\win
-   make -f Makefile.bc 
-   make -f Makefile.bc install
-   cd ..\..\tk8.3.4\win
-   make -f Makefile.bc
-   make -f Makefile.bc install
-
-3. In the BLT directory, edit .\win\makedefs. Set the following
-   macros.
-
-     v1	= 8.3			Tcl/Tk version.
-     v2	= 83			Version number without dots.
-     v3	= 8.3.4			Suffix of Tcl/Tk directories 
-
-4. Edit .\src\Makefile.bc
-
-     prefix = C:\Program Files\Tcl
-				Location of installed Tcl/Tk files.
-     TOOLS32 = C:\Borland\BCC55\
-				Location of Borland C compiler and tools.
-     HAVE_JPEG = 0		
-
-4. Compile BLT.
-   
-   cd src
-   make -f Makefile.bc
-   
-5. Install BLT
-
-   Since Windows doesn't provide tools to install software, we'll
-   use Tcl/Tk to do it.  There's an install script in ./win/install.tcl.
-   Add the location of wish83.exe to your PATH and run wish83.exe.
-
-	wish83.exe ./win/install.tcl
-
-6. Test BLT
-	
-   cd demos
-   bltwish.exe graph1.tcl
-
diff --git a/blt3.0/win/README.vc++ b/blt3.0/win/README.vc++
deleted file mode 100644
index 8e6d9c1..0000000
--- a/blt3.0/win/README.vc++
+++ /dev/null
@@ -1,123 +0,0 @@
-
-		How to build BLT with Microsoft VC++.
-
-This file describes how to build BLT under Windows 95/98/NT/2000/XP
-with Visual C++.
-
-For most, it's not necessary to compile BLT for Windows.  If you
-have downloaded Tcl/Tk from www.tcltk.com or activestate then
-the precompiled binary versions on www.sourceforge.net should
-suffice.  They are
-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.0.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.1.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.2.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.3.exe
-  		           -or-
- http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.4.exe
-
-
-Simply pick the one that matches the version of Tcl/Tk that you are
-using.
-
-
-Assuming the you need to build BLT from its sources, here is a short
-description.
-
-
-I. Requirements.
-================
-
-   Visual C++ 5 or 6	I've tested building BLT with both these 
-			compilers
-
-   Tcl/Tk sources	You must have the sources to both Tcl and
-			Tk available.
-
-
-II. Directory structure.
-========================
-
-The Tcl/Tk sources must be installed in the same directory and the
-BLT sources.  The following is an example.
-
-      	______________|______________
-     	|          |       |        |
-      blt2.4   tcl8.3.4  tk8.3.4   jpeg-6b*
-
-* The JPEG library is optional.  
-   
-
-III. Building Tcl/Tk.
-=====================
-
-You must first build the Tcl and Tk libraries.
-
-   cd tcl8.3.4/win
-   nmake -f Makefile.vc 
-   nmake -f Makefile.vc install
-   cd ../../tk8.3.4/win
-   nmake -f Makefile.vc
-   nmake -f Makefile.vc install
-
-This will install Tcl/Tk into C:/Program Files/Tcl
-
-
-IV. Configuring BLT 
-===================
-
-In the BLT directory, edit ./win/makedefs. Set the following macros.
-
-  v1 = 8.3			    Tcl/Tk version.
-  v2 = 83			    Version number without dots.
-  v3 = 8.3.4			    Suffix of Tcl/Tk directories 
-
-  prefix = C:/Program\ Files/Tcl    Location of installed Tcl/Tk files.
-  TOOLS32 = C:/Program\ Files/Microsoft\ Visual\ Studio/VC90
-				    Location of MS C compiler and tools.
-  HAVE_JPEG = 0		
-
-Setting HAVE_JPEG to 0 eliminated the need for the JPEG library. 
-
-
-V. Compiling BLT
-================
-   
-If you have the Cygwin distribution, go into a bash shell and run
-
-   make -f Makefile.vc
-   
-from the blt2.4z directory.  
-
-Otherwise (without cygwin) it's
-
-   nmake -f blt.mak
-   
-
-VI. Installing BLT
-==================
-
-Again, if you have the Cygwin distribution, then run 
-
-   make -f Makefile.vc install
-  
-Without cygwin, you must use the home-brew installer script with 
-tclsh.
-
-   tclsh8.3.exe win/install.tcl 
-
-
-VII. Testing BLT
-================
-
-Add the location of BLT24.dll to your PATH variable.  For example
-from the bash shell
-	
-   export PATH=/cygdrive/c/Program\ Files/Tcl/bin:$PATH
-   cd demos
-
-   bltwish.exe graph1.tcl
-   
diff --git a/blt3.0/win/X11/X.h b/blt3.0/win/X11/X.h
deleted file mode 100644
index a7f6566..0000000
--- a/blt3.0/win/X11/X.h
+++ /dev/null
@@ -1,673 +0,0 @@
-/*
- *	$XConsortium: X.h,v 1.66 88/09/06 15:55:56 jim Exp $
- */
-
-/* Definitions for the X window system likely to be used by applications */
-
-#ifndef X_H
-#define X_H
-
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#define X_PROTOCOL	11		/* current protocol version */
-#define X_PROTOCOL_REVISION 0		/* current minor version */
-
-#ifdef MAC_TCL
-#   define Cursor XCursor
-#   define Region XRegion
-#endif
-
-/* Resources */
-
-typedef unsigned long XID;
-
-typedef XID Window;
-typedef XID Drawable;
-typedef XID Font;
-typedef XID Pixmap;
-typedef XID Cursor;
-typedef XID Colormap;
-typedef XID GContext;
-typedef XID KeySym;
-
-typedef unsigned long Mask;
-
-typedef unsigned long Atom;
-
-typedef unsigned long VisualID;
-
-typedef unsigned long Time;
-
-typedef unsigned long KeyCode;	/* In order to use IME, the Macintosh needs
-				 * to pack 3 bytes into the keyCode field in
-				 * the XEvent.  In the real X.h, a KeyCode is
-				 * defined as a short, which wouldn't be big
-				 * enough. */
-
-/*****************************************************************
- * RESERVED RESOURCE AND CONSTANT DEFINITIONS
- *****************************************************************/
-
-#define None                 0L	/* universal null resource or null atom */
-
-#define ParentRelative       1L	/* background pixmap in CreateWindow
-				    and ChangeWindowAttributes */
-
-#define CopyFromParent       0L	/* border pixmap in CreateWindow
-				       and ChangeWindowAttributes
-				   special VisualID and special window
-				       class passed to CreateWindow */
-
-#define PointerWindow        0L	/* destination window in SendEvent */
-#define InputFocus           1L	/* destination window in SendEvent */
-
-#define PointerRoot          1L	/* focus window in SetInputFocus */
-
-#define AnyPropertyType      0L	/* special Atom, passed to GetProperty */
-
-#define AnyKey		     0L	/* special Key Code, passed to GrabKey */
-
-#define AnyButton            0L	/* special Button Code, passed to GrabButton */
-
-#define AllTemporary         0L	/* special Resource ID passed to KillClient */
-
-#define CurrentTime          0L	/* special Time */
-
-#define NoSymbol	     0L	/* special KeySym */
-
-/***************************************************************** 
- * EVENT DEFINITIONS 
- *****************************************************************/
-
-/* Input Event Masks. Used as event-mask window attribute and as arguments
-   to Grab requests.  Not to be confused with event names.  */
-
-#define NoEventMask			0L
-#define KeyPressMask			(1L<<0)  
-#define KeyReleaseMask			(1L<<1)  
-#define ButtonPressMask			(1L<<2)  
-#define ButtonReleaseMask		(1L<<3)  
-#define EnterWindowMask			(1L<<4)  
-#define LeaveWindowMask			(1L<<5)  
-#define PointerMotionMask		(1L<<6)  
-#define PointerMotionHintMask		(1L<<7)  
-#define Button1MotionMask		(1L<<8)  
-#define Button2MotionMask		(1L<<9)  
-#define Button3MotionMask		(1L<<10) 
-#define Button4MotionMask		(1L<<11) 
-#define Button5MotionMask		(1L<<12) 
-#define ButtonMotionMask		(1L<<13) 
-#define KeymapStateMask			(1L<<14)
-#define ExposureMask			(1L<<15) 
-#define VisibilityChangeMask		(1L<<16) 
-#define StructureNotifyMask		(1L<<17) 
-#define ResizeRedirectMask		(1L<<18) 
-#define SubstructureNotifyMask		(1L<<19) 
-#define SubstructureRedirectMask	(1L<<20) 
-#define FocusChangeMask			(1L<<21) 
-#define PropertyChangeMask		(1L<<22) 
-#define ColormapChangeMask		(1L<<23) 
-#define OwnerGrabButtonMask		(1L<<24) 
-
-/* Event names.  Used in "type" field in XEvent structures.  Not to be
-confused with event masks above.  They start from 2 because 0 and 1
-are reserved in the protocol for errors and replies. */
-
-#define KeyPress		2
-#define KeyRelease		3
-#define ButtonPress		4
-#define ButtonRelease		5
-#define MotionNotify		6
-#define EnterNotify		7
-#define LeaveNotify		8
-#define FocusIn			9
-#define FocusOut		10
-#define KeymapNotify		11
-#define Expose			12
-#define GraphicsExpose		13
-#define NoExpose		14
-#define VisibilityNotify	15
-#define CreateNotify		16
-#define DestroyNotify		17
-#define UnmapNotify		18
-#define MapNotify		19
-#define MapRequest		20
-#define ReparentNotify		21
-#define ConfigureNotify		22
-#define ConfigureRequest	23
-#define GravityNotify		24
-#define ResizeRequest		25
-#define CirculateNotify		26
-#define CirculateRequest	27
-#define PropertyNotify		28
-#define SelectionClear		29
-#define SelectionRequest	30
-#define SelectionNotify		31
-#define ColormapNotify		32
-#define ClientMessage		33
-#define MappingNotify		34
-#define LASTEvent		35	/* must be bigger than any event # */
-
-
-/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
-   state in various key-, mouse-, and button-related events. */
-
-#define ShiftMask		(1<<0)
-#define LockMask		(1<<1)
-#define ControlMask		(1<<2)
-#define Mod1Mask		(1<<3)
-#define Mod2Mask		(1<<4)
-#define Mod3Mask		(1<<5)
-#define Mod4Mask		(1<<6)
-#define Mod5Mask		(1<<7)
-
-/* modifier names.  Used to build a SetModifierMapping request or
-   to read a GetModifierMapping request.  These correspond to the
-   masks defined above. */
-#define ShiftMapIndex		0
-#define LockMapIndex		1
-#define ControlMapIndex		2
-#define Mod1MapIndex		3
-#define Mod2MapIndex		4
-#define Mod3MapIndex		5
-#define Mod4MapIndex		6
-#define Mod5MapIndex		7
-
-
-/* button masks.  Used in same manner as Key masks above. Not to be confused
-   with button names below. */
-
-#define Button1Mask		(1<<8)
-#define Button2Mask		(1<<9)
-#define Button3Mask		(1<<10)
-#define Button4Mask		(1<<11)
-#define Button5Mask		(1<<12)
-
-#define AnyModifier		(1<<15)  /* used in GrabButton, GrabKey */
-
-
-/* button names. Used as arguments to GrabButton and as detail in ButtonPress
-   and ButtonRelease events.  Not to be confused with button masks above.
-   Note that 0 is already defined above as "AnyButton".  */
-
-#define Button1			1
-#define Button2			2
-#define Button3			3
-#define Button4			4
-#define Button5			5
-
-/* Notify modes */
-
-#define NotifyNormal		0
-#define NotifyGrab		1
-#define NotifyUngrab		2
-#define NotifyWhileGrabbed	3
-
-#define NotifyHint		1	/* for MotionNotify events */
-		       
-/* Notify detail */
-
-#define NotifyAncestor		0
-#define NotifyVirtual		1
-#define NotifyInferior		2
-#define NotifyNonlinear		3
-#define NotifyNonlinearVirtual	4
-#define NotifyPointer		5
-#define NotifyPointerRoot	6
-#define NotifyDetailNone	7
-
-/* Visibility notify */
-
-#define VisibilityUnobscured		0
-#define VisibilityPartiallyObscured	1
-#define VisibilityFullyObscured		2
-
-/* Circulation request */
-
-#define PlaceOnTop		0
-#define PlaceOnBottom		1
-
-/* protocol families */
-
-#define FamilyInternet		0
-#define FamilyDECnet		1
-#define FamilyChaos		2
-
-/* Property notification */
-
-#define PropertyNewValue	0
-#define PropertyDelete		1
-
-/* Color Map notification */
-
-#define ColormapUninstalled	0
-#define ColormapInstalled	1
-
-/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
-
-#define GrabModeSync		0
-#define GrabModeAsync		1
-
-/* GrabPointer, GrabKeyboard reply status */
-
-#define GrabSuccess		0
-#define AlreadyGrabbed		1
-#define GrabInvalidTime		2
-#define GrabNotViewable		3
-#define GrabFrozen		4
-
-/* AllowEvents modes */
-
-#define AsyncPointer		0
-#define SyncPointer		1
-#define ReplayPointer		2
-#define AsyncKeyboard		3
-#define SyncKeyboard		4
-#define ReplayKeyboard		5
-#define AsyncBoth		6
-#define SyncBoth		7
-
-/* Used in SetInputFocus, GetInputFocus */
-
-#define RevertToNone		(int)None
-#define RevertToPointerRoot	(int)PointerRoot
-#define RevertToParent		2
-
-/*****************************************************************
- * ERROR CODES 
- *****************************************************************/
-
-#define Success		   0	/* everything's okay */
-#define BadRequest	   1	/* bad request code */
-#define BadValue	   2	/* int parameter out of range */
-#define BadWindow	   3	/* parameter not a Window */
-#define BadPixmap	   4	/* parameter not a Pixmap */
-#define BadAtom		   5	/* parameter not an Atom */
-#define BadCursor	   6	/* parameter not a Cursor */
-#define BadFont		   7	/* parameter not a Font */
-#define BadMatch	   8	/* parameter mismatch */
-#define BadDrawable	   9	/* parameter not a Pixmap or Window */
-#define BadAccess	  10	/* depending on context:
-				 - key/button already grabbed
-				 - attempt to free an illegal 
-				   cmap entry 
-				- attempt to store into a read-only 
-				   color map entry.
- 				- attempt to modify the access control
-				   list from other than the local host.
-				*/
-#define BadAlloc	  11	/* insufficient resources */
-#define BadColor	  12	/* no such colormap */
-#define BadGC		  13	/* parameter not a GC */
-#define BadIDChoice	  14	/* choice not in range or already used */
-#define BadName		  15	/* font or color name doesn't exist */
-#define BadLength	  16	/* Request length incorrect */
-#define BadImplementation 17	/* server is defective */
-
-#define FirstExtensionError	128
-#define LastExtensionError	255
-
-/*****************************************************************
- * WINDOW DEFINITIONS 
- *****************************************************************/
-
-/* Window classes used by CreateWindow */
-/* Note that CopyFromParent is already defined as 0 above */
-
-#define InputOutput		1
-#define InputOnly		2
-
-/* Window attributes for CreateWindow and ChangeWindowAttributes */
-
-#define CWBackPixmap		(1L<<0)
-#define CWBackPixel		(1L<<1)
-#define CWBorderPixmap		(1L<<2)
-#define CWBorderPixel           (1L<<3)
-#define CWBitGravity		(1L<<4)
-#define CWWinGravity		(1L<<5)
-#define CWBackingStore          (1L<<6)
-#define CWBackingPlanes	        (1L<<7)
-#define CWBackingPixel	        (1L<<8)
-#define CWOverrideRedirect	(1L<<9)
-#define CWSaveUnder		(1L<<10)
-#define CWEventMask		(1L<<11)
-#define CWDontPropagate	        (1L<<12)
-#define CWColormap		(1L<<13)
-#define CWCursor	        (1L<<14)
-
-/* ConfigureWindow structure */
-
-#define CWX			(1<<0)
-#define CWY			(1<<1)
-#define CWWidth			(1<<2)
-#define CWHeight		(1<<3)
-#define CWBorderWidth		(1<<4)
-#define CWSibling		(1<<5)
-#define CWStackMode		(1<<6)
-
-
-/* Bit Gravity */
-
-#define ForgetGravity		0
-#define NorthWestGravity	1
-#define NorthGravity		2
-#define NorthEastGravity	3
-#define WestGravity		4
-#define CenterGravity		5
-#define EastGravity		6
-#define SouthWestGravity	7
-#define SouthGravity		8
-#define SouthEastGravity	9
-#define StaticGravity		10
-
-/* Window gravity + bit gravity above */
-
-#define UnmapGravity		0
-
-/* Used in CreateWindow for backing-store hint */
-
-#define NotUseful               0
-#define WhenMapped              1
-#define Always                  2
-
-/* Used in GetWindowAttributes reply */
-
-#define IsUnmapped		0
-#define IsUnviewable		1
-#define IsViewable		2
-
-/* Used in ChangeSaveSet */
-
-#define SetModeInsert           0
-#define SetModeDelete           1
-
-/* Used in ChangeCloseDownMode */
-
-#define DestroyAll              0
-#define RetainPermanent         1
-#define RetainTemporary         2
-
-/* Window stacking method (in configureWindow) */
-
-#define Above                   0
-#define Below                   1
-#define TopIf                   2
-#define BottomIf                3
-#define Opposite                4
-
-/* Circulation direction */
-
-#define RaiseLowest             0
-#define LowerHighest            1
-
-/* Property modes */
-
-#define PropModeReplace         0
-#define PropModePrepend         1
-#define PropModeAppend          2
-
-/*****************************************************************
- * GRAPHICS DEFINITIONS
- *****************************************************************/
-
-/* graphics functions, as in GC.alu */
-
-#define	GXclear			0x0		/* 0 */
-#define GXand			0x1		/* src AND dst */
-#define GXandReverse		0x2		/* src AND NOT dst */
-#define GXcopy			0x3		/* src */
-#define GXandInverted		0x4		/* NOT src AND dst */
-#define	GXnoop			0x5		/* dst */
-#define GXxor			0x6		/* src XOR dst */
-#define GXor			0x7		/* src OR dst */
-#define GXnor			0x8		/* NOT src AND NOT dst */
-#define GXequiv			0x9		/* NOT src XOR dst */
-#define GXinvert		0xa		/* NOT dst */
-#define GXorReverse		0xb		/* src OR NOT dst */
-#define GXcopyInverted		0xc		/* NOT src */
-#define GXorInverted		0xd		/* NOT src OR dst */
-#define GXnand			0xe		/* NOT src OR NOT dst */
-#define GXset			0xf		/* 1 */
-
-/* LineStyle */
-
-#define LineSolid		0
-#define LineOnOffDash		1
-#define LineDoubleDash		2
-
-/* capStyle */
-
-#define CapNotLast		0
-#define CapButt			1
-#define CapRound		2
-#define CapProjecting		3
-
-/* joinStyle */
-
-#define JoinMiter		0
-#define JoinRound		1
-#define JoinBevel		2
-
-/* fillStyle */
-
-#define FillSolid		0
-#define FillTiled		1
-#define FillStippled		2
-#define FillOpaqueStippled	3
-
-/* fillRule */
-
-#define EvenOddRule		0
-#define WindingRule		1
-
-/* subwindow mode */
-
-#define ClipByChildren		0
-#define IncludeInferiors	1
-
-/* SetClipRectangles ordering */
-
-#define Unsorted		0
-#define YSorted			1
-#define YXSorted		2
-#define YXBanded		3
-
-/* CoordinateMode for drawing routines */
-
-#define CoordModeOrigin		0	/* relative to the origin */
-#define CoordModePrevious       1	/* relative to previous point */
-
-/* Polygon shapes */
-
-#define Complex			0	/* paths may intersect */
-#define Nonconvex		1	/* no paths intersect, but not convex */
-#define Convex			2	/* wholly convex */
-
-/* Arc modes for PolyFillArc */
-
-#define ArcChord		0	/* join endpoints of arc */
-#define ArcPieSlice		1	/* join endpoints to center of arc */
-
-/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
-   GC.stateChanges */
-
-#define GCFunction              (1L<<0)
-#define GCPlaneMask             (1L<<1)
-#define GCForeground            (1L<<2)
-#define GCBackground            (1L<<3)
-#define GCLineWidth             (1L<<4)
-#define GCLineStyle             (1L<<5)
-#define GCCapStyle              (1L<<6)
-#define GCJoinStyle		(1L<<7)
-#define GCFillStyle		(1L<<8)
-#define GCFillRule		(1L<<9) 
-#define GCTile			(1L<<10)
-#define GCStipple		(1L<<11)
-#define GCTileStipXOrigin	(1L<<12)
-#define GCTileStipYOrigin	(1L<<13)
-#define GCFont 			(1L<<14)
-#define GCSubwindowMode		(1L<<15)
-#define GCGraphicsExposures     (1L<<16)
-#define GCClipXOrigin		(1L<<17)
-#define GCClipYOrigin		(1L<<18)
-#define GCClipMask		(1L<<19)
-#define GCDashOffset		(1L<<20)
-#define GCDashList		(1L<<21)
-#define GCArcMode		(1L<<22)
-
-#define GCLastBit		22
-/*****************************************************************
- * FONTS 
- *****************************************************************/
-
-/* used in QueryFont -- draw direction */
-
-#define FontLeftToRight		0
-#define FontRightToLeft		1
-
-#define FontChange		255
-
-/*****************************************************************
- *  IMAGING 
- *****************************************************************/
-
-/* ImageFormat -- PutImage, GetImage */
-
-#define XYBitmap		0	/* depth 1, XYFormat */
-#define XYPixmap		1	/* depth == drawable depth */
-#define ZPixmap			2	/* depth == drawable depth */
-
-/*****************************************************************
- *  COLOR MAP STUFF 
- *****************************************************************/
-
-/* For CreateColormap */
-
-#define AllocNone		0	/* create map with no entries */
-#define AllocAll		1	/* allocate entire map writeable */
-
-
-/* Flags used in StoreNamedColor, StoreColors */
-
-#define DoRed			(1<<0)
-#define DoGreen			(1<<1)
-#define DoBlue			(1<<2)
-
-/*****************************************************************
- * CURSOR STUFF
- *****************************************************************/
-
-/* QueryBestSize Class */
-
-#define CursorShape		0	/* largest size that can be displayed */
-#define TileShape		1	/* size tiled fastest */
-#define StippleShape		2	/* size stippled fastest */
-
-/***************************************************************** 
- * KEYBOARD/POINTER STUFF
- *****************************************************************/
-
-#define AutoRepeatModeOff	0
-#define AutoRepeatModeOn	1
-#define AutoRepeatModeDefault	2
-
-#define LedModeOff		0
-#define LedModeOn		1
-
-/* masks for ChangeKeyboardControl */
-
-#define KBKeyClickPercent	(1L<<0)
-#define KBBellPercent		(1L<<1)
-#define KBBellPitch		(1L<<2)
-#define KBBellDuration		(1L<<3)
-#define KBLed			(1L<<4)
-#define KBLedMode		(1L<<5)
-#define KBKey			(1L<<6)
-#define KBAutoRepeatMode	(1L<<7)
-
-#define MappingSuccess     	0
-#define MappingBusy        	1
-#define MappingFailed		2
-
-#define MappingModifier		0
-#define MappingKeyboard		1
-#define MappingPointer		2
-
-/*****************************************************************
- * SCREEN SAVER STUFF 
- *****************************************************************/
-
-#define DontPreferBlanking	0
-#define PreferBlanking		1
-#define DefaultBlanking		2
-
-#define DisableScreenSaver	0
-#define DisableScreenInterval	0
-
-#define DontAllowExposures	0
-#define AllowExposures		1
-#define DefaultExposures	2
-
-/* for ForceScreenSaver */
-
-#define ScreenSaverReset 0
-#define ScreenSaverActive 1
-
-/*****************************************************************
- * HOSTS AND CONNECTIONS
- *****************************************************************/
-
-/* for ChangeHosts */
-
-#define HostInsert		0
-#define HostDelete		1
-
-/* for ChangeAccessControl */
-
-#define EnableAccess		1      
-#define DisableAccess		0
-
-/* Display classes  used in opening the connection 
- * Note that the statically allocated ones are even numbered and the
- * dynamically changeable ones are odd numbered */
-
-#define StaticGray		0
-#define GrayScale		1
-#define StaticColor		2
-#define PseudoColor		3
-#define TrueColor		4
-#define DirectColor		5
-
-
-/* Byte order  used in imageByteOrder and bitmapBitOrder */
-
-#define LSBFirst		0
-#define MSBFirst		1
-
-#ifdef MAC_TCL
-#   undef Cursor
-#   undef Region
-#endif
-
-#endif /* X_H */
diff --git a/blt3.0/win/X11/Xatom.h b/blt3.0/win/X11/Xatom.h
deleted file mode 100644
index 485a423..0000000
--- a/blt3.0/win/X11/Xatom.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef XATOM_H
-#define XATOM_H 1
-
-/* THIS IS A GENERATED FILE
- *
- * Do not change!  Changing this file implies a protocol change!
- */
-
-#define XA_PRIMARY ((Atom) 1)
-#define XA_SECONDARY ((Atom) 2)
-#define XA_ARC ((Atom) 3)
-#define XA_ATOM ((Atom) 4)
-#define XA_BITMAP ((Atom) 5)
-#define XA_CARDINAL ((Atom) 6)
-#define XA_COLORMAP ((Atom) 7)
-#define XA_CURSOR ((Atom) 8)
-#define XA_CUT_BUFFER0 ((Atom) 9)
-#define XA_CUT_BUFFER1 ((Atom) 10)
-#define XA_CUT_BUFFER2 ((Atom) 11)
-#define XA_CUT_BUFFER3 ((Atom) 12)
-#define XA_CUT_BUFFER4 ((Atom) 13)
-#define XA_CUT_BUFFER5 ((Atom) 14)
-#define XA_CUT_BUFFER6 ((Atom) 15)
-#define XA_CUT_BUFFER7 ((Atom) 16)
-#define XA_DRAWABLE ((Atom) 17)
-#define XA_FONT ((Atom) 18)
-#define XA_INTEGER ((Atom) 19)
-#define XA_PIXMAP ((Atom) 20)
-#define XA_POINT ((Atom) 21)
-#define XA_RECTANGLE ((Atom) 22)
-#define XA_RESOURCE_MANAGER ((Atom) 23)
-#define XA_RGB_COLOR_MAP ((Atom) 24)
-#define XA_RGB_BEST_MAP ((Atom) 25)
-#define XA_RGB_BLUE_MAP ((Atom) 26)
-#define XA_RGB_DEFAULT_MAP ((Atom) 27)
-#define XA_RGB_GRAY_MAP ((Atom) 28)
-#define XA_RGB_GREEN_MAP ((Atom) 29)
-#define XA_RGB_RED_MAP ((Atom) 30)
-#define XA_STRING ((Atom) 31)
-#define XA_VISUALID ((Atom) 32)
-#define XA_WINDOW ((Atom) 33)
-#define XA_WM_COMMAND ((Atom) 34)
-#define XA_WM_HINTS ((Atom) 35)
-#define XA_WM_CLIENT_MACHINE ((Atom) 36)
-#define XA_WM_ICON_NAME ((Atom) 37)
-#define XA_WM_ICON_SIZE ((Atom) 38)
-#define XA_WM_NAME ((Atom) 39)
-#define XA_WM_NORMAL_HINTS ((Atom) 40)
-#define XA_WM_SIZE_HINTS ((Atom) 41)
-#define XA_WM_ZOOM_HINTS ((Atom) 42)
-#define XA_MIN_SPACE ((Atom) 43)
-#define XA_NORM_SPACE ((Atom) 44)
-#define XA_MAX_SPACE ((Atom) 45)
-#define XA_END_SPACE ((Atom) 46)
-#define XA_SUPERSCRIPT_X ((Atom) 47)
-#define XA_SUPERSCRIPT_Y ((Atom) 48)
-#define XA_SUBSCRIPT_X ((Atom) 49)
-#define XA_SUBSCRIPT_Y ((Atom) 50)
-#define XA_UNDERLINE_POSITION ((Atom) 51)
-#define XA_UNDERLINE_THICKNESS ((Atom) 52)
-#define XA_STRIKEOUT_ASCENT ((Atom) 53)
-#define XA_STRIKEOUT_DESCENT ((Atom) 54)
-#define XA_ITALIC_ANGLE ((Atom) 55)
-#define XA_X_HEIGHT ((Atom) 56)
-#define XA_QUAD_WIDTH ((Atom) 57)
-#define XA_WEIGHT ((Atom) 58)
-#define XA_POINT_SIZE ((Atom) 59)
-#define XA_RESOLUTION ((Atom) 60)
-#define XA_COPYRIGHT ((Atom) 61)
-#define XA_NOTICE ((Atom) 62)
-#define XA_FONT_NAME ((Atom) 63)
-#define XA_FAMILY_NAME ((Atom) 64)
-#define XA_FULL_NAME ((Atom) 65)
-#define XA_CAP_HEIGHT ((Atom) 66)
-#define XA_WM_CLASS ((Atom) 67)
-#define XA_WM_TRANSIENT_FOR ((Atom) 68)
-
-#define XA_LAST_PREDEFINED ((Atom) 68)
-#endif /* XATOM_H */
diff --git a/blt3.0/win/X11/Xfuncproto.h b/blt3.0/win/X11/Xfuncproto.h
deleted file mode 100644
index a59379b..0000000
--- a/blt3.0/win/X11/Xfuncproto.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $XConsortium: Xfuncproto.h,v 1.7 91/05/13 20:49:21 rws Exp $ */
-/* 
- * Copyright 1989, 1991 by the Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided 
- * that the above copyright notice appear in all copies and that both that 
- * copyright notice and this permission notice appear in supporting 
- * documentation, and that the name of M.I.T. not be used in advertising
- * or publicity pertaining to distribution of the software without specific, 
- * written prior permission. M.I.T. makes no representations about the 
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- */
-
-/* Definitions to make function prototypes manageable */
-
-#ifndef _XFUNCPROTO_H_
-#define _XFUNCPROTO_H_
-
-#ifndef NeedFunctionPrototypes
-#define NeedFunctionPrototypes 1
-#endif /* NeedFunctionPrototypes */
-
-#ifndef NeedVarargsPrototypes
-#define NeedVarargsPrototypes 0
-#endif /* NeedVarargsPrototypes */
-
-#if NeedFunctionPrototypes
-
-#ifndef NeedNestedPrototypes
-#define NeedNestedPrototypes 1
-#endif /* NeedNestedPrototypes */
-
-#ifndef _Xconst
-#define _Xconst const
-#endif /* _Xconst */
-
-#ifndef NeedWidePrototypes
-#ifdef NARROWPROTO
-#define NeedWidePrototypes 0
-#else
-#define NeedWidePrototypes 1		/* default to make interropt. easier */
-#endif
-#endif /* NeedWidePrototypes */
-
-#endif /* NeedFunctionPrototypes */
-
-#ifdef __cplusplus
-#define _XFUNCPROTOBEGIN extern "C" {
-#define _XFUNCPROTOEND }
-#endif
-
-#ifndef _XFUNCPROTOBEGIN
-#define _XFUNCPROTOBEGIN
-#define _XFUNCPROTOEND
-#endif /* _XFUNCPROTOBEGIN */
-
-#endif /* _XFUNCPROTO_H_ */
diff --git a/blt3.0/win/X11/Xlib.h b/blt3.0/win/X11/Xlib.h
deleted file mode 100644
index f89d71a..0000000
--- a/blt3.0/win/X11/Xlib.h
+++ /dev/null
@@ -1,1468 +0,0 @@
-/* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
-/* 
- * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided 
- * that the above copyright notice appear in all copies and that both that 
- * copyright notice and this permission notice appear in supporting 
- * documentation, and that the name of M.I.T. not be used in advertising
- * or publicity pertaining to distribution of the software without specific, 
- * written prior permission. M.I.T. makes no representations about the 
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * X Window System is a Trademark of MIT.
- *
- */
-
-
-/*
- *	Xlib.h - Header definition and support file for the C subroutine
- *	interface library (Xlib) to the X Window System Protocol (V11).
- *	Structures and symbols starting with "_" are private to the library.
- */
-#ifndef _XLIB_H_
-#define _XLIB_H_
-
-#define XlibSpecificationRelease 5
-
-#ifdef MAC_TCL
-#   include <X.h>
-#   define Cursor XCursor
-#   define Region XRegion
-#else
-#   include <X11/X.h>
-#endif
-
-/* applications should not depend on these two headers being included! */
-#ifdef MAC_TCL
-#include <Xfuncproto.h>
-#else
-#include <X11/Xfuncproto.h>
-#endif
-
-#ifndef X_WCHAR
-#ifdef X_NOT_STDC_ENV
-#define X_WCHAR
-#endif
-#endif
-
-#ifndef X_WCHAR
-#include <stddef.h>
-#else
-/* replace this with #include or typedef appropriate for your system */
-typedef unsigned long wchar_t;
-#endif
-
-typedef char *XPointer;
-
-#define Bool int
-#ifdef MAC_TCL
-#define Status int
-#else
-typedef int Status;
-#endif
-#define True 1
-#define False 0
-
-#define QueuedAlready 0
-#define QueuedAfterReading 1
-#define QueuedAfterFlush 2
-
-#define ConnectionNumber(dpy) 	((dpy)->fd)
-#define RootWindow(dpy, scr) 	(((dpy)->screens[(scr)]).root)
-#define DefaultScreen(dpy) 	((dpy)->default_screen)
-#define DefaultRootWindow(dpy) 	(((dpy)->screens[(dpy)->default_screen]).root)
-#define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
-#define DefaultGC(dpy, scr) 	(((dpy)->screens[(scr)]).default_gc)
-#define BlackPixel(dpy, scr) 	(((dpy)->screens[(scr)]).black_pixel)
-#define WhitePixel(dpy, scr) 	(((dpy)->screens[(scr)]).white_pixel)
-#define AllPlanes 		((unsigned long)~0L)
-#define QLength(dpy) 		((dpy)->qlen)
-#define DisplayWidth(dpy, scr) 	(((dpy)->screens[(scr)]).width)
-#define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
-#define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
-#define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
-#define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
-#define DisplayCells(dpy, scr) 	(DefaultVisual((dpy), (scr))->map_entries)
-#define ScreenCount(dpy) 	((dpy)->nscreens)
-#define ServerVendor(dpy) 	((dpy)->vendor)
-#define ProtocolVersion(dpy) 	((dpy)->proto_major_version)
-#define ProtocolRevision(dpy) 	((dpy)->proto_minor_version)
-#define VendorRelease(dpy) 	((dpy)->release)
-#define DisplayString(dpy) 	((dpy)->display_name)
-#define DefaultDepth(dpy, scr) 	(((dpy)->screens[(scr)]).root_depth)
-#define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
-#define BitmapUnit(dpy) 	((dpy)->bitmap_unit)
-#define BitmapBitOrder(dpy) 	((dpy)->bitmap_bit_order)
-#define BitmapPad(dpy) 		((dpy)->bitmap_pad)
-#define ImageByteOrder(dpy) 	((dpy)->byte_order)
-#define NextRequest(dpy)	((dpy)->request + 1)
-#define LastKnownRequestProcessed(dpy)	((dpy)->request)
-
-/* macros for screen oriented applications (toolkit) */
-#define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
-#define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
-#define DisplayOfScreen(s)	((s)->display)
-#define RootWindowOfScreen(s)	((s)->root)
-#define BlackPixelOfScreen(s)	((s)->black_pixel)
-#define WhitePixelOfScreen(s)	((s)->white_pixel)
-#define DefaultColormapOfScreen(s)((s)->cmap)
-#define DefaultDepthOfScreen(s)	((s)->root_depth)
-#define DefaultGCOfScreen(s)	((s)->default_gc)
-#define DefaultVisualOfScreen(s)((s)->root_visual)
-#define WidthOfScreen(s)	((s)->width)
-#define HeightOfScreen(s)	((s)->height)
-#define WidthMMOfScreen(s)	((s)->mwidth)
-#define HeightMMOfScreen(s)	((s)->mheight)
-#define PlanesOfScreen(s)	((s)->root_depth)
-#define CellsOfScreen(s)	(DefaultVisualOfScreen((s))->map_entries)
-#define MinCmapsOfScreen(s)	((s)->min_maps)
-#define MaxCmapsOfScreen(s)	((s)->max_maps)
-#define DoesSaveUnders(s)	((s)->save_unders)
-#define DoesBackingStore(s)	((s)->backing_store)
-#define EventMaskOfScreen(s)	((s)->root_input_mask)
-
-/*
- * Extensions need a way to hang private data on some structures.
- */
-typedef struct _XExtData {
-	int number;		/* number returned by XRegisterExtension */
-	struct _XExtData *next;	/* next item on list of data for structure */
-	int (*free_private)();	/* called to free private storage */
-	XPointer private_data;	/* data private to this extension. */
-} XExtData;
-
-/*
- * This file contains structures used by the extension mechanism.
- */
-typedef struct {		/* public to extension, cannot be changed */
-	int extension;		/* extension number */
-	int major_opcode;	/* major op-code assigned by server */
-	int first_event;	/* first event number for the extension */
-	int first_error;	/* first error number for the extension */
-} XExtCodes;
-
-/*
- * Data structure for retrieving info about pixmap formats.
- */
-
-typedef struct {
-    int depth;
-    int bits_per_pixel;
-    int scanline_pad;
-} XPixmapFormatValues;
-
-
-/*
- * Data structure for setting graphics context.
- */
-typedef struct {
-	int function;		/* logical operation */
-	unsigned long plane_mask;/* plane mask */
-	unsigned long foreground;/* foreground pixel */
-	unsigned long background;/* background pixel */
-	int line_width;		/* line width */
-	int line_style;	 	/* LineSolid, LineOnOffDash, LineDoubleDash */
-	int cap_style;	  	/* CapNotLast, CapButt, 
-				   CapRound, CapProjecting */
-	int join_style;	 	/* JoinMiter, JoinRound, JoinBevel */
-	int fill_style;	 	/* FillSolid, FillTiled, 
-				   FillStippled, FillOpaeueStippled */
-	int fill_rule;	  	/* EvenOddRule, WindingRule */
-	int arc_mode;		/* ArcChord, ArcPieSlice */
-	Pixmap tile;		/* tile pixmap for tiling operations */
-	Pixmap stipple;		/* stipple 1 plane pixmap for stipping */
-	int ts_x_origin;	/* offset for tile or stipple operations */
-	int ts_y_origin;
-        Font font;	        /* default text font for text operations */
-	int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
-	Bool graphics_exposures;/* boolean, should exposures be generated */
-	int clip_x_origin;	/* origin for clipping */
-	int clip_y_origin;
-	Pixmap clip_mask;	/* bitmap clipping; other calls for rects */
-	int dash_offset;	/* patterned/dashed line information */
-	char dashes;
-} XGCValues;
-
-/*
- * Graphics context.  The contents of this structure are implementation
- * dependent.  A GC should be treated as opaque by application code.
- */
-
-typedef XGCValues *GC;
-
-/*
- * Visual structure; contains information about colormapping possible.
- */
-typedef struct {
-	XExtData *ext_data;	/* hook for extension to hang data */
-	VisualID visualid;	/* visual id of this visual */
-#if defined(__cplusplus) || defined(c_plusplus)
-	int c_class;		/* C++ class of screen (monochrome, etc.) */
-#else
-	int class;		/* class of screen (monochrome, etc.) */
-#endif
-	unsigned long red_mask, green_mask, blue_mask;	/* mask values */
-	int bits_per_rgb;	/* log base 2 of distinct color values */
-	int map_entries;	/* color map entries */
-} Visual;
-
-/*
- * Depth structure; contains information for each possible depth.
- */	
-typedef struct {
-	int depth;		/* this depth (Z) of the depth */
-	int nvisuals;		/* number of Visual types at this depth */
-	Visual *visuals;	/* list of visuals possible at this depth */
-} Depth;
-
-/*
- * Information about the screen.  The contents of this structure are
- * implementation dependent.  A Screen should be treated as opaque
- * by application code.
- */
-typedef struct {
-	XExtData *ext_data;	/* hook for extension to hang data */
-	struct _XDisplay *display;/* back pointer to display structure */
-	Window root;		/* Root window id. */
-	int width, height;	/* width and height of screen */
-	int mwidth, mheight;	/* width and height of  in millimeters */
-	int ndepths;		/* number of depths possible */
-	Depth *depths;		/* list of allowable depths on the screen */
-	int root_depth;		/* bits per pixel */
-	Visual *root_visual;	/* root visual */
-	GC default_gc;		/* GC for the root root visual */
-	Colormap cmap;		/* default color map */
-	unsigned long white_pixel;
-	unsigned long black_pixel;	/* White and Black pixel values */
-	int max_maps, min_maps;	/* max and min color maps */
-	int backing_store;	/* Never, WhenMapped, Always */
-	Bool save_unders;	
-	long root_input_mask;	/* initial root input mask */
-} Screen;
-
-/*
- * Format structure; describes ZFormat data the screen will understand.
- */
-typedef struct {
-	XExtData *ext_data;	/* hook for extension to hang data */
-	int depth;		/* depth of this image format */
-	int bits_per_pixel;	/* bits/pixel at this depth */
-	int scanline_pad;	/* scanline must padded to this multiple */
-} ScreenFormat;
-
-/*
- * Data structure for setting window attributes.
- */
-typedef struct {
-    Pixmap background_pixmap;	/* background or None or ParentRelative */
-    unsigned long background_pixel;	/* background pixel */
-    Pixmap border_pixmap;	/* border of the window */
-    unsigned long border_pixel;	/* border pixel value */
-    int bit_gravity;		/* one of bit gravity values */
-    int win_gravity;		/* one of the window gravity values */
-    int backing_store;		/* NotUseful, WhenMapped, Always */
-    unsigned long backing_planes;/* planes to be preseved if possible */
-    unsigned long backing_pixel;/* value to use in restoring planes */
-    Bool save_under;		/* should bits under be saved? (popups) */
-    long event_mask;		/* set of events that should be saved */
-    long do_not_propagate_mask;	/* set of events that should not propagate */
-    Bool override_redirect;	/* boolean value for override-redirect */
-    Colormap colormap;		/* color map to be associated with window */
-    Cursor cursor;		/* cursor to be displayed (or None) */
-} XSetWindowAttributes;
-
-typedef struct {
-    int x, y;			/* location of window */
-    int width, height;		/* width and height of window */
-    int border_width;		/* border width of window */
-    int depth;          	/* depth of window */
-    Visual *visual;		/* the associated visual structure */
-    Window root;        	/* root of screen containing window */
-#if defined(__cplusplus) || defined(c_plusplus)
-    int c_class;		/* C++ InputOutput, InputOnly*/
-#else
-    int class;			/* InputOutput, InputOnly*/
-#endif
-    int bit_gravity;		/* one of bit gravity values */
-    int win_gravity;		/* one of the window gravity values */
-    int backing_store;		/* NotUseful, WhenMapped, Always */
-    unsigned long backing_planes;/* planes to be preserved if possible */
-    unsigned long backing_pixel;/* value to be used when restoring planes */
-    Bool save_under;		/* boolean, should bits under be saved? */
-    Colormap colormap;		/* color map to be associated with window */
-    Bool map_installed;		/* boolean, is color map currently installed*/
-    int map_state;		/* IsUnmapped, IsUnviewable, IsViewable */
-    long all_event_masks;	/* set of events all people have interest in*/
-    long your_event_mask;	/* my event mask */
-    long do_not_propagate_mask; /* set of events that should not propagate */
-    Bool override_redirect;	/* boolean value for override-redirect */
-    Screen *screen;		/* back pointer to correct screen */
-} XWindowAttributes;
-
-/*
- * Data structure for host setting; getting routines.
- *
- */
-
-typedef struct {
-	int family;		/* for example FamilyInternet */
-	int length;		/* length of address, in bytes */
-	char *address;		/* pointer to where to find the bytes */
-} XHostAddress;
-
-/*
- * Data structure for "image" data, used by image manipulation routines.
- */
-typedef struct _XImage {
-    int width, height;		/* size of image */
-    int xoffset;		/* number of pixels offset in X direction */
-    int format;			/* XYBitmap, XYPixmap, ZPixmap */
-    char *data;			/* pointer to image data */
-    int byte_order;		/* data byte order, LSBFirst, MSBFirst */
-    int bitmap_unit;		/* quant. of scanline 8, 16, 32 */
-    int bitmap_bit_order;	/* LSBFirst, MSBFirst */
-    int bitmap_pad;		/* 8, 16, 32 either XY or ZPixmap */
-    int depth;			/* depth of image */
-    int bytes_per_line;		/* accelarator to next line */
-    int bits_per_pixel;		/* bits per pixel (ZPixmap) */
-    unsigned long red_mask;	/* bits in z arrangment */
-    unsigned long green_mask;
-    unsigned long blue_mask;
-    XPointer obdata;		/* hook for the object routines to hang on */
-    struct funcs {		/* image manipulation routines */
-	struct _XImage *(*create_image)();
-#if NeedFunctionPrototypes
-	int (*destroy_image)        (struct _XImage *);
-	unsigned long (*get_pixel)  (struct _XImage *, int, int);
-	int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
-	struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
-	int (*add_pixel)            (struct _XImage *, long);
-#else
-	int (*destroy_image)();
-	unsigned long (*get_pixel)();
-	int (*put_pixel)();
-	struct _XImage *(*sub_image)();
-	int (*add_pixel)();
-#endif
-	} f;
-} XImage;
-
-/* 
- * Data structure for XReconfigureWindow
- */
-typedef struct {
-    int x, y;
-    int width, height;
-    int border_width;
-    Window sibling;
-    int stack_mode;
-} XWindowChanges;
-
-/*
- * Data structure used by color operations
- */
-typedef struct {
-	unsigned long pixel;
-	unsigned short red, green, blue;
-	char flags;  /* do_red, do_green, do_blue */
-	char pad;
-} XColor;
-
-/* 
- * Data structures for graphics operations.  On most machines, these are
- * congruent with the wire protocol structures, so reformatting the data
- * can be avoided on these architectures.
- */
-typedef struct {
-    short x1, y1, x2, y2;
-} XSegment;
-
-typedef struct {
-    short x, y;
-} XPoint;
-    
-typedef struct {
-    short x, y;
-    unsigned short width, height;
-} XRectangle;
-    
-typedef struct {
-    short x, y;
-    unsigned short width, height;
-    short angle1, angle2;
-} XArc;
-
-
-/* Data structure for XChangeKeyboardControl */
-
-typedef struct {
-        int key_click_percent;
-        int bell_percent;
-        int bell_pitch;
-        int bell_duration;
-        int led;
-        int led_mode;
-        int key;
-        int auto_repeat_mode;   /* On, Off, Default */
-} XKeyboardControl;
-
-/* Data structure for XGetKeyboardControl */
-
-typedef struct {
-        int key_click_percent;
-	int bell_percent;
-	unsigned int bell_pitch, bell_duration;
-	unsigned long led_mask;
-	int global_auto_repeat;
-	char auto_repeats[32];
-} XKeyboardState;
-
-/* Data structure for XGetMotionEvents.  */
-
-typedef struct {
-        Time time;
-	short x, y;
-} XTimeCoord;
-
-/* Data structure for X{Set,Get}ModifierMapping */
-
-typedef struct {
- 	int max_keypermod;	/* The server's max # of keys per modifier */
- 	KeyCode *modifiermap;	/* An 8 by max_keypermod array of modifiers */
-} XModifierKeymap;
-
-
-/*
- * Display datatype maintaining display specific data.
- * The contents of this structure are implementation dependent.
- * A Display should be treated as opaque by application code.
- */
-typedef struct _XDisplay {
-	XExtData *ext_data;	/* hook for extension to hang data */
-	struct _XFreeFuncs *free_funcs; /* internal free functions */
-	int fd;			/* Network socket. */
-	int conn_checker;         /* ugly thing used by _XEventsQueued */
-	int proto_major_version;/* maj. version of server's X protocol */
-	int proto_minor_version;/* minor version of servers X protocol */
-	char *vendor;		/* vendor of the server hardware */
-        XID resource_base;	/* resource ID base */
-	XID resource_mask;	/* resource ID mask bits */
-	XID resource_id;	/* allocator current ID */
-	int resource_shift;	/* allocator shift to correct bits */
-	XID (*resource_alloc)(); /* allocator function */
-	int byte_order;		/* screen byte order, LSBFirst, MSBFirst */
-	int bitmap_unit;	/* padding and data requirements */
-	int bitmap_pad;		/* padding requirements on bitmaps */
-	int bitmap_bit_order;	/* LeastSignificant or MostSignificant */
-	int nformats;		/* number of pixmap formats in list */
-	ScreenFormat *pixmap_format;	/* pixmap format list */
-	int vnumber;		/* Xlib's X protocol version number. */
-	int release;		/* release of the server */
-	struct _XSQEvent *head, *tail;	/* Input event queue. */
-	int qlen;		/* Length of input event queue */
-	unsigned long request;	/* sequence number of last request. */
-	char *last_req;		/* beginning of last request, or dummy */
-	char *buffer;		/* Output buffer starting address. */
-	char *bufptr;		/* Output buffer index pointer. */
-	char *bufmax;		/* Output buffer maximum+1 address. */
-	unsigned max_request_size; /* maximum number 32 bit words in request*/
-	struct _XrmHashBucketRec *db;
-	int (*synchandler)();	/* Synchronization handler */
-	char *display_name;	/* "host:display" string used on this connect*/
-	int default_screen;	/* default screen for operations */
-	int nscreens;		/* number of screens on this server*/
-	Screen *screens;	/* pointer to list of screens */
-	unsigned long motion_buffer;	/* size of motion buffer */
-	unsigned long flags;	/* internal connection flags */
-	int min_keycode;	/* minimum defined keycode */
-	int max_keycode;	/* maximum defined keycode */
-	KeySym *keysyms;	/* This server's keysyms */
-	XModifierKeymap *modifiermap;	/* This server's modifier keymap */
-	int keysyms_per_keycode;/* number of rows */
-	char *xdefaults;	/* contents of defaults from server */
-	char *scratch_buffer;	/* place to hang scratch buffer */
-	unsigned long scratch_length;	/* length of scratch buffer */
-	int ext_number;		/* extension number on this display */
-	struct _XExten *ext_procs; /* extensions initialized on this display */
-	/*
-	 * the following can be fixed size, as the protocol defines how
-	 * much address space is available. 
-	 * While this could be done using the extension vector, there
-	 * may be MANY events processed, so a search through the extension
-	 * list to find the right procedure for each event might be
-	 * expensive if many extensions are being used.
-	 */
-	Bool (*event_vec[128])();  /* vector for wire to event */
-	Status (*wire_vec[128])(); /* vector for event to wire */
-	KeySym lock_meaning;	   /* for XLookupString */
-	struct _XLockInfo *lock;   /* multi-thread state, display lock */
-	struct _XInternalAsync *async_handlers; /* for internal async */
-	unsigned long bigreq_size; /* max size of big requests */
-	struct _XLockPtrs *lock_fns; /* pointers to threads functions */
-	/* things above this line should not move, for binary compatibility */
-	struct _XKeytrans *key_bindings; /* for XLookupString */
-	Font cursor_font;	   /* for XCreateFontCursor */
-	struct _XDisplayAtoms *atoms; /* for XInternAtom */
-	unsigned int mode_switch;  /* keyboard group modifiers */
-	struct _XContextDB *context_db; /* context database */
-	Bool (**error_vec)();      /* vector for wire to error */
-	/*
-	 * Xcms information
-	 */
-	struct {
-	   XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
-	   XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
-	   XPointer perVisualIntensityMaps;
-				  /* linked list of XcmsIntensityMap */
-	} cms;
-	struct _XIMFilter *im_filters;
-	struct _XSQEvent *qfree; /* unallocated event queue elements */
-	unsigned long next_event_serial_num; /* inserted into next queue elt */
-	int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
-} Display;
-
-#if NeedFunctionPrototypes	/* prototypes require event type definitions */
-#undef _XEVENT_
-#endif
-#ifndef _XEVENT_
-
-#define XMaxTransChars 4
-
-/*
- * Definitions of specific events.
- */
-typedef struct {
-	int type;		/* of event */
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;	        /* "event" window it is reported relative to */
-	Window root;	        /* root window that the event occured on */
-	Window subwindow;	/* child window */
-	Time time;		/* milliseconds */
-	int x, y;		/* pointer x, y coordinates in event window */
-	int x_root, y_root;	/* coordinates relative to root */
-	unsigned int state;	/* key or button mask */
-	unsigned int keycode;	/* detail */
-	Bool same_screen;	/* same screen flag */
-        char trans_chars[XMaxTransChars];
-				/* translated characters */
-	int nbytes;
-} XKeyEvent;
-typedef XKeyEvent XKeyPressedEvent;
-typedef XKeyEvent XKeyReleasedEvent;
-
-typedef struct {
-	int type;		/* of event */
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;	        /* "event" window it is reported relative to */
-	Window root;	        /* root window that the event occured on */
-	Window subwindow;	/* child window */
-	Time time;		/* milliseconds */
-	int x, y;		/* pointer x, y coordinates in event window */
-	int x_root, y_root;	/* coordinates relative to root */
-	unsigned int state;	/* key or button mask */
-	unsigned int button;	/* detail */
-	Bool same_screen;	/* same screen flag */
-} XButtonEvent;
-typedef XButtonEvent XButtonPressedEvent;
-typedef XButtonEvent XButtonReleasedEvent;
-
-typedef struct {
-	int type;		/* of event */
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;	        /* "event" window reported relative to */
-	Window root;	        /* root window that the event occured on */
-	Window subwindow;	/* child window */
-	Time time;		/* milliseconds */
-	int x, y;		/* pointer x, y coordinates in event window */
-	int x_root, y_root;	/* coordinates relative to root */
-	unsigned int state;	/* key or button mask */
-	char is_hint;		/* detail */
-	Bool same_screen;	/* same screen flag */
-} XMotionEvent;
-typedef XMotionEvent XPointerMovedEvent;
-
-typedef struct {
-	int type;		/* of event */
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;	        /* "event" window reported relative to */
-	Window root;	        /* root window that the event occured on */
-	Window subwindow;	/* child window */
-	Time time;		/* milliseconds */
-	int x, y;		/* pointer x, y coordinates in event window */
-	int x_root, y_root;	/* coordinates relative to root */
-	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */
-	int detail;
-	/*
-	 * NotifyAncestor, NotifyVirtual, NotifyInferior, 
-	 * NotifyNonlinear,NotifyNonlinearVirtual
-	 */
-	Bool same_screen;	/* same screen flag */
-	Bool focus;		/* boolean focus */
-	unsigned int state;	/* key or button mask */
-} XCrossingEvent;
-typedef XCrossingEvent XEnterWindowEvent;
-typedef XCrossingEvent XLeaveWindowEvent;
-
-typedef struct {
-	int type;		/* FocusIn or FocusOut */
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;		/* window of event */
-	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */
-	int detail;
-	/*
-	 * NotifyAncestor, NotifyVirtual, NotifyInferior, 
-	 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
-	 * NotifyPointerRoot, NotifyDetailNone 
-	 */
-} XFocusChangeEvent;
-typedef XFocusChangeEvent XFocusInEvent;
-typedef XFocusChangeEvent XFocusOutEvent;
-
-/* generated on EnterWindow and FocusIn  when KeyMapState selected */
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	char key_vector[32];
-} XKeymapEvent;	
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	int x, y;
-	int width, height;
-	int count;		/* if non-zero, at least this many more */
-} XExposeEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Drawable drawable;
-	int x, y;
-	int width, height;
-	int count;		/* if non-zero, at least this many more */
-	int major_code;		/* core is CopyArea or CopyPlane */
-	int minor_code;		/* not defined in the core */
-} XGraphicsExposeEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Drawable drawable;
-	int major_code;		/* core is CopyArea or CopyPlane */
-	int minor_code;		/* not defined in the core */
-} XNoExposeEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	int state;		/* Visibility state */
-} XVisibilityEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window parent;		/* parent of the window */
-	Window window;		/* window id of window created */
-	int x, y;		/* window location */
-	int width, height;	/* size of window */
-	int border_width;	/* border width */
-	Bool override_redirect;	/* creation should be overridden */
-} XCreateWindowEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-} XDestroyWindowEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	Bool from_configure;
-} XUnmapEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	Bool override_redirect;	/* boolean, is override set... */
-} XMapEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window parent;
-	Window window;
-} XMapRequestEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	Window parent;
-	int x, y;
-	Bool override_redirect;
-} XReparentEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	int x, y;
-	int width, height;
-	int border_width;
-	Window above;
-	Bool override_redirect;
-} XConfigureEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	int x, y;
-} XGravityEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	int width, height;
-} XResizeRequestEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window parent;
-	Window window;
-	int x, y;
-	int width, height;
-	int border_width;
-	Window above;
-	int detail;		/* Above, Below, TopIf, BottomIf, Opposite */
-	unsigned long value_mask;
-} XConfigureRequestEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window event;
-	Window window;
-	int place;		/* PlaceOnTop, PlaceOnBottom */
-} XCirculateEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window parent;
-	Window window;
-	int place;		/* PlaceOnTop, PlaceOnBottom */
-} XCirculateRequestEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	Atom atom;
-	Time time;
-	int state;		/* NewValue, Deleted */
-} XPropertyEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	Atom selection;
-	Time time;
-} XSelectionClearEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window owner;
-	Window requestor;
-	Atom selection;
-	Atom target;
-	Atom property;
-	Time time;
-} XSelectionRequestEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window requestor;
-	Atom selection;
-	Atom target;
-	Atom property;		/* ATOM or None */
-	Time time;
-} XSelectionEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	Colormap colormap;	/* COLORMAP or None */
-#if defined(__cplusplus) || defined(c_plusplus)
-	Bool c_new;		/* C++ */
-#else
-	Bool new;
-#endif
-	int state;		/* ColormapInstalled, ColormapUninstalled */
-} XColormapEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;
-	Atom message_type;
-	int format;
-	union {
-		char b[20];
-		short s[10];
-		long l[5];
-		} data;
-} XClientMessageEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;	/* Display the event was read from */
-	Window window;		/* unused */
-	int request;		/* one of MappingModifier, MappingKeyboard,
-				   MappingPointer */
-	int first_keycode;	/* first keycode */
-	int count;		/* defines range of change w. first_keycode*/
-} XMappingEvent;
-
-typedef struct {
-	int type;
-	Display *display;	/* Display the event was read from */
-	XID resourceid;		/* resource id */
-	unsigned long serial;	/* serial number of failed request */
-	unsigned char error_code;	/* error code of failed request */
-	unsigned char request_code;	/* Major op-code of failed request */
-	unsigned char minor_code;	/* Minor op-code of failed request */
-} XErrorEvent;
-
-typedef struct {
-	int type;
-	unsigned long serial;	/* # of last request processed by server */
-	Bool send_event;	/* true if this came from a SendEvent request */
-	Display *display;/* Display the event was read from */
-	Window window;	/* window on which event was requested in event mask */
-} XAnyEvent;
-
-/*
- * this union is defined so Xlib can always use the same sized
- * event structure internally, to avoid memory fragmentation.
- */
-typedef union _XEvent {
-        int type;		/* must not be changed; first element */
-	XAnyEvent xany;
-	XKeyEvent xkey;
-	XButtonEvent xbutton;
-	XMotionEvent xmotion;
-	XCrossingEvent xcrossing;
-	XFocusChangeEvent xfocus;
-	XExposeEvent xexpose;
-	XGraphicsExposeEvent xgraphicsexpose;
-	XNoExposeEvent xnoexpose;
-	XVisibilityEvent xvisibility;
-	XCreateWindowEvent xcreatewindow;
-	XDestroyWindowEvent xdestroywindow;
-	XUnmapEvent xunmap;
-	XMapEvent xmap;
-	XMapRequestEvent xmaprequest;
-	XReparentEvent xreparent;
-	XConfigureEvent xconfigure;
-	XGravityEvent xgravity;
-	XResizeRequestEvent xresizerequest;
-	XConfigureRequestEvent xconfigurerequest;
-	XCirculateEvent xcirculate;
-	XCirculateRequestEvent xcirculaterequest;
-	XPropertyEvent xproperty;
-	XSelectionClearEvent xselectionclear;
-	XSelectionRequestEvent xselectionrequest;
-	XSelectionEvent xselection;
-	XColormapEvent xcolormap;
-	XClientMessageEvent xclient;
-	XMappingEvent xmapping;
-	XErrorEvent xerror;
-	XKeymapEvent xkeymap;
-	long pad[24];
-} XEvent;
-#endif
-
-#define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
-
-/*
- * per character font metric information.
- */
-typedef struct {
-    short	lbearing;	/* origin to left edge of raster */
-    short	rbearing;	/* origin to right edge of raster */
-    short	width;		/* advance to next char's origin */
-    short	ascent;		/* baseline to top edge of raster */
-    short	descent;	/* baseline to bottom edge of raster */
-    unsigned short attributes;	/* per char flags (not predefined) */
-} XCharStruct;
-
-/*
- * To allow arbitrary information with fonts, there are additional properties
- * returned.
- */
-typedef struct {
-    Atom name;
-    unsigned long card32;
-} XFontProp;
-
-typedef struct {
-    XExtData	*ext_data;	/* hook for extension to hang data */
-    Font        fid;            /* Font id for this font */
-    unsigned	direction;	/* hint about direction the font is painted */
-    unsigned	min_char_or_byte2;/* first character */
-    unsigned	max_char_or_byte2;/* last character */
-    unsigned	min_byte1;	/* first row that exists */
-    unsigned	max_byte1;	/* last row that exists */
-    Bool	all_chars_exist;/* flag if all characters have non-zero size*/
-    unsigned	default_char;	/* char to print for undefined character */
-    int         n_properties;   /* how many properties there are */
-    XFontProp	*properties;	/* pointer to array of additional properties*/
-    XCharStruct	min_bounds;	/* minimum bounds over all existing char*/
-    XCharStruct	max_bounds;	/* maximum bounds over all existing char*/
-    XCharStruct	*per_char;	/* first_char to last_char information */
-    int		ascent;		/* log. extent above baseline for spacing */
-    int		descent;	/* log. descent below baseline for spacing */
-} XFontStruct;
-
-/*
- * PolyText routines take these as arguments.
- */
-typedef struct {
-    char *chars;		/* pointer to string */
-    int nchars;			/* number of characters */
-    int delta;			/* delta between strings */
-    Font font;			/* font to print it in, None don't change */
-} XTextItem;
-
-typedef struct {		/* normal 16 bit characters are two bytes */
-    unsigned char byte1;
-    unsigned char byte2;
-} XChar2b;
-
-typedef struct {
-    XChar2b *chars;		/* two byte characters */
-    int nchars;			/* number of characters */
-    int delta;			/* delta between strings */
-    Font font;			/* font to print it in, None don't change */
-} XTextItem16;
-
-
-typedef union { Display *display;
-		GC gc;
-		Visual *visual;
-		Screen *screen;
-		ScreenFormat *pixmap_format;
-		XFontStruct *font; } XEDataObject;
-
-typedef struct {
-    XRectangle      max_ink_extent;
-    XRectangle      max_logical_extent;
-} XFontSetExtents;
-
-typedef struct _XFontSet *XFontSet;
-
-typedef struct {
-    char           *chars;
-    int             nchars;
-    int             delta;
-    XFontSet        font_set;
-} XmbTextItem;
-
-typedef struct {
-    wchar_t        *chars;
-    int             nchars;
-    int             delta;
-    XFontSet        font_set;
-} XwcTextItem;
-
-typedef void (*XIMProc)();
-
-typedef struct _XIM *XIM;
-typedef struct _XIC *XIC;
-
-typedef unsigned long XIMStyle;
-
-typedef struct {
-    unsigned short count_styles;
-    XIMStyle *supported_styles;
-} XIMStyles;
-
-#define XIMPreeditArea		0x0001L
-#define XIMPreeditCallbacks	0x0002L
-#define XIMPreeditPosition	0x0004L
-#define XIMPreeditNothing	0x0008L
-#define XIMPreeditNone		0x0010L
-#define XIMStatusArea		0x0100L
-#define XIMStatusCallbacks	0x0200L
-#define XIMStatusNothing	0x0400L
-#define XIMStatusNone		0x0800L
-
-#define XNVaNestedList "XNVaNestedList"
-#define XNClientWindow "clientWindow"
-#define XNInputStyle "inputStyle"
-#define XNFocusWindow "focusWindow"
-#define XNResourceName "resourceName"
-#define XNResourceClass "resourceClass"
-#define XNGeometryCallback "geometryCallback"
-#define XNFilterEvents "filterEvents"
-#define XNPreeditStartCallback "preeditStartCallback"
-#define XNPreeditDoneCallback "preeditDoneCallback"
-#define XNPreeditDrawCallback "preeditDrawCallback"
-#define XNPreeditCaretCallback "preeditCaretCallback"
-#define XNPreeditAttributes "preeditAttributes"
-#define XNStatusStartCallback "statusStartCallback"
-#define XNStatusDoneCallback "statusDoneCallback"
-#define XNStatusDrawCallback "statusDrawCallback"
-#define XNStatusAttributes "statusAttributes"
-#define XNArea "area"
-#define XNAreaNeeded "areaNeeded"
-#define XNSpotLocation "spotLocation"
-#define XNColormap "colorMap"
-#define XNStdColormap "stdColorMap"
-#define XNForeground "foreground"
-#define XNBackground "background"
-#define XNBackgroundPixmap "backgroundPixmap"
-#define XNFontSet "fontSet"
-#define XNLineSpace "lineSpace"
-#define XNCursor "cursor"
-
-#define XBufferOverflow		-1
-#define XLookupNone		1
-#define XLookupChars		2
-#define XLookupKeySym		3
-#define XLookupBoth		4
-
-#if NeedFunctionPrototypes
-typedef void *XVaNestedList;
-#else
-typedef XPointer XVaNestedList;
-#endif
-
-typedef struct {
-    XPointer client_data;
-    XIMProc callback;
-} XIMCallback;
-
-typedef unsigned long XIMFeedback;
-
-#define XIMReverse	1
-#define XIMUnderline	(1<<1) 
-#define XIMHighlight	(1<<2)
-#define XIMPrimary 	(1<<5)
-#define XIMSecondary	(1<<6)
-#define XIMTertiary 	(1<<7)
-
-typedef struct _XIMText {
-    unsigned short length;
-    XIMFeedback *feedback;
-    Bool encoding_is_wchar; 
-    union {
-	char *multi_byte;
-	wchar_t *wide_char;
-    } string; 
-} XIMText;
-
-typedef struct _XIMPreeditDrawCallbackStruct {
-    int caret;		/* Cursor offset within pre-edit string */
-    int chg_first;	/* Starting change position */
-    int chg_length;	/* Length of the change in character count */
-    XIMText *text;
-} XIMPreeditDrawCallbackStruct;
-
-typedef enum {
-    XIMForwardChar, XIMBackwardChar,
-    XIMForwardWord, XIMBackwardWord,
-    XIMCaretUp, XIMCaretDown,
-    XIMNextLine, XIMPreviousLine,
-    XIMLineStart, XIMLineEnd, 
-    XIMAbsolutePosition,
-    XIMDontChange
-} XIMCaretDirection;
-
-typedef enum {
-    XIMIsInvisible,	/* Disable caret feedback */ 
-    XIMIsPrimary,	/* UI defined caret feedback */
-    XIMIsSecondary	/* UI defined caret feedback */
-} XIMCaretStyle;
-
-typedef struct _XIMPreeditCaretCallbackStruct {
-    int position;		 /* Caret offset within pre-edit string */
-    XIMCaretDirection direction; /* Caret moves direction */
-    XIMCaretStyle style;	 /* Feedback of the caret */
-} XIMPreeditCaretCallbackStruct;
-
-typedef enum {
-    XIMTextType,
-    XIMBitmapType
-} XIMStatusDataType;
-	
-typedef struct _XIMStatusDrawCallbackStruct {
-    XIMStatusDataType type;
-    union {
-	XIMText *text;
-	Pixmap  bitmap;
-    } data;
-} XIMStatusDrawCallbackStruct;
-
-typedef int (*XErrorHandler) (	    /* WARNING, this type not in Xlib spec */
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XErrorEvent*	/* error_event */
-#endif
-);
-
-_XFUNCPROTOBEGIN
-
-#include "X11/Xutil.h"
-
-extern void XSetDashes(Display * display, GC gc, int dash_offset, 
-	_Xconst char* dash_list, int n);
-
-extern XModifierKeymap *XGetModifierMapping(Display *display);
-
-extern XImage *XCreateImage(Display *display, Visual *visual, unsigned int ui1,
-	int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3, 
-	int i3, int i4);
-
-extern XImage *XGetImage(Display* display,Drawable dr, int i1, int i2, 
-	unsigned int ui1, unsigned int ui2, unsigned long ul, int i3);
-
-extern char *XGetAtomName(Display *d, Atom a);
-
-extern char *XKeysymToString(KeySym k);
-
-extern Colormap XCreateColormap(Display *d, Window w, Visual* v, 
-	int i);
-
-extern Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,	
-	XColor* x1, XColor* x2, unsigned int ui1, unsigned int ui2);
-
-extern Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, 
-	unsigned int ui1, unsigned int ui2, XColor* x1, XColor* x2);
-
-extern GContext XGContextFromGC(GC g);
-
-extern XHostAddress *XListHosts(Display *d, int* i, Bool* b);
-
-extern KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i);
-
-extern KeySym XStringToKeysym(_Xconst char* c);
-
-extern Window XRootWindow(Display *d, int i);
-
-extern XErrorHandler XSetErrorHandler(XErrorHandler x);
-
-extern Status XIconifyWindow(Display *d, Window w, int i);
-
-extern Status XWithdrawWindow(Display *d, Window w, int i);
-
-extern Status XGetWMColormapWindows(Display *d, Window w, Window** wpp, 
-	int* ip);
-
-extern Status XAllocColor(Display *d, Colormap c, XColor* xp);
-
-extern void XBell(Display *d, int i);
-
-extern void XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, 
-	int i2, _Xconst unsigned char* c, int i3);
-
-extern void XChangeWindowAttributes(Display *d, Window w, unsigned long ul, 
-	XSetWindowAttributes* x);
-
-extern void XClearWindow(Display *d, Window w);
-
-extern void XConfigureWindow(Display *d, Window w, unsigned int i, 
-	XWindowChanges* x);
-
-extern void XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, 
-	int i2, unsigned int ui1, unsigned int ui2, int i3, int i4);
-
-extern void XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, 
-	int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, 
-	unsigned long ul);
-
-extern Pixmap XCreateBitmapFromData(Display *display, Drawable d, 
-	_Xconst char* data, unsigned int width, unsigned int height);
-
-extern void XDefineCursor(Display *d, Window w, Cursor c);
-
-extern void XDeleteProperty(Display *d, Window w, Atom a);
-
-extern void XDestroyWindow(Display *d, Window w);
-
-extern void XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, 
-	unsigned int ui1, unsigned int ui2, int i3, int i4);
-
-extern void XDrawLines(Display *d, Drawable dr, GC g, XPoint* x, int i1, 
-	int i2);
-
-extern void XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, 
-	unsigned int ui1, unsigned int ui2);
-
-extern void XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, 
-	unsigned int ui1, unsigned int ui2, int i3, int i4);
-
-extern void XFillPolygon(Display *d, Drawable dr, GC g, XPoint* x, int i1,
-	int i2, int i3);
-
-extern void XFillRectangles(Display *d, Drawable dr, GC g, XRectangle* x, 
-	int i);
-
-extern void XForceScreenSaver(Display *d, int i);
-
-extern void XFreeColormap(Display *d, Colormap c);
-
-extern void XFreeColors(Display *d, Colormap c, unsigned long* ulp, int i, 
-	unsigned long ul);
-
-extern void XFreeCursor(Display *d, Cursor c);
-
-extern void XFreeModifiermap(XModifierKeymap* x);
-
-extern Status XGetGeometry(Display *d, Drawable dr, Window* w, int* i1, 
-	int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3, 
-	unsigned int* ui4);
-
-extern void XGetInputFocus(Display *d, Window* w, int* i);
-
-extern int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2,
-	Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1, 
-	unsigned long* ulp2, unsigned char** cpp);
-
-extern Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes* x);
-
-extern int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t);
-
-extern int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1,
-	int i2, Window w2, Cursor c, Time t);
-
-extern KeyCode XKeysymToKeycode(Display *d, KeySym k);
-
-extern Status XLookupColor(Display *d, Colormap c1, _Xconst char* c2, 
-	XColor* x1, XColor* x2);
-
-extern void XMapWindow(Display *d, Window w);
-
-extern void XMoveResizeWindow(Display *d, Window w, int i1, int i2, 
-	unsigned int ui1, unsigned int ui2);
-
-extern void XMoveWindow(Display *d, Window w, int i1, int i2);
-
-extern void XNextEvent(Display *d, XEvent* x);
-
-extern void XPutBackEvent(Display *d, XEvent* x);
-
-extern void XQueryColors(Display *d, Colormap c, XColor* x, int i);
-
-extern Bool XQueryPointer(Display *d, Window w1, Window* w2, Window* w3, 
-	int* i1, int* i2, int* i3, int* i4, unsigned int* ui);
-
-extern Status XQueryTree(Display *d, Window w1, Window* w2, Window* w3, 
-	Window** w4, unsigned int* ui);
-
-extern void XRaiseWindow(Display *d, Window w);
-
-extern void XRefreshKeyboardMapping(XMappingEvent* x);
-
-extern void XResizeWindow(Display *d, Window w, unsigned int ui1, 
-	unsigned int ui2);
-
-extern void XSelectInput(Display *d, Window w, long l);
-
-extern Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent* x);
-
-extern void XSetCommand(Display *d, Window w, CONST char** c, int i);
-
-extern void XSetIconName(Display *d, Window w, _Xconst char* c);
-
-extern void XSetInputFocus(Display *d, Window w, int i, Time t);
-
-extern void XSetSelectionOwner(Display *d, Atom a, Window w, Time t);
-
-extern void XSetWindowBackground(Display *d, Window w, unsigned long ul);
-
-extern void XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p);
-
-extern void XSetWindowBorder(Display *d, Window w, unsigned long ul);
-
-extern void XSetWindowBorderPixmap(Display *d, Window w, Pixmap p);
-
-extern void XSetWindowBorderWidth(Display *d, Window w, unsigned int ui);
-
-extern void XSetWindowColormap(Display *d, Window w, Colormap c);
-
-extern Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, 
-	int i2, int* i3, int* i4, Window* w3);
-
-extern void XUngrabKeyboard(Display *d, Time t);
-
-extern void XUngrabPointer(Display *d, Time t);
-
-extern void XUnmapWindow(Display *d, Window w);
-
-extern void XWindowEvent(Display *d, Window w, long l, XEvent* x);
-
-extern void XDestroyIC(XIC x);
-
-extern Bool XFilterEvent(XEvent* x, Window w);
-
-extern int XmbLookupString(XIC xi, XKeyPressedEvent* xk, char* c, int i, 
-	KeySym* k, Status* s);
-
-extern void TkPutImage(unsigned long * colors, int ncolors, Display *display, 
-	Drawable d, GC gc, XImage* image, int src_x, int src_y, 
-	int dest_x, int dest_y, unsigned int width, unsigned int height);
-
-extern Status XParseColor(Display * display, Colormap map, _Xconst char* spec, 
-	XColor * colorPtr);
-
-extern GC XCreateGC(Display *display, Drawable d, unsigned long valuemask, 
-	XGCValues* values);
-
-extern void XFreeGC(Display *display, GC gc);
-
-extern Atom XInternAtom(Display *display, _Xconst char* atom_name, 
-	Bool only_if_exists);
-
-extern void XSetBackground(Display *display, GC gc, unsigned long foreground);
-
-extern void XSetForeground(Display *display, GC gc, unsigned long foreground);
-
-extern void XSetClipMask(Display *display, GC gc, Pixmap pixmap);
-
-extern void XSetClipOrigin(Display *display, GC gc, int clip_x_origin, 
-	int clip_y_origin);
-
-extern void XSetTSOrigin(Display *display, GC gc, int ts_x_origin, 
-	int ts_y_origin);
-
-extern void XChangeGC(Display *display, GC gc, unsigned long mask, 
-	XGCValues * values);
-
-extern void XSetFont(Display *display, GC gc, Font font);
-
-extern void XSetArcMode(Display *display, GC gc, int arc_mode);
-
-extern void XSetStipple(Display * display, GC gc, 
-				Pixmap stipple);
-
-extern void XSetFillRule(Display *display, GC gc, int fill_rule);
-
-extern void XSetFillStyle(Display *display, GC gc, int fill_style);
-
-extern void XSetFunction(Display *display, GC gc, int function);
-
-extern void XSetLineAttributes(Display *display, GC gc, 
-	unsigned int line_width, int line_style, int cap_style, 
-	int join_style);
-
-extern int _XInitImageFuncPtrs(XImage * image);
-
-extern XIC XCreateIC(void);
-
-extern XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, 
-	XVisualInfo* vinfo_template, int* nitems_return);
-
-extern void XSetWMClientMachine(Display *display, Window w, 
-	XTextProperty* text_prop);
-
-extern Status XStringListToTextProperty(char** list, int count, 
-	XTextProperty* text_prop_return);
-
-extern void XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, 
-	int y2);
-
-extern void XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, 
-	unsigned int sw, unsigned int sh, int dx, int dy);
-
-extern void XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, 
-	unsigned int width, unsigned int height);
-
-_XFUNCPROTOEND
-
-#ifdef MAC_TCL
-#   undef Cursor
-#   undef Region
-#endif
-
-#endif /* _XLIB_H_ */
diff --git a/blt3.0/win/X11/Xutil.h b/blt3.0/win/X11/Xutil.h
deleted file mode 100644
index f6c0a36..0000000
--- a/blt3.0/win/X11/Xutil.h
+++ /dev/null
@@ -1,855 +0,0 @@
-/* $XConsortium: Xutil.h,v 11.73 91/07/30 16:21:37 rws Exp $ */
-
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef _XUTIL_H_
-#define _XUTIL_H_
-
-/* You must include <X11/Xlib.h> before including this file */
-
-#ifdef MAC_TCL
-#   define Region XRegion
-#endif
-
-/* 
- * Bitmask returned by XParseGeometry().  Each bit tells if the corresponding
- * value (x, y, width, height) was found in the parsed string.
- */
-#define NoValue		0x0000
-#define XValue  	0x0001
-#define YValue		0x0002
-#define WidthValue  	0x0004
-#define HeightValue  	0x0008
-#define AllValues 	0x000F
-#define XNegative 	0x0010
-#define YNegative 	0x0020
-
-/*
- * new version containing base_width, base_height, and win_gravity fields;
- * used with WM_NORMAL_HINTS.
- */
-typedef struct {
-    	long flags;	/* marks which fields in this structure are defined */
-	int x, y;		/* obsolete for new window mgrs, but clients */
-	int width, height;	/* should set so old wm's don't mess up */
-	int min_width, min_height;
-	int max_width, max_height;
-    	int width_inc, height_inc;
-	struct {
-		int x;	/* numerator */
-		int y;	/* denominator */
-	} min_aspect, max_aspect;
-	int base_width, base_height;		/* added by ICCCM version 1 */
-	int win_gravity;			/* added by ICCCM version 1 */
-} XSizeHints;
-
-/*
- * The next block of definitions are for window manager properties that
- * clients and applications use for communication.
- */
-
-/* flags argument in size hints */
-#define USPosition	(1L << 0) /* user specified x, y */
-#define USSize		(1L << 1) /* user specified width, height */
-
-#define PPosition	(1L << 2) /* program specified position */
-#define PSize		(1L << 3) /* program specified size */
-#define PMinSize	(1L << 4) /* program specified minimum size */
-#define PMaxSize	(1L << 5) /* program specified maximum size */
-#define PResizeInc	(1L << 6) /* program specified resize increments */
-#define PAspect		(1L << 7) /* program specified min and max aspect ratios */
-#define PBaseSize	(1L << 8) /* program specified base for incrementing */
-#define PWinGravity	(1L << 9) /* program specified window gravity */
-
-/* obsolete */
-#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
-
-
-
-typedef struct {
-	long flags;	/* marks which fields in this structure are defined */
-	Bool input;	/* does this application rely on the window manager to
-			get keyboard input? */
-	int initial_state;	/* see below */
-	Pixmap icon_pixmap;	/* pixmap to be used as icon */
-	Window icon_window; 	/* window to be used as icon */
-	int icon_x, icon_y; 	/* initial position of icon */
-	Pixmap icon_mask;	/* icon mask bitmap */
-	XID window_group;	/* id of related window group */
-	/* this structure may be extended in the future */
-} XWMHints;
-
-/* definition for flags of XWMHints */
-
-#define InputHint 		(1L << 0)
-#define StateHint 		(1L << 1)
-#define IconPixmapHint		(1L << 2)
-#define IconWindowHint		(1L << 3)
-#define IconPositionHint 	(1L << 4)
-#define IconMaskHint		(1L << 5)
-#define WindowGroupHint		(1L << 6)
-#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
-IconPositionHint|IconMaskHint|WindowGroupHint)
-
-/* definitions for initial window state */
-#define WithdrawnState 0	/* for windows that are not mapped */
-#define NormalState 1	/* most applications want to start this way */
-#define IconicState 3	/* application wants to start as an icon */
-
-/*
- * Obsolete states no longer defined by ICCCM
- */
-#define DontCareState 0	/* don't know or care */
-#define ZoomState 2	/* application wants to start zoomed */
-#define InactiveState 4	/* application believes it is seldom used; */
-			/* some wm's may put it on inactive menu */
-
-
-/*
- * new structure for manipulating TEXT properties; used with WM_NAME, 
- * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
- */
-typedef struct {
-    unsigned char *value;		/* same as Property routines */
-    Atom encoding;			/* prop type */
-    int format;				/* prop data format: 8, 16, or 32 */
-    unsigned long nitems;		/* number of data items in value */
-} XTextProperty;
-
-#define XNoMemory -1
-#define XLocaleNotSupported -2
-#define XConverterNotFound -3
-
-typedef enum {
-    XStringStyle,		/* STRING */
-    XCompoundTextStyle,		/* COMPOUND_TEXT */
-    XTextStyle,			/* text in owner's encoding (current locale)*/
-    XStdICCTextStyle		/* STRING, else COMPOUND_TEXT */
-} XICCEncodingStyle;
-
-typedef struct {
-	int min_width, min_height;
-	int max_width, max_height;
-	int width_inc, height_inc;
-} XIconSize;
-
-typedef struct {
-	char *res_name;
-	char *res_class;
-} XClassHint;
-
-/*
- * These macros are used to give some sugar to the image routines so that
- * naive people are more comfortable with them.
- */
-#define XDestroyImage(ximage) \
-	((*((ximage)->f.destroy_image))((ximage)))
-#define XGetPixel(ximage, x, y) \
-	((*((ximage)->f.get_pixel))((ximage), (x), (y)))
-#define XPutPixel(ximage, x, y, pixel) \
-	((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
-#define XSubImage(ximage, x, y, width, height)  \
-	((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
-#define XAddPixel(ximage, value) \
-	((*((ximage)->f.add_pixel))((ximage), (value)))
-
-/*
- * Compose sequence status structure, used in calling XLookupString.
- */
-typedef struct _XComposeStatus {
-    XPointer compose_ptr;	/* state table pointer */
-    int chars_matched;		/* match state */
-} XComposeStatus;
-
-/*
- * Keysym macros, used on Keysyms to test for classes of symbols
- */
-#define IsKeypadKey(keysym) \
-  (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal))
-
-#define IsCursorKey(keysym) \
-  (((unsigned)(keysym) >= XK_Home)     && ((unsigned)(keysym) <  XK_Select))
-
-#define IsPFKey(keysym) \
-  (((unsigned)(keysym) >= XK_KP_F1)     && ((unsigned)(keysym) <= XK_KP_F4))
-
-#define IsFunctionKey(keysym) \
-  (((unsigned)(keysym) >= XK_F1)       && ((unsigned)(keysym) <= XK_F35))
-
-#define IsMiscFunctionKey(keysym) \
-  (((unsigned)(keysym) >= XK_Select)   && ((unsigned)(keysym) <= XK_Break))
-
-#define IsModifierKey(keysym) \
-  ((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \
-   || ((unsigned)(keysym) == XK_Mode_switch) \
-   || ((unsigned)(keysym) == XK_Num_Lock))
-/*
- * opaque reference to Region data type 
- */
-typedef struct _XRegion *Region; 
-
-/* Return values from XRectInRegion() */
- 
-#define RectangleOut 0
-#define RectangleIn  1
-#define RectanglePart 2
- 
-
-/*
- * Information used by the visual utility routines to find desired visual
- * type from the many visuals a display may support.
- */
-
-typedef struct {
-  Visual *visual;
-  VisualID visualid;
-  int screen;
-  int depth;
-#if defined(__cplusplus) || defined(c_plusplus)
-  int c_class;					/* C++ */
-#else
-  int class;
-#endif
-  unsigned long red_mask;
-  unsigned long green_mask;
-  unsigned long blue_mask;
-  int colormap_size;
-  int bits_per_rgb;
-} XVisualInfo;
-
-#define VisualNoMask		0x0
-#define VisualIDMask 		0x1
-#define VisualScreenMask	0x2
-#define VisualDepthMask		0x4
-#define VisualClassMask		0x8
-#define VisualRedMaskMask	0x10
-#define VisualGreenMaskMask	0x20
-#define VisualBlueMaskMask	0x40
-#define VisualColormapSizeMask	0x80
-#define VisualBitsPerRGBMask	0x100
-#define VisualAllMask		0x1FF
-
-/*
- * This defines a window manager property that clients may use to
- * share standard color maps of type RGB_COLOR_MAP:
- */
-typedef struct {
-	Colormap colormap;
-	unsigned long red_max;
-	unsigned long red_mult;
-	unsigned long green_max;
-	unsigned long green_mult;
-	unsigned long blue_max;
-	unsigned long blue_mult;
-	unsigned long base_pixel;
-	VisualID visualid;		/* added by ICCCM version 1 */
-	XID killid;			/* added by ICCCM version 1 */
-} XStandardColormap;
-
-#define ReleaseByFreeingColormap ((XID) 1L)  /* for killid field above */
-
-
-/*
- * return codes for XReadBitmapFile and XWriteBitmapFile
- */
-#define BitmapSuccess		0
-#define BitmapOpenFailed 	1
-#define BitmapFileInvalid 	2
-#define BitmapNoMemory		3
-
-/****************************************************************
- *
- * Context Management
- *
- ****************************************************************/
-
-
-/* Associative lookup table return codes */
-
-#define XCSUCCESS 0	/* No error. */
-#define XCNOMEM   1    /* Out of memory */
-#define XCNOENT   2    /* No entry in table */
-
-typedef int XContext;
-
-#define XUniqueContext()       ((XContext) XrmUniqueQuark())
-#define XStringToContext(string)   ((XContext) XrmStringToQuark(string))
-
-_XFUNCPROTOBEGIN
-
-/* The following declarations are alphabetized. */
-
-extern XClassHint *XAllocClassHint (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XIconSize *XAllocIconSize (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XSizeHints *XAllocSizeHints (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XStandardColormap *XAllocStandardColormap (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XWMHints *XAllocWMHints (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern void XClipBox(
-#if NeedFunctionPrototypes
-    Region		/* r */,
-    XRectangle*		/* rect_return */
-#endif
-);
-
-extern Region XCreateRegion(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern char *XDefaultString(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern int XDeleteContext(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XID			/* rid */,
-    XContext		/* context */
-#endif
-);
-
-extern void XDestroyRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */
-#endif
-);
-
-extern void XEmptyRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */
-#endif
-);
-
-extern void XEqualRegion(
-#if NeedFunctionPrototypes
-    Region		/* r1 */,
-    Region		/* r2 */
-#endif
-);
-
-extern int XFindContext(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XID			/* rid */,
-    XContext		/* context */,
-    XPointer*		/* data_return */
-#endif
-);
-
-extern Status XGetClassHint(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XClassHint*		/* class_hints_return */
-#endif
-);
-
-extern Status XGetIconSizes(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XIconSize**		/* size_list_return */,
-    int*		/* count_return */
-#endif
-);
-
-extern Status XGetNormalHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints_return */
-#endif
-);
-
-extern Status XGetRGBColormaps(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XStandardColormap** /* stdcmap_return */,
-    int*		/* count_return */,
-    Atom		/* property */
-#endif
-);
-
-extern Status XGetSizeHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints_return */,
-    Atom		/* property */
-#endif
-);
-
-extern Status XGetStandardColormap(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XStandardColormap*	/* colormap_return */,
-    Atom		/* property */			    
-#endif
-);
-
-extern Status XGetTextProperty(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* window */,
-    XTextProperty*	/* text_prop_return */,
-    Atom		/* property */
-#endif
-);
-
-
-extern Status XGetWMClientMachine(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop_return */
-#endif
-);
-
-extern XWMHints *XGetWMHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */		      
-#endif
-);
-
-extern Status XGetWMIconName(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop_return */
-#endif
-);
-
-extern Status XGetWMName(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop_return */
-#endif
-);
-
-extern Status XGetWMNormalHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints_return */,
-    long*		/* supplied_return */ 
-#endif
-);
-
-extern Status XGetWMSizeHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints_return */,
-    long*		/* supplied_return */,
-    Atom		/* property */
-#endif
-);
-
-extern Status XGetZoomHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* zhints_return */
-#endif
-);
-
-extern void XIntersectRegion(
-#if NeedFunctionPrototypes
-    Region		/* sra */,
-    Region		/* srb */,
-    Region		/* dr_return */
-#endif
-);
-
-extern int XLookupString(
-#if NeedFunctionPrototypes
-    XKeyEvent*		/* event_struct */,
-    char*		/* buffer_return */,
-    int			/* bytes_buffer */,
-    KeySym*		/* keysym_return */,
-    XComposeStatus*	/* status_in_out */
-#endif
-);
-
-extern Status XMatchVisualInfo(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    int			/* screen */,
-    int			/* depth */,
-    int			/* class */,
-    XVisualInfo*	/* vinfo_return */
-#endif
-);
-
-extern void XOffsetRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */,
-    int			/* dx */,
-    int			/* dy */
-#endif
-);
-
-extern Bool XPointInRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */,
-    int			/* x */,
-    int			/* y */
-#endif
-);
-
-extern Region XPolygonRegion(
-#if NeedFunctionPrototypes
-    XPoint*		/* points */,
-    int			/* n */,
-    int			/* fill_rule */
-#endif
-);
-
-extern int XRectInRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */,
-    int			/* x */,
-    int			/* y */,
-    unsigned int	/* width */,
-    unsigned int	/* height */
-#endif
-);
-
-extern int XSaveContext(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XID			/* rid */,
-    XContext		/* context */,
-    _Xconst char*	/* data */
-#endif
-);
-
-extern void XSetClassHint(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XClassHint*		/* class_hints */
-#endif
-);
-
-extern void XSetIconSizes(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XIconSize*		/* size_list */,
-    int			/* count */    
-#endif
-);
-
-extern void XSetNormalHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints */
-#endif
-);
-
-extern void XSetRGBColormaps(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XStandardColormap*	/* stdcmaps */,
-    int			/* count */,
-    Atom		/* property */
-#endif
-);
-
-extern void XSetSizeHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints */,
-    Atom		/* property */
-#endif
-);
-
-extern void XSetStandardProperties(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    _Xconst char*	/* window_name */,
-    _Xconst char*	/* icon_name */,
-    Pixmap		/* icon_pixmap */,
-    char**		/* argv */,
-    int			/* argc */,
-    XSizeHints*		/* hints */
-#endif
-);
-
-extern void XSetTextProperty(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop */,
-    Atom		/* property */
-#endif
-);
-
-extern void XSetWMHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XWMHints*		/* wm_hints */
-#endif
-);
-
-extern void XSetWMIconName(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop */
-#endif
-);
-
-extern void XSetWMName(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* text_prop */
-#endif
-);
-
-extern void XSetWMNormalHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints */
-#endif
-);
-
-extern void XSetWMProperties(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XTextProperty*	/* window_name */,
-    XTextProperty*	/* icon_name */,
-    char**		/* argv */,
-    int			/* argc */,
-    XSizeHints*		/* normal_hints */,
-    XWMHints*		/* wm_hints */,
-    XClassHint*		/* class_hints */
-#endif
-);
-
-extern void XmbSetWMProperties(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    _Xconst char*	/* window_name */,
-    _Xconst char*	/* icon_name */,
-    char**		/* argv */,
-    int			/* argc */,
-    XSizeHints*		/* normal_hints */,
-    XWMHints*		/* wm_hints */,
-    XClassHint*		/* class_hints */
-#endif
-);
-
-extern void XSetWMSizeHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* hints */,
-    Atom		/* property */
-#endif
-);
-
-extern void XSetRegion(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    GC			/* gc */,
-    Region		/* r */
-#endif
-);
-
-extern void XSetStandardColormap(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XStandardColormap*	/* colormap */,
-    Atom		/* property */
-#endif
-);
-
-extern void XSetZoomHints(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    Window		/* w */,
-    XSizeHints*		/* zhints */
-#endif
-);
-
-extern void XShrinkRegion(
-#if NeedFunctionPrototypes
-    Region		/* r */,
-    int			/* dx */,
-    int			/* dy */
-#endif
-);
-
-extern void XSubtractRegion(
-#if NeedFunctionPrototypes
-    Region		/* sra */,
-    Region		/* srb */,
-    Region		/* dr_return */
-#endif
-);
-
-extern int XmbTextListToTextProperty(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    char**		/* list */,
-    int			/* count */,
-    XICCEncodingStyle	/* style */,
-    XTextProperty*	/* text_prop_return */
-#endif
-);
-
-extern int XwcTextListToTextProperty(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    wchar_t**		/* list */,
-    int			/* count */,
-    XICCEncodingStyle	/* style */,
-    XTextProperty*	/* text_prop_return */
-#endif
-);
-
-extern void XwcFreeStringList(
-#if NeedFunctionPrototypes
-    wchar_t**		/* list */
-#endif
-);
-
-extern Status XTextPropertyToStringList(
-#if NeedFunctionPrototypes
-    XTextProperty*	/* text_prop */,
-    char***		/* list_return */,
-    int*		/* count_return */
-#endif
-);
-
-extern int XmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XTextProperty*	/* text_prop */,
-    char***		/* list_return */,
-    int*		/* count_return */
-#endif
-);
-
-extern int XwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    XTextProperty*	/* text_prop */,
-    wchar_t***		/* list_return */,
-    int*		/* count_return */
-#endif
-);
-
-extern void XUnionRectWithRegion(
-#if NeedFunctionPrototypes
-    XRectangle*		/* rectangle */,
-    Region		/* src_region */,
-    Region		/* dest_region_return */
-#endif
-);
-
-extern void XUnionRegion(
-#if NeedFunctionPrototypes
-    Region		/* sra */,
-    Region		/* srb */,
-    Region		/* dr_return */
-#endif
-);
-
-extern int XWMGeometry(
-#if NeedFunctionPrototypes
-    Display*		/* display */,
-    int			/* screen_number */,
-    _Xconst char*	/* user_geometry */,
-    _Xconst char*	/* default_geometry */,
-    unsigned int	/* border_width */,
-    XSizeHints*		/* hints */,
-    int*		/* x_return */,
-    int*		/* y_return */,
-    int*		/* width_return */,
-    int*		/* height_return */,
-    int*		/* gravity_return */
-#endif
-);
-
-extern void XXorRegion(
-#if NeedFunctionPrototypes
-    Region		/* sra */,
-    Region		/* srb */,
-    Region		/* dr_return */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#ifdef MAC_TCL
-#   undef Region
-#endif
-
-#endif /* _XUTIL_H_ */
diff --git a/blt3.0/win/X11/cursorfont.h b/blt3.0/win/X11/cursorfont.h
deleted file mode 100644
index 617274f..0000000
--- a/blt3.0/win/X11/cursorfont.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $XConsortium: cursorfont.h,v 1.2 88/09/06 16:44:27 jim Exp $ */
-#define XC_num_glyphs 154
-#define XC_X_cursor 0
-#define XC_arrow 2
-#define XC_based_arrow_down 4
-#define XC_based_arrow_up 6
-#define XC_boat 8
-#define XC_bogosity 10
-#define XC_bottom_left_corner 12
-#define XC_bottom_right_corner 14
-#define XC_bottom_side 16
-#define XC_bottom_tee 18
-#define XC_box_spiral 20
-#define XC_center_ptr 22
-#define XC_circle 24
-#define XC_clock 26
-#define XC_coffee_mug 28
-#define XC_cross 30
-#define XC_cross_reverse 32
-#define XC_crosshair 34
-#define XC_diamond_cross 36
-#define XC_dot 38
-#define XC_dotbox 40
-#define XC_double_arrow 42
-#define XC_draft_large 44
-#define XC_draft_small 46
-#define XC_draped_box 48
-#define XC_exchange 50
-#define XC_fleur 52
-#define XC_gobbler 54
-#define XC_gumby 56
-#define XC_hand1 58
-#define XC_hand2 60
-#define XC_heart 62
-#define XC_icon 64
-#define XC_iron_cross 66
-#define XC_left_ptr 68
-#define XC_left_side 70
-#define XC_left_tee 72
-#define XC_leftbutton 74
-#define XC_ll_angle 76
-#define XC_lr_angle 78
-#define XC_man 80
-#define XC_middlebutton 82
-#define XC_mouse 84
-#define XC_pencil 86
-#define XC_pirate 88
-#define XC_plus 90
-#define XC_question_arrow 92
-#define XC_right_ptr 94
-#define XC_right_side 96
-#define XC_right_tee 98
-#define XC_rightbutton 100
-#define XC_rtl_logo 102
-#define XC_sailboat 104
-#define XC_sb_down_arrow 106
-#define XC_sb_h_double_arrow 108
-#define XC_sb_left_arrow 110
-#define XC_sb_right_arrow 112
-#define XC_sb_up_arrow 114
-#define XC_sb_v_double_arrow 116
-#define XC_shuttle 118
-#define XC_sizing 120
-#define XC_spider 122
-#define XC_spraycan 124
-#define XC_star 126
-#define XC_target 128
-#define XC_tcross 130
-#define XC_top_left_arrow 132
-#define XC_top_left_corner 134
-#define XC_top_right_corner 136
-#define XC_top_side 138
-#define XC_top_tee 140
-#define XC_trek 142
-#define XC_ul_angle 144
-#define XC_umbrella 146
-#define XC_ur_angle 148
-#define XC_watch 150
-#define XC_xterm 152
diff --git a/blt3.0/win/X11/keysym.h b/blt3.0/win/X11/keysym.h
deleted file mode 100644
index 027afe0..0000000
--- a/blt3.0/win/X11/keysym.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* $XConsortium: keysym.h,v 1.13 91/03/13 20:09:49 rws Exp $ */
-
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-/* default keysyms */
-#define XK_MISCELLANY
-#define XK_LATIN1
-#define XK_LATIN2
-#define XK_LATIN3
-#define XK_LATIN4
-#define XK_GREEK
-
-#ifdef MAC_TCL
-#include <keysymdef.h>
-#else
-#include <X11/keysymdef.h>
-#endif
diff --git a/blt3.0/win/X11/keysymdef.h b/blt3.0/win/X11/keysymdef.h
deleted file mode 100644
index b22d41b..0000000
--- a/blt3.0/win/X11/keysymdef.h
+++ /dev/null
@@ -1,1169 +0,0 @@
-/* $XConsortium: keysymdef.h,v 1.15 93/04/02 10:57:36 rws Exp $ */
-
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#define XK_VoidSymbol		0xFFFFFF	/* void symbol */
-
-#ifdef XK_MISCELLANY
-/*
- * TTY Functions, cleverly chosen to map to ascii, for convenience of
- * programming, but could have been arbitrary (at the cost of lookup
- * tables in client code.
- */
-
-#define XK_BackSpace		0xFF08	/* back space, back char */
-#define XK_Tab			0xFF09
-#define XK_Linefeed		0xFF0A	/* Linefeed, LF */
-#define XK_Clear		0xFF0B
-#define XK_Return		0xFF0D	/* Return, enter */
-#define XK_Pause		0xFF13	/* Pause, hold */
-#define XK_Scroll_Lock		0xFF14
-#define XK_Sys_Req		0xFF15
-#define XK_Escape		0xFF1B
-#define XK_Delete		0xFFFF	/* Delete, rubout */
-
-
-
-/* International & multi-key character composition */
-
-#define XK_Multi_key		0xFF20  /* Multi-key character compose */
-
-/* Japanese keyboard support */
-
-#define XK_Kanji		0xFF21	/* Kanji, Kanji convert */
-#define XK_Muhenkan		0xFF22  /* Cancel Conversion */
-#define XK_Henkan_Mode		0xFF23  /* Start/Stop Conversion */
-#define XK_Henkan		0xFF23  /* Alias for Henkan_Mode */
-#define XK_Romaji		0xFF24  /* to Romaji */
-#define XK_Hiragana		0xFF25  /* to Hiragana */
-#define XK_Katakana		0xFF26  /* to Katakana */
-#define XK_Hiragana_Katakana	0xFF27  /* Hiragana/Katakana toggle */
-#define XK_Zenkaku		0xFF28  /* to Zenkaku */
-#define XK_Hankaku		0xFF29  /* to Hankaku */
-#define XK_Zenkaku_Hankaku	0xFF2A  /* Zenkaku/Hankaku toggle */
-#define XK_Touroku		0xFF2B  /* Add to Dictionary */
-#define XK_Massyo		0xFF2C  /* Delete from Dictionary */
-#define XK_Kana_Lock		0xFF2D  /* Kana Lock */
-#define XK_Kana_Shift		0xFF2E  /* Kana Shift */
-#define XK_Eisu_Shift		0xFF2F  /* Alphanumeric Shift */
-#define XK_Eisu_toggle		0xFF30  /* Alphanumeric toggle */
-
-/* Cursor control & motion */
-
-#define XK_Home			0xFF50
-#define XK_Left			0xFF51	/* Move left, left arrow */
-#define XK_Up			0xFF52	/* Move up, up arrow */
-#define XK_Right		0xFF53	/* Move right, right arrow */
-#define XK_Down			0xFF54	/* Move down, down arrow */
-#define XK_Prior		0xFF55	/* Prior, previous */
-#define XK_Page_Up		0xFF55
-#define XK_Next			0xFF56	/* Next */
-#define XK_Page_Down		0xFF56
-#define XK_End			0xFF57	/* EOL */
-#define XK_Begin		0xFF58	/* BOL */
-
-/* Special Windows keyboard keys */
-
-#define XK_Win_L		0xFF5B	/* Left-hand Windows */
-#define XK_Win_R		0xFF5C	/* Right-hand Windows */
-#define XK_App			0xFF5D	/* Menu key */
-
-/* Misc Functions */
-
-#define XK_Select		0xFF60	/* Select, mark */
-#define XK_Print		0xFF61
-#define XK_Execute		0xFF62	/* Execute, run, do */
-#define XK_Insert		0xFF63	/* Insert, insert here */
-#define XK_Undo			0xFF65	/* Undo, oops */
-#define XK_Redo			0xFF66	/* redo, again */
-#define XK_Menu			0xFF67
-#define XK_Find			0xFF68	/* Find, search */
-#define XK_Cancel		0xFF69	/* Cancel, stop, abort, exit */
-#define XK_Help			0xFF6A	/* Help, ? */
-#define XK_Break		0xFF6B
-#define XK_Mode_switch		0xFF7E	/* Character set switch */
-#define XK_script_switch        0xFF7E  /* Alias for mode_switch */
-#define XK_Num_Lock		0xFF7F
-
-/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
-
-#define XK_KP_Space		0xFF80	/* space */
-#define XK_KP_Tab		0xFF89
-#define XK_KP_Enter		0xFF8D	/* enter */
-#define XK_KP_F1		0xFF91	/* PF1, KP_A, ... */
-#define XK_KP_F2		0xFF92
-#define XK_KP_F3		0xFF93
-#define XK_KP_F4		0xFF94
-#define XK_KP_Home		0xFF95
-#define XK_KP_Left		0xFF96
-#define XK_KP_Up		0xFF97
-#define XK_KP_Right		0xFF98
-#define XK_KP_Down		0xFF99
-#define XK_KP_Prior		0xFF9A
-#define XK_KP_Page_Up		0xFF9A
-#define XK_KP_Next		0xFF9B
-#define XK_KP_Page_Down		0xFF9B
-#define XK_KP_End		0xFF9C
-#define XK_KP_Begin		0xFF9D
-#define XK_KP_Insert		0xFF9E
-#define XK_KP_Delete		0xFF9F
-#define XK_KP_Equal		0xFFBD	/* equals */
-#define XK_KP_Multiply		0xFFAA
-#define XK_KP_Add		0xFFAB
-#define XK_KP_Separator		0xFFAC	/* separator, often comma */
-#define XK_KP_Subtract		0xFFAD
-#define XK_KP_Decimal		0xFFAE
-#define XK_KP_Divide		0xFFAF
-
-#define XK_KP_0			0xFFB0
-#define XK_KP_1			0xFFB1
-#define XK_KP_2			0xFFB2
-#define XK_KP_3			0xFFB3
-#define XK_KP_4			0xFFB4
-#define XK_KP_5			0xFFB5
-#define XK_KP_6			0xFFB6
-#define XK_KP_7			0xFFB7
-#define XK_KP_8			0xFFB8
-#define XK_KP_9			0xFFB9
-
-
-
-/*
- * Auxilliary Functions; note the duplicate definitions for left and right
- * function keys;  Sun keyboards and a few other manufactures have such
- * function key groups on the left and/or right sides of the keyboard.
- * We've not found a keyboard with more than 35 function keys total.
- */
-
-#define XK_F1			0xFFBE
-#define XK_F2			0xFFBF
-#define XK_F3			0xFFC0
-#define XK_F4			0xFFC1
-#define XK_F5			0xFFC2
-#define XK_F6			0xFFC3
-#define XK_F7			0xFFC4
-#define XK_F8			0xFFC5
-#define XK_F9			0xFFC6
-#define XK_F10			0xFFC7
-#define XK_F11			0xFFC8
-#define XK_L1			0xFFC8
-#define XK_F12			0xFFC9
-#define XK_L2			0xFFC9
-#define XK_F13			0xFFCA
-#define XK_L3			0xFFCA
-#define XK_F14			0xFFCB
-#define XK_L4			0xFFCB
-#define XK_F15			0xFFCC
-#define XK_L5			0xFFCC
-#define XK_F16			0xFFCD
-#define XK_L6			0xFFCD
-#define XK_F17			0xFFCE
-#define XK_L7			0xFFCE
-#define XK_F18			0xFFCF
-#define XK_L8			0xFFCF
-#define XK_F19			0xFFD0
-#define XK_L9			0xFFD0
-#define XK_F20			0xFFD1
-#define XK_L10			0xFFD1
-#define XK_F21			0xFFD2
-#define XK_R1			0xFFD2
-#define XK_F22			0xFFD3
-#define XK_R2			0xFFD3
-#define XK_F23			0xFFD4
-#define XK_R3			0xFFD4
-#define XK_F24			0xFFD5
-#define XK_R4			0xFFD5
-#define XK_F25			0xFFD6
-#define XK_R5			0xFFD6
-#define XK_F26			0xFFD7
-#define XK_R6			0xFFD7
-#define XK_F27			0xFFD8
-#define XK_R7			0xFFD8
-#define XK_F28			0xFFD9
-#define XK_R8			0xFFD9
-#define XK_F29			0xFFDA
-#define XK_R9			0xFFDA
-#define XK_F30			0xFFDB
-#define XK_R10			0xFFDB
-#define XK_F31			0xFFDC
-#define XK_R11			0xFFDC
-#define XK_F32			0xFFDD
-#define XK_R12			0xFFDD
-#define XK_F33			0xFFDE
-#define XK_R13			0xFFDE
-#define XK_F34			0xFFDF
-#define XK_R14			0xFFDF
-#define XK_F35			0xFFE0
-#define XK_R15			0xFFE0
-
-/* Modifiers */
-
-#define XK_Shift_L		0xFFE1	/* Left shift */
-#define XK_Shift_R		0xFFE2	/* Right shift */
-#define XK_Control_L		0xFFE3	/* Left control */
-#define XK_Control_R		0xFFE4	/* Right control */
-#define XK_Caps_Lock		0xFFE5	/* Caps lock */
-#define XK_Shift_Lock		0xFFE6	/* Shift lock */
-
-#define XK_Meta_L		0xFFE7	/* Left meta */
-#define XK_Meta_R		0xFFE8	/* Right meta */
-#define XK_Alt_L		0xFFE9	/* Left alt */
-#define XK_Alt_R		0xFFEA	/* Right alt */
-#define XK_Super_L		0xFFEB	/* Left super */
-#define XK_Super_R		0xFFEC	/* Right super */
-#define XK_Hyper_L		0xFFED	/* Left hyper */
-#define XK_Hyper_R		0xFFEE	/* Right hyper */
-#endif /* XK_MISCELLANY */
-
-/*
- *  Latin 1
- *  Byte 3 = 0
- */
-#ifdef XK_LATIN1
-#define XK_space               0x020
-#define XK_exclam              0x021
-#define XK_quotedbl            0x022
-#define XK_numbersign          0x023
-#define XK_dollar              0x024
-#define XK_percent             0x025
-#define XK_ampersand           0x026
-#define XK_apostrophe          0x027
-#define XK_quoteright          0x027	/* deprecated */
-#define XK_parenleft           0x028
-#define XK_parenright          0x029
-#define XK_asterisk            0x02a
-#define XK_plus                0x02b
-#define XK_comma               0x02c
-#define XK_minus               0x02d
-#define XK_period              0x02e
-#define XK_slash               0x02f
-#define XK_0                   0x030
-#define XK_1                   0x031
-#define XK_2                   0x032
-#define XK_3                   0x033
-#define XK_4                   0x034
-#define XK_5                   0x035
-#define XK_6                   0x036
-#define XK_7                   0x037
-#define XK_8                   0x038
-#define XK_9                   0x039
-#define XK_colon               0x03a
-#define XK_semicolon           0x03b
-#define XK_less                0x03c
-#define XK_equal               0x03d
-#define XK_greater             0x03e
-#define XK_question            0x03f
-#define XK_at                  0x040
-#define XK_A                   0x041
-#define XK_B                   0x042
-#define XK_C                   0x043
-#define XK_D                   0x044
-#define XK_E                   0x045
-#define XK_F                   0x046
-#define XK_G                   0x047
-#define XK_H                   0x048
-#define XK_I                   0x049
-#define XK_J                   0x04a
-#define XK_K                   0x04b
-#define XK_L                   0x04c
-#define XK_M                   0x04d
-#define XK_N                   0x04e
-#define XK_O                   0x04f
-#define XK_P                   0x050
-#define XK_Q                   0x051
-#define XK_R                   0x052
-#define XK_S                   0x053
-#define XK_T                   0x054
-#define XK_U                   0x055
-#define XK_V                   0x056
-#define XK_W                   0x057
-#define XK_X                   0x058
-#define XK_Y                   0x059
-#define XK_Z                   0x05a
-#define XK_bracketleft         0x05b
-#define XK_backslash           0x05c
-#define XK_bracketright        0x05d
-#define XK_asciicircum         0x05e
-#define XK_underscore          0x05f
-#define XK_grave               0x060
-#define XK_quoteleft           0x060	/* deprecated */
-#define XK_a                   0x061
-#define XK_b                   0x062
-#define XK_c                   0x063
-#define XK_d                   0x064
-#define XK_e                   0x065
-#define XK_f                   0x066
-#define XK_g                   0x067
-#define XK_h                   0x068
-#define XK_i                   0x069
-#define XK_j                   0x06a
-#define XK_k                   0x06b
-#define XK_l                   0x06c
-#define XK_m                   0x06d
-#define XK_n                   0x06e
-#define XK_o                   0x06f
-#define XK_p                   0x070
-#define XK_q                   0x071
-#define XK_r                   0x072
-#define XK_s                   0x073
-#define XK_t                   0x074
-#define XK_u                   0x075
-#define XK_v                   0x076
-#define XK_w                   0x077
-#define XK_x                   0x078
-#define XK_y                   0x079
-#define XK_z                   0x07a
-#define XK_braceleft           0x07b
-#define XK_bar                 0x07c
-#define XK_braceright          0x07d
-#define XK_asciitilde          0x07e
-
-#define XK_nobreakspace        0x0a0
-#define XK_exclamdown          0x0a1
-#define XK_cent        	       0x0a2
-#define XK_sterling            0x0a3
-#define XK_currency            0x0a4
-#define XK_yen                 0x0a5
-#define XK_brokenbar           0x0a6
-#define XK_section             0x0a7
-#define XK_diaeresis           0x0a8
-#define XK_copyright           0x0a9
-#define XK_ordfeminine         0x0aa
-#define XK_guillemotleft       0x0ab	/* left angle quotation mark */
-#define XK_notsign             0x0ac
-#define XK_hyphen              0x0ad
-#define XK_registered          0x0ae
-#define XK_macron              0x0af
-#define XK_degree              0x0b0
-#define XK_plusminus           0x0b1
-#define XK_twosuperior         0x0b2
-#define XK_threesuperior       0x0b3
-#define XK_acute               0x0b4
-#define XK_mu                  0x0b5
-#define XK_paragraph           0x0b6
-#define XK_periodcentered      0x0b7
-#define XK_cedilla             0x0b8
-#define XK_onesuperior         0x0b9
-#define XK_masculine           0x0ba
-#define XK_guillemotright      0x0bb	/* right angle quotation mark */
-#define XK_onequarter          0x0bc
-#define XK_onehalf             0x0bd
-#define XK_threequarters       0x0be
-#define XK_questiondown        0x0bf
-#define XK_Agrave              0x0c0
-#define XK_Aacute              0x0c1
-#define XK_Acircumflex         0x0c2
-#define XK_Atilde              0x0c3
-#define XK_Adiaeresis          0x0c4
-#define XK_Aring               0x0c5
-#define XK_AE                  0x0c6
-#define XK_Ccedilla            0x0c7
-#define XK_Egrave              0x0c8
-#define XK_Eacute              0x0c9
-#define XK_Ecircumflex         0x0ca
-#define XK_Ediaeresis          0x0cb
-#define XK_Igrave              0x0cc
-#define XK_Iacute              0x0cd
-#define XK_Icircumflex         0x0ce
-#define XK_Idiaeresis          0x0cf
-#define XK_ETH                 0x0d0
-#define XK_Eth                 0x0d0	/* deprecated */
-#define XK_Ntilde              0x0d1
-#define XK_Ograve              0x0d2
-#define XK_Oacute              0x0d3
-#define XK_Ocircumflex         0x0d4
-#define XK_Otilde              0x0d5
-#define XK_Odiaeresis          0x0d6
-#define XK_multiply            0x0d7
-#define XK_Ooblique            0x0d8
-#define XK_Ugrave              0x0d9
-#define XK_Uacute              0x0da
-#define XK_Ucircumflex         0x0db
-#define XK_Udiaeresis          0x0dc
-#define XK_Yacute              0x0dd
-#define XK_THORN               0x0de
-#define XK_Thorn               0x0de	/* deprecated */
-#define XK_ssharp              0x0df
-#define XK_agrave              0x0e0
-#define XK_aacute              0x0e1
-#define XK_acircumflex         0x0e2
-#define XK_atilde              0x0e3
-#define XK_adiaeresis          0x0e4
-#define XK_aring               0x0e5
-#define XK_ae                  0x0e6
-#define XK_ccedilla            0x0e7
-#define XK_egrave              0x0e8
-#define XK_eacute              0x0e9
-#define XK_ecircumflex         0x0ea
-#define XK_ediaeresis          0x0eb
-#define XK_igrave              0x0ec
-#define XK_iacute              0x0ed
-#define XK_icircumflex         0x0ee
-#define XK_idiaeresis          0x0ef
-#define XK_eth                 0x0f0
-#define XK_ntilde              0x0f1
-#define XK_ograve              0x0f2
-#define XK_oacute              0x0f3
-#define XK_ocircumflex         0x0f4
-#define XK_otilde              0x0f5
-#define XK_odiaeresis          0x0f6
-#define XK_division            0x0f7
-#define XK_oslash              0x0f8
-#define XK_ugrave              0x0f9
-#define XK_uacute              0x0fa
-#define XK_ucircumflex         0x0fb
-#define XK_udiaeresis          0x0fc
-#define XK_yacute              0x0fd
-#define XK_thorn               0x0fe
-#define XK_ydiaeresis          0x0ff
-#endif /* XK_LATIN1 */
-
-/*
- *   Latin 2
- *   Byte 3 = 1
- */
-
-#ifdef XK_LATIN2
-#define XK_Aogonek             0x1a1
-#define XK_breve               0x1a2
-#define XK_Lstroke             0x1a3
-#define XK_Lcaron              0x1a5
-#define XK_Sacute              0x1a6
-#define XK_Scaron              0x1a9
-#define XK_Scedilla            0x1aa
-#define XK_Tcaron              0x1ab
-#define XK_Zacute              0x1ac
-#define XK_Zcaron              0x1ae
-#define XK_Zabovedot           0x1af
-#define XK_aogonek             0x1b1
-#define XK_ogonek              0x1b2
-#define XK_lstroke             0x1b3
-#define XK_lcaron              0x1b5
-#define XK_sacute              0x1b6
-#define XK_caron               0x1b7
-#define XK_scaron              0x1b9
-#define XK_scedilla            0x1ba
-#define XK_tcaron              0x1bb
-#define XK_zacute              0x1bc
-#define XK_doubleacute         0x1bd
-#define XK_zcaron              0x1be
-#define XK_zabovedot           0x1bf
-#define XK_Racute              0x1c0
-#define XK_Abreve              0x1c3
-#define XK_Lacute              0x1c5
-#define XK_Cacute              0x1c6
-#define XK_Ccaron              0x1c8
-#define XK_Eogonek             0x1ca
-#define XK_Ecaron              0x1cc
-#define XK_Dcaron              0x1cf
-#define XK_Dstroke             0x1d0
-#define XK_Nacute              0x1d1
-#define XK_Ncaron              0x1d2
-#define XK_Odoubleacute        0x1d5
-#define XK_Rcaron              0x1d8
-#define XK_Uring               0x1d9
-#define XK_Udoubleacute        0x1db
-#define XK_Tcedilla            0x1de
-#define XK_racute              0x1e0
-#define XK_abreve              0x1e3
-#define XK_lacute              0x1e5
-#define XK_cacute              0x1e6
-#define XK_ccaron              0x1e8
-#define XK_eogonek             0x1ea
-#define XK_ecaron              0x1ec
-#define XK_dcaron              0x1ef
-#define XK_dstroke             0x1f0
-#define XK_nacute              0x1f1
-#define XK_ncaron              0x1f2
-#define XK_odoubleacute        0x1f5
-#define XK_udoubleacute        0x1fb
-#define XK_rcaron              0x1f8
-#define XK_uring               0x1f9
-#define XK_tcedilla            0x1fe
-#define XK_abovedot            0x1ff
-#endif /* XK_LATIN2 */
-
-/*
- *   Latin 3
- *   Byte 3 = 2
- */
-
-#ifdef XK_LATIN3
-#define XK_Hstroke             0x2a1
-#define XK_Hcircumflex         0x2a6
-#define XK_Iabovedot           0x2a9
-#define XK_Gbreve              0x2ab
-#define XK_Jcircumflex         0x2ac
-#define XK_hstroke             0x2b1
-#define XK_hcircumflex         0x2b6
-#define XK_idotless            0x2b9
-#define XK_gbreve              0x2bb
-#define XK_jcircumflex         0x2bc
-#define XK_Cabovedot           0x2c5
-#define XK_Ccircumflex         0x2c6
-#define XK_Gabovedot           0x2d5
-#define XK_Gcircumflex         0x2d8
-#define XK_Ubreve              0x2dd
-#define XK_Scircumflex         0x2de
-#define XK_cabovedot           0x2e5
-#define XK_ccircumflex         0x2e6
-#define XK_gabovedot           0x2f5
-#define XK_gcircumflex         0x2f8
-#define XK_ubreve              0x2fd
-#define XK_scircumflex         0x2fe
-#endif /* XK_LATIN3 */
-
-
-/*
- *   Latin 4
- *   Byte 3 = 3
- */
-
-#ifdef XK_LATIN4
-#define XK_kra                 0x3a2
-#define XK_kappa               0x3a2	/* deprecated */
-#define XK_Rcedilla            0x3a3
-#define XK_Itilde              0x3a5
-#define XK_Lcedilla            0x3a6
-#define XK_Emacron             0x3aa
-#define XK_Gcedilla            0x3ab
-#define XK_Tslash              0x3ac
-#define XK_rcedilla            0x3b3
-#define XK_itilde              0x3b5
-#define XK_lcedilla            0x3b6
-#define XK_emacron             0x3ba
-#define XK_gcedilla            0x3bb
-#define XK_tslash              0x3bc
-#define XK_ENG                 0x3bd
-#define XK_eng                 0x3bf
-#define XK_Amacron             0x3c0
-#define XK_Iogonek             0x3c7
-#define XK_Eabovedot           0x3cc
-#define XK_Imacron             0x3cf
-#define XK_Ncedilla            0x3d1
-#define XK_Omacron             0x3d2
-#define XK_Kcedilla            0x3d3
-#define XK_Uogonek             0x3d9
-#define XK_Utilde              0x3dd
-#define XK_Umacron             0x3de
-#define XK_amacron             0x3e0
-#define XK_iogonek             0x3e7
-#define XK_eabovedot           0x3ec
-#define XK_imacron             0x3ef
-#define XK_ncedilla            0x3f1
-#define XK_omacron             0x3f2
-#define XK_kcedilla            0x3f3
-#define XK_uogonek             0x3f9
-#define XK_utilde              0x3fd
-#define XK_umacron             0x3fe
-#endif /* XK_LATIN4 */
-
-/*
- * Katakana
- * Byte 3 = 4
- */
-
-#ifdef XK_KATAKANA
-#define XK_overline				       0x47e
-#define XK_kana_fullstop                               0x4a1
-#define XK_kana_openingbracket                         0x4a2
-#define XK_kana_closingbracket                         0x4a3
-#define XK_kana_comma                                  0x4a4
-#define XK_kana_conjunctive                            0x4a5
-#define XK_kana_middledot                              0x4a5  /* deprecated */
-#define XK_kana_WO                                     0x4a6
-#define XK_kana_a                                      0x4a7
-#define XK_kana_i                                      0x4a8
-#define XK_kana_u                                      0x4a9
-#define XK_kana_e                                      0x4aa
-#define XK_kana_o                                      0x4ab
-#define XK_kana_ya                                     0x4ac
-#define XK_kana_yu                                     0x4ad
-#define XK_kana_yo                                     0x4ae
-#define XK_kana_tsu                                    0x4af
-#define XK_kana_tu                                     0x4af  /* deprecated */
-#define XK_prolongedsound                              0x4b0
-#define XK_kana_A                                      0x4b1
-#define XK_kana_I                                      0x4b2
-#define XK_kana_U                                      0x4b3
-#define XK_kana_E                                      0x4b4
-#define XK_kana_O                                      0x4b5
-#define XK_kana_KA                                     0x4b6
-#define XK_kana_KI                                     0x4b7
-#define XK_kana_KU                                     0x4b8
-#define XK_kana_KE                                     0x4b9
-#define XK_kana_KO                                     0x4ba
-#define XK_kana_SA                                     0x4bb
-#define XK_kana_SHI                                    0x4bc
-#define XK_kana_SU                                     0x4bd
-#define XK_kana_SE                                     0x4be
-#define XK_kana_SO                                     0x4bf
-#define XK_kana_TA                                     0x4c0
-#define XK_kana_CHI                                    0x4c1
-#define XK_kana_TI                                     0x4c1  /* deprecated */
-#define XK_kana_TSU                                    0x4c2
-#define XK_kana_TU                                     0x4c2  /* deprecated */
-#define XK_kana_TE                                     0x4c3
-#define XK_kana_TO                                     0x4c4
-#define XK_kana_NA                                     0x4c5
-#define XK_kana_NI                                     0x4c6
-#define XK_kana_NU                                     0x4c7
-#define XK_kana_NE                                     0x4c8
-#define XK_kana_NO                                     0x4c9
-#define XK_kana_HA                                     0x4ca
-#define XK_kana_HI                                     0x4cb
-#define XK_kana_FU                                     0x4cc
-#define XK_kana_HU                                     0x4cc  /* deprecated */
-#define XK_kana_HE                                     0x4cd
-#define XK_kana_HO                                     0x4ce
-#define XK_kana_MA                                     0x4cf
-#define XK_kana_MI                                     0x4d0
-#define XK_kana_MU                                     0x4d1
-#define XK_kana_ME                                     0x4d2
-#define XK_kana_MO                                     0x4d3
-#define XK_kana_YA                                     0x4d4
-#define XK_kana_YU                                     0x4d5
-#define XK_kana_YO                                     0x4d6
-#define XK_kana_RA                                     0x4d7
-#define XK_kana_RI                                     0x4d8
-#define XK_kana_RU                                     0x4d9
-#define XK_kana_RE                                     0x4da
-#define XK_kana_RO                                     0x4db
-#define XK_kana_WA                                     0x4dc
-#define XK_kana_N                                      0x4dd
-#define XK_voicedsound                                 0x4de
-#define XK_semivoicedsound                             0x4df
-#define XK_kana_switch          0xFF7E  /* Alias for mode_switch */
-#endif /* XK_KATAKANA */
-
-/*
- *  Arabic
- *  Byte 3 = 5
- */
-
-#ifdef XK_ARABIC
-#define XK_Arabic_comma                                0x5ac
-#define XK_Arabic_semicolon                            0x5bb
-#define XK_Arabic_question_mark                        0x5bf
-#define XK_Arabic_hamza                                0x5c1
-#define XK_Arabic_maddaonalef                          0x5c2
-#define XK_Arabic_hamzaonalef                          0x5c3
-#define XK_Arabic_hamzaonwaw                           0x5c4
-#define XK_Arabic_hamzaunderalef                       0x5c5
-#define XK_Arabic_hamzaonyeh                           0x5c6
-#define XK_Arabic_alef                                 0x5c7
-#define XK_Arabic_beh                                  0x5c8
-#define XK_Arabic_tehmarbuta                           0x5c9
-#define XK_Arabic_teh                                  0x5ca
-#define XK_Arabic_theh                                 0x5cb
-#define XK_Arabic_jeem                                 0x5cc
-#define XK_Arabic_hah                                  0x5cd
-#define XK_Arabic_khah                                 0x5ce
-#define XK_Arabic_dal                                  0x5cf
-#define XK_Arabic_thal                                 0x5d0
-#define XK_Arabic_ra                                   0x5d1
-#define XK_Arabic_zain                                 0x5d2
-#define XK_Arabic_seen                                 0x5d3
-#define XK_Arabic_sheen                                0x5d4
-#define XK_Arabic_sad                                  0x5d5
-#define XK_Arabic_dad                                  0x5d6
-#define XK_Arabic_tah                                  0x5d7
-#define XK_Arabic_zah                                  0x5d8
-#define XK_Arabic_ain                                  0x5d9
-#define XK_Arabic_ghain                                0x5da
-#define XK_Arabic_tatweel                              0x5e0
-#define XK_Arabic_feh                                  0x5e1
-#define XK_Arabic_qaf                                  0x5e2
-#define XK_Arabic_kaf                                  0x5e3
-#define XK_Arabic_lam                                  0x5e4
-#define XK_Arabic_meem                                 0x5e5
-#define XK_Arabic_noon                                 0x5e6
-#define XK_Arabic_ha                                   0x5e7
-#define XK_Arabic_heh                                  0x5e7  /* deprecated */
-#define XK_Arabic_waw                                  0x5e8
-#define XK_Arabic_alefmaksura                          0x5e9
-#define XK_Arabic_yeh                                  0x5ea
-#define XK_Arabic_fathatan                             0x5eb
-#define XK_Arabic_dammatan                             0x5ec
-#define XK_Arabic_kasratan                             0x5ed
-#define XK_Arabic_fatha                                0x5ee
-#define XK_Arabic_damma                                0x5ef
-#define XK_Arabic_kasra                                0x5f0
-#define XK_Arabic_shadda                               0x5f1
-#define XK_Arabic_sukun                                0x5f2
-#define XK_Arabic_switch        0xFF7E  /* Alias for mode_switch */
-#endif /* XK_ARABIC */
-
-/*
- * Cyrillic
- * Byte 3 = 6
- */
-#ifdef XK_CYRILLIC
-#define XK_Serbian_dje                                 0x6a1
-#define XK_Macedonia_gje                               0x6a2
-#define XK_Cyrillic_io                                 0x6a3
-#define XK_Ukrainian_ie                                0x6a4
-#define XK_Ukranian_je                                 0x6a4  /* deprecated */
-#define XK_Macedonia_dse                               0x6a5
-#define XK_Ukrainian_i                                 0x6a6
-#define XK_Ukranian_i                                  0x6a6  /* deprecated */
-#define XK_Ukrainian_yi                                0x6a7
-#define XK_Ukranian_yi                                 0x6a7  /* deprecated */
-#define XK_Cyrillic_je                                 0x6a8
-#define XK_Serbian_je                                  0x6a8  /* deprecated */
-#define XK_Cyrillic_lje                                0x6a9
-#define XK_Serbian_lje                                 0x6a9  /* deprecated */
-#define XK_Cyrillic_nje                                0x6aa
-#define XK_Serbian_nje                                 0x6aa  /* deprecated */
-#define XK_Serbian_tshe                                0x6ab
-#define XK_Macedonia_kje                               0x6ac
-#define XK_Byelorussian_shortu                         0x6ae
-#define XK_Cyrillic_dzhe                               0x6af
-#define XK_Serbian_dze                                 0x6af  /* deprecated */
-#define XK_numerosign                                  0x6b0
-#define XK_Serbian_DJE                                 0x6b1
-#define XK_Macedonia_GJE                               0x6b2
-#define XK_Cyrillic_IO                                 0x6b3
-#define XK_Ukrainian_IE                                0x6b4
-#define XK_Ukranian_JE                                 0x6b4  /* deprecated */
-#define XK_Macedonia_DSE                               0x6b5
-#define XK_Ukrainian_I                                 0x6b6
-#define XK_Ukranian_I                                  0x6b6  /* deprecated */
-#define XK_Ukrainian_YI                                0x6b7
-#define XK_Ukranian_YI                                 0x6b7  /* deprecated */
-#define XK_Cyrillic_JE                                 0x6b8
-#define XK_Serbian_JE                                  0x6b8  /* deprecated */
-#define XK_Cyrillic_LJE                                0x6b9
-#define XK_Serbian_LJE                                 0x6b9  /* deprecated */
-#define XK_Cyrillic_NJE                                0x6ba
-#define XK_Serbian_NJE                                 0x6ba  /* deprecated */
-#define XK_Serbian_TSHE                                0x6bb
-#define XK_Macedonia_KJE                               0x6bc
-#define XK_Byelorussian_SHORTU                         0x6be
-#define XK_Cyrillic_DZHE                               0x6bf
-#define XK_Serbian_DZE                                 0x6bf  /* deprecated */
-#define XK_Cyrillic_yu                                 0x6c0
-#define XK_Cyrillic_a                                  0x6c1
-#define XK_Cyrillic_be                                 0x6c2
-#define XK_Cyrillic_tse                                0x6c3
-#define XK_Cyrillic_de                                 0x6c4
-#define XK_Cyrillic_ie                                 0x6c5
-#define XK_Cyrillic_ef                                 0x6c6
-#define XK_Cyrillic_ghe                                0x6c7
-#define XK_Cyrillic_ha                                 0x6c8
-#define XK_Cyrillic_i                                  0x6c9
-#define XK_Cyrillic_shorti                             0x6ca
-#define XK_Cyrillic_ka                                 0x6cb
-#define XK_Cyrillic_el                                 0x6cc
-#define XK_Cyrillic_em                                 0x6cd
-#define XK_Cyrillic_en                                 0x6ce
-#define XK_Cyrillic_o                                  0x6cf
-#define XK_Cyrillic_pe                                 0x6d0
-#define XK_Cyrillic_ya                                 0x6d1
-#define XK_Cyrillic_er                                 0x6d2
-#define XK_Cyrillic_es                                 0x6d3
-#define XK_Cyrillic_te                                 0x6d4
-#define XK_Cyrillic_u                                  0x6d5
-#define XK_Cyrillic_zhe                                0x6d6
-#define XK_Cyrillic_ve                                 0x6d7
-#define XK_Cyrillic_softsign                           0x6d8
-#define XK_Cyrillic_yeru                               0x6d9
-#define XK_Cyrillic_ze                                 0x6da
-#define XK_Cyrillic_sha                                0x6db
-#define XK_Cyrillic_e                                  0x6dc
-#define XK_Cyrillic_shcha                              0x6dd
-#define XK_Cyrillic_che                                0x6de
-#define XK_Cyrillic_hardsign                           0x6df
-#define XK_Cyrillic_YU                                 0x6e0
-#define XK_Cyrillic_A                                  0x6e1
-#define XK_Cyrillic_BE                                 0x6e2
-#define XK_Cyrillic_TSE                                0x6e3
-#define XK_Cyrillic_DE                                 0x6e4
-#define XK_Cyrillic_IE                                 0x6e5
-#define XK_Cyrillic_EF                                 0x6e6
-#define XK_Cyrillic_GHE                                0x6e7
-#define XK_Cyrillic_HA                                 0x6e8
-#define XK_Cyrillic_I                                  0x6e9
-#define XK_Cyrillic_SHORTI                             0x6ea
-#define XK_Cyrillic_KA                                 0x6eb
-#define XK_Cyrillic_EL                                 0x6ec
-#define XK_Cyrillic_EM                                 0x6ed
-#define XK_Cyrillic_EN                                 0x6ee
-#define XK_Cyrillic_O                                  0x6ef
-#define XK_Cyrillic_PE                                 0x6f0
-#define XK_Cyrillic_YA                                 0x6f1
-#define XK_Cyrillic_ER                                 0x6f2
-#define XK_Cyrillic_ES                                 0x6f3
-#define XK_Cyrillic_TE                                 0x6f4
-#define XK_Cyrillic_U                                  0x6f5
-#define XK_Cyrillic_ZHE                                0x6f6
-#define XK_Cyrillic_VE                                 0x6f7
-#define XK_Cyrillic_SOFTSIGN                           0x6f8
-#define XK_Cyrillic_YERU                               0x6f9
-#define XK_Cyrillic_ZE                                 0x6fa
-#define XK_Cyrillic_SHA                                0x6fb
-#define XK_Cyrillic_E                                  0x6fc
-#define XK_Cyrillic_SHCHA                              0x6fd
-#define XK_Cyrillic_CHE                                0x6fe
-#define XK_Cyrillic_HARDSIGN                           0x6ff
-#endif /* XK_CYRILLIC */
-
-/*
- * Greek
- * Byte 3 = 7
- */
-
-#ifdef XK_GREEK
-#define XK_Greek_ALPHAaccent                           0x7a1
-#define XK_Greek_EPSILONaccent                         0x7a2
-#define XK_Greek_ETAaccent                             0x7a3
-#define XK_Greek_IOTAaccent                            0x7a4
-#define XK_Greek_IOTAdiaeresis                         0x7a5
-#define XK_Greek_OMICRONaccent                         0x7a7
-#define XK_Greek_UPSILONaccent                         0x7a8
-#define XK_Greek_UPSILONdieresis                       0x7a9
-#define XK_Greek_OMEGAaccent                           0x7ab
-#define XK_Greek_accentdieresis                        0x7ae
-#define XK_Greek_horizbar                              0x7af
-#define XK_Greek_alphaaccent                           0x7b1
-#define XK_Greek_epsilonaccent                         0x7b2
-#define XK_Greek_etaaccent                             0x7b3
-#define XK_Greek_iotaaccent                            0x7b4
-#define XK_Greek_iotadieresis                          0x7b5
-#define XK_Greek_iotaaccentdieresis                    0x7b6
-#define XK_Greek_omicronaccent                         0x7b7
-#define XK_Greek_upsilonaccent                         0x7b8
-#define XK_Greek_upsilondieresis                       0x7b9
-#define XK_Greek_upsilonaccentdieresis                 0x7ba
-#define XK_Greek_omegaaccent                           0x7bb
-#define XK_Greek_ALPHA                                 0x7c1
-#define XK_Greek_BETA                                  0x7c2
-#define XK_Greek_GAMMA                                 0x7c3
-#define XK_Greek_DELTA                                 0x7c4
-#define XK_Greek_EPSILON                               0x7c5
-#define XK_Greek_ZETA                                  0x7c6
-#define XK_Greek_ETA                                   0x7c7
-#define XK_Greek_THETA                                 0x7c8
-#define XK_Greek_IOTA                                  0x7c9
-#define XK_Greek_KAPPA                                 0x7ca
-#define XK_Greek_LAMDA                                 0x7cb
-#define XK_Greek_LAMBDA                                0x7cb
-#define XK_Greek_MU                                    0x7cc
-#define XK_Greek_NU                                    0x7cd
-#define XK_Greek_XI                                    0x7ce
-#define XK_Greek_OMICRON                               0x7cf
-#define XK_Greek_PI                                    0x7d0
-#define XK_Greek_RHO                                   0x7d1
-#define XK_Greek_SIGMA                                 0x7d2
-#define XK_Greek_TAU                                   0x7d4
-#define XK_Greek_UPSILON                               0x7d5
-#define XK_Greek_PHI                                   0x7d6
-#define XK_Greek_CHI                                   0x7d7
-#define XK_Greek_PSI                                   0x7d8
-#define XK_Greek_OMEGA                                 0x7d9
-#define XK_Greek_alpha                                 0x7e1
-#define XK_Greek_beta                                  0x7e2
-#define XK_Greek_gamma                                 0x7e3
-#define XK_Greek_delta                                 0x7e4
-#define XK_Greek_epsilon                               0x7e5
-#define XK_Greek_zeta                                  0x7e6
-#define XK_Greek_eta                                   0x7e7
-#define XK_Greek_theta                                 0x7e8
-#define XK_Greek_iota                                  0x7e9
-#define XK_Greek_kappa                                 0x7ea
-#define XK_Greek_lamda                                 0x7eb
-#define XK_Greek_lambda                                0x7eb
-#define XK_Greek_mu                                    0x7ec
-#define XK_Greek_nu                                    0x7ed
-#define XK_Greek_xi                                    0x7ee
-#define XK_Greek_omicron                               0x7ef
-#define XK_Greek_pi                                    0x7f0
-#define XK_Greek_rho                                   0x7f1
-#define XK_Greek_sigma                                 0x7f2
-#define XK_Greek_finalsmallsigma                       0x7f3
-#define XK_Greek_tau                                   0x7f4
-#define XK_Greek_upsilon                               0x7f5
-#define XK_Greek_phi                                   0x7f6
-#define XK_Greek_chi                                   0x7f7
-#define XK_Greek_psi                                   0x7f8
-#define XK_Greek_omega                                 0x7f9
-#define XK_Greek_switch         0xFF7E  /* Alias for mode_switch */
-#endif /* XK_GREEK */
-
-/*
- * Technical
- * Byte 3 = 8
- */
-
-#ifdef XK_TECHNICAL
-#define XK_leftradical                                 0x8a1
-#define XK_topleftradical                              0x8a2
-#define XK_horizconnector                              0x8a3
-#define XK_topintegral                                 0x8a4
-#define XK_botintegral                                 0x8a5
-#define XK_vertconnector                               0x8a6
-#define XK_topleftsqbracket                            0x8a7
-#define XK_botleftsqbracket                            0x8a8
-#define XK_toprightsqbracket                           0x8a9
-#define XK_botrightsqbracket                           0x8aa
-#define XK_topleftparens                               0x8ab
-#define XK_botleftparens                               0x8ac
-#define XK_toprightparens                              0x8ad
-#define XK_botrightparens                              0x8ae
-#define XK_leftmiddlecurlybrace                        0x8af
-#define XK_rightmiddlecurlybrace                       0x8b0
-#define XK_topleftsummation                            0x8b1
-#define XK_botleftsummation                            0x8b2
-#define XK_topvertsummationconnector                   0x8b3
-#define XK_botvertsummationconnector                   0x8b4
-#define XK_toprightsummation                           0x8b5
-#define XK_botrightsummation                           0x8b6
-#define XK_rightmiddlesummation                        0x8b7
-#define XK_lessthanequal                               0x8bc
-#define XK_notequal                                    0x8bd
-#define XK_greaterthanequal                            0x8be
-#define XK_integral                                    0x8bf
-#define XK_therefore                                   0x8c0
-#define XK_variation                                   0x8c1
-#define XK_infinity                                    0x8c2
-#define XK_nabla                                       0x8c5
-#define XK_approximate                                 0x8c8
-#define XK_similarequal                                0x8c9
-#define XK_ifonlyif                                    0x8cd
-#define XK_implies                                     0x8ce
-#define XK_identical                                   0x8cf
-#define XK_radical                                     0x8d6
-#define XK_includedin                                  0x8da
-#define XK_includes                                    0x8db
-#define XK_intersection                                0x8dc
-#define XK_union                                       0x8dd
-#define XK_logicaland                                  0x8de
-#define XK_logicalor                                   0x8df
-#define XK_partialderivative                           0x8ef
-#define XK_function                                    0x8f6
-#define XK_leftarrow                                   0x8fb
-#define XK_uparrow                                     0x8fc
-#define XK_rightarrow                                  0x8fd
-#define XK_downarrow                                   0x8fe
-#endif /* XK_TECHNICAL */
-
-/*
- *  Special
- *  Byte 3 = 9
- */
-
-#ifdef XK_SPECIAL
-#define XK_blank                                       0x9df
-#define XK_soliddiamond                                0x9e0
-#define XK_checkerboard                                0x9e1
-#define XK_ht                                          0x9e2
-#define XK_ff                                          0x9e3
-#define XK_cr                                          0x9e4
-#define XK_lf                                          0x9e5
-#define XK_nl                                          0x9e8
-#define XK_vt                                          0x9e9
-#define XK_lowrightcorner                              0x9ea
-#define XK_uprightcorner                               0x9eb
-#define XK_upleftcorner                                0x9ec
-#define XK_lowleftcorner                               0x9ed
-#define XK_crossinglines                               0x9ee
-#define XK_horizlinescan1                              0x9ef
-#define XK_horizlinescan3                              0x9f0
-#define XK_horizlinescan5                              0x9f1
-#define XK_horizlinescan7                              0x9f2
-#define XK_horizlinescan9                              0x9f3
-#define XK_leftt                                       0x9f4
-#define XK_rightt                                      0x9f5
-#define XK_bott                                        0x9f6
-#define XK_topt                                        0x9f7
-#define XK_vertbar                                     0x9f8
-#endif /* XK_SPECIAL */
-
-/*
- *  Publishing
- *  Byte 3 = a
- */
-
-#ifdef XK_PUBLISHING
-#define XK_emspace                                     0xaa1
-#define XK_enspace                                     0xaa2
-#define XK_em3space                                    0xaa3
-#define XK_em4space                                    0xaa4
-#define XK_digitspace                                  0xaa5
-#define XK_punctspace                                  0xaa6
-#define XK_thinspace                                   0xaa7
-#define XK_hairspace                                   0xaa8
-#define XK_emdash                                      0xaa9
-#define XK_endash                                      0xaaa
-#define XK_signifblank                                 0xaac
-#define XK_ellipsis                                    0xaae
-#define XK_doubbaselinedot                             0xaaf
-#define XK_onethird                                    0xab0
-#define XK_twothirds                                   0xab1
-#define XK_onefifth                                    0xab2
-#define XK_twofifths                                   0xab3
-#define XK_threefifths                                 0xab4
-#define XK_fourfifths                                  0xab5
-#define XK_onesixth                                    0xab6
-#define XK_fivesixths                                  0xab7
-#define XK_careof                                      0xab8
-#define XK_figdash                                     0xabb
-#define XK_leftanglebracket                            0xabc
-#define XK_decimalpoint                                0xabd
-#define XK_rightanglebracket                           0xabe
-#define XK_marker                                      0xabf
-#define XK_oneeighth                                   0xac3
-#define XK_threeeighths                                0xac4
-#define XK_fiveeighths                                 0xac5
-#define XK_seveneighths                                0xac6
-#define XK_trademark                                   0xac9
-#define XK_signaturemark                               0xaca
-#define XK_trademarkincircle                           0xacb
-#define XK_leftopentriangle                            0xacc
-#define XK_rightopentriangle                           0xacd
-#define XK_emopencircle                                0xace
-#define XK_emopenrectangle                             0xacf
-#define XK_leftsinglequotemark                         0xad0
-#define XK_rightsinglequotemark                        0xad1
-#define XK_leftdoublequotemark                         0xad2
-#define XK_rightdoublequotemark                        0xad3
-#define XK_prescription                                0xad4
-#define XK_minutes                                     0xad6
-#define XK_seconds                                     0xad7
-#define XK_latincross                                  0xad9
-#define XK_hexagram                                    0xada
-#define XK_filledrectbullet                            0xadb
-#define XK_filledlefttribullet                         0xadc
-#define XK_filledrighttribullet                        0xadd
-#define XK_emfilledcircle                              0xade
-#define XK_emfilledrect                                0xadf
-#define XK_enopencircbullet                            0xae0
-#define XK_enopensquarebullet                          0xae1
-#define XK_openrectbullet                              0xae2
-#define XK_opentribulletup                             0xae3
-#define XK_opentribulletdown                           0xae4
-#define XK_openstar                                    0xae5
-#define XK_enfilledcircbullet                          0xae6
-#define XK_enfilledsqbullet                            0xae7
-#define XK_filledtribulletup                           0xae8
-#define XK_filledtribulletdown                         0xae9
-#define XK_leftpointer                                 0xaea
-#define XK_rightpointer                                0xaeb
-#define XK_club                                        0xaec
-#define XK_diamond                                     0xaed
-#define XK_heart                                       0xaee
-#define XK_maltesecross                                0xaf0
-#define XK_dagger                                      0xaf1
-#define XK_doubledagger                                0xaf2
-#define XK_checkmark                                   0xaf3
-#define XK_ballotcross                                 0xaf4
-#define XK_musicalsharp                                0xaf5
-#define XK_musicalflat                                 0xaf6
-#define XK_malesymbol                                  0xaf7
-#define XK_femalesymbol                                0xaf8
-#define XK_telephone                                   0xaf9
-#define XK_telephonerecorder                           0xafa
-#define XK_phonographcopyright                         0xafb
-#define XK_caret                                       0xafc
-#define XK_singlelowquotemark                          0xafd
-#define XK_doublelowquotemark                          0xafe
-#define XK_cursor                                      0xaff
-#endif /* XK_PUBLISHING */
-
-/*
- *  APL
- *  Byte 3 = b
- */
-
-#ifdef XK_APL
-#define XK_leftcaret                                   0xba3
-#define XK_rightcaret                                  0xba6
-#define XK_downcaret                                   0xba8
-#define XK_upcaret                                     0xba9
-#define XK_overbar                                     0xbc0
-#define XK_downtack                                    0xbc2
-#define XK_upshoe                                      0xbc3
-#define XK_downstile                                   0xbc4
-#define XK_underbar                                    0xbc6
-#define XK_jot                                         0xbca
-#define XK_quad                                        0xbcc
-#define XK_uptack                                      0xbce
-#define XK_circle                                      0xbcf
-#define XK_upstile                                     0xbd3
-#define XK_downshoe                                    0xbd6
-#define XK_rightshoe                                   0xbd8
-#define XK_leftshoe                                    0xbda
-#define XK_lefttack                                    0xbdc
-#define XK_righttack                                   0xbfc
-#endif /* XK_APL */
-
-/*
- * Hebrew
- * Byte 3 = c
- */
-
-#ifdef XK_HEBREW
-#define XK_hebrew_doublelowline                        0xcdf
-#define XK_hebrew_aleph                                0xce0
-#define XK_hebrew_bet                                  0xce1
-#define XK_hebrew_beth                                 0xce1  /* deprecated */
-#define XK_hebrew_gimel                                0xce2
-#define XK_hebrew_gimmel                               0xce2  /* deprecated */
-#define XK_hebrew_dalet                                0xce3
-#define XK_hebrew_daleth                               0xce3  /* deprecated */
-#define XK_hebrew_he                                   0xce4
-#define XK_hebrew_waw                                  0xce5
-#define XK_hebrew_zain                                 0xce6
-#define XK_hebrew_zayin                                0xce6  /* deprecated */
-#define XK_hebrew_chet                                 0xce7
-#define XK_hebrew_het                                  0xce7  /* deprecated */
-#define XK_hebrew_tet                                  0xce8
-#define XK_hebrew_teth                                 0xce8  /* deprecated */
-#define XK_hebrew_yod                                  0xce9
-#define XK_hebrew_finalkaph                            0xcea
-#define XK_hebrew_kaph                                 0xceb
-#define XK_hebrew_lamed                                0xcec
-#define XK_hebrew_finalmem                             0xced
-#define XK_hebrew_mem                                  0xcee
-#define XK_hebrew_finalnun                             0xcef
-#define XK_hebrew_nun                                  0xcf0
-#define XK_hebrew_samech                               0xcf1
-#define XK_hebrew_samekh                               0xcf1  /* deprecated */
-#define XK_hebrew_ayin                                 0xcf2
-#define XK_hebrew_finalpe                              0xcf3
-#define XK_hebrew_pe                                   0xcf4
-#define XK_hebrew_finalzade                            0xcf5
-#define XK_hebrew_finalzadi                            0xcf5  /* deprecated */
-#define XK_hebrew_zade                                 0xcf6
-#define XK_hebrew_zadi                                 0xcf6  /* deprecated */
-#define XK_hebrew_qoph                                 0xcf7
-#define XK_hebrew_kuf                                  0xcf7  /* deprecated */
-#define XK_hebrew_resh                                 0xcf8
-#define XK_hebrew_shin                                 0xcf9
-#define XK_hebrew_taw                                  0xcfa
-#define XK_hebrew_taf                                  0xcfa  /* deprecated */
-#define XK_Hebrew_switch        0xFF7E  /* Alias for mode_switch */
-#endif /* XK_HEBREW */
-
diff --git a/blt3.0/win/install.tcl b/blt3.0/win/install.tcl
deleted file mode 100644
index 0a94ece..0000000
--- a/blt3.0/win/install.tcl
+++ /dev/null
@@ -1,739 +0,0 @@
-#
-# Script for installation of BLT under Windows
-#
-
-namespace eval Installer {
-    variable commandList {}
-    variable cmdLog {}
-    variable component
-    array set component {
-	binaries	1
-	headers		1
-	html		1
-	scripts		1
-	demos		1
-    }
-    variable totalBytes 0
-    variable totalFiles 0
-    variable panel 0
-    variable panelList {
-	Welcome Directory Components Ready Finish
-    }
-}
-
-proc Installer::DoInstall { package version } {
-    global prefix srcdir
-
-    regsub {\.} $version {} v2
-    variable scriptdir 
-    set scriptdir $prefix/lib/blt${version}
-    variable component
-    global tcl_platform
-    if { $component(binaries) } {
-	if { $tcl_platform(platform) == "unix" } {
-	    Add ${srcdir}/src -perm 0755 \
-		-file bltwish \
-		-file bltsh \
-		-rename "bltwish bltwish${v2}" \
-		-rename "bltsh bltsh${v2}" \
-		$prefix/bin
-	    set ext [info sharedlibextension]
-	    Add ${srcdir}/src -perm 0755 \
-		-file libBLT${v2}.a \
-		-file libBLTlite${v2}.a \
-		-file shared/libBLT${v2}${ext} \
-		-file shared/libBLTlite${v2}${ext} \
-		$prefix/lib
-	} else {
-	    Add ${srcdir}/src -perm 0755 \
-		-file bltwish.exe \
-		-file bltsh.exe \
-		-file BLT${v2}.dll \
-		-file BLTlite${v2}.dll \
-		-rename "bltwish.exe bltwish${v2}.exe" \
-		-rename "bltsh.exe bltsh${v2}.exe" \
-		$prefix/bin
-	    Add ${srcdir}/src -perm 0755 \
-		-file BLT${v2}.lib \
-		-file BLTlite${v2}.lib \
-		$prefix/lib
-	}
-    }
-    if { $component(headers) } {
-	Add ${srcdir}/src \
-	    -file blt.h \
-	    -file bltChain.h \
-	    -file bltVector.h \
-	    -file bltTree.h \
-	    $prefix/include
-    }
-    if { $component(html) } {
-	Add ${srcdir}/html -pattern *.html $scriptdir/html
-    }
-    if { $component(scripts) } {
-	Add ${srcdir} -file README -file PROBLEMS $scriptdir
-	Add ${srcdir}/library \
-	    -pattern *.cur \
-	    -pattern *.tcl \
-	    -pattern *.pro \
-	    -file tclIndex \
-	    $scriptdir 
-	Add ${srcdir}/library/dd_protocols \
-	    -pattern *.tcl \
-	    -file tclIndex \
-	    $scriptdir/dd_protocols
-    }
-    if { $component(demos) } {
-	Add ${srcdir}/demos \
-	    -pattern *.tcl \
-	    -file htext.txt \
-	    $scriptdir/demos
-	Add ${srcdir}/demos/bitmaps -pattern *.xbm $scriptdir/bitmaps
-	Add ${srcdir}/demos/bitmaps/hand -pattern *.xbm $scriptdir/bitmaps/hand
-	Add ${srcdir}/demos/bitmaps/fish -pattern *.xbm $scriptdir/bitmaps/fish
-	Add ${srcdir}/demos/images \
-	    -pattern *.gif \
-	    -file out.ps \
-	    $scriptdir/images
-	Add ${srcdir}/demos/scripts -pattern *.tcl $scriptdir/scripts
-    }
-    Install $package $version
-}
-
-proc Installer::InstallDirectory { dest } {
-    variable commandList
-    lappend commandList [list CheckPath $dest]
-}
-
-proc Installer::Update { src dest size perm } {
-    variable currentBytes
-    variable totalBytes
-
-    .install.text insert end "file copy -force $src $dest\n"
-    if { [catch {file copy -force $src $dest} results] != 0 } {
-	.install.text insert end "Error: $results\n" fail
-    } else {
-	incr currentBytes $size
-    }
-    global tcl_platform
-    if { $tcl_platform(platform) == "unix" } {
-	.install.text insert end "file attributes $dest -permissions $perm\n"
-	if { [catch {file attributes $dest -permissions $perm} results] != 0 } {
-	    .install.text insert end "Error: $results\n" fail
-	}
-    }
-    set percent [expr round(double($currentBytes)/$totalBytes * 100.0)]
-    .install.current configure -text "$percent% complete"
-    update
-}
-
-proc Installer::InstallFile { src dest perm } {
-    variable commandList
-    variable totalBytes
-    variable totalFiles
-
-    if { [catch { file size $src } size ] != 0 } {
-	set size 0
-    }
-    lappend commandList [list Update $src $dest $size $perm]
-    incr totalBytes $size
-    incr totalFiles
-}
-
-proc Installer::Add { dir args } {
-    variable commandList 
-    variable totalBytes
-
-    if { ![file exists $dir] }  {
-	error "can't find directory \"$dir\"" 
-    }
-    set argc [llength $args]
-    set destDir [lindex $args end]
-    incr argc -2
-    set perm 0644
-
-    InstallDirectory $destDir
-    foreach { option value } [lrange $args 0 $argc] {
-	switch -- $option {
-	    "-pattern" {  
-		foreach f [lsort [glob $dir/$value]] { 
-		    InstallFile $f $destDir/[file tail $f] $perm
-		}
-	    }
-	    "-rename" {
-		set src [lindex $value 0]
-		set dest [lindex $value 1]
-		InstallFile $dir/$src $destDir/$dest $perm
-	    }
-    	    "-perm" {  
-		set perm $value
-	    }
-    	    "-file" {  
-		InstallFile $dir/$value $destDir/$value $perm
-	    }
-	    default {
-		error "Unknown option \"$option\""
-	    }
-	}
-    }
-}
-
-proc Installer::CheckPath { dest } {
-    set save [pwd]
-    if { [file pathtype $dest] == "absolute" } {
-	if { [string match  {[a-zA-Z]:*} $dest] } {
-	    cd [string range $dest 0 2]
-	    set dest [string range $dest 3 end]
-	} else {
-	    cd /
-	    set dest [string range $dest 1 end]
-	}
-    }	
-    set dirs [file split $dest]
-    foreach d $dirs {
-	if { ![file exists $d] } {
-	    .install.text insert end "file mkdir $d\n"
-	    if { [catch { file mkdir $d } result] != 0 } {
-		.install.text insert end "Error: $result\n" fail
-		break
-	    }
-	}
-	if { ![file isdirectory $d] } {
-	    .install.text insert end "Error: Not a directory: \"$d\"" fail
-	    break
-	}
-	update
-	cd $d 
-    }
-    cd $save
-}
-
-proc Installer::MakePackageIndex { package version file } {
-    global prefix
-    set suffix [info sharedlibextension]
-    regsub {\.} $version {} version_no_dots
-    set libName "${package}${version_no_dots}${suffix}"
-    set libPath [file join ${prefix}/bin $libName]
-    set cmd [list load $libPath $package]
-
-    if { [file exists $file] } {
-	file delete $file
-    }
-    set cmd {
-	set fid [open $file "w"] 
-	puts $fid "# Package Index for $package"
-	puts $fid "# generated on [clock format [clock seconds]]"
-	puts $fid ""
-	puts $fid [list package ifneeded $package $version $cmd]
-	close $fid
-    }
-    if { [catch $cmd result] != 0 } {
-	.install.text insert end "Error: $result\n" fail
-    }
-}
-
-proc Installer::SetRegistryKey { package version valueName } {
-    variable scriptdir 
-    global tcl_version
-    
-    package require registry
-    set key HKEY_LOCAL_MACHINE\\Software\\$package\\$version\\$tcl_version 
-    registry set $key $valueName $scriptdir
-}
-
-proc Installer::Install { package version } {
-    variable commandList 
-    variable totalBytes 
-    variable currentBytes 0
-    variable totalFiles
-    variable scriptdir 
-
-    .install.totals configure -text "Files: $totalFiles Size: $totalBytes"
-    foreach cmd $commandList {
-	if { ![winfo exists .install] } {
-	    return 
-	}
-	if { [catch $cmd result] != 0 } {
-	    .install.text insert end "Error: $result\n" fail
-	} 
-	update
-    }
-    global tcl_version tcl_platform prefix
-    set name [string tolower $package]
-    MakePackageIndex $package $version $scriptdir/pkgIndex.tcl
-    MakePackageIndex $package $version \
-	$prefix/lib/tcl${tcl_version}/${name}${version}/pkgIndex.tcl
-    if { $tcl_platform(platform) == "windows" } {
-	SetRegistryKey $package $version ${package}_LIBRARY
-    }
-    .install.cancel configure -text "Done"
-}
-
-proc Installer::Next {} {
-    variable panel
-    variable continue
-    variable panelList
-
-    incr panel
-    set max [llength $panelList]
-    if { $panel >= $max } {
-	exit 0
-    }
-    if { ($panel + 1) == $max } {
-	.next configure -text "Finish"
-	.cancel configure -state disabled
-    } else {
-	.next configure -text "Next"
-    }
-    if { $panel > 0 } {
-	.back configure -state normal
-    }
-    set continue 1
-}
-
-proc Installer::Back {} {
-    variable panel
-    variable continue
-    
-    incr panel -1 
-    if { $panel <= 0 } {
-	.back configure -state disabled
-	set panel 0
-    } else {
-	.back configure -state normal
-    }
-    .next configure -text "Next"
-    .cancel configure -state normal
-    set continue 0
-}
-
-proc Installer::Cancel {} {
-    exit 0
-}
-
-if { $tcl_platform(platform) == "unix" } {
-    font create textFont -family Helvetica -weight normal -size 11
-    font create titleFont -family Helvetica -weight normal -size 14
-} else {
-    font create titleFont -family Arial -weight bold -size 12
-    font create textFont -family Arial -weight normal -size 9
-}
-font create hugeFont -family {Times New Roman} -size 18 -slant italic \
-    -weight bold
-
-proc Installer::MakeLink { widget tag command } {
-    $widget tag configure $tag -foreground blue -underline yes 
-    $widget tag bind $tag <ButtonRelease-1> \
-	"$command; $widget tag configure $tag -foreground blue"
-    $widget tag bind $tag <ButtonPress-1> \
-	[list $widget tag configure $tag -foreground red]
-}
-
-proc Installer::Welcome { package version }  {
-    global tcl_version 
-    if { [winfo exists .panel] } {
-	destroy .panel
-    }
-    text .panel -wrap word -width 10 -height 18 \
-	-relief flat -padx 4 -pady 4 -cursor arrow \
-	-background [. cget -bg]
-    .panel tag configure welcome -font titleFont -justify center \
-	-foreground navyblue
-    .panel tag configure package -font hugeFont -foreground red \
-	-justify center
-     MakeLink .panel next "Installer::Next"
-     MakeLink .panel cancel "Installer::Cancel"
-    .panel insert end "Welcome!\n" welcome
-    .panel insert end "\n"
-    .panel insert end \
-	"This installs the compiled \n" "" \
-	"${package} ${version}\n" package \
-	"binaries and components from the source directories to " "" \
-	"where Tcl/Tk is currently installed.\n\nThe compiled binaries " "" \
-	"require Tcl/Tk $tcl_version.\n\n" 
-    .panel insert end \
-	"Press the " "" \
-	"Next" next \
-	" button to continue.  Press the " "" \
-	"Cancel" cancel \
-	" button if you do not wish to install $package at this time."
-    .panel configure -state disabled
-    blt::table . \
-	0,1 .panel -columnspan 3 -pady 10 -padx { 0 10 } -fill x -anchor n
-    tkwait variable Installer::continue
-}
-
-option add *Hierbox.openCommand	{Installer::OpenDir %W "%P" %n}
-
-proc Installer::OpenDir { widget path atnode } {
-    puts path=$path
-    set save [pwd]
-    global tcl_platform
-	
-    if { $tcl_platform(platform) == "windows" } {
-	if { $path == "/" } {
-	    foreach v [file volumes] {
-		if { ![string match {[A-B]:/} $v] } {
-		    .browser.h insert end $v -button yes
-		}
-	    }
-	    return
-	}
-	set path [string trimleft $path /]
-    } 
-    cd $path/
-    foreach dir [lsort [glob -nocomplain */ ]] { 
-	set node [$widget insert -at $atnode end $dir]
-	# Does the directory have subdirectories?
-	set subdirs [glob -nocomplain $dir/*/ ]
-	if { $subdirs != "" } {
-	    $widget entry configure $node -button yes
-	} else {
-	    $widget entry configure $node -button no
-	}	
-    }
-    cd $save
-}
-
-proc Installer::CenterPanel { panel }  {
-    update idletasks
-    set x [expr ([winfo width .] - [winfo reqwidth $panel]) / 2]
-    set y [expr ([winfo height .] - [winfo reqheight $panel]) / 2]
-    incr x [winfo rootx .]
-    incr y [winfo rooty .]
-    wm geometry $panel +$x+$y
-    wm deiconify $panel
-}
-
-proc Installer::Browse { }  {
-    if { [winfo exists .browser] } {
-	raise .browser
-	wm deiconify .browser
-	return
-    }
-    toplevel .browser
-    entry .browser.entry -bg white -borderwidth 2 -relief sunken \
-	-textvariable Installer::selection
-    bind .browser.entry <KeyPress-Return> {
-	.browser.ok flash
-	.browser.ok invoke
-    }
-    blt::hierbox .browser.h -hideroot yes -separator / -height 1i -width 3i \
-	-borderwidth 2 -relief sunken -autocreate yes -trim / \
-	-yscrollcommand { .browser.sbar set } \
-	-selectcommand { 
-	    set index [.browser.h curselection]
-	    set path [lindex [.browser.h get -full $index] 0]
-	    if { $tcl_platform(platform) == "windows" } {
-		set path [string trimleft $path /]
-	    } 
-	    puts $path
-	    set Installer::selection $path
-	}
-    scrollbar .browser.sbar -command { .browser.h yview }
-    wm protocol .browser WM_DELETE_WINDOW { .browser.cancel invoke }
-    wm transient .browser .
-    frame .browser.sep -height 2 -borderwidth 1 -relief sunken
-    button .browser.ok -text "Continue" -command {
-	set prefix $Installer::selection
-	grab release .browser
-	destroy .browser
-    }
-    button .browser.cancel -text "Cancel" -command {
-	grab release .browser
-	destroy .browser
-    }
-    global tcl_platform
-    global prefix
-    if { $tcl_platform(platform) == "windows" } {
-	set root "C:/"
-	.browser.h open "C:/"
-	.browser.h open "C:/Program Files"
-	if { [file exists $prefix] } {
-	   .browser.h see $prefix/
-	}
-    } else {
-	set root /usr/local
-	#.browser.h open $root
-    }
-    set Installer::selection $prefix
-    wm title .browser "Installer: Select Install Directory"
-    blt::table .browser \
-	0,0 .browser.entry -fill x -columnspan 2  -padx 4 -pady 4 \
-	1,0 .browser.h -fill both -columnspan 2 -padx 4 -pady { 0 4 } \
-	1,2 .browser.sbar -fill y \
-	2,0 .browser.sep -fill x -padx 10 -cspan 3 -pady { 4 0 } \
-	3,0 .browser.ok  -width .75i -padx 4 -pady 4 \
-	3,1 .browser.cancel -width .75i -padx 4 -pady 4
-    blt::table configure .browser c2 r0 r2 r3 -resize none
-    wm withdraw .browser
-    after idle { 
-	Installer::CenterPanel .browser 
-	grab set .browser
-    } 
-}
-
-proc Installer::Directory { package version }  {
-    global tcl_version 
-    if { [winfo exists .panel] } {
-	destroy .panel
-    }
-    frame .panel
-    text .panel.text -wrap word -width 10 \
-	-height 10 -borderwidth 0 -padx 4 -pady 4 -cursor arrow \
-	-background [.panel cget -background]
-    .panel.text tag configure title -font titleFont -justify center \
-	-foreground navyblue
-    .panel.text insert end "Select Destination Directory\n" title
-    .panel.text insert end "\n\n"
-    .panel.text insert end "Please select the directory where Tcl/Tk \
-$tcl_version is installed. This is also where $package $version will be \
-installed.\n" 
-    .panel.text configure -state disabled
-    frame .panel.frame -relief groove -borderwidth 2
-    label .panel.frame.label -textvariable ::prefix
-    button .panel.frame.button -text "Browse..." -command Installer::Browse
-    blt::table .panel.frame \
-	0,0 .panel.frame.label -padx 4 -pady 4 -anchor w \
-	0,1 .panel.frame.button -padx 4 -pady 4 -anchor e 
-    blt::table .panel \
-	0,0 .panel.text -padx 4 -pady 4 -fill both \
-	1,0 .panel.frame -padx 4 -fill x
-    blt::table . \
-	0,1 .panel -columnspan 3 -pady 10 -padx { 0 10 } -fill both
-    tkwait variable Installer::continue
-}
-
-proc Installer::Components { package version }  {
-    global tcl_version 
-    if { [winfo exists .panel] } {
-	destroy .panel
-    }
-    regsub {\.} $version {} v2
-    frame .panel
-    text .panel.text -wrap word -width 10 \
-	-height 8 -borderwidth 0 -padx 4 -pady 4 -cursor arrow \
-	-background [.panel cget -background]
-    .panel.text tag configure title -font titleFont -justify center \
-	-foreground navyblue
-    .panel.text insert end "Select Components\n" title
-    .panel.text insert end "\n\n"
-    .panel.text insert end "Please select the components you wish to install. \
-You should install all components.\n" 
-    .panel.text configure -state disabled
-    frame .panel.frame -relief groove -borderwidth 2
-    variable component
-    global tcl_platform
-    if { $tcl_platform(platform) == "unix" } {
-	set ext [info sharedlibextension]
-	set sharedlib lib${package}${v2}${ext}
-	set lib lib${package}${v2}.a
-	set exe ""
-    } else {
-	set sharedlib ${package}${v2}.dll
-	set lib ${package}${v2}.lib
-	set exe ".exe"
-    }
-    checkbutton .panel.frame.binaries \
-	-text "bltwish${exe} and Shared Library" \
-	-variable Installer::component(binaries)
-    checkbutton .panel.frame.scripts \
-	-text "Script Library" \
-	-variable Installer::component(scripts)
-    checkbutton .panel.frame.headers \
-	-text "Include Files and Static Library" \
-	-variable Installer::component(headers)
-    checkbutton .panel.frame.html -text "HTML Manual Pages" \
-	-variable Installer::component(html)
-    checkbutton .panel.frame.demos -text "Demos" \
-	-variable Installer::component(demos)
-    blt::table .panel.frame \
-	0,0 .panel.frame.binaries -padx 4 -pady 4 -anchor w \
-	1,0 .panel.frame.scripts -padx 4 -pady 4 -anchor w \
-	2,0 .panel.frame.headers -padx 4 -pady 4 -anchor w \
-	3,0 .panel.frame.html -padx 4 -pady 4 -anchor w \
-	4,0 .panel.frame.demos -padx 4 -pady 4 -anchor w 
-    blt::table .panel \
-	0,0 .panel.text -padx 4 -pady 4 -fill both \
-	1,0 .panel.frame -padx 4 -fill both
-    blt::table . \
-	0,1 .panel -columnspan 3 -pady 10 -padx { 0 10 } -fill both
-    tkwait variable Installer::continue
-}
-
-proc Installer::Ready { package version }  {
-    global tcl_version 
-    if { [winfo exists .panel] } {
-	destroy .panel
-    }
-    text .panel -wrap word -width 10 -height 18 \
-	-relief flat -padx 4 -pady 4 -cursor arrow \
-	-background [. cget -bg]
-    .panel tag configure welcome -font titleFont -justify center \
-	-foreground navyblue
-    .panel tag configure package -font hugeFont -foreground red \
-	-justify center
-     MakeLink .panel next "Installer::Next"
-     MakeLink .panel cancel "Installer::Cancel"
-     MakeLink .panel back "Installer::Back"
-    .panel insert end "Ready To Install!\n" welcome
-    .panel insert end "\n"
-    .panel insert end "We're now ready to install ${package} ${version} \
-and its components.\n\n"
-    .panel insert end \
-	"Press the " "" \
-	"Next" next \
-	" button to install all selected components.\n\n" "" 
-    .panel insert end \
-	"To reselect components, click on the " "" \
-	"Back" back \
-	" button.\n\n"
-    .panel insert end \
-	"Press the " "" \
-	"Cancel" cancel \
-	" button if you do not wish to install $package at this time."
-    .panel configure -state disabled
-    blt::table . \
-	0,1 .panel -columnspan 3 -pady 10 -padx { 0 10 } -fill x -anchor n
-    tkwait variable Installer::continue
-    if { $Installer::continue } {
-	Results
-	update
-	DoInstall $package $version
-    }
-}
-
-proc Installer::Results { }  {
-    if { [winfo exists .install] } {
-	destroy .install
-    }
-    toplevel .install
-    text .install.text -height 10 -width 50 -wrap none -bg white \
-	-yscrollcommand { .install.ybar set } \
-	-xscrollcommand { .install.xbar set } 
-    .install.text tag configure fail -foreground red
-    label .install.totals -text "Files: 0  Bytes: 0" -width 50
-    label .install.current -text "Installing:\n" -height 2 -width 50
-    scrollbar .install.ybar -command { .install.text yview }
-    scrollbar .install.xbar -command { .install.text xview } -orient horizontal
-    wm protocol .install WM_DELETE_WINDOW { .install.cancel invoke }
-    wm transient .install .
-    button .install.cancel -text "Cancel" -command {
-	grab release .install
-	destroy .install
-    }
-    blt::table .install \
-	0,0 .install.totals -anchor w -columnspan 2  \
-	1,0 .install.current -anchor w -cspan 2 \
-	2,0 .install.text -fill both \
-	2,1 .install.ybar -fill y \
-	3,0 .install.xbar -fill x \
-	4,0 .install.cancel -width .75i -padx 4 -pady 4 -cspan 2 
-    blt::table configure .install c1 r0 r1 r3  -resize none
-    wm withdraw .install
-    after idle { 
-	Installer::CenterPanel .install 
-	grab set .install
-    } 
-}
-
-proc Installer::Finish { package version }  {
-    global tcl_version 
-    if { [winfo exists .panel] } {
-	destroy .panel
-    }
-    text .panel -wrap word -width 10 -height 18 \
-	-relief flat -padx 4 -pady 4 -cursor arrow \
-	-background [. cget -bg]
-    .panel tag configure welcome -font titleFont -justify center \
-	-foreground navyblue
-    .panel tag configure package -font hugeFont -foreground red \
-	-justify center
-    .panel insert end "Installation Completed\n" welcome
-    .panel insert end "\n"
-    .panel insert end "${package} ${version} is now installed.\n\n"
-     MakeLink .panel finish "Installer::Next"
-    .panel insert end \
-	"Press the " "" \
-	"Finish" finish \
-	" button to exit this installation"
-    .panel configure -state disabled
-    blt::table . \
-	0,1 .panel -columnspan 3 -pady 10 -padx { 0 10 } -fill x -anchor n
-    tkwait variable Installer::continue
-}
-
-
-set prefix [lindex $argv 2]
-set srcdir [lindex $argv 1]
-set version [lindex $argv 0]
-
-set version 2.4
-set package BLT
-regsub {\.} $version {} v2
-set ext [info sharedlibextension]
-
-if { $tcl_platform(platform) == "unix" } {
-    set ext [info sharedlibextension]
-    set sharedlib shared/lib${package}${v2}${ext}
-    set prefix "/usr/local/blt"
-} else {
-    set sharedlib ${package}${v2}.dll
-    set prefix "C:/Program Files/Tcl"
-}
-if { [file exists ./src/$sharedlib] } {
-    load ./src/$sharedlib $package
-} else {
-    error "Can't find library \"$sharedlib\" to load"
-}
-set blt_library $srcdir/library
-
-image create photo openFolder -format gif -data {
-R0lGODlhEAANAPIAAAAAAH9/f7+/v///////AAAAAAAAAAAAACH+JEZpbGUgd3JpdHRlbiBi
-eSBBZG9iZSBQaG90b3Nob3CoIDUuMAAsAAAAABAADQAAAzk4Gsz6cIQ44xqCZCGbk4MmclAA
-gNs4ml7rEaxVAkKc3gTAnBO+sbyQT6M7gVQpk9HlAhgHzqhUmgAAOw==
-}
-image create photo closeFolder -format gif -data {
-R0lGODlhEAANAPIAAAAAAH9/f7+/v///AP///wAAAAAAAAAAACH+JEZpbGUgd3JpdHRlbiBi
-eSBBZG9iZSBQaG90b3Nob3CoIDUuMAAsAAAAABAADQAAAzNIGsz6kAQxqAjxzcpvc1KWBUDY
-nRQZWmilYi37EmztlrAt43R8mzrO60P8lAiApHK5TAAAOw==
-}
-image create photo blt -file ${srcdir}/demos/images/blt98.gif
-option add *Text.font textFont
-option add *HighlightThickness 0
-option add *Hierbox.icons "closeFolder openFolder"
-option add *Hierbox.button yes
-
-set color \#accaff
-option add *Frame.background $color
-option add *Toplevel.background $color
-#option add *Button.background $color
-option add *Checkbutton.background $color
-option add *Label.background $color
-option add *Text.background $color
-. configure -bg $color
-wm title . "$package $version Installer"
-label .image -image blt -borderwidth 2 -relief groove
-button .back -text "Back" -state disabled -command Installer::Back -underline 0
-button .next -text "Next" -command Installer::Next -underline 0
-button .cancel -text "Cancel" -command Installer::Cancel -underline 0
-frame .sep -height 2 -borderwidth 1 -relief sunken
-blt::table . \
-    0,0 .image -fill both -padx 10 -pady 10 \
-    1,0 .sep -fill x -padx 4 -pady 4 -columnspan 4 -padx 5 \
-    2,1 .back -anchor e -padx 4 -pady 4 \
-    2,2 .next -anchor w -padx 4 -pady 4 \
-    2,3 .cancel -padx 20 -pady 4
-
-blt::table configure . .back .next .cancel -width .75i
-blt::table configure . r1 r2 -resize none
-blt::table configure . r3 -height 0.125i
-
-while { 1 } {
-    namespace eval Installer {
-	variable panel
-	set cmd [lindex $panelList $panel]
-	eval [list $cmd $package $version]
-    }	
-    update
-} 
diff --git a/blt3.0/win/makedefs b/blt3.0/win/makedefs
deleted file mode 100644
index 72edeea..0000000
--- a/blt3.0/win/makedefs
+++ /dev/null
@@ -1,90 +0,0 @@
-ENABLE_SYMBOLS=1
-ENABLE_SHARED=1
-ENABLE_STUBS=0
-
-WITH_JPG=0
-
-SRC =	 	H:/src
-JPG_DIR	=	$(SRC)/libs/jpeg-6b
-
-WITH_PNG=0
-PNG_DIR	=	$(SRC)/libs/libpng-1.2.15
-ZLIB_DIR =	$(SRC)/libs/zlib-1.2.3
-
-WITH_TIF=0
-WITH_EXPAT =		0
-WITH_MYSQL =		0
-
-
-#v1 = 8.4
-#v2 = 84
-#v3 = 8.4.0
-
-v1 = 8.4
-v2 = 84
-v3 = 8.4.14
-
-#v1 = 8.2
-#v2 = 82
-#v3 = 8.2.3
-
-#v1 = 8.1
-#v2 = 81
-#v3 = 8.1.1
-
-#v1 = 8.0
-#v2 = 80
-#v3 = 8.0.5
-
-#Use Independent JPEG Group (IJG) library or Intel JPEG Library (IJL)
-# 0 = None.
-# 1 = IJG
-# 2 = IJL
-
-TCLDIR        =	$(SRC)/tcl/tcl$(v3)
-TKDIR         =	$(SRC)/tcl/tk$(v3)
-
-ifeq ($(WITH_JPG),1)
-JPG_LIB_SPEC =	$(JPG_DIR)/libjpeg.lib
-JPG_INC_SPEC =	-I$(JPG_DIR)
-JPG_DEFINES =	-DHAVE_LIBJPG
-endif
-
-ifeq ($(WITH_PNG),1)
-PNG_LIB_SPEC =	$(PNG_DIR)/libpng.lib $(ZLIB_DIR)/zlib.lib
-PNG_INC_SPEC =	-I$(PNG_DIR) -I$(ZLIB_DIR)
-PNG_DEFINES =	-DHAVE_LIBPNG
-endif
-
-ifeq ($(WITH_EXPAT),1)
-EXPAT_DIR =		C:/Expat-2.0.0
-EXPAT_INC_SPEC =	-I$(EXPAT_DIR)/Source/lib
-EXPAT_LIB_SPEC =	$(EXPAT_DIR)/Libs/libexpat.lib
-endif
-
-# ------------------------------------------------------------------------
-#       You shouldn't need to edit anything beyond this point
-# ------------------------------------------------------------------------
-
-BLT_MAJOR_VERSION = 	3
-BLT_MINOR_VERSION = 	0
-BLT_VERSION =		3.0
-
-prefix =		C:/Program\ Files/Tcl
-exec_prefix =		$(prefix)
-includedir =		$(prefix)/include
-bindir =		$(prefix)/bin
-libdir =		$(prefix)/lib
-scriptdir =		$(libdir)/blt$(BLT_VERSION)
-BLT_LIBRARY =		$(libdir)/blt$(BLT_VERSION)
-TCLLIBPATH =		$(libdir)/tcl$(v1)
-
-AUX_LIBS = 
-SHLIB_SUFFIX =		.dll
-
-INSTALL =		install -m 0755
-INSTALL_DATA =		install -m 0444
-RANLIB =		:
-SHELL =			bash.exe
-RM =			rm -f
-
diff --git a/tkimg1.3/ANNOUNCE b/tkimg1.3/ANNOUNCE
deleted file mode 100644
index 41293bb..0000000
--- a/tkimg1.3/ANNOUNCE
+++ /dev/null
@@ -1,81 +0,0 @@
-I'm happy to announce version 1.3 of the "tkImg" package
-(formerly known as 'Img").
-
-This package enhances Tk, adding support for many other Image formats.
-
-Changes compared to version 1.2.4:
-
--	New formats: ICO, PCX, PPM, SGI, SUN, TGA.
--	New build system, based upon TEA 2.
--	Refactored into several smaler and more independent
-	packages. See file README in the (source) distributions for
-	more information.
--	Bug fixes and enhancements in some formats.
-
-This version only works with Tcl/Tk 8.0 or higher (tested up to
-8.4a1). If you are using Tk4.2 or lower, please stick with Img1.1.4
-(which is still available).
-
-Currently there are two identical source distributions:
-	tkimg13.zip             (for Windows)	(about 2.9 Mb)
-	tkimg1.3.tar.gz         (for Unix)	(about 2.6 Mb)
-	tkimg1.3.tar.bz2        (for Unix)	(about 1.7 Mb)
-
-All these files can be downloaded from:
-	http://source.net/project/tkimg/
-
-The most recent info is always available at:
-	http://source.net/project/tkimg/
-
-See the README on how to build and use the packages.
-
-If you want to write images to disk which contain transparency
-information (e.g. GIF89 or PNG with alpha channel), you need
-at least Tk 8.3. Without lower Tk versions only GIF87 will be
-written, and the alpha channel will be missing from PNG files. In
-other words: The background color will not be as intended but
-everything else should be O.K.
-
-For PNG, JPEG and TIFF support the supporting packages have to be
-build and installed. See the file README for more in-depth
-explanations.
-
-For postscript you need Ghostscript (version 2.6 or higher) to be
-available on your system.
-
-Many thanks to the following people (alphabetical):
-
-Paul Obermeier <obermeier at users.sourceforge.net>
-  Bugfixes and all new formats.
-Roger E Critchlow Jr <rec at elf.org>
-  BMP improvements.
-Nick Ing-Simmons <nick at ni-s.u-net.com>
-  XBM write function, perl-Tk port and many other useful
-  suggestions.
-Andreas Kupries <a.kupries at westend.com>
-  Testing on Linux, and supplying original "makefile.vc"
-  files for the Windows port.
-Ioi K. Lam <ioi at eng.sun.com>
-  Pixmap image type (imgPmap.c, imgUnixPmap.c, imgWinPmap.c),
-  many functions of which are used in imgXPM.c as well.
-Tom Lane <tgl at sss.pgh.pa.us>
-  Wrote the JPEG handler (but I'm responsible for the
-  dynamical loading part).
-Lolo <lolo at pcsig22.etsimo.uniovi.es>
-  Original GIF87 write function.
-Larry Virden <lvirden at cas.org>
-  Bug reports and other useful remarks.
-Mario Weilguni <mweilguni at sime.com>
-  Many improvements to imgXPM.c.
-
-Enjoy,
-	Jan Nijtmans, CMG Oost-Nederland B.V.
-	email: jan.nijtmans at xs4all.nl (private)
-	       jan.nijtmans at cmg.nl    (work)
-	url:   http://purl.oclc.org/net/nijtmans/
-
-	Andreas Kupries, ActiveState Corp
-	email:	andreas_kupries at users.sourceforg.net	(private)
-		akupries at shaw.ca			(private)
-		andreask at activestate.com		(work)
-	url:	http://www.purl.org/NET/akupries/
diff --git a/tkimg1.3/ChangeLog b/tkimg1.3/ChangeLog
deleted file mode 100644
index 172c127..0000000
--- a/tkimg1.3/ChangeLog
+++ /dev/null
@@ -1,442 +0,0 @@
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* Updated some hardwired version information in png, zlib, and
-	  tiff.
-
-2004-08-13  Andreas Kupries  <andreask at activestate.com>
-
-	* libz/tcl: Changed version of wrapper to 1.2.1, synchronized to
-	  version of libz.
-
-	* libpng/tcl: Changed version of wrapper to 1.2.6, synchronized to
-	  version of libpng.
-
-	* libtiff/tcl: Changed version of wrapper to 3.6.1, synchronized to
-	  version of libtiff.
-
-2004-08-13  Andreas Kupries  <andreask at activestate.com>
-
-	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
-	* libtiff/tcl: Updated to handle the new version of libtiff.
-
-2004-08-12  Andreas Kupries  <andreask at activestate.com>
-
-	* libpng:     Updated libpng from version 1.0.8 to 1.2.6rc5.
-	* libpng/tcl: Updated to handle the new version of libpng.
-
-2004-08-12  Andreas Kupries  <andreask at activestate.com>
-
-	* libz:     Updated zlib from version 1.1.3 to 1.2.1.
-	* libz/tcl: Updated to handle the new version of zlib.
-
-2004-08-12  Andreas Kupries  <andreask at activestate.com>
-
-	* ico/ico.c: The last change made to these files, not
-	* sun/sun.c: recorded in the ChangeLog [*], caused them to
-	* sgi/sgi.c: be stored back into the CVS in DOS format.
-	* tga/tga.c: This screwed up the compile, more precise,
-	* pcx/pcx.c: the continuation lines in the code were not
-	             recognized anymore.
-
-	[*] cvs annotate claims that the change was made on July 27.
-
-2004-06-03  Andreas Kupries  <andreask at activestate.com>
-
-	* base/tkimgPPB.c:
-	* base/tkimg.h: Added conditional definition for Tk_PhotoExpand
-	* bmp/bmp.c:    (named tkimg_PhotoExpand). Changed all occurences
-	* gif/gif.c:    if Tk_PhotoExpand to the new definition. This
-	* ico/ico.c:    takes care of a change between Tk 8.4 and 8.5
-	* jpeg/jpeg.c:
-	* libjpeg/tcl/jpegtcl.c:
-	* pcx/pcx.c:
-	* png/png.c:
-	* ppm/ppm.c:
-	* ps/ps.c:
-	* sgi/sgi.c:
-	* sun/sun.c:
-	* tga/tga.c:
-	* window/window.c:
-	* xbm/xbm.c:
-	* xpm/xpm.c:
-
-2003-04-04  Andreas Kupries  <andreask at activestate.com>
-
-	* configure:
-	* base/configure:
-	* base/tclconfig/tcl.m4:
-	* bmp/configure:
-	* gif/configure:
-	* ico/configure:
-	* jpeg/configure:
-	* libjpeg/tcl/configure:
-	* libjpeg/tcl/tclconfig/tcl.m4:
-	* libpng/tcl/configure:
-	* libpng/tcl/tclconfig/tcl.m4:
-	* libtiff/tcl/configure:
-	* libtiff/tcl/tclconfig/tcl.m4:
-	* libz/tcl/configure:
-	* libz/tcl/tclconfig/tcl.m4:
-	* pcx/configure:
-	* pixmap/configure:
-	* png/configure:
-	* ppm/configure:
-	* ps/configure:
-	* sgi/configure:
-	* sun/configure:
-	* tclconfig/tcl.m4:
-	* tga/configure:
-	* tiff/configure:
-	* window/configure:
-	* xbm/configure:
-	* xpm/configure: Updated to newest tcl.m4, regenerated
-	  configure's.
-
-2003-03-24  Andreas Kupries  <andreask at activestate.com>
-
-	* doc/img-ps.man: Fix of typo reported by doctools.
-
-2003-03-13  Andreas Kupries  <andreask at activestate.com>
-
-	* doc/img-ps.man: Extended with a section about requirements,
-	  because this format relies on the presence of 'gs'
-	  (ghostscript).
-
-2003-03-09  Paul Obermeier  <obermeier at poSoft.de>
-
-	* pcx/pcx.c: Fixed incorrect usage of Tcl_AppendResult, 
-	* sun/sun.c: which could cause core dumps.
-	* tga/tga.c:
-
-	* pcx/pcx.c: Improved heuristics for better format matching.
-
-	* base/pkgIndex.tcl.in: Rearranged order of required packages
-	                        for better format matching.
-
-	* doc/img-ico.man: Updated documentation.
-	* doc/img-pcx.man:
-	* doc/img-ppm.man:
-	* doc/img-sgi.man:
-	* doc/img-sun.man:
-	* doc/img-tga.man:
-
-2003-03-04  Andreas Kupries  <andreask at activestate.com>
-
-	* doc/format-footer.inc: Better see-also and keywording.
-	* doc/img-ps.man:
-	* doc/img.man: 
-
-	* doc/img-png.man: Small fix in manpage, command was broken over
-	  two lines, which is illegal.
-
-2003-02-26  Andreas Kupries  <andreask at activestate.com>
-
-	* configure:    Fixed hangup on Linux systems where arguments
-	* configure.in: to cc in the variable CC caused the subordinate
-	                configure of tiff to choke (A which command
-			hanged itself).
-
-	* bmp/tests/bmp.test:   Updated the testsuite to use the new 'img::*'
-	* gif/tests/gif.test:   package names instead of the old 'tkimg::*'.
-	* ico/tests/ico.test:   Thanks to Don Porter <dgp at users.sourceforge.net>
-	* jpeg/tests/jpeg.test: for noticing this. Patch also by him.
-	* pcx/tests/pcx.test:
-	* pixmap/tests/pixmap.test:
-	* png/tests/png.test:
-	* ppm/tests/ppm.test:
-	* sgi/tests/sgi.test:
-	* sun/tests/sun.test:
-	* tga/tests/tga.test:
-	* tiff/tests/tiff.test:
-	* xbm/tests/xbm.test:
-	* xpm/tests/xpm.test:
-
-2003-02-12  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* README: Removed format documentation from the file. Added
-	  reference to manpages, and doctools.
-
-	* Completed documentation work.
-
-2003-02-06  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* doc/img.man:     Started to work on new user documentation.
-	* doc/img-bmp.man: Using the doctools format for easy writing
-	* doc/img-gif.man: and easy conversion to other formats.
-	* doc/img-ico.man: 
-	* doc/img-jpeg.man:   Given the uniformity of most of the
-	* doc/img-pcx.man:    handlers a template system is used
-	* doc/img-pixmap.man: (doctools extended to handle [include]
-	* doc/img-png.man:    files, and allow parameterization through
-	* doc/img-ppm.man:    variables ([vset] command).
-	* doc/img-ps.man:
-	* doc/img-sgi.man:
-	* doc/img-sun.man:
-	* doc/img-tga.man:
-	* doc/img-tiff.man:
-	* doc/img-window.man:
-	* doc/img-xbm.man:
-	* doc/img-xpm.man:
-	* doc/img.man:
-
-	* doc/format-footer.inc: Template files, included by most of
-	* doc/format-header.inc: the handler manpages.
-	* doc/format-middle.inc:
-
-
-2003-01-23  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Touched all sub-modules, added -I/path/to/sources/of/module/base
-	  so that they are able to find the tkimg.h header even if base is
-	  not installed yet. Same principle as for access to the jpegtcl,
-	  etc. headers.
-
-2003-01-21  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* configure:    Fixed [Tkimg bug 655408] reported by Heinz-Detlev
-	* configure.in: Koch <hdkoch at users.sourceforge.net>. The change in
-	* Makefile.in:  aclocal.m4 fixing the problem with the propagation
-	                of options to the sub-configure files also allows
-	                us to use a simple 'make all' when compiling the
-	                individual modules. Installation is not required
-	                for them to find their requirements. Removed the
-	                macro AC_PREFIX_PROGRAM(tclsh) and subsequent
-	                conditionals from the master configure.in. We have
-	                no need of special code for --prefix /
-	                --exec-prefix in the master. The standard code
-	                supplied by autoconf itself is just
-	                fine. Regenerated the configure file.
-
-2003-01-08  Andreas Kupries  <andreask at activestate.com>
-
-	* aclocal.m4: Added this file, was missing. Fixed bug in
-	  TEA_CONFIG_COLLECT.
-
-2002-12-09  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* configure.in:
-	* configure:
-	* aclocal.m4:
-	* Makefile.in: New master files for building all packages in
-	  the extension. The installation collects all shared libraries in
-	  one directory, using a big package index file for all packages.
-
-	* base/: configure.in: Added DPACKAGE, is now 'img::base' instead
-	  of 'tkimg'.
-
-	* bmp, gif, ico, jpeg, pcx, pixmap, png, ppm, ps, sgi, sun, tga,
-	  tiff, window, xbm, xpm:
-	  Changed 'tkimg::' to 'img::'
-
-2002-12-06  Andreas Kupries  <andreask at activestate.com>
-
-	* bmp:
-	* gif:
-	* jpeg:
-	* png:
-	* tiff:
-	* xpm:
-	* xbm: Created testsuites for these handlers. Essentially the
-	  existing big testsuite was split into per handler
-	  testsuites. All pass.
-
-	* sun:
-	* sgi:
-	* ico:
-	* pcx:
-	* ppm:
-	* tga: Added testsuites, templated upon the original ones.
-
-	  SGI has trouble. What goes in, does not come out exactly the
-	  same. I am not sure if there is a bug, or if there is some
-	  intentional change made by the handler.
-
-	* ps: (+pdf)
-	* window:
-	* pixmap: Without testsuites.
-
-	* init.c (_Init): Had to be changed to use '1.3' too.
-
-2002-12-04  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* tkimg/base/tkimg.c:
-	* tkimg/bmp/Makefile.in:
-	* tkimg/gif/Makefile.in:
-	* tkimg/ico/Makefile.in:
-	* tkimg/init.c:
-	* tkimg/jpeg/Makefile.in:
-	* tkimg/libjpeg/tcl/jpegtcl.c:
-	* tkimg/libpng/tcl/pngtcl.c:
-	* tkimg/libtiff/tcl/tifftcl.c:
-	* tkimg/libz/tcl/zlibtcl.c:
-	* tkimg/pcx/Makefile.in:
-	* tkimg/pixmap/Makefile.in:
-	* tkimg/pixmap/configure:
-	* tkimg/pixmap/configure.in:
-	* tkimg/pixmap/pixmap.c:
-	* tkimg/pixmap/pixmapInt.h:
-	* tkimg/png/Makefile.in:
-	* tkimg/ppm/Makefile.in:
-	* tkimg/ps/Makefile.in:
-	* tkimg/sgi/Makefile.in:
-	* tkimg/sun/Makefile.in:
-	* tkimg/tga/Makefile.in:
-	* tkimg/tiff/Makefile.in:
-	* tkimg/window/Makefile.in:
-	* tkimg/xbm/Makefile.in:
-	* tkimg/xpm/Makefile.in:
-
-	  Smoothed out more trouble with DLLIMPORT / DLLEXPORT on
-	  Windows. Fixed problems with building 'pixmap'.
-
-2002-12-03  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* libjpeg/tcl:
-	* libpng/tcl:
-	* libz/tcl:
-	* libtiff/tcl:
-	* base:
-
-	  Weeded out discrepancies in definition versus usage of BUILD_xxx
-	  macros controlling DLLEXPORT / DLLIMPORT on windows. The
-	  capitalization in configure(.in) and header was different.
-
-2002-11-28  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* ps/: New directory, PS + PDF handler (photo image types).
-
-	* png/: New directory, PNG handler (photo image types).
-
-	* tiff/: New directory, TIFF handler (photo image types).
-
-	* window/: New directory, WINDOW handler (photo image
-	  type). Conversion of the original Img sources to TEA 2 provided
-	  by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* xpm/: New directory, XPM handler (photo image type). Conversion
-	  of the original Img sources to TEA 2 provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>.
-
-	* xbm/: New directory, XBM handler (photo image type). Conversion
-	  of the original Img sources to TEA 2 provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>.
-
-	* tga/: New directory, TGA handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* sun/: New directory, SUN handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* sgi/: New directory, SGI handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* ppm/: New directory, PPM handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* pcx/: New directory, PCX handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-	* ico/: New directory, ICO handler (photo image type). Code
-	  provided by Paul Obermeier <obermeier at users.sourceforge.net>.
-
-2002-11-26  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* init.c: Extended to allow registration of a second format. This
-	  format is able to share functions with the first one. Current
-	  user for this feature: The ps/pdf combo handler.
-
-2002-11-19  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* init.c: New file. Contains generic initialization code for a
-	  photo image type. Parameterized by the individual format
-	  handlers with the package name (in various forms). First user is
-	  'tkimg::bmp'.
-
-	* bmp/: New directory, BMP handler (photo image type).
-	* gif/: s.a, GIF handler (photo image type).
-	* jpeg/: s.a, JPEG handler (photo image type).
-
-2002-11-18  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* base: New directory. Base package for format handlers to draw
-	  upon. Build system based on TEA 2. Exports a stub table. The
-	  source code is a modified copy of the relevant sources in the
-	  main directory, making this package completely independent of
-	  the existing sources.
-
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* libz/tcl:
-	* libpng/tcl:
-	* libjpeg/tcl:
-	* libtiff/tcl: New directories, tcl packages wrapping around the
-	  support libraries, exporting their functionality via a stub
-	  table. Based on TEA 2. First step in the reorganization of the
-	  whole code base for easier configuration and building. The code
-	  of the support libraries is linked directly into the wrapper
-	  libraries. This means that the wrappers do not use support
-	  libraries installed on the system. Support for this will come at
-	  a later stage.
-
-	* libpng/png.c: Added casts to prevent compiler error.
-	* imgInt.h: Fixed small typo.
-
-2002-10-15  Andreas Kupries  <andreask at activestate.com>
-
-	* configure.in: Changed to propagate an initial CFLAGS value to
-	  the final definition. A TEA condition (SHARED_BUILD == 1)
-	  squashed it, causing it the build system to loose the
-	  +DAportable we specify for the AS PA-RISC2.2 build host. This is
-	  a problem for _all_ TEA and TEA 2 based configure files.
-
-2002-10-04  Andreas Kupries  <andreask at activestate.com>
-
-	* libjpeg/configure:
-	* libtiff/tiff.h:
-	* configure.in:
-	* Makefile.in:
-	* imgTIFF.c: Folding a number of band-aid patches to make tkImg
-	  compile on the ActiveState hosts back into the sources.
-
-	  When using gcc have to link -lgcc into the main, png, and tiff
-	  libraries. Have to propagate host specification to subordniate
-	  configure scripts. Have to explicitly link in '-lm -lc' on
-	  AIX. Disable a number of typedef's in the TIFF code which are
-	  provided by AIX headers. Avoid unwanted usage of the memcpy
-	  macro on AIX.
-
-2002-09-25  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* Makefile.in: better use of libdir. Add jpegconfdir to includes.
-	Add srcdir prefix for installation of *.tcl. (steffen)
-
-	* configure: regen'd
-	* configure.in: add support for --with-tcl|tkinclude (steffen)
-
-	* imgUnixPmap.c: #define XPutImage to empty for OSX. (steffen)
-
-	* imgWindow.c: include X libs for OSX. (steffen)
-
-2002-06-19  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* imgTIFF.c: Ifdef'd code choosing either stdarg.h or
-	  varargs.h. The Tcl header does this selection since 8.1., and in
-	  8.4 it has changed significantly, causing the code here to
-	  select a different file than tcl itself, causing compile
-	  problems. Thanks to Joe English for his help in tracking this
-	  down.
-
-2002-06-17  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* imgBMP.c (CommonReadBMP): 
-	* imgGIF.c (CommonReadGIF): 
-	* imgJPEG.c (CommonReadJPEG): 
-	* imgPS.c (ChanReadPDF): 
-	* imgWindow.c (ObjReadWin): 
-	* imgXPM.c (CommonReadXPM): 
-	* imgUtil.c (ImgPhotoPutBlock): Updated to handle changes
-	  introduced into Tk by TIP #98.
-
-2002-05-27  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* tools/install.tcl: Fixed mismatched brackets.
diff --git a/tkimg1.3/Makefile.in b/tkimg1.3/Makefile.in
deleted file mode 100644
index 8398ee2..0000000
--- a/tkimg1.3/Makefile.in
+++ /dev/null
@@ -1,173 +0,0 @@
-#
-# This file is a Makefile for IMG.  If it has the name "Makefile.in"
-# then it is a template for a Makefile;  to generate the actual Makefile,
-# run "./configure", which is a configuration script generated by the
-# "autoconf" program (constructs like "@foo@" will get replaced in the
-# actual Makefile.
-
-# This is the master makefile to compile all the packages in this
-# extensions in one go.
-
-EXTENSION	=	Img
-VERSION		=	@IMG_VERSION@
-CYGPATH		=	@CYGPATH@
-SUBDIRS		=	@subdirs@
-
-#
-#----------------------------------------------------------------
-# Things you can change to personalize the Makefile for your own
-# site (you can make these changes in either Makefile.in or
-# Makefile, but changes to Makefile will get lost if you re-run
-# the configuration script).
-#----------------------------------------------------------------
-
-# Directory in which the source of this extension can be found
-srcdir		=	@srcdir@
-
-# Default top-level directories in which to install architecture-
-# specific files (exec_prefix) and machine-independent files such
-# as scripts (prefix).  The values specified here may be overridden
-# at configure-time with the --exec-prefix and --prefix options
-# to the "configure" script.
-
-prefix		=	@prefix@
-exec_prefix	=	@exec_prefix@
-libdir          =	@libdir@
-includedir      =	@includedir@
-
-# Directory containing scripts supporting the work of this makefile
-tool		=	$(srcdir)/tools
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-
-# The following definition can be set to non-null for special systems
-# like AFS with replication.  It allows the pathnames used for installation
-# to be different than those used for actually reference files at
-# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
-# when installing files.
-INSTALL_ROOT =
-
-# Directory where libimg.a is at run-time:
-LIB_RUNTIME_DIR =	$(libdir)/$(EXTENSION)$(VERSION)
-
-# Directory in which to install the archive libimg.a:
-LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
-
-# Directory in which to install the extended shell tclsh:
-BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin
-
-# Directory in which to install the include file transform.h:
-INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
-
-# Top-level directory in which to install manual entries:
-MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
-
-# Directory where libz, libpng and libjpeg are (or will be) installed.
-IMG_INSTALL_DIR	=	$(INSTALL_ROOT)$(IMG_RUNTIME_DIR)
-
-# Some versions of make, like SGI's, use the following variable to
-# determine which shell to use for executing commands:
-SHELL =		/bin/sh
-
-#----------------------------------------------------------------
-# The information below is modified by the configure script when
-# Makefile is generated from Makefile.in.  You shouldn't normally
-# modify any of this stuff by hand.
-#----------------------------------------------------------------
-
-INSTALL_PROGRAM =	$(INSTALL) -m 744
-INSTALL_DATA =		$(INSTALL) -m 644
-INSTALL_SHLIB =		$(INSTALL) -m 555
-RANLIB =		@RANLIB@
-SHLIB_SUFFIX =		@SHLIB_SUFFIX@
-
-#----------------------------------------------------------------
-
-#-------------------------------------------------------#
-
-default:	all
-
-all:
-	for sub in $(SUBDIRS) ; \
-	do	\
-		here=`pwd` ; \
-		cd $$sub ; \
-		$(MAKE) all ; \
-		cd $$here ; \
-	done
-
-test:	all
-	for sub in $(SUBDIRS) ; \
-	do	\
-		here=`pwd` ; \
-		cd $$sub ; \
-		$(MAKE) test ; \
-		cd $$here ; \
-	done
-
-collate: all
-	rm -f pkgIndex.tcl
-	touch pkgIndex.tcl
-	for sub in $(SUBDIRS) ; \
-	do	\
-		here=`pwd` ; \
-		cd $$sub ; \
-		$(MAKE) install \
-			exec_prefix=$$here/Img/exec_prefix		\
-			prefix=$$here/Img/prefix			\
-			pkglibdir=$$here/Img/exec_prefix/lib/Img	\
-			;						\
-		cd $$here ; \
- 		if [ -f Img/exec_prefix/lib/Img/pkgIndex.tcl ] ; \
- 		then \
-			cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
- 		fi ; \
-	done
-	mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl
-
-install: collate
-	mkdir -p    $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
-	for p in Img/exec_prefix/lib/Img/* ; do \
-		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)/`basename $$p` ; \
-	done
-	mkdir -p $(INSTALL_ROOT)$(libdir)
-	for p in Img/exec_prefix/lib/*.sh ; do \
-		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(libdir)/`basename $$p` ; \
-	done
-	mkdir -p $(INSTALL_ROOT)$(includedir)
-	for p in Img/prefix/include/* ; do \
-		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(includedir)/`basename $$p` ; \
-	done
-
-
-bindist:
-
-#-------------------------------------------------------#
-
-clean:
-	for sub in $(SUBDIRS) ; \
-	do	\
-		here=`pwd` ; \
-		cd $$sub ; \
-		$(MAKE) clean ; \
-		cd $$here ; \
-	done
-	rm -rf Img
-
-distclean:	clean
-	rm -f config.* $(jpegdir)/config.log $(jpegdir)/config.status
-	rm -f Makefile
-	for sub in $(SUBDIRS) ; \
-	do	\
-		here=`pwd` ; \
-		cd $$sub ; \
-		$(MAKE) distclean ; \
-		cd $$here ; \
-	done
-
-#-------------------------------------------------------#
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/tkimg1.3/README b/tkimg1.3/README
deleted file mode 100644
index c40bc73..0000000
--- a/tkimg1.3/README
+++ /dev/null
@@ -1,246 +0,0 @@
-
-		Tcl/Tk Image formats (TkImg)
-		(Version 1.3 / December 2002)
-
-		Jan Nijtmans, Andreas Kupries
-
-This file contains a collection of format handlers for the Tk photo
-image type, and a new image type, pixmaps.  It can be used in
-combination with Tcl/Tk 8.0 or later but 8.3.2 (or 8.4, when
-available) are highly recommended.
-
-Included in this distribution are the most recent versions (as of
-august 2000) of the libz, libpng, libungif, libjpeg, and libtiff
-libraries. These are not required, unless you need support for the
-PNG, JPEG, or TIFF format. Note that you have to build these libraries
-to support the named formats, even if your system already has shared
-libraries for these formats. This is because the libraries here are
-built such that they can be loaded as packages by the Tcl/Tk core,
-making the handling of the various dependencies much easier. The last
-version, 1.2.4, used a modified copy of Tcl's functions for loading of
-shared libraries to load the support libraries at runtime. These have
-been abandoned in favor of the new approach.
-
-BACKGROUND TO BUILDING
-
-The TkImg sources have been heavily refactored. Instead of building
-one big package there are several small packages most of which are
-independent of each other.
-
-All packages employ a TEA 2 based build system (configure/Make) for
-easy configuration and building. This means that 99% of the options to
-configure are the same for all the packages.
-
-All packages save for the supporting ones (see below) have names
-starting with 'img'. For compatibility with older scripts the
-package index file of the utility package 'img::base' declares a
-pseudo-package 'Img' which loads all packages provided by this
-extension.
-
-BUILDING - The convenient way
-
-The toplevel directory of tkImg contains a configure and Makefile for
-convenient configuration and building of all packages in the
-extension.
-
-Run this configure script in a build directory of your choice to
-configure all packages, then run
-
-	make all
-	make install
-
-in the build directory. The most important options for configure are
---prefix and --exec-prefix which tell the build system where to find
-Tcl and Tk, and also where to install the results of the builds
-(header, shared libraries, ...).
-
-This convenient build installs all shared libraries in a single
-directory 'Img<VERSION>, together with a union package index for all
-packages.
-
-If the builder requires only a subset of the packages he can use
-
-	make all
-
-to build all packages, but must not use 'make install' in the top
-build directory. Instead run
-
-	make install
-
-in the sub directories of the build directory which contain the
-requested packages, and their dependencies !
-
-PACKAGES AND THEIR DEPENDENCIES
-
-This section is for people who want to bypass the master
-configure/Makefile.
-
-At the bottom of the hierarchy of dependencies are the 'support
-packages'. They encapsulate the support libraries for ZIP, TIFF, PNG
-and JPEG in packages directly loadable by Tcl. They provide the
-functionality of their underlying libraries via stub-tables. The names
-of these packages are:
-
-	Name		Directory		Dependency
-	-------------------------------------------------
-	zlibtcl		tkimg/libz/tcl
-	pngtcl		tkimg/libpng/tcl	zlibtcl
-	jpegtcl		tkimg/libjpeg/tcl
-	tifftcl		tkimg/libtiff/tcl
-	-------------------------------------------------
-
-The package 'pngtcl' depends on 'zlibtcl' and has to be built after
-it. Beyond that the order of building is free. Their TEA build systems
-can be found in the directories listed above.
-
-The configure/Makefile's in the directories
-
-	tkimg/libz, tkimg/libpng, tkimg/libjpeg, tkimg/libtiff
-
-must _not_ be used under no circumstances.
-
-
-At the next level is the package 'tkimg'. It provides utility
-functions used by all format handlers, and therefore has to be built
-before any of them. Its TEA build system can be found in the directory
-
-	Name		Directory		Dependency
-	-------------------------------------------------
-	img::base	tkimg/base
-	-------------------------------------------------
-
-Beyond that are the packages providing the various format
-handlers. They can be built in any order. Some of them depend on
-supporting packages, as noted below. Their names and directories are
-
-	Name		Directory	Dependency
-	-------------------------------------------------
-	img::bmp	tkimg/bmp
-	img::gif	tkimg/gif
-	img::ico	tkimg/ico
-	img::jpeg	tkimg/jpeg	jpegtcl
-	img::pcx	tkimg/pcx
-	img::pixmap	tkimg/pixmap
-	img::png	tkimg/png	pngtcl, zlibtcl
-	img::ppm	tkimg/ppm
-	img::ps	tkimg/ps
-	img::sgi	tkimg/sgi
-	img::sun	tkimg/sun
-	img::tga	tkimg/tga
-	img::tiff	tkimg/tiff	tifftcl, zlibtcl, jpegtcl
-	img::window	tkimg/window
-	img::xbm	tkimg/xbm
-	img::xpm	tkimg/xpm
-	-------------------------------------------------
-
-CONFIGURE
-
-The source distributions have "configure", which  has the following
-possibilities:
-	configure ?options?
-
-Some possible options:
-	--prefix=<dir>		Install headers in <dir>/include.
-				Default: "/usr/local"
-	--exec-prefix=<dir>	Install libraries in <dir>/lib.
-				Default: "${prefix}"
-	--with-tcl=<dir>	Find Tcl libraries in <dir> and include files in
-				<dir>/../include or <dir>/../generic.
-				Default: "${exec-prefix}/lib" or a sibling directory
-				of the Img build directory.
-	--with-tk=<dir>		Find Tk libraries in <dir> and include files in
-				<dir>/../include or <dir>/../generic.
-				Default: the same values as given by --with-tcl
-				or a sibling directory of the Img build directory.
-	--disable-shared	Force the creation of static libraries.
-	--disable-stubs		Disable stub support. This is necessary if you
-	                        want to run Img 1.3 with Tcl/Tk 8.0 up to 8.0.5.
-
-	--with-tkimg=<dir>	Find the 'tkimg' libraries in <dir> and include files
-				in <dir>/../include
-
-	Packages dependent on one or more of the support packages have
-	appropriate options to locate their libraries and headers, if
-	they cannot be found via --prefix and --exec-prefix
-
-	Use configure --help to query each configure for the full set
-	of options available to it.
-
-
-MAKE & INSTALL
-
-	'make', or 'make all' will build any package.
-
-	'make install' will install its headers and libraries in the
-	directories specified via --prefix/include and --exec-prefix/lib.
-
-USE
-
-If you want to use one or more of new image formats to be available in
-your own scripts, add a line like the following somewhere in your
-script:
-
-	package require img::FORMAT
-
-where FORMAT stands for the name of the format requested. See the list
-in section 'PACKAGES AND THEIR DEPENDENCIES' for the available
-formats. Each format will automatically load all of the packages it is
-dependent on.
-
-The line
-	package require Img
-
-is still legal and will load all format handlers provided by this
-extension.
-
-As an example, have a look at the file "demo.tcl"
-
-For further options see the manpages.
-
-
-DOCUMENTATION
-
-The documentation coming with the distribution is written in the
-doctools format (see tcllib).
-
-	NOTE:
-		The Img documentation makes use of features (include
-		files and variables) which are not part of an official
-		tcllib release yet. A cvs snapshot of tcllib is
-		required.
-
-
-
-PLATFORMS
-	tested:
-		Linux 2.0.30	(gcc, egcs)
-		IRIX 6.2	(cc, 32 bits only)
-		ULTRIX 4.1	(cc, gcc, egcs)
-		ULTRIX 4.4	(cc 3.0)
-		HP-UX-9		(cc, gcc, egcs)
-		HP-UX-10.2	(gcc, egcs)
-		SunOS-4.1.2     (cc)
-		Solaris 2.5	(gcc, egcs)
-		FreeBSD	2.2	(gcc, egcs)
-		Windows	95/98/NT(gcc-2.95/MS Visual C++ 4.2/5.0/6.0)
-
-	Not done yet:
-		Mac		) someone interested
-		VMS		) to try??????
-
-	Other machines and OS's should work too. 
-
-Feedback about other OS's and compilers is appreciated. Please
-help me in making this package better.
-
---
-		Jan Nijtmans, CMG Oost-Nederland B.V.
-		email: jan.nijtmans at xs4all.nl (private)
-		       jan.nijtmans at cmg.nl    (work)
-		url:   http://purl.oclc.org/net/nijtmans/
-
-		Andreas Kupries, ActiveState Corp
-		email:	andreas_kupries at users.sourceforg.net	(private)
-			akupries at shaw.ca			(private)
-			andreask at activestate.com		(work)
-		url:	http://www.purl.org/NET/akupries/
diff --git a/tkimg1.3/Reorganization.Notes.txt b/tkimg1.3/Reorganization.Notes.txt
deleted file mode 100644
index 4bf621e..0000000
--- a/tkimg1.3/Reorganization.Notes.txt
+++ /dev/null
@@ -1,283 +0,0 @@
-TODO
-	Test suites
-	Documentation
-	Last: Removal of old sources and build system.
-
-=====================================================================
-Proposal for a reorganization of the build system used by Img and its
-supporting libraries.
-=====================================================================
-
-Glossary
---------
-
-Up front a small glossary of terms to avoid confusion later.
-
-[1]	'package library' (can be shortend to 'package').
-
-	A shared library having all the special code (xx_Init,
-	xx_SafeInit) to allow the tcl core to load it as a Tcl
-	package.
-
-	Examples:	[incr Tcl], [Trf], ...
-
-[2]	'support library'
-
-	A shared library which can not be loaded as a Tcl package.
-
-	Examples:	libz, libjpeg, libpng, ...
-
-Intro
------
-
-I propose to slash the existing source code into a number of separate
-packages. I do _not_ propose to place each of these new packages into
-a separate source tree. The files stay in the existing tree, and this
-tree is augmented with additional directories containing the files
-relevant to configuring and building the new packages. Essentially
-configure.in and Makefile.in. All build systems will be based upon the
-TEA 2 system introduced in the sampleextension (See Tcl SF project).
-
-Note: I created the new build systems for TclXML/DOM/XSLT and their
-various subpackages (expat, libxml2, ...) in this way, with success
-IMHO :)
-
-There will be one package containing the common utilities and one
-package per image format, and support library [*]. The old name of the
-package, Img, will be used to define a 'super'-package which loads all
-of the existing functionality into the interpreter when required. This
-maintains compatibility with existing scripts.
-
-From the points of view of scripts there will be _no_ change in the
-perceived functionality. It should however be easier to write
-additional image format handlers using the framework provided by Img.
-
-[*] As for why one package per support library see the next section.
-
-
-Handling of the support libraries coming with Img
-(and of support libraries) in general.
------------------------------------------------------
-
-Available options, discussion
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-(1)     Create the support libraries as part of the package for the
-        format requiring them. This is essentially a static linkage.
-
-	This one of the easiest ways to build a support library.
-
-        It also implies that the functionality a support library used
-        in multiple format handlers is loaded multiple times. To me
-        this a severe disadvantage.
-
-(2)     Create the support libraries independent of the using
-        packages, as shared libraries
-
-        (a)     Link support at compile time into the packages.
-
-                (1)     Via -library. In other words implicit usage of
-                        the shared library loader provided by the OS.
-
-			Still relatively easy to do, although it
-		        requires more care to portably generate shared
-		        libraries. Libries used multiple times are
-		        loaded only once.
-
-			Also requires a lot of additional support code
-			if the library a supporting library is linked
-			to is stored in and loaded from a non-native
-			filesystem. In other words when used in wrapped
-			application and such. The support code has to
-			copy the support libraries to the same place
-			in the native FS the using library is copied
-			to, _before_ the using library is loaded, so
-			that the support libraries are available to
-			the dyn.loader provided by the OS.
-
-
-                (2)	Via direct usage of the objects. In other
-			words static linkage. This is the same as (1).
-
-
-        (b)     Link support at runtime.
-
-                (1)	Via explicit usage of the shared library
-                        loader provided by the OS.
-
-			Generation of the support library is like for
-			(2a1). Loading however is done by explicitly
-			invoking the shared library loader of the
-			OS. This allows the Tcl library to perform the
-			necessary copying should the support library
-			reside in a non-native filesystem.
-
-		        As the support library does not follow the
-		        convention of a tcl package (per definitionem)
-		        the standard load functionality of Tcl cannot
-		        be used to load the library. This means that
-
-		        (a)	either the load functionality in Tcl
-				is refactored into
-
-		                -       portable low-level loading of
-				        any shared library
-
-		                -	and high-level layer for
-		                        handling loaded shared
-		                        libraries which are tcl
-		                        packages.
-
-		        (b)	or the 'img' package has to carry the
-				source code implementing the portable
-				loading of shared libraries.
-
-		        Option (b) I consider rather unpleasant as it
-			leads to the duplication of functionality in
-			all high-level packages requiring the loading
-			support libraries. Trf and TrfCrypt for
-			example have need of this functionality too.
-
-
-                (2)	Wrap support library into thin package
-                        exporting its functionality via a
-                        stub-table. In other words, turn the support
-                        library into a package library.
-                
-
-			In contrast to (2b1) the support library is
-			not created as simple shared library, but with
-			all the necessary additional code to cause tcl
-			to recognize it as true package.
-
-		        A stub table is used to provide the
-			functionality of the support library to other
-			packages.
-
-		        This option could also be seen as (2b1c). It
-		        makes the library available in a simple manner
-		        with the need to refactor the load
-		        functionality provided by the Tcl core. It
-		        allows us to drive the reoganization of Img
-		        independent of the Tcl core, making do with
-		        the existing functionality. It also
-		        essentially removes the impetus to actually
-		        implement (2b1a). The good (enough) is the
-		        enemy of the best.
-
-Conclusion
-~~~~~~~~~~
-
-I have chosen option (2b2) for the support libraries. My reasons for
-doing so are this:
-
-*       The state of the implementation of (2b1/1) is unclear. It
-        requires a TIP, and no movement is seen on that front.
-
-        The chosen option has no dependency on this vaporous
-        functionality.
-
-*       The chosen option allows us to use TEA 2 based build systems
-        for the support libraries themselves. They are easier to create
-        and later maintain, at least I perceive them so, due to the
-        larger number of existing TEA 2 based package I can draw upon
-        as templates for the new packages.
-
-*       Note that the chosen option does not prevent static linking of
-        the support libraries. Currently Img uses special code to
-        setup the function tables with static information when linking
-        Img statically. These function tables are essentially stub
-        tables. This means that the explicit usage of stub tables for
-        the support libraries makes this mode easier to handle too, as
-        no special code is required anymore.
-
-*       Note that the actually created package is also able use
-        -library to dynamically link to the actual support library. In
-        this mode it can make use of pre-installed libraries. In this
-        way we get a mixture of (2b2) and (2a1).
-
-
-Files, and their organization into packages
--------------------------------------------
-
-         | Package       | Stubtable     | Files          | Notes
-        -+---------------+---------------+----------------+------------------------
-Ok       | tkimg         | Yes           | img.h          | Base package. Common
-Ok       |               |               | imgInt.h       | utilities helping in
-Ok       |               |               | imgInit.c      | the implementation of
-Ok       |               |               | imgObj.c       | image handlers.
-Ok       |               |               | imgUtil.c      |
-        -+---------------+---------------+----------------+------------------------
-Ok       | tkimg::bmp    |               | imgBMP.c       | BMP format
-Ok       | tkimg::gif    |               | imgGIF.c       | GIF format
-Ok       | tkimg::window |               | imgWindow.c    | windows
-Ok       | tkimg::xbm    |               | imgXBM.c       | XBM format.
-Ok       | tkimg::xpm    |               | imgXPM.c       | XPM format.
-Ok       | tkimg::ps     |               | imgPS.c        | PostScript + PDF format
-Ok       | tkimg::jpeg   |               | imgJPEG.c      | JPEG format
-Ok       | tkimg::png    |               | imgPNG.c       | PNG format
-Ok       | tkimg::pcx    |               |                | PCX format (Paintbrush)
-Ok       | tkimg::sgi    |               |                | SGI format (SGI native)
-Ok       | tkimg::sun    |               |                | SUN format (Sun raster)
-Ok       | tkimg::tga    |               |                | TGA format (Truevision Targa)
-        -+---------------+---------------+----------------+------------------------
-Ok       | tkimg::tiff   |               | imgTIFF.c      | TIFF format
-Ok       |               |               | imgTIFFjpeg.c  | Various additional
-Ok       |               |               | imgTIFFpixar.c | codecs.
-Ok       |               |               | imgTIFFzip.c   |
-        -+---------------+---------------+----------------+------------------------
-Ok       | tkimg::pixmap |               | imgPmap.h      | pixmap format
-Ok       |               |               | imgPmap.c      | pixmap ? (PPM, XPM ?)
-Ok       |               |               | imgUnixPmap.c  |
-Ok       |               |               | imgWinPmap.c   |
-        -+---------------+---------------+----------------+------------------------
-Ok       | Img           |               | --             | Super package loading
-Ok       |               |               |                | all of the above.
-        -+---------------+---------------+----------------+------------------------
-Ok       | jpegtcl       | Yes           | libjpeg/       | jpeg support library
-Ok       | pngtcl        | Yes           | libpng/        | png support library
-Ok       | zlibtcl       | Yes           | libz/          | zip support library
-Ok       | tifftcl       | Yes           | libtiff/       | tiff support library
-        -+---------------+---------------+----------------+------------------------
-
-None of the '*Support' packages provides tcl level commands. They only
-provide their own functionality, through stubtables. Note that the png
-support library depends on libz, and thus has to require this package.
-
-
-
-Misc. notes
------------
-
-*       The zip support library (zlib, libz) is also used by
-
-	-	tkHTML,
-	-	JCW's 'zipper' package,
-	-	zipvfs
-	-	mk4vfs
-	-	and Trf.
-
-        Placement of the ZlibSupport package with Img for the time
-        being is no problem and easy for tkHTML, as that package often
-        may want to use Img for the handling of additional image
-        formats in web pages. It is more of an issue when considering
-        zipper and Trf as there is more disconnect between them and
-        Img.
-
-        In the future we should move ZlibSupport into its own project,
-        or module in a project. Maybe directly into the source base of
-        zlib itself ?
-
-        The same can be considered for the PNG support.
-
-        Regarding JPEG the maintainership of the library much more
-        vague. In other words I don't know how to talk to for this.
-
-
-*       Regarding the code of img itself. Are the functions in
-        'imgObj' still necessary ? Especially ByteArray seems to
-        be a duplication of functionality provided by the Tcl core.
-
-
-*	Future: Reflect handler functionality into the Tcl level,
-	allow creation of format handlers in Tcl.
diff --git a/tkimg1.3/aclocal.m4 b/tkimg1.3/aclocal.m4
deleted file mode 100644
index 3eb73a6..0000000
--- a/tkimg1.3/aclocal.m4
+++ /dev/null
@@ -1,105 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-
-AC_DEFUN(TEA_CONFIG_SUBDIR, [
-    tea_config_dir="$1"
-    tea_config_arguments="$2"
-    subdirs="$subdirs $tea_config_dir"
-    AC_SUBST(subdirs)
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e ['s%[^/]$%&/%'] -e ['s%[^/]*/%../%g']`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-])
-
-
-AC_DEFUN(TEA_CONFIG_COLLECT, [
-  tea_sub_configure_args=
-  tea_prev=
-  for tea_arg in $ac_configure_args; do
-    if test -n "$tea_prev"; then
-      tea_prev=
-      continue
-    fi
-    case "$tea_arg" in
-    -cache-file | --cache-file | --cache-fil | --cache-fi \
-    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-      tea_prev=cache_file ;;
-    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      tea_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    *) tea_sub_configure_args="$tea_sub_configure_args $tea_arg" ;;
-    esac
-  done
-])
diff --git a/tkimg1.3/base/ChangeLog b/tkimg1.3/base/ChangeLog
deleted file mode 100644
index 37db787..0000000
--- a/tkimg1.3/base/ChangeLog
+++ /dev/null
@@ -1,40 +0,0 @@
-2002-11-26  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* pkgIndex.tcl.in: Added index script to load all format handlers
-	  when requiring 'Img', i.e. the old package.
-
-2002-11-21  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* tkimgUtils.c (tkimg_FixObjMatchProc): 
-	* tkimgUtils.c (tkimg_FixChanMatchProc): Changed bit-negation to
-	  logical negation. This fixes a bug intriduced by the rewrite to
-	  use version info to distinguish between calls from 8.3.2 and
-	  8.3. The bug caused the procedure to bail out without rotating
-	  the arguments, causing the remainder to end up with the argument
-	  in the wrong places, crashing the system when trying to read
-	  from the channel or data object.
-
-	  Looking at the signatures I believe that the inherited code is
-	  still wrong for calls from 8.3.2.
-
-2002-11-20  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Makefile.in: The configure variable TK_XINCLUDES has to placed
-	  in variable, to avoid problem on platforms placing a shell
-	  comment into it. More in the Makefile.
-
-2002-11-19  Andreas Kupries  <andreas_kupries at users.sourceforge.net>
-
-	* tkimg.h (tkimg_PhotoPutBlockTk): Added a convenience macro
-	  dealing with the change of the signature of Tk_PhotoPutBlock
-	  between 8.3.5 and 8.4 [see TIP 98]. This is a compile time
-	  decision. I.e. 'tkimg' and format handlers can be compiled for
-	  8.3 and earlier, or 8.4. The result will run only with the core
-	  it was compiled for. This might change before the release of Img
-	  2.0.
-
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* Start of logging.
-
-	* tkimg: The base package for the format handlers to draw upon.
diff --git a/tkimg1.3/base/Makefile.in b/tkimg1.3/base/Makefile.in
deleted file mode 100644
index 26d0ead..0000000
--- a/tkimg1.3/base/Makefile.in
+++ /dev/null
@@ -1,535 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimg TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimg_SOURCES	=			\
-		tkimg.c			\
-		tkimgIO.c		\
-		tkimgPPB.c		\
-		tkimgUtils.c		\
-		tkimgStubInit.c		\
-		tkimgStubLib.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimg_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimg_OBJECTS		= $(tkimg_SOURCES:.c=. at OBJEXT@)
-tkimg_LIB_FILE		= @tkimg_LIB_FILE@
-
-tkimgstub_OBJECTS	= tkimgStubLib.$(OBJEXT)
-tkimgstub_LIB_FILE	= @tkimgstub_LIB_FILE@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	$(srcdir)/tkimg.h $(srcdir)/tkimgDecls.h
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PACKAGE		= @PACKAGE@
-DPACKAGE	= @DPACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= -I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile tkimgConfig.sh pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-	@mkdir -p $(DESTDIR)$(includedir)
-	@echo "Installing header files in $(DESTDIR)$(includedir)"
-	@for i in $(GENERIC_HDRS) ; do \
-	    echo "Installing $$i" ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo The base package "'tkimg'" cannot be tested separately.
-	@echo Test the format handlers to exercise its functionality.
-
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-#	$(testshell)	\
-#		-load 'load ./$(tkimg_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimg_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-	-rm -f $($(PACKAGE)stub_LIB_FILE)
-	${MAKE_STUB_LIB}
-	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimg.$(OBJEXT): $(srcdir)/generic/tkimg.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimg.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/..
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-	$(INSTALL_DATA) tkimgConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimg.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimg_DECLS = \
-	$(srcdir)/tkimg.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimg_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimg_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/base/README b/tkimg1.3/base/README
deleted file mode 100644
index ec516c2..0000000
--- a/tkimg1.3/base/README
+++ /dev/null
@@ -1,68 +0,0 @@
-
-tkimg_Fix*Proc's
-
-Signature of photo image type functions
-
-
-			Tk 8.3.2 or earlier		Tk 8.3 or later
-==============================================================================
-Tk_ImageStringWriteProc	int				int
-			------------------------------------------------------
-			Tcl_Interp *interp,		Tcl_Interp *interp,
-			Tcl_DString *dataPtr,		Tcl_Obj *format,
-			char *formatString,		Tk_PhotoImageBlock *blockPtr
-			Tk_PhotoImageBlock *blockPtr
-==============================================================================
-Tk_ImageFileMatchProc	int				int
-			------------------------------------------------------
-			Tcl_Channel chan,		Tcl_Channel chan,
-			char *fileName,			CONST char *fileName,
-			char *formatString,		Tcl_Obj *format,
-			int *widthPtr,			int *widthPtr,
-			int *heightPtr			int *heightPtr,
-							Tcl_Interp *interp
-==============================================================================
-Tk_ImageStringMatchProc	int				int
-			------------------------------------------------------
-			char *string,			Tcl_Obj *dataObj, 
-			char *formatString,		Tcl_Obj *format, 
-			int *widthPtr,			int *widthPtr, 
-			int *heightPtr			int *heightPtr,
-							Tcl_Interp *interp
-==============================================================================
-
-Different number of arguments, with different types, and the arguments
-are permuted.
-
-A Tk 8.3 core takes special steps so that a specially written photo
-image can distinguish between the two possible types of calls using
-the arguments alone.
-
-It always calls the function with the maximal number of arguments
-possible, padding with NULLs if the 8.3 signature has not enough
-arguments. See 'Tk_ImageStringWriteProc' (tkImgPhoto.c, line 962).
-
-In the case of the other two procedures the photo image type can check
-the integrity of the last argument to distinguish between the two
-cores. When called from an 8.3.2 or earlier core the last argument
-will be bogus (random data).
-
-This is actually the method used by Img 1.2.4. It checks that
-interp->result == interp->resultSpace. There are two problems with
-that approach:
-
-(1)	The pointer stored in 'interp' is random, and might not be
-	dereferencable. In other words, a segementation fault can
-	happen. Just assume 'interp == NULL' for example.
-
-(2)	It requires access to private definitions of the core
-	(Definition of 'struct Interp').
-
-Because this Img 2.0 will use a different approach. When loaded into
-the system it will ask for the current version of Tk, and modify its
-behaviour accordingly.
-
-
-	tkimg_FixChanMatchProc  (interp, chan, file, format, width, height)
-	tkimg_FixObjMatchProc   (interp, data, format, width, height)
-	tkimg_FixStringWriteProc(data, interp, dataPtr, format, blockPtr)
diff --git a/tkimg1.3/base/aclocal.m4 b/tkimg1.3/base/aclocal.m4
deleted file mode 100644
index 0b05739..0000000
--- a/tkimg1.3/base/aclocal.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/base/configure b/tkimg1.3/base/configure
deleted file mode 100755
index f5ce9ab..0000000
--- a/tkimg1.3/base/configure
+++ /dev/null
@@ -1,6290 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimg', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./tkimg.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimg
-DPACKAGE="img::base"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMG_VERSION=${VERSION}
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMG_VERSION "${TKIMG_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1444: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1456: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1526: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1600: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1675: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1747: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1833: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1838 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1866: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1871 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1895: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1910 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1927 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1944 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1984: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2014: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2065: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2097: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2108 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2139: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2144: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2172: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2211: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2215 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2247: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2305: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2339: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2372: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2398: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2435: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2442 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2492 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2507 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2545: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2551 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2570 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2601: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2607 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2636: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2642 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2671: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2677 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2710: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2759: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2764 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2796: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2801 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2833: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2838 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2870: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2875 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2907: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2912 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2940 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2968 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2989: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2994 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3022 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3062: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3067 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3099: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3104 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3141: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3146 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3181: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3186 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3231: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3236 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3294: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3357: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimg in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimg 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3483: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3491 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3531: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3539 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3578: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3586 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3623: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3631 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3665: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3673 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3724: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3729 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3780: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3785 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3838: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:3876: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:3922: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:3936: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:3957: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3986: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3994 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4049: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4206: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4214 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4307: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4315 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4391: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4399 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4530: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4535 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4597: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4602 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4662: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4667 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4699: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4701 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5036: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5039 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5092: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5094 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5130: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5132 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5168: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5170 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5312: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5370: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5432 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5506 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5603 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5628: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5631 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5672: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5692: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5700 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:5849: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:5881: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    #--------------------------------------------------------------------
-    # These are for tkimgConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/tkimg${VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval tkimg_LIB_FLAG="-ltkimg${VERSION}${DBGX}"
-    else
-	eval tkimg_LIB_FLAG="-ltkimg`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    tkimg_BUILD_LIB_SPEC="-L`pwd` ${tkimg_LIB_FLAG}"
-    tkimg_LIB_SPEC="-L${pkglibdir} ${tkimg_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval tkimg_STUB_LIB_FLAG="-ltkimgstub${VERSION}${DBGX}"
-    else
-	eval tkimg_STUB_LIB_FLAG="-ltkimgstub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    tkimg_BUILD_STUB_LIB_SPEC="-L`pwd` ${tkimg_STUB_LIB_FLAG}"
-    tkimg_STUB_LIB_SPEC="-L${pkglibdir} ${tkimg_STUB_LIB_FLAG}"
-    tkimg_BUILD_STUB_LIB_PATH="`pwd`/${tkimgstub_LIB_FILE}"
-    tkimg_STUB_LIB_PATH="${pkglibdir}/${tkimgstub_LIB_FILE}"
-
-    
-    
-    
-    
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl tkimgConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMG_VERSION@%$TKIMG_VERSION%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimgstub_LIB_FILE@%$tkimgstub_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-s%@tkimg_BUILD_LIB_SPEC@%$tkimg_BUILD_LIB_SPEC%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_BUILD_STUB_LIB_SPEC@%$tkimg_BUILD_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_BUILD_STUB_LIB_PATH@%$tkimg_BUILD_STUB_LIB_PATH%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@MAJOR_VERSION@%$MAJOR_VERSION%g
-s%@MINOR_VERSION@%$MINOR_VERSION%g
-s%@PATCHLEVEL@%$PATCHLEVEL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl tkimgConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/base/configure.in b/tkimg1.3/base/configure.in
deleted file mode 100644
index 51fd370..0000000
--- a/tkimg1.3/base/configure.in
+++ /dev/null
@@ -1,213 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimg', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./tkimg.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimg
-DPACKAGE="img::base"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMG_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMG_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimg_LIB_FILE)
-AC_SUBST(tkimgstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMG_VERSION, "${TKIMG_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimg in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimg)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-TEA_EXPORT_CONFIG(tkimg)
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl tkimgConfig.sh])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/base/pkgIndex.tcl.in b/tkimg1.3/base/pkgIndex.tcl.in
deleted file mode 100644
index 80ea723..0000000
--- a/tkimg1.3/base/pkgIndex.tcl.in
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- tcl -*- Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package ifneeded @DPACKAGE@ @VERSION@ [list load [file join $dir @tkimg_LIB_FILE@]]
-
-package ifneeded Img   @VERSION@ {
-    # Compatibility hack. When asking for the old name of the package
-    # then load all format handlers and base libraries provided by tkImg.
-    # Actually we ask only for the format handlers, the required base
-    # packages will be loaded automatically through the usual package
-    # mechanism.
-
-    # When reading images without specifying it's format (option -format),
-    # the available formats are tried in reversed order as listed here.
-    # Therefore file formats with some "magic" identifier, which can be
-    # recognized safely, should be added at the end of this list.
-
-    package require img::window
-    package require img::tga
-    package require img::ico
-    package require img::pcx
-    package require img::sgi
-    package require img::sun
-    package require img::xbm
-    package require img::xpm
-    package require img::ps
-    package require img::jpeg
-    package require img::png
-    package require img::tiff
-    package require img::bmp
-    package require img::ppm
-    package require img::gif
-    package require img::pixmap
-
-    package provide Img @VERSION@
-}
diff --git a/tkimg1.3/base/tclconfig/ChangeLog b/tkimg1.3/base/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/base/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/base/tclconfig/README.txt b/tkimg1.3/base/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/base/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/base/tclconfig/install-sh b/tkimg1.3/base/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/base/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/base/tclconfig/tcl.m4 b/tkimg1.3/base/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/base/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/base/tkimg.c b/tkimg1.3/base/tkimg.c
deleted file mode 100644
index eb87ca3..0000000
--- a/tkimg1.3/base/tkimg.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * tkimg.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: tkimg.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-#include "tk.h"
-#include "tkimg.h"
-
-#define TCL_DOES_STUBS \
-    (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
-    (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
-
-/*
- * Declarations for externally visible functions.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_tkimg
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_TKIMG_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-EXTERN int Tkimg_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Tkimg_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#ifdef ALLOW_B64
-static int tob64 _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
-		int argc, Tcl_Obj *CONST objv[]));
-static int fromb64 _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
-		int argc, Tcl_Obj *CONST objv[]));
-#endif
-
-/*
- * The variable "initialized" contains flags indicating which
- * version of Tcl or Perl we are running:
- *
- *	IMG_TCL		Tcl
- *	IMG_OBJS	using Tcl_Obj's in stead of char* (Tk 8.3 or higher)
- *      IMG_PERL	perl
- *
- * These flags will be determined at runtime (except the IMG_PERL
- * flag, for now), so we can use the same dynamic library for all
- * Tcl/Tk versions (and for Perl/Tk in the future).
- */
-
-static int initialized = 0;
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tkimg_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tkimg_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    EXTERN int TkimgInitUtilities _ANSI_ARGS_ ((Tcl_Interp* interp));
-
-#if TCL_DOES_STUBS
-    extern TkimgStubs tkimgStubs;
-#endif
-
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-#ifdef USE_TK_STUBS
-    if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-    if (!initialized) {
-	if (!(initialized = TkimgInitUtilities (interp))) {
-	    return TCL_ERROR;
-	}
-    }
-#ifdef ALLOW_B64 /* Undocumented feature */
-    Tcl_CreateObjCommand(interp,"img_to_base64",   tob64,   (ClientData) NULL, NULL);
-    Tcl_CreateObjCommand(interp,"img_from_base64", fromb64, (ClientData) NULL, NULL);
-#endif
-
-#if TCL_DOES_STUBS
-    if (Tcl_PkgProvideEx(interp, PACKAGE_NAME, TKIMG_VERSION,
-			 (ClientData) &tkimgStubs) != TCL_OK) {
-        return TCL_ERROR;
-    }
-#else
-    if (Tcl_PkgProvide(interp, PACKAGE_NAME, TKIMG_VERSION) != TCL_OK) {
-        return TCL_ERROR;
-    }
-#endif
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tkimg_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tkimg_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Tkimg_Init(interp);
-}
-
-/*
- *-------------------------------------------------------------------------
- * tob64 --
- *  This function converts the contents of a file into a base-64
- *  encoded string.
- *
- * Results:
- *  none
- *
- * Side effects:
- *  none
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef ALLOW_B64
-int tob64(clientData, interp, argc, objv)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    int argc;
-    Tcl_Obj *CONST objv[];
-{
-    Tcl_DString dstring;
-    tkimg_MFile handle;
-    Tcl_Channel chan;
-    char buffer[1024];
-    int len;
-
-    if (argc != 2) {
-	Tcl_WrongNumArgs(interp, 1, objv, "filename");
-	return TCL_ERROR;
-    }
-
-    chan = tkimg_OpenFileChannel(interp, Tcl_GetStringFromObj(objv[1], &len), 0);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    Tcl_DStringInit(&dstring);
-    tkimg_WriteInit(&dstring, &handle);
-
-    while ((len = Tcl_Read(chan, buffer, 1024)) == 1024) {
-	tkimg_Write(&handle, buffer, 1024);
-    }
-    if (len > 0) {
-	tkimg_Write(&handle, buffer, len);
-    }
-    if ((Tcl_Close(interp, chan) == TCL_ERROR) || (len < 0)) {
-	Tcl_DStringFree(&dstring);
-	Tcl_AppendResult(interp, Tcl_GetStringFromObj(objv[1], &len),
-		": ", Tcl_PosixError(interp), (char *)NULL);
-	return TCL_ERROR;
-    }
-    tkimg_Putc(IMG_DONE, &handle);
-
-    Tcl_DStringResult(interp, &dstring);
-    return TCL_OK;
-}
-
-/*
- *-------------------------------------------------------------------------
- * fromb64 --
- *  This function converts a base-64 encoded string into binary form,
- *  which is written to a file.
- *
- * Results:
- *  none
- *
- * Side effects:
- *  none
- *
- *-------------------------------------------------------------------------
- */
-
-int fromb64(clientData, interp, argc, objv)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    int argc;
-    Tcl_Obj *CONST objv[];
-{
-    tkimg_MFile handle;
-    Tcl_Channel chan;
-    char buffer[1024];
-    int len;
-
-    if (argc != 3) {
-	Tcl_WrongNumArgs(interp, 1, objv, "filename data");
-	return TCL_ERROR;
-    }
-
-    chan = tkimg_OpenFileChannel(interp, Tcl_GetStringFromObj(objv[1], &len), 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = Tcl_GetStringFromObj(objv[2], &handle.length);
-    handle.state = 0;
-
-    while ((len = tkimg_Read(&handle, buffer, 1024)) == 1024) {
-	if (Tcl_Write(chan, buffer, 1024) != 1024) {
-	    goto writeerror;
-	}
-    }
-    if (len > 0) {
-	if (Tcl_Write(chan, buffer, len) != len) {
-	    goto writeerror;
-	}
-    }
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return TCL_OK;
-
- writeerror:
-    Tcl_AppendResult(interp, Tcl_GetStringFromObj(objv[1], &len), ": ",
-	    Tcl_PosixError(interp), (char *)NULL);
-    return TCL_ERROR;
-}
-#endif
diff --git a/tkimg1.3/base/tkimg.decls b/tkimg1.3/base/tkimg.decls
deleted file mode 100644
index e45b503..0000000
--- a/tkimg1.3/base/tkimg.decls
+++ /dev/null
@@ -1,87 +0,0 @@
-# tkimg.decls -- -*- tcl -*-
-#
-# This file contains the declarations for all supported public functions
-# that are exported by the TKIMG library via the stubs table. This file
-# is used to generate the tkimgDecls.h/tkimgStubsLib.c/tkimgStubsInit.c
-# files.
-#	
-
-# Declare each of the functions in the public BLT interface.  Note that
-# the an index should never be reused for a different function in order
-# to preserve backwards compatibility.
-
-library tkimg
-
-# Define the TKIMG interface:
-
-interface tkimg
-#hooks {}
-
-#########################################################################
-###  Reading and writing image data from channels and/or strings.
-
-declare 0 generic {
-    Tcl_Channel tkimg_OpenFileChannel (Tcl_Interp *interp, 
-	CONST char *fileName, int permissions)
-}
-declare 1 generic {
-    int tkimg_ReadInit (Tcl_Obj *data, int c, tkimg_MFile *handle)
-}
-declare 2 generic {
-    void tkimg_WriteInit (Tcl_DString *buffer, tkimg_MFile *handle)
-}
-declare 3 generic {
-    int tkimg_Getc (tkimg_MFile *handle)
-}
-declare 4 generic {
-    int tkimg_Read (tkimg_MFile *handle, char *dst, int count)
-}
-declare 5 generic {
-    int tkimg_Putc (int c, tkimg_MFile *handle)
-}
-declare 6 generic {
-    int tkimg_Write (tkimg_MFile *handle, CONST char *src, int count)
-}
-declare 7 generic {
-    void tkimg_ReadBuffer (int onOff)
-}
-
-#########################################################################
-###  Specialized put block handling transparency
-
-declare 10 generic {
-    int tkimg_PhotoPutBlock (Tk_PhotoHandle handle,
-	Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height)
-}
-
-#########################################################################
-###  Utilities to help handling the differences in 8.3.2 and 8.3 image types.
-
-declare 20 generic {
-    void tkimg_FixChanMatchProc (Tcl_Interp **interp, Tcl_Channel *chan,
-	CONST char **file, Tcl_Obj **format, int **width, int **height)
-}
-declare 21 generic {
-    void tkimg_FixObjMatchProc (Tcl_Interp **interp, Tcl_Obj **data,
-	Tcl_Obj **format, int **width, int **height)
-}
-declare 22 generic {
-    void tkimg_FixStringWriteProc (Tcl_DString *data, Tcl_Interp **interp,
-	Tcl_DString **dataPtr, Tcl_Obj **format, Tk_PhotoImageBlock **blockPtr)
-}
-
-#########################################################################
-###  Like the core functions, except that they accept objPtr == NULL.
-###  The byte array function also handles both UTF and non-UTF cores.
-
-declare 30 generic {
-    char* tkimg_GetStringFromObj (Tcl_Obj *objPtr, int *lengthPtr)
-}
-declare 31 generic {
-    char* tkimg_GetByteArrayFromObj (Tcl_Obj *objPtr, int *lengthPtr)
-}
-declare 32 generic {
-    int tkimg_ListObjGetElements (Tcl_Interp *interp, Tcl_Obj *objPtr, int *argc, Tcl_Obj ***argv)
-}
-
-#########################################################################
diff --git a/tkimg1.3/base/tkimg.h b/tkimg1.3/base/tkimg.h
deleted file mode 100644
index b7b0034..0000000
--- a/tkimg1.3/base/tkimg.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * tkimg.h --
- *
- *	Interface to tkimg Base package.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: tkimg.h,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-#ifndef __TKIMG_H__
-#define __TKIMG_H__
-
-#include <stdio.h> /* stdout, and other definitions */
-#include "tk.h"
-
-/*
- * Used to block the rest of this header file from resource compilers so
- * we can just get the version info.
- */
-#ifndef RC_INVOKED
-
-/* TIP 27 update. If CONST84 is not defined we are compiling against a
- * core before 8.4 and have to disable some CONST'ness.
- */
-
-#ifndef CONST84
-#   define CONST84
-#endif
-
-/*
- * Fix the Borland bug that's in the EXTERN macro from tcl.h.
- */
-#ifndef TCL_EXTERN
-#   undef DLLIMPORT
-#   undef DLLEXPORT
-#   if defined(STATIC_BUILD)
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
-#	define DLLIMPORT __declspec(dllimport)
-#	define DLLEXPORT __declspec(dllexport)
-#   elif defined(__BORLANDC__)
-#	define OLDBORLAND 1
-#	define DLLIMPORT __import
-#	define DLLEXPORT __export
-#   else
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   endif
-    /* Avoid name mangling from C++ compilers. */
-#   ifdef __cplusplus
-#	define TCL_EXTRNC extern "C"
-#   else
-#	define TCL_EXTRNC extern
-#   endif
-    /* Pre-5.5 Borland requires the attributes be placed after the */
-    /* return type. */
-#   ifdef OLDBORLAND
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
-#   else
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
-#   endif
-#endif
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_tkimg
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_TKIMG_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * C API for Tkimg generic layer
- *----------------------------------------------------------------------------
- */
-
-typedef struct tkimg_MFile {
-    Tcl_DString *buffer;/* pointer to dynamical string */
-    char *data;		/* mmencoded source string */
-    int c;		/* bits left over from previous char */
-    int state;		/* decoder state (0-4 or IMG_DONE) */
-    int length;		/* length of physical line already written */
-} tkimg_MFile;
-
-#define IMG_SPECIAL	 (1<<8)
-#define IMG_PAD		(IMG_SPECIAL+1)
-#define IMG_SPACE	(IMG_SPECIAL+2)
-#define IMG_BAD		(IMG_SPECIAL+3)
-#define IMG_DONE	(IMG_SPECIAL+4)
-#define IMG_CHAN        (IMG_SPECIAL+5)
-#define IMG_STRING	(IMG_SPECIAL+6)
-
-#define IMG_TCL		(1<<9)
-#define IMG_OBJS	(1<<10)
-#define IMG_PERL	(1<<11)
-#define IMG_UTF		(1<<12)
-#define IMG_NEWPHOTO	(1<<13)
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for publically accessible routines
- *----------------------------------------------------------------------------
- */
-
-#include "tkimgDecls.h"
-
-/*
- * Convenience macro dealing with the 8.3 / 8.4 difference regarding
- * the signature of Tk_PhotoPutBlock [TIP 98].
- *
- * Note: The current implementation makes this a compile time decision.
- *       In the future we might realize a runtime decision instead.
- */
-
-#if (TK_MAJOR_VERSION > 8) || ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION > 4))
-/* TIP 116 */
-#define tkimg_PhotoPutBlockTk(interp,hdl,b,x,y,w,h) Tk_PhotoPutBlock(interp,hdl, b, x, y, w, h, TK_PHOTO_COMPOSITE_OVERLAY)
-#elif (TK_MAJOR_VERSION > 8) || ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION > 3))
-#define tkimg_PhotoPutBlockTk(interp,hdl,b,x,y,w,h) Tk_PhotoPutBlock(hdl, b, x, y, w, h, TK_PHOTO_COMPOSITE_OVERLAY)
-#else
-#define tkimg_PhotoPutBlockTk(interp,hdl,b,x,y,w,h) Tk_PhotoPutBlock(hdl, b, x, y, w, h)
-#endif
-
-#if (TK_MAJOR_VERSION > 8) || ((TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION > 4))
-#define tkimg_PhotoExpand(hdl,interp,w,h)  Tk_PhotoExpand(interp, hdl, w, h)
-#define tkimg_PhotoSetSize(interp,hdl,w,h) Tk_PhotoSetSize(interp, hdl, w, h)
-#else
-#define tkimg_PhotoExpand(hdl,interp,w,h)  Tk_PhotoExpand(hdl, w, h)
-#define tkimg_PhotoSetSize(interp,hdl,w,h) Tk_PhotoSetSize(hdl, w, h)
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for stub initialization.
- *----------------------------------------------------------------------------
- */
-
-#ifdef USE_TKIMG_STUBS
-EXTERN CONST char *
-Tkimg_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
-#else
-/*
- * When not using stubs, make it a macro.
- */
-
-#define Tkimg_InitStubs(interp, version, exact) \
-    Tcl_PkgRequire(interp, "tkimg", version, exact)
-#endif
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* RC_INVOKED */
-#endif /* __TKIMG_H__ */
diff --git a/tkimg1.3/base/tkimgConfig.sh.in b/tkimg1.3/base/tkimgConfig.sh.in
deleted file mode 100644
index 27caa9f..0000000
--- a/tkimg1.3/base/tkimgConfig.sh.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# tkimgConfig.sh --
-# 
-# This shell script (for sh) is generated automatically by tkimg's
-# configure script.  It will create shell variables for most of
-# the configuration options discovered by the configure script.
-# This script is intended to be included by the configure scripts
-# for tkimg extensions so that they don't have to figure this all
-# out for themselves.  This file does not duplicate information
-# already provided by tclConfig.sh, so you may need to use that
-# file in addition to this one.
-#
-# The information in this file is specific to a single platform.
-
-# tkimg's version number.
-tkimg_VERSION='@VERSION@'
-tkimg_MAJOR_VERSION='@MAJOR_VERSION@'
-tkimg_MINOR_VERSION='@MINOR_VERSION@'
-tkimg_RELEASE_LEVEL='@PATCHLEVEL@'
-
-# The name of the tkimg library (may be either a .a file or a shared library):
-tkimg_LIB_FILE=@tkimg_LIB_FILE@
-
-# String to pass to linker to pick up the tkimg library from its
-# build directory.
-tkimg_BUILD_LIB_SPEC='@tkimg_BUILD_LIB_SPEC@'
-
-# String to pass to linker to pick up the tkimg library from its
-# installed directory.
-tkimg_LIB_SPEC='@tkimg_LIB_SPEC@'
-
-# The name of the tkimg stub library (a .a file):
-tkimg_STUB_LIB_FILE=@tkimgstub_LIB_FILE@
-
-# String to pass to linker to pick up the tkimg stub library from its
-# build directory.
-tkimg_BUILD_STUB_LIB_SPEC='@tkimg_BUILD_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the tkimg stub library from its
-# installed directory.
-tkimg_STUB_LIB_SPEC='@tkimg_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the tkimg stub library from its
-# build directory.
-tkimg_BUILD_STUB_LIB_PATH='@tkimg_BUILD_STUB_LIB_PATH@'
-
-# String to pass to linker to pick up the tkimg stub library from its
-# installed directory.
-tkimg_STUB_LIB_PATH='@tkimg_STUB_LIB_PATH@'
-
-# Location of the top-level source directories from which tkimg
-# was built.  This is the directory that contains generic, unix, etc.
-# If tkimg was compiled in a different place than the directory
-# containing the source files, this points to the location of the
-# sources, not the location where tkimg was compiled. This can
-# be relative to the build directory.
-
-tkimg_SRC_DIR='@srcdir@'
diff --git a/tkimg1.3/base/tkimgDecls.h b/tkimg1.3/base/tkimgDecls.h
deleted file mode 100644
index 83790d2..0000000
--- a/tkimg1.3/base/tkimgDecls.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * tkimgDecls.h --
- *
- *	Declarations of functions in the platform independent public TKIMG API.
- *
- */
-
-#ifndef _TKIMGDECLS
-#define _TKIMGDECLS
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the tkimg.decls script.
- */
-
-#include <tk.h>
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-/* 0 */
-EXTERN Tcl_Channel	tkimg_OpenFileChannel _ANSI_ARGS_((
-				Tcl_Interp * interp, CONST char * fileName, 
-				int permissions));
-/* 1 */
-EXTERN int		tkimg_ReadInit _ANSI_ARGS_((Tcl_Obj * data, int c, 
-				tkimg_MFile * handle));
-/* 2 */
-EXTERN void		tkimg_WriteInit _ANSI_ARGS_((Tcl_DString * buffer, 
-				tkimg_MFile * handle));
-/* 3 */
-EXTERN int		tkimg_Getc _ANSI_ARGS_((tkimg_MFile * handle));
-/* 4 */
-EXTERN int		tkimg_Read _ANSI_ARGS_((tkimg_MFile * handle, 
-				char * dst, int count));
-/* 5 */
-EXTERN int		tkimg_Putc _ANSI_ARGS_((int c, tkimg_MFile * handle));
-/* 6 */
-EXTERN int		tkimg_Write _ANSI_ARGS_((tkimg_MFile * handle, 
-				CONST char * src, int count));
-/* 7 */
-EXTERN void		tkimg_ReadBuffer _ANSI_ARGS_((int onOff));
-/* Slot 8 is reserved */
-/* Slot 9 is reserved */
-/* 10 */
-EXTERN int		tkimg_PhotoPutBlock _ANSI_ARGS_((
-				Tk_PhotoHandle handle, 
-				Tk_PhotoImageBlock * blockPtr, int x, int y, 
-				int width, int height));
-/* Slot 11 is reserved */
-/* Slot 12 is reserved */
-/* Slot 13 is reserved */
-/* Slot 14 is reserved */
-/* Slot 15 is reserved */
-/* Slot 16 is reserved */
-/* Slot 17 is reserved */
-/* Slot 18 is reserved */
-/* Slot 19 is reserved */
-/* 20 */
-EXTERN void		tkimg_FixChanMatchProc _ANSI_ARGS_((
-				Tcl_Interp ** interp, Tcl_Channel * chan, 
-				CONST char ** file, Tcl_Obj ** format, 
-				int ** width, int ** height));
-/* 21 */
-EXTERN void		tkimg_FixObjMatchProc _ANSI_ARGS_((
-				Tcl_Interp ** interp, Tcl_Obj ** data, 
-				Tcl_Obj ** format, int ** width, 
-				int ** height));
-/* 22 */
-EXTERN void		tkimg_FixStringWriteProc _ANSI_ARGS_((
-				Tcl_DString * data, Tcl_Interp ** interp, 
-				Tcl_DString ** dataPtr, Tcl_Obj ** format, 
-				Tk_PhotoImageBlock ** blockPtr));
-/* Slot 23 is reserved */
-/* Slot 24 is reserved */
-/* Slot 25 is reserved */
-/* Slot 26 is reserved */
-/* Slot 27 is reserved */
-/* Slot 28 is reserved */
-/* Slot 29 is reserved */
-/* 30 */
-EXTERN char*		tkimg_GetStringFromObj _ANSI_ARGS_((Tcl_Obj * objPtr, 
-				int * lengthPtr));
-/* 31 */
-EXTERN char*		tkimg_GetByteArrayFromObj _ANSI_ARGS_((
-				Tcl_Obj * objPtr, int * lengthPtr));
-/* 32 */
-EXTERN int		tkimg_ListObjGetElements _ANSI_ARGS_((
-				Tcl_Interp * interp, Tcl_Obj * objPtr, 
-				int * argc, Tcl_Obj *** argv));
-
-typedef struct TkimgStubs {
-    int magic;
-    struct TkimgStubHooks *hooks;
-
-    Tcl_Channel (*tkimg_OpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName, int permissions)); /* 0 */
-    int (*tkimg_ReadInit) _ANSI_ARGS_((Tcl_Obj * data, int c, tkimg_MFile * handle)); /* 1 */
-    void (*tkimg_WriteInit) _ANSI_ARGS_((Tcl_DString * buffer, tkimg_MFile * handle)); /* 2 */
-    int (*tkimg_Getc) _ANSI_ARGS_((tkimg_MFile * handle)); /* 3 */
-    int (*tkimg_Read) _ANSI_ARGS_((tkimg_MFile * handle, char * dst, int count)); /* 4 */
-    int (*tkimg_Putc) _ANSI_ARGS_((int c, tkimg_MFile * handle)); /* 5 */
-    int (*tkimg_Write) _ANSI_ARGS_((tkimg_MFile * handle, CONST char * src, int count)); /* 6 */
-    void (*tkimg_ReadBuffer) _ANSI_ARGS_((int onOff)); /* 7 */
-    void *reserved8;
-    void *reserved9;
-    int (*tkimg_PhotoPutBlock) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height)); /* 10 */
-    void *reserved11;
-    void *reserved12;
-    void *reserved13;
-    void *reserved14;
-    void *reserved15;
-    void *reserved16;
-    void *reserved17;
-    void *reserved18;
-    void *reserved19;
-    void (*tkimg_FixChanMatchProc) _ANSI_ARGS_((Tcl_Interp ** interp, Tcl_Channel * chan, CONST char ** file, Tcl_Obj ** format, int ** width, int ** height)); /* 20 */
-    void (*tkimg_FixObjMatchProc) _ANSI_ARGS_((Tcl_Interp ** interp, Tcl_Obj ** data, Tcl_Obj ** format, int ** width, int ** height)); /* 21 */
-    void (*tkimg_FixStringWriteProc) _ANSI_ARGS_((Tcl_DString * data, Tcl_Interp ** interp, Tcl_DString ** dataPtr, Tcl_Obj ** format, Tk_PhotoImageBlock ** blockPtr)); /* 22 */
-    void *reserved23;
-    void *reserved24;
-    void *reserved25;
-    void *reserved26;
-    void *reserved27;
-    void *reserved28;
-    void *reserved29;
-    char* (*tkimg_GetStringFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 30 */
-    char* (*tkimg_GetByteArrayFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 31 */
-    int (*tkimg_ListObjGetElements) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * argc, Tcl_Obj *** argv)); /* 32 */
-} TkimgStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TkimgStubs *tkimgStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TKIMG_STUBS) && !defined(USE_TKIMG_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef tkimg_OpenFileChannel
-#define tkimg_OpenFileChannel \
-	(tkimgStubsPtr->tkimg_OpenFileChannel) /* 0 */
-#endif
-#ifndef tkimg_ReadInit
-#define tkimg_ReadInit \
-	(tkimgStubsPtr->tkimg_ReadInit) /* 1 */
-#endif
-#ifndef tkimg_WriteInit
-#define tkimg_WriteInit \
-	(tkimgStubsPtr->tkimg_WriteInit) /* 2 */
-#endif
-#ifndef tkimg_Getc
-#define tkimg_Getc \
-	(tkimgStubsPtr->tkimg_Getc) /* 3 */
-#endif
-#ifndef tkimg_Read
-#define tkimg_Read \
-	(tkimgStubsPtr->tkimg_Read) /* 4 */
-#endif
-#ifndef tkimg_Putc
-#define tkimg_Putc \
-	(tkimgStubsPtr->tkimg_Putc) /* 5 */
-#endif
-#ifndef tkimg_Write
-#define tkimg_Write \
-	(tkimgStubsPtr->tkimg_Write) /* 6 */
-#endif
-#ifndef tkimg_ReadBuffer
-#define tkimg_ReadBuffer \
-	(tkimgStubsPtr->tkimg_ReadBuffer) /* 7 */
-#endif
-/* Slot 8 is reserved */
-/* Slot 9 is reserved */
-#ifndef tkimg_PhotoPutBlock
-#define tkimg_PhotoPutBlock \
-	(tkimgStubsPtr->tkimg_PhotoPutBlock) /* 10 */
-#endif
-/* Slot 11 is reserved */
-/* Slot 12 is reserved */
-/* Slot 13 is reserved */
-/* Slot 14 is reserved */
-/* Slot 15 is reserved */
-/* Slot 16 is reserved */
-/* Slot 17 is reserved */
-/* Slot 18 is reserved */
-/* Slot 19 is reserved */
-#ifndef tkimg_FixChanMatchProc
-#define tkimg_FixChanMatchProc \
-	(tkimgStubsPtr->tkimg_FixChanMatchProc) /* 20 */
-#endif
-#ifndef tkimg_FixObjMatchProc
-#define tkimg_FixObjMatchProc \
-	(tkimgStubsPtr->tkimg_FixObjMatchProc) /* 21 */
-#endif
-#ifndef tkimg_FixStringWriteProc
-#define tkimg_FixStringWriteProc \
-	(tkimgStubsPtr->tkimg_FixStringWriteProc) /* 22 */
-#endif
-/* Slot 23 is reserved */
-/* Slot 24 is reserved */
-/* Slot 25 is reserved */
-/* Slot 26 is reserved */
-/* Slot 27 is reserved */
-/* Slot 28 is reserved */
-/* Slot 29 is reserved */
-#ifndef tkimg_GetStringFromObj
-#define tkimg_GetStringFromObj \
-	(tkimgStubsPtr->tkimg_GetStringFromObj) /* 30 */
-#endif
-#ifndef tkimg_GetByteArrayFromObj
-#define tkimg_GetByteArrayFromObj \
-	(tkimgStubsPtr->tkimg_GetByteArrayFromObj) /* 31 */
-#endif
-#ifndef tkimg_ListObjGetElements
-#define tkimg_ListObjGetElements \
-	(tkimgStubsPtr->tkimg_ListObjGetElements) /* 32 */
-#endif
-
-#endif /* defined(USE_TKIMG_STUBS) && !defined(USE_TKIMG_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _TKIMGDECLS */
-
diff --git a/tkimg1.3/base/tkimgIO.c b/tkimg1.3/base/tkimgIO.c
deleted file mode 100644
index ddb7dd2..0000000
--- a/tkimg1.3/base/tkimgIO.c
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- * tkimg.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: tkimgIO.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-#include "tk.h"
-#include "tkimg.h"
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-/* Variables needed for optional read buffer. See tkimg_ReadBuffer. */
-#define BUFLEN 4096
-static int
-	useReadBuf = 0,
-        bufStart   = -1,
-        bufEnd     = -1;
-static char 
-        readBuf[BUFLEN];
-
-static int char64 _ANSI_ARGS_((int c));
-
-
-/*
- *--------------------------------------------------------------------------
- * char64 --
- *
- *	This procedure converts a base64 ascii character into its binary
- *	equivalent. This code is a slightly modified version of the
- *	char64 proc in N. Borenstein's metamail decoder.
- *
- * Results:
- *	The binary value, or an error code.
- *
- * Side effects:
- *	None.
- *--------------------------------------------------------------------------
- */
-
-static int
-char64(c)
-    int c;
-{
-    switch(c) {
-	case 'A': return 0;	case 'B': return 1;	case 'C': return 2;
-	case 'D': return 3;	case 'E': return 4;	case 'F': return 5;
-	case 'G': return 6;	case 'H': return 7;	case 'I': return 8;
-	case 'J': return 9;	case 'K': return 10;	case 'L': return 11;
-	case 'M': return 12;	case 'N': return 13;	case 'O': return 14;
-	case 'P': return 15;	case 'Q': return 16;	case 'R': return 17;
-	case 'S': return 18;	case 'T': return 19;	case 'U': return 20;
-	case 'V': return 21;	case 'W': return 22;	case 'X': return 23;
-	case 'Y': return 24;	case 'Z': return 25;	case 'a': return 26;
-	case 'b': return 27;	case 'c': return 28;	case 'd': return 29;
-	case 'e': return 30;	case 'f': return 31;	case 'g': return 32;
-	case 'h': return 33;	case 'i': return 34;	case 'j': return 35;
-	case 'k': return 36;	case 'l': return 37;	case 'm': return 38;
-	case 'n': return 39;	case 'o': return 40;	case 'p': return 41;
-	case 'q': return 42;	case 'r': return 43;	case 's': return 44;
-	case 't': return 45;	case 'u': return 46;	case 'v': return 47;
-	case 'w': return 48;	case 'x': return 49;	case 'y': return 50;
-	case 'z': return 51;	case '0': return 52;	case '1': return 53;
-	case '2': return 54;	case '3': return 55;	case '4': return 56;
-	case '5': return 57;	case '6': return 58;	case '7': return 59;
-	case '8': return 60;	case '9': return 61;	case '+': return 62;
-	case '/': return 63;
-
-	case ' ': case '\t': case '\n': case '\r': case '\f': return IMG_SPACE;
-	case '=': return IMG_PAD;
-	case '\0': return IMG_DONE;
-	default: return IMG_BAD;
-    }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * tkimg_ReadBuffer -- 
- *	Initialize optional read buffer.
- *
- *	The optional read buffer may be used for compressed image file
- *	formats (ex. RLE), where the file has to be read byte by byte.
- *	This option is only available when reading from an image file,
- *	i.e. "image create -file ..."
- *
- *	CAUTION:
- *	- Use this option only, when you do NOT use file seeks.
- *    	- Use tkimg_ReadBuffer (1) to initialize the read buffer before usage.
- *	  Use tkimg_ReadBuffer (0) to switch off the read buffer after usage.
- *
- * Results:
- *	None
- *
- * Side effects:
- *	Changes the static variables needed for the read buffer.
- *
- *--------------------------------------------------------------
- */
-
-void tkimg_ReadBuffer (onOff) 
-int onOff;
-{
-    useReadBuf = onOff;
-    if (onOff) {
-	memset (readBuf, 0, BUFLEN);
-	bufStart = -1;
-	bufEnd   = -1;
-    }
-}
-
-/*
- *--------------------------------------------------------------------------
- * tkimg_Read --
- *
- *  This procedure returns a buffer from the stream input. This stream
- *  could be anything from a base-64 encoded string to a Channel.
- *
- * Results:
- *  The number of characters successfully read from the input
- *
- * Side effects:
- *  The tkimg_MFile state could change.
- *--------------------------------------------------------------------------
- */
-
-int
-tkimg_Read(handle, dst, count)
-    tkimg_MFile *handle;	/* mmdecode "file" handle */
-    char *dst;		/* where to put the result */
-    int count;		/* number of bytes */
-{
-    register int i, c;
-    int bytesRead, bytesToRead;
-    char *dstPtr;
-
-    switch (handle->state) {
-      case IMG_STRING:
-	if (count > handle->length) {
-	    count = handle->length;
-	}
-	if (count) {
-	    memcpy(dst, handle->data, count);
-	    handle->length -= count;
-	    handle->data += count;
-	}
-	return count;
-      case IMG_CHAN:
-	if (!useReadBuf) {
-	    return Tcl_Read((Tcl_Channel) handle->data, dst, count);
-	}
-	dstPtr = dst;
-	bytesToRead = count;
-	bytesRead = 0;
-	while (bytesToRead > 0) {
-	    #ifdef DEBUG_LOCAL
-		printf ("bytesToRead=%d bytesRead=%d (bufStart=%d bufEnd=%d)\n",
-			 bytesToRead, bytesRead, bufStart, bufEnd);
-	    #endif
-	    if (bufStart < 0) {
-		bufEnd = Tcl_Read((Tcl_Channel)handle->data, readBuf, BUFLEN)-1;
-		#ifdef DEBUG_LOCAL
-		    printf ("Reading new %d bytes into buffer "
-                            "(bufStart=%d bufEnd=%d)\n", 
-                            BUFLEN, bufStart, bufEnd);
-		#endif
-		bufStart = 0;
-	   	if (bufEnd < 0) 
-		    return bufEnd;
-	    }
-	    if (bufStart + bytesToRead <= bufEnd +1) {
-		#ifdef DEBUG_LOCAL
-		    printf ("All in buffer: memcpy %d bytes\n", bytesToRead);
-		#endif
-		/* All bytes already in the buffer. Just copy them to dst. */
-		memcpy (dstPtr, readBuf + bufStart, bytesToRead);
-		bufStart += bytesToRead;
-		if (bufStart > BUFLEN)
-		    bufStart = -1;
-		return bytesRead + bytesToRead;
-	    } else {
-		#ifdef DEBUG_LOCAL
-		    printf ("Copy rest of buffer: memcpy %d bytes\n",
-                            bufEnd+1-bufStart);
-		#endif
-		memcpy (dstPtr, readBuf + bufStart, bufEnd+1 - bufStart);
-		bytesRead += (bufEnd +1 - bufStart);
-		bytesToRead -= (bufEnd+1 - bufStart);
-		bufStart = -1;
-		dstPtr += bytesRead;
-	    }
-	}
-    }
-
-    for(i=0; i<count && (c=tkimg_Getc(handle)) != IMG_DONE; i++) {
-	*dst++ = c;
-    }
-    return i;
-}
-
-/*
- *--------------------------------------------------------------------------
- *
- * tkimg_Getc --
- *
- *  This procedure returns the next input byte from a stream. This stream
- *  could be anything from a base-64 encoded string to a Channel.
- *
- * Results:
- *  The next byte (or IMG_DONE) is returned.
- *
- * Side effects:
- *  The tkimg_MFile state could change.
- *
- *--------------------------------------------------------------------------
- */
-
-int
-tkimg_Getc(handle)
-   tkimg_MFile *handle;			/* Input stream handle */
-{
-    int c;
-    int result = 0;			/* Initialization needed only to prevent
-					 * gcc compiler warning */
-    if (handle->state == IMG_DONE) {
-	return IMG_DONE;
-    }
-
-    if (handle->state == IMG_STRING) {
-	if (!handle->length--) {
-	    handle->state = IMG_DONE;
-	    return IMG_DONE;
-	}
-	return *handle->data++;
-    }
-
-    do {
-	if (!handle->length--) {
-	    handle->state = IMG_DONE;
-	    return IMG_DONE;
-	}
-	c = char64(*handle->data++);
-    } while (c == IMG_SPACE);
-
-    if (c > IMG_SPECIAL) {
-	handle->state = IMG_DONE;
-	return IMG_DONE;
-    }
-
-    switch (handle->state++) {
-	case 0:
-	    handle->c = c<<2;
-	    result = tkimg_Getc(handle);
-	    break;
-	case 1:
-	    result = handle->c | (c>>4);
-	    handle->c = (c&0xF)<<4;
-	    break;
-	case 2:
-	    result = handle->c | (c>>2);
-	    handle->c = (c&0x3)<<6;
-	    break;
-	case 3:
-	    result = handle->c | c;
-	    handle->state = 0;
-	    break;
-    }
-    return result;
-}
-
-/*
- *-----------------------------------------------------------------------
- * tkimg_Write --
- *
- *  This procedure is invoked to put imaged data into a stream
- *  using tkimg_Putc.
- *
- * Results:
- *  The return value is the number of characters "written"
- *
- * Side effects:
- *  The base64 handle will change state.
- *
- *-----------------------------------------------------------------------
- */
-
-int
-tkimg_Write(handle, src, count)
-    tkimg_MFile *handle;	/* mmencode "file" handle */
-    CONST char *src;	/* where to get the data */
-    int count;		/* number of bytes */
-{
-    register int i;
-    int curcount, bufcount;
-
-    if (handle->state == IMG_CHAN) {
-	return Tcl_Write((Tcl_Channel) handle->data, (char *) src, count);
-    }
-    curcount = handle->data - Tcl_DStringValue(handle->buffer);
-    bufcount = curcount + count + count/3 + count/52 + 1024;
-
-    /* make sure that the DString contains enough space */
-    if (bufcount >= (handle->buffer->spaceAvl)) {
-	Tcl_DStringSetLength(handle->buffer, bufcount + 4096);
-	handle->data = Tcl_DStringValue(handle->buffer) + curcount;
-    }
-    /* write the data */
-    for (i=0; (i<count) && (tkimg_Putc(*src++, handle) != IMG_DONE); i++) {
-	/* empty loop body */
-    }
-    return i;
-}
-
-/*
- *-----------------------------------------------------------------------
- *
- * tkimg_Putc --
- *
- *  This procedure encodes and writes the next byte to a base64
- *  encoded string.
- *
- * Results:
- *  The written byte is returned.
- *
- * Side effects:
- *  the base64 handle will change state.
- *
- *-----------------------------------------------------------------------
- */
-
-static char base64_table[64] = {
-    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
-    'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
-    'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
-    'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
-    'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
-    'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
-    'w', 'x', 'y', 'z', '0', '1', '2', '3',
-    '4', '5', '6', '7', '8', '9', '+', '/'
-};
-
-int
-tkimg_Putc(c, handle)
-    register int c;		/* character to be written */
-    register tkimg_MFile *handle;	/* handle containing decoder data and state */
-{
-    /* In fact, here should be checked first if the dynamic
-     * string contains enough space for the next character.
-     * This would be very expensive to do for each character.
-     * Therefore we just allocate 1024 bytes immediately in
-     * the beginning and also take a 1024 bytes margin inside
-     * every tkimg_Write. At least this check is done then only
-     * every 256 bytes, which is much faster. Because the GIF
-     * header is less than 1024 bytes and pixel data is
-     * written in 256 byte portions, this should be safe.
-     */
-
-    if (c == IMG_DONE) {
-	switch(handle->state) {
-	    case 0:
-		break;
-	    case 1:
-		*handle->data++ = base64_table[(handle->c<<4)&63];
-		*handle->data++ = '='; *handle->data++ = '='; break;
-	    case 2:
-		*handle->data++ = base64_table[(handle->c<<2)&63];
-		*handle->data++ = '='; break;
-	    default:
-		handle->state = IMG_DONE;
-		return IMG_DONE;
-	}
-	Tcl_DStringSetLength(handle->buffer,
-		(handle->data) - Tcl_DStringValue(handle->buffer));
-	handle->state = IMG_DONE;
-	return IMG_DONE;
-    }
-
-    if (handle->state == IMG_CHAN) {
-	char ch = (char) c;
-	return (Tcl_Write((Tcl_Channel) handle->data, &ch, 1)>0) ? c : IMG_DONE;
-    }
-
-    c &= 0xff;
-    switch (handle->state++) {
-	case 0:
-	    *handle->data++ = base64_table[(c>>2)&63]; break;
-	case 1:
-	    c |= handle->c << 8;
-	    *handle->data++ = base64_table[(c>>4)&63]; break;
-	case 2:
-	    handle->state = 0;
-	    c |= handle->c << 8;
-	    *handle->data++ = base64_table[(c>>6)&63];
-	    *handle->data++ = base64_table[c&63]; break;
-    }
-    handle->c = c;
-    if (handle->length++ > 52) {
-	handle->length = 0;
-	*handle->data++ = '\n';
-    }
-    return c & 0xff;
-};
-
-/*
- *-------------------------------------------------------------------------
- * tkimg_WriteInit --
- *  This procedure initializes a base64 decoder handle for writing
- *
- * Results:
- *  none
- *
- * Side effects:
- *  the base64 handle is initialized
- *
- *-------------------------------------------------------------------------
- */
-
-void
-tkimg_WriteInit(buffer, handle)
-    Tcl_DString *buffer;
-    tkimg_MFile *handle;		/* mmencode "file" handle */
-{
-    Tcl_DStringSetLength(buffer, buffer->spaceAvl);
-    handle->buffer = buffer;
-    handle->data = Tcl_DStringValue(buffer);
-    handle->state = 0;
-    handle->length = 0;
-}
-
-/*
- *-------------------------------------------------------------------------
- * tkimg_ReadInit --
- *  This procedure initializes a base64 decoder handle for reading.
- *
- * Results:
- *  none
- *
- * Side effects:
- *  the base64 handle is initialized
- *
- *-------------------------------------------------------------------------
- */
-
-int
-tkimg_ReadInit(data, c, handle)
-    Tcl_Obj *data;		/* string containing initial mmencoded data */
-    int c;
-    tkimg_MFile *handle;		/* mmdecode "file" handle */
-{
-    handle->data = tkimg_GetByteArrayFromObj(data, &handle->length);
-    if (*handle->data == c) {
-	handle->state = IMG_STRING;
-	return 1;
-    }
-    c = base64_table[(c>>2)&63];
-
-    while((handle->length) && (char64(*handle->data) == IMG_SPACE)) {
-	handle->data++;
-	handle->length--;
-    }
-    if (c != *handle->data) {
-	handle->state = IMG_DONE;
-	return 0;
-    }
-    handle->state = 0;
-    return 1;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_OpenFileChannel --
- *
- *	Open a file channel in binary mode. If permissions is 0, the
- *	file will be opened in read mode, otherwise in write mode.
- *
- * Results:
- *	The same as Tcl_OpenFileChannel, only the file will
- *	always be opened in binary mode without encoding.
- *
- * Side effects:
- *	If function fails, an error message will be left in the
- *	interpreter.
- *
- *----------------------------------------------------------------------
- */
-
-Tcl_Channel
-tkimg_OpenFileChannel(interp, fileName, permissions)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    int permissions;
-{
-    Tcl_Channel chan = Tcl_OpenFileChannel(interp, (char *) fileName,
-	    permissions?"w":"r", permissions);
-    if (!chan) {
-	return (Tcl_Channel) NULL;
-    }
-    if (Tcl_SetChannelOption(interp, chan, "-buffersize", "131072") != TCL_OK) {        Tcl_Close(interp, chan);
-        return (Tcl_Channel) NULL;
-    }
-    if (Tcl_SetChannelOption(interp, chan, "-translation", "binary") != TCL_OK) {
-	Tcl_Close(interp, chan);
-	return (Tcl_Channel) NULL;
-    }
-    return chan;
-}
-
diff --git a/tkimg1.3/base/tkimgPPB.c b/tkimg1.3/base/tkimgPPB.c
deleted file mode 100644
index 605dfe6..0000000
--- a/tkimg1.3/base/tkimgPPB.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *	tkimgPPB.tcl
- */
-
-#include "tkimg.h"
-#include <string.h>
-
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_PhotoPutBlock --
- *
- *	This procedure is called to put image data into a photo image.
- *	The difference with Tk_PhotoPutBlock is that it handles the
- *	transparency information as well.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The image data is stored.  The image may be expanded.
- *	The Tk image code is informed that the image has changed.
- *
- *----------------------------------------------------------------------
- */
-
-int
-tkimg_PhotoPutBlock(handle, blockPtr, x, y, width, height)
-    Tk_PhotoHandle handle;	/* Opaque handle for the photo image
-				 * to be updated. */
-    Tk_PhotoImageBlock *blockPtr;
-				/* Pointer to a structure describing the
-				 * pixel data to be copied into the image. */
-    int x, y;			/* Coordinates of the top-left pixel to
-				 * be updated in the image. */
-    int width, height;		/* Dimensions of the area of the image
-				 * to be updated. */
-{
-    int alphaOffset;
-
-    alphaOffset = blockPtr->offset[3];
-    if ((alphaOffset< 0) || (alphaOffset>= blockPtr->pixelSize)) {
-	alphaOffset = blockPtr->offset[0];
-	if (alphaOffset < blockPtr->offset[1]) {
-	    alphaOffset = blockPtr->offset[1];
-	}
-	if (alphaOffset < blockPtr->offset[2]) {
-	    alphaOffset = blockPtr->offset[2];
-	}
-	if (++alphaOffset >= blockPtr->pixelSize) {
-	    alphaOffset = blockPtr->offset[0];
-	}
-    } else {
-	if ((alphaOffset == blockPtr->offset[1]) ||
-		(alphaOffset == blockPtr->offset[2])) {
-	    alphaOffset = blockPtr->offset[0];
-	}
-    }
-    if (alphaOffset != blockPtr->offset[0]) {
-	int X, Y, end;
-	unsigned char *pixelPtr, *imagePtr, *rowPtr;
-	rowPtr = imagePtr = blockPtr->pixelPtr;
-	for (Y = 0; Y < height; Y++) {
-	    X = 0;
-	    pixelPtr = rowPtr + alphaOffset;
-	    while(X < width) {
-		/* search for first non-transparent pixel */
-		while ((X < width) && !(*pixelPtr)) {
-		    X++; pixelPtr += blockPtr->pixelSize;
-		}
-		end = X;
-		/* search for first transparent pixel */
-		while ((end < width) && *pixelPtr) {
-		    end++; pixelPtr += blockPtr->pixelSize;
-		}
-		if (end > X) {
- 		    blockPtr->pixelPtr =  rowPtr + blockPtr->pixelSize * X;
-		    tkimg_PhotoPutBlockTk (NULL,handle, blockPtr, x+X, y+Y, end-X, 1);
-		}
-		X = end;
-	    }
-	    rowPtr += blockPtr->pitch;
-	}
-	blockPtr->pixelPtr = imagePtr;
-    } else {
-	tkimg_PhotoPutBlockTk (NULL,handle,blockPtr,x,y,width,height);
-    }
-    return TCL_OK;
-}
diff --git a/tkimg1.3/base/tkimgStubInit.c b/tkimg1.3/base/tkimgStubInit.c
deleted file mode 100644
index 85ba602..0000000
--- a/tkimg1.3/base/tkimgStubInit.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* 
- * tkimgStubInit.c --
- */
-
-#include "tkimg.h"
-
-/*
- * Remove macros that will interfere with the definitions below.
- */
-
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the tkimg.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-TkimgStubs tkimgStubs = {
-    TCL_STUB_MAGIC,
-    NULL,
-    tkimg_OpenFileChannel, /* 0 */
-    tkimg_ReadInit, /* 1 */
-    tkimg_WriteInit, /* 2 */
-    tkimg_Getc, /* 3 */
-    tkimg_Read, /* 4 */
-    tkimg_Putc, /* 5 */
-    tkimg_Write, /* 6 */
-    tkimg_ReadBuffer, /* 7 */
-    NULL, /* 8 */
-    NULL, /* 9 */
-    tkimg_PhotoPutBlock, /* 10 */
-    NULL, /* 11 */
-    NULL, /* 12 */
-    NULL, /* 13 */
-    NULL, /* 14 */
-    NULL, /* 15 */
-    NULL, /* 16 */
-    NULL, /* 17 */
-    NULL, /* 18 */
-    NULL, /* 19 */
-    tkimg_FixChanMatchProc, /* 20 */
-    tkimg_FixObjMatchProc, /* 21 */
-    tkimg_FixStringWriteProc, /* 22 */
-    NULL, /* 23 */
-    NULL, /* 24 */
-    NULL, /* 25 */
-    NULL, /* 26 */
-    NULL, /* 27 */
-    NULL, /* 28 */
-    NULL, /* 29 */
-    tkimg_GetStringFromObj, /* 30 */
-    tkimg_GetByteArrayFromObj, /* 31 */
-    tkimg_ListObjGetElements, /* 32 */
-};
-
-/* !END!: Do not edit above this line. */
diff --git a/tkimg1.3/base/tkimgStubLib.c b/tkimg1.3/base/tkimgStubLib.c
deleted file mode 100644
index 1ef8e5b..0000000
--- a/tkimg1.3/base/tkimgStubLib.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
- * tkimgStubLib.c --
- *
- *	Stub object that will be statically linked into extensions that wish
- *	to access the TKIMG API.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: tkimgStubLib.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- */
-
-#ifndef USE_TCL_STUBS
-#define USE_TCL_STUBS
-#endif
-
-#include "tkimg.h"
-
-TkimgStubs *tkimgStubsPtr;
-
-/*
- *----------------------------------------------------------------------
- *
- * Tkimg_InitStubs --
- *
- *	Checks that the correct version of Blt is loaded and that it
- *	supports stubs. It then initialises the stub table pointers.
- *
- * Results:
- *	The actual version of BLT that satisfies the request, or
- *	NULL to indicate that an error occurred.
- *
- * Side effects:
- *	Sets the stub table pointers.
- *
- *----------------------------------------------------------------------
- */
-
-#ifdef Tkimg_InitStubs
-#undef Tkimg_InitStubs
-#endif
-
-CONST char *
-Tkimg_InitStubs(interp, version, exact)
-    Tcl_Interp *interp;
-    CONST char *version;
-    int exact;
-{
-    CONST char *result;
-
-    /* HACK: de-CONST 'version' if compiled against 8.3.
-     * The API has no CONST despite not modifying the argument
-     * And a debug build with high warning-level on windows
-     * will abort the compilation.
-     */
-
-#if ((TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)))
-#define UNCONST (char*)
-#else
-#define UNCONST 
-#endif
-
-    result = Tcl_PkgRequireEx(interp, PACKAGE_NAME, UNCONST version, exact,
-		(ClientData *) &tkimgStubsPtr);
-    if (!result || !tkimgStubsPtr) {
-        return (char *) NULL;
-    }
-
-    return result;
-}
-#undef UNCONST
diff --git a/tkimg1.3/base/tkimgUtils.c b/tkimg1.3/base/tkimgUtils.c
deleted file mode 100644
index 3c96244..0000000
--- a/tkimg1.3/base/tkimgUtils.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- *	tkimgMap.tcl
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <tcl.h>
-#include "tkimg.h"
-
-/*
- * The variable "initialized" contains flags indicating which
- * version of Tcl or Perl we are running:
- *
- *      IMG_PERL	perl
- *	IMG_TCL		Tcl
- *	IMG_OBJS	using (Tcl_Obj *) in stead of (char *)
- *	IMG_UTF		Tcl supports UTF-8
- *	IMG_NEWPHOTO	Photo image type proc signatures are 8.3 or higher.
- *
- * These flags will be determined at runtime (except the IMG_PERL
- * flag, for now), so we can use the same dynamic library for all
- * Tcl/Tk versions (and for Perl/Tk in the future).
- *
- * The existence of the CPP macro _LANG implies usage in Perl/Tk.
- *
- * Img 2.0: Support for Tcl 7.6 is dropped. This implies that IMG_OBJS
- *          is always set. Therefore this flag is dropped as well, and
- *          also all code for !IMG_OBJS.
- */
-
-static int initialized = 0;
-static Tcl_ObjType* byteArrayType = 0;
-
-int
-TkimgInitUtilities (interp)
-    Tcl_Interp *interp;
-{
-    Tcl_CmdInfo cmdInfo;
-#ifdef _LANG
-    initialized = IMG_PERL;
-    return initialized;
-#else
-
-    int major, minor, patchlevel, type;
-    initialized = IMG_TCL;
-
-    Tcl_GetVersion (&major, &minor, &patchlevel, &type);
-
-    if ((major > 8) || ((major == 8) && (minor > 0))) {
-	initialized |= IMG_UTF;
-    }
-    if ((major > 8) || ((major == 8) && (minor > 2))) {
-        initialized |= IMG_NEWPHOTO;
-    }
-
-    /* Check for the presence of 'ByteArray's.
-     */
-
-    byteArrayType = Tcl_GetObjType ("bytearray");
-    return initialized;
-#endif
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_GetStringFromObj --
- *
- *	Returns the string representation's byte array pointer and length
- *	for an object.
- *
- * Results:
- *	Returns a pointer to the string representation of objPtr.  If
- *	lengthPtr isn't NULL, the length of the string representation is
- *	stored at *lengthPtr. The byte array referenced by the returned
- *	pointer must not be modified by the caller. Furthermore, the
- *	caller must copy the bytes if they need to retain them since the
- *	object's string rep can change as a result of other operations.
- *      REMARK: This function reacts a little bit different than
- *	Tcl_GetStringFromObj():
- *	- objPtr is allowed to be NULL. In that case the NULL pointer
- *	  will be returned, and the length will be reported to be 0;
- *	In the tkimg_ code there is never a distinction between en empty
- *	string and a NULL pointer, while the latter is easier to check
- *	for. That's the reason for this difference.
- *
- * Side effects:
- *	May call the object's updateStringProc to update the string
- *	representation from the internal representation.
- *
- *----------------------------------------------------------------------
- */
-
-char *
-tkimg_GetStringFromObj(objPtr, lengthPtr)
-    register Tcl_Obj *objPtr;	/* Object whose string rep byte pointer
-				 * should be returned, or NULL */
-    register int *lengthPtr;	/* If non-NULL, the location where the
-				 * string rep's byte array length should be
-				 * stored. If NULL, no length is stored. */
-{
-    if (!objPtr) {
-	if (lengthPtr != NULL) {
-	    *lengthPtr = 0;
-	}
-	return (char *) NULL;
-    }
-#ifdef _LANG
-    {
-	char *string = LangString((Arg) objPtr);
-	if (lengthPtr != NULL) {
-	    *lengthPtr = string ? strlen(string) : 0;
-	}
-	return string;
-    }
-#else /* _LANG */
-    return Tcl_GetStringFromObj(objPtr, lengthPtr);
-#endif /* _LANG */
-}
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_GetByteArrayFromObj --
- *
- *	Returns the binary representation and length
- *	for a byte array object.
- *
- * Results:
- *	Returns a pointer to the byte representation of objPtr.  If
- *	lengthPtr isn't NULL, the length of the string representation is
- *	stored at *lengthPtr. The byte array referenced by the returned
- *	pointer must not be modified by the caller. Furthermore, the
- *	caller must copy the bytes if they need to retain them since the
- *	object's representation can change as a result of other operations.
- *
- * Side effects:
- *	May call the object's updateStringProc to update the string
- *	representation from the internal representation.
- *
- *----------------------------------------------------------------------
- */
-char *
-tkimg_GetByteArrayFromObj(objPtr, lengthPtr)
-    register Tcl_Obj *objPtr;	/* Object whose string rep byte pointer
-				 * should be returned, or NULL */
-    register int *lengthPtr;	/* If non-NULL, the location where the
-				 * string rep's byte array length should be
-				 * stored. If NULL, no length is stored. */
-{
-#ifdef _LANG
-    char *string = LangString((Arg) objPtr);
-    if (lengthPtr != NULL) {
-	*lengthPtr = string ? strlen(string) : 0;
-    }
-    return string;
-#else /* _LANG */
-
-    if (byteArrayType != (Tcl_ObjType*) NULL) {
-      /* ByteArrays are present, use the core accessor function
-       * to perform the operation.
-       */
-
-      return Tcl_GetByteArrayFromObj (objPtr, lengthPtr);
-    } else {
-      /* This core does not support byte-arrays. This means
-       * that the binary data we want is the string itself.
-       */
-
-      return Tcl_GetStringFromObj(objPtr, lengthPtr);
-    }
-#endif /* _LANG */
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_ListObjGetElements --
- *
- *	Splits an object into its compoments.
- *
- * Results:
- *	If objPtr is a valid list (or can be converted to one),
- *	TCL_OK will be returned. The object will be split in
- *	its components.
- *	Otherwise TCL_ERROR is returned. If interp is not a NULL
- *	pointer, an error message will be left in it as well.
- *
- * Side effects:
- *	May call the object's updateStringProc to update the string
- *	representation from the internal representation.
- *
- *----------------------------------------------------------------------
- */
-
-int
-tkimg_ListObjGetElements(interp, objPtr, objc, objv)
-    Tcl_Interp *interp;
-    Tcl_Obj *objPtr;
-    int *objc;
-    Tcl_Obj ***objv;
-{
-    if (objPtr == NULL) {
-	*objc = 0;
-	return TCL_OK;
-    }
-    return Tcl_ListObjGetElements(interp, objPtr, objc, objv);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * tkimg_Fix*Proc --
- *
- *	Various Compatibility functions
- *
- * Results:
- *	The functions below allow an image type to distinguish
- *	between a call made by Tk 8.3.2 or earlier (4 arguments), versus 8.3
- *	or later (3 arguments) and adaptb at runtime. This adaption is done
- *	by shuffling the incoming arguments around to their correct positions.
- *
- * Side effects:
- *	S.a.
- *
- *----------------------------------------------------------------------
- */
-
-void
-tkimg_FixChanMatchProc(interp, chan, file, format, width, height)
-    Tcl_Interp **interp;
-    Tcl_Channel *chan;
-    CONST char **file;
-    Tcl_Obj **format;
-    int **width;
-    int **height;
-{
-    Tcl_Interp *tmp;
-
-    if (initialized & IMG_PERL) {
-	return;
-    }
-    if (!(initialized & IMG_NEWPHOTO)) {
-      printf ("bail out....\n");
-        /* Old-style call signature */
-        return;
-    }
-
-    tmp = (Tcl_Interp *) *height;
-
-    *height = *width;
-    *width = (int *) *format;
-    *format = (Tcl_Obj *) *file;
-    *file = (CONST char *) *chan;
-    *chan = (Tcl_Channel) *interp;
-    *interp = tmp;
-}
-
-void
-tkimg_FixObjMatchProc(interp, data, format, width, height)
-    Tcl_Interp **interp;
-    Tcl_Obj **data;
-    Tcl_Obj **format;
-    int **width;
-    int **height;
-{
-    Tcl_Interp *tmp;
-
-    if (initialized & IMG_PERL) {
-	return;
-    }
-    if (!(initialized & IMG_NEWPHOTO)) {
-        /* Old-style call signature */
-        return;
-    }
-
-    tmp = (Tcl_Interp *) *height;
-
-    *height = *width;
-    *width = (int *) *format;
-    *format = (Tcl_Obj *) *data;
-    *data = (Tcl_Obj *) *interp;
-    *interp = tmp;
-}
-
-void
-tkimg_FixStringWriteProc(data, interp, dataPtr, format, blockPtr)
-    Tcl_DString *data;
-    Tcl_Interp **interp;
-    Tcl_DString **dataPtr;
-    Tcl_Obj **format;
-    Tk_PhotoImageBlock **blockPtr;
-{
-    if (!*blockPtr) {
-	*blockPtr = (Tk_PhotoImageBlock *) *format;	
-	*format   = (Tcl_Obj *) *dataPtr;
-	*dataPtr  = data;
-	Tcl_DStringInit(data);
-    }
-}
diff --git a/tkimg1.3/base/tools/genStubs.tcl b/tkimg1.3/base/tools/genStubs.tcl
deleted file mode 100644
index 867bcdb..0000000
--- a/tkimg1.3/base/tools/genStubs.tcl
+++ /dev/null
@@ -1,935 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package require Tcl 8
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3 && [llength $args] != 4} {
-	puts stderr "wrong # args: declare $args"
-    }
-    if {[llength $args] == 3} {
-	lassign $args index platformList decl
-	set supressorList {}
-    } else {
-	lassign $args index platformList supressorList decl
-    }
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) [list $decl $supressorList]
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "Only one argument is allowed in varargs form: $decl"
-	}
-	set arg [parseArg [lindex $argList 0]]
-	if {$arg == "" || ([llength $arg] != 2)} {
-	    puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-	    return
-	}
-	set args [list TCL_VARARGS $arg]
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    set decl [lindex $decl 0] ; # ignore supressors here.
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    lassign $decl decl suppressors
-    if {[llength $suppressors] > 0} {
-	set sup [list]
-	foreach s $suppressors {
-	    if {[llength $s] > 1} {
-		# Note that elements in the sublist can be negated!
-		set and [list]
-		foreach i $s {
-		    if {[string match !* $i]} {
-			lappend and "!defined([string range $i 1 end])"
-		    } else {
-			lappend and "defined($i)"
-		    }
-		}
-		lappend sup "[join $and " && "]"
-	    } else {
-		if {[string match !* $s]} {
-		    lappend sup "!defined([string range $s 1 end])"
-		} else {
-		    lappend sup "defined($s)"
-		}
-	    }
-	}
-	append text "#if " [join $sup " || "] "\n"
-	append text "    NULL, /* " $index " */\n"
-	append text "#else  /* " [join $suppressors] " */\n"
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-	append text "#endif /* " [join $suppressors] " */\n"
-    } else {
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    }
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/bmp/ChangeLog b/tkimg1.3/bmp/ChangeLog
deleted file mode 100644
index 102aa28..0000000
--- a/tkimg1.3/bmp/ChangeLog
+++ /dev/null
@@ -1,13 +0,0 @@
-2002-11-20  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Makefile.in:
-	* configure.in: New configuration variable PHIMTYPE, contains name
-	  of image type (in contrast to library name and package
-	  name). Inserted in 'init.c'. The configure variable TK_XINCLUDES
-	  has to placed in variable, to avoid problem on platforms placing
-	  a shell comment into it. More in the Makefile.
-
-2002-11-19  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/bmp: BMP photo image type.
diff --git a/tkimg1.3/bmp/Makefile.in b/tkimg1.3/bmp/Makefile.in
deleted file mode 100644
index 9147c8c..0000000
--- a/tkimg1.3/bmp/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgbmp TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgbmp_SOURCES	=	\
-		bmp.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgbmp_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgbmp_OBJECTS	= $(tkimgbmp_SOURCES:.c=. at OBJEXT@)
-tkimgbmp_LIB_FILE	= @tkimgbmp_LIB_FILE@
-
-## tkimgbmpstub_OBJECTS	= tkimgbmpStubLib.$(OBJEXT)
-## tkimgbmpstub_LIB_FILE= @tkimgbmpstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgbmp_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgbmp_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgbmp.$(OBJEXT): $(srcdir)/generic/tkimgbmp.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgbmp.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgbmp/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgbmpConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgbmp.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgbmp_DECLS = \
-	$(srcdir)/tkimgbmp.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgbmp_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgbmp_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/bmp/README b/tkimg1.3/bmp/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/bmp/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/bmp/aclocal.m4 b/tkimg1.3/bmp/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/bmp/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/bmp/bmp.c b/tkimg1.3/bmp/bmp.c
deleted file mode 100644
index 01dd838..0000000
--- a/tkimg1.3/bmp/bmp.c
+++ /dev/null
@@ -1,601 +0,0 @@
-/*
- * bmp.c --
- *
- *  BMP photo image type, Tcl/Tk package
- *
- * Copyright (c) 1997-2003 Jan Nijtmans    <nijtmans at users.sourceforge.net>
- * Copyright (c) 2002      Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * $Id: bmp.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-/*
- * Now the implementation
- */
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	int *heightPtr, unsigned char **colorMap, int *numBits,
-	int *numCols, int *comp));
-
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	Tk_PhotoHandle imageHandle, int destX, int destY, int width,
-	int height, int srcX, int srcY));
-
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	Tk_PhotoImageBlock *blockPtr));
-
-static void putint _ANSI_ARGS_((tkimg_MFile *handle, int i));
-
-/*
- * Entrypoints for the photo image type.
- */
-
-static int
-ChnMatch (interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL, NULL, NULL, NULL);
-}
-
-static int
-ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data,'B',&handle)) {
-	return 0;
-    }
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL, NULL, NULL, NULL);
-}
-
-static int
-ChnRead (interp, chan, fileName, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, imageHandle, destX, destY,
-	    width, height, srcX, srcY);
-}
-
-static int
-ObjRead (interp, data, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit(data,'B',&handle);
-    return CommonRead (interp, &handle, imageHandle, destX, destY,
-	    width, height, srcX, srcY);
-}
-
-static int
-ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel(interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int
-StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit(dataPtr, &handle);
-    result = CommonWrite (interp, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-/*
- * Helper functions for the entry points. Work horses.
- */
-
-static int
-CommonMatch (handle, widthPtr, heightPtr, colorMap, numBits, numCols, comp)
-    tkimg_MFile *handle;
-    int *widthPtr, *heightPtr;
-    unsigned char **colorMap;
-    int *numBits, *numCols, *comp;
-{
-    unsigned char buf[28];
-    int c,i, compression, nBits, clrUsed, offBits;
-
-    if ((tkimg_Read(handle, (char *) buf, 2) != 2)
-	    || (strncmp("BM", (char *) buf, 2) != 0)
-	    || (tkimg_Read(handle, (char *) buf, 24) != 24)
-	    || buf[13] || buf[14] || buf[15]) {
-	return 0;
-    }
-
-    offBits = (buf[11]<<24) + (buf[10]<<16) + (buf[9]<<8) + buf[8];
-    c = buf[12];
-    if ((c == 40) || (c == 64)) {
-	*widthPtr = (buf[19]<<24) + (buf[18]<<16) + (buf[17]<<8) + buf[16];
-	*heightPtr = (buf[23]<<24) + (buf[22]<<16) + (buf[21]<<8) + buf[20];
-	if (tkimg_Read(handle, (char *) buf, 24) != 24) {
-	    return 0;
-	}
-	nBits = buf[2];
-	compression = buf[4];
-	clrUsed = (buf[21]<<8) + buf[20];
-	offBits -= c+14;
-    } else if (c == 12) {
-	*widthPtr = (buf[17]<<8) + buf[16];
-	*heightPtr = (buf[19]<<8) + buf[18];
-	nBits = buf[22];
-	compression = 0;
-	clrUsed = 0;
-    } else {
-	return 0;
-    }
-    if (*widthPtr <= 0 || *heightPtr <= 0)
-	return 0;
-
-    if (colorMap) {
-	if (c > 36) tkimg_Read(handle, (char *) buf, c - 36);
-	if (!clrUsed && nBits != 24) {
-	    clrUsed = 1 << nBits;
-	}
-	if (nBits<24) {
-	    unsigned char colbuf[4], *ptr;
-	    offBits -= (3+(c!=12)) * clrUsed;
-	    *colorMap = ptr = (unsigned char *) ckalloc(3*clrUsed);
-	    for (i = 0; i < clrUsed; i++) {
-		tkimg_Read(handle, (char *) colbuf, 3+(c!=12));
-		*ptr++ = colbuf[0]; *ptr++ = colbuf[1]; *ptr++ = colbuf[2];
-		/*printf("color %d: %d %d %d\n", i, colbuf[2], colbuf[1], colbuf[0]);*/
-	    }
-	}
-	while (offBits>28) {
-	    offBits -= 28;
-	    tkimg_Read(handle, (char *) buf, 28);
-	}
-	if (offBits) tkimg_Read(handle, (char *) buf, offBits);
-	if (numCols) {
-	    *numCols = clrUsed;
-	}
-    }
-    if (numBits) {
-	*numBits = nBits;
-    }
-    if (comp) {
-	*comp = compression;
-    }
-    return 1;
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead (interp, handle, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    myblock bl;
-    int numBits, bytesPerLine, numCols, comp, x, y;
-    int fileWidth, fileHeight;
-    unsigned char *colorMap = NULL;
-    char buf[10];
-    unsigned char *line = NULL, *expline = NULL;
-
-    CommonMatch (handle, &fileWidth, &fileHeight, &colorMap, &numBits,
-	    &numCols, &comp);
-
-    /* printf("reading %d-bit BMP %dx%d\n", numBits, width, height); */
-    if (comp != 0) {
-	tkimg_ReadBuffer (1);
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    bytesPerLine = ((numBits * fileWidth + 31)/32)*4;
-
-    block.pixelSize = 3;
-    block.pitch = bytesPerLine;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 2;
-    block.offset[1] = 1;
-    block.offset[2] = 0;
-    block.offset[3] = block.offset[0];
-
-    if (comp == 0) {	 	/* No compression */
-	line = (unsigned char *) ckalloc(bytesPerLine);
-	for(y=srcY+height; y<fileHeight; y++) {
-	    tkimg_Read(handle, (char *)line, bytesPerLine);
-	}
-	switch (numBits) {
-	    case 24:
-		block.pixelPtr = line + srcX*3;
-		for( y = height-1; y>=0; y--) {
-		    tkimg_Read(handle, line, bytesPerLine);
-		    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY+y, width, 1);
-		}
-		break;
-	    case 8:
-		block.pixelPtr = expline = (unsigned char *) ckalloc(3*width);
-		for( y = height-1; y>=0; y--) {
-		    tkimg_Read(handle, line, bytesPerLine);
-		    for (x = srcX; x < (srcX+width); x++) {
-			memcpy(expline, colorMap+(3*line[x]),3);
-			expline += 3;
-		    }
-		    tkimg_PhotoPutBlockTk(interp, imageHandle, &block,
-					   destX, destY+y, width, 1);
-		    expline = block.pixelPtr;
-		}
-		break;
-	    case 4:
-		block.pixelPtr = expline = (unsigned char *) ckalloc(3*width);
-		for( y = height-1; y>=0; y--) {
-		    int c;
-		    tkimg_Read(handle, line, bytesPerLine);
-		    for (x = srcX; x < (srcX+width); x++) {
-			if (x&1) {
-			    c = line[x/2] & 0x0f;
-			} else {
-			    c = line[x/2] >> 4;
-			}
-			memcpy(expline, colorMap+(3*c),3);
-			expline += 3;
-		    }
-		    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY+y,
-					   width, 1);
-		    expline = block.pixelPtr;
-		}
-		break;
-	    case 1:
-		block.pixelPtr = expline = (unsigned char *) ckalloc(3*width);
-		for( y = height-1; y>=0; y--) {
-		    int c;
-		    tkimg_Read(handle, line, bytesPerLine);
-		    for (x = srcX; x < (srcX+width); x++) {
-			c = (line[x/8] >> (7-(x%8))) & 1;
-			memcpy(expline, colorMap+(3*c),3);
-			expline += 3;
-		    }
-		    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY+y,
-			    width, 1);
-		    expline = block.pixelPtr;
-		}
-		break;
-	    default:
-		sprintf(buf,"%d", numBits);
-		Tcl_AppendResult(interp, buf,
-			"-bits BMP file not (yet) supported", (char *) NULL);
-		goto error;
-	} 
-    } else { 		/* RLE Compression */
-	int i, c;
-	unsigned char howMuch;
-	unsigned char rleBuf[2];
-	unsigned char val;
-
-	x = 0;
-	y = fileHeight - 1;
-	block.pixelPtr = expline = (unsigned char *) ckalloc (3*fileWidth);
-
-	if (numBits != 4 && numBits != 8) {
-	    sprintf (buf, "%d", numBits);
-	    Tcl_AppendResult (interp, "RLE compression not supported for ",
-                              buf, "-bit pixel values", (char *) NULL);
-	    goto error;
-	}
-
-	while (1) {
-	    if (2 != tkimg_Read (handle, (char *)rleBuf, 2)) {
-		Tcl_AppendResult(interp, "Unexpected EOF", (char *) NULL);
-		goto error;
-	    }
-	    /* printf ("In: (%d %d) --> \n", rleBuf[0], rleBuf[1]); */
-	    if (rleBuf[0] != 0) {
-		howMuch = rleBuf[0];
-		for (i=0; i<howMuch; i++, x++) {
-		    switch (numBits) {
-			case 8:
-			    memcpy (expline, colorMap + 3*rleBuf[1], 3);
-			break;
-			case 4:
-			    if (x&1) {
-				c = rleBuf[1] & 0x0f;
-			    } else {
-				c = rleBuf[1] >> 4;
-			    }
-			    memcpy (expline, colorMap + 3*c, 3);
-			break;
-		    }
-		    expline += 3;
-		}
-	    }
-	    if ((rleBuf[0]==0) && (rleBuf[1]>2)) {
-		/* uncompressed record */
-		howMuch = rleBuf[1];
-		/* printf ("Uncompressed: %d\n", howMuch); fflush (stdout); */
-		for (i=0; i<howMuch; i+=(8/numBits), x++) {
-		    if (1 != tkimg_Read (handle, (char *)&val, 1)) {
-			Tcl_AppendResult(interp, "Unexpected EOF", (char *)NULL);
-			goto error;
-		    }
-		    switch (numBits) {
-			case 8:
-			    memcpy (expline, colorMap + 3*val, 3);
-			break;
-			case 4:
-			    if (x&1) {
-				c = val & 0x0f;
-			    } else {
-				c = val >> 4;
-			    }
-			    memcpy (expline, colorMap + 3*c, 3);
-			break;
-		    }
-		    expline += 3;
-		}
-
-		if ((howMuch % 2) && (numBits==4)) {
-		    howMuch++;
-		}
-
-		if ((howMuch / (8 / numBits)) % 2) {
-		    if (1 != tkimg_Read (handle, (char *)&val, 1)) {
-			Tcl_AppendResult(interp, "Unexpected EOF", (char *)NULL);
-			goto error;
-		    }
-		}
-	    }
-	    if ((rleBuf[0]==0) && (rleBuf[1]==0)) {
-		/* End of line */
-		/* printf ("New line: y=%d x=%d\n", y, x); fflush (stdout); */
-		tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, destY+y,
-			width, 1);
-		y--;
-		x=0;
-		expline = block.pixelPtr;
-	    }
-	    if ((rleBuf[0]==0) && (rleBuf[1]==1)) {
-		/* End of bitmap */
-		break;
-	    }
-	    if ((rleBuf[0]==0) && (rleBuf[1]==2)) {
-	        /* Deltarecord */
-		/* printf ("Deltarecord\n"); fflush (stdout); */
-		x += rleBuf[2];
-		y += rleBuf[3];
-	    }
-	}
-    }
-    tkimg_ReadBuffer (0);
-
-    if (colorMap) {
-	ckfree((char *) colorMap);
-    }
-    if (line) {
-	ckfree((char *) line);
-    }
-    if (expline) {
-	ckfree((char *) block.pixelPtr);
-    }
-    return TCL_OK ;
-
-error:
-    tkimg_ReadBuffer (0);
-    if (colorMap) {
-	ckfree((char *) colorMap);
-    }
-    if (line) {
-	ckfree((char *) line);
-    }
-    if (expline) {
-	ckfree((char *) block.pixelPtr);
-    }
-    return TCL_ERROR;
-}
-
-static int
-CommonWrite (interp, handle, blockPtr)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int bperline, nbytes, ncolors, i, x, y, greenOffset, blueOffset, alphaOffset;
-    unsigned char *imagePtr, *pixelPtr;
-    unsigned char buf[4];
-    int colors[256];
-
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[2]) {
-	alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-    ncolors = 0;
-    if (greenOffset || blueOffset) {
-	for (y = 0; ncolors <= 256 && y < blockPtr->height; y++) {
-	    pixelPtr = blockPtr->pixelPtr + y*blockPtr->pitch + blockPtr->offset[0];
-	    for (x=0; ncolors <= 256 && x<blockPtr->width; x++) {
-		int pixel;
-		if (alphaOffset && (pixelPtr[alphaOffset] == 0))
-		    pixel = 0xd9d9d9;
-		else
-		    pixel = (pixelPtr[0]<<16) | (pixelPtr[greenOffset]<<8) | pixelPtr[blueOffset];
-		for (i = 0; i < ncolors && pixel != colors[i]; i++);
-		if (i == ncolors) {
-		    if (ncolors < 256) {
-			colors[ncolors] = pixel;
-		    }
-		    ncolors++;
-		}
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	}
-	if (ncolors <= 256 && (blockPtr->width * blockPtr->height >= 512)) {
-            while (ncolors < 256) {
-		colors[ncolors++] = 0;
-	    }
-	    nbytes = 1;
-	} else {
-	    nbytes = 3;
-	    ncolors = 0;
-	}
-    } else {
-        nbytes = 1;
-    }
-
-    bperline = ((blockPtr->width  * nbytes + 3) / 4) * 4;
-
-    tkimg_Write(handle,"BM", 2);
-    putint(handle, 54 + (ncolors*4) + bperline * blockPtr->height);
-    putint(handle, 0);
-    putint(handle, 54 + (ncolors*4));
-    putint(handle, 40);
-    putint(handle, blockPtr->width);
-    putint(handle, blockPtr->height);
-    putint(handle, 1 + (nbytes<<19));
-    putint(handle, 0);
-    putint(handle, bperline * blockPtr->height);
-    putint(handle, 75*39);
-    putint(handle, 75*39);
-    putint(handle, ncolors);
-    putint(handle, ncolors);
-
-    for (i = 0; i < ncolors ; i++) {
-	putint(handle, colors[i]);
-    }
-
-    bperline -= blockPtr->width * nbytes;
-
-    imagePtr =  blockPtr->pixelPtr + blockPtr->offset[0]
-	    + blockPtr->height * blockPtr->pitch;
-    for (y = 0; y < blockPtr->height; y++) {
-	pixelPtr = imagePtr -= blockPtr->pitch;
-	for (x=0; x<blockPtr->width; x++) {
-	    if (ncolors) {
-		int pixel;
-		if (alphaOffset && (pixelPtr[alphaOffset] == 0))
-		    pixel = 0xd9d9d9;
-		else
-		    pixel = (pixelPtr[0]<<16)|(pixelPtr[greenOffset]<<8)|pixelPtr[blueOffset];
-		for (i = 0; i < ncolors && pixel != colors[i]; i += 1);
-		buf[0] = i;
-	    } else if (alphaOffset && (pixelPtr[alphaOffset] == 0)) {
-		buf[0] = buf[1] = buf[2] = 0xd9;
-	    } else {
-		buf[0] = pixelPtr[blueOffset];
-		buf[1] = pixelPtr[greenOffset];
-		buf[2] = pixelPtr[0];
-	    }
-	    tkimg_Write(handle, (char *) buf, nbytes);
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (bperline) {
-	    tkimg_Write(handle, "\0\0\0", bperline);
-	}
-    }
-    return(TCL_OK);
-}
-
-static void
-putint(handle, i)
-    tkimg_MFile *handle;
-    int i;
-{
-    unsigned char buf[4];
-    buf[0] = i;
-    buf[1] = i>>8;
-    buf[2] = i>>16;
-    buf[3] = i>>24;
-    tkimg_Write(handle, (char *) buf, 4);
-}
diff --git a/tkimg1.3/bmp/bmp.txt b/tkimg1.3/bmp/bmp.txt
deleted file mode 100644
index 99c091a..0000000
--- a/tkimg1.3/bmp/bmp.txt
+++ /dev/null
@@ -1,1034 +0,0 @@
-Graphics File Formats
-
-This topic describes the graphics-file formats used by the Microsoft Windows
-operating system. Graphics files include bitmap files, icon-resource files,
-and cursor-resource files.
-
-Bitmap-File Formats
-
-Windows bitmap files are stored in a device-independent bitmap (DIB) format
-that allows Windows to display the bitmap on any type of display device. The
-term "device independent" means that the bitmap specifies pixel color in a
-form independent of the method used by a display to represent color. The
-default filename extension of a Windows DIB file is .BMP.
-
-Bitmap-File Structures
-
-Each bitmap file contains a bitmap-file header, a bitmap-information header,
-a color table, and an array of bytes that defines the bitmap bits. The file
-has the following form:
-
-BITMAPFILEHEADER bmfh;
-BITMAPINFOHEADER bmih;
-RGBQUAD          aColors[];
-BYTE             aBitmapBits[];
-
-The bitmap-file header contains information about the type, size, and layout
-of a device-independent bitmap file. The header is defined as a
-BITMAPFILEHEADER structure.
-
-The bitmap-information header, defined as a BITMAPINFOHEADER structure,
-specifies the dimensions, compression type, and color format for the bitmap.
-
-The color table, defined as an array of RGBQUAD structures, contains as many
-elements as there are colors in the bitmap. The color table is not present
-for bitmaps with 24 color bits because each pixel is represented by 24-bit
-red-green-blue (RGB) values in the actual bitmap data area. The colors in the
-table should appear in order of importance. This helps a display driver
-render a bitmap on a device that cannot display as many colors as there are
-in the bitmap. If the DIB is in Windows version 3.0 or later format, the
-driver can use the biClrImportant member of the BITMAPINFOHEADER structure to
-determine which colors are important.
-
-The BITMAPINFO structure can be used to represent a combined
-bitmap-information header and color table.  The bitmap bits, immediately
-following the color table, consist of an array of BYTE values representing
-consecutive rows, or "scan lines," of the bitmap. Each scan line consists of
-consecutive bytes representing the pixels in the scan line, in left-to-right
-order. The number of bytes representing a scan line depends on the color
-format and the width, in pixels, of the bitmap. If necessary, a scan line
-must be zero-padded to end on a 32-bit boundary. However, segment boundaries
-can appear anywhere in the bitmap. The scan lines in the bitmap are stored
-from bottom up. This means that the first byte in the array represents the
-pixels in the lower-left corner of the bitmap and the last byte represents
-the pixels in the upper-right corner.
-
-The biBitCount member of the BITMAPINFOHEADER structure determines the number
-of bits that define each pixel and the maximum number of colors in the
-bitmap. These members can have any of the following values:
-
-Value   Meaning
-
-1       Bitmap is monochrome and the color table contains two entries. Each
-bit in the bitmap array represents a pixel. If the bit is clear, the pixel is
-displayed with the color of the first entry in the color table. If the bit is
-set, the pixel has the color of the second entry in the table.
-
-4       Bitmap has a maximum of 16 colors. Each pixel in the bitmap is
-represented by a 4-bit index into the color table. For example, if the first
-byte in the bitmap is 0x1F, the byte represents two pixels. The first pixel
-contains the color in the second table entry, and the second pixel contains
-the color in the sixteenth table entry.
-
-8       Bitmap has a maximum of 256 colors. Each pixel in the bitmap is
-represented by a 1-byte index into the color table. For example, if the first
-byte in the bitmap is 0x1F, the first pixel has the color of the
-thirty-second table entry.
-
-24      Bitmap has a maximum of 2^24 colors. The bmiColors (or bmciColors)
-member is NULL, and each 3-byte sequence in the bitmap array represents the
-relative intensities of red, green, and blue, respectively, for a pixel.
-
-The biClrUsed member of the BITMAPINFOHEADER structure specifies the number
-of color indexes in the color table actually used by the bitmap. If the
-biClrUsed member is set to zero, the bitmap uses the maximum number of colors
-corresponding to the value of the biBitCount member.  An alternative form of
-bitmap file uses the BITMAPCOREINFO, BITMAPCOREHEADER, and RGBTRIPLE
-structures.
-
-Bitmap Compression
-
-Windows versions 3.0 and later support run-length encoded (RLE) formats for
-compressing bitmaps that use 4 bits per pixel and 8 bits per pixel.
-Compression reduces the disk and memory storage required for a bitmap.
-
-Compression of 8-Bits-per-Pixel Bitmaps
-
-When the biCompression member of the BITMAPINFOHEADER structure is set to
-BI_RLE8, the DIB is compressed using a run-length encoded format for a
-256-color bitmap. This format uses two modes: encoded mode and absolute mode.
-Both modes can occur anywhere throughout a single bitmap.
-
-Encoded Mode
-
-A unit of information in encoded mode consists of two bytes. The first byte
-specifies the number of consecutive pixels to be drawn using the color index
-contained in the second byte.  The first byte of the pair can be set to zero
-to indicate an escape that denotes the end of a line, the end of the bitmap,
-or a delta. The interpretation of the escape depends on the value of the
-second byte of the pair, which must be in the range 0x00 through 0x02.
-Following are the meanings of the escape values that can be used in the
-second byte:
-
-Second byte     Meaning
-
-0       End of line. 
-1       End of bitmap. 
-2       Delta. The two bytes following the escape contain unsigned values
-indicating the horizontal and vertical offsets of the next pixel from the
-current position.
-
-Absolute Mode
-
-Absolute mode is signaled by the first byte in the pair being set to zero and
-the second byte to a value between 0x03 and 0xFF. The second byte represents
-the number of bytes that follow, each of which contains the color index of a
-single pixel. Each run must be aligned on a word boundary.  Following is an
-example of an 8-bit RLE bitmap (the two-digit hexadecimal values in the
-second column represent a color index for a single pixel):
-
-Compressed data         Expanded data
-
-03 04                   04 04 04 
-05 06                   06 06 06 06 06 
-00 03 45 56 67 00       45 56 67 
-02 78                   78 78 
-00 02 05 01             Move 5 right and 1 down 
-02 78                   78 78 
-00 00                   End of line 
-09 1E                   1E 1E 1E 1E 1E 1E 1E 1E 1E 
-00 01                   End of RLE bitmap 
-
-Compression of 4-Bits-per-Pixel Bitmaps
-
-When the biCompression member of the BITMAPINFOHEADER structure is set to
-BI_RLE4, the DIB is compressed using a run-length encoded format for a
-16-color bitmap. This format uses two modes: encoded mode and absolute mode.
-
-Encoded Mode
-
-A unit of information in encoded mode consists of two bytes. The first byte
-of the pair contains the number of pixels to be drawn using the color indexes
-in the second byte.
-
-The second byte contains two color indexes, one in its high-order nibble
-(that is, its low-order 4 bits) and one in its low-order nibble.
-
-The first pixel is drawn using the color specified by the high-order nibble,
-the second is drawn using the color in the low-order nibble, the third is
-drawn with the color in the high-order nibble, and so on, until all the
-pixels specified by the first byte have been drawn.
-
-The first byte of the pair can be set to zero to indicate an escape that
-denotes the end of a line, the end of the bitmap, or a delta. The
-interpretation of the escape depends on the value of the second byte of the
-pair. In encoded mode, the second byte has a value in the range 0x00 through
-0x02. The meaning of these values is the same as for a DIB with 8 bits per
-pixel.
-
-Absolute Mode
-
-In absolute mode, the first byte contains zero, the second byte contains the
-number of color indexes that follow, and subsequent bytes contain color
-indexes in their high- and low-order nibbles, one color index for each pixel.
-Each run must be aligned on a word boundary.
-
-Following is an example of a 4-bit RLE bitmap (the one-digit hexadecimal
-values in the second column represent a color index for a single pixel):
-
-Compressed data         Expanded data
-
-03 04                   0 4 0
-05 06                   0 6 0 6 0 
-00 06 45 56 67 00       4 5 5 6 6 7 
-04 78                   7 8 7 8 
-00 02 05 01             Move 5 right and 1 down 
-04 78                   7 8 7 8 
-00 00                   End of line 
-09 1E                   1 E 1 E 1 E 1 E 1 
-00 01                   End of RLE bitmap 
-
-Bitmap Example
-
-The following example is a text dump of a 16-color bitmap (4 bits per pixel):
-
-Win3DIBFile
-              BitmapFileHeader
-                  Type       19778
-                  Size       3118
-                  Reserved1  0
-                  Reserved2  0
-                  OffsetBits 118
-              BitmapInfoHeader
-                  Size            40
-                  Width           80
-                  Height          75
-                  Planes          1
-                  BitCount        4
-                  Compression     0
-                  SizeImage       3000
-
-                  XPelsPerMeter   0
-                  YPelsPerMeter   0
-                  ColorsUsed      16
-                  ColorsImportant 16
-              Win3ColorTable
-                  Blue  Green  Red  Unused
-[00000000]        84    252    84   0
-[00000001]        252   252    84   0
-[00000002]        84    84     252  0
-[00000003]        252   84     252  0
-[00000004]        84    252    252  0
-[00000005]        252   252    252  0
-[00000006]        0     0      0    0
-[00000007]        168   0      0    0
-[00000008]        0     168    0    0
-[00000009]        168   168    0    0
-[0000000A]        0     0      168  0
-[0000000B]        168   0      168  0
-[0000000C]        0     168    168  0
-[0000000D]        168   168    168  0
-[0000000E]        84    84     84   0
-[0000000F]        252   84     84   0
-              Image
-    .
-    .                                           Bitmap data
-    .
-
-Icon-Resource File Format
-
-An icon-resource file contains image data for icons used by Windows
-applications. The file consists of an icon directory identifying the number
-and types of icon images in the file, plus one or more icon images. The
-default filename extension for an icon-resource file is .ICO.
-
-Icon Directory
-
-Each icon-resource file starts with an icon directory. The icon directory,
-defined as an ICONDIR structure, specifies the number of icons in the
-resource and the dimensions and color format of each icon image. The ICONDIR
-structure has the following form:
-
-
-
-typedef struct ICONDIR {
-    WORD          idReserved;
-    WORD          idType;
-    WORD          idCount;
-    ICONDIRENTRY  idEntries[1];
-} ICONHEADER;
-
-Following are the members in the ICONDIR structure:
-
-idReserved      Reserved; must be zero. 
-idType          Specifies the resource type. This member is set to 1. 
-idCount         Specifies the number of entries in the directory. 
-idEntries       Specifies an array of ICONDIRENTRY structures containing
-information about individual icons. The idCount member specifies the number
-of structures in the array.
-
-The ICONDIRENTRY structure specifies the dimensions and color format for an
-icon. The structure has the following form:
-
-
-
-struct IconDirectoryEntry {
-    BYTE  bWidth;
-    BYTE  bHeight;
-    BYTE  bColorCount;
-    BYTE  bReserved;
-    WORD  wPlanes;
-    WORD  wBitCount;
-    DWORD dwBytesInRes;
-    DWORD dwImageOffset;
-};
-
-Following are the members in the ICONDIRENTRY structure: 
-
-bWidth          Specifies the width of the icon, in pixels. Acceptable values
-are 16, 32, and 64.
-
-bHeight         Specifies the height of the icon, in pixels. Acceptable
-values are 16, 32, and 64.
-
-bColorCount     Specifies the number of colors in the icon. Acceptable values
-are 2, 8, and 16.
-
-bReserved       Reserved; must be zero. 
-wPlanes         Specifies the number of color planes in the icon bitmap. 
-wBitCount       Specifies the number of bits in the icon bitmap. 
-dwBytesInRes    Specifies the size of the resource, in bytes. 
-dwImageOffset   Specifies the offset, in bytes, from the beginning of the
-file to the icon image.
-
-Icon Image
-
-Each icon-resource file contains one icon image for each image identified in
-the icon directory. An icon image consists of an icon-image header, a color
-table, an XOR mask, and an AND mask. The icon image has the following form:
-
-
-
-BITMAPINFOHEADER    icHeader;
-RGBQUAD             icColors[];
-BYTE                icXOR[];
-BYTE                icAND[];
-
-The icon-image header, defined as a BITMAPINFOHEADER structure, specifies the
-dimensions and color format of the icon bitmap. Only the biSize through
-biBitCount members and the biSizeImage member are used. All other members
-(such as biCompression and biClrImportant) must be set to zero.
-
-The color table, defined as an array of RGBQUAD structures, specifies the
-colors used in the XOR mask. As with the color table in a bitmap file, the
-biBitCount member in the icon-image header determines the number of elements
-in the array. For more information about the color table, see Section 1.1,
-"Bitmap-File Formats."
-
-The XOR mask, immediately following the color table, is an array of BYTE
-values representing consecutive rows of a bitmap. The bitmap defines the
-basic shape and color of the icon image. As with the bitmap bits in a bitmap
-file, the bitmap data in an icon-resource file is organized in scan lines,
-with each byte representing one or more pixels, as defined by the color
-format. For more information about these bitmap bits, see Section 1.1,
-"Bitmap-File Formats."
-
-The AND mask, immediately following the XOR mask, is an array of BYTE values,
-representing a monochrome bitmap with the same width and height as the XOR
-mask. The array is organized in scan lines, with each byte representing 8
-pixels.
-
-When Windows draws an icon, it uses the AND and XOR masks to combine the icon
-image with the pixels already on the display surface. Windows first applies
-the AND mask by using a bitwise AND operation; this preserves or removes
-existing pixel color.  Windows then applies the XOR mask by using a bitwise
-XOR operation. This sets the final color for each pixel.
-
-The following illustration shows the XOR and AND masks that create a
-monochrome icon (measuring 8 pixels by 8 pixels) in the form of an uppercase
-K:
-
-Windows Icon Selection
-
-Windows detects the resolution of the current display and matches it against
-the width and height specified for each version of the icon image. If Windows
-determines that there is an exact match between an icon image and the current
-device, it uses the matching image. Otherwise, it selects the closest match
-and stretches the image to the proper size.
-
-If an icon-resource file contains more than one image for a particular
-resolution, Windows uses the icon image that most closely matches the color
-capabilities of the current display. If no image matches the device
-capabilities exactly, Windows selects the image that has the greatest number
-of colors without exceeding the number of display colors. If all images
-exceed the color capabilities of the current display, Windows uses the icon
-image with the least number of colors.
-
-
-
-Cursor-Resource File Format
-
-A cursor-resource file contains image data for cursors used by Windows
-applications. The file consists of a cursor directory identifying the number
-and types of cursor images in the file, plus one or more cursor images. The
-default filename extension for a cursor-resource file is .CUR.
-
-Cursor Directory
-
-Each cursor-resource file starts with a cursor directory. The cursor
-directory, defined as a CURSORDIR structure, specifies the number of cursors
-in the file and the dimensions and color format of each cursor image. The
-CURSORDIR structure has the following form:
-
-
-typedef struct _CURSORDIR {
-    WORD           cdReserved;
-    WORD           cdType;
-    WORD           cdCount;
-    CURSORDIRENTRY cdEntries[];
-} CURSORDIR;
-
-Following are the members in the CURSORDIR structure: 
-
-cdReserved      Reserved; must be zero. 
-cdType          Specifies the resource type. This member must be set to 2. 
-cdCount         Specifies the number of cursors in the file. 
-cdEntries       Specifies an array of CURSORDIRENTRY structures containing
-information about individual cursors. The cdCount member specifies the number
-of structures in the array.
-
-A CURSORDIRENTRY structure specifies the dimensions and color format of a
-cursor image. The structure has the following form:
-
-
-
-typedef struct _CURSORDIRENTRY {
-    BYTE  bWidth;
-    BYTE  bHeight;
-    BYTE  bColorCount;
-    BYTE  bReserved;
-    WORD  wXHotspot;
-    WORD  wYHotspot;
-    DWORD lBytesInRes;
-    DWORD dwImageOffset;
-} CURSORDIRENTRY;
-
-Following are the members in the CURSORDIRENTRY structure: 
-
-bWidth          Specifies the width of the cursor, in pixels. 
-bHeight         Specifies the height of the cursor, in pixels. 
-bColorCount     Reserved; must be zero. 
-bReserved       Reserved; must be zero.
-wXHotspot       Specifies the x-coordinate, in pixels, of the hot spot. 
-wYHotspot       Specifies the y-coordinate, in pixels, of the hot spot. 
-lBytesInRes     Specifies the size of the resource, in bytes. 
-dwImageOffset   Specifies the offset, in bytes, from the start of the file to
-the cursor image.
-
-Cursor Image
-
-Each cursor-resource file contains one cursor image for each image identified
-in the cursor directory. A cursor image consists of a cursor-image header, a
-color table, an XOR mask, and an AND mask. The cursor image has the following
-form:
-
-
-
-BITMAPINFOHEADER    crHeader;
-RGBQUAD             crColors[];
-BYTE                crXOR[];
-BYTE                crAND[];
-
-The cursor hot spot is a single pixel in the cursor bitmap that Windows uses
-to track the cursor. The crXHotspot and crYHotspot members specify the x- and
-y-coordinates of the cursor hot spot. These coordinates are 16-bit integers.
-
-The cursor-image header, defined as a BITMAPINFOHEADER structure, specifies
-the dimensions and color format of the cursor bitmap. Only the biSize through
-biBitCount members and the biSizeImage member are used. The biHeight member
-specifies the combined height of the XOR and AND masks for the cursor. This
-value is twice the height of the XOR mask. The biPlanes and biBitCount
-members must be 1. All other members (such as biCompression and
-biClrImportant) must be set to zero.
-
-The color table, defined as an array of RGBQUAD structures, specifies the
-colors used in the XOR mask. For a cursor image, the table contains exactly
-two structures, since the biBitCount member in the cursor-image header is
-always 1.
-
-The XOR mask, immediately following the color table, is an array of BYTE
-values representing consecutive rows of a bitmap. The bitmap defines the
-basic shape and color of the cursor image. As with the bitmap bits in a
-bitmap file, the bitmap data in a cursor-resource file is organized in scan
-lines, with each byte representing one or more pixels, as defined by the
-color format. For more information about these bitmap bits, see Section 1.1,
-"Bitmap-File Formats."
-
-The AND mask, immediately following the XOR mask, is an array of BYTE values
-representing a monochrome bitmap with the same width and height as the XOR
-mask. The array is organized in scan lines, with each byte representing 8
-pixels.
-
-When Windows draws a cursor, it uses the AND and XOR masks to combine the
-cursor image with the pixels already on the display surface. Windows first
-applies the AND mask by using a bitwise AND operation; this preserves or
-removes existing pixel color.  Window then applies the XOR mask by using a
-bitwise XOR operation. This sets the final color for each pixel.
-
-The following illustration shows the XOR and the AND masks that create a
-cursor (measuring 8 pixels by 8 pixels) in the form of an arrow:
-
-Following are the bit-mask values necessary to produce black, white,
-inverted, and transparent results:
-
-Pixel result    AND maskXOR mask
-
-Black           0               0 
-White           0               1 
-Transparent     1               0 
-Inverted1               1 
-
-Windows Cursor Selection
-
-If a cursor-resource file contains more than one cursor image, Windows
-determines the best match for a particular display by examining the width and
-height of the cursor images.
-
-
-==============================================================================
-
-
-BITMAPFILEHEADER (3.0)
-
-
-
-typedef struct tagBITMAPFILEHEADER {    /* bmfh */
-    UINT    bfType;
-    DWORD   bfSize;
-    UINT    bfReserved1;
-    UINT    bfReserved2;
-    DWORD   bfOffBits;
-} BITMAPFILEHEADER;
-
-The BITMAPFILEHEADER structure contains information about the type, size, and
-layout of a device-independent bitmap (DIB) file.
-
-Member          Description
-
-bfType          Specifies the type of file. This member must be BM. 
-bfSize          Specifies the size of the file, in bytes. 
-bfReserved1     Reserved; must be set to zero. 
-bfReserved2     Reserved; must be set to zero.
-bfOffBits       Specifies the byte offset from the BITMAPFILEHEADER structure
-to the actual bitmap data in the file.
-
-Comments
-
-A BITMAPINFO or BITMAPCOREINFO structure immediately follows the
-BITMAPFILEHEADER structure in the DIB file.
-
-See Also
-
-BITMAPCOREINFO, BITMAPINFO 
-
-
-==============================================================================
-BITMAPINFO (3.0)
-
-
-
-typedef struct tagBITMAPINFO {  /* bmi */
-    BITMAPINFOHEADER    bmiHeader;
-    RGBQUAD             bmiColors[1];
-} BITMAPINFO;
-
-The BITMAPINFO structure fully defines the dimensions and color information
-for a Windows 3.0 or later device-independent bitmap (DIB).
-
-Member          Description
-
-bmiHeader       Specifies a BITMAPINFOHEADER structure that contains
-information about the dimensions and color format of a DIB.
-
-bmiColors       Specifies an array of RGBQUAD structures that define the
-colors in the bitmap.
-
-Comments
-
-A Windows 3.0 or later DIB consists of two distinct parts: a BITMAPINFO
-structure, which describes the dimensions and colors of the bitmap, and an
-array of bytes defining the pixels of the bitmap. The bits in the array are
-packed together, but each scan line must be zero-padded to end on a LONG
-boundary. Segment boundaries, however, can appear anywhere in the bitmap. The
-origin of the bitmap is the lower-left corner.
-
-The biBitCount member of the BITMAPINFOHEADER structure determines the number
-of bits which define each pixel and the maximum number of colors in the
-bitmap. This member may be set to any of the following values:
-
-Value   Meaning
-
-1       The bitmap is monochrome, and the bmciColors member must contain two
-entries. Each bit in the bitmap array represents a pixel. If the bit is
-clear, the pixel is displayed with the color of the first entry in the
-bmciColors table. If the bit is set, the pixel has the color of the second
-entry in the table.
-
-4       The bitmap has a maximum of 16 colors, and the bmciColors member
-contains 16 entries. Each pixel in the bitmap is represented by a four-bit
-index into the color table.
-
-For example, if the first byte in the bitmap is 0x1F, the byte represents two
-pixels. The first pixel contains the color in the second table entry, and the
-second pixel contains the color in the sixteenth table entry.
-
-8       The bitmap has a maximum of 256 colors, and the bmciColors member
-contains 256 entries. In this case, each byte in the array represents a
-single pixel.
-
-24      The bitmap has a maximum of 2^24 colors. The bmciColors member is
-NULL, and each 3-byte sequence in the bitmap array represents the relative
-intensities of red, green, and blue, respectively, of a pixel.
-
-The biClrUsed member of the BITMAPINFOHEADER structure specifies the number
-of color indexes in the color table actually used by the bitmap. If the
-biClrUsed member is set to zero, the bitmap uses the maximum number of colors
-corresponding to the value of the biBitCount member.
-
-The colors in the bmiColors table should appear in order of importance.
-Alternatively, for functions that use DIBs, the bmiColors member can be an
-array of 16-bit unsigned integers that specify an index into the currently
-realized logical palette instead of explicit RGB values. In this case, an
-application using the bitmap must call DIB functions with the wUsage
-parameter set to DIB_PAL_COLORS.
-
-Note:   The bmiColors member should not contain palette indexes if the bitmap
-is to be stored in a file or transferred to another application. Unless the
-application uses the bitmap exclusively and under its complete control, the
-bitmap color table should contain explicit RGB values.
-
-See Also
-
-BITMAPINFOHEADER, RGBQUAD 
-
-==============================================================================
-BITMAPINFOHEADER (3.0)
-
-
-
-typedef struct tagBITMAPINFOHEADER {    /* bmih */
-    DWORD   biSize;
-    LONG    biWidth;
-    LONG    biHeight;
-    WORD    biPlanes;
-    WORD    biBitCount;
-    DWORD   biCompression;
-    DWORD   biSizeImage;
-    LONG    biXPelsPerMeter;
-    LONG    biYPelsPerMeter;
-    DWORD   biClrUsed;
-    DWORD   biClrImportant;
-} BITMAPINFOHEADER;
-
-The BITMAPINFOHEADER structure contains information about the dimensions and
-color format of a Windows 3.0 or later device-independent bitmap (DIB).
-
-Member          Description
-
-biSize          Specifies the number of bytes required by the
-BITMAPINFOHEADER structure.
-
-biWidth         Specifies the width of the bitmap, in pixels. 
-biHeightSpecifies the height of the bitmap, in pixels. 
-
-biPlanesSpecifies the number of planes for the target device. This
-member must be set to 1.
-
-biBitCount      Specifies the number of bits per pixel. This value must be 1,
-4, 8, or 24.
-
-biCompression   Specifies the type of compression for a compressed bitmap. It
-can be one of the following values:
-
-Value           Meaning
-
-BI_RGB          Specifies that the bitmap is not compressed. 
-
-BI_RLE8         Specifies a run-length encoded format for bitmaps with 8 bits
-per pixel. The compression format is a 2-byte format consisting of a count
-byte followed by a byte containing a color index.  For more information, see
-the following Comments section.
-
-BI_RLE4         Specifies a run-length encoded format for bitmaps with 4 bits
-per pixel. The compression format is a 2-byte format consisting of a count
-byte followed by two word-length color indexes.  For more information, see
-the following Comments section.
-
-biSizeImage     Specifies the size, in bytes, of the image. It is valid to
-set this member to zero if the bitmap is in the BI_RGB format.
-
-biXPelsPerMeter Specifies the horizontal resolution, in pixels per meter, of
-the target device for the bitmap. An application can use this value to select
-a bitmap from a resource group that best matches the characteristics of the
-current device.
-
-biYPelsPerMeter Specifies the vertical resolution, in pixels per meter, of
-the target device for the bitmap.
-
-biClrUsed       Specifies the number of color indexes in the color table
-actually used by the bitmap. If this value is zero, the bitmap uses the
-maximum number of colors corresponding to the value of the biBitCount member.
-For more information on the maximum sizes of the color table, see the
-description of the BITMAPINFO structure earlier in this topic.
-
-If the biClrUsed member is nonzero, it specifies the actual number of colors
-that the graphics engine or device driver will access if the biBitCount
-member is less than 24. If biBitCount is set to 24, biClrUsed specifies the
-size of the reference color table used to optimize performance of Windows
-color palettes.  If the bitmap is a packed bitmap (that is, a bitmap in which
-the bitmap array immediately follows the BITMAPINFO header and which is
-referenced by a single pointer), the biClrUsed member must be set to zero or
-to the actual size of the color table.
-
-biClrImportant  Specifies the number of color indexes that are considered
-important for displaying the bitmap. If this value is zero, all colors are
-important.
-
-Comments
-
-The BITMAPINFO structure combines the BITMAPINFOHEADER structure and a color
-table to provide a complete definition of the dimensions and colors of a
-Windows 3.0 or later DIB. For more information about specifying a Windows 3.0
-DIB, see the description of the BITMAPINFO structure.
-
-An application should use the information stored in the biSize member to
-locate the color table in a BITMAPINFO structure as follows:
-
-pColor = ((LPSTR) pBitmapInfo + (WORD) (pBitmapInfo->bmiHeader.biSize))
-
-Windows supports formats for compressing bitmaps that define their colors
-with 8 bits per pixel and with 4 bits per pixel. Compression reduces the disk
-and memory storage required for the bitmap. The following paragraphs describe
-these formats.
-
-BI_RLE8
-
-When the biCompression member is set to BI_RLE8, the bitmap is compressed
-using a run-length encoding format for an 8-bit bitmap. This format may be
-compressed in either of two modes: encoded and absolute. Both modes can occur
-anywhere throughout a single bitmap.
-
-Encoded mode consists of two bytes: the first byte specifies the number of
-consecutive pixels to be drawn using the color index contained in the second
-byte. In addition, the first byte of the pair can be set to zero to indicate
-an escape that denotes an end of line, end of bitmap, or a delta. The
-interpretation of the escape depends on the value of the second byte of the
-pair. The following list shows the meaning of the second byte:
-
-Value   Meaning
-
-0       End of line. 
-1       End of bitmap. 
-2       Delta. The two bytes following the escape contain unsigned values
-indicating the horizontal and vertical offset of the next pixel from the
-current position.
-
-Absolute mode is signaled by the first byte set to zero and the second byte
-set to a value between 0x03 and 0xFF. In absolute mode, the second byte
-represents the number of bytes that follow, each of which contains the color
-index of a single pixel. When the second byte is set to 2 or less, the escape
-has the same meaning as in encoded mode. In absolute mode, each run must be
-aligned on a word boundary.  The following example shows the hexadecimal
-values of an 8-bit compressed bitmap:
-
-
-
-03 04 05 06 00 03 45 56 67 00 02 78 00 02 05 01
-02 78 00 00 09 1E 00 01
-
-This bitmap would expand as follows (two-digit values represent a color index
-for a single pixel):
-
-
-
-04 04 04
-06 06 06 06 06
-45 56 67
-78 78
-move current position 5 right and 1 down
-78 78
-end of line
-1E 1E 1E 1E 1E 1E 1E 1E 1E
-end of RLE bitmap
-
-BI_RLE4
-
-When the biCompression member is set to BI_RLE4, the bitmap is compressed
-using a run-length encoding (RLE) format for a 4-bit bitmap, which also uses
-encoded and absolute modes. In encoded mode, the first byte of the pair
-contains the number of pixels to be drawn using the color indexes in the
-second byte. The second byte contains two color indexes, one in its
-high-order nibble (that is, its low-order four bits) and one in its low-order
-nibble. The first of the pixels is drawn using the color specified by the
-high-order nibble, the second is drawn using the color in the low-order
-nibble, the third is drawn with the color in the high-order nibble, and so
-on, until all the pixels specified by the first byte have been drawn.  In
-absolute mode, the first byte contains zero, the second byte contains the
-number of color indexes that follow, and subsequent bytes contain color
-indexes in their high- and low-order nibbles, one color index for each pixel.
-In absolute mode, each run must be aligned on a word boundary. The
-end-of-line, end-of-bitmap, and delta escapes also apply to BI_RLE4.
-
-The following example shows the hexadecimal values of a 4-bit compressed
-bitmap:
-
-
-
-03 04 05 06 00 06 45 56 67 00 04 78 00 02 05 01
-04 78 00 00 09 1E 00 01
-
-This bitmap would expand as follows (single-digit values represent a color
-index for a single pixel):
-
-
-
-0 4 0
-0 6 0 6 0
-4 5 5 6 6 7
-7 8 7 8
-move current position 5 right and 1 down
-7 8 7 8
-end of line
-1 E 1 E 1 E 1 E 1
-end of RLE bitmap
-
-See Also
-
-BITMAPINFO 
-
-==============================================================================
-RGBQUAD (3.0)
-
-
-
-typedef struct tagRGBQUAD {     /* rgbq */
-    BYTE    rgbBlue;
-    BYTE    rgbGreen;
-    BYTE    rgbRed;
-    BYTE    rgbReserved;
-} RGBQUAD;
-
-The RGBQUAD structure describes a color consisting of relative intensities of
-red, green, and blue. The bmiColors member of the BITMAPINFO structure
-consists of an array of RGBQUAD structures.
-
-Member          Description
-
-rgbBlue         Specifies the intensity of blue in the color. 
-rgbGreenSpecifies the intensity of green in the color. 
-rgbRed          Specifies the intensity of red in the color. 
-rgbReserved     Not used; must be set to zero. 
-
-See Also
-
-BITMAPINFO 
-
-==============================================================================
-RGB (2.x)
-
-COLORREF RGB(cRed, cGreen, cBlue)
-
-BYTE cRed;      /* red component of color       */
-BYTE cGreen;    /* green component of color     */
-BYTE cBlue;     /* blue component of color      */
-
-
-The RGB macro selects an RGB color based on the parameters supplied and the
-color capabilities of the output device.
-
-Parameter       Description
-
-cRed    Specifies the intensity of the red color field. 
-cGreen  Specifies the intensity of the green color field. 
-cBlue   Specifies the intensity of the blue color field. 
-
-Returns
-
-The return value specifies the resultant RGB color. 
-
-Comments
-
-The intensity for each argument can range from 0 through 255. If all three
-intensities are specified as zero, the result is black. If all three
-intensities are specified as 255, the result is white.
-
-Comments
-
-The RGB macro is defined in WINDOWS.H as follows: 
-
-
-
-#define RGB(r,g,b)   ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))| \
-    (((DWORD)(BYTE)(b))<<16)))
-
-See Also
-
-GetBValue, GetGValue, GetRValue, PALETTEINDEX, PALETTERGB
-
-==============================================================================
-BITMAPCOREINFO (3.0)
-
-
-
-typedef struct tagBITMAPCOREINFO {  /* bmci */
-    BITMAPCOREHEADER bmciHeader;
-    RGBTRIPLE        bmciColors[1];
-} BITMAPCOREINFO;
-
-The BITMAPCOREINFO structure fully defines the dimensions and color
-information for a device-independent bitmap (DIB).  Windows applications
-should use the BITMAPINFO structure instead of BITMAPCOREINFO whenever
-possible.
-
-Member          Description
-
-bmciHeader      Specifies a BITMAPCOREHEADER structure that contains
-information about the dimensions and color format of a DIB.
-
-bmciColors      Specifies an array of RGBTRIPLE structures that define the
-colors in the bitmap.
-
-Comments
-
-The BITMAPCOREINFO structure describes the dimensions and colors of a bitmap.
-It is followed immediately in memory by an array of bytes which define the
-pixels of the bitmap. The bits in the array are packed together, but each
-scan line must be zero-padded to end on a LONG boundary. Segment boundaries,
-however, can appear anywhere in the bitmap. The origin of the bitmap is the
-lower-left corner.
-
-The bcBitCount member of the BITMAPCOREHEADER structure determines the number
-of bits that define each pixel and the maximum number of colors in the
-bitmap. This member may be set to any of the following values:
-
-Value   Meaning
-
-1       The bitmap is monochrome, and the bmciColors member must contain two
-entries. Each bit in the bitmap array represents a pixel. If the bit is
-clear, the pixel is displayed with the color of the first entry in the
-bmciColors table. If the bit is set, the pixel has the color of the second
-entry in the table.
-
-4       The bitmap has a maximum of 16 colors, and the bmciColors member
-contains 16 entries. Each pixel in the bitmap is represented by a four-bit
-index into the color table.
-
-For example, if the first byte in the bitmap is 0x1F, the byte represents two
-pixels. The first pixel contains the color in the second table entry, and the
-second pixel contains the color in the sixteenth table entry.
-
-8       The bitmap has a maximum of 256 colors, and the bmciColors member
-contains 256 entries. In this case, each byte in the array represents a
-single pixel.
-
-24      The bitmap has a maximum of 2^24 colors. The bmciColors member is
-NULL, and each 3-byte sequence in the bitmap array represents the relative
-intensities of red, green, and blue, respectively, of a pixel.
-
-The colors in the bmciColors table should appear in order of importance.
-Alternatively, for functions that use DIBs, the bmciColors member can be an
-array of 16-bit unsigned integers that specify an index into the currently
-realized logical palette instead of explicit RGB values. In this case, an
-application using the bitmap must call DIB functions with the wUsage
-parameter set to DIB_PAL_COLORS.
-
-Note:   The bmciColors member should not contain palette indexes if the
-bitmap is to be stored in a file or transferred to another application.
-Unless the application uses the bitmap exclusively and under its complete
-control, the bitmap color table should contain explicit RGB values.
-
-See Also
-
-BITMAPINFO, BITMAPCOREHEADER, RGBTRIPLE 
-
-
-==============================================================================
-BITMAPCOREHEADER (3.0)
-
-
-
-typedef struct tagBITMAPCOREHEADER {    /* bmch */
-    DWORD   bcSize;
-    short   bcWidth;
-    short   bcHeight;
-    WORD    bcPlanes;
-    WORD    bcBitCount;
-} BITMAPCOREHEADER;
-
-The BITMAPCOREHEADER structure contains information about the dimensions and
-color format of a device-independent bitmap (DIB). Windows applications
-should use the BITMAPINFOHEADER structure instead of BITMAPCOREHEADER
-whenever possible.
-
-Member          Description
-
-bcSize          Specifies the number of bytes required by the
-BITMAPCOREHEADER structure.
-
-bcWidth         Specifies the width of the bitmap, in pixels. 
-bcHeightSpecifies the height of the bitmap, in pixels. 
-
-bcPlanesSpecifies the number of planes for the target device. This
-member must be set to 1.
-
-bcBitCount      Specifies the number of bits per pixel. This value must be 1,
-4, 8, or 24.
-
-Comments
-
-The BITMAPCOREINFO structure combines the BITMAPCOREHEADER structure and a
-color table to provide a complete definition of the dimensions and colors of
-a DIB. See the description of the BITMAPCOREINFO structure for more
-information about specifying a DIB.
-
-An application should use the information stored in the bcSize member to
-locate the color table in a BITMAPCOREINFO structure with a method such as
-the following:
-
-
-
-lpColor = ((LPSTR) pBitmapCoreInfo + (UINT) (pBitmapCoreInfo->bcSize))
-
-See Also
-
-BITMAPCOREINFO, BITMAPINFOHEADER, BITMAPINFOHEADER 
-
-=============================================================================
-RGBTRIPLE (3.0)
-
-
-
-typedef struct tagRGBTRIPLE {   /* rgbt */
-    BYTE    rgbtBlue;
-    BYTE    rgbtGreen;
-    BYTE    rgbtRed;
-} RGBTRIPLE;
-
-The RGBTRIPLE structure describes a color consisting of relative intensities
-of red, green, and blue. The bmciColors member of the BITMAPCOREINFO
-structure consists of an array of RGBTRIPLE structures.  Windows applications
-should use the BITMAPINFO structure instead of BITMAPCOREINFO whenever
-possible. The BITMAPINFO structure uses an RGBQUAD structure instead of the
-RGBTRIPLE structure.
-
-Member  Description
-
-rgbtBlueSpecifies the intensity of blue in the color. 
-rgbtGreen       Specifies the intensity of green in the color. 
-rgbtRed         Specifies the intensity of red in the color.
-
-See Also
-
-BITMAPCOREINFO, BITMAPINFO, RGBQUAD
-
-==============================================================================
diff --git a/tkimg1.3/bmp/configure b/tkimg1.3/bmp/configure
deleted file mode 100755
index 40447ca..0000000
--- a/tkimg1.3/bmp/configure
+++ /dev/null
@@ -1,6423 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgbmp', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./bmp.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgbmp
-DPACKAGE="img::bmp"
-PHIMGTYPE="bmp"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGBMP_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgbmpstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGBMP_VERSION "${TKIMGBMP_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3450: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3513: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgbmp in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgbmp 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3639: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3647 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3687: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3734: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3742 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3779: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3787 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3821: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3829 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3880: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3885 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3936: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3994: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4032: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4078: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4092: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4113: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4142: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4150 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4205: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4362: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4370 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4463: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4471 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4547: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4555 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4686: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4691 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4753: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4818: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4823 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4855: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4857 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5192: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5195 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5248: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5250 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5286: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5288 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5324: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5326 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5468: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5526: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5588 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5662 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5759 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5784: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5787 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5828: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5848: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5856 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6015: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6047: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGBMP_VERSION@%$TKIMGBMP_VERSION%g
-s%@tkimgbmp_LIB_FILE@%$tkimgbmp_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/bmp/configure.in b/tkimg1.3/bmp/configure.in
deleted file mode 100644
index f613000..0000000
--- a/tkimg1.3/bmp/configure.in
+++ /dev/null
@@ -1,226 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgbmp', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./bmp.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgbmp
-DPACKAGE="img::bmp"
-PHIMGTYPE="bmp"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGBMP_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGBMP_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgbmp_LIB_FILE)
-#AC_SUBST(tkimgbmpstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGBMP_VERSION, "${TKIMGBMP_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgbmp in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgbmp)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/bmp/pkgIndex.tcl.in b/tkimg1.3/bmp/pkgIndex.tcl.in
deleted file mode 100644
index ddf29a2..0000000
--- a/tkimg1.3/bmp/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgbmp_LIB_FILE@]]
diff --git a/tkimg1.3/bmp/tests/WizImg.bmp b/tkimg1.3/bmp/tests/WizImg.bmp
deleted file mode 100644
index 075f68e..0000000
Binary files a/tkimg1.3/bmp/tests/WizImg.bmp and /dev/null differ
diff --git a/tkimg1.3/bmp/tests/all.tcl b/tkimg1.3/bmp/tests/all.tcl
deleted file mode 100644
index a901b37..0000000
--- a/tkimg1.3/bmp/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/bmp/tests/bmp.test b/tkimg1.3/bmp/tests/bmp.test
deleted file mode 100644
index eb5fd1a..0000000
--- a/tkimg1.3/bmp/tests/bmp.test
+++ /dev/null
@@ -1,53 +0,0 @@
-# This file is a Tcl script to test out BMP reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::bmp [package require img::bmp]"
-
-set bmpdata \
-{Qk12AgAAAAAAADYAAAAoAAAAEAAAAAwAAAABABgAAAAAAEACAABtCwAAbQsAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2dnZ2dnZ2dnZAAAAgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-AAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ
-2dnZ2dnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2dnZ2dnZ2dnZ
-2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ
-AAAAgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZAAAA
-AAAAAAAAAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ}
-
-
-test bmp-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.bmp]
-    i data -format bmp
-} $bmpdata
-test bmp-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $bmpdata
-    set data [i data -format bmp]
-} $bmpdata
-test bmp-1.3 {} {
-    i blank
-    i put $bmpdata
-    set data [i data -format bmp]
-} $bmpdata
-test bmp-1.4 {} {
-    i blank
-    i put $bmpdata -format bmp
-    set data [i data -format bmp]
-} $bmpdata
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test bmp-2.0 {Binary I/O with BMP images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.bmp] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/bmp/tests/bmp4r.bmp b/tkimg1.3/bmp/tests/bmp4r.bmp
deleted file mode 100644
index a0ff045..0000000
Binary files a/tkimg1.3/bmp/tests/bmp4r.bmp and /dev/null differ
diff --git a/tkimg1.3/bmp/tests/bmp8r.bmp b/tkimg1.3/bmp/tests/bmp8r.bmp
deleted file mode 100644
index 2d1dec8..0000000
Binary files a/tkimg1.3/bmp/tests/bmp8r.bmp and /dev/null differ
diff --git a/tkimg1.3/bmp/tests/folder.bmp b/tkimg1.3/bmp/tests/folder.bmp
deleted file mode 100644
index b8cd319..0000000
Binary files a/tkimg1.3/bmp/tests/folder.bmp and /dev/null differ
diff --git a/tkimg1.3/bmp/tests/img.bmp b/tkimg1.3/bmp/tests/img.bmp
deleted file mode 100644
index 0744441..0000000
Binary files a/tkimg1.3/bmp/tests/img.bmp and /dev/null differ
diff --git a/tkimg1.3/changes b/tkimg1.3/changes
deleted file mode 100644
index 89f91fa..0000000
--- a/tkimg1.3/changes
+++ /dev/null
@@ -1,335 +0,0 @@
-This file summarizes all changes made to Img since version 1.0 was
-released in April, 1997.
-
-6/5/97  (bug fix) removed fclose() in imgTIFF.c, because the generic
-	image code already closes the file. This resulted in a crash
-	on some machines, when reading a tiff file from disk.
-
-6/9/97  Added Channel functions for all format handlers. Needed to
-	make everything work again in combination with Tk8.0b1.
-
-6/12/97 Removed Xlib sub-directory and moved tkWinInt.h and tkMacInt.h
-	to the main directory. reason: Xlib.h is already installed by
-	Tk, so there is no need for Img to do it as well.
-
-6/12/97 (bug-fix) test.png in reality was an XPM file.
-
-6/12/97 Upgraded libpng to version 0.96
-
-7/1/97  Removed __eprintf() function: The assert() function
-	(which was the problem) can be disabled with
-	-DNDEBUG as well, which is much simpler.
-
-7/1/97  Fixed bug in PNG interlace handling: Now interlaced
-	images will be produced by default.
-
-7/1/97  Added support for animated GIF. Not complete yet.
-
-7/10/97 Added support for binary I/O in all format handlers. The
-	initialization automatically detects if the current Tcl
-	version supports this.
-
-7/11/97 Construction of new patch.tk8, which combines Steve Ball's
-	work with mine. Now binary I/O is fully supported.
-
-7/16/97 Removed the "fromData" hack from all format handlers.
-
-7/17/97 Speedup of TIFF format handler: No longer uses a temporary
-	file to store intermediate results, but does everyting
-	in memory. This enhancement uses the function TIFFClientOpen,
-	which is only available in newer TIFF libraries. If this
-	function cannot be found, the slower original approach is
-	taken.
-
-7/18/97 Added support for BMP format. Still incomplete.
-
-7/20/97 Completed support for animated GIF. Added example animated
-	GIF to demo.
-
-7/24/97 Added support for 1-bit BMP images. Now only
-	RLE decompressing left to be implemented.
-
-7/26/97 Changed TIFF handler such that libz and libjpeg are
-	only loaded when needed (new files imgTIFFjpeg.c and
-	imgTIFFzip.c, adapted from tif_jpeg.c and tif_zip.c
-	from the TIFF source).
-
-7/26/97 Added postscript format handler (imgPS.c), read only.
-	Assumes that Ghostscript (version 2.6 or higher)
-	is installed on your system.
-
-7/28/97 Changed GIF format string to be "gif -index <n>" in stead of
-	"gif <n>". The old format is still accepted for backwards
-	compatibility with version 1.1b1, but no longer documented.
-
-8/1/97  Added option "-zoom" to postscript handler.
-
-8/11/97 Modified all patches to correct the "imageName copy"
-	command. Previously it didn't handle transparency
-	correctly. Plus another bug fix related to the alpha
-	channel. Thanks to Nick Ing-Simmons <nick at ni-s.u-net.com>
-	for providing the fix.
-
-8/12/97 Bug fix. Transparency turned out not to be handled correctly
-	for paletted PNG images. Tk and XV cannot produce such images, that's
-	why this is not discovered earlier. Thanks to Stephane Lavirotte
-	<Stephane.Lavirotte at sophia.inria.fr> for pointing this out.
-
-8/13/97 Converted the "format" argument of the Image API to Tcl_Obj's.
-	This influenced all source files and "patch.tk8". So, you
-	cannot use older versions of "patch.tk8" with Img1.1 any more,
-	and the latest "patch.tk8" doesn't work with Img1.1b3 as well.
-
-8/16/97 Added "install.tcl" and "tkv.tcl"
-
-8/18/97 Tcl8.0a1 and Tcl8.0a2 are no longer supported.
-
-8/18/97 Adapted "patch.tk8" to the final Tk8.0 release. Constructed
-	new files "patchtk8.tgz" and "patchtk8.zip", which contain
-	a collection of the Tk8.0 files that changed. The latter files
-	are not distributed with Img 1.1, but can be found in the
-	same directory where you got Img 1.1.
-
------------------ Released 1.1, 8/18/97  -----------------------
-
-8/21/97 (bug fix) "tkv.tcl" didn't display the menu's correctly using
-	Tk4.2, apart from the fact that they turned out to look horrible
-	on Windows anyway. In combination with Tk8.0, Tkv uses the new
-	menu interface now, which doesn't have this problem.
-
-8/21/97 (bug fix) "demo.tcl" changed the working directory when the
-	additional tests are interrupted by using the "dismiss" button.
-
-8/21/97 (bug fix) Removed POSIX dependancies from imgInit.c, imgPmap.c,
-	imgPS.c and imgTIFF.c. This will make porting to non-POSIX
-	systems (e.g. Mac) easier, but makes no difference on
-	POSIX-compliant machines.
-
-8/22/97 Added file MW_ImgHeader.pch, which is used as a pre-compilied
-	header source for all files in the Img package. This make compilies
-	go a bit faster. This file is only intended to be used in the
-	MetroWerks CodeWarrior environment.
-
-8/24/97 Added "patch.tkx", which enhances the TclX help system to
-	reflect the changes in patch.tk4 and patch.tk8
-
-8/26/97 (bug fix) JPEG handler crashed on some machines when writing
-	big JPEG images to disk. Thanks to Peter T. Waltenberg
-	<p.waltenberg at irl.cri.nz> for reporting this bug, and for
-	providing an example script which demonstrated this problem.
-
-8/27/97 (bug fix) Serveral minor changes to remove warning when compiling
-	under Windows and Mac. Thanks to Mazin As-Sanie <mazina at eecs.umich.edu>
-	for reporting those to me.
-
-8/27/97 (bug fix) Eliminated Tcl_Realloc() call in imgTIFF.c. This function
-	didn't exist yet in Tk4.2 and before.
-
-9/5/97  (bug fix) install.tcl assumed that the PATH enviroment variable
-	was a ':'-separated list. This is correct on UNIX, but on Windows
-	the separation character should be ';'
-
-9/7/97  (bug fix) Fixed patch.tk8 such that the "imgName copy" command
-	handles transparency fully correct. Previously copied pixels
-	just replaced the existing pixels and the regions were not
-	merged correctly. Now that has been fixed. If a partially trans-
-	parent pixel is copied on top of an already partially transparent
-	pixel, a new color and a new transparency value is determined,
-	consisting of a combination of both.
-
-9/8/97  (bug fix) GIF handler didn't handle local colormaps correctly.
-	Lucky enough most GIF's only have a global colormap.
-
------------------ Released 1.1p1, 9/9/97  -----------------------
-
-10/1/97  (bug-fix) Oops. Previous bug-fix was not correct :-(
-	 Still didn't work with local colormaps.
-
-10/17/97 (bug fix) patch.tix didn't correctly initialize
-	 the variable "format", because this variable
-	 was disturbed by the new initialization code.
-
-10/22/97 (bug-fix) Applied the official patch #1 to libz 1.0.4.
-	 This makes the library more robust in respect to
-	 corrupted compressed streams. (see README.ZLIB)
-
-11/1/97  (bug-fix, feature change) Upgraded tiff library
-	 to version 3.4.37 (was 3.4.33)
-
-11/1/97  Eliminated the function Tk_ParseArgv(), which makes
-	 the tiff- and jpeg- handlers thread-safe. As long as
-	 Tk is not thread-safe this doesn't help much, but at
-	 least Img is prepared now for the multi-threaded future.
-
-11/3/97  Added rule to makefile.vc to build Img for Tk8.1. This is
-	 not guaranteed because Tk8.1 is not released yet, but if
-	 there are not too much incompatibilities it should work.
-
-11/3/97  Enhanced the bitmap image type (in patch.tk8) to use
-	 the new Tcl_Obj API.
-
-11/9/97  (feature change) Adapted patch.tk4 and patch.tk8 such
-	 that "imageName read" and "imageName put" now return
-	 the format of the readed data in stead of the empty string.
-
-11/9/97  (feature change) Added logluv compression support to
-	 TIFF format handler.
-
-11/9/97  Recreated patch.tk8 using Tk8.0p1, and also created
-	 new files patchtk8.tgz and patchtk8.zip from it.
-	 Documented that Img is now tested with Tk8.0p1 as well.
-
------------------ Released 1.1p2, 11/10/97  -----------------------
-
-11/15/97 (new feature) Added imgWindow.c
-
-11/25/97 (new feature) Added libttf.so (ttf.dll on Windows)
-
-11/27/97 (enhancement) Made the changes required by the new Apple
-	 Universal Headers V.3.0, so that Img will compile with CW Pro 2.
-
-11/30/97 PNG hopepage has moved. Changed README.PNG accordingly.
-
-12/7/97  Added PDF encoder, using ghostscript. Doesn't work yet.
-
-12/15/97 Removed support for Tk4.2.
-
-12/30/97 Added support for byteArrays. This fixes binary I/O in
-	 combination with Tk8.1a1.
-
-1/27/98  Added patch.tk81a1, created with the official Tk8.1a1
-	 distribution.
-
-1/28/98  Upgrade to libz version 1.0.8.
-
------------------ Released 1.2a1, 1/28/98  -----------------------
-
-2/27/98  Upgrade to libz version 1.0.8.
-
-2/27/98  Upgrade to libpng version 0.99d, fixing shared library
-         version number to 2.0.99, as suggested by png.h.
-
-10/25/98 Fixed imgWindow.c for Windows. Patch supplied by
-	 Robin Becker <robin at jessikat.demon.co.uk>.
-
-11/19/98 Upgrade to libz 1.1.3, libpng 1.0.2 and libttf 2.0.1.
-
-11/19/98 Fixed configure script in order to work with Tcl8.0.3
-	 and also the upcoming 8.0.4 and 8.0.5
-
-3/14/99  Added 8.1b2 compatible Stub support
-
-3/14/99  Removed libttf and libgif support.
- 
------------------ Released 1.2b1, 3/14/99  -----------------------
-
-3/19/99  Finished "Makefile.gnu". Some more tweaking of Tk and CygWin
-	 header-files is needed to make it work, but at least Img has
-	 full CygWin support now. Only works with CygWin B20.1 and higher.
-
-3/29/99  Better support for byte-compiler in demo.tcl and tkv.tcl,
-	 using {}'s around expressions always. Also removing
-	 old Tk4.2 compatible menu-code.
-
-3/29/99  Internal changes, using Tcl_Obj's in more places.
-	 Suggested by Nick Ing-Simmons. This will make the
-	 port to perl/Tk easier.
-
-3/29/99  Upgrade to libpng 1.0.3
-
------------------ Released 1.2b2, 3/29/99  -----------------------
-
-5/23/99  Documentation enhancements: Everything is available in
-         html now.
-
------------------ Released 1.2, 5/23/99  -----------------------
-
-9/3/99   Added suitable patch for Tk8.2.0
-
-9/7/99   Modified BMP generation to generate 8-bit paletted if
-         there are less than 257 colors but more than 512 pixels.
-         Donated by Roger E Critchlow Jr <rec at elf.org>
-
-9/7/99   Upgraded tiff library to version 3.5.1, thereby disabling
-         lzw support.
-
------------------ Released 1.2.1, 9/16/99  -----------------------
-
-10/16/99 Upgraded tiff library to version 3.5.2 and png library
-         to version 1.0.5.  LZW-support is still disabled.
-
-10/19/99 Modified PNG gamma correction following the latest
-         PNG 1.2 specification.
-
-10/26/99 Applied official fax3-patch to libtiff 3.5.2, fixing
-         certain fax3 images (whatever that may be.....).
-
-10/26/99 Modified zlib to use the _stdcall in stead of the _cdecl
-         convention. This is the way Gilles Vollent compiles it's
-         zlib dll's, and he is the 'official' zlib windows maintainer.
-         INCOMPATIBLE on Windows!!!!!!!!!!!!!
-
-10/26/99 Fixed undocumented base-64 encoder/decoder to correctly
-         report "wrong number of arguments".
-
-10/27/99 Fixed bug in BMP handler, which caused sometimes colors
-         to be distorted when reading certain BMP images.
-
------------------ Released 1.2.2, 10/27/99  -----------------------
-
-11/10/99 Modified all handlers to use the extended Photo API when
-	 running with Tk8.3 or higher.
-
-11/10/99 Fixed tkv.tcl (from demo.tcl) and tests to be independant
-	 from working directory.
-
-11/10/99 Fixed libpng/makefile.vc to use _stdcall convention for
-	 zlib functions.
-
-1/15/2000 Fixed "-encoding none" problem.
-
-1/15/2000 Upgraded libtiff to version 3.5.4
-
-1/15/2000 All handler names are now in lower-case.
-
------------------ Released 1.2.3, 1/16/2000  -----------------------
-
-5/7/2000 Added some missing symbols to tclLoadNone.c
-
-5/7/2000 Fixed missing "-rpath" option. Bug reported by Larry Virden.
-
-5/7/2000 Made PNG handler independant of jmpbuf support in libpng.
-         This makes Img work with libpng 1.1 (still in beta, and
-         unlikely ever to be released to the public), and hopefully
-         also with more future libpng versions.
-
-5/10/2000 Fixed possible infinite loop in XBM format handler. Bug
-         reported by Gianandrea Rigoni
-
-5/11/2000 Changed URL of zlib and libpng to point to the current
-          location everywhere.
-
-7/8/2000  Upgraded libtiff to version 3.5.5
-
-7/9/2000  Internationalized demo.tcl and tkv.tcl
-
-7/13/2000 Bug-fix in BMP write function. If an image contained more
-          than 256 colors, only the first 256 where stored in the
-          color table. Bug reported by higuchi at cov.tytlabs.co.jp
-
-8/9/2000  Upgraded libpng to version 1.0.8
-
-8/11/2000  Fixed Postscript handling when the image size is larger
-          than the default page size. BUG-report and fix suggestion
-          by Carlos Vidal.
-
-8/12/2000 Made PNG handler independant of the png_init_io() function
-          and stdio; some libpng versions (e.g. the official dll's
-          for Windows from the PNG group) lack this function
-          (and for a good reason............).
-
-8/12/2000 Removed the patches subdirectory from the distribution. If
-          you are able to install the patches, you are also able to
-          install Tcl 8.3.2 (or higher), which is a much better idea.
-
------------------ Released 1.2.4, 8/13/2000  -----------------------
diff --git a/tkimg1.3/configure b/tkimg1.3/configure
deleted file mode 100755
index c7897c5..0000000
--- a/tkimg1.3/configure
+++ /dev/null
@@ -1,3800 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=init.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-# @(#) configure.in 1.0 97/2/11 12:50:30
-
-IMG_VERSION=1.3
-IMG_MAJOR_VERSION=1
-IMG_MINOR_VERSION=2
-IMG_PATCH_LEVEL="1.2.4"
-VERSION=${IMG_VERSION}
-
-###  AC_PREFIX_PROGRAM(tclsh)
-###  
-###  if test "x${prefix}" = "xNONE"; then
-###      prefix=/usr/local
-###  fi
-###  if test "x${exec_prefix}" = "xNONE"; then
-###      exec_prefix="${prefix}"
-###  fi
-
-
-
-
-
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:571: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 576 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:604: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 609 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:633: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 648 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 665 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 682 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:722: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:752: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:803: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 846 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:877: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:882: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:910: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:949: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 953 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:985: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1043: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1077: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1110: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1136: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:1173: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1180 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:1187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1195 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1230 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1245 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:1253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:1283: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 1289 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1308 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:1339: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 1345 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:1353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:1374: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 1380 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:1409: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 1415 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:1448: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 1450 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:1497: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1502 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:1534: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1539 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:1571: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1576 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:1608: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1613 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:1645: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1650 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 1678 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 1692 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 1706 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:1727: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:1800: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1805 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:1837: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1842 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1879: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1884 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:1919: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1924 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:1969: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1974 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-## All relevant packages are configuration subdirectories.
-
-# I. Support
-
-# Remove all arguments after the command name. Without doing that we
-# might transmit something like 'gcc -pipe' down to the sub
-# configure's, and they may hang in 'which gcc -pipe' (platform
-# dependent. So far only seen for Linux).
-
-CC=`echo $CC | sed -e 's/ .*$//'`
-
-
-  tea_sub_configure_args=
-  tea_prev=
-  for tea_arg in $ac_configure_args; do
-    if test -n "$tea_prev"; then
-      tea_prev=
-      continue
-    fi
-    case "$tea_arg" in
-    -cache-file | --cache-file | --cache-fil | --cache-fi \
-    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-      tea_prev=cache_file ;;
-    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      tea_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    *) tea_sub_configure_args="$tea_sub_configure_args $tea_arg" ;;
-    esac
-  done
-
-
-    tea_config_dir="libz/tcl"
-    tea_config_arguments=""
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="libpng/tcl"
-    tea_config_arguments="--with-zlibtcl=`pwd`/libz/tcl"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="libtiff/tcl"
-    tea_config_arguments=""
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="libjpeg/tcl"
-    tea_config_arguments=""
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="base"
-    tea_config_arguments=""
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="bmp"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="gif"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="ico"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="jpeg"
-    tea_config_arguments="--with-tkimg=`pwd`/base --with-jpegtcl=`pwd`/libjpeg/tcl"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="pcx"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="pixmap"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="png"
-    tea_config_arguments="--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng/tcl --with-zlibtcl=`pwd`/libz/tcl"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="ppm"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="ps"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="sgi"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="sun"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="tga"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="tiff"
-    tea_config_arguments="--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff/tcl --with-zlibtcl=`pwd`/libz/tcl --with-jpegtcl=`pwd`/libjpeg/tcl"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="window"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="xbm"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-    tea_config_dir="xpm"
-    tea_config_arguments="--with-tkimg=`pwd`/base"
-    subdirs="$subdirs $tea_config_dir"
-    
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    if test ! -d $srcdir/$tea_config_dir; then
-      continue
-    fi
-
-    echo configuring in $tea_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    tea_popdir=`pwd`
-    cd $tea_config_dir
-
-      # A "../" for each directory in /$tea_config_dir.
-      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      tea_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
-    *) # Relative path.
-      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
-    esac
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $tea_sub_srcdir/configure; then
-      tea_sub_configure=$tea_sub_srcdir/configure
-    elif test -f $tea_sub_srcdir/configure.in; then
-      tea_sub_configure=$tea_configure
-    else
-      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
-      tea_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$tea_sub_configure"; then
-
-      # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) tea_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        tea_sub_cache_file="$tea_dots$cache_file" ;;
-      esac
-
-      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
-      # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
-      then :
-      else
-        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
-      fi
-    fi
-
-    cd $tea_popdir
-
-
-#--------------------------------------------------------------------
-#	Finally
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@IMG_VERSION@%$IMG_VERSION%g
-s%@IMG_PATCH_LEVEL@%$IMG_PATCH_LEVEL%g
-s%@IMG_MAJOR_VERSION@%$IMG_MAJOR_VERSION%g
-s%@IMG_MINOR_VERSION@%$IMG_MINOR_VERSION%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@CPP@%$CPP%g
-s%@subdirs@%$subdirs%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/tkimg1.3/configure.in b/tkimg1.3/configure.in
deleted file mode 100644
index 53ee890..0000000
--- a/tkimg1.3/configure.in
+++ /dev/null
@@ -1,72 +0,0 @@
-dnl	This file is an input file used by the GNU "autoconf" program to
-dnl	generate the file "configure", which is run during Tk installation
-dnl	to configure the system for the local environment.
-AC_INIT(init.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-# @(#) configure.in 1.0 97/2/11 12:50:30
-
-IMG_VERSION=1.3
-IMG_MAJOR_VERSION=1
-IMG_MINOR_VERSION=2
-IMG_PATCH_LEVEL="1.2.4"
-VERSION=${IMG_VERSION}
-
-###  AC_PREFIX_PROGRAM(tclsh)
-###  
-###  if test "x${prefix}" = "xNONE"; then
-###      prefix=/usr/local
-###  fi
-###  if test "x${exec_prefix}" = "xNONE"; then
-###      exec_prefix="${prefix}"
-###  fi
-
-AC_SUBST(IMG_VERSION)
-AC_SUBST(IMG_PATCH_LEVEL)
-AC_SUBST(IMG_MAJOR_VERSION)
-AC_SUBST(IMG_MINOR_VERSION)
-
-TEA_SETUP_COMPILER
-
-## All relevant packages are configuration subdirectories.
-
-# I. Support
-
-# Remove all arguments after the command name. Without doing that we
-# might transmit something like 'gcc -pipe' down to the sub
-# configure's, and they may hang in 'which gcc -pipe' (platform
-# dependent. So far only seen for Linux).
-
-CC=`echo $CC | sed -e 's/ .*$//'`
-
-TEA_CONFIG_COLLECT
-TEA_CONFIG_SUBDIR(libz/tcl,   [])
-TEA_CONFIG_SUBDIR(libpng/tcl, [--with-zlibtcl=`pwd`/libz/tcl])
-TEA_CONFIG_SUBDIR(libtiff/tcl,[])
-TEA_CONFIG_SUBDIR(libjpeg/tcl,[])
-TEA_CONFIG_SUBDIR(base,       [])
-TEA_CONFIG_SUBDIR(bmp,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(gif,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(ico,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(jpeg,       [--with-tkimg=`pwd`/base --with-jpegtcl=`pwd`/libjpeg/tcl])
-TEA_CONFIG_SUBDIR(pcx,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(pixmap,     [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(png,        [--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng/tcl --with-zlibtcl=`pwd`/libz/tcl])
-TEA_CONFIG_SUBDIR(ppm,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(ps,         [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(sgi,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(sun,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(tga,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(tiff,       [--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff/tcl --with-zlibtcl=`pwd`/libz/tcl --with-jpegtcl=`pwd`/libjpeg/tcl])
-TEA_CONFIG_SUBDIR(window,     [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(xbm,        [--with-tkimg=`pwd`/base])
-TEA_CONFIG_SUBDIR(xpm,        [--with-tkimg=`pwd`/base])
-
-#--------------------------------------------------------------------
-#	Finally
-#--------------------------------------------------------------------
-
-AC_OUTPUT(Makefile)
diff --git a/tkimg1.3/demo/demo.tcl b/tkimg1.3/demo/demo.tcl
deleted file mode 100755
index dcc8f9b..0000000
--- a/tkimg1.3/demo/demo.tcl
+++ /dev/null
@@ -1,1496 +0,0 @@
-#!/bin/sh
-# The next line restarts using wish8.3 \
-exec wish8.3 $0 ${1+"$@"}
-
-source [file join [file dirname [info script]] imgmsg.tcl]
-
-#
-# Make the Image format available.
-#
-
-set rundir [file dirname [info script]]
-set auto_path "[list $rundir] $auto_path"
-set img_version [package require Img]
-
-wm title . [mc {Tests for available image formats}]
-eval destroy [winfo children .]
-eval image delete [image names]
-
-frame .f
-button .f.d -text [mc Dismiss] -command exit
-pack .f.d -side left
-if {[file exists install.tcl]} {
-    button .f.i -text Install -command Install
-    pack .f.i -side left
-    proc Install {} {
-	catch {interp delete slave}
-	interp create slave
-	slave eval {
-	    load {} Tk
-	    source install.tcl
-	}
-    }
-}
-button .f.b -text [mc "More tests"] -command run_more_tests
-pack .f.b -side right
-pack .f -side top -expand y -fill both
-message .m -aspect 900 -text [format [mc "This page shows the available\
-image formats of the Img extension (version %s, using Tcl/Tk %s)"] $img_version $tcl_patchLevel]
-pack .m -side top -expand y -fill both
-
-proc run_more_tests {} {
-    global rundir
-    if {[winfo exists .t]} {
-	raise .t
-    } else {
-	toplevel .t
-	wm title .t [mc {More tests}]
-	frame .t.f
-	button .t.f.d -text dismiss -command [list destroy .t]
-	pack .t.f.d -side left
-	pack .t.f -side top -fill x
-	text .t.t -yscrollcommand [list .t.s set]
-	scrollbar .t.s -command [list .t.t yview]
-	pack .t.t .t.s -side left -expand y -fill both
-    }
-    .t.t delete 1.0 end
-    .t.t insert end "-------- [mc {starting tests}] --------\n"
-    set olddir [pwd]
-    cd [file join $rundir tests]
-    proc puts args {
-	.t.t insert end "[lindex $args 1]\n"
-	.t.t see end
-	update
-    }
-    set result [catch {uplevel #0 source all}]
-    cd $olddir
-    if $result return
-    .t.t insert end "-------- [mc {end of tests}] --------\n"
-    if {[package vcompare [info tclversion] 8.3]<0} {
-    .t.t insert end {
-  note:  if the  previous  tests fail, and you are
-  using Tcl/Tk 8.2.X  or lower, the cause  is that
-  Tk doesn't handle transparency correctly. If you
-  don't mind transparency, all else should be well.
-}
-}
-    .t.t see end
-}
-
-proc update_animated_gif {w option num} {
-    global imgPriv
-    if {[info exists imgPriv($w,args)]} {
-	set im [image create photo "${w}_[expr $num+1]"]
-	$im copy $imgPriv($w,$num)
-	incr num
-	if {[catch "$im configure $imgPriv($w,args) -format \{gif -index $num\}"]} {
-	    unset imgPriv($w,args)
-	    if {$num>1} {
-		set num 0
-		set im $imgPriv($w,$num)
-	    } else {
-		# this is not an animated GIF; just stop
-		unset imgPriv($w,0)
-		return
-	    }
-	} else {
-	    $im configure -data {} -file {};#free storage
-	    set imgPriv($w,$num) $im
-	}
-    } else {
-	incr num
-	if {![info exists imgPriv($w,$num)]} {
-	    set num 0
-	}
-	set im $imgPriv($w,$num)
-    }
-    if {[catch "$w $option $im"]} {
-	catch {unset imgPriv($w,args)}
-	foreach im [array names imgPriv $w,*] {
-	    image delete $imgPriv($im)
-	    unset imgPriv($im)
-	}
-    } else {
-	update idletasks
-	after 20 [list update_animated_gif $w $option $num]
-    }
-}
-
-proc show_animated_gif {w args} {
-    global imgPriv
-    catch {destroy $w}
-
-    label $w
-    if {[catch "image create photo ${w}_0 $args -format \{gif -index 0\}" image]} {
-	$w configure -text [mc "error displaying animated gif"]:\n$image" \
-		-relief ridge
-    } else {
-	$image configure -data {} -file {} -format {};# free storage
-	$w configure -image $image
-	set imgPriv($w,0) $image
-	set imgPriv($w,args) $args
-	update idletasks
-	after 20 [list update_animated_gif $w {configure -image} 0]
-    }
-    pack $w
-    return $w
-}
-
-proc show_image {format type data} {
-    if {![winfo exists .$format]} {
-	frame .$format
-	pack .$format -side top -expand y -fill x
-	label .$format.l -text "[string toupper ${format}]: "
-	pack .$format.l -side left
-    }
-    set w .$format.$type
-    catch {destroy $w}
-    if {[catch {image create photo [list $format $type] -data $data} image]} {
-	message $w -text "[format [mc {error displaying %s image}] $type]: $image" \
-		-aspect 250 -bd 2 -relief ridge
-    } else {
-	$image configure -data {}
-	label $w -image $image
-    }
-    pack $w -side left
-    update
-}
-
-show_animated_gif .mpph -data {
-R0lGODlhYgIEAIIAAQAAACQAJEkASW0AbZIAkrYAttsA2/8A/yH/C05FVFNDQVBFMi4wAwEA
-AAAh+QQABgD/ACwAAAAAYgIEAAIDuUg63CMwwiCCvQAHwLv/YCiOZGmeaKqubOu+pZXNV03d
-kuAwysLoucjNlpFtYMikcslsOp+ijbRow1EiD12jtyA4INnJZGg8HmfQtHrNbrPP6KqlEgRq
-B17vzi6ukKVmHXBuhIWGh4RTcXJ0QQ8OeVx6XzlWVTRoiJqbnJ0tGmUXdDhgd1uTP2FCo5dT
-g56wsbKaoYBzVlimPJJ7QX9EirPCw8RttTZ1ul29Er81mMXR0tMvxzXJO1wAACH5BAAGAP8A
-LAAAAABiAgQAAgPdCLrc/jDKSau9OOuNAwjgB46kEJjnKazr0A5wTBDDbBc4buz74f/AoHBI
-LBqPSCGPh7M5abQYTOBysVYprAlFCo0+YI9CzCmbz+i0es1uu9/wOFrsqYtE3S73yq9SpTBP
-BDk5PEmHiImKRQYHTISDNjWTMX9UfFuZIFwkY3RhcqGio6SlpqeoqRt2dXmuWyqZV1Z/UjM1
-ToQFS46Lvr/AQUu6BYK4gJe0V7Eprl+sXqrS09TV1tfYbKxhziqxmFOAgYKDOrs9wenqSY07
-uznklFKXmCzN3aB22fv81AAAIfkEAAYA/wAspgAAABgBBAACA+YIEQrNS61Jg1hX6C2GHiBI
-DERpFkShFkZrHHAsz3Rt06/Lrqk5jqFQ58PheI5B0s+HWrFch9dtSp26dDyULwnqeIoay+Qi
-rkAcZ4YDrVY/IOaxGGz0IkPLknN3rfr/MToGTilaJSRcR3RgikF5JyuDfYCUVFeDKj0mSkle
-Q4sYcXFvaA1rDxIScKIZYUVfiUA+PU6Tlbc4US07PJs/nYqLQ4kieZkqki24yzJXe5qziEHD
-dHNloqqpbqfcbquiGK2MH0mzkJG2zLfOhObSQsHC1OVKTLVQUurrWL1biZ9grIFLs2YbNwAh
-+QQABgD/ACyHAAAAVwEEAAID/ggQy94uyCloFTgPsYf/AyGOYmGaRnoYR+u+cCzPcZqeJyl6
-xMdhm4zwUgkUJ8iFkqFgKptQCQRJMRqJwqAPtCMVCDhDwcaimc9mslhs0vXeoJ9caL1Q748n
-tMl89PFURURXQx4cH11eYChjKmiPkC5kOGCVIyCYWkN2VoB8fXtOS34RgJybGkCZbosnZJGw
-aCw3bF9tXSFxhqhXnb5JSUt6CsKlxneDqHIdqyEjOI0qZbHUMGq1bs6Yh3NDdb93U1Ki41Hi
-poSEqYZcuYphr9XykjbQrLnbHbwYEkd4xQ2GERvoZxQ6LIUOrWLlKtq8h5Ps6ci0SxknQOVE
-Ddy4HvGPQVMIC1Hk4QZavIfUZq3J8YUEPl0WL3qaIIwjMQAh+QQABgD/ACxlAAAAmwEEAAID
-/ggRCr1qSSlWDVXorYfwQxgSxECSBVGsheEaB3zMdG3feF7DbsumJ5JJJPpwjhnLZMloPp4M
-h3RKrVqv2KxW2nRGmBQlBnP0dD7EYfDne8l08DjcbfgFhaW0cX8ciy9LD05RUREOhQ2GYEoa
-ZGQbIGlDJmsqPy9ymZo0PD11Kyp3anogfX5igamGh1utrq+uhFBQYBm2j5CSIncnLHWYm8Fx
-bj52QZOSSBeNp2BfEIVeU4PUi0mOSJFoaXcpvnTC4TnExiejRdrK2IsSgrKIsPHyr4OJ7GHL
-thxmkSN4vZdauIghriCnF2yAmBOCzoiZPkkAOav3JEs0d+z0ZdPFMgvFJWAGCxL7pPBYHiJ8
-TElcNGuey5cwW97Dp6yDpBK82LgJaXAki47IGqq7xm4WPCoAACH5BAAGAP8ALEYAAADZAQQA
-AgP+GKC7yiHKGYSo1Wo9xPgfMYhEWRZoYaiGcbxwLM90Tbf4ihKFSYqgjnBDjFwuGMoD0Fgy
-n9CodEqtWq/YrHa7hTgaTSXySCZ6PMFQyJdC5Vy2uFz+VqV8pFH6czYfM0pKYF4MYE0OD4ET
-Y4BEfHt6eDt2OAdwc5iZLzhtO3iQIBYdGhgWpYoTYUxOXK2ur7CxrV5fqBR/GWZDaT9sPG4s
-l5rDNi4tdpOfQGlno6SmSEkUiISDT4mJtYpkubq7Qb0mbSuVwsTnmzltPJ96oY9+uNGKiLWy
-9/j5+l3YqrZl3UT12YPnxLg36BLCULdOmbt38bjNC3TISSEqSyRQE1M8yo8QXiMk/XJTSaFC
-hg19gIp4auI0Vhf3yZxJUx8EbP/K6EIDLqSvgy1MJlSno0cPlcsg+gEkTZBGVlMAACH5BAAG
-AP8ALCYAAAAXAgQAAgP+CAHaHQtKKGioV+itRx/gQIBESRTnWRRGexhHLM90bd9127Jrao7A
-kMfDKVommMnisYwwHM+odEqtWq/YrHbL7Xq/YIaTCVEoj5YiZ8gmiX6l1UrnguHu+DvdIEeh
-4EJsAkRqGBoXZxJmEU2NYo9mYoyJFRwZG22Bbz99LHR5oKEydDxyPiUimiCDrIeViK9ni4wP
-kGG3uLm6u7y9tmO1iRKuGZeYmUDJJn18OqLPoKQ9fyZuga2Er4fCioqRTVFlZWTcxJVFQx9u
-yioqPM7Q8TbSptRBI0KthRvF3OLitnwJHEiwoMErk5jMOmMIVqFMIdjFmeMJhh15GF/o6HRK
-qhq+VayyWYLlr5GTcVjAlTS0DyIJOBPlfMqI0WKzeoA+htCnph+3SFAOCh1KtGivk/+EnWs5
-KJDEFMzg0ZS3BydMVSL5aStJ6woAIfkEAAYA/wAsBwAAAFUCBAACA/4ICqEd8MUJRQ0i65GH
-F55HEMM4FkShFgZrHHAsz3Rt10aer6s5lqEQqKPRYI6WI+XBYDYYi+diSq1ar9isdsvter/g
-sHhMLkebUEhziUkai8ROMOQ78Vy6m37Pf+1aPXUlJEJCcG9ubGpOaWlPUowSSxYZbW1FHCBz
-g3V3eC98oaIwfi07KCkmQIQfH4eUsBdLa4tnUma4ubq7vL2+v1mPUGiKE7GVh4V0Pz53pjmj
-0X06LD2oqqxBG4dKiRS0TrdTkcURlBWwmJqaIqsmqDw6oNL0NPKeddnaHJlwl0qKGgkTB6yg
-wYMIEyq8Qm5RsXOW4PCbGIREp3jy5tXbWE4KUCBsm4aI5HYuSUBJDoZZgQTu4aVkm5ZdVCFv
-o01SB/589AFkzshXAE8KXEi0qNGjSMlEajnpJcxN+exUy3OTIzUeUXvue4WsXC0mWAAAIfkE
-AAYA/wAsAAAAAGICBAACA/4YotIuA8JBKxkk60KKN6BxiEdpnmiqrmhoeF6naVXdRI/DBAq/
-8MAAQDgsEgHIpHLJbDqf0Kh0Sq1ar9isdsvterdEIW8IJAfPv0XOEalZZjJYwcWq2++i0Fwu
-m2HcbWs5PWoMgm01F4obci90d5CRJS5yHBw0GX8UEpw6D4RnY0FGYUVfp6ipqqusra6vXKVk
-pqFBhYM5gYkYcJWOIZLBdnovMH2YbjcSOLc+hA2GyoB/cBmWe8DC2ivExpdw05vMn4W1o2Wi
-sOrr7O3u7/BVoujz5mrQhxNuF7zWHTCPtgmcNALEHmPg+NnohOvHs3yILPRjBBAYiYHaXBRD
-6CtnmiBP5mqZGhmvpMmTKFOqbBJGTEgg+D5GlFjt2pyAGIVR4lNNU7JxnhwCACH5BAAGAP8A
-LAAAAABiAgQAAgPtWLZ7/jDKSaU5rOhCuu9DKA5CKJRnGgjB6rJt3AIxDdzBbet87//AoHBI
-LBqPyKRyyWw6n9CodOrL8ay5rFa2YsG8qRNJXAoRRB8CZ6NgYCrweJxhUNjd8rz+QWevPwMg
-ImUoYWEtX1wzNFg2jVSQkZKTlJWWl5iZTo+OW4qIMYZhJKQjgWlqbHQXe61wFwt2bQ2utROw
-sX6oZqYoY4YvLp81WY47msjJysvMzc7PxjPEw2DVKWOmvKceaxurtuB8GLl1Dazhtn0bqGdn
-vb/AXsPE0dD29/j5+vvLVtHzJ7qIKpSNXSpVtNCly1AAACH5BAAGAP8ALAAAAABiAgQAAgPV
-eLq8diYWUwqxJJOx9/iDEIpCaZpBmQZs6wYAC8QwPd94ru987//AoHBILBqPyKRyyWw6n9Ao
-Elaj0l4tlYC1PZVCoHBnnLFUJpF0Y81uOyCTc0Wj4YRBJO9qu8LKqjaAUoOEhYaHiImKi4yN
-TzUxN1STflxZXiZgInccdGZyaQ9uo24PoXFmdHacJCOYKXx8lZRXM5COuLm6u7y9vr+KtJSz
-e1perpwZnRqfaGqk0GunZxd0yh54mq8qxFaRwODh4uPk5eaEVVbdxpibm3fWZXLOotEAADs=}
-
-show_image bmp 1-bit {
-Qk3OAQAAAAAAAD4AAAAoAAAAIgAAADIAAAABAAEAAAAAAJABAABtCwAAbQsAAAIAAAACAAAA
-MzPMAMwzMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAZmTKAAAAAABIRIwAAAAAAEZAigAAAAAAQECIAAAAAAAAAAgAAAAAAAAEAA
-AAAAAAABQAAAAAAAAAPAAAAAAAAAB+AAAAAAAAAC4AAAAAAAAALgAAAAAAAAAsAAAAAAAAAC
-wAAAAAAAAALgAAAAAAAABuAAAAAAAAAG4AAAAAAAAAbgAAAAAAAABuAAAAAAAAAG4AAAAAAA
-AAfgAAAAAAAAA+AAAAAAAAADcAAAAAAAAAPwAAAAAAAAA/AAAAAAAAAD+AAAAAAAAAP4AAAA
-AAAAA/gAAAAAAAAD4AAAAAAAAAHgAAAAAAAAAfAAAAAAAAAA+AAAAAAAAAB8AAAAAAAAADgA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}
-
-show_image bmp 4-bit {
-Qk1aBAAAAAAAAHIAAAAoAAAAIgAAADIAAAABAAQAAAAAAOgDAABtCwAAbQsAAA8AAAAPAAAA
-////AAD//wDMzP8AmZn/AGaZ/wAzM8wAmZnMAGaZzAAzZswAzMyZAJmZmQDMZjMAZjNmADMz
-ZgBmMzMABWMgAAAAAAAAAAAAAAAAAAAAAAAFVVVVVVVVVVVVVVVVVVVVUAAAAAVVVVVVVVVV
-VVVVVVVVVVVQAAAABVVVVVVVVVVVVVVVVVVVVVAAAAAFVVVVVVVVVVVVVVVVVVVVUAAAAAVV
-VVVVVVVVVVVVVVVVVVWAAAAABVVVVVVVVVVVVVVVVVVVVVAAAAAFVVBVU3VSVVNVB1UFBVVV
-UAAAAAVVUFU1VVNVVVUFVQBVVVVgAAAABVVQVVUFU1VVVQVVBVVVVTAAAAAIVVBVVVVTVXVV
-BVUFVVVVMAAAAAVVVVVVVVFVFVVVVQVVVVUgAAAABVVVVVVVVVUFVVVVVVVVVSAAAAAHVVVV
-VVVVW5tVVVVVVVVVAAAAAAZVVVVVVVW8u2VVVVVVVVUAAAAAA1VVVVVVW7W7tVVVVVVVVQAA
-AAADVVVVVVWCtbuzVVVVVVVVAAAAAANVVVVVVVW1vrJVVVVVVVUAAAAAAlVVVVVVWLW7UFVV
-VVVVVQAAAAACVVVVVVVatbtVVVVVVVVVAAAAAABVVVVVVVq3u8NVVVVVVVUAAAAAAFVVVVVV
-XrS74VVVVVVVVQAAAAAAVVVVVVWLtbuyVVVVVVVVAAAAAABVVVVVVUu1u7BVVVVVVVUAAAAA
-AFVVVVVVO7W7sFVVVVVVVQAAAAAAVVVVVVUbtbu6VVVVVVVVAAAAAABVVVVVVSu9u1VVVVVV
-VVUAAAAAAFVVVVVVJb67tVVVVVVVVQAAAAAAVVVVVVVVu6u7VVVVVVVVAAAAAABVVVVVVVW7
-u7slVVVVVVUAAAAAAFVVVVVVVbu7u1VVVVVVVQAAAAACVVVVVVVVu7u7wlRVVVVVAAAAAAJV
-VVVVVVW7u7uwV1VVVVUAAAAAA1VVVVVVVbu7u7BVhVVVVSAAAAADVVVVVYVVu7vFAFUVVVVV
-MAAAAAZVVVVVhVUbu7VVVRVXVVVgAAAAB1VVVVVVVVu7u1VVFVFVVVAAAAAFVVVVVVhVVLu7
-xVVVVVVVgAAAAAVVVVVVUVVVK7u1VVVVVVVQAAAACFVVVVhRVVVQq7VVVVVVVVAAAAAFVVVV
-VFV1VVUgBVVVVVVVUAAAAAVVVVVUVRVVVVVVVVVVVVVQAAAABVVVVViFUVVVVVVVVVVVVVAA
-AAAFVVVVVRVUFVVVVVVVVVVVUAAAAAVVVVVVVVVVVVVVVVVVVVVQAAAABVVVVVVVVVVVVVVV
-VVVVVVIAAAAFVVVVVVVVVVVVVVVVVVVVUQAAAAVVVVVVVVVVVVVVVTdVVVVWAAAAAAAhNnWF
-VVVVVVcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==}
-
-if 0 {
-show_image bmp 4-bit-RLE {
-Qk1sAwAAAAAAAHYAAAAoAAAAIgAAADIAAAABAAQAAgAAAPYCAAAAAAAAAAAAABAAAAAQAAAA
-////AMzM/wAA//8AmZn/AJmZzABmmcwAMzPMADNmzABmmf8AmZmZAMxmMwBmM2YAZjMzADMz
-ZgDMzJkAAAAAAAAGBkMQABwAAAACBh5mAmAAAAIGHmYCYAAAAgYeZgJgAAACBh5mAmAAAAIG
-HmYCcAAAAgYeZgJgAAAAIgZmYGZjVmFmY2YFZgYGZmZgAAAAACIGZmBmNmZjZmZmBmYAZmZm
-QAAAAAAiBmZgZmYGY2ZmZgZmBmZmZjAAAAAAIgdmYGZmZmNmVmYGZgZmZmYwAAAAAgYKZgAW
-YmYmZmZmBmZmZhAAAAACBg5mAgYOZgIQAAACBQxmAARq6g5mAgAAAAIEDGYABquqRgAMZgIA
-AAACAwpmAAhqpqqmDGYCAAAAAgMKZgAIcaaqowxmAgAAAAIDDGYABqasoQAMZgIAAAACAQpm
-AAhnpqpgDGYCAAAAAgEKZgAGaaaqAA5mAgAAAAIACmYACGmlqrMMZgIAAAACAApmAAhsqKrC
-DGYCAAAAAgAKZgAIeqaqoQxmAgAAAAIACmYACIqmqqAMZgIAAAACAApmAAg6pqqgDGYCAAAA
-AgAKZgAIKqaqqQxmAgAAAAIACmYABhqtqgAOZgIAAAACAApmAAgWrKqmDGYCAAAAAgAMZgAG
-qpqqAAxmAgAAAAIADGYACKqqqhYKZgIAAAACAAxmAAaqqqoADGYCAAAAAgEMZgAKqqqqsWgA
-CGYCAAAAAgEMZgAKqqqqoGUACGYCAAAAAgMMZgAUqqqqoGZ2ZmZmEAAAAgMIZgAYdmaqqrYA
-ZiZmZmYwAAACBAhmABh2ZiqqpmZmJmVmZkAAAAIFDGYAFGqqqmZmJmJmZmAAAAIGCGYADGdm
-aKqqtgpmAnAAAAIGCGYADGJmZhqqpgpmAmAAAAAWB2ZmZmdiZmZgmqYACmYCYAAAABYGZmZm
-aGZWZmYQBgAKZgJgAAAADgZmZmZoZiYAEmYCYAAAAA4GZmZmZ3ZiABJmAmAAAAIGCGYABiZo
-JgAQZgJgAAACBh5mAmAAAAIGHmYCYQAAAgYeZgJiAAACBhZmAAo1ZmZmZAAAAAAMAAASNFZ2
-CGYCZQwAAAAiAAAB}
-}
-
-show_image bmp 8-bit {
-Qk0CCAAAAAAAAPoAAAAoAAAAIgAAADIAAAABAAgAAAAAAAgHAABtCwAAbQsAADEAAAAxAAAA
-////AMz//wAA//8AzMz/AJnM/wAAzP8AmZn/AGaZ/wAAmf8AZmb/ADNm/wAzM/8A/8zMAMzM
-zACZmcwAZpnMAACZzABmZswAM2bMAABmzAAzM8wAADPMAAAAzAD/zJkAzMyZAMyZmQCZmZkA
-ZmaZAGYzmQAzM5kAzJlmAJlmZgBmZmYAZjNmADMzZgDMmTMAmWYzAJkzMwBmMzMAmWYAAJkz
-AAAAAN0A7u7uAN3d3QC7u7sAqqqqAIiIiAB3d3cAVVVVAAARDgYDKgAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAVFRUVFRUVFRUVFBQUFBQUFRUVFRUVFRUVFRUVFRUVFQAAAAAV
-FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFQAAAAAVFRUVFRUVFRUVFRUVFRUVFRUV
-FRUVFRUVFRUVFRUVFAAAAAAVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFAAAAAAV
-FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVEgAAAAAVFRUVFhUVFRYVFRUWFRUVERUV
-FhUVFRYVFhUVFRUVEQAAAAAUFRUWABEVFQYPFhUDERUWBhUVKg8VFAAUABQVFRUVEQAAAAAU
-FRUWABYVBhQWFRUGFBUWERUWABYVFgAAFRUVFRUVDgAAAAAUFRUVABUVFBEAFhUGFBUUFRUV
-ABUVFgARFRUVFRUVBgAAAAASFRUWABUVFRUVFRUGFBUPFhUWABYVFgAVFBUVFRUVBgAAAAAR
-FRUVFhUVFRUVFRUEFBUEFhUVFhUVFQAWFRUVFRUVAwAAAAARFRUVFRUVFRUVFRUVFRUrHRUV
-FRUVFRUVFRUVFRUVAwAAAAAPFRUVFRUVFRUVFRUVFCQYKBUVFRUVFRUVFRUVFRUVKgAAAAAO
-FRUVFRUVFRUVFRUUJyEeKA4VFRUVFRUVFRUVFRUVAAAAAAAGFRUVFRUVFRUVFRYeKB0kKCQU
-FRUVFRUVFRUVFRUVAAAAAAAGFRUVFRUVFRUVFRIDKBQnKCgGFRUVFRUVFRUVFRUVAAAAAAAG
-FRUVFRUVFRUVFRUVJxEnJigDFRUVFRUVFRUVFRUVAAAAAAADFRUVFRUVFRUVFRUSKBEnKAkq
-FRUVFRUVFRUVFRUVAAAAAAADFRUVFRUVFRUVFRUuJxEoKBEWFRUVFRUVFRUVFRUVAAAAAAAr
-FRUVFRUVFRUVFRYvKA8oKCEGFRUVFRUVFRUVFRUVAAAAAAAqFRUVFRUVFRUVFRQmKAcoKCYE
-FRUVFRUVFRUVFRUVAAAAAAAAFRUVFRUVFRUVFRIoJwkoKCgDFRUVFRUVFRUVFRUVAAAAAAAA
-FRUVFRUVFRUVFQcoJxEnKCgBFRUVFRUVFRUVFRUUAAAAAAAAFRUVFRUVFRUVFQYoKBQnKCgq
-FhUVFRUVFRUVFRUUAAAAAAAAFRUVFRUVFRUVFQQoKBQkKCgsFhUVFRUVFRUVFRUUAAAAAAAA
-FRUVFRUVFRUVFQMkKCIjKB0RFRUVFRUVFRUVFRUUAAAAAAAAFRUVFRUVFRUVFQMUKCYeKCgV
-FRUVFRUVFRUVFRUVAAAAAAAAFRUVFRUVFRUVFRUVKCgaKCgnFRUVFRUVFRUVFRUVAAAAAAAA
-FRUVFRUVFRUVFRUUKCgkKCgoAxYVFRUVFRUVFRUVAAAAAAArFRUVFRUVFRUVFRURKCgoKCgo
-ERQVFRUVFRUVFRUVAAAAAAADFRUVFRUVFRUVFRURKCgoKCgoIQMWCBUVFRUVFRUVAAAAAAAD
-FRUVFRUVFRUVFRURKCgoKCgoKAAWEBYVFRUVFRUVKgAAAAAGFRUVFRUVFRUVFRUUJygoKCgo
-KAAWFRMVFRUVFRUVAwAAAAAGFRUVFRUVFRUTFhUWHigoKCEUKgAWFgIVFRUVFRUVBgAAAAAO
-FRUVFRUVFRUTFRUVBCgoKCgUFRYVFgIWFRAWFRUVDgAAAAAPFRUVFRUVFRUVFRUVFR4oKCgo
-FRUVFQIVFQUVFRUVEQAAAAARFRUVFRUVFRUVExUVFQckKCgoIRUVFRYVFRUVFRUVEgAAAAAR
-FRUVFRUVFRUWAhYVFRYDJygoKB0VFRUVFRUVFRUVFAAAAAASFRUVFRUVFRMVBRUVFRUWKhko
-KBQVFRUVFRUVFRUVFQAAAAAUFRUVFRUVFQgWFRAVFRUVFgMAKxYVFRUVFRUVFRUVFQAAAAAU
-FRUVFRUVFQgWFQIWFRUVFRUWFhUVFRUVFRUVFRUVFQAAAAAUFRUVFRUVFRMTFRUFFhUVFRUV
-FRUVFRUVFRUVFRUVFQAAAAAVFRUVFRUVFRYFFhUIAhYVFRUVFRUVFRUVFRUVFRUVFQAAAAAV
-FRUVFRUVFRUVFRUVFhUVFRUVFRUVFRUVFRUVFRUVFQAAAAAVFRUVFRUVFRUVFRUVFRUVFRUV
-FRUVFRUVFRUVFRUVFQMAAAAVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFQQAAAAV
-FRUVFRUVFRUVFRUVFRUVFRUVFRUVFAYPEREUFBQVFQ4AAAAAACoDBAYODxESFBQVFRUVFRUV
-FQ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==}
-
-if 0 {
-show_image bmp 8-bit-RLE {
-Qk22CAAAAAAAADYEAAAoAAAAIgAAADIAAAABAAgAAQAAAIAEAAAAAAAAAAAAAAABAAAAAQAA
-////AO7u7gDMzP8Amcz/AJmZ/wCZmcwAZpnMAGZmzAAzZswAMzPMAAAzzAAAAMwAAMz/AACZ
-/wAA//8AAGbMAACZzADd3d0AzJmZAJkzAACZZgAAMzOZAGaZ/wCZZjMAZjNmAMyZZgCZmZkA
-ZjMzADMzZgDMmTMAu7u7AMz//wBmZv8Ad3d3AIiIiADMzJkAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG
-AAcFBAIBHAAAAAEACgoGCRAKAQAAAAEAIAoBAAAAAQAfCgEJAQAAAAEAHwoBCQEAAAABAB8K
-AQgBAAAAAQAECgAWCwoKCgsKCgoLCgoKBwoKCwoKCgsKCwUKAQcBAAAAABwACQoKCwAHCgoE
-BgsKAgcKCwQKCgEGCgkACQAJBAoBBwEAAAAAGgAJCgoLAAsKBAkLCgoECQoLBwoLAAsKCwAA
-BgoBBQEAAAAAGgAJCgoKAAoKCQcACwoECQoJCgoKAAoKCwAHBgoBBAEAAAAABgAICgoLAAcK
-AA4ECQoGCwoLAAsKCwAKCQUKAQQBAAAAAAYABwoKCgsHCgANAwkKAwsKCgsKCgoACwAGCgEC
-AQAAAAEAAQcOCgERARUOCgECAQAAAAEAAQYMCgAECRcjEw4KAQEBAAAAAQABBQsKAAYJFBgZ
-EwUNCgEAAQAAAAEAAQQKCgAICxkTFRcTFwkMCgEAAQAAAAEAAQQKCgAICAITCRQTEwQMCgEA
-AQAAAAEAAQQMCgAGFAcUGxMCDAoBAAEAAAABAAECCwoABwgTBxQTIAEADAoBAAEAAAABAAEC
-CwoAByIUBxMTBwsADAoBAAEAAAABAAERCgoACAshEwYTExgEDAoBAAEAAAABAAEBCgoACAkb
-ExYTExsDDAoBAAEAAAABAAEACgoACAgTFCATExMCDAoBAAEAAAABAAEACgoACBYTFAcUExMf
-CwoAAwkAAAAAAAEAAQAKCgAJBBMTCRQTEwELAAoKAAMJAAAAAAABAAEACgoACQMTEwkXExMe
-CwAKCgADCQAAAAAAAQABAAoKAAgCFxMcHRMVBwsKAAMJAAAAAAABAAEACgoABwIJExsZExMA
-DQoBAAEAAAABAAEADAoABhMTGhMTFAwKAQABAAAAAQABAAsKAAkJExMXExMTAgsACgoBAAEA
-AAABAAERCwoBBwYTAQcBCQoKAQABAAAAAQABAgsKAQcGEwAEGAILDQgKAQABAAAAAQABAgsK
-AQcHEwAEAAsQCwcKAQEBAAAAAQABBAsKAQkBFAYTAAQACwoPBwoBAgEAAAABAAEECAoADw8L
-CgsZExMTGAkBAAsLDgAHCgEEAQAAAAEAAQUICgAFDwoKCgMABBMADwkKCwoLDgsKEAsKCgoF
-AAAAAAEAAQYNCgEZBBMECgAEDgoKDAQKAQcBAAAAAQABBwkKAA4PCgoKFhcTExMYCgoKCwcK
-AQgBAAAAAQABBwgKAAwLDgsKCgsCFBMTExUKCgEJAQAAAAEAAQgHCgADDwoMAAQKAAYLARIT
-EwkLCgEAAAABAAEJBwoABA0LChAECgAFCwIAEQsACwoBAAAAAQABCQcKAAUNCwoOCwAFCgEL
-AQsMCgEAAAABAAEJBwoABg8PCgoMCxIKAQAAAAEACAoABwsMCwoNDgsAEQoBAAAAAQANCgEL
-EgoBAAAAAQAgCgECAAABACAKAQMAAAEAFgoACwkEBgcHCQkJCgoFAAAAAA0AAAABAgMEBQYH
-CAkJAAgKAQYMAAAAIgAAAQ==}
-}
-
-show_image bmp 32-bit {
-Qk2GFAAAAAAAADYAAAAoAAAAIgAAADIAAAABABgAAAAAAFAUAABtCwAAbQsAAAAAAAAAAAAA
-////ZmbMmZnMmZn/zMz/7u7u////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////AAD///8A
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8wzM8wzM8wzM8wzM8wzM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///8AAP///wAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////ADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMMzPM////AAD///8AM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8z///8AAP///wAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzDNmzP///wAA////ADPMADPMADPMADPMAADMADPMADPM
-ADPMAADMADPMADPMADPMAADMADPMADPMADPMZmbMADPMADPMAADMADPMADPMADPMAADMADPM
-AADMADPMADPMADPMADPMADPMZmbM////AAD///8zM8wAM8wAM8wAAMz///9mZswAM8wAM8yZ
-mf9mmcwAAMwAM8zMzP9mZswAM8wAAMyZmf8AM8wAM8zu7u5mmcwAM8wzM8z///8zM8z///8z
-M8wAM8wAM8wAM8wAM8xmZsz///8AAP///zMzzAAzzAAzzAAAzP///wAAzAAzzJmZ/zMzzAAA
-zAAzzAAzzJmZ/zMzzAAzzAAAzGZmzAAzzAAAzP///wAAzAAzzAAAzP///////wAzzAAzzAAz
-zAAzzAAzzAAzzJmZzP///wAA////MzPMADPMADPMADPM////ADPMADPMMzPMZmbM////AADM
-ADPMmZn/MzPMADPMMzPMADPMADPMADPM////ADPMADPMAADM////ZmbMADPMADPMADPMADPM
-ADPMADPMmZn/////AAD///8zZswAM8wAM8wAAMz///8AM8wAM8wAM8wAM8wAM8wAM8wAM8yZ
-mf8zM8wAM8xmmcwAAMwAM8wAAMz///8AAMwAM8wAAMz///8AM8wzM8wAM8wAM8wAM8wAM8wA
-M8yZmf////8AAP///2ZmzAAzzAAzzAAzzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzJnM/zMz
-zAAzzJnM/wAAzAAzzAAzzAAAzAAzzAAzzAAzzP///wAAzAAzzAAzzAAzzAAzzAAzzAAzzMzM
-/////wAA////ZmbMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-3d3dMzOZADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/////
-AAD///9mmcwAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8yZZjPMzJmZ
-MwAAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8zu7u7///8AAP//
-/5mZzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJlmAGYzZsyZZpkzAJmZ
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////mZn/
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMAADMzJlmmTMAMzOZmWYzmTMAmWYzMzPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD///+Zmf8AM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzZszMzP+ZMwAzM8yZZgCZMwCZMwCZmf8AM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///5mZ/wAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzJlmAGZmzJlmAGYzM5kzAMzM/wAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////zMz/ADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMM2bMmTMAZmbMmWYAmTMAZmb/7u7uADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPM////////AAD////MzP8AM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8yIiIiZZgBmZsyZMwCZMwBmZswAAMwAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///93d3QAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAAzHd3d5kzAGaZzJkzAJkzAGYzZpmZ/wAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzP///////wAA////7u7uADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMMzPMZjMzmTMAZpn/mTMAmTMAZjMzmcz/ADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPM////////AAD///////8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wzZsyZMwCZZgBmZv+ZMwCZMwCZMwDMzP8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8z///////8AAP///////wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzGaZ
-/5kzAJlmAGZmzJlmAJkzAJkzAMz//wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zDMzzP///////wAA////////ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMmZn/mTMA
-mTMAMzPMmWYAmTMAmTMA7u7uAADMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMMzPM
-////////AAD///////8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZzP+ZMwCZMwAz
-M8yZZjOZMwCZMwC7u7sAAMwAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8z/////
-//8AAP///////wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzMzM/5lmM5kzADMzZsyZ
-M5kzADMzmWZmzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzP///////wAA
-////////ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/MzPMmTMAZjMzzJlmmTMA
-mTMAADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD/////
-//8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZMwCZMwCZmZmZMwCZMwCZ
-ZgAAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///////wAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJkzAJkzAJlmM5kzAJkzAJkzAMzM
-/wAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////3d3dADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMZmbMmTMAmTMAmTMAmTMAmTMAmTMAZmbMMzPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD////MzP8AM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8xmZsyZMwCZMwCZMwCZMwCZMwCZMwBmM2bMzP8AAMwA
-mf8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///8zM/wAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzGZmzJkzAJkzAJkzAJkzAJkzAJkzAJkzAP///wAAzACZzAAA
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzO7u7v///wAA////mZn/ADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMMzPMmWYAmTMAmTMAmTMAmTMAmTMAmTMA////AADMADPMAGbMADPM
-ADPMADPMADPMADPMADPMADPMzMz/////AAD///+Zmf8AM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAZswAAMwAM8wAAMzMmWaZMwCZMwCZMwBmM2YzM8zu7u7///8AAMwAAMwA//8AM8wAM8wA
-M8wAM8wAM8wAM8wAM8yZmf////8AAP///5mZzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzABm
-zAAzzAAzzAAzzJnM/5kzAJkzAJkzAJkzADMzzAAzzAAAzAAzzAAAzAD//wAAzAAzzACZzAAA
-zAAzzAAzzAAzzJmZzP///wAA////ZpnMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMzJlmmTMAmTMAmTMAmTMAADPMADPMADPMADPMAP//ADPMADPMAMz/ADPMADPM
-ADPMADPMZmbM////AAD///9mZswAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAZswAM8wA
-M8wAM8xmmf+ZZjOZMwCZMwCZMwBmM2YAM8wAM8wAM8wAAMwAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wzZsz///8AAP///2ZmzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAAzAD//wAAzAAzzAAz
-zAAAzMzM/5lmAJkzAJkzAJkzADMzmQAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMz
-zP///wAA////M2bMADPMADPMADPMADPMADPMADPMADPMAGbMADPMAMz/ADPMADPMADPMADPM
-AADM7u7uzJmZmTMAmTMAMzPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////
-AAD///8zM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAmf8AAMwAM8wAmcwAM8wAM8wAM8wAM8wA
-AMzMzP/////d3d0AAMwAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///8AAP//
-/zMzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzACZ/wAAzAAzzAD//wAAzAAzzAAzzAAzzAAzzAAz
-zAAAzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////MzPM
-ADPMADPMADPMADPMADPMADPMADPMAGbMAGbMADPMADPMAMz/AADMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////AAD///8AM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAAMwAzP8AAMwAM8wAmf8A//8AAMwAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///8AAP///wAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////ADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/AAD///8AM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZzP8AAP///wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJmZ/2aZzGZm
-zGZmzDMzzDMzzDMzzAAzzAAzzJmZzAAA////////////7u7uzMz/mcz/mZn/mZnMZpnMZmbM
-M2bMMzPMMzPMADPMADPMADPMADPMADPMADPMADPMADPMZpnM////////////////////////
-////////////////////////AAD/////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-//////////////////8AAA==}
-
-show_image gif gif87a {
-R0lGODdhQAAoAPcAAAAAADgoOHBgYJiIkIB4iJCAiIB4gGBIUGhggKiYmLCYoLiooHBocMCA
-eJBocLCYmMCooKiQkKCAgGBASIiAiGhYeLiQiIhoaJhwcJh4gMCYkMCgoMCoqKiQiEBAWEg4
-QMiwoMioqMComLCIiFhAWIBgaJhweHBgcLiQkIiAgDg4UIhwgHhgYJh4cMiooFBQcGBYeJiA
-iIBwgIh4iKCAiKB4eHhYYGhIWKiIiEhAWFBIYEhAaEhIaHBYcHBgeFBQeHBogHBQYHBQWGBA
-UFhQaGBYaFhYeKCIkLCQmHhYaGBIWLCYiFBAYEhAYFhQYFBIaFhYcKCIiKCQkKiIkLCIgHBQ
-aIhwcJiAeIBgcJBwcLCQiKiAeKB4gHhwgNCwqMiwqIBoeHBYaJh4eMCYmJBweGhYYNC4qEg4
-UEA4WGBQWEBAYFBQaHBoeFhQcGhgeGhYcMiwsJB4cGBIYNjIwEAwSMCgmHhocFBAWNDAuNDI
-uIBweGBYcHhoeDgwQGhgaKCIgNjQuKiAgNjIuKiIgKCAeKCQiEhIWFBIUGBQaNC4sGBQcGBY
-YMi4sGhYWFhIYFhIaFhQWHhoaLCQkDg4SHBgaJB4gJB4eLiYmLiomGhYaEhIYFhYaIh4gHho
-gGhgcIBoaGBIaHhgcNDAsFBAUGhQYLigoLioqJiIgGhQaFA4SFhIWHhweFBIWJiAgIh4eFhI
-UHBYYIhweEg4WLiYkDg4WGBQYEA4SEA4UMCwqIhocHhgaJB4iJCAgFhASEBAUEhAUIBocFhA
-UKCQmHhgeEgwSNjQwEg4SLCgmDgwUGhQWLCgoEAwUFBASLigmEAwQGhIUFg4SIhoeEgwQKiY
-kFA4UDgwSJiIiIBwcKiQmLCooLCYkDgoQP//////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-/////////////////////////////////ywAAAAAQAAoAAAI/gABCBxIsKDBggEEDBhAoICB
-AwcjSpxIMSKCBAoWIGDQoIGDBxAURJBAoKLJkwcnUKgQoYEFlxcwdOyYoYGGDRw6eEDJc+IH
-CSBCiHg5YiaJEjM7mjgBAkUKAip6Sh24YqYGmUkbYGDRwoWGlxocvIABI4aMGVN70qiRNSkL
-Gzda4BhhIoeOHTx6+PjxwwcCIGlPouiI4WUDFkFYCLlhYwiLBkU73iBShAgRAkaMHCGAIDBF
-JBpmXkiiZMiQCagzLEFRgi0GDUyaONHx5MkLKFFCSOns+eCUBlRKVIErxIYVG1ewsMiixYSW
-LVxQkIDRpDqRJF1gVPDyhQDg3gSB/mQAwyKMmBJjpoAhU6bKCjMgMGxZAuIMmjRq0KhpsmbN
-EjZtuHEEAgQ4Ad5ACLxRQhkZwBHHGHKMAcccdFxhBgpU1FGDHUzc0QESduDhxRx56DEHHnvs
-4R0ffRzYhREwYOHHH4BUEQgZYYlgoSBfjCHIBh0MAoEdAxBSiCGHIJLIHHCYwEEFQHRhx4Ew
-LLCHIm4sIggjc9RhgQhzgEAIIGSEAAIgjShhwhwN4MGEI4/sAIkjSEQiCRJYuAHEJL0RwMge
-ejzBBiV6VGKJFpcMskUcFyQygoiEbAABJn9kogkaa+RgwCZEMEEEBlNw4gMbiPQ2QyeefAKK
-GpT0cAIk/jjEgQIKggAiiAMgUAFZIkiEIkokozyigyakLFLBGzb8IcUDPXjSGxArlGJKKKcg
-sQAqdojAlQMaCDLGHIlk8EkqiFhQBxJL5BAGE0yo4gQaTBTAQAYc2NGDZ4UAYcoOhfBxwiql
-nFGGDQ3UwMIFGsyBAgs19MBKDg0IQUoroqCRgweO5OCKJjo4osEYBXjySmAE/JBCDHBMUUkT
-T6AxiktgvXTDDbDEUoEsF8ySQxl8LJEGLTugUUQtllBQyyqW8DFyWggY8UYoHPBxxh1O0PDA
-GA0g1ZEQQphQwhus2GJDEGh4cAstbjSBBhF7aEJEEzwYQUQnaQSWHQ+o4BIG/i5gPFIKHl8k
-ZYENGOSiixysqHHGLYbE4IQTt1TQhA6o8KDJGjy8YJkiJPOlCAw7OPKEB7LccYsQoUFWxwSq
-2EFJETo8ogoaThSRwy2y4KEGBaDwUIQfu1DiwyOBNc3DGrzI0cYdnNyRQx+vuCRIAyD0wokS
-aehgSw60+GIILbSoYMstpvwywxM88PAEETwQQTIMCOwBBjAdfMFIFBcEQ4IIDdTaAjAJgMQd
-UnGGJJTtdpMI3yRUAAEP4AUIT9DECRxhN2EoIAZ7IAUkAhECDgwDDLYgxgREgQk8FMNWcxAF
-BwjRhztEQRWtoIQdbHGGHOCBFmqAgRr2kIm6pWUC/p3wwRFAMYM/6IIUR0gAE+Rwh2DIwRgo
-wEMe5jAHQQhCFHFoBAAycYxXxMER27MBMtTACtkU4QyeUYACStGEO8QADA/wRAAEIoMsiOEK
-NxACCEAgiDwIAg+l+EQyAnCKDljAFLbghTHKp4Yi9IBznlEGBxLhiGUsgQOM+EQWAPABKkBC
-DBEIRC/iIApbCQICgxhCMERAiBZYwRLMmIAxFgAK7r3gCb1hAwXwYIUogKIMQSBEHprhDCVc
-4BNVnAMgABEm+hTgGYcoAzQWIAIsTOABaSBEFNIAiSfIAjwIYEQIZIGFMIAhDW/IAy6igYNE
-fEEUiWDEJcRgjBsEgRTM/pDDH5jRAUbgwhQJcIUkaAAEWvziQAjgQCnukIBW6KEWVsDDLFhA
-hQuEwAUjAMEsZnGBPwhBAtI4AAMaEYEOfAIAyjjGNOKgByLM8UADUAYnEmCJLwQBB3jAhRYG
-gTAN4CALWajDEWBxAV1MIBIMcIItjCEQSEShEqoYBTUOJBBbFACAqWjGBl5BhS+gQAs4mEYH
-COHPXmCBEBMYxjQC0IhbVEMglEgDKX5xBgpSVSAEqAAnTtGMB4CBEApAAS6yMIhmlMISlmjG
-IKxxjFnc4AgCsIMqXMEJXujhF7eABFPvKhAEsMENqliAFHpBCRvUAQKm4IAVxBCFBSijFA8Y
-2MQAjDENUrjCClaohB2KAAlWcJYgCLjGABKAjVYsIBsJuEQEmoGJbJjiuNpIQDY4UYAC8EEP
-kegEA9zwBk38tiAIMEB0swGBbGDjGM2QhDIeMItsONe9MrWGMKxhXU8Q4aDfLcgkCpCCCCRA
-G0hQQAKU4d4FGDgbyiBuBAZQAArIAAZ7yEF+IwIER8wAGxherwKOcQllTGMaSJBCBGLAi1Os
-gBJ2nbBEoFCAAUQhCtiIQASEIeMB0IAG1rAsH5ywDRWbJACdmEFDdlGAGMyAxF1gAwzuQNWA
-AAA7}
-
-show_image gif gif89a {
-R0lGODlhQAAoAPcAAMnJyTgoOHBgYJiIkIB4iJCAiIB4gGBIUGhggKiYmLCYoLiooHBocMCA
-eJBocLCYmMCooKiQkKCAgGBASIiAiGhYeLiQiIhoaJhwcJh4gMCYkMCgoMCoqKiQiEBAWEg4
-QMiwoMioqMComLCIiFhAWIBgaJhweHBgcLiQkIiAgDg4UIhwgHhgYJh4cMiooFBQcGBYeJiA
-iIBwgIh4iKCAiKB4eHhYYGhIWKiIiEhAWFBIYEhAaEhIaHBYcHBgeFBQeHBogHBQYHBQWGBA
-UFhQaGBYaFhYeKCIkLCQmHhYaGBIWLCYiFBAYEhAYFhQYFBIaFhYcKCIiKCQkKiIkLCIgHBQ
-aIhwcJiAeIBgcJBwcLCQiKiAeKB4gHhwgNCwqMiwqIBoeHBYaJh4eMCYmJBweGhYYNC4qEg4
-UEA4WGBQWEBAYFBQaHBoeFhQcGhgeGhYcMiwsJB4cGBIYNjIwEAwSMCgmHhocFBAWNDAuNDI
-uIBweGBYcHhoeDgwQGhgaKCIgNjQuKiAgNjIuKiIgKCAeKCQiEhIWFBIUGBQaNC4sGBQcGBY
-YMi4sGhYWFhIYFhIaFhQWHhoaLCQkDg4SHBgaJB4gJB4eLiYmLiomGhYaEhIYFhYaIh4gHho
-gGhgcIBoaGBIaHhgcNDAsFBAUGhQYLigoLioqJiIgGhQaFA4SFhIWHhweFBIWJiAgIh4eFhI
-UHBYYIhweEg4WLiYkDg4WGBQYEA4SEA4UMCwqIhocHhgaJB4iJCAgFhASEBAUEhAUIBocFhA
-UKCQmHhgeEgwSNjQwEg4SLCgmDgwUGhQWLCgoEAwUFBASLigmEAwQGhIUFg4SIhoeEgwQKiY
-kFA4UDgwSJiIiIBwcKiQmLCooLCYkDgoQP//////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-/////////////////////////////////yH5BAEAAAAALAAAAABAACgAAAj+AAEIHEiwoMGC
-AQQMGECggIEDByNKnEgxIoIEChYgYNCggYMHEBREkECgosmTBydQqBChgQWXFzB07JihgYYN
-HDp4QMlz4gcJIEKIeDliJokSMzuaOAECRQoCKnpKHbhipgaZSRtgYNHChYaXGhy8gAEjhowZ
-U3vSqJE1KQsbN1rgGGEih44dPHr4+PHDBwIgaU+i6IjhZQMWQVgIuWFjCIsGRTveIFKECBEC
-RowcIYAgMEUkGmZeSKJkyJAJqDMsQVGCLQYNTJo40fHkyQsoUUJI6ez54JQGVEpUgSvEhhUb
-V7CwyKLFhJYtXFCQgNGkOpEkXWBU8PKFAODeBIH+ZADDIoyYEmOmgCFTpsoKMyAwbFkC4gya
-NGrQqGmyZs0SNm24cQQCBDgB3kAIvFFCGRnAEccYcowBxxx0XGEGClTUUYMdTNzRARJ24OHF
-HHnoMQcee+zhHR99HNiFETBg4ccfgFQRCBlhiWChIF+MIcgGHQwCgR0DEFKIIYcgksgccJjA
-QQVAdGHHgTAssIcibiwiCCNz1GGBCHOAQAggZIQAAiCNKGHCHA3gwYQjj+wAiSNIRCIJEli4
-AcQkvRHAyB56PMEGJXpUYokWlwyyRRwXJDKCiIRsAAEmf2SiCRpr5GDAJkQwQQQGU3DiAxuI
-9DZDJ558AooalPRwAiT+OMSBAgqCACKIAyBQAVkiSIQiSiSjPKKDJqQsUsEbNvwhxQM9eNIb
-ECuUYkoopyCxACp2iMCVAxoIMsYciWTwSSqIWFAHEkvkEAYTTKjiBBpMFMBABhzY0YNnhQBh
-yg6F8HHCKqWcUYYNDdTAwgUazIECCzX0wEoODQhBSiuioJGDB47k4IomOjiiwRgFePJKYAT8
-kEIMcExRSRNPoDGKS2C9dMMNsMRSgSwXzJJDGXwskQYtO6BRRC2WUFDLKpbwMXJaCBjxRigc
-8HHGHU7Q8MAYDSDVkRBCmFDCG6zYYkMQaHhwCy1uNIEGEXtoQkQTPBhBRCdpBJYdD6jgEgb+
-LmA8UgoeXyRlgQ0Y5KKLHKyoccYthsTghBO3VNCEDqjwoMkaPLxgmSIk86UIDDs48oQHstxx
-ixChQVbHBKrYQUkROjyiChpOFJHDLbLgoQYFoPBQhB+7UOLDI4E1zcMavMjRxh2c3JFDH6+4
-JEgDIPTCiRJp6GBLDrT4YggttKhgyy2m/DLDEzzw8AQRPBBBMgwI7AEGMB18wUgUFwRDgggN
-1NoCMAmAxB1ScYYklO12kwjfJFQAAQ/gBQhP0MQJHGE3YSggBnsgBSQCEQIODAMMtiDGBESB
-CTwUw1ZzEAUHCNGHO0RBFa2ghB1scYYc4IEWaoCBGvaQibqlZQL+nfDBEUAxgz/oghRHSAAT
-5HCHYMjBGCjAQx7mMAdBCEIUcWgEADJxjFfEwRHbswEy1MAK2RThDJ5RgAJK0YQ7xAAMD/BE
-AAQigyyI4Qo3EAIIQCCIPAgCD6X4RDICcIoOWMAUtuCFMcqnhiL0gHOeUQYHEuGIZSyBA4z4
-RBYA8AEqQEIMEQhEL+IgClsJAgKDGEIwRECIFljBEsyYgDEWAAruveAJvWEDBfBghSiAogxB
-IEQemuEMJVzgE1WcAyAAESb6FOAZhygDNBYgAixM4AFpIEQU0gCJJ8gCPAhgRAhkgYUwgCEN
-b8gDLqKBg0R8QRSJYMQlxGCMGwSBFMz+kMMfmNEBRuDCFAlwhSRoAARa/OJACOBAKe6QgFbo
-oRZWwMMsWECFC4TABSMAwSxmcYE/CEEC0jgAAxoRgQ58AgDKOMY04qAHIszxQANQBicSYIkv
-BAEHeMCFFgaBMA3gIAtZqMMRYHEBXUwgEgxwgi2MIRBIRKESqhgFNQ4kEFsUAICpaMYGXkGF
-L6BACziYRgcI4c9eYIEQExjGNALQiFtUQyCUSAMpfnEGClJVIASoACdO0YwHgIEQCkABLrIw
-iGaUwhKWaMYgrHGMWdzgCAKwgypcwQle6OEXt4AEU+8qEASwwQ2qWIAUekEJG9QBAqbggBXE
-EIUFKKMUDxjYxACMMQ1SuMIKVqiEHYoACVZwliAIuMYAEoCNViwgGwm4RASagYlsmOK42khA
-NjhRgALwQQ+R6AQD3PAGTfy2IAgwQHSzAYFsYOMYzZCEMh4wi2w4170ytYYwrGFdTxDhoN8t
-yCQKkIIIJEAbSFBAApTh3gUYOBvKIG4EBlAACsgABnvIQX4jAgRHzAAbGF6vAo5xCWVMYxpI
-kEIEYsCLU6yAEnadsESgUIABRCEK2IhABIQh4wHQgAbWsCwfnLANFZskAJ2YQUN2UYAYzIDE
-XWADDO5A1YAAADs=}
-
-set teapot {",
-".. c #998074",
-"#. c #84aadc",
-"a. c #c47e55",
-"b. c #4c6ea0",
-"c. c #d48a64",
-"d. c #ecccbc",
-"e. c #8c6252",
-"f. c #b1a094",
-"g. c #714628",
-"h. c #af8a76",
-"i. c #2c5284",
-"j. c #98745f",
-"k. c #8f5124",
-"l. c #844614",
-"m. c #5074a6",
-"n. c #aeb2b9",
-"o. c #3e291c",
-"p. c #44689b",
-"q. c #4c2705",
-"r. c #1b2b43",
-"s. c #e1c8bb",
-"t. c #dd782d",
-"u. c #9c5824",
-"v. c #547aac",
-"w. c #906e5a",
-"x. c #545253",
-"y. c #e07e33",
-"z. c #bcaeac",
-"A. c #aeb6bc",
-"B. c #6f737b",
-"C. c #7e5942",
-"D. c #b55e1a",
-"E. c #7c5134",
-"F. c #8c7a70",
-"G. c #62524d",
-"H. c #bc8a6c",
-"I. c #936754",
-"J. c #6e6d75",
-"K. c #8cb0e2",
-"L. c #d4beb4",
-"M. c #2a201a",
-"N. c #c48664",
-"O. c #412105",
-"P. c #a95a19",
-"Q. c #747a7c",
-"R. c #2a2e33",
-"S. c #484c53",
-"T. c #8690a1",
-"U. c #6c524c",
-"V. c #505967",
-"W. c #040204",
-"X. c #8cb6e4",
-"Y. c #8f4912",
-"Z. c #846e5c",
-"0. c #244a7c",
-"1. c #dcc2b6",
-"2. c #33261b",
-"3. c #81736c",
-"4. c #3c3b46",
-"5. c #735f53",
-"6. c #545e69",
-"7. c #bc7c58",
-"8. c #4c2f1d",
-"9. c #a4806b",
-".# c #604c4c",
-"## c #d4916b",
-"a# c #5c80b2",
-"b# c #e3d3cd",
-"c# c #c8ad9a",
-"d# c #bf6c2e",
-"e# c #08121c",
-"f# c #9c5e34",
-"g# c #9298a1",
-"h# c #8b7f7c",
-"i# c #835f44",
-"j# c #a46e54",
-"k# c #474649",
-"l# c #a65d26",
-"m# c #be6420",
-"n# c #7c9ed2",
-"o# c #ac622c",
-"p# c #726e6c",
-"q# c #e1a684",
-"r# c #a48676",
-"s# c #54464c",
-"t# c #a0a4ac",
-"u# c #b37b5a",
-"v# c #947a70",
-"w# c #543d31",
-"x# c #743e12",
-"y# c #98bcee",
-"z# c #d49e7c",
-"A# c #64320c",
-"B# c #d4cac6",
-"C# c #2c3642",
-"D# c #6e686b",
-"E# c #5c463e",
-"F# c #7f7575",
-"G# c #bcb2b0",
-"H# c #979dac",
-"I# c #a47a61",
-"J# c #8c9094",
-"K# c #1c262c",
-"L# c #d3c3bc",
-"M# c #9cc2f4",
-"N# c #af7455",
-"O# c #fcad5f",
-"P# c #6486b8",
-"Q# c #d4742d",
-"R# c #6d4e3d",
-"S# c #242224",
-"T# c #3b444c",
-"U# c #181515",
-"V# c #6e4024",
-"W# c #749bcc",
-"X# c #afabac",
-"Y# c #7e6a64",
-"Z# c #343634",
-"0# c #e8ac8a",
-"1# c #343a44",
-"2# c #b18f7a",
-"3# c #dda07f",
-"4# c #6f380d",
-"5# c #2f5684",
-"6# c #a08d86",
-"7# c #5f6068",
-"8# c #625751",
-"9# c #16253b",
-".a c #94b6e9",
-"#a c #dfcec8",
-"aa c #3c6194",
-"ba c #ecdad3",
-"ca c #948a89",
-"da c #a4c8fa",
-"ea c #bcb6b8",
-"fa c #604432",
-"ga c #cc6d29",
-"ha c #949ea4",
-"ia c #413024",
-"ja c #a48a7a",
-"ka c #9a867d",
-"la c #1c1a1c",
-"ma c #342116",
-"na c #bc8364",
-"oa c #9c8674",
-"pa c #844e25",
-"qa c #3c4a5c",
-"ra c #582c0d",
-"sa c #c7835a",
-"ta c #613c24",
-"ua c #614b41",
-"va c #adaeb5",
-"wa c #805c4c",
-"xa c #0a0b0f",
-"ya c #c4b2ac",
-"za c #648abc",
-"Aa c #af846a",
-"Ba c #c68a69",
-"Ca c #483c39",
-"Da c #7f400d",
-"Ea c #646e74",
-"Fa c #a85515",
-"Ga c #042244",
-"Ha c #816759",
-"Ia c #95817c",
-"Ja c #9c9aa1",
-"Ka c #9c6b54",
-"La c #7e4924",
-"Ma c #0c1a2c",
-"Na c #5f595f",
-"Oa c #6f615e",
-"Pa c #474149",
-"Qa c #8c9aac",
-"Ra c #cbbeb8",
-"Sa c #806e68",
-"Ta c #82624e",
-"Ua c #949294",
-"Va c #b4652c",
-"Wa c #9c9ea4",
-"Xa c #72574c",
-"Ya c #2a303e",
-"Za c #bc9175",
-"0a c #9c7a64",
-"1a c #261a13",
-"2a c #aca6ac",
-"3a c #341a04",
-"4a c #593520",
-"5a c #d49878",
-"6a c #26282c",
-"7a c #475261",
-"8a c #3f3535",
-"9a c #63676f",
-".b c #a47255",
-"#b c #bc967c",
-"ab c #52433a",
-"bb c #80a4d6",
-"cb c #544c4c",
-"db c #bc723c",
-"eb c #645e54",
-"fb c #a4abb4",
-"gb c #c89070",
-"hb c #8c7469",
-"ib c #c7b8b3",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                            wawae.e.wa                                                          ",
-"                                                          .#j#N#7.a.db.#                                                        ",
-"                                                            8.g.x#C.o.                                                          ",
-"                                                  N#DaA#raY.Xa4aV#4aPas#q.W.W.6a                                                ",
-"                                            i#O.l.4.4.4.4.4.s#wa7.N#wawaXawawawaA#q.C.                                          ",
-"                                        3a3a4#wawawae.e.e.I.j#m#d#VaN#KaI.e.e.e.e.waDaO..#j#j#N#N#j#fa                          ",
-"                                        O.A#wae.e.I.e.I.I.Kal#m#m#D.u.KaKaKaKaI.e.I.e.Da3aXaE#C#W.o.C.                          ",
-"                                      w#e.k.I.I.Kaf#KaKaKaKal#m#m#D.l#j#Kaj#KaKaKaKaKaFai#u.    GaDaI.                          ",
-"                                      .#waKaI.KaKaj#j#j#j#j#VaD.m#FaVaj#j#j#j#j#j#j#KaKae.U.    9#o.Ka                          ",
-"                                      .#Xae.Kaj#j#N#N#N#N#N#j#N#j#N#N#N#N#N#dbdbN#N#N#I.waU.  e#M.taPa                          ",
-"                                    .#U.Xawae.Kaj#N#7.dbj#a.a.a.a.a.a.a.j#7.sa##naj#I.e.waXaU.Yama.#                            ",
-"                                    .#U.Xawae.I.Ka.bna3#0#3###sasaa.sac.##Ba7.u#N#Kaf#f#waXaU.4.s#Pa                            ",
-"      j#N#5aW.Y.u#j#R#            8a.#XaXae.e.I.KaN#naz#0#q#gb7.7.N#N#N#u#nau#N#N#Kaf#f#e.waU.LaU.                              ",
-"        4.Hahb.bI.j#KaY.          s#U.XaXawae.KaKaN#na3#0#3#gbna7.N#u#u#N#7.u#N#.bj#KaI.e.waXa.#                                ",
-"              G.2#e.KaI.E#        .#U.Xawae.P.Kaj#N#H.z#q#3#gb7.7.7.7.N#N#u#u#N#.bj#KaI.e.TaXaU.0.                              ",
-"                Ca.#e.j#Va  5#aa0.MaU.Xawak.d#I.j#I#N.5a3#5aBa7.dbN#N#dbN#N#u#I#j#KaKaI.e.waXaU.0.i.p.                          ",
-"                  abU.I.KapaaaaaxaGaU.C.wau.VaKaj#I#na5a5agbN.u#N#7.N#N#N#N#N#.bj#KaKaI.e.waXa.#R#m.m.m.p.                      ",
-"            zaW#0.0.s#waKam#0.0.e#GaU.C.k.l#I.KaKa.bnagbgbBa7.u#7.N#N#N#N#N#.bj#j#KaKaI.e.waXa.#.#b.m.m.i.i.0.                  ",
-"    5#aaW#W#n#aaaa0.U..#e.Kau.ta4aLak.k.u.o#e.KaKa.bu#H.H.nau#N#N#N#N#N#N#j#N#j#KaKaI.I.e.waXa.#fab.m.i.i.i.i.i.0.              ",
-"p.p.p.aan#W#0.0.0.0.p.uaU.KaKal#o#d#gal#o#o#e.I.Kaj#N#Aau#u#N#N#N#.bN#N#j#.bj#j#KaKaI.I.e.waXa.#E#m.m.v.m.i.i.m.n#bbn#          ",
-"p.p.n#n#n#p.0.0.0.0.0.xa.#waKaKagaQ#t.y.d#dbi#e.I.Ka.bN#I#N#N#N#N#.bN#N#j#N#j#KaKaI.f#e.waXaU.U.w#5#m.m.i.i.i.m.bbbbbbbbaa      ",
-"n#n#n#n#n#n#0.aaaap.aaaas#s#waKaj#na##O#dbl#wae.I.I.j.j#j#j#j#j#j#j#.bj#j#j#KaKaKaI.e.e.waXaE.Hai.m.m.i.i.i.i.p.p.bbb.b.p.p.aa  ",
-"p.bbn#bbp.p.p.p.p.p.aaaaaaua..#be.Kaj#j#u.XawaTae.I.KaKaKaKaj#j#j#j#j#KaKaKaKaKaI.I.i#waXawaR#uav.m.m.v.v.i.b.bbbbbbbbp.p.b.p.p.",
-"bbp.p.p.p.p.p.n#p.0.0.0.0.p.8#Oa2#ZaZaZak.XaXawae.e.e.I.KaKaKaj#KaKaKaKaI.w.I.I.I.e.waXa0aXa5.5#i.m.m.v.v.p.p.#.#.#.#.#.#.b.bb#.",
-"bbW#p.p.p.n#bbbbp.0.0.0.0.0.0.0.x.D#3.3.w.waU.wawae.e.e.e.f#I.I.I.I.I.I.I.f#e.e.wawaXae.w.ua4.5#5#i.7ai.b.b.b.p.b.#.#.#.p.b.b.#.",
-"p.bbp.bbbbp.p.p.p.0.0.6.p.p.p.0.0.0.0.9#R#wae.9.j.wawae.Tae.e.e.e.I.e.Tai#e.wawaw.Aaw.hbOa6aC#5#m.v.v.#.p.p.b.b.p.#.#.b.b.p.p.b.",
-"0.0.0.p.p.p.p.aa0.0.p.p.p.p.p.p.0.0.p.qaT#s#Z.0a..h.I#I#ZaZaI#gbI#.bH..b.bH.h.j.r#HaU.PaV.V.Na1#v.m.K.K.K.#.b.#.#.#.#.K.p.b.m.p.",
-"0.0.0.0.p.0.0.0.0.0.0.p.p.p.p.0.0.p.p.qaqaqa2.iaR#HaY#ja2#2#I#Za2#0a2#2#h.jaoaF.8#V.6aC#C#C#CaNab.bbbbK.#.b.b.b.#.K.K.#.#.#.X.#.",
-"b.b.p.p.p.0.i.0.0.0.0.p.0.0.0.i.0.0.qaqak#6aR.6a3aiawaY#OaOaOaD#Iah#D#OaF#cbPa6a6aW.V.6.1#C#7ap#b.b.b.b.b.b.b.b.b.K.K.#.b.b.b.b.",
-"bb#.#.#.#.b.b.i.0.p.p.p.0.b.b.0.0.0.qar.YaYaYaR.K#Z#E.xa1a2.S#.#x.x.S.R.laU#1#W.W.9a6.J#J#T.7av#K.K.K.K.b.b.m.m.b.m.K.b.p.m.b.b.",
-"#.#.#.#.#.#.K.#.#.#.#.#.#.b.b.b.#.p.qaqaYaR.YaR.Pa6ak#S#lalaW.W.xaW.W.W.W.U#U#ebT.hag#g#haT.7ac#K.K.K.K.K.K.b.b.#.K.K.K.K.m.b.b.",
-"#.#.#.b.b.b.b.#.#.bb#.#.#.b.K.bbK.#.T.T.J#R.YaS.S.x.ebebR.2.S#S#S#T#S#S#S.9a7aEaEafbhag#6.7aV.m.K.K.K.K.X.K.m.X.K.K..a.aX.K.b.m.",
-"b.b.p.b.p.b.p.K.K.K.b.b.b.b.#.#.#.#.T.T.J#UaJ#J#g#g#haWaWa7#9a2at#fbA.t#9a6.9aJ.EaEafbV.6.V.Nam.b.m..a.am.b.m.m.m.K.X.K..a.a.am.",
-"  p.b.p.p.b.p.K.b.b.p.b.b.b.b.K.#.K.7a7aV.9aWat#X#WahaH#ha6.t#n.n.n.n.fbfb9a9an.t#t#fbfb7aV.7#m.m.m..am.m.m.m.m.m.m..a.a.am.m.m.",
-"  b.p.b.#.#.#.#.#.b.b.b.b.b.b.K.Pax.V.7aNa7#7#t#vafbB.B.B.B.B.n.A.A.A.fbfb9aA.t#t#fbfbQaH#7#D#m.X..a.a.aX.v.v.v.v.m.m..am.v.m.m.",
-"    #.K.K.K.K.K.#.b.b.b.b.K.K.K.T.S.V.9aB.ebNaV.p#9a9aB.D#9a9aB.A.A.A.9aB.B.Eafbn.t#g#hat#X#m..ay#y#y#y#.ay#v.v.v..aX.y#.av.v.v.",
-"    #.K.K.#.K.K.K.K.K.K.K.K.K.QaT.V.7#Ea9af.f.2at#OaD#F#Q.J.9aEaB.Ea9a6.Ea9aEaV.H#H#t#2aD#J.v.m.y#y#y#y#X..ay#y#y#y#y#y#.ay#.av.",
-"      K.K.K.K.b.b.b.b.K.K.K.K.g#g#t#D#fbWag#c#X#2a2aeb7#D#Q.vaA.2at#p#9a6.V.7#7#9avaSaSaSav.m.v.v.y#.ay#X.v.v.v.v.y#y#y#y#y#y#y#",
-"      K.K.b.m.b.b.b.b.K.K.K.K.Ja7#7#6.2az.#ac#z.G#eaG#p#2a2a2at#t#t#t#7#9aD#J.SaL#RaRaF#v.v.v.v.v.v.y#m.v.v.a#a#v.v.M#M#M#y#y#  ",
-"        b.b.m.b.m.b.b.b.K.X.7#7#7#7#D#3.1.z.yac#yaibh#caB#L#eaz.z.z.z.z.F#h##ab##aL#ibibv.a#m.m.v.y#M#y#a#v.v.v.a#a#a#a#M#      ",
-"        p.b.m.b.b.m.b.b.m.b.7#9a9aSahb..m..ayayahbhbF.h#Ias.RaRaibibL.L#kab#bab#1.L.L.y#y#a#v.v.M#y#y#M#y#v.a#a#a#v.a#a#        ",
-"          b.m.b.b.X.K..aK.b.7#D#F#hbv#m.b.m.m.F.F.F.v#v#F.v#L.L.L.L#..ka6#h.s.1.L#1.y#M#y#daM#M#day#y#M#M#M#a#a#a#a#            ",
-"          p.b.X.X.X.X.X.X.X.9aD#6#..m..aX.y#m.m.F.v#v#v#....1.Ia....kakar#r#r#1.s.M#M#y#a#a#a#M#M#y#y#daM#dadada                ",
-"            .a.aX..aX..aX..aD#SaF..ay#y#.aX..am.m.........s.s.9.9.r#r#r#r#kakar#M#M#a#a#a#a#a#a#M#M#M#M#dadada                  ",
-"            K.X..a.a.a.a.aH#vab#1.y#X.X.y#y#y#y#v.v...s.d.d.d.s.r#r#h.jajajar#a#M#v.a#a#a#a#a#a#P#dadadaM#                      "\};
-}
-
-show_image xpm color "/* XPM */
-static char * teapot\[\] = \{
-\"64 48 204 2\",
-\"   c #145ec4$teapot"
-
-show_image xpm transparent "/* XPM */
-static char * teapot\[\] = \{
-\"64 48 204 2\",
-\"   s None c None$teapot"
-
-show_image xbm bitmap {
-#define flagup_width 48
-#define flagup_height 48
-static char flagup_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00,
-   0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00,
-   0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00,
-   0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00,
-   0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00,
-   0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00,
-   0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00,
-   0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00,
-   0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00,
-   0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00,
-   0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00,
-   0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00,
-   0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00,
-   0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00,
-   0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
-   0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a,
-   0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a,
-   0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a,
-   0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
-   0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
-   0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
-   0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a,
-   0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a,
-   0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-}
-
-show_image png color {
-iVBORw0KGgoAAAANSUhEUgAAAC4AAAAjCAIAAAETQp8oAAAIVklEQVR4nNVXPYgbSRb+xm7B
-K5CgC07QtaCDOvBCDeyAFAxIwQYdbKCBDeTgQBMqtOGCcTYOvXDBODjwHBzsBHcwExzMBAtW
-4GN7YQ1ScKAOBNPBLFcLHugGC7pgBf0WeuGC1vz6h7XZ4O5DIJp69dX3qr969Rp4A3erv69H
-YQn8aasDxh0Aw66JTtPU5ZIIhLsAvIZXw9rLJItfvd74vVzNepPx3Rh2DQAPwPFO3zqenaaO
-GcAdAAdRkuf50TQxyv8Q0gqh0ZWYNQDD0GRpHrbVJHFRYvtGE9H9nr7/dAwg8OkugLldmFaz
-1fDLtXKj1eytt76fv9JKKkkmaE5/yFbMD0IzDA2A3UEbQFsHH6bs7rsGvt0dnC9yu1heRTwZ
-dKPkHMDhTj9OXp0tXpelCBp0F8DXo/DLjp5ni+3uxou5fXT/c5Tl/HwxPcvO3dIDkOXFxGYA
-0tz+5/neNJooRSqVqi1DE3iXqyhJp2n+1dODooBjVpKKAm2t7gAIpCACgHUlD6IkXFfj2HaN
-YnBs3Ur2oK0BHO/030zqDgBmVpIAVPv924AI7cDvt3X16L0/usKzUcjAo4MIwKjftjb1SRAR
-g6/UVjje6T8bhXvDlZ/3Rt3Di/QOJ6fa9wEMu6arJJFwXGSOT6b2NsvEppPTNMnSZ6Owa4I0
-5Ulsn+8OAIABIh34WvuCKIotAN/Hg377293BDRZFBCDNmQABxNbN0vwwig93BrHNJnHS1TLL
-nE/U7xqfJBhp6m5rAdDTSkkaz6xWUitSvhCCRk9Pjnf6StHR1BYFGGwUSYLRgZKUZO4Gi1Ey
-shYAEQE4iJJwPSgKMLD1dEwQAI6myf2n469O4rZWSorxzD48iFAdxcsXEZ1aJfyJtbF1/bYO
-TaCV/ACD+PRrI//3MOzeOC+/yrvX4RM96Lcz50ah8Wm1EXfePwdAaIKvR/1RaKrHve0wSTMA
-RYHMrU7A26vTs2HY39Tj2AJAWdYEDqOkBPaGYbJ4XTKWS14syyRdnF33S1v7Twbdb3cHO/02
-gJP4FMVFCpKIiIFh15Agm7rM5Qykeb5a5pJlFJrT1B1ESdjWD/pmkmRK0ZNRtxpNUzfsmszl
-He0nNo2SbBzbyrWhCa4yapuWcywEqFZblmXLl2se/JpQ0h/HPypJZ855pbeh1d++m5vA37yn
-7in55+3eX17EZXmhRQkBIM/ZprkkAlAwj2d2Z9ADUDBCo9e1ZObK0NUsAno6uMpIXnhX+jSz
-WeZYK+kTJok9ffZA+qKtVV5wASYSBBARAbHNK8YVi80LBjsUbSUlyCcIwDEe7o/jxFa+cK5w
-edEzgZJUERWMauiCJXMdHez2e0+jxLq8ykJJGvXbjw8nWx2tCFGSHU+tUTItWCuSAiDW/jUt
-xxNLwMOjKCDSSkpJWVEUBZjZOpfmeWWvqc2Ysd0zVU49rR4eRVcsjpkgKmICigJ7J7GSlOYM
-4NHR1KZ5Fbm9P54kqSTR0XLromhcnSMGtCQGADqaxv22BiG68FXljgpPx/Etr1+dI1+AiHyi
-/SgGsN0zkogvRg+iBL8Gxzv9qlP4eFye8f8/mOBG87b2rrjfHMc7/cTlKKClJEJi87ZRW1+d
-XAZ8cNV9P9o6eDzojGN73RfPdwdpxvvjWeBLZrbSFQU62mfm63N/GymBTx2tQqOVpP1xEiUr
-u/fbOuxom7loZisjEVFeMDPGcWayj5XSb+vtnk7zQiv55GSyagcBAFW7l2SpL3Wlwye639OD
-rnHMB9GMIHySjlcbQQQi2NT5hIub6EJKtbG54ywviJAzJ9Z1dNA1KrZpynwysePYjmM7Co0v
-5eNBL0rS/atzTbkrtPI7WgEYdo0QSHN2jnPmwgFUZAygmNjs5mu5wg3b+oRHg24BuEoqMwP9
-ts6ZT2ZWCwJB+X7qeNDWmXM508ODVYnqmkAAu6P7+4djx4VPomeCtlbMvPVG79PVwVZXE4TR
-FCf545Mpbl3QXKL/WWtdSbtY4sJULSkWeWE+qb9IUikEL1n9rv7P6Q+b91SNsB1+/v08WXLZ
-8LyG8DbX1XfJebEsG1RrNuvlz7UFMzNMS36mpJLStOQ9JQXVXi+WX2xq55YP//GyWv12r/Dl
-5qcN8uz5AkAJnKZ506/XBVyBl/GP1bfd5sYn38/Ts9R58DqfNj/f3PhjGB6+mJIg5zhc18uC
-Pc9rCmop0fLrLxNb92oM1D14WP0AqIZYlgBwdqtBvY604CRnm7MAfCGUL2c26xrdM0oH0qVF
-1fjHNus9OuA8VUgPdwZEAFj7xMwMntnMpnnmOPBldR0QkZQkJVXI8sIE/uVX6u1dMcpvNRtl
-WTYEbbb8L3t/yF6X4/mZzYqax3WvweBwo5XY5e/qxMuyLPngu6Srm8uyXFcytouWlH+fzL1f
-vB/yZVPWWlK2pHDlUklyy7LRIM/zxFq5VoNjbjUbZVl7MbdvkcI/8eanzWWJhVvOX7lv/n02
-P89Vs9HAWp0aUlKNUfcECSzc8l7L9+u1+bn7JrZfbLSIoJpkAvnXf83P3dItueF5Rknlk1cT
-S8bPv/BPZck/lbJBql43SjouyxKVlLcU/mejkFEcRtYEghlEJASKAlIgL+CYcy62jE7ZEcgx
-XxZWE/ijsFP1G9cJCXgy7PpCAOACKedaSkEAsL1/Ffm2ElfAKGkCJyWBwcWqDhDRUbQqJI/6
-nTRxDEQzezkvydzjk2hvO7xeuAAw8Oho+paFbuItUqQkgACkqVOSSICIolliL+hHoUkd5znW
-FVl3o2Ax4+FB5BMB7yhkHyQFgGPurfs2ZRCc42tVFcPQnNr8/V2Qe1dBfS9ue2Vv2CUhiGia
-2Oczm7mPIf04/BfyDD1tMD0WfgAAAABJRU5ErkJggg==}
-
-show_image png grayscale {
-iVBORw0KGgoAAAANSUhEUgAAAC4AAAAjCAAAAAG5S1ejAAAEJElEQVR4nKWTXUwcZRiFH2YG
-ZpiBLsx2wW6ZpU1YC+3axWClf7ZKY5NVozHRxIYaL0xq1YuGeOFVRW40TXthk4aLxsT/xJjG
-+tdiGkUl1nQV6rYokuy2IFugy8/irp3dHXYGvFiwBdQ08Vx9+d73Oznfe84LAIjQNv+ELdBy
-aVqTRBSh/8p6aGMZWpDomBwwETg7020sL0NjG0XsTTT9GmlSdreji1xZ555bvzmyVvcNAI/s
-pRX/8lfi4uHoREIEnrnEKwNjcxUibdt+39PX6gwNTEkkB0l+3VPtdgclQI8fs0zd8gvoMkZX
-MBywY3B0Ox0FKoGcTvtKhQuQa5tBuvXmkHOCx4Y1xS7o6Qg29vFi6DvMe79paRjP5sIgAL/1
-jxwKJC4ewS72+kp7WfX4UQRgFUlBjA1/2R7t25DQdpbZiQJPU5V1xVMuqW+9ykc+X37WKJLC
-AmD8gkJX0HIOS3S3f+B3h48jAVNI0Viztbub4wCdC+rUf/3J7eEBOgr6l0Dbr4TUpffBl0Jw
-cARr5qYvL2wPM1d8bv65a3kzPTKKBHU7AuFT53eAS3FaSsdyynQcRGiNxXaVff9wfa+Of/rB
-T66OpgkmRNiYkkssj6CuDusJ6s4YDTUHTjsCuEiNauQu7MNqXJ8LekGoRwAVXNGkV+1/33Wn
-mVdERYx5EWDCttbJqpQ5NqCRSgV0UbE0BBjzP/XpBDn90Te3ll3q8aXXqGIVAvSInau8rrSV
-m5iaY9DaU6TUdyKAKVUhWh/qSU6Owmv9mv9wIQ+OxynqbpZ6IQ6cAgrzURXtc/ZoDnQtGWFH
-6z/OW/t/dhkARbfR2DGer5avbnyZZWleCv/+C13AkYmP3bkxqy73X+y6v9F9NgLNW8Sf7DJs
-yzI+X8ne3DK99r0YoDNSEUHbdb95RiozLWR5TM2ABP79fyRlc8gfiKZ7wuFQ5dOR01CU8vpp
-kZMp05St+UFrga4IQN3npMg7W2/8UCm5k9uT2TcgID7/rqkF/LnDANTvkNYNvlMIZn6L73re
-YfWMEdEynm8bSkIXs3Lppki21G3fsGpr3bU1yvS21InFHO8sjTMfryzNXIxbmyPXhPrm0Bkl
-fXdGKr/DfVl2ZEEQqJhl9O91SF+fFMtWR+8KeKdsogdSxe3ynCdnR0dn3IqmuFyKkqwxFtmN
-alutu2/qx3FRsZuGXFm7a8OsL+r5ikSFx53Vb5RJomBWO30L7WaDNTN8fthTrLrmZHnGVz58
-4Z4ST81nU3/Khl6SnbWy5ZVGxu5btOmQfa7GUmRLzZhmU0oyu8B4SOwEEJ/VsFJVCq/ftCm/
-xnDZOVC+gCd/dnqB+NsH1QzgnLzFxoX2CoGELiu9kxBKpo1JAOv4ygwvhsDcNC6lTgF7h25u
-g7mivaD9QKlyOZxcUVyJvwDv65E2xA9RYAAAAABJRU5ErkJggg==}
-
-show_image png "transparent color" {
-iVBORw0KGgoAAAANSUhEUgAAAC4AAAAjCAYAAAGcIAh/AAAIl0lEQVR4nOWYIXDjyNLHf7p6
-oMU0TIIDtcxhNhT0Mi9LoD+2y7JsF+6xhG3YBSYsYWt2gg6zWcS+gSM2w9RsPiDbiS/Z/e7u
-3b33ql5Xqcoujbp7unv+/+6B70i2//HLskn3G8f8xLJaO34COJ3WqX30+BgwIiCML7oYiKps
-Xcw+362pjDyp+Z6t/19Op3UC+AfA3fk8uahsHj1RFdgZv247QgjcPnRZXRV/3txBmtqmvecZ
-wGlTp94HmknFuou0nWNeW0SEdzPLu8tVBlAWkg4hnE9smtkSFyMAE1tx0z5y1rxh6zzDALcP
-3WE975s6nTbjlj8tJmn8qPwnAvh75NdPi9TUo5Wfnr/4spgeTN+cz5MtJF2u1kDO1JbpH/CU
-4AfnuTht0sfbNrNVxWJW03aOresz2KWwDwNr1wPgg+N/v12kh3ZNVQmVN1QTk5q6HBfvpTLC
-ow/8fHnNMEBUpTLCMIwh/QmgNDmyq7k3leG67bLmTcVq67JpXaEoWxefdryY2ARjVX0vMj8B
-6M4ccEjz3yoipElZpPnOQ+A4IL9Hvi6bpMDH6zYDWM4nyTlPITkigqKHtUdJvzufp6/LJl2c
-Ph3ci+U03TyL0836EVuMB+10WqdpZRDJiTrQR+X+wWWvKl87z/rR0/Wer8smTesyea+st45v
-nxajAR1jYMsiWVuQi9BuHQBFAe/nk/Trbu2R8mqXfx8UAXJg6yIbH7hpt9ycL9LW9ay3HVNr
-6PtIIcJ8WlOIAQXv4+thAZjZisoIq43DVgZbCVWRk+fC8vKeu/M5VSXcPrhsGEBR6kowArUt
-qYzQ9fGl8roytG7coux2MRZwyaiI7O3lKhNyYASNd5er7Of7bTaxFZXJWW0cH3bJPqrRr8sm
-tY+OKi9YO8fWxWw+sampS2xl/nxNF8LfjEz/qXI6fYkdf/iE/lYKkfR+PqGPkWVTp2IPZ7xS
-ij+Spi7TL8t5Wu6YBODirKHzI/AOA/Tx6fj/MPtfT5tEzqG0bCGpObHctB0K2cVpk1wMhKCo
-KlFBBFbbEQIOnk9skb4spunXT4t0Ph+57X77CMOzEBjZgRPZ6bROkgvOR/oYUMCHcFB8pHzZ
-1Dz6yHXb0Uws7+d1Wnc9VSV8WT6xmPeR02md+hg4sQWd87Rdn622Luv6mO3DB88S6nce5jm4
-PiIiLKY1nQ8Uec6ymaTrdpuZWpKPgQLBB8VFzeqySLYyByfPrlbHnlf5eKRDUJzfdVXAoMpq
-4zhfzHb/oaktb6xBVWnq8qAYQICZLY+Vm6cKwhTCxvX0UbGVoRBYd47Hr++TKXImtiIMyoAi
-kiOMWCTA1gX2xg7KXRhQlMjApDIYhEJG2I0KH65WbDvHvo5jHIhhYFaPSLg3MCiHNU/K+8iJ
-Lfk0n3HZdrgYDmGojLCcT/h8s+btiaUSaLs+u3tw1JXBD4qtBJMDotjiN57frR0CfLhtKUWw
-lcEYoR+GEW5VcTFmPoQDSz64PlOFs1kNjGU6sxUfbtvjOo+qmZAfrArjibu431KZsTIAPt4+
-ZM6HQ37OrlbZuvMYyTmxhrfPYPkIWxSwRnaeCbcP22w+sQnhwJPAgWn2crnavnrSj7ClyMek
-FCJcteMHZ7MaszuV+3XXbffHSePufJ72be1fKoXIfycT1WXxYuP/NBH9lXJ3Pk9dDDCANQYR
-6FxgUle8/fn+aO2/zPGJLdPnxQmrrXtRyN8+LZLvlavVhrIYsdaZyDDAiS1Q1Rf6/lbHy0LS
-ia1oaktlhKtVR9u5oyGzObG4PtJu3GEIEhHCoKjCattT93+h4/OJTWcziw8DtjJ8uV+zdfEo
-kvuZqes9hbEHpwuR9G5mWUxroirX7QYhpxBD1NHhcQPj43ykEFJUXgLiPpUhKn0YEIGgSudG
-/pjWFVvn8arcrx2rrctWWzc2WMbweTGj7Xy6OgJHIcQBWxWc2AoYp5w8H2eLGJWgyhABGRgD
-Ow62qj9up168LIT0cTFlAOK+KdNxOptPLEGV+43D5uNtS1UU+KgsJpY+RoIKH66fqGJalykH
-Pi3fcXWzIupAITmzumRiK1T1iFqey9SW6e3UIuTUVth2gc/3D8f8tpeoZAKc7JsQfRopVZUY
-BuZvSjY+oAq+j1SFcLnaIiKYAu4+LVNZjNgdd7yoGoiMTA8j3blecVFpapvmE5sWE5v2v+cT
-m0yRs+l6alsQox6cftVxANl1XTw7zY8+4MKA5BAH6H3k28axcYHC5Pg4cN12PLpAZeDq4xl3
-X86Tj0pQuG87Fic1tjTjEKdgCqjLAhiQ3WaKMZGHB8bgBB3P1Q8d34sflC4oLig5UOQ5VWHY
-uJ5pbZnVFbY0RD8cRv2t65l9vM40eCo8N+eLHVoothBUFUXZuB7nA31UysIc+gERwZjxkd3/
-PgzUZcHza7dXHd+3OnU1Lp7XJeeLE3SAm3WH6weiBoTxbqK2hkrM2BnqOHecXa6yR9fjY+Rs
-9gYfFB+VtfP4fmDrw+GurXlTYQzYaozx3mGT7xr5GMeLpOKph37V8XbjUFVyGSPUdj2fb9fc
-PDwiuWCLEbqMEQyC98pkRxS1LZjWI4L8z3WbqSoi0JyU2FLoo2YPrs9cH7POBQZVqkKoqwoQ
-8nxEsxAUEcEWBVNb4eMxln8XcsZboIGb1lGXOapjJPJ8bEpNDmF3pRZ04G1t8RoRZIfNT+xY
-l0VaNif7zvmFTYH05XRKsTtbOoDXgDWGfFfoZ1fH332fgIbxVqQuI8aMJaDD065FhNv2CbM/
-zk+S7yK6y9hz6fqYfb5v08VZ84JIYLxd+Xj78F1XXpPvOm7M07n2Po6Tzq6pbjcdLurB+LKp
-R/QI8KaSo3cH55Tsw3W7a3FfUvgflR9SflRl9qbAeQUZCenqN2PDaVOnRxd+9wQQ9eWm/oy8
-quTidJokH280HzrHt42jfyWK/075P4AQnUfVTZNLAAAAAElFTkSuQmCC}
-
-show_image png "transparant grayscale" {
-iVBORw0KGgoAAAANSUhEUgAAAC4AAAAjCAQAAAE2KcD0AAAFPElEQVR4nMXWXYicZxUH8N+z
-M3HezCy76axJzJrtR8jWVVc29IMtTTG6hUqqqL1QWlrxQmirXpTihRdSY4pUSws1IIEWBesH
-CAZFapNaSISgpUurJra2i7u2IWs+dpNMnbWzndfM9Hixs5tNmrYJCv7vHvi///ec85z/OQ/L
-kODeeMZ1fq+LsTjolIqixAejx3jqj5EFknfEWFBke5zwkga62O01+9LAO38INsW9QeKmmHG1
-vzrgapkttiWqkWA0hsziSr/1CX+T25fAp+Km4PZg8F2CfCseipGga+HwxYBvxur4hWQoigtp
-T7grHk3rbXHAVKJIzQRq9sZ+a/XpixHFBZGqaQ/LNVTlBnVRVcKAPWnEeBrWMrXw7+uD7WfF
-3EVTFdvSxaaiFJfFaGAxlLfinmj7fuIzcUhFpmUZfXvUND2a+Gr0uT+x1+cxFhsc1zDvQOrE
-CC97wWH3xHDM+JMHg5YV+uNSKz2PHrfEQ2eK24OaLgVTDnnKtpj0Rx8wo+IG3VpmLFNnSNW4
-futUZb7tW9b6Xcq1rFe2QdU/ztAHvIgMe9KIXDvdl4rYl7aln6VBfcbtSEupnkTRpKk0Grkt
-9mHHUsV3nl378kV31f8SH1/qkbe91UVU4hanbI0ylhXybIzE12JrwN0OI/caOqPgDL4SK+xI
-rI5rPK2d7opZdU3zSsYXC7kxNhs2blf6g82gV6adxmKlo5oyp0yf6Zmtpu1xrc/Gi9a6O2DG
-WJyy0SsOpvE0nRiJjvq/UHJUZovDun0ynkyVOKak5kQaiH7c7IFF9V7UHVFB07NuQ26TKzSN
-RH+nJkOL9HIn3kk1/cpe8NPodaWG0zIFmYIp/Yv0WS25y5WUFc172EsqqKsbVlWQyVUW6UcN
-utWvzVow9Kf9wHW6HUz7XWrOOmUFaxbp+xXs1KNfrzm5ptl00puYSLkbJZkhO1OH3khFa1CQ
-+7mqGh5LR8AD6QUVg+5Ly3qmbbW2ZF8ajaLnwXTnpnctu/lOz5RlKp5I3KiinWDP2w+k7XH7
-hVuk8v9008DSz9/VTBeG7XHMaWuVvOJDvv7fiA/GHZ5dKvODMeuX+jQdlduoucS7yMVQjUGb
-9Nndmd6jca2C57R0oyWXG/BEuoDIR2PMKe/3E1MdehWHrXIgUYmP+piGJxV1a8hRUnJUOebP
-NONg3OGfakoaXjVo2KQ5+42ncVvjEl9wIH6VFhKt6zeIsSipqWtoKMmFCfk5dVg6luM2bXWc
-1nad1z3jEkV9aq5X84bvJRiOgi/7sYaKYYOaHcssYCg2K7rchMfTslk6nwqu6EjTVHeVQ3Iz
-qnbJ9PhuVIM65v1bjrbjTtoUo3F9bIrRGI1eL9tgzuPL9ymsxGkwbVbJvBnjpqxSs9srqr7h
-kaiZt9cN+mVaeqwXCtrKCgoKOG7ewlPgnC0w57gTCrq916SPGNbvpBYm3ZnqVtim5E2rNbVM
-OuI1fTIVmV69Mpma9RYedcvEj2DAgKvcqmmvY15X1LJBr4qW1XF/+rtTblRTM2HWIbMY0WMd
-Mpmyklnz+s4Vf05TpumgH9ons1q3XiUzNmq6wjAeSU3vcY33qaWJdDS96g1Vl0lKGuoyawyp
-ndstcE+0PG29XKYkVzavoeFqdUWNjicH4maFZW+DQnxJBbm6NTJ853wmOm2dAb1aHQtnfpPg
-c/Fn7c4oZjr9KO5eMgrt9Jjz4yzxVbowo6ok87wTCbZGzZyBzgnytOOCBu859m/4sGOK6ktL
-4qZ49byboHEBU2kZ5c5YKfMX42oX/849L/4D4jD0vGNZ6YMAAAAASUVORK5CYII=}
-
-show_image jpeg color {
-/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh
-MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR
-CAAmADkDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
-AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
-FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
-h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
-5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
-AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
-NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
-hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
-5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDzLyJSuV5FIsUm4DAzW1Ywpb3sbPhoQ4LA
-jPGea6jWdH0W6EdxYLJA78gICUb169KIq8JTutDWnSnUmqcFds4y2e5jkzGrOVGTt7Ct2aae
-ZFzGSR6cmni1t4RiFWCseRknJHf+f51MsZG4JHwP4hXmVaqctEfVYDLqsKbTla+43S7NZLkr
-dHamMEgg9R6isDVtDu7KdjFGZoOodOcD3rowWIVRkbDuUHI3DFbWnOs1n9pIIMZwwIzyBxwe
-v/16ujWs9iK+VQqfFN3W3Yo6Pp/n6LbXFx9rWeCNifLbjac9T6YxXN+a/wDzy/SvedC13S5/
-DtnZ3ckZmMQSVVTK8cYJ6HI96tfZvC3/AD42/wD35NdfM5dT5Pdtp3PBtEji1CVTtyR1U9vc
-11WpXOnRW9rYwWxB6O+/n2OOgrm40EZyg2n2rTm8M6xp+lrrk1q76bIu4hcMwB74zkD3/TFV
-KcXRcFHXudWGm6deM+axUmCQytGjrIi8Kyg81NFKrxqogVsMWk5OH78j8/YfnQ1hKlrbXU8F
-xCk43ws67d4/L3H5j1rLurqVLhhno2RXlKErn2f1qEIKV7xL77QN21VxwMdqdLdvBpbpDveS
-5cJGiHBzyMj8/wBB61i3OoySJjhR3C0+71FYYfIjncSgbSUOMj0J/mBW1OlJSuzz8fmsY0nG
-kvQ6qO4ubaLyt8fnR/Idh3AEdfyNQeVrH/QQuf8Avv8A+tWd4fu0j0dePnEjIM+vU/zqz/aq
-f8/J/wC/h/xotNSaifEO6bsVo1yy8DmvetkF3HbaW0INuYFMiYwpXA4wKKK7Y7HWtzSvNPs7
-ywezurdJLYrjyyOgx29D6EcivGviF4EtfDlnFqVpeSvFLMsPkSKCVJVjncO3y9MfjRRRUirX
-NKdWcfdi9DhbW3YRS3a7cW+GOepycDA+vWsaS3AcqScjvRRUU9zOcnLVlqx8+Elll43qoH1r
-K2L70UVaerMluf/Z}
-
-show_image jpeg grayscale {
-/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAAmADkBAREA/8QAHwAA
-AQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQR
-BRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RF
-RkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ip
-qrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEB
-AAA/APMvIlK5XkUixSbgMDNX7Z7mOTMas5UZO3sK3Zpp5kXMZJHpyan0uzWS5K3R2pjBIIPU
-eorA1bQ7uynYxRmaDqHTnA966/R9P8/Rba4uPtazwRsT5bcbTnqfTGK5vzX/AOeX6VFYwpb3
-sbPhoQ4LAjPGea6jWdH0W6EdxYLJA78gICUb169KzBa28IxCrBWPIyTkjv8Az/OpljI3BI+B
-/EKcCxCqMjYdyg5G4Yra051ms/tJBBjOGBGeQOOD1/8Ar16PoWu6XP4ds7O7kjMxiCSqqZXj
-jBPQ5HvVr7N4W/58bf8A78mvBtEji1CVTtyR1U9vc11WpXOnRW9rYwWxB6O+/n2OOgrDmCQy
-tGjrIi8Kyg81NFKrxqogVsMWk5OH78j8/YfnUT7QN21VxwMdqdLdvBpbpDveS5cJGiHBzyMj
-8/0HrWnHcXNtF5W+Pzo/kOw7gCOv5GoPK1j/AKCFz/33/wDWrIjQRnKDafatObwzrGn6WuuT
-Wrvpsi7iFwzAHvjOQPf9MVE1hKlrbXU8FxCk43ws67d4/L3H5j1rLurqVLhhno2RVa51GSRM
-cKO4Wn3eorDD5Ec7iUDaShxkehP8wK0vD92kejrx84kZBn16n+dWf7VT/n5P/fw/41WjXLLw
-Oa962QXcdtpbQg25gUyJjClcDjArSvNPs7ywezurdJLYrjyyOgx29D6EcivGviF4EtfDlnFq
-VpeSvFLMsPkSKCVJVjncO3y9MfjXC2tuwilu124t8Mc9Tk4GB9etY0luA5Uk5HerVj58JLLL
-xvVQPrWVsX3r/9k=}
-
-show_image jpeg "progressive color" {
-/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh
-MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgAR
-CAAmADkDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAQDBQYBAv/EABkBAAIDAQAA
-AAAAAAAAAAAAAAECAAMFBP/aAAwDAQACEAMQAAABzA7aRqV/vvl1eIWLrCCt3stuTgrWtaNs
-PsV5dljqXX57XwtLMSLehdazjQjUSQBZVQK//8QAHhAAAgIDAQEBAQAAAAAAAAAAAQIAAwQR
-EiEQBRP/2gAIAQEAAQUC0ZoxegSSZUm2toZDTXuncQcvdTS05UTXyv1KL6jj84spAsNjVhT4
-QfIW1UGZRq6DyHGurq4PLMemsJjWaGO2qf6wTxg9aOn6GCuOir4VibHz/8QAHxEAAgEEAgMA
-AAAAAAAAAAAAAQIAAwQQERIxEyFB/9oACAEDAQE/AVUseIlC3YL3HtQ3ZxTPFwdzygDfyV7o
-BdLlWI9CE7x//8QAGxEAAwEBAAMAAAAAAAAAAAAAAAECESEQEjH/2gAIAQIBAT8BXxsqukWb
-o2vTMMZMvTu8EUifH//EACgQAAEDAwIDCQAAAAAAAAAAAAIAAREQITESUQMiMhMjM0FScYGR
-of/aAAgBAQAGPwKllhcys0shItUs3ksJtkxBLKyxTVsgAnaYuugfqggwqMrHvS2SwotLLxCp
-27j3boSdiacVhnuvldX7QeFHLF1oIZHZNxBN4d4h05emmaf/xAAgEAEAAwACAgIDAAAAAAAA
-AAABABEhMUFRcWGBEJHx/9oACAEBAAE/IcshZFgLXiHkBRkjX2ZMMXcupaDQ7fZRlXxwzq2m
-HKvtNw8afMR+4nAyQDPwUhn1PcOblWCA4SAgq7fyjXNBFYupQJoHCzZ/Qg6ZDC0rzWJF3bSr
-hl7gHj1CvvTIIebEpAaSnHFp1UQioh8wNbjHv6jUa7TSpzzsEon/2gAMAwEAAgADAAAAEIb7
-MuvRaP43Yv/EABoRAQADAQEBAAAAAAAAAAAAAAEAETEhUXH/2gAIAQMBAT8QGjax8NL2bzZn
-k1Ubj8VKe1w5H5Gxahs6xyN0w2f/xAAaEQEBAQEBAQEAAAAAAAAAAAABABEhMUFR/9oACAEC
-AQE/EBu05G8Fg+WvqUj1+xtC02FE8QZt6h63/8QAJBABAAICAgIBBAMAAAAAAAAAAQARITFB
-UWGRcaGx0fCB4fH/2gAIAQEAAT8QvtkSkKLl8RFvQllJTrLEKYaUR2dkTm2mejzMlLHRa9vV
-VP3kopAoS8XmEZJwK929QBQEyWtpz9/cQpiOEFAWXobKVLxEVQS8hjDv+46IjecMUumzzP8A
-cRqyTa48sXGOt/w1ogxTIDmGiosjXPJ78HuVGgwVxK9tt03ks9/Q7nZ8b0E36Z+z/EFWbeJY
-AwKAPNXYefpUHWepPryezuBl6sSs4HJFYsll1Z0v3CYYxDfe37zz/b8yzAZldCmppUMURDFp
-Y0Vx09JklKrxFSl046V/MBjlFe22ij53AGls5lpwah8z5p//2Q==}
-
-show_image jpeg "progressive grayscale" {
-/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wgALCAAmADkBAREA/8QAGgAA
-AgMBAQAAAAAAAAAAAAAAAgQDBQYBAP/aAAgBAQAAAAHMenfNC3rRtFT67pJcFaomPWQTaBWP
-rMsW9ZxtElKr/8QAHhAAAgIDAQEBAQAAAAAAAAAAAQIAAwQREiEQBRP/2gAIAQEAAQUC0Zox
-egSSZUm2toZDTXuncQcvdTS05UTXyv1KL6jj84spAsNjVhT4QfIW1UGZRq6DyHGurq4PLMem
-sJjWaGO2qf6wTxg9aOn6GCuOir4VibHz/8QAKBAAAQMDAgMJAAAAAAAAAAAAAgABERAhMRJR
-AyIyEyMzQVJxgZGh/9oACAEBAAY/AqWWFzKzSyEi1SzeSwm2TEEsrLFNWyACdpi66B+qCDCo
-yse9LZLCi0svEKnbuPduhJ2JpxWGe6+V1ftB4UcsXWghkdk3EE3h3iHTl6aZp//EACAQAQAD
-AAICAgMAAAAAAAAAAAEAESExQVFxYYEQkfH/2gAIAQEAAT8hyyFkWAteIeQFGSNfZkwxdy6l
-oNDt9lGVfHDOraYcq+03Dxp8xH7icDJAM/BSGfU9w5uVYIDhICCrt/KNc0EVi6lAmgcLNn9C
-DpkMLSvNYkXdtKuGXuAePUK+9Mgh5sSkBpKccWnVRCKiHzA1uMe/qNRrtNKnPOwSif/aAAgB
-AQAAABCrPPK25v/EACQQAQACAgICAQQDAAAAAAAAAAEAESExQVFhkXGhsdHwgeHx/9oACAEB
-AAE/EL7ZEpCi5fERb0JZSU6yxCmGlEdnZE5tpno8zJSx0Wvb1VT95KKQKEvF5hGScCvdvUAU
-BMlrac/f3EKYjhBQFl6GylS8RFUEvIYw7/uOiI3nDFLps8z/AHEask2uPLFxjrf8NaIMUyA5
-hoqLI1zye/B7lRoMFcSvbbdN5LPf0O52fG9BN+mfs/xBVm3iWAMCgDzV2Hn6VB1nqT68ns7g
-ZerErOByRWLJZdWdL9wmGMQ33t+88/2/MswGZXQpqaVDFEQxaWNFcdPSZJSq8RUpdOOlfzAY
-5RXttoo+dwBpbOZacGofM+af/9k=}
-
-show_image tiff uncompressed {
-TU0AKgAAHggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAADb///bttu2tv+Sttu2ttvb2/8AJEkAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////b//+229u2
-29vb2/+2ttttttu2ttu22//b//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAJAC229skbZLb//+2tv8AJEkkbZJtkrbb///b//9tktvb//8A
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSttu2
-29u2ttvb2/8AAAC229skbZIAACSSttu229uSttsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAJCQAJCSSttsAAACS
-ttvb//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAASUkAAABJbZIAACQkAACStrYASQDb2/8AAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////29v//9v/29v///8AAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AABtJACSbSS2bUnbkm22km3btm22kkn/25L//9ttJAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSSSSSSSTbkm2SSSSSSSSSJACSSSS2
-bUm2bUm2bUn/27b//9v/////////////27b/tm3btm3//9v/27b//////////////9skAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAkAABJAAAAAACSSSRJAABtJABtJACSbSSSSSTbtm22km3btm3btm3btm22km3/
-km22bUn/25L/27b/25Lbtm3btpLbkm3/27bbtpLbtm22km3/25L/27b//7b/27b//////9v/
-/////9v/////tpL/km1tJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtAABJAABJAABJAACSJCRJ
-AABtJABtAACSSSRtJACSbSSSSSTbkm222222km22bUm2kknbtpLb25K2km22kknbtpLbtm3b
-tpLbtm22km3btpK2km3btpLb25L//9v/25L/25Lb29v//7b/27b//7b/27b/25Lb29v/27bb
-tpL//9v//////7b///////////////+2bUkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAABJAABJAABJAABJAABJJACSSSSSJABtSQCSSSSSSSSSSSSSJCSSSSS2
-bUmSSSSSJABtJABtAACSSSS2kkm2bUnbkkm2kkn/25K2kknbtm22km3bkm22km3/tm3btm3b
-tm3btpLbkm22km22kkm2kknbtm3bkpL/25L/27b//7b/27b//7b/////tm3btpL/27b/tm3b
-tpLbtm3//7b/25L//9v/////////////////////2/8AAAAAAAAAAAAAAACSSSQkAABtJABJ
-AABtJABJAABJAABJAACSSSRtSQBtJABtSSS2kkmSJCSSJCSSSSSSSSSSSSSSSSSSSSSSSSRt
-JACSSSSSSSS2bUm2km3//9u2bUm2bUm2bUm2SSS2bUm2bUm2km2SSSSSSSTbtm3btpL/25K2
-km3btkm2km3btm22km3bkm3btpL/25K2tm3bkm22km3btm22bUm2bUm2bUm2kkm2bUnbtm22
-tm3bkm3b25L//9v///////////8ADgEAAAMAAAABAEAAAAEBAAMAAAABACgAAAECAAMAAAAD
-AAAetgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAESAAMAAAABAAEAAAEV
-AAMAAAABAAMAAAEWAAMAAAABACgAAAEXAAQAAAABAAAeAAEaAAUAAAABAAAevAEbAAUAAAAB
-AAAexAEcAAMAAAABAAEAAAEoAAMAAAABAAIAAAAAAAAACAAIAAgSwAAAAAQAABLAAAAABAAA}
-
-show_image tiff "packbits compressed" {
-TU0AKgAABAqBAMEAgQDBAIEAwQCBAMEAgQDBAIEAwQCBAMEAgQDBAIEAwQCBAMEAgQDBAIEA
-wQCBAMEAgQDBAIEAwQCbAAvb///bttu2tv+Sttv/tv7bA/8AJEm8AKEA/v8G2///ttvbtv3b
-Df+2ttttttu2ttu22//b//+/AKMACCQAttvbJG2S2////7YR/wAkSSRtkm2Sttv//9v//22S
-/9v//8IAoQADkrbbtv/b/7b+2wD//gARttvbJG2SAAAkkrbbttvbkrbbwgCcAAAk9wD/JAUA
-JCSSttv+AAGStv/b///CAJcA/0n+AAJJbZL/AP8k/wAIkra2AEkA29v/wgCBAMEAgQDBAIEA
-wQCBAMEAgQDBAIEAwQCBAMEAgQDBAIEAwQCBAMEAgQDBAIEAwQD9///b//8B2///2/7/gQDQ
-AB5tJACSbSS2bUnbkm22km3btm22kkn/25L//9ttJAAkgQDgACOSSSSSSSTbkm2SSSSSSSSS
-JACSSSS2bUm2bUm2bUn/27b//9v3/w3btv+2bdu2bf//2//btvb/AdskigADJAAASfwAU5JJ
-JEkAAG0kAG0kAJJtJJJJJNu2bbaSbdu2bdu2bdu2bbaSbf+SbbZtSf/bkv/btv/bktu2bdu2
-ktuSbf/bttu2ktu2bbaSbf/bkv/btv//tv/btvz/ANv8/wDb/f8GtpL/km1tJLUAYm0AAEkA
-AEkAAEkAAJIkJEkAAG0kAG0AAJJJJG0kAJJtJJJJJNuSbbbbbbaSbbZtSbaSSdu2ktvbkraS
-bbaSSdu2ktu2bdu2ktu2bbaSbdu2kraSbdu2ktvbkv//2//bkv/bkv7b//8Mtv/btv//tv/b
-tv/bkv7bCP/bttu2kv//2/z/ALb1/wK2bUnXAH9JAABJAABJAABJAABJJACSSSSSJABtSQCS
-SSSSSSSSSSSSJCSSSSS2bUmSSSSSJABtJABtAACSSSS2kkm2bUnbkkm2kkn/25K2kknbtm22
-km3bkm22km3/tm3btm3btm3btpLbkm22km22kkm2kknbtm3bkpL/25L/27b//7b/2wO2//+2
-/f8Ztm3btpL/27b/tm3btpLbtm3//7b/25L//9vx/wHb//UAAZJJ/yT/AH9tJABJAABtJABJ
-AABJAABJAACSSSRtSQBtJABtSSS2kkmSJCSSJCSSSSSSSSSSSSSSSSSSSSSSSSRtJACSSSSS
-SSS2bUm2km3//9u2bUm2bUm2bUm2SSS2bUm2bUm2km2SSSSSSSTbtm3btpL/25K2km3btkm2
-km3btm22km3bkjBt27aS/9uStrZt25JttpJt27Zttm1Jtm1Jtm1JtpJJtm1J27ZttrZt25Jt
-29uS///b+P8ADgEAAAMAAAABAEAAAAEBAAMAAAABACgAAAECAAMAAAADAAAEuAEDAAMAAAAB
-gAUAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAESAAMAAAABAAEAAAEVAAMAAAABAAMAAAEW
-AAMAAAABACgAAAEXAAQAAAABAAAEAgEaAAUAAAABAAAEvgEbAAUAAAABAAAExgEcAAMAAAAB
-AAEAAAEoAAMAAAABAAIAAAAAAAAACAAIAAgSwAAAAAQAABLAAAAABAAA}
-
-if 0 {
-show_image tiff "pixarlog compressed" {
-TU0AKgAAA3Z4nO2aIWzbUBCGz7HjYyVTNDAp0CgKDRorCauiSGFjRmWRxs0rlQ2FlUWKrLKQ
-sIDK1BoyjFRUjZSF7f13eYnjpZOmdeuU3Wc1se+dn17uf/ee5SuRYRiGYRiGYRiGYRiGYRiG
-YRg/YxVt3EG04IpLJkqocJ8VD6S1746ELsOP8UNMxO1J9MbDPQs2EvOKcV66uOsZoo34lwxb
-JraMfEsif+S06Lrj74/5XNi2iG6jdbCKruMRz3gdfKUbF/OFi/c0vHbzfNvqBDl1giENKHdt
-492dI/7sdIElMRV+i0l0G62igcx3ZMBhnUFc0ebV4fZzeBfDfx2ofyGr1DycOt+3/RXnALIB
-63rTqnYo9SVYBxptVS11+WDz//WZh/MQ8Z5E8/AiwjdmPnTg9qfg1sV+Hn7gabiK3gWbSDPl
-rcdsGIZhGIZhGIZhGIZhnCebXc1IKxeJ2LSGkbija+8G/zAXEd4LDqkTbFuo091T312l8iYd
-79JhK7ngGY+dNSfoklKP38eX4VOMt73NN77Gr4B3tP4NOeLbCWY84qfYt18x4ntPUCd133XG
-zv+RSOp5RD57DlRSiSo5Y59RY1HQV2fH1KRyunbDy/D/0VRjr3HVirQqMuJJxO2UvDY+R4hm
-DKUe3RXywudIHbVrdBe8lNzJJfK08y2kQr5k7RfXS0ZeZaJNIfYl+35S8dF7j1fI8dHV8fmC
-P7P23OO7+Dl8/idVvZCYz7hpz6VyNHKz/6ACxj8kqLNk5MWxIrkoktKhP0Re49uX+qtWxUtn
-1cjP2Nvhi8/h7vyg7FDUXLKe+7o6tEKs/bgrGUEiFfdTeqji6qN1evSaiLYH34X4/piVaOnx
-Qzx1Gr72f03MX9xdEdlcVh5dhZaMLBkS1XJCuZJxo1XXKOwWsOld6nPQbiC9asT70l+5+93Q
-cMFY//rSk1eBaj7IgaoxW3wGlXu710X7QetwpxnRqTxSEHlEupJZk+x3v2xnIRk1VMvk3oJp
-32tz7a2Du7svVNl0tUFdmtt+NiNWOuf1vE6+m/8aUR/5bSuTqBYu06/2UTjeLU7h8+h+r6nf
-ZfAMMKYbUaTH3+Lj+1Tf+n4E/6K2c+kKqS26Py0k7xDTmcz+tPZ04VUmyTLvX4p/wdR4Gsm4
-uV54beCT1Z5edCVNpc/TSn0HoOsh4gAOAQAAAwAAAAEAQAAAAQEAAwAAAAEAKAAAAQIAAwAA
-AAMAAAQkAQMAAwAAAAGAjQAAAQYAAwAAAAEAAgAAAREABAAAAAEAAAAIARIAAwAAAAEAAQAA
-ARUAAwAAAAEAAwAAARYAAwAAAAEAKAAAARcABAAAAAEAAANuARoABQAAAAEAAAQqARsABQAA
-AAEAAAQyARwAAwAAAAEAAQAAASgAAwAAAAEAAgAAAAAAAAAIAAgACBLAAAAABAAAEsAAAAAE
-AAA=}
-}
-
-if 0 {
-show_image tiff "logluv compressed" {
-TU0AKgAAAAgADgEAAAMAAAABAEAAAAEBAAMAAAABACgAAAECAAMAAAADAAAAtgEDAAMAAAAB
-h3QAAAEGAAMAAAABAAIAAAERAAQAAAABAAAAAAESAAMAAAABAAEAAAEVAAMAAAABAAMAAAEW
-AAMAAAABACgAAAEXAAQAAAABAAAAAAEaAAUAAAABAAAAvAEbAAUAAAABAAAAxAEcAAMAAAAB
-AAEAAAEoAAMAAAABAAIAAAAAAAAAEAAQABASwAAAAAQAABLAAAAABAAA}
-}
-
-show_image tiff "jpeg compressed" {
-TU0AKgAABID/2P/AABEIACgAQAMAEQABEQACEQD/2gAMAwAAAQACAAA/APn+vn+vn+iiiiii
-iiiiiiiiiiiiiiiiiiiiiiiiiiitK28O63e28VxaaNqE8ExIilitXZXIODtIGDyCOPStO18O
-a5e28VxaaNqNxBLny5IrV3V8Eg4IGDyCPqDWtZ+FvEOo2kd3Y6Dql1bS/wCrmgs5HR+SOCBg
-8gj6g1m1mkEEgggjqDWUysjFWUqwOCCMEGikpKKKKKKKKKKKKKKUHBB449RRXdXHxU16+nt5
-Ll1j8li5MDOTIxdWJYOzKSMMF3KwG4jHTHo83xl8QXs8U92Y1aJWASAMAxZkO472ZSQA4G5W
-A3YwRjb6mfjj4guZ4pblYYhEr/u7VWHmMzIcszuwyAHC5Vgu7G054x/GPiGDxNqtvqEcLRz/
-AGcR3LFAvmSB3wwwTxsKcEnbjaCQorA8e+J7bxbrdvqcEDRzfZViunaNU82QM3zgAnjaUGCT
-jG0HAFcx8QfFlt4z1221aK18i4+yrFdt5ap50iu+HwCTymzgkkY25IUE87XLVydFFFFFFFFF
-FFFFFFFFFFFFFFFFFFe2vceH9WtktdR8KaRGsEu53hjW2Z8ZH3o1jP8AeG32B6/d7l/E9hqU
-ENvqHhjSkWKUNKUt47Z2IJHDRiM+oK5xx7Db0t34mjvrWK3u9F0vEcoeUxWkdvI2MjAaJUOO
-eV6d/TFlfhp4BvnlmZtYtCHG6G3uUKJk9F3Izce7ZP542IfDXgG5trm4uv7YtJlOfJhnURAs
-TiNMxuxwM43NkgZ61p2lh4Lube5muodVhmDMdlvdII0JJwqgxuxA46tkj8cT23wi+HtwIsat
-raF/veZcQx4PoN0QJ+vA4zV+x8C/Dm6it92rauJJOH33McIVs8gb4cnjvwDjOfS5p+geAZoo
-BcXuqmWRQGYXEcKo2eRhoiTgc54HB554zofgFayMfM8XeSp+ZC2nggr0/wCeo7+38jitB8H9
-OLAXfi9bVXXfG72PyuucZB8z1BH4fXEUHw70/wDdte+IzaxyLvjZrLO5ckZA3jnIx6Z79cNm
-+AEUkFwNO8YQXF3EuRFLYtGh/wB5w7bRjnODS3HwYtJYpF0fxfbXlzHgvHNZvEqg9CWVnwMc
-5x0/HEt18NNPc+VpPimG7uVAaRJ7NokQHHJZWf37c44zms4fs++JyCf7Y8P/AC5zi5lOB68R
-9ODVdfgZr7KP+J54fDEkbBcysw9yBGePft3qOH4S6lLGr/2/oCgnH/HxK2PQnbGeD69B3xkZ
-w7z4N+MrW8lgjs7O5RGwJor+FUf3AdlbGeOQOlYM/wAL/E0V08McdhOik7ZV1CGNZAP4gJGV
-sfUDofSsV/Aeti9kt4jYShSdsxvookcDuPNZTjnuAfbg1n6h8MPGumiMy+HbybzM4+x7brGM
-Z3eUW29e+M846GoL34aeMrHZu8P3dxuyM2O26C4x97yi23qOuM0tz8PPFlvs2aLNeb8/8g90
-vNuMfe8ktt68ZxnnHQ1//9kAAA8BAAADAAAAAQBAAAABAQADAAAAAQAoAAABAgADAAAAAwAA
-BToBAwADAAAAAQAHAAABBgADAAAAAQACAAABEQAEAAAAAQAAAAgBEgADAAAAAQABAAABFQAD
-AAAAAQADAAABFgADAAAAAQAoAAABFwAEAAAAAQAABHcBGgAFAAAAAQAABUABGwAFAAAAAQAA
-BUgBHAADAAAAAQABAAABKAADAAAAAQACAAABWwAHAAABIQAABVAAAAAAAAgACAAIEsAAAAAE
-AAASwAAAAAQAAP/Y/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQu
-JyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQF
-BgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0Kx
-wRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlq
-c3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT
-1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9k=}
-
-show_image tiff "deflate compressed" {
-TU0AKgAAAah4nO2Y643EMAiEXQzNUIyboRiaoRh2ADuP+7N70knZkxhZlmNH2fkMRPGO0Wq1
-Wq1Wq9Vqtb5L5m5qqi7Rm5kP4qdNfSSHc3dYDtfmMD8TQS3mn3b3TjRgm6YEgsaeYzwRg4TC
-9PcjRMLYzpmxcABW8+ifNviJ6DIktLKN/vv3/xRHwXJuPoV5HTwqKK1Wq9VqtVqtz+VxwMjv
-8ej/39fUpCGTdLLJVJmm6NlNQIQlev+AhyVMaDBfA6GYAU41nFrzqLSFSw3GjJf6ZeEpUvwu
-bxDOcFREAkpXRKph7IjRzOjAvEnOC9jzcC7rnlp13YB29ip4wvxT1Jn+qwlthMQ5QWDbwlsE
-RTis4uQX+cZl+zCPQfWWGZgsEkfHhaML3KyQN901lIjwL/6a4GvL5EEK4QErneKSKqPW0qaD
-+awarnpJlkTIOnI9Aic1o1LsuEHuMdIyHTgrPyVTVKsM/YfuRzY4odxz3v2KBfaf021aDQqi
-E2q3SYs0QxN1cdSOHnW0i8uWyYoR79dFIK95nedr5HhObRRmctXuUC9uNR31AAAOAQAAAwAA
-AAEAQAAAAQEAAwAAAAEAKAAAAQIAAwAAAAMAAAJWAQMAAwAAAAGAsgAAAQYAAwAAAAEAAgAA
-AREABAAAAAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAwAAARYAAwAAAAEAKAAAARcABAAA
-AAEAAAGfARoABQAAAAEAAAJcARsABQAAAAEAAAJkARwAAwAAAAEAAQAAASgAAwAAAAEAAgAA
-AAAAAAAIAAgACBLAAAAABAAAEsAAAAAEAAA=}
-
-if {[string compare $tcl_platform(platform) windows]} {
-
-show_image other postscript {%!PS-Adobe-3
-%%Title: postscript.ps
-%%BoundingBox: 66 648 146 720
-%%Pages: 1
-%%DocumentProcSets: Adobe_distill 0.96
-%%EndComments
-%%BeginProcSet: Adobe_distill 0.96
-/PROLOGUE 30 40 add dict def
- % 30 procedure entries + room for 40 cached font dictionaries
- PROLOGUE begin
- /clip { } def    % causes problems. remove if "clip" is needed
- /bdef { bind def } bind def	/ldef { load def } bdef
- /T { moveto show } bdef	/A { moveto ashow } bdef
- /W { moveto widthshow } bdef	/AW { moveto awidthshow } bdef
- /f /fill ldef			/R { { rlineto } repeat } bdef
- /r /rlineto ldef		/L { { lineto } repeat } bdef
- /m /moveto ldef		/l { moveto lineto stroke } bdef
- /x { 0 rlineto } bdef		/y { 0 exch rlineto } bdef
- /c /curveto ldef		/cp /closepath ldef
- /s /stroke ldef		/w /setlinewidth ldef
- /g /setgray ldef		/j /setlinejoin ldef
- /d /setdash ldef		/F /setfont ldef
- /C /setcmykcolor where { /setcmykcolor get }{ %ifelse
-   { %def
-     1 sub 3 { 3 index add neg dup 0 lt { pop 0 } if 3 1 roll } repeat
-     setrgbcolor
-   } bind
- } ifelse def
- /selectfont where { pop }{ %ifelse
-     /selectfont { exch findfont exch scalefont setfont } bdef
- } ifelse
- /MF { exch findfont exch makefont setfont } bdef
- /FF /selectfont ldef
- /DF { selectfont currentfont def } bdef
- /BEGINPAGE { pop /pagesave save def } bdef
- /ENDPAGE { pop pagesave restore showpage } def
- /REMAP { %def
-   FontDirectory 2 index known { pop pop pop } { %ifelse
-     findfont dup length dict begin
-       { 1 index /FID ne {def}{pop pop} ifelse } forall
-       exch dup length 0 gt { /Encoding exch def }{ pop } ifelse
-     currentdict end definefont pop
-   } ifelse
- } bdef
- /RECODE { %def
-    3 -1 roll 1 index findfont /Encoding get 256 array copy exch
-    0 exch { %forall
-     dup type/nametype eq
-       { 3 {2 index} repeat put pop 1 add }{ exch pop }ifelse
-    } forall pop 3 1 roll REMAP
- } bdef
- end %PROLOGUE
-%%EndProcSet: Adobe_distill 0.96
-%%EndProlog
-%%BeginSetup
-PROLOGUE begin
-%%EndSetup
-%%Page: 1 1
-1 BEGINPAGE
-1 g
-2 setlinecap
-144 53 m
-390 x
--19 y
--390 x
-eofill
-0 g
-1.268 w
-0 setlinecap
-4 setmiterlimit
-[] 0 d
-109.698 714.182 m
-111.525 713.672 112.472 713.234 113.624 712.431 c
--22.3128 -25.8381 r
-97.4019 682.652 103.794 672.84 100.329 664.844 c
-102.034 675.687 90.7436 683.82 84.1099 684.842 c
-25.588 29.3407 r
-f
-1.0361 w
-f
-f
-91.8805 654.468 m
-96.0255 654.285 100.155 654.188 104.481 654.188 c
-113.804 654.188 122.752 654.636 131.141 655.44 c
-134.222 655.737 136.724 658.133 137.108 661.279 c
-137.79 666.855 138.107 672.696 138.107 678.705 c
-138.107 684.714 137.79 690.555 137.108 696.131 c
-136.724 699.277 134.222 701.674 131.141 701.97 c
-127.476 702.321 123.704 702.604 119.84 702.813 c
-119.84 702.813 103.842 668.373 102.231 664.827 c
-99.8549 659.595 96.601 655.765 91.8805 654.468 c
-f
-0.7851 w
-77.8202 655.44 m
-74.7171 655.948 72.2887 657.716 71.8525 661.279 c
-71.1725 666.855 70.8549 672.696 70.8549 678.705 c
-70.8549 684.714 71.1725 690.555 71.8525 696.131 c
-72.2381 699.277 74.7417 701.674 77.8202 701.97 c
-82.1335 702.383 86.5932 702.702 91.1764 702.916 c
-8.16241 9.07727 r
-99.2863 711.98 101.266 712.345 102.996 711.921 c
--28.4564 -32.9334 r
-80.6983 681.906 98.7446 677.354 98.7446 666.708 c
-98.7446 655.332 86.3243 654.054 77.8202 655.44 c
-f
-0.0843 w
-139.67 644.154 m
-140.194 644.154 140.619 644.576 140.619 645.098 c
-140.619 645.619 140.194 646.042 139.67 646.042 c
-139.146 646.042 138.721 645.619 138.721 645.098 c
-138.721 644.576 139.146 644.154 139.67 644.154 c
-1 ENDPAGE
-%%Trailer
-end %PROLOGUE
-%%Pages: 1
-%%EOF}
-}
-
-if 0 {
-show_image other pdf {
-JVBERi0xLjIKJcfsj6IKNCAwIG9iago8PC9MZW5ndGggNSAwIFIvRmlsdGVyIC9GbGF0ZURl
-Y29kZT4+CnN0cmVhbQp4nF1TSY7cQAy7+xX1AkFbaXlG3jBAgAAzh/z/Esp2uyeDPhhUayEp
-FZMsnt/9/fg6/h6y/hzCHdS1UlyodH0dIrJJNyIWlLpE1OcLrGQOjLg6MOIm6+NoMULWiopN
-bevz6HRiaUQ0aKMHW1L7itQitGA2UvwdDuhoIaw8zSN3UOVqTnILNLAiXQVy3NNvCvQs+M57
-Zv4Gj6LivWK7UxS0dDCknBGl2jNY6MKoKmBkljwYfQUD2d8ZqjkKgINASEyEfCq208nc0Fon
-YSdZIiFy7IldQmbACe4FraKUfVYkzEAgarhgIBJyvIGi+IYrCWqm4I6UJ4mvV4PmfTW4J3TI
-tZCHQzdmDqeLY7Jgpf6IAG7KKVAsLAMBxWIEqrEvuAAc8xXp2Rtgkdhp038B7PfcCyQZ5WDV
-oXIuWGdCI387SO/GjezVgcZyuRaAP1b3gXVmopb1ZfXXkSM/z6Imx+4xpHAsseGHgD2abFzu
-2+qEzjwjl9fJN4vb6zd+ef1Ebq+fDrfZz4zH7GFhc0O32cPSJR+zXzIes0vnMPZlNk73ejWT
-gFNDYs/IOM3tkTXmGUbMsaPF9cAwq8KuyNwxFMc4gJY+d47S0Td/68nSNxkiUNpz159H8Twg
-g1LkcKyGBe6TkQYL3jhwTDwreSJ7gw9eZeBY3GZpPBU/FjY7/HX8A9+h3WJlbmRzdHJlYW0K
-ZW5kb2JqCjUgMCBvYmoKNTE2CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9NZWRp
-YUJveCBbMCAwIDYxMiA3OTJdCi9QYXJlbnQgMiAwIFIKL1Jlc291cmNlcyA8PCAvUHJvY1Nl
-dCBbL1BERl0KPj4KL0NvbnRlbnRzIDQgMCBSCj4+CmVuZG9iagoyIDAgb2JqCjw8IC9UeXBl
-IC9QYWdlcyAvS2lkcyBbCjMgMCBSCl0gL0NvdW50IDEKPj4KZW5kb2JqCjEgMCBvYmoKPDwg
-L1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDIgMCBSCj4+CmVuZG9iago2IDAgb2JqCjw8IC9DcmVh
-dGlvbkRhdGUgKEQ6MTk5NzEyMDUyMjU2MzcpCi9Qcm9kdWNlciAoQWxhZGRpbiBHaG9zdHNj
-cmlwdCA1LjEwKQo+PgplbmRvYmoKeHJlZgowIDcKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAw
-MDAwNzk5IDAwMDAwIG4gCjAwMDAwMDA3NDAgMDAwMDAgbiAKMDAwMDAwMDYyMCAwMDAwMCBu
-IAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA2MDEgMDAwMDAgbiAKMDAwMDAwMDg0OCAw
-MDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDcgL1Jvb3QgMSAwIFIgL0luZm8gNiAwIFIKPj4K
-c3RhcnR4cmVmCjkzOQolJUVPRgo=}
-}
-
-proc start_viewer {} {
-    global tkvPriv rundir
-    set argv {{} .viewer}
-    source [file join $rundir tkv.tcl]
-    foreach i [lsort [image names]] {
-	register_image .viewer $i
-    }
-}
-
-button .f.v -text [mc Viewer] -command start_viewer
-pack .f.v -side left
diff --git a/tkimg1.3/demo/imgmsg.tcl b/tkimg1.3/demo/imgmsg.tcl
deleted file mode 100644
index 6feb3c2..0000000
--- a/tkimg1.3/demo/imgmsg.tcl
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-#    This script activates msgcat if available, otherwise it
-#    defines a minimal number of functions to make Internationalization
-#    within Img possible using Tk 8.0 or higher.
-#
-if {[catch {package require msgcat}]} {
-    if {[info exists env(LANG)]} {
-	set fileName [file join [file dirname [info script]] msgs \
-		[string tolower [string range $env(LANG) 0 1]].msg]
-	if {[file readable $fileName]} {
-	    namespace eval msgcat {
-		proc mcset {args} {
-		    global ::msgs
-		    if {[llength $args] > 2} {
-			set msgs([lindex $args 1]) [lindex $args 2]
-		    }
-		}
-	    }
-	    source $fileName
-	}
-    }
-    proc mc {string} {
-	global msgs
-	if {[info exists msgs($string)]} {
-	    return [set msgs($string)]
-	} else {
-	    return $string
-	}
-    }
-} else {
-    ::msgcat::mcload [file join [file dirname [info script]] msgs]
-    catch {namespace import ::msgcat::mc}
-}
diff --git a/tkimg1.3/demo/msgs/de.msg b/tkimg1.3/demo/msgs/de.msg
deleted file mode 100644
index 8db1c24..0000000
--- a/tkimg1.3/demo/msgs/de.msg
+++ /dev/null
@@ -1,24 +0,0 @@
-::msgcat::mcset de "&About" "\334&ber"
-::msgcat::mcset de "&Close" "S&chlie\337en"
-::msgcat::mcset de "&File" "&Datei"
-::msgcat::mcset de "&Help" "&Hilfe"
-::msgcat::mcset de "&Images" "B&ilder"
-::msgcat::mcset de "&Open" "\326&ffnen"
-::msgcat::mcset de "&Save" "&Speichern"
-::msgcat::mcset de "All files" "Alle Dateien"
-::msgcat::mcset de "Dismiss" "Beenden"
-::msgcat::mcset de "E&xit" "B&eenden"
-::msgcat::mcset de "Files" "Dateien"
-::msgcat::mcset de "Image Files" "Bild-Dateien"
-::msgcat::mcset de "More tests" "Mehr Tests"
-::msgcat::mcset de "OK"
-::msgcat::mcset de "OTHER" "ANDERE"
-::msgcat::mcset de "Tests for available image formats" "Tests f\374r die verf\374gbaren Bildformate"
-::msgcat::mcset de "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "Diese Seite f\374hrt alle von der Img-Erweiterung (version %s, mit Tcl/Tk %s) zur Verf\374gung gestellen Bildformate auf."
-::msgcat::mcset de "Tiny Image viewer" "Mini Bildbetrachter"
-::msgcat::mcset de "Viewer" "Betrachter"
-::msgcat::mcset de "end of tests" "Ende der Tests"
-::msgcat::mcset de "error displaying %s image" "Fehler in Datei %s"
-::msgcat::mcset de "error displaying animated gif" "Fehler in dem animiertem gif-Bild"
-::msgcat::mcset de "starting tests" "Beginne mit den Tests"
-::msgcat::mcset de "written by" "geschrieben von"
diff --git a/tkimg1.3/demo/msgs/el.msg b/tkimg1.3/demo/msgs/el.msg
deleted file mode 100644
index 80bd92d..0000000
--- a/tkimg1.3/demo/msgs/el.msg
+++ /dev/null
@@ -1,29 +0,0 @@
-## Messages for the Greek (el) language.
-## For any errors/suggestions contact petasis at iit.demokritos.gr
-
-if {[package vcompare [info tclversion] 8.1] < 0} return
-
-::msgcat::mcset el "&About" "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac (&A)"
-::msgcat::mcset el "&Close" "\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf (&C)"
-::msgcat::mcset el "E&xit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2 (&X)"
-::msgcat::mcset el "&File" "\u0391\u03c1\u03c7\u03b5\u03af\u03bf (&F)"
-::msgcat::mcset el "&Help" "\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1 (&H)"
-::msgcat::mcset el "&Images" "\u0395\u03b9\u03ba\u03cc\u03bd\u03b5\u03c2 (&I)"
-::msgcat::mcset el "&Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 (&O)"
-::msgcat::mcset el "&Save" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 (&S)"
-::msgcat::mcset el "All files" "\u038c\u03bb\u03b1 \u03c4\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03b1"
-::msgcat::mcset el "Dismiss" "\u0391\u03c0\u03bf\u03c0\u03bf\u03bc\u03c0\u03ae"
-::msgcat::mcset el "Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1"
-::msgcat::mcset el "Image Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u0395\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2"
-::msgcat::mcset el "More tests" "\u0395\u03c0\u03b9\u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03bf\u03b9 \u03ad\u03bb\u03b5\u03b3\u03c7\u03bf\u03b9"
-::msgcat::mcset el "OK" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
-::msgcat::mcset el "OTHER"
-::msgcat::mcset el "Tests for available image formats" "\u0388\u03bb\u03ad\u03b3\u03c7\u03bf\u03b9 \u03b3\u03b9\u03b1 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf\u03c5\u03c2 \u03c4\u03cd\u03c0\u03bf\u03c5\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2"
-::msgcat::mcset el "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "\u0397 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03b1\u03c5\u03c4\u03ae \u03b1\u03c0\u03b5\u03b9\u03ba\u03bf\u03bd\u03af\u03b6\u03b5\u03b9 \u03c4\u03bf\u03c5\u03c2 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf\u03c5\u03c2 \u03c4\u03cd\u03c0\u03bf\u03c5\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2 \u03c4\u03bf\u03c5 \u03b1\u03c1\u03b8\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2 Img (\u03ad\u03ba\u03b4\u03bf\u03c3\u03b7\u03c2 %s, \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ce\u03bd\u03c4\u03b1\u03c2 Tcl/Tk %s)"
-::msgcat::mcset el "Tiny Image viewer" "\u039c\u03b9\u03ba\u03c1\u03cc\u03c2 viewer \u0395\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd"
-::msgcat::mcset el "Viewer"
-::msgcat::mcset el "end of tests" "\u03c4\u03ad\u03bb\u03bf\u03c2 \u03b5\u03bb\u03ad\u03b3\u03c7\u03c9\u03bd"
-::msgcat::mcset el "error displaying %s image" "\u03bb\u03ac\u03b8\u03bf\u03c2 \u03b1\u03c0\u03b5\u03b9\u03ba\u03bf\u03bd\u03af\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03c4\u03b7\u03bd %s \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1"
-::msgcat::mcset el "error displaying animated gif" "\u03bb\u03ac\u03b8\u03bf\u03c2 \u03c3\u03c4\u03b7\u03bd \u03b1\u03c0\u03b5\u03b9\u03ba\u03cc\u03bd\u03b9\u03c3\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2 \u03c4\u03cd\u03c0\u03bf\u03c5 \"animated gif\""
-::msgcat::mcset el "starting tests" "\u03ad\u03bd\u03b1\u03c1\u03be\u03b7 \u03b5\u03bb\u03ad\u03b3\u03c7\u03c9\u03bd"
-::msgcat::mcset el "written by" "\u03b1\u03bd\u03b1\u03c0\u03c4\u03cd\u03c7\u03b8\u03b7\u03ba\u03b5 \u03b1\u03c0\u03cc"
diff --git a/tkimg1.3/demo/msgs/en.msg b/tkimg1.3/demo/msgs/en.msg
deleted file mode 100644
index 8161885..0000000
--- a/tkimg1.3/demo/msgs/en.msg
+++ /dev/null
@@ -1,24 +0,0 @@
-::msgcat::mcset en "&About"
-::msgcat::mcset en "&Close"
-::msgcat::mcset en "&File"
-::msgcat::mcset en "&Help"
-::msgcat::mcset en "&Images"
-::msgcat::mcset en "&Open"
-::msgcat::mcset en "&Save"
-::msgcat::mcset en "All files"
-::msgcat::mcset en "Dismiss"
-::msgcat::mcset en "E&xit"
-::msgcat::mcset en "Files"
-::msgcat::mcset en "Image Files"
-::msgcat::mcset en "More tests"
-::msgcat::mcset en "OK"
-::msgcat::mcset en "OTHER"
-::msgcat::mcset en "Tests for available image formats"
-::msgcat::mcset en "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)"
-::msgcat::mcset en "Tiny Image viewer"
-::msgcat::mcset en "Viewer"
-::msgcat::mcset en "end of tests"
-::msgcat::mcset en "error displaying %s image"
-::msgcat::mcset en "error displaying animated gif"
-::msgcat::mcset en "starting tests"
-::msgcat::mcset en "written by"
diff --git a/tkimg1.3/demo/msgs/es.msg b/tkimg1.3/demo/msgs/es.msg
deleted file mode 100755
index 0515a73..0000000
--- a/tkimg1.3/demo/msgs/es.msg
+++ /dev/null
@@ -1,24 +0,0 @@
-::msgcat::mcset es "&About" "Acerca &de"
-::msgcat::mcset es "&Close" "&Cerrar"
-::msgcat::mcset es "&File" "&Archivo"
-::msgcat::mcset es "&Help" "A&yuda"
-::msgcat::mcset es "&Images" "&Im\341genes"
-::msgcat::mcset es "&Open" "A&brir"
-::msgcat::mcset es "&Save" "Sal&var"
-::msgcat::mcset es "All files" "Todos los archivos"
-::msgcat::mcset es "Dismiss" "Descartar"
-::msgcat::mcset es "E&xit" "&Salir"
-::msgcat::mcset es "Files" "Archivos"
-::msgcat::mcset es "Image Files" "Archivos es imagen"
-::msgcat::mcset es "More tests" "M\341s pruebas"
-::msgcat::mcset es "OK"
-::msgcat::mcset es "OTHER" "OTRA"
-::msgcat::mcset es "Tests for available image formats" "Pruebas para los formatos es imagen disponibles"
-::msgcat::mcset es "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "Esta p\341gina muestra los formatos es imagen disponibles en la extensi\363n Img (versi\363n %s, usando Tcl/Tk %s)"
-::msgcat::mcset es "Tiny Image viewer" "Visor es im\341genes min\372sculo"
-::msgcat::mcset es "Viewer" "Visor"
-::msgcat::mcset es "end of tests" "fin es las pruebas"
-::msgcat::mcset es "error displaying %s image" "error mostrando la imagen %s"
-::msgcat::mcset es "error displaying animated gif" "error mostrando un gif animado"
-::msgcat::mcset es "starting tests" "comienzo es las pruebas"
-::msgcat::mcset es "written by" "escrito por"
diff --git a/tkimg1.3/demo/msgs/fr.msg b/tkimg1.3/demo/msgs/fr.msg
deleted file mode 100755
index 9050fb3..0000000
--- a/tkimg1.3/demo/msgs/fr.msg
+++ /dev/null
@@ -1,24 +0,0 @@
-::msgcat::mcset fr "&About" "A &propos"
-::msgcat::mcset fr "&Close" "F&ermer"
-::msgcat::mcset fr "&File" "&Fichier"
-::msgcat::mcset fr "&Help" "&Aide"
-::msgcat::mcset fr "&Images"
-::msgcat::mcset fr "&Open" "&Ouvrir"
-::msgcat::mcset fr "&Save" "&Sauvegarder"
-::msgcat::mcset fr "All files" "Tous les fichiers"
-::msgcat::mcset fr "Dismiss" "Fermer"
-::msgcat::mcset fr "E&xit" "&Quitter"
-::msgcat::mcset fr "Files" "Fichiers"
-::msgcat::mcset fr "Image Files" "Fichiers d'images"
-::msgcat::mcset fr "More tests" "Plus de tests"
-::msgcat::mcset fr "OK"
-::msgcat::mcset fr "OTHER" "OUTRE"
-::msgcat::mcset fr "Tests for available image formats" "Tests pour les formats d'images disponibles"
-::msgcat::mcset fr "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "Cette page affiche les formats d'images disponibles avec l'extension Img (version %s, utilisant Tcl/Tk %s)"
-::msgcat::mcset fr "Tiny Image viewer" "Petite visionneuse d'images"
-::msgcat::mcset fr "Viewer" "Visionneuse"
-::msgcat::mcset fr "end of tests" "fin des tests"
-::msgcat::mcset fr "error displaying %s image" "erreur en affichant l'image %s"
-::msgcat::mcset fr "error displaying animated gif" "erreur en affichant le gif anim\351"
-::msgcat::mcset fr "starting tests" "d\351but des tests"
-::msgcat::mcset fr "written by" "\351crit par"
diff --git a/tkimg1.3/demo/msgs/ja.msg b/tkimg1.3/demo/msgs/ja.msg
deleted file mode 100644
index 4e63958..0000000
--- a/tkimg1.3/demo/msgs/ja.msg
+++ /dev/null
@@ -1,25 +0,0 @@
-if {[package vcompare [info tclversion] 8.1] < 0} return
-::msgcat::mcset ja "&About" "\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3064\u3044\u3066(&A)"
-::msgcat::mcset ja "&Close" "\u9589\u3058\u308b(&C)"
-::msgcat::mcset ja "E&xit" "\u7d42\u4e86(&X)"
-::msgcat::mcset ja "&File" "\u30d5\u30a1\u30a4\u30eb(&F)"
-::msgcat::mcset ja "&Help" "\u3078\u30eb\u30d7(&H)"
-::msgcat::mcset ja "&Images" "\u30a4\u30e1\u30fc\u30b8(&I)"
-::msgcat::mcset ja "&Open" "\u958b\u304f(&O)"
-::msgcat::mcset ja "&Save" "\u4fdd\u5b58(&S)"
-::msgcat::mcset ja "All files" "\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb"
-::msgcat::mcset ja "Dismiss" "\u4e86\u89e3"
-::msgcat::mcset ja "Files" "\u30d5\u30a1\u30a4\u30eb"
-::msgcat::mcset ja "Image Files" "\u30a4\u30e1\u30fc\u30b8 \u30d5\u30a1\u30a4\u30eb"
-::msgcat::mcset ja "More tests" "\u3055\u3089\u306b\u30c6\u30b9\u30c8"
-::msgcat::mcset ja "OK" "\u4e86\u89e3"
-::msgcat::mcset ja "OTHER"
-::msgcat::mcset ja "Tests for available image formats" "\u5229\u7528\u53ef\u80fd\u306a\u30a4\u30e1\u30fc\u30b8\u306b\u5bfe\u3059\u308b\u30c6\u30b9\u30c8"
-::msgcat::mcset ja "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "\u3053\u306e\u30da\u30fc\u30b8\u3067\u306fImg\u62e1\u5f35\u30d1\u30c3\u30b1\u30fc\u30b8(version %s, Tcl/Tk %s)\u3067\u5229\u7528\u3067\u304d\u308b\u753b\u50cf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u8868\u793a\u3057\u307e\u3059"
-::msgcat::mcset ja "Tiny Image viewer"
-::msgcat::mcset ja "Viewer" "\u30d3\u30e5\u30fc\u30a2"
-::msgcat::mcset ja "end of tests" "\u30c6\u30b9\u30c8\u7d42\u4e86"
-::msgcat::mcset ja "error displaying %s image" "\u30a4\u30e1\u30fc\u30b8 %s \u306e\u8868\u793a\u5931\u6557"
-::msgcat::mcset ja "error displaying animated gif" "Gif \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8868\u793a\u5931\u6557"
-::msgcat::mcset ja "starting tests" "\u30c6\u30b9\u30c8\u958b\u59cb"
-::msgcat::mcset ja "written by"
diff --git a/tkimg1.3/demo/msgs/nl.msg b/tkimg1.3/demo/msgs/nl.msg
deleted file mode 100644
index 1ae24c2..0000000
--- a/tkimg1.3/demo/msgs/nl.msg
+++ /dev/null
@@ -1,24 +0,0 @@
-::msgcat::mcset nl "&About" "O&ver"
-::msgcat::mcset nl "&Close" "&Sluiten"
-::msgcat::mcset nl "&File" "&Open"
-::msgcat::mcset nl "&Help"
-::msgcat::mcset nl "&Images" "P&laatjes"
-::msgcat::mcset nl "&Open" "&Bestand"
-::msgcat::mcset nl "&Save" "O&pslaan"
-::msgcat::mcset nl "All files" "Alle bestanden"
-::msgcat::mcset nl "Dismiss" "Stoppen"
-::msgcat::mcset nl "E&xit" "S&toppen"
-::msgcat::mcset nl "Files" "Bestanden"
-::msgcat::mcset nl "Image Files" "Plaatjes bestanden"
-::msgcat::mcset nl "More tests" "Meer tests"
-::msgcat::mcset nl "OK"
-::msgcat::mcset nl "OTHER" "ANDERS"
-::msgcat::mcset nl "Tests for available image formats" "Tests voor beschikbare plaatjes-formaten"
-::msgcat::mcset nl "This page shows the available image formats of the Img extension (version %s, using Tcl/Tk %s)" "Deze pagina laat de beschikbare plaatjes-formaten van de Img extensie zien (versie %s, met Tcl/Tk %s)"
-::msgcat::mcset nl "Tiny Image viewer" "Mini Plaatjes kijker"
-::msgcat::mcset nl "Viewer" "Kijker"
-::msgcat::mcset nl "end of tests" "einde van tests"
-::msgcat::mcset nl "error displaying %s image" "fout in weergeven van %s plaatje"
-::msgcat::mcset nl "error displaying animated gif" "fout in weergeven van bewegend plaatje"
-::msgcat::mcset nl "starting tests" "begin van tests"
-::msgcat::mcset nl "written by" "geschreven door"
diff --git a/tkimg1.3/demo/tkv.tcl b/tkimg1.3/demo/tkv.tcl
deleted file mode 100755
index 4f704f0..0000000
--- a/tkimg1.3/demo/tkv.tcl
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/sh
-# The next line restarts using wish8.3 \
-exec wish8.3 $0 ${1+"$@"}
-
-source [file join [file dirname [info script]] imgmsg.tcl]
-
-proc mmc string {
-    regsub & $string {} string
-    return $string
-}
-
-proc mml string {
-    return [string first & $string]
-}
-
-#
-# Make the Image format available.
-#
-
-package require Img
-
-#
-# Initialization of some global variables
-#
-
-set tkvPriv(count) 0
-set tkvPriv(currentdir) [pwd]
-set tkvPriv(defaultext) .gif
-
-set tkvPriv(types) [list \
-    [list [mc "Image Files"]	{.bmp}		] \
-    [list [mc "Image Files"]	{.gif}		] \
-    [list [mc "Image Files"]	{.jpeg .jpg}	] \
-    [list [mc "Image Files"]	{.png}		] \
-    [list [mc "Image Files"]	{.tiff .tif}	] \
-    [list [mc "Image Files"]	{.xbm}		] \
-    [list [mc "Image Files"]	{.xpm}		] \
-    [list [mc "Image Files"]	{.ps .eps}		] \
-    [list "BMP [mc Files]"		{.bmp}		] \
-    [list "GIF [mc Files]"		{.gif}		] \
-    [list "JPEG [mc Files]"		{.jpeg .jpg}	] \
-    [list "PNG [mc Files]"		{.png}		] \
-    [list "TIFF [mc Files]"		{.tiff .tif}	] \
-    [list "XBM [mc Files]"		{.xbm}		] \
-    [list "XPM [mc Files]"		{.xpm}		] \
-    [list "Postscript [mc Files]"	{.ps .eps}		] \
-    [list "GIF [mc Files]"		{}			GIFF] \
-    [list "JPEG [mc Files]"		{}			JPEG] \
-    [list "PNG [mc Files]"		{}			PNGF] \
-    [list "TIFF [mc Files]"		{}			TIFF] \
-    [list [mc {All files}]		*] \
-]
-
-proc Menu {base name} {
-    set menu [ConCat $base menu]
-    if {![winfo exists $menu]} {
-	menu $menu
-	$base configure -menu $menu
-    }
-    set accelerator [string toupper [string index $name 0]]
-    set text [mc "&$accelerator[string range $name 1 end]"]
-    set name $menu.$name
-    if {![winfo exists $name]} {
-	menu $name
-	$menu add cascade -label [mmc $text] -menu $name -underline [mml $text]
-    }
-    return $name
-}
-
-#
-# Small proc to concatenate window pathnames
-#
-proc ConCat args {
-    regsub -all {[ 	\.]+} $args . args
-    return $args
-}
-
-#
-#  Create a new image window
-#
-
-proc image_window {{window {}}} {
-    global tkvPriv
-    if {![string compare $window {}]} {
-	set window .image$tkvPriv(count)
-	incr tkvPriv(count)
-    }
-    if {[winfo exists $window]} {
-	catch {eval destroy [winfo children $window]}
-    } else {
-	toplevel $window
-    }
-    wm title $window [mc {Viewer}]
-    set frame [ConCat $window frame]
-    label $frame -relief sunken -bg white -bd 2 -anchor nw
-    set w [Menu $window file]
-    $w configure -tearoff 0
-    set text [mc &Open]
-    $w add command -label [mmc $text] -command [list load_image $window] -underline [mml $text]
-    set text [mc &Save]
-    $w add command -label [mmc $text] -command [list save_image $window] -underline [mml $text]
-    $w add separator
-    set text [mc &Close]
-    $w add command -label [mmc $text] -command [list destroy $window] -underline [mml $text]
-    set text [mc E&xit]
-    $w add command -label [mmc $text] -command [list destroy .] -underline [mml $text]
-
-    set w [Menu $window images]
-    set w [Menu $window help]
-    $w configure -tearoff 0
-    set text [mc &About]
-    $w add command -label [mmc $text] -command About -underline [mml $text]
-
-    catch {wm geometry $window 200x200}
-    pack $frame -side top -expand y -fill both
-    return $frame
-}
-
-proc register_image {w name} {
-    set menu [Menu $w images]
-    set item [file tail [lindex $name 0]]
-    if {[llength $name] > 1} {
-	append item " [lindex $name 1]"
-    }
-    $menu add command -label $item -command \
-	[list show_image $w $name]
-}
-
-proc show_image {window name} {
-    [ConCat $window frame] configure -image $name
-    catch {wm geometry $window {}}
-}
-
-proc load_image window {
-    global tkvPriv
-    set filename [tk_getOpenFile -filetypes $tkvPriv(types) -parent \
-	    $window -initialdir $tkvPriv(currentdir)]
-    if {[string compare $filename {}]} {
-	set imagename [list $filename]
-	image create photo $imagename -file $filename
-	register_image $window $imagename
-	show_image $window $imagename
-	set tkvPriv(currentdir) [file dirname $filename]
-    }
-}
-
-proc save_image window {
-    global tkvPriv
-    set img [[ConCat $window frame] cget -image]
-    set filename [tk_getSaveFile -filetypes $tkvPriv(types) -parent \
-	    $window -initialdir $tkvPriv(currentdir) -defaultextension .gif \
-	    -initialfile [file rootname [lindex $img 0]].gif]
-    if {[string compare $filename {}]} {
-	$img write $filename -format gif
-	set tkvPriv(currentdir) [file dirname $filename]
-    }
-}
-
-proc About {} {
-    tk_dialog .about "[mmc [mc &About]] tkv.tcl" "[mc {Tiny Image viewer}]\n[mc {written by}]\
-	    Jan Nijtmans <j.nijtmans at chello.nl>" {} 0 [mc O.K.]
-}
-
-set w [lindex $argv 1]
-if {![string compare $w {}]} {
-    set w .
-}
-set filename [lindex $argv 0]
-
-image_window $w
-if {[string compare $filename {}]} {
-    set imagename [list $filename]
-    image create photo $imagename -file $filename
-    register_image $w $imagename
-    show_image $w $imagename
-}
diff --git a/tkimg1.3/doc/default.css b/tkimg1.3/doc/default.css
deleted file mode 100644
index 3b716f1..0000000
--- a/tkimg1.3/doc/default.css
+++ /dev/null
@@ -1,24 +0,0 @@
-body {
-    background: white;
-    color: black;
-}
-
-h1 {
-    align: center;
-}
-
-h2 {
-    align: center;
-}
-
-h3 {
-    align: center;
-}
-
-img.right {
-   float: right;
-}
-
-img.left {
-   float: left;
-}
\ No newline at end of file
diff --git a/tkimg1.3/doc/format-footer.inc b/tkimg1.3/doc/format-footer.inc
deleted file mode 100644
index ca51b6c..0000000
--- a/tkimg1.3/doc/format-footer.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-[comment {-*- tcl -*- doctools = format-footer.inc}]
-[list_end]
-
-[see_also img-intro img-bmp img-gif img-ico img-jpeg img-pcx img-pixmap img-png img-ppm img-ps img-sgi img-sun img-tga img-tiff img-window img-xbm img-xpm]
-[keywords {image handling} tk [vset FORMATNAME]]
-[manpage_end]
diff --git a/tkimg1.3/doc/format-header.inc b/tkimg1.3/doc/format-header.inc
deleted file mode 100644
index 380ac5c..0000000
--- a/tkimg1.3/doc/format-header.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-[comment {-*- tcl -*- doctools = format-header.inc}]
-
-[manpage_begin img-[vset FORMATNAME] n 1.3]
-[moddesc Img]
-[titledesc "Img, [vset FORMATFULLNAME] ([vset FORMATNAME])"]
-[copyright {1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>}]
-[require Tk]
-[require img::[vset FORMATNAME] [opt 1.3]]
-[description]
-
-The package [package img::[vset FORMATNAME]] is a sub-package of
-[package Img]. It can be loaded as a part of the complete Img support,
-via [cmd {package require Img}], or on its own, via
-
-[cmd "package require img::[vset FORMATNAME]"].
-
-[para]
-
-Like all packages of [package Img] it does [emph not] provide new
-commands, but extends the existing [package Tk] command [cmd image] so
-that it supports files containing raster images in the
-
-[vset FORMATFULLNAME] ([vset FORMATNAME]). More specifically
-
-[package img::[vset FORMATNAME]] extends [package Tk]'s [cmd photo]
-image type.
-
-[para]
-
-The name of the new format handler is [const [vset FORMATNAME]].
diff --git a/tkimg1.3/doc/format-middle.inc b/tkimg1.3/doc/format-middle.inc
deleted file mode 100644
index f217e94..0000000
--- a/tkimg1.3/doc/format-middle.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-[comment {-*- tcl -*- doctools = format-middle.inc}]
-[para]
-
-All of the above means that in a call like
-
-[list_begin definitions]
-[call [cmd image] [method {create photo}] [opt [arg name]] [opt [arg options]]]
-[list_end]
-
-[list_begin enum]
-[enum]
-Image data in [vset FORMATNAME] format (options [option -data] and [option -file]) is
-detected automatically.
-
-[enum]
-The format name [const [vset FORMATNAME]] is recognized by the option [option -format].
diff --git a/tkimg1.3/doc/html/img-bmp.html b/tkimg1.3/doc/html/img-bmp.html
deleted file mode 100644
index 45e9248..0000000
--- a/tkimg1.3/doc/html/img-bmp.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-bmp - Img </title>
-</head>
-<! -- Generated from file './img-bmp.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-bmp.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-bmp.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-bmp(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-bmp - Img, Windows Bitmap Format (bmp)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::bmp ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::bmp</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::bmp</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Windows Bitmap Format (bmp). More specifically
-
-<strong>img::bmp</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>bmp</strong>.
-
-
-This handler does not provide additional configuration options.
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in bmp format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>bmp</strong> is recognized by the option <strong>-format</strong>.
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</ol>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key0"> bmp </a>, <a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-gif.html b/tkimg1.3/doc/html/img-gif.html
deleted file mode 100644
index 96905f9..0000000
--- a/tkimg1.3/doc/html/img-gif.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-gif - Img </title>
-</head>
-<! -- Generated from file './img-gif.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-gif.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-gif.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-gif(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-gif - Img, Graphics Interchange Format (gif)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#gifoptions">GIF OPTIONS</a><br>    <a href="#imagecompression">IMAGE COMPRESSION</a><br>    <a href="#transparency">TRANSPARENCY</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::gif ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::gif</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::gif</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Graphics Interchange Format (gif). More specifically
-
-<strong>img::gif</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>gif</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#gifoptions">GIF OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in gif format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>gif</strong> is recognized by the option <strong>-format</strong>.
-
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#gifoptions">GIF OPTIONS</a>.
-
-</ol>
-
-
-
-<h2><a name="gifoptions">GIF OPTIONS</a></h2>
-<p>
-
-The handler provides two options, one for reading from a GIF image,
-the other influencing the writing of such. 
-
-<dl>
-
-<dt><strong>-index</strong> <i class='arg'>n</i><dd>
-
-This option is for reading from GIF files containing more than one
-image (<em>animated GIF's</em>, <em>GIF movies</em>. When specified it
-will read the <i class='arg'>n</i>'th image in the data. The first image is at
-index <strong>0</strong> and will be read by default, i.e. when the option is
-not specified.
-
-<br><br>
-<dt><strong>-interlaced</strong> <i class='arg'>bool</i><dd>
-
-If the value of this option is set to true the image will be written
-using the interlaced sub-format of GIF. The default is to write
-non-interlaced files. <em>This option is not implemented yet.</em>
-
-</dl>
-
-<h2><a name="imagecompression">IMAGE COMPRESSION</a></h2>
-<p>
-
-Instead of LZW the run-length encoding of Hutchison Avenue Software
-Corporation is used, also known as <em>miGIF</em> compression. The miGIF
-compression routines do not, strictly speaking, generate files
-conforming to the GIF spec, since the image data is not LZW-compressed
-(this is the point: in order to avoid transgression of the Unisys
-patent on the LZW algorithm.) However, miGIF generates data streams
-that any reasonably sane LZW decompresser will decompress to what we
-want.
-
-<h2><a name="transparency">TRANSPARENCY</a></h2>
-<p>
-
-If you want to write images to disk which contain transparency
-information (e.g. GIF89) you need at least <strong>Tk</strong> 8.3.
-
-
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key2"> gif </a>, <a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-ico.html b/tkimg1.3/doc/html/img-ico.html
deleted file mode 100644
index 18616b2..0000000
--- a/tkimg1.3/doc/html/img-ico.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-ico - Img </title>
-</head>
-<! -- Generated from file './img-ico.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-ico.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-ico.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-ico(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-ico - Img, Windows Icon Format (ico)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedicotypes">SUPPORTED ICO TYPES</a><br>    <a href="#icooptions">ICO OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::ico ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::ico</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::ico</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Windows Icon Format (ico). More specifically
-
-<strong>img::ico</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>ico</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#icooptions">ICO OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in ico format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>ico</strong> is recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#icooptions">ICO OPTIONS</a>.
-
-</ol>
-
-
-<h2><a name="supportedicotypes">SUPPORTED ICO TYPES</a></h2>
-<p>
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
-  1-bit pixels: Black and White.
-  4-bit pixels: Grayscale or indexed.
-  8-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  4-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | Yes   | Yes   |
-</pre></td></tr></table></p>
-
-
-<h2><a name="icooptions">ICO OPTIONS</a></h2>
-<p>
-
-The handler provides the following options:
-
-<dl>
-
-<dt><strong>-verbose</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>true</strong>, additional information about the loaded/stored image
-is printed to stdout. Default is <strong>false</strong>.
-
-<br><br>
-<dt><strong>-index</strong> <i class='arg'>n</i><dd>
-
-This option is supported for reading only.
-<br><br>
-Read the <i class='arg'>n</i>'th image. The first image is at index <strong>0</strong>.
-Default is <strong>0</strong>.
-
-</dl>
-
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key4"> ico </a>, <a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-jpeg.html b/tkimg1.3/doc/html/img-jpeg.html
deleted file mode 100644
index acd2f4b..0000000
--- a/tkimg1.3/doc/html/img-jpeg.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-jpeg - Img </title>
-</head>
-<! -- Generated from file './img-jpeg.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-jpeg.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-jpeg.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-jpeg(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-jpeg - Img, Joint Picture Expert Group format (jpeg)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#jpegoptions">JPEG OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::jpeg ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::jpeg</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::jpeg</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Joint Picture Expert Group format (jpeg). More specifically
-
-<strong>img::jpeg</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>jpeg</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#jpegoptions">JPEG OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in jpeg format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>jpeg</strong> is recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#jpegoptions">JPEG OPTIONS</a>.
-
-</ol>
-
-
-
-<h2><a name="jpegoptions">JPEG OPTIONS</a></h2>
-<p>
-
-The handler provides six options, two effective when reading from a
-JPEG image, and five influencing the writing of such. One option is
-usable for both reading an writing.
-
-<dl>
-
-<dt><strong>-fast</strong><dd>
-
-This option is for reading from JPEG data. It usage activates a
-processing mode which is fast, but also provides only low-quality
-information.
-
-
-<br><br>
-<dt><strong>-grayscale</strong><dd>
-
-This option can be used for both reading and writing of JPEG
-data. Usage of this option forces incoming images to grayscale, and
-written images will be monochrome.
-
-
-<br><br>
-<dt><strong>-quality</strong> <i class='arg'>n</i><dd>
-
-This option is for writing JPEG data. It specifies the compression
-level as a quality percentage. The higher the quality, the less the
-compression. The nominal range for <i class='arg'>n</i> is
-
-<strong>0</strong>...<strong>100</strong>. Useful values are in the range
-<strong>5</strong>...<strong>95</strong>. The default value is <strong>75</strong>.
-
-
-<br><br>
-<dt><strong>-smooth</strong> <i class='arg'>n</i><dd>
-
-This option is for writing JPEG data. When used the writer will smooth
-the image before performing the compression. Values in the
-
-<strong>10</strong>...<strong>30</strong> are usually enough. The default is <strong>0</strong>,
-i.e no smoothing.
-
-
-<br><br>
-<dt><strong>-optimize</strong><dd>
-
-This option is for writing JPEG data. It usage causes the writer to
-optimize the huffman table used to encode the jpeg coefficients.
-
-
-<br><br>
-<dt><strong>-progressive</strong><dd>
-
-This option is for writing JPEG data. It usage causes the creation of
-a <em>progressive</em> JPEG file.
-
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key6"> jpeg </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-pcx.html b/tkimg1.3/doc/html/img-pcx.html
deleted file mode 100644
index 57a626d..0000000
--- a/tkimg1.3/doc/html/img-pcx.html
+++ /dev/null
@@ -1,165 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-pcx - Img </title>
-</head>
-<! -- Generated from file './img-pcx.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-pcx.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-pcx.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-pcx(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-pcx - Img, Paintbrush Format (pcx)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedpcxtypes">SUPPORTED PCX TYPES</a><br>    <a href="#pcxoptions">PCX OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::pcx ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::pcx</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::pcx</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Paintbrush Format (pcx). More specifically
-
-<strong>img::pcx</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>pcx</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#pcxoptions">PCX OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in pcx format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>pcx</strong> is recognized by the option <strong>-format</strong>.
-
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#pcxoptions">PCX OPTIONS</a>.
-
-</ol>
-
-
-<h2><a name="supportedpcxtypes">SUPPORTED PCX TYPES</a></h2>
-<p>
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 
- List of currently supported features:
- 
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 
- All images types may be either uncompressed or run-length encoded.
-</pre></td></tr></table></p>
-
-
-<h2><a name="pcxoptions">PCX OPTIONS</a></h2>
-<p>
-
-The handler provides the following options:
-
-<dl>
-
-<dt><strong>-verbose</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>true</strong>, additional information about the loaded/stored image
-is printed to stdout. Default is <strong>false</strong>.
-
-<br><br>
-<dt><strong>-compression</strong> <i class='arg'>type</i><dd>
-
-This option is supported for writing only.
-<br><br>
-Set the compression mode to either <strong>none</strong> or <strong>rle</strong>.
-Default is <strong>rle</strong>.
-
-</dl>
-
-
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key7"> pcx </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-pixmap.html b/tkimg1.3/doc/html/img-pixmap.html
deleted file mode 100644
index 5bf79e3..0000000
--- a/tkimg1.3/doc/html/img-pixmap.html
+++ /dev/null
@@ -1,155 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<html><head>
-<title>img-pixmap - Img </title>
-</head>
-<! -- Generated from file './img-pixmap.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-pixmap.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-pixmap.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-pixmap(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-pixmap - Img, Pixmap Image type (pixmap)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#creatingpixmaps">CREATING PIXMAPS</a><br>    <a href="#imagecommand">IMAGE COMMAND</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::pixmap ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create pixmap</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-<tr valign=top ><td ><a href="#2"><i class='arg'>imageName</i> <strong>option</strong> ?<i class='arg'>arg arg ...</i>?</a></td></tr>
-<tr valign=top ><td ><a href="#3"><i class='arg'>imageName</i> <strong>cget</strong> <i class='arg'>option</i></a></td></tr>
-<tr valign=top ><td ><a href="#4"><i class='arg'>imageName</i> <strong>configure</strong> ?<strong>option</strong>? ?<i class='arg'>value option value ...</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::pixmap</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::pixmap</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b>.
-
-<p>
-
-In contrast to all other sub packages this packages does <em>not</em>
-extend <strong>Tk</strong>'s <b class='cmd'>photo</b> image type, but rather provides a
-completely new image type, on the same level as <b class='cmd'>photo</b> and
-<b class='cmd'>bitmap</b>.
-
-<h2><a name="creatingpixmaps">CREATING PIXMAPS</a></h2>
-<p>
-
-Like all images, pixmaps are created using the <b class='cmd'>image create</b>
-command.
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create pixmap</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-
-Pixmaps support the following options:
-
-<br><br>
-<dl>
-<dt><strong>-data</strong> <i class='arg'>string</i><dd>
-
-Specifies the contents of the source pixmap as a string. The string
-must adhere to X11 pixmap format (e.g., as generated by the pixmap
-program). If both the <strong>-data</strong> and <strong>-file</strong> options are
-specified, the <strong>-data</strong> option takes precedence.
-
-<br><br>
-<dt><strong>-file</strong> <i class='arg'>name</i><dd>
-
-<i class='arg'>name</i> gives the name of a file whose contents define the source
-pixmap. The file must adhere to X11 pixmap format (e.g., as generated
-by the pixmap program).
-
-</dl>
-</dl>
-
-<h2><a name="imagecommand">IMAGE COMMAND</a></h2>
-<p>
-
-When a pixmap image is created, Tk also creates a new com­ mand whose
-name is the same as the image.  This command may be used to invoke
-various operations on the image.  It has the following general form:
-
-<dl>
-<dt><a name="2"><i class='arg'>imageName</i> <strong>option</strong> ?<i class='arg'>arg arg ...</i>?</a><dd>
-
-</dl>
-
-<strong>Option</strong> and the args determine the exact behavior of the
-command. The following commands are possible for pixmap images:
-
-<dl>
-
-<dt><a name="3"><i class='arg'>imageName</i> <strong>cget</strong> <i class='arg'>option</i></a><dd>
-
-
-Returns the current value of the configuration option given by
-
-<i class='arg'>option</i>. <i class='arg'>Option</i> may have any of the values accepted by the
-<b class='cmd'>image create pixmap</b> command.
-
-
-<br><br>
-<dt><a name="4"><i class='arg'>imageName</i> <strong>configure</strong> ?<strong>option</strong>? ?<i class='arg'>value option value ...</i>?</a><dd>
-
-
-Query or modify the configuration options for the image. If no option
-is specified, returns a list describing all of the available options
-for <i class='arg'>imageName</i> (see <b class='cmd'>Tk_ConfigureInfo</b> for information on the
-format of this list). If <i class='arg'>option</i> is specified with no
-
-<i class='arg'>value</i>, then the command returns a list describing the one named
-option (this list will be identi­ cal to the corresponding sublist of
-the value returned if no option is specified).  If one or more
-
-<i class='arg'>option-value</i> pairs are specified, then the command modifies the
-given option(s) to have the given value(s); in this case the command
-returns an empty string. <strong>Option</strong> may have any of the values
-accepted by the <b class='cmd'>image create pixmap</b> command.
-
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key9"> pixmap </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-png.html b/tkimg1.3/doc/html/img-png.html
deleted file mode 100644
index 8f312dc..0000000
--- a/tkimg1.3/doc/html/img-png.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-png - Img </title>
-</head>
-<! -- Generated from file './img-png.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-png.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-png.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-png(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-png - Img, Portable Network Graphics format (png)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#pngoptions">PNG OPTIONS</a><br>    <a href="#transparency">TRANSPARENCY</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::png ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::png</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::png</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Portable Network Graphics format (png). More specifically
-
-<strong>img::png</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>png</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#pngoptions">PNG OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in png format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>png</strong> is recognized by the option <strong>-format</strong>.
-
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#pngoptions">PNG OPTIONS</a>.
-
-</ol>
-
-
-
-<h2><a name="pngoptions">PNG OPTIONS</a></h2>
-<p>
-
-The handler provides no true options at all, but accepts pairs of keys
-and values when writing a PNG file. Each pair will be written as a
-named text chunk where the key provides the name of the chunk and the
-value its contents.
-
-For example
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
-    png Author <name> Title <title> Description ...
-</pre></td></tr></table></p>
-
-
-<h2><a name="transparency">TRANSPARENCY</a></h2>
-<p>
-
-If you want to write images to disk which contain transparency
-information (e.g. PNG with alpha channel) you need at least
-
-<strong>Tk</strong> 8.3.
-
-
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key10"> png </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-ppm.html b/tkimg1.3/doc/html/img-ppm.html
deleted file mode 100644
index 54e1852..0000000
--- a/tkimg1.3/doc/html/img-ppm.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-ppm - Img </title>
-</head>
-<! -- Generated from file './img-ppm.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-ppm.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-ppm.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-ppm(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-ppm - Img, Portable Pixmap format (ppm)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedppmtypes">SUPPORTED PPM TYPES</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::ppm ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::ppm</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::ppm</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Portable Pixmap format (ppm). More specifically
-
-<strong>img::ppm</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>ppm</strong>.
-
-
-This handler does not provide additional configuration options.
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in ppm format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>ppm</strong> is recognized by the option <strong>-format</strong>.
-
-
-</ol>
-
-<h2><a name="supportedppmtypes">SUPPORTED PPM TYPES</a></h2>
-<p>
-
-There are two types of PPM files: RAW (binary) and ASCII.
-Currently only the RAW format is implemented.
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
-  8-bit pixels: Grayscale, also known as PGM.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  8-bit | Yes   | Yes   | Yes   | Yes   |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
-
-</pre></td></tr></table></p>
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key12"> ppm </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-ps.html b/tkimg1.3/doc/html/img-ps.html
deleted file mode 100644
index b42c472..0000000
--- a/tkimg1.3/doc/html/img-ps.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-ps - Img </title>
-</head>
-<! -- Generated from file './img-ps.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-ps.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-ps.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-ps(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-ps - Img, Adobe PostScript Format (ps)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#postscriptoptions">PostScript OPTIONS</a><br>    <a href="#requirements">REQUIREMENTS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::ps ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::ps</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::ps</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Adobe PostScript Format (ps). More specifically
-
-<strong>img::ps</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>ps</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#postscriptoptions">PostScript OPTIONS</a> for more detailed explanations.
-
-<p>
-
-Note that this package provides a <strong>pdf</strong> handler too, i.e. a
-handler for the Adobe Portable Document Format. That handler accepts
-the same options as the <strong>ps</strong> handler.
-
-<p>
-
-The package delegates the actual conversion of data in PostScript and
-PDF format into a raster image to the <strong><a href="../index.html#key1"> ghostscript </a></strong>
-application. It therefore depends upon the presence of said
-application and is non-functional is <strong><a href="../index.html#key1"> ghostscript </a></strong> is not
-present.
-
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in ps and PDF format (options <strong>-data</strong>
-and <strong>-file</strong>) is detected automatically.
-
-<br><br>
-<li>
-
-The format names <strong>ps</strong> and <strong>pdf</strong> are
-recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#postscriptoptions">PostScript OPTIONS</a>.
-
-</ol>
-
-
-
-<h2><a name="postscriptoptions">PostScript OPTIONS</a></h2>
-<p>
-
-The handler provides two options, both influencing the reading of
-PostScript or PDF images. The handler is <em>not</em> able to write
-images in PostScript or PDF.
-
-
-<dl>
-
-<dt><strong>-index</strong> <i class='arg'>n</i><dd>
-
-This option is for reading from PostScript/PDF data containing more
-than one page. When specified it will read the <i class='arg'>n</i>'th page in the
-data. The first page is at index <strong>0</strong> and will be read by
-default, i.e. when the option is not specified.
-
-<br><br>
-
-<em>Note:</em> This option is not yet implemented.
-
-
-<br><br>
-<dt><strong>-zoom</strong> <i class='arg'>X</i> <i class='arg'>Y</i><dd>
-
-Multiply image size by the given scale factors. If <i class='arg'>Y</i> is missing,
-the default is the same as <i class='arg'>X</i>. <i class='arg'>X</i> and <i class='arg'>Y</i> are allowed to
-be in floating point format, but they are rounded to the nearest
-practically possible value. For postscript this means the zoom factors
-should be multiples of 1/72.
-
-
-</dl>
-
-<h2><a name="requirements">REQUIREMENTS</a></h2>
-<p>
-
-The code provided by Img does not perform the interpretation and
-rasterizing of the input by itself but delegates this to the
-<strong><a href="../index.html#key3"> gs </a></strong> application. This is the GhostScript implementation
-of PostScript (and PDF).
-
-<p>
-
-If <strong><a href="../index.html#key3"> gs </a></strong> is not installed this format handler cannot be used.
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key1"> ghostscript </a>, <a href="../index.html#key3"> gs </a>, <a href="../index.html#key5"> image handling </a>, <a href="../index.html#key8"> pdf </a>, <a href="../index.html#key11"> postscript </a>, <a href="../index.html#key13"> ps </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
diff --git a/tkimg1.3/doc/html/img-sgi.html b/tkimg1.3/doc/html/img-sgi.html
deleted file mode 100644
index e9b098b..0000000
--- a/tkimg1.3/doc/html/img-sgi.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-sgi - Img </title>
-</head>
-<! -- Generated from file './img-sgi.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-sgi.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-sgi.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-sgi(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-sgi - Img, SGI Native Format (sgi)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedsgitypes">SUPPORTED SGI TYPES</a><br>    <a href="#sgioptions">SGI OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::sgi ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::sgi</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::sgi</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-SGI Native Format (sgi). More specifically
-
-<strong>img::sgi</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>sgi</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#sgioptions">SGI OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in sgi format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>sgi</strong> is recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#sgioptions">SGI OPTIONS</a>.
-
-</ol>
-
-
-<h2><a name="supportedsgitypes">SUPPORTED SGI TYPES</a></h2>
-<p>
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- 48-bit pixels: True-color (RGB, each channel 16 bit).
- 64-bit pixels: True-color with alpha channel (RGBA, each channel 16 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes*  | Yes   | Yes*  |
- 32-bit | Yes   | Yes*  | Yes   | Yes*  |
- 48-bit | Yes   | Yes*  | No    | No    |
- 64-bit | Yes   | Yes*  | No    | No    |
-
- *: Implemented by reading/writing from/to a temporary file. This will
-    be slow for larger images.
-
- All images types may be either uncompressed or run-length encoded.
-</pre></td></tr></table></p>
-
-
-<h2><a name="sgioptions">SGI OPTIONS</a></h2>
-<p>
-
-The handler provides the following options:
-
-<dl>
-
-<dt><strong>-verbose</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>true</strong>, additional information about the loaded/stored image
-is printed to stdout. Default is <strong>false</strong>.
-
-<br><br>
-<dt><strong>-compression</strong> <i class='arg'>type</i><dd>
-
-This option is supported for writing only.
-<br><br>
-Set the compression mode to either <strong>none</strong> or <strong>rle</strong>.
-Default is <strong>rle</strong>.
-
-<br><br>
-<dt><strong>-matte</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>false</strong>, a matte (alpha) channel is ignored
-during reading or writing. Default is <strong>true</strong>.
-
-</dl>
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key14"> sgi </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-sun.html b/tkimg1.3/doc/html/img-sun.html
deleted file mode 100644
index 1ddcdb0..0000000
--- a/tkimg1.3/doc/html/img-sun.html
+++ /dev/null
@@ -1,172 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-sun - Img </title>
-</head>
-<! -- Generated from file './img-sun.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-sun.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-sun.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-sun(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-sun - Img, Sun Raster Format (sun)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedsuntypes">SUPPORTED SUN TYPES</a><br>    <a href="#sunoptions">SUN OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::sun ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::sun</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::sun</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Sun Raster Format (sun). More specifically
-
-<strong>img::sun</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>sun</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#sunoptions">SUN OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in sun format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>sun</strong> is recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#sunoptions">SUN OPTIONS</a>.
-
-</ol>
-
-
-<h2><a name="supportedsuntypes">SUPPORTED SUN TYPES</a></h2>
-<p>
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed or run-length encoded.
-</pre></td></tr></table></p>
-
-
-<h2><a name="sunoptions">SUN OPTIONS</a></h2>
-<p>
-
-The handler provides the following options:
-
-<dl>
-
-<dt><strong>-verbose</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>true</strong>, additional information about the loaded/stored image
-is printed to stdout. Default is <strong>false</strong>.
-
-<br><br>
-<dt><strong>-compression</strong> <i class='arg'>type</i><dd>
-
-This option is supported for writing only.
-<br><br>
-Set the compression mode to either <strong>none</strong> or <strong>rle</strong>.
-Default is <strong>rle</strong>.
-
-<br><br>
-<dt><strong>-matte</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>false</strong>, a matte (alpha) channel is ignored
-during reading or writing. Default is <strong>true</strong>.
-
-</dl>
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key15"> sun </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-tga.html b/tkimg1.3/doc/html/img-tga.html
deleted file mode 100644
index a130b1e..0000000
--- a/tkimg1.3/doc/html/img-tga.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-tga - Img </title>
-</head>
-<! -- Generated from file './img-tga.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-tga.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-tga.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-tga(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-tga - Img, Truevision Targa Format (tga)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#supportedtgatypes">SUPPORTED TGA TYPES</a><br>    <a href="#tgaoptions">TGA OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::tga ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::tga</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::tga</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Truevision Targa Format (tga). More specifically
-
-<strong>img::tga</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>tga</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#tgaoptions">TGA OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in tga format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>tga</strong> is recognized by the option <strong>-format</strong>.
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#tgaoptions">TGA OPTIONS</a>.
-
-</ol>
-
-
-<h2><a name="supportedtgatypes">SUPPORTED TGA TYPES</a></h2>
-<p>
-
-<p><table><tr><td bgcolor=black> </td><td><pre class='sample'>
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed (Targa-Type 2) or
- run-length encoded (Targa-Type 10).
-</pre></td></tr></table></p>
-
-
-<h2><a name="tgaoptions">TGA OPTIONS</a></h2>
-<p>
-
-The handler provides the following options:
-
-<dl>
-
-<dt><strong>-verbose</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>true</strong>, additional information about the loaded/stored image
-is printed to stdout. Default is <strong>false</strong>.
-
-<br><br>
-<dt><strong>-compression</strong> <i class='arg'>type</i><dd>
-
-This option is supported for writing only.
-<br><br>
-Set the compression mode to either <strong>none</strong> or <strong>rle</strong>.
-Default is <strong>rle</strong>.
-
-<br><br>
-<dt><strong>-matte</strong> <i class='arg'>bool</i><dd>
-
-This option is supported for reading and writing.
-<br><br>
-If set to <strong>false</strong>, a matte (alpha) channel is ignored
-during reading or writing. Default is <strong>true</strong>.
-
-</dl>
-
-<dl>
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key16"> tga </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-tiff.html b/tkimg1.3/doc/html/img-tiff.html
deleted file mode 100644
index 23986c6..0000000
--- a/tkimg1.3/doc/html/img-tiff.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-tiff - Img </title>
-</head>
-<! -- Generated from file './img-tiff.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-tiff.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-tiff.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-tiff(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-tiff - Img, Tagged Image File Format (tiff)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#tiffoptions">TIFF OPTIONS</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::tiff ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::tiff</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::tiff</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-Tagged Image File Format (tiff). More specifically
-
-<strong>img::tiff</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>tiff</strong>.
-
-
-This handler provides new additional configuration options. See
-section <a href="#tiffoptions">TIFF OPTIONS</a> for more detailed explanations.
-
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in tiff format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>tiff</strong> is recognized by the option <strong>-format</strong>.
-
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-<a href="#tiffoptions">TIFF OPTIONS</a>.
-
-</ol>
-
-
-
-<h2><a name="tiffoptions">TIFF OPTIONS</a></h2>
-<p>
-
-The handler provides two options to influence the writing of a TIFF
-image. There are <em>no</em> options to influence the reader.
-
-
-<dl>
-
-<dt><strong>-compression</strong> <i class='arg'>type</i><dd>
-
-This option specifies the type of compression to use when writing TIFF
-data. It has to be one of <strong>none</strong>, <strong>jpeg</strong>,
-<strong>packbits</strong>, or <strong>deflate</strong>. The default is <strong>none</strong>.
-
-
-<br><br>
-<dt><strong>-byteorder</strong> <i class='arg'>type</i><dd>
-
-This option specifies the byteorder to use when writing TIFF data. It
-has to be one of <strong>bigendian</strong>, <strong>littleendian</strong>,
-
-<strong>network</strong>, <strong>smallendian</strong>, or the empty string. The default
-is the empty string.
-
-<br><br>
-
-The values <strong>bigendian</strong> and <strong>network</strong> are aliases of each
-other, as are <strong>littleendian</strong> and <strong>smallendian</strong>.
-
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</dl>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key17"> tiff </a>, <a href="../index.html#key18"> tk </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-window.html b/tkimg1.3/doc/html/img-window.html
deleted file mode 100644
index b50fc5b..0000000
--- a/tkimg1.3/doc/html/img-window.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<html><head>
-<title>img-window - Img </title>
-</head>
-<! -- Generated from file './img-window.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-window.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-window.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-window(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-window - Img, Tk Windows (window)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::window ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::window</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::window</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b>.
-More specifically
-
-<strong>img::window</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>window</strong>.
-
-<p>
-
-This handler does not provide additional configuration options.
-
-This handler is special. Instead of reading or writing image data from
-a file or string it allows the embedding of a Tk widget into the photo
-image. In other words, it takes a snapshot of the contents of a Tk
-window.
-
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-
-Image data in window format (option <strong>-data</strong>) is
-detected automatically. Image data is considered to be in the
-
-<strong>window</strong> format if the value given to option
-<strong>-data</strong> is the name of an existing Tk window.
-
-<br><br>
-
-Note that the standard option <strong>-file</strong> is not supported by this
-handler.
-
-
-<br><br>
-<li>
-The format name <strong>window</strong> is recognized by the option <strong>-format</strong>.
-
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</ol>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>, <a href="../index.html#key19"> window </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-xbm.html b/tkimg1.3/doc/html/img-xbm.html
deleted file mode 100644
index 4b3dc15..0000000
--- a/tkimg1.3/doc/html/img-xbm.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-xbm - Img </title>
-</head>
-<! -- Generated from file './img-xbm.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-xbm.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-xbm.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-xbm(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-xbm - Img, X Windows Bitmap Format (xbm)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::xbm ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::xbm</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::xbm</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-X Windows Bitmap Format (xbm). More specifically
-
-<strong>img::xbm</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>xbm</strong>.
-
-
-This handler does not provide additional configuration options.
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in xbm format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>xbm</strong> is recognized by the option <strong>-format</strong>.
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</ol>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>, <a href="../index.html#key20"> xbm </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img-xpm.html b/tkimg1.3/doc/html/img-xpm.html
deleted file mode 100644
index 8fb04b1..0000000
--- a/tkimg1.3/doc/html/img-xpm.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-
-
-
-<! -- -*- tcl -*- doctools = format-header.inc
-   -->
-
-<html><head>
-<title>img-xpm - Img </title>
-</head>
-<! -- Generated from file './img-xpm.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img-xpm.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-xpm.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-xpm(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-xpm - Img, X Windows Pixmap Format (xpm)
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>img::xpm ?1.3?</b><br>
-<br><table border=1 width=100% cellspacing=0 cellpadding=0><tr            bgcolor=lightyellow><td bgcolor=lightyellow><table 0 width=100% cellspacing=0 cellpadding=0><tr valign=top ><td ><a href="#1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a></td></tr>
-</table></td></tr></table>
-<h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-The package <strong>img::xpm</strong> is a sub-package of
-<strong>Img</strong>. It can be loaded as a part of the complete Img support,
-via <b class='cmd'>package require Img</b>, or on its own, via
-
-<b class='cmd'>package require img::xpm</b>.
-
-<p>
-
-Like all packages of <strong>Img</strong> it does <em>not</em> provide new
-commands, but extends the existing <strong>Tk</strong> command <b class='cmd'>image</b> so
-that it supports files containing raster images in the
-
-X Windows Pixmap Format (xpm). More specifically
-
-<strong>img::xpm</strong> extends <strong>Tk</strong>'s <b class='cmd'>photo</b>
-image type.
-
-<p>
-
-The name of the new format handler is <strong>xpm</strong>.
-
-
-This handler does not provide additional configuration options.
-
-<! -- -*- tcl -*- doctools = format-middle.inc
-   -->
-<p>
-
-All of the above means that in a call like
-
-<dl>
-<dt><a name="1"><b class='cmd'>image</b> <strong>create photo</strong> ?<i class='arg'>name</i>? ?<i class='arg'>options</i>?</a><dd>
-
-</dl>
-
-<ol>
-<li>
-Image data in xpm format (options <strong>-data</strong> and <strong>-file</strong>) is
-detected automatically.
-
-<br><br>
-<li>
-The format name <strong>xpm</strong> is recognized by the option <strong>-format</strong>.
-
-<! -- -*- tcl -*- doctools = format-footer.inc
-   -->
-</ol>
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img.html"> img-intro </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key5"> image handling </a>, <a href="../index.html#key18"> tk </a>, <a href="../index.html#key21"> xpm </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
-
diff --git a/tkimg1.3/doc/html/img.html b/tkimg1.3/doc/html/img.html
deleted file mode 100644
index 1da3970..0000000
--- a/tkimg1.3/doc/html/img.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<! -- -*- tcl -*- doctools
-   -->
-<html><head>
-<title>img-intro - Img </title>
-</head>
-<! -- Generated from file './img.man' by tcllib/doctools with format 'html'
-   -->
-<! -- Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-   -->
-<! -- CVS: $Id: img.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ img-intro.n
-   -->
-
-<body>
-<hr> [
-  <a href="../toc.html"> Table Of Contents </a>
-| <a href="../index.html"> Index </a>
-] <hr>
-
-
-<h1> img-intro(n) 1.3  "Img"</h1>
-<h2><a name="name">NAME</a></h2>
-<p>
-<p> img-intro - Introduction to Img
-
-
-
-
-
-<h2><a name="tableofcontents">TABLE OF CONTENTS</a></h2>
-<p>    <a href="#tableofcontents">TABLE OF CONTENTS</a><br>    <a href="#synopsis">SYNOPSIS</a><br>    <a href="#description">DESCRIPTION</a><br>    <a href="#seealso">SEE ALSO</a><br>    <a href="#keywords">KEYWORDS</a><br>    <a href="#copyright">COPYRIGHT</a><br><h2><a name="synopsis">SYNOPSIS</a></h2>
-<p>
-package require <b>Tk</b><br>
-package require <b>Img ?1.3?</b><br>
-<br><h2><a name="description">DESCRIPTION</a></h2>
-<p>
-
-<strong>Img</strong> is a <strong>Tk</strong> extension, adding support for many
-other Image formats, as listed below. The individual formats are
-described in more detail on their own pages.
-
-<dl>
-
-<dt><em><a href="../index.html#key0"> bmp </a></em><dd>
-Windows bitmap format.
-See <b class='cmd'><a href="img-bmp.html"> img-bmp </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key2"> gif </a></em><dd>
-The venerable graphics interchange format (with transparency, but
-without LZW. The latter due to patent issues).
-See <b class='cmd'><a href="img-gif.html"> img-gif </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key4"> ico </a></em><dd>
-Windows icon files.
-See <b class='cmd'><a href="img-ico.html"> img-ico </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key6"> jpeg </a></em><dd>
-The format for lossy compressed still pictures specified by the Joint
-Picture Experts Group.
-See <b class='cmd'><a href="img-jpeg.html"> img-jpeg </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key7"> pcx </a></em><dd>
-Paintbrush image format.
-See <b class='cmd'><a href="img-pcx.html"> img-pcx </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key9"> pixmap </a></em><dd>
-While the other formats are handlers for the <strong>Tk</strong> photo image
-type this is a new image type for <strong>Tk</strong>.
-See <b class='cmd'><a href="img-pixmap.html"> img-pixmap </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key10"> png </a></em><dd>
-Portable Network Graphics, successor to GIF.
-See <b class='cmd'><a href="img-png.html"> img-png </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key12"> ppm </a></em><dd>
-Portable Pixmaps.
-See <b class='cmd'><a href="img-ppm.html"> img-ppm </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key13"> ps </a></em><dd>
-Postscript and PDF (Portable document format). Requires an external
-application, <strong>ghostview</strong>, for its operation.
-See <b class='cmd'><a href="img-ps.html"> img-ps </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key14"> sgi </a></em><dd>
-Native SGI format.
-See <b class='cmd'><a href="img-sgi.html"> img-sgi </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key15"> sun </a></em><dd>
-Sun raster images.
-See <b class='cmd'><a href="img-sun.html"> img-sun </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key16"> tga </a></em><dd>
-Targa files.
-See <b class='cmd'><a href="img-tga.html"> img-tga </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key17"> tiff </a></em><dd>
-Tagged Interchange File Format.
-See <b class='cmd'><a href="img-tiff.html"> img-tiff </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key19"> window </a></em><dd>
-???
-See <b class='cmd'><a href="img-window.html"> img-window </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key20"> xbm </a></em><dd>
-X Bitmaps.
-See <b class='cmd'><a href="img-xbm.html"> img-xbm </a></b>.
-
-<br><br>
-<dt><em><a href="../index.html#key21"> xpm </a></em><dd>
-X Pixmaps.
-See <b class='cmd'><a href="img-xpm.html"> img-xpm </a></b>.
-
-</dl>
-
-This version only works with Tcl/Tk 8.2 or higher. If you are using Tk
-8.1 or lower please stick with Img 1.2.4 (which is still
-available). And if you are using Tk4.2 or lower, please stick with Img
-1.1.4 (which is also still available).
-
-
-
-<h2><a name="seealso">SEE ALSO</a></h2>
-<p>
-<a href="img-bmp.html"> img-bmp </a>, <a href="img-gif.html"> img-gif </a>, <a href="img-ico.html"> img-ico </a>, <a href="img-jpeg.html"> img-jpeg </a>, <a href="img-pcx.html"> img-pcx </a>, <a href="img-pixmap.html"> img-pixmap </a>, <a href="img-png.html"> img-png </a>, <a href="img-ppm.html"> img-ppm </a>, <a href="img-ps.html"> img-ps </a>, <a href="img-sgi.html"> img-sgi </a>, <a href="img-sun.html"> img-sun </a>, <a href="img-tga.html"> img-tga </a>, <a href="img-tiff.html"> img-tiff </a>, <a href="img-window.html"> img-window </a>, <a href="img-xbm.html"> img-xbm </a>, <a href="img-xpm.html"> img-xpm </a>
-<h2><a name="keywords">KEYWORDS</a></h2>
-<p>
-<a href="../index.html#key0"> bmp </a>, <a href="../index.html#key2"> gif </a>, <a href="../index.html#key4"> ico </a>, <a href="../index.html#key5"> image handling </a>, <a href="../index.html#key6"> jpeg </a>, <a href="../index.html#key7"> pcx </a>, <a href="../index.html#key8"> pdf </a>, <a href="../index.html#key9"> pixmap </a>, <a href="../index.html#key10"> png </a>, <a href="../index.html#key11"> postscript </a>, <a href="../index.html#key12"> ppm </a>, <a href="../index.html#key13"> ps </a>, <a href="../index.html#key14"> sgi </a>, <a href="../index.html#key15"> sun </a>, <a href="../index.html#key16"> tga </a>, <a href="../index.html#key17"> tiff </a>, <a href="../index.html#key18"> tk </a>, <a href="../index.html#key19"> window </a>, <a href="../index.html#key20"> xbm </a>, <a href="../index.html#key21"> xpm </a>
-<h2><a name="copyright">COPYRIGHT</a></h2>
-<p>
-Copyright © 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com><br>
-</body></html>
diff --git a/tkimg1.3/doc/html/index.html b/tkimg1.3/doc/html/index.html
deleted file mode 100644
index 26f79c7..0000000
--- a/tkimg1.3/doc/html/index.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<html><head>
-<title> Tkimg </title>
-</head>
-<! -- Generated by tcllib/doctools/idx with format 'html'
-   -->
-<! -- CVS: $Id: index.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ Tkimg
-   -->
-
-<body>
-<hr> [
-  <a href="toc.html"> Table Of Contents </a>
-| Index
-] <hr>
-
-
-<h3> Tkimg -- Keyword index </h3>
-<hr><table class="#idx">
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key0"> bmp </a></td>
-    <td class="#idxright">
-	<a href="./img-bmp.html"> img-bmp </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key1"> ghostscript </a></td>
-    <td class="#idxright">
-	<a href="./img-ps.html"> img-ps </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key2"> gif </a></td>
-    <td class="#idxright">
-	<a href="./img-gif.html"> img-gif </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key3"> gs </a></td>
-    <td class="#idxright">
-	<a href="./img-ps.html"> img-ps </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key4"> ico </a></td>
-    <td class="#idxright">
-	<a href="./img-ico.html"> img-ico </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key5"> image handling </a></td>
-    <td class="#idxright">
-	<a href="./img-bmp.html"> img-bmp </a>,
-	<a href="./img-gif.html"> img-gif </a>,
-	<a href="./img-ico.html"> img-ico </a>,
-	<a href="./img-jpeg.html"> img-jpeg </a>,
-	<a href="./img-pcx.html"> img-pcx </a>,
-	<a href="./img-pixmap.html"> img-pixmap </a>,
-	<a href="./img-png.html"> img-png </a>,
-	<a href="./img-ppm.html"> img-ppm </a>,
-	<a href="./img-ps.html"> img-ps </a>,
-	<a href="./img-sgi.html"> img-sgi </a>,
-	<a href="./img-sun.html"> img-sun </a>,
-	<a href="./img-tga.html"> img-tga </a>,
-	<a href="./img-tiff.html"> img-tiff </a>,
-	<a href="./img-window.html"> img-window </a>,
-	<a href="./img-xbm.html"> img-xbm </a>,
-	<a href="./img-xpm.html"> img-xpm </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key6"> jpeg </a></td>
-    <td class="#idxright">
-	<a href="./img-jpeg.html"> img-jpeg </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key7"> pcx </a></td>
-    <td class="#idxright">
-	<a href="./img-pcx.html"> img-pcx </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key8"> pdf </a></td>
-    <td class="#idxright">
-	<a href="./img-ps.html"> img-ps </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key9"> pixmap </a></td>
-    <td class="#idxright">
-	<a href="./img-pixmap.html"> img-pixmap </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key10"> png </a></td>
-    <td class="#idxright">
-	<a href="./img-png.html"> img-png </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key11"> postscript </a></td>
-    <td class="#idxright">
-	<a href="./img-ps.html"> img-ps </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key12"> ppm </a></td>
-    <td class="#idxright">
-	<a href="./img-ppm.html"> img-ppm </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key13"> ps </a></td>
-    <td class="#idxright">
-	<a href="./img-ps.html"> img-ps </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key14"> sgi </a></td>
-    <td class="#idxright">
-	<a href="./img-sgi.html"> img-sgi </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key15"> sun </a></td>
-    <td class="#idxright">
-	<a href="./img-sun.html"> img-sun </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key16"> tga </a></td>
-    <td class="#idxright">
-	<a href="./img-tga.html"> img-tga </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key17"> tiff </a></td>
-    <td class="#idxright">
-	<a href="./img-tiff.html"> img-tiff </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key18"> tk </a></td>
-    <td class="#idxright">
-	<a href="./img-bmp.html"> img-bmp </a>,
-	<a href="./img-gif.html"> img-gif </a>,
-	<a href="./img-ico.html"> img-ico </a>,
-	<a href="./img-jpeg.html"> img-jpeg </a>,
-	<a href="./img-pcx.html"> img-pcx </a>,
-	<a href="./img-pixmap.html"> img-pixmap </a>,
-	<a href="./img-png.html"> img-png </a>,
-	<a href="./img-ppm.html"> img-ppm </a>,
-	<a href="./img-ps.html"> img-ps </a>,
-	<a href="./img-sgi.html"> img-sgi </a>,
-	<a href="./img-sun.html"> img-sun </a>,
-	<a href="./img-tga.html"> img-tga </a>,
-	<a href="./img-tiff.html"> img-tiff </a>,
-	<a href="./img-window.html"> img-window </a>,
-	<a href="./img-xbm.html"> img-xbm </a>,
-	<a href="./img-xpm.html"> img-xpm </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key19"> window </a></td>
-    <td class="#idxright">
-	<a href="./img-window.html"> img-window </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxeven" >
-    <td class="#idxleft" ><a name="key20"> xbm </a></td>
-    <td class="#idxright">
-	<a href="./img-xbm.html"> img-xbm </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-<tr class="#idxodd"  >
-    <td class="#idxleft" ><a name="key21"> xpm </a></td>
-    <td class="#idxright">
-	<a href="./img-xpm.html"> img-xpm </a>,
-	<a href="./img.html"> img-intro </a>
-    </td>
-</tr>
-</table>
-<hr></body></html>
-
diff --git a/tkimg1.3/doc/html/toc.html b/tkimg1.3/doc/html/toc.html
deleted file mode 100644
index 05781e3..0000000
--- a/tkimg1.3/doc/html/toc.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html><head>
-<title> Tkimg -- Table of Contents </title>
-</head>
-<! -- Generated by tcllib/doctools/toc with format 'html'
-   -->
-<! -- CVS: $Id: toc.html,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $ Tkimg -- Table of Contents
-   -->
-
-<body>
-<hr> [
-  Table Of Contents
-| <a href="index.html"> Index </a>
-] <hr>
-
-
-<h3> Tkimg -- Table of Contents </h3>
-<hr><dl><dt><h2> Modules </h2><dd>
-
-<table class="#toc">
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-bmp.html">img-bmp</a></td>
-<td class="#tocright">Img, Windows Bitmap Format (bmp)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-gif.html">img-gif</a></td>
-<td class="#tocright">Img, Graphics Interchange Format (gif)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-ico.html">img-ico</a></td>
-<td class="#tocright">Img, Windows Icon Format (ico)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-jpeg.html">img-jpeg</a></td>
-<td class="#tocright">Img, Joint Picture Expert Group format (jpeg)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img.html">img-intro</a></td>
-<td class="#tocright">Introduction to Img</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-pcx.html">img-pcx</a></td>
-<td class="#tocright">Img, Paintbrush Format (pcx)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-pixmap.html">img-pixmap</a></td>
-<td class="#tocright">Img, Pixmap Image type (pixmap)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-png.html">img-png</a></td>
-<td class="#tocright">Img, Portable Network Graphics format (png)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-ppm.html">img-ppm</a></td>
-<td class="#tocright">Img, Portable Pixmap format (ppm)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-ps.html">img-ps</a></td>
-<td class="#tocright">Img, Adobe PostScript Format (ps)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-sgi.html">img-sgi</a></td>
-<td class="#tocright">Img, SGI Native Format (sgi)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-sun.html">img-sun</a></td>
-<td class="#tocright">Img, Sun Raster Format (sun)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-tga.html">img-tga</a></td>
-<td class="#tocright">Img, Truevision Targa Format (tga)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-tiff.html">img-tiff</a></td>
-<td class="#tocright">Img, Tagged Image File Format (tiff)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-window.html">img-window</a></td>
-<td class="#tocright">Img, Tk Windows (window)</td>
-</tr>
-<tr class="#tocodd"  >
-<td class="#tocleft" ><a href="./img-xbm.html">img-xbm</a></td>
-<td class="#tocright">Img, X Windows Bitmap Format (xbm)</td>
-</tr>
-<tr class="#toceven" >
-<td class="#tocleft" ><a href="./img-xpm.html">img-xpm</a></td>
-<td class="#tocright">Img, X Windows Pixmap Format (xpm)</td>
-</tr>
-
-</table>
-</dl><hr></body></html>
-
diff --git a/tkimg1.3/doc/img-bmp.man b/tkimg1.3/doc/img-bmp.man
deleted file mode 100644
index 8a4c573..0000000
--- a/tkimg1.3/doc/img-bmp.man
+++ /dev/null
@@ -1,10 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME bmp]
-[vset FORMATFULLNAME {Windows Bitmap Format}]
-
-[include format-header.inc]
-
-This handler does not provide additional configuration options.
-
-[include format-middle.inc]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-gif.man b/tkimg1.3/doc/img-gif.man
deleted file mode 100644
index 3d8af86..0000000
--- a/tkimg1.3/doc/img-gif.man
+++ /dev/null
@@ -1,65 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME gif]
-[vset FORMATFULLNAME {Graphics Interchange Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {GIF OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {GIF OPTIONS}].
-
-[list_end]
-
-
-
-[section {GIF OPTIONS}]
-
-The handler provides two options, one for reading from a GIF image,
-the other influencing the writing of such. 
-
-[list_begin definitions]
-
-[lst_item "[option -index] [arg n]"]
-
-This option is for reading from GIF files containing more than one
-image ([term {animated GIF's}], [term {GIF movies}]. When specified it
-will read the [arg n]'th image in the data. The first image is at
-index [const 0] and will be read by default, i.e. when the option is
-not specified.
-
-[lst_item "[option -interlaced] [arg bool]"]
-
-If the value of this option is set to true the image will be written
-using the interlaced sub-format of GIF. The default is to write
-non-interlaced files. [emph {This option is not implemented yet.}]
-
-[list_end]
-
-[section {IMAGE COMPRESSION}]
-
-Instead of LZW the run-length encoding of Hutchison Avenue Software
-Corporation is used, also known as [term miGIF] compression. The miGIF
-compression routines do not, strictly speaking, generate files
-conforming to the GIF spec, since the image data is not LZW-compressed
-(this is the point: in order to avoid transgression of the Unisys
-patent on the LZW algorithm.) However, miGIF generates data streams
-that any reasonably sane LZW decompresser will decompress to what we
-want.
-
-[section TRANSPARENCY]
-
-If you want to write images to disk which contain transparency
-information (e.g. GIF89) you need at least [package Tk] 8.3.
-
-
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-ico.man b/tkimg1.3/doc/img-ico.man
deleted file mode 100644
index 594360f..0000000
--- a/tkimg1.3/doc/img-ico.man
+++ /dev/null
@@ -1,63 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME ico]
-[vset FORMATFULLNAME {Windows Icon Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {ICO OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {ICO OPTIONS}].
-
-[list_end]
-
-
-[section {SUPPORTED ICO TYPES}]
-
-[example_begin]
-  1-bit pixels: Black and White.
-  4-bit pixels: Grayscale or indexed.
-  8-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  4-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | Yes   | Yes   |
-[example_end]
-
-
-[section {ICO OPTIONS}]
-
-The handler provides the following options:
-
-[list_begin definitions]
-
-[lst_item "[option -verbose] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const true], additional information about the loaded/stored image
-is printed to stdout. Default is [const false].
-
-[lst_item "[option -index] [arg n]"]
-
-This option is supported for reading only.
-[nl]
-Read the [arg n]'th image. The first image is at index [const 0].
-Default is [const 0].
-
-[list_end]
-
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-jpeg.man b/tkimg1.3/doc/img-jpeg.man
deleted file mode 100644
index e529151..0000000
--- a/tkimg1.3/doc/img-jpeg.man
+++ /dev/null
@@ -1,75 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME jpeg]
-[vset FORMATFULLNAME {Joint Picture Expert Group format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {JPEG OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {JPEG OPTIONS}].
-
-[list_end]
-
-
-
-[section {JPEG OPTIONS}]
-
-The handler provides six options, two effective when reading from a
-JPEG image, and five influencing the writing of such. One option is
-usable for both reading an writing.
-
-[list_begin definitions]
-
-[lst_item [option -fast]]
-
-This option is for reading from JPEG data. It usage activates a
-processing mode which is fast, but also provides only low-quality
-information.
-
-
-[lst_item [option -grayscale]]
-
-This option can be used for both reading and writing of JPEG
-data. Usage of this option forces incoming images to grayscale, and
-written images will be monochrome.
-
-
-[lst_item "[option -quality] [arg n]"]
-
-This option is for writing JPEG data. It specifies the compression
-level as a quality percentage. The higher the quality, the less the
-compression. The nominal range for [arg n] is
-
-[const 0]...[const 100]. Useful values are in the range
-[const 5]...[const 95]. The default value is [const 75].
-
-
-[lst_item "[option -smooth] [arg n]"]
-
-This option is for writing JPEG data. When used the writer will smooth
-the image before performing the compression. Values in the
-
-[const 10]...[const 30] are usually enough. The default is [const 0],
-i.e no smoothing.
-
-
-[lst_item [option -optimize]]
-
-This option is for writing JPEG data. It usage causes the writer to
-optimize the huffman table used to encode the jpeg coefficients.
-
-
-[lst_item [option -progressive]]
-
-This option is for writing JPEG data. It usage causes the creation of
-a [term progressive] JPEG file.
-
-
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-pcx.man b/tkimg1.3/doc/img-pcx.man
deleted file mode 100644
index 655f819..0000000
--- a/tkimg1.3/doc/img-pcx.man
+++ /dev/null
@@ -1,67 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME pcx]
-[vset FORMATFULLNAME {Paintbrush Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {PCX OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {PCX OPTIONS}].
-
-[list_end]
-
-
-[section {SUPPORTED PCX TYPES}]
-
-[example_begin]
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 
- List of currently supported features:
- 
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 
- All images types may be either uncompressed or run-length encoded.
-[example_end]
-
-
-[section {PCX OPTIONS}]
-
-The handler provides the following options:
-
-[list_begin definitions]
-
-[lst_item "[option -verbose] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const true], additional information about the loaded/stored image
-is printed to stdout. Default is [const false].
-
-[lst_item "[option -compression] [arg type]"]
-
-This option is supported for writing only.
-[nl]
-Set the compression mode to either [const none] or [const rle].
-Default is [const rle].
-
-[list_end]
-
-
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-pixmap.man b/tkimg1.3/doc/img-pixmap.man
deleted file mode 100644
index bd76974..0000000
--- a/tkimg1.3/doc/img-pixmap.man
+++ /dev/null
@@ -1,98 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME pixmap]
-[vset FORMATFULLNAME {Pixmap Image type}]
-
-[manpage_begin img-[vset FORMATNAME] n 1.3]
-[moddesc Img]
-[titledesc "Img, [vset FORMATFULLNAME] ([vset FORMATNAME])"]
-[copyright {1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>}]
-[require Tk]
-[require img::[vset FORMATNAME] [opt 1.3]]
-[description]
-
-The package [package img::[vset FORMATNAME]] is a sub-package of
-[package Img]. It can be loaded as a part of the complete Img support,
-via [cmd {package require Img}], or on its own, via
-
-[cmd "package require img::[vset FORMATNAME]"].
-
-[para]
-
-Like all packages of [package Img] it does [emph not] provide new
-commands, but extends the existing [package Tk] command [cmd image].
-
-[para]
-
-In contrast to all other sub packages this packages does [emph not]
-extend [package Tk]'s [cmd photo] image type, but rather provides a
-completely new image type, on the same level as [cmd photo] and
-[cmd bitmap].
-
-[section {CREATING PIXMAPS}]
-
-Like all images, pixmaps are created using the [cmd {image create}]
-command.
-
-[list_begin definitions]
-[call [cmd image] [method {create pixmap}] [opt [arg name]] [opt [arg options]]]
-
-Pixmaps support the following options:
-
-[list_begin definitions]
-[lst_item "[option -data] [arg string]"]
-
-Specifies the contents of the source pixmap as a string. The string
-must adhere to X11 pixmap format (e.g., as generated by the pixmap
-program). If both the [option -data] and [option -file] options are
-specified, the [option -data] option takes precedence.
-
-[lst_item "[option -file] [arg name]"]
-
-[arg name] gives the name of a file whose contents define the source
-pixmap. The file must adhere to X11 pixmap format (e.g., as generated
-by the pixmap program).
-
-[list_end]
-[list_end]
-
-[section {IMAGE COMMAND}]
-
-When a pixmap image is created, Tk also creates a new com­ mand whose
-name is the same as the image.  This command may be used to invoke
-various operations on the image.  It has the following general form:
-
-[list_begin definitions]
-[call [arg imageName] [method option] [opt [arg {arg arg ...}]]]
-[list_end]
-
-[method Option] and the args determine the exact behavior of the
-command. The following commands are possible for pixmap images:
-
-[list_begin definitions]
-
-[call [arg imageName] [method cget] [arg option]]
-
-Returns the current value of the configuration option given by
-
-[arg option]. [arg Option] may have any of the values accepted by the
-[cmd {image create pixmap}] command.
-
-
-[call [arg imageName] [method configure] [opt [option option]] [opt [arg {value option value ...}]]]
-
-Query or modify the configuration options for the image. If no option
-is specified, returns a list describing all of the available options
-for [arg imageName] (see [cmd Tk_ConfigureInfo] for information on the
-format of this list). If [arg option] is specified with no
-
-[arg value], then the command returns a list describing the one named
-option (this list will be identi­ cal to the corresponding sublist of
-the value returned if no option is specified).  If one or more
-
-[arg option-value] pairs are specified, then the command modifies the
-given option(s) to have the given value(s); in this case the command
-returns an empty string. [option Option] may have any of the values
-accepted by the [cmd {image create pixmap}] command.
-
-
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-png.man b/tkimg1.3/doc/img-png.man
deleted file mode 100644
index a30b0f7..0000000
--- a/tkimg1.3/doc/img-png.man
+++ /dev/null
@@ -1,47 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME png]
-[vset FORMATFULLNAME {Portable Network Graphics format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {PNG OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {PNG OPTIONS}].
-
-[list_end]
-
-
-
-[section {PNG OPTIONS}]
-
-The handler provides no true options at all, but accepts pairs of keys
-and values when writing a PNG file. Each pair will be written as a
-named text chunk where the key provides the name of the chunk and the
-value its contents.
-
-For example
-
-[example {
-    png Author <name> Title <title> Description ...
-}]
-
-
-[section TRANSPARENCY]
-
-If you want to write images to disk which contain transparency
-information (e.g. PNG with alpha channel) you need at least
-
-[package Tk] 8.3.
-
-
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-ppm.man b/tkimg1.3/doc/img-ppm.man
deleted file mode 100644
index b3801cf..0000000
--- a/tkimg1.3/doc/img-ppm.man
+++ /dev/null
@@ -1,33 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME ppm]
-[vset FORMATFULLNAME {Portable Pixmap format}]
-
-[include format-header.inc]
-
-This handler does not provide additional configuration options.
-
-[include format-middle.inc]
-
-[list_end]
-
-[section {SUPPORTED PPM TYPES}]
-
-There are two types of PPM files: RAW (binary) and ASCII.
-Currently only the RAW format is implemented.
-
-[example_begin]
-  8-bit pixels: Grayscale, also known as PGM.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  8-bit | Yes   | Yes   | Yes   | Yes   |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
-
-[example_end]
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-ps.man b/tkimg1.3/doc/img-ps.man
deleted file mode 100644
index 96b4a6b..0000000
--- a/tkimg1.3/doc/img-ps.man
+++ /dev/null
@@ -1,97 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME ps]
-[vset FORMATFULLNAME {Adobe PostScript Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {PostScript OPTIONS}] for more detailed explanations.
-
-[para]
-
-Note that this package provides a [const pdf] handler too, i.e. a
-handler for the Adobe Portable Document Format. That handler accepts
-the same options as the [const [vset FORMATNAME]] handler.
-
-[para]
-
-The package delegates the actual conversion of data in PostScript and
-PDF format into a raster image to the [syscmd ghostscript]
-application. It therefore depends upon the presence of said
-application and is non-functional is [syscmd ghostscript] is not
-present.
-
-[para]
-
-All of the above means that in a call like
-
-[list_begin definitions]
-[call [cmd image] [method {create photo}] [opt [arg name]] [opt [arg options]]]
-[list_end]
-
-[list_begin enum]
-[enum]
-Image data in [vset FORMATNAME] and PDF format (options [option -data]
-and [option -file]) is detected automatically.
-
-[enum]
-
-The format names [const [vset FORMATNAME]] and [const pdf] are
-recognized by the option [option -format].
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {PostScript OPTIONS}].
-
-[list_end]
-
-
-
-[section {PostScript OPTIONS}]
-
-The handler provides two options, both influencing the reading of
-PostScript or PDF images. The handler is [emph not] able to write
-images in PostScript or PDF.
-
-
-[list_begin definitions]
-
-[lst_item "[option -index] [arg n]"]
-
-This option is for reading from PostScript/PDF data containing more
-than one page. When specified it will read the [arg n]'th page in the
-data. The first page is at index [const 0] and will be read by
-default, i.e. when the option is not specified.
-
-[nl]
-
-[emph Note:] This option is not yet implemented.
-
-
-[lst_item "[option -zoom] [arg X] [arg Y]"]
-
-Multiply image size by the given scale factors. If [arg Y] is missing,
-the default is the same as [arg X]. [arg X] and [arg Y] are allowed to
-be in floating point format, but they are rounded to the nearest
-practically possible value. For postscript this means the zoom factors
-should be multiples of 1/72.
-
-
-[list_end]
-
-[section REQUIREMENTS]
-
-The code provided by Img does not perform the interpretation and
-rasterizing of the input by itself but delegates this to the
-[syscmd gs] application. This is the GhostScript implementation
-of PostScript (and PDF).
-
-[para]
-
-If [syscmd gs] is not installed this format handler cannot be used.
-
-[see_also img-intro img-bmp img-gif img-ico img-jpeg img-pcx img-pixmap img-png img-ppm img-ps img-sgi img-sun img-tga img-tiff img-window img-xbm img-xpm]
-[keywords {image handling} tk [vset FORMATNAME] pdf postscript gs ghostscript]
-[manpage_end]
diff --git a/tkimg1.3/doc/img-sgi.man b/tkimg1.3/doc/img-sgi.man
deleted file mode 100644
index a6ce4e9..0000000
--- a/tkimg1.3/doc/img-sgi.man
+++ /dev/null
@@ -1,76 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME sgi]
-[vset FORMATFULLNAME {SGI Native Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {SGI OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {SGI OPTIONS}].
-
-[list_end]
-
-
-[section {SUPPORTED SGI TYPES}]
-
-[example_begin]
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- 48-bit pixels: True-color (RGB, each channel 16 bit).
- 64-bit pixels: True-color with alpha channel (RGBA, each channel 16 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes*  | Yes   | Yes*  |
- 32-bit | Yes   | Yes*  | Yes   | Yes*  |
- 48-bit | Yes   | Yes*  | No    | No    |
- 64-bit | Yes   | Yes*  | No    | No    |
-
- *: Implemented by reading/writing from/to a temporary file. This will
-    be slow for larger images.
-
- All images types may be either uncompressed or run-length encoded.
-[example_end]
-
-
-[section {SGI OPTIONS}]
-
-The handler provides the following options:
-
-[list_begin definitions]
-
-[lst_item "[option -verbose] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const true], additional information about the loaded/stored image
-is printed to stdout. Default is [const false].
-
-[lst_item "[option -compression] [arg type]"]
-
-This option is supported for writing only.
-[nl]
-Set the compression mode to either [const none] or [const rle].
-Default is [const rle].
-
-[lst_item "[option -matte] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const false], a matte (alpha) channel is ignored
-during reading or writing. Default is [const true].
-
-[list_end]
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-sun.man b/tkimg1.3/doc/img-sun.man
deleted file mode 100644
index f324fb4..0000000
--- a/tkimg1.3/doc/img-sun.man
+++ /dev/null
@@ -1,73 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME sun]
-[vset FORMATFULLNAME {Sun Raster Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {SUN OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {SUN OPTIONS}].
-
-[list_end]
-
-
-[section {SUPPORTED SUN TYPES}]
-
-[example_begin]
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed or run-length encoded.
-[example_end]
-
-
-[section {SUN OPTIONS}]
-
-The handler provides the following options:
-
-[list_begin definitions]
-
-[lst_item "[option -verbose] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const true], additional information about the loaded/stored image
-is printed to stdout. Default is [const false].
-
-[lst_item "[option -compression] [arg type]"]
-
-This option is supported for writing only.
-[nl]
-Set the compression mode to either [const none] or [const rle].
-Default is [const rle].
-
-[lst_item "[option -matte] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const false], a matte (alpha) channel is ignored
-during reading or writing. Default is [const true].
-
-[list_end]
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-tga.man b/tkimg1.3/doc/img-tga.man
deleted file mode 100644
index b673619..0000000
--- a/tkimg1.3/doc/img-tga.man
+++ /dev/null
@@ -1,70 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME tga]
-[vset FORMATFULLNAME {Truevision Targa Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {TGA OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {TGA OPTIONS}].
-
-[list_end]
-
-
-[section {SUPPORTED TGA TYPES}]
-
-[example_begin]
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed (Targa-Type 2) or
- run-length encoded (Targa-Type 10).
-[example_end]
-
-
-[section {TGA OPTIONS}]
-
-The handler provides the following options:
-
-[list_begin definitions]
-
-[lst_item "[option -verbose] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const true], additional information about the loaded/stored image
-is printed to stdout. Default is [const false].
-
-[lst_item "[option -compression] [arg type]"]
-
-This option is supported for writing only.
-[nl]
-Set the compression mode to either [const none] or [const rle].
-Default is [const rle].
-
-[lst_item "[option -matte] [arg bool]"]
-
-This option is supported for reading and writing.
-[nl]
-If set to [const false], a matte (alpha) channel is ignored
-during reading or writing. Default is [const true].
-
-[list_end]
-
-[list_begin definitions]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-tiff.man b/tkimg1.3/doc/img-tiff.man
deleted file mode 100644
index 16b7daa..0000000
--- a/tkimg1.3/doc/img-tiff.man
+++ /dev/null
@@ -1,52 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME tiff]
-[vset FORMATFULLNAME {Tagged Image File Format}]
-
-[include format-header.inc]
-
-This handler provides new additional configuration options. See
-section [sectref {TIFF OPTIONS}] for more detailed explanations.
-
-
-[include format-middle.inc]
-
-
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-
-[sectref {TIFF OPTIONS}].
-
-[list_end]
-
-
-
-[section {TIFF OPTIONS}]
-
-The handler provides two options to influence the writing of a TIFF
-image. There are [emph no] options to influence the reader.
-
-
-[list_begin definitions]
-
-[lst_item "[option -compression] [arg type]"]
-
-This option specifies the type of compression to use when writing TIFF
-data. It has to be one of [const none], [const jpeg],
-[const packbits], or [const deflate]. The default is [const none].
-
-
-[lst_item "[option -byteorder] [arg type]"]
-
-This option specifies the byteorder to use when writing TIFF data. It
-has to be one of [const bigendian], [const littleendian],
-
-[const network], [const smallendian], or the empty string. The default
-is the empty string.
-
-[nl]
-
-The values [const bigendian] and [const network] are aliases of each
-other, as are [const littleendian] and [const smallendian].
-
-
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-window.man b/tkimg1.3/doc/img-window.man
deleted file mode 100644
index e356259..0000000
--- a/tkimg1.3/doc/img-window.man
+++ /dev/null
@@ -1,68 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME window]
-[vset FORMATFULLNAME {Tk Windows}]
-
-[manpage_begin img-[vset FORMATNAME] n 1.3]
-[moddesc Img]
-[titledesc "Img, [vset FORMATFULLNAME] ([vset FORMATNAME])"]
-[copyright {1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>}]
-[require Tk]
-[require img::[vset FORMATNAME] [opt 1.3]]
-[description]
-
-The package [package img::[vset FORMATNAME]] is a sub-package of
-[package Img]. It can be loaded as a part of the complete Img support,
-via [cmd {package require Img}], or on its own, via
-
-[cmd "package require img::[vset FORMATNAME]"].
-
-[para]
-
-Like all packages of [package Img] it does [emph not] provide new
-commands, but extends the existing [package Tk] command [cmd image].
-More specifically
-
-[package img::[vset FORMATNAME]] extends [package Tk]'s [cmd photo]
-image type.
-
-[para]
-
-The name of the new format handler is [const [vset FORMATNAME]].
-
-[para]
-
-This handler does not provide additional configuration options.
-
-This handler is special. Instead of reading or writing image data from
-a file or string it allows the embedding of a Tk widget into the photo
-image. In other words, it takes a snapshot of the contents of a Tk
-window.
-
-[para]
-
-All of the above means that in a call like
-
-[list_begin definitions]
-[call [cmd image] [method {create photo}] [opt [arg name]] [opt [arg options]]]
-[list_end]
-
-[list_begin enum]
-[enum]
-
-Image data in [vset FORMATNAME] format (option [option -data]) is
-detected automatically. Image data is considered to be in the
-
-[const [vset FORMATNAME]] format if the value given to option
-[option -data] is the name of an existing Tk window.
-
-[nl]
-
-Note that the standard option [option -file] is not supported by this
-handler.
-
-
-[enum]
-The format name [const [vset FORMATNAME]] is recognized by the option [option -format].
-
-
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-xbm.man b/tkimg1.3/doc/img-xbm.man
deleted file mode 100644
index 21b4754..0000000
--- a/tkimg1.3/doc/img-xbm.man
+++ /dev/null
@@ -1,10 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME xbm]
-[vset FORMATFULLNAME {X Windows Bitmap Format}]
-
-[include format-header.inc]
-
-This handler does not provide additional configuration options.
-
-[include format-middle.inc]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img-xpm.man b/tkimg1.3/doc/img-xpm.man
deleted file mode 100644
index 506267b..0000000
--- a/tkimg1.3/doc/img-xpm.man
+++ /dev/null
@@ -1,10 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[vset FORMATNAME xpm]
-[vset FORMATFULLNAME {X Windows Pixmap Format}]
-
-[include format-header.inc]
-
-This handler does not provide additional configuration options.
-
-[include format-middle.inc]
-[include format-footer.inc]
diff --git a/tkimg1.3/doc/img.man b/tkimg1.3/doc/img.man
deleted file mode 100644
index 039fbab..0000000
--- a/tkimg1.3/doc/img.man
+++ /dev/null
@@ -1,93 +0,0 @@
-[comment {-*- tcl -*- doctools}]
-[manpage_begin img-intro n 1.3]
-[moddesc Img]
-[titledesc {Introduction to Img}]
-[copyright {1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>}]
-[require Tk]
-[require Img [opt 1.3]]
-[description]
-
-[package Img] is a [package Tk] extension, adding support for many
-other Image formats, as listed below. The individual formats are
-described in more detail on their own pages.
-
-[list_begin definitions]
-
-[lst_item [term bmp]]
-Windows bitmap format.
-See [cmd img-bmp].
-
-[lst_item [term gif]]
-The venerable graphics interchange format (with transparency, but
-without LZW. The latter due to patent issues).
-See [cmd img-gif].
-
-[lst_item [term ico]]
-Windows icon files.
-See [cmd img-ico].
-
-[lst_item [term jpeg]]
-The format for lossy compressed still pictures specified by the Joint
-Picture Experts Group.
-See [cmd img-jpeg].
-
-[lst_item [term pcx]]
-Paintbrush image format.
-See [cmd img-pcx].
-
-[lst_item [term pixmap]]
-While the other formats are handlers for the [package Tk] photo image
-type this is a new image type for [package Tk].
-See [cmd img-pixmap].
-
-[lst_item [term png]]
-Portable Network Graphics, successor to GIF.
-See [cmd img-png].
-
-[lst_item [term ppm]]
-Portable Pixmaps.
-See [cmd img-ppm].
-
-[lst_item [term ps]]
-Postscript and PDF (Portable document format). Requires an external
-application, [syscmd ghostview], for its operation.
-See [cmd img-ps].
-
-[lst_item [term sgi]]
-Native SGI format.
-See [cmd img-sgi].
-
-[lst_item [term sun]]
-Sun raster images.
-See [cmd img-sun].
-
-[lst_item [term tga]]
-Targa files.
-See [cmd img-tga].
-
-[lst_item [term tiff]]
-Tagged Interchange File Format.
-See [cmd img-tiff].
-
-[lst_item [term window]]
-???
-See [cmd img-window].
-
-[lst_item [term xbm]]
-X Bitmaps.
-See [cmd img-xbm].
-
-[lst_item [term xpm]]
-X Pixmaps.
-See [cmd img-xpm].
-
-[list_end]
-
-This version only works with Tcl/Tk 8.2 or higher. If you are using Tk
-8.1 or lower please stick with Img 1.2.4 (which is still
-available). And if you are using Tk4.2 or lower, please stick with Img
-1.1.4 (which is also still available).
-
-[see_also img-bmp img-gif img-ico img-jpeg img-pcx img-pixmap img-png img-ppm img-ps img-sgi img-sun img-tga img-tiff img-window img-xbm img-xpm]
-[keywords {image handling} tk xpm xbm gif png ppm tiff tga sun sgi postscript ps pdf pixmap pcx ico bmp window jpeg]
-[manpage_end]
diff --git a/tkimg1.3/doc/man/img-bmp.n b/tkimg1.3/doc/man/img-bmp.n
deleted file mode 100644
index 62a5930..0000000
--- a/tkimg1.3/doc/man/img-bmp.n
+++ /dev/null
@@ -1,53 +0,0 @@
-'\"
-'\" Generated from file 'img-bmp.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-bmp" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-bmp \- Img, Windows Bitmap Format (bmp)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::bmp  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::bmp\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::bmp\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Windows Bitmap Format (bmp). More specifically
-\fBimg::bmp\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBbmp\fR.
-This handler does not provide additional configuration options.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in bmp format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBbmp\fR is recognized by the option \fB-format\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-bmp, image handling, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-gif.n b/tkimg1.3/doc/man/img-gif.n
deleted file mode 100644
index ae68499..0000000
--- a/tkimg1.3/doc/man/img-gif.n
+++ /dev/null
@@ -1,84 +0,0 @@
-'\"
-'\" Generated from file 'img-gif.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-gif" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-gif \- Img, Graphics Interchange Format (gif)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::gif  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::gif\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::gif\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Graphics Interchange Format (gif). More specifically
-\fBimg::gif\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBgif\fR.
-This handler provides new additional configuration options. See
-section \fBGIF OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in gif format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBgif\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBGIF OPTIONS\fR.
-.SH "GIF OPTIONS"
-The handler provides two options, one for reading from a GIF image,
-the other influencing the writing of such.
-.TP
-\fB-index\fR \fIn\fR
-This option is for reading from GIF files containing more than one
-image (\fIanimated GIF's\fR, \fIGIF movies\fR. When specified it
-will read the \fIn\fR'th image in the data. The first image is at
-index \fB0\fR and will be read by default, i.e. when the option is
-not specified.
-.TP
-\fB-interlaced\fR \fIbool\fR
-If the value of this option is set to true the image will be written
-using the interlaced sub-format of GIF. The default is to write
-non-interlaced files. \fIThis option is not implemented yet.\fR
-.SH "IMAGE COMPRESSION"
-Instead of LZW the run-length encoding of Hutchison Avenue Software
-Corporation is used, also known as \fImiGIF\fR compression. The miGIF
-compression routines do not, strictly speaking, generate files
-conforming to the GIF spec, since the image data is not LZW-compressed
-(this is the point: in order to avoid transgression of the Unisys
-patent on the LZW algorithm.) However, miGIF generates data streams
-that any reasonably sane LZW decompresser will decompress to what we
-want.
-.SH "TRANSPARENCY"
-If you want to write images to disk which contain transparency
-information (e.g. GIF89) you need at least \fBTk\fR 8.3.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-gif, image handling, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-ico.n b/tkimg1.3/doc/man/img-ico.n
deleted file mode 100644
index 37fd3b4..0000000
--- a/tkimg1.3/doc/man/img-ico.n
+++ /dev/null
@@ -1,86 +0,0 @@
-'\"
-'\" Generated from file 'img-ico.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-ico" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-ico \- Img, Windows Icon Format (ico)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::ico  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::ico\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::ico\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Windows Icon Format (ico). More specifically
-\fBimg::ico\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBico\fR.
-This handler provides new additional configuration options. See
-section \fBICO OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in ico format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBico\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBICO OPTIONS\fR.
-.SH "SUPPORTED ICO TYPES"
-.nf
-  1-bit pixels: Black and White.
-  4-bit pixels: Grayscale or indexed.
-  8-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  4-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | Yes   | Yes   |
-.fi
-.SH "ICO OPTIONS"
-The handler provides the following options:
-.TP
-\fB-verbose\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBtrue\fR, additional information about the loaded/stored image
-is printed to stdout. Default is \fBfalse\fR.
-.TP
-\fB-index\fR \fIn\fR
-This option is supported for reading only.
-.sp
-Read the \fIn\fR'th image. The first image is at index \fB0\fR.
-Default is \fB0\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-ico, image handling, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-jpeg.n b/tkimg1.3/doc/man/img-jpeg.n
deleted file mode 100644
index 5fe0481..0000000
--- a/tkimg1.3/doc/man/img-jpeg.n
+++ /dev/null
@@ -1,92 +0,0 @@
-'\"
-'\" Generated from file 'img-jpeg.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-jpeg" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-jpeg \- Img, Joint Picture Expert Group format (jpeg)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::jpeg  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::jpeg\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::jpeg\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Joint Picture Expert Group format (jpeg). More specifically
-\fBimg::jpeg\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBjpeg\fR.
-This handler provides new additional configuration options. See
-section \fBJPEG OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in jpeg format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBjpeg\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBJPEG OPTIONS\fR.
-.SH "JPEG OPTIONS"
-The handler provides six options, two effective when reading from a
-JPEG image, and five influencing the writing of such. One option is
-usable for both reading an writing.
-.TP
-\fB-fast\fR
-This option is for reading from JPEG data. It usage activates a
-processing mode which is fast, but also provides only low-quality
-information.
-.TP
-\fB-grayscale\fR
-This option can be used for both reading and writing of JPEG
-data. Usage of this option forces incoming images to grayscale, and
-written images will be monochrome.
-.TP
-\fB-quality\fR \fIn\fR
-This option is for writing JPEG data. It specifies the compression
-level as a quality percentage. The higher the quality, the less the
-compression. The nominal range for \fIn\fR is
-\fB0\fR...\fB100\fR. Useful values are in the range
-\fB5\fR...\fB95\fR. The default value is \fB75\fR.
-.TP
-\fB-smooth\fR \fIn\fR
-This option is for writing JPEG data. When used the writer will smooth
-the image before performing the compression. Values in the
-\fB10\fR...\fB30\fR are usually enough. The default is \fB0\fR,
-i.e no smoothing.
-.TP
-\fB-optimize\fR
-This option is for writing JPEG data. It usage causes the writer to
-optimize the huffman table used to encode the jpeg coefficients.
-.TP
-\fB-progressive\fR
-This option is for writing JPEG data. It usage causes the creation of
-a \fIprogressive\fR JPEG file.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, jpeg, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-pcx.n b/tkimg1.3/doc/man/img-pcx.n
deleted file mode 100644
index 2e6bb63..0000000
--- a/tkimg1.3/doc/man/img-pcx.n
+++ /dev/null
@@ -1,88 +0,0 @@
-'\"
-'\" Generated from file 'img-pcx.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-pcx" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-pcx \- Img, Paintbrush Format (pcx)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::pcx  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::pcx\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::pcx\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Paintbrush Format (pcx). More specifically
-\fBimg::pcx\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBpcx\fR.
-This handler provides new additional configuration options. See
-section \fBPCX OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in pcx format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBpcx\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBPCX OPTIONS\fR.
-.SH "SUPPORTED PCX TYPES"
-.nf
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed or run-length encoded.
-.fi
-.SH "PCX OPTIONS"
-The handler provides the following options:
-.TP
-\fB-verbose\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBtrue\fR, additional information about the loaded/stored image
-is printed to stdout. Default is \fBfalse\fR.
-.TP
-\fB-compression\fR \fItype\fR
-This option is supported for writing only.
-.sp
-Set the compression mode to either \fBnone\fR or \fBrle\fR.
-Default is \fBrle\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, pcx, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-pixmap.n b/tkimg1.3/doc/man/img-pixmap.n
deleted file mode 100644
index 158dd00..0000000
--- a/tkimg1.3/doc/man/img-pixmap.n
+++ /dev/null
@@ -1,91 +0,0 @@
-'\"
-'\" Generated from file 'img-pixmap.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-.so man.macros
-.TH "img-pixmap" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-pixmap \- Img, Pixmap Image type (pixmap)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::pixmap  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate pixmap\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-\fIimageName\fR \fBoption\fR ?\fIarg arg ...\fR?\fR
-.sp
-\fIimageName\fR \fBcget\fR \fIoption\fR\fR
-.sp
-\fIimageName\fR \fBconfigure\fR ?\fBoption\fR? ?\fIvalue option value ...\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::pixmap\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::pixmap\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR.
-.PP
-In contrast to all other sub packages this packages does \fInot\fR
-extend \fBTk\fR's \fBphoto\fR image type, but rather provides a
-completely new image type, on the same level as \fBphoto\fR and
-\fBbitmap\fR.
-.SH "CREATING PIXMAPS"
-Like all images, pixmaps are created using the \fBimage create\fR
-command.
-.TP
-\fBimage\fR \fBcreate pixmap\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-Pixmaps support the following options:
-.RS
-.TP
-\fB-data\fR \fIstring\fR
-Specifies the contents of the source pixmap as a string. The string
-must adhere to X11 pixmap format (e.g., as generated by the pixmap
-program). If both the \fB-data\fR and \fB-file\fR options are
-specified, the \fB-data\fR option takes precedence.
-.TP
-\fB-file\fR \fIname\fR
-\fIname\fR gives the name of a file whose contents define the source
-pixmap. The file must adhere to X11 pixmap format (e.g., as generated
-by the pixmap program).
-.RE
-.SH "IMAGE COMMAND"
-When a pixmap image is created, Tk also creates a new com­ mand whose
-name is the same as the image.  This command may be used to invoke
-various operations on the image.  It has the following general form:
-.TP
-\fIimageName\fR \fBoption\fR ?\fIarg arg ...\fR?\fR
-\fBOption\fR and the args determine the exact behavior of the
-command. The following commands are possible for pixmap images:
-.TP
-\fIimageName\fR \fBcget\fR \fIoption\fR\fR
-Returns the current value of the configuration option given by
-\fIoption\fR. \fIOption\fR may have any of the values accepted by the
-\fBimage create pixmap\fR command.
-.TP
-\fIimageName\fR \fBconfigure\fR ?\fBoption\fR? ?\fIvalue option value ...\fR?\fR
-Query or modify the configuration options for the image. If no option
-is specified, returns a list describing all of the available options
-for \fIimageName\fR (see \fBTk_ConfigureInfo\fR for information on the
-format of this list). If \fIoption\fR is specified with no
-\fIvalue\fR, then the command returns a list describing the one named
-option (this list will be identi­ cal to the corresponding sublist of
-the value returned if no option is specified).  If one or more
-\fIoption-value\fR pairs are specified, then the command modifies the
-given option(s) to have the given value(s); in this case the command
-returns an empty string. \fBOption\fR may have any of the values
-accepted by the \fBimage create pixmap\fR command.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, pixmap, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-png.n b/tkimg1.3/doc/man/img-png.n
deleted file mode 100644
index f115d6b..0000000
--- a/tkimg1.3/doc/man/img-png.n
+++ /dev/null
@@ -1,70 +0,0 @@
-'\"
-'\" Generated from file 'img-png.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-png" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-png \- Img, Portable Network Graphics format (png)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::png  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::png\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::png\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Portable Network Graphics format (png). More specifically
-\fBimg::png\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBpng\fR.
-This handler provides new additional configuration options. See
-section \fBPNG OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in png format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBpng\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBPNG OPTIONS\fR.
-.SH "PNG OPTIONS"
-The handler provides no true options at all, but accepts pairs of keys
-and values when writing a PNG file. Each pair will be written as a
-named text chunk where the key provides the name of the chunk and the
-value its contents.
-For example
-.nf
-    png Author <name> Title <title> Description ...
-.fi
-.SH "TRANSPARENCY"
-If you want to write images to disk which contain transparency
-information (e.g. PNG with alpha channel) you need at least
-\fBTk\fR 8.3.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, png, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-ppm.n b/tkimg1.3/doc/man/img-ppm.n
deleted file mode 100644
index 5a9c470..0000000
--- a/tkimg1.3/doc/man/img-ppm.n
+++ /dev/null
@@ -1,69 +0,0 @@
-'\"
-'\" Generated from file 'img-ppm.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-ppm" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-ppm \- Img, Portable Pixmap format (ppm)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::ppm  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::ppm\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::ppm\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Portable Pixmap format (ppm). More specifically
-\fBimg::ppm\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBppm\fR.
-This handler does not provide additional configuration options.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in ppm format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBppm\fR is recognized by the option \fB-format\fR.
-.SH "SUPPORTED PPM TYPES"
-There are two types of PPM files: RAW (binary) and ASCII.
-Currently only the RAW format is implemented.
-.nf
-  8-bit pixels: Grayscale, also known as PGM.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  8-bit | Yes   | Yes   | Yes   | Yes   |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
-
-.fi
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, ppm, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-ps.n b/tkimg1.3/doc/man/img-ps.n
deleted file mode 100644
index 61f04a2..0000000
--- a/tkimg1.3/doc/man/img-ps.n
+++ /dev/null
@@ -1,92 +0,0 @@
-'\"
-'\" Generated from file 'img-ps.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-ps" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-ps \- Img, Adobe PostScript Format (ps)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::ps  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::ps\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::ps\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Adobe PostScript Format (ps). More specifically
-\fBimg::ps\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBps\fR.
-This handler provides new additional configuration options. See
-section \fBPostScript OPTIONS\fR for more detailed explanations.
-.PP
-Note that this package provides a \fBpdf\fR handler too, i.e. a
-handler for the Adobe Portable Document Format. That handler accepts
-the same options as the \fBps\fR handler.
-.PP
-The package delegates the actual conversion of data in PostScript and
-PDF format into a raster image to the \fBghostscript\fR
-application. It therefore depends upon the presence of said
-application and is non-functional is \fBghostscript\fR is not
-present.
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in ps and PDF format (options \fB-data\fR
-and \fB-file\fR) is detected automatically.
-.IP [2]
-The format names \fBps\fR and \fBpdf\fR are
-recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBPostScript OPTIONS\fR.
-.SH "PostScript OPTIONS"
-The handler provides two options, both influencing the reading of
-PostScript or PDF images. The handler is \fInot\fR able to write
-images in PostScript or PDF.
-.TP
-\fB-index\fR \fIn\fR
-This option is for reading from PostScript/PDF data containing more
-than one page. When specified it will read the \fIn\fR'th page in the
-data. The first page is at index \fB0\fR and will be read by
-default, i.e. when the option is not specified.
-.sp
-\fINote:\fR This option is not yet implemented.
-.TP
-\fB-zoom\fR \fIX\fR \fIY\fR
-Multiply image size by the given scale factors. If \fIY\fR is missing,
-the default is the same as \fIX\fR. \fIX\fR and \fIY\fR are allowed to
-be in floating point format, but they are rounded to the nearest
-practically possible value. For postscript this means the zoom factors
-should be multiples of 1/72.
-.SH "REQUIREMENTS"
-The code provided by Img does not perform the interpretation and
-rasterizing of the input by itself but delegates this to the
-\fBgs\fR application. This is the GhostScript implementation
-of PostScript (and PDF).
-.PP
-If \fBgs\fR is not installed this format handler cannot be used.
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-ghostscript, gs, image handling, pdf, postscript, ps, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-sgi.n b/tkimg1.3/doc/man/img-sgi.n
deleted file mode 100644
index 7813344..0000000
--- a/tkimg1.3/doc/man/img-sgi.n
+++ /dev/null
@@ -1,99 +0,0 @@
-'\"
-'\" Generated from file 'img-sgi.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-sgi" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-sgi \- Img, SGI Native Format (sgi)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::sgi  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::sgi\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::sgi\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-SGI Native Format (sgi). More specifically
-\fBimg::sgi\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBsgi\fR.
-This handler provides new additional configuration options. See
-section \fBSGI OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in sgi format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBsgi\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBSGI OPTIONS\fR.
-.SH "SUPPORTED SGI TYPES"
-.nf
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- 48-bit pixels: True-color (RGB, each channel 16 bit).
- 64-bit pixels: True-color with alpha channel (RGBA, each channel 16 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes*  | Yes   | Yes*  |
- 32-bit | Yes   | Yes*  | Yes   | Yes*  |
- 48-bit | Yes   | Yes*  | No    | No    |
- 64-bit | Yes   | Yes*  | No    | No    |
-
- *: Implemented by reading/writing from/to a temporary file. This will
-    be slow for larger images.
-
- All images types may be either uncompressed or run-length encoded.
-.fi
-.SH "SGI OPTIONS"
-The handler provides the following options:
-.TP
-\fB-verbose\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBtrue\fR, additional information about the loaded/stored image
-is printed to stdout. Default is \fBfalse\fR.
-.TP
-\fB-compression\fR \fItype\fR
-This option is supported for writing only.
-.sp
-Set the compression mode to either \fBnone\fR or \fBrle\fR.
-Default is \fBrle\fR.
-.TP
-\fB-matte\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBfalse\fR, a matte (alpha) channel is ignored
-during reading or writing. Default is \fBtrue\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, sgi, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-sun.n b/tkimg1.3/doc/man/img-sun.n
deleted file mode 100644
index 8973815..0000000
--- a/tkimg1.3/doc/man/img-sun.n
+++ /dev/null
@@ -1,96 +0,0 @@
-'\"
-'\" Generated from file 'img-sun.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-sun" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-sun \- Img, Sun Raster Format (sun)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::sun  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::sun\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::sun\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Sun Raster Format (sun). More specifically
-\fBimg::sun\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBsun\fR.
-This handler provides new additional configuration options. See
-section \fBSUN OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in sun format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBsun\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBSUN OPTIONS\fR.
-.SH "SUPPORTED SUN TYPES"
-.nf
-  1-bit pixels: Black and White.
-  8-bit pixels: Grayscale or indexed.
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
-  1-bit | Yes   | Yes   | No    | No    |
-  8-bit | Yes   | Yes   | No    | No    |
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed or run-length encoded.
-.fi
-.SH "SUN OPTIONS"
-The handler provides the following options:
-.TP
-\fB-verbose\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBtrue\fR, additional information about the loaded/stored image
-is printed to stdout. Default is \fBfalse\fR.
-.TP
-\fB-compression\fR \fItype\fR
-This option is supported for writing only.
-.sp
-Set the compression mode to either \fBnone\fR or \fBrle\fR.
-Default is \fBrle\fR.
-.TP
-\fB-matte\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBfalse\fR, a matte (alpha) channel is ignored
-during reading or writing. Default is \fBtrue\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, sun, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-tga.n b/tkimg1.3/doc/man/img-tga.n
deleted file mode 100644
index a220188..0000000
--- a/tkimg1.3/doc/man/img-tga.n
+++ /dev/null
@@ -1,93 +0,0 @@
-'\"
-'\" Generated from file 'img-tga.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-tga" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-tga \- Img, Truevision Targa Format (tga)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::tga  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::tga\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::tga\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Truevision Targa Format (tga). More specifically
-\fBimg::tga\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBtga\fR.
-This handler provides new additional configuration options. See
-section \fBTGA OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in tga format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBtga\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBTGA OPTIONS\fR.
-.SH "SUPPORTED TGA TYPES"
-.nf
- 24-bit pixels: True-color (RGB, each channel 8 bit).
- 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
-
- List of currently supported features:
-
- Type   |     Read      |     Write     |
-        | -file | -data | -file | -data |
- ----------------------------------------
- 24-bit | Yes   | Yes   | Yes   | Yes   |
- 32-bit | Yes   | Yes   | Yes   | Yes   |
-
- All images types may be either uncompressed (Targa-Type 2) or
- run-length encoded (Targa-Type 10).
-.fi
-.SH "TGA OPTIONS"
-The handler provides the following options:
-.TP
-\fB-verbose\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBtrue\fR, additional information about the loaded/stored image
-is printed to stdout. Default is \fBfalse\fR.
-.TP
-\fB-compression\fR \fItype\fR
-This option is supported for writing only.
-.sp
-Set the compression mode to either \fBnone\fR or \fBrle\fR.
-Default is \fBrle\fR.
-.TP
-\fB-matte\fR \fIbool\fR
-This option is supported for reading and writing.
-.sp
-If set to \fBfalse\fR, a matte (alpha) channel is ignored
-during reading or writing. Default is \fBtrue\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, tga, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-tiff.n b/tkimg1.3/doc/man/img-tiff.n
deleted file mode 100644
index 5d197b5..0000000
--- a/tkimg1.3/doc/man/img-tiff.n
+++ /dev/null
@@ -1,74 +0,0 @@
-'\"
-'\" Generated from file 'img-tiff.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-tiff" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-tiff \- Img, Tagged Image File Format (tiff)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::tiff  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::tiff\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::tiff\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-Tagged Image File Format (tiff). More specifically
-\fBimg::tiff\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBtiff\fR.
-This handler provides new additional configuration options. See
-section \fBTIFF OPTIONS\fR for more detailed explanations.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in tiff format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBtiff\fR is recognized by the option \fB-format\fR.
-In addition the value for the option is treated as list and may
-contain any of the special options listed in section
-\fBTIFF OPTIONS\fR.
-.SH "TIFF OPTIONS"
-The handler provides two options to influence the writing of a TIFF
-image. There are \fIno\fR options to influence the reader.
-.TP
-\fB-compression\fR \fItype\fR
-This option specifies the type of compression to use when writing TIFF
-data. It has to be one of \fBnone\fR, \fBjpeg\fR,
-\fBpackbits\fR, or \fBdeflate\fR. The default is \fBnone\fR.
-.TP
-\fB-byteorder\fR \fItype\fR
-This option specifies the byteorder to use when writing TIFF data. It
-has to be one of \fBbigendian\fR, \fBlittleendian\fR,
-\fBnetwork\fR, \fBsmallendian\fR, or the empty string. The default
-is the empty string.
-.sp
-The values \fBbigendian\fR and \fBnetwork\fR are aliases of each
-other, as are \fBlittleendian\fR and \fBsmallendian\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, tiff, tk
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-window.n b/tkimg1.3/doc/man/img-window.n
deleted file mode 100644
index d5ef3bf..0000000
--- a/tkimg1.3/doc/man/img-window.n
+++ /dev/null
@@ -1,60 +0,0 @@
-'\"
-'\" Generated from file 'img-window.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-.so man.macros
-.TH "img-window" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-window \- Img, Tk Windows (window)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::window  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::window\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::window\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR.
-More specifically
-\fBimg::window\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBwindow\fR.
-.PP
-This handler does not provide additional configuration options.
-This handler is special. Instead of reading or writing image data from
-a file or string it allows the embedding of a Tk widget into the photo
-image. In other words, it takes a snapshot of the contents of a Tk
-window.
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in window format (option \fB-data\fR) is
-detected automatically. Image data is considered to be in the
-\fBwindow\fR format if the value given to option
-\fB-data\fR is the name of an existing Tk window.
-.sp
-Note that the standard option \fB-file\fR is not supported by this
-handler.
-.IP [2]
-The format name \fBwindow\fR is recognized by the option \fB-format\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, tk, window
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-xbm.n b/tkimg1.3/doc/man/img-xbm.n
deleted file mode 100644
index c7944fe..0000000
--- a/tkimg1.3/doc/man/img-xbm.n
+++ /dev/null
@@ -1,53 +0,0 @@
-'\"
-'\" Generated from file 'img-xbm.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-xbm" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-xbm \- Img, X Windows Bitmap Format (xbm)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::xbm  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::xbm\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::xbm\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-X Windows Bitmap Format (xbm). More specifically
-\fBimg::xbm\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBxbm\fR.
-This handler does not provide additional configuration options.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in xbm format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBxbm\fR is recognized by the option \fB-format\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, tk, xbm
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img-xpm.n b/tkimg1.3/doc/man/img-xpm.n
deleted file mode 100644
index ccd6762..0000000
--- a/tkimg1.3/doc/man/img-xpm.n
+++ /dev/null
@@ -1,53 +0,0 @@
-'\"
-'\" Generated from file 'img-xpm.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-'\" -*- tcl -*- doctools = format-header.inc
-.so man.macros
-.TH "img-xpm" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-xpm \- Img, X Windows Pixmap Format (xpm)
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBimg::xpm  ?1.3?\fR
-.sp
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-The package \fBimg::xpm\fR is a sub-package of
-\fBImg\fR. It can be loaded as a part of the complete Img support,
-via \fBpackage require Img\fR, or on its own, via
-\fBpackage require img::xpm\fR.
-.PP
-Like all packages of \fBImg\fR it does \fInot\fR provide new
-commands, but extends the existing \fBTk\fR command \fBimage\fR so
-that it supports files containing raster images in the
-X Windows Pixmap Format (xpm). More specifically
-\fBimg::xpm\fR extends \fBTk\fR's \fBphoto\fR
-image type.
-.PP
-The name of the new format handler is \fBxpm\fR.
-This handler does not provide additional configuration options.
-'\" -*- tcl -*- doctools = format-middle.inc
-.PP
-All of the above means that in a call like
-.TP
-\fBimage\fR \fBcreate photo\fR ?\fIname\fR? ?\fIoptions\fR?\fR
-.IP [1]
-Image data in xpm format (options \fB-data\fR and \fB-file\fR) is
-detected automatically.
-.IP [2]
-The format name \fBxpm\fR is recognized by the option \fB-format\fR.
-'\" -*- tcl -*- doctools = format-footer.inc
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-image handling, tk, xpm
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/doc/man/img.n b/tkimg1.3/doc/man/img.n
deleted file mode 100644
index 5cd1785..0000000
--- a/tkimg1.3/doc/man/img.n
+++ /dev/null
@@ -1,100 +0,0 @@
-'\"
-'\" Generated from file 'img.man' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-'\"
-'\" -*- tcl -*- doctools
-.so man.macros
-.TH "img-intro" n 1.3  "Img"
-.BS
-.SH "NAME"
-img-intro \- Introduction to Img
-.SH "SYNOPSIS"
-package require \fBTk \fR
-.sp
-package require \fBImg  ?1.3?\fR
-.sp
-.BE
-.SH "DESCRIPTION"
-\fBImg\fR is a \fBTk\fR extension, adding support for many
-other Image formats, as listed below. The individual formats are
-described in more detail on their own pages.
-.TP
-\fIbmp\fR
-Windows bitmap format.
-See \fBimg-bmp\fR.
-.TP
-\fIgif\fR
-The venerable graphics interchange format (with transparency, but
-without LZW. The latter due to patent issues).
-See \fBimg-gif\fR.
-.TP
-\fIico\fR
-Windows icon files.
-See \fBimg-ico\fR.
-.TP
-\fIjpeg\fR
-The format for lossy compressed still pictures specified by the Joint
-Picture Experts Group.
-See \fBimg-jpeg\fR.
-.TP
-\fIpcx\fR
-Paintbrush image format.
-See \fBimg-pcx\fR.
-.TP
-\fIpixmap\fR
-While the other formats are handlers for the \fBTk\fR photo image
-type this is a new image type for \fBTk\fR.
-See \fBimg-pixmap\fR.
-.TP
-\fIpng\fR
-Portable Network Graphics, successor to GIF.
-See \fBimg-png\fR.
-.TP
-\fIppm\fR
-Portable Pixmaps.
-See \fBimg-ppm\fR.
-.TP
-\fIps\fR
-Postscript and PDF (Portable document format). Requires an external
-application, \fBghostview\fR, for its operation.
-See \fBimg-ps\fR.
-.TP
-\fIsgi\fR
-Native SGI format.
-See \fBimg-sgi\fR.
-.TP
-\fIsun\fR
-Sun raster images.
-See \fBimg-sun\fR.
-.TP
-\fItga\fR
-Targa files.
-See \fBimg-tga\fR.
-.TP
-\fItiff\fR
-Tagged Interchange File Format.
-See \fBimg-tiff\fR.
-.TP
-\fIwindow\fR
-???
-See \fBimg-window\fR.
-.TP
-\fIxbm\fR
-X Bitmaps.
-See \fBimg-xbm\fR.
-.TP
-\fIxpm\fR
-X Pixmaps.
-See \fBimg-xpm\fR.
-This version only works with Tcl/Tk 8.2 or higher. If you are using Tk
-8.1 or lower please stick with Img 1.2.4 (which is still
-available). And if you are using Tk4.2 or lower, please stick with Img
-1.1.4 (which is also still available).
-.SH "SEE ALSO"
-img-bmp, img-gif, img-ico, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
-.SH "KEYWORDS"
-bmp, gif, ico, image handling, jpeg, pcx, pdf, pixmap, png, postscript, ppm, ps, sgi, sun, tga, tiff, tk, window, xbm, xpm
-.SH "COPYRIGHT"
-.nf
-Copyright (c) 1995-2003 Jan Nijtmans <nijtmans at users.sourceforge.com>
-.fi
diff --git a/tkimg1.3/gif/ChangeLog b/tkimg1.3/gif/ChangeLog
deleted file mode 100644
index 024691a..0000000
--- a/tkimg1.3/gif/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2002-11-20  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* gif.c: Removed superfluous function declarations (already done
-	  in init.c).
-
-	* Makefile.in:
-	* configure.in: New configuration variable PHIMTYPE, contains name
-	  of image type (in contrast to library name and package
-	  name). Inserted in 'init.c'. The configure variable TK_XINCLUDES
-	  has to placed in variable, to avoid problem on platforms placing
-	  a shell comment into it. More in the Makefile.
-
-2002-11-19  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/gif: GIF photo image type.
diff --git a/tkimg1.3/gif/Makefile.in b/tkimg1.3/gif/Makefile.in
deleted file mode 100644
index b08f295..0000000
--- a/tkimg1.3/gif/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimggif TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimggif_SOURCES	=	\
-		gif.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimggif_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimggif_OBJECTS	= $(tkimggif_SOURCES:.c=. at OBJEXT@)
-tkimggif_LIB_FILE	= @tkimggif_LIB_FILE@
-
-## tkimggifstub_OBJECTS	= tkimggifStubLib.$(OBJEXT)
-## tkimggifstub_LIB_FILE= @tkimggifstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimggif_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimggif_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimggif.$(OBJEXT): $(srcdir)/generic/tkimggif.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimggif.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimggif/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimggifConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimggif.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimggif_DECLS = \
-	$(srcdir)/tkimggif.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimggif_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimggif_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/gif/README b/tkimg1.3/gif/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/gif/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/gif/aclocal.m4 b/tkimg1.3/gif/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/gif/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/gif/configure b/tkimg1.3/gif/configure
deleted file mode 100755
index b42ede7..0000000
--- a/tkimg1.3/gif/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimggif', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./gif.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimggif
-DPACKAGE="img::gif"
-PHIMGTYPE="gif"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGGIF_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimggifstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGGIF_VERSION "${TKIMGGIF_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimggif in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimggif 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGGIF_VERSION@%$TKIMGGIF_VERSION%g
-s%@tkimggif_LIB_FILE@%$tkimggif_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/gif/configure.in b/tkimg1.3/gif/configure.in
deleted file mode 100644
index b7c47dd..0000000
--- a/tkimg1.3/gif/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimggif', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./gif.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimggif
-DPACKAGE="img::gif"
-PHIMGTYPE="gif"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGGIF_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGGIF_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimggif_LIB_FILE)
-#AC_SUBST(tkimggifstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGGIF_VERSION, "${TKIMGGIF_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimggif in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimggif)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/gif/gif.c b/tkimg1.3/gif/gif.c
deleted file mode 100644
index 9ce1b3b..0000000
--- a/tkimg1.3/gif/gif.c
+++ /dev/null
@@ -1,1824 +0,0 @@
-/*
- * gif.c --
- *
- *  GIF photo image type, Tcl/Tk package
- *
- *	A photo image file handler for GIF files. Reads 87a and 89a GIF
- *	files. At present, there only is a file write function. GIF images may be
- *	read using the -data option of the photo image.  The data may be
- *	given as a binary string in a Tcl_Obj or by representing
- *	the data as BASE64 encoded ascii.  Derived from the giftoppm code
- *	found in the pbmplus package and tkImgFmtPPM.c in the tk4.0b2
- *	distribution.
- *
- * Copyright (c) 2002 Andreas Kupries    <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 1997-2003 Jan Nijtmans  <nijtmans at users.sourceforge.net>
- *
- * Copyright (c) Reed Wade (wade at cs.utk.edu), University of Tennessee
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1997 Australian National University
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * This file also contains code from the giftoppm program, which is
- * copyrighted as follows:
- *
- * +-------------------------------------------------------------------+
- * | Copyright 1990, David Koblas.                                     |
- * |   Permission to use, copy, modify, and distribute this software   |
- * |   and its documentation for any purpose and without fee is hereby |
- * |   granted, provided that the above copyright notice appear in all |
- * |   copies and that both that copyright notice and this permission  |
- * |   notice appear in supporting documentation.  This software is    |
- * |   provided "as is" without express or implied warranty.           |
- * +-------------------------------------------------------------------+
- *
- * $Id: gif.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-/*
- * Non-ASCII encoding support:
- * Most data in a GIF image is binary and is treated as such.  However,
- * a few key bits are stashed in ASCII.  If we try to compare those pieces
- * to the char they represent, it will fail on any non-ASCII (eg, EBCDIC)
- * system.  To accomodate these systems, we test against the numeric value
- * of the ASCII characters instead of the characters themselves.  This is
- * encoding independant.
- */
-
-#  define GIF87a         "\x47\x49\x46\x38\x37\x61" /* ASCII GIF87a */
-#  define GIF89a         "\x47\x49\x46\x38\x39\x61" /* ASCII GIF89a */
-#  define GIF_TERMINATOR 0x3b                       /* ASCII ; */
-#  define GIF_EXTENSION  0x21                       /* ASCII ! */
-#  define GIF_START      0x2c                       /* ASCII , */
-
-/*
- * The format record for the GIF file format:
- */
-
-static int      CommonRead  _ANSI_ARGS_((Tcl_Interp *interp,
-		    tkimg_MFile *handle, CONST char *fileName, Tcl_Obj *format,
-		    Tk_PhotoHandle imageHandle, int destX, int destY,
-		    int width, int height, int srcX, int srcY));
-
-static int	CommonWrite _ANSI_ARGS_((Tcl_Interp *interp,
-		    tkimg_MFile *handle, Tcl_Obj *format,
-		    Tk_PhotoImageBlock *blockPtr));
-
-#define INTERLACE		0x40
-#define LOCALCOLORMAP		0x80
-#define BitSet(byte, bit)	(((byte) & (bit)) == (bit))
-#define MAXCOLORMAPSIZE		256
-#define CM_RED			0
-#define CM_GREEN		1
-#define CM_BLUE			2
-#define CM_ALPHA		3
-#define MAX_LWZ_BITS		12
-#define LM_to_uint(a,b)         (((b)<<8)|(a))
-#define ReadOK(handle,buffer,len)	(tkimg_Read(handle, buffer, len) == len)
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int		DoExtension _ANSI_ARGS_((tkimg_MFile *handle, int label,
-			    int *transparent));
-
-static int		GetCode _ANSI_ARGS_((tkimg_MFile *handle, int code_size,
-			    int flag));
-
-static int		GetDataBlock _ANSI_ARGS_((tkimg_MFile *handle,
-			    unsigned char *buf));
-
-static int		ReadColorMap _ANSI_ARGS_((tkimg_MFile *handle, int number,
-			    unsigned char buffer[MAXCOLORMAPSIZE][4]));
-
-static int		ReadGIFHeader _ANSI_ARGS_((tkimg_MFile *handle,
-			    int *widthPtr, int *heightPtr));
-
-static int		ReadImage _ANSI_ARGS_((Tcl_Interp *interp,
-			    char *imagePtr, tkimg_MFile *handle, int len, int rows, 
-			    unsigned char cmap[MAXCOLORMAPSIZE][4],
-			    int width, int height, int srcX, int srcY,
-			    int interlace, int transparent));
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *  This procedure is invoked by the photo image type to see if
- *  a channel contains image data in GIF format.
- *
- * Results:
- *  The return value is 1 if the first characters in channel chan
- *  look like GIF data, and 0 otherwise.
- *
- * Side effects:
- *  The access position in f may change.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;		/* interpreter */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw GIF file. */
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return ReadGIFHeader(&handle, widthPtr, heightPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnRead --
- *
- *	This procedure is called by the photo image type to read
- *	GIF format data from a channel and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- * Side effects:
- *	The access position in channel chan is changed, and new data is
- *	added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead(interp, &handle, fileName, format,
-    	    imageHandle, destX, destY, width, height, srcX, srcY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonRead --
- *
- *	This procedure is called by the photo image type to read
- *	GIF format data from a file and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- * Side effects:
- *	The access position in file f is changed, and new data is
- *	added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], if not included already
-		  in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead(interp, handle, fileName, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;		/* The image file, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    int fileWidth, fileHeight;
-    int nBytes, index = 0, objc = 0;
-    Tcl_Obj **objv = NULL;
-    myblock bl;
-    unsigned char buf[100];
-    unsigned char *trashBuffer = NULL;
-    unsigned char *pixBuf = NULL;
-    int bitPixel;
-    unsigned int colorResolution;
-    unsigned int background;
-    unsigned int aspectRatio;
-    unsigned char colorMap[MAXCOLORMAPSIZE][4];
-    int transparent = -1;
-
-    if (tkimg_ListObjGetElements(interp, format, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc > 1) {
-	char *c = Tcl_GetStringFromObj(objv[1], &nBytes);
-	if ((objc > 3) || ((objc == 3) && ((c[0] != '-') ||
-		(c[1] != 'i') || strncmp(c, "-index", strlen(c))))) {
-	    Tcl_AppendResult(interp, "invalid format: \"",
-		    tkimg_GetStringFromObj(format, NULL), "\"", (char *) NULL);
-	    return TCL_ERROR;
-	}
-    }
-    if (objc > 1) {
-	if (Tcl_GetIntFromObj(interp, objv[objc-1], &index) != TCL_OK) {
-	    return TCL_ERROR;
-	}
-    }
-
-    if (!ReadGIFHeader(handle, &fileWidth, &fileHeight)) {
-	Tcl_AppendResult(interp, "couldn't read GIF header from file \"",
-		fileName, "\"", NULL);
-	return TCL_ERROR;
-    }
-    if ((fileWidth <= 0) || (fileHeight <= 0)) {
-	Tcl_AppendResult(interp, "GIF image file \"", fileName,
- 		"\" has dimension(s) <= 0", (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    if (tkimg_Read(handle, buf, 3) != 3) {
-	return TCL_OK;
-    }
-
-    bitPixel = 2<<(buf[0]&0x07);
-    colorResolution = ((((unsigned int) buf[0]&0x70)>>3)+1);
-    background = buf[1];
-    aspectRatio = buf[2];
-
-    if (BitSet(buf[0], LOCALCOLORMAP)) {    /* Global Colormap */
-	if (!ReadColorMap(handle, bitPixel, colorMap)) {
-	    Tcl_AppendResult(interp, "error reading color map",
-		    (char *) NULL);
-	    return TCL_ERROR;
-	}
-    }
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)
-	    || (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    block.pixelSize = 4;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 3;
-    block.pixelPtr = NULL;
-
-    while (1) {
-	if (tkimg_Read(handle, buf, 1) != 1) {
-	    /*
-	     * Premature end of image.  We should really notify
-	     * the user, but for now just show garbage.
-	     */
-
-	    break;
-	}
-
-	if (buf[0] == GIF_TERMINATOR) {
-	    /*
-	     * GIF terminator.
-	     */
-
-	    Tcl_AppendResult(interp,"no image data for this index",
-		    (char *) NULL);
-	    goto error;
-	}
-
-	if (buf[0] == GIF_EXTENSION) {
-	    /*
-	     * This is a GIF extension.
-	     */
-
-	    if (tkimg_Read(handle, buf, 1) != 1) {
-		Tcl_AppendResult(interp,
-			"error reading extension function code in GIF image",
-			(char *) NULL);
-		goto error;
-	    }
-	    if (DoExtension(handle, buf[0], &transparent) < 0) {
-		Tcl_AppendResult(interp, "error reading extension in GIF image",
-			(char *) NULL);
-		goto error;
-	    }
-	    continue;
-	}
-
-	if (buf[0] != GIF_START) {
-	    /*
-	     * Not a valid start character; ignore it.
-	     */
-	    continue;
-	}
-
-	if (tkimg_Read(handle, buf, 9) != 9) {
-	    Tcl_AppendResult(interp,
-		    "couldn't read left/top/width/height in GIF image",
-		    (char *) NULL);
-	    goto error;
-	}
-
-	fileWidth = LM_to_uint(buf[4],buf[5]);
-	fileHeight = LM_to_uint(buf[6],buf[7]);
-
-	bitPixel = 2<<(buf[8]&0x07);
-
-	if (index--) {
-	    /* this is not the image we want to read: skip it. */
-	    if (BitSet(buf[8], LOCALCOLORMAP)) {
-		if (!ReadColorMap(handle, bitPixel, colorMap)) {
-		    Tcl_AppendResult(interp,
-			    "error reading color map", (char *) NULL);
-		    goto error;
-		}
-	    }
-
-	    /* If we've not yet allocated a trash buffer, do so now */
-	    if (trashBuffer == NULL) {
-		nBytes = fileWidth * fileHeight * 3;
-		trashBuffer =
-		    (unsigned char *) ckalloc((unsigned int) nBytes);
-	    }
-
-	    /*
-	     * Slurp!  Process the data for this image and stuff it in a
-	     * trash buffer.
-	     *
-	     * Yes, it might be more efficient here to *not* store the data
-	     * (we're just going to throw it away later).  However, I elected
-	     * to implement it this way for good reasons.  First, I wanted to
-	     * avoid duplicating the (fairly complex) LWZ decoder in ReadImage.
-	     * Fine, you say, why didn't you just modify it to allow the use of
-	     * a NULL specifier for the output buffer?  I tried that, but it
-	     * negatively impacted the performance of what I think will be the
-	     * common case:  reading the first image in the file.  Rather than
-	     * marginally improve the speed of the less frequent case, I chose
-	     * to maintain high performance for the common case.
-	     */
-	    if (ReadImage(interp, trashBuffer, handle, fileWidth,
-			  fileHeight, colorMap, 0, 0, 0, 0, 0, -1) != TCL_OK) {
-	      goto error;
-	    }
-	    continue;
-	}
-
-	/* If a trash buffer has been allocated, free it now */
-	if (trashBuffer != NULL) {
-	    ckfree((char *)trashBuffer);
-	    trashBuffer = NULL;
-	}
-	if (BitSet(buf[8], LOCALCOLORMAP)) {
-	    if (!ReadColorMap(handle, bitPixel, colorMap)) {
-		    Tcl_AppendResult(interp, "error reading color map", 
-			    (char *) NULL);
-		    goto error;
-	    }
-	}
-
-	index = LM_to_uint(buf[0],buf[1]);
-	srcX -= index;
-	if (srcX<0) {
-	    destX -= srcX; width += srcX;
-	    srcX = 0;
-	}
-
-	if (width > fileWidth) {
-	    width = fileWidth;
-	}
-
-	index = LM_to_uint(buf[2],buf[3]);
-	srcY -= index;
-	if (index > srcY) {
-	    destY -= srcY; height += srcY;
-	    srcY = 0;
-	}
-	if (height > fileHeight) {
-	    height = fileHeight;
-	}
-
-	if ((width <= 0) || (height <= 0)) {
-	    block.pixelPtr = 0;
-	    goto noerror;
-	}
-
-	block.width = width;
-	block.height = height;
-	block.pixelSize = (transparent>=0)?4:3;
-	block.pitch = block.pixelSize * fileWidth;
-	nBytes = block.pitch * fileHeight;
-	pixBuf = (unsigned char *) ckalloc((unsigned) nBytes);
-	block.pixelPtr = pixBuf;
-
-	if (ReadImage(interp, (char *) block.pixelPtr, handle, fileWidth, fileHeight,
-		colorMap, fileWidth, fileHeight, srcX, srcY,
-		BitSet(buf[8], INTERLACE), transparent) != TCL_OK) {
-	    goto error;
-	}
-	break;
-    }
-
-    block.pixelPtr = pixBuf + srcY * block.pitch + srcX * block.pixelSize;
-    if (transparent == -1) {
-	tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, destY, width, height);
-    } else {
-	tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, destY, width, height);
-    }
-
-    noerror:
-    if (pixBuf) {
-	ckfree((char *) pixBuf);
-    }
-    return TCL_OK;
-
-    error:
-    if (pixBuf) {
-	ckfree((char *) pixBuf);
-    }
-    return TCL_ERROR;
-
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatch --
- *
- *  This procedure is invoked by the photo image type to see if
- *  an object contains image data in GIF format.
- *
- * Results:
- *  The return value is 1 if the first characters in the object are
- *  like GIF data, and 0 otherwise.
- *
- * Side effects:
- *  the size of the image is placed in widthPtr and heightPtr.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;		/* interpreter */
-    Tcl_Obj *data;		/* the object containing the image data */
-    Tcl_Obj *format;		/* the image format object */
-    int *widthPtr;		/* where to put the image width */
-    int *heightPtr;		/* where to put the image height */
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, 'G', &handle)) {
-	return 0;
-    }
-    return ReadGIFHeader(&handle, widthPtr, heightPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjRead --
- *
- *	This procedure is called by the photo image type to read
- *	GIF format data from a base64 encoded string, and give it to
- *	the photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- * Side effects:
- *	new data is added to the image given by imageHandle.  This
- *	procedure calls FileReadGif by redefining the operation of
- *	fprintf temporarily.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjRead(interp, data, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* interpreter for reporting errors in */
-    Tcl_Obj *data;		/* object containing the image */
-    Tcl_Obj *format;		/* format object if any */
-    Tk_PhotoHandle imageHandle;	/* the image to write this data into */
-    int destX, destY;		/* The rectangular region of the  */
-    int  width, height;		/*   image to copy */
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-    tkimg_ReadInit(data, 'G', &handle);
-    return CommonRead(interp, &handle, "inline data", format,
-	    imageHandle, destX, destY, width, height, srcX, srcY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ReadGIFHeader --
- *
- *	This procedure reads the GIF header from the beginning of a
- *	GIF file and returns the dimensions of the image.
- *
- * Results:
- *	The return value is 1 if file "f" appears to start with
- *	a valid GIF header, 0 otherwise.  If the header is valid,
- *	then *widthPtr and *heightPtr are modified to hold the
- *	dimensions of the image.
- *
- * Side effects:
- *	The access position in f advances.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ReadGIFHeader(handle, widthPtr, heightPtr)
-    tkimg_MFile *handle;		/* Image file to read the header from */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here. */
-{
-    unsigned char buf[7];
-
-    if ((tkimg_Read(handle, buf, 6) != 6)
-	    || ((strncmp(GIF87a, (char *) buf, 6) != 0)
-	    && (strncmp(GIF89a, (char *) buf, 6) != 0))) {
-	return 0;
-    }
-
-    if (tkimg_Read(handle, buf, 4) != 4) {
-	return 0;
-    }
-
-    *widthPtr = LM_to_uint(buf[0],buf[1]);
-    *heightPtr = LM_to_uint(buf[2],buf[3]);
-    return 1;
-}
-
-/*
- *-----------------------------------------------------------------
- * The code below is copied from the giftoppm program and modified
- * just slightly.
- *-----------------------------------------------------------------
- */
-
-static int
-ReadColorMap(handle, number, buffer)
-     tkimg_MFile *handle;
-     int number;
-     unsigned char buffer[MAXCOLORMAPSIZE][4];
-{
-	int i;
-	unsigned char rgb[3];
-
-	for (i = 0; i < number; ++i) {
-	    if (! ReadOK(handle, rgb, sizeof(rgb))) {
-		return 0;
-	    }
-	    
-	    if (buffer) {
-		buffer[i][CM_RED] = rgb[0] ;
-		buffer[i][CM_GREEN] = rgb[1] ;
-		buffer[i][CM_BLUE] = rgb[2] ;
-		buffer[i][CM_ALPHA] = 255 ;
-	    }
-	}
-	return 1;
-}
-
-static int
-DoExtension(handle, label, transparent)
-     tkimg_MFile    *handle;
-     int label;
-     int *transparent;
-{
-    static unsigned char buf[256];
-    int count;
-
-    switch (label) {
-	case 0x01:      /* Plain Text Extension */
-	    break;
-	    
-	case 0xff:      /* Application Extension */
-	    break;
-
-	case 0xfe:      /* Comment Extension */
-	    do {
-		count = GetDataBlock(handle, (unsigned char*) buf);
-	    } while (count > 0);
-	    return count;
-
-	case 0xf9:      /* Graphic Control Extension */
-	    count = GetDataBlock(handle, (unsigned char*) buf);
-	    if (count < 0) {
-		return 1;
-	    }
-	    if ((buf[0] & 0x1) != 0) {
-		*transparent = buf[3];
-	    }
-
-	    do {
-		count = GetDataBlock(handle, (unsigned char*) buf);
-	    } while (count > 0);
-	    return count;
-    }
-
-    do {
-	count = GetDataBlock(handle, (unsigned char*) buf);
-    } while (count > 0);
-    return count;
-}
-
-static int ZeroDataBlock = 0;
-
-static int
-GetDataBlock(handle, buf)
-     tkimg_MFile *handle;
-     unsigned char *buf;
-{
-    unsigned char count;
-
-    if (! ReadOK(handle,&count,1)) {
-	return -1;
-    }
-
-    ZeroDataBlock = count == 0;
-
-    if ((count != 0) && (! ReadOK(handle, buf, count))) {
-	return -1;
-    }
-
-    return count;
-}
-
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ReadImage --
- *
- *	Process a GIF image from a given source, with a given height,
- *      width, transparency, etc.
- *
- *      This code is based on the code found in the ImageMagick GIF decoder,
- *      which is (c) 2000 ImageMagick Studio.
- *
- *      Some thoughts on our implementation:
- *      It sure would be nice if ReadImage didn't take 11 parameters!  I think
- *      that if we were smarter, we could avoid doing that.
- *
- *      Possible further optimizations:  we could pull the GetCode function
- *      directly into ReadImage, which would improve our speed.
- *
- * Results:
- *	Processes a GIF image and loads the pixel data into a memory array.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ReadImage(interp, imagePtr, handle, len, rows, cmap,
-	width, height, srcX, srcY, interlace, transparent)
-     Tcl_Interp *interp;
-     char 	*imagePtr;
-     tkimg_MFile    *handle;
-     int len, rows;
-     unsigned char   cmap[MAXCOLORMAPSIZE][4];
-     int width, height;
-     int srcX, srcY;
-     int interlace;
-     int transparent;
-{
-    unsigned char initialCodeSize;
-    int v;
-    int xpos = 0, ypos = 0, pass = 0, i;
-    register char *pixelPtr;
-    CONST static int interlaceStep[] = { 8, 8, 4, 2 };
-    CONST static int interlaceStart[] = { 0, 4, 2, 1 };
-    unsigned short prefix[(1 << MAX_LWZ_BITS)];
-    unsigned char  append[(1 << MAX_LWZ_BITS)];
-    unsigned char  stack[(1 << MAX_LWZ_BITS)*2];
-    register unsigned char *top;
-    int codeSize, clearCode, inCode, endCode, oldCode, maxCode,
-	code, firstCode;
-    
-    /*
-     *  Initialize the decoder
-     */
-    if (! ReadOK(handle,&initialCodeSize,1))  {
-	Tcl_AppendResult(interp, "error reading GIF image: ",
-		Tcl_PosixError(interp), (char *) NULL);
-	return TCL_ERROR;
-    }
-    if (transparent!=-1) {
-	cmap[transparent][CM_RED] = 0;
-	cmap[transparent][CM_GREEN] = 0;
-	cmap[transparent][CM_BLUE] = 0;
-	cmap[transparent][CM_ALPHA] = 0;
-    }
-
-    pixelPtr = imagePtr;
-
-    /* Initialize the decoder */
-    /* Set values for "special" numbers:
-     * clear code	reset the decoder
-     * end code		stop decoding
-     * code size	size of the next code to retrieve
-     * max code		next available table position
-     */
-    clearCode   = 1 << (int) initialCodeSize;
-    endCode     = clearCode + 1;
-    codeSize    = (int) initialCodeSize + 1;
-    maxCode     = clearCode + 2;
-    oldCode     = -1;
-    firstCode   = -1;
-    
-    memset((void *)prefix, 0, (1 << MAX_LWZ_BITS) * sizeof(short));
-    memset((void *)append, 0, (1 << MAX_LWZ_BITS) * sizeof(char));
-    for (i = 0; i < clearCode; i++) {
-	append[i] = i;
-    }
-    top = stack;
-
-    GetCode(handle, 0, 1);
-
-    /* Read until we finish the image */
-    for (i = 0, ypos = 0; i < rows; i++) {
-	for (xpos = 0; xpos < len; ) {
-
-	    if (top == stack) {
-		/* Bummer -- our stack is empty.  Now we have to work! */
-		code = GetCode(handle, codeSize, 0);
-		if (code < 0) {
-		    return TCL_OK;
-		}
-
-		if (code > maxCode || code == endCode) {
-		    /*
-		     * If we're doing things right, we should never
-		     * receive a code that is greater than our current
-		     * maximum code.  If we do, bail, because our decoder
-		     * does not yet have that code set up.
-		     *
-		     * If the code is the magic endCode value, quit.
-		     */
-		    return TCL_OK;
-		}
-
-		if (code == clearCode) {
-		    /* Reset the decoder */
-		    codeSize    = initialCodeSize + 1;
-		    maxCode     = clearCode + 2;
-		    oldCode     = -1;
-		    continue;
-		}
-		
-		if (oldCode == -1) {
-		    /*
-		     * Last pass reset the decoder, so the first code we
-		     * see must be a singleton.  Seed the stack with it,
-		     * and set up the old/first code pointers for
-		     * insertion into the string table.  We can't just
-		     * roll this into the clearCode test above, because
-		     * at that point we have not yet read the next code.
-		     */
-		    *top++=append[code];
-		    oldCode = code;
-		    firstCode = code;
-		    continue;
-		}
-		
-		inCode = code;
-
-		if (code == maxCode) {
-		    /*
-		     * maxCode is always one bigger than our highest assigned
-		     * code.  If the code we see is equal to maxCode, then
-		     * we are about to add a new string to the table. ???
-		     */
-		    *top++ = firstCode;
-		    code = oldCode;
-		}
-
-		while (code > clearCode) {
-		    /*
-		     * Populate the stack by tracing the string in the
-		     * string table from its tail to its head
-		     */
-		    *top++ = append[code];
-		    code = prefix[code];
-		}
-		firstCode = append[code];
-
-		/*
-		 * If there's no more room in our string table, quit.
-		 * Otherwise, add a new string to the table
-		 */
-		if (maxCode >= (1 << MAX_LWZ_BITS)) {
-		    return TCL_OK;
-		}
-
-		/* Push the head of the string onto the stack */
-		*top++ = firstCode;
-
-		/* Add a new string to the string table */
-		prefix[maxCode] = oldCode;
-		append[maxCode] = firstCode;
-		maxCode++;
-
-		/* maxCode tells us the maximum code value we can accept.
-		 * If we see that we need more bits to represent it than
-		 * we are requesting from the unpacker, we need to increase
-		 * the number we ask for.
-		 */
-		if ((maxCode >= (1 << codeSize))
-			&& (maxCode < (1<<MAX_LWZ_BITS))) {
-		    codeSize++;
-		}
-		oldCode = inCode;
-	    }
-
-	    /* Pop the next color index off the stack */
-	    v = *(--top);
-	    if (v < 0) {
-		return TCL_OK;
-	    }
-
-	    /* 
-	     * If pixelPtr is null, we're skipping this image (presumably
-	     * there are more in the file and we will be called to read 
-	     * one of them later)
-	     */
-	    *pixelPtr++ = cmap[v][CM_RED];
-	    *pixelPtr++ = cmap[v][CM_GREEN];
-	    *pixelPtr++ = cmap[v][CM_BLUE];
-	    if (transparent >= 0) {
-		*pixelPtr++ = cmap[v][CM_ALPHA];
-	    }
-	    xpos++;
-
-	}
-
-	/* If interlacing, the next ypos is not just +1 */
-	if (interlace) {
-	    ypos += interlaceStep[pass];
-	    while (ypos >= height) {
-		pass++;
-		if (pass > 3) {
-		    return TCL_OK;
-		}
-		ypos = interlaceStart[pass];
-	    }
-	} else {
-	    ypos++;
-	}
-	pixelPtr = imagePtr + (ypos) * len * ((transparent>=0)?4:3);
-    }
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * GetCode --
- *
- *      Extract the next compression code from the file.  In GIF's, the
- *      compression codes are between 3 and 12 bits long and are then
- *      packed into 8 bit bytes, left to right, for example:
- *                 bbbaaaaa
- *                 dcccccbb
- *                 eeeedddd
- *                 ...
- *      We use a byte buffer read from the file and a sliding window
- *      to unpack the bytes.  Thanks to ImageMagick for the sliding window
- *      idea.
- *      args:  handle         the handle to read from
- *             code_size    size of the code to extract
- *             flag         boolean indicating whether the extractor
- *                          should be reset or not
- *
- * Results:
- *	code                the next compression code
- *
- * Side effects:
- *	May consume more input from chan.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-GetCode(handle, code_size, flag)
-     tkimg_MFile    *handle;
-     int code_size;
-     int flag;
-{
-    static unsigned char buf[280];
-    static int bytes = 0, done;
-    static unsigned char *c;
-
-    static unsigned int window;
-    static int bitsInWindow = 0;
-    int ret;
-    
-    if (flag) {
-	/* Initialize the decoder */
-	bitsInWindow = 0;
-	bytes = 0;
-	window = 0;
-	done = 0;
-	c = NULL;
-	return 0;
-    }
-
-    while (bitsInWindow < code_size) {
-	/* Not enough bits in our window to cover the request */
-	if (done) {
-	    return -1;
-	}
-	if (bytes == 0) {
-	    /* Not enough bytes in our buffer to add to the window */
-	    bytes = GetDataBlock(handle, buf);
-	    c = buf;
-	    if (bytes <= 0) {
-		done = 1;
-		break;
-	    }
-	}
-	/* Tack another byte onto the window, see if that's enough */
-	window += (*c) << bitsInWindow;
-	c++;
-	bitsInWindow += 8;
-	bytes--;
-    }
-
-
-    /* The next code will always be the last code_size bits of the window */
-    ret = window & ((1 << code_size) - 1);
-    
-    /* Shift data in the window to put the next code at the end */
-    window >>= code_size;
-    bitsInWindow -= code_size;
-    return ret;
-}
-
-/*
- * This software is copyrighted as noted below.  It may be freely copied,
- * modified, and redistributed, provided that the copyright notice is
- * preserved on all copies.
- *
- * There is no warranty or other guarantee of fitness for this software,
- * it is provided solely "as is".  Bug reports or fixes may be sent
- * to the author, who may or may not act on them as he desires.
- *
- * You may not include this software in a program or other software product
- * without supplying the source, or without informing the end-user that the
- * source is available for no extra charge.
- *
- * If you modify this software, you should include a notice giving the
- * name of the person performing the modification, the date of modification,
- * and the reason for such modification.
- */
-
-
-/*
- * ChnWrite - writes a image in GIF format.
- *-------------------------------------------------------------------------
- * Author:          		Lolo
- *                              Engeneering Projects Area 
- *	            		Department of Mining 
- *                  		University of Oviedo
- * e-mail			zz11425958 at zeus.etsimo.uniovi.es
- *                  		lolo at pcsig22.etsimo.uniovi.es
- * Date:            		Fri September 20 1996
- *
- * Modified for transparency handling (gif89a) and miGIF compression
- * by Jan Nijtmans <j.nijtmans at chello.nl>
- *
- *----------------------------------------------------------------------
- * FileWriteGIF-
- *
- *    This procedure is called by the photo image type to write
- *    GIF format data from a photo image into a given file 
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- *----------------------------------------------------------------------
- */
-
- /*
-  *  Types, defines and variables needed to write and compress a GIF.
-  */
-
-typedef int (* ifunptr) _ANSI_ARGS_((void));	
-
-#define LSB(a)                  ((unsigned char) (((short)(a)) & 0x00FF))
-#define MSB(a)                  ((unsigned char) (((short)(a)) >> 8))
-
-#define GIFBITS 12
-#define HSIZE  5003            /* 80% occupancy */
-
-static int ssize;
-static int csize;
-static int rsize;
-static unsigned char *pixelo;
-static int pixelSize;
-static int pixelPitch;
-static int greenOffset;
-static int blueOffset;
-static int alphaOffset;
-static int num;
-static unsigned char mapa[MAXCOLORMAPSIZE][3];
-
-/*
- *	Definition of new functions to write GIFs
- */
-
-static int color _ANSI_ARGS_((int red,int green, int blue));
-
-static void compress _ANSI_ARGS_((int init_bits, tkimg_MFile *handle,
-		ifunptr readValue));
-
-static int nuevo _ANSI_ARGS_((int red, int green ,int blue,
-		unsigned char mapa[MAXCOLORMAPSIZE][3]));
-
-static int savemap _ANSI_ARGS_((Tk_PhotoImageBlock *blockPtr,
-		unsigned char mapa[MAXCOLORMAPSIZE][3]));
-
-static int ReadValue _ANSI_ARGS_((void));
-
-static int no_bits _ANSI_ARGS_((int colors));
-
-static int
-ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    CONST char	*filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan = NULL;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel(interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite(interp, &handle, format, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int
-StringWrite(interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int result;
-    tkimg_MFile handle;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    Tcl_DStringSetLength(dataPtr, 1024);
-    tkimg_WriteInit(dataPtr, &handle);
-
-    result = CommonWrite(interp, &handle, format, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-static int
-CommonWrite(interp, handle, format, blockPtr)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int  resolution;
-    long  numcolormap;
-
-    long  width,height,x;
-    unsigned char c;
-    unsigned int top,left;
-    int num;
-
-    top = 0;
-    left = 0;
-
-    pixelSize=blockPtr->pixelSize;
-    greenOffset=blockPtr->offset[1]-blockPtr->offset[0];
-    blueOffset=blockPtr->offset[2]-blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[2]) {
-	alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-
-    tkimg_Write(handle, (CONST char *) (alphaOffset ? GIF89a:GIF87a), 6);
-
-    for (x=0;x<MAXCOLORMAPSIZE;x++) {
-	mapa[x][CM_RED] = 255;
-	mapa[x][CM_GREEN] = 255;
-	mapa[x][CM_BLUE] = 255;
-    }
-
-
-    width=blockPtr->width;
-    height=blockPtr->height;
-    pixelo=blockPtr->pixelPtr + blockPtr->offset[0];
-    pixelPitch=blockPtr->pitch;
-    if ((num=savemap(blockPtr,mapa))<0) {
-	Tcl_AppendResult(interp, "too many colors", (char *) NULL);
-	return TCL_ERROR;
-    }
-    if (num<3) num=3;
-    c=LSB(width);
-    tkimg_Putc(c,handle);
-    c=MSB(width);
-    tkimg_Putc(c,handle);
-    c=LSB(height);
-    tkimg_Putc(c,handle);
-    c=MSB(height);
-    tkimg_Putc(c,handle);
-
-    c= (1 << 7) | (no_bits(num) << 4) | (no_bits(num));
-    tkimg_Putc(c,handle);
-    resolution = no_bits(num)+1;
-
-    numcolormap=1 << resolution;
-
-    /*  background color */
-
-    tkimg_Putc(0,handle);
-
-    /*  zero for future expansion  */
-
-    tkimg_Putc(0,handle);
-
-    for (x=0; x<numcolormap ;x++) {
-	tkimg_Putc(mapa[x][CM_RED],handle);
-	tkimg_Putc(mapa[x][CM_GREEN],handle);
-	tkimg_Putc(mapa[x][CM_BLUE],handle);
-    }
-
-    /*
-     * Write out extension for transparent colour index, if necessary.
-     */
-
-    if (alphaOffset) {
-	tkimg_Write(handle, "!\371\4\1\0\0\0", 8);
-    }
-
-    c = GIF_START;
-    tkimg_Putc(c,handle);
-    c=LSB(top);
-    tkimg_Putc(c,handle);
-    c=MSB(top);
-    tkimg_Putc(c,handle);
-    c=LSB(left);
-    tkimg_Putc(c,handle);
-    c=MSB(left);
-    tkimg_Putc(c,handle);
-
-    c=LSB(width);
-    tkimg_Putc(c,handle);
-    c=MSB(width);
-    tkimg_Putc(c,handle);
-
-    c=LSB(height);
-    tkimg_Putc(c,handle);
-    c=MSB(height);
-    tkimg_Putc(c,handle);
-
-    c=0;
-    tkimg_Putc(c,handle);
-    c=resolution;
-    tkimg_Putc(c,handle);
-
-    ssize = rsize = blockPtr->width;
-    csize = blockPtr->height;
-    compress(resolution+1, handle, ReadValue);
- 
-    tkimg_Putc(0,handle);
-    c = GIF_TERMINATOR;
-    tkimg_Putc(c,handle);
-
-    return TCL_OK;	
-}
-
-static int
-color(red, green, blue)
-    int red;
-    int green;
-    int blue;
-{
-    int x;
-    for (x=(alphaOffset != 0);x<=MAXCOLORMAPSIZE;x++) {
-	if ((mapa[x][CM_RED]==red) && (mapa[x][CM_GREEN]==green) &&
-		(mapa[x][CM_BLUE]==blue)) {
-	    return x;
-	}
-    }
-    return -1;
-}
-
-
-static int
-nuevo(red, green, blue, mapa)
-    int red,green,blue;
-    unsigned char mapa[MAXCOLORMAPSIZE][3];
-{
-    int x;
-    for (x=(alphaOffset != 0);x<num;x++) {
-	if ((mapa[x][CM_RED]==red) && (mapa[x][CM_GREEN]==green) &&
-		(mapa[x][CM_BLUE]==blue)) {
-	    return 0;
-	}
-    }
-    return 1;
-}
-
-static int
-savemap(blockPtr,mapa)
-    Tk_PhotoImageBlock *blockPtr;
-    unsigned char mapa[MAXCOLORMAPSIZE][3];
-{
-    unsigned char  *colores;
-    int x,y;
-    unsigned char  red,green,blue;
-
-    if (alphaOffset) {
-	num = 1;
-	mapa[0][CM_RED] = 0xd9;
-	mapa[0][CM_GREEN] = 0xd9;
-	mapa[0][CM_BLUE] = 0xd9;
-    } else {
-	num = 0;
-    }
-
-    for(y=0;y<blockPtr->height;y++) {
-	colores=blockPtr->pixelPtr + blockPtr->offset[0]
-		+ y * blockPtr->pitch;
-	for(x=0;x<blockPtr->width;x++) {
-	    if (!alphaOffset || (colores[alphaOffset] != 0)) {
-		red = colores[0];
-		green = colores[greenOffset];
-		blue = colores[blueOffset];
-		if (nuevo(red,green,blue,mapa)) {
-		    if (num>255)
-			return -1;
-
-		    mapa[num][CM_RED]=red;
-		    mapa[num][CM_GREEN]=green;
-		    mapa[num][CM_BLUE]=blue;
-		    num++;
-		}
-	    }
-	    colores += pixelSize;
-	}
-    }
-    return num;
-}
-
-static int
-ReadValue()
-{
-    unsigned int col;
-
-    if (csize == 0) {
-	return EOF;
-    }
-    if (alphaOffset && (pixelo[alphaOffset]==0)) {
-	col = 0;
-    } else {
-	col = color(pixelo[0],pixelo[greenOffset],pixelo[blueOffset]);
-    }
-    pixelo += pixelSize;
-    if (--ssize <= 0) {
-	ssize = rsize;
-	csize--;
-	pixelo += pixelPitch - (rsize * pixelSize);
-    }
-
-    return col;
-}
-
-/*
- * Return the number of bits ( -1 ) to represent a given
- * number of colors ( ex: 256 colors => 7 ).
- */
-static int
-no_bits( colors )
-int colors;
-{
-    register int bits = 0;
-
-    colors--;
-    while ( colors >> bits ) {
-	bits++;
-    }
-
-    return (bits-1);
-}
-
-
-
-/*-----------------------------------------------------------------------
- *
- * miGIF Compression - mouse and ivo's GIF-compatible compression
- *
- *          -run length encoding compression routines-
- *
- * Copyright (C) 1998 Hutchison Avenue Software Corporation
- *               http://www.hasc.com
- *               info at hasc.com
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation.  This software is provided "AS IS." The Hutchison Avenue 
- * Software Corporation disclaims all warranties, either express or implied, 
- * including but not limited to implied warranties of merchantability and 
- * fitness for a particular purpose, with respect to this code and accompanying
- * documentation. 
- * 
- * The miGIF compression routines do not, strictly speaking, generate files 
- * conforming to the GIF spec, since the image data is not LZW-compressed 
- * (this is the point: in order to avoid transgression of the Unisys patent 
- * on the LZW algorithm.)  However, miGIF generates data streams that any 
- * reasonably sane LZW decompresser will decompress to what we want.
- *
- * miGIF compression uses run length encoding. It compresses horizontal runs 
- * of pixels of the same color. This type of compression gives good results
- * on images with many runs, for example images with lines, text and solid 
- * shapes on a solid-colored background. It gives little or no compression 
- * on images with few runs, for example digital or scanned photos.
- *
- *                               der Mouse
- *                      mouse at rodents.montreal.qc.ca
- *            7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
- *
- *                             ivo at hasc.com
- *
- * The Graphics Interchange Format(c) is the Copyright property of
- * CompuServe Incorporated.  GIF(sm) is a Service Mark property of
- * CompuServe Incorporated.
- *
- */
-
-static int rl_pixel;
-static int rl_basecode;
-static int rl_count;
-static int rl_table_pixel;
-static int rl_table_max;
-static int just_cleared;
-static int out_bits;
-static int out_bits_init;
-static int out_count;
-static int out_bump;
-static int out_bump_init;
-static int out_clear;
-static int out_clear_init;
-static int max_ocodes;
-static int code_clear;
-static int code_eof;
-static unsigned int obuf;
-static int obits;
-static tkimg_MFile *ofile;
-static unsigned char oblock[MAXCOLORMAPSIZE];
-static int oblen;
-
-/* Used only when debugging GIF compression code */
-/* #define DEBUGGING_ENVARS */
-
-#ifdef DEBUGGING_ENVARS
-
-static int verbose_set = 0;
-static int verbose;
-#define VERBOSE (verbose_set?verbose:set_verbose())
-
-static int
-set_verbose(void)
-{
-   verbose = !!getenv("GIF_VERBOSE");
-   verbose_set = 1;
-   return(verbose);
-}
-
-#else
-
-#define VERBOSE 0
-
-#endif
-
-
-static CONST char *
-binformat(v, nbits)
-    unsigned int v;
-    int nbits;
-{
- static char bufs[8][64];
- static int bhand = 0;
- unsigned int bit;
- int bno;
- char *bp;
-
- bhand --;
- if (bhand < 0) bhand = (sizeof(bufs)/sizeof(bufs[0]))-1;
- bp = &bufs[bhand][0];
- for (bno=nbits-1,bit=1<<bno;bno>=0;bno--,bit>>=1)
-  { *bp++ = (v & bit) ? '1' : '0';
-    if (((bno&3) == 0) && (bno != 0)) *bp++ = '.';
-  }
- *bp = '\0';
- return(&bufs[bhand][0]);
-}
-
-static void
-write_block()
-{
-    int i;
-    unsigned char c;
-
-    if (VERBOSE) {
-        printf("write_block %d:",oblen);
-	for (i=0;i<oblen;i++) printf(" %02x",oblock[i]);
-	printf("\n");
-    }
-    c = oblen;
-    tkimg_Write(ofile, (CONST char *) &c, 1);
-    tkimg_Write(ofile, &oblock[0], oblen);
-    oblen = 0;
-}
-
-static void
-block_out(c)
-    unsigned char c;
-{
- if (VERBOSE) printf("block_out %s\n",binformat(c,8));
- oblock[oblen++] = c;
- if (oblen >= 255) write_block();
-}
-
-static void
-block_flush()
-{
-    if (VERBOSE) printf("block_flush\n");
-    if (oblen > 0) write_block();
-}
-
-static void
-output(val)
-    int val;
-{
- if (VERBOSE) printf("output %s [%s %d %d]\n",binformat(val,out_bits),binformat(obuf,obits),obits,out_bits);
- obuf |= val << obits;
- obits += out_bits;
- while (obits >= 8)
-  { block_out(obuf&0xff);
-    obuf >>= 8;
-    obits -= 8;
-  }
- if (VERBOSE) printf("output leaving [%s %d]\n",binformat(obuf,obits),obits);
-}
-
-static void
-output_flush()
-{
- if (VERBOSE) printf("output_flush\n");
- if (obits > 0) block_out(obuf);
- block_flush();
-}
-
-static void
-did_clear()
-{
- if (VERBOSE) printf("did_clear\n");
- out_bits = out_bits_init;
- out_bump = out_bump_init;
- out_clear = out_clear_init;
- out_count = 0;
- rl_table_max = 0;
- just_cleared = 1;
-}
-
-static void
-output_plain(c)
-    int c;
-{
- if (VERBOSE) printf("output_plain %s\n",binformat(c,out_bits));
- just_cleared = 0;
- output(c);
- out_count ++;
- if (out_count >= out_bump)
-  { out_bits ++;
-    out_bump += 1 << (out_bits - 1);
-  }
- if (out_count >= out_clear)
-  { output(code_clear);
-    did_clear();
-  }
-}
-
-static unsigned int
-isqrt(x)
-    unsigned int x;
-{
- unsigned int r;
- unsigned int v;
-
- if (x < 2) return(x);
- for (v=x,r=1;v;v>>=2,r<<=1) ;
- while (1)
-  { v = ((x / r) + r) / 2;
-    if ((v == r) || (v == r+1)) return(r);
-    r = v;
-  }
-}
-
-static unsigned int
-compute_triangle_count(count, nrepcodes)
-    unsigned int count;
-    unsigned int nrepcodes;
-{
- unsigned int perrep;
- unsigned int cost;
-
- cost = 0;
- perrep = (nrepcodes * (nrepcodes+1)) / 2;
- while (count >= perrep)
-  { cost += nrepcodes;
-    count -= perrep;
-  }
- if (count > 0)
-  { unsigned int n;
-    n = isqrt(count);
-    while ((n*(n+1)) >= 2*count) n --;
-    while ((n*(n+1)) < 2*count) n ++;
-    cost += n;
-  }
- return(cost);
-}
-
-static void
-max_out_clear()
-{
- out_clear = max_ocodes;
-}
-
-static void
-reset_out_clear()
-{
- out_clear = out_clear_init;
- if (out_count >= out_clear)
-  { output(code_clear);
-    did_clear();
-  }
-}
-
-static void
-rl_flush_fromclear(count)
-    int count;
-{
- int n;
-
- if (VERBOSE) printf("rl_flush_fromclear %d\n",count);
- max_out_clear();
- rl_table_pixel = rl_pixel;
- n = 1;
- while (count > 0)
-  { if (n == 1)
-     { rl_table_max = 1;
-       output_plain(rl_pixel);
-       count --;
-     }
-    else if (count >= n)
-     { rl_table_max = n;
-       output_plain(rl_basecode+n-2);
-       count -= n;
-     }
-    else if (count == 1)
-     { rl_table_max ++;
-       output_plain(rl_pixel);
-       count = 0;
-     }
-    else
-     { rl_table_max ++;
-       output_plain(rl_basecode+count-2);
-       count = 0;
-     }
-    if (out_count == 0) n = 1; else n ++;
-  }
- reset_out_clear();
- if (VERBOSE) printf("rl_flush_fromclear leaving table_max=%d\n",rl_table_max);
-}
-
-static void
-rl_flush_clearorrep(count)
-    int count;
-{
- int withclr;
-
- if (VERBOSE) printf("rl_flush_clearorrep %d\n",count);
- withclr = 1 + compute_triangle_count(count,max_ocodes);
- if (withclr < count)
-  { output(code_clear);
-    did_clear();
-    rl_flush_fromclear(count);
-  }
- else
-  { for (;count>0;count--) output_plain(rl_pixel);
-  }
-}
-
-static void
-rl_flush_withtable(count)
-    int count;
-{
- int repmax;
- int repleft;
- int leftover;
-
- if (VERBOSE) printf("rl_flush_withtable %d\n",count);
- repmax = count / rl_table_max;
- leftover = count % rl_table_max;
- repleft = (leftover ? 1 : 0);
- if (out_count+repmax+repleft > max_ocodes)
-  { repmax = max_ocodes - out_count;
-    leftover = count - (repmax * rl_table_max);
-    repleft = 1 + compute_triangle_count(leftover,max_ocodes);
-  }
- if (VERBOSE) printf("rl_flush_withtable repmax=%d leftover=%d repleft=%d\n",repmax,leftover,repleft);
- if (1+compute_triangle_count(count,max_ocodes) < repmax+repleft)
-  { output(code_clear);
-    did_clear();
-    rl_flush_fromclear(count);
-    return;
-  }
- max_out_clear();
- for (;repmax>0;repmax--) output_plain(rl_basecode+rl_table_max-2);
- if (leftover)
-  { if (just_cleared)
-     { rl_flush_fromclear(leftover);
-     }
-    else if (leftover == 1)
-     { output_plain(rl_pixel);
-     }
-    else
-     { output_plain(rl_basecode+leftover-2);
-     }
-  }
- reset_out_clear();
-}
-
-static void
-rl_flush()
-{
- if (VERBOSE) printf("rl_flush [ %d %d\n",rl_count,rl_pixel);
- if (rl_count == 1)
-  { output_plain(rl_pixel);
-    rl_count = 0;
-    if (VERBOSE) printf("rl_flush ]\n");
-    return;
-  }
- if (just_cleared)
-  { rl_flush_fromclear(rl_count);
-  }
- else if ((rl_table_max < 2) || (rl_table_pixel != rl_pixel))
-  { rl_flush_clearorrep(rl_count);
-  }
- else
-  { rl_flush_withtable(rl_count);
-  }
- if (VERBOSE) printf("rl_flush ]\n");
- rl_count = 0;
-}
-
-
-static void
-compress( init_bits, handle, readValue )
-    int init_bits;
-    tkimg_MFile *handle;
-    ifunptr readValue;
-{
- int c;
-
- ofile = handle;
- obuf = 0;
- obits = 0;
- oblen = 0;
- code_clear = 1 << (init_bits - 1);
- code_eof = code_clear + 1;
- rl_basecode = code_eof + 1;
- out_bump_init = (1 << (init_bits - 1)) - 1;
- /* for images with a lot of runs, making out_clear_init larger will
-    give better compression. */ 
- out_clear_init = (init_bits <= 3) ? 9 : (out_bump_init-1);
-#ifdef DEBUGGING_ENVARS
-  { CONST char *ocienv;
-    ocienv = getenv("GIF_OUT_CLEAR_INIT");
-    if (ocienv)
-     { out_clear_init = atoi(ocienv);
-       if (VERBOSE) printf("[overriding out_clear_init to %d]\n",out_clear_init);
-     }
-  }
-#endif
- out_bits_init = init_bits;
- max_ocodes = (1 << GIFBITS) - ((1 << (out_bits_init - 1)) + 3);
- did_clear();
- output(code_clear);
- rl_count = 0;
- while (1)
-  { c = readValue();
-    if ((rl_count > 0) && (c != rl_pixel)) rl_flush();
-    if (c == EOF) break;
-    if (rl_pixel == c)
-     { rl_count ++;
-     }
-    else
-     { rl_pixel = c;
-       rl_count = 1;
-     }
-  }
- output(code_eof);
- output_flush();
-}
-
-/*-----------------------------------------------------------------------
- *
- * End of miGIF section  - See copyright notice at start of section.
- *
- *-----------------------------------------------------------------------*/
diff --git a/tkimg1.3/gif/pkgIndex.tcl.in b/tkimg1.3/gif/pkgIndex.tcl.in
deleted file mode 100644
index 3e956f2..0000000
--- a/tkimg1.3/gif/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimggif_LIB_FILE@]]
diff --git a/tkimg1.3/gif/tests/all.tcl b/tkimg1.3/gif/tests/all.tcl
deleted file mode 100644
index a901b37..0000000
--- a/tkimg1.3/gif/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/gif/tests/folder.gif b/tkimg1.3/gif/tests/folder.gif
deleted file mode 100644
index 9548461..0000000
Binary files a/tkimg1.3/gif/tests/folder.gif and /dev/null differ
diff --git a/tkimg1.3/gif/tests/gif.test b/tkimg1.3/gif/tests/gif.test
deleted file mode 100644
index 0d1376f..0000000
--- a/tkimg1.3/gif/tests/gif.test
+++ /dev/null
@@ -1,44 +0,0 @@
-# This file is a Tcl script to test out GIF reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::gif [package require img::gif]"
-
-set gifdata \
-{R0lGODlhEAAMAJEAANnZ2QAAAPD/gP///yH5BAEAAAAALAAAAAAQAAwAAAI/hBMRZmYGSCSR
-IPgXJD8IPlB8PAAIko8SAEChfJQAAArlowQAUCgfJQCAQvkoAQAUykcJAKBQPkoAAMXHA4AC
-ADs=}
-
-test gif-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.gif]
-} i
-test gif-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $gifdata
-    i data -format gif
-} $gifdata
-test gif-1.3 {} {
-    catch {image delete i}
-    image create photo i
-    i put $gifdata
-    i data -format gif
-} $gifdata
-test gif-1.4 {} {
-    i blank
-    i put $gifdata -format gif
-    i data -format gif
-} $gifdata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test gif-2.0 {Binary I/O with GIF images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.gif] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/ico/ChangeLog b/tkimg1.3/ico/ChangeLog
deleted file mode 100644
index 200cff3..0000000
--- a/tkimg1.3/ico/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/ico: ICO photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/ico/Makefile.in b/tkimg1.3/ico/Makefile.in
deleted file mode 100644
index 4e3c00e..0000000
--- a/tkimg1.3/ico/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgico TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgico_SOURCES	=	\
-		ico.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgico_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgico_OBJECTS	= $(tkimgico_SOURCES:.c=. at OBJEXT@)
-tkimgico_LIB_FILE	= @tkimgico_LIB_FILE@
-
-## tkimgicostub_OBJECTS	= tkimgicoStubLib.$(OBJEXT)
-## tkimgicostub_LIB_FILE= @tkimgicostub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgico_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgico_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgico.$(OBJEXT): $(srcdir)/generic/tkimgico.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgico.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgico/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgicoConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgico.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgico_DECLS = \
-	$(srcdir)/tkimgico.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgico_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgico_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/ico/aclocal.m4 b/tkimg1.3/ico/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/ico/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/ico/configure b/tkimg1.3/ico/configure
deleted file mode 100755
index 9dbec1c..0000000
--- a/tkimg1.3/ico/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgico', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./ico.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgico
-DPACKAGE="img::ico"
-PHIMGTYPE="ico"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGICO_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgicostub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGICO_VERSION "${TKIMGICO_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgico in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgico 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGICO_VERSION@%$TKIMGICO_VERSION%g
-s%@tkimgico_LIB_FILE@%$tkimgico_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ico/configure.in b/tkimg1.3/ico/configure.in
deleted file mode 100644
index f0f67e8..0000000
--- a/tkimg1.3/ico/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgico', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./ico.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgico
-DPACKAGE="img::ico"
-PHIMGTYPE="ico"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGICO_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGICO_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgico_LIB_FILE)
-#AC_SUBST(tkimgicostub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGICO_VERSION, "${TKIMGICO_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgico in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgico)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ico/ico.c b/tkimg1.3/ico/ico.c
deleted file mode 100644
index abf0250..0000000
--- a/tkimg1.3/ico/ico.c
+++ /dev/null
@@ -1,1034 +0,0 @@
-/* STARTHEADER
- *
- * File :       ico.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Mon Aug 12 20:30:46 CEST 2002
- *
- * Copyright :  (C) 2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for Windows Icon file format.
- *
- * The following icon types are supported:
- *
- *  1-bit pixels: Black and White.
- *  4-bit pixels: Grayscale or indexed.
- *  8-bit pixels: Grayscale or indexed.
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- *  1-bit | Yes   | Yes   | No    | No    |
- *  4-bit | Yes   | Yes   | No    | No    |
- *  8-bit | Yes   | Yes   | Yes   | Yes   |
- * 24-bit | Yes   | Yes   | Yes   | Yes   |
- *
- *
- * The following format options are available:
- *
- * Read  ICO image: "ico -verbose <bool> -index <uint>"
- * Write ICO image: "ico -verbose <bool>"
- *
- * -verbose <bool>: If set to true, additional information about the file
- *                  format is printed to stdout. Default is "false".
- * -index <uint>:   Read the icon with specified index. Default is 0.
- *
- * Notes: 
- *
- *
- * ENDHEADER
- *
- * $Id: ico.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* #define DEBUG_LOCAL */
-
-/* Some defines and typedefs. */
-#define TRUE  1
-#define FALSE 0
-typedef unsigned char Boln;	/* Boolean value: TRUE or FALSE */
-typedef unsigned char UByte;	/* Unsigned  8 bit integer */
-typedef char  Byte;		/* Signed    8 bit integer */
-typedef unsigned short UShort;	/* Unsigned 16 bit integer */
-typedef short Short;		/* Signed   16 bit integer */
-typedef unsigned int UInt;	/* Unsigned 32 bit integer */
-typedef int Int;		/* Signed   32 bit integer */
-
-typedef struct {
-   UByte  width;
-   UByte  height;
-   UShort nColors;
-   UByte  reserved;
-   UShort nPlanes;
-   UShort bitCount;
-   UInt   sizeInBytes;
-   UInt   fileOffset;
-} ICOENTRY;
-
-/* ICO file header structure */
-typedef struct {
-   UShort   nIcons;
-   ICOENTRY *entries; 
-} ICOHEADER;
-
-typedef struct {
-   UInt   size;
-   UInt   width;
-   UInt   height;
-   UShort nPlanes;
-   UShort nBitsPerPixel;
-   UInt   compression;
-   UInt   imageSize;
-   UInt   xPixelsPerM;
-   UInt   yPixelsPerM;
-   UInt   nColorsUsed;
-   UInt   nColorsImportant;
-} INFOHEADER;
-
-typedef struct {
-   UByte red;
-   UByte green;
-   UByte blue;
-   UByte matte;
-} ICOCOLOR;
-
-/* ICO file format options structure for use with ParseFormatOpts */
-typedef struct {
-    UInt  index;
-    Boln  verbose;
-} FMTOPT;
-
-/* OPA TODO: Change from ANSI-C arguments to _ANSI_ARGS_ macro. */
-
-static Boln readUByte (tkimg_MFile *handle, UByte *b) 
-{
-    char buf[1];
-    if (1 != tkimg_Read (handle, buf, 1)) {
-        return FALSE;
-    }
-    *b = buf[0] & 0xFF;
-    return TRUE;
-}
-
-/* Read 2 bytes, representing a unsigned 16 bit integer in the form
-   <LowByte, HighByte>, from a file and convert them into the current
-   machine's format. */
-
-static Boln readUShort (tkimg_MFile *handle, UShort *s) 
-{
-    char buf[2];
-    UShort tmp;
-
-    if (2 != tkimg_Read (handle, buf, 2)) {
-        return FALSE;
-    }
-    tmp  =  buf[0] & 0xFF;
-    tmp |= (buf[1] & 0xFF) << 8;
-    *s = tmp;
-    return TRUE;
-}
-
-/* Read 4 bytes, representing a unsigned 32 bit integer in the form
-   <LowByte, HighByte>, from a file and convert them into the current
-   machine's format. */
-
-static Boln readUInt (tkimg_MFile *handle, UInt *i) 
-{
-    char buf[4];
-    UInt tmp;
-
-    if (4 != tkimg_Read (handle, buf, 4)) {
-        return FALSE;
-    }
-    tmp  =  buf[0] & 0xFF;
-    tmp |= (buf[1] & 0xFF) <<  8;
-    tmp |= (buf[2] & 0xFF) << 16;
-    tmp |= (buf[3] & 0xFF) << 24;
-    *i = tmp;
-    return TRUE;
-}
-
-/* Write a byte, representing an unsigned integer to a file. */
-
-static Boln writeUByte (tkimg_MFile *handle, UByte b) 
-{
-    UByte buf[1];
-    buf[0] = b;
-    if (1 != tkimg_Write (handle, (CONST char *)buf, 1)) {
-        return FALSE;
-    }
-    return TRUE;
-}
-
-/* Convert a unsigned 16 bit integer number into the format
-   <LowByte, HighByte> (an array of 2 bytes) and write the array to a file. */
-
-static Boln writeUShort (tkimg_MFile *handle, UShort s) 
-{
-    Byte buf[2];
-    buf[0] = s;
-    buf[1] = s >> 8;
-    if (2 != tkimg_Write (handle, buf, 2)) {
-        return FALSE;
-    }
-    return TRUE;
-}
-
-/* Convert a unsigned 32 bit integer number into the format
-   <LowByte, HighByte> (an array of 4 bytes) and write the array to a file. */
-
-static Boln writeUInt (tkimg_MFile *handle, UInt i) 
-{
-    Byte buf[4];
-    buf[0] = i;
-    buf[1] = i >> 8;
-    buf[2] = i >> 16;
-    buf[3] = i >> 24;
-    if (4 != tkimg_Write (handle, buf, 4)) {
-        return FALSE;
-    }
-    return TRUE;
-}
-
-#define OUT Tcl_WriteChars (outChan, str, -1)
-static void printImgInfo (ICOHEADER *th, INFOHEADER *ih, FMTOPT *opts,
-                          CONST char *filename, CONST char *msg) 
-{
-    Tcl_Channel outChan;
-    char str[256];
-    int i = opts->index;
-
-    outChan = Tcl_GetStdChannel (TCL_STDOUT);
-    if (!outChan) {
-        return;
-    }
-    sprintf (str, "%s %s\n", msg, filename);                                 OUT;
-    sprintf (str, "  No. of icons : %d\n", th->nIcons);                      OUT;
-    sprintf (str, "  Icon %d:\n", i);                                        OUT;
-    sprintf (str, "    Width and Height: %dx%d\n", ih->width, ih->height);   OUT;
-    sprintf (str, "    Number of colors: %d\n", th->entries[i].nColors);     OUT;
-    sprintf (str, "    Number of planes: %d\n", ih->nPlanes);                OUT;
-    sprintf (str, "    Bits per pixel:   %d\n", ih->nBitsPerPixel);          OUT;
-    sprintf (str, "    Size in bytes:    %d\n", th->entries[i].sizeInBytes); OUT;
-    sprintf (str, "    File offset:      %d\n", th->entries[i].fileOffset);  OUT;
-    Tcl_Flush (outChan);
-}
-#undef OUT
-
-static Boln readIcoHeader (tkimg_MFile *handle, ICOHEADER *th) 
-{
-    int    i;
-    UByte  nColors;
-    UShort reserved, type, nIcons;
-
-    if (!readUShort (handle, &reserved)) {
-	return FALSE;
-    }
-    if (reserved != 0) {
-	return FALSE;
-    }
-
-    if (!readUShort (handle, &type)) {
-	return FALSE;
-    }
-    if (type != 1) {
-	return FALSE;
-    }
-    if (!readUShort (handle, &nIcons)) {
-	return FALSE;
-    }
-    if (nIcons <= 0) {
-	return FALSE;
-    }
-
-    th->nIcons = nIcons;
-    if (!(th->entries = (ICOENTRY *)ckalloc (sizeof (ICOENTRY) * nIcons))) {
-	return FALSE;
-    }
-
-    for (i=0; i<nIcons; i++) {
-	if (!readUByte  (handle, &th->entries[i].width)  ||
-	    !readUByte  (handle, &th->entries[i].height) ||
-	    !readUByte  (handle, &nColors) ||
-	    !readUByte  (handle, &th->entries[i].reserved) ||
-	    !readUShort (handle, &th->entries[i].nPlanes) ||
-	    !readUShort (handle, &th->entries[i].bitCount) ||
-	    !readUInt   (handle, &th->entries[i].sizeInBytes) ||
-	    !readUInt   (handle, &th->entries[i].fileOffset)) {
-            ckfree ((char *)th->entries);
-	    return FALSE;
-	}
-        th->entries[i].nColors = (nColors == 0? 256: nColors);
-    }
-    return TRUE;
-}
-
-static Boln writeIcoHeader (tkimg_MFile *handle, ICOHEADER *th) 
-{
-    int    i;
-    UByte  nColors;
-    UShort reserved = 0, 
-           type = 1;
-
-    if (!writeUShort (handle, reserved)) {
-	return FALSE;
-    }
-    if (!writeUShort (handle, type)) {
-	return FALSE;
-    }
-    if (!writeUShort (handle, th->nIcons)) {
-	return FALSE;
-    }
-    for (i=0; i<th->nIcons; i++) {
-        nColors = (th->entries[i].nColors == 256? 0: th->entries[i].nColors);
-	if (!writeUByte  (handle, th->entries[i].width)  ||
-	    !writeUByte  (handle, th->entries[i].height) ||
-	    !writeUByte  (handle, nColors) ||
-	    !writeUByte  (handle, th->entries[i].reserved) ||
-	    !writeUShort (handle, th->entries[i].nPlanes) ||
-	    !writeUShort (handle, th->entries[i].bitCount) ||
-	    !writeUInt   (handle, th->entries[i].sizeInBytes) ||
-	    !writeUInt   (handle, th->entries[i].fileOffset)) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-static Boln readInfoHeader (tkimg_MFile *handle, INFOHEADER *ih) 
-{
-    if (!readUInt   (handle, &ih->size) ||
-	!readUInt   (handle, &ih->width) ||
-	!readUInt   (handle, &ih->height) ||
-	!readUShort (handle, &ih->nPlanes) ||
-	!readUShort (handle, &ih->nBitsPerPixel) ||
-	!readUInt   (handle, &ih->compression) ||
-	!readUInt   (handle, &ih->imageSize) ||
-	!readUInt   (handle, &ih->xPixelsPerM) ||
-	!readUInt   (handle, &ih->yPixelsPerM) ||
-	!readUInt   (handle, &ih->nColorsUsed) ||
-	!readUInt   (handle, &ih->nColorsImportant)) {
-	return FALSE;
-    }
-    #if defined (DEBUG_LOCAL)
-	printf ("Info header:\n");
-	printf ("Size: %d\n", ih->size);
-	printf ("Width: %d\n", ih->width);
-	printf ("Height: %d\n", ih->height);
-	printf ("Planes: %d\n", ih->nPlanes);
-	printf ("BitsPerPixel: %d\n", ih->nBitsPerPixel);
-	printf ("Compression: %d\n", ih->compression);
-	printf ("Image size: %d\n", ih->imageSize);
-	printf ("XPixelsPerM: %d\n", ih->xPixelsPerM);
-	printf ("YPixelsPerM: %d\n", ih->yPixelsPerM);
-	printf ("ColorsUsed: %d\n", ih->nColorsUsed);
-	printf ("ColorsImportant: %d\n", ih->nColorsImportant);
-    #endif
-    return TRUE;
-}
-
-static Boln writeInfoHeader (tkimg_MFile *handle, INFOHEADER *ih) 
-{
-    if (!writeUInt   (handle, ih->size) ||
-	!writeUInt   (handle, ih->width) ||
-	!writeUInt   (handle, ih->height) ||
-	!writeUShort (handle, ih->nPlanes) ||
-	!writeUShort (handle, ih->nBitsPerPixel) ||
-	!writeUInt   (handle, ih->compression) ||
-	!writeUInt   (handle, ih->imageSize) ||
-	!writeUInt   (handle, ih->xPixelsPerM) ||
-	!writeUInt   (handle, ih->yPixelsPerM) ||
-	!writeUInt   (handle, ih->nColorsUsed) ||
-	!writeUInt   (handle, ih->nColorsImportant)) {
-	return FALSE;
-    }
-    #if defined (DEBUG_LOCAL)
-	printf ("Writing Info header:\n");
-	printf ("Size        : %d\n", ih->size);
-	printf ("Width       : %d\n", ih->width);
-	printf ("Height      : %d\n", ih->height);
-	printf ("Planes      : %d\n", ih->nPlanes);
-	printf ("BitsPerPixel: %d\n", ih->nBitsPerPixel);
-	printf ("Compression : %d\n", ih->compression);
-	printf ("Image size  : %d\n", ih->imageSize);
-	printf ("XPixelsPerM : %d\n", ih->xPixelsPerM);
-	printf ("YPixelsPerM : %d\n", ih->yPixelsPerM);
-	printf ("ColorsUsed  : %d\n", ih->nColorsUsed);
-	printf ("ColorsImport: %d\n", ih->nColorsImportant);
-    #endif
-    return TRUE;
-}
-
-static Boln readColorMap (tkimg_MFile *handle, int mapSize, ICOCOLOR *colorMap) 
-{
-    int i;
-    ICOCOLOR color;
-
-    for (i=0; i<mapSize; i++) {
-        if (!readUByte (handle, &color.blue) ||
-	    !readUByte (handle, &color.green) ||
-	    !readUByte (handle, &color.red) ||
-	    !readUByte (handle, &color.matte)) {
-	    return FALSE;
-	}
-        colorMap[i] = color;
-    }
-    return TRUE;
-}
-
-static Boln writeColorMap (tkimg_MFile *handle, int mapSize, ICOCOLOR *colorMap)
-{
-    int i;
-
-    for (i=0; i<mapSize; i++) {
-        if (!writeUByte (handle, colorMap[i].blue) ||
-	    !writeUByte (handle, colorMap[i].green) ||
-	    !writeUByte (handle, colorMap[i].red) ||
-	    !writeUByte (handle, colorMap[i].matte)) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-/*
- * Prototypes for local procedures defined in this file.
- */
-
-static int ParseFormatOpts _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-               FMTOPT *opts));
-static int CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	       int *heightPtr, ICOHEADER *icoHeaderPtr));
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	       CONST char *filename, Tcl_Obj *format,
-	       Tk_PhotoHandle imageHandle, int destX, int destY,
-	       int width, int height, int srcX, int srcY));
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-               Tk_PhotoImageBlock *blockPtr));
-
-static int ParseFormatOpts (interp, format, opts)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    FMTOPT *opts;
-{
-    static char *icoOptions[] = {
-         "-verbose", "-index"
-    };
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *indexStr, *verboseStr;
-
-    /* Initialize format options with default values. */
-    verboseStr = "0";
-    indexStr   = "0";
-
-    if (tkimg_ListObjGetElements (interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj (interp, objv[i], icoOptions,
-		    "format option", 0, &index) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult (interp, "No value for option \"",
-			Tcl_GetStringFromObj (objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    verboseStr = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-		case 1:
-		    indexStr = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-	    }
-	}
-    }
-
-    /* OPA TODO: Check for valid integer strings. */
-    opts->index  = atoi (indexStr);
-
-    c = verboseStr[0]; length = strlen (verboseStr);
-    if (!strncmp (verboseStr, "1", length) || \
-	!strncmp (verboseStr, "true", length) || \
-	!strncmp (verboseStr, "on", length)) {
-	opts->verbose = 1;
-    } else if (!strncmp (verboseStr, "0", length) || \
-	!strncmp (verboseStr, "false", length) || \
-	!strncmp (verboseStr, "off", length)) {
-	opts->verbose = 0;
-    } else {
-	Tcl_AppendResult (interp, "invalid verbose mode \"", verboseStr, 
-			  "\": should be 1 or 0, on or off, true or false",
-			  (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    return TCL_OK;
-}
-
-static int ChnMatch (interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, '\000', &handle)) {
-	return 0;
-    }
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, icoHeaderPtr)
-    tkimg_MFile *handle;
-    int *widthPtr, *heightPtr;
-    ICOHEADER *icoHeaderPtr;
-{
-    ICOHEADER icoHeader, *headerPtr;
-
-    if (!icoHeaderPtr) {
-        headerPtr = &icoHeader;
-    } else {
-	headerPtr = icoHeaderPtr;
-    }
-    if (!readIcoHeader (handle, headerPtr)) {
-	return 0;
-    }
-
-    *widthPtr  = headerPtr->entries[0].width;
-    *heightPtr = headerPtr->entries[0].height;
-
-    if (!icoHeaderPtr) {
-	ckfree ((char *) headerPtr->entries);
-    }
-    return 1;
-}
-
-static int ChnRead (interp, chan, filename, format, imageHandle,
-                    destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format,
-                       imageHandle, destX, destY,
-		       width, height, srcX, srcY);
-}
-
-static int ObjRead (interp, data, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit(data, '\000', &handle);
-
-    return CommonRead (interp, &handle, "InlineData", format, imageHandle,
-                       destX, destY, width, height, srcX, srcY);
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-#define block bl.ck
-
-static int CommonRead (interp, handle, filename, format, imageHandle,
-                       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;              /* The image file, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-			         * in image being read. */
-{
-    myblock bl;
-    int x, y;
-    int fileWidth, fileHeight;
-    int outWidth, outHeight, outY;
-    int bytesPerLine;
-    int nBytesToSkip;
-    int errorFlag = TCL_OK;
-    unsigned char *line = NULL, *expline = NULL;
-    char msgStr[1024];
-    ICOHEADER  icoHeader;
-    INFOHEADER infoHeader;
-    ICOCOLOR   colorMap[256];
-    FMTOPT opts;
-
-    if (ParseFormatOpts(interp, format, &opts) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    if (!CommonMatch (handle, &fileWidth, &fileHeight, &icoHeader)) {
-	Tcl_AppendResult(interp, "Error reading header", (char *)NULL);
-        errorFlag = TCL_ERROR;
-        goto error;
-    }
-
-    if (opts.index < 0 || opts.index >= icoHeader.nIcons) {
-        sprintf (msgStr, "Invalid icon index: %d", opts.index);
-	Tcl_AppendResult(interp, msgStr, (char *)NULL);
-        errorFlag = TCL_ERROR;
-        goto error;
-    }
-
-    /* Instead of seeking, which does not work on strings, 
-       we calculate the number of bytes from the current position 
-       till the start of the INFOHEADER and read these bytes with tkimg_Read. */
-    nBytesToSkip = icoHeader.entries[opts.index].fileOffset -6 -
-                   16 * icoHeader.nIcons;
-    if (nBytesToSkip > 0) {
-        char *dummy = ckalloc (nBytesToSkip);
-	tkimg_Read (handle, dummy, nBytesToSkip);
-        ckfree ((char *) dummy);
-    }
-
-    /* Read Info header and color map */
-    if (!readInfoHeader (handle, &infoHeader)) {
-	Tcl_AppendResult (interp, "Error reading info header", (char *)NULL);
-        errorFlag = TCL_ERROR;
-        goto error;
-    }
-    if (infoHeader.nBitsPerPixel != 24) {
-	if (!readColorMap (handle, icoHeader.entries[opts.index].nColors,
-			   colorMap)) {
-	    Tcl_AppendResult (interp, "Error reading color map", (char *)NULL);
-	    errorFlag = TCL_ERROR;
-	    goto error;
-	}
-    }
-
-    fileWidth  = infoHeader.width;
-    fileHeight = infoHeader.height / 2;
-    outWidth   = fileWidth;
-    outHeight  = fileHeight;
-    if (fileWidth != width || fileHeight != height) {
-        if (srcX != 0 || srcY != 0 || destX != 0 || destY != 0) {
-	    if ((srcX + width) > fileWidth) {
-		outWidth = fileWidth - srcX;
-	    } else {
-		outWidth = width;
-	    }
-	    if ((srcY + height) > fileHeight) {
-		outHeight = fileHeight - srcY;
-	    } else {
-		outHeight = height;
-	    }
-	}
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    if (opts.verbose) {
-        printImgInfo (&icoHeader, &infoHeader, &opts, 
-		      filename, "Reading image:");
-    }
-
-    tkimg_PhotoSetSize (interp, imageHandle, destX + outWidth, destY + outHeight);
-    tkimg_PhotoExpand  (imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    bytesPerLine = ((infoHeader.nBitsPerPixel * fileWidth + 31)/32)*4;
-
-    block.pixelSize = 4;
-    block.pitch = fileWidth * 4;
-    block.width = outWidth;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 3; 
-    block.pixelPtr = (unsigned char *) ckalloc (4 * fileWidth * fileHeight);
-    expline = block.pixelPtr;
-
-    line = (unsigned char *) ckalloc(bytesPerLine);
-    switch (infoHeader.nBitsPerPixel) {
-	case 24:
-	    for (y=0; y<fileHeight; y++) {
-                tkimg_Read(handle, (char *)line, bytesPerLine);
-		for (x = 0; x < fileWidth; x++) {
-		    expline[0] = line[x*3 + 2];
-		    expline[1] = line[x*3 + 1];
-		    expline[2] = line[x*3 + 0];
-		    expline += 4;
-		}
-            }
-            break;
-	case 8:
-	    for (y=0; y<fileHeight; y++) {
-		tkimg_Read(handle, (char *)line, bytesPerLine);
-		for (x = 0; x < fileWidth; x++) {
-		    expline[0] = colorMap[line[x]].red;
-		    expline[1] = colorMap[line[x]].green;
-		    expline[2] = colorMap[line[x]].blue;
-		    expline += 4;
-		}
-	    }
-	    break;
-	case 4:
-	    for (y=0; y<fileHeight; y++) {
-		int c;
-		tkimg_Read(handle, (char *)line, bytesPerLine);
-		for (x=0; x<fileWidth; x++) {
-		    if (x&1) {
-			c = line[x/2] & 0x0f;
-		    } else {
-			c = line[x/2] >> 4;
-		    }
-		    expline[0] = colorMap[c].red;
-		    expline[1] = colorMap[c].green;
-		    expline[2] = colorMap[c].blue;
-		    expline += 4;
-		}
-	    }
-	    break;
-	case 1:
-	    for (y=0; y<fileHeight; y++) {
-		int c;
-		tkimg_Read(handle, (char *)line, bytesPerLine);
-		for (x=0; x<fileWidth; x++) {
-		    c = (line[x/8] >> (7-(x%8))) & 1;
-		    expline[0] = colorMap[c].red;
-		    expline[1] = colorMap[c].green;
-		    expline[2] = colorMap[c].blue;
-		    expline += 4;
-		}
-	    }
-	    break;
-	default:
-	    sprintf (msgStr,"%d-bits ICO file not supported", 
-                     infoHeader.nBitsPerPixel);
-	    Tcl_AppendResult(interp, msgStr, (char *)NULL);
-	    errorFlag = TCL_ERROR;
-	    goto error;
-    }
-    
-    /* Read XAND bitmap. */
-    bytesPerLine = ((1 * fileWidth + 31)/32)*4;
-
-    expline = block.pixelPtr;
-    for (y=0; y<fileHeight; y++) {
-	int c;
-	tkimg_Read(handle, (char *)line, bytesPerLine);
-	for (x=0; x<fileWidth; x++) {
-	    c = (line[x/8] >> (7-(x%8))) & 1;
-	    expline[3] = (c? 0: 255);
-	    expline += 4;
-	}
-    }
-
-    /* Store the pointer to allocated buffer for later freeing. */
-    expline = block.pixelPtr;
-    block.pixelPtr += srcX * 4;
-
-    outY = destY + outHeight - 1;
-    for (y=fileHeight-1; y>=0; y--) {
-        if (y >= srcY && y < srcY + outHeight) {
-	    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, outY,
-		    outWidth, 1);
-	    outY--;
-        }
-        block.pixelPtr += 4 * fileWidth;
-    }
-    block.pixelPtr = expline;
-
-error:
-    if (icoHeader.entries) {
-	ckfree((char *) icoHeader.entries);
-    }
-    if (line) {
-	ckfree((char *) line);
-    }
-    if (expline) {
-	ckfree((char *) block.pixelPtr);
-    }
-    return errorFlag;
-}
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel(interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite(interp, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit(dataPtr, &handle);
-    result = CommonWrite(interp, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, handle, blockPtr)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int bytesPerLineXOR, bytesPerLineAND, nbytes, ncolors, i, x, y;
-    int redOffset, greenOffset, blueOffset, alphaOffset;
-    int foundColor;
-    UByte *imagePtr, *pixelPtr;
-    UByte buf[4];
-    ICOHEADER  icoHeader;
-    INFOHEADER infoHeader;
-    ICOCOLOR   colorMap[256];
-    ICOCOLOR   pixel;
-
-    if (blockPtr->width > 255 || blockPtr->height > 255) {
-	Tcl_AppendResult (interp, "ICO images must be less than 256 pixels.",
-		          (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    redOffset   = 0;
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset  = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[2]) {
-	alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-    ncolors = 0;
-    if (greenOffset || blueOffset) {
-	for (y = 0; ncolors <= 256 && y < blockPtr->height; y++) {
-	    pixelPtr = blockPtr->pixelPtr + y*blockPtr->pitch + blockPtr->offset[0];
-	    for (x=0; ncolors <= 256 && x<blockPtr->width; x++) {
-		pixel.red   = pixelPtr[redOffset];
-		pixel.green = pixelPtr[greenOffset];
-		pixel.blue  = pixelPtr[blueOffset];
-		if (alphaOffset && (pixelPtr[alphaOffset] == 0)) {
-		    pixel.matte = 0;
-		} else {
-		    pixel.matte = 1;
-		}
-		foundColor = 0;
-		for (i=0; i<ncolors; i++) {
-		    if (pixel.red   == colorMap[i].red && 
-                        pixel.green == colorMap[i].green &&
-                        pixel.blue  == colorMap[i].blue) {
-			foundColor = 1;
-			break;
-		    }
-		}
-		if (!foundColor) {
-		    if (ncolors < 256) {
-			colorMap[ncolors] = pixel;
-		    }
-		    ncolors++;
-		}
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	}
-	if (ncolors <= 256) {
-	    pixel.red = pixel.green = pixel.blue = pixel.matte = 0;
-            while (ncolors < 256) {
-		colorMap[ncolors++] = pixel;
-	    }
-	    nbytes = 1;
-	} else {
-	    nbytes = 3;
-	    ncolors = 0;
-	}
-    } else {
-        nbytes = 1;
-    }
-
-    bytesPerLineXOR = ((blockPtr->width * nbytes + 3) / 4) * 4;
-    bytesPerLineAND = ((blockPtr->width * 1      + 31) / 32 )* 4;
-
-    icoHeader.nIcons = 1;
-    if (!(icoHeader.entries = (ICOENTRY *) ckalloc (sizeof (ICOENTRY)))) {
-	return TCL_ERROR;
-    }
-    icoHeader.entries[0].width       = blockPtr->width;
-    icoHeader.entries[0].height      = blockPtr->height;
-    icoHeader.entries[0].nColors     = (ncolors > 0? ncolors: 0);
-    icoHeader.entries[0].reserved    = 0;
-    icoHeader.entries[0].nPlanes     = 1;
-    icoHeader.entries[0].bitCount    = (ncolors > 0? 8: 24);
-    icoHeader.entries[0].sizeInBytes = sizeof (INFOHEADER) + 
-				       ncolors * sizeof (ICOCOLOR) +
-                                       bytesPerLineXOR * blockPtr->height +
-                                       bytesPerLineAND * blockPtr->height;
-    icoHeader.entries[0].fileOffset  = 6 + icoHeader.nIcons * 16;
-
-    if (!writeIcoHeader (handle, &icoHeader)) {
-	return TCL_ERROR;
-    }
-
-    infoHeader.size = sizeof (INFOHEADER);
-    infoHeader.width = blockPtr->width;
-    infoHeader.height = blockPtr->height * 2;
-    infoHeader.nPlanes = 1;
-    infoHeader.nBitsPerPixel = (ncolors > 0? 8: 24);
-    infoHeader.compression = 0;
-    infoHeader.imageSize = 0;
-    infoHeader.xPixelsPerM = 0;
-    infoHeader.yPixelsPerM = 0;
-    infoHeader.nColorsUsed = 0;
-    infoHeader.nColorsImportant = 0;
-
-    if (!writeInfoHeader (handle, &infoHeader)) {
-	return TCL_ERROR;
-    }
-
-    if (ncolors > 0) {
-	if (!writeColorMap (handle, ncolors, colorMap)) {
-	    return TCL_ERROR;
-        }
-    }
-
-    bytesPerLineXOR -= blockPtr->width * nbytes;
-
-    imagePtr = blockPtr->pixelPtr + blockPtr->offset[0] +
-               blockPtr->height * blockPtr->pitch;
-    for (y = 0; y < blockPtr->height; y++) {
-	pixelPtr = imagePtr -= blockPtr->pitch;
-	for (x=0; x<blockPtr->width; x++) {
-	    if (ncolors) {
-		for (i=0; i<ncolors; i++) {
-                    if (pixelPtr[redOffset]   == colorMap[i].red &&
-                        pixelPtr[greenOffset] == colorMap[i].green &&
-                        pixelPtr[blueOffset]  == colorMap[i].blue) {
-			buf[0] = i;
-		    }
-		}
-	    } else {
-		buf[0] = pixelPtr[blueOffset];
-		buf[1] = pixelPtr[greenOffset];
-		buf[2] = pixelPtr[redOffset];
-	    }
-	    tkimg_Write(handle, (char *) buf, nbytes);
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (bytesPerLineXOR) {
-	    tkimg_Write(handle, "\0\0\0", bytesPerLineXOR);
-	}
-    }
-
-    bytesPerLineAND -= blockPtr->width / 8;
-
-    imagePtr = blockPtr->pixelPtr + blockPtr->offset[0] +
-               blockPtr->height * blockPtr->pitch;
-    for (y = 0; y < blockPtr->height; y++) {
-	int c;
-	pixelPtr = imagePtr -= blockPtr->pitch;
-	for (x=0; x<blockPtr->width; x++) {
-	    if (x % 8 == 0) {
-		buf[0] = 0;
-	    }
-	    if (alphaOffset) {
-		c = pixelPtr[alphaOffset];
-		if (c == 0) {
-		    buf[0] |= 1<<(7-x%8);
-		}
-	    }
-	    if (x % 8 == 7) {
-		tkimg_Write(handle, (char *) buf, 1);
-	    }
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (bytesPerLineAND) {
-	    tkimg_Write(handle, "\0\0\0", bytesPerLineAND);
-	}
-    }
-    return TCL_OK;
-}
diff --git a/tkimg1.3/ico/pkgIndex.tcl.in b/tkimg1.3/ico/pkgIndex.tcl.in
deleted file mode 100644
index 1a5c70b..0000000
--- a/tkimg1.3/ico/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgico_LIB_FILE@]]
diff --git a/tkimg1.3/ico/readme b/tkimg1.3/ico/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/ico/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/ico/tests/all.tcl b/tkimg1.3/ico/tests/all.tcl
deleted file mode 100644
index a901b37..0000000
--- a/tkimg1.3/ico/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/ico/tests/ico.test b/tkimg1.3/ico/tests/ico.test
deleted file mode 100644
index 9294e35..0000000
--- a/tkimg1.3/ico/tests/ico.test
+++ /dev/null
@@ -1,84 +0,0 @@
-# This file is a Tcl script to test out ICO reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::ico [package require img::ico]"
-
-set icodata \
-{AAABAAEAICAAAAEACACoCAAAFgAAACgAAAAgAAAAQAAAAAEACAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAADZ2dkAAAD/AQAAAAGAgAAB//8AAQD//wEAAIABAIAAAQAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////
-/wAAAAAA/wcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwf/AAAAAAD/BwcHBwcHBwcHBwcHBwcH
-BwcHBwcHBwcHB/8AAAAAAP8HBwcHB/8HBwcHBwcHBwcHBwcHBwcHBwcH/wAAAAAA/wQEBAQE
-/wQEBAQEBAQGBgYGBgYGBgQEBAT/AAAAAAD/BAQEBAT/BAQEBAQEBAYGBgYGBgYGBAQEBP8A
-AAAAAP8EBAQEBAH/BAQEBAQEBgYGBgYGBgYEBAQE/wAAAAAA/wQEBAQEAf8BAQQEBAQGBgYG
-BgYGBgQEBAT/AAAAAAD/BAQEBAQB/wEBBAQEBAYGBgYGBgYGBAQEBP8AAAAAAP8EBAQEBAEB
-/wEBBAQEBAYGBgYGBgQEBAQE/wAAAAAA/wQEBAQEBAH//wEBBAQEBAYGBgYEBAQEBAT/AAAA
-AAD/BAQEBAQEAQH//wEEBAQEBAYGBAQEBAQEBP8AAAAAAP8EBAQEBAQBAQH/AQEEBAQEBAQE
-BAQEBAQE/wAAAAAA/wQEBAQEBAQBAQH/AQQEBAQEBAQEBAQEBAT/AAAAAAD/BAQEBQUEBAQB
-Af8BAQQEBAQEBAQEBAQEBP8AAAAAAP8EBAQFBQQEBAEB//8BBAQEBAQEBAQEBAQE/wAAAAAA
-/wQEBAQEBAQEAQEB/wEBBAQEBAQEBAQEBAT/AAAAAAD/BAQEBAQEBAQEAQH//wEBBAQEBAQE
-BAQEBP8AAAAAAP//////////////AQH/AQH//////////////wAAAAAAAAAA//8AAAAAAAAB
-Af8BAQEAAAAAAP//AAAAAAAAAAAAAAAAAP//AAAAAAEBAf8BAQEAAP//AAAAAAAAAAAAAAAA
-AAAAAAD//wAAAAEBAf8BAQH/AAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAQEBAf8BAQEAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAP//AAEBAf//AQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/
-AwEBAf8BAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAf8BAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAABAf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAP/////////////////////AAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AA
-AAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAHwAAAB8AAAAfAAAAH+fgfP/54DP//nAP/
-/+QD///5Af///gH////B////8f//////}
-
-
-test ico-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory img.ico]
-    i data -format ico
-} $icodata
-test ico-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $icodata
-    set data [i data -format ico]
-} $icodata
-test ico-1.3 {} {
-    i blank
-    i put $icodata
-    set data [i data -format ico]
-} $icodata
-test ico-1.4 {} {
-    i blank
-    i put $icodata -format ico
-    set data [i data -format ico]
-} $icodata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test ico-2.0 {Binary I/O with ICO images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory img.ico] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/ico/tests/img.ico b/tkimg1.3/ico/tests/img.ico
deleted file mode 100644
index 9a982c6..0000000
Binary files a/tkimg1.3/ico/tests/img.ico and /dev/null differ
diff --git a/tkimg1.3/init.c b/tkimg1.3/init.c
deleted file mode 100644
index 25d6933..0000000
--- a/tkimg1.3/init.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * init.c --
- *
- *  Generic photo image type initialization, Tcl/Tk package
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * $Id: init.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- *
- */
-
-#include "tk.h"
-#include "tkimg.h"
-
-#ifndef MORE_INITIALIZATION
-#define MORE_INITIALIZATION /* Nothing */
-#endif
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_%PACKAGE%
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_%PACKAGE_UP%_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- * Functions exported for package management.
- */
-
-
-EXTERN int @CPACKAGE at _Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int @CPACKAGE at _SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-/*
- * Declarations of internal functions.
- */
-
-static int ChnMatch _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan,
-	CONST char *fileName, Tcl_Obj *format, int *widthPtr,
-	int *heightPtr));
-
-static int ObjMatch _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
-	Tcl_Obj *format, int *widthPtr, int *heightPtr));
-
-static int ChnRead _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan,
-	CONST char *fileName, Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-	int destX, int destY, int width, int height, int srcX, int srcY));
-
-static int ObjRead _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
-	Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-	int destX, int destY, int width, int height, int srcX, int srcY));
-
-static int ChnWrite _ANSI_ARGS_((Tcl_Interp *interp, CONST char *filename,
-	Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
-
-static int StringWrite _ANSI_ARGS_((Tcl_Interp *interp,
-	Tcl_DString *data, Tcl_Obj *format,
-	Tk_PhotoImageBlock *blockPtr));
-
-static Tk_PhotoImageFormat format = {
-    %PHIMGTYPE%,					/* name */
-    (Tk_ImageFileMatchProc *)   ChnMatch,	/* fileMatchProc */
-    (Tk_ImageStringMatchProc *) ObjMatch,	/* stringMatchProc */
-    (Tk_ImageFileReadProc *)    ChnRead,	/* fileReadProc */
-    (Tk_ImageStringReadProc *)  ObjRead,	/* stringReadProc */
-    (Tk_ImageFileWriteProc *)   ChnWrite,	/* fileWriteProc */
-    (Tk_ImageStringWriteProc *) StringWrite	/* stringWriteProc */
-};
-
-#ifdef SECOND_FORMAT
-/*
- * Declare procedures of the second format as needed. The macro we
- * check for allow us to share code between first and second
- * format. Current user of this feature: The PS/PDF combo handler
- */
-
-#ifndef SECOND_CHNMATCH
-#define SECOND_CHNMATCH ChnMatchBeta
-static int ChnMatchBeta _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan,
-	CONST char *fileName, Tcl_Obj *format, int *widthPtr,
-	int *heightPtr));
-#endif
-#ifndef SECOND_OBJMATCH
-#define SECOND_OBJMATCH ObjMatchBeta
-static int ObjMatchBeta _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
-	Tcl_Obj *format, int *widthPtr, int *heightPtr));
-#endif
-#ifndef SECOND_CHNREAD
-#define SECOND_CHNREAD ChnReadBeta
-static int ChnReadBeta _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan,
-	CONST char *fileName, Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-	int destX, int destY, int width, int height, int srcX, int srcY));
-#endif
-#ifndef SECOND_OBJREAD
-#define SECOND_OBJREAD ChnObjReadBeta
-static int ObjReadBeta _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
-	Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-	int destX, int destY, int width, int height, int srcX, int srcY));
-#endif
-#ifndef SECOND_CHNWRITE
-#define SECOND_CHNWRITE ChnWriteBeta
-static int ChnWriteBeta _ANSI_ARGS_((Tcl_Interp *interp, CONST char *filename,
-	Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
-#endif
-#ifndef SECOND_STRWRITE
-#define SECOND_STRWRITE StringWriteBeta
-static int StringWriteBeta _ANSI_ARGS_((Tcl_Interp *interp,
-	Tcl_DString *data, Tcl_Obj *format,
-	Tk_PhotoImageBlock *blockPtr));
-#endif
-
-static Tk_PhotoImageFormat format_beta = {
-    %PHIMGTYPE_BETA%,					/* name */
-    (Tk_ImageFileMatchProc *)   SECOND_CHNMATCH,	/* fileMatchProc */
-    (Tk_ImageStringMatchProc *) SECOND_OBJMATCH,	/* stringMatchProc */
-    (Tk_ImageFileReadProc *)    SECOND_CHNREAD,		/* fileReadProc */
-    (Tk_ImageStringReadProc *)  SECOND_OBJREAD,		/* stringReadProc */
-    (Tk_ImageFileWriteProc *)   SECOND_CHNWRITE,	/* fileWriteProc */
-    (Tk_ImageStringWriteProc *) SECOND_STRWRITE		/* stringWriteProc */
-};
-
-#endif /* SECOND_FORMAT */
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * @CPACKAGE at _Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter, loads package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
- at CPACKAGE@_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-#ifdef USE_TK_STUBS
-    if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-#ifdef USE_TKIMG_STUBS
-    if (Tkimg_InitStubs(interp, "1.3", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-
-    MORE_INITIALIZATION;
-
-    /*
-     * Register the new photo image type.
-     */
-
-    Tk_CreatePhotoImageFormat (&format);
-#ifdef SECOND_FORMAT
-    Tk_CreatePhotoImageFormat (&format_beta);
-#endif /* SECOND_FORMAT */
-
-    /*
-     * At last provide the package ...
-     */
-
-    if (Tcl_PkgProvide(interp, PACKAGE_NAME, VERSION) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * @CPACKAGE at _SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
- at CPACKAGE@_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return @CPACKAGE at _Init (interp);
-}
-
diff --git a/tkimg1.3/jpeg/ChangeLog b/tkimg1.3/jpeg/ChangeLog
deleted file mode 100644
index 8ab7d6a..0000000
--- a/tkimg1.3/jpeg/ChangeLog
+++ /dev/null
@@ -1,20 +0,0 @@
-2002-11-20  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* jpeg.c: Removed superfluous function declarations (already done
-	  in init.c).
-
-	* Makefile.in:
-	* configure.in: Path to build directory of jpegtcl is required too
-	  as include directory, to find 'libjpeg/jconfig.h'.
-
-	* Makefile.in:
-	* configure.in: New configuration variable PHIMTYPE, contains name
-	  of image type (in contrast to library name and package
-	  name). Inserted in 'init.c'. The configure variable TK_XINCLUDES
-	  has to placed in variable, to avoid problem on platforms placing
-	  a shell comment into it. More in the Makefile.
-
-2002-11-19  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/jpeg: JPEG photo image type.
diff --git a/tkimg1.3/jpeg/Makefile.in b/tkimg1.3/jpeg/Makefile.in
deleted file mode 100644
index f7bf6e0..0000000
--- a/tkimg1.3/jpeg/Makefile.in
+++ /dev/null
@@ -1,554 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgjpeg TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.2 2007/01/03 22:12:55 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgjpeg_SOURCES	=	\
-		jpeg.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgjpeg_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgjpeg_OBJECTS	= $(tkimgjpeg_SOURCES:.c=. at OBJEXT@)
-tkimgjpeg_LIB_FILE	= @tkimgjpeg_LIB_FILE@
-
-## tkimgjpegstub_OBJECTS	= tkimgjpegStubLib.$(OBJEXT)
-## tkimgjpegstub_LIB_FILE= @tkimgjpegstub_LIB_FILE@
-
-jpegtcl_SRC_PATH	= @jpegtcl_SRC_PATH@
-jpegtcl_BUILD_PATH	= @jpegtcl_BUILD_PATH@
-jpegtcl_VERSION		= @jpegtcl_VERSION@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	=				\
-		-I$(tkimg_SRC_PATH)		\
-		-I$(jpegtcl_SRC_PATH)		\
-		-I$(jpegtcl_BUILD_PATH)/libjpeg	\
- 		-I$(jpegtcl_BUILD_PATH)/libjpeg/libjpeg	\
-		-I. -I$(srcdir)			\
-		@TCL_INCLUDES@			\
-		@TK_INCLUDES@			\
-		$(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"	\
-		-DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\"	\
-
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgjpeg_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgjpeg_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgjpeg.$(OBJEXT): $(srcdir)/generic/tkimgjpeg.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgjpeg.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgjpeg/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgjpegConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgjpeg.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgjpeg_DECLS = \
-	$(srcdir)/tkimgjpeg.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgjpeg_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgjpeg_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/jpeg/README b/tkimg1.3/jpeg/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/jpeg/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/jpeg/aclocal.m4 b/tkimg1.3/jpeg/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/jpeg/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/jpeg/configure b/tkimg1.3/jpeg/configure
deleted file mode 100755
index 8bd4dd1..0000000
--- a/tkimg1.3/jpeg/configure
+++ /dev/null
@@ -1,6589 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgjpeg', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-jpegtcl              directory containing jpegtcl configuration (jpegtclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./jpeg.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgjpeg
-DPACKAGE="img::jpeg"
-PHIMGTYPE="jpeg"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGJPEG_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgjpegstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGJPEG_VERSION "${TKIMGJPEG_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1456: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1538: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1612: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1687: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1759: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1845: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1850 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1878: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1883 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1907: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1922 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1939 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1956 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1996: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2026: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2077: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2120 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2156: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2184: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2223: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2227 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2259: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2317: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2351: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2384: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2410: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2447: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2454 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2469 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2504 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2557: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2563 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2582 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2613: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2648: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2654 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2683: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2689 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2722: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2724 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2771: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2776 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2808: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2813 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2845: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2850 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2882: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2887 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2919: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2924 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2966 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:3001: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3006 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3048 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3074: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3079 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3111: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3116 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3153: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3158 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3193: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3198 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3243: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3248 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3312: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3381: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-    #
-    # Ok, lets find the jpegtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-jpegtcl
-    #
-
-    if test x"${no_jpegtcl}" = x ; then
-	# we reset no_jpegtcl in case something fails here
-	no_jpegtcl=true
-	# Check whether --with-jpegtcl or --without-jpegtcl was given.
-if test "${with_jpegtcl+set}" = set; then
-  withval="$with_jpegtcl"
-  with_jpegtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for jpegtcl configuration""... $ac_c" 1>&6
-echo "configure:3434: checking for jpegtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_jpegtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-jpegtcl was specified.
-	    if test x"${with_jpegtclconfig}" != x ; then
-		if test -f "${with_jpegtclconfig}/jpegtclConfig.sh" ; then
-		    ac_cv_c_jpegtclconfig=`(cd ${with_jpegtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_jpegtclconfig} directory doesn't contain jpegtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private jpegtcl installation
-	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-		for i in \
-			../jpegtcl \
-			`ls -dr ../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			../../jpegtcl \
-			`ls -dr ../../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../jpegtcl \
-			`ls -dr ../../../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../jpegtcl \
-			`ls -dr ${srcdir}/../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-	    jpegtcl_BIN_DIR="# no jpegtcl configs found"
-	    echo "configure: warning: "Cannot find jpegtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_jpegtcl=
-	    jpegtcl_BIN_DIR=${ac_cv_c_jpegtclconfig}
-	    echo "$ac_t""found $jpegtcl_BIN_DIR/jpegtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3503: checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh" >&5
-
-    if test -f "${jpegtcl_BIN_DIR}/jpegtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${jpegtcl_BIN_DIR}/jpegtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the jpegtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable jpegtcl_LIB_SPEC will be set to the value
-    # of jpegtcl_BUILD_LIB_SPEC. An extension should make use of jpegtcl_LIB_SPEC
-    # instead of jpegtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${jpegtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for jpegtcl" 1>&2
-        jpegtcl_LIB_SPEC=${jpegtcl_BUILD_LIB_SPEC}
-        jpegtcl_STUB_LIB_SPEC=${jpegtcl_BUILD_STUB_LIB_SPEC}
-        jpegtcl_STUB_LIB_PATH=${jpegtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'jpegtcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $jpegtcl_SRC_DIR in
-/*)	jpegtcl_SRC_PATH=$jpegtcl_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
- 	jpegtcl_SRC_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	jpegtcl_SRC_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`/$jpegtcl_SRC_DIR"
-esac
-
-jpegtcl_BUILD_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    jpegtcl_SRC_PATH="\"`$CYGPATH $jpegtcl_SRC_PATH`\""
-    jpegtcl_BUILD_PATH="\"`$CYGPATH $jpegtcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
- 	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3598: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3661: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgjpeg in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgjpeg 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3787: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3795 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3835: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3843 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3882: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3890 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3927: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3935 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3969: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3977 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4028: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4033 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4084: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4089 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:4142: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4180: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4226: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4240: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4261: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4290: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4298 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4353: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4510: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4518 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4611: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4619 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4695: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4703 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4834: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4839 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4901: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4906 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4966: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4971 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5003: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5005 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5340: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5343 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5396: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5398 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5434: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5436 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5472: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5474 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5616: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5674: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5736 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5810 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5907 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5932: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5935 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5976: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5996: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6004 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_JPEGTCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6169: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6201: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGJPEG_VERSION@%$TKIMGJPEG_VERSION%g
-s%@tkimgjpeg_LIB_FILE@%$tkimgjpeg_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@jpegtcl_VERSION@%$jpegtcl_VERSION%g
-s%@jpegtcl_SRC_DIR@%$jpegtcl_SRC_DIR%g
-s%@jpegtcl_LIB_FILE@%$jpegtcl_LIB_FILE%g
-s%@jpegtcl_LIB_SPEC@%$jpegtcl_LIB_SPEC%g
-s%@jpegtcl_STUB_LIB_FILE@%$jpegtcl_STUB_LIB_FILE%g
-s%@jpegtcl_STUB_LIB_SPEC@%$jpegtcl_STUB_LIB_SPEC%g
-s%@jpegtcl_STUB_LIB_PATH@%$jpegtcl_STUB_LIB_PATH%g
-s%@jpegtcl_SRC_PATH@%$jpegtcl_SRC_PATH%g
-s%@jpegtcl_BUILD_PATH@%$jpegtcl_BUILD_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/jpeg/configure.in b/tkimg1.3/jpeg/configure.in
deleted file mode 100644
index 901498c..0000000
--- a/tkimg1.3/jpeg/configure.in
+++ /dev/null
@@ -1,234 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgjpeg', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./jpeg.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgjpeg
-DPACKAGE="img::jpeg"
-PHIMGTYPE="jpeg"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGJPEG_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGJPEG_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgjpeg_LIB_FILE)
-#AC_SUBST(tkimgjpegstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGJPEG_VERSION, "${TKIMGJPEG_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-
-TEA_PATH_CONFIG(jpegtcl)
-TEA_LOAD_CONFIG(jpegtcl)
-AC_SUBST(jpegtcl_VERSION)
-
-IMG_SRCPATH(jpegtcl)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgjpeg in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgjpeg)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-AC_DEFINE(USE_JPEGTCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/jpeg/jpeg.c b/tkimg1.3/jpeg/jpeg.c
deleted file mode 100644
index 226a80e..0000000
--- a/tkimg1.3/jpeg/jpeg.c
+++ /dev/null
@@ -1,1185 +0,0 @@
-/*
- * jpeg.c --
- *
- *  JPEG photo image type, Tcl/Tk package
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * This Tk image format handler reads and writes JPEG files in the standard
- * JFIF file format.  ("JPEG" should be the format name.)  It can also read
- * and write strings containing base64-encoded JPEG data.
- *
- * Several options can be provided in the format string, for example:
- *
- *	imageObject read input.jpg -shrink -format "jpeg -grayscale"
- *	imageObject write output.jpg -format "jpeg -quality 50 -progressive"
- *
- * The supported options for reading are:
- *	-fast:        Fast, low-quality processing
- *	-grayscale:   Force incoming image to grayscale
- * The supported options for writing are:
- *	-quality N:   Compression quality (0..100; 5-95 is useful range)
- *	              Default value: 75
- *	-smooth N:    Perform smoothing (10-30 is enough for most GIF's)
- *		      Default value: 0
- *	-grayscale:   Create monochrome JPEG file
- *	-optimize:    Optimize Huffman table
- *	-progressive: Create progressive JPEG file
- *
- *
- * Copyright (c) 1996-1997 Thomas G. Lane.
- * This file is based on tkImgPPM.c from the Tk 4.2 distribution.
- * That file is
- *	Copyright (c) 1994 The Australian National University.
- *	Copyright (c) 1994-1996 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * You will need a copy of the IJG JPEG library, version 5 or later,
- * to use this file.  If you didn't receive it with this package, see
- *	ftp://ftp.uu.net/graphics/jpeg/
- *
- * Author: Tom Lane (tgl at sss.pgh.pa.us)
- *
- * Modified for dynamical loading, reading from channels and Tcl_Obj's by:
- *	Jan Nijtmans (j.nijtmans at chello.nl)
- *
- * $Id: jpeg.c,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include <stdio.h>
-
-#include <tcl.h>
-#include <jpegtcl.h>
-
-static int SetupJPegLibrary _ANSI_ARGS_ ((Tcl_Interp *interp));
-
-#define MORE_INITIALIZATION \
-    if (SetupJPegLibrary (interp) != TCL_OK) { return TCL_ERROR; }
-
-#include "init.c"
-
-/* system includes */
-#include <stdlib.h>
-#include <string.h>
-#include <setjmp.h>
-
-/*
- * The format record for the JPEG file format:
- */
-
-
-/*
- * Declarations for libjpeg source and destination managers to handle
- * reading and writing base64-encoded strings and Tcl_Channel's.
- */
-
-#define STRING_BUF_SIZE  4096	/* choose any convenient size */
-
-typedef struct source_mgr {	/* Source manager for reading from string */
-  struct jpeg_source_mgr pub;	/* public fields */
-
-  tkimg_MFile handle;			/* base64 stream */
-  JOCTET buffer[STRING_BUF_SIZE]; /* buffer for a chunk of decoded data */
-} *src_ptr;
-
-typedef struct destination_mgr { /* Manager for string output */
-  struct jpeg_destination_mgr pub; /* public fields */
-
-  tkimg_MFile handle;			/* base64 stream */
-  JOCTET buffer[STRING_BUF_SIZE]; /* buffer for a chunk of decoded data */
-} *dest_ptr;
-
-/*
- * Other declarations
- */
-
-struct my_error_mgr {		/* Extended libjpeg error manager */
-  struct jpeg_error_mgr pub;	/* public fields */
-  jmp_buf setjmp_buffer;	/* for return to caller from error exit */
-};
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int	CommonMatch _ANSI_ARGS_((tkimg_MFile *handle,
-		    int *widthPtr, int *heightPtr));
-
-static int	CommonRead _ANSI_ARGS_((Tcl_Interp *interp,
-		    j_decompress_ptr cinfo, Tcl_Obj *format,
-		    Tk_PhotoHandle imageHandle, int destX, int destY,
-		    int width, int height, int srcX, int srcY));
-
-static int	CommonWrite _ANSI_ARGS_((Tcl_Interp *interp,
-		    j_compress_ptr cinfo, Tcl_Obj *format,
-		    Tk_PhotoImageBlock *blockPtr));
-
-static void	my_jpeg_obj_src _ANSI_ARGS_((j_decompress_ptr, Tcl_Obj *));
-static void	my_jpeg_channel_src _ANSI_ARGS_((j_decompress_ptr, Tcl_Channel));
-static boolean	fill_input_buffer _ANSI_ARGS_((j_decompress_ptr));
-static void	skip_input_data _ANSI_ARGS_((j_decompress_ptr, long));
-static void	dummy_source _ANSI_ARGS_((j_decompress_ptr));
-static void	my_jpeg_string_dest _ANSI_ARGS_((j_compress_ptr, Tcl_DString*));
-static void	my_jpeg_channel_dest _ANSI_ARGS_((j_compress_ptr, Tcl_Channel));
-static void	my_init_destination _ANSI_ARGS_((j_compress_ptr));
-static boolean	my_empty_output_buffer _ANSI_ARGS_((j_compress_ptr));
-static void	my_term_destination _ANSI_ARGS_((j_compress_ptr));
-static void	my_error_exit _ANSI_ARGS_((j_common_ptr cinfo));
-static void	my_output_message _ANSI_ARGS_((j_common_ptr cinfo));
-static void	append_jpeg_message _ANSI_ARGS_((Tcl_Interp *interp,
-		    j_common_ptr cinfo));
-
-
-
-static int
-SetupJPegLibrary (interp)
-    Tcl_Interp *interp;
-{
-    struct jpeg_compress_struct *cinfo; /* libjpeg's parameter structure */
-    struct my_error_mgr jerror;	/* for controlling libjpeg error handling */
-    int i;
-
-    if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
-        return TCL_ERROR;
-    }
-
-    /* The followin code tries to determine if the JPEG library is
-       valid at all. The library might be configured differently,
-       which will produce core dumps. Also it might be that
-       fields appear in different places in jpeg_compress_struct
-       or jpeg_decompress_struct. This will make the library totally
-       unusable. In stead of a core-dump, we better have a proper
-       error message */
-
-    /* overallocat size, so we don't get a core-dump if the library
-       thinks that the structure is much larger */
-
-    cinfo = (struct jpeg_compress_struct *) ckalloc(8*sizeof(struct jpeg_compress_struct));
-    cinfo->err = jpeg_std_error(&jerror.pub);
-    jerror.pub.error_exit = my_error_exit;
-    jerror.pub.output_message = my_output_message;
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerror.setjmp_buffer)) {
-      /* If we get here, the JPEG library is invalid. */
-      jpeg_destroy_compress(cinfo);
-      ckfree((char *)cinfo);
-
-      if (interp) {
-	Tcl_AppendResult(interp, "couldn't use \"", "jpegtcl",
-		"\": please upgrade to at least version 6a", (char *) NULL);
-      }
-      return TCL_ERROR;
-    }
-
-    /* Now we can initialize libjpeg. */
-    ((char *) cinfo)[sizeof(struct jpeg_compress_struct)] = 53;
-    jpeg_create_compress(cinfo);
-    if (((char *) cinfo)[sizeof(struct jpeg_compress_struct)] != 53) {
-	/* Oops. The library changed this value, which is outside the
-	 * structure. Definitely, the library is invalid!!!! */
-	ERREXIT(cinfo, JMSG_NOMESSAGE);
-    }
-
-    /* Set up JPEG compression parameters. */
-    cinfo->image_width = 16;
-    cinfo->image_height = 16;
-    cinfo->input_components = 3;
-    cinfo->in_color_space = JCS_RGB;
-    cinfo->data_precision = -1;
-    cinfo->optimize_coding = TRUE;
-    cinfo->dct_method = -1;
-    cinfo->X_density = 0;
-    cinfo->Y_density = 0;
-    jpeg_set_defaults(cinfo);
-
-    if ((cinfo->data_precision != BITS_IN_JSAMPLE) ||
-	    (cinfo->optimize_coding != FALSE) ||
-	    (cinfo->dct_method != JDCT_DEFAULT) ||
-	    (cinfo->X_density != 1) ||
-	    (cinfo->Y_density != 1)) {
-	ERREXIT(cinfo, JMSG_NOMESSAGE);
-    }
-    for (i = 0; i < NUM_ARITH_TBLS; i++) {
-	if ((cinfo->arith_dc_L[i] != 0) ||
-		(cinfo->arith_dc_U[i] != 1) ||
-		(cinfo->arith_ac_K[i] != 5)) {
-	    ERREXIT(cinfo, JMSG_NOMESSAGE);
-	}
-    }
-    jpeg_destroy_compress(cinfo);
-    ckfree((char *) cinfo);
-    return TCL_OK;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a channel contains image data in JPEG format.
- *
- * Results:
- *	The return value is >0 if the first characters in channel "chan"
- *	look like JPEG data, and 0 otherwise.  For a valid file, the
- *	image dimensions are determined.
- *
- * Side effects:
- *	The access position in f may change.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * JPEG file. */
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-    return CommonMatch(&handle, widthPtr, heightPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a string contains image data in JPEG format.
- *
- * Results:
- *	The return value is >0 if the first characters in the string look
- *	like JPEG data, and 0 otherwise.  For a valid image, the image
- *	dimensions are determined.
- *
- * Side effects:
- *  the size of the image is placed in widthPtr and heightPtr.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;		/* the object containing the image data */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the string is a valid
-				 * JPEG image. */
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    tkimg_ReadInit(data, '\377', &handle);
-    return CommonMatch(&handle, widthPtr, heightPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a string contains image data in JPEG format.
- *
- * Results:
- *	The return value is >0 if the first characters in the string look
- *	like JPEG data, and 0 otherwise.  For a valid image, the image
- *	dimensions are determined.
- *
- * Side effects:
- *  the size of the image is placed in widthPtr and heightPtr.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-CommonMatch(handle, widthPtr, heightPtr)
-    tkimg_MFile *handle;		/* the "file" handle */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the string is a valid
-				 * JPEG image. */
-{
-    char buf[256];
-    int i;
-
-    i = tkimg_Read(handle, buf, 3);
-    if ((i != 3)||strncmp(buf,"\377\330\377", 3)) {
-	return 0;
-    }
-
-    buf[0] = buf[2];
-    /* at top of loop: have just read first FF of a marker into buf[0] */
-    for (;;) {
-	/* get marker type byte, skipping any padding FFs */
-	while (buf[0] == (char) 0xff) {
-	    if (tkimg_Read(handle, buf,1) != 1) {
-		return 0;
-	    }
-	}
-	/* look for SOF0, SOF1, or SOF2, which are the only JPEG variants
-	 * currently accepted by libjpeg.
-	 */
-	if (buf[0] == (char) 0xc0 || buf[0] == (char) 0xc1
-		|| buf[0] == (char) 0xc2)
-	    break;
-	/* nope, skip the marker parameters */
-	if (tkimg_Read(handle, buf, 2) != 2) {
-	    return 0;
-	}
-	i = ((buf[0] & 0x0ff)<<8) + (buf[1] & 0x0ff) - 1;
-	while (i>256) {
-	    tkimg_Read(handle, buf, 256);
-	    i -= 256;
-	}
-	if ((i<1) || (tkimg_Read(handle, buf, i)) != i) {
-	    return 0;
-	}
-	buf[0] = buf[i-1];
-	/* skip any inter-marker junk (there shouldn't be any, really) */
-	while (buf[0] != (char) 0xff) {
-	    if (tkimg_Read(handle, buf,1) != 1) {
-		return 0;
-	    }
-	}
-    }
-    /* Found the SOFn marker, get image dimensions */
-    if (tkimg_Read(handle, buf, 7) != 7) {
-	return 0;
-    }
-    *heightPtr = ((buf[3] & 0x0ff)<<8) + (buf[4] & 0x0ff);
-    *widthPtr = ((buf[5] & 0x0ff)<<8) + (buf[6] & 0x0ff);
-
-    return 1;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnRead --
- *
- *	This procedure is called by the photo image type to read
- *	JPEG format data from a channel, and give it to
- *	the photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	New data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    struct jpeg_decompress_struct cinfo; /* libjpeg's parameter structure */
-    struct my_error_mgr jerror;	/* for controlling libjpeg error handling */
-    int result;
-
-    /* Initialize JPEG error handler */
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.err = jpeg_std_error(&jerror.pub);
-    jerror.pub.error_exit = my_error_exit;
-    jerror.pub.output_message = my_output_message;
-
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerror.setjmp_buffer)) {
-      /* If we get here, the JPEG code has signaled an error. */
-      Tcl_AppendResult(interp, "couldn't read JPEG string: ", (char *) NULL);
-      append_jpeg_message(interp, (j_common_ptr) &cinfo);
-      jpeg_destroy_decompress(&cinfo);
-      return TCL_ERROR;
-    }
-
-    /* Now we can initialize libjpeg. */
-    jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION,
-			(size_t) sizeof(struct jpeg_decompress_struct));
-    my_jpeg_channel_src(&cinfo, chan);
-
-    /* Share code with ObjRead. */
-    result = CommonRead(interp, &cinfo, format, imageHandle,
-			    destX, destY, width, height, srcX, srcY);
-
-    /* Reclaim libjpeg's internal resources. */
-    jpeg_destroy_decompress(&cinfo);
-
-    return result;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjRead --
- *
- *	This procedure is called by the photo image type to read
- *	JPEG format data from a base64 encoded string, and give it to
- *	the photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	New data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjRead(interp, data, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Obj *data;		/* Object containing the image data. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    struct jpeg_decompress_struct cinfo; /* libjpeg's parameter structure */
-    struct my_error_mgr jerror;	/* for controlling libjpeg error handling */
-    int result;
-
-    /* Initialize JPEG error handler */
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.err = jpeg_std_error(&jerror.pub);
-    jerror.pub.error_exit = my_error_exit;
-    jerror.pub.output_message = my_output_message;
-
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerror.setjmp_buffer)) {
-      /* If we get here, the JPEG code has signaled an error. */
-      Tcl_AppendResult(interp, "couldn't read JPEG string: ", (char *) NULL);
-      append_jpeg_message(interp, (j_common_ptr) &cinfo);
-      jpeg_destroy_decompress(&cinfo);
-      return TCL_ERROR;
-    }
-
-    /* Now we can initialize libjpeg. */
-    jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION,
-			(size_t) sizeof(struct jpeg_decompress_struct));
-    my_jpeg_obj_src(&cinfo, data);
-
-    /* Share code with ChnRead. */
-    result = CommonRead(interp, &cinfo, format, imageHandle,
-			    destX, destY, width, height, srcX, srcY);
-
-    /* Reclaim libjpeg's internal resources. */
-    jpeg_destroy_decompress(&cinfo);
-
-    return result;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonRead --
- *
- *	The common guts of ChnRead and ObjRead.
- *	The decompress struct has already been set up and the
- *	appropriate data source manager initialized.
- *	The caller should do jpeg_destroy_decompress upon return.
- *
- *----------------------------------------------------------------------
- */
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], if not included already
-		  in Tk_PhotoImageBlock */
-} myblock;
-
-static int
-CommonRead(interp, cinfo, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    j_decompress_ptr cinfo;	/* Already-constructed decompress struct. */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    static char *jpegReadOptions[] = {"-fast", "-grayscale", NULL};
-    int fileWidth, fileHeight, stopY, curY, outY, outWidth, outHeight;
-    myblock bl;
-#define block bl.ck
-    JSAMPARRAY buffer;		/* Output row buffer */
-    int objc, i, index;
-    Tcl_Obj **objv = (Tcl_Obj **) NULL;
-
-    /* Ready to read header data. */
-    jpeg_read_header(cinfo, TRUE);
-
-    /* This code only supports 8-bit-precision JPEG files. */
-    if ((cinfo->data_precision != 8) ||
-	    (sizeof(JSAMPLE) != sizeof(unsigned char))) {
-	Tcl_AppendResult(interp, "Unsupported JPEG precision", (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    /* Process format parameters. */
-    if (tkimg_ListObjGetElements(interp, format, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc) {
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj(interp, objv[i], jpegReadOptions, "format option",
-		    0, &index)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    switch (index) {
-		case 0: {
-		    /* Select fast processing mode. */
-		    cinfo->two_pass_quantize = FALSE;
-		    cinfo->dither_mode = JDITHER_ORDERED;
-		    cinfo->dct_method = JDCT_FASTEST;
-		    cinfo->do_fancy_upsampling = FALSE;
-		    break;
-		}
-		case 1: {
-		    /* Force monochrome output. */
-		    cinfo->out_color_space = JCS_GRAYSCALE;
-		    break;
-		}
-	    }
-	}
-    }
-
-    jpeg_start_decompress(cinfo);
-
-    /* Check dimensions. */
-    fileWidth = (int) cinfo->output_width;
-    fileHeight = (int) cinfo->output_height;
-    if ((srcX + width) > fileWidth) {
-	outWidth = fileWidth - srcX;
-    } else {
-	outWidth = width;
-    }
-    if ((srcY + height) > fileHeight) {
-	outHeight = fileHeight - srcY;
-    } else {
-	outHeight = height;
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    /* Check colorspace. */
-    switch (cinfo->out_color_space) {
-    case JCS_GRAYSCALE:
-	/* a single-sample grayscale pixel is expanded into equal R,G,B values */
-	block.pixelSize = 1;
-	block.offset[0] = 0;
-	block.offset[1] = 0;
-	block.offset[2] = 0;
-	break;
-    case JCS_RGB:
-	/* note: this pixel layout assumes default configuration of libjpeg. */
-	block.pixelSize = 3;
-	block.offset[0] = 0;
-	block.offset[1] = 1;
-	block.offset[2] = 2;
-	break;
-    default:
-	Tcl_AppendResult(interp, "Unsupported JPEG color space", (char *) NULL);
-	return TCL_ERROR;
-    }
-    block.width = outWidth;
-    block.height = 1;
-    block.pitch = block.pixelSize * fileWidth;
-    block.offset[3] = block.offset[0];
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    /* Make a temporary one-row-high sample array */
-    buffer = (*cinfo->mem->alloc_sarray)
-		((j_common_ptr) cinfo, JPOOL_IMAGE,
-		 cinfo->output_width * cinfo->output_components, 1);
-    block.pixelPtr = (unsigned char *) buffer[0] + srcX * block.pixelSize;
-
-    /* Read as much of the data as we need to */
-    stopY = srcY + outHeight;
-    outY = destY;
-    for (curY = 0; curY < stopY; curY++) {
-      jpeg_read_scanlines(cinfo, buffer, 1);
-      if (curY >= srcY) {
-	tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, outY, outWidth, 1);
-	outY++;
-      }
-    }
-
-    /* Do normal cleanup if we read the whole image; else early abort */
-    if (cinfo->output_scanline == cinfo->output_height)
-	jpeg_finish_decompress(cinfo);
-    else
-	jpeg_abort_decompress(cinfo);
-
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnWrite --
- *
- *	This procedure is invoked to write image data to a file in JPEG
- *	format.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	Data is written to the file given by "fileName".
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnWrite(interp, fileName, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    struct jpeg_compress_struct cinfo; /* libjpeg's parameter structure */
-    struct my_error_mgr jerror;	/* for controlling libjpeg error handling */
-    Tcl_Channel chan;
-    int result;
-
-    chan = tkimg_OpenFileChannel(interp, fileName, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    /* Initialize JPEG error handler */
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.err = jpeg_std_error(&jerror.pub);
-    jerror.pub.error_exit = my_error_exit;
-    jerror.pub.output_message = my_output_message;
-
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerror.setjmp_buffer)) {
-      /* If we get here, the JPEG code has signaled an error. */
-      Tcl_AppendResult(interp, "couldn't write JPEG file \"", fileName,
-		       "\": ", (char *) NULL);
-      append_jpeg_message(interp, (j_common_ptr) &cinfo);
-      jpeg_destroy_compress(&cinfo);
-      Tcl_Close(interp, chan);
-      return TCL_ERROR;
-    }
-
-    /* Now we can initialize libjpeg. */
-    jpeg_create_compress(&cinfo);
-    my_jpeg_channel_dest(&cinfo, chan);
-
-    /* Share code with StringWrite. */
-    result = CommonWrite(interp, &cinfo, format, blockPtr);
-
-    jpeg_destroy_compress(&cinfo);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * StringWrite --
- *
- *	This procedure is called by the photo image type to write
- *	JPEG format data to a base-64 encoded string from the photo block.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-StringWrite(interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    struct jpeg_compress_struct cinfo; /* libjpeg's parameter structure */
-    struct my_error_mgr jerror;	/* for controlling libjpeg error handling */
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    /* Initialize JPEG error handler */
-    /* We set up the normal JPEG error routines, then override error_exit. */
-    cinfo.err = jpeg_std_error(&jerror.pub);
-    jerror.pub.error_exit = my_error_exit;
-    jerror.pub.output_message = my_output_message;
-
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerror.setjmp_buffer)) {
-      /* If we get here, the JPEG code has signaled an error. */
-      Tcl_AppendResult(interp, "couldn't write JPEG string: ", (char *) NULL);
-      append_jpeg_message(interp, (j_common_ptr) &cinfo);
-      result = TCL_ERROR;
-      goto writeend;
-    }
-
-    /* Now we can initialize libjpeg. */
-    jpeg_create_compress(&cinfo);
-    my_jpeg_string_dest(&cinfo, dataPtr);
-
-    /* Share code with ChnWrite. */
-    result = CommonWrite(interp, &cinfo, format, blockPtr);
-
-writeend:
-
-    jpeg_destroy_compress(&cinfo);
-    if (dataPtr == &data) {
-	if (result == TCL_OK) {
-	    Tcl_DStringResult(interp, dataPtr);
-	} else {
-	    Tcl_DStringFree(dataPtr);
-	}
-    }
-
-    return result;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonWrite --
- *
- *	The common guts of ChnWrite and StringWrite.
- *	The compress struct has already been set up and the
- *	appropriate data destination manager initialized.
- *	The caller should do jpeg_destroy_compress upon return,
- *	and also close the destination as necessary.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-CommonWrite(interp, cinfo, format, blockPtr)
-    Tcl_Interp *interp;
-    j_compress_ptr cinfo;	
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    static char *jpegWriteOptions[] = {"-grayscale", "-optimize",
-	"-progressive", "-quality", "-smooth", NULL};
-    JSAMPROW row_pointer[1];	/* pointer to original data scanlines */
-    JSAMPARRAY buffer;		/* Intermediate row buffer */
-    JSAMPROW bufferPtr;
-    int w, h;
-    int greenOffset, blueOffset, alphaOffset;
-    unsigned char *pixelPtr, *pixLinePtr;
-    int objc, i, index, grayscale = 0;
-    Tcl_Obj **objv = (Tcl_Obj **) NULL;
-
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[2]) {
-        alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-
-    /* Set up JPEG compression parameters. */
-    cinfo->image_width = blockPtr->width;
-    cinfo->image_height = blockPtr->height;
-    cinfo->input_components = 3;
-    cinfo->in_color_space = JCS_RGB;
-
-    jpeg_set_defaults(cinfo);
-
-    /* Parse options, if any, and alter default parameters */
-
-    if (tkimg_ListObjGetElements(interp, format, &objc, &objv) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    if (objc) {
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj(interp, objv[i], jpegWriteOptions,
-		    "format option", 0, &index)!=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    switch (index) {
-		case 0: {
-		    grayscale = 1;
-		    break;
-		}
-		case 1: {
-		    cinfo->optimize_coding = TRUE;
-		    break;
-		}
-		case 2: {
-		    if (jpeg_simple_progression != NULL) {
-			/* Select simple progressive mode. */
-			jpeg_simple_progression(cinfo);
-		    }
-		    break;
-		}
-		case 3: {
-		    int quality = 0;
-		    if (++i >= objc) {
-			Tcl_AppendResult(interp, "No value for option \"",
-				Tcl_GetStringFromObj(objv[--i], (int *) NULL), "\"", (char *) NULL);
-			return TCL_ERROR;
-		    }
-		    if (Tcl_GetIntFromObj(interp, objv[i], &quality) != TCL_OK) {
-			return TCL_ERROR;
-		    }
-		    jpeg_set_quality(cinfo, quality, FALSE);
-		    break;
-		}
-		case 4: {
-		    int smooth = 0;
-		    if (++i >= objc) {
-			Tcl_AppendResult(interp, "No value for option \"",
-				Tcl_GetStringFromObj(objv[--i], (int *) NULL), "\"", (char *) NULL);
-			return TCL_ERROR;
-		    }
-		    if (Tcl_GetIntFromObj(interp, objv[i], &smooth) != TCL_OK) {
-			return TCL_ERROR;
-		    }
-		    cinfo->smoothing_factor = smooth;
-		    break;
-		}
-	    }
-	}
-    }
-
-    pixLinePtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-    if ((jpeg_set_colorspace != NULL) &&
-	    (grayscale || (!greenOffset && !blueOffset))) {
-	/* Generate monochrome JPEG file if source block is grayscale. */
-	jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
-    }
-
-    jpeg_start_compress(cinfo, TRUE);
-    
-    /* note: we assume libjpeg is configured for standard RGB pixel order. */
-    if ((greenOffset == 1) && (blueOffset == 2)
-	&& (blockPtr->pixelSize == 3)) {
-	/* No need to reformat pixels before passing data to libjpeg */
-	for (h = blockPtr->height; h > 0; h--) {
-	    row_pointer[0] = (JSAMPROW) pixLinePtr;
-	    jpeg_write_scanlines(cinfo, row_pointer, 1);
-	    pixLinePtr += blockPtr->pitch;
-	}
-    } else {
-	/* Must convert data format.  Create a one-scanline work buffer. */
-	buffer = (*cinfo->mem->alloc_sarray)
-	  ((j_common_ptr) cinfo, JPOOL_IMAGE,
-	   cinfo->image_width * cinfo->input_components, 1);
-	for (h = blockPtr->height; h > 0; h--) {
-	    pixelPtr = pixLinePtr;
-	    bufferPtr = buffer[0];
-	    for (w = blockPtr->width; w > 0; w--) {
-		if (alphaOffset && !pixelPtr[alphaOffset]) {
-		    /* if pixel is transparant, better use gray
-		     * than the default black.
-		     */
-		    *bufferPtr++ = 0xd9;
-		    *bufferPtr++ = 0xd9;
-		    *bufferPtr++ = 0xd9;
-		} else {
-		    *bufferPtr++ = pixelPtr[0];
-		    *bufferPtr++ = pixelPtr[greenOffset];
-		    *bufferPtr++ = pixelPtr[blueOffset];
-		}
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	    jpeg_write_scanlines(cinfo, buffer, 1);
-	    pixLinePtr += blockPtr->pitch;
-	}
-    }
-
-    jpeg_finish_compress(cinfo);
-    return TCL_OK;
-}
-
-/*
- * libjpeg source manager for reading from base64-encoded strings
- * and from Tcl_Channels.
- */
-
-static void
-my_jpeg_obj_src (cinfo, dataObj)
-    j_decompress_ptr cinfo;
-    Tcl_Obj *dataObj;
-{
-  src_ptr src;
-
-  src = (src_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  sizeof(struct source_mgr));
-  cinfo->src = (struct jpeg_source_mgr *) src;
-
-  src->pub.init_source = dummy_source;
-  src->pub.fill_input_buffer = fill_input_buffer;
-  src->pub.skip_input_data = skip_input_data;
-  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
-  src->pub.term_source = dummy_source;
-
-  tkimg_ReadInit(dataObj, '\377', &src->handle);
-
-  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
-  src->pub.next_input_byte = NULL; /* until buffer loaded */
-}
-
-static boolean
-fill_input_buffer(cinfo)
-    j_decompress_ptr cinfo;
-{
-  src_ptr src = (src_ptr) cinfo->src;
-  int nbytes;
-
-  nbytes = tkimg_Read(&src->handle, src->buffer, STRING_BUF_SIZE);
-
-  if (nbytes <= 0) {
-    /* Insert a fake EOI marker */
-    src->buffer[0] = (JOCTET) 0xFF;
-    src->buffer[1] = (JOCTET) JPEG_EOI;
-    nbytes = 2;
-  }
-
-  src->pub.next_input_byte = src->buffer;
-  src->pub.bytes_in_buffer = nbytes;
-
-  return TRUE;
-}
-
-static void
-skip_input_data(cinfo, num_bytes)
-    j_decompress_ptr cinfo;
-    long num_bytes;
-{
-  src_ptr src = (src_ptr) cinfo->src;
-
-  if (num_bytes > 0) {
-    while (num_bytes > (long) src->pub.bytes_in_buffer) {
-      num_bytes -= (long) src->pub.bytes_in_buffer;
-      fill_input_buffer(cinfo);
-    }
-    src->pub.next_input_byte += (size_t) num_bytes;
-    src->pub.bytes_in_buffer -= (size_t) num_bytes;
-  }
-}
-
-static void
-dummy_source(cinfo)
-    j_decompress_ptr cinfo;
-{
-  /* no work necessary here */
-}
-
-/*
- * libjpeg source manager for reading from channels.
- */
-static void
-my_jpeg_channel_src (cinfo, chan)
-    j_decompress_ptr cinfo;
-    Tcl_Channel chan;
-{
-  src_ptr src;
-
-  src = (src_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  sizeof(struct source_mgr));
-  cinfo->src = (struct jpeg_source_mgr *) src;
-
-  src->pub.init_source = dummy_source;
-  src->pub.fill_input_buffer = fill_input_buffer;
-  src->pub.skip_input_data = skip_input_data;
-  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
-  src->pub.term_source = dummy_source;
-
-  src->handle.data = (char *) chan;
-  src->handle.state = IMG_CHAN;
-
-  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
-  src->pub.next_input_byte = NULL; /* until buffer loaded */
-}
-
-
-/*
- * libjpeg destination manager for writing to base64-encoded strings
- * and Tcl_Channel's.
- */
-
-static void
-my_jpeg_string_dest (cinfo, dstring)
-    j_compress_ptr cinfo;
-    Tcl_DString* dstring;
-{
-  dest_ptr dest;
-
-  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
-    cinfo->dest = (struct jpeg_destination_mgr *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  sizeof(struct destination_mgr));
-  }
-
-  dest = (dest_ptr) cinfo->dest;
-  dest->pub.init_destination = my_init_destination;
-  dest->pub.empty_output_buffer = my_empty_output_buffer;
-  dest->pub.term_destination = my_term_destination;
-  Tcl_DStringSetLength(dstring, dstring->spaceAvl);
-  dest->handle.buffer = dstring;
-  dest->handle.data = Tcl_DStringValue(dstring);
-  dest->handle.state = 0;
-  dest->handle.length = 0;
-}
-
-static void
-my_jpeg_channel_dest (cinfo, chan)
-    j_compress_ptr cinfo;
-    Tcl_Channel chan;
-{
-  dest_ptr dest;
-
-  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
-    cinfo->dest = (struct jpeg_destination_mgr *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  sizeof(struct destination_mgr));
-  }
-
-  dest = (dest_ptr) cinfo->dest;
-  dest->pub.init_destination = my_init_destination;
-  dest->pub.empty_output_buffer = my_empty_output_buffer;
-  dest->pub.term_destination = my_term_destination;
-  dest->handle.data = (char *) chan;
-  dest->handle.state = IMG_CHAN;
-}
-
-static void
-my_init_destination (cinfo)
-    j_compress_ptr cinfo;
-{
-  dest_ptr dest = (dest_ptr) cinfo->dest;
-  dest->pub.next_output_byte = dest->buffer;
-  dest->pub.free_in_buffer = STRING_BUF_SIZE;
-}
-
-static boolean
-my_empty_output_buffer (cinfo)
-    j_compress_ptr cinfo;
-{
-  dest_ptr dest = (dest_ptr) cinfo->dest;
-  if (tkimg_Write(&dest->handle, (char *) dest->buffer, STRING_BUF_SIZE)
-  	!= STRING_BUF_SIZE)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-
-  dest->pub.next_output_byte = dest->buffer;
-  dest->pub.free_in_buffer = STRING_BUF_SIZE;
-
-  return TRUE;
-}
-
-static void
-my_term_destination (cinfo)
-    j_compress_ptr cinfo;
-{
-  dest_ptr dest = (dest_ptr) cinfo->dest;
-  int datacount = STRING_BUF_SIZE - (int) dest->pub.free_in_buffer;
-
-  /* Write any data remaining in the buffer */
-  if (datacount > 0) {
-    if (tkimg_Write(&dest->handle, (char *) dest->buffer, datacount)
-	!= datacount)
-      ERREXIT(cinfo, JERR_FILE_WRITE);
-  }
-  /* Empty any partial-byte from the base64 encoder */
-  tkimg_Putc(IMG_DONE, &dest->handle);
-}
-
-
-/*
- * Error handler to replace (or extend, really) libjpeg's default handler
- */
-
-static void
-my_error_exit (cinfo)
-    j_common_ptr cinfo;
-{
-  struct my_error_mgr *myerr = (struct my_error_mgr *) cinfo->err;
-  /* Exit back to outer level */
-  longjmp(myerr->setjmp_buffer, 1);
-}
-
-static void
-append_jpeg_message (interp, cinfo)
-    Tcl_Interp *interp;
-    j_common_ptr cinfo;
-{
-  /* Append libjpeg error message to interp->result */
-  char buffer[JMSG_LENGTH_MAX];
-  (*cinfo->err->format_message) (cinfo, buffer);
-  Tcl_AppendResult(interp, buffer, (char *) NULL);
-}
-
-static void
-my_output_message (cinfo)
-    j_common_ptr cinfo;
-{
-  /* Override libjpeg's output_message to do nothing.
-   * This ensures that warning messages will not appear on stderr,
-   * even for a corrupted JPEG file.  Too bad there's no way
-   * to report a "warning" message to the calling Tcl script.
-   */
-}
diff --git a/tkimg1.3/jpeg/pkgIndex.tcl.in b/tkimg1.3/jpeg/pkgIndex.tcl.in
deleted file mode 100644
index 71c44e4..0000000
--- a/tkimg1.3/jpeg/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgjpeg_LIB_FILE@]]
diff --git a/tkimg1.3/jpeg/tests/all.tcl b/tkimg1.3/jpeg/tests/all.tcl
deleted file mode 100644
index a901b37..0000000
--- a/tkimg1.3/jpeg/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:09 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/jpeg/tests/folder.jpg b/tkimg1.3/jpeg/tests/folder.jpg
deleted file mode 100644
index 87a0a38..0000000
Binary files a/tkimg1.3/jpeg/tests/folder.jpg and /dev/null differ
diff --git a/tkimg1.3/jpeg/tests/jpeg.test b/tkimg1.3/jpeg/tests/jpeg.test
deleted file mode 100644
index 2a1666b..0000000
--- a/tkimg1.3/jpeg/tests/jpeg.test
+++ /dev/null
@@ -1,73 +0,0 @@
-# This file is a Tcl script to test out GIF reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::jpeg [package require img::jpeg]"
-
-set jpegdata \
-{/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh
-MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR
-CAAMABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
-AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
-FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
-h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
-5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
-AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
-NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
-hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
-5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpdJ8Naj4g0ey1q9uNDnu763S5E8+kyPNA
-HUMqRyC4BQJnClNpyN33iWOxaHWtN1ux0vU9QtL9J7GaXzorNoJN8TQrlv3jKc+aScAcjj0r
-xXTfjd4l0fSbHTYLLSXitbaOGN5IpCxVVAGcSAE4HpXX/Dzx9qvjvxwBqcFnD9j02cx/ZUZc
-7pIM53M39wdMd687Dqv7ezlo7/1sB//Z}
-
-set jpegdata2 \
-{/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
-Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh
-MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR
-CAAMABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
-AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
-FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
-h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
-5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
-AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
-NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
-hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
-5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDptJ8Nahr+j2WtXtxok93fW6XInn0qR5oA
-6hlSOQXAKBM4UptORu+8Sx17Q61p2tWOl6nqFpfpPYzS+dFZtBJviaFct+8ZTnzSTgDkcele
-Lad8bfEuj6VY6bBZaU8VrbRwxvJFIWKqoAziQAnHtXX/AA78ear478cEanBZw/YtNuDH9lRl
-zukgznczf3B0x3rhoKu61nLR3/rYD//Z}
-
-test jpeg-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.jpg]
-    i data -format jpeg
-} $jpegdata
-test jpeg-1.2 {} {
-    image delete i
-    image create photo i -data $jpegdata
-    set data [i data -format jpeg]
-} $jpegdata2
-test jpeg-1.3 {} {
-    i blank
-    i put $jpegdata
-    set data [i data -format jpeg]
-} $jpegdata2
-test jpeg-1.4 {} {
-    i blank
-    i put $jpegdata -format jpeg
-    set data [i data -format jpeg]
-} $jpegdata2
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test jpeg-2.0 {Binary I/O with JPEG images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.jpg] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/libjpeg/README b/tkimg1.3/libjpeg/README
deleted file mode 100644
index 86cc206..0000000
--- a/tkimg1.3/libjpeg/README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/tkimg1.3/libjpeg/ansi2knr.1 b/tkimg1.3/libjpeg/ansi2knr.1
deleted file mode 100644
index f9ee5a6..0000000
--- a/tkimg1.3/libjpeg/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH ANSI2KNR 1 "19 Jan 1996"
-.SH NAME
-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
-.SH SYNOPSIS
-.I ansi2knr
-[--varargs] input_file [output_file]
-.SH DESCRIPTION
-If no output_file is supplied, output goes to stdout.
-.br
-There are no error messages.
-.sp
-.I ansi2knr
-recognizes function definitions by seeing a non-keyword identifier at the left
-margin, followed by a left parenthesis, with a right parenthesis as the last
-character on the line, and with a left brace as the first token on the
-following line (ignoring possible intervening comments).  It will recognize a
-multi-line header provided that no intervening line ends with a left or right
-brace or a semicolon.  These algorithms ignore whitespace and comments, except
-that the function name must be the first thing on the line.
-.sp
-The following constructs will confuse it:
-.br
-     - Any other construct that starts at the left margin and follows the
-above syntax (such as a macro or function call).
-.br
-     - Some macros that tinker with the syntax of the function header.
-.sp
-The --varargs switch is obsolete, and is recognized only for
-backwards compatibility.  The present version of
-.I ansi2knr
-will always attempt to convert a ... argument to va_alist and va_dcl.
-.SH AUTHOR
-L. Peter Deutsch <ghost at aladdin.com> wrote the original ansi2knr and
-continues to maintain the current version; most of the code in the current
-version is his work.  ansi2knr also includes contributions by Francois
-Pinard <pinard at iro.umontreal.ca> and Jim Avera <jima at netcom.com>.
diff --git a/tkimg1.3/libjpeg/ansi2knr.c b/tkimg1.3/libjpeg/ansi2knr.c
deleted file mode 100644
index 4e05fc2..0000000
--- a/tkimg1.3/libjpeg/ansi2knr.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/* ansi2knr.c */
-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
-
-/*
-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY.  No author or distributor accepts responsibility to anyone for the
-consequences of using it or for whether it serves any particular purpose or
-works at all, unless he says so in writing.  Refer to the GNU General Public
-License (the "GPL") for full details.
-
-Everyone is granted permission to copy, modify and redistribute ansi2knr,
-but only under the conditions described in the GPL.  A copy of this license
-is supposed to have been given to you along with ansi2knr so you can know
-your rights and responsibilities.  It should be in a file named COPYLEFT.
-[In the IJG distribution, the GPL appears below, not in a separate file.]
-Among other things, the copyright notice and this notice must be preserved
-on all copies.
-
-We explicitly state here what we believe is already implied by the GPL: if
-the ansi2knr program is distributed as a separate set of sources and a
-separate executable file which are aggregated on a storage medium together
-with another program, this in itself does not bring the other program under
-the GPL, nor does the mere fact that such a program or the procedures for
-constructing it invoke the ansi2knr executable bring any other part of the
-program under the GPL.
-*/
-
-/*
----------- Here is the GNU GPL file COPYLEFT, referred to above ----------
------ These terms do NOT apply to the JPEG software itself; see README ------
-
-		    GHOSTSCRIPT GENERAL PUBLIC LICENSE
-		    (Clarified 11 Feb 1988)
-
- Copyright (C) 1988 Richard M. Stallman
- Everyone is permitted to copy and distribute verbatim copies of this
- license, but changing it is not allowed.  You can also use this wording
- to make the terms for other programs.
-
-  The license agreements of most software companies keep you at the
-mercy of those companies.  By contrast, our general public license is
-intended to give everyone the right to share Ghostscript.  To make sure
-that you get the rights we want you to have, we need to make
-restrictions that forbid anyone to deny you these rights or to ask you
-to surrender the rights.  Hence this license agreement.
-
-  Specifically, we want to make sure that you have the right to give
-away copies of Ghostscript, that you receive source code or else can get
-it if you want it, that you can change Ghostscript or use pieces of it
-in new free programs, and that you know you can do these things.
-
-  To make sure that everyone has such rights, we have to forbid you to
-deprive anyone else of these rights.  For example, if you distribute
-copies of Ghostscript, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must tell them their rights.
-
-  Also, for our own protection, we must make certain that everyone finds
-out that there is no warranty for Ghostscript.  If Ghostscript is
-modified by someone else and passed on, we want its recipients to know
-that what they have is not what we distributed, so that any problems
-introduced by others will not reflect on our reputation.
-
-  Therefore we (Richard M. Stallman and the Free Software Foundation,
-Inc.) make the following terms which say what you must do to be allowed
-to distribute or change Ghostscript.
-
-
-			COPYING POLICIES
-
-  1. You may copy and distribute verbatim copies of Ghostscript source
-code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy a valid copyright and license
-notice "Copyright (C) 1989 Aladdin Enterprises.  All rights reserved.
-Distributed by Free Software Foundation, Inc." (or with whatever year is
-appropriate); keep intact the notices on all files that refer to this
-License Agreement and to the absence of any warranty; and give any other
-recipients of the Ghostscript program a copy of this License Agreement
-along with the program.  You may charge a distribution fee for the
-physical act of transferring a copy.
-
-  2. You may modify your copy or copies of Ghostscript or any portion of
-it, and copy and distribute such modifications under the terms of
-Paragraph 1 above, provided that you also do the following:
-
-    a) cause the modified files to carry prominent notices stating
-    that you changed the files and the date of any change; and
-
-    b) cause the whole of any work that you distribute or publish,
-    that in whole or in part contains or is a derivative of Ghostscript
-    or any part thereof, to be licensed at no charge to all third
-    parties on terms identical to those contained in this License
-    Agreement (except that you may choose to grant more extensive
-    warranty protection to some or all third parties, at your option).
-
-    c) You may charge a distribution fee for the physical act of
-    transferring a copy, and you may at your option offer warranty
-    protection in exchange for a fee.
-
-Mere aggregation of another unrelated program with this program (or its
-derivative) on a volume of a storage or distribution medium does not bring
-the other program under the scope of these terms.
-
-  3. You may copy and distribute Ghostscript (or a portion or derivative
-of it, under Paragraph 2) in object code or executable form under the
-terms of Paragraphs 1 and 2 above provided that you also do one of the
-following:
-
-    a) accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of
-    Paragraphs 1 and 2 above; or,
-
-    b) accompany it with a written offer, valid for at least three
-    years, to give any third party free (except for a nominal
-    shipping charge) a complete machine-readable copy of the
-    corresponding source code, to be distributed under the terms of
-    Paragraphs 1 and 2 above; or,
-
-    c) accompany it with the information you received as to where the
-    corresponding source code may be obtained.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form alone.)
-
-For an executable file, complete source code means all the source code for
-all modules it contains; but, as a special exception, it need not include
-source code for modules which are standard libraries that accompany the
-operating system on which the executable file runs.
-
-  4. You may not copy, sublicense, distribute or transfer Ghostscript
-except as expressly provided under this License Agreement.  Any attempt
-otherwise to copy, sublicense, distribute or transfer Ghostscript is
-void and your rights to use the program under this License agreement
-shall be automatically terminated.  However, parties who have received
-computer software programs from you with this License Agreement will not
-have their licenses terminated so long as such parties remain in full
-compliance.
-
-  5. If you wish to incorporate parts of Ghostscript into other free
-programs whose distribution conditions are different, write to the Free
-Software Foundation at 675 Mass Ave, Cambridge, MA 02139.  We have not
-yet worked out a simple rule that can be stated here, but we will often
-permit this.  We will be guided by the two goals of preserving the free
-status of all derivatives of our free software and of promoting the
-sharing and reuse of software.
-
-Your comments and suggestions about our licensing policies and our
-software are welcome!  Please contact the Free Software Foundation,
-Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296.
-
-		       NO WARRANTY
-
-  BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
-NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.  EXCEPT
-WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD
-M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES
-PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH
-YOU.  SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
-STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN
-ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
-GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
-ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
-(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
-INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU
-HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM
-BY ANY OTHER PARTY.
-
--------------------- End of file COPYLEFT ------------------------------
-*/
-
-/*
- * Usage:
-	ansi2knr input_file [output_file]
- * If no output_file is supplied, output goes to stdout.
- * There are no error messages.
- *
- * ansi2knr recognizes function definitions by seeing a non-keyword
- * identifier at the left margin, followed by a left parenthesis,
- * with a right parenthesis as the last character on the line,
- * and with a left brace as the first token on the following line
- * (ignoring possible intervening comments).
- * It will recognize a multi-line header provided that no intervening
- * line ends with a left or right brace or a semicolon.
- * These algorithms ignore whitespace and comments, except that
- * the function name must be the first thing on the line.
- * The following constructs will confuse it:
- *	- Any other construct that starts at the left margin and
- *	    follows the above syntax (such as a macro or function call).
- *	- Some macros that tinker with the syntax of the function header.
- */
-
-/*
- * The original and principal author of ansi2knr is L. Peter Deutsch
- * <ghost at aladdin.com>.  Other authors are noted in the change history
- * that follows (in reverse chronological order):
-	lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with
-		compilers that don't understand void, as suggested by
-		Tom Lane
-	lpd 96-01-15 changed to require that the first non-comment token
-		on the line following a function header be a left brace,
-		to reduce sensitivity to macros, as suggested by Tom Lane
-		<tgl at sss.pgh.pa.us>
-	lpd 95-06-22 removed #ifndefs whose sole purpose was to define
-		undefined preprocessor symbols as 0; changed all #ifdefs
-		for configuration symbols to #ifs
-	lpd 95-04-05 changed copyright notice to make it clear that
-		including ansi2knr in a program does not bring the entire
-		program under the GPL
-	lpd 94-12-18 added conditionals for systems where ctype macros
-		don't handle 8-bit characters properly, suggested by
-		Francois Pinard <pinard at iro.umontreal.ca>;
-		removed --varargs switch (this is now the default)
-	lpd 94-10-10 removed CONFIG_BROKETS conditional
-	lpd 94-07-16 added some conditionals to help GNU `configure',
-		suggested by Francois Pinard <pinard at iro.umontreal.ca>;
-		properly erase prototype args in function parameters,
-		contributed by Jim Avera <jima at netcom.com>;
-		correct error in writeblanks (it shouldn't erase EOLs)
-	lpd 89-xx-xx original version
- */
-
-/* Most of the conditionals here are to make ansi2knr work with */
-/* or without the GNU configure machinery. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#if HAVE_CONFIG_H
-
-/*
-   For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
-   This will define HAVE_CONFIG_H and so, activate the following lines.
- */
-
-# if STDC_HEADERS || HAVE_STRING_H
-#  include <string.h>
-# else
-#  include <strings.h>
-# endif
-
-#else /* not HAVE_CONFIG_H */
-
-/* Otherwise do it the hard way */
-
-# ifdef BSD
-#  include <strings.h>
-# else
-#  ifdef VMS
-    extern int strlen(), strncmp();
-#  else
-#   include <string.h>
-#  endif
-# endif
-
-#endif /* not HAVE_CONFIG_H */
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-/*
-   malloc and free should be declared in stdlib.h,
-   but if you've got a K&R compiler, they probably aren't.
- */
-# ifdef MSDOS
-#  include <malloc.h>
-# else
-#  ifdef VMS
-     extern char *malloc();
-     extern void free();
-#  else
-     extern char *malloc();
-     extern int free();
-#  endif
-# endif
-
-#endif
-
-/*
- * The ctype macros don't always handle 8-bit characters correctly.
- * Compensate for this here.
- */
-#ifdef isascii
-#  undef HAVE_ISASCII		/* just in case */
-#  define HAVE_ISASCII 1
-#else
-#endif
-#if STDC_HEADERS || !HAVE_ISASCII
-#  define is_ascii(c) 1
-#else
-#  define is_ascii(c) isascii(c)
-#endif
-
-#define is_space(c) (is_ascii(c) && isspace(c))
-#define is_alpha(c) (is_ascii(c) && isalpha(c))
-#define is_alnum(c) (is_ascii(c) && isalnum(c))
-
-/* Scanning macros */
-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
-
-/* Forward references */
-char *skipspace();
-int writeblanks();
-int test1();
-int convert1();
-
-/* The main program */
-int
-main(argc, argv)
-    int argc;
-    char *argv[];
-{	FILE *in, *out;
-#define bufsize 5000			/* arbitrary size */
-	char *buf;
-	char *line;
-	char *more;
-	/*
-	 * In previous versions, ansi2knr recognized a --varargs switch.
-	 * If this switch was supplied, ansi2knr would attempt to convert
-	 * a ... argument to va_alist and va_dcl; if this switch was not
-	 * supplied, ansi2knr would simply drop any such arguments.
-	 * Now, ansi2knr always does this conversion, and we only
-	 * check for this switch for backward compatibility.
-	 */
-	int convert_varargs = 1;
-
-	if ( argc > 1 && argv[1][0] == '-' )
-	  {	if ( !strcmp(argv[1], "--varargs") )
-		  {	convert_varargs = 1;
-			argc--;
-			argv++;
-		  }
-		else
-		  {	fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
-			exit(1);
-		  }
-	  }
-	switch ( argc )
-	   {
-	default:
-		printf("Usage: ansi2knr input_file [output_file]\n");
-		exit(0);
-	case 2:
-		out = stdout;
-		break;
-	case 3:
-		out = fopen(argv[2], "w");
-		if ( out == NULL )
-		   {	fprintf(stderr, "Cannot open output file %s\n", argv[2]);
-			exit(1);
-		   }
-	   }
-	in = fopen(argv[1], "r");
-	if ( in == NULL )
-	   {	fprintf(stderr, "Cannot open input file %s\n", argv[1]);
-		exit(1);
-	   }
-	fprintf(out, "#line 1 \"%s\"\n", argv[1]);
-	buf = malloc(bufsize);
-	line = buf;
-	while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
-	   {
-test:		line += strlen(line);
-		switch ( test1(buf) )
-		   {
-		case 2:			/* a function header */
-			convert1(buf, out, 1, convert_varargs);
-			break;
-		case 1:			/* a function */
-			/* Check for a { at the start of the next line. */
-			more = ++line;
-f:			if ( line >= buf + (bufsize - 1) ) /* overflow check */
-			  goto wl;
-			if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
-			  goto wl;
-			switch ( *skipspace(more, 1) )
-			  {
-			  case '{':
-			    /* Definitely a function header. */
-			    convert1(buf, out, 0, convert_varargs);
-			    fputs(more, out);
-			    break;
-			  case 0:
-			    /* The next line was blank or a comment: */
-			    /* keep scanning for a non-comment. */
-			    line += strlen(line);
-			    goto f;
-			  default:
-			    /* buf isn't a function header, but */
-			    /* more might be. */
-			    fputs(buf, out);
-			    strcpy(buf, more);
-			    line = buf;
-			    goto test;
-			  }
-			break;
-		case -1:		/* maybe the start of a function */
-			if ( line != buf + (bufsize - 1) ) /* overflow check */
-			  continue;
-			/* falls through */
-		default:		/* not a function */
-wl:			fputs(buf, out);
-			break;
-		   }
-		line = buf;
-	   }
-	if ( line != buf )
-	  fputs(buf, out);
-	free(buf);
-	fclose(out);
-	fclose(in);
-	return 0;
-}
-
-/* Skip over space and comments, in either direction. */
-char *
-skipspace(p, dir)
-    register char *p;
-    register int dir;			/* 1 for forward, -1 for backward */
-{	for ( ; ; )
-	   {	while ( is_space(*p) )
-		  p += dir;
-		if ( !(*p == '/' && p[dir] == '*') )
-		  break;
-		p += dir;  p += dir;
-		while ( !(*p == '*' && p[dir] == '/') )
-		   {	if ( *p == 0 )
-			  return p;	/* multi-line comment?? */
-			p += dir;
-		   }
-		p += dir;  p += dir;
-	   }
-	return p;
-}
-
-/*
- * Write blanks over part of a string.
- * Don't overwrite end-of-line characters.
- */
-int
-writeblanks(start, end)
-    char *start;
-    char *end;
-{	char *p;
-	for ( p = start; p < end; p++ )
-	  if ( *p != '\r' && *p != '\n' )
-	    *p = ' ';
-	return 0;
-}
-
-/*
- * Test whether the string in buf is a function definition.
- * The string may contain and/or end with a newline.
- * Return as follows:
- *	0 - definitely not a function definition;
- *	1 - definitely a function definition;
- *	2 - definitely a function prototype (NOT USED);
- *	-1 - may be the beginning of a function definition,
- *		append another line and look again.
- * The reason we don't attempt to convert function prototypes is that
- * Ghostscript's declaration-generating macros look too much like
- * prototypes, and confuse the algorithms.
- */
-int
-test1(buf)
-    char *buf;
-{	register char *p = buf;
-	char *bend;
-	char *endfn;
-	int contin;
-
-	if ( !isidfirstchar(*p) )
-	  return 0;		/* no name at left margin */
-	bend = skipspace(buf + strlen(buf) - 1, -1);
-	switch ( *bend )
-	   {
-	   case ';': contin = 0 /*2*/; break;
-	   case ')': contin = 1; break;
-	   case '{': return 0;		/* not a function */
-	   case '}': return 0;		/* not a function */
-	   default: contin = -1;
-	   }
-	while ( isidchar(*p) )
-	  p++;
-	endfn = p;
-	p = skipspace(p, 1);
-	if ( *p++ != '(' )
-	  return 0;		/* not a function */
-	p = skipspace(p, 1);
-	if ( *p == ')' )
-	  return 0;		/* no parameters */
-	/* Check that the apparent function name isn't a keyword. */
-	/* We only need to check for keywords that could be followed */
-	/* by a left parenthesis (which, unfortunately, is most of them). */
-	   {	static char *words[] =
-		   {	"asm", "auto", "case", "char", "const", "double",
-			"extern", "float", "for", "if", "int", "long",
-			"register", "return", "short", "signed", "sizeof",
-			"static", "switch", "typedef", "unsigned",
-			"void", "volatile", "while", 0
-		   };
-		char **key = words;
-		char *kp;
-		int len = endfn - buf;
-
-		while ( (kp = *key) != 0 )
-		   {	if ( strlen(kp) == len && !strncmp(kp, buf, len) )
-			  return 0;	/* name is a keyword */
-			key++;
-		   }
-	   }
-	return contin;
-}
-
-/* Convert a recognized function definition or header to K&R syntax. */
-int
-convert1(buf, out, header, convert_varargs)
-    char *buf;
-    FILE *out;
-    int header;			/* Boolean */
-    int convert_varargs;	/* Boolean */
-{	char *endfn;
-	register char *p;
-	char **breaks;
-	unsigned num_breaks = 2;	/* for testing */
-	char **btop;
-	char **bp;
-	char **ap;
-	char *vararg = 0;
-
-	/* Pre-ANSI implementations don't agree on whether strchr */
-	/* is called strchr or index, so we open-code it here. */
-	for ( endfn = buf; *(endfn++) != '('; )
-	  ;
-top:	p = endfn;
-	breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
-	if ( breaks == 0 )
-	   {	/* Couldn't allocate break table, give up */
-		fprintf(stderr, "Unable to allocate break table!\n");
-		fputs(buf, out);
-		return -1;
-	   }
-	btop = breaks + num_breaks * 2 - 2;
-	bp = breaks;
-	/* Parse the argument list */
-	do
-	   {	int level = 0;
-		char *lp = NULL;
-		char *rp;
-		char *end = NULL;
-
-		if ( bp >= btop )
-		   {	/* Filled up break table. */
-			/* Allocate a bigger one and start over. */
-			free((char *)breaks);
-			num_breaks <<= 1;
-			goto top;
-		   }
-		*bp++ = p;
-		/* Find the end of the argument */
-		for ( ; end == NULL; p++ )
-		   {	switch(*p)
-			   {
-			   case ',':
-				if ( !level ) end = p;
-				break;
-			   case '(':
-				if ( !level ) lp = p;
-				level++;
-				break;
-			   case ')':
-				if ( --level < 0 ) end = p;
-				else rp = p;
-				break;
-			   case '/':
-				p = skipspace(p, 1) - 1;
-				break;
-			   default:
-				;
-			   }
-		   }
-		/* Erase any embedded prototype parameters. */
-		if ( lp )
-		  writeblanks(lp + 1, rp);
-		p--;			/* back up over terminator */
-		/* Find the name being declared. */
-		/* This is complicated because of procedure and */
-		/* array modifiers. */
-		for ( ; ; )
-		   {	p = skipspace(p - 1, -1);
-			switch ( *p )
-			   {
-			   case ']':	/* skip array dimension(s) */
-			   case ')':	/* skip procedure args OR name */
-			   {	int level = 1;
-				while ( level )
-				 switch ( *--p )
-				   {
-				   case ']': case ')': level++; break;
-				   case '[': case '(': level--; break;
-				   case '/': p = skipspace(p, -1) + 1; break;
-				   default: ;
-				   }
-			   }
-				if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
-				   {	/* We found the name being declared */
-					while ( !isidfirstchar(*p) )
-					  p = skipspace(p, 1) + 1;
-					goto found;
-				   }
-				break;
-			   default:
-				goto found;
-			   }
-		   }
-found:		if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
-		  {	if ( convert_varargs )
-			  {	*bp++ = "va_alist";
-				vararg = p-2;
-			  }
-			else
-			  {	p++;
-				if ( bp == breaks + 1 )	/* sole argument */
-				  writeblanks(breaks[0], p);
-				else
-				  writeblanks(bp[-1] - 1, p);
-				bp--;
-			  }
-		   }
-		else
-		   {	while ( isidchar(*p) ) p--;
-			*bp++ = p+1;
-		   }
-		p = end;
-	   }
-	while ( *p++ == ',' );
-	*bp = p;
-	/* Make a special check for 'void' arglist */
-	if ( bp == breaks+2 )
-	   {	p = skipspace(breaks[0], 1);
-		if ( !strncmp(p, "void", 4) )
-		   {	p = skipspace(p+4, 1);
-			if ( p == breaks[2] - 1 )
-			   {	bp = breaks;	/* yup, pretend arglist is empty */
-				writeblanks(breaks[0], p + 1);
-			   }
-		   }
-	   }
-	/* Put out the function name and left parenthesis. */
-	p = buf;
-	while ( p != endfn ) putc(*p, out), p++;
-	/* Put out the declaration. */
-	if ( header )
-	  {	fputs(");", out);
-		for ( p = breaks[0]; *p; p++ )
-		  if ( *p == '\r' || *p == '\n' )
-		    putc(*p, out);
-	  }
-	else
-	  {	for ( ap = breaks+1; ap < bp; ap += 2 )
-		  {	p = *ap;
-			while ( isidchar(*p) )
-			  putc(*p, out), p++;
-			if ( ap < bp - 1 )
-			  fputs(", ", out);
-		  }
-		fputs(")  ", out);
-		/* Put out the argument declarations */
-		for ( ap = breaks+2; ap <= bp; ap += 2 )
-		  (*ap)[-1] = ';';
-		if ( vararg != 0 )
-		  {	*vararg = 0;
-			fputs(breaks[0], out);		/* any prior args */
-			fputs("va_dcl", out);		/* the final arg */
-			fputs(bp[0], out);
-		  }
-		else
-		  fputs(breaks[0], out);
-	  }
-	free((char *)breaks);
-	return 0;
-}
diff --git a/tkimg1.3/libjpeg/cderror.h b/tkimg1.3/libjpeg/cderror.h
deleted file mode 100644
index 70435e1..0000000
--- a/tkimg1.3/libjpeg/cderror.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * cderror.h
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file defines the error and message codes for the cjpeg/djpeg
- * applications.  These strings are not needed as part of the JPEG library
- * proper.
- * Edit this file to add new codes, or to translate the message strings to
- * some other language.
- */
-
-/*
- * To define the enum list of message codes, include this file without
- * defining macro JMESSAGE.  To create a message string table, include it
- * again with a suitable JMESSAGE definition (see jerror.c for an example).
- */
-#ifndef JMESSAGE
-#ifndef CDERROR_H
-#define CDERROR_H
-/* First time through, define the enum list */
-#define JMAKE_ENUM_LIST
-#else
-/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
-#define JMESSAGE(code,string)
-#endif /* CDERROR_H */
-#endif /* JMESSAGE */
-
-#ifdef JMAKE_ENUM_LIST
-
-typedef enum {
-
-#define JMESSAGE(code,string)	code ,
-
-#endif /* JMAKE_ENUM_LIST */
-
-JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
-
-#ifdef BMP_SUPPORTED
-JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
-JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
-JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
-JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
-JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
-JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
-JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
-JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
-JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
-JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
-JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
-#endif /* BMP_SUPPORTED */
-
-#ifdef GIF_SUPPORTED
-JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
-JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
-JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
-JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
-JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
-JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
-JMESSAGE(JTRC_GIF_BADVERSION,
-	 "Warning: unexpected GIF version number '%c%c%c'")
-JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
-JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
-JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
-JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
-JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
-JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
-#endif /* GIF_SUPPORTED */
-
-#ifdef PPM_SUPPORTED
-JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
-JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
-JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
-JMESSAGE(JTRC_PGM, "%ux%u PGM image")
-JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
-JMESSAGE(JTRC_PPM, "%ux%u PPM image")
-JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
-#endif /* PPM_SUPPORTED */
-
-#ifdef RLE_SUPPORTED
-JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
-JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
-JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
-JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
-JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
-JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
-JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
-JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
-JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
-JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
-JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
-JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
-JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
-JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
-#endif /* RLE_SUPPORTED */
-
-#ifdef TARGA_SUPPORTED
-JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
-JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
-JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
-JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
-JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
-JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
-#else
-JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
-#endif /* TARGA_SUPPORTED */
-
-JMESSAGE(JERR_BAD_CMAP_FILE,
-	 "Color map file is invalid or of unsupported format")
-JMESSAGE(JERR_TOO_MANY_COLORS,
-	 "Output file format cannot handle %d colormap entries")
-JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
-#ifdef TARGA_SUPPORTED
-JMESSAGE(JERR_UNKNOWN_FORMAT,
-	 "Unrecognized input file format --- perhaps you need -targa")
-#else
-JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
-#endif
-JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
-
-#ifdef JMAKE_ENUM_LIST
-
-  JMSG_LASTADDONCODE
-} ADDON_MESSAGE_CODE;
-
-#undef JMAKE_ENUM_LIST
-#endif /* JMAKE_ENUM_LIST */
-
-/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
-#undef JMESSAGE
diff --git a/tkimg1.3/libjpeg/cdjpeg.c b/tkimg1.3/libjpeg/cdjpeg.c
deleted file mode 100644
index b6250ff..0000000
--- a/tkimg1.3/libjpeg/cdjpeg.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * cdjpeg.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains common support routines used by the IJG application
- * programs (cjpeg, djpeg, jpegtran).
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-#include <ctype.h>		/* to declare isupper(), tolower() */
-#ifdef NEED_SIGNAL_CATCHER
-#include <signal.h>		/* to declare signal() */
-#endif
-#ifdef USE_SETMODE
-#include <fcntl.h>		/* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h>			/* to declare setmode() */
-#endif
-
-
-/*
- * Signal catcher to ensure that temporary files are removed before aborting.
- * NB: for Amiga Manx C this is actually a global routine named _abort();
- * we put "#define signal_catcher _abort" in jconfig.h.  Talk about bogus...
- */
-
-#ifdef NEED_SIGNAL_CATCHER
-
-static j_common_ptr sig_cinfo;
-
-void				/* must be global for Manx C */
-signal_catcher (int signum)
-{
-  if (sig_cinfo != NULL) {
-    if (sig_cinfo->err != NULL) /* turn off trace output */
-      sig_cinfo->err->trace_level = 0;
-    jpeg_destroy(sig_cinfo);	/* clean up memory allocation & temp files */
-  }
-  exit(EXIT_FAILURE);
-}
-
-
-GLOBAL(void)
-enable_signal_catcher (j_common_ptr cinfo)
-{
-  sig_cinfo = cinfo;
-#ifdef SIGINT			/* not all systems have SIGINT */
-  signal(SIGINT, signal_catcher);
-#endif
-#ifdef SIGTERM			/* not all systems have SIGTERM */
-  signal(SIGTERM, signal_catcher);
-#endif
-}
-
-#endif
-
-
-/*
- * Optional progress monitor: display a percent-done figure on stderr.
- */
-
-#ifdef PROGRESS_REPORT
-
-METHODDEF(void)
-progress_monitor (j_common_ptr cinfo)
-{
-  cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
-  int total_passes = prog->pub.total_passes + prog->total_extra_passes;
-  int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
-
-  if (percent_done != prog->percent_done) {
-    prog->percent_done = percent_done;
-    if (total_passes > 1) {
-      fprintf(stderr, "\rPass %d/%d: %3d%% ",
-	      prog->pub.completed_passes + prog->completed_extra_passes + 1,
-	      total_passes, percent_done);
-    } else {
-      fprintf(stderr, "\r %3d%% ", percent_done);
-    }
-    fflush(stderr);
-  }
-}
-
-
-GLOBAL(void)
-start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
-{
-  /* Enable progress display, unless trace output is on */
-  if (cinfo->err->trace_level == 0) {
-    progress->pub.progress_monitor = progress_monitor;
-    progress->completed_extra_passes = 0;
-    progress->total_extra_passes = 0;
-    progress->percent_done = -1;
-    cinfo->progress = &progress->pub;
-  }
-}
-
-
-GLOBAL(void)
-end_progress_monitor (j_common_ptr cinfo)
-{
-  /* Clear away progress display */
-  if (cinfo->err->trace_level == 0) {
-    fprintf(stderr, "\r                \r");
-    fflush(stderr);
-  }
-}
-
-#endif
-
-
-/*
- * Case-insensitive matching of possibly-abbreviated keyword switches.
- * keyword is the constant keyword (must be lower case already),
- * minchars is length of minimum legal abbreviation.
- */
-
-GLOBAL(boolean)
-keymatch (char * arg, const char * keyword, int minchars)
-{
-  register int ca, ck;
-  register int nmatched = 0;
-
-  while ((ca = *arg++) != '\0') {
-    if ((ck = *keyword++) == '\0')
-      return FALSE;		/* arg longer than keyword, no good */
-    if (isupper(ca))		/* force arg to lcase (assume ck is already) */
-      ca = tolower(ca);
-    if (ca != ck)
-      return FALSE;		/* no good */
-    nmatched++;			/* count matched characters */
-  }
-  /* reached end of argument; fail if it's too short for unique abbrev */
-  if (nmatched < minchars)
-    return FALSE;
-  return TRUE;			/* A-OK */
-}
-
-
-/*
- * Routines to establish binary I/O mode for stdin and stdout.
- * Non-Unix systems often require some hacking to get out of text mode.
- */
-
-GLOBAL(FILE *)
-read_stdin (void)
-{
-  FILE * input_file = stdin;
-
-#ifdef USE_SETMODE		/* need to hack file mode? */
-  setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN		/* need to re-open in binary mode? */
-  if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
-    fprintf(stderr, "Cannot reopen stdin\n");
-    exit(EXIT_FAILURE);
-  }
-#endif
-  return input_file;
-}
-
-
-GLOBAL(FILE *)
-write_stdout (void)
-{
-  FILE * output_file = stdout;
-
-#ifdef USE_SETMODE		/* need to hack file mode? */
-  setmode(fileno(stdout), O_BINARY);
-#endif
-#ifdef USE_FDOPEN		/* need to re-open in binary mode? */
-  if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
-    fprintf(stderr, "Cannot reopen stdout\n");
-    exit(EXIT_FAILURE);
-  }
-#endif
-  return output_file;
-}
diff --git a/tkimg1.3/libjpeg/cdjpeg.h b/tkimg1.3/libjpeg/cdjpeg.h
deleted file mode 100644
index 2b387b6..0000000
--- a/tkimg1.3/libjpeg/cdjpeg.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * cdjpeg.h
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains common declarations for the sample applications
- * cjpeg and djpeg.  It is NOT used by the core JPEG library.
- */
-
-#define JPEG_CJPEG_DJPEG	/* define proper options in jconfig.h */
-#define JPEG_INTERNAL_OPTIONS	/* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h"		/* get library error codes too */
-#include "cderror.h"		/* get application-specific error codes */
-
-
-/*
- * Object interface for cjpeg's source file decoding modules
- */
-
-typedef struct cjpeg_source_struct * cjpeg_source_ptr;
-
-struct cjpeg_source_struct {
-  JMETHOD(void, start_input, (j_compress_ptr cinfo,
-			      cjpeg_source_ptr sinfo));
-  JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
-				       cjpeg_source_ptr sinfo));
-  JMETHOD(void, finish_input, (j_compress_ptr cinfo,
-			       cjpeg_source_ptr sinfo));
-
-  FILE *input_file;
-
-  JSAMPARRAY buffer;
-  JDIMENSION buffer_height;
-};
-
-
-/*
- * Object interface for djpeg's output file encoding modules
- */
-
-typedef struct djpeg_dest_struct * djpeg_dest_ptr;
-
-struct djpeg_dest_struct {
-  /* start_output is called after jpeg_start_decompress finishes.
-   * The color map will be ready at this time, if one is needed.
-   */
-  JMETHOD(void, start_output, (j_decompress_ptr cinfo,
-			       djpeg_dest_ptr dinfo));
-  /* Emit the specified number of pixel rows from the buffer. */
-  JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
-				 djpeg_dest_ptr dinfo,
-				 JDIMENSION rows_supplied));
-  /* Finish up at the end of the image. */
-  JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
-				djpeg_dest_ptr dinfo));
-
-  /* Target file spec; filled in by djpeg.c after object is created. */
-  FILE * output_file;
-
-  /* Output pixel-row buffer.  Created by module init or start_output.
-   * Width is cinfo->output_width * cinfo->output_components;
-   * height is buffer_height.
-   */
-  JSAMPARRAY buffer;
-  JDIMENSION buffer_height;
-};
-
-
-/*
- * cjpeg/djpeg may need to perform extra passes to convert to or from
- * the source/destination file format.  The JPEG library does not know
- * about these passes, but we'd like them to be counted by the progress
- * monitor.  We use an expanded progress monitor object to hold the
- * additional pass count.
- */
-
-struct cdjpeg_progress_mgr {
-  struct jpeg_progress_mgr pub;	/* fields known to JPEG library */
-  int completed_extra_passes;	/* extra passes completed */
-  int total_extra_passes;	/* total extra */
-  /* last printed percentage stored here to avoid multiple printouts */
-  int percent_done;
-};
-
-typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
-
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jinit_read_bmp		jIRdBMP
-#define jinit_write_bmp		jIWrBMP
-#define jinit_read_gif		jIRdGIF
-#define jinit_write_gif		jIWrGIF
-#define jinit_read_ppm		jIRdPPM
-#define jinit_write_ppm		jIWrPPM
-#define jinit_read_rle		jIRdRLE
-#define jinit_write_rle		jIWrRLE
-#define jinit_read_targa	jIRdTarga
-#define jinit_write_targa	jIWrTarga
-#define read_quant_tables	RdQTables
-#define read_scan_script	RdScnScript
-#define set_quant_slots		SetQSlots
-#define set_sample_factors	SetSFacts
-#define read_color_map		RdCMap
-#define enable_signal_catcher	EnSigCatcher
-#define start_progress_monitor	StProgMon
-#define end_progress_monitor	EnProgMon
-#define read_stdin		RdStdin
-#define write_stdout		WrStdout
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Module selection routines for I/O modules. */
-
-EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
-					    boolean is_os2));
-EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
-
-/* cjpeg support routines (in rdswitch.c) */
-
-EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
-				    int scale_factor, boolean force_baseline));
-EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
-EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
-EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
-
-/* djpeg support routines (in rdcolmap.c) */
-
-EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
-
-/* common support routines (in cdjpeg.c) */
-
-EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
-EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
-					 cd_progress_ptr progress));
-EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
-EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
-EXTERN(FILE *) read_stdin JPP((void));
-EXTERN(FILE *) write_stdout JPP((void));
-
-/* miscellaneous useful macros */
-
-#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
-#define READ_BINARY	"r"
-#define WRITE_BINARY	"w"
-#else
-#ifdef VMS			/* VMS is very nonstandard */
-#define READ_BINARY	"rb", "ctx=stm"
-#define WRITE_BINARY	"wb", "ctx=stm"
-#else				/* standard ANSI-compliant case */
-#define READ_BINARY	"rb"
-#define WRITE_BINARY	"wb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
-#define EXIT_FAILURE  1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS  1		/* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS  0
-#endif
-#endif
-#ifndef EXIT_WARNING
-#ifdef VMS
-#define EXIT_WARNING  1		/* VMS is very nonstandard */
-#else
-#define EXIT_WARNING  2
-#endif
-#endif
diff --git a/tkimg1.3/libjpeg/change.log b/tkimg1.3/libjpeg/change.log
deleted file mode 100644
index 74102c0..0000000
--- a/tkimg1.3/libjpeg/change.log
+++ /dev/null
@@ -1,217 +0,0 @@
-CHANGE LOG for Independent JPEG Group's JPEG software
-
-
-Version 6b  27-Mar-1998
------------------------
-
-jpegtran has new features for lossless image transformations (rotation
-and flipping) as well as "lossless" reduction to grayscale.
-
-jpegtran now copies comments by default; it has a -copy switch to enable
-copying all APPn blocks as well, or to suppress comments.  (Formerly it
-always suppressed comments and APPn blocks.)  jpegtran now also preserves
-JFIF version and resolution information.
-
-New decompressor library feature: COM and APPn markers found in the input
-file can be saved in memory for later use by the application.  (Before,
-you had to code this up yourself with a custom marker processor.)
-
-There is an unused field "void * client_data" now in compress and decompress
-parameter structs; this may be useful in some applications.
-
-JFIF version number information is now saved by the decoder and accepted by
-the encoder.  jpegtran uses this to copy the source file's version number,
-to ensure "jpegtran -copy all" won't create bogus files that contain JFXX
-extensions but claim to be version 1.01.  Applications that generate their
-own JFXX extension markers also (finally) have a supported way to cause the
-encoder to emit JFIF version number 1.02.
-
-djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather
-than as unknown APP0 markers.
-
-In -verbose mode, djpeg and rdjpgcom will try to print the contents of
-APP12 markers as text.  Some digital cameras store useful text information
-in APP12 markers.
-
-Handling of truncated data streams is more robust: blocks beyond the one in
-which the error occurs will be output as uniform gray, or left unchanged
-if decoding a progressive JPEG.  The appearance no longer depends on the
-Huffman tables being used.
-
-Huffman tables are checked for validity much more carefully than before.
-
-To avoid the Unisys LZW patent, djpeg's GIF output capability has been
-changed to produce "uncompressed GIFs", and cjpeg's GIF input capability
-has been removed altogether.  We're not happy about it either, but there
-seems to be no good alternative.
-
-The configure script now supports building libjpeg as a shared library
-on many flavors of Unix (all the ones that GNU libtool knows how to
-build shared libraries for).  Use "./configure --enable-shared" to
-try this out.
-
-New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio.
-Also, a jconfig file and a build script for Metrowerks CodeWarrior
-on Apple Macintosh.  makefile.dj has been updated for DJGPP v2, and there
-are miscellaneous other minor improvements in the makefiles.
-
-jmemmac.c now knows how to create temporary files following Mac System 7
-conventions.
-
-djpeg's -map switch is now able to read raw-format PPM files reliably.
-
-cjpeg -progressive -restart no longer generates any unnecessary DRI markers.
-
-Multiple calls to jpeg_simple_progression for a single JPEG object
-no longer leak memory.
-
-
-Version 6a  7-Feb-96
---------------------
-
-Library initialization sequence modified to detect version mismatches
-and struct field packing mismatches between library and calling application.
-This change requires applications to be recompiled, but does not require
-any application source code change.
-
-All routine declarations changed to the style "GLOBAL(type) name ...",
-that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the
-routine's return type as an argument.  This makes it possible to add
-Microsoft-style linkage keywords to all the routines by changing just
-these macros.  Note that any application code that was using these macros
-will have to be changed.
-
-DCT coefficient quantization tables are now stored in normal array order
-rather than zigzag order.  Application code that calls jpeg_add_quant_table,
-or otherwise manipulates quantization tables directly, will need to be
-changed.  If you need to make such code work with either older or newer
-versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is
-recommended.
-
-djpeg's trace capability now dumps DQT tables in natural order, not zigzag
-order.  This allows the trace output to be made into a "-qtables" file
-more easily.
-
-New system-dependent memory manager module for use on Apple Macintosh.
-
-Fix bug in cjpeg's -smooth option: last one or two scanlines would be
-duplicates of the prior line unless the image height mod 16 was 1 or 2.
-
-Repair minor problems in VMS, BCC, MC6 makefiles.
-
-New configure script based on latest GNU Autoconf.
-
-Correct the list of include files needed by MetroWerks C for ccommand().
-
-Numerous small documentation updates.
-
-
-Version 6  2-Aug-95
--------------------
-
-Progressive JPEG support: library can read and write full progressive JPEG
-files.  A "buffered image" mode supports incremental decoding for on-the-fly
-display of progressive images.  Simply recompiling an existing IJG-v5-based
-decoder with v6 should allow it to read progressive files, though of course
-without any special progressive display.
-
-New "jpegtran" application performs lossless transcoding between different
-JPEG formats; primarily, it can be used to convert baseline to progressive
-JPEG and vice versa.  In support of jpegtran, the library now allows lossless
-reading and writing of JPEG files as DCT coefficient arrays.  This ability
-may be of use in other applications.
-
-Notes for programmers:
-* We changed jpeg_start_decompress() to be able to suspend; this makes all
-decoding modes available to suspending-input applications.  However,
-existing applications that use suspending input will need to be changed
-to check the return value from jpeg_start_decompress().  You don't need to
-do anything if you don't use a suspending data source.
-* We changed the interface to the virtual array routines: access_virt_array
-routines now take a count of the number of rows to access this time.  The
-last parameter to request_virt_array routines is now interpreted as the
-maximum number of rows that may be accessed at once, but not necessarily
-the height of every access.
-
-
-Version 5b  15-Mar-95
----------------------
-
-Correct bugs with grayscale images having v_samp_factor > 1.
-
-jpeg_write_raw_data() now supports output suspension.
-
-Correct bugs in "configure" script for case of compiling in
-a directory other than the one containing the source files.
-
-Repair bug in jquant1.c: sometimes didn't use as many colors as it could.
-
-Borland C makefile and jconfig file work under either MS-DOS or OS/2.
-
-Miscellaneous improvements to documentation.
-
-
-Version 5a  7-Dec-94
---------------------
-
-Changed color conversion roundoff behavior so that grayscale values are
-represented exactly.  (This causes test image files to change.)
-
-Make ordered dither use 16x16 instead of 4x4 pattern for a small quality
-improvement.
-
-New configure script based on latest GNU Autoconf.
-Fix configure script to handle CFLAGS correctly.
-Rename *.auto files to *.cfg, so that configure script still works if
-file names have been truncated for DOS.
-
-Fix bug in rdbmp.c: didn't allow for extra data between header and image.
-
-Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data.
-
-Fix several bugs in rdrle.c.
-
-NEED_SHORT_EXTERNAL_NAMES option was broken.
-
-Revise jerror.h/jerror.c for more flexibility in message table.
-
-Repair oversight in jmemname.c NO_MKTEMP case: file could be there
-but unreadable.
-
-
-Version 5  24-Sep-94
---------------------
-
-Version 5 represents a nearly complete redesign and rewrite of the IJG
-software.  Major user-visible changes include:
-  * Automatic configuration simplifies installation for most Unix systems.
-  * A range of speed vs. image quality tradeoffs are supported.
-    This includes resizing of an image during decompression: scaling down
-    by a factor of 1/2, 1/4, or 1/8 is handled very efficiently.
-  * New programs rdjpgcom and wrjpgcom allow insertion and extraction
-    of text comments in a JPEG file.
-
-The application programmer's interface to the library has changed completely.
-Notable improvements include:
-  * We have eliminated the use of callback routines for handling the
-    uncompressed image data.  The application now sees the library as a
-    set of routines that it calls to read or write image data on a
-    scanline-by-scanline basis.
-  * The application image data is represented in a conventional interleaved-
-    pixel format, rather than as a separate array for each color channel.
-    This can save a copying step in many programs.
-  * The handling of compressed data has been cleaned up: the application can
-    supply routines to source or sink the compressed data.  It is possible to
-    suspend processing on source/sink buffer overrun, although this is not
-    supported in all operating modes.
-  * All static state has been eliminated from the library, so that multiple
-    instances of compression or decompression can be active concurrently.
-  * JPEG abbreviated datastream formats are supported, ie, quantization and
-    Huffman tables can be stored separately from the image data.
-  * And not only that, but the documentation of the library has improved
-    considerably!
-
-
-The last widely used release before the version 5 rewrite was version 4A of
-18-Feb-93.  Change logs before that point have been discarded, since they
-are not of much interest after the rewrite.
diff --git a/tkimg1.3/libjpeg/cjpeg.1 b/tkimg1.3/libjpeg/cjpeg.1
deleted file mode 100644
index d175a96..0000000
--- a/tkimg1.3/libjpeg/cjpeg.1
+++ /dev/null
@@ -1,292 +0,0 @@
-.TH CJPEG 1 "20 March 1998"
-.SH NAME
-cjpeg \- compress an image file to a JPEG file
-.SH SYNOPSIS
-.B cjpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B cjpeg
-compresses the named image file, or the standard input if no file is
-named, and produces a JPEG/JFIF file on the standard output.
-The currently supported input file formats are: PPM (PBMPLUS color
-format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
-Toolkit format).  (RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-quality " N"
-Scale quantization tables to adjust image quality.  Quality is 0 (worst) to
-100 (best); default is 75.  (See below for more info.)
-.TP
-.B \-grayscale
-Create monochrome JPEG file from color input.  Be sure to use this switch when
-compressing a grayscale BMP file, because
-.B cjpeg
-isn't bright enough to notice whether a BMP file uses only shades of gray.
-By saying
-.BR \-grayscale ,
-you'll get a smaller JPEG file that takes less time to process.
-.TP
-.B \-optimize
-Perform optimization of entropy encoding parameters.  Without this, default
-encoding parameters are used.
-.B \-optimize
-usually makes the JPEG file a little smaller, but
-.B cjpeg
-runs somewhat slower and needs much more memory.  Image quality and speed of
-decompression are unaffected by
-.BR \-optimize .
-.TP
-.B \-progressive
-Create progressive JPEG file (see below).
-.TP
-.B \-targa
-Input file is Targa format.  Targa files that contain an "identification"
-field will not be automatically recognized by
-.BR cjpeg ;
-for such files you must specify
-.B \-targa
-to make
-.B cjpeg
-treat the input as Targa format.
-For most Targa files, you won't need this switch.
-.PP
-The
-.B \-quality
-switch lets you trade off compressed file size against quality of the
-reconstructed image: the higher the quality setting, the larger the JPEG file,
-and the closer the output image will be to the original input.  Normally you
-want to use the lowest quality setting (smallest file) that decompresses into
-something visually indistinguishable from the original image.  For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right.  If you see defects at
-.B \-quality
-75, then go up 5 or 10 counts at a time until you are happy with the output
-image.  (The optimal setting will vary from one image to another.)
-.PP
-.B \-quality
-100 will generate a quantization table of all 1's, minimizing loss in the
-quantization step (but there is still information loss in subsampling, as well
-as roundoff error).  This setting is mainly of interest for experimental
-purposes.  Quality values above about 95 are
-.B not
-recommended for normal use; the compressed file size goes up dramatically for
-hardly any gain in output image quality.
-.PP
-In the other direction, quality values below 50 will produce very small files
-of low image quality.  Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example.  Try
-.B \-quality
-2 (or so) for some amusing Cubist effects.  (Note: quality
-values below about 25 generate 2-byte quantization tables, which are
-considered optional in the JPEG standard.
-.B cjpeg
-emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file.  Use
-.B \-baseline
-if you need to ensure compatibility at low quality values.)
-.PP
-The
-.B \-progressive
-switch creates a "progressive JPEG" file.  In this type of JPEG file, the data
-is stored in multiple scans of increasing quality.  If the file is being
-transmitted over a slow communications link, the decoder can use the first
-scan to display a low-quality image very quickly, and can then improve the
-display with each subsequent scan.  The final image is exactly equivalent to a
-standard JPEG file of the same quality setting, and the total file size is
-about the same --- often a little smaller.
-.B Caution:
-progressive JPEG is not yet widely implemented, so many decoders will be
-unable to view a progressive JPEG file at all.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware.  Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.BI \-restart " N"
-Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
-attached to the number.
-.B \-restart 0
-(the default) means no restart markers.
-.TP
-.BI \-smooth " N"
-Smooth the input image to eliminate dithering noise.  N, ranging from 1 to
-100, indicates the strength of smoothing.  0 (the default) means no smoothing.
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images.  Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number.  For example,
-.B \-max 4m
-selects 4000000 bytes.  If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout.  More
-.BR \-v 's
-give more output.  Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.PP
-The
-.B \-restart
-option inserts extra markers that allow a JPEG decoder to resynchronize after
-a transmission error.  Without restart markers, any damage to a compressed
-file will usually ruin the image from the point of the error to the end of the
-image; with restart markers, the damage is usually confined to the portion of
-the image up to the next restart marker.  Of course, the restart markers
-occupy extra space.  We recommend
-.B \-restart 1
-for images that will be transmitted across unreliable networks such as Usenet.
-.PP
-The
-.B \-smooth
-option filters the input to eliminate fine-scale noise.  This is often useful
-when converting dithered images to JPEG: a moderate smoothing factor of 10 to
-50 gets rid of dithering patterns in the input file, resulting in a smaller
-JPEG file and a better-looking image.  Too large a smoothing factor will
-visibly blur the image, however.
-.PP
-Switches for wizards:
-.TP
-.B \-baseline
-Force baseline-compatible quantization tables to be generated.  This clamps
-quantization values to 8 bits even at low quality settings.  (This switch is
-poorly named, since it does not ensure that the output is actually baseline
-JPEG.  For example, you can use
-.B \-baseline
-and
-.B \-progressive
-together.)
-.TP
-.BI \-qtables " file"
-Use the quantization tables given in the specified text file.
-.TP
-.BI \-qslots " N[,...]"
-Select which quantization table to use for each color component.
-.TP
-.BI \-sample " HxV[,...]"
-Set JPEG sampling factors for each color component.
-.TP
-.BI \-scans " file"
-Use the scan script given in the specified text file.
-.PP
-The "wizard" switches are intended for experimentation with JPEG.  If you
-don't know what you are doing, \fBdon't use them\fR.  These switches are
-documented further in the file wizard.doc.
-.SH EXAMPLES
-.LP
-This example compresses the PPM file foo.ppm with a quality factor of
-60 and saves the output as foo.jpg:
-.IP
-.B cjpeg \-quality
-.I 60 foo.ppm
-.B >
-.I foo.jpg
-.SH HINTS
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images.  In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors.  GIF works great on these, JPEG does not.  If you want to convert a
-GIF to JPEG, you should experiment with
-.BR cjpeg 's
-.B \-quality
-and
-.B \-smooth
-options to get a satisfactory conversion.
-.B \-smooth 10
-or so is often helpful.
-.PP
-Avoid running an image through a series of JPEG compression/decompression
-cycles.  Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle.  It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-.PP
-The
-.B \-optimize
-option to
-.B cjpeg
-is worth using when you are making a "final" version for posting or archiving.
-It's also a win when you are using low quality settings to make very small
-JPEG files; the percentage improvement is often a lot more than it is on
-larger files.  (At present,
-.B \-optimize
-mode is always selected when generating progressive JPEG files.)
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-Use a Unisys-licensed program if you need to read a GIF file.  (Conversion
-of GIF files to JPEG is usually a bad idea anyway.)
-.PP
-Not all variants of BMP and Targa file formats are supported.
-.PP
-The
-.B \-targa
-switch is not a bug, it's a feature.  (It would be a bug if the Targa format
-designers had not been clueless.)
-.PP
-Still not as fast as we'd like.
diff --git a/tkimg1.3/libjpeg/cjpeg.c b/tkimg1.3/libjpeg/cjpeg.c
deleted file mode 100644
index f2a929f..0000000
--- a/tkimg1.3/libjpeg/cjpeg.c
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * cjpeg.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a command-line user interface for the JPEG compressor.
- * It should work on any system with Unix- or MS-DOS-style command lines.
- *
- * Two different command line styles are permitted, depending on the
- * compile-time switch TWO_FILE_COMMANDLINE:
- *	cjpeg [options]  inputfile outputfile
- *	cjpeg [options]  [inputfile]
- * In the second style, output is always to standard output, which you'd
- * normally redirect to a file or pipe to some other program.  Input is
- * either from a named file or from standard input (typically redirected).
- * The second style is convenient on Unix but is unhelpful on systems that
- * don't support pipes.  Also, you MUST use the first style if your system
- * doesn't do binary I/O to stdin/stdout.
- * To simplify script writing, the "-outfile" switch is provided.  The syntax
- *	cjpeg [options]  -outfile outputfile  inputfile
- * works regardless of which command line style is used.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-#include "jversion.h"		/* for version message */
-
-#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h>              /* Metrowerks needs this */
-#include <console.h>		/* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h>		/* Think declares it here */
-#endif
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string)	string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
-  NULL
-};
-
-
-/*
- * This routine determines what format the input file is,
- * and selects the appropriate input-reading module.
- *
- * To determine which family of input formats the file belongs to,
- * we may look only at the first byte of the file, since C does not
- * guarantee that more than one character can be pushed back with ungetc.
- * Looking at additional bytes would require one of these approaches:
- *     1) assume we can fseek() the input file (fails for piped input);
- *     2) assume we can push back more than one character (works in
- *        some C implementations, but unportable);
- *     3) provide our own buffering (breaks input readers that want to use
- *        stdio directly, such as the RLE library);
- * or  4) don't put back the data, and modify the input_init methods to assume
- *        they start reading after the start of file (also breaks RLE library).
- * #1 is attractive for MS-DOS but is untenable on Unix.
- *
- * The most portable solution for file types that can't be identified by their
- * first byte is to make the user tell us what they are.  This is also the
- * only approach for "raw" file types that contain only arbitrary values.
- * We presently apply this method for Targa files.  Most of the time Targa
- * files start with 0x00, so we recognize that case.  Potentially, however,
- * a Targa file could start with any byte value (byte 0 is the length of the
- * seldom-used ID field), so we provide a switch to force Targa input mode.
- */
-
-static boolean is_targa;	/* records user -targa switch */
-
-
-LOCAL(cjpeg_source_ptr)
-select_file_type (j_compress_ptr cinfo, FILE * infile)
-{
-  int c;
-
-  if (is_targa) {
-#ifdef TARGA_SUPPORTED
-    return jinit_read_targa(cinfo);
-#else
-    ERREXIT(cinfo, JERR_TGA_NOTCOMP);
-#endif
-  }
-
-  if ((c = getc(infile)) == EOF)
-    ERREXIT(cinfo, JERR_INPUT_EMPTY);
-  if (ungetc(c, infile) == EOF)
-    ERREXIT(cinfo, JERR_UNGETC_FAILED);
-
-  switch (c) {
-#ifdef BMP_SUPPORTED
-  case 'B':
-    return jinit_read_bmp(cinfo);
-#endif
-#ifdef GIF_SUPPORTED
-  case 'G':
-    return jinit_read_gif(cinfo);
-#endif
-#ifdef PPM_SUPPORTED
-  case 'P':
-    return jinit_read_ppm(cinfo);
-#endif
-#ifdef RLE_SUPPORTED
-  case 'R':
-    return jinit_read_rle(cinfo);
-#endif
-#ifdef TARGA_SUPPORTED
-  case 0x00:
-    return jinit_read_targa(cinfo);
-#endif
-  default:
-    ERREXIT(cinfo, JERR_UNKNOWN_FORMAT);
-    break;
-  }
-
-  return NULL;			/* suppress compiler warnings */
-}
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname;	/* program name for error messages */
-static char * outfilename;	/* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
-  fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
-  fprintf(stderr, "inputfile outputfile\n");
-#else
-  fprintf(stderr, "[inputfile]\n");
-#endif
-
-  fprintf(stderr, "Switches (names may be abbreviated):\n");
-  fprintf(stderr, "  -quality N     Compression quality (0..100; 5-95 is useful range)\n");
-  fprintf(stderr, "  -grayscale     Create monochrome JPEG file\n");
-#ifdef ENTROPY_OPT_SUPPORTED
-  fprintf(stderr, "  -optimize      Optimize Huffman table (smaller file, but slow compression)\n");
-#endif
-#ifdef C_PROGRESSIVE_SUPPORTED
-  fprintf(stderr, "  -progressive   Create progressive JPEG file\n");
-#endif
-#ifdef TARGA_SUPPORTED
-  fprintf(stderr, "  -targa         Input file is Targa format (usually not needed)\n");
-#endif
-  fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
-  fprintf(stderr, "  -dct int       Use integer DCT method%s\n",
-	  (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-  fprintf(stderr, "  -dct fast      Use fast integer DCT (less accurate)%s\n",
-	  (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-  fprintf(stderr, "  -dct float     Use floating-point DCT method%s\n",
-	  (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
-  fprintf(stderr, "  -restart N     Set restart interval in rows, or in blocks with B\n");
-#ifdef INPUT_SMOOTHING_SUPPORTED
-  fprintf(stderr, "  -smooth N      Smooth dithered input (N=1..100 is strength)\n");
-#endif
-  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
-  fprintf(stderr, "  -outfile name  Specify name for output file\n");
-  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
-  fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
-  fprintf(stderr, "  -arithmetic    Use arithmetic coding\n");
-#endif
-  fprintf(stderr, "  -baseline      Force baseline quantization tables\n");
-  fprintf(stderr, "  -qtables file  Use quantization tables given in file\n");
-  fprintf(stderr, "  -qslots N[,...]    Set component quantization tables\n");
-  fprintf(stderr, "  -sample HxV[,...]  Set component sampling factors\n");
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-  fprintf(stderr, "  -scans file    Create multi-scan JPEG per script file\n");
-#endif
-  exit(EXIT_FAILURE);
-}
-
-
-LOCAL(int)
-parse_switches (j_compress_ptr cinfo, int argc, char **argv,
-		int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
-  int argn;
-  char * arg;
-  int quality;			/* -quality parameter */
-  int q_scale_factor;		/* scaling percentage for -qtables */
-  boolean force_baseline;
-  boolean simple_progressive;
-  char * qtablefile = NULL;	/* saves -qtables filename if any */
-  char * qslotsarg = NULL;	/* saves -qslots parm if any */
-  char * samplearg = NULL;	/* saves -sample parm if any */
-  char * scansarg = NULL;	/* saves -scans parm if any */
-
-  /* Set up default JPEG parameters. */
-  /* Note that default -quality level need not, and does not,
-   * match the default scaling for an explicit -qtables argument.
-   */
-  quality = 75;			/* default -quality value */
-  q_scale_factor = 100;		/* default to no scaling for -qtables */
-  force_baseline = FALSE;	/* by default, allow 16-bit quantizers */
-  simple_progressive = FALSE;
-  is_targa = FALSE;
-  outfilename = NULL;
-  cinfo->err->trace_level = 0;
-
-  /* Scan command line options, adjust parameters */
-
-  for (argn = 1; argn < argc; argn++) {
-    arg = argv[argn];
-    if (*arg != '-') {
-      /* Not a switch, must be a file name argument */
-      if (argn <= last_file_arg_seen) {
-	outfilename = NULL;	/* -outfile applies to just one input file */
-	continue;		/* ignore this name if previously processed */
-      }
-      break;			/* else done parsing switches */
-    }
-    arg++;			/* advance past switch marker character */
-
-    if (keymatch(arg, "arithmetic", 1)) {
-      /* Use arithmetic coding. */
-#ifdef C_ARITH_CODING_SUPPORTED
-      cinfo->arith_code = TRUE;
-#else
-      fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "baseline", 1)) {
-      /* Force baseline-compatible output (8-bit quantizer values). */
-      force_baseline = TRUE;
-
-    } else if (keymatch(arg, "dct", 2)) {
-      /* Select DCT algorithm. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "int", 1)) {
-	cinfo->dct_method = JDCT_ISLOW;
-      } else if (keymatch(argv[argn], "fast", 2)) {
-	cinfo->dct_method = JDCT_IFAST;
-      } else if (keymatch(argv[argn], "float", 2)) {
-	cinfo->dct_method = JDCT_FLOAT;
-      } else
-	usage();
-
-    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
-      /* Enable debug printouts. */
-      /* On first -d, print version identification */
-      static boolean printed_version = FALSE;
-
-      if (! printed_version) {
-	fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
-		JVERSION, JCOPYRIGHT);
-	printed_version = TRUE;
-      }
-      cinfo->err->trace_level++;
-
-    } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
-      /* Force a monochrome JPEG file to be generated. */
-      jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
-
-    } else if (keymatch(arg, "maxmemory", 3)) {
-      /* Maximum memory in Kb (or Mb with 'm'). */
-      long lval;
-      char ch = 'x';
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
-	usage();
-      if (ch == 'm' || ch == 'M')
-	lval *= 1000L;
-      cinfo->mem->max_memory_to_use = lval * 1000L;
-
-    } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
-      /* Enable entropy parm optimization. */
-#ifdef ENTROPY_OPT_SUPPORTED
-      cinfo->optimize_coding = TRUE;
-#else
-      fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "outfile", 4)) {
-      /* Set output file name. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      outfilename = argv[argn];	/* save it away for later use */
-
-    } else if (keymatch(arg, "progressive", 1)) {
-      /* Select simple progressive mode. */
-#ifdef C_PROGRESSIVE_SUPPORTED
-      simple_progressive = TRUE;
-      /* We must postpone execution until num_components is known. */
-#else
-      fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "quality", 1)) {
-      /* Quality factor (quantization table scaling factor). */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%d", &quality) != 1)
-	usage();
-      /* Change scale factor in case -qtables is present. */
-      q_scale_factor = jpeg_quality_scaling(quality);
-
-    } else if (keymatch(arg, "qslots", 2)) {
-      /* Quantization table slot numbers. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      qslotsarg = argv[argn];
-      /* Must delay setting qslots until after we have processed any
-       * colorspace-determining switches, since jpeg_set_colorspace sets
-       * default quant table numbers.
-       */
-
-    } else if (keymatch(arg, "qtables", 2)) {
-      /* Quantization tables fetched from file. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      qtablefile = argv[argn];
-      /* We postpone actually reading the file in case -quality comes later. */
-
-    } else if (keymatch(arg, "restart", 1)) {
-      /* Restart interval in MCU rows (or in MCUs with 'b'). */
-      long lval;
-      char ch = 'x';
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
-	usage();
-      if (lval < 0 || lval > 65535L)
-	usage();
-      if (ch == 'b' || ch == 'B') {
-	cinfo->restart_interval = (unsigned int) lval;
-	cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
-      } else {
-	cinfo->restart_in_rows = (int) lval;
-	/* restart_interval will be computed during startup */
-      }
-
-    } else if (keymatch(arg, "sample", 2)) {
-      /* Set sampling factors. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      samplearg = argv[argn];
-      /* Must delay setting sample factors until after we have processed any
-       * colorspace-determining switches, since jpeg_set_colorspace sets
-       * default sampling factors.
-       */
-
-    } else if (keymatch(arg, "scans", 2)) {
-      /* Set scan script. */
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      scansarg = argv[argn];
-      /* We must postpone reading the file in case -progressive appears. */
-#else
-      fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "smooth", 2)) {
-      /* Set input smoothing factor. */
-      int val;
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%d", &val) != 1)
-	usage();
-      if (val < 0 || val > 100)
-	usage();
-      cinfo->smoothing_factor = val;
-
-    } else if (keymatch(arg, "targa", 1)) {
-      /* Input file is Targa format. */
-      is_targa = TRUE;
-
-    } else {
-      usage();			/* bogus switch */
-    }
-  }
-
-  /* Post-switch-scanning cleanup */
-
-  if (for_real) {
-
-    /* Set quantization tables for selected quality. */
-    /* Some or all may be overridden if -qtables is present. */
-    jpeg_set_quality(cinfo, quality, force_baseline);
-
-    if (qtablefile != NULL)	/* process -qtables if it was present */
-      if (! read_quant_tables(cinfo, qtablefile,
-			      q_scale_factor, force_baseline))
-	usage();
-
-    if (qslotsarg != NULL)	/* process -qslots if it was present */
-      if (! set_quant_slots(cinfo, qslotsarg))
-	usage();
-
-    if (samplearg != NULL)	/* process -sample if it was present */
-      if (! set_sample_factors(cinfo, samplearg))
-	usage();
-
-#ifdef C_PROGRESSIVE_SUPPORTED
-    if (simple_progressive)	/* process -progressive; -scans can override */
-      jpeg_simple_progression(cinfo);
-#endif
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-    if (scansarg != NULL)	/* process -scans if it was present */
-      if (! read_scan_script(cinfo, scansarg))
-	usage();
-#endif
-  }
-
-  return argn;			/* return index of next arg (file name) */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
-  struct jpeg_compress_struct cinfo;
-  struct jpeg_error_mgr jerr;
-#ifdef PROGRESS_REPORT
-  struct cdjpeg_progress_mgr progress;
-#endif
-  int file_index;
-  cjpeg_source_ptr src_mgr;
-  FILE * input_file;
-  FILE * output_file;
-  JDIMENSION num_scanlines;
-
-  /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
-  argc = ccommand(&argv);
-#endif
-
-  progname = argv[0];
-  if (progname == NULL || progname[0] == 0)
-    progname = "cjpeg";		/* in case C library doesn't provide it */
-
-  /* Initialize the JPEG compression object with default error handling. */
-  cinfo.err = jpeg_std_error(&jerr);
-  jpeg_create_compress(&cinfo);
-  /* Add some application-specific error messages (from cderror.h) */
-  jerr.addon_message_table = cdjpeg_message_table;
-  jerr.first_addon_message = JMSG_FIRSTADDONCODE;
-  jerr.last_addon_message = JMSG_LASTADDONCODE;
-
-  /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
-  enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
-  /* Initialize JPEG parameters.
-   * Much of this may be overridden later.
-   * In particular, we don't yet know the input file's color space,
-   * but we need to provide some value for jpeg_set_defaults() to work.
-   */
-
-  cinfo.in_color_space = JCS_RGB; /* arbitrary guess */
-  jpeg_set_defaults(&cinfo);
-
-  /* Scan command line to find file names.
-   * It is convenient to use just one switch-parsing routine, but the switch
-   * values read here are ignored; we will rescan the switches after opening
-   * the input file.
-   */
-
-  file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
-
-#ifdef TWO_FILE_COMMANDLINE
-  /* Must have either -outfile switch or explicit output file name */
-  if (outfilename == NULL) {
-    if (file_index != argc-2) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-    outfilename = argv[file_index+1];
-  } else {
-    if (file_index != argc-1) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-  }
-#else
-  /* Unix style: expect zero or one file name */
-  if (file_index < argc-1) {
-    fprintf(stderr, "%s: only one input file\n", progname);
-    usage();
-  }
-#endif /* TWO_FILE_COMMANDLINE */
-
-  /* Open the input file. */
-  if (file_index < argc) {
-    if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default input file is stdin */
-    input_file = read_stdin();
-  }
-
-  /* Open the output file. */
-  if (outfilename != NULL) {
-    if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default output file is stdout */
-    output_file = write_stdout();
-  }
-
-#ifdef PROGRESS_REPORT
-  start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
-  /* Figure out the input file format, and set up to read it. */
-  src_mgr = select_file_type(&cinfo, input_file);
-  src_mgr->input_file = input_file;
-
-  /* Read the input file header to obtain file size & colorspace. */
-  (*src_mgr->start_input) (&cinfo, src_mgr);
-
-  /* Now that we know input colorspace, fix colorspace-dependent defaults */
-  jpeg_default_colorspace(&cinfo);
-
-  /* Adjust default compression parameters by re-parsing the options */
-  file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
-
-  /* Specify data destination for compression */
-  jpeg_stdio_dest(&cinfo, output_file);
-
-  /* Start compressor */
-  jpeg_start_compress(&cinfo, TRUE);
-
-  /* Process data */
-  while (cinfo.next_scanline < cinfo.image_height) {
-    num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr);
-    (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
-  }
-
-  /* Finish compression and release memory */
-  (*src_mgr->finish_input) (&cinfo, src_mgr);
-  jpeg_finish_compress(&cinfo);
-  jpeg_destroy_compress(&cinfo);
-
-  /* Close files, if we opened them */
-  if (input_file != stdin)
-    fclose(input_file);
-  if (output_file != stdout)
-    fclose(output_file);
-
-#ifdef PROGRESS_REPORT
-  end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
-  /* All done. */
-  exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
-  return 0;			/* suppress no-return-value warnings */
-}
diff --git a/tkimg1.3/libjpeg/ckconfig.c b/tkimg1.3/libjpeg/ckconfig.c
deleted file mode 100644
index 34baf79..0000000
--- a/tkimg1.3/libjpeg/ckconfig.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * ckconfig.c
- *
- * Copyright (C) 1991-1994, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- */
-
-/*
- * This program is intended to help you determine how to configure the JPEG
- * software for installation on a particular system.  The idea is to try to
- * compile and execute this program.  If your compiler fails to compile the
- * program, make changes as indicated in the comments below.  Once you can
- * compile the program, run it, and it will produce a "jconfig.h" file for
- * your system.
- *
- * As a general rule, each time you try to compile this program,
- * pay attention only to the *first* error message you get from the compiler.
- * Many C compilers will issue lots of spurious error messages once they
- * have gotten confused.  Go to the line indicated in the first error message,
- * and read the comments preceding that line to see what to change.
- *
- * Almost all of the edits you may need to make to this program consist of
- * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
- * or vice versa.  This is called defining or undefining that symbol.
- */
-
-
-/* First we must see if your system has the include files we need.
- * We start out with the assumption that your system has all the ANSI-standard
- * include files.  If you get any error trying to include one of these files,
- * undefine the corresponding HAVE_xxx symbol.
- */
-
-#define HAVE_STDDEF_H		/* replace 'define' by 'undef' if error here */
-#ifdef HAVE_STDDEF_H		/* next line will be skipped if you undef... */
-#include <stddef.h>
-#endif
-
-#define HAVE_STDLIB_H		/* same thing for stdlib.h */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include <stdio.h>		/* If you ain't got this, you ain't got C. */
-
-/* We have to see if your string functions are defined by
- * strings.h (old BSD convention) or string.h (everybody else).
- * We try the non-BSD convention first; define NEED_BSD_STRINGS
- * if the compiler says it can't find string.h.
- */
-
-#undef NEED_BSD_STRINGS
-
-#ifdef NEED_BSD_STRINGS
-#include <strings.h>
-#else
-#include <string.h>
-#endif
-
-/* On some systems (especially older Unix machines), type size_t is
- * defined only in the include file <sys/types.h>.  If you get a failure
- * on the size_t test below, try defining NEED_SYS_TYPES_H.
- */
-
-#undef NEED_SYS_TYPES_H		/* start by assuming we don't need it */
-#ifdef NEED_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-
-/* Usually type size_t is defined in one of the include files we've included
- * above.  If not, you'll get an error on the "typedef size_t my_size_t;" line.
- * In that case, first try defining NEED_SYS_TYPES_H just above.
- * If that doesn't work, you'll have to search through your system library
- * to figure out which include file defines "size_t".  Look for a line that
- * says "typedef something-or-other size_t;".  Then, change the line below
- * that says "#include <someincludefile.h>" to instead include the file
- * you found size_t in, and define NEED_SPECIAL_INCLUDE.  If you can't find
- * type size_t anywhere, try replacing "#include <someincludefile.h>" with
- * "typedef unsigned int size_t;".
- */
-
-#undef NEED_SPECIAL_INCLUDE	/* assume we DON'T need it, for starters */
-
-#ifdef NEED_SPECIAL_INCLUDE
-#include <someincludefile.h>
-#endif
-
-typedef size_t my_size_t;	/* The payoff: do we have size_t now? */
-
-
-/* The next question is whether your compiler supports ANSI-style function
- * prototypes.  You need to know this in order to choose between using
- * makefile.ansi and using makefile.unix.
- * The #define line below is set to assume you have ANSI function prototypes.
- * If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
- */
-
-#define HAVE_PROTOTYPES
-
-#ifdef HAVE_PROTOTYPES
-int testfunction (int arg1, int * arg2); /* check prototypes */
-
-struct methods_struct {		/* check method-pointer declarations */
-  int (*error_exit) (char *msgtext);
-  int (*trace_message) (char *msgtext);
-  int (*another_method) (void);
-};
-
-int testfunction (int arg1, int * arg2) /* check definitions */
-{
-  return arg2[arg1];
-}
-
-int test2function (void)	/* check void arg list */
-{
-  return 0;
-}
-#endif
-
-
-/* Now we want to find out if your compiler knows what "unsigned char" means.
- * If you get an error on the "unsigned char un_char;" line,
- * then undefine HAVE_UNSIGNED_CHAR.
- */
-
-#define HAVE_UNSIGNED_CHAR
-
-#ifdef HAVE_UNSIGNED_CHAR
-unsigned char un_char;
-#endif
-
-
-/* Now we want to find out if your compiler knows what "unsigned short" means.
- * If you get an error on the "unsigned short un_short;" line,
- * then undefine HAVE_UNSIGNED_SHORT.
- */
-
-#define HAVE_UNSIGNED_SHORT
-
-#ifdef HAVE_UNSIGNED_SHORT
-unsigned short un_short;
-#endif
-
-
-/* Now we want to find out if your compiler understands type "void".
- * If you get an error anywhere in here, undefine HAVE_VOID.
- */
-
-#define HAVE_VOID
-
-#ifdef HAVE_VOID
-/* Caution: a C++ compiler will insist on complete prototypes */
-typedef void * void_ptr;	/* check void * */
-#ifdef HAVE_PROTOTYPES		/* check ptr to function returning void */
-typedef void (*void_func) (int a, int b);
-#else
-typedef void (*void_func) ();
-#endif
-
-#ifdef HAVE_PROTOTYPES		/* check void function result */
-void test3function (void_ptr arg1, void_func arg2)
-#else
-void test3function (arg1, arg2)
-     void_ptr arg1;
-     void_func arg2;
-#endif
-{
-  char * locptr = (char *) arg1; /* check casting to and from void * */
-  arg1 = (void *) locptr;
-  (*arg2) (1, 2);		/* check call of fcn returning void */
-}
-#endif
-
-
-/* Now we want to find out if your compiler knows what "const" means.
- * If you get an error here, undefine HAVE_CONST.
- */
-
-#define HAVE_CONST
-
-#ifdef HAVE_CONST
-static const int carray[3] = {1, 2, 3};
-
-#ifdef HAVE_PROTOTYPES
-int test4function (const int arg1)
-#else
-int test4function (arg1)
-     const int arg1;
-#endif
-{
-  return carray[arg1];
-}
-#endif
-
-
-/* If you get an error or warning about this structure definition,
- * define INCOMPLETE_TYPES_BROKEN.
- */
-
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifndef INCOMPLETE_TYPES_BROKEN
-typedef struct undefined_structure * undef_struct_ptr;
-#endif
-
-
-/* If you get an error about duplicate names,
- * define NEED_SHORT_EXTERNAL_NAMES.
- */
-
-#undef NEED_SHORT_EXTERNAL_NAMES
-
-#ifndef NEED_SHORT_EXTERNAL_NAMES
-
-int possibly_duplicate_function ()
-{
-  return 0;
-}
-
-int possibly_dupli_function ()
-{
-  return 1;
-}
-
-#endif
-
-
-
-/************************************************************************
- *  OK, that's it.  You should not have to change anything beyond this
- *  point in order to compile and execute this program.  (You might get
- *  some warnings, but you can ignore them.)
- *  When you run the program, it will make a couple more tests that it
- *  can do automatically, and then it will create jconfig.h and print out
- *  any additional suggestions it has.
- ************************************************************************
- */
-
-
-#ifdef HAVE_PROTOTYPES
-int is_char_signed (int arg)
-#else
-int is_char_signed (arg)
-     int arg;
-#endif
-{
-  if (arg == 189) {		/* expected result for unsigned char */
-    return 0;			/* type char is unsigned */
-  }
-  else if (arg != -67) {	/* expected result for signed char */
-    printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
-    printf("I fear the JPEG software will not work at all.\n\n");
-  }
-  return 1;			/* assume char is signed otherwise */
-}
-
-
-#ifdef HAVE_PROTOTYPES
-int is_shifting_signed (long arg)
-#else
-int is_shifting_signed (arg)
-     long arg;
-#endif
-/* See whether right-shift on a long is signed or not. */
-{
-  long res = arg >> 4;
-
-  if (res == -0x7F7E80CL) {	/* expected result for signed shift */
-    return 1;			/* right shift is signed */
-  }
-  /* see if unsigned-shift hack will fix it. */
-  /* we can't just test exact value since it depends on width of long... */
-  res |= (~0L) << (32-4);
-  if (res == -0x7F7E80CL) {	/* expected result now? */
-    return 0;			/* right shift is unsigned */
-  }
-  printf("Right shift isn't acting as I expect it to.\n");
-  printf("I fear the JPEG software will not work at all.\n\n");
-  return 0;			/* try it with unsigned anyway */
-}
-
-
-#ifdef HAVE_PROTOTYPES
-int main (int argc, char ** argv)
-#else
-int main (argc, argv)
-     int argc;
-     char ** argv;
-#endif
-{
-  char signed_char_check = (char) (-67);
-  FILE *outfile;
-
-  /* Attempt to write jconfig.h */
-  if ((outfile = fopen("jconfig.h", "w")) == NULL) {
-    printf("Failed to write jconfig.h\n");
-    return 1;
-  }
-
-  /* Write out all the info */
-  fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
-  fprintf(outfile, "/* see jconfig.doc for explanations */\n\n");
-#ifdef HAVE_PROTOTYPES
-  fprintf(outfile, "#define HAVE_PROTOTYPES\n");
-#else
-  fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
-#endif
-#ifdef HAVE_UNSIGNED_CHAR
-  fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
-#else
-  fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
-#endif
-#ifdef HAVE_UNSIGNED_SHORT
-  fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
-#else
-  fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
-#endif
-#ifdef HAVE_VOID
-  fprintf(outfile, "/* #define void char */\n");
-#else
-  fprintf(outfile, "#define void char\n");
-#endif
-#ifdef HAVE_CONST
-  fprintf(outfile, "/* #define const */\n");
-#else
-  fprintf(outfile, "#define const\n");
-#endif
-  if (is_char_signed((int) signed_char_check))
-    fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
-  else
-    fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
-#ifdef HAVE_STDDEF_H
-  fprintf(outfile, "#define HAVE_STDDEF_H\n");
-#else
-  fprintf(outfile, "#undef HAVE_STDDEF_H\n");
-#endif
-#ifdef HAVE_STDLIB_H
-  fprintf(outfile, "#define HAVE_STDLIB_H\n");
-#else
-  fprintf(outfile, "#undef HAVE_STDLIB_H\n");
-#endif
-#ifdef NEED_BSD_STRINGS
-  fprintf(outfile, "#define NEED_BSD_STRINGS\n");
-#else
-  fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
-#endif
-#ifdef NEED_SYS_TYPES_H
-  fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
-#else
-  fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
-#endif
-  fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-  fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
-#else
-  fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
-#endif
-#ifdef INCOMPLETE_TYPES_BROKEN
-  fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
-#else
-  fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
-#endif
-  fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
-  if (is_shifting_signed(-0x7F7E80B1L))
-    fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
-  else
-    fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
-  fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
-  fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
-  fprintf(outfile, "#define BMP_SUPPORTED		/* BMP image file format */\n");
-  fprintf(outfile, "#define GIF_SUPPORTED		/* GIF image file format */\n");
-  fprintf(outfile, "#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */\n");
-  fprintf(outfile, "#undef RLE_SUPPORTED		/* Utah RLE image file format */\n");
-  fprintf(outfile, "#define TARGA_SUPPORTED		/* Targa image file format */\n\n");
-  fprintf(outfile, "#undef TWO_FILE_COMMANDLINE	/* You may need this on non-Unix systems */\n");
-  fprintf(outfile, "#undef NEED_SIGNAL_CATCHER	/* Define this if you use jmemname.c */\n");
-  fprintf(outfile, "#undef DONT_USE_B_MODE\n");
-  fprintf(outfile, "/* #define PROGRESS_REPORT */	/* optional */\n");
-  fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
-
-  /* Close the jconfig.h file */
-  fclose(outfile);
-
-  /* User report */
-  printf("Configuration check for Independent JPEG Group's software done.\n");
-  printf("\nI have written the jconfig.h file for you.\n\n");
-#ifdef HAVE_PROTOTYPES
-  printf("You should use makefile.ansi as the starting point for your Makefile.\n");
-#else
-  printf("You should use makefile.unix as the starting point for your Makefile.\n");
-#endif
-
-#ifdef NEED_SPECIAL_INCLUDE
-  printf("\nYou'll need to change jconfig.h to include the system include file\n");
-  printf("that you found type size_t in, or add a direct definition of type\n");
-  printf("size_t if that's what you used.  Just add it to the end.\n");
-#endif
-
-  return 0;
-}
diff --git a/tkimg1.3/libjpeg/coderules.doc b/tkimg1.3/libjpeg/coderules.doc
deleted file mode 100644
index 0ab5d9b..0000000
--- a/tkimg1.3/libjpeg/coderules.doc
+++ /dev/null
@@ -1,118 +0,0 @@
-IJG JPEG LIBRARY:  CODING RULES
-
-Copyright (C) 1991-1996, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Since numerous people will be contributing code and bug fixes, it's important
-to establish a common coding style.  The goal of using similar coding styles
-is much more important than the details of just what that style is.
-
-In general we follow the recommendations of "Recommended C Style and Coding
-Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
-Brader).  This document is available in the IJG FTP archive (see
-jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
-
-Block comments should be laid out thusly:
-
-/*
- *  Block comments in this style.
- */
-
-We indent statements in K&R style, e.g.,
-	if (test) {
-	  then-part;
-	} else {
-	  else-part;
-	}
-with two spaces per indentation level.  (This indentation convention is
-handled automatically by GNU Emacs and many other text editors.)
-
-Multi-word names should be written in lower case with underscores, e.g.,
-multi_word_name (not multiWordName).  Preprocessor symbols and enum constants
-are similar but upper case (MULTI_WORD_NAME).  Names should be unique within
-the first fifteen characters.  (On some older systems, global names must be
-unique within six characters.  We accommodate this without cluttering the
-source code by using macros to substitute shorter names.)
-
-We use function prototypes everywhere; we rely on automatic source code
-transformation to feed prototype-less C compilers.  Transformation is done
-by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
-ansi2knr is not very bright, so it imposes a format requirement on function
-declarations: the function name MUST BEGIN IN COLUMN 1.  Thus all functions
-should be written in the following style:
-
-LOCAL(int *)
-function_name (int a, char *b)
-{
-    code...
-}
-
-Note that each function definition must begin with GLOBAL(type), LOCAL(type),
-or METHODDEF(type).  These macros expand to "static type" or just "type" as
-appropriate.  They provide a readable indication of the routine's usage and
-can readily be changed for special needs.  (For instance, special linkage
-keywords can be inserted for use in Windows DLLs.)
-
-ansi2knr does not transform method declarations (function pointers in
-structs).  We handle these with a macro JMETHOD, defined as
-	#ifdef HAVE_PROTOTYPES
-	#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
-	#else
-	#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
-	#endif
-which is used like this:
-	struct function_pointers {
-	  JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
-	  JMETHOD(void, term_entropy_encoder, (void));
-	};
-Note the set of parentheses surrounding the parameter list.
-
-A similar solution is used for forward and external function declarations
-(see the EXTERN and JPP macros).
-
-If the code is to work on non-ANSI compilers, we cannot rely on a prototype
-declaration to coerce actual parameters into the right types.  Therefore, use
-explicit casts on actual parameters whenever the actual parameter type is not
-identical to the formal parameter.  Beware of implicit conversions to "int".
-
-It seems there are some non-ANSI compilers in which the sizeof() operator
-is defined to return int, yet size_t is defined as long.  Needless to say,
-this is brain-damaged.  Always use the SIZEOF() macro in place of sizeof(),
-so that the result is guaranteed to be of type size_t.
-
-
-The JPEG library is intended to be used within larger programs.  Furthermore,
-we want it to be reentrant so that it can be used by applications that process
-multiple images concurrently.  The following rules support these requirements:
-
-1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
-pass these through the common routines provided.
-
-2. Minimize global namespace pollution.  Functions should be declared static
-wherever possible.  (Note that our method-based calling conventions help this
-a lot: in many modules only the initialization function will ever need to be
-called directly, so only that function need be externally visible.)  All
-global function names should begin with "jpeg_", and should have an
-abbreviated name (unique in the first six characters) substituted by macro
-when NEED_SHORT_EXTERNAL_NAMES is set.
-
-3. Don't use global variables; anything that must be used in another module
-should be in the common data structures.
-
-4. Don't use static variables except for read-only constant tables.  Variables
-that should be private to a module can be placed into private structures (see
-the system architecture document, structure.doc).
-
-5. Source file names should begin with "j" for files that are part of the
-library proper; source files that are not part of the library, such as cjpeg.c
-and djpeg.c, do not begin with "j".  Keep source file names to eight
-characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers.  Keep
-compression and decompression code in separate source files --- some
-applications may want only one half of the library.
-
-Note: these rules (particularly #4) are not followed religiously in the
-modules that are used in cjpeg/djpeg but are not part of the JPEG library
-proper.  Those modules are not really intended to be used in other
-applications.
diff --git a/tkimg1.3/libjpeg/config.guess b/tkimg1.3/libjpeg/config.guess
deleted file mode 100755
index 413ed41..0000000
--- a/tkimg1.3/libjpeg/config.guess
+++ /dev/null
@@ -1,883 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner at cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 8/24/94.)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	cat <<EOF >dummy.s
-	.globl main
-	.ent main
-main:
-	.frame \$30,0,\$26,0
-	.prologue 0
-	.long 0x47e03d80 # implver $0
-	lda \$2,259
-	.long 0x47e20c21 # amask $2,$1
-	srl \$1,8,\$2
-	sll \$2,2,\$2
-	sll \$0,3,\$0
-	addl \$1,\$0,\$0
-	addl \$2,\$0,\$0
-	ret \$31,(\$26),1
-	.end main
-EOF
-	${CC-cc} dummy.s -o dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		./dummy
-		case "$?" in
-			7)
-				UNAME_MACHINE="alpha"
-				;;
-			15)
-				UNAME_MACHINE="alphaev5"
-				;;
-			14)
-				UNAME_MACHINE="alphaev56"
-				;;
-			10)
-				UNAME_MACHINE="alphapca56"
-				;;
-			16)
-				UNAME_MACHINE="alphaev6"
-				;;
-		esac
-	fi
-	rm -f dummy.s dummy
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
-	exit 0 ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-cbm-sysv4
-	exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
-      exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    arm32:NetBSD:*:*)
-	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    SR2?01:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    NILE:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit 0 ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:NetBSD:*:*)
-	echo m68k-atari-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3*:NetBSD:*:*)
-	echo m68k-sun-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:NetBSD:*:*)
-	echo m68k-apple-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    2020:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	sed 's/^	//' << EOF >dummy.c
-	int main (argc, argv) int argc; char **argv; {
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	${CC-cc} dummy.c -o dummy \
-	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
-        fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i?86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=4.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-	    9000/8?? )            HP_ARCH=hppa1.0 ;;
-	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    i?86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit 0 ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE}
-	exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-	exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE}
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
-    F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-	echo m68k-hp-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    i*:CYGWIN*:*)
-	echo i386-pc-cygwin32
-	exit 0 ;;
-    i*:MINGW*:*)
-	echo i386-pc-mingw32
-	exit 0 ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin32
-	exit 0 ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    *:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us.
-	ld_help_string=`ld --help 2>&1`
-	ld_supported_emulations=`echo $ld_help_string \
-			 | sed -ne '/supported emulations:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported emulations: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_emulations" in
-	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
-	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
-	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
-	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
-	  elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
-	esac
-
-	if test "${UNAME_MACHINE}" = "alpha" ; then
-		sed 's/^	//'  <<EOF >dummy.s
-		.globl main
-		.ent main
-	main:
-		.frame \$30,0,\$26,0
-		.prologue 0
-		.long 0x47e03d80 # implver $0
-		lda \$2,259
-		.long 0x47e20c21 # amask $2,$1
-		srl \$1,8,\$2
-		sll \$2,2,\$2
-		sll \$0,3,\$0
-		addl \$1,\$0,\$0
-		addl \$2,\$0,\$0
-		ret \$31,(\$26),1
-		.end main
-EOF
-		LIBC=""
-		${CC-cc} dummy.s -o dummy 2>/dev/null
-		if test "$?" = 0 ; then
-			./dummy
-			case "$?" in
-			7)
-				UNAME_MACHINE="alpha"
-				;;
-			15)
-				UNAME_MACHINE="alphaev5"
-				;;
-			14)
-				UNAME_MACHINE="alphaev56"
-				;;
-			10)
-				UNAME_MACHINE="alphapca56"
-				;;
-			16)
-				UNAME_MACHINE="alphaev6"
-				;;
-			esac	
-
-			objdump --private-headers dummy | \
-			  grep ld.so.1 > /dev/null
-			if test "$?" = 0 ; then
-				LIBC="libc1"
-			fi
-		fi	
-		rm -f dummy.s dummy
-		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
-	elif test "${UNAME_MACHINE}" = "mips" ; then
-	  cat >dummy.c <<EOF
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld)
-	  # or one that does not give us useful --help.
-	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  # If ld does not provide *any* "supported emulations:"
-	  # that means it is gnuoldld.
-	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
-	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
-	  case "${UNAME_MACHINE}" in
-	  i?86)
-	    VENDOR=pc;
-	    ;;
-	  *)
-	    VENDOR=unknown;
-	    ;;
-	  esac
-	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
-#include <features.h>
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i?86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-	fi
-	exit 0 ;;
-    i?86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit 0 ;;
-    pc:*:*:*)
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit 0 ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    i?86:LynxOS:2.*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit 0 ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
-    news*:NEWS-OS:*:6*)
-	echo mips-sony-newsos6
-	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-cat >dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-#echo '(Unable to guess system type)' 1>&2
-
-exit 1
diff --git a/tkimg1.3/libjpeg/config.sub b/tkimg1.3/libjpeg/config.sub
deleted file mode 100755
index 213a6d4..0000000
--- a/tkimg1.3/libjpeg/config.sub
+++ /dev/null
@@ -1,954 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-if [ x$1 = x ]
-then
-	echo Configuration name missing. 1>&2
-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-	echo "or     $0 ALIAS" 1>&2
-	echo where ALIAS is a recognized configuration type. 1>&2
-	exit 1
-fi
-
-# First pass through any local machine types.
-case $1 in
-	*local*)
-		echo $1
-		exit 0
-		;;
-	*)
-	;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  linux-gnu*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple)
-		os=
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-		| arme[lb] | pyramid | mn10200 | mn10300 \
-		| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-		| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
-		| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
-		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
-		| mipstx39 | mipstx39el \
-		| sparc | sparclet | sparclite | sparc64 | v850)
-		basic_machine=$basic_machine-unknown
-		;;
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i[3456]86)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
-	      | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
-	      | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
-	      | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-	      | sparc64-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-*  \
-	      | mipstx39-* | mipstx39el-* \
-	      | f301-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-cbm
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-cbm
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-cbm
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	[ctj]90-cray)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[3456]86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i[3456]86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i[3456]86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i[3456]86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	mipsel*-linux*)
-		basic_machine=mipsel-unknown
-		os=-linux-gnu
-		;;
-	mips*-linux*)
-		basic_machine=mips-unknown
-		os=-linux-gnu
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-        pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5)
-		basic_machine=i586-intel
-		;;
-	pentiumpro | p6)
-		basic_machine=i686-intel
-		;;
-	pentium-* | p5-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	k5)
-		# We don't have specific support for AMD's K5 yet, so just call it a Pentium
-		basic_machine=i586-amd
-		;;
-	nexen)
-		# We don't have specific support for Nexgen yet, so just call it a Pentium
-		basic_machine=i586-nexgen
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=rs6000-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-	        ;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-	        ;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
-        xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	mips)
-		if [ x$os = x-linux-gnu ]; then
-			basic_machine=mips-unknown
-		else
-			basic_machine=mips-mips
-		fi
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sparc)
-		basic_machine=sparc-sun
-		;;
-        cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-ns2 )
-	        os=-nextstep2
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-        *-gould)
-		os=-sysv
-		;;
-        *-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-        *-sgi)
-		os=-irix
-		;;
-        *-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f301-fujitsu)
-		os=-uxpv
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-vxsim* | -vxworks*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
diff --git a/tkimg1.3/libjpeg/configure b/tkimg1.3/libjpeg/configure
deleted file mode 100755
index 8350061..0000000
--- a/tkimg1.3/libjpeg/configure
+++ /dev/null
@@ -1,2016 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --enable-shared         build shared library using GNU libtool"
-ac_help="$ac_help
-  --enable-static         build static library using GNU libtool"
-ac_help="$ac_help
-  --enable-maxmem[=N]     enable use of temp files, set max mem usage to N MB"
-ac_help="$ac_help
-"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *=*)
-    varname=`echo "$ac_option"|sed -e 's/=.*//'`
-    # Reject names that aren't valid shell variable names.
-    if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; }
-    fi
-    val="`echo "$ac_option"|sed 's/[^=]*=//'`"
-    test -n "$verbose" && echo "	setting shell variable $varname to $val"
-    eval "$varname='$val'"
-    eval "export $varname" ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=jcmaster.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:538: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:567: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  ac_prog_rejected=no
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:615: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 625 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:654: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-  test "${CFLAGS+set}" = set || CFLAGS="-O2"
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-O"
-fi
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:681: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 696 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 713 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
-echo "configure:742: checking for function prototypes" >&5
-if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 747 "configure"
-#include "confdefs.h"
-
-int testfunction (int arg1, int * arg2); /* check prototypes */
-struct methods_struct {		/* check method-pointer declarations */
-  int (*error_exit) (char *msgtext);
-  int (*trace_message) (char *msgtext);
-  int (*another_method) (void);
-};
-int testfunction (int arg1, int * arg2) /* check definitions */
-{ return arg2[arg1]; }
-int test2function (void)	/* check void arg list */
-{ return 0; }
-
-int main() {
- 
-; return 0; }
-EOF
-if { (eval echo configure:765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ijg_cv_have_prototypes=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ijg_cv_have_prototypes=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ijg_cv_have_prototypes" 1>&6
-if test $ijg_cv_have_prototypes = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_PROTOTYPES 
-EOF
-
-else
-  echo Your compiler does not seem to know about function prototypes.
-  echo Perhaps it needs a special switch to enable ANSI C mode.
-  echo If so, we recommend running configure like this:
-  echo "   ./configure  CC='cc -switch'"
-  echo where -switch is the proper switch.
-fi
-ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
-echo "configure:792: checking for stddef.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 797 "configure"
-#include "confdefs.h"
-#include <stddef.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_STDDEF_H 
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:828: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 833 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_STDLIB_H 
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:864: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 869 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NEED_BSD_STRINGS 
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:900: checking for size_t" >&5
-cat > conftest.$ac_ext <<EOF
-#line 902 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include <stdio.h>
-#ifdef NEED_BSD_STRINGS
-#include <strings.h>
-#else
-#include <string.h>
-#endif
-typedef size_t my_size_t;
-
-int main() {
- my_size_t foovar; 
-; return 0; }
-EOF
-if { (eval echo configure:923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ijg_size_t_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"
-fi
-rm -f conftest*
-echo "$ac_t""$ijg_size_t_ok" 1>&6
-if test "$ijg_size_t_ok" != yes; then
-ac_safe=`echo "sys/types.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6
-echo "configure:937: checking for sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 942 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define NEED_SYS_TYPES_H 
-EOF
-
-cat > conftest.$ac_ext <<EOF
-#line 968 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "size_t" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ijg_size_t_ok="size_t is in sys/types.h"
-else
-  rm -rf conftest*
-  ijg_size_t_ok=no
-fi
-rm -f conftest*
-
-else
-  echo "$ac_t""no" 1>&6
-ijg_size_t_ok=no
-fi
-
-echo "$ac_t""$ijg_size_t_ok" 1>&6
-if test "$ijg_size_t_ok" = no; then
-  echo Type size_t is not defined in any of the usual places.
-  echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
-fi
-fi
-echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6
-echo "configure:994: checking for type unsigned char" >&5
-cat > conftest.$ac_ext <<EOF
-#line 996 "configure"
-#include "confdefs.h"
-
-int main() {
- unsigned char un_char; 
-; return 0; }
-EOF
-if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-cat >> confdefs.h <<\EOF
-#define HAVE_UNSIGNED_CHAR 
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6
-echo "configure:1018: checking for type unsigned short" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1020 "configure"
-#include "confdefs.h"
-
-int main() {
- unsigned short un_short; 
-; return 0; }
-EOF
-if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-cat >> confdefs.h <<\EOF
-#define HAVE_UNSIGNED_SHORT 
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-echo $ac_n "checking for type void""... $ac_c" 1>&6
-echo "configure:1042: checking for type void" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1044 "configure"
-#include "confdefs.h"
-
-/* Caution: a C++ compiler will insist on valid prototypes */
-typedef void * void_ptr;	/* check void * */
-#ifdef HAVE_PROTOTYPES		/* check ptr to function returning void */
-typedef void (*void_func) (int a, int b);
-#else
-typedef void (*void_func) ();
-#endif
-
-#ifdef HAVE_PROTOTYPES		/* check void function result */
-void test3function (void_ptr arg1, void_func arg2)
-#else
-void test3function (arg1, arg2)
-     void_ptr arg1;
-     void_func arg2;
-#endif
-{
-  char * locptr = (char *) arg1; /* check casting to and from void * */
-  arg1 = (void *) locptr;
-  (*arg2) (1, 2);		/* check call of fcn returning void */
-}
-
-int main() {
- 
-; return 0; }
-EOF
-if { (eval echo configure:1072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define void char
-EOF
-
-fi
-rm -f conftest*
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1088: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1093 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1163: checking for inline" >&5
-ijg_cv_inline=""
-cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
-#include "confdefs.h"
-
-int main() {
-} __inline__ int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ijg_cv_inline="__inline__"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1182 "configure"
-#include "confdefs.h"
-
-int main() {
-} __inline int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ijg_cv_inline="__inline"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1198 "configure"
-#include "confdefs.h"
-
-int main() {
-} inline int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ijg_cv_inline="inline"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-echo "$ac_t""$ijg_cv_inline" 1>&6
-cat >> confdefs.h <<EOF
-#define INLINE $ijg_cv_inline
-EOF
-
-echo $ac_n "checking for broken incomplete types""... $ac_c" 1>&6
-echo "configure:1224: checking for broken incomplete types" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1226 "configure"
-#include "confdefs.h"
- typedef struct undefined_structure * undef_struct_ptr; 
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""ok" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""broken" 1>&6
-cat >> confdefs.h <<\EOF
-#define INCOMPLETE_TYPES_BROKEN 
-EOF
-
-fi
-rm -f conftest*
-echo $ac_n "checking for short external names""... $ac_c" 1>&6
-echo "configure:1248: checking for short external names" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1250 "configure"
-#include "confdefs.h"
-
-int possibly_duplicate_function () { return 0; }
-int possibly_dupli_function () { return 1; }
-
-int main() {
- 
-; return 0; }
-EOF
-if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  echo "$ac_t""ok" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""short" 1>&6
-cat >> confdefs.h <<\EOF
-#define NEED_SHORT_EXTERNAL_NAMES 
-EOF
-
-fi
-rm -f conftest*
-echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6
-echo "configure:1275: checking to see if char is signed" >&5
-if test "$cross_compiling" = yes; then
-  echo Assuming that char is signed on target machine.
-echo If it is unsigned, this will be a little bit inefficient.
-
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1282 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_PROTOTYPES
-int is_char_signed (int arg)
-#else
-int is_char_signed (arg)
-     int arg;
-#endif
-{
-  if (arg == 189) {		/* expected result for unsigned char */
-    return 0;			/* type char is unsigned */
-  }
-  else if (arg != -67) {	/* expected result for signed char */
-    printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
-    printf("I fear the JPEG software will not work at all.\n\n");
-  }
-  return 1;			/* assume char is signed otherwise */
-}
-char signed_char_check = (char) (-67);
-main() {
-  exit(is_char_signed((int) signed_char_check));
-}
-EOF
-if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define CHAR_IS_UNSIGNED 
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""yes" 1>&6
-fi
-rm -fr conftest*
-fi
-
-echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6
-echo "configure:1323: checking to see if right shift is signed" >&5
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1328 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_PROTOTYPES
-int is_shifting_signed (long arg)
-#else
-int is_shifting_signed (arg)
-     long arg;
-#endif
-/* See whether right-shift on a long is signed or not. */
-{
-  long res = arg >> 4;
-
-  if (res == -0x7F7E80CL) {	/* expected result for signed shift */
-    return 1;			/* right shift is signed */
-  }
-  /* see if unsigned-shift hack will fix it. */
-  /* we can't just test exact value since it depends on width of long... */
-  res |= (~0L) << (32-4);
-  if (res == -0x7F7E80CL) {	/* expected result now? */
-    return 0;			/* right shift is unsigned */
-  }
-  printf("Right shift isn't acting as I expect it to.\n");
-  printf("I fear the JPEG software will not work at all.\n\n");
-  return 0;			/* try it with unsigned anyway */
-}
-main() {
-  exit(is_shifting_signed(-0x7F7E80B1L));
-}
-EOF
-if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define RIGHT_SHIFT_IS_UNSIGNED 
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""yes" 1>&6
-fi
-rm -fr conftest*
-fi
-
-echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6
-echo "configure:1375: checking to see if fopen accepts b spec" >&5
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""Assuming that it does." 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1380 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-main() {
-  if (fopen("conftestdata", "wb") != NULL)
-    exit(0);
-  exit(1);
-}
-EOF
-if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define DONT_USE_B_MODE 
-EOF
-
-fi
-rm -fr conftest*
-fi
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1436: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    # OSF/1 installbsd also uses dspmsg, but is usable.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1488: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-# Decide whether to use libtool,
-# and if so whether to build shared, static, or both flavors of library.
-LTSHARED="no"
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  LTSHARED="$enableval"
-fi
-
-LTSTATIC="no"
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval="$enable_static"
-  LTSTATIC="$enableval"
-fi
-
-if test "x$LTSHARED" != xno  -o  "x$LTSTATIC" != xno; then
-  USELIBTOOL="yes"
-  LIBTOOL="./libtool"
-  O="lo"
-  A="la"
-  LN='$(LIBTOOL) --mode=link $(CC)'
-  INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
-  INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
-else
-  USELIBTOOL="no"
-  LIBTOOL=""
-  O="o"
-  A="a"
-  LN='$(CC)'
-  INSTALL_LIB="$INSTALL_DATA"
-fi
-
-
-
-
-
-
-# Configure libtool if needed.
-if test $USELIBTOOL = yes; then
-  disable_shared=
-  disable_static=
-  if test "x$LTSHARED" = xno; then
-    disable_shared="--disable-shared"
-  fi
-  if test "x$LTSTATIC" = xno; then
-    disable_static="--disable-static"
-  fi
-
-  if test "X$host" = X -o "X$host" = XNONE ; then
-    $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
-  else
-    $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh $host
-  fi
-fi
-
-# Select memory manager depending on user input.
-# If no "-enable-maxmem", use jmemnobs
-MEMORYMGR='jmemnobs.$(O)'
-MAXMEM="no"
-# Check whether --enable-maxmem or --disable-maxmem was given.
-if test "${enable_maxmem+set}" = set; then
-  enableval="$enable_maxmem"
-  MAXMEM="$enableval"
-fi
-
-# support --with-maxmem for backwards compatibility with IJG V5.
-# Check whether --with-maxmem or --without-maxmem was given.
-if test "${with_maxmem+set}" = set; then
-  withval="$with_maxmem"
-  MAXMEM="$withval"
-fi
-
-if test "x$MAXMEM" = xyes; then
-  MAXMEM=1
-fi
-if test "x$MAXMEM" != xno; then
-  if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
-    { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; }
-  fi
-  DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
-cat >> confdefs.h <<EOF
-#define DEFAULT_MAX_MEM ${DEFAULTMAXMEM}
-EOF
-
-echo $ac_n "checking for 'tmpfile()'""... $ac_c" 1>&6
-echo "configure:1596: checking for 'tmpfile()'" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1598 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-int main() {
- FILE * tfile = tmpfile(); 
-; return 0; }
-EOF
-if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-MEMORYMGR='jmemansi.$(O)'
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-MEMORYMGR='jmemname.$(O)'
-cat >> confdefs.h <<\EOF
-#define NEED_SIGNAL_CATCHER 
-EOF
-
-echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6
-echo "configure:1620: checking for 'mktemp()'" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
-#include "confdefs.h"
-
-int main() {
- char fname[80]; mktemp(fname); 
-; return 0; }
-EOF
-if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_MKTEMP 
-EOF
-
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-
-# Extract the library version ID from jpeglib.h.
-echo $ac_n "checking libjpeg version number""... $ac_c" 1>&6
-echo "configure:1650: checking libjpeg version number" >&5
-JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`
-echo "$ac_t""$JPEG_LIB_VERSION" 1>&6
-
-
-# Prepare to massage makefile.cfg correctly.
-if test $ijg_cv_have_prototypes = yes; then
-  A2K_DEPS=""
-  COM_A2K="# "
-else
-  A2K_DEPS="ansi2knr"
-  COM_A2K=""
-fi
-
-
-# ansi2knr needs -DBSD if string.h is missing
-if test $ac_cv_header_string_h = no; then
-  ANSI2KNRFLAGS="-DBSD"
-else
-  ANSI2KNRFLAGS=""
-fi
-
-# Substitutions to enable or disable libtool-related stuff
-if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
-  COM_LT=""
-else
-  COM_LT="# "
-fi
-
-if test "x$LTSHARED" != xno; then
-  FORCE_INSTALL_LIB="install-lib"
-else
-  FORCE_INSTALL_LIB=""
-fi
-
-# Set up -I directives
-if test "x$srcdir" = x.; then
-  INCLUDEFLAGS='-I$(srcdir)'
-else
-  INCLUDEFLAGS='-I. -I$(srcdir)'
-fi
-
-trap '' 1 2 15
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@RANLIB@%$RANLIB%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@O@%$O%g
-s%@A@%$A%g
-s%@LN@%$LN%g
-s%@INSTALL_LIB@%$INSTALL_LIB%g
-s%@MEMORYMGR@%$MEMORYMGR%g
-s%@JPEG_LIB_VERSION@%$JPEG_LIB_VERSION%g
-s%@A2K_DEPS@%$A2K_DEPS%g
-s%@COM_A2K@%$COM_A2K%g
-s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g
-s%@COM_LT@%$COM_LT%g
-s%@FORCE_INSTALL_LIB@%$FORCE_INSTALL_LIB%g
-s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile:makefile.cfg"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="jconfig.h:jconfig.cfg"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/tkimg1.3/libjpeg/djpeg.1 b/tkimg1.3/libjpeg/djpeg.1
deleted file mode 100644
index 11beb6a..0000000
--- a/tkimg1.3/libjpeg/djpeg.1
+++ /dev/null
@@ -1,253 +0,0 @@
-.TH DJPEG 1 "22 August 1997"
-.SH NAME
-djpeg \- decompress a JPEG file to an image file
-.SH SYNOPSIS
-.B djpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B djpeg
-decompresses the named JPEG file, or the standard input if no file is named,
-and produces an image file on the standard output.  PBMPLUS (PPM/PGM), BMP,
-GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
-(RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-colors " N"
-Reduce image to at most N colors.  This reduces the number of colors used in
-the output image, so that it can be displayed on a colormapped display or
-stored in a colormapped file format.  For example, if you have an 8-bit
-display, you'd need to reduce to 256 or fewer colors.
-.TP
-.BI \-quantize " N"
-Same as
-.BR \-colors .
-.B \-colors
-is the recommended name,
-.B \-quantize
-is provided only for backwards compatibility.
-.TP
-.B \-fast
-Select recommended processing options for fast, low quality output.  (The
-default options are chosen for highest quality output.)  Currently, this is
-equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
-.TP
-.B \-grayscale
-Force gray-scale output even if JPEG file is color.  Useful for viewing on
-monochrome displays; also,
-.B djpeg
-runs noticeably faster in this mode.
-.TP
-.BI \-scale " M/N"
-Scale the output image by a factor M/N.  Currently the scale factor must be
-1/1, 1/2, 1/4, or 1/8.  Scaling is handy if the image is larger than your
-screen; also,
-.B djpeg
-runs much faster when scaling down the output.
-.TP
-.B \-bmp
-Select BMP output format (Windows flavor).  8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-gif
-Select GIF output format.  Since GIF does not support more than 256 colors,
-.B \-colors 256
-is assumed (unless you specify a smaller number of colors).
-.TP
-.B \-os2
-Select BMP output format (OS/2 1.x flavor).  8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-pnm
-Select PBMPLUS (PPM/PGM) output format (this is the default format).
-PGM is emitted if the JPEG file is gray-scale or if
-.B \-grayscale
-is specified; otherwise PPM is emitted.
-.TP
-.B \-rle
-Select RLE output format.  (Requires URT library.)
-.TP
-.B \-targa
-Select Targa output format.  Gray-scale format is emitted if the JPEG file is
-gray-scale or if
-.B \-grayscale
-is specified; otherwise, colormapped format is emitted if
-.B \-colors
-is specified; otherwise, 24-bit full-color format is emitted.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware.  Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.B \-dither fs
-Use Floyd-Steinberg dithering in color quantization.
-.TP
-.B \-dither ordered
-Use ordered dithering in color quantization.
-.TP
-.B \-dither none
-Do not use dithering in color quantization.
-By default, Floyd-Steinberg dithering is applied when quantizing colors; this
-is slow but usually produces the best results.  Ordered dither is a compromise
-between speed and quality; no dithering is fast but usually looks awful.  Note
-that these switches have no effect unless color quantization is being done.
-Ordered dither is only available in
-.B \-onepass
-mode.
-.TP
-.BI \-map " file"
-Quantize to the colors used in the specified image file.  This is useful for
-producing multiple files with identical color maps, or for forcing a
-predefined set of colors to be used.  The
-.I file
-must be a GIF or PPM file. This option overrides
-.B \-colors
-and
-.BR \-onepass .
-.TP
-.B \-nosmooth
-Use a faster, lower-quality upsampling routine.
-.TP
-.B \-onepass
-Use one-pass instead of two-pass color quantization.  The one-pass method is
-faster and needs less memory, but it produces a lower-quality image.
-.B \-onepass
-is ignored unless you also say
-.B \-colors
-.IR N .
-Also, the one-pass method is always used for gray-scale output (the two-pass
-method is no improvement then).
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images.  Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number.  For example,
-.B \-max 4m
-selects 4000000 bytes.  If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout.  More
-.BR \-v 's
-give more output.  Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.SH EXAMPLES
-.LP
-This example decompresses the JPEG file foo.jpg, quantizes it to
-256 colors, and saves the output in 8-bit BMP format in foo.bmp:
-.IP
-.B djpeg \-colors 256 \-bmp
-.I foo.jpg
-.B >
-.I foo.bmp
-.SH HINTS
-To get a quick preview of an image, use the
-.B \-grayscale
-and/or
-.B \-scale
-switches.
-.B \-grayscale \-scale 1/8
-is the fastest case.
-.PP
-Several options are available that trade off image quality to gain speed.
-.B \-fast
-turns on the recommended settings.
-.PP
-.B \-dct fast
-and/or
-.B \-nosmooth
-gain speed at a small sacrifice in quality.
-When producing a color-quantized image,
-.B \-onepass \-dither ordered
-is fast but much lower quality than the default behavior.
-.B \-dither none
-may give acceptable results in two-pass mode, but is seldom tolerable in
-one-pass mode.
-.PP
-If you are fortunate enough to have very fast floating point hardware,
-\fB\-dct float\fR may be even faster than \fB\-dct fast\fR.  But on most
-machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
-not worth using, because its theoretical accuracy advantage is too small to be
-significant in practice.
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-To avoid the Unisys LZW patent,
-.B djpeg
-produces uncompressed GIF files.  These are larger than they should be, but
-are readable by standard GIF decoders.
-.PP
-Still not as fast as we'd like.
diff --git a/tkimg1.3/libjpeg/djpeg.c b/tkimg1.3/libjpeg/djpeg.c
deleted file mode 100644
index e099e90..0000000
--- a/tkimg1.3/libjpeg/djpeg.c
+++ /dev/null
@@ -1,616 +0,0 @@
-/*
- * djpeg.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a command-line user interface for the JPEG decompressor.
- * It should work on any system with Unix- or MS-DOS-style command lines.
- *
- * Two different command line styles are permitted, depending on the
- * compile-time switch TWO_FILE_COMMANDLINE:
- *	djpeg [options]  inputfile outputfile
- *	djpeg [options]  [inputfile]
- * In the second style, output is always to standard output, which you'd
- * normally redirect to a file or pipe to some other program.  Input is
- * either from a named file or from standard input (typically redirected).
- * The second style is convenient on Unix but is unhelpful on systems that
- * don't support pipes.  Also, you MUST use the first style if your system
- * doesn't do binary I/O to stdin/stdout.
- * To simplify script writing, the "-outfile" switch is provided.  The syntax
- *	djpeg [options]  -outfile outputfile  inputfile
- * works regardless of which command line style is used.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-#include "jversion.h"		/* for version message */
-
-#include <ctype.h>		/* to declare isprint() */
-
-#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h>              /* Metrowerks needs this */
-#include <console.h>		/* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h>		/* Think declares it here */
-#endif
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string)	string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
-  NULL
-};
-
-
-/*
- * This list defines the known output image formats
- * (not all of which need be supported by a given version).
- * You can change the default output format by defining DEFAULT_FMT;
- * indeed, you had better do so if you undefine PPM_SUPPORTED.
- */
-
-typedef enum {
-	FMT_BMP,		/* BMP format (Windows flavor) */
-	FMT_GIF,		/* GIF format */
-	FMT_OS2,		/* BMP format (OS/2 flavor) */
-	FMT_PPM,		/* PPM/PGM (PBMPLUS formats) */
-	FMT_RLE,		/* RLE format */
-	FMT_TARGA,		/* Targa format */
-	FMT_TIFF		/* TIFF format */
-} IMAGE_FORMATS;
-
-#ifndef DEFAULT_FMT		/* so can override from CFLAGS in Makefile */
-#define DEFAULT_FMT	FMT_PPM
-#endif
-
-static IMAGE_FORMATS requested_fmt;
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname;	/* program name for error messages */
-static char * outfilename;	/* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
-  fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
-  fprintf(stderr, "inputfile outputfile\n");
-#else
-  fprintf(stderr, "[inputfile]\n");
-#endif
-
-  fprintf(stderr, "Switches (names may be abbreviated):\n");
-  fprintf(stderr, "  -colors N      Reduce image to no more than N colors\n");
-  fprintf(stderr, "  -fast          Fast, low-quality processing\n");
-  fprintf(stderr, "  -grayscale     Force grayscale output\n");
-#ifdef IDCT_SCALING_SUPPORTED
-  fprintf(stderr, "  -scale M/N     Scale output image by fraction M/N, eg, 1/8\n");
-#endif
-#ifdef BMP_SUPPORTED
-  fprintf(stderr, "  -bmp           Select BMP output format (Windows style)%s\n",
-	  (DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
-#endif
-#ifdef GIF_SUPPORTED
-  fprintf(stderr, "  -gif           Select GIF output format%s\n",
-	  (DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
-#endif
-#ifdef BMP_SUPPORTED
-  fprintf(stderr, "  -os2           Select BMP output format (OS/2 style)%s\n",
-	  (DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
-#endif
-#ifdef PPM_SUPPORTED
-  fprintf(stderr, "  -pnm           Select PBMPLUS (PPM/PGM) output format%s\n",
-	  (DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
-#endif
-#ifdef RLE_SUPPORTED
-  fprintf(stderr, "  -rle           Select Utah RLE output format%s\n",
-	  (DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
-#endif
-#ifdef TARGA_SUPPORTED
-  fprintf(stderr, "  -targa         Select Targa output format%s\n",
-	  (DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
-#endif
-  fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
-  fprintf(stderr, "  -dct int       Use integer DCT method%s\n",
-	  (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-  fprintf(stderr, "  -dct fast      Use fast integer DCT (less accurate)%s\n",
-	  (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-  fprintf(stderr, "  -dct float     Use floating-point DCT method%s\n",
-	  (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
-  fprintf(stderr, "  -dither fs     Use F-S dithering (default)\n");
-  fprintf(stderr, "  -dither none   Don't use dithering in quantization\n");
-  fprintf(stderr, "  -dither ordered  Use ordered dither (medium speed, quality)\n");
-#ifdef QUANT_2PASS_SUPPORTED
-  fprintf(stderr, "  -map FILE      Map to colors used in named image file\n");
-#endif
-  fprintf(stderr, "  -nosmooth      Don't use high-quality upsampling\n");
-#ifdef QUANT_1PASS_SUPPORTED
-  fprintf(stderr, "  -onepass       Use 1-pass quantization (fast, low quality)\n");
-#endif
-  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
-  fprintf(stderr, "  -outfile name  Specify name for output file\n");
-  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
-  exit(EXIT_FAILURE);
-}
-
-
-LOCAL(int)
-parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
-		int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
-  int argn;
-  char * arg;
-
-  /* Set up default JPEG parameters. */
-  requested_fmt = DEFAULT_FMT;	/* set default output file format */
-  outfilename = NULL;
-  cinfo->err->trace_level = 0;
-
-  /* Scan command line options, adjust parameters */
-
-  for (argn = 1; argn < argc; argn++) {
-    arg = argv[argn];
-    if (*arg != '-') {
-      /* Not a switch, must be a file name argument */
-      if (argn <= last_file_arg_seen) {
-	outfilename = NULL;	/* -outfile applies to just one input file */
-	continue;		/* ignore this name if previously processed */
-      }
-      break;			/* else done parsing switches */
-    }
-    arg++;			/* advance past switch marker character */
-
-    if (keymatch(arg, "bmp", 1)) {
-      /* BMP output format. */
-      requested_fmt = FMT_BMP;
-
-    } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
-	       keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
-      /* Do color quantization. */
-      int val;
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%d", &val) != 1)
-	usage();
-      cinfo->desired_number_of_colors = val;
-      cinfo->quantize_colors = TRUE;
-
-    } else if (keymatch(arg, "dct", 2)) {
-      /* Select IDCT algorithm. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "int", 1)) {
-	cinfo->dct_method = JDCT_ISLOW;
-      } else if (keymatch(argv[argn], "fast", 2)) {
-	cinfo->dct_method = JDCT_IFAST;
-      } else if (keymatch(argv[argn], "float", 2)) {
-	cinfo->dct_method = JDCT_FLOAT;
-      } else
-	usage();
-
-    } else if (keymatch(arg, "dither", 2)) {
-      /* Select dithering algorithm. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "fs", 2)) {
-	cinfo->dither_mode = JDITHER_FS;
-      } else if (keymatch(argv[argn], "none", 2)) {
-	cinfo->dither_mode = JDITHER_NONE;
-      } else if (keymatch(argv[argn], "ordered", 2)) {
-	cinfo->dither_mode = JDITHER_ORDERED;
-      } else
-	usage();
-
-    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
-      /* Enable debug printouts. */
-      /* On first -d, print version identification */
-      static boolean printed_version = FALSE;
-
-      if (! printed_version) {
-	fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
-		JVERSION, JCOPYRIGHT);
-	printed_version = TRUE;
-      }
-      cinfo->err->trace_level++;
-
-    } else if (keymatch(arg, "fast", 1)) {
-      /* Select recommended processing options for quick-and-dirty output. */
-      cinfo->two_pass_quantize = FALSE;
-      cinfo->dither_mode = JDITHER_ORDERED;
-      if (! cinfo->quantize_colors) /* don't override an earlier -colors */
-	cinfo->desired_number_of_colors = 216;
-      cinfo->dct_method = JDCT_FASTEST;
-      cinfo->do_fancy_upsampling = FALSE;
-
-    } else if (keymatch(arg, "gif", 1)) {
-      /* GIF output format. */
-      requested_fmt = FMT_GIF;
-
-    } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
-      /* Force monochrome output. */
-      cinfo->out_color_space = JCS_GRAYSCALE;
-
-    } else if (keymatch(arg, "map", 3)) {
-      /* Quantize to a color map taken from an input file. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (for_real) {		/* too expensive to do twice! */
-#ifdef QUANT_2PASS_SUPPORTED	/* otherwise can't quantize to supplied map */
-	FILE * mapfile;
-
-	if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
-	  fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
-	  exit(EXIT_FAILURE);
-	}
-	read_color_map(cinfo, mapfile);
-	fclose(mapfile);
-	cinfo->quantize_colors = TRUE;
-#else
-	ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-      }
-
-    } else if (keymatch(arg, "maxmemory", 3)) {
-      /* Maximum memory in Kb (or Mb with 'm'). */
-      long lval;
-      char ch = 'x';
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
-	usage();
-      if (ch == 'm' || ch == 'M')
-	lval *= 1000L;
-      cinfo->mem->max_memory_to_use = lval * 1000L;
-
-    } else if (keymatch(arg, "nosmooth", 3)) {
-      /* Suppress fancy upsampling */
-      cinfo->do_fancy_upsampling = FALSE;
-
-    } else if (keymatch(arg, "onepass", 3)) {
-      /* Use fast one-pass quantization. */
-      cinfo->two_pass_quantize = FALSE;
-
-    } else if (keymatch(arg, "os2", 3)) {
-      /* BMP output format (OS/2 flavor). */
-      requested_fmt = FMT_OS2;
-
-    } else if (keymatch(arg, "outfile", 4)) {
-      /* Set output file name. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      outfilename = argv[argn];	/* save it away for later use */
-
-    } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
-      /* PPM/PGM output format. */
-      requested_fmt = FMT_PPM;
-
-    } else if (keymatch(arg, "rle", 1)) {
-      /* RLE output format. */
-      requested_fmt = FMT_RLE;
-
-    } else if (keymatch(arg, "scale", 1)) {
-      /* Scale the output image by a fraction M/N. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%d/%d",
-		 &cinfo->scale_num, &cinfo->scale_denom) != 2)
-	usage();
-
-    } else if (keymatch(arg, "targa", 1)) {
-      /* Targa output format. */
-      requested_fmt = FMT_TARGA;
-
-    } else {
-      usage();			/* bogus switch */
-    }
-  }
-
-  return argn;			/* return index of next arg (file name) */
-}
-
-
-/*
- * Marker processor for COM and interesting APPn markers.
- * This replaces the library's built-in processor, which just skips the marker.
- * We want to print out the marker as text, to the extent possible.
- * Note this code relies on a non-suspending data source.
- */
-
-LOCAL(unsigned int)
-jpeg_getc (j_decompress_ptr cinfo)
-/* Read next byte */
-{
-  struct jpeg_source_mgr * datasrc = cinfo->src;
-
-  if (datasrc->bytes_in_buffer == 0) {
-    if (! (*datasrc->fill_input_buffer) (cinfo))
-      ERREXIT(cinfo, JERR_CANT_SUSPEND);
-  }
-  datasrc->bytes_in_buffer--;
-  return GETJOCTET(*datasrc->next_input_byte++);
-}
-
-
-METHODDEF(boolean)
-print_text_marker (j_decompress_ptr cinfo)
-{
-  boolean traceit = (cinfo->err->trace_level >= 1);
-  INT32 length;
-  unsigned int ch;
-  unsigned int lastch = 0;
-
-  length = jpeg_getc(cinfo) << 8;
-  length += jpeg_getc(cinfo);
-  length -= 2;			/* discount the length word itself */
-
-  if (traceit) {
-    if (cinfo->unread_marker == JPEG_COM)
-      fprintf(stderr, "Comment, length %ld:\n", (long) length);
-    else			/* assume it is an APPn otherwise */
-      fprintf(stderr, "APP%d, length %ld:\n",
-	      cinfo->unread_marker - JPEG_APP0, (long) length);
-  }
-
-  while (--length >= 0) {
-    ch = jpeg_getc(cinfo);
-    if (traceit) {
-      /* Emit the character in a readable form.
-       * Nonprintables are converted to \nnn form,
-       * while \ is converted to \\.
-       * Newlines in CR, CR/LF, or LF form will be printed as one newline.
-       */
-      if (ch == '\r') {
-	fprintf(stderr, "\n");
-      } else if (ch == '\n') {
-	if (lastch != '\r')
-	  fprintf(stderr, "\n");
-      } else if (ch == '\\') {
-	fprintf(stderr, "\\\\");
-      } else if (isprint(ch)) {
-	putc(ch, stderr);
-      } else {
-	fprintf(stderr, "\\%03o", ch);
-      }
-      lastch = ch;
-    }
-  }
-
-  if (traceit)
-    fprintf(stderr, "\n");
-
-  return TRUE;
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
-  struct jpeg_decompress_struct cinfo;
-  struct jpeg_error_mgr jerr;
-#ifdef PROGRESS_REPORT
-  struct cdjpeg_progress_mgr progress;
-#endif
-  int file_index;
-  djpeg_dest_ptr dest_mgr = NULL;
-  FILE * input_file;
-  FILE * output_file;
-  JDIMENSION num_scanlines;
-
-  /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
-  argc = ccommand(&argv);
-#endif
-
-  progname = argv[0];
-  if (progname == NULL || progname[0] == 0)
-    progname = "djpeg";		/* in case C library doesn't provide it */
-
-  /* Initialize the JPEG decompression object with default error handling. */
-  cinfo.err = jpeg_std_error(&jerr);
-  jpeg_create_decompress(&cinfo);
-  /* Add some application-specific error messages (from cderror.h) */
-  jerr.addon_message_table = cdjpeg_message_table;
-  jerr.first_addon_message = JMSG_FIRSTADDONCODE;
-  jerr.last_addon_message = JMSG_LASTADDONCODE;
-
-  /* Insert custom marker processor for COM and APP12.
-   * APP12 is used by some digital camera makers for textual info,
-   * so we provide the ability to display it as text.
-   * If you like, additional APPn marker types can be selected for display,
-   * but don't try to override APP0 or APP14 this way (see libjpeg.doc).
-   */
-  jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
-  jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
-
-  /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
-  enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
-  /* Scan command line to find file names. */
-  /* It is convenient to use just one switch-parsing routine, but the switch
-   * values read here are ignored; we will rescan the switches after opening
-   * the input file.
-   * (Exception: tracing level set here controls verbosity for COM markers
-   * found during jpeg_read_header...)
-   */
-
-  file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
-
-#ifdef TWO_FILE_COMMANDLINE
-  /* Must have either -outfile switch or explicit output file name */
-  if (outfilename == NULL) {
-    if (file_index != argc-2) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-    outfilename = argv[file_index+1];
-  } else {
-    if (file_index != argc-1) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-  }
-#else
-  /* Unix style: expect zero or one file name */
-  if (file_index < argc-1) {
-    fprintf(stderr, "%s: only one input file\n", progname);
-    usage();
-  }
-#endif /* TWO_FILE_COMMANDLINE */
-
-  /* Open the input file. */
-  if (file_index < argc) {
-    if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default input file is stdin */
-    input_file = read_stdin();
-  }
-
-  /* Open the output file. */
-  if (outfilename != NULL) {
-    if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default output file is stdout */
-    output_file = write_stdout();
-  }
-
-#ifdef PROGRESS_REPORT
-  start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
-  /* Specify data source for decompression */
-  jpeg_stdio_src(&cinfo, input_file);
-
-  /* Read file header, set default decompression parameters */
-  (void) jpeg_read_header(&cinfo, TRUE);
-
-  /* Adjust default decompression parameters by re-parsing the options */
-  file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
-
-  /* Initialize the output module now to let it override any crucial
-   * option settings (for instance, GIF wants to force color quantization).
-   */
-  switch (requested_fmt) {
-#ifdef BMP_SUPPORTED
-  case FMT_BMP:
-    dest_mgr = jinit_write_bmp(&cinfo, FALSE);
-    break;
-  case FMT_OS2:
-    dest_mgr = jinit_write_bmp(&cinfo, TRUE);
-    break;
-#endif
-#ifdef GIF_SUPPORTED
-  case FMT_GIF:
-    dest_mgr = jinit_write_gif(&cinfo);
-    break;
-#endif
-#ifdef PPM_SUPPORTED
-  case FMT_PPM:
-    dest_mgr = jinit_write_ppm(&cinfo);
-    break;
-#endif
-#ifdef RLE_SUPPORTED
-  case FMT_RLE:
-    dest_mgr = jinit_write_rle(&cinfo);
-    break;
-#endif
-#ifdef TARGA_SUPPORTED
-  case FMT_TARGA:
-    dest_mgr = jinit_write_targa(&cinfo);
-    break;
-#endif
-  default:
-    ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
-    break;
-  }
-  dest_mgr->output_file = output_file;
-
-  /* Start decompressor */
-  (void) jpeg_start_decompress(&cinfo);
-
-  /* Write output file header */
-  (*dest_mgr->start_output) (&cinfo, dest_mgr);
-
-  /* Process data */
-  while (cinfo.output_scanline < cinfo.output_height) {
-    num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
-					dest_mgr->buffer_height);
-    (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
-  }
-
-#ifdef PROGRESS_REPORT
-  /* Hack: count final pass as done in case finish_output does an extra pass.
-   * The library won't have updated completed_passes.
-   */
-  progress.pub.completed_passes = progress.pub.total_passes;
-#endif
-
-  /* Finish decompression and release memory.
-   * I must do it in this order because output module has allocated memory
-   * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
-   */
-  (*dest_mgr->finish_output) (&cinfo, dest_mgr);
-  (void) jpeg_finish_decompress(&cinfo);
-  jpeg_destroy_decompress(&cinfo);
-
-  /* Close files, if we opened them */
-  if (input_file != stdin)
-    fclose(input_file);
-  if (output_file != stdout)
-    fclose(output_file);
-
-#ifdef PROGRESS_REPORT
-  end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
-  /* All done. */
-  exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
-  return 0;			/* suppress no-return-value warnings */
-}
diff --git a/tkimg1.3/libjpeg/example.c b/tkimg1.3/libjpeg/example.c
deleted file mode 100644
index 7fc354f..0000000
--- a/tkimg1.3/libjpeg/example.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * example.c
- *
- * This file illustrates how to use the IJG code as a subroutine library
- * to read or write JPEG image files.  You should look at this code in
- * conjunction with the documentation file libjpeg.doc.
- *
- * This code will not do anything useful as-is, but it may be helpful as a
- * skeleton for constructing routines that call the JPEG library.  
- *
- * We present these routines in the same coding style used in the JPEG code
- * (ANSI function definitions, etc); but you are of course free to code your
- * routines in a different style if you prefer.
- */
-
-#include <stdio.h>
-
-/*
- * Include file for users of JPEG library.
- * You will need to have included system headers that define at least
- * the typedefs FILE and size_t before you can include jpeglib.h.
- * (stdio.h is sufficient on ANSI-conforming systems.)
- * You may also wish to include "jerror.h".
- */
-
-#include "jpeglib.h"
-
-/*
- * <setjmp.h> is used for the optional error recovery mechanism shown in
- * the second part of the example.
- */
-
-#include <setjmp.h>
-
-
-
-/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/
-
-/* This half of the example shows how to feed data into the JPEG compressor.
- * We present a minimal version that does not worry about refinements such
- * as error recovery (the JPEG code will just exit() if it gets an error).
- */
-
-
-/*
- * IMAGE DATA FORMATS:
- *
- * The standard input image format is a rectangular array of pixels, with
- * each pixel having the same number of "component" values (color channels).
- * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars).
- * If you are working with color data, then the color values for each pixel
- * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit
- * RGB color.
- *
- * For this example, we'll assume that this data structure matches the way
- * our application has stored the image in memory, so we can just pass a
- * pointer to our image buffer.  In particular, let's say that the image is
- * RGB color and is described by:
- */
-
-extern JSAMPLE * image_buffer;	/* Points to large array of R,G,B-order data */
-extern int image_height;	/* Number of rows in image */
-extern int image_width;		/* Number of columns in image */
-
-
-/*
- * Sample routine for JPEG compression.  We assume that the target file name
- * and a compression quality factor are passed in.
- */
-
-GLOBAL(void)
-write_JPEG_file (char * filename, int quality)
-{
-  /* This struct contains the JPEG compression parameters and pointers to
-   * working space (which is allocated as needed by the JPEG library).
-   * It is possible to have several such structures, representing multiple
-   * compression/decompression processes, in existence at once.  We refer
-   * to any one struct (and its associated working data) as a "JPEG object".
-   */
-  struct jpeg_compress_struct cinfo;
-  /* This struct represents a JPEG error handler.  It is declared separately
-   * because applications often want to supply a specialized error handler
-   * (see the second half of this file for an example).  But here we just
-   * take the easy way out and use the standard error handler, which will
-   * print a message on stderr and call exit() if compression fails.
-   * Note that this struct must live as long as the main JPEG parameter
-   * struct, to avoid dangling-pointer problems.
-   */
-  struct jpeg_error_mgr jerr;
-  /* More stuff */
-  FILE * outfile;		/* target file */
-  JSAMPROW row_pointer[1];	/* pointer to JSAMPLE row[s] */
-  int row_stride;		/* physical row width in image buffer */
-
-  /* Step 1: allocate and initialize JPEG compression object */
-
-  /* We have to set up the error handler first, in case the initialization
-   * step fails.  (Unlikely, but it could happen if you are out of memory.)
-   * This routine fills in the contents of struct jerr, and returns jerr's
-   * address which we place into the link field in cinfo.
-   */
-  cinfo.err = jpeg_std_error(&jerr);
-  /* Now we can initialize the JPEG compression object. */
-  jpeg_create_compress(&cinfo);
-
-  /* Step 2: specify data destination (eg, a file) */
-  /* Note: steps 2 and 3 can be done in either order. */
-
-  /* Here we use the library-supplied code to send compressed data to a
-   * stdio stream.  You can also write your own code to do something else.
-   * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
-   * requires it in order to write binary files.
-   */
-  if ((outfile = fopen(filename, "wb")) == NULL) {
-    fprintf(stderr, "can't open %s\n", filename);
-    exit(1);
-  }
-  jpeg_stdio_dest(&cinfo, outfile);
-
-  /* Step 3: set parameters for compression */
-
-  /* First we supply a description of the input image.
-   * Four fields of the cinfo struct must be filled in:
-   */
-  cinfo.image_width = image_width; 	/* image width and height, in pixels */
-  cinfo.image_height = image_height;
-  cinfo.input_components = 3;		/* # of color components per pixel */
-  cinfo.in_color_space = JCS_RGB; 	/* colorspace of input image */
-  /* Now use the library's routine to set default compression parameters.
-   * (You must set at least cinfo.in_color_space before calling this,
-   * since the defaults depend on the source color space.)
-   */
-  jpeg_set_defaults(&cinfo);
-  /* Now you can set any non-default parameters you wish to.
-   * Here we just illustrate the use of quality (quantization table) scaling:
-   */
-  jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
-
-  /* Step 4: Start compressor */
-
-  /* TRUE ensures that we will write a complete interchange-JPEG file.
-   * Pass TRUE unless you are very sure of what you're doing.
-   */
-  jpeg_start_compress(&cinfo, TRUE);
-
-  /* Step 5: while (scan lines remain to be written) */
-  /*           jpeg_write_scanlines(...); */
-
-  /* Here we use the library's state variable cinfo.next_scanline as the
-   * loop counter, so that we don't have to keep track ourselves.
-   * To keep things simple, we pass one scanline per call; you can pass
-   * more if you wish, though.
-   */
-  row_stride = image_width * 3;	/* JSAMPLEs per row in image_buffer */
-
-  while (cinfo.next_scanline < cinfo.image_height) {
-    /* jpeg_write_scanlines expects an array of pointers to scanlines.
-     * Here the array is only one element long, but you could pass
-     * more than one scanline at a time if that's more convenient.
-     */
-    row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
-    (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
-  }
-
-  /* Step 6: Finish compression */
-
-  jpeg_finish_compress(&cinfo);
-  /* After finish_compress, we can close the output file. */
-  fclose(outfile);
-
-  /* Step 7: release JPEG compression object */
-
-  /* This is an important step since it will release a good deal of memory. */
-  jpeg_destroy_compress(&cinfo);
-
-  /* And we're done! */
-}
-
-
-/*
- * SOME FINE POINTS:
- *
- * In the above loop, we ignored the return value of jpeg_write_scanlines,
- * which is the number of scanlines actually written.  We could get away
- * with this because we were only relying on the value of cinfo.next_scanline,
- * which will be incremented correctly.  If you maintain additional loop
- * variables then you should be careful to increment them properly.
- * Actually, for output to a stdio stream you needn't worry, because
- * then jpeg_write_scanlines will write all the lines passed (or else exit
- * with a fatal error).  Partial writes can only occur if you use a data
- * destination module that can demand suspension of the compressor.
- * (If you don't know what that's for, you don't need it.)
- *
- * If the compressor requires full-image buffers (for entropy-coding
- * optimization or a multi-scan JPEG file), it will create temporary
- * files for anything that doesn't fit within the maximum-memory setting.
- * (Note that temp files are NOT needed if you use the default parameters.)
- * On some systems you may need to set up a signal handler to ensure that
- * temporary files are deleted if the program is interrupted.  See libjpeg.doc.
- *
- * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG
- * files to be compatible with everyone else's.  If you cannot readily read
- * your data in that order, you'll need an intermediate array to hold the
- * image.  See rdtarga.c or rdbmp.c for examples of handling bottom-to-top
- * source data using the JPEG code's internal virtual-array mechanisms.
- */
-
-
-
-/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/
-
-/* This half of the example shows how to read data from the JPEG decompressor.
- * It's a bit more refined than the above, in that we show:
- *   (a) how to modify the JPEG library's standard error-reporting behavior;
- *   (b) how to allocate workspace using the library's memory manager.
- *
- * Just to make this example a little different from the first one, we'll
- * assume that we do not intend to put the whole image into an in-memory
- * buffer, but to send it line-by-line someplace else.  We need a one-
- * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG
- * memory manager allocate it for us.  This approach is actually quite useful
- * because we don't need to remember to deallocate the buffer separately: it
- * will go away automatically when the JPEG object is cleaned up.
- */
-
-
-/*
- * ERROR HANDLING:
- *
- * The JPEG library's standard error handler (jerror.c) is divided into
- * several "methods" which you can override individually.  This lets you
- * adjust the behavior without duplicating a lot of code, which you might
- * have to update with each future release.
- *
- * Our example here shows how to override the "error_exit" method so that
- * control is returned to the library's caller when a fatal error occurs,
- * rather than calling exit() as the standard error_exit method does.
- *
- * We use C's setjmp/longjmp facility to return control.  This means that the
- * routine which calls the JPEG library must first execute a setjmp() call to
- * establish the return point.  We want the replacement error_exit to do a
- * longjmp().  But we need to make the setjmp buffer accessible to the
- * error_exit routine.  To do this, we make a private extension of the
- * standard JPEG error handler object.  (If we were using C++, we'd say we
- * were making a subclass of the regular error handler.)
- *
- * Here's the extended error handler struct:
- */
-
-struct my_error_mgr {
-  struct jpeg_error_mgr pub;	/* "public" fields */
-
-  jmp_buf setjmp_buffer;	/* for return to caller */
-};
-
-typedef struct my_error_mgr * my_error_ptr;
-
-/*
- * Here's the routine that will replace the standard error_exit method:
- */
-
-METHODDEF(void)
-my_error_exit (j_common_ptr cinfo)
-{
-  /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
-  my_error_ptr myerr = (my_error_ptr) cinfo->err;
-
-  /* Always display the message. */
-  /* We could postpone this until after returning, if we chose. */
-  (*cinfo->err->output_message) (cinfo);
-
-  /* Return control to the setjmp point */
-  longjmp(myerr->setjmp_buffer, 1);
-}
-
-
-/*
- * Sample routine for JPEG decompression.  We assume that the source file name
- * is passed in.  We want to return 1 on success, 0 on error.
- */
-
-
-GLOBAL(int)
-read_JPEG_file (char * filename)
-{
-  /* This struct contains the JPEG decompression parameters and pointers to
-   * working space (which is allocated as needed by the JPEG library).
-   */
-  struct jpeg_decompress_struct cinfo;
-  /* We use our private extension JPEG error handler.
-   * Note that this struct must live as long as the main JPEG parameter
-   * struct, to avoid dangling-pointer problems.
-   */
-  struct my_error_mgr jerr;
-  /* More stuff */
-  FILE * infile;		/* source file */
-  JSAMPARRAY buffer;		/* Output row buffer */
-  int row_stride;		/* physical row width in output buffer */
-
-  /* In this example we want to open the input file before doing anything else,
-   * so that the setjmp() error recovery below can assume the file is open.
-   * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
-   * requires it in order to read binary files.
-   */
-
-  if ((infile = fopen(filename, "rb")) == NULL) {
-    fprintf(stderr, "can't open %s\n", filename);
-    return 0;
-  }
-
-  /* Step 1: allocate and initialize JPEG decompression object */
-
-  /* We set up the normal JPEG error routines, then override error_exit. */
-  cinfo.err = jpeg_std_error(&jerr.pub);
-  jerr.pub.error_exit = my_error_exit;
-  /* Establish the setjmp return context for my_error_exit to use. */
-  if (setjmp(jerr.setjmp_buffer)) {
-    /* If we get here, the JPEG code has signaled an error.
-     * We need to clean up the JPEG object, close the input file, and return.
-     */
-    jpeg_destroy_decompress(&cinfo);
-    fclose(infile);
-    return 0;
-  }
-  /* Now we can initialize the JPEG decompression object. */
-  jpeg_create_decompress(&cinfo);
-
-  /* Step 2: specify data source (eg, a file) */
-
-  jpeg_stdio_src(&cinfo, infile);
-
-  /* Step 3: read file parameters with jpeg_read_header() */
-
-  (void) jpeg_read_header(&cinfo, TRUE);
-  /* We can ignore the return value from jpeg_read_header since
-   *   (a) suspension is not possible with the stdio data source, and
-   *   (b) we passed TRUE to reject a tables-only JPEG file as an error.
-   * See libjpeg.doc for more info.
-   */
-
-  /* Step 4: set parameters for decompression */
-
-  /* In this example, we don't need to change any of the defaults set by
-   * jpeg_read_header(), so we do nothing here.
-   */
-
-  /* Step 5: Start decompressor */
-
-  (void) jpeg_start_decompress(&cinfo);
-  /* We can ignore the return value since suspension is not possible
-   * with the stdio data source.
-   */
-
-  /* We may need to do some setup of our own at this point before reading
-   * the data.  After jpeg_start_decompress() we have the correct scaled
-   * output image dimensions available, as well as the output colormap
-   * if we asked for color quantization.
-   * In this example, we need to make an output work buffer of the right size.
-   */ 
-  /* JSAMPLEs per row in output buffer */
-  row_stride = cinfo.output_width * cinfo.output_components;
-  /* Make a one-row-high sample array that will go away when done with image */
-  buffer = (*cinfo.mem->alloc_sarray)
-		((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
-
-  /* Step 6: while (scan lines remain to be read) */
-  /*           jpeg_read_scanlines(...); */
-
-  /* Here we use the library's state variable cinfo.output_scanline as the
-   * loop counter, so that we don't have to keep track ourselves.
-   */
-  while (cinfo.output_scanline < cinfo.output_height) {
-    /* jpeg_read_scanlines expects an array of pointers to scanlines.
-     * Here the array is only one element long, but you could ask for
-     * more than one scanline at a time if that's more convenient.
-     */
-    (void) jpeg_read_scanlines(&cinfo, buffer, 1);
-    /* Assume put_scanline_someplace wants a pointer and sample count. */
-    put_scanline_someplace(buffer[0], row_stride);
-  }
-
-  /* Step 7: Finish decompression */
-
-  (void) jpeg_finish_decompress(&cinfo);
-  /* We can ignore the return value since suspension is not possible
-   * with the stdio data source.
-   */
-
-  /* Step 8: Release JPEG decompression object */
-
-  /* This is an important step since it will release a good deal of memory. */
-  jpeg_destroy_decompress(&cinfo);
-
-  /* After finish_decompress, we can close the input file.
-   * Here we postpone it until after no more JPEG errors are possible,
-   * so as to simplify the setjmp error logic above.  (Actually, I don't
-   * think that jpeg_destroy can do an error exit, but why assume anything...)
-   */
-  fclose(infile);
-
-  /* At this point you may want to check to see whether any corrupt-data
-   * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
-   */
-
-  /* And we're done! */
-  return 1;
-}
-
-
-/*
- * SOME FINE POINTS:
- *
- * In the above code, we ignored the return value of jpeg_read_scanlines,
- * which is the number of scanlines actually read.  We could get away with
- * this because we asked for only one line at a time and we weren't using
- * a suspending data source.  See libjpeg.doc for more info.
- *
- * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress();
- * we should have done it beforehand to ensure that the space would be
- * counted against the JPEG max_memory setting.  In some systems the above
- * code would risk an out-of-memory error.  However, in general we don't
- * know the output image dimensions before jpeg_start_decompress(), unless we
- * call jpeg_calc_output_dimensions().  See libjpeg.doc for more about this.
- *
- * Scanlines are returned in the same order as they appear in the JPEG file,
- * which is standardly top-to-bottom.  If you must emit data bottom-to-top,
- * you can use one of the virtual arrays provided by the JPEG memory manager
- * to invert the data.  See wrbmp.c for an example.
- *
- * As with compression, some operating modes may require temporary files.
- * On some systems you may need to set up a signal handler to ensure that
- * temporary files are deleted if the program is interrupted.  See libjpeg.doc.
- */
diff --git a/tkimg1.3/libjpeg/filelist.doc b/tkimg1.3/libjpeg/filelist.doc
deleted file mode 100644
index e14982c..0000000
--- a/tkimg1.3/libjpeg/filelist.doc
+++ /dev/null
@@ -1,210 +0,0 @@
-IJG JPEG LIBRARY:  FILE LIST
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Here is a road map to the files in the IJG JPEG distribution.  The
-distribution includes the JPEG library proper, plus two application
-programs ("cjpeg" and "djpeg") which use the library to convert JPEG
-files to and from some other popular image formats.  A third application
-"jpegtran" uses the library to do lossless conversion between different
-variants of JPEG.  There are also two stand-alone applications,
-"rdjpgcom" and "wrjpgcom".
-
-
-THE JPEG LIBRARY
-================
-
-Include files:
-
-jpeglib.h	JPEG library's exported data and function declarations.
-jconfig.h	Configuration declarations.  Note: this file is not present
-		in the distribution; it is generated during installation.
-jmorecfg.h	Additional configuration declarations; need not be changed
-		for a standard installation.
-jerror.h	Declares JPEG library's error and trace message codes.
-jinclude.h	Central include file used by all IJG .c files to reference
-		system include files.
-jpegint.h	JPEG library's internal data structures.
-jchuff.h	Private declarations for Huffman encoder modules.
-jdhuff.h	Private declarations for Huffman decoder modules.
-jdct.h		Private declarations for forward & reverse DCT subsystems.
-jmemsys.h	Private declarations for memory management subsystem.
-jversion.h	Version information.
-
-Applications using the library should include jpeglib.h (which in turn
-includes jconfig.h and jmorecfg.h).  Optionally, jerror.h may be included
-if the application needs to reference individual JPEG error codes.  The
-other include files are intended for internal use and would not normally
-be included by an application program.  (cjpeg/djpeg/etc do use jinclude.h,
-since its function is to improve portability of the whole IJG distribution.
-Most other applications will directly include the system include files they
-want, and hence won't need jinclude.h.)
-
-
-C source code files:
-
-These files contain most of the functions intended to be called directly by
-an application program:
-
-jcapimin.c	Application program interface: core routines for compression.
-jcapistd.c	Application program interface: standard compression.
-jdapimin.c	Application program interface: core routines for decompression.
-jdapistd.c	Application program interface: standard decompression.
-jcomapi.c	Application program interface routines common to compression
-		and decompression.
-jcparam.c	Compression parameter setting helper routines.
-jctrans.c	API and library routines for transcoding compression.
-jdtrans.c	API and library routines for transcoding decompression.
-
-Compression side of the library:
-
-jcinit.c	Initialization: determines which other modules to use.
-jcmaster.c	Master control: setup and inter-pass sequencing logic.
-jcmainct.c	Main buffer controller (preprocessor => JPEG compressor).
-jcprepct.c	Preprocessor buffer controller.
-jccoefct.c	Buffer controller for DCT coefficient buffer.
-jccolor.c	Color space conversion.
-jcsample.c	Downsampling.
-jcdctmgr.c	DCT manager (DCT implementation selection & control).
-jfdctint.c	Forward DCT using slow-but-accurate integer method.
-jfdctfst.c	Forward DCT using faster, less accurate integer method.
-jfdctflt.c	Forward DCT using floating-point arithmetic.
-jchuff.c	Huffman entropy coding for sequential JPEG.
-jcphuff.c	Huffman entropy coding for progressive JPEG.
-jcmarker.c	JPEG marker writing.
-jdatadst.c	Data destination manager for stdio output.
-
-Decompression side of the library:
-
-jdmaster.c	Master control: determines which other modules to use.
-jdinput.c	Input controller: controls input processing modules.
-jdmainct.c	Main buffer controller (JPEG decompressor => postprocessor).
-jdcoefct.c	Buffer controller for DCT coefficient buffer.
-jdpostct.c	Postprocessor buffer controller.
-jdmarker.c	JPEG marker reading.
-jdhuff.c	Huffman entropy decoding for sequential JPEG.
-jdphuff.c	Huffman entropy decoding for progressive JPEG.
-jddctmgr.c	IDCT manager (IDCT implementation selection & control).
-jidctint.c	Inverse DCT using slow-but-accurate integer method.
-jidctfst.c	Inverse DCT using faster, less accurate integer method.
-jidctflt.c	Inverse DCT using floating-point arithmetic.
-jidctred.c	Inverse DCTs with reduced-size outputs.
-jdsample.c	Upsampling.
-jdcolor.c	Color space conversion.
-jdmerge.c	Merged upsampling/color conversion (faster, lower quality).
-jquant1.c	One-pass color quantization using a fixed-spacing colormap.
-jquant2.c	Two-pass color quantization using a custom-generated colormap.
-		Also handles one-pass quantization to an externally given map.
-jdatasrc.c	Data source manager for stdio input.
-
-Support files for both compression and decompression:
-
-jerror.c	Standard error handling routines (application replaceable).
-jmemmgr.c	System-independent (more or less) memory management code.
-jutils.c	Miscellaneous utility routines.
-
-jmemmgr.c relies on a system-dependent memory management module.  The IJG
-distribution includes the following implementations of the system-dependent
-module:
-
-jmemnobs.c	"No backing store": assumes adequate virtual memory exists.
-jmemansi.c	Makes temporary files with ANSI-standard routine tmpfile().
-jmemname.c	Makes temporary files with program-generated file names.
-jmemdos.c	Custom implementation for MS-DOS (16-bit environment only):
-		can use extended and expanded memory as well as temp files.
-jmemmac.c	Custom implementation for Apple Macintosh.
-
-Exactly one of the system-dependent modules should be configured into an
-installed JPEG library (see install.doc for hints about which one to use).
-On unusual systems you may find it worthwhile to make a special
-system-dependent memory manager.
-
-
-Non-C source code files:
-
-jmemdosa.asm	80x86 assembly code support for jmemdos.c; used only in
-		MS-DOS-specific configurations of the JPEG library.
-
-
-CJPEG/DJPEG/JPEGTRAN
-====================
-
-Include files:
-
-cdjpeg.h	Declarations shared by cjpeg/djpeg/jpegtran modules.
-cderror.h	Additional error and trace message codes for cjpeg et al.
-transupp.h	Declarations for jpegtran support routines in transupp.c.
-
-C source code files:
-
-cjpeg.c		Main program for cjpeg.
-djpeg.c		Main program for djpeg.
-jpegtran.c	Main program for jpegtran.
-cdjpeg.c	Utility routines used by all three programs.
-rdcolmap.c	Code to read a colormap file for djpeg's "-map" switch.
-rdswitch.c	Code to process some of cjpeg's more complex switches.
-		Also used by jpegtran.
-transupp.c	Support code for jpegtran: lossless image manipulations.
-
-Image file reader modules for cjpeg:
-
-rdbmp.c		BMP file input.
-rdgif.c		GIF file input (now just a stub).
-rdppm.c		PPM/PGM file input.
-rdrle.c		Utah RLE file input.
-rdtarga.c	Targa file input.
-
-Image file writer modules for djpeg:
-
-wrbmp.c		BMP file output.
-wrgif.c		GIF file output (a mere shadow of its former self).
-wrppm.c		PPM/PGM file output.
-wrrle.c		Utah RLE file output.
-wrtarga.c	Targa file output.
-
-
-RDJPGCOM/WRJPGCOM
-=================
-
-C source code files:
-
-rdjpgcom.c	Stand-alone rdjpgcom application.
-wrjpgcom.c	Stand-alone wrjpgcom application.
-
-These programs do not depend on the IJG library.  They do use
-jconfig.h and jinclude.h, only to improve portability.
-
-
-ADDITIONAL FILES
-================
-
-Documentation (see README for a guide to the documentation files):
-
-README		Master documentation file.
-*.doc		Other documentation files.
-*.1		Documentation in Unix man page format.
-change.log	Version-to-version change highlights.
-example.c	Sample code for calling JPEG library.
-
-Configuration/installation files and programs (see install.doc for more info):
-
-configure	Unix shell script to perform automatic configuration.
-ltconfig	Support scripts for configure (from GNU libtool).
-ltmain.sh
-config.guess
-config.sub
-install-sh	Install shell script for those Unix systems lacking one.
-ckconfig.c	Program to generate jconfig.h on non-Unix systems.
-jconfig.doc	Template for making jconfig.h by hand.
-makefile.*	Sample makefiles for particular systems.
-jconfig.*	Sample jconfig.h for particular systems.
-ansi2knr.c	De-ANSIfier for pre-ANSI C compilers (courtesy of
-		L. Peter Deutsch and Aladdin Enterprises).
-
-Test files (see install.doc for test procedure):
-
-test*.*		Source and comparison files for confidence test.
-		These are binary image files, NOT text files.
diff --git a/tkimg1.3/libjpeg/install-sh b/tkimg1.3/libjpeg/install-sh
deleted file mode 100755
index e843669..0000000
--- a/tkimg1.3/libjpeg/install-sh
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/tkimg1.3/libjpeg/install.doc b/tkimg1.3/libjpeg/install.doc
deleted file mode 100644
index 3702b98..0000000
--- a/tkimg1.3/libjpeg/install.doc
+++ /dev/null
@@ -1,1063 +0,0 @@
-INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software
-
-Copyright (C) 1991-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file explains how to configure and install the IJG software.  We have
-tried to make this software extremely portable and flexible, so that it can be
-adapted to almost any environment.  The downside of this decision is that the
-installation process is complicated.  We have provided shortcuts to simplify
-the task on common systems.  But in any case, you will need at least a little
-familiarity with C programming and program build procedures for your system.
-
-If you are only using this software as part of a larger program, the larger
-program's installation procedure may take care of configuring the IJG code.
-For example, Ghostscript's installation script will configure the IJG code.
-You don't need to read this file if you just want to compile Ghostscript.
-
-If you are on a Unix machine, you may not need to read this file at all.
-Try doing
-	./configure
-	make
-	make test
-If that doesn't complain, do
-	make install
-(better do "make -n install" first to see if the makefile will put the files
-where you want them).  Read further if you run into snags or want to customize
-the code for your system.
-
-
-TABLE OF CONTENTS
------------------
-
-Before you start
-Configuring the software:
-	using the automatic "configure" script
-	using one of the supplied jconfig and makefile files
-	by hand
-Building the software
-Testing the software
-Installing the software
-Optional stuff
-Optimization
-Hints for specific systems
-
-
-BEFORE YOU START
-================
-
-Before installing the software you must unpack the distributed source code.
-Since you are reading this file, you have probably already succeeded in this
-task.  However, there is a potential for error if you needed to convert the
-files to the local standard text file format (for example, if you are on
-MS-DOS you may have converted LF end-of-line to CR/LF).  You must apply
-such conversion to all the files EXCEPT those whose names begin with "test".
-The test files contain binary data; if you change them in any way then the
-self-test will give bad results.
-
-Please check the last section of this file to see if there are hints for the
-specific machine or compiler you are using.
-
-
-CONFIGURING THE SOFTWARE
-========================
-
-To configure the IJG code for your system, you need to create two files:
-  * jconfig.h: contains values for system-dependent #define symbols.
-  * Makefile: controls the compilation process.
-(On a non-Unix machine, you may create "project files" or some other
-substitute for a Makefile.  jconfig.h is needed in any environment.)
-
-We provide three different ways to generate these files:
-  * On a Unix system, you can just run the "configure" script.
-  * We provide sample jconfig files and makefiles for popular machines;
-    if your machine matches one of the samples, just copy the right sample
-    files to jconfig.h and Makefile.
-  * If all else fails, read the instructions below and make your own files.
-
-
-Configuring the software using the automatic "configure" script
----------------------------------------------------------------
-
-If you are on a Unix machine, you can just type
-	./configure
-and let the configure script construct appropriate configuration files.
-If you're using "csh" on an old version of System V, you might need to type
-	sh configure
-instead to prevent csh from trying to execute configure itself.
-Expect configure to run for a few minutes, particularly on slower machines;
-it works by compiling a series of test programs.
-
-Configure was created with GNU Autoconf and it follows the usual conventions
-for GNU configure scripts.  It makes a few assumptions that you may want to
-override.  You can do this by providing optional switches to configure:
-
-* If you want to build libjpeg as a shared library, say
-	./configure --enable-shared
-To get both shared and static libraries, say
-	./configure --enable-shared --enable-static
-Note that these switches invoke GNU libtool to take care of system-dependent
-shared library building methods.  If things don't work this way, please try
-running configure without either switch; that should build a static library
-without using libtool.  If that works, your problem is probably with libtool
-not with the IJG code.  libtool is fairly new and doesn't support all flavors
-of Unix yet.  (You might be able to find a newer version of libtool than the
-one included with libjpeg; see ftp.gnu.org.  Report libtool problems to
-bug-libtool at gnu.org.)
-
-* Configure will use gcc (GNU C compiler) if it's available, otherwise cc.
-To force a particular compiler to be selected, use the CC option, for example
-	./configure CC='cc'
-The same method can be used to include any unusual compiler switches.
-For example, on HP-UX you probably want to say
-	./configure CC='cc -Aa'
-to get HP's compiler to run in ANSI mode.
-
-* The default CFLAGS setting is "-O" for non-gcc compilers, "-O2" for gcc.
-You can override this by saying, for example,
-	./configure CFLAGS='-g'
-if you want to compile with debugging support.
-
-* Configure will set up the makefile so that "make install" will install files
-into /usr/local/bin, /usr/local/man, etc.  You can specify an installation
-prefix other than "/usr/local" by giving configure the option "--prefix=PATH".
-
-* If you don't have a lot of swap space, you may need to enable the IJG
-software's internal virtual memory mechanism.  To do this, give the option
-"--enable-maxmem=N" where N is the default maxmemory limit in megabytes.
-This is discussed in more detail under "Selecting a memory manager", below.
-You probably don't need to worry about this on reasonably-sized Unix machines,
-unless you plan to process very large images.
-
-Configure has some other features that are useful if you are cross-compiling
-or working in a network of multiple machine types; but if you need those
-features, you probably already know how to use them.
-
-
-Configuring the software using one of the supplied jconfig and makefile files
------------------------------------------------------------------------------
-
-If you have one of these systems, you can just use the provided configuration
-files:
-
-Makefile	jconfig file	System and/or compiler
-
-makefile.manx	jconfig.manx	Amiga, Manx Aztec C
-makefile.sas	jconfig.sas	Amiga, SAS C
-makeproj.mac	jconfig.mac	Apple Macintosh, Metrowerks CodeWarrior
-mak*jpeg.st	jconfig.st	Atari ST/STE/TT, Pure C or Turbo C
-makefile.bcc	jconfig.bcc	MS-DOS or OS/2, Borland C
-makefile.dj	jconfig.dj	MS-DOS, DJGPP (Delorie's port of GNU C)
-makefile.mc6	jconfig.mc6	MS-DOS, Microsoft C (16-bit only)
-makefile.wat	jconfig.wat	MS-DOS, OS/2, or Windows NT, Watcom C
-makefile.vc	jconfig.vc	Windows NT/95, MS Visual C++
-make*.ds	jconfig.vc	Windows NT/95, MS Developer Studio
-makefile.mms	jconfig.vms	Digital VMS, with MMS software
-makefile.vms	jconfig.vms	Digital VMS, without MMS software
-
-Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or
-whatever your system uses as the standard makefile name).  For more info see
-the appropriate system-specific hints section near the end of this file.
-
-
-Configuring the software by hand
---------------------------------
-
-First, generate a jconfig.h file.  If you are moderately familiar with C,
-the comments in jconfig.doc should be enough information to do this; just
-copy jconfig.doc to jconfig.h and edit it appropriately.  Otherwise, you may
-prefer to use the ckconfig.c program.  You will need to compile and execute
-ckconfig.c by hand --- we hope you know at least enough to do that.
-ckconfig.c may not compile the first try (in fact, the whole idea is for it
-to fail if anything is going to).  If you get compile errors, fix them by
-editing ckconfig.c according to the directions given in ckconfig.c.  Once
-you get it to run, it will write a suitable jconfig.h file, and will also
-print out some advice about which makefile to use.
-
-You may also want to look at the canned jconfig files, if there is one for a
-system similar to yours.
-
-Second, select a makefile and copy it to Makefile (or whatever your system
-uses as the standard makefile name).  The most generic makefiles we provide
-are
-	makefile.ansi:	if your C compiler supports function prototypes
-	makefile.unix:	if not.
-(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES"
-in jconfig.h.)  You may want to start from one of the other makefiles if
-there is one for a system similar to yours.
-
-Look over the selected Makefile and adjust options as needed.  In particular
-you may want to change the CC and CFLAGS definitions.  For instance, if you
-are using GCC, set CC=gcc.  If you had to use any compiler switches to get
-ckconfig.c to work, make sure the same switches are in CFLAGS.
-
-If you are on a system that doesn't use makefiles, you'll need to set up
-project files (or whatever you do use) to compile all the source files and
-link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom.
-See the file lists in any of the makefiles to find out which files go into
-each program.  Note that the provided makefiles all make a "library" file
-libjpeg first, but you don't have to do that if you don't want to; the file
-lists identify which source files are actually needed for compression,
-decompression, or both.  As a last resort, you can make a batch script that
-just compiles everything and links it all together; makefile.vms is an example
-of this (it's for VMS systems that have no make-like utility).
-
-Here are comments about some specific configuration decisions you'll
-need to make:
-
-Command line style
-------------------
-
-These programs can use a Unix-like command line style which supports
-redirection and piping, like this:
-	cjpeg inputfile >outputfile
-	cjpeg <inputfile >outputfile
-	source program | cjpeg >outputfile
-The simpler "two file" command line style is just
-	cjpeg inputfile outputfile
-You may prefer the two-file style, particularly if you don't have pipes.
-
-You MUST use two-file style on any system that doesn't cope well with binary
-data fed through stdin/stdout; this is true for some MS-DOS compilers, for
-example.  If you're not on a Unix system, it's safest to assume you need
-two-file style.  (But if your compiler provides either the Posix-standard
-fdopen() library routine or a Microsoft-compatible setmode() routine, you
-can safely use the Unix command line style, by defining USE_FDOPEN or
-USE_SETMODE respectively.)
-
-To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE".
-
-Selecting a memory manager
---------------------------
-
-The IJG code is capable of working on images that are too big to fit in main
-memory; data is swapped out to temporary files as necessary.  However, the
-code to do this is rather system-dependent.  We provide five different
-memory managers:
-
-* jmemansi.c	This version uses the ANSI-standard library routine tmpfile(),
-		which not all non-ANSI systems have.  On some systems
-		tmpfile() may put the temporary file in a non-optimal
-		location; if you don't like what it does, use jmemname.c.
-
-* jmemname.c	This version creates named temporary files.  For anything
-		except a Unix machine, you'll need to configure the
-		select_file_name() routine appropriately; see the comments
-		near the head of jmemname.c.  If you use this version, define
-		NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files
-		are removed if the program is aborted.
-
-* jmemnobs.c	(That stands for No Backing Store :-).)  This will compile on
-		almost any system, but it assumes you have enough main memory
-		or virtual memory to hold the biggest images you work with.
-
-* jmemdos.c	This should be used with most 16-bit MS-DOS compilers.
-		See the system-specific notes about MS-DOS for more info.
-		IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in
-		jconfig.h, and include the assembly file jmemdosa.asm in the
-		programs.  The supplied makefiles and jconfig files for
-		16-bit MS-DOS compilers already do both.
-
-* jmemmac.c	Custom version for Apple Macintosh; see the system-specific
-		notes for Macintosh for more info.
-
-To use a particular memory manager, change the SYSDEPMEM variable in your
-makefile to equal the corresponding object file name (for example, jmemansi.o
-or jmemansi.obj for jmemansi.c).
-
-If you have plenty of (real or virtual) main memory, just use jmemnobs.c.
-"Plenty" means about ten bytes for every pixel in the largest images
-you plan to process, so a lot of systems don't meet this criterion.
-If yours doesn't, try jmemansi.c first.  If that doesn't compile, you'll have
-to use jmemname.c; be sure to adjust select_file_name() for local conditions.
-You may also need to change unlink() to remove() in close_backing_store().
-
-Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM
-setting to a reasonable value for your system (either by adding a #define for
-DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile).
-This value limits the amount of data space the program will attempt to
-allocate.  Code and static data space isn't counted, so the actual memory
-needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory
-setting.  Larger max-memory settings reduce the amount of I/O needed to
-process a large image, but too large a value can result in "insufficient
-memory" failures.  On most Unix machines (and other systems with virtual
-memory), just set DEFAULT_MAX_MEM to several million and forget it.  At the
-other end of the spectrum, for MS-DOS machines you probably can't go much
-above 300K to 400K.  (On MS-DOS the value refers to conventional memory only.
-Extended/expanded memory is handled separately by jmemdos.c.)
-
-
-BUILDING THE SOFTWARE
-=====================
-
-Now you should be able to compile the software.  Just say "make" (or
-whatever's necessary to start the compilation).  Have a cup of coffee.
-
-Here are some things that could go wrong:
-
-If your compiler complains about undefined structures, you should be able to
-shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h.
-
-If you have trouble with missing system include files or inclusion of the
-wrong ones, read jinclude.h.  This shouldn't happen if you used configure
-or ckconfig.c to set up jconfig.h.
-
-There are a fair number of routines that do not use all of their parameters;
-some compilers will issue warnings about this, which you can ignore.  There
-are also a few configuration checks that may give "unreachable code" warnings.
-Any other warning deserves investigation.
-
-If you don't have a getenv() library routine, define NO_GETENV.
-
-Also see the system-specific hints, below.
-
-
-TESTING THE SOFTWARE
-====================
-
-As a quick test of functionality we've included a small sample image in
-several forms:
-	testorig.jpg	Starting point for the djpeg tests.
-	testimg.ppm	The output of djpeg testorig.jpg
-	testimg.bmp	The output of djpeg -bmp -colors 256 testorig.jpg
-	testimg.jpg	The output of cjpeg testimg.ppm
-	testprog.jpg	Progressive-mode equivalent of testorig.jpg.
-	testimgp.jpg	The output of cjpeg -progressive -optimize testimg.ppm
-(The first- and second-generation .jpg files aren't identical since JPEG is
-lossy.)  If you can generate duplicates of the testimg* files then you
-probably have working programs.
-
-With most of the makefiles, "make test" will perform the necessary
-comparisons.
-
-If you're using a makefile that doesn't provide the test option, run djpeg
-and cjpeg by hand and compare the output files to testimg* with whatever
-binary file comparison tool you have.  The files should be bit-for-bit
-identical.
-
-If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you
-need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t.
-Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h.  A less likely
-configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE
-as long should take care of that one.
-
-If the cjpeg test run fails with "Missing Huffman code table entry", it's a
-good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED.  Go back to the
-configuration step and run ckconfig.c.  (This is a good plan for any other
-test failure, too.)
-
-If you are using Unix (one-file) command line style on a non-Unix system,
-it's a good idea to check that binary I/O through stdin/stdout actually
-works.  You should get the same results from "djpeg <testorig.jpg >out.ppm"
-as from "djpeg -outfile out.ppm testorig.jpg".  Note that the makefiles all
-use the latter style and therefore do not exercise stdin/stdout!  If this
-check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined.
-If it still doesn't work, better use two-file style.
-
-If you chose a memory manager other than jmemnobs.c, you should test that
-temporary-file usage works.  Try "djpeg -bmp -colors 256 -max 0 testorig.jpg"
-and make sure its output matches testimg.bmp.  If you have any really large
-images handy, try compressing them with -optimize and/or decompressing with
--colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large.
-
-NOTE: this is far from an exhaustive test of the JPEG software; some modules,
-such as 1-pass color quantization, are not exercised at all.  It's just a
-quick test to give you some confidence that you haven't missed something
-major.
-
-
-INSTALLING THE SOFTWARE
-=======================
-
-Once you're done with the above steps, you can install the software by
-copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom)
-to wherever you normally install programs.  On Unix systems, you'll also want
-to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1)
-in the man-page directory.  The pre-fab makefiles don't support this step
-since there's such a wide variety of installation procedures on different
-systems.
-
-If you generated a Makefile with the "configure" script, you can just say
-	make install
-to install the programs and their man pages into the standard places.
-(You'll probably need to be root to do this.)  We recommend first saying
-	make -n install
-to see where configure thought the files should go.  You may need to edit
-the Makefile, particularly if your system's conventions for man page
-filenames don't match what configure expects.
-
-If you want to install the IJG library itself, for use in compiling other
-programs besides ours, then you need to put the four include files
-	jpeglib.h jerror.h jconfig.h jmorecfg.h
-into your include-file directory, and put the library file libjpeg.a
-(extension may vary depending on system) wherever library files go.
-If you generated a Makefile with "configure", it will do what it thinks
-is the right thing if you say
-	make install-lib
-
-
-OPTIONAL STUFF
-==============
-
-Progress monitor:
-
-If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display
-of percent-done progress reports.  The routine provided in cdjpeg.c merely
-prints percentages to stderr, but you can customize it to do something
-fancier.
-
-Utah RLE file format support:
-
-We distribute the software with support for RLE image files (Utah Raster
-Toolkit format) disabled, because the RLE support won't compile without the
-Utah library.  If you have URT version 3.1 or later, you can enable RLE
-support as follows:
-	1.  #define RLE_SUPPORTED in jconfig.h.
-	2.  Add a -I option to CFLAGS in the Makefile for the directory
-	    containing the URT .h files (typically the "include"
-	    subdirectory of the URT distribution).
-	3.  Add -L... -lrle to LDLIBS in the Makefile, where ... specifies
-	    the directory containing the URT "librle.a" file (typically the
-	    "lib" subdirectory of the URT distribution).
-
-Support for 12-bit-deep pixel data:
-
-The JPEG standard allows either 8-bit or 12-bit data precision.  (For color,
-this means 8 or 12 bits per channel, of course.)  If you need to work with
-deeper than 8-bit data, you can compile the IJG code for 12-bit operation.
-To do so:
-  1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8.
-  2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED,
-     because the code for those formats doesn't handle 12-bit data and won't
-     even compile.  (The PPM code does work, as explained below.  The GIF
-     code works too; it scales 8-bit GIF data to and from 12-bit depth
-     automatically.)
-  3. Compile.  Don't expect "make test" to pass, since the supplied test
-     files are for 8-bit data.
-
-Currently, 12-bit support does not work on 16-bit-int machines.
-
-Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa;
-so you'll want to keep around a regular 8-bit compilation as well.
-(Run-time selection of data depth, to allow a single copy that does both,
-is possible but would probably slow things down considerably; it's very low
-on our to-do list.)
-
-The PPM reader (rdppm.c) can read 12-bit data from either text-format or
-binary-format PPM and PGM files.  Binary-format PPM/PGM files which have a
-maxval greater than 255 are assumed to use 2 bytes per sample, LSB first
-(little-endian order).  As of early 1995, 2-byte binary format is not
-officially supported by the PBMPLUS library, but it is expected that a
-future release of PBMPLUS will support it.  Note that the PPM reader will
-read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming
-data is automatically rescaled to either maxval=255 or maxval=4095 as
-appropriate for the cjpeg bit depth.
-
-The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM
-format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12.  Since this
-format is not yet widely supported, you can disable it by compiling wrppm.c
-with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a
-standard 1-byte/sample PPM or PGM file.  (Yes, this means still another copy
-of djpeg to keep around.  But hopefully you won't need it for very long.
-Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.)
-
-Of course, if you are working with 12-bit data, you probably have it stored
-in some other, nonstandard format.  In that case you'll probably want to
-write your own I/O modules to read and write your format.
-
-Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in
-order to generate valid Huffman tables.  This is necessary because our
-default Huffman tables only cover 8-bit data.
-
-Removing code:
-
-If you need to make a smaller version of the JPEG software, some optional
-functions can be removed at compile time.  See the xxx_SUPPORTED #defines in
-jconfig.h and jmorecfg.h.  If at all possible, we recommend that you leave in
-decoder support for all valid JPEG files, to ensure that you can read anyone's
-output.  Taking out support for image file formats that you don't use is the
-most painless way to make the programs smaller.  Another possibility is to
-remove some of the DCT methods: in particular, the "IFAST" method may not be
-enough faster than the others to be worth keeping on your machine.  (If you
-do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST
-to a supported method, by adding a #define in jconfig.h.)
-
-
-OPTIMIZATION
-============
-
-Unless you own a Cray, you'll probably be interested in making the JPEG
-software go as fast as possible.  This section covers some machine-dependent
-optimizations you may want to try.  We suggest that before trying any of
-this, you first get the basic installation to pass the self-test step.
-Repeat the self-test after any optimization to make sure that you haven't
-broken anything.
-
-The integer DCT routines perform a lot of multiplications.  These
-multiplications must yield 32-bit results, but none of their input values
-are more than 16 bits wide.  On many machines, notably the 680x0 and 80x86
-CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32
-bit multiply.  Unfortunately there is no portable way to specify such a
-multiplication in C, but some compilers can generate one when you use the
-right combination of casts.  See the MULTIPLYxxx macro definitions in
-jdct.h.  If your compiler makes "int" be 32 bits and "short" be 16 bits,
-defining SHORTxSHORT_32 is fairly likely to work.  When experimenting with
-alternate definitions, be sure to test not only whether the code still works
-(use the self-test), but also whether it is actually faster --- on some
-compilers, alternate definitions may compute the right answer, yet be slower
-than the default.  Timing cjpeg on a large PGM (grayscale) input file is the
-best way to check this, as the DCT will be the largest fraction of the runtime
-in that mode.  (Note: some of the distributed compiler-specific jconfig files
-already contain #define switches to select appropriate MULTIPLYxxx
-definitions.)
-
-If your machine has sufficiently fast floating point hardware, you may find
-that the float DCT method is faster than the integer DCT methods, even
-after tweaking the integer multiply macros.  In that case you may want to
-make the float DCT be the default method.  (The only objection to this is
-that float DCT results may vary slightly across machines.)  To do that, add
-"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h.  Even if you don't change
-the default, you should redefine JDCT_FASTEST, which is the method selected
-by djpeg's -fast switch.  Don't forget to update the documentation files
-(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done.
-
-If access to "short" arrays is slow on your machine, it may be a win to
-define type JCOEF as int rather than short.  This will cost a good deal of
-memory though, particularly in some multi-pass modes, so don't do it unless
-you have memory to burn and short is REALLY slow.
-
-If your compiler can compile function calls in-line, make sure the INLINE
-macro in jmorecfg.h is defined as the keyword that marks a function
-inline-able.  Some compilers have a switch that tells the compiler to inline
-any function it thinks is profitable (e.g., -finline-functions for gcc).
-Enabling such a switch is likely to make the compiled code bigger but faster.
-
-In general, it's worth trying the maximum optimization level of your compiler,
-and experimenting with any optional optimizations such as loop unrolling.
-(Unfortunately, far too many compilers have optimizer bugs ... be prepared to
-back off if the code fails self-test.)  If you do any experimentation along
-these lines, please report the optimal settings to jpeg-info at uunet.uu.net so
-we can mention them in future releases.  Be sure to specify your machine and
-compiler version.
-
-
-HINTS FOR SPECIFIC SYSTEMS
-==========================
-
-We welcome reports on changes needed for systems not mentioned here.  Submit
-'em to jpeg-info at uunet.uu.net.  Also, if configure or ckconfig.c is wrong
-about how to configure the JPEG software for your system, please let us know.
-
-
-Acorn RISC OS:
-
-(Thanks to Simon Middleton for these hints on compiling with Desktop C.)
-After renaming the files according to Acorn conventions, take a copy of
-makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and
-change these definitions as indicated:
-
-CFLAGS= -throwback -IC: -Wn
-LDLIBS=C:o.Stubs
-SYSDEPMEM=jmemansi.o
-LN=Link
-AR=LibFile -c -o
-
-Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'.  Remove the
-lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h'
-dependency section.
-
-Copy jconfig.doc to jconfig.h.  Edit jconfig.h to define TWO_FILE_COMMANDLINE
-and CHAR_IS_UNSIGNED.
-
-Run the makefile using !AMU not !Make.  If you want to use the 'clean' and
-'test' makefile entries then you will have to fiddle with the syntax a bit
-and rename the test files.
-
-
-Amiga:
-
-SAS C 6.50 reportedly is too buggy to compile the IJG code properly.
-A patch to update to 6.51 is available from SAS or AmiNet FTP sites.
-
-The supplied config files are set up to use jmemname.c as the memory
-manager, with temporary files being created on the device named by
-"JPEGTMP:".
-
-
-Atari ST/STE/TT:
- 
-Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st
-to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively.  The
-project files should work as-is with Pure C.  For Turbo C, change library
-filenames "pc..." to "tc..." in each project file.  Note that libjpeg.prj
-selects jmemansi.c as the recommended memory manager.  You'll probably want to
-adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K
-less than your normal free memory.  Put "#define DEFAULT_MAX_MEM nnnn" into
-jconfig.h to do this.
-
-To use the 68881/68882 coprocessor for the floating point DCT, add the
-compiler option "-8" to the project files and replace pcfltlib.lib with
-pc881lib.lib in cjpeg.prj and djpeg.prj.  Or if you don't have a
-coprocessor, you may prefer to remove the float DCT code by undefining
-DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float
-code will be too slow to be useful).  In that case, you can delete
-pcfltlib.lib from the project files.
-
-Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp,
-or jpegtran.ttp.  You'll have to perform the self-test by hand.
-
-We haven't bothered to include project files for rdjpgcom and wrjpgcom.
-Those source files should just be compiled by themselves; they don't
-depend on the JPEG library.
-
-There is a bug in some older versions of the Turbo C library which causes the
-space used by temporary files created with "tmpfile()" not to be freed after
-an abnormal program exit.  If you check your disk afterwards, you will find
-cluster chains that are allocated but not used by a file.  This should not
-happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly
-close temp files before exiting.  But if you use the JPEG library with your
-own code, be sure to supply a signal catcher, or else use a different
-system-dependent memory manager.
-
-
-Cray:
-
-Should you be so fortunate as to be running JPEG on a Cray YMP, there is a
-compiler bug in old versions of Cray's Standard C (prior to 3.1).  If you
-still have an old compiler, you'll need to insert a line reading
-"#pragma novector" just before the loop	
-    for (i = 1; i <= (int) htbl->bits[l]; i++)
-      huffsize[p++] = (char) l;
-in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c).
-[This bug may or may not still occur with the current IJG code, but it's
-probably a dead issue anyway...]
-
-
-HP-UX:
-
-If you have HP-UX 7.05 or later with the "software development" C compiler,
-you should run the compiler in ANSI mode.  If using the configure script,
-say
-	./configure CC='cc -Aa'
-(or -Ae if you prefer).  If configuring by hand, use makefile.ansi and add
-"-Aa" to the CFLAGS line in the makefile.
-
-If you have a pre-7.05 system, or if you are using the non-ANSI C compiler
-delivered with a minimum HP-UX system, then you must use makefile.unix
-(and do NOT add -Aa); or just run configure without the CC option.
-
-On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior
-to A.08.07.  If you get complaints about "not a typedef name", you'll have to
-use makefile.unix, or run configure without the CC option.
-
-
-Macintosh, generic comments:
-
-The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to
-provide a Unix-style command line interface.  You can use this interface on
-the Mac by means of the ccommand() library routine provided by Metrowerks
-CodeWarrior or Think C.  This is only appropriate for testing the library,
-however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want
-to develop a Mac-style user interface.  There isn't a complete example
-available at the moment, but there are some helpful starting points:
-1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to
-JPEG under System 7 and later.  This only illustrates how to use the
-compression half of the library, but it does a very nice job of that part.
-The CodeWarrior source code is available from http://www.pobox.com/~jsam.
-2. Jim Brunner prepared a Mac-style user interface for both compression and
-decompression.  Unfortunately, it hasn't been updated since IJG v4, and
-the library's API has changed considerably since then.  Still it may be of
-some help, particularly as a guide to compiling the IJG code under Think C.
-Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu
-or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx.
-
-jmemmac.c is the recommended memory manager back end for Macintosh.  It uses
-NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific
-implementation of jpeg_mem_available().  It also creates temporary files that
-follow Mac conventions.  (That part of the code relies on System-7-or-later OS
-functions.  See the comments in jmemmac.c if you need to run it on System 6.)
-NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c.
-
-You can also use jmemnobs.c, if you don't care about handling images larger
-than available memory.  If you use any memory manager back end other than
-jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and
-"DisposePtr", because Mac C libraries often have peculiar implementations of
-malloc/free.  (For instance, free() may not return the freed space to the
-Mac Memory Manager.  This is undesirable for the IJG code because jmemmgr.c
-already clumps space requests.)
-
-
-Macintosh, Metrowerks CodeWarrior:
-
-The Unix-command-line-style interface can be used by defining USE_CCOMMAND.
-You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout.
-This means that when using the cjpeg/djpeg programs, you'll have to type the
-input and output file names in the "Arguments" text-edit box, rather than
-using the file radio buttons.  (Perhaps USE_FDOPEN or USE_SETMODE would
-eliminate the problem, but I haven't heard from anyone who's tried it.)
-
-On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended
-float.  jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power
-of 2.  Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-The supplied configuration file jconfig.mac can be used for your jconfig.h;
-it includes all the recommended symbol definitions.  If you have AppleScript
-installed, you can run the supplied script makeproj.mac to create CodeWarrior
-project files for the library and the testbed applications, then build the
-library and applications.  (Thanks to Dan Sears and Don Agro for this nifty
-hack, which saves us from trying to maintain CodeWarrior project files as part
-of the IJG distribution...)
-
-
-Macintosh, Think C:
-
-The documentation in Jim Brunner's "JPEG Convert" source code (see above)
-includes detailed build instructions for Think C; it's probably somewhat
-out of date for the current release, but may be helpful.
-
-If you want to build the minimal command line version, proceed as follows.
-You'll have to prepare project files for the programs; we don't include any
-in the distribution since they are not text files.  Use the file lists in
-any of the supplied makefiles as a guide.  Also add the ANSI and Unix C
-libraries in a separate segment.  You may need to divide the JPEG files into
-more than one segment; we recommend dividing compression and decompression
-modules.  Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is
-called.  You must also define TWO_FILE_COMMANDLINE because stdin/stdout
-don't handle binary data correctly.
-
-On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float.
-jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2.
-Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-jconfig.mac should work as a jconfig.h configuration file for Think C,
-but the makeproj.mac AppleScript script is specific to CodeWarrior.  Sorry.
-
-
-MIPS R3000:
-
-MIPS's cc version 1.31 has a rather nasty optimization bug.  Don't use -O
-if you have that compiler version.  (Use "cc -V" to check the version.)
-Note that the R3000 chip is found in workstations from DEC and others.
-
-
-MS-DOS, generic comments for 16-bit compilers:
-
-The IJG code is designed to work well in 80x86 "small" or "medium" memory
-models (i.e., data pointers are 16 bits unless explicitly declared "far";
-code pointers can be either size).  You may be able to use small model to
-compile cjpeg or djpeg by itself, but you will probably have to use medium
-model for any larger application.  This won't make much difference in
-performance.  You *will* take a noticeable performance hit if you use a
-large-data memory model, and you should avoid "huge" model if at all
-possible.  Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use
-a small-data memory model; be sure it is NOT defined if you use a large-data
-model.  (The supplied makefiles and jconfig files for Borland and Microsoft C
-compile in medium model and define NEED_FAR_POINTERS.)
-
-The DOS-specific memory manager, jmemdos.c, should be used if possible.
-It needs some assembly-code routines which are in jmemdosa.asm; make sure
-your makefile assembles that file and includes it in the library.  If you
-don't have a suitable assembler, you can get pre-assembled object files for
-jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip.  (DOS-oriented
-distributions of the IJG source code often include these object files.)
-
-When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set
-MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value).  If your
-C library's far-heap malloc() can't allocate blocks that large, reduce
-MAX_ALLOC_CHUNK to whatever it can handle.
-
-If you can't use jmemdos.c for some reason --- for example, because you
-don't have an assembler to assemble jmemdosa.asm --- you'll have to fall
-back to jmemansi.c or jmemname.c.  You'll probably still need to set
-MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc()
-more than 64K at a time.  IMPORTANT: if you use jmemansi.c or jmemname.c,
-you will have to compile in a large-data memory model in order to get the
-right stdio library.  Too bad.
-
-wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB
-work area to hold the comment text.  If your C library's malloc can't
-handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c.
-
-Most MS-DOS compilers treat stdin/stdout as text files, so you must use
-two-file command line style.  But if your compiler has either fdopen() or
-setmode(), you can use one-file style if you like.  To do this, define
-USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode.
-(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.)  You
-should test that I/O through stdin/stdout produces the same results as I/O
-to explicitly named files... the "make test" procedures in the supplied
-makefiles do NOT use stdin/stdout.
-
-
-MS-DOS, generic comments for 32-bit compilers:
-
-None of the above comments about memory models apply if you are using a
-32-bit flat-memory-space environment, such as DJGPP or Watcom C.  (And you
-should use one if you have it, as performance will be much better than
-8086-compatible code!)  For flat-memory-space compilers, do NOT define
-NEED_FAR_POINTERS, and do NOT use jmemdos.c.  Use jmemnobs.c if the
-environment supplies adequate virtual memory, otherwise use jmemansi.c or
-jmemname.c.
-
-You'll still need to be careful about binary I/O through stdin/stdout.
-See the last paragraph of the previous section.
-
-
-MS-DOS, Borland C:
-
-Be sure to convert all the source files to DOS text format (CR/LF newlines).
-Although Borland C will often work OK with unmodified Unix (LF newlines)
-source files, sometimes it will give bogus compile errors.
-"Illegal character '#'" is the most common such error.  (This is true with
-Borland C 3.1, but perhaps is fixed in newer releases.)
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.bcc already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-
-MS-DOS, Microsoft C:
-
-makefile.mc6 works with Microsoft C, DOS Visual C++, etc.  It should only
-be used if you want to build a 16-bit (small or medium memory model) program.
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.mc6 already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-Note that this makefile assumes that the working copy of itself is called
-"makefile".  If you want to call it something else, say "makefile.mak",
-be sure to adjust the dependency line that reads "$(RFILE) : makefile".
-Otherwise the make will fail because it doesn't know how to create "makefile".
-Worse, some releases of Microsoft's make utilities give an incorrect error
-message in this situation.
-
-Old versions of MS C fail with an "out of macro expansion space" error
-because they can't cope with the macro TRACEMS8 (defined in jerror.h).
-If this happens to you, the easiest solution is to change TRACEMS8 to
-expand to nothing.  You'll lose the ability to dump out JPEG coefficient
-tables with djpeg -debug -debug, but at least you can compile.
-
-Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn
-off optimization entirely (remove -O from CFLAGS).  6.00A is better, but it
-still generates bad code if you enable loop optimizations (-Ol or -Ox).
-
-MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ...
-which is on by default.  To work around this bug, compile that one file
-with /Oo-.
-
-
-Microsoft Windows (all versions), generic comments:
-
-Some Windows system include files define typedef boolean as "unsigned char".
-The IJG code also defines typedef boolean, but we make it "int" by default.
-This doesn't affect the IJG programs because we don't import those Windows
-include files.  But if you use the JPEG library in your own program, and some
-of your program's files import one definition of boolean while some import the
-other, you can get all sorts of mysterious problems.  A good preventive step
-is to make the IJG library use "unsigned char" for boolean.  To do that,
-add something like this to your jconfig.h file:
-	/* Define "boolean" as unsigned char, not int, per Windows custom */
-	#ifndef __RPCNDR_H__	/* don't conflict if rpcndr.h already read */
-	typedef unsigned char boolean;
-	#endif
-	#define HAVE_BOOLEAN	/* prevent jmorecfg.h from redefining it */
-(This is already in jconfig.vc, by the way.)
-
-windef.h contains the declarations
-	#define far
-	#define FAR far
-Since jmorecfg.h tries to define FAR as empty, you may get a compiler
-warning if you include both jpeglib.h and windef.h (which windows.h
-includes).  To suppress the warning, you can put "#ifndef FAR"/"#endif"
-around the line "#define FAR" in jmorecfg.h.
-
-When using the library in a Windows application, you will almost certainly
-want to modify or replace the error handler module jerror.c, since our
-default error handler does a couple of inappropriate things:
-  1. it tries to write error and warning messages on stderr;
-  2. in event of a fatal error, it exits by calling exit().
-
-A simple stopgap solution for problem 1 is to replace the line
-	fprintf(stderr, "%s\n", buffer);
-(in output_message in jerror.c) with
-	MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR);
-It's highly recommended that you at least do that much, since otherwise
-error messages will disappear into nowhere.  (Beginning with IJG v6b, this
-code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in
-jconfig.h to enable it.)
-
-The proper solution for problem 2 is to return control to your calling
-application after a library error.  This can be done with the setjmp/longjmp
-technique discussed in libjpeg.doc and illustrated in example.c.  (NOTE:
-some older Windows C compilers provide versions of setjmp/longjmp that
-don't actually work under Windows.  You may need to use the Windows system
-functions Catch and Throw instead.)
-
-The recommended memory manager under Windows is jmemnobs.c; in other words,
-let Windows do any virtual memory management needed.  You should NOT use
-jmemdos.c nor jmemdosa.asm under Windows.
-
-For Windows 3.1, we recommend compiling in medium or large memory model;
-for newer Windows versions, use a 32-bit flat memory model.  (See the MS-DOS
-sections above for more info about memory models.)  In the 16-bit memory
-models only, you'll need to put
-	#define MAX_ALLOC_CHUNK 65520L	/* Maximum request to malloc() */
-into jconfig.h to limit allocation chunks to 64Kb.  (Without that, you'd
-have to use huge memory model, which slows things down unnecessarily.)
-jmemnobs.c works without modification in large or flat memory models, but to
-use medium model, you need to modify its jpeg_get_large and jpeg_free_large
-routines to allocate far memory.  In any case, you might like to replace
-its calls to malloc and free with direct calls on Windows memory allocation
-functions.
-
-You may also want to modify jdatasrc.c and jdatadst.c to use Windows file
-operations rather than fread/fwrite.  This is only necessary if your C
-compiler doesn't provide a competent implementation of C stdio functions.
-
-You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library
-will accept or deliver color pixels in BGR sample order, not RGB; BGR order
-is usually more convenient under Windows.  Note that this change will break
-the sample applications cjpeg/djpeg, but the library itself works fine.
-
-
-Many people want to convert the IJG library into a DLL.  This is reasonably
-straightforward, but watch out for the following:
-
-  1. Don't try to compile as a DLL in small or medium memory model; use
-large model, or even better, 32-bit flat model.  Many places in the IJG code
-assume the address of a local variable is an ordinary (not FAR) pointer;
-that isn't true in a medium-model DLL.
-
-  2. Microsoft C cannot pass file pointers between applications and DLLs.
-(See Microsoft Knowledge Base, PSS ID Number Q50336.)  So jdatasrc.c and
-jdatadst.c don't work if you open a file in your application and then pass
-the pointer to the DLL.  One workaround is to make jdatasrc.c/jdatadst.c
-part of your main application rather than part of the DLL.
-
-  3. You'll probably need to modify the macros GLOBAL() and EXTERN() to
-attach suitable linkage keywords to the exported routine names.  Similarly,
-you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers
-are declared in a way that lets application routines be called back through
-the function pointers.  These macros are in jmorecfg.h.  Typical definitions
-for a 16-bit DLL are:
-	#define GLOBAL(type)		type _far _pascal _loadds _export
-	#define EXTERN(type)		extern type _far _pascal _loadds
-	#define METHODDEF(type)		static type _far _pascal
-	#define JMETHOD(type,methodname,arglist)  \
-		type (_far _pascal *methodname) arglist
-For a 32-bit DLL you may want something like
-	#define GLOBAL(type)		__declspec(dllexport) type
-	#define EXTERN(type)		extern __declspec(dllexport) type
-Although not all the GLOBAL routines are actually intended to be called by
-the application, the performance cost of making them all DLL entry points is
-negligible.
-
-The unmodified IJG library presents a very C-specific application interface,
-so the resulting DLL is only usable from C or C++ applications.  There has
-been some talk of writing wrapper code that would present a simpler interface
-usable from other languages, such as Visual Basic.  This is on our to-do list
-but hasn't been very high priority --- any volunteers out there?
-
-
-Microsoft Windows, Borland C:
-
-The provided jconfig.bcc should work OK in a 32-bit Windows environment,
-but you'll need to tweak it in a 16-bit environment (you'd need to define
-NEED_FAR_POINTERS and MAX_ALLOC_CHUNK).  Beware that makefile.bcc will need
-alteration if you want to use it for Windows --- in particular, you should
-use jmemnobs.c not jmemdos.c under Windows.
-
-Borland C++ 4.5 fails with an internal compiler error when trying to compile
-jdmerge.c in 32-bit mode.  If enough people complain, perhaps Borland will fix
-it.  In the meantime, the simplest known workaround is to add a redundant
-definition of the variable range_limit in h2v1_merged_upsample(), at the head
-of the block that handles odd image width (about line 268 in v6 jdmerge.c):
-  /* If image width is odd, do the last output column separately */
-  if (cinfo->output_width & 1) {
-    register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */
-    cb = GETJSAMPLE(*inptr1);
-Pretty bizarre, especially since the very similar routine h2v2_merged_upsample
-doesn't trigger the bug.
-Recent reports suggest that this bug does not occur with "bcc32a" (the
-Pentium-optimized version of the compiler).
-
-Another report from a user of Borland C 4.5 was that incorrect code (leading
-to a color shift in processed images) was produced if any of the following
-optimization switch combinations were used: 
-	-Ot -Og
-	-Ot -Op
-	-Ot -Om
-So try backing off on optimization if you see such a problem.  (Are there
-several different releases all numbered "4.5"??)
-
-
-Microsoft Windows, Microsoft Visual C++:
-
-jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory
-model.  makefile.vc is intended for command-line use.  (If you are using
-the Developer Studio environment, you may prefer the DevStudio project
-files; see below.)
-
-Some users feel that it's easier to call the library from C++ code if you
-force VC++ to treat the library as C++ code, which you can do by renaming
-all the *.c files to *.cpp (and adjusting the makefile to match).  This
-avoids the need to put extern "C" { ... } around #include "jpeglib.h" in
-your C++ application.
-
-
-Microsoft Windows, Microsoft Developer Studio:
-
-We include makefiles that should work as project files in DevStudio 4.2 or
-later.  There is a library makefile that builds the IJG library as a static
-Win32 library, and an application makefile that builds the sample applications
-as Win32 console applications.  (Even if you only want the library, we
-recommend building the applications so that you can run the self-test.)
-
-To use:
-1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and
-   makeapps.ds to apps.mak.  (Note that the renaming is critical!)
-2. Click on the .mak files to construct project workspaces.
-   (If you are using DevStudio more recent than 4.2, you'll probably
-   get a message saying that the makefiles are being updated.)
-3. Build the library project, then the applications project.
-4. Move the application .exe files from `app`\Release to an
-   appropriate location on your path.
-5. To perform the self-test, execute the command line
-	NMAKE /f makefile.vc  test
-
-
-OS/2, Borland C++:
-
-Watch out for optimization bugs in older Borland compilers; you may need
-to back off the optimization switch settings.  See the comments in
-makefile.bcc.
-
-
-SGI:
-
-On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile.
-If you are using configure, you can do this by saying
-	./configure RANLIB='ar -ts'
-This change is not needed on all SGIs.  Use it only if the make fails at the
-stage of linking the completed programs.
-
-On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2"
-reportedly speeds up the float DCT method substantially, enough to make it
-faster than the default int method (but still slower than the fast int
-method).  If you use -mips2, you may want to alter the default DCT method to
-be float.  To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h.
-
-
-VMS:
-
-On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1"
-qualifier with MMS when building the JPEG package.
-
-VAX/VMS v5.5-1 may have problems with the test step of the build procedure
-reporting differences when it compares the original and test images.  If the
-error points to the last block of the files, it is most likely bogus and may
-be safely ignored.  It seems to be because the files are Stream_LF and
-Backup/Compare has difficulty with the (presumably) null padded files.
-This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1.
diff --git a/tkimg1.3/libjpeg/jcapimin.c b/tkimg1.3/libjpeg/jcapimin.c
deleted file mode 100644
index 54fb8c5..0000000
--- a/tkimg1.3/libjpeg/jcapimin.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * jcapimin.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface code for the compression half
- * of the JPEG library.  These are the "minimum" API routines that may be
- * needed in either the normal full-compression case or the transcoding-only
- * case.
- *
- * Most of the routines intended to be called directly by an application
- * are in this file or in jcapistd.c.  But also see jcparam.c for
- * parameter-setup helper routines, jcomapi.c for routines shared by
- * compression and decompression, and jctrans.c for the transcoding case.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Initialization of a JPEG compression object.
- * The error manager must already be set up (in case memory manager fails).
- */
-
-GLOBAL(void)
-jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
-{
-  int i;
-
-  /* Guard against version mismatches between library and caller. */
-  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
-  if (version != JPEG_LIB_VERSION)
-    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
-  if (structsize != SIZEOF(struct jpeg_compress_struct))
-    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
-	     (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
-
-  /* For debugging purposes, we zero the whole master structure.
-   * But the application has already set the err pointer, and may have set
-   * client_data, so we have to save and restore those fields.
-   * Note: if application hasn't set client_data, tools like Purify may
-   * complain here.
-   */
-  {
-    struct jpeg_error_mgr * err = cinfo->err;
-    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
-    MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
-    cinfo->err = err;
-    cinfo->client_data = client_data;
-  }
-  cinfo->is_decompressor = FALSE;
-
-  /* Initialize a memory manager instance for this object */
-  jinit_memory_mgr((j_common_ptr) cinfo);
-
-  /* Zero out pointers to permanent structures. */
-  cinfo->progress = NULL;
-  cinfo->dest = NULL;
-
-  cinfo->comp_info = NULL;
-
-  for (i = 0; i < NUM_QUANT_TBLS; i++)
-    cinfo->quant_tbl_ptrs[i] = NULL;
-
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    cinfo->dc_huff_tbl_ptrs[i] = NULL;
-    cinfo->ac_huff_tbl_ptrs[i] = NULL;
-  }
-
-  cinfo->script_space = NULL;
-
-  cinfo->input_gamma = 1.0;	/* in case application forgets */
-
-  /* OK, I'm ready */
-  cinfo->global_state = CSTATE_START;
-}
-
-
-/*
- * Destruction of a JPEG compression object
- */
-
-GLOBAL(void)
-jpeg_destroy_compress (j_compress_ptr cinfo)
-{
-  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
-}
-
-
-/*
- * Abort processing of a JPEG compression operation,
- * but don't destroy the object itself.
- */
-
-GLOBAL(void)
-jpeg_abort_compress (j_compress_ptr cinfo)
-{
-  jpeg_abort((j_common_ptr) cinfo); /* use common routine */
-}
-
-
-/*
- * Forcibly suppress or un-suppress all quantization and Huffman tables.
- * Marks all currently defined tables as already written (if suppress)
- * or not written (if !suppress).  This will control whether they get emitted
- * by a subsequent jpeg_start_compress call.
- *
- * This routine is exported for use by applications that want to produce
- * abbreviated JPEG datastreams.  It logically belongs in jcparam.c, but
- * since it is called by jpeg_start_compress, we put it here --- otherwise
- * jcparam.o would be linked whether the application used it or not.
- */
-
-GLOBAL(void)
-jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
-{
-  int i;
-  JQUANT_TBL * qtbl;
-  JHUFF_TBL * htbl;
-
-  for (i = 0; i < NUM_QUANT_TBLS; i++) {
-    if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)
-      qtbl->sent_table = suppress;
-  }
-
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)
-      htbl->sent_table = suppress;
-    if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)
-      htbl->sent_table = suppress;
-  }
-}
-
-
-/*
- * Finish JPEG compression.
- *
- * If a multipass operating mode was selected, this may do a great deal of
- * work including most of the actual output.
- */
-
-GLOBAL(void)
-jpeg_finish_compress (j_compress_ptr cinfo)
-{
-  JDIMENSION iMCU_row;
-
-  if (cinfo->global_state == CSTATE_SCANNING ||
-      cinfo->global_state == CSTATE_RAW_OK) {
-    /* Terminate first pass */
-    if (cinfo->next_scanline < cinfo->image_height)
-      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
-    (*cinfo->master->finish_pass) (cinfo);
-  } else if (cinfo->global_state != CSTATE_WRCOEFS)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  /* Perform any remaining passes */
-  while (! cinfo->master->is_last_pass) {
-    (*cinfo->master->prepare_for_pass) (cinfo);
-    for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
-      if (cinfo->progress != NULL) {
-	cinfo->progress->pass_counter = (long) iMCU_row;
-	cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
-	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-      }
-      /* We bypass the main controller and invoke coef controller directly;
-       * all work is being done from the coefficient buffer.
-       */
-      if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))
-	ERREXIT(cinfo, JERR_CANT_SUSPEND);
-    }
-    (*cinfo->master->finish_pass) (cinfo);
-  }
-  /* Write EOI, do final cleanup */
-  (*cinfo->marker->write_file_trailer) (cinfo);
-  (*cinfo->dest->term_destination) (cinfo);
-  /* We can use jpeg_abort to release memory and reset global_state */
-  jpeg_abort((j_common_ptr) cinfo);
-}
-
-
-/*
- * Write a special marker.
- * This is only recommended for writing COM or APPn markers.
- * Must be called after jpeg_start_compress() and before
- * first call to jpeg_write_scanlines() or jpeg_write_raw_data().
- */
-
-GLOBAL(void)
-jpeg_write_marker (j_compress_ptr cinfo, int marker,
-		   const JOCTET *dataptr, unsigned int datalen)
-{
-  JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
-
-  if (cinfo->next_scanline != 0 ||
-      (cinfo->global_state != CSTATE_SCANNING &&
-       cinfo->global_state != CSTATE_RAW_OK &&
-       cinfo->global_state != CSTATE_WRCOEFS))
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
-  write_marker_byte = cinfo->marker->write_marker_byte;	/* copy for speed */
-  while (datalen--) {
-    (*write_marker_byte) (cinfo, *dataptr);
-    dataptr++;
-  }
-}
-
-/* Same, but piecemeal. */
-
-GLOBAL(void)
-jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
-{
-  if (cinfo->next_scanline != 0 ||
-      (cinfo->global_state != CSTATE_SCANNING &&
-       cinfo->global_state != CSTATE_RAW_OK &&
-       cinfo->global_state != CSTATE_WRCOEFS))
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
-}
-
-GLOBAL(void)
-jpeg_write_m_byte (j_compress_ptr cinfo, int val)
-{
-  (*cinfo->marker->write_marker_byte) (cinfo, val);
-}
-
-
-/*
- * Alternate compression function: just write an abbreviated table file.
- * Before calling this, all parameters and a data destination must be set up.
- *
- * To produce a pair of files containing abbreviated tables and abbreviated
- * image data, one would proceed as follows:
- *
- *		initialize JPEG object
- *		set JPEG parameters
- *		set destination to table file
- *		jpeg_write_tables(cinfo);
- *		set destination to image file
- *		jpeg_start_compress(cinfo, FALSE);
- *		write data...
- *		jpeg_finish_compress(cinfo);
- *
- * jpeg_write_tables has the side effect of marking all tables written
- * (same as jpeg_suppress_tables(..., TRUE)).  Thus a subsequent start_compress
- * will not re-emit the tables unless it is passed write_all_tables=TRUE.
- */
-
-GLOBAL(void)
-jpeg_write_tables (j_compress_ptr cinfo)
-{
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  /* (Re)initialize error mgr and destination modules */
-  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
-  (*cinfo->dest->init_destination) (cinfo);
-  /* Initialize the marker writer ... bit of a crock to do it here. */
-  jinit_marker_writer(cinfo);
-  /* Write them tables! */
-  (*cinfo->marker->write_tables_only) (cinfo);
-  /* And clean up. */
-  (*cinfo->dest->term_destination) (cinfo);
-  /*
-   * In library releases up through v6a, we called jpeg_abort() here to free
-   * any working memory allocated by the destination manager and marker
-   * writer.  Some applications had a problem with that: they allocated space
-   * of their own from the library memory manager, and didn't want it to go
-   * away during write_tables.  So now we do nothing.  This will cause a
-   * memory leak if an app calls write_tables repeatedly without doing a full
-   * compression cycle or otherwise resetting the JPEG object.  However, that
-   * seems less bad than unexpectedly freeing memory in the normal case.
-   * An app that prefers the old behavior can call jpeg_abort for itself after
-   * each call to jpeg_write_tables().
-   */
-}
diff --git a/tkimg1.3/libjpeg/jcapistd.c b/tkimg1.3/libjpeg/jcapistd.c
deleted file mode 100644
index c0320b1..0000000
--- a/tkimg1.3/libjpeg/jcapistd.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * jcapistd.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface code for the compression half
- * of the JPEG library.  These are the "standard" API routines that are
- * used in the normal full-compression case.  They are not used by a
- * transcoding-only application.  Note that if an application links in
- * jpeg_start_compress, it will end up linking in the entire compressor.
- * We thus must separate this file from jcapimin.c to avoid linking the
- * whole compression library into a transcoder.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Compression initialization.
- * Before calling this, all parameters and a data destination must be set up.
- *
- * We require a write_all_tables parameter as a failsafe check when writing
- * multiple datastreams from the same compression object.  Since prior runs
- * will have left all the tables marked sent_table=TRUE, a subsequent run
- * would emit an abbreviated stream (no tables) by default.  This may be what
- * is wanted, but for safety's sake it should not be the default behavior:
- * programmers should have to make a deliberate choice to emit abbreviated
- * images.  Therefore the documentation and examples should encourage people
- * to pass write_all_tables=TRUE; then it will take active thought to do the
- * wrong thing.
- */
-
-GLOBAL(void)
-jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
-{
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  if (write_all_tables)
-    jpeg_suppress_tables(cinfo, FALSE);	/* mark all tables to be written */
-
-  /* (Re)initialize error mgr and destination modules */
-  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
-  (*cinfo->dest->init_destination) (cinfo);
-  /* Perform master selection of active modules */
-  jinit_compress_master(cinfo);
-  /* Set up for the first pass */
-  (*cinfo->master->prepare_for_pass) (cinfo);
-  /* Ready for application to drive first pass through jpeg_write_scanlines
-   * or jpeg_write_raw_data.
-   */
-  cinfo->next_scanline = 0;
-  cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING);
-}
-
-
-/*
- * Write some scanlines of data to the JPEG compressor.
- *
- * The return value will be the number of lines actually written.
- * This should be less than the supplied num_lines only in case that
- * the data destination module has requested suspension of the compressor,
- * or if more than image_height scanlines are passed in.
- *
- * Note: we warn about excess calls to jpeg_write_scanlines() since
- * this likely signals an application programmer error.  However,
- * excess scanlines passed in the last valid call are *silently* ignored,
- * so that the application need not adjust num_lines for end-of-image
- * when using a multiple-scanline buffer.
- */
-
-GLOBAL(JDIMENSION)
-jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
-		      JDIMENSION num_lines)
-{
-  JDIMENSION row_ctr, rows_left;
-
-  if (cinfo->global_state != CSTATE_SCANNING)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  if (cinfo->next_scanline >= cinfo->image_height)
-    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
-
-  /* Call progress monitor hook if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
-    cinfo->progress->pass_limit = (long) cinfo->image_height;
-    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-  }
-
-  /* Give master control module another chance if this is first call to
-   * jpeg_write_scanlines.  This lets output of the frame/scan headers be
-   * delayed so that application can write COM, etc, markers between
-   * jpeg_start_compress and jpeg_write_scanlines.
-   */
-  if (cinfo->master->call_pass_startup)
-    (*cinfo->master->pass_startup) (cinfo);
-
-  /* Ignore any extra scanlines at bottom of image. */
-  rows_left = cinfo->image_height - cinfo->next_scanline;
-  if (num_lines > rows_left)
-    num_lines = rows_left;
-
-  row_ctr = 0;
-  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines);
-  cinfo->next_scanline += row_ctr;
-  return row_ctr;
-}
-
-
-/*
- * Alternate entry point to write raw data.
- * Processes exactly one iMCU row per call, unless suspended.
- */
-
-GLOBAL(JDIMENSION)
-jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
-		     JDIMENSION num_lines)
-{
-  JDIMENSION lines_per_iMCU_row;
-
-  if (cinfo->global_state != CSTATE_RAW_OK)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  if (cinfo->next_scanline >= cinfo->image_height) {
-    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
-    return 0;
-  }
-
-  /* Call progress monitor hook if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
-    cinfo->progress->pass_limit = (long) cinfo->image_height;
-    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-  }
-
-  /* Give master control module another chance if this is first call to
-   * jpeg_write_raw_data.  This lets output of the frame/scan headers be
-   * delayed so that application can write COM, etc, markers between
-   * jpeg_start_compress and jpeg_write_raw_data.
-   */
-  if (cinfo->master->call_pass_startup)
-    (*cinfo->master->pass_startup) (cinfo);
-
-  /* Verify that at least one iMCU row has been passed. */
-  lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;
-  if (num_lines < lines_per_iMCU_row)
-    ERREXIT(cinfo, JERR_BUFFER_SIZE);
-
-  /* Directly compress the row. */
-  if (! (*cinfo->coef->compress_data) (cinfo, data)) {
-    /* If compressor did not consume the whole row, suspend processing. */
-    return 0;
-  }
-
-  /* OK, we processed one iMCU row. */
-  cinfo->next_scanline += lines_per_iMCU_row;
-  return lines_per_iMCU_row;
-}
diff --git a/tkimg1.3/libjpeg/jccoefct.c b/tkimg1.3/libjpeg/jccoefct.c
deleted file mode 100644
index 1963ddb..0000000
--- a/tkimg1.3/libjpeg/jccoefct.c
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * jccoefct.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the coefficient buffer controller for compression.
- * This controller is the top level of the JPEG compressor proper.
- * The coefficient buffer lies between forward-DCT and entropy encoding steps.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* We use a full-image coefficient buffer when doing Huffman optimization,
- * and also for writing multiple-scan JPEG files.  In all cases, the DCT
- * step is run during the first pass, and subsequent passes need only read
- * the buffered coefficients.
- */
-#ifdef ENTROPY_OPT_SUPPORTED
-#define FULL_COEF_BUFFER_SUPPORTED
-#else
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-#define FULL_COEF_BUFFER_SUPPORTED
-#endif
-#endif
-
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_c_coef_controller pub; /* public fields */
-
-  JDIMENSION iMCU_row_num;	/* iMCU row # within image */
-  JDIMENSION mcu_ctr;		/* counts MCUs processed in current row */
-  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
-  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
-
-  /* For single-pass compression, it's sufficient to buffer just one MCU
-   * (although this may prove a bit slow in practice).  We allocate a
-   * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
-   * MCU constructed and sent.  (On 80x86, the workspace is FAR even though
-   * it's not really very big; this is to keep the module interfaces unchanged
-   * when a large coefficient buffer is necessary.)
-   * In multi-pass modes, this array points to the current MCU's blocks
-   * within the virtual arrays.
-   */
-  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
-
-  /* In multi-pass modes, we need a virtual block array for each component. */
-  jvirt_barray_ptr whole_image[MAX_COMPONENTS];
-} my_coef_controller;
-
-typedef my_coef_controller * my_coef_ptr;
-
-
-/* Forward declarations */
-METHODDEF(boolean) compress_data
-    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
-#ifdef FULL_COEF_BUFFER_SUPPORTED
-METHODDEF(boolean) compress_first_pass
-    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
-METHODDEF(boolean) compress_output
-    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
-#endif
-
-
-LOCAL(void)
-start_iMCU_row (j_compress_ptr cinfo)
-/* Reset within-iMCU-row counters for a new row */
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  /* In an interleaved scan, an MCU row is the same as an iMCU row.
-   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
-   * But at the bottom of the image, process only what's left.
-   */
-  if (cinfo->comps_in_scan > 1) {
-    coef->MCU_rows_per_iMCU_row = 1;
-  } else {
-    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
-    else
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
-  }
-
-  coef->mcu_ctr = 0;
-  coef->MCU_vert_offset = 0;
-}
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  coef->iMCU_row_num = 0;
-  start_iMCU_row(cinfo);
-
-  switch (pass_mode) {
-  case JBUF_PASS_THRU:
-    if (coef->whole_image[0] != NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    coef->pub.compress_data = compress_data;
-    break;
-#ifdef FULL_COEF_BUFFER_SUPPORTED
-  case JBUF_SAVE_AND_PASS:
-    if (coef->whole_image[0] == NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    coef->pub.compress_data = compress_first_pass;
-    break;
-  case JBUF_CRANK_DEST:
-    if (coef->whole_image[0] == NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    coef->pub.compress_data = compress_output;
-    break;
-#endif
-  default:
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    break;
-  }
-}
-
-
-/*
- * Process some data in the single-pass case.
- * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
- * per call, ie, v_samp_factor block rows for each component in the image.
- * Returns TRUE if the iMCU row is completed, FALSE if suspended.
- *
- * NB: input_buf contains a plane for each component in image,
- * which we index according to the component's SOF position.
- */
-
-METHODDEF(boolean)
-compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION MCU_col_num;	/* index of current MCU within row */
-  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  int blkn, bi, ci, yindex, yoffset, blockcnt;
-  JDIMENSION ypos, xpos;
-  jpeg_component_info *compptr;
-
-  /* Loop to write as much as one whole iMCU row */
-  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
-       yoffset++) {
-    for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col;
-	 MCU_col_num++) {
-      /* Determine where data comes from in input_buf and do the DCT thing.
-       * Each call on forward_DCT processes a horizontal row of DCT blocks
-       * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks
-       * sequentially.  Dummy blocks at the right or bottom edge are filled in
-       * specially.  The data in them does not matter for image reconstruction,
-       * so we fill them with values that will encode to the smallest amount of
-       * data, viz: all zeroes in the AC entries, DC entries equal to previous
-       * block's DC value.  (Thanks to Thomas Kinsman for this idea.)
-       */
-      blkn = 0;
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-	compptr = cinfo->cur_comp_info[ci];
-	blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
-						: compptr->last_col_width;
-	xpos = MCU_col_num * compptr->MCU_sample_width;
-	ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */
-	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
-	  if (coef->iMCU_row_num < last_iMCU_row ||
-	      yoffset+yindex < compptr->last_row_height) {
-	    (*cinfo->fdct->forward_DCT) (cinfo, compptr,
-					 input_buf[compptr->component_index],
-					 coef->MCU_buffer[blkn],
-					 ypos, xpos, (JDIMENSION) blockcnt);
-	    if (blockcnt < compptr->MCU_width) {
-	      /* Create some dummy blocks at the right edge of the image. */
-	      jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],
-			(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));
-	      for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
-		coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
-	      }
-	    }
-	  } else {
-	    /* Create a row of dummy blocks at the bottom of the image. */
-	    jzero_far((void FAR *) coef->MCU_buffer[blkn],
-		      compptr->MCU_width * SIZEOF(JBLOCK));
-	    for (bi = 0; bi < compptr->MCU_width; bi++) {
-	      coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
-	    }
-	  }
-	  blkn += compptr->MCU_width;
-	  ypos += DCTSIZE;
-	}
-      }
-      /* Try to write the MCU.  In event of a suspension failure, we will
-       * re-DCT the MCU on restart (a bit inefficient, could be fixed...)
-       */
-      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
-	/* Suspension forced; update state counters and exit */
-	coef->MCU_vert_offset = yoffset;
-	coef->mcu_ctr = MCU_col_num;
-	return FALSE;
-      }
-    }
-    /* Completed an MCU row, but perhaps not an iMCU row */
-    coef->mcu_ctr = 0;
-  }
-  /* Completed the iMCU row, advance counters for next one */
-  coef->iMCU_row_num++;
-  start_iMCU_row(cinfo);
-  return TRUE;
-}
-
-
-#ifdef FULL_COEF_BUFFER_SUPPORTED
-
-/*
- * Process some data in the first pass of a multi-pass case.
- * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
- * per call, ie, v_samp_factor block rows for each component in the image.
- * This amount of data is read from the source buffer, DCT'd and quantized,
- * and saved into the virtual arrays.  We also generate suitable dummy blocks
- * as needed at the right and lower edges.  (The dummy blocks are constructed
- * in the virtual arrays, which have been padded appropriately.)  This makes
- * it possible for subsequent passes not to worry about real vs. dummy blocks.
- *
- * We must also emit the data to the entropy encoder.  This is conveniently
- * done by calling compress_output() after we've loaded the current strip
- * of the virtual arrays.
- *
- * NB: input_buf contains a plane for each component in image.  All
- * components are DCT'd and loaded into the virtual arrays in this pass.
- * However, it may be that only a subset of the components are emitted to
- * the entropy encoder during this first pass; be careful about looking
- * at the scan-dependent variables (MCU dimensions, etc).
- */
-
-METHODDEF(boolean)
-compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  JDIMENSION blocks_across, MCUs_across, MCUindex;
-  int bi, ci, h_samp_factor, block_row, block_rows, ndummy;
-  JCOEF lastDC;
-  jpeg_component_info *compptr;
-  JBLOCKARRAY buffer;
-  JBLOCKROW thisblockrow, lastblockrow;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Align the virtual buffer for this component. */
-    buffer = (*cinfo->mem->access_virt_barray)
-      ((j_common_ptr) cinfo, coef->whole_image[ci],
-       coef->iMCU_row_num * compptr->v_samp_factor,
-       (JDIMENSION) compptr->v_samp_factor, TRUE);
-    /* Count non-dummy DCT block rows in this iMCU row. */
-    if (coef->iMCU_row_num < last_iMCU_row)
-      block_rows = compptr->v_samp_factor;
-    else {
-      /* NB: can't use last_row_height here, since may not be set! */
-      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
-      if (block_rows == 0) block_rows = compptr->v_samp_factor;
-    }
-    blocks_across = compptr->width_in_blocks;
-    h_samp_factor = compptr->h_samp_factor;
-    /* Count number of dummy blocks to be added at the right margin. */
-    ndummy = (int) (blocks_across % h_samp_factor);
-    if (ndummy > 0)
-      ndummy = h_samp_factor - ndummy;
-    /* Perform DCT for all non-dummy blocks in this iMCU row.  Each call
-     * on forward_DCT processes a complete horizontal row of DCT blocks.
-     */
-    for (block_row = 0; block_row < block_rows; block_row++) {
-      thisblockrow = buffer[block_row];
-      (*cinfo->fdct->forward_DCT) (cinfo, compptr,
-				   input_buf[ci], thisblockrow,
-				   (JDIMENSION) (block_row * DCTSIZE),
-				   (JDIMENSION) 0, blocks_across);
-      if (ndummy > 0) {
-	/* Create dummy blocks at the right edge of the image. */
-	thisblockrow += blocks_across; /* => first dummy block */
-	jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK));
-	lastDC = thisblockrow[-1][0];
-	for (bi = 0; bi < ndummy; bi++) {
-	  thisblockrow[bi][0] = lastDC;
-	}
-      }
-    }
-    /* If at end of image, create dummy block rows as needed.
-     * The tricky part here is that within each MCU, we want the DC values
-     * of the dummy blocks to match the last real block's DC value.
-     * This squeezes a few more bytes out of the resulting file...
-     */
-    if (coef->iMCU_row_num == last_iMCU_row) {
-      blocks_across += ndummy;	/* include lower right corner */
-      MCUs_across = blocks_across / h_samp_factor;
-      for (block_row = block_rows; block_row < compptr->v_samp_factor;
-	   block_row++) {
-	thisblockrow = buffer[block_row];
-	lastblockrow = buffer[block_row-1];
-	jzero_far((void FAR *) thisblockrow,
-		  (size_t) (blocks_across * SIZEOF(JBLOCK)));
-	for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
-	  lastDC = lastblockrow[h_samp_factor-1][0];
-	  for (bi = 0; bi < h_samp_factor; bi++) {
-	    thisblockrow[bi][0] = lastDC;
-	  }
-	  thisblockrow += h_samp_factor; /* advance to next MCU in row */
-	  lastblockrow += h_samp_factor;
-	}
-      }
-    }
-  }
-  /* NB: compress_output will increment iMCU_row_num if successful.
-   * A suspension return will result in redoing all the work above next time.
-   */
-
-  /* Emit data to the entropy encoder, sharing code with subsequent passes */
-  return compress_output(cinfo, input_buf);
-}
-
-
-/*
- * Process some data in subsequent passes of a multi-pass case.
- * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
- * per call, ie, v_samp_factor block rows for each component in the scan.
- * The data is obtained from the virtual arrays and fed to the entropy coder.
- * Returns TRUE if the iMCU row is completed, FALSE if suspended.
- *
- * NB: input_buf is ignored; it is likely to be a NULL pointer.
- */
-
-METHODDEF(boolean)
-compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION MCU_col_num;	/* index of current MCU within row */
-  int blkn, ci, xindex, yindex, yoffset;
-  JDIMENSION start_col;
-  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
-  JBLOCKROW buffer_ptr;
-  jpeg_component_info *compptr;
-
-  /* Align the virtual buffers for the components used in this scan.
-   * NB: during first pass, this is safe only because the buffers will
-   * already be aligned properly, so jmemmgr.c won't need to do any I/O.
-   */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    buffer[ci] = (*cinfo->mem->access_virt_barray)
-      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
-       coef->iMCU_row_num * compptr->v_samp_factor,
-       (JDIMENSION) compptr->v_samp_factor, FALSE);
-  }
-
-  /* Loop to process one whole iMCU row */
-  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
-       yoffset++) {
-    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
-	 MCU_col_num++) {
-      /* Construct list of pointers to DCT blocks belonging to this MCU */
-      blkn = 0;			/* index of current DCT block within MCU */
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-	compptr = cinfo->cur_comp_info[ci];
-	start_col = MCU_col_num * compptr->MCU_width;
-	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
-	  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
-	  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
-	    coef->MCU_buffer[blkn++] = buffer_ptr++;
-	  }
-	}
-      }
-      /* Try to write the MCU. */
-      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
-	/* Suspension forced; update state counters and exit */
-	coef->MCU_vert_offset = yoffset;
-	coef->mcu_ctr = MCU_col_num;
-	return FALSE;
-      }
-    }
-    /* Completed an MCU row, but perhaps not an iMCU row */
-    coef->mcu_ctr = 0;
-  }
-  /* Completed the iMCU row, advance counters for next one */
-  coef->iMCU_row_num++;
-  start_iMCU_row(cinfo);
-  return TRUE;
-}
-
-#endif /* FULL_COEF_BUFFER_SUPPORTED */
-
-
-/*
- * Initialize coefficient buffer controller.
- */
-
-GLOBAL(void)
-jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
-{
-  my_coef_ptr coef;
-
-  coef = (my_coef_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_coef_controller));
-  cinfo->coef = (struct jpeg_c_coef_controller *) coef;
-  coef->pub.start_pass = start_pass_coef;
-
-  /* Create the coefficient buffer. */
-  if (need_full_buffer) {
-#ifdef FULL_COEF_BUFFER_SUPPORTED
-    /* Allocate a full-image virtual array for each component, */
-    /* padded to a multiple of samp_factor DCT blocks in each direction. */
-    int ci;
-    jpeg_component_info *compptr;
-
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
-				(long) compptr->h_samp_factor),
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor),
-	 (JDIMENSION) compptr->v_samp_factor);
-    }
-#else
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-#endif
-  } else {
-    /* We only need a single-MCU buffer. */
-    JBLOCKROW buffer;
-    int i;
-
-    buffer = (JBLOCKROW)
-      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
-    for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
-      coef->MCU_buffer[i] = buffer + i;
-    }
-    coef->whole_image[0] = NULL; /* flag for no virtual arrays */
-  }
-}
diff --git a/tkimg1.3/libjpeg/jccolor.c b/tkimg1.3/libjpeg/jccolor.c
deleted file mode 100644
index 0a8a4b5..0000000
--- a/tkimg1.3/libjpeg/jccolor.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * jccolor.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains input colorspace conversion routines.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_color_converter pub; /* public fields */
-
-  /* Private state for RGB->YCC conversion */
-  INT32 * rgb_ycc_tab;		/* => table for RGB to YCbCr conversion */
-} my_color_converter;
-
-typedef my_color_converter * my_cconvert_ptr;
-
-
-/**************** RGB -> YCbCr conversion: most common case **************/
-
-/*
- * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
- * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
- * The conversion equations to be implemented are therefore
- *	Y  =  0.29900 * R + 0.58700 * G + 0.11400 * B
- *	Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B  + CENTERJSAMPLE
- *	Cr =  0.50000 * R - 0.41869 * G - 0.08131 * B  + CENTERJSAMPLE
- * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
- * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2,
- * rather than CENTERJSAMPLE, for Cb and Cr.  This gave equal positive and
- * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0)
- * were not represented exactly.  Now we sacrifice exact representation of
- * maximum red and maximum blue in order to get exact grayscales.
- *
- * To avoid floating-point arithmetic, we represent the fractional constants
- * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
- * the products by 2^16, with appropriate rounding, to get the correct answer.
- *
- * For even more speed, we avoid doing any multiplications in the inner loop
- * by precalculating the constants times R,G,B for all possible values.
- * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
- * for 12-bit samples it is still acceptable.  It's not very reasonable for
- * 16-bit samples, but if you want lossless storage you shouldn't be changing
- * colorspace anyway.
- * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included
- * in the tables to save adding them separately in the inner loop.
- */
-
-#define SCALEBITS	16	/* speediest right-shift on some machines */
-#define CBCR_OFFSET	((INT32) CENTERJSAMPLE << SCALEBITS)
-#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
-#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
-
-/* We allocate one big table and divide it up into eight parts, instead of
- * doing eight alloc_small requests.  This lets us use a single table base
- * address, which can be held in a register in the inner loops on many
- * machines (more than can hold all eight addresses, anyway).
- */
-
-#define R_Y_OFF		0			/* offset to R => Y section */
-#define G_Y_OFF		(1*(MAXJSAMPLE+1))	/* offset to G => Y section */
-#define B_Y_OFF		(2*(MAXJSAMPLE+1))	/* etc. */
-#define R_CB_OFF	(3*(MAXJSAMPLE+1))
-#define G_CB_OFF	(4*(MAXJSAMPLE+1))
-#define B_CB_OFF	(5*(MAXJSAMPLE+1))
-#define R_CR_OFF	B_CB_OFF		/* B=>Cb, R=>Cr are the same */
-#define G_CR_OFF	(6*(MAXJSAMPLE+1))
-#define B_CR_OFF	(7*(MAXJSAMPLE+1))
-#define TABLE_SIZE	(8*(MAXJSAMPLE+1))
-
-
-/*
- * Initialize for RGB->YCC colorspace conversion.
- */
-
-METHODDEF(void)
-rgb_ycc_start (j_compress_ptr cinfo)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  INT32 * rgb_ycc_tab;
-  INT32 i;
-
-  /* Allocate and fill in the conversion tables. */
-  cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(TABLE_SIZE * SIZEOF(INT32)));
-
-  for (i = 0; i <= MAXJSAMPLE; i++) {
-    rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i;
-    rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i;
-    rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i     + ONE_HALF;
-    rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i;
-    rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i;
-    /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr.
-     * This ensures that the maximum output will round to MAXJSAMPLE
-     * not MAXJSAMPLE+1, and thus that we don't have to range-limit.
-     */
-    rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;
-/*  B=>Cb and R=>Cr tables are the same
-    rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;
-*/
-    rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i;
-    rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i;
-  }
-}
-
-
-/*
- * Convert some rows of samples to the JPEG colorspace.
- *
- * Note that we change from the application's interleaved-pixel format
- * to our internal noninterleaved, one-plane-per-component format.
- * The input buffer is therefore three times as wide as the output buffer.
- *
- * A starting row offset is provided only for the output buffer.  The caller
- * can easily adjust the passed input_buf value to accommodate any row
- * offset required on that side.
- */
-
-METHODDEF(void)
-rgb_ycc_convert (j_compress_ptr cinfo,
-		 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-		 JDIMENSION output_row, int num_rows)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->image_width;
-
-  while (--num_rows >= 0) {
-    inptr = *input_buf++;
-    outptr0 = output_buf[0][output_row];
-    outptr1 = output_buf[1][output_row];
-    outptr2 = output_buf[2][output_row];
-    output_row++;
-    for (col = 0; col < num_cols; col++) {
-      r = GETJSAMPLE(inptr[RGB_RED]);
-      g = GETJSAMPLE(inptr[RGB_GREEN]);
-      b = GETJSAMPLE(inptr[RGB_BLUE]);
-      inptr += RGB_PIXELSIZE;
-      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations
-       * must be too; we do not need an explicit range-limiting operation.
-       * Hence the value being shifted is never negative, and we don't
-       * need the general RIGHT_SHIFT macro.
-       */
-      /* Y */
-      outptr0[col] = (JSAMPLE)
-		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
-		 >> SCALEBITS);
-      /* Cb */
-      outptr1[col] = (JSAMPLE)
-		((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])
-		 >> SCALEBITS);
-      /* Cr */
-      outptr2[col] = (JSAMPLE)
-		((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])
-		 >> SCALEBITS);
-    }
-  }
-}
-
-
-/**************** Cases other than RGB -> YCbCr **************/
-
-
-/*
- * Convert some rows of samples to the JPEG colorspace.
- * This version handles RGB->grayscale conversion, which is the same
- * as the RGB->Y portion of RGB->YCbCr.
- * We assume rgb_ycc_start has been called (we only use the Y tables).
- */
-
-METHODDEF(void)
-rgb_gray_convert (j_compress_ptr cinfo,
-		  JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-		  JDIMENSION output_row, int num_rows)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->image_width;
-
-  while (--num_rows >= 0) {
-    inptr = *input_buf++;
-    outptr = output_buf[0][output_row];
-    output_row++;
-    for (col = 0; col < num_cols; col++) {
-      r = GETJSAMPLE(inptr[RGB_RED]);
-      g = GETJSAMPLE(inptr[RGB_GREEN]);
-      b = GETJSAMPLE(inptr[RGB_BLUE]);
-      inptr += RGB_PIXELSIZE;
-      /* Y */
-      outptr[col] = (JSAMPLE)
-		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
-		 >> SCALEBITS);
-    }
-  }
-}
-
-
-/*
- * Convert some rows of samples to the JPEG colorspace.
- * This version handles Adobe-style CMYK->YCCK conversion,
- * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same
- * conversion as above, while passing K (black) unchanged.
- * We assume rgb_ycc_start has been called.
- */
-
-METHODDEF(void)
-cmyk_ycck_convert (j_compress_ptr cinfo,
-		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-		   JDIMENSION output_row, int num_rows)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2, outptr3;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->image_width;
-
-  while (--num_rows >= 0) {
-    inptr = *input_buf++;
-    outptr0 = output_buf[0][output_row];
-    outptr1 = output_buf[1][output_row];
-    outptr2 = output_buf[2][output_row];
-    outptr3 = output_buf[3][output_row];
-    output_row++;
-    for (col = 0; col < num_cols; col++) {
-      r = MAXJSAMPLE - GETJSAMPLE(inptr[0]);
-      g = MAXJSAMPLE - GETJSAMPLE(inptr[1]);
-      b = MAXJSAMPLE - GETJSAMPLE(inptr[2]);
-      /* K passes through as-is */
-      outptr3[col] = inptr[3];	/* don't need GETJSAMPLE here */
-      inptr += 4;
-      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations
-       * must be too; we do not need an explicit range-limiting operation.
-       * Hence the value being shifted is never negative, and we don't
-       * need the general RIGHT_SHIFT macro.
-       */
-      /* Y */
-      outptr0[col] = (JSAMPLE)
-		((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
-		 >> SCALEBITS);
-      /* Cb */
-      outptr1[col] = (JSAMPLE)
-		((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])
-		 >> SCALEBITS);
-      /* Cr */
-      outptr2[col] = (JSAMPLE)
-		((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])
-		 >> SCALEBITS);
-    }
-  }
-}
-
-
-/*
- * Convert some rows of samples to the JPEG colorspace.
- * This version handles grayscale output with no conversion.
- * The source can be either plain grayscale or YCbCr (since Y == gray).
- */
-
-METHODDEF(void)
-grayscale_convert (j_compress_ptr cinfo,
-		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-		   JDIMENSION output_row, int num_rows)
-{
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->image_width;
-  int instride = cinfo->input_components;
-
-  while (--num_rows >= 0) {
-    inptr = *input_buf++;
-    outptr = output_buf[0][output_row];
-    output_row++;
-    for (col = 0; col < num_cols; col++) {
-      outptr[col] = inptr[0];	/* don't need GETJSAMPLE() here */
-      inptr += instride;
-    }
-  }
-}
-
-
-/*
- * Convert some rows of samples to the JPEG colorspace.
- * This version handles multi-component colorspaces without conversion.
- * We assume input_components == num_components.
- */
-
-METHODDEF(void)
-null_convert (j_compress_ptr cinfo,
-	      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-	      JDIMENSION output_row, int num_rows)
-{
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
-  register int ci;
-  int nc = cinfo->num_components;
-  JDIMENSION num_cols = cinfo->image_width;
-
-  while (--num_rows >= 0) {
-    /* It seems fastest to make a separate pass for each component. */
-    for (ci = 0; ci < nc; ci++) {
-      inptr = *input_buf;
-      outptr = output_buf[ci][output_row];
-      for (col = 0; col < num_cols; col++) {
-	outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */
-	inptr += nc;
-      }
-    }
-    input_buf++;
-    output_row++;
-  }
-}
-
-
-/*
- * Empty method for start_pass.
- */
-
-METHODDEF(void)
-null_method (j_compress_ptr cinfo)
-{
-  /* no work needed */
-}
-
-
-/*
- * Module initialization routine for input colorspace conversion.
- */
-
-GLOBAL(void)
-jinit_color_converter (j_compress_ptr cinfo)
-{
-  my_cconvert_ptr cconvert;
-
-  cconvert = (my_cconvert_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_color_converter));
-  cinfo->cconvert = (struct jpeg_color_converter *) cconvert;
-  /* set start_pass to null method until we find out differently */
-  cconvert->pub.start_pass = null_method;
-
-  /* Make sure input_components agrees with in_color_space */
-  switch (cinfo->in_color_space) {
-  case JCS_GRAYSCALE:
-    if (cinfo->input_components != 1)
-      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-    break;
-
-  case JCS_RGB:
-#if RGB_PIXELSIZE != 3
-    if (cinfo->input_components != RGB_PIXELSIZE)
-      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-    break;
-#endif /* else share code with YCbCr */
-
-  case JCS_YCbCr:
-    if (cinfo->input_components != 3)
-      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-    break;
-
-  case JCS_CMYK:
-  case JCS_YCCK:
-    if (cinfo->input_components != 4)
-      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-    break;
-
-  default:			/* JCS_UNKNOWN can be anything */
-    if (cinfo->input_components < 1)
-      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-    break;
-  }
-
-  /* Check num_components, set conversion method based on requested space */
-  switch (cinfo->jpeg_color_space) {
-  case JCS_GRAYSCALE:
-    if (cinfo->num_components != 1)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    if (cinfo->in_color_space == JCS_GRAYSCALE)
-      cconvert->pub.color_convert = grayscale_convert;
-    else if (cinfo->in_color_space == JCS_RGB) {
-      cconvert->pub.start_pass = rgb_ycc_start;
-      cconvert->pub.color_convert = rgb_gray_convert;
-    } else if (cinfo->in_color_space == JCS_YCbCr)
-      cconvert->pub.color_convert = grayscale_convert;
-    else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_RGB:
-    if (cinfo->num_components != 3)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3)
-      cconvert->pub.color_convert = null_convert;
-    else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_YCbCr:
-    if (cinfo->num_components != 3)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    if (cinfo->in_color_space == JCS_RGB) {
-      cconvert->pub.start_pass = rgb_ycc_start;
-      cconvert->pub.color_convert = rgb_ycc_convert;
-    } else if (cinfo->in_color_space == JCS_YCbCr)
-      cconvert->pub.color_convert = null_convert;
-    else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_CMYK:
-    if (cinfo->num_components != 4)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    if (cinfo->in_color_space == JCS_CMYK)
-      cconvert->pub.color_convert = null_convert;
-    else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_YCCK:
-    if (cinfo->num_components != 4)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    if (cinfo->in_color_space == JCS_CMYK) {
-      cconvert->pub.start_pass = rgb_ycc_start;
-      cconvert->pub.color_convert = cmyk_ycck_convert;
-    } else if (cinfo->in_color_space == JCS_YCCK)
-      cconvert->pub.color_convert = null_convert;
-    else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  default:			/* allow null conversion of JCS_UNKNOWN */
-    if (cinfo->jpeg_color_space != cinfo->in_color_space ||
-	cinfo->num_components != cinfo->input_components)
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    cconvert->pub.color_convert = null_convert;
-    break;
-  }
-}
diff --git a/tkimg1.3/libjpeg/jcdctmgr.c b/tkimg1.3/libjpeg/jcdctmgr.c
deleted file mode 100644
index 61fa79b..0000000
--- a/tkimg1.3/libjpeg/jcdctmgr.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * jcdctmgr.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the forward-DCT management logic.
- * This code selects a particular DCT implementation to be used,
- * and it performs related housekeeping chores including coefficient
- * quantization.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-
-/* Private subobject for this module */
-
-typedef struct {
-  struct jpeg_forward_dct pub;	/* public fields */
-
-  /* Pointer to the DCT routine actually in use */
-  forward_DCT_method_ptr do_dct;
-
-  /* The actual post-DCT divisors --- not identical to the quant table
-   * entries, because of scaling (especially for an unnormalized DCT).
-   * Each table is given in normal array order.
-   */
-  DCTELEM * divisors[NUM_QUANT_TBLS];
-
-#ifdef DCT_FLOAT_SUPPORTED
-  /* Same as above for the floating-point case. */
-  float_DCT_method_ptr do_float_dct;
-  FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];
-#endif
-} my_fdct_controller;
-
-typedef my_fdct_controller * my_fdct_ptr;
-
-
-/*
- * Initialize for a processing pass.
- * Verify that all referenced Q-tables are present, and set up
- * the divisor table for each one.
- * In the current implementation, DCT of all components is done during
- * the first pass, even if only some components will be output in the
- * first scan.  Hence all components should be examined here.
- */
-
-METHODDEF(void)
-start_pass_fdctmgr (j_compress_ptr cinfo)
-{
-  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
-  int ci, qtblno, i;
-  jpeg_component_info *compptr;
-  JQUANT_TBL * qtbl;
-  DCTELEM * dtbl;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    qtblno = compptr->quant_tbl_no;
-    /* Make sure specified quantization table is present */
-    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
-	cinfo->quant_tbl_ptrs[qtblno] == NULL)
-      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
-    qtbl = cinfo->quant_tbl_ptrs[qtblno];
-    /* Compute divisors for this quant table */
-    /* We may do this more than once for same table, but it's not a big deal */
-    switch (cinfo->dct_method) {
-#ifdef DCT_ISLOW_SUPPORTED
-    case JDCT_ISLOW:
-      /* For LL&M IDCT method, divisors are equal to raw quantization
-       * coefficients multiplied by 8 (to counteract scaling).
-       */
-      if (fdct->divisors[qtblno] == NULL) {
-	fdct->divisors[qtblno] = (DCTELEM *)
-	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				      DCTSIZE2 * SIZEOF(DCTELEM));
-      }
-      dtbl = fdct->divisors[qtblno];
-      for (i = 0; i < DCTSIZE2; i++) {
-	dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
-      }
-      break;
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-    case JDCT_IFAST:
-      {
-	/* For AA&N IDCT method, divisors are equal to quantization
-	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
-	 *   scalefactor[0] = 1
-	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
-	 * We apply a further scale factor of 8.
-	 */
-#define CONST_BITS 14
-	static const INT16 aanscales[DCTSIZE2] = {
-	  /* precomputed values scaled up by 14 bits */
-	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
-	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
-	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
-	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
-	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
-	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
-	};
-	SHIFT_TEMPS
-
-	if (fdct->divisors[qtblno] == NULL) {
-	  fdct->divisors[qtblno] = (DCTELEM *)
-	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-					DCTSIZE2 * SIZEOF(DCTELEM));
-	}
-	dtbl = fdct->divisors[qtblno];
-	for (i = 0; i < DCTSIZE2; i++) {
-	  dtbl[i] = (DCTELEM)
-	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
-				  (INT32) aanscales[i]),
-		    CONST_BITS-3);
-	}
-      }
-      break;
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-    case JDCT_FLOAT:
-      {
-	/* For float AA&N IDCT method, divisors are equal to quantization
-	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
-	 *   scalefactor[0] = 1
-	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
-	 * We apply a further scale factor of 8.
-	 * What's actually stored is 1/divisor so that the inner loop can
-	 * use a multiplication rather than a division.
-	 */
-	FAST_FLOAT * fdtbl;
-	int row, col;
-	static const double aanscalefactor[DCTSIZE] = {
-	  1.0, 1.387039845, 1.306562965, 1.175875602,
-	  1.0, 0.785694958, 0.541196100, 0.275899379
-	};
-
-	if (fdct->float_divisors[qtblno] == NULL) {
-	  fdct->float_divisors[qtblno] = (FAST_FLOAT *)
-	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-					DCTSIZE2 * SIZEOF(FAST_FLOAT));
-	}
-	fdtbl = fdct->float_divisors[qtblno];
-	i = 0;
-	for (row = 0; row < DCTSIZE; row++) {
-	  for (col = 0; col < DCTSIZE; col++) {
-	    fdtbl[i] = (FAST_FLOAT)
-	      (1.0 / (((double) qtbl->quantval[i] *
-		       aanscalefactor[row] * aanscalefactor[col] * 8.0)));
-	    i++;
-	  }
-	}
-      }
-      break;
-#endif
-    default:
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-      break;
-    }
-  }
-}
-
-
-/*
- * Perform forward DCT on one or more blocks of a component.
- *
- * The input samples are taken from the sample_data[] array starting at
- * position start_row/start_col, and moving to the right for any additional
- * blocks. The quantized coefficients are returned in coef_blocks[].
- */
-
-METHODDEF(void)
-forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
-	     JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
-	     JDIMENSION start_row, JDIMENSION start_col,
-	     JDIMENSION num_blocks)
-/* This version is used for integer DCT implementations. */
-{
-  /* This routine is heavily used, so it's worth coding it tightly. */
-  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
-  forward_DCT_method_ptr do_dct = fdct->do_dct;
-  DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];
-  DCTELEM workspace[DCTSIZE2];	/* work area for FDCT subroutine */
-  JDIMENSION bi;
-
-  sample_data += start_row;	/* fold in the vertical offset once */
-
-  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
-    /* Load data into workspace, applying unsigned->signed conversion */
-    { register DCTELEM *workspaceptr;
-      register JSAMPROW elemptr;
-      register int elemr;
-
-      workspaceptr = workspace;
-      for (elemr = 0; elemr < DCTSIZE; elemr++) {
-	elemptr = sample_data[elemr] + start_col;
-#if DCTSIZE == 8		/* unroll the inner loop */
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-#else
-	{ register int elemc;
-	  for (elemc = DCTSIZE; elemc > 0; elemc--) {
-	    *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-	  }
-	}
-#endif
-      }
-    }
-
-    /* Perform the DCT */
-    (*do_dct) (workspace);
-
-    /* Quantize/descale the coefficients, and store into coef_blocks[] */
-    { register DCTELEM temp, qval;
-      register int i;
-      register JCOEFPTR output_ptr = coef_blocks[bi];
-
-      for (i = 0; i < DCTSIZE2; i++) {
-	qval = divisors[i];
-	temp = workspace[i];
-	/* Divide the coefficient value by qval, ensuring proper rounding.
-	 * Since C does not specify the direction of rounding for negative
-	 * quotients, we have to force the dividend positive for portability.
-	 *
-	 * In most files, at least half of the output values will be zero
-	 * (at default quantization settings, more like three-quarters...)
-	 * so we should ensure that this case is fast.  On many machines,
-	 * a comparison is enough cheaper than a divide to make a special test
-	 * a win.  Since both inputs will be nonnegative, we need only test
-	 * for a < b to discover whether a/b is 0.
-	 * If your machine's division is fast enough, define FAST_DIVIDE.
-	 */
-#ifdef FAST_DIVIDE
-#define DIVIDE_BY(a,b)	a /= b
-#else
-#define DIVIDE_BY(a,b)	if (a >= b) a /= b; else a = 0
-#endif
-	if (temp < 0) {
-	  temp = -temp;
-	  temp += qval>>1;	/* for rounding */
-	  DIVIDE_BY(temp, qval);
-	  temp = -temp;
-	} else {
-	  temp += qval>>1;	/* for rounding */
-	  DIVIDE_BY(temp, qval);
-	}
-	output_ptr[i] = (JCOEF) temp;
-      }
-    }
-  }
-}
-
-
-#ifdef DCT_FLOAT_SUPPORTED
-
-METHODDEF(void)
-forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
-		   JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
-		   JDIMENSION start_row, JDIMENSION start_col,
-		   JDIMENSION num_blocks)
-/* This version is used for floating-point DCT implementations. */
-{
-  /* This routine is heavily used, so it's worth coding it tightly. */
-  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
-  float_DCT_method_ptr do_dct = fdct->do_float_dct;
-  FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];
-  FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
-  JDIMENSION bi;
-
-  sample_data += start_row;	/* fold in the vertical offset once */
-
-  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
-    /* Load data into workspace, applying unsigned->signed conversion */
-    { register FAST_FLOAT *workspaceptr;
-      register JSAMPROW elemptr;
-      register int elemr;
-
-      workspaceptr = workspace;
-      for (elemr = 0; elemr < DCTSIZE; elemr++) {
-	elemptr = sample_data[elemr] + start_col;
-#if DCTSIZE == 8		/* unroll the inner loop */
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-#else
-	{ register int elemc;
-	  for (elemc = DCTSIZE; elemc > 0; elemc--) {
-	    *workspaceptr++ = (FAST_FLOAT)
-	      (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-	  }
-	}
-#endif
-      }
-    }
-
-    /* Perform the DCT */
-    (*do_dct) (workspace);
-
-    /* Quantize/descale the coefficients, and store into coef_blocks[] */
-    { register FAST_FLOAT temp;
-      register int i;
-      register JCOEFPTR output_ptr = coef_blocks[bi];
-
-      for (i = 0; i < DCTSIZE2; i++) {
-	/* Apply the quantization and scaling factor */
-	temp = workspace[i] * divisors[i];
-	/* Round to nearest integer.
-	 * Since C does not specify the direction of rounding for negative
-	 * quotients, we have to force the dividend positive for portability.
-	 * The maximum coefficient size is +-16K (for 12-bit data), so this
-	 * code should work for either 16-bit or 32-bit ints.
-	 */
-	output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);
-      }
-    }
-  }
-}
-
-#endif /* DCT_FLOAT_SUPPORTED */
-
-
-/*
- * Initialize FDCT manager.
- */
-
-GLOBAL(void)
-jinit_forward_dct (j_compress_ptr cinfo)
-{
-  my_fdct_ptr fdct;
-  int i;
-
-  fdct = (my_fdct_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_fdct_controller));
-  cinfo->fdct = (struct jpeg_forward_dct *) fdct;
-  fdct->pub.start_pass = start_pass_fdctmgr;
-
-  switch (cinfo->dct_method) {
-#ifdef DCT_ISLOW_SUPPORTED
-  case JDCT_ISLOW:
-    fdct->pub.forward_DCT = forward_DCT;
-    fdct->do_dct = jpeg_fdct_islow;
-    break;
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-  case JDCT_IFAST:
-    fdct->pub.forward_DCT = forward_DCT;
-    fdct->do_dct = jpeg_fdct_ifast;
-    break;
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-  case JDCT_FLOAT:
-    fdct->pub.forward_DCT = forward_DCT_float;
-    fdct->do_float_dct = jpeg_fdct_float;
-    break;
-#endif
-  default:
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-    break;
-  }
-
-  /* Mark divisor tables unallocated */
-  for (i = 0; i < NUM_QUANT_TBLS; i++) {
-    fdct->divisors[i] = NULL;
-#ifdef DCT_FLOAT_SUPPORTED
-    fdct->float_divisors[i] = NULL;
-#endif
-  }
-}
diff --git a/tkimg1.3/libjpeg/jchuff.c b/tkimg1.3/libjpeg/jchuff.c
deleted file mode 100644
index f235250..0000000
--- a/tkimg1.3/libjpeg/jchuff.c
+++ /dev/null
@@ -1,909 +0,0 @@
-/*
- * jchuff.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy encoding routines.
- *
- * Much of the complexity here has to do with supporting output suspension.
- * If the data destination module demands suspension, we want to be able to
- * back up to the start of the current MCU.  To do this, we copy state
- * variables into local working storage, and update them back to the
- * permanent JPEG objects only upon successful completion of an MCU.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jchuff.h"		/* Declarations shared with jcphuff.c */
-
-
-/* Expanded entropy encoder object for Huffman encoding.
- *
- * The savable_state subrecord contains fields that change within an MCU,
- * but must not be updated permanently until we complete the MCU.
- */
-
-typedef struct {
-  INT32 put_buffer;		/* current bit-accumulation buffer */
-  int put_bits;			/* # of bits now in it */
-  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
-} savable_state;
-
-/* This macro is to work around compilers with missing or broken
- * structure assignment.  You'll need to fix this code if you have
- * such a compiler and you change MAX_COMPS_IN_SCAN.
- */
-
-#ifndef NO_STRUCT_ASSIGN
-#define ASSIGN_STATE(dest,src)  ((dest) = (src))
-#else
-#if MAX_COMPS_IN_SCAN == 4
-#define ASSIGN_STATE(dest,src)  \
-	((dest).put_buffer = (src).put_buffer, \
-	 (dest).put_bits = (src).put_bits, \
-	 (dest).last_dc_val[0] = (src).last_dc_val[0], \
-	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
-	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
-	 (dest).last_dc_val[3] = (src).last_dc_val[3])
-#endif
-#endif
-
-
-typedef struct {
-  struct jpeg_entropy_encoder pub; /* public fields */
-
-  savable_state saved;		/* Bit buffer & DC state at start of MCU */
-
-  /* These fields are NOT loaded into local working state. */
-  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
-  int next_restart_num;		/* next restart number to write (0-7) */
-
-  /* Pointers to derived tables (these workspaces have image lifespan) */
-  c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
-  c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
-
-#ifdef ENTROPY_OPT_SUPPORTED	/* Statistics tables for optimization */
-  long * dc_count_ptrs[NUM_HUFF_TBLS];
-  long * ac_count_ptrs[NUM_HUFF_TBLS];
-#endif
-} huff_entropy_encoder;
-
-typedef huff_entropy_encoder * huff_entropy_ptr;
-
-/* Working state while writing an MCU.
- * This struct contains all the fields that are needed by subroutines.
- */
-
-typedef struct {
-  JOCTET * next_output_byte;	/* => next byte to write in buffer */
-  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
-  savable_state cur;		/* Current bit buffer & DC state */
-  j_compress_ptr cinfo;		/* dump_buffer needs access to this */
-} working_state;
-
-
-/* Forward declarations */
-METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
-					JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
-#ifdef ENTROPY_OPT_SUPPORTED
-METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
-					  JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
-#endif
-
-
-/*
- * Initialize for a Huffman-compressed scan.
- * If gather_statistics is TRUE, we do not output anything during the scan,
- * just count the Huffman symbols used and generate Huffman code tables.
- */
-
-METHODDEF(void)
-start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int ci, dctbl, actbl;
-  jpeg_component_info * compptr;
-
-  if (gather_statistics) {
-#ifdef ENTROPY_OPT_SUPPORTED
-    entropy->pub.encode_mcu = encode_mcu_gather;
-    entropy->pub.finish_pass = finish_pass_gather;
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-  } else {
-    entropy->pub.encode_mcu = encode_mcu_huff;
-    entropy->pub.finish_pass = finish_pass_huff;
-  }
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    dctbl = compptr->dc_tbl_no;
-    actbl = compptr->ac_tbl_no;
-    if (gather_statistics) {
-#ifdef ENTROPY_OPT_SUPPORTED
-      /* Check for invalid table indexes */
-      /* (make_c_derived_tbl does this in the other path) */
-      if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS)
-	ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl);
-      if (actbl < 0 || actbl >= NUM_HUFF_TBLS)
-	ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl);
-      /* Allocate and zero the statistics tables */
-      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
-      if (entropy->dc_count_ptrs[dctbl] == NULL)
-	entropy->dc_count_ptrs[dctbl] = (long *)
-	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				      257 * SIZEOF(long));
-      MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long));
-      if (entropy->ac_count_ptrs[actbl] == NULL)
-	entropy->ac_count_ptrs[actbl] = (long *)
-	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				      257 * SIZEOF(long));
-      MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long));
-#endif
-    } else {
-      /* Compute derived values for Huffman tables */
-      /* We may do this more than once for a table, but it's not expensive */
-      jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,
-			      & entropy->dc_derived_tbls[dctbl]);
-      jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,
-			      & entropy->ac_derived_tbls[actbl]);
-    }
-    /* Initialize DC predictions to 0 */
-    entropy->saved.last_dc_val[ci] = 0;
-  }
-
-  /* Initialize bit buffer to empty */
-  entropy->saved.put_buffer = 0;
-  entropy->saved.put_bits = 0;
-
-  /* Initialize restart stuff */
-  entropy->restarts_to_go = cinfo->restart_interval;
-  entropy->next_restart_num = 0;
-}
-
-
-/*
- * Compute the derived values for a Huffman table.
- * This routine also performs some validation checks on the table.
- *
- * Note this is also used by jcphuff.c.
- */
-
-GLOBAL(void)
-jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
-			 c_derived_tbl ** pdtbl)
-{
-  JHUFF_TBL *htbl;
-  c_derived_tbl *dtbl;
-  int p, i, l, lastp, si, maxsymbol;
-  char huffsize[257];
-  unsigned int huffcode[257];
-  unsigned int code;
-
-  /* Note that huffsize[] and huffcode[] are filled in code-length order,
-   * paralleling the order of the symbols themselves in htbl->huffval[].
-   */
-
-  /* Find the input Huffman table */
-  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)
-    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
-  htbl =
-    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];
-  if (htbl == NULL)
-    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
-
-  /* Allocate a workspace if we haven't already done so. */
-  if (*pdtbl == NULL)
-    *pdtbl = (c_derived_tbl *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(c_derived_tbl));
-  dtbl = *pdtbl;
-  
-  /* Figure C.1: make table of Huffman code length for each symbol */
-
-  p = 0;
-  for (l = 1; l <= 16; l++) {
-    i = (int) htbl->bits[l];
-    if (i < 0 || p + i > 256)	/* protect against table overrun */
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    while (i--)
-      huffsize[p++] = (char) l;
-  }
-  huffsize[p] = 0;
-  lastp = p;
-  
-  /* Figure C.2: generate the codes themselves */
-  /* We also validate that the counts represent a legal Huffman code tree. */
-
-  code = 0;
-  si = huffsize[0];
-  p = 0;
-  while (huffsize[p]) {
-    while (((int) huffsize[p]) == si) {
-      huffcode[p++] = code;
-      code++;
-    }
-    /* code is now 1 more than the last code used for codelength si; but
-     * it must still fit in si bits, since no code is allowed to be all ones.
-     */
-    if (((INT32) code) >= (((INT32) 1) << si))
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    code <<= 1;
-    si++;
-  }
-  
-  /* Figure C.3: generate encoding tables */
-  /* These are code and size indexed by symbol value */
-
-  /* Set all codeless symbols to have code length 0;
-   * this lets us detect duplicate VAL entries here, and later
-   * allows emit_bits to detect any attempt to emit such symbols.
-   */
-  MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi));
-
-  /* This is also a convenient place to check for out-of-range
-   * and duplicated VAL entries.  We allow 0..255 for AC symbols
-   * but only 0..15 for DC.  (We could constrain them further
-   * based on data depth and mode, but this seems enough.)
-   */
-  maxsymbol = isDC ? 15 : 255;
-
-  for (p = 0; p < lastp; p++) {
-    i = htbl->huffval[p];
-    if (i < 0 || i > maxsymbol || dtbl->ehufsi[i])
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    dtbl->ehufco[i] = huffcode[p];
-    dtbl->ehufsi[i] = huffsize[p];
-  }
-}
-
-
-/* Outputting bytes to the file */
-
-/* Emit a byte, taking 'action' if must suspend. */
-#define emit_byte(state,val,action)  \
-	{ *(state)->next_output_byte++ = (JOCTET) (val);  \
-	  if (--(state)->free_in_buffer == 0)  \
-	    if (! dump_buffer(state))  \
-	      { action; } }
-
-
-LOCAL(boolean)
-dump_buffer (working_state * state)
-/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
-{
-  struct jpeg_destination_mgr * dest = state->cinfo->dest;
-
-  if (! (*dest->empty_output_buffer) (state->cinfo))
-    return FALSE;
-  /* After a successful buffer dump, must reset buffer pointers */
-  state->next_output_byte = dest->next_output_byte;
-  state->free_in_buffer = dest->free_in_buffer;
-  return TRUE;
-}
-
-
-/* Outputting bits to the file */
-
-/* Only the right 24 bits of put_buffer are used; the valid bits are
- * left-justified in this part.  At most 16 bits can be passed to emit_bits
- * in one call, and we never retain more than 7 bits in put_buffer
- * between calls, so 24 bits are sufficient.
- */
-
-INLINE
-LOCAL(boolean)
-emit_bits (working_state * state, unsigned int code, int size)
-/* Emit some bits; return TRUE if successful, FALSE if must suspend */
-{
-  /* This routine is heavily used, so it's worth coding tightly. */
-  register INT32 put_buffer = (INT32) code;
-  register int put_bits = state->cur.put_bits;
-
-  /* if size is 0, caller used an invalid Huffman table entry */
-  if (size == 0)
-    ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE);
-
-  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
-  
-  put_bits += size;		/* new number of bits in buffer */
-  
-  put_buffer <<= 24 - put_bits; /* align incoming bits */
-
-  put_buffer |= state->cur.put_buffer; /* and merge with old buffer contents */
-  
-  while (put_bits >= 8) {
-    int c = (int) ((put_buffer >> 16) & 0xFF);
-    
-    emit_byte(state, c, return FALSE);
-    if (c == 0xFF) {		/* need to stuff a zero byte? */
-      emit_byte(state, 0, return FALSE);
-    }
-    put_buffer <<= 8;
-    put_bits -= 8;
-  }
-
-  state->cur.put_buffer = put_buffer; /* update state variables */
-  state->cur.put_bits = put_bits;
-
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-flush_bits (working_state * state)
-{
-  if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
-    return FALSE;
-  state->cur.put_buffer = 0;	/* and reset bit-buffer to empty */
-  state->cur.put_bits = 0;
-  return TRUE;
-}
-
-
-/* Encode a single block's worth of coefficients */
-
-LOCAL(boolean)
-encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
-		  c_derived_tbl *dctbl, c_derived_tbl *actbl)
-{
-  register int temp, temp2;
-  register int nbits;
-  register int k, r, i;
-  
-  /* Encode the DC coefficient difference per section F.1.2.1 */
-  
-  temp = temp2 = block[0] - last_dc_val;
-
-  if (temp < 0) {
-    temp = -temp;		/* temp is abs value of input */
-    /* For a negative input, want temp2 = bitwise complement of abs(input) */
-    /* This code assumes we are on a two's complement machine */
-    temp2--;
-  }
-  
-  /* Find the number of bits needed for the magnitude of the coefficient */
-  nbits = 0;
-  while (temp) {
-    nbits++;
-    temp >>= 1;
-  }
-  /* Check for out-of-range coefficient values.
-   * Since we're encoding a difference, the range limit is twice as much.
-   */
-  if (nbits > MAX_COEF_BITS+1)
-    ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
-  
-  /* Emit the Huffman-coded symbol for the number of bits */
-  if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits]))
-    return FALSE;
-
-  /* Emit that number of bits of the value, if positive, */
-  /* or the complement of its magnitude, if negative. */
-  if (nbits)			/* emit_bits rejects calls with size 0 */
-    if (! emit_bits(state, (unsigned int) temp2, nbits))
-      return FALSE;
-
-  /* Encode the AC coefficients per section F.1.2.2 */
-  
-  r = 0;			/* r = run length of zeros */
-  
-  for (k = 1; k < DCTSIZE2; k++) {
-    if ((temp = block[jpeg_natural_order[k]]) == 0) {
-      r++;
-    } else {
-      /* if run length > 15, must emit special run-length-16 codes (0xF0) */
-      while (r > 15) {
-	if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0]))
-	  return FALSE;
-	r -= 16;
-      }
-
-      temp2 = temp;
-      if (temp < 0) {
-	temp = -temp;		/* temp is abs value of input */
-	/* This code assumes we are on a two's complement machine */
-	temp2--;
-      }
-      
-      /* Find the number of bits needed for the magnitude of the coefficient */
-      nbits = 1;		/* there must be at least one 1 bit */
-      while ((temp >>= 1))
-	nbits++;
-      /* Check for out-of-range coefficient values */
-      if (nbits > MAX_COEF_BITS)
-	ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
-      
-      /* Emit Huffman symbol for run length / number of bits */
-      i = (r << 4) + nbits;
-      if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i]))
-	return FALSE;
-
-      /* Emit that number of bits of the value, if positive, */
-      /* or the complement of its magnitude, if negative. */
-      if (! emit_bits(state, (unsigned int) temp2, nbits))
-	return FALSE;
-      
-      r = 0;
-    }
-  }
-
-  /* If the last coef(s) were zero, emit an end-of-block code */
-  if (r > 0)
-    if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0]))
-      return FALSE;
-
-  return TRUE;
-}
-
-
-/*
- * Emit a restart marker & resynchronize predictions.
- */
-
-LOCAL(boolean)
-emit_restart (working_state * state, int restart_num)
-{
-  int ci;
-
-  if (! flush_bits(state))
-    return FALSE;
-
-  emit_byte(state, 0xFF, return FALSE);
-  emit_byte(state, JPEG_RST0 + restart_num, return FALSE);
-
-  /* Re-initialize DC predictions to 0 */
-  for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)
-    state->cur.last_dc_val[ci] = 0;
-
-  /* The restart counter is not updated until we successfully write the MCU. */
-
-  return TRUE;
-}
-
-
-/*
- * Encode and output one MCU's worth of Huffman-compressed coefficients.
- */
-
-METHODDEF(boolean)
-encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  working_state state;
-  int blkn, ci;
-  jpeg_component_info * compptr;
-
-  /* Load up working state */
-  state.next_output_byte = cinfo->dest->next_output_byte;
-  state.free_in_buffer = cinfo->dest->free_in_buffer;
-  ASSIGN_STATE(state.cur, entropy->saved);
-  state.cinfo = cinfo;
-
-  /* Emit restart marker if needed */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! emit_restart(&state, entropy->next_restart_num))
-	return FALSE;
-  }
-
-  /* Encode the MCU data blocks */
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    ci = cinfo->MCU_membership[blkn];
-    compptr = cinfo->cur_comp_info[ci];
-    if (! encode_one_block(&state,
-			   MCU_data[blkn][0], state.cur.last_dc_val[ci],
-			   entropy->dc_derived_tbls[compptr->dc_tbl_no],
-			   entropy->ac_derived_tbls[compptr->ac_tbl_no]))
-      return FALSE;
-    /* Update last_dc_val */
-    state.cur.last_dc_val[ci] = MCU_data[blkn][0][0];
-  }
-
-  /* Completed MCU, so update state */
-  cinfo->dest->next_output_byte = state.next_output_byte;
-  cinfo->dest->free_in_buffer = state.free_in_buffer;
-  ASSIGN_STATE(entropy->saved, state.cur);
-
-  /* Update restart-interval state too */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      entropy->restarts_to_go = cinfo->restart_interval;
-      entropy->next_restart_num++;
-      entropy->next_restart_num &= 7;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  return TRUE;
-}
-
-
-/*
- * Finish up at the end of a Huffman-compressed scan.
- */
-
-METHODDEF(void)
-finish_pass_huff (j_compress_ptr cinfo)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  working_state state;
-
-  /* Load up working state ... flush_bits needs it */
-  state.next_output_byte = cinfo->dest->next_output_byte;
-  state.free_in_buffer = cinfo->dest->free_in_buffer;
-  ASSIGN_STATE(state.cur, entropy->saved);
-  state.cinfo = cinfo;
-
-  /* Flush out the last data */
-  if (! flush_bits(&state))
-    ERREXIT(cinfo, JERR_CANT_SUSPEND);
-
-  /* Update state */
-  cinfo->dest->next_output_byte = state.next_output_byte;
-  cinfo->dest->free_in_buffer = state.free_in_buffer;
-  ASSIGN_STATE(entropy->saved, state.cur);
-}
-
-
-/*
- * Huffman coding optimization.
- *
- * We first scan the supplied data and count the number of uses of each symbol
- * that is to be Huffman-coded. (This process MUST agree with the code above.)
- * Then we build a Huffman coding tree for the observed counts.
- * Symbols which are not needed at all for the particular image are not
- * assigned any code, which saves space in the DHT marker as well as in
- * the compressed data.
- */
-
-#ifdef ENTROPY_OPT_SUPPORTED
-
-
-/* Process a single block's worth of coefficients */
-
-LOCAL(void)
-htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
-		 long dc_counts[], long ac_counts[])
-{
-  register int temp;
-  register int nbits;
-  register int k, r;
-  
-  /* Encode the DC coefficient difference per section F.1.2.1 */
-  
-  temp = block[0] - last_dc_val;
-  if (temp < 0)
-    temp = -temp;
-  
-  /* Find the number of bits needed for the magnitude of the coefficient */
-  nbits = 0;
-  while (temp) {
-    nbits++;
-    temp >>= 1;
-  }
-  /* Check for out-of-range coefficient values.
-   * Since we're encoding a difference, the range limit is twice as much.
-   */
-  if (nbits > MAX_COEF_BITS+1)
-    ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-
-  /* Count the Huffman symbol for the number of bits */
-  dc_counts[nbits]++;
-  
-  /* Encode the AC coefficients per section F.1.2.2 */
-  
-  r = 0;			/* r = run length of zeros */
-  
-  for (k = 1; k < DCTSIZE2; k++) {
-    if ((temp = block[jpeg_natural_order[k]]) == 0) {
-      r++;
-    } else {
-      /* if run length > 15, must emit special run-length-16 codes (0xF0) */
-      while (r > 15) {
-	ac_counts[0xF0]++;
-	r -= 16;
-      }
-      
-      /* Find the number of bits needed for the magnitude of the coefficient */
-      if (temp < 0)
-	temp = -temp;
-      
-      /* Find the number of bits needed for the magnitude of the coefficient */
-      nbits = 1;		/* there must be at least one 1 bit */
-      while ((temp >>= 1))
-	nbits++;
-      /* Check for out-of-range coefficient values */
-      if (nbits > MAX_COEF_BITS)
-	ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-      
-      /* Count Huffman symbol for run length / number of bits */
-      ac_counts[(r << 4) + nbits]++;
-      
-      r = 0;
-    }
-  }
-
-  /* If the last coef(s) were zero, emit an end-of-block code */
-  if (r > 0)
-    ac_counts[0]++;
-}
-
-
-/*
- * Trial-encode one MCU's worth of Huffman-compressed coefficients.
- * No data is actually output, so no suspension return is possible.
- */
-
-METHODDEF(boolean)
-encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int blkn, ci;
-  jpeg_component_info * compptr;
-
-  /* Take care of restart intervals if needed */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      /* Re-initialize DC predictions to 0 */
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++)
-	entropy->saved.last_dc_val[ci] = 0;
-      /* Update restart state */
-      entropy->restarts_to_go = cinfo->restart_interval;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    ci = cinfo->MCU_membership[blkn];
-    compptr = cinfo->cur_comp_info[ci];
-    htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci],
-		    entropy->dc_count_ptrs[compptr->dc_tbl_no],
-		    entropy->ac_count_ptrs[compptr->ac_tbl_no]);
-    entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0];
-  }
-
-  return TRUE;
-}
-
-
-/*
- * Generate the best Huffman code table for the given counts, fill htbl.
- * Note this is also used by jcphuff.c.
- *
- * The JPEG standard requires that no symbol be assigned a codeword of all
- * one bits (so that padding bits added at the end of a compressed segment
- * can't look like a valid code).  Because of the canonical ordering of
- * codewords, this just means that there must be an unused slot in the
- * longest codeword length category.  Section K.2 of the JPEG spec suggests
- * reserving such a slot by pretending that symbol 256 is a valid symbol
- * with count 1.  In theory that's not optimal; giving it count zero but
- * including it in the symbol set anyway should give a better Huffman code.
- * But the theoretically better code actually seems to come out worse in
- * practice, because it produces more all-ones bytes (which incur stuffed
- * zero bytes in the final file).  In any case the difference is tiny.
- *
- * The JPEG standard requires Huffman codes to be no more than 16 bits long.
- * If some symbols have a very small but nonzero probability, the Huffman tree
- * must be adjusted to meet the code length restriction.  We currently use
- * the adjustment method suggested in JPEG section K.2.  This method is *not*
- * optimal; it may not choose the best possible limited-length code.  But
- * typically only very-low-frequency symbols will be given less-than-optimal
- * lengths, so the code is almost optimal.  Experimental comparisons against
- * an optimal limited-length-code algorithm indicate that the difference is
- * microscopic --- usually less than a hundredth of a percent of total size.
- * So the extra complexity of an optimal algorithm doesn't seem worthwhile.
- */
-
-GLOBAL(void)
-jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])
-{
-#define MAX_CLEN 32		/* assumed maximum initial code length */
-  UINT8 bits[MAX_CLEN+1];	/* bits[k] = # of symbols with code length k */
-  int codesize[257];		/* codesize[k] = code length of symbol k */
-  int others[257];		/* next symbol in current branch of tree */
-  int c1, c2;
-  int p, i, j;
-  long v;
-
-  /* This algorithm is explained in section K.2 of the JPEG standard */
-
-  MEMZERO(bits, SIZEOF(bits));
-  MEMZERO(codesize, SIZEOF(codesize));
-  for (i = 0; i < 257; i++)
-    others[i] = -1;		/* init links to empty */
-  
-  freq[256] = 1;		/* make sure 256 has a nonzero count */
-  /* Including the pseudo-symbol 256 in the Huffman procedure guarantees
-   * that no real symbol is given code-value of all ones, because 256
-   * will be placed last in the largest codeword category.
-   */
-
-  /* Huffman's basic algorithm to assign optimal code lengths to symbols */
-
-  for (;;) {
-    /* Find the smallest nonzero frequency, set c1 = its symbol */
-    /* In case of ties, take the larger symbol number */
-    c1 = -1;
-    v = 1000000000L;
-    for (i = 0; i <= 256; i++) {
-      if (freq[i] && freq[i] <= v) {
-	v = freq[i];
-	c1 = i;
-      }
-    }
-
-    /* Find the next smallest nonzero frequency, set c2 = its symbol */
-    /* In case of ties, take the larger symbol number */
-    c2 = -1;
-    v = 1000000000L;
-    for (i = 0; i <= 256; i++) {
-      if (freq[i] && freq[i] <= v && i != c1) {
-	v = freq[i];
-	c2 = i;
-      }
-    }
-
-    /* Done if we've merged everything into one frequency */
-    if (c2 < 0)
-      break;
-    
-    /* Else merge the two counts/trees */
-    freq[c1] += freq[c2];
-    freq[c2] = 0;
-
-    /* Increment the codesize of everything in c1's tree branch */
-    codesize[c1]++;
-    while (others[c1] >= 0) {
-      c1 = others[c1];
-      codesize[c1]++;
-    }
-    
-    others[c1] = c2;		/* chain c2 onto c1's tree branch */
-    
-    /* Increment the codesize of everything in c2's tree branch */
-    codesize[c2]++;
-    while (others[c2] >= 0) {
-      c2 = others[c2];
-      codesize[c2]++;
-    }
-  }
-
-  /* Now count the number of symbols of each code length */
-  for (i = 0; i <= 256; i++) {
-    if (codesize[i]) {
-      /* The JPEG standard seems to think that this can't happen, */
-      /* but I'm paranoid... */
-      if (codesize[i] > MAX_CLEN)
-	ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW);
-
-      bits[codesize[i]]++;
-    }
-  }
-
-  /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure
-   * Huffman procedure assigned any such lengths, we must adjust the coding.
-   * Here is what the JPEG spec says about how this next bit works:
-   * Since symbols are paired for the longest Huffman code, the symbols are
-   * removed from this length category two at a time.  The prefix for the pair
-   * (which is one bit shorter) is allocated to one of the pair; then,
-   * skipping the BITS entry for that prefix length, a code word from the next
-   * shortest nonzero BITS entry is converted into a prefix for two code words
-   * one bit longer.
-   */
-  
-  for (i = MAX_CLEN; i > 16; i--) {
-    while (bits[i] > 0) {
-      j = i - 2;		/* find length of new prefix to be used */
-      while (bits[j] == 0)
-	j--;
-      
-      bits[i] -= 2;		/* remove two symbols */
-      bits[i-1]++;		/* one goes in this length */
-      bits[j+1] += 2;		/* two new symbols in this length */
-      bits[j]--;		/* symbol of this length is now a prefix */
-    }
-  }
-
-  /* Remove the count for the pseudo-symbol 256 from the largest codelength */
-  while (bits[i] == 0)		/* find largest codelength still in use */
-    i--;
-  bits[i]--;
-  
-  /* Return final symbol counts (only for lengths 0..16) */
-  MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits));
-  
-  /* Return a list of the symbols sorted by code length */
-  /* It's not real clear to me why we don't need to consider the codelength
-   * changes made above, but the JPEG spec seems to think this works.
-   */
-  p = 0;
-  for (i = 1; i <= MAX_CLEN; i++) {
-    for (j = 0; j <= 255; j++) {
-      if (codesize[j] == i) {
-	htbl->huffval[p] = (UINT8) j;
-	p++;
-      }
-    }
-  }
-
-  /* Set sent_table FALSE so updated table will be written to JPEG file. */
-  htbl->sent_table = FALSE;
-}
-
-
-/*
- * Finish up a statistics-gathering pass and create the new Huffman tables.
- */
-
-METHODDEF(void)
-finish_pass_gather (j_compress_ptr cinfo)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int ci, dctbl, actbl;
-  jpeg_component_info * compptr;
-  JHUFF_TBL **htblptr;
-  boolean did_dc[NUM_HUFF_TBLS];
-  boolean did_ac[NUM_HUFF_TBLS];
-
-  /* It's important not to apply jpeg_gen_optimal_table more than once
-   * per table, because it clobbers the input frequency counts!
-   */
-  MEMZERO(did_dc, SIZEOF(did_dc));
-  MEMZERO(did_ac, SIZEOF(did_ac));
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    dctbl = compptr->dc_tbl_no;
-    actbl = compptr->ac_tbl_no;
-    if (! did_dc[dctbl]) {
-      htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl];
-      if (*htblptr == NULL)
-	*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
-      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]);
-      did_dc[dctbl] = TRUE;
-    }
-    if (! did_ac[actbl]) {
-      htblptr = & cinfo->ac_huff_tbl_ptrs[actbl];
-      if (*htblptr == NULL)
-	*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
-      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]);
-      did_ac[actbl] = TRUE;
-    }
-  }
-}
-
-
-#endif /* ENTROPY_OPT_SUPPORTED */
-
-
-/*
- * Module initialization routine for Huffman entropy encoding.
- */
-
-GLOBAL(void)
-jinit_huff_encoder (j_compress_ptr cinfo)
-{
-  huff_entropy_ptr entropy;
-  int i;
-
-  entropy = (huff_entropy_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(huff_entropy_encoder));
-  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
-  entropy->pub.start_pass = start_pass_huff;
-
-  /* Mark tables unallocated */
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
-#ifdef ENTROPY_OPT_SUPPORTED
-    entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL;
-#endif
-  }
-}
diff --git a/tkimg1.3/libjpeg/jchuff.h b/tkimg1.3/libjpeg/jchuff.h
deleted file mode 100644
index a9599fc..0000000
--- a/tkimg1.3/libjpeg/jchuff.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * jchuff.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for Huffman entropy encoding routines
- * that are shared between the sequential encoder (jchuff.c) and the
- * progressive encoder (jcphuff.c).  No other modules need to see these.
- */
-
-/* The legal range of a DCT coefficient is
- *  -1024 .. +1023  for 8-bit data;
- * -16384 .. +16383 for 12-bit data.
- * Hence the magnitude should always fit in 10 or 14 bits respectively.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MAX_COEF_BITS 10
-#else
-#define MAX_COEF_BITS 14
-#endif
-
-/* Derived data constructed for each Huffman table */
-
-typedef struct {
-  unsigned int ehufco[256];	/* code for each symbol */
-  char ehufsi[256];		/* length of code for each symbol */
-  /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
-} c_derived_tbl;
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_make_c_derived_tbl	jMkCDerived
-#define jpeg_gen_optimal_table	jGenOptTbl
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Expand a Huffman table definition into the derived format */
-EXTERN(void) jpeg_make_c_derived_tbl
-	JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
-	     c_derived_tbl ** pdtbl));
-
-/* Generate an optimal table definition given the specified counts */
-EXTERN(void) jpeg_gen_optimal_table
-	JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));
diff --git a/tkimg1.3/libjpeg/jcinit.c b/tkimg1.3/libjpeg/jcinit.c
deleted file mode 100644
index 5efffe3..0000000
--- a/tkimg1.3/libjpeg/jcinit.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * jcinit.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains initialization logic for the JPEG compressor.
- * This routine is in charge of selecting the modules to be executed and
- * making an initialization call to each one.
- *
- * Logically, this code belongs in jcmaster.c.  It's split out because
- * linking this routine implies linking the entire compression library.
- * For a transcoding-only application, we want to be able to use jcmaster.c
- * without linking in the whole library.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Master selection of compression modules.
- * This is done once at the start of processing an image.  We determine
- * which modules will be used and give them appropriate initialization calls.
- */
-
-GLOBAL(void)
-jinit_compress_master (j_compress_ptr cinfo)
-{
-  /* Initialize master control (includes parameter checking/processing) */
-  jinit_c_master_control(cinfo, FALSE /* full compression */);
-
-  /* Preprocessing */
-  if (! cinfo->raw_data_in) {
-    jinit_color_converter(cinfo);
-    jinit_downsampler(cinfo);
-    jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);
-  }
-  /* Forward DCT */
-  jinit_forward_dct(cinfo);
-  /* Entropy encoding: either Huffman or arithmetic coding. */
-  if (cinfo->arith_code) {
-    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
-  } else {
-    if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
-      jinit_phuff_encoder(cinfo);
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    } else
-      jinit_huff_encoder(cinfo);
-  }
-
-  /* Need a full-image coefficient buffer in any multi-pass mode. */
-  jinit_c_coef_controller(cinfo,
-		(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
-  jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
-
-  jinit_marker_writer(cinfo);
-
-  /* We can now tell the memory manager to allocate virtual arrays. */
-  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
-
-  /* Write the datastream header (SOI) immediately.
-   * Frame and scan headers are postponed till later.
-   * This lets application insert special markers after the SOI.
-   */
-  (*cinfo->marker->write_file_header) (cinfo);
-}
diff --git a/tkimg1.3/libjpeg/jcmainct.c b/tkimg1.3/libjpeg/jcmainct.c
deleted file mode 100644
index e0279a7..0000000
--- a/tkimg1.3/libjpeg/jcmainct.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * jcmainct.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the main buffer controller for compression.
- * The main buffer lies between the pre-processor and the JPEG
- * compressor proper; it holds downsampled data in the JPEG colorspace.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Note: currently, there is no operating mode in which a full-image buffer
- * is needed at this step.  If there were, that mode could not be used with
- * "raw data" input, since this module is bypassed in that case.  However,
- * we've left the code here for possible use in special applications.
- */
-#undef FULL_MAIN_BUFFER_SUPPORTED
-
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_c_main_controller pub; /* public fields */
-
-  JDIMENSION cur_iMCU_row;	/* number of current iMCU row */
-  JDIMENSION rowgroup_ctr;	/* counts row groups received in iMCU row */
-  boolean suspended;		/* remember if we suspended output */
-  J_BUF_MODE pass_mode;		/* current operating mode */
-
-  /* If using just a strip buffer, this points to the entire set of buffers
-   * (we allocate one for each component).  In the full-image case, this
-   * points to the currently accessible strips of the virtual arrays.
-   */
-  JSAMPARRAY buffer[MAX_COMPONENTS];
-
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-  /* If using full-image storage, this array holds pointers to virtual-array
-   * control blocks for each component.  Unused if not full-image storage.
-   */
-  jvirt_sarray_ptr whole_image[MAX_COMPONENTS];
-#endif
-} my_main_controller;
-
-typedef my_main_controller * my_main_ptr;
-
-
-/* Forward declarations */
-METHODDEF(void) process_data_simple_main
-	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
-	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-METHODDEF(void) process_data_buffer_main
-	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
-	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
-#endif
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-
-  /* Do nothing in raw-data mode. */
-  if (cinfo->raw_data_in)
-    return;
-
-  main->cur_iMCU_row = 0;	/* initialize counters */
-  main->rowgroup_ctr = 0;
-  main->suspended = FALSE;
-  main->pass_mode = pass_mode;	/* save mode for use by process_data */
-
-  switch (pass_mode) {
-  case JBUF_PASS_THRU:
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-    if (main->whole_image[0] != NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-#endif
-    main->pub.process_data = process_data_simple_main;
-    break;
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-  case JBUF_SAVE_SOURCE:
-  case JBUF_CRANK_DEST:
-  case JBUF_SAVE_AND_PASS:
-    if (main->whole_image[0] == NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    main->pub.process_data = process_data_buffer_main;
-    break;
-#endif
-  default:
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    break;
-  }
-}
-
-
-/*
- * Process some data.
- * This routine handles the simple pass-through mode,
- * where we have only a strip buffer.
- */
-
-METHODDEF(void)
-process_data_simple_main (j_compress_ptr cinfo,
-			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-			  JDIMENSION in_rows_avail)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-
-  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
-    /* Read input data if we haven't filled the main buffer yet */
-    if (main->rowgroup_ctr < DCTSIZE)
-      (*cinfo->prep->pre_process_data) (cinfo,
-					input_buf, in_row_ctr, in_rows_avail,
-					main->buffer, &main->rowgroup_ctr,
-					(JDIMENSION) DCTSIZE);
-
-    /* If we don't have a full iMCU row buffered, return to application for
-     * more data.  Note that preprocessor will always pad to fill the iMCU row
-     * at the bottom of the image.
-     */
-    if (main->rowgroup_ctr != DCTSIZE)
-      return;
-
-    /* Send the completed row to the compressor */
-    if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
-      /* If compressor did not consume the whole row, then we must need to
-       * suspend processing and return to the application.  In this situation
-       * we pretend we didn't yet consume the last input row; otherwise, if
-       * it happened to be the last row of the image, the application would
-       * think we were done.
-       */
-      if (! main->suspended) {
-	(*in_row_ctr)--;
-	main->suspended = TRUE;
-      }
-      return;
-    }
-    /* We did finish the row.  Undo our little suspension hack if a previous
-     * call suspended; then mark the main buffer empty.
-     */
-    if (main->suspended) {
-      (*in_row_ctr)++;
-      main->suspended = FALSE;
-    }
-    main->rowgroup_ctr = 0;
-    main->cur_iMCU_row++;
-  }
-}
-
-
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-
-/*
- * Process some data.
- * This routine handles all of the modes that use a full-size buffer.
- */
-
-METHODDEF(void)
-process_data_buffer_main (j_compress_ptr cinfo,
-			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-			  JDIMENSION in_rows_avail)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  int ci;
-  jpeg_component_info *compptr;
-  boolean writing = (main->pass_mode != JBUF_CRANK_DEST);
-
-  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
-    /* Realign the virtual buffers if at the start of an iMCU row. */
-    if (main->rowgroup_ctr == 0) {
-      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	   ci++, compptr++) {
-	main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
-	  ((j_common_ptr) cinfo, main->whole_image[ci],
-	   main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
-	   (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
-      }
-      /* In a read pass, pretend we just read some source data. */
-      if (! writing) {
-	*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
-	main->rowgroup_ctr = DCTSIZE;
-      }
-    }
-
-    /* If a write pass, read input data until the current iMCU row is full. */
-    /* Note: preprocessor will pad if necessary to fill the last iMCU row. */
-    if (writing) {
-      (*cinfo->prep->pre_process_data) (cinfo,
-					input_buf, in_row_ctr, in_rows_avail,
-					main->buffer, &main->rowgroup_ctr,
-					(JDIMENSION) DCTSIZE);
-      /* Return to application if we need more data to fill the iMCU row. */
-      if (main->rowgroup_ctr < DCTSIZE)
-	return;
-    }
-
-    /* Emit data, unless this is a sink-only pass. */
-    if (main->pass_mode != JBUF_SAVE_SOURCE) {
-      if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
-	/* If compressor did not consume the whole row, then we must need to
-	 * suspend processing and return to the application.  In this situation
-	 * we pretend we didn't yet consume the last input row; otherwise, if
-	 * it happened to be the last row of the image, the application would
-	 * think we were done.
-	 */
-	if (! main->suspended) {
-	  (*in_row_ctr)--;
-	  main->suspended = TRUE;
-	}
-	return;
-      }
-      /* We did finish the row.  Undo our little suspension hack if a previous
-       * call suspended; then mark the main buffer empty.
-       */
-      if (main->suspended) {
-	(*in_row_ctr)++;
-	main->suspended = FALSE;
-      }
-    }
-
-    /* If get here, we are done with this iMCU row.  Mark buffer empty. */
-    main->rowgroup_ctr = 0;
-    main->cur_iMCU_row++;
-  }
-}
-
-#endif /* FULL_MAIN_BUFFER_SUPPORTED */
-
-
-/*
- * Initialize main buffer controller.
- */
-
-GLOBAL(void)
-jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
-{
-  my_main_ptr main;
-  int ci;
-  jpeg_component_info *compptr;
-
-  main = (my_main_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_main_controller));
-  cinfo->main = (struct jpeg_c_main_controller *) main;
-  main->pub.start_pass = start_pass_main;
-
-  /* We don't need to create a buffer in raw-data mode. */
-  if (cinfo->raw_data_in)
-    return;
-
-  /* Create the buffer.  It holds downsampled data, so each component
-   * may be of a different size.
-   */
-  if (need_full_buffer) {
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-    /* Allocate a full-image virtual array for each component */
-    /* Note we pad the bottom to a multiple of the iMCU height */
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-	 compptr->width_in_blocks * DCTSIZE,
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor) * DCTSIZE,
-	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
-    }
-#else
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-#endif
-  } else {
-#ifdef FULL_MAIN_BUFFER_SUPPORTED
-    main->whole_image[0] = NULL; /* flag for no virtual arrays */
-#endif
-    /* Allocate a strip buffer for each component */
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      main->buffer[ci] = (*cinfo->mem->alloc_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE,
-	 compptr->width_in_blocks * DCTSIZE,
-	 (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
-    }
-  }
-}
diff --git a/tkimg1.3/libjpeg/jcmarker.c b/tkimg1.3/libjpeg/jcmarker.c
deleted file mode 100644
index 3d1e6c6..0000000
--- a/tkimg1.3/libjpeg/jcmarker.c
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * jcmarker.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write JPEG datastream markers.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-typedef enum {			/* JPEG marker codes */
-  M_SOF0  = 0xc0,
-  M_SOF1  = 0xc1,
-  M_SOF2  = 0xc2,
-  M_SOF3  = 0xc3,
-  
-  M_SOF5  = 0xc5,
-  M_SOF6  = 0xc6,
-  M_SOF7  = 0xc7,
-  
-  M_JPG   = 0xc8,
-  M_SOF9  = 0xc9,
-  M_SOF10 = 0xca,
-  M_SOF11 = 0xcb,
-  
-  M_SOF13 = 0xcd,
-  M_SOF14 = 0xce,
-  M_SOF15 = 0xcf,
-  
-  M_DHT   = 0xc4,
-  
-  M_DAC   = 0xcc,
-  
-  M_RST0  = 0xd0,
-  M_RST1  = 0xd1,
-  M_RST2  = 0xd2,
-  M_RST3  = 0xd3,
-  M_RST4  = 0xd4,
-  M_RST5  = 0xd5,
-  M_RST6  = 0xd6,
-  M_RST7  = 0xd7,
-  
-  M_SOI   = 0xd8,
-  M_EOI   = 0xd9,
-  M_SOS   = 0xda,
-  M_DQT   = 0xdb,
-  M_DNL   = 0xdc,
-  M_DRI   = 0xdd,
-  M_DHP   = 0xde,
-  M_EXP   = 0xdf,
-  
-  M_APP0  = 0xe0,
-  M_APP1  = 0xe1,
-  M_APP2  = 0xe2,
-  M_APP3  = 0xe3,
-  M_APP4  = 0xe4,
-  M_APP5  = 0xe5,
-  M_APP6  = 0xe6,
-  M_APP7  = 0xe7,
-  M_APP8  = 0xe8,
-  M_APP9  = 0xe9,
-  M_APP10 = 0xea,
-  M_APP11 = 0xeb,
-  M_APP12 = 0xec,
-  M_APP13 = 0xed,
-  M_APP14 = 0xee,
-  M_APP15 = 0xef,
-  
-  M_JPG0  = 0xf0,
-  M_JPG13 = 0xfd,
-  M_COM   = 0xfe,
-  
-  M_TEM   = 0x01,
-  
-  M_ERROR = 0x100
-} JPEG_MARKER;
-
-
-/* Private state */
-
-typedef struct {
-  struct jpeg_marker_writer pub; /* public fields */
-
-  unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */
-} my_marker_writer;
-
-typedef my_marker_writer * my_marker_ptr;
-
-
-/*
- * Basic output routines.
- *
- * Note that we do not support suspension while writing a marker.
- * Therefore, an application using suspension must ensure that there is
- * enough buffer space for the initial markers (typ. 600-700 bytes) before
- * calling jpeg_start_compress, and enough space to write the trailing EOI
- * (a few bytes) before calling jpeg_finish_compress.  Multipass compression
- * modes are not supported at all with suspension, so those two are the only
- * points where markers will be written.
- */
-
-LOCAL(void)
-emit_byte (j_compress_ptr cinfo, int val)
-/* Emit a byte */
-{
-  struct jpeg_destination_mgr * dest = cinfo->dest;
-
-  *(dest->next_output_byte)++ = (JOCTET) val;
-  if (--dest->free_in_buffer == 0) {
-    if (! (*dest->empty_output_buffer) (cinfo))
-      ERREXIT(cinfo, JERR_CANT_SUSPEND);
-  }
-}
-
-
-LOCAL(void)
-emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark)
-/* Emit a marker code */
-{
-  emit_byte(cinfo, 0xFF);
-  emit_byte(cinfo, (int) mark);
-}
-
-
-LOCAL(void)
-emit_2bytes (j_compress_ptr cinfo, int value)
-/* Emit a 2-byte integer; these are always MSB first in JPEG files */
-{
-  emit_byte(cinfo, (value >> 8) & 0xFF);
-  emit_byte(cinfo, value & 0xFF);
-}
-
-
-/*
- * Routines to write specific marker types.
- */
-
-LOCAL(int)
-emit_dqt (j_compress_ptr cinfo, int index)
-/* Emit a DQT marker */
-/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
-{
-  JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index];
-  int prec;
-  int i;
-
-  if (qtbl == NULL)
-    ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
-
-  prec = 0;
-  for (i = 0; i < DCTSIZE2; i++) {
-    if (qtbl->quantval[i] > 255)
-      prec = 1;
-  }
-
-  if (! qtbl->sent_table) {
-    emit_marker(cinfo, M_DQT);
-
-    emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);
-
-    emit_byte(cinfo, index + (prec<<4));
-
-    for (i = 0; i < DCTSIZE2; i++) {
-      /* The table entries must be emitted in zigzag order. */
-      unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
-      if (prec)
-	emit_byte(cinfo, (int) (qval >> 8));
-      emit_byte(cinfo, (int) (qval & 0xFF));
-    }
-
-    qtbl->sent_table = TRUE;
-  }
-
-  return prec;
-}
-
-
-LOCAL(void)
-emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
-/* Emit a DHT marker */
-{
-  JHUFF_TBL * htbl;
-  int length, i;
-  
-  if (is_ac) {
-    htbl = cinfo->ac_huff_tbl_ptrs[index];
-    index += 0x10;		/* output index has AC bit set */
-  } else {
-    htbl = cinfo->dc_huff_tbl_ptrs[index];
-  }
-
-  if (htbl == NULL)
-    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
-  
-  if (! htbl->sent_table) {
-    emit_marker(cinfo, M_DHT);
-    
-    length = 0;
-    for (i = 1; i <= 16; i++)
-      length += htbl->bits[i];
-    
-    emit_2bytes(cinfo, length + 2 + 1 + 16);
-    emit_byte(cinfo, index);
-    
-    for (i = 1; i <= 16; i++)
-      emit_byte(cinfo, htbl->bits[i]);
-    
-    for (i = 0; i < length; i++)
-      emit_byte(cinfo, htbl->huffval[i]);
-    
-    htbl->sent_table = TRUE;
-  }
-}
-
-
-LOCAL(void)
-emit_dac (j_compress_ptr cinfo)
-/* Emit a DAC marker */
-/* Since the useful info is so small, we want to emit all the tables in */
-/* one DAC marker.  Therefore this routine does its own scan of the table. */
-{
-#ifdef C_ARITH_CODING_SUPPORTED
-  char dc_in_use[NUM_ARITH_TBLS];
-  char ac_in_use[NUM_ARITH_TBLS];
-  int length, i;
-  jpeg_component_info *compptr;
-  
-  for (i = 0; i < NUM_ARITH_TBLS; i++)
-    dc_in_use[i] = ac_in_use[i] = 0;
-  
-  for (i = 0; i < cinfo->comps_in_scan; i++) {
-    compptr = cinfo->cur_comp_info[i];
-    dc_in_use[compptr->dc_tbl_no] = 1;
-    ac_in_use[compptr->ac_tbl_no] = 1;
-  }
-  
-  length = 0;
-  for (i = 0; i < NUM_ARITH_TBLS; i++)
-    length += dc_in_use[i] + ac_in_use[i];
-  
-  emit_marker(cinfo, M_DAC);
-  
-  emit_2bytes(cinfo, length*2 + 2);
-  
-  for (i = 0; i < NUM_ARITH_TBLS; i++) {
-    if (dc_in_use[i]) {
-      emit_byte(cinfo, i);
-      emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
-    }
-    if (ac_in_use[i]) {
-      emit_byte(cinfo, i + 0x10);
-      emit_byte(cinfo, cinfo->arith_ac_K[i]);
-    }
-  }
-#endif /* C_ARITH_CODING_SUPPORTED */
-}
-
-
-LOCAL(void)
-emit_dri (j_compress_ptr cinfo)
-/* Emit a DRI marker */
-{
-  emit_marker(cinfo, M_DRI);
-  
-  emit_2bytes(cinfo, 4);	/* fixed length */
-
-  emit_2bytes(cinfo, (int) cinfo->restart_interval);
-}
-
-
-LOCAL(void)
-emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
-/* Emit a SOF marker */
-{
-  int ci;
-  jpeg_component_info *compptr;
-  
-  emit_marker(cinfo, code);
-  
-  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
-
-  /* Make sure image isn't bigger than SOF field can handle */
-  if ((long) cinfo->image_height > 65535L ||
-      (long) cinfo->image_width > 65535L)
-    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);
-
-  emit_byte(cinfo, cinfo->data_precision);
-  emit_2bytes(cinfo, (int) cinfo->image_height);
-  emit_2bytes(cinfo, (int) cinfo->image_width);
-
-  emit_byte(cinfo, cinfo->num_components);
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    emit_byte(cinfo, compptr->component_id);
-    emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
-    emit_byte(cinfo, compptr->quant_tbl_no);
-  }
-}
-
-
-LOCAL(void)
-emit_sos (j_compress_ptr cinfo)
-/* Emit a SOS marker */
-{
-  int i, td, ta;
-  jpeg_component_info *compptr;
-  
-  emit_marker(cinfo, M_SOS);
-  
-  emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */
-  
-  emit_byte(cinfo, cinfo->comps_in_scan);
-  
-  for (i = 0; i < cinfo->comps_in_scan; i++) {
-    compptr = cinfo->cur_comp_info[i];
-    emit_byte(cinfo, compptr->component_id);
-    td = compptr->dc_tbl_no;
-    ta = compptr->ac_tbl_no;
-    if (cinfo->progressive_mode) {
-      /* Progressive mode: only DC or only AC tables are used in one scan;
-       * furthermore, Huffman coding of DC refinement uses no table at all.
-       * We emit 0 for unused field(s); this is recommended by the P&M text
-       * but does not seem to be specified in the standard.
-       */
-      if (cinfo->Ss == 0) {
-	ta = 0;			/* DC scan */
-	if (cinfo->Ah != 0 && !cinfo->arith_code)
-	  td = 0;		/* no DC table either */
-      } else {
-	td = 0;			/* AC scan */
-      }
-    }
-    emit_byte(cinfo, (td << 4) + ta);
-  }
-
-  emit_byte(cinfo, cinfo->Ss);
-  emit_byte(cinfo, cinfo->Se);
-  emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
-}
-
-
-LOCAL(void)
-emit_jfif_app0 (j_compress_ptr cinfo)
-/* Emit a JFIF-compliant APP0 marker */
-{
-  /*
-   * Length of APP0 block	(2 bytes)
-   * Block ID			(4 bytes - ASCII "JFIF")
-   * Zero byte			(1 byte to terminate the ID string)
-   * Version Major, Minor	(2 bytes - major first)
-   * Units			(1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)
-   * Xdpu			(2 bytes - dots per unit horizontal)
-   * Ydpu			(2 bytes - dots per unit vertical)
-   * Thumbnail X size		(1 byte)
-   * Thumbnail Y size		(1 byte)
-   */
-  
-  emit_marker(cinfo, M_APP0);
-  
-  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */
-
-  emit_byte(cinfo, 0x4A);	/* Identifier: ASCII "JFIF" */
-  emit_byte(cinfo, 0x46);
-  emit_byte(cinfo, 0x49);
-  emit_byte(cinfo, 0x46);
-  emit_byte(cinfo, 0);
-  emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */
-  emit_byte(cinfo, cinfo->JFIF_minor_version);
-  emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */
-  emit_2bytes(cinfo, (int) cinfo->X_density);
-  emit_2bytes(cinfo, (int) cinfo->Y_density);
-  emit_byte(cinfo, 0);		/* No thumbnail image */
-  emit_byte(cinfo, 0);
-}
-
-
-LOCAL(void)
-emit_adobe_app14 (j_compress_ptr cinfo)
-/* Emit an Adobe APP14 marker */
-{
-  /*
-   * Length of APP14 block	(2 bytes)
-   * Block ID			(5 bytes - ASCII "Adobe")
-   * Version Number		(2 bytes - currently 100)
-   * Flags0			(2 bytes - currently 0)
-   * Flags1			(2 bytes - currently 0)
-   * Color transform		(1 byte)
-   *
-   * Although Adobe TN 5116 mentions Version = 101, all the Adobe files
-   * now in circulation seem to use Version = 100, so that's what we write.
-   *
-   * We write the color transform byte as 1 if the JPEG color space is
-   * YCbCr, 2 if it's YCCK, 0 otherwise.  Adobe's definition has to do with
-   * whether the encoder performed a transformation, which is pretty useless.
-   */
-  
-  emit_marker(cinfo, M_APP14);
-  
-  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */
-
-  emit_byte(cinfo, 0x41);	/* Identifier: ASCII "Adobe" */
-  emit_byte(cinfo, 0x64);
-  emit_byte(cinfo, 0x6F);
-  emit_byte(cinfo, 0x62);
-  emit_byte(cinfo, 0x65);
-  emit_2bytes(cinfo, 100);	/* Version */
-  emit_2bytes(cinfo, 0);	/* Flags0 */
-  emit_2bytes(cinfo, 0);	/* Flags1 */
-  switch (cinfo->jpeg_color_space) {
-  case JCS_YCbCr:
-    emit_byte(cinfo, 1);	/* Color transform = 1 */
-    break;
-  case JCS_YCCK:
-    emit_byte(cinfo, 2);	/* Color transform = 2 */
-    break;
-  default:
-    emit_byte(cinfo, 0);	/* Color transform = 0 */
-    break;
-  }
-}
-
-
-/*
- * These routines allow writing an arbitrary marker with parameters.
- * The only intended use is to emit COM or APPn markers after calling
- * write_file_header and before calling write_frame_header.
- * Other uses are not guaranteed to produce desirable results.
- * Counting the parameter bytes properly is the caller's responsibility.
- */
-
-METHODDEF(void)
-write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
-/* Emit an arbitrary marker header */
-{
-  if (datalen > (unsigned int) 65533)		/* safety check */
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  emit_marker(cinfo, (JPEG_MARKER) marker);
-
-  emit_2bytes(cinfo, (int) (datalen + 2));	/* total length */
-}
-
-METHODDEF(void)
-write_marker_byte (j_compress_ptr cinfo, int val)
-/* Emit one byte of marker parameters following write_marker_header */
-{
-  emit_byte(cinfo, val);
-}
-
-
-/*
- * Write datastream header.
- * This consists of an SOI and optional APPn markers.
- * We recommend use of the JFIF marker, but not the Adobe marker,
- * when using YCbCr or grayscale data.  The JFIF marker should NOT
- * be used for any other JPEG colorspace.  The Adobe marker is helpful
- * to distinguish RGB, CMYK, and YCCK colorspaces.
- * Note that an application can write additional header markers after
- * jpeg_start_compress returns.
- */
-
-METHODDEF(void)
-write_file_header (j_compress_ptr cinfo)
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-
-  emit_marker(cinfo, M_SOI);	/* first the SOI */
-
-  /* SOI is defined to reset restart interval to 0 */
-  marker->last_restart_interval = 0;
-
-  if (cinfo->write_JFIF_header)	/* next an optional JFIF APP0 */
-    emit_jfif_app0(cinfo);
-  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
-    emit_adobe_app14(cinfo);
-}
-
-
-/*
- * Write frame header.
- * This consists of DQT and SOFn markers.
- * Note that we do not emit the SOF until we have emitted the DQT(s).
- * This avoids compatibility problems with incorrect implementations that
- * try to error-check the quant table numbers as soon as they see the SOF.
- */
-
-METHODDEF(void)
-write_frame_header (j_compress_ptr cinfo)
-{
-  int ci, prec;
-  boolean is_baseline;
-  jpeg_component_info *compptr;
-  
-  /* Emit DQT for each quantization table.
-   * Note that emit_dqt() suppresses any duplicate tables.
-   */
-  prec = 0;
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    prec += emit_dqt(cinfo, compptr->quant_tbl_no);
-  }
-  /* now prec is nonzero iff there are any 16-bit quant tables. */
-
-  /* Check for a non-baseline specification.
-   * Note we assume that Huffman table numbers won't be changed later.
-   */
-  if (cinfo->arith_code || cinfo->progressive_mode ||
-      cinfo->data_precision != 8) {
-    is_baseline = FALSE;
-  } else {
-    is_baseline = TRUE;
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
-	is_baseline = FALSE;
-    }
-    if (prec && is_baseline) {
-      is_baseline = FALSE;
-      /* If it's baseline except for quantizer size, warn the user */
-      TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
-    }
-  }
-
-  /* Emit the proper SOF marker */
-  if (cinfo->arith_code) {
-    emit_sof(cinfo, M_SOF9);	/* SOF code for arithmetic coding */
-  } else {
-    if (cinfo->progressive_mode)
-      emit_sof(cinfo, M_SOF2);	/* SOF code for progressive Huffman */
-    else if (is_baseline)
-      emit_sof(cinfo, M_SOF0);	/* SOF code for baseline implementation */
-    else
-      emit_sof(cinfo, M_SOF1);	/* SOF code for non-baseline Huffman file */
-  }
-}
-
-
-/*
- * Write scan header.
- * This consists of DHT or DAC markers, optional DRI, and SOS.
- * Compressed data will be written following the SOS.
- */
-
-METHODDEF(void)
-write_scan_header (j_compress_ptr cinfo)
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-  int i;
-  jpeg_component_info *compptr;
-
-  if (cinfo->arith_code) {
-    /* Emit arith conditioning info.  We may have some duplication
-     * if the file has multiple scans, but it's so small it's hardly
-     * worth worrying about.
-     */
-    emit_dac(cinfo);
-  } else {
-    /* Emit Huffman tables.
-     * Note that emit_dht() suppresses any duplicate tables.
-     */
-    for (i = 0; i < cinfo->comps_in_scan; i++) {
-      compptr = cinfo->cur_comp_info[i];
-      if (cinfo->progressive_mode) {
-	/* Progressive mode: only DC or only AC tables are used in one scan */
-	if (cinfo->Ss == 0) {
-	  if (cinfo->Ah == 0)	/* DC needs no table for refinement scan */
-	    emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
-	} else {
-	  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
-	}
-      } else {
-	/* Sequential mode: need both DC and AC tables */
-	emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
-	emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
-      }
-    }
-  }
-
-  /* Emit DRI if required --- note that DRI value could change for each scan.
-   * We avoid wasting space with unnecessary DRIs, however.
-   */
-  if (cinfo->restart_interval != marker->last_restart_interval) {
-    emit_dri(cinfo);
-    marker->last_restart_interval = cinfo->restart_interval;
-  }
-
-  emit_sos(cinfo);
-}
-
-
-/*
- * Write datastream trailer.
- */
-
-METHODDEF(void)
-write_file_trailer (j_compress_ptr cinfo)
-{
-  emit_marker(cinfo, M_EOI);
-}
-
-
-/*
- * Write an abbreviated table-specification datastream.
- * This consists of SOI, DQT and DHT tables, and EOI.
- * Any table that is defined and not marked sent_table = TRUE will be
- * emitted.  Note that all tables will be marked sent_table = TRUE at exit.
- */
-
-METHODDEF(void)
-write_tables_only (j_compress_ptr cinfo)
-{
-  int i;
-
-  emit_marker(cinfo, M_SOI);
-
-  for (i = 0; i < NUM_QUANT_TBLS; i++) {
-    if (cinfo->quant_tbl_ptrs[i] != NULL)
-      (void) emit_dqt(cinfo, i);
-  }
-
-  if (! cinfo->arith_code) {
-    for (i = 0; i < NUM_HUFF_TBLS; i++) {
-      if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
-	emit_dht(cinfo, i, FALSE);
-      if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
-	emit_dht(cinfo, i, TRUE);
-    }
-  }
-
-  emit_marker(cinfo, M_EOI);
-}
-
-
-/*
- * Initialize the marker writer module.
- */
-
-GLOBAL(void)
-jinit_marker_writer (j_compress_ptr cinfo)
-{
-  my_marker_ptr marker;
-
-  /* Create the subobject */
-  marker = (my_marker_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_marker_writer));
-  cinfo->marker = (struct jpeg_marker_writer *) marker;
-  /* Initialize method pointers */
-  marker->pub.write_file_header = write_file_header;
-  marker->pub.write_frame_header = write_frame_header;
-  marker->pub.write_scan_header = write_scan_header;
-  marker->pub.write_file_trailer = write_file_trailer;
-  marker->pub.write_tables_only = write_tables_only;
-  marker->pub.write_marker_header = write_marker_header;
-  marker->pub.write_marker_byte = write_marker_byte;
-  /* Initialize private state */
-  marker->last_restart_interval = 0;
-}
diff --git a/tkimg1.3/libjpeg/jcmaster.c b/tkimg1.3/libjpeg/jcmaster.c
deleted file mode 100644
index aab4020..0000000
--- a/tkimg1.3/libjpeg/jcmaster.c
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
- * jcmaster.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains master control logic for the JPEG compressor.
- * These routines are concerned with parameter validation, initial setup,
- * and inter-pass control (determining the number of passes and the work 
- * to be done in each pass).
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private state */
-
-typedef enum {
-	main_pass,		/* input data, also do first output step */
-	huff_opt_pass,		/* Huffman code optimization pass */
-	output_pass		/* data output pass */
-} c_pass_type;
-
-typedef struct {
-  struct jpeg_comp_master pub;	/* public fields */
-
-  c_pass_type pass_type;	/* the type of the current pass */
-
-  int pass_number;		/* # of passes completed */
-  int total_passes;		/* total # of passes needed */
-
-  int scan_number;		/* current index in scan_info[] */
-} my_comp_master;
-
-typedef my_comp_master * my_master_ptr;
-
-
-/*
- * Support routines that do various essential calculations.
- */
-
-LOCAL(void)
-initial_setup (j_compress_ptr cinfo)
-/* Do computations that are needed before master selection phase */
-{
-  int ci;
-  jpeg_component_info *compptr;
-  long samplesperrow;
-  JDIMENSION jd_samplesperrow;
-
-  /* Sanity check on image dimensions */
-  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
-      || cinfo->num_components <= 0 || cinfo->input_components <= 0)
-    ERREXIT(cinfo, JERR_EMPTY_IMAGE);
-
-  /* Make sure image isn't bigger than I can handle */
-  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
-      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
-    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
-
-  /* Width of an input scanline must be representable as JDIMENSION. */
-  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;
-  jd_samplesperrow = (JDIMENSION) samplesperrow;
-  if ((long) jd_samplesperrow != samplesperrow)
-    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
-
-  /* For now, precision must match compiled-in value... */
-  if (cinfo->data_precision != BITS_IN_JSAMPLE)
-    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
-
-  /* Check that number of components won't exceed internal array sizes */
-  if (cinfo->num_components > MAX_COMPONENTS)
-    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
-	     MAX_COMPONENTS);
-
-  /* Compute maximum sampling factors; check factor validity */
-  cinfo->max_h_samp_factor = 1;
-  cinfo->max_v_samp_factor = 1;
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||
-	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)
-      ERREXIT(cinfo, JERR_BAD_SAMPLING);
-    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
-				   compptr->h_samp_factor);
-    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
-				   compptr->v_samp_factor);
-  }
-
-  /* Compute dimensions of components */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Fill in the correct component_index value; don't rely on application */
-    compptr->component_index = ci;
-    /* For compression, we never do DCT scaling. */
-    compptr->DCT_scaled_size = DCTSIZE;
-    /* Size in DCT blocks */
-    compptr->width_in_blocks = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
-		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
-    compptr->height_in_blocks = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
-		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
-    /* Size in samples */
-    compptr->downsampled_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
-		    (long) cinfo->max_h_samp_factor);
-    compptr->downsampled_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
-		    (long) cinfo->max_v_samp_factor);
-    /* Mark component needed (this flag isn't actually used for compression) */
-    compptr->component_needed = TRUE;
-  }
-
-  /* Compute number of fully interleaved MCU rows (number of times that
-   * main controller will call coefficient controller).
-   */
-  cinfo->total_iMCU_rows = (JDIMENSION)
-    jdiv_round_up((long) cinfo->image_height,
-		  (long) (cinfo->max_v_samp_factor*DCTSIZE));
-}
-
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-
-LOCAL(void)
-validate_script (j_compress_ptr cinfo)
-/* Verify that the scan script in cinfo->scan_info[] is valid; also
- * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.
- */
-{
-  const jpeg_scan_info * scanptr;
-  int scanno, ncomps, ci, coefi, thisi;
-  int Ss, Se, Ah, Al;
-  boolean component_sent[MAX_COMPONENTS];
-#ifdef C_PROGRESSIVE_SUPPORTED
-  int * last_bitpos_ptr;
-  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
-  /* -1 until that coefficient has been seen; then last Al for it */
-#endif
-
-  if (cinfo->num_scans <= 0)
-    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);
-
-  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;
-   * for progressive JPEG, no scan can have this.
-   */
-  scanptr = cinfo->scan_info;
-  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {
-#ifdef C_PROGRESSIVE_SUPPORTED
-    cinfo->progressive_mode = TRUE;
-    last_bitpos_ptr = & last_bitpos[0][0];
-    for (ci = 0; ci < cinfo->num_components; ci++) 
-      for (coefi = 0; coefi < DCTSIZE2; coefi++)
-	*last_bitpos_ptr++ = -1;
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-  } else {
-    cinfo->progressive_mode = FALSE;
-    for (ci = 0; ci < cinfo->num_components; ci++) 
-      component_sent[ci] = FALSE;
-  }
-
-  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {
-    /* Validate component indexes */
-    ncomps = scanptr->comps_in_scan;
-    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)
-      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);
-    for (ci = 0; ci < ncomps; ci++) {
-      thisi = scanptr->component_index[ci];
-      if (thisi < 0 || thisi >= cinfo->num_components)
-	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
-      /* Components must appear in SOF order within each scan */
-      if (ci > 0 && thisi <= scanptr->component_index[ci-1])
-	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
-    }
-    /* Validate progression parameters */
-    Ss = scanptr->Ss;
-    Se = scanptr->Se;
-    Ah = scanptr->Ah;
-    Al = scanptr->Al;
-    if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
-      /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that
-       * seems wrong: the upper bound ought to depend on data precision.
-       * Perhaps they really meant 0..N+1 for N-bit precision.
-       * Here we allow 0..10 for 8-bit data; Al larger than 10 results in
-       * out-of-range reconstructed DC values during the first DC scan,
-       * which might cause problems for some decoders.
-       */
-#if BITS_IN_JSAMPLE == 8
-#define MAX_AH_AL 10
-#else
-#define MAX_AH_AL 13
-#endif
-      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||
-	  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)
-	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-      if (Ss == 0) {
-	if (Se != 0)		/* DC and AC together not OK */
-	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-      } else {
-	if (ncomps != 1)	/* AC scans must be for only one component */
-	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-      }
-      for (ci = 0; ci < ncomps; ci++) {
-	last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];
-	if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */
-	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-	for (coefi = Ss; coefi <= Se; coefi++) {
-	  if (last_bitpos_ptr[coefi] < 0) {
-	    /* first scan of this coefficient */
-	    if (Ah != 0)
-	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-	  } else {
-	    /* not first scan */
-	    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)
-	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-	  }
-	  last_bitpos_ptr[coefi] = Al;
-	}
-      }
-#endif
-    } else {
-      /* For sequential JPEG, all progression parameters must be these: */
-      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
-	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
-      /* Make sure components are not sent twice */
-      for (ci = 0; ci < ncomps; ci++) {
-	thisi = scanptr->component_index[ci];
-	if (component_sent[thisi])
-	  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
-	component_sent[thisi] = TRUE;
-      }
-    }
-  }
-
-  /* Now verify that everything got sent. */
-  if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
-    /* For progressive mode, we only check that at least some DC data
-     * got sent for each component; the spec does not require that all bits
-     * of all coefficients be transmitted.  Would it be wiser to enforce
-     * transmission of all coefficient bits??
-     */
-    for (ci = 0; ci < cinfo->num_components; ci++) {
-      if (last_bitpos[ci][0] < 0)
-	ERREXIT(cinfo, JERR_MISSING_DATA);
-    }
-#endif
-  } else {
-    for (ci = 0; ci < cinfo->num_components; ci++) {
-      if (! component_sent[ci])
-	ERREXIT(cinfo, JERR_MISSING_DATA);
-    }
-  }
-}
-
-#endif /* C_MULTISCAN_FILES_SUPPORTED */
-
-
-LOCAL(void)
-select_scan_parameters (j_compress_ptr cinfo)
-/* Set up the scan parameters for the current scan */
-{
-  int ci;
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-  if (cinfo->scan_info != NULL) {
-    /* Prepare for current scan --- the script is already validated */
-    my_master_ptr master = (my_master_ptr) cinfo->master;
-    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;
-
-    cinfo->comps_in_scan = scanptr->comps_in_scan;
-    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {
-      cinfo->cur_comp_info[ci] =
-	&cinfo->comp_info[scanptr->component_index[ci]];
-    }
-    cinfo->Ss = scanptr->Ss;
-    cinfo->Se = scanptr->Se;
-    cinfo->Ah = scanptr->Ah;
-    cinfo->Al = scanptr->Al;
-  }
-  else
-#endif
-  {
-    /* Prepare for single sequential-JPEG scan containing all components */
-    if (cinfo->num_components > MAX_COMPS_IN_SCAN)
-      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
-	       MAX_COMPS_IN_SCAN);
-    cinfo->comps_in_scan = cinfo->num_components;
-    for (ci = 0; ci < cinfo->num_components; ci++) {
-      cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];
-    }
-    cinfo->Ss = 0;
-    cinfo->Se = DCTSIZE2-1;
-    cinfo->Ah = 0;
-    cinfo->Al = 0;
-  }
-}
-
-
-LOCAL(void)
-per_scan_setup (j_compress_ptr cinfo)
-/* Do computations that are needed before processing a JPEG scan */
-/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */
-{
-  int ci, mcublks, tmp;
-  jpeg_component_info *compptr;
-  
-  if (cinfo->comps_in_scan == 1) {
-    
-    /* Noninterleaved (single-component) scan */
-    compptr = cinfo->cur_comp_info[0];
-    
-    /* Overall image size in MCUs */
-    cinfo->MCUs_per_row = compptr->width_in_blocks;
-    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
-    
-    /* For noninterleaved scan, always one block per MCU */
-    compptr->MCU_width = 1;
-    compptr->MCU_height = 1;
-    compptr->MCU_blocks = 1;
-    compptr->MCU_sample_width = DCTSIZE;
-    compptr->last_col_width = 1;
-    /* For noninterleaved scans, it is convenient to define last_row_height
-     * as the number of block rows present in the last iMCU row.
-     */
-    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
-    if (tmp == 0) tmp = compptr->v_samp_factor;
-    compptr->last_row_height = tmp;
-    
-    /* Prepare array describing MCU composition */
-    cinfo->blocks_in_MCU = 1;
-    cinfo->MCU_membership[0] = 0;
-    
-  } else {
-    
-    /* Interleaved (multi-component) scan */
-    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
-      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
-	       MAX_COMPS_IN_SCAN);
-    
-    /* Overall image size in MCUs */
-    cinfo->MCUs_per_row = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width,
-		    (long) (cinfo->max_h_samp_factor*DCTSIZE));
-    cinfo->MCU_rows_in_scan = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height,
-		    (long) (cinfo->max_v_samp_factor*DCTSIZE));
-    
-    cinfo->blocks_in_MCU = 0;
-    
-    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-      compptr = cinfo->cur_comp_info[ci];
-      /* Sampling factors give # of blocks of component in each MCU */
-      compptr->MCU_width = compptr->h_samp_factor;
-      compptr->MCU_height = compptr->v_samp_factor;
-      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
-      compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE;
-      /* Figure number of non-dummy blocks in last MCU column & row */
-      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
-      if (tmp == 0) tmp = compptr->MCU_width;
-      compptr->last_col_width = tmp;
-      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);
-      if (tmp == 0) tmp = compptr->MCU_height;
-      compptr->last_row_height = tmp;
-      /* Prepare array describing MCU composition */
-      mcublks = compptr->MCU_blocks;
-      if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU)
-	ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
-      while (mcublks-- > 0) {
-	cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
-      }
-    }
-    
-  }
-
-  /* Convert restart specified in rows to actual MCU count. */
-  /* Note that count must fit in 16 bits, so we provide limiting. */
-  if (cinfo->restart_in_rows > 0) {
-    long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row;
-    cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L);
-  }
-}
-
-
-/*
- * Per-pass setup.
- * This is called at the beginning of each pass.  We determine which modules
- * will be active during this pass and give them appropriate start_pass calls.
- * We also set is_last_pass to indicate whether any more passes will be
- * required.
- */
-
-METHODDEF(void)
-prepare_for_pass (j_compress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-
-  switch (master->pass_type) {
-  case main_pass:
-    /* Initial pass: will collect input data, and do either Huffman
-     * optimization or data output for the first scan.
-     */
-    select_scan_parameters(cinfo);
-    per_scan_setup(cinfo);
-    if (! cinfo->raw_data_in) {
-      (*cinfo->cconvert->start_pass) (cinfo);
-      (*cinfo->downsample->start_pass) (cinfo);
-      (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU);
-    }
-    (*cinfo->fdct->start_pass) (cinfo);
-    (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding);
-    (*cinfo->coef->start_pass) (cinfo,
-				(master->total_passes > 1 ?
-				 JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));
-    (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
-    if (cinfo->optimize_coding) {
-      /* No immediate data output; postpone writing frame/scan headers */
-      master->pub.call_pass_startup = FALSE;
-    } else {
-      /* Will write frame/scan headers at first jpeg_write_scanlines call */
-      master->pub.call_pass_startup = TRUE;
-    }
-    break;
-#ifdef ENTROPY_OPT_SUPPORTED
-  case huff_opt_pass:
-    /* Do Huffman optimization for a scan after the first one. */
-    select_scan_parameters(cinfo);
-    per_scan_setup(cinfo);
-    if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) {
-      (*cinfo->entropy->start_pass) (cinfo, TRUE);
-      (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
-      master->pub.call_pass_startup = FALSE;
-      break;
-    }
-    /* Special case: Huffman DC refinement scans need no Huffman table
-     * and therefore we can skip the optimization pass for them.
-     */
-    master->pass_type = output_pass;
-    master->pass_number++;
-    /*FALLTHROUGH*/
-#endif
-  case output_pass:
-    /* Do a data-output pass. */
-    /* We need not repeat per-scan setup if prior optimization pass did it. */
-    if (! cinfo->optimize_coding) {
-      select_scan_parameters(cinfo);
-      per_scan_setup(cinfo);
-    }
-    (*cinfo->entropy->start_pass) (cinfo, FALSE);
-    (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
-    /* We emit frame/scan headers now */
-    if (master->scan_number == 0)
-      (*cinfo->marker->write_frame_header) (cinfo);
-    (*cinfo->marker->write_scan_header) (cinfo);
-    master->pub.call_pass_startup = FALSE;
-    break;
-  default:
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-  }
-
-  master->pub.is_last_pass = (master->pass_number == master->total_passes-1);
-
-  /* Set up progress monitor's pass info if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->completed_passes = master->pass_number;
-    cinfo->progress->total_passes = master->total_passes;
-  }
-}
-
-
-/*
- * Special start-of-pass hook.
- * This is called by jpeg_write_scanlines if call_pass_startup is TRUE.
- * In single-pass processing, we need this hook because we don't want to
- * write frame/scan headers during jpeg_start_compress; we want to let the
- * application write COM markers etc. between jpeg_start_compress and the
- * jpeg_write_scanlines loop.
- * In multi-pass processing, this routine is not used.
- */
-
-METHODDEF(void)
-pass_startup (j_compress_ptr cinfo)
-{
-  cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */
-
-  (*cinfo->marker->write_frame_header) (cinfo);
-  (*cinfo->marker->write_scan_header) (cinfo);
-}
-
-
-/*
- * Finish up at end of pass.
- */
-
-METHODDEF(void)
-finish_pass_master (j_compress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-
-  /* The entropy coder always needs an end-of-pass call,
-   * either to analyze statistics or to flush its output buffer.
-   */
-  (*cinfo->entropy->finish_pass) (cinfo);
-
-  /* Update state for next pass */
-  switch (master->pass_type) {
-  case main_pass:
-    /* next pass is either output of scan 0 (after optimization)
-     * or output of scan 1 (if no optimization).
-     */
-    master->pass_type = output_pass;
-    if (! cinfo->optimize_coding)
-      master->scan_number++;
-    break;
-  case huff_opt_pass:
-    /* next pass is always output of current scan */
-    master->pass_type = output_pass;
-    break;
-  case output_pass:
-    /* next pass is either optimization or output of next scan */
-    if (cinfo->optimize_coding)
-      master->pass_type = huff_opt_pass;
-    master->scan_number++;
-    break;
-  }
-
-  master->pass_number++;
-}
-
-
-/*
- * Initialize master compression control.
- */
-
-GLOBAL(void)
-jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
-{
-  my_master_ptr master;
-
-  master = (my_master_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(my_comp_master));
-  cinfo->master = (struct jpeg_comp_master *) master;
-  master->pub.prepare_for_pass = prepare_for_pass;
-  master->pub.pass_startup = pass_startup;
-  master->pub.finish_pass = finish_pass_master;
-  master->pub.is_last_pass = FALSE;
-
-  /* Validate parameters, determine derived values */
-  initial_setup(cinfo);
-
-  if (cinfo->scan_info != NULL) {
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-    validate_script(cinfo);
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-  } else {
-    cinfo->progressive_mode = FALSE;
-    cinfo->num_scans = 1;
-  }
-
-  if (cinfo->progressive_mode)	/*  TEMPORARY HACK ??? */
-    cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
-
-  /* Initialize my private state */
-  if (transcode_only) {
-    /* no main pass in transcoding */
-    if (cinfo->optimize_coding)
-      master->pass_type = huff_opt_pass;
-    else
-      master->pass_type = output_pass;
-  } else {
-    /* for normal compression, first pass is always this type: */
-    master->pass_type = main_pass;
-  }
-  master->scan_number = 0;
-  master->pass_number = 0;
-  if (cinfo->optimize_coding)
-    master->total_passes = cinfo->num_scans * 2;
-  else
-    master->total_passes = cinfo->num_scans;
-}
diff --git a/tkimg1.3/libjpeg/jcomapi.c b/tkimg1.3/libjpeg/jcomapi.c
deleted file mode 100644
index 9b1fa75..0000000
--- a/tkimg1.3/libjpeg/jcomapi.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * jcomapi.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface routines that are used for both
- * compression and decompression.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Abort processing of a JPEG compression or decompression operation,
- * but don't destroy the object itself.
- *
- * For this, we merely clean up all the nonpermanent memory pools.
- * Note that temp files (virtual arrays) are not allowed to belong to
- * the permanent pool, so we will be able to close all temp files here.
- * Closing a data source or destination, if necessary, is the application's
- * responsibility.
- */
-
-GLOBAL(void)
-jpeg_abort (j_common_ptr cinfo)
-{
-  int pool;
-
-  /* Do nothing if called on a not-initialized or destroyed JPEG object. */
-  if (cinfo->mem == NULL)
-    return;
-
-  /* Releasing pools in reverse order might help avoid fragmentation
-   * with some (brain-damaged) malloc libraries.
-   */
-  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
-    (*cinfo->mem->free_pool) (cinfo, pool);
-  }
-
-  /* Reset overall state for possible reuse of object */
-  if (cinfo->is_decompressor) {
-    cinfo->global_state = DSTATE_START;
-    /* Try to keep application from accessing now-deleted marker list.
-     * A bit kludgy to do it here, but this is the most central place.
-     */
-    ((j_decompress_ptr) cinfo)->marker_list = NULL;
-  } else {
-    cinfo->global_state = CSTATE_START;
-  }
-}
-
-
-/*
- * Destruction of a JPEG object.
- *
- * Everything gets deallocated except the master jpeg_compress_struct itself
- * and the error manager struct.  Both of these are supplied by the application
- * and must be freed, if necessary, by the application.  (Often they are on
- * the stack and so don't need to be freed anyway.)
- * Closing a data source or destination, if necessary, is the application's
- * responsibility.
- */
-
-GLOBAL(void)
-jpeg_destroy (j_common_ptr cinfo)
-{
-  /* We need only tell the memory manager to release everything. */
-  /* NB: mem pointer is NULL if memory mgr failed to initialize. */
-  if (cinfo->mem != NULL)
-    (*cinfo->mem->self_destruct) (cinfo);
-  cinfo->mem = NULL;		/* be safe if jpeg_destroy is called twice */
-  cinfo->global_state = 0;	/* mark it destroyed */
-}
-
-
-/*
- * Convenience routines for allocating quantization and Huffman tables.
- * (Would jutils.c be a more reasonable place to put these?)
- */
-
-GLOBAL(JQUANT_TBL *)
-jpeg_alloc_quant_table (j_common_ptr cinfo)
-{
-  JQUANT_TBL *tbl;
-
-  tbl = (JQUANT_TBL *)
-    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));
-  tbl->sent_table = FALSE;	/* make sure this is false in any new table */
-  return tbl;
-}
-
-
-GLOBAL(JHUFF_TBL *)
-jpeg_alloc_huff_table (j_common_ptr cinfo)
-{
-  JHUFF_TBL *tbl;
-
-  tbl = (JHUFF_TBL *)
-    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));
-  tbl->sent_table = FALSE;	/* make sure this is false in any new table */
-  return tbl;
-}
diff --git a/tkimg1.3/libjpeg/jconfig.bcc b/tkimg1.3/libjpeg/jconfig.bcc
deleted file mode 100644
index c6c53ff..0000000
--- a/tkimg1.3/libjpeg/jconfig.bcc
+++ /dev/null
@@ -1,48 +0,0 @@
-/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#ifdef __MSDOS__
-#define NEED_FAR_POINTERS	/* for small or medium memory model */
-#endif
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN	/* this assumes you have -w-stu in CFLAGS */
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#ifdef __MSDOS__
-#define USE_MSDOS_MEMMGR	/* Define this if you use jmemdos.c */
-#define MAX_ALLOC_CHUNK 65520L	/* Maximum request to malloc() */
-#define USE_FMEM		/* Borland has _fmemcpy() and _fmemset() */
-#endif
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define USE_SETMODE		/* Borland has setmode() */
-#ifdef __MSDOS__
-#define NEED_SIGNAL_CATCHER	/* Define this if you use jmemdos.c */
-#endif
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.cfg b/tkimg1.3/libjpeg/jconfig.cfg
deleted file mode 100644
index 36a04fa..0000000
--- a/tkimg1.3/libjpeg/jconfig.cfg
+++ /dev/null
@@ -1,44 +0,0 @@
-/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.doc for explanations */
-
-#undef HAVE_PROTOTYPES
-#undef HAVE_UNSIGNED_CHAR
-#undef HAVE_UNSIGNED_SHORT
-#undef void
-#undef const
-#undef CHAR_IS_UNSIGNED
-#undef HAVE_STDDEF_H
-#undef HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-/* Define this if you get warnings about undefined structures. */
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-#undef INLINE
-/* These are for configuring the JPEG memory manager. */
-#undef DEFAULT_MAX_MEM
-#undef NO_MKTEMP
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
-#undef PROGRESS_REPORT
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.dj b/tkimg1.3/libjpeg/jconfig.dj
deleted file mode 100644
index f759a9d..0000000
--- a/tkimg1.3/libjpeg/jconfig.dj
+++ /dev/null
@@ -1,38 +0,0 @@
-/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS	/* DJGPP uses flat 32-bit addressing */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE	/* optional */
-#define USE_SETMODE		/* Needed to make one-file style work in DJGPP */
-#undef NEED_SIGNAL_CATCHER	/* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.doc b/tkimg1.3/libjpeg/jconfig.doc
deleted file mode 100644
index c18d1c0..0000000
--- a/tkimg1.3/libjpeg/jconfig.doc
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * jconfig.doc
- *
- * Copyright (C) 1991-1994, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file documents the configuration options that are required to
- * customize the JPEG software for a particular system.
- *
- * The actual configuration options for a particular installation are stored
- * in jconfig.h.  On many machines, jconfig.h can be generated automatically
- * or copied from one of the "canned" jconfig files that we supply.  But if
- * you need to generate a jconfig.h file by hand, this file tells you how.
- *
- * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
- * EDIT A COPY NAMED JCONFIG.H.
- */
-
-
-/*
- * These symbols indicate the properties of your machine or compiler.
- * #define the symbol if yes, #undef it if no.
- */
-
-/* Does your compiler support function prototypes?
- * (If not, you also need to use ansi2knr, see install.doc)
- */
-#define HAVE_PROTOTYPES
-
-/* Does your compiler support the declaration "unsigned char" ?
- * How about "unsigned short" ?
- */
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-
-/* Define "void" as "char" if your compiler doesn't know about type void.
- * NOTE: be sure to define void such that "void *" represents the most general
- * pointer type, e.g., that returned by malloc().
- */
-/* #define void char */
-
-/* Define "const" as empty if your compiler doesn't know the "const" keyword.
- */
-/* #define const */
-
-/* Define this if an ordinary "char" type is unsigned.
- * If you're not sure, leaving it undefined will work at some cost in speed.
- * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
- */
-#undef CHAR_IS_UNSIGNED
-
-/* Define this if your system has an ANSI-conforming <stddef.h> file.
- */
-#define HAVE_STDDEF_H
-
-/* Define this if your system has an ANSI-conforming <stdlib.h> file.
- */
-#define HAVE_STDLIB_H
-
-/* Define this if your system does not have an ANSI/SysV <string.h>,
- * but does have a BSD-style <strings.h>.
- */
-#undef NEED_BSD_STRINGS
-
-/* Define this if your system does not provide typedef size_t in any of the
- * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
- * <sys/types.h> instead.
- */
-#undef NEED_SYS_TYPES_H
-
-/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
- * unless you are using a large-data memory model or 80386 flat-memory mode.
- * On less brain-damaged CPUs this symbol must not be defined.
- * (Defining this symbol causes large data structures to be referenced through
- * "far" pointers and to be allocated with a special version of malloc.)
- */
-#undef NEED_FAR_POINTERS
-
-/* Define this if your linker needs global names to be unique in less
- * than the first 15 characters.
- */
-#undef NEED_SHORT_EXTERNAL_NAMES
-
-/* Although a real ANSI C compiler can deal perfectly well with pointers to
- * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
- * and pseudo-ANSI compilers get confused.  To keep one of these bozos happy,
- * define INCOMPLETE_TYPES_BROKEN.  This is not recommended unless you
- * actually get "missing structure definition" warnings or errors while
- * compiling the JPEG code.
- */
-#undef INCOMPLETE_TYPES_BROKEN
-
-
-/*
- * The following options affect code selection within the JPEG library,
- * but they don't need to be visible to applications using the library.
- * To minimize application namespace pollution, the symbols won't be
- * defined unless JPEG_INTERNALS has been defined.
- */
-
-#ifdef JPEG_INTERNALS
-
-/* Define this if your compiler implements ">>" on signed values as a logical
- * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
- * which is the normal and rational definition.
- */
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-
-#endif /* JPEG_INTERNALS */
-
-
-/*
- * The remaining options do not affect the JPEG library proper,
- * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
- * Other applications can ignore these.
- */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-/* These defines indicate which image (non-JPEG) file formats are allowed. */
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-/* Define this if you want to name both input and output files on the command
- * line, rather than using stdout and optionally stdin.  You MUST do this if
- * your system can't cope with binary I/O to stdin/stdout.  See comments at
- * head of cjpeg.c or djpeg.c.
- */
-#undef TWO_FILE_COMMANDLINE
-
-/* Define this if your system needs explicit cleanup of temporary files.
- * This is crucial under MS-DOS, where the temporary "files" may be areas
- * of extended memory; on most other systems it's not as important.
- */
-#undef NEED_SIGNAL_CATCHER
-
-/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
- * This is necessary on systems that distinguish text files from binary files,
- * and is harmless on most systems that don't.  If you have one of the rare
- * systems that complains about the "b" spec, define this symbol.
- */
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg.
- */
-#undef PROGRESS_REPORT
-
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.mac b/tkimg1.3/libjpeg/jconfig.mac
deleted file mode 100644
index 0de3efe..0000000
--- a/tkimg1.3/libjpeg/jconfig.mac
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define USE_MAC_MEMMGR		/* Define this if you use jmemmac.c */
-
-#define ALIGN_TYPE long		/* Needed for 680x0 Macs */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define USE_CCOMMAND		/* Command line reader for Macintosh */
-#define TWO_FILE_COMMANDLINE	/* Binary I/O thru stdin/stdout doesn't work */
-
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.manx b/tkimg1.3/libjpeg/jconfig.manx
deleted file mode 100644
index 6dd0d00..0000000
--- a/tkimg1.3/libjpeg/jconfig.manx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define TEMP_DIRECTORY "JPEGTMP:"	/* recommended setting for Amiga */
-
-#define SHORTxSHORT_32		/* produces better DCT code with Aztec C */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#define signal_catcher _abort	/* hack for Aztec C naming requirements */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.mc6 b/tkimg1.3/libjpeg/jconfig.mc6
deleted file mode 100644
index c55082d..0000000
--- a/tkimg1.3/libjpeg/jconfig.mc6
+++ /dev/null
@@ -1,52 +0,0 @@
-/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#define NEED_FAR_POINTERS	/* for small or medium memory model */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define USE_MSDOS_MEMMGR	/* Define this if you use jmemdos.c */
-
-#define MAX_ALLOC_CHUNK 65520L	/* Maximum request to malloc() */
-
-#define USE_FMEM		/* Microsoft has _fmemcpy() and _fmemset() */
-
-#define NEED_FHEAPMIN		/* far heap management routines are broken */
-
-#define SHORTxLCONST_32		/* enable compiler-specific DCT optimization */
-/* Note: the above define is known to improve the code with Microsoft C 6.00A.
- * I do not know whether it is good for later compiler versions.
- * Please report any info on this point to jpeg-info at uunet.uu.net.
- */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define USE_SETMODE		/* Microsoft has setmode() */
-#define NEED_SIGNAL_CATCHER	/* Define this if you use jmemdos.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.sas b/tkimg1.3/libjpeg/jconfig.sas
deleted file mode 100644
index efdac22..0000000
--- a/tkimg1.3/libjpeg/jconfig.sas
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define TEMP_DIRECTORY "JPEGTMP:"	/* recommended setting for Amiga */
-
-#define NO_MKTEMP		/* SAS C doesn't have mktemp() */
-
-#define SHORTxSHORT_32		/* produces better DCT code with SAS C */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.st b/tkimg1.3/libjpeg/jconfig.st
deleted file mode 100644
index 4421b7a..0000000
--- a/tkimg1.3/libjpeg/jconfig.st
+++ /dev/null
@@ -1,42 +0,0 @@
-/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#define INCOMPLETE_TYPES_BROKEN	/* suppress undefined-structure warnings */
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define ALIGN_TYPE  long	/* apparently double is a weird size? */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE	/* optional -- undef if you like Unix style */
-/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define
- * USE_SETMODE.  Some Atari compilers require it, some do not.
- */
-#define NEED_SIGNAL_CATCHER	/* needed if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.vc b/tkimg1.3/libjpeg/jconfig.vc
deleted file mode 100644
index 7e291c7..0000000
--- a/tkimg1.3/libjpeg/jconfig.vc
+++ /dev/null
@@ -1,45 +0,0 @@
-/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS	/* we presume a 32-bit flat memory model */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-/* Define "boolean" as unsigned char, not int, per Windows custom */
-#ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
-typedef unsigned char boolean;
-#endif
-#define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
-
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE	/* optional */
-#define USE_SETMODE		/* Microsoft has setmode() */
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.vms b/tkimg1.3/libjpeg/jconfig.vms
deleted file mode 100644
index 55a6ffb..0000000
--- a/tkimg1.3/libjpeg/jconfig.vms
+++ /dev/null
@@ -1,37 +0,0 @@
-/* jconfig.vms --- jconfig.h for use on Digital VMS. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE	/* Needed on VMS */
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jconfig.wat b/tkimg1.3/libjpeg/jconfig.wat
deleted file mode 100644
index 6cc545b..0000000
--- a/tkimg1.3/libjpeg/jconfig.wat
+++ /dev/null
@@ -1,38 +0,0 @@
-/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#define CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS	/* Watcom uses flat 32-bit addressing */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE	/* optional */
-#define USE_SETMODE		/* Needed to make one-file style work in Watcom */
-#undef NEED_SIGNAL_CATCHER	/* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT		/* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/tkimg1.3/libjpeg/jcparam.c b/tkimg1.3/libjpeg/jcparam.c
deleted file mode 100644
index 6fc48f5..0000000
--- a/tkimg1.3/libjpeg/jcparam.c
+++ /dev/null
@@ -1,610 +0,0 @@
-/*
- * jcparam.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains optional default-setting code for the JPEG compressor.
- * Applications do not have to use this file, but those that don't use it
- * must know a lot more about the innards of the JPEG code.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Quantization table setup routines
- */
-
-GLOBAL(void)
-jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
-		      const unsigned int *basic_table,
-		      int scale_factor, boolean force_baseline)
-/* Define a quantization table equal to the basic_table times
- * a scale factor (given as a percentage).
- * If force_baseline is TRUE, the computed quantization table entries
- * are limited to 1..255 for JPEG baseline compatibility.
- */
-{
-  JQUANT_TBL ** qtblptr;
-  int i;
-  long temp;
-
-  /* Safety check to ensure start_compress not called yet. */
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)
-    ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);
-
-  qtblptr = & cinfo->quant_tbl_ptrs[which_tbl];
-
-  if (*qtblptr == NULL)
-    *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo);
-
-  for (i = 0; i < DCTSIZE2; i++) {
-    temp = ((long) basic_table[i] * scale_factor + 50L) / 100L;
-    /* limit the values to the valid range */
-    if (temp <= 0L) temp = 1L;
-    if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */
-    if (force_baseline && temp > 255L)
-      temp = 255L;		/* limit to baseline range if requested */
-    (*qtblptr)->quantval[i] = (UINT16) temp;
-  }
-
-  /* Initialize sent_table FALSE so table will be written to JPEG file. */
-  (*qtblptr)->sent_table = FALSE;
-}
-
-
-GLOBAL(void)
-jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
-			 boolean force_baseline)
-/* Set or change the 'quality' (quantization) setting, using default tables
- * and a straight percentage-scaling quality scale.  In most cases it's better
- * to use jpeg_set_quality (below); this entry point is provided for
- * applications that insist on a linear percentage scaling.
- */
-{
-  /* These are the sample quantization tables given in JPEG spec section K.1.
-   * The spec says that the values given produce "good" quality, and
-   * when divided by 2, "very good" quality.
-   */
-  static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
-    16,  11,  10,  16,  24,  40,  51,  61,
-    12,  12,  14,  19,  26,  58,  60,  55,
-    14,  13,  16,  24,  40,  57,  69,  56,
-    14,  17,  22,  29,  51,  87,  80,  62,
-    18,  22,  37,  56,  68, 109, 103,  77,
-    24,  35,  55,  64,  81, 104, 113,  92,
-    49,  64,  78,  87, 103, 121, 120, 101,
-    72,  92,  95,  98, 112, 100, 103,  99
-  };
-  static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
-    17,  18,  24,  47,  99,  99,  99,  99,
-    18,  21,  26,  66,  99,  99,  99,  99,
-    24,  26,  56,  99,  99,  99,  99,  99,
-    47,  66,  99,  99,  99,  99,  99,  99,
-    99,  99,  99,  99,  99,  99,  99,  99,
-    99,  99,  99,  99,  99,  99,  99,  99,
-    99,  99,  99,  99,  99,  99,  99,  99,
-    99,  99,  99,  99,  99,  99,  99,  99
-  };
-
-  /* Set up two quantization tables using the specified scaling */
-  jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
-		       scale_factor, force_baseline);
-  jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
-		       scale_factor, force_baseline);
-}
-
-
-GLOBAL(int)
-jpeg_quality_scaling (int quality)
-/* Convert a user-specified quality rating to a percentage scaling factor
- * for an underlying quantization table, using our recommended scaling curve.
- * The input 'quality' factor should be 0 (terrible) to 100 (very good).
- */
-{
-  /* Safety limit on quality factor.  Convert 0 to 1 to avoid zero divide. */
-  if (quality <= 0) quality = 1;
-  if (quality > 100) quality = 100;
-
-  /* The basic table is used as-is (scaling 100) for a quality of 50.
-   * Qualities 50..100 are converted to scaling percentage 200 - 2*Q;
-   * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table
-   * to make all the table entries 1 (hence, minimum quantization loss).
-   * Qualities 1..50 are converted to scaling percentage 5000/Q.
-   */
-  if (quality < 50)
-    quality = 5000 / quality;
-  else
-    quality = 200 - quality*2;
-
-  return quality;
-}
-
-
-GLOBAL(void)
-jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
-/* Set or change the 'quality' (quantization) setting, using default tables.
- * This is the standard quality-adjusting entry point for typical user
- * interfaces; only those who want detailed control over quantization tables
- * would use the preceding three routines directly.
- */
-{
-  /* Convert user 0-100 rating to percentage scaling */
-  quality = jpeg_quality_scaling(quality);
-
-  /* Set up standard quality tables */
-  jpeg_set_linear_quality(cinfo, quality, force_baseline);
-}
-
-
-/*
- * Huffman table setup routines
- */
-
-LOCAL(void)
-add_huff_table (j_compress_ptr cinfo,
-		JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
-/* Define a Huffman table */
-{
-  int nsymbols, len;
-
-  if (*htblptr == NULL)
-    *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
-
-  /* Copy the number-of-symbols-of-each-code-length counts */
-  MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
-
-  /* Validate the counts.  We do this here mainly so we can copy the right
-   * number of symbols from the val[] array, without risking marching off
-   * the end of memory.  jchuff.c will do a more thorough test later.
-   */
-  nsymbols = 0;
-  for (len = 1; len <= 16; len++)
-    nsymbols += bits[len];
-  if (nsymbols < 1 || nsymbols > 256)
-    ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-
-  MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
-
-  /* Initialize sent_table FALSE so table will be written to JPEG file. */
-  (*htblptr)->sent_table = FALSE;
-}
-
-
-LOCAL(void)
-std_huff_tables (j_compress_ptr cinfo)
-/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
-/* IMPORTANT: these are only valid for 8-bit data precision! */
-{
-  static const UINT8 bits_dc_luminance[17] =
-    { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
-  static const UINT8 val_dc_luminance[] =
-    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
-  
-  static const UINT8 bits_dc_chrominance[17] =
-    { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
-  static const UINT8 val_dc_chrominance[] =
-    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
-  
-  static const UINT8 bits_ac_luminance[17] =
-    { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
-  static const UINT8 val_ac_luminance[] =
-    { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
-      0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
-      0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
-      0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
-      0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
-      0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
-      0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
-      0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
-      0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
-      0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
-      0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
-      0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
-      0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
-      0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
-      0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
-      0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
-      0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
-      0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
-      0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
-      0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
-      0xf9, 0xfa };
-  
-  static const UINT8 bits_ac_chrominance[17] =
-    { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
-  static const UINT8 val_ac_chrominance[] =
-    { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
-      0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
-      0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
-      0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
-      0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
-      0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
-      0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
-      0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
-      0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
-      0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
-      0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
-      0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
-      0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
-      0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
-      0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
-      0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
-      0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
-      0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
-      0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
-      0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
-      0xf9, 0xfa };
-  
-  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0],
-		 bits_dc_luminance, val_dc_luminance);
-  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0],
-		 bits_ac_luminance, val_ac_luminance);
-  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1],
-		 bits_dc_chrominance, val_dc_chrominance);
-  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1],
-		 bits_ac_chrominance, val_ac_chrominance);
-}
-
-
-/*
- * Default parameter setup for compression.
- *
- * Applications that don't choose to use this routine must do their
- * own setup of all these parameters.  Alternately, you can call this
- * to establish defaults and then alter parameters selectively.  This
- * is the recommended approach since, if we add any new parameters,
- * your code will still work (they'll be set to reasonable defaults).
- */
-
-GLOBAL(void)
-jpeg_set_defaults (j_compress_ptr cinfo)
-{
-  int i;
-
-  /* Safety check to ensure start_compress not called yet. */
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  /* Allocate comp_info array large enough for maximum component count.
-   * Array is made permanent in case application wants to compress
-   * multiple images at same param settings.
-   */
-  if (cinfo->comp_info == NULL)
-    cinfo->comp_info = (jpeg_component_info *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  MAX_COMPONENTS * SIZEOF(jpeg_component_info));
-
-  /* Initialize everything not dependent on the color space */
-
-  cinfo->data_precision = BITS_IN_JSAMPLE;
-  /* Set up two quantization tables using default quality of 75 */
-  jpeg_set_quality(cinfo, 75, TRUE);
-  /* Set up two Huffman tables */
-  std_huff_tables(cinfo);
-
-  /* Initialize default arithmetic coding conditioning */
-  for (i = 0; i < NUM_ARITH_TBLS; i++) {
-    cinfo->arith_dc_L[i] = 0;
-    cinfo->arith_dc_U[i] = 1;
-    cinfo->arith_ac_K[i] = 5;
-  }
-
-  /* Default is no multiple-scan output */
-  cinfo->scan_info = NULL;
-  cinfo->num_scans = 0;
-
-  /* Expect normal source image, not raw downsampled data */
-  cinfo->raw_data_in = FALSE;
-
-  /* Use Huffman coding, not arithmetic coding, by default */
-  cinfo->arith_code = FALSE;
-
-  /* By default, don't do extra passes to optimize entropy coding */
-  cinfo->optimize_coding = FALSE;
-  /* The standard Huffman tables are only valid for 8-bit data precision.
-   * If the precision is higher, force optimization on so that usable
-   * tables will be computed.  This test can be removed if default tables
-   * are supplied that are valid for the desired precision.
-   */
-  if (cinfo->data_precision > 8)
-    cinfo->optimize_coding = TRUE;
-
-  /* By default, use the simpler non-cosited sampling alignment */
-  cinfo->CCIR601_sampling = FALSE;
-
-  /* No input smoothing */
-  cinfo->smoothing_factor = 0;
-
-  /* DCT algorithm preference */
-  cinfo->dct_method = JDCT_DEFAULT;
-
-  /* No restart markers */
-  cinfo->restart_interval = 0;
-  cinfo->restart_in_rows = 0;
-
-  /* Fill in default JFIF marker parameters.  Note that whether the marker
-   * will actually be written is determined by jpeg_set_colorspace.
-   *
-   * By default, the library emits JFIF version code 1.01.
-   * An application that wants to emit JFIF 1.02 extension markers should set
-   * JFIF_minor_version to 2.  We could probably get away with just defaulting
-   * to 1.02, but there may still be some decoders in use that will complain
-   * about that; saying 1.01 should minimize compatibility problems.
-   */
-  cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */
-  cinfo->JFIF_minor_version = 1;
-  cinfo->density_unit = 0;	/* Pixel size is unknown by default */
-  cinfo->X_density = 1;		/* Pixel aspect ratio is square by default */
-  cinfo->Y_density = 1;
-
-  /* Choose JPEG colorspace based on input space, set defaults accordingly */
-
-  jpeg_default_colorspace(cinfo);
-}
-
-
-/*
- * Select an appropriate JPEG colorspace for in_color_space.
- */
-
-GLOBAL(void)
-jpeg_default_colorspace (j_compress_ptr cinfo)
-{
-  switch (cinfo->in_color_space) {
-  case JCS_GRAYSCALE:
-    jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
-    break;
-  case JCS_RGB:
-    jpeg_set_colorspace(cinfo, JCS_YCbCr);
-    break;
-  case JCS_YCbCr:
-    jpeg_set_colorspace(cinfo, JCS_YCbCr);
-    break;
-  case JCS_CMYK:
-    jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */
-    break;
-  case JCS_YCCK:
-    jpeg_set_colorspace(cinfo, JCS_YCCK);
-    break;
-  case JCS_UNKNOWN:
-    jpeg_set_colorspace(cinfo, JCS_UNKNOWN);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
-  }
-}
-
-
-/*
- * Set the JPEG colorspace, and choose colorspace-dependent default values.
- */
-
-GLOBAL(void)
-jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
-{
-  jpeg_component_info * compptr;
-  int ci;
-
-#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl)  \
-  (compptr = &cinfo->comp_info[index], \
-   compptr->component_id = (id), \
-   compptr->h_samp_factor = (hsamp), \
-   compptr->v_samp_factor = (vsamp), \
-   compptr->quant_tbl_no = (quant), \
-   compptr->dc_tbl_no = (dctbl), \
-   compptr->ac_tbl_no = (actbl) )
-
-  /* Safety check to ensure start_compress not called yet. */
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  /* For all colorspaces, we use Q and Huff tables 0 for luminance components,
-   * tables 1 for chrominance components.
-   */
-
-  cinfo->jpeg_color_space = colorspace;
-
-  cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */
-  cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */
-
-  switch (colorspace) {
-  case JCS_GRAYSCALE:
-    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
-    cinfo->num_components = 1;
-    /* JFIF specifies component ID 1 */
-    SET_COMP(0, 1, 1,1, 0, 0,0);
-    break;
-  case JCS_RGB:
-    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */
-    cinfo->num_components = 3;
-    SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0);
-    SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0);
-    SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0);
-    break;
-  case JCS_YCbCr:
-    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
-    cinfo->num_components = 3;
-    /* JFIF specifies component IDs 1,2,3 */
-    /* We default to 2x2 subsamples of chrominance */
-    SET_COMP(0, 1, 2,2, 0, 0,0);
-    SET_COMP(1, 2, 1,1, 1, 1,1);
-    SET_COMP(2, 3, 1,1, 1, 1,1);
-    break;
-  case JCS_CMYK:
-    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */
-    cinfo->num_components = 4;
-    SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0);
-    SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0);
-    SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0);
-    SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0);
-    break;
-  case JCS_YCCK:
-    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */
-    cinfo->num_components = 4;
-    SET_COMP(0, 1, 2,2, 0, 0,0);
-    SET_COMP(1, 2, 1,1, 1, 1,1);
-    SET_COMP(2, 3, 1,1, 1, 1,1);
-    SET_COMP(3, 4, 2,2, 0, 0,0);
-    break;
-  case JCS_UNKNOWN:
-    cinfo->num_components = cinfo->input_components;
-    if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS)
-      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
-	       MAX_COMPONENTS);
-    for (ci = 0; ci < cinfo->num_components; ci++) {
-      SET_COMP(ci, ci, 1,1, 0, 0,0);
-    }
-    break;
-  default:
-    ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-  }
-}
-
-
-#ifdef C_PROGRESSIVE_SUPPORTED
-
-LOCAL(jpeg_scan_info *)
-fill_a_scan (jpeg_scan_info * scanptr, int ci,
-	     int Ss, int Se, int Ah, int Al)
-/* Support routine: generate one scan for specified component */
-{
-  scanptr->comps_in_scan = 1;
-  scanptr->component_index[0] = ci;
-  scanptr->Ss = Ss;
-  scanptr->Se = Se;
-  scanptr->Ah = Ah;
-  scanptr->Al = Al;
-  scanptr++;
-  return scanptr;
-}
-
-LOCAL(jpeg_scan_info *)
-fill_scans (jpeg_scan_info * scanptr, int ncomps,
-	    int Ss, int Se, int Ah, int Al)
-/* Support routine: generate one scan for each component */
-{
-  int ci;
-
-  for (ci = 0; ci < ncomps; ci++) {
-    scanptr->comps_in_scan = 1;
-    scanptr->component_index[0] = ci;
-    scanptr->Ss = Ss;
-    scanptr->Se = Se;
-    scanptr->Ah = Ah;
-    scanptr->Al = Al;
-    scanptr++;
-  }
-  return scanptr;
-}
-
-LOCAL(jpeg_scan_info *)
-fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)
-/* Support routine: generate interleaved DC scan if possible, else N scans */
-{
-  int ci;
-
-  if (ncomps <= MAX_COMPS_IN_SCAN) {
-    /* Single interleaved DC scan */
-    scanptr->comps_in_scan = ncomps;
-    for (ci = 0; ci < ncomps; ci++)
-      scanptr->component_index[ci] = ci;
-    scanptr->Ss = scanptr->Se = 0;
-    scanptr->Ah = Ah;
-    scanptr->Al = Al;
-    scanptr++;
-  } else {
-    /* Noninterleaved DC scan for each component */
-    scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);
-  }
-  return scanptr;
-}
-
-
-/*
- * Create a recommended progressive-JPEG script.
- * cinfo->num_components and cinfo->jpeg_color_space must be correct.
- */
-
-GLOBAL(void)
-jpeg_simple_progression (j_compress_ptr cinfo)
-{
-  int ncomps = cinfo->num_components;
-  int nscans;
-  jpeg_scan_info * scanptr;
-
-  /* Safety check to ensure start_compress not called yet. */
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  /* Figure space needed for script.  Calculation must match code below! */
-  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
-    /* Custom script for YCbCr color images. */
-    nscans = 10;
-  } else {
-    /* All-purpose script for other color spaces. */
-    if (ncomps > MAX_COMPS_IN_SCAN)
-      nscans = 6 * ncomps;	/* 2 DC + 4 AC scans per component */
-    else
-      nscans = 2 + 4 * ncomps;	/* 2 DC scans; 4 AC scans per component */
-  }
-
-  /* Allocate space for script.
-   * We need to put it in the permanent pool in case the application performs
-   * multiple compressions without changing the settings.  To avoid a memory
-   * leak if jpeg_simple_progression is called repeatedly for the same JPEG
-   * object, we try to re-use previously allocated space, and we allocate
-   * enough space to handle YCbCr even if initially asked for grayscale.
-   */
-  if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) {
-    cinfo->script_space_size = MAX(nscans, 10);
-    cinfo->script_space = (jpeg_scan_info *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-			cinfo->script_space_size * SIZEOF(jpeg_scan_info));
-  }
-  scanptr = cinfo->script_space;
-  cinfo->scan_info = scanptr;
-  cinfo->num_scans = nscans;
-
-  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {
-    /* Custom script for YCbCr color images. */
-    /* Initial DC scan */
-    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
-    /* Initial AC scan: get some luma data out in a hurry */
-    scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2);
-    /* Chroma data is too small to be worth expending many scans on */
-    scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1);
-    scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1);
-    /* Complete spectral selection for luma AC */
-    scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2);
-    /* Refine next bit of luma AC */
-    scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1);
-    /* Finish DC successive approximation */
-    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
-    /* Finish AC successive approximation */
-    scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0);
-    scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);
-    /* Luma bottom bit comes last since it's usually largest scan */
-    scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);
-  } else {
-    /* All-purpose script for other color spaces. */
-    /* Successive approximation first pass */
-    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);
-    scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2);
-    scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2);
-    /* Successive approximation second pass */
-    scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1);
-    /* Successive approximation final pass */
-    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
-    scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);
-  }
-}
-
-#endif /* C_PROGRESSIVE_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jcphuff.c b/tkimg1.3/libjpeg/jcphuff.c
deleted file mode 100644
index 07f9178..0000000
--- a/tkimg1.3/libjpeg/jcphuff.c
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- * jcphuff.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy encoding routines for progressive JPEG.
- *
- * We do not support output suspension in this module, since the library
- * currently does not allow multiple-scan files to be written with output
- * suspension.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jchuff.h"		/* Declarations shared with jchuff.c */
-
-#ifdef C_PROGRESSIVE_SUPPORTED
-
-/* Expanded entropy encoder object for progressive Huffman encoding. */
-
-typedef struct {
-  struct jpeg_entropy_encoder pub; /* public fields */
-
-  /* Mode flag: TRUE for optimization, FALSE for actual data output */
-  boolean gather_statistics;
-
-  /* Bit-level coding status.
-   * next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
-   */
-  JOCTET * next_output_byte;	/* => next byte to write in buffer */
-  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
-  INT32 put_buffer;		/* current bit-accumulation buffer */
-  int put_bits;			/* # of bits now in it */
-  j_compress_ptr cinfo;		/* link to cinfo (needed for dump_buffer) */
-
-  /* Coding status for DC components */
-  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
-
-  /* Coding status for AC components */
-  int ac_tbl_no;		/* the table number of the single component */
-  unsigned int EOBRUN;		/* run length of EOBs */
-  unsigned int BE;		/* # of buffered correction bits before MCU */
-  char * bit_buffer;		/* buffer for correction bits (1 per char) */
-  /* packing correction bits tightly would save some space but cost time... */
-
-  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
-  int next_restart_num;		/* next restart number to write (0-7) */
-
-  /* Pointers to derived tables (these workspaces have image lifespan).
-   * Since any one scan codes only DC or only AC, we only need one set
-   * of tables, not one for DC and one for AC.
-   */
-  c_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
-
-  /* Statistics tables for optimization; again, one set is enough */
-  long * count_ptrs[NUM_HUFF_TBLS];
-} phuff_entropy_encoder;
-
-typedef phuff_entropy_encoder * phuff_entropy_ptr;
-
-/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit
- * buffer can hold.  Larger sizes may slightly improve compression, but
- * 1000 is already well into the realm of overkill.
- * The minimum safe size is 64 bits.
- */
-
-#define MAX_CORR_BITS  1000	/* Max # of correction bits I can buffer */
-
-/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
- * We assume that int right shift is unsigned if INT32 right shift is,
- * which should be safe.
- */
-
-#ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define ISHIFT_TEMPS	int ishift_temp;
-#define IRIGHT_SHIFT(x,shft)  \
-	((ishift_temp = (x)) < 0 ? \
-	 (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \
-	 (ishift_temp >> (shft)))
-#else
-#define ISHIFT_TEMPS
-#define IRIGHT_SHIFT(x,shft)	((x) >> (shft))
-#endif
-
-/* Forward declarations */
-METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
-					    JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
-					    JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
-					     JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
-					     JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
-METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
-
-
-/*
- * Initialize for a Huffman-compressed scan using progressive JPEG.
- */
-
-METHODDEF(void)
-start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)
-{  
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  boolean is_DC_band;
-  int ci, tbl;
-  jpeg_component_info * compptr;
-
-  entropy->cinfo = cinfo;
-  entropy->gather_statistics = gather_statistics;
-
-  is_DC_band = (cinfo->Ss == 0);
-
-  /* We assume jcmaster.c already validated the scan parameters. */
-
-  /* Select execution routines */
-  if (cinfo->Ah == 0) {
-    if (is_DC_band)
-      entropy->pub.encode_mcu = encode_mcu_DC_first;
-    else
-      entropy->pub.encode_mcu = encode_mcu_AC_first;
-  } else {
-    if (is_DC_band)
-      entropy->pub.encode_mcu = encode_mcu_DC_refine;
-    else {
-      entropy->pub.encode_mcu = encode_mcu_AC_refine;
-      /* AC refinement needs a correction bit buffer */
-      if (entropy->bit_buffer == NULL)
-	entropy->bit_buffer = (char *)
-	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				      MAX_CORR_BITS * SIZEOF(char));
-    }
-  }
-  if (gather_statistics)
-    entropy->pub.finish_pass = finish_pass_gather_phuff;
-  else
-    entropy->pub.finish_pass = finish_pass_phuff;
-
-  /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1
-   * for AC coefficients.
-   */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    /* Initialize DC predictions to 0 */
-    entropy->last_dc_val[ci] = 0;
-    /* Get table index */
-    if (is_DC_band) {
-      if (cinfo->Ah != 0)	/* DC refinement needs no table */
-	continue;
-      tbl = compptr->dc_tbl_no;
-    } else {
-      entropy->ac_tbl_no = tbl = compptr->ac_tbl_no;
-    }
-    if (gather_statistics) {
-      /* Check for invalid table index */
-      /* (make_c_derived_tbl does this in the other path) */
-      if (tbl < 0 || tbl >= NUM_HUFF_TBLS)
-        ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);
-      /* Allocate and zero the statistics tables */
-      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
-      if (entropy->count_ptrs[tbl] == NULL)
-	entropy->count_ptrs[tbl] = (long *)
-	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				      257 * SIZEOF(long));
-      MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long));
-    } else {
-      /* Compute derived values for Huffman table */
-      /* We may do this more than once for a table, but it's not expensive */
-      jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl,
-			      & entropy->derived_tbls[tbl]);
-    }
-  }
-
-  /* Initialize AC stuff */
-  entropy->EOBRUN = 0;
-  entropy->BE = 0;
-
-  /* Initialize bit buffer to empty */
-  entropy->put_buffer = 0;
-  entropy->put_bits = 0;
-
-  /* Initialize restart stuff */
-  entropy->restarts_to_go = cinfo->restart_interval;
-  entropy->next_restart_num = 0;
-}
-
-
-/* Outputting bytes to the file.
- * NB: these must be called only when actually outputting,
- * that is, entropy->gather_statistics == FALSE.
- */
-
-/* Emit a byte */
-#define emit_byte(entropy,val)  \
-	{ *(entropy)->next_output_byte++ = (JOCTET) (val);  \
-	  if (--(entropy)->free_in_buffer == 0)  \
-	    dump_buffer(entropy); }
-
-
-LOCAL(void)
-dump_buffer (phuff_entropy_ptr entropy)
-/* Empty the output buffer; we do not support suspension in this module. */
-{
-  struct jpeg_destination_mgr * dest = entropy->cinfo->dest;
-
-  if (! (*dest->empty_output_buffer) (entropy->cinfo))
-    ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND);
-  /* After a successful buffer dump, must reset buffer pointers */
-  entropy->next_output_byte = dest->next_output_byte;
-  entropy->free_in_buffer = dest->free_in_buffer;
-}
-
-
-/* Outputting bits to the file */
-
-/* Only the right 24 bits of put_buffer are used; the valid bits are
- * left-justified in this part.  At most 16 bits can be passed to emit_bits
- * in one call, and we never retain more than 7 bits in put_buffer
- * between calls, so 24 bits are sufficient.
- */
-
-INLINE
-LOCAL(void)
-emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
-/* Emit some bits, unless we are in gather mode */
-{
-  /* This routine is heavily used, so it's worth coding tightly. */
-  register INT32 put_buffer = (INT32) code;
-  register int put_bits = entropy->put_bits;
-
-  /* if size is 0, caller used an invalid Huffman table entry */
-  if (size == 0)
-    ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
-
-  if (entropy->gather_statistics)
-    return;			/* do nothing if we're only getting stats */
-
-  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
-  
-  put_bits += size;		/* new number of bits in buffer */
-  
-  put_buffer <<= 24 - put_bits; /* align incoming bits */
-
-  put_buffer |= entropy->put_buffer; /* and merge with old buffer contents */
-
-  while (put_bits >= 8) {
-    int c = (int) ((put_buffer >> 16) & 0xFF);
-    
-    emit_byte(entropy, c);
-    if (c == 0xFF) {		/* need to stuff a zero byte? */
-      emit_byte(entropy, 0);
-    }
-    put_buffer <<= 8;
-    put_bits -= 8;
-  }
-
-  entropy->put_buffer = put_buffer; /* update variables */
-  entropy->put_bits = put_bits;
-}
-
-
-LOCAL(void)
-flush_bits (phuff_entropy_ptr entropy)
-{
-  emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */
-  entropy->put_buffer = 0;     /* and reset bit-buffer to empty */
-  entropy->put_bits = 0;
-}
-
-
-/*
- * Emit (or just count) a Huffman symbol.
- */
-
-INLINE
-LOCAL(void)
-emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)
-{
-  if (entropy->gather_statistics)
-    entropy->count_ptrs[tbl_no][symbol]++;
-  else {
-    c_derived_tbl * tbl = entropy->derived_tbls[tbl_no];
-    emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);
-  }
-}
-
-
-/*
- * Emit bits from a correction bit buffer.
- */
-
-LOCAL(void)
-emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,
-		    unsigned int nbits)
-{
-  if (entropy->gather_statistics)
-    return;			/* no real work */
-
-  while (nbits > 0) {
-    emit_bits(entropy, (unsigned int) (*bufstart), 1);
-    bufstart++;
-    nbits--;
-  }
-}
-
-
-/*
- * Emit any pending EOBRUN symbol.
- */
-
-LOCAL(void)
-emit_eobrun (phuff_entropy_ptr entropy)
-{
-  register int temp, nbits;
-
-  if (entropy->EOBRUN > 0) {	/* if there is any pending EOBRUN */
-    temp = entropy->EOBRUN;
-    nbits = 0;
-    while ((temp >>= 1))
-      nbits++;
-    /* safety check: shouldn't happen given limited correction-bit buffer */
-    if (nbits > 14)
-      ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
-
-    emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4);
-    if (nbits)
-      emit_bits(entropy, entropy->EOBRUN, nbits);
-
-    entropy->EOBRUN = 0;
-
-    /* Emit any buffered correction bits */
-    emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE);
-    entropy->BE = 0;
-  }
-}
-
-
-/*
- * Emit a restart marker & resynchronize predictions.
- */
-
-LOCAL(void)
-emit_restart (phuff_entropy_ptr entropy, int restart_num)
-{
-  int ci;
-
-  emit_eobrun(entropy);
-
-  if (! entropy->gather_statistics) {
-    flush_bits(entropy);
-    emit_byte(entropy, 0xFF);
-    emit_byte(entropy, JPEG_RST0 + restart_num);
-  }
-
-  if (entropy->cinfo->Ss == 0) {
-    /* Re-initialize DC predictions to 0 */
-    for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++)
-      entropy->last_dc_val[ci] = 0;
-  } else {
-    /* Re-initialize all AC-related fields to 0 */
-    entropy->EOBRUN = 0;
-    entropy->BE = 0;
-  }
-}
-
-
-/*
- * MCU encoding for DC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  register int temp, temp2;
-  register int nbits;
-  int blkn, ci;
-  int Al = cinfo->Al;
-  JBLOCKROW block;
-  jpeg_component_info * compptr;
-  ISHIFT_TEMPS
-
-  entropy->next_output_byte = cinfo->dest->next_output_byte;
-  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
-  /* Emit restart marker if needed */
-  if (cinfo->restart_interval)
-    if (entropy->restarts_to_go == 0)
-      emit_restart(entropy, entropy->next_restart_num);
-
-  /* Encode the MCU data blocks */
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    block = MCU_data[blkn];
-    ci = cinfo->MCU_membership[blkn];
-    compptr = cinfo->cur_comp_info[ci];
-
-    /* Compute the DC value after the required point transform by Al.
-     * This is simply an arithmetic right shift.
-     */
-    temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al);
-
-    /* DC differences are figured on the point-transformed values. */
-    temp = temp2 - entropy->last_dc_val[ci];
-    entropy->last_dc_val[ci] = temp2;
-
-    /* Encode the DC coefficient difference per section G.1.2.1 */
-    temp2 = temp;
-    if (temp < 0) {
-      temp = -temp;		/* temp is abs value of input */
-      /* For a negative input, want temp2 = bitwise complement of abs(input) */
-      /* This code assumes we are on a two's complement machine */
-      temp2--;
-    }
-    
-    /* Find the number of bits needed for the magnitude of the coefficient */
-    nbits = 0;
-    while (temp) {
-      nbits++;
-      temp >>= 1;
-    }
-    /* Check for out-of-range coefficient values.
-     * Since we're encoding a difference, the range limit is twice as much.
-     */
-    if (nbits > MAX_COEF_BITS+1)
-      ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-    
-    /* Count/emit the Huffman-coded symbol for the number of bits */
-    emit_symbol(entropy, compptr->dc_tbl_no, nbits);
-    
-    /* Emit that number of bits of the value, if positive, */
-    /* or the complement of its magnitude, if negative. */
-    if (nbits)			/* emit_bits rejects calls with size 0 */
-      emit_bits(entropy, (unsigned int) temp2, nbits);
-  }
-
-  cinfo->dest->next_output_byte = entropy->next_output_byte;
-  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
-  /* Update restart-interval state too */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      entropy->restarts_to_go = cinfo->restart_interval;
-      entropy->next_restart_num++;
-      entropy->next_restart_num &= 7;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  return TRUE;
-}
-
-
-/*
- * MCU encoding for AC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  register int temp, temp2;
-  register int nbits;
-  register int r, k;
-  int Se = cinfo->Se;
-  int Al = cinfo->Al;
-  JBLOCKROW block;
-
-  entropy->next_output_byte = cinfo->dest->next_output_byte;
-  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
-  /* Emit restart marker if needed */
-  if (cinfo->restart_interval)
-    if (entropy->restarts_to_go == 0)
-      emit_restart(entropy, entropy->next_restart_num);
-
-  /* Encode the MCU data block */
-  block = MCU_data[0];
-
-  /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */
-  
-  r = 0;			/* r = run length of zeros */
-   
-  for (k = cinfo->Ss; k <= Se; k++) {
-    if ((temp = (*block)[jpeg_natural_order[k]]) == 0) {
-      r++;
-      continue;
-    }
-    /* We must apply the point transform by Al.  For AC coefficients this
-     * is an integer division with rounding towards 0.  To do this portably
-     * in C, we shift after obtaining the absolute value; so the code is
-     * interwoven with finding the abs value (temp) and output bits (temp2).
-     */
-    if (temp < 0) {
-      temp = -temp;		/* temp is abs value of input */
-      temp >>= Al;		/* apply the point transform */
-      /* For a negative coef, want temp2 = bitwise complement of abs(coef) */
-      temp2 = ~temp;
-    } else {
-      temp >>= Al;		/* apply the point transform */
-      temp2 = temp;
-    }
-    /* Watch out for case that nonzero coef is zero after point transform */
-    if (temp == 0) {
-      r++;
-      continue;
-    }
-
-    /* Emit any pending EOBRUN */
-    if (entropy->EOBRUN > 0)
-      emit_eobrun(entropy);
-    /* if run length > 15, must emit special run-length-16 codes (0xF0) */
-    while (r > 15) {
-      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
-      r -= 16;
-    }
-
-    /* Find the number of bits needed for the magnitude of the coefficient */
-    nbits = 1;			/* there must be at least one 1 bit */
-    while ((temp >>= 1))
-      nbits++;
-    /* Check for out-of-range coefficient values */
-    if (nbits > MAX_COEF_BITS)
-      ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-
-    /* Count/emit Huffman symbol for run length / number of bits */
-    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);
-
-    /* Emit that number of bits of the value, if positive, */
-    /* or the complement of its magnitude, if negative. */
-    emit_bits(entropy, (unsigned int) temp2, nbits);
-
-    r = 0;			/* reset zero run length */
-  }
-
-  if (r > 0) {			/* If there are trailing zeroes, */
-    entropy->EOBRUN++;		/* count an EOB */
-    if (entropy->EOBRUN == 0x7FFF)
-      emit_eobrun(entropy);	/* force it out to avoid overflow */
-  }
-
-  cinfo->dest->next_output_byte = entropy->next_output_byte;
-  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
-  /* Update restart-interval state too */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      entropy->restarts_to_go = cinfo->restart_interval;
-      entropy->next_restart_num++;
-      entropy->next_restart_num &= 7;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  return TRUE;
-}
-
-
-/*
- * MCU encoding for DC successive approximation refinement scan.
- * Note: we assume such scans can be multi-component, although the spec
- * is not very clear on the point.
- */
-
-METHODDEF(boolean)
-encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  register int temp;
-  int blkn;
-  int Al = cinfo->Al;
-  JBLOCKROW block;
-
-  entropy->next_output_byte = cinfo->dest->next_output_byte;
-  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
-  /* Emit restart marker if needed */
-  if (cinfo->restart_interval)
-    if (entropy->restarts_to_go == 0)
-      emit_restart(entropy, entropy->next_restart_num);
-
-  /* Encode the MCU data blocks */
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    block = MCU_data[blkn];
-
-    /* We simply emit the Al'th bit of the DC coefficient value. */
-    temp = (*block)[0];
-    emit_bits(entropy, (unsigned int) (temp >> Al), 1);
-  }
-
-  cinfo->dest->next_output_byte = entropy->next_output_byte;
-  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
-  /* Update restart-interval state too */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      entropy->restarts_to_go = cinfo->restart_interval;
-      entropy->next_restart_num++;
-      entropy->next_restart_num &= 7;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  return TRUE;
-}
-
-
-/*
- * MCU encoding for AC successive approximation refinement scan.
- */
-
-METHODDEF(boolean)
-encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  register int temp;
-  register int r, k;
-  int EOB;
-  char *BR_buffer;
-  unsigned int BR;
-  int Se = cinfo->Se;
-  int Al = cinfo->Al;
-  JBLOCKROW block;
-  int absvalues[DCTSIZE2];
-
-  entropy->next_output_byte = cinfo->dest->next_output_byte;
-  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
-  /* Emit restart marker if needed */
-  if (cinfo->restart_interval)
-    if (entropy->restarts_to_go == 0)
-      emit_restart(entropy, entropy->next_restart_num);
-
-  /* Encode the MCU data block */
-  block = MCU_data[0];
-
-  /* It is convenient to make a pre-pass to determine the transformed
-   * coefficients' absolute values and the EOB position.
-   */
-  EOB = 0;
-  for (k = cinfo->Ss; k <= Se; k++) {
-    temp = (*block)[jpeg_natural_order[k]];
-    /* We must apply the point transform by Al.  For AC coefficients this
-     * is an integer division with rounding towards 0.  To do this portably
-     * in C, we shift after obtaining the absolute value.
-     */
-    if (temp < 0)
-      temp = -temp;		/* temp is abs value of input */
-    temp >>= Al;		/* apply the point transform */
-    absvalues[k] = temp;	/* save abs value for main pass */
-    if (temp == 1)
-      EOB = k;			/* EOB = index of last newly-nonzero coef */
-  }
-
-  /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */
-  
-  r = 0;			/* r = run length of zeros */
-  BR = 0;			/* BR = count of buffered bits added now */
-  BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */
-
-  for (k = cinfo->Ss; k <= Se; k++) {
-    if ((temp = absvalues[k]) == 0) {
-      r++;
-      continue;
-    }
-
-    /* Emit any required ZRLs, but not if they can be folded into EOB */
-    while (r > 15 && k <= EOB) {
-      /* emit any pending EOBRUN and the BE correction bits */
-      emit_eobrun(entropy);
-      /* Emit ZRL */
-      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
-      r -= 16;
-      /* Emit buffered correction bits that must be associated with ZRL */
-      emit_buffered_bits(entropy, BR_buffer, BR);
-      BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
-      BR = 0;
-    }
-
-    /* If the coef was previously nonzero, it only needs a correction bit.
-     * NOTE: a straight translation of the spec's figure G.7 would suggest
-     * that we also need to test r > 15.  But if r > 15, we can only get here
-     * if k > EOB, which implies that this coefficient is not 1.
-     */
-    if (temp > 1) {
-      /* The correction bit is the next bit of the absolute value. */
-      BR_buffer[BR++] = (char) (temp & 1);
-      continue;
-    }
-
-    /* Emit any pending EOBRUN and the BE correction bits */
-    emit_eobrun(entropy);
-
-    /* Count/emit Huffman symbol for run length / number of bits */
-    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1);
-
-    /* Emit output bit for newly-nonzero coef */
-    temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1;
-    emit_bits(entropy, (unsigned int) temp, 1);
-
-    /* Emit buffered correction bits that must be associated with this code */
-    emit_buffered_bits(entropy, BR_buffer, BR);
-    BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
-    BR = 0;
-    r = 0;			/* reset zero run length */
-  }
-
-  if (r > 0 || BR > 0) {	/* If there are trailing zeroes, */
-    entropy->EOBRUN++;		/* count an EOB */
-    entropy->BE += BR;		/* concat my correction bits to older ones */
-    /* We force out the EOB if we risk either:
-     * 1. overflow of the EOB counter;
-     * 2. overflow of the correction bit buffer during the next MCU.
-     */
-    if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1))
-      emit_eobrun(entropy);
-  }
-
-  cinfo->dest->next_output_byte = entropy->next_output_byte;
-  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
-  /* Update restart-interval state too */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0) {
-      entropy->restarts_to_go = cinfo->restart_interval;
-      entropy->next_restart_num++;
-      entropy->next_restart_num &= 7;
-    }
-    entropy->restarts_to_go--;
-  }
-
-  return TRUE;
-}
-
-
-/*
- * Finish up at the end of a Huffman-compressed progressive scan.
- */
-
-METHODDEF(void)
-finish_pass_phuff (j_compress_ptr cinfo)
-{   
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-
-  entropy->next_output_byte = cinfo->dest->next_output_byte;
-  entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
-  /* Flush out any buffered data */
-  emit_eobrun(entropy);
-  flush_bits(entropy);
-
-  cinfo->dest->next_output_byte = entropy->next_output_byte;
-  cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-}
-
-
-/*
- * Finish up a statistics-gathering pass and create the new Huffman tables.
- */
-
-METHODDEF(void)
-finish_pass_gather_phuff (j_compress_ptr cinfo)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  boolean is_DC_band;
-  int ci, tbl;
-  jpeg_component_info * compptr;
-  JHUFF_TBL **htblptr;
-  boolean did[NUM_HUFF_TBLS];
-
-  /* Flush out buffered data (all we care about is counting the EOB symbol) */
-  emit_eobrun(entropy);
-
-  is_DC_band = (cinfo->Ss == 0);
-
-  /* It's important not to apply jpeg_gen_optimal_table more than once
-   * per table, because it clobbers the input frequency counts!
-   */
-  MEMZERO(did, SIZEOF(did));
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    if (is_DC_band) {
-      if (cinfo->Ah != 0)	/* DC refinement needs no table */
-	continue;
-      tbl = compptr->dc_tbl_no;
-    } else {
-      tbl = compptr->ac_tbl_no;
-    }
-    if (! did[tbl]) {
-      if (is_DC_band)
-        htblptr = & cinfo->dc_huff_tbl_ptrs[tbl];
-      else
-        htblptr = & cinfo->ac_huff_tbl_ptrs[tbl];
-      if (*htblptr == NULL)
-        *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
-      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]);
-      did[tbl] = TRUE;
-    }
-  }
-}
-
-
-/*
- * Module initialization routine for progressive Huffman entropy encoding.
- */
-
-GLOBAL(void)
-jinit_phuff_encoder (j_compress_ptr cinfo)
-{
-  phuff_entropy_ptr entropy;
-  int i;
-
-  entropy = (phuff_entropy_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(phuff_entropy_encoder));
-  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
-  entropy->pub.start_pass = start_pass_phuff;
-
-  /* Mark tables unallocated */
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    entropy->derived_tbls[i] = NULL;
-    entropy->count_ptrs[i] = NULL;
-  }
-  entropy->bit_buffer = NULL;	/* needed only in AC refinement scan */
-}
-
-#endif /* C_PROGRESSIVE_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jcprepct.c b/tkimg1.3/libjpeg/jcprepct.c
deleted file mode 100644
index fa93333..0000000
--- a/tkimg1.3/libjpeg/jcprepct.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * jcprepct.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the compression preprocessing controller.
- * This controller manages the color conversion, downsampling,
- * and edge expansion steps.
- *
- * Most of the complexity here is associated with buffering input rows
- * as required by the downsampler.  See the comments at the head of
- * jcsample.c for the downsampler's needs.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* At present, jcsample.c can request context rows only for smoothing.
- * In the future, we might also need context rows for CCIR601 sampling
- * or other more-complex downsampling procedures.  The code to support
- * context rows should be compiled only if needed.
- */
-#ifdef INPUT_SMOOTHING_SUPPORTED
-#define CONTEXT_ROWS_SUPPORTED
-#endif
-
-
-/*
- * For the simple (no-context-row) case, we just need to buffer one
- * row group's worth of pixels for the downsampling step.  At the bottom of
- * the image, we pad to a full row group by replicating the last pixel row.
- * The downsampler's last output row is then replicated if needed to pad
- * out to a full iMCU row.
- *
- * When providing context rows, we must buffer three row groups' worth of
- * pixels.  Three row groups are physically allocated, but the row pointer
- * arrays are made five row groups high, with the extra pointers above and
- * below "wrapping around" to point to the last and first real row groups.
- * This allows the downsampler to access the proper context rows.
- * At the top and bottom of the image, we create dummy context rows by
- * copying the first or last real pixel row.  This copying could be avoided
- * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the
- * trouble on the compression side.
- */
-
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_c_prep_controller pub; /* public fields */
-
-  /* Downsampling input buffer.  This buffer holds color-converted data
-   * until we have enough to do a downsample step.
-   */
-  JSAMPARRAY color_buf[MAX_COMPONENTS];
-
-  JDIMENSION rows_to_go;	/* counts rows remaining in source image */
-  int next_buf_row;		/* index of next row to store in color_buf */
-
-#ifdef CONTEXT_ROWS_SUPPORTED	/* only needed for context case */
-  int this_row_group;		/* starting row index of group to process */
-  int next_buf_stop;		/* downsample when we reach this index */
-#endif
-} my_prep_controller;
-
-typedef my_prep_controller * my_prep_ptr;
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
-
-  if (pass_mode != JBUF_PASS_THRU)
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-
-  /* Initialize total-height counter for detecting bottom of image */
-  prep->rows_to_go = cinfo->image_height;
-  /* Mark the conversion buffer empty */
-  prep->next_buf_row = 0;
-#ifdef CONTEXT_ROWS_SUPPORTED
-  /* Preset additional state variables for context mode.
-   * These aren't used in non-context mode, so we needn't test which mode.
-   */
-  prep->this_row_group = 0;
-  /* Set next_buf_stop to stop after two row groups have been read in. */
-  prep->next_buf_stop = 2 * cinfo->max_v_samp_factor;
-#endif
-}
-
-
-/*
- * Expand an image vertically from height input_rows to height output_rows,
- * by duplicating the bottom row.
- */
-
-LOCAL(void)
-expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols,
-		    int input_rows, int output_rows)
-{
-  register int row;
-
-  for (row = input_rows; row < output_rows; row++) {
-    jcopy_sample_rows(image_data, input_rows-1, image_data, row,
-		      1, num_cols);
-  }
-}
-
-
-/*
- * Process some data in the simple no-context case.
- *
- * Preprocessor output data is counted in "row groups".  A row group
- * is defined to be v_samp_factor sample rows of each component.
- * Downsampling will produce this much data from each max_v_samp_factor
- * input rows.
- */
-
-METHODDEF(void)
-pre_process_data (j_compress_ptr cinfo,
-		  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-		  JDIMENSION in_rows_avail,
-		  JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,
-		  JDIMENSION out_row_groups_avail)
-{
-  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
-  int numrows, ci;
-  JDIMENSION inrows;
-  jpeg_component_info * compptr;
-
-  while (*in_row_ctr < in_rows_avail &&
-	 *out_row_group_ctr < out_row_groups_avail) {
-    /* Do color conversion to fill the conversion buffer. */
-    inrows = in_rows_avail - *in_row_ctr;
-    numrows = cinfo->max_v_samp_factor - prep->next_buf_row;
-    numrows = (int) MIN((JDIMENSION) numrows, inrows);
-    (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
-				       prep->color_buf,
-				       (JDIMENSION) prep->next_buf_row,
-				       numrows);
-    *in_row_ctr += numrows;
-    prep->next_buf_row += numrows;
-    prep->rows_to_go -= numrows;
-    /* If at bottom of image, pad to fill the conversion buffer. */
-    if (prep->rows_to_go == 0 &&
-	prep->next_buf_row < cinfo->max_v_samp_factor) {
-      for (ci = 0; ci < cinfo->num_components; ci++) {
-	expand_bottom_edge(prep->color_buf[ci], cinfo->image_width,
-			   prep->next_buf_row, cinfo->max_v_samp_factor);
-      }
-      prep->next_buf_row = cinfo->max_v_samp_factor;
-    }
-    /* If we've filled the conversion buffer, empty it. */
-    if (prep->next_buf_row == cinfo->max_v_samp_factor) {
-      (*cinfo->downsample->downsample) (cinfo,
-					prep->color_buf, (JDIMENSION) 0,
-					output_buf, *out_row_group_ctr);
-      prep->next_buf_row = 0;
-      (*out_row_group_ctr)++;
-    }
-    /* If at bottom of image, pad the output to a full iMCU height.
-     * Note we assume the caller is providing a one-iMCU-height output buffer!
-     */
-    if (prep->rows_to_go == 0 &&
-	*out_row_group_ctr < out_row_groups_avail) {
-      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	   ci++, compptr++) {
-	expand_bottom_edge(output_buf[ci],
-			   compptr->width_in_blocks * DCTSIZE,
-			   (int) (*out_row_group_ctr * compptr->v_samp_factor),
-			   (int) (out_row_groups_avail * compptr->v_samp_factor));
-      }
-      *out_row_group_ctr = out_row_groups_avail;
-      break;			/* can exit outer loop without test */
-    }
-  }
-}
-
-
-#ifdef CONTEXT_ROWS_SUPPORTED
-
-/*
- * Process some data in the context case.
- */
-
-METHODDEF(void)
-pre_process_context (j_compress_ptr cinfo,
-		     JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-		     JDIMENSION in_rows_avail,
-		     JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,
-		     JDIMENSION out_row_groups_avail)
-{
-  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
-  int numrows, ci;
-  int buf_height = cinfo->max_v_samp_factor * 3;
-  JDIMENSION inrows;
-
-  while (*out_row_group_ctr < out_row_groups_avail) {
-    if (*in_row_ctr < in_rows_avail) {
-      /* Do color conversion to fill the conversion buffer. */
-      inrows = in_rows_avail - *in_row_ctr;
-      numrows = prep->next_buf_stop - prep->next_buf_row;
-      numrows = (int) MIN((JDIMENSION) numrows, inrows);
-      (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,
-					 prep->color_buf,
-					 (JDIMENSION) prep->next_buf_row,
-					 numrows);
-      /* Pad at top of image, if first time through */
-      if (prep->rows_to_go == cinfo->image_height) {
-	for (ci = 0; ci < cinfo->num_components; ci++) {
-	  int row;
-	  for (row = 1; row <= cinfo->max_v_samp_factor; row++) {
-	    jcopy_sample_rows(prep->color_buf[ci], 0,
-			      prep->color_buf[ci], -row,
-			      1, cinfo->image_width);
-	  }
-	}
-      }
-      *in_row_ctr += numrows;
-      prep->next_buf_row += numrows;
-      prep->rows_to_go -= numrows;
-    } else {
-      /* Return for more data, unless we are at the bottom of the image. */
-      if (prep->rows_to_go != 0)
-	break;
-      /* When at bottom of image, pad to fill the conversion buffer. */
-      if (prep->next_buf_row < prep->next_buf_stop) {
-	for (ci = 0; ci < cinfo->num_components; ci++) {
-	  expand_bottom_edge(prep->color_buf[ci], cinfo->image_width,
-			     prep->next_buf_row, prep->next_buf_stop);
-	}
-	prep->next_buf_row = prep->next_buf_stop;
-      }
-    }
-    /* If we've gotten enough data, downsample a row group. */
-    if (prep->next_buf_row == prep->next_buf_stop) {
-      (*cinfo->downsample->downsample) (cinfo,
-					prep->color_buf,
-					(JDIMENSION) prep->this_row_group,
-					output_buf, *out_row_group_ctr);
-      (*out_row_group_ctr)++;
-      /* Advance pointers with wraparound as necessary. */
-      prep->this_row_group += cinfo->max_v_samp_factor;
-      if (prep->this_row_group >= buf_height)
-	prep->this_row_group = 0;
-      if (prep->next_buf_row >= buf_height)
-	prep->next_buf_row = 0;
-      prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor;
-    }
-  }
-}
-
-
-/*
- * Create the wrapped-around downsampling input buffer needed for context mode.
- */
-
-LOCAL(void)
-create_context_buffer (j_compress_ptr cinfo)
-{
-  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
-  int rgroup_height = cinfo->max_v_samp_factor;
-  int ci, i;
-  jpeg_component_info * compptr;
-  JSAMPARRAY true_buffer, fake_buffer;
-
-  /* Grab enough space for fake row pointers for all the components;
-   * we need five row groups' worth of pointers for each component.
-   */
-  fake_buffer = (JSAMPARRAY)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(cinfo->num_components * 5 * rgroup_height) *
-				SIZEOF(JSAMPROW));
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Allocate the actual buffer space (3 row groups) for this component.
-     * We make the buffer wide enough to allow the downsampler to edge-expand
-     * horizontally within the buffer, if it so chooses.
-     */
-    true_buffer = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
-		      cinfo->max_h_samp_factor) / compptr->h_samp_factor),
-       (JDIMENSION) (3 * rgroup_height));
-    /* Copy true buffer row pointers into the middle of the fake row array */
-    MEMCOPY(fake_buffer + rgroup_height, true_buffer,
-	    3 * rgroup_height * SIZEOF(JSAMPROW));
-    /* Fill in the above and below wraparound pointers */
-    for (i = 0; i < rgroup_height; i++) {
-      fake_buffer[i] = true_buffer[2 * rgroup_height + i];
-      fake_buffer[4 * rgroup_height + i] = true_buffer[i];
-    }
-    prep->color_buf[ci] = fake_buffer + rgroup_height;
-    fake_buffer += 5 * rgroup_height; /* point to space for next component */
-  }
-}
-
-#endif /* CONTEXT_ROWS_SUPPORTED */
-
-
-/*
- * Initialize preprocessing controller.
- */
-
-GLOBAL(void)
-jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
-{
-  my_prep_ptr prep;
-  int ci;
-  jpeg_component_info * compptr;
-
-  if (need_full_buffer)		/* safety check */
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-
-  prep = (my_prep_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_prep_controller));
-  cinfo->prep = (struct jpeg_c_prep_controller *) prep;
-  prep->pub.start_pass = start_pass_prep;
-
-  /* Allocate the color conversion buffer.
-   * We make the buffer wide enough to allow the downsampler to edge-expand
-   * horizontally within the buffer, if it so chooses.
-   */
-  if (cinfo->downsample->need_context_rows) {
-    /* Set up to provide context rows */
-#ifdef CONTEXT_ROWS_SUPPORTED
-    prep->pub.pre_process_data = pre_process_context;
-    create_context_buffer(cinfo);
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-  } else {
-    /* No context, just make it tall enough for one row group */
-    prep->pub.pre_process_data = pre_process_data;
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      prep->color_buf[ci] = (*cinfo->mem->alloc_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE,
-	 (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
-			cinfo->max_h_samp_factor) / compptr->h_samp_factor),
-	 (JDIMENSION) cinfo->max_v_samp_factor);
-    }
-  }
-}
diff --git a/tkimg1.3/libjpeg/jcsample.c b/tkimg1.3/libjpeg/jcsample.c
deleted file mode 100644
index 212ec87..0000000
--- a/tkimg1.3/libjpeg/jcsample.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * jcsample.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains downsampling routines.
- *
- * Downsampling input data is counted in "row groups".  A row group
- * is defined to be max_v_samp_factor pixel rows of each component,
- * from which the downsampler produces v_samp_factor sample rows.
- * A single row group is processed in each call to the downsampler module.
- *
- * The downsampler is responsible for edge-expansion of its output data
- * to fill an integral number of DCT blocks horizontally.  The source buffer
- * may be modified if it is helpful for this purpose (the source buffer is
- * allocated wide enough to correspond to the desired output width).
- * The caller (the prep controller) is responsible for vertical padding.
- *
- * The downsampler may request "context rows" by setting need_context_rows
- * during startup.  In this case, the input arrays will contain at least
- * one row group's worth of pixels above and below the passed-in data;
- * the caller will create dummy rows at image top and bottom by replicating
- * the first or last real pixel row.
- *
- * An excellent reference for image resampling is
- *   Digital Image Warping, George Wolberg, 1990.
- *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.
- *
- * The downsampling algorithm used here is a simple average of the source
- * pixels covered by the output pixel.  The hi-falutin sampling literature
- * refers to this as a "box filter".  In general the characteristics of a box
- * filter are not very good, but for the specific cases we normally use (1:1
- * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not
- * nearly so bad.  If you intend to use other sampling ratios, you'd be well
- * advised to improve this code.
- *
- * A simple input-smoothing capability is provided.  This is mainly intended
- * for cleaning up color-dithered GIF input files (if you find it inadequate,
- * we suggest using an external filtering program such as pnmconvol).  When
- * enabled, each input pixel P is replaced by a weighted sum of itself and its
- * eight neighbors.  P's weight is 1-8*SF and each neighbor's weight is SF,
- * where SF = (smoothing_factor / 1024).
- * Currently, smoothing is only supported for 2h2v sampling factors.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Pointer to routine to downsample a single component */
-typedef JMETHOD(void, downsample1_ptr,
-		(j_compress_ptr cinfo, jpeg_component_info * compptr,
-		 JSAMPARRAY input_data, JSAMPARRAY output_data));
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_downsampler pub;	/* public fields */
-
-  /* Downsampling method pointers, one per component */
-  downsample1_ptr methods[MAX_COMPONENTS];
-} my_downsampler;
-
-typedef my_downsampler * my_downsample_ptr;
-
-
-/*
- * Initialize for a downsampling pass.
- */
-
-METHODDEF(void)
-start_pass_downsample (j_compress_ptr cinfo)
-{
-  /* no work for now */
-}
-
-
-/*
- * Expand a component horizontally from width input_cols to width output_cols,
- * by duplicating the rightmost samples.
- */
-
-LOCAL(void)
-expand_right_edge (JSAMPARRAY image_data, int num_rows,
-		   JDIMENSION input_cols, JDIMENSION output_cols)
-{
-  register JSAMPROW ptr;
-  register JSAMPLE pixval;
-  register int count;
-  int row;
-  int numcols = (int) (output_cols - input_cols);
-
-  if (numcols > 0) {
-    for (row = 0; row < num_rows; row++) {
-      ptr = image_data[row] + input_cols;
-      pixval = ptr[-1];		/* don't need GETJSAMPLE() here */
-      for (count = numcols; count > 0; count--)
-	*ptr++ = pixval;
-    }
-  }
-}
-
-
-/*
- * Do downsampling for a whole row group (all components).
- *
- * In this version we simply downsample each component independently.
- */
-
-METHODDEF(void)
-sep_downsample (j_compress_ptr cinfo,
-		JSAMPIMAGE input_buf, JDIMENSION in_row_index,
-		JSAMPIMAGE output_buf, JDIMENSION out_row_group_index)
-{
-  my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample;
-  int ci;
-  jpeg_component_info * compptr;
-  JSAMPARRAY in_ptr, out_ptr;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    in_ptr = input_buf[ci] + in_row_index;
-    out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor);
-    (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr);
-  }
-}
-
-
-/*
- * Downsample pixel values of a single component.
- * One row group is processed per call.
- * This version handles arbitrary integral sampling ratios, without smoothing.
- * Note that this version is not actually used for customary sampling ratios.
- */
-
-METHODDEF(void)
-int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
-		JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;
-  JDIMENSION outcol, outcol_h;	/* outcol_h == outcol*h_expand */
-  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
-  JSAMPROW inptr, outptr;
-  INT32 outvalue;
-
-  h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;
-  v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;
-  numpix = h_expand * v_expand;
-  numpix2 = numpix/2;
-
-  /* Expand input data enough to let all the output samples be generated
-   * by the standard loop.  Special-casing padded output would be more
-   * efficient.
-   */
-  expand_right_edge(input_data, cinfo->max_v_samp_factor,
-		    cinfo->image_width, output_cols * h_expand);
-
-  inrow = 0;
-  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
-    outptr = output_data[outrow];
-    for (outcol = 0, outcol_h = 0; outcol < output_cols;
-	 outcol++, outcol_h += h_expand) {
-      outvalue = 0;
-      for (v = 0; v < v_expand; v++) {
-	inptr = input_data[inrow+v] + outcol_h;
-	for (h = 0; h < h_expand; h++) {
-	  outvalue += (INT32) GETJSAMPLE(*inptr++);
-	}
-      }
-      *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);
-    }
-    inrow += v_expand;
-  }
-}
-
-
-/*
- * Downsample pixel values of a single component.
- * This version handles the special case of a full-size component,
- * without smoothing.
- */
-
-METHODDEF(void)
-fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
-		     JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  /* Copy the data */
-  jcopy_sample_rows(input_data, 0, output_data, 0,
-		    cinfo->max_v_samp_factor, cinfo->image_width);
-  /* Edge-expand */
-  expand_right_edge(output_data, cinfo->max_v_samp_factor,
-		    cinfo->image_width, compptr->width_in_blocks * DCTSIZE);
-}
-
-
-/*
- * Downsample pixel values of a single component.
- * This version handles the common case of 2:1 horizontal and 1:1 vertical,
- * without smoothing.
- *
- * A note about the "bias" calculations: when rounding fractional values to
- * integer, we do not want to always round 0.5 up to the next integer.
- * If we did that, we'd introduce a noticeable bias towards larger values.
- * Instead, this code is arranged so that 0.5 will be rounded up or down at
- * alternate pixel locations (a simple ordered dither pattern).
- */
-
-METHODDEF(void)
-h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
-		 JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  int outrow;
-  JDIMENSION outcol;
-  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
-  register JSAMPROW inptr, outptr;
-  register int bias;
-
-  /* Expand input data enough to let all the output samples be generated
-   * by the standard loop.  Special-casing padded output would be more
-   * efficient.
-   */
-  expand_right_edge(input_data, cinfo->max_v_samp_factor,
-		    cinfo->image_width, output_cols * 2);
-
-  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
-    outptr = output_data[outrow];
-    inptr = input_data[outrow];
-    bias = 0;			/* bias = 0,1,0,1,... for successive samples */
-    for (outcol = 0; outcol < output_cols; outcol++) {
-      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1])
-			      + bias) >> 1);
-      bias ^= 1;		/* 0=>1, 1=>0 */
-      inptr += 2;
-    }
-  }
-}
-
-
-/*
- * Downsample pixel values of a single component.
- * This version handles the standard case of 2:1 horizontal and 2:1 vertical,
- * without smoothing.
- */
-
-METHODDEF(void)
-h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
-		 JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  int inrow, outrow;
-  JDIMENSION outcol;
-  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
-  register JSAMPROW inptr0, inptr1, outptr;
-  register int bias;
-
-  /* Expand input data enough to let all the output samples be generated
-   * by the standard loop.  Special-casing padded output would be more
-   * efficient.
-   */
-  expand_right_edge(input_data, cinfo->max_v_samp_factor,
-		    cinfo->image_width, output_cols * 2);
-
-  inrow = 0;
-  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
-    outptr = output_data[outrow];
-    inptr0 = input_data[inrow];
-    inptr1 = input_data[inrow+1];
-    bias = 1;			/* bias = 1,2,1,2,... for successive samples */
-    for (outcol = 0; outcol < output_cols; outcol++) {
-      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
-			      GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1])
-			      + bias) >> 2);
-      bias ^= 3;		/* 1=>2, 2=>1 */
-      inptr0 += 2; inptr1 += 2;
-    }
-    inrow += 2;
-  }
-}
-
-
-#ifdef INPUT_SMOOTHING_SUPPORTED
-
-/*
- * Downsample pixel values of a single component.
- * This version handles the standard case of 2:1 horizontal and 2:1 vertical,
- * with smoothing.  One row of context is required.
- */
-
-METHODDEF(void)
-h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
-			JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  int inrow, outrow;
-  JDIMENSION colctr;
-  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
-  register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr;
-  INT32 membersum, neighsum, memberscale, neighscale;
-
-  /* Expand input data enough to let all the output samples be generated
-   * by the standard loop.  Special-casing padded output would be more
-   * efficient.
-   */
-  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,
-		    cinfo->image_width, output_cols * 2);
-
-  /* We don't bother to form the individual "smoothed" input pixel values;
-   * we can directly compute the output which is the average of the four
-   * smoothed values.  Each of the four member pixels contributes a fraction
-   * (1-8*SF) to its own smoothed image and a fraction SF to each of the three
-   * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final
-   * output.  The four corner-adjacent neighbor pixels contribute a fraction
-   * SF to just one smoothed pixel, or SF/4 to the final output; while the
-   * eight edge-adjacent neighbors contribute SF to each of two smoothed
-   * pixels, or SF/2 overall.  In order to use integer arithmetic, these
-   * factors are scaled by 2^16 = 65536.
-   * Also recall that SF = smoothing_factor / 1024.
-   */
-
-  memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */
-  neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */
-
-  inrow = 0;
-  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
-    outptr = output_data[outrow];
-    inptr0 = input_data[inrow];
-    inptr1 = input_data[inrow+1];
-    above_ptr = input_data[inrow-1];
-    below_ptr = input_data[inrow+2];
-
-    /* Special case for first column: pretend column -1 is same as column 0 */
-    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
-		GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
-    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
-	       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
-	       GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) +
-	       GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]);
-    neighsum += neighsum;
-    neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) +
-		GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]);
-    membersum = membersum * memberscale + neighsum * neighscale;
-    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
-    inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;
-
-    for (colctr = output_cols - 2; colctr > 0; colctr--) {
-      /* sum of pixels directly mapped to this output element */
-      membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
-		  GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
-      /* sum of edge-neighbor pixels */
-      neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
-		 GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
-		 GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) +
-		 GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]);
-      /* The edge-neighbors count twice as much as corner-neighbors */
-      neighsum += neighsum;
-      /* Add in the corner-neighbors */
-      neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) +
-		  GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]);
-      /* form final output scaled up by 2^16 */
-      membersum = membersum * memberscale + neighsum * neighscale;
-      /* round, descale and output it */
-      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
-      inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;
-    }
-
-    /* Special case for last column */
-    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +
-		GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);
-    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +
-	       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +
-	       GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) +
-	       GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]);
-    neighsum += neighsum;
-    neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) +
-		GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]);
-    membersum = membersum * memberscale + neighsum * neighscale;
-    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);
-
-    inrow += 2;
-  }
-}
-
-
-/*
- * Downsample pixel values of a single component.
- * This version handles the special case of a full-size component,
- * with smoothing.  One row of context is required.
- */
-
-METHODDEF(void)
-fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
-			    JSAMPARRAY input_data, JSAMPARRAY output_data)
-{
-  int outrow;
-  JDIMENSION colctr;
-  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
-  register JSAMPROW inptr, above_ptr, below_ptr, outptr;
-  INT32 membersum, neighsum, memberscale, neighscale;
-  int colsum, lastcolsum, nextcolsum;
-
-  /* Expand input data enough to let all the output samples be generated
-   * by the standard loop.  Special-casing padded output would be more
-   * efficient.
-   */
-  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,
-		    cinfo->image_width, output_cols);
-
-  /* Each of the eight neighbor pixels contributes a fraction SF to the
-   * smoothed pixel, while the main pixel contributes (1-8*SF).  In order
-   * to use integer arithmetic, these factors are multiplied by 2^16 = 65536.
-   * Also recall that SF = smoothing_factor / 1024.
-   */
-
-  memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */
-  neighscale = cinfo->smoothing_factor * 64; /* scaled SF */
-
-  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
-    outptr = output_data[outrow];
-    inptr = input_data[outrow];
-    above_ptr = input_data[outrow-1];
-    below_ptr = input_data[outrow+1];
-
-    /* Special case for first column */
-    colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) +
-	     GETJSAMPLE(*inptr);
-    membersum = GETJSAMPLE(*inptr++);
-    nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +
-		 GETJSAMPLE(*inptr);
-    neighsum = colsum + (colsum - membersum) + nextcolsum;
-    membersum = membersum * memberscale + neighsum * neighscale;
-    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
-    lastcolsum = colsum; colsum = nextcolsum;
-
-    for (colctr = output_cols - 2; colctr > 0; colctr--) {
-      membersum = GETJSAMPLE(*inptr++);
-      above_ptr++; below_ptr++;
-      nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +
-		   GETJSAMPLE(*inptr);
-      neighsum = lastcolsum + (colsum - membersum) + nextcolsum;
-      membersum = membersum * memberscale + neighsum * neighscale;
-      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);
-      lastcolsum = colsum; colsum = nextcolsum;
-    }
-
-    /* Special case for last column */
-    membersum = GETJSAMPLE(*inptr);
-    neighsum = lastcolsum + (colsum - membersum) + colsum;
-    membersum = membersum * memberscale + neighsum * neighscale;
-    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);
-
-  }
-}
-
-#endif /* INPUT_SMOOTHING_SUPPORTED */
-
-
-/*
- * Module initialization routine for downsampling.
- * Note that we must select a routine for each component.
- */
-
-GLOBAL(void)
-jinit_downsampler (j_compress_ptr cinfo)
-{
-  my_downsample_ptr downsample;
-  int ci;
-  jpeg_component_info * compptr;
-  boolean smoothok = TRUE;
-
-  downsample = (my_downsample_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_downsampler));
-  cinfo->downsample = (struct jpeg_downsampler *) downsample;
-  downsample->pub.start_pass = start_pass_downsample;
-  downsample->pub.downsample = sep_downsample;
-  downsample->pub.need_context_rows = FALSE;
-
-  if (cinfo->CCIR601_sampling)
-    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
-
-  /* Verify we can handle the sampling factors, and set up method pointers */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    if (compptr->h_samp_factor == cinfo->max_h_samp_factor &&
-	compptr->v_samp_factor == cinfo->max_v_samp_factor) {
-#ifdef INPUT_SMOOTHING_SUPPORTED
-      if (cinfo->smoothing_factor) {
-	downsample->methods[ci] = fullsize_smooth_downsample;
-	downsample->pub.need_context_rows = TRUE;
-      } else
-#endif
-	downsample->methods[ci] = fullsize_downsample;
-    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
-	       compptr->v_samp_factor == cinfo->max_v_samp_factor) {
-      smoothok = FALSE;
-      downsample->methods[ci] = h2v1_downsample;
-    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
-	       compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) {
-#ifdef INPUT_SMOOTHING_SUPPORTED
-      if (cinfo->smoothing_factor) {
-	downsample->methods[ci] = h2v2_smooth_downsample;
-	downsample->pub.need_context_rows = TRUE;
-      } else
-#endif
-	downsample->methods[ci] = h2v2_downsample;
-    } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&
-	       (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) {
-      smoothok = FALSE;
-      downsample->methods[ci] = int_downsample;
-    } else
-      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
-  }
-
-#ifdef INPUT_SMOOTHING_SUPPORTED
-  if (cinfo->smoothing_factor && !smoothok)
-    TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL);
-#endif
-}
diff --git a/tkimg1.3/libjpeg/jctrans.c b/tkimg1.3/libjpeg/jctrans.c
deleted file mode 100644
index 0e6d707..0000000
--- a/tkimg1.3/libjpeg/jctrans.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * jctrans.c
- *
- * Copyright (C) 1995-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains library routines for transcoding compression,
- * that is, writing raw DCT coefficient arrays to an output JPEG file.
- * The routines in jcapimin.c will also be needed by a transcoder.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Forward declarations */
-LOCAL(void) transencode_master_selection
-	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
-LOCAL(void) transencode_coef_controller
-	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
-
-
-/*
- * Compression initialization for writing raw-coefficient data.
- * Before calling this, all parameters and a data destination must be set up.
- * Call jpeg_finish_compress() to actually write the data.
- *
- * The number of passed virtual arrays must match cinfo->num_components.
- * Note that the virtual arrays need not be filled or even realized at
- * the time write_coefficients is called; indeed, if the virtual arrays
- * were requested from this compression object's memory manager, they
- * typically will be realized during this routine and filled afterwards.
- */
-
-GLOBAL(void)
-jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)
-{
-  if (cinfo->global_state != CSTATE_START)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  /* Mark all tables to be written */
-  jpeg_suppress_tables(cinfo, FALSE);
-  /* (Re)initialize error mgr and destination modules */
-  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
-  (*cinfo->dest->init_destination) (cinfo);
-  /* Perform master selection of active modules */
-  transencode_master_selection(cinfo, coef_arrays);
-  /* Wait for jpeg_finish_compress() call */
-  cinfo->next_scanline = 0;	/* so jpeg_write_marker works */
-  cinfo->global_state = CSTATE_WRCOEFS;
-}
-
-
-/*
- * Initialize the compression object with default parameters,
- * then copy from the source object all parameters needed for lossless
- * transcoding.  Parameters that can be varied without loss (such as
- * scan script and Huffman optimization) are left in their default states.
- */
-
-GLOBAL(void)
-jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
-			       j_compress_ptr dstinfo)
-{
-  JQUANT_TBL ** qtblptr;
-  jpeg_component_info *incomp, *outcomp;
-  JQUANT_TBL *c_quant, *slot_quant;
-  int tblno, ci, coefi;
-
-  /* Safety check to ensure start_compress not called yet. */
-  if (dstinfo->global_state != CSTATE_START)
-    ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state);
-  /* Copy fundamental image dimensions */
-  dstinfo->image_width = srcinfo->image_width;
-  dstinfo->image_height = srcinfo->image_height;
-  dstinfo->input_components = srcinfo->num_components;
-  dstinfo->in_color_space = srcinfo->jpeg_color_space;
-  /* Initialize all parameters to default values */
-  jpeg_set_defaults(dstinfo);
-  /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB.
-   * Fix it to get the right header markers for the image colorspace.
-   */
-  jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space);
-  dstinfo->data_precision = srcinfo->data_precision;
-  dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling;
-  /* Copy the source's quantization tables. */
-  for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) {
-    if (srcinfo->quant_tbl_ptrs[tblno] != NULL) {
-      qtblptr = & dstinfo->quant_tbl_ptrs[tblno];
-      if (*qtblptr == NULL)
-	*qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo);
-      MEMCOPY((*qtblptr)->quantval,
-	      srcinfo->quant_tbl_ptrs[tblno]->quantval,
-	      SIZEOF((*qtblptr)->quantval));
-      (*qtblptr)->sent_table = FALSE;
-    }
-  }
-  /* Copy the source's per-component info.
-   * Note we assume jpeg_set_defaults has allocated the dest comp_info array.
-   */
-  dstinfo->num_components = srcinfo->num_components;
-  if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS)
-    ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components,
-	     MAX_COMPONENTS);
-  for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info;
-       ci < dstinfo->num_components; ci++, incomp++, outcomp++) {
-    outcomp->component_id = incomp->component_id;
-    outcomp->h_samp_factor = incomp->h_samp_factor;
-    outcomp->v_samp_factor = incomp->v_samp_factor;
-    outcomp->quant_tbl_no = incomp->quant_tbl_no;
-    /* Make sure saved quantization table for component matches the qtable
-     * slot.  If not, the input file re-used this qtable slot.
-     * IJG encoder currently cannot duplicate this.
-     */
-    tblno = outcomp->quant_tbl_no;
-    if (tblno < 0 || tblno >= NUM_QUANT_TBLS ||
-	srcinfo->quant_tbl_ptrs[tblno] == NULL)
-      ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno);
-    slot_quant = srcinfo->quant_tbl_ptrs[tblno];
-    c_quant = incomp->quant_table;
-    if (c_quant != NULL) {
-      for (coefi = 0; coefi < DCTSIZE2; coefi++) {
-	if (c_quant->quantval[coefi] != slot_quant->quantval[coefi])
-	  ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno);
-      }
-    }
-    /* Note: we do not copy the source's Huffman table assignments;
-     * instead we rely on jpeg_set_colorspace to have made a suitable choice.
-     */
-  }
-  /* Also copy JFIF version and resolution information, if available.
-   * Strictly speaking this isn't "critical" info, but it's nearly
-   * always appropriate to copy it if available.  In particular,
-   * if the application chooses to copy JFIF 1.02 extension markers from
-   * the source file, we need to copy the version to make sure we don't
-   * emit a file that has 1.02 extensions but a claimed version of 1.01.
-   * We will *not*, however, copy version info from mislabeled "2.01" files.
-   */
-  if (srcinfo->saw_JFIF_marker) {
-    if (srcinfo->JFIF_major_version == 1) {
-      dstinfo->JFIF_major_version = srcinfo->JFIF_major_version;
-      dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version;
-    }
-    dstinfo->density_unit = srcinfo->density_unit;
-    dstinfo->X_density = srcinfo->X_density;
-    dstinfo->Y_density = srcinfo->Y_density;
-  }
-}
-
-
-/*
- * Master selection of compression modules for transcoding.
- * This substitutes for jcinit.c's initialization of the full compressor.
- */
-
-LOCAL(void)
-transencode_master_selection (j_compress_ptr cinfo,
-			      jvirt_barray_ptr * coef_arrays)
-{
-  /* Although we don't actually use input_components for transcoding,
-   * jcmaster.c's initial_setup will complain if input_components is 0.
-   */
-  cinfo->input_components = 1;
-  /* Initialize master control (includes parameter checking/processing) */
-  jinit_c_master_control(cinfo, TRUE /* transcode only */);
-
-  /* Entropy encoding: either Huffman or arithmetic coding. */
-  if (cinfo->arith_code) {
-    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
-  } else {
-    if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
-      jinit_phuff_encoder(cinfo);
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    } else
-      jinit_huff_encoder(cinfo);
-  }
-
-  /* We need a special coefficient buffer controller. */
-  transencode_coef_controller(cinfo, coef_arrays);
-
-  jinit_marker_writer(cinfo);
-
-  /* We can now tell the memory manager to allocate virtual arrays. */
-  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
-
-  /* Write the datastream header (SOI, JFIF) immediately.
-   * Frame and scan headers are postponed till later.
-   * This lets application insert special markers after the SOI.
-   */
-  (*cinfo->marker->write_file_header) (cinfo);
-}
-
-
-/*
- * The rest of this file is a special implementation of the coefficient
- * buffer controller.  This is similar to jccoefct.c, but it handles only
- * output from presupplied virtual arrays.  Furthermore, we generate any
- * dummy padding blocks on-the-fly rather than expecting them to be present
- * in the arrays.
- */
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_c_coef_controller pub; /* public fields */
-
-  JDIMENSION iMCU_row_num;	/* iMCU row # within image */
-  JDIMENSION mcu_ctr;		/* counts MCUs processed in current row */
-  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
-  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
-
-  /* Virtual block array for each component. */
-  jvirt_barray_ptr * whole_image;
-
-  /* Workspace for constructing dummy blocks at right/bottom edges. */
-  JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU];
-} my_coef_controller;
-
-typedef my_coef_controller * my_coef_ptr;
-
-
-LOCAL(void)
-start_iMCU_row (j_compress_ptr cinfo)
-/* Reset within-iMCU-row counters for a new row */
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  /* In an interleaved scan, an MCU row is the same as an iMCU row.
-   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
-   * But at the bottom of the image, process only what's left.
-   */
-  if (cinfo->comps_in_scan > 1) {
-    coef->MCU_rows_per_iMCU_row = 1;
-  } else {
-    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
-    else
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
-  }
-
-  coef->mcu_ctr = 0;
-  coef->MCU_vert_offset = 0;
-}
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  if (pass_mode != JBUF_CRANK_DEST)
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-
-  coef->iMCU_row_num = 0;
-  start_iMCU_row(cinfo);
-}
-
-
-/*
- * Process some data.
- * We process the equivalent of one fully interleaved MCU row ("iMCU" row)
- * per call, ie, v_samp_factor block rows for each component in the scan.
- * The data is obtained from the virtual arrays and fed to the entropy coder.
- * Returns TRUE if the iMCU row is completed, FALSE if suspended.
- *
- * NB: input_buf is ignored; it is likely to be a NULL pointer.
- */
-
-METHODDEF(boolean)
-compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION MCU_col_num;	/* index of current MCU within row */
-  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  int blkn, ci, xindex, yindex, yoffset, blockcnt;
-  JDIMENSION start_col;
-  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
-  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
-  JBLOCKROW buffer_ptr;
-  jpeg_component_info *compptr;
-
-  /* Align the virtual buffers for the components used in this scan. */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    buffer[ci] = (*cinfo->mem->access_virt_barray)
-      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
-       coef->iMCU_row_num * compptr->v_samp_factor,
-       (JDIMENSION) compptr->v_samp_factor, FALSE);
-  }
-
-  /* Loop to process one whole iMCU row */
-  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
-       yoffset++) {
-    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
-	 MCU_col_num++) {
-      /* Construct list of pointers to DCT blocks belonging to this MCU */
-      blkn = 0;			/* index of current DCT block within MCU */
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-	compptr = cinfo->cur_comp_info[ci];
-	start_col = MCU_col_num * compptr->MCU_width;
-	blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
-						: compptr->last_col_width;
-	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
-	  if (coef->iMCU_row_num < last_iMCU_row ||
-	      yindex+yoffset < compptr->last_row_height) {
-	    /* Fill in pointers to real blocks in this row */
-	    buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
-	    for (xindex = 0; xindex < blockcnt; xindex++)
-	      MCU_buffer[blkn++] = buffer_ptr++;
-	  } else {
-	    /* At bottom of image, need a whole row of dummy blocks */
-	    xindex = 0;
-	  }
-	  /* Fill in any dummy blocks needed in this row.
-	   * Dummy blocks are filled in the same way as in jccoefct.c:
-	   * all zeroes in the AC entries, DC entries equal to previous
-	   * block's DC value.  The init routine has already zeroed the
-	   * AC entries, so we need only set the DC entries correctly.
-	   */
-	  for (; xindex < compptr->MCU_width; xindex++) {
-	    MCU_buffer[blkn] = coef->dummy_buffer[blkn];
-	    MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0];
-	    blkn++;
-	  }
-	}
-      }
-      /* Try to write the MCU. */
-      if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) {
-	/* Suspension forced; update state counters and exit */
-	coef->MCU_vert_offset = yoffset;
-	coef->mcu_ctr = MCU_col_num;
-	return FALSE;
-      }
-    }
-    /* Completed an MCU row, but perhaps not an iMCU row */
-    coef->mcu_ctr = 0;
-  }
-  /* Completed the iMCU row, advance counters for next one */
-  coef->iMCU_row_num++;
-  start_iMCU_row(cinfo);
-  return TRUE;
-}
-
-
-/*
- * Initialize coefficient buffer controller.
- *
- * Each passed coefficient array must be the right size for that
- * coefficient: width_in_blocks wide and height_in_blocks high,
- * with unitheight at least v_samp_factor.
- */
-
-LOCAL(void)
-transencode_coef_controller (j_compress_ptr cinfo,
-			     jvirt_barray_ptr * coef_arrays)
-{
-  my_coef_ptr coef;
-  JBLOCKROW buffer;
-  int i;
-
-  coef = (my_coef_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_coef_controller));
-  cinfo->coef = (struct jpeg_c_coef_controller *) coef;
-  coef->pub.start_pass = start_pass_coef;
-  coef->pub.compress_data = compress_output;
-
-  /* Save pointer to virtual arrays */
-  coef->whole_image = coef_arrays;
-
-  /* Allocate and pre-zero space for dummy DCT blocks. */
-  buffer = (JBLOCKROW)
-    (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
-  jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
-  for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
-    coef->dummy_buffer[i] = buffer + i;
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdapimin.c b/tkimg1.3/libjpeg/jdapimin.c
deleted file mode 100644
index cadb59f..0000000
--- a/tkimg1.3/libjpeg/jdapimin.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * jdapimin.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface code for the decompression half
- * of the JPEG library.  These are the "minimum" API routines that may be
- * needed in either the normal full-decompression case or the
- * transcoding-only case.
- *
- * Most of the routines intended to be called directly by an application
- * are in this file or in jdapistd.c.  But also see jcomapi.c for routines
- * shared by compression and decompression, and jdtrans.c for the transcoding
- * case.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * Initialization of a JPEG decompression object.
- * The error manager must already be set up (in case memory manager fails).
- */
-
-GLOBAL(void)
-jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
-{
-  int i;
-
-  /* Guard against version mismatches between library and caller. */
-  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
-  if (version != JPEG_LIB_VERSION)
-    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
-  if (structsize != SIZEOF(struct jpeg_decompress_struct))
-    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
-	     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);
-
-  /* For debugging purposes, we zero the whole master structure.
-   * But the application has already set the err pointer, and may have set
-   * client_data, so we have to save and restore those fields.
-   * Note: if application hasn't set client_data, tools like Purify may
-   * complain here.
-   */
-  {
-    struct jpeg_error_mgr * err = cinfo->err;
-    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
-    MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct));
-    cinfo->err = err;
-    cinfo->client_data = client_data;
-  }
-  cinfo->is_decompressor = TRUE;
-
-  /* Initialize a memory manager instance for this object */
-  jinit_memory_mgr((j_common_ptr) cinfo);
-
-  /* Zero out pointers to permanent structures. */
-  cinfo->progress = NULL;
-  cinfo->src = NULL;
-
-  for (i = 0; i < NUM_QUANT_TBLS; i++)
-    cinfo->quant_tbl_ptrs[i] = NULL;
-
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    cinfo->dc_huff_tbl_ptrs[i] = NULL;
-    cinfo->ac_huff_tbl_ptrs[i] = NULL;
-  }
-
-  /* Initialize marker processor so application can override methods
-   * for COM, APPn markers before calling jpeg_read_header.
-   */
-  cinfo->marker_list = NULL;
-  jinit_marker_reader(cinfo);
-
-  /* And initialize the overall input controller. */
-  jinit_input_controller(cinfo);
-
-  /* OK, I'm ready */
-  cinfo->global_state = DSTATE_START;
-}
-
-
-/*
- * Destruction of a JPEG decompression object
- */
-
-GLOBAL(void)
-jpeg_destroy_decompress (j_decompress_ptr cinfo)
-{
-  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
-}
-
-
-/*
- * Abort processing of a JPEG decompression operation,
- * but don't destroy the object itself.
- */
-
-GLOBAL(void)
-jpeg_abort_decompress (j_decompress_ptr cinfo)
-{
-  jpeg_abort((j_common_ptr) cinfo); /* use common routine */
-}
-
-
-/*
- * Set default decompression parameters.
- */
-
-LOCAL(void)
-default_decompress_parms (j_decompress_ptr cinfo)
-{
-  /* Guess the input colorspace, and set output colorspace accordingly. */
-  /* (Wish JPEG committee had provided a real way to specify this...) */
-  /* Note application may override our guesses. */
-  switch (cinfo->num_components) {
-  case 1:
-    cinfo->jpeg_color_space = JCS_GRAYSCALE;
-    cinfo->out_color_space = JCS_GRAYSCALE;
-    break;
-    
-  case 3:
-    if (cinfo->saw_JFIF_marker) {
-      cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */
-    } else if (cinfo->saw_Adobe_marker) {
-      switch (cinfo->Adobe_transform) {
-      case 0:
-	cinfo->jpeg_color_space = JCS_RGB;
-	break;
-      case 1:
-	cinfo->jpeg_color_space = JCS_YCbCr;
-	break;
-      default:
-	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
-	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
-	break;
-      }
-    } else {
-      /* Saw no special markers, try to guess from the component IDs */
-      int cid0 = cinfo->comp_info[0].component_id;
-      int cid1 = cinfo->comp_info[1].component_id;
-      int cid2 = cinfo->comp_info[2].component_id;
-
-      if (cid0 == 1 && cid1 == 2 && cid2 == 3)
-	cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */
-      else if (cid0 == 82 && cid1 == 71 && cid2 == 66)
-	cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */
-      else {
-	TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
-	cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
-      }
-    }
-    /* Always guess RGB is proper output colorspace. */
-    cinfo->out_color_space = JCS_RGB;
-    break;
-    
-  case 4:
-    if (cinfo->saw_Adobe_marker) {
-      switch (cinfo->Adobe_transform) {
-      case 0:
-	cinfo->jpeg_color_space = JCS_CMYK;
-	break;
-      case 2:
-	cinfo->jpeg_color_space = JCS_YCCK;
-	break;
-      default:
-	WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
-	cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */
-	break;
-      }
-    } else {
-      /* No special markers, assume straight CMYK. */
-      cinfo->jpeg_color_space = JCS_CMYK;
-    }
-    cinfo->out_color_space = JCS_CMYK;
-    break;
-    
-  default:
-    cinfo->jpeg_color_space = JCS_UNKNOWN;
-    cinfo->out_color_space = JCS_UNKNOWN;
-    break;
-  }
-
-  /* Set defaults for other decompression parameters. */
-  cinfo->scale_num = 1;		/* 1:1 scaling */
-  cinfo->scale_denom = 1;
-  cinfo->output_gamma = 1.0;
-  cinfo->buffered_image = FALSE;
-  cinfo->raw_data_out = FALSE;
-  cinfo->dct_method = JDCT_DEFAULT;
-  cinfo->do_fancy_upsampling = TRUE;
-  cinfo->do_block_smoothing = TRUE;
-  cinfo->quantize_colors = FALSE;
-  /* We set these in case application only sets quantize_colors. */
-  cinfo->dither_mode = JDITHER_FS;
-#ifdef QUANT_2PASS_SUPPORTED
-  cinfo->two_pass_quantize = TRUE;
-#else
-  cinfo->two_pass_quantize = FALSE;
-#endif
-  cinfo->desired_number_of_colors = 256;
-  cinfo->colormap = NULL;
-  /* Initialize for no mode change in buffered-image mode. */
-  cinfo->enable_1pass_quant = FALSE;
-  cinfo->enable_external_quant = FALSE;
-  cinfo->enable_2pass_quant = FALSE;
-}
-
-
-/*
- * Decompression startup: read start of JPEG datastream to see what's there.
- * Need only initialize JPEG object and supply a data source before calling.
- *
- * This routine will read as far as the first SOS marker (ie, actual start of
- * compressed data), and will save all tables and parameters in the JPEG
- * object.  It will also initialize the decompression parameters to default
- * values, and finally return JPEG_HEADER_OK.  On return, the application may
- * adjust the decompression parameters and then call jpeg_start_decompress.
- * (Or, if the application only wanted to determine the image parameters,
- * the data need not be decompressed.  In that case, call jpeg_abort or
- * jpeg_destroy to release any temporary space.)
- * If an abbreviated (tables only) datastream is presented, the routine will
- * return JPEG_HEADER_TABLES_ONLY upon reaching EOI.  The application may then
- * re-use the JPEG object to read the abbreviated image datastream(s).
- * It is unnecessary (but OK) to call jpeg_abort in this case.
- * The JPEG_SUSPENDED return code only occurs if the data source module
- * requests suspension of the decompressor.  In this case the application
- * should load more source data and then re-call jpeg_read_header to resume
- * processing.
- * If a non-suspending data source is used and require_image is TRUE, then the
- * return code need not be inspected since only JPEG_HEADER_OK is possible.
- *
- * This routine is now just a front end to jpeg_consume_input, with some
- * extra error checking.
- */
-
-GLOBAL(int)
-jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
-{
-  int retcode;
-
-  if (cinfo->global_state != DSTATE_START &&
-      cinfo->global_state != DSTATE_INHEADER)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  retcode = jpeg_consume_input(cinfo);
-
-  switch (retcode) {
-  case JPEG_REACHED_SOS:
-    retcode = JPEG_HEADER_OK;
-    break;
-  case JPEG_REACHED_EOI:
-    if (require_image)		/* Complain if application wanted an image */
-      ERREXIT(cinfo, JERR_NO_IMAGE);
-    /* Reset to start state; it would be safer to require the application to
-     * call jpeg_abort, but we can't change it now for compatibility reasons.
-     * A side effect is to free any temporary memory (there shouldn't be any).
-     */
-    jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */
-    retcode = JPEG_HEADER_TABLES_ONLY;
-    break;
-  case JPEG_SUSPENDED:
-    /* no work */
-    break;
-  }
-
-  return retcode;
-}
-
-
-/*
- * Consume data in advance of what the decompressor requires.
- * This can be called at any time once the decompressor object has
- * been created and a data source has been set up.
- *
- * This routine is essentially a state machine that handles a couple
- * of critical state-transition actions, namely initial setup and
- * transition from header scanning to ready-for-start_decompress.
- * All the actual input is done via the input controller's consume_input
- * method.
- */
-
-GLOBAL(int)
-jpeg_consume_input (j_decompress_ptr cinfo)
-{
-  int retcode = JPEG_SUSPENDED;
-
-  /* NB: every possible DSTATE value should be listed in this switch */
-  switch (cinfo->global_state) {
-  case DSTATE_START:
-    /* Start-of-datastream actions: reset appropriate modules */
-    (*cinfo->inputctl->reset_input_controller) (cinfo);
-    /* Initialize application's data source module */
-    (*cinfo->src->init_source) (cinfo);
-    cinfo->global_state = DSTATE_INHEADER;
-    /*FALLTHROUGH*/
-  case DSTATE_INHEADER:
-    retcode = (*cinfo->inputctl->consume_input) (cinfo);
-    if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */
-      /* Set up default parameters based on header data */
-      default_decompress_parms(cinfo);
-      /* Set global state: ready for start_decompress */
-      cinfo->global_state = DSTATE_READY;
-    }
-    break;
-  case DSTATE_READY:
-    /* Can't advance past first SOS until start_decompress is called */
-    retcode = JPEG_REACHED_SOS;
-    break;
-  case DSTATE_PRELOAD:
-  case DSTATE_PRESCAN:
-  case DSTATE_SCANNING:
-  case DSTATE_RAW_OK:
-  case DSTATE_BUFIMAGE:
-  case DSTATE_BUFPOST:
-  case DSTATE_STOPPING:
-    retcode = (*cinfo->inputctl->consume_input) (cinfo);
-    break;
-  default:
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  }
-  return retcode;
-}
-
-
-/*
- * Have we finished reading the input file?
- */
-
-GLOBAL(boolean)
-jpeg_input_complete (j_decompress_ptr cinfo)
-{
-  /* Check for valid jpeg object */
-  if (cinfo->global_state < DSTATE_START ||
-      cinfo->global_state > DSTATE_STOPPING)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  return cinfo->inputctl->eoi_reached;
-}
-
-
-/*
- * Is there more than one scan?
- */
-
-GLOBAL(boolean)
-jpeg_has_multiple_scans (j_decompress_ptr cinfo)
-{
-  /* Only valid after jpeg_read_header completes */
-  if (cinfo->global_state < DSTATE_READY ||
-      cinfo->global_state > DSTATE_STOPPING)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  return cinfo->inputctl->has_multiple_scans;
-}
-
-
-/*
- * Finish JPEG decompression.
- *
- * This will normally just verify the file trailer and release temp storage.
- *
- * Returns FALSE if suspended.  The return value need be inspected only if
- * a suspending data source is used.
- */
-
-GLOBAL(boolean)
-jpeg_finish_decompress (j_decompress_ptr cinfo)
-{
-  if ((cinfo->global_state == DSTATE_SCANNING ||
-       cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) {
-    /* Terminate final pass of non-buffered mode */
-    if (cinfo->output_scanline < cinfo->output_height)
-      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
-    (*cinfo->master->finish_output_pass) (cinfo);
-    cinfo->global_state = DSTATE_STOPPING;
-  } else if (cinfo->global_state == DSTATE_BUFIMAGE) {
-    /* Finishing after a buffered-image operation */
-    cinfo->global_state = DSTATE_STOPPING;
-  } else if (cinfo->global_state != DSTATE_STOPPING) {
-    /* STOPPING = repeat call after a suspension, anything else is error */
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  }
-  /* Read until EOI */
-  while (! cinfo->inputctl->eoi_reached) {
-    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
-      return FALSE;		/* Suspend, come back later */
-  }
-  /* Do final cleanup */
-  (*cinfo->src->term_source) (cinfo);
-  /* We can use jpeg_abort to release memory and reset global_state */
-  jpeg_abort((j_common_ptr) cinfo);
-  return TRUE;
-}
diff --git a/tkimg1.3/libjpeg/jdapistd.c b/tkimg1.3/libjpeg/jdapistd.c
deleted file mode 100644
index c8e3fa0..0000000
--- a/tkimg1.3/libjpeg/jdapistd.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * jdapistd.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface code for the decompression half
- * of the JPEG library.  These are the "standard" API routines that are
- * used in the normal full-decompression case.  They are not used by a
- * transcoding-only application.  Note that if an application links in
- * jpeg_start_decompress, it will end up linking in the entire decompressor.
- * We thus must separate this file from jdapimin.c to avoid linking the
- * whole decompression library into a transcoder.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Forward declarations */
-LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
-
-
-/*
- * Decompression initialization.
- * jpeg_read_header must be completed before calling this.
- *
- * If a multipass operating mode was selected, this will do all but the
- * last pass, and thus may take a great deal of time.
- *
- * Returns FALSE if suspended.  The return value need be inspected only if
- * a suspending data source is used.
- */
-
-GLOBAL(boolean)
-jpeg_start_decompress (j_decompress_ptr cinfo)
-{
-  if (cinfo->global_state == DSTATE_READY) {
-    /* First call: initialize master control, select active modules */
-    jinit_master_decompress(cinfo);
-    if (cinfo->buffered_image) {
-      /* No more work here; expecting jpeg_start_output next */
-      cinfo->global_state = DSTATE_BUFIMAGE;
-      return TRUE;
-    }
-    cinfo->global_state = DSTATE_PRELOAD;
-  }
-  if (cinfo->global_state == DSTATE_PRELOAD) {
-    /* If file has multiple scans, absorb them all into the coef buffer */
-    if (cinfo->inputctl->has_multiple_scans) {
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-      for (;;) {
-	int retcode;
-	/* Call progress monitor hook if present */
-	if (cinfo->progress != NULL)
-	  (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-	/* Absorb some more input */
-	retcode = (*cinfo->inputctl->consume_input) (cinfo);
-	if (retcode == JPEG_SUSPENDED)
-	  return FALSE;
-	if (retcode == JPEG_REACHED_EOI)
-	  break;
-	/* Advance progress counter if appropriate */
-	if (cinfo->progress != NULL &&
-	    (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {
-	  if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
-	    /* jdmaster underestimated number of scans; ratchet up one scan */
-	    cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
-	  }
-	}
-      }
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif /* D_MULTISCAN_FILES_SUPPORTED */
-    }
-    cinfo->output_scan_number = cinfo->input_scan_number;
-  } else if (cinfo->global_state != DSTATE_PRESCAN)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  /* Perform any dummy output passes, and set up for the final pass */
-  return output_pass_setup(cinfo);
-}
-
-
-/*
- * Set up for an output pass, and perform any dummy pass(es) needed.
- * Common subroutine for jpeg_start_decompress and jpeg_start_output.
- * Entry: global_state = DSTATE_PRESCAN only if previously suspended.
- * Exit: If done, returns TRUE and sets global_state for proper output mode.
- *       If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
- */
-
-LOCAL(boolean)
-output_pass_setup (j_decompress_ptr cinfo)
-{
-  if (cinfo->global_state != DSTATE_PRESCAN) {
-    /* First call: do pass setup */
-    (*cinfo->master->prepare_for_output_pass) (cinfo);
-    cinfo->output_scanline = 0;
-    cinfo->global_state = DSTATE_PRESCAN;
-  }
-  /* Loop over any required dummy passes */
-  while (cinfo->master->is_dummy_pass) {
-#ifdef QUANT_2PASS_SUPPORTED
-    /* Crank through the dummy pass */
-    while (cinfo->output_scanline < cinfo->output_height) {
-      JDIMENSION last_scanline;
-      /* Call progress monitor hook if present */
-      if (cinfo->progress != NULL) {
-	cinfo->progress->pass_counter = (long) cinfo->output_scanline;
-	cinfo->progress->pass_limit = (long) cinfo->output_height;
-	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-      }
-      /* Process some data */
-      last_scanline = cinfo->output_scanline;
-      (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL,
-				    &cinfo->output_scanline, (JDIMENSION) 0);
-      if (cinfo->output_scanline == last_scanline)
-	return FALSE;		/* No progress made, must suspend */
-    }
-    /* Finish up dummy pass, and set up for another one */
-    (*cinfo->master->finish_output_pass) (cinfo);
-    (*cinfo->master->prepare_for_output_pass) (cinfo);
-    cinfo->output_scanline = 0;
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif /* QUANT_2PASS_SUPPORTED */
-  }
-  /* Ready for application to drive output pass through
-   * jpeg_read_scanlines or jpeg_read_raw_data.
-   */
-  cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING;
-  return TRUE;
-}
-
-
-/*
- * Read some scanlines of data from the JPEG decompressor.
- *
- * The return value will be the number of lines actually read.
- * This may be less than the number requested in several cases,
- * including bottom of image, data source suspension, and operating
- * modes that emit multiple scanlines at a time.
- *
- * Note: we warn about excess calls to jpeg_read_scanlines() since
- * this likely signals an application programmer error.  However,
- * an oversize buffer (max_lines > scanlines remaining) is not an error.
- */
-
-GLOBAL(JDIMENSION)
-jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines,
-		     JDIMENSION max_lines)
-{
-  JDIMENSION row_ctr;
-
-  if (cinfo->global_state != DSTATE_SCANNING)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  if (cinfo->output_scanline >= cinfo->output_height) {
-    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
-    return 0;
-  }
-
-  /* Call progress monitor hook if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->pass_counter = (long) cinfo->output_scanline;
-    cinfo->progress->pass_limit = (long) cinfo->output_height;
-    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-  }
-
-  /* Process some data */
-  row_ctr = 0;
-  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines);
-  cinfo->output_scanline += row_ctr;
-  return row_ctr;
-}
-
-
-/*
- * Alternate entry point to read raw data.
- * Processes exactly one iMCU row per call, unless suspended.
- */
-
-GLOBAL(JDIMENSION)
-jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
-		    JDIMENSION max_lines)
-{
-  JDIMENSION lines_per_iMCU_row;
-
-  if (cinfo->global_state != DSTATE_RAW_OK)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  if (cinfo->output_scanline >= cinfo->output_height) {
-    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
-    return 0;
-  }
-
-  /* Call progress monitor hook if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->pass_counter = (long) cinfo->output_scanline;
-    cinfo->progress->pass_limit = (long) cinfo->output_height;
-    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-  }
-
-  /* Verify that at least one iMCU row can be returned. */
-  lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;
-  if (max_lines < lines_per_iMCU_row)
-    ERREXIT(cinfo, JERR_BUFFER_SIZE);
-
-  /* Decompress directly into user's buffer. */
-  if (! (*cinfo->coef->decompress_data) (cinfo, data))
-    return 0;			/* suspension forced, can do nothing more */
-
-  /* OK, we processed one iMCU row. */
-  cinfo->output_scanline += lines_per_iMCU_row;
-  return lines_per_iMCU_row;
-}
-
-
-/* Additional entry points for buffered-image mode. */
-
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-
-/*
- * Initialize for an output pass in buffered-image mode.
- */
-
-GLOBAL(boolean)
-jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
-{
-  if (cinfo->global_state != DSTATE_BUFIMAGE &&
-      cinfo->global_state != DSTATE_PRESCAN)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  /* Limit scan number to valid range */
-  if (scan_number <= 0)
-    scan_number = 1;
-  if (cinfo->inputctl->eoi_reached &&
-      scan_number > cinfo->input_scan_number)
-    scan_number = cinfo->input_scan_number;
-  cinfo->output_scan_number = scan_number;
-  /* Perform any dummy output passes, and set up for the real pass */
-  return output_pass_setup(cinfo);
-}
-
-
-/*
- * Finish up after an output pass in buffered-image mode.
- *
- * Returns FALSE if suspended.  The return value need be inspected only if
- * a suspending data source is used.
- */
-
-GLOBAL(boolean)
-jpeg_finish_output (j_decompress_ptr cinfo)
-{
-  if ((cinfo->global_state == DSTATE_SCANNING ||
-       cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) {
-    /* Terminate this pass. */
-    /* We do not require the whole pass to have been completed. */
-    (*cinfo->master->finish_output_pass) (cinfo);
-    cinfo->global_state = DSTATE_BUFPOST;
-  } else if (cinfo->global_state != DSTATE_BUFPOST) {
-    /* BUFPOST = repeat call after a suspension, anything else is error */
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  }
-  /* Read markers looking for SOS or EOI */
-  while (cinfo->input_scan_number <= cinfo->output_scan_number &&
-	 ! cinfo->inputctl->eoi_reached) {
-    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
-      return FALSE;		/* Suspend, come back later */
-  }
-  cinfo->global_state = DSTATE_BUFIMAGE;
-  return TRUE;
-}
-
-#endif /* D_MULTISCAN_FILES_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jdatadst.c b/tkimg1.3/libjpeg/jdatadst.c
deleted file mode 100644
index a8f6fb0..0000000
--- a/tkimg1.3/libjpeg/jdatadst.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * jdatadst.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains compression data destination routines for the case of
- * emitting JPEG data to a file (or any stdio stream).  While these routines
- * are sufficient for most applications, some will want to use a different
- * destination manager.
- * IMPORTANT: we assume that fwrite() will correctly transcribe an array of
- * JOCTETs into 8-bit-wide elements on external storage.  If char is wider
- * than 8 bits on your machine, you may need to do some tweaking.
- */
-
-/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h"
-
-
-/* Expanded data destination object for stdio output */
-
-typedef struct {
-  struct jpeg_destination_mgr pub; /* public fields */
-
-  FILE * outfile;		/* target stream */
-  JOCTET * buffer;		/* start of buffer */
-} my_destination_mgr;
-
-typedef my_destination_mgr * my_dest_ptr;
-
-#define OUTPUT_BUF_SIZE  4096	/* choose an efficiently fwrite'able size */
-
-
-/*
- * Initialize destination --- called by jpeg_start_compress
- * before any data is actually written.
- */
-
-METHODDEF(void)
-init_destination (j_compress_ptr cinfo)
-{
-  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
-
-  /* Allocate the output buffer --- it will be released when done with image */
-  dest->buffer = (JOCTET *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  OUTPUT_BUF_SIZE * SIZEOF(JOCTET));
-
-  dest->pub.next_output_byte = dest->buffer;
-  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
-}
-
-
-/*
- * Empty the output buffer --- called whenever buffer fills up.
- *
- * In typical applications, this should write the entire output buffer
- * (ignoring the current state of next_output_byte & free_in_buffer),
- * reset the pointer & count to the start of the buffer, and return TRUE
- * indicating that the buffer has been dumped.
- *
- * In applications that need to be able to suspend compression due to output
- * overrun, a FALSE return indicates that the buffer cannot be emptied now.
- * In this situation, the compressor will return to its caller (possibly with
- * an indication that it has not accepted all the supplied scanlines).  The
- * application should resume compression after it has made more room in the
- * output buffer.  Note that there are substantial restrictions on the use of
- * suspension --- see the documentation.
- *
- * When suspending, the compressor will back up to a convenient restart point
- * (typically the start of the current MCU). next_output_byte & free_in_buffer
- * indicate where the restart point will be if the current call returns FALSE.
- * Data beyond this point will be regenerated after resumption, so do not
- * write it out when emptying the buffer externally.
- */
-
-METHODDEF(boolean)
-empty_output_buffer (j_compress_ptr cinfo)
-{
-  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
-
-  if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) !=
-      (size_t) OUTPUT_BUF_SIZE)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-
-  dest->pub.next_output_byte = dest->buffer;
-  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
-
-  return TRUE;
-}
-
-
-/*
- * Terminate destination --- called by jpeg_finish_compress
- * after all data has been written.  Usually needs to flush buffer.
- *
- * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
- * application must deal with any cleanup that should happen even
- * for error exit.
- */
-
-METHODDEF(void)
-term_destination (j_compress_ptr cinfo)
-{
-  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
-  size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
-
-  /* Write any data remaining in the buffer */
-  if (datacount > 0) {
-    if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)
-      ERREXIT(cinfo, JERR_FILE_WRITE);
-  }
-  fflush(dest->outfile);
-  /* Make sure we wrote the output file OK */
-  if (ferror(dest->outfile))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * Prepare for output to a stdio stream.
- * The caller must have already opened the stream, and is responsible
- * for closing it after finishing compression.
- */
-
-GLOBAL(void)
-jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
-{
-  my_dest_ptr dest;
-
-  /* The destination object is made permanent so that multiple JPEG images
-   * can be written to the same file without re-executing jpeg_stdio_dest.
-   * This makes it dangerous to use this manager and a different destination
-   * manager serially with the same JPEG object, because their private object
-   * sizes may be different.  Caveat programmer.
-   */
-  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
-    cinfo->dest = (struct jpeg_destination_mgr *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  SIZEOF(my_destination_mgr));
-  }
-
-  dest = (my_dest_ptr) cinfo->dest;
-  dest->pub.init_destination = init_destination;
-  dest->pub.empty_output_buffer = empty_output_buffer;
-  dest->pub.term_destination = term_destination;
-  dest->outfile = outfile;
-}
diff --git a/tkimg1.3/libjpeg/jdatasrc.c b/tkimg1.3/libjpeg/jdatasrc.c
deleted file mode 100644
index edc752b..0000000
--- a/tkimg1.3/libjpeg/jdatasrc.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * jdatasrc.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains decompression data source routines for the case of
- * reading JPEG data from a file (or any stdio stream).  While these routines
- * are sufficient for most applications, some will want to use a different
- * source manager.
- * IMPORTANT: we assume that fread() will correctly transcribe an array of
- * JOCTETs from 8-bit-wide elements on external storage.  If char is wider
- * than 8 bits on your machine, you may need to do some tweaking.
- */
-
-/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h"
-
-
-/* Expanded data source object for stdio input */
-
-typedef struct {
-  struct jpeg_source_mgr pub;	/* public fields */
-
-  FILE * infile;		/* source stream */
-  JOCTET * buffer;		/* start of buffer */
-  boolean start_of_file;	/* have we gotten any data yet? */
-} my_source_mgr;
-
-typedef my_source_mgr * my_src_ptr;
-
-#define INPUT_BUF_SIZE  4096	/* choose an efficiently fread'able size */
-
-
-/*
- * Initialize source --- called by jpeg_read_header
- * before any data is actually read.
- */
-
-METHODDEF(void)
-init_source (j_decompress_ptr cinfo)
-{
-  my_src_ptr src = (my_src_ptr) cinfo->src;
-
-  /* We reset the empty-input-file flag for each image,
-   * but we don't clear the input buffer.
-   * This is correct behavior for reading a series of images from one source.
-   */
-  src->start_of_file = TRUE;
-}
-
-
-/*
- * Fill the input buffer --- called whenever buffer is emptied.
- *
- * In typical applications, this should read fresh data into the buffer
- * (ignoring the current state of next_input_byte & bytes_in_buffer),
- * reset the pointer & count to the start of the buffer, and return TRUE
- * indicating that the buffer has been reloaded.  It is not necessary to
- * fill the buffer entirely, only to obtain at least one more byte.
- *
- * There is no such thing as an EOF return.  If the end of the file has been
- * reached, the routine has a choice of ERREXIT() or inserting fake data into
- * the buffer.  In most cases, generating a warning message and inserting a
- * fake EOI marker is the best course of action --- this will allow the
- * decompressor to output however much of the image is there.  However,
- * the resulting error message is misleading if the real problem is an empty
- * input file, so we handle that case specially.
- *
- * In applications that need to be able to suspend compression due to input
- * not being available yet, a FALSE return indicates that no more data can be
- * obtained right now, but more may be forthcoming later.  In this situation,
- * the decompressor will return to its caller (with an indication of the
- * number of scanlines it has read, if any).  The application should resume
- * decompression after it has loaded more data into the input buffer.  Note
- * that there are substantial restrictions on the use of suspension --- see
- * the documentation.
- *
- * When suspending, the decompressor will back up to a convenient restart point
- * (typically the start of the current MCU). next_input_byte & bytes_in_buffer
- * indicate where the restart point will be if the current call returns FALSE.
- * Data beyond this point must be rescanned after resumption, so move it to
- * the front of the buffer rather than discarding it.
- */
-
-METHODDEF(boolean)
-fill_input_buffer (j_decompress_ptr cinfo)
-{
-  my_src_ptr src = (my_src_ptr) cinfo->src;
-  size_t nbytes;
-
-  nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);
-
-  if (nbytes <= 0) {
-    if (src->start_of_file)	/* Treat empty input file as fatal error */
-      ERREXIT(cinfo, JERR_INPUT_EMPTY);
-    WARNMS(cinfo, JWRN_JPEG_EOF);
-    /* Insert a fake EOI marker */
-    src->buffer[0] = (JOCTET) 0xFF;
-    src->buffer[1] = (JOCTET) JPEG_EOI;
-    nbytes = 2;
-  }
-
-  src->pub.next_input_byte = src->buffer;
-  src->pub.bytes_in_buffer = nbytes;
-  src->start_of_file = FALSE;
-
-  return TRUE;
-}
-
-
-/*
- * Skip data --- used to skip over a potentially large amount of
- * uninteresting data (such as an APPn marker).
- *
- * Writers of suspendable-input applications must note that skip_input_data
- * is not granted the right to give a suspension return.  If the skip extends
- * beyond the data currently in the buffer, the buffer can be marked empty so
- * that the next read will cause a fill_input_buffer call that can suspend.
- * Arranging for additional bytes to be discarded before reloading the input
- * buffer is the application writer's problem.
- */
-
-METHODDEF(void)
-skip_input_data (j_decompress_ptr cinfo, long num_bytes)
-{
-  my_src_ptr src = (my_src_ptr) cinfo->src;
-
-  /* Just a dumb implementation for now.  Could use fseek() except
-   * it doesn't work on pipes.  Not clear that being smart is worth
-   * any trouble anyway --- large skips are infrequent.
-   */
-  if (num_bytes > 0) {
-    while (num_bytes > (long) src->pub.bytes_in_buffer) {
-      num_bytes -= (long) src->pub.bytes_in_buffer;
-      (void) fill_input_buffer(cinfo);
-      /* note we assume that fill_input_buffer will never return FALSE,
-       * so suspension need not be handled.
-       */
-    }
-    src->pub.next_input_byte += (size_t) num_bytes;
-    src->pub.bytes_in_buffer -= (size_t) num_bytes;
-  }
-}
-
-
-/*
- * An additional method that can be provided by data source modules is the
- * resync_to_restart method for error recovery in the presence of RST markers.
- * For the moment, this source module just uses the default resync method
- * provided by the JPEG library.  That method assumes that no backtracking
- * is possible.
- */
-
-
-/*
- * Terminate source --- called by jpeg_finish_decompress
- * after all data has been read.  Often a no-op.
- *
- * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
- * application must deal with any cleanup that should happen even
- * for error exit.
- */
-
-METHODDEF(void)
-term_source (j_decompress_ptr cinfo)
-{
-  /* no work necessary here */
-}
-
-
-/*
- * Prepare for input from a stdio stream.
- * The caller must have already opened the stream, and is responsible
- * for closing it after finishing decompression.
- */
-
-GLOBAL(void)
-jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
-{
-  my_src_ptr src;
-
-  /* The source object and input buffer are made permanent so that a series
-   * of JPEG images can be read from the same file by calling jpeg_stdio_src
-   * only before the first one.  (If we discarded the buffer at the end of
-   * one image, we'd likely lose the start of the next one.)
-   * This makes it unsafe to use this manager and a different source
-   * manager serially with the same JPEG object.  Caveat programmer.
-   */
-  if (cinfo->src == NULL) {	/* first time for this JPEG object? */
-    cinfo->src = (struct jpeg_source_mgr *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  SIZEOF(my_source_mgr));
-    src = (my_src_ptr) cinfo->src;
-    src->buffer = (JOCTET *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				  INPUT_BUF_SIZE * SIZEOF(JOCTET));
-  }
-
-  src = (my_src_ptr) cinfo->src;
-  src->pub.init_source = init_source;
-  src->pub.fill_input_buffer = fill_input_buffer;
-  src->pub.skip_input_data = skip_input_data;
-  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
-  src->pub.term_source = term_source;
-  src->infile = infile;
-  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
-  src->pub.next_input_byte = NULL; /* until buffer loaded */
-}
diff --git a/tkimg1.3/libjpeg/jdcoefct.c b/tkimg1.3/libjpeg/jdcoefct.c
deleted file mode 100644
index 4938d20..0000000
--- a/tkimg1.3/libjpeg/jdcoefct.c
+++ /dev/null
@@ -1,736 +0,0 @@
-/*
- * jdcoefct.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the coefficient buffer controller for decompression.
- * This controller is the top level of the JPEG decompressor proper.
- * The coefficient buffer lies between entropy decoding and inverse-DCT steps.
- *
- * In buffered-image mode, this controller is the interface between
- * input-oriented processing and output-oriented processing.
- * Also, the input side (only) is used when reading a file for transcoding.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-/* Block smoothing is only applicable for progressive JPEG, so: */
-#ifndef D_PROGRESSIVE_SUPPORTED
-#undef BLOCK_SMOOTHING_SUPPORTED
-#endif
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_d_coef_controller pub; /* public fields */
-
-  /* These variables keep track of the current location of the input side. */
-  /* cinfo->input_iMCU_row is also used for this. */
-  JDIMENSION MCU_ctr;		/* counts MCUs processed in current row */
-  int MCU_vert_offset;		/* counts MCU rows within iMCU row */
-  int MCU_rows_per_iMCU_row;	/* number of such rows needed */
-
-  /* The output side's location is represented by cinfo->output_iMCU_row. */
-
-  /* In single-pass modes, it's sufficient to buffer just one MCU.
-   * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks,
-   * and let the entropy decoder write into that workspace each time.
-   * (On 80x86, the workspace is FAR even though it's not really very big;
-   * this is to keep the module interfaces unchanged when a large coefficient
-   * buffer is necessary.)
-   * In multi-pass modes, this array points to the current MCU's blocks
-   * within the virtual arrays; it is used only by the input side.
-   */
-  JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU];
-
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-  /* In multi-pass modes, we need a virtual block array for each component. */
-  jvirt_barray_ptr whole_image[MAX_COMPONENTS];
-#endif
-
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-  /* When doing block smoothing, we latch coefficient Al values here */
-  int * coef_bits_latch;
-#define SAVED_COEFS  6		/* we save coef_bits[0..5] */
-#endif
-} my_coef_controller;
-
-typedef my_coef_controller * my_coef_ptr;
-
-/* Forward declarations */
-METHODDEF(int) decompress_onepass
-	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-METHODDEF(int) decompress_data
-	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
-#endif
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
-METHODDEF(int) decompress_smooth_data
-	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
-#endif
-
-
-LOCAL(void)
-start_iMCU_row (j_decompress_ptr cinfo)
-/* Reset within-iMCU-row counters for a new row (input side) */
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  /* In an interleaved scan, an MCU row is the same as an iMCU row.
-   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.
-   * But at the bottom of the image, process only what's left.
-   */
-  if (cinfo->comps_in_scan > 1) {
-    coef->MCU_rows_per_iMCU_row = 1;
-  } else {
-    if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1))
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;
-    else
-      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
-  }
-
-  coef->MCU_ctr = 0;
-  coef->MCU_vert_offset = 0;
-}
-
-
-/*
- * Initialize for an input processing pass.
- */
-
-METHODDEF(void)
-start_input_pass (j_decompress_ptr cinfo)
-{
-  cinfo->input_iMCU_row = 0;
-  start_iMCU_row(cinfo);
-}
-
-
-/*
- * Initialize for an output processing pass.
- */
-
-METHODDEF(void)
-start_output_pass (j_decompress_ptr cinfo)
-{
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-
-  /* If multipass, check to see whether to use block smoothing on this pass */
-  if (coef->pub.coef_arrays != NULL) {
-    if (cinfo->do_block_smoothing && smoothing_ok(cinfo))
-      coef->pub.decompress_data = decompress_smooth_data;
-    else
-      coef->pub.decompress_data = decompress_data;
-  }
-#endif
-  cinfo->output_iMCU_row = 0;
-}
-
-
-/*
- * Decompress and return some data in the single-pass case.
- * Always attempts to emit one fully interleaved MCU row ("iMCU" row).
- * Input and output must run in lockstep since we have only a one-MCU buffer.
- * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
- *
- * NB: output_buf contains a plane for each component in image,
- * which we index according to the component's SOF position.
- */
-
-METHODDEF(int)
-decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION MCU_col_num;	/* index of current MCU within row */
-  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  int blkn, ci, xindex, yindex, yoffset, useful_width;
-  JSAMPARRAY output_ptr;
-  JDIMENSION start_col, output_col;
-  jpeg_component_info *compptr;
-  inverse_DCT_method_ptr inverse_DCT;
-
-  /* Loop to process as much as one whole iMCU row */
-  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
-       yoffset++) {
-    for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
-	 MCU_col_num++) {
-      /* Try to fetch an MCU.  Entropy decoder expects buffer to be zeroed. */
-      jzero_far((void FAR *) coef->MCU_buffer[0],
-		(size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK)));
-      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
-	/* Suspension forced; update state counters and exit */
-	coef->MCU_vert_offset = yoffset;
-	coef->MCU_ctr = MCU_col_num;
-	return JPEG_SUSPENDED;
-      }
-      /* Determine where data should go in output_buf and do the IDCT thing.
-       * We skip dummy blocks at the right and bottom edges (but blkn gets
-       * incremented past them!).  Note the inner loop relies on having
-       * allocated the MCU_buffer[] blocks sequentially.
-       */
-      blkn = 0;			/* index of current DCT block within MCU */
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-	compptr = cinfo->cur_comp_info[ci];
-	/* Don't bother to IDCT an uninteresting component. */
-	if (! compptr->component_needed) {
-	  blkn += compptr->MCU_blocks;
-	  continue;
-	}
-	inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];
-	useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
-						    : compptr->last_col_width;
-	output_ptr = output_buf[compptr->component_index] +
-	  yoffset * compptr->DCT_scaled_size;
-	start_col = MCU_col_num * compptr->MCU_sample_width;
-	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
-	  if (cinfo->input_iMCU_row < last_iMCU_row ||
-	      yoffset+yindex < compptr->last_row_height) {
-	    output_col = start_col;
-	    for (xindex = 0; xindex < useful_width; xindex++) {
-	      (*inverse_DCT) (cinfo, compptr,
-			      (JCOEFPTR) coef->MCU_buffer[blkn+xindex],
-			      output_ptr, output_col);
-	      output_col += compptr->DCT_scaled_size;
-	    }
-	  }
-	  blkn += compptr->MCU_width;
-	  output_ptr += compptr->DCT_scaled_size;
-	}
-      }
-    }
-    /* Completed an MCU row, but perhaps not an iMCU row */
-    coef->MCU_ctr = 0;
-  }
-  /* Completed the iMCU row, advance counters for next one */
-  cinfo->output_iMCU_row++;
-  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {
-    start_iMCU_row(cinfo);
-    return JPEG_ROW_COMPLETED;
-  }
-  /* Completed the scan */
-  (*cinfo->inputctl->finish_input_pass) (cinfo);
-  return JPEG_SCAN_COMPLETED;
-}
-
-
-/*
- * Dummy consume-input routine for single-pass operation.
- */
-
-METHODDEF(int)
-dummy_consume_data (j_decompress_ptr cinfo)
-{
-  return JPEG_SUSPENDED;	/* Always indicate nothing was done */
-}
-
-
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-
-/*
- * Consume input data and store it in the full-image coefficient buffer.
- * We read as much as one fully interleaved MCU row ("iMCU" row) per call,
- * ie, v_samp_factor block rows for each component in the scan.
- * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
- */
-
-METHODDEF(int)
-consume_data (j_decompress_ptr cinfo)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION MCU_col_num;	/* index of current MCU within row */
-  int blkn, ci, xindex, yindex, yoffset;
-  JDIMENSION start_col;
-  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
-  JBLOCKROW buffer_ptr;
-  jpeg_component_info *compptr;
-
-  /* Align the virtual buffers for the components used in this scan. */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    buffer[ci] = (*cinfo->mem->access_virt_barray)
-      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],
-       cinfo->input_iMCU_row * compptr->v_samp_factor,
-       (JDIMENSION) compptr->v_samp_factor, TRUE);
-    /* Note: entropy decoder expects buffer to be zeroed,
-     * but this is handled automatically by the memory manager
-     * because we requested a pre-zeroed array.
-     */
-  }
-
-  /* Loop to process one whole iMCU row */
-  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
-       yoffset++) {
-    for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;
-	 MCU_col_num++) {
-      /* Construct list of pointers to DCT blocks belonging to this MCU */
-      blkn = 0;			/* index of current DCT block within MCU */
-      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-	compptr = cinfo->cur_comp_info[ci];
-	start_col = MCU_col_num * compptr->MCU_width;
-	for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
-	  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
-	  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
-	    coef->MCU_buffer[blkn++] = buffer_ptr++;
-	  }
-	}
-      }
-      /* Try to fetch the MCU. */
-      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
-	/* Suspension forced; update state counters and exit */
-	coef->MCU_vert_offset = yoffset;
-	coef->MCU_ctr = MCU_col_num;
-	return JPEG_SUSPENDED;
-      }
-    }
-    /* Completed an MCU row, but perhaps not an iMCU row */
-    coef->MCU_ctr = 0;
-  }
-  /* Completed the iMCU row, advance counters for next one */
-  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {
-    start_iMCU_row(cinfo);
-    return JPEG_ROW_COMPLETED;
-  }
-  /* Completed the scan */
-  (*cinfo->inputctl->finish_input_pass) (cinfo);
-  return JPEG_SCAN_COMPLETED;
-}
-
-
-/*
- * Decompress and return some data in the multi-pass case.
- * Always attempts to emit one fully interleaved MCU row ("iMCU" row).
- * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
- *
- * NB: output_buf contains a plane for each component in image.
- */
-
-METHODDEF(int)
-decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  JDIMENSION block_num;
-  int ci, block_row, block_rows;
-  JBLOCKARRAY buffer;
-  JBLOCKROW buffer_ptr;
-  JSAMPARRAY output_ptr;
-  JDIMENSION output_col;
-  jpeg_component_info *compptr;
-  inverse_DCT_method_ptr inverse_DCT;
-
-  /* Force some input to be done if we are getting ahead of the input. */
-  while (cinfo->input_scan_number < cinfo->output_scan_number ||
-	 (cinfo->input_scan_number == cinfo->output_scan_number &&
-	  cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) {
-    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)
-      return JPEG_SUSPENDED;
-  }
-
-  /* OK, output from the virtual arrays. */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Don't bother to IDCT an uninteresting component. */
-    if (! compptr->component_needed)
-      continue;
-    /* Align the virtual buffer for this component. */
-    buffer = (*cinfo->mem->access_virt_barray)
-      ((j_common_ptr) cinfo, coef->whole_image[ci],
-       cinfo->output_iMCU_row * compptr->v_samp_factor,
-       (JDIMENSION) compptr->v_samp_factor, FALSE);
-    /* Count non-dummy DCT block rows in this iMCU row. */
-    if (cinfo->output_iMCU_row < last_iMCU_row)
-      block_rows = compptr->v_samp_factor;
-    else {
-      /* NB: can't use last_row_height here; it is input-side-dependent! */
-      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
-      if (block_rows == 0) block_rows = compptr->v_samp_factor;
-    }
-    inverse_DCT = cinfo->idct->inverse_DCT[ci];
-    output_ptr = output_buf[ci];
-    /* Loop over all DCT blocks to be processed. */
-    for (block_row = 0; block_row < block_rows; block_row++) {
-      buffer_ptr = buffer[block_row];
-      output_col = 0;
-      for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) {
-	(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr,
-			output_ptr, output_col);
-	buffer_ptr++;
-	output_col += compptr->DCT_scaled_size;
-      }
-      output_ptr += compptr->DCT_scaled_size;
-    }
-  }
-
-  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
-    return JPEG_ROW_COMPLETED;
-  return JPEG_SCAN_COMPLETED;
-}
-
-#endif /* D_MULTISCAN_FILES_SUPPORTED */
-
-
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-
-/*
- * This code applies interblock smoothing as described by section K.8
- * of the JPEG standard: the first 5 AC coefficients are estimated from
- * the DC values of a DCT block and its 8 neighboring blocks.
- * We apply smoothing only for progressive JPEG decoding, and only if
- * the coefficients it can estimate are not yet known to full precision.
- */
-
-/* Natural-order array positions of the first 5 zigzag-order coefficients */
-#define Q01_POS  1
-#define Q10_POS  8
-#define Q20_POS  16
-#define Q11_POS  9
-#define Q02_POS  2
-
-/*
- * Determine whether block smoothing is applicable and safe.
- * We also latch the current states of the coef_bits[] entries for the
- * AC coefficients; otherwise, if the input side of the decompressor
- * advances into a new scan, we might think the coefficients are known
- * more accurately than they really are.
- */
-
-LOCAL(boolean)
-smoothing_ok (j_decompress_ptr cinfo)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  boolean smoothing_useful = FALSE;
-  int ci, coefi;
-  jpeg_component_info *compptr;
-  JQUANT_TBL * qtable;
-  int * coef_bits;
-  int * coef_bits_latch;
-
-  if (! cinfo->progressive_mode || cinfo->coef_bits == NULL)
-    return FALSE;
-
-  /* Allocate latch area if not already done */
-  if (coef->coef_bits_latch == NULL)
-    coef->coef_bits_latch = (int *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  cinfo->num_components *
-				  (SAVED_COEFS * SIZEOF(int)));
-  coef_bits_latch = coef->coef_bits_latch;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* All components' quantization values must already be latched. */
-    if ((qtable = compptr->quant_table) == NULL)
-      return FALSE;
-    /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */
-    if (qtable->quantval[0] == 0 ||
-	qtable->quantval[Q01_POS] == 0 ||
-	qtable->quantval[Q10_POS] == 0 ||
-	qtable->quantval[Q20_POS] == 0 ||
-	qtable->quantval[Q11_POS] == 0 ||
-	qtable->quantval[Q02_POS] == 0)
-      return FALSE;
-    /* DC values must be at least partly known for all components. */
-    coef_bits = cinfo->coef_bits[ci];
-    if (coef_bits[0] < 0)
-      return FALSE;
-    /* Block smoothing is helpful if some AC coefficients remain inaccurate. */
-    for (coefi = 1; coefi <= 5; coefi++) {
-      coef_bits_latch[coefi] = coef_bits[coefi];
-      if (coef_bits[coefi] != 0)
-	smoothing_useful = TRUE;
-    }
-    coef_bits_latch += SAVED_COEFS;
-  }
-
-  return smoothing_useful;
-}
-
-
-/*
- * Variant of decompress_data for use when doing block smoothing.
- */
-
-METHODDEF(int)
-decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
-{
-  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
-  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
-  JDIMENSION block_num, last_block_column;
-  int ci, block_row, block_rows, access_rows;
-  JBLOCKARRAY buffer;
-  JBLOCKROW buffer_ptr, prev_block_row, next_block_row;
-  JSAMPARRAY output_ptr;
-  JDIMENSION output_col;
-  jpeg_component_info *compptr;
-  inverse_DCT_method_ptr inverse_DCT;
-  boolean first_row, last_row;
-  JBLOCK workspace;
-  int *coef_bits;
-  JQUANT_TBL *quanttbl;
-  INT32 Q00,Q01,Q02,Q10,Q11,Q20, num;
-  int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;
-  int Al, pred;
-
-  /* Force some input to be done if we are getting ahead of the input. */
-  while (cinfo->input_scan_number <= cinfo->output_scan_number &&
-	 ! cinfo->inputctl->eoi_reached) {
-    if (cinfo->input_scan_number == cinfo->output_scan_number) {
-      /* If input is working on current scan, we ordinarily want it to
-       * have completed the current row.  But if input scan is DC,
-       * we want it to keep one row ahead so that next block row's DC
-       * values are up to date.
-       */
-      JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0;
-      if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta)
-	break;
-    }
-    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)
-      return JPEG_SUSPENDED;
-  }
-
-  /* OK, output from the virtual arrays. */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Don't bother to IDCT an uninteresting component. */
-    if (! compptr->component_needed)
-      continue;
-    /* Count non-dummy DCT block rows in this iMCU row. */
-    if (cinfo->output_iMCU_row < last_iMCU_row) {
-      block_rows = compptr->v_samp_factor;
-      access_rows = block_rows * 2; /* this and next iMCU row */
-      last_row = FALSE;
-    } else {
-      /* NB: can't use last_row_height here; it is input-side-dependent! */
-      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
-      if (block_rows == 0) block_rows = compptr->v_samp_factor;
-      access_rows = block_rows; /* this iMCU row only */
-      last_row = TRUE;
-    }
-    /* Align the virtual buffer for this component. */
-    if (cinfo->output_iMCU_row > 0) {
-      access_rows += compptr->v_samp_factor; /* prior iMCU row too */
-      buffer = (*cinfo->mem->access_virt_barray)
-	((j_common_ptr) cinfo, coef->whole_image[ci],
-	 (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor,
-	 (JDIMENSION) access_rows, FALSE);
-      buffer += compptr->v_samp_factor;	/* point to current iMCU row */
-      first_row = FALSE;
-    } else {
-      buffer = (*cinfo->mem->access_virt_barray)
-	((j_common_ptr) cinfo, coef->whole_image[ci],
-	 (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE);
-      first_row = TRUE;
-    }
-    /* Fetch component-dependent info */
-    coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS);
-    quanttbl = compptr->quant_table;
-    Q00 = quanttbl->quantval[0];
-    Q01 = quanttbl->quantval[Q01_POS];
-    Q10 = quanttbl->quantval[Q10_POS];
-    Q20 = quanttbl->quantval[Q20_POS];
-    Q11 = quanttbl->quantval[Q11_POS];
-    Q02 = quanttbl->quantval[Q02_POS];
-    inverse_DCT = cinfo->idct->inverse_DCT[ci];
-    output_ptr = output_buf[ci];
-    /* Loop over all DCT blocks to be processed. */
-    for (block_row = 0; block_row < block_rows; block_row++) {
-      buffer_ptr = buffer[block_row];
-      if (first_row && block_row == 0)
-	prev_block_row = buffer_ptr;
-      else
-	prev_block_row = buffer[block_row-1];
-      if (last_row && block_row == block_rows-1)
-	next_block_row = buffer_ptr;
-      else
-	next_block_row = buffer[block_row+1];
-      /* We fetch the surrounding DC values using a sliding-register approach.
-       * Initialize all nine here so as to do the right thing on narrow pics.
-       */
-      DC1 = DC2 = DC3 = (int) prev_block_row[0][0];
-      DC4 = DC5 = DC6 = (int) buffer_ptr[0][0];
-      DC7 = DC8 = DC9 = (int) next_block_row[0][0];
-      output_col = 0;
-      last_block_column = compptr->width_in_blocks - 1;
-      for (block_num = 0; block_num <= last_block_column; block_num++) {
-	/* Fetch current DCT block into workspace so we can modify it. */
-	jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1);
-	/* Update DC values */
-	if (block_num < last_block_column) {
-	  DC3 = (int) prev_block_row[1][0];
-	  DC6 = (int) buffer_ptr[1][0];
-	  DC9 = (int) next_block_row[1][0];
-	}
-	/* Compute coefficient estimates per K.8.
-	 * An estimate is applied only if coefficient is still zero,
-	 * and is not known to be fully accurate.
-	 */
-	/* AC01 */
-	if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
-	  num = 36 * Q00 * (DC4 - DC6);
-	  if (num >= 0) {
-	    pred = (int) (((Q01<<7) + num) / (Q01<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	  } else {
-	    pred = (int) (((Q01<<7) - num) / (Q01<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	    pred = -pred;
-	  }
-	  workspace[1] = (JCOEF) pred;
-	}
-	/* AC10 */
-	if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
-	  num = 36 * Q00 * (DC2 - DC8);
-	  if (num >= 0) {
-	    pred = (int) (((Q10<<7) + num) / (Q10<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	  } else {
-	    pred = (int) (((Q10<<7) - num) / (Q10<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	    pred = -pred;
-	  }
-	  workspace[8] = (JCOEF) pred;
-	}
-	/* AC20 */
-	if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
-	  num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
-	  if (num >= 0) {
-	    pred = (int) (((Q20<<7) + num) / (Q20<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	  } else {
-	    pred = (int) (((Q20<<7) - num) / (Q20<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	    pred = -pred;
-	  }
-	  workspace[16] = (JCOEF) pred;
-	}
-	/* AC11 */
-	if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
-	  num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
-	  if (num >= 0) {
-	    pred = (int) (((Q11<<7) + num) / (Q11<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	  } else {
-	    pred = (int) (((Q11<<7) - num) / (Q11<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	    pred = -pred;
-	  }
-	  workspace[9] = (JCOEF) pred;
-	}
-	/* AC02 */
-	if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
-	  num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
-	  if (num >= 0) {
-	    pred = (int) (((Q02<<7) + num) / (Q02<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	  } else {
-	    pred = (int) (((Q02<<7) - num) / (Q02<<8));
-	    if (Al > 0 && pred >= (1<<Al))
-	      pred = (1<<Al)-1;
-	    pred = -pred;
-	  }
-	  workspace[2] = (JCOEF) pred;
-	}
-	/* OK, do the IDCT */
-	(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workspace,
-			output_ptr, output_col);
-	/* Advance for next column */
-	DC1 = DC2; DC2 = DC3;
-	DC4 = DC5; DC5 = DC6;
-	DC7 = DC8; DC8 = DC9;
-	buffer_ptr++, prev_block_row++, next_block_row++;
-	output_col += compptr->DCT_scaled_size;
-      }
-      output_ptr += compptr->DCT_scaled_size;
-    }
-  }
-
-  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
-    return JPEG_ROW_COMPLETED;
-  return JPEG_SCAN_COMPLETED;
-}
-
-#endif /* BLOCK_SMOOTHING_SUPPORTED */
-
-
-/*
- * Initialize coefficient buffer controller.
- */
-
-GLOBAL(void)
-jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
-{
-  my_coef_ptr coef;
-
-  coef = (my_coef_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_coef_controller));
-  cinfo->coef = (struct jpeg_d_coef_controller *) coef;
-  coef->pub.start_input_pass = start_input_pass;
-  coef->pub.start_output_pass = start_output_pass;
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-  coef->coef_bits_latch = NULL;
-#endif
-
-  /* Create the coefficient buffer. */
-  if (need_full_buffer) {
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-    /* Allocate a full-image virtual array for each component, */
-    /* padded to a multiple of samp_factor DCT blocks in each direction. */
-    /* Note we ask for a pre-zeroed array. */
-    int ci, access_rows;
-    jpeg_component_info *compptr;
-
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      access_rows = compptr->v_samp_factor;
-#ifdef BLOCK_SMOOTHING_SUPPORTED
-      /* If block smoothing could be used, need a bigger window */
-      if (cinfo->progressive_mode)
-	access_rows *= 3;
-#endif
-      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE,
-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
-				(long) compptr->h_samp_factor),
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor),
-	 (JDIMENSION) access_rows);
-    }
-    coef->pub.consume_data = consume_data;
-    coef->pub.decompress_data = decompress_data;
-    coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-  } else {
-    /* We only need a single-MCU buffer. */
-    JBLOCKROW buffer;
-    int i;
-
-    buffer = (JBLOCKROW)
-      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
-    for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) {
-      coef->MCU_buffer[i] = buffer + i;
-    }
-    coef->pub.consume_data = dummy_consume_data;
-    coef->pub.decompress_data = decompress_onepass;
-    coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdcolor.c b/tkimg1.3/libjpeg/jdcolor.c
deleted file mode 100644
index 6c04dfe..0000000
--- a/tkimg1.3/libjpeg/jdcolor.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * jdcolor.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains output colorspace conversion routines.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_color_deconverter pub; /* public fields */
-
-  /* Private state for YCC->RGB conversion */
-  int * Cr_r_tab;		/* => table for Cr to R conversion */
-  int * Cb_b_tab;		/* => table for Cb to B conversion */
-  INT32 * Cr_g_tab;		/* => table for Cr to G conversion */
-  INT32 * Cb_g_tab;		/* => table for Cb to G conversion */
-} my_color_deconverter;
-
-typedef my_color_deconverter * my_cconvert_ptr;
-
-
-/**************** YCbCr -> RGB conversion: most common case **************/
-
-/*
- * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
- * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
- * The conversion equations to be implemented are therefore
- *	R = Y                + 1.40200 * Cr
- *	G = Y - 0.34414 * Cb - 0.71414 * Cr
- *	B = Y + 1.77200 * Cb
- * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
- * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
- *
- * To avoid floating-point arithmetic, we represent the fractional constants
- * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
- * the products by 2^16, with appropriate rounding, to get the correct answer.
- * Notice that Y, being an integral input, does not contribute any fraction
- * so it need not participate in the rounding.
- *
- * For even more speed, we avoid doing any multiplications in the inner loop
- * by precalculating the constants times Cb and Cr for all possible values.
- * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
- * for 12-bit samples it is still acceptable.  It's not very reasonable for
- * 16-bit samples, but if you want lossless storage you shouldn't be changing
- * colorspace anyway.
- * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
- * values for the G calculation are left scaled up, since we must add them
- * together before rounding.
- */
-
-#define SCALEBITS	16	/* speediest right-shift on some machines */
-#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
-#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
-
-
-/*
- * Initialize tables for YCC->RGB colorspace conversion.
- */
-
-LOCAL(void)
-build_ycc_rgb_table (j_decompress_ptr cinfo)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  int i;
-  INT32 x;
-  SHIFT_TEMPS
-
-  cconvert->Cr_r_tab = (int *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(int));
-  cconvert->Cb_b_tab = (int *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(int));
-  cconvert->Cr_g_tab = (INT32 *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(INT32));
-  cconvert->Cb_g_tab = (INT32 *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(INT32));
-
-  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
-    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
-    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
-    /* Cr=>R value is nearest int to 1.40200 * x */
-    cconvert->Cr_r_tab[i] = (int)
-		    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
-    /* Cb=>B value is nearest int to 1.77200 * x */
-    cconvert->Cb_b_tab[i] = (int)
-		    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
-    /* Cr=>G value is scaled-up -0.71414 * x */
-    cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x;
-    /* Cb=>G value is scaled-up -0.34414 * x */
-    /* We also add in ONE_HALF so that need not do it in inner loop */
-    cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
-  }
-}
-
-
-/*
- * Convert some rows of samples to the output colorspace.
- *
- * Note that we change from noninterleaved, one-plane-per-component format
- * to interleaved-pixel format.  The output buffer is therefore three times
- * as wide as the input buffer.
- * A starting row offset is provided only for the input buffer.  The caller
- * can easily adjust the passed output_buf value to accommodate any row
- * offset required on that side.
- */
-
-METHODDEF(void)
-ycc_rgb_convert (j_decompress_ptr cinfo,
-		 JSAMPIMAGE input_buf, JDIMENSION input_row,
-		 JSAMPARRAY output_buf, int num_rows)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int y, cb, cr;
-  register JSAMPROW outptr;
-  register JSAMPROW inptr0, inptr1, inptr2;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->output_width;
-  /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  register int * Crrtab = cconvert->Cr_r_tab;
-  register int * Cbbtab = cconvert->Cb_b_tab;
-  register INT32 * Crgtab = cconvert->Cr_g_tab;
-  register INT32 * Cbgtab = cconvert->Cb_g_tab;
-  SHIFT_TEMPS
-
-  while (--num_rows >= 0) {
-    inptr0 = input_buf[0][input_row];
-    inptr1 = input_buf[1][input_row];
-    inptr2 = input_buf[2][input_row];
-    input_row++;
-    outptr = *output_buf++;
-    for (col = 0; col < num_cols; col++) {
-      y  = GETJSAMPLE(inptr0[col]);
-      cb = GETJSAMPLE(inptr1[col]);
-      cr = GETJSAMPLE(inptr2[col]);
-      /* Range-limiting is essential due to noise introduced by DCT losses. */
-      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
-      outptr[RGB_GREEN] = range_limit[y +
-			      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
-						 SCALEBITS))];
-      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
-      outptr += RGB_PIXELSIZE;
-    }
-  }
-}
-
-
-/**************** Cases other than YCbCr -> RGB **************/
-
-
-/*
- * Color conversion for no colorspace change: just copy the data,
- * converting from separate-planes to interleaved representation.
- */
-
-METHODDEF(void)
-null_convert (j_decompress_ptr cinfo,
-	      JSAMPIMAGE input_buf, JDIMENSION input_row,
-	      JSAMPARRAY output_buf, int num_rows)
-{
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION count;
-  register int num_components = cinfo->num_components;
-  JDIMENSION num_cols = cinfo->output_width;
-  int ci;
-
-  while (--num_rows >= 0) {
-    for (ci = 0; ci < num_components; ci++) {
-      inptr = input_buf[ci][input_row];
-      outptr = output_buf[0] + ci;
-      for (count = num_cols; count > 0; count--) {
-	*outptr = *inptr++;	/* needn't bother with GETJSAMPLE() here */
-	outptr += num_components;
-      }
-    }
-    input_row++;
-    output_buf++;
-  }
-}
-
-
-/*
- * Color conversion for grayscale: just copy the data.
- * This also works for YCbCr -> grayscale conversion, in which
- * we just copy the Y (luminance) component and ignore chrominance.
- */
-
-METHODDEF(void)
-grayscale_convert (j_decompress_ptr cinfo,
-		   JSAMPIMAGE input_buf, JDIMENSION input_row,
-		   JSAMPARRAY output_buf, int num_rows)
-{
-  jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,
-		    num_rows, cinfo->output_width);
-}
-
-
-/*
- * Convert grayscale to RGB: just duplicate the graylevel three times.
- * This is provided to support applications that don't want to cope
- * with grayscale as a separate case.
- */
-
-METHODDEF(void)
-gray_rgb_convert (j_decompress_ptr cinfo,
-		  JSAMPIMAGE input_buf, JDIMENSION input_row,
-		  JSAMPARRAY output_buf, int num_rows)
-{
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->output_width;
-
-  while (--num_rows >= 0) {
-    inptr = input_buf[0][input_row++];
-    outptr = *output_buf++;
-    for (col = 0; col < num_cols; col++) {
-      /* We can dispense with GETJSAMPLE() here */
-      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
-      outptr += RGB_PIXELSIZE;
-    }
-  }
-}
-
-
-/*
- * Adobe-style YCCK->CMYK conversion.
- * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same
- * conversion as above, while passing K (black) unchanged.
- * We assume build_ycc_rgb_table has been called.
- */
-
-METHODDEF(void)
-ycck_cmyk_convert (j_decompress_ptr cinfo,
-		   JSAMPIMAGE input_buf, JDIMENSION input_row,
-		   JSAMPARRAY output_buf, int num_rows)
-{
-  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int y, cb, cr;
-  register JSAMPROW outptr;
-  register JSAMPROW inptr0, inptr1, inptr2, inptr3;
-  register JDIMENSION col;
-  JDIMENSION num_cols = cinfo->output_width;
-  /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  register int * Crrtab = cconvert->Cr_r_tab;
-  register int * Cbbtab = cconvert->Cb_b_tab;
-  register INT32 * Crgtab = cconvert->Cr_g_tab;
-  register INT32 * Cbgtab = cconvert->Cb_g_tab;
-  SHIFT_TEMPS
-
-  while (--num_rows >= 0) {
-    inptr0 = input_buf[0][input_row];
-    inptr1 = input_buf[1][input_row];
-    inptr2 = input_buf[2][input_row];
-    inptr3 = input_buf[3][input_row];
-    input_row++;
-    outptr = *output_buf++;
-    for (col = 0; col < num_cols; col++) {
-      y  = GETJSAMPLE(inptr0[col]);
-      cb = GETJSAMPLE(inptr1[col]);
-      cr = GETJSAMPLE(inptr2[col]);
-      /* Range-limiting is essential due to noise introduced by DCT losses. */
-      outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])];	/* red */
-      outptr[1] = range_limit[MAXJSAMPLE - (y +			/* green */
-			      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
-						 SCALEBITS)))];
-      outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])];	/* blue */
-      /* K passes through unchanged */
-      outptr[3] = inptr3[col];	/* don't need GETJSAMPLE here */
-      outptr += 4;
-    }
-  }
-}
-
-
-/*
- * Empty method for start_pass.
- */
-
-METHODDEF(void)
-start_pass_dcolor (j_decompress_ptr cinfo)
-{
-  /* no work needed */
-}
-
-
-/*
- * Module initialization routine for output colorspace conversion.
- */
-
-GLOBAL(void)
-jinit_color_deconverter (j_decompress_ptr cinfo)
-{
-  my_cconvert_ptr cconvert;
-  int ci;
-
-  cconvert = (my_cconvert_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_color_deconverter));
-  cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert;
-  cconvert->pub.start_pass = start_pass_dcolor;
-
-  /* Make sure num_components agrees with jpeg_color_space */
-  switch (cinfo->jpeg_color_space) {
-  case JCS_GRAYSCALE:
-    if (cinfo->num_components != 1)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    break;
-
-  case JCS_RGB:
-  case JCS_YCbCr:
-    if (cinfo->num_components != 3)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    break;
-
-  case JCS_CMYK:
-  case JCS_YCCK:
-    if (cinfo->num_components != 4)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    break;
-
-  default:			/* JCS_UNKNOWN can be anything */
-    if (cinfo->num_components < 1)
-      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
-    break;
-  }
-
-  /* Set out_color_components and conversion method based on requested space.
-   * Also clear the component_needed flags for any unused components,
-   * so that earlier pipeline stages can avoid useless computation.
-   */
-
-  switch (cinfo->out_color_space) {
-  case JCS_GRAYSCALE:
-    cinfo->out_color_components = 1;
-    if (cinfo->jpeg_color_space == JCS_GRAYSCALE ||
-	cinfo->jpeg_color_space == JCS_YCbCr) {
-      cconvert->pub.color_convert = grayscale_convert;
-      /* For color->grayscale conversion, only the Y (0) component is needed */
-      for (ci = 1; ci < cinfo->num_components; ci++)
-	cinfo->comp_info[ci].component_needed = FALSE;
-    } else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_RGB:
-    cinfo->out_color_components = RGB_PIXELSIZE;
-    if (cinfo->jpeg_color_space == JCS_YCbCr) {
-      cconvert->pub.color_convert = ycc_rgb_convert;
-      build_ycc_rgb_table(cinfo);
-    } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {
-      cconvert->pub.color_convert = gray_rgb_convert;
-    } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) {
-      cconvert->pub.color_convert = null_convert;
-    } else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  case JCS_CMYK:
-    cinfo->out_color_components = 4;
-    if (cinfo->jpeg_color_space == JCS_YCCK) {
-      cconvert->pub.color_convert = ycck_cmyk_convert;
-      build_ycc_rgb_table(cinfo);
-    } else if (cinfo->jpeg_color_space == JCS_CMYK) {
-      cconvert->pub.color_convert = null_convert;
-    } else
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-
-  default:
-    /* Permit null conversion to same output space */
-    if (cinfo->out_color_space == cinfo->jpeg_color_space) {
-      cinfo->out_color_components = cinfo->num_components;
-      cconvert->pub.color_convert = null_convert;
-    } else			/* unsupported non-null conversion */
-      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
-    break;
-  }
-
-  if (cinfo->quantize_colors)
-    cinfo->output_components = 1; /* single colormapped output component */
-  else
-    cinfo->output_components = cinfo->out_color_components;
-}
diff --git a/tkimg1.3/libjpeg/jdct.h b/tkimg1.3/libjpeg/jdct.h
deleted file mode 100644
index 04192a2..0000000
--- a/tkimg1.3/libjpeg/jdct.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * jdct.h
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This include file contains common declarations for the forward and
- * inverse DCT modules.  These declarations are private to the DCT managers
- * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
- * The individual DCT algorithms are kept in separate files to ease 
- * machine-dependent tuning (e.g., assembly coding).
- */
-
-
-/*
- * A forward DCT routine is given a pointer to a work area of type DCTELEM[];
- * the DCT is to be performed in-place in that buffer.  Type DCTELEM is int
- * for 8-bit samples, INT32 for 12-bit samples.  (NOTE: Floating-point DCT
- * implementations use an array of type FAST_FLOAT, instead.)
- * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).
- * The DCT outputs are returned scaled up by a factor of 8; they therefore
- * have a range of +-8K for 8-bit data, +-128K for 12-bit data.  This
- * convention improves accuracy in integer implementations and saves some
- * work in floating-point ones.
- * Quantization of the output coefficients is done by jcdctmgr.c.
- */
-
-#if BITS_IN_JSAMPLE == 8
-typedef int DCTELEM;		/* 16 or 32 bits is fine */
-#else
-typedef INT32 DCTELEM;		/* must have 32 bits */
-#endif
-
-typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
-typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
-
-
-/*
- * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
- * to an output sample array.  The routine must dequantize the input data as
- * well as perform the IDCT; for dequantization, it uses the multiplier table
- * pointed to by compptr->dct_table.  The output data is to be placed into the
- * sample array starting at a specified column.  (Any row offset needed will
- * be applied to the array pointer before it is passed to the IDCT code.)
- * Note that the number of samples emitted by the IDCT routine is
- * DCT_scaled_size * DCT_scaled_size.
- */
-
-/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
-
-/*
- * Each IDCT routine has its own ideas about the best dct_table element type.
- */
-
-typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
-#if BITS_IN_JSAMPLE == 8
-typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
-#define IFAST_SCALE_BITS  2	/* fractional bits in scale factors */
-#else
-typedef INT32 IFAST_MULT_TYPE;	/* need 32 bits for scaled quantizers */
-#define IFAST_SCALE_BITS  13	/* fractional bits in scale factors */
-#endif
-typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
-
-
-/*
- * Each IDCT routine is responsible for range-limiting its results and
- * converting them to unsigned form (0..MAXJSAMPLE).  The raw outputs could
- * be quite far out of range if the input data is corrupt, so a bulletproof
- * range-limiting step is required.  We use a mask-and-table-lookup method
- * to do the combined operations quickly.  See the comments with
- * prepare_range_limit_table (in jdmaster.c) for more info.
- */
-
-#define IDCT_range_limit(cinfo)  ((cinfo)->sample_range_limit + CENTERJSAMPLE)
-
-#define RANGE_MASK  (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
-
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_fdct_islow		jFDislow
-#define jpeg_fdct_ifast		jFDifast
-#define jpeg_fdct_float		jFDfloat
-#define jpeg_idct_islow		jRDislow
-#define jpeg_idct_ifast		jRDifast
-#define jpeg_idct_float		jRDfloat
-#define jpeg_idct_4x4		jRD4x4
-#define jpeg_idct_2x2		jRD2x2
-#define jpeg_idct_1x1		jRD1x1
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Extern declarations for the forward and inverse DCT routines. */
-
-EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));
-
-EXTERN(void) jpeg_idct_islow
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_ifast
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_float
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x4
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x2
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_1x1
-    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-
-
-/*
- * Macros for handling fixed-point arithmetic; these are used by many
- * but not all of the DCT/IDCT modules.
- *
- * All values are expected to be of type INT32.
- * Fractional constants are scaled left by CONST_BITS bits.
- * CONST_BITS is defined within each module using these macros,
- * and may differ from one module to the next.
- */
-
-#define ONE	((INT32) 1)
-#define CONST_SCALE (ONE << CONST_BITS)
-
-/* Convert a positive real constant to an integer scaled by CONST_SCALE.
- * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
- * thus causing a lot of useless floating-point operations at run time.
- */
-
-#define FIX(x)	((INT32) ((x) * CONST_SCALE + 0.5))
-
-/* Descale and correctly round an INT32 value that's scaled by N bits.
- * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
- * the fudge factor is correct for either sign of X.
- */
-
-#define DESCALE(x,n)  RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * This macro is used only when the two inputs will actually be no more than
- * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
- * full 32x32 multiply.  This provides a useful speedup on many machines.
- * Unfortunately there is no way to specify a 16x16->32 multiply portably
- * in C, but some C compilers will do the right thing if you provide the
- * correct combination of casts.
- */
-
-#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
-#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT16) (const)))
-#endif
-#ifdef SHORTxLCONST_32		/* known to work with Microsoft C 6.0 */
-#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT32) (const)))
-#endif
-
-#ifndef MULTIPLY16C16		/* default definition */
-#define MULTIPLY16C16(var,const)  ((var) * (const))
-#endif
-
-/* Same except both inputs are variables. */
-
-#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
-#define MULTIPLY16V16(var1,var2)  (((INT16) (var1)) * ((INT16) (var2)))
-#endif
-
-#ifndef MULTIPLY16V16		/* default definition */
-#define MULTIPLY16V16(var1,var2)  ((var1) * (var2))
-#endif
diff --git a/tkimg1.3/libjpeg/jddctmgr.c b/tkimg1.3/libjpeg/jddctmgr.c
deleted file mode 100644
index bbf8d0e..0000000
--- a/tkimg1.3/libjpeg/jddctmgr.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * jddctmgr.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the inverse-DCT management logic.
- * This code selects a particular IDCT implementation to be used,
- * and it performs related housekeeping chores.  No code in this file
- * is executed per IDCT step, only during output pass setup.
- *
- * Note that the IDCT routines are responsible for performing coefficient
- * dequantization as well as the IDCT proper.  This module sets up the
- * dequantization multiplier table needed by the IDCT routine.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-
-/*
- * The decompressor input side (jdinput.c) saves away the appropriate
- * quantization table for each component at the start of the first scan
- * involving that component.  (This is necessary in order to correctly
- * decode files that reuse Q-table slots.)
- * When we are ready to make an output pass, the saved Q-table is converted
- * to a multiplier table that will actually be used by the IDCT routine.
- * The multiplier table contents are IDCT-method-dependent.  To support
- * application changes in IDCT method between scans, we can remake the
- * multiplier tables if necessary.
- * In buffered-image mode, the first output pass may occur before any data
- * has been seen for some components, and thus before their Q-tables have
- * been saved away.  To handle this case, multiplier tables are preset
- * to zeroes; the result of the IDCT will be a neutral gray level.
- */
-
-
-/* Private subobject for this module */
-
-typedef struct {
-  struct jpeg_inverse_dct pub;	/* public fields */
-
-  /* This array contains the IDCT method code that each multiplier table
-   * is currently set up for, or -1 if it's not yet set up.
-   * The actual multiplier tables are pointed to by dct_table in the
-   * per-component comp_info structures.
-   */
-  int cur_method[MAX_COMPONENTS];
-} my_idct_controller;
-
-typedef my_idct_controller * my_idct_ptr;
-
-
-/* Allocated multiplier tables: big enough for any supported variant */
-
-typedef union {
-  ISLOW_MULT_TYPE islow_array[DCTSIZE2];
-#ifdef DCT_IFAST_SUPPORTED
-  IFAST_MULT_TYPE ifast_array[DCTSIZE2];
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-  FLOAT_MULT_TYPE float_array[DCTSIZE2];
-#endif
-} multiplier_table;
-
-
-/* The current scaled-IDCT routines require ISLOW-style multiplier tables,
- * so be sure to compile that code if either ISLOW or SCALING is requested.
- */
-#ifdef DCT_ISLOW_SUPPORTED
-#define PROVIDE_ISLOW_TABLES
-#else
-#ifdef IDCT_SCALING_SUPPORTED
-#define PROVIDE_ISLOW_TABLES
-#endif
-#endif
-
-
-/*
- * Prepare for an output pass.
- * Here we select the proper IDCT routine for each component and build
- * a matching multiplier table.
- */
-
-METHODDEF(void)
-start_pass (j_decompress_ptr cinfo)
-{
-  my_idct_ptr idct = (my_idct_ptr) cinfo->idct;
-  int ci, i;
-  jpeg_component_info *compptr;
-  int method = 0;
-  inverse_DCT_method_ptr method_ptr = NULL;
-  JQUANT_TBL * qtbl;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Select the proper IDCT routine for this component's scaling */
-    switch (compptr->DCT_scaled_size) {
-#ifdef IDCT_SCALING_SUPPORTED
-    case 1:
-      method_ptr = jpeg_idct_1x1;
-      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
-      break;
-    case 2:
-      method_ptr = jpeg_idct_2x2;
-      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
-      break;
-    case 4:
-      method_ptr = jpeg_idct_4x4;
-      method = JDCT_ISLOW;	/* jidctred uses islow-style table */
-      break;
-#endif
-    case DCTSIZE:
-      switch (cinfo->dct_method) {
-#ifdef DCT_ISLOW_SUPPORTED
-      case JDCT_ISLOW:
-	method_ptr = jpeg_idct_islow;
-	method = JDCT_ISLOW;
-	break;
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-      case JDCT_IFAST:
-	method_ptr = jpeg_idct_ifast;
-	method = JDCT_IFAST;
-	break;
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-      case JDCT_FLOAT:
-	method_ptr = jpeg_idct_float;
-	method = JDCT_FLOAT;
-	break;
-#endif
-      default:
-	ERREXIT(cinfo, JERR_NOT_COMPILED);
-	break;
-      }
-      break;
-    default:
-      ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size);
-      break;
-    }
-    idct->pub.inverse_DCT[ci] = method_ptr;
-    /* Create multiplier table from quant table.
-     * However, we can skip this if the component is uninteresting
-     * or if we already built the table.  Also, if no quant table
-     * has yet been saved for the component, we leave the
-     * multiplier table all-zero; we'll be reading zeroes from the
-     * coefficient controller's buffer anyway.
-     */
-    if (! compptr->component_needed || idct->cur_method[ci] == method)
-      continue;
-    qtbl = compptr->quant_table;
-    if (qtbl == NULL)		/* happens if no data yet for component */
-      continue;
-    idct->cur_method[ci] = method;
-    switch (method) {
-#ifdef PROVIDE_ISLOW_TABLES
-    case JDCT_ISLOW:
-      {
-	/* For LL&M IDCT method, multipliers are equal to raw quantization
-	 * coefficients, but are stored as ints to ensure access efficiency.
-	 */
-	ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table;
-	for (i = 0; i < DCTSIZE2; i++) {
-	  ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i];
-	}
-      }
-      break;
-#endif
-#ifdef DCT_IFAST_SUPPORTED
-    case JDCT_IFAST:
-      {
-	/* For AA&N IDCT method, multipliers are equal to quantization
-	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
-	 *   scalefactor[0] = 1
-	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
-	 * For integer operation, the multiplier table is to be scaled by
-	 * IFAST_SCALE_BITS.
-	 */
-	IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table;
-#define CONST_BITS 14
-	static const INT16 aanscales[DCTSIZE2] = {
-	  /* precomputed values scaled up by 14 bits */
-	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
-	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
-	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
-	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
-	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
-	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
-	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
-	};
-	SHIFT_TEMPS
-
-	for (i = 0; i < DCTSIZE2; i++) {
-	  ifmtbl[i] = (IFAST_MULT_TYPE)
-	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
-				  (INT32) aanscales[i]),
-		    CONST_BITS-IFAST_SCALE_BITS);
-	}
-      }
-      break;
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
-    case JDCT_FLOAT:
-      {
-	/* For float AA&N IDCT method, multipliers are equal to quantization
-	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
-	 *   scalefactor[0] = 1
-	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
-	 */
-	FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table;
-	int row, col;
-	static const double aanscalefactor[DCTSIZE] = {
-	  1.0, 1.387039845, 1.306562965, 1.175875602,
-	  1.0, 0.785694958, 0.541196100, 0.275899379
-	};
-
-	i = 0;
-	for (row = 0; row < DCTSIZE; row++) {
-	  for (col = 0; col < DCTSIZE; col++) {
-	    fmtbl[i] = (FLOAT_MULT_TYPE)
-	      ((double) qtbl->quantval[i] *
-	       aanscalefactor[row] * aanscalefactor[col]);
-	    i++;
-	  }
-	}
-      }
-      break;
-#endif
-    default:
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-      break;
-    }
-  }
-}
-
-
-/*
- * Initialize IDCT manager.
- */
-
-GLOBAL(void)
-jinit_inverse_dct (j_decompress_ptr cinfo)
-{
-  my_idct_ptr idct;
-  int ci;
-  jpeg_component_info *compptr;
-
-  idct = (my_idct_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_idct_controller));
-  cinfo->idct = (struct jpeg_inverse_dct *) idct;
-  idct->pub.start_pass = start_pass;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Allocate and pre-zero a multiplier table for each component */
-    compptr->dct_table =
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(multiplier_table));
-    MEMZERO(compptr->dct_table, SIZEOF(multiplier_table));
-    /* Mark multiplier table not yet set up for any method */
-    idct->cur_method[ci] = -1;
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdhuff.c b/tkimg1.3/libjpeg/jdhuff.c
deleted file mode 100644
index b5ba39f..0000000
--- a/tkimg1.3/libjpeg/jdhuff.c
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * jdhuff.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy decoding routines.
- *
- * Much of the complexity here has to do with supporting input suspension.
- * If the data source module demands suspension, we want to be able to back
- * up to the start of the current MCU.  To do this, we copy state variables
- * into local working storage, and update them back to the permanent
- * storage only upon successful completion of an MCU.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdhuff.h"		/* Declarations shared with jdphuff.c */
-
-
-/*
- * Expanded entropy decoder object for Huffman decoding.
- *
- * The savable_state subrecord contains fields that change within an MCU,
- * but must not be updated permanently until we complete the MCU.
- */
-
-typedef struct {
-  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
-} savable_state;
-
-/* This macro is to work around compilers with missing or broken
- * structure assignment.  You'll need to fix this code if you have
- * such a compiler and you change MAX_COMPS_IN_SCAN.
- */
-
-#ifndef NO_STRUCT_ASSIGN
-#define ASSIGN_STATE(dest,src)  ((dest) = (src))
-#else
-#if MAX_COMPS_IN_SCAN == 4
-#define ASSIGN_STATE(dest,src)  \
-	((dest).last_dc_val[0] = (src).last_dc_val[0], \
-	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
-	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
-	 (dest).last_dc_val[3] = (src).last_dc_val[3])
-#endif
-#endif
-
-
-typedef struct {
-  struct jpeg_entropy_decoder pub; /* public fields */
-
-  /* These fields are loaded into local variables at start of each MCU.
-   * In case of suspension, we exit WITHOUT updating them.
-   */
-  bitread_perm_state bitstate;	/* Bit buffer at start of MCU */
-  savable_state saved;		/* Other state at start of MCU */
-
-  /* These fields are NOT loaded into local working state. */
-  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
-
-  /* Pointers to derived tables (these workspaces have image lifespan) */
-  d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
-  d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
-
-  /* Precalculated info set up by start_pass for use in decode_mcu: */
-
-  /* Pointers to derived tables to be used for each block within an MCU */
-  d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
-  d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
-  /* Whether we care about the DC and AC coefficient values for each block */
-  boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
-  boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
-} huff_entropy_decoder;
-
-typedef huff_entropy_decoder * huff_entropy_ptr;
-
-
-/*
- * Initialize for a Huffman-compressed scan.
- */
-
-METHODDEF(void)
-start_pass_huff_decoder (j_decompress_ptr cinfo)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int ci, blkn, dctbl, actbl;
-  jpeg_component_info * compptr;
-
-  /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.
-   * This ought to be an error condition, but we make it a warning because
-   * there are some baseline files out there with all zeroes in these bytes.
-   */
-  if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 ||
-      cinfo->Ah != 0 || cinfo->Al != 0)
-    WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    dctbl = compptr->dc_tbl_no;
-    actbl = compptr->ac_tbl_no;
-    /* Compute derived values for Huffman tables */
-    /* We may do this more than once for a table, but it's not expensive */
-    jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl,
-			    & entropy->dc_derived_tbls[dctbl]);
-    jpeg_make_d_derived_tbl(cinfo, FALSE, actbl,
-			    & entropy->ac_derived_tbls[actbl]);
-    /* Initialize DC predictions to 0 */
-    entropy->saved.last_dc_val[ci] = 0;
-  }
-
-  /* Precalculate decoding info for each block in an MCU of this scan */
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    ci = cinfo->MCU_membership[blkn];
-    compptr = cinfo->cur_comp_info[ci];
-    /* Precalculate which table to use for each block */
-    entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
-    entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
-    /* Decide whether we really care about the coefficient values */
-    if (compptr->component_needed) {
-      entropy->dc_needed[blkn] = TRUE;
-      /* we don't need the ACs if producing a 1/8th-size image */
-      entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1);
-    } else {
-      entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE;
-    }
-  }
-
-  /* Initialize bitread state variables */
-  entropy->bitstate.bits_left = 0;
-  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
-  entropy->pub.insufficient_data = FALSE;
-
-  /* Initialize restart counter */
-  entropy->restarts_to_go = cinfo->restart_interval;
-}
-
-
-/*
- * Compute the derived values for a Huffman table.
- * This routine also performs some validation checks on the table.
- *
- * Note this is also used by jdphuff.c.
- */
-
-GLOBAL(void)
-jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
-			 d_derived_tbl ** pdtbl)
-{
-  JHUFF_TBL *htbl;
-  d_derived_tbl *dtbl;
-  int p, i, l, si, numsymbols;
-  int lookbits, ctr;
-  char huffsize[257];
-  unsigned int huffcode[257];
-  unsigned int code;
-
-  /* Note that huffsize[] and huffcode[] are filled in code-length order,
-   * paralleling the order of the symbols themselves in htbl->huffval[].
-   */
-
-  /* Find the input Huffman table */
-  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)
-    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
-  htbl =
-    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];
-  if (htbl == NULL)
-    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);
-
-  /* Allocate a workspace if we haven't already done so. */
-  if (*pdtbl == NULL)
-    *pdtbl = (d_derived_tbl *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(d_derived_tbl));
-  dtbl = *pdtbl;
-  dtbl->pub = htbl;		/* fill in back link */
-  
-  /* Figure C.1: make table of Huffman code length for each symbol */
-
-  p = 0;
-  for (l = 1; l <= 16; l++) {
-    i = (int) htbl->bits[l];
-    if (i < 0 || p + i > 256)	/* protect against table overrun */
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    while (i--)
-      huffsize[p++] = (char) l;
-  }
-  huffsize[p] = 0;
-  numsymbols = p;
-  
-  /* Figure C.2: generate the codes themselves */
-  /* We also validate that the counts represent a legal Huffman code tree. */
-  
-  code = 0;
-  si = huffsize[0];
-  p = 0;
-  while (huffsize[p]) {
-    while (((int) huffsize[p]) == si) {
-      huffcode[p++] = code;
-      code++;
-    }
-    /* code is now 1 more than the last code used for codelength si; but
-     * it must still fit in si bits, since no code is allowed to be all ones.
-     */
-    if (((INT32) code) >= (((INT32) 1) << si))
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    code <<= 1;
-    si++;
-  }
-
-  /* Figure F.15: generate decoding tables for bit-sequential decoding */
-
-  p = 0;
-  for (l = 1; l <= 16; l++) {
-    if (htbl->bits[l]) {
-      /* valoffset[l] = huffval[] index of 1st symbol of code length l,
-       * minus the minimum code of length l
-       */
-      dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p];
-      p += htbl->bits[l];
-      dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */
-    } else {
-      dtbl->maxcode[l] = -1;	/* -1 if no codes of this length */
-    }
-  }
-  dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */
-
-  /* Compute lookahead tables to speed up decoding.
-   * First we set all the table entries to 0, indicating "too long";
-   * then we iterate through the Huffman codes that are short enough and
-   * fill in all the entries that correspond to bit sequences starting
-   * with that code.
-   */
-
-  MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits));
-
-  p = 0;
-  for (l = 1; l <= HUFF_LOOKAHEAD; l++) {
-    for (i = 1; i <= (int) htbl->bits[l]; i++, p++) {
-      /* l = current code's length, p = its index in huffcode[] & huffval[]. */
-      /* Generate left-justified code followed by all possible bit sequences */
-      lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l);
-      for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) {
-	dtbl->look_nbits[lookbits] = l;
-	dtbl->look_sym[lookbits] = htbl->huffval[p];
-	lookbits++;
-      }
-    }
-  }
-
-  /* Validate symbols as being reasonable.
-   * For AC tables, we make no check, but accept all byte values 0..255.
-   * For DC tables, we require the symbols to be in range 0..15.
-   * (Tighter bounds could be applied depending on the data depth and mode,
-   * but this is sufficient to ensure safe decoding.)
-   */
-  if (isDC) {
-    for (i = 0; i < numsymbols; i++) {
-      int sym = htbl->huffval[i];
-      if (sym < 0 || sym > 15)
-	ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-    }
-  }
-}
-
-
-/*
- * Out-of-line code for bit fetching (shared with jdphuff.c).
- * See jdhuff.h for info about usage.
- * Note: current values of get_buffer and bits_left are passed as parameters,
- * but are returned in the corresponding fields of the state struct.
- *
- * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width
- * of get_buffer to be used.  (On machines with wider words, an even larger
- * buffer could be used.)  However, on some machines 32-bit shifts are
- * quite slow and take time proportional to the number of places shifted.
- * (This is true with most PC compilers, for instance.)  In this case it may
- * be a win to set MIN_GET_BITS to the minimum value of 15.  This reduces the
- * average shift distance at the cost of more calls to jpeg_fill_bit_buffer.
- */
-
-#ifdef SLOW_SHIFT_32
-#define MIN_GET_BITS  15	/* minimum allowable value */
-#else
-#define MIN_GET_BITS  (BIT_BUF_SIZE-7)
-#endif
-
-
-GLOBAL(boolean)
-jpeg_fill_bit_buffer (bitread_working_state * state,
-		      register bit_buf_type get_buffer, register int bits_left,
-		      int nbits)
-/* Load up the bit buffer to a depth of at least nbits */
-{
-  /* Copy heavily used state fields into locals (hopefully registers) */
-  register const JOCTET * next_input_byte = state->next_input_byte;
-  register size_t bytes_in_buffer = state->bytes_in_buffer;
-  j_decompress_ptr cinfo = state->cinfo;
-
-  /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
-  /* (It is assumed that no request will be for more than that many bits.) */
-  /* We fail to do so only if we hit a marker or are forced to suspend. */
-
-  if (cinfo->unread_marker == 0) {	/* cannot advance past a marker */
-    while (bits_left < MIN_GET_BITS) {
-      register int c;
-
-      /* Attempt to read a byte */
-      if (bytes_in_buffer == 0) {
-	if (! (*cinfo->src->fill_input_buffer) (cinfo))
-	  return FALSE;
-	next_input_byte = cinfo->src->next_input_byte;
-	bytes_in_buffer = cinfo->src->bytes_in_buffer;
-      }
-      bytes_in_buffer--;
-      c = GETJOCTET(*next_input_byte++);
-
-      /* If it's 0xFF, check and discard stuffed zero byte */
-      if (c == 0xFF) {
-	/* Loop here to discard any padding FF's on terminating marker,
-	 * so that we can save a valid unread_marker value.  NOTE: we will
-	 * accept multiple FF's followed by a 0 as meaning a single FF data
-	 * byte.  This data pattern is not valid according to the standard.
-	 */
-	do {
-	  if (bytes_in_buffer == 0) {
-	    if (! (*cinfo->src->fill_input_buffer) (cinfo))
-	      return FALSE;
-	    next_input_byte = cinfo->src->next_input_byte;
-	    bytes_in_buffer = cinfo->src->bytes_in_buffer;
-	  }
-	  bytes_in_buffer--;
-	  c = GETJOCTET(*next_input_byte++);
-	} while (c == 0xFF);
-
-	if (c == 0) {
-	  /* Found FF/00, which represents an FF data byte */
-	  c = 0xFF;
-	} else {
-	  /* Oops, it's actually a marker indicating end of compressed data.
-	   * Save the marker code for later use.
-	   * Fine point: it might appear that we should save the marker into
-	   * bitread working state, not straight into permanent state.  But
-	   * once we have hit a marker, we cannot need to suspend within the
-	   * current MCU, because we will read no more bytes from the data
-	   * source.  So it is OK to update permanent state right away.
-	   */
-	  cinfo->unread_marker = c;
-	  /* See if we need to insert some fake zero bits. */
-	  goto no_more_bytes;
-	}
-      }
-
-      /* OK, load c into get_buffer */
-      get_buffer = (get_buffer << 8) | c;
-      bits_left += 8;
-    } /* end while */
-  } else {
-  no_more_bytes:
-    /* We get here if we've read the marker that terminates the compressed
-     * data segment.  There should be enough bits in the buffer register
-     * to satisfy the request; if so, no problem.
-     */
-    if (nbits > bits_left) {
-      /* Uh-oh.  Report corrupted data to user and stuff zeroes into
-       * the data stream, so that we can produce some kind of image.
-       * We use a nonvolatile flag to ensure that only one warning message
-       * appears per data segment.
-       */
-      if (! cinfo->entropy->insufficient_data) {
-	WARNMS(cinfo, JWRN_HIT_MARKER);
-	cinfo->entropy->insufficient_data = TRUE;
-      }
-      /* Fill the buffer with zero bits */
-      get_buffer <<= MIN_GET_BITS - bits_left;
-      bits_left = MIN_GET_BITS;
-    }
-  }
-
-  /* Unload the local registers */
-  state->next_input_byte = next_input_byte;
-  state->bytes_in_buffer = bytes_in_buffer;
-  state->get_buffer = get_buffer;
-  state->bits_left = bits_left;
-
-  return TRUE;
-}
-
-
-/*
- * Out-of-line code for Huffman code decoding.
- * See jdhuff.h for info about usage.
- */
-
-GLOBAL(int)
-jpeg_huff_decode (bitread_working_state * state,
-		  register bit_buf_type get_buffer, register int bits_left,
-		  d_derived_tbl * htbl, int min_bits)
-{
-  register int l = min_bits;
-  register INT32 code;
-
-  /* HUFF_DECODE has determined that the code is at least min_bits */
-  /* bits long, so fetch that many bits in one swoop. */
-
-  CHECK_BIT_BUFFER(*state, l, return -1);
-  code = GET_BITS(l);
-
-  /* Collect the rest of the Huffman code one bit at a time. */
-  /* This is per Figure F.16 in the JPEG spec. */
-
-  while (code > htbl->maxcode[l]) {
-    code <<= 1;
-    CHECK_BIT_BUFFER(*state, 1, return -1);
-    code |= GET_BITS(1);
-    l++;
-  }
-
-  /* Unload the local registers */
-  state->get_buffer = get_buffer;
-  state->bits_left = bits_left;
-
-  /* With garbage input we may reach the sentinel value l = 17. */
-
-  if (l > 16) {
-    WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE);
-    return 0;			/* fake a zero as the safest result */
-  }
-
-  return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];
-}
-
-
-/*
- * Figure F.12: extend sign bit.
- * On some machines, a shift and add will be faster than a table lookup.
- */
-
-#ifdef AVOID_TABLES
-
-#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
-
-#else
-
-#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
-
-static const int extend_test[16] =   /* entry n is 2**(n-1) */
-  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
-    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
-
-static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
-  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
-    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
-    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
-    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
-
-#endif /* AVOID_TABLES */
-
-
-/*
- * Check for a restart marker & resynchronize decoder.
- * Returns FALSE if must suspend.
- */
-
-LOCAL(boolean)
-process_restart (j_decompress_ptr cinfo)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int ci;
-
-  /* Throw away any unused bits remaining in bit buffer; */
-  /* include any full bytes in next_marker's count of discarded bytes */
-  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
-  entropy->bitstate.bits_left = 0;
-
-  /* Advance past the RSTn marker */
-  if (! (*cinfo->marker->read_restart_marker) (cinfo))
-    return FALSE;
-
-  /* Re-initialize DC predictions to 0 */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
-    entropy->saved.last_dc_val[ci] = 0;
-
-  /* Reset restart counter */
-  entropy->restarts_to_go = cinfo->restart_interval;
-
-  /* Reset out-of-data flag, unless read_restart_marker left us smack up
-   * against a marker.  In that case we will end up treating the next data
-   * segment as empty, and we can avoid producing bogus output pixels by
-   * leaving the flag set.
-   */
-  if (cinfo->unread_marker == 0)
-    entropy->pub.insufficient_data = FALSE;
-
-  return TRUE;
-}
-
-
-/*
- * Decode and return one MCU's worth of Huffman-compressed coefficients.
- * The coefficients are reordered from zigzag order into natural array order,
- * but are not dequantized.
- *
- * The i'th block of the MCU is stored into the block pointed to by
- * MCU_data[i].  WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER.
- * (Wholesale zeroing is usually a little faster than retail...)
- *
- * Returns FALSE if data source requested suspension.  In that case no
- * changes have been made to permanent state.  (Exception: some output
- * coefficients may already have been assigned.  This is harmless for
- * this module, since we'll just re-assign them on the next call.)
- */
-
-METHODDEF(boolean)
-decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
-  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  int blkn;
-  BITREAD_STATE_VARS;
-  savable_state state;
-
-  /* Process restart marker if needed; may have to suspend */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! process_restart(cinfo))
-	return FALSE;
-  }
-
-  /* If we've run out of data, just leave the MCU set to zeroes.
-   * This way, we return uniform gray for the remainder of the segment.
-   */
-  if (! entropy->pub.insufficient_data) {
-
-    /* Load up working state */
-    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-    ASSIGN_STATE(state, entropy->saved);
-
-    /* Outer loop handles each block in the MCU */
-
-    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-      JBLOCKROW block = MCU_data[blkn];
-      d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
-      d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
-      register int s, k, r;
-
-      /* Decode a single block's worth of coefficients */
-
-      /* Section F.2.2.1: decode the DC coefficient difference */
-      HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
-      if (s) {
-	CHECK_BIT_BUFFER(br_state, s, return FALSE);
-	r = GET_BITS(s);
-	s = HUFF_EXTEND(r, s);
-      }
-
-      if (entropy->dc_needed[blkn]) {
-	/* Convert DC difference to actual value, update last_dc_val */
-	int ci = cinfo->MCU_membership[blkn];
-	s += state.last_dc_val[ci];
-	state.last_dc_val[ci] = s;
-	/* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */
-	(*block)[0] = (JCOEF) s;
-      }
-
-      if (entropy->ac_needed[blkn]) {
-
-	/* Section F.2.2.2: decode the AC coefficients */
-	/* Since zeroes are skipped, output area must be cleared beforehand */
-	for (k = 1; k < DCTSIZE2; k++) {
-	  HUFF_DECODE(s, br_state, actbl, return FALSE, label2);
-      
-	  r = s >> 4;
-	  s &= 15;
-      
-	  if (s) {
-	    k += r;
-	    CHECK_BIT_BUFFER(br_state, s, return FALSE);
-	    r = GET_BITS(s);
-	    s = HUFF_EXTEND(r, s);
-	    /* Output coefficient in natural (dezigzagged) order.
-	     * Note: the extra entries in jpeg_natural_order[] will save us
-	     * if k >= DCTSIZE2, which could happen if the data is corrupted.
-	     */
-	    (*block)[jpeg_natural_order[k]] = (JCOEF) s;
-	  } else {
-	    if (r != 15)
-	      break;
-	    k += 15;
-	  }
-	}
-
-      } else {
-
-	/* Section F.2.2.2: decode the AC coefficients */
-	/* In this path we just discard the values */
-	for (k = 1; k < DCTSIZE2; k++) {
-	  HUFF_DECODE(s, br_state, actbl, return FALSE, label3);
-      
-	  r = s >> 4;
-	  s &= 15;
-      
-	  if (s) {
-	    k += r;
-	    CHECK_BIT_BUFFER(br_state, s, return FALSE);
-	    DROP_BITS(s);
-	  } else {
-	    if (r != 15)
-	      break;
-	    k += 15;
-	  }
-	}
-
-      }
-    }
-
-    /* Completed MCU, so update state */
-    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-    ASSIGN_STATE(entropy->saved, state);
-  }
-
-  /* Account for restart interval (no-op if not using restarts) */
-  entropy->restarts_to_go--;
-
-  return TRUE;
-}
-
-
-/*
- * Module initialization routine for Huffman entropy decoding.
- */
-
-GLOBAL(void)
-jinit_huff_decoder (j_decompress_ptr cinfo)
-{
-  huff_entropy_ptr entropy;
-  int i;
-
-  entropy = (huff_entropy_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(huff_entropy_decoder));
-  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
-  entropy->pub.start_pass = start_pass_huff_decoder;
-  entropy->pub.decode_mcu = decode_mcu;
-
-  /* Mark tables unallocated */
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdhuff.h b/tkimg1.3/libjpeg/jdhuff.h
deleted file mode 100644
index ae19b6c..0000000
--- a/tkimg1.3/libjpeg/jdhuff.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * jdhuff.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for Huffman entropy decoding routines
- * that are shared between the sequential decoder (jdhuff.c) and the
- * progressive decoder (jdphuff.c).  No other modules need to see these.
- */
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_make_d_derived_tbl	jMkDDerived
-#define jpeg_fill_bit_buffer	jFilBitBuf
-#define jpeg_huff_decode	jHufDecode
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/* Derived data constructed for each Huffman table */
-
-#define HUFF_LOOKAHEAD	8	/* # of bits of lookahead */
-
-typedef struct {
-  /* Basic tables: (element [0] of each array is unused) */
-  INT32 maxcode[18];		/* largest code of length k (-1 if none) */
-  /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
-  INT32 valoffset[17];		/* huffval[] offset for codes of length k */
-  /* valoffset[k] = huffval[] index of 1st symbol of code length k, less
-   * the smallest code of length k; so given a code of length k, the
-   * corresponding symbol is huffval[code + valoffset[k]]
-   */
-
-  /* Link to public Huffman table (needed only in jpeg_huff_decode) */
-  JHUFF_TBL *pub;
-
-  /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
-   * the input data stream.  If the next Huffman code is no more
-   * than HUFF_LOOKAHEAD bits long, we can obtain its length and
-   * the corresponding symbol directly from these tables.
-   */
-  int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
-  UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
-} d_derived_tbl;
-
-/* Expand a Huffman table definition into the derived format */
-EXTERN(void) jpeg_make_d_derived_tbl
-	JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
-	     d_derived_tbl ** pdtbl));
-
-
-/*
- * Fetching the next N bits from the input stream is a time-critical operation
- * for the Huffman decoders.  We implement it with a combination of inline
- * macros and out-of-line subroutines.  Note that N (the number of bits
- * demanded at one time) never exceeds 15 for JPEG use.
- *
- * We read source bytes into get_buffer and dole out bits as needed.
- * If get_buffer already contains enough bits, they are fetched in-line
- * by the macros CHECK_BIT_BUFFER and GET_BITS.  When there aren't enough
- * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
- * as full as possible (not just to the number of bits needed; this
- * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
- * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
- * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
- * at least the requested number of bits --- dummy zeroes are inserted if
- * necessary.
- */
-
-typedef INT32 bit_buf_type;	/* type of bit-extraction buffer */
-#define BIT_BUF_SIZE  32	/* size of buffer in bits */
-
-/* If long is > 32 bits on your machine, and shifting/masking longs is
- * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
- * appropriately should be a win.  Unfortunately we can't define the size
- * with something like  #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
- * because not all machines measure sizeof in 8-bit bytes.
- */
-
-typedef struct {		/* Bitreading state saved across MCUs */
-  bit_buf_type get_buffer;	/* current bit-extraction buffer */
-  int bits_left;		/* # of unused bits in it */
-} bitread_perm_state;
-
-typedef struct {		/* Bitreading working state within an MCU */
-  /* Current data source location */
-  /* We need a copy, rather than munging the original, in case of suspension */
-  const JOCTET * next_input_byte; /* => next byte to read from source */
-  size_t bytes_in_buffer;	/* # of bytes remaining in source buffer */
-  /* Bit input buffer --- note these values are kept in register variables,
-   * not in this struct, inside the inner loops.
-   */
-  bit_buf_type get_buffer;	/* current bit-extraction buffer */
-  int bits_left;		/* # of unused bits in it */
-  /* Pointer needed by jpeg_fill_bit_buffer. */
-  j_decompress_ptr cinfo;	/* back link to decompress master record */
-} bitread_working_state;
-
-/* Macros to declare and load/save bitread local variables. */
-#define BITREAD_STATE_VARS  \
-	register bit_buf_type get_buffer;  \
-	register int bits_left;  \
-	bitread_working_state br_state
-
-#define BITREAD_LOAD_STATE(cinfop,permstate)  \
-	br_state.cinfo = cinfop; \
-	br_state.next_input_byte = cinfop->src->next_input_byte; \
-	br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
-	get_buffer = permstate.get_buffer; \
-	bits_left = permstate.bits_left;
-
-#define BITREAD_SAVE_STATE(cinfop,permstate)  \
-	cinfop->src->next_input_byte = br_state.next_input_byte; \
-	cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
-	permstate.get_buffer = get_buffer; \
-	permstate.bits_left = bits_left
-
-/*
- * These macros provide the in-line portion of bit fetching.
- * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
- * before using GET_BITS, PEEK_BITS, or DROP_BITS.
- * The variables get_buffer and bits_left are assumed to be locals,
- * but the state struct might not be (jpeg_huff_decode needs this).
- *	CHECK_BIT_BUFFER(state,n,action);
- *		Ensure there are N bits in get_buffer; if suspend, take action.
- *      val = GET_BITS(n);
- *		Fetch next N bits.
- *      val = PEEK_BITS(n);
- *		Fetch next N bits without removing them from the buffer.
- *	DROP_BITS(n);
- *		Discard next N bits.
- * The value N should be a simple variable, not an expression, because it
- * is evaluated multiple times.
- */
-
-#define CHECK_BIT_BUFFER(state,nbits,action) \
-	{ if (bits_left < (nbits)) {  \
-	    if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits))  \
-	      { action; }  \
-	    get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
-
-#define GET_BITS(nbits) \
-	(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
-
-#define PEEK_BITS(nbits) \
-	(((int) (get_buffer >> (bits_left -  (nbits)))) & ((1<<(nbits))-1))
-
-#define DROP_BITS(nbits) \
-	(bits_left -= (nbits))
-
-/* Load up the bit buffer to a depth of at least nbits */
-EXTERN(boolean) jpeg_fill_bit_buffer
-	JPP((bitread_working_state * state, register bit_buf_type get_buffer,
-	     register int bits_left, int nbits));
-
-
-/*
- * Code for extracting next Huffman-coded symbol from input bit stream.
- * Again, this is time-critical and we make the main paths be macros.
- *
- * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
- * without looping.  Usually, more than 95% of the Huffman codes will be 8
- * or fewer bits long.  The few overlength codes are handled with a loop,
- * which need not be inline code.
- *
- * Notes about the HUFF_DECODE macro:
- * 1. Near the end of the data segment, we may fail to get enough bits
- *    for a lookahead.  In that case, we do it the hard way.
- * 2. If the lookahead table contains no entry, the next code must be
- *    more than HUFF_LOOKAHEAD bits long.
- * 3. jpeg_huff_decode returns -1 if forced to suspend.
- */
-
-#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
-{ register int nb, look; \
-  if (bits_left < HUFF_LOOKAHEAD) { \
-    if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
-    get_buffer = state.get_buffer; bits_left = state.bits_left; \
-    if (bits_left < HUFF_LOOKAHEAD) { \
-      nb = 1; goto slowlabel; \
-    } \
-  } \
-  look = PEEK_BITS(HUFF_LOOKAHEAD); \
-  if ((nb = htbl->look_nbits[look]) != 0) { \
-    DROP_BITS(nb); \
-    result = htbl->look_sym[look]; \
-  } else { \
-    nb = HUFF_LOOKAHEAD+1; \
-slowlabel: \
-    if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
-	{ failaction; } \
-    get_buffer = state.get_buffer; bits_left = state.bits_left; \
-  } \
-}
-
-/* Out-of-line case for Huffman code fetching */
-EXTERN(int) jpeg_huff_decode
-	JPP((bitread_working_state * state, register bit_buf_type get_buffer,
-	     register int bits_left, d_derived_tbl * htbl, int min_bits));
diff --git a/tkimg1.3/libjpeg/jdinput.c b/tkimg1.3/libjpeg/jdinput.c
deleted file mode 100644
index 0c2ac8f..0000000
--- a/tkimg1.3/libjpeg/jdinput.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * jdinput.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains input control logic for the JPEG decompressor.
- * These routines are concerned with controlling the decompressor's input
- * processing (marker reading and coefficient decoding).  The actual input
- * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private state */
-
-typedef struct {
-  struct jpeg_input_controller pub; /* public fields */
-
-  boolean inheaders;		/* TRUE until first SOS is reached */
-} my_input_controller;
-
-typedef my_input_controller * my_inputctl_ptr;
-
-
-/* Forward declarations */
-METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
-
-
-/*
- * Routines to calculate various quantities related to the size of the image.
- */
-
-LOCAL(void)
-initial_setup (j_decompress_ptr cinfo)
-/* Called once, when first SOS marker is reached */
-{
-  int ci;
-  jpeg_component_info *compptr;
-
-  /* Make sure image isn't bigger than I can handle */
-  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
-      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
-    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
-
-  /* For now, precision must match compiled-in value... */
-  if (cinfo->data_precision != BITS_IN_JSAMPLE)
-    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
-
-  /* Check that number of components won't exceed internal array sizes */
-  if (cinfo->num_components > MAX_COMPONENTS)
-    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
-	     MAX_COMPONENTS);
-
-  /* Compute maximum sampling factors; check factor validity */
-  cinfo->max_h_samp_factor = 1;
-  cinfo->max_v_samp_factor = 1;
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||
-	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)
-      ERREXIT(cinfo, JERR_BAD_SAMPLING);
-    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
-				   compptr->h_samp_factor);
-    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
-				   compptr->v_samp_factor);
-  }
-
-  /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE.
-   * In the full decompressor, this will be overridden by jdmaster.c;
-   * but in the transcoder, jdmaster.c is not used, so we must do it here.
-   */
-  cinfo->min_DCT_scaled_size = DCTSIZE;
-
-  /* Compute dimensions of components */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    compptr->DCT_scaled_size = DCTSIZE;
-    /* Size in DCT blocks */
-    compptr->width_in_blocks = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
-		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
-    compptr->height_in_blocks = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
-		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
-    /* downsampled_width and downsampled_height will also be overridden by
-     * jdmaster.c if we are doing full decompression.  The transcoder library
-     * doesn't use these values, but the calling application might.
-     */
-    /* Size in samples */
-    compptr->downsampled_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
-		    (long) cinfo->max_h_samp_factor);
-    compptr->downsampled_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
-		    (long) cinfo->max_v_samp_factor);
-    /* Mark component needed, until color conversion says otherwise */
-    compptr->component_needed = TRUE;
-    /* Mark no quantization table yet saved for component */
-    compptr->quant_table = NULL;
-  }
-
-  /* Compute number of fully interleaved MCU rows. */
-  cinfo->total_iMCU_rows = (JDIMENSION)
-    jdiv_round_up((long) cinfo->image_height,
-		  (long) (cinfo->max_v_samp_factor*DCTSIZE));
-
-  /* Decide whether file contains multiple scans */
-  if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)
-    cinfo->inputctl->has_multiple_scans = TRUE;
-  else
-    cinfo->inputctl->has_multiple_scans = FALSE;
-}
-
-
-LOCAL(void)
-per_scan_setup (j_decompress_ptr cinfo)
-/* Do computations that are needed before processing a JPEG scan */
-/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */
-{
-  int ci, mcublks, tmp;
-  jpeg_component_info *compptr;
-  
-  if (cinfo->comps_in_scan == 1) {
-    
-    /* Noninterleaved (single-component) scan */
-    compptr = cinfo->cur_comp_info[0];
-    
-    /* Overall image size in MCUs */
-    cinfo->MCUs_per_row = compptr->width_in_blocks;
-    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
-    
-    /* For noninterleaved scan, always one block per MCU */
-    compptr->MCU_width = 1;
-    compptr->MCU_height = 1;
-    compptr->MCU_blocks = 1;
-    compptr->MCU_sample_width = compptr->DCT_scaled_size;
-    compptr->last_col_width = 1;
-    /* For noninterleaved scans, it is convenient to define last_row_height
-     * as the number of block rows present in the last iMCU row.
-     */
-    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
-    if (tmp == 0) tmp = compptr->v_samp_factor;
-    compptr->last_row_height = tmp;
-    
-    /* Prepare array describing MCU composition */
-    cinfo->blocks_in_MCU = 1;
-    cinfo->MCU_membership[0] = 0;
-    
-  } else {
-    
-    /* Interleaved (multi-component) scan */
-    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
-      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
-	       MAX_COMPS_IN_SCAN);
-    
-    /* Overall image size in MCUs */
-    cinfo->MCUs_per_row = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width,
-		    (long) (cinfo->max_h_samp_factor*DCTSIZE));
-    cinfo->MCU_rows_in_scan = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height,
-		    (long) (cinfo->max_v_samp_factor*DCTSIZE));
-    
-    cinfo->blocks_in_MCU = 0;
-    
-    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-      compptr = cinfo->cur_comp_info[ci];
-      /* Sampling factors give # of blocks of component in each MCU */
-      compptr->MCU_width = compptr->h_samp_factor;
-      compptr->MCU_height = compptr->v_samp_factor;
-      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
-      compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size;
-      /* Figure number of non-dummy blocks in last MCU column & row */
-      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
-      if (tmp == 0) tmp = compptr->MCU_width;
-      compptr->last_col_width = tmp;
-      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);
-      if (tmp == 0) tmp = compptr->MCU_height;
-      compptr->last_row_height = tmp;
-      /* Prepare array describing MCU composition */
-      mcublks = compptr->MCU_blocks;
-      if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU)
-	ERREXIT(cinfo, JERR_BAD_MCU_SIZE);
-      while (mcublks-- > 0) {
-	cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
-      }
-    }
-    
-  }
-}
-
-
-/*
- * Save away a copy of the Q-table referenced by each component present
- * in the current scan, unless already saved during a prior scan.
- *
- * In a multiple-scan JPEG file, the encoder could assign different components
- * the same Q-table slot number, but change table definitions between scans
- * so that each component uses a different Q-table.  (The IJG encoder is not
- * currently capable of doing this, but other encoders might.)  Since we want
- * to be able to dequantize all the components at the end of the file, this
- * means that we have to save away the table actually used for each component.
- * We do this by copying the table at the start of the first scan containing
- * the component.
- * The JPEG spec prohibits the encoder from changing the contents of a Q-table
- * slot between scans of a component using that slot.  If the encoder does so
- * anyway, this decoder will simply use the Q-table values that were current
- * at the start of the first scan for the component.
- *
- * The decompressor output side looks only at the saved quant tables,
- * not at the current Q-table slots.
- */
-
-LOCAL(void)
-latch_quant_tables (j_decompress_ptr cinfo)
-{
-  int ci, qtblno;
-  jpeg_component_info *compptr;
-  JQUANT_TBL * qtbl;
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    /* No work if we already saved Q-table for this component */
-    if (compptr->quant_table != NULL)
-      continue;
-    /* Make sure specified quantization table is present */
-    qtblno = compptr->quant_tbl_no;
-    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
-	cinfo->quant_tbl_ptrs[qtblno] == NULL)
-      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
-    /* OK, save away the quantization table */
-    qtbl = (JQUANT_TBL *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(JQUANT_TBL));
-    MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL));
-    compptr->quant_table = qtbl;
-  }
-}
-
-
-/*
- * Initialize the input modules to read a scan of compressed data.
- * The first call to this is done by jdmaster.c after initializing
- * the entire decompressor (during jpeg_start_decompress).
- * Subsequent calls come from consume_markers, below.
- */
-
-METHODDEF(void)
-start_input_pass (j_decompress_ptr cinfo)
-{
-  per_scan_setup(cinfo);
-  latch_quant_tables(cinfo);
-  (*cinfo->entropy->start_pass) (cinfo);
-  (*cinfo->coef->start_input_pass) (cinfo);
-  cinfo->inputctl->consume_input = cinfo->coef->consume_data;
-}
-
-
-/*
- * Finish up after inputting a compressed-data scan.
- * This is called by the coefficient controller after it's read all
- * the expected data of the scan.
- */
-
-METHODDEF(void)
-finish_input_pass (j_decompress_ptr cinfo)
-{
-  cinfo->inputctl->consume_input = consume_markers;
-}
-
-
-/*
- * Read JPEG markers before, between, or after compressed-data scans.
- * Change state as necessary when a new scan is reached.
- * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
- *
- * The consume_input method pointer points either here or to the
- * coefficient controller's consume_data routine, depending on whether
- * we are reading a compressed data segment or inter-segment markers.
- */
-
-METHODDEF(int)
-consume_markers (j_decompress_ptr cinfo)
-{
-  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
-  int val;
-
-  if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */
-    return JPEG_REACHED_EOI;
-
-  val = (*cinfo->marker->read_markers) (cinfo);
-
-  switch (val) {
-  case JPEG_REACHED_SOS:	/* Found SOS */
-    if (inputctl->inheaders) {	/* 1st SOS */
-      initial_setup(cinfo);
-      inputctl->inheaders = FALSE;
-      /* Note: start_input_pass must be called by jdmaster.c
-       * before any more input can be consumed.  jdapimin.c is
-       * responsible for enforcing this sequencing.
-       */
-    } else {			/* 2nd or later SOS marker */
-      if (! inputctl->pub.has_multiple_scans)
-	ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */
-      start_input_pass(cinfo);
-    }
-    break;
-  case JPEG_REACHED_EOI:	/* Found EOI */
-    inputctl->pub.eoi_reached = TRUE;
-    if (inputctl->inheaders) {	/* Tables-only datastream, apparently */
-      if (cinfo->marker->saw_SOF)
-	ERREXIT(cinfo, JERR_SOF_NO_SOS);
-    } else {
-      /* Prevent infinite loop in coef ctlr's decompress_data routine
-       * if user set output_scan_number larger than number of scans.
-       */
-      if (cinfo->output_scan_number > cinfo->input_scan_number)
-	cinfo->output_scan_number = cinfo->input_scan_number;
-    }
-    break;
-  case JPEG_SUSPENDED:
-    break;
-  }
-
-  return val;
-}
-
-
-/*
- * Reset state to begin a fresh datastream.
- */
-
-METHODDEF(void)
-reset_input_controller (j_decompress_ptr cinfo)
-{
-  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
-
-  inputctl->pub.consume_input = consume_markers;
-  inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
-  inputctl->pub.eoi_reached = FALSE;
-  inputctl->inheaders = TRUE;
-  /* Reset other modules */
-  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
-  (*cinfo->marker->reset_marker_reader) (cinfo);
-  /* Reset progression state -- would be cleaner if entropy decoder did this */
-  cinfo->coef_bits = NULL;
-}
-
-
-/*
- * Initialize the input controller module.
- * This is called only once, when the decompression object is created.
- */
-
-GLOBAL(void)
-jinit_input_controller (j_decompress_ptr cinfo)
-{
-  my_inputctl_ptr inputctl;
-
-  /* Create subobject in permanent pool */
-  inputctl = (my_inputctl_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				SIZEOF(my_input_controller));
-  cinfo->inputctl = (struct jpeg_input_controller *) inputctl;
-  /* Initialize method pointers */
-  inputctl->pub.consume_input = consume_markers;
-  inputctl->pub.reset_input_controller = reset_input_controller;
-  inputctl->pub.start_input_pass = start_input_pass;
-  inputctl->pub.finish_input_pass = finish_input_pass;
-  /* Initialize state: can't use reset_input_controller since we don't
-   * want to try to reset other modules yet.
-   */
-  inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
-  inputctl->pub.eoi_reached = FALSE;
-  inputctl->inheaders = TRUE;
-}
diff --git a/tkimg1.3/libjpeg/jdmainct.c b/tkimg1.3/libjpeg/jdmainct.c
deleted file mode 100644
index 13c956f..0000000
--- a/tkimg1.3/libjpeg/jdmainct.c
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * jdmainct.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the main buffer controller for decompression.
- * The main buffer lies between the JPEG decompressor proper and the
- * post-processor; it holds downsampled data in the JPEG colorspace.
- *
- * Note that this code is bypassed in raw-data mode, since the application
- * supplies the equivalent of the main buffer in that case.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * In the current system design, the main buffer need never be a full-image
- * buffer; any full-height buffers will be found inside the coefficient or
- * postprocessing controllers.  Nonetheless, the main controller is not
- * trivial.  Its responsibility is to provide context rows for upsampling/
- * rescaling, and doing this in an efficient fashion is a bit tricky.
- *
- * Postprocessor input data is counted in "row groups".  A row group
- * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
- * sample rows of each component.  (We require DCT_scaled_size values to be
- * chosen such that these numbers are integers.  In practice DCT_scaled_size
- * values will likely be powers of two, so we actually have the stronger
- * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.)
- * Upsampling will typically produce max_v_samp_factor pixel rows from each
- * row group (times any additional scale factor that the upsampler is
- * applying).
- *
- * The coefficient controller will deliver data to us one iMCU row at a time;
- * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or
- * exactly min_DCT_scaled_size row groups.  (This amount of data corresponds
- * to one row of MCUs when the image is fully interleaved.)  Note that the
- * number of sample rows varies across components, but the number of row
- * groups does not.  Some garbage sample rows may be included in the last iMCU
- * row at the bottom of the image.
- *
- * Depending on the vertical scaling algorithm used, the upsampler may need
- * access to the sample row(s) above and below its current input row group.
- * The upsampler is required to set need_context_rows TRUE at global selection
- * time if so.  When need_context_rows is FALSE, this controller can simply
- * obtain one iMCU row at a time from the coefficient controller and dole it
- * out as row groups to the postprocessor.
- *
- * When need_context_rows is TRUE, this controller guarantees that the buffer
- * passed to postprocessing contains at least one row group's worth of samples
- * above and below the row group(s) being processed.  Note that the context
- * rows "above" the first passed row group appear at negative row offsets in
- * the passed buffer.  At the top and bottom of the image, the required
- * context rows are manufactured by duplicating the first or last real sample
- * row; this avoids having special cases in the upsampling inner loops.
- *
- * The amount of context is fixed at one row group just because that's a
- * convenient number for this controller to work with.  The existing
- * upsamplers really only need one sample row of context.  An upsampler
- * supporting arbitrary output rescaling might wish for more than one row
- * group of context when shrinking the image; tough, we don't handle that.
- * (This is justified by the assumption that downsizing will be handled mostly
- * by adjusting the DCT_scaled_size values, so that the actual scale factor at
- * the upsample step needn't be much less than one.)
- *
- * To provide the desired context, we have to retain the last two row groups
- * of one iMCU row while reading in the next iMCU row.  (The last row group
- * can't be processed until we have another row group for its below-context,
- * and so we have to save the next-to-last group too for its above-context.)
- * We could do this most simply by copying data around in our buffer, but
- * that'd be very slow.  We can avoid copying any data by creating a rather
- * strange pointer structure.  Here's how it works.  We allocate a workspace
- * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number
- * of row groups per iMCU row).  We create two sets of redundant pointers to
- * the workspace.  Labeling the physical row groups 0 to M+1, the synthesized
- * pointer lists look like this:
- *                   M+1                          M-1
- * master pointer --> 0         master pointer --> 0
- *                    1                            1
- *                   ...                          ...
- *                   M-3                          M-3
- *                   M-2                           M
- *                   M-1                          M+1
- *                    M                           M-2
- *                   M+1                          M-1
- *                    0                            0
- * We read alternate iMCU rows using each master pointer; thus the last two
- * row groups of the previous iMCU row remain un-overwritten in the workspace.
- * The pointer lists are set up so that the required context rows appear to
- * be adjacent to the proper places when we pass the pointer lists to the
- * upsampler.
- *
- * The above pictures describe the normal state of the pointer lists.
- * At top and bottom of the image, we diddle the pointer lists to duplicate
- * the first or last sample row as necessary (this is cheaper than copying
- * sample rows around).
- *
- * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1.  In that
- * situation each iMCU row provides only one row group so the buffering logic
- * must be different (eg, we must read two iMCU rows before we can emit the
- * first row group).  For now, we simply do not support providing context
- * rows when min_DCT_scaled_size is 1.  That combination seems unlikely to
- * be worth providing --- if someone wants a 1/8th-size preview, they probably
- * want it quick and dirty, so a context-free upsampler is sufficient.
- */
-
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_d_main_controller pub; /* public fields */
-
-  /* Pointer to allocated workspace (M or M+2 row groups). */
-  JSAMPARRAY buffer[MAX_COMPONENTS];
-
-  boolean buffer_full;		/* Have we gotten an iMCU row from decoder? */
-  JDIMENSION rowgroup_ctr;	/* counts row groups output to postprocessor */
-
-  /* Remaining fields are only used in the context case. */
-
-  /* These are the master pointers to the funny-order pointer lists. */
-  JSAMPIMAGE xbuffer[2];	/* pointers to weird pointer lists */
-
-  int whichptr;			/* indicates which pointer set is now in use */
-  int context_state;		/* process_data state machine status */
-  JDIMENSION rowgroups_avail;	/* row groups available to postprocessor */
-  JDIMENSION iMCU_row_ctr;	/* counts iMCU rows to detect image top/bot */
-} my_main_controller;
-
-typedef my_main_controller * my_main_ptr;
-
-/* context_state values: */
-#define CTX_PREPARE_FOR_IMCU	0	/* need to prepare for MCU row */
-#define CTX_PROCESS_IMCU	1	/* feeding iMCU to postprocessor */
-#define CTX_POSTPONED_ROW	2	/* feeding postponed row group */
-
-
-/* Forward declarations */
-METHODDEF(void) process_data_simple_main
-	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
-	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
-METHODDEF(void) process_data_context_main
-	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
-	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
-#ifdef QUANT_2PASS_SUPPORTED
-METHODDEF(void) process_data_crank_post
-	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
-	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
-#endif
-
-
-LOCAL(void)
-alloc_funny_pointers (j_decompress_ptr cinfo)
-/* Allocate space for the funny pointer lists.
- * This is done only once, not once per pass.
- */
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  int ci, rgroup;
-  int M = cinfo->min_DCT_scaled_size;
-  jpeg_component_info *compptr;
-  JSAMPARRAY xbuf;
-
-  /* Get top-level space for component array pointers.
-   * We alloc both arrays with one call to save a few cycles.
-   */
-  main->xbuffer[0] = (JSAMPIMAGE)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
-  main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
-      cinfo->min_DCT_scaled_size; /* height of a row group of component */
-    /* Get space for pointer lists --- M+4 row groups in each list.
-     * We alloc both pointer lists with one call to save a few cycles.
-     */
-    xbuf = (JSAMPARRAY)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
-    xbuf += rgroup;		/* want one row group at negative offsets */
-    main->xbuffer[0][ci] = xbuf;
-    xbuf += rgroup * (M + 4);
-    main->xbuffer[1][ci] = xbuf;
-  }
-}
-
-
-LOCAL(void)
-make_funny_pointers (j_decompress_ptr cinfo)
-/* Create the funny pointer lists discussed in the comments above.
- * The actual workspace is already allocated (in main->buffer),
- * and the space for the pointer lists is allocated too.
- * This routine just fills in the curiously ordered lists.
- * This will be repeated at the beginning of each pass.
- */
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  int ci, i, rgroup;
-  int M = cinfo->min_DCT_scaled_size;
-  jpeg_component_info *compptr;
-  JSAMPARRAY buf, xbuf0, xbuf1;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
-      cinfo->min_DCT_scaled_size; /* height of a row group of component */
-    xbuf0 = main->xbuffer[0][ci];
-    xbuf1 = main->xbuffer[1][ci];
-    /* First copy the workspace pointers as-is */
-    buf = main->buffer[ci];
-    for (i = 0; i < rgroup * (M + 2); i++) {
-      xbuf0[i] = xbuf1[i] = buf[i];
-    }
-    /* In the second list, put the last four row groups in swapped order */
-    for (i = 0; i < rgroup * 2; i++) {
-      xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i];
-      xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i];
-    }
-    /* The wraparound pointers at top and bottom will be filled later
-     * (see set_wraparound_pointers, below).  Initially we want the "above"
-     * pointers to duplicate the first actual data line.  This only needs
-     * to happen in xbuffer[0].
-     */
-    for (i = 0; i < rgroup; i++) {
-      xbuf0[i - rgroup] = xbuf0[0];
-    }
-  }
-}
-
-
-LOCAL(void)
-set_wraparound_pointers (j_decompress_ptr cinfo)
-/* Set up the "wraparound" pointers at top and bottom of the pointer lists.
- * This changes the pointer list state from top-of-image to the normal state.
- */
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  int ci, i, rgroup;
-  int M = cinfo->min_DCT_scaled_size;
-  jpeg_component_info *compptr;
-  JSAMPARRAY xbuf0, xbuf1;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
-      cinfo->min_DCT_scaled_size; /* height of a row group of component */
-    xbuf0 = main->xbuffer[0][ci];
-    xbuf1 = main->xbuffer[1][ci];
-    for (i = 0; i < rgroup; i++) {
-      xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i];
-      xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i];
-      xbuf0[rgroup*(M+2) + i] = xbuf0[i];
-      xbuf1[rgroup*(M+2) + i] = xbuf1[i];
-    }
-  }
-}
-
-
-LOCAL(void)
-set_bottom_pointers (j_decompress_ptr cinfo)
-/* Change the pointer lists to duplicate the last sample row at the bottom
- * of the image.  whichptr indicates which xbuffer holds the final iMCU row.
- * Also sets rowgroups_avail to indicate number of nondummy row groups in row.
- */
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  int ci, i, rgroup, iMCUheight, rows_left;
-  jpeg_component_info *compptr;
-  JSAMPARRAY xbuf;
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Count sample rows in one iMCU row and in one row group */
-    iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size;
-    rgroup = iMCUheight / cinfo->min_DCT_scaled_size;
-    /* Count nondummy sample rows remaining for this component */
-    rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight);
-    if (rows_left == 0) rows_left = iMCUheight;
-    /* Count nondummy row groups.  Should get same answer for each component,
-     * so we need only do it once.
-     */
-    if (ci == 0) {
-      main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
-    }
-    /* Duplicate the last real sample row rgroup*2 times; this pads out the
-     * last partial rowgroup and ensures at least one full rowgroup of context.
-     */
-    xbuf = main->xbuffer[main->whichptr][ci];
-    for (i = 0; i < rgroup * 2; i++) {
-      xbuf[rows_left + i] = xbuf[rows_left-1];
-    }
-  }
-}
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-
-  switch (pass_mode) {
-  case JBUF_PASS_THRU:
-    if (cinfo->upsample->need_context_rows) {
-      main->pub.process_data = process_data_context_main;
-      make_funny_pointers(cinfo); /* Create the xbuffer[] lists */
-      main->whichptr = 0;	/* Read first iMCU row into xbuffer[0] */
-      main->context_state = CTX_PREPARE_FOR_IMCU;
-      main->iMCU_row_ctr = 0;
-    } else {
-      /* Simple case with no context needed */
-      main->pub.process_data = process_data_simple_main;
-    }
-    main->buffer_full = FALSE;	/* Mark buffer empty */
-    main->rowgroup_ctr = 0;
-    break;
-#ifdef QUANT_2PASS_SUPPORTED
-  case JBUF_CRANK_DEST:
-    /* For last pass of 2-pass quantization, just crank the postprocessor */
-    main->pub.process_data = process_data_crank_post;
-    break;
-#endif
-  default:
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    break;
-  }
-}
-
-
-/*
- * Process some data.
- * This handles the simple case where no context is required.
- */
-
-METHODDEF(void)
-process_data_simple_main (j_decompress_ptr cinfo,
-			  JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-			  JDIMENSION out_rows_avail)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-  JDIMENSION rowgroups_avail;
-
-  /* Read input data if we haven't filled the main buffer yet */
-  if (! main->buffer_full) {
-    if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer))
-      return;			/* suspension forced, can do nothing more */
-    main->buffer_full = TRUE;	/* OK, we have an iMCU row to work with */
-  }
-
-  /* There are always min_DCT_scaled_size row groups in an iMCU row. */
-  rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size;
-  /* Note: at the bottom of the image, we may pass extra garbage row groups
-   * to the postprocessor.  The postprocessor has to check for bottom
-   * of image anyway (at row resolution), so no point in us doing it too.
-   */
-
-  /* Feed the postprocessor */
-  (*cinfo->post->post_process_data) (cinfo, main->buffer,
-				     &main->rowgroup_ctr, rowgroups_avail,
-				     output_buf, out_row_ctr, out_rows_avail);
-
-  /* Has postprocessor consumed all the data yet? If so, mark buffer empty */
-  if (main->rowgroup_ctr >= rowgroups_avail) {
-    main->buffer_full = FALSE;
-    main->rowgroup_ctr = 0;
-  }
-}
-
-
-/*
- * Process some data.
- * This handles the case where context rows must be provided.
- */
-
-METHODDEF(void)
-process_data_context_main (j_decompress_ptr cinfo,
-			   JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-			   JDIMENSION out_rows_avail)
-{
-  my_main_ptr main = (my_main_ptr) cinfo->main;
-
-  /* Read input data if we haven't filled the main buffer yet */
-  if (! main->buffer_full) {
-    if (! (*cinfo->coef->decompress_data) (cinfo,
-					   main->xbuffer[main->whichptr]))
-      return;			/* suspension forced, can do nothing more */
-    main->buffer_full = TRUE;	/* OK, we have an iMCU row to work with */
-    main->iMCU_row_ctr++;	/* count rows received */
-  }
-
-  /* Postprocessor typically will not swallow all the input data it is handed
-   * in one call (due to filling the output buffer first).  Must be prepared
-   * to exit and restart.  This switch lets us keep track of how far we got.
-   * Note that each case falls through to the next on successful completion.
-   */
-  switch (main->context_state) {
-  case CTX_POSTPONED_ROW:
-    /* Call postprocessor using previously set pointers for postponed row */
-    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
-			&main->rowgroup_ctr, main->rowgroups_avail,
-			output_buf, out_row_ctr, out_rows_avail);
-    if (main->rowgroup_ctr < main->rowgroups_avail)
-      return;			/* Need to suspend */
-    main->context_state = CTX_PREPARE_FOR_IMCU;
-    if (*out_row_ctr >= out_rows_avail)
-      return;			/* Postprocessor exactly filled output buf */
-    /*FALLTHROUGH*/
-  case CTX_PREPARE_FOR_IMCU:
-    /* Prepare to process first M-1 row groups of this iMCU row */
-    main->rowgroup_ctr = 0;
-    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1);
-    /* Check for bottom of image: if so, tweak pointers to "duplicate"
-     * the last sample row, and adjust rowgroups_avail to ignore padding rows.
-     */
-    if (main->iMCU_row_ctr == cinfo->total_iMCU_rows)
-      set_bottom_pointers(cinfo);
-    main->context_state = CTX_PROCESS_IMCU;
-    /*FALLTHROUGH*/
-  case CTX_PROCESS_IMCU:
-    /* Call postprocessor using previously set pointers */
-    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
-			&main->rowgroup_ctr, main->rowgroups_avail,
-			output_buf, out_row_ctr, out_rows_avail);
-    if (main->rowgroup_ctr < main->rowgroups_avail)
-      return;			/* Need to suspend */
-    /* After the first iMCU, change wraparound pointers to normal state */
-    if (main->iMCU_row_ctr == 1)
-      set_wraparound_pointers(cinfo);
-    /* Prepare to load new iMCU row using other xbuffer list */
-    main->whichptr ^= 1;	/* 0=>1 or 1=>0 */
-    main->buffer_full = FALSE;
-    /* Still need to process last row group of this iMCU row, */
-    /* which is saved at index M+1 of the other xbuffer */
-    main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1);
-    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2);
-    main->context_state = CTX_POSTPONED_ROW;
-  }
-}
-
-
-/*
- * Process some data.
- * Final pass of two-pass quantization: just call the postprocessor.
- * Source data will be the postprocessor controller's internal buffer.
- */
-
-#ifdef QUANT_2PASS_SUPPORTED
-
-METHODDEF(void)
-process_data_crank_post (j_decompress_ptr cinfo,
-			 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-			 JDIMENSION out_rows_avail)
-{
-  (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL,
-				     (JDIMENSION *) NULL, (JDIMENSION) 0,
-				     output_buf, out_row_ctr, out_rows_avail);
-}
-
-#endif /* QUANT_2PASS_SUPPORTED */
-
-
-/*
- * Initialize main buffer controller.
- */
-
-GLOBAL(void)
-jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
-{
-  my_main_ptr main;
-  int ci, rgroup, ngroups;
-  jpeg_component_info *compptr;
-
-  main = (my_main_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_main_controller));
-  cinfo->main = (struct jpeg_d_main_controller *) main;
-  main->pub.start_pass = start_pass_main;
-
-  if (need_full_buffer)		/* shouldn't happen */
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-
-  /* Allocate the workspace.
-   * ngroups is the number of row groups we need.
-   */
-  if (cinfo->upsample->need_context_rows) {
-    if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */
-      ERREXIT(cinfo, JERR_NOTIMPL);
-    alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */
-    ngroups = cinfo->min_DCT_scaled_size + 2;
-  } else {
-    ngroups = cinfo->min_DCT_scaled_size;
-  }
-
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
-      cinfo->min_DCT_scaled_size; /* height of a row group of component */
-    main->buffer[ci] = (*cinfo->mem->alloc_sarray)
-			((j_common_ptr) cinfo, JPOOL_IMAGE,
-			 compptr->width_in_blocks * compptr->DCT_scaled_size,
-			 (JDIMENSION) (rgroup * ngroups));
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdmarker.c b/tkimg1.3/libjpeg/jdmarker.c
deleted file mode 100644
index f4cca8c..0000000
--- a/tkimg1.3/libjpeg/jdmarker.c
+++ /dev/null
@@ -1,1360 +0,0 @@
-/*
- * jdmarker.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to decode JPEG datastream markers.
- * Most of the complexity arises from our desire to support input
- * suspension: if not all of the data for a marker is available,
- * we must exit back to the application.  On resumption, we reprocess
- * the marker.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-typedef enum {			/* JPEG marker codes */
-  M_SOF0  = 0xc0,
-  M_SOF1  = 0xc1,
-  M_SOF2  = 0xc2,
-  M_SOF3  = 0xc3,
-  
-  M_SOF5  = 0xc5,
-  M_SOF6  = 0xc6,
-  M_SOF7  = 0xc7,
-  
-  M_JPG   = 0xc8,
-  M_SOF9  = 0xc9,
-  M_SOF10 = 0xca,
-  M_SOF11 = 0xcb,
-  
-  M_SOF13 = 0xcd,
-  M_SOF14 = 0xce,
-  M_SOF15 = 0xcf,
-  
-  M_DHT   = 0xc4,
-  
-  M_DAC   = 0xcc,
-  
-  M_RST0  = 0xd0,
-  M_RST1  = 0xd1,
-  M_RST2  = 0xd2,
-  M_RST3  = 0xd3,
-  M_RST4  = 0xd4,
-  M_RST5  = 0xd5,
-  M_RST6  = 0xd6,
-  M_RST7  = 0xd7,
-  
-  M_SOI   = 0xd8,
-  M_EOI   = 0xd9,
-  M_SOS   = 0xda,
-  M_DQT   = 0xdb,
-  M_DNL   = 0xdc,
-  M_DRI   = 0xdd,
-  M_DHP   = 0xde,
-  M_EXP   = 0xdf,
-  
-  M_APP0  = 0xe0,
-  M_APP1  = 0xe1,
-  M_APP2  = 0xe2,
-  M_APP3  = 0xe3,
-  M_APP4  = 0xe4,
-  M_APP5  = 0xe5,
-  M_APP6  = 0xe6,
-  M_APP7  = 0xe7,
-  M_APP8  = 0xe8,
-  M_APP9  = 0xe9,
-  M_APP10 = 0xea,
-  M_APP11 = 0xeb,
-  M_APP12 = 0xec,
-  M_APP13 = 0xed,
-  M_APP14 = 0xee,
-  M_APP15 = 0xef,
-  
-  M_JPG0  = 0xf0,
-  M_JPG13 = 0xfd,
-  M_COM   = 0xfe,
-  
-  M_TEM   = 0x01,
-  
-  M_ERROR = 0x100
-} JPEG_MARKER;
-
-
-/* Private state */
-
-typedef struct {
-  struct jpeg_marker_reader pub; /* public fields */
-
-  /* Application-overridable marker processing methods */
-  jpeg_marker_parser_method process_COM;
-  jpeg_marker_parser_method process_APPn[16];
-
-  /* Limit on marker data length to save for each marker type */
-  unsigned int length_limit_COM;
-  unsigned int length_limit_APPn[16];
-
-  /* Status of COM/APPn marker saving */
-  jpeg_saved_marker_ptr cur_marker;	/* NULL if not processing a marker */
-  unsigned int bytes_read;		/* data bytes read so far in marker */
-  /* Note: cur_marker is not linked into marker_list until it's all read. */
-} my_marker_reader;
-
-typedef my_marker_reader * my_marker_ptr;
-
-
-/*
- * Macros for fetching data from the data source module.
- *
- * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect
- * the current restart point; we update them only when we have reached a
- * suitable place to restart if a suspension occurs.
- */
-
-/* Declare and initialize local copies of input pointer/count */
-#define INPUT_VARS(cinfo)  \
-	struct jpeg_source_mgr * datasrc = (cinfo)->src;  \
-	const JOCTET * next_input_byte = datasrc->next_input_byte;  \
-	size_t bytes_in_buffer = datasrc->bytes_in_buffer
-
-/* Unload the local copies --- do this only at a restart boundary */
-#define INPUT_SYNC(cinfo)  \
-	( datasrc->next_input_byte = next_input_byte,  \
-	  datasrc->bytes_in_buffer = bytes_in_buffer )
-
-/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */
-#define INPUT_RELOAD(cinfo)  \
-	( next_input_byte = datasrc->next_input_byte,  \
-	  bytes_in_buffer = datasrc->bytes_in_buffer )
-
-/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available.
- * Note we do *not* do INPUT_SYNC before calling fill_input_buffer,
- * but we must reload the local copies after a successful fill.
- */
-#define MAKE_BYTE_AVAIL(cinfo,action)  \
-	if (bytes_in_buffer == 0) {  \
-	  if (! (*datasrc->fill_input_buffer) (cinfo))  \
-	    { action; }  \
-	  INPUT_RELOAD(cinfo);  \
-	}
-
-/* Read a byte into variable V.
- * If must suspend, take the specified action (typically "return FALSE").
- */
-#define INPUT_BYTE(cinfo,V,action)  \
-	MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
-		  bytes_in_buffer--; \
-		  V = GETJOCTET(*next_input_byte++); )
-
-/* As above, but read two bytes interpreted as an unsigned 16-bit integer.
- * V should be declared unsigned int or perhaps INT32.
- */
-#define INPUT_2BYTES(cinfo,V,action)  \
-	MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
-		  bytes_in_buffer--; \
-		  V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \
-		  MAKE_BYTE_AVAIL(cinfo,action); \
-		  bytes_in_buffer--; \
-		  V += GETJOCTET(*next_input_byte++); )
-
-
-/*
- * Routines to process JPEG markers.
- *
- * Entry condition: JPEG marker itself has been read and its code saved
- *   in cinfo->unread_marker; input restart point is just after the marker.
- *
- * Exit: if return TRUE, have read and processed any parameters, and have
- *   updated the restart point to point after the parameters.
- *   If return FALSE, was forced to suspend before reaching end of
- *   marker parameters; restart point has not been moved.  Same routine
- *   will be called again after application supplies more input data.
- *
- * This approach to suspension assumes that all of a marker's parameters
- * can fit into a single input bufferload.  This should hold for "normal"
- * markers.  Some COM/APPn markers might have large parameter segments
- * that might not fit.  If we are simply dropping such a marker, we use
- * skip_input_data to get past it, and thereby put the problem on the
- * source manager's shoulders.  If we are saving the marker's contents
- * into memory, we use a slightly different convention: when forced to
- * suspend, the marker processor updates the restart point to the end of
- * what it's consumed (ie, the end of the buffer) before returning FALSE.
- * On resumption, cinfo->unread_marker still contains the marker code,
- * but the data source will point to the next chunk of marker data.
- * The marker processor must retain internal state to deal with this.
- *
- * Note that we don't bother to avoid duplicate trace messages if a
- * suspension occurs within marker parameters.  Other side effects
- * require more care.
- */
-
-
-LOCAL(boolean)
-get_soi (j_decompress_ptr cinfo)
-/* Process an SOI marker */
-{
-  int i;
-  
-  TRACEMS(cinfo, 1, JTRC_SOI);
-
-  if (cinfo->marker->saw_SOI)
-    ERREXIT(cinfo, JERR_SOI_DUPLICATE);
-
-  /* Reset all parameters that are defined to be reset by SOI */
-
-  for (i = 0; i < NUM_ARITH_TBLS; i++) {
-    cinfo->arith_dc_L[i] = 0;
-    cinfo->arith_dc_U[i] = 1;
-    cinfo->arith_ac_K[i] = 5;
-  }
-  cinfo->restart_interval = 0;
-
-  /* Set initial assumptions for colorspace etc */
-
-  cinfo->jpeg_color_space = JCS_UNKNOWN;
-  cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */
-
-  cinfo->saw_JFIF_marker = FALSE;
-  cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */
-  cinfo->JFIF_minor_version = 1;
-  cinfo->density_unit = 0;
-  cinfo->X_density = 1;
-  cinfo->Y_density = 1;
-  cinfo->saw_Adobe_marker = FALSE;
-  cinfo->Adobe_transform = 0;
-
-  cinfo->marker->saw_SOI = TRUE;
-
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
-/* Process a SOFn marker */
-{
-  INT32 length;
-  int c, ci;
-  jpeg_component_info * compptr;
-  INPUT_VARS(cinfo);
-
-  cinfo->progressive_mode = is_prog;
-  cinfo->arith_code = is_arith;
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-
-  INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE);
-  INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE);
-  INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE);
-  INPUT_BYTE(cinfo, cinfo->num_components, return FALSE);
-
-  length -= 8;
-
-  TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker,
-	   (int) cinfo->image_width, (int) cinfo->image_height,
-	   cinfo->num_components);
-
-  if (cinfo->marker->saw_SOF)
-    ERREXIT(cinfo, JERR_SOF_DUPLICATE);
-
-  /* We don't support files in which the image height is initially specified */
-  /* as 0 and is later redefined by DNL.  As long as we have to check that,  */
-  /* might as well have a general sanity check. */
-  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
-      || cinfo->num_components <= 0)
-    ERREXIT(cinfo, JERR_EMPTY_IMAGE);
-
-  if (length != (cinfo->num_components * 3))
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  if (cinfo->comp_info == NULL)	/* do only once, even if suspend */
-    cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small)
-			((j_common_ptr) cinfo, JPOOL_IMAGE,
-			 cinfo->num_components * SIZEOF(jpeg_component_info));
-  
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    compptr->component_index = ci;
-    INPUT_BYTE(cinfo, compptr->component_id, return FALSE);
-    INPUT_BYTE(cinfo, c, return FALSE);
-    compptr->h_samp_factor = (c >> 4) & 15;
-    compptr->v_samp_factor = (c     ) & 15;
-    INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE);
-
-    TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT,
-	     compptr->component_id, compptr->h_samp_factor,
-	     compptr->v_samp_factor, compptr->quant_tbl_no);
-  }
-
-  cinfo->marker->saw_SOF = TRUE;
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-get_sos (j_decompress_ptr cinfo)
-/* Process a SOS marker */
-{
-  INT32 length;
-  int i, ci, n, c, cc;
-  jpeg_component_info * compptr;
-  INPUT_VARS(cinfo);
-
-  if (! cinfo->marker->saw_SOF)
-    ERREXIT(cinfo, JERR_SOS_NO_SOF);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-
-  INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */
-
-  TRACEMS1(cinfo, 1, JTRC_SOS, n);
-
-  if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN)
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  cinfo->comps_in_scan = n;
-
-  /* Collect the component-spec parameters */
-
-  for (i = 0; i < n; i++) {
-    INPUT_BYTE(cinfo, cc, return FALSE);
-    INPUT_BYTE(cinfo, c, return FALSE);
-    
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      if (cc == compptr->component_id)
-	goto id_found;
-    }
-
-    ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
-
-  id_found:
-
-    cinfo->cur_comp_info[i] = compptr;
-    compptr->dc_tbl_no = (c >> 4) & 15;
-    compptr->ac_tbl_no = (c     ) & 15;
-    
-    TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
-	     compptr->dc_tbl_no, compptr->ac_tbl_no);
-  }
-
-  /* Collect the additional scan parameters Ss, Se, Ah/Al. */
-  INPUT_BYTE(cinfo, c, return FALSE);
-  cinfo->Ss = c;
-  INPUT_BYTE(cinfo, c, return FALSE);
-  cinfo->Se = c;
-  INPUT_BYTE(cinfo, c, return FALSE);
-  cinfo->Ah = (c >> 4) & 15;
-  cinfo->Al = (c     ) & 15;
-
-  TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se,
-	   cinfo->Ah, cinfo->Al);
-
-  /* Prepare to scan data & restart markers */
-  cinfo->marker->next_restart_num = 0;
-
-  /* Count another SOS marker */
-  cinfo->input_scan_number++;
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-#ifdef D_ARITH_CODING_SUPPORTED
-
-LOCAL(boolean)
-get_dac (j_decompress_ptr cinfo)
-/* Process a DAC marker */
-{
-  INT32 length;
-  int index, val;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  length -= 2;
-  
-  while (length > 0) {
-    INPUT_BYTE(cinfo, index, return FALSE);
-    INPUT_BYTE(cinfo, val, return FALSE);
-
-    length -= 2;
-
-    TRACEMS2(cinfo, 1, JTRC_DAC, index, val);
-
-    if (index < 0 || index >= (2*NUM_ARITH_TBLS))
-      ERREXIT1(cinfo, JERR_DAC_INDEX, index);
-
-    if (index >= NUM_ARITH_TBLS) { /* define AC table */
-      cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val;
-    } else {			/* define DC table */
-      cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F);
-      cinfo->arith_dc_U[index] = (UINT8) (val >> 4);
-      if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index])
-	ERREXIT1(cinfo, JERR_DAC_VALUE, val);
-    }
-  }
-
-  if (length != 0)
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-#else /* ! D_ARITH_CODING_SUPPORTED */
-
-#define get_dac(cinfo)  skip_variable(cinfo)
-
-#endif /* D_ARITH_CODING_SUPPORTED */
-
-
-LOCAL(boolean)
-get_dht (j_decompress_ptr cinfo)
-/* Process a DHT marker */
-{
-  INT32 length;
-  UINT8 bits[17];
-  UINT8 huffval[256];
-  int i, index, count;
-  JHUFF_TBL **htblptr;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  length -= 2;
-  
-  while (length > 16) {
-    INPUT_BYTE(cinfo, index, return FALSE);
-
-    TRACEMS1(cinfo, 1, JTRC_DHT, index);
-      
-    bits[0] = 0;
-    count = 0;
-    for (i = 1; i <= 16; i++) {
-      INPUT_BYTE(cinfo, bits[i], return FALSE);
-      count += bits[i];
-    }
-
-    length -= 1 + 16;
-
-    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,
-	     bits[1], bits[2], bits[3], bits[4],
-	     bits[5], bits[6], bits[7], bits[8]);
-    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,
-	     bits[9], bits[10], bits[11], bits[12],
-	     bits[13], bits[14], bits[15], bits[16]);
-
-    /* Here we just do minimal validation of the counts to avoid walking
-     * off the end of our table space.  jdhuff.c will check more carefully.
-     */
-    if (count > 256 || ((INT32) count) > length)
-      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
-
-    for (i = 0; i < count; i++)
-      INPUT_BYTE(cinfo, huffval[i], return FALSE);
-
-    length -= count;
-
-    if (index & 0x10) {		/* AC table definition */
-      index -= 0x10;
-      htblptr = &cinfo->ac_huff_tbl_ptrs[index];
-    } else {			/* DC table definition */
-      htblptr = &cinfo->dc_huff_tbl_ptrs[index];
-    }
-
-    if (index < 0 || index >= NUM_HUFF_TBLS)
-      ERREXIT1(cinfo, JERR_DHT_INDEX, index);
-
-    if (*htblptr == NULL)
-      *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
-  
-    MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
-    MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval));
-  }
-
-  if (length != 0)
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-get_dqt (j_decompress_ptr cinfo)
-/* Process a DQT marker */
-{
-  INT32 length;
-  int n, i, prec;
-  unsigned int tmp;
-  JQUANT_TBL *quant_ptr;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  length -= 2;
-
-  while (length > 0) {
-    INPUT_BYTE(cinfo, n, return FALSE);
-    prec = n >> 4;
-    n &= 0x0F;
-
-    TRACEMS2(cinfo, 1, JTRC_DQT, n, prec);
-
-    if (n >= NUM_QUANT_TBLS)
-      ERREXIT1(cinfo, JERR_DQT_INDEX, n);
-      
-    if (cinfo->quant_tbl_ptrs[n] == NULL)
-      cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo);
-    quant_ptr = cinfo->quant_tbl_ptrs[n];
-
-    for (i = 0; i < DCTSIZE2; i++) {
-      if (prec)
-	INPUT_2BYTES(cinfo, tmp, return FALSE);
-      else
-	INPUT_BYTE(cinfo, tmp, return FALSE);
-      /* We convert the zigzag-order table to natural array order. */
-      quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp;
-    }
-
-    if (cinfo->err->trace_level >= 2) {
-      for (i = 0; i < DCTSIZE2; i += 8) {
-	TRACEMS8(cinfo, 2, JTRC_QUANTVALS,
-		 quant_ptr->quantval[i],   quant_ptr->quantval[i+1],
-		 quant_ptr->quantval[i+2], quant_ptr->quantval[i+3],
-		 quant_ptr->quantval[i+4], quant_ptr->quantval[i+5],
-		 quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]);
-      }
-    }
-
-    length -= DCTSIZE2+1;
-    if (prec) length -= DCTSIZE2;
-  }
-
-  if (length != 0)
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-get_dri (j_decompress_ptr cinfo)
-/* Process a DRI marker */
-{
-  INT32 length;
-  unsigned int tmp;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  
-  if (length != 4)
-    ERREXIT(cinfo, JERR_BAD_LENGTH);
-
-  INPUT_2BYTES(cinfo, tmp, return FALSE);
-
-  TRACEMS1(cinfo, 1, JTRC_DRI, tmp);
-
-  cinfo->restart_interval = tmp;
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-/*
- * Routines for processing APPn and COM markers.
- * These are either saved in memory or discarded, per application request.
- * APP0 and APP14 are specially checked to see if they are
- * JFIF and Adobe markers, respectively.
- */
-
-#define APP0_DATA_LEN	14	/* Length of interesting data in APP0 */
-#define APP14_DATA_LEN	12	/* Length of interesting data in APP14 */
-#define APPN_DATA_LEN	14	/* Must be the largest of the above!! */
-
-
-LOCAL(void)
-examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
-	      unsigned int datalen, INT32 remaining)
-/* Examine first few bytes from an APP0.
- * Take appropriate action if it is a JFIF marker.
- * datalen is # of bytes at data[], remaining is length of rest of marker data.
- */
-{
-  INT32 totallen = (INT32) datalen + remaining;
-
-  if (datalen >= APP0_DATA_LEN &&
-      GETJOCTET(data[0]) == 0x4A &&
-      GETJOCTET(data[1]) == 0x46 &&
-      GETJOCTET(data[2]) == 0x49 &&
-      GETJOCTET(data[3]) == 0x46 &&
-      GETJOCTET(data[4]) == 0) {
-    /* Found JFIF APP0 marker: save info */
-    cinfo->saw_JFIF_marker = TRUE;
-    cinfo->JFIF_major_version = GETJOCTET(data[5]);
-    cinfo->JFIF_minor_version = GETJOCTET(data[6]);
-    cinfo->density_unit = GETJOCTET(data[7]);
-    cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]);
-    cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]);
-    /* Check version.
-     * Major version must be 1, anything else signals an incompatible change.
-     * (We used to treat this as an error, but now it's a nonfatal warning,
-     * because some bozo at Hijaak couldn't read the spec.)
-     * Minor version should be 0..2, but process anyway if newer.
-     */
-    if (cinfo->JFIF_major_version != 1)
-      WARNMS2(cinfo, JWRN_JFIF_MAJOR,
-	      cinfo->JFIF_major_version, cinfo->JFIF_minor_version);
-    /* Generate trace messages */
-    TRACEMS5(cinfo, 1, JTRC_JFIF,
-	     cinfo->JFIF_major_version, cinfo->JFIF_minor_version,
-	     cinfo->X_density, cinfo->Y_density, cinfo->density_unit);
-    /* Validate thumbnail dimensions and issue appropriate messages */
-    if (GETJOCTET(data[12]) | GETJOCTET(data[13]))
-      TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL,
-	       GETJOCTET(data[12]), GETJOCTET(data[13]));
-    totallen -= APP0_DATA_LEN;
-    if (totallen !=
-	((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3))
-      TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen);
-  } else if (datalen >= 6 &&
-      GETJOCTET(data[0]) == 0x4A &&
-      GETJOCTET(data[1]) == 0x46 &&
-      GETJOCTET(data[2]) == 0x58 &&
-      GETJOCTET(data[3]) == 0x58 &&
-      GETJOCTET(data[4]) == 0) {
-    /* Found JFIF "JFXX" extension APP0 marker */
-    /* The library doesn't actually do anything with these,
-     * but we try to produce a helpful trace message.
-     */
-    switch (GETJOCTET(data[5])) {
-    case 0x10:
-      TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen);
-      break;
-    case 0x11:
-      TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen);
-      break;
-    case 0x13:
-      TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen);
-      break;
-    default:
-      TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION,
-	       GETJOCTET(data[5]), (int) totallen);
-      break;
-    }
-  } else {
-    /* Start of APP0 does not match "JFIF" or "JFXX", or too short */
-    TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen);
-  }
-}
-
-
-LOCAL(void)
-examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
-	       unsigned int datalen, INT32 remaining)
-/* Examine first few bytes from an APP14.
- * Take appropriate action if it is an Adobe marker.
- * datalen is # of bytes at data[], remaining is length of rest of marker data.
- */
-{
-  unsigned int version, flags0, flags1, transform;
-
-  if (datalen >= APP14_DATA_LEN &&
-      GETJOCTET(data[0]) == 0x41 &&
-      GETJOCTET(data[1]) == 0x64 &&
-      GETJOCTET(data[2]) == 0x6F &&
-      GETJOCTET(data[3]) == 0x62 &&
-      GETJOCTET(data[4]) == 0x65) {
-    /* Found Adobe APP14 marker */
-    version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]);
-    flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]);
-    flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]);
-    transform = GETJOCTET(data[11]);
-    TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform);
-    cinfo->saw_Adobe_marker = TRUE;
-    cinfo->Adobe_transform = (UINT8) transform;
-  } else {
-    /* Start of APP14 does not match "Adobe", or too short */
-    TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining));
-  }
-}
-
-
-METHODDEF(boolean)
-get_interesting_appn (j_decompress_ptr cinfo)
-/* Process an APP0 or APP14 marker without saving it */
-{
-  INT32 length;
-  JOCTET b[APPN_DATA_LEN];
-  unsigned int i, numtoread;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  length -= 2;
-
-  /* get the interesting part of the marker data */
-  if (length >= APPN_DATA_LEN)
-    numtoread = APPN_DATA_LEN;
-  else if (length > 0)
-    numtoread = (unsigned int) length;
-  else
-    numtoread = 0;
-  for (i = 0; i < numtoread; i++)
-    INPUT_BYTE(cinfo, b[i], return FALSE);
-  length -= numtoread;
-
-  /* process it */
-  switch (cinfo->unread_marker) {
-  case M_APP0:
-    examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length);
-    break;
-  case M_APP14:
-    examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length);
-    break;
-  default:
-    /* can't get here unless jpeg_save_markers chooses wrong processor */
-    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
-    break;
-  }
-
-  /* skip any remaining data -- could be lots */
-  INPUT_SYNC(cinfo);
-  if (length > 0)
-    (*cinfo->src->skip_input_data) (cinfo, (long) length);
-
-  return TRUE;
-}
-
-
-#ifdef SAVE_MARKERS_SUPPORTED
-
-METHODDEF(boolean)
-save_marker (j_decompress_ptr cinfo)
-/* Save an APPn or COM marker into the marker list */
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-  jpeg_saved_marker_ptr cur_marker = marker->cur_marker;
-  unsigned int bytes_read, data_length;
-  JOCTET FAR * data;
-  INT32 length = 0;
-  INPUT_VARS(cinfo);
-
-  if (cur_marker == NULL) {
-    /* begin reading a marker */
-    INPUT_2BYTES(cinfo, length, return FALSE);
-    length -= 2;
-    if (length >= 0) {		/* watch out for bogus length word */
-      /* figure out how much we want to save */
-      unsigned int limit;
-      if (cinfo->unread_marker == (int) M_COM)
-	limit = marker->length_limit_COM;
-      else
-	limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0];
-      if ((unsigned int) length < limit)
-	limit = (unsigned int) length;
-      /* allocate and initialize the marker item */
-      cur_marker = (jpeg_saved_marker_ptr)
-	(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				    SIZEOF(struct jpeg_marker_struct) + limit);
-      cur_marker->next = NULL;
-      cur_marker->marker = (UINT8) cinfo->unread_marker;
-      cur_marker->original_length = (unsigned int) length;
-      cur_marker->data_length = limit;
-      /* data area is just beyond the jpeg_marker_struct */
-      data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1);
-      marker->cur_marker = cur_marker;
-      marker->bytes_read = 0;
-      bytes_read = 0;
-      data_length = limit;
-    } else {
-      /* deal with bogus length word */
-      bytes_read = data_length = 0;
-      data = NULL;
-    }
-  } else {
-    /* resume reading a marker */
-    bytes_read = marker->bytes_read;
-    data_length = cur_marker->data_length;
-    data = cur_marker->data + bytes_read;
-  }
-
-  while (bytes_read < data_length) {
-    INPUT_SYNC(cinfo);		/* move the restart point to here */
-    marker->bytes_read = bytes_read;
-    /* If there's not at least one byte in buffer, suspend */
-    MAKE_BYTE_AVAIL(cinfo, return FALSE);
-    /* Copy bytes with reasonable rapidity */
-    while (bytes_read < data_length && bytes_in_buffer > 0) {
-      *data++ = *next_input_byte++;
-      bytes_in_buffer--;
-      bytes_read++;
-    }
-  }
-
-  /* Done reading what we want to read */
-  if (cur_marker != NULL) {	/* will be NULL if bogus length word */
-    /* Add new marker to end of list */
-    if (cinfo->marker_list == NULL) {
-      cinfo->marker_list = cur_marker;
-    } else {
-      jpeg_saved_marker_ptr prev = cinfo->marker_list;
-      while (prev->next != NULL)
-	prev = prev->next;
-      prev->next = cur_marker;
-    }
-    /* Reset pointer & calc remaining data length */
-    data = cur_marker->data;
-    length = cur_marker->original_length - data_length;
-  }
-  /* Reset to initial state for next marker */
-  marker->cur_marker = NULL;
-
-  /* Process the marker if interesting; else just make a generic trace msg */
-  switch (cinfo->unread_marker) {
-  case M_APP0:
-    examine_app0(cinfo, data, data_length, length);
-    break;
-  case M_APP14:
-    examine_app14(cinfo, data, data_length, length);
-    break;
-  default:
-    TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker,
-	     (int) (data_length + length));
-    break;
-  }
-
-  /* skip any remaining data -- could be lots */
-  INPUT_SYNC(cinfo);		/* do before skip_input_data */
-  if (length > 0)
-    (*cinfo->src->skip_input_data) (cinfo, (long) length);
-
-  return TRUE;
-}
-
-#endif /* SAVE_MARKERS_SUPPORTED */
-
-
-METHODDEF(boolean)
-skip_variable (j_decompress_ptr cinfo)
-/* Skip over an unknown or uninteresting variable-length marker */
-{
-  INT32 length;
-  INPUT_VARS(cinfo);
-
-  INPUT_2BYTES(cinfo, length, return FALSE);
-  length -= 2;
-  
-  TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length);
-
-  INPUT_SYNC(cinfo);		/* do before skip_input_data */
-  if (length > 0)
-    (*cinfo->src->skip_input_data) (cinfo, (long) length);
-
-  return TRUE;
-}
-
-
-/*
- * Find the next JPEG marker, save it in cinfo->unread_marker.
- * Returns FALSE if had to suspend before reaching a marker;
- * in that case cinfo->unread_marker is unchanged.
- *
- * Note that the result might not be a valid marker code,
- * but it will never be 0 or FF.
- */
-
-LOCAL(boolean)
-next_marker (j_decompress_ptr cinfo)
-{
-  int c;
-  INPUT_VARS(cinfo);
-
-  for (;;) {
-    INPUT_BYTE(cinfo, c, return FALSE);
-    /* Skip any non-FF bytes.
-     * This may look a bit inefficient, but it will not occur in a valid file.
-     * We sync after each discarded byte so that a suspending data source
-     * can discard the byte from its buffer.
-     */
-    while (c != 0xFF) {
-      cinfo->marker->discarded_bytes++;
-      INPUT_SYNC(cinfo);
-      INPUT_BYTE(cinfo, c, return FALSE);
-    }
-    /* This loop swallows any duplicate FF bytes.  Extra FFs are legal as
-     * pad bytes, so don't count them in discarded_bytes.  We assume there
-     * will not be so many consecutive FF bytes as to overflow a suspending
-     * data source's input buffer.
-     */
-    do {
-      INPUT_BYTE(cinfo, c, return FALSE);
-    } while (c == 0xFF);
-    if (c != 0)
-      break;			/* found a valid marker, exit loop */
-    /* Reach here if we found a stuffed-zero data sequence (FF/00).
-     * Discard it and loop back to try again.
-     */
-    cinfo->marker->discarded_bytes += 2;
-    INPUT_SYNC(cinfo);
-  }
-
-  if (cinfo->marker->discarded_bytes != 0) {
-    WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c);
-    cinfo->marker->discarded_bytes = 0;
-  }
-
-  cinfo->unread_marker = c;
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-LOCAL(boolean)
-first_marker (j_decompress_ptr cinfo)
-/* Like next_marker, but used to obtain the initial SOI marker. */
-/* For this marker, we do not allow preceding garbage or fill; otherwise,
- * we might well scan an entire input file before realizing it ain't JPEG.
- * If an application wants to process non-JFIF files, it must seek to the
- * SOI before calling the JPEG library.
- */
-{
-  int c, c2;
-  INPUT_VARS(cinfo);
-
-  INPUT_BYTE(cinfo, c, return FALSE);
-  INPUT_BYTE(cinfo, c2, return FALSE);
-  if (c != 0xFF || c2 != (int) M_SOI)
-    ERREXIT2(cinfo, JERR_NO_SOI, c, c2);
-
-  cinfo->unread_marker = c2;
-
-  INPUT_SYNC(cinfo);
-  return TRUE;
-}
-
-
-/*
- * Read markers until SOS or EOI.
- *
- * Returns same codes as are defined for jpeg_consume_input:
- * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
- */
-
-METHODDEF(int)
-read_markers (j_decompress_ptr cinfo)
-{
-  /* Outer loop repeats once for each marker. */
-  for (;;) {
-    /* Collect the marker proper, unless we already did. */
-    /* NB: first_marker() enforces the requirement that SOI appear first. */
-    if (cinfo->unread_marker == 0) {
-      if (! cinfo->marker->saw_SOI) {
-	if (! first_marker(cinfo))
-	  return JPEG_SUSPENDED;
-      } else {
-	if (! next_marker(cinfo))
-	  return JPEG_SUSPENDED;
-      }
-    }
-    /* At this point cinfo->unread_marker contains the marker code and the
-     * input point is just past the marker proper, but before any parameters.
-     * A suspension will cause us to return with this state still true.
-     */
-    switch (cinfo->unread_marker) {
-    case M_SOI:
-      if (! get_soi(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-
-    case M_SOF0:		/* Baseline */
-    case M_SOF1:		/* Extended sequential, Huffman */
-      if (! get_sof(cinfo, FALSE, FALSE))
-	return JPEG_SUSPENDED;
-      break;
-
-    case M_SOF2:		/* Progressive, Huffman */
-      if (! get_sof(cinfo, TRUE, FALSE))
-	return JPEG_SUSPENDED;
-      break;
-
-    case M_SOF9:		/* Extended sequential, arithmetic */
-      if (! get_sof(cinfo, FALSE, TRUE))
-	return JPEG_SUSPENDED;
-      break;
-
-    case M_SOF10:		/* Progressive, arithmetic */
-      if (! get_sof(cinfo, TRUE, TRUE))
-	return JPEG_SUSPENDED;
-      break;
-
-    /* Currently unsupported SOFn types */
-    case M_SOF3:		/* Lossless, Huffman */
-    case M_SOF5:		/* Differential sequential, Huffman */
-    case M_SOF6:		/* Differential progressive, Huffman */
-    case M_SOF7:		/* Differential lossless, Huffman */
-    case M_JPG:			/* Reserved for JPEG extensions */
-    case M_SOF11:		/* Lossless, arithmetic */
-    case M_SOF13:		/* Differential sequential, arithmetic */
-    case M_SOF14:		/* Differential progressive, arithmetic */
-    case M_SOF15:		/* Differential lossless, arithmetic */
-      ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker);
-      break;
-
-    case M_SOS:
-      if (! get_sos(cinfo))
-	return JPEG_SUSPENDED;
-      cinfo->unread_marker = 0;	/* processed the marker */
-      return JPEG_REACHED_SOS;
-    
-    case M_EOI:
-      TRACEMS(cinfo, 1, JTRC_EOI);
-      cinfo->unread_marker = 0;	/* processed the marker */
-      return JPEG_REACHED_EOI;
-      
-    case M_DAC:
-      if (! get_dac(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-      
-    case M_DHT:
-      if (! get_dht(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-      
-    case M_DQT:
-      if (! get_dqt(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-      
-    case M_DRI:
-      if (! get_dri(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-      
-    case M_APP0:
-    case M_APP1:
-    case M_APP2:
-    case M_APP3:
-    case M_APP4:
-    case M_APP5:
-    case M_APP6:
-    case M_APP7:
-    case M_APP8:
-    case M_APP9:
-    case M_APP10:
-    case M_APP11:
-    case M_APP12:
-    case M_APP13:
-    case M_APP14:
-    case M_APP15:
-      if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[
-		cinfo->unread_marker - (int) M_APP0]) (cinfo))
-	return JPEG_SUSPENDED;
-      break;
-      
-    case M_COM:
-      if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo))
-	return JPEG_SUSPENDED;
-      break;
-
-    case M_RST0:		/* these are all parameterless */
-    case M_RST1:
-    case M_RST2:
-    case M_RST3:
-    case M_RST4:
-    case M_RST5:
-    case M_RST6:
-    case M_RST7:
-    case M_TEM:
-      TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker);
-      break;
-
-    case M_DNL:			/* Ignore DNL ... perhaps the wrong thing */
-      if (! skip_variable(cinfo))
-	return JPEG_SUSPENDED;
-      break;
-
-    default:			/* must be DHP, EXP, JPGn, or RESn */
-      /* For now, we treat the reserved markers as fatal errors since they are
-       * likely to be used to signal incompatible JPEG Part 3 extensions.
-       * Once the JPEG 3 version-number marker is well defined, this code
-       * ought to change!
-       */
-      ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
-      break;
-    }
-    /* Successfully processed marker, so reset state variable */
-    cinfo->unread_marker = 0;
-  } /* end loop */
-}
-
-
-/*
- * Read a restart marker, which is expected to appear next in the datastream;
- * if the marker is not there, take appropriate recovery action.
- * Returns FALSE if suspension is required.
- *
- * This is called by the entropy decoder after it has read an appropriate
- * number of MCUs.  cinfo->unread_marker may be nonzero if the entropy decoder
- * has already read a marker from the data source.  Under normal conditions
- * cinfo->unread_marker will be reset to 0 before returning; if not reset,
- * it holds a marker which the decoder will be unable to read past.
- */
-
-METHODDEF(boolean)
-read_restart_marker (j_decompress_ptr cinfo)
-{
-  /* Obtain a marker unless we already did. */
-  /* Note that next_marker will complain if it skips any data. */
-  if (cinfo->unread_marker == 0) {
-    if (! next_marker(cinfo))
-      return FALSE;
-  }
-
-  if (cinfo->unread_marker ==
-      ((int) M_RST0 + cinfo->marker->next_restart_num)) {
-    /* Normal case --- swallow the marker and let entropy decoder continue */
-    TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num);
-    cinfo->unread_marker = 0;
-  } else {
-    /* Uh-oh, the restart markers have been messed up. */
-    /* Let the data source manager determine how to resync. */
-    if (! (*cinfo->src->resync_to_restart) (cinfo,
-					    cinfo->marker->next_restart_num))
-      return FALSE;
-  }
-
-  /* Update next-restart state */
-  cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7;
-
-  return TRUE;
-}
-
-
-/*
- * This is the default resync_to_restart method for data source managers
- * to use if they don't have any better approach.  Some data source managers
- * may be able to back up, or may have additional knowledge about the data
- * which permits a more intelligent recovery strategy; such managers would
- * presumably supply their own resync method.
- *
- * read_restart_marker calls resync_to_restart if it finds a marker other than
- * the restart marker it was expecting.  (This code is *not* used unless
- * a nonzero restart interval has been declared.)  cinfo->unread_marker is
- * the marker code actually found (might be anything, except 0 or FF).
- * The desired restart marker number (0..7) is passed as a parameter.
- * This routine is supposed to apply whatever error recovery strategy seems
- * appropriate in order to position the input stream to the next data segment.
- * Note that cinfo->unread_marker is treated as a marker appearing before
- * the current data-source input point; usually it should be reset to zero
- * before returning.
- * Returns FALSE if suspension is required.
- *
- * This implementation is substantially constrained by wanting to treat the
- * input as a data stream; this means we can't back up.  Therefore, we have
- * only the following actions to work with:
- *   1. Simply discard the marker and let the entropy decoder resume at next
- *      byte of file.
- *   2. Read forward until we find another marker, discarding intervening
- *      data.  (In theory we could look ahead within the current bufferload,
- *      without having to discard data if we don't find the desired marker.
- *      This idea is not implemented here, in part because it makes behavior
- *      dependent on buffer size and chance buffer-boundary positions.)
- *   3. Leave the marker unread (by failing to zero cinfo->unread_marker).
- *      This will cause the entropy decoder to process an empty data segment,
- *      inserting dummy zeroes, and then we will reprocess the marker.
- *
- * #2 is appropriate if we think the desired marker lies ahead, while #3 is
- * appropriate if the found marker is a future restart marker (indicating
- * that we have missed the desired restart marker, probably because it got
- * corrupted).
- * We apply #2 or #3 if the found marker is a restart marker no more than
- * two counts behind or ahead of the expected one.  We also apply #2 if the
- * found marker is not a legal JPEG marker code (it's certainly bogus data).
- * If the found marker is a restart marker more than 2 counts away, we do #1
- * (too much risk that the marker is erroneous; with luck we will be able to
- * resync at some future point).
- * For any valid non-restart JPEG marker, we apply #3.  This keeps us from
- * overrunning the end of a scan.  An implementation limited to single-scan
- * files might find it better to apply #2 for markers other than EOI, since
- * any other marker would have to be bogus data in that case.
- */
-
-GLOBAL(boolean)
-jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
-{
-  int marker = cinfo->unread_marker;
-  int action = 1;
-  
-  /* Always put up a warning. */
-  WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired);
-  
-  /* Outer loop handles repeated decision after scanning forward. */
-  for (;;) {
-    if (marker < (int) M_SOF0)
-      action = 2;		/* invalid marker */
-    else if (marker < (int) M_RST0 || marker > (int) M_RST7)
-      action = 3;		/* valid non-restart marker */
-    else {
-      if (marker == ((int) M_RST0 + ((desired+1) & 7)) ||
-	  marker == ((int) M_RST0 + ((desired+2) & 7)))
-	action = 3;		/* one of the next two expected restarts */
-      else if (marker == ((int) M_RST0 + ((desired-1) & 7)) ||
-	       marker == ((int) M_RST0 + ((desired-2) & 7)))
-	action = 2;		/* a prior restart, so advance */
-      else
-	action = 1;		/* desired restart or too far away */
-    }
-    TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action);
-    switch (action) {
-    case 1:
-      /* Discard marker and let entropy decoder resume processing. */
-      cinfo->unread_marker = 0;
-      return TRUE;
-    case 2:
-      /* Scan to the next marker, and repeat the decision loop. */
-      if (! next_marker(cinfo))
-	return FALSE;
-      marker = cinfo->unread_marker;
-      break;
-    case 3:
-      /* Return without advancing past this marker. */
-      /* Entropy decoder will be forced to process an empty segment. */
-      return TRUE;
-    }
-  } /* end loop */
-}
-
-
-/*
- * Reset marker processing state to begin a fresh datastream.
- */
-
-METHODDEF(void)
-reset_marker_reader (j_decompress_ptr cinfo)
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-
-  cinfo->comp_info = NULL;		/* until allocated by get_sof */
-  cinfo->input_scan_number = 0;		/* no SOS seen yet */
-  cinfo->unread_marker = 0;		/* no pending marker */
-  marker->pub.saw_SOI = FALSE;		/* set internal state too */
-  marker->pub.saw_SOF = FALSE;
-  marker->pub.discarded_bytes = 0;
-  marker->cur_marker = NULL;
-}
-
-
-/*
- * Initialize the marker reader module.
- * This is called only once, when the decompression object is created.
- */
-
-GLOBAL(void)
-jinit_marker_reader (j_decompress_ptr cinfo)
-{
-  my_marker_ptr marker;
-  int i;
-
-  /* Create subobject in permanent pool */
-  marker = (my_marker_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-				SIZEOF(my_marker_reader));
-  cinfo->marker = (struct jpeg_marker_reader *) marker;
-  /* Initialize public method pointers */
-  marker->pub.reset_marker_reader = reset_marker_reader;
-  marker->pub.read_markers = read_markers;
-  marker->pub.read_restart_marker = read_restart_marker;
-  /* Initialize COM/APPn processing.
-   * By default, we examine and then discard APP0 and APP14,
-   * but simply discard COM and all other APPn.
-   */
-  marker->process_COM = skip_variable;
-  marker->length_limit_COM = 0;
-  for (i = 0; i < 16; i++) {
-    marker->process_APPn[i] = skip_variable;
-    marker->length_limit_APPn[i] = 0;
-  }
-  marker->process_APPn[0] = get_interesting_appn;
-  marker->process_APPn[14] = get_interesting_appn;
-  /* Reset marker processing state */
-  reset_marker_reader(cinfo);
-}
-
-
-/*
- * Control saving of COM and APPn markers into marker_list.
- */
-
-#ifdef SAVE_MARKERS_SUPPORTED
-
-GLOBAL(void)
-jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
-		   unsigned int length_limit)
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-  long maxlength;
-  jpeg_marker_parser_method processor;
-
-  /* Length limit mustn't be larger than what we can allocate
-   * (should only be a concern in a 16-bit environment).
-   */
-  maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct);
-  if (((long) length_limit) > maxlength)
-    length_limit = (unsigned int) maxlength;
-
-  /* Choose processor routine to use.
-   * APP0/APP14 have special requirements.
-   */
-  if (length_limit) {
-    processor = save_marker;
-    /* If saving APP0/APP14, save at least enough for our internal use. */
-    if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN)
-      length_limit = APP0_DATA_LEN;
-    else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN)
-      length_limit = APP14_DATA_LEN;
-  } else {
-    processor = skip_variable;
-    /* If discarding APP0/APP14, use our regular on-the-fly processor. */
-    if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14)
-      processor = get_interesting_appn;
-  }
-
-  if (marker_code == (int) M_COM) {
-    marker->process_COM = processor;
-    marker->length_limit_COM = length_limit;
-  } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) {
-    marker->process_APPn[marker_code - (int) M_APP0] = processor;
-    marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit;
-  } else
-    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
-}
-
-#endif /* SAVE_MARKERS_SUPPORTED */
-
-
-/*
- * Install a special processing method for COM or APPn markers.
- */
-
-GLOBAL(void)
-jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code,
-			   jpeg_marker_parser_method routine)
-{
-  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
-
-  if (marker_code == (int) M_COM)
-    marker->process_COM = routine;
-  else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15)
-    marker->process_APPn[marker_code - (int) M_APP0] = routine;
-  else
-    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
-}
diff --git a/tkimg1.3/libjpeg/jdmaster.c b/tkimg1.3/libjpeg/jdmaster.c
deleted file mode 100644
index 2802c5b..0000000
--- a/tkimg1.3/libjpeg/jdmaster.c
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * jdmaster.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains master control logic for the JPEG decompressor.
- * These routines are concerned with selecting the modules to be executed
- * and with determining the number of passes and the work to be done in each
- * pass.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private state */
-
-typedef struct {
-  struct jpeg_decomp_master pub; /* public fields */
-
-  int pass_number;		/* # of passes completed */
-
-  boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
-
-  /* Saved references to initialized quantizer modules,
-   * in case we need to switch modes.
-   */
-  struct jpeg_color_quantizer * quantizer_1pass;
-  struct jpeg_color_quantizer * quantizer_2pass;
-} my_decomp_master;
-
-typedef my_decomp_master * my_master_ptr;
-
-
-/*
- * Determine whether merged upsample/color conversion should be used.
- * CRUCIAL: this must match the actual capabilities of jdmerge.c!
- */
-
-LOCAL(boolean)
-use_merged_upsample (j_decompress_ptr cinfo)
-{
-#ifdef UPSAMPLE_MERGING_SUPPORTED
-  /* Merging is the equivalent of plain box-filter upsampling */
-  if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling)
-    return FALSE;
-  /* jdmerge.c only supports YCC=>RGB color conversion */
-  if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 ||
-      cinfo->out_color_space != JCS_RGB ||
-      cinfo->out_color_components != RGB_PIXELSIZE)
-    return FALSE;
-  /* and it only handles 2h1v or 2h2v sampling ratios */
-  if (cinfo->comp_info[0].h_samp_factor != 2 ||
-      cinfo->comp_info[1].h_samp_factor != 1 ||
-      cinfo->comp_info[2].h_samp_factor != 1 ||
-      cinfo->comp_info[0].v_samp_factor >  2 ||
-      cinfo->comp_info[1].v_samp_factor != 1 ||
-      cinfo->comp_info[2].v_samp_factor != 1)
-    return FALSE;
-  /* furthermore, it doesn't work if we've scaled the IDCTs differently */
-  if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
-      cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
-      cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)
-    return FALSE;
-  /* ??? also need to test for upsample-time rescaling, when & if supported */
-  return TRUE;			/* by golly, it'll work... */
-#else
-  return FALSE;
-#endif
-}
-
-
-/*
- * Compute output image dimensions and related values.
- * NOTE: this is exported for possible use by application.
- * Hence it mustn't do anything that can't be done twice.
- * Also note that it may be called before the master module is initialized!
- */
-
-GLOBAL(void)
-jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
-/* Do computations that are needed before master selection phase */
-{
-#ifdef IDCT_SCALING_SUPPORTED
-  int ci;
-  jpeg_component_info *compptr;
-#endif
-
-  /* Prevent application from calling me at wrong times */
-  if (cinfo->global_state != DSTATE_READY)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-#ifdef IDCT_SCALING_SUPPORTED
-
-  /* Compute actual output image dimensions and DCT scaling choices. */
-  if (cinfo->scale_num * 8 <= cinfo->scale_denom) {
-    /* Provide 1/8 scaling */
-    cinfo->output_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width, 8L);
-    cinfo->output_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height, 8L);
-    cinfo->min_DCT_scaled_size = 1;
-  } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {
-    /* Provide 1/4 scaling */
-    cinfo->output_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width, 4L);
-    cinfo->output_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height, 4L);
-    cinfo->min_DCT_scaled_size = 2;
-  } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {
-    /* Provide 1/2 scaling */
-    cinfo->output_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width, 2L);
-    cinfo->output_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height, 2L);
-    cinfo->min_DCT_scaled_size = 4;
-  } else {
-    /* Provide 1/1 scaling */
-    cinfo->output_width = cinfo->image_width;
-    cinfo->output_height = cinfo->image_height;
-    cinfo->min_DCT_scaled_size = DCTSIZE;
-  }
-  /* In selecting the actual DCT scaling for each component, we try to
-   * scale up the chroma components via IDCT scaling rather than upsampling.
-   * This saves time if the upsampler gets to use 1:1 scaling.
-   * Note this code assumes that the supported DCT scalings are powers of 2.
-   */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    int ssize = cinfo->min_DCT_scaled_size;
-    while (ssize < DCTSIZE &&
-	   (compptr->h_samp_factor * ssize * 2 <=
-	    cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&
-	   (compptr->v_samp_factor * ssize * 2 <=
-	    cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {
-      ssize = ssize * 2;
-    }
-    compptr->DCT_scaled_size = ssize;
-  }
-
-  /* Recompute downsampled dimensions of components;
-   * application needs to know these if using raw downsampled data.
-   */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Size in samples, after IDCT scaling */
-    compptr->downsampled_width = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_width *
-		    (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),
-		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
-    compptr->downsampled_height = (JDIMENSION)
-      jdiv_round_up((long) cinfo->image_height *
-		    (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),
-		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
-  }
-
-#else /* !IDCT_SCALING_SUPPORTED */
-
-  /* Hardwire it to "no scaling" */
-  cinfo->output_width = cinfo->image_width;
-  cinfo->output_height = cinfo->image_height;
-  /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,
-   * and has computed unscaled downsampled_width and downsampled_height.
-   */
-
-#endif /* IDCT_SCALING_SUPPORTED */
-
-  /* Report number of components in selected colorspace. */
-  /* Probably this should be in the color conversion module... */
-  switch (cinfo->out_color_space) {
-  case JCS_GRAYSCALE:
-    cinfo->out_color_components = 1;
-    break;
-  case JCS_RGB:
-#if RGB_PIXELSIZE != 3
-    cinfo->out_color_components = RGB_PIXELSIZE;
-    break;
-#endif /* else share code with YCbCr */
-  case JCS_YCbCr:
-    cinfo->out_color_components = 3;
-    break;
-  case JCS_CMYK:
-  case JCS_YCCK:
-    cinfo->out_color_components = 4;
-    break;
-  default:			/* else must be same colorspace as in file */
-    cinfo->out_color_components = cinfo->num_components;
-    break;
-  }
-  cinfo->output_components = (cinfo->quantize_colors ? 1 :
-			      cinfo->out_color_components);
-
-  /* See if upsampler will want to emit more than one row at a time */
-  if (use_merged_upsample(cinfo))
-    cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;
-  else
-    cinfo->rec_outbuf_height = 1;
-}
-
-
-/*
- * Several decompression processes need to range-limit values to the range
- * 0..MAXJSAMPLE; the input value may fall somewhat outside this range
- * due to noise introduced by quantization, roundoff error, etc.  These
- * processes are inner loops and need to be as fast as possible.  On most
- * machines, particularly CPUs with pipelines or instruction prefetch,
- * a (subscript-check-less) C table lookup
- *		x = sample_range_limit[x];
- * is faster than explicit tests
- *		if (x < 0)  x = 0;
- *		else if (x > MAXJSAMPLE)  x = MAXJSAMPLE;
- * These processes all use a common table prepared by the routine below.
- *
- * For most steps we can mathematically guarantee that the initial value
- * of x is within MAXJSAMPLE+1 of the legal range, so a table running from
- * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient.  But for the initial
- * limiting step (just after the IDCT), a wildly out-of-range value is 
- * possible if the input data is corrupt.  To avoid any chance of indexing
- * off the end of memory and getting a bad-pointer trap, we perform the
- * post-IDCT limiting thus:
- *		x = range_limit[x & MASK];
- * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit
- * samples.  Under normal circumstances this is more than enough range and
- * a correct output will be generated; with bogus input data the mask will
- * cause wraparound, and we will safely generate a bogus-but-in-range output.
- * For the post-IDCT step, we want to convert the data from signed to unsigned
- * representation by adding CENTERJSAMPLE at the same time that we limit it.
- * So the post-IDCT limiting table ends up looking like this:
- *   CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE,
- *   MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
- *   0          (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),
- *   0,1,...,CENTERJSAMPLE-1
- * Negative inputs select values from the upper half of the table after
- * masking.
- *
- * We can save some space by overlapping the start of the post-IDCT table
- * with the simpler range limiting table.  The post-IDCT table begins at
- * sample_range_limit + CENTERJSAMPLE.
- *
- * Note that the table is allocated in near data space on PCs; it's small
- * enough and used often enough to justify this.
- */
-
-LOCAL(void)
-prepare_range_limit_table (j_decompress_ptr cinfo)
-/* Allocate and fill in the sample_range_limit table */
-{
-  JSAMPLE * table;
-  int i;
-
-  table = (JSAMPLE *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-		(5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE));
-  table += (MAXJSAMPLE+1);	/* allow negative subscripts of simple table */
-  cinfo->sample_range_limit = table;
-  /* First segment of "simple" table: limit[x] = 0 for x < 0 */
-  MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE));
-  /* Main part of "simple" table: limit[x] = x */
-  for (i = 0; i <= MAXJSAMPLE; i++)
-    table[i] = (JSAMPLE) i;
-  table += CENTERJSAMPLE;	/* Point to where post-IDCT table starts */
-  /* End of simple table, rest of first half of post-IDCT table */
-  for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++)
-    table[i] = MAXJSAMPLE;
-  /* Second half of post-IDCT table */
-  MEMZERO(table + (2 * (MAXJSAMPLE+1)),
-	  (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE));
-  MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE),
-	  cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE));
-}
-
-
-/*
- * Master selection of decompression modules.
- * This is done once at jpeg_start_decompress time.  We determine
- * which modules will be used and give them appropriate initialization calls.
- * We also initialize the decompressor input side to begin consuming data.
- *
- * Since jpeg_read_header has finished, we know what is in the SOF
- * and (first) SOS markers.  We also have all the application parameter
- * settings.
- */
-
-LOCAL(void)
-master_selection (j_decompress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-  boolean use_c_buffer;
-  long samplesperrow;
-  JDIMENSION jd_samplesperrow;
-
-  /* Initialize dimensions and other stuff */
-  jpeg_calc_output_dimensions(cinfo);
-  prepare_range_limit_table(cinfo);
-
-  /* Width of an output scanline must be representable as JDIMENSION. */
-  samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components;
-  jd_samplesperrow = (JDIMENSION) samplesperrow;
-  if ((long) jd_samplesperrow != samplesperrow)
-    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
-
-  /* Initialize my private state */
-  master->pass_number = 0;
-  master->using_merged_upsample = use_merged_upsample(cinfo);
-
-  /* Color quantizer selection */
-  master->quantizer_1pass = NULL;
-  master->quantizer_2pass = NULL;
-  /* No mode changes if not using buffered-image mode. */
-  if (! cinfo->quantize_colors || ! cinfo->buffered_image) {
-    cinfo->enable_1pass_quant = FALSE;
-    cinfo->enable_external_quant = FALSE;
-    cinfo->enable_2pass_quant = FALSE;
-  }
-  if (cinfo->quantize_colors) {
-    if (cinfo->raw_data_out)
-      ERREXIT(cinfo, JERR_NOTIMPL);
-    /* 2-pass quantizer only works in 3-component color space. */
-    if (cinfo->out_color_components != 3) {
-      cinfo->enable_1pass_quant = TRUE;
-      cinfo->enable_external_quant = FALSE;
-      cinfo->enable_2pass_quant = FALSE;
-      cinfo->colormap = NULL;
-    } else if (cinfo->colormap != NULL) {
-      cinfo->enable_external_quant = TRUE;
-    } else if (cinfo->two_pass_quantize) {
-      cinfo->enable_2pass_quant = TRUE;
-    } else {
-      cinfo->enable_1pass_quant = TRUE;
-    }
-
-    if (cinfo->enable_1pass_quant) {
-#ifdef QUANT_1PASS_SUPPORTED
-      jinit_1pass_quantizer(cinfo);
-      master->quantizer_1pass = cinfo->cquantize;
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    }
-
-    /* We use the 2-pass code to map to external colormaps. */
-    if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) {
-#ifdef QUANT_2PASS_SUPPORTED
-      jinit_2pass_quantizer(cinfo);
-      master->quantizer_2pass = cinfo->cquantize;
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    }
-    /* If both quantizers are initialized, the 2-pass one is left active;
-     * this is necessary for starting with quantization to an external map.
-     */
-  }
-
-  /* Post-processing: in particular, color conversion first */
-  if (! cinfo->raw_data_out) {
-    if (master->using_merged_upsample) {
-#ifdef UPSAMPLE_MERGING_SUPPORTED
-      jinit_merged_upsampler(cinfo); /* does color conversion too */
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    } else {
-      jinit_color_deconverter(cinfo);
-      jinit_upsampler(cinfo);
-    }
-    jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant);
-  }
-  /* Inverse DCT */
-  jinit_inverse_dct(cinfo);
-  /* Entropy decoding: either Huffman or arithmetic coding. */
-  if (cinfo->arith_code) {
-    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
-  } else {
-    if (cinfo->progressive_mode) {
-#ifdef D_PROGRESSIVE_SUPPORTED
-      jinit_phuff_decoder(cinfo);
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    } else
-      jinit_huff_decoder(cinfo);
-  }
-
-  /* Initialize principal buffer controllers. */
-  use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image;
-  jinit_d_coef_controller(cinfo, use_c_buffer);
-
-  if (! cinfo->raw_data_out)
-    jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */);
-
-  /* We can now tell the memory manager to allocate virtual arrays. */
-  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
-
-  /* Initialize input side of decompressor to consume first scan. */
-  (*cinfo->inputctl->start_input_pass) (cinfo);
-
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-  /* If jpeg_start_decompress will read the whole file, initialize
-   * progress monitoring appropriately.  The input step is counted
-   * as one pass.
-   */
-  if (cinfo->progress != NULL && ! cinfo->buffered_image &&
-      cinfo->inputctl->has_multiple_scans) {
-    int nscans;
-    /* Estimate number of scans to set pass_limit. */
-    if (cinfo->progressive_mode) {
-      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */
-      nscans = 2 + 3 * cinfo->num_components;
-    } else {
-      /* For a nonprogressive multiscan file, estimate 1 scan per component. */
-      nscans = cinfo->num_components;
-    }
-    cinfo->progress->pass_counter = 0L;
-    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;
-    cinfo->progress->completed_passes = 0;
-    cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2);
-    /* Count the input pass as done */
-    master->pass_number++;
-  }
-#endif /* D_MULTISCAN_FILES_SUPPORTED */
-}
-
-
-/*
- * Per-pass setup.
- * This is called at the beginning of each output pass.  We determine which
- * modules will be active during this pass and give them appropriate
- * start_pass calls.  We also set is_dummy_pass to indicate whether this
- * is a "real" output pass or a dummy pass for color quantization.
- * (In the latter case, jdapistd.c will crank the pass to completion.)
- */
-
-METHODDEF(void)
-prepare_for_output_pass (j_decompress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-
-  if (master->pub.is_dummy_pass) {
-#ifdef QUANT_2PASS_SUPPORTED
-    /* Final pass of 2-pass quantization */
-    master->pub.is_dummy_pass = FALSE;
-    (*cinfo->cquantize->start_pass) (cinfo, FALSE);
-    (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST);
-    (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST);
-#else
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif /* QUANT_2PASS_SUPPORTED */
-  } else {
-    if (cinfo->quantize_colors && cinfo->colormap == NULL) {
-      /* Select new quantization method */
-      if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) {
-	cinfo->cquantize = master->quantizer_2pass;
-	master->pub.is_dummy_pass = TRUE;
-      } else if (cinfo->enable_1pass_quant) {
-	cinfo->cquantize = master->quantizer_1pass;
-      } else {
-	ERREXIT(cinfo, JERR_MODE_CHANGE);
-      }
-    }
-    (*cinfo->idct->start_pass) (cinfo);
-    (*cinfo->coef->start_output_pass) (cinfo);
-    if (! cinfo->raw_data_out) {
-      if (! master->using_merged_upsample)
-	(*cinfo->cconvert->start_pass) (cinfo);
-      (*cinfo->upsample->start_pass) (cinfo);
-      if (cinfo->quantize_colors)
-	(*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass);
-      (*cinfo->post->start_pass) (cinfo,
-	    (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));
-      (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);
-    }
-  }
-
-  /* Set up progress monitor's pass info if present */
-  if (cinfo->progress != NULL) {
-    cinfo->progress->completed_passes = master->pass_number;
-    cinfo->progress->total_passes = master->pass_number +
-				    (master->pub.is_dummy_pass ? 2 : 1);
-    /* In buffered-image mode, we assume one more output pass if EOI not
-     * yet reached, but no more passes if EOI has been reached.
-     */
-    if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) {
-      cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1);
-    }
-  }
-}
-
-
-/*
- * Finish up at end of an output pass.
- */
-
-METHODDEF(void)
-finish_output_pass (j_decompress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-
-  if (cinfo->quantize_colors)
-    (*cinfo->cquantize->finish_pass) (cinfo);
-  master->pass_number++;
-}
-
-
-#ifdef D_MULTISCAN_FILES_SUPPORTED
-
-/*
- * Switch to a new external colormap between output passes.
- */
-
-GLOBAL(void)
-jpeg_new_colormap (j_decompress_ptr cinfo)
-{
-  my_master_ptr master = (my_master_ptr) cinfo->master;
-
-  /* Prevent application from calling me at wrong times */
-  if (cinfo->global_state != DSTATE_BUFIMAGE)
-    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-
-  if (cinfo->quantize_colors && cinfo->enable_external_quant &&
-      cinfo->colormap != NULL) {
-    /* Select 2-pass quantizer for external colormap use */
-    cinfo->cquantize = master->quantizer_2pass;
-    /* Notify quantizer of colormap change */
-    (*cinfo->cquantize->new_color_map) (cinfo);
-    master->pub.is_dummy_pass = FALSE; /* just in case */
-  } else
-    ERREXIT(cinfo, JERR_MODE_CHANGE);
-}
-
-#endif /* D_MULTISCAN_FILES_SUPPORTED */
-
-
-/*
- * Initialize master decompression control and select active modules.
- * This is performed at the start of jpeg_start_decompress.
- */
-
-GLOBAL(void)
-jinit_master_decompress (j_decompress_ptr cinfo)
-{
-  my_master_ptr master;
-
-  master = (my_master_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(my_decomp_master));
-  cinfo->master = (struct jpeg_decomp_master *) master;
-  master->pub.prepare_for_output_pass = prepare_for_output_pass;
-  master->pub.finish_output_pass = finish_output_pass;
-
-  master->pub.is_dummy_pass = FALSE;
-
-  master_selection(cinfo);
-}
diff --git a/tkimg1.3/libjpeg/jdmerge.c b/tkimg1.3/libjpeg/jdmerge.c
deleted file mode 100644
index 3744446..0000000
--- a/tkimg1.3/libjpeg/jdmerge.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * jdmerge.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains code for merged upsampling/color conversion.
- *
- * This file combines functions from jdsample.c and jdcolor.c;
- * read those files first to understand what's going on.
- *
- * When the chroma components are to be upsampled by simple replication
- * (ie, box filtering), we can save some work in color conversion by
- * calculating all the output pixels corresponding to a pair of chroma
- * samples at one time.  In the conversion equations
- *	R = Y           + K1 * Cr
- *	G = Y + K2 * Cb + K3 * Cr
- *	B = Y + K4 * Cb
- * only the Y term varies among the group of pixels corresponding to a pair
- * of chroma samples, so the rest of the terms can be calculated just once.
- * At typical sampling ratios, this eliminates half or three-quarters of the
- * multiplications needed for color conversion.
- *
- * This file currently provides implementations for the following cases:
- *	YCbCr => RGB color conversion only.
- *	Sampling ratios of 2h1v or 2h2v.
- *	No scaling needed at upsample time.
- *	Corner-aligned (non-CCIR601) sampling alignment.
- * Other special cases could be added, but in most applications these are
- * the only common cases.  (For uncommon cases we fall back on the more
- * general code in jdsample.c and jdcolor.c.)
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-#ifdef UPSAMPLE_MERGING_SUPPORTED
-
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_upsampler pub;	/* public fields */
-
-  /* Pointer to routine to do actual upsampling/conversion of one row group */
-  JMETHOD(void, upmethod, (j_decompress_ptr cinfo,
-			   JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
-			   JSAMPARRAY output_buf));
-
-  /* Private state for YCC->RGB conversion */
-  int * Cr_r_tab;		/* => table for Cr to R conversion */
-  int * Cb_b_tab;		/* => table for Cb to B conversion */
-  INT32 * Cr_g_tab;		/* => table for Cr to G conversion */
-  INT32 * Cb_g_tab;		/* => table for Cb to G conversion */
-
-  /* For 2:1 vertical sampling, we produce two output rows at a time.
-   * We need a "spare" row buffer to hold the second output row if the
-   * application provides just a one-row buffer; we also use the spare
-   * to discard the dummy last row if the image height is odd.
-   */
-  JSAMPROW spare_row;
-  boolean spare_full;		/* T if spare buffer is occupied */
-
-  JDIMENSION out_row_width;	/* samples per output row */
-  JDIMENSION rows_to_go;	/* counts rows remaining in image */
-} my_upsampler;
-
-typedef my_upsampler * my_upsample_ptr;
-
-#define SCALEBITS	16	/* speediest right-shift on some machines */
-#define ONE_HALF	((INT32) 1 << (SCALEBITS-1))
-#define FIX(x)		((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
-
-
-/*
- * Initialize tables for YCC->RGB colorspace conversion.
- * This is taken directly from jdcolor.c; see that file for more info.
- */
-
-LOCAL(void)
-build_ycc_rgb_table (j_decompress_ptr cinfo)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  int i;
-  INT32 x;
-  SHIFT_TEMPS
-
-  upsample->Cr_r_tab = (int *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(int));
-  upsample->Cb_b_tab = (int *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(int));
-  upsample->Cr_g_tab = (INT32 *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(INT32));
-  upsample->Cb_g_tab = (INT32 *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(MAXJSAMPLE+1) * SIZEOF(INT32));
-
-  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
-    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
-    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
-    /* Cr=>R value is nearest int to 1.40200 * x */
-    upsample->Cr_r_tab[i] = (int)
-		    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
-    /* Cb=>B value is nearest int to 1.77200 * x */
-    upsample->Cb_b_tab[i] = (int)
-		    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);
-    /* Cr=>G value is scaled-up -0.71414 * x */
-    upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x;
-    /* Cb=>G value is scaled-up -0.34414 * x */
-    /* We also add in ONE_HALF so that need not do it in inner loop */
-    upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;
-  }
-}
-
-
-/*
- * Initialize for an upsampling pass.
- */
-
-METHODDEF(void)
-start_pass_merged_upsample (j_decompress_ptr cinfo)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-
-  /* Mark the spare buffer empty */
-  upsample->spare_full = FALSE;
-  /* Initialize total-height counter for detecting bottom of image */
-  upsample->rows_to_go = cinfo->output_height;
-}
-
-
-/*
- * Control routine to do upsampling (and color conversion).
- *
- * The control routine just handles the row buffering considerations.
- */
-
-METHODDEF(void)
-merged_2v_upsample (j_decompress_ptr cinfo,
-		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-		    JDIMENSION in_row_groups_avail,
-		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-		    JDIMENSION out_rows_avail)
-/* 2:1 vertical sampling case: may need a spare row. */
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  JSAMPROW work_ptrs[2];
-  JDIMENSION num_rows;		/* number of rows returned to caller */
-
-  if (upsample->spare_full) {
-    /* If we have a spare row saved from a previous cycle, just return it. */
-    jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0,
-		      1, upsample->out_row_width);
-    num_rows = 1;
-    upsample->spare_full = FALSE;
-  } else {
-    /* Figure number of rows to return to caller. */
-    num_rows = 2;
-    /* Not more than the distance to the end of the image. */
-    if (num_rows > upsample->rows_to_go)
-      num_rows = upsample->rows_to_go;
-    /* And not more than what the client can accept: */
-    out_rows_avail -= *out_row_ctr;
-    if (num_rows > out_rows_avail)
-      num_rows = out_rows_avail;
-    /* Create output pointer array for upsampler. */
-    work_ptrs[0] = output_buf[*out_row_ctr];
-    if (num_rows > 1) {
-      work_ptrs[1] = output_buf[*out_row_ctr + 1];
-    } else {
-      work_ptrs[1] = upsample->spare_row;
-      upsample->spare_full = TRUE;
-    }
-    /* Now do the upsampling. */
-    (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs);
-  }
-
-  /* Adjust counts */
-  *out_row_ctr += num_rows;
-  upsample->rows_to_go -= num_rows;
-  /* When the buffer is emptied, declare this input row group consumed */
-  if (! upsample->spare_full)
-    (*in_row_group_ctr)++;
-}
-
-
-METHODDEF(void)
-merged_1v_upsample (j_decompress_ptr cinfo,
-		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-		    JDIMENSION in_row_groups_avail,
-		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-		    JDIMENSION out_rows_avail)
-/* 1:1 vertical sampling case: much easier, never need a spare row. */
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-
-  /* Just do the upsampling. */
-  (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,
-			 output_buf + *out_row_ctr);
-  /* Adjust counts */
-  (*out_row_ctr)++;
-  (*in_row_group_ctr)++;
-}
-
-
-/*
- * These are the routines invoked by the control routines to do
- * the actual upsampling/conversion.  One row group is processed per call.
- *
- * Note: since we may be writing directly into application-supplied buffers,
- * we have to be honest about the output width; we can't assume the buffer
- * has been rounded up to an even width.
- */
-
-
-/*
- * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
- */
-
-METHODDEF(void)
-h2v1_merged_upsample (j_decompress_ptr cinfo,
-		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
-		      JSAMPARRAY output_buf)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  register int y, cred, cgreen, cblue;
-  int cb, cr;
-  register JSAMPROW outptr;
-  JSAMPROW inptr0, inptr1, inptr2;
-  JDIMENSION col;
-  /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  int * Crrtab = upsample->Cr_r_tab;
-  int * Cbbtab = upsample->Cb_b_tab;
-  INT32 * Crgtab = upsample->Cr_g_tab;
-  INT32 * Cbgtab = upsample->Cb_g_tab;
-  SHIFT_TEMPS
-
-  inptr0 = input_buf[0][in_row_group_ctr];
-  inptr1 = input_buf[1][in_row_group_ctr];
-  inptr2 = input_buf[2][in_row_group_ctr];
-  outptr = output_buf[0];
-  /* Loop for each pair of output pixels */
-  for (col = cinfo->output_width >> 1; col > 0; col--) {
-    /* Do the chroma part of the calculation */
-    cb = GETJSAMPLE(*inptr1++);
-    cr = GETJSAMPLE(*inptr2++);
-    cred = Crrtab[cr];
-    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
-    cblue = Cbbtab[cb];
-    /* Fetch 2 Y values and emit 2 pixels */
-    y  = GETJSAMPLE(*inptr0++);
-    outptr[RGB_RED] =   range_limit[y + cred];
-    outptr[RGB_GREEN] = range_limit[y + cgreen];
-    outptr[RGB_BLUE] =  range_limit[y + cblue];
-    outptr += RGB_PIXELSIZE;
-    y  = GETJSAMPLE(*inptr0++);
-    outptr[RGB_RED] =   range_limit[y + cred];
-    outptr[RGB_GREEN] = range_limit[y + cgreen];
-    outptr[RGB_BLUE] =  range_limit[y + cblue];
-    outptr += RGB_PIXELSIZE;
-  }
-  /* If image width is odd, do the last output column separately */
-  if (cinfo->output_width & 1) {
-    cb = GETJSAMPLE(*inptr1);
-    cr = GETJSAMPLE(*inptr2);
-    cred = Crrtab[cr];
-    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
-    cblue = Cbbtab[cb];
-    y  = GETJSAMPLE(*inptr0);
-    outptr[RGB_RED] =   range_limit[y + cred];
-    outptr[RGB_GREEN] = range_limit[y + cgreen];
-    outptr[RGB_BLUE] =  range_limit[y + cblue];
-  }
-}
-
-
-/*
- * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
- */
-
-METHODDEF(void)
-h2v2_merged_upsample (j_decompress_ptr cinfo,
-		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
-		      JSAMPARRAY output_buf)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  register int y, cred, cgreen, cblue;
-  int cb, cr;
-  register JSAMPROW outptr0, outptr1;
-  JSAMPROW inptr00, inptr01, inptr1, inptr2;
-  JDIMENSION col;
-  /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  int * Crrtab = upsample->Cr_r_tab;
-  int * Cbbtab = upsample->Cb_b_tab;
-  INT32 * Crgtab = upsample->Cr_g_tab;
-  INT32 * Cbgtab = upsample->Cb_g_tab;
-  SHIFT_TEMPS
-
-  inptr00 = input_buf[0][in_row_group_ctr*2];
-  inptr01 = input_buf[0][in_row_group_ctr*2 + 1];
-  inptr1 = input_buf[1][in_row_group_ctr];
-  inptr2 = input_buf[2][in_row_group_ctr];
-  outptr0 = output_buf[0];
-  outptr1 = output_buf[1];
-  /* Loop for each group of output pixels */
-  for (col = cinfo->output_width >> 1; col > 0; col--) {
-    /* Do the chroma part of the calculation */
-    cb = GETJSAMPLE(*inptr1++);
-    cr = GETJSAMPLE(*inptr2++);
-    cred = Crrtab[cr];
-    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
-    cblue = Cbbtab[cb];
-    /* Fetch 4 Y values and emit 4 pixels */
-    y  = GETJSAMPLE(*inptr00++);
-    outptr0[RGB_RED] =   range_limit[y + cred];
-    outptr0[RGB_GREEN] = range_limit[y + cgreen];
-    outptr0[RGB_BLUE] =  range_limit[y + cblue];
-    outptr0 += RGB_PIXELSIZE;
-    y  = GETJSAMPLE(*inptr00++);
-    outptr0[RGB_RED] =   range_limit[y + cred];
-    outptr0[RGB_GREEN] = range_limit[y + cgreen];
-    outptr0[RGB_BLUE] =  range_limit[y + cblue];
-    outptr0 += RGB_PIXELSIZE;
-    y  = GETJSAMPLE(*inptr01++);
-    outptr1[RGB_RED] =   range_limit[y + cred];
-    outptr1[RGB_GREEN] = range_limit[y + cgreen];
-    outptr1[RGB_BLUE] =  range_limit[y + cblue];
-    outptr1 += RGB_PIXELSIZE;
-    y  = GETJSAMPLE(*inptr01++);
-    outptr1[RGB_RED] =   range_limit[y + cred];
-    outptr1[RGB_GREEN] = range_limit[y + cgreen];
-    outptr1[RGB_BLUE] =  range_limit[y + cblue];
-    outptr1 += RGB_PIXELSIZE;
-  }
-  /* If image width is odd, do the last output column separately */
-  if (cinfo->output_width & 1) {
-    cb = GETJSAMPLE(*inptr1);
-    cr = GETJSAMPLE(*inptr2);
-    cred = Crrtab[cr];
-    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);
-    cblue = Cbbtab[cb];
-    y  = GETJSAMPLE(*inptr00);
-    outptr0[RGB_RED] =   range_limit[y + cred];
-    outptr0[RGB_GREEN] = range_limit[y + cgreen];
-    outptr0[RGB_BLUE] =  range_limit[y + cblue];
-    y  = GETJSAMPLE(*inptr01);
-    outptr1[RGB_RED] =   range_limit[y + cred];
-    outptr1[RGB_GREEN] = range_limit[y + cgreen];
-    outptr1[RGB_BLUE] =  range_limit[y + cblue];
-  }
-}
-
-
-/*
- * Module initialization routine for merged upsampling/color conversion.
- *
- * NB: this is called under the conditions determined by use_merged_upsample()
- * in jdmaster.c.  That routine MUST correspond to the actual capabilities
- * of this module; no safety checks are made here.
- */
-
-GLOBAL(void)
-jinit_merged_upsampler (j_decompress_ptr cinfo)
-{
-  my_upsample_ptr upsample;
-
-  upsample = (my_upsample_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_upsampler));
-  cinfo->upsample = (struct jpeg_upsampler *) upsample;
-  upsample->pub.start_pass = start_pass_merged_upsample;
-  upsample->pub.need_context_rows = FALSE;
-
-  upsample->out_row_width = cinfo->output_width * cinfo->out_color_components;
-
-  if (cinfo->max_v_samp_factor == 2) {
-    upsample->pub.upsample = merged_2v_upsample;
-    upsample->upmethod = h2v2_merged_upsample;
-    /* Allocate a spare row buffer */
-    upsample->spare_row = (JSAMPROW)
-      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-		(size_t) (upsample->out_row_width * SIZEOF(JSAMPLE)));
-  } else {
-    upsample->pub.upsample = merged_1v_upsample;
-    upsample->upmethod = h2v1_merged_upsample;
-    /* No spare row needed */
-    upsample->spare_row = NULL;
-  }
-
-  build_ycc_rgb_table(cinfo);
-}
-
-#endif /* UPSAMPLE_MERGING_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jdphuff.c b/tkimg1.3/libjpeg/jdphuff.c
deleted file mode 100644
index 2267809..0000000
--- a/tkimg1.3/libjpeg/jdphuff.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * jdphuff.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy decoding routines for progressive JPEG.
- *
- * Much of the complexity here has to do with supporting input suspension.
- * If the data source module demands suspension, we want to be able to back
- * up to the start of the current MCU.  To do this, we copy state variables
- * into local working storage, and update them back to the permanent
- * storage only upon successful completion of an MCU.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdhuff.h"		/* Declarations shared with jdhuff.c */
-
-
-#ifdef D_PROGRESSIVE_SUPPORTED
-
-/*
- * Expanded entropy decoder object for progressive Huffman decoding.
- *
- * The savable_state subrecord contains fields that change within an MCU,
- * but must not be updated permanently until we complete the MCU.
- */
-
-typedef struct {
-  unsigned int EOBRUN;			/* remaining EOBs in EOBRUN */
-  int last_dc_val[MAX_COMPS_IN_SCAN];	/* last DC coef for each component */
-} savable_state;
-
-/* This macro is to work around compilers with missing or broken
- * structure assignment.  You'll need to fix this code if you have
- * such a compiler and you change MAX_COMPS_IN_SCAN.
- */
-
-#ifndef NO_STRUCT_ASSIGN
-#define ASSIGN_STATE(dest,src)  ((dest) = (src))
-#else
-#if MAX_COMPS_IN_SCAN == 4
-#define ASSIGN_STATE(dest,src)  \
-	((dest).EOBRUN = (src).EOBRUN, \
-	 (dest).last_dc_val[0] = (src).last_dc_val[0], \
-	 (dest).last_dc_val[1] = (src).last_dc_val[1], \
-	 (dest).last_dc_val[2] = (src).last_dc_val[2], \
-	 (dest).last_dc_val[3] = (src).last_dc_val[3])
-#endif
-#endif
-
-
-typedef struct {
-  struct jpeg_entropy_decoder pub; /* public fields */
-
-  /* These fields are loaded into local variables at start of each MCU.
-   * In case of suspension, we exit WITHOUT updating them.
-   */
-  bitread_perm_state bitstate;	/* Bit buffer at start of MCU */
-  savable_state saved;		/* Other state at start of MCU */
-
-  /* These fields are NOT loaded into local working state. */
-  unsigned int restarts_to_go;	/* MCUs left in this restart interval */
-
-  /* Pointers to derived tables (these workspaces have image lifespan) */
-  d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
-
-  d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
-} phuff_entropy_decoder;
-
-typedef phuff_entropy_decoder * phuff_entropy_ptr;
-
-/* Forward declarations */
-METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
-					    JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
-					    JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
-					     JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
-					     JBLOCKROW *MCU_data));
-
-
-/*
- * Initialize for a Huffman-compressed scan.
- */
-
-METHODDEF(void)
-start_pass_phuff_decoder (j_decompress_ptr cinfo)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  boolean is_DC_band, bad;
-  int ci, coefi, tbl;
-  int *coef_bit_ptr;
-  jpeg_component_info * compptr;
-
-  is_DC_band = (cinfo->Ss == 0);
-
-  /* Validate scan parameters */
-  bad = FALSE;
-  if (is_DC_band) {
-    if (cinfo->Se != 0)
-      bad = TRUE;
-  } else {
-    /* need not check Ss/Se < 0 since they came from unsigned bytes */
-    if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2)
-      bad = TRUE;
-    /* AC scans may have only one component */
-    if (cinfo->comps_in_scan != 1)
-      bad = TRUE;
-  }
-  if (cinfo->Ah != 0) {
-    /* Successive approximation refinement scan: must have Al = Ah-1. */
-    if (cinfo->Al != cinfo->Ah-1)
-      bad = TRUE;
-  }
-  if (cinfo->Al > 13)		/* need not check for < 0 */
-    bad = TRUE;
-  /* Arguably the maximum Al value should be less than 13 for 8-bit precision,
-   * but the spec doesn't say so, and we try to be liberal about what we
-   * accept.  Note: large Al values could result in out-of-range DC
-   * coefficients during early scans, leading to bizarre displays due to
-   * overflows in the IDCT math.  But we won't crash.
-   */
-  if (bad)
-    ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
-	     cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
-  /* Update progression status, and verify that scan order is legal.
-   * Note that inter-scan inconsistencies are treated as warnings
-   * not fatal errors ... not clear if this is right way to behave.
-   */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    int cindex = cinfo->cur_comp_info[ci]->component_index;
-    coef_bit_ptr = & cinfo->coef_bits[cindex][0];
-    if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
-      WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
-    for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
-      int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
-      if (cinfo->Ah != expected)
-	WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
-      coef_bit_ptr[coefi] = cinfo->Al;
-    }
-  }
-
-  /* Select MCU decoding routine */
-  if (cinfo->Ah == 0) {
-    if (is_DC_band)
-      entropy->pub.decode_mcu = decode_mcu_DC_first;
-    else
-      entropy->pub.decode_mcu = decode_mcu_AC_first;
-  } else {
-    if (is_DC_band)
-      entropy->pub.decode_mcu = decode_mcu_DC_refine;
-    else
-      entropy->pub.decode_mcu = decode_mcu_AC_refine;
-  }
-
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
-    compptr = cinfo->cur_comp_info[ci];
-    /* Make sure requested tables are present, and compute derived tables.
-     * We may build same derived table more than once, but it's not expensive.
-     */
-    if (is_DC_band) {
-      if (cinfo->Ah == 0) {	/* DC refinement needs no table */
-	tbl = compptr->dc_tbl_no;
-	jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
-				& entropy->derived_tbls[tbl]);
-      }
-    } else {
-      tbl = compptr->ac_tbl_no;
-      jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
-			      & entropy->derived_tbls[tbl]);
-      /* remember the single active table */
-      entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
-    }
-    /* Initialize DC predictions to 0 */
-    entropy->saved.last_dc_val[ci] = 0;
-  }
-
-  /* Initialize bitread state variables */
-  entropy->bitstate.bits_left = 0;
-  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
-  entropy->pub.insufficient_data = FALSE;
-
-  /* Initialize private state variables */
-  entropy->saved.EOBRUN = 0;
-
-  /* Initialize restart counter */
-  entropy->restarts_to_go = cinfo->restart_interval;
-}
-
-
-/*
- * Figure F.12: extend sign bit.
- * On some machines, a shift and add will be faster than a table lookup.
- */
-
-#ifdef AVOID_TABLES
-
-#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
-
-#else
-
-#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
-
-static const int extend_test[16] =   /* entry n is 2**(n-1) */
-  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
-    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
-
-static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
-  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
-    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
-    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
-    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
-
-#endif /* AVOID_TABLES */
-
-
-/*
- * Check for a restart marker & resynchronize decoder.
- * Returns FALSE if must suspend.
- */
-
-LOCAL(boolean)
-process_restart (j_decompress_ptr cinfo)
-{
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  int ci;
-
-  /* Throw away any unused bits remaining in bit buffer; */
-  /* include any full bytes in next_marker's count of discarded bytes */
-  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
-  entropy->bitstate.bits_left = 0;
-
-  /* Advance past the RSTn marker */
-  if (! (*cinfo->marker->read_restart_marker) (cinfo))
-    return FALSE;
-
-  /* Re-initialize DC predictions to 0 */
-  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
-    entropy->saved.last_dc_val[ci] = 0;
-  /* Re-init EOB run count, too */
-  entropy->saved.EOBRUN = 0;
-
-  /* Reset restart counter */
-  entropy->restarts_to_go = cinfo->restart_interval;
-
-  /* Reset out-of-data flag, unless read_restart_marker left us smack up
-   * against a marker.  In that case we will end up treating the next data
-   * segment as empty, and we can avoid producing bogus output pixels by
-   * leaving the flag set.
-   */
-  if (cinfo->unread_marker == 0)
-    entropy->pub.insufficient_data = FALSE;
-
-  return TRUE;
-}
-
-
-/*
- * Huffman MCU decoding.
- * Each of these routines decodes and returns one MCU's worth of
- * Huffman-compressed coefficients. 
- * The coefficients are reordered from zigzag order into natural array order,
- * but are not dequantized.
- *
- * The i'th block of the MCU is stored into the block pointed to by
- * MCU_data[i].  WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
- *
- * We return FALSE if data source requested suspension.  In that case no
- * changes have been made to permanent state.  (Exception: some output
- * coefficients may already have been assigned.  This is harmless for
- * spectral selection, since we'll just re-assign them on the next call.
- * Successive approximation AC refinement has to be more careful, however.)
- */
-
-/*
- * MCU decoding for DC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{   
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  int Al = cinfo->Al;
-  register int s, r;
-  int blkn, ci;
-  JBLOCKROW block;
-  BITREAD_STATE_VARS;
-  savable_state state;
-  d_derived_tbl * tbl;
-  jpeg_component_info * compptr;
-
-  /* Process restart marker if needed; may have to suspend */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! process_restart(cinfo))
-	return FALSE;
-  }
-
-  /* If we've run out of data, just leave the MCU set to zeroes.
-   * This way, we return uniform gray for the remainder of the segment.
-   */
-  if (! entropy->pub.insufficient_data) {
-
-    /* Load up working state */
-    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-    ASSIGN_STATE(state, entropy->saved);
-
-    /* Outer loop handles each block in the MCU */
-
-    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-      block = MCU_data[blkn];
-      ci = cinfo->MCU_membership[blkn];
-      compptr = cinfo->cur_comp_info[ci];
-      tbl = entropy->derived_tbls[compptr->dc_tbl_no];
-
-      /* Decode a single block's worth of coefficients */
-
-      /* Section F.2.2.1: decode the DC coefficient difference */
-      HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
-      if (s) {
-	CHECK_BIT_BUFFER(br_state, s, return FALSE);
-	r = GET_BITS(s);
-	s = HUFF_EXTEND(r, s);
-      }
-
-      /* Convert DC difference to actual value, update last_dc_val */
-      s += state.last_dc_val[ci];
-      state.last_dc_val[ci] = s;
-      /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */
-      (*block)[0] = (JCOEF) (s << Al);
-    }
-
-    /* Completed MCU, so update state */
-    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-    ASSIGN_STATE(entropy->saved, state);
-  }
-
-  /* Account for restart interval (no-op if not using restarts) */
-  entropy->restarts_to_go--;
-
-  return TRUE;
-}
-
-
-/*
- * MCU decoding for AC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{   
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  int Se = cinfo->Se;
-  int Al = cinfo->Al;
-  register int s, k, r;
-  unsigned int EOBRUN;
-  JBLOCKROW block;
-  BITREAD_STATE_VARS;
-  d_derived_tbl * tbl;
-
-  /* Process restart marker if needed; may have to suspend */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! process_restart(cinfo))
-	return FALSE;
-  }
-
-  /* If we've run out of data, just leave the MCU set to zeroes.
-   * This way, we return uniform gray for the remainder of the segment.
-   */
-  if (! entropy->pub.insufficient_data) {
-
-    /* Load up working state.
-     * We can avoid loading/saving bitread state if in an EOB run.
-     */
-    EOBRUN = entropy->saved.EOBRUN;	/* only part of saved state we need */
-
-    /* There is always only one block per MCU */
-
-    if (EOBRUN > 0)		/* if it's a band of zeroes... */
-      EOBRUN--;			/* ...process it now (we do nothing) */
-    else {
-      BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-      block = MCU_data[0];
-      tbl = entropy->ac_derived_tbl;
-
-      for (k = cinfo->Ss; k <= Se; k++) {
-	HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
-	r = s >> 4;
-	s &= 15;
-	if (s) {
-	  k += r;
-	  CHECK_BIT_BUFFER(br_state, s, return FALSE);
-	  r = GET_BITS(s);
-	  s = HUFF_EXTEND(r, s);
-	  /* Scale and output coefficient in natural (dezigzagged) order */
-	  (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
-	} else {
-	  if (r == 15) {	/* ZRL */
-	    k += 15;		/* skip 15 zeroes in band */
-	  } else {		/* EOBr, run length is 2^r + appended bits */
-	    EOBRUN = 1 << r;
-	    if (r) {		/* EOBr, r > 0 */
-	      CHECK_BIT_BUFFER(br_state, r, return FALSE);
-	      r = GET_BITS(r);
-	      EOBRUN += r;
-	    }
-	    EOBRUN--;		/* this band is processed at this moment */
-	    break;		/* force end-of-band */
-	  }
-	}
-      }
-
-      BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-    }
-
-    /* Completed MCU, so update state */
-    entropy->saved.EOBRUN = EOBRUN;	/* only part of saved state we need */
-  }
-
-  /* Account for restart interval (no-op if not using restarts) */
-  entropy->restarts_to_go--;
-
-  return TRUE;
-}
-
-
-/*
- * MCU decoding for DC successive approximation refinement scan.
- * Note: we assume such scans can be multi-component, although the spec
- * is not very clear on the point.
- */
-
-METHODDEF(boolean)
-decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{   
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
-  int blkn;
-  JBLOCKROW block;
-  BITREAD_STATE_VARS;
-
-  /* Process restart marker if needed; may have to suspend */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! process_restart(cinfo))
-	return FALSE;
-  }
-
-  /* Not worth the cycles to check insufficient_data here,
-   * since we will not change the data anyway if we read zeroes.
-   */
-
-  /* Load up working state */
-  BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-
-  /* Outer loop handles each block in the MCU */
-
-  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
-    block = MCU_data[blkn];
-
-    /* Encoded data is simply the next bit of the two's-complement DC value */
-    CHECK_BIT_BUFFER(br_state, 1, return FALSE);
-    if (GET_BITS(1))
-      (*block)[0] |= p1;
-    /* Note: since we use |=, repeating the assignment later is safe */
-  }
-
-  /* Completed MCU, so update state */
-  BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-
-  /* Account for restart interval (no-op if not using restarts) */
-  entropy->restarts_to_go--;
-
-  return TRUE;
-}
-
-
-/*
- * MCU decoding for AC successive approximation refinement scan.
- */
-
-METHODDEF(boolean)
-decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{   
-  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-  int Se = cinfo->Se;
-  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
-  int m1 = (-1) << cinfo->Al;	/* -1 in the bit position being coded */
-  register int s, k, r;
-  unsigned int EOBRUN;
-  JBLOCKROW block;
-  JCOEFPTR thiscoef;
-  BITREAD_STATE_VARS;
-  d_derived_tbl * tbl;
-  int num_newnz;
-  int newnz_pos[DCTSIZE2];
-
-  /* Process restart marker if needed; may have to suspend */
-  if (cinfo->restart_interval) {
-    if (entropy->restarts_to_go == 0)
-      if (! process_restart(cinfo))
-	return FALSE;
-  }
-
-  /* If we've run out of data, don't modify the MCU.
-   */
-  if (! entropy->pub.insufficient_data) {
-
-    /* Load up working state */
-    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-    EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
-
-    /* There is always only one block per MCU */
-    block = MCU_data[0];
-    tbl = entropy->ac_derived_tbl;
-
-    /* If we are forced to suspend, we must undo the assignments to any newly
-     * nonzero coefficients in the block, because otherwise we'd get confused
-     * next time about which coefficients were already nonzero.
-     * But we need not undo addition of bits to already-nonzero coefficients;
-     * instead, we can test the current bit to see if we already did it.
-     */
-    num_newnz = 0;
-
-    /* initialize coefficient loop counter to start of band */
-    k = cinfo->Ss;
-
-    if (EOBRUN == 0) {
-      for (; k <= Se; k++) {
-	HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
-	r = s >> 4;
-	s &= 15;
-	if (s) {
-	  if (s != 1)		/* size of new coef should always be 1 */
-	    WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
-	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
-	  if (GET_BITS(1))
-	    s = p1;		/* newly nonzero coef is positive */
-	  else
-	    s = m1;		/* newly nonzero coef is negative */
-	} else {
-	  if (r != 15) {
-	    EOBRUN = 1 << r;	/* EOBr, run length is 2^r + appended bits */
-	    if (r) {
-	      CHECK_BIT_BUFFER(br_state, r, goto undoit);
-	      r = GET_BITS(r);
-	      EOBRUN += r;
-	    }
-	    break;		/* rest of block is handled by EOB logic */
-	  }
-	  /* note s = 0 for processing ZRL */
-	}
-	/* Advance over already-nonzero coefs and r still-zero coefs,
-	 * appending correction bits to the nonzeroes.  A correction bit is 1
-	 * if the absolute value of the coefficient must be increased.
-	 */
-	do {
-	  thiscoef = *block + jpeg_natural_order[k];
-	  if (*thiscoef != 0) {
-	    CHECK_BIT_BUFFER(br_state, 1, goto undoit);
-	    if (GET_BITS(1)) {
-	      if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
-		if (*thiscoef >= 0)
-		  *thiscoef += p1;
-		else
-		  *thiscoef += m1;
-	      }
-	    }
-	  } else {
-	    if (--r < 0)
-	      break;		/* reached target zero coefficient */
-	  }
-	  k++;
-	} while (k <= Se);
-	if (s) {
-	  int pos = jpeg_natural_order[k];
-	  /* Output newly nonzero coefficient */
-	  (*block)[pos] = (JCOEF) s;
-	  /* Remember its position in case we have to suspend */
-	  newnz_pos[num_newnz++] = pos;
-	}
-      }
-    }
-
-    if (EOBRUN > 0) {
-      /* Scan any remaining coefficient positions after the end-of-band
-       * (the last newly nonzero coefficient, if any).  Append a correction
-       * bit to each already-nonzero coefficient.  A correction bit is 1
-       * if the absolute value of the coefficient must be increased.
-       */
-      for (; k <= Se; k++) {
-	thiscoef = *block + jpeg_natural_order[k];
-	if (*thiscoef != 0) {
-	  CHECK_BIT_BUFFER(br_state, 1, goto undoit);
-	  if (GET_BITS(1)) {
-	    if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
-	      if (*thiscoef >= 0)
-		*thiscoef += p1;
-	      else
-		*thiscoef += m1;
-	    }
-	  }
-	}
-      }
-      /* Count one block completed in EOB run */
-      EOBRUN--;
-    }
-
-    /* Completed MCU, so update state */
-    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-    entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
-  }
-
-  /* Account for restart interval (no-op if not using restarts) */
-  entropy->restarts_to_go--;
-
-  return TRUE;
-
-undoit:
-  /* Re-zero any output coefficients that we made newly nonzero */
-  while (num_newnz > 0)
-    (*block)[newnz_pos[--num_newnz]] = 0;
-
-  return FALSE;
-}
-
-
-/*
- * Module initialization routine for progressive Huffman entropy decoding.
- */
-
-GLOBAL(void)
-jinit_phuff_decoder (j_decompress_ptr cinfo)
-{
-  phuff_entropy_ptr entropy;
-  int *coef_bit_ptr;
-  int ci, i;
-
-  entropy = (phuff_entropy_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(phuff_entropy_decoder));
-  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
-  entropy->pub.start_pass = start_pass_phuff_decoder;
-
-  /* Mark derived tables unallocated */
-  for (i = 0; i < NUM_HUFF_TBLS; i++) {
-    entropy->derived_tbls[i] = NULL;
-  }
-
-  /* Create progression status table */
-  cinfo->coef_bits = (int (*)[DCTSIZE2])
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				cinfo->num_components*DCTSIZE2*SIZEOF(int));
-  coef_bit_ptr = & cinfo->coef_bits[0][0];
-  for (ci = 0; ci < cinfo->num_components; ci++) 
-    for (i = 0; i < DCTSIZE2; i++)
-      *coef_bit_ptr++ = -1;
-}
-
-#endif /* D_PROGRESSIVE_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jdpostct.c b/tkimg1.3/libjpeg/jdpostct.c
deleted file mode 100644
index 571563d..0000000
--- a/tkimg1.3/libjpeg/jdpostct.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * jdpostct.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the decompression postprocessing controller.
- * This controller manages the upsampling, color conversion, and color
- * quantization/reduction steps; specifically, it controls the buffering
- * between upsample/color conversion and color quantization/reduction.
- *
- * If no color quantization/reduction is required, then this module has no
- * work to do, and it just hands off to the upsample/color conversion code.
- * An integrated upsample/convert/quantize process would replace this module
- * entirely.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Private buffer controller object */
-
-typedef struct {
-  struct jpeg_d_post_controller pub; /* public fields */
-
-  /* Color quantization source buffer: this holds output data from
-   * the upsample/color conversion step to be passed to the quantizer.
-   * For two-pass color quantization, we need a full-image buffer;
-   * for one-pass operation, a strip buffer is sufficient.
-   */
-  jvirt_sarray_ptr whole_image;	/* virtual array, or NULL if one-pass */
-  JSAMPARRAY buffer;		/* strip buffer, or current strip of virtual */
-  JDIMENSION strip_height;	/* buffer size in rows */
-  /* for two-pass mode only: */
-  JDIMENSION starting_row;	/* row # of first row in current strip */
-  JDIMENSION next_row;		/* index of next row to fill/empty in strip */
-} my_post_controller;
-
-typedef my_post_controller * my_post_ptr;
-
-
-/* Forward declarations */
-METHODDEF(void) post_process_1pass
-	JPP((j_decompress_ptr cinfo,
-	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-	     JDIMENSION in_row_groups_avail,
-	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-	     JDIMENSION out_rows_avail));
-#ifdef QUANT_2PASS_SUPPORTED
-METHODDEF(void) post_process_prepass
-	JPP((j_decompress_ptr cinfo,
-	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-	     JDIMENSION in_row_groups_avail,
-	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-	     JDIMENSION out_rows_avail));
-METHODDEF(void) post_process_2pass
-	JPP((j_decompress_ptr cinfo,
-	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-	     JDIMENSION in_row_groups_avail,
-	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-	     JDIMENSION out_rows_avail));
-#endif
-
-
-/*
- * Initialize for a processing pass.
- */
-
-METHODDEF(void)
-start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
-{
-  my_post_ptr post = (my_post_ptr) cinfo->post;
-
-  switch (pass_mode) {
-  case JBUF_PASS_THRU:
-    if (cinfo->quantize_colors) {
-      /* Single-pass processing with color quantization. */
-      post->pub.post_process_data = post_process_1pass;
-      /* We could be doing buffered-image output before starting a 2-pass
-       * color quantization; in that case, jinit_d_post_controller did not
-       * allocate a strip buffer.  Use the virtual-array buffer as workspace.
-       */
-      if (post->buffer == NULL) {
-	post->buffer = (*cinfo->mem->access_virt_sarray)
-	  ((j_common_ptr) cinfo, post->whole_image,
-	   (JDIMENSION) 0, post->strip_height, TRUE);
-      }
-    } else {
-      /* For single-pass processing without color quantization,
-       * I have no work to do; just call the upsampler directly.
-       */
-      post->pub.post_process_data = cinfo->upsample->upsample;
-    }
-    break;
-#ifdef QUANT_2PASS_SUPPORTED
-  case JBUF_SAVE_AND_PASS:
-    /* First pass of 2-pass quantization */
-    if (post->whole_image == NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    post->pub.post_process_data = post_process_prepass;
-    break;
-  case JBUF_CRANK_DEST:
-    /* Second pass of 2-pass quantization */
-    if (post->whole_image == NULL)
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    post->pub.post_process_data = post_process_2pass;
-    break;
-#endif /* QUANT_2PASS_SUPPORTED */
-  default:
-    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    break;
-  }
-  post->starting_row = post->next_row = 0;
-}
-
-
-/*
- * Process some data in the one-pass (strip buffer) case.
- * This is used for color precision reduction as well as one-pass quantization.
- */
-
-METHODDEF(void)
-post_process_1pass (j_decompress_ptr cinfo,
-		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-		    JDIMENSION in_row_groups_avail,
-		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-		    JDIMENSION out_rows_avail)
-{
-  my_post_ptr post = (my_post_ptr) cinfo->post;
-  JDIMENSION num_rows, max_rows;
-
-  /* Fill the buffer, but not more than what we can dump out in one go. */
-  /* Note we rely on the upsampler to detect bottom of image. */
-  max_rows = out_rows_avail - *out_row_ctr;
-  if (max_rows > post->strip_height)
-    max_rows = post->strip_height;
-  num_rows = 0;
-  (*cinfo->upsample->upsample) (cinfo,
-		input_buf, in_row_group_ctr, in_row_groups_avail,
-		post->buffer, &num_rows, max_rows);
-  /* Quantize and emit data. */
-  (*cinfo->cquantize->color_quantize) (cinfo,
-		post->buffer, output_buf + *out_row_ctr, (int) num_rows);
-  *out_row_ctr += num_rows;
-}
-
-
-#ifdef QUANT_2PASS_SUPPORTED
-
-/*
- * Process some data in the first pass of 2-pass quantization.
- */
-
-METHODDEF(void)
-post_process_prepass (j_decompress_ptr cinfo,
-		      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-		      JDIMENSION in_row_groups_avail,
-		      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-		      JDIMENSION out_rows_avail)
-{
-  my_post_ptr post = (my_post_ptr) cinfo->post;
-  JDIMENSION old_next_row, num_rows;
-
-  /* Reposition virtual buffer if at start of strip. */
-  if (post->next_row == 0) {
-    post->buffer = (*cinfo->mem->access_virt_sarray)
-	((j_common_ptr) cinfo, post->whole_image,
-	 post->starting_row, post->strip_height, TRUE);
-  }
-
-  /* Upsample some data (up to a strip height's worth). */
-  old_next_row = post->next_row;
-  (*cinfo->upsample->upsample) (cinfo,
-		input_buf, in_row_group_ctr, in_row_groups_avail,
-		post->buffer, &post->next_row, post->strip_height);
-
-  /* Allow quantizer to scan new data.  No data is emitted, */
-  /* but we advance out_row_ctr so outer loop can tell when we're done. */
-  if (post->next_row > old_next_row) {
-    num_rows = post->next_row - old_next_row;
-    (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row,
-					 (JSAMPARRAY) NULL, (int) num_rows);
-    *out_row_ctr += num_rows;
-  }
-
-  /* Advance if we filled the strip. */
-  if (post->next_row >= post->strip_height) {
-    post->starting_row += post->strip_height;
-    post->next_row = 0;
-  }
-}
-
-
-/*
- * Process some data in the second pass of 2-pass quantization.
- */
-
-METHODDEF(void)
-post_process_2pass (j_decompress_ptr cinfo,
-		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-		    JDIMENSION in_row_groups_avail,
-		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-		    JDIMENSION out_rows_avail)
-{
-  my_post_ptr post = (my_post_ptr) cinfo->post;
-  JDIMENSION num_rows, max_rows;
-
-  /* Reposition virtual buffer if at start of strip. */
-  if (post->next_row == 0) {
-    post->buffer = (*cinfo->mem->access_virt_sarray)
-	((j_common_ptr) cinfo, post->whole_image,
-	 post->starting_row, post->strip_height, FALSE);
-  }
-
-  /* Determine number of rows to emit. */
-  num_rows = post->strip_height - post->next_row; /* available in strip */
-  max_rows = out_rows_avail - *out_row_ctr; /* available in output area */
-  if (num_rows > max_rows)
-    num_rows = max_rows;
-  /* We have to check bottom of image here, can't depend on upsampler. */
-  max_rows = cinfo->output_height - post->starting_row;
-  if (num_rows > max_rows)
-    num_rows = max_rows;
-
-  /* Quantize and emit data. */
-  (*cinfo->cquantize->color_quantize) (cinfo,
-		post->buffer + post->next_row, output_buf + *out_row_ctr,
-		(int) num_rows);
-  *out_row_ctr += num_rows;
-
-  /* Advance if we filled the strip. */
-  post->next_row += num_rows;
-  if (post->next_row >= post->strip_height) {
-    post->starting_row += post->strip_height;
-    post->next_row = 0;
-  }
-}
-
-#endif /* QUANT_2PASS_SUPPORTED */
-
-
-/*
- * Initialize postprocessing controller.
- */
-
-GLOBAL(void)
-jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
-{
-  my_post_ptr post;
-
-  post = (my_post_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_post_controller));
-  cinfo->post = (struct jpeg_d_post_controller *) post;
-  post->pub.start_pass = start_pass_dpost;
-  post->whole_image = NULL;	/* flag for no virtual arrays */
-  post->buffer = NULL;		/* flag for no strip buffer */
-
-  /* Create the quantization buffer, if needed */
-  if (cinfo->quantize_colors) {
-    /* The buffer strip height is max_v_samp_factor, which is typically
-     * an efficient number of rows for upsampling to return.
-     * (In the presence of output rescaling, we might want to be smarter?)
-     */
-    post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;
-    if (need_full_buffer) {
-      /* Two-pass color quantization: need full-image storage. */
-      /* We round up the number of rows to a multiple of the strip height. */
-#ifdef QUANT_2PASS_SUPPORTED
-      post->whole_image = (*cinfo->mem->request_virt_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-	 cinfo->output_width * cinfo->out_color_components,
-	 (JDIMENSION) jround_up((long) cinfo->output_height,
-				(long) post->strip_height),
-	 post->strip_height);
-#else
-      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-#endif /* QUANT_2PASS_SUPPORTED */
-    } else {
-      /* One-pass color quantization: just make a strip buffer. */
-      post->buffer = (*cinfo->mem->alloc_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE,
-	 cinfo->output_width * cinfo->out_color_components,
-	 post->strip_height);
-    }
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdsample.c b/tkimg1.3/libjpeg/jdsample.c
deleted file mode 100644
index 80ffefb..0000000
--- a/tkimg1.3/libjpeg/jdsample.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * jdsample.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains upsampling routines.
- *
- * Upsampling input data is counted in "row groups".  A row group
- * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
- * sample rows of each component.  Upsampling will normally produce
- * max_v_samp_factor pixel rows from each row group (but this could vary
- * if the upsampler is applying a scale factor of its own).
- *
- * An excellent reference for image resampling is
- *   Digital Image Warping, George Wolberg, 1990.
- *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Pointer to routine to upsample a single component */
-typedef JMETHOD(void, upsample1_ptr,
-		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_upsampler pub;	/* public fields */
-
-  /* Color conversion buffer.  When using separate upsampling and color
-   * conversion steps, this buffer holds one upsampled row group until it
-   * has been color converted and output.
-   * Note: we do not allocate any storage for component(s) which are full-size,
-   * ie do not need rescaling.  The corresponding entry of color_buf[] is
-   * simply set to point to the input data array, thereby avoiding copying.
-   */
-  JSAMPARRAY color_buf[MAX_COMPONENTS];
-
-  /* Per-component upsampling method pointers */
-  upsample1_ptr methods[MAX_COMPONENTS];
-
-  int next_row_out;		/* counts rows emitted from color_buf */
-  JDIMENSION rows_to_go;	/* counts rows remaining in image */
-
-  /* Height of an input row group for each component. */
-  int rowgroup_height[MAX_COMPONENTS];
-
-  /* These arrays save pixel expansion factors so that int_expand need not
-   * recompute them each time.  They are unused for other upsampling methods.
-   */
-  UINT8 h_expand[MAX_COMPONENTS];
-  UINT8 v_expand[MAX_COMPONENTS];
-} my_upsampler;
-
-typedef my_upsampler * my_upsample_ptr;
-
-
-/*
- * Initialize for an upsampling pass.
- */
-
-METHODDEF(void)
-start_pass_upsample (j_decompress_ptr cinfo)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-
-  /* Mark the conversion buffer empty */
-  upsample->next_row_out = cinfo->max_v_samp_factor;
-  /* Initialize total-height counter for detecting bottom of image */
-  upsample->rows_to_go = cinfo->output_height;
-}
-
-
-/*
- * Control routine to do upsampling (and color conversion).
- *
- * In this version we upsample each component independently.
- * We upsample one row group into the conversion buffer, then apply
- * color conversion a row at a time.
- */
-
-METHODDEF(void)
-sep_upsample (j_decompress_ptr cinfo,
-	      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
-	      JDIMENSION in_row_groups_avail,
-	      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-	      JDIMENSION out_rows_avail)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  int ci;
-  jpeg_component_info * compptr;
-  JDIMENSION num_rows;
-
-  /* Fill the conversion buffer, if it's empty */
-  if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
-    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-	 ci++, compptr++) {
-      /* Invoke per-component upsample method.  Notice we pass a POINTER
-       * to color_buf[ci], so that fullsize_upsample can change it.
-       */
-      (*upsample->methods[ci]) (cinfo, compptr,
-	input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]),
-	upsample->color_buf + ci);
-    }
-    upsample->next_row_out = 0;
-  }
-
-  /* Color-convert and emit rows */
-
-  /* How many we have in the buffer: */
-  num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out);
-  /* Not more than the distance to the end of the image.  Need this test
-   * in case the image height is not a multiple of max_v_samp_factor:
-   */
-  if (num_rows > upsample->rows_to_go) 
-    num_rows = upsample->rows_to_go;
-  /* And not more than what the client can accept: */
-  out_rows_avail -= *out_row_ctr;
-  if (num_rows > out_rows_avail)
-    num_rows = out_rows_avail;
-
-  (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf,
-				     (JDIMENSION) upsample->next_row_out,
-				     output_buf + *out_row_ctr,
-				     (int) num_rows);
-
-  /* Adjust counts */
-  *out_row_ctr += num_rows;
-  upsample->rows_to_go -= num_rows;
-  upsample->next_row_out += num_rows;
-  /* When the buffer is emptied, declare this input row group consumed */
-  if (upsample->next_row_out >= cinfo->max_v_samp_factor)
-    (*in_row_group_ctr)++;
-}
-
-
-/*
- * These are the routines invoked by sep_upsample to upsample pixel values
- * of a single component.  One row group is processed per call.
- */
-
-
-/*
- * For full-size components, we just make color_buf[ci] point at the
- * input buffer, and thus avoid copying any data.  Note that this is
- * safe only because sep_upsample doesn't declare the input row group
- * "consumed" until we are done color converting and emitting it.
- */
-
-METHODDEF(void)
-fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		   JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  *output_data_ptr = input_data;
-}
-
-
-/*
- * This is a no-op version used for "uninteresting" components.
- * These components will not be referenced by color conversion.
- */
-
-METHODDEF(void)
-noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  *output_data_ptr = NULL;	/* safety check */
-}
-
-
-/*
- * This version handles any integral sampling ratios.
- * This is not used for typical JPEG files, so it need not be fast.
- * Nor, for that matter, is it particularly accurate: the algorithm is
- * simple replication of the input pixel onto the corresponding output
- * pixels.  The hi-falutin sampling literature refers to this as a
- * "box filter".  A box filter tends to introduce visible artifacts,
- * so if you are actually going to use 3:1 or 4:1 sampling ratios
- * you would be well advised to improve this code.
- */
-
-METHODDEF(void)
-int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
-  register int h;
-  JSAMPROW outend;
-  int h_expand, v_expand;
-  int inrow, outrow;
-
-  h_expand = upsample->h_expand[compptr->component_index];
-  v_expand = upsample->v_expand[compptr->component_index];
-
-  inrow = outrow = 0;
-  while (outrow < cinfo->max_v_samp_factor) {
-    /* Generate one output row with proper horizontal expansion */
-    inptr = input_data[inrow];
-    outptr = output_data[outrow];
-    outend = outptr + cinfo->output_width;
-    while (outptr < outend) {
-      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
-      for (h = h_expand; h > 0; h--) {
-	*outptr++ = invalue;
-      }
-    }
-    /* Generate any additional output rows by duplicating the first one */
-    if (v_expand > 1) {
-      jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
-			v_expand-1, cinfo->output_width);
-    }
-    inrow++;
-    outrow += v_expand;
-  }
-}
-
-
-/*
- * Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
- * It's still a box filter.
- */
-
-METHODDEF(void)
-h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
-  JSAMPROW outend;
-  int inrow;
-
-  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
-    inptr = input_data[inrow];
-    outptr = output_data[inrow];
-    outend = outptr + cinfo->output_width;
-    while (outptr < outend) {
-      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
-      *outptr++ = invalue;
-      *outptr++ = invalue;
-    }
-  }
-}
-
-
-/*
- * Fast processing for the common case of 2:1 horizontal and 2:1 vertical.
- * It's still a box filter.
- */
-
-METHODDEF(void)
-h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
-  JSAMPROW outend;
-  int inrow, outrow;
-
-  inrow = outrow = 0;
-  while (outrow < cinfo->max_v_samp_factor) {
-    inptr = input_data[inrow];
-    outptr = output_data[outrow];
-    outend = outptr + cinfo->output_width;
-    while (outptr < outend) {
-      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
-      *outptr++ = invalue;
-      *outptr++ = invalue;
-    }
-    jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
-		      1, cinfo->output_width);
-    inrow++;
-    outrow += 2;
-  }
-}
-
-
-/*
- * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
- *
- * The upsampling algorithm is linear interpolation between pixel centers,
- * also known as a "triangle filter".  This is a good compromise between
- * speed and visual quality.  The centers of the output pixels are 1/4 and 3/4
- * of the way between input pixel centers.
- *
- * A note about the "bias" calculations: when rounding fractional values to
- * integer, we do not want to always round 0.5 up to the next integer.
- * If we did that, we'd introduce a noticeable bias towards larger values.
- * Instead, this code is arranged so that 0.5 will be rounded up or down at
- * alternate pixel locations (a simple ordered dither pattern).
- */
-
-METHODDEF(void)
-h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register int invalue;
-  register JDIMENSION colctr;
-  int inrow;
-
-  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
-    inptr = input_data[inrow];
-    outptr = output_data[inrow];
-    /* Special case for first column */
-    invalue = GETJSAMPLE(*inptr++);
-    *outptr++ = (JSAMPLE) invalue;
-    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);
-
-    for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
-      /* General case: 3/4 * nearer pixel + 1/4 * further pixel */
-      invalue = GETJSAMPLE(*inptr++) * 3;
-      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);
-      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);
-    }
-
-    /* Special case for last column */
-    invalue = GETJSAMPLE(*inptr);
-    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);
-    *outptr++ = (JSAMPLE) invalue;
-  }
-}
-
-
-/*
- * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
- * Again a triangle filter; see comments for h2v1 case, above.
- *
- * It is OK for us to reference the adjacent input rows because we demanded
- * context from the main buffer controller (see initialization code).
- */
-
-METHODDEF(void)
-h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
-  JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr0, inptr1, outptr;
-#if BITS_IN_JSAMPLE == 8
-  register int thiscolsum, lastcolsum, nextcolsum;
-#else
-  register INT32 thiscolsum, lastcolsum, nextcolsum;
-#endif
-  register JDIMENSION colctr;
-  int inrow, outrow, v;
-
-  inrow = outrow = 0;
-  while (outrow < cinfo->max_v_samp_factor) {
-    for (v = 0; v < 2; v++) {
-      /* inptr0 points to nearest input row, inptr1 points to next nearest */
-      inptr0 = input_data[inrow];
-      if (v == 0)		/* next nearest is row above */
-	inptr1 = input_data[inrow-1];
-      else			/* next nearest is row below */
-	inptr1 = input_data[inrow+1];
-      outptr = output_data[outrow++];
-
-      /* Special case for first column */
-      thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
-      nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
-      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4);
-      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
-      lastcolsum = thiscolsum; thiscolsum = nextcolsum;
-
-      for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
-	/* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */
-	/* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */
-	nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
-	*outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
-	*outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
-	lastcolsum = thiscolsum; thiscolsum = nextcolsum;
-      }
-
-      /* Special case for last column */
-      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
-      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4);
-    }
-    inrow++;
-  }
-}
-
-
-/*
- * Module initialization routine for upsampling.
- */
-
-GLOBAL(void)
-jinit_upsampler (j_decompress_ptr cinfo)
-{
-  my_upsample_ptr upsample;
-  int ci;
-  jpeg_component_info * compptr;
-  boolean need_buffer, do_fancy;
-  int h_in_group, v_in_group, h_out_group, v_out_group;
-
-  upsample = (my_upsample_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_upsampler));
-  cinfo->upsample = (struct jpeg_upsampler *) upsample;
-  upsample->pub.start_pass = start_pass_upsample;
-  upsample->pub.upsample = sep_upsample;
-  upsample->pub.need_context_rows = FALSE; /* until we find out differently */
-
-  if (cinfo->CCIR601_sampling)	/* this isn't supported */
-    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
-
-  /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,
-   * so don't ask for it.
-   */
-  do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;
-
-  /* Verify we can handle the sampling factors, select per-component methods,
-   * and create storage as needed.
-   */
-  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
-       ci++, compptr++) {
-    /* Compute size of an "input group" after IDCT scaling.  This many samples
-     * are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
-     */
-    h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /
-		 cinfo->min_DCT_scaled_size;
-    v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
-		 cinfo->min_DCT_scaled_size;
-    h_out_group = cinfo->max_h_samp_factor;
-    v_out_group = cinfo->max_v_samp_factor;
-    upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
-    need_buffer = TRUE;
-    if (! compptr->component_needed) {
-      /* Don't bother to upsample an uninteresting component. */
-      upsample->methods[ci] = noop_upsample;
-      need_buffer = FALSE;
-    } else if (h_in_group == h_out_group && v_in_group == v_out_group) {
-      /* Fullsize components can be processed without any work. */
-      upsample->methods[ci] = fullsize_upsample;
-      need_buffer = FALSE;
-    } else if (h_in_group * 2 == h_out_group &&
-	       v_in_group == v_out_group) {
-      /* Special cases for 2h1v upsampling */
-      if (do_fancy && compptr->downsampled_width > 2)
-	upsample->methods[ci] = h2v1_fancy_upsample;
-      else
-	upsample->methods[ci] = h2v1_upsample;
-    } else if (h_in_group * 2 == h_out_group &&
-	       v_in_group * 2 == v_out_group) {
-      /* Special cases for 2h2v upsampling */
-      if (do_fancy && compptr->downsampled_width > 2) {
-	upsample->methods[ci] = h2v2_fancy_upsample;
-	upsample->pub.need_context_rows = TRUE;
-      } else
-	upsample->methods[ci] = h2v2_upsample;
-    } else if ((h_out_group % h_in_group) == 0 &&
-	       (v_out_group % v_in_group) == 0) {
-      /* Generic integral-factors upsampling method */
-      upsample->methods[ci] = int_upsample;
-      upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group);
-      upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group);
-    } else
-      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
-    if (need_buffer) {
-      upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray)
-	((j_common_ptr) cinfo, JPOOL_IMAGE,
-	 (JDIMENSION) jround_up((long) cinfo->output_width,
-				(long) cinfo->max_h_samp_factor),
-	 (JDIMENSION) cinfo->max_v_samp_factor);
-    }
-  }
-}
diff --git a/tkimg1.3/libjpeg/jdtrans.c b/tkimg1.3/libjpeg/jdtrans.c
deleted file mode 100644
index 6c0ab71..0000000
--- a/tkimg1.3/libjpeg/jdtrans.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * jdtrans.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains library routines for transcoding decompression,
- * that is, reading raw DCT coefficient arrays from an input JPEG file.
- * The routines in jdapimin.c will also be needed by a transcoder.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/* Forward declarations */
-LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
-
-
-/*
- * Read the coefficient arrays from a JPEG file.
- * jpeg_read_header must be completed before calling this.
- *
- * The entire image is read into a set of virtual coefficient-block arrays,
- * one per component.  The return value is a pointer to the array of
- * virtual-array descriptors.  These can be manipulated directly via the
- * JPEG memory manager, or handed off to jpeg_write_coefficients().
- * To release the memory occupied by the virtual arrays, call
- * jpeg_finish_decompress() when done with the data.
- *
- * An alternative usage is to simply obtain access to the coefficient arrays
- * during a buffered-image-mode decompression operation.  This is allowed
- * after any jpeg_finish_output() call.  The arrays can be accessed until
- * jpeg_finish_decompress() is called.  (Note that any call to the library
- * may reposition the arrays, so don't rely on access_virt_barray() results
- * to stay valid across library calls.)
- *
- * Returns NULL if suspended.  This case need be checked only if
- * a suspending data source is used.
- */
-
-GLOBAL(jvirt_barray_ptr *)
-jpeg_read_coefficients (j_decompress_ptr cinfo)
-{
-  if (cinfo->global_state == DSTATE_READY) {
-    /* First call: initialize active modules */
-    transdecode_master_selection(cinfo);
-    cinfo->global_state = DSTATE_RDCOEFS;
-  }
-  if (cinfo->global_state == DSTATE_RDCOEFS) {
-    /* Absorb whole file into the coef buffer */
-    for (;;) {
-      int retcode;
-      /* Call progress monitor hook if present */
-      if (cinfo->progress != NULL)
-	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
-      /* Absorb some more input */
-      retcode = (*cinfo->inputctl->consume_input) (cinfo);
-      if (retcode == JPEG_SUSPENDED)
-	return NULL;
-      if (retcode == JPEG_REACHED_EOI)
-	break;
-      /* Advance progress counter if appropriate */
-      if (cinfo->progress != NULL &&
-	  (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {
-	if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {
-	  /* startup underestimated number of scans; ratchet up one scan */
-	  cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;
-	}
-      }
-    }
-    /* Set state so that jpeg_finish_decompress does the right thing */
-    cinfo->global_state = DSTATE_STOPPING;
-  }
-  /* At this point we should be in state DSTATE_STOPPING if being used
-   * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access
-   * to the coefficients during a full buffered-image-mode decompression.
-   */
-  if ((cinfo->global_state == DSTATE_STOPPING ||
-       cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) {
-    return cinfo->coef->coef_arrays;
-  }
-  /* Oops, improper usage */
-  ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
-  return NULL;			/* keep compiler happy */
-}
-
-
-/*
- * Master selection of decompression modules for transcoding.
- * This substitutes for jdmaster.c's initialization of the full decompressor.
- */
-
-LOCAL(void)
-transdecode_master_selection (j_decompress_ptr cinfo)
-{
-  /* This is effectively a buffered-image operation. */
-  cinfo->buffered_image = TRUE;
-
-  /* Entropy decoding: either Huffman or arithmetic coding. */
-  if (cinfo->arith_code) {
-    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
-  } else {
-    if (cinfo->progressive_mode) {
-#ifdef D_PROGRESSIVE_SUPPORTED
-      jinit_phuff_decoder(cinfo);
-#else
-      ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
-    } else
-      jinit_huff_decoder(cinfo);
-  }
-
-  /* Always get a full-image coefficient buffer. */
-  jinit_d_coef_controller(cinfo, TRUE);
-
-  /* We can now tell the memory manager to allocate virtual arrays. */
-  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);
-
-  /* Initialize input side of decompressor to consume first scan. */
-  (*cinfo->inputctl->start_input_pass) (cinfo);
-
-  /* Initialize progress monitoring. */
-  if (cinfo->progress != NULL) {
-    int nscans;
-    /* Estimate number of scans to set pass_limit. */
-    if (cinfo->progressive_mode) {
-      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */
-      nscans = 2 + 3 * cinfo->num_components;
-    } else if (cinfo->inputctl->has_multiple_scans) {
-      /* For a nonprogressive multiscan file, estimate 1 scan per component. */
-      nscans = cinfo->num_components;
-    } else {
-      nscans = 1;
-    }
-    cinfo->progress->pass_counter = 0L;
-    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;
-    cinfo->progress->completed_passes = 0;
-    cinfo->progress->total_passes = 1;
-  }
-}
diff --git a/tkimg1.3/libjpeg/jerror.c b/tkimg1.3/libjpeg/jerror.c
deleted file mode 100644
index 3da7be8..0000000
--- a/tkimg1.3/libjpeg/jerror.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * jerror.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains simple error-reporting and trace-message routines.
- * These are suitable for Unix-like systems and others where writing to
- * stderr is the right thing to do.  Many applications will want to replace
- * some or all of these routines.
- *
- * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile,
- * you get a Windows-specific hack to display error messages in a dialog box.
- * It ain't much, but it beats dropping error messages into the bit bucket,
- * which is what happens to output to stderr under most Windows C compilers.
- *
- * These routines are used by both the compression and decompression code.
- */
-
-/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jversion.h"
-#include "jerror.h"
-
-#ifdef USE_WINDOWS_MESSAGEBOX
-#include <windows.h>
-#endif
-
-#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
-#define EXIT_FAILURE  1
-#endif
-
-
-/*
- * Create the message string table.
- * We do this from the master message list in jerror.h by re-reading
- * jerror.h with a suitable definition for macro JMESSAGE.
- * The message table is made an external symbol just in case any applications
- * want to refer to it directly.
- */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_std_message_table	jMsgTable
-#endif
-
-#define JMESSAGE(code,string)	string ,
-
-const char * const jpeg_std_message_table[] = {
-#include "jerror.h"
-  NULL
-};
-
-
-/*
- * Error exit handler: must not return to caller.
- *
- * Applications may override this if they want to get control back after
- * an error.  Typically one would longjmp somewhere instead of exiting.
- * The setjmp buffer can be made a private field within an expanded error
- * handler object.  Note that the info needed to generate an error message
- * is stored in the error object, so you can generate the message now or
- * later, at your convenience.
- * You should make sure that the JPEG object is cleaned up (with jpeg_abort
- * or jpeg_destroy) at some point.
- */
-
-METHODDEF(void)
-error_exit (j_common_ptr cinfo)
-{
-  /* Always display the message */
-  (*cinfo->err->output_message) (cinfo);
-
-  /* Let the memory manager delete any temp files before we die */
-  jpeg_destroy(cinfo);
-
-  exit(EXIT_FAILURE);
-}
-
-
-/*
- * Actual output of an error or trace message.
- * Applications may override this method to send JPEG messages somewhere
- * other than stderr.
- *
- * On Windows, printing to stderr is generally completely useless,
- * so we provide optional code to produce an error-dialog popup.
- * Most Windows applications will still prefer to override this routine,
- * but if they don't, it'll do something at least marginally useful.
- *
- * NOTE: to use the library in an environment that doesn't support the
- * C stdio library, you may have to delete the call to fprintf() entirely,
- * not just not use this routine.
- */
-
-METHODDEF(void)
-output_message (j_common_ptr cinfo)
-{
-  char buffer[JMSG_LENGTH_MAX];
-
-  /* Create the message */
-  (*cinfo->err->format_message) (cinfo, buffer);
-
-#ifdef USE_WINDOWS_MESSAGEBOX
-  /* Display it in a message dialog box */
-  MessageBox(GetActiveWindow(), buffer, "JPEG Library Error",
-	     MB_OK | MB_ICONERROR);
-#else
-  /* Send it to stderr, adding a newline */
-  fprintf(stderr, "%s\n", buffer);
-#endif
-}
-
-
-/*
- * Decide whether to emit a trace or warning message.
- * msg_level is one of:
- *   -1: recoverable corrupt-data warning, may want to abort.
- *    0: important advisory messages (always display to user).
- *    1: first level of tracing detail.
- *    2,3,...: successively more detailed tracing messages.
- * An application might override this method if it wanted to abort on warnings
- * or change the policy about which messages to display.
- */
-
-METHODDEF(void)
-emit_message (j_common_ptr cinfo, int msg_level)
-{
-  struct jpeg_error_mgr * err = cinfo->err;
-
-  if (msg_level < 0) {
-    /* It's a warning message.  Since corrupt files may generate many warnings,
-     * the policy implemented here is to show only the first warning,
-     * unless trace_level >= 3.
-     */
-    if (err->num_warnings == 0 || err->trace_level >= 3)
-      (*err->output_message) (cinfo);
-    /* Always count warnings in num_warnings. */
-    err->num_warnings++;
-  } else {
-    /* It's a trace message.  Show it if trace_level >= msg_level. */
-    if (err->trace_level >= msg_level)
-      (*err->output_message) (cinfo);
-  }
-}
-
-
-/*
- * Format a message string for the most recent JPEG error or message.
- * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX
- * characters.  Note that no '\n' character is added to the string.
- * Few applications should need to override this method.
- */
-
-METHODDEF(void)
-format_message (j_common_ptr cinfo, char * buffer)
-{
-  struct jpeg_error_mgr * err = cinfo->err;
-  int msg_code = err->msg_code;
-  const char * msgtext = NULL;
-  const char * msgptr;
-  char ch;
-  boolean isstring;
-
-  /* Look up message string in proper table */
-  if (msg_code > 0 && msg_code <= err->last_jpeg_message) {
-    msgtext = err->jpeg_message_table[msg_code];
-  } else if (err->addon_message_table != NULL &&
-	     msg_code >= err->first_addon_message &&
-	     msg_code <= err->last_addon_message) {
-    msgtext = err->addon_message_table[msg_code - err->first_addon_message];
-  }
-
-  /* Defend against bogus message number */
-  if (msgtext == NULL) {
-    err->msg_parm.i[0] = msg_code;
-    msgtext = err->jpeg_message_table[0];
-  }
-
-  /* Check for string parameter, as indicated by %s in the message text */
-  isstring = FALSE;
-  msgptr = msgtext;
-  while ((ch = *msgptr++) != '\0') {
-    if (ch == '%') {
-      if (*msgptr == 's') isstring = TRUE;
-      break;
-    }
-  }
-
-  /* Format the message into the passed buffer */
-  if (isstring)
-    sprintf(buffer, msgtext, err->msg_parm.s);
-  else
-    sprintf(buffer, msgtext,
-	    err->msg_parm.i[0], err->msg_parm.i[1],
-	    err->msg_parm.i[2], err->msg_parm.i[3],
-	    err->msg_parm.i[4], err->msg_parm.i[5],
-	    err->msg_parm.i[6], err->msg_parm.i[7]);
-}
-
-
-/*
- * Reset error state variables at start of a new image.
- * This is called during compression startup to reset trace/error
- * processing to default state, without losing any application-specific
- * method pointers.  An application might possibly want to override
- * this method if it has additional error processing state.
- */
-
-METHODDEF(void)
-reset_error_mgr (j_common_ptr cinfo)
-{
-  cinfo->err->num_warnings = 0;
-  /* trace_level is not reset since it is an application-supplied parameter */
-  cinfo->err->msg_code = 0;	/* may be useful as a flag for "no error" */
-}
-
-
-/*
- * Fill in the standard error-handling methods in a jpeg_error_mgr object.
- * Typical call is:
- *	struct jpeg_compress_struct cinfo;
- *	struct jpeg_error_mgr err;
- *
- *	cinfo.err = jpeg_std_error(&err);
- * after which the application may override some of the methods.
- */
-
-GLOBAL(struct jpeg_error_mgr *)
-jpeg_std_error (struct jpeg_error_mgr * err)
-{
-  err->error_exit = error_exit;
-  err->emit_message = emit_message;
-  err->output_message = output_message;
-  err->format_message = format_message;
-  err->reset_error_mgr = reset_error_mgr;
-
-  err->trace_level = 0;		/* default = no tracing */
-  err->num_warnings = 0;	/* no warnings emitted yet */
-  err->msg_code = 0;		/* may be useful as a flag for "no error" */
-
-  /* Initialize message table pointers */
-  err->jpeg_message_table = jpeg_std_message_table;
-  err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;
-
-  err->addon_message_table = NULL;
-  err->first_addon_message = 0;	/* for safety */
-  err->last_addon_message = 0;
-
-  return err;
-}
diff --git a/tkimg1.3/libjpeg/jerror.h b/tkimg1.3/libjpeg/jerror.h
deleted file mode 100644
index fc2fffe..0000000
--- a/tkimg1.3/libjpeg/jerror.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * jerror.h
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file defines the error and message codes for the JPEG library.
- * Edit this file to add new codes, or to translate the message strings to
- * some other language.
- * A set of error-reporting macros are defined too.  Some applications using
- * the JPEG library may wish to include this file to get the error codes
- * and/or the macros.
- */
-
-/*
- * To define the enum list of message codes, include this file without
- * defining macro JMESSAGE.  To create a message string table, include it
- * again with a suitable JMESSAGE definition (see jerror.c for an example).
- */
-#ifndef JMESSAGE
-#ifndef JERROR_H
-/* First time through, define the enum list */
-#define JMAKE_ENUM_LIST
-#else
-/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
-#define JMESSAGE(code,string)
-#endif /* JERROR_H */
-#endif /* JMESSAGE */
-
-#ifdef JMAKE_ENUM_LIST
-
-typedef enum {
-
-#define JMESSAGE(code,string)	code ,
-
-#endif /* JMAKE_ENUM_LIST */
-
-JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
-
-/* For maintenance convenience, list is alphabetical by message code name */
-JMESSAGE(JERR_ARITH_NOTIMPL,
-	 "Sorry, there are legal restrictions on arithmetic coding")
-JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
-JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
-JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
-JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
-JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
-JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
-JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
-JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
-JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
-JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
-JMESSAGE(JERR_BAD_LIB_VERSION,
-	 "Wrong JPEG library version: library is %d, caller expects %d")
-JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
-JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
-JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
-JMESSAGE(JERR_BAD_PROGRESSION,
-	 "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
-JMESSAGE(JERR_BAD_PROG_SCRIPT,
-	 "Invalid progressive parameters at scan script entry %d")
-JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
-JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
-JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
-JMESSAGE(JERR_BAD_STRUCT_SIZE,
-	 "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
-JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
-JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
-JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
-JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
-JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
-JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
-JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
-JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
-JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
-JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
-JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
-JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
-JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
-JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
-JMESSAGE(JERR_FILE_READ, "Input file read error")
-JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
-JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
-JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
-JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
-JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
-JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
-JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
-JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
-	 "Cannot transcode due to multiple use of quantization table %d")
-JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
-JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
-JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
-JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
-JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
-JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
-JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
-JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
-JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
-JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
-JMESSAGE(JERR_QUANT_COMPONENTS,
-	 "Cannot quantize more than %d color components")
-JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
-JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
-JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
-JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
-JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
-JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
-JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
-JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
-JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
-JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
-JMESSAGE(JERR_TFILE_WRITE,
-	 "Write failed on temporary file --- out of disk space?")
-JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
-JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
-JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
-JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
-JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
-JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
-JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
-JMESSAGE(JMSG_VERSION, JVERSION)
-JMESSAGE(JTRC_16BIT_TABLES,
-	 "Caution: quantization tables are too coarse for baseline JPEG")
-JMESSAGE(JTRC_ADOBE,
-	 "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
-JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
-JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
-JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
-JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
-JMESSAGE(JTRC_DQT, "Define Quantization Table %d  precision %d")
-JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
-JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
-JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
-JMESSAGE(JTRC_EOI, "End Of Image")
-JMESSAGE(JTRC_HUFFBITS, "        %3d %3d %3d %3d %3d %3d %3d %3d")
-JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d  %d")
-JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
-	 "Warning: thumbnail image size does not match data length %u")
-JMESSAGE(JTRC_JFIF_EXTENSION,
-	 "JFIF extension marker: type 0x%02x, length %u")
-JMESSAGE(JTRC_JFIF_THUMBNAIL, "    with %d x %d thumbnail image")
-JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
-JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
-JMESSAGE(JTRC_QUANTVALS, "        %4u %4u %4u %4u %4u %4u %4u %4u")
-JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
-JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
-JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
-JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
-JMESSAGE(JTRC_RST, "RST%d")
-JMESSAGE(JTRC_SMOOTH_NOTIMPL,
-	 "Smoothing not supported with nonstandard sampling ratios")
-JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
-JMESSAGE(JTRC_SOF_COMPONENT, "    Component %d: %dhx%dv q=%d")
-JMESSAGE(JTRC_SOI, "Start of Image")
-JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
-JMESSAGE(JTRC_SOS_COMPONENT, "    Component %d: dc=%d ac=%d")
-JMESSAGE(JTRC_SOS_PARAMS, "  Ss=%d, Se=%d, Ah=%d, Al=%d")
-JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
-JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
-JMESSAGE(JTRC_THUMB_JPEG,
-	 "JFIF extension marker: JPEG-compressed thumbnail image, length %u")
-JMESSAGE(JTRC_THUMB_PALETTE,
-	 "JFIF extension marker: palette thumbnail image, length %u")
-JMESSAGE(JTRC_THUMB_RGB,
-	 "JFIF extension marker: RGB thumbnail image, length %u")
-JMESSAGE(JTRC_UNKNOWN_IDS,
-	 "Unrecognized component IDs %d %d %d, assuming YCbCr")
-JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
-JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
-JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
-JMESSAGE(JWRN_BOGUS_PROGRESSION,
-	 "Inconsistent progression sequence for component %d coefficient %d")
-JMESSAGE(JWRN_EXTRANEOUS_DATA,
-	 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
-JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
-JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
-JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
-JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
-JMESSAGE(JWRN_MUST_RESYNC,
-	 "Corrupt JPEG data: found marker 0x%02x instead of RST%d")
-JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
-JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
-
-#ifdef JMAKE_ENUM_LIST
-
-  JMSG_LASTMSGCODE
-} J_MESSAGE_CODE;
-
-#undef JMAKE_ENUM_LIST
-#endif /* JMAKE_ENUM_LIST */
-
-/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
-#undef JMESSAGE
-
-
-#ifndef JERROR_H
-#define JERROR_H
-
-/* Macros to simplify using the error and trace message stuff */
-/* The first parameter is either type of cinfo pointer */
-
-/* Fatal errors (print message and exit) */
-#define ERREXIT(cinfo,code)  \
-  ((cinfo)->err->msg_code = (code), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-#define ERREXIT1(cinfo,code,p1)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-#define ERREXIT2(cinfo,code,p1,p2)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (cinfo)->err->msg_parm.i[1] = (p2), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-#define ERREXIT3(cinfo,code,p1,p2,p3)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (cinfo)->err->msg_parm.i[1] = (p2), \
-   (cinfo)->err->msg_parm.i[2] = (p3), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-#define ERREXIT4(cinfo,code,p1,p2,p3,p4)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (cinfo)->err->msg_parm.i[1] = (p2), \
-   (cinfo)->err->msg_parm.i[2] = (p3), \
-   (cinfo)->err->msg_parm.i[3] = (p4), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-#define ERREXITS(cinfo,code,str)  \
-  ((cinfo)->err->msg_code = (code), \
-   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
-   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
-
-#define MAKESTMT(stuff)		do { stuff } while (0)
-
-/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
-#define WARNMS(cinfo,code)  \
-  ((cinfo)->err->msg_code = (code), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
-#define WARNMS1(cinfo,code,p1)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
-#define WARNMS2(cinfo,code,p1,p2)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (cinfo)->err->msg_parm.i[1] = (p2), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
-
-/* Informational/debugging messages */
-#define TRACEMS(cinfo,lvl,code)  \
-  ((cinfo)->err->msg_code = (code), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
-#define TRACEMS1(cinfo,lvl,code,p1)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
-#define TRACEMS2(cinfo,lvl,code,p1,p2)  \
-  ((cinfo)->err->msg_code = (code), \
-   (cinfo)->err->msg_parm.i[0] = (p1), \
-   (cinfo)->err->msg_parm.i[1] = (p2), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
-#define TRACEMS3(cinfo,lvl,code,p1,p2,p3)  \
-  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
-	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
-	   (cinfo)->err->msg_code = (code); \
-	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
-#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4)  \
-  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
-	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
-	   (cinfo)->err->msg_code = (code); \
-	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
-#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5)  \
-  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
-	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
-	   _mp[4] = (p5); \
-	   (cinfo)->err->msg_code = (code); \
-	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
-#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8)  \
-  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
-	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
-	   _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
-	   (cinfo)->err->msg_code = (code); \
-	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
-#define TRACEMSS(cinfo,lvl,code,str)  \
-  ((cinfo)->err->msg_code = (code), \
-   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
-   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
-
-#endif /* JERROR_H */
diff --git a/tkimg1.3/libjpeg/jfdctflt.c b/tkimg1.3/libjpeg/jfdctflt.c
deleted file mode 100644
index 79d7a00..0000000
--- a/tkimg1.3/libjpeg/jfdctflt.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * jfdctflt.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a floating-point implementation of the
- * forward DCT (Discrete Cosine Transform).
- *
- * This implementation should be more accurate than either of the integer
- * DCT implementations.  However, it may not give the same results on all
- * machines because of differences in roundoff behavior.  Speed will depend
- * on the hardware's floating point capacity.
- *
- * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
- * on each column.  Direct algorithms are also available, but they are
- * much more complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on Arai, Agui, and Nakajima's algorithm for
- * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
- * Japanese, but the algorithm is described in the Pennebaker & Mitchell
- * JPEG textbook (see REFERENCES section in file README).  The following code
- * is based directly on figure 4-8 in P&M.
- * While an 8-point DCT cannot be done in less than 11 multiplies, it is
- * possible to arrange the computation so that many of the multiplies are
- * simple scalings of the final outputs.  These multiplies can then be
- * folded into the multiplications or divisions by the JPEG quantization
- * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
- * to be done in the DCT itself.
- * The primary disadvantage of this method is that with a fixed-point
- * implementation, accuracy is lost due to imprecise representation of the
- * scaled quantization values.  However, that problem does not arise if
- * we use floating point arithmetic.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_FLOAT_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/*
- * Perform the forward DCT on one block of samples.
- */
-
-GLOBAL(void)
-jpeg_fdct_float (FAST_FLOAT * data)
-{
-  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
-  FAST_FLOAT z1, z2, z3, z4, z5, z11, z13;
-  FAST_FLOAT *dataptr;
-  int ctr;
-
-  /* Pass 1: process rows. */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[0] + dataptr[7];
-    tmp7 = dataptr[0] - dataptr[7];
-    tmp1 = dataptr[1] + dataptr[6];
-    tmp6 = dataptr[1] - dataptr[6];
-    tmp2 = dataptr[2] + dataptr[5];
-    tmp5 = dataptr[2] - dataptr[5];
-    tmp3 = dataptr[3] + dataptr[4];
-    tmp4 = dataptr[3] - dataptr[4];
-    
-    /* Even part */
-    
-    tmp10 = tmp0 + tmp3;	/* phase 2 */
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[0] = tmp10 + tmp11; /* phase 3 */
-    dataptr[4] = tmp10 - tmp11;
-    
-    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
-    dataptr[2] = tmp13 + z1;	/* phase 5 */
-    dataptr[6] = tmp13 - z1;
-    
-    /* Odd part */
-
-    tmp10 = tmp4 + tmp5;	/* phase 2 */
-    tmp11 = tmp5 + tmp6;
-    tmp12 = tmp6 + tmp7;
-
-    /* The rotator is modified from fig 4-8 to avoid extra negations. */
-    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
-    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
-    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
-    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
-
-    z11 = tmp7 + z3;		/* phase 5 */
-    z13 = tmp7 - z3;
-
-    dataptr[5] = z13 + z2;	/* phase 6 */
-    dataptr[3] = z13 - z2;
-    dataptr[1] = z11 + z4;
-    dataptr[7] = z11 - z4;
-
-    dataptr += DCTSIZE;		/* advance pointer to next row */
-  }
-
-  /* Pass 2: process columns. */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
-    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
-    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
-    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
-    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
-    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
-    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
-    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-    
-    /* Even part */
-    
-    tmp10 = tmp0 + tmp3;	/* phase 2 */
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
-    dataptr[DCTSIZE*4] = tmp10 - tmp11;
-    
-    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
-    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
-    dataptr[DCTSIZE*6] = tmp13 - z1;
-    
-    /* Odd part */
-
-    tmp10 = tmp4 + tmp5;	/* phase 2 */
-    tmp11 = tmp5 + tmp6;
-    tmp12 = tmp6 + tmp7;
-
-    /* The rotator is modified from fig 4-8 to avoid extra negations. */
-    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */
-    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */
-    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
-    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
-
-    z11 = tmp7 + z3;		/* phase 5 */
-    z13 = tmp7 - z3;
-
-    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
-    dataptr[DCTSIZE*3] = z13 - z2;
-    dataptr[DCTSIZE*1] = z11 + z4;
-    dataptr[DCTSIZE*7] = z11 - z4;
-
-    dataptr++;			/* advance pointer to next column */
-  }
-}
-
-#endif /* DCT_FLOAT_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jfdctfst.c b/tkimg1.3/libjpeg/jfdctfst.c
deleted file mode 100644
index ccb378a..0000000
--- a/tkimg1.3/libjpeg/jfdctfst.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * jfdctfst.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a fast, not so accurate integer implementation of the
- * forward DCT (Discrete Cosine Transform).
- *
- * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
- * on each column.  Direct algorithms are also available, but they are
- * much more complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on Arai, Agui, and Nakajima's algorithm for
- * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
- * Japanese, but the algorithm is described in the Pennebaker & Mitchell
- * JPEG textbook (see REFERENCES section in file README).  The following code
- * is based directly on figure 4-8 in P&M.
- * While an 8-point DCT cannot be done in less than 11 multiplies, it is
- * possible to arrange the computation so that many of the multiplies are
- * simple scalings of the final outputs.  These multiplies can then be
- * folded into the multiplications or divisions by the JPEG quantization
- * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
- * to be done in the DCT itself.
- * The primary disadvantage of this method is that with fixed-point math,
- * accuracy is lost due to imprecise representation of the scaled
- * quantization values.  The smaller the quantization table entry, the less
- * precise the scaled value, so this implementation does worse with high-
- * quality-setting files than with low-quality ones.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_IFAST_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/* Scaling decisions are generally the same as in the LL&M algorithm;
- * see jfdctint.c for more details.  However, we choose to descale
- * (right shift) multiplication products as soon as they are formed,
- * rather than carrying additional fractional bits into subsequent additions.
- * This compromises accuracy slightly, but it lets us save a few shifts.
- * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)
- * everywhere except in the multiplications proper; this saves a good deal
- * of work on 16-bit-int machines.
- *
- * Again to save a few shifts, the intermediate results between pass 1 and
- * pass 2 are not upscaled, but are represented only to integral precision.
- *
- * A final compromise is to represent the multiplicative constants to only
- * 8 fractional bits, rather than 13.  This saves some shifting work on some
- * machines, and may also reduce the cost of multiplication (since there
- * are fewer one-bits in the constants).
- */
-
-#define CONST_BITS  8
-
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 8
-#define FIX_0_382683433  ((INT32)   98)		/* FIX(0.382683433) */
-#define FIX_0_541196100  ((INT32)  139)		/* FIX(0.541196100) */
-#define FIX_0_707106781  ((INT32)  181)		/* FIX(0.707106781) */
-#define FIX_1_306562965  ((INT32)  334)		/* FIX(1.306562965) */
-#else
-#define FIX_0_382683433  FIX(0.382683433)
-#define FIX_0_541196100  FIX(0.541196100)
-#define FIX_0_707106781  FIX(0.707106781)
-#define FIX_1_306562965  FIX(1.306562965)
-#endif
-
-
-/* We can gain a little more speed, with a further compromise in accuracy,
- * by omitting the addition in a descaling shift.  This yields an incorrectly
- * rounded result half the time...
- */
-
-#ifndef USE_ACCURATE_ROUNDING
-#undef DESCALE
-#define DESCALE(x,n)  RIGHT_SHIFT(x, n)
-#endif
-
-
-/* Multiply a DCTELEM variable by an INT32 constant, and immediately
- * descale to yield a DCTELEM result.
- */
-
-#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
-
-
-/*
- * Perform the forward DCT on one block of samples.
- */
-
-GLOBAL(void)
-jpeg_fdct_ifast (DCTELEM * data)
-{
-  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  DCTELEM tmp10, tmp11, tmp12, tmp13;
-  DCTELEM z1, z2, z3, z4, z5, z11, z13;
-  DCTELEM *dataptr;
-  int ctr;
-  SHIFT_TEMPS
-
-  /* Pass 1: process rows. */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[0] + dataptr[7];
-    tmp7 = dataptr[0] - dataptr[7];
-    tmp1 = dataptr[1] + dataptr[6];
-    tmp6 = dataptr[1] - dataptr[6];
-    tmp2 = dataptr[2] + dataptr[5];
-    tmp5 = dataptr[2] - dataptr[5];
-    tmp3 = dataptr[3] + dataptr[4];
-    tmp4 = dataptr[3] - dataptr[4];
-    
-    /* Even part */
-    
-    tmp10 = tmp0 + tmp3;	/* phase 2 */
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[0] = tmp10 + tmp11; /* phase 3 */
-    dataptr[4] = tmp10 - tmp11;
-    
-    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
-    dataptr[2] = tmp13 + z1;	/* phase 5 */
-    dataptr[6] = tmp13 - z1;
-    
-    /* Odd part */
-
-    tmp10 = tmp4 + tmp5;	/* phase 2 */
-    tmp11 = tmp5 + tmp6;
-    tmp12 = tmp6 + tmp7;
-
-    /* The rotator is modified from fig 4-8 to avoid extra negations. */
-    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
-    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
-    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
-    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
-
-    z11 = tmp7 + z3;		/* phase 5 */
-    z13 = tmp7 - z3;
-
-    dataptr[5] = z13 + z2;	/* phase 6 */
-    dataptr[3] = z13 - z2;
-    dataptr[1] = z11 + z4;
-    dataptr[7] = z11 - z4;
-
-    dataptr += DCTSIZE;		/* advance pointer to next row */
-  }
-
-  /* Pass 2: process columns. */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
-    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
-    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
-    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
-    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
-    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
-    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
-    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-    
-    /* Even part */
-    
-    tmp10 = tmp0 + tmp3;	/* phase 2 */
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
-    dataptr[DCTSIZE*4] = tmp10 - tmp11;
-    
-    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
-    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
-    dataptr[DCTSIZE*6] = tmp13 - z1;
-    
-    /* Odd part */
-
-    tmp10 = tmp4 + tmp5;	/* phase 2 */
-    tmp11 = tmp5 + tmp6;
-    tmp12 = tmp6 + tmp7;
-
-    /* The rotator is modified from fig 4-8 to avoid extra negations. */
-    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
-    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
-    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
-    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
-
-    z11 = tmp7 + z3;		/* phase 5 */
-    z13 = tmp7 - z3;
-
-    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
-    dataptr[DCTSIZE*3] = z13 - z2;
-    dataptr[DCTSIZE*1] = z11 + z4;
-    dataptr[DCTSIZE*7] = z11 - z4;
-
-    dataptr++;			/* advance pointer to next column */
-  }
-}
-
-#endif /* DCT_IFAST_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jfdctint.c b/tkimg1.3/libjpeg/jfdctint.c
deleted file mode 100644
index 0a78b64..0000000
--- a/tkimg1.3/libjpeg/jfdctint.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * jfdctint.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a slow-but-accurate integer implementation of the
- * forward DCT (Discrete Cosine Transform).
- *
- * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
- * on each column.  Direct algorithms are also available, but they are
- * much more complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on an algorithm described in
- *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
- *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
- *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
- * The primary algorithm described there uses 11 multiplies and 29 adds.
- * We use their alternate method with 12 multiplies and 32 adds.
- * The advantage of this method is that no data path contains more than one
- * multiplication; this allows a very simple and accurate implementation in
- * scaled fixed-point arithmetic, with a minimal number of shifts.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_ISLOW_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/*
- * The poop on this scaling stuff is as follows:
- *
- * Each 1-D DCT step produces outputs which are a factor of sqrt(N)
- * larger than the true DCT outputs.  The final outputs are therefore
- * a factor of N larger than desired; since N=8 this can be cured by
- * a simple right shift at the end of the algorithm.  The advantage of
- * this arrangement is that we save two multiplications per 1-D DCT,
- * because the y0 and y4 outputs need not be divided by sqrt(N).
- * In the IJG code, this factor of 8 is removed by the quantization step
- * (in jcdctmgr.c), NOT in this module.
- *
- * We have to do addition and subtraction of the integer inputs, which
- * is no problem, and multiplication by fractional constants, which is
- * a problem to do in integer arithmetic.  We multiply all the constants
- * by CONST_SCALE and convert them to integer constants (thus retaining
- * CONST_BITS bits of precision in the constants).  After doing a
- * multiplication we have to divide the product by CONST_SCALE, with proper
- * rounding, to produce the correct output.  This division can be done
- * cheaply as a right shift of CONST_BITS bits.  We postpone shifting
- * as long as possible so that partial sums can be added together with
- * full fractional precision.
- *
- * The outputs of the first pass are scaled up by PASS1_BITS bits so that
- * they are represented to better-than-integral precision.  These outputs
- * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
- * with the recommended scaling.  (For 12-bit sample data, the intermediate
- * array is INT32 anyway.)
- *
- * To avoid overflow of the 32-bit intermediate results in pass 2, we must
- * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis
- * shows that the values given below are the most effective.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define CONST_BITS  13
-#define PASS1_BITS  2
-#else
-#define CONST_BITS  13
-#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
-#endif
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 13
-#define FIX_0_298631336  ((INT32)  2446)	/* FIX(0.298631336) */
-#define FIX_0_390180644  ((INT32)  3196)	/* FIX(0.390180644) */
-#define FIX_0_541196100  ((INT32)  4433)	/* FIX(0.541196100) */
-#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
-#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
-#define FIX_1_175875602  ((INT32)  9633)	/* FIX(1.175875602) */
-#define FIX_1_501321110  ((INT32)  12299)	/* FIX(1.501321110) */
-#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
-#define FIX_1_961570560  ((INT32)  16069)	/* FIX(1.961570560) */
-#define FIX_2_053119869  ((INT32)  16819)	/* FIX(2.053119869) */
-#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
-#define FIX_3_072711026  ((INT32)  25172)	/* FIX(3.072711026) */
-#else
-#define FIX_0_298631336  FIX(0.298631336)
-#define FIX_0_390180644  FIX(0.390180644)
-#define FIX_0_541196100  FIX(0.541196100)
-#define FIX_0_765366865  FIX(0.765366865)
-#define FIX_0_899976223  FIX(0.899976223)
-#define FIX_1_175875602  FIX(1.175875602)
-#define FIX_1_501321110  FIX(1.501321110)
-#define FIX_1_847759065  FIX(1.847759065)
-#define FIX_1_961570560  FIX(1.961570560)
-#define FIX_2_053119869  FIX(2.053119869)
-#define FIX_2_562915447  FIX(2.562915447)
-#define FIX_3_072711026  FIX(3.072711026)
-#endif
-
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * For 8-bit samples with the recommended scaling, all the variable
- * and constant values involved are no more than 16 bits wide, so a
- * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
- * For 12-bit samples, a full 32-bit multiplication will be needed.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
-#else
-#define MULTIPLY(var,const)  ((var) * (const))
-#endif
-
-
-/*
- * Perform the forward DCT on one block of samples.
- */
-
-GLOBAL(void)
-jpeg_fdct_islow (DCTELEM * data)
-{
-  INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  INT32 tmp10, tmp11, tmp12, tmp13;
-  INT32 z1, z2, z3, z4, z5;
-  DCTELEM *dataptr;
-  int ctr;
-  SHIFT_TEMPS
-
-  /* Pass 1: process rows. */
-  /* Note results are scaled up by sqrt(8) compared to a true DCT; */
-  /* furthermore, we scale the results by 2**PASS1_BITS. */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[0] + dataptr[7];
-    tmp7 = dataptr[0] - dataptr[7];
-    tmp1 = dataptr[1] + dataptr[6];
-    tmp6 = dataptr[1] - dataptr[6];
-    tmp2 = dataptr[2] + dataptr[5];
-    tmp5 = dataptr[2] - dataptr[5];
-    tmp3 = dataptr[3] + dataptr[4];
-    tmp4 = dataptr[3] - dataptr[4];
-    
-    /* Even part per LL&M figure 1 --- note that published figure is faulty;
-     * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
-     */
-    
-    tmp10 = tmp0 + tmp3;
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS);
-    dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS);
-    
-    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
-    dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
-				   CONST_BITS-PASS1_BITS);
-    dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
-				   CONST_BITS-PASS1_BITS);
-    
-    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
-     * cK represents cos(K*pi/16).
-     * i0..i3 in the paper are tmp4..tmp7 here.
-     */
-    
-    z1 = tmp4 + tmp7;
-    z2 = tmp5 + tmp6;
-    z3 = tmp4 + tmp6;
-    z4 = tmp5 + tmp7;
-    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-    
-    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
-    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
-    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
-    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
-    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
-    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
-    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
-    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-    
-    z3 += z5;
-    z4 += z5;
-    
-    dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS);
-    dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS);
-    dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS);
-    dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS);
-    
-    dataptr += DCTSIZE;		/* advance pointer to next row */
-  }
-
-  /* Pass 2: process columns.
-   * We remove the PASS1_BITS scaling, but leave the results scaled up
-   * by an overall factor of 8.
-   */
-
-  dataptr = data;
-  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
-    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
-    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
-    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
-    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
-    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
-    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
-    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
-    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-    
-    /* Even part per LL&M figure 1 --- note that published figure is faulty;
-     * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
-     */
-    
-    tmp10 = tmp0 + tmp3;
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS);
-    dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS);
-    
-    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
-    dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
-					   CONST_BITS+PASS1_BITS);
-    dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
-					   CONST_BITS+PASS1_BITS);
-    
-    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
-     * cK represents cos(K*pi/16).
-     * i0..i3 in the paper are tmp4..tmp7 here.
-     */
-    
-    z1 = tmp4 + tmp7;
-    z2 = tmp5 + tmp6;
-    z3 = tmp4 + tmp6;
-    z4 = tmp5 + tmp7;
-    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-    
-    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
-    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
-    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
-    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
-    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
-    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
-    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
-    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-    
-    z3 += z5;
-    z4 += z5;
-    
-    dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3,
-					   CONST_BITS+PASS1_BITS);
-    dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4,
-					   CONST_BITS+PASS1_BITS);
-    dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3,
-					   CONST_BITS+PASS1_BITS);
-    dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4,
-					   CONST_BITS+PASS1_BITS);
-    
-    dataptr++;			/* advance pointer to next column */
-  }
-}
-
-#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jidctflt.c b/tkimg1.3/libjpeg/jidctflt.c
deleted file mode 100644
index 0188ce3..0000000
--- a/tkimg1.3/libjpeg/jidctflt.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * jidctflt.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a floating-point implementation of the
- * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
- * must also perform dequantization of the input coefficients.
- *
- * This implementation should be more accurate than either of the integer
- * IDCT implementations.  However, it may not give the same results on all
- * machines because of differences in roundoff behavior.  Speed will depend
- * on the hardware's floating point capacity.
- *
- * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
- * on each row (or vice versa, but it's more convenient to emit a row at
- * a time).  Direct algorithms are also available, but they are much more
- * complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on Arai, Agui, and Nakajima's algorithm for
- * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
- * Japanese, but the algorithm is described in the Pennebaker & Mitchell
- * JPEG textbook (see REFERENCES section in file README).  The following code
- * is based directly on figure 4-8 in P&M.
- * While an 8-point DCT cannot be done in less than 11 multiplies, it is
- * possible to arrange the computation so that many of the multiplies are
- * simple scalings of the final outputs.  These multiplies can then be
- * folded into the multiplications or divisions by the JPEG quantization
- * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
- * to be done in the DCT itself.
- * The primary disadvantage of this method is that with a fixed-point
- * implementation, accuracy is lost due to imprecise representation of the
- * scaled quantization values.  However, that problem does not arise if
- * we use floating point arithmetic.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_FLOAT_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/* Dequantize a coefficient by multiplying it by the multiplier-table
- * entry; produce a float result.
- */
-
-#define DEQUANTIZE(coef,quantval)  (((FAST_FLOAT) (coef)) * (quantval))
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients.
- */
-
-GLOBAL(void)
-jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		 JCOEFPTR coef_block,
-		 JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
-  FAST_FLOAT z5, z10, z11, z12, z13;
-  JCOEFPTR inptr;
-  FLOAT_MULT_TYPE * quantptr;
-  FAST_FLOAT * wsptr;
-  JSAMPROW outptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  int ctr;
-  FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */
-  SHIFT_TEMPS
-
-  /* Pass 1: process columns from input, store into work array. */
-
-  inptr = coef_block;
-  quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table;
-  wsptr = workspace;
-  for (ctr = DCTSIZE; ctr > 0; ctr--) {
-    /* Due to quantization, we will usually find that many of the input
-     * coefficients are zero, especially the AC terms.  We can exploit this
-     * by short-circuiting the IDCT calculation for any column in which all
-     * the AC terms are zero.  In that case each output is equal to the
-     * DC coefficient (with scale factor as needed).
-     * With typical images and quantization tables, half or more of the
-     * column DCT calculations can be simplified this way.
-     */
-    
-    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
-	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
-	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
-	inptr[DCTSIZE*7] == 0) {
-      /* AC terms all zero */
-      FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-      
-      wsptr[DCTSIZE*0] = dcval;
-      wsptr[DCTSIZE*1] = dcval;
-      wsptr[DCTSIZE*2] = dcval;
-      wsptr[DCTSIZE*3] = dcval;
-      wsptr[DCTSIZE*4] = dcval;
-      wsptr[DCTSIZE*5] = dcval;
-      wsptr[DCTSIZE*6] = dcval;
-      wsptr[DCTSIZE*7] = dcval;
-      
-      inptr++;			/* advance pointers to next column */
-      quantptr++;
-      wsptr++;
-      continue;
-    }
-    
-    /* Even part */
-
-    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
-    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
-    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
-    tmp10 = tmp0 + tmp2;	/* phase 3 */
-    tmp11 = tmp0 - tmp2;
-
-    tmp13 = tmp1 + tmp3;	/* phases 5-3 */
-    tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */
-
-    tmp0 = tmp10 + tmp13;	/* phase 2 */
-    tmp3 = tmp10 - tmp13;
-    tmp1 = tmp11 + tmp12;
-    tmp2 = tmp11 - tmp12;
-    
-    /* Odd part */
-
-    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
-    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
-    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
-
-    z13 = tmp6 + tmp5;		/* phase 6 */
-    z10 = tmp6 - tmp5;
-    z11 = tmp4 + tmp7;
-    z12 = tmp4 - tmp7;
-
-    tmp7 = z11 + z13;		/* phase 5 */
-    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */
-
-    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
-    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
-    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
-
-    tmp6 = tmp12 - tmp7;	/* phase 2 */
-    tmp5 = tmp11 - tmp6;
-    tmp4 = tmp10 + tmp5;
-
-    wsptr[DCTSIZE*0] = tmp0 + tmp7;
-    wsptr[DCTSIZE*7] = tmp0 - tmp7;
-    wsptr[DCTSIZE*1] = tmp1 + tmp6;
-    wsptr[DCTSIZE*6] = tmp1 - tmp6;
-    wsptr[DCTSIZE*2] = tmp2 + tmp5;
-    wsptr[DCTSIZE*5] = tmp2 - tmp5;
-    wsptr[DCTSIZE*4] = tmp3 + tmp4;
-    wsptr[DCTSIZE*3] = tmp3 - tmp4;
-
-    inptr++;			/* advance pointers to next column */
-    quantptr++;
-    wsptr++;
-  }
-  
-  /* Pass 2: process rows from work array, store into output array. */
-  /* Note that we must descale the results by a factor of 8 == 2**3. */
-
-  wsptr = workspace;
-  for (ctr = 0; ctr < DCTSIZE; ctr++) {
-    outptr = output_buf[ctr] + output_col;
-    /* Rows of zeroes can be exploited in the same way as we did with columns.
-     * However, the column calculation has created many nonzero AC terms, so
-     * the simplification applies less often (typically 5% to 10% of the time).
-     * And testing floats for zero is relatively expensive, so we don't bother.
-     */
-    
-    /* Even part */
-
-    tmp10 = wsptr[0] + wsptr[4];
-    tmp11 = wsptr[0] - wsptr[4];
-
-    tmp13 = wsptr[2] + wsptr[6];
-    tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13;
-
-    tmp0 = tmp10 + tmp13;
-    tmp3 = tmp10 - tmp13;
-    tmp1 = tmp11 + tmp12;
-    tmp2 = tmp11 - tmp12;
-
-    /* Odd part */
-
-    z13 = wsptr[5] + wsptr[3];
-    z10 = wsptr[5] - wsptr[3];
-    z11 = wsptr[1] + wsptr[7];
-    z12 = wsptr[1] - wsptr[7];
-
-    tmp7 = z11 + z13;
-    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562);
-
-    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
-    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
-    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
-
-    tmp6 = tmp12 - tmp7;
-    tmp5 = tmp11 - tmp6;
-    tmp4 = tmp10 + tmp5;
-
-    /* Final output stage: scale down by a factor of 8 and range-limit */
-
-    outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3)
-			    & RANGE_MASK];
-    outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3)
-			    & RANGE_MASK];
-    outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3)
-			    & RANGE_MASK];
-    outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3)
-			    & RANGE_MASK];
-    outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3)
-			    & RANGE_MASK];
-    outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3)
-			    & RANGE_MASK];
-    outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3)
-			    & RANGE_MASK];
-    outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3)
-			    & RANGE_MASK];
-    
-    wsptr += DCTSIZE;		/* advance pointer to next row */
-  }
-}
-
-#endif /* DCT_FLOAT_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jidctfst.c b/tkimg1.3/libjpeg/jidctfst.c
deleted file mode 100644
index dba4216..0000000
--- a/tkimg1.3/libjpeg/jidctfst.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * jidctfst.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a fast, not so accurate integer implementation of the
- * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
- * must also perform dequantization of the input coefficients.
- *
- * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
- * on each row (or vice versa, but it's more convenient to emit a row at
- * a time).  Direct algorithms are also available, but they are much more
- * complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on Arai, Agui, and Nakajima's algorithm for
- * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in
- * Japanese, but the algorithm is described in the Pennebaker & Mitchell
- * JPEG textbook (see REFERENCES section in file README).  The following code
- * is based directly on figure 4-8 in P&M.
- * While an 8-point DCT cannot be done in less than 11 multiplies, it is
- * possible to arrange the computation so that many of the multiplies are
- * simple scalings of the final outputs.  These multiplies can then be
- * folded into the multiplications or divisions by the JPEG quantization
- * table entries.  The AA&N method leaves only 5 multiplies and 29 adds
- * to be done in the DCT itself.
- * The primary disadvantage of this method is that with fixed-point math,
- * accuracy is lost due to imprecise representation of the scaled
- * quantization values.  The smaller the quantization table entry, the less
- * precise the scaled value, so this implementation does worse with high-
- * quality-setting files than with low-quality ones.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_IFAST_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/* Scaling decisions are generally the same as in the LL&M algorithm;
- * see jidctint.c for more details.  However, we choose to descale
- * (right shift) multiplication products as soon as they are formed,
- * rather than carrying additional fractional bits into subsequent additions.
- * This compromises accuracy slightly, but it lets us save a few shifts.
- * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)
- * everywhere except in the multiplications proper; this saves a good deal
- * of work on 16-bit-int machines.
- *
- * The dequantized coefficients are not integers because the AA&N scaling
- * factors have been incorporated.  We represent them scaled up by PASS1_BITS,
- * so that the first and second IDCT rounds have the same input scaling.
- * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to
- * avoid a descaling shift; this compromises accuracy rather drastically
- * for small quantization table entries, but it saves a lot of shifts.
- * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway,
- * so we use a much larger scaling factor to preserve accuracy.
- *
- * A final compromise is to represent the multiplicative constants to only
- * 8 fractional bits, rather than 13.  This saves some shifting work on some
- * machines, and may also reduce the cost of multiplication (since there
- * are fewer one-bits in the constants).
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define CONST_BITS  8
-#define PASS1_BITS  2
-#else
-#define CONST_BITS  8
-#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
-#endif
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 8
-#define FIX_1_082392200  ((INT32)  277)		/* FIX(1.082392200) */
-#define FIX_1_414213562  ((INT32)  362)		/* FIX(1.414213562) */
-#define FIX_1_847759065  ((INT32)  473)		/* FIX(1.847759065) */
-#define FIX_2_613125930  ((INT32)  669)		/* FIX(2.613125930) */
-#else
-#define FIX_1_082392200  FIX(1.082392200)
-#define FIX_1_414213562  FIX(1.414213562)
-#define FIX_1_847759065  FIX(1.847759065)
-#define FIX_2_613125930  FIX(2.613125930)
-#endif
-
-
-/* We can gain a little more speed, with a further compromise in accuracy,
- * by omitting the addition in a descaling shift.  This yields an incorrectly
- * rounded result half the time...
- */
-
-#ifndef USE_ACCURATE_ROUNDING
-#undef DESCALE
-#define DESCALE(x,n)  RIGHT_SHIFT(x, n)
-#endif
-
-
-/* Multiply a DCTELEM variable by an INT32 constant, and immediately
- * descale to yield a DCTELEM result.
- */
-
-#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
-
-
-/* Dequantize a coefficient by multiplying it by the multiplier-table
- * entry; produce a DCTELEM result.  For 8-bit data a 16x16->16
- * multiplication will do.  For 12-bit data, the multiplier table is
- * declared INT32, so a 32-bit multiply will be used.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define DEQUANTIZE(coef,quantval)  (((IFAST_MULT_TYPE) (coef)) * (quantval))
-#else
-#define DEQUANTIZE(coef,quantval)  \
-	DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS)
-#endif
-
-
-/* Like DESCALE, but applies to a DCTELEM and produces an int.
- * We assume that int right shift is unsigned if INT32 right shift is.
- */
-
-#ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define ISHIFT_TEMPS	DCTELEM ishift_temp;
-#if BITS_IN_JSAMPLE == 8
-#define DCTELEMBITS  16		/* DCTELEM may be 16 or 32 bits */
-#else
-#define DCTELEMBITS  32		/* DCTELEM must be 32 bits */
-#endif
-#define IRIGHT_SHIFT(x,shft)  \
-    ((ishift_temp = (x)) < 0 ? \
-     (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \
-     (ishift_temp >> (shft)))
-#else
-#define ISHIFT_TEMPS
-#define IRIGHT_SHIFT(x,shft)	((x) >> (shft))
-#endif
-
-#ifdef USE_ACCURATE_ROUNDING
-#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n))
-#else
-#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT(x, n))
-#endif
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients.
- */
-
-GLOBAL(void)
-jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		 JCOEFPTR coef_block,
-		 JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  DCTELEM tmp10, tmp11, tmp12, tmp13;
-  DCTELEM z5, z10, z11, z12, z13;
-  JCOEFPTR inptr;
-  IFAST_MULT_TYPE * quantptr;
-  int * wsptr;
-  JSAMPROW outptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  int ctr;
-  int workspace[DCTSIZE2];	/* buffers data between passes */
-  SHIFT_TEMPS			/* for DESCALE */
-  ISHIFT_TEMPS			/* for IDESCALE */
-
-  /* Pass 1: process columns from input, store into work array. */
-
-  inptr = coef_block;
-  quantptr = (IFAST_MULT_TYPE *) compptr->dct_table;
-  wsptr = workspace;
-  for (ctr = DCTSIZE; ctr > 0; ctr--) {
-    /* Due to quantization, we will usually find that many of the input
-     * coefficients are zero, especially the AC terms.  We can exploit this
-     * by short-circuiting the IDCT calculation for any column in which all
-     * the AC terms are zero.  In that case each output is equal to the
-     * DC coefficient (with scale factor as needed).
-     * With typical images and quantization tables, half or more of the
-     * column DCT calculations can be simplified this way.
-     */
-    
-    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
-	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
-	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
-	inptr[DCTSIZE*7] == 0) {
-      /* AC terms all zero */
-      int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-
-      wsptr[DCTSIZE*0] = dcval;
-      wsptr[DCTSIZE*1] = dcval;
-      wsptr[DCTSIZE*2] = dcval;
-      wsptr[DCTSIZE*3] = dcval;
-      wsptr[DCTSIZE*4] = dcval;
-      wsptr[DCTSIZE*5] = dcval;
-      wsptr[DCTSIZE*6] = dcval;
-      wsptr[DCTSIZE*7] = dcval;
-      
-      inptr++;			/* advance pointers to next column */
-      quantptr++;
-      wsptr++;
-      continue;
-    }
-    
-    /* Even part */
-
-    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
-    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
-    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
-    tmp10 = tmp0 + tmp2;	/* phase 3 */
-    tmp11 = tmp0 - tmp2;
-
-    tmp13 = tmp1 + tmp3;	/* phases 5-3 */
-    tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */
-
-    tmp0 = tmp10 + tmp13;	/* phase 2 */
-    tmp3 = tmp10 - tmp13;
-    tmp1 = tmp11 + tmp12;
-    tmp2 = tmp11 - tmp12;
-    
-    /* Odd part */
-
-    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
-    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
-    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
-
-    z13 = tmp6 + tmp5;		/* phase 6 */
-    z10 = tmp6 - tmp5;
-    z11 = tmp4 + tmp7;
-    z12 = tmp4 - tmp7;
-
-    tmp7 = z11 + z13;		/* phase 5 */
-    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */
-
-    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */
-    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */
-    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */
-
-    tmp6 = tmp12 - tmp7;	/* phase 2 */
-    tmp5 = tmp11 - tmp6;
-    tmp4 = tmp10 + tmp5;
-
-    wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7);
-    wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7);
-    wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6);
-    wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6);
-    wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5);
-    wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5);
-    wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4);
-    wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4);
-
-    inptr++;			/* advance pointers to next column */
-    quantptr++;
-    wsptr++;
-  }
-  
-  /* Pass 2: process rows from work array, store into output array. */
-  /* Note that we must descale the results by a factor of 8 == 2**3, */
-  /* and also undo the PASS1_BITS scaling. */
-
-  wsptr = workspace;
-  for (ctr = 0; ctr < DCTSIZE; ctr++) {
-    outptr = output_buf[ctr] + output_col;
-    /* Rows of zeroes can be exploited in the same way as we did with columns.
-     * However, the column calculation has created many nonzero AC terms, so
-     * the simplification applies less often (typically 5% to 10% of the time).
-     * On machines with very fast multiplication, it's possible that the
-     * test takes more time than it's worth.  In that case this section
-     * may be commented out.
-     */
-    
-#ifndef NO_ZERO_ROW_TEST
-    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
-	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
-      /* AC terms all zero */
-      JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3)
-				  & RANGE_MASK];
-      
-      outptr[0] = dcval;
-      outptr[1] = dcval;
-      outptr[2] = dcval;
-      outptr[3] = dcval;
-      outptr[4] = dcval;
-      outptr[5] = dcval;
-      outptr[6] = dcval;
-      outptr[7] = dcval;
-
-      wsptr += DCTSIZE;		/* advance pointer to next row */
-      continue;
-    }
-#endif
-    
-    /* Even part */
-
-    tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]);
-    tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]);
-
-    tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]);
-    tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562)
-	    - tmp13;
-
-    tmp0 = tmp10 + tmp13;
-    tmp3 = tmp10 - tmp13;
-    tmp1 = tmp11 + tmp12;
-    tmp2 = tmp11 - tmp12;
-
-    /* Odd part */
-
-    z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3];
-    z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3];
-    z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7];
-    z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7];
-
-    tmp7 = z11 + z13;		/* phase 5 */
-    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */
-
-    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */
-    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */
-    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */
-
-    tmp6 = tmp12 - tmp7;	/* phase 2 */
-    tmp5 = tmp11 - tmp6;
-    tmp4 = tmp10 + tmp5;
-
-    /* Final output stage: scale down by a factor of 8 and range-limit */
-
-    outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3)
-			    & RANGE_MASK];
-
-    wsptr += DCTSIZE;		/* advance pointer to next row */
-  }
-}
-
-#endif /* DCT_IFAST_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jidctint.c b/tkimg1.3/libjpeg/jidctint.c
deleted file mode 100644
index a72b320..0000000
--- a/tkimg1.3/libjpeg/jidctint.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * jidctint.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a slow-but-accurate integer implementation of the
- * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine
- * must also perform dequantization of the input coefficients.
- *
- * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT
- * on each row (or vice versa, but it's more convenient to emit a row at
- * a time).  Direct algorithms are also available, but they are much more
- * complex and seem not to be any faster when reduced to code.
- *
- * This implementation is based on an algorithm described in
- *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
- *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
- *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
- * The primary algorithm described there uses 11 multiplies and 29 adds.
- * We use their alternate method with 12 multiplies and 32 adds.
- * The advantage of this method is that no data path contains more than one
- * multiplication; this allows a very simple and accurate implementation in
- * scaled fixed-point arithmetic, with a minimal number of shifts.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef DCT_ISLOW_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/*
- * The poop on this scaling stuff is as follows:
- *
- * Each 1-D IDCT step produces outputs which are a factor of sqrt(N)
- * larger than the true IDCT outputs.  The final outputs are therefore
- * a factor of N larger than desired; since N=8 this can be cured by
- * a simple right shift at the end of the algorithm.  The advantage of
- * this arrangement is that we save two multiplications per 1-D IDCT,
- * because the y0 and y4 inputs need not be divided by sqrt(N).
- *
- * We have to do addition and subtraction of the integer inputs, which
- * is no problem, and multiplication by fractional constants, which is
- * a problem to do in integer arithmetic.  We multiply all the constants
- * by CONST_SCALE and convert them to integer constants (thus retaining
- * CONST_BITS bits of precision in the constants).  After doing a
- * multiplication we have to divide the product by CONST_SCALE, with proper
- * rounding, to produce the correct output.  This division can be done
- * cheaply as a right shift of CONST_BITS bits.  We postpone shifting
- * as long as possible so that partial sums can be added together with
- * full fractional precision.
- *
- * The outputs of the first pass are scaled up by PASS1_BITS bits so that
- * they are represented to better-than-integral precision.  These outputs
- * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
- * with the recommended scaling.  (To scale up 12-bit sample data further, an
- * intermediate INT32 array would be needed.)
- *
- * To avoid overflow of the 32-bit intermediate results in pass 2, we must
- * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis
- * shows that the values given below are the most effective.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define CONST_BITS  13
-#define PASS1_BITS  2
-#else
-#define CONST_BITS  13
-#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
-#endif
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 13
-#define FIX_0_298631336  ((INT32)  2446)	/* FIX(0.298631336) */
-#define FIX_0_390180644  ((INT32)  3196)	/* FIX(0.390180644) */
-#define FIX_0_541196100  ((INT32)  4433)	/* FIX(0.541196100) */
-#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
-#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
-#define FIX_1_175875602  ((INT32)  9633)	/* FIX(1.175875602) */
-#define FIX_1_501321110  ((INT32)  12299)	/* FIX(1.501321110) */
-#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
-#define FIX_1_961570560  ((INT32)  16069)	/* FIX(1.961570560) */
-#define FIX_2_053119869  ((INT32)  16819)	/* FIX(2.053119869) */
-#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
-#define FIX_3_072711026  ((INT32)  25172)	/* FIX(3.072711026) */
-#else
-#define FIX_0_298631336  FIX(0.298631336)
-#define FIX_0_390180644  FIX(0.390180644)
-#define FIX_0_541196100  FIX(0.541196100)
-#define FIX_0_765366865  FIX(0.765366865)
-#define FIX_0_899976223  FIX(0.899976223)
-#define FIX_1_175875602  FIX(1.175875602)
-#define FIX_1_501321110  FIX(1.501321110)
-#define FIX_1_847759065  FIX(1.847759065)
-#define FIX_1_961570560  FIX(1.961570560)
-#define FIX_2_053119869  FIX(2.053119869)
-#define FIX_2_562915447  FIX(2.562915447)
-#define FIX_3_072711026  FIX(3.072711026)
-#endif
-
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * For 8-bit samples with the recommended scaling, all the variable
- * and constant values involved are no more than 16 bits wide, so a
- * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
- * For 12-bit samples, a full 32-bit multiplication will be needed.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
-#else
-#define MULTIPLY(var,const)  ((var) * (const))
-#endif
-
-
-/* Dequantize a coefficient by multiplying it by the multiplier-table
- * entry; produce an int result.  In this module, both inputs and result
- * are 16 bits or less, so either int or short multiply will work.
- */
-
-#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients.
- */
-
-GLOBAL(void)
-jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		 JCOEFPTR coef_block,
-		 JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  INT32 tmp0, tmp1, tmp2, tmp3;
-  INT32 tmp10, tmp11, tmp12, tmp13;
-  INT32 z1, z2, z3, z4, z5;
-  JCOEFPTR inptr;
-  ISLOW_MULT_TYPE * quantptr;
-  int * wsptr;
-  JSAMPROW outptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  int ctr;
-  int workspace[DCTSIZE2];	/* buffers data between passes */
-  SHIFT_TEMPS
-
-  /* Pass 1: process columns from input, store into work array. */
-  /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
-  /* furthermore, we scale the results by 2**PASS1_BITS. */
-
-  inptr = coef_block;
-  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
-  wsptr = workspace;
-  for (ctr = DCTSIZE; ctr > 0; ctr--) {
-    /* Due to quantization, we will usually find that many of the input
-     * coefficients are zero, especially the AC terms.  We can exploit this
-     * by short-circuiting the IDCT calculation for any column in which all
-     * the AC terms are zero.  In that case each output is equal to the
-     * DC coefficient (with scale factor as needed).
-     * With typical images and quantization tables, half or more of the
-     * column DCT calculations can be simplified this way.
-     */
-    
-    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
-	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
-	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
-	inptr[DCTSIZE*7] == 0) {
-      /* AC terms all zero */
-      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-      
-      wsptr[DCTSIZE*0] = dcval;
-      wsptr[DCTSIZE*1] = dcval;
-      wsptr[DCTSIZE*2] = dcval;
-      wsptr[DCTSIZE*3] = dcval;
-      wsptr[DCTSIZE*4] = dcval;
-      wsptr[DCTSIZE*5] = dcval;
-      wsptr[DCTSIZE*6] = dcval;
-      wsptr[DCTSIZE*7] = dcval;
-      
-      inptr++;			/* advance pointers to next column */
-      quantptr++;
-      wsptr++;
-      continue;
-    }
-    
-    /* Even part: reverse the even part of the forward DCT. */
-    /* The rotator is sqrt(2)*c(-6). */
-    
-    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
-    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-    
-    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
-    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
-    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
-    
-    z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-    z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
-
-    tmp0 = (z2 + z3) << CONST_BITS;
-    tmp1 = (z2 - z3) << CONST_BITS;
-    
-    tmp10 = tmp0 + tmp3;
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    /* Odd part per figure 8; the matrix is unitary and hence its
-     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.
-     */
-    
-    tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
-    tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
-    tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
-    tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-    
-    z1 = tmp0 + tmp3;
-    z2 = tmp1 + tmp2;
-    z3 = tmp0 + tmp2;
-    z4 = tmp1 + tmp3;
-    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-    
-    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
-    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
-    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
-    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
-    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
-    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
-    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
-    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-    
-    z3 += z5;
-    z4 += z5;
-    
-    tmp0 += z1 + z3;
-    tmp1 += z2 + z4;
-    tmp2 += z2 + z3;
-    tmp3 += z1 + z4;
-    
-    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-    
-    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
-    wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
-    
-    inptr++;			/* advance pointers to next column */
-    quantptr++;
-    wsptr++;
-  }
-  
-  /* Pass 2: process rows from work array, store into output array. */
-  /* Note that we must descale the results by a factor of 8 == 2**3, */
-  /* and also undo the PASS1_BITS scaling. */
-
-  wsptr = workspace;
-  for (ctr = 0; ctr < DCTSIZE; ctr++) {
-    outptr = output_buf[ctr] + output_col;
-    /* Rows of zeroes can be exploited in the same way as we did with columns.
-     * However, the column calculation has created many nonzero AC terms, so
-     * the simplification applies less often (typically 5% to 10% of the time).
-     * On machines with very fast multiplication, it's possible that the
-     * test takes more time than it's worth.  In that case this section
-     * may be commented out.
-     */
-    
-#ifndef NO_ZERO_ROW_TEST
-    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
-	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
-      /* AC terms all zero */
-      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
-				  & RANGE_MASK];
-      
-      outptr[0] = dcval;
-      outptr[1] = dcval;
-      outptr[2] = dcval;
-      outptr[3] = dcval;
-      outptr[4] = dcval;
-      outptr[5] = dcval;
-      outptr[6] = dcval;
-      outptr[7] = dcval;
-
-      wsptr += DCTSIZE;		/* advance pointer to next row */
-      continue;
-    }
-#endif
-    
-    /* Even part: reverse the even part of the forward DCT. */
-    /* The rotator is sqrt(2)*c(-6). */
-    
-    z2 = (INT32) wsptr[2];
-    z3 = (INT32) wsptr[6];
-    
-    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
-    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
-    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
-    
-    tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS;
-    tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS;
-    
-    tmp10 = tmp0 + tmp3;
-    tmp13 = tmp0 - tmp3;
-    tmp11 = tmp1 + tmp2;
-    tmp12 = tmp1 - tmp2;
-    
-    /* Odd part per figure 8; the matrix is unitary and hence its
-     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.
-     */
-    
-    tmp0 = (INT32) wsptr[7];
-    tmp1 = (INT32) wsptr[5];
-    tmp2 = (INT32) wsptr[3];
-    tmp3 = (INT32) wsptr[1];
-    
-    z1 = tmp0 + tmp3;
-    z2 = tmp1 + tmp2;
-    z3 = tmp0 + tmp2;
-    z4 = tmp1 + tmp3;
-    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-    
-    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
-    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
-    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
-    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
-    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
-    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
-    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
-    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-    
-    z3 += z5;
-    z4 += z5;
-    
-    tmp0 += z1 + z3;
-    tmp1 += z2 + z4;
-    tmp2 += z2 + z3;
-    tmp3 += z1 + z4;
-    
-    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-    
-    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0,
-					  CONST_BITS+PASS1_BITS+3)
-			    & RANGE_MASK];
-    
-    wsptr += DCTSIZE;		/* advance pointer to next row */
-  }
-}
-
-#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jidctred.c b/tkimg1.3/libjpeg/jidctred.c
deleted file mode 100644
index 421f3c7..0000000
--- a/tkimg1.3/libjpeg/jidctred.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * jidctred.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains inverse-DCT routines that produce reduced-size output:
- * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block.
- *
- * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M)
- * algorithm used in jidctint.c.  We simply replace each 8-to-8 1-D IDCT step
- * with an 8-to-4 step that produces the four averages of two adjacent outputs
- * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output).
- * These steps were derived by computing the corresponding values at the end
- * of the normal LL&M code, then simplifying as much as possible.
- *
- * 1x1 is trivial: just take the DC coefficient divided by 8.
- *
- * See jidctint.c for additional comments.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h"		/* Private declarations for DCT subsystem */
-
-#ifdef IDCT_SCALING_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
-  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/* Scaling is the same as in jidctint.c. */
-
-#if BITS_IN_JSAMPLE == 8
-#define CONST_BITS  13
-#define PASS1_BITS  2
-#else
-#define CONST_BITS  13
-#define PASS1_BITS  1		/* lose a little precision to avoid overflow */
-#endif
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 13
-#define FIX_0_211164243  ((INT32)  1730)	/* FIX(0.211164243) */
-#define FIX_0_509795579  ((INT32)  4176)	/* FIX(0.509795579) */
-#define FIX_0_601344887  ((INT32)  4926)	/* FIX(0.601344887) */
-#define FIX_0_720959822  ((INT32)  5906)	/* FIX(0.720959822) */
-#define FIX_0_765366865  ((INT32)  6270)	/* FIX(0.765366865) */
-#define FIX_0_850430095  ((INT32)  6967)	/* FIX(0.850430095) */
-#define FIX_0_899976223  ((INT32)  7373)	/* FIX(0.899976223) */
-#define FIX_1_061594337  ((INT32)  8697)	/* FIX(1.061594337) */
-#define FIX_1_272758580  ((INT32)  10426)	/* FIX(1.272758580) */
-#define FIX_1_451774981  ((INT32)  11893)	/* FIX(1.451774981) */
-#define FIX_1_847759065  ((INT32)  15137)	/* FIX(1.847759065) */
-#define FIX_2_172734803  ((INT32)  17799)	/* FIX(2.172734803) */
-#define FIX_2_562915447  ((INT32)  20995)	/* FIX(2.562915447) */
-#define FIX_3_624509785  ((INT32)  29692)	/* FIX(3.624509785) */
-#else
-#define FIX_0_211164243  FIX(0.211164243)
-#define FIX_0_509795579  FIX(0.509795579)
-#define FIX_0_601344887  FIX(0.601344887)
-#define FIX_0_720959822  FIX(0.720959822)
-#define FIX_0_765366865  FIX(0.765366865)
-#define FIX_0_850430095  FIX(0.850430095)
-#define FIX_0_899976223  FIX(0.899976223)
-#define FIX_1_061594337  FIX(1.061594337)
-#define FIX_1_272758580  FIX(1.272758580)
-#define FIX_1_451774981  FIX(1.451774981)
-#define FIX_1_847759065  FIX(1.847759065)
-#define FIX_2_172734803  FIX(2.172734803)
-#define FIX_2_562915447  FIX(2.562915447)
-#define FIX_3_624509785  FIX(3.624509785)
-#endif
-
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * For 8-bit samples with the recommended scaling, all the variable
- * and constant values involved are no more than 16 bits wide, so a
- * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
- * For 12-bit samples, a full 32-bit multiplication will be needed.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)
-#else
-#define MULTIPLY(var,const)  ((var) * (const))
-#endif
-
-
-/* Dequantize a coefficient by multiplying it by the multiplier-table
- * entry; produce an int result.  In this module, both inputs and result
- * are 16 bits or less, so either int or short multiply will work.
- */
-
-#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 4x4 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JCOEFPTR coef_block,
-	       JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  INT32 tmp0, tmp2, tmp10, tmp12;
-  INT32 z1, z2, z3, z4;
-  JCOEFPTR inptr;
-  ISLOW_MULT_TYPE * quantptr;
-  int * wsptr;
-  JSAMPROW outptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  int ctr;
-  int workspace[DCTSIZE*4];	/* buffers data between passes */
-  SHIFT_TEMPS
-
-  /* Pass 1: process columns from input, store into work array. */
-
-  inptr = coef_block;
-  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
-  wsptr = workspace;
-  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
-    /* Don't bother to process column 4, because second pass won't use it */
-    if (ctr == DCTSIZE-4)
-      continue;
-    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
-	inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 &&
-	inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) {
-      /* AC terms all zero; we need not examine term 4 for 4x4 output */
-      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-      
-      wsptr[DCTSIZE*0] = dcval;
-      wsptr[DCTSIZE*1] = dcval;
-      wsptr[DCTSIZE*2] = dcval;
-      wsptr[DCTSIZE*3] = dcval;
-      
-      continue;
-    }
-    
-    /* Even part */
-    
-    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-    tmp0 <<= (CONST_BITS+1);
-    
-    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
-    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
-    tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865);
-    
-    tmp10 = tmp0 + tmp2;
-    tmp12 = tmp0 - tmp2;
-    
-    /* Odd part */
-    
-    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
-    z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
-    z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
-    z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-    
-    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
-	 + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
-	 + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
-	 + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
-    
-    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
-	 + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
-	 + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
-	 + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
-
-    /* Final output stage */
-    
-    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1);
-    wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1);
-    wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1);
-    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1);
-  }
-  
-  /* Pass 2: process 4 rows from work array, store into output array. */
-
-  wsptr = workspace;
-  for (ctr = 0; ctr < 4; ctr++) {
-    outptr = output_buf[ctr] + output_col;
-    /* It's not clear whether a zero row test is worthwhile here ... */
-
-#ifndef NO_ZERO_ROW_TEST
-    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 &&
-	wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
-      /* AC terms all zero */
-      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
-				  & RANGE_MASK];
-      
-      outptr[0] = dcval;
-      outptr[1] = dcval;
-      outptr[2] = dcval;
-      outptr[3] = dcval;
-      
-      wsptr += DCTSIZE;		/* advance pointer to next row */
-      continue;
-    }
-#endif
-    
-    /* Even part */
-    
-    tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1);
-    
-    tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065)
-	 + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865);
-    
-    tmp10 = tmp0 + tmp2;
-    tmp12 = tmp0 - tmp2;
-    
-    /* Odd part */
-    
-    z1 = (INT32) wsptr[7];
-    z2 = (INT32) wsptr[5];
-    z3 = (INT32) wsptr[3];
-    z4 = (INT32) wsptr[1];
-    
-    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
-	 + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
-	 + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
-	 + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
-    
-    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
-	 + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
-	 + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
-	 + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
-
-    /* Final output stage */
-    
-    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2,
-					  CONST_BITS+PASS1_BITS+3+1)
-			    & RANGE_MASK];
-    outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2,
-					  CONST_BITS+PASS1_BITS+3+1)
-			    & RANGE_MASK];
-    outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0,
-					  CONST_BITS+PASS1_BITS+3+1)
-			    & RANGE_MASK];
-    outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0,
-					  CONST_BITS+PASS1_BITS+3+1)
-			    & RANGE_MASK];
-    
-    wsptr += DCTSIZE;		/* advance pointer to next row */
-  }
-}
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 2x2 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JCOEFPTR coef_block,
-	       JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  INT32 tmp0, tmp10, z1;
-  JCOEFPTR inptr;
-  ISLOW_MULT_TYPE * quantptr;
-  int * wsptr;
-  JSAMPROW outptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  int ctr;
-  int workspace[DCTSIZE*2];	/* buffers data between passes */
-  SHIFT_TEMPS
-
-  /* Pass 1: process columns from input, store into work array. */
-
-  inptr = coef_block;
-  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
-  wsptr = workspace;
-  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
-    /* Don't bother to process columns 2,4,6 */
-    if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6)
-      continue;
-    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 &&
-	inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) {
-      /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */
-      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-      
-      wsptr[DCTSIZE*0] = dcval;
-      wsptr[DCTSIZE*1] = dcval;
-      
-      continue;
-    }
-    
-    /* Even part */
-    
-    z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
-    tmp10 = z1 << (CONST_BITS+2);
-    
-    /* Odd part */
-
-    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
-    tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */
-    z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
-    tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */
-    z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
-    tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */
-    z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-    tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
-
-    /* Final output stage */
-    
-    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2);
-    wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2);
-  }
-  
-  /* Pass 2: process 2 rows from work array, store into output array. */
-
-  wsptr = workspace;
-  for (ctr = 0; ctr < 2; ctr++) {
-    outptr = output_buf[ctr] + output_col;
-    /* It's not clear whether a zero row test is worthwhile here ... */
-
-#ifndef NO_ZERO_ROW_TEST
-    if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) {
-      /* AC terms all zero */
-      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
-				  & RANGE_MASK];
-      
-      outptr[0] = dcval;
-      outptr[1] = dcval;
-      
-      wsptr += DCTSIZE;		/* advance pointer to next row */
-      continue;
-    }
-#endif
-    
-    /* Even part */
-    
-    tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2);
-    
-    /* Odd part */
-
-    tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */
-	 + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */
-	 + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */
-	 + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
-
-    /* Final output stage */
-    
-    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0,
-					  CONST_BITS+PASS1_BITS+3+2)
-			    & RANGE_MASK];
-    outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0,
-					  CONST_BITS+PASS1_BITS+3+2)
-			    & RANGE_MASK];
-    
-    wsptr += DCTSIZE;		/* advance pointer to next row */
-  }
-}
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 1x1 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-	       JCOEFPTR coef_block,
-	       JSAMPARRAY output_buf, JDIMENSION output_col)
-{
-  int dcval;
-  ISLOW_MULT_TYPE * quantptr;
-  JSAMPLE *range_limit = IDCT_range_limit(cinfo);
-  SHIFT_TEMPS
-
-  /* We hardly need an inverse DCT routine for this: just take the
-   * average pixel value, which is one-eighth of the DC coefficient.
-   */
-  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
-  dcval = DEQUANTIZE(coef_block[0], quantptr[0]);
-  dcval = (int) DESCALE((INT32) dcval, 3);
-
-  output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];
-}
-
-#endif /* IDCT_SCALING_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jinclude.h b/tkimg1.3/libjpeg/jinclude.h
deleted file mode 100644
index 0a4f151..0000000
--- a/tkimg1.3/libjpeg/jinclude.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * jinclude.h
- *
- * Copyright (C) 1991-1994, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file exists to provide a single place to fix any problems with
- * including the wrong system include files.  (Common problems are taken
- * care of by the standard jconfig symbols, but on really weird systems
- * you may have to edit this file.)
- *
- * NOTE: this file is NOT intended to be included by applications using the
- * JPEG library.  Most applications need only include jpeglib.h.
- */
-
-
-/* Include auto-config file to find out which system include files we need. */
-
-#include "jconfig.h"		/* auto configuration options */
-#define JCONFIG_INCLUDED	/* so that jpeglib.h doesn't do it again */
-
-/*
- * We need the NULL macro and size_t typedef.
- * On an ANSI-conforming system it is sufficient to include <stddef.h>.
- * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
- * pull in <sys/types.h> as well.
- * Note that the core JPEG library does not require <stdio.h>;
- * only the default error handler and data source/destination modules do.
- * But we must pull it in because of the references to FILE in jpeglib.h.
- * You can remove those references if you want to compile without <stdio.h>.
- */
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef NEED_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#include <stdio.h>
-
-/*
- * We need memory copying and zeroing functions, plus strncpy().
- * ANSI and System V implementations declare these in <string.h>.
- * BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
- * Some systems may declare memset and memcpy in <memory.h>.
- *
- * NOTE: we assume the size parameters to these functions are of type size_t.
- * Change the casts in these macros if not!
- */
-
-#ifdef NEED_BSD_STRINGS
-
-#include <strings.h>
-#define MEMZERO(target,size)	bzero((void *)(target), (size_t)(size))
-#define MEMCOPY(dest,src,size)	bcopy((const void *)(src), (void *)(dest), (size_t)(size))
-
-#else /* not BSD, assume ANSI/SysV string lib */
-
-#include <string.h>
-#define MEMZERO(target,size)	memset((void *)(target), 0, (size_t)(size))
-#define MEMCOPY(dest,src,size)	memcpy((void *)(dest), (const void *)(src), (size_t)(size))
-
-#endif
-
-/*
- * In ANSI C, and indeed any rational implementation, size_t is also the
- * type returned by sizeof().  However, it seems there are some irrational
- * implementations out there, in which sizeof() returns an int even though
- * size_t is defined as long or unsigned long.  To ensure consistent results
- * we always use this SIZEOF() macro in place of using sizeof() directly.
- */
-
-#define SIZEOF(object)	((size_t) sizeof(object))
-
-/*
- * The modules that use fread() and fwrite() always invoke them through
- * these macros.  On some systems you may need to twiddle the argument casts.
- * CAUTION: argument order is different from underlying functions!
- */
-
-#define JFREAD(file,buf,sizeofbuf)  \
-  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
-#define JFWRITE(file,buf,sizeofbuf)  \
-  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
diff --git a/tkimg1.3/libjpeg/jmemansi.c b/tkimg1.3/libjpeg/jmemansi.c
deleted file mode 100644
index 2d93e49..0000000
--- a/tkimg1.3/libjpeg/jmemansi.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * jmemansi.c
- *
- * Copyright (C) 1992-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides a simple generic implementation of the system-
- * dependent portion of the JPEG memory manager.  This implementation
- * assumes that you have the ANSI-standard library routine tmpfile().
- * Also, the problem of determining the amount of memory available
- * is shoved onto the user.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"		/* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-#endif
-
-#ifndef SEEK_SET		/* pre-ANSI systems may not define this; */
-#define SEEK_SET  0		/* if not, assume 0 is correct */
-#endif
-
-
-/*
- * Memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: although we include FAR keywords in the routine declarations,
- * this file won't actually work in 80x86 small/medium model; at least,
- * you probably won't be able to process useful-size images in only 64KB.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void FAR *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM		/* so can override from makefile */
-#define DEFAULT_MAX_MEM		1000000L /* default: one megabyte */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-		    long max_bytes_needed, long already_allocated)
-{
-  return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed.  You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		    void FAR * buffer_address,
-		    long file_offset, long byte_count)
-{
-  if (fseek(info->temp_file, file_offset, SEEK_SET))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  if (JFREAD(info->temp_file, buffer_address, byte_count)
-      != (size_t) byte_count)
-    ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		     void FAR * buffer_address,
-		     long file_offset, long byte_count)
-{
-  if (fseek(info->temp_file, file_offset, SEEK_SET))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  if (JFWRITE(info->temp_file, buffer_address, byte_count)
-      != (size_t) byte_count)
-    ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  fclose(info->temp_file);
-  /* Since this implementation uses tmpfile() to create the file,
-   * no explicit file deletion is needed.
-   */
-}
-
-
-/*
- * Initial opening of a backing-store object.
- *
- * This version uses tmpfile(), which constructs a suitable file name
- * behind the scenes.  We don't have to use info->temp_name[] at all;
- * indeed, we can't even find out the actual name of the temp file.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-			 long total_bytes_needed)
-{
-  if ((info->temp_file = tmpfile()) == NULL)
-    ERREXITS(cinfo, JERR_TFILE_CREATE, "");
-  info->read_backing_store = read_backing_store;
-  info->write_backing_store = write_backing_store;
-  info->close_backing_store = close_backing_store;
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
-  return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
-  /* no work */
-}
diff --git a/tkimg1.3/libjpeg/jmemdos.c b/tkimg1.3/libjpeg/jmemdos.c
deleted file mode 100644
index 60b45c6..0000000
--- a/tkimg1.3/libjpeg/jmemdos.c
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * jmemdos.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides an MS-DOS-compatible implementation of the system-
- * dependent portion of the JPEG memory manager.  Temporary data can be
- * stored in extended or expanded memory as well as in regular DOS files.
- *
- * If you use this file, you must be sure that NEED_FAR_POINTERS is defined
- * if you compile in a small-data memory model; it should NOT be defined if
- * you use a large-data memory model.  This file is not recommended if you
- * are using a flat-memory-space 386 environment such as DJGCC or Watcom C.
- * Also, this code will NOT work if struct fields are aligned on greater than
- * 2-byte boundaries.
- *
- * Based on code contributed by Ge' Weijers.
- */
-
-/*
- * If you have both extended and expanded memory, you may want to change the
- * order in which they are tried in jopen_backing_store.  On a 286 machine
- * expanded memory is usually faster, since extended memory access involves
- * an expensive protected-mode-and-back switch.  On 386 and better, extended
- * memory is usually faster.  As distributed, the code tries extended memory
- * first (what? not everyone has a 386? :-).
- *
- * You can disable use of extended/expanded memory entirely by altering these
- * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0).
- */
-
-#ifndef XMS_SUPPORTED
-#define XMS_SUPPORTED  1
-#endif
-#ifndef EMS_SUPPORTED
-#define EMS_SUPPORTED  1
-#endif
-
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"		/* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare these */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-extern char * getenv JPP((const char * name));
-#endif
-
-#ifdef NEED_FAR_POINTERS
-
-#ifdef __TURBOC__
-/* These definitions work for Borland C (Turbo C) */
-#include <alloc.h>		/* need farmalloc(), farfree() */
-#define far_malloc(x)	farmalloc(x)
-#define far_free(x)	farfree(x)
-#else
-/* These definitions work for Microsoft C and compatible compilers */
-#include <malloc.h>		/* need _fmalloc(), _ffree() */
-#define far_malloc(x)	_fmalloc(x)
-#define far_free(x)	_ffree(x)
-#endif
-
-#else /* not NEED_FAR_POINTERS */
-
-#define far_malloc(x)	malloc(x)
-#define far_free(x)	free(x)
-
-#endif /* NEED_FAR_POINTERS */
-
-#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
-#define READ_BINARY	"r"
-#else
-#define READ_BINARY	"rb"
-#endif
-
-#ifndef USE_MSDOS_MEMMGR	/* make sure user got configuration right */
-  You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */
-#endif
-
-#if MAX_ALLOC_CHUNK >= 65535L	/* make sure jconfig.h got this right */
-  MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */
-#endif
-
-
-/*
- * Declarations for assembly-language support routines (see jmemdosa.asm).
- *
- * The functions are declared "far" as are all their pointer arguments;
- * this ensures the assembly source code will work regardless of the
- * compiler memory model.  We assume "short" is 16 bits, "long" is 32.
- */
-
-typedef void far * XMSDRIVER;	/* actually a pointer to code */
-typedef struct {		/* registers for calling XMS driver */
-	unsigned short ax, dx, bx;
-	void far * ds_si;
-      } XMScontext;
-typedef struct {		/* registers for calling EMS driver */
-	unsigned short ax, dx, bx;
-	void far * ds_si;
-      } EMScontext;
-
-extern short far jdos_open JPP((short far * handle, char far * filename));
-extern short far jdos_close JPP((short handle));
-extern short far jdos_seek JPP((short handle, long offset));
-extern short far jdos_read JPP((short handle, void far * buffer,
-				unsigned short count));
-extern short far jdos_write JPP((short handle, void far * buffer,
-				 unsigned short count));
-extern void far jxms_getdriver JPP((XMSDRIVER far *));
-extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *));
-extern short far jems_available JPP((void));
-extern void far jems_calldriver JPP((EMScontext far *));
-
-
-/*
- * Selection of a file name for a temporary file.
- * This is highly system-dependent, and you may want to customize it.
- */
-
-static int next_file_num;	/* to distinguish among several temp files */
-
-LOCAL(void)
-select_file_name (char * fname)
-{
-  const char * env;
-  char * ptr;
-  FILE * tfile;
-
-  /* Keep generating file names till we find one that's not in use */
-  for (;;) {
-    /* Get temp directory name from environment TMP or TEMP variable;
-     * if none, use "."
-     */
-    if ((env = (const char *) getenv("TMP")) == NULL)
-      if ((env = (const char *) getenv("TEMP")) == NULL)
-	env = ".";
-    if (*env == '\0')		/* null string means "." */
-      env = ".";
-    ptr = fname;		/* copy name to fname */
-    while (*env != '\0')
-      *ptr++ = *env++;
-    if (ptr[-1] != '\\' && ptr[-1] != '/')
-      *ptr++ = '\\';		/* append backslash if not in env variable */
-    /* Append a suitable file name */
-    next_file_num++;		/* advance counter */
-    sprintf(ptr, "JPG%03d.TMP", next_file_num);
-    /* Probe to see if file name is already in use */
-    if ((tfile = fopen(fname, READ_BINARY)) == NULL)
-      break;
-    fclose(tfile);		/* oops, it's there; close tfile & try again */
-  }
-}
-
-
-/*
- * Near-memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * "Large" objects are allocated in far memory, if possible
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void FAR *) far_malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
-  far_free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM		/* so can override from makefile */
-#define DEFAULT_MAX_MEM		300000L /* for total usage about 450K */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-		    long max_bytes_needed, long already_allocated)
-{
-  return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed.  You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-/*
- * For MS-DOS we support three types of backing storage:
- *   1. Conventional DOS files.  We access these by direct DOS calls rather
- *      than via the stdio package.  This provides a bit better performance,
- *      but the real reason is that the buffers to be read or written are FAR.
- *      The stdio library for small-data memory models can't cope with that.
- *   2. Extended memory, accessed per the XMS V2.0 specification.
- *   3. Expanded memory, accessed per the LIM/EMS 4.0 specification.
- * You'll need copies of those specs to make sense of the related code.
- * The specs are available by Internet FTP from the SIMTEL archives 
- * (oak.oakland.edu and its various mirror sites).  See files
- * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip.
- */
-
-
-/*
- * Access methods for a DOS file.
- */
-
-
-METHODDEF(void)
-read_file_store (j_common_ptr cinfo, backing_store_ptr info,
-		 void FAR * buffer_address,
-		 long file_offset, long byte_count)
-{
-  if (jdos_seek(info->handle.file_handle, file_offset))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
-  if (byte_count > 65535L)	/* safety check */
-    ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
-  if (jdos_read(info->handle.file_handle, buffer_address,
-		(unsigned short) byte_count))
-    ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_file_store (j_common_ptr cinfo, backing_store_ptr info,
-		  void FAR * buffer_address,
-		  long file_offset, long byte_count)
-{
-  if (jdos_seek(info->handle.file_handle, file_offset))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
-  if (byte_count > 65535L)	/* safety check */
-    ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
-  if (jdos_write(info->handle.file_handle, buffer_address,
-		 (unsigned short) byte_count))
-    ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_file_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  jdos_close(info->handle.file_handle);	/* close the file */
-  remove(info->temp_name);	/* delete the file */
-/* If your system doesn't have remove(), try unlink() instead.
- * remove() is the ANSI-standard name for this function, but
- * unlink() was more common in pre-ANSI systems.
- */
-  TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
-}
-
-
-LOCAL(boolean)
-open_file_store (j_common_ptr cinfo, backing_store_ptr info,
-		 long total_bytes_needed)
-{
-  short handle;
-
-  select_file_name(info->temp_name);
-  if (jdos_open((short far *) & handle, (char far *) info->temp_name)) {
-    /* might as well exit since jpeg_open_backing_store will fail anyway */
-    ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-    return FALSE;
-  }
-  info->handle.file_handle = handle;
-  info->read_backing_store = read_file_store;
-  info->write_backing_store = write_file_store;
-  info->close_backing_store = close_file_store;
-  TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
-  return TRUE;			/* succeeded */
-}
-
-
-/*
- * Access methods for extended memory.
- */
-
-#if XMS_SUPPORTED
-
-static XMSDRIVER xms_driver;	/* saved address of XMS driver */
-
-typedef union {			/* either long offset or real-mode pointer */
-	long offset;
-	void far * ptr;
-      } XMSPTR;
-
-typedef struct {		/* XMS move specification structure */
-	long length;
-	XMSH src_handle;
-	XMSPTR src;
-	XMSH dst_handle;
-	XMSPTR dst;
-      } XMSspec;
-
-#define ODD(X)	(((X) & 1L) != 0)
-
-
-METHODDEF(void)
-read_xms_store (j_common_ptr cinfo, backing_store_ptr info,
-		void FAR * buffer_address,
-		long file_offset, long byte_count)
-{
-  XMScontext ctx;
-  XMSspec spec;
-  char endbuffer[2];
-
-  /* The XMS driver can't cope with an odd length, so handle the last byte
-   * specially if byte_count is odd.  We don't expect this to be common.
-   */
-
-  spec.length = byte_count & (~ 1L);
-  spec.src_handle = info->handle.xms_handle;
-  spec.src.offset = file_offset;
-  spec.dst_handle = 0;
-  spec.dst.ptr = buffer_address;
-  
-  ctx.ds_si = (void far *) & spec;
-  ctx.ax = 0x0b00;		/* EMB move */
-  jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
-  if (ctx.ax != 1)
-    ERREXIT(cinfo, JERR_XMS_READ);
-
-  if (ODD(byte_count)) {
-    read_xms_store(cinfo, info, (void FAR *) endbuffer,
-		   file_offset + byte_count - 1L, 2L);
-    ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0];
-  }
-}
-
-
-METHODDEF(void)
-write_xms_store (j_common_ptr cinfo, backing_store_ptr info,
-		 void FAR * buffer_address,
-		 long file_offset, long byte_count)
-{
-  XMScontext ctx;
-  XMSspec spec;
-  char endbuffer[2];
-
-  /* The XMS driver can't cope with an odd length, so handle the last byte
-   * specially if byte_count is odd.  We don't expect this to be common.
-   */
-
-  spec.length = byte_count & (~ 1L);
-  spec.src_handle = 0;
-  spec.src.ptr = buffer_address;
-  spec.dst_handle = info->handle.xms_handle;
-  spec.dst.offset = file_offset;
-
-  ctx.ds_si = (void far *) & spec;
-  ctx.ax = 0x0b00;		/* EMB move */
-  jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
-  if (ctx.ax != 1)
-    ERREXIT(cinfo, JERR_XMS_WRITE);
-
-  if (ODD(byte_count)) {
-    read_xms_store(cinfo, info, (void FAR *) endbuffer,
-		   file_offset + byte_count - 1L, 2L);
-    endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L];
-    write_xms_store(cinfo, info, (void FAR *) endbuffer,
-		    file_offset + byte_count - 1L, 2L);
-  }
-}
-
-
-METHODDEF(void)
-close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  XMScontext ctx;
-
-  ctx.dx = info->handle.xms_handle;
-  ctx.ax = 0x0a00;
-  jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
-  TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle);
-  /* we ignore any error return from the driver */
-}
-
-
-LOCAL(boolean)
-open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
-		long total_bytes_needed)
-{
-  XMScontext ctx;
-
-  /* Get address of XMS driver */
-  jxms_getdriver((XMSDRIVER far *) & xms_driver);
-  if (xms_driver == NULL)
-    return FALSE;		/* no driver to be had */
-
-  /* Get version number, must be >= 2.00 */
-  ctx.ax = 0x0000;
-  jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
-  if (ctx.ax < (unsigned short) 0x0200)
-    return FALSE;
-
-  /* Try to get space (expressed in kilobytes) */
-  ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10);
-  ctx.ax = 0x0900;
-  jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
-  if (ctx.ax != 1)
-    return FALSE;
-
-  /* Succeeded, save the handle and away we go */
-  info->handle.xms_handle = ctx.dx;
-  info->read_backing_store = read_xms_store;
-  info->write_backing_store = write_xms_store;
-  info->close_backing_store = close_xms_store;
-  TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx);
-  return TRUE;			/* succeeded */
-}
-
-#endif /* XMS_SUPPORTED */
-
-
-/*
- * Access methods for expanded memory.
- */
-
-#if EMS_SUPPORTED
-
-/* The EMS move specification structure requires word and long fields aligned
- * at odd byte boundaries.  Some compilers will align struct fields at even
- * byte boundaries.  While it's usually possible to force byte alignment,
- * that causes an overall performance penalty and may pose problems in merging
- * JPEG into a larger application.  Instead we accept some rather dirty code
- * here.  Note this code would fail if the hardware did not allow odd-byte
- * word & long accesses, but all 80x86 CPUs do.
- */
-
-typedef void far * EMSPTR;
-
-typedef union {			/* EMS move specification structure */
-	long length;		/* It's easy to access first 4 bytes */
-	char bytes[18];		/* Misaligned fields in here! */
-      } EMSspec;
-
-/* Macros for accessing misaligned fields */
-#define FIELD_AT(spec,offset,type)  (*((type *) &(spec.bytes[offset])))
-#define SRC_TYPE(spec)		FIELD_AT(spec,4,char)
-#define SRC_HANDLE(spec)	FIELD_AT(spec,5,EMSH)
-#define SRC_OFFSET(spec)	FIELD_AT(spec,7,unsigned short)
-#define SRC_PAGE(spec)		FIELD_AT(spec,9,unsigned short)
-#define SRC_PTR(spec)		FIELD_AT(spec,7,EMSPTR)
-#define DST_TYPE(spec)		FIELD_AT(spec,11,char)
-#define DST_HANDLE(spec)	FIELD_AT(spec,12,EMSH)
-#define DST_OFFSET(spec)	FIELD_AT(spec,14,unsigned short)
-#define DST_PAGE(spec)		FIELD_AT(spec,16,unsigned short)
-#define DST_PTR(spec)		FIELD_AT(spec,14,EMSPTR)
-
-#define EMSPAGESIZE	16384L	/* gospel, see the EMS specs */
-
-#define HIBYTE(W)  (((W) >> 8) & 0xFF)
-#define LOBYTE(W)  ((W) & 0xFF)
-
-
-METHODDEF(void)
-read_ems_store (j_common_ptr cinfo, backing_store_ptr info,
-		void FAR * buffer_address,
-		long file_offset, long byte_count)
-{
-  EMScontext ctx;
-  EMSspec spec;
-
-  spec.length = byte_count;
-  SRC_TYPE(spec) = 1;
-  SRC_HANDLE(spec) = info->handle.ems_handle;
-  SRC_PAGE(spec)   = (unsigned short) (file_offset / EMSPAGESIZE);
-  SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
-  DST_TYPE(spec) = 0;
-  DST_HANDLE(spec) = 0;
-  DST_PTR(spec)    = buffer_address;
-  
-  ctx.ds_si = (void far *) & spec;
-  ctx.ax = 0x5700;		/* move memory region */
-  jems_calldriver((EMScontext far *) & ctx);
-  if (HIBYTE(ctx.ax) != 0)
-    ERREXIT(cinfo, JERR_EMS_READ);
-}
-
-
-METHODDEF(void)
-write_ems_store (j_common_ptr cinfo, backing_store_ptr info,
-		 void FAR * buffer_address,
-		 long file_offset, long byte_count)
-{
-  EMScontext ctx;
-  EMSspec spec;
-
-  spec.length = byte_count;
-  SRC_TYPE(spec) = 0;
-  SRC_HANDLE(spec) = 0;
-  SRC_PTR(spec)    = buffer_address;
-  DST_TYPE(spec) = 1;
-  DST_HANDLE(spec) = info->handle.ems_handle;
-  DST_PAGE(spec)   = (unsigned short) (file_offset / EMSPAGESIZE);
-  DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
-  
-  ctx.ds_si = (void far *) & spec;
-  ctx.ax = 0x5700;		/* move memory region */
-  jems_calldriver((EMScontext far *) & ctx);
-  if (HIBYTE(ctx.ax) != 0)
-    ERREXIT(cinfo, JERR_EMS_WRITE);
-}
-
-
-METHODDEF(void)
-close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  EMScontext ctx;
-
-  ctx.ax = 0x4500;
-  ctx.dx = info->handle.ems_handle;
-  jems_calldriver((EMScontext far *) & ctx);
-  TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle);
-  /* we ignore any error return from the driver */
-}
-
-
-LOCAL(boolean)
-open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
-		long total_bytes_needed)
-{
-  EMScontext ctx;
-
-  /* Is EMS driver there? */
-  if (! jems_available())
-    return FALSE;
-
-  /* Get status, make sure EMS is OK */
-  ctx.ax = 0x4000;
-  jems_calldriver((EMScontext far *) & ctx);
-  if (HIBYTE(ctx.ax) != 0)
-    return FALSE;
-
-  /* Get version, must be >= 4.0 */
-  ctx.ax = 0x4600;
-  jems_calldriver((EMScontext far *) & ctx);
-  if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40)
-    return FALSE;
-
-  /* Try to allocate requested space */
-  ctx.ax = 0x4300;
-  ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE);
-  jems_calldriver((EMScontext far *) & ctx);
-  if (HIBYTE(ctx.ax) != 0)
-    return FALSE;
-
-  /* Succeeded, save the handle and away we go */
-  info->handle.ems_handle = ctx.dx;
-  info->read_backing_store = read_ems_store;
-  info->write_backing_store = write_ems_store;
-  info->close_backing_store = close_ems_store;
-  TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx);
-  return TRUE;			/* succeeded */
-}
-
-#endif /* EMS_SUPPORTED */
-
-
-/*
- * Initial opening of a backing-store object.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-			 long total_bytes_needed)
-{
-  /* Try extended memory, then expanded memory, then regular file. */
-#if XMS_SUPPORTED
-  if (open_xms_store(cinfo, info, total_bytes_needed))
-    return;
-#endif
-#if EMS_SUPPORTED
-  if (open_ems_store(cinfo, info, total_bytes_needed))
-    return;
-#endif
-  if (open_file_store(cinfo, info, total_bytes_needed))
-    return;
-  ERREXITS(cinfo, JERR_TFILE_CREATE, "");
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
-  next_file_num = 0;		/* initialize temp file name generator */
-  return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
-  /* Microsoft C, at least in v6.00A, will not successfully reclaim freed
-   * blocks of size > 32Kbytes unless we give it a kick in the rear, like so:
-   */
-#ifdef NEED_FHEAPMIN
-  _fheapmin();
-#endif
-}
diff --git a/tkimg1.3/libjpeg/jmemdosa.asm b/tkimg1.3/libjpeg/jmemdosa.asm
deleted file mode 100644
index ecd4372..0000000
--- a/tkimg1.3/libjpeg/jmemdosa.asm
+++ /dev/null
@@ -1,379 +0,0 @@
-;
-; jmemdosa.asm
-;
-; Copyright (C) 1992, Thomas G. Lane.
-; This file is part of the Independent JPEG Group's software.
-; For conditions of distribution and use, see the accompanying README file.
-;
-; This file contains low-level interface routines to support the MS-DOS
-; backing store manager (jmemdos.c).  Routines are provided to access disk
-; files through direct DOS calls, and to access XMS and EMS drivers.
-;
-; This file should assemble with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).  If you haven't got
-; a compatible assembler, better fall back to jmemansi.c or jmemname.c.
-;
-; To minimize dependence on the C compiler's register usage conventions,
-; we save and restore all 8086 registers, even though most compilers only
-; require SI,DI,DS to be preserved.  Also, we use only 16-bit-wide return
-; values, which everybody returns in AX.
-;
-; Based on code contributed by Ge' Weijers.
-;
-
-JMEMDOSA_TXT	segment byte public 'CODE'
-
-		assume	cs:JMEMDOSA_TXT
-
-		public	_jdos_open
-		public	_jdos_close
-		public	_jdos_seek
-		public	_jdos_read
-		public	_jdos_write
-		public	_jxms_getdriver
-		public	_jxms_calldriver
-		public	_jems_available
-		public	_jems_calldriver
-
-;
-; short far jdos_open (short far * handle, char far * filename)
-;
-; Create and open a temporary file
-;
-_jdos_open	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	cx,0			; normal file attributes
-		lds	dx,dword ptr [bp+10]	; get filename pointer
-		mov	ah,3ch			; create file
-		int	21h
-		jc	open_err		; if failed, return error code
-		lds	bx,dword ptr [bp+6]	; get handle pointer
-		mov	word ptr [bx],ax	; save the handle
-		xor	ax,ax			; return zero for OK
-open_err:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jdos_open	endp
-
-
-;
-; short far jdos_close (short handle)
-;
-; Close the file handle
-;
-_jdos_close	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	bx,word ptr [bp+6]	; file handle
-		mov	ah,3eh			; close file
-		int	21h
-		jc	close_err		; if failed, return error code
-		xor	ax,ax			; return zero for OK
-close_err:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jdos_close	endp
-
-
-;
-; short far jdos_seek (short handle, long offset)
-;
-; Set file position
-;
-_jdos_seek	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	bx,word ptr [bp+6]	; file handle
-		mov	dx,word ptr [bp+8]	; LS offset
-		mov	cx,word ptr [bp+10]	; MS offset
-		mov	ax,4200h		; absolute seek
-		int	21h
-		jc	seek_err		; if failed, return error code
-		xor	ax,ax			; return zero for OK
-seek_err:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jdos_seek	endp
-
-
-;
-; short far jdos_read (short handle, void far * buffer, unsigned short count)
-;
-; Read from file
-;
-_jdos_read	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	bx,word ptr [bp+6]	; file handle
-		lds	dx,dword ptr [bp+8]	; buffer address
-		mov	cx,word ptr [bp+12]	; number of bytes
-		mov	ah,3fh			; read file
-		int	21h
-		jc	read_err		; if failed, return error code
-		cmp	ax,word ptr [bp+12]	; make sure all bytes were read
-		je	read_ok
-		mov	ax,1			; else return 1 for not OK
-		jmp	short read_err
-read_ok:	xor	ax,ax			; return zero for OK
-read_err:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jdos_read	endp
-
-
-;
-; short far jdos_write (short handle, void far * buffer, unsigned short count)
-;
-; Write to file
-;
-_jdos_write	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	bx,word ptr [bp+6]	; file handle
-		lds	dx,dword ptr [bp+8]	; buffer address
-		mov	cx,word ptr [bp+12]	; number of bytes
-		mov	ah,40h			; write file
-		int	21h
-		jc	write_err		; if failed, return error code
-		cmp	ax,word ptr [bp+12]	; make sure all bytes written
-		je	write_ok
-		mov	ax,1			; else return 1 for not OK
-		jmp	short write_err
-write_ok:	xor	ax,ax			; return zero for OK
-write_err:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jdos_write	endp
-
-
-;
-; void far jxms_getdriver (XMSDRIVER far *)
-;
-; Get the address of the XMS driver, or NULL if not available
-;
-_jxms_getdriver	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov 	ax,4300h		; call multiplex interrupt with
-		int	2fh			; a magic cookie, hex 4300
-		cmp 	al,80h			; AL should contain hex 80
-		je	xmsavail
-		xor 	dx,dx			; no XMS driver available
-		xor 	ax,ax			; return a nil pointer
-		jmp	short xmsavail_done
-xmsavail:	mov 	ax,4310h		; fetch driver address with
-		int	2fh			; another magic cookie
-		mov 	dx,es			; copy address to dx:ax
-		mov 	ax,bx
-xmsavail_done:	les 	bx,dword ptr [bp+6]	; get pointer to return value
-		mov	word ptr es:[bx],ax
-		mov	word ptr es:[bx+2],dx
-		pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop	bp
-		ret
-_jxms_getdriver	endp
-
-
-;
-; void far jxms_calldriver (XMSDRIVER, XMScontext far *)
-;
-; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers.
-; These are loaded, the XMS call is performed, and the new values of the
-; AX,DX,BX registers are written back to the context structure.
-;
-_jxms_calldriver 	proc	far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		les 	bx,dword ptr [bp+10]	; get XMScontext pointer
-		mov 	ax,word ptr es:[bx]	; load registers
-		mov 	dx,word ptr es:[bx+2]
-		mov 	si,word ptr es:[bx+6]
-		mov 	ds,word ptr es:[bx+8]
-		mov 	bx,word ptr es:[bx+4]
-		call	dword ptr [bp+6]	; call the driver
-		mov	cx,bx			; save returned BX for a sec
-		les 	bx,dword ptr [bp+10]	; get XMScontext pointer
-		mov 	word ptr es:[bx],ax	; put back ax,dx,bx
-		mov 	word ptr es:[bx+2],dx
-		mov 	word ptr es:[bx+4],cx
-		pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jxms_calldriver 	endp
-
-
-;
-; short far jems_available (void)
-;
-; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs)
-;
-_jems_available	proc	far
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		mov	ax,3567h		; get interrupt vector 67h
-		int	21h
-		push	cs
-		pop	ds
-		mov	di,000ah		; check offs 10 in returned seg
-		lea	si,ASCII_device_name	; against literal string
-		mov	cx,8
-		cld
-		repe cmpsb
-		jne	no_ems
-		mov	ax,1			; match, it's there
-		jmp	short avail_done
-no_ems:		xor	ax,ax			; it's not there
-avail_done:	pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		ret
-
-ASCII_device_name	db	"EMMXXXX0"
-
-_jems_available	endp
-
-
-;
-; void far jems_calldriver (EMScontext far *)
-;
-; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers.
-; These are loaded, the EMS trap is performed, and the new values of the
-; AX,DX,BX registers are written back to the context structure.
-;
-_jems_calldriver	proc far
-		push	bp			; linkage
-		mov 	bp,sp
-		push	si			; save all registers for safety
-		push	di
-		push	bx
-		push	cx
-		push	dx
-		push	es
-		push	ds
-		les 	bx,dword ptr [bp+6]	; get EMScontext pointer
-		mov 	ax,word ptr es:[bx]	; load registers
-		mov 	dx,word ptr es:[bx+2]
-		mov 	si,word ptr es:[bx+6]
-		mov 	ds,word ptr es:[bx+8]
-		mov 	bx,word ptr es:[bx+4]
-		int	67h			; call the EMS driver
-		mov	cx,bx			; save returned BX for a sec
-		les 	bx,dword ptr [bp+6]	; get EMScontext pointer
-		mov 	word ptr es:[bx],ax	; put back ax,dx,bx
-		mov 	word ptr es:[bx+2],dx
-		mov 	word ptr es:[bx+4],cx
-		pop	ds			; restore registers and exit
-		pop	es
-		pop	dx
-		pop	cx
-		pop	bx
-		pop	di
-		pop	si
-		pop 	bp
-		ret
-_jems_calldriver	endp
-
-JMEMDOSA_TXT	ends
-
-		end
diff --git a/tkimg1.3/libjpeg/jmemmac.c b/tkimg1.3/libjpeg/jmemmac.c
deleted file mode 100644
index 106f9be..0000000
--- a/tkimg1.3/libjpeg/jmemmac.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * jmemmac.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * jmemmac.c provides an Apple Macintosh implementation of the system-
- * dependent portion of the JPEG memory manager.
- *
- * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the
- * JPEG_INTERNALS part of jconfig.h.
- *
- * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr
- * instead of malloc and free.  It accurately determines the amount of
- * memory available by using CompactMem.  Notice that if left to its
- * own devices, this code can chew up all available space in the
- * application's zone, with the exception of the rather small "slop"
- * factor computed in jpeg_mem_available().  The application can ensure
- * that more space is left over by reducing max_memory_to_use.
- *
- * Large images are swapped to disk using temporary files and System 7.0+'s
- * temporary folder functionality.
- *
- * Note that jmemmac.c depends on two features of MacOS that were first
- * introduced in System 7: FindFolder and the FSSpec-based calls.
- * If your application uses jmemmac.c and is run under System 6 or earlier,
- * and the jpeg library decides it needs a temporary file, it will abort,
- * printing error messages about requiring System 7.  (If no temporary files
- * are created, it will run fine.)
- *
- * If you want to use jmemmac.c in an application that might be used with
- * System 6 or earlier, then you should remove dependencies on FindFolder
- * and the FSSpec calls.  You will need to replace FindFolder with some
- * other mechanism for finding a place to put temporary files, and you
- * should replace the FSSpec calls with their HFS equivalents:
- *
- *     FSpDelete     ->  HDelete
- *     FSpGetFInfo   ->  HGetFInfo
- *     FSpCreate     ->  HCreate
- *     FSpOpenDF     ->  HOpen      *** Note: not HOpenDF ***
- *     FSMakeFSSpec  ->  (fill in spec by hand.)
- *
- * (Use HOpen instead of HOpenDF.  HOpen is just a glue-interface to PBHOpen,
- * which is on all HFS macs.  HOpenDF is a System 7 addition which avoids the
- * ages-old problem of names starting with a period.)
- *
- * Contributed by Sam Bushell (jsam at iagu.on.net) and
- * Dan Gildor (gyld at in-touch.com).
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"    /* import the system-dependent declarations */
-
-#ifndef USE_MAC_MEMMGR	/* make sure user got configuration right */
-  You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */
-#endif
-
-#include <Memory.h>     /* we use the MacOS memory manager */
-#include <Files.h>      /* we use the MacOS File stuff */
-#include <Folders.h>    /* we use the MacOS HFS stuff */
-#include <Script.h>     /* for smSystemScript */
-#include <Gestalt.h>    /* we use Gestalt to test for specific functionality */
-
-#ifndef TEMP_FILE_NAME		/* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME  "JPG%03d.TMP"
-#endif
-
-static int next_file_num;	/* to distinguish among several temp files */
-
-
-/*
- * Memory allocation and freeing are controlled by the MacOS library
- * routines NewPtr() and DisposePtr(), which allocate fixed-address
- * storage.  Unfortunately, the IJG library isn't smart enough to cope
- * with relocatable storage.
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void *) NewPtr(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
-  DisposePtr((Ptr) object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: we include FAR keywords in the routine declarations simply for
- * consistency with the rest of the IJG code; FAR should expand to empty
- * on rational architectures like the Mac.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void FAR *) NewPtr(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
-  DisposePtr((Ptr) object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- */
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-		    long max_bytes_needed, long already_allocated)
-{
-  long limit = cinfo->mem->max_memory_to_use - already_allocated;
-  long slop, mem;
-
-  /* Don't ask for more than what application has told us we may use */
-  if (max_bytes_needed > limit && limit > 0)
-    max_bytes_needed = limit;
-  /* Find whether there's a big enough free block in the heap.
-   * CompactMem tries to create a contiguous block of the requested size,
-   * and then returns the size of the largest free block (which could be
-   * much more or much less than we asked for).
-   * We add some slop to ensure we don't use up all available memory.
-   */
-  slop = max_bytes_needed / 16 + 32768L;
-  mem = CompactMem(max_bytes_needed + slop) - slop;
-  if (mem < 0)
-    mem = 0;			/* sigh, couldn't even get the slop */
-  /* Don't take more than the application says we can have */
-  if (mem > limit && limit > 0)
-    mem = limit;
-  return mem;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed.  You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		    void FAR * buffer_address,
-		    long file_offset, long byte_count)
-{
-  long bytes = byte_count;
-  long retVal;
-
-  if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-
-  retVal = FSRead ( info->temp_file, &bytes,
-		    (unsigned char *) buffer_address );
-  if ( retVal != noErr || bytes != byte_count )
-    ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		     void FAR * buffer_address,
-		     long file_offset, long byte_count)
-{
-  long bytes = byte_count;
-  long retVal;
-
-  if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-
-  retVal = FSWrite ( info->temp_file, &bytes,
-		     (unsigned char *) buffer_address );
-  if ( retVal != noErr || bytes != byte_count )
-    ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  FSClose ( info->temp_file );
-  FSpDelete ( &(info->tempSpec) );
-}
-
-
-/*
- * Initial opening of a backing-store object.
- *
- * This version uses FindFolder to find the Temporary Items folder,
- * and puts the temporary file in there.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-			 long total_bytes_needed)
-{
-  short         tmpRef, vRefNum;
-  long          dirID;
-  FInfo         finderInfo;
-  FSSpec        theSpec;
-  Str255        fName;
-  OSErr         osErr;
-  long          gestaltResponse = 0;
-
-  /* Check that FSSpec calls are available. */
-  osErr = Gestalt( gestaltFSAttr, &gestaltResponse );
-  if ( ( osErr != noErr )
-       || !( gestaltResponse & (1<<gestaltHasFSSpecCalls) ) )
-    ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required");
-  /* TO DO: add a proper error message to jerror.h. */
-
-  /* Check that FindFolder is available. */
-  osErr = Gestalt( gestaltFindFolderAttr, &gestaltResponse );
-  if ( ( osErr != noErr )
-       || !( gestaltResponse & (1<<gestaltFindFolderPresent) ) )
-    ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required.");
-  /* TO DO: add a proper error message to jerror.h. */
-
-  osErr = FindFolder ( kOnSystemDisk, kTemporaryFolderType, kCreateFolder,
-                       &vRefNum, &dirID );
-  if ( osErr != noErr )
-    ERREXITS(cinfo, JERR_TFILE_CREATE, "- temporary items folder unavailable");
-  /* TO DO: Try putting the temp files somewhere else. */
-
-  /* Keep generating file names till we find one that's not in use */
-  for (;;) {
-    next_file_num++;		/* advance counter */
-
-    sprintf(info->temp_name, TEMP_FILE_NAME, next_file_num);
-    strcpy ( (Ptr)fName+1, info->temp_name );
-    *fName = strlen (info->temp_name);
-    osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec );
-
-    if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr )
-      break;
-  }
-
-  osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript );
-  if ( osErr != noErr )
-    ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-
-  osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) );
-  if ( osErr != noErr )
-    ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-
-  info->tempSpec = theSpec;
-
-  info->read_backing_store = read_backing_store;
-  info->write_backing_store = write_backing_store;
-  info->close_backing_store = close_backing_store;
-  TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
-  next_file_num = 0;
-
-  /* max_memory_to_use will be initialized to FreeMem()'s result;
-   * the calling application might later reduce it, for example
-   * to leave room to invoke multiple JPEG objects.
-   * Note that FreeMem returns the total number of free bytes;
-   * it may not be possible to allocate a single block of this size.
-   */
-  return FreeMem();
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
-  /* no work */
-}
diff --git a/tkimg1.3/libjpeg/jmemmgr.c b/tkimg1.3/libjpeg/jmemmgr.c
deleted file mode 100644
index d801b32..0000000
--- a/tkimg1.3/libjpeg/jmemmgr.c
+++ /dev/null
@@ -1,1118 +0,0 @@
-/*
- * jmemmgr.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the JPEG system-independent memory management
- * routines.  This code is usable across a wide variety of machines; most
- * of the system dependencies have been isolated in a separate file.
- * The major functions provided here are:
- *   * pool-based allocation and freeing of memory;
- *   * policy decisions about how to divide available memory among the
- *     virtual arrays;
- *   * control logic for swapping virtual arrays between main memory and
- *     backing storage.
- * The separate system-dependent file provides the actual backing-storage
- * access code, and it contains the policy decision about how much total
- * main memory to use.
- * This file is system-dependent in the sense that some of its functions
- * are unnecessary in some systems.  For example, if there is enough virtual
- * memory so that backing storage will never be used, much of the virtual
- * array control logic could be removed.  (Of course, if you have that much
- * memory then you shouldn't care about a little bit of unused code...)
- */
-
-#define JPEG_INTERNALS
-#define AM_MEMORY_MANAGER	/* we define jvirt_Xarray_control structs */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"		/* import the system-dependent declarations */
-
-#ifndef NO_GETENV
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare getenv() */
-extern char * getenv JPP((const char * name));
-#endif
-#endif
-
-
-/*
- * Some important notes:
- *   The allocation routines provided here must never return NULL.
- *   They should exit to error_exit if unsuccessful.
- *
- *   It's not a good idea to try to merge the sarray and barray routines,
- *   even though they are textually almost the same, because samples are
- *   usually stored as bytes while coefficients are shorts or ints.  Thus,
- *   in machines where byte pointers have a different representation from
- *   word pointers, the resulting machine code could not be the same.
- */
-
-
-/*
- * Many machines require storage alignment: longs must start on 4-byte
- * boundaries, doubles on 8-byte boundaries, etc.  On such machines, malloc()
- * always returns pointers that are multiples of the worst-case alignment
- * requirement, and we had better do so too.
- * There isn't any really portable way to determine the worst-case alignment
- * requirement.  This module assumes that the alignment requirement is
- * multiples of sizeof(ALIGN_TYPE).
- * By default, we define ALIGN_TYPE as double.  This is necessary on some
- * workstations (where doubles really do need 8-byte alignment) and will work
- * fine on nearly everything.  If your machine has lesser alignment needs,
- * you can save a few bytes by making ALIGN_TYPE smaller.
- * The only place I know of where this will NOT work is certain Macintosh
- * 680x0 compilers that define double as a 10-byte IEEE extended float.
- * Doing 10-byte alignment is counterproductive because longwords won't be
- * aligned well.  Put "#define ALIGN_TYPE long" in jconfig.h if you have
- * such a compiler.
- */
-
-#ifndef ALIGN_TYPE		/* so can override from jconfig.h */
-#define ALIGN_TYPE  double
-#endif
-
-
-/*
- * We allocate objects from "pools", where each pool is gotten with a single
- * request to jpeg_get_small() or jpeg_get_large().  There is no per-object
- * overhead within a pool, except for alignment padding.  Each pool has a
- * header with a link to the next pool of the same class.
- * Small and large pool headers are identical except that the latter's
- * link pointer must be FAR on 80x86 machines.
- * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE
- * field.  This forces the compiler to make SIZEOF(small_pool_hdr) a multiple
- * of the alignment requirement of ALIGN_TYPE.
- */
-
-typedef union small_pool_struct * small_pool_ptr;
-
-typedef union small_pool_struct {
-  struct {
-    small_pool_ptr next;	/* next in list of pools */
-    size_t bytes_used;		/* how many bytes already used within pool */
-    size_t bytes_left;		/* bytes still available in this pool */
-  } hdr;
-  ALIGN_TYPE dummy;		/* included in union to ensure alignment */
-} small_pool_hdr;
-
-typedef union large_pool_struct FAR * large_pool_ptr;
-
-typedef union large_pool_struct {
-  struct {
-    large_pool_ptr next;	/* next in list of pools */
-    size_t bytes_used;		/* how many bytes already used within pool */
-    size_t bytes_left;		/* bytes still available in this pool */
-  } hdr;
-  ALIGN_TYPE dummy;		/* included in union to ensure alignment */
-} large_pool_hdr;
-
-
-/*
- * Here is the full definition of a memory manager object.
- */
-
-typedef struct {
-  struct jpeg_memory_mgr pub;	/* public fields */
-
-  /* Each pool identifier (lifetime class) names a linked list of pools. */
-  small_pool_ptr small_list[JPOOL_NUMPOOLS];
-  large_pool_ptr large_list[JPOOL_NUMPOOLS];
-
-  /* Since we only have one lifetime class of virtual arrays, only one
-   * linked list is necessary (for each datatype).  Note that the virtual
-   * array control blocks being linked together are actually stored somewhere
-   * in the small-pool list.
-   */
-  jvirt_sarray_ptr virt_sarray_list;
-  jvirt_barray_ptr virt_barray_list;
-
-  /* This counts total space obtained from jpeg_get_small/large */
-  long total_space_allocated;
-
-  /* alloc_sarray and alloc_barray set this value for use by virtual
-   * array routines.
-   */
-  JDIMENSION last_rowsperchunk;	/* from most recent alloc_sarray/barray */
-} my_memory_mgr;
-
-typedef my_memory_mgr * my_mem_ptr;
-
-
-/*
- * The control blocks for virtual arrays.
- * Note that these blocks are allocated in the "small" pool area.
- * System-dependent info for the associated backing store (if any) is hidden
- * inside the backing_store_info struct.
- */
-
-struct jvirt_sarray_control {
-  JSAMPARRAY mem_buffer;	/* => the in-memory buffer */
-  JDIMENSION rows_in_array;	/* total virtual array height */
-  JDIMENSION samplesperrow;	/* width of array (and of memory buffer) */
-  JDIMENSION maxaccess;		/* max rows accessed by access_virt_sarray */
-  JDIMENSION rows_in_mem;	/* height of memory buffer */
-  JDIMENSION rowsperchunk;	/* allocation chunk size in mem_buffer */
-  JDIMENSION cur_start_row;	/* first logical row # in the buffer */
-  JDIMENSION first_undef_row;	/* row # of first uninitialized row */
-  boolean pre_zero;		/* pre-zero mode requested? */
-  boolean dirty;		/* do current buffer contents need written? */
-  boolean b_s_open;		/* is backing-store data valid? */
-  jvirt_sarray_ptr next;	/* link to next virtual sarray control block */
-  backing_store_info b_s_info;	/* System-dependent control info */
-};
-
-struct jvirt_barray_control {
-  JBLOCKARRAY mem_buffer;	/* => the in-memory buffer */
-  JDIMENSION rows_in_array;	/* total virtual array height */
-  JDIMENSION blocksperrow;	/* width of array (and of memory buffer) */
-  JDIMENSION maxaccess;		/* max rows accessed by access_virt_barray */
-  JDIMENSION rows_in_mem;	/* height of memory buffer */
-  JDIMENSION rowsperchunk;	/* allocation chunk size in mem_buffer */
-  JDIMENSION cur_start_row;	/* first logical row # in the buffer */
-  JDIMENSION first_undef_row;	/* row # of first uninitialized row */
-  boolean pre_zero;		/* pre-zero mode requested? */
-  boolean dirty;		/* do current buffer contents need written? */
-  boolean b_s_open;		/* is backing-store data valid? */
-  jvirt_barray_ptr next;	/* link to next virtual barray control block */
-  backing_store_info b_s_info;	/* System-dependent control info */
-};
-
-
-#ifdef MEM_STATS		/* optional extra stuff for statistics */
-
-LOCAL(void)
-print_mem_stats (j_common_ptr cinfo, int pool_id)
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  small_pool_ptr shdr_ptr;
-  large_pool_ptr lhdr_ptr;
-
-  /* Since this is only a debugging stub, we can cheat a little by using
-   * fprintf directly rather than going through the trace message code.
-   * This is helpful because message parm array can't handle longs.
-   */
-  fprintf(stderr, "Freeing pool %d, total space = %ld\n",
-	  pool_id, mem->total_space_allocated);
-
-  for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
-       lhdr_ptr = lhdr_ptr->hdr.next) {
-    fprintf(stderr, "  Large chunk used %ld\n",
-	    (long) lhdr_ptr->hdr.bytes_used);
-  }
-
-  for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;
-       shdr_ptr = shdr_ptr->hdr.next) {
-    fprintf(stderr, "  Small chunk used %ld free %ld\n",
-	    (long) shdr_ptr->hdr.bytes_used,
-	    (long) shdr_ptr->hdr.bytes_left);
-  }
-}
-
-#endif /* MEM_STATS */
-
-
-LOCAL(void)
-out_of_memory (j_common_ptr cinfo, int which)
-/* Report an out-of-memory error and stop execution */
-/* If we compiled MEM_STATS support, report alloc requests before dying */
-{
-#ifdef MEM_STATS
-  cinfo->err->trace_level = 2;	/* force self_destruct to report stats */
-#endif
-  ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which);
-}
-
-
-/*
- * Allocation of "small" objects.
- *
- * For these, we use pooled storage.  When a new pool must be created,
- * we try to get enough space for the current request plus a "slop" factor,
- * where the slop will be the amount of leftover space in the new pool.
- * The speed vs. space tradeoff is largely determined by the slop values.
- * A different slop value is provided for each pool class (lifetime),
- * and we also distinguish the first pool of a class from later ones.
- * NOTE: the values given work fairly well on both 16- and 32-bit-int
- * machines, but may be too small if longs are 64 bits or more.
- */
-
-static const size_t first_pool_slop[JPOOL_NUMPOOLS] = 
-{
-	1600,			/* first PERMANENT pool */
-	16000			/* first IMAGE pool */
-};
-
-static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = 
-{
-	0,			/* additional PERMANENT pools */
-	5000			/* additional IMAGE pools */
-};
-
-#define MIN_SLOP  50		/* greater than 0 to avoid futile looping */
-
-
-METHODDEF(void *)
-alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
-/* Allocate a "small" object */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  small_pool_ptr hdr_ptr, prev_hdr_ptr;
-  char * data_ptr;
-  size_t odd_bytes, min_request, slop;
-
-  /* Check for unsatisfiable request (do now to ensure no overflow below) */
-  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr)))
-    out_of_memory(cinfo, 1);	/* request exceeds malloc's ability */
-
-  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */
-  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);
-  if (odd_bytes > 0)
-    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;
-
-  /* See if space is available in any existing pool */
-  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
-    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
-  prev_hdr_ptr = NULL;
-  hdr_ptr = mem->small_list[pool_id];
-  while (hdr_ptr != NULL) {
-    if (hdr_ptr->hdr.bytes_left >= sizeofobject)
-      break;			/* found pool with enough space */
-    prev_hdr_ptr = hdr_ptr;
-    hdr_ptr = hdr_ptr->hdr.next;
-  }
-
-  /* Time to make a new pool? */
-  if (hdr_ptr == NULL) {
-    /* min_request is what we need now, slop is what will be leftover */
-    min_request = sizeofobject + SIZEOF(small_pool_hdr);
-    if (prev_hdr_ptr == NULL)	/* first pool in class? */
-      slop = first_pool_slop[pool_id];
-    else
-      slop = extra_pool_slop[pool_id];
-    /* Don't ask for more than MAX_ALLOC_CHUNK */
-    if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request))
-      slop = (size_t) (MAX_ALLOC_CHUNK-min_request);
-    /* Try to get space, if fail reduce slop and try again */
-    for (;;) {
-      hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop);
-      if (hdr_ptr != NULL)
-	break;
-      slop /= 2;
-      if (slop < MIN_SLOP)	/* give up when it gets real small */
-	out_of_memory(cinfo, 2); /* jpeg_get_small failed */
-    }
-    mem->total_space_allocated += min_request + slop;
-    /* Success, initialize the new pool header and add to end of list */
-    hdr_ptr->hdr.next = NULL;
-    hdr_ptr->hdr.bytes_used = 0;
-    hdr_ptr->hdr.bytes_left = sizeofobject + slop;
-    if (prev_hdr_ptr == NULL)	/* first pool in class? */
-      mem->small_list[pool_id] = hdr_ptr;
-    else
-      prev_hdr_ptr->hdr.next = hdr_ptr;
-  }
-
-  /* OK, allocate the object from the current pool */
-  data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */
-  data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */
-  hdr_ptr->hdr.bytes_used += sizeofobject;
-  hdr_ptr->hdr.bytes_left -= sizeofobject;
-
-  return (void *) data_ptr;
-}
-
-
-/*
- * Allocation of "large" objects.
- *
- * The external semantics of these are the same as "small" objects,
- * except that FAR pointers are used on 80x86.  However the pool
- * management heuristics are quite different.  We assume that each
- * request is large enough that it may as well be passed directly to
- * jpeg_get_large; the pool management just links everything together
- * so that we can free it all on demand.
- * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY
- * structures.  The routines that create these structures (see below)
- * deliberately bunch rows together to ensure a large request size.
- */
-
-METHODDEF(void FAR *)
-alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
-/* Allocate a "large" object */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  large_pool_ptr hdr_ptr;
-  size_t odd_bytes;
-
-  /* Check for unsatisfiable request (do now to ensure no overflow below) */
-  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)))
-    out_of_memory(cinfo, 3);	/* request exceeds malloc's ability */
-
-  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */
-  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);
-  if (odd_bytes > 0)
-    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;
-
-  /* Always make a new pool */
-  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
-    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
-
-  hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject +
-					    SIZEOF(large_pool_hdr));
-  if (hdr_ptr == NULL)
-    out_of_memory(cinfo, 4);	/* jpeg_get_large failed */
-  mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr);
-
-  /* Success, initialize the new pool header and add to list */
-  hdr_ptr->hdr.next = mem->large_list[pool_id];
-  /* We maintain space counts in each pool header for statistical purposes,
-   * even though they are not needed for allocation.
-   */
-  hdr_ptr->hdr.bytes_used = sizeofobject;
-  hdr_ptr->hdr.bytes_left = 0;
-  mem->large_list[pool_id] = hdr_ptr;
-
-  return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */
-}
-
-
-/*
- * Creation of 2-D sample arrays.
- * The pointers are in near heap, the samples themselves in FAR heap.
- *
- * To minimize allocation overhead and to allow I/O of large contiguous
- * blocks, we allocate the sample rows in groups of as many rows as possible
- * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request.
- * NB: the virtual array control routines, later in this file, know about
- * this chunking of rows.  The rowsperchunk value is left in the mem manager
- * object so that it can be saved away if this sarray is the workspace for
- * a virtual array.
- */
-
-METHODDEF(JSAMPARRAY)
-alloc_sarray (j_common_ptr cinfo, int pool_id,
-	      JDIMENSION samplesperrow, JDIMENSION numrows)
-/* Allocate a 2-D sample array */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  JSAMPARRAY result;
-  JSAMPROW workspace;
-  JDIMENSION rowsperchunk, currow, i;
-  long ltemp;
-
-  /* Calculate max # of rows allowed in one allocation chunk */
-  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
-	  ((long) samplesperrow * SIZEOF(JSAMPLE));
-  if (ltemp <= 0)
-    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
-  if (ltemp < (long) numrows)
-    rowsperchunk = (JDIMENSION) ltemp;
-  else
-    rowsperchunk = numrows;
-  mem->last_rowsperchunk = rowsperchunk;
-
-  /* Get space for row pointers (small object) */
-  result = (JSAMPARRAY) alloc_small(cinfo, pool_id,
-				    (size_t) (numrows * SIZEOF(JSAMPROW)));
-
-  /* Get the rows themselves (large objects) */
-  currow = 0;
-  while (currow < numrows) {
-    rowsperchunk = MIN(rowsperchunk, numrows - currow);
-    workspace = (JSAMPROW) alloc_large(cinfo, pool_id,
-	(size_t) ((size_t) rowsperchunk * (size_t) samplesperrow
-		  * SIZEOF(JSAMPLE)));
-    for (i = rowsperchunk; i > 0; i--) {
-      result[currow++] = workspace;
-      workspace += samplesperrow;
-    }
-  }
-
-  return result;
-}
-
-
-/*
- * Creation of 2-D coefficient-block arrays.
- * This is essentially the same as the code for sample arrays, above.
- */
-
-METHODDEF(JBLOCKARRAY)
-alloc_barray (j_common_ptr cinfo, int pool_id,
-	      JDIMENSION blocksperrow, JDIMENSION numrows)
-/* Allocate a 2-D coefficient-block array */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  JBLOCKARRAY result;
-  JBLOCKROW workspace;
-  JDIMENSION rowsperchunk, currow, i;
-  long ltemp;
-
-  /* Calculate max # of rows allowed in one allocation chunk */
-  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
-	  ((long) blocksperrow * SIZEOF(JBLOCK));
-  if (ltemp <= 0)
-    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
-  if (ltemp < (long) numrows)
-    rowsperchunk = (JDIMENSION) ltemp;
-  else
-    rowsperchunk = numrows;
-  mem->last_rowsperchunk = rowsperchunk;
-
-  /* Get space for row pointers (small object) */
-  result = (JBLOCKARRAY) alloc_small(cinfo, pool_id,
-				     (size_t) (numrows * SIZEOF(JBLOCKROW)));
-
-  /* Get the rows themselves (large objects) */
-  currow = 0;
-  while (currow < numrows) {
-    rowsperchunk = MIN(rowsperchunk, numrows - currow);
-    workspace = (JBLOCKROW) alloc_large(cinfo, pool_id,
-	(size_t) ((size_t) rowsperchunk * (size_t) blocksperrow
-		  * SIZEOF(JBLOCK)));
-    for (i = rowsperchunk; i > 0; i--) {
-      result[currow++] = workspace;
-      workspace += blocksperrow;
-    }
-  }
-
-  return result;
-}
-
-
-/*
- * About virtual array management:
- *
- * The above "normal" array routines are only used to allocate strip buffers
- * (as wide as the image, but just a few rows high).  Full-image-sized buffers
- * are handled as "virtual" arrays.  The array is still accessed a strip at a
- * time, but the memory manager must save the whole array for repeated
- * accesses.  The intended implementation is that there is a strip buffer in
- * memory (as high as is possible given the desired memory limit), plus a
- * backing file that holds the rest of the array.
- *
- * The request_virt_array routines are told the total size of the image and
- * the maximum number of rows that will be accessed at once.  The in-memory
- * buffer must be at least as large as the maxaccess value.
- *
- * The request routines create control blocks but not the in-memory buffers.
- * That is postponed until realize_virt_arrays is called.  At that time the
- * total amount of space needed is known (approximately, anyway), so free
- * memory can be divided up fairly.
- *
- * The access_virt_array routines are responsible for making a specific strip
- * area accessible (after reading or writing the backing file, if necessary).
- * Note that the access routines are told whether the caller intends to modify
- * the accessed strip; during a read-only pass this saves having to rewrite
- * data to disk.  The access routines are also responsible for pre-zeroing
- * any newly accessed rows, if pre-zeroing was requested.
- *
- * In current usage, the access requests are usually for nonoverlapping
- * strips; that is, successive access start_row numbers differ by exactly
- * num_rows = maxaccess.  This means we can get good performance with simple
- * buffer dump/reload logic, by making the in-memory buffer be a multiple
- * of the access height; then there will never be accesses across bufferload
- * boundaries.  The code will still work with overlapping access requests,
- * but it doesn't handle bufferload overlaps very efficiently.
- */
-
-
-METHODDEF(jvirt_sarray_ptr)
-request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
-		     JDIMENSION samplesperrow, JDIMENSION numrows,
-		     JDIMENSION maxaccess)
-/* Request a virtual 2-D sample array */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  jvirt_sarray_ptr result;
-
-  /* Only IMAGE-lifetime virtual arrays are currently supported */
-  if (pool_id != JPOOL_IMAGE)
-    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
-
-  /* get control block */
-  result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id,
-					  SIZEOF(struct jvirt_sarray_control));
-
-  result->mem_buffer = NULL;	/* marks array not yet realized */
-  result->rows_in_array = numrows;
-  result->samplesperrow = samplesperrow;
-  result->maxaccess = maxaccess;
-  result->pre_zero = pre_zero;
-  result->b_s_open = FALSE;	/* no associated backing-store object */
-  result->next = mem->virt_sarray_list; /* add to list of virtual arrays */
-  mem->virt_sarray_list = result;
-
-  return result;
-}
-
-
-METHODDEF(jvirt_barray_ptr)
-request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
-		     JDIMENSION blocksperrow, JDIMENSION numrows,
-		     JDIMENSION maxaccess)
-/* Request a virtual 2-D coefficient-block array */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  jvirt_barray_ptr result;
-
-  /* Only IMAGE-lifetime virtual arrays are currently supported */
-  if (pool_id != JPOOL_IMAGE)
-    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
-
-  /* get control block */
-  result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id,
-					  SIZEOF(struct jvirt_barray_control));
-
-  result->mem_buffer = NULL;	/* marks array not yet realized */
-  result->rows_in_array = numrows;
-  result->blocksperrow = blocksperrow;
-  result->maxaccess = maxaccess;
-  result->pre_zero = pre_zero;
-  result->b_s_open = FALSE;	/* no associated backing-store object */
-  result->next = mem->virt_barray_list; /* add to list of virtual arrays */
-  mem->virt_barray_list = result;
-
-  return result;
-}
-
-
-METHODDEF(void)
-realize_virt_arrays (j_common_ptr cinfo)
-/* Allocate the in-memory buffers for any unrealized virtual arrays */
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  long space_per_minheight, maximum_space, avail_mem;
-  long minheights, max_minheights;
-  jvirt_sarray_ptr sptr;
-  jvirt_barray_ptr bptr;
-
-  /* Compute the minimum space needed (maxaccess rows in each buffer)
-   * and the maximum space needed (full image height in each buffer).
-   * These may be of use to the system-dependent jpeg_mem_available routine.
-   */
-  space_per_minheight = 0;
-  maximum_space = 0;
-  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
-    if (sptr->mem_buffer == NULL) { /* if not realized yet */
-      space_per_minheight += (long) sptr->maxaccess *
-			     (long) sptr->samplesperrow * SIZEOF(JSAMPLE);
-      maximum_space += (long) sptr->rows_in_array *
-		       (long) sptr->samplesperrow * SIZEOF(JSAMPLE);
-    }
-  }
-  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
-    if (bptr->mem_buffer == NULL) { /* if not realized yet */
-      space_per_minheight += (long) bptr->maxaccess *
-			     (long) bptr->blocksperrow * SIZEOF(JBLOCK);
-      maximum_space += (long) bptr->rows_in_array *
-		       (long) bptr->blocksperrow * SIZEOF(JBLOCK);
-    }
-  }
-
-  if (space_per_minheight <= 0)
-    return;			/* no unrealized arrays, no work */
-
-  /* Determine amount of memory to actually use; this is system-dependent. */
-  avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space,
-				 mem->total_space_allocated);
-
-  /* If the maximum space needed is available, make all the buffers full
-   * height; otherwise parcel it out with the same number of minheights
-   * in each buffer.
-   */
-  if (avail_mem >= maximum_space)
-    max_minheights = 1000000000L;
-  else {
-    max_minheights = avail_mem / space_per_minheight;
-    /* If there doesn't seem to be enough space, try to get the minimum
-     * anyway.  This allows a "stub" implementation of jpeg_mem_available().
-     */
-    if (max_minheights <= 0)
-      max_minheights = 1;
-  }
-
-  /* Allocate the in-memory buffers and initialize backing store as needed. */
-
-  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
-    if (sptr->mem_buffer == NULL) { /* if not realized yet */
-      minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L;
-      if (minheights <= max_minheights) {
-	/* This buffer fits in memory */
-	sptr->rows_in_mem = sptr->rows_in_array;
-      } else {
-	/* It doesn't fit in memory, create backing store. */
-	sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess);
-	jpeg_open_backing_store(cinfo, & sptr->b_s_info,
-				(long) sptr->rows_in_array *
-				(long) sptr->samplesperrow *
-				(long) SIZEOF(JSAMPLE));
-	sptr->b_s_open = TRUE;
-      }
-      sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE,
-				      sptr->samplesperrow, sptr->rows_in_mem);
-      sptr->rowsperchunk = mem->last_rowsperchunk;
-      sptr->cur_start_row = 0;
-      sptr->first_undef_row = 0;
-      sptr->dirty = FALSE;
-    }
-  }
-
-  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
-    if (bptr->mem_buffer == NULL) { /* if not realized yet */
-      minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L;
-      if (minheights <= max_minheights) {
-	/* This buffer fits in memory */
-	bptr->rows_in_mem = bptr->rows_in_array;
-      } else {
-	/* It doesn't fit in memory, create backing store. */
-	bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess);
-	jpeg_open_backing_store(cinfo, & bptr->b_s_info,
-				(long) bptr->rows_in_array *
-				(long) bptr->blocksperrow *
-				(long) SIZEOF(JBLOCK));
-	bptr->b_s_open = TRUE;
-      }
-      bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE,
-				      bptr->blocksperrow, bptr->rows_in_mem);
-      bptr->rowsperchunk = mem->last_rowsperchunk;
-      bptr->cur_start_row = 0;
-      bptr->first_undef_row = 0;
-      bptr->dirty = FALSE;
-    }
-  }
-}
-
-
-LOCAL(void)
-do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
-/* Do backing store read or write of a virtual sample array */
-{
-  long bytesperrow, file_offset, byte_count, rows, thisrow, i;
-
-  bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE);
-  file_offset = ptr->cur_start_row * bytesperrow;
-  /* Loop to read or write each allocation chunk in mem_buffer */
-  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
-    /* One chunk, but check for short chunk at end of buffer */
-    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
-    /* Transfer no more than is currently defined */
-    thisrow = (long) ptr->cur_start_row + i;
-    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
-    /* Transfer no more than fits in file */
-    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
-    if (rows <= 0)		/* this chunk might be past end of file! */
-      break;
-    byte_count = rows * bytesperrow;
-    if (writing)
-      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
-					    (void FAR *) ptr->mem_buffer[i],
-					    file_offset, byte_count);
-    else
-      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
-					   (void FAR *) ptr->mem_buffer[i],
-					   file_offset, byte_count);
-    file_offset += byte_count;
-  }
-}
-
-
-LOCAL(void)
-do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
-/* Do backing store read or write of a virtual coefficient-block array */
-{
-  long bytesperrow, file_offset, byte_count, rows, thisrow, i;
-
-  bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK);
-  file_offset = ptr->cur_start_row * bytesperrow;
-  /* Loop to read or write each allocation chunk in mem_buffer */
-  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
-    /* One chunk, but check for short chunk at end of buffer */
-    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
-    /* Transfer no more than is currently defined */
-    thisrow = (long) ptr->cur_start_row + i;
-    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
-    /* Transfer no more than fits in file */
-    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
-    if (rows <= 0)		/* this chunk might be past end of file! */
-      break;
-    byte_count = rows * bytesperrow;
-    if (writing)
-      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
-					    (void FAR *) ptr->mem_buffer[i],
-					    file_offset, byte_count);
-    else
-      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
-					   (void FAR *) ptr->mem_buffer[i],
-					   file_offset, byte_count);
-    file_offset += byte_count;
-  }
-}
-
-
-METHODDEF(JSAMPARRAY)
-access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
-		    JDIMENSION start_row, JDIMENSION num_rows,
-		    boolean writable)
-/* Access the part of a virtual sample array starting at start_row */
-/* and extending for num_rows rows.  writable is true if  */
-/* caller intends to modify the accessed area. */
-{
-  JDIMENSION end_row = start_row + num_rows;
-  JDIMENSION undef_row;
-
-  /* debugging check */
-  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
-      ptr->mem_buffer == NULL)
-    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-
-  /* Make the desired part of the virtual array accessible */
-  if (start_row < ptr->cur_start_row ||
-      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
-    if (! ptr->b_s_open)
-      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
-    /* Flush old buffer contents if necessary */
-    if (ptr->dirty) {
-      do_sarray_io(cinfo, ptr, TRUE);
-      ptr->dirty = FALSE;
-    }
-    /* Decide what part of virtual array to access.
-     * Algorithm: if target address > current window, assume forward scan,
-     * load starting at target address.  If target address < current window,
-     * assume backward scan, load so that target area is top of window.
-     * Note that when switching from forward write to forward read, will have
-     * start_row = 0, so the limiting case applies and we load from 0 anyway.
-     */
-    if (start_row > ptr->cur_start_row) {
-      ptr->cur_start_row = start_row;
-    } else {
-      /* use long arithmetic here to avoid overflow & unsigned problems */
-      long ltemp;
-
-      ltemp = (long) end_row - (long) ptr->rows_in_mem;
-      if (ltemp < 0)
-	ltemp = 0;		/* don't fall off front end of file */
-      ptr->cur_start_row = (JDIMENSION) ltemp;
-    }
-    /* Read in the selected part of the array.
-     * During the initial write pass, we will do no actual read
-     * because the selected part is all undefined.
-     */
-    do_sarray_io(cinfo, ptr, FALSE);
-  }
-  /* Ensure the accessed part of the array is defined; prezero if needed.
-   * To improve locality of access, we only prezero the part of the array
-   * that the caller is about to access, not the entire in-memory array.
-   */
-  if (ptr->first_undef_row < end_row) {
-    if (ptr->first_undef_row < start_row) {
-      if (writable)		/* writer skipped over a section of array */
-	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-      undef_row = start_row;	/* but reader is allowed to read ahead */
-    } else {
-      undef_row = ptr->first_undef_row;
-    }
-    if (writable)
-      ptr->first_undef_row = end_row;
-    if (ptr->pre_zero) {
-      size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE);
-      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */
-      end_row -= ptr->cur_start_row;
-      while (undef_row < end_row) {
-	jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);
-	undef_row++;
-      }
-    } else {
-      if (! writable)		/* reader looking at undefined data */
-	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-    }
-  }
-  /* Flag the buffer dirty if caller will write in it */
-  if (writable)
-    ptr->dirty = TRUE;
-  /* Return address of proper part of the buffer */
-  return ptr->mem_buffer + (start_row - ptr->cur_start_row);
-}
-
-
-METHODDEF(JBLOCKARRAY)
-access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
-		    JDIMENSION start_row, JDIMENSION num_rows,
-		    boolean writable)
-/* Access the part of a virtual block array starting at start_row */
-/* and extending for num_rows rows.  writable is true if  */
-/* caller intends to modify the accessed area. */
-{
-  JDIMENSION end_row = start_row + num_rows;
-  JDIMENSION undef_row;
-
-  /* debugging check */
-  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
-      ptr->mem_buffer == NULL)
-    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-
-  /* Make the desired part of the virtual array accessible */
-  if (start_row < ptr->cur_start_row ||
-      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
-    if (! ptr->b_s_open)
-      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
-    /* Flush old buffer contents if necessary */
-    if (ptr->dirty) {
-      do_barray_io(cinfo, ptr, TRUE);
-      ptr->dirty = FALSE;
-    }
-    /* Decide what part of virtual array to access.
-     * Algorithm: if target address > current window, assume forward scan,
-     * load starting at target address.  If target address < current window,
-     * assume backward scan, load so that target area is top of window.
-     * Note that when switching from forward write to forward read, will have
-     * start_row = 0, so the limiting case applies and we load from 0 anyway.
-     */
-    if (start_row > ptr->cur_start_row) {
-      ptr->cur_start_row = start_row;
-    } else {
-      /* use long arithmetic here to avoid overflow & unsigned problems */
-      long ltemp;
-
-      ltemp = (long) end_row - (long) ptr->rows_in_mem;
-      if (ltemp < 0)
-	ltemp = 0;		/* don't fall off front end of file */
-      ptr->cur_start_row = (JDIMENSION) ltemp;
-    }
-    /* Read in the selected part of the array.
-     * During the initial write pass, we will do no actual read
-     * because the selected part is all undefined.
-     */
-    do_barray_io(cinfo, ptr, FALSE);
-  }
-  /* Ensure the accessed part of the array is defined; prezero if needed.
-   * To improve locality of access, we only prezero the part of the array
-   * that the caller is about to access, not the entire in-memory array.
-   */
-  if (ptr->first_undef_row < end_row) {
-    if (ptr->first_undef_row < start_row) {
-      if (writable)		/* writer skipped over a section of array */
-	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-      undef_row = start_row;	/* but reader is allowed to read ahead */
-    } else {
-      undef_row = ptr->first_undef_row;
-    }
-    if (writable)
-      ptr->first_undef_row = end_row;
-    if (ptr->pre_zero) {
-      size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK);
-      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */
-      end_row -= ptr->cur_start_row;
-      while (undef_row < end_row) {
-	jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);
-	undef_row++;
-      }
-    } else {
-      if (! writable)		/* reader looking at undefined data */
-	ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
-    }
-  }
-  /* Flag the buffer dirty if caller will write in it */
-  if (writable)
-    ptr->dirty = TRUE;
-  /* Return address of proper part of the buffer */
-  return ptr->mem_buffer + (start_row - ptr->cur_start_row);
-}
-
-
-/*
- * Release all objects belonging to a specified pool.
- */
-
-METHODDEF(void)
-free_pool (j_common_ptr cinfo, int pool_id)
-{
-  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
-  small_pool_ptr shdr_ptr;
-  large_pool_ptr lhdr_ptr;
-  size_t space_freed;
-
-  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
-    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);	/* safety check */
-
-#ifdef MEM_STATS
-  if (cinfo->err->trace_level > 1)
-    print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */
-#endif
-
-  /* If freeing IMAGE pool, close any virtual arrays first */
-  if (pool_id == JPOOL_IMAGE) {
-    jvirt_sarray_ptr sptr;
-    jvirt_barray_ptr bptr;
-
-    for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
-      if (sptr->b_s_open) {	/* there may be no backing store */
-	sptr->b_s_open = FALSE;	/* prevent recursive close if error */
-	(*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info);
-      }
-    }
-    mem->virt_sarray_list = NULL;
-    for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
-      if (bptr->b_s_open) {	/* there may be no backing store */
-	bptr->b_s_open = FALSE;	/* prevent recursive close if error */
-	(*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info);
-      }
-    }
-    mem->virt_barray_list = NULL;
-  }
-
-  /* Release large objects */
-  lhdr_ptr = mem->large_list[pool_id];
-  mem->large_list[pool_id] = NULL;
-
-  while (lhdr_ptr != NULL) {
-    large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next;
-    space_freed = lhdr_ptr->hdr.bytes_used +
-		  lhdr_ptr->hdr.bytes_left +
-		  SIZEOF(large_pool_hdr);
-    jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed);
-    mem->total_space_allocated -= space_freed;
-    lhdr_ptr = next_lhdr_ptr;
-  }
-
-  /* Release small objects */
-  shdr_ptr = mem->small_list[pool_id];
-  mem->small_list[pool_id] = NULL;
-
-  while (shdr_ptr != NULL) {
-    small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next;
-    space_freed = shdr_ptr->hdr.bytes_used +
-		  shdr_ptr->hdr.bytes_left +
-		  SIZEOF(small_pool_hdr);
-    jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed);
-    mem->total_space_allocated -= space_freed;
-    shdr_ptr = next_shdr_ptr;
-  }
-}
-
-
-/*
- * Close up shop entirely.
- * Note that this cannot be called unless cinfo->mem is non-NULL.
- */
-
-METHODDEF(void)
-self_destruct (j_common_ptr cinfo)
-{
-  int pool;
-
-  /* Close all backing store, release all memory.
-   * Releasing pools in reverse order might help avoid fragmentation
-   * with some (brain-damaged) malloc libraries.
-   */
-  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
-    free_pool(cinfo, pool);
-  }
-
-  /* Release the memory manager control block too. */
-  jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));
-  cinfo->mem = NULL;		/* ensures I will be called only once */
-
-  jpeg_mem_term(cinfo);		/* system-dependent cleanup */
-}
-
-
-/*
- * Memory manager initialization.
- * When this is called, only the error manager pointer is valid in cinfo!
- */
-
-GLOBAL(void)
-jinit_memory_mgr (j_common_ptr cinfo)
-{
-  my_mem_ptr mem;
-  long max_to_use;
-  int pool;
-  size_t test_mac;
-
-  cinfo->mem = NULL;		/* for safety if init fails */
-
-  /* Check for configuration errors.
-   * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably
-   * doesn't reflect any real hardware alignment requirement.
-   * The test is a little tricky: for X>0, X and X-1 have no one-bits
-   * in common if and only if X is a power of 2, ie has only one one-bit.
-   * Some compilers may give an "unreachable code" warning here; ignore it.
-   */
-  if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0)
-    ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE);
-  /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be
-   * a multiple of SIZEOF(ALIGN_TYPE).
-   * Again, an "unreachable code" warning may be ignored here.
-   * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK.
-   */
-  test_mac = (size_t) MAX_ALLOC_CHUNK;
-  if ((long) test_mac != MAX_ALLOC_CHUNK ||
-      (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0)
-    ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
-
-  max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */
-
-  /* Attempt to allocate memory manager's control block */
-  mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));
-
-  if (mem == NULL) {
-    jpeg_mem_term(cinfo);	/* system-dependent cleanup */
-    ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0);
-  }
-
-  /* OK, fill in the method pointers */
-  mem->pub.alloc_small = alloc_small;
-  mem->pub.alloc_large = alloc_large;
-  mem->pub.alloc_sarray = alloc_sarray;
-  mem->pub.alloc_barray = alloc_barray;
-  mem->pub.request_virt_sarray = request_virt_sarray;
-  mem->pub.request_virt_barray = request_virt_barray;
-  mem->pub.realize_virt_arrays = realize_virt_arrays;
-  mem->pub.access_virt_sarray = access_virt_sarray;
-  mem->pub.access_virt_barray = access_virt_barray;
-  mem->pub.free_pool = free_pool;
-  mem->pub.self_destruct = self_destruct;
-
-  /* Make MAX_ALLOC_CHUNK accessible to other modules */
-  mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;
-
-  /* Initialize working state */
-  mem->pub.max_memory_to_use = max_to_use;
-
-  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
-    mem->small_list[pool] = NULL;
-    mem->large_list[pool] = NULL;
-  }
-  mem->virt_sarray_list = NULL;
-  mem->virt_barray_list = NULL;
-
-  mem->total_space_allocated = SIZEOF(my_memory_mgr);
-
-  /* Declare ourselves open for business */
-  cinfo->mem = & mem->pub;
-
-  /* Check for an environment variable JPEGMEM; if found, override the
-   * default max_memory setting from jpeg_mem_init.  Note that the
-   * surrounding application may again override this value.
-   * If your system doesn't support getenv(), define NO_GETENV to disable
-   * this feature.
-   */
-#ifndef NO_GETENV
-  { char * memenv;
-
-    if ((memenv = getenv("JPEGMEM")) != NULL) {
-      char ch = 'x';
-
-      if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) {
-	if (ch == 'm' || ch == 'M')
-	  max_to_use *= 1000L;
-	mem->pub.max_memory_to_use = max_to_use * 1000L;
-      }
-    }
-  }
-#endif
-
-}
diff --git a/tkimg1.3/libjpeg/jmemname.c b/tkimg1.3/libjpeg/jmemname.c
deleted file mode 100644
index ed96dee..0000000
--- a/tkimg1.3/libjpeg/jmemname.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * jmemname.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides a generic implementation of the system-dependent
- * portion of the JPEG memory manager.  This implementation assumes that
- * you must explicitly construct a name for each temp file.
- * Also, the problem of determining the amount of memory available
- * is shoved onto the user.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"		/* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-#endif
-
-#ifndef SEEK_SET		/* pre-ANSI systems may not define this; */
-#define SEEK_SET  0		/* if not, assume 0 is correct */
-#endif
-
-#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
-#define READ_BINARY	"r"
-#define RW_BINARY	"w+"
-#else
-#ifdef VMS			/* VMS is very nonstandard */
-#define READ_BINARY	"rb", "ctx=stm"
-#define RW_BINARY	"w+b", "ctx=stm"
-#else				/* standard ANSI-compliant case */
-#define READ_BINARY	"rb"
-#define RW_BINARY	"w+b"
-#endif
-#endif
-
-
-/*
- * Selection of a file name for a temporary file.
- * This is system-dependent!
- *
- * The code as given is suitable for most Unix systems, and it is easily
- * modified for most non-Unix systems.  Some notes:
- *  1.  The temp file is created in the directory named by TEMP_DIRECTORY.
- *      The default value is /usr/tmp, which is the conventional place for
- *      creating large temp files on Unix.  On other systems you'll probably
- *      want to change the file location.  You can do this by editing the
- *      #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h.
- *
- *  2.  If you need to change the file name as well as its location,
- *      you can override the TEMP_FILE_NAME macro.  (Note that this is
- *      actually a printf format string; it must contain %s and %d.)
- *      Few people should need to do this.
- *
- *  3.  mktemp() is used to ensure that multiple processes running
- *      simultaneously won't select the same file names.  If your system
- *      doesn't have mktemp(), define NO_MKTEMP to do it the hard way.
- *      (If you don't have <errno.h>, also define NO_ERRNO_H.)
- *
- *  4.  You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c
- *      will cause the temp files to be removed if you stop the program early.
- */
-
-#ifndef TEMP_DIRECTORY		/* can override from jconfig.h or Makefile */
-#define TEMP_DIRECTORY  "/usr/tmp/" /* recommended setting for Unix */
-#endif
-
-static int next_file_num;	/* to distinguish among several temp files */
-
-#ifdef NO_MKTEMP
-
-#ifndef TEMP_FILE_NAME		/* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME  "%sJPG%03d.TMP"
-#endif
-
-#ifndef NO_ERRNO_H
-#include <errno.h>		/* to define ENOENT */
-#endif
-
-/* ANSI C specifies that errno is a macro, but on older systems it's more
- * likely to be a plain int variable.  And not all versions of errno.h
- * bother to declare it, so we have to in order to be most portable.  Thus:
- */
-#ifndef errno
-extern int errno;
-#endif
-
-
-LOCAL(void)
-select_file_name (char * fname)
-{
-  FILE * tfile;
-
-  /* Keep generating file names till we find one that's not in use */
-  for (;;) {
-    next_file_num++;		/* advance counter */
-    sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
-    if ((tfile = fopen(fname, READ_BINARY)) == NULL) {
-      /* fopen could have failed for a reason other than the file not
-       * being there; for example, file there but unreadable.
-       * If <errno.h> isn't available, then we cannot test the cause.
-       */
-#ifdef ENOENT
-      if (errno != ENOENT)
-	continue;
-#endif
-      break;
-    }
-    fclose(tfile);		/* oops, it's there; close tfile & try again */
-  }
-}
-
-#else /* ! NO_MKTEMP */
-
-/* Note that mktemp() requires the initial filename to end in six X's */
-#ifndef TEMP_FILE_NAME		/* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME  "%sJPG%dXXXXXX"
-#endif
-
-LOCAL(void)
-select_file_name (char * fname)
-{
-  next_file_num++;		/* advance counter */
-  sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
-  mktemp(fname);		/* make sure file name is unique */
-  /* mktemp replaces the trailing XXXXXX with a unique string of characters */
-}
-
-#endif /* NO_MKTEMP */
-
-
-/*
- * Memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: although we include FAR keywords in the routine declarations,
- * this file won't actually work in 80x86 small/medium model; at least,
- * you probably won't be able to process useful-size images in only 64KB.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void FAR *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM		/* so can override from makefile */
-#define DEFAULT_MAX_MEM		1000000L /* default: one megabyte */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-		    long max_bytes_needed, long already_allocated)
-{
-  return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed.  You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		    void FAR * buffer_address,
-		    long file_offset, long byte_count)
-{
-  if (fseek(info->temp_file, file_offset, SEEK_SET))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  if (JFREAD(info->temp_file, buffer_address, byte_count)
-      != (size_t) byte_count)
-    ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-		     void FAR * buffer_address,
-		     long file_offset, long byte_count)
-{
-  if (fseek(info->temp_file, file_offset, SEEK_SET))
-    ERREXIT(cinfo, JERR_TFILE_SEEK);
-  if (JFWRITE(info->temp_file, buffer_address, byte_count)
-      != (size_t) byte_count)
-    ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
-  fclose(info->temp_file);	/* close the file */
-  unlink(info->temp_name);	/* delete the file */
-/* If your system doesn't have unlink(), use remove() instead.
- * remove() is the ANSI-standard name for this function, but if
- * your system was ANSI you'd be using jmemansi.c, right?
- */
-  TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
-}
-
-
-/*
- * Initial opening of a backing-store object.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-			 long total_bytes_needed)
-{
-  select_file_name(info->temp_name);
-  if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL)
-    ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-  info->read_backing_store = read_backing_store;
-  info->write_backing_store = write_backing_store;
-  info->close_backing_store = close_backing_store;
-  TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
-  next_file_num = 0;		/* initialize temp file name generator */
-  return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
-  /* no work */
-}
diff --git a/tkimg1.3/libjpeg/jmemnobs.c b/tkimg1.3/libjpeg/jmemnobs.c
deleted file mode 100644
index eb8c337..0000000
--- a/tkimg1.3/libjpeg/jmemnobs.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * jmemnobs.c
- *
- * Copyright (C) 1992-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides a really simple implementation of the system-
- * dependent portion of the JPEG memory manager.  This implementation
- * assumes that no backing-store files are needed: all required space
- * can be obtained from malloc().
- * This is very portable in the sense that it'll compile on almost anything,
- * but you'd better have lots of main memory (or virtual memory) if you want
- * to process big images.
- * Note that the max_memory_to_use option is ignored by this implementation.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h"		/* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-#endif
-
-
-/*
- * Memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: although we include FAR keywords in the routine declarations,
- * this file won't actually work in 80x86 small/medium model; at least,
- * you probably won't be able to process useful-size images in only 64KB.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
-  return (void FAR *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
-  free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * Here we always say, "we got all you want bud!"
- */
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-		    long max_bytes_needed, long already_allocated)
-{
-  return max_bytes_needed;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Since jpeg_mem_available always promised the moon,
- * this should never be called and we can just error out.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-			 long total_bytes_needed)
-{
-  ERREXIT(cinfo, JERR_NO_BACKING_STORE);
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.  Here, there isn't any.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
-  return 0;			/* just set max_memory_to_use to 0 */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
-  /* no work */
-}
diff --git a/tkimg1.3/libjpeg/jmemsys.h b/tkimg1.3/libjpeg/jmemsys.h
deleted file mode 100644
index 6c3c6d3..0000000
--- a/tkimg1.3/libjpeg/jmemsys.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * jmemsys.h
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This include file defines the interface between the system-independent
- * and system-dependent portions of the JPEG memory manager.  No other
- * modules need include it.  (The system-independent portion is jmemmgr.c;
- * there are several different versions of the system-dependent portion.)
- *
- * This file works as-is for the system-dependent memory managers supplied
- * in the IJG distribution.  You may need to modify it if you write a
- * custom memory manager.  If system-dependent changes are needed in
- * this file, the best method is to #ifdef them based on a configuration
- * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
- * and USE_MAC_MEMMGR.
- */
-
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_get_small		jGetSmall
-#define jpeg_free_small		jFreeSmall
-#define jpeg_get_large		jGetLarge
-#define jpeg_free_large		jFreeLarge
-#define jpeg_mem_available	jMemAvail
-#define jpeg_open_backing_store	jOpenBackStore
-#define jpeg_mem_init		jMemInit
-#define jpeg_mem_term		jMemTerm
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/*
- * These two functions are used to allocate and release small chunks of
- * memory.  (Typically the total amount requested through jpeg_get_small is
- * no more than 20K or so; this will be requested in chunks of a few K each.)
- * Behavior should be the same as for the standard library functions malloc
- * and free; in particular, jpeg_get_small must return NULL on failure.
- * On most systems, these ARE malloc and free.  jpeg_free_small is passed the
- * size of the object being freed, just in case it's needed.
- * On an 80x86 machine using small-data memory model, these manage near heap.
- */
-
-EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
-EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
-				  size_t sizeofobject));
-
-/*
- * These two functions are used to allocate and release large chunks of
- * memory (up to the total free space designated by jpeg_mem_available).
- * The interface is the same as above, except that on an 80x86 machine,
- * far pointers are used.  On most other machines these are identical to
- * the jpeg_get/free_small routines; but we keep them separate anyway,
- * in case a different allocation strategy is desirable for large chunks.
- */
-
-EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
-				       size_t sizeofobject));
-EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
-				  size_t sizeofobject));
-
-/*
- * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
- * be requested in a single call to jpeg_get_large (and jpeg_get_small for that
- * matter, but that case should never come into play).  This macro is needed
- * to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
- * On those machines, we expect that jconfig.h will provide a proper value.
- * On machines with 32-bit flat address spaces, any large constant may be used.
- *
- * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
- * size_t and will be a multiple of sizeof(align_type).
- */
-
-#ifndef MAX_ALLOC_CHUNK		/* may be overridden in jconfig.h */
-#define MAX_ALLOC_CHUNK  1000000000L
-#endif
-
-/*
- * This routine computes the total space still available for allocation by
- * jpeg_get_large.  If more space than this is needed, backing store will be
- * used.  NOTE: any memory already allocated must not be counted.
- *
- * There is a minimum space requirement, corresponding to the minimum
- * feasible buffer sizes; jmemmgr.c will request that much space even if
- * jpeg_mem_available returns zero.  The maximum space needed, enough to hold
- * all working storage in memory, is also passed in case it is useful.
- * Finally, the total space already allocated is passed.  If no better
- * method is available, cinfo->mem->max_memory_to_use - already_allocated
- * is often a suitable calculation.
- *
- * It is OK for jpeg_mem_available to underestimate the space available
- * (that'll just lead to more backing-store access than is really necessary).
- * However, an overestimate will lead to failure.  Hence it's wise to subtract
- * a slop factor from the true available space.  5% should be enough.
- *
- * On machines with lots of virtual memory, any large constant may be returned.
- * Conversely, zero may be returned to always use the minimum amount of memory.
- */
-
-EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
-				     long min_bytes_needed,
-				     long max_bytes_needed,
-				     long already_allocated));
-
-
-/*
- * This structure holds whatever state is needed to access a single
- * backing-store object.  The read/write/close method pointers are called
- * by jmemmgr.c to manipulate the backing-store object; all other fields
- * are private to the system-dependent backing store routines.
- */
-
-#define TEMP_NAME_LENGTH   64	/* max length of a temporary file's name */
-
-
-#ifdef USE_MSDOS_MEMMGR		/* DOS-specific junk */
-
-typedef unsigned short XMSH;	/* type of extended-memory handles */
-typedef unsigned short EMSH;	/* type of expanded-memory handles */
-
-typedef union {
-  short file_handle;		/* DOS file handle if it's a temp file */
-  XMSH xms_handle;		/* handle if it's a chunk of XMS */
-  EMSH ems_handle;		/* handle if it's a chunk of EMS */
-} handle_union;
-
-#endif /* USE_MSDOS_MEMMGR */
-
-#ifdef USE_MAC_MEMMGR		/* Mac-specific junk */
-#include <Files.h>
-#endif /* USE_MAC_MEMMGR */
-
-
-typedef struct backing_store_struct * backing_store_ptr;
-
-typedef struct backing_store_struct {
-  /* Methods for reading/writing/closing this backing-store object */
-  JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
-				     backing_store_ptr info,
-				     void FAR * buffer_address,
-				     long file_offset, long byte_count));
-  JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
-				      backing_store_ptr info,
-				      void FAR * buffer_address,
-				      long file_offset, long byte_count));
-  JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
-				      backing_store_ptr info));
-
-  /* Private fields for system-dependent backing-store management */
-#ifdef USE_MSDOS_MEMMGR
-  /* For the MS-DOS manager (jmemdos.c), we need: */
-  handle_union handle;		/* reference to backing-store storage object */
-  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
-#else
-#ifdef USE_MAC_MEMMGR
-  /* For the Mac manager (jmemmac.c), we need: */
-  short temp_file;		/* file reference number to temp file */
-  FSSpec tempSpec;		/* the FSSpec for the temp file */
-  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
-#else
-  /* For a typical implementation with temp files, we need: */
-  FILE * temp_file;		/* stdio reference to temp file */
-  char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
-#endif
-#endif
-} backing_store_info;
-
-
-/*
- * Initial opening of a backing-store object.  This must fill in the
- * read/write/close pointers in the object.  The read/write routines
- * may take an error exit if the specified maximum file size is exceeded.
- * (If jpeg_mem_available always returns a large value, this routine can
- * just take an error exit.)
- */
-
-EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
-					  backing_store_ptr info,
-					  long total_bytes_needed));
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.  jpeg_mem_init will be called before anything is
- * allocated (and, therefore, nothing in cinfo is of use except the error
- * manager pointer).  It should return a suitable default value for
- * max_memory_to_use; this may subsequently be overridden by the surrounding
- * application.  (Note that max_memory_to_use is only important if
- * jpeg_mem_available chooses to consult it ... no one else will.)
- * jpeg_mem_term may assume that all requested memory has been freed and that
- * all opened backing-store objects have been closed.
- */
-
-EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
diff --git a/tkimg1.3/libjpeg/jmorecfg.h b/tkimg1.3/libjpeg/jmorecfg.h
deleted file mode 100644
index b822e19..0000000
--- a/tkimg1.3/libjpeg/jmorecfg.h
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * jmorecfg.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains additional configuration options that customize the
- * JPEG software for special applications or support machine-dependent
- * optimizations.  Most users will not need to touch this file.
- */
-
-
-/*
- * Define BITS_IN_JSAMPLE as either
- *   8   for 8-bit sample values (the usual setting)
- *   12  for 12-bit sample values
- * Only 8 and 12 are legal data precisions for lossy JPEG according to the
- * JPEG standard, and the IJG code does not support anything else!
- * We do not support run-time selection of data precision, sorry.
- */
-
-#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
-
-
-/*
- * Maximum number of components (color channels) allowed in JPEG image.
- * To meet the letter of the JPEG spec, set this to 255.  However, darn
- * few applications need more than 4 channels (maybe 5 for CMYK + alpha
- * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
- * really short on memory.  (Each allowed component costs a hundred or so
- * bytes of storage, whether actually used in an image or not.)
- */
-
-#define MAX_COMPONENTS  10	/* maximum number of image components */
-
-
-/*
- * Basic data types.
- * You may need to change these if you have a machine with unusual data
- * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
- * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
- * but it had better be at least 16.
- */
-
-/* Representation of a single sample (pixel element value).
- * We frequently allocate large arrays of these, so it's important to keep
- * them small.  But if you have memory to burn and access to char or short
- * arrays is very slow on your hardware, you might want to change these.
- */
-
-#if BITS_IN_JSAMPLE == 8
-/* JSAMPLE should be the smallest type that will hold the values 0..255.
- * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
- */
-
-#ifdef HAVE_UNSIGNED_CHAR
-
-typedef unsigned char JSAMPLE;
-#define GETJSAMPLE(value)  ((int) (value))
-
-#else /* not HAVE_UNSIGNED_CHAR */
-
-typedef char JSAMPLE;
-#ifdef CHAR_IS_UNSIGNED
-#define GETJSAMPLE(value)  ((int) (value))
-#else
-#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
-
-#endif /* HAVE_UNSIGNED_CHAR */
-
-#define MAXJSAMPLE	255
-#define CENTERJSAMPLE	128
-
-#endif /* BITS_IN_JSAMPLE == 8 */
-
-
-#if BITS_IN_JSAMPLE == 12
-/* JSAMPLE should be the smallest type that will hold the values 0..4095.
- * On nearly all machines "short" will do nicely.
- */
-
-typedef short JSAMPLE;
-#define GETJSAMPLE(value)  ((int) (value))
-
-#define MAXJSAMPLE	4095
-#define CENTERJSAMPLE	2048
-
-#endif /* BITS_IN_JSAMPLE == 12 */
-
-
-/* Representation of a DCT frequency coefficient.
- * This should be a signed value of at least 16 bits; "short" is usually OK.
- * Again, we allocate large arrays of these, but you can change to int
- * if you have memory to burn and "short" is really slow.
- */
-
-typedef short JCOEF;
-
-
-/* Compressed datastreams are represented as arrays of JOCTET.
- * These must be EXACTLY 8 bits wide, at least once they are written to
- * external storage.  Note that when using the stdio data source/destination
- * managers, this is also the data type passed to fread/fwrite.
- */
-
-#ifdef HAVE_UNSIGNED_CHAR
-
-typedef unsigned char JOCTET;
-#define GETJOCTET(value)  (value)
-
-#else /* not HAVE_UNSIGNED_CHAR */
-
-typedef char JOCTET;
-#ifdef CHAR_IS_UNSIGNED
-#define GETJOCTET(value)  (value)
-#else
-#define GETJOCTET(value)  ((value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
-
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-/* These typedefs are used for various table entries and so forth.
- * They must be at least as wide as specified; but making them too big
- * won't cost a huge amount of memory, so we don't provide special
- * extraction code like we did for JSAMPLE.  (In other words, these
- * typedefs live at a different point on the speed/space tradeoff curve.)
- */
-
-/* UINT8 must hold at least the values 0..255. */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char UINT8;
-#else /* not HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char UINT8;
-#else /* not CHAR_IS_UNSIGNED */
-typedef short UINT8;
-#endif /* CHAR_IS_UNSIGNED */
-#endif /* HAVE_UNSIGNED_CHAR */
-
-/* UINT16 must hold at least the values 0..65535. */
-
-#ifdef HAVE_UNSIGNED_SHORT
-typedef unsigned short UINT16;
-#else /* not HAVE_UNSIGNED_SHORT */
-typedef unsigned int UINT16;
-#endif /* HAVE_UNSIGNED_SHORT */
-
-/* INT16 must hold at least the values -32768..32767. */
-
-#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
-typedef short INT16;
-#endif
-
-/* INT32 must hold at least signed 32-bit values. */
-
-#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
-#ifdef WIN32
-typedef int INT32;
-#else
-typedef long INT32;
-#endif
-#endif
-
-/* Datatype used for image dimensions.  The JPEG standard only supports
- * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
- * "unsigned int" is sufficient on all machines.  However, if you need to
- * handle larger images and you don't mind deviating from the spec, you
- * can change this datatype.
- */
-
-typedef unsigned int JDIMENSION;
-
-#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
-
-
-/* These macros are used in all function definitions and extern declarations.
- * You could modify them if you need to change function linkage conventions;
- * in particular, you'll need to do that to make the library a Windows DLL.
- * Another application is to make all functions global for use with debuggers
- * or code profilers that require it.
- */
-
-/* a function called through method pointers: */
-#define METHODDEF(type)		static type
-/* a function used only in its module: */
-#define LOCAL(type)		static type
-/* a function referenced thru EXTERNs: */
-#define GLOBAL(type)		type
-/* a reference to a GLOBAL function: */
-
-/* Compile with -DJPEG_DLL for Windows DLL support */
-#if defined(__WIN32__) && defined(JPEG_DLL)
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  undef WIN32_LEAN_AND_MEAN
-#  if defined(_MSC_VER)
-#    define EXTERN(type) extern __declspec(dllexport) type
-#  else
-#    if defined(__BORLANDC__)
-#	define EXTERN(type) extern type _export
-#    endif
-#  endif
-#endif
-
-#if !defined(EXTERN)
-#define EXTERN(type)		extern type
-#endif
-
-
-/* This macro is used to declare a "method", that is, a function pointer.
- * We want to supply prototype parameters if the compiler can cope.
- * Note that the arglist parameter must be parenthesized!
- * Again, you can customize this if you need special linkage keywords.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
-#else
-#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
-#endif
-
-
-/* Here is the pseudo-keyword for declaring pointers that must be "far"
- * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
- * by just saying "FAR *" where such a pointer is needed.  In a few places
- * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
- */
-
-#ifndef FAR
-#ifdef NEED_FAR_POINTERS
-#define FAR  far
-#else
-#define FAR
-#endif
-#endif
-
-
-/*
- * On a few systems, type boolean and/or its values FALSE, TRUE may appear
- * in standard header files.  Or you may have conflicts with application-
- * specific header files that you want to include together with these files.
- * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
- */
-
-/* On windows use the boolean definition from its headers to prevent
- * any conflicts should a user of this header use "windows.h". Without
- * this we will have/get conflicting definitions of 'boolean' ('int'
- * here, 'unsigned' char for windows)
- */
-
-#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
-#define __WIN32__
-#endif
-
-#if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
-typedef unsigned char boolean;
-#else
-#ifndef HAVE_BOOLEAN
-typedef int boolean;
-#endif
-#endif
-
-#ifndef FALSE			/* in case these macros already exist */
-#define FALSE	0		/* values of boolean */
-#endif
-#ifndef TRUE
-#define TRUE	1
-#endif
-
-
-/*
- * The remaining options affect code selection within the JPEG library,
- * but they don't need to be visible to most applications using the library.
- * To minimize application namespace pollution, the symbols won't be
- * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
- */
-
-#ifdef JPEG_INTERNALS
-#define JPEG_INTERNAL_OPTIONS
-#endif
-
-#ifdef JPEG_INTERNAL_OPTIONS
-
-
-/*
- * These defines indicate whether to include various optional functions.
- * Undefining some of these symbols will produce a smaller but less capable
- * library.  Note that you can leave certain source files out of the
- * compilation/linking process if you've #undef'd the corresponding symbols.
- * (You may HAVE to do that if your compiler doesn't like null source files.)
- */
-
-/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
-
-/* Capability options common to encoder and decoder: */
-
-#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
-#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
-#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
-
-/* Encoder capability options: */
-
-#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
-#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
-#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
-#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
-/* Note: if you selected 12-bit data precision, it is dangerous to turn off
- * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
- * precision, so jchuff.c normally uses entropy optimization to compute
- * usable tables for higher precision.  If you don't want to do optimization,
- * you'll have to supply different default Huffman tables.
- * The exact same statements apply for progressive JPEG: the default tables
- * don't work for progressive mode.  (This may get fixed, however.)
- */
-#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
-
-/* Decoder capability options: */
-
-#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
-#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
-#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
-#define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
-#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
-#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
-#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
-#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
-#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
-#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
-
-/* more capability options later, no doubt */
-
-
-/*
- * Ordering of RGB data in scanlines passed to or from the application.
- * If your application wants to deal with data in the order B,G,R, just
- * change these macros.  You can also deal with formats such as R,G,B,X
- * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
- * the offsets will also change the order in which colormap data is organized.
- * RESTRICTIONS:
- * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
- * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
- *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
- * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
- *    is not 3 (they don't understand about dummy color components!).  So you
- *    can't use color quantization if you change that value.
- */
-
-#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
-#define RGB_GREEN	1	/* Offset of Green */
-#define RGB_BLUE	2	/* Offset of Blue */
-#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
-
-
-/* Definitions for speed-related optimizations. */
-
-
-/* If your compiler supports inline functions, define INLINE
- * as the inline keyword; otherwise define it as empty.
- */
-
-#ifndef INLINE
-#ifdef __GNUC__			/* for instance, GNU C knows about inline */
-#define INLINE __inline__
-#endif
-#ifndef INLINE
-#define INLINE			/* default is to define it as empty */
-#endif
-#endif
-
-
-/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
- * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
- * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
- */
-
-#ifndef MULTIPLIER
-#define MULTIPLIER  int		/* type for fastest integer multiply */
-#endif
-
-
-/* FAST_FLOAT should be either float or double, whichever is done faster
- * by your compiler.  (Note that this type is only used in the floating point
- * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
- * Typically, float is faster in ANSI C compilers, while double is faster in
- * pre-ANSI compilers (because they insist on converting to double anyway).
- * The code below therefore chooses float if we have ANSI-style prototypes.
- */
-
-#ifndef FAST_FLOAT
-#ifdef HAVE_PROTOTYPES
-#define FAST_FLOAT  float
-#else
-#define FAST_FLOAT  double
-#endif
-#endif
-
-#endif /* JPEG_INTERNAL_OPTIONS */
diff --git a/tkimg1.3/libjpeg/jmorecfg.h.diff b/tkimg1.3/libjpeg/jmorecfg.h.diff
deleted file mode 100644
index 8deb8fc..0000000
--- a/tkimg1.3/libjpeg/jmorecfg.h.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-*** jmorecfg.h.orig	Fri Jan 15 22:02:11 1999
---- jmorecfg.h	Fri Jan 15 22:02:10 1999
-***************
-*** 187,193 ****
---- 187,210 ----
-  /* a function referenced thru EXTERNs: */
-  #define GLOBAL(type)		type
-  /* a reference to a GLOBAL function: */
-+ 
-+ /* Compile with -DJPEG_DLL for Windows DLL support */
-+ #if defined(__WIN32__) && defined(JPEG_DLL)
-+ #  define WIN32_LEAN_AND_MEAN
-+ #  include <windows.h>
-+ #  undef WIN32_LEAN_AND_MEAN
-+ #  if defined(_MSC_VER)
-+ #    define EXTERN(type) extern __declspec(dllexport) type
-+ #  else
-+ #    if defined(__BORLANDC__)
-+ #	define EXTERN(type) extern type _export
-+ #    endif
-+ #  endif
-+ #endif
-+ 
-+ #if !defined(EXTERN)
-  #define EXTERN(type)		extern type
-+ #endif
-  
-  
-  /* This macro is used to declare a "method", that is, a function pointer.
-***************
-*** 209,218 ****
---- 226,237 ----
-   * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
-   */
-  
-+ #ifndef FAR
-  #ifdef NEED_FAR_POINTERS
-  #define FAR  far
-  #else
-  #define FAR
-+ #endif
-  #endif
-  
-  
diff --git a/tkimg1.3/libjpeg/jpegint.h b/tkimg1.3/libjpeg/jpegint.h
deleted file mode 100644
index 95b00d4..0000000
--- a/tkimg1.3/libjpeg/jpegint.h
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * jpegint.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides common declarations for the various JPEG modules.
- * These declarations are considered internal to the JPEG library; most
- * applications using the library shouldn't need to include this file.
- */
-
-
-/* Declarations for both compression & decompression */
-
-typedef enum {			/* Operating modes for buffer controllers */
-	JBUF_PASS_THRU,		/* Plain stripwise operation */
-	/* Remaining modes require a full-image buffer to have been created */
-	JBUF_SAVE_SOURCE,	/* Run source subobject only, save output */
-	JBUF_CRANK_DEST,	/* Run dest subobject only, using saved data */
-	JBUF_SAVE_AND_PASS	/* Run both subobjects, save output */
-} J_BUF_MODE;
-
-/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
-#define CSTATE_START	100	/* after create_compress */
-#define CSTATE_SCANNING	101	/* start_compress done, write_scanlines OK */
-#define CSTATE_RAW_OK	102	/* start_compress done, write_raw_data OK */
-#define CSTATE_WRCOEFS	103	/* jpeg_write_coefficients done */
-#define DSTATE_START	200	/* after create_decompress */
-#define DSTATE_INHEADER	201	/* reading header markers, no SOS yet */
-#define DSTATE_READY	202	/* found SOS, ready for start_decompress */
-#define DSTATE_PRELOAD	203	/* reading multiscan file in start_decompress*/
-#define DSTATE_PRESCAN	204	/* performing dummy pass for 2-pass quant */
-#define DSTATE_SCANNING	205	/* start_decompress done, read_scanlines OK */
-#define DSTATE_RAW_OK	206	/* start_decompress done, read_raw_data OK */
-#define DSTATE_BUFIMAGE	207	/* expecting jpeg_start_output */
-#define DSTATE_BUFPOST	208	/* looking for SOS/EOI in jpeg_finish_output */
-#define DSTATE_RDCOEFS	209	/* reading file in jpeg_read_coefficients */
-#define DSTATE_STOPPING	210	/* looking for EOI in jpeg_finish_decompress */
-
-
-/* Declarations for compression modules */
-
-/* Master control module */
-struct jpeg_comp_master {
-  JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
-  JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
-  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
-
-  /* State variables made visible to other modules */
-  boolean call_pass_startup;	/* True if pass_startup must be called */
-  boolean is_last_pass;		/* True during last pass */
-};
-
-/* Main buffer control (downsampled-data buffer) */
-struct jpeg_c_main_controller {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JMETHOD(void, process_data, (j_compress_ptr cinfo,
-			       JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
-			       JDIMENSION in_rows_avail));
-};
-
-/* Compression preprocessing (downsampling input buffer control) */
-struct jpeg_c_prep_controller {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
-				   JSAMPARRAY input_buf,
-				   JDIMENSION *in_row_ctr,
-				   JDIMENSION in_rows_avail,
-				   JSAMPIMAGE output_buf,
-				   JDIMENSION *out_row_group_ctr,
-				   JDIMENSION out_row_groups_avail));
-};
-
-/* Coefficient buffer control */
-struct jpeg_c_coef_controller {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
-				   JSAMPIMAGE input_buf));
-};
-
-/* Colorspace conversion */
-struct jpeg_color_converter {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
-  JMETHOD(void, color_convert, (j_compress_ptr cinfo,
-				JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-				JDIMENSION output_row, int num_rows));
-};
-
-/* Downsampling */
-struct jpeg_downsampler {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
-  JMETHOD(void, downsample, (j_compress_ptr cinfo,
-			     JSAMPIMAGE input_buf, JDIMENSION in_row_index,
-			     JSAMPIMAGE output_buf,
-			     JDIMENSION out_row_group_index));
-
-  boolean need_context_rows;	/* TRUE if need rows above & below */
-};
-
-/* Forward DCT (also controls coefficient quantization) */
-struct jpeg_forward_dct {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
-  /* perhaps this should be an array??? */
-  JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
-			      jpeg_component_info * compptr,
-			      JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
-			      JDIMENSION start_row, JDIMENSION start_col,
-			      JDIMENSION num_blocks));
-};
-
-/* Entropy encoding */
-struct jpeg_entropy_encoder {
-  JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
-  JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
-  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
-};
-
-/* Marker writing */
-struct jpeg_marker_writer {
-  JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
-  JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
-  JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
-  JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
-  JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
-  /* These routines are exported to allow insertion of extra markers */
-  /* Probably only COM and APPn markers should be written this way */
-  JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
-				      unsigned int datalen));
-  JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
-};
-
-
-/* Declarations for decompression modules */
-
-/* Master control module */
-struct jpeg_decomp_master {
-  JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
-  JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
-
-  /* State variables made visible to other modules */
-  boolean is_dummy_pass;	/* True during 1st pass for 2-pass quant */
-};
-
-/* Input control module */
-struct jpeg_input_controller {
-  JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
-  JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
-  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
-  JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
-
-  /* State variables made visible to other modules */
-  boolean has_multiple_scans;	/* True if file has multiple scans */
-  boolean eoi_reached;		/* True when EOI has been consumed */
-};
-
-/* Main buffer control (downsampled-data buffer) */
-struct jpeg_d_main_controller {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
-  JMETHOD(void, process_data, (j_decompress_ptr cinfo,
-			       JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
-			       JDIMENSION out_rows_avail));
-};
-
-/* Coefficient buffer control */
-struct jpeg_d_coef_controller {
-  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
-  JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
-  JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
-  JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
-				 JSAMPIMAGE output_buf));
-  /* Pointer to array of coefficient virtual arrays, or NULL if none */
-  jvirt_barray_ptr *coef_arrays;
-};
-
-/* Decompression postprocessing (color quantization buffer control) */
-struct jpeg_d_post_controller {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
-  JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
-				    JSAMPIMAGE input_buf,
-				    JDIMENSION *in_row_group_ctr,
-				    JDIMENSION in_row_groups_avail,
-				    JSAMPARRAY output_buf,
-				    JDIMENSION *out_row_ctr,
-				    JDIMENSION out_rows_avail));
-};
-
-/* Marker reading & parsing */
-struct jpeg_marker_reader {
-  JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
-  /* Read markers until SOS or EOI.
-   * Returns same codes as are defined for jpeg_consume_input:
-   * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
-   */
-  JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
-  /* Read a restart marker --- exported for use by entropy decoder only */
-  jpeg_marker_parser_method read_restart_marker;
-
-  /* State of marker reader --- nominally internal, but applications
-   * supplying COM or APPn handlers might like to know the state.
-   */
-  boolean saw_SOI;		/* found SOI? */
-  boolean saw_SOF;		/* found SOF? */
-  int next_restart_num;		/* next restart number expected (0-7) */
-  unsigned int discarded_bytes;	/* # of bytes skipped looking for a marker */
-};
-
-/* Entropy decoding */
-struct jpeg_entropy_decoder {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
-				JBLOCKROW *MCU_data));
-
-  /* This is here to share code between baseline and progressive decoders; */
-  /* other modules probably should not use it */
-  boolean insufficient_data;	/* set TRUE after emitting warning */
-};
-
-/* Inverse DCT (also performs dequantization) */
-typedef JMETHOD(void, inverse_DCT_method_ptr,
-		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
-		 JCOEFPTR coef_block,
-		 JSAMPARRAY output_buf, JDIMENSION output_col));
-
-struct jpeg_inverse_dct {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-  /* It is useful to allow each component to have a separate IDCT method. */
-  inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
-};
-
-/* Upsampling (note that upsampler must also call color converter) */
-struct jpeg_upsampler {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JMETHOD(void, upsample, (j_decompress_ptr cinfo,
-			   JSAMPIMAGE input_buf,
-			   JDIMENSION *in_row_group_ctr,
-			   JDIMENSION in_row_groups_avail,
-			   JSAMPARRAY output_buf,
-			   JDIMENSION *out_row_ctr,
-			   JDIMENSION out_rows_avail));
-
-  boolean need_context_rows;	/* TRUE if need rows above & below */
-};
-
-/* Colorspace conversion */
-struct jpeg_color_deconverter {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
-				JSAMPIMAGE input_buf, JDIMENSION input_row,
-				JSAMPARRAY output_buf, int num_rows));
-};
-
-/* Color quantization or color precision reduction */
-struct jpeg_color_quantizer {
-  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
-  JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
-				 JSAMPARRAY input_buf, JSAMPARRAY output_buf,
-				 int num_rows));
-  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
-  JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
-};
-
-
-/* Miscellaneous useful macros */
-
-#undef MAX
-#define MAX(a,b)	((a) > (b) ? (a) : (b))
-#undef MIN
-#define MIN(a,b)	((a) < (b) ? (a) : (b))
-
-
-/* We assume that right shift corresponds to signed division by 2 with
- * rounding towards minus infinity.  This is correct for typical "arithmetic
- * shift" instructions that shift in copies of the sign bit.  But some
- * C compilers implement >> with an unsigned shift.  For these machines you
- * must define RIGHT_SHIFT_IS_UNSIGNED.
- * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
- * It is only applied with constant shift counts.  SHIFT_TEMPS must be
- * included in the variables of any routine using RIGHT_SHIFT.
- */
-
-#ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define SHIFT_TEMPS	INT32 shift_temp;
-#define RIGHT_SHIFT(x,shft)  \
-	((shift_temp = (x)) < 0 ? \
-	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
-	 (shift_temp >> (shft)))
-#else
-#define SHIFT_TEMPS
-#define RIGHT_SHIFT(x,shft)	((x) >> (shft))
-#endif
-
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jinit_compress_master	jICompress
-#define jinit_c_master_control	jICMaster
-#define jinit_c_main_controller	jICMainC
-#define jinit_c_prep_controller	jICPrepC
-#define jinit_c_coef_controller	jICCoefC
-#define jinit_color_converter	jICColor
-#define jinit_downsampler	jIDownsampler
-#define jinit_forward_dct	jIFDCT
-#define jinit_huff_encoder	jIHEncoder
-#define jinit_phuff_encoder	jIPHEncoder
-#define jinit_marker_writer	jIMWriter
-#define jinit_master_decompress	jIDMaster
-#define jinit_d_main_controller	jIDMainC
-#define jinit_d_coef_controller	jIDCoefC
-#define jinit_d_post_controller	jIDPostC
-#define jinit_input_controller	jIInCtlr
-#define jinit_marker_reader	jIMReader
-#define jinit_huff_decoder	jIHDecoder
-#define jinit_phuff_decoder	jIPHDecoder
-#define jinit_inverse_dct	jIIDCT
-#define jinit_upsampler		jIUpsampler
-#define jinit_color_deconverter	jIDColor
-#define jinit_1pass_quantizer	jI1Quant
-#define jinit_2pass_quantizer	jI2Quant
-#define jinit_merged_upsampler	jIMUpsampler
-#define jinit_memory_mgr	jIMemMgr
-#define jdiv_round_up		jDivRound
-#define jround_up		jRound
-#define jcopy_sample_rows	jCopySamples
-#define jcopy_block_row		jCopyBlocks
-#define jzero_far		jZeroFar
-#define jpeg_zigzag_order	jZIGTable
-#define jpeg_natural_order	jZAGTable
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/* Compression module initialization routines */
-EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
-					 boolean transcode_only));
-EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
-/* Decompression module initialization routines */
-EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
-					  boolean need_full_buffer));
-EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
-/* Memory manager initialization */
-EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
-
-/* Utility routines in jutils.c */
-EXTERN(long) jdiv_round_up JPP((long a, long b));
-EXTERN(long) jround_up JPP((long a, long b));
-EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
-				    JSAMPARRAY output_array, int dest_row,
-				    int num_rows, JDIMENSION num_cols));
-EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
-				  JDIMENSION num_blocks));
-EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
-/* Constant tables in jutils.c */
-#if 0				/* This table is not actually needed in v6a */
-extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
-#endif
-extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
-
-/* Suppress undefined-structure complaints if necessary. */
-
-#ifdef INCOMPLETE_TYPES_BROKEN
-#ifndef AM_MEMORY_MANAGER	/* only jmemmgr.c defines these */
-struct jvirt_sarray_control { long dummy; };
-struct jvirt_barray_control { long dummy; };
-#endif
-#endif /* INCOMPLETE_TYPES_BROKEN */
diff --git a/tkimg1.3/libjpeg/jpeglib.h b/tkimg1.3/libjpeg/jpeglib.h
deleted file mode 100644
index d1be8dd..0000000
--- a/tkimg1.3/libjpeg/jpeglib.h
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * jpeglib.h
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file defines the application interface for the JPEG library.
- * Most applications using the library need only include this file,
- * and perhaps jerror.h if they want to know the exact error codes.
- */
-
-#ifndef JPEGLIB_H
-#define JPEGLIB_H
-
-/*
- * First we include the configuration files that record how this
- * installation of the JPEG library is set up.  jconfig.h can be
- * generated automatically for many systems.  jmorecfg.h contains
- * manual configuration options that most people need not worry about.
- */
-
-#ifndef JCONFIG_INCLUDED	/* in case jinclude.h already did */
-#include "jconfig.h"		/* widely used configuration options */
-#endif
-#include "jmorecfg.h"		/* seldom changed options */
-
-
-/* Version ID for the JPEG library.
- * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
- */
-
-#define JPEG_LIB_VERSION  62	/* Version 6b */
-
-
-/* Various constants determining the sizes of things.
- * All of these are specified by the JPEG standard, so don't change them
- * if you want to be compatible.
- */
-
-#define DCTSIZE		    8	/* The basic DCT block is 8x8 samples */
-#define DCTSIZE2	    64	/* DCTSIZE squared; # of elements in a block */
-#define NUM_QUANT_TBLS      4	/* Quantization tables are numbered 0..3 */
-#define NUM_HUFF_TBLS       4	/* Huffman tables are numbered 0..3 */
-#define NUM_ARITH_TBLS      16	/* Arith-coding tables are numbered 0..15 */
-#define MAX_COMPS_IN_SCAN   4	/* JPEG limit on # of components in one scan */
-#define MAX_SAMP_FACTOR     4	/* JPEG limit on sampling factors */
-/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
- * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
- * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
- * to handle it.  We even let you do this from the jconfig.h file.  However,
- * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
- * sometimes emits noncompliant files doesn't mean you should too.
- */
-#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */
-#ifndef D_MAX_BLOCKS_IN_MCU
-#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */
-#endif
-
-
-/* Data structures for images (arrays of samples and of DCT coefficients).
- * On 80x86 machines, the image arrays are too big for near pointers,
- * but the pointer arrays can fit in near memory.
- */
-
-typedef JSAMPLE FAR *JSAMPROW;	/* ptr to one image row of pixel samples. */
-typedef JSAMPROW *JSAMPARRAY;	/* ptr to some rows (a 2-D sample array) */
-typedef JSAMPARRAY *JSAMPIMAGE;	/* a 3-D sample array: top index is color */
-
-typedef JCOEF JBLOCK[DCTSIZE2];	/* one block of coefficients */
-typedef JBLOCK FAR *JBLOCKROW;	/* pointer to one row of coefficient blocks */
-typedef JBLOCKROW *JBLOCKARRAY;		/* a 2-D array of coefficient blocks */
-typedef JBLOCKARRAY *JBLOCKIMAGE;	/* a 3-D array of coefficient blocks */
-
-typedef JCOEF FAR *JCOEFPTR;	/* useful in a couple of places */
-
-
-/* Types for JPEG compression parameters and working tables. */
-
-
-/* DCT coefficient quantization tables. */
-
-typedef struct {
-  /* This array gives the coefficient quantizers in natural array order
-   * (not the zigzag order in which they are stored in a JPEG DQT marker).
-   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
-   */
-  UINT16 quantval[DCTSIZE2];	/* quantization step for each coefficient */
-  /* This field is used only during compression.  It's initialized FALSE when
-   * the table is created, and set TRUE when it's been output to the file.
-   * You could suppress output of a table by setting this to TRUE.
-   * (See jpeg_suppress_tables for an example.)
-   */
-  boolean sent_table;		/* TRUE when table has been output */
-} JQUANT_TBL;
-
-
-/* Huffman coding tables. */
-
-typedef struct {
-  /* These two fields directly represent the contents of a JPEG DHT marker */
-  UINT8 bits[17];		/* bits[k] = # of symbols with codes of */
-				/* length k bits; bits[0] is unused */
-  UINT8 huffval[256];		/* The symbols, in order of incr code length */
-  /* This field is used only during compression.  It's initialized FALSE when
-   * the table is created, and set TRUE when it's been output to the file.
-   * You could suppress output of a table by setting this to TRUE.
-   * (See jpeg_suppress_tables for an example.)
-   */
-  boolean sent_table;		/* TRUE when table has been output */
-} JHUFF_TBL;
-
-
-/* Basic info about one component (color channel). */
-
-typedef struct {
-  /* These values are fixed over the whole image. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOF marker. */
-  int component_id;		/* identifier for this component (0..255) */
-  int component_index;		/* its index in SOF or cinfo->comp_info[] */
-  int h_samp_factor;		/* horizontal sampling factor (1..4) */
-  int v_samp_factor;		/* vertical sampling factor (1..4) */
-  int quant_tbl_no;		/* quantization table selector (0..3) */
-  /* These values may vary between scans. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOS marker. */
-  /* The decompressor output side may not use these variables. */
-  int dc_tbl_no;		/* DC entropy table selector (0..3) */
-  int ac_tbl_no;		/* AC entropy table selector (0..3) */
-  
-  /* Remaining fields should be treated as private by applications. */
-  
-  /* These values are computed during compression or decompression startup: */
-  /* Component's size in DCT blocks.
-   * Any dummy blocks added to complete an MCU are not counted; therefore
-   * these values do not depend on whether a scan is interleaved or not.
-   */
-  JDIMENSION width_in_blocks;
-  JDIMENSION height_in_blocks;
-  /* Size of a DCT block in samples.  Always DCTSIZE for compression.
-   * For decompression this is the size of the output from one DCT block,
-   * reflecting any scaling we choose to apply during the IDCT step.
-   * Values of 1,2,4,8 are likely to be supported.  Note that different
-   * components may receive different IDCT scalings.
-   */
-  int DCT_scaled_size;
-  /* The downsampled dimensions are the component's actual, unpadded number
-   * of samples at the main buffer (preprocessing/compression interface), thus
-   * downsampled_width = ceil(image_width * Hi/Hmax)
-   * and similarly for height.  For decompression, IDCT scaling is included, so
-   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
-   */
-  JDIMENSION downsampled_width;	 /* actual width in samples */
-  JDIMENSION downsampled_height; /* actual height in samples */
-  /* This flag is used only for decompression.  In cases where some of the
-   * components will be ignored (eg grayscale output from YCbCr image),
-   * we can skip most computations for the unused components.
-   */
-  boolean component_needed;	/* do we need the value of this component? */
-
-  /* These values are computed before starting a scan of the component. */
-  /* The decompressor output side may not use these variables. */
-  int MCU_width;		/* number of blocks per MCU, horizontally */
-  int MCU_height;		/* number of blocks per MCU, vertically */
-  int MCU_blocks;		/* MCU_width * MCU_height */
-  int MCU_sample_width;		/* MCU width in samples, MCU_width*DCT_scaled_size */
-  int last_col_width;		/* # of non-dummy blocks across in last MCU */
-  int last_row_height;		/* # of non-dummy blocks down in last MCU */
-
-  /* Saved quantization table for component; NULL if none yet saved.
-   * See jdinput.c comments about the need for this information.
-   * This field is currently used only for decompression.
-   */
-  JQUANT_TBL * quant_table;
-
-  /* Private per-component storage for DCT or IDCT subsystem. */
-  void * dct_table;
-} jpeg_component_info;
-
-
-/* The script for encoding a multiple-scan file is an array of these: */
-
-typedef struct {
-  int comps_in_scan;		/* number of components encoded in this scan */
-  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
-  int Ss, Se;			/* progressive JPEG spectral selection parms */
-  int Ah, Al;			/* progressive JPEG successive approx. parms */
-} jpeg_scan_info;
-
-/* The decompressor can save APPn and COM markers in a list of these: */
-
-typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
-
-struct jpeg_marker_struct {
-  jpeg_saved_marker_ptr next;	/* next in list, or NULL */
-  UINT8 marker;			/* marker code: JPEG_COM, or JPEG_APP0+n */
-  unsigned int original_length;	/* # bytes of data in the file */
-  unsigned int data_length;	/* # bytes of data saved at data[] */
-  JOCTET FAR * data;		/* the data contained in the marker */
-  /* the marker length word is not counted in data_length or original_length */
-};
-
-/* Known color spaces. */
-
-typedef enum {
-	JCS_UNKNOWN,		/* error/unspecified */
-	JCS_GRAYSCALE,		/* monochrome */
-	JCS_RGB,		/* red/green/blue */
-	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV) */
-	JCS_CMYK,		/* C/M/Y/K */
-	JCS_YCCK		/* Y/Cb/Cr/K */
-} J_COLOR_SPACE;
-
-/* DCT/IDCT algorithm options. */
-
-typedef enum {
-	JDCT_ISLOW,		/* slow but accurate integer algorithm */
-	JDCT_IFAST,		/* faster, less accurate integer method */
-	JDCT_FLOAT		/* floating-point: accurate, fast on fast HW */
-} J_DCT_METHOD;
-
-#ifndef JDCT_DEFAULT		/* may be overridden in jconfig.h */
-#define JDCT_DEFAULT  JDCT_ISLOW
-#endif
-#ifndef JDCT_FASTEST		/* may be overridden in jconfig.h */
-#define JDCT_FASTEST  JDCT_IFAST
-#endif
-
-/* Dithering options for decompression. */
-
-typedef enum {
-	JDITHER_NONE,		/* no dithering */
-	JDITHER_ORDERED,	/* simple ordered dither */
-	JDITHER_FS		/* Floyd-Steinberg error diffusion dither */
-} J_DITHER_MODE;
-
-
-/* Common fields between JPEG compression and decompression master structs. */
-
-#define jpeg_common_fields \
-  struct jpeg_error_mgr * err;	/* Error handler module */\
-  struct jpeg_memory_mgr * mem;	/* Memory manager module */\
-  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
-  void * client_data;		/* Available for use by application */\
-  boolean is_decompressor;	/* So common code can tell which is which */\
-  int global_state		/* For checking call sequence validity */
-
-/* Routines that are to be used by both halves of the library are declared
- * to receive a pointer to this structure.  There are no actual instances of
- * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
- */
-struct jpeg_common_struct {
-  jpeg_common_fields;		/* Fields common to both master struct types */
-  /* Additional fields follow in an actual jpeg_compress_struct or
-   * jpeg_decompress_struct.  All three structs must agree on these
-   * initial fields!  (This would be a lot cleaner in C++.)
-   */
-};
-
-typedef struct jpeg_common_struct * j_common_ptr;
-typedef struct jpeg_compress_struct * j_compress_ptr;
-typedef struct jpeg_decompress_struct * j_decompress_ptr;
-
-
-/* Master record for a compression instance */
-
-struct jpeg_compress_struct {
-  jpeg_common_fields;		/* Fields shared with jpeg_decompress_struct */
-
-  /* Destination for compressed data */
-  struct jpeg_destination_mgr * dest;
-
-  /* Description of source image --- these fields must be filled in by
-   * outer application before starting compression.  in_color_space must
-   * be correct before you can even call jpeg_set_defaults().
-   */
-
-  JDIMENSION image_width;	/* input image width */
-  JDIMENSION image_height;	/* input image height */
-  int input_components;		/* # of color components in input image */
-  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
-
-  double input_gamma;		/* image gamma of input image */
-
-  /* Compression parameters --- these fields must be set before calling
-   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to
-   * initialize everything to reasonable defaults, then changing anything
-   * the application specifically wants to change.  That way you won't get
-   * burnt when new parameters are added.  Also note that there are several
-   * helper routines to simplify changing parameters.
-   */
-
-  int data_precision;		/* bits of precision in image data */
-
-  int num_components;		/* # of color components in JPEG image */
-  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
-
-  jpeg_component_info * comp_info;
-  /* comp_info[i] describes component that appears i'th in SOF */
-  
-  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
-  /* ptrs to coefficient quantization tables, or NULL if not defined */
-  
-  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  /* ptrs to Huffman coding tables, or NULL if not defined */
-  
-  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
-  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
-  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
-
-  int num_scans;		/* # of entries in scan_info array */
-  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
-  /* The default value of scan_info is NULL, which causes a single-scan
-   * sequential JPEG file to be emitted.  To create a multi-scan file,
-   * set num_scans and scan_info to point to an array of scan definitions.
-   */
-
-  boolean raw_data_in;		/* TRUE=caller supplies downsampled data */
-  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
-  boolean optimize_coding;	/* TRUE=optimize entropy encoding parms */
-  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
-  int smoothing_factor;		/* 1..100, or 0 for no input smoothing */
-  J_DCT_METHOD dct_method;	/* DCT algorithm selector */
-
-  /* The restart interval can be specified in absolute MCUs by setting
-   * restart_interval, or in MCU rows by setting restart_in_rows
-   * (in which case the correct restart_interval will be figured
-   * for each scan).
-   */
-  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
-  int restart_in_rows;		/* if > 0, MCU rows per restart interval */
-
-  /* Parameters controlling emission of special markers. */
-
-  boolean write_JFIF_header;	/* should a JFIF marker be written? */
-  UINT8 JFIF_major_version;	/* What to write for the JFIF version number */
-  UINT8 JFIF_minor_version;
-  /* These three values are not used by the JPEG code, merely copied */
-  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */
-  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */
-  /* ratio is defined by X_density/Y_density even when density_unit=0. */
-  UINT8 density_unit;		/* JFIF code for pixel size units */
-  UINT16 X_density;		/* Horizontal pixel density */
-  UINT16 Y_density;		/* Vertical pixel density */
-  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
-  
-  /* State variable: index of next scanline to be written to
-   * jpeg_write_scanlines().  Application may use this to control its
-   * processing loop, e.g., "while (next_scanline < image_height)".
-   */
-
-  JDIMENSION next_scanline;	/* 0 .. image_height-1  */
-
-  /* Remaining fields are known throughout compressor, but generally
-   * should not be touched by a surrounding application.
-   */
-
-  /*
-   * These fields are computed during compression startup
-   */
-  boolean progressive_mode;	/* TRUE if scan script uses progressive mode */
-  int max_h_samp_factor;	/* largest h_samp_factor */
-  int max_v_samp_factor;	/* largest v_samp_factor */
-
-  JDIMENSION total_iMCU_rows;	/* # of iMCU rows to be input to coef ctlr */
-  /* The coefficient controller receives data in units of MCU rows as defined
-   * for fully interleaved scans (whether the JPEG file is interleaved or not).
-   * There are v_samp_factor * DCTSIZE sample rows of each component in an
-   * "iMCU" (interleaved MCU) row.
-   */
-  
-  /*
-   * These fields are valid during any one scan.
-   * They describe the components and MCUs actually appearing in the scan.
-   */
-  int comps_in_scan;		/* # of JPEG components in this scan */
-  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
-  /* *cur_comp_info[i] describes component that appears i'th in SOS */
-  
-  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
-  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
-  
-  int blocks_in_MCU;		/* # of DCT blocks per MCU */
-  int MCU_membership[C_MAX_BLOCKS_IN_MCU];
-  /* MCU_membership[i] is index in cur_comp_info of component owning */
-  /* i'th block in an MCU */
-
-  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
-
-  /*
-   * Links to compression subobjects (methods and private variables of modules)
-   */
-  struct jpeg_comp_master * master;
-  struct jpeg_c_main_controller * main;
-  struct jpeg_c_prep_controller * prep;
-  struct jpeg_c_coef_controller * coef;
-  struct jpeg_marker_writer * marker;
-  struct jpeg_color_converter * cconvert;
-  struct jpeg_downsampler * downsample;
-  struct jpeg_forward_dct * fdct;
-  struct jpeg_entropy_encoder * entropy;
-  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
-  int script_space_size;
-};
-
-
-/* Master record for a decompression instance */
-
-struct jpeg_decompress_struct {
-  jpeg_common_fields;		/* Fields shared with jpeg_compress_struct */
-
-  /* Source of compressed data */
-  struct jpeg_source_mgr * src;
-
-  /* Basic description of image --- filled in by jpeg_read_header(). */
-  /* Application may inspect these values to decide how to process image. */
-
-  JDIMENSION image_width;	/* nominal image width (from SOF marker) */
-  JDIMENSION image_height;	/* nominal image height */
-  int num_components;		/* # of color components in JPEG image */
-  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
-
-  /* Decompression processing parameters --- these fields must be set before
-   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes
-   * them to default values.
-   */
-
-  J_COLOR_SPACE out_color_space; /* colorspace for output */
-
-  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
-
-  double output_gamma;		/* image gamma wanted in output */
-
-  boolean buffered_image;	/* TRUE=multiple output passes */
-  boolean raw_data_out;		/* TRUE=downsampled data wanted */
-
-  J_DCT_METHOD dct_method;	/* IDCT algorithm selector */
-  boolean do_fancy_upsampling;	/* TRUE=apply fancy upsampling */
-  boolean do_block_smoothing;	/* TRUE=apply interblock smoothing */
-
-  boolean quantize_colors;	/* TRUE=colormapped output wanted */
-  /* the following are ignored if not quantize_colors: */
-  J_DITHER_MODE dither_mode;	/* type of color dithering to use */
-  boolean two_pass_quantize;	/* TRUE=use two-pass color quantization */
-  int desired_number_of_colors;	/* max # colors to use in created colormap */
-  /* these are significant only in buffered-image mode: */
-  boolean enable_1pass_quant;	/* enable future use of 1-pass quantizer */
-  boolean enable_external_quant;/* enable future use of external colormap */
-  boolean enable_2pass_quant;	/* enable future use of 2-pass quantizer */
-
-  /* Description of actual output image that will be returned to application.
-   * These fields are computed by jpeg_start_decompress().
-   * You can also use jpeg_calc_output_dimensions() to determine these values
-   * in advance of calling jpeg_start_decompress().
-   */
-
-  JDIMENSION output_width;	/* scaled image width */
-  JDIMENSION output_height;	/* scaled image height */
-  int out_color_components;	/* # of color components in out_color_space */
-  int output_components;	/* # of color components returned */
-  /* output_components is 1 (a colormap index) when quantizing colors;
-   * otherwise it equals out_color_components.
-   */
-  int rec_outbuf_height;	/* min recommended height of scanline buffer */
-  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows
-   * high, space and time will be wasted due to unnecessary data copying.
-   * Usually rec_outbuf_height will be 1 or 2, at most 4.
-   */
-
-  /* When quantizing colors, the output colormap is described by these fields.
-   * The application can supply a colormap by setting colormap non-NULL before
-   * calling jpeg_start_decompress; otherwise a colormap is created during
-   * jpeg_start_decompress or jpeg_start_output.
-   * The map has out_color_components rows and actual_number_of_colors columns.
-   */
-  int actual_number_of_colors;	/* number of entries in use */
-  JSAMPARRAY colormap;		/* The color map as a 2-D pixel array */
-
-  /* State variables: these variables indicate the progress of decompression.
-   * The application may examine these but must not modify them.
-   */
-
-  /* Row index of next scanline to be read from jpeg_read_scanlines().
-   * Application may use this to control its processing loop, e.g.,
-   * "while (output_scanline < output_height)".
-   */
-  JDIMENSION output_scanline;	/* 0 .. output_height-1  */
-
-  /* Current input scan number and number of iMCU rows completed in scan.
-   * These indicate the progress of the decompressor input side.
-   */
-  int input_scan_number;	/* Number of SOS markers seen so far */
-  JDIMENSION input_iMCU_row;	/* Number of iMCU rows completed */
-
-  /* The "output scan number" is the notional scan being displayed by the
-   * output side.  The decompressor will not allow output scan/row number
-   * to get ahead of input scan/row, but it can fall arbitrarily far behind.
-   */
-  int output_scan_number;	/* Nominal scan number being displayed */
-  JDIMENSION output_iMCU_row;	/* Number of iMCU rows read */
-
-  /* Current progression status.  coef_bits[c][i] indicates the precision
-   * with which component c's DCT coefficient i (in zigzag order) is known.
-   * It is -1 when no data has yet been received, otherwise it is the point
-   * transform (shift) value for the most recent scan of the coefficient
-   * (thus, 0 at completion of the progression).
-   * This pointer is NULL when reading a non-progressive file.
-   */
-  int (*coef_bits)[DCTSIZE2];	/* -1 or current Al value for each coef */
-
-  /* Internal JPEG parameters --- the application usually need not look at
-   * these fields.  Note that the decompressor output side may not use
-   * any parameters that can change between scans.
-   */
-
-  /* Quantization and Huffman tables are carried forward across input
-   * datastreams when processing abbreviated JPEG datastreams.
-   */
-
-  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
-  /* ptrs to coefficient quantization tables, or NULL if not defined */
-
-  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  /* ptrs to Huffman coding tables, or NULL if not defined */
-
-  /* These parameters are never carried across datastreams, since they
-   * are given in SOF/SOS markers or defined to be reset by SOI.
-   */
-
-  int data_precision;		/* bits of precision in image data */
-
-  jpeg_component_info * comp_info;
-  /* comp_info[i] describes component that appears i'th in SOF */
-
-  boolean progressive_mode;	/* TRUE if SOFn specifies progressive mode */
-  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
-
-  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
-  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
-  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
-
-  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
-
-  /* These fields record data obtained from optional markers recognized by
-   * the JPEG library.
-   */
-  boolean saw_JFIF_marker;	/* TRUE iff a JFIF APP0 marker was found */
-  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
-  UINT8 JFIF_major_version;	/* JFIF version number */
-  UINT8 JFIF_minor_version;
-  UINT8 density_unit;		/* JFIF code for pixel size units */
-  UINT16 X_density;		/* Horizontal pixel density */
-  UINT16 Y_density;		/* Vertical pixel density */
-  boolean saw_Adobe_marker;	/* TRUE iff an Adobe APP14 marker was found */
-  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
-
-  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
-
-  /* Aside from the specific data retained from APPn markers known to the
-   * library, the uninterpreted contents of any or all APPn and COM markers
-   * can be saved in a list for examination by the application.
-   */
-  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
-
-  /* Remaining fields are known throughout decompressor, but generally
-   * should not be touched by a surrounding application.
-   */
-
-  /*
-   * These fields are computed during decompression startup
-   */
-  int max_h_samp_factor;	/* largest h_samp_factor */
-  int max_v_samp_factor;	/* largest v_samp_factor */
-
-  int min_DCT_scaled_size;	/* smallest DCT_scaled_size of any component */
-
-  JDIMENSION total_iMCU_rows;	/* # of iMCU rows in image */
-  /* The coefficient controller's input and output progress is measured in
-   * units of "iMCU" (interleaved MCU) rows.  These are the same as MCU rows
-   * in fully interleaved JPEG scans, but are used whether the scan is
-   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
-   * rows of each component.  Therefore, the IDCT output contains
-   * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
-   */
-
-  JSAMPLE * sample_range_limit; /* table for fast range-limiting */
-
-  /*
-   * These fields are valid during any one scan.
-   * They describe the components and MCUs actually appearing in the scan.
-   * Note that the decompressor output side must not use these fields.
-   */
-  int comps_in_scan;		/* # of JPEG components in this scan */
-  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
-  /* *cur_comp_info[i] describes component that appears i'th in SOS */
-
-  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
-  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
-
-  int blocks_in_MCU;		/* # of DCT blocks per MCU */
-  int MCU_membership[D_MAX_BLOCKS_IN_MCU];
-  /* MCU_membership[i] is index in cur_comp_info of component owning */
-  /* i'th block in an MCU */
-
-  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
-
-  /* This field is shared between entropy decoder and marker parser.
-   * It is either zero or the code of a JPEG marker that has been
-   * read from the data source, but has not yet been processed.
-   */
-  int unread_marker;
-
-  /*
-   * Links to decompression subobjects (methods, private variables of modules)
-   */
-  struct jpeg_decomp_master * master;
-  struct jpeg_d_main_controller * main;
-  struct jpeg_d_coef_controller * coef;
-  struct jpeg_d_post_controller * post;
-  struct jpeg_input_controller * inputctl;
-  struct jpeg_marker_reader * marker;
-  struct jpeg_entropy_decoder * entropy;
-  struct jpeg_inverse_dct * idct;
-  struct jpeg_upsampler * upsample;
-  struct jpeg_color_deconverter * cconvert;
-  struct jpeg_color_quantizer * cquantize;
-};
-
-
-/* "Object" declarations for JPEG modules that may be supplied or called
- * directly by the surrounding application.
- * As with all objects in the JPEG library, these structs only define the
- * publicly visible methods and state variables of a module.  Additional
- * private fields may exist after the public ones.
- */
-
-
-/* Error handler object */
-
-struct jpeg_error_mgr {
-  /* Error exit handler: does not return to caller */
-  JMETHOD(void, error_exit, (j_common_ptr cinfo));
-  /* Conditionally emit a trace or warning message */
-  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
-  /* Routine that actually outputs a trace or error message */
-  JMETHOD(void, output_message, (j_common_ptr cinfo));
-  /* Format a message string for the most recent JPEG error or message */
-  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
-#define JMSG_LENGTH_MAX  200	/* recommended size of format_message buffer */
-  /* Reset error state variables at start of a new image */
-  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
-  
-  /* The message ID code and any parameters are saved here.
-   * A message can have one string parameter or up to 8 int parameters.
-   */
-  int msg_code;
-#define JMSG_STR_PARM_MAX  80
-  union {
-    int i[8];
-    char s[JMSG_STR_PARM_MAX];
-  } msg_parm;
-  
-  /* Standard state variables for error facility */
-  
-  int trace_level;		/* max msg_level that will be displayed */
-  
-  /* For recoverable corrupt-data errors, we emit a warning message,
-   * but keep going unless emit_message chooses to abort.  emit_message
-   * should count warnings in num_warnings.  The surrounding application
-   * can check for bad data by seeing if num_warnings is nonzero at the
-   * end of processing.
-   */
-  long num_warnings;		/* number of corrupt-data warnings */
-
-  /* These fields point to the table(s) of error message strings.
-   * An application can change the table pointer to switch to a different
-   * message list (typically, to change the language in which errors are
-   * reported).  Some applications may wish to add additional error codes
-   * that will be handled by the JPEG library error mechanism; the second
-   * table pointer is used for this purpose.
-   *
-   * First table includes all errors generated by JPEG library itself.
-   * Error code 0 is reserved for a "no such error string" message.
-   */
-  const char * const * jpeg_message_table; /* Library errors */
-  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */
-  /* Second table can be added by application (see cjpeg/djpeg for example).
-   * It contains strings numbered first_addon_message..last_addon_message.
-   */
-  const char * const * addon_message_table; /* Non-library errors */
-  int first_addon_message;	/* code for first string in addon table */
-  int last_addon_message;	/* code for last string in addon table */
-};
-
-
-/* Progress monitor object */
-
-struct jpeg_progress_mgr {
-  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
-
-  long pass_counter;		/* work units completed in this pass */
-  long pass_limit;		/* total number of work units in this pass */
-  int completed_passes;		/* passes completed so far */
-  int total_passes;		/* total number of passes expected */
-};
-
-
-/* Data destination object for compression */
-
-struct jpeg_destination_mgr {
-  JOCTET * next_output_byte;	/* => next byte to write in buffer */
-  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
-
-  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
-  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
-  JMETHOD(void, term_destination, (j_compress_ptr cinfo));
-};
-
-
-/* Data source object for decompression */
-
-struct jpeg_source_mgr {
-  const JOCTET * next_input_byte; /* => next byte to read from buffer */
-  size_t bytes_in_buffer;	/* # of bytes remaining in buffer */
-
-  JMETHOD(void, init_source, (j_decompress_ptr cinfo));
-  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
-  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
-  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
-  JMETHOD(void, term_source, (j_decompress_ptr cinfo));
-};
-
-
-/* Memory manager object.
- * Allocates "small" objects (a few K total), "large" objects (tens of K),
- * and "really big" objects (virtual arrays with backing store if needed).
- * The memory manager does not allow individual objects to be freed; rather,
- * each created object is assigned to a pool, and whole pools can be freed
- * at once.  This is faster and more convenient than remembering exactly what
- * to free, especially where malloc()/free() are not too speedy.
- * NB: alloc routines never return NULL.  They exit to error_exit if not
- * successful.
- */
-
-#define JPOOL_PERMANENT	0	/* lasts until master record is destroyed */
-#define JPOOL_IMAGE	1	/* lasts until done with image/datastream */
-#define JPOOL_NUMPOOLS	2
-
-typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
-typedef struct jvirt_barray_control * jvirt_barray_ptr;
-
-
-struct jpeg_memory_mgr {
-  /* Method pointers */
-  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
-				size_t sizeofobject));
-  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
-				     size_t sizeofobject));
-  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
-				     JDIMENSION samplesperrow,
-				     JDIMENSION numrows));
-  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
-				      JDIMENSION blocksperrow,
-				      JDIMENSION numrows));
-  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
-						  int pool_id,
-						  boolean pre_zero,
-						  JDIMENSION samplesperrow,
-						  JDIMENSION numrows,
-						  JDIMENSION maxaccess));
-  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
-						  int pool_id,
-						  boolean pre_zero,
-						  JDIMENSION blocksperrow,
-						  JDIMENSION numrows,
-						  JDIMENSION maxaccess));
-  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
-  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
-					   jvirt_sarray_ptr ptr,
-					   JDIMENSION start_row,
-					   JDIMENSION num_rows,
-					   boolean writable));
-  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
-					    jvirt_barray_ptr ptr,
-					    JDIMENSION start_row,
-					    JDIMENSION num_rows,
-					    boolean writable));
-  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
-  JMETHOD(void, self_destruct, (j_common_ptr cinfo));
-
-  /* Limit on memory allocation for this JPEG object.  (Note that this is
-   * merely advisory, not a guaranteed maximum; it only affects the space
-   * used for virtual-array buffers.)  May be changed by outer application
-   * after creating the JPEG object.
-   */
-  long max_memory_to_use;
-
-  /* Maximum allocation request accepted by alloc_large. */
-  long max_alloc_chunk;
-};
-
-
-/* Routine signature for application-supplied marker processing methods.
- * Need not pass marker code since it is stored in cinfo->unread_marker.
- */
-typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
-
-
-/* Declarations for routines called by application.
- * The JPP macro hides prototype parameters from compilers that can't cope.
- * Note JPP requires double parentheses.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JPP(arglist)	arglist
-#else
-#define JPP(arglist)	()
-#endif
-
-
-/* Short forms of external names for systems with brain-damaged linkers.
- * We shorten external names to be unique in the first six letters, which
- * is good enough for all known systems.
- * (If your compiler itself needs names to be unique in less than 15 
- * characters, you are out of luck.  Get a better compiler.)
- */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_std_error		jStdError
-#define jpeg_CreateCompress	jCreaCompress
-#define jpeg_CreateDecompress	jCreaDecompress
-#define jpeg_destroy_compress	jDestCompress
-#define jpeg_destroy_decompress	jDestDecompress
-#define jpeg_stdio_dest		jStdDest
-#define jpeg_stdio_src		jStdSrc
-#define jpeg_set_defaults	jSetDefaults
-#define jpeg_set_colorspace	jSetColorspace
-#define jpeg_default_colorspace	jDefColorspace
-#define jpeg_set_quality	jSetQuality
-#define jpeg_set_linear_quality	jSetLQuality
-#define jpeg_add_quant_table	jAddQuantTable
-#define jpeg_quality_scaling	jQualityScaling
-#define jpeg_simple_progression	jSimProgress
-#define jpeg_suppress_tables	jSuppressTables
-#define jpeg_alloc_quant_table	jAlcQTable
-#define jpeg_alloc_huff_table	jAlcHTable
-#define jpeg_start_compress	jStrtCompress
-#define jpeg_write_scanlines	jWrtScanlines
-#define jpeg_finish_compress	jFinCompress
-#define jpeg_write_raw_data	jWrtRawData
-#define jpeg_write_marker	jWrtMarker
-#define jpeg_write_m_header	jWrtMHeader
-#define jpeg_write_m_byte	jWrtMByte
-#define jpeg_write_tables	jWrtTables
-#define jpeg_read_header	jReadHeader
-#define jpeg_start_decompress	jStrtDecompress
-#define jpeg_read_scanlines	jReadScanlines
-#define jpeg_finish_decompress	jFinDecompress
-#define jpeg_read_raw_data	jReadRawData
-#define jpeg_has_multiple_scans	jHasMultScn
-#define jpeg_start_output	jStrtOutput
-#define jpeg_finish_output	jFinOutput
-#define jpeg_input_complete	jInComplete
-#define jpeg_new_colormap	jNewCMap
-#define jpeg_consume_input	jConsumeInput
-#define jpeg_calc_output_dimensions	jCalcDimensions
-#define jpeg_save_markers	jSaveMarkers
-#define jpeg_set_marker_processor	jSetMarker
-#define jpeg_read_coefficients	jReadCoefs
-#define jpeg_write_coefficients	jWrtCoefs
-#define jpeg_copy_critical_parameters	jCopyCrit
-#define jpeg_abort_compress	jAbrtCompress
-#define jpeg_abort_decompress	jAbrtDecompress
-#define jpeg_abort		jAbort
-#define jpeg_destroy		jDestroy
-#define jpeg_resync_to_restart	jResyncRestart
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/* Default error-management setup */
-EXTERN(struct jpeg_error_mgr *) jpeg_std_error
-	JPP((struct jpeg_error_mgr * err));
-
-/* Initialization of JPEG compression objects.
- * jpeg_create_compress() and jpeg_create_decompress() are the exported
- * names that applications should call.  These expand to calls on
- * jpeg_CreateCompress and jpeg_CreateDecompress with additional information
- * passed for version mismatch checking.
- * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
- */
-#define jpeg_create_compress(cinfo) \
-    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
-			(size_t) sizeof(struct jpeg_compress_struct))
-#define jpeg_create_decompress(cinfo) \
-    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
-			  (size_t) sizeof(struct jpeg_decompress_struct))
-EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
-				      int version, size_t structsize));
-EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
-					int version, size_t structsize));
-/* Destruction of JPEG compression objects */
-EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
-
-/* Standard data source and destination managers: stdio streams. */
-/* Caller is responsible for opening the file before and closing after. */
-EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
-EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
-
-/* Default parameter setup for compression */
-EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
-/* Compression parameter setup aids */
-EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
-				      J_COLOR_SPACE colorspace));
-EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
-				   boolean force_baseline));
-EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
-					  int scale_factor,
-					  boolean force_baseline));
-EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
-				       const unsigned int *basic_table,
-				       int scale_factor,
-				       boolean force_baseline));
-EXTERN(int) jpeg_quality_scaling JPP((int quality));
-EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
-				       boolean suppress));
-EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
-EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
-
-/* Main entry points for compression */
-EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
-				      boolean write_all_tables));
-EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
-					     JSAMPARRAY scanlines,
-					     JDIMENSION num_lines));
-EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
-
-/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
-					    JSAMPIMAGE data,
-					    JDIMENSION num_lines));
-
-/* Write a special marker.  See libjpeg.doc concerning safe usage. */
-EXTERN(void) jpeg_write_marker
-	JPP((j_compress_ptr cinfo, int marker,
-	     const JOCTET * dataptr, unsigned int datalen));
-/* Same, but piecemeal. */
-EXTERN(void) jpeg_write_m_header
-	JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
-EXTERN(void) jpeg_write_m_byte
-	JPP((j_compress_ptr cinfo, int val));
-
-/* Alternate compression function: just write an abbreviated table file */
-EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
-
-/* Decompression startup: read start of JPEG datastream to see what's there */
-EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
-				  boolean require_image));
-/* Return value is one of: */
-#define JPEG_SUSPENDED		0 /* Suspended due to lack of input data */
-#define JPEG_HEADER_OK		1 /* Found valid image datastream */
-#define JPEG_HEADER_TABLES_ONLY	2 /* Found valid table-specs-only datastream */
-/* If you pass require_image = TRUE (normal case), you need not check for
- * a TABLES_ONLY return code; an abbreviated file will cause an error exit.
- * JPEG_SUSPENDED is only possible if you use a data source module that can
- * give a suspension return (the stdio source module doesn't).
- */
-
-/* Main entry points for decompression */
-EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
-					    JSAMPARRAY scanlines,
-					    JDIMENSION max_lines));
-EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
-
-/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
-					   JSAMPIMAGE data,
-					   JDIMENSION max_lines));
-
-/* Additional entry points for buffered-image mode. */
-EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
-				       int scan_number));
-EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
-EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
-/* Return value is one of: */
-/* #define JPEG_SUSPENDED	0    Suspended due to lack of input data */
-#define JPEG_REACHED_SOS	1 /* Reached start of new scan */
-#define JPEG_REACHED_EOI	2 /* Reached end of image */
-#define JPEG_ROW_COMPLETED	3 /* Completed one iMCU row */
-#define JPEG_SCAN_COMPLETED	4 /* Completed last iMCU row of a scan */
-
-/* Precalculate output dimensions for current decompression parameters. */
-EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
-
-/* Control saving of COM and APPn markers into marker_list. */
-EXTERN(void) jpeg_save_markers
-	JPP((j_decompress_ptr cinfo, int marker_code,
-	     unsigned int length_limit));
-
-/* Install a special processing method for COM or APPn markers. */
-EXTERN(void) jpeg_set_marker_processor
-	JPP((j_decompress_ptr cinfo, int marker_code,
-	     jpeg_marker_parser_method routine));
-
-/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
-EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
-					  jvirt_barray_ptr * coef_arrays));
-EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
-						j_compress_ptr dstinfo));
-
-/* If you choose to abort compression or decompression before completing
- * jpeg_finish_(de)compress, then you need to clean up to release memory,
- * temporary files, etc.  You can just call jpeg_destroy_(de)compress
- * if you're done with the JPEG object, but if you want to clean it up and
- * reuse it, call this:
- */
-EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
-
-/* Generic versions of jpeg_abort and jpeg_destroy that work on either
- * flavor of JPEG object.  These may be more convenient in some places.
- */
-EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
-
-/* Default restart-marker-resync procedure for use by data source modules */
-EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
-					    int desired));
-
-
-/* These marker codes are exported since applications and data source modules
- * are likely to want to use them.
- */
-
-#define JPEG_RST0	0xD0	/* RST0 marker code */
-#define JPEG_EOI	0xD9	/* EOI marker code */
-#define JPEG_APP0	0xE0	/* APP0 marker code */
-#define JPEG_COM	0xFE	/* COM marker code */
-
-
-/* If we have a brain-damaged compiler that emits warnings (or worse, errors)
- * for structure definitions that are never filled in, keep it quiet by
- * supplying dummy definitions for the various substructures.
- */
-
-#ifdef INCOMPLETE_TYPES_BROKEN
-#ifndef JPEG_INTERNALS		/* will be defined in jpegint.h */
-struct jvirt_sarray_control { long dummy; };
-struct jvirt_barray_control { long dummy; };
-struct jpeg_comp_master { long dummy; };
-struct jpeg_c_main_controller { long dummy; };
-struct jpeg_c_prep_controller { long dummy; };
-struct jpeg_c_coef_controller { long dummy; };
-struct jpeg_marker_writer { long dummy; };
-struct jpeg_color_converter { long dummy; };
-struct jpeg_downsampler { long dummy; };
-struct jpeg_forward_dct { long dummy; };
-struct jpeg_entropy_encoder { long dummy; };
-struct jpeg_decomp_master { long dummy; };
-struct jpeg_d_main_controller { long dummy; };
-struct jpeg_d_coef_controller { long dummy; };
-struct jpeg_d_post_controller { long dummy; };
-struct jpeg_input_controller { long dummy; };
-struct jpeg_marker_reader { long dummy; };
-struct jpeg_entropy_decoder { long dummy; };
-struct jpeg_inverse_dct { long dummy; };
-struct jpeg_upsampler { long dummy; };
-struct jpeg_color_deconverter { long dummy; };
-struct jpeg_color_quantizer { long dummy; };
-#endif /* JPEG_INTERNALS */
-#endif /* INCOMPLETE_TYPES_BROKEN */
-
-
-/*
- * The JPEG library modules define JPEG_INTERNALS before including this file.
- * The internal structure declarations are read only when that is true.
- * Applications using the library should not include jpegint.h, but may wish
- * to include jerror.h.
- */
-
-#ifdef JPEG_INTERNALS
-#include "jpegint.h"		/* fetch private declarations */
-#include "jerror.h"		/* fetch error codes too */
-#endif
-
-#endif /* JPEGLIB_H */
diff --git a/tkimg1.3/libjpeg/jpegtran.1 b/tkimg1.3/libjpeg/jpegtran.1
deleted file mode 100644
index 6de18e2..0000000
--- a/tkimg1.3/libjpeg/jpegtran.1
+++ /dev/null
@@ -1,238 +0,0 @@
-.TH JPEGTRAN 1 "3 August 1997"
-.SH NAME
-jpegtran \- lossless transformation of JPEG files
-.SH SYNOPSIS
-.B jpegtran
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B jpegtran
-performs various useful transformations of JPEG files.
-It can translate the coded representation from one variant of JPEG to another,
-for example from baseline JPEG to progressive JPEG or vice versa.  It can also
-perform some rearrangements of the image data, for example turning an image
-from landscape to portrait format by rotation.
-.PP
-.B jpegtran
-works by rearranging the compressed data (DCT coefficients), without
-ever fully decoding the image.  Therefore, its transformations are lossless:
-there is no image degradation at all, which would not be true if you used
-.B djpeg
-followed by
-.B cjpeg
-to accomplish the same conversion.  But by the same token,
-.B jpegtran
-cannot perform lossy operations such as changing the image quality.
-.PP
-.B jpegtran
-reads the named JPEG/JFIF file, or the standard input if no file is
-named, and produces a JPEG/JFIF file on the standard output.
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-optimize
-may be written
-.B \-opt
-or
-.BR \-o .
-Upper and lower case are equivalent.
-British spellings are also accepted (e.g.,
-.BR \-optimise ),
-though for brevity these are not mentioned below.
-.PP
-To specify the coded JPEG representation used in the output file,
-.B jpegtran
-accepts a subset of the switches recognized by
-.BR cjpeg :
-.TP
-.B \-optimize
-Perform optimization of entropy encoding parameters.
-.TP
-.B \-progressive
-Create progressive JPEG file.
-.TP
-.BI \-restart " N"
-Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
-attached to the number.
-.TP
-.BI \-scans " file"
-Use the scan script given in the specified text file.
-.PP
-See
-.BR cjpeg (1)
-for more details about these switches.
-If you specify none of these switches, you get a plain baseline-JPEG output
-file.  The quality setting and so forth are determined by the input file.
-.PP
-The image can be losslessly transformed by giving one of these switches:
-.TP
-.B \-flip horizontal
-Mirror image horizontally (left-right).
-.TP
-.B \-flip vertical
-Mirror image vertically (top-bottom).
-.TP
-.B \-rotate 90
-Rotate image 90 degrees clockwise.
-.TP
-.B \-rotate 180
-Rotate image 180 degrees.
-.TP
-.B \-rotate 270
-Rotate image 270 degrees clockwise (or 90 ccw).
-.TP
-.B \-transpose
-Transpose image (across UL-to-LR axis).
-.TP
-.B \-transverse
-Transverse transpose (across UR-to-LL axis).
-.PP
-The transpose transformation has no restrictions regarding image dimensions.
-The other transformations operate rather oddly if the image dimensions are not
-a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
-transform complete blocks of DCT coefficient data in the desired way.
-.PP
-.BR jpegtran 's
-default behavior when transforming an odd-size image is designed
-to preserve exact reversibility and mathematical consistency of the
-transformation set.  As stated, transpose is able to flip the entire image
-area.  Horizontal mirroring leaves any partial iMCU column at the right edge
-untouched, but is able to flip all rows of the image.  Similarly, vertical
-mirroring leaves any partial iMCU row at the bottom edge untouched, but is
-able to flip all columns.  The other transforms can be built up as sequences
-of transpose and flip operations; for consistency, their actions on edge
-pixels are defined to be the same as the end result of the corresponding
-transpose-and-flip sequence.
-.PP
-For practical use, you may prefer to discard any untransformable edge pixels
-rather than having a strange-looking strip along the right and/or bottom edges
-of a transformed image.  To do this, add the
-.B \-trim
-switch:
-.TP
-.B \-trim
-Drop non-transformable edge blocks.
-.PP
-Obviously, a transformation with
-.B \-trim
-is not reversible, so strictly speaking
-.B jpegtran
-with this switch is not lossless.  Also, the expected mathematical
-equivalences between the transformations no longer hold.  For example,
-.B \-rot 270 -trim
-trims only the bottom edge, but
-.B \-rot 90 -trim
-followed by
-.B \-rot 180 -trim
-trims both edges.
-.PP
-Another not-strictly-lossless transformation switch is:
-.TP
-.B \-grayscale
-Force grayscale output.
-.PP
-This option discards the chrominance channels if the input image is YCbCr
-(ie, a standard color JPEG), resulting in a grayscale JPEG file.  The
-luminance channel is preserved exactly, so this is a better method of reducing
-to grayscale than decompression, conversion, and recompression.  This switch
-is particularly handy for fixing a monochrome picture that was mistakenly
-encoded as a color JPEG.  (In such a case, the space savings from getting rid
-of the near-empty chroma channels won't be large; but the decoding time for
-a grayscale JPEG is substantially less than that for a color JPEG.)
-.PP
-.B jpegtran
-also recognizes these switches that control what to do with "extra" markers,
-such as comment blocks:
-.TP
-.B \-copy none
-Copy no extra markers from source file.  This setting suppresses all
-comments and other excess baggage present in the source file.
-.TP
-.B \-copy comments
-Copy only comment markers.  This setting copies comments from the source file,
-but discards any other inessential data.
-.TP
-.B \-copy all
-Copy all extra markers.  This setting preserves miscellaneous markers
-found in the source file, such as JFIF thumbnails and Photoshop settings.
-In some files these extra markers can be sizable.
-.PP
-The default behavior is
-.BR "\-copy comments" .
-(Note: in IJG releases v6 and v6a,
-.B jpegtran
-always did the equivalent of
-.BR "\-copy none" .)
-.PP
-Additional switches recognized by jpegtran are:
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images.  Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number.  For example,
-.B \-max 4m
-selects 4000000 bytes.  If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout.  More
-.BR \-v 's
-give more output.  Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.SH EXAMPLES
-.LP
-This example converts a baseline JPEG file to progressive form:
-.IP
-.B jpegtran \-progressive
-.I foo.jpg
-.B >
-.I fooprog.jpg
-.PP
-This example rotates an image 90 degrees clockwise, discarding any
-unrotatable edge pixels:
-.IP
-.B jpegtran \-rot 90 -trim
-.I foo.jpg
-.B >
-.I foo90.jpg
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-The transform options can't transform odd-size images perfectly.  Use
-.B \-trim
-if you don't like the results without it.
-.PP
-The entire image is read into memory and then written out again, even in
-cases where this isn't really necessary.  Expect swapping on large images,
-especially when using the more complex transform options.
diff --git a/tkimg1.3/libjpeg/jpegtran.c b/tkimg1.3/libjpeg/jpegtran.c
deleted file mode 100644
index 20ef111..0000000
--- a/tkimg1.3/libjpeg/jpegtran.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * jpegtran.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a command-line user interface for JPEG transcoding.
- * It is very similar to cjpeg.c, but provides lossless transcoding between
- * different JPEG file formats.  It also provides some lossless and sort-of-
- * lossless transformations of JPEG data.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-#include "transupp.h"		/* Support routines for jpegtran */
-#include "jversion.h"		/* for version message */
-
-#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h>              /* Metrowerks needs this */
-#include <console.h>		/* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h>		/* Think declares it here */
-#endif
-#endif
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname;	/* program name for error messages */
-static char * outfilename;	/* for -outfile switch */
-static JCOPY_OPTION copyoption;	/* -copy switch */
-static jpeg_transform_info transformoption; /* image transformation options */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
-  fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
-  fprintf(stderr, "inputfile outputfile\n");
-#else
-  fprintf(stderr, "[inputfile]\n");
-#endif
-
-  fprintf(stderr, "Switches (names may be abbreviated):\n");
-  fprintf(stderr, "  -copy none     Copy no extra markers from source file\n");
-  fprintf(stderr, "  -copy comments Copy only comment markers (default)\n");
-  fprintf(stderr, "  -copy all      Copy all extra markers\n");
-#ifdef ENTROPY_OPT_SUPPORTED
-  fprintf(stderr, "  -optimize      Optimize Huffman table (smaller file, but slow compression)\n");
-#endif
-#ifdef C_PROGRESSIVE_SUPPORTED
-  fprintf(stderr, "  -progressive   Create progressive JPEG file\n");
-#endif
-#if TRANSFORMS_SUPPORTED
-  fprintf(stderr, "Switches for modifying the image:\n");
-  fprintf(stderr, "  -grayscale     Reduce to grayscale (omit color data)\n");
-  fprintf(stderr, "  -flip [horizontal|vertical]  Mirror image (left-right or top-bottom)\n");
-  fprintf(stderr, "  -rotate [90|180|270]         Rotate image (degrees clockwise)\n");
-  fprintf(stderr, "  -transpose     Transpose image\n");
-  fprintf(stderr, "  -transverse    Transverse transpose image\n");
-  fprintf(stderr, "  -trim          Drop non-transformable edge blocks\n");
-#endif /* TRANSFORMS_SUPPORTED */
-  fprintf(stderr, "Switches for advanced users:\n");
-  fprintf(stderr, "  -restart N     Set restart interval in rows, or in blocks with B\n");
-  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
-  fprintf(stderr, "  -outfile name  Specify name for output file\n");
-  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
-  fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
-  fprintf(stderr, "  -arithmetic    Use arithmetic coding\n");
-#endif
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-  fprintf(stderr, "  -scans file    Create multi-scan JPEG per script file\n");
-#endif
-  exit(EXIT_FAILURE);
-}
-
-
-LOCAL(void)
-select_transform (JXFORM_CODE transform)
-/* Silly little routine to detect multiple transform options,
- * which we can't handle.
- */
-{
-#if TRANSFORMS_SUPPORTED
-  if (transformoption.transform == JXFORM_NONE ||
-      transformoption.transform == transform) {
-    transformoption.transform = transform;
-  } else {
-    fprintf(stderr, "%s: can only do one image transformation at a time\n",
-	    progname);
-    usage();
-  }
-#else
-  fprintf(stderr, "%s: sorry, image transformation was not compiled\n",
-	  progname);
-  exit(EXIT_FAILURE);
-#endif
-}
-
-
-LOCAL(int)
-parse_switches (j_compress_ptr cinfo, int argc, char **argv,
-		int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
-  int argn;
-  char * arg;
-  boolean simple_progressive;
-  char * scansarg = NULL;	/* saves -scans parm if any */
-
-  /* Set up default JPEG parameters. */
-  simple_progressive = FALSE;
-  outfilename = NULL;
-  copyoption = JCOPYOPT_DEFAULT;
-  transformoption.transform = JXFORM_NONE;
-  transformoption.trim = FALSE;
-  transformoption.force_grayscale = FALSE;
-  cinfo->err->trace_level = 0;
-
-  /* Scan command line options, adjust parameters */
-
-  for (argn = 1; argn < argc; argn++) {
-    arg = argv[argn];
-    if (*arg != '-') {
-      /* Not a switch, must be a file name argument */
-      if (argn <= last_file_arg_seen) {
-	outfilename = NULL;	/* -outfile applies to just one input file */
-	continue;		/* ignore this name if previously processed */
-      }
-      break;			/* else done parsing switches */
-    }
-    arg++;			/* advance past switch marker character */
-
-    if (keymatch(arg, "arithmetic", 1)) {
-      /* Use arithmetic coding. */
-#ifdef C_ARITH_CODING_SUPPORTED
-      cinfo->arith_code = TRUE;
-#else
-      fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "copy", 1)) {
-      /* Select which extra markers to copy. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "none", 1)) {
-	copyoption = JCOPYOPT_NONE;
-      } else if (keymatch(argv[argn], "comments", 1)) {
-	copyoption = JCOPYOPT_COMMENTS;
-      } else if (keymatch(argv[argn], "all", 1)) {
-	copyoption = JCOPYOPT_ALL;
-      } else
-	usage();
-
-    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
-      /* Enable debug printouts. */
-      /* On first -d, print version identification */
-      static boolean printed_version = FALSE;
-
-      if (! printed_version) {
-	fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",
-		JVERSION, JCOPYRIGHT);
-	printed_version = TRUE;
-      }
-      cinfo->err->trace_level++;
-
-    } else if (keymatch(arg, "flip", 1)) {
-      /* Mirror left-right or top-bottom. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "horizontal", 1))
-	select_transform(JXFORM_FLIP_H);
-      else if (keymatch(argv[argn], "vertical", 1))
-	select_transform(JXFORM_FLIP_V);
-      else
-	usage();
-
-    } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) {
-      /* Force to grayscale. */
-#if TRANSFORMS_SUPPORTED
-      transformoption.force_grayscale = TRUE;
-#else
-      select_transform(JXFORM_NONE);	/* force an error */
-#endif
-
-    } else if (keymatch(arg, "maxmemory", 3)) {
-      /* Maximum memory in Kb (or Mb with 'm'). */
-      long lval;
-      char ch = 'x';
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
-	usage();
-      if (ch == 'm' || ch == 'M')
-	lval *= 1000L;
-      cinfo->mem->max_memory_to_use = lval * 1000L;
-
-    } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
-      /* Enable entropy parm optimization. */
-#ifdef ENTROPY_OPT_SUPPORTED
-      cinfo->optimize_coding = TRUE;
-#else
-      fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "outfile", 4)) {
-      /* Set output file name. */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      outfilename = argv[argn];	/* save it away for later use */
-
-    } else if (keymatch(arg, "progressive", 1)) {
-      /* Select simple progressive mode. */
-#ifdef C_PROGRESSIVE_SUPPORTED
-      simple_progressive = TRUE;
-      /* We must postpone execution until num_components is known. */
-#else
-      fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "restart", 1)) {
-      /* Restart interval in MCU rows (or in MCUs with 'b'). */
-      long lval;
-      char ch = 'x';
-
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
-	usage();
-      if (lval < 0 || lval > 65535L)
-	usage();
-      if (ch == 'b' || ch == 'B') {
-	cinfo->restart_interval = (unsigned int) lval;
-	cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
-      } else {
-	cinfo->restart_in_rows = (int) lval;
-	/* restart_interval will be computed during startup */
-      }
-
-    } else if (keymatch(arg, "rotate", 2)) {
-      /* Rotate 90, 180, or 270 degrees (measured clockwise). */
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      if (keymatch(argv[argn], "90", 2))
-	select_transform(JXFORM_ROT_90);
-      else if (keymatch(argv[argn], "180", 3))
-	select_transform(JXFORM_ROT_180);
-      else if (keymatch(argv[argn], "270", 3))
-	select_transform(JXFORM_ROT_270);
-      else
-	usage();
-
-    } else if (keymatch(arg, "scans", 1)) {
-      /* Set scan script. */
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-      if (++argn >= argc)	/* advance to next argument */
-	usage();
-      scansarg = argv[argn];
-      /* We must postpone reading the file in case -progressive appears. */
-#else
-      fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
-	      progname);
-      exit(EXIT_FAILURE);
-#endif
-
-    } else if (keymatch(arg, "transpose", 1)) {
-      /* Transpose (across UL-to-LR axis). */
-      select_transform(JXFORM_TRANSPOSE);
-
-    } else if (keymatch(arg, "transverse", 6)) {
-      /* Transverse transpose (across UR-to-LL axis). */
-      select_transform(JXFORM_TRANSVERSE);
-
-    } else if (keymatch(arg, "trim", 3)) {
-      /* Trim off any partial edge MCUs that the transform can't handle. */
-      transformoption.trim = TRUE;
-
-    } else {
-      usage();			/* bogus switch */
-    }
-  }
-
-  /* Post-switch-scanning cleanup */
-
-  if (for_real) {
-
-#ifdef C_PROGRESSIVE_SUPPORTED
-    if (simple_progressive)	/* process -progressive; -scans can override */
-      jpeg_simple_progression(cinfo);
-#endif
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-    if (scansarg != NULL)	/* process -scans if it was present */
-      if (! read_scan_script(cinfo, scansarg))
-	usage();
-#endif
-  }
-
-  return argn;			/* return index of next arg (file name) */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
-  struct jpeg_decompress_struct srcinfo;
-  struct jpeg_compress_struct dstinfo;
-  struct jpeg_error_mgr jsrcerr, jdsterr;
-#ifdef PROGRESS_REPORT
-  struct cdjpeg_progress_mgr progress;
-#endif
-  jvirt_barray_ptr * src_coef_arrays;
-  jvirt_barray_ptr * dst_coef_arrays;
-  int file_index;
-  FILE * input_file;
-  FILE * output_file;
-
-  /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
-  argc = ccommand(&argv);
-#endif
-
-  progname = argv[0];
-  if (progname == NULL || progname[0] == 0)
-    progname = "jpegtran";	/* in case C library doesn't provide it */
-
-  /* Initialize the JPEG decompression object with default error handling. */
-  srcinfo.err = jpeg_std_error(&jsrcerr);
-  jpeg_create_decompress(&srcinfo);
-  /* Initialize the JPEG compression object with default error handling. */
-  dstinfo.err = jpeg_std_error(&jdsterr);
-  jpeg_create_compress(&dstinfo);
-
-  /* Now safe to enable signal catcher.
-   * Note: we assume only the decompression object will have virtual arrays.
-   */
-#ifdef NEED_SIGNAL_CATCHER
-  enable_signal_catcher((j_common_ptr) &srcinfo);
-#endif
-
-  /* Scan command line to find file names.
-   * It is convenient to use just one switch-parsing routine, but the switch
-   * values read here are mostly ignored; we will rescan the switches after
-   * opening the input file.  Also note that most of the switches affect the
-   * destination JPEG object, so we parse into that and then copy over what
-   * needs to affects the source too.
-   */
-
-  file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE);
-  jsrcerr.trace_level = jdsterr.trace_level;
-  srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use;
-
-#ifdef TWO_FILE_COMMANDLINE
-  /* Must have either -outfile switch or explicit output file name */
-  if (outfilename == NULL) {
-    if (file_index != argc-2) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-    outfilename = argv[file_index+1];
-  } else {
-    if (file_index != argc-1) {
-      fprintf(stderr, "%s: must name one input and one output file\n",
-	      progname);
-      usage();
-    }
-  }
-#else
-  /* Unix style: expect zero or one file name */
-  if (file_index < argc-1) {
-    fprintf(stderr, "%s: only one input file\n", progname);
-    usage();
-  }
-#endif /* TWO_FILE_COMMANDLINE */
-
-  /* Open the input file. */
-  if (file_index < argc) {
-    if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default input file is stdin */
-    input_file = read_stdin();
-  }
-
-  /* Open the output file. */
-  if (outfilename != NULL) {
-    if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default output file is stdout */
-    output_file = write_stdout();
-  }
-
-#ifdef PROGRESS_REPORT
-  start_progress_monitor((j_common_ptr) &dstinfo, &progress);
-#endif
-
-  /* Specify data source for decompression */
-  jpeg_stdio_src(&srcinfo, input_file);
-
-  /* Enable saving of extra markers that we want to copy */
-  jcopy_markers_setup(&srcinfo, copyoption);
-
-  /* Read file header */
-  (void) jpeg_read_header(&srcinfo, TRUE);
-
-  /* Any space needed by a transform option must be requested before
-   * jpeg_read_coefficients so that memory allocation will be done right.
-   */
-#if TRANSFORMS_SUPPORTED
-  jtransform_request_workspace(&srcinfo, &transformoption);
-#endif
-
-  /* Read source file as DCT coefficients */
-  src_coef_arrays = jpeg_read_coefficients(&srcinfo);
-
-  /* Initialize destination compression parameters from source values */
-  jpeg_copy_critical_parameters(&srcinfo, &dstinfo);
-
-  /* Adjust destination parameters if required by transform options;
-   * also find out which set of coefficient arrays will hold the output.
-   */
-#if TRANSFORMS_SUPPORTED
-  dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo,
-						 src_coef_arrays,
-						 &transformoption);
-#else
-  dst_coef_arrays = src_coef_arrays;
-#endif
-
-  /* Adjust default compression parameters by re-parsing the options */
-  file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE);
-
-  /* Specify data destination for compression */
-  jpeg_stdio_dest(&dstinfo, output_file);
-
-  /* Start compressor (note no image data is actually written here) */
-  jpeg_write_coefficients(&dstinfo, dst_coef_arrays);
-
-  /* Copy to the output file any extra markers that we want to preserve */
-  jcopy_markers_execute(&srcinfo, &dstinfo, copyoption);
-
-  /* Execute image transformation, if any */
-#if TRANSFORMS_SUPPORTED
-  jtransform_execute_transformation(&srcinfo, &dstinfo,
-				    src_coef_arrays,
-				    &transformoption);
-#endif
-
-  /* Finish compression and release memory */
-  jpeg_finish_compress(&dstinfo);
-  jpeg_destroy_compress(&dstinfo);
-  (void) jpeg_finish_decompress(&srcinfo);
-  jpeg_destroy_decompress(&srcinfo);
-
-  /* Close files, if we opened them */
-  if (input_file != stdin)
-    fclose(input_file);
-  if (output_file != stdout)
-    fclose(output_file);
-
-#ifdef PROGRESS_REPORT
-  end_progress_monitor((j_common_ptr) &dstinfo);
-#endif
-
-  /* All done. */
-  exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS);
-  return 0;			/* suppress no-return-value warnings */
-}
diff --git a/tkimg1.3/libjpeg/jquant1.c b/tkimg1.3/libjpeg/jquant1.c
deleted file mode 100644
index b2f96aa..0000000
--- a/tkimg1.3/libjpeg/jquant1.c
+++ /dev/null
@@ -1,856 +0,0 @@
-/*
- * jquant1.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains 1-pass color quantization (color mapping) routines.
- * These routines provide mapping to a fixed color map using equally spaced
- * color values.  Optional Floyd-Steinberg or ordered dithering is available.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-#ifdef QUANT_1PASS_SUPPORTED
-
-
-/*
- * The main purpose of 1-pass quantization is to provide a fast, if not very
- * high quality, colormapped output capability.  A 2-pass quantizer usually
- * gives better visual quality; however, for quantized grayscale output this
- * quantizer is perfectly adequate.  Dithering is highly recommended with this
- * quantizer, though you can turn it off if you really want to.
- *
- * In 1-pass quantization the colormap must be chosen in advance of seeing the
- * image.  We use a map consisting of all combinations of Ncolors[i] color
- * values for the i'th component.  The Ncolors[] values are chosen so that
- * their product, the total number of colors, is no more than that requested.
- * (In most cases, the product will be somewhat less.)
- *
- * Since the colormap is orthogonal, the representative value for each color
- * component can be determined without considering the other components;
- * then these indexes can be combined into a colormap index by a standard
- * N-dimensional-array-subscript calculation.  Most of the arithmetic involved
- * can be precalculated and stored in the lookup table colorindex[].
- * colorindex[i][j] maps pixel value j in component i to the nearest
- * representative value (grid plane) for that component; this index is
- * multiplied by the array stride for component i, so that the
- * index of the colormap entry closest to a given pixel value is just
- *    sum( colorindex[component-number][pixel-component-value] )
- * Aside from being fast, this scheme allows for variable spacing between
- * representative values with no additional lookup cost.
- *
- * If gamma correction has been applied in color conversion, it might be wise
- * to adjust the color grid spacing so that the representative colors are
- * equidistant in linear space.  At this writing, gamma correction is not
- * implemented by jdcolor, so nothing is done here.
- */
-
-
-/* Declarations for ordered dithering.
- *
- * We use a standard 16x16 ordered dither array.  The basic concept of ordered
- * dithering is described in many references, for instance Dale Schumacher's
- * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991).
- * In place of Schumacher's comparisons against a "threshold" value, we add a
- * "dither" value to the input pixel and then round the result to the nearest
- * output value.  The dither value is equivalent to (0.5 - threshold) times
- * the distance between output values.  For ordered dithering, we assume that
- * the output colors are equally spaced; if not, results will probably be
- * worse, since the dither may be too much or too little at a given point.
- *
- * The normal calculation would be to form pixel value + dither, range-limit
- * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual.
- * We can skip the separate range-limiting step by extending the colorindex
- * table in both directions.
- */
-
-#define ODITHER_SIZE  16	/* dimension of dither matrix */
-/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */
-#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE)	/* # cells in matrix */
-#define ODITHER_MASK  (ODITHER_SIZE-1) /* mask for wrapping around counters */
-
-typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE];
-typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE];
-
-static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = {
-  /* Bayer's order-4 dither array.  Generated by the code given in
-   * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I.
-   * The values in this array must range from 0 to ODITHER_CELLS-1.
-   */
-  {   0,192, 48,240, 12,204, 60,252,  3,195, 51,243, 15,207, 63,255 },
-  { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 },
-  {  32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 },
-  { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 },
-  {   8,200, 56,248,  4,196, 52,244, 11,203, 59,251,  7,199, 55,247 },
-  { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 },
-  {  40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 },
-  { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 },
-  {   2,194, 50,242, 14,206, 62,254,  1,193, 49,241, 13,205, 61,253 },
-  { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 },
-  {  34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 },
-  { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 },
-  {  10,202, 58,250,  6,198, 54,246,  9,201, 57,249,  5,197, 53,245 },
-  { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 },
-  {  42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 },
-  { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 }
-};
-
-
-/* Declarations for Floyd-Steinberg dithering.
- *
- * Errors are accumulated into the array fserrors[], at a resolution of
- * 1/16th of a pixel count.  The error at a given pixel is propagated
- * to its not-yet-processed neighbors using the standard F-S fractions,
- *		...	(here)	7/16
- *		3/16	5/16	1/16
- * We work left-to-right on even rows, right-to-left on odd rows.
- *
- * We can get away with a single array (holding one row's worth of errors)
- * by using it to store the current row's errors at pixel columns not yet
- * processed, but the next row's errors at columns already processed.  We
- * need only a few extra variables to hold the errors immediately around the
- * current column.  (If we are lucky, those variables are in registers, but
- * even if not, they're probably cheaper to access than array elements are.)
- *
- * The fserrors[] array is indexed [component#][position].
- * We provide (#columns + 2) entries per component; the extra entry at each
- * end saves us from special-casing the first and last pixels.
- *
- * Note: on a wide image, we might not have enough room in a PC's near data
- * segment to hold the error array; so it is allocated with alloc_large.
- */
-
-#if BITS_IN_JSAMPLE == 8
-typedef INT16 FSERROR;		/* 16 bits should be enough */
-typedef int LOCFSERROR;		/* use 'int' for calculation temps */
-#else
-typedef INT32 FSERROR;		/* may need more than 16 bits */
-typedef INT32 LOCFSERROR;	/* be sure calculation temps are big enough */
-#endif
-
-typedef FSERROR FAR *FSERRPTR;	/* pointer to error array (in FAR storage!) */
-
-
-/* Private subobject */
-
-#define MAX_Q_COMPS 4		/* max components I can handle */
-
-typedef struct {
-  struct jpeg_color_quantizer pub; /* public fields */
-
-  /* Initially allocated colormap is saved here */
-  JSAMPARRAY sv_colormap;	/* The color map as a 2-D pixel array */
-  int sv_actual;		/* number of entries in use */
-
-  JSAMPARRAY colorindex;	/* Precomputed mapping for speed */
-  /* colorindex[i][j] = index of color closest to pixel value j in component i,
-   * premultiplied as described above.  Since colormap indexes must fit into
-   * JSAMPLEs, the entries of this array will too.
-   */
-  boolean is_padded;		/* is the colorindex padded for odither? */
-
-  int Ncolors[MAX_Q_COMPS];	/* # of values alloced to each component */
-
-  /* Variables for ordered dithering */
-  int row_index;		/* cur row's vertical index in dither matrix */
-  ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */
-
-  /* Variables for Floyd-Steinberg dithering */
-  FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
-  boolean on_odd_row;		/* flag to remember which row we are on */
-} my_cquantizer;
-
-typedef my_cquantizer * my_cquantize_ptr;
-
-
-/*
- * Policy-making subroutines for create_colormap and create_colorindex.
- * These routines determine the colormap to be used.  The rest of the module
- * only assumes that the colormap is orthogonal.
- *
- *  * select_ncolors decides how to divvy up the available colors
- *    among the components.
- *  * output_value defines the set of representative values for a component.
- *  * largest_input_value defines the mapping from input values to
- *    representative values for a component.
- * Note that the latter two routines may impose different policies for
- * different components, though this is not currently done.
- */
-
-
-LOCAL(int)
-select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
-/* Determine allocation of desired colors to components, */
-/* and fill in Ncolors[] array to indicate choice. */
-/* Return value is total number of colors (product of Ncolors[] values). */
-{
-  int nc = cinfo->out_color_components; /* number of color components */
-  int max_colors = cinfo->desired_number_of_colors;
-  int total_colors, iroot, i, j;
-  boolean changed;
-  long temp;
-  static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
-
-  /* We can allocate at least the nc'th root of max_colors per component. */
-  /* Compute floor(nc'th root of max_colors). */
-  iroot = 1;
-  do {
-    iroot++;
-    temp = iroot;		/* set temp = iroot ** nc */
-    for (i = 1; i < nc; i++)
-      temp *= iroot;
-  } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */
-  iroot--;			/* now iroot = floor(root) */
-
-  /* Must have at least 2 color values per component */
-  if (iroot < 2)
-    ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp);
-
-  /* Initialize to iroot color values for each component */
-  total_colors = 1;
-  for (i = 0; i < nc; i++) {
-    Ncolors[i] = iroot;
-    total_colors *= iroot;
-  }
-  /* We may be able to increment the count for one or more components without
-   * exceeding max_colors, though we know not all can be incremented.
-   * Sometimes, the first component can be incremented more than once!
-   * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.)
-   * In RGB colorspace, try to increment G first, then R, then B.
-   */
-  do {
-    changed = FALSE;
-    for (i = 0; i < nc; i++) {
-      j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i);
-      /* calculate new total_colors if Ncolors[j] is incremented */
-      temp = total_colors / Ncolors[j];
-      temp *= Ncolors[j]+1;	/* done in long arith to avoid oflo */
-      if (temp > (long) max_colors)
-	break;			/* won't fit, done with this pass */
-      Ncolors[j]++;		/* OK, apply the increment */
-      total_colors = (int) temp;
-      changed = TRUE;
-    }
-  } while (changed);
-
-  return total_colors;
-}
-
-
-LOCAL(int)
-output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
-/* Return j'th output value, where j will range from 0 to maxj */
-/* The output values must fall in 0..MAXJSAMPLE in increasing order */
-{
-  /* We always provide values 0 and MAXJSAMPLE for each component;
-   * any additional values are equally spaced between these limits.
-   * (Forcing the upper and lower values to the limits ensures that
-   * dithering can't produce a color outside the selected gamut.)
-   */
-  return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj);
-}
-
-
-LOCAL(int)
-largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
-/* Return largest input value that should map to j'th output value */
-/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
-{
-  /* Breakpoints are halfway between values returned by output_value */
-  return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
-}
-
-
-/*
- * Create the colormap.
- */
-
-LOCAL(void)
-create_colormap (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  JSAMPARRAY colormap;		/* Created colormap */
-  int total_colors;		/* Number of distinct output colors */
-  int i,j,k, nci, blksize, blkdist, ptr, val;
-
-  /* Select number of colors for each component */
-  total_colors = select_ncolors(cinfo, cquantize->Ncolors);
-
-  /* Report selected color counts */
-  if (cinfo->out_color_components == 3)
-    TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,
-	     total_colors, cquantize->Ncolors[0],
-	     cquantize->Ncolors[1], cquantize->Ncolors[2]);
-  else
-    TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);
-
-  /* Allocate and fill in the colormap. */
-  /* The colors are ordered in the map in standard row-major order, */
-  /* i.e. rightmost (highest-indexed) color changes most rapidly. */
-
-  colormap = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE,
-     (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);
-
-  /* blksize is number of adjacent repeated entries for a component */
-  /* blkdist is distance between groups of identical entries for a component */
-  blkdist = total_colors;
-
-  for (i = 0; i < cinfo->out_color_components; i++) {
-    /* fill in colormap entries for i'th color component */
-    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
-    blksize = blkdist / nci;
-    for (j = 0; j < nci; j++) {
-      /* Compute j'th output value (out of nci) for component */
-      val = output_value(cinfo, i, j, nci-1);
-      /* Fill in all colormap entries that have this value of this component */
-      for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) {
-	/* fill in blksize entries beginning at ptr */
-	for (k = 0; k < blksize; k++)
-	  colormap[i][ptr+k] = (JSAMPLE) val;
-      }
-    }
-    blkdist = blksize;		/* blksize of this color is blkdist of next */
-  }
-
-  /* Save the colormap in private storage,
-   * where it will survive color quantization mode changes.
-   */
-  cquantize->sv_colormap = colormap;
-  cquantize->sv_actual = total_colors;
-}
-
-
-/*
- * Create the color index table.
- */
-
-LOCAL(void)
-create_colorindex (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  JSAMPROW indexptr;
-  int i,j,k, nci, blksize, val, pad;
-
-  /* For ordered dither, we pad the color index tables by MAXJSAMPLE in
-   * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE).
-   * This is not necessary in the other dithering modes.  However, we
-   * flag whether it was done in case user changes dithering mode.
-   */
-  if (cinfo->dither_mode == JDITHER_ORDERED) {
-    pad = MAXJSAMPLE*2;
-    cquantize->is_padded = TRUE;
-  } else {
-    pad = 0;
-    cquantize->is_padded = FALSE;
-  }
-
-  cquantize->colorindex = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE,
-     (JDIMENSION) (MAXJSAMPLE+1 + pad),
-     (JDIMENSION) cinfo->out_color_components);
-
-  /* blksize is number of adjacent repeated entries for a component */
-  blksize = cquantize->sv_actual;
-
-  for (i = 0; i < cinfo->out_color_components; i++) {
-    /* fill in colorindex entries for i'th color component */
-    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
-    blksize = blksize / nci;
-
-    /* adjust colorindex pointers to provide padding at negative indexes. */
-    if (pad)
-      cquantize->colorindex[i] += MAXJSAMPLE;
-
-    /* in loop, val = index of current output value, */
-    /* and k = largest j that maps to current val */
-    indexptr = cquantize->colorindex[i];
-    val = 0;
-    k = largest_input_value(cinfo, i, 0, nci-1);
-    for (j = 0; j <= MAXJSAMPLE; j++) {
-      while (j > k)		/* advance val if past boundary */
-	k = largest_input_value(cinfo, i, ++val, nci-1);
-      /* premultiply so that no multiplication needed in main processing */
-      indexptr[j] = (JSAMPLE) (val * blksize);
-    }
-    /* Pad at both ends if necessary */
-    if (pad)
-      for (j = 1; j <= MAXJSAMPLE; j++) {
-	indexptr[-j] = indexptr[0];
-	indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE];
-      }
-  }
-}
-
-
-/*
- * Create an ordered-dither array for a component having ncolors
- * distinct output values.
- */
-
-LOCAL(ODITHER_MATRIX_PTR)
-make_odither_array (j_decompress_ptr cinfo, int ncolors)
-{
-  ODITHER_MATRIX_PTR odither;
-  int j,k;
-  INT32 num,den;
-
-  odither = (ODITHER_MATRIX_PTR)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(ODITHER_MATRIX));
-  /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1).
-   * Hence the dither value for the matrix cell with fill order f
-   * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1).
-   * On 16-bit-int machine, be careful to avoid overflow.
-   */
-  den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1));
-  for (j = 0; j < ODITHER_SIZE; j++) {
-    for (k = 0; k < ODITHER_SIZE; k++) {
-      num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k])))
-	    * MAXJSAMPLE;
-      /* Ensure round towards zero despite C's lack of consistency
-       * about rounding negative values in integer division...
-       */
-      odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den);
-    }
-  }
-  return odither;
-}
-
-
-/*
- * Create the ordered-dither tables.
- * Components having the same number of representative colors may 
- * share a dither table.
- */
-
-LOCAL(void)
-create_odither_tables (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  ODITHER_MATRIX_PTR odither;
-  int i, j, nci;
-
-  for (i = 0; i < cinfo->out_color_components; i++) {
-    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */
-    odither = NULL;		/* search for matching prior component */
-    for (j = 0; j < i; j++) {
-      if (nci == cquantize->Ncolors[j]) {
-	odither = cquantize->odither[j];
-	break;
-      }
-    }
-    if (odither == NULL)	/* need a new table? */
-      odither = make_odither_array(cinfo, nci);
-    cquantize->odither[i] = odither;
-  }
-}
-
-
-/*
- * Map some rows of pixels to the output colormapped representation.
- */
-
-METHODDEF(void)
-color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		JSAMPARRAY output_buf, int num_rows)
-/* General case, no dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  JSAMPARRAY colorindex = cquantize->colorindex;
-  register int pixcode, ci;
-  register JSAMPROW ptrin, ptrout;
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-  register int nc = cinfo->out_color_components;
-
-  for (row = 0; row < num_rows; row++) {
-    ptrin = input_buf[row];
-    ptrout = output_buf[row];
-    for (col = width; col > 0; col--) {
-      pixcode = 0;
-      for (ci = 0; ci < nc; ci++) {
-	pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]);
-      }
-      *ptrout++ = (JSAMPLE) pixcode;
-    }
-  }
-}
-
-
-METHODDEF(void)
-color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		 JSAMPARRAY output_buf, int num_rows)
-/* Fast path for out_color_components==3, no dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register int pixcode;
-  register JSAMPROW ptrin, ptrout;
-  JSAMPROW colorindex0 = cquantize->colorindex[0];
-  JSAMPROW colorindex1 = cquantize->colorindex[1];
-  JSAMPROW colorindex2 = cquantize->colorindex[2];
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-
-  for (row = 0; row < num_rows; row++) {
-    ptrin = input_buf[row];
-    ptrout = output_buf[row];
-    for (col = width; col > 0; col--) {
-      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]);
-      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]);
-      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]);
-      *ptrout++ = (JSAMPLE) pixcode;
-    }
-  }
-}
-
-
-METHODDEF(void)
-quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		     JSAMPARRAY output_buf, int num_rows)
-/* General case, with ordered dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
-  JSAMPROW colorindex_ci;
-  int * dither;			/* points to active row of dither matrix */
-  int row_index, col_index;	/* current indexes into dither matrix */
-  int nc = cinfo->out_color_components;
-  int ci;
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-
-  for (row = 0; row < num_rows; row++) {
-    /* Initialize output values to 0 so can process components separately */
-    jzero_far((void FAR *) output_buf[row],
-	      (size_t) (width * SIZEOF(JSAMPLE)));
-    row_index = cquantize->row_index;
-    for (ci = 0; ci < nc; ci++) {
-      input_ptr = input_buf[row] + ci;
-      output_ptr = output_buf[row];
-      colorindex_ci = cquantize->colorindex[ci];
-      dither = cquantize->odither[ci][row_index];
-      col_index = 0;
-
-      for (col = width; col > 0; col--) {
-	/* Form pixel value + dither, range-limit to 0..MAXJSAMPLE,
-	 * select output value, accumulate into output code for this pixel.
-	 * Range-limiting need not be done explicitly, as we have extended
-	 * the colorindex table to produce the right answers for out-of-range
-	 * inputs.  The maximum dither is +- MAXJSAMPLE; this sets the
-	 * required amount of padding.
-	 */
-	*output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]];
-	input_ptr += nc;
-	output_ptr++;
-	col_index = (col_index + 1) & ODITHER_MASK;
-      }
-    }
-    /* Advance row index for next row */
-    row_index = (row_index + 1) & ODITHER_MASK;
-    cquantize->row_index = row_index;
-  }
-}
-
-
-METHODDEF(void)
-quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		      JSAMPARRAY output_buf, int num_rows)
-/* Fast path for out_color_components==3, with ordered dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register int pixcode;
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
-  JSAMPROW colorindex0 = cquantize->colorindex[0];
-  JSAMPROW colorindex1 = cquantize->colorindex[1];
-  JSAMPROW colorindex2 = cquantize->colorindex[2];
-  int * dither0;		/* points to active row of dither matrix */
-  int * dither1;
-  int * dither2;
-  int row_index, col_index;	/* current indexes into dither matrix */
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-
-  for (row = 0; row < num_rows; row++) {
-    row_index = cquantize->row_index;
-    input_ptr = input_buf[row];
-    output_ptr = output_buf[row];
-    dither0 = cquantize->odither[0][row_index];
-    dither1 = cquantize->odither[1][row_index];
-    dither2 = cquantize->odither[2][row_index];
-    col_index = 0;
-
-    for (col = width; col > 0; col--) {
-      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) +
-					dither0[col_index]]);
-      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) +
-					dither1[col_index]]);
-      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) +
-					dither2[col_index]]);
-      *output_ptr++ = (JSAMPLE) pixcode;
-      col_index = (col_index + 1) & ODITHER_MASK;
-    }
-    row_index = (row_index + 1) & ODITHER_MASK;
-    cquantize->row_index = row_index;
-  }
-}
-
-
-METHODDEF(void)
-quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		    JSAMPARRAY output_buf, int num_rows)
-/* General case, with Floyd-Steinberg dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register LOCFSERROR cur;	/* current error or pixel value */
-  LOCFSERROR belowerr;		/* error for pixel below cur */
-  LOCFSERROR bpreverr;		/* error for below/prev col */
-  LOCFSERROR bnexterr;		/* error for below/next col */
-  LOCFSERROR delta;
-  register FSERRPTR errorptr;	/* => fserrors[] at column before current */
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
-  JSAMPROW colorindex_ci;
-  JSAMPROW colormap_ci;
-  int pixcode;
-  int nc = cinfo->out_color_components;
-  int dir;			/* 1 for left-to-right, -1 for right-to-left */
-  int dirnc;			/* dir * nc */
-  int ci;
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-  JSAMPLE *range_limit = cinfo->sample_range_limit;
-  SHIFT_TEMPS
-
-  for (row = 0; row < num_rows; row++) {
-    /* Initialize output values to 0 so can process components separately */
-    jzero_far((void FAR *) output_buf[row],
-	      (size_t) (width * SIZEOF(JSAMPLE)));
-    for (ci = 0; ci < nc; ci++) {
-      input_ptr = input_buf[row] + ci;
-      output_ptr = output_buf[row];
-      if (cquantize->on_odd_row) {
-	/* work right to left in this row */
-	input_ptr += (width-1) * nc; /* so point to rightmost pixel */
-	output_ptr += width-1;
-	dir = -1;
-	dirnc = -nc;
-	errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */
-      } else {
-	/* work left to right in this row */
-	dir = 1;
-	dirnc = nc;
-	errorptr = cquantize->fserrors[ci]; /* => entry before first column */
-      }
-      colorindex_ci = cquantize->colorindex[ci];
-      colormap_ci = cquantize->sv_colormap[ci];
-      /* Preset error values: no error propagated to first pixel from left */
-      cur = 0;
-      /* and no error propagated to row below yet */
-      belowerr = bpreverr = 0;
-
-      for (col = width; col > 0; col--) {
-	/* cur holds the error propagated from the previous pixel on the
-	 * current line.  Add the error propagated from the previous line
-	 * to form the complete error correction term for this pixel, and
-	 * round the error term (which is expressed * 16) to an integer.
-	 * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct
-	 * for either sign of the error value.
-	 * Note: errorptr points to *previous* column's array entry.
-	 */
-	cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4);
-	/* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.
-	 * The maximum error is +- MAXJSAMPLE; this sets the required size
-	 * of the range_limit array.
-	 */
-	cur += GETJSAMPLE(*input_ptr);
-	cur = GETJSAMPLE(range_limit[cur]);
-	/* Select output value, accumulate into output code for this pixel */
-	pixcode = GETJSAMPLE(colorindex_ci[cur]);
-	*output_ptr += (JSAMPLE) pixcode;
-	/* Compute actual representation error at this pixel */
-	/* Note: we can do this even though we don't have the final */
-	/* pixel code, because the colormap is orthogonal. */
-	cur -= GETJSAMPLE(colormap_ci[pixcode]);
-	/* Compute error fractions to be propagated to adjacent pixels.
-	 * Add these into the running sums, and simultaneously shift the
-	 * next-line error sums left by 1 column.
-	 */
-	bnexterr = cur;
-	delta = cur * 2;
-	cur += delta;		/* form error * 3 */
-	errorptr[0] = (FSERROR) (bpreverr + cur);
-	cur += delta;		/* form error * 5 */
-	bpreverr = belowerr + cur;
-	belowerr = bnexterr;
-	cur += delta;		/* form error * 7 */
-	/* At this point cur contains the 7/16 error value to be propagated
-	 * to the next pixel on the current line, and all the errors for the
-	 * next line have been shifted over. We are therefore ready to move on.
-	 */
-	input_ptr += dirnc;	/* advance input ptr to next column */
-	output_ptr += dir;	/* advance output ptr to next column */
-	errorptr += dir;	/* advance errorptr to current column */
-      }
-      /* Post-loop cleanup: we must unload the final error value into the
-       * final fserrors[] entry.  Note we need not unload belowerr because
-       * it is for the dummy column before or after the actual array.
-       */
-      errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */
-    }
-    cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE);
-  }
-}
-
-
-/*
- * Allocate workspace for Floyd-Steinberg errors.
- */
-
-LOCAL(void)
-alloc_fs_workspace (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  size_t arraysize;
-  int i;
-
-  arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
-  for (i = 0; i < cinfo->out_color_components; i++) {
-    cquantize->fserrors[i] = (FSERRPTR)
-      (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
-  }
-}
-
-
-/*
- * Initialize for one-pass color quantization.
- */
-
-METHODDEF(void)
-start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  size_t arraysize;
-  int i;
-
-  /* Install my colormap. */
-  cinfo->colormap = cquantize->sv_colormap;
-  cinfo->actual_number_of_colors = cquantize->sv_actual;
-
-  /* Initialize for desired dithering mode. */
-  switch (cinfo->dither_mode) {
-  case JDITHER_NONE:
-    if (cinfo->out_color_components == 3)
-      cquantize->pub.color_quantize = color_quantize3;
-    else
-      cquantize->pub.color_quantize = color_quantize;
-    break;
-  case JDITHER_ORDERED:
-    if (cinfo->out_color_components == 3)
-      cquantize->pub.color_quantize = quantize3_ord_dither;
-    else
-      cquantize->pub.color_quantize = quantize_ord_dither;
-    cquantize->row_index = 0;	/* initialize state for ordered dither */
-    /* If user changed to ordered dither from another mode,
-     * we must recreate the color index table with padding.
-     * This will cost extra space, but probably isn't very likely.
-     */
-    if (! cquantize->is_padded)
-      create_colorindex(cinfo);
-    /* Create ordered-dither tables if we didn't already. */
-    if (cquantize->odither[0] == NULL)
-      create_odither_tables(cinfo);
-    break;
-  case JDITHER_FS:
-    cquantize->pub.color_quantize = quantize_fs_dither;
-    cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */
-    /* Allocate Floyd-Steinberg workspace if didn't already. */
-    if (cquantize->fserrors[0] == NULL)
-      alloc_fs_workspace(cinfo);
-    /* Initialize the propagated errors to zero. */
-    arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
-    for (i = 0; i < cinfo->out_color_components; i++)
-      jzero_far((void FAR *) cquantize->fserrors[i], arraysize);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_NOT_COMPILED);
-    break;
-  }
-}
-
-
-/*
- * Finish up at the end of the pass.
- */
-
-METHODDEF(void)
-finish_pass_1_quant (j_decompress_ptr cinfo)
-{
-  /* no work in 1-pass case */
-}
-
-
-/*
- * Switch to a new external colormap between output passes.
- * Shouldn't get to this module!
- */
-
-METHODDEF(void)
-new_color_map_1_quant (j_decompress_ptr cinfo)
-{
-  ERREXIT(cinfo, JERR_MODE_CHANGE);
-}
-
-
-/*
- * Module initialization routine for 1-pass color quantization.
- */
-
-GLOBAL(void)
-jinit_1pass_quantizer (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize;
-
-  cquantize = (my_cquantize_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_cquantizer));
-  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
-  cquantize->pub.start_pass = start_pass_1_quant;
-  cquantize->pub.finish_pass = finish_pass_1_quant;
-  cquantize->pub.new_color_map = new_color_map_1_quant;
-  cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */
-  cquantize->odither[0] = NULL;	/* Also flag odither arrays not allocated */
-
-  /* Make sure my internal arrays won't overflow */
-  if (cinfo->out_color_components > MAX_Q_COMPS)
-    ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
-  /* Make sure colormap indexes can be represented by JSAMPLEs */
-  if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
-    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);
-
-  /* Create the colormap and color index table. */
-  create_colormap(cinfo);
-  create_colorindex(cinfo);
-
-  /* Allocate Floyd-Steinberg workspace now if requested.
-   * We do this now since it is FAR storage and may affect the memory
-   * manager's space calculations.  If the user changes to FS dither
-   * mode in a later pass, we will allocate the space then, and will
-   * possibly overrun the max_memory_to_use setting.
-   */
-  if (cinfo->dither_mode == JDITHER_FS)
-    alloc_fs_workspace(cinfo);
-}
-
-#endif /* QUANT_1PASS_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jquant2.c b/tkimg1.3/libjpeg/jquant2.c
deleted file mode 100644
index af601e3..0000000
--- a/tkimg1.3/libjpeg/jquant2.c
+++ /dev/null
@@ -1,1310 +0,0 @@
-/*
- * jquant2.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains 2-pass color quantization (color mapping) routines.
- * These routines provide selection of a custom color map for an image,
- * followed by mapping of the image to that color map, with optional
- * Floyd-Steinberg dithering.
- * It is also possible to use just the second pass to map to an arbitrary
- * externally-given color map.
- *
- * Note: ordered dithering is not supported, since there isn't any fast
- * way to compute intercolor distances; it's unclear that ordered dither's
- * fundamental assumptions even hold with an irregularly spaced color map.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-#ifdef QUANT_2PASS_SUPPORTED
-
-
-/*
- * This module implements the well-known Heckbert paradigm for color
- * quantization.  Most of the ideas used here can be traced back to
- * Heckbert's seminal paper
- *   Heckbert, Paul.  "Color Image Quantization for Frame Buffer Display",
- *   Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304.
- *
- * In the first pass over the image, we accumulate a histogram showing the
- * usage count of each possible color.  To keep the histogram to a reasonable
- * size, we reduce the precision of the input; typical practice is to retain
- * 5 or 6 bits per color, so that 8 or 4 different input values are counted
- * in the same histogram cell.
- *
- * Next, the color-selection step begins with a box representing the whole
- * color space, and repeatedly splits the "largest" remaining box until we
- * have as many boxes as desired colors.  Then the mean color in each
- * remaining box becomes one of the possible output colors.
- * 
- * The second pass over the image maps each input pixel to the closest output
- * color (optionally after applying a Floyd-Steinberg dithering correction).
- * This mapping is logically trivial, but making it go fast enough requires
- * considerable care.
- *
- * Heckbert-style quantizers vary a good deal in their policies for choosing
- * the "largest" box and deciding where to cut it.  The particular policies
- * used here have proved out well in experimental comparisons, but better ones
- * may yet be found.
- *
- * In earlier versions of the IJG code, this module quantized in YCbCr color
- * space, processing the raw upsampled data without a color conversion step.
- * This allowed the color conversion math to be done only once per colormap
- * entry, not once per pixel.  However, that optimization precluded other
- * useful optimizations (such as merging color conversion with upsampling)
- * and it also interfered with desired capabilities such as quantizing to an
- * externally-supplied colormap.  We have therefore abandoned that approach.
- * The present code works in the post-conversion color space, typically RGB.
- *
- * To improve the visual quality of the results, we actually work in scaled
- * RGB space, giving G distances more weight than R, and R in turn more than
- * B.  To do everything in integer math, we must use integer scale factors.
- * The 2/3/1 scale factors used here correspond loosely to the relative
- * weights of the colors in the NTSC grayscale equation.
- * If you want to use this code to quantize a non-RGB color space, you'll
- * probably need to change these scale factors.
- */
-
-#define R_SCALE 2		/* scale R distances by this much */
-#define G_SCALE 3		/* scale G distances by this much */
-#define B_SCALE 1		/* and B by this much */
-
-/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined
- * in jmorecfg.h.  As the code stands, it will do the right thing for R,G,B
- * and B,G,R orders.  If you define some other weird order in jmorecfg.h,
- * you'll get compile errors until you extend this logic.  In that case
- * you'll probably want to tweak the histogram sizes too.
- */
-
-#if RGB_RED == 0
-#define C0_SCALE R_SCALE
-#endif
-#if RGB_BLUE == 0
-#define C0_SCALE B_SCALE
-#endif
-#if RGB_GREEN == 1
-#define C1_SCALE G_SCALE
-#endif
-#if RGB_RED == 2
-#define C2_SCALE R_SCALE
-#endif
-#if RGB_BLUE == 2
-#define C2_SCALE B_SCALE
-#endif
-
-
-/*
- * First we have the histogram data structure and routines for creating it.
- *
- * The number of bits of precision can be adjusted by changing these symbols.
- * We recommend keeping 6 bits for G and 5 each for R and B.
- * If you have plenty of memory and cycles, 6 bits all around gives marginally
- * better results; if you are short of memory, 5 bits all around will save
- * some space but degrade the results.
- * To maintain a fully accurate histogram, we'd need to allocate a "long"
- * (preferably unsigned long) for each cell.  In practice this is overkill;
- * we can get by with 16 bits per cell.  Few of the cell counts will overflow,
- * and clamping those that do overflow to the maximum value will give close-
- * enough results.  This reduces the recommended histogram size from 256Kb
- * to 128Kb, which is a useful savings on PC-class machines.
- * (In the second pass the histogram space is re-used for pixel mapping data;
- * in that capacity, each cell must be able to store zero to the number of
- * desired colors.  16 bits/cell is plenty for that too.)
- * Since the JPEG code is intended to run in small memory model on 80x86
- * machines, we can't just allocate the histogram in one chunk.  Instead
- * of a true 3-D array, we use a row of pointers to 2-D arrays.  Each
- * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and
- * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries.  Note that
- * on 80x86 machines, the pointer row is in near memory but the actual
- * arrays are in far memory (same arrangement as we use for image arrays).
- */
-
-#define MAXNUMCOLORS  (MAXJSAMPLE+1) /* maximum size of colormap */
-
-/* These will do the right thing for either R,G,B or B,G,R color order,
- * but you may not like the results for other color orders.
- */
-#define HIST_C0_BITS  5		/* bits of precision in R/B histogram */
-#define HIST_C1_BITS  6		/* bits of precision in G histogram */
-#define HIST_C2_BITS  5		/* bits of precision in B/R histogram */
-
-/* Number of elements along histogram axes. */
-#define HIST_C0_ELEMS  (1<<HIST_C0_BITS)
-#define HIST_C1_ELEMS  (1<<HIST_C1_BITS)
-#define HIST_C2_ELEMS  (1<<HIST_C2_BITS)
-
-/* These are the amounts to shift an input value to get a histogram index. */
-#define C0_SHIFT  (BITS_IN_JSAMPLE-HIST_C0_BITS)
-#define C1_SHIFT  (BITS_IN_JSAMPLE-HIST_C1_BITS)
-#define C2_SHIFT  (BITS_IN_JSAMPLE-HIST_C2_BITS)
-
-
-typedef UINT16 histcell;	/* histogram cell; prefer an unsigned type */
-
-typedef histcell FAR * histptr;	/* for pointers to histogram cells */
-
-typedef histcell hist1d[HIST_C2_ELEMS]; /* typedefs for the array */
-typedef hist1d FAR * hist2d;	/* type for the 2nd-level pointers */
-typedef hist2d * hist3d;	/* type for top-level pointer */
-
-
-/* Declarations for Floyd-Steinberg dithering.
- *
- * Errors are accumulated into the array fserrors[], at a resolution of
- * 1/16th of a pixel count.  The error at a given pixel is propagated
- * to its not-yet-processed neighbors using the standard F-S fractions,
- *		...	(here)	7/16
- *		3/16	5/16	1/16
- * We work left-to-right on even rows, right-to-left on odd rows.
- *
- * We can get away with a single array (holding one row's worth of errors)
- * by using it to store the current row's errors at pixel columns not yet
- * processed, but the next row's errors at columns already processed.  We
- * need only a few extra variables to hold the errors immediately around the
- * current column.  (If we are lucky, those variables are in registers, but
- * even if not, they're probably cheaper to access than array elements are.)
- *
- * The fserrors[] array has (#columns + 2) entries; the extra entry at
- * each end saves us from special-casing the first and last pixels.
- * Each entry is three values long, one value for each color component.
- *
- * Note: on a wide image, we might not have enough room in a PC's near data
- * segment to hold the error array; so it is allocated with alloc_large.
- */
-
-#if BITS_IN_JSAMPLE == 8
-typedef INT16 FSERROR;		/* 16 bits should be enough */
-typedef int LOCFSERROR;		/* use 'int' for calculation temps */
-#else
-typedef INT32 FSERROR;		/* may need more than 16 bits */
-typedef INT32 LOCFSERROR;	/* be sure calculation temps are big enough */
-#endif
-
-typedef FSERROR FAR *FSERRPTR;	/* pointer to error array (in FAR storage!) */
-
-
-/* Private subobject */
-
-typedef struct {
-  struct jpeg_color_quantizer pub; /* public fields */
-
-  /* Space for the eventually created colormap is stashed here */
-  JSAMPARRAY sv_colormap;	/* colormap allocated at init time */
-  int desired;			/* desired # of colors = size of colormap */
-
-  /* Variables for accumulating image statistics */
-  hist3d histogram;		/* pointer to the histogram */
-
-  boolean needs_zeroed;		/* TRUE if next pass must zero histogram */
-
-  /* Variables for Floyd-Steinberg dithering */
-  FSERRPTR fserrors;		/* accumulated errors */
-  boolean on_odd_row;		/* flag to remember which row we are on */
-  int * error_limiter;		/* table for clamping the applied error */
-} my_cquantizer;
-
-typedef my_cquantizer * my_cquantize_ptr;
-
-
-/*
- * Prescan some rows of pixels.
- * In this module the prescan simply updates the histogram, which has been
- * initialized to zeroes by start_pass.
- * An output_buf parameter is required by the method signature, but no data
- * is actually output (in fact the buffer controller is probably passing a
- * NULL pointer).
- */
-
-METHODDEF(void)
-prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
-		  JSAMPARRAY output_buf, int num_rows)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register JSAMPROW ptr;
-  register histptr histp;
-  register hist3d histogram = cquantize->histogram;
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-
-  for (row = 0; row < num_rows; row++) {
-    ptr = input_buf[row];
-    for (col = width; col > 0; col--) {
-      /* get pixel value and index into the histogram */
-      histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT]
-			 [GETJSAMPLE(ptr[1]) >> C1_SHIFT]
-			 [GETJSAMPLE(ptr[2]) >> C2_SHIFT];
-      /* increment, check for overflow and undo increment if so. */
-      if (++(*histp) <= 0)
-	(*histp)--;
-      ptr += 3;
-    }
-  }
-}
-
-
-/*
- * Next we have the really interesting routines: selection of a colormap
- * given the completed histogram.
- * These routines work with a list of "boxes", each representing a rectangular
- * subset of the input color space (to histogram precision).
- */
-
-typedef struct {
-  /* The bounds of the box (inclusive); expressed as histogram indexes */
-  int c0min, c0max;
-  int c1min, c1max;
-  int c2min, c2max;
-  /* The volume (actually 2-norm) of the box */
-  INT32 volume;
-  /* The number of nonzero histogram cells within this box */
-  long colorcount;
-} box;
-
-typedef box * boxptr;
-
-
-LOCAL(boxptr)
-find_biggest_color_pop (boxptr boxlist, int numboxes)
-/* Find the splittable box with the largest color population */
-/* Returns NULL if no splittable boxes remain */
-{
-  register boxptr boxp;
-  register int i;
-  register long maxc = 0;
-  boxptr which = NULL;
-  
-  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
-    if (boxp->colorcount > maxc && boxp->volume > 0) {
-      which = boxp;
-      maxc = boxp->colorcount;
-    }
-  }
-  return which;
-}
-
-
-LOCAL(boxptr)
-find_biggest_volume (boxptr boxlist, int numboxes)
-/* Find the splittable box with the largest (scaled) volume */
-/* Returns NULL if no splittable boxes remain */
-{
-  register boxptr boxp;
-  register int i;
-  register INT32 maxv = 0;
-  boxptr which = NULL;
-  
-  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
-    if (boxp->volume > maxv) {
-      which = boxp;
-      maxv = boxp->volume;
-    }
-  }
-  return which;
-}
-
-
-LOCAL(void)
-update_box (j_decompress_ptr cinfo, boxptr boxp)
-/* Shrink the min/max bounds of a box to enclose only nonzero elements, */
-/* and recompute its volume and population */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  histptr histp;
-  int c0,c1,c2;
-  int c0min,c0max,c1min,c1max,c2min,c2max;
-  INT32 dist0,dist1,dist2;
-  long ccount;
-  
-  c0min = boxp->c0min;  c0max = boxp->c0max;
-  c1min = boxp->c1min;  c1max = boxp->c1max;
-  c2min = boxp->c2min;  c2max = boxp->c2max;
-  
-  if (c0max > c0min)
-    for (c0 = c0min; c0 <= c0max; c0++)
-      for (c1 = c1min; c1 <= c1max; c1++) {
-	histp = & histogram[c0][c1][c2min];
-	for (c2 = c2min; c2 <= c2max; c2++)
-	  if (*histp++ != 0) {
-	    boxp->c0min = c0min = c0;
-	    goto have_c0min;
-	  }
-      }
- have_c0min:
-  if (c0max > c0min)
-    for (c0 = c0max; c0 >= c0min; c0--)
-      for (c1 = c1min; c1 <= c1max; c1++) {
-	histp = & histogram[c0][c1][c2min];
-	for (c2 = c2min; c2 <= c2max; c2++)
-	  if (*histp++ != 0) {
-	    boxp->c0max = c0max = c0;
-	    goto have_c0max;
-	  }
-      }
- have_c0max:
-  if (c1max > c1min)
-    for (c1 = c1min; c1 <= c1max; c1++)
-      for (c0 = c0min; c0 <= c0max; c0++) {
-	histp = & histogram[c0][c1][c2min];
-	for (c2 = c2min; c2 <= c2max; c2++)
-	  if (*histp++ != 0) {
-	    boxp->c1min = c1min = c1;
-	    goto have_c1min;
-	  }
-      }
- have_c1min:
-  if (c1max > c1min)
-    for (c1 = c1max; c1 >= c1min; c1--)
-      for (c0 = c0min; c0 <= c0max; c0++) {
-	histp = & histogram[c0][c1][c2min];
-	for (c2 = c2min; c2 <= c2max; c2++)
-	  if (*histp++ != 0) {
-	    boxp->c1max = c1max = c1;
-	    goto have_c1max;
-	  }
-      }
- have_c1max:
-  if (c2max > c2min)
-    for (c2 = c2min; c2 <= c2max; c2++)
-      for (c0 = c0min; c0 <= c0max; c0++) {
-	histp = & histogram[c0][c1min][c2];
-	for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)
-	  if (*histp != 0) {
-	    boxp->c2min = c2min = c2;
-	    goto have_c2min;
-	  }
-      }
- have_c2min:
-  if (c2max > c2min)
-    for (c2 = c2max; c2 >= c2min; c2--)
-      for (c0 = c0min; c0 <= c0max; c0++) {
-	histp = & histogram[c0][c1min][c2];
-	for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)
-	  if (*histp != 0) {
-	    boxp->c2max = c2max = c2;
-	    goto have_c2max;
-	  }
-      }
- have_c2max:
-
-  /* Update box volume.
-   * We use 2-norm rather than real volume here; this biases the method
-   * against making long narrow boxes, and it has the side benefit that
-   * a box is splittable iff norm > 0.
-   * Since the differences are expressed in histogram-cell units,
-   * we have to shift back to JSAMPLE units to get consistent distances;
-   * after which, we scale according to the selected distance scale factors.
-   */
-  dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE;
-  dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE;
-  dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE;
-  boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2;
-  
-  /* Now scan remaining volume of box and compute population */
-  ccount = 0;
-  for (c0 = c0min; c0 <= c0max; c0++)
-    for (c1 = c1min; c1 <= c1max; c1++) {
-      histp = & histogram[c0][c1][c2min];
-      for (c2 = c2min; c2 <= c2max; c2++, histp++)
-	if (*histp != 0) {
-	  ccount++;
-	}
-    }
-  boxp->colorcount = ccount;
-}
-
-
-LOCAL(int)
-median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
-	    int desired_colors)
-/* Repeatedly select and split the largest box until we have enough boxes */
-{
-  int n,lb;
-  int c0,c1,c2,cmax;
-  register boxptr b1,b2;
-
-  while (numboxes < desired_colors) {
-    /* Select box to split.
-     * Current algorithm: by population for first half, then by volume.
-     */
-    if (numboxes*2 <= desired_colors) {
-      b1 = find_biggest_color_pop(boxlist, numboxes);
-    } else {
-      b1 = find_biggest_volume(boxlist, numboxes);
-    }
-    if (b1 == NULL)		/* no splittable boxes left! */
-      break;
-    b2 = &boxlist[numboxes];	/* where new box will go */
-    /* Copy the color bounds to the new box. */
-    b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max;
-    b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min;
-    /* Choose which axis to split the box on.
-     * Current algorithm: longest scaled axis.
-     * See notes in update_box about scaling distances.
-     */
-    c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE;
-    c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE;
-    c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE;
-    /* We want to break any ties in favor of green, then red, blue last.
-     * This code does the right thing for R,G,B or B,G,R color orders only.
-     */
-#if RGB_RED == 0
-    cmax = c1; n = 1;
-    if (c0 > cmax) { cmax = c0; n = 0; }
-    if (c2 > cmax) { n = 2; }
-#else
-    cmax = c1; n = 1;
-    if (c2 > cmax) { cmax = c2; n = 2; }
-    if (c0 > cmax) { n = 0; }
-#endif
-    /* Choose split point along selected axis, and update box bounds.
-     * Current algorithm: split at halfway point.
-     * (Since the box has been shrunk to minimum volume,
-     * any split will produce two nonempty subboxes.)
-     * Note that lb value is max for lower box, so must be < old max.
-     */
-    switch (n) {
-    case 0:
-      lb = (b1->c0max + b1->c0min) / 2;
-      b1->c0max = lb;
-      b2->c0min = lb+1;
-      break;
-    case 1:
-      lb = (b1->c1max + b1->c1min) / 2;
-      b1->c1max = lb;
-      b2->c1min = lb+1;
-      break;
-    case 2:
-      lb = (b1->c2max + b1->c2min) / 2;
-      b1->c2max = lb;
-      b2->c2min = lb+1;
-      break;
-    }
-    /* Update stats for boxes */
-    update_box(cinfo, b1);
-    update_box(cinfo, b2);
-    numboxes++;
-  }
-  return numboxes;
-}
-
-
-LOCAL(void)
-compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor)
-/* Compute representative color for a box, put it in colormap[icolor] */
-{
-  /* Current algorithm: mean weighted by pixels (not colors) */
-  /* Note it is important to get the rounding correct! */
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  histptr histp;
-  int c0,c1,c2;
-  int c0min,c0max,c1min,c1max,c2min,c2max;
-  long count;
-  long total = 0;
-  long c0total = 0;
-  long c1total = 0;
-  long c2total = 0;
-  
-  c0min = boxp->c0min;  c0max = boxp->c0max;
-  c1min = boxp->c1min;  c1max = boxp->c1max;
-  c2min = boxp->c2min;  c2max = boxp->c2max;
-  
-  for (c0 = c0min; c0 <= c0max; c0++)
-    for (c1 = c1min; c1 <= c1max; c1++) {
-      histp = & histogram[c0][c1][c2min];
-      for (c2 = c2min; c2 <= c2max; c2++) {
-	if ((count = *histp++) != 0) {
-	  total += count;
-	  c0total += ((c0 << C0_SHIFT) + ((1<<C0_SHIFT)>>1)) * count;
-	  c1total += ((c1 << C1_SHIFT) + ((1<<C1_SHIFT)>>1)) * count;
-	  c2total += ((c2 << C2_SHIFT) + ((1<<C2_SHIFT)>>1)) * count;
-	}
-      }
-    }
-  
-  cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total);
-  cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total);
-  cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total);
-}
-
-
-LOCAL(void)
-select_colors (j_decompress_ptr cinfo, int desired_colors)
-/* Master routine for color selection */
-{
-  boxptr boxlist;
-  int numboxes;
-  int i;
-
-  /* Allocate workspace for box list */
-  boxlist = (boxptr) (*cinfo->mem->alloc_small)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box));
-  /* Initialize one box containing whole space */
-  numboxes = 1;
-  boxlist[0].c0min = 0;
-  boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT;
-  boxlist[0].c1min = 0;
-  boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT;
-  boxlist[0].c2min = 0;
-  boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT;
-  /* Shrink it to actually-used volume and set its statistics */
-  update_box(cinfo, & boxlist[0]);
-  /* Perform median-cut to produce final box list */
-  numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors);
-  /* Compute the representative color for each box, fill colormap */
-  for (i = 0; i < numboxes; i++)
-    compute_color(cinfo, & boxlist[i], i);
-  cinfo->actual_number_of_colors = numboxes;
-  TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes);
-}
-
-
-/*
- * These routines are concerned with the time-critical task of mapping input
- * colors to the nearest color in the selected colormap.
- *
- * We re-use the histogram space as an "inverse color map", essentially a
- * cache for the results of nearest-color searches.  All colors within a
- * histogram cell will be mapped to the same colormap entry, namely the one
- * closest to the cell's center.  This may not be quite the closest entry to
- * the actual input color, but it's almost as good.  A zero in the cache
- * indicates we haven't found the nearest color for that cell yet; the array
- * is cleared to zeroes before starting the mapping pass.  When we find the
- * nearest color for a cell, its colormap index plus one is recorded in the
- * cache for future use.  The pass2 scanning routines call fill_inverse_cmap
- * when they need to use an unfilled entry in the cache.
- *
- * Our method of efficiently finding nearest colors is based on the "locally
- * sorted search" idea described by Heckbert and on the incremental distance
- * calculation described by Spencer W. Thomas in chapter III.1 of Graphics
- * Gems II (James Arvo, ed.  Academic Press, 1991).  Thomas points out that
- * the distances from a given colormap entry to each cell of the histogram can
- * be computed quickly using an incremental method: the differences between
- * distances to adjacent cells themselves differ by a constant.  This allows a
- * fairly fast implementation of the "brute force" approach of computing the
- * distance from every colormap entry to every histogram cell.  Unfortunately,
- * it needs a work array to hold the best-distance-so-far for each histogram
- * cell (because the inner loop has to be over cells, not colormap entries).
- * The work array elements have to be INT32s, so the work array would need
- * 256Kb at our recommended precision.  This is not feasible in DOS machines.
- *
- * To get around these problems, we apply Thomas' method to compute the
- * nearest colors for only the cells within a small subbox of the histogram.
- * The work array need be only as big as the subbox, so the memory usage
- * problem is solved.  Furthermore, we need not fill subboxes that are never
- * referenced in pass2; many images use only part of the color gamut, so a
- * fair amount of work is saved.  An additional advantage of this
- * approach is that we can apply Heckbert's locality criterion to quickly
- * eliminate colormap entries that are far away from the subbox; typically
- * three-fourths of the colormap entries are rejected by Heckbert's criterion,
- * and we need not compute their distances to individual cells in the subbox.
- * The speed of this approach is heavily influenced by the subbox size: too
- * small means too much overhead, too big loses because Heckbert's criterion
- * can't eliminate as many colormap entries.  Empirically the best subbox
- * size seems to be about 1/512th of the histogram (1/8th in each direction).
- *
- * Thomas' article also describes a refined method which is asymptotically
- * faster than the brute-force method, but it is also far more complex and
- * cannot efficiently be applied to small subboxes.  It is therefore not
- * useful for programs intended to be portable to DOS machines.  On machines
- * with plenty of memory, filling the whole histogram in one shot with Thomas'
- * refined method might be faster than the present code --- but then again,
- * it might not be any faster, and it's certainly more complicated.
- */
-
-
-/* log2(histogram cells in update box) for each axis; this can be adjusted */
-#define BOX_C0_LOG  (HIST_C0_BITS-3)
-#define BOX_C1_LOG  (HIST_C1_BITS-3)
-#define BOX_C2_LOG  (HIST_C2_BITS-3)
-
-#define BOX_C0_ELEMS  (1<<BOX_C0_LOG) /* # of hist cells in update box */
-#define BOX_C1_ELEMS  (1<<BOX_C1_LOG)
-#define BOX_C2_ELEMS  (1<<BOX_C2_LOG)
-
-#define BOX_C0_SHIFT  (C0_SHIFT + BOX_C0_LOG)
-#define BOX_C1_SHIFT  (C1_SHIFT + BOX_C1_LOG)
-#define BOX_C2_SHIFT  (C2_SHIFT + BOX_C2_LOG)
-
-
-/*
- * The next three routines implement inverse colormap filling.  They could
- * all be folded into one big routine, but splitting them up this way saves
- * some stack space (the mindist[] and bestdist[] arrays need not coexist)
- * and may allow some compilers to produce better code by registerizing more
- * inner-loop variables.
- */
-
-LOCAL(int)
-find_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
-		    JSAMPLE colorlist[])
-/* Locate the colormap entries close enough to an update box to be candidates
- * for the nearest entry to some cell(s) in the update box.  The update box
- * is specified by the center coordinates of its first cell.  The number of
- * candidate colormap entries is returned, and their colormap indexes are
- * placed in colorlist[].
- * This routine uses Heckbert's "locally sorted search" criterion to select
- * the colors that need further consideration.
- */
-{
-  int numcolors = cinfo->actual_number_of_colors;
-  int maxc0, maxc1, maxc2;
-  int centerc0, centerc1, centerc2;
-  int i, x, ncolors;
-  INT32 minmaxdist, min_dist, max_dist, tdist;
-  INT32 mindist[MAXNUMCOLORS];	/* min distance to colormap entry i */
-
-  /* Compute true coordinates of update box's upper corner and center.
-   * Actually we compute the coordinates of the center of the upper-corner
-   * histogram cell, which are the upper bounds of the volume we care about.
-   * Note that since ">>" rounds down, the "center" values may be closer to
-   * min than to max; hence comparisons to them must be "<=", not "<".
-   */
-  maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT));
-  centerc0 = (minc0 + maxc0) >> 1;
-  maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT));
-  centerc1 = (minc1 + maxc1) >> 1;
-  maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT));
-  centerc2 = (minc2 + maxc2) >> 1;
-
-  /* For each color in colormap, find:
-   *  1. its minimum squared-distance to any point in the update box
-   *     (zero if color is within update box);
-   *  2. its maximum squared-distance to any point in the update box.
-   * Both of these can be found by considering only the corners of the box.
-   * We save the minimum distance for each color in mindist[];
-   * only the smallest maximum distance is of interest.
-   */
-  minmaxdist = 0x7FFFFFFFL;
-
-  for (i = 0; i < numcolors; i++) {
-    /* We compute the squared-c0-distance term, then add in the other two. */
-    x = GETJSAMPLE(cinfo->colormap[0][i]);
-    if (x < minc0) {
-      tdist = (x - minc0) * C0_SCALE;
-      min_dist = tdist*tdist;
-      tdist = (x - maxc0) * C0_SCALE;
-      max_dist = tdist*tdist;
-    } else if (x > maxc0) {
-      tdist = (x - maxc0) * C0_SCALE;
-      min_dist = tdist*tdist;
-      tdist = (x - minc0) * C0_SCALE;
-      max_dist = tdist*tdist;
-    } else {
-      /* within cell range so no contribution to min_dist */
-      min_dist = 0;
-      if (x <= centerc0) {
-	tdist = (x - maxc0) * C0_SCALE;
-	max_dist = tdist*tdist;
-      } else {
-	tdist = (x - minc0) * C0_SCALE;
-	max_dist = tdist*tdist;
-      }
-    }
-
-    x = GETJSAMPLE(cinfo->colormap[1][i]);
-    if (x < minc1) {
-      tdist = (x - minc1) * C1_SCALE;
-      min_dist += tdist*tdist;
-      tdist = (x - maxc1) * C1_SCALE;
-      max_dist += tdist*tdist;
-    } else if (x > maxc1) {
-      tdist = (x - maxc1) * C1_SCALE;
-      min_dist += tdist*tdist;
-      tdist = (x - minc1) * C1_SCALE;
-      max_dist += tdist*tdist;
-    } else {
-      /* within cell range so no contribution to min_dist */
-      if (x <= centerc1) {
-	tdist = (x - maxc1) * C1_SCALE;
-	max_dist += tdist*tdist;
-      } else {
-	tdist = (x - minc1) * C1_SCALE;
-	max_dist += tdist*tdist;
-      }
-    }
-
-    x = GETJSAMPLE(cinfo->colormap[2][i]);
-    if (x < minc2) {
-      tdist = (x - minc2) * C2_SCALE;
-      min_dist += tdist*tdist;
-      tdist = (x - maxc2) * C2_SCALE;
-      max_dist += tdist*tdist;
-    } else if (x > maxc2) {
-      tdist = (x - maxc2) * C2_SCALE;
-      min_dist += tdist*tdist;
-      tdist = (x - minc2) * C2_SCALE;
-      max_dist += tdist*tdist;
-    } else {
-      /* within cell range so no contribution to min_dist */
-      if (x <= centerc2) {
-	tdist = (x - maxc2) * C2_SCALE;
-	max_dist += tdist*tdist;
-      } else {
-	tdist = (x - minc2) * C2_SCALE;
-	max_dist += tdist*tdist;
-      }
-    }
-
-    mindist[i] = min_dist;	/* save away the results */
-    if (max_dist < minmaxdist)
-      minmaxdist = max_dist;
-  }
-
-  /* Now we know that no cell in the update box is more than minmaxdist
-   * away from some colormap entry.  Therefore, only colors that are
-   * within minmaxdist of some part of the box need be considered.
-   */
-  ncolors = 0;
-  for (i = 0; i < numcolors; i++) {
-    if (mindist[i] <= minmaxdist)
-      colorlist[ncolors++] = (JSAMPLE) i;
-  }
-  return ncolors;
-}
-
-
-LOCAL(void)
-find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
-		  int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[])
-/* Find the closest colormap entry for each cell in the update box,
- * given the list of candidate colors prepared by find_nearby_colors.
- * Return the indexes of the closest entries in the bestcolor[] array.
- * This routine uses Thomas' incremental distance calculation method to
- * find the distance from a colormap entry to successive cells in the box.
- */
-{
-  int ic0, ic1, ic2;
-  int i, icolor;
-  register INT32 * bptr;	/* pointer into bestdist[] array */
-  JSAMPLE * cptr;		/* pointer into bestcolor[] array */
-  INT32 dist0, dist1;		/* initial distance values */
-  register INT32 dist2;		/* current distance in inner loop */
-  INT32 xx0, xx1;		/* distance increments */
-  register INT32 xx2;
-  INT32 inc0, inc1, inc2;	/* initial values for increments */
-  /* This array holds the distance to the nearest-so-far color for each cell */
-  INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
-
-  /* Initialize best-distance for each cell of the update box */
-  bptr = bestdist;
-  for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--)
-    *bptr++ = 0x7FFFFFFFL;
-  
-  /* For each color selected by find_nearby_colors,
-   * compute its distance to the center of each cell in the box.
-   * If that's less than best-so-far, update best distance and color number.
-   */
-  
-  /* Nominal steps between cell centers ("x" in Thomas article) */
-#define STEP_C0  ((1 << C0_SHIFT) * C0_SCALE)
-#define STEP_C1  ((1 << C1_SHIFT) * C1_SCALE)
-#define STEP_C2  ((1 << C2_SHIFT) * C2_SCALE)
-  
-  for (i = 0; i < numcolors; i++) {
-    icolor = GETJSAMPLE(colorlist[i]);
-    /* Compute (square of) distance from minc0/c1/c2 to this color */
-    inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE;
-    dist0 = inc0*inc0;
-    inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE;
-    dist0 += inc1*inc1;
-    inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE;
-    dist0 += inc2*inc2;
-    /* Form the initial difference increments */
-    inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0;
-    inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1;
-    inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2;
-    /* Now loop over all cells in box, updating distance per Thomas method */
-    bptr = bestdist;
-    cptr = bestcolor;
-    xx0 = inc0;
-    for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) {
-      dist1 = dist0;
-      xx1 = inc1;
-      for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) {
-	dist2 = dist1;
-	xx2 = inc2;
-	for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) {
-	  if (dist2 < *bptr) {
-	    *bptr = dist2;
-	    *cptr = (JSAMPLE) icolor;
-	  }
-	  dist2 += xx2;
-	  xx2 += 2 * STEP_C2 * STEP_C2;
-	  bptr++;
-	  cptr++;
-	}
-	dist1 += xx1;
-	xx1 += 2 * STEP_C1 * STEP_C1;
-      }
-      dist0 += xx0;
-      xx0 += 2 * STEP_C0 * STEP_C0;
-    }
-  }
-}
-
-
-LOCAL(void)
-fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
-/* Fill the inverse-colormap entries in the update box that contains */
-/* histogram cell c0/c1/c2.  (Only that one cell MUST be filled, but */
-/* we can fill as many others as we wish.) */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  int minc0, minc1, minc2;	/* lower left corner of update box */
-  int ic0, ic1, ic2;
-  register JSAMPLE * cptr;	/* pointer into bestcolor[] array */
-  register histptr cachep;	/* pointer into main cache array */
-  /* This array lists the candidate colormap indexes. */
-  JSAMPLE colorlist[MAXNUMCOLORS];
-  int numcolors;		/* number of candidate colors */
-  /* This array holds the actually closest colormap index for each cell. */
-  JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
-
-  /* Convert cell coordinates to update box ID */
-  c0 >>= BOX_C0_LOG;
-  c1 >>= BOX_C1_LOG;
-  c2 >>= BOX_C2_LOG;
-
-  /* Compute true coordinates of update box's origin corner.
-   * Actually we compute the coordinates of the center of the corner
-   * histogram cell, which are the lower bounds of the volume we care about.
-   */
-  minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1);
-  minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1);
-  minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1);
-  
-  /* Determine which colormap entries are close enough to be candidates
-   * for the nearest entry to some cell in the update box.
-   */
-  numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist);
-
-  /* Determine the actually nearest colors. */
-  find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist,
-		   bestcolor);
-
-  /* Save the best color numbers (plus 1) in the main cache array */
-  c0 <<= BOX_C0_LOG;		/* convert ID back to base cell indexes */
-  c1 <<= BOX_C1_LOG;
-  c2 <<= BOX_C2_LOG;
-  cptr = bestcolor;
-  for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) {
-    for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) {
-      cachep = & histogram[c0+ic0][c1+ic1][c2];
-      for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) {
-	*cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1);
-      }
-    }
-  }
-}
-
-
-/*
- * Map some rows of pixels to the output colormapped representation.
- */
-
-METHODDEF(void)
-pass2_no_dither (j_decompress_ptr cinfo,
-		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
-/* This version performs no dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  register JSAMPROW inptr, outptr;
-  register histptr cachep;
-  register int c0, c1, c2;
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-
-  for (row = 0; row < num_rows; row++) {
-    inptr = input_buf[row];
-    outptr = output_buf[row];
-    for (col = width; col > 0; col--) {
-      /* get pixel value and index into the cache */
-      c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT;
-      c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT;
-      c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT;
-      cachep = & histogram[c0][c1][c2];
-      /* If we have not seen this color before, find nearest colormap entry */
-      /* and update the cache */
-      if (*cachep == 0)
-	fill_inverse_cmap(cinfo, c0,c1,c2);
-      /* Now emit the colormap index for this cell */
-      *outptr++ = (JSAMPLE) (*cachep - 1);
-    }
-  }
-}
-
-
-METHODDEF(void)
-pass2_fs_dither (j_decompress_ptr cinfo,
-		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
-/* This version performs Floyd-Steinberg dithering */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  register LOCFSERROR cur0, cur1, cur2;	/* current error or pixel value */
-  LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
-  LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
-  register FSERRPTR errorptr;	/* => fserrors[] at column before current */
-  JSAMPROW inptr;		/* => current input pixel */
-  JSAMPROW outptr;		/* => current output pixel */
-  histptr cachep;
-  int dir;			/* +1 or -1 depending on direction */
-  int dir3;			/* 3*dir, for advancing inptr & errorptr */
-  int row;
-  JDIMENSION col;
-  JDIMENSION width = cinfo->output_width;
-  JSAMPLE *range_limit = cinfo->sample_range_limit;
-  int *error_limit = cquantize->error_limiter;
-  JSAMPROW colormap0 = cinfo->colormap[0];
-  JSAMPROW colormap1 = cinfo->colormap[1];
-  JSAMPROW colormap2 = cinfo->colormap[2];
-  SHIFT_TEMPS
-
-  for (row = 0; row < num_rows; row++) {
-    inptr = input_buf[row];
-    outptr = output_buf[row];
-    if (cquantize->on_odd_row) {
-      /* work right to left in this row */
-      inptr += (width-1) * 3;	/* so point to rightmost pixel */
-      outptr += width-1;
-      dir = -1;
-      dir3 = -3;
-      errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */
-      cquantize->on_odd_row = FALSE; /* flip for next time */
-    } else {
-      /* work left to right in this row */
-      dir = 1;
-      dir3 = 3;
-      errorptr = cquantize->fserrors; /* => entry before first real column */
-      cquantize->on_odd_row = TRUE; /* flip for next time */
-    }
-    /* Preset error values: no error propagated to first pixel from left */
-    cur0 = cur1 = cur2 = 0;
-    /* and no error propagated to row below yet */
-    belowerr0 = belowerr1 = belowerr2 = 0;
-    bpreverr0 = bpreverr1 = bpreverr2 = 0;
-
-    for (col = width; col > 0; col--) {
-      /* curN holds the error propagated from the previous pixel on the
-       * current line.  Add the error propagated from the previous line
-       * to form the complete error correction term for this pixel, and
-       * round the error term (which is expressed * 16) to an integer.
-       * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct
-       * for either sign of the error value.
-       * Note: errorptr points to *previous* column's array entry.
-       */
-      cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4);
-      cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4);
-      cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4);
-      /* Limit the error using transfer function set by init_error_limit.
-       * See comments with init_error_limit for rationale.
-       */
-      cur0 = error_limit[cur0];
-      cur1 = error_limit[cur1];
-      cur2 = error_limit[cur2];
-      /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.
-       * The maximum error is +- MAXJSAMPLE (or less with error limiting);
-       * this sets the required size of the range_limit array.
-       */
-      cur0 += GETJSAMPLE(inptr[0]);
-      cur1 += GETJSAMPLE(inptr[1]);
-      cur2 += GETJSAMPLE(inptr[2]);
-      cur0 = GETJSAMPLE(range_limit[cur0]);
-      cur1 = GETJSAMPLE(range_limit[cur1]);
-      cur2 = GETJSAMPLE(range_limit[cur2]);
-      /* Index into the cache with adjusted pixel value */
-      cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT];
-      /* If we have not seen this color before, find nearest colormap */
-      /* entry and update the cache */
-      if (*cachep == 0)
-	fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
-      /* Now emit the colormap index for this cell */
-      { register int pixcode = *cachep - 1;
-	*outptr = (JSAMPLE) pixcode;
-	/* Compute representation error for this pixel */
-	cur0 -= GETJSAMPLE(colormap0[pixcode]);
-	cur1 -= GETJSAMPLE(colormap1[pixcode]);
-	cur2 -= GETJSAMPLE(colormap2[pixcode]);
-      }
-      /* Compute error fractions to be propagated to adjacent pixels.
-       * Add these into the running sums, and simultaneously shift the
-       * next-line error sums left by 1 column.
-       */
-      { register LOCFSERROR bnexterr, delta;
-
-	bnexterr = cur0;	/* Process component 0 */
-	delta = cur0 * 2;
-	cur0 += delta;		/* form error * 3 */
-	errorptr[0] = (FSERROR) (bpreverr0 + cur0);
-	cur0 += delta;		/* form error * 5 */
-	bpreverr0 = belowerr0 + cur0;
-	belowerr0 = bnexterr;
-	cur0 += delta;		/* form error * 7 */
-	bnexterr = cur1;	/* Process component 1 */
-	delta = cur1 * 2;
-	cur1 += delta;		/* form error * 3 */
-	errorptr[1] = (FSERROR) (bpreverr1 + cur1);
-	cur1 += delta;		/* form error * 5 */
-	bpreverr1 = belowerr1 + cur1;
-	belowerr1 = bnexterr;
-	cur1 += delta;		/* form error * 7 */
-	bnexterr = cur2;	/* Process component 2 */
-	delta = cur2 * 2;
-	cur2 += delta;		/* form error * 3 */
-	errorptr[2] = (FSERROR) (bpreverr2 + cur2);
-	cur2 += delta;		/* form error * 5 */
-	bpreverr2 = belowerr2 + cur2;
-	belowerr2 = bnexterr;
-	cur2 += delta;		/* form error * 7 */
-      }
-      /* At this point curN contains the 7/16 error value to be propagated
-       * to the next pixel on the current line, and all the errors for the
-       * next line have been shifted over.  We are therefore ready to move on.
-       */
-      inptr += dir3;		/* Advance pixel pointers to next column */
-      outptr += dir;
-      errorptr += dir3;		/* advance errorptr to current column */
-    }
-    /* Post-loop cleanup: we must unload the final error values into the
-     * final fserrors[] entry.  Note we need not unload belowerrN because
-     * it is for the dummy column before or after the actual array.
-     */
-    errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */
-    errorptr[1] = (FSERROR) bpreverr1;
-    errorptr[2] = (FSERROR) bpreverr2;
-  }
-}
-
-
-/*
- * Initialize the error-limiting transfer function (lookup table).
- * The raw F-S error computation can potentially compute error values of up to
- * +- MAXJSAMPLE.  But we want the maximum correction applied to a pixel to be
- * much less, otherwise obviously wrong pixels will be created.  (Typical
- * effects include weird fringes at color-area boundaries, isolated bright
- * pixels in a dark area, etc.)  The standard advice for avoiding this problem
- * is to ensure that the "corners" of the color cube are allocated as output
- * colors; then repeated errors in the same direction cannot cause cascading
- * error buildup.  However, that only prevents the error from getting
- * completely out of hand; Aaron Giles reports that error limiting improves
- * the results even with corner colors allocated.
- * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty
- * well, but the smoother transfer function used below is even better.  Thanks
- * to Aaron Giles for this idea.
- */
-
-LOCAL(void)
-init_error_limit (j_decompress_ptr cinfo)
-/* Allocate and fill in the error_limiter table */
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  int * table;
-  int in, out;
-
-  table = (int *) (*cinfo->mem->alloc_small)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int));
-  table += MAXJSAMPLE;		/* so can index -MAXJSAMPLE .. +MAXJSAMPLE */
-  cquantize->error_limiter = table;
-
-#define STEPSIZE ((MAXJSAMPLE+1)/16)
-  /* Map errors 1:1 up to +- MAXJSAMPLE/16 */
-  out = 0;
-  for (in = 0; in < STEPSIZE; in++, out++) {
-    table[in] = out; table[-in] = -out;
-  }
-  /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */
-  for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) {
-    table[in] = out; table[-in] = -out;
-  }
-  /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */
-  for (; in <= MAXJSAMPLE; in++) {
-    table[in] = out; table[-in] = -out;
-  }
-#undef STEPSIZE
-}
-
-
-/*
- * Finish up at the end of each pass.
- */
-
-METHODDEF(void)
-finish_pass1 (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-
-  /* Select the representative colors and fill in cinfo->colormap */
-  cinfo->colormap = cquantize->sv_colormap;
-  select_colors(cinfo, cquantize->desired);
-  /* Force next pass to zero the color index table */
-  cquantize->needs_zeroed = TRUE;
-}
-
-
-METHODDEF(void)
-finish_pass2 (j_decompress_ptr cinfo)
-{
-  /* no work */
-}
-
-
-/*
- * Initialize for each processing pass.
- */
-
-METHODDEF(void)
-start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  hist3d histogram = cquantize->histogram;
-  int i;
-
-  /* Only F-S dithering or no dithering is supported. */
-  /* If user asks for ordered dither, give him F-S. */
-  if (cinfo->dither_mode != JDITHER_NONE)
-    cinfo->dither_mode = JDITHER_FS;
-
-  if (is_pre_scan) {
-    /* Set up method pointers */
-    cquantize->pub.color_quantize = prescan_quantize;
-    cquantize->pub.finish_pass = finish_pass1;
-    cquantize->needs_zeroed = TRUE; /* Always zero histogram */
-  } else {
-    /* Set up method pointers */
-    if (cinfo->dither_mode == JDITHER_FS)
-      cquantize->pub.color_quantize = pass2_fs_dither;
-    else
-      cquantize->pub.color_quantize = pass2_no_dither;
-    cquantize->pub.finish_pass = finish_pass2;
-
-    /* Make sure color count is acceptable */
-    i = cinfo->actual_number_of_colors;
-    if (i < 1)
-      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1);
-    if (i > MAXNUMCOLORS)
-      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
-
-    if (cinfo->dither_mode == JDITHER_FS) {
-      size_t arraysize = (size_t) ((cinfo->output_width + 2) *
-				   (3 * SIZEOF(FSERROR)));
-      /* Allocate Floyd-Steinberg workspace if we didn't already. */
-      if (cquantize->fserrors == NULL)
-	cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
-	  ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
-      /* Initialize the propagated errors to zero. */
-      jzero_far((void FAR *) cquantize->fserrors, arraysize);
-      /* Make the error-limit table if we didn't already. */
-      if (cquantize->error_limiter == NULL)
-	init_error_limit(cinfo);
-      cquantize->on_odd_row = FALSE;
-    }
-
-  }
-  /* Zero the histogram or inverse color map, if necessary */
-  if (cquantize->needs_zeroed) {
-    for (i = 0; i < HIST_C0_ELEMS; i++) {
-      jzero_far((void FAR *) histogram[i],
-		HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));
-    }
-    cquantize->needs_zeroed = FALSE;
-  }
-}
-
-
-/*
- * Switch to a new external colormap between output passes.
- */
-
-METHODDEF(void)
-new_color_map_2_quant (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-
-  /* Reset the inverse color map */
-  cquantize->needs_zeroed = TRUE;
-}
-
-
-/*
- * Module initialization routine for 2-pass color quantization.
- */
-
-GLOBAL(void)
-jinit_2pass_quantizer (j_decompress_ptr cinfo)
-{
-  my_cquantize_ptr cquantize;
-  int i;
-
-  cquantize = (my_cquantize_ptr)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				SIZEOF(my_cquantizer));
-  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
-  cquantize->pub.start_pass = start_pass_2_quant;
-  cquantize->pub.new_color_map = new_color_map_2_quant;
-  cquantize->fserrors = NULL;	/* flag optional arrays not allocated */
-  cquantize->error_limiter = NULL;
-
-  /* Make sure jdmaster didn't give me a case I can't handle */
-  if (cinfo->out_color_components != 3)
-    ERREXIT(cinfo, JERR_NOTIMPL);
-
-  /* Allocate the histogram/inverse colormap storage */
-  cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d));
-  for (i = 0; i < HIST_C0_ELEMS; i++) {
-    cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));
-  }
-  cquantize->needs_zeroed = TRUE; /* histogram is garbage now */
-
-  /* Allocate storage for the completed colormap, if required.
-   * We do this now since it is FAR storage and may affect
-   * the memory manager's space calculations.
-   */
-  if (cinfo->enable_2pass_quant) {
-    /* Make sure color count is acceptable */
-    int desired = cinfo->desired_number_of_colors;
-    /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */
-    if (desired < 8)
-      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8);
-    /* Make sure colormap indexes can be represented by JSAMPLEs */
-    if (desired > MAXNUMCOLORS)
-      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
-    cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3);
-    cquantize->desired = desired;
-  } else
-    cquantize->sv_colormap = NULL;
-
-  /* Only F-S dithering or no dithering is supported. */
-  /* If user asks for ordered dither, give him F-S. */
-  if (cinfo->dither_mode != JDITHER_NONE)
-    cinfo->dither_mode = JDITHER_FS;
-
-  /* Allocate Floyd-Steinberg workspace if necessary.
-   * This isn't really needed until pass 2, but again it is FAR storage.
-   * Although we will cope with a later change in dither_mode,
-   * we do not promise to honor max_memory_to_use if dither_mode changes.
-   */
-  if (cinfo->dither_mode == JDITHER_FS) {
-    cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR))));
-    /* Might as well create the error-limiting table too. */
-    init_error_limit(cinfo);
-  }
-}
-
-#endif /* QUANT_2PASS_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/jutils.c b/tkimg1.3/libjpeg/jutils.c
deleted file mode 100644
index d18a955..0000000
--- a/tkimg1.3/libjpeg/jutils.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * jutils.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains tables and miscellaneous utility routines needed
- * for both compression and decompression.
- * Note we prefix all global names with "j" to minimize conflicts with
- * a surrounding application.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-
-/*
- * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element
- * of a DCT block read in natural order (left to right, top to bottom).
- */
-
-#if 0				/* This table is not actually needed in v6a */
-
-const int jpeg_zigzag_order[DCTSIZE2] = {
-   0,  1,  5,  6, 14, 15, 27, 28,
-   2,  4,  7, 13, 16, 26, 29, 42,
-   3,  8, 12, 17, 25, 30, 41, 43,
-   9, 11, 18, 24, 31, 40, 44, 53,
-  10, 19, 23, 32, 39, 45, 52, 54,
-  20, 22, 33, 38, 46, 51, 55, 60,
-  21, 34, 37, 47, 50, 56, 59, 61,
-  35, 36, 48, 49, 57, 58, 62, 63
-};
-
-#endif
-
-/*
- * jpeg_natural_order[i] is the natural-order position of the i'th element
- * of zigzag order.
- *
- * When reading corrupted data, the Huffman decoders could attempt
- * to reference an entry beyond the end of this array (if the decoded
- * zero run length reaches past the end of the block).  To prevent
- * wild stores without adding an inner-loop test, we put some extra
- * "63"s after the real entries.  This will cause the extra coefficient
- * to be stored in location 63 of the block, not somewhere random.
- * The worst case would be a run-length of 15, which means we need 16
- * fake entries.
- */
-
-const int jpeg_natural_order[DCTSIZE2+16] = {
-  0,  1,  8, 16,  9,  2,  3, 10,
- 17, 24, 32, 25, 18, 11,  4,  5,
- 12, 19, 26, 33, 40, 48, 41, 34,
- 27, 20, 13,  6,  7, 14, 21, 28,
- 35, 42, 49, 56, 57, 50, 43, 36,
- 29, 22, 15, 23, 30, 37, 44, 51,
- 58, 59, 52, 45, 38, 31, 39, 46,
- 53, 60, 61, 54, 47, 55, 62, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
- 63, 63, 63, 63, 63, 63, 63, 63
-};
-
-
-/*
- * Arithmetic utilities
- */
-
-GLOBAL(long)
-jdiv_round_up (long a, long b)
-/* Compute a/b rounded up to next integer, ie, ceil(a/b) */
-/* Assumes a >= 0, b > 0 */
-{
-  return (a + b - 1L) / b;
-}
-
-
-GLOBAL(long)
-jround_up (long a, long b)
-/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
-/* Assumes a >= 0, b > 0 */
-{
-  a += b - 1L;
-  return a - (a % b);
-}
-
-
-/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays
- * and coefficient-block arrays.  This won't work on 80x86 because the arrays
- * are FAR and we're assuming a small-pointer memory model.  However, some
- * DOS compilers provide far-pointer versions of memcpy() and memset() even
- * in the small-model libraries.  These will be used if USE_FMEM is defined.
- * Otherwise, the routines below do it the hard way.  (The performance cost
- * is not all that great, because these routines aren't very heavily used.)
- */
-
-#ifndef NEED_FAR_POINTERS	/* normal case, same as regular macros */
-#define FMEMCOPY(dest,src,size)	MEMCOPY(dest,src,size)
-#define FMEMZERO(target,size)	MEMZERO(target,size)
-#else				/* 80x86 case, define if we can */
-#ifdef USE_FMEM
-#define FMEMCOPY(dest,src,size)	_fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size))
-#define FMEMZERO(target,size)	_fmemset((void FAR *)(target), 0, (size_t)(size))
-#endif
-#endif
-
-
-GLOBAL(void)
-jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
-		   JSAMPARRAY output_array, int dest_row,
-		   int num_rows, JDIMENSION num_cols)
-/* Copy some rows of samples from one place to another.
- * num_rows rows are copied from input_array[source_row++]
- * to output_array[dest_row++]; these areas may overlap for duplication.
- * The source and destination arrays must be at least as wide as num_cols.
- */
-{
-  register JSAMPROW inptr, outptr;
-#ifdef FMEMCOPY
-  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
-#else
-  register JDIMENSION count;
-#endif
-  register int row;
-
-  input_array += source_row;
-  output_array += dest_row;
-
-  for (row = num_rows; row > 0; row--) {
-    inptr = *input_array++;
-    outptr = *output_array++;
-#ifdef FMEMCOPY
-    FMEMCOPY(outptr, inptr, count);
-#else
-    for (count = num_cols; count > 0; count--)
-      *outptr++ = *inptr++;	/* needn't bother with GETJSAMPLE() here */
-#endif
-  }
-}
-
-
-GLOBAL(void)
-jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
-		 JDIMENSION num_blocks)
-/* Copy a row of coefficient blocks from one place to another. */
-{
-#ifdef FMEMCOPY
-  FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
-#else
-  register JCOEFPTR inptr, outptr;
-  register long count;
-
-  inptr = (JCOEFPTR) input_row;
-  outptr = (JCOEFPTR) output_row;
-  for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {
-    *outptr++ = *inptr++;
-  }
-#endif
-}
-
-
-GLOBAL(void)
-jzero_far (void FAR * target, size_t bytestozero)
-/* Zero out a chunk of FAR memory. */
-/* This might be sample-array data, block-array data, or alloc_large data. */
-{
-#ifdef FMEMZERO
-  FMEMZERO(target, bytestozero);
-#else
-  register char FAR * ptr = (char FAR *) target;
-  register size_t count;
-
-  for (count = bytestozero; count > 0; count--) {
-    *ptr++ = 0;
-  }
-#endif
-}
diff --git a/tkimg1.3/libjpeg/jversion.h b/tkimg1.3/libjpeg/jversion.h
deleted file mode 100644
index 6472c58..0000000
--- a/tkimg1.3/libjpeg/jversion.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * jversion.h
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains software version identification.
- */
-
-
-#define JVERSION	"6b  27-Mar-1998"
-
-#define JCOPYRIGHT	"Copyright (C) 1998, Thomas G. Lane"
diff --git a/tkimg1.3/libjpeg/libjpeg.doc b/tkimg1.3/libjpeg/libjpeg.doc
deleted file mode 100644
index 689b206..0000000
--- a/tkimg1.3/libjpeg/libjpeg.doc
+++ /dev/null
@@ -1,3006 +0,0 @@
-USING THE IJG JPEG LIBRARY
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file describes how to use the IJG JPEG library within an application
-program.  Read it if you want to write a program that uses the library.
-
-The file example.c provides heavily commented skeleton code for calling the
-JPEG library.  Also see jpeglib.h (the include file to be used by application
-programs) for full details about data structures and function parameter lists.
-The library source code, of course, is the ultimate reference.
-
-Note that there have been *major* changes from the application interface
-presented by IJG version 4 and earlier versions.  The old design had several
-inherent limitations, and it had accumulated a lot of cruft as we added
-features while trying to minimize application-interface changes.  We have
-sacrificed backward compatibility in the version 5 rewrite, but we think the
-improvements justify this.
-
-
-TABLE OF CONTENTS
------------------
-
-Overview:
-	Functions provided by the library
-	Outline of typical usage
-Basic library usage:
-	Data formats
-	Compression details
-	Decompression details
-	Mechanics of usage: include files, linking, etc
-Advanced features:
-	Compression parameter selection
-	Decompression parameter selection
-	Special color spaces
-	Error handling
-	Compressed data handling (source and destination managers)
-	I/O suspension
-	Progressive JPEG support
-	Buffered-image mode
-	Abbreviated datastreams and multiple images
-	Special markers
-	Raw (downsampled) image data
-	Really raw data: DCT coefficients
-	Progress monitoring
-	Memory management
-	Memory usage
-	Library compile-time options
-	Portability considerations
-	Notes for MS-DOS implementors
-
-You should read at least the overview and basic usage sections before trying
-to program with the library.  The sections on advanced features can be read
-if and when you need them.
-
-
-OVERVIEW
-========
-
-Functions provided by the library
----------------------------------
-
-The IJG JPEG library provides C code to read and write JPEG-compressed image
-files.  The surrounding application program receives or supplies image data a
-scanline at a time, using a straightforward uncompressed image format.  All
-details of color conversion and other preprocessing/postprocessing can be
-handled by the library.
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG.  These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression.  They include colorspace conversion, downsampling/upsampling,
-and color quantization.  The application indirectly selects use of this code
-by specifying the format in which it wishes to supply or receive image data.
-For example, if colormapped output is requested, then the decompression
-library automatically invokes color quantization.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing.  The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation.  On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical.  It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-A word about functions *not* provided by the library.  We handle a subset of
-the ISO JPEG standard; most baseline, extended-sequential, and progressive
-JPEG processes are supported.  (Our subset includes all features now in common
-use.)  Unsupported ISO options include:
-	* Hierarchical storage
-	* Lossless JPEG
-	* Arithmetic entropy coding (unsupported for legal reasons)
-	* DNL marker
-	* Nonintegral subsampling ratios
-We support both 8- and 12-bit data precision, but this is a compile-time
-choice rather than a run-time choice; hence it is difficult to use both
-precisions in a single application.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format.  The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats.  (For example, this library is
-used by the free LIBTIFF library to support JPEG compression in TIFF.)
-
-
-Outline of typical usage
-------------------------
-
-The rough outline of a JPEG compression operation is:
-
-	Allocate and initialize a JPEG compression object
-	Specify the destination for the compressed data (eg, a file)
-	Set parameters for compression, including image size & colorspace
-	jpeg_start_compress(...);
-	while (scan lines remain to be written)
-		jpeg_write_scanlines(...);
-	jpeg_finish_compress(...);
-	Release the JPEG compression object
-
-A JPEG compression object holds parameters and working state for the JPEG
-library.  We make creation/destruction of the object separate from starting
-or finishing compression of an image; the same object can be re-used for a
-series of image compression operations.  This makes it easy to re-use the
-same parameter settings for a sequence of images.  Re-use of a JPEG object
-also has important implications for processing abbreviated JPEG datastreams,
-as discussed later.
-
-The image data to be compressed is supplied to jpeg_write_scanlines() from
-in-memory buffers.  If the application is doing file-to-file compression,
-reading image data from the source file is the application's responsibility.
-The library emits compressed data by calling a "data destination manager",
-which typically will write the data into a file; but the application can
-provide its own destination manager to do something else.
-
-Similarly, the rough outline of a JPEG decompression operation is:
-
-	Allocate and initialize a JPEG decompression object
-	Specify the source of the compressed data (eg, a file)
-	Call jpeg_read_header() to obtain image info
-	Set parameters for decompression
-	jpeg_start_decompress(...);
-	while (scan lines remain to be read)
-		jpeg_read_scanlines(...);
-	jpeg_finish_decompress(...);
-	Release the JPEG decompression object
-
-This is comparable to the compression outline except that reading the
-datastream header is a separate step.  This is helpful because information
-about the image's size, colorspace, etc is available when the application
-selects decompression parameters.  For example, the application can choose an
-output scaling ratio that will fit the image into the available screen size.
-
-The decompression library obtains compressed data by calling a data source
-manager, which typically will read the data from a file; but other behaviors
-can be obtained with a custom source manager.  Decompressed data is delivered
-into in-memory buffers passed to jpeg_read_scanlines().
-
-It is possible to abort an incomplete compression or decompression operation
-by calling jpeg_abort(); or, if you do not need to retain the JPEG object,
-simply release it by calling jpeg_destroy().
-
-JPEG compression and decompression objects are two separate struct types.
-However, they share some common fields, and certain routines such as
-jpeg_destroy() can work on either type of object.
-
-The JPEG library has no static variables: all state is in the compression
-or decompression object.  Therefore it is possible to process multiple
-compression and decompression operations concurrently, using multiple JPEG
-objects.
-
-Both compression and decompression can be done in an incremental memory-to-
-memory fashion, if suitable source/destination managers are used.  See the
-section on "I/O suspension" for more details.
-
-
-BASIC LIBRARY USAGE
-===================
-
-Data formats
-------------
-
-Before diving into procedural details, it is helpful to understand the
-image data format that the JPEG library expects or returns.
-
-The standard input image format is a rectangular array of pixels, with each
-pixel having the same number of "component" or "sample" values (color
-channels).  You must specify how many components there are and the colorspace
-interpretation of the components.  Most applications will use RGB data
-(three components per pixel) or grayscale data (one component per pixel).
-PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE.
-A remarkable number of people manage to miss this, only to find that their
-programs don't work with grayscale JPEG files.
-
-There is no provision for colormapped input.  JPEG files are always full-color
-or full grayscale (or sometimes another colorspace such as CMYK).  You can
-feed in a colormapped image by expanding it to full-color format.  However
-JPEG often doesn't work very well with source data that has been colormapped,
-because of dithering noise.  This is discussed in more detail in the JPEG FAQ
-and the other references mentioned in the README file.
-
-Pixels are stored by scanlines, with each scanline running from left to
-right.  The component values for each pixel are adjacent in the row; for
-example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color.  Each scanline is an
-array of data type JSAMPLE --- which is typically "unsigned char", unless
-you've changed jmorecfg.h.  (You can also change the RGB pixel layout, say
-to B,G,R order, by modifying jmorecfg.h.  But see the restrictions listed in
-that file before doing so.)
-
-A 2-D array of pixels is formed by making a list of pointers to the starts of
-scanlines; so the scanlines need not be physically adjacent in memory.  Even
-if you process just one scanline at a time, you must make a one-element
-pointer array to conform to this structure.  Pointers to JSAMPLE rows are of
-type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY.
-
-The library accepts or supplies one or more complete scanlines per call.
-It is not possible to process part of a row at a time.  Scanlines are always
-processed top-to-bottom.  You can process an entire image in one call if you
-have it all in memory, but usually it's simplest to process one scanline at
-a time.
-
-For best results, source data values should have the precision specified by
-BITS_IN_JSAMPLE (normally 8 bits).  For instance, if you choose to compress
-data that's only 6 bits/channel, you should left-justify each value in a
-byte before passing it to the compressor.  If you need to compress data
-that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12.
-(See "Library compile-time options", later.)
-
-
-The data format returned by the decompressor is the same in all details,
-except that colormapped output is supported.  (Again, a JPEG file is never
-colormapped.  But you can ask the decompressor to perform on-the-fly color
-quantization to deliver colormapped output.)  If you request colormapped
-output then the returned data array contains a single JSAMPLE per pixel;
-its value is an index into a color map.  The color map is represented as
-a 2-D JSAMPARRAY in which each row holds the values of one color component,
-that is, colormap[i][j] is the value of the i'th color component for pixel
-value (map index) j.  Note that since the colormap indexes are stored in
-JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE
-(ie, at most 256 colors for an 8-bit JPEG library).
-
-
-Compression details
--------------------
-
-Here we revisit the JPEG compression outline given in the overview.
-
-1. Allocate and initialize a JPEG compression object.
-
-A JPEG compression object is a "struct jpeg_compress_struct".  (It also has
-a bunch of subsidiary structures which are allocated via malloc(), but the
-application doesn't control those directly.)  This struct can be just a local
-variable in the calling routine, if a single routine is going to execute the
-whole JPEG compression sequence.  Otherwise it can be static or allocated
-from malloc().
-
-You will also need a structure representing a JPEG error handler.  The part
-of this that the library cares about is a "struct jpeg_error_mgr".  If you
-are providing your own error handler, you'll typically want to embed the
-jpeg_error_mgr struct in a larger structure; this is discussed later under
-"Error handling".  For now we'll assume you are just using the default error
-handler.  The default error handler will print JPEG error/warning messages
-on stderr, and it will call exit() if a fatal error occurs.
-
-You must initialize the error handler structure, store a pointer to it into
-the JPEG object's "err" field, and then call jpeg_create_compress() to
-initialize the rest of the JPEG object.
-
-Typical code for this step, if you are using the default error handler, is
-
-	struct jpeg_compress_struct cinfo;
-	struct jpeg_error_mgr jerr;
-	...
-	cinfo.err = jpeg_std_error(&jerr);
-	jpeg_create_compress(&cinfo);
-
-jpeg_create_compress allocates a small amount of memory, so it could fail
-if you are out of memory.  In that case it will exit via the error handler;
-that's why the error handler must be initialized first.
-
-
-2. Specify the destination for the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library delivers compressed data to a
-"data destination" module.  The library includes one data destination
-module which knows how to write to a stdio stream.  You can use your own
-destination module if you want to do something else, as discussed later.
-
-If you use the standard destination module, you must open the target stdio
-stream beforehand.  Typical code for this step looks like:
-
-	FILE * outfile;
-	...
-	if ((outfile = fopen(filename, "wb")) == NULL) {
-	    fprintf(stderr, "can't open %s\n", filename);
-	    exit(1);
-	}
-	jpeg_stdio_dest(&cinfo, outfile);
-
-where the last line invokes the standard destination module.
-
-WARNING: it is critical that the binary compressed data be delivered to the
-output file unchanged.  On non-Unix systems the stdio library may perform
-newline translation or otherwise corrupt binary data.  To suppress this
-behavior, you may need to use a "b" option to fopen (as shown above), or use
-setmode() or another routine to put the stdio stream in binary mode.  See
-cjpeg.c and djpeg.c for code that has been found to work on many systems.
-
-You can select the data destination after setting other parameters (step 3),
-if that's more convenient.  You may not change the destination between
-calling jpeg_start_compress() and jpeg_finish_compress().
-
-
-3. Set parameters for compression, including image size & colorspace.
-
-You must supply information about the source image by setting the following
-fields in the JPEG object (cinfo structure):
-
-	image_width		Width of image, in pixels
-	image_height		Height of image, in pixels
-	input_components	Number of color channels (samples per pixel)
-	in_color_space		Color space of source image
-
-The image dimensions are, hopefully, obvious.  JPEG supports image dimensions
-of 1 to 64K pixels in either direction.  The input color space is typically
-RGB or grayscale, and input_components is 3 or 1 accordingly.  (See "Special
-color spaces", later, for more info.)  The in_color_space field must be
-assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or
-JCS_GRAYSCALE.
-
-JPEG has a large number of compression parameters that determine how the
-image is encoded.  Most applications don't need or want to know about all
-these parameters.  You can set all the parameters to reasonable defaults by
-calling jpeg_set_defaults(); then, if there are particular values you want
-to change, you can do so after that.  The "Compression parameter selection"
-section tells about all the parameters.
-
-You must set in_color_space correctly before calling jpeg_set_defaults(),
-because the defaults depend on the source image colorspace.  However the
-other three source image parameters need not be valid until you call
-jpeg_start_compress().  There's no harm in calling jpeg_set_defaults() more
-than once, if that happens to be convenient.
-
-Typical code for a 24-bit RGB source image is
-
-	cinfo.image_width = Width; 	/* image width and height, in pixels */
-	cinfo.image_height = Height;
-	cinfo.input_components = 3;	/* # of color components per pixel */
-	cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
-
-	jpeg_set_defaults(&cinfo);
-	/* Make optional parameter settings here */
-
-
-4. jpeg_start_compress(...);
-
-After you have established the data destination and set all the necessary
-source image info and other parameters, call jpeg_start_compress() to begin
-a compression cycle.  This will initialize internal state, allocate working
-storage, and emit the first few bytes of the JPEG datastream header.
-
-Typical code:
-
-	jpeg_start_compress(&cinfo, TRUE);
-
-The "TRUE" parameter ensures that a complete JPEG interchange datastream
-will be written.  This is appropriate in most cases.  If you think you might
-want to use an abbreviated datastream, read the section on abbreviated
-datastreams, below.
-
-Once you have called jpeg_start_compress(), you may not alter any JPEG
-parameters or other fields of the JPEG object until you have completed
-the compression cycle.
-
-
-5. while (scan lines remain to be written)
-	jpeg_write_scanlines(...);
-
-Now write all the required image data by calling jpeg_write_scanlines()
-one or more times.  You can pass one or more scanlines in each call, up
-to the total image height.  In most applications it is convenient to pass
-just one or a few scanlines at a time.  The expected format for the passed
-data is discussed under "Data formats", above.
-
-Image data should be written in top-to-bottom scanline order.  The JPEG spec
-contains some weasel wording about how top and bottom are application-defined
-terms (a curious interpretation of the English language...) but if you want
-your files to be compatible with everyone else's, you WILL use top-to-bottom
-order.  If the source data must be read in bottom-to-top order, you can use
-the JPEG library's virtual array mechanism to invert the data efficiently.
-Examples of this can be found in the sample application cjpeg.
-
-The library maintains a count of the number of scanlines written so far
-in the next_scanline field of the JPEG object.  Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.next_scanline < cinfo.image_height)".
-
-Code for this step depends heavily on the way that you store the source data.
-example.c shows the following code for the case of a full-size 2-D source
-array containing 3-byte RGB pixels:
-
-	JSAMPROW row_pointer[1];	/* pointer to a single row */
-	int row_stride;			/* physical row width in buffer */
-
-	row_stride = image_width * 3;	/* JSAMPLEs per row in image_buffer */
-
-	while (cinfo.next_scanline < cinfo.image_height) {
-	    row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
-	    jpeg_write_scanlines(&cinfo, row_pointer, 1);
-	}
-
-jpeg_write_scanlines() returns the number of scanlines actually written.
-This will normally be equal to the number passed in, so you can usually
-ignore the return value.  It is different in just two cases:
-  * If you try to write more scanlines than the declared image height,
-    the additional scanlines are ignored.
-  * If you use a suspending data destination manager, output buffer overrun
-    will cause the compressor to return before accepting all the passed lines.
-    This feature is discussed under "I/O suspension", below.  The normal
-    stdio destination manager will NOT cause this to happen.
-In any case, the return value is the same as the change in the value of
-next_scanline.
-
-
-6. jpeg_finish_compress(...);
-
-After all the image data has been written, call jpeg_finish_compress() to
-complete the compression cycle.  This step is ESSENTIAL to ensure that the
-last bufferload of data is written to the data destination.
-jpeg_finish_compress() also releases working memory associated with the JPEG
-object.
-
-Typical code:
-
-	jpeg_finish_compress(&cinfo);
-
-If using the stdio destination manager, don't forget to close the output
-stdio stream (if necessary) afterwards.
-
-If you have requested a multi-pass operating mode, such as Huffman code
-optimization, jpeg_finish_compress() will perform the additional passes using
-data buffered by the first pass.  In this case jpeg_finish_compress() may take
-quite a while to complete.  With the default compression parameters, this will
-not happen.
-
-It is an error to call jpeg_finish_compress() before writing the necessary
-total number of scanlines.  If you wish to abort compression, call
-jpeg_abort() as discussed below.
-
-After completing a compression cycle, you may dispose of the JPEG object
-as discussed next, or you may use it to compress another image.  In that case
-return to step 2, 3, or 4 as appropriate.  If you do not change the
-destination manager, the new datastream will be written to the same target.
-If you do not change any JPEG parameters, the new datastream will be written
-with the same parameters as before.  Note that you can change the input image
-dimensions freely between cycles, but if you change the input colorspace, you
-should call jpeg_set_defaults() to adjust for the new colorspace; and then
-you'll need to repeat all of step 3.
-
-
-7. Release the JPEG compression object.
-
-When you are done with a JPEG compression object, destroy it by calling
-jpeg_destroy_compress().  This will free all subsidiary memory (regardless of
-the previous state of the object).  Or you can call jpeg_destroy(), which
-works for either compression or decompression objects --- this may be more
-convenient if you are sharing code between compression and decompression
-cases.  (Actually, these routines are equivalent except for the declared type
-of the passed pointer.  To avoid gripes from ANSI C compilers, jpeg_destroy()
-should be passed a j_common_ptr.)
-
-If you allocated the jpeg_compress_struct structure from malloc(), freeing
-it is your responsibility --- jpeg_destroy() won't.  Ditto for the error
-handler structure.
-
-Typical code:
-
-	jpeg_destroy_compress(&cinfo);
-
-
-8. Aborting.
-
-If you decide to abort a compression cycle before finishing, you can clean up
-in either of two ways:
-
-* If you don't need the JPEG object any more, just call
-  jpeg_destroy_compress() or jpeg_destroy() to release memory.  This is
-  legitimate at any point after calling jpeg_create_compress() --- in fact,
-  it's safe even if jpeg_create_compress() fails.
-
-* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call
-  jpeg_abort() which works on both compression and decompression objects.
-  This will return the object to an idle state, releasing any working memory.
-  jpeg_abort() is allowed at any time after successful object creation.
-
-Note that cleaning up the data destination, if required, is your
-responsibility; neither of these routines will call term_destination().
-(See "Compressed data handling", below, for more about that.)
-
-jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG
-object that has reported an error by calling error_exit (see "Error handling"
-for more info).  The internal state of such an object is likely to be out of
-whack.  Either of these two routines will return the object to a known state.
-
-
-Decompression details
----------------------
-
-Here we revisit the JPEG decompression outline given in the overview.
-
-1. Allocate and initialize a JPEG decompression object.
-
-This is just like initialization for compression, as discussed above,
-except that the object is a "struct jpeg_decompress_struct" and you
-call jpeg_create_decompress().  Error handling is exactly the same.
-
-Typical code:
-
-	struct jpeg_decompress_struct cinfo;
-	struct jpeg_error_mgr jerr;
-	...
-	cinfo.err = jpeg_std_error(&jerr);
-	jpeg_create_decompress(&cinfo);
-
-(Both here and in the IJG code, we usually use variable name "cinfo" for
-both compression and decompression objects.)
-
-
-2. Specify the source of the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library reads compressed data from a "data
-source" module.  The library includes one data source module which knows how
-to read from a stdio stream.  You can use your own source module if you want
-to do something else, as discussed later.
-
-If you use the standard source module, you must open the source stdio stream
-beforehand.  Typical code for this step looks like:
-
-	FILE * infile;
-	...
-	if ((infile = fopen(filename, "rb")) == NULL) {
-	    fprintf(stderr, "can't open %s\n", filename);
-	    exit(1);
-	}
-	jpeg_stdio_src(&cinfo, infile);
-
-where the last line invokes the standard source module.
-
-WARNING: it is critical that the binary compressed data be read unchanged.
-On non-Unix systems the stdio library may perform newline translation or
-otherwise corrupt binary data.  To suppress this behavior, you may need to use
-a "b" option to fopen (as shown above), or use setmode() or another routine to
-put the stdio stream in binary mode.  See cjpeg.c and djpeg.c for code that
-has been found to work on many systems.
-
-You may not change the data source between calling jpeg_read_header() and
-jpeg_finish_decompress().  If you wish to read a series of JPEG images from
-a single source file, you should repeat the jpeg_read_header() to
-jpeg_finish_decompress() sequence without reinitializing either the JPEG
-object or the data source module; this prevents buffered input data from
-being discarded.
-
-
-3. Call jpeg_read_header() to obtain image info.
-
-Typical code for this step is just
-
-	jpeg_read_header(&cinfo, TRUE);
-
-This will read the source datastream header markers, up to the beginning
-of the compressed data proper.  On return, the image dimensions and other
-info have been stored in the JPEG object.  The application may wish to
-consult this information before selecting decompression parameters.
-
-More complex code is necessary if
-  * A suspending data source is used --- in that case jpeg_read_header()
-    may return before it has read all the header data.  See "I/O suspension",
-    below.  The normal stdio source manager will NOT cause this to happen.
-  * Abbreviated JPEG files are to be processed --- see the section on
-    abbreviated datastreams.  Standard applications that deal only in
-    interchange JPEG files need not be concerned with this case either.
-
-It is permissible to stop at this point if you just wanted to find out the
-image dimensions and other header info for a JPEG file.  In that case,
-call jpeg_destroy() when you are done with the JPEG object, or call
-jpeg_abort() to return it to an idle state before selecting a new data
-source and reading another header.
-
-
-4. Set parameters for decompression.
-
-jpeg_read_header() sets appropriate default decompression parameters based on
-the properties of the image (in particular, its colorspace).  However, you
-may well want to alter these defaults before beginning the decompression.
-For example, the default is to produce full color output from a color file.
-If you want colormapped output you must ask for it.  Other options allow the
-returned image to be scaled and allow various speed/quality tradeoffs to be
-selected.  "Decompression parameter selection", below, gives details.
-
-If the defaults are appropriate, nothing need be done at this step.
-
-Note that all default values are set by each call to jpeg_read_header().
-If you reuse a decompression object, you cannot expect your parameter
-settings to be preserved across cycles, as you can for compression.
-You must set desired parameter values each time.
-
-
-5. jpeg_start_decompress(...);
-
-Once the parameter values are satisfactory, call jpeg_start_decompress() to
-begin decompression.  This will initialize internal state, allocate working
-memory, and prepare for returning data.
-
-Typical code is just
-
-	jpeg_start_decompress(&cinfo);
-
-If you have requested a multi-pass operating mode, such as 2-pass color
-quantization, jpeg_start_decompress() will do everything needed before data
-output can begin.  In this case jpeg_start_decompress() may take quite a while
-to complete.  With a single-scan (non progressive) JPEG file and default
-decompression parameters, this will not happen; jpeg_start_decompress() will
-return quickly.
-
-After this call, the final output image dimensions, including any requested
-scaling, are available in the JPEG object; so is the selected colormap, if
-colormapped output has been requested.  Useful fields include
-
-	output_width		image width and height, as scaled
-	output_height
-	out_color_components	# of color components in out_color_space
-	output_components	# of color components returned per pixel
-	colormap		the selected colormap, if any
-	actual_number_of_colors		number of entries in colormap
-
-output_components is 1 (a colormap index) when quantizing colors; otherwise it
-equals out_color_components.  It is the number of JSAMPLE values that will be
-emitted per pixel in the output arrays.
-
-Typically you will need to allocate data buffers to hold the incoming image.
-You will need output_width * output_components JSAMPLEs per scanline in your
-output buffer, and a total of output_height scanlines will be returned.
-
-Note: if you are using the JPEG library's internal memory manager to allocate
-data buffers (as djpeg does), then the manager's protocol requires that you
-request large buffers *before* calling jpeg_start_decompress().  This is a
-little tricky since the output_XXX fields are not normally valid then.  You
-can make them valid by calling jpeg_calc_output_dimensions() after setting the
-relevant parameters (scaling, output color space, and quantization flag).
-
-
-6. while (scan lines remain to be read)
-	jpeg_read_scanlines(...);
-
-Now you can read the decompressed image data by calling jpeg_read_scanlines()
-one or more times.  At each call, you pass in the maximum number of scanlines
-to be read (ie, the height of your working buffer); jpeg_read_scanlines()
-will return up to that many lines.  The return value is the number of lines
-actually read.  The format of the returned data is discussed under "Data
-formats", above.  Don't forget that grayscale and color JPEGs will return
-different data formats!
-
-Image data is returned in top-to-bottom scanline order.  If you must write
-out the image in bottom-to-top order, you can use the JPEG library's virtual
-array mechanism to invert the data efficiently.  Examples of this can be
-found in the sample application djpeg.
-
-The library maintains a count of the number of scanlines returned so far
-in the output_scanline field of the JPEG object.  Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.output_scanline < cinfo.output_height)".  (Note that the test
-should NOT be against image_height, unless you never use scaling.  The
-image_height field is the height of the original unscaled image.)
-The return value always equals the change in the value of output_scanline.
-
-If you don't use a suspending data source, it is safe to assume that
-jpeg_read_scanlines() reads at least one scanline per call, until the
-bottom of the image has been reached.
-
-If you use a buffer larger than one scanline, it is NOT safe to assume that
-jpeg_read_scanlines() fills it.  (The current implementation returns only a
-few scanlines per call, no matter how large a buffer you pass.)  So you must
-always provide a loop that calls jpeg_read_scanlines() repeatedly until the
-whole image has been read.
-
-
-7. jpeg_finish_decompress(...);
-
-After all the image data has been read, call jpeg_finish_decompress() to
-complete the decompression cycle.  This causes working memory associated
-with the JPEG object to be released.
-
-Typical code:
-
-	jpeg_finish_decompress(&cinfo);
-
-If using the stdio source manager, don't forget to close the source stdio
-stream if necessary.
-
-It is an error to call jpeg_finish_decompress() before reading the correct
-total number of scanlines.  If you wish to abort decompression, call
-jpeg_abort() as discussed below.
-
-After completing a decompression cycle, you may dispose of the JPEG object as
-discussed next, or you may use it to decompress another image.  In that case
-return to step 2 or 3 as appropriate.  If you do not change the source
-manager, the next image will be read from the same source.
-
-
-8. Release the JPEG decompression object.
-
-When you are done with a JPEG decompression object, destroy it by calling
-jpeg_destroy_decompress() or jpeg_destroy().  The previous discussion of
-destroying compression objects applies here too.
-
-Typical code:
-
-	jpeg_destroy_decompress(&cinfo);
-
-
-9. Aborting.
-
-You can abort a decompression cycle by calling jpeg_destroy_decompress() or
-jpeg_destroy() if you don't need the JPEG object any more, or
-jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object.
-The previous discussion of aborting compression cycles applies here too.
-
-
-Mechanics of usage: include files, linking, etc
------------------------------------------------
-
-Applications using the JPEG library should include the header file jpeglib.h
-to obtain declarations of data types and routines.  Before including
-jpeglib.h, include system headers that define at least the typedefs FILE and
-size_t.  On ANSI-conforming systems, including <stdio.h> is sufficient; on
-older Unix systems, you may need <sys/types.h> to define size_t.
-
-If the application needs to refer to individual JPEG library error codes, also
-include jerror.h to define those symbols.
-
-jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h.  If you are
-installing the JPEG header files in a system directory, you will want to
-install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h.
-
-The most convenient way to include the JPEG code into your executable program
-is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix
-machines) and reference it at your link step.  If you use only half of the
-library (only compression or only decompression), only that much code will be
-included from the library, unless your linker is hopelessly brain-damaged.
-The supplied makefiles build libjpeg.a automatically (see install.doc).
-
-While you can build the JPEG library as a shared library if the whim strikes
-you, we don't really recommend it.  The trouble with shared libraries is that
-at some point you'll probably try to substitute a new version of the library
-without recompiling the calling applications.  That generally doesn't work
-because the parameter struct declarations usually change with each new
-version.  In other words, the library's API is *not* guaranteed binary
-compatible across versions; we only try to ensure source-code compatibility.
-(In hindsight, it might have been smarter to hide the parameter structs from
-applications and introduce a ton of access functions instead.  Too late now,
-however.)
-
-On some systems your application may need to set up a signal handler to ensure
-that temporary files are deleted if the program is interrupted.  This is most
-critical if you are on MS-DOS and use the jmemdos.c memory manager back end;
-it will try to grab extended memory for temp files, and that space will NOT be
-freed automatically.  See cjpeg.c or djpeg.c for an example signal handler.
-
-It may be worth pointing out that the core JPEG library does not actually
-require the stdio library: only the default source/destination managers and
-error handler need it.  You can use the library in a stdio-less environment
-if you replace those modules and use jmemnobs.c (or another memory manager of
-your own devising).  More info about the minimum system library requirements
-may be found in jinclude.h.
-
-
-ADVANCED FEATURES
-=================
-
-Compression parameter selection
--------------------------------
-
-This section describes all the optional parameters you can set for JPEG
-compression, as well as the "helper" routines provided to assist in this
-task.  Proper setting of some parameters requires detailed understanding
-of the JPEG standard; if you don't know what a parameter is for, it's best
-not to mess with it!  See REFERENCES in the README file for pointers to
-more info about JPEG.
-
-It's a good idea to call jpeg_set_defaults() first, even if you plan to set
-all the parameters; that way your code is more likely to work with future JPEG
-libraries that have additional parameters.  For the same reason, we recommend
-you use a helper routine where one is provided, in preference to twiddling
-cinfo fields directly.
-
-The helper routines are:
-
-jpeg_set_defaults (j_compress_ptr cinfo)
-	This routine sets all JPEG parameters to reasonable defaults, using
-	only the input image's color space (field in_color_space, which must
-	already be set in cinfo).  Many applications will only need to use
-	this routine and perhaps jpeg_set_quality().
-
-jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
-	Sets the JPEG file's colorspace (field jpeg_color_space) as specified,
-	and sets other color-space-dependent parameters appropriately.  See
-	"Special color spaces", below, before using this.  A large number of
-	parameters, including all per-component parameters, are set by this
-	routine; if you want to twiddle individual parameters you should call
-	jpeg_set_colorspace() before rather than after.
-
-jpeg_default_colorspace (j_compress_ptr cinfo)
-	Selects an appropriate JPEG colorspace based on cinfo->in_color_space,
-	and calls jpeg_set_colorspace().  This is actually a subroutine of
-	jpeg_set_defaults().  It's broken out in case you want to change
-	just the colorspace-dependent JPEG parameters.
-
-jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
-	Constructs JPEG quantization tables appropriate for the indicated
-	quality setting.  The quality value is expressed on the 0..100 scale
-	recommended by IJG (cjpeg's "-quality" switch uses this routine).
-	Note that the exact mapping from quality values to tables may change
-	in future IJG releases as more is learned about DCT quantization.
-	If the force_baseline parameter is TRUE, then the quantization table
-	entries are constrained to the range 1..255 for full JPEG baseline
-	compatibility.  In the current implementation, this only makes a
-	difference for quality settings below 25, and it effectively prevents
-	very small/low quality files from being generated.  The IJG decoder
-	is capable of reading the non-baseline files generated at low quality
-	settings when force_baseline is FALSE, but other decoders may not be.
-
-jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
-			 boolean force_baseline)
-	Same as jpeg_set_quality() except that the generated tables are the
-	sample tables given in the JPEC spec section K.1, multiplied by the
-	specified scale factor (which is expressed as a percentage; thus
-	scale_factor = 100 reproduces the spec's tables).  Note that larger
-	scale factors give lower quality.  This entry point is useful for
-	conforming to the Adobe PostScript DCT conventions, but we do not
-	recommend linear scaling as a user-visible quality scale otherwise.
-	force_baseline again constrains the computed table entries to 1..255.
-
-int jpeg_quality_scaling (int quality)
-	Converts a value on the IJG-recommended quality scale to a linear
-	scaling percentage.  Note that this routine may change or go away
-	in future releases --- IJG may choose to adopt a scaling method that
-	can't be expressed as a simple scalar multiplier, in which case the
-	premise of this routine collapses.  Caveat user.
-
-jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
-		      const unsigned int *basic_table,
-		      int scale_factor, boolean force_baseline)
-	Allows an arbitrary quantization table to be created.  which_tbl
-	indicates which table slot to fill.  basic_table points to an array
-	of 64 unsigned ints given in normal array order.  These values are
-	multiplied by scale_factor/100 and then clamped to the range 1..65535
-	(or to 1..255 if force_baseline is TRUE).
-	CAUTION: prior to library version 6a, jpeg_add_quant_table expected
-	the basic table to be given in JPEG zigzag order.  If you need to
-	write code that works with either older or newer versions of this
-	routine, you must check the library version number.  Something like
-	"#if JPEG_LIB_VERSION >= 61" is the right test.
-
-jpeg_simple_progression (j_compress_ptr cinfo)
-	Generates a default scan script for writing a progressive-JPEG file.
-	This is the recommended method of creating a progressive file,
-	unless you want to make a custom scan sequence.  You must ensure that
-	the JPEG color space is set correctly before calling this routine.
-
-
-Compression parameters (cinfo fields) include:
-
-J_DCT_METHOD dct_method
-	Selects the algorithm used for the DCT step.  Choices are:
-		JDCT_ISLOW: slow but accurate integer algorithm
-		JDCT_IFAST: faster, less accurate integer method
-		JDCT_FLOAT: floating-point method
-		JDCT_DEFAULT: default method (normally JDCT_ISLOW)
-		JDCT_FASTEST: fastest method (normally JDCT_IFAST)
-	The FLOAT method is very slightly more accurate than the ISLOW method,
-	but may give different results on different machines due to varying
-	roundoff behavior.  The integer methods should give the same results
-	on all machines.  On machines with sufficiently fast FP hardware, the
-	floating-point method may also be the fastest.  The IFAST method is
-	considerably less accurate than the other two; its use is not
-	recommended if high quality is a concern.  JDCT_DEFAULT and
-	JDCT_FASTEST are macros configurable by each installation.
-
-J_COLOR_SPACE jpeg_color_space
-int num_components
-	The JPEG color space and corresponding number of components; see
-	"Special color spaces", below, for more info.  We recommend using
-	jpeg_set_color_space() if you want to change these.
-
-boolean optimize_coding
-	TRUE causes the compressor to compute optimal Huffman coding tables
-	for the image.  This requires an extra pass over the data and
-	therefore costs a good deal of space and time.  The default is
-	FALSE, which tells the compressor to use the supplied or default
-	Huffman tables.  In most cases optimal tables save only a few percent
-	of file size compared to the default tables.  Note that when this is
-	TRUE, you need not supply Huffman tables at all, and any you do
-	supply will be overwritten.
-
-unsigned int restart_interval
-int restart_in_rows
-	To emit restart markers in the JPEG file, set one of these nonzero.
-	Set restart_interval to specify the exact interval in MCU blocks.
-	Set restart_in_rows to specify the interval in MCU rows.  (If
-	restart_in_rows is not 0, then restart_interval is set after the
-	image width in MCUs is computed.)  Defaults are zero (no restarts).
-	One restart marker per MCU row is often a good choice.
-	NOTE: the overhead of restart markers is higher in grayscale JPEG
-	files than in color files, and MUCH higher in progressive JPEGs.
-	If you use restarts, you may want to use larger intervals in those
-	cases.
-
-const jpeg_scan_info * scan_info
-int num_scans
-	By default, scan_info is NULL; this causes the compressor to write a
-	single-scan sequential JPEG file.  If not NULL, scan_info points to
-	an array of scan definition records of length num_scans.  The
-	compressor will then write a JPEG file having one scan for each scan
-	definition record.  This is used to generate noninterleaved or
-	progressive JPEG files.  The library checks that the scan array
-	defines a valid JPEG scan sequence.  (jpeg_simple_progression creates
-	a suitable scan definition array for progressive JPEG.)  This is
-	discussed further under "Progressive JPEG support".
-
-int smoothing_factor
-	If non-zero, the input image is smoothed; the value should be 1 for
-	minimal smoothing to 100 for maximum smoothing.  Consult jcsample.c
-	for details of the smoothing algorithm.  The default is zero.
-
-boolean write_JFIF_header
-	If TRUE, a JFIF APP0 marker is emitted.  jpeg_set_defaults() and
-	jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space
-	(ie, YCbCr or grayscale) is selected, otherwise FALSE.
-
-UINT8 JFIF_major_version
-UINT8 JFIF_minor_version
-	The version number to be written into the JFIF marker.
-	jpeg_set_defaults() initializes the version to 1.01 (major=minor=1).
-	You should set it to 1.02 (major=1, minor=2) if you plan to write
-	any JFIF 1.02 extension markers.
-
-UINT8 density_unit
-UINT16 X_density
-UINT16 Y_density
-	The resolution information to be written into the JFIF marker;
-	not used otherwise.  density_unit may be 0 for unknown,
-	1 for dots/inch, or 2 for dots/cm.  The default values are 0,1,1
-	indicating square pixels of unknown size.
-
-boolean write_Adobe_marker
-	If TRUE, an Adobe APP14 marker is emitted.  jpeg_set_defaults() and
-	jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK,
-	or YCCK is selected, otherwise FALSE.  It is generally a bad idea
-	to set both write_JFIF_header and write_Adobe_marker.  In fact,
-	you probably shouldn't change the default settings at all --- the
-	default behavior ensures that the JPEG file's color space can be
-	recognized by the decoder.
-
-JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
-	Pointers to coefficient quantization tables, one per table slot,
-	or NULL if no table is defined for a slot.  Usually these should
-	be set via one of the above helper routines; jpeg_add_quant_table()
-	is general enough to define any quantization table.  The other
-	routines will set up table slot 0 for luminance quality and table
-	slot 1 for chrominance.
-
-JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
-JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
-	Pointers to Huffman coding tables, one per table slot, or NULL if
-	no table is defined for a slot.  Slots 0 and 1 are filled with the
-	JPEG sample tables by jpeg_set_defaults().  If you need to allocate
-	more table structures, jpeg_alloc_huff_table() may be used.
-	Note that optimal Huffman tables can be computed for an image
-	by setting optimize_coding, as discussed above; there's seldom
-	any need to mess with providing your own Huffman tables.
-
-There are some additional cinfo fields which are not documented here
-because you currently can't change them; for example, you can't set
-arith_code TRUE because arithmetic coding is unsupported.
-
-
-Per-component parameters are stored in the struct cinfo.comp_info[i] for
-component number i.  Note that components here refer to components of the
-JPEG color space, *not* the source image color space.  A suitably large
-comp_info[] array is allocated by jpeg_set_defaults(); if you choose not
-to use that routine, it's up to you to allocate the array.
-
-int component_id
-	The one-byte identifier code to be recorded in the JPEG file for
-	this component.  For the standard color spaces, we recommend you
-	leave the default values alone.
-
-int h_samp_factor
-int v_samp_factor
-	Horizontal and vertical sampling factors for the component; must
-	be 1..4 according to the JPEG standard.  Note that larger sampling
-	factors indicate a higher-resolution component; many people find
-	this behavior quite unintuitive.  The default values are 2,2 for
-	luminance components and 1,1 for chrominance components, except
-	for grayscale where 1,1 is used.
-
-int quant_tbl_no
-	Quantization table number for component.  The default value is
-	0 for luminance components and 1 for chrominance components.
-
-int dc_tbl_no
-int ac_tbl_no
-	DC and AC entropy coding table numbers.  The default values are
-	0 for luminance components and 1 for chrominance components.
-
-int component_index
-	Must equal the component's index in comp_info[].  (Beginning in
-	release v6, the compressor library will fill this in automatically;
-	you don't have to.)
-
-
-Decompression parameter selection
----------------------------------
-
-Decompression parameter selection is somewhat simpler than compression
-parameter selection, since all of the JPEG internal parameters are
-recorded in the source file and need not be supplied by the application.
-(Unless you are working with abbreviated files, in which case see
-"Abbreviated datastreams", below.)  Decompression parameters control
-the postprocessing done on the image to deliver it in a format suitable
-for the application's use.  Many of the parameters control speed/quality
-tradeoffs, in which faster decompression may be obtained at the price of
-a poorer-quality image.  The defaults select the highest quality (slowest)
-processing.
-
-The following fields in the JPEG object are set by jpeg_read_header() and
-may be useful to the application in choosing decompression parameters:
-
-JDIMENSION image_width			Width and height of image
-JDIMENSION image_height
-int num_components			Number of color components
-J_COLOR_SPACE jpeg_color_space		Colorspace of image
-boolean saw_JFIF_marker			TRUE if a JFIF APP0 marker was seen
-  UINT8 JFIF_major_version		Version information from JFIF marker
-  UINT8 JFIF_minor_version
-  UINT8 density_unit			Resolution data from JFIF marker
-  UINT16 X_density
-  UINT16 Y_density
-boolean saw_Adobe_marker		TRUE if an Adobe APP14 marker was seen
-  UINT8 Adobe_transform			Color transform code from Adobe marker
-
-The JPEG color space, unfortunately, is something of a guess since the JPEG
-standard proper does not provide a way to record it.  In practice most files
-adhere to the JFIF or Adobe conventions, and the decoder will recognize these
-correctly.  See "Special color spaces", below, for more info.
-
-
-The decompression parameters that determine the basic properties of the
-returned image are:
-
-J_COLOR_SPACE out_color_space
-	Output color space.  jpeg_read_header() sets an appropriate default
-	based on jpeg_color_space; typically it will be RGB or grayscale.
-	The application can change this field to request output in a different
-	colorspace.  For example, set it to JCS_GRAYSCALE to get grayscale
-	output from a color file.  (This is useful for previewing: grayscale
-	output is faster than full color since the color components need not
-	be processed.)  Note that not all possible color space transforms are
-	currently implemented; you may need to extend jdcolor.c if you want an
-	unusual conversion.
-
-unsigned int scale_num, scale_denom
-	Scale the image by the fraction scale_num/scale_denom.  Default is
-	1/1, or no scaling.  Currently, the only supported scaling ratios
-	are 1/1, 1/2, 1/4, and 1/8.  (The library design allows for arbitrary
-	scaling ratios but this is not likely to be implemented any time soon.)
-	Smaller scaling ratios permit significantly faster decoding since
-	fewer pixels need be processed and a simpler IDCT method can be used.
-
-boolean quantize_colors
-	If set TRUE, colormapped output will be delivered.  Default is FALSE,
-	meaning that full-color output will be delivered.
-
-The next three parameters are relevant only if quantize_colors is TRUE.
-
-int desired_number_of_colors
-	Maximum number of colors to use in generating a library-supplied color
-	map (the actual number of colors is returned in a different field).
-	Default 256.  Ignored when the application supplies its own color map.
-
-boolean two_pass_quantize
-	If TRUE, an extra pass over the image is made to select a custom color
-	map for the image.  This usually looks a lot better than the one-size-
-	fits-all colormap that is used otherwise.  Default is TRUE.  Ignored
-	when the application supplies its own color map.
-
-J_DITHER_MODE dither_mode
-	Selects color dithering method.  Supported values are:
-		JDITHER_NONE	no dithering: fast, very low quality
-		JDITHER_ORDERED	ordered dither: moderate speed and quality
-		JDITHER_FS	Floyd-Steinberg dither: slow, high quality
-	Default is JDITHER_FS.  (At present, ordered dither is implemented
-	only in the single-pass, standard-colormap case.  If you ask for
-	ordered dither when two_pass_quantize is TRUE or when you supply
-	an external color map, you'll get F-S dithering.)
-
-When quantize_colors is TRUE, the target color map is described by the next
-two fields.  colormap is set to NULL by jpeg_read_header().  The application
-can supply a color map by setting colormap non-NULL and setting
-actual_number_of_colors to the map size.  Otherwise, jpeg_start_decompress()
-selects a suitable color map and sets these two fields itself.
-[Implementation restriction: at present, an externally supplied colormap is
-only accepted for 3-component output color spaces.]
-
-JSAMPARRAY colormap
-	The color map, represented as a 2-D pixel array of out_color_components
-	rows and actual_number_of_colors columns.  Ignored if not quantizing.
-	CAUTION: if the JPEG library creates its own colormap, the storage
-	pointed to by this field is released by jpeg_finish_decompress().
-	Copy the colormap somewhere else first, if you want to save it.
-
-int actual_number_of_colors
-	The number of colors in the color map.
-
-Additional decompression parameters that the application may set include:
-
-J_DCT_METHOD dct_method
-	Selects the algorithm used for the DCT step.  Choices are the same
-	as described above for compression.
-
-boolean do_fancy_upsampling
-	If TRUE, do careful upsampling of chroma components.  If FALSE,
-	a faster but sloppier method is used.  Default is TRUE.  The visual
-	impact of the sloppier method is often very small.
-
-boolean do_block_smoothing
-	If TRUE, interblock smoothing is applied in early stages of decoding
-	progressive JPEG files; if FALSE, not.  Default is TRUE.  Early
-	progression stages look "fuzzy" with smoothing, "blocky" without.
-	In any case, block smoothing ceases to be applied after the first few
-	AC coefficients are known to full accuracy, so it is relevant only
-	when using buffered-image mode for progressive images.
-
-boolean enable_1pass_quant
-boolean enable_external_quant
-boolean enable_2pass_quant
-	These are significant only in buffered-image mode, which is
-	described in its own section below.
-
-
-The output image dimensions are given by the following fields.  These are
-computed from the source image dimensions and the decompression parameters
-by jpeg_start_decompress().  You can also call jpeg_calc_output_dimensions()
-to obtain the values that will result from the current parameter settings.
-This can be useful if you are trying to pick a scaling ratio that will get
-close to a desired target size.  It's also important if you are using the
-JPEG library's memory manager to allocate output buffer space, because you
-are supposed to request such buffers *before* jpeg_start_decompress().
-
-JDIMENSION output_width		Actual dimensions of output image.
-JDIMENSION output_height
-int out_color_components	Number of color components in out_color_space.
-int output_components		Number of color components returned.
-int rec_outbuf_height		Recommended height of scanline buffer.
-
-When quantizing colors, output_components is 1, indicating a single color map
-index per pixel.  Otherwise it equals out_color_components.  The output arrays
-are required to be output_width * output_components JSAMPLEs wide.
-
-rec_outbuf_height is the recommended minimum height (in scanlines) of the
-buffer passed to jpeg_read_scanlines().  If the buffer is smaller, the
-library will still work, but time will be wasted due to unnecessary data
-copying.  In high-quality modes, rec_outbuf_height is always 1, but some
-faster, lower-quality modes set it to larger values (typically 2 to 4).
-If you are going to ask for a high-speed processing mode, you may as well
-go to the trouble of honoring rec_outbuf_height so as to avoid data copying.
-(An output buffer larger than rec_outbuf_height lines is OK, but won't
-provide any material speed improvement over that height.)
-
-
-Special color spaces
---------------------
-
-The JPEG standard itself is "color blind" and doesn't specify any particular
-color space.  It is customary to convert color data to a luminance/chrominance
-color space before compressing, since this permits greater compression.  The
-existing de-facto JPEG file format standards specify YCbCr or grayscale data
-(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe).  For special
-applications such as multispectral images, other color spaces can be used,
-but it must be understood that such files will be unportable.
-
-The JPEG library can handle the most common colorspace conversions (namely
-RGB <=> YCbCr and CMYK <=> YCCK).  It can also deal with data of an unknown
-color space, passing it through without conversion.  If you deal extensively
-with an unusual color space, you can easily extend the library to understand
-additional color spaces and perform appropriate conversions.
-
-For compression, the source data's color space is specified by field
-in_color_space.  This is transformed to the JPEG file's color space given
-by jpeg_color_space.  jpeg_set_defaults() chooses a reasonable JPEG color
-space depending on in_color_space, but you can override this by calling
-jpeg_set_colorspace().  Of course you must select a supported transformation.
-jccolor.c currently supports the following transformations:
-	RGB => YCbCr
-	RGB => GRAYSCALE
-	YCbCr => GRAYSCALE
-	CMYK => YCCK
-plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB,
-YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN.
-
-The de-facto file format standards (JFIF and Adobe) specify APPn markers that
-indicate the color space of the JPEG file.  It is important to ensure that
-these are written correctly, or omitted if the JPEG file's color space is not
-one of the ones supported by the de-facto standards.  jpeg_set_colorspace()
-will set the compression parameters to include or omit the APPn markers
-properly, so long as it is told the truth about the JPEG color space.
-For example, if you are writing some random 3-component color space without
-conversion, don't try to fake out the library by setting in_color_space and
-jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN.  You may want to write an
-APPn marker of your own devising to identify the colorspace --- see "Special
-markers", below.
-
-When told that the color space is UNKNOWN, the library will default to using
-luminance-quality compression parameters for all color components.  You may
-well want to change these parameters.  See the source code for
-jpeg_set_colorspace(), in jcparam.c, for details.
-
-For decompression, the JPEG file's color space is given in jpeg_color_space,
-and this is transformed to the output color space out_color_space.
-jpeg_read_header's setting of jpeg_color_space can be relied on if the file
-conforms to JFIF or Adobe conventions, but otherwise it is no better than a
-guess.  If you know the JPEG file's color space for certain, you can override
-jpeg_read_header's guess by setting jpeg_color_space.  jpeg_read_header also
-selects a default output color space based on (its guess of) jpeg_color_space;
-set out_color_space to override this.  Again, you must select a supported
-transformation.  jdcolor.c currently supports
-	YCbCr => GRAYSCALE
-	YCbCr => RGB
-	GRAYSCALE => RGB
-	YCCK => CMYK
-as well as the null transforms.  (Since GRAYSCALE=>RGB is provided, an
-application can force grayscale JPEGs to look like color JPEGs if it only
-wants to handle one case.)
-
-The two-pass color quantizer, jquant2.c, is specialized to handle RGB data
-(it weights distances appropriately for RGB colors).  You'll need to modify
-the code if you want to use it for non-RGB output color spaces.  Note that
-jquant2.c is used to map to an application-supplied colormap as well as for
-the normal two-pass colormap selection process.
-
-CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG
-files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect.
-This is arguably a bug in Photoshop, but if you need to work with Photoshop
-CMYK files, you will have to deal with it in your application.  We cannot
-"fix" this in the library by inverting the data during the CMYK<=>YCCK
-transform, because that would break other applications, notably Ghostscript.
-Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK
-data in the same inverted-YCCK representation used in bare JPEG files, but
-the surrounding PostScript code performs an inversion using the PS image
-operator.  I am told that Photoshop 3.0 will write uninverted YCCK in
-EPS/JPEG files, and will omit the PS-level inversion.  (But the data
-polarity used in bare JPEG files will not change in 3.0.)  In either case,
-the JPEG library must not invert the data itself, or else Ghostscript would
-read these EPS files incorrectly.
-
-
-Error handling
---------------
-
-When the default error handler is used, any error detected inside the JPEG
-routines will cause a message to be printed on stderr, followed by exit().
-You can supply your own error handling routines to override this behavior
-and to control the treatment of nonfatal warnings and trace/debug messages.
-The file example.c illustrates the most common case, which is to have the
-application regain control after an error rather than exiting.
-
-The JPEG library never writes any message directly; it always goes through
-the error handling routines.  Three classes of messages are recognized:
-  * Fatal errors: the library cannot continue.
-  * Warnings: the library can continue, but the data is corrupt, and a
-    damaged output image is likely to result.
-  * Trace/informational messages.  These come with a trace level indicating
-    the importance of the message; you can control the verbosity of the
-    program by adjusting the maximum trace level that will be displayed.
-
-You may, if you wish, simply replace the entire JPEG error handling module
-(jerror.c) with your own code.  However, you can avoid code duplication by
-only replacing some of the routines depending on the behavior you need.
-This is accomplished by calling jpeg_std_error() as usual, but then overriding
-some of the method pointers in the jpeg_error_mgr struct, as illustrated by
-example.c.
-
-All of the error handling routines will receive a pointer to the JPEG object
-(a j_common_ptr which points to either a jpeg_compress_struct or a
-jpeg_decompress_struct; if you need to tell which, test the is_decompressor
-field).  This struct includes a pointer to the error manager struct in its
-"err" field.  Frequently, custom error handler routines will need to access
-additional data which is not known to the JPEG library or the standard error
-handler.  The most convenient way to do this is to embed either the JPEG
-object or the jpeg_error_mgr struct in a larger structure that contains
-additional fields; then casting the passed pointer provides access to the
-additional fields.  Again, see example.c for one way to do it.  (Beginning
-with IJG version 6b, there is also a void pointer "client_data" in each
-JPEG object, which the application can also use to find related data.
-The library does not touch client_data at all.)
-
-The individual methods that you might wish to override are:
-
-error_exit (j_common_ptr cinfo)
-	Receives control for a fatal error.  Information sufficient to
-	generate the error message has been stored in cinfo->err; call
-	output_message to display it.  Control must NOT return to the caller;
-	generally this routine will exit() or longjmp() somewhere.
-	Typically you would override this routine to get rid of the exit()
-	default behavior.  Note that if you continue processing, you should
-	clean up the JPEG object with jpeg_abort() or jpeg_destroy().
-
-output_message (j_common_ptr cinfo)
-	Actual output of any JPEG message.  Override this to send messages
-	somewhere other than stderr.  Note that this method does not know
-	how to generate a message, only where to send it.
-
-format_message (j_common_ptr cinfo, char * buffer)
-	Constructs a readable error message string based on the error info
-	stored in cinfo->err.  This method is called by output_message.  Few
-	applications should need to override this method.  One possible
-	reason for doing so is to implement dynamic switching of error message
-	language.
-
-emit_message (j_common_ptr cinfo, int msg_level)
-	Decide whether or not to emit a warning or trace message; if so,
-	calls output_message.  The main reason for overriding this method
-	would be to abort on warnings.  msg_level is -1 for warnings,
-	0 and up for trace messages.
-
-Only error_exit() and emit_message() are called from the rest of the JPEG
-library; the other two are internal to the error handler.
-
-The actual message texts are stored in an array of strings which is pointed to
-by the field err->jpeg_message_table.  The messages are numbered from 0 to
-err->last_jpeg_message, and it is these code numbers that are used in the
-JPEG library code.  You could replace the message texts (for instance, with
-messages in French or German) by changing the message table pointer.  See
-jerror.h for the default texts.  CAUTION: this table will almost certainly
-change or grow from one library version to the next.
-
-It may be useful for an application to add its own message texts that are
-handled by the same mechanism.  The error handler supports a second "add-on"
-message table for this purpose.  To define an addon table, set the pointer
-err->addon_message_table and the message numbers err->first_addon_message and
-err->last_addon_message.  If you number the addon messages beginning at 1000
-or so, you won't have to worry about conflicts with the library's built-in
-messages.  See the sample applications cjpeg/djpeg for an example of using
-addon messages (the addon messages are defined in cderror.h).
-
-Actual invocation of the error handler is done via macros defined in jerror.h:
-	ERREXITn(...)	for fatal errors
-	WARNMSn(...)	for corrupt-data warnings
-	TRACEMSn(...)	for trace and informational messages.
-These macros store the message code and any additional parameters into the
-error handler struct, then invoke the error_exit() or emit_message() method.
-The variants of each macro are for varying numbers of additional parameters.
-The additional parameters are inserted into the generated message using
-standard printf() format codes.
-
-See jerror.h and jerror.c for further details.
-
-
-Compressed data handling (source and destination managers)
-----------------------------------------------------------
-
-The JPEG compression library sends its compressed data to a "destination
-manager" module.  The default destination manager just writes the data to a
-stdio stream, but you can provide your own manager to do something else.
-Similarly, the decompression library calls a "source manager" to obtain the
-compressed data; you can provide your own source manager if you want the data
-to come from somewhere other than a stdio stream.
-
-In both cases, compressed data is processed a bufferload at a time: the
-destination or source manager provides a work buffer, and the library invokes
-the manager only when the buffer is filled or emptied.  (You could define a
-one-character buffer to force the manager to be invoked for each byte, but
-that would be rather inefficient.)  The buffer's size and location are
-controlled by the manager, not by the library.  For example, if you desired to
-decompress a JPEG datastream that was all in memory, you could just make the
-buffer pointer and length point to the original data in memory.  Then the
-buffer-reload procedure would be invoked only if the decompressor ran off the
-end of the datastream, which would indicate an erroneous datastream.
-
-The work buffer is defined as an array of datatype JOCTET, which is generally
-"char" or "unsigned char".  On a machine where char is not exactly 8 bits
-wide, you must define JOCTET as a wider data type and then modify the data
-source and destination modules to transcribe the work arrays into 8-bit units
-on external storage.
-
-A data destination manager struct contains a pointer and count defining the
-next byte to write in the work buffer and the remaining free space:
-
-	JOCTET * next_output_byte;  /* => next byte to write in buffer */
-	size_t free_in_buffer;      /* # of byte spaces remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is filled.  The manager's empty_output_buffer method must reset the pointer
-and count.  The manager is expected to remember the buffer's starting address
-and total size in private fields not visible to the library.
-
-A data destination manager provides three methods:
-
-init_destination (j_compress_ptr cinfo)
-	Initialize destination.  This is called by jpeg_start_compress()
-	before any data is actually written.  It must initialize
-	next_output_byte and free_in_buffer.  free_in_buffer must be
-	initialized to a positive value.
-
-empty_output_buffer (j_compress_ptr cinfo)
-	This is called whenever the buffer has filled (free_in_buffer
-	reaches zero).  In typical applications, it should write out the
-	*entire* buffer (use the saved start address and buffer length;
-	ignore the current state of next_output_byte and free_in_buffer).
-	Then reset the pointer & count to the start of the buffer, and
-	return TRUE indicating that the buffer has been dumped.
-	free_in_buffer must be set to a positive value when TRUE is
-	returned.  A FALSE return should only be used when I/O suspension is
-	desired (this operating mode is discussed in the next section).
-
-term_destination (j_compress_ptr cinfo)
-	Terminate destination --- called by jpeg_finish_compress() after all
-	data has been written.  In most applications, this must flush any
-	data remaining in the buffer.  Use either next_output_byte or
-	free_in_buffer to determine how much data is in the buffer.
-
-term_destination() is NOT called by jpeg_abort() or jpeg_destroy().  If you
-want the destination manager to be cleaned up during an abort, you must do it
-yourself.
-
-You will also need code to create a jpeg_destination_mgr struct, fill in its
-method pointers, and insert a pointer to the struct into the "dest" field of
-the JPEG compression object.  This can be done in-line in your setup code if
-you like, but it's probably cleaner to provide a separate routine similar to
-the jpeg_stdio_dest() routine of the supplied destination manager.
-
-Decompression source managers follow a parallel design, but with some
-additional frammishes.  The source manager struct contains a pointer and count
-defining the next byte to read from the work buffer and the number of bytes
-remaining:
-
-	const JOCTET * next_input_byte; /* => next byte to read from buffer */
-	size_t bytes_in_buffer;         /* # of bytes remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is emptied.  The manager's fill_input_buffer method must reset the pointer and
-count.  In most applications, the manager must remember the buffer's starting
-address and total size in private fields not visible to the library.
-
-A data source manager provides five methods:
-
-init_source (j_decompress_ptr cinfo)
-	Initialize source.  This is called by jpeg_read_header() before any
-	data is actually read.  Unlike init_destination(), it may leave
-	bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
-	will occur immediately).
-
-fill_input_buffer (j_decompress_ptr cinfo)
-	This is called whenever bytes_in_buffer has reached zero and more
-	data is wanted.  In typical applications, it should read fresh data
-	into the buffer (ignoring the current state of next_input_byte and
-	bytes_in_buffer), reset the pointer & count to the start of the
-	buffer, and return TRUE indicating that the buffer has been reloaded.
-	It is not necessary to fill the buffer entirely, only to obtain at
-	least one more byte.  bytes_in_buffer MUST be set to a positive value
-	if TRUE is returned.  A FALSE return should only be used when I/O
-	suspension is desired (this mode is discussed in the next section).
-
-skip_input_data (j_decompress_ptr cinfo, long num_bytes)
-	Skip num_bytes worth of data.  The buffer pointer and count should
-	be advanced over num_bytes input bytes, refilling the buffer as
-	needed.  This is used to skip over a potentially large amount of
-	uninteresting data (such as an APPn marker).  In some applications
-	it may be possible to optimize away the reading of the skipped data,
-	but it's not clear that being smart is worth much trouble; large
-	skips are uncommon.  bytes_in_buffer may be zero on return.
-	A zero or negative skip count should be treated as a no-op.
-
-resync_to_restart (j_decompress_ptr cinfo, int desired)
-	This routine is called only when the decompressor has failed to find
-	a restart (RSTn) marker where one is expected.  Its mission is to
-	find a suitable point for resuming decompression.  For most
-	applications, we recommend that you just use the default resync
-	procedure, jpeg_resync_to_restart().  However, if you are able to back
-	up in the input data stream, or if you have a-priori knowledge about
-	the likely location of restart markers, you may be able to do better.
-	Read the read_restart_marker() and jpeg_resync_to_restart() routines
-	in jdmarker.c if you think you'd like to implement your own resync
-	procedure.
-
-term_source (j_decompress_ptr cinfo)
-	Terminate source --- called by jpeg_finish_decompress() after all
-	data has been read.  Often a no-op.
-
-For both fill_input_buffer() and skip_input_data(), there is no such thing
-as an EOF return.  If the end of the file has been reached, the routine has
-a choice of exiting via ERREXIT() or inserting fake data into the buffer.
-In most cases, generating a warning message and inserting a fake EOI marker
-is the best course of action --- this will allow the decompressor to output
-however much of the image is there.  In pathological cases, the decompressor
-may swallow the EOI and again demand data ... just keep feeding it fake EOIs.
-jdatasrc.c illustrates the recommended error recovery behavior.
-
-term_source() is NOT called by jpeg_abort() or jpeg_destroy().  If you want
-the source manager to be cleaned up during an abort, you must do it yourself.
-
-You will also need code to create a jpeg_source_mgr struct, fill in its method
-pointers, and insert a pointer to the struct into the "src" field of the JPEG
-decompression object.  This can be done in-line in your setup code if you
-like, but it's probably cleaner to provide a separate routine similar to the
-jpeg_stdio_src() routine of the supplied source manager.
-
-For more information, consult the stdio source and destination managers
-in jdatasrc.c and jdatadst.c.
-
-
-I/O suspension
---------------
-
-Some applications need to use the JPEG library as an incremental memory-to-
-memory filter: when the compressed data buffer is filled or emptied, they want
-control to return to the outer loop, rather than expecting that the buffer can
-be emptied or reloaded within the data source/destination manager subroutine.
-The library supports this need by providing an "I/O suspension" mode, which we
-describe in this section.
-
-The I/O suspension mode is not a panacea: nothing is guaranteed about the
-maximum amount of time spent in any one call to the library, so it will not
-eliminate response-time problems in single-threaded applications.  If you
-need guaranteed response time, we suggest you "bite the bullet" and implement
-a real multi-tasking capability.
-
-To use I/O suspension, cooperation is needed between the calling application
-and the data source or destination manager; you will always need a custom
-source/destination manager.  (Please read the previous section if you haven't
-already.)  The basic idea is that the empty_output_buffer() or
-fill_input_buffer() routine is a no-op, merely returning FALSE to indicate
-that it has done nothing.  Upon seeing this, the JPEG library suspends
-operation and returns to its caller.  The surrounding application is
-responsible for emptying or refilling the work buffer before calling the
-JPEG library again.
-
-Compression suspension:
-
-For compression suspension, use an empty_output_buffer() routine that returns
-FALSE; typically it will not do anything else.  This will cause the
-compressor to return to the caller of jpeg_write_scanlines(), with the return
-value indicating that not all the supplied scanlines have been accepted.
-The application must make more room in the output buffer, adjust the output
-buffer pointer/count appropriately, and then call jpeg_write_scanlines()
-again, pointing to the first unconsumed scanline.
-
-When forced to suspend, the compressor will backtrack to a convenient stopping
-point (usually the start of the current MCU); it will regenerate some output
-data when restarted.  Therefore, although empty_output_buffer() is only
-called when the buffer is filled, you should NOT write out the entire buffer
-after a suspension.  Write only the data up to the current position of
-next_output_byte/free_in_buffer.  The data beyond that point will be
-regenerated after resumption.
-
-Because of the backtracking behavior, a good-size output buffer is essential
-for efficiency; you don't want the compressor to suspend often.  (In fact, an
-overly small buffer could lead to infinite looping, if a single MCU required
-more data than would fit in the buffer.)  We recommend a buffer of at least
-several Kbytes.  You may want to insert explicit code to ensure that you don't
-call jpeg_write_scanlines() unless there is a reasonable amount of space in
-the output buffer; in other words, flush the buffer before trying to compress
-more data.
-
-The compressor does not allow suspension while it is trying to write JPEG
-markers at the beginning and end of the file.  This means that:
-  * At the beginning of a compression operation, there must be enough free
-    space in the output buffer to hold the header markers (typically 600 or
-    so bytes).  The recommended buffer size is bigger than this anyway, so
-    this is not a problem as long as you start with an empty buffer.  However,
-    this restriction might catch you if you insert large special markers, such
-    as a JFIF thumbnail image, without flushing the buffer afterwards.
-  * When you call jpeg_finish_compress(), there must be enough space in the
-    output buffer to emit any buffered data and the final EOI marker.  In the
-    current implementation, half a dozen bytes should suffice for this, but
-    for safety's sake we recommend ensuring that at least 100 bytes are free
-    before calling jpeg_finish_compress().
-
-A more significant restriction is that jpeg_finish_compress() cannot suspend.
-This means you cannot use suspension with multi-pass operating modes, namely
-Huffman code optimization and multiple-scan output.  Those modes write the
-whole file during jpeg_finish_compress(), which will certainly result in
-buffer overrun.  (Note that this restriction applies only to compression,
-not decompression.  The decompressor supports input suspension in all of its
-operating modes.)
-
-Decompression suspension:
-
-For decompression suspension, use a fill_input_buffer() routine that simply
-returns FALSE (except perhaps during error recovery, as discussed below).
-This will cause the decompressor to return to its caller with an indication
-that suspension has occurred.  This can happen at four places:
-  * jpeg_read_header(): will return JPEG_SUSPENDED.
-  * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE.
-  * jpeg_read_scanlines(): will return the number of scanlines already
-	completed (possibly 0).
-  * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE.
-The surrounding application must recognize these cases, load more data into
-the input buffer, and repeat the call.  In the case of jpeg_read_scanlines(),
-increment the passed pointers past any scanlines successfully read.
-
-Just as with compression, the decompressor will typically backtrack to a
-convenient restart point before suspending.  When fill_input_buffer() is
-called, next_input_byte/bytes_in_buffer point to the current restart point,
-which is where the decompressor will backtrack to if FALSE is returned.
-The data beyond that position must NOT be discarded if you suspend; it needs
-to be re-read upon resumption.  In most implementations, you'll need to shift
-this data down to the start of your work buffer and then load more data after
-it.  Again, this behavior means that a several-Kbyte work buffer is essential
-for decent performance; furthermore, you should load a reasonable amount of
-new data before resuming decompression.  (If you loaded, say, only one new
-byte each time around, you could waste a LOT of cycles.)
-
-The skip_input_data() source manager routine requires special care in a
-suspension scenario.  This routine is NOT granted the ability to suspend the
-decompressor; it can decrement bytes_in_buffer to zero, but no more.  If the
-requested skip distance exceeds the amount of data currently in the input
-buffer, then skip_input_data() must set bytes_in_buffer to zero and record the
-additional skip distance somewhere else.  The decompressor will immediately
-call fill_input_buffer(), which should return FALSE, which will cause a
-suspension return.  The surrounding application must then arrange to discard
-the recorded number of bytes before it resumes loading the input buffer.
-(Yes, this design is rather baroque, but it avoids complexity in the far more
-common case where a non-suspending source manager is used.)
-
-If the input data has been exhausted, we recommend that you emit a warning
-and insert dummy EOI markers just as a non-suspending data source manager
-would do.  This can be handled either in the surrounding application logic or
-within fill_input_buffer(); the latter is probably more efficient.  If
-fill_input_buffer() knows that no more data is available, it can set the
-pointer/count to point to a dummy EOI marker and then return TRUE just as
-though it had read more data in a non-suspending situation.
-
-The decompressor does not attempt to suspend within standard JPEG markers;
-instead it will backtrack to the start of the marker and reprocess the whole
-marker next time.  Hence the input buffer must be large enough to hold the
-longest standard marker in the file.  Standard JPEG markers should normally
-not exceed a few hundred bytes each (DHT tables are typically the longest).
-We recommend at least a 2K buffer for performance reasons, which is much
-larger than any correct marker is likely to be.  For robustness against
-damaged marker length counts, you may wish to insert a test in your
-application for the case that the input buffer is completely full and yet
-the decoder has suspended without consuming any data --- otherwise, if this
-situation did occur, it would lead to an endless loop.  (The library can't
-provide this test since it has no idea whether "the buffer is full", or
-even whether there is a fixed-size input buffer.)
-
-The input buffer would need to be 64K to allow for arbitrary COM or APPn
-markers, but these are handled specially: they are either saved into allocated
-memory, or skipped over by calling skip_input_data().  In the former case,
-suspension is handled correctly, and in the latter case, the problem of
-buffer overrun is placed on skip_input_data's shoulders, as explained above.
-Note that if you provide your own marker handling routine for large markers,
-you should consider how to deal with buffer overflow.
-
-Multiple-buffer management:
-
-In some applications it is desirable to store the compressed data in a linked
-list of buffer areas, so as to avoid data copying.  This can be handled by
-having empty_output_buffer() or fill_input_buffer() set the pointer and count
-to reference the next available buffer; FALSE is returned only if no more
-buffers are available.  Although seemingly straightforward, there is a
-pitfall in this approach: the backtrack that occurs when FALSE is returned
-could back up into an earlier buffer.  For example, when fill_input_buffer()
-is called, the current pointer & count indicate the backtrack restart point.
-Since fill_input_buffer() will set the pointer and count to refer to a new
-buffer, the restart position must be saved somewhere else.  Suppose a second
-call to fill_input_buffer() occurs in the same library call, and no
-additional input data is available, so fill_input_buffer must return FALSE.
-If the JPEG library has not moved the pointer/count forward in the current
-buffer, then *the correct restart point is the saved position in the prior
-buffer*.  Prior buffers may be discarded only after the library establishes
-a restart point within a later buffer.  Similar remarks apply for output into
-a chain of buffers.
-
-The library will never attempt to backtrack over a skip_input_data() call,
-so any skipped data can be permanently discarded.  You still have to deal
-with the case of skipping not-yet-received data, however.
-
-It's much simpler to use only a single buffer; when fill_input_buffer() is
-called, move any unconsumed data (beyond the current pointer/count) down to
-the beginning of this buffer and then load new data into the remaining buffer
-space.  This approach requires a little more data copying but is far easier
-to get right.
-
-
-Progressive JPEG support
-------------------------
-
-Progressive JPEG rearranges the stored data into a series of scans of
-increasing quality.  In situations where a JPEG file is transmitted across a
-slow communications link, a decoder can generate a low-quality image very
-quickly from the first scan, then gradually improve the displayed quality as
-more scans are received.  The final image after all scans are complete is
-identical to that of a regular (sequential) JPEG file of the same quality
-setting.  Progressive JPEG files are often slightly smaller than equivalent
-sequential JPEG files, but the possibility of incremental display is the main
-reason for using progressive JPEG.
-
-The IJG encoder library generates progressive JPEG files when given a
-suitable "scan script" defining how to divide the data into scans.
-Creation of progressive JPEG files is otherwise transparent to the encoder.
-Progressive JPEG files can also be read transparently by the decoder library.
-If the decoding application simply uses the library as defined above, it
-will receive a final decoded image without any indication that the file was
-progressive.  Of course, this approach does not allow incremental display.
-To perform incremental display, an application needs to use the decoder
-library's "buffered-image" mode, in which it receives a decoded image
-multiple times.
-
-Each displayed scan requires about as much work to decode as a full JPEG
-image of the same size, so the decoder must be fairly fast in relation to the
-data transmission rate in order to make incremental display useful.  However,
-it is possible to skip displaying the image and simply add the incoming bits
-to the decoder's coefficient buffer.  This is fast because only Huffman
-decoding need be done, not IDCT, upsampling, colorspace conversion, etc.
-The IJG decoder library allows the application to switch dynamically between
-displaying the image and simply absorbing the incoming bits.  A properly
-coded application can automatically adapt the number of display passes to
-suit the time available as the image is received.  Also, a final
-higher-quality display cycle can be performed from the buffered data after
-the end of the file is reached.
-
-Progressive compression:
-
-To create a progressive JPEG file (or a multiple-scan sequential JPEG file),
-set the scan_info cinfo field to point to an array of scan descriptors, and
-perform compression as usual.  Instead of constructing your own scan list,
-you can call the jpeg_simple_progression() helper routine to create a
-recommended progression sequence; this method should be used by all
-applications that don't want to get involved in the nitty-gritty of
-progressive scan sequence design.  (If you want to provide user control of
-scan sequences, you may wish to borrow the scan script reading code found
-in rdswitch.c, so that you can read scan script files just like cjpeg's.)
-When scan_info is not NULL, the compression library will store DCT'd data
-into a buffer array as jpeg_write_scanlines() is called, and will emit all
-the requested scans during jpeg_finish_compress().  This implies that
-multiple-scan output cannot be created with a suspending data destination
-manager, since jpeg_finish_compress() does not support suspension.  We
-should also note that the compressor currently forces Huffman optimization
-mode when creating a progressive JPEG file, because the default Huffman
-tables are unsuitable for progressive files.
-
-Progressive decompression:
-
-When buffered-image mode is not used, the decoder library will read all of
-a multi-scan file during jpeg_start_decompress(), so that it can provide a
-final decoded image.  (Here "multi-scan" means either progressive or
-multi-scan sequential.)  This makes multi-scan files transparent to the
-decoding application.  However, existing applications that used suspending
-input with version 5 of the IJG library will need to be modified to check
-for a suspension return from jpeg_start_decompress().
-
-To perform incremental display, an application must use the library's
-buffered-image mode.  This is described in the next section.
-
-
-Buffered-image mode
--------------------
-
-In buffered-image mode, the library stores the partially decoded image in a
-coefficient buffer, from which it can be read out as many times as desired.
-This mode is typically used for incremental display of progressive JPEG files,
-but it can be used with any JPEG file.  Each scan of a progressive JPEG file
-adds more data (more detail) to the buffered image.  The application can
-display in lockstep with the source file (one display pass per input scan),
-or it can allow input processing to outrun display processing.  By making
-input and display processing run independently, it is possible for the
-application to adapt progressive display to a wide range of data transmission
-rates.
-
-The basic control flow for buffered-image decoding is
-
-	jpeg_create_decompress()
-	set data source
-	jpeg_read_header()
-	set overall decompression parameters
-	cinfo.buffered_image = TRUE;	/* select buffered-image mode */
-	jpeg_start_decompress()
-	for (each output pass) {
-	    adjust output decompression parameters if required
-	    jpeg_start_output()		/* start a new output pass */
-	    for (all scanlines in image) {
-	        jpeg_read_scanlines()
-	        display scanlines
-	    }
-	    jpeg_finish_output()	/* terminate output pass */
-	}
-	jpeg_finish_decompress()
-	jpeg_destroy_decompress()
-
-This differs from ordinary unbuffered decoding in that there is an additional
-level of looping.  The application can choose how many output passes to make
-and how to display each pass.
-
-The simplest approach to displaying progressive images is to do one display
-pass for each scan appearing in the input file.  In this case the outer loop
-condition is typically
-	while (! jpeg_input_complete(&cinfo))
-and the start-output call should read
-	jpeg_start_output(&cinfo, cinfo.input_scan_number);
-The second parameter to jpeg_start_output() indicates which scan of the input
-file is to be displayed; the scans are numbered starting at 1 for this
-purpose.  (You can use a loop counter starting at 1 if you like, but using
-the library's input scan counter is easier.)  The library automatically reads
-data as necessary to complete each requested scan, and jpeg_finish_output()
-advances to the next scan or end-of-image marker (hence input_scan_number
-will be incremented by the time control arrives back at jpeg_start_output()).
-With this technique, data is read from the input file only as needed, and
-input and output processing run in lockstep.
-
-After reading the final scan and reaching the end of the input file, the
-buffered image remains available; it can be read additional times by
-repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output()
-sequence.  For example, a useful technique is to use fast one-pass color
-quantization for display passes made while the image is arriving, followed by
-a final display pass using two-pass quantization for highest quality.  This
-is done by changing the library parameters before the final output pass.
-Changing parameters between passes is discussed in detail below.
-
-In general the last scan of a progressive file cannot be recognized as such
-until after it is read, so a post-input display pass is the best approach if
-you want special processing in the final pass.
-
-When done with the image, be sure to call jpeg_finish_decompress() to release
-the buffered image (or just use jpeg_destroy_decompress()).
-
-If input data arrives faster than it can be displayed, the application can
-cause the library to decode input data in advance of what's needed to produce
-output.  This is done by calling the routine jpeg_consume_input().
-The return value is one of the following:
-	JPEG_REACHED_SOS:    reached an SOS marker (the start of a new scan)
-	JPEG_REACHED_EOI:    reached the EOI marker (end of image)
-	JPEG_ROW_COMPLETED:  completed reading one MCU row of compressed data
-	JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan
-	JPEG_SUSPENDED:      suspended before completing any of the above
-(JPEG_SUSPENDED can occur only if a suspending data source is used.)  This
-routine can be called at any time after initializing the JPEG object.  It
-reads some additional data and returns when one of the indicated significant
-events occurs.  (If called after the EOI marker is reached, it will
-immediately return JPEG_REACHED_EOI without attempting to read more data.)
-
-The library's output processing will automatically call jpeg_consume_input()
-whenever the output processing overtakes the input; thus, simple lockstep
-display requires no direct calls to jpeg_consume_input().  But by adding
-calls to jpeg_consume_input(), you can absorb data in advance of what is
-being displayed.  This has two benefits:
-  * You can limit buildup of unprocessed data in your input buffer.
-  * You can eliminate extra display passes by paying attention to the
-    state of the library's input processing.
-
-The first of these benefits only requires interspersing calls to
-jpeg_consume_input() with your display operations and any other processing
-you may be doing.  To avoid wasting cycles due to backtracking, it's best to
-call jpeg_consume_input() only after a hundred or so new bytes have arrived.
-This is discussed further under "I/O suspension", above.  (Note: the JPEG
-library currently is not thread-safe.  You must not call jpeg_consume_input()
-from one thread of control if a different library routine is working on the
-same JPEG object in another thread.)
-
-When input arrives fast enough that more than one new scan is available
-before you start a new output pass, you may as well skip the output pass
-corresponding to the completed scan.  This occurs for free if you pass
-cinfo.input_scan_number as the target scan number to jpeg_start_output().
-The input_scan_number field is simply the index of the scan currently being
-consumed by the input processor.  You can ensure that this is up-to-date by
-emptying the input buffer just before calling jpeg_start_output(): call
-jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or
-JPEG_REACHED_EOI.
-
-The target scan number passed to jpeg_start_output() is saved in the
-cinfo.output_scan_number field.  The library's output processing calls
-jpeg_consume_input() whenever the current input scan number and row within
-that scan is less than or equal to the current output scan number and row.
-Thus, input processing can "get ahead" of the output processing but is not
-allowed to "fall behind".  You can achieve several different effects by
-manipulating this interlock rule.  For example, if you pass a target scan
-number greater than the current input scan number, the output processor will
-wait until that scan starts to arrive before producing any output.  (To avoid
-an infinite loop, the target scan number is automatically reset to the last
-scan number when the end of image is reached.  Thus, if you specify a large
-target scan number, the library will just absorb the entire input file and
-then perform an output pass.  This is effectively the same as what
-jpeg_start_decompress() does when you don't select buffered-image mode.)
-When you pass a target scan number equal to the current input scan number,
-the image is displayed no faster than the current input scan arrives.  The
-final possibility is to pass a target scan number less than the current input
-scan number; this disables the input/output interlock and causes the output
-processor to simply display whatever it finds in the image buffer, without
-waiting for input.  (However, the library will not accept a target scan
-number less than one, so you can't avoid waiting for the first scan.)
-
-When data is arriving faster than the output display processing can advance
-through the image, jpeg_consume_input() will store data into the buffered
-image beyond the point at which the output processing is reading data out
-again.  If the input arrives fast enough, it may "wrap around" the buffer to
-the point where the input is more than one whole scan ahead of the output.
-If the output processing simply proceeds through its display pass without
-paying attention to the input, the effect seen on-screen is that the lower
-part of the image is one or more scans better in quality than the upper part.
-Then, when the next output scan is started, you have a choice of what target
-scan number to use.  The recommended choice is to use the current input scan
-number at that time, which implies that you've skipped the output scans
-corresponding to the input scans that were completed while you processed the
-previous output scan.  In this way, the decoder automatically adapts its
-speed to the arriving data, by skipping output scans as necessary to keep up
-with the arriving data.
-
-When using this strategy, you'll want to be sure that you perform a final
-output pass after receiving all the data; otherwise your last display may not
-be full quality across the whole screen.  So the right outer loop logic is
-something like this:
-	do {
-	    absorb any waiting input by calling jpeg_consume_input()
-	    final_pass = jpeg_input_complete(&cinfo);
-	    adjust output decompression parameters if required
-	    jpeg_start_output(&cinfo, cinfo.input_scan_number);
-	    ...
-	    jpeg_finish_output()
-	} while (! final_pass);
-rather than quitting as soon as jpeg_input_complete() returns TRUE.  This
-arrangement makes it simple to use higher-quality decoding parameters
-for the final pass.  But if you don't want to use special parameters for
-the final pass, the right loop logic is like this:
-	for (;;) {
-	    absorb any waiting input by calling jpeg_consume_input()
-	    jpeg_start_output(&cinfo, cinfo.input_scan_number);
-	    ...
-	    jpeg_finish_output()
-	    if (jpeg_input_complete(&cinfo) &&
-	        cinfo.input_scan_number == cinfo.output_scan_number)
-	      break;
-	}
-In this case you don't need to know in advance whether an output pass is to
-be the last one, so it's not necessary to have reached EOF before starting
-the final output pass; rather, what you want to test is whether the output
-pass was performed in sync with the final input scan.  This form of the loop
-will avoid an extra output pass whenever the decoder is able (or nearly able)
-to keep up with the incoming data.
-
-When the data transmission speed is high, you might begin a display pass,
-then find that much or all of the file has arrived before you can complete
-the pass.  (You can detect this by noting the JPEG_REACHED_EOI return code
-from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().)
-In this situation you may wish to abort the current display pass and start a
-new one using the newly arrived information.  To do so, just call
-jpeg_finish_output() and then start a new pass with jpeg_start_output().
-
-A variant strategy is to abort and restart display if more than one complete
-scan arrives during an output pass; this can be detected by noting
-JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number.  This
-idea should be employed with caution, however, since the display process
-might never get to the bottom of the image before being aborted, resulting
-in the lower part of the screen being several passes worse than the upper.
-In most cases it's probably best to abort an output pass only if the whole
-file has arrived and you want to begin the final output pass immediately.
-
-When receiving data across a communication link, we recommend always using
-the current input scan number for the output target scan number; if a
-higher-quality final pass is to be done, it should be started (aborting any
-incomplete output pass) as soon as the end of file is received.  However,
-many other strategies are possible.  For example, the application can examine
-the parameters of the current input scan and decide whether to display it or
-not.  If the scan contains only chroma data, one might choose not to use it
-as the target scan, expecting that the scan will be small and will arrive
-quickly.  To skip to the next scan, call jpeg_consume_input() until it
-returns JPEG_REACHED_SOS or JPEG_REACHED_EOI.  Or just use the next higher
-number as the target scan for jpeg_start_output(); but that method doesn't
-let you inspect the next scan's parameters before deciding to display it.
-
-
-In buffered-image mode, jpeg_start_decompress() never performs input and
-thus never suspends.  An application that uses input suspension with
-buffered-image mode must be prepared for suspension returns from these
-routines:
-* jpeg_start_output() performs input only if you request 2-pass quantization
-  and the target scan isn't fully read yet.  (This is discussed below.)
-* jpeg_read_scanlines(), as always, returns the number of scanlines that it
-  was able to produce before suspending.
-* jpeg_finish_output() will read any markers following the target scan,
-  up to the end of the file or the SOS marker that begins another scan.
-  (But it reads no input if jpeg_consume_input() has already reached the
-  end of the file or a SOS marker beyond the target output scan.)
-* jpeg_finish_decompress() will read until the end of file, and thus can
-  suspend if the end hasn't already been reached (as can be tested by
-  calling jpeg_input_complete()).
-jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress()
-all return TRUE if they completed their tasks, FALSE if they had to suspend.
-In the event of a FALSE return, the application must load more input data
-and repeat the call.  Applications that use non-suspending data sources need
-not check the return values of these three routines.
-
-
-It is possible to change decoding parameters between output passes in the
-buffered-image mode.  The decoder library currently supports only very
-limited changes of parameters.  ONLY THE FOLLOWING parameter changes are
-allowed after jpeg_start_decompress() is called:
-* dct_method can be changed before each call to jpeg_start_output().
-  For example, one could use a fast DCT method for early scans, changing
-  to a higher quality method for the final scan.
-* dither_mode can be changed before each call to jpeg_start_output();
-  of course this has no impact if not using color quantization.  Typically
-  one would use ordered dither for initial passes, then switch to
-  Floyd-Steinberg dither for the final pass.  Caution: changing dither mode
-  can cause more memory to be allocated by the library.  Although the amount
-  of memory involved is not large (a scanline or so), it may cause the
-  initial max_memory_to_use specification to be exceeded, which in the worst
-  case would result in an out-of-memory failure.
-* do_block_smoothing can be changed before each call to jpeg_start_output().
-  This setting is relevant only when decoding a progressive JPEG image.
-  During the first DC-only scan, block smoothing provides a very "fuzzy" look
-  instead of the very "blocky" look seen without it; which is better seems a
-  matter of personal taste.  But block smoothing is nearly always a win
-  during later stages, especially when decoding a successive-approximation
-  image: smoothing helps to hide the slight blockiness that otherwise shows
-  up on smooth gradients until the lowest coefficient bits are sent.
-* Color quantization mode can be changed under the rules described below.
-  You *cannot* change between full-color and quantized output (because that
-  would alter the required I/O buffer sizes), but you can change which
-  quantization method is used.
-
-When generating color-quantized output, changing quantization method is a
-very useful way of switching between high-speed and high-quality display.
-The library allows you to change among its three quantization methods:
-1. Single-pass quantization to a fixed color cube.
-   Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL.
-2. Single-pass quantization to an application-supplied colormap.
-   Selected by setting cinfo.colormap to point to the colormap (the value of
-   two_pass_quantize is ignored); also set cinfo.actual_number_of_colors.
-3. Two-pass quantization to a colormap chosen specifically for the image.
-   Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL.
-   (This is the default setting selected by jpeg_read_header, but it is
-   probably NOT what you want for the first pass of progressive display!)
-These methods offer successively better quality and lesser speed.  However,
-only the first method is available for quantizing in non-RGB color spaces.
-
-IMPORTANT: because the different quantizer methods have very different
-working-storage requirements, the library requires you to indicate which
-one(s) you intend to use before you call jpeg_start_decompress().  (If we did
-not require this, the max_memory_to_use setting would be a complete fiction.)
-You do this by setting one or more of these three cinfo fields to TRUE:
-	enable_1pass_quant		Fixed color cube colormap
-	enable_external_quant		Externally-supplied colormap
-	enable_2pass_quant		Two-pass custom colormap
-All three are initialized FALSE by jpeg_read_header().  But
-jpeg_start_decompress() automatically sets TRUE the one selected by the
-current two_pass_quantize and colormap settings, so you only need to set the
-enable flags for any other quantization methods you plan to change to later.
-
-After setting the enable flags correctly at jpeg_start_decompress() time, you
-can change to any enabled quantization method by setting two_pass_quantize
-and colormap properly just before calling jpeg_start_output().  The following
-special rules apply:
-1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass
-   or 2-pass mode from a different mode, or when you want the 2-pass
-   quantizer to be re-run to generate a new colormap.
-2. To switch to an external colormap, or to change to a different external
-   colormap than was used on the prior pass, you must call
-   jpeg_new_colormap() after setting cinfo.colormap.
-NOTE: if you want to use the same colormap as was used in the prior pass,
-you should not do either of these things.  This will save some nontrivial
-switchover costs.
-(These requirements exist because cinfo.colormap will always be non-NULL
-after completing a prior output pass, since both the 1-pass and 2-pass
-quantizers set it to point to their output colormaps.  Thus you have to
-do one of these two things to notify the library that something has changed.
-Yup, it's a bit klugy, but it's necessary to do it this way for backwards
-compatibility.)
-
-Note that in buffered-image mode, the library generates any requested colormap
-during jpeg_start_output(), not during jpeg_start_decompress().
-
-When using two-pass quantization, jpeg_start_output() makes a pass over the
-buffered image to determine the optimum color map; it therefore may take a
-significant amount of time, whereas ordinarily it does little work.  The
-progress monitor hook is called during this pass, if defined.  It is also
-important to realize that if the specified target scan number is greater than
-or equal to the current input scan number, jpeg_start_output() will attempt
-to consume input as it makes this pass.  If you use a suspending data source,
-you need to check for a FALSE return from jpeg_start_output() under these
-conditions.  The combination of 2-pass quantization and a not-yet-fully-read
-target scan is the only case in which jpeg_start_output() will consume input.
-
-
-Application authors who support buffered-image mode may be tempted to use it
-for all JPEG images, even single-scan ones.  This will work, but it is
-inefficient: there is no need to create an image-sized coefficient buffer for
-single-scan images.  Requesting buffered-image mode for such an image wastes
-memory.  Worse, it can cost time on large images, since the buffered data has
-to be swapped out or written to a temporary file.  If you are concerned about
-maximum performance on baseline JPEG files, you should use buffered-image
-mode only when the incoming file actually has multiple scans.  This can be
-tested by calling jpeg_has_multiple_scans(), which will return a correct
-result at any time after jpeg_read_header() completes.
-
-It is also worth noting that when you use jpeg_consume_input() to let input
-processing get ahead of output processing, the resulting pattern of access to
-the coefficient buffer is quite nonsequential.  It's best to use the memory
-manager jmemnobs.c if you can (ie, if you have enough real or virtual main
-memory).  If not, at least make sure that max_memory_to_use is set as high as
-possible.  If the JPEG memory manager has to use a temporary file, you will
-probably see a lot of disk traffic and poor performance.  (This could be
-improved with additional work on the memory manager, but we haven't gotten
-around to it yet.)
-
-In some applications it may be convenient to use jpeg_consume_input() for all
-input processing, including reading the initial markers; that is, you may
-wish to call jpeg_consume_input() instead of jpeg_read_header() during
-startup.  This works, but note that you must check for JPEG_REACHED_SOS and
-JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes.
-Once the first SOS marker has been reached, you must call
-jpeg_start_decompress() before jpeg_consume_input() will consume more input;
-it'll just keep returning JPEG_REACHED_SOS until you do.  If you read a
-tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI
-without ever returning JPEG_REACHED_SOS; be sure to check for this case.
-If this happens, the decompressor will not read any more input until you call
-jpeg_abort() to reset it.  It is OK to call jpeg_consume_input() even when not
-using buffered-image mode, but in that case it's basically a no-op after the
-initial markers have been read: it will just return JPEG_SUSPENDED.
-
-
-Abbreviated datastreams and multiple images
--------------------------------------------
-
-A JPEG compression or decompression object can be reused to process multiple
-images.  This saves a small amount of time per image by eliminating the
-"create" and "destroy" operations, but that isn't the real purpose of the
-feature.  Rather, reuse of an object provides support for abbreviated JPEG
-datastreams.  Object reuse can also simplify processing a series of images in
-a single input or output file.  This section explains these features.
-
-A JPEG file normally contains several hundred bytes worth of quantization
-and Huffman tables.  In a situation where many images will be stored or
-transmitted with identical tables, this may represent an annoying overhead.
-The JPEG standard therefore permits tables to be omitted.  The standard
-defines three classes of JPEG datastreams:
-  * "Interchange" datastreams contain an image and all tables needed to decode
-     the image.  These are the usual kind of JPEG file.
-  * "Abbreviated image" datastreams contain an image, but are missing some or
-    all of the tables needed to decode that image.
-  * "Abbreviated table specification" (henceforth "tables-only") datastreams
-    contain only table specifications.
-To decode an abbreviated image, it is necessary to load the missing table(s)
-into the decoder beforehand.  This can be accomplished by reading a separate
-tables-only file.  A variant scheme uses a series of images in which the first
-image is an interchange (complete) datastream, while subsequent ones are
-abbreviated and rely on the tables loaded by the first image.  It is assumed
-that once the decoder has read a table, it will remember that table until a
-new definition for the same table number is encountered.
-
-It is the application designer's responsibility to figure out how to associate
-the correct tables with an abbreviated image.  While abbreviated datastreams
-can be useful in a closed environment, their use is strongly discouraged in
-any situation where data exchange with other applications might be needed.
-Caveat designer.
-
-The JPEG library provides support for reading and writing any combination of
-tables-only datastreams and abbreviated images.  In both compression and
-decompression objects, a quantization or Huffman table will be retained for
-the lifetime of the object, unless it is overwritten by a new table definition.
-
-
-To create abbreviated image datastreams, it is only necessary to tell the
-compressor not to emit some or all of the tables it is using.  Each
-quantization and Huffman table struct contains a boolean field "sent_table",
-which normally is initialized to FALSE.  For each table used by the image, the
-header-writing process emits the table and sets sent_table = TRUE unless it is
-already TRUE.  (In normal usage, this prevents outputting the same table
-definition multiple times, as would otherwise occur because the chroma
-components typically share tables.)  Thus, setting this field to TRUE before
-calling jpeg_start_compress() will prevent the table from being written at
-all.
-
-If you want to create a "pure" abbreviated image file containing no tables,
-just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the
-tables.  If you want to emit some but not all tables, you'll need to set the
-individual sent_table fields directly.
-
-To create an abbreviated image, you must also call jpeg_start_compress()
-with a second parameter of FALSE, not TRUE.  Otherwise jpeg_start_compress()
-will force all the sent_table fields to FALSE.  (This is a safety feature to
-prevent abbreviated images from being created accidentally.)
-
-To create a tables-only file, perform the same parameter setup that you
-normally would, but instead of calling jpeg_start_compress() and so on, call
-jpeg_write_tables(&cinfo).  This will write an abbreviated datastream
-containing only SOI, DQT and/or DHT markers, and EOI.  All the quantization
-and Huffman tables that are currently defined in the compression object will
-be emitted unless their sent_tables flag is already TRUE, and then all the
-sent_tables flags will be set TRUE.
-
-A sure-fire way to create matching tables-only and abbreviated image files
-is to proceed as follows:
-
-	create JPEG compression object
-	set JPEG parameters
-	set destination to tables-only file
-	jpeg_write_tables(&cinfo);
-	set destination to image file
-	jpeg_start_compress(&cinfo, FALSE);
-	write data...
-	jpeg_finish_compress(&cinfo);
-
-Since the JPEG parameters are not altered between writing the table file and
-the abbreviated image file, the same tables are sure to be used.  Of course,
-you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence
-many times to produce many abbreviated image files matching the table file.
-
-You cannot suppress output of the computed Huffman tables when Huffman
-optimization is selected.  (If you could, there'd be no way to decode the
-image...)  Generally, you don't want to set optimize_coding = TRUE when
-you are trying to produce abbreviated files.
-
-In some cases you might want to compress an image using tables which are
-not stored in the application, but are defined in an interchange or
-tables-only file readable by the application.  This can be done by setting up
-a JPEG decompression object to read the specification file, then copying the
-tables into your compression object.  See jpeg_copy_critical_parameters()
-for an example of copying quantization tables.
-
-
-To read abbreviated image files, you simply need to load the proper tables
-into the decompression object before trying to read the abbreviated image.
-If the proper tables are stored in the application program, you can just
-allocate the table structs and fill in their contents directly.  For example,
-to load a fixed quantization table into table slot "n":
-
-    if (cinfo.quant_tbl_ptrs[n] == NULL)
-      cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
-    quant_ptr = cinfo.quant_tbl_ptrs[n];	/* quant_ptr is JQUANT_TBL* */
-    for (i = 0; i < 64; i++) {
-      /* Qtable[] is desired quantization table, in natural array order */
-      quant_ptr->quantval[i] = Qtable[i];
-    }
-
-Code to load a fixed Huffman table is typically (for AC table "n"):
-
-    if (cinfo.ac_huff_tbl_ptrs[n] == NULL)
-      cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo);
-    huff_ptr = cinfo.ac_huff_tbl_ptrs[n];	/* huff_ptr is JHUFF_TBL* */
-    for (i = 1; i <= 16; i++) {
-      /* counts[i] is number of Huffman codes of length i bits, i=1..16 */
-      huff_ptr->bits[i] = counts[i];
-    }
-    for (i = 0; i < 256; i++) {
-      /* symbols[] is the list of Huffman symbols, in code-length order */
-      huff_ptr->huffval[i] = symbols[i];
-    }
-
-(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a
-constant JQUANT_TBL object is not safe.  If the incoming file happened to
-contain a quantization table definition, your master table would get
-overwritten!  Instead allocate a working table copy and copy the master table
-into it, as illustrated above.  Ditto for Huffman tables, of course.)
-
-You might want to read the tables from a tables-only file, rather than
-hard-wiring them into your application.  The jpeg_read_header() call is
-sufficient to read a tables-only file.  You must pass a second parameter of
-FALSE to indicate that you do not require an image to be present.  Thus, the
-typical scenario is
-
-	create JPEG decompression object
-	set source to tables-only file
-	jpeg_read_header(&cinfo, FALSE);
-	set source to abbreviated image file
-	jpeg_read_header(&cinfo, TRUE);
-	set decompression parameters
-	jpeg_start_decompress(&cinfo);
-	read data...
-	jpeg_finish_decompress(&cinfo);
-
-In some cases, you may want to read a file without knowing whether it contains
-an image or just tables.  In that case, pass FALSE and check the return value
-from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found,
-JPEG_HEADER_TABLES_ONLY if only tables were found.  (A third return value,
-JPEG_SUSPENDED, is possible when using a suspending data source manager.)
-Note that jpeg_read_header() will not complain if you read an abbreviated
-image for which you haven't loaded the missing tables; the missing-table check
-occurs later, in jpeg_start_decompress().
-
-
-It is possible to read a series of images from a single source file by
-repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence,
-without releasing/recreating the JPEG object or the data source module.
-(If you did reinitialize, any partial bufferload left in the data source
-buffer at the end of one image would be discarded, causing you to lose the
-start of the next image.)  When you use this method, stored tables are
-automatically carried forward, so some of the images can be abbreviated images
-that depend on tables from earlier images.
-
-If you intend to write a series of images into a single destination file,
-you might want to make a specialized data destination module that doesn't
-flush the output buffer at term_destination() time.  This would speed things
-up by some trifling amount.  Of course, you'd need to remember to flush the
-buffer after the last image.  You can make the later images be abbreviated
-ones by passing FALSE to jpeg_start_compress().
-
-
-Special markers
----------------
-
-Some applications may need to insert or extract special data in the JPEG
-datastream.  The JPEG standard provides marker types "COM" (comment) and
-"APP0" through "APP15" (application) to hold application-specific data.
-Unfortunately, the use of these markers is not specified by the standard.
-COM markers are fairly widely used to hold user-supplied text.  The JFIF file
-format spec uses APP0 markers with specified initial strings to hold certain
-data.  Adobe applications use APP14 markers beginning with the string "Adobe"
-for miscellaneous data.  Other APPn markers are rarely seen, but might
-contain almost anything.
-
-If you wish to store user-supplied text, we recommend you use COM markers
-and place readable 7-bit ASCII text in them.  Newline conventions are not
-standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR
-(Mac style).  A robust COM reader should be able to cope with random binary
-garbage, including nulls, since some applications generate COM markers
-containing non-ASCII junk.  (But yours should not be one of them.)
-
-For program-supplied data, use an APPn marker, and be sure to begin it with an
-identifying string so that you can tell whether the marker is actually yours.
-It's probably best to avoid using APP0 or APP14 for any private markers.
-(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you
-not use APP8 markers for any private purposes, either.)
-
-Keep in mind that at most 65533 bytes can be put into one marker, but you
-can have as many markers as you like.
-
-By default, the IJG compression library will write a JFIF APP0 marker if the
-selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if
-the selected colorspace is RGB, CMYK, or YCCK.  You can disable this, but
-we don't recommend it.  The decompression library will recognize JFIF and
-Adobe markers and will set the JPEG colorspace properly when one is found.
-
-
-You can write special markers immediately following the datastream header by
-calling jpeg_write_marker() after jpeg_start_compress() and before the first
-call to jpeg_write_scanlines().  When you do this, the markers appear after
-the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before
-all else.  Specify the marker type parameter as "JPEG_COM" for COM or
-"JPEG_APP0 + n" for APPn.  (Actually, jpeg_write_marker will let you write
-any marker type, but we don't recommend writing any other kinds of marker.)
-For example, to write a user comment string pointed to by comment_text:
-	jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text));
-
-If it's not convenient to store all the marker data in memory at once,
-you can instead call jpeg_write_m_header() followed by multiple calls to
-jpeg_write_m_byte().  If you do it this way, it's your responsibility to
-call jpeg_write_m_byte() exactly the number of times given in the length
-parameter to jpeg_write_m_header().  (This method lets you empty the
-output buffer partway through a marker, which might be important when
-using a suspending data destination module.  In any case, if you are using
-a suspending destination, you should flush its buffer after inserting
-any special markers.  See "I/O suspension".)
-
-Or, if you prefer to synthesize the marker byte sequence yourself,
-you can just cram it straight into the data destination module.
-
-If you are writing JFIF 1.02 extension markers (thumbnail images), don't
-forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the
-correct JFIF version number in the JFIF header marker.  The library's default
-is to write version 1.01, but that's wrong if you insert any 1.02 extension
-markers.  (We could probably get away with just defaulting to 1.02, but there
-used to be broken decoders that would complain about unknown minor version
-numbers.  To reduce compatibility risks it's safest not to write 1.02 unless
-you are actually using 1.02 extensions.)
-
-
-When reading, two methods of handling special markers are available:
-1. You can ask the library to save the contents of COM and/or APPn markers
-into memory, and then examine them at your leisure afterwards.
-2. You can supply your own routine to process COM and/or APPn markers
-on-the-fly as they are read.
-The first method is simpler to use, especially if you are using a suspending
-data source; writing a marker processor that copes with input suspension is
-not easy (consider what happens if the marker is longer than your available
-input buffer).  However, the second method conserves memory since the marker
-data need not be kept around after it's been processed.
-
-For either method, you'd normally set up marker handling after creating a
-decompression object and before calling jpeg_read_header(), because the
-markers of interest will typically be near the head of the file and so will
-be scanned by jpeg_read_header.  Once you've established a marker handling
-method, it will be used for the life of that decompression object
-(potentially many datastreams), unless you change it.  Marker handling is
-determined separately for COM markers and for each APPn marker code.
-
-
-To save the contents of special markers in memory, call
-	jpeg_save_markers(cinfo, marker_code, length_limit)
-where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n.
-(To arrange to save all the special marker types, you need to call this
-routine 17 times, for COM and APP0-APP15.)  If the incoming marker is longer
-than length_limit data bytes, only length_limit bytes will be saved; this
-parameter allows you to avoid chewing up memory when you only need to see the
-first few bytes of a potentially large marker.  If you want to save all the
-data, set length_limit to 0xFFFF; that is enough since marker lengths are only
-16 bits.  As a special case, setting length_limit to 0 prevents that marker
-type from being saved at all.  (That is the default behavior, in fact.)
-
-After jpeg_read_header() completes, you can examine the special markers by
-following the cinfo->marker_list pointer chain.  All the special markers in
-the file appear in this list, in order of their occurrence in the file (but
-omitting any markers of types you didn't ask for).  Both the original data
-length and the saved data length are recorded for each list entry; the latter
-will not exceed length_limit for the particular marker type.  Note that these
-lengths exclude the marker length word, whereas the stored representation
-within the JPEG file includes it.  (Hence the maximum data length is really
-only 65533.)
-
-It is possible that additional special markers appear in the file beyond the
-SOS marker at which jpeg_read_header stops; if so, the marker list will be
-extended during reading of the rest of the file.  This is not expected to be
-common, however.  If you are short on memory you may want to reset the length
-limit to zero for all marker types after finishing jpeg_read_header, to
-ensure that the max_memory_to_use setting cannot be exceeded due to addition
-of later markers.
-
-The marker list remains stored until you call jpeg_finish_decompress or
-jpeg_abort, at which point the memory is freed and the list is set to empty.
-(jpeg_destroy also releases the storage, of course.)
-
-Note that the library is internally interested in APP0 and APP14 markers;
-if you try to set a small nonzero length limit on these types, the library
-will silently force the length up to the minimum it wants.  (But you can set
-a zero length limit to prevent them from being saved at all.)  Also, in a
-16-bit environment, the maximum length limit may be constrained to less than
-65533 by malloc() limitations.  It is therefore best not to assume that the
-effective length limit is exactly what you set it to be.
-
-
-If you want to supply your own marker-reading routine, you do it by calling
-jpeg_set_marker_processor().  A marker processor routine must have the
-signature
-	boolean jpeg_marker_parser_method (j_decompress_ptr cinfo)
-Although the marker code is not explicitly passed, the routine can find it
-in cinfo->unread_marker.  At the time of call, the marker proper has been
-read from the data source module.  The processor routine is responsible for
-reading the marker length word and the remaining parameter bytes, if any.
-Return TRUE to indicate success.  (FALSE should be returned only if you are
-using a suspending data source and it tells you to suspend.  See the standard
-marker processors in jdmarker.c for appropriate coding methods if you need to
-use a suspending data source.)
-
-If you override the default APP0 or APP14 processors, it is up to you to
-recognize JFIF and Adobe markers if you want colorspace recognition to occur
-properly.  We recommend copying and extending the default processors if you
-want to do that.  (A better idea is to save these marker types for later
-examination by calling jpeg_save_markers(); that method doesn't interfere
-with the library's own processing of these markers.)
-
-jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive
---- if you call one it overrides any previous call to the other, for the
-particular marker type specified.
-
-A simple example of an external COM processor can be found in djpeg.c.
-Also, see jpegtran.c for an example of using jpeg_save_markers.
-
-
-Raw (downsampled) image data
-----------------------------
-
-Some applications need to supply already-downsampled image data to the JPEG
-compressor, or to receive raw downsampled data from the decompressor.  The
-library supports this requirement by allowing the application to write or
-read raw data, bypassing the normal preprocessing or postprocessing steps.
-The interface is different from the standard one and is somewhat harder to
-use.  If your interest is merely in bypassing color conversion, we recommend
-that you use the standard interface and simply set jpeg_color_space =
-in_color_space (or jpeg_color_space = out_color_space for decompression).
-The mechanism described in this section is necessary only to supply or
-receive downsampled image data, in which not all components have the same
-dimensions.
-
-
-To compress raw data, you must supply the data in the colorspace to be used
-in the JPEG file (please read the earlier section on Special color spaces)
-and downsampled to the sampling factors specified in the JPEG parameters.
-You must supply the data in the format used internally by the JPEG library,
-namely a JSAMPIMAGE array.  This is an array of pointers to two-dimensional
-arrays, each of type JSAMPARRAY.  Each 2-D array holds the values for one
-color component.  This structure is necessary since the components are of
-different sizes.  If the image dimensions are not a multiple of the MCU size,
-you must also pad the data correctly (usually, this is done by replicating
-the last column and/or row).  The data must be padded to a multiple of a DCT
-block in each component: that is, each downsampled row must contain a
-multiple of 8 valid samples, and there must be a multiple of 8 sample rows
-for each component.  (For applications such as conversion of digital TV
-images, the standard image size is usually a multiple of the DCT block size,
-so that no padding need actually be done.)
-
-The procedure for compression of raw data is basically the same as normal
-compression, except that you call jpeg_write_raw_data() in place of
-jpeg_write_scanlines().  Before calling jpeg_start_compress(), you must do
-the following:
-  * Set cinfo->raw_data_in to TRUE.  (It is set FALSE by jpeg_set_defaults().)
-    This notifies the library that you will be supplying raw data.
-  * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace()
-    call is a good idea.  Note that since color conversion is bypassed,
-    in_color_space is ignored, except that jpeg_set_defaults() uses it to
-    choose the default jpeg_color_space setting.
-  * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and
-    cinfo->comp_info[i].v_samp_factor, are correct.  Since these indicate the
-    dimensions of the data you are supplying, it's wise to set them
-    explicitly, rather than assuming the library's defaults are what you want.
-
-To pass raw data to the library, call jpeg_write_raw_data() in place of
-jpeg_write_scanlines().  The two routines work similarly except that
-jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY.
-The scanlines count passed to and returned from jpeg_write_raw_data is
-measured in terms of the component with the largest v_samp_factor.
-
-jpeg_write_raw_data() processes one MCU row per call, which is to say
-v_samp_factor*DCTSIZE sample rows of each component.  The passed num_lines
-value must be at least max_v_samp_factor*DCTSIZE, and the return value will
-be exactly that amount (or possibly some multiple of that amount, in future
-library versions).  This is true even on the last call at the bottom of the
-image; don't forget to pad your data as necessary.
-
-The required dimensions of the supplied data can be computed for each
-component as
-	cinfo->comp_info[i].width_in_blocks*DCTSIZE  samples per row
-	cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image
-after jpeg_start_compress() has initialized those fields.  If the valid data
-is smaller than this, it must be padded appropriately.  For some sampling
-factors and image sizes, additional dummy DCT blocks are inserted to make
-the image a multiple of the MCU dimensions.  The library creates such dummy
-blocks itself; it does not read them from your supplied data.  Therefore you
-need never pad by more than DCTSIZE samples.  An example may help here.
-Assume 2h2v downsampling of YCbCr data, that is
-	cinfo->comp_info[0].h_samp_factor = 2		for Y
-	cinfo->comp_info[0].v_samp_factor = 2
-	cinfo->comp_info[1].h_samp_factor = 1		for Cb
-	cinfo->comp_info[1].v_samp_factor = 1
-	cinfo->comp_info[2].h_samp_factor = 1		for Cr
-	cinfo->comp_info[2].v_samp_factor = 1
-and suppose that the nominal image dimensions (cinfo->image_width and
-cinfo->image_height) are 101x101 pixels.  Then jpeg_start_compress() will
-compute downsampled_width = 101 and width_in_blocks = 13 for Y,
-downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same
-for the height fields).  You must pad the Y data to at least 13*8 = 104
-columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows.  The
-MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
-scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
-sample rows of Y and 8 each of Cb and Cr.  A total of 7 MCU rows are needed,
-so you must pass a total of 7*16 = 112 "scanlines".  The last DCT block row
-of Y data is dummy, so it doesn't matter what you pass for it in the data
-arrays, but the scanlines count must total up to 112 so that all of the Cb
-and Cr data gets passed.
-
-Output suspension is supported with raw-data compression: if the data
-destination module suspends, jpeg_write_raw_data() will return 0.
-In this case the same data rows must be passed again on the next call.
-
-
-Decompression with raw data output implies bypassing all postprocessing:
-you cannot ask for rescaling or color quantization, for instance.  More
-seriously, you must deal with the color space and sampling factors present in
-the incoming file.  If your application only handles, say, 2h1v YCbCr data,
-you must check for and fail on other color spaces or other sampling factors.
-The library will not convert to a different color space for you.
-
-To obtain raw data output, set cinfo->raw_data_out = TRUE before
-jpeg_start_decompress() (it is set FALSE by jpeg_read_header()).  Be sure to
-verify that the color space and sampling factors are ones you can handle.
-Then call jpeg_read_raw_data() in place of jpeg_read_scanlines().  The
-decompression process is otherwise the same as usual.
-
-jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a
-buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is
-the same as for raw-data compression).  The buffer you pass must be large
-enough to hold the actual data plus padding to DCT-block boundaries.  As with
-compression, any entirely dummy DCT blocks are not processed so you need not
-allocate space for them, but the total scanline count includes them.  The
-above example of computing buffer dimensions for raw-data compression is
-equally valid for decompression.
-
-Input suspension is supported with raw-data decompression: if the data source
-module suspends, jpeg_read_raw_data() will return 0.  You can also use
-buffered-image mode to read raw data in multiple passes.
-
-
-Really raw data: DCT coefficients
----------------------------------
-
-It is possible to read or write the contents of a JPEG file as raw DCT
-coefficients.  This facility is mainly intended for use in lossless
-transcoding between different JPEG file formats.  Other possible applications
-include lossless cropping of a JPEG image, lossless reassembly of a
-multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc.
-
-To read the contents of a JPEG file as DCT coefficients, open the file and do
-jpeg_read_header() as usual.  But instead of calling jpeg_start_decompress()
-and jpeg_read_scanlines(), call jpeg_read_coefficients().  This will read the
-entire image into a set of virtual coefficient-block arrays, one array per
-component.  The return value is a pointer to an array of virtual-array
-descriptors.  Each virtual array can be accessed directly using the JPEG
-memory manager's access_virt_barray method (see Memory management, below,
-and also read structure.doc's discussion of virtual array handling).  Or,
-for simple transcoding to a different JPEG file format, the array list can
-just be handed directly to jpeg_write_coefficients().
-
-Each block in the block arrays contains quantized coefficient values in
-normal array order (not JPEG zigzag order).  The block arrays contain only
-DCT blocks containing real data; any entirely-dummy blocks added to fill out
-interleaved MCUs at the right or bottom edges of the image are discarded
-during reading and are not stored in the block arrays.  (The size of each
-block array can be determined from the width_in_blocks and height_in_blocks
-fields of the component's comp_info entry.)  This is also the data format
-expected by jpeg_write_coefficients().
-
-When you are done using the virtual arrays, call jpeg_finish_decompress()
-to release the array storage and return the decompression object to an idle
-state; or just call jpeg_destroy() if you don't need to reuse the object.
-
-If you use a suspending data source, jpeg_read_coefficients() will return
-NULL if it is forced to suspend; a non-NULL return value indicates successful
-completion.  You need not test for a NULL return value when using a
-non-suspending data source.
-
-It is also possible to call jpeg_read_coefficients() to obtain access to the
-decoder's coefficient arrays during a normal decode cycle in buffered-image
-mode.  This frammish might be useful for progressively displaying an incoming
-image and then re-encoding it without loss.  To do this, decode in buffered-
-image mode as discussed previously, then call jpeg_read_coefficients() after
-the last jpeg_finish_output() call.  The arrays will be available for your use
-until you call jpeg_finish_decompress().
-
-
-To write the contents of a JPEG file as DCT coefficients, you must provide
-the DCT coefficients stored in virtual block arrays.  You can either pass
-block arrays read from an input JPEG file by jpeg_read_coefficients(), or
-allocate virtual arrays from the JPEG compression object and fill them
-yourself.  In either case, jpeg_write_coefficients() is substituted for
-jpeg_start_compress() and jpeg_write_scanlines().  Thus the sequence is
-  * Create compression object
-  * Set all compression parameters as necessary
-  * Request virtual arrays if needed
-  * jpeg_write_coefficients()
-  * jpeg_finish_compress()
-  * Destroy or re-use compression object
-jpeg_write_coefficients() is passed a pointer to an array of virtual block
-array descriptors; the number of arrays is equal to cinfo.num_components.
-
-The virtual arrays need only have been requested, not realized, before
-jpeg_write_coefficients() is called.  A side-effect of
-jpeg_write_coefficients() is to realize any virtual arrays that have been
-requested from the compression object's memory manager.  Thus, when obtaining
-the virtual arrays from the compression object, you should fill the arrays
-after calling jpeg_write_coefficients().  The data is actually written out
-when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes
-the file header.
-
-When writing raw DCT coefficients, it is crucial that the JPEG quantization
-tables and sampling factors match the way the data was encoded, or the
-resulting file will be invalid.  For transcoding from an existing JPEG file,
-we recommend using jpeg_copy_critical_parameters().  This routine initializes
-all the compression parameters to default values (like jpeg_set_defaults()),
-then copies the critical information from a source decompression object.
-The decompression object should have just been used to read the entire
-JPEG input file --- that is, it should be awaiting jpeg_finish_decompress().
-
-jpeg_write_coefficients() marks all tables stored in the compression object
-as needing to be written to the output file (thus, it acts like
-jpeg_start_compress(cinfo, TRUE)).  This is for safety's sake, to avoid
-emitting abbreviated JPEG files by accident.  If you really want to emit an
-abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables'
-individual sent_table flags, between calling jpeg_write_coefficients() and
-jpeg_finish_compress().
-
-
-Progress monitoring
--------------------
-
-Some applications may need to regain control from the JPEG library every so
-often.  The typical use of this feature is to produce a percent-done bar or
-other progress display.  (For a simple example, see cjpeg.c or djpeg.c.)
-Although you do get control back frequently during the data-transferring pass
-(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes
-will occur inside jpeg_finish_compress or jpeg_start_decompress; those
-routines may take a long time to execute, and you don't get control back
-until they are done.
-
-You can define a progress-monitor routine which will be called periodically
-by the library.  No guarantees are made about how often this call will occur,
-so we don't recommend you use it for mouse tracking or anything like that.
-At present, a call will occur once per MCU row, scanline, or sample row
-group, whichever unit is convenient for the current processing mode; so the
-wider the image, the longer the time between calls.  During the data
-transferring pass, only one call occurs per call of jpeg_read_scanlines or
-jpeg_write_scanlines, so don't pass a large number of scanlines at once if
-you want fine resolution in the progress count.  (If you really need to use
-the callback mechanism for time-critical tasks like mouse tracking, you could
-insert additional calls inside some of the library's inner loops.)
-
-To establish a progress-monitor callback, create a struct jpeg_progress_mgr,
-fill in its progress_monitor field with a pointer to your callback routine,
-and set cinfo->progress to point to the struct.  The callback will be called
-whenever cinfo->progress is non-NULL.  (This pointer is set to NULL by
-jpeg_create_compress or jpeg_create_decompress; the library will not change
-it thereafter.  So if you allocate dynamic storage for the progress struct,
-make sure it will live as long as the JPEG object does.  Allocating from the
-JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.)  You
-can use the same callback routine for both compression and decompression.
-
-The jpeg_progress_mgr struct contains four fields which are set by the library:
-	long pass_counter;	/* work units completed in this pass */
-	long pass_limit;	/* total number of work units in this pass */
-	int completed_passes;	/* passes completed so far */
-	int total_passes;	/* total number of passes expected */
-During any one pass, pass_counter increases from 0 up to (not including)
-pass_limit; the step size is usually but not necessarily 1.  The pass_limit
-value may change from one pass to another.  The expected total number of
-passes is in total_passes, and the number of passes already completed is in
-completed_passes.  Thus the fraction of work completed may be estimated as
-		completed_passes + (pass_counter/pass_limit)
-		--------------------------------------------
-				total_passes
-ignoring the fact that the passes may not be equal amounts of work.
-
-When decompressing, pass_limit can even change within a pass, because it
-depends on the number of scans in the JPEG file, which isn't always known in
-advance.  The computed fraction-of-work-done may jump suddenly (if the library
-discovers it has overestimated the number of scans) or even decrease (in the
-opposite case).  It is not wise to put great faith in the work estimate.
-
-When using the decompressor's buffered-image mode, the progress monitor work
-estimate is likely to be completely unhelpful, because the library has no way
-to know how many output passes will be demanded of it.  Currently, the library
-sets total_passes based on the assumption that there will be one more output
-pass if the input file end hasn't yet been read (jpeg_input_complete() isn't
-TRUE), but no more output passes if the file end has been reached when the
-output pass is started.  This means that total_passes will rise as additional
-output passes are requested.  If you have a way of determining the input file
-size, estimating progress based on the fraction of the file that's been read
-will probably be more useful than using the library's value.
-
-
-Memory management
------------------
-
-This section covers some key facts about the JPEG library's built-in memory
-manager.  For more info, please read structure.doc's section about the memory
-manager, and consult the source code if necessary.
-
-All memory and temporary file allocation within the library is done via the
-memory manager.  If necessary, you can replace the "back end" of the memory
-manager to control allocation yourself (for example, if you don't want the
-library to use malloc() and free() for some reason).
-
-Some data is allocated "permanently" and will not be freed until the JPEG
-object is destroyed.  Most data is allocated "per image" and is freed by
-jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort.  You can call the
-memory manager yourself to allocate structures that will automatically be
-freed at these times.  Typical code for this is
-  ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size);
-Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object.
-Use alloc_large instead of alloc_small for anything bigger than a few Kbytes.
-There are also alloc_sarray and alloc_barray routines that automatically
-build 2-D sample or block arrays.
-
-The library's minimum space requirements to process an image depend on the
-image's width, but not on its height, because the library ordinarily works
-with "strip" buffers that are as wide as the image but just a few rows high.
-Some operating modes (eg, two-pass color quantization) require full-image
-buffers.  Such buffers are treated as "virtual arrays": only the current strip
-need be in memory, and the rest can be swapped out to a temporary file.
-
-If you use the simplest memory manager back end (jmemnobs.c), then no
-temporary files are used; virtual arrays are simply malloc()'d.  Images bigger
-than memory can be processed only if your system supports virtual memory.
-The other memory manager back ends support temporary files of various flavors
-and thus work in machines without virtual memory.  They may also be useful on
-Unix machines if you need to process images that exceed available swap space.
-
-When using temporary files, the library will make the in-memory buffers for
-its virtual arrays just big enough to stay within a "maximum memory" setting.
-Your application can set this limit by setting cinfo->mem->max_memory_to_use
-after creating the JPEG object.  (Of course, there is still a minimum size for
-the buffers, so the max-memory setting is effective only if it is bigger than
-the minimum space needed.)  If you allocate any large structures yourself, you
-must allocate them before jpeg_start_compress() or jpeg_start_decompress() in
-order to have them counted against the max memory limit.  Also keep in mind
-that space allocated with alloc_small() is ignored, on the assumption that
-it's too small to be worth worrying about; so a reasonable safety margin
-should be left when setting max_memory_to_use.
-
-If you use the jmemname.c or jmemdos.c memory manager back end, it is
-important to clean up the JPEG object properly to ensure that the temporary
-files get deleted.  (This is especially crucial with jmemdos.c, where the
-"temporary files" may be extended-memory segments; if they are not freed,
-DOS will require a reboot to recover the memory.)  Thus, with these memory
-managers, it's a good idea to provide a signal handler that will trap any
-early exit from your program.  The handler should call either jpeg_abort()
-or jpeg_destroy() for any active JPEG objects.  A handler is not needed with
-jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either,
-since the C library is supposed to take care of deleting files made with
-tmpfile().
-
-
-Memory usage
-------------
-
-Working memory requirements while performing compression or decompression
-depend on image dimensions, image characteristics (such as colorspace and
-JPEG process), and operating mode (application-selected options).
-
-As of v6b, the decompressor requires:
- 1. About 24K in more-or-less-fixed-size data.  This varies a bit depending
-    on operating mode and image characteristics (particularly color vs.
-    grayscale), but it doesn't depend on image dimensions.
- 2. Strip buffers (of size proportional to the image width) for IDCT and
-    upsampling results.  The worst case for commonly used sampling factors
-    is about 34 bytes * width in pixels for a color image.  A grayscale image
-    only needs about 8 bytes per pixel column.
- 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG
-    file (including progressive JPEGs), or whenever you select buffered-image
-    mode.  This takes 2 bytes/coefficient.  At typical 2x2 sampling, that's
-    3 bytes per pixel for a color image.  Worst case (1x1 sampling) requires
-    6 bytes/pixel.  For grayscale, figure 2 bytes/pixel.
- 4. To perform 2-pass color quantization, the decompressor also needs a
-    128K color lookup table and a full-image pixel buffer (3 bytes/pixel).
-This does not count any memory allocated by the application, such as a
-buffer to hold the final output image.
-
-The above figures are valid for 8-bit JPEG data precision and a machine with
-32-bit ints.  For 12-bit JPEG data, double the size of the strip buffers and
-quantization pixel buffer.  The "fixed-size" data will be somewhat smaller
-with 16-bit ints, larger with 64-bit ints.  Also, CMYK or other unusual
-color spaces will require different amounts of space.
-
-The full-image coefficient and pixel buffers, if needed at all, do not
-have to be fully RAM resident; you can have the library use temporary
-files instead when the total memory usage would exceed a limit you set.
-(But if your OS supports virtual memory, it's probably better to just use
-jmemnobs and let the OS do the swapping.)
-
-The compressor's memory requirements are similar, except that it has no need
-for color quantization.  Also, it needs a full-image DCT coefficient buffer
-if Huffman-table optimization is asked for, even if progressive mode is not
-requested.
-
-If you need more detailed information about memory usage in a particular
-situation, you can enable the MEM_STATS code in jmemmgr.c.
-
-
-Library compile-time options
-----------------------------
-
-A number of compile-time options are available by modifying jmorecfg.h.
-
-The JPEG standard provides for both the baseline 8-bit DCT process and
-a 12-bit DCT process.  The IJG code supports 12-bit lossy JPEG if you define
-BITS_IN_JSAMPLE as 12 rather than 8.  Note that this causes JSAMPLE to be
-larger than a char, so it affects the surrounding application's image data.
-The sample applications cjpeg and djpeg can support 12-bit mode only for PPM
-and GIF file formats; you must disable the other file formats to compile a
-12-bit cjpeg or djpeg.  (install.doc has more information about that.)
-At present, a 12-bit library can handle *only* 12-bit images, not both
-precisions.  (If you need to include both 8- and 12-bit libraries in a single
-application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES
-for just one of the copies.  You'd have to access the 8-bit and 12-bit copies
-from separate application source files.  This is untested ... if you try it,
-we'd like to hear whether it works!)
-
-Note that a 12-bit library always compresses in Huffman optimization mode,
-in order to generate valid Huffman tables.  This is necessary because our
-default Huffman tables only cover 8-bit data.  If you need to output 12-bit
-files in one pass, you'll have to supply suitable default Huffman tables.
-You may also want to supply your own DCT quantization tables; the existing
-quality-scaling code has been developed for 8-bit use, and probably doesn't
-generate especially good tables for 12-bit.
-
-The maximum number of components (color channels) in the image is determined
-by MAX_COMPONENTS.  The JPEG standard allows up to 255 components, but we
-expect that few applications will need more than four or so.
-
-On machines with unusual data type sizes, you may be able to improve
-performance or reduce memory space by tweaking the various typedefs in
-jmorecfg.h.  In particular, on some RISC CPUs, access to arrays of "short"s
-is quite slow; consider trading memory for speed by making JCOEF, INT16, and
-UINT16 be "int" or "unsigned int".  UINT8 is also a candidate to become int.
-You probably don't want to make JSAMPLE be int unless you have lots of memory
-to burn.
-
-You can reduce the size of the library by compiling out various optional
-functions.  To do this, undefine xxx_SUPPORTED symbols as necessary.
-
-You can also save a few K by not having text error messages in the library;
-the standard error message table occupies about 5Kb.  This is particularly
-reasonable for embedded applications where there's no good way to display 
-a message anyway.  To do this, remove the creation of the message table
-(jpeg_std_message_table[]) from jerror.c, and alter format_message to do
-something reasonable without it.  You could output the numeric value of the
-message code number, for example.  If you do this, you can also save a couple
-more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing;
-you don't need trace capability anyway, right?
-
-
-Portability considerations
---------------------------
-
-The JPEG library has been written to be extremely portable; the sample
-applications cjpeg and djpeg are slightly less so.  This section summarizes
-the design goals in this area.  (If you encounter any bugs that cause the
-library to be less portable than is claimed here, we'd appreciate hearing
-about them.)
-
-The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of
-the popular system include file setups, and some not-so-popular ones too.
-See install.doc for configuration procedures.
-
-The code is not dependent on the exact sizes of the C data types.  As
-distributed, we make the assumptions that
-	char	is at least 8 bits wide
-	short	is at least 16 bits wide
-	int	is at least 16 bits wide
-	long	is at least 32 bits wide
-(These are the minimum requirements of the ANSI C standard.)  Wider types will
-work fine, although memory may be used inefficiently if char is much larger
-than 8 bits or short is much bigger than 16 bits.  The code should work
-equally well with 16- or 32-bit ints.
-
-In a system where these assumptions are not met, you may be able to make the
-code work by modifying the typedefs in jmorecfg.h.  However, you will probably
-have difficulty if int is less than 16 bits wide, since references to plain
-int abound in the code.
-
-char can be either signed or unsigned, although the code runs faster if an
-unsigned char type is available.  If char is wider than 8 bits, you will need
-to redefine JOCTET and/or provide custom data source/destination managers so
-that JOCTET represents exactly 8 bits of data on external storage.
-
-The JPEG library proper does not assume ASCII representation of characters.
-But some of the image file I/O modules in cjpeg/djpeg do have ASCII
-dependencies in file-header manipulation; so does cjpeg's select_file_type()
-routine.
-
-The JPEG library does not rely heavily on the C library.  In particular, C
-stdio is used only by the data source/destination modules and the error
-handler, all of which are application-replaceable.  (cjpeg/djpeg are more
-heavily dependent on stdio.)  malloc and free are called only from the memory
-manager "back end" module, so you can use a different memory allocator by
-replacing that one file.
-
-The code generally assumes that C names must be unique in the first 15
-characters.  However, global function names can be made unique in the
-first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES.
-
-More info about porting the code may be gleaned by reading jconfig.doc,
-jmorecfg.h, and jinclude.h.
-
-
-Notes for MS-DOS implementors
------------------------------
-
-The IJG code is designed to work efficiently in 80x86 "small" or "medium"
-memory models (i.e., data pointers are 16 bits unless explicitly declared
-"far"; code pointers can be either size).  You may be able to use small
-model to compile cjpeg or djpeg by itself, but you will probably have to use
-medium model for any larger application.  This won't make much difference in
-performance.  You *will* take a noticeable performance hit if you use a
-large-data memory model (perhaps 10%-25%), and you should avoid "huge" model
-if at all possible.
-
-The JPEG library typically needs 2Kb-3Kb of stack space.  It will also
-malloc about 20K-30K of near heap space while executing (and lots of far
-heap, but that doesn't count in this calculation).  This figure will vary
-depending on selected operating mode, and to a lesser extent on image size.
-There is also about 5Kb-6Kb of constant data which will be allocated in the
-near data segment (about 4Kb of this is the error message table).
-Thus you have perhaps 20K available for other modules' static data and near
-heap space before you need to go to a larger memory model.  The C library's
-static data will account for several K of this, but that still leaves a good
-deal for your needs.  (If you are tight on space, you could reduce the sizes
-of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to
-1K.  Another possibility is to move the error message table to far memory;
-this should be doable with only localized hacking on jerror.c.)
-
-About 2K of the near heap space is "permanent" memory that will not be
-released until you destroy the JPEG object.  This is only an issue if you
-save a JPEG object between compression or decompression operations.
-
-Far data space may also be a tight resource when you are dealing with large
-images.  The most memory-intensive case is decompression with two-pass color
-quantization, or single-pass quantization to an externally supplied color
-map.  This requires a 128Kb color lookup table plus strip buffers amounting
-to about 40 bytes per column for typical sampling ratios (eg, about 25600
-bytes for a 640-pixel-wide image).  You may not be able to process wide
-images if you have large data structures of your own.
-
-Of course, all of these concerns vanish if you use a 32-bit flat-memory-model
-compiler, such as DJGPP or Watcom C.  We highly recommend flat model if you
-can use it; the JPEG library is significantly faster in flat model.
diff --git a/tkimg1.3/libjpeg/libtool b/tkimg1.3/libjpeg/libtool
deleted file mode 100755
index c5355c6..0000000
--- a/tkimg1.3/libjpeg/libtool
+++ /dev/null
@@ -1,2624 +0,0 @@
-#! /bin/sh
-
-# libtool - Provide generalized library-building support services.
-# Generated automatically by ltconfig - GNU libtool 1.2
-# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
-#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This program was configured as follows,
-# on host localhost.localdomain:
-#
-# CC="" CFLAGS="" CPPFLAGS="" \
-# LD="" NM="" RANLIB="" LN_S="" \
-#   ./ltconfig --disable-static ./ltmain.sh
-#
-# Compiler and other test output produced by ltconfig, useful for
-# debugging ltconfig, is in ./config.log if it exists.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-
-# An echo program that does not interpret backslashes.
-echo="echo"
-
-# The version of ltconfig that generated this script.
-LTCONFIG_VERSION="1.2"
-
-# Shell to use when invoking shell scripts.
-SHELL=/bin/sh
-
-# Whether or not to build libtool libraries.
-build_libtool_libs=yes
-
-# Whether or not to build old-style libraries.
-build_old_libs=no
-
-# The host system.
-host_alias="i386-pc-linux-gnulibc1"
-host="i386-pc-linux-gnulibc1"
-
-# The archiver.
-AR="ar"
-
-# The default C compiler.
-CC="gcc"
-
-# The linker used to build libraries.
-LD="/usr/bin/ld"
-
-# Whether we need hard or soft links.
-LN_S="ln -s"
-
-# A BSD-compatible nm program.
-NM="/usr/bin/nm -B"
-
-# The name of the directory that contains temporary libtool files.
-objdir=".libs"
-
-# How to create reloadable object files.
-reload_flag=" -r"
-reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
-
-# How to pass a linker flag through the compiler.
-wl="-Wl,"
-
-# Additional compiler flags for building library objects.
-pic_flag=" -fPIC"
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=""
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
-
-# Library versioning type.
-version_type=linux
-
-# Format of library name prefix.
-libname_spec="lib\$name"
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec="\${libname}\${release}.so.\$versuffix \${libname}\${release}.so.\$major \$libname.so"
-
-# The coded name of the library, if different from the real name.
-soname_spec="\${libname}\${release}.so.\$major"
-
-# Commands used to build and install an old-style archive.
-RANLIB="ranlib"
-old_archive_cmds="\$AR cru \$oldlib\$oldobjs;\$RANLIB \$oldlib"
-old_postinstall_cmds="\$RANLIB \$oldlib;chmod 644 \$oldlib"
-old_postuninstall_cmds=""
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=""
-
-# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared \${wl}-soname \$wl\$soname -o \$lib\$libobjs"
-postinstall_cmds=""
-postuninstall_cmds=""
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=""
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds="PATH=\\\"\$PATH:/sbin\\\" ldconfig -n \$libdir"
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=""
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.* [ABCDGISTUW] \\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\1/p'"
-
-# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
-
-# This is the shared library path variable.
-shlibpath_var=LD_LIBRARY_PATH
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=immediate
-
-# Flag to hardcode $libdir into a binary during linking.
-# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=""
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=no
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=no
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=unsupported
-
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
-#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.2
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-
-if test "$LTCONFIG_VERSION" != "$VERSION"; then
-  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
-  arg="$1"
-  shift
-
-  case "$arg" in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case "$prev" in
-    execute_dlfiles)
-      eval "$prev=\"\$$prev \$arg\""
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case "$arg" in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION"
-    exit 0
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
-    else
-      echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
-    else
-      echo "disable static libraries"
-    fi
-    exit 0
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --quiet | --silent)
-    show=:
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    case "$nonopt" in
-    *cc | *++ | gcc* | *-gcc*)
-      mode=link
-      for arg
-      do
-        case "$arg" in
-        -c)
-           mode=compile
-           break
-           ;;
-        esac
-      done
-      ;;
-    *db | *dbx)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-        if test -n "$nonopt"; then
-          $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-        else
-          $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-        fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case "$mode" in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    lastarg=
-    srcfile="$nonopt"
-    suppress_output=
-
-    for arg
-    do
-      # Accept any command-line options.
-      case "$arg" in
-      -o)
-	$echo "$modename: you cannot specify the output filename with \`-o'" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-	;;
-
-      -static)
-	build_libtool_libs=no
-	build_old_libs=yes
-	continue
-	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
-
-      # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly in scan
-      # sets, so we specify it separately.
-      case "$lastarg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
-
-    # Get the name of the library object.
-    libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-
-    # Recognize several different file suffixes.
-    xform='[cCFSfms]'
-    case "$libobj" in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case "$libobj" in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      $run $rm $obj $libobj
-      trap "$run $rm $obj $libobj; exit 1" 1 2 15
-    else
-      $run $rm $libobj
-      trap "$run $rm $libobj; exit 1" 1 2 15
-    fi
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      # All platforms use -DPIC, to notify preprocessed assembler code.
-      $show "$base_compile$pic_flag -DPIC $srcfile"
-      if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
-      else
-        test -n "$obj" && $run $rm $obj
-        exit 1
-      fi
-
-      # If we have no pic_flag, then copy the object into place and finish.
-      if test -z "$pic_flag"; then
-        $show "$LN_S $obj $libobj"
-        $run $LN_S $obj $libobj
-        exit $?
-      fi
-
-      # Just move the object, then go on to compile the next one
-      $show "$mv $obj $libobj"
-      $run $mv $obj $libobj || exit 1
-
-      # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      # Suppress compiler output if we already did a PIC compilation.
-      $show "$base_compile $srcfile$suppress_output"
-      if $run eval "$base_compile \$srcfile$suppress_output"; then :
-      else
-        $run $rm $obj $libobj
-        exit 1
-      fi
-    fi
-
-    # Create an invalid libtool object if no PIC, so that we do not
-    # accidentally link it into a program.
-    if test "$build_libtool_libs" != yes; then
-      $show "echo timestamp > $libobj"
-      $run eval "echo timestamp > \$libobj" || exit $?
-    fi
-
-    exit 0
-    ;;
-
-  # libtool link mode
-  link)
-    modename="$modename: link"
-    CC="$nonopt"
-    allow_undefined=yes
-    compile_command="$CC"
-    finalize_command="$CC"
-
-    compile_shlibpath=
-    finalize_shlibpath=
-    deplibs=
-    dlfiles=
-    dlprefiles=
-    export_dynamic=no
-    hardcode_libdirs=
-    libobjs=
-    link_against_libtool_libs=
-    ltlibs=
-    objs=
-    prev=
-    prevarg=
-    release=
-    rpath=
-    perm_rpath=
-    temp_rpath=
-    vinfo=
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case "$arg" in
-      -all-static | -static)
-        if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-        fi
-        build_libtool_libs=no
-	build_old_libs=yes
-        break
-        ;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    for arg
-    do
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-        case "$prev" in
-        output)
-          compile_command="$compile_command @OUTPUT@"
-          finalize_command="$finalize_command @OUTPUT@"
-          ;;
-        esac
-
-        case "$prev" in
-        dlfiles|dlprefiles)
-          case "$arg" in
-          *.la | *.lo) ;;  # We handle these cases below.
-          *)
-            dlprefiles="$dlprefiles $arg"
-            test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
-            prev=
-            ;;
-          esac
-          ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-        rpath)
-          rpath="$rpath $arg"
-	  prev=
-	  continue
-	  ;;
-        *)
-          eval "$prev=\"\$arg\""
-          prev=
-          continue
-          ;;
-        esac
-      fi
-
-      prevarg="$arg"
-
-      case "$arg" in
-      -all-static)
-	if test -n "$link_static_flag"; then
-          compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-        fi
-        continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -dlopen)
-        prev=dlfiles
-        continue
-        ;;
-
-      -dlpreopen)
-        prev=dlprefiles
-        continue
-        ;;
-
-      -export-dynamic)
-        if test "$export_dynamic" != yes; then
-          export_dynamic=yes
-	  if test -n "$export_dynamic_flag_spec"; then
-	    eval arg=\"$export_dynamic_flag_spec\"
-	  else
-	    arg=
-	  fi
-
-          # Add the symbol object into the linking commands.
-	  compile_command="$compile_command @SYMFILE@"
-	  finalize_command="$finalize_command @SYMFILE@"
-        fi
-        ;;
-
-      -L*)
-        dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
-        case "$dir" in
-        /* | [A-Za-z]:\\*)
-	  # Add the corresponding hardcode_libdir_flag, if it is not identical.
-          ;;
-        *)
-          $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
-          exit 1
-          ;;
-        esac
-        deplibs="$deplibs $arg"
-        ;;
-
-      -l*) deplibs="$deplibs $arg" ;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-        prev=rpath
-        continue
-        ;;
-
-      -static)
-	# If we have no pic_flag, then this is the same as -all-static.
-	if test -z "$pic_flag" && test -n "$link_static_flag"; then
-          compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-        fi
-	continue
-	;;
-
-      -version-info)
-        prev=vinfo
-        continue
-        ;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-        ;;
-
-      *.o | *.a)
-        # A standard object.
-        objs="$objs $arg"
-        ;;
-
-      *.lo)
-        # A library object.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test "$build_libtool_libs" = yes; then
-	    prev=
-	    continue
-	  else
-	    # If libtool objects are unsupported, then we need to preload.
-	    prev=dlprefiles
-	  fi
-	fi
-
-	if test "$prev" = dlprefiles; then
-	  # Preload the old-style object.
-	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
-	  prev=
-	fi
-	libobjs="$libobjs $arg"
-        ;;
-
-      *.la)
-        # A libtool-controlled library.
-
-        dlname=
-        libdir=
-        library_names=
-        old_library=
-
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
-          exit 1
-        fi
-
-        # If there is no directory component, then add one.
-        case "$arg" in
-        */* | *\\*) . $arg ;;
-        *) . ./$arg ;;
-        esac
-
-        if test -z "$libdir"; then
-          $echo "$modename: \`$arg' contains no -rpath information" 1>&2
-          exit 1
-        fi
-
-        # Get the name of the library we link against.
-        linklib=
-        for l in $old_library $library_names; do
-          linklib="$l"
-        done
-
-        if test -z "$linklib"; then
-          $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
-          exit 1
-        fi
-
-        # Find the relevant object directory and library name.
-        name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
-        dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-        if test "X$dir" = "X$arg"; then
-          dir="$objdir"
-        else
-          dir="$dir/$objdir"
-        fi
-
-        # This library was specified with -dlopen.
-        if test "$prev" = dlfiles; then
-          dlfiles="$dlfiles $arg"
-          if test -z "$dlname"; then
-            # If there is no dlname, we need to preload.
-            prev=dlprefiles
-          else
-            # We should not create a dependency on this library, but we
-	    # may need any libraries it requires.
-	    compile_command="$compile_command$dependency_libs"
-	    finalize_command="$finalize_command$dependency_libs"
-            prev=
-            continue
-          fi
-        fi
-
-        # The library was specified with -dlpreopen.
-        if test "$prev" = dlprefiles; then
-          # Prefer using a static library (so that no silly _DYNAMIC symbols
-          # are required to link).
-          if test -n "$old_library"; then
-            dlprefiles="$dlprefiles $dir/$old_library"
-          else
-            dlprefiles="$dlprefiles $dir/$linklib"
-          fi
-          prev=
-        fi
-
-        if test "$build_libtool_libs" = yes && test -n "$library_names"; then
-          link_against_libtool_libs="$link_against_libtool_libs $arg"
-          if test -n "$shlibpath_var"; then
-            # Make sure the rpath contains only unique directories.
-            case "$temp_rpath " in
-            *" $dir "*) ;;
-            *) temp_rpath="$temp_rpath $dir" ;;
-            esac
-          fi
-
-	  # This is the magic to use -rpath.
-          if test -n "$hardcode_libdir_flag_spec"; then
-            if test -n "$hardcode_libdir_separator"; then
-              if test -z "$hardcode_libdirs"; then
-                # Put the magic libdir with the hardcode flag.
-                hardcode_libdirs="$libdir"
-                libdir="@HARDCODE_LIBDIRS@"
-              else
-                # Just accumulate the unique libdirs.
-		case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-		*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		  ;;
-		*)
-		  hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		  ;;
-		esac
-                libdir=
-              fi
-            fi
-
-            if test -n "$libdir"; then
-              eval flag=\"$hardcode_libdir_flag_spec\"
-
-              compile_command="$compile_command $flag"
-              finalize_command="$finalize_command $flag"
-            fi
-          elif test -n "$runpath_var"; then
-            # Do the same for the permanent run path.
-            case "$perm_rpath " in
-            *" $libdir "*) ;;
-            *) perm_rpath="$perm_rpath $libdir" ;;
-            esac
-          fi
-
-
-          case "$hardcode_action" in
-          immediate)
-            if test "$hardcode_direct" = no; then
-              compile_command="$compile_command $dir/$linklib"
-            elif test "$hardcode_minus_L" = no; then
-              compile_command="$compile_command -L$dir -l$name"
-            elif test "$hardcode_shlibpath_var" = no; then
-              compile_shlibpath="$compile_shlibpath$dir:"
-              compile_command="$compile_command -l$name"
-            fi
-            ;;
-
-          relink)
-            # We need an absolute path.
-            case "$dir" in
-            /* | [A-Za-z]:\\*) ;;
-            *)
-              absdir=`cd "$dir" && pwd`
-              if test -z "$absdir"; then
-                $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-                exit 1
-              fi
-              dir="$absdir"
-              ;;
-            esac
-
-            if test "$hardcode_direct" = yes; then
-              compile_command="$compile_command $dir/$linklib"
-            elif test "$hardcode_minus_L" = yes; then
-              compile_command="$compile_command -L$dir -l$name"
-            elif test "$hardcode_shlibpath_var" = yes; then
-              compile_shlibpath="$compile_shlibpath$dir:"
-              compile_command="$compile_command -l$name"
-            fi
-            ;;
-
-          *)
-            $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2
-            exit 1
-            ;;
-          esac
-
-          # Finalize command for both is simple: just hardcode it.
-          if test "$hardcode_direct" = yes; then
-            finalize_command="$finalize_command $libdir/$linklib"
-          elif test "$hardcode_minus_L" = yes; then
-            finalize_command="$finalize_command -L$libdir -l$name"
-          elif test "$hardcode_shlibpath_var" = yes; then
-            finalize_shlibpath="$finalize_shlibpath$libdir:"
-            finalize_command="$finalize_command -l$name"
-          else
-            # We cannot seem to hardcode it, guess we'll fake it.
-            finalize_command="$finalize_command -L$libdir -l$name"
-          fi
-        else
-          # Transform directly to old archives if we don't build new libraries.
-          if test -n "$pic_flag" && test -z "$old_library"; then
-            $echo "$modename: cannot find static library for \`$arg'" 1>&2
-            exit 1
-          fi
-
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_command="$compile_command $dir/$linklib"
-	    finalize_command="$finalize_command $dir/$linklib"
-	  else
-	    compile_command="$compile_command -L$dir -l$name"
-	    finalize_command="$finalize_command -L$dir -l$name"
-	  fi
-        fi
-
-	# Add in any libraries that this one depends upon.
-	compile_command="$compile_command$dependency_libs"
-	finalize_command="$finalize_command$dependency_libs"
-	continue
-        ;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-        ;;
-      esac
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$vinfo" && test -n "$release"; then
-      $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    oldlib=
-    oldobjs=
-    case "$output" in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-      ;;
-
-    */* | *\\*)
-      $echo "$modename: output file \`$output' must have no directory components" 1>&2
-      exit 1
-      ;;
-
-    *.a)
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      build_old_libs=yes
-      oldlib="$output"
-      $show "$rm $oldlib"
-      $run $rm $oldlib
-      ;;
-
-    *.la)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case "$output" in
-      lib*) ;;
-      *)
-	$echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-	;;
-      esac
-
-      name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-      eval libname=\"$libname_spec\"
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-      current=0
-      revision=0
-      age=0
-
-      if test -n "$objs"; then
-        $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
-        exit 1
-      fi
-
-      # How the heck are we supposed to write a wrapper for a shared library?
-      if test -n "$link_against_libtool_libs"; then
-        $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2
-        exit 1
-      fi
-
-      if test -n "$dlfiles$dlprefiles"; then
-        $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$rpath"; then
-        $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2
-	$echo "$help" 1>&2
-        exit 1
-      fi
-
-      set dummy $rpath
-      if test $# -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      # Parse the version information argument.
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
-      set dummy $vinfo
-      IFS="$save_ifs"
-
-      if test -n "$5"; then
-        $echo "$modename: too many parameters to \`-version-info'" 1>&2
-        $echo "$help" 1>&2
-        exit 1
-      fi
-
-      test -n "$2" && current="$2"
-      test -n "$3" && revision="$3"
-      test -n "$4" && age="$4"
-
-      # Check that each of the things are valid numbers.
-      case "$current" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      case "$revision" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      case "$age" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      if test $age -gt $current; then
-        $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-      fi
-
-      # Calculate the version variables.
-      version_vars="version_type current age revision"
-      case "$version_type" in
-      none) ;;
-
-      linux)
-        version_vars="$version_vars major versuffix"
-        major=`expr $current - $age`
-        versuffix="$major.$age.$revision"
-        ;;
-
-      osf)
-        version_vars="$version_vars versuffix verstring"
-        major=`expr $current - $age`
-        versuffix="$current.$age.$revision"
-        verstring="$versuffix"
-
-        # Add in all the interfaces that we are compatible with.
-        loop=$age
-        while test $loop != 0; do
-          iface=`expr $current - $loop`
-          loop=`expr $loop - 1`
-          verstring="$verstring:${iface}.0"
-        done
-
-        # Make executables depend on our current version.
-        verstring="$verstring:${current}.0"
-        ;;
-
-      sunos)
-        version_vars="$version_vars major versuffix"
-        major="$current"
-        versuffix="$current.$revision"
-        ;;
-
-      *)
-        $echo "$modename: unknown library version type \`$version_type'" 1>&2
-        echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-        exit 1
-        ;;
-      esac
-
-      # Create the output directory, or remove our outputs if we need to.
-      if test -d $objdir; then
-        $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
-        $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
-      else
-        $show "$mkdir $objdir"
-        $run $mkdir $objdir
-	status=$?
-	if test $status -eq 0 || test -d $objdir; then :
-	else
-	  exit $status
-	fi
-      fi
-
-      # Check to see if the archive will have undefined symbols.
-      if test "$allow_undefined" = yes; then
-        if test "$allow_undefined_flag" = unsupported; then
-          $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-          build_libtool_libs=no
-	  build_old_libs=yes
-        fi
-      else
-        # Don't allow undefined symbols.
-        allow_undefined_flag="$no_undefined_flag"
-      fi
-
-      # Add libc to deplibs on all systems.
-      dependency_libs="$deplibs"
-      deplibs="$deplibs -lc"
-
-      if test "$build_libtool_libs" = yes; then
-        # Get the real and link names of the library.
-        eval library_names=\"$library_names_spec\"
-        set dummy $library_names
-        realname="$2"
-        shift; shift
-
-        if test -n "$soname_spec"; then
-          eval soname=\"$soname_spec\"
-        else
-          soname="$realname"
-        fi
-
-        lib="$objdir/$realname"
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-        # Use standard objects if they are PIC.
-        test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-        # Do each of the archive commands.
-        eval cmds=\"$archive_cmds\"
-        IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-        for cmd in $cmds; do
-          IFS="$save_ifs"
-          $show "$cmd"
-          $run eval "$cmd" || exit $?
-        done
-        IFS="$save_ifs"
-
-        # Create links to the real library.
-        for linkname in $linknames; do
-          $show "(cd $objdir && $LN_S $realname $linkname)"
-          $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $?
-        done
-
-        # If -export-dynamic was specified, set the dlname.
-        if test "$export_dynamic" = yes; then
-          # On all known operating systems, these are identical.
-          dlname="$soname"
-        fi
-      fi
-
-      # Now set the variables for building old libraries.
-      oldlib="$objdir/$libname.a"
-      ;;
-
-    *.lo | *.o)
-      if test -n "$link_against_libtool_libs"; then
-        $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2
-        exit 1
-      fi
-
-      if test -n "$deplibs"; then
-        $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles"; then
-        $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -n "$rpath"; then
-        $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-        $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-        $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
-      fi
-
-      case "$output" in
-      *.lo)
-        if test -n "$objs"; then
-          $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-          exit 1
-        fi
-        libobj="$output"
-        obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'`
-        ;;
-      *)
-        libobj=
-        obj="$output"
-        ;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Create the old-style object.
-      reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^       ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-      output="$obj"
-      eval cmds=\"$reload_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      test -z "$libobj" && exit 0
-
-      if test "$build_libtool_libs" != yes; then
-        # Create an invalid libtool object if no PIC, so that we don't
-        # accidentally link it into a program.
-        $show "echo timestamp > $libobj"
-        $run eval "echo timestamp > $libobj" || exit $?
-        exit 0
-      fi
-
-      if test -n "$pic_flag"; then
-        # Only do commands if we really have different PIC objects.
-        reload_objs="$libobjs"
-        output="$libobj"
-        eval cmds=\"$reload_cmds\"
-        IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-        for cmd in $cmds; do
-          IFS="$save_ifs"
-          $show "$cmd"
-          $run eval "$cmd" || exit $?
-        done
-        IFS="$save_ifs"
-      else
-        # Just create a symlink.
-        $show "$LN_S $obj $libobj"
-        $run $LN_S $obj $libobj || exit 1
-      fi
-
-      exit 0
-      ;;
-
-    *)
-      if test -n "$vinfo"; then
-        $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-        $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath; do
-          if test -n "$hardcode_libdir_flag_spec"; then
-            if test -n "$hardcode_libdir_separator"; then
-              if test -z "$hardcode_libdirs"; then
-                # Put the magic libdir with the hardcode flag.
-                hardcode_libdirs="$libdir"
-                libdir="@HARDCODE_LIBDIRS@"
-              else
-                # Just accumulate the unique libdirs.
-		case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-		*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		  ;;
-		*)
-		  hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		  ;;
-		esac
-                libdir=
-              fi
-            fi
-
-            if test -n "$libdir"; then
-              eval flag=\"$hardcode_libdir_flag_spec\"
-
-              compile_command="$compile_command $flag"
-              finalize_command="$finalize_command $flag"
-            fi
-          elif test -n "$runpath_var"; then
-            case "$perm_rpath " in
-            *" $libdir "*) ;;
-            *) perm_rpath="$perm_rpath $libdir" ;;
-            esac
-          fi
-	done
-      fi
-
-      # Substitute the hardcoded libdirs into the compile commands.
-      if test -n "$hardcode_libdir_separator"; then
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
-      fi
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-        # Transform all the library objects into standard objects.
-        compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-        finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-      fi
-
-      if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
-        dlsyms="${output}S.c"
-      else
-        dlsyms=
-      fi
-
-      if test -n "$dlsyms"; then
-        # Add our own program objects to the preloaded list.
-        dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-
-	# Discover the nlist of each of the dlfiles.
-        nlist="$objdir/${output}.nm"
-
-	if test -d $objdir; then
-	  $show "$rm $nlist ${nlist}T"
-	  $run $rm "$nlist" "${nlist}T"
-	else
-	  $show "$mkdir $objdir"
-	  $run $mkdir $objdir
-	  status=$?
-	  if test $status -eq 0 || test -d $objdir; then :
-	  else
-	    exit $status
-	  fi
-	fi
-
-        for arg in $dlprefiles; do
-	  $show "extracting global C symbols from \`$arg'"
-	  $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-        done
-
-        # Parse the name list into a source file.
-        $show "creating $objdir/$dlsyms"
-        if test -z "$run"; then
-	  # Make sure we at least have an empty file.
-	  test -f "$nlist" || : > "$nlist"
-
-	  # Try sorting and uniquifying the output.
-	  if sort "$nlist" | uniq > "$nlist"T; then
-	    mv -f "$nlist"T "$nlist"
-	    wcout=`wc "$nlist" 2>/dev/null`
-	    count=`echo "X$wcout" | $Xsed -e 's/^[ 	]*\([0-9][0-9]*\).*$/\1/'`
-	    (test "$count" -ge 0) 2>/dev/null || count=-1
-	  else
-	    $rm "$nlist"T
-	    count=-1
-	  fi
-
-	  case "$dlsyms" in
-	  "") ;;
-	  *.c)
-	    $echo > "$objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define dld_preloaded_symbol_count some_other_symbol
-#define dld_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	    if test -f "$nlist"; then
-	      sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
-	    else
-	      echo '/* NONE */' >> "$objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$objdir/$dlsyms" "\
-
-#undef dld_preloaded_symbol_count
-#undef dld_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
-#else
-# define __ptr_t char *
-#endif
-
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
-/* The mapping between symbol names and symbols. */
-struct {
-  char *name;
-  __ptr_t address;
-}
-dld_preloaded_symbols[] =
-{\
-"
-
-	    if test -f "$nlist"; then
-	      sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$objdir/$dlsyms" "\
-  {0, (__ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	    ;;
-
-	  *)
-	    $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	    exit 1
-	    ;;
-	  esac
-        fi
-
-        # Now compile the dynamic symbol file.
-        $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
-        $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
-
-        # Transform the symbol file into the correct name.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
-      elif test "$export_dynamic" != yes; then
-        test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
-      else
-        # We keep going just in case the user didn't refer to
-        # dld_preloaded_symbols.  The linker will fail if global_symbol_pipe
-        # really was required.
-        $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
-        # Replace the output file specification.
-        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-
-        # We have no uninstalled library dependencies, so finalize right now.
-        $show "$compile_command"
-        $run eval "$compile_command"
-        exit $?
-      fi
-
-      # Replace the output file specification.
-      compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
-      finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
-
-      # Create the binary in the object directory, then wrap it.
-      if test -d $objdir; then :
-      else
-        $show "$mkdir $objdir"
-	$run $mkdir $objdir
-	status=$?
-	if test $status -eq 0 || test -d $objdir; then :
-	else
-	  exit $status
-	fi
-      fi
-
-      if test -n "$shlibpath_var"; then
-        # We should set the shlibpath_var
-        rpath=
-        for dir in $temp_rpath; do
-          case "$dir" in
-          /* | [A-Za-z]:\\*)
-            # Absolute path.
-            rpath="$rpath$dir:"
-            ;;
-          *)
-            # Relative path: add a thisdir entry.
-            rpath="$rpath\$thisdir/$dir:"
-            ;;
-          esac
-        done
-        temp_rpath="$rpath"
-      fi
-
-      # Delete the old output file.
-      $run $rm $output
-
-      if test -n "$compile_shlibpath"; then
-        compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-        finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      if test -n "$runpath_var" && test -n "$perm_rpath"; then
-        # We should set the runpath_var.
-        rpath=
-        for dir in $perm_rpath; do
-          rpath="$rpath$dir:"
-        done
-        compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
-        finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
-      fi
-
-      case "$hardcode_action" in
-      relink)
-        # AGH! Flame the AIX and HP-UX people for me, will ya?
-        $echo "$modename: warning: using a buggy system linker" 1>&2
-        $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
-        ;;
-      esac
-
-      $show "$compile_command"
-      $run eval "$compile_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the finalize command for shipping.
-      finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
-
-      # Quote $echo for shipping.
-      qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-        $rm $output
-        trap "$rm $output; exit 1" 1 2 15
-
-        $echo > $output "\
-#! /bin/sh
-
-# $output - temporary wrapper script for $objdir/$output
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of \``pwd`'.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variables:
-  link_against_libtool_libs='$link_against_libtool_libs'
-  finalize_command=\"$finalize_command\"
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" = \"$magic\"; then :
-  else
-    echo=\"$qecho\"
-    file=\"\$0\"
-  fi\
-"
-        $echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-
-  progdir=\"\$thisdir/$objdir\"
-  program='$output'
-
-  if test -f \"\$progdir/\$program\"; then"
-
-        # Export our shlibpath_var if we have one.
-        if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-          $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
-
-    export $shlibpath_var
-"
-        fi
-
-        $echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
-
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-        chmod +x $output
-      fi
-      exit 0
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    if test "$build_old_libs" = "yes"; then
-      # Transform .lo files to .o files.
-      oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
-      else
-	eval cmds=\"$old_archive_cmds\"
-      fi
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    fi
-
-    # Now create the libtool archive.
-    case "$output" in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.a"
-
-      $show "creating $output"
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-        $echo > $output "\
-# $output - a libtool library file
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
-
-# The name that we can dlopen(3).
-dlname='$dlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'\
-"
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $objdir && $LN_S ../$output $output)"
-      $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1
-      ;;
-    esac
-    exit 0
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional /bin/sh argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL"; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case "$arg" in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-        files="$files $dest"
-        dest="$arg"
-        continue
-      fi
-
-      case "$arg" in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-        stripme=" -s"
-        continue
-        ;;
-      -*) ;;
-
-      *)
-        # If the previous option needed an argument, then skip it.
-        if test -n "$prev"; then
-          prev=
-        else
-          dest="$arg"
-          continue
-        fi
-        ;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-        $echo "$modename: no file or destination specified" 1>&2
-      else
-        $echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test -n "$isdir"; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test $# -gt 2; then
-        $echo "$modename: \`$dest' is not a directory" 1>&2
-        $echo "$help" 1>&2
-        exit 1
-      fi
-    fi
-    case "$destdir" in
-    /* | [A-Za-z]:\\*) ;;
-    *)
-      for file in $files; do
-        case "$file" in
-        *.lo) ;;
-        *)
-          $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-          ;;
-        esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case "$file" in
-      *.a)
-        # Do the static libraries later.
-        staticlibs="$staticlibs $file"
-        ;;
-
-      *.la)
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-        fi
-
-        library_names=
-        old_library=
-        # If there is no directory component, then add one.
-        case "$file" in
-        */* | *\\*) . $file ;;
-        *) . ./$file ;;
-        esac
-
-        # Add the libdir to current_libdirs if it is the destination.
-        if test "X$destdir" = "X$libdir"; then
-          case "$current_libdirs " in
-          *" $libdir "*) ;;
-          *) current_libdirs="$current_libdirs $libdir" ;;
-          esac
-        else
-          # Note the libdir as a future libdir.
-          case "$future_libdirs " in
-          *" $libdir "*) ;;
-          *) future_libdirs="$future_libdirs $libdir" ;;
-          esac
-        fi
-
-        dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
-        test "X$dir" = "X$file/" && dir=
-        dir="$dir$objdir"
-
-        # See the names of the shared library.
-        set dummy $library_names
-        if test -n "$2"; then
-          realname="$2"
-          shift
-          shift
-
-          # Install the shared library and build the symlinks.
-          $show "$install_prog $dir/$realname $destdir/$realname"
-          $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
-          test "X$dlname" = "X$realname" && dlname=
-
-          if test $# -gt 0; then
-            # Delete the old symlinks.
-            rmcmd="$rm"
-            for linkname
-            do
-              rmcmd="$rmcmd $destdir/$linkname"
-            done
-            $show "$rmcmd"
-            $run $rmcmd
-
-            # ... and create new ones.
-            for linkname
-            do
-              test "X$dlname" = "X$linkname" && dlname=
-              $show "(cd $destdir && $LN_S $realname $linkname)"
-              $run eval "(cd $destdir && $LN_S $realname $linkname)"
-            done
-          fi
-
-          if test -n "$dlname"; then
-            # Install the dynamically-loadable library.
-            $show "$install_prog $dir/$dlname $destdir/$dlname"
-            $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
-          fi
-
-          # Do each command in the postinstall commands.
-          lib="$destdir/$realname"
-          eval cmds=\"$postinstall_cmds\"
-          IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-          for cmd in $cmds; do
-            IFS="$save_ifs"
-            $show "$cmd"
-            $run eval "$cmd" || exit $?
-          done
-          IFS="$save_ifs"
-        fi
-
-        # Install the pseudo-library for information purposes.
-        name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-        $show "$install_prog $file $destdir/$name"
-        $run eval "$install_prog $file $destdir/$name" || exit $?
-
-        # Maybe install the static library, too.
-        test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-        ;;
-
-      *.lo)
-        # Install (i.e. copy) a libtool object.
-
-        # Figure out destination file name, if it wasn't already specified.
-        if test -n "$destname"; then
-          destfile="$destdir/$destname"
-        else
-          destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-          destfile="$destdir/$destfile"
-        fi
-
-        # Deduce the name of the destination old-style object file.
-        case "$destfile" in
-        *.lo)
-          staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
-          ;;
-        *.o)
-          staticdest="$destfile"
-          destfile=
-          ;;
-        *)
-          $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-          ;;
-        esac
-
-        # Install the libtool object if requested.
-        if test -n "$destfile"; then
-          $show "$install_prog $file $destfile"
-          $run eval "$install_prog $file $destfile" || exit $?
-        fi
-
-        # Install the old object if enabled.
-        if test "$build_old_libs" = yes; then
-          # Deduce the name of the old-style object file.
-          staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
-
-          $show "$install_prog $staticobj $staticdest"
-          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-        fi
-        exit 0
-        ;;
-
-      *)
-        # Do a test to see if this is really a libtool program.
-        if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-          link_against_libtool_libs=
-          finalize_command=
-
-          # If there is no directory component, then add one.
-          case "$file" in
-          */* | *\\*) . $file ;;
-          *) . ./$file ;;
-          esac
-
-          # Check the variables that should have been set.
-          if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
-            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
-            exit 1
-          fi
-
-          finalize=yes
-          for lib in $link_against_libtool_libs; do
-            # Check to see that each library is installed.
-            libdir=
-            if test -f "$lib"; then
-              # If there is no directory component, then add one.
-              case "$lib" in
-              */* | *\\*) . $lib ;;
-              *) . ./$lib ;;
-              esac
-            fi
-            libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
-            if test -z "$libdir"; then
-              $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2
-            elif test -f "$libfile"; then :
-            else
-              $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-              finalize=no
-            fi
-          done
-
-          if test "$hardcode_action" = relink; then
-            if test "$finalize" = yes; then
-              $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
-              $show "$finalize_command"
-              if $run eval "$finalize_command"; then :
-              else
-                $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-                continue
-              fi
-              file="$objdir/$file"T
-            else
-              $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
-            fi
-          else
-            # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-          fi
-        fi
-
-        $show "$install_prog$stripme $file $dest"
-        $run eval "$install_prog\$stripme \$file \$dest" || exit $?
-        ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $SHELL $0 --finish$current_libdirs
-      exit 1
-    fi
-
-    exit 0
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-        libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
-          IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-          for cmd in $cmds; do
-            IFS="$save_ifs"
-            $show "$cmd"
-            $run eval "$cmd"
-          done
-          IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds"
-	fi
-      done
-    fi
-
-    echo "------------------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      echo "   $libdir"
-    done
-    echo
-    echo "To link against installed libraries in a given directory, LIBDIR,"
-    echo "you must use the \`-LLIBDIR' flag during linking."
-    echo
-    echo " You will also need to do one of the following:"
-    if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      echo "   - use the \`$flag' linker flag"
-    fi
-    if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "------------------------------------------------------------------------------"
-    exit 0
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit 1
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test -f "$file"; then :
-      else
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-
-      dir=
-      case "$file" in
-      *.la)
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-        fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-        # If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-        *) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-        continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case "$file" in
-      -*) ;;
-      *)
-        # Do a test to see if this is really a libtool program.
-        if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-        ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      # Export the shlibpath_var.
-      eval "export $shlibpath_var"
-
-      # Now actually exec the command.
-      eval "exec \$cmd$args"
-
-      $echo "$modename: cannot exec \$cmd$args"
-      exit 1
-    else
-      # Display what would be done.
-      eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-      $echo "export $shlibpath_var"
-      $echo "$cmd$args"
-      exit 0
-    fi
-    ;;
-
-  # libtool uninstall mode
-  uninstall)
-    modename="$modename: uninstall"
-    rm="$nonopt"
-    files=
-
-    for arg
-    do
-      case "$arg" in
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$dir" = "X$file" && dir=.
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      rmfiles="$file"
-
-      case "$name" in
-      *.la)
-        # Possibly a libtool archive, so verify it.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-          . $dir/$name
-
-          # Delete the libtool libraries and symlinks.
-          for n in $library_names; do
-            rmfiles="$rmfiles $dir/$n"
-            test "X$n" = "X$dlname" && dlname=
-          done
-          test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
-          test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
-
-	  $show "$rm $rmfiles"
-	  $run $rm $rmfiles
-
-	  if test -n "$library_names"; then
-	    # Do each command in the postuninstall commands.
-	    eval cmds=\"$postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-          if test -n "$old_library"; then
-	    # Do each command in the old_postuninstall commands.
-	    eval cmds=\"$old_postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-          # FIXME: should reinstall the best remaining shared library.
-        fi
-        ;;
-
-      *.lo)
-        if test "$build_old_libs" = yes; then
-          oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
-          rmfiles="$rmfiles $dir/$oldobj"
-        fi
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-        ;;
-
-      *)
-      	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-      esac
-    done
-    exit 0
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-    ;;
-  esac
-
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$generic_help" 1>&2
-  exit 1
-fi # test -z "$show_help"
-
-# We need to display help for each of the modes.
-case "$mode" in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
--n, --dry-run         display commands without modifying any files
-    --features        display configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --version         print version information
-
-MODE must be one of the following:
-
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to dld_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
-library objects (\`.lo' files) may be specified, and \`-rpath' is required.
-
-If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar'
-and \`ranlib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is
-created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-  ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/tkimg1.3/libjpeg/ltconfig b/tkimg1.3/libjpeg/ltconfig
deleted file mode 100755
index 2347e69..0000000
--- a/tkimg1.3/libjpeg/ltconfig
+++ /dev/null
@@ -1,1512 +0,0 @@
-#! /bin/sh
-
-# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A lot of this script is taken from autoconf-2.10.
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-
-echo=echo
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
-else
-  # The Solaris and AIX default echo program unquotes backslashes.
-  # This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  # So, we emulate echo with printf '%s\n'
-  echo="printf %s\\n"
-  if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
-  else
-    # Oops.  We have no working printf.  Try to find a not-so-buggy echo.
-    echo=echo
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    for dir in $PATH /usr/ucb; do
-      if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
-        echo="$dir/echo"
-        break
-      fi
-    done
-    IFS="$save_ifs"
-  fi
-fi
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
-
-# The name of this program.
-progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
-
-# Constants:
-PROGRAM=ltconfig
-PACKAGE=libtool
-VERSION=1.2
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
-rm="rm -f"
-
-help="Try \`$progname --help' for more information."
-
-# Global variables:
-can_build_shared=yes
-enable_shared=yes
-# All known linkers require a `.a' archive for static linking.
-enable_static=yes
-ltmain=
-silent=
-srcdir=
-ac_config_guess=
-ac_config_sub=
-host=
-nonopt=
-verify_host=yes
-with_gcc=no
-with_gnu_ld=no
-
-old_AR="$AR"
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-old_CPPFLAGS="$CPPFLAGS"
-old_LD="$LD"
-old_LN_S="$LN_S"
-old_NM="$NM"
-old_RANLIB="$RANLIB"
-
-# Parse the command line options.
-args=
-prev=
-for option
-do
-  case "$option" in
-  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    eval "$prev=\$option"
-    prev=
-    continue
-  fi
-
-  case "$option" in
-  --help) cat <<EOM
-Usage: $progname [OPTION]... LTMAIN [HOST]
-
-Generate a system-specific libtool script.
-
-    --disable-shared       do not build shared libraries
-    --disable-static       do not build static libraries
-    --help                 display this help and exit
-    --no-verify            do not verify that HOST is a valid host type
-    --quiet                same as \`--silent'
-    --silent               do not print informational messages
-    --srcdir=DIR           find \`config.guess' in DIR
-    --version              output version information and exit
-    --with-gcc             assume that the GNU C compiler will be used
-    --with-gnu-ld          assume that the C compiler uses the GNU linker
-
-LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
-functionality.
-
-HOST is the canonical host system name [default=guessed].
-EOM
-  exit 0
-  ;;
-
-  --disable-shared) enable_shared=no ;;
-
-  --disable-static) enable_static=no ;;
-
-  --quiet | --silent) silent=yes ;;
-
-  --srcdir) prev=srcdir ;;
-  --srcdir=*) srcdir="$optarg" ;;
-
-  --no-verify) verify_host=no ;;
-
-  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
-
-  --with-gcc) with_gcc=yes ;;
-  --with-gnu-ld) with_gnu_ld=yes ;;
-
-  -*)
-    echo "$progname: unrecognized option \`$option'" 1>&2
-    echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    if test -z "$ltmain"; then
-      ltmain="$option"
-    elif test -z "$host"; then
-# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
-#      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
-#        echo "$progname: warning \`$option' is not a valid host type" 1>&2
-#      fi
-      host="$option"
-    else
-      echo "$progname: too many arguments" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-done
-
-if test -z "$ltmain"; then
-  echo "$progname: you must specify a LTMAIN file" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-if test -f "$ltmain"; then :
-else
-  echo "$progname: \`$ltmain' does not exist" 1>&2
-  echo "$help" 1>&2
-  exit 1
-fi
-
-# Quote any args containing shell metacharacters.
-ltconfig_args=
-for arg
-do
-  case "$arg" in
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ltconfig_args="$ltconfig_args '$arg'" ;;
-  *) ltconfig_args="$ltconfig_args $arg" ;;
-  esac
-done
-
-# A relevant subset of AC_INIT.
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 5 compiler messages saved in config.log
-# 6 checking for... messages and results
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>>./config.log
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-if test -z "$srcdir"; then
-  # Assume the source directory is the same one as the path to ltmain.sh.
-  srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
-  test "$srcdir" = "$ltmain" && srcdir=.
-fi
-
-trap "$rm conftest*; exit 1" 1 2 15
-if test "$verify_host" = yes; then
-  # Check for config.guess and config.sub.
-  ac_aux_dir=
-  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-    if test -f $ac_dir/config.guess; then
-      ac_aux_dir=$ac_dir
-      break
-    fi
-  done
-  if test -z "$ac_aux_dir"; then
-    echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-  ac_config_guess=$ac_aux_dir/config.guess
-  ac_config_sub=$ac_aux_dir/config.sub
-
-  # Make sure we can run config.sub.
-  if $ac_config_sub sun4 >/dev/null 2>&1; then :
-  else
-    echo "$progname: cannot run $ac_config_sub" 1>&2
-    echo "$help" 1>&2
-    exit 1
-  fi
-
-  echo $ac_n "checking host system type""... $ac_c" 1>&6
-
-  host_alias=$host
-  case "$host_alias" in
-  "")
-    if host_alias=`$ac_config_guess`; then :
-    else
-      echo "$progname: cannot guess host type; you must specify one" 1>&2
-      echo "$help" 1>&2
-      exit 1
-    fi ;;
-  esac
-  host=`$ac_config_sub $host_alias`
-  echo "$ac_t$host" 1>&6
-
-  # Make sure the host verified.
-  test -z "$host" && exit 1
-
-elif test -z "$host"; then
-  echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
-  echo "$help" 1>&2
-  exit 1
-else
-  host_alias=$host
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case "$host_os" in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-case "$host_os" in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "${COLLECT_NAMES+set}" != set; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR cru $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-# Set a sane default for `AR'.
-test -z "$AR" && AR=ar
-
-# If RANLIB is not set, then run the test.
-if test "${RANLIB+set}" != "set"; then
-  result=no
-
-  echo $ac_n "checking for ranlib... $ac_c" 1>&6
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ranlib; then
-      RANLIB="ranlib"
-      result="ranlib"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  echo "$ac_t$result" 1>&6
-fi
-
-if test -n "$RANLIB"; then
-  old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
-  old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
-fi
-
-# Check to see if we are using GCC.
-if test "$with_gcc" != yes || test -z "$CC"; then
-  # If CC is not set, then try to find GCC or a usable CC.
-  if test -z "$CC"; then
-    echo $ac_n "checking for gcc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    for dir in $PATH; do
-      IFS="$save_ifs"
-      test -z "$dir" && dir=.
-      if test -f $dir/gcc; then
-	CC="gcc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-  fi
-
-  # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
-  if test -z "$CC"; then
-    echo $ac_n "checking for cc... $ac_c" 1>&6
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    cc_rejected=no
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/cc; then
-	if test "$dir/cc" = "/usr/ucb/cc"; then
-	  cc_rejected=yes
-	  continue
-	fi
-	CC="cc"
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    if test $cc_rejected = yes; then
-      # We found a bogon in the path, so make sure we never use it.
-      set dummy $CC
-      shift
-      if test $# -gt 0; then
-	# We chose a different compiler from the bogus one.
-	# However, it has the same name, so the bogon will be chosen
-	# first if we set CC to just the name; use the full file name.
-	shift
-	set dummy "$dir/cc" "$@"
-	shift
-	CC="$@"
-      fi
-    fi
-
-    if test -n "$CC"; then
-      echo "$ac_t$CC" 1>&6
-    else
-      echo "$ac_t"no 1>&6
-    fi
-
-    if test -z "$CC"; then
-      echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
-      exit 1
-    fi
-  fi
-
-  # Now see if the compiler is really GCC.
-  with_gcc=no
-  echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
-  echo "$progname:424: checking whether we are using GNU C" >&5
-
-  $rm conftest.c
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-    with_gcc=yes
-  fi
-  $rm conftest.c
-  echo "$ac_t$with_gcc" 1>&6
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
-
-echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
-pic_flag=
-special_shlib_compile_flags=
-wl=
-link_static_flag=
-no_builtin_flag=
-
-if test "$with_gcc" = yes; then
-  wl='-Wl,'
-  link_static_flag='-static'
-  no_builtin_flag=' -fno-builtin'
-
-  case "$host_os" in
-  aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
-    # PIC is the default for these OSes.
-    ;;
-  os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-  amigaos*)
-    # FIXME: we need at least 68020 code to build shared libraries, but
-    # adding the `-m68020' flag to GCC prevents building anything better,
-    # like `-m68040'.
-    pic_flag='-m68020 -resident32 -malways-restore-a4'
-    ;;
-  *)
-    pic_flag='-fPIC'
-    ;;
-  esac
-else
-  # PORTME Check for PIC flags for the system compiler.
-  case "$host_os" in
-  aix3* | aix4*)
-    # All AIX code is PIC.
-    link_static_flag='-bnso -bI:/lib/syscalls.exp'
-    ;;
-
-  hpux9* | hpux10*)
-    # Is there a better link_static_flag that works with the bundled CC?
-    wl='-Wl,'
-    link_static_flag="${wl}-a ${wl}archive"
-    pic_flag='+Z'
-    ;;
-
-  irix5* | irix6*)
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    # PIC (with -KPIC) is the default.
-    ;;
-
-  os2*)
-    # We can build DLLs from non-PIC.
-    ;;
-
-  osf3* | osf4*)
-    # All OSF/1 code is PIC.
-    wl='-Wl,'
-    link_static_flag='-non_shared'
-    ;;
-
-  sco3.2v5*)
-    pic_flag='-Kpic'
-    link_static_flag='-dn'
-    special_shlib_compile_flags='-belf'
-    ;;
-
-  solaris2*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  sunos4*)
-    pic_flag='-PIC'
-    link_static_flag='-Bstatic'
-    wl='-Qoption ld '
-    ;;
-
-  sysv4.2uw2*)
-    pic_flag='-KPIC'
-    link_static_flag='-Bstatic'
-    wl='-Wl,'
-    ;;
-
-  uts4*)
-    pic_flag='-pic'
-    link_static_flag='-Bstatic'
-    ;;
-
-  *)
-    can_build_shared=no
-    ;;
-  esac
-fi
-
-if test -n "$pic_flag"; then
-  echo "$ac_t$pic_flag" 1>&6
-
-  # Check to make sure the pic_flag actually works.
-  echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
-  $rm conftest*
-  echo > conftest.c
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $pic_flag -DPIC"
-  echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
-  if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
-    # Append any warnings to the config.log.
-    cat conftest.err 1>&5
-
-    # On HP-UX, both CC and GCC only warn that PIC is supported... then they
-    # create non-PIC objects.  So, if there were any warnings, we assume that
-    # PIC is not supported.
-    if test -s conftest.err; then
-      echo "$ac_t"no 1>&6
-      can_build_shared=no
-      pic_flag=
-    else
-      echo "$ac_t"yes 1>&6
-      pic_flag=" $pic_flag"
-    fi
-  else
-    # Append any errors to the config.log.
-    cat conftest.err 1>&5
-    can_build_shared=no
-    pic_flag=
-    echo "$ac_t"no 1>&6
-  fi
-  CFLAGS="$save_CFLAGS"
-  $rm conftest*
-else
-  echo "$ac_t"none 1>&6
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$special_shlib_compile_flags"; then
-  echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$special_shlib_compile_flags[ 	]" >/dev/null; then :
-  else
-    echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
-    can_build_shared=no
-  fi
-fi
-
-echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
-$rm conftest*
-echo 'main(){return(0);}' > conftest.c
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  echo "$ac_t$link_static_flag" 1>&6
-else
-  echo "$ac_t"none 1>&6
-  link_static_flag=
-fi
-LDFLAGS="$save_LDFLAGS"
-$rm conftest*
-
-if test -z "$LN_S"; then
-  # Check to see if we can use ln -s, or we need hard links.
-  echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
-  $rm conftestdata
-  if ln -s X conftestdata 2>/dev/null; then
-    $rm conftestdata
-    LN_S="ln -s"
-  else
-    LN_S=ln
-  fi
-  if test "$LN_S" = "ln -s"; then
-    echo "$ac_t"yes 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-fi
-
-# Make sure LD is an absolute path.
-if test -z "$LD"; then
-  ac_prog=ld
-  if test "$with_gcc" = yes; then
-    # Check if gcc -print-prog-name=ld gives a path.
-    echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
-    echo "$progname:624: checking for ld used by GCC" >&5
-    ac_prog=`($CC -print-prog-name=ld) 2>&5`
-    case "$ac_prog" in
-    # Accept absolute paths.
-    /* | [A-Za-z]:\\*)
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-    "")
-      # If it fails, then pretend we are not using GCC.
-      ac_prog=ld
-      ;;
-    *)
-      # If it is relative, then search for the first ld in PATH.
-      with_gnu_ld=unknown
-      ;;
-    esac
-  elif test "$with_gnu_ld" = yes; then
-    echo $ac_n "checking for GNU ld... $ac_c" 1>&6
-    echo "$progname:642: checking for GNU ld" >&5
-  else
-    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-    echo "$progname:645: checking for non-GNU ld" >&5
-  fi
-
-  if test -z "$LD"; then
-    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-    for ac_dir in $PATH; do
-      test -z "$ac_dir" && ac_dir=.
-      if test -f "$ac_dir/$ac_prog"; then
-	LD="$ac_dir/$ac_prog"
-	# Check to see if the program is GNU ld.  I'd rather use --version,
-	# but apparently some GNU ld's only accept -v.
-	# Break only if it was the GNU/non-GNU ld that we prefer.
-	if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	  test "$with_gnu_ld" != no && break
-	else
-	  test "$with_gnu_ld" != yes && break
-	fi
-      fi
-    done
-    IFS="$ac_save_ifs"
-  fi
-
-  if test -n "$LD"; then
-    echo "$ac_t$LD" 1>&6
-  else
-    echo "$ac_t"no 1>&6
-  fi
-
-  if test -z "$LD"; then
-    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
-    exit 1
-  fi
-fi
-
-# Check to see if it really is or is not GNU ld.
-echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
-# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-echo "$ac_t$with_gnu_ld" 1>&6
-
-# See if the linker supports building shared libraries.
-echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
-
-allow_undefined_flag=
-no_undefined_flag=
-archive_cmds=
-old_archive_from_new_cmds=
-export_dynamic_flag_spec=
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-
-case "$host_os" in
-amigaos* | sunos4*)
-  # On these operating systems, we should treat GNU ld like the system ld.
-  gnu_ld_acts_native=yes
-  ;;
-*)
-  gnu_ld_acts_native=no
-  ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
-
-  # See if GNU ld supports shared libraries.
-  if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-    archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
-    runpath_var=LD_RUN_PATH
-    ld_shlibs=yes
-  else
-    ld_shlibs=no
-  fi
-
-  if test "$ld_shlibs" = yes; then
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-  fi
-else
-  # PORTME fill in a description of your system's linker (not GNU ld)
-  case "$host_os" in
-  aix3*)
-    allow_undefined_flag=unsupported
-    archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
-    # Note: this linker hardcodes the directories in LIBPATH if there
-    # are no directories specified by -L.
-    hardcode_minus_L=yes
-    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
-      # Neither direct hardcoding nor static linking is supported with a
-      # broken collect2.
-      hardcode_direct=unsupported
-    fi
-    ;;
-
-  aix4*)
-    allow_undefined_flag=unsupported
-    archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    ;;
-
-  amigaos*)
-    archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    ;;
-
-  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-  # support.  Future versions do this automatically, but an explicit c++rt0.o
-  # does not break anything, and helps significantly (at the cost of a little
-  # extra space).
-  freebsd2.2*)
-    archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-  freebsd2*)
-    archive_cmds='$LD -Bshareable -o $lib$libobjs'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
-  freebsd3*)
-    archive_cmds='$CC -shared -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  hpux9*)
-    archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    export_dynamic_flag_spec='${wl}-E'
-    ;;
-
-  hpux10*)
-    archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    export_dynamic_flag_spec='${wl}-E'
-    ;;
-
-  irix5* | irix6*)
-    archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    ;;
-
-  netbsd*)
-    # Tested with NetBSD 1.2 ld
-    archive_cmds='$LD -Bshareable -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  os2*)
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    allow_undefined_flag=unsupported
-    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
-    old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
-    ;;
-
-  osf3* | osf4*)
-    allow_undefined_flag=' -expect_unresolved \*'
-    archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  sco3.2v5*)
-    archive_cmds='$LD -G -o $lib$libobjs'
-    hardcode_direct=yes
-    ;;
-
-  solaris2*)
-    no_undefined_flag=' -z text'
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
-
-    # Solaris 2 before 2.5 hardcodes -L paths.
-    case "$host_os" in
-    solaris2.[0-4]*)
-      hardcode_minus_L=yes
-      ;;
-    esac
-    ;;
-
-  sunos4*)
-    if test "$with_gcc" = yes; then
-      archive_cmds='$CC -shared -o $lib$libobjs'
-    else
-      archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
-    fi
-
-    if test "$with_gnu_ld" = yes; then
-      export_dynamic_flag_spec='${wl}-export-dynamic'
-    fi
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  uts4*)
-    archive_cmds='$LD -G -h $soname -o $lib$libobjs'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_direct=no
-    hardcode_minus_L=no
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    ld_shlibs=no
-    can_build_shared=no
-    ;;
-  esac
-fi
-echo "$ac_t$ld_shlibs" 1>&6
-
-if test -z "$NM"; then
-  echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
-  case "$NM" in
-  /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path.
-  *)
-    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-    for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
-      test -z "$ac_dir" && ac_dir=.
-      if test -f $ac_dir/nm; then
-        # Check to see if the nm accepts a BSD-compat flag.
-        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-        #   nm: unknown option "B" ignored
-        if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-          NM="$ac_dir/nm -B"
-        elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-          NM="$ac_dir/nm -p"
-	else
-          NM="$ac_dir/nm"
-	fi
-        break
-      fi
-    done
-    IFS="$ac_save_ifs"
-    test -z "$NM" && NM=nm
-    ;;
-  esac
-  echo "$ac_t$NM" 1>&6
-fi
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRSTU]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \1'
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
-  symcode='[BCDTU]'
-  ;;
-irix*)
-  # Cannot use undefined symbols on IRIX because inlined functions mess us up.
-  symcode='[BCDEGRST]'
-  ;;
-solaris2*)
-  symcode='[BDTU]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[ABCDGISTUW]'
-fi
-
-# Write the raw and C identifiers.
-global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
-
-# Check to see that the pipe works correctly.
-pipe_works=no
-$rm conftest*
-cat > conftest.c <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-echo "$progname:971: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
-  # Now try to grab the symbols.
-  nlist=conftest.nm
-  if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
-
-    # Try sorting and uniquifying the output.
-    if sort "$nlist" | uniq > "$nlist"T; then
-      mv -f "$nlist"T "$nlist"
-      wcout=`wc "$nlist" 2>/dev/null`
-      count=`$echo "X$wcout" | $Xsed -e 's/^[ 	]*\([0-9][0-9]*\).*$/\1/'`
-      (test "$count" -ge 0) 2>/dev/null || count=-1
-    else
-      rm -f "$nlist"T
-      count=-1
-    fi
-
-    # Make sure that we snagged all the symbols we need.
-    if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-      if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-        # Now generate the symbol file.
-        sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
-
-	cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
-#else
-# define __ptr_t char *
-#endif
-
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
-/* The mapping between symbol names and symbols. */
-struct {
-  char *name;
-  __ptr_t address;
-}
-dld_preloaded_symbols[] =
-{
-EOF
-        sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
-        cat <<\EOF >> conftest.c
-  {0, (__ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-        # Now try linking the two files.
-        mv conftest.o conftestm.o
-	save_LIBS="$LIBS"
-	save_CFLAGS="$CFLAGS"
-        LIBS='conftestm.o'
-	CFLAGS="$CFLAGS$no_builtin_flag"
-        if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-          pipe_works=yes
-        else
-          echo "$progname: failed program was:" >&5
-          cat conftest.c >&5
-        fi
-        LIBS="$save_LIBS"
-      else
-        echo "cannot find nm_test_func in $nlist" >&5
-      fi
-    else
-      echo "cannot find nm_test_var in $nlist" >&5
-    fi
-  else
-    echo "cannot run $global_symbol_pipe" >&5
-  fi
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.c >&5
-fi
-$rm conftest*
-
-# Do not use the global_symbol_pipe unless it works.
-echo "$ac_t$pipe_works" 1>&6
-test "$pipe_works" = yes || global_symbol_pipe=
-
-# Check hardcoding attributes.
-echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no && \
-     test "$hardcode_minus_L" != no && \
-     test "$hardcode_shlibpath_var" != no; then
-
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-elif test "$hardcode_direct" != yes && \
-     test "$hardcode_minus_L" != yes && \
-     test "$hardcode_shlibpath_var" != yes; then
-  # We cannot hardcode anything.
-  hardcode_action=unsupported
-else
-  # We can only hardcode existing directories.
-  hardcode_action=relink
-fi
-echo "$ac_t$hardcode_action" 1>&6
-test "$hardcode_action" = unsupported && can_build_shared=no
-
-
-reload_flag=
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
-# PORTME Some linker may need a different reload flag.
-reload_flag='-r'
-echo "$ac_t$reload_flag"
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-# PORTME Fill in your ld.so characteristics
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-version_type=none
-dynamic_linker="$host_os ld.so"
-
-echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
-case "$host_os" in
-aix3* | aix4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so.$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so.$major'
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-freebsd2* | freebsd3*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so.$versuffix $libname.so'
-  finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-gnu*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so.$versuffix'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-hpux9* | hpux10*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  dynamic_linker="$host_os dld.sl"
-  version_type=sunos
-  shlibpath_var=SHLIB_PATH
-  library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl'
-  soname_spec='${libname}${release}.sl.$major'
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-irix5* | irix6*)
-  version_type=osf
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so.$versuffix $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux-gnu*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-  soname_spec='${libname}${release}.so.$major'
-  finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-
-  if test -f /lib/ld.so.1; then
-    dynamic_linker='GNU ld.so'
-  else
-    # Only the GNU ld.so supports shared libraries on MkLinux.
-    case "$host_cpu" in
-    powerpc*) dynamic_linker=no ;;
-    *) dynamic_linker='Linux ld.so' ;;
-    esac
-  fi
-  ;;
-
-netbsd* | openbsd*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so.$versuffix'
-  finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-os2*)
-  libname_spec='$name'
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4*)
-  version_type=osf
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so.$versuffix $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so.$major'
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris2*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-  soname_spec='${libname}${release}.so.$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so.$versuffix'
-  finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sysv4.2uw2*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-  soname_spec='${libname}${release}.so.$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-  soname_spec='${libname}${release}.so.$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$ac_t$dynamic_linker"
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Report the final consequences.
-echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
-
-echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds;\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-esac
-
-echo "$ac_t$enable_shared" 1>&6
-
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-
-echo "checking whether to build static libraries... $enable_static" 1>&6
-
-echo $ac_n "checking for objdir... $ac_c" 1>&6
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-echo "$ac_t$objdir" 1>&6
-
-# Copy echo and quote the copy, instead of the original, because it is
-# used later.
-ltecho="$echo"
-
-# Now quote all the things that may contain metacharacters.
-for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
-  old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
-  link_static_flag no_builtin_flag export_dynamic_flag_spec \
-  libname_spec library_names_spec soname_spec RANLIB \
-  old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
-  old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
-  allow_undefined_flag no_undefined_flag \
-  finish_cmds finish_eval global_symbol_pipe \
-  hardcode_libdir_flag_spec hardcode_libdir_separator; do
-
-  case "$var" in
-  reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
-  old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
-  postinstall_cmds | postuninstall_cmds | finish_cmds)
-    # Double-quote double-evaled strings.
-    eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
-    ;;
-  *)
-    eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
-    ;;
-  esac
-done
-
-ofile=libtool
-trap "$rm $ofile; exit 1" 1 2 15
-echo creating $ofile
-$rm $ofile
-cat <<EOF > $ofile
-#! /bin/sh
-
-# libtool - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
-# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
-#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This program was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
-# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
-#   $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-
-# An echo program that does not interpret backslashes.
-echo="$ltecho"
-
-# The version of $progname that generated this script.
-LTCONFIG_VERSION="$VERSION"
-
-# Shell to use when invoking shell scripts.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Whether or not to build libtool libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build old-style libraries.
-build_old_libs=$enable_static
-
-# The host system.
-host_alias="$host_alias"
-host="$host"
-
-# The archiver.
-AR="$AR"
-
-# The default C compiler.
-CC="$CC"
-
-# The linker used to build libraries.
-LD="$LD"
-
-# Whether we need hard or soft links.
-LN_S="$LN_S"
-
-# A BSD-compatible nm program.
-NM="$NM"
-
-# The name of the directory that contains temporary libtool files.
-objdir="$objdir"
-
-# How to create reloadable object files.
-reload_flag="$reload_flag"
-reload_cmds="$reload_cmds"
-
-# How to pass a linker flag through the compiler.
-wl="$wl"
-
-# Additional compiler flags for building library objects.
-pic_flag="$pic_flag"
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag="$link_static_flag"
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag="$no_builtin_flag"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="$export_dynamic_flag_spec"
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec="$libname_spec"
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec="$library_names_spec"
-
-# The coded name of the library, if different from the real name.
-soname_spec="$soname_spec"
-
-# Commands used to build and install an old-style archive.
-RANLIB="$RANLIB"
-old_archive_cmds="$old_archive_cmds"
-old_postinstall_cmds="$old_postinstall_cmds"
-old_postuninstall_cmds="$old_postuninstall_cmds"
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds="$old_archive_from_new_cmds"
-
-# Commands used to build and install a shared archive.
-archive_cmds="$archive_cmds"
-postinstall_cmds="$postinstall_cmds"
-postuninstall_cmds="$postuninstall_cmds"
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag="$allow_undefined_flag"
-
-# Flag that forces no undefined symbols.
-no_undefined_flag="$no_undefined_flag"
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds="$finish_cmds"
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval="$finish_eval"
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="$global_symbol_pipe"
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-EOF
-
-case "$host_os" in
-aix3*)
-  cat <<\EOF >> $ofile
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "${COLLECT_NAMES+set}" != set; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-
-EOF
-  ;;
-esac
-
-# Append the ltmain.sh script.
-cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1)
-
-chmod +x $ofile
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/tkimg1.3/libjpeg/ltmain.sh b/tkimg1.3/libjpeg/ltmain.sh
deleted file mode 100644
index e9350b3..0000000
--- a/tkimg1.3/libjpeg/ltmain.sh
+++ /dev/null
@@ -1,2453 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
-#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
-# Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.2
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-
-if test "$LTCONFIG_VERSION" != "$VERSION"; then
-  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
-  arg="$1"
-  shift
-
-  case "$arg" in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case "$prev" in
-    execute_dlfiles)
-      eval "$prev=\"\$$prev \$arg\""
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case "$arg" in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION"
-    exit 0
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
-    else
-      echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
-    else
-      echo "disable static libraries"
-    fi
-    exit 0
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --quiet | --silent)
-    show=:
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    case "$nonopt" in
-    *cc | *++ | gcc* | *-gcc*)
-      mode=link
-      for arg
-      do
-        case "$arg" in
-        -c)
-           mode=compile
-           break
-           ;;
-        esac
-      done
-      ;;
-    *db | *dbx)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-        if test -n "$nonopt"; then
-          $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-        else
-          $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-        fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case "$mode" in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    lastarg=
-    srcfile="$nonopt"
-    suppress_output=
-
-    for arg
-    do
-      # Accept any command-line options.
-      case "$arg" in
-      -o)
-	$echo "$modename: you cannot specify the output filename with \`-o'" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-	;;
-
-      -static)
-	build_libtool_libs=no
-	build_old_libs=yes
-	continue
-	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
-
-      # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly in scan
-      # sets, so we specify it separately.
-      case "$lastarg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
-
-    # Get the name of the library object.
-    libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-
-    # Recognize several different file suffixes.
-    xform='[cCFSfms]'
-    case "$libobj" in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case "$libobj" in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      $run $rm $obj $libobj
-      trap "$run $rm $obj $libobj; exit 1" 1 2 15
-    else
-      $run $rm $libobj
-      trap "$run $rm $libobj; exit 1" 1 2 15
-    fi
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      # All platforms use -DPIC, to notify preprocessed assembler code.
-      $show "$base_compile$pic_flag -DPIC $srcfile"
-      if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
-      else
-        test -n "$obj" && $run $rm $obj
-        exit 1
-      fi
-
-      # If we have no pic_flag, then copy the object into place and finish.
-      if test -z "$pic_flag"; then
-        $show "$LN_S $obj $libobj"
-        $run $LN_S $obj $libobj
-        exit $?
-      fi
-
-      # Just move the object, then go on to compile the next one
-      $show "$mv $obj $libobj"
-      $run $mv $obj $libobj || exit 1
-
-      # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      # Suppress compiler output if we already did a PIC compilation.
-      $show "$base_compile $srcfile$suppress_output"
-      if $run eval "$base_compile \$srcfile$suppress_output"; then :
-      else
-        $run $rm $obj $libobj
-        exit 1
-      fi
-    fi
-
-    # Create an invalid libtool object if no PIC, so that we do not
-    # accidentally link it into a program.
-    if test "$build_libtool_libs" != yes; then
-      $show "echo timestamp > $libobj"
-      $run eval "echo timestamp > \$libobj" || exit $?
-    fi
-
-    exit 0
-    ;;
-
-  # libtool link mode
-  link)
-    modename="$modename: link"
-    CC="$nonopt"
-    allow_undefined=yes
-    compile_command="$CC"
-    finalize_command="$CC"
-
-    compile_shlibpath=
-    finalize_shlibpath=
-    deplibs=
-    dlfiles=
-    dlprefiles=
-    export_dynamic=no
-    hardcode_libdirs=
-    libobjs=
-    link_against_libtool_libs=
-    ltlibs=
-    objs=
-    prev=
-    prevarg=
-    release=
-    rpath=
-    perm_rpath=
-    temp_rpath=
-    vinfo=
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case "$arg" in
-      -all-static | -static)
-        if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-        fi
-        build_libtool_libs=no
-	build_old_libs=yes
-        break
-        ;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    for arg
-    do
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-        case "$prev" in
-        output)
-          compile_command="$compile_command @OUTPUT@"
-          finalize_command="$finalize_command @OUTPUT@"
-          ;;
-        esac
-
-        case "$prev" in
-        dlfiles|dlprefiles)
-          case "$arg" in
-          *.la | *.lo) ;;  # We handle these cases below.
-          *)
-            dlprefiles="$dlprefiles $arg"
-            test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
-            prev=
-            ;;
-          esac
-          ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-        rpath)
-          rpath="$rpath $arg"
-	  prev=
-	  continue
-	  ;;
-        *)
-          eval "$prev=\"\$arg\""
-          prev=
-          continue
-          ;;
-        esac
-      fi
-
-      prevarg="$arg"
-
-      case "$arg" in
-      -all-static)
-	if test -n "$link_static_flag"; then
-          compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-        fi
-        continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -dlopen)
-        prev=dlfiles
-        continue
-        ;;
-
-      -dlpreopen)
-        prev=dlprefiles
-        continue
-        ;;
-
-      -export-dynamic)
-        if test "$export_dynamic" != yes; then
-          export_dynamic=yes
-	  if test -n "$export_dynamic_flag_spec"; then
-	    eval arg=\"$export_dynamic_flag_spec\"
-	  else
-	    arg=
-	  fi
-
-          # Add the symbol object into the linking commands.
-	  compile_command="$compile_command @SYMFILE@"
-	  finalize_command="$finalize_command @SYMFILE@"
-        fi
-        ;;
-
-      -L*)
-        dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
-        case "$dir" in
-        /* | [A-Za-z]:\\*)
-	  # Add the corresponding hardcode_libdir_flag, if it is not identical.
-          ;;
-        *)
-          $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
-          exit 1
-          ;;
-        esac
-        deplibs="$deplibs $arg"
-        ;;
-
-      -l*) deplibs="$deplibs $arg" ;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-        prev=rpath
-        continue
-        ;;
-
-      -static)
-	# If we have no pic_flag, then this is the same as -all-static.
-	if test -z "$pic_flag" && test -n "$link_static_flag"; then
-          compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-        fi
-	continue
-	;;
-
-      -version-info)
-        prev=vinfo
-        continue
-        ;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-        ;;
-
-      *.o | *.a)
-        # A standard object.
-        objs="$objs $arg"
-        ;;
-
-      *.lo)
-        # A library object.
-	if test "$prev" = dlfiles; then
-	  dlfiles="$dlfiles $arg"
-	  if test "$build_libtool_libs" = yes; then
-	    prev=
-	    continue
-	  else
-	    # If libtool objects are unsupported, then we need to preload.
-	    prev=dlprefiles
-	  fi
-	fi
-
-	if test "$prev" = dlprefiles; then
-	  # Preload the old-style object.
-	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'`
-	  prev=
-	fi
-	libobjs="$libobjs $arg"
-        ;;
-
-      *.la)
-        # A libtool-controlled library.
-
-        dlname=
-        libdir=
-        library_names=
-        old_library=
-
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
-          exit 1
-        fi
-
-        # If there is no directory component, then add one.
-        case "$arg" in
-        */* | *\\*) . $arg ;;
-        *) . ./$arg ;;
-        esac
-
-        if test -z "$libdir"; then
-          $echo "$modename: \`$arg' contains no -rpath information" 1>&2
-          exit 1
-        fi
-
-        # Get the name of the library we link against.
-        linklib=
-        for l in $old_library $library_names; do
-          linklib="$l"
-        done
-
-        if test -z "$linklib"; then
-          $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
-          exit 1
-        fi
-
-        # Find the relevant object directory and library name.
-        name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
-        dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-        if test "X$dir" = "X$arg"; then
-          dir="$objdir"
-        else
-          dir="$dir/$objdir"
-        fi
-
-        # This library was specified with -dlopen.
-        if test "$prev" = dlfiles; then
-          dlfiles="$dlfiles $arg"
-          if test -z "$dlname"; then
-            # If there is no dlname, we need to preload.
-            prev=dlprefiles
-          else
-            # We should not create a dependency on this library, but we
-	    # may need any libraries it requires.
-	    compile_command="$compile_command$dependency_libs"
-	    finalize_command="$finalize_command$dependency_libs"
-            prev=
-            continue
-          fi
-        fi
-
-        # The library was specified with -dlpreopen.
-        if test "$prev" = dlprefiles; then
-          # Prefer using a static library (so that no silly _DYNAMIC symbols
-          # are required to link).
-          if test -n "$old_library"; then
-            dlprefiles="$dlprefiles $dir/$old_library"
-          else
-            dlprefiles="$dlprefiles $dir/$linklib"
-          fi
-          prev=
-        fi
-
-        if test "$build_libtool_libs" = yes && test -n "$library_names"; then
-          link_against_libtool_libs="$link_against_libtool_libs $arg"
-          if test -n "$shlibpath_var"; then
-            # Make sure the rpath contains only unique directories.
-            case "$temp_rpath " in
-            *" $dir "*) ;;
-            *) temp_rpath="$temp_rpath $dir" ;;
-            esac
-          fi
-
-	  # This is the magic to use -rpath.
-          if test -n "$hardcode_libdir_flag_spec"; then
-            if test -n "$hardcode_libdir_separator"; then
-              if test -z "$hardcode_libdirs"; then
-                # Put the magic libdir with the hardcode flag.
-                hardcode_libdirs="$libdir"
-                libdir="@HARDCODE_LIBDIRS@"
-              else
-                # Just accumulate the unique libdirs.
-		case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-		*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		  ;;
-		*)
-		  hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		  ;;
-		esac
-                libdir=
-              fi
-            fi
-
-            if test -n "$libdir"; then
-              eval flag=\"$hardcode_libdir_flag_spec\"
-
-              compile_command="$compile_command $flag"
-              finalize_command="$finalize_command $flag"
-            fi
-          elif test -n "$runpath_var"; then
-            # Do the same for the permanent run path.
-            case "$perm_rpath " in
-            *" $libdir "*) ;;
-            *) perm_rpath="$perm_rpath $libdir" ;;
-            esac
-          fi
-
-
-          case "$hardcode_action" in
-          immediate)
-            if test "$hardcode_direct" = no; then
-              compile_command="$compile_command $dir/$linklib"
-            elif test "$hardcode_minus_L" = no; then
-              compile_command="$compile_command -L$dir -l$name"
-            elif test "$hardcode_shlibpath_var" = no; then
-              compile_shlibpath="$compile_shlibpath$dir:"
-              compile_command="$compile_command -l$name"
-            fi
-            ;;
-
-          relink)
-            # We need an absolute path.
-            case "$dir" in
-            /* | [A-Za-z]:\\*) ;;
-            *)
-              absdir=`cd "$dir" && pwd`
-              if test -z "$absdir"; then
-                $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-                exit 1
-              fi
-              dir="$absdir"
-              ;;
-            esac
-
-            if test "$hardcode_direct" = yes; then
-              compile_command="$compile_command $dir/$linklib"
-            elif test "$hardcode_minus_L" = yes; then
-              compile_command="$compile_command -L$dir -l$name"
-            elif test "$hardcode_shlibpath_var" = yes; then
-              compile_shlibpath="$compile_shlibpath$dir:"
-              compile_command="$compile_command -l$name"
-            fi
-            ;;
-
-          *)
-            $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2
-            exit 1
-            ;;
-          esac
-
-          # Finalize command for both is simple: just hardcode it.
-          if test "$hardcode_direct" = yes; then
-            finalize_command="$finalize_command $libdir/$linklib"
-          elif test "$hardcode_minus_L" = yes; then
-            finalize_command="$finalize_command -L$libdir -l$name"
-          elif test "$hardcode_shlibpath_var" = yes; then
-            finalize_shlibpath="$finalize_shlibpath$libdir:"
-            finalize_command="$finalize_command -l$name"
-          else
-            # We cannot seem to hardcode it, guess we'll fake it.
-            finalize_command="$finalize_command -L$libdir -l$name"
-          fi
-        else
-          # Transform directly to old archives if we don't build new libraries.
-          if test -n "$pic_flag" && test -z "$old_library"; then
-            $echo "$modename: cannot find static library for \`$arg'" 1>&2
-            exit 1
-          fi
-
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_command="$compile_command $dir/$linklib"
-	    finalize_command="$finalize_command $dir/$linklib"
-	  else
-	    compile_command="$compile_command -L$dir -l$name"
-	    finalize_command="$finalize_command -L$dir -l$name"
-	  fi
-        fi
-
-	# Add in any libraries that this one depends upon.
-	compile_command="$compile_command$dependency_libs"
-	finalize_command="$finalize_command$dependency_libs"
-	continue
-        ;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case "$arg" in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	  arg="\"$arg\""
-	  ;;
-	esac
-        ;;
-      esac
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$vinfo" && test -n "$release"; then
-      $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    oldlib=
-    oldobjs=
-    case "$output" in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-      ;;
-
-    */* | *\\*)
-      $echo "$modename: output file \`$output' must have no directory components" 1>&2
-      exit 1
-      ;;
-
-    *.a)
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      build_old_libs=yes
-      oldlib="$output"
-      $show "$rm $oldlib"
-      $run $rm $oldlib
-      ;;
-
-    *.la)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case "$output" in
-      lib*) ;;
-      *)
-	$echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-	;;
-      esac
-
-      name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-      eval libname=\"$libname_spec\"
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-      current=0
-      revision=0
-      age=0
-
-      if test -n "$objs"; then
-        $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
-        exit 1
-      fi
-
-      # How the heck are we supposed to write a wrapper for a shared library?
-      if test -n "$link_against_libtool_libs"; then
-        $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2
-        exit 1
-      fi
-
-      if test -n "$dlfiles$dlprefiles"; then
-        $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$rpath"; then
-        $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2
-	$echo "$help" 1>&2
-        exit 1
-      fi
-
-      set dummy $rpath
-      if test $# -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      # Parse the version information argument.
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
-      set dummy $vinfo
-      IFS="$save_ifs"
-
-      if test -n "$5"; then
-        $echo "$modename: too many parameters to \`-version-info'" 1>&2
-        $echo "$help" 1>&2
-        exit 1
-      fi
-
-      test -n "$2" && current="$2"
-      test -n "$3" && revision="$3"
-      test -n "$4" && age="$4"
-
-      # Check that each of the things are valid numbers.
-      case "$current" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      case "$revision" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      case "$age" in
-      0 | [1-9] | [1-9][0-9]*) ;;
-      *)
-        $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-        ;;
-      esac
-
-      if test $age -gt $current; then
-        $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-        $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-        exit 1
-      fi
-
-      # Calculate the version variables.
-      version_vars="version_type current age revision"
-      case "$version_type" in
-      none) ;;
-
-      linux)
-        version_vars="$version_vars major versuffix"
-        major=`expr $current - $age`
-        versuffix="$major.$age.$revision"
-        ;;
-
-      osf)
-        version_vars="$version_vars versuffix verstring"
-        major=`expr $current - $age`
-        versuffix="$current.$age.$revision"
-        verstring="$versuffix"
-
-        # Add in all the interfaces that we are compatible with.
-        loop=$age
-        while test $loop != 0; do
-          iface=`expr $current - $loop`
-          loop=`expr $loop - 1`
-          verstring="$verstring:${iface}.0"
-        done
-
-        # Make executables depend on our current version.
-        verstring="$verstring:${current}.0"
-        ;;
-
-      sunos)
-        version_vars="$version_vars major versuffix"
-        major="$current"
-        versuffix="$current.$revision"
-        ;;
-
-      *)
-        $echo "$modename: unknown library version type \`$version_type'" 1>&2
-        echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-        exit 1
-        ;;
-      esac
-
-      # Create the output directory, or remove our outputs if we need to.
-      if test -d $objdir; then
-        $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
-        $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
-      else
-        $show "$mkdir $objdir"
-        $run $mkdir $objdir
-	status=$?
-	if test $status -eq 0 || test -d $objdir; then :
-	else
-	  exit $status
-	fi
-      fi
-
-      # Check to see if the archive will have undefined symbols.
-      if test "$allow_undefined" = yes; then
-        if test "$allow_undefined_flag" = unsupported; then
-          $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-          build_libtool_libs=no
-	  build_old_libs=yes
-        fi
-      else
-        # Don't allow undefined symbols.
-        allow_undefined_flag="$no_undefined_flag"
-      fi
-
-      # Add libc to deplibs on all systems.
-      dependency_libs="$deplibs"
-      deplibs="$deplibs -lc"
-
-      if test "$build_libtool_libs" = yes; then
-        # Get the real and link names of the library.
-        eval library_names=\"$library_names_spec\"
-        set dummy $library_names
-        realname="$2"
-        shift; shift
-
-        if test -n "$soname_spec"; then
-          eval soname=\"$soname_spec\"
-        else
-          soname="$realname"
-        fi
-
-        lib="$objdir/$realname"
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-        # Use standard objects if they are PIC.
-        test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-        # Do each of the archive commands.
-        eval cmds=\"$archive_cmds\"
-        IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-        for cmd in $cmds; do
-          IFS="$save_ifs"
-          $show "$cmd"
-          $run eval "$cmd" || exit $?
-        done
-        IFS="$save_ifs"
-
-        # Create links to the real library.
-        for linkname in $linknames; do
-          $show "(cd $objdir && $LN_S $realname $linkname)"
-          $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $?
-        done
-
-        # If -export-dynamic was specified, set the dlname.
-        if test "$export_dynamic" = yes; then
-          # On all known operating systems, these are identical.
-          dlname="$soname"
-        fi
-      fi
-
-      # Now set the variables for building old libraries.
-      oldlib="$objdir/$libname.a"
-      ;;
-
-    *.lo | *.o)
-      if test -n "$link_against_libtool_libs"; then
-        $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2
-        exit 1
-      fi
-
-      if test -n "$deplibs"; then
-        $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles"; then
-        $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -n "$rpath"; then
-        $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-        $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-        $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
-      fi
-
-      case "$output" in
-      *.lo)
-        if test -n "$objs"; then
-          $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-          exit 1
-        fi
-        libobj="$output"
-        obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'`
-        ;;
-      *)
-        libobj=
-        obj="$output"
-        ;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Create the old-style object.
-      reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^       ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-      output="$obj"
-      eval cmds=\"$reload_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      test -z "$libobj" && exit 0
-
-      if test "$build_libtool_libs" != yes; then
-        # Create an invalid libtool object if no PIC, so that we don't
-        # accidentally link it into a program.
-        $show "echo timestamp > $libobj"
-        $run eval "echo timestamp > $libobj" || exit $?
-        exit 0
-      fi
-
-      if test -n "$pic_flag"; then
-        # Only do commands if we really have different PIC objects.
-        reload_objs="$libobjs"
-        output="$libobj"
-        eval cmds=\"$reload_cmds\"
-        IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-        for cmd in $cmds; do
-          IFS="$save_ifs"
-          $show "$cmd"
-          $run eval "$cmd" || exit $?
-        done
-        IFS="$save_ifs"
-      else
-        # Just create a symlink.
-        $show "$LN_S $obj $libobj"
-        $run $LN_S $obj $libobj || exit 1
-      fi
-
-      exit 0
-      ;;
-
-    *)
-      if test -n "$vinfo"; then
-        $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-        $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath; do
-          if test -n "$hardcode_libdir_flag_spec"; then
-            if test -n "$hardcode_libdir_separator"; then
-              if test -z "$hardcode_libdirs"; then
-                # Put the magic libdir with the hardcode flag.
-                hardcode_libdirs="$libdir"
-                libdir="@HARDCODE_LIBDIRS@"
-              else
-                # Just accumulate the unique libdirs.
-		case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
-		*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		  ;;
-		*)
-		  hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		  ;;
-		esac
-                libdir=
-              fi
-            fi
-
-            if test -n "$libdir"; then
-              eval flag=\"$hardcode_libdir_flag_spec\"
-
-              compile_command="$compile_command $flag"
-              finalize_command="$finalize_command $flag"
-            fi
-          elif test -n "$runpath_var"; then
-            case "$perm_rpath " in
-            *" $libdir "*) ;;
-            *) perm_rpath="$perm_rpath $libdir" ;;
-            esac
-          fi
-	done
-      fi
-
-      # Substitute the hardcoded libdirs into the compile commands.
-      if test -n "$hardcode_libdir_separator"; then
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
-      fi
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-        # Transform all the library objects into standard objects.
-        compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-        finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-      fi
-
-      if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
-        dlsyms="${output}S.c"
-      else
-        dlsyms=
-      fi
-
-      if test -n "$dlsyms"; then
-        # Add our own program objects to the preloaded list.
-        dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'`
-
-	# Discover the nlist of each of the dlfiles.
-        nlist="$objdir/${output}.nm"
-
-	if test -d $objdir; then
-	  $show "$rm $nlist ${nlist}T"
-	  $run $rm "$nlist" "${nlist}T"
-	else
-	  $show "$mkdir $objdir"
-	  $run $mkdir $objdir
-	  status=$?
-	  if test $status -eq 0 || test -d $objdir; then :
-	  else
-	    exit $status
-	  fi
-	fi
-
-        for arg in $dlprefiles; do
-	  $show "extracting global C symbols from \`$arg'"
-	  $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-        done
-
-        # Parse the name list into a source file.
-        $show "creating $objdir/$dlsyms"
-        if test -z "$run"; then
-	  # Make sure we at least have an empty file.
-	  test -f "$nlist" || : > "$nlist"
-
-	  # Try sorting and uniquifying the output.
-	  if sort "$nlist" | uniq > "$nlist"T; then
-	    mv -f "$nlist"T "$nlist"
-	    wcout=`wc "$nlist" 2>/dev/null`
-	    count=`echo "X$wcout" | $Xsed -e 's/^[ 	]*\([0-9][0-9]*\).*$/\1/'`
-	    (test "$count" -ge 0) 2>/dev/null || count=-1
-	  else
-	    $rm "$nlist"T
-	    count=-1
-	  fi
-
-	  case "$dlsyms" in
-	  "") ;;
-	  *.c)
-	    $echo > "$objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define dld_preloaded_symbol_count some_other_symbol
-#define dld_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	    if test -f "$nlist"; then
-	      sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
-	    else
-	      echo '/* NONE */' >> "$objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$objdir/$dlsyms" "\
-
-#undef dld_preloaded_symbol_count
-#undef dld_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
-#else
-# define __ptr_t char *
-#endif
-
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
-/* The mapping between symbol names and symbols. */
-struct {
-  char *name;
-  __ptr_t address;
-}
-dld_preloaded_symbols[] =
-{\
-"
-
-	    if test -f "$nlist"; then
-	      sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$objdir/$dlsyms" "\
-  {0, (__ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	    ;;
-
-	  *)
-	    $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	    exit 1
-	    ;;
-	  esac
-        fi
-
-        # Now compile the dynamic symbol file.
-        $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
-        $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
-
-        # Transform the symbol file into the correct name.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"`
-      elif test "$export_dynamic" != yes; then
-        test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
-      else
-        # We keep going just in case the user didn't refer to
-        # dld_preloaded_symbols.  The linker will fail if global_symbol_pipe
-        # really was required.
-        $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-
-        # Nullify the symbol file.
-        compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
-        # Replace the output file specification.
-        compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-        finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-
-        # We have no uninstalled library dependencies, so finalize right now.
-        $show "$compile_command"
-        $run eval "$compile_command"
-        exit $?
-      fi
-
-      # Replace the output file specification.
-      compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
-      finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
-
-      # Create the binary in the object directory, then wrap it.
-      if test -d $objdir; then :
-      else
-        $show "$mkdir $objdir"
-	$run $mkdir $objdir
-	status=$?
-	if test $status -eq 0 || test -d $objdir; then :
-	else
-	  exit $status
-	fi
-      fi
-
-      if test -n "$shlibpath_var"; then
-        # We should set the shlibpath_var
-        rpath=
-        for dir in $temp_rpath; do
-          case "$dir" in
-          /* | [A-Za-z]:\\*)
-            # Absolute path.
-            rpath="$rpath$dir:"
-            ;;
-          *)
-            # Relative path: add a thisdir entry.
-            rpath="$rpath\$thisdir/$dir:"
-            ;;
-          esac
-        done
-        temp_rpath="$rpath"
-      fi
-
-      # Delete the old output file.
-      $run $rm $output
-
-      if test -n "$compile_shlibpath"; then
-        compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-        finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      if test -n "$runpath_var" && test -n "$perm_rpath"; then
-        # We should set the runpath_var.
-        rpath=
-        for dir in $perm_rpath; do
-          rpath="$rpath$dir:"
-        done
-        compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
-        finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
-      fi
-
-      case "$hardcode_action" in
-      relink)
-        # AGH! Flame the AIX and HP-UX people for me, will ya?
-        $echo "$modename: warning: using a buggy system linker" 1>&2
-        $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
-        ;;
-      esac
-
-      $show "$compile_command"
-      $run eval "$compile_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the finalize command for shipping.
-      finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
-
-      # Quote $echo for shipping.
-      qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-        $rm $output
-        trap "$rm $output; exit 1" 1 2 15
-
-        $echo > $output "\
-#! /bin/sh
-
-# $output - temporary wrapper script for $objdir/$output
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of \``pwd`'.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variables:
-  link_against_libtool_libs='$link_against_libtool_libs'
-  finalize_command=\"$finalize_command\"
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" = \"$magic\"; then :
-  else
-    echo=\"$qecho\"
-    file=\"\$0\"
-  fi\
-"
-        $echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-
-  progdir=\"\$thisdir/$objdir\"
-  program='$output'
-
-  if test -f \"\$progdir/\$program\"; then"
-
-        # Export our shlibpath_var if we have one.
-        if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-          $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
-
-    export $shlibpath_var
-"
-        fi
-
-        $echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
-
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-        chmod +x $output
-      fi
-      exit 0
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    if test "$build_old_libs" = "yes"; then
-      # Transform .lo files to .o files.
-      oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
-      else
-	eval cmds=\"$old_archive_cmds\"
-      fi
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    fi
-
-    # Now create the libtool archive.
-    case "$output" in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.a"
-
-      $show "creating $output"
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-        $echo > $output "\
-# $output - a libtool library file
-# Generated by ltmain.sh - GNU $PACKAGE $VERSION
-
-# The name that we can dlopen(3).
-dlname='$dlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'\
-"
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $objdir && $LN_S ../$output $output)"
-      $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1
-      ;;
-    esac
-    exit 0
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional /bin/sh argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL"; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case "$arg" in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-        files="$files $dest"
-        dest="$arg"
-        continue
-      fi
-
-      case "$arg" in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-        stripme=" -s"
-        continue
-        ;;
-      -*) ;;
-
-      *)
-        # If the previous option needed an argument, then skip it.
-        if test -n "$prev"; then
-          prev=
-        else
-          dest="$arg"
-          continue
-        fi
-        ;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case "$arg" in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-        $echo "$modename: no file or destination specified" 1>&2
-      else
-        $echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test -n "$isdir"; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test $# -gt 2; then
-        $echo "$modename: \`$dest' is not a directory" 1>&2
-        $echo "$help" 1>&2
-        exit 1
-      fi
-    fi
-    case "$destdir" in
-    /* | [A-Za-z]:\\*) ;;
-    *)
-      for file in $files; do
-        case "$file" in
-        *.lo) ;;
-        *)
-          $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-          ;;
-        esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case "$file" in
-      *.a)
-        # Do the static libraries later.
-        staticlibs="$staticlibs $file"
-        ;;
-
-      *.la)
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-        fi
-
-        library_names=
-        old_library=
-        # If there is no directory component, then add one.
-        case "$file" in
-        */* | *\\*) . $file ;;
-        *) . ./$file ;;
-        esac
-
-        # Add the libdir to current_libdirs if it is the destination.
-        if test "X$destdir" = "X$libdir"; then
-          case "$current_libdirs " in
-          *" $libdir "*) ;;
-          *) current_libdirs="$current_libdirs $libdir" ;;
-          esac
-        else
-          # Note the libdir as a future libdir.
-          case "$future_libdirs " in
-          *" $libdir "*) ;;
-          *) future_libdirs="$future_libdirs $libdir" ;;
-          esac
-        fi
-
-        dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
-        test "X$dir" = "X$file/" && dir=
-        dir="$dir$objdir"
-
-        # See the names of the shared library.
-        set dummy $library_names
-        if test -n "$2"; then
-          realname="$2"
-          shift
-          shift
-
-          # Install the shared library and build the symlinks.
-          $show "$install_prog $dir/$realname $destdir/$realname"
-          $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
-          test "X$dlname" = "X$realname" && dlname=
-
-          if test $# -gt 0; then
-            # Delete the old symlinks.
-            rmcmd="$rm"
-            for linkname
-            do
-              rmcmd="$rmcmd $destdir/$linkname"
-            done
-            $show "$rmcmd"
-            $run $rmcmd
-
-            # ... and create new ones.
-            for linkname
-            do
-              test "X$dlname" = "X$linkname" && dlname=
-              $show "(cd $destdir && $LN_S $realname $linkname)"
-              $run eval "(cd $destdir && $LN_S $realname $linkname)"
-            done
-          fi
-
-          if test -n "$dlname"; then
-            # Install the dynamically-loadable library.
-            $show "$install_prog $dir/$dlname $destdir/$dlname"
-            $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
-          fi
-
-          # Do each command in the postinstall commands.
-          lib="$destdir/$realname"
-          eval cmds=\"$postinstall_cmds\"
-          IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-          for cmd in $cmds; do
-            IFS="$save_ifs"
-            $show "$cmd"
-            $run eval "$cmd" || exit $?
-          done
-          IFS="$save_ifs"
-        fi
-
-        # Install the pseudo-library for information purposes.
-        name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-        $show "$install_prog $file $destdir/$name"
-        $run eval "$install_prog $file $destdir/$name" || exit $?
-
-        # Maybe install the static library, too.
-        test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-        ;;
-
-      *.lo)
-        # Install (i.e. copy) a libtool object.
-
-        # Figure out destination file name, if it wasn't already specified.
-        if test -n "$destname"; then
-          destfile="$destdir/$destname"
-        else
-          destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-          destfile="$destdir/$destfile"
-        fi
-
-        # Deduce the name of the destination old-style object file.
-        case "$destfile" in
-        *.lo)
-          staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'`
-          ;;
-        *.o)
-          staticdest="$destfile"
-          destfile=
-          ;;
-        *)
-          $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-          ;;
-        esac
-
-        # Install the libtool object if requested.
-        if test -n "$destfile"; then
-          $show "$install_prog $file $destfile"
-          $run eval "$install_prog $file $destfile" || exit $?
-        fi
-
-        # Install the old object if enabled.
-        if test "$build_old_libs" = yes; then
-          # Deduce the name of the old-style object file.
-          staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'`
-
-          $show "$install_prog $staticobj $staticdest"
-          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-        fi
-        exit 0
-        ;;
-
-      *)
-        # Do a test to see if this is really a libtool program.
-        if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-          link_against_libtool_libs=
-          finalize_command=
-
-          # If there is no directory component, then add one.
-          case "$file" in
-          */* | *\\*) . $file ;;
-          *) . ./$file ;;
-          esac
-
-          # Check the variables that should have been set.
-          if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
-            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
-            exit 1
-          fi
-
-          finalize=yes
-          for lib in $link_against_libtool_libs; do
-            # Check to see that each library is installed.
-            libdir=
-            if test -f "$lib"; then
-              # If there is no directory component, then add one.
-              case "$lib" in
-              */* | *\\*) . $lib ;;
-              *) . ./$lib ;;
-              esac
-            fi
-            libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
-            if test -z "$libdir"; then
-              $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2
-            elif test -f "$libfile"; then :
-            else
-              $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-              finalize=no
-            fi
-          done
-
-          if test "$hardcode_action" = relink; then
-            if test "$finalize" = yes; then
-              $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
-              $show "$finalize_command"
-              if $run eval "$finalize_command"; then :
-              else
-                $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-                continue
-              fi
-              file="$objdir/$file"T
-            else
-              $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
-            fi
-          else
-            # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-          fi
-        fi
-
-        $show "$install_prog$stripme $file $dest"
-        $run eval "$install_prog\$stripme \$file \$dest" || exit $?
-        ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
-      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-      for cmd in $cmds; do
-        IFS="$save_ifs"
-        $show "$cmd"
-        $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $SHELL $0 --finish$current_libdirs
-      exit 1
-    fi
-
-    exit 0
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-        libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
-          IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-          for cmd in $cmds; do
-            IFS="$save_ifs"
-            $show "$cmd"
-            $run eval "$cmd"
-          done
-          IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds"
-	fi
-      done
-    fi
-
-    echo "------------------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      echo "   $libdir"
-    done
-    echo
-    echo "To link against installed libraries in a given directory, LIBDIR,"
-    echo "you must use the \`-LLIBDIR' flag during linking."
-    echo
-    echo " You will also need to do one of the following:"
-    if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      echo "   - use the \`$flag' linker flag"
-    fi
-    if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "------------------------------------------------------------------------------"
-    exit 0
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit 1
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test -f "$file"; then :
-      else
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-
-      dir=
-      case "$file" in
-      *.la)
-        # Check to see that this really is a libtool archive.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then :
-        else
-          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-          $echo "$help" 1>&2
-          exit 1
-        fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-        # If there is no directory component, then add one.
-	case "$file" in
-	*/* | *\\*) . $file ;;
-        *) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-        continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case "$file" in
-      -*) ;;
-      *)
-        # Do a test to see if this is really a libtool program.
-        if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case "$file" in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-        ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      # Export the shlibpath_var.
-      eval "export $shlibpath_var"
-
-      # Now actually exec the command.
-      eval "exec \$cmd$args"
-
-      $echo "$modename: cannot exec \$cmd$args"
-      exit 1
-    else
-      # Display what would be done.
-      eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-      $echo "export $shlibpath_var"
-      $echo "$cmd$args"
-      exit 0
-    fi
-    ;;
-
-  # libtool uninstall mode
-  uninstall)
-    modename="$modename: uninstall"
-    rm="$nonopt"
-    files=
-
-    for arg
-    do
-      case "$arg" in
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$dir" = "X$file" && dir=.
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      rmfiles="$file"
-
-      case "$name" in
-      *.la)
-        # Possibly a libtool archive, so verify it.
-        if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then
-          . $dir/$name
-
-          # Delete the libtool libraries and symlinks.
-          for n in $library_names; do
-            rmfiles="$rmfiles $dir/$n"
-            test "X$n" = "X$dlname" && dlname=
-          done
-          test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
-          test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
-
-	  $show "$rm $rmfiles"
-	  $run $rm $rmfiles
-
-	  if test -n "$library_names"; then
-	    # Do each command in the postuninstall commands.
-	    eval cmds=\"$postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-          if test -n "$old_library"; then
-	    # Do each command in the old_postuninstall commands.
-	    eval cmds=\"$old_postuninstall_cmds\"
-	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=';'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd"
-	    done
-	    IFS="$save_ifs"
-	  fi
-
-          # FIXME: should reinstall the best remaining shared library.
-        fi
-        ;;
-
-      *.lo)
-        if test "$build_old_libs" = yes; then
-          oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'`
-          rmfiles="$rmfiles $dir/$oldobj"
-        fi
-	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-        ;;
-
-      *)
-      	$show "$rm $rmfiles"
-	$run $rm $rmfiles
-	;;
-      esac
-    done
-    exit 0
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-    ;;
-  esac
-
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$generic_help" 1>&2
-  exit 1
-fi # test -z "$show_help"
-
-# We need to display help for each of the modes.
-case "$mode" in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
--n, --dry-run         display commands without modifying any files
-    --features        display configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --version         print version information
-
-MODE must be one of the following:
-
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to dld_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
-library objects (\`.lo' files) may be specified, and \`-rpath' is required.
-
-If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar'
-and \`ranlib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is
-created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-  ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/tkimg1.3/libjpeg/makcjpeg.st b/tkimg1.3/libjpeg/makcjpeg.st
deleted file mode 100644
index fc72c89..0000000
--- a/tkimg1.3/libjpeg/makcjpeg.st
+++ /dev/null
@@ -1,38 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle at arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd at gina.uni-muenster.de),
-; and Guido Vollbeding (guivol at esc.de).
-;
-; To use this file, rename it to cjpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-;      * * * Output file * * *
-cjpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *  
-.C[-P]        ; absolute calls
-.C[-M]        ; and no string merging, folks
-.C[-w-cln]    ; no "constant is long" warnings
-.C[-w-par]    ; no "parameter xxxx unused"
-.C[-w-rch]    ; no "unreachable code"
-.C[-wsig]     ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * * 
-pcstart.o
-cjpeg.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdppm.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdgif.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdtarga.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdbmp.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdrle.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib        ; built by libjpeg.prj
-pcfltlib.lib       ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib       ; standard library
-pcextlib.lib       ; extended library
diff --git a/tkimg1.3/libjpeg/makdjpeg.st b/tkimg1.3/libjpeg/makdjpeg.st
deleted file mode 100644
index 3226726..0000000
--- a/tkimg1.3/libjpeg/makdjpeg.st
+++ /dev/null
@@ -1,38 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle at arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd at gina.uni-muenster.de),
-; and Guido Vollbeding (guivol at esc.de).
-;
-; To use this file, rename it to djpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-;      * * * Output file * * *
-djpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *  
-.C[-P]        ; absolute calls
-.C[-M]        ; and no string merging, folks
-.C[-w-cln]    ; no "constant is long" warnings
-.C[-w-par]    ; no "parameter xxxx unused"
-.C[-w-rch]    ; no "unreachable code"
-.C[-wsig]     ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * * 
-pcstart.o
-djpeg.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdcolmap.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrppm.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrgif.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrtarga.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrbmp.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrrle.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib        ; built by libjpeg.prj
-pcfltlib.lib       ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib       ; standard library
-pcextlib.lib       ; extended library
diff --git a/tkimg1.3/libjpeg/makeapps.ds b/tkimg1.3/libjpeg/makeapps.ds
deleted file mode 100644
index bedd038..0000000
--- a/tkimg1.3/libjpeg/makeapps.ds
+++ /dev/null
@@ -1,828 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=cjpeg - Win32
-!MESSAGE No configuration specified.  Defaulting to cjpeg - Win32.
-!ENDIF 
-
-!IF "$(CFG)" != "cjpeg - Win32" && "$(CFG)" != "djpeg - Win32" &&\
- "$(CFG)" != "jpegtran - Win32" && "$(CFG)" != "rdjpgcom - Win32" &&\
- "$(CFG)" != "wrjpgcom - Win32"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line.  For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "apps.mak" CFG="cjpeg - Win32"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "cjpeg - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "djpeg - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "jpegtran - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "rdjpgcom - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "wrjpgcom - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE 
-NULL=nul
-!ENDIF 
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "cjpeg - Win32"
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "cjpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "cjpeg\Release"
-# PROP BASE Intermediate_Dir "cjpeg\Release"
-# PROP BASE Target_Dir "cjpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "cjpeg\Release"
-# PROP Intermediate_Dir "cjpeg\Release"
-# PROP Target_Dir "cjpeg"
-OUTDIR=.\cjpeg\Release
-INTDIR=.\cjpeg\Release
-
-ALL : "$(OUTDIR)\cjpeg.exe"
-
-CLEAN : 
-	- at erase "$(INTDIR)\cjpeg.obj"
-	- at erase "$(INTDIR)\rdppm.obj"
-	- at erase "$(INTDIR)\rdgif.obj"
-	- at erase "$(INTDIR)\rdtarga.obj"
-	- at erase "$(INTDIR)\rdrle.obj"
-	- at erase "$(INTDIR)\rdbmp.obj"
-	- at erase "$(INTDIR)\rdswitch.obj"
-	- at erase "$(INTDIR)\cdjpeg.obj"
-	- at erase "$(OUTDIR)\cjpeg.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/cjpeg.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\cjpeg\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/cjpeg.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)/cjpeg.exe" 
-LINK32_OBJS= \
-	"$(INTDIR)\cjpeg.obj" \
-	"$(INTDIR)\rdppm.obj" \
-	"$(INTDIR)\rdgif.obj" \
-	"$(INTDIR)\rdtarga.obj" \
-	"$(INTDIR)\rdrle.obj" \
-	"$(INTDIR)\rdbmp.obj" \
-	"$(INTDIR)\rdswitch.obj" \
-	"$(INTDIR)\cdjpeg.obj" \
-
-
-"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "djpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "djpeg\Release"
-# PROP BASE Intermediate_Dir "djpeg\Release"
-# PROP BASE Target_Dir "djpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "djpeg\Release"
-# PROP Intermediate_Dir "djpeg\Release"
-# PROP Target_Dir "djpeg"
-OUTDIR=.\djpeg\Release
-INTDIR=.\djpeg\Release
-
-ALL : "$(OUTDIR)\djpeg.exe"
-
-CLEAN : 
-	- at erase "$(INTDIR)\djpeg.obj"
-	- at erase "$(INTDIR)\wrppm.obj"
-	- at erase "$(INTDIR)\wrgif.obj"
-	- at erase "$(INTDIR)\wrtarga.obj"
-	- at erase "$(INTDIR)\wrrle.obj"
-	- at erase "$(INTDIR)\wrbmp.obj"
-	- at erase "$(INTDIR)\rdcolmap.obj"
-	- at erase "$(INTDIR)\cdjpeg.obj"
-	- at erase "$(OUTDIR)\djpeg.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/djpeg.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\djpeg\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/djpeg.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/djpeg.pdb" /machine:I386 /out:"$(OUTDIR)/djpeg.exe" 
-LINK32_OBJS= \
-	"$(INTDIR)\djpeg.obj" \
-	"$(INTDIR)\wrppm.obj" \
-	"$(INTDIR)\wrgif.obj" \
-	"$(INTDIR)\wrtarga.obj" \
-	"$(INTDIR)\wrrle.obj" \
-	"$(INTDIR)\wrbmp.obj" \
-	"$(INTDIR)\rdcolmap.obj" \
-	"$(INTDIR)\cdjpeg.obj" \
-
-
-"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "jpegtran - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "jpegtran\Release"
-# PROP BASE Intermediate_Dir "jpegtran\Release"
-# PROP BASE Target_Dir "jpegtran"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "jpegtran\Release"
-# PROP Intermediate_Dir "jpegtran\Release"
-# PROP Target_Dir "jpegtran"
-OUTDIR=.\jpegtran\Release
-INTDIR=.\jpegtran\Release
-
-ALL : "$(OUTDIR)\jpegtran.exe"
-
-CLEAN : 
-	- at erase "$(INTDIR)\jpegtran.obj"
-	- at erase "$(INTDIR)\rdswitch.obj"
-	- at erase "$(INTDIR)\cdjpeg.obj"
-	- at erase "$(INTDIR)\transupp.obj"
-	- at erase "$(OUTDIR)\jpegtran.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/jpegtran.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\jpegtran\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpegtran.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)/jpegtran.exe" 
-LINK32_OBJS= \
-	"$(INTDIR)\jpegtran.obj" \
-	"$(INTDIR)\rdswitch.obj" \
-	"$(INTDIR)\cdjpeg.obj" \
-	"$(INTDIR)\transupp.obj" \
-
-
-"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "rdjpgcom - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "rdjpgcom\Release"
-# PROP BASE Intermediate_Dir "rdjpgcom\Release"
-# PROP BASE Target_Dir "rdjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "rdjpgcom\Release"
-# PROP Intermediate_Dir "rdjpgcom\Release"
-# PROP Target_Dir "rdjpgcom"
-OUTDIR=.\rdjpgcom\Release
-INTDIR=.\rdjpgcom\Release
-
-ALL : "$(OUTDIR)\rdjpgcom.exe"
-
-CLEAN : 
-	- at erase "$(INTDIR)\rdjpgcom.obj"
-	- at erase "$(OUTDIR)\rdjpgcom.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/rdjpgcom.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\rdjpgcom\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/rdjpgcom.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/rdjpgcom.exe" 
-LINK32_OBJS= \
-	"$(INTDIR)\rdjpgcom.obj"
-
-"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "wrjpgcom - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "wrjpgcom\Release"
-# PROP BASE Intermediate_Dir "wrjpgcom\Release"
-# PROP BASE Target_Dir "wrjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "wrjpgcom\Release"
-# PROP Intermediate_Dir "wrjpgcom\Release"
-# PROP Target_Dir "wrjpgcom"
-OUTDIR=.\wrjpgcom\Release
-INTDIR=.\wrjpgcom\Release
-
-ALL : "$(OUTDIR)\wrjpgcom.exe"
-
-CLEAN : 
-	- at erase "$(INTDIR)\wrjpgcom.obj"
-	- at erase "$(OUTDIR)\wrjpgcom.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/wrjpgcom.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\wrjpgcom\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/wrjpgcom.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/wrjpgcom.exe" 
-LINK32_OBJS= \
-	"$(INTDIR)\wrjpgcom.obj"
-
-"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF 
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-################################################################################
-# Begin Target
-
-# Name "cjpeg - Win32"
-
-!IF  "$(CFG)" == "cjpeg - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="cjpeg.c"
-DEP_CPP_CJPEG=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	"jversion.h"\
-	
-
-"$(INTDIR)\cjpeg.obj" : $(SOURCE) $(DEP_CPP_CJPEG) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdswitch.c"
-DEP_CPP_RDSWI=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdppm.c"
-DEP_CPP_RDPPM=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdppm.obj" : $(SOURCE) $(DEP_CPP_RDPPM) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdgif.c"
-DEP_CPP_RDGIF=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdgif.obj" : $(SOURCE) $(DEP_CPP_RDGIF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdtarga.c"
-DEP_CPP_RDTAR=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdtarga.obj" : $(SOURCE) $(DEP_CPP_RDTAR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdbmp.c"
-DEP_CPP_RDBMP=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdbmp.obj" : $(SOURCE) $(DEP_CPP_RDBMP) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdrle.c"
-DEP_CPP_RDRLE=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdrle.obj" : $(SOURCE) $(DEP_CPP_RDRLE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "djpeg - Win32"
-
-!IF  "$(CFG)" == "djpeg - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="djpeg.c"
-DEP_CPP_DJPEG=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	"jversion.h"\
-	
-
-"$(INTDIR)\djpeg.obj" : $(SOURCE) $(DEP_CPP_DJPEG) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdcolmap.c"
-DEP_CPP_RDCOL=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdcolmap.obj" : $(SOURCE) $(DEP_CPP_RDCOL) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrppm.c"
-DEP_CPP_WRPPM=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\wrppm.obj" : $(SOURCE) $(DEP_CPP_WRPPM) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrgif.c"
-DEP_CPP_WRGIF=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\wrgif.obj" : $(SOURCE) $(DEP_CPP_WRGIF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrtarga.c"
-DEP_CPP_WRTAR=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\wrtarga.obj" : $(SOURCE) $(DEP_CPP_WRTAR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrbmp.c"
-DEP_CPP_WRBMP=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\wrbmp.obj" : $(SOURCE) $(DEP_CPP_WRBMP) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrrle.c"
-DEP_CPP_WRRLE=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\wrrle.obj" : $(SOURCE) $(DEP_CPP_WRRLE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "jpegtran - Win32"
-
-!IF  "$(CFG)" == "jpegtran - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="jpegtran.c"
-DEP_CPP_JPEGT=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	"transupp.h"\
-	"jversion.h"\
-	
-
-"$(INTDIR)\jpegtran.obj" : $(SOURCE) $(DEP_CPP_JPEGT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdswitch.c"
-DEP_CPP_RDSWI=\
-	"cdjpeg.h"\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	"cderror.h"\
-	
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="transupp.c"
-DEP_CPP_TRANS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"transupp.h"\
-	
-
-"$(INTDIR)\transupp.obj" : $(SOURCE) $(DEP_CPP_TRANS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "rdjpgcom - Win32"
-
-!IF  "$(CFG)" == "rdjpgcom - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="rdjpgcom.c"
-DEP_CPP_RDJPG=\
-	"jinclude.h"\
-	"jconfig.h"\
-	
-
-"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) $(DEP_CPP_RDJPG) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "wrjpgcom - Win32"
-
-!IF  "$(CFG)" == "wrjpgcom - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="wrjpgcom.c"
-DEP_CPP_WRJPG=\
-	"jinclude.h"\
-	"jconfig.h"\
-	
-
-"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) $(DEP_CPP_WRJPG) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
-
diff --git a/tkimg1.3/libjpeg/makefile.ansi b/tkimg1.3/libjpeg/makefile.ansi
deleted file mode 100644
index 8291913..0000000
--- a/tkimg1.3/libjpeg/makefile.ansi
+++ /dev/null
@@ -1,214 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Unix-like systems with ANSI-capable compilers.
-# If you have a non-ANSI compiler, makefile.unix is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-LDFLAGS= 
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= 
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
-        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
-        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
-        jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
-        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
-        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
-        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
-        cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
-        cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.a: $(LIBOBJECTS)
-	$(RM) libjpeg.a
-	$(AR) libjpeg.a  $(LIBOBJECTS)
-	$(AR2) libjpeg.a
-
-cjpeg: $(COBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
-	$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
-	$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	$(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
-	$(RM) core testout*
-
-test: cjpeg djpeg jpegtran
-	$(RM) testout*
-	./djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	./cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	./jpegtran -outfile testoutt.jpg testprog.jpg
-	cmp testimg.ppm testout.ppm
-	cmp testimg.bmp testout.bmp
-	cmp testimg.jpg testout.jpg
-	cmp testimg.ppm testoutp.ppm
-	cmp testimgp.jpg testoutp.jpg
-	cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.bcc b/tkimg1.3/libjpeg/makefile.bcc
deleted file mode 100644
index a1cfcde..0000000
--- a/tkimg1.3/libjpeg/makefile.bcc
+++ /dev/null
@@ -1,285 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Borland C on MS-DOS or OS/2.
-# It works with Borland C++ for DOS, revision 3.0 or later,
-# and has been tested with Borland C++ for OS/2.
-# Watch out for optimization bugs in the OS/2 compilers --- see notes below!
-# Thanks to Tom Wright and Ge' Weijers (original DOS) and
-# Ken Porter (OS/2) for this file.
-
-# Read installation instructions before saying "make" !!
-
-# Are we under DOS or OS/2?
-!if !$d(DOS) && !$d(OS2)
-!if $d(__OS2__)
-OS2=1
-!else
-DOS=1
-!endif
-!endif
-
-# The name of your C compiler:
-CC= bcc
-
-# You may need to adjust these cc options:
-!if $d(DOS)
-CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch
-!else
-CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch
-!endif
-# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z).
-# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now.
-# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all.
-# -mm selects medium memory model (near data, far code pointers; DOS only!)
-# -w-par suppresses warnings about unused function parameters
-# -w-stu suppresses warnings about incomplete structures
-# -w-ccc suppresses warnings about compile-time-constant conditions
-# -w-rch suppresses warnings about unreachable code
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!if $d(DOS)
-LDFLAGS= -mm
-# memory model option here must match CFLAGS!
-!else
-LDFLAGS=
-# -lai full-screen app
-# -lc case-significant link
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.
-# For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# For OS/2, we recommend jmemnobs.c (flat memory!)
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-!if $d(DOS)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-!else
-SYSDEPMEM= jmemnobs.obj
-SYSDEPMEMLIB= +jmemnobs.obj
-!endif
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
-        jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
-        jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
-        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
-        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
-        jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
-        jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
-        jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
-        rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
-        rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
-	- del libjpeg.lib
-	tlib libjpeg.lib /E /C @&&|
-+jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj &
-+jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj &
-+jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj &
-+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
-+jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj &
-+jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj &
-+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
-+jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj &
-+jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
-$(SYSDEPMEMLIB)
-|
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
-!if $d(DOS)
-	$(CC) -ms -O rdjpgcom.c
-!else
-	$(CC) $(CFLAGS) rdjpgcom.c
-!endif
-
-# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
-!if $d(DOS)
-	$(CC) -ml -O wrjpgcom.c
-!else
-	$(CC) $(CFLAGS) wrjpgcom.c
-!endif
-
-# This "{}" syntax allows Borland Make to "batch" source files.
-# In this way, each run of the compiler can build many modules.
-.c.obj:
-	$(CC) $(CFLAGS) -c{ $<}
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	- del *.obj
-	- del libjpeg.lib
-	- del cjpeg.exe
-	- del djpeg.exe
-	- del jpegtran.exe
-	- del rdjpgcom.exe
-	- del wrjpgcom.exe
-	- del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
-	- del testout*.*
-	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	jpegtran -outfile testoutt.jpg testprog.jpg
-!if $d(DOS)
-	fc /b testimg.ppm testout.ppm
-	fc /b testimg.bmp testout.bmp
-	fc /b testimg.jpg testout.jpg
-	fc /b testimg.ppm testoutp.ppm
-	fc /b testimgp.jpg testoutp.jpg
-	fc /b testorig.jpg testoutt.jpg
-!else
-	echo n > n.tmp
-	comp testimg.ppm testout.ppm < n.tmp
-	comp testimg.bmp testout.bmp < n.tmp
-	comp testimg.jpg testout.jpg < n.tmp
-	comp testimg.ppm testoutp.ppm < n.tmp
-	comp testimgp.jpg testoutp.jpg < n.tmp
-	comp testorig.jpg testoutt.jpg < n.tmp
-	del n.tmp
-!endif
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj: jmemdosa.asm
-	tasm /mx jmemdosa.asm
diff --git a/tkimg1.3/libjpeg/makefile.cfg b/tkimg1.3/libjpeg/makefile.cfg
deleted file mode 100644
index f25e42e..0000000
--- a/tkimg1.3/libjpeg/makefile.cfg
+++ /dev/null
@@ -1,319 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# makefile.cfg is edited by configure to produce a custom Makefile.
-
-# Read installation instructions before saying "make" !!
-
-# For compiling with source and object files in different directories.
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-# Where to install the programs and man pages.
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-includedir = $(prefix)/include
-binprefix =
-manprefix =
-manext = 1
-mandir = $(prefix)/man/man$(manext)
-
-# The name of your C compiler:
-CC= @CC@
-
-# You may need to adjust these cc options:
-CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-# However, any special defines for ansi2knr.c may be included here:
-ANSI2KNRFLAGS= @ANSI2KNRFLAGS@
-
-# Link-time cc options:
-LDFLAGS= @LDFLAGS@
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= @LIBS@
-
-# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty.
-LIBTOOL = @LIBTOOL@
-# $(O) expands to "lo" if using libtool, plain "o" if not.
-# Similarly, $(A) expands to "la" or "a".
-O = @O@
-A = @A@
-
-# Library version ID; libtool uses this for the shared library version number.
-# Note: we suggest this match the macro of the same name in jpeglib.h.
-JPEG_LIB_VERSION = @JPEG_LIB_VERSION@
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= @MEMORYMGR@
-
-# miscellaneous OS-dependent stuff
-SHELL= /bin/sh
-# linker
-LN= @LN@
-# file deletion command
-RM= rm -f
-# directory creation command
-MKDIR= mkdir
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= @RANLIB@
-# installation program
-INSTALL= @INSTALL@
-INSTALL_PROGRAM= @INSTALL_PROGRAM@
-INSTALL_LIB= @INSTALL_LIB@
-INSTALL_DATA= @INSTALL_DATA@
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \
-        jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \
-        jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \
-        jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \
-        jfdctint.$(O)
-# decompression library object files
-DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \
-        jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \
-        jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \
-        jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \
-        jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O)
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \
-        rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O)
-DOBJECTS= djpeg.$(O) wrppm.$(O) wrgif.$(O) wrtarga.$(O) wrrle.$(O) \
-        wrbmp.$(O) rdcolmap.$(O) cdjpeg.$(O)
-TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O)
-
-
-all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-# Special compilation rules to support ansi2knr and libtool.
-.SUFFIXES: .lo .la
-
-# How to compile with libtool.
- at COM_LT@.c.lo:
- at COM_LT@	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
-
-# How to use ansi2knr, when not using libtool.
- at COM_A2K@.c.o:
- at COM_A2K@	./ansi2knr $(srcdir)/$*.c knr/$*.c
- at COM_A2K@	$(CC) $(CFLAGS) -c knr/$*.c
- at COM_A2K@	$(RM) knr/$*.c
-
-# How to use ansi2knr AND libtool.
- at COM_A2K@.c.lo:
- at COM_A2K@	./ansi2knr $(srcdir)/$*.c knr/$*.c
- at COM_A2K@	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
- at COM_A2K@	$(RM) knr/$*.c
-
-ansi2knr: ansi2knr.c
-	$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c
-	$(MKDIR) knr
-
-# the library:
-
-# without libtool:
-libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
-	$(RM) libjpeg.a
-	$(AR) libjpeg.a  $(LIBOBJECTS)
-	$(AR2) libjpeg.a
-
-# with libtool:
-libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
-	$(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
-		-rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
-
-# sample programs:
-
-cjpeg: $(COBJECTS) libjpeg.$(A)
-	$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.$(A) $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.$(A)
-	$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.$(A) $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.$(A)
-	$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.$(A) $(LDLIBS)
-
-rdjpgcom: rdjpgcom.$(O)
-	$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.$(O) $(LDLIBS)
-
-wrjpgcom: wrjpgcom.$(O)
-	$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.$(O) $(LDLIBS)
-
-# Installation rules:
-
-install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@
-	$(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
-	$(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
-	$(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
-	$(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
-	$(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
-	$(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
-	$(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
-	$(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
-	$(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
-	$(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
-
-install-lib: libjpeg.$(A) install-headers
-	$(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)
-
-install-headers: jconfig.h
-	$(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
-	$(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
-	$(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
-	$(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
-
-clean:
-	$(RM) *.o *.lo libjpeg.a libjpeg.la
-	$(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-	$(RM) ansi2knr core testout* config.log config.status
-	$(RM) -r knr .libs _libs
-
-distclean: clean
-	$(RM) Makefile jconfig.h libtool config.cache
-
-test: cjpeg djpeg jpegtran
-	$(RM) testout*
-	./djpeg -dct int -ppm -outfile testout.ppm  $(srcdir)/testorig.jpg
-	./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  $(srcdir)/testorig.jpg
-	./cjpeg -dct int -outfile testout.jpg  $(srcdir)/testimg.ppm
-	./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
-	./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
-	./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg
-	cmp $(srcdir)/testimg.ppm testout.ppm
-	cmp $(srcdir)/testimg.bmp testout.bmp
-	cmp $(srcdir)/testimg.jpg testout.jpg
-	cmp $(srcdir)/testimg.ppm testoutp.ppm
-	cmp $(srcdir)/testimgp.jpg testoutp.jpg
-	cmp $(srcdir)/testorig.jpg testoutt.jpg
-
-check: test
-
-# Mistake catcher:
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-# GNU Make likes to know which target names are not really files to be made:
-.PHONY: all install install-lib install-headers clean distclean test check
-
-
-jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.$(O): jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.$(O): jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.$(O): jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.$(O): jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.$(O): jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.$(O): jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.$(O): jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.$(O): jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.$(O): jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.$(O): jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.$(O): cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.$(O): djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.$(O): jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.$(O): rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.$(O): wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.$(O): cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.$(O): rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.$(O): rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.$(O): transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.$(O): rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.$(O): wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.$(O): rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.$(O): wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.$(O): rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.$(O): wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.$(O): rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.$(O): wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.$(O): rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.$(O): wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.dj b/tkimg1.3/libjpeg/makefile.dj
deleted file mode 100644
index f766d25..0000000
--- a/tkimg1.3/libjpeg/makefile.dj
+++ /dev/null
@@ -1,220 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later.
-# Thanks to Frank J. Donahoe for this version.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-CFLAGS= -O2 -Wall -I.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-LDFLAGS= -s
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= 
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For DJGPP this is usually jmemnobs.o, but you could
-# use jmemname.o if you want to use named temp files instead of swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= del
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
-        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
-        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
-        jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
-        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
-        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
-        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
-        cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
-        cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.a: $(LIBOBJECTS)
-	$(RM) libjpeg.a
-	$(AR) libjpeg.a  $(LIBOBJECTS)
-	$(AR2) libjpeg.a
-
-cjpeg.exe: $(COBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.o
-	$(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.o
-	$(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	$(RM) *.o
-	$(RM) cjpeg.exe
-	$(RM) djpeg.exe
-	$(RM) jpegtran.exe
-	$(RM) rdjpgcom.exe
-	$(RM) wrjpgcom.exe
-	$(RM) libjpeg.a
-	$(RM) testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
-	$(RM) testout*.*
-	./djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	./cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	./jpegtran -outfile testoutt.jpg testprog.jpg
-	fc /b testimg.ppm testout.ppm
-	fc /b testimg.bmp testout.bmp
-	fc /b testimg.jpg testout.jpg
-	fc /b testimg.ppm testoutp.ppm
-	fc /b testimgp.jpg testoutp.jpg
-	fc /b testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.manx b/tkimg1.3/libjpeg/makefile.manx
deleted file mode 100644
index 4cb42d1..0000000
--- a/tkimg1.3/libjpeg/makefile.manx
+++ /dev/null
@@ -1,214 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using Manx Aztec C ver 5.x.
-# Thanks to D.J. James (djjames at cup.portal.com) for this version.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-# Uncomment for generic 68000 code (will work on any Amiga)
-ARCHFLAGS= -sn
-
-# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU)
-#ARCHFLAGS= -c2
-
-CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4
-
-# Link-time cc options:
-LDFLAGS= -g
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= -lml -lcl
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= ln
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= lb
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
-        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
-        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
-        jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
-        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
-        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
-        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
-        cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
-        cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.lib: $(LIBOBJECTS)
-	-$(RM) libjpeg.lib
-	$(AR) libjpeg.lib  $(LIBOBJECTS)
-
-cjpeg: $(COBJECTS) libjpeg.lib
-	$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.lib
-	$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.lib
-	$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
-	$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
-	$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	-$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom
-	-$(RM) core testout*.*
-
-test: cjpeg djpeg jpegtran
-	-$(RM) testout*.*
-	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	jpegtran -outfile testoutt.jpg testprog.jpg
-	cmp testimg.ppm testout.ppm
-	cmp testimg.bmp testout.bmp
-	cmp testimg.jpg testout.jpg
-	cmp testimg.ppm testoutp.ppm
-	cmp testimgp.jpg testoutp.jpg
-	cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.mc6 b/tkimg1.3/libjpeg/makefile.mc6
deleted file mode 100644
index 6aff054..0000000
--- a/tkimg1.3/libjpeg/makefile.mc6
+++ /dev/null
@@ -1,249 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Microsoft C for MS-DOS, version 6.00A and up.
-# Use NMAKE, not Microsoft's brain-damaged MAKE.
-# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd.
-
-# Read installation instructions before saying "nmake" !!
-
-# You may need to adjust these compiler options:
-CFLAGS = -AM -Oecigt -Gs -W3
-# -AM medium memory model (or use -AS for small model, if you remove features)
-# -Oecigt -Gs  maximum safe optimisation (-Ol has bugs in MSC 6.00A)
-# -W3 warning level 3
-# You might also want to add -G2 if you have an 80286, etc.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486:
-# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \
-#          /OV4 /W3
-# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler
-# crash.
-
-# Ingar Steinsland suggests the following switches when building
-# a 16-bit Windows DLL:
-# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# (But not for Windows; see install.doc if you use this makefile for Windows.)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
-        jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
-        jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
-        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
-        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
-        jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
-        jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
-        jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
-        rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
-        rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# need linker response file because file list > 128 chars
-RFILE = libjpeg.ans
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS) $(RFILE)
-	del libjpeg.lib
-	lib @$(RFILE)
-
-# linker response file for building libjpeg.lib
-$(RFILE) : makefile
-	del $(RFILE)
-	echo libjpeg.lib >$(RFILE)
-# silly want-to-create-it prompt:
-	echo y >>$(RFILE)
-	echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE)
-	echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE)
-	echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE)
-	echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE)
-	echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE)
-	echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE)
-	echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE)
-	echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE)
-	echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE)
-	echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE)
-	echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
-	echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE)
-	echo +jerror.obj +jmemmgr.obj & >>$(RFILE)
-	echo $(SYSDEPMEMLIB) ; >>$(RFILE)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
-	echo $(COBJECTS) >cjpeg.lst
-	link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ;
-	del cjpeg.lst
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
-	echo $(DOBJECTS) >djpeg.lst
-	link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ;
-	del djpeg.lst
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
-	link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ;
-
-rdjpgcom.exe: rdjpgcom.c
-	$(CC) -AS -O -W3 rdjpgcom.c
-
-# wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
-	$(CC) -AL -O -W3 wrjpgcom.c
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	del *.obj
-	del libjpeg.lib
-	del cjpeg.exe
-	del djpeg.exe
-	del jpegtran.exe
-	del rdjpgcom.exe
-	del wrjpgcom.exe
-	del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
-	del testout*.*
-	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	jpegtran -outfile testoutt.jpg testprog.jpg
-	fc /b testimg.ppm testout.ppm
-	fc /b testimg.bmp testout.bmp
-	fc /b testimg.jpg testout.jpg
-	fc /b testimg.ppm testoutp.ppm
-	fc /b testimgp.jpg testoutp.jpg
-	fc /b testorig.jpg testoutt.jpg
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj : jmemdosa.asm
-	masm /mx $*;
diff --git a/tkimg1.3/libjpeg/makefile.mms b/tkimg1.3/libjpeg/makefile.mms
deleted file mode 100644
index cf130e5..0000000
--- a/tkimg1.3/libjpeg/makefile.mms
+++ /dev/null
@@ -1,218 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for use with MMS on Digital VMS systems.
-# Thanks to Rick Dyson (dyson at iowasp.physics.uiowa.edu)
-# and Tim Bell (tbell at netcom.com) for their help.
-
-# Read installation instructions before saying "MMS" !!
-
-# You may need to adjust these cc options:
-CFLAGS= $(CFLAGS) /NoDebug /Optimize
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via /Define switches here.
-.ifdef ALPHA
-OPT=
-.else
-OPT= ,Sys$Disk:[]MAKVMS.OPT/Option
-.endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
-        jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
-        jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
-        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
-        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
-        jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
-        jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
-        jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.olb
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
-        rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
-        rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-# objectfile lists with commas --- what a crock
-COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\
-          rdswitch.obj,cdjpeg.obj
-DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\
-          rdcolmap.obj,cdjpeg.obj
-TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj
-LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\
-          jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\
-          jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\
-          jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\
-          jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\
-          jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\
-          jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\
-          jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\
-          jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM)
-
-
-.first
-	@- Define /NoLog Sys Sys$Library
-
-ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-	@ Continue
-
-libjpeg.olb : $(LIBOBJECTS)
-	Library /Create libjpeg.olb $(LIBOBJLIST)
-
-cjpeg.exe : $(COBJECTS) libjpeg.olb
-	$(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT)
-
-djpeg.exe : $(DOBJECTS) libjpeg.olb
-	$(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT)
-
-jpegtran.exe : $(TROBJECTS) libjpeg.olb
-	$(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT)
-
-rdjpgcom.exe : rdjpgcom.obj
-	$(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT)
-
-wrjpgcom.exe : wrjpgcom.obj
-	$(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT)
-
-jconfig.h : jconfig.vms
-	@- Copy jconfig.vms jconfig.h
-
-clean :
-	@- Set Protection = Owner:RWED *.*;-1
-	@- Set Protection = Owner:RWED *.OBJ
-	- Purge /NoLog /NoConfirm *.*
-	- Delete /NoLog /NoConfirm *.OBJ;
-
-test : cjpeg.exe djpeg.exe jpegtran.exe
-	mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
-	mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
-	mcr sys$disk:[]cjpeg -dct int      -outfile testout.jpg testimg.ppm
-	mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
-	- Backup /Compare/Log	  testimg.ppm testout.ppm
-	- Backup /Compare/Log	  testimg.bmp testout.bmp
-	- Backup /Compare/Log	  testimg.jpg testout.jpg
-	- Backup /Compare/Log	  testimg.ppm testoutp.ppm
-	- Backup /Compare/Log	  testimgp.jpg testoutp.jpg
-	- Backup /Compare/Log	  testorig.jpg testoutt.jpg
-
-
-jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.sas b/tkimg1.3/libjpeg/makefile.sas
deleted file mode 100644
index f296faf..0000000
--- a/tkimg1.3/libjpeg/makefile.sas
+++ /dev/null
@@ -1,252 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using SAS C 6.0 and up.
-# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= sc
-
-# You may need to adjust these cc options:
-# Uncomment the following lines for generic 680x0 version
-ARCHFLAGS= cpu=any
-SUFFIX=
-
-# Uncomment the following lines for 68030-only version
-#ARCHFLAGS= cpu=68030
-#SUFFIX=.030
-
-CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \
-	ignore=104 ignore=304 ignore=306
-# ignore=104 disables warnings for mismatched const qualifiers
-# ignore=304 disables warnings for variables being optimized out
-# ignore=306 disables warnings for the inlining of functions
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via define switches here.
-
-# Link-time cc options:
-LDFLAGS= SC SD ND BATCH
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS= LIB:scm.lib LIB:sc.lib
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= slink
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= oml
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
-        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
-        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
-        jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
-        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
-        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
-        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
-        cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
-        cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX)
-
-# note: do several AR steps to avoid command line length limitations
-
-libjpeg.lib: $(LIBOBJECTS)
-	-$(RM) libjpeg.lib
-	$(AR) libjpeg.lib r $(CLIBOBJECTS)
-	$(AR) libjpeg.lib r $(DLIBOBJECTS)
-	$(AR) libjpeg.lib r $(COMOBJECTS)
-
-cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib
-	$(LN) <WITH <
-$(LDFLAGS)
-TO cjpeg$(SUFFIX)
-FROM LIB:c.o $(COBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-djpeg$(SUFFIX): $(DOBJECTS) libjpeg.lib
-	$(LN) <WITH <
-$(LDFLAGS)
-TO djpeg$(SUFFIX)
-FROM LIB:c.o $(DOBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-jpegtran$(SUFFIX): $(TROBJECTS) libjpeg.lib
-	$(LN) <WITH <
-$(LDFLAGS)
-TO jpegtran$(SUFFIX)
-FROM LIB:c.o $(TROBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-rdjpgcom$(SUFFIX): rdjpgcom.o
-	$(LN) <WITH <
-$(LDFLAGS)
-TO rdjpgcom$(SUFFIX)
-FROM LIB:c.o rdjpgcom.o
-LIB $(LDLIBS)
-<
-
-wrjpgcom$(SUFFIX): wrjpgcom.o
-	$(LN) <WITH <
-$(LDFLAGS)
-TO wrjpgcom$(SUFFIX)
-FROM LIB:c.o wrjpgcom.o
-LIB $(LDLIBS)
-<
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	-$(RM) *.o cjpeg djpeg jpegtran cjpeg.030 djpeg.030 jpegtran.030
-	-$(RM) rdjpgcom wrjpgcom rdjpgcom.030 wrjpgcom.030
-	-$(RM) libjpeg.lib core testout*.*
-
-test: cjpeg djpeg jpegtran
-	-$(RM) testout*.*
-	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	jpegtran -outfile testoutt.jpg testprog.jpg
-	cmp testimg.ppm testout.ppm
-	cmp testimg.bmp testout.bmp
-	cmp testimg.jpg testout.jpg
-	cmp testimg.ppm testoutp.ppm
-	cmp testimgp.jpg testoutp.jpg
-	cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.unix b/tkimg1.3/libjpeg/makefile.unix
deleted file mode 100644
index 00455ab..0000000
--- a/tkimg1.3/libjpeg/makefile.unix
+++ /dev/null
@@ -1,228 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Unix-like systems with non-ANSI compilers.
-# If you have an ANSI compiler, makefile.ansi is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-# However, any special defines for ansi2knr.c may be included here:
-ANSI2KNRFLAGS= 
-
-# Link-time cc options:
-LDFLAGS= 
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= 
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# file rename command
-MV= mv
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
-        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
-        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
-        jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
-        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
-        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
-        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
-        cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
-        cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: ansi2knr libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-# This rule causes ansi2knr to be invoked.
-.c.o:
-	./ansi2knr $*.c T$*.c
-	$(CC) $(CFLAGS) -c T$*.c
-	$(RM) T$*.c $*.o
-	$(MV) T$*.o $*.o
-
-ansi2knr: ansi2knr.c
-	$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
-libjpeg.a: ansi2knr $(LIBOBJECTS)
-	$(RM) libjpeg.a
-	$(AR) libjpeg.a  $(LIBOBJECTS)
-	$(AR2) libjpeg.a
-
-cjpeg: ansi2knr $(COBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: ansi2knr $(DOBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: ansi2knr $(TROBJECTS) libjpeg.a
-	$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
-	$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
-	$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean:
-	$(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
-	$(RM) ansi2knr core testout*
-
-test: cjpeg djpeg jpegtran
-	$(RM) testout*
-	./djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	./cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	./jpegtran -outfile testoutt.jpg testprog.jpg
-	cmp testimg.ppm testout.ppm
-	cmp testimg.bmp testout.bmp
-	cmp testimg.jpg testout.jpg
-	cmp testimg.ppm testoutp.ppm
-	cmp testimgp.jpg testoutp.jpg
-	cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makefile.vc b/tkimg1.3/libjpeg/makefile.vc
deleted file mode 100644
index d726788..0000000
--- a/tkimg1.3/libjpeg/makefile.vc
+++ /dev/null
@@ -1,223 +0,0 @@
-# Visual C++ 2.x, 4.x and 5.0 makefile for jpeg
-# adapted from suns example makefile (related to the TCL script language)
-#
-# CVS:  $Id: makefile.vc,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-
-# Does not depend on the presence of any environment variables in
-# order to compile jpeg; all needed information is derived from 
-# location of the compiler directories.
-
-#
-# Project directories
-#
-# ROOT    = top of source tree
-#
-# TMPDIR  = location where .obj files should be stored during build
-#
-# TOOLS32 = location of VC++ 32-bit development tools. Note that the
-#           VC++ 2.0 header files are broken, so you need to use the
-#           ones that come with the developer network CD's, or later
-#           versions of VC++.
-#
-
-VC_VERSION = 50
-
-ROOT            = .
-TMPDIR          = .
-!IF $(VC_VERSION) < 50
-TOOLS32 	= c:\msdev			# VC++ 2.x and 4.x
-!ELSE
-TOOLS32 	= c:\PROGRA~1\DevStudio\VC	# VC++ 5.0
-!ENDIF
-INSTALLDIR	= c:\WINNT\SYSTEM32
-
-# Set this to the appropriate value of /MACHINE: for your platform
-MACHINE = IX86
-
-# Comment the following line to compile with symbols
-NODEBUG=1
-
-
-######################################################################
-# Do not modify below this line
-######################################################################
-
-JPEG            =       jpeg62
-JPEGLIB         =       $(JPEG).lib
-JPEGDLL         =       $(JPEG).dll
-
-JPEGOBJS        =       \
-	$(TMPDIR)\jcapimin.obj  \
-	$(TMPDIR)\jcapistd.obj  \
-	$(TMPDIR)\jccoefct.obj  \
-	$(TMPDIR)\jccolor.obj   \
-	$(TMPDIR)\jcdctmgr.obj  \
-	$(TMPDIR)\jchuff.obj    \
-	$(TMPDIR)\jcinit.obj    \
-	$(TMPDIR)\jcmainct.obj  \
-	$(TMPDIR)\jcmarker.obj  \
-	$(TMPDIR)\jcmaster.obj  \
-	$(TMPDIR)\jcomapi.obj   \
-	$(TMPDIR)\jcparam.obj   \
-	$(TMPDIR)\jcphuff.obj   \
-	$(TMPDIR)\jcprepct.obj  \
-	$(TMPDIR)\jcsample.obj  \
-	$(TMPDIR)\jctrans.obj   \
-	$(TMPDIR)\jdapimin.obj  \
-	$(TMPDIR)\jdapistd.obj  \
-	$(TMPDIR)\jdatadst.obj  \
-	$(TMPDIR)\jdatasrc.obj  \
-	$(TMPDIR)\jdcoefct.obj  \
-	$(TMPDIR)\jdcolor.obj   \
-	$(TMPDIR)\jddctmgr.obj  \
-	$(TMPDIR)\jdhuff.obj    \
-	$(TMPDIR)\jdinput.obj   \
-	$(TMPDIR)\jdmainct.obj  \
-	$(TMPDIR)\jdmarker.obj  \
-	$(TMPDIR)\jdmaster.obj  \
-	$(TMPDIR)\jdmerge.obj   \
-	$(TMPDIR)\jdphuff.obj   \
-	$(TMPDIR)\jdpostct.obj  \
-	$(TMPDIR)\jdsample.obj  \
-	$(TMPDIR)\jdtrans.obj   \
-	$(TMPDIR)\jerror.obj    \
-	$(TMPDIR)\jfdctflt.obj  \
-	$(TMPDIR)\jfdctfst.obj  \
-	$(TMPDIR)\jfdctint.obj  \
-	$(TMPDIR)\jidctflt.obj  \
-	$(TMPDIR)\jidctfst.obj  \
-	$(TMPDIR)\jidctint.obj  \
-	$(TMPDIR)\jidctred.obj  \
-	$(TMPDIR)\jmemmgr.obj   \
-	$(TMPDIR)\jmemnobs.obj  \
-	$(TMPDIR)\jquant1.obj   \
-	$(TMPDIR)\jquant2.obj   \
-	$(TMPDIR)\jutils.obj
-
-
-PATH=$(TOOLS32)\bin;$(PATH)
-
-cc32            = $(TOOLS32)\bin\cl.exe
-link32          = $(TOOLS32)\bin\link.exe
-rc32            = $(TOOLS32)\bin\rc.exe
-include32       = -I$(TOOLS32)\include
-CP              = copy
-RM              = del
-
-JPEG_INCLUDES   = -I$(ROOT)
-JPEG_DEFINES    = -nologo -D__WIN32__ -DJPEG_DLL
-
-JPEG_CFLAGS     =       $(cdebug) $(cflags) $(cvarsdll) $(include32) \
-			$(JPEG_INCLUDES) $(JPEG_DEFINES)
-CON_CFLAGS      =       $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE
-DOS_CFLAGS      =       $(cdebug) $(cflags) $(include16) -AL 
-
-######################################################################
-# Link flags
-######################################################################
-
-!IFDEF NODEBUG
-ldebug = /RELEASE
-!ELSE
-ldebug = -debug:full -debugtype:cv
-!ENDIF
-
-# declarations common to all linker options
-lcommon = /NODEFAULTLIB /RELEASE /NOLOGO
-
-# declarations for use on Intel i386, i486, and Pentium systems
-!IF "$(MACHINE)" == "IX86"
-DLLENTRY = @12
-lflags   = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE)
-!ELSE
-lflags   = $(lcommon) /MACHINE:$(MACHINE)
-!ENDIF
-
-conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
-guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
-dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
-
-!IF "$(MACHINE)" == "PPC"
-libc = libc.lib
-libcdll = crtdll.lib
-!ELSE
-libc = libc.lib oldnames.lib
-libcdll = msvcrt.lib oldnames.lib
-!ENDIF
-
-baselibs   = kernel32.lib $(optlibs) advapi32.lib
-winlibs    = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
-
-guilibs    = $(libc) $(winlibs)
-conlibs    = $(libc) $(baselibs)
-guilibsdll = $(libcdll) $(winlibs)
-conlibsdll = $(libcdll) $(baselibs)
-
-######################################################################
-# Compile flags
-######################################################################
-
-!IFDEF NODEBUG
-cdebug = -Ox -Oy- -Gs -GD
-!ELSE
-cdebug = -Z7 -Od -WX
-!ENDIF
-
-# declarations common to all compiler options
-ccommon = -c -W3 -nologo -YX -Dtry=__try -Dexcept=__except
-
-# NEED BYTEORDER INFORMATION HERE !!
-!IF "$(MACHINE)" == "IX86"
-cflags = $(ccommon) -D_X86_=1
-!ELSE
-!IF "$(MACHINE)" == "MIPS"
-cflags = $(ccommon) -D_MIPS_=1
-!ELSE
-!IF "$(MACHINE)" == "PPC"
-cflags = $(ccommon) -D_PPC_=1
-!ELSE
-!IF "$(MACHINE)" == "ALPHA"
-cflags = $(ccommon) -D_ALPHA_=1
-!ENDIF
-!ENDIF
-!ENDIF
-!ENDIF
-
-cvars      = -DWIN32 -D_WIN32
-cvarsmt    = $(cvars) -D_MT
-cvarsdll   = $(cvarsmt) -D_DLL
-
-######################################################################
-# Project specific targets
-######################################################################
-
-release:    $(JPEGDLL)
-all:        $(JPEGDLL)
-
-install:        $(JPEGDLL)
-	- at md    $(INSTALLDIR)
-	-@$(CP) $(JPEGDLL)              $(INSTALLDIR)
-
-
-
-$(JPEGDLL): $(JPEGOBJS)
-	$(link32) $(ldebug) $(dlllflags) \
-		$(guilibsdll) -out:$(JPEGDLL) $(JPEGOBJS)
-
-
-#
-# Implicit rules
-#
-
-{$(ROOT)}.c{$(TMPDIR)}.obj:
-    $(cc32) $(JPEG_CFLAGS) -Fo$(TMPDIR)\ $<
-
-
-clean:
-	- at del *.exp 
-	- at del *.lib 
-	- at del *.dll 
-	- at del $(TMPDIR)\*.obj
-	- at del *.pch
-	- at del *.pdb
diff --git a/tkimg1.3/libjpeg/makefile.vms b/tkimg1.3/libjpeg/makefile.vms
deleted file mode 100644
index a42358d..0000000
--- a/tkimg1.3/libjpeg/makefile.vms
+++ /dev/null
@@ -1,142 +0,0 @@
-$! Makefile for Independent JPEG Group's software
-$!
-$! This is a command procedure for Digital VMS systems that do not have MMS.
-$! It builds the JPEG software by brute force, recompiling everything whether
-$! or not it is necessary.  It then runs the basic self-test.
-$! Thanks to Rick Dyson (dyson at iowasp.physics.uiowa.edu)
-$! and Tim Bell (tbell at netcom.com) for their help.
-$!
-$! Read installation instructions before running this!!
-$!
-$ If F$Mode () .eqs. "INTERACTIVE"
-$   Then
-$       VERIFY = F$Verify (0)
-$   Else
-$       VERIFY = F$Verify (1)
-$ EndIf
-$ On Control_Y Then GoTo End
-$ On Error     Then GoTo End
-$
-$ If F$GetSyi ("HW_MODEL") .gt. 1023 
-$   Then
-$       OPT = ""
-$   Else
-$       OPT = ",Sys$Disk:[]makvms.opt/Option"
-$ EndIf
-$ 
-$ DoCompile := CC /NoDebug /Optimize /NoList
-$!
-$ DoCompile jcapimin.c
-$ DoCompile jcapistd.c
-$ DoCompile jctrans.c
-$ DoCompile jcparam.c
-$ DoCompile jdatadst.c
-$ DoCompile jcinit.c
-$ DoCompile jcmaster.c
-$ DoCompile jcmarker.c
-$ DoCompile jcmainct.c
-$ DoCompile jcprepct.c
-$ DoCompile jccoefct.c
-$ DoCompile jccolor.c
-$ DoCompile jcsample.c
-$ DoCompile jchuff.c
-$ DoCompile jcphuff.c
-$ DoCompile jcdctmgr.c
-$ DoCompile jfdctfst.c
-$ DoCompile jfdctflt.c
-$ DoCompile jfdctint.c
-$ DoCompile jdapimin.c
-$ DoCompile jdapistd.c
-$ DoCompile jdtrans.c
-$ DoCompile jdatasrc.c
-$ DoCompile jdmaster.c
-$ DoCompile jdinput.c
-$ DoCompile jdmarker.c
-$ DoCompile jdhuff.c
-$ DoCompile jdphuff.c
-$ DoCompile jdmainct.c
-$ DoCompile jdcoefct.c
-$ DoCompile jdpostct.c
-$ DoCompile jddctmgr.c
-$ DoCompile jidctfst.c
-$ DoCompile jidctflt.c
-$ DoCompile jidctint.c
-$ DoCompile jidctred.c
-$ DoCompile jdsample.c
-$ DoCompile jdcolor.c
-$ DoCompile jquant1.c
-$ DoCompile jquant2.c
-$ DoCompile jdmerge.c
-$ DoCompile jcomapi.c
-$ DoCompile jutils.c
-$ DoCompile jerror.c
-$ DoCompile jmemmgr.c
-$ DoCompile jmemnobs.c
-$!
-$ Library /Create libjpeg.olb  jcapimin.obj,jcapistd.obj,jctrans.obj, -
-          jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, -
-          jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, -
-          jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, -
-          jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, -
-          jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, -
-          jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, -
-          jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, -
-          jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, -
-          jerror.obj,jmemmgr.obj,jmemnobs.obj
-$!
-$ DoCompile cjpeg.c
-$ DoCompile rdppm.c
-$ DoCompile rdgif.c
-$ DoCompile rdtarga.c
-$ DoCompile rdrle.c
-$ DoCompile rdbmp.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = cjpeg.exe  cjpeg.obj,rdppm.obj,rdgif.obj, -
-          rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile djpeg.c
-$ DoCompile wrppm.c
-$ DoCompile wrgif.c
-$ DoCompile wrtarga.c
-$ DoCompile wrrle.c
-$ DoCompile wrbmp.c
-$ DoCompile rdcolmap.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = djpeg.exe  djpeg.obj,wrppm.obj,wrgif.obj, -
-          wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile jpegtran.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$ DoCompile transupp.c
-$!
-$ Link /NoMap /Executable = jpegtran.exe  jpegtran.obj,rdswitch.obj, -
-          cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile rdjpgcom.c
-$ Link /NoMap /Executable = rdjpgcom.exe  rdjpgcom.obj'OPT'
-$!
-$ DoCompile wrjpgcom.c
-$ Link /NoMap /Executable = wrjpgcom.exe  wrjpgcom.obj'OPT'
-$!
-$! Run the self-test
-$!
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
-$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
-$ mcr sys$disk:[]cjpeg -dct int      -outfile testout.jpg testimg.ppm
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
-$ Backup /Compare/Log testimg.ppm testout.ppm
-$ Backup /Compare/Log testimg.bmp testout.bmp
-$ Backup /Compare/Log testimg.jpg testout.jpg
-$ Backup /Compare/Log testimg.ppm testoutp.ppm
-$ Backup /Compare/Log testimgp.jpg testoutp.jpg
-$ Backup /Compare/Log testorig.jpg testoutt.jpg
-$!
-$End:
-$   If Verify Then Set Verify
-$ Exit
diff --git a/tkimg1.3/libjpeg/makefile.wat b/tkimg1.3/libjpeg/makefile.wat
deleted file mode 100644
index d953e46..0000000
--- a/tkimg1.3/libjpeg/makefile.wat
+++ /dev/null
@@ -1,233 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using
-# dos4g extender), OS/2, and Windows NT console mode.
-# Thanks to Janos Haide, jhaide at btrvtech.com.
-
-# Read installation instructions before saying "wmake" !!
-
-# Uncomment line for desired system
-SYSTEM=DOS
-#SYSTEM=OS2
-#SYSTEM=NT
-
-# The name of your C compiler:
-CC= wcl386
-
-# You may need to adjust these cc options:
-CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM)
-# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!ifeq SYSTEM DOS
-LDFLAGS= -zq -l=dos4g
-!else ifeq SYSTEM OS2
-LDFLAGS= -zq -l=os2v2
-!else ifeq SYSTEM NT
-LDFLAGS= -zq -l=nt
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  jmemnobs should work fine for dos4g or OS/2 environment.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
-        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
-        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
-        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
-        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
-        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
-        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
-        jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
-        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
-        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
-        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
-        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
-        coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
-        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
-        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
-        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
-        makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
-        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
-        jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
-        testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
-        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
-        jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
-        jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
-        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
-        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
-        jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
-        jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
-        jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
-        rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
-        rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
-	- del libjpeg.lib
-	* wlib -n libjpeg.lib $(LIBOBJECTS)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
-	$(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
-	$(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
-
-wrjpgcom.exe: wrjpgcom.c
-	$(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
-
-.c.obj:
-	$(CC) $(CFLAGS) -c $<
-
-jconfig.h: jconfig.doc
-	echo You must prepare a system-dependent jconfig.h file.
-	echo Please read the installation directions in install.doc.
-	exit 1
-
-clean: .SYMBOLIC
-	- del *.obj
-	- del libjpeg.lib
-	- del cjpeg.exe
-	- del djpeg.exe
-	- del jpegtran.exe
-	- del rdjpgcom.exe
-	- del wrjpgcom.exe
-	- del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe  .SYMBOLIC
-	- del testout*.*
-	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
-	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
-	cjpeg -dct int -outfile testout.jpg  testimg.ppm
-	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-	jpegtran -outfile testoutt.jpg testprog.jpg
-!ifeq SYSTEM DOS
-	fc /b testimg.ppm testout.ppm
-	fc /b testimg.bmp testout.bmp
-	fc /b testimg.jpg testout.jpg
-	fc /b testimg.ppm testoutp.ppm
-	fc /b testimgp.jpg testoutp.jpg
-	fc /b testorig.jpg testoutt.jpg
-!else
-	echo n > n.tmp
-	comp testimg.ppm testout.ppm < n.tmp
-	comp testimg.bmp testout.bmp < n.tmp
-	comp testimg.jpg testout.jpg < n.tmp
-	comp testimg.ppm testoutp.ppm < n.tmp
-	comp testimgp.jpg testoutp.jpg < n.tmp
-	comp testorig.jpg testoutt.jpg < n.tmp
-	del n.tmp
-!endif
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/tkimg1.3/libjpeg/makelib.ds b/tkimg1.3/libjpeg/makelib.ds
deleted file mode 100644
index c7ad36d..0000000
--- a/tkimg1.3/libjpeg/makelib.ds
+++ /dev/null
@@ -1,1046 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-!IF "$(CFG)" == ""
-CFG=jpeg - Win32
-!MESSAGE No configuration specified.  Defaulting to jpeg - Win32.
-!ENDIF 
-
-!IF "$(CFG)" != "jpeg - Win32"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line.  For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "jpeg - Win32" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE 
-NULL=nul
-!ENDIF 
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "jpeg - Win32"
-CPP=cl.exe
-
-!IF  "$(CFG)" == "jpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : "$(OUTDIR)\jpeg.lib"
-
-CLEAN : 
-	- at erase "$(INTDIR)\jcapimin.obj"
-	- at erase "$(INTDIR)\jcapistd.obj"
-	- at erase "$(INTDIR)\jctrans.obj"
-	- at erase "$(INTDIR)\jcparam.obj"
-	- at erase "$(INTDIR)\jdatadst.obj"
-	- at erase "$(INTDIR)\jcinit.obj"
-	- at erase "$(INTDIR)\jcmaster.obj"
-	- at erase "$(INTDIR)\jcmarker.obj"
-	- at erase "$(INTDIR)\jcmainct.obj"
-	- at erase "$(INTDIR)\jcprepct.obj"
-	- at erase "$(INTDIR)\jccoefct.obj"
-	- at erase "$(INTDIR)\jccolor.obj"
-	- at erase "$(INTDIR)\jcsample.obj"
-	- at erase "$(INTDIR)\jchuff.obj"
-	- at erase "$(INTDIR)\jcphuff.obj"
-	- at erase "$(INTDIR)\jcdctmgr.obj"
-	- at erase "$(INTDIR)\jfdctfst.obj"
-	- at erase "$(INTDIR)\jfdctflt.obj"
-	- at erase "$(INTDIR)\jfdctint.obj"
-	- at erase "$(INTDIR)\jdapimin.obj"
-	- at erase "$(INTDIR)\jdapistd.obj"
-	- at erase "$(INTDIR)\jdtrans.obj"
-	- at erase "$(INTDIR)\jdatasrc.obj"
-	- at erase "$(INTDIR)\jdmaster.obj"
-	- at erase "$(INTDIR)\jdinput.obj"
-	- at erase "$(INTDIR)\jdmarker.obj"
-	- at erase "$(INTDIR)\jdhuff.obj"
-	- at erase "$(INTDIR)\jdphuff.obj"
-	- at erase "$(INTDIR)\jdmainct.obj"
-	- at erase "$(INTDIR)\jdcoefct.obj"
-	- at erase "$(INTDIR)\jdpostct.obj"
-	- at erase "$(INTDIR)\jddctmgr.obj"
-	- at erase "$(INTDIR)\jidctfst.obj"
-	- at erase "$(INTDIR)\jidctflt.obj"
-	- at erase "$(INTDIR)\jidctint.obj"
-	- at erase "$(INTDIR)\jidctred.obj"
-	- at erase "$(INTDIR)\jdsample.obj"
-	- at erase "$(INTDIR)\jdcolor.obj"
-	- at erase "$(INTDIR)\jquant1.obj"
-	- at erase "$(INTDIR)\jquant2.obj"
-	- at erase "$(INTDIR)\jdmerge.obj"
-	- at erase "$(INTDIR)\jcomapi.obj"
-	- at erase "$(INTDIR)\jutils.obj"
-	- at erase "$(INTDIR)\jerror.obj"
-	- at erase "$(INTDIR)\jmemmgr.obj"
-	- at erase "$(INTDIR)\jmemnobs.obj"
-	- at erase "$(OUTDIR)\jpeg.lib"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/jpeg.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\Release/
-CPP_SBRS=.\.
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpeg.bsc" 
-BSC32_SBRS= \
-	
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-LIB32_FLAGS=/nologo /out:"$(OUTDIR)/jpeg.lib" 
-LIB32_OBJS= \
-	"$(INTDIR)\jcapimin.obj" \
-	"$(INTDIR)\jcapistd.obj" \
-	"$(INTDIR)\jctrans.obj" \
-	"$(INTDIR)\jcparam.obj" \
-	"$(INTDIR)\jdatadst.obj" \
-	"$(INTDIR)\jcinit.obj" \
-	"$(INTDIR)\jcmaster.obj" \
-	"$(INTDIR)\jcmarker.obj" \
-	"$(INTDIR)\jcmainct.obj" \
-	"$(INTDIR)\jcprepct.obj" \
-	"$(INTDIR)\jccoefct.obj" \
-	"$(INTDIR)\jccolor.obj" \
-	"$(INTDIR)\jcsample.obj" \
-	"$(INTDIR)\jchuff.obj" \
-	"$(INTDIR)\jcphuff.obj" \
-	"$(INTDIR)\jcdctmgr.obj" \
-	"$(INTDIR)\jfdctfst.obj" \
-	"$(INTDIR)\jfdctflt.obj" \
-	"$(INTDIR)\jfdctint.obj" \
-	"$(INTDIR)\jdapimin.obj" \
-	"$(INTDIR)\jdapistd.obj" \
-	"$(INTDIR)\jdtrans.obj" \
-	"$(INTDIR)\jdatasrc.obj" \
-	"$(INTDIR)\jdmaster.obj" \
-	"$(INTDIR)\jdinput.obj" \
-	"$(INTDIR)\jdmarker.obj" \
-	"$(INTDIR)\jdhuff.obj" \
-	"$(INTDIR)\jdphuff.obj" \
-	"$(INTDIR)\jdmainct.obj" \
-	"$(INTDIR)\jdcoefct.obj" \
-	"$(INTDIR)\jdpostct.obj" \
-	"$(INTDIR)\jddctmgr.obj" \
-	"$(INTDIR)\jidctfst.obj" \
-	"$(INTDIR)\jidctflt.obj" \
-	"$(INTDIR)\jidctint.obj" \
-	"$(INTDIR)\jidctred.obj" \
-	"$(INTDIR)\jdsample.obj" \
-	"$(INTDIR)\jdcolor.obj" \
-	"$(INTDIR)\jquant1.obj" \
-	"$(INTDIR)\jquant2.obj" \
-	"$(INTDIR)\jdmerge.obj" \
-	"$(INTDIR)\jcomapi.obj" \
-	"$(INTDIR)\jutils.obj" \
-	"$(INTDIR)\jerror.obj" \
-	"$(INTDIR)\jmemmgr.obj" \
-	"$(INTDIR)\jmemnobs.obj"
-
-"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ENDIF 
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-################################################################################
-# Begin Target
-
-# Name "jpeg - Win32"
-
-!IF  "$(CFG)" == "jpeg - Win32"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE="jcapimin.c"
-DEP_CPP_JCAPI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcapimin.obj" : $(SOURCE) $(DEP_CPP_JCAPI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcapistd.c"
-DEP_CPP_JCAPIS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcapistd.obj" : $(SOURCE) $(DEP_CPP_JCAPIS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jccoefct.c"
-DEP_CPP_JCCOE=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jccoefct.obj" : $(SOURCE) $(DEP_CPP_JCCOE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jccolor.c"
-DEP_CPP_JCCOL=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jccolor.obj" : $(SOURCE) $(DEP_CPP_JCCOL) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcdctmgr.c"
-DEP_CPP_JCDCT=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) $(DEP_CPP_JCDCT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jchuff.c"
-DEP_CPP_JCHUF=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jchuff.h"\
-	
-
-"$(INTDIR)\jchuff.obj" : $(SOURCE) $(DEP_CPP_JCHUF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcinit.c"
-DEP_CPP_JCINI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcinit.obj" : $(SOURCE) $(DEP_CPP_JCINI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmainct.c"
-DEP_CPP_JCMAI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcmainct.obj" : $(SOURCE) $(DEP_CPP_JCMAI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmarker.c"
-DEP_CPP_JCMAR=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcmarker.obj" : $(SOURCE) $(DEP_CPP_JCMAR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmaster.c"
-DEP_CPP_JCMAS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcmaster.obj" : $(SOURCE) $(DEP_CPP_JCMAS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcomapi.c"
-DEP_CPP_JCOMA=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcomapi.obj" : $(SOURCE) $(DEP_CPP_JCOMA) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcparam.c"
-DEP_CPP_JCPAR=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcparam.obj" : $(SOURCE) $(DEP_CPP_JCPAR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcphuff.c"
-DEP_CPP_JCPHU=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jchuff.h"\
-	
-
-"$(INTDIR)\jcphuff.obj" : $(SOURCE) $(DEP_CPP_JCPHU) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcprepct.c"
-DEP_CPP_JCPRE=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcprepct.obj" : $(SOURCE) $(DEP_CPP_JCPRE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcsample.c"
-DEP_CPP_JCSAM=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jcsample.obj" : $(SOURCE) $(DEP_CPP_JCSAM) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jctrans.c"
-DEP_CPP_JCTRA=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jctrans.obj" : $(SOURCE) $(DEP_CPP_JCTRA) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdapimin.c"
-DEP_CPP_JDAPI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdapimin.obj" : $(SOURCE) $(DEP_CPP_JDAPI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdapistd.c"
-DEP_CPP_JDAPIS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdapistd.obj" : $(SOURCE) $(DEP_CPP_JDAPIS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdatadst.c"
-DEP_CPP_JDATA=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdatadst.obj" : $(SOURCE) $(DEP_CPP_JDATA) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdatasrc.c"
-DEP_CPP_JDATAS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdatasrc.obj" : $(SOURCE) $(DEP_CPP_JDATAS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdcoefct.c"
-DEP_CPP_JDCOE=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdcoefct.obj" : $(SOURCE) $(DEP_CPP_JDCOE) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdcolor.c"
-DEP_CPP_JDCOL=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdcolor.obj" : $(SOURCE) $(DEP_CPP_JDCOL) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jddctmgr.c"
-DEP_CPP_JDDCT=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jddctmgr.obj" : $(SOURCE) $(DEP_CPP_JDDCT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdhuff.c"
-DEP_CPP_JDHUF=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdhuff.h"\
-	
-
-"$(INTDIR)\jdhuff.obj" : $(SOURCE) $(DEP_CPP_JDHUF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdinput.c"
-DEP_CPP_JDINP=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdinput.obj" : $(SOURCE) $(DEP_CPP_JDINP) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmainct.c"
-DEP_CPP_JDMAI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdmainct.obj" : $(SOURCE) $(DEP_CPP_JDMAI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmarker.c"
-DEP_CPP_JDMAR=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdmarker.obj" : $(SOURCE) $(DEP_CPP_JDMAR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmaster.c"
-DEP_CPP_JDMAS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdmaster.obj" : $(SOURCE) $(DEP_CPP_JDMAS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmerge.c"
-DEP_CPP_JDMER=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdmerge.obj" : $(SOURCE) $(DEP_CPP_JDMER) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdphuff.c"
-DEP_CPP_JDPHU=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdhuff.h"\
-	
-
-"$(INTDIR)\jdphuff.obj" : $(SOURCE) $(DEP_CPP_JDPHU) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdpostct.c"
-DEP_CPP_JDPOS=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdpostct.obj" : $(SOURCE) $(DEP_CPP_JDPOS) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdsample.c"
-DEP_CPP_JDSAM=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdsample.obj" : $(SOURCE) $(DEP_CPP_JDSAM) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdtrans.c"
-DEP_CPP_JDTRA=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jdtrans.obj" : $(SOURCE) $(DEP_CPP_JDTRA) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jerror.c"
-DEP_CPP_JERRO=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jversion.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jerror.obj" : $(SOURCE) $(DEP_CPP_JERRO) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctflt.c"
-DEP_CPP_JFDCT=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jfdctflt.obj" : $(SOURCE) $(DEP_CPP_JFDCT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctfst.c"
-DEP_CPP_JFDCTF=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jfdctfst.obj" : $(SOURCE) $(DEP_CPP_JFDCTF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctint.c"
-DEP_CPP_JFDCTI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jfdctint.obj" : $(SOURCE) $(DEP_CPP_JFDCTI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctflt.c"
-DEP_CPP_JIDCT=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jidctflt.obj" : $(SOURCE) $(DEP_CPP_JIDCT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctfst.c"
-DEP_CPP_JIDCTF=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jidctfst.obj" : $(SOURCE) $(DEP_CPP_JIDCTF) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctint.c"
-DEP_CPP_JIDCTI=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jidctint.obj" : $(SOURCE) $(DEP_CPP_JIDCTI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctred.c"
-DEP_CPP_JIDCTR=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jdct.h"\
-	
-
-"$(INTDIR)\jidctred.obj" : $(SOURCE) $(DEP_CPP_JIDCTR) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jquant1.c"
-DEP_CPP_JQUAN=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jquant1.obj" : $(SOURCE) $(DEP_CPP_JQUAN) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jquant2.c"
-DEP_CPP_JQUANT=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jquant2.obj" : $(SOURCE) $(DEP_CPP_JQUANT) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jutils.c"
-DEP_CPP_JUTIL=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	
-
-"$(INTDIR)\jutils.obj" : $(SOURCE) $(DEP_CPP_JUTIL) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jmemmgr.c"
-DEP_CPP_JMEMM=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jmemsys.h"\
-	
-
-"$(INTDIR)\jmemmgr.obj" : $(SOURCE) $(DEP_CPP_JMEMM) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jmemnobs.c"
-DEP_CPP_JMEMN=\
-	"jinclude.h"\
-	"jconfig.h"\
-	"jpeglib.h"\
-	"jmorecfg.h"\
-	"jpegint.h"\
-	"jerror.h"\
-	"jmemsys.h"\
-	
-
-"$(INTDIR)\jmemnobs.obj" : $(SOURCE) $(DEP_CPP_JMEMN) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
-
diff --git a/tkimg1.3/libjpeg/makeproj.mac b/tkimg1.3/libjpeg/makeproj.mac
deleted file mode 100644
index ed277c8..0000000
--- a/tkimg1.3/libjpeg/makeproj.mac
+++ /dev/null
@@ -1,213 +0,0 @@
---
--- makeproj.mac
---
--- This AppleScript builds Code Warrior PRO Release 2 project files for the
--- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'.
--- (We'd distribute real project files, except they're not text
--- and would create maintenance headaches.)
---
--- The script then compiles and links the library and the test programs.
--- NOTE: if you haven't already created a 'jconfig.h' file, the script
--- automatically copies 'jconfig.mac' to 'jconfig.h'.
---
--- To use this script, you must have AppleScript 1.1 or later installed
--- and a suitable AppleScript editor like Script Editor or Script Debugger
--- (http://www.latenightsw.com). Open this file with your AppleScript
--- editor and execute the "run" command to build the projects.
---
--- Thanks to Dan Sears and Don Agro for this script.
--- Questions about this script can be addressed to dogpark at interlog.com
---
-
-on run
-
-	choose folder with prompt ">>> Select IJG source folder <<<"
-	set ijg_folder to result
-
-	choose folder with prompt ">>> Select MetroWerks folder <<<"
-	set cw_folder to result
-
-	-- if jconfig.h doesn't already exist, copy jconfig.mac
-
-	tell application "Finder"
-		if not (exists file "jconfig.h" of ijg_folder) then
-			duplicate {file "jconfig.mac" of folder ijg_folder}
-			select file "jconfig.mac copy" of folder ijg_folder
-			set name of selection to "jconfig.h"
-		end if
-	end tell
-
-	tell application "CodeWarrior IDE 2.1"
-	  with timeout of 10000 seconds
-
-		-- create libjpeg project
-
-		activate
-		Create Project (ijg_folder as string) & "libjpeg.proj"
-		Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"}
-		Set Preferences of panel "PPC Project" to {File Name:"libjpeg"}
-		Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
-		Set Preferences of panel "PPC Project" to {Project Type:library}
-		Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
-		Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
-		Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
-		Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
-		Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1
-		Add Files (ijg_folder as string) & "jctrans.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcparam.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcinit.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jccolor.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcsample.c" To Segment 1
-		Add Files (ijg_folder as string) & "jchuff.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcphuff.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1
-		Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1
-		Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1
-		Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdinput.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdphuff.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1
-		Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1
-		Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1
-		Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1
-		Add Files (ijg_folder as string) & "jidctint.c" To Segment 1
-		Add Files (ijg_folder as string) & "jidctred.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdsample.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1
-		Add Files (ijg_folder as string) & "jquant1.c" To Segment 1
-		Add Files (ijg_folder as string) & "jquant2.c" To Segment 1
-		Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1
-		Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1
-		Add Files (ijg_folder as string) & "jutils.c" To Segment 1
-		Add Files (ijg_folder as string) & "jerror.c" To Segment 1
-		Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1
-		Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1
-
-		-- compile and link the library
-
-		Make Project
-		Close Project
-
-		-- create cjpeg project
-
-		activate
-		Create Project (ijg_folder as string) & "cjpeg.proj"
-		Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"}
-		Set Preferences of panel "PPC Project" to {File Name:"cjpeg"}
-		Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
-		Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
-		Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
-		Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
-		Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
-		Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdppm.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdgif.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdrle.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
-		Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
-		Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
-		-- compile and link cjpeg
-
-		Make Project
-		Close Project
-
-		-- create djpeg project
-
-		activate
-		Create Project (ijg_folder as string) & "djpeg.proj"
-		Set Preferences of panel "Target Settings" to {Target Name:"djpeg"}
-		Set Preferences of panel "PPC Project" to {File Name:"djpeg"}
-		Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
-		Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
-		Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
-		Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
-		Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
-		Add Files (ijg_folder as string) & "djpeg.c" To Segment 1
-		Add Files (ijg_folder as string) & "wrppm.c" To Segment 1
-		Add Files (ijg_folder as string) & "wrgif.c" To Segment 1
-		Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1
-		Add Files (ijg_folder as string) & "wrrle.c" To Segment 1
-		Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1
-		Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
-		Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
-		-- compile and link djpeg
-
-		Make Project
-		Close Project
-
-		-- create jpegtran project
-
-		activate
-		Create Project (ijg_folder as string) & "jpegtran.proj"
-		Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"}
-		Set Preferences of panel "PPC Project" to {File Name:"jpegtran"}
-		Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
-		Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
-		Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
-		Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
-		Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
-		Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1
-		Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
-		Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-		Add Files (ijg_folder as string) & "transupp.c" To Segment 1
-
-		Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
-		Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
-		-- compile and link jpegtran
-
-		Make Project
-		Close Project
-
-		quit
-
-	  end timeout
-	end tell
-end run
diff --git a/tkimg1.3/libjpeg/makljpeg.st b/tkimg1.3/libjpeg/makljpeg.st
deleted file mode 100644
index 813493e..0000000
--- a/tkimg1.3/libjpeg/makljpeg.st
+++ /dev/null
@@ -1,70 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle at arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd at gina.uni-muenster.de),
-; and Guido Vollbeding (guivol at esc.de).
-;
-; To use this file, rename it to libjpeg.prj.
-; Read installation instructions before trying to make the program!
-;
-;
-;      * * * Output file * * *
-libjpeg.lib
-;
-; * * * COMPILER OPTIONS * * *  
-.C[-P]        ; absolute calls
-.C[-M]        ; and no string merging, folks
-.C[-w-cln]    ; no "constant is long" warnings
-.C[-w-par]    ; no "parameter xxxx unused"
-.C[-w-rch]    ; no "unreachable code"
-.C[-wsig]     ; warn if significant digits may be lost
-.L[-J]        ; link new Obj-format (so we get a library)
-=
-; * * * * List of modules * * * * 
-jcapimin.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcapistd.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccoefct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccolor.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcdctmgr.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jchuff.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h)
-jcinit.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmainct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmarker.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmaster.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcomapi.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcparam.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcphuff.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h)
-jcprepct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcsample.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jctrans.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapimin.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapistd.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdatadst.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdatasrc.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdcoefct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdcolor.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jddctmgr.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jdhuff.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h)
-jdinput.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmainct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmarker.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmaster.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmerge.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdphuff.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h)
-jdpostct.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdsample.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdtrans.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jerror.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h)
-jfdctflt.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctfst.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctint.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctflt.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctfst.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctint.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctred.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jquant1.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jquant2.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jutils.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jmemmgr.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
-jmemansi.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
diff --git a/tkimg1.3/libjpeg/maktjpeg.st b/tkimg1.3/libjpeg/maktjpeg.st
deleted file mode 100644
index 31f4d16..0000000
--- a/tkimg1.3/libjpeg/maktjpeg.st
+++ /dev/null
@@ -1,32 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle at arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd at gina.uni-muenster.de),
-; and Guido Vollbeding (guivol at esc.de).
-;
-; To use this file, rename it to jpegtran.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-;      * * * Output file * * *
-jpegtran.ttp
-;
-; * * * COMPILER OPTIONS * * *  
-.C[-P]        ; absolute calls
-.C[-M]        ; and no string merging, folks
-.C[-w-cln]    ; no "constant is long" warnings
-.C[-w-par]    ; no "parameter xxxx unused"
-.C[-w-rch]    ; no "unreachable code"
-.C[-wsig]     ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * * 
-pcstart.o
-jpegtran.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h)
-cdjpeg.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c	(cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-transupp.c	(jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h)
-libjpeg.lib        ; built by libjpeg.prj
-pcstdlib.lib       ; standard library
-pcextlib.lib       ; extended library
diff --git a/tkimg1.3/libjpeg/makvms.opt b/tkimg1.3/libjpeg/makvms.opt
deleted file mode 100644
index 675e8fe..0000000
--- a/tkimg1.3/libjpeg/makvms.opt
+++ /dev/null
@@ -1,4 +0,0 @@
-! A pointer to the VAX/VMS C Run-Time Shareable Library.
-! This file is needed by makefile.mms and makefile.vms,
-! but only for the older VAX C compiler.  DEC C does not need it.
-Sys$Library:VAXCRTL.EXE /Share
diff --git a/tkimg1.3/libjpeg/rdbmp.c b/tkimg1.3/libjpeg/rdbmp.c
deleted file mode 100644
index b05fe2a..0000000
--- a/tkimg1.3/libjpeg/rdbmp.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * rdbmp.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in Microsoft "BMP"
- * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors).
- * Currently, only 8-bit and 24-bit images are supported, not 1-bit or
- * 4-bit (feeding such low-depth images into JPEG would be silly anyway).
- * Also, we don't support RLE-compressed files.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume input from
- * an ordinary stdio stream.  They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed BMP format).
- *
- * This code contributed by James Arthur Boucher.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef BMP_SUPPORTED
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x)	((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x)	((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x)	((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/* Private version of data source object */
-
-typedef struct _bmp_source_struct * bmp_source_ptr;
-
-typedef struct _bmp_source_struct {
-  struct cjpeg_source_struct pub; /* public fields */
-
-  j_compress_ptr cinfo;		/* back link saves passing separate parm */
-
-  JSAMPARRAY colormap;		/* BMP colormap (converted to my format) */
-
-  jvirt_sarray_ptr whole_image;	/* Needed to reverse row order */
-  JDIMENSION source_row;	/* Current source row number */
-  JDIMENSION row_width;		/* Physical width of scanlines in file */
-
-  int bits_per_pixel;		/* remembers 8- or 24-bit format */
-} bmp_source_struct;
-
-
-LOCAL(int)
-read_byte (bmp_source_ptr sinfo)
-/* Read next byte from BMP file */
-{
-  register FILE *infile = sinfo->pub.input_file;
-  register int c;
-
-  if ((c = getc(infile)) == EOF)
-    ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
-  return c;
-}
-
-
-LOCAL(void)
-read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize)
-/* Read the colormap from a BMP file */
-{
-  int i;
-
-  switch (mapentrysize) {
-  case 3:
-    /* BGR format (occurs in OS/2 files) */
-    for (i = 0; i < cmaplen; i++) {
-      sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
-      sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
-      sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
-    }
-    break;
-  case 4:
-    /* BGR0 format (occurs in MS Windows files) */
-    for (i = 0; i < cmaplen; i++) {
-      sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
-      sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
-      sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
-      (void) read_byte(sinfo);
-    }
-    break;
-  default:
-    ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP);
-    break;
-  }
-}
-
-
-/*
- * Read one row of pixels.
- * The image has been read into the whole_image array, but is otherwise
- * unprocessed.  We must read it out in top-to-bottom row order, and if
- * it is an 8-bit image, we must expand colormapped pixels to 24bit format.
- */
-
-METHODDEF(JDIMENSION)
-get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit colormap indexes */
-{
-  bmp_source_ptr source = (bmp_source_ptr) sinfo;
-  register JSAMPARRAY colormap = source->colormap;
-  JSAMPARRAY image_ptr;
-  register int t;
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION col;
-
-  /* Fetch next row from virtual array */
-  source->source_row--;
-  image_ptr = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, source->whole_image,
-     source->source_row, (JDIMENSION) 1, FALSE);
-
-  /* Expand the colormap indexes to real data */
-  inptr = image_ptr[0];
-  outptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    t = GETJSAMPLE(*inptr++);
-    *outptr++ = colormap[0][t];	/* can omit GETJSAMPLE() safely */
-    *outptr++ = colormap[1][t];
-    *outptr++ = colormap[2][t];
-  }
-
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 24-bit pixels */
-{
-  bmp_source_ptr source = (bmp_source_ptr) sinfo;
-  JSAMPARRAY image_ptr;
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION col;
-
-  /* Fetch next row from virtual array */
-  source->source_row--;
-  image_ptr = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, source->whole_image,
-     source->source_row, (JDIMENSION) 1, FALSE);
-
-  /* Transfer data.  Note source values are in BGR order
-   * (even though Microsoft's own documents say the opposite).
-   */
-  inptr = image_ptr[0];
-  outptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    outptr[2] = *inptr++;	/* can omit GETJSAMPLE() safely */
-    outptr[1] = *inptr++;
-    outptr[0] = *inptr++;
-    outptr += 3;
-  }
-
-  return 1;
-}
-
-
-/*
- * This method loads the image into whole_image during the first call on
- * get_pixel_rows.  The get_pixel_rows pointer is then adjusted to call
- * get_8bit_row or get_24bit_row on subsequent calls.
- */
-
-METHODDEF(JDIMENSION)
-preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  bmp_source_ptr source = (bmp_source_ptr) sinfo;
-  register FILE *infile = source->pub.input_file;
-  register int c;
-  register JSAMPROW out_ptr;
-  JSAMPARRAY image_ptr;
-  JDIMENSION row, col;
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
-  /* Read the data into a virtual array in input-file row order. */
-  for (row = 0; row < cinfo->image_height; row++) {
-    if (progress != NULL) {
-      progress->pub.pass_counter = (long) row;
-      progress->pub.pass_limit = (long) cinfo->image_height;
-      (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-    }
-    image_ptr = (*cinfo->mem->access_virt_sarray)
-      ((j_common_ptr) cinfo, source->whole_image,
-       row, (JDIMENSION) 1, TRUE);
-    out_ptr = image_ptr[0];
-    for (col = source->row_width; col > 0; col--) {
-      /* inline copy of read_byte() for speed */
-      if ((c = getc(infile)) == EOF)
-	ERREXIT(cinfo, JERR_INPUT_EOF);
-      *out_ptr++ = (JSAMPLE) c;
-    }
-  }
-  if (progress != NULL)
-    progress->completed_extra_passes++;
-
-  /* Set up to read from the virtual array in top-to-bottom order */
-  switch (source->bits_per_pixel) {
-  case 8:
-    source->pub.get_pixel_rows = get_8bit_row;
-    break;
-  case 24:
-    source->pub.get_pixel_rows = get_24bit_row;
-    break;
-  default:
-    ERREXIT(cinfo, JERR_BMP_BADDEPTH);
-  }
-  source->source_row = cinfo->image_height;
-
-  /* And read the first row */
-  return (*source->pub.get_pixel_rows) (cinfo, sinfo);
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  bmp_source_ptr source = (bmp_source_ptr) sinfo;
-  U_CHAR bmpfileheader[14];
-  U_CHAR bmpinfoheader[64];
-#define GET_2B(array,offset)  ((unsigned int) UCH(array[offset]) + \
-			       (((unsigned int) UCH(array[offset+1])) << 8))
-#define GET_4B(array,offset)  ((INT32) UCH(array[offset]) + \
-			       (((INT32) UCH(array[offset+1])) << 8) + \
-			       (((INT32) UCH(array[offset+2])) << 16) + \
-			       (((INT32) UCH(array[offset+3])) << 24))
-  INT32 bfOffBits;
-  INT32 headerSize;
-  INT32 biWidth = 0;		/* initialize to avoid compiler warning */
-  INT32 biHeight = 0;
-  unsigned int biPlanes;
-  INT32 biCompression;
-  INT32 biXPelsPerMeter,biYPelsPerMeter;
-  INT32 biClrUsed = 0;
-  int mapentrysize = 0;		/* 0 indicates no colormap */
-  INT32 bPad;
-  JDIMENSION row_width;
-
-  /* Read and verify the bitmap file header */
-  if (! ReadOK(source->pub.input_file, bmpfileheader, 14))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */
-    ERREXIT(cinfo, JERR_BMP_NOT);
-  bfOffBits = (INT32) GET_4B(bmpfileheader,10);
-  /* We ignore the remaining fileheader fields */
-
-  /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows),
-   * or 64 bytes (OS/2 2.x).  Check the first 4 bytes to find out which.
-   */
-  if (! ReadOK(source->pub.input_file, bmpinfoheader, 4))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  headerSize = (INT32) GET_4B(bmpinfoheader,0);
-  if (headerSize < 12 || headerSize > 64)
-    ERREXIT(cinfo, JERR_BMP_BADHEADER);
-  if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-
-  switch ((int) headerSize) {
-  case 12:
-    /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */
-    biWidth = (INT32) GET_2B(bmpinfoheader,4);
-    biHeight = (INT32) GET_2B(bmpinfoheader,6);
-    biPlanes = GET_2B(bmpinfoheader,8);
-    source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10);
-
-    switch (source->bits_per_pixel) {
-    case 8:			/* colormapped image */
-      mapentrysize = 3;		/* OS/2 uses RGBTRIPLE colormap */
-      TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight);
-      break;
-    case 24:			/* RGB image */
-      TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight);
-      break;
-    default:
-      ERREXIT(cinfo, JERR_BMP_BADDEPTH);
-      break;
-    }
-    if (biPlanes != 1)
-      ERREXIT(cinfo, JERR_BMP_BADPLANES);
-    break;
-  case 40:
-  case 64:
-    /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */
-    /* or OS/2 2.x header, which has additional fields that we ignore */
-    biWidth = GET_4B(bmpinfoheader,4);
-    biHeight = GET_4B(bmpinfoheader,8);
-    biPlanes = GET_2B(bmpinfoheader,12);
-    source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14);
-    biCompression = GET_4B(bmpinfoheader,16);
-    biXPelsPerMeter = GET_4B(bmpinfoheader,24);
-    biYPelsPerMeter = GET_4B(bmpinfoheader,28);
-    biClrUsed = GET_4B(bmpinfoheader,32);
-    /* biSizeImage, biClrImportant fields are ignored */
-
-    switch (source->bits_per_pixel) {
-    case 8:			/* colormapped image */
-      mapentrysize = 4;		/* Windows uses RGBQUAD colormap */
-      TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight);
-      break;
-    case 24:			/* RGB image */
-      TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight);
-      break;
-    default:
-      ERREXIT(cinfo, JERR_BMP_BADDEPTH);
-      break;
-    }
-    if (biPlanes != 1)
-      ERREXIT(cinfo, JERR_BMP_BADPLANES);
-    if (biCompression != 0)
-      ERREXIT(cinfo, JERR_BMP_COMPRESSED);
-
-    if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) {
-      /* Set JFIF density parameters from the BMP data */
-      cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */
-      cinfo->Y_density = (UINT16) (biYPelsPerMeter/100);
-      cinfo->density_unit = 2;	/* dots/cm */
-    }
-    break;
-  default:
-    ERREXIT(cinfo, JERR_BMP_BADHEADER);
-    break;
-  }
-
-  /* Compute distance to bitmap data --- will adjust for colormap below */
-  bPad = bfOffBits - (headerSize + 14);
-
-  /* Read the colormap, if any */
-  if (mapentrysize > 0) {
-    if (biClrUsed <= 0)
-      biClrUsed = 256;		/* assume it's 256 */
-    else if (biClrUsed > 256)
-      ERREXIT(cinfo, JERR_BMP_BADCMAP);
-    /* Allocate space to store the colormap */
-    source->colormap = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (JDIMENSION) biClrUsed, (JDIMENSION) 3);
-    /* and read it from the file */
-    read_colormap(source, (int) biClrUsed, mapentrysize);
-    /* account for size of colormap */
-    bPad -= biClrUsed * mapentrysize;
-  }
-
-  /* Skip any remaining pad bytes */
-  if (bPad < 0)			/* incorrect bfOffBits value? */
-    ERREXIT(cinfo, JERR_BMP_BADHEADER);
-  while (--bPad >= 0) {
-    (void) read_byte(source);
-  }
-
-  /* Compute row width in file, including padding to 4-byte boundary */
-  if (source->bits_per_pixel == 24)
-    row_width = (JDIMENSION) (biWidth * 3);
-  else
-    row_width = (JDIMENSION) biWidth;
-  while ((row_width & 3) != 0) row_width++;
-  source->row_width = row_width;
-
-  /* Allocate space for inversion array, prepare for preload pass */
-  source->whole_image = (*cinfo->mem->request_virt_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-     row_width, (JDIMENSION) biHeight, (JDIMENSION) 1);
-  source->pub.get_pixel_rows = preload_image;
-  if (cinfo->progress != NULL) {
-    cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-    progress->total_extra_passes++; /* count file input as separate pass */
-  }
-
-  /* Allocate one-row buffer for returned data */
-  source->pub.buffer = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE,
-     (JDIMENSION) (biWidth * 3), (JDIMENSION) 1);
-  source->pub.buffer_height = 1;
-
-  cinfo->in_color_space = JCS_RGB;
-  cinfo->input_components = 3;
-  cinfo->data_precision = 8;
-  cinfo->image_width = (JDIMENSION) biWidth;
-  cinfo->image_height = (JDIMENSION) biHeight;
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  /* no work */
-}
-
-
-/*
- * The module selection routine for BMP format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_bmp (j_compress_ptr cinfo)
-{
-  bmp_source_ptr source;
-
-  /* Create module interface object */
-  source = (bmp_source_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(bmp_source_struct));
-  source->cinfo = cinfo;	/* make back link for subroutines */
-  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
-  source->pub.start_input = start_input_bmp;
-  source->pub.finish_input = finish_input_bmp;
-
-  return (cjpeg_source_ptr) source;
-}
-
-#endif /* BMP_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/rdcolmap.c b/tkimg1.3/libjpeg/rdcolmap.c
deleted file mode 100644
index 42b3437..0000000
--- a/tkimg1.3/libjpeg/rdcolmap.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * rdcolmap.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file implements djpeg's "-map file" switch.  It reads a source image
- * and constructs a colormap to be supplied to the JPEG decompressor.
- *
- * Currently, these file formats are supported for the map file:
- *   GIF: the contents of the GIF's global colormap are used.
- *   PPM (either text or raw flavor): the entire file is read and
- *      each unique pixel value is entered in the map.
- * Note that reading a large PPM file will be horrendously slow.
- * Typically, a PPM-format map file should contain just one pixel
- * of each desired color.  Such a file can be extracted from an
- * ordinary image PPM file with ppmtomap(1).
- *
- * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not
- * currently implemented.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef QUANT_2PASS_SUPPORTED	/* otherwise can't quantize to supplied map */
-
-/* Portions of this code are based on the PBMPLUS library, which is:
-**
-** Copyright (C) 1988 by Jef Poskanzer.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation for any purpose and without fee is hereby granted, provided
-** that the above copyright notice appear in all copies and that both that
-** copyright notice and this permission notice appear in supporting
-** documentation.  This software is provided "as is" without express or
-** implied warranty.
-*/
-
-
-/*
- * Add a (potentially) new color to the color map.
- */
-
-LOCAL(void)
-add_map_entry (j_decompress_ptr cinfo, int R, int G, int B)
-{
-  JSAMPROW colormap0 = cinfo->colormap[0];
-  JSAMPROW colormap1 = cinfo->colormap[1];
-  JSAMPROW colormap2 = cinfo->colormap[2];
-  int ncolors = cinfo->actual_number_of_colors;
-  int index;
-
-  /* Check for duplicate color. */
-  for (index = 0; index < ncolors; index++) {
-    if (GETJSAMPLE(colormap0[index]) == R &&
-	GETJSAMPLE(colormap1[index]) == G &&
-	GETJSAMPLE(colormap2[index]) == B)
-      return;			/* color is already in map */
-  }
-
-  /* Check for map overflow. */
-  if (ncolors >= (MAXJSAMPLE+1))
-    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1));
-
-  /* OK, add color to map. */
-  colormap0[ncolors] = (JSAMPLE) R;
-  colormap1[ncolors] = (JSAMPLE) G;
-  colormap2[ncolors] = (JSAMPLE) B;
-  cinfo->actual_number_of_colors++;
-}
-
-
-/*
- * Extract color map from a GIF file.
- */
-
-LOCAL(void)
-read_gif_map (j_decompress_ptr cinfo, FILE * infile)
-{
-  int header[13];
-  int i, colormaplen;
-  int R, G, B;
-
-  /* Initial 'G' has already been read by read_color_map */
-  /* Read the rest of the GIF header and logical screen descriptor */
-  for (i = 1; i < 13; i++) {
-    if ((header[i] = getc(infile)) == EOF)
-      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-  }
-
-  /* Verify GIF Header */
-  if (header[1] != 'I' || header[2] != 'F')
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
-  /* There must be a global color map. */
-  if ((header[10] & 0x80) == 0)
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
-  /* OK, fetch it. */
-  colormaplen = 2 << (header[10] & 0x07);
-
-  for (i = 0; i < colormaplen; i++) {
-    R = getc(infile);
-    G = getc(infile);
-    B = getc(infile);
-    if (R == EOF || G == EOF || B == EOF)
-      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-    add_map_entry(cinfo,
-		  R << (BITS_IN_JSAMPLE-8),
-		  G << (BITS_IN_JSAMPLE-8),
-		  B << (BITS_IN_JSAMPLE-8));
-  }
-}
-
-
-/* Support routines for reading PPM */
-
-
-LOCAL(int)
-pbm_getc (FILE * infile)
-/* Read next char, skipping over any comments */
-/* A comment/newline sequence is returned as a newline */
-{
-  register int ch;
-  
-  ch = getc(infile);
-  if (ch == '#') {
-    do {
-      ch = getc(infile);
-    } while (ch != '\n' && ch != EOF);
-  }
-  return ch;
-}
-
-
-LOCAL(unsigned int)
-read_pbm_integer (j_decompress_ptr cinfo, FILE * infile)
-/* Read an unsigned decimal integer from the PPM file */
-/* Swallows one trailing character after the integer */
-/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
-/* This should not be a problem in practice. */
-{
-  register int ch;
-  register unsigned int val;
-  
-  /* Skip any leading whitespace */
-  do {
-    ch = pbm_getc(infile);
-    if (ch == EOF)
-      ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-  } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
-  
-  if (ch < '0' || ch > '9')
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-  
-  val = ch - '0';
-  while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
-    val *= 10;
-    val += ch - '0';
-  }
-  return val;
-}
-
-
-/*
- * Extract color map from a PPM file.
- */
-
-LOCAL(void)
-read_ppm_map (j_decompress_ptr cinfo, FILE * infile)
-{
-  int c;
-  unsigned int w, h, maxval, row, col;
-  int R, G, B;
-
-  /* Initial 'P' has already been read by read_color_map */
-  c = getc(infile);		/* save format discriminator for a sec */
-
-  /* while we fetch the remaining header info */
-  w = read_pbm_integer(cinfo, infile);
-  h = read_pbm_integer(cinfo, infile);
-  maxval = read_pbm_integer(cinfo, infile);
-
-  if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
-  /* For now, we don't support rescaling from an unusual maxval. */
-  if (maxval != (unsigned int) MAXJSAMPLE)
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
-  switch (c) {
-  case '3':			/* it's a text-format PPM file */
-    for (row = 0; row < h; row++) {
-      for (col = 0; col < w; col++) {
-	R = read_pbm_integer(cinfo, infile);
-	G = read_pbm_integer(cinfo, infile);
-	B = read_pbm_integer(cinfo, infile);
-	add_map_entry(cinfo, R, G, B);
-      }
-    }
-    break;
-
-  case '6':			/* it's a raw-format PPM file */
-    for (row = 0; row < h; row++) {
-      for (col = 0; col < w; col++) {
-	R = getc(infile);
-	G = getc(infile);
-	B = getc(infile);
-	if (R == EOF || G == EOF || B == EOF)
-	  ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-	add_map_entry(cinfo, R, G, B);
-      }
-    }
-    break;
-
-  default:
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-    break;
-  }
-}
-
-
-/*
- * Main entry point from djpeg.c.
- *  Input: opened input file (from file name argument on command line).
- *  Output: colormap and actual_number_of_colors fields are set in cinfo.
- */
-
-GLOBAL(void)
-read_color_map (j_decompress_ptr cinfo, FILE * infile)
-{
-  /* Allocate space for a color map of maximum supported size. */
-  cinfo->colormap = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE,
-     (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3);
-  cinfo->actual_number_of_colors = 0; /* initialize map to empty */
-
-  /* Read first byte to determine file format */
-  switch (getc(infile)) {
-  case 'G':
-    read_gif_map(cinfo, infile);
-    break;
-  case 'P':
-    read_ppm_map(cinfo, infile);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-    break;
-  }
-}
-
-#endif /* QUANT_2PASS_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/rdgif.c b/tkimg1.3/libjpeg/rdgif.c
deleted file mode 100644
index b27c167..0000000
--- a/tkimg1.3/libjpeg/rdgif.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * rdgif.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in GIF format.
- *
- *****************************************************************************
- * NOTE: to avoid entanglements with Unisys' patent on LZW compression,      *
- * the ability to read GIF files has been removed from the IJG distribution. *
- * Sorry about that.                                                         *
- *****************************************************************************
- *
- * We are required to state that
- *    "The Graphics Interchange Format(c) is the Copyright property of
- *    CompuServe Incorporated. GIF(sm) is a Service Mark property of
- *    CompuServe Incorporated."
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-/*
- * The module selection routine for GIF format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_gif (j_compress_ptr cinfo)
-{
-  fprintf(stderr, "GIF input is unsupported for legal reasons.  Sorry.\n");
-  exit(EXIT_FAILURE);
-  return NULL;			/* keep compiler happy */
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/rdjpgcom.1 b/tkimg1.3/libjpeg/rdjpgcom.1
deleted file mode 100644
index 2bba04e..0000000
--- a/tkimg1.3/libjpeg/rdjpgcom.1
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH RDJPGCOM 1 "11 October 1997"
-.SH NAME
-rdjpgcom \- display text comments from a JPEG file
-.SH SYNOPSIS
-.B rdjpgcom
-[
-.B \-verbose
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B rdjpgcom
-reads the named JPEG/JFIF file, or the standard input if no file is named,
-and prints any text comments found in the file on the standard output.
-.PP
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings.  This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text.  COM blocks do not interfere with the image stored in the JPEG
-file.  The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-.SH OPTIONS
-.TP
-.B \-verbose
-Causes
-.B rdjpgcom
-to also display the JPEG image dimensions.
-.PP
-Switch names may be abbreviated, and are not case sensitive.
-.SH HINTS
-.B rdjpgcom
-does not depend on the IJG JPEG library.  Its source code is intended as an
-illustration of the minimum amount of code required to parse a JPEG file
-header correctly.
-.PP
-In
-.B \-verbose
-mode,
-.B rdjpgcom
-will also attempt to print the contents of any "APP12" markers as text.
-Some digital cameras produce APP12 markers containing useful textual
-information.  If you like, you can modify the source code to print
-other APPn marker types as well.
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR wrjpgcom (1)
-.SH AUTHOR
-Independent JPEG Group
diff --git a/tkimg1.3/libjpeg/rdjpgcom.c b/tkimg1.3/libjpeg/rdjpgcom.c
deleted file mode 100644
index ffe6fc6..0000000
--- a/tkimg1.3/libjpeg/rdjpgcom.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * rdjpgcom.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a very simple stand-alone application that displays
- * the text in COM (comment) markers in a JFIF file.
- * This may be useful as an example of the minimum logic needed to parse
- * JPEG markers.
- */
-
-#define JPEG_CJPEG_DJPEG	/* to get the command-line config symbols */
-#include "jinclude.h"		/* get auto-config symbols, <stdio.h> */
-
-#include <ctype.h>		/* to declare isupper(), tolower() */
-#ifdef USE_SETMODE
-#include <fcntl.h>		/* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h>			/* to declare setmode() */
-#endif
-
-#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h>              /* Metrowerks needs this */
-#include <console.h>		/* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h>		/* Think declares it here */
-#endif
-#endif
-
-#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
-#define READ_BINARY	"r"
-#else
-#ifdef VMS			/* VMS is very nonstandard */
-#define READ_BINARY	"rb", "ctx=stm"
-#else				/* standard ANSI-compliant case */
-#define READ_BINARY	"rb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
-#define EXIT_FAILURE  1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS  1		/* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS  0
-#endif
-#endif
-
-
-/*
- * These macros are used to read the input file.
- * To reuse this code in another application, you might need to change these.
- */
-
-static FILE * infile;		/* input JPEG file */
-
-/* Return next input byte, or EOF if no more */
-#define NEXTBYTE()  getc(infile)
-
-
-/* Error exit handler */
-#define ERREXIT(msg)  (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE))
-
-
-/* Read one byte, testing for EOF */
-static int
-read_1_byte (void)
-{
-  int c;
-
-  c = NEXTBYTE();
-  if (c == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  return c;
-}
-
-/* Read 2 bytes, convert to unsigned int */
-/* All 2-byte quantities in JPEG markers are MSB first */
-static unsigned int
-read_2_bytes (void)
-{
-  int c1, c2;
-
-  c1 = NEXTBYTE();
-  if (c1 == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  c2 = NEXTBYTE();
-  if (c2 == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  return (((unsigned int) c1) << 8) + ((unsigned int) c2);
-}
-
-
-/*
- * JPEG markers consist of one or more 0xFF bytes, followed by a marker
- * code byte (which is not an FF).  Here are the marker codes of interest
- * in this program.  (See jdmarker.c for a more complete list.)
- */
-
-#define M_SOF0  0xC0		/* Start Of Frame N */
-#define M_SOF1  0xC1		/* N indicates which compression process */
-#define M_SOF2  0xC2		/* Only SOF0-SOF2 are now in common use */
-#define M_SOF3  0xC3
-#define M_SOF5  0xC5		/* NB: codes C4 and CC are NOT SOF markers */
-#define M_SOF6  0xC6
-#define M_SOF7  0xC7
-#define M_SOF9  0xC9
-#define M_SOF10 0xCA
-#define M_SOF11 0xCB
-#define M_SOF13 0xCD
-#define M_SOF14 0xCE
-#define M_SOF15 0xCF
-#define M_SOI   0xD8		/* Start Of Image (beginning of datastream) */
-#define M_EOI   0xD9		/* End Of Image (end of datastream) */
-#define M_SOS   0xDA		/* Start Of Scan (begins compressed data) */
-#define M_APP0	0xE0		/* Application-specific marker, type N */
-#define M_APP12	0xEC		/* (we don't bother to list all 16 APPn's) */
-#define M_COM   0xFE		/* COMment */
-
-
-/*
- * Find the next JPEG marker and return its marker code.
- * We expect at least one FF byte, possibly more if the compressor used FFs
- * to pad the file.
- * There could also be non-FF garbage between markers.  The treatment of such
- * garbage is unspecified; we choose to skip over it but emit a warning msg.
- * NB: this routine must not be used after seeing SOS marker, since it will
- * not deal correctly with FF/00 sequences in the compressed image data...
- */
-
-static int
-next_marker (void)
-{
-  int c;
-  int discarded_bytes = 0;
-
-  /* Find 0xFF byte; count and skip any non-FFs. */
-  c = read_1_byte();
-  while (c != 0xFF) {
-    discarded_bytes++;
-    c = read_1_byte();
-  }
-  /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
-   * are legal as pad bytes, so don't count them in discarded_bytes.
-   */
-  do {
-    c = read_1_byte();
-  } while (c == 0xFF);
-
-  if (discarded_bytes != 0) {
-    fprintf(stderr, "Warning: garbage data found in JPEG file\n");
-  }
-
-  return c;
-}
-
-
-/*
- * Read the initial marker, which should be SOI.
- * For a JFIF file, the first two bytes of the file should be literally
- * 0xFF M_SOI.  To be more general, we could use next_marker, but if the
- * input file weren't actually JPEG at all, next_marker might read the whole
- * file and then return a misleading error message...
- */
-
-static int
-first_marker (void)
-{
-  int c1, c2;
-
-  c1 = NEXTBYTE();
-  c2 = NEXTBYTE();
-  if (c1 != 0xFF || c2 != M_SOI)
-    ERREXIT("Not a JPEG file");
-  return c2;
-}
-
-
-/*
- * Most types of marker are followed by a variable-length parameter segment.
- * This routine skips over the parameters for any marker we don't otherwise
- * want to process.
- * Note that we MUST skip the parameter segment explicitly in order not to
- * be fooled by 0xFF bytes that might appear within the parameter segment;
- * such bytes do NOT introduce new markers.
- */
-
-static void
-skip_variable (void)
-/* Skip over an unknown or uninteresting variable-length marker */
-{
-  unsigned int length;
-
-  /* Get the marker parameter length count */
-  length = read_2_bytes();
-  /* Length includes itself, so must be at least 2 */
-  if (length < 2)
-    ERREXIT("Erroneous JPEG marker length");
-  length -= 2;
-  /* Skip over the remaining bytes */
-  while (length > 0) {
-    (void) read_1_byte();
-    length--;
-  }
-}
-
-
-/*
- * Process a COM marker.
- * We want to print out the marker contents as legible text;
- * we must guard against non-text junk and varying newline representations.
- */
-
-static void
-process_COM (void)
-{
-  unsigned int length;
-  int ch;
-  int lastch = 0;
-
-  /* Get the marker parameter length count */
-  length = read_2_bytes();
-  /* Length includes itself, so must be at least 2 */
-  if (length < 2)
-    ERREXIT("Erroneous JPEG marker length");
-  length -= 2;
-
-  while (length > 0) {
-    ch = read_1_byte();
-    /* Emit the character in a readable form.
-     * Nonprintables are converted to \nnn form,
-     * while \ is converted to \\.
-     * Newlines in CR, CR/LF, or LF form will be printed as one newline.
-     */
-    if (ch == '\r') {
-      printf("\n");
-    } else if (ch == '\n') {
-      if (lastch != '\r')
-	printf("\n");
-    } else if (ch == '\\') {
-      printf("\\\\");
-    } else if (isprint(ch)) {
-      putc(ch, stdout);
-    } else {
-      printf("\\%03o", ch);
-    }
-    lastch = ch;
-    length--;
-  }
-  printf("\n");
-}
-
-
-/*
- * Process a SOFn marker.
- * This code is only needed if you want to know the image dimensions...
- */
-
-static void
-process_SOFn (int marker)
-{
-  unsigned int length;
-  unsigned int image_height, image_width;
-  int data_precision, num_components;
-  const char * process;
-  int ci;
-
-  length = read_2_bytes();	/* usual parameter length count */
-
-  data_precision = read_1_byte();
-  image_height = read_2_bytes();
-  image_width = read_2_bytes();
-  num_components = read_1_byte();
-
-  switch (marker) {
-  case M_SOF0:	process = "Baseline";  break;
-  case M_SOF1:	process = "Extended sequential";  break;
-  case M_SOF2:	process = "Progressive";  break;
-  case M_SOF3:	process = "Lossless";  break;
-  case M_SOF5:	process = "Differential sequential";  break;
-  case M_SOF6:	process = "Differential progressive";  break;
-  case M_SOF7:	process = "Differential lossless";  break;
-  case M_SOF9:	process = "Extended sequential, arithmetic coding";  break;
-  case M_SOF10:	process = "Progressive, arithmetic coding";  break;
-  case M_SOF11:	process = "Lossless, arithmetic coding";  break;
-  case M_SOF13:	process = "Differential sequential, arithmetic coding";  break;
-  case M_SOF14:	process = "Differential progressive, arithmetic coding"; break;
-  case M_SOF15:	process = "Differential lossless, arithmetic coding";  break;
-  default:	process = "Unknown";  break;
-  }
-
-  printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n",
-	 image_width, image_height, num_components, data_precision);
-  printf("JPEG process: %s\n", process);
-
-  if (length != (unsigned int) (8 + num_components * 3))
-    ERREXIT("Bogus SOF marker length");
-
-  for (ci = 0; ci < num_components; ci++) {
-    (void) read_1_byte();	/* Component ID code */
-    (void) read_1_byte();	/* H, V sampling factors */
-    (void) read_1_byte();	/* Quantization table number */
-  }
-}
-
-
-/*
- * Parse the marker stream until SOS or EOI is seen;
- * display any COM markers.
- * While the companion program wrjpgcom will always insert COM markers before
- * SOFn, other implementations might not, so we scan to SOS before stopping.
- * If we were only interested in the image dimensions, we would stop at SOFn.
- * (Conversely, if we only cared about COM markers, there would be no need
- * for special code to handle SOFn; we could treat it like other markers.)
- */
-
-static int
-scan_JPEG_header (int verbose)
-{
-  int marker;
-
-  /* Expect SOI at start of file */
-  if (first_marker() != M_SOI)
-    ERREXIT("Expected SOI marker first");
-
-  /* Scan miscellaneous markers until we reach SOS. */
-  for (;;) {
-    marker = next_marker();
-    switch (marker) {
-      /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be,
-       * treated as SOFn.  C4 in particular is actually DHT.
-       */
-    case M_SOF0:		/* Baseline */
-    case M_SOF1:		/* Extended sequential, Huffman */
-    case M_SOF2:		/* Progressive, Huffman */
-    case M_SOF3:		/* Lossless, Huffman */
-    case M_SOF5:		/* Differential sequential, Huffman */
-    case M_SOF6:		/* Differential progressive, Huffman */
-    case M_SOF7:		/* Differential lossless, Huffman */
-    case M_SOF9:		/* Extended sequential, arithmetic */
-    case M_SOF10:		/* Progressive, arithmetic */
-    case M_SOF11:		/* Lossless, arithmetic */
-    case M_SOF13:		/* Differential sequential, arithmetic */
-    case M_SOF14:		/* Differential progressive, arithmetic */
-    case M_SOF15:		/* Differential lossless, arithmetic */
-      if (verbose)
-	process_SOFn(marker);
-      else
-	skip_variable();
-      break;
-
-    case M_SOS:			/* stop before hitting compressed data */
-      return marker;
-
-    case M_EOI:			/* in case it's a tables-only JPEG stream */
-      return marker;
-
-    case M_COM:
-      process_COM();
-      break;
-
-    case M_APP12:
-      /* Some digital camera makers put useful textual information into
-       * APP12 markers, so we print those out too when in -verbose mode.
-       */
-      if (verbose) {
-	printf("APP12 contains:\n");
-	process_COM();
-      } else
-	skip_variable();
-      break;
-
-    default:			/* Anything else just gets skipped */
-      skip_variable();		/* we assume it has a parameter count... */
-      break;
-    }
-  } /* end loop */
-}
-
-
-/* Command line parsing code */
-
-static const char * progname;	/* program name for error messages */
-
-
-static void
-usage (void)
-/* complain about bad command line */
-{
-  fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n");
-
-  fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname);
-
-  fprintf(stderr, "Switches (names may be abbreviated):\n");
-  fprintf(stderr, "  -verbose    Also display dimensions of JPEG image\n");
-
-  exit(EXIT_FAILURE);
-}
-
-
-static int
-keymatch (char * arg, const char * keyword, int minchars)
-/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
-/* keyword is the constant keyword (must be lower case already), */
-/* minchars is length of minimum legal abbreviation. */
-{
-  register int ca, ck;
-  register int nmatched = 0;
-
-  while ((ca = *arg++) != '\0') {
-    if ((ck = *keyword++) == '\0')
-      return 0;			/* arg longer than keyword, no good */
-    if (isupper(ca))		/* force arg to lcase (assume ck is already) */
-      ca = tolower(ca);
-    if (ca != ck)
-      return 0;			/* no good */
-    nmatched++;			/* count matched characters */
-  }
-  /* reached end of argument; fail if it's too short for unique abbrev */
-  if (nmatched < minchars)
-    return 0;
-  return 1;			/* A-OK */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
-  int argn;
-  char * arg;
-  int verbose = 0;
-
-  /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
-  argc = ccommand(&argv);
-#endif
-
-  progname = argv[0];
-  if (progname == NULL || progname[0] == 0)
-    progname = "rdjpgcom";	/* in case C library doesn't provide it */
-
-  /* Parse switches, if any */
-  for (argn = 1; argn < argc; argn++) {
-    arg = argv[argn];
-    if (arg[0] != '-')
-      break;			/* not switch, must be file name */
-    arg++;			/* advance over '-' */
-    if (keymatch(arg, "verbose", 1)) {
-      verbose++;
-    } else
-      usage();
-  }
-
-  /* Open the input file. */
-  /* Unix style: expect zero or one file name */
-  if (argn < argc-1) {
-    fprintf(stderr, "%s: only one input file\n", progname);
-    usage();
-  }
-  if (argn < argc) {
-    if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default input file is stdin */
-#ifdef USE_SETMODE		/* need to hack file mode? */
-    setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN		/* need to re-open in binary mode? */
-    if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open stdin\n", progname);
-      exit(EXIT_FAILURE);
-    }
-#else
-    infile = stdin;
-#endif
-  }
-
-  /* Scan the JPEG headers. */
-  (void) scan_JPEG_header(verbose);
-
-  /* All done. */
-  exit(EXIT_SUCCESS);
-  return 0;			/* suppress no-return-value warnings */
-}
diff --git a/tkimg1.3/libjpeg/rdppm.c b/tkimg1.3/libjpeg/rdppm.c
deleted file mode 100644
index 1df35c1..0000000
--- a/tkimg1.3/libjpeg/rdppm.c
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * rdppm.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in PPM/PGM format.
- * The extended 2-byte-per-sample raw PPM/PGM formats are supported.
- * The PBMPLUS library is NOT required to compile this software
- * (but it is highly useful as a set of PPM image manipulation programs).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume input from
- * an ordinary stdio stream.  They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed PPM format).
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef PPM_SUPPORTED
-
-
-/* Portions of this code are based on the PBMPLUS library, which is:
-**
-** Copyright (C) 1988 by Jef Poskanzer.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation for any purpose and without fee is hereby granted, provided
-** that the above copyright notice appear in all copies and that both that
-** copyright notice and this permission notice appear in supporting
-** documentation.  This software is provided "as is" without express or
-** implied warranty.
-*/
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x)	((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x)	((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x)	((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/*
- * On most systems, reading individual bytes with getc() is drastically less
- * efficient than buffering a row at a time with fread().  On PCs, we must
- * allocate the buffer in near data space, because we are assuming small-data
- * memory model, wherein fread() can't reach far memory.  If you need to
- * process very wide images on a PC, you might have to compile in large-memory
- * model, or else replace fread() with a getc() loop --- which will be much
- * slower.
- */
-
-
-/* Private version of data source object */
-
-typedef struct {
-  struct cjpeg_source_struct pub; /* public fields */
-
-  U_CHAR *iobuffer;		/* non-FAR pointer to I/O buffer */
-  JSAMPROW pixrow;		/* FAR pointer to same */
-  size_t buffer_width;		/* width of I/O buffer */
-  JSAMPLE *rescale;		/* => maxval-remapping array, or NULL */
-} ppm_source_struct;
-
-typedef ppm_source_struct * ppm_source_ptr;
-
-
-LOCAL(int)
-pbm_getc (FILE * infile)
-/* Read next char, skipping over any comments */
-/* A comment/newline sequence is returned as a newline */
-{
-  register int ch;
-
-  ch = getc(infile);
-  if (ch == '#') {
-    do {
-      ch = getc(infile);
-    } while (ch != '\n' && ch != EOF);
-  }
-  return ch;
-}
-
-
-LOCAL(unsigned int)
-read_pbm_integer (j_compress_ptr cinfo, FILE * infile)
-/* Read an unsigned decimal integer from the PPM file */
-/* Swallows one trailing character after the integer */
-/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
-/* This should not be a problem in practice. */
-{
-  register int ch;
-  register unsigned int val;
-
-  /* Skip any leading whitespace */
-  do {
-    ch = pbm_getc(infile);
-    if (ch == EOF)
-      ERREXIT(cinfo, JERR_INPUT_EOF);
-  } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
-
-  if (ch < '0' || ch > '9')
-    ERREXIT(cinfo, JERR_PPM_NONNUMERIC);
-
-  val = ch - '0';
-  while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
-    val *= 10;
-    val += ch - '0';
-  }
-  return val;
-}
-
-
-/*
- * Read one row of pixels.
- *
- * We provide several different versions depending on input file format.
- * In all cases, input is scaled to the size of JSAMPLE.
- *
- * A really fast path is provided for reading byte/sample raw files with
- * maxval = MAXJSAMPLE, which is the normal case for 8-bit data.
- */
-
-
-METHODDEF(JDIMENSION)
-get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading text-format PGM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  FILE * infile = source->pub.input_file;
-  register JSAMPROW ptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
-  }
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading text-format PPM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  FILE * infile = source->pub.input_file;
-  register JSAMPROW ptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
-    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
-    *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
-  }
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format PGM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register U_CHAR * bufferptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  ptr = source->pub.buffer[0];
-  bufferptr = source->iobuffer;
-  for (col = cinfo->image_width; col > 0; col--) {
-    *ptr++ = rescale[UCH(*bufferptr++)];
-  }
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format PPM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register U_CHAR * bufferptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  ptr = source->pub.buffer[0];
-  bufferptr = source->iobuffer;
-  for (col = cinfo->image_width; col > 0; col--) {
-    *ptr++ = rescale[UCH(*bufferptr++)];
-    *ptr++ = rescale[UCH(*bufferptr++)];
-    *ptr++ = rescale[UCH(*bufferptr++)];
-  }
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
- * In this case we just read right into the JSAMPLE buffer!
- * Note that same code works for PPM and PGM files.
- */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-
-  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-word-format PGM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register U_CHAR * bufferptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  ptr = source->pub.buffer[0];
-  bufferptr = source->iobuffer;
-  for (col = cinfo->image_width; col > 0; col--) {
-    register int temp;
-    temp  = UCH(*bufferptr++);
-    temp |= UCH(*bufferptr++) << 8;
-    *ptr++ = rescale[temp];
-  }
-  return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-word-format PPM files with any maxval */
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register U_CHAR * bufferptr;
-  register JSAMPLE *rescale = source->rescale;
-  JDIMENSION col;
-
-  if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-  ptr = source->pub.buffer[0];
-  bufferptr = source->iobuffer;
-  for (col = cinfo->image_width; col > 0; col--) {
-    register int temp;
-    temp  = UCH(*bufferptr++);
-    temp |= UCH(*bufferptr++) << 8;
-    *ptr++ = rescale[temp];
-    temp  = UCH(*bufferptr++);
-    temp |= UCH(*bufferptr++) << 8;
-    *ptr++ = rescale[temp];
-    temp  = UCH(*bufferptr++);
-    temp |= UCH(*bufferptr++) << 8;
-    *ptr++ = rescale[temp];
-  }
-  return 1;
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  ppm_source_ptr source = (ppm_source_ptr) sinfo;
-  int c;
-  unsigned int w, h, maxval;
-  boolean need_iobuffer, use_raw_buffer, need_rescale;
-
-  if (getc(source->pub.input_file) != 'P')
-    ERREXIT(cinfo, JERR_PPM_NOT);
-
-  c = getc(source->pub.input_file); /* subformat discriminator character */
-
-  /* detect unsupported variants (ie, PBM) before trying to read header */
-  switch (c) {
-  case '2':			/* it's a text-format PGM file */
-  case '3':			/* it's a text-format PPM file */
-  case '5':			/* it's a raw-format PGM file */
-  case '6':			/* it's a raw-format PPM file */
-    break;
-  default:
-    ERREXIT(cinfo, JERR_PPM_NOT);
-    break;
-  }
-
-  /* fetch the remaining header info */
-  w = read_pbm_integer(cinfo, source->pub.input_file);
-  h = read_pbm_integer(cinfo, source->pub.input_file);
-  maxval = read_pbm_integer(cinfo, source->pub.input_file);
-
-  if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
-    ERREXIT(cinfo, JERR_PPM_NOT);
-
-  cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */
-  cinfo->image_width = (JDIMENSION) w;
-  cinfo->image_height = (JDIMENSION) h;
-
-  /* initialize flags to most common settings */
-  need_iobuffer = TRUE;		/* do we need an I/O buffer? */
-  use_raw_buffer = FALSE;	/* do we map input buffer onto I/O buffer? */
-  need_rescale = TRUE;		/* do we need a rescale array? */
-
-  switch (c) {
-  case '2':			/* it's a text-format PGM file */
-    cinfo->input_components = 1;
-    cinfo->in_color_space = JCS_GRAYSCALE;
-    TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h);
-    source->pub.get_pixel_rows = get_text_gray_row;
-    need_iobuffer = FALSE;
-    break;
-
-  case '3':			/* it's a text-format PPM file */
-    cinfo->input_components = 3;
-    cinfo->in_color_space = JCS_RGB;
-    TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h);
-    source->pub.get_pixel_rows = get_text_rgb_row;
-    need_iobuffer = FALSE;
-    break;
-
-  case '5':			/* it's a raw-format PGM file */
-    cinfo->input_components = 1;
-    cinfo->in_color_space = JCS_GRAYSCALE;
-    TRACEMS2(cinfo, 1, JTRC_PGM, w, h);
-    if (maxval > 255) {
-      source->pub.get_pixel_rows = get_word_gray_row;
-    } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
-      source->pub.get_pixel_rows = get_raw_row;
-      use_raw_buffer = TRUE;
-      need_rescale = FALSE;
-    } else {
-      source->pub.get_pixel_rows = get_scaled_gray_row;
-    }
-    break;
-
-  case '6':			/* it's a raw-format PPM file */
-    cinfo->input_components = 3;
-    cinfo->in_color_space = JCS_RGB;
-    TRACEMS2(cinfo, 1, JTRC_PPM, w, h);
-    if (maxval > 255) {
-      source->pub.get_pixel_rows = get_word_rgb_row;
-    } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
-      source->pub.get_pixel_rows = get_raw_row;
-      use_raw_buffer = TRUE;
-      need_rescale = FALSE;
-    } else {
-      source->pub.get_pixel_rows = get_scaled_rgb_row;
-    }
-    break;
-  }
-
-  /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */
-  if (need_iobuffer) {
-    source->buffer_width = (size_t) w * cinfo->input_components *
-      ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR)));
-    source->iobuffer = (U_CHAR *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  source->buffer_width);
-  }
-
-  /* Create compressor input buffer. */
-  if (use_raw_buffer) {
-    /* For unscaled raw-input case, we can just map it onto the I/O buffer. */
-    /* Synthesize a JSAMPARRAY pointer structure */
-    /* Cast here implies near->far pointer conversion on PCs */
-    source->pixrow = (JSAMPROW) source->iobuffer;
-    source->pub.buffer = & source->pixrow;
-    source->pub.buffer_height = 1;
-  } else {
-    /* Need to translate anyway, so make a separate sample buffer. */
-    source->pub.buffer = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1);
-    source->pub.buffer_height = 1;
-  }
-
-  /* Compute the rescaling array if required. */
-  if (need_rescale) {
-    INT32 val, half_maxval;
-
-    /* On 16-bit-int machines we have to be careful of maxval = 65535 */
-    source->rescale = (JSAMPLE *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE)));
-    half_maxval = maxval / 2;
-    for (val = 0; val <= (INT32) maxval; val++) {
-      /* The multiplication here must be done in 32 bits to avoid overflow */
-      source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval);
-    }
-  }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  /* no work */
-}
-
-
-/*
- * The module selection routine for PPM format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_ppm (j_compress_ptr cinfo)
-{
-  ppm_source_ptr source;
-
-  /* Create module interface object */
-  source = (ppm_source_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(ppm_source_struct));
-  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
-  source->pub.start_input = start_input_ppm;
-  source->pub.finish_input = finish_input_ppm;
-
-  return (cjpeg_source_ptr) source;
-}
-
-#endif /* PPM_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/rdrle.c b/tkimg1.3/libjpeg/rdrle.c
deleted file mode 100644
index 542bc37..0000000
--- a/tkimg1.3/libjpeg/rdrle.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * rdrle.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in Utah RLE format.
- * The Utah Raster Toolkit library is required (version 3.1 or later).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume input from
- * an ordinary stdio stream.  They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed RLE format).
- *
- * Based on code contributed by Mike Lijewski,
- * with updates from Robert Hutchinson.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef RLE_SUPPORTED
-
-/* rle.h is provided by the Utah Raster Toolkit. */
-
-#include <rle.h>
-
-/*
- * We assume that JSAMPLE has the same representation as rle_pixel,
- * to wit, "unsigned char".  Hence we can't cope with 12- or 16-bit samples.
- */
-
-#if BITS_IN_JSAMPLE != 8
-  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * We support the following types of RLE files:
- *   
- *   GRAYSCALE   - 8 bits, no colormap
- *   MAPPEDGRAY  - 8 bits, 1 channel colomap
- *   PSEUDOCOLOR - 8 bits, 3 channel colormap
- *   TRUECOLOR   - 24 bits, 3 channel colormap
- *   DIRECTCOLOR - 24 bits, no colormap
- *
- * For now, we ignore any alpha channel in the image.
- */
-
-typedef enum
-  { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind;
-
-
-/*
- * Since RLE stores scanlines bottom-to-top, we have to invert the image
- * to conform to JPEG's top-to-bottom order.  To do this, we read the
- * incoming image into a virtual array on the first get_pixel_rows call,
- * then fetch the required row from the virtual array on subsequent calls.
- */
-
-typedef struct _rle_source_struct * rle_source_ptr;
-
-typedef struct _rle_source_struct {
-  struct cjpeg_source_struct pub; /* public fields */
-
-  rle_kind visual;              /* actual type of input file */
-  jvirt_sarray_ptr image;       /* virtual array to hold the image */
-  JDIMENSION row;		/* current row # in the virtual array */
-  rle_hdr header;               /* Input file information */
-  rle_pixel** rle_row;          /* holds a row returned by rle_getrow() */
-
-} rle_source_struct;
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  rle_source_ptr source = (rle_source_ptr) sinfo;
-  JDIMENSION width, height;
-#ifdef PROGRESS_REPORT
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
-  /* Use RLE library routine to get the header info */
-  source->header = *rle_hdr_init(NULL);
-  source->header.rle_file = source->pub.input_file;
-  switch (rle_get_setup(&(source->header))) {
-  case RLE_SUCCESS:
-    /* A-OK */
-    break;
-  case RLE_NOT_RLE:
-    ERREXIT(cinfo, JERR_RLE_NOT);
-    break;
-  case RLE_NO_SPACE:
-    ERREXIT(cinfo, JERR_RLE_MEM);
-    break;
-  case RLE_EMPTY:
-    ERREXIT(cinfo, JERR_RLE_EMPTY);
-    break;
-  case RLE_EOF:
-    ERREXIT(cinfo, JERR_RLE_EOF);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_RLE_BADERROR);
-    break;
-  }
-
-  /* Figure out what we have, set private vars and return values accordingly */
-  
-  width  = source->header.xmax - source->header.xmin + 1;
-  height = source->header.ymax - source->header.ymin + 1;
-  source->header.xmin = 0;		/* realign horizontally */
-  source->header.xmax = width-1;
-
-  cinfo->image_width      = width;
-  cinfo->image_height     = height;
-  cinfo->data_precision   = 8;  /* we can only handle 8 bit data */
-
-  if (source->header.ncolors == 1 && source->header.ncmap == 0) {
-    source->visual     = GRAYSCALE;
-    TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height);
-  } else if (source->header.ncolors == 1 && source->header.ncmap == 1) {
-    source->visual     = MAPPEDGRAY;
-    TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height,
-             1 << source->header.cmaplen);
-  } else if (source->header.ncolors == 1 && source->header.ncmap == 3) {
-    source->visual     = PSEUDOCOLOR;
-    TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height,
-	     1 << source->header.cmaplen);
-  } else if (source->header.ncolors == 3 && source->header.ncmap == 3) {
-    source->visual     = TRUECOLOR;
-    TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height,
-	     1 << source->header.cmaplen);
-  } else if (source->header.ncolors == 3 && source->header.ncmap == 0) {
-    source->visual     = DIRECTCOLOR;
-    TRACEMS2(cinfo, 1, JTRC_RLE, width, height);
-  } else
-    ERREXIT(cinfo, JERR_RLE_UNSUPPORTED);
-  
-  if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) {
-    cinfo->in_color_space   = JCS_GRAYSCALE;
-    cinfo->input_components = 1;
-  } else {
-    cinfo->in_color_space   = JCS_RGB;
-    cinfo->input_components = 3;
-  }
-
-  /*
-   * A place to hold each scanline while it's converted.
-   * (GRAYSCALE scanlines don't need converting)
-   */
-  if (source->visual != GRAYSCALE) {
-    source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (JDIMENSION) width, (JDIMENSION) cinfo->input_components);
-  }
-
-  /* request a virtual array to hold the image */
-  source->image = (*cinfo->mem->request_virt_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-     (JDIMENSION) (width * source->header.ncolors),
-     (JDIMENSION) height, (JDIMENSION) 1);
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL) {
-    /* count file input as separate pass */
-    progress->total_extra_passes++;
-  }
-#endif
-
-  source->pub.buffer_height = 1;
-}
-
-
-/*
- * Read one row of pixels.
- * Called only after load_image has read the image into the virtual array.
- * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images.
- */
-
-METHODDEF(JDIMENSION)
-get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  rle_source_ptr source = (rle_source_ptr) sinfo;
-
-  source->row--;
-  source->pub.buffer = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
-
-  return 1;
-}
-
-/*
- * Read one row of pixels.
- * Called only after load_image has read the image into the virtual array.
- * Used for PSEUDOCOLOR images.
- */
-
-METHODDEF(JDIMENSION)
-get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  rle_source_ptr source = (rle_source_ptr) sinfo;
-  JSAMPROW src_row, dest_row;
-  JDIMENSION col;
-  rle_map *colormap;
-  int val;
-
-  colormap = source->header.cmap;
-  dest_row = source->pub.buffer[0];
-  source->row--;
-  src_row = * (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
-
-  for (col = cinfo->image_width; col > 0; col--) {
-    val = GETJSAMPLE(*src_row++);
-    *dest_row++ = (JSAMPLE) (colormap[val      ] >> 8);
-    *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8);
-    *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8);
-  }
-
-  return 1;
-}
-
-
-/*
- * Load the image into a virtual array.  We have to do this because RLE
- * files start at the lower left while the JPEG standard has them starting
- * in the upper left.  This is called the first time we want to get a row
- * of input.  What we do is load the RLE data into the array and then call
- * the appropriate routine to read one row from the array.  Before returning,
- * we set source->pub.get_pixel_rows so that subsequent calls go straight to
- * the appropriate row-reading routine.
- */
-
-METHODDEF(JDIMENSION)
-load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  rle_source_ptr source = (rle_source_ptr) sinfo;
-  JDIMENSION row, col;
-  JSAMPROW  scanline, red_ptr, green_ptr, blue_ptr;
-  rle_pixel **rle_row;
-  rle_map *colormap;
-  char channel;
-#ifdef PROGRESS_REPORT
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
-  colormap = source->header.cmap;
-  rle_row = source->rle_row;
-
-  /* Read the RLE data into our virtual array.
-   * We assume here that (a) rle_pixel is represented the same as JSAMPLE,
-   * and (b) we are not on a machine where FAR pointers differ from regular.
-   */
-  RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL) {
-    progress->pub.pass_limit = cinfo->image_height;
-    progress->pub.pass_counter = 0;
-    (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-  }
-#endif
-
-  switch (source->visual) {
-
-  case GRAYSCALE:
-  case PSEUDOCOLOR:
-    for (row = 0; row < cinfo->image_height; row++) {
-      rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
-         ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
-      rle_getrow(&source->header, rle_row);
-#ifdef PROGRESS_REPORT
-      if (progress != NULL) {
-        progress->pub.pass_counter++;
-        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-      }
-#endif
-    }
-    break;
-
-  case MAPPEDGRAY:
-  case TRUECOLOR:
-    for (row = 0; row < cinfo->image_height; row++) {
-      scanline = * (*cinfo->mem->access_virt_sarray)
-        ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
-      rle_row = source->rle_row;
-      rle_getrow(&source->header, rle_row);
-
-      for (col = 0; col < cinfo->image_width; col++) {
-        for (channel = 0; channel < source->header.ncolors; channel++) {
-          *scanline++ = (JSAMPLE)
-            (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8);
-        }
-      }
-
-#ifdef PROGRESS_REPORT
-      if (progress != NULL) {
-        progress->pub.pass_counter++;
-        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-      }
-#endif
-    }
-    break;
-
-  case DIRECTCOLOR:
-    for (row = 0; row < cinfo->image_height; row++) {
-      scanline = * (*cinfo->mem->access_virt_sarray)
-        ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
-      rle_getrow(&source->header, rle_row);
-
-      red_ptr   = rle_row[0];
-      green_ptr = rle_row[1];
-      blue_ptr  = rle_row[2];
-
-      for (col = cinfo->image_width; col > 0; col--) {
-        *scanline++ = *red_ptr++;
-        *scanline++ = *green_ptr++;
-        *scanline++ = *blue_ptr++;
-      }
-
-#ifdef PROGRESS_REPORT
-      if (progress != NULL) {
-        progress->pub.pass_counter++;
-        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-      }
-#endif
-    }
-  }
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL)
-    progress->completed_extra_passes++;
-#endif
-
-  /* Set up to call proper row-extraction routine in future */
-  if (source->visual == PSEUDOCOLOR) {
-    source->pub.buffer = source->rle_row;
-    source->pub.get_pixel_rows = get_pseudocolor_row;
-  } else {
-    source->pub.get_pixel_rows = get_rle_row;
-  }
-  source->row = cinfo->image_height;
-
-  /* And fetch the topmost (bottommost) row */
-  return (*source->pub.get_pixel_rows) (cinfo, sinfo);   
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  /* no work */
-}
-
-
-/*
- * The module selection routine for RLE format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_rle (j_compress_ptr cinfo)
-{
-  rle_source_ptr source;
-
-  /* Create module interface object */
-  source = (rle_source_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-                                  SIZEOF(rle_source_struct));
-  /* Fill in method ptrs */
-  source->pub.start_input = start_input_rle;
-  source->pub.finish_input = finish_input_rle;
-  source->pub.get_pixel_rows = load_image;
-
-  return (cjpeg_source_ptr) source;
-}
-
-#endif /* RLE_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/rdswitch.c b/tkimg1.3/libjpeg/rdswitch.c
deleted file mode 100644
index 4f4bb4f..0000000
--- a/tkimg1.3/libjpeg/rdswitch.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * rdswitch.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to process some of cjpeg's more complicated
- * command-line switches.  Switches processed here are:
- *	-qtables file		Read quantization tables from text file
- *	-scans file		Read scan script from text file
- *	-qslots N[,N,...]	Set component quantization table selectors
- *	-sample HxV[,HxV,...]	Set component sampling factors
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-#include <ctype.h>		/* to declare isdigit(), isspace() */
-
-
-LOCAL(int)
-text_getc (FILE * file)
-/* Read next char, skipping over any comments (# to end of line) */
-/* A comment/newline sequence is returned as a newline */
-{
-  register int ch;
-  
-  ch = getc(file);
-  if (ch == '#') {
-    do {
-      ch = getc(file);
-    } while (ch != '\n' && ch != EOF);
-  }
-  return ch;
-}
-
-
-LOCAL(boolean)
-read_text_integer (FILE * file, long * result, int * termchar)
-/* Read an unsigned decimal integer from a file, store it in result */
-/* Reads one trailing character after the integer; returns it in termchar */
-{
-  register int ch;
-  register long val;
-  
-  /* Skip any leading whitespace, detect EOF */
-  do {
-    ch = text_getc(file);
-    if (ch == EOF) {
-      *termchar = ch;
-      return FALSE;
-    }
-  } while (isspace(ch));
-  
-  if (! isdigit(ch)) {
-    *termchar = ch;
-    return FALSE;
-  }
-
-  val = ch - '0';
-  while ((ch = text_getc(file)) != EOF) {
-    if (! isdigit(ch))
-      break;
-    val *= 10;
-    val += ch - '0';
-  }
-  *result = val;
-  *termchar = ch;
-  return TRUE;
-}
-
-
-GLOBAL(boolean)
-read_quant_tables (j_compress_ptr cinfo, char * filename,
-		   int scale_factor, boolean force_baseline)
-/* Read a set of quantization tables from the specified file.
- * The file is plain ASCII text: decimal numbers with whitespace between.
- * Comments preceded by '#' may be included in the file.
- * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values.
- * The tables are implicitly numbered 0,1,etc.
- * NOTE: does not affect the qslots mapping, which will default to selecting
- * table 0 for luminance (or primary) components, 1 for chrominance components.
- * You must use -qslots if you want a different component->table mapping.
- */
-{
-  FILE * fp;
-  int tblno, i, termchar;
-  long val;
-  unsigned int table[DCTSIZE2];
-
-  if ((fp = fopen(filename, "r")) == NULL) {
-    fprintf(stderr, "Can't open table file %s\n", filename);
-    return FALSE;
-  }
-  tblno = 0;
-
-  while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */
-    if (tblno >= NUM_QUANT_TBLS) {
-      fprintf(stderr, "Too many tables in file %s\n", filename);
-      fclose(fp);
-      return FALSE;
-    }
-    table[0] = (unsigned int) val;
-    for (i = 1; i < DCTSIZE2; i++) {
-      if (! read_text_integer(fp, &val, &termchar)) {
-	fprintf(stderr, "Invalid table data in file %s\n", filename);
-	fclose(fp);
-	return FALSE;
-      }
-      table[i] = (unsigned int) val;
-    }
-    jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline);
-    tblno++;
-  }
-
-  if (termchar != EOF) {
-    fprintf(stderr, "Non-numeric data in file %s\n", filename);
-    fclose(fp);
-    return FALSE;
-  }
-
-  fclose(fp);
-  return TRUE;
-}
-
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-
-LOCAL(boolean)
-read_scan_integer (FILE * file, long * result, int * termchar)
-/* Variant of read_text_integer that always looks for a non-space termchar;
- * this simplifies parsing of punctuation in scan scripts.
- */
-{
-  register int ch;
-
-  if (! read_text_integer(file, result, termchar))
-    return FALSE;
-  ch = *termchar;
-  while (ch != EOF && isspace(ch))
-    ch = text_getc(file);
-  if (isdigit(ch)) {		/* oops, put it back */
-    if (ungetc(ch, file) == EOF)
-      return FALSE;
-    ch = ' ';
-  } else {
-    /* Any separators other than ';' and ':' are ignored;
-     * this allows user to insert commas, etc, if desired.
-     */
-    if (ch != EOF && ch != ';' && ch != ':')
-      ch = ' ';
-  }
-  *termchar = ch;
-  return TRUE;
-}
-
-
-GLOBAL(boolean)
-read_scan_script (j_compress_ptr cinfo, char * filename)
-/* Read a scan script from the specified text file.
- * Each entry in the file defines one scan to be emitted.
- * Entries are separated by semicolons ';'.
- * An entry contains one to four component indexes,
- * optionally followed by a colon ':' and four progressive-JPEG parameters.
- * The component indexes denote which component(s) are to be transmitted
- * in the current scan.  The first component has index 0.
- * Sequential JPEG is used if the progressive-JPEG parameters are omitted.
- * The file is free format text: any whitespace may appear between numbers
- * and the ':' and ';' punctuation marks.  Also, other punctuation (such
- * as commas or dashes) can be placed between numbers if desired.
- * Comments preceded by '#' may be included in the file.
- * Note: we do very little validity checking here;
- * jcmaster.c will validate the script parameters.
- */
-{
-  FILE * fp;
-  int scanno, ncomps, termchar;
-  long val;
-  jpeg_scan_info * scanptr;
-#define MAX_SCANS  100		/* quite arbitrary limit */
-  jpeg_scan_info scans[MAX_SCANS];
-
-  if ((fp = fopen(filename, "r")) == NULL) {
-    fprintf(stderr, "Can't open scan definition file %s\n", filename);
-    return FALSE;
-  }
-  scanptr = scans;
-  scanno = 0;
-
-  while (read_scan_integer(fp, &val, &termchar)) {
-    if (scanno >= MAX_SCANS) {
-      fprintf(stderr, "Too many scans defined in file %s\n", filename);
-      fclose(fp);
-      return FALSE;
-    }
-    scanptr->component_index[0] = (int) val;
-    ncomps = 1;
-    while (termchar == ' ') {
-      if (ncomps >= MAX_COMPS_IN_SCAN) {
-	fprintf(stderr, "Too many components in one scan in file %s\n",
-		filename);
-	fclose(fp);
-	return FALSE;
-      }
-      if (! read_scan_integer(fp, &val, &termchar))
-	goto bogus;
-      scanptr->component_index[ncomps] = (int) val;
-      ncomps++;
-    }
-    scanptr->comps_in_scan = ncomps;
-    if (termchar == ':') {
-      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
-	goto bogus;
-      scanptr->Ss = (int) val;
-      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
-	goto bogus;
-      scanptr->Se = (int) val;
-      if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
-	goto bogus;
-      scanptr->Ah = (int) val;
-      if (! read_scan_integer(fp, &val, &termchar))
-	goto bogus;
-      scanptr->Al = (int) val;
-    } else {
-      /* set non-progressive parameters */
-      scanptr->Ss = 0;
-      scanptr->Se = DCTSIZE2-1;
-      scanptr->Ah = 0;
-      scanptr->Al = 0;
-    }
-    if (termchar != ';' && termchar != EOF) {
-bogus:
-      fprintf(stderr, "Invalid scan entry format in file %s\n", filename);
-      fclose(fp);
-      return FALSE;
-    }
-    scanptr++, scanno++;
-  }
-
-  if (termchar != EOF) {
-    fprintf(stderr, "Non-numeric data in file %s\n", filename);
-    fclose(fp);
-    return FALSE;
-  }
-
-  if (scanno > 0) {
-    /* Stash completed scan list in cinfo structure.
-     * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data,
-     * but if you want to compress multiple images you'd want JPOOL_PERMANENT.
-     */
-    scanptr = (jpeg_scan_info *)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  scanno * SIZEOF(jpeg_scan_info));
-    MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info));
-    cinfo->scan_info = scanptr;
-    cinfo->num_scans = scanno;
-  }
-
-  fclose(fp);
-  return TRUE;
-}
-
-#endif /* C_MULTISCAN_FILES_SUPPORTED */
-
-
-GLOBAL(boolean)
-set_quant_slots (j_compress_ptr cinfo, char *arg)
-/* Process a quantization-table-selectors parameter string, of the form
- *     N[,N,...]
- * If there are more components than parameters, the last value is replicated.
- */
-{
-  int val = 0;			/* default table # */
-  int ci;
-  char ch;
-
-  for (ci = 0; ci < MAX_COMPONENTS; ci++) {
-    if (*arg) {
-      ch = ',';			/* if not set by sscanf, will be ',' */
-      if (sscanf(arg, "%d%c", &val, &ch) < 1)
-	return FALSE;
-      if (ch != ',')		/* syntax check */
-	return FALSE;
-      if (val < 0 || val >= NUM_QUANT_TBLS) {
-	fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n",
-		NUM_QUANT_TBLS-1);
-	return FALSE;
-      }
-      cinfo->comp_info[ci].quant_tbl_no = val;
-      while (*arg && *arg++ != ',') /* advance to next segment of arg string */
-	;
-    } else {
-      /* reached end of parameter, set remaining components to last table */
-      cinfo->comp_info[ci].quant_tbl_no = val;
-    }
-  }
-  return TRUE;
-}
-
-
-GLOBAL(boolean)
-set_sample_factors (j_compress_ptr cinfo, char *arg)
-/* Process a sample-factors parameter string, of the form
- *     HxV[,HxV,...]
- * If there are more components than parameters, "1x1" is assumed for the rest.
- */
-{
-  int ci, val1, val2;
-  char ch1, ch2;
-
-  for (ci = 0; ci < MAX_COMPONENTS; ci++) {
-    if (*arg) {
-      ch2 = ',';		/* if not set by sscanf, will be ',' */
-      if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3)
-	return FALSE;
-      if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */
-	return FALSE;
-      if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) {
-	fprintf(stderr, "JPEG sampling factors must be 1..4\n");
-	return FALSE;
-      }
-      cinfo->comp_info[ci].h_samp_factor = val1;
-      cinfo->comp_info[ci].v_samp_factor = val2;
-      while (*arg && *arg++ != ',') /* advance to next segment of arg string */
-	;
-    } else {
-      /* reached end of parameter, set remaining components to 1x1 sampling */
-      cinfo->comp_info[ci].h_samp_factor = 1;
-      cinfo->comp_info[ci].v_samp_factor = 1;
-    }
-  }
-  return TRUE;
-}
diff --git a/tkimg1.3/libjpeg/rdtarga.c b/tkimg1.3/libjpeg/rdtarga.c
deleted file mode 100644
index 4c2cd26..0000000
--- a/tkimg1.3/libjpeg/rdtarga.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * rdtarga.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in Targa format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume input from
- * an ordinary stdio stream.  They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed Targa format).
- *
- * Based on code contributed by Lee Daniel Crocker.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef TARGA_SUPPORTED
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x)	((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x)	((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x)	((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define	ReadOK(file,buffer,len)	(JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/* Private version of data source object */
-
-typedef struct _tga_source_struct * tga_source_ptr;
-
-typedef struct _tga_source_struct {
-  struct cjpeg_source_struct pub; /* public fields */
-
-  j_compress_ptr cinfo;		/* back link saves passing separate parm */
-
-  JSAMPARRAY colormap;		/* Targa colormap (converted to my format) */
-
-  jvirt_sarray_ptr whole_image;	/* Needed if funny input row order */
-  JDIMENSION current_row;	/* Current logical row number to read */
-
-  /* Pointer to routine to extract next Targa pixel from input file */
-  JMETHOD(void, read_pixel, (tga_source_ptr sinfo));
-
-  /* Result of read_pixel is delivered here: */
-  U_CHAR tga_pixel[4];
-
-  int pixel_size;		/* Bytes per Targa pixel (1 to 4) */
-
-  /* State info for reading RLE-coded pixels; both counts must be init to 0 */
-  int block_count;		/* # of pixels remaining in RLE block */
-  int dup_pixel_count;		/* # of times to duplicate previous pixel */
-
-  /* This saves the correct pixel-row-expansion method for preload_image */
-  JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
-				       cjpeg_source_ptr sinfo));
-} tga_source_struct;
-
-
-/* For expanding 5-bit pixel values to 8-bit with best rounding */
-
-static const UINT8 c5to8bits[32] = {
-    0,   8,  16,  25,  33,  41,  49,  58,
-   66,  74,  82,  90,  99, 107, 115, 123,
-  132, 140, 148, 156, 165, 173, 181, 189,
-  197, 206, 214, 222, 230, 239, 247, 255
-};
-
-
-
-LOCAL(int)
-read_byte (tga_source_ptr sinfo)
-/* Read next byte from Targa file */
-{
-  register FILE *infile = sinfo->pub.input_file;
-  register int c;
-
-  if ((c = getc(infile)) == EOF)
-    ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
-  return c;
-}
-
-
-LOCAL(void)
-read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize)
-/* Read the colormap from a Targa file */
-{
-  int i;
-
-  /* Presently only handles 24-bit BGR format */
-  if (mapentrysize != 24)
-    ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP);
-
-  for (i = 0; i < cmaplen; i++) {
-    sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
-    sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
-    sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
-  }
-}
-
-
-/*
- * read_pixel methods: get a single pixel from Targa file into tga_pixel[]
- */
-
-METHODDEF(void)
-read_non_rle_pixel (tga_source_ptr sinfo)
-/* Read one Targa pixel from the input file; no RLE expansion */
-{
-  register FILE *infile = sinfo->pub.input_file;
-  register int i;
-
-  for (i = 0; i < sinfo->pixel_size; i++) {
-    sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
-  }
-}
-
-
-METHODDEF(void)
-read_rle_pixel (tga_source_ptr sinfo)
-/* Read one Targa pixel from the input file, expanding RLE data as needed */
-{
-  register FILE *infile = sinfo->pub.input_file;
-  register int i;
-
-  /* Duplicate previously read pixel? */
-  if (sinfo->dup_pixel_count > 0) {
-    sinfo->dup_pixel_count--;
-    return;
-  }
-
-  /* Time to read RLE block header? */
-  if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */
-    i = read_byte(sinfo);
-    if (i & 0x80) {		/* Start of duplicate-pixel block? */
-      sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */
-      sinfo->block_count = 0;	/* then read new block header */
-    } else {
-      sinfo->block_count = i & 0x7F; /* number of pixels after this one */
-    }
-  }
-
-  /* Read next pixel */
-  for (i = 0; i < sinfo->pixel_size; i++) {
-    sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
-  }
-}
-
-
-/*
- * Read one row of pixels.
- *
- * We provide several different versions depending on input file format.
- */
-
-
-METHODDEF(JDIMENSION)
-get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit grayscale pixels */
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-  
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
-    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
-  }
-  return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit colormap indexes */
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  register int t;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-  register JSAMPARRAY colormap = source->colormap;
-
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
-    t = UCH(source->tga_pixel[0]);
-    *ptr++ = colormap[0][t];
-    *ptr++ = colormap[1][t];
-    *ptr++ = colormap[2][t];
-  }
-  return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 16-bit pixels */
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  register int t;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-  
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
-    t = UCH(source->tga_pixel[0]);
-    t += UCH(source->tga_pixel[1]) << 8;
-    /* We expand 5 bit data to 8 bit sample width.
-     * The format of the 16-bit (LSB first) input word is
-     *     xRRRRRGGGGGBBBBB
-     */
-    ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F];
-    t >>= 5;
-    ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F];
-    t >>= 5;
-    ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F];
-    ptr += 3;
-  }
-  return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 24-bit pixels */
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-  
-  ptr = source->pub.buffer[0];
-  for (col = cinfo->image_width; col > 0; col--) {
-    (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
-    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */
-    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]);
-    *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
-  }
-  return 1;
-}
-
-/*
- * Targa also defines a 32-bit pixel format with order B,G,R,A.
- * We presently ignore the attribute byte, so the code for reading
- * these pixels is identical to the 24-bit routine above.
- * This works because the actual pixel length is only known to read_pixel.
- */
-
-#define get_32bit_row  get_24bit_row
-
-
-/*
- * This method is for re-reading the input data in standard top-down
- * row order.  The entire image has already been read into whole_image
- * with proper conversion of pixel format, but it's in a funny row order.
- */
-
-METHODDEF(JDIMENSION)
-get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  JDIMENSION source_row;
-
-  /* Compute row of source that maps to current_row of normal order */
-  /* For now, assume image is bottom-up and not interlaced. */
-  /* NEEDS WORK to support interlaced images! */
-  source_row = cinfo->image_height - source->current_row - 1;
-
-  /* Fetch that row from virtual array */
-  source->pub.buffer = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, source->whole_image,
-     source_row, (JDIMENSION) 1, FALSE);
-
-  source->current_row++;
-  return 1;
-}
-
-
-/*
- * This method loads the image into whole_image during the first call on
- * get_pixel_rows.  The get_pixel_rows pointer is then adjusted to call
- * get_memory_row on subsequent calls.
- */
-
-METHODDEF(JDIMENSION)
-preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  JDIMENSION row;
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
-  /* Read the data into a virtual array in input-file row order. */
-  for (row = 0; row < cinfo->image_height; row++) {
-    if (progress != NULL) {
-      progress->pub.pass_counter = (long) row;
-      progress->pub.pass_limit = (long) cinfo->image_height;
-      (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-    }
-    source->pub.buffer = (*cinfo->mem->access_virt_sarray)
-      ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE);
-    (*source->get_pixel_rows) (cinfo, sinfo);
-  }
-  if (progress != NULL)
-    progress->completed_extra_passes++;
-
-  /* Set up to read from the virtual array in unscrambled order */
-  source->pub.get_pixel_rows = get_memory_row;
-  source->current_row = 0;
-  /* And read the first row */
-  return get_memory_row(cinfo, sinfo);
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  tga_source_ptr source = (tga_source_ptr) sinfo;
-  U_CHAR targaheader[18];
-  int idlen, cmaptype, subtype, flags, interlace_type, components;
-  unsigned int width, height, maplen;
-  boolean is_bottom_up;
-
-#define GET_2B(offset)	((unsigned int) UCH(targaheader[offset]) + \
-			 (((unsigned int) UCH(targaheader[offset+1])) << 8))
-
-  if (! ReadOK(source->pub.input_file, targaheader, 18))
-    ERREXIT(cinfo, JERR_INPUT_EOF);
-
-  /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */
-  if (targaheader[16] == 15)
-    targaheader[16] = 16;
-
-  idlen = UCH(targaheader[0]);
-  cmaptype = UCH(targaheader[1]);
-  subtype = UCH(targaheader[2]);
-  maplen = GET_2B(5);
-  width = GET_2B(12);
-  height = GET_2B(14);
-  source->pixel_size = UCH(targaheader[16]) >> 3;
-  flags = UCH(targaheader[17]);	/* Image Descriptor byte */
-
-  is_bottom_up = ((flags & 0x20) == 0);	/* bit 5 set => top-down */
-  interlace_type = flags >> 6;	/* bits 6/7 are interlace code */
-
-  if (cmaptype > 1 ||		/* cmaptype must be 0 or 1 */
-      source->pixel_size < 1 || source->pixel_size > 4 ||
-      (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
-      interlace_type != 0)	/* currently don't allow interlaced image */
-    ERREXIT(cinfo, JERR_TGA_BADPARMS);
-  
-  if (subtype > 8) {
-    /* It's an RLE-coded file */
-    source->read_pixel = read_rle_pixel;
-    source->block_count = source->dup_pixel_count = 0;
-    subtype -= 8;
-  } else {
-    /* Non-RLE file */
-    source->read_pixel = read_non_rle_pixel;
-  }
-
-  /* Now should have subtype 1, 2, or 3 */
-  components = 3;		/* until proven different */
-  cinfo->in_color_space = JCS_RGB;
-
-  switch (subtype) {
-  case 1:			/* Colormapped image */
-    if (source->pixel_size == 1 && cmaptype == 1)
-      source->get_pixel_rows = get_8bit_row;
-    else
-      ERREXIT(cinfo, JERR_TGA_BADPARMS);
-    TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height);
-    break;
-  case 2:			/* RGB image */
-    switch (source->pixel_size) {
-    case 2:
-      source->get_pixel_rows = get_16bit_row;
-      break;
-    case 3:
-      source->get_pixel_rows = get_24bit_row;
-      break;
-    case 4:
-      source->get_pixel_rows = get_32bit_row;
-      break;
-    default:
-      ERREXIT(cinfo, JERR_TGA_BADPARMS);
-      break;
-    }
-    TRACEMS2(cinfo, 1, JTRC_TGA, width, height);
-    break;
-  case 3:			/* Grayscale image */
-    components = 1;
-    cinfo->in_color_space = JCS_GRAYSCALE;
-    if (source->pixel_size == 1)
-      source->get_pixel_rows = get_8bit_gray_row;
-    else
-      ERREXIT(cinfo, JERR_TGA_BADPARMS);
-    TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_TGA_BADPARMS);
-    break;
-  }
-
-  if (is_bottom_up) {
-    /* Create a virtual array to buffer the upside-down image. */
-    source->whole_image = (*cinfo->mem->request_virt_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-       (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1);
-    if (cinfo->progress != NULL) {
-      cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-      progress->total_extra_passes++; /* count file input as separate pass */
-    }
-    /* source->pub.buffer will point to the virtual array. */
-    source->pub.buffer_height = 1; /* in case anyone looks at it */
-    source->pub.get_pixel_rows = preload_image;
-  } else {
-    /* Don't need a virtual array, but do need a one-row input buffer. */
-    source->whole_image = NULL;
-    source->pub.buffer = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       (JDIMENSION) width * components, (JDIMENSION) 1);
-    source->pub.buffer_height = 1;
-    source->pub.get_pixel_rows = source->get_pixel_rows;
-  }
-  
-  while (idlen--)		/* Throw away ID field */
-    (void) read_byte(source);
-
-  if (maplen > 0) {
-    if (maplen > 256 || GET_2B(3) != 0)
-      ERREXIT(cinfo, JERR_TGA_BADCMAP);
-    /* Allocate space to store the colormap */
-    source->colormap = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3);
-    /* and read it from the file */
-    read_colormap(source, (int) maplen, UCH(targaheader[7]));
-  } else {
-    if (cmaptype)		/* but you promised a cmap! */
-      ERREXIT(cinfo, JERR_TGA_BADPARMS);
-    source->colormap = NULL;
-  }
-
-  cinfo->input_components = components;
-  cinfo->data_precision = 8;
-  cinfo->image_width = width;
-  cinfo->image_height = height;
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
-  /* no work */
-}
-
-
-/*
- * The module selection routine for Targa format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_targa (j_compress_ptr cinfo)
-{
-  tga_source_ptr source;
-
-  /* Create module interface object */
-  source = (tga_source_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(tga_source_struct));
-  source->cinfo = cinfo;	/* make back link for subroutines */
-  /* Fill in method ptrs, except get_pixel_rows which start_input sets */
-  source->pub.start_input = start_input_tga;
-  source->pub.finish_input = finish_input_tga;
-
-  return (cjpeg_source_ptr) source;
-}
-
-#endif /* TARGA_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/structure.doc b/tkimg1.3/libjpeg/structure.doc
deleted file mode 100644
index 51c9def..0000000
--- a/tkimg1.3/libjpeg/structure.doc
+++ /dev/null
@@ -1,948 +0,0 @@
-IJG JPEG LIBRARY:  SYSTEM ARCHITECTURE
-
-Copyright (C) 1991-1995, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file provides an overview of the architecture of the IJG JPEG software;
-that is, the functions of the various modules in the system and the interfaces
-between modules.  For more precise details about any data structure or calling
-convention, see the include files and comments in the source code.
-
-We assume that the reader is already somewhat familiar with the JPEG standard.
-The README file includes references for learning about JPEG.  The file
-libjpeg.doc describes the library from the viewpoint of an application
-programmer using the library; it's best to read that file before this one.
-Also, the file coderules.doc describes the coding style conventions we use.
-
-In this document, JPEG-specific terminology follows the JPEG standard:
-  A "component" means a color channel, e.g., Red or Luminance.
-  A "sample" is a single component value (i.e., one number in the image data).
-  A "coefficient" is a frequency coefficient (a DCT transform output number).
-  A "block" is an 8x8 group of samples or coefficients.
-  An "MCU" (minimum coded unit) is an interleaved set of blocks of size
-	determined by the sampling factors, or a single block in a
-	noninterleaved scan.
-We do not use the terms "pixel" and "sample" interchangeably.  When we say
-pixel, we mean an element of the full-size image, while a sample is an element
-of the downsampled image.  Thus the number of samples may vary across
-components while the number of pixels does not.  (This terminology is not used
-rigorously throughout the code, but it is used in places where confusion would
-otherwise result.)
-
-
-*** System features ***
-
-The IJG distribution contains two parts:
-  * A subroutine library for JPEG compression and decompression.
-  * cjpeg/djpeg, two sample applications that use the library to transform
-    JFIF JPEG files to and from several other image formats.
-cjpeg/djpeg are of no great intellectual complexity: they merely add a simple
-command-line user interface and I/O routines for several uncompressed image
-formats.  This document concentrates on the library itself.
-
-We desire the library to be capable of supporting all JPEG baseline, extended
-sequential, and progressive DCT processes.  Hierarchical processes are not
-supported.
-
-The library does not support the lossless (spatial) JPEG process.  Lossless
-JPEG shares little or no code with lossy JPEG, and would normally be used
-without the extensive pre- and post-processing provided by this library.
-We feel that lossless JPEG is better handled by a separate library.
-
-Within these limits, any set of compression parameters allowed by the JPEG
-spec should be readable for decompression.  (We can be more restrictive about
-what formats we can generate.)  Although the system design allows for all
-parameter values, some uncommon settings are not yet implemented and may
-never be; nonintegral sampling ratios are the prime example.  Furthermore,
-we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
-run-time option, because most machines can store 8-bit pixels much more
-compactly than 12-bit.
-
-For legal reasons, JPEG arithmetic coding is not currently supported, but
-extending the library to include it would be straightforward.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format.  The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats.  (For example, libtiff uses this
-library to implement JPEG compression within the TIFF file format.)
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG.  These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression.  They include colorspace conversion, downsampling/upsampling,
-and color quantization.  This code can be omitted if not needed.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing.  The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation.  On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical.  It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-
-*** Portability issues ***
-
-Portability is an essential requirement for the library.  The key portability
-issues that show up at the level of system architecture are:
-
-1.  Memory usage.  We want the code to be able to run on PC-class machines
-with limited memory.  Images should therefore be processed sequentially (in
-strips), to avoid holding the whole image in memory at once.  Where a
-full-image buffer is necessary, we should be able to use either virtual memory
-or temporary files.
-
-2.  Near/far pointer distinction.  To run efficiently on 80x86 machines, the
-code should distinguish "small" objects (kept in near data space) from
-"large" ones (kept in far data space).  This is an annoying restriction, but
-fortunately it does not impact code quality for less brain-damaged machines,
-and the source code clutter turns out to be minimal with sufficient use of
-pointer typedefs.
-
-3. Data precision.  We assume that "char" is at least 8 bits, "short" and
-"int" at least 16, "long" at least 32.  The code will work fine with larger
-data sizes, although memory may be used inefficiently in some cases.  However,
-the JPEG compressed datastream must ultimately appear on external storage as a
-sequence of 8-bit bytes if it is to conform to the standard.  This may pose a
-problem on machines where char is wider than 8 bits.  The library represents
-compressed data as an array of values of typedef JOCTET.  If no data type
-exactly 8 bits wide is available, custom data source and data destination
-modules must be written to unpack and pack the chosen JOCTET datatype into
-8-bit external representation.
-
-
-*** System overview ***
-
-The compressor and decompressor are each divided into two main sections:
-the JPEG compressor or decompressor proper, and the preprocessing or
-postprocessing functions.  The interface between these two sections is the
-image data that the official JPEG spec regards as its input or output: this
-data is in the colorspace to be used for compression, and it is downsampled
-to the sampling factors to be used.  The preprocessing and postprocessing
-steps are responsible for converting a normal image representation to or from
-this form.  (Those few applications that want to deal with YCbCr downsampled
-data can skip the preprocessing or postprocessing step.)
-
-Looking more closely, the compressor library contains the following main
-elements:
-
-  Preprocessing:
-    * Color space conversion (e.g., RGB to YCbCr).
-    * Edge expansion and downsampling.  Optionally, this step can do simple
-      smoothing --- this is often helpful for low-quality source data.
-  JPEG proper:
-    * MCU assembly, DCT, quantization.
-    * Entropy coding (sequential or progressive, Huffman or arithmetic).
-
-In addition to these modules we need overall control, marker generation,
-and support code (memory management & error handling).  There is also a
-module responsible for physically writing the output data --- typically
-this is just an interface to fwrite(), but some applications may need to
-do something else with the data.
-
-The decompressor library contains the following main elements:
-
-  JPEG proper:
-    * Entropy decoding (sequential or progressive, Huffman or arithmetic).
-    * Dequantization, inverse DCT, MCU disassembly.
-  Postprocessing:
-    * Upsampling.  Optionally, this step may be able to do more general
-      rescaling of the image.
-    * Color space conversion (e.g., YCbCr to RGB).  This step may also
-      provide gamma adjustment [ currently it does not ].
-    * Optional color quantization (e.g., reduction to 256 colors).
-    * Optional color precision reduction (e.g., 24-bit to 15-bit color).
-      [This feature is not currently implemented.]
-
-We also need overall control, marker parsing, and a data source module.
-The support code (memory management & error handling) can be shared with
-the compression half of the library.
-
-There may be several implementations of each of these elements, particularly
-in the decompressor, where a wide range of speed/quality tradeoffs is very
-useful.  It must be understood that some of the best speedups involve
-merging adjacent steps in the pipeline.  For example, upsampling, color space
-conversion, and color quantization might all be done at once when using a
-low-quality ordered-dither technique.  The system architecture is designed to
-allow such merging where appropriate.
-
-
-Note: it is convenient to regard edge expansion (padding to block boundaries)
-as a preprocessing/postprocessing function, even though the JPEG spec includes
-it in compression/decompression.  We do this because downsampling/upsampling
-can be simplified a little if they work on padded data: it's not necessary to
-have special cases at the right and bottom edges.  Therefore the interface
-buffer is always an integral number of blocks wide and high, and we expect
-compression preprocessing to pad the source data properly.  Padding will occur
-only to the next block (8-sample) boundary.  In an interleaved-scan situation,
-additional dummy blocks may be used to fill out MCUs, but the MCU assembly and
-disassembly logic will create or discard these blocks internally.  (This is
-advantageous for speed reasons, since we avoid DCTing the dummy blocks.
-It also permits a small reduction in file size, because the compressor can
-choose dummy block contents so as to minimize their size in compressed form.
-Finally, it makes the interface buffer specification independent of whether
-the file is actually interleaved or not.)  Applications that wish to deal
-directly with the downsampled data must provide similar buffering and padding
-for odd-sized images.
-
-
-*** Poor man's object-oriented programming ***
-
-It should be clear by now that we have a lot of quasi-independent processing
-steps, many of which have several possible behaviors.  To avoid cluttering the
-code with lots of switch statements, we use a simple form of object-style
-programming to separate out the different possibilities.
-
-For example, two different color quantization algorithms could be implemented
-as two separate modules that present the same external interface; at runtime,
-the calling code will access the proper module indirectly through an "object".
-
-We can get the limited features we need while staying within portable C.
-The basic tool is a function pointer.  An "object" is just a struct
-containing one or more function pointer fields, each of which corresponds to
-a method name in real object-oriented languages.  During initialization we
-fill in the function pointers with references to whichever module we have
-determined we need to use in this run.  Then invocation of the module is done
-by indirecting through a function pointer; on most machines this is no more
-expensive than a switch statement, which would be the only other way of
-making the required run-time choice.  The really significant benefit, of
-course, is keeping the source code clean and well structured.
-
-We can also arrange to have private storage that varies between different
-implementations of the same kind of object.  We do this by making all the
-module-specific object structs be separately allocated entities, which will
-be accessed via pointers in the master compression or decompression struct.
-The "public" fields or methods for a given kind of object are specified by
-a commonly known struct.  But a module's initialization code can allocate
-a larger struct that contains the common struct as its first member, plus
-additional private fields.  With appropriate pointer casting, the module's
-internal functions can access these private fields.  (For a simple example,
-see jdatadst.c, which implements the external interface specified by struct
-jpeg_destination_mgr, but adds extra fields.)
-
-(Of course this would all be a lot easier if we were using C++, but we are
-not yet prepared to assume that everyone has a C++ compiler.)
-
-An important benefit of this scheme is that it is easy to provide multiple
-versions of any method, each tuned to a particular case.  While a lot of
-precalculation might be done to select an optimal implementation of a method,
-the cost per invocation is constant.  For example, the upsampling step might
-have a "generic" method, plus one or more "hardwired" methods for the most
-popular sampling factors; the hardwired methods would be faster because they'd
-use straight-line code instead of for-loops.  The cost to determine which
-method to use is paid only once, at startup, and the selection criteria are
-hidden from the callers of the method.
-
-This plan differs a little bit from usual object-oriented structures, in that
-only one instance of each object class will exist during execution.  The
-reason for having the class structure is that on different runs we may create
-different instances (choose to execute different modules).  You can think of
-the term "method" as denoting the common interface presented by a particular
-set of interchangeable functions, and "object" as denoting a group of related
-methods, or the total shared interface behavior of a group of modules.
-
-
-*** Overall control structure ***
-
-We previously mentioned the need for overall control logic in the compression
-and decompression libraries.  In IJG implementations prior to v5, overall
-control was mostly provided by "pipeline control" modules, which proved to be
-large, unwieldy, and hard to understand.  To improve the situation, the
-control logic has been subdivided into multiple modules.  The control modules
-consist of:
-
-1. Master control for module selection and initialization.  This has two
-responsibilities:
-
-   1A.  Startup initialization at the beginning of image processing.
-        The individual processing modules to be used in this run are selected
-        and given initialization calls.
-
-   1B.  Per-pass control.  This determines how many passes will be performed
-        and calls each active processing module to configure itself
-        appropriately at the beginning of each pass.  End-of-pass processing,
-	where necessary, is also invoked from the master control module.
-
-   Method selection is partially distributed, in that a particular processing
-   module may contain several possible implementations of a particular method,
-   which it will select among when given its initialization call.  The master
-   control code need only be concerned with decisions that affect more than
-   one module.
- 
-2. Data buffering control.  A separate control module exists for each
-   inter-processing-step data buffer.  This module is responsible for
-   invoking the processing steps that write or read that data buffer.
-
-Each buffer controller sees the world as follows:
-
-input data => processing step A => buffer => processing step B => output data
-                      |              |               |
-              ------------------ controller ------------------
-
-The controller knows the dataflow requirements of steps A and B: how much data
-they want to accept in one chunk and how much they output in one chunk.  Its
-function is to manage its buffer and call A and B at the proper times.
-
-A data buffer control module may itself be viewed as a processing step by a
-higher-level control module; thus the control modules form a binary tree with
-elementary processing steps at the leaves of the tree.
-
-The control modules are objects.  A considerable amount of flexibility can
-be had by replacing implementations of a control module.  For example:
-* Merging of adjacent steps in the pipeline is done by replacing a control
-  module and its pair of processing-step modules with a single processing-
-  step module.  (Hence the possible merges are determined by the tree of
-  control modules.)
-* In some processing modes, a given interstep buffer need only be a "strip"
-  buffer large enough to accommodate the desired data chunk sizes.  In other
-  modes, a full-image buffer is needed and several passes are required.
-  The control module determines which kind of buffer is used and manipulates
-  virtual array buffers as needed.  One or both processing steps may be
-  unaware of the multi-pass behavior.
-
-In theory, we might be able to make all of the data buffer controllers
-interchangeable and provide just one set of implementations for all.  In
-practice, each one contains considerable special-case processing for its
-particular job.  The buffer controller concept should be regarded as an
-overall system structuring principle, not as a complete description of the
-task performed by any one controller.
-
-
-*** Compression object structure ***
-
-Here is a sketch of the logical structure of the JPEG compression library:
-
-                                                 |-- Colorspace conversion
-                  |-- Preprocessing controller --|
-                  |                              |-- Downsampling
-Main controller --|
-                  |                            |-- Forward DCT, quantize
-                  |-- Coefficient controller --|
-                                               |-- Entropy encoding
-
-This sketch also describes the flow of control (subroutine calls) during
-typical image data processing.  Each of the components shown in the diagram is
-an "object" which may have several different implementations available.  One
-or more source code files contain the actual implementation(s) of each object.
-
-The objects shown above are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
-  holds the preprocessed input data.  This controller invokes preprocessing to
-  fill the subsampled-data buffer, and JPEG compression to empty it.  There is
-  usually no need for a full-image buffer here; a strip buffer is adequate.
-
-* Preprocessing controller: buffer controller for the downsampling input data
-  buffer, which lies between colorspace conversion and downsampling.  Note
-  that a unified conversion/downsampling module would probably replace this
-  controller entirely.
-
-* Colorspace conversion: converts application image data into the desired
-  JPEG color space; also changes the data from pixel-interleaved layout to
-  separate component planes.  Processes one pixel row at a time.
-
-* Downsampling: performs reduction of chroma components as required.
-  Optionally may perform pixel-level smoothing as well.  Processes a "row
-  group" at a time, where a row group is defined as Vmax pixel rows of each
-  component before downsampling, and Vk sample rows afterwards (remember Vk
-  differs across components).  Some downsampling or smoothing algorithms may
-  require context rows above and below the current row group; the
-  preprocessing controller is responsible for supplying these rows via proper
-  buffering.  The downsampler is responsible for edge expansion at the right
-  edge (i.e., extending each sample row to a multiple of 8 samples); but the
-  preprocessing controller is responsible for vertical edge expansion (i.e.,
-  duplicating the bottom sample row as needed to make a multiple of 8 rows).
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
-  This controller handles MCU assembly, including insertion of dummy DCT
-  blocks when needed at the right or bottom edge.  When performing
-  Huffman-code optimization or emitting a multiscan JPEG file, this
-  controller is responsible for buffering the full image.  The equivalent of
-  one fully interleaved MCU row of subsampled data is processed per call,
-  even when the JPEG file is noninterleaved.
-
-* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients.
-  Works on one or more DCT blocks at a time.  (Note: the coefficients are now
-  emitted in normal array order, which the entropy encoder is expected to
-  convert to zigzag order as necessary.  Prior versions of the IJG code did
-  the conversion to zigzag order within the quantization step.)
-
-* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the
-  coded data to the data destination module.  Works on one MCU per call.
-  For progressive JPEG, the same DCT blocks are fed to the entropy coder
-  during each pass, and the coder must emit the appropriate subset of
-  coefficients.
-
-In addition to the above objects, the compression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
-  and per-pass initialization of the other modules.
-
-* Marker writing: generates JPEG markers (except for RSTn, which is emitted
-  by the entropy encoder when needed).
-
-* Data destination manager: writes the output JPEG datastream to its final
-  destination (e.g., a file).  The destination manager supplied with the
-  library knows how to write to a stdio stream; for other behaviors, the
-  surrounding application may provide its own destination manager.
-
-* Memory manager: allocates and releases memory, controls virtual arrays
-  (with backing store management, where required).
-
-* Error handler: performs formatting and output of error and trace messages;
-  determines handling of nonfatal errors.  The surrounding application may
-  override some or all of this object's methods to change error handling.
-
-* Progress monitor: supports output of "percent-done" progress reports.
-  This object represents an optional callback to the surrounding application:
-  if wanted, it must be supplied by the application.
-
-The error handler, destination manager, and progress monitor objects are
-defined as separate objects in order to simplify application-specific
-customization of the JPEG library.  A surrounding application may override
-individual methods or supply its own all-new implementation of one of these
-objects.  The object interfaces for these objects are therefore treated as
-part of the application interface of the library, whereas the other objects
-are internal to the library.
-
-The error handler and memory manager are shared by JPEG compression and
-decompression; the progress monitor, if used, may be shared as well.
-
-
-*** Decompression object structure ***
-
-Here is a sketch of the logical structure of the JPEG decompression library:
-
-                                               |-- Entropy decoding
-                  |-- Coefficient controller --|
-                  |                            |-- Dequantize, Inverse DCT
-Main controller --|
-                  |                               |-- Upsampling
-                  |-- Postprocessing controller --|   |-- Colorspace conversion
-                                                  |-- Color quantization
-                                                  |-- Color precision reduction
-
-As before, this diagram also represents typical control flow.  The objects
-shown are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
-  holds the output of JPEG decompression proper.  This controller's primary
-  task is to feed the postprocessing procedure.  Some upsampling algorithms
-  may require context rows above and below the current row group; when this
-  is true, the main controller is responsible for managing its buffer so as
-  to make context rows available.  In the current design, the main buffer is
-  always a strip buffer; a full-image buffer is never required.
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
-  This controller handles MCU disassembly, including deletion of any dummy
-  DCT blocks at the right or bottom edge.  When reading a multiscan JPEG
-  file, this controller is responsible for buffering the full image.
-  (Buffering DCT coefficients, rather than samples, is necessary to support
-  progressive JPEG.)  The equivalent of one fully interleaved MCU row of
-  subsampled data is processed per call, even when the source JPEG file is
-  noninterleaved.
-
-* Entropy decoding: Read coded data from the data source module and perform
-  Huffman or arithmetic entropy decoding.  Works on one MCU per call.
-  For progressive JPEG decoding, the coefficient controller supplies the prior
-  coefficients of each MCU (initially all zeroes), which the entropy decoder
-  modifies in each scan.
-
-* Dequantization and inverse DCT: like it says.  Note that the coefficients
-  buffered by the coefficient controller have NOT been dequantized; we
-  merge dequantization and inverse DCT into a single step for speed reasons.
-  When scaled-down output is asked for, simplified DCT algorithms may be used
-  that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8.
-  Works on one DCT block at a time.
-
-* Postprocessing controller: buffer controller for the color quantization
-  input buffer, when quantization is in use.  (Without quantization, this
-  controller just calls the upsampler.)  For two-pass quantization, this
-  controller is responsible for buffering the full-image data.
-
-* Upsampling: restores chroma components to full size.  (May support more
-  general output rescaling, too.  Note that if undersized DCT outputs have
-  been emitted by the DCT module, this module must adjust so that properly
-  sized outputs are created.)  Works on one row group at a time.  This module
-  also calls the color conversion module, so its top level is effectively a
-  buffer controller for the upsampling->color conversion buffer.  However, in
-  all but the highest-quality operating modes, upsampling and color
-  conversion are likely to be merged into a single step.
-
-* Colorspace conversion: convert from JPEG color space to output color space,
-  and change data layout from separate component planes to pixel-interleaved.
-  Works on one pixel row at a time.
-
-* Color quantization: reduce the data to colormapped form, using either an
-  externally specified colormap or an internally generated one.  This module
-  is not used for full-color output.  Works on one pixel row at a time; may
-  require two passes to generate a color map.  Note that the output will
-  always be a single component representing colormap indexes.  In the current
-  design, the output values are JSAMPLEs, so an 8-bit compilation cannot
-  quantize to more than 256 colors.  This is unlikely to be a problem in
-  practice.
-
-* Color reduction: this module handles color precision reduction, e.g.,
-  generating 15-bit color (5 bits/primary) from JPEG's 24-bit output.
-  Not quite clear yet how this should be handled... should we merge it with
-  colorspace conversion???
-
-Note that some high-speed operating modes might condense the entire
-postprocessing sequence to a single module (upsample, color convert, and
-quantize in one step).
-
-In addition to the above objects, the decompression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
-  and per-pass initialization of the other modules.  This is subdivided into
-  input and output control: jdinput.c controls only input-side processing,
-  while jdmaster.c handles overall initialization and output-side control.
-
-* Marker reading: decodes JPEG markers (except for RSTn).
-
-* Data source manager: supplies the input JPEG datastream.  The source
-  manager supplied with the library knows how to read from a stdio stream;
-  for other behaviors, the surrounding application may provide its own source
-  manager.
-
-* Memory manager: same as for compression library.
-
-* Error handler: same as for compression library.
-
-* Progress monitor: same as for compression library.
-
-As with compression, the data source manager, error handler, and progress
-monitor are candidates for replacement by a surrounding application.
-
-
-*** Decompression input and output separation ***
-
-To support efficient incremental display of progressive JPEG files, the
-decompressor is divided into two sections that can run independently:
-
-1. Data input includes marker parsing, entropy decoding, and input into the
-   coefficient controller's DCT coefficient buffer.  Note that this
-   processing is relatively cheap and fast.
-
-2. Data output reads from the DCT coefficient buffer and performs the IDCT
-   and all postprocessing steps.
-
-For a progressive JPEG file, the data input processing is allowed to get
-arbitrarily far ahead of the data output processing.  (This occurs only
-if the application calls jpeg_consume_input(); otherwise input and output
-run in lockstep, since the input section is called only when the output
-section needs more data.)  In this way the application can avoid making
-extra display passes when data is arriving faster than the display pass
-can run.  Furthermore, it is possible to abort an output pass without
-losing anything, since the coefficient buffer is read-only as far as the
-output section is concerned.  See libjpeg.doc for more detail.
-
-A full-image coefficient array is only created if the JPEG file has multiple
-scans (or if the application specifies buffered-image mode anyway).  When
-reading a single-scan file, the coefficient controller normally creates only
-a one-MCU buffer, so input and output processing must run in lockstep in this
-case.  jpeg_consume_input() is effectively a no-op in this situation.
-
-The main impact of dividing the decompressor in this fashion is that we must
-be very careful with shared variables in the cinfo data structure.  Each
-variable that can change during the course of decompression must be
-classified as belonging to data input or data output, and each section must
-look only at its own variables.  For example, the data output section may not
-depend on any of the variables that describe the current scan in the JPEG
-file, because these may change as the data input section advances into a new
-scan.
-
-The progress monitor is (somewhat arbitrarily) defined to treat input of the
-file as one pass when buffered-image mode is not used, and to ignore data
-input work completely when buffered-image mode is used.  Note that the
-library has no reliable way to predict the number of passes when dealing
-with a progressive JPEG file, nor can it predict the number of output passes
-in buffered-image mode.  So the work estimate is inherently bogus anyway.
-
-No comparable division is currently made in the compression library, because
-there isn't any real need for it.
-
-
-*** Data formats ***
-
-Arrays of pixel sample values use the following data structure:
-
-    typedef something JSAMPLE;		a pixel component value, 0..MAXJSAMPLE
-    typedef JSAMPLE *JSAMPROW;		ptr to a row of samples
-    typedef JSAMPROW *JSAMPARRAY;	ptr to a list of rows
-    typedef JSAMPARRAY *JSAMPIMAGE;	ptr to a list of color-component arrays
-
-The basic element type JSAMPLE will typically be one of unsigned char,
-(signed) char, or short.  Short will be used if samples wider than 8 bits are
-to be supported (this is a compile-time option).  Otherwise, unsigned char is
-used if possible.  If the compiler only supports signed chars, then it is
-necessary to mask off the value when reading.  Thus, all reads of JSAMPLE
-values must be coded as "GETJSAMPLE(value)", where the macro will be defined
-as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere.
-
-With these conventions, JSAMPLE values can be assumed to be >= 0.  This helps
-simplify correct rounding during downsampling, etc.  The JPEG standard's
-specification that sample values run from -128..127 is accommodated by
-subtracting 128 just as the sample value is copied into the source array for
-the DCT step (this will be an array of signed ints).  Similarly, during
-decompression the output of the IDCT step will be immediately shifted back to
-0..255.  (NB: different values are required when 12-bit samples are in use.
-The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be
-defined as 255 and 128 respectively in an 8-bit implementation, and as 4095
-and 2048 in a 12-bit implementation.)
-
-We use a pointer per row, rather than a two-dimensional JSAMPLE array.  This
-choice costs only a small amount of memory and has several benefits:
-* Code using the data structure doesn't need to know the allocated width of
-  the rows.  This simplifies edge expansion/compression, since we can work
-  in an array that's wider than the logical picture width.
-* Indexing doesn't require multiplication; this is a performance win on many
-  machines.
-* Arrays with more than 64K total elements can be supported even on machines
-  where malloc() cannot allocate chunks larger than 64K.
-* The rows forming a component array may be allocated at different times
-  without extra copying.  This trick allows some speedups in smoothing steps
-  that need access to the previous and next rows.
-
-Note that each color component is stored in a separate array; we don't use the
-traditional layout in which the components of a pixel are stored together.
-This simplifies coding of modules that work on each component independently,
-because they don't need to know how many components there are.  Furthermore,
-we can read or write each component to a temporary file independently, which
-is helpful when dealing with noninterleaved JPEG files.
-
-In general, a specific sample value is accessed by code such as
-	GETJSAMPLE(image[colorcomponent][row][col])
-where col is measured from the image left edge, but row is measured from the
-first sample row currently in memory.  Either of the first two indexings can
-be precomputed by copying the relevant pointer.
-
-
-Since most image-processing applications prefer to work on images in which
-the components of a pixel are stored together, the data passed to or from the
-surrounding application uses the traditional convention: a single pixel is
-represented by N consecutive JSAMPLE values, and an image row is an array of
-(# of color components)*(image width) JSAMPLEs.  One or more rows of data can
-be represented by a pointer of type JSAMPARRAY in this scheme.  This scheme is
-converted to component-wise storage inside the JPEG library.  (Applications
-that want to skip JPEG preprocessing or postprocessing will have to contend
-with component-wise storage.)
-
-
-Arrays of DCT-coefficient values use the following data structure:
-
-    typedef short JCOEF;		a 16-bit signed integer
-    typedef JCOEF JBLOCK[DCTSIZE2];	an 8x8 block of coefficients
-    typedef JBLOCK *JBLOCKROW;		ptr to one horizontal row of 8x8 blocks
-    typedef JBLOCKROW *JBLOCKARRAY;	ptr to a list of such rows
-    typedef JBLOCKARRAY *JBLOCKIMAGE;	ptr to a list of color component arrays
-
-The underlying type is at least a 16-bit signed integer; while "short" is big
-enough on all machines of interest, on some machines it is preferable to use
-"int" for speed reasons, despite the storage cost.  Coefficients are grouped
-into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than
-"8" and "64").
-
-The contents of a coefficient block may be in either "natural" or zigzagged
-order, and may be true values or divided by the quantization coefficients,
-depending on where the block is in the processing pipeline.  In the current
-library, coefficient blocks are kept in natural order everywhere; the entropy
-codecs zigzag or dezigzag the data as it is written or read.  The blocks
-contain quantized coefficients everywhere outside the DCT/IDCT subsystems.
-(This latter decision may need to be revisited to support variable
-quantization a la JPEG Part 3.)
-
-Notice that the allocation unit is now a row of 8x8 blocks, corresponding to
-eight rows of samples.  Otherwise the structure is much the same as for
-samples, and for the same reasons.
-
-On machines where malloc() can't handle a request bigger than 64Kb, this data
-structure limits us to rows of less than 512 JBLOCKs, or a picture width of
-4000+ pixels.  This seems an acceptable restriction.
-
-
-On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW)
-must be declared as "far" pointers, but the upper levels can be "near"
-(implying that the pointer lists are allocated in the DS segment).
-We use a #define symbol FAR, which expands to the "far" keyword when
-compiling on 80x86 machines and to nothing elsewhere.
-
-
-*** Suspendable processing ***
-
-In some applications it is desirable to use the JPEG library as an
-incremental, memory-to-memory filter.  In this situation the data source or
-destination may be a limited-size buffer, and we can't rely on being able to
-empty or refill the buffer at arbitrary times.  Instead the application would
-like to have control return from the library at buffer overflow/underrun, and
-then resume compression or decompression at a later time.
-
-This scenario is supported for simple cases.  (For anything more complex, we
-recommend that the application "bite the bullet" and develop real multitasking
-capability.)  The libjpeg.doc file goes into more detail about the usage and
-limitations of this capability; here we address the implications for library
-structure.
-
-The essence of the problem is that the entropy codec (coder or decoder) must
-be prepared to stop at arbitrary times.  In turn, the controllers that call
-the entropy codec must be able to stop before having produced or consumed all
-the data that they normally would handle in one call.  That part is reasonably
-straightforward: we make the controller call interfaces include "progress
-counters" which indicate the number of data chunks successfully processed, and
-we require callers to test the counter rather than just assume all of the data
-was processed.
-
-Rather than trying to restart at an arbitrary point, the current Huffman
-codecs are designed to restart at the beginning of the current MCU after a
-suspension due to buffer overflow/underrun.  At the start of each call, the
-codec's internal state is loaded from permanent storage (in the JPEG object
-structures) into local variables.  On successful completion of the MCU, the
-permanent state is updated.  (This copying is not very expensive, and may even
-lead to *improved* performance if the local variables can be registerized.)
-If a suspension occurs, the codec simply returns without updating the state,
-thus effectively reverting to the start of the MCU.  Note that this implies
-leaving some data unprocessed in the source/destination buffer (ie, the
-compressed partial MCU).  The data source/destination module interfaces are
-specified so as to make this possible.  This also implies that the data buffer
-must be large enough to hold a worst-case compressed MCU; a couple thousand
-bytes should be enough.
-
-In a successive-approximation AC refinement scan, the progressive Huffman
-decoder has to be able to undo assignments of newly nonzero coefficients if it
-suspends before the MCU is complete, since decoding requires distinguishing
-previously-zero and previously-nonzero coefficients.  This is a bit tedious
-but probably won't have much effect on performance.  Other variants of Huffman
-decoding need not worry about this, since they will just store the same values
-again if forced to repeat the MCU.
-
-This approach would probably not work for an arithmetic codec, since its
-modifiable state is quite large and couldn't be copied cheaply.  Instead it
-would have to suspend and resume exactly at the point of the buffer end.
-
-The JPEG marker reader is designed to cope with suspension at an arbitrary
-point.  It does so by backing up to the start of the marker parameter segment,
-so the data buffer must be big enough to hold the largest marker of interest.
-Again, a couple KB should be adequate.  (A special "skip" convention is used
-to bypass COM and APPn markers, so these can be larger than the buffer size
-without causing problems; otherwise a 64K buffer would be needed in the worst
-case.)
-
-The JPEG marker writer currently does *not* cope with suspension.  I feel that
-this is not necessary; it is much easier simply to require the application to
-ensure there is enough buffer space before starting.  (An empty 2K buffer is
-more than sufficient for the header markers; and ensuring there are a dozen or
-two bytes available before calling jpeg_finish_compress() will suffice for the
-trailer.)  This would not work for writing multi-scan JPEG files, but
-we simply do not intend to support that capability with suspension.
-
-
-*** Memory manager services ***
-
-The JPEG library's memory manager controls allocation and deallocation of
-memory, and it manages large "virtual" data arrays on machines where the
-operating system does not provide virtual memory.  Note that the same
-memory manager serves both compression and decompression operations.
-
-In all cases, allocated objects are tied to a particular compression or
-decompression master record, and they will be released when that master
-record is destroyed.
-
-The memory manager does not provide explicit deallocation of objects.
-Instead, objects are created in "pools" of free storage, and a whole pool
-can be freed at once.  This approach helps prevent storage-leak bugs, and
-it speeds up operations whenever malloc/free are slow (as they often are).
-The pools can be regarded as lifetime identifiers for objects.  Two
-pools/lifetimes are defined:
-  * JPOOL_PERMANENT	lasts until master record is destroyed
-  * JPOOL_IMAGE		lasts until done with image (JPEG datastream)
-Permanent lifetime is used for parameters and tables that should be carried
-across from one datastream to another; this includes all application-visible
-parameters.  Image lifetime is used for everything else.  (A third lifetime,
-JPOOL_PASS = one processing pass, was originally planned.  However it was
-dropped as not being worthwhile.  The actual usage patterns are such that the
-peak memory usage would be about the same anyway; and having per-pass storage
-substantially complicates the virtual memory allocation rules --- see below.)
-
-The memory manager deals with three kinds of object:
-1. "Small" objects.  Typically these require no more than 10K-20K total.
-2. "Large" objects.  These may require tens to hundreds of K depending on
-   image size.  Semantically they behave the same as small objects, but we
-   distinguish them for two reasons:
-     * On MS-DOS machines, large objects are referenced by FAR pointers,
-       small objects by NEAR pointers.
-     * Pool allocation heuristics may differ for large and small objects.
-   Note that individual "large" objects cannot exceed the size allowed by
-   type size_t, which may be 64K or less on some machines.
-3. "Virtual" objects.  These are large 2-D arrays of JSAMPLEs or JBLOCKs
-   (typically large enough for the entire image being processed).  The
-   memory manager provides stripwise access to these arrays.  On machines
-   without virtual memory, the rest of the array may be swapped out to a
-   temporary file.
-
-(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large
-objects for the data proper and small objects for the row pointers.  For
-convenience and speed, the memory manager provides single routines to create
-these structures.  Similarly, virtual arrays include a small control block
-and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.)
-
-In the present implementation, virtual arrays are only permitted to have image
-lifespan.  (Permanent lifespan would not be reasonable, and pass lifespan is
-not very useful since a virtual array's raison d'etre is to store data for
-multiple passes through the image.)  We also expect that only "small" objects
-will be given permanent lifespan, though this restriction is not required by
-the memory manager.
-
-In a non-virtual-memory machine, some performance benefit can be gained by
-making the in-memory buffers for virtual arrays be as large as possible.
-(For small images, the buffers might fit entirely in memory, so blind
-swapping would be very wasteful.)  The memory manager will adjust the height
-of the buffers to fit within a prespecified maximum memory usage.  In order
-to do this in a reasonably optimal fashion, the manager needs to allocate all
-of the virtual arrays at once.  Therefore, there isn't a one-step allocation
-routine for virtual arrays; instead, there is a "request" routine that simply
-allocates the control block, and a "realize" routine (called just once) that
-determines space allocation and creates all of the actual buffers.  The
-realize routine must allow for space occupied by non-virtual large objects.
-(We don't bother to factor in the space needed for small objects, on the
-grounds that it isn't worth the trouble.)
-
-To support all this, we establish the following protocol for doing business
-with the memory manager:
-  1. Modules must request virtual arrays (which may have only image lifespan)
-     during the initial setup phase, i.e., in their jinit_xxx routines.
-  2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
-     allocated during initial setup.
-  3. realize_virt_arrays will be called at the completion of initial setup.
-     The above conventions ensure that sufficient information is available
-     for it to choose a good size for virtual array buffers.
-Small objects of any lifespan may be allocated at any time.  We expect that
-the total space used for small objects will be small enough to be negligible
-in the realize_virt_arrays computation.
-
-In a virtual-memory machine, we simply pretend that the available space is
-infinite, thus causing realize_virt_arrays to decide that it can allocate all
-the virtual arrays as full-size in-memory buffers.  The overhead of the
-virtual-array access protocol is very small when no swapping occurs.
-
-A virtual array can be specified to be "pre-zeroed"; when this flag is set,
-never-yet-written sections of the array are set to zero before being made
-available to the caller.  If this flag is not set, never-written sections
-of the array contain garbage.  (This feature exists primarily because the
-equivalent logic would otherwise be needed in jdcoefct.c for progressive
-JPEG mode; we may as well make it available for possible other uses.)
-
-The first write pass on a virtual array is required to occur in top-to-bottom
-order; read passes, as well as any write passes after the first one, may
-access the array in any order.  This restriction exists partly to simplify
-the virtual array control logic, and partly because some file systems may not
-support seeking beyond the current end-of-file in a temporary file.  The main
-implication of this restriction is that rearrangement of rows (such as
-converting top-to-bottom data order to bottom-to-top) must be handled while
-reading data out of the virtual array, not while putting it in.
-
-
-*** Memory manager internal structure ***
-
-To isolate system dependencies as much as possible, we have broken the
-memory manager into two parts.  There is a reasonably system-independent
-"front end" (jmemmgr.c) and a "back end" that contains only the code
-likely to change across systems.  All of the memory management methods
-outlined above are implemented by the front end.  The back end provides
-the following routines for use by the front end (none of these routines
-are known to the rest of the JPEG code):
-
-jpeg_mem_init, jpeg_mem_term	system-dependent initialization/shutdown
-
-jpeg_get_small, jpeg_free_small	interface to malloc and free library routines
-				(or their equivalents)
-
-jpeg_get_large, jpeg_free_large	interface to FAR malloc/free in MSDOS machines;
-				else usually the same as
-				jpeg_get_small/jpeg_free_small
-
-jpeg_mem_available		estimate available memory
-
-jpeg_open_backing_store		create a backing-store object
-
-read_backing_store,		manipulate a backing-store object
-write_backing_store,
-close_backing_store
-
-On some systems there will be more than one type of backing-store object
-(specifically, in MS-DOS a backing store file might be an area of extended
-memory as well as a disk file).  jpeg_open_backing_store is responsible for
-choosing how to implement a given object.  The read/write/close routines
-are method pointers in the structure that describes a given object; this
-lets them be different for different object types.
-
-It may be necessary to ensure that backing store objects are explicitly
-released upon abnormal program termination.  For example, MS-DOS won't free
-extended memory by itself.  To support this, we will expect the main program
-or surrounding application to arrange to call self_destruct (typically via
-jpeg_destroy) upon abnormal termination.  This may require a SIGINT signal
-handler or equivalent.  We don't want to have the back end module install its
-own signal handler, because that would pre-empt the surrounding application's
-ability to control signal handling.
-
-The IJG distribution includes several memory manager back end implementations.
-Usually the same back end should be suitable for all applications on a given
-system, but it is possible for an application to supply its own back end at
-need.
-
-
-*** Implications of DNL marker ***
-
-Some JPEG files may use a DNL marker to postpone definition of the image
-height (this would be useful for a fax-like scanner's output, for instance).
-In these files the SOF marker claims the image height is 0, and you only
-find out the true image height at the end of the first scan.
-
-We could read these files as follows:
-1. Upon seeing zero image height, replace it by 65535 (the maximum allowed).
-2. When the DNL is found, update the image height in the global image
-   descriptor.
-This implies that control modules must avoid making copies of the image
-height, and must re-test for termination after each MCU row.  This would
-be easy enough to do.
-
-In cases where image-size data structures are allocated, this approach will
-result in very inefficient use of virtual memory or much-larger-than-necessary
-temporary files.  This seems acceptable for something that probably won't be a
-mainstream usage.  People might have to forgo use of memory-hogging options
-(such as two-pass color quantization or noninterleaved JPEG files) if they
-want efficient conversion of such files.  (One could improve efficiency by
-demanding a user-supplied upper bound for the height, less than 65536; in most
-cases it could be much less.)
-
-The standard also permits the SOF marker to overestimate the image height,
-with a DNL to give the true, smaller height at the end of the first scan.
-This would solve the space problems if the overestimate wasn't too great.
-However, it implies that you don't even know whether DNL will be used.
-
-This leads to a couple of very serious objections:
-1. Testing for a DNL marker must occur in the inner loop of the decompressor's
-   Huffman decoder; this implies a speed penalty whether the feature is used
-   or not.
-2. There is no way to hide the last-minute change in image height from an
-   application using the decoder.  Thus *every* application using the IJG
-   library would suffer a complexity penalty whether it cared about DNL or
-   not.
-We currently do not support DNL because of these problems.
-
-A different approach is to insist that DNL-using files be preprocessed by a
-separate program that reads ahead to the DNL, then goes back and fixes the SOF
-marker.  This is a much simpler solution and is probably far more efficient.
-Even if one wants piped input, buffering the first scan of the JPEG file needs
-a lot smaller temp file than is implied by the maximum-height method.  For
-this approach we'd simply treat DNL as a no-op in the decompressor (at most,
-check that it matches the SOF image height).
-
-We will not worry about making the compressor capable of outputting DNL.
-Something similar to the first scheme above could be applied if anyone ever
-wants to make that work.
diff --git a/tkimg1.3/libjpeg/tcl/ChangeLog b/tkimg1.3/libjpeg/tcl/ChangeLog
deleted file mode 100644
index e18e68e..0000000
--- a/tkimg1.3/libjpeg/tcl/ChangeLog
+++ /dev/null
@@ -1,10 +0,0 @@
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* Configure and build ok for all platforms available to me at AS.
-
-2002-11-14  Andreas Kupries  <andreask at activestate.com>
-
-	* Start of logging.
-
-	* libjpeg/tcl/: New directory, packaging of support library for
-	  tcl.
diff --git a/tkimg1.3/libjpeg/tcl/DANGER b/tkimg1.3/libjpeg/tcl/DANGER
deleted file mode 100644
index 6b9b787..0000000
--- a/tkimg1.3/libjpeg/tcl/DANGER
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Note:
-
-The EXTERN macro defined by "tcl.h" and the EXTERN() macro defined by
-"jmorecfg.h" are in conflict with each other. Even more, "jmorecfg.h"
-will not create its own definition if it encounters a previous
-definition.
-
-Special steps are taken in "jpegtcl*.[ch]" to allow interoperation.
-
-*	The tcl.h header comes first everywhere.
-
-*	In jpegtclDecls.h it is not possible to separate uses of the
-	two EXTERN macros. "tcl.h" is loaded first, then its EXTERN
-	definition disabled. Then we can load the jpeg
-	definition. After that we have to restore the EXTERN as
-	defined by "tcl.h" to satisfy the stub declarations.
diff --git a/tkimg1.3/libjpeg/tcl/Makefile.in b/tkimg1.3/libjpeg/tcl/Makefile.in
deleted file mode 100644
index a2715ed..0000000
--- a/tkimg1.3/libjpeg/tcl/Makefile.in
+++ /dev/null
@@ -1,543 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for jpegtcl TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 1999 Scriptics Corporation.
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.2 2007/01/03 22:22:24 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-jpegtcl_SOURCES	=		\
-		jpegtcl.c		\
-		jpegtclStubInit.c	\
-		jpegtclStubLib.c	\
-		$(jpeg_Sources)		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-jpeg_Sources	=					\
-	jcapimin.c	jcapistd.c	jccoefct.c	\
-	jccolor.c	jcdctmgr.c	jchuff.c	\
-	jcinit.c	jcmainct.c	jcmarker.c	\
-	jcmaster.c	jcomapi.c	jcparam.c	\
-	jcphuff.c	jcprepct.c	jcsample.c	\
-	jctrans.c	jdapimin.c	jdapistd.c	\
-	jdatadst.c	jdatasrc.c	jdcoefct.c	\
-	jdcolor.c	jddctmgr.c	jdhuff.c	\
-	jdinput.c	jdmainct.c	jdmarker.c	\
-	jdmaster.c	jdmerge.c	jdphuff.c	\
-	jdpostct.c	jdsample.c	jdtrans.c	\
-	jerror.c	jfdctflt.c	jfdctfst.c	\
-	jfdctint.c	jidctflt.c	jidctfst.c	\
-	jidctint.c	jidctred.c	jquant1.c	\
-	jquant2.c	jutils.c	jmemmgr.c	\
-	jmemansi.c
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "jpegtcl_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-jpegtcl_OBJECTS		= $(jpegtcl_SOURCES:.c=. at OBJEXT@)
-jpegtcl_LIB_FILE	= @jpegtcl_LIB_FILE@
-
-jpegtclstub_OBJECTS	= jpegtclStubLib.$(OBJEXT)
-jpegtclstub_LIB_FILE	= @jpegtclstub_LIB_FILE@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	$(srcdir)/jpegtcl.h		\
-			$(srcdir)/jpegtclDecls.h	\
-			$(srcdir)/jpegtclDeclsMask.h	\
-			$(srcdir)/jpegtclDeclsUnmask.h
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-INCLUDES	= -I$(srcdir) -I./libjpeg -I./libjpeg/libjpeg @TCL_INCLUDES@
-#INCLUDES	= -I$(srcdir) -I./libjpeg @TCL_INCLUDES@
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile jpegtclConfig.sh pkgIndex.tcl libjpeg
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(PACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-	@mkdir -p $(DESTDIR)$(includedir)
-	@echo "Installing header files in $(DESTDIR)$(includedir)"
-	@for i in $(GENERIC_HDRS) ; do \
-	    echo "Installing $$i" ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(TCLSH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo The support package "'jpegtcl'" cannot be tested separately.
-	@echo Test the package "'tkimg::jpeg'" to exercise its functionality.
-
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-#	$(testshell)	\
-#		-load 'load ./$(jpegtcl_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(jpegtcl_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(TCLSH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(TCLSH) $(SCRIPT)
-
-gdb:
-	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-	-rm -f $($(PACKAGE)stub_LIB_FILE)
-	${MAKE_STUB_LIB}
-	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# jpegtcl.$(OBJEXT): $(srcdir)/generic/jpegtcl.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/jpegtcl.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/..
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-	$(INSTALL_DATA) jpegtclConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/jpegtcl.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-jpegtcl_DECLS = \
-	$(srcdir)/jpegtcl.decls
-
-checkstubs:
-	- at for i in `nm -p $(jpegtcl_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(jpegtcl_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/libjpeg/tcl/README b/tkimg1.3/libjpeg/tcl/README
deleted file mode 100644
index 454b695..0000000
--- a/tkimg1.3/libjpeg/tcl/README
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Wrapping the jpeg support library for tcl is a bit more complicated
-than libz, or libpng.
-
-(1)	libjpeg comes with its own configure command, and there is no
-	configure.in. This means that it is not possible to lift the
-	relevant sections out of it for the configure of the
-	binding. Instead the binding run the configure of libjpeg
-	(AC_CONFIG_SUBDIRS) from its own configure and uses the
-	resulting header file (jconfig.h) as usual. A quirk is that
-	the tcl binding is a subdirectory of libjpeg, but to be able
-	to perform the previous operation its has to be the other way
-	around (AC_CONFIG_SUBDIRS is unable to handle '..'
-	correctly). To facility this I placed a symbolic link into the
-	directory of the binding, refering to the parent under the
-	name libjpeg.
-
-(2)	A second trouble spot is described in the file 'DANGER'.
diff --git a/tkimg1.3/libjpeg/tcl/aclocal.m4 b/tkimg1.3/libjpeg/tcl/aclocal.m4
deleted file mode 100644
index 0b05739..0000000
--- a/tkimg1.3/libjpeg/tcl/aclocal.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/libjpeg/tcl/configure b/tkimg1.3/libjpeg/tcl/configure
deleted file mode 100755
index 3d0d707..0000000
--- a/tkimg1.3/libjpeg/tcl/configure
+++ /dev/null
@@ -1,5663 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'jpegtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./jpegtcl.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=jpegtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=0
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-JPEGTCL_VERSION=${VERSION}
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define JPEGTCL_VERSION "${JPEGTCL_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1436: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1448: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1517: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1591: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-JPEG_CFLAGS="$CFLAGS"
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1684: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1689 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1717: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1722 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1746: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1778 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1795 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1835: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1865: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1916: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1948: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1959 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1995: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2023: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2062: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2066 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2098: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2156: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2190: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2223: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2249: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2286: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2308 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2343 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2358 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2396: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2402 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2421 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2452: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2458 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2487: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2493 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2522: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2528 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2561: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2563 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2610: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2615 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2647: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2684: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2689 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2721: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2726 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2758: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2763 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2791 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2805 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2819 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2840: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2845 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2887 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:2913: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2918 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2950: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2955 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2992: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2997 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3032: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3037 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3082: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3087 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-JPEG_CC=$CC
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3146: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_jpegtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_jpegtcl 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3271: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3279 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3319: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3327 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3366: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3374 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3411: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3419 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3453: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3461 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3512: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3517 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3568: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3573 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3626: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:3664: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:3710: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:3724: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:3745: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3774: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3782 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3837: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:3994: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4002 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4095: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4103 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4179: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4187 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4318: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4323 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4385: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4390 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4450: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4455 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4487: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4489 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:4824: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 4827 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:4880: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 4882 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:4900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:4918: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 4920 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:4938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:4956: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4958 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5100: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:5247: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    #--------------------------------------------------------------------
-    # These are for jpegtclConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/jpegtcl${VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval jpegtcl_LIB_FLAG="-ljpegtcl${VERSION}${DBGX}"
-    else
-	eval jpegtcl_LIB_FLAG="-ljpegtcl`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    jpegtcl_BUILD_LIB_SPEC="-L`pwd` ${jpegtcl_LIB_FLAG}"
-    jpegtcl_LIB_SPEC="-L${pkglibdir} ${jpegtcl_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval jpegtcl_STUB_LIB_FLAG="-ljpegtclstub${VERSION}${DBGX}"
-    else
-	eval jpegtcl_STUB_LIB_FLAG="-ljpegtclstub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    jpegtcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${jpegtcl_STUB_LIB_FLAG}"
-    jpegtcl_STUB_LIB_SPEC="-L${pkglibdir} ${jpegtcl_STUB_LIB_FLAG}"
-    jpegtcl_BUILD_STUB_LIB_PATH="`pwd`/${jpegtclstub_LIB_FILE}"
-    jpegtcl_STUB_LIB_PATH="${pkglibdir}/${jpegtclstub_LIB_FILE}"
-
-    
-    
-    
-    
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# We call the configure for the jpeg code on our own, without using
-# AC_CONFIG_SUBDIR ... Using that requires a symlink, thus making setup
-# difficult, and the transfer information ot it is busted, due to how
-# TEA handles CFLAGS.
-#--------------------------------------------------------------------
-
-case "$srcdir" in
-.) # No --srcdir option.  We are building in place.
-  jpegdir=$srcdir/.. ;;
-/*) # Absolute path.
-  jpegdir=$srcdir/.. ;;
-*) # Relative path.
-  jpegdir=../$ac_dots$srcdir/.. ;;
-esac
-
-mkdir libjpeg
-cd    libjpeg
- env CC="$JPEG_CC" CFLAGS="$JPEG_CFLAGS" $jpegdir/configure --prefix ${TCL_PREFIX} --with-tcl=${TCL_BIN_DIR} --with-tk=${TK_BIN_DIR}
-cd ..
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl jpegtclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@JPEGTCL_VERSION@%$JPEGTCL_VERSION%g
-s%@jpegtcl_LIB_FILE@%$jpegtcl_LIB_FILE%g
-s%@jpegtclstub_LIB_FILE@%$jpegtclstub_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@jpegtcl_BUILD_LIB_SPEC@%$jpegtcl_BUILD_LIB_SPEC%g
-s%@jpegtcl_LIB_SPEC@%$jpegtcl_LIB_SPEC%g
-s%@jpegtcl_BUILD_STUB_LIB_SPEC@%$jpegtcl_BUILD_STUB_LIB_SPEC%g
-s%@jpegtcl_STUB_LIB_SPEC@%$jpegtcl_STUB_LIB_SPEC%g
-s%@jpegtcl_BUILD_STUB_LIB_PATH@%$jpegtcl_BUILD_STUB_LIB_PATH%g
-s%@jpegtcl_STUB_LIB_PATH@%$jpegtcl_STUB_LIB_PATH%g
-s%@MAJOR_VERSION@%$MAJOR_VERSION%g
-s%@MINOR_VERSION@%$MINOR_VERSION%g
-s%@PATCHLEVEL@%$PATCHLEVEL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl jpegtclConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libjpeg/tcl/configure.in b/tkimg1.3/libjpeg/tcl/configure.in
deleted file mode 100644
index 0fffc44..0000000
--- a/tkimg1.3/libjpeg/tcl/configure.in
+++ /dev/null
@@ -1,220 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'jpegtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./jpegtcl.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=jpegtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=0
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-JPEGTCL_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(JPEGTCL_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(jpegtcl_LIB_FILE)
-AC_SUBST(jpegtclstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(JPEGTCL_VERSION, "${JPEGTCL_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-JPEG_CFLAGS="$CFLAGS"
-TEA_SETUP_COMPILER
-JPEG_CC=$CC
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_jpegtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_jpegtcl)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_EXPORT_CONFIG(jpegtcl)
-
-#--------------------------------------------------------------------
-# We call the configure for the jpeg code on our own, without using
-# AC_CONFIG_SUBDIR ... Using that requires a symlink, thus making setup
-# difficult, and the transfer information ot it is busted, due to how
-# TEA handles CFLAGS.
-#--------------------------------------------------------------------
-
-case "$srcdir" in
-.) # No --srcdir option.  We are building in place.
-  jpegdir=$srcdir/.. ;;
-/*) # Absolute path.
-  jpegdir=$srcdir/.. ;;
-*) # Relative path.
-  jpegdir=../$ac_dots$srcdir/.. ;;
-esac
-
-mkdir libjpeg
-cd    libjpeg
-env CC="$JPEG_CC" CFLAGS="$JPEG_CFLAGS" $jpegdir/configure
-cd ..
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl jpegtclConfig.sh])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libjpeg/tcl/jerror.h b/tkimg1.3/libjpeg/tcl/jerror.h
deleted file mode 100644
index 5c506d5..0000000
--- a/tkimg1.3/libjpeg/tcl/jerror.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
- * Redirect the zlib definitions through the stub definitions of the
- * binding. A wrapper for a support library using zlib has to use this
- * header to ensure usage of the stub macros during the compilation of
- * the support library itself. In this way we avoid the need for
- * changing the original sources.
- *
- * This header has to be avoided when building the libz wrapper itself.
- */
-
-#include "jpegtclDecls.h"
diff --git a/tkimg1.3/libjpeg/tcl/jpeglib.h b/tkimg1.3/libjpeg/tcl/jpeglib.h
deleted file mode 100644
index 5c506d5..0000000
--- a/tkimg1.3/libjpeg/tcl/jpeglib.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
- * Redirect the zlib definitions through the stub definitions of the
- * binding. A wrapper for a support library using zlib has to use this
- * header to ensure usage of the stub macros during the compilation of
- * the support library itself. In this way we avoid the need for
- * changing the original sources.
- *
- * This header has to be avoided when building the libz wrapper itself.
- */
-
-#include "jpegtclDecls.h"
diff --git a/tkimg1.3/libjpeg/tcl/jpegtcl.c b/tkimg1.3/libjpeg/tcl/jpegtcl.c
deleted file mode 100644
index d29ef89..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtcl.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * jpegtcl.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: jpegtcl.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- */
-
-#include "tcl.h"
-#include "jpegtcl.h"
-
-#define TCL_DOES_STUBS \
-    (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
-    (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
-
-/*
- * Declarations for externally visible functions.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_jpegtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_JPEGTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-EXTERN int Jpegtcl_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Jpegtcl_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-/*
- *----------------------------------------------------------------------------
- *
- * Jpegtcl_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Jpegtcl_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-#if TCL_DOES_STUBS
-  extern JpegtclStubs jpegtclStubs;
-#endif
-
-#ifdef USE_TCL_STUBS
-  if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-    return TCL_ERROR;
-  }
-#endif
-
-#if TCL_DOES_STUBS
-  if (Tcl_PkgProvideEx(interp, PACKAGE_NAME, JPEGTCL_VERSION,
-		       (ClientData) &jpegtclStubs) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#else
-  if (Tcl_PkgProvide(interp, PACKAGE_NAME, JPEGTCL_VERSION) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#endif
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Jpegtcl_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Jpegtcl_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Jpegtcl_Init(interp);
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Jpegtcl_XXX --
- *
- *  Wrappers around the zlib functionality.
- *
- * Results:
- *  Depends on function.
- *
- * Side effects:
- *  Depends on function.
- *
- *----------------------------------------------------------------------------
- */
-
-/*
- * No wrappers are required. Due to intelligent definition of the stub
- * table using the function names of the libz sources the stub table
- * contains jumps to the actual functionality.
- */
diff --git a/tkimg1.3/libjpeg/tcl/jpegtcl.decls b/tkimg1.3/libjpeg/tcl/jpegtcl.decls
deleted file mode 100644
index e382b7f..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtcl.decls
+++ /dev/null
@@ -1,179 +0,0 @@
-# jpegtcl.decls -- -*- tcl -*-
-#
-# This file contains the declarations for all supported public functions
-# that are exported by the JPEGTCL library via the stubs table. This file
-# is used to generate the jpegtclDecls.h/jpegtclStubsLib.c/jpegtclStubsInit.c
-# files.
-#	
-
-# Declare each of the functions in the public BLT interface.  Note that
-# the an index should never be reused for a different function in order
-# to preserve backwards compatibility.
-
-library jpegtcl
-
-# Define the JPEGTCL interface:
-
-interface jpegtcl
-#hooks {}
-
-#########################################################################
-###  JPEG interface
-
-declare 0 generic {
-    struct jpeg_error_mgr * jpeg_std_error (struct jpeg_error_mgr * err)
-}
-declare 1 generic {
-    void jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
-}
-declare 2 generic {
-    void jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
-}
-declare 3 generic {
-    void jpeg_destroy_compress (j_compress_ptr cinfo)
-}
-declare 4 generic {
-    void jpeg_destroy_decompress (j_decompress_ptr cinfo)
-}
-declare 5 generic {
-    void jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
-}
-declare 6 generic {
-    void jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
-}
-declare 7 generic {
-    void jpeg_set_defaults (j_compress_ptr cinfo)
-}
-declare 8 generic {
-    void jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
-}
-declare 9 generic {
-    void jpeg_default_colorspace (j_compress_ptr cinfo)
-}
-declare 10 generic {
-    void jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
-}
-declare 11 generic {
-    void jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
-	boolean force_baseline)
-}
-declare 12 generic {
-    void jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
-	const unsigned int *basic_table, int scale_factor, boolean force_baseline)
-}
-declare 13 generic {
-    int jpeg_quality_scaling (int quality)
-}
-declare 14 generic {
-    void jpeg_simple_progression (j_compress_ptr cinfo)
-}
-declare 15 generic {
-    void jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
-}
-declare 16 generic {
-    JQUANT_TBL * jpeg_alloc_quant_table (j_common_ptr cinfo)
-}
-declare 17 generic {
-    JHUFF_TBL * jpeg_alloc_huff_table (j_common_ptr cinfo)
-}
-declare 18 generic {
-    void jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
-}
-declare 19 generic {
-    JDIMENSION jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
-	JDIMENSION num_lines)
-}
-declare 20 generic {
-    void jpeg_finish_compress (j_compress_ptr cinfo)
-}
-declare 21 generic {
-    JDIMENSION jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
-	JDIMENSION num_lines)
-}
-declare 22 generic {
-    void jpeg_write_marker (j_compress_ptr cinfo, int marker,
-	const JOCTET * dataptr, unsigned int datalen)
-}
-declare 23 generic {
-    void jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
-}
-declare 24 generic {
-    void jpeg_write_m_byte (j_compress_ptr cinfo, int val)
-}
-declare 25 generic {
-    void jpeg_write_tables (j_compress_ptr cinfo)
-}
-declare 26 generic {
-    int jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
-}
-declare 27 generic {
-    boolean jpeg_start_decompress (j_decompress_ptr cinfo)
-}
-declare 28 generic {
-    JDIMENSION jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines,
-	JDIMENSION max_lines)
-}
-declare 29 generic {
-    boolean jpeg_finish_decompress (j_decompress_ptr cinfo)
-}
-declare 30 generic {
-    JDIMENSION jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
-	JDIMENSION max_lines)
-}
-declare 31 generic {
-    boolean jpeg_has_multiple_scans (j_decompress_ptr cinfo)
-}
-declare 32 generic {
-    boolean jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
-}
-declare 33 generic {
-    boolean jpeg_finish_output (j_decompress_ptr cinfo)
-}
-declare 34 generic {
-    boolean jpeg_input_complete (j_decompress_ptr cinfo)
-}
-declare 35 generic {
-    void jpeg_new_colormap (j_decompress_ptr cinfo)
-}
-declare 36 generic {
-    int jpeg_consume_input (j_decompress_ptr cinfo)
-}
-declare 37 generic {
-    void jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
-}
-declare 38 generic {
-    void jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
-	unsigned int length_limit)
-}
-declare 39 generic {
-    void jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code,
-	jpeg_marker_parser_method routine)
-}
-declare 40 generic {
-    jvirt_barray_ptr * jpeg_read_coefficients (j_decompress_ptr cinfo)
-}
-declare 41 generic {
-    void jpeg_write_coefficients (j_compress_ptr cinfo,
-	jvirt_barray_ptr * coef_arrays)
-}
-declare 42 generic {
-    void jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
-	j_compress_ptr dstinfo)
-}
-declare 43 generic {
-    void jpeg_abort_compress (j_compress_ptr cinfo)
-}
-declare 44 generic {
-    void jpeg_abort_decompress (j_decompress_ptr cinfo)
-}
-declare 45 generic {
-    void jpeg_abort (j_common_ptr cinfo)
-}
-declare 46 generic {
-    void jpeg_destroy (j_common_ptr cinfo)
-}
-declare 47 generic {
-    boolean jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
-}
-
-#########################################################################
diff --git a/tkimg1.3/libjpeg/tcl/jpegtcl.h b/tkimg1.3/libjpeg/tcl/jpegtcl.h
deleted file mode 100644
index 62242a6..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtcl.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * jpegtcl.h --
- *
- *	Interface to libjpeg.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: jpegtcl.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- */
-
-#ifndef __JPEGTCL_H__
-#define __JPEGTCL_H__
-
-#include <stdio.h>
-#include "tcl.h"
-
-#define JPEGTCL_MAJOR_VERSION	1
-#define JPEGTCL_MINOR_VERSION	0
-#define JPEGTCL_RELEASE_LEVEL	TCL_RELEASE
-#define JPEGTCL_RELEASE_SERIAL	0
-
-#define JPEGTCL_VERSION		"1.0"
-#define JPEGTCL_PATCH_LEVEL	"1.0"
-
-/*
- * Used to block the rest of this header file from resource compilers so
- * we can just get the version info.
- */
-#ifndef RC_INVOKED
-
-/* TIP 27 update. If CONST84 is not defined we are compiling against a
- * core before 8.4 and have to disable some CONST'ness.
- */
-
-#ifndef CONST84
-#   define CONST84
-#endif
-
-/*
- * Fix the Borland bug that's in the EXTERN macro from tcl.h.
- */
-#ifndef TCL_EXTERN
-#   undef DLLIMPORT
-#   undef DLLEXPORT
-#   if defined(STATIC_BUILD)
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
-#	define DLLIMPORT __declspec(dllimport)
-#	define DLLEXPORT __declspec(dllexport)
-#   elif defined(__BORLANDC__)
-#	define OLDBORLAND 1
-#	define DLLIMPORT __import
-#	define DLLEXPORT __export
-#   else
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   endif
-    /* Avoid name mangling from C++ compilers. */
-#   ifdef __cplusplus
-#	define TCL_EXTRNC extern "C"
-#   else
-#	define TCL_EXTRNC extern
-#   endif
-    /* Pre-5.5 Borland requires the attributes be placed after the */
-    /* return type. */
-#   ifdef OLDBORLAND
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
-#   else
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
-#   endif
-#endif
-
-
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_jpegtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_JPEGTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * C API for Jpegtcl generic layer
- *----------------------------------------------------------------------------
- */
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for publically accessible routines
- *----------------------------------------------------------------------------
- */
-
-#include "jpegtclDecls.h"
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for stub initialization.
- *----------------------------------------------------------------------------
- */
-
-#ifdef USE_JPEGTCL_STUBS
-EXTERN CONST char *
-Jpegtcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
-#else
-
-/*
- * When not using stubs, make it a macro.
- */
-
-#define Jpegtcl_InitStubs(interp, version, exact) \
-    Tcl_PkgRequire(interp, "jpegtcl", version, exact)
-#endif
-
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* RC_INVOKED */
-#endif /* __JPEGTCL_H__ */
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclConfig.sh.in b/tkimg1.3/libjpeg/tcl/jpegtclConfig.sh.in
deleted file mode 100644
index 6e0138d..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclConfig.sh.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# jpegtclConfig.sh --
-# 
-# This shell script (for sh) is generated automatically by jpegtcl's
-# configure script.  It will create shell variables for most of
-# the configuration options discovered by the configure script.
-# This script is intended to be included by the configure scripts
-# for jpegtcl extensions so that they don't have to figure this all
-# out for themselves.  This file does not duplicate information
-# already provided by tclConfig.sh, so you may need to use that
-# file in addition to this one.
-#
-# The information in this file is specific to a single platform.
-
-# jpegtcl's version number.
-jpegtcl_VERSION='@VERSION@'
-jpegtcl_MAJOR_VERSION='@MAJOR_VERSION@'
-jpegtcl_MINOR_VERSION='@MINOR_VERSION@'
-jpegtcl_RELEASE_LEVEL='@PATCHLEVEL@'
-
-# The name of the jpegtcl library (may be either a .a file or a shared library):
-jpegtcl_LIB_FILE=@jpegtcl_LIB_FILE@
-
-# String to pass to linker to pick up the jpegtcl library from its
-# build directory.
-jpegtcl_BUILD_LIB_SPEC='@jpegtcl_BUILD_LIB_SPEC@'
-
-# String to pass to linker to pick up the jpegtcl library from its
-# installed directory.
-jpegtcl_LIB_SPEC='@jpegtcl_LIB_SPEC@'
-
-# The name of the jpegtcl stub library (a .a file):
-jpegtcl_STUB_LIB_FILE=@jpegtclstub_LIB_FILE@
-
-# String to pass to linker to pick up the jpegtcl stub library from its
-# build directory.
-jpegtcl_BUILD_STUB_LIB_SPEC='@jpegtcl_BUILD_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the jpegtcl stub library from its
-# installed directory.
-jpegtcl_STUB_LIB_SPEC='@jpegtcl_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the jpegtcl stub library from its
-# build directory.
-jpegtcl_BUILD_STUB_LIB_PATH='@jpegtcl_BUILD_STUB_LIB_PATH@'
-
-# String to pass to linker to pick up the jpegtcl stub library from its
-# installed directory.
-jpegtcl_STUB_LIB_PATH='@jpegtcl_STUB_LIB_PATH@'
-
-# Location of the top-level source directories from which jpegtcl
-# was built.  This is the directory that contains generic, unix, etc.
-# If jpegtcl was compiled in a different place than the directory
-# containing the source files, this points to the location of the
-# sources, not the location where jpegtcl was compiled. This can
-# be relative to the build directory.
-
-jpegtcl_SRC_DIR='@srcdir@'
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclDecls.h b/tkimg1.3/libjpeg/tcl/jpegtclDecls.h
deleted file mode 100644
index cf7d5e8..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclDecls.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * jpegtclDecls.h --
- *
- *	Declarations of functions in the platform independent public JPEGTCL API.
- *
- */
-
-#ifndef _JPEGTCLDECLS
-#define _JPEGTCLDECLS
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the jpegtcl.decls script.
- */
-
-#include <tcl.h>
-
-/* undef Tcl macros that conflict with libjpeg stuff (sigh) */
-#undef EXTERN
-
-#include <jpegtclDeclsMask.h>
-#include <../jpeglib.h>
-#include <../jerror.h>
-#include <jpegtclDeclsUnmask.h>
-
-/*
- * And recreate the definition of "tcl.h", we need it below.
- */
-
-#undef EXTERN
-#ifdef __cplusplus
-#   define EXTERN extern "C" TCL_STORAGE_CLASS
-#else
-#   define EXTERN extern TCL_STORAGE_CLASS
-#endif
-
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-/* 0 */
-EXTERN struct jpeg_error_mgr * jpeg_std_error _ANSI_ARGS_((
-				struct jpeg_error_mgr * err));
-/* 1 */
-EXTERN void		jpeg_CreateCompress _ANSI_ARGS_((
-				j_compress_ptr cinfo, int version, 
-				size_t structsize));
-/* 2 */
-EXTERN void		jpeg_CreateDecompress _ANSI_ARGS_((
-				j_decompress_ptr cinfo, int version, 
-				size_t structsize));
-/* 3 */
-EXTERN void		jpeg_destroy_compress _ANSI_ARGS_((
-				j_compress_ptr cinfo));
-/* 4 */
-EXTERN void		jpeg_destroy_decompress _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 5 */
-EXTERN void		jpeg_stdio_dest _ANSI_ARGS_((j_compress_ptr cinfo, 
-				FILE * outfile));
-/* 6 */
-EXTERN void		jpeg_stdio_src _ANSI_ARGS_((j_decompress_ptr cinfo, 
-				FILE * infile));
-/* 7 */
-EXTERN void		jpeg_set_defaults _ANSI_ARGS_((j_compress_ptr cinfo));
-/* 8 */
-EXTERN void		jpeg_set_colorspace _ANSI_ARGS_((
-				j_compress_ptr cinfo, 
-				J_COLOR_SPACE colorspace));
-/* 9 */
-EXTERN void		jpeg_default_colorspace _ANSI_ARGS_((
-				j_compress_ptr cinfo));
-/* 10 */
-EXTERN void		jpeg_set_quality _ANSI_ARGS_((j_compress_ptr cinfo, 
-				int quality, boolean force_baseline));
-/* 11 */
-EXTERN void		jpeg_set_linear_quality _ANSI_ARGS_((
-				j_compress_ptr cinfo, int scale_factor, 
-				boolean force_baseline));
-/* 12 */
-EXTERN void		jpeg_add_quant_table _ANSI_ARGS_((
-				j_compress_ptr cinfo, int which_tbl, 
-				const unsigned int * basic_table, 
-				int scale_factor, boolean force_baseline));
-/* 13 */
-EXTERN int		jpeg_quality_scaling _ANSI_ARGS_((int quality));
-/* 14 */
-EXTERN void		jpeg_simple_progression _ANSI_ARGS_((
-				j_compress_ptr cinfo));
-/* 15 */
-EXTERN void		jpeg_suppress_tables _ANSI_ARGS_((
-				j_compress_ptr cinfo, boolean suppress));
-/* 16 */
-EXTERN JQUANT_TBL *	jpeg_alloc_quant_table _ANSI_ARGS_((
-				j_common_ptr cinfo));
-/* 17 */
-EXTERN JHUFF_TBL *	jpeg_alloc_huff_table _ANSI_ARGS_((
-				j_common_ptr cinfo));
-/* 18 */
-EXTERN void		jpeg_start_compress _ANSI_ARGS_((
-				j_compress_ptr cinfo, 
-				boolean write_all_tables));
-/* 19 */
-EXTERN JDIMENSION	jpeg_write_scanlines _ANSI_ARGS_((
-				j_compress_ptr cinfo, JSAMPARRAY scanlines, 
-				JDIMENSION num_lines));
-/* 20 */
-EXTERN void		jpeg_finish_compress _ANSI_ARGS_((
-				j_compress_ptr cinfo));
-/* 21 */
-EXTERN JDIMENSION	jpeg_write_raw_data _ANSI_ARGS_((
-				j_compress_ptr cinfo, JSAMPIMAGE data, 
-				JDIMENSION num_lines));
-/* 22 */
-EXTERN void		jpeg_write_marker _ANSI_ARGS_((j_compress_ptr cinfo, 
-				int marker, const JOCTET * dataptr, 
-				unsigned int datalen));
-/* 23 */
-EXTERN void		jpeg_write_m_header _ANSI_ARGS_((
-				j_compress_ptr cinfo, int marker, 
-				unsigned int datalen));
-/* 24 */
-EXTERN void		jpeg_write_m_byte _ANSI_ARGS_((j_compress_ptr cinfo, 
-				int val));
-/* 25 */
-EXTERN void		jpeg_write_tables _ANSI_ARGS_((j_compress_ptr cinfo));
-/* 26 */
-EXTERN int		jpeg_read_header _ANSI_ARGS_((j_decompress_ptr cinfo, 
-				boolean require_image));
-/* 27 */
-EXTERN boolean		jpeg_start_decompress _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 28 */
-EXTERN JDIMENSION	jpeg_read_scanlines _ANSI_ARGS_((
-				j_decompress_ptr cinfo, JSAMPARRAY scanlines, 
-				JDIMENSION max_lines));
-/* 29 */
-EXTERN boolean		jpeg_finish_decompress _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 30 */
-EXTERN JDIMENSION	jpeg_read_raw_data _ANSI_ARGS_((
-				j_decompress_ptr cinfo, JSAMPIMAGE data, 
-				JDIMENSION max_lines));
-/* 31 */
-EXTERN boolean		jpeg_has_multiple_scans _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 32 */
-EXTERN boolean		jpeg_start_output _ANSI_ARGS_((
-				j_decompress_ptr cinfo, int scan_number));
-/* 33 */
-EXTERN boolean		jpeg_finish_output _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 34 */
-EXTERN boolean		jpeg_input_complete _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 35 */
-EXTERN void		jpeg_new_colormap _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 36 */
-EXTERN int		jpeg_consume_input _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 37 */
-EXTERN void		jpeg_calc_output_dimensions _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 38 */
-EXTERN void		jpeg_save_markers _ANSI_ARGS_((
-				j_decompress_ptr cinfo, int marker_code, 
-				unsigned int length_limit));
-/* 39 */
-EXTERN void		jpeg_set_marker_processor _ANSI_ARGS_((
-				j_decompress_ptr cinfo, int marker_code, 
-				jpeg_marker_parser_method routine));
-/* 40 */
-EXTERN jvirt_barray_ptr * jpeg_read_coefficients _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 41 */
-EXTERN void		jpeg_write_coefficients _ANSI_ARGS_((
-				j_compress_ptr cinfo, 
-				jvirt_barray_ptr * coef_arrays));
-/* 42 */
-EXTERN void		jpeg_copy_critical_parameters _ANSI_ARGS_((
-				j_decompress_ptr srcinfo, 
-				j_compress_ptr dstinfo));
-/* 43 */
-EXTERN void		jpeg_abort_compress _ANSI_ARGS_((
-				j_compress_ptr cinfo));
-/* 44 */
-EXTERN void		jpeg_abort_decompress _ANSI_ARGS_((
-				j_decompress_ptr cinfo));
-/* 45 */
-EXTERN void		jpeg_abort _ANSI_ARGS_((j_common_ptr cinfo));
-/* 46 */
-EXTERN void		jpeg_destroy _ANSI_ARGS_((j_common_ptr cinfo));
-/* 47 */
-EXTERN boolean		jpeg_resync_to_restart _ANSI_ARGS_((
-				j_decompress_ptr cinfo, int desired));
-
-typedef struct JpegtclStubs {
-    int magic;
-    struct JpegtclStubHooks *hooks;
-
-    struct jpeg_error_mgr * (*jpeg_std_error) _ANSI_ARGS_((struct jpeg_error_mgr * err)); /* 0 */
-    void (*jpeg_CreateCompress) _ANSI_ARGS_((j_compress_ptr cinfo, int version, size_t structsize)); /* 1 */
-    void (*jpeg_CreateDecompress) _ANSI_ARGS_((j_decompress_ptr cinfo, int version, size_t structsize)); /* 2 */
-    void (*jpeg_destroy_compress) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 3 */
-    void (*jpeg_destroy_decompress) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 4 */
-    void (*jpeg_stdio_dest) _ANSI_ARGS_((j_compress_ptr cinfo, FILE * outfile)); /* 5 */
-    void (*jpeg_stdio_src) _ANSI_ARGS_((j_decompress_ptr cinfo, FILE * infile)); /* 6 */
-    void (*jpeg_set_defaults) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 7 */
-    void (*jpeg_set_colorspace) _ANSI_ARGS_((j_compress_ptr cinfo, J_COLOR_SPACE colorspace)); /* 8 */
-    void (*jpeg_default_colorspace) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 9 */
-    void (*jpeg_set_quality) _ANSI_ARGS_((j_compress_ptr cinfo, int quality, boolean force_baseline)); /* 10 */
-    void (*jpeg_set_linear_quality) _ANSI_ARGS_((j_compress_ptr cinfo, int scale_factor, boolean force_baseline)); /* 11 */
-    void (*jpeg_add_quant_table) _ANSI_ARGS_((j_compress_ptr cinfo, int which_tbl, const unsigned int * basic_table, int scale_factor, boolean force_baseline)); /* 12 */
-    int (*jpeg_quality_scaling) _ANSI_ARGS_((int quality)); /* 13 */
-    void (*jpeg_simple_progression) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 14 */
-    void (*jpeg_suppress_tables) _ANSI_ARGS_((j_compress_ptr cinfo, boolean suppress)); /* 15 */
-    JQUANT_TBL * (*jpeg_alloc_quant_table) _ANSI_ARGS_((j_common_ptr cinfo)); /* 16 */
-    JHUFF_TBL * (*jpeg_alloc_huff_table) _ANSI_ARGS_((j_common_ptr cinfo)); /* 17 */
-    void (*jpeg_start_compress) _ANSI_ARGS_((j_compress_ptr cinfo, boolean write_all_tables)); /* 18 */
-    JDIMENSION (*jpeg_write_scanlines) _ANSI_ARGS_((j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines)); /* 19 */
-    void (*jpeg_finish_compress) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 20 */
-    JDIMENSION (*jpeg_write_raw_data) _ANSI_ARGS_((j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines)); /* 21 */
-    void (*jpeg_write_marker) _ANSI_ARGS_((j_compress_ptr cinfo, int marker, const JOCTET * dataptr, unsigned int datalen)); /* 22 */
-    void (*jpeg_write_m_header) _ANSI_ARGS_((j_compress_ptr cinfo, int marker, unsigned int datalen)); /* 23 */
-    void (*jpeg_write_m_byte) _ANSI_ARGS_((j_compress_ptr cinfo, int val)); /* 24 */
-    void (*jpeg_write_tables) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 25 */
-    int (*jpeg_read_header) _ANSI_ARGS_((j_decompress_ptr cinfo, boolean require_image)); /* 26 */
-    boolean (*jpeg_start_decompress) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 27 */
-    JDIMENSION (*jpeg_read_scanlines) _ANSI_ARGS_((j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines)); /* 28 */
-    boolean (*jpeg_finish_decompress) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 29 */
-    JDIMENSION (*jpeg_read_raw_data) _ANSI_ARGS_((j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines)); /* 30 */
-    boolean (*jpeg_has_multiple_scans) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 31 */
-    boolean (*jpeg_start_output) _ANSI_ARGS_((j_decompress_ptr cinfo, int scan_number)); /* 32 */
-    boolean (*jpeg_finish_output) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 33 */
-    boolean (*jpeg_input_complete) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 34 */
-    void (*jpeg_new_colormap) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 35 */
-    int (*jpeg_consume_input) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 36 */
-    void (*jpeg_calc_output_dimensions) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 37 */
-    void (*jpeg_save_markers) _ANSI_ARGS_((j_decompress_ptr cinfo, int marker_code, unsigned int length_limit)); /* 38 */
-    void (*jpeg_set_marker_processor) _ANSI_ARGS_((j_decompress_ptr cinfo, int marker_code, jpeg_marker_parser_method routine)); /* 39 */
-    jvirt_barray_ptr * (*jpeg_read_coefficients) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 40 */
-    void (*jpeg_write_coefficients) _ANSI_ARGS_((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); /* 41 */
-    void (*jpeg_copy_critical_parameters) _ANSI_ARGS_((j_decompress_ptr srcinfo, j_compress_ptr dstinfo)); /* 42 */
-    void (*jpeg_abort_compress) _ANSI_ARGS_((j_compress_ptr cinfo)); /* 43 */
-    void (*jpeg_abort_decompress) _ANSI_ARGS_((j_decompress_ptr cinfo)); /* 44 */
-    void (*jpeg_abort) _ANSI_ARGS_((j_common_ptr cinfo)); /* 45 */
-    void (*jpeg_destroy) _ANSI_ARGS_((j_common_ptr cinfo)); /* 46 */
-    boolean (*jpeg_resync_to_restart) _ANSI_ARGS_((j_decompress_ptr cinfo, int desired)); /* 47 */
-} JpegtclStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern JpegtclStubs *jpegtclStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_JPEGTCL_STUBS) && !defined(USE_JPEGTCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef jpeg_std_error
-#define jpeg_std_error \
-	(jpegtclStubsPtr->jpeg_std_error) /* 0 */
-#endif
-#ifndef jpeg_CreateCompress
-#define jpeg_CreateCompress \
-	(jpegtclStubsPtr->jpeg_CreateCompress) /* 1 */
-#endif
-#ifndef jpeg_CreateDecompress
-#define jpeg_CreateDecompress \
-	(jpegtclStubsPtr->jpeg_CreateDecompress) /* 2 */
-#endif
-#ifndef jpeg_destroy_compress
-#define jpeg_destroy_compress \
-	(jpegtclStubsPtr->jpeg_destroy_compress) /* 3 */
-#endif
-#ifndef jpeg_destroy_decompress
-#define jpeg_destroy_decompress \
-	(jpegtclStubsPtr->jpeg_destroy_decompress) /* 4 */
-#endif
-#ifndef jpeg_stdio_dest
-#define jpeg_stdio_dest \
-	(jpegtclStubsPtr->jpeg_stdio_dest) /* 5 */
-#endif
-#ifndef jpeg_stdio_src
-#define jpeg_stdio_src \
-	(jpegtclStubsPtr->jpeg_stdio_src) /* 6 */
-#endif
-#ifndef jpeg_set_defaults
-#define jpeg_set_defaults \
-	(jpegtclStubsPtr->jpeg_set_defaults) /* 7 */
-#endif
-#ifndef jpeg_set_colorspace
-#define jpeg_set_colorspace \
-	(jpegtclStubsPtr->jpeg_set_colorspace) /* 8 */
-#endif
-#ifndef jpeg_default_colorspace
-#define jpeg_default_colorspace \
-	(jpegtclStubsPtr->jpeg_default_colorspace) /* 9 */
-#endif
-#ifndef jpeg_set_quality
-#define jpeg_set_quality \
-	(jpegtclStubsPtr->jpeg_set_quality) /* 10 */
-#endif
-#ifndef jpeg_set_linear_quality
-#define jpeg_set_linear_quality \
-	(jpegtclStubsPtr->jpeg_set_linear_quality) /* 11 */
-#endif
-#ifndef jpeg_add_quant_table
-#define jpeg_add_quant_table \
-	(jpegtclStubsPtr->jpeg_add_quant_table) /* 12 */
-#endif
-#ifndef jpeg_quality_scaling
-#define jpeg_quality_scaling \
-	(jpegtclStubsPtr->jpeg_quality_scaling) /* 13 */
-#endif
-#ifndef jpeg_simple_progression
-#define jpeg_simple_progression \
-	(jpegtclStubsPtr->jpeg_simple_progression) /* 14 */
-#endif
-#ifndef jpeg_suppress_tables
-#define jpeg_suppress_tables \
-	(jpegtclStubsPtr->jpeg_suppress_tables) /* 15 */
-#endif
-#ifndef jpeg_alloc_quant_table
-#define jpeg_alloc_quant_table \
-	(jpegtclStubsPtr->jpeg_alloc_quant_table) /* 16 */
-#endif
-#ifndef jpeg_alloc_huff_table
-#define jpeg_alloc_huff_table \
-	(jpegtclStubsPtr->jpeg_alloc_huff_table) /* 17 */
-#endif
-#ifndef jpeg_start_compress
-#define jpeg_start_compress \
-	(jpegtclStubsPtr->jpeg_start_compress) /* 18 */
-#endif
-#ifndef jpeg_write_scanlines
-#define jpeg_write_scanlines \
-	(jpegtclStubsPtr->jpeg_write_scanlines) /* 19 */
-#endif
-#ifndef jpeg_finish_compress
-#define jpeg_finish_compress \
-	(jpegtclStubsPtr->jpeg_finish_compress) /* 20 */
-#endif
-#ifndef jpeg_write_raw_data
-#define jpeg_write_raw_data \
-	(jpegtclStubsPtr->jpeg_write_raw_data) /* 21 */
-#endif
-#ifndef jpeg_write_marker
-#define jpeg_write_marker \
-	(jpegtclStubsPtr->jpeg_write_marker) /* 22 */
-#endif
-#ifndef jpeg_write_m_header
-#define jpeg_write_m_header \
-	(jpegtclStubsPtr->jpeg_write_m_header) /* 23 */
-#endif
-#ifndef jpeg_write_m_byte
-#define jpeg_write_m_byte \
-	(jpegtclStubsPtr->jpeg_write_m_byte) /* 24 */
-#endif
-#ifndef jpeg_write_tables
-#define jpeg_write_tables \
-	(jpegtclStubsPtr->jpeg_write_tables) /* 25 */
-#endif
-#ifndef jpeg_read_header
-#define jpeg_read_header \
-	(jpegtclStubsPtr->jpeg_read_header) /* 26 */
-#endif
-#ifndef jpeg_start_decompress
-#define jpeg_start_decompress \
-	(jpegtclStubsPtr->jpeg_start_decompress) /* 27 */
-#endif
-#ifndef jpeg_read_scanlines
-#define jpeg_read_scanlines \
-	(jpegtclStubsPtr->jpeg_read_scanlines) /* 28 */
-#endif
-#ifndef jpeg_finish_decompress
-#define jpeg_finish_decompress \
-	(jpegtclStubsPtr->jpeg_finish_decompress) /* 29 */
-#endif
-#ifndef jpeg_read_raw_data
-#define jpeg_read_raw_data \
-	(jpegtclStubsPtr->jpeg_read_raw_data) /* 30 */
-#endif
-#ifndef jpeg_has_multiple_scans
-#define jpeg_has_multiple_scans \
-	(jpegtclStubsPtr->jpeg_has_multiple_scans) /* 31 */
-#endif
-#ifndef jpeg_start_output
-#define jpeg_start_output \
-	(jpegtclStubsPtr->jpeg_start_output) /* 32 */
-#endif
-#ifndef jpeg_finish_output
-#define jpeg_finish_output \
-	(jpegtclStubsPtr->jpeg_finish_output) /* 33 */
-#endif
-#ifndef jpeg_input_complete
-#define jpeg_input_complete \
-	(jpegtclStubsPtr->jpeg_input_complete) /* 34 */
-#endif
-#ifndef jpeg_new_colormap
-#define jpeg_new_colormap \
-	(jpegtclStubsPtr->jpeg_new_colormap) /* 35 */
-#endif
-#ifndef jpeg_consume_input
-#define jpeg_consume_input \
-	(jpegtclStubsPtr->jpeg_consume_input) /* 36 */
-#endif
-#ifndef jpeg_calc_output_dimensions
-#define jpeg_calc_output_dimensions \
-	(jpegtclStubsPtr->jpeg_calc_output_dimensions) /* 37 */
-#endif
-#ifndef jpeg_save_markers
-#define jpeg_save_markers \
-	(jpegtclStubsPtr->jpeg_save_markers) /* 38 */
-#endif
-#ifndef jpeg_set_marker_processor
-#define jpeg_set_marker_processor \
-	(jpegtclStubsPtr->jpeg_set_marker_processor) /* 39 */
-#endif
-#ifndef jpeg_read_coefficients
-#define jpeg_read_coefficients \
-	(jpegtclStubsPtr->jpeg_read_coefficients) /* 40 */
-#endif
-#ifndef jpeg_write_coefficients
-#define jpeg_write_coefficients \
-	(jpegtclStubsPtr->jpeg_write_coefficients) /* 41 */
-#endif
-#ifndef jpeg_copy_critical_parameters
-#define jpeg_copy_critical_parameters \
-	(jpegtclStubsPtr->jpeg_copy_critical_parameters) /* 42 */
-#endif
-#ifndef jpeg_abort_compress
-#define jpeg_abort_compress \
-	(jpegtclStubsPtr->jpeg_abort_compress) /* 43 */
-#endif
-#ifndef jpeg_abort_decompress
-#define jpeg_abort_decompress \
-	(jpegtclStubsPtr->jpeg_abort_decompress) /* 44 */
-#endif
-#ifndef jpeg_abort
-#define jpeg_abort \
-	(jpegtclStubsPtr->jpeg_abort) /* 45 */
-#endif
-#ifndef jpeg_destroy
-#define jpeg_destroy \
-	(jpegtclStubsPtr->jpeg_destroy) /* 46 */
-#endif
-#ifndef jpeg_resync_to_restart
-#define jpeg_resync_to_restart \
-	(jpegtclStubsPtr->jpeg_resync_to_restart) /* 47 */
-#endif
-
-#endif /* defined(USE_JPEGTCL_STUBS) && !defined(USE_JPEGTCL_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _JPEGTCLDECLS */
-
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclDeclsMask.h b/tkimg1.3/libjpeg/tcl/jpegtclDeclsMask.h
deleted file mode 100644
index 317bd46..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclDeclsMask.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifdef WIN32
-/*
- * While the definitions in the original header are technically the
- * same as the definitions in 'zlibDecls.h' on Windows they are not,
- * in a small detail: DLLEXPORT vs. DLLIMPORT. As our artificial
- * definitions do the right thing we use the macro definitions below
- * to move the original definitionsd out of the way. We do retain the
- * inclusion of all the type definitions, etc.
- */
-#define jpeg_std_error __mask_jpeg_std_error
-#define jpeg_CreateCompress __mask_jpeg_CreateCompress
-#define jpeg_CreateDecompress __mask_jpeg_CreateDecompress
-#define jpeg_destroy_compress __mask_jpeg_destroy_compress
-#define jpeg_destroy_decompress __mask_jpeg_destroy_decompress
-#define jpeg_stdio_dest __mask_jpeg_stdio_dest
-#define jpeg_stdio_src __mask_jpeg_stdio_src
-#define jpeg_set_defaults __mask_jpeg_set_defaults
-#define jpeg_set_colorspace __mask_jpeg_set_colorspace
-#define jpeg_default_colorspace __mask_jpeg_default_colorspace
-#define jpeg_set_quality __mask_jpeg_set_quality
-#define jpeg_set_linear_quality __mask_jpeg_set_linear_quality
-#define jpeg_add_quant_table __mask_jpeg_add_quant_table
-#define jpeg_quality_scaling __mask_jpeg_quality_scaling
-#define jpeg_simple_progression __mask_jpeg_simple_progression
-#define jpeg_suppress_tables __mask_jpeg_suppress_tables
-#define jpeg_alloc_quant_table __mask_jpeg_alloc_quant_table
-#define jpeg_alloc_huff_table __mask_jpeg_alloc_huff_table
-#define jpeg_start_compress __mask_jpeg_start_compress
-#define jpeg_write_scanlines __mask_jpeg_write_scanlines
-#define jpeg_finish_compress __mask_jpeg_finish_compress
-#define jpeg_write_raw_data __mask_jpeg_write_raw_data
-#define jpeg_write_marker __mask_jpeg_write_marker
-#define jpeg_write_m_header __mask_jpeg_write_m_header
-#define jpeg_write_m_byte __mask_jpeg_write_m_byte
-#define jpeg_write_tables __mask_jpeg_write_tables
-#define jpeg_read_header __mask_jpeg_read_header
-#define jpeg_start_decompress __mask_jpeg_start_decompress
-#define jpeg_read_scanlines __mask_jpeg_read_scanlines
-#define jpeg_finish_decompress __mask_jpeg_finish_decompress
-#define jpeg_read_raw_data __mask_jpeg_read_raw_data
-#define jpeg_has_multiple_scans __mask_jpeg_has_multiple_scans
-#define jpeg_start_output __mask_jpeg_start_output
-#define jpeg_finish_output __mask_jpeg_finish_output
-#define jpeg_input_complete __mask_jpeg_input_complete
-#define jpeg_new_colormap __mask_jpeg_new_colormap
-#define jpeg_consume_input __mask_jpeg_consume_input
-#define jpeg_calc_output_dimensions __mask_jpeg_calc_output_dimensions
-#define jpeg_save_markers __mask_jpeg_save_markers
-#define jpeg_set_marker_processor __mask_jpeg_set_marker_processor
-#define jpeg_read_coefficients __mask_jpeg_read_coefficients
-#define jpeg_write_coefficients __mask_jpeg_write_coefficients
-#define jpeg_copy_critical_parameters __mask_jpeg_copy_critical_parameters
-#define jpeg_abort_compress __mask_jpeg_abort_compress
-#define jpeg_abort_decompress __mask_jpeg_abort_decompress
-#define jpeg_abort __mask_jpeg_abort
-#define jpeg_destroy __mask_jpeg_destroy
-#define jpeg_resync_to_restart __mask_jpeg_resync_to_restart
-#endif /* WIN32 */
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclDeclsUnmask.h b/tkimg1.3/libjpeg/tcl/jpegtclDeclsUnmask.h
deleted file mode 100644
index 6322ffe..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclDeclsUnmask.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifdef WIN32
-/* Restore the usage of the original names */
-#undef jpeg_std_error
-#undef jpeg_CreateCompress
-#undef jpeg_CreateDecompress
-#undef jpeg_destroy_compress
-#undef jpeg_destroy_decompress
-#undef jpeg_stdio_dest
-#undef jpeg_stdio_src
-#undef jpeg_set_defaults
-#undef jpeg_set_colorspace
-#undef jpeg_default_colorspace
-#undef jpeg_set_quality
-#undef jpeg_set_linear_quality
-#undef jpeg_add_quant_table
-#undef jpeg_quality_scaling
-#undef jpeg_simple_progression
-#undef jpeg_suppress_tables
-#undef jpeg_alloc_quant_table
-#undef jpeg_alloc_huff_table
-#undef jpeg_start_compress
-#undef jpeg_write_scanlines
-#undef jpeg_finish_compress
-#undef jpeg_write_raw_data
-#undef jpeg_write_marker
-#undef jpeg_write_m_header
-#undef jpeg_write_m_byte
-#undef jpeg_write_tables
-#undef jpeg_read_header
-#undef jpeg_start_decompress
-#undef jpeg_read_scanlines
-#undef jpeg_finish_decompress
-#undef jpeg_read_raw_data
-#undef jpeg_has_multiple_scans
-#undef jpeg_start_output
-#undef jpeg_finish_output
-#undef jpeg_input_complete
-#undef jpeg_new_colormap
-#undef jpeg_consume_input
-#undef jpeg_calc_output_dimensions
-#undef jpeg_save_markers
-#undef jpeg_set_marker_processor
-#undef jpeg_read_coefficients
-#undef jpeg_write_coefficients
-#undef jpeg_copy_critical_parameters
-#undef jpeg_abort_compress
-#undef jpeg_abort_decompress
-#undef jpeg_abort
-#undef jpeg_destroy
-#undef jpeg_resync_to_restart
-#endif /* WIN32 */
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclStubInit.c b/tkimg1.3/libjpeg/tcl/jpegtclStubInit.c
deleted file mode 100644
index 99076bc..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclStubInit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 
- * jpegtclStubInit.c --
- */
-
-#include "jpegtcl.h"
-
-/*
- * Remove macros that will interfere with the definitions below.
- */
-
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the jpegtcl.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-JpegtclStubs jpegtclStubs = {
-    TCL_STUB_MAGIC,
-    NULL,
-    jpeg_std_error, /* 0 */
-    jpeg_CreateCompress, /* 1 */
-    jpeg_CreateDecompress, /* 2 */
-    jpeg_destroy_compress, /* 3 */
-    jpeg_destroy_decompress, /* 4 */
-    jpeg_stdio_dest, /* 5 */
-    jpeg_stdio_src, /* 6 */
-    jpeg_set_defaults, /* 7 */
-    jpeg_set_colorspace, /* 8 */
-    jpeg_default_colorspace, /* 9 */
-    jpeg_set_quality, /* 10 */
-    jpeg_set_linear_quality, /* 11 */
-    jpeg_add_quant_table, /* 12 */
-    jpeg_quality_scaling, /* 13 */
-    jpeg_simple_progression, /* 14 */
-    jpeg_suppress_tables, /* 15 */
-    jpeg_alloc_quant_table, /* 16 */
-    jpeg_alloc_huff_table, /* 17 */
-    jpeg_start_compress, /* 18 */
-    jpeg_write_scanlines, /* 19 */
-    jpeg_finish_compress, /* 20 */
-    jpeg_write_raw_data, /* 21 */
-    jpeg_write_marker, /* 22 */
-    jpeg_write_m_header, /* 23 */
-    jpeg_write_m_byte, /* 24 */
-    jpeg_write_tables, /* 25 */
-    jpeg_read_header, /* 26 */
-    jpeg_start_decompress, /* 27 */
-    jpeg_read_scanlines, /* 28 */
-    jpeg_finish_decompress, /* 29 */
-    jpeg_read_raw_data, /* 30 */
-    jpeg_has_multiple_scans, /* 31 */
-    jpeg_start_output, /* 32 */
-    jpeg_finish_output, /* 33 */
-    jpeg_input_complete, /* 34 */
-    jpeg_new_colormap, /* 35 */
-    jpeg_consume_input, /* 36 */
-    jpeg_calc_output_dimensions, /* 37 */
-    jpeg_save_markers, /* 38 */
-    jpeg_set_marker_processor, /* 39 */
-    jpeg_read_coefficients, /* 40 */
-    jpeg_write_coefficients, /* 41 */
-    jpeg_copy_critical_parameters, /* 42 */
-    jpeg_abort_compress, /* 43 */
-    jpeg_abort_decompress, /* 44 */
-    jpeg_abort, /* 45 */
-    jpeg_destroy, /* 46 */
-    jpeg_resync_to_restart, /* 47 */
-};
-
-/* !END!: Do not edit above this line. */
diff --git a/tkimg1.3/libjpeg/tcl/jpegtclStubLib.c b/tkimg1.3/libjpeg/tcl/jpegtclStubLib.c
deleted file mode 100644
index 446480b..0000000
--- a/tkimg1.3/libjpeg/tcl/jpegtclStubLib.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
- * jpegtclStubLib.c --
- *
- *	Stub object that will be statically linked into extensions that wish
- *	to access the JPEGTCL API.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: jpegtclStubLib.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- */
-
-#ifndef USE_TCL_STUBS
-#define USE_TCL_STUBS
-#endif
-
-#include "jpegtcl.h"
-
-JpegtclStubs *jpegtclStubsPtr;
-
-/*
- *----------------------------------------------------------------------
- *
- * Jpegtcl_InitStubs --
- *
- *	Checks that the correct version of Blt is loaded and that it
- *	supports stubs. It then initialises the stub table pointers.
- *
- * Results:
- *	The actual version of BLT that satisfies the request, or
- *	NULL to indicate that an error occurred.
- *
- * Side effects:
- *	Sets the stub table pointers.
- *
- *----------------------------------------------------------------------
- */
-
-#ifdef Jpegtcl_InitStubs
-#undef Jpegtcl_InitStubs
-#endif
-
-CONST char *
-Jpegtcl_InitStubs(interp, version, exact)
-    Tcl_Interp *interp;
-    CONST char *version;
-    int exact;
-{
-    CONST char *result;
-
-    /* HACK: de-CONST 'version' if compiled against 8.3.
-     * The API has no CONST despite not modifying the argument
-     * And a debug build with high warning-level on windows
-     * will abort the compilation.
-     */
-
-#if ((TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)))
-#define UNCONST (char*)
-#else
-#define UNCONST 
-#endif
-
-    result = Tcl_PkgRequireEx(interp, PACKAGE_NAME, UNCONST version, exact,
-		(ClientData *) &jpegtclStubsPtr);
-    if (!result || !jpegtclStubsPtr) {
-        return (char *) NULL;
-    }
-
-    return result;
-}
-#undef UNCONST
diff --git a/tkimg1.3/libjpeg/tcl/pkgIndex.tcl.in b/tkimg1.3/libjpeg/tcl/pkgIndex.tcl.in
deleted file mode 100644
index 070e0cb..0000000
--- a/tkimg1.3/libjpeg/tcl/pkgIndex.tcl.in
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @jpegtcl_LIB_FILE@]]
-
-# distinguish static and dyn variants, later.
-if {0} {
-package ifneeded @PACKAGE@ @VERSION@ [string map [list @dir@ $dir] \
-"if {[catch {load [file join @dir@ @jpegtcl_LIB_FILE@]}]} {
-    load [file join @dir@ @jpegtcl_LIB_FILE@]
-}"]
-}
diff --git a/tkimg1.3/libjpeg/tcl/tclconfig/ChangeLog b/tkimg1.3/libjpeg/tcl/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/libjpeg/tcl/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/libjpeg/tcl/tclconfig/README.txt b/tkimg1.3/libjpeg/tcl/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/libjpeg/tcl/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/libjpeg/tcl/tclconfig/install-sh b/tkimg1.3/libjpeg/tcl/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/libjpeg/tcl/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/libjpeg/tcl/tclconfig/tcl.m4 b/tkimg1.3/libjpeg/tcl/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/libjpeg/tcl/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/libjpeg/tcl/tools/genStubs.tcl b/tkimg1.3/libjpeg/tcl/tools/genStubs.tcl
deleted file mode 100644
index 2c22380..0000000
--- a/tkimg1.3/libjpeg/tcl/tools/genStubs.tcl
+++ /dev/null
@@ -1,935 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-package require Tcl 8
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3 && [llength $args] != 4} {
-	puts stderr "wrong # args: declare $args"
-    }
-    if {[llength $args] == 3} {
-	lassign $args index platformList decl
-	set supressorList {}
-    } else {
-	lassign $args index platformList supressorList decl
-    }
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) [list $decl $supressorList]
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "Only one argument is allowed in varargs form: $decl"
-	}
-	set arg [parseArg [lindex $argList 0]]
-	if {$arg == "" || ([llength $arg] != 2)} {
-	    puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-	    return
-	}
-	set args [list TCL_VARARGS $arg]
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    set decl [lindex $decl 0] ; # ignore supressors here.
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    lassign $decl decl suppressors
-    if {[llength $suppressors] > 0} {
-	set sup [list]
-	foreach s $suppressors {
-	    if {[llength $s] > 1} {
-		# Note that elements in the sublist can be negated!
-		set and [list]
-		foreach i $s {
-		    if {[string match !* $i]} {
-			lappend and "!defined([string range $i 1 end])"
-		    } else {
-			lappend and "defined($i)"
-		    }
-		}
-		lappend sup "[join $and " && "]"
-	    } else {
-		if {[string match !* $s]} {
-		    lappend sup "!defined([string range $s 1 end])"
-		} else {
-		    lappend sup "defined($s)"
-		}
-	    }
-	}
-	append text "#if " [join $sup " || "] "\n"
-	append text "    NULL, /* " $index " */\n"
-	append text "#else  /* " [join $suppressors] " */\n"
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-	append text "#endif /* " [join $suppressors] " */\n"
-    } else {
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    }
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/libjpeg/testimg.bmp b/tkimg1.3/libjpeg/testimg.bmp
deleted file mode 100644
index 8603d15..0000000
Binary files a/tkimg1.3/libjpeg/testimg.bmp and /dev/null differ
diff --git a/tkimg1.3/libjpeg/testimg.jpg b/tkimg1.3/libjpeg/testimg.jpg
deleted file mode 100644
index b34ca5d..0000000
Binary files a/tkimg1.3/libjpeg/testimg.jpg and /dev/null differ
diff --git a/tkimg1.3/libjpeg/testimg.ppm b/tkimg1.3/libjpeg/testimg.ppm
deleted file mode 100644
index 9d81ce2..0000000
--- a/tkimg1.3/libjpeg/testimg.ppm
+++ /dev/null
@@ -1,4 +0,0 @@
-P6
-227 149
-255
-0/-0/-10.21/51.51.62/62/83/83/:3-:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)2-)/*$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:7.A:0B<0D>2F at 4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b at 4nB5}E6‹H8™G9£F7¯G:¸G9¾E:ÅG;ÇG>ÊG?ËH@ÐE@çFLíCLëDKëEIîCIïBDñ>Bô=Aø;A÷:@ô:?ð<?é?@â@>×?<ËA7»=/µ@.µ@.´?-´?-³@-²?-¯@-­@,ªA,¦A-¢B,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1©B3³D3¼D4¿D4¹?0µA2¬F8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:<jBC|IHMM•OOŸW[ªdnªoƒŸt”{£‡®€†º~ˆ½sy­`a‘TKvPDhSJgOG^MH^TQbfdo|}‚‘™ž˜£©Ÿ¢¨šž “’{|lfgUXWEQNEUR[UQbUQb0/-0/-10.10.40-51.62/62/83/83/:3-:3-:3-:3-:3-:3-91.91.80-80-80-80-91.91.80-80-80-80-80-80-80-80-6.+6.+5-*5-*5-*4,)4,)4,)5-*5-*5-*5-*5-*5-*5-*3.*0+%0-&0-&1.'2/(30)41*41*63,63,74-74-85.96/:70:7. at 9/A;/C=1E?3H at 3IA4JB5JB5LC4LC4MA1MA1MA1NB2OC3QD4P>0U?1^A3jC4xD6„E4’E5œC3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ð<?é?@àA>Õ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-­@,©@+¦A-¡A+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1«A3µD4½C4¿D5»A2·C6¬F8œI;…G:l at 3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤aj¥l}rŽ‘{¢†€®…¹{„»ou©[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H at 5H@3H at 3I@1I at 1K?1K?1K?/L at 0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,­@,ª?-§@-¥@,¡A+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=™J=G;h at 4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚¹u~·fm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L at 0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@—K>|F:b at 4L:.A7- at 85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}y«x}µowµ`f¢QR‹LEyL at pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8. at 9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I at 1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,­>-¬>-¬>-ª?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ at tE;Z>2E9-<5+ at 93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n at 3sB;yKK€Zeƒg€p—zxªu{·ks´_d¦TT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7- at 7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n at 0v>-{<+‚;)Œ;*”=,œ@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96- at 93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||²w|¼nu»dh¯[[¡RMLB~OArL at hI=cH>`HB^ECX at BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H at 3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š</‹>.‹=0Œ?/’C2˜B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC7<?6>93 at 72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]jƒs‰€«…„¾~ƒÇtzÆmp½ce¯VSšLC‚K?qI<gG;cE>_FB]DBW?AN;?H:BE>HGDMHGQIGQHJRGNVKUXM^ZOaYNaXO++++++,,,,,,.,-/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-*2,,1++1++0**0**1++1++2,,0**0**0**0**0**0**0**0**2,,2,,2,,1++1++0**0**0**2,,2,,2,,2,,2,,2,,2,,2,,3/,30+30+30+30+30+30+30+41,41,52-63.63.74/85085092,:3+;4,<5->5.>5.>5.>5,B8/B8.E8/E8/G:1I=1J>2I?3FC4FC4JB5OA4TA2\@2b>0j<-q<.w9*}8)…8(Œ:,•=/›B4¤B5²F:ºE;ÁF>ÊG?ÔG@ÞFAçCAîB@í;;ë;;ç>;ßB;ÑD:¿D4¯@-¤>(¦A-¦A-¥@,¥@.¥@.¤?-¤?-¤>/¢>.Ÿ@.œ?.˜?-•>+‘?*>)>+>->->-Œ=,Œ=.‹<-‹<-Š=-Š=-ˆ<.ˆ<.ˆ<.ˆ</‡>/ˆ>1‹?1‘D2–C1¢B4­C6ºC;ÁD>ÁD>»EA¹PL²[T¥e\‘f]u_T[UIGMACI?<92?82>71;6094.74-63.43.43.34.24/13./4..3-.3-.3--3/-3/-3/-3/.3/.3/02/02///-00.22022010.0/-0/-3/,8,,;,)C0*K70S<6^IHtbn‡z”Š¶ŒÆ„ˆÏz€ÌrxÆik¶WWŸID„E=nG<dD<aC>^CAY at CV@DP>EKGQRKWUQ^WU`XS_UR^TT^SY_S^[LaZJaZJ,-/,-/,-/,.-------.-+.-+/.,/.,1-*0,)0,)0,)/+(/+(/+*/+*/+*/+*/+*/+*/+*0,+/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+1-,1-,2.-1-,1-,1-,1-,1-,1-,1-,1-,0,)1-*2.+3/,3/,3/,3/,3/,3/,3/,3/,3/,40-51.62/74/80-92,:3-;4.=4/>5.>5.>5.?4.?5,B5-C6.D7/F90G:1F<2G?4H at 5J@6P?5T>3X<1^90b6+m9.t8-|8+ƒ9,;/“=0˜?1ž>0§A3­A4µC8¾E:ÊG=ÔG>ÞE?åC@è@?êBAæDAÚE>ÈD8·B1ªA.¢B,¢A.¡@-¢?,¢>.¡=-¡=-¢>. ?/œ<,š=,˜<-•>-“=,=+Ž=*Œ>*‹<+‹<+Š=-‰<,‰<,‰<,ˆ:-‡;-‰=/†</†</‡=0ˆ>3ˆ@2‰A5‹A4‘E5—D4£E9±I>ºG@»D>»EA¸MG´ZR¯f_£qf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“»”–ϐ•Ùƒ‰ÓtzÆjn·_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†</…=/…=1ƒ=1„>2†@6‡A7ˆB6“G9—E7£G<¯J@¸IB¸GA·LF³TN±d\ªqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““¹”—ʐ–Ô„‹ÏyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~Žv†yr€qfteZeT[ZE`Z at b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>¬KD²KF³LG²SM®`V­sg¦qŒz‘Ž{‚‰ws€ocqbXcUNRDMN at HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”±’—¿•Ç„ŽÃ}‰»{‰¶|‹²}Œ«}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹¡”‘¨˜¥”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JC®LI®QL­]Vªj^§€o¡yšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO at EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““£–°Œ•¶ƒ²¯…™²¤¶’¨³“¨«¤£Œ ž‡ž˜‚™}˜‰œ‹ˆ£”°š˜±›”­—‹£…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1. at 2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’</Ž<.‹<-‰<,‰<,ˆ<,‡;+†:*†:*†:*ƒ:+ƒ:+‚:,€:.€:0€<1€=4?6‚B9ƒD=‡F@ˆH?‘KA’H=šG?£LE¨PL¨XQ©f]¦vh¢Œw›™€•¤‡Œ£‡†ƒ~‘}t‚qjue\eRV_LNUCEL:?F6<@27:/68-01)00(.-(/,'/+(/+*1-,2.-1-,1-,1-,1-,1-,/.,1-,/.,2.-0/-2.-0/-0/-0/-0/-2-18,:5)51++66,GL8`hQzƒpˆ’‡—–š ™¥†–£‡›¢ª©›¹± À³˜·¨š¶§›·¨˜·¥‘±œ‰«’‰«±”’³–•´•­ˆ¢…„›{’xgzdTbIQT9VU9XW;,03,03,03,03./1./1//////....../.,.-+.-+.-+-,*-,*-+,-+,-+,,*++)**()*()*()+)*+)*+)*+)*+)*+)*+)*+)*,*+,*++)*+)*+)**()*()*(),*+,*+,*+-+,.,-.,-/-./-./+*/+*0,+0,+/+*/+*.*)-)(0,+0,+/+*0,+1-,2.-3/.40/:12:12;31<42=32<21<20;1/=20<1/>0->0-?1. at 2/A4.?4. at 51@72 at 93A:4B94C84F74H5/Q51X5/a6/l8-u9.€</†>0‹=1“?5•>5“?5“?4•B4šB4 C4¥D4¬B5°D8´E:±E;ªB7¡?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`Z©pe¤ƒrœ”}–¡ƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS at BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yŽ›Š‘ž”Ÿš‹ž˜¥——´ž¢Å¥©Î­¥É­¦Ê°§Ë±¤È¬—¾Ÿ‹³‘ˆ°²Ž²Ž²¬Š„¡‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93 at 72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1¦@4ªB7ªB9¥@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JF¡SO¨]X©hb©{n¤Žy™œ’§†‰¬‹‚ªˆ€¡„™€~‹wxnjxadr[ZhQQ]IITCCL;>D6<?467/44,30+0+'1()1()2)*4+,2)*2)*2)*2)*2)*0**0**0**1++1++0,+0,+0,+0,+0,+1+-6)25)-4-%46!AH&Wc;q€W‚’mœ} †¢Œ‹¡Š¨‰•¸Ž È”¤Ð©Ó«¨Ò®§Ñ­¡Ë¥“½—…¯‡‚¬„‡°†ˆ®…Œ±ˆ‹«†Ÿ{{”tqˆk_sWM]BIO3JM0KK/./1,01./1./1.0/.0/.0////00.00.00.0/-0/-0/+/.,1-,2.-1-,1-,0,+/+,,*++)*+)*+)*+)*+)*+)*+)*+)*+),+)*+),+)*-(,*(),())'()'((&'*()+)*,*+,+)-+,.-+/.,/.,-,*-,*/+*/+*.*)-)(,(',('1-,2-*2-*2-*3.+4/,50-61.;31;31<42<42=31<20;1/;1/<1/<1/=/.=/.=/,>0-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z</‡=2‹=3‹?2Œ@2Ž@3@1’?1•=/˜</œ>2¢B6¡C7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹</Š;.ˆ:-ˆ:-†:,„;,‚:+‚:+:*~;*~;+|:*}9,|:.€>2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”¡…ª‰‰¬‹ƒ¨‡€¡„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžz¡~ˆ¡zŠ§{‘¶‚›ÄˆŸËŸÉ™žÇÆš˜Á•Œ·Š‚­€…®‚Œµ‰„«‰®…‰©‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k at 0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡¦‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6 at 93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#<?*V\@pzX‹gœu‹sŒ¡vŒ¦wŠ¨v‰ªuŽ´{™¿†ŸÁ¾–ºŠ³ƒˆ®}…«|ƒª{…ª~ƒ¨}ƒ¦~€ž|y”ur‰mh|cYkUMZFIQ<CH4?B//0*01+01+01+12,12,21,32-43.43.74/74/63.52-50,50,7/,7/,6.,6.,3.+2-*0,+0,+0,-/-./-0--/-,1+*/)*.)(-.)//(//(//(//)-/)-.*+.*+/+*/+*.-).-)./*./*./)./*.....0....../.,/.,1-*3.+5-*5.(7.)8/(:/);0*<2)=3*>5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹</‹>.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„¥†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C at 7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€™¹‡–¶„“³Œ®{†«x‚¨w‚¨yƒ¨|ƒ¦|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6- at 7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-, at .*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x at 1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆª‰ªŒ©ŒŽ¥‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€¥q‡¬x¯|‹­zˆªx„©v§v§u¦w¦y¤y€¢}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+ at 6-@6-A7.B8/A8/B90A8/A81 at 70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„©‡‡ª‰‹ªŠ‹¦‡‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz m¥r‚§t€¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31 at 51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒ£~§‚‚ª…‚¬†©„¥€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkz¢nx lwŸmx ny£s{¥u{¥w|£wyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60 at 51@51?40>3/>31?42 at 53?53 at 72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,¡LE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹£ˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3 at 6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnx¢rz¤vy¢vyŸvvštw™vu”rokj…fc|^UlON\ECC7 at 91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96 at 85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84 at 93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81 at 70@72?61?61 at 72@72A83?74 at 85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€</~<.|=.{=.|>/|>/}>/=/†9/1+¢<8ÍlfÙ~y­ZTŒC<ˆLAN at tJ<qM=pQ?qR at tS@zWD‚[J~eOmsOo{U„y[˜u_©oc¶mf¾qk½wo»‚w±Œz§—~žŸ€–¡¡~…y…™vˆ‘r‹rˆ‘r„“r€–r|–sx“pt’pm‹ii„edx\]kQV^GMP;ED0B;+ at 3+?2,;0*70*30)00(./'./)/0*2/*6,+:*+>(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw ty¢xxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5 at 707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83 at 72@72A83B94A:4?82 at 93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x at 3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&³=;ì|zý•’Åhc–G@‰K at xH:nM<jQ=fT>hV>lX at t[E`L€hPysQ„wUžt\´l^É__ÓV\ÙQ[×T\äouÙzx̆|À~µ•€«•}£’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R</O4-M1-I0,D/*>/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ<d^FgeLilOnuVm{Xl~Xk„Zg„Vg‡Vm]p•bq–br™duit›lo™ko–jr™mwvyŸxwšyt–us”uu”usqoŠki„ea|[TmMM]BMN at KB9F=69:49:49:49:49:4:;5=<7=<7=<7=<7@=8@=8A>9B?:D?;D?;E@<E@<E@:D?9D?9C>8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83 at 72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L at 2N@3N at 5N@7N at 7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80 at 93@93<5/MD=M@:K:3T at 9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;¦ND¤PE¨VJ«YK¥OB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ÈHIèbaÅEDÍWUáyv«VO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|Û€}Ûƒ؉‚Ãv½wº„x¶†x²ˆx­Šw¨‹y¥Œxš€o™~m˜xi“oabY„UM{IBxA>u:<i.2d02a11P&'G%#L0-M51G4.E2,D1-F1.F.,G+*K--Q6/YH4`W:f_BgdEkoNu|Zu„]oYlƒWl‡Zp]r’as•bu—dw™fv›hr–js˜os—qq•os•tw™xz˜|y–zx•ysrm‡jk„fi‚dazZTmMO_DNO?SK at PG>9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@<E@:E@:D?9D?9E>8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83 at 93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L at 2L@2N at 3N@3N at 5N@7M?6J=4I<3H;2E;2E;2C:1B90 at 91@91 at 91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NH¡PL¢OG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0£C5›?0™@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò<RðIZëP^åQ]ãS]àXbÛbiÕflÔjnÒmqÏqrÍutÉxwÇywÊ||ÉyzÈvxÇqtÆkrÅfnÅakÃ_kÅ`n³S_¥KUšGQDK†EIm69HT1-M0*H1+J6/K81K:2O>6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G at 8F?7JA:I at 9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M at 0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD<R3.j23ŽAG­LWÃU`Ë]fÆ_b›B>—I?–LAœNB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+˜7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMR­KL–A>‚71{8/v6,x2*„1-œ37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh…ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’£—¨–˜©™–¦™‘¢’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA<BA<DA<DA<DA<DA<E@<E@<GB<GB<GB<FA;FA;FB9HA9HA9LC<KB9JA8I at 7H>5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5 at 91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D</F<0F=.J>0K?/M at 0M@0M@/M at 0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?¾T`ÙTeæUfãUcËJOŸ30–:/‘>0™A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&­3(¶97º9=½7>¼7<¿<BÆJLÄTS¾XS™?7Œ4*‰,%61ÃHKÜOWâAQÛ3@Þ:9Í.*Ó84È74ÆE@È]U©WKWFwW at veI~pSpQ„fJdK©o[ÕuiîSWüDP÷;Jø9Iþ=Nÿ@Qÿ:Lù4Hÿ?Sþ9Mú4Ký3Ký1Jÿ/Iÿ0Nÿ6Sÿ3Tý4Vý6Wú7Wø9Zø=\÷>^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•£Šœ©•£®¦±¡¬´§±¹®°·°«µ­¡«¢” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA<BA<DA<DA<DA<EB=FA=FA=FC<FC<GB<HC=HD;HD;JC;JC9LC:KB9KA8J at 6J=4I=1H<0G;/E;/E;/E;/E;1E;1E;1D;2D;2 at 9/@9/@91?80<71;60;60:5/;7.;7.;7.<8-?8.A;/C;0D</G=1G>/K?1M at 0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6E·&+¨1)7(’:&—<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2­?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[P–UC{N9‚bI†kP„`F’[F­fTËrdçmhêEKò:Dê9Cç<DçBHçFKèGLêFMôJSòBMò9Iö5Hù2Gý/Fÿ2Lÿ8Rÿ9Vÿ9Xÿ:Xý:Zþ;]ÿ=_ÿ@bÿAeÿCiþDkþDmýBmüCoüCoüBqýBoÿGpÿ@hÿGmÿMpòIhéOkå[rÙcs½YcŽ?D`&$Q+"V at 3VO=IL7 at D-RJ3eYCujV€{gŽy™œ‹•œŒˆ“ƒ‚Ž€‰—ˆ›Œ™ˆ‡’‚Š“‚—žŽ¤¨™²¶§¸¼®¿Á¶ÀÁ¹ÂýÅÆÁÃÃþ¾¾°µ±¢©¢—Œy‡vi{e\sYTmORfJQ[BUZCW\F560560671782893:;5=<7>=8@?:@?:C@;DA<EB=EB=GB>GB>GD=GD=HC=ID>IE<IE<KD:LE;LC:KC8LB8KA5L at 4K?3J>2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0 at 91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D</E=0H?0J>0L?/M at 0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQÞ8FÔ3;½++­1'¡8%˜:!—9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2­?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(Þ</Í,"Ð71¾3,°7/Ég\¸l\ŽWC‡ZCƒV?‰R=©\LÎlaágbäTTðEKñ=Fä;@Ù=>ÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eý<hý>jý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘¦§Ÿ¡¦Ÿ–œ˜•ž›ž§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DA<FC>HC?HC?GD=HE>ID>ID>JF=JF=MF<MF<ME:LD9MC9MC7NB6MA3N at 3MA3JA2JA2I@1H?0G=1F<0D<1D<1C:1C:1A:2 at 91?82?82<71<71<8/<8-<8-<8-@:.A;/D</E=0H?0K?1M at 0NA0P@0P at 0O@-O?/O=1O=1M=0L</I;0F:.E8/C9/B:/A;/A:0?;0?=1@>2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#œ=!™;›< ¡=#¥;%¤6%ž6) 8-¢6,¥4,­81·@:¸C<²@6±B7­A4¨</¦8+¯:0¼C8ÃD=Å@7Ã>-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBŠM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿ<gÿ>kÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aƒCAg6/hB7sUJye\Œ}v£–­£¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£ˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DA<FC<GD=HE>HE>HE>HE<JF=JF;KG;KG;NH:MG;MG;ME:MD;MD;MD=NC?NC=MC7MD5KB3JA2H>2G=1E=2D;2C:1C:3A:2A:4 at 93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H at 5I?3L at 2MA1NA0P@0O at -O@-L?/L>1M=0L;1J91I81E80C90 at 9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ÊZY®86«.*²1+®.%­2#¬9&¬B*ªF,¦D'£A&£A&¢<#Ÿ9# 9*£;0¦:0¦7.­<4¶C<·E;°@5«=0¨</©;.¬<0»E9ÆLAÅE<¼8,¿6$Í:(Ý;.æ3,ñ+*ù(+ý&+û%'ø**õ.+ï2,ë4,è3*å3)ä2(à3%à:*Ñ2Ü?0Î6)È8-Â?5³A6Ñl`¿gY¥RB¨OAËcZçhbæRRêAFóBJë>Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþ<Tþ9Tÿ8Uÿ9Zÿ:^ÿ;cÿ>iÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg…ÿe‚÷]wï_xçh{Üp}Æqx§gg^X{ZQ—~wª™’¾°­Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH at HH>HH<JH;KJ8LK7ML8NK8MJ9JF:GD;JFCNIMNIPGDOD?ENE>LC4J at 4KA5MC9LB8F=4B90E<5C:5 at 93?74 at 85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D at 7G@6J at 4L@0O at -O@+L?,G at .F?/I;0K81M53K65J88F;9B?:6904</9D4:A/69$?=(bC1¼j^¹JA¦7,¥5)§7+¥5'¥7&¨=+£8$¥<&ª@*­@)¬=)¬9&®6%«6%¤6'¡7)¢8*¦<.ª@2¬B4¬B2¬A1©>,«=,­<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°</²<0ÊL@ÔKCÜGCá>?ë<A÷?Gý?Iù;GþDQüCQþDRÿDUý@Vü<Uÿ<ZÿBdÿFkÿAjú;gõ:gö<mùCsýIyÿKzÿMyÿMtøPsðOpçMiêMjüYxÿgˆÿ_ƒõGlöWwè_yÃ^n½{‡a^xp§‘„»§œÑÄ»ÝÖÐÝÜÚÜÛàÞÜçâÛëæ×ìëØîñÙñöÝó÷âó÷çôõëôôîòùôñùôðùñïöíîóèìîãééÞäæÝâÖÐÔÍÉÊ»º¸£¥ ‹‰yƒxr}op{k}†sxlv}k0./1/0320542653762873872:94;:5==5??7AA7CC9DD8EE;HH>HH>HH<JH9KJ6LK6MM5NM8KJ8KI=KJEPPRWU`YXjVTjRO`OIKMD?H?:F=8G>9H?:F=8B;5D:8A96?74?74 at 85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G at 6J@4M at 0O@-P?+L@*B?,B?.F<0H:1J65I56F35 at 65@<9:=6;>5@@4E<-J9)^B4€L>®QB«;- 2#¡6&£:'ž7$ž9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô</Ø:.à8/ç4-î1-ô.+ô.+ñ0+ê4)á7(×:'Õ:$Þ<'Ù6#Õ8%Ô=*Ì;*Á5&Ä:/ÏF<ÑF?ÚIDéOMóPQôGIð;@õ:AøCHåBEÚDCÒBAÅ>8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°–‰Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆų²®ž¡šŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH at KH>GG=EE<A@:<C:;?:7<74<73=82>93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L at 0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FE£;0¢2$Ÿ1 ¤9'¥<)ž7$ž8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾</²<.¬<.©9+©9+«<+­>-­>-­<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿa€ýUvñCdûIkÿTvÜ?\ÍI`Ø{…¸||aC;|n®ŽÕ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹­®¨¢¥ž£™£—£«žž¦—›£–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HE<JF;KH9MJ9PK8OM8QL8OL;LJ>QPL^]bmlzzz’‚¡€‚¨€€¦{u—rkŠe_{YSmTLdMEZG at PB<HD?F@;?<87;63;60<8/=9.;8/:70991;;3>;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾</µ:+°8*¯9+±;-¬4&½?3ÑH@ÙHCÝB@å@DóFLýNUð?Eð?EöBMþHUþHWüBWú@XüA^ÿAcÿCfÿFmÿIrÿMyÿO|ÿL{ÿIyÿDvÿN~ÿR}þKrøMoÿVuÿUu÷MjðFcïKfÒ>VádtþŸ§ÓŽd92lJ>¥ynÐ¥œõÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨¹“ϐƎ‹À‡ƒ¶{w©pmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1></?<+B=*C<)G?,J?+K@,LA/M at 0M?2L at 4K>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$­:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0À</º;,·9*´:+¶<-¹?0µ9-¿<2É@:ÒC?ÛCBãDHíJOöOVì?Eí>CòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ–¢ÿµ¼óžŽHFk.)¦kcÍ–óÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B at 4JD8ME8OH8RK;TK:TM;SL<RKAQLIZW^li|~Œ¸–™Ì™žØšžÞ™˜Ú”‘ÔŒŠÉ†…¿~µxv§nk–fe‡]ZwVTiMKYDAJ><?;:8;74762555457664872<:.?<+C>*F@*G?*H at +IA,IB0IA4HB6HA9G@:K=<I;;C9:=77875384/83/917<574+C1']80~C=–GCž>?ž51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿ’žÿ‹•ôƒ‰Ç`d§MMµjgΏŠï¼¸ÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛßØÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚¦‘•Åš ÚŸ¦ê¢©ñ¡¥ïž ë™›å•˜Ý”•Ö‘ʉ‰½‚ƒ±zy¡rq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACB<FD>LCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)¥>/©>,«>*¬?+­@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefȃ~嫧ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL<WK?TICSJM^Xfpmˆ‚„«‘—Ëœ¤ã£­õ§°ýª±ÿ¦¬ú¡§ó ¤îŸ£ê¡á™›Ö•–Ì’’ĉˆ´yyŸji‹`]|XUpRPhOMeNJcKG^FBS@=H?:>?:6@<1A>/C@/CB0BC3BD7?D=>D@<ED;BJ>CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À</Ä>2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vqל˜úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I at 7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ê— ãžªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«èŸ¡Ú™šÒÁ±tr¡he’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4 at B5BE:?D=<B>:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWU¦VM¦M?Ÿ@.œ9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieʏ‹ç¶²øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”â›¦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ã˜˜ØŒŠÉ€»uq®ie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}¢‡}Ÿ’}œ {š¥pŠ¤`u¬Yi¶VaºQU¸HF°@4¬;)¬<&­='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_—^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YI<YJCWKKXP]b^ysuœ…ŠÂ™Ü˜¤ð «úª³þ­µþ¯·ÿ±¹ÿ³ºÿ´»ÿµ¹ÿµ¹ÿ¯²ù¬¬ô££ë™—àŽÓƒ€Çxu¼sm³k`¢i]›cZ‘]W…VRwNKhEDV@@L85<A<@KABL at BQ>BZEJpW]‚cs˜r—¥z§®«²{£¸vœÀp“ÂcƒÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OF˜mfÁ˜”ݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D at 4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I at 7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ºŒ–Ô•¡é©õ¨°ù©±ù­³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«­ø¥§òŸžê—–⌋ׂÍ}yÅum¶pgªf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]d«fx¿kÉnšËo˜ÉiÈ`ƒÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$­6"­5$®5$³5&¶7(¼8+Ã;-È</Ó@6×@7Ú@6Ü?6Þ=5Þ93Ý6.Û4,Ó.(Ò-'Ó.(Ø3-á:4ã<4á81Ü5-Ü5-Ð,"Í)Ù7,âB6Ü?0Ð4%Ë.éF7óI<ýH?ü<7ô-*ñ#%õ')û/2ñ-.ë/.ä2.Þ3,Ú1*×0*Ö/)Ó0'Ó7*Ò9+Ö:+Ø<-Ú>/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È</Ä;+Ã:*Ã:*Â:*Â:*Á9+¾9*Â<0Â>2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©ˆÍ«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F at 4D=3C<2?80>7/=6.=6.=60>71 at 93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚±Š“Î’Ÿãš¦î¦®÷©¯ù­°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïšœé“•âŠŒÙ†…уÉ{u»mk¬dež_a’Y[„RQsNHbWFY_CQmBLEM˜MT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\žla}fVXH9kXJ”|r½ œÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ<OI;MG9KE9IC7G at 6G@6B;3A:2 at 91?80?82?82A:4@;5B?8EB9KE9MF6PE3RE2UF3UH7YLCUKLZScii…|«‰“È“žÞš¤ë¦¬ø©¬û¬­ý­°ÿ®±ÿ®±þ­°ý­°ý©¬ù§ª÷¤¨ò¢¦ðŸ£íšžè•™ã’”Þ’’Ú‰ŠÍ|€Àsx²ou©mpigŽj_}y_x‚WjŽP_£O\»S\ÍT]ÖPWÛHRå@Qè?RäCRÜDPÖCKÏ@DÊ9<É46äJLçIJáAAÕ74Î95ÎA8ÈD8¾>1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ</Ã>/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöw€íksÞXañ`mñ`mìboïs}숊́|ªth™yjskXON:_VGƒqg¯–’ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL<QK=OI;MG9KE7JD8IC7E>4D=3B;3A:2 at 93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜¢ç¤§ö¦§ú«©ü«¬þ¬­ÿ­®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è›¢æ™žâ’šÛ‹“Ò†ÊƒÂ„ˆ·ƒ¨ˆyšmˆšcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}€ñ‡‰èwyÚ_dñgtþm|óeuëlwö‘•ì¢ŸÄ”Š¢|hjUHQ<WUFth\¤ŒˆÛ¿¾òÕÙùãæÿóöÿúüþþÿüýÿþûÿÿüÿÿúÿÿøýÿÿûùÿõ÷ýóýÿ÷ÿÿøÿýöÿý÷ÿÿöÿùïõïáòìÜúõáÿýçÿýäÿþâÿÿçýþìùúì÷÷ëVO?TN>SK>PJ<OG:LF8LD7JD8H at 5F@4E<3B;1B92A:2C:3A<6C at 9DD:JF:MG7OG2QF0TH2UH5UI=QGEWQ]jh€~‚¨Œ”Å“Ø™¢çŸ ò£ ÷¦£ú§§ý¨ªÿ©«þ©¬ý§­û¥«õ£ªò£§î¢§ë¤©í¦©î¥¨í£§î˜ è”¡å”Ÿß”Ÿ×•›Íš•¾ Œ¯ªƒ ¥e´]pÂQcÐIWÜBNå>Fë<Aì<<ê?8ãA4ÜE4ÔI4ÊI3ÂF.¿B,Â?-âSEÞD<Ý97æ>>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ù‹ö†…éqsøryÿy†õaqàXföˆ‘ÿ´´Ð®¢ ›‡]jPDR9QT?jbU›ˆÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO at WP@WN?UN>TK<RK;RI:PH;MC7KC6KA5H at 3H>2G?2H>2F at 4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜Ÿç£¤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤­ü¡ªõ¡©ñ¡¨ì¥¨íª©ï­©ó±©ö¬©ø ©ø—§ò’¡â–ŸÖ¦£Î¶ž¾¹…œ¸gz¿L]ÑERß>Mç;Gç<Dæ=Bà@@à@@â>?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æ<?á=>Ú<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}…ùZlücwßbpû¬¯¶ªš}‘u]rQJY:LR8snZ¥•ˆË·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO at XO@VM>UL=TK<SJ;RI:NE6MD5LC4KB3JA2JA2JA2IA4GC8HD9LF8OH6RJ5SK4VK7TK:XNEULMYUckhƒ{}¦†ŒÀ•Ó–šáŸžìŸñžžôžŸù¢ýŸ¦ÿ ªÿ¡¬û ¬ô «íŸ§è¢¥è¥¤ê©£í« î¤Ÿï §÷š¦ðœ¡á£œÐ±˜À¿ªÂq„ÄTbÑCOâ<Fì8Aï7?ê:=å<?Ü@AÛACà<CÚ9?ÚADË;;ÌB?Ê@=Á31åOPæCFè?Dê;Bç8?â8;Û89Õ:8Ï;7ÔE?Æ=5Å<4ÌG>ÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦“jŒkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJ<VJ<SG9RF8QE7OC5OC5OC5OC5MC7JC9JF;MG9PI7SK6VK5VK7TK:WMCVMNZWbkiy{¡…‰¹‹‘Ë‘–Ö˜˜Þ™™ã˜™éšî› ô£÷Ÿ§ø ©ô ªï¨èœ¤ãœ¢àžŸàžá™ã›™â–›ßššÚ¤•Ð±ŒÀ¿‚¬Çr“ÉYqÇBS×ALß>Dã=?å==å<?ã=?á>Aá>Cà<C×8=Õ?AÏA@ÊC?Ã<8Ä96éWWàBCä>Bè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñœ¡£œŠa€`UoHOd=W`Aww]­¥’áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN at YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KG<OI;RK9TL7WL6WL8WK;VLBUMK\V`jh~yy›‚…²ŠÂ”Γ•Ò•”Ö••Û–˜ã˜›è˜žìš¢í›£ëœ¥è˜¢ß–ŸÚ•›Õ”˜Õ“—Ö’“Ö‘Ò…„½‘ƒ¶¥}±·s¢ÈfÒVzÕGaÔ<KÞAJàBCÞCAàB?áAAä?Cç>Eç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À</ÇE7ÄE6½>/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.­<.°</°<-±;-¶>.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXkë’– •ƒ_zYQlCSh?\gEy|_°ª”çÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN at YM?YM?YM?WK=VJ<UI;UI;TH:UI;UI;SI=OG<OI=QI<SL:UM8XM7YL9XL<UKAUKI\U]hexut“|~¥…‡·ŒÂŽÃÈ’ϐ”Ô’•Ü“—à”˜ß•šÞ•Ü’›ÖŽ”ΉÇ…‹Å‡Ã}ƒÁ~¸}tŸŽp”¨gÁ\„ÖNvâAcè:Uê9KæAGàECÜGAÛGCßEEæAGî<Jí=JæBI×>@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,­<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUh懍£“ƒg]YtI^uIhwPˆf³²–èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN at ZN@YM?YM?YM?XL>XL>WK=VJ<VJ<WK=WK=XL>QI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}¥„…±†‰´‡‰¹Š‹Á‹ÈŽÏŽŽÔÕÓ”Ó‹ÊƒˆÀ|¸u|²ov­io«ljœ€lˆ“cy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+­<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~ƒ¬—†ykmˆ]o‰ZyŠ`—r¶·˜ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö­¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YL<YL<XK;XK;XK;YL<YL<YM?SI?TJ>UL=XL<YN:ZM:ZM:YN<YM?ULEXOR_Wbd_sjfsoyy|~¤~€©‚²ƒ„¼††Æˆ‡Ë‰ˆÌ‰ˆÊˆˆÈƒƒ¿|}µvw­pq§kl¤fg l`Ž‚`q•V^³N^ÒJ^ì@X÷6Kþ3Fþ9Có?BéD@áHBÞICâFIéBJò=Nï>NÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-­=/®>0­=/«<+«<+­<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷<YêKaÝt{µš‰žz}˜k{—f‚•h‘u¬²ŽËÌ­ààÄéìÑîöÞåóÙÙíÑÏæÉÅÞÀ¼Õ·´Ë®ªÈ¤šÁ”–™Ã“¡È™§Ë¬Ë¡µÎ§ÁÒ°ÎÙ»ÙÝÄåãÎìåÕïáÖëÚÒçÒÍãÐÊàÏÈÚÌÃÕǾ[N>ZM=ZM=ZM=ZM=ZM=YL<YL<ZM=YL<YL<XK;XK;YL<ZM=ZL?VJ>VJ>XL>YN<ZM<ZM:ZM:ZM<[OAWMDWML\RZ^Xfb]qjfspwv–xxœ|{§~µ„¿…‚ň‚ȉ„Ç‚}¿y·zu­xq§vo¥tk¢pg za‹„QZ™HE³EHÓHOîBNø:Fþ6Aþ9@õ==îA=æD?ãEBäCHèAKî=Më?MØ?BÑGDÅA<ÃG?²9.³:/ÑUKÃ>5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò  ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,­9*­9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzƒÿ‰ÿy€ôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº‹™©„‚žn~šg—hœq¡©‚´º–ÈÍ­ÕܽÌÙ»ÁÔ´²Ì©§ÂŸž¼˜š¶–²Œ±†‰³†µ~¹„•À‹œÂŸÄ‘¨Å™²È¡¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZL?ZM=[N=]M=^O<\O<\O>YM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{u³ƒ~ÁŠƒÉŠƒÇˆÀŠ~¼ˆy²ƒr¨†r§t«‡l£†\„HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°</²<0ÀD8ÒMDÇ61Ô;6Í2.Ì3.ÖC;Ç?3µ6'»>,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyƒõq|ÿ|„ýw€út}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´•€’¡zƒm}™f~”c‡—j”Ÿwž¦ ¨ƒœ¨„’£Š£|€Ÿvzšqyšo|r vƒ¤u‚­wƒ³y‹¸‘¼„“¾†—¾‡œ¾Œ¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZM=\L=]M=]N;^O<\O<\O>]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxp¬€y¼‡€ÄŠÄ€Á~ºt«Œn¢—q¤¡u¨šjž™W{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|„øv€þ|„üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®Žw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸk¬t„±vŠ·|»}¼“¼‚–½†›»‰›µ†¡³‹­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\L<ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<\L=\L=]K=]M=]N;^O<^O<\O<_RA]QA\PD[NFZOK[PN]QS]RZ_SgcXvh]…kb‘sk¤vµ†}¾‰}½—…Á™€·›v©žpž®u¢ºv¥µi˜±Rt¸<D¾5-º4+À<0ËC7ÓE9ÛC8ä?9ñ=<÷:>ù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+­9*©8(­9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dð<Eé5>ä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿˆû|ƒû|ƒûyûx€ÿwÿsÿn}ÿgvû`pü[mõG^ÿ<Zÿ>\ìFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~£mƒ¬r„²tˆ¶x‹¹y‹¹y¹z‘º~”º“±•¬€›©†©­’ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{·ˆ{³™…º¥…´¯€ª¸z¡ÆxŸÑuœÌcŒÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ<Aú=Dø?GðAHâAFÒ@AÆ?<¿?6¶<1¯9+«:*ª9)®8*¼>0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò<Ió9Gè)8í*8ñ-9ô0:ñ27ê01á+*×(%Ø0-Ú72Ô2/åC@ÿspõVSÝ>;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À</¿9-À:/Å<2åXQÜMGÊ70Ç0)×<7ÞA:Ú;5ß<5ç>9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿ„ˆý~…øy€øy€üyÿx‚ÿt‚ÿn}ýetù^n÷VhóE\ý8Vÿ<ZîH\ÇYZŠlRcrG\tB\yCdzIl}PtVvƒXrXoWm‡ZlŽ\o•buh{¤l¨o„ªq…«p…­q…±tˆ´u‰·v‰·v‰·v‹¸w¹z‘´|«{’¤|›¤…­«–¾²¤È·¯Ç¸µ´«®¡ž¥—’™[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]L<^K<^K<^M=^M;_N<^O<^O<^O<^N>^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xr¢w¨ƒv¤”}§¬†«Â‰©Î‚žÚw”ál‰ÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}öw~üyÿx‚ÿsƒÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWh<Yq?[vCfyKn~QtVx…Zyˆ_wŒay•exšhz m|§qªr„«r…«p†©o‡­rˆ°t‰³tˆµt‡µt…·r‰¸t‹¸w¶{Ž¬xŽ£x™¤‚­­•À¹§ÎÀµÒÄÁ¼¹À¨ª¶œœ¨ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:[K;[K;\L<\L<]L<^K<^K<^K<_L=^M;_N<^O<^O<]N;]N;^O<_O?_O?`P at aQAbPFbNPcN]_Pe`Usga…to—{t}q—v–®ƒŸÌ‹¡Û‚–ær…ëduéPdé;Rù3Lÿ<QûERéDKÕ?@Î@>ÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î</Í<+Ë:)Ä;(´;&­:%¯<)³>-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}÷xýz‚ÿx‚ÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€©o‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµp…·r‰¸t‹µv‰¬tŽ¥wš¨„°´™ÈïØ̾ÚÑÌÂÂÌ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aP<bOAeMMdMW`O_aUmgb€uq’|v˜€s‘uŽ­€”͆”ß~‡îqyùclúP[ú;Mÿ*Fÿ2Qÿ<Sñ<Mà<E×@EÕCDÔBCÜCEàBCäADâBDÞDBÔC>É@8¾>3¸>1¯9+¨7'©:)­<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆ</Æ:-È:.É7*Í6+Õ8/Õ4,Þ7/æ93è62é1/è/,î1/õ15ÿ2Cÿ0Eÿ-Fÿ*Bÿ%@ÿ#=ü 9ö 8÷'Aõ+Eõ.Mõ/Pó+Pô)Tÿ2`ÿAhóCXÿ`mÿhuøVeíKZñL\ëBUÚ2Cë@RÝ7CÉ-1º((±.$«8&¥?&¨@'¸?.¼:,ÝYMá]QÍG>ÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿˆŠÿƒ‡ùzû|ƒÿ{†ÿx„ÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„¦t§r}¨p¨n©mƒ©l…©l…¨n‡«n…­o…¯o°l€²k‚¶n…·r‡³t‡­t§wœ¬…²¹šÈƯ×νÙÒÌ»¿Ê¤¬¿’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–«•Æ„’Ú}…ðuzþlmÿY[ýDLþ/Iÿ5Rÿ<Uó<Né?LãCKÝBHÖ=@ÛACÜ@AÞ@AÛA?ØC?ÐA9Ç>4½=0µ?1¬;+©8(­<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(›?&œ>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%­9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿ‰‹ÿ‡Šû€…þ†ÿ}ˆÿv„ÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹¥vŒ¬z†«wªr~§m|¥i}¥g¥g‚¦i‚¥k‚¨mƒ«m‚¬l®h~°i³j„¶o‰¶s‰¯rŽ¬x™°„­»˜¿Å©ËʵËͶ½Åžªº‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P at bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ²ƒ©¥‡©¾ˆ Ð‚’ây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ<Gå>Fá<Bß<?Ú<=Ö<:Ï>9Ê=4Á;0¸:,§6&¯A0­<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&™2!™6#š;'Ÿ<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼</³9,­/#«(³-$Ã9/ÒC;ØH?äPFßE=Ú70Ý0*ç0,ò21ù13ý14÷/1ö01ö01ó0.ò0.í2-æ5-Ý9/Õ=0¾2%À>1¹=3Ö_Yésqÿû„†û‡Šÿ„Œÿxˆÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€¡jƒ¦n‚¨o€§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~­g®f±gƒ³i‡µm‹´r°vŽ®|™´‰§½™±Á¤²Á®¦²°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡»‡ŠÁž•Ê£‹»«£¹xÓyƒê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À</·<,«<+ª?-©8(²:,ÁA6Å<4Ç61Ô<7Ò50Ö5-×5*Ø4(Ù8&Û:&Û;%Ú9'Ý6.æA;ëMDáI<Ð>/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,™/)(’(ž-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾</·=2Ó^Wévsÿù…ˆø…Šÿ‚Šÿt…ÿf|ÿ\vÿXtÿQoþIhü@aó:Zñ?_áI`ÁS\{?7RF.M_9ZvCe‡Ks•Yxœ_wb{¡f}¥i}¦j|¥i|¥i|¤h{£e{¡d{¡d}¡c~¢e|£j}¦l}©l}ªi|«e}­c¯c‚±c…°h‡²kˆ¯pˆ«s‹«|¬„ª‡Œ¢‹x‡€dppR^^]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8^K:_N>aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†sv£|ƒº‚ŠËŠÔ˜‘× ŠÊª‚´¹}ŸÏ€“䄆îvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>-­>-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#œ' š%©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿ“’û‡Šúƒ‰ý~‰ÿr‚ÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{£g{£gy¢fy¢fy¡cx byŸby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`‡²jŠµn‹²s‰¬t†¦w‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~µ†Ê…ŒÚŒŽáŽ‡×Ÿ‹Ó­ŠÄ³€©½yŽÌ{Þzò‚wÿsrÿcgùU\ôMTõGPôCMò>Gï<Bå6;à88Û97Ô<7Í@6ÅA4¼A1·?.«:*­>-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿ“’üˆ‹ý‰þz‡ýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wby¡ez¢fw dv awŸavž`xŸ`xŸ`{Ÿaz cz¢fz£gz§fz§bz¨`z¨]|«]~­_†²g‹´nŒ³tŠ­s†¦u€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN at XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}«z‚Á‡Ò„ŠàŠ‹å“ãŒÚ „¿žuŸ l‚¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï<Bê7=æ5;á78Ý98Ö=7ÎA7ÆB5½B0¸@/­7)´@3¯:0°;1ÈRHÕ\QÉMC»;0¾90Á7-Ì9/Ö>3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿ’‘ÿˆŒÿ‰ÿw…úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcy¡cx buŸ`uŸ`u_vž_wž_xŸ`{Ÿaz¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^€¬a…¯g‡®m‡ªp…¥sƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨w¶zƒÄ~†Ï„‰Ú‹ŒÞ–Ü™ŠÍ›…¶¢ƒ£ª„‘«~yŸl[šQ>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿˆÿ|ˆÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{Ÿaz¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_ƒ­e…¬k‡©m‰§s‰¥u„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~¡|¥}w£{u¥xv§sy©s}°x¸{„¿~†Ä„‰ÉŽÎ”“Íš“Ç •½«›µ¼¦²É­©Å¦”ªˆmœfJœE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ë<Aç6<â-6Ý)2á1;ç<DðLSý]eÿksÿjsú`jöZgùXh÷[fôddèZVèWTØ@=Ï10Ô44Ó33áC@ãJEéRKêSLáJAÙ?7Ø93Û81ã33ó.7ÿ0>ÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿŠŠÿ‡ÿv†þi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX at ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_‚¬d„«h†¨l‡¥o†¢q€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P at ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwµw|¾x€Á}…Ä‚ˆÄ…ŠÁ¿—–¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»–Ьˆ¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà<Cþ[`ÿouÞ=Bÿ}‚ÿmqêQTÔ>@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿ‡ˆÿ†Žÿp‚ücxñ\pôXn÷OiûBbÿ9aÿ<döAbäRg°QWd/'WD3GG/RT<U^?btLiQq‹[v’_z˜b|dxœ_r™Zn—Un—Un—Uo˜Vr™Zt›\w›]wž]wž[x¡[y£[w£Xv¢Wv¢Uw£Ty¥Xz¤Z~¦_¦c¡d~œf{—frŒ]i‚X`vRZoPRgH\L<^N>`P@`P at _O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|¥~€±€¹}ºxz·rs´lo¶twÈv{Ì€ƒÊ‹Æ–—䤾²°»¼¹´ËƳÓÌ°ÙϬÛϧÜÏ£ÝУÙ˜٘Ѩˆ¸€g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~„ÿ~†ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿ˜šþ{ƒÿm€ÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]zž^u—[m‹Ub~MXrCSj>AW0?U/<R,[K;^N>`P@`P@`P at _O?`P at aQAbRB`P at _O?`P at bRBcSCbRB`P at fVG_QF\OG^TSaZad`omkƒvw–wy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~Õ‰‰Ó˜˜Î¨§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔǛӼš»œ€©}dÅ‹wÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿ“ûs}ÿfzÿ^vùWo÷OiùFfû?bü<cô@cåOh¹KVx;8L2#<:#<B(EG/OS8VdA`rJnƒXu_v“]t“Xq“Vp”Tk’Ok”Pl•Qm–Rp—Vr™Xsš[sšYt›XuWuŸWuŸWtžTržQqRpœQn˜Pl”NhŒLbFXu?Ni6F]/@W+ at W-@W-AX.YL<[N>^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}ׇ„Ý—”Û©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡ËÃœ¸¯©››ƒk¨ƒp§o`œRGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿƒˆølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\<YkEg|Qr‰[tZqUmRkOiMi‘Ki’Lk”Pm–Tn—Up—Xq˜WuœYuWtœUrœTpšRm—Mk•Mj”LeGaˆE[AUt;Li3E`-AX*>U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xz£z|­w|´sy·mr´bi¯]d¬ag±lr¾x{ʉ‰ß•‘夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îê­îè¬éâ«ãÛªÚÓ©Ë¡»¶™¥¥›™„“ˆv˜q™rc›bW³i`Ïrmû‹‰õutê[]æLNèCGí@Dì<?é;<ß:8Û<8ÞE?ÓC;Ã:0º:/°6)§1#¿I;ÛaRêk\ÛSEÉ:,Ì4'Ô6+×4-Ù42ñMKþZXíKFÙ80Ö3*Û4+Þ2(ß.&á,%á,%Þ-%Ü1)Ú6,Ù;0×?4Â/'Ä4,Î:6ÙCBßFHàEIäGNêMVñQ]öVbøXbù\eÿgpÿmuôYaÞ;@ê17ñ.4ò-6ð+4ë%2ì(4û=IÿS_í?IèAIêGLôQVÿY`ÿX]ôGMä68á53ä73ê;8ò@>ô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿy€øgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P at _RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xw¡xz«y{´sy·jr³`g­[c«_g°jr»v|Æ€„Γ•àžžä­®ç»½æËÉßÔÓØÝÛÎáßÆåá¾æâ¼äß¹à׶ÚеÎƱ¾µ¦­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meºoi扄î~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn at ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~ǁ‡ÑˆŒÓ™Ý£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþŹ¹´¨¬£šŠ‹†x{tyvquleleogŽa[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo at YpB]rG^uG[sCYtAXs at NB2QE5UI9WK;XL<ZN>\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wx¦vw­pu¯jo¯ah¬^f®_g°em¶pxÀ}…͉Ø—Ø™ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦˜¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M at 0JC0@F,AO.K[6Xj at bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu at JC3MF6QH9TK<WK=YM?\O?^QAdWFeXGdXHbVF_UIaWMg^Ulcfwr‰yušxvžtsŸrr¤tu­lp¯bg©Za©_e¯fl¸ms¿v|ȁ‡Ó“Ý—œÞ›¡Õ §Ó©­Ú®³Ý±´Ý²´Û´´Ú¶´Ûµ±Ö³­Ñ®§É«¡ÄªžÂ¤˜¼™‹¯ˆ~™|x†dbgiefcYZj[X{c_yVP’c]ŠNF¢UM½`XÖkcñwrÿzÿzwÿnjþa\÷TOéGBîOIÝB=ÞG@êWOº,"¾1'¾4'Ç>.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨yw©pp¦gg£`a¢\_¤`b­fhµopÀyzÌ„‚֍‹ß–’眙栞ݡ¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ Ó¥žÑ£Í¢šÉ¢™ÈŸ–ٍ»Ž‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPµXPÁZSØkdìyrù‚|ÿ‹†ùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿ<gø>cçNj¯IV^$"D, ?:'HE4PM<PI9EB1>C/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC<JE?PE?TG>[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtp¢pm¢gfŸaaŸ]^¡\\¤ed°kjºtrÅ}{φ‚ٍ‰à”Žæ˜“å›–Ùœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ñž–Ñœ”Íœ“Ê›’ÇšÄ“‰»ˆ®‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RºYRÁXRÓfaàqjãvoí~wý‡…ÿ‡…÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb‰8?S*$A5'69(;<,B at 1DA0@?-=B.>G,=CKP'\b<eoJhvRezQd~Od‚LaƒFa†Aa‰@cŒ@gDiŽHkMl‘Nl‘KjGhHf‹FgŠJf‰If…JdƒHfƒKdIdHd€FeGeGfEb~A]€>_„?b‡B69.:<1??7DA:KB;OE<VH=YL<^O<\O<\SB^WMc]]helom{sq‰so”qk™jf˜c`•\[”ZZ˜\] \_¦hjµno¿wxÊ€Ò†„ØŠˆÜ‹à‘ŽÝ“Ó“‘Г‘Г‘Ò”Ñ“ŽÑ“ŒÐ’‹Î•ŒÍ“‹Ç”‹Ä”‹À“‹¾Œ„³ƒz¥€r•|ewu^fi[[d[Vd[RfXKrVH„TH£ZQ½`YÉ\YÏYWÛcbákißokãvqûŠ„ÿŠ†ÿ…ÿ}y÷nhîaXÄ4+À2&Ä8)Á:'À9&À9%Â9&Æ;(Ì:+Ð:,Ö:-Ó5)Î5'Ð8*Ô>/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE<VJ<XL<YM=YQD^WOc^bigron€roŒrm•jg”`^WW‹TUŽWX˜\_¢ac­ln»rsÃ{|΂ƒÕˆ†ÙŠˆÛŒˆÜŠ×ŽÒÎŒÏŽ‹Ð‰ÑŽˆÐŽ†Ï…Ώ…ÊŽ…Ə…Á‡¼‡¶‰‚¬€xoŒ€_p|Y`lXYd[T^_Q_\IjWF}SEžUL¾\YÐY[ÙX\äcgçkkáplåxsì}vízsþƒ~ÿ†ÿ{õkaÉ<2Ä8)Â;(¿:'¿;&¾:%Á:&Å:'È9)Î8*Ø:.Ô6*Î5'Î8)Ñ>.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe€0=J C1-11'.6'4=,=B.B at +B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cªfj´orÁuxÉ|Ђ…Ö†‡Ù‡ˆØŠ‰Ù‹ŠÖ‹ŒÏ‹ŠÌŠ‰Í‰‡Ð‰…ш„ÑŠƒÑ‰‚ÐŒ„Ï‹„ȍ…Á†º†°‡¥~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ‚{ÿ‡~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…S£lª¾‹¨¾Ž¥wo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD<NH<NG=OJDWSR_^ffeugggf†ba‰[YŠQQ…NO‡RS“[^£ei³lo¾uwÊz|сփ…؆‡Ù†‡×ˆ‡Õ‰‰Ó‡ˆË†‡È†…Ë…ƒÎ…€Ð…€Ò‡Ò‡€Ð…ÒŒ…ˍ…ÁŒ…¸‹…«„{v|jz„VcPVnUQd^P[eMXbIb^EsXCOE´WRÐUZÚSZç\cèagågjèpoìyræqh÷|tósjþxmæ\QÄ;+¾5#Â;'Á=(Á=(Ã<(Ä;(È;)Ë9*Ï7*Ö5+Ø7-Ô:.Î:,Ç:)Ä8'Æ:)Ê=,Ï=.Ö@2ÙA4Ö>1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:…TŸ®w©Á‡µÎ—¯Ç“’®}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IE<HE<KHCRPQ[[eabtbb|``‚_^ˆZXŠTTŠTT\] gi³psÄvxÍ{Ø~‚Ûƒ„Þ„†Ý„…؃„Ö…„Ô†…у†Ë‚…ȃƒË‚Íƒ€Ñ…€Ôˆ€Õˆ€Ó…Ò‹„È‹ƒ¾‹ƒ²‰‚¤|“wp€veo~U[|PQnUNf_O]eMZdIaaGq]E‰TF­]TÈZ[ÔVZâ[aæ]déaeîllõzsírj÷xoÞYPå[PÒD8Ã5'Ç:)Å:'Ä<&Å='È=(Ê;*Í:*Ð8*Ô6*Ó0'Ô3)Ò8,Í;,Ç;*Â;(À;(Ã<)È;*ÕC4áK=ÞH:Ó=/Ê4&É5'Í;,È9)È9)È9+È9)Ê8+Ê8)Ë7+Ë7)Í6+Ò<.×?4Ø@3Ú@6ÛA5×:1Ò1)Ü0.å14î49õ6>ù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚P¢§q±ÅŠ¯ËŽ°Ì’¦Ã’®}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD<GFBOOQZZd_ap^`y\\~`_‰\ZŒYX‘\\šgg­qsÀz|р܁„ႅ䅆ㄅჃہ‚Õƒ‚Òƒ‚΄‡Ìƒ†É„„̃‚Î…‚Ó‡‚ÖŠ‚׌ƒÔ…ÐŒƒÄ‹‚·Š‚«…›xˆsnuqbevWUtSLjVKf_MbfM_eIcbFp^FzQ?[M·ZSÅSR×VZâW\êY`òce÷rmñnf÷qhÑD;ÔA7Å1%È4&ÔC2Ç9%Ç:&É;'Í<)Ð:+Ó:,Ø8,Ù7,Ï,#Î0%Î6)Ë<,Ç@-Á>*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<?ÿ\fÿQhÿIfÿ9]ÿ=hù.]ý<hé;\å\p¦LV^..G83BC><89?48E26C41=:)>E&FU*bs?›a­½±ËŒ«É‹¦Ã‹º„Ž¬z{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE at JLKORYVXeZ\s]^}YX‚[Y‹^]–ee£nn¶wxȁ؄…⌌ðŠŠì†‡ä‚‚Ü€€Ö‚€Óƒ‚΀ƒÈ„ǃƒË„„ΆƒÐˆƒÓ‹„ÒŒ„ÏŠ€ÅŠ€¼‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î</Ç8(Ê;+É:)È9(Ç8'È7&É6&Ë5&Ì4&Ð7)×;.Ü>2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78 at -1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚¬ÊŒŸ¾‚˜¶€”²~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utº~·‡ß‹ŒéïŒŒð‰‰ë…„ ؀~Ҁς‚Ì…†É†‡È‡ˆË‰ˆÎ‹ˆÏŒ†Î†ÌŽ…ÈŠ€¼‰±†|¡‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æš¹}š¹€š¶ƒ©xrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1 at B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zx·…ƒÎ‹ßêŽïŽŒíŠ‰ç‡„߁Ó|Ë}ȀƅLjˆÆŠŠÊŒŠÉŒŠÉŒˆÅŒ„¿‹‚·‰€­†|¡€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Î</Ä6(Ä;+¾6&Æ:)Ç:)Ç:)É:*Ê8)Ë7)Ì6(Í3'Õ9-Õ7,Ö3*×3*Ú3+ß6/å:3é<8ð<=í49ë07ì18î3<í4<ë7@ê=CÝ7;áAAìNKøYUýZUúQLïB>å84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa‚89e?6R at 2DA09=,57)>6+K9/E-#R=,g]Bˆ_’«t—»{–Áz–¿{”³xœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™Ms¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zw¬„‚ÃŒ‰Ö‘ã”‘ꓐ뎋≅قÌ|Ã|¿€~½„‚Á†…Á‰ˆÂŠÃ‹ˆ¿‰…¸‡®…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,­8&­8'³;-«+"Ã54ý`gÿTdúG\ð<Uë=XçG_áOdÒO_´SZvGAXH9KD2FE1BE0=?*:8#;3?3PG*nkHŠ“f•¬t‘´tŽ·s‘ºxž»…¡¸Š§}l‚[K_:AW0Lc7Wr?_{@dƒ@iŠCk‘Fi‘Hg‘GdHeŽJb‡Bc†Bd‡EgŠHjMlOm‘Qn’Rj‘Pj‘Nj’Lh’Jg‘Gi“Gm—KpœOv¥Wv¦Zx¨\78(68*66,56.56056067/68+;>-=@- at C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}²ˆ†ÇŒŠÓ•’ᔑ␍܋‡Ó„Ä}º|µ|³~·„º‡„¹‰…·Š„²†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ð<?ê69ä15ä5:èBFíMOÿxwÿqnñ`[ÝJCÑ83Ñ2.Ü73ç@:à93à91à72à72â62ã73å76å76æ68ç79ê7;ë8<ë8>ë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g<xT‹™f‘¤m©n²r—¹}Ÿ¶ˆ’§€u†dRcC?P0BS1Oa9Vl=b{Be‚BiŠCjEi’Fe‘FbHcŽGb‡Bf†CgŠHiŒJkŽNmPn’Ro“Sj‘Nk’Oj“Mi“Ki“Ij–InšKržOv¥Wv§Xw¨Y?=.=>.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{y¡ƒ€·‡…ďŒÑŒÓŠÏŠ…ǃº~y¯zw¦yv¥{v¬|y®€|®ƒ}©ƒ}£x—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À</¶8)²:)®;)ª;(©<(¨;'¥:&¥:(¥<) 9( ;) 9*¢6*µ>8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H at +;567>O%Lf6lŠTw”\„›e‰šd›f£k”­t˜°|ƒ•mn}\Q`C<J09F,AP1O_;Wj=czDe‚Bj‹Dk‘Fi’Fe‘FaFcŽGcˆCi‰FjKlMlOlOm‘Qn’Rm”Qm•Om–Pl–Lk—Jm™JrŸNs¢Q{¬]{¬]z«\DA0DB3DB6CC9CC;CC;BB6BC3DF0EH-GJ-JM2ON9RQ?TREUSD\ZC\\D\]Oaaaihxrq{z¦~µ†‚¿ˆƒÃˆ„Á„º{®ys¡to—om•plžrn¡vpžwršwr’to…skzrinmb`l_Wj\Qk[Lm\Lo\Mo\Kq[Mq[No\Nm]Nl_Om`Os`Oz_N†ZMŸ_S¤PE®B8º;2Æ6-Î1(Ö2)Ý5,â70á6/á4-à3,à4*Ý5(Ø7%Ô9%Ï:"Ê="É=$Ê>'Í<)Ò;*Õ9,Ï;-¿@-±<(¬5!®3!º8(Ä<.Ê:/Î5-Ø93ðNIñTMÙB9ÌB5¾?.¦1³<(¾<,Á9+Á7*Â6)Å7+É9.Ï;1Ô;3áD=ãA<ä?;ç>;é=;é;:è88ç85ç85æ95æ74é;:ôJJÿ\[ÿdcøc_Ì=9Á82½4.Ã81ÕA=ÞE@ß=;Ù42â;5â;3â94â94ä84å84ç77é77ê69ë7:ë6;ë8<ë8>è7=è7=é6:ë7:é69æ89à;9Û>9Ñ>6Æ<1¾<.³8)®;)ª;(¦;'¤;(£:'£:' 9&¡>+–7%œ=+š9)š2'ÃPKíkmî\fìP^éJ\ßHWÍKS¹RS¤[R’cQ€jUJM8DL7JB/H9$B7FH#Up=g“V~³o‚³qƒ¥h}’YƒYŽ–c‰—d|Œ_XfCGT89E-6B*:D,=J0JX7Wh>e|Fh‚Cl‹ElFi“Gc‘Fa‘GaGf‹FlŒImNn‘OlOkŽNkOm‘Qp—Tq™Sp™SpšPo›NqNt£Rw¦U|­^z­^y¬]IC3JD6IE9IE:IG;IG;HF9HG5IH3JJ2LL2NN4RP;TQ>XRDYTA]Y>[Z>\YH^[Tdahnk~xs“}x {§ƒ}«…­ƒ|¦}wunoi…kg‚ieˆjf‹mhˆmi‚mh|lfrkbgj`^g]Th\Nh[Kk\In]Kq_Kq_Kp]Lp]Np]Op]Ns]Ow]N~]N‡\L’XL¡UH¤F<«9/º7-Ê7/Ó6-Ú6-Þ6-ß6/ß4-ß4,ß4,ß7,Ý7)Ø6'Ñ6$Ï:$Ì<$Ê<&Ë='Î;)Ñ;*Ó:,Î<-¾A/¯<'¨3!¬3 ¶9'Á=.É;/Ì8.Ì2*àA;ø[TàI@ÐD7ÊF7«2¹>,ÊF7ÌB5Ê@3Ë?2Í?3ÔA7ÜE<ãF?â@;â=9ã:7â64ã54ä65å97å<9ä?9à=6Ü:5ß@:êMHêQLÓ@9¸)#¸-&¾5-É>7Ñ@;Ö>9Ú;8ã;;ç==â96â96â96ä86å95ç:6é99ê::ê88ê88ë8;ë8;é9<è8;ç7:ç7:é6:æ68â88Þ:8Ö=8Ì=5Â<1¹;-®9(ª;*¦;)¢;( ;'ž;&Ÿ:(›:'˜?-Œ5"™=.˜8*—/&Í\X÷y|ßX_æXdÚQ[ÊKR¹LO©VPž`UgU€nVPW8?J*<;C=UQ+lvDƒ¢f”Á~‡¼v†¸s|žan‚Mu~Q‚‡^u}V[b@;D)4<%5=(=D2<E29C+CP2Ue>g{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UN<VO=WP>XQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*À</Ã9.È5+Î5-Ô:0ÛC8ÝK>ÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&¼LJämoçloÍVZ½LNµNOªQM¢UO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸ¼yœ½x’µs~ah€L\mCYdBT]BHP9?D0:=, at C2<@1:>0<C3:C0AN2Rd>]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNr¡Pt£Rv§UyªYzª^y¦cm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO at YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5¿QP×eeÑ^a·MM¬NL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯n¥¾|™²pˆ bj‚HauBTe;JX7FP7?H59?158-:</AB4=?4:=2=A3:C0 at M3Rd>^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp Ls¢Qu¦Tx©Xx©Xx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.­:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%­5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:1­7+¥7(¡;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=¹SOÀWT¸PO«IF¢MHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“¦n¤¹€«À‡ž³{|[[o<?R$AS+AP/?L2:C06<.69058/9;. at A3=?49<1=A39B/@M3Qc=`vGi…Js’Or–Np”Jm–Jm•Nk”Np”Tq•Uo–Sn–Pl”Kl•Il—Hn™IpLpLpŸNu¤Sx©Xyª[u¦Wq X_‰JVEOx>aXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL at PM>TN at UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Î</Ó:2Þ65à24Û12Ý34à88å;<ê=?ì<>î7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ªPH¬MG©LG¦QLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™©x­½Ž¦¸ˆ¡ts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2Pb<awHj†Kt“Ps—Or–Lo˜Lo—Pm—Op—Ts˜Up˜Ro—Pm–Jm–Hn™Jp›KqžMrŸNt£Sy¨X{¬]w§[mSe’M[…FS|BNw=cZKcZKcZKcZKcZKcZKcZKcZKcZKcZKd[Ld[Le\Mf]Nf]Nf]Lf^Gg_Hh`IiaLiaNi`Oh_Pg^Oj`Ti`Qi`Qh_Nh_Nh`Mh`MhaNd^N`ZL[UGVPBPM>NK:NK:NK:PM<RO>TQ at VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"š4›7 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(­:(­:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=5­7-£5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QI¡NFžNG¡WN˜UL’XLZN\N]R”`U—aWhW‰f˜¥z©€Žj]kHDS42@&$2-:&0;*5=.9?3<?4=?4:;3::099->?1;=28;0;?18A.>K1Pb<bxIk‡Lu”Qt˜Ps—MqšNq™Ro™QršSršSršQp™Mm—Km˜Ip›LsžOt Qv¢Sx§Y{©^z¨_qŸVd’JY†C]†JW~GRyBe\Me\Me\Me\Me\Me\Me\Me\Me\Mf]Nf]Nf]Ng^Og^Oh_Ph_Ng_Jh`IiaLjbMjbOjbOjaPjaPjaPiaNh`Mh`Kh`Kh`IiaJjbKf_Mb]J^XHXRBSM=MJ9KH7IH6KJ8LK9LM;NO=PQ?QTASVESVE[YL^VIcQEzXN¡ha¶eaÄVUÖQRÙ@Cß:>Ü87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$™6•5›;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OA£YNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2<?6 at A9?A6<<077+89+>?1:<17:/:>07 at -=J0Oa;bxIk‡Lu”Qu™Qt˜NqšNršSpšRršQsœPr›Op™Kn™Jp›LsžOv¡Ry¥X{§Zz¨]x¦]qŸWg”O]ŠEX‚B`‡NY€ISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IM<HO?JN?PQCXRF[OCiRDƒYM–VL°SLÔZYÛIJâ?Bá99Ú72Ï;1Â?-´B*³<$É:)Ó7(Ô8)Ó:*Õ9*Ó:*Ó:*Ó:*Ò9)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á=0µ=/¬=,£<)˜8 4•9 ¡A)­C-¶A/¿=/À6+Â/%Ç0'Ð6.Þ:8è59î6>ì;Aê@CæAEàBCÜ@AÙ??Í12Ð66Ó:<Ñ=;É;9¾71µ4.­4)ª<-¥>+¥>+¥@,¥>+¤>(¦;'©:'ª7%²7'¼8+Å8.Ì70Ô94Ü=9æ>;é:7ì95ì95ë:4é;4è;4å=4â>4àB7ÝC9ÚC<ÕB;ÏA=Ê?<Ç=;¿>9±<3©:/¢8+œ6(˜7'”8)‘:):(‹=)‰<*‡<)ƒ:'‚9(€7&6%}6$x3#x5%…B2˜UEWK”PCPD•ZL“YMZN\Q\Q’[T•\U˜[VŽbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG<CD6@>/;9*78*=>0:<17:/:>06?,=J0N`:awHk‡Lu”Qu™Qt˜Nr›OršSpšPq›OrNqœMp›LošKrNu¡Ty¥X«`~©az¥]qœUf‘L_‰G]‡E^ˆIb‰PY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PM<ML:EF4DG4DH7DH7BI9BK:BK:CJ:IK>SQDSPAXL<eK:tE5•H>ÂYSÙROàDEà::Ü75Õ;3Ê>/º=)µ8"É:)Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á;0¶:.­<,§>+™9#3“7Ÿ?'£9#°;)À>0Æ<1Ì8.Ð7/Ù<5ã?=ì=Bî?DéCEâDCØ@?Ê;7À50»1.¹/,¼51¾:6»<6³:2ª8.¤8,¡:+¡=-Ÿ>+ ?,¡@-¡@-¡A+£>*¦=*©;*­:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G2<E43=2-7.1817>6BE<GJ?HI;BC1?>*;:&78(=>09;069.:>06?,<I/N`:awHj†Ku”Qt˜Pt˜Nr›OršSpšPqœMqœLqœLp›Kp›LsžOw£V{§\‚­e€«dx£\j•P]‡EYƒA^ˆHePcŠQZJSzCi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj`Wj`Wj`Wj`Wj`Vj`Vj`TjaRjaRjaPjaPjbOjbOjbOjbMjbMg_Jg_Jf^Ie_Ib]IZXCSP=ML:HI7EH7AE6 at D5?E7?G8?G8>F7GK=IK=AE4KJ6\Q;aE/ƒJ9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)š7"”5•7œ9"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7 at +2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.Pb<cyJlˆMu”Qs—Or–Lp™MršSq›QpLqžKrŸNrŸNsŸPv¢U{§\ªb‚­fx£^j“O`‰G^‡Ea‰JfŽPhTd‰S[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj_Yj_[j_[j_Yj_Yj`Wj`Vj`Tj`TjaRjaRjaRjaRjaRjaPjaPh`Mh`Kg_Jg_Jd]J^YEUR?ON:IJ:EH7BD6 at D5?E7>F7>F7=E6 at F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/Ÿ6#–1–1›2¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*<H4OXGYbQ_fTW\FJN7BE*??#<<"9:(=>0:<19<1<@25>+;H.Pb<dzKlˆMu”Qt˜Pr–LqšNršSq›Qs OrŸLpLqžMt Qx¤W|§_ªc{¦aošUcŒJ]†Da‰JeNeNc‹Od‰S[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Uj_[j^^j^^j_]j_Yj`Wj`Vj`Tj`Tj`Tj`Tj`Tj`Tj`Tj`Vj`TlaOk`LiaNiaNf_La\HYVCSR>MK<HI9DF8AE6AE6?F6>D6<D5=F57 at -@H1IK3F?%W?'‡ZC·s`¶VJÙbZðebìTSæFHëGHæCDØ;6Ë7+É:*É:,É:*Ë9,Ê8)È6)È6'Ê8+Ë7)Ë7+Ë7)Ë7+Ì8*Ì8,Ë8.Â3-¾5/¶6-­3(¡0"ž/ 1 §3$¼A2ÇC7ÖG?áLFçLGéJFåFBßD@×CAÏDAÁ@:±;1¤</¡A1œE4˜E3“D3‘D4B2ŠA0…@0‚A/~A.@.†:*‹9+‹:)Š;*‹<+<+Ž=*<*–?.–=-›;+9* 8+¥9-©;.®9/¸:.¾90Á;0Ä>3Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆH<OB‘SH’RI’OI™TO™SQšVSš]Z“YU[Tl[}X~‰^€‹alxRLX46D#=J.LZ at eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,<I/Pb<dzKm‰Nv•Rt˜Ps—MqšNršSpšPu¢Qp LnLpŸOu¤Vy§\}¨`|§`p™UfM\„E\„EeŒMiQfN_…HcˆRZLSxEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Vk`\k__k`^k`\k`ZkaXkaWkaUkaUkaUkaUkaUkaWkaWkaXkaWnbRmbPjbOjbOhaNe^K_ZGYVERO>MK<GH:DF8CE7BD6 at D5<C3<H49B-FJ3LF0O:%qL9šcOª^N¡A5ÆSLçc_ð^^íSUëJOéDHáAAÌ91Ç9-Å7+Å7+È8-Ê:/Ë;0Í:0Ñ>4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/¢<0ª:/­8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`<crQetU\iKNX=CL1?E+>B)=A(;='78(:;-79.9<1=A37 at -<I/Oa;bxIlˆMv•Ru™Qt˜Nr›OršSo›Pq OožMožMs¢Rz¨]|ªaz¥^u [cŒJ^‡E[ƒD_‡HgŽOj‘PfL`‡Hb‡QY~KRwDi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Tk`Zk`\k`ZkaXkaWkaUkbSkbSkbSkbSkbSkaUkaWkaWkaXkaWocUnbRkbQkbQkbQhaOd]M`ZJXRBRO>NK<IG8GE6DE5BC3>B1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9-Ÿ9- :,¡9,¢8+¢8*¢8*Ÿ8)œ8)˜8(”8)9*Œ:,‰:-‡;-„:-‚:,9+€8*}8)}7+|8+{9+z8,y9-x:-v8+q5*o5)q7+t9+ŒH;I<‰I=„I;…K?ŒRF“WM˜XO˜QMœUQ˜RP“VQ’`YˆbWƒg[†zdnrQZi at JY0AR(IZ0Wi?dvNj|VXiEL[:?L.:D)<D,>C-<A-:=,89+:;-68-8;0>B47 at -;H.L^8_uFi…Jt“Pt˜Pt˜Nr›Os›TpœQnMmžLp¡Pw¨Y|ªaz¨`rXi“QZƒA\„EaˆIeŒMgŽMgŽKhJfŠLc†PY{IRtBi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkaUlbYlbYlbYlbVlbVlcRlcRldQldQldQlcRlcTlbVlbXlbXlbXocUnbRkbQlcRlcRkbQg`Pd]M^WGYSCSM?MJ;KH9GE6EB3?B/;H.?H-OC-a=-ƒE:«XR´NJž,+²:9¹=;ÓSRòpnþvvñehëX^ð^_ãUQÚPFÔG@ÐC:ÑD=ÔG>ÖGAÖG?ÙHCÚJBÜHDÝJCÞJFÞKDàKGàKGâHHáGIÜHHÙGGÖHD×HDØGBÛFBàBAäABæBAèBBçCBäB@ßA>ÛA?ÛJGÊC?¹<6®>3¢@3˜A0A0C3ŠA2ˆ@1‡?1…=1‚<0€<1=1=1;1;1ƒ:3;1;1€</€<1=/€</€=-<-€;,‚:,9*‚8+ƒ7)Œ:.8.‘9-”:/—;.š=.ž</Ÿ>.™9)–9(“:*:+Š;,‡;+„;,‚:+‚:,9+7)~6({5){5){5)z6)x6*x8,w9,s8*p4)o5)r:-v<0‹M@‰K<„J<‚M=…QC‹VH’XM—WN“NI™TO—VR•\Ue\{^PfVF`^GEO->N)?O(J\2_rEk~QexKXj at M_7@Q-6E&7D*=F1=D4:>07;-8:,:;-68-8;0>B47 at -9F,I[5[qBeFr‘Ns—Os—Mr›Os›TpœQmœLo Os¤Ux¨\z¨`s [i“Q`ŠHYB^†GeŒMgŽMfJeGgŒGhŒLa„NXzHQsAi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbXlbVlbVlcRlcRldOldOldMldMldMldOldQlcRlcTlbVlbVocUmaSkbSlcTmdUlcTi`Qf_Ob[K^WGXQARL<OI9JG6IC3AC.:G+ at F*U at +xG9£PL´HH¶8<º39ÈAEÄ?@ÊJIßb`ñqpðnpçbeâZ\ÛQNÕLDÏD?ÍB;ÏD?ÐE>ÐB>Í@9ÒC?ÒC=ÔC@ÕD?×CAØD@ÙECÚDCÝADÝADÞDFÝGHßIHàJIãIIåGHçACêADìBEìBEçAAâ@>Û=:Õ=:ÚFFÉ=<¹83°;2¦@4˜?1‘>0@1Š</Š<0‰;1ˆ:0‡81†93…:4„;4;3€<3:4€<3<3}=1}=3|<0|<0|=.|=.{<-|:,{9)z8*{7*‚:.ƒ9.‡9-‰9.9.‘;.•<.–=-’9)‘:):*Š;*‡;+ƒ<*€;+~;*€8*€8,~6*}5)|4(z4(z4*y5*u2)v6,v8-r6+o3)o5*s:/x at 3ŠPB†N?N=‚Q@…VF‰XIŽUJ‘RI’OI—TN“TO‘\VŠfZn[JPK7EK1AN0KZ9WgC`rJgyOdzLVl>G]/AV-7H$1@!6B*=F5<D98=67:39;.;<.68-9<1?C57 at -7D*FX2Vl=a}BoŽKq•Ms—Mr›OtœUqRožPq¢Qu¦Wv¦Zs¡Yj—RbŒJ[…E^†H`ˆIcŠKeŒKfJfŽHf‹Fe‰I`ƒMWyGPr at i`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbVlcTlcTlcRldQldOldOldMldMldOldOldQlcRlcTlcTlcTnbTmaSmaSmaSmdUlcTjaRg`Pd]M`YIZSCUN>PK8MH5ID1DC. at F*DD([B,ˆTG¯\X«>A¬/3ÎINÆ?EÀ;>»;<ÄFGØZ[ãefÛY[ÌGHÑJGÐEBÍB?ÐB>ÔFBÔFBÐB>É>7ÏD=ÏD=ÒD@ÔEAÖEBÙECÚDEÝDFÞ?Cß@DÞBEßEEáGGàFFàBCá>?èBDé@Cè>Aç=>ä>>ãA?áC@ßECÖBBÅ98¶50°;4¦?6š>3=/?2ˆ</‡:0‡:0‡81‡83‡83ˆ94ˆ;5‚92€:2€:2;2~<0~<0|<0|<0x8,y9-z:.z:.{<-{<-z;,z;,};/9/€7.7,„6*…5*†7*†7(Š8*ˆ9*ˆ;+…<-„<-€=,~<,};+}9,}7-|6,y5*z4*x4)x4)x5,r2(u5+v8-r6+n4)n5*t;0xB6ŠUG„PB€O@„SDˆWIŒVJŒRGNG•TN”UN‹RK„XMdSeZDGK2=J,IX9ZkIgxTcxQYnESh=Nc8J_4:L&0?,95>)=C5<B8:<79<5;=2;=079.9<1?C58?-8B)EU1Uh;azCnŠMr“Nr–NršQsSqRr Uu£Xv¤[t¢ZošUfN^ˆH[ƒDdŒNa‰K`‡HcŠIfJgŽKeŠEa…E`ƒMWyGPr at i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbQkbQkbQkbQlcRlcRlcRlcRlcTlcTlcTnbTk]Pp`QtdWrdWnbVj`Th`ShbTgaSgaQc]M[VCVQ=SN8NH2GA)KG,I?$bI3‘gW¶xm»le¸YW¹OO¶BE½BEÂDGÈFHÍHKÐJKÒLMÓKMÏEEÐDEÓEDÖFEÕFBÒC=ÎC<ÏF<ÈD8ÉE9ÊE<ÌE?ÒD@×CCÚADÛ?CáBFâBDáCDàDEàDEáFDãEDäDDãCCäB@ä@?ã?>ã?>â@=â@=ÞC?ÓB?Å>:¶93ª70Ÿ:0—=2Ž>3†>2ƒ?2?3=2;3„93†93ˆ81ˆ92…;0„<.„<.ƒ;-;/€:.€:.€:.~:-~:-~:-~:-};/};/};/};/}90}90~80~8.€7.€7.€7.~8,€8,~8,}9,|8-{9-z8,x8,x8,x8.x8.w7-v8-v6,t6+s5*q5+m1'r6,n4)m3(o6+m4)q8-I=…SH…SJ†RGˆRH‹PHQJ”QK•RL“TMTK‰[N‚cQo_HYU:MV7O_;j~YbxQYoHUjCRg at Mb;IY5CR17D&4>#2:#6;'<>0 at B5@@6<>358-39-4:.7:/9=/;?.=B,<E(S_;arFn†Rs‘Ur•QršSsSrUužZ~§e~§ep˜YbŠK^†G^†H^„G`†IbˆKdŠMfNeŒMcŠK`‡H^„G_‚LTvDKm;i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrbSqaRrbUqcVrfZogZmeXjdVgcWkhYoiYlgThcOc^H[U=RL4PJ0H>%Q?)kP=XG„NBˆE=“D?±WV¸TT»QQÀPOÀNMÁMMÂLJÃKJÐTTÈHGÂ=>Ä=:ÐB@ÓEAÏB;Ç>4ÊD9ÉE9ËF=ÍG>ÔFBØDDÜAEÝAEáBFáCDáCDâDEâDCáFDáFDáFDàEAßD@àB?ßA>àA=àA=àA=ÞC?ÔE?ÈC<º>6¬:0 90”:/Š<0‚<0€A2~@3~>4<3ƒ:3†91ˆ81‰90‡;.…<-„;,„;,ƒ;-‚:,‚:,‚:,9-9-9-9-~:/~:/~:/~:/}90}90}90}90}90}90|90|90|90z:0z:0y9/y9/y9/w9.w9.w8/w8/t8.s7-r6,r6,p6+p6+k1&q7,m4)l3(o6+l3(p7,~H>„RI…SLˆQJ‹PJQL”PM•QN”SOŠOG…SH€[K{ePsiPhkLfqQgxT^tMXnGPf?La:K_:K\:GV7CP4<F-8@)6;'7:)<=/?@2>>2;=04:03;05;16<0:</<?.>A,>D*Q[9^mDkRpŒRp“Sq™RsSsžVxŸ^|¢exžak‘T`†I]ƒF]ƒF\‚E`†Ia‡Jc‰Le‹NdŠMbˆK`†I^„I]LRtBIk9i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTqdTo_Pm]Pm_RqeYog\ldYhbVfbWpl`{xi~{jyizubpiVe`JTT<FF.C>(MB.S@/U8(]7*l=3n70u91~;5‡@:’IB›PJ¥XP­ZR»^YºSN·GE¼B?ÈDBÑFCÓD@Ï@:ÐA;ÐC<ÒE>ÔG@ÖGCÚFFÛEFÞDFßCDßCDßCDßCDàDEßEEßECßECÞDBÞDBÜD?ÛC>ÜC=ÜC=ÜC=ÛC>ÖE@ÎE?ÃB<³>5¢:1”8-ˆ9,ƒ;-‚@2@1~>2=1ƒ:1†91‡81ˆ:0‡;.„;,„;,„;,‚:,‚:,€:.€:.9-9-~:/~:/~:/~:/~:/~:/}90}90}90}90|90{8/{8/{8/{;1{;1z:0y;0x:/x:/x:/x:/t8.t8.s7-s7-r6,q5+o5*o5*j1&o6+m4)k2'l6*i3'm7+}G=‡PI‡PI‹PJŽQL‘RM’SN”UP‘VPŒWO‡[P~^OtbNoiQorUlwYfwUQeBK_:EY6DU3EV6GV9GT8ER8?I0<D-9>*7;*:<.<>0;=/9;.6<25=26<26<0:</<>0=@-=C)MW5Zi at f|MlˆNn‘Qq™RuŸUtŸWz¡`w`n”Wc‰L\‚E\‚E\‚EZ€C_…Ha‡JbˆKdŠMc‰La‡J_…H]ƒH[}JPr at Gi7i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrdWoaTm_Rk_SkaWlcZle[jf]jf]xtiˆ„x‘•’Œ~‰‚r}zg`cNOT>DG2FE1HC0F=,L<,VC4P9+R6*V4*Y5)\6+a9/e=1m=1ŠKBSJ®UO¶NK¼FDÆABÒDCØFFÔ@>ÕA?ÖB>ÖE@ÙECÚFDÛEDÝEDÞDDßCDßCDÞDDÞDDÝEDÝEBÞFCÛFBÚEAÙD>ØE>×D<×D<ÙD=ØE>ÔD<ÓF?ÉF>ºA8§;1˜8,Œ9+…<-ƒ@0@1~?0=/ƒ:1„:/‡9/ˆ:.„:-„;,„;,ƒ:+‚:,‚:,9-9-9-9-~:/~:/~:/~:/~:/~:/}90|90}90{8/{8/{8/{8/x8.{;1y;0y;0y;0x:/x:/x:/v:/s7-s7-s7-r6,q5+o5*o5*m4)j1&o6+l3(h2&k5)h2&l6*|F<ŠOGŒOJPKRMSN‘VPWPŒZQ‰]R…aUy_PiZGd_IdhO\fKN]@EU8AQ4=M0<K.?M3CQ7FR:GS;BL4>G2:A/9=,9=.9=.8<-7;-7=36=56;46<2:<1;=/<?,<A*JS4Ve>bxIj†Ln‘Qs›Tw¡Wx¢Z{¢ar˜[e‹N\‚EZ€C\‚E\‚EZ€C_…H`†Ia‡JbˆKa‡J`†I^„G]ƒHY{HNp>Eg5haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTrfXth\sg[mcYjaXle]snhzwp~w† ”¨¥œ«§œ¨¤™£‘™–‡z{kcfSOR?GJ7EH5BE2BE2EH5KL<JH9GD5D>0A9,A7+ at 6*F4(S5*qB8ŒPHŸPK¯IG¿GIÌEIÓBEÖ@BÙ@BÚBAÛCBÚEAÚEAÜDAÜDAÞDDÞDFÞDFÞDFÞDDÝEDÝEDÚDCÚFB×FAÖF>ÔE=ÔE=ÓF=ÔE=ÕF>ÔA:ÓC;ÎE=ÁB9®>3ž9-‘;.Š</„?0?/€>.€=-;/„:-†:-‡;.„:-ƒ;-‚:,‚:,‚:,9+9-9-~:/~:/~:/~:/}:1}:1}:1}:1|91z:1|91y90y90x8/x8/v7.y:1y:1x90v:0v:0u9/u9/t:/r7/q6.q6.p5-o4,n3+n3+m4+j1(m7-j4*h2(j4*f2'j6+}D;NGNHQJTLUOŽWPŠYRƒ[Q{YMv\OkZJ]UBYXDY^HOYA?K3:H/7E.4B+5A+8D.=I3CL7EN9BK6?H5<E2:A/8?/7>.5<,4:,5<45<56;56;49;0:</;>-;@)GP1Ra:`vGi…Ko’RuVy£Yy£[xŸ`n‘W`ƒIZ}C[~D^G^G]€F`ƒIa„Jb…Kb…Ka„J`ƒI_‚H^IW|ILp at Bf6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTkaUndZpf\lcZkd\rmg„|‘Œ§£ µ±®ÄÁ¼ÉÆÁÉľÅÀºÀ¹±¹²¨¤œˆ‚rfcTPQ?FI8>E3;D1:F28E38E38C2:B3<B4 at C8CE:GE9>4(P:/e?6€EA¡PO¿X[ÊQVÊCIÕFJ×EFÚFFÛEDÝEBÞDBÝD?ÞCAÞDDÞDFÞDFÞDFÜDCÜDCÜDCÚDCÙEA×FAÕF@ÓF=ÒE<ÐF<ÑG=ÔE=Ô?8Õ@9ÐC:ÆC9¶A7¥=0–=/Œ=.†>/‚?/>.€=-<-ƒ;-„:-…;.‚:,‚:,‚:,‚:,9+:+9-~8,~:/~:/~:/~:/}:1}:1}:1}:1z:1z:1y90y90x8/v7.v7.t8.w8/u9/u9/s9.t8.s9.r8-r8-q6.q6.p5-o4,n3+m4+l3*j4*h2(l6,i3)f2'h4)e1&i5*{B9ŽMG’MH‘PJTLVO‡XNYO|\Qs\Nk[L`WFVSBPSBJQ?@I64@,3<+2;*09(09(2;*5>-9B1<E4?H7?H5>G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDi„Mp“SwŸYy£Yw¡Yq˜Yf‰OZ}CX{A\E]€F]€F^G`ƒI`ƒI`ƒI`ƒI`ƒI_‚H^G]€JV{HJn at Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upjˆ…€Ÿžš°°®ÃÂÀÓÒÐâáßçæäçãàãÞÚÞÖÓÙÎÈμ²¸¥——‡zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84ˆHH¯]_Å`dÊWZÍQSÓNO×MKÛKJÞHGáFDãDAâBBßCDÞDFÞDFÝCEÝCEÜBDÜBBÛCBÚDCØD@ÕD?ÓF?ÒE<ÐF<ÐG=ÔE=Ù@:Ù@:ÑB:ÈC:¼C:¬@4™;/Œ9+‰=/ƒ>.>-€=,<,ƒ;,ƒ;,„<-‚:,‚:,‚:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MG’MH‘PJŽULˆXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7<I7;F56C13@,1>-.800621622717829;0:<.:?)?H+KY5[qChƒLq“Vwž[w¡YsœVgP^IUx at WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„¡ œ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢‘}ub^\GKM7CH2AI2AI4 at G5BD7AA7B=9C97?:69<5>?7B71J.+d66QR³giÆnmÀ\\ÇZWÐVS×QNÜLKâHHæCDåBCßCFÝDFÝDFÝCEÝCEÜBDÜBBÜBBÜDCÙCB×C?ÓD>ÒE>ÐF<ÐF<ÔE=ÜC=ÛA9ÒB:ÊD;¿E:°A6œ:-‹5&Š</…=.‚=-€=,<,<,ƒ<*„<-‚:,‚:,‚:,:+9-~8,}9.}9.~:/~:/}:1}:1}:1}:1}:1{;1y:1w;1x90u9/t8.s9.r8-q7,r8-q8-p7,n8,p7,m7+o6+o6+o6-o6-n5,m4+l3*j4*i3)h4)f2'k7,h4)c1&e3(b0%e3(xB8ŽMG’OIŽRJŠUMƒXOzZOq[Mh\LZTDIJ:?C4>D69A208+/7*6<247058157247025.06,08-19,6A3:E5=J9>K9<I77F32A,1>-,6..400511606718:/:<.:?+<E*IW4YoAg‚Mp’Vv\užXp™U`†IX{CSv>WzB[~FY|DY|D\G_‚J_‚J^I^I^I]€H]€H]LStIHhA?]7icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldWibZgd]vsn“’Ž¯¯­ÄÆÅÚÜÛêîïóôöö÷ùüüþÿÿÿÿÿýÿûúü÷ôýòì÷áÔòØÇàʵƶŸª ‡ˆ„ibbFEH-DH/CG0FE1GD5F<3C60F42H:9>=9>?:B:7I75cGF’jjÅ“’è­©Ò‹‡ÇtnÀ]XÆSPÕONßJLçFKéFKßEGßIKÚDFÔ;>Ø>@áGIàDGÖ:=Ú@@Ú@@ÙA@ÖB>ÔC>ÑB<ÐA;ÑA9ÞC>ÛA9Ó@9ÊA9¾B8°@5Ÿ:.8*Œ=0‡>/ƒ>.>-€=,<+=*<,:+9-9-~8,~8.|8-|8-|8-|90|90|90|90z:1z:1z:1z:1y=5w<4w;3u:2t91q8/p7.p7.o6-m7-m7-l8-m7-l8-m7-m7-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)]-#`0&_/%b2(s>6ŒOJPKˆQJRJ}YMv_QfYITN>DE5>E5:C25 at 04</3;04:04:068378366446135016//6..6+.9+2=-6C2:G6:I68G44C.1?.*4+,2.-2..3-45/79.:</:?+6>&DR1WlCh‚Rs”]wž_r›Wk”R[~DXyDTu at Tu@WxCZ{F[|GZ{F^JbƒNbƒN^J\}H_€K`L^~MTsJFd@<W4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldYgd]onj†…ƒ¤¤¢ÁÃÂÖÚÛêîï÷ûü÷ûþøüÿüýÿþþþÿÿýÿþúÿüùÿúóÿðàûëÔíßÅ×ͲÀ»¤£„‚ƒcgjKLQ3GJ/EC.GB/H>2I:3L95K<9?:7BA?MHE]RPyjg£Ž‹Î²®èÅ¿ÿ×Ñ쳪͂|Àc^ÊVVØRSßHMÚADÖDEÕEEØHHÜJKÛEFÕ<>Ö<>ÛACÙ??Ù??ÙA@×A@ÖB>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05 at 03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu at Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼ÄŸ ¨ƒ‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<2“9.Ž<0‰=0ƒ>/>.=-~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5YmJk„Zw—fwœfl“Z_‡KWxCWuCTr at Tr@VtBXvDYwEYwEZxF]{I_}K]{I]{I_}K^|JZwKPgJAW at 3I2icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVneVneVmg[jkfƒ‡ˆ£§¨¹¾ÁÐÕØåíïóûýõýÿûÿÿûÿÿüÿÿüþûýþùþýøÿþ÷ÿÿóøýæôýÞî÷ØæòÎÝéÃÎÚ´¶Á™¡«†€‡efmLMQ6FH0HJ5KI:HD9D at 7OGDj`_‹€¤š™·¯¬ËÆÂÞÛÔêæÝúñèÿûñÿ÷íÿÝÕû¶±åŽÊcd°@?ÃPKÉTMÉPHÃF@ÈGBÔMJÖKHÐ@?Ò>>Ó??Õ?>ÕA?ÕA?ÓB?ÓB=ÓB=Ö>9Õ@:ÒC=ÌE?ÀE>²A9¢=5•;2Ž<1‰=0ƒ>/>.=/~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/~;2~;2|<3{;2{;2{;2z;4x<4r90o9/o9/m9.l8-k7,j6+h6+i7,i7,i7,h8,h8,h8,h8,h8,m;2l7/j5-i7.j8/j8/f4+a1'e5+a2(].$a2(b3)Y* a2(yNE\VvWRiNGWC:I<3@:.:;-8<.08)/:*3;.4</5=25;169069079468368349238139/19.19..9+/:,0=,2?.5B17E4;H6<I89C87?428.-3'.0%/1$24&48'4<'ER8]pPr‹d{šnwœifXU|ESsATr at Sq?Sq?Tr at UsAVtBVtBWuC[yG]{I\zH^|J_}K\zHWrIJ^E<M;.?-gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVofWofWng]qqo‡Œ¤©¬·¿ÂÍÕØãíïòüþôþÿøÿÿúÿÿûÿüýÿúüýõúüñùùíöøêöÿèóÿäðýáîùÙéôÒÞèÅÊÒ­¶¾™£}‚bY]BGL5FK7FJ9CG9AC8c^X…}z«¡ŸÁ·µÌÂÁ×ÏÍæáÝñîéú÷ðüõëÿñæÿòéÿôìÿåß騤·hc¦LAµPDÁYNÇ[QÆQH¿D=ÂA<ËDAË@=Î@>Ð@?ÑA@ÒC?ÑC?ÑC?ÒC=Ó?;ÒA<ÐE@ÉE@½C>¯@9 >5•=3Ž<1‰<2ƒ=1=0=1~<.=/=/~:/~:/~:/}9.|90{8/{8/{8/|<3|<3|<3{;2z;4y:3y:3w;3n70m80l7/l7/k6.h6-h6-h6-i7.h8.h8.g8.g8.g8.g8.h8.k92h6/f4-g5.i70h70e4-b1*c2+b3+_0(]1(]1(V*!b6-{ULtYRaNHN?8A7.=6,;9-9;.9<139-3;.5;/6<06<07:/58-47.69049238139/39/2:/19.19,.9+.9+/:,0;-3>.6C2:E5<G7=E8:B55;/06(02%/1$13%15$2:%GS;buWwk|›rq•g\‚QJp=Oo>Qn>Qn>Qn>Qn>Qn>Sp at Sp@WtD[xH]zJ]zJ_|L_|LZwGRlECU?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š «µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°’ŽregOMP;GK:FM=GOBKQG{{sŸš”ž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×ËØ“ƒ¸eS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG at E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2<D5:C28?/5;-46)24'13%04%07%HT>ex\umt’lf‰_RwKBh9Kk<Nk;Pm=Pm=Nk;Nk;Ol<Qn>VsCZwG]zJ^{K_|L_|LVsCNg@<J9/:2$.&gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXqhYoh^hikmtz…Œ”£¬±¿ÈÍÓÞâåðòðüüòüûõþùøÿ÷úÿöüÿòúýìøùçö÷çööê÷÷ëú÷èüöæýõâ÷ìÖçØÃÕƯÀ±šž“}un[ZWFPQCSVK[bZeld•˜²²¨ÕÎÆèÝÙóããúêëÿñôÿ÷ùÿþûþýùùúôøúïüüðÿÿóÿÿñÿûêÿæÑñª”¼o[©VD®RCµPD»LA¿JAÂG?ÆE?ÉE@ÊE@ÊE>ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI at nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj<Ol>UrDYvH[xJ]zL^{M\yKQn at G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠ¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²›¢—|ubb_NXZL]cWmwn|†}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½p›QD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l at 5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B1<E4=D4;A38<.26'-4$2;*JVBcr[h|a]vXOmKFfAAa:Hd;Kh<Nk?Nk?Kh<Jg9Li=Nk=TqEWtHZwK[xL]zNZvMNjAC[;2>4*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–ž¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹›˜˜|qtY_dMbkXr}l„‚‘›´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿêåا £`X›D=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26 at 58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=Je<Je:Lg>Oj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸—‘–vkqUYaI_kUtoŒ˜Š§œ¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uŸKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j at 0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34 at 66B66B66B45B16C1CP>P]IR`IIW at AO6BP7EU:Jb at Jd?Ke at Ke>Ic<Hc:Id;Je<SnEXrK\vQ]wT[tTTmOC\>6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy`kpZt{iˆŸ§œ®µ­ÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆØž”L=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24 at 46B47D38E3?L:ER>CQ:;I28F->L3DT9J_ at Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚ž¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØؼÇÇ«²±•¡¡‰‘“}“€œž‘ª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹p•P@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4š=6–A<?;‡@<@:}@;z?9y at 9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV at i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14 at 25A36C2:G5<I78E12?+2@)8F/>N4DX<E]=K`AJb at K`?G_;H^:F^:SiEXpN`uV^uXZnSLcI9M4):(%.+%*.$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVlgTkiTnmYop`tum…‡†¤§¬¿ÄÊÎÕÛæðòûÿÿûÿÿûüþýþÿÿþÿþýûÿÿýÿÿûþýø÷øðïðèçêßàæÚÞåÕçëÚêïÛíðÛìðÙîîÖèèÐÚØ¿Ìʱ½§·µ ±®¶´§Á¾µÉÈÃÒÓÎÙÙ×èèæòòðúúøüüúýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿþüÿüÿÿüÿÿûúüû÷ýÿùþÿøþÿôÿÿíÿþìøßËÅœŠbP–J:¥L<´P@¼L>¿@7ÆC;ÅF?¿D=±>;¦:7ž:8™>;‘=;Š?<„@=}@=xA<tB;rC;rC;q?6s>6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5 at T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓκÌƶËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ”¤kX¢[GªWE­L;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9š;9•=<?=…?=}@;wB<rC;oD;oD;p?8q?6q?6q?6q?6p>5o?5o?5o at 6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f at 5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3 at O8BT:GW<H[?M]BM`DUeJ\oSdtZ`rZXgRGXE4B1$2%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVliVlkVkmXkn]lrhy}• ®·¾ÒÛàêóøûÿÿùþÿùúþþÿÿÿþÿúù÷ÿÿûþýøùùññóèéëÞãçØßæÖàèÓäéÒçíÓèìÓçéÑèèÐçåÎàÛÇ×оÚÓÃÙÑÆÞÔËæÝØîäãóéêúñôÿùûúù÷þþüÿÿýýýûýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿùøÿúùÿþýüÿý÷ÿþîÿùñÿÿòÿýõÿúóùëÿýíÿúèôλ«wbQ:ª\H²N>¸J=¹I>¸I@´G@¯D>¥=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE<p?8q?8q?8q?8q?8q?8p?8p?8qB:pA9n?7l=5i=4j>5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d at 4cA5cA5_C5ZE4_N<gVBhWCcS<^O8[O5\R7]V<]Y>nlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15 at 04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍ×­•©oY¨WD®Q@¬O>¯OA±OB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o at 8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d at 4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F2<I5 at N7FT=JX?R`I[hTanZ\iWQ^MBN@/;/",#+1-(.,&,,heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[mgWqn[kmWknYkr`jrgpyv‡‘“Ÿª°»ÄÉÐÙÞêïóöûþüýÿþÿÿÿþÿþýùÿÿúþþöúúðöøëôöèðôãêñßçïØðöÚíòÔëîÑììÒèæÑáÜÉÝÕÈÞÔÊáÔÎèÚÙòääúëîþòôÿ÷ûÿùÿÿüÿÿýþþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþÿúÿþúÿþúþþüýÿþûÿÿúÿÿúÿÿûÿÿþÿÿÿÿýÿûõÿûñÿüìÿûåÿóÛÿêѺ‚i¦bK—O9ŸT?¨ZF£RAJ: M?Ž<0‹=0†>2=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q at 9q@9q at 9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4</5;14:04:04:039/39/39/39/39/39/28.17-17-17-06,16016005/05//4./4./4./4.,1+,1+,1+,1+,1+,1++0*+0*.5.-4--4-,3,-4--4,.5-.5-+2*-4,07/5=29A6=E8?G<?J<7B25@/3>-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI<F;/9.)3*)/+(.*'-+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[khWonZjlVknYkr`jtiq|x‰”–£®´¾ÇÌÒÛàëðô÷üÿýþÿþÿÿÿþüþýùÿÿúþþôûûï÷ùëô÷æðõáêòÝèíÖêïÑæëËäçÊææÌãáÌßÙÉÞÔÊßÔÎçÙØíßßöçêûïóÿôøÿ÷ûÿúþÿüÿÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüûÿúûÿúýÿüýþÿþýÿÿüÿÿüÿÿûÿÿüÿÿüÿÿûùÿüõÿþñÿÿíÿûåÿòÙÿëÑà±—§u\‘[C–ZBšYCšVC™R@ŽG5‹F6ˆE4ƒD3|C2wB0s@/o>/u at 8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.<H2 at L6LXDS_KYdTWbRLVK=G<1;2+5,+2+*0,)/+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]ne\mg[khWmlXimVjoYktaiuiq}yŠ˜™¥²¸¿ÊÐÔÝâíòö÷üÿüýÿýÿþÿþüþýøÿÿ÷ýýóúûí÷úéô÷äïôÞçïØåëÑâçÉÞáÂÝÝÁÞÞÆÞÛÈÝ×ËàÕÏäÙ×îââóçëúîòÿôøÿ÷ûÿùüÿúýÿýýÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿüøÿüûÿþþþþÿüÿÿúÿÿùÿÿøÿÿùÿÿúÿÿúúÿýøÿÿöÿÿóýÿïÿúæÿôÜÿøàÿìÓ㿧¬‚j‡YB…Q;’[F—]IS?F2u>)r>)s at +tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S at RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=B<AH@@K=>K:<I78E34A-2?+3A*5C,DQ=KXDQ^MQ^MHTH<H<2>4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M at sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b at 4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H- at F*<B&<A#FI,XY:deFmmQxx\tv^[_F at C.6;%8 at +<C19?39?59?58>48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'<I5BO;HUCIVEDPB;G;2>4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶š…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX at JL4GM3<E*<F+?H+AG+AF(DG*MN/TU6xw[{z^nnVUU=CB.?A,>A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9 at O<@O:<K67F/4C,2A*6E.:I4 at O<BP??M>8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹ŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,<F+<F+?H+DJ.EJ,DG*HI*LM.yx\tsWfdMTR;LI6KJ6FE3<=-<?49?59?59?58>48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7 at O:?N7<K49H18G05D-8G0<K6>M:<J97E61?2-9-+5,-4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWjlWhmVhrZfs_cqdhys…——¥·»ÇÒØÚãêðõûøýÿüýÿýÿþÿÿýÿþùÿÿõÿÿòÿÿðüÿìøûæïôÝâëÐÝãÇÕÕ¹Î̳ÉÄ°ÊÄ´ÐÉ¿ÚÒÏéàãöíòÿ÷ÿÿúÿÿýÿÿþÿÿÿýýÿúüÿøüÿøýÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþÿüÿÿüÿþýÿýÿþúÿúøÿùøÿõøÿóøÿóøÿõüÿøýÿúÿýþÿüÿÿüÿÿûÿý÷ÿÿúÿÿüÿÿýÿÿþÿþýûûûóúøìÿÿñÿÿïÿÿíÿþíÿýíÿöçÿîàýêÛúãÑÿæÐãÊ´¥xt^GeO8bL5\H0^J2\J2\J2]K3]K3^L4^L4\M6YN8WO:WO:VP:UO9SN8PN7NN6MO7PT;`fLfoTU^CEO4AK0<F+?I.?I.CL/HN2HM/FI,OP1YX:qmRjfKa\F[V at YTATQ>MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7<N4:L2:L25G/7I1:L6<M::K96G70 at 3-;.,6--4,,3+cdRcdRdeSefTgeVhfWigXigXhfWifWifWifWifWifWifWkeWkeWkeWldYle[md]mf\kg[jiWikVhmWhrZgt`dqgj{u‰›ª¼ÀÍØÞàçíôùÿúÿÿûÿÿýÿüþÿúþþöúúîúûíúûéøúåóöáêî×ßãÊÙÜÁÓѸÌDZž¬Æ¾±ÌüÖÎËæÝàôêòþ÷ÿÿúÿÿþÿÿÿÿþþþýÿúüÿúüÿúýÿüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüÿþüÿþüÿþüÿýþÿüÿÿüÿÿýÿýÿþûÿüøÿù÷ÿ÷÷ÿõøÿöùÿöüÿøÿÿûÿþýÿüÿÿûÿÿúÿÿúÿÿûÿÿüÿÿþÿþýÿûýüüþûþÿúùúòúüñýûïþúîÿùìÿûìÿýïÿýìÿðÛÿûâìÜÞŽu`P7RB)XH/XH.[M3[M3ZN4ZN4[O5[O5\P6[Q8UO7TO9TO9QO8PN7NN6KM5IM4JN5LR8S\APY<@I,;F(AL.?J,DM0EN1JQ2MR4JM0LL0YY=kjNhdIb^E^ZA_ZD`[GZUAQO:KJ8AB4 at B5@B5>A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5<N6<N87H51B0.<--7,.5--4,]eN^fO_gP`hQdiUfiVgjWijXfgUhgUheVheVjdVkeWkeYlfXlfXkhYmg[kg\mf^jf[ieYgeVghVfkUenYbo]dqhsƒ€–¨¬¹ÈÏÒÛââéïò÷û÷üÿùýüüþùüÿöüþñ÷øêùúêø÷åòñÝîíÙëêÖàßÊ×Ò¾×ϼËÀ®½´¥½³©Â·±ÌÂÁÛÒ×êàèúóûüöÿþûÿÿþÿþýÿüýÿüþýüþýþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüþýùþýùÿüùÿýúÿþûÿþûÿþÿÿýþÿüýÿýþÿÿÿþÿýýÿüûýøÿÿûüý÷ÿýøÿþúÿýøÿúöÿ÷ôÿùùÿúÿÿüÿÿýÿÿÿÿÿÿÿýÿüýÿþüþýþÿÿÿÿÿÿþüÿþùÿþóÿþîÿýêÿýæúôÜÿúàçàƏˆlUN2WN1TK.SJ+WN1WN1UN1UN1TO2TO2TN4SO4QM2RN5QO6PP6MO7KO6HM6GL5JP6FO4AJ-=F'>H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y at XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69 at 88@58?79A69 at 8:B7:A9:B79 at 8:B7;B:<D9=D<>E=8B:8B:7A88 at 56>14</39/271.40/51-7/-9-.;)0@&6G'7M';V+:W+;U0;T4;R8=P:>O<>P::L6 at R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzŠ‰œ«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿ­Á´¤¹­¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàÇ‹‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TW<UU=VV>WU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B at 3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68 at 58@59A69A6:B7:B7:B7:B7:B7;C8<D9=E:<F;=G?<H><F;;F6<D5:B39?38=67>74>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?<R=;L::K8=O9DV<K^BM`BL`DH\@:Q71D.+5*+2*)0(ZgM[hN\hP^jRbjSdlUglXilYijXijXkhYkhYlfXmgYnf[nhZmgYkhYkg[jf[jf]ieZhfZfgWhiWejTdmZgtco|sŽ¬³¶ÄÍÍÖÝÞæéñöúøþþúþýùþøøûòôøêóôæðñßêé×áàÌÜÙÆ×ÔÁÐ˸ÇÀ®¿³£½° ¼°¤Ã¶®ËÀ¼ÕËÊãØÞëäëüôÿý÷ÿþûÿÿþÿþýÿüýÿüýÿýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿýúÿüùÿüùÿüøÿüøÿýüÿüûÿûüÿüýÿþÿÿþÿÿýþþüýÿþýÿþûÿýûüóîêßÙâÕÍëÝÔ÷ìæÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿýçÿþãû÷ÞþüããßƉ…jPK.QL.QK+QK+TN.UO/TO1UP2TP3SO2QP4PO3QM2ON2PN5MP5MO7JP6IN7FN6HQ6FO2CL/CM+FM,JQ/OU1SY5QY2W_8jpJy[qvVY^@KO4MP5QQ9QQ9RP9SQ8TR9UT8YU:ZV;XR:VP:RM:NI6HE6DB5CA5?A6<=59?5:@69A67B47B47D37D3:B7:B79A69A69A69A6:B7:B7:B7:B7:B7:B7;C8<D9>F;<F;?IA>J@?I>>I9?G8>F7>D8=B;>E>9C;6 at 74B19I/BV3Pg=XrB^J[}JXuIMhECZ at 9O:6G54E2<N8EW=NaESfHSgKNbF at W=6I3/9./6.-4,ZgM[hN\hP^jRblTemVhmYinZklZklZlj[liZnhZnhZog\oi[liZkhYjfZjf[ie\ieZhfZfgWfgUbgQajWerao|s~Ž–¥¬«¹ÂÇÐ×Úáçîó÷öüüøüûõúôóöíîòäéêÜãäÒÜÛÉÓÒ¾Î˸ÉƳþ«½¶¤Ã·§Ç¹¬ÍÁµÖÉÁßÔÐéßÞóèîøñøýõÿþøÿÿüÿþýÿýüÿüýÿüþýýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüþýûÿþüÿýúÿýúÿýúÿüùÿû÷ÿû÷ÿýüÿüûþúûÿûüÿýþÿþÿÿýþþüýÿüûÿþûÿýûýôïíâÜæÙÑðâÙüñëÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿüæÿüáþùãÿþçäßÉŠ†mPJ0RM0SL/SM-TN.UO/UP2UP2TP3SO2PO3ON2PL1NM1OM4LO4LN6JP6JO8HP8JS8GP3GP3IS1MT3OV4V\8\d=grHtUˆ“i›s…lnuTZaBRV;LN6NN6MM5NL5OM6RP7WS:YU<ZT>XR<TO<QL9KH9GE8EC7 at B7=>6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?<H>>H=>I9?G8>F7>D8=B;=D=9C;6 at 74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2 at R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸ¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâÌŒˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’¦sŸ±›ª’¡zˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8<D9=E:>F;=G<=G?<H>=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu at RtAPmAE`=9P6-C.+<*+<)1C-<N4H[?PcERfJNbF at W=5H2,6++2*'.&
\ No newline at end of file
diff --git a/tkimg1.3/libjpeg/testimgp.jpg b/tkimg1.3/libjpeg/testimgp.jpg
deleted file mode 100644
index 8cbb658..0000000
Binary files a/tkimg1.3/libjpeg/testimgp.jpg and /dev/null differ
diff --git a/tkimg1.3/libjpeg/testorig.jpg b/tkimg1.3/libjpeg/testorig.jpg
deleted file mode 100644
index 9816a0c..0000000
Binary files a/tkimg1.3/libjpeg/testorig.jpg and /dev/null differ
diff --git a/tkimg1.3/libjpeg/testprog.jpg b/tkimg1.3/libjpeg/testprog.jpg
deleted file mode 100644
index 920fee2..0000000
Binary files a/tkimg1.3/libjpeg/testprog.jpg and /dev/null differ
diff --git a/tkimg1.3/libjpeg/transupp.c b/tkimg1.3/libjpeg/transupp.c
deleted file mode 100644
index e5ec564..0000000
--- a/tkimg1.3/libjpeg/transupp.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- * transupp.c
- *
- * Copyright (C) 1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains image transformation routines and other utility code
- * used by the jpegtran sample application.  These are NOT part of the core
- * JPEG library.  But we keep these routines separate from jpegtran.c to
- * ease the task of maintaining jpegtran-like programs that have other user
- * interfaces.
- */
-
-/* Although this file really shouldn't have access to the library internals,
- * it's helpful to let it call jround_up() and jcopy_block_row().
- */
-#define JPEG_INTERNALS
-
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "transupp.h"		/* My own external interface */
-
-
-#if TRANSFORMS_SUPPORTED
-
-/*
- * Lossless image transformation routines.  These routines work on DCT
- * coefficient arrays and thus do not require any lossy decompression
- * or recompression of the image.
- * Thanks to Guido Vollbeding for the initial design and code of this feature.
- *
- * Horizontal flipping is done in-place, using a single top-to-bottom
- * pass through the virtual source array.  It will thus be much the
- * fastest option for images larger than main memory.
- *
- * The other routines require a set of destination virtual arrays, so they
- * need twice as much memory as jpegtran normally does.  The destination
- * arrays are always written in normal scan order (top to bottom) because
- * the virtual array manager expects this.  The source arrays will be scanned
- * in the corresponding order, which means multiple passes through the source
- * arrays for most of the transforms.  That could result in much thrashing
- * if the image is larger than main memory.
- *
- * Some notes about the operating environment of the individual transform
- * routines:
- * 1. Both the source and destination virtual arrays are allocated from the
- *    source JPEG object, and therefore should be manipulated by calling the
- *    source's memory manager.
- * 2. The destination's component count should be used.  It may be smaller
- *    than the source's when forcing to grayscale.
- * 3. Likewise the destination's sampling factors should be used.  When
- *    forcing to grayscale the destination's sampling factors will be all 1,
- *    and we may as well take that as the effective iMCU size.
- * 4. When "trim" is in effect, the destination's dimensions will be the
- *    trimmed values but the source's will be untrimmed.
- * 5. All the routines assume that the source and destination buffers are
- *    padded out to a full iMCU boundary.  This is true, although for the
- *    source buffer it is an undocumented property of jdcoefct.c.
- * Notes 2,3,4 boil down to this: generally we should use the destination's
- * dimensions and ignore the source's.
- */
-
-
-LOCAL(void)
-do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	   jvirt_barray_ptr *src_coef_arrays)
-/* Horizontal flip; done in-place, so no separate dest array is required */
-{
-  JDIMENSION MCU_cols, comp_width, blk_x, blk_y;
-  int ci, k, offset_y;
-  JBLOCKARRAY buffer;
-  JCOEFPTR ptr1, ptr2;
-  JCOEF temp1, temp2;
-  jpeg_component_info *compptr;
-
-  /* Horizontal mirroring of DCT blocks is accomplished by swapping
-   * pairs of blocks in-place.  Within a DCT block, we perform horizontal
-   * mirroring by changing the signs of odd-numbered columns.
-   * Partial iMCUs at the right edge are left untouched.
-   */
-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_width = MCU_cols * compptr->h_samp_factor;
-    for (blk_y = 0; blk_y < compptr->height_in_blocks;
-	 blk_y += compptr->v_samp_factor) {
-      buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) {
-	  ptr1 = buffer[offset_y][blk_x];
-	  ptr2 = buffer[offset_y][comp_width - blk_x - 1];
-	  /* this unrolled loop doesn't need to know which row it's on... */
-	  for (k = 0; k < DCTSIZE2; k += 2) {
-	    temp1 = *ptr1;	/* swap even column */
-	    temp2 = *ptr2;
-	    *ptr1++ = temp2;
-	    *ptr2++ = temp1;
-	    temp1 = *ptr1;	/* swap odd column with sign change */
-	    temp2 = *ptr2;
-	    *ptr1++ = -temp2;
-	    *ptr2++ = -temp1;
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	   jvirt_barray_ptr *src_coef_arrays,
-	   jvirt_barray_ptr *dst_coef_arrays)
-/* Vertical flip */
-{
-  JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JBLOCKROW src_row_ptr, dst_row_ptr;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  /* We output into a separate array because we can't touch different
-   * rows of the source virtual array simultaneously.  Otherwise, this
-   * is a pretty straightforward analog of horizontal flip.
-   * Within a DCT block, vertical mirroring is done by changing the signs
-   * of odd-numbered rows.
-   * Partial iMCUs at the bottom edge are copied verbatim.
-   */
-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_height = MCU_rows * compptr->v_samp_factor;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      if (dst_blk_y < comp_height) {
-	/* Row is within the mirrorable area. */
-	src_buffer = (*srcinfo->mem->access_virt_barray)
-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
-	   comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
-	   (JDIMENSION) compptr->v_samp_factor, FALSE);
-      } else {
-	/* Bottom-edge blocks will be copied verbatim. */
-	src_buffer = (*srcinfo->mem->access_virt_barray)
-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
-	   (JDIMENSION) compptr->v_samp_factor, FALSE);
-      }
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	if (dst_blk_y < comp_height) {
-	  /* Row is within the mirrorable area. */
-	  dst_row_ptr = dst_buffer[offset_y];
-	  src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
-	  for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
-	       dst_blk_x++) {
-	    dst_ptr = dst_row_ptr[dst_blk_x];
-	    src_ptr = src_row_ptr[dst_blk_x];
-	    for (i = 0; i < DCTSIZE; i += 2) {
-	      /* copy even row */
-	      for (j = 0; j < DCTSIZE; j++)
-		*dst_ptr++ = *src_ptr++;
-	      /* copy odd row with sign change */
-	      for (j = 0; j < DCTSIZE; j++)
-		*dst_ptr++ = - *src_ptr++;
-	    }
-	  }
-	} else {
-	  /* Just copy row verbatim. */
-	  jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y],
-			  compptr->width_in_blocks);
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	      jvirt_barray_ptr *src_coef_arrays,
-	      jvirt_barray_ptr *dst_coef_arrays)
-/* Transpose source into destination */
-{
-  JDIMENSION dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_x, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  /* Transposing pixels within a block just requires transposing the
-   * DCT coefficients.
-   * Partial iMCUs at the edges require no special treatment; we simply
-   * process all the available DCT blocks for every component.
-   */
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
-	     dst_blk_x += compptr->h_samp_factor) {
-	  src_buffer = (*srcinfo->mem->access_virt_barray)
-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
-	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
-	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
-	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
-	    for (i = 0; i < DCTSIZE; i++)
-	      for (j = 0; j < DCTSIZE; j++)
-		dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	   jvirt_barray_ptr *src_coef_arrays,
-	   jvirt_barray_ptr *dst_coef_arrays)
-/* 90 degree rotation is equivalent to
- *   1. Transposing the image;
- *   2. Horizontal mirroring.
- * These two steps are merged into a single processing routine.
- */
-{
-  JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_x, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  /* Because of the horizontal mirror step, we can't process partial iMCUs
-   * at the (output) right edge properly.  They just get transposed and
-   * not mirrored.
-   */
-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_width = MCU_cols * compptr->h_samp_factor;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
-	     dst_blk_x += compptr->h_samp_factor) {
-	  src_buffer = (*srcinfo->mem->access_virt_barray)
-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
-	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
-	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
-	    if (dst_blk_x < comp_width) {
-	      /* Block is within the mirrorable area. */
-	      dst_ptr = dst_buffer[offset_y]
-		[comp_width - dst_blk_x - offset_x - 1];
-	      for (i = 0; i < DCTSIZE; i++) {
-		for (j = 0; j < DCTSIZE; j++)
-		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		i++;
-		for (j = 0; j < DCTSIZE; j++)
-		  dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-	      }
-	    } else {
-	      /* Edge blocks are transposed but not mirrored. */
-	      dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
-	      for (i = 0; i < DCTSIZE; i++)
-		for (j = 0; j < DCTSIZE; j++)
-		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	    jvirt_barray_ptr *src_coef_arrays,
-	    jvirt_barray_ptr *dst_coef_arrays)
-/* 270 degree rotation is equivalent to
- *   1. Horizontal mirroring;
- *   2. Transposing the image.
- * These two steps are merged into a single processing routine.
- */
-{
-  JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_x, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  /* Because of the horizontal mirror step, we can't process partial iMCUs
-   * at the (output) bottom edge properly.  They just get transposed and
-   * not mirrored.
-   */
-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_height = MCU_rows * compptr->v_samp_factor;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
-	     dst_blk_x += compptr->h_samp_factor) {
-	  src_buffer = (*srcinfo->mem->access_virt_barray)
-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
-	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
-	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
-	    if (dst_blk_y < comp_height) {
-	      /* Block is within the mirrorable area. */
-	      src_ptr = src_buffer[offset_x]
-		[comp_height - dst_blk_y - offset_y - 1];
-	      for (i = 0; i < DCTSIZE; i++) {
-		for (j = 0; j < DCTSIZE; j++) {
-		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		  j++;
-		  dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-		}
-	      }
-	    } else {
-	      /* Edge blocks are transposed but not mirrored. */
-	      src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
-	      for (i = 0; i < DCTSIZE; i++)
-		for (j = 0; j < DCTSIZE; j++)
-		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	    jvirt_barray_ptr *src_coef_arrays,
-	    jvirt_barray_ptr *dst_coef_arrays)
-/* 180 degree rotation is equivalent to
- *   1. Vertical mirroring;
- *   2. Horizontal mirroring.
- * These two steps are merged into a single processing routine.
- */
-{
-  JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JBLOCKROW src_row_ptr, dst_row_ptr;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_width = MCU_cols * compptr->h_samp_factor;
-    comp_height = MCU_rows * compptr->v_samp_factor;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      if (dst_blk_y < comp_height) {
-	/* Row is within the vertically mirrorable area. */
-	src_buffer = (*srcinfo->mem->access_virt_barray)
-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
-	   comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
-	   (JDIMENSION) compptr->v_samp_factor, FALSE);
-      } else {
-	/* Bottom-edge rows are only mirrored horizontally. */
-	src_buffer = (*srcinfo->mem->access_virt_barray)
-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
-	   (JDIMENSION) compptr->v_samp_factor, FALSE);
-      }
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	if (dst_blk_y < comp_height) {
-	  /* Row is within the mirrorable area. */
-	  dst_row_ptr = dst_buffer[offset_y];
-	  src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
-	  /* Process the blocks that can be mirrored both ways. */
-	  for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
-	    dst_ptr = dst_row_ptr[dst_blk_x];
-	    src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
-	    for (i = 0; i < DCTSIZE; i += 2) {
-	      /* For even row, negate every odd column. */
-	      for (j = 0; j < DCTSIZE; j += 2) {
-		*dst_ptr++ = *src_ptr++;
-		*dst_ptr++ = - *src_ptr++;
-	      }
-	      /* For odd row, negate every even column. */
-	      for (j = 0; j < DCTSIZE; j += 2) {
-		*dst_ptr++ = - *src_ptr++;
-		*dst_ptr++ = *src_ptr++;
-	      }
-	    }
-	  }
-	  /* Any remaining right-edge blocks are only mirrored vertically. */
-	  for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
-	    dst_ptr = dst_row_ptr[dst_blk_x];
-	    src_ptr = src_row_ptr[dst_blk_x];
-	    for (i = 0; i < DCTSIZE; i += 2) {
-	      for (j = 0; j < DCTSIZE; j++)
-		*dst_ptr++ = *src_ptr++;
-	      for (j = 0; j < DCTSIZE; j++)
-		*dst_ptr++ = - *src_ptr++;
-	    }
-	  }
-	} else {
-	  /* Remaining rows are just mirrored horizontally. */
-	  dst_row_ptr = dst_buffer[offset_y];
-	  src_row_ptr = src_buffer[offset_y];
-	  /* Process the blocks that can be mirrored. */
-	  for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
-	    dst_ptr = dst_row_ptr[dst_blk_x];
-	    src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
-	    for (i = 0; i < DCTSIZE2; i += 2) {
-	      *dst_ptr++ = *src_ptr++;
-	      *dst_ptr++ = - *src_ptr++;
-	    }
-	  }
-	  /* Any remaining right-edge blocks are only copied. */
-	  for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
-	    dst_ptr = dst_row_ptr[dst_blk_x];
-	    src_ptr = src_row_ptr[dst_blk_x];
-	    for (i = 0; i < DCTSIZE2; i++)
-	      *dst_ptr++ = *src_ptr++;
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-LOCAL(void)
-do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	       jvirt_barray_ptr *src_coef_arrays,
-	       jvirt_barray_ptr *dst_coef_arrays)
-/* Transverse transpose is equivalent to
- *   1. 180 degree rotation;
- *   2. Transposition;
- * or
- *   1. Horizontal mirroring;
- *   2. Transposition;
- *   3. Horizontal mirroring.
- * These steps are merged into a single processing routine.
- */
-{
-  JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
-  int ci, i, j, offset_x, offset_y;
-  JBLOCKARRAY src_buffer, dst_buffer;
-  JCOEFPTR src_ptr, dst_ptr;
-  jpeg_component_info *compptr;
-
-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    comp_width = MCU_cols * compptr->h_samp_factor;
-    comp_height = MCU_rows * compptr->v_samp_factor;
-    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
-	 dst_blk_y += compptr->v_samp_factor) {
-      dst_buffer = (*srcinfo->mem->access_virt_barray)
-	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
-	 (JDIMENSION) compptr->v_samp_factor, TRUE);
-      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
-	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
-	     dst_blk_x += compptr->h_samp_factor) {
-	  src_buffer = (*srcinfo->mem->access_virt_barray)
-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
-	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
-	    if (dst_blk_y < comp_height) {
-	      src_ptr = src_buffer[offset_x]
-		[comp_height - dst_blk_y - offset_y - 1];
-	      if (dst_blk_x < comp_width) {
-		/* Block is within the mirrorable area. */
-		dst_ptr = dst_buffer[offset_y]
-		  [comp_width - dst_blk_x - offset_x - 1];
-		for (i = 0; i < DCTSIZE; i++) {
-		  for (j = 0; j < DCTSIZE; j++) {
-		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		    j++;
-		    dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-		  }
-		  i++;
-		  for (j = 0; j < DCTSIZE; j++) {
-		    dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-		    j++;
-		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		  }
-		}
-	      } else {
-		/* Right-edge blocks are mirrored in y only */
-		dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
-		for (i = 0; i < DCTSIZE; i++) {
-		  for (j = 0; j < DCTSIZE; j++) {
-		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		    j++;
-		    dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-		  }
-		}
-	      }
-	    } else {
-	      src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
-	      if (dst_blk_x < comp_width) {
-		/* Bottom-edge blocks are mirrored in x only */
-		dst_ptr = dst_buffer[offset_y]
-		  [comp_width - dst_blk_x - offset_x - 1];
-		for (i = 0; i < DCTSIZE; i++) {
-		  for (j = 0; j < DCTSIZE; j++)
-		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-		  i++;
-		  for (j = 0; j < DCTSIZE; j++)
-		    dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
-		}
-	      } else {
-		/* At lower right corner, just transpose, no mirroring */
-		dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
-		for (i = 0; i < DCTSIZE; i++)
-		  for (j = 0; j < DCTSIZE; j++)
-		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
-	      }
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-
-/* Request any required workspace.
- *
- * We allocate the workspace virtual arrays from the source decompression
- * object, so that all the arrays (both the original data and the workspace)
- * will be taken into account while making memory management decisions.
- * Hence, this routine must be called after jpeg_read_header (which reads
- * the image dimensions) and before jpeg_read_coefficients (which realizes
- * the source's virtual arrays).
- */
-
-GLOBAL(void)
-jtransform_request_workspace (j_decompress_ptr srcinfo,
-			      jpeg_transform_info *info)
-{
-  jvirt_barray_ptr *coef_arrays = NULL;
-  jpeg_component_info *compptr;
-  int ci;
-
-  if (info->force_grayscale &&
-      srcinfo->jpeg_color_space == JCS_YCbCr &&
-      srcinfo->num_components == 3) {
-    /* We'll only process the first component */
-    info->num_components = 1;
-  } else {
-    /* Process all the components */
-    info->num_components = srcinfo->num_components;
-  }
-
-  switch (info->transform) {
-  case JXFORM_NONE:
-  case JXFORM_FLIP_H:
-    /* Don't need a workspace array */
-    break;
-  case JXFORM_FLIP_V:
-  case JXFORM_ROT_180:
-    /* Need workspace arrays having same dimensions as source image.
-     * Note that we allocate arrays padded out to the next iMCU boundary,
-     * so that transform routines need not worry about missing edge blocks.
-     */
-    coef_arrays = (jvirt_barray_ptr *)
-      (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
-	SIZEOF(jvirt_barray_ptr) * info->num_components);
-    for (ci = 0; ci < info->num_components; ci++) {
-      compptr = srcinfo->comp_info + ci;
-      coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
-	((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
-				(long) compptr->h_samp_factor),
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor),
-	 (JDIMENSION) compptr->v_samp_factor);
-    }
-    break;
-  case JXFORM_TRANSPOSE:
-  case JXFORM_TRANSVERSE:
-  case JXFORM_ROT_90:
-  case JXFORM_ROT_270:
-    /* Need workspace arrays having transposed dimensions.
-     * Note that we allocate arrays padded out to the next iMCU boundary,
-     * so that transform routines need not worry about missing edge blocks.
-     */
-    coef_arrays = (jvirt_barray_ptr *)
-      (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
-	SIZEOF(jvirt_barray_ptr) * info->num_components);
-    for (ci = 0; ci < info->num_components; ci++) {
-      compptr = srcinfo->comp_info + ci;
-      coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
-	((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
-				(long) compptr->v_samp_factor),
-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
-				(long) compptr->h_samp_factor),
-	 (JDIMENSION) compptr->h_samp_factor);
-    }
-    break;
-  }
-  info->workspace_coef_arrays = coef_arrays;
-}
-
-
-/* Transpose destination image parameters */
-
-LOCAL(void)
-transpose_critical_parameters (j_compress_ptr dstinfo)
-{
-  int tblno, i, j, ci, itemp;
-  jpeg_component_info *compptr;
-  JQUANT_TBL *qtblptr;
-  JDIMENSION dtemp;
-  UINT16 qtemp;
-
-  /* Transpose basic image dimensions */
-  dtemp = dstinfo->image_width;
-  dstinfo->image_width = dstinfo->image_height;
-  dstinfo->image_height = dtemp;
-
-  /* Transpose sampling factors */
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    compptr = dstinfo->comp_info + ci;
-    itemp = compptr->h_samp_factor;
-    compptr->h_samp_factor = compptr->v_samp_factor;
-    compptr->v_samp_factor = itemp;
-  }
-
-  /* Transpose quantization tables */
-  for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) {
-    qtblptr = dstinfo->quant_tbl_ptrs[tblno];
-    if (qtblptr != NULL) {
-      for (i = 0; i < DCTSIZE; i++) {
-	for (j = 0; j < i; j++) {
-	  qtemp = qtblptr->quantval[i*DCTSIZE+j];
-	  qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i];
-	  qtblptr->quantval[j*DCTSIZE+i] = qtemp;
-	}
-      }
-    }
-  }
-}
-
-
-/* Trim off any partial iMCUs on the indicated destination edge */
-
-LOCAL(void)
-trim_right_edge (j_compress_ptr dstinfo)
-{
-  int ci, max_h_samp_factor;
-  JDIMENSION MCU_cols;
-
-  /* We have to compute max_h_samp_factor ourselves,
-   * because it hasn't been set yet in the destination
-   * (and we don't want to use the source's value).
-   */
-  max_h_samp_factor = 1;
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor;
-    max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor);
-  }
-  MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE);
-  if (MCU_cols > 0)		/* can't trim to 0 pixels */
-    dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE);
-}
-
-LOCAL(void)
-trim_bottom_edge (j_compress_ptr dstinfo)
-{
-  int ci, max_v_samp_factor;
-  JDIMENSION MCU_rows;
-
-  /* We have to compute max_v_samp_factor ourselves,
-   * because it hasn't been set yet in the destination
-   * (and we don't want to use the source's value).
-   */
-  max_v_samp_factor = 1;
-  for (ci = 0; ci < dstinfo->num_components; ci++) {
-    int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor;
-    max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor);
-  }
-  MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE);
-  if (MCU_rows > 0)		/* can't trim to 0 pixels */
-    dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE);
-}
-
-
-/* Adjust output image parameters as needed.
- *
- * This must be called after jpeg_copy_critical_parameters()
- * and before jpeg_write_coefficients().
- *
- * The return value is the set of virtual coefficient arrays to be written
- * (either the ones allocated by jtransform_request_workspace, or the
- * original source data arrays).  The caller will need to pass this value
- * to jpeg_write_coefficients().
- */
-
-GLOBAL(jvirt_barray_ptr *)
-jtransform_adjust_parameters (j_decompress_ptr srcinfo,
-			      j_compress_ptr dstinfo,
-			      jvirt_barray_ptr *src_coef_arrays,
-			      jpeg_transform_info *info)
-{
-  /* If force-to-grayscale is requested, adjust destination parameters */
-  if (info->force_grayscale) {
-    /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed
-     * properly.  Among other things, the target h_samp_factor & v_samp_factor
-     * will get set to 1, which typically won't match the source.
-     * In fact we do this even if the source is already grayscale; that
-     * provides an easy way of coercing a grayscale JPEG with funny sampling
-     * factors to the customary 1,1.  (Some decoders fail on other factors.)
-     */
-    if ((dstinfo->jpeg_color_space == JCS_YCbCr &&
-	 dstinfo->num_components == 3) ||
-	(dstinfo->jpeg_color_space == JCS_GRAYSCALE &&
-	 dstinfo->num_components == 1)) {
-      /* We have to preserve the source's quantization table number. */
-      int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no;
-      jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE);
-      dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no;
-    } else {
-      /* Sorry, can't do it */
-      ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL);
-    }
-  }
-
-  /* Correct the destination's image dimensions etc if necessary */
-  switch (info->transform) {
-  case JXFORM_NONE:
-    /* Nothing to do */
-    break;
-  case JXFORM_FLIP_H:
-    if (info->trim)
-      trim_right_edge(dstinfo);
-    break;
-  case JXFORM_FLIP_V:
-    if (info->trim)
-      trim_bottom_edge(dstinfo);
-    break;
-  case JXFORM_TRANSPOSE:
-    transpose_critical_parameters(dstinfo);
-    /* transpose does NOT have to trim anything */
-    break;
-  case JXFORM_TRANSVERSE:
-    transpose_critical_parameters(dstinfo);
-    if (info->trim) {
-      trim_right_edge(dstinfo);
-      trim_bottom_edge(dstinfo);
-    }
-    break;
-  case JXFORM_ROT_90:
-    transpose_critical_parameters(dstinfo);
-    if (info->trim)
-      trim_right_edge(dstinfo);
-    break;
-  case JXFORM_ROT_180:
-    if (info->trim) {
-      trim_right_edge(dstinfo);
-      trim_bottom_edge(dstinfo);
-    }
-    break;
-  case JXFORM_ROT_270:
-    transpose_critical_parameters(dstinfo);
-    if (info->trim)
-      trim_bottom_edge(dstinfo);
-    break;
-  }
-
-  /* Return the appropriate output data set */
-  if (info->workspace_coef_arrays != NULL)
-    return info->workspace_coef_arrays;
-  return src_coef_arrays;
-}
-
-
-/* Execute the actual transformation, if any.
- *
- * This must be called *after* jpeg_write_coefficients, because it depends
- * on jpeg_write_coefficients to have computed subsidiary values such as
- * the per-component width and height fields in the destination object.
- *
- * Note that some transformations will modify the source data arrays!
- */
-
-GLOBAL(void)
-jtransform_execute_transformation (j_decompress_ptr srcinfo,
-				   j_compress_ptr dstinfo,
-				   jvirt_barray_ptr *src_coef_arrays,
-				   jpeg_transform_info *info)
-{
-  jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays;
-
-  switch (info->transform) {
-  case JXFORM_NONE:
-    break;
-  case JXFORM_FLIP_H:
-    do_flip_h(srcinfo, dstinfo, src_coef_arrays);
-    break;
-  case JXFORM_FLIP_V:
-    do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  case JXFORM_TRANSPOSE:
-    do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  case JXFORM_TRANSVERSE:
-    do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  case JXFORM_ROT_90:
-    do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  case JXFORM_ROT_180:
-    do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  case JXFORM_ROT_270:
-    do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
-    break;
-  }
-}
-
-#endif /* TRANSFORMS_SUPPORTED */
-
-
-/* Setup decompression object to save desired markers in memory.
- * This must be called before jpeg_read_header() to have the desired effect.
- */
-
-GLOBAL(void)
-jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
-{
-#ifdef SAVE_MARKERS_SUPPORTED
-  int m;
-
-  /* Save comments except under NONE option */
-  if (option != JCOPYOPT_NONE) {
-    jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF);
-  }
-  /* Save all types of APPn markers iff ALL option */
-  if (option == JCOPYOPT_ALL) {
-    for (m = 0; m < 16; m++)
-      jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF);
-  }
-#endif /* SAVE_MARKERS_SUPPORTED */
-}
-
-/* Copy markers saved in the given source object to the destination object.
- * This should be called just after jpeg_start_compress() or
- * jpeg_write_coefficients().
- * Note that those routines will have written the SOI, and also the
- * JFIF APP0 or Adobe APP14 markers if selected.
- */
-
-GLOBAL(void)
-jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-		       JCOPY_OPTION option)
-{
-  jpeg_saved_marker_ptr marker;
-
-  /* In the current implementation, we don't actually need to examine the
-   * option flag here; we just copy everything that got saved.
-   * But to avoid confusion, we do not output JFIF and Adobe APP14 markers
-   * if the encoder library already wrote one.
-   */
-  for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) {
-    if (dstinfo->write_JFIF_header &&
-	marker->marker == JPEG_APP0 &&
-	marker->data_length >= 5 &&
-	GETJOCTET(marker->data[0]) == 0x4A &&
-	GETJOCTET(marker->data[1]) == 0x46 &&
-	GETJOCTET(marker->data[2]) == 0x49 &&
-	GETJOCTET(marker->data[3]) == 0x46 &&
-	GETJOCTET(marker->data[4]) == 0)
-      continue;			/* reject duplicate JFIF */
-    if (dstinfo->write_Adobe_marker &&
-	marker->marker == JPEG_APP0+14 &&
-	marker->data_length >= 5 &&
-	GETJOCTET(marker->data[0]) == 0x41 &&
-	GETJOCTET(marker->data[1]) == 0x64 &&
-	GETJOCTET(marker->data[2]) == 0x6F &&
-	GETJOCTET(marker->data[3]) == 0x62 &&
-	GETJOCTET(marker->data[4]) == 0x65)
-      continue;			/* reject duplicate Adobe */
-#ifdef NEED_FAR_POINTERS
-    /* We could use jpeg_write_marker if the data weren't FAR... */
-    {
-      unsigned int i;
-      jpeg_write_m_header(dstinfo, marker->marker, marker->data_length);
-      for (i = 0; i < marker->data_length; i++)
-	jpeg_write_m_byte(dstinfo, marker->data[i]);
-    }
-#else
-    jpeg_write_marker(dstinfo, marker->marker,
-		      marker->data, marker->data_length);
-#endif
-  }
-}
diff --git a/tkimg1.3/libjpeg/transupp.h b/tkimg1.3/libjpeg/transupp.h
deleted file mode 100644
index 5c2d32a..0000000
--- a/tkimg1.3/libjpeg/transupp.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * transupp.h
- *
- * Copyright (C) 1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for image transformation routines and
- * other utility code used by the jpegtran sample application.  These are
- * NOT part of the core JPEG library.  But we keep these routines separate
- * from jpegtran.c to ease the task of maintaining jpegtran-like programs
- * that have other user interfaces.
- *
- * NOTE: all the routines declared here have very specific requirements
- * about when they are to be executed during the reading and writing of the
- * source and destination files.  See the comments in transupp.c, or see
- * jpegtran.c for an example of correct usage.
- */
-
-/* If you happen not to want the image transform support, disable it here */
-#ifndef TRANSFORMS_SUPPORTED
-#define TRANSFORMS_SUPPORTED 1		/* 0 disables transform code */
-#endif
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jtransform_request_workspace		jTrRequest
-#define jtransform_adjust_parameters		jTrAdjust
-#define jtransform_execute_transformation	jTrExec
-#define jcopy_markers_setup			jCMrkSetup
-#define jcopy_markers_execute			jCMrkExec
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/*
- * Codes for supported types of image transformations.
- */
-
-typedef enum {
-	JXFORM_NONE,		/* no transformation */
-	JXFORM_FLIP_H,		/* horizontal flip */
-	JXFORM_FLIP_V,		/* vertical flip */
-	JXFORM_TRANSPOSE,	/* transpose across UL-to-LR axis */
-	JXFORM_TRANSVERSE,	/* transpose across UR-to-LL axis */
-	JXFORM_ROT_90,		/* 90-degree clockwise rotation */
-	JXFORM_ROT_180,		/* 180-degree rotation */
-	JXFORM_ROT_270		/* 270-degree clockwise (or 90 ccw) */
-} JXFORM_CODE;
-
-/*
- * Although rotating and flipping data expressed as DCT coefficients is not
- * hard, there is an asymmetry in the JPEG format specification for images
- * whose dimensions aren't multiples of the iMCU size.  The right and bottom
- * image edges are padded out to the next iMCU boundary with junk data; but
- * no padding is possible at the top and left edges.  If we were to flip
- * the whole image including the pad data, then pad garbage would become
- * visible at the top and/or left, and real pixels would disappear into the
- * pad margins --- perhaps permanently, since encoders & decoders may not
- * bother to preserve DCT blocks that appear to be completely outside the
- * nominal image area.  So, we have to exclude any partial iMCUs from the
- * basic transformation.
- *
- * Transpose is the only transformation that can handle partial iMCUs at the
- * right and bottom edges completely cleanly.  flip_h can flip partial iMCUs
- * at the bottom, but leaves any partial iMCUs at the right edge untouched.
- * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched.
- * The other transforms are defined as combinations of these basic transforms
- * and process edge blocks in a way that preserves the equivalence.
- *
- * The "trim" option causes untransformable partial iMCUs to be dropped;
- * this is not strictly lossless, but it usually gives the best-looking
- * result for odd-size images.  Note that when this option is active,
- * the expected mathematical equivalences between the transforms may not hold.
- * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim
- * followed by -rot 180 -trim trims both edges.)
- *
- * We also offer a "force to grayscale" option, which simply discards the
- * chrominance channels of a YCbCr image.  This is lossless in the sense that
- * the luminance channel is preserved exactly.  It's not the same kind of
- * thing as the rotate/flip transformations, but it's convenient to handle it
- * as part of this package, mainly because the transformation routines have to
- * be aware of the option to know how many components to work on.
- */
-
-typedef struct {
-  /* Options: set by caller */
-  JXFORM_CODE transform;	/* image transform operator */
-  boolean trim;			/* if TRUE, trim partial MCUs as needed */
-  boolean force_grayscale;	/* if TRUE, convert color image to grayscale */
-
-  /* Internal workspace: caller should not touch these */
-  int num_components;		/* # of components in workspace */
-  jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
-} jpeg_transform_info;
-
-
-#if TRANSFORMS_SUPPORTED
-
-/* Request any required workspace */
-EXTERN(void) jtransform_request_workspace
-	JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
-/* Adjust output image parameters */
-EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
-	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	     jvirt_barray_ptr *src_coef_arrays,
-	     jpeg_transform_info *info));
-/* Execute the actual transformation, if any */
-EXTERN(void) jtransform_execute_transformation
-	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	     jvirt_barray_ptr *src_coef_arrays,
-	     jpeg_transform_info *info));
-
-#endif /* TRANSFORMS_SUPPORTED */
-
-
-/*
- * Support for copying optional markers from source to destination file.
- */
-
-typedef enum {
-	JCOPYOPT_NONE,		/* copy no optional markers */
-	JCOPYOPT_COMMENTS,	/* copy only comment (COM) markers */
-	JCOPYOPT_ALL		/* copy all optional markers */
-} JCOPY_OPTION;
-
-#define JCOPYOPT_DEFAULT  JCOPYOPT_COMMENTS	/* recommended default */
-
-/* Setup decompression object to save desired markers in memory */
-EXTERN(void) jcopy_markers_setup
-	JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
-/* Copy markers saved in the given source object to the destination object */
-EXTERN(void) jcopy_markers_execute
-	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-	     JCOPY_OPTION option));
diff --git a/tkimg1.3/libjpeg/usage.doc b/tkimg1.3/libjpeg/usage.doc
deleted file mode 100644
index 8c4970a..0000000
--- a/tkimg1.3/libjpeg/usage.doc
+++ /dev/null
@@ -1,562 +0,0 @@
-USAGE instructions for the Independent JPEG Group's JPEG software
-=================================================================
-
-This file describes usage of the JPEG conversion programs cjpeg and djpeg,
-as well as the utility programs jpegtran, rdjpgcom and wrjpgcom.  (See
-the other documentation files if you wish to use the JPEG library within
-your own programs.)
-
-If you are on a Unix machine you may prefer to read the Unix-style manual
-pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1.
-
-
-INTRODUCTION
-
-These programs implement JPEG image compression and decompression.  JPEG
-(pronounced "jay-peg") is a standardized compression method for full-color
-and gray-scale images.  JPEG is designed to handle "real-world" scenes,
-for example scanned photographs.  Cartoons, line drawings, and other
-non-realistic images are not JPEG's strong suit; on that sort of material
-you may get poor image quality and/or little compression.
-
-JPEG is lossy, meaning that the output image is not necessarily identical to
-the input image.  Hence you should not use JPEG if you have to have identical
-output bits.  However, on typical real-world images, very good compression
-levels can be obtained with no visible change, and amazingly high compression
-is possible if you can tolerate a low-quality image.  You can trade off image
-quality against file size by adjusting the compressor's "quality" setting.
-
-
-GENERAL USAGE
-
-We provide two programs, cjpeg to compress an image file into JPEG format,
-and djpeg to decompress a JPEG file back into a conventional image format.
-
-On Unix-like systems, you say:
-	cjpeg [switches] [imagefile] >jpegfile
-or
-	djpeg [switches] [jpegfile]  >imagefile
-The programs read the specified input file, or standard input if none is
-named.  They always write to standard output (with trace/error messages to
-standard error).  These conventions are handy for piping images between
-programs.
-
-On most non-Unix systems, you say:
-	cjpeg [switches] imagefile jpegfile
-or
-	djpeg [switches] jpegfile  imagefile
-i.e., both the input and output files are named on the command line.  This
-style is a little more foolproof, and it loses no functionality if you don't
-have pipes.  (You can get this style on Unix too, if you prefer, by defining
-TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.)
-
-You can also say:
-	cjpeg [switches] -outfile jpegfile  imagefile
-or
-	djpeg [switches] -outfile imagefile  jpegfile
-This syntax works on all systems, so it is useful for scripts.
-
-The currently supported image file formats are: PPM (PBMPLUS color format),
-PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit
-format).  (RLE is supported only if the URT library is available.)
-cjpeg recognizes the input image format automatically, with the exception
-of some Targa-format files.  You have to tell djpeg which format to generate.
-
-JPEG files are in the defacto standard JFIF file format.  There are other,
-less widely used JPEG-based file formats, but we don't support them.
-
-All switch names may be abbreviated; for example, -grayscale may be written
--gray or -gr.  Most of the "basic" switches can be abbreviated to as little as
-one letter.  Upper and lower case are equivalent (-BMP is the same as -bmp).
-British spellings are also accepted (e.g., -greyscale), though for brevity
-these are not mentioned below.
-
-
-CJPEG DETAILS
-
-The basic command line switches for cjpeg are:
-
-	-quality N	Scale quantization tables to adjust image quality.
-			Quality is 0 (worst) to 100 (best); default is 75.
-			(See below for more info.)
-
-	-grayscale	Create monochrome JPEG file from color input.
-			Be sure to use this switch when compressing a grayscale
-			BMP file, because cjpeg isn't bright enough to notice
-			whether a BMP file uses only shades of gray.  By
-			saying -grayscale, you'll get a smaller JPEG file that
-			takes less time to process.
-
-	-optimize	Perform optimization of entropy encoding parameters.
-			Without this, default encoding parameters are used.
-			-optimize usually makes the JPEG file a little smaller,
-			but cjpeg runs somewhat slower and needs much more
-			memory.  Image quality and speed of decompression are
-			unaffected by -optimize.
-
-	-progressive	Create progressive JPEG file (see below).
-
-	-targa		Input file is Targa format.  Targa files that contain
-			an "identification" field will not be automatically
-			recognized by cjpeg; for such files you must specify
-			-targa to make cjpeg treat the input as Targa format.
-			For most Targa files, you won't need this switch.
-
-The -quality switch lets you trade off compressed file size against quality of
-the reconstructed image: the higher the quality setting, the larger the JPEG
-file, and the closer the output image will be to the original input.  Normally
-you want to use the lowest quality setting (smallest file) that decompresses
-into something visually indistinguishable from the original image.  For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right.  If you see defects at -quality 75, then go up 5 or 10
-counts at a time until you are happy with the output image.  (The optimal
-setting will vary from one image to another.)
-
--quality 100 will generate a quantization table of all 1's, minimizing loss
-in the quantization step (but there is still information loss in subsampling,
-as well as roundoff error).  This setting is mainly of interest for
-experimental purposes.  Quality values above about 95 are NOT recommended for
-normal use; the compressed file size goes up dramatically for hardly any gain
-in output image quality.
-
-In the other direction, quality values below 50 will produce very small files
-of low image quality.  Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example.  Try -quality 2 (or so) for some
-amusing Cubist effects.  (Note: quality values below about 25 generate 2-byte
-quantization tables, which are considered optional in the JPEG standard.
-cjpeg emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file.  Use -baseline
-if you need to ensure compatibility at low quality values.)
-
-The -progressive switch creates a "progressive JPEG" file.  In this type of
-JPEG file, the data is stored in multiple scans of increasing quality.  If the
-file is being transmitted over a slow communications link, the decoder can use
-the first scan to display a low-quality image very quickly, and can then
-improve the display with each subsequent scan.  The final image is exactly
-equivalent to a standard JPEG file of the same quality setting, and the total
-file size is about the same --- often a little smaller.  CAUTION: progressive
-JPEG is not yet widely implemented, so many decoders will be unable to view a
-progressive JPEG file at all.
-
-Switches for advanced users:
-
-	-dct int	Use integer DCT method (default).
-	-dct fast	Use fast integer DCT (less accurate).
-	-dct float	Use floating-point DCT method.
-			The float method is very slightly more accurate than
-			the int method, but is much slower unless your machine
-			has very fast floating-point hardware.  Also note that
-			results of the floating-point method may vary slightly
-			across machines, while the integer methods should give
-			the same results everywhere.  The fast integer method
-			is much less accurate than the other two.
-
-	-restart N	Emit a JPEG restart marker every N MCU rows, or every
-			N MCU blocks if "B" is attached to the number.
-			-restart 0 (the default) means no restart markers.
-
-	-smooth N	Smooth the input image to eliminate dithering noise.
-			N, ranging from 1 to 100, indicates the strength of
-			smoothing.  0 (the default) means no smoothing.
-
-	-maxmemory N	Set limit for amount of memory to use in processing
-			large images.  Value is in thousands of bytes, or
-			millions of bytes if "M" is attached to the number.
-			For example, -max 4m selects 4000000 bytes.  If more
-			space is needed, temporary files will be used.
-
-	-verbose	Enable debug printout.  More -v's give more printout.
-	or  -debug	Also, version information is printed at startup.
-
-The -restart option inserts extra markers that allow a JPEG decoder to
-resynchronize after a transmission error.  Without restart markers, any damage
-to a compressed file will usually ruin the image from the point of the error
-to the end of the image; with restart markers, the damage is usually confined
-to the portion of the image up to the next restart marker.  Of course, the
-restart markers occupy extra space.  We recommend -restart 1 for images that
-will be transmitted across unreliable networks such as Usenet.
-
-The -smooth option filters the input to eliminate fine-scale noise.  This is
-often useful when converting dithered images to JPEG: a moderate smoothing
-factor of 10 to 50 gets rid of dithering patterns in the input file, resulting
-in a smaller JPEG file and a better-looking image.  Too large a smoothing
-factor will visibly blur the image, however.
-
-Switches for wizards:
-
-	-baseline	Force baseline-compatible quantization tables to be
-			generated.  This clamps quantization values to 8 bits
-			even at low quality settings.  (This switch is poorly
-			named, since it does not ensure that the output is
-			actually baseline JPEG.  For example, you can use
-			-baseline and -progressive together.)
-
-	-qtables file	Use the quantization tables given in the specified
-			text file.
-
-	-qslots N[,...] Select which quantization table to use for each color
-			component.
-
-	-sample HxV[,...]  Set JPEG sampling factors for each color component.
-
-	-scans file	Use the scan script given in the specified text file.
-
-The "wizard" switches are intended for experimentation with JPEG.  If you
-don't know what you are doing, DON'T USE THEM.  These switches are documented
-further in the file wizard.doc.
-
-
-DJPEG DETAILS
-
-The basic command line switches for djpeg are:
-
-	-colors N	Reduce image to at most N colors.  This reduces the
-	or -quantize N	number of colors used in the output image, so that it
-			can be displayed on a colormapped display or stored in
-			a colormapped file format.  For example, if you have
-			an 8-bit display, you'd need to reduce to 256 or fewer
-			colors.  (-colors is the recommended name, -quantize
-			is provided only for backwards compatibility.)
-
-	-fast		Select recommended processing options for fast, low
-			quality output.  (The default options are chosen for
-			highest quality output.)  Currently, this is equivalent
-			to "-dct fast -nosmooth -onepass -dither ordered".
-
-	-grayscale	Force gray-scale output even if JPEG file is color.
-			Useful for viewing on monochrome displays; also,
-			djpeg runs noticeably faster in this mode.
-
-	-scale M/N	Scale the output image by a factor M/N.  Currently
-			the scale factor must be 1/1, 1/2, 1/4, or 1/8.
-			Scaling is handy if the image is larger than your
-			screen; also, djpeg runs much faster when scaling
-			down the output.
-
-	-bmp		Select BMP output format (Windows flavor).  8-bit
-			colormapped format is emitted if -colors or -grayscale
-			is specified, or if the JPEG file is gray-scale;
-			otherwise, 24-bit full-color format is emitted.
-
-	-gif		Select GIF output format.  Since GIF does not support
-			more than 256 colors, -colors 256 is assumed (unless
-			you specify a smaller number of colors).  If you
-			specify -fast, the default number of colors is 216.
-
-	-os2		Select BMP output format (OS/2 1.x flavor).  8-bit
-			colormapped format is emitted if -colors or -grayscale
-			is specified, or if the JPEG file is gray-scale;
-			otherwise, 24-bit full-color format is emitted.
-
-	-pnm		Select PBMPLUS (PPM/PGM) output format (this is the
-			default format).  PGM is emitted if the JPEG file is
-			gray-scale or if -grayscale is specified; otherwise
-			PPM is emitted.
-
-	-rle		Select RLE output format.  (Requires URT library.)
-
-	-targa		Select Targa output format.  Gray-scale format is
-			emitted if the JPEG file is gray-scale or if
-			-grayscale is specified; otherwise, colormapped format
-			is emitted if -colors is specified; otherwise, 24-bit
-			full-color format is emitted.
-
-Switches for advanced users:
-
-	-dct int	Use integer DCT method (default).
-	-dct fast	Use fast integer DCT (less accurate).
-	-dct float	Use floating-point DCT method.
-			The float method is very slightly more accurate than
-			the int method, but is much slower unless your machine
-			has very fast floating-point hardware.  Also note that
-			results of the floating-point method may vary slightly
-			across machines, while the integer methods should give
-			the same results everywhere.  The fast integer method
-			is much less accurate than the other two.
-
-	-dither fs	Use Floyd-Steinberg dithering in color quantization.
-	-dither ordered	Use ordered dithering in color quantization.
-	-dither none	Do not use dithering in color quantization.
-			By default, Floyd-Steinberg dithering is applied when
-			quantizing colors; this is slow but usually produces
-			the best results.  Ordered dither is a compromise
-			between speed and quality; no dithering is fast but
-			usually looks awful.  Note that these switches have
-			no effect unless color quantization is being done.
-			Ordered dither is only available in -onepass mode.
-
-	-map FILE	Quantize to the colors used in the specified image
-			file.  This is useful for producing multiple files
-			with identical color maps, or for forcing a predefined
-			set of colors to be used.  The FILE must be a GIF
-			or PPM file.  This option overrides -colors and
-			-onepass.
-
-	-nosmooth	Use a faster, lower-quality upsampling routine.
-
-	-onepass	Use one-pass instead of two-pass color quantization.
-			The one-pass method is faster and needs less memory,
-			but it produces a lower-quality image.  -onepass is
-			ignored unless you also say -colors N.  Also,
-			the one-pass method is always used for gray-scale
-			output (the two-pass method is no improvement then).
-
-	-maxmemory N	Set limit for amount of memory to use in processing
-			large images.  Value is in thousands of bytes, or
-			millions of bytes if "M" is attached to the number.
-			For example, -max 4m selects 4000000 bytes.  If more
-			space is needed, temporary files will be used.
-
-	-verbose	Enable debug printout.  More -v's give more printout.
-	or  -debug	Also, version information is printed at startup.
-
-
-HINTS FOR CJPEG
-
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images.  In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors.  GIF works great on these, JPEG does not.  If you want to convert a
-GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options
-to get a satisfactory conversion.  -smooth 10 or so is often helpful.
-
-Avoid running an image through a series of JPEG compression/decompression
-cycles.  Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle.  It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-
-The -optimize option to cjpeg is worth using when you are making a "final"
-version for posting or archiving.  It's also a win when you are using low
-quality settings to make very small JPEG files; the percentage improvement
-is often a lot more than it is on larger files.  (At present, -optimize
-mode is always selected when generating progressive JPEG files.)
-
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-Use a Unisys-licensed program if you need to read a GIF file.  (Conversion
-of GIF files to JPEG is usually a bad idea anyway.)
-
-
-HINTS FOR DJPEG
-
-To get a quick preview of an image, use the -grayscale and/or -scale switches.
-"-grayscale -scale 1/8" is the fastest case.
-
-Several options are available that trade off image quality to gain speed.
-"-fast" turns on the recommended settings.
-
-"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality.
-When producing a color-quantized image, "-onepass -dither ordered" is fast but
-much lower quality than the default behavior.  "-dither none" may give
-acceptable results in two-pass mode, but is seldom tolerable in one-pass mode.
-
-If you are fortunate enough to have very fast floating point hardware,
-"-dct float" may be even faster than "-dct fast".  But on most machines
-"-dct float" is slower than "-dct int"; in this case it is not worth using,
-because its theoretical accuracy advantage is too small to be significant
-in practice.
-
-Two-pass color quantization requires a good deal of memory; on MS-DOS machines
-it may run out of memory even with -maxmemory 0.  In that case you can still
-decompress, with some loss of image quality, by specifying -onepass for
-one-pass quantization.
-
-To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files.  These
-are larger than they should be, but are readable by standard GIF decoders.
-
-
-HINTS FOR BOTH PROGRAMS
-
-If more space is needed than will fit in the available main memory (as
-determined by -maxmemory), temporary files will be used.  (MS-DOS versions
-will try to get extended or expanded memory first.)  The temporary files are
-often rather large: in typical cases they occupy three bytes per pixel, for
-example 3*800*600 = 1.44Mb for an 800x600 image.  If you don't have enough
-free disk space, leave out -progressive and -optimize (for cjpeg) or specify
--onepass (for djpeg).
-
-On MS-DOS, the temporary files are created in the directory named by the TMP
-or TEMP environment variable, or in the current directory if neither of those
-exist.  Amiga implementations put the temp files in the directory named by
-JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free
-space.
-
-The default memory usage limit (-maxmemory) is set when the software is
-compiled.  If you get an "insufficient memory" error, try specifying a smaller
--maxmemory value, even -maxmemory 0 to use the absolute minimum space.  You
-may want to recompile with a smaller default value if this happens often.
-
-On machines that have "environment" variables, you can define the environment
-variable JPEGMEM to set the default memory limit.  The value is specified as
-described for the -maxmemory switch.  JPEGMEM overrides the default value
-specified when the program was compiled, and itself is overridden by an
-explicit -maxmemory switch.
-
-On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to
-use.  (Extended or expanded memory is also used if available.)  Most
-DOS-specific versions of this software do their own memory space estimation
-and do not need you to specify -maxmemory.
-
-
-JPEGTRAN
-
-jpegtran performs various useful transformations of JPEG files.
-It can translate the coded representation from one variant of JPEG to another,
-for example from baseline JPEG to progressive JPEG or vice versa.  It can also
-perform some rearrangements of the image data, for example turning an image
-from landscape to portrait format by rotation.
-
-jpegtran works by rearranging the compressed data (DCT coefficients), without
-ever fully decoding the image.  Therefore, its transformations are lossless:
-there is no image degradation at all, which would not be true if you used
-djpeg followed by cjpeg to accomplish the same conversion.  But by the same
-token, jpegtran cannot perform lossy operations such as changing the image
-quality.
-
-jpegtran uses a command line syntax similar to cjpeg or djpeg.
-On Unix-like systems, you say:
-	jpegtran [switches] [inputfile] >outputfile
-On most non-Unix systems, you say:
-	jpegtran [switches] inputfile outputfile
-where both the input and output files are JPEG files.
-
-To specify the coded JPEG representation used in the output file,
-jpegtran accepts a subset of the switches recognized by cjpeg:
-	-optimize	Perform optimization of entropy encoding parameters.
-	-progressive	Create progressive JPEG file.
-	-restart N	Emit a JPEG restart marker every N MCU rows, or every
-			N MCU blocks if "B" is attached to the number.
-	-scans file	Use the scan script given in the specified text file.
-See the previous discussion of cjpeg for more details about these switches.
-If you specify none of these switches, you get a plain baseline-JPEG output
-file.  The quality setting and so forth are determined by the input file.
-
-The image can be losslessly transformed by giving one of these switches:
-	-flip horizontal	Mirror image horizontally (left-right).
-	-flip vertical		Mirror image vertically (top-bottom).
-	-rotate 90		Rotate image 90 degrees clockwise.
-	-rotate 180		Rotate image 180 degrees.
-	-rotate 270		Rotate image 270 degrees clockwise (or 90 ccw).
-	-transpose		Transpose image (across UL-to-LR axis).
-	-transverse		Transverse transpose (across UR-to-LL axis).
-
-The transpose transformation has no restrictions regarding image dimensions.
-The other transformations operate rather oddly if the image dimensions are not
-a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
-transform complete blocks of DCT coefficient data in the desired way.
-
-jpegtran's default behavior when transforming an odd-size image is designed
-to preserve exact reversibility and mathematical consistency of the
-transformation set.  As stated, transpose is able to flip the entire image
-area.  Horizontal mirroring leaves any partial iMCU column at the right edge
-untouched, but is able to flip all rows of the image.  Similarly, vertical
-mirroring leaves any partial iMCU row at the bottom edge untouched, but is
-able to flip all columns.  The other transforms can be built up as sequences
-of transpose and flip operations; for consistency, their actions on edge
-pixels are defined to be the same as the end result of the corresponding
-transpose-and-flip sequence.
-
-For practical use, you may prefer to discard any untransformable edge pixels
-rather than having a strange-looking strip along the right and/or bottom edges
-of a transformed image.  To do this, add the -trim switch:
-	-trim		Drop non-transformable edge blocks.
-Obviously, a transformation with -trim is not reversible, so strictly speaking
-jpegtran with this switch is not lossless.  Also, the expected mathematical
-equivalences between the transformations no longer hold.  For example,
-"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by
-"-rot 180 -trim" trims both edges.
-
-Another not-strictly-lossless transformation switch is:
-	-grayscale	Force grayscale output.
-This option discards the chrominance channels if the input image is YCbCr
-(ie, a standard color JPEG), resulting in a grayscale JPEG file.  The
-luminance channel is preserved exactly, so this is a better method of reducing
-to grayscale than decompression, conversion, and recompression.  This switch
-is particularly handy for fixing a monochrome picture that was mistakenly
-encoded as a color JPEG.  (In such a case, the space savings from getting rid
-of the near-empty chroma channels won't be large; but the decoding time for
-a grayscale JPEG is substantially less than that for a color JPEG.)
-
-jpegtran also recognizes these switches that control what to do with "extra"
-markers, such as comment blocks:
-	-copy none	Copy no extra markers from source file.  This setting
-			suppresses all comments and other excess baggage
-			present in the source file.
-	-copy comments	Copy only comment markers.  This setting copies
-			comments from the source file, but discards
-			any other inessential data. 
-	-copy all	Copy all extra markers.  This setting preserves
-			miscellaneous markers found in the source file, such
-			as JFIF thumbnails and Photoshop settings.  In some
-			files these extra markers can be sizable.
-The default behavior is -copy comments.  (Note: in IJG releases v6 and v6a,
-jpegtran always did the equivalent of -copy none.)
-
-Additional switches recognized by jpegtran are:
-	-outfile filename
-	-maxmemory N
-	-verbose
-	-debug
-These work the same as in cjpeg or djpeg.
-
-
-THE COMMENT UTILITIES
-
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings.  This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text.  COM blocks do not interfere with the image stored in the JPEG
-file.  The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-
-We provide two utility programs to display COM block contents and add COM
-blocks to a JPEG file.
-
-rdjpgcom searches a JPEG file and prints the contents of any COM blocks on
-standard output.  The command line syntax is
-	rdjpgcom [-verbose] [inputfilename]
-The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG
-image dimensions.  If you omit the input file name from the command line,
-the JPEG file is read from standard input.  (This may not work on some
-operating systems, if binary data can't be read from stdin.)
-
-wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
-Ordinarily, the COM block is added after any existing COM blocks, but you
-can delete the old COM blocks if you wish.  wrjpgcom produces a new JPEG
-file; it does not modify the input file.  DO NOT try to overwrite the input
-file by directing wrjpgcom's output back into it; on most systems this will
-just destroy your file.
-
-The command line syntax for wrjpgcom is similar to cjpeg's.  On Unix-like
-systems, it is
-	wrjpgcom [switches] [inputfilename]
-The output file is written to standard output.  The input file comes from
-the named file, or from standard input if no input file is named.
-
-On most non-Unix systems, the syntax is
-	wrjpgcom [switches] inputfilename outputfilename
-where both input and output file names must be given explicitly.
-
-wrjpgcom understands three switches:
-	-replace		 Delete any existing COM blocks from the file.
-	-comment "Comment text"	 Supply new COM text on command line.
-	-cfile name		 Read text for new COM block from named file.
-(Switch names can be abbreviated.)  If you have only one line of comment text
-to add, you can provide it on the command line with -comment.  The comment
-text must be surrounded with quotes so that it is treated as a single
-argument.  Longer comments can be read from a text file.
-
-If you give neither -comment nor -cfile, then wrjpgcom will read the comment
-text from standard input.  (In this case an input image file name MUST be
-supplied, so that the source JPEG file comes from somewhere else.)  You can
-enter multiple lines, up to 64KB worth.  Type an end-of-file indicator
-(usually control-D or control-Z) to terminate the comment text entry.
-
-wrjpgcom will not add a COM block if the provided comment string is empty.
-Therefore -replace -comment "" can be used to delete all COM blocks from a
-file.
-
-These utility programs do not depend on the IJG JPEG library.  In
-particular, the source code for rdjpgcom is intended as an illustration of
-the minimum amount of code required to parse a JPEG file header correctly.
diff --git a/tkimg1.3/libjpeg/wizard.doc b/tkimg1.3/libjpeg/wizard.doc
deleted file mode 100644
index 54170b2..0000000
--- a/tkimg1.3/libjpeg/wizard.doc
+++ /dev/null
@@ -1,211 +0,0 @@
-Advanced usage instructions for the Independent JPEG Group's JPEG software
-==========================================================================
-
-This file describes cjpeg's "switches for wizards".
-
-The "wizard" switches are intended for experimentation with JPEG by persons
-who are reasonably knowledgeable about the JPEG standard.  If you don't know
-what you are doing, DON'T USE THESE SWITCHES.  You'll likely produce files
-with worse image quality and/or poorer compression than you'd get from the
-default settings.  Furthermore, these switches must be used with caution
-when making files intended for general use, because not all JPEG decoders
-will support unusual JPEG parameter settings.
-
-
-Quantization Table Adjustment
------------------------------
-
-Ordinarily, cjpeg starts with a default set of tables (the same ones given
-as examples in the JPEG standard) and scales them up or down according to
-the -quality setting.  The details of the scaling algorithm can be found in
-jcparam.c.  At very low quality settings, some quantization table entries
-can get scaled up to values exceeding 255.  Although 2-byte quantization
-values are supported by the IJG software, this feature is not in baseline
-JPEG and is not supported by all implementations.  If you need to ensure
-wide compatibility of low-quality files, you can constrain the scaled
-quantization values to no more than 255 by giving the -baseline switch.
-Note that use of -baseline will result in poorer quality for the same file
-size, since more bits than necessary are expended on higher AC coefficients.
-
-You can substitute a different set of quantization values by using the
--qtables switch:
-
-	-qtables file	Use the quantization tables given in the named file.
-
-The specified file should be a text file containing decimal quantization
-values.  The file should contain one to four tables, each of 64 elements.
-The tables are implicitly numbered 0,1,etc. in order of appearance.  Table
-entries appear in normal array order (NOT in the zigzag order in which they
-will be stored in the JPEG file).
-
-Quantization table files are free format, in that arbitrary whitespace can
-appear between numbers.  Also, comments can be included: a comment starts
-with '#' and extends to the end of the line.  Here is an example file that
-duplicates the default quantization tables:
-
-	# Quantization tables given in JPEG spec, section K.1
-
-	# This is table 0 (the luminance table):
-	  16  11  10  16  24  40  51  61
-	  12  12  14  19  26  58  60  55
-	  14  13  16  24  40  57  69  56
-	  14  17  22  29  51  87  80  62
-	  18  22  37  56  68 109 103  77
-	  24  35  55  64  81 104 113  92
-	  49  64  78  87 103 121 120 101
-	  72  92  95  98 112 100 103  99
-
-	# This is table 1 (the chrominance table):
-	  17  18  24  47  99  99  99  99
-	  18  21  26  66  99  99  99  99
-	  24  26  56  99  99  99  99  99
-	  47  66  99  99  99  99  99  99
-	  99  99  99  99  99  99  99  99
-	  99  99  99  99  99  99  99  99
-	  99  99  99  99  99  99  99  99
-	  99  99  99  99  99  99  99  99
-
-If the -qtables switch is used without -quality, then the specified tables
-are used exactly as-is.  If both -qtables and -quality are used, then the
-tables taken from the file are scaled in the same fashion that the default
-tables would be scaled for that quality setting.  If -baseline appears, then
-the quantization values are constrained to the range 1-255.
-
-By default, cjpeg will use quantization table 0 for luminance components and
-table 1 for chrominance components.  To override this choice, use the -qslots
-switch:
-
-	-qslots N[,...]		Select which quantization table to use for
-				each color component.
-
-The -qslots switch specifies a quantization table number for each color
-component, in the order in which the components appear in the JPEG SOF marker.
-For example, to create a separate table for each of Y,Cb,Cr, you could
-provide a -qtables file that defines three quantization tables and say
-"-qslots 0,1,2".  If -qslots gives fewer table numbers than there are color
-components, then the last table number is repeated as necessary.
-
-
-Sampling Factor Adjustment
---------------------------
-
-By default, cjpeg uses 2:1 horizontal and vertical downsampling when
-compressing YCbCr data, and no downsampling for all other color spaces.
-You can override this default with the -sample switch:
-
-	-sample HxV[,...]	Set JPEG sampling factors for each color
-				component.
-
-The -sample switch specifies the JPEG sampling factors for each color
-component, in the order in which they appear in the JPEG SOF marker.
-If you specify fewer HxV pairs than there are components, the remaining
-components are set to 1x1 sampling.  For example, the default YCbCr setting
-is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to
-"-sample 2x2".
-
-There are still some JPEG decoders in existence that support only 2x1
-sampling (also called 4:2:2 sampling).  Compatibility with such decoders can
-be achieved by specifying "-sample 2x1".  This is not recommended unless
-really necessary, since it increases file size and encoding/decoding time
-with very little quality gain.
-
-
-Multiple Scan / Progression Control
------------------------------------
-
-By default, cjpeg emits a single-scan sequential JPEG file.  The
--progressive switch generates a progressive JPEG file using a default series
-of progression parameters.  You can create multiple-scan sequential JPEG
-files or progressive JPEG files with custom progression parameters by using
-the -scans switch:
-
-	-scans file	Use the scan sequence given in the named file.
-
-The specified file should be a text file containing a "scan script".
-The script specifies the contents and ordering of the scans to be emitted.
-Each entry in the script defines one scan.  A scan definition specifies
-the components to be included in the scan, and for progressive JPEG it also
-specifies the progression parameters Ss,Se,Ah,Al for the scan.  Scan
-definitions are separated by semicolons (';').  A semicolon after the last
-scan definition is optional.
-
-Each scan definition contains one to four component indexes, optionally
-followed by a colon (':') and the four progressive-JPEG parameters.  The
-component indexes denote which color component(s) are to be transmitted in
-the scan.  Components are numbered in the order in which they appear in the
-JPEG SOF marker, with the first component being numbered 0.  (Note that these
-indexes are not the "component ID" codes assigned to the components, just
-positional indexes.)
-
-The progression parameters for each scan are:
-	Ss	Zigzag index of first coefficient included in scan
-	Se	Zigzag index of last coefficient included in scan
-	Ah	Zero for first scan of a coefficient, else Al of prior scan
-	Al	Successive approximation low bit position for scan
-If the progression parameters are omitted, the values 0,63,0,0 are used,
-producing a sequential JPEG file.  cjpeg automatically determines whether
-the script represents a progressive or sequential file, by observing whether
-Ss and Se values other than 0 and 63 appear.  (The -progressive switch is
-not needed to specify this; in fact, it is ignored when -scans appears.)
-The scan script must meet the JPEG restrictions on progression sequences.
-(cjpeg checks that the spec's requirements are obeyed.)
-
-Scan script files are free format, in that arbitrary whitespace can appear
-between numbers and around punctuation.  Also, comments can be included: a
-comment starts with '#' and extends to the end of the line.  For additional
-legibility, commas or dashes can be placed between values.  (Actually, any
-single punctuation character other than ':' or ';' can be inserted.)  For
-example, the following two scan definitions are equivalent:
-	0 1 2: 0 63 0 0;
-	0,1,2 : 0-63, 0,0 ;
-
-Here is an example of a scan script that generates a partially interleaved
-sequential JPEG file:
-
-	0;			# Y only in first scan
-	1 2;			# Cb and Cr in second scan
-
-Here is an example of a progressive scan script using only spectral selection
-(no successive approximation):
-
-	# Interleaved DC scan for Y,Cb,Cr:
-	0,1,2: 0-0,   0, 0 ;
-	# AC scans:
-	0:     1-2,   0, 0 ;	# First two Y AC coefficients
-	0:     3-5,   0, 0 ;	# Three more
-	1:     1-63,  0, 0 ;	# All AC coefficients for Cb
-	2:     1-63,  0, 0 ;	# All AC coefficients for Cr
-	0:     6-9,   0, 0 ;	# More Y coefficients
-	0:     10-63, 0, 0 ;	# Remaining Y coefficients
-
-Here is an example of a successive-approximation script.  This is equivalent
-to the default script used by "cjpeg -progressive" for YCbCr images:
-
-	# Initial DC scan for Y,Cb,Cr (lowest bit not sent)
-	0,1,2: 0-0,   0, 1 ;
-	# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
-	0:     1-5,   0, 2 ;
-	# Send all Cr,Cb AC coefficients, minus lowest bit:
-	# (chroma data is usually too small to be worth subdividing further;
-	#  but note we send Cr first since eye is least sensitive to Cb)
-	2:     1-63,  0, 1 ;
-	1:     1-63,  0, 1 ;
-	# Send remaining Y AC coefficients, minus 2 lowest bits:
-	0:     6-63,  0, 2 ;
-	# Send next-to-lowest bit of all Y AC coefficients:
-	0:     1-63,  2, 1 ;
-	# At this point we've sent all but the lowest bit of all coefficients.
-	# Send lowest bit of DC coefficients
-	0,1,2: 0-0,   1, 0 ;
-	# Send lowest bit of AC coefficients
-	2:     1-63,  1, 0 ;
-	1:     1-63,  1, 0 ;
-	# Y AC lowest bit scan is last; it's usually the largest scan
-	0:     1-63,  1, 0 ;
-
-It may be worth pointing out that this script is tuned for quality settings
-of around 50 to 75.  For lower quality settings, you'd probably want to use
-a script with fewer stages of successive approximation (otherwise the
-initial scans will be really bad).  For higher quality settings, you might
-want to use more stages of successive approximation (so that the initial
-scans are not too large).
diff --git a/tkimg1.3/libjpeg/wrbmp.c b/tkimg1.3/libjpeg/wrbmp.c
deleted file mode 100644
index 3283b0f..0000000
--- a/tkimg1.3/libjpeg/wrbmp.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * wrbmp.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in Microsoft "BMP"
- * format (MS Windows 3.x and OS/2 1.x flavors).
- * Either 8-bit colormapped or 24-bit full-color format can be written.
- * No compression is supported.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * This code contributed by James Arthur Boucher.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef BMP_SUPPORTED
-
-
-/*
- * To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
- * This is not yet implemented.
- */
-
-#if BITS_IN_JSAMPLE != 8
-  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * Since BMP stores scanlines bottom-to-top, we have to invert the image
- * from JPEG's top-to-bottom order.  To do this, we save the outgoing data
- * in a virtual array during put_pixel_row calls, then actually emit the
- * BMP file during finish_output.  The virtual array contains one JSAMPLE per
- * pixel if the output is grayscale or colormapped, three if it is full color.
- */
-
-/* Private version of data destination object */
-
-typedef struct {
-  struct djpeg_dest_struct pub;	/* public fields */
-
-  boolean is_os2;		/* saves the OS2 format request flag */
-
-  jvirt_sarray_ptr whole_image;	/* needed to reverse row order */
-  JDIMENSION data_width;	/* JSAMPLEs per row */
-  JDIMENSION row_width;		/* physical width of one row in the BMP file */
-  int pad_bytes;		/* number of padding bytes needed per row */
-  JDIMENSION cur_output_row;	/* next row# to write to virtual array */
-} bmp_dest_struct;
-
-typedef bmp_dest_struct * bmp_dest_ptr;
-
-
-/* Forward declarations */
-LOCAL(void) write_colormap
-	JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest,
-	     int map_colors, int map_entry_size));
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		JDIMENSION rows_supplied)
-/* This version is for writing 24-bit pixels */
-{
-  bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
-  JSAMPARRAY image_ptr;
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION col;
-  int pad;
-
-  /* Access next row in virtual array */
-  image_ptr = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, dest->whole_image,
-     dest->cur_output_row, (JDIMENSION) 1, TRUE);
-  dest->cur_output_row++;
-
-  /* Transfer data.  Note destination values must be in BGR order
-   * (even though Microsoft's own documents say the opposite).
-   */
-  inptr = dest->pub.buffer[0];
-  outptr = image_ptr[0];
-  for (col = cinfo->output_width; col > 0; col--) {
-    outptr[2] = *inptr++;	/* can omit GETJSAMPLE() safely */
-    outptr[1] = *inptr++;
-    outptr[0] = *inptr++;
-    outptr += 3;
-  }
-
-  /* Zero out the pad bytes. */
-  pad = dest->pad_bytes;
-  while (--pad >= 0)
-    *outptr++ = 0;
-}
-
-METHODDEF(void)
-put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-	       JDIMENSION rows_supplied)
-/* This version is for grayscale OR quantized color output */
-{
-  bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
-  JSAMPARRAY image_ptr;
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION col;
-  int pad;
-
-  /* Access next row in virtual array */
-  image_ptr = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, dest->whole_image,
-     dest->cur_output_row, (JDIMENSION) 1, TRUE);
-  dest->cur_output_row++;
-
-  /* Transfer data. */
-  inptr = dest->pub.buffer[0];
-  outptr = image_ptr[0];
-  for (col = cinfo->output_width; col > 0; col--) {
-    *outptr++ = *inptr++;	/* can omit GETJSAMPLE() safely */
-  }
-
-  /* Zero out the pad bytes. */
-  pad = dest->pad_bytes;
-  while (--pad >= 0)
-    *outptr++ = 0;
-}
-
-
-/*
- * Startup: normally writes the file header.
- * In this module we may as well postpone everything until finish_output.
- */
-
-METHODDEF(void)
-start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  /* no work here */
-}
-
-
-/*
- * Finish up at the end of the file.
- *
- * Here is where we really output the BMP file.
- *
- * First, routines to write the Windows and OS/2 variants of the file header.
- */
-
-LOCAL(void)
-write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
-/* Write a Windows-style BMP file header, including colormap if needed */
-{
-  char bmpfileheader[14];
-  char bmpinfoheader[40];
-#define PUT_2B(array,offset,value)  \
-	(array[offset] = (char) ((value) & 0xFF), \
-	 array[offset+1] = (char) (((value) >> 8) & 0xFF))
-#define PUT_4B(array,offset,value)  \
-	(array[offset] = (char) ((value) & 0xFF), \
-	 array[offset+1] = (char) (((value) >> 8) & 0xFF), \
-	 array[offset+2] = (char) (((value) >> 16) & 0xFF), \
-	 array[offset+3] = (char) (((value) >> 24) & 0xFF))
-  INT32 headersize, bfSize;
-  int bits_per_pixel, cmap_entries;
-
-  /* Compute colormap size and total file size */
-  if (cinfo->out_color_space == JCS_RGB) {
-    if (cinfo->quantize_colors) {
-      /* Colormapped RGB */
-      bits_per_pixel = 8;
-      cmap_entries = 256;
-    } else {
-      /* Unquantized, full color RGB */
-      bits_per_pixel = 24;
-      cmap_entries = 0;
-    }
-  } else {
-    /* Grayscale output.  We need to fake a 256-entry colormap. */
-    bits_per_pixel = 8;
-    cmap_entries = 256;
-  }
-  /* File size */
-  headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */
-  bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height;
-  
-  /* Set unused fields of header to 0 */
-  MEMZERO(bmpfileheader, SIZEOF(bmpfileheader));
-  MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader));
-
-  /* Fill the file header */
-  bmpfileheader[0] = 0x42;	/* first 2 bytes are ASCII 'B', 'M' */
-  bmpfileheader[1] = 0x4D;
-  PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
-  /* we leave bfReserved1 & bfReserved2 = 0 */
-  PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
-
-  /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */
-  PUT_2B(bmpinfoheader, 0, 40);	/* biSize */
-  PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */
-  PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */
-  PUT_2B(bmpinfoheader, 12, 1);	/* biPlanes - must be 1 */
-  PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */
-  /* we leave biCompression = 0, for none */
-  /* we leave biSizeImage = 0; this is correct for uncompressed data */
-  if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */
-    PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */
-    PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */
-  }
-  PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */
-  /* we leave biClrImportant = 0 */
-
-  if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-  if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-
-  if (cmap_entries > 0)
-    write_colormap(cinfo, dest, cmap_entries, 4);
-}
-
-
-LOCAL(void)
-write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
-/* Write an OS2-style BMP file header, including colormap if needed */
-{
-  char bmpfileheader[14];
-  char bmpcoreheader[12];
-  INT32 headersize, bfSize;
-  int bits_per_pixel, cmap_entries;
-
-  /* Compute colormap size and total file size */
-  if (cinfo->out_color_space == JCS_RGB) {
-    if (cinfo->quantize_colors) {
-      /* Colormapped RGB */
-      bits_per_pixel = 8;
-      cmap_entries = 256;
-    } else {
-      /* Unquantized, full color RGB */
-      bits_per_pixel = 24;
-      cmap_entries = 0;
-    }
-  } else {
-    /* Grayscale output.  We need to fake a 256-entry colormap. */
-    bits_per_pixel = 8;
-    cmap_entries = 256;
-  }
-  /* File size */
-  headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */
-  bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height;
-  
-  /* Set unused fields of header to 0 */
-  MEMZERO(bmpfileheader, SIZEOF(bmpfileheader));
-  MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader));
-
-  /* Fill the file header */
-  bmpfileheader[0] = 0x42;	/* first 2 bytes are ASCII 'B', 'M' */
-  bmpfileheader[1] = 0x4D;
-  PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
-  /* we leave bfReserved1 & bfReserved2 = 0 */
-  PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
-
-  /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */
-  PUT_2B(bmpcoreheader, 0, 12);	/* bcSize */
-  PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */
-  PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */
-  PUT_2B(bmpcoreheader, 8, 1);	/* bcPlanes - must be 1 */
-  PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */
-
-  if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-  if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-
-  if (cmap_entries > 0)
-    write_colormap(cinfo, dest, cmap_entries, 3);
-}
-
-
-/*
- * Write the colormap.
- * Windows uses BGR0 map entries; OS/2 uses BGR entries.
- */
-
-LOCAL(void)
-write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest,
-		int map_colors, int map_entry_size)
-{
-  JSAMPARRAY colormap = cinfo->colormap;
-  int num_colors = cinfo->actual_number_of_colors;
-  FILE * outfile = dest->pub.output_file;
-  int i;
-
-  if (colormap != NULL) {
-    if (cinfo->out_color_components == 3) {
-      /* Normal case with RGB colormap */
-      for (i = 0; i < num_colors; i++) {
-	putc(GETJSAMPLE(colormap[2][i]), outfile);
-	putc(GETJSAMPLE(colormap[1][i]), outfile);
-	putc(GETJSAMPLE(colormap[0][i]), outfile);
-	if (map_entry_size == 4)
-	  putc(0, outfile);
-      }
-    } else {
-      /* Grayscale colormap (only happens with grayscale quantization) */
-      for (i = 0; i < num_colors; i++) {
-	putc(GETJSAMPLE(colormap[0][i]), outfile);
-	putc(GETJSAMPLE(colormap[0][i]), outfile);
-	putc(GETJSAMPLE(colormap[0][i]), outfile);
-	if (map_entry_size == 4)
-	  putc(0, outfile);
-      }
-    }
-  } else {
-    /* If no colormap, must be grayscale data.  Generate a linear "map". */
-    for (i = 0; i < 256; i++) {
-      putc(i, outfile);
-      putc(i, outfile);
-      putc(i, outfile);
-      if (map_entry_size == 4)
-	putc(0, outfile);
-    }
-  }
-  /* Pad colormap with zeros to ensure specified number of colormap entries */ 
-  if (i > map_colors)
-    ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i);
-  for (; i < map_colors; i++) {
-    putc(0, outfile);
-    putc(0, outfile);
-    putc(0, outfile);
-    if (map_entry_size == 4)
-      putc(0, outfile);
-  }
-}
-
-
-METHODDEF(void)
-finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
-  register FILE * outfile = dest->pub.output_file;
-  JSAMPARRAY image_ptr;
-  register JSAMPROW data_ptr;
-  JDIMENSION row;
-  register JDIMENSION col;
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
-  /* Write the header and colormap */
-  if (dest->is_os2)
-    write_os2_header(cinfo, dest);
-  else
-    write_bmp_header(cinfo, dest);
-
-  /* Write the file body from our virtual array */
-  for (row = cinfo->output_height; row > 0; row--) {
-    if (progress != NULL) {
-      progress->pub.pass_counter = (long) (cinfo->output_height - row);
-      progress->pub.pass_limit = (long) cinfo->output_height;
-      (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-    }
-    image_ptr = (*cinfo->mem->access_virt_sarray)
-      ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE);
-    data_ptr = image_ptr[0];
-    for (col = dest->row_width; col > 0; col--) {
-      putc(GETJSAMPLE(*data_ptr), outfile);
-      data_ptr++;
-    }
-  }
-  if (progress != NULL)
-    progress->completed_extra_passes++;
-
-  /* Make sure we wrote the output file OK */
-  fflush(outfile);
-  if (ferror(outfile))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for BMP format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2)
-{
-  bmp_dest_ptr dest;
-  JDIMENSION row_width;
-
-  /* Create module interface object, fill in method pointers */
-  dest = (bmp_dest_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(bmp_dest_struct));
-  dest->pub.start_output = start_output_bmp;
-  dest->pub.finish_output = finish_output_bmp;
-  dest->is_os2 = is_os2;
-
-  if (cinfo->out_color_space == JCS_GRAYSCALE) {
-    dest->pub.put_pixel_rows = put_gray_rows;
-  } else if (cinfo->out_color_space == JCS_RGB) {
-    if (cinfo->quantize_colors)
-      dest->pub.put_pixel_rows = put_gray_rows;
-    else
-      dest->pub.put_pixel_rows = put_pixel_rows;
-  } else {
-    ERREXIT(cinfo, JERR_BMP_COLORSPACE);
-  }
-
-  /* Calculate output image dimensions so we can allocate space */
-  jpeg_calc_output_dimensions(cinfo);
-
-  /* Determine width of rows in the BMP file (padded to 4-byte boundary). */
-  row_width = cinfo->output_width * cinfo->output_components;
-  dest->data_width = row_width;
-  while ((row_width & 3) != 0) row_width++;
-  dest->row_width = row_width;
-  dest->pad_bytes = (int) (row_width - dest->data_width);
-
-  /* Allocate space for inversion array, prepare for write pass */
-  dest->whole_image = (*cinfo->mem->request_virt_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-     row_width, cinfo->output_height, (JDIMENSION) 1);
-  dest->cur_output_row = 0;
-  if (cinfo->progress != NULL) {
-    cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-    progress->total_extra_passes++; /* count file input as separate pass */
-  }
-
-  /* Create decompressor output buffer. */
-  dest->pub.buffer = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1);
-  dest->pub.buffer_height = 1;
-
-  return (djpeg_dest_ptr) dest;
-}
-
-#endif /* BMP_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/wrgif.c b/tkimg1.3/libjpeg/wrgif.c
deleted file mode 100644
index 5fe8328..0000000
--- a/tkimg1.3/libjpeg/wrgif.c
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * wrgif.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in GIF format.
- *
- **************************************************************************
- * NOTE: to avoid entanglements with Unisys' patent on LZW compression,   *
- * this code has been modified to output "uncompressed GIF" files.        *
- * There is no trace of the LZW algorithm in this file.                   *
- **************************************************************************
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume output to
- * an ordinary stdio stream.
- */
-
-/*
- * This code is loosely based on ppmtogif from the PBMPLUS distribution
- * of Feb. 1991.  That file contains the following copyright notice:
- *    Based on GIFENCODE by David Rowley <mgardi at watdscu.waterloo.edu>.
- *    Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al.
- *    Copyright (C) 1989 by Jef Poskanzer.
- *    Permission to use, copy, modify, and distribute this software and its
- *    documentation for any purpose and without fee is hereby granted, provided
- *    that the above copyright notice appear in all copies and that both that
- *    copyright notice and this permission notice appear in supporting
- *    documentation.  This software is provided "as is" without express or
- *    implied warranty.
- *
- * We are also required to state that
- *    "The Graphics Interchange Format(c) is the Copyright property of
- *    CompuServe Incorporated. GIF(sm) is a Service Mark property of
- *    CompuServe Incorporated."
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-
-/* Private version of data destination object */
-
-typedef struct {
-  struct djpeg_dest_struct pub;	/* public fields */
-
-  j_decompress_ptr cinfo;	/* back link saves passing separate parm */
-
-  /* State for packing variable-width codes into a bitstream */
-  int n_bits;			/* current number of bits/code */
-  int maxcode;			/* maximum code, given n_bits */
-  INT32 cur_accum;		/* holds bits not yet output */
-  int cur_bits;			/* # of bits in cur_accum */
-
-  /* State for GIF code assignment */
-  int ClearCode;		/* clear code (doesn't change) */
-  int EOFCode;			/* EOF code (ditto) */
-  int code_counter;		/* counts output symbols */
-
-  /* GIF data packet construction buffer */
-  int bytesinpkt;		/* # of bytes in current packet */
-  char packetbuf[256];		/* workspace for accumulating packet */
-
-} gif_dest_struct;
-
-typedef gif_dest_struct * gif_dest_ptr;
-
-/* Largest value that will fit in N bits */
-#define MAXCODE(n_bits)	((1 << (n_bits)) - 1)
-
-
-/*
- * Routines to package finished data bytes into GIF data blocks.
- * A data block consists of a count byte (1..255) and that many data bytes.
- */
-
-LOCAL(void)
-flush_packet (gif_dest_ptr dinfo)
-/* flush any accumulated data */
-{
-  if (dinfo->bytesinpkt > 0) {	/* never write zero-length packet */
-    dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++;
-    if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt)
-	!= (size_t) dinfo->bytesinpkt)
-      ERREXIT(dinfo->cinfo, JERR_FILE_WRITE);
-    dinfo->bytesinpkt = 0;
-  }
-}
-
-
-/* Add a character to current packet; flush to disk if necessary */
-#define CHAR_OUT(dinfo,c)  \
-	{ (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c);  \
-	    if ((dinfo)->bytesinpkt >= 255)  \
-	      flush_packet(dinfo);  \
-	}
-
-
-/* Routine to convert variable-width codes into a byte stream */
-
-LOCAL(void)
-output (gif_dest_ptr dinfo, int code)
-/* Emit a code of n_bits bits */
-/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */
-{
-  dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits;
-  dinfo->cur_bits += dinfo->n_bits;
-
-  while (dinfo->cur_bits >= 8) {
-    CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
-    dinfo->cur_accum >>= 8;
-    dinfo->cur_bits -= 8;
-  }
-}
-
-
-/* The pseudo-compression algorithm.
- *
- * In this module we simply output each pixel value as a separate symbol;
- * thus, no compression occurs.  In fact, there is expansion of one bit per
- * pixel, because we use a symbol width one bit wider than the pixel width.
- *
- * GIF ordinarily uses variable-width symbols, and the decoder will expect
- * to ratchet up the symbol width after a fixed number of symbols.
- * To simplify the logic and keep the expansion penalty down, we emit a
- * GIF Clear code to reset the decoder just before the width would ratchet up.
- * Thus, all the symbols in the output file will have the same bit width.
- * Note that emitting the Clear codes at the right times is a mere matter of
- * counting output symbols and is in no way dependent on the LZW patent.
- *
- * With a small basic pixel width (low color count), Clear codes will be
- * needed very frequently, causing the file to expand even more.  So this
- * simplistic approach wouldn't work too well on bilevel images, for example.
- * But for output of JPEG conversions the pixel width will usually be 8 bits
- * (129 to 256 colors), so the overhead added by Clear symbols is only about
- * one symbol in every 256.
- */
-
-LOCAL(void)
-compress_init (gif_dest_ptr dinfo, int i_bits)
-/* Initialize pseudo-compressor */
-{
-  /* init all the state variables */
-  dinfo->n_bits = i_bits;
-  dinfo->maxcode = MAXCODE(dinfo->n_bits);
-  dinfo->ClearCode = (1 << (i_bits - 1));
-  dinfo->EOFCode = dinfo->ClearCode + 1;
-  dinfo->code_counter = dinfo->ClearCode + 2;
-  /* init output buffering vars */
-  dinfo->bytesinpkt = 0;
-  dinfo->cur_accum = 0;
-  dinfo->cur_bits = 0;
-  /* GIF specifies an initial Clear code */
-  output(dinfo, dinfo->ClearCode);
-}
-
-
-LOCAL(void)
-compress_pixel (gif_dest_ptr dinfo, int c)
-/* Accept and "compress" one pixel value.
- * The given value must be less than n_bits wide.
- */
-{
-  /* Output the given pixel value as a symbol. */
-  output(dinfo, c);
-  /* Issue Clear codes often enough to keep the reader from ratcheting up
-   * its symbol size.
-   */
-  if (dinfo->code_counter < dinfo->maxcode) {
-    dinfo->code_counter++;
-  } else {
-    output(dinfo, dinfo->ClearCode);
-    dinfo->code_counter = dinfo->ClearCode + 2;	/* reset the counter */
-  }
-}
-
-
-LOCAL(void)
-compress_term (gif_dest_ptr dinfo)
-/* Clean up at end */
-{
-  /* Send an EOF code */
-  output(dinfo, dinfo->EOFCode);
-  /* Flush the bit-packing buffer */
-  if (dinfo->cur_bits > 0) {
-    CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
-  }
-  /* Flush the packet buffer */
-  flush_packet(dinfo);
-}
-
-
-/* GIF header construction */
-
-
-LOCAL(void)
-put_word (gif_dest_ptr dinfo, unsigned int w)
-/* Emit a 16-bit word, LSB first */
-{
-  putc(w & 0xFF, dinfo->pub.output_file);
-  putc((w >> 8) & 0xFF, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-put_3bytes (gif_dest_ptr dinfo, int val)
-/* Emit 3 copies of same byte value --- handy subr for colormap construction */
-{
-  putc(val, dinfo->pub.output_file);
-  putc(val, dinfo->pub.output_file);
-  putc(val, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
-/* Output the GIF file header, including color map */
-/* If colormap==NULL, synthesize a gray-scale colormap */
-{
-  int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte;
-  int cshift = dinfo->cinfo->data_precision - 8;
-  int i;
-
-  if (num_colors > 256)
-    ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors);
-  /* Compute bits/pixel and related values */
-  BitsPerPixel = 1;
-  while (num_colors > (1 << BitsPerPixel))
-    BitsPerPixel++;
-  ColorMapSize = 1 << BitsPerPixel;
-  if (BitsPerPixel <= 1)
-    InitCodeSize = 2;
-  else
-    InitCodeSize = BitsPerPixel;
-  /*
-   * Write the GIF header.
-   * Note that we generate a plain GIF87 header for maximum compatibility.
-   */
-  putc('G', dinfo->pub.output_file);
-  putc('I', dinfo->pub.output_file);
-  putc('F', dinfo->pub.output_file);
-  putc('8', dinfo->pub.output_file);
-  putc('7', dinfo->pub.output_file);
-  putc('a', dinfo->pub.output_file);
-  /* Write the Logical Screen Descriptor */
-  put_word(dinfo, (unsigned int) dinfo->cinfo->output_width);
-  put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
-  FlagByte = 0x80;		/* Yes, there is a global color table */
-  FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */
-  FlagByte |= (BitsPerPixel-1);	/* size of global color table */
-  putc(FlagByte, dinfo->pub.output_file);
-  putc(0, dinfo->pub.output_file); /* Background color index */
-  putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */
-  /* Write the Global Color Map */
-  /* If the color map is more than 8 bits precision, */
-  /* we reduce it to 8 bits by shifting */
-  for (i=0; i < ColorMapSize; i++) {
-    if (i < num_colors) {
-      if (colormap != NULL) {
-	if (dinfo->cinfo->out_color_space == JCS_RGB) {
-	  /* Normal case: RGB color map */
-	  putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file);
-	  putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file);
-	  putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file);
-	} else {
-	  /* Grayscale "color map": possible if quantizing grayscale image */
-	  put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift);
-	}
-      } else {
-	/* Create a gray-scale map of num_colors values, range 0..255 */
-	put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1));
-      }
-    } else {
-      /* fill out the map to a power of 2 */
-      put_3bytes(dinfo, 0);
-    }
-  }
-  /* Write image separator and Image Descriptor */
-  putc(',', dinfo->pub.output_file); /* separator */
-  put_word(dinfo, 0);		/* left/top offset */
-  put_word(dinfo, 0);
-  put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */
-  put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
-  /* flag byte: not interlaced, no local color map */
-  putc(0x00, dinfo->pub.output_file);
-  /* Write Initial Code Size byte */
-  putc(InitCodeSize, dinfo->pub.output_file);
-
-  /* Initialize for "compression" of image data */
-  compress_init(dinfo, InitCodeSize+1);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
-  if (cinfo->quantize_colors)
-    emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap);
-  else
-    emit_header(dest, 256, (JSAMPARRAY) NULL);
-}
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		JDIMENSION rows_supplied)
-{
-  gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-
-  ptr = dest->pub.buffer[0];
-  for (col = cinfo->output_width; col > 0; col--) {
-    compress_pixel(dest, GETJSAMPLE(*ptr++));
-  }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
-  /* Flush "compression" mechanism */
-  compress_term(dest);
-  /* Write a zero-length data block to end the series */
-  putc(0, dest->pub.output_file);
-  /* Write the GIF terminator mark */
-  putc(';', dest->pub.output_file);
-  /* Make sure we wrote the output file OK */
-  fflush(dest->pub.output_file);
-  if (ferror(dest->pub.output_file))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for GIF format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_gif (j_decompress_ptr cinfo)
-{
-  gif_dest_ptr dest;
-
-  /* Create module interface object, fill in method pointers */
-  dest = (gif_dest_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(gif_dest_struct));
-  dest->cinfo = cinfo;		/* make back link for subroutines */
-  dest->pub.start_output = start_output_gif;
-  dest->pub.put_pixel_rows = put_pixel_rows;
-  dest->pub.finish_output = finish_output_gif;
-
-  if (cinfo->out_color_space != JCS_GRAYSCALE &&
-      cinfo->out_color_space != JCS_RGB)
-    ERREXIT(cinfo, JERR_GIF_COLORSPACE);
-
-  /* Force quantization if color or if > 8 bits input */
-  if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) {
-    /* Force quantization to at most 256 colors */
-    cinfo->quantize_colors = TRUE;
-    if (cinfo->desired_number_of_colors > 256)
-      cinfo->desired_number_of_colors = 256;
-  }
-
-  /* Calculate output image dimensions so we can allocate space */
-  jpeg_calc_output_dimensions(cinfo);
-
-  if (cinfo->output_components != 1) /* safety check: just one component? */
-    ERREXIT(cinfo, JERR_GIF_BUG);
-
-  /* Create decompressor output buffer. */
-  dest->pub.buffer = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1);
-  dest->pub.buffer_height = 1;
-
-  return (djpeg_dest_ptr) dest;
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/wrjpgcom.1 b/tkimg1.3/libjpeg/wrjpgcom.1
deleted file mode 100644
index d419a99..0000000
--- a/tkimg1.3/libjpeg/wrjpgcom.1
+++ /dev/null
@@ -1,103 +0,0 @@
-.TH WRJPGCOM 1 "15 June 1995"
-.SH NAME
-wrjpgcom \- insert text comments into a JPEG file
-.SH SYNOPSIS
-.B wrjpgcom
-[
-.B \-replace
-]
-[
-.BI \-comment " text"
-]
-[
-.BI \-cfile " name"
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B wrjpgcom
-reads the named JPEG/JFIF file, or the standard input if no file is named,
-and generates a new JPEG/JFIF file on standard output.  A comment block is
-added to the file.
-.PP
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings.  This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text.  COM blocks do not interfere with the image stored in the JPEG
-file.  The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-.PP
-.B wrjpgcom
-adds a COM block, containing text you provide, to a JPEG file.
-Ordinarily, the COM block is added after any existing COM blocks; but you
-can delete the old COM blocks if you wish.
-.SH OPTIONS
-Switch names may be abbreviated, and are not case sensitive.
-.TP
-.B \-replace
-Delete any existing COM blocks from the file.
-.TP
-.BI \-comment " text"
-Supply text for new COM block on command line.
-.TP
-.BI \-cfile " name"
-Read text for new COM block from named file.
-.PP
-If you have only one line of comment text to add, you can provide it on the
-command line with
-.BR \-comment .
-The comment text must be surrounded with quotes so that it is treated as a
-single argument.  Longer comments can be read from a text file.
-.PP
-If you give neither
-.B \-comment
-nor
-.BR \-cfile ,
-then
-.B wrjpgcom
-will read the comment text from standard input.  (In this case an input image
-file name MUST be supplied, so that the source JPEG file comes from somewhere
-else.)  You can enter multiple lines, up to 64KB worth.  Type an end-of-file
-indicator (usually control-D) to terminate the comment text entry.
-.PP
-.B wrjpgcom
-will not add a COM block if the provided comment string is empty.  Therefore
-\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file.
-.SH EXAMPLES
-.LP
-Add a short comment to in.jpg, producing out.jpg:
-.IP
-.B wrjpgcom \-c
-\fI"View of my back yard" in.jpg
-.B >
-.I out.jpg
-.PP
-Attach a long comment previously stored in comment.txt:
-.IP
-.B wrjpgcom
-.I in.jpg
-.B <
-.I comment.txt
-.B >
-.I out.jpg
-.PP
-or equivalently
-.IP
-.B wrjpgcom
-.B -cfile
-.I comment.txt
-.B <
-.I in.jpg
-.B >
-.I out.jpg
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1)
-.SH AUTHOR
-Independent JPEG Group
diff --git a/tkimg1.3/libjpeg/wrjpgcom.c b/tkimg1.3/libjpeg/wrjpgcom.c
deleted file mode 100644
index 8c04b05..0000000
--- a/tkimg1.3/libjpeg/wrjpgcom.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * wrjpgcom.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a very simple stand-alone application that inserts
- * user-supplied text as a COM (comment) marker in a JFIF file.
- * This may be useful as an example of the minimum logic needed to parse
- * JPEG markers.
- */
-
-#define JPEG_CJPEG_DJPEG	/* to get the command-line config symbols */
-#include "jinclude.h"		/* get auto-config symbols, <stdio.h> */
-
-#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc() */
-extern void * malloc ();
-#endif
-#include <ctype.h>		/* to declare isupper(), tolower() */
-#ifdef USE_SETMODE
-#include <fcntl.h>		/* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h>			/* to declare setmode() */
-#endif
-
-#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h>              /* Metrowerks needs this */
-#include <console.h>		/* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h>		/* Think declares it here */
-#endif
-#endif
-
-#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
-#define READ_BINARY	"r"
-#define WRITE_BINARY	"w"
-#else
-#ifdef VMS			/* VMS is very nonstandard */
-#define READ_BINARY	"rb", "ctx=stm"
-#define WRITE_BINARY	"wb", "ctx=stm"
-#else				/* standard ANSI-compliant case */
-#define READ_BINARY	"rb"
-#define WRITE_BINARY	"wb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
-#define EXIT_FAILURE  1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS  1		/* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS  0
-#endif
-#endif
-
-/* Reduce this value if your malloc() can't allocate blocks up to 64K.
- * On DOS, compiling in large model is usually a better solution.
- */
-
-#ifndef MAX_COM_LENGTH
-#define MAX_COM_LENGTH 65000L	/* must be <= 65533 in any case */
-#endif
-
-
-/*
- * These macros are used to read the input file and write the output file.
- * To reuse this code in another application, you might need to change these.
- */
-
-static FILE * infile;		/* input JPEG file */
-
-/* Return next input byte, or EOF if no more */
-#define NEXTBYTE()  getc(infile)
-
-static FILE * outfile;		/* output JPEG file */
-
-/* Emit an output byte */
-#define PUTBYTE(x)  putc((x), outfile)
-
-
-/* Error exit handler */
-#define ERREXIT(msg)  (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE))
-
-
-/* Read one byte, testing for EOF */
-static int
-read_1_byte (void)
-{
-  int c;
-
-  c = NEXTBYTE();
-  if (c == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  return c;
-}
-
-/* Read 2 bytes, convert to unsigned int */
-/* All 2-byte quantities in JPEG markers are MSB first */
-static unsigned int
-read_2_bytes (void)
-{
-  int c1, c2;
-
-  c1 = NEXTBYTE();
-  if (c1 == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  c2 = NEXTBYTE();
-  if (c2 == EOF)
-    ERREXIT("Premature EOF in JPEG file");
-  return (((unsigned int) c1) << 8) + ((unsigned int) c2);
-}
-
-
-/* Routines to write data to output file */
-
-static void
-write_1_byte (int c)
-{
-  PUTBYTE(c);
-}
-
-static void
-write_2_bytes (unsigned int val)
-{
-  PUTBYTE((val >> 8) & 0xFF);
-  PUTBYTE(val & 0xFF);
-}
-
-static void
-write_marker (int marker)
-{
-  PUTBYTE(0xFF);
-  PUTBYTE(marker);
-}
-
-static void
-copy_rest_of_file (void)
-{
-  int c;
-
-  while ((c = NEXTBYTE()) != EOF)
-    PUTBYTE(c);
-}
-
-
-/*
- * JPEG markers consist of one or more 0xFF bytes, followed by a marker
- * code byte (which is not an FF).  Here are the marker codes of interest
- * in this program.  (See jdmarker.c for a more complete list.)
- */
-
-#define M_SOF0  0xC0		/* Start Of Frame N */
-#define M_SOF1  0xC1		/* N indicates which compression process */
-#define M_SOF2  0xC2		/* Only SOF0-SOF2 are now in common use */
-#define M_SOF3  0xC3
-#define M_SOF5  0xC5		/* NB: codes C4 and CC are NOT SOF markers */
-#define M_SOF6  0xC6
-#define M_SOF7  0xC7
-#define M_SOF9  0xC9
-#define M_SOF10 0xCA
-#define M_SOF11 0xCB
-#define M_SOF13 0xCD
-#define M_SOF14 0xCE
-#define M_SOF15 0xCF
-#define M_SOI   0xD8		/* Start Of Image (beginning of datastream) */
-#define M_EOI   0xD9		/* End Of Image (end of datastream) */
-#define M_SOS   0xDA		/* Start Of Scan (begins compressed data) */
-#define M_COM   0xFE		/* COMment */
-
-
-/*
- * Find the next JPEG marker and return its marker code.
- * We expect at least one FF byte, possibly more if the compressor used FFs
- * to pad the file.  (Padding FFs will NOT be replicated in the output file.)
- * There could also be non-FF garbage between markers.  The treatment of such
- * garbage is unspecified; we choose to skip over it but emit a warning msg.
- * NB: this routine must not be used after seeing SOS marker, since it will
- * not deal correctly with FF/00 sequences in the compressed image data...
- */
-
-static int
-next_marker (void)
-{
-  int c;
-  int discarded_bytes = 0;
-
-  /* Find 0xFF byte; count and skip any non-FFs. */
-  c = read_1_byte();
-  while (c != 0xFF) {
-    discarded_bytes++;
-    c = read_1_byte();
-  }
-  /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
-   * are legal as pad bytes, so don't count them in discarded_bytes.
-   */
-  do {
-    c = read_1_byte();
-  } while (c == 0xFF);
-
-  if (discarded_bytes != 0) {
-    fprintf(stderr, "Warning: garbage data found in JPEG file\n");
-  }
-
-  return c;
-}
-
-
-/*
- * Read the initial marker, which should be SOI.
- * For a JFIF file, the first two bytes of the file should be literally
- * 0xFF M_SOI.  To be more general, we could use next_marker, but if the
- * input file weren't actually JPEG at all, next_marker might read the whole
- * file and then return a misleading error message...
- */
-
-static int
-first_marker (void)
-{
-  int c1, c2;
-
-  c1 = NEXTBYTE();
-  c2 = NEXTBYTE();
-  if (c1 != 0xFF || c2 != M_SOI)
-    ERREXIT("Not a JPEG file");
-  return c2;
-}
-
-
-/*
- * Most types of marker are followed by a variable-length parameter segment.
- * This routine skips over the parameters for any marker we don't otherwise
- * want to process.
- * Note that we MUST skip the parameter segment explicitly in order not to
- * be fooled by 0xFF bytes that might appear within the parameter segment;
- * such bytes do NOT introduce new markers.
- */
-
-static void
-copy_variable (void)
-/* Copy an unknown or uninteresting variable-length marker */
-{
-  unsigned int length;
-
-  /* Get the marker parameter length count */
-  length = read_2_bytes();
-  write_2_bytes(length);
-  /* Length includes itself, so must be at least 2 */
-  if (length < 2)
-    ERREXIT("Erroneous JPEG marker length");
-  length -= 2;
-  /* Skip over the remaining bytes */
-  while (length > 0) {
-    write_1_byte(read_1_byte());
-    length--;
-  }
-}
-
-static void
-skip_variable (void)
-/* Skip over an unknown or uninteresting variable-length marker */
-{
-  unsigned int length;
-
-  /* Get the marker parameter length count */
-  length = read_2_bytes();
-  /* Length includes itself, so must be at least 2 */
-  if (length < 2)
-    ERREXIT("Erroneous JPEG marker length");
-  length -= 2;
-  /* Skip over the remaining bytes */
-  while (length > 0) {
-    (void) read_1_byte();
-    length--;
-  }
-}
-
-
-/*
- * Parse the marker stream until SOFn or EOI is seen;
- * copy data to output, but discard COM markers unless keep_COM is true.
- */
-
-static int
-scan_JPEG_header (int keep_COM)
-{
-  int marker;
-
-  /* Expect SOI at start of file */
-  if (first_marker() != M_SOI)
-    ERREXIT("Expected SOI marker first");
-  write_marker(M_SOI);
-
-  /* Scan miscellaneous markers until we reach SOFn. */
-  for (;;) {
-    marker = next_marker();
-    switch (marker) {
-      /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be,
-       * treated as SOFn.  C4 in particular is actually DHT.
-       */
-    case M_SOF0:		/* Baseline */
-    case M_SOF1:		/* Extended sequential, Huffman */
-    case M_SOF2:		/* Progressive, Huffman */
-    case M_SOF3:		/* Lossless, Huffman */
-    case M_SOF5:		/* Differential sequential, Huffman */
-    case M_SOF6:		/* Differential progressive, Huffman */
-    case M_SOF7:		/* Differential lossless, Huffman */
-    case M_SOF9:		/* Extended sequential, arithmetic */
-    case M_SOF10:		/* Progressive, arithmetic */
-    case M_SOF11:		/* Lossless, arithmetic */
-    case M_SOF13:		/* Differential sequential, arithmetic */
-    case M_SOF14:		/* Differential progressive, arithmetic */
-    case M_SOF15:		/* Differential lossless, arithmetic */
-      return marker;
-
-    case M_SOS:			/* should not see compressed data before SOF */
-      ERREXIT("SOS without prior SOFn");
-      break;
-
-    case M_EOI:			/* in case it's a tables-only JPEG stream */
-      return marker;
-
-    case M_COM:			/* Existing COM: conditionally discard */
-      if (keep_COM) {
-	write_marker(marker);
-	copy_variable();
-      } else {
-	skip_variable();
-      }
-      break;
-
-    default:			/* Anything else just gets copied */
-      write_marker(marker);
-      copy_variable();		/* we assume it has a parameter count... */
-      break;
-    }
-  } /* end loop */
-}
-
-
-/* Command line parsing code */
-
-static const char * progname;	/* program name for error messages */
-
-
-static void
-usage (void)
-/* complain about bad command line */
-{
-  fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n");
-  fprintf(stderr, "You can add to or replace any existing comment(s).\n");
-
-  fprintf(stderr, "Usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
-  fprintf(stderr, "inputfile outputfile\n");
-#else
-  fprintf(stderr, "[inputfile]\n");
-#endif
-
-  fprintf(stderr, "Switches (names may be abbreviated):\n");
-  fprintf(stderr, "  -replace         Delete any existing comments\n");
-  fprintf(stderr, "  -comment \"text\"  Insert comment with given text\n");
-  fprintf(stderr, "  -cfile name      Read comment from named file\n");
-  fprintf(stderr, "Notice that you must put quotes around the comment text\n");
-  fprintf(stderr, "when you use -comment.\n");
-  fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n");
-  fprintf(stderr, "then the comment text is read from standard input.\n");
-  fprintf(stderr, "It can be multiple lines, up to %u characters total.\n",
-	  (unsigned int) MAX_COM_LENGTH);
-#ifndef TWO_FILE_COMMANDLINE
-  fprintf(stderr, "You must specify an input JPEG file name when supplying\n");
-  fprintf(stderr, "comment text from standard input.\n");
-#endif
-
-  exit(EXIT_FAILURE);
-}
-
-
-static int
-keymatch (char * arg, const char * keyword, int minchars)
-/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
-/* keyword is the constant keyword (must be lower case already), */
-/* minchars is length of minimum legal abbreviation. */
-{
-  register int ca, ck;
-  register int nmatched = 0;
-
-  while ((ca = *arg++) != '\0') {
-    if ((ck = *keyword++) == '\0')
-      return 0;			/* arg longer than keyword, no good */
-    if (isupper(ca))		/* force arg to lcase (assume ck is already) */
-      ca = tolower(ca);
-    if (ca != ck)
-      return 0;			/* no good */
-    nmatched++;			/* count matched characters */
-  }
-  /* reached end of argument; fail if it's too short for unique abbrev */
-  if (nmatched < minchars)
-    return 0;
-  return 1;			/* A-OK */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
-  int argn;
-  char * arg;
-  int keep_COM = 1;
-  char * comment_arg = NULL;
-  FILE * comment_file = NULL;
-  unsigned int comment_length = 0;
-  int marker;
-
-  /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
-  argc = ccommand(&argv);
-#endif
-
-  progname = argv[0];
-  if (progname == NULL || progname[0] == 0)
-    progname = "wrjpgcom";	/* in case C library doesn't provide it */
-
-  /* Parse switches, if any */
-  for (argn = 1; argn < argc; argn++) {
-    arg = argv[argn];
-    if (arg[0] != '-')
-      break;			/* not switch, must be file name */
-    arg++;			/* advance over '-' */
-    if (keymatch(arg, "replace", 1)) {
-      keep_COM = 0;
-    } else if (keymatch(arg, "cfile", 2)) {
-      if (++argn >= argc) usage();
-      if ((comment_file = fopen(argv[argn], "r")) == NULL) {
-	fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
-	exit(EXIT_FAILURE);
-      }
-    } else if (keymatch(arg, "comment", 1)) {
-      if (++argn >= argc) usage();
-      comment_arg = argv[argn];
-      /* If the comment text starts with '"', then we are probably running
-       * under MS-DOG and must parse out the quoted string ourselves.  Sigh.
-       */
-      if (comment_arg[0] == '"') {
-	comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH);
-	if (comment_arg == NULL)
-	  ERREXIT("Insufficient memory");
-	strcpy(comment_arg, argv[argn]+1);
-	for (;;) {
-	  comment_length = (unsigned int) strlen(comment_arg);
-	  if (comment_length > 0 && comment_arg[comment_length-1] == '"') {
-	    comment_arg[comment_length-1] = '\0'; /* zap terminating quote */
-	    break;
-	  }
-	  if (++argn >= argc)
-	    ERREXIT("Missing ending quote mark");
-	  strcat(comment_arg, " ");
-	  strcat(comment_arg, argv[argn]);
-	}
-      }
-      comment_length = (unsigned int) strlen(comment_arg);
-    } else
-      usage();
-  }
-
-  /* Cannot use both -comment and -cfile. */
-  if (comment_arg != NULL && comment_file != NULL)
-    usage();
-  /* If there is neither -comment nor -cfile, we will read the comment text
-   * from stdin; in this case there MUST be an input JPEG file name.
-   */
-  if (comment_arg == NULL && comment_file == NULL && argn >= argc)
-    usage();
-
-  /* Open the input file. */
-  if (argn < argc) {
-    if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* default input file is stdin */
-#ifdef USE_SETMODE		/* need to hack file mode? */
-    setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN		/* need to re-open in binary mode? */
-    if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
-      fprintf(stderr, "%s: can't open stdin\n", progname);
-      exit(EXIT_FAILURE);
-    }
-#else
-    infile = stdin;
-#endif
-  }
-
-  /* Open the output file. */
-#ifdef TWO_FILE_COMMANDLINE
-  /* Must have explicit output file name */
-  if (argn != argc-2) {
-    fprintf(stderr, "%s: must name one input and one output file\n",
-	    progname);
-    usage();
-  }
-  if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) {
-    fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]);
-    exit(EXIT_FAILURE);
-  }
-#else
-  /* Unix style: expect zero or one file name */
-  if (argn < argc-1) {
-    fprintf(stderr, "%s: only one input file\n", progname);
-    usage();
-  }
-  /* default output file is stdout */
-#ifdef USE_SETMODE		/* need to hack file mode? */
-  setmode(fileno(stdout), O_BINARY);
-#endif
-#ifdef USE_FDOPEN		/* need to re-open in binary mode? */
-  if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
-    fprintf(stderr, "%s: can't open stdout\n", progname);
-    exit(EXIT_FAILURE);
-  }
-#else
-  outfile = stdout;
-#endif
-#endif /* TWO_FILE_COMMANDLINE */
-
-  /* Collect comment text from comment_file or stdin, if necessary */
-  if (comment_arg == NULL) {
-    FILE * src_file;
-    int c;
-
-    comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH);
-    if (comment_arg == NULL)
-      ERREXIT("Insufficient memory");
-    comment_length = 0;
-    src_file = (comment_file != NULL ? comment_file : stdin);
-    while ((c = getc(src_file)) != EOF) {
-      if (comment_length >= (unsigned int) MAX_COM_LENGTH) {
-	fprintf(stderr, "Comment text may not exceed %u bytes\n",
-		(unsigned int) MAX_COM_LENGTH);
-	exit(EXIT_FAILURE);
-      }
-      comment_arg[comment_length++] = (char) c;
-    }
-    if (comment_file != NULL)
-      fclose(comment_file);
-  }
-
-  /* Copy JPEG headers until SOFn marker;
-   * we will insert the new comment marker just before SOFn.
-   * This (a) causes the new comment to appear after, rather than before,
-   * existing comments; and (b) ensures that comments come after any JFIF
-   * or JFXX markers, as required by the JFIF specification.
-   */
-  marker = scan_JPEG_header(keep_COM);
-  /* Insert the new COM marker, but only if nonempty text has been supplied */
-  if (comment_length > 0) {
-    write_marker(M_COM);
-    write_2_bytes(comment_length + 2);
-    while (comment_length > 0) {
-      write_1_byte(*comment_arg++);
-      comment_length--;
-    }
-  }
-  /* Duplicate the remainder of the source file.
-   * Note that any COM markers occuring after SOF will not be touched.
-   */
-  write_marker(marker);
-  copy_rest_of_file();
-
-  /* All done. */
-  exit(EXIT_SUCCESS);
-  return 0;			/* suppress no-return-value warnings */
-}
diff --git a/tkimg1.3/libjpeg/wrppm.c b/tkimg1.3/libjpeg/wrppm.c
deleted file mode 100644
index 6c6d908..0000000
--- a/tkimg1.3/libjpeg/wrppm.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * wrppm.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in PPM/PGM format.
- * The extended 2-byte-per-sample raw PPM/PGM formats are supported.
- * The PBMPLUS library is NOT required to compile this software
- * (but it is highly useful as a set of PPM image manipulation programs).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume output to
- * an ordinary stdio stream.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef PPM_SUPPORTED
-
-
-/*
- * For 12-bit JPEG data, we either downscale the values to 8 bits
- * (to write standard byte-per-sample PPM/PGM files), or output
- * nonstandard word-per-sample PPM/PGM files.  Downscaling is done
- * if PPM_NORAWWORD is defined (this can be done in the Makefile
- * or in jconfig.h).
- * (When the core library supports data precision reduction, a cleaner
- * implementation will be to ask for that instead.)
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define PUTPPMSAMPLE(ptr,v)  *ptr++ = (char) (v)
-#define BYTESPERSAMPLE 1
-#define PPM_MAXVAL 255
-#else
-#ifdef PPM_NORAWWORD
-#define PUTPPMSAMPLE(ptr,v)  *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8))
-#define BYTESPERSAMPLE 1
-#define PPM_MAXVAL 255
-#else
-/* The word-per-sample format always puts the LSB first. */
-#define PUTPPMSAMPLE(ptr,v)			\
-	{ register int val_ = v;		\
-	  *ptr++ = (char) (val_ & 0xFF);	\
-	  *ptr++ = (char) ((val_ >> 8) & 0xFF);	\
-	}
-#define BYTESPERSAMPLE 2
-#define PPM_MAXVAL ((1<<BITS_IN_JSAMPLE)-1)
-#endif
-#endif
-
-
-/*
- * When JSAMPLE is the same size as char, we can just fwrite() the
- * decompressed data to the PPM or PGM file.  On PCs, in order to make this
- * work the output buffer must be allocated in near data space, because we are
- * assuming small-data memory model wherein fwrite() can't reach far memory.
- * If you need to process very wide images on a PC, you might have to compile
- * in large-memory model, or else replace fwrite() with a putc() loop ---
- * which will be much slower.
- */
-
-
-/* Private version of data destination object */
-
-typedef struct {
-  struct djpeg_dest_struct pub;	/* public fields */
-
-  /* Usually these two pointers point to the same place: */
-  char *iobuffer;		/* fwrite's I/O buffer */
-  JSAMPROW pixrow;		/* decompressor output buffer */
-  size_t buffer_width;		/* width of I/O buffer */
-  JDIMENSION samples_per_row;	/* JSAMPLEs per output row */
-} ppm_dest_struct;
-
-typedef ppm_dest_struct * ppm_dest_ptr;
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- *
- * put_pixel_rows handles the "normal" 8-bit case where the decompressor
- * output buffer is physically the same as the fwrite buffer.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		JDIMENSION rows_supplied)
-{
-  ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * This code is used when we have to copy the data and apply a pixel
- * format translation.  Typically this only happens in 12-bit mode.
- */
-
-METHODDEF(void)
-copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		 JDIMENSION rows_supplied)
-{
-  ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-  register char * bufferptr;
-  register JSAMPROW ptr;
-  register JDIMENSION col;
-
-  ptr = dest->pub.buffer[0];
-  bufferptr = dest->iobuffer;
-  for (col = dest->samples_per_row; col > 0; col--) {
-    PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++));
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Write some pixel data when color quantization is in effect.
- * We have to demap the color index values to straight data.
- */
-
-METHODDEF(void)
-put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		  JDIMENSION rows_supplied)
-{
-  ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-  register char * bufferptr;
-  register int pixval;
-  register JSAMPROW ptr;
-  register JSAMPROW color_map0 = cinfo->colormap[0];
-  register JSAMPROW color_map1 = cinfo->colormap[1];
-  register JSAMPROW color_map2 = cinfo->colormap[2];
-  register JDIMENSION col;
-
-  ptr = dest->pub.buffer[0];
-  bufferptr = dest->iobuffer;
-  for (col = cinfo->output_width; col > 0; col--) {
-    pixval = GETJSAMPLE(*ptr++);
-    PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval]));
-    PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval]));
-    PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval]));
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-METHODDEF(void)
-put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		   JDIMENSION rows_supplied)
-{
-  ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-  register char * bufferptr;
-  register JSAMPROW ptr;
-  register JSAMPROW color_map = cinfo->colormap[0];
-  register JDIMENSION col;
-
-  ptr = dest->pub.buffer[0];
-  bufferptr = dest->iobuffer;
-  for (col = cinfo->output_width; col > 0; col--) {
-    PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)]));
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-
-  /* Emit file header */
-  switch (cinfo->out_color_space) {
-  case JCS_GRAYSCALE:
-    /* emit header for raw PGM format */
-    fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n",
-	    (long) cinfo->output_width, (long) cinfo->output_height,
-	    PPM_MAXVAL);
-    break;
-  case JCS_RGB:
-    /* emit header for raw PPM format */
-    fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n",
-	    (long) cinfo->output_width, (long) cinfo->output_height,
-	    PPM_MAXVAL);
-    break;
-  default:
-    ERREXIT(cinfo, JERR_PPM_COLORSPACE);
-  }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  /* Make sure we wrote the output file OK */
-  fflush(dinfo->output_file);
-  if (ferror(dinfo->output_file))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for PPM format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_ppm (j_decompress_ptr cinfo)
-{
-  ppm_dest_ptr dest;
-
-  /* Create module interface object, fill in method pointers */
-  dest = (ppm_dest_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(ppm_dest_struct));
-  dest->pub.start_output = start_output_ppm;
-  dest->pub.finish_output = finish_output_ppm;
-
-  /* Calculate output image dimensions so we can allocate space */
-  jpeg_calc_output_dimensions(cinfo);
-
-  /* Create physical I/O buffer.  Note we make this near on a PC. */
-  dest->samples_per_row = cinfo->output_width * cinfo->out_color_components;
-  dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char));
-  dest->iobuffer = (char *) (*cinfo->mem->alloc_small)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width);
-
-  if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 ||
-      SIZEOF(JSAMPLE) != SIZEOF(char)) {
-    /* When quantizing, we need an output buffer for colormap indexes
-     * that's separate from the physical I/O buffer.  We also need a
-     * separate buffer if pixel format translation must take place.
-     */
-    dest->pub.buffer = (*cinfo->mem->alloc_sarray)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE,
-       cinfo->output_width * cinfo->output_components, (JDIMENSION) 1);
-    dest->pub.buffer_height = 1;
-    if (! cinfo->quantize_colors)
-      dest->pub.put_pixel_rows = copy_pixel_rows;
-    else if (cinfo->out_color_space == JCS_GRAYSCALE)
-      dest->pub.put_pixel_rows = put_demapped_gray;
-    else
-      dest->pub.put_pixel_rows = put_demapped_rgb;
-  } else {
-    /* We will fwrite() directly from decompressor output buffer. */
-    /* Synthesize a JSAMPARRAY pointer structure */
-    /* Cast here implies near->far pointer conversion on PCs */
-    dest->pixrow = (JSAMPROW) dest->iobuffer;
-    dest->pub.buffer = & dest->pixrow;
-    dest->pub.buffer_height = 1;
-    dest->pub.put_pixel_rows = put_pixel_rows;
-  }
-
-  return (djpeg_dest_ptr) dest;
-}
-
-#endif /* PPM_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/wrrle.c b/tkimg1.3/libjpeg/wrrle.c
deleted file mode 100644
index a4e7337..0000000
--- a/tkimg1.3/libjpeg/wrrle.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * wrrle.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in RLE format.
- * The Utah Raster Toolkit library is required (version 3.1 or later).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * Based on code contributed by Mike Lijewski,
- * with updates from Robert Hutchinson.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef RLE_SUPPORTED
-
-/* rle.h is provided by the Utah Raster Toolkit. */
-
-#include <rle.h>
-
-/*
- * We assume that JSAMPLE has the same representation as rle_pixel,
- * to wit, "unsigned char".  Hence we can't cope with 12- or 16-bit samples.
- */
-
-#if BITS_IN_JSAMPLE != 8
-  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-
-/*
- * Since RLE stores scanlines bottom-to-top, we have to invert the image
- * from JPEG's top-to-bottom order.  To do this, we save the outgoing data
- * in a virtual array during put_pixel_row calls, then actually emit the
- * RLE file during finish_output.
- */
-
-
-/*
- * For now, if we emit an RLE color map then it is always 256 entries long,
- * though not all of the entries need be used.
- */
-
-#define CMAPBITS	8
-#define CMAPLENGTH	(1<<(CMAPBITS))
-
-typedef struct {
-  struct djpeg_dest_struct pub; /* public fields */
-
-  jvirt_sarray_ptr image;	/* virtual array to store the output image */
-  rle_map *colormap;	 	/* RLE-style color map, or NULL if none */
-  rle_pixel **rle_row;		/* To pass rows to rle_putrow() */
-
-} rle_dest_struct;
-
-typedef rle_dest_struct * rle_dest_ptr;
-
-/* Forward declarations */
-METHODDEF(void) rle_put_pixel_rows
-    JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-	 JDIMENSION rows_supplied));
-
-
-/*
- * Write the file header.
- *
- * In this module it's easier to wait till finish_output to write anything.
- */
-
-METHODDEF(void)
-start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  rle_dest_ptr dest = (rle_dest_ptr) dinfo;
-  size_t cmapsize;
-  int i, ci;
-#ifdef PROGRESS_REPORT
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
-  /*
-   * Make sure the image can be stored in RLE format.
-   *
-   * - RLE stores image dimensions as *signed* 16 bit integers.  JPEG
-   *   uses unsigned, so we have to check the width.
-   *
-   * - Colorspace is expected to be grayscale or RGB.
-   *
-   * - The number of channels (components) is expected to be 1 (grayscale/
-   *   pseudocolor) or 3 (truecolor/directcolor).
-   *   (could be 2 or 4 if using an alpha channel, but we aren't)
-   */
-
-  if (cinfo->output_width > 32767 || cinfo->output_height > 32767)
-    ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, 
-	     cinfo->output_height);
-
-  if (cinfo->out_color_space != JCS_GRAYSCALE &&
-      cinfo->out_color_space != JCS_RGB)
-    ERREXIT(cinfo, JERR_RLE_COLORSPACE);
-
-  if (cinfo->output_components != 1 && cinfo->output_components != 3)
-    ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components);
-
-  /* Convert colormap, if any, to RLE format. */
-
-  dest->colormap = NULL;
-
-  if (cinfo->quantize_colors) {
-    /* Allocate storage for RLE-style cmap, zero any extra entries */
-    cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map);
-    dest->colormap = (rle_map *) (*cinfo->mem->alloc_small)
-      ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize);
-    MEMZERO(dest->colormap, cmapsize);
-
-    /* Save away data in RLE format --- note 8-bit left shift! */
-    /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */
-    for (ci = 0; ci < cinfo->out_color_components; ci++) {
-      for (i = 0; i < cinfo->actual_number_of_colors; i++) {
-        dest->colormap[ci * CMAPLENGTH + i] =
-          GETJSAMPLE(cinfo->colormap[ci][i]) << 8;
-      }
-    }
-  }
-
-  /* Set the output buffer to the first row */
-  dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE);
-  dest->pub.buffer_height = 1;
-
-  dest->pub.put_pixel_rows = rle_put_pixel_rows;
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL) {
-    progress->total_extra_passes++;  /* count file writing as separate pass */
-  }
-#endif
-}
-
-
-/*
- * Write some pixel data.
- *
- * This routine just saves the data away in a virtual array.
- */
-
-METHODDEF(void)
-rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		    JDIMENSION rows_supplied)
-{
-  rle_dest_ptr dest = (rle_dest_ptr) dinfo;
-
-  if (cinfo->output_scanline < cinfo->output_height) {
-    dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
-      ((j_common_ptr) cinfo, dest->image,
-       cinfo->output_scanline, (JDIMENSION) 1, TRUE);
-  }
-}
-
-/*
- * Finish up at the end of the file.
- *
- * Here is where we really output the RLE file.
- */
-
-METHODDEF(void)
-finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  rle_dest_ptr dest = (rle_dest_ptr) dinfo;
-  rle_hdr header;		/* Output file information */
-  rle_pixel **rle_row, *red, *green, *blue;
-  JSAMPROW output_row;
-  char cmapcomment[80];
-  int row, col;
-  int ci;
-#ifdef PROGRESS_REPORT
-  cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
-  /* Initialize the header info */
-  header = *rle_hdr_init(NULL);
-  header.rle_file = dest->pub.output_file;
-  header.xmin     = 0;
-  header.xmax     = cinfo->output_width  - 1;
-  header.ymin     = 0;
-  header.ymax     = cinfo->output_height - 1;
-  header.alpha    = 0;
-  header.ncolors  = cinfo->output_components;
-  for (ci = 0; ci < cinfo->output_components; ci++) {
-    RLE_SET_BIT(header, ci);
-  }
-  if (cinfo->quantize_colors) {
-    header.ncmap   = cinfo->out_color_components;
-    header.cmaplen = CMAPBITS;
-    header.cmap    = dest->colormap;
-    /* Add a comment to the output image with the true colormap length. */
-    sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors);
-    rle_putcom(cmapcomment, &header);
-  }
-
-  /* Emit the RLE header and color map (if any) */
-  rle_put_setup(&header);
-
-  /* Now output the RLE data from our virtual array.
-   * We assume here that (a) rle_pixel is represented the same as JSAMPLE,
-   * and (b) we are not on a machine where FAR pointers differ from regular.
-   */
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL) {
-    progress->pub.pass_limit = cinfo->output_height;
-    progress->pub.pass_counter = 0;
-    (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-  }
-#endif
-
-  if (cinfo->output_components == 1) {
-    for (row = cinfo->output_height-1; row >= 0; row--) {
-      rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
-        ((j_common_ptr) cinfo, dest->image,
-	 (JDIMENSION) row, (JDIMENSION) 1, FALSE);
-      rle_putrow(rle_row, (int) cinfo->output_width, &header);
-#ifdef PROGRESS_REPORT
-      if (progress != NULL) {
-        progress->pub.pass_counter++;
-        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-      }
-#endif
-    }
-  } else {
-    for (row = cinfo->output_height-1; row >= 0; row--) {
-      rle_row = (rle_pixel **) dest->rle_row;
-      output_row = * (*cinfo->mem->access_virt_sarray)
-        ((j_common_ptr) cinfo, dest->image,
-	 (JDIMENSION) row, (JDIMENSION) 1, FALSE);
-      red = rle_row[0];
-      green = rle_row[1];
-      blue = rle_row[2];
-      for (col = cinfo->output_width; col > 0; col--) {
-        *red++ = GETJSAMPLE(*output_row++);
-        *green++ = GETJSAMPLE(*output_row++);
-        *blue++ = GETJSAMPLE(*output_row++);
-      }
-      rle_putrow(rle_row, (int) cinfo->output_width, &header);
-#ifdef PROGRESS_REPORT
-      if (progress != NULL) {
-        progress->pub.pass_counter++;
-        (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
-      }
-#endif
-    }
-  }
-
-#ifdef PROGRESS_REPORT
-  if (progress != NULL)
-    progress->completed_extra_passes++;
-#endif
-
-  /* Emit file trailer */
-  rle_puteof(&header);
-  fflush(dest->pub.output_file);
-  if (ferror(dest->pub.output_file))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for RLE format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_rle (j_decompress_ptr cinfo)
-{
-  rle_dest_ptr dest;
-
-  /* Create module interface object, fill in method pointers */
-  dest = (rle_dest_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-                                  SIZEOF(rle_dest_struct));
-  dest->pub.start_output = start_output_rle;
-  dest->pub.finish_output = finish_output_rle;
-
-  /* Calculate output image dimensions so we can allocate space */
-  jpeg_calc_output_dimensions(cinfo);
-
-  /* Allocate a work array for output to the RLE library. */
-  dest->rle_row = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE,
-     cinfo->output_width, (JDIMENSION) cinfo->output_components);
-
-  /* Allocate a virtual array to hold the image. */
-  dest->image = (*cinfo->mem->request_virt_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
-     (JDIMENSION) (cinfo->output_width * cinfo->output_components),
-     cinfo->output_height, (JDIMENSION) 1);
-
-  return (djpeg_dest_ptr) dest;
-}
-
-#endif /* RLE_SUPPORTED */
diff --git a/tkimg1.3/libjpeg/wrtarga.c b/tkimg1.3/libjpeg/wrtarga.c
deleted file mode 100644
index cf104d2..0000000
--- a/tkimg1.3/libjpeg/wrtarga.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * wrtarga.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in Targa format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications.  As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * Based on code contributed by Lee Daniel Crocker.
- */
-
-#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
-
-#ifdef TARGA_SUPPORTED
-
-
-/*
- * To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
- * This is not yet implemented.
- */
-
-#if BITS_IN_JSAMPLE != 8
-  Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * The output buffer needs to be writable by fwrite().  On PCs, we must
- * allocate the buffer in near data space, because we are assuming small-data
- * memory model, wherein fwrite() can't reach far memory.  If you need to
- * process very wide images on a PC, you might have to compile in large-memory
- * model, or else replace fwrite() with a putc() loop --- which will be much
- * slower.
- */
-
-
-/* Private version of data destination object */
-
-typedef struct {
-  struct djpeg_dest_struct pub;	/* public fields */
-
-  char *iobuffer;		/* physical I/O buffer */
-  JDIMENSION buffer_width;	/* width of one row */
-} tga_dest_struct;
-
-typedef tga_dest_struct * tga_dest_ptr;
-
-
-LOCAL(void)
-write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors)
-/* Create and write a Targa header */
-{
-  char targaheader[18];
-
-  /* Set unused fields of header to 0 */
-  MEMZERO(targaheader, SIZEOF(targaheader));
-
-  if (num_colors > 0) {
-    targaheader[1] = 1;		/* color map type 1 */
-    targaheader[5] = (char) (num_colors & 0xFF);
-    targaheader[6] = (char) (num_colors >> 8);
-    targaheader[7] = 24;	/* 24 bits per cmap entry */
-  }
-
-  targaheader[12] = (char) (cinfo->output_width & 0xFF);
-  targaheader[13] = (char) (cinfo->output_width >> 8);
-  targaheader[14] = (char) (cinfo->output_height & 0xFF);
-  targaheader[15] = (char) (cinfo->output_height >> 8);
-  targaheader[17] = 0x20;	/* Top-down, non-interlaced */
-
-  if (cinfo->out_color_space == JCS_GRAYSCALE) {
-    targaheader[2] = 3;		/* image type = uncompressed gray-scale */
-    targaheader[16] = 8;	/* bits per pixel */
-  } else {			/* must be RGB */
-    if (num_colors > 0) {
-      targaheader[2] = 1;	/* image type = colormapped RGB */
-      targaheader[16] = 8;
-    } else {
-      targaheader[2] = 2;	/* image type = uncompressed RGB */
-      targaheader[16] = 24;
-    }
-  }
-
-  if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18)
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		JDIMENSION rows_supplied)
-/* used for unquantized full-color output */
-{
-  tga_dest_ptr dest = (tga_dest_ptr) dinfo;
-  register JSAMPROW inptr;
-  register char * outptr;
-  register JDIMENSION col;
-
-  inptr = dest->pub.buffer[0];
-  outptr = dest->iobuffer;
-  for (col = cinfo->output_width; col > 0; col--) {
-    outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */
-    outptr[1] = (char) GETJSAMPLE(inptr[1]);
-    outptr[2] = (char) GETJSAMPLE(inptr[0]);
-    inptr += 3, outptr += 3;
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-METHODDEF(void)
-put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-	       JDIMENSION rows_supplied)
-/* used for grayscale OR quantized color output */
-{
-  tga_dest_ptr dest = (tga_dest_ptr) dinfo;
-  register JSAMPROW inptr;
-  register char * outptr;
-  register JDIMENSION col;
-
-  inptr = dest->pub.buffer[0];
-  outptr = dest->iobuffer;
-  for (col = cinfo->output_width; col > 0; col--) {
-    *outptr++ = (char) GETJSAMPLE(*inptr++);
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Write some demapped pixel data when color quantization is in effect.
- * For Targa, this is only applied to grayscale data.
- */
-
-METHODDEF(void)
-put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
-		   JDIMENSION rows_supplied)
-{
-  tga_dest_ptr dest = (tga_dest_ptr) dinfo;
-  register JSAMPROW inptr;
-  register char * outptr;
-  register JSAMPROW color_map0 = cinfo->colormap[0];
-  register JDIMENSION col;
-
-  inptr = dest->pub.buffer[0];
-  outptr = dest->iobuffer;
-  for (col = cinfo->output_width; col > 0; col--) {
-    *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]);
-  }
-  (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  tga_dest_ptr dest = (tga_dest_ptr) dinfo;
-  int num_colors, i;
-  FILE *outfile;
-
-  if (cinfo->out_color_space == JCS_GRAYSCALE) {
-    /* Targa doesn't have a mapped grayscale format, so we will */
-    /* demap quantized gray output.  Never emit a colormap. */
-    write_header(cinfo, dinfo, 0);
-    if (cinfo->quantize_colors)
-      dest->pub.put_pixel_rows = put_demapped_gray;
-    else
-      dest->pub.put_pixel_rows = put_gray_rows;
-  } else if (cinfo->out_color_space == JCS_RGB) {
-    if (cinfo->quantize_colors) {
-      /* We only support 8-bit colormap indexes, so only 256 colors */
-      num_colors = cinfo->actual_number_of_colors;
-      if (num_colors > 256)
-	ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors);
-      write_header(cinfo, dinfo, num_colors);
-      /* Write the colormap.  Note Targa uses BGR byte order */
-      outfile = dest->pub.output_file;
-      for (i = 0; i < num_colors; i++) {
-	putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile);
-	putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile);
-	putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile);
-      }
-      dest->pub.put_pixel_rows = put_gray_rows;
-    } else {
-      write_header(cinfo, dinfo, 0);
-      dest->pub.put_pixel_rows = put_pixel_rows;
-    }
-  } else {
-    ERREXIT(cinfo, JERR_TGA_COLORSPACE);
-  }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
-  /* Make sure we wrote the output file OK */
-  fflush(dinfo->output_file);
-  if (ferror(dinfo->output_file))
-    ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for Targa format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_targa (j_decompress_ptr cinfo)
-{
-  tga_dest_ptr dest;
-
-  /* Create module interface object, fill in method pointers */
-  dest = (tga_dest_ptr)
-      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				  SIZEOF(tga_dest_struct));
-  dest->pub.start_output = start_output_tga;
-  dest->pub.finish_output = finish_output_tga;
-
-  /* Calculate output image dimensions so we can allocate space */
-  jpeg_calc_output_dimensions(cinfo);
-
-  /* Create I/O buffer.  Note we make this near on a PC. */
-  dest->buffer_width = cinfo->output_width * cinfo->output_components;
-  dest->iobuffer = (char *)
-    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
-				(size_t) (dest->buffer_width * SIZEOF(char)));
-
-  /* Create decompressor output buffer. */
-  dest->pub.buffer = (*cinfo->mem->alloc_sarray)
-    ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1);
-  dest->pub.buffer_height = 1;
-
-  return (djpeg_dest_ptr) dest;
-}
-
-#endif /* TARGA_SUPPORTED */
diff --git a/tkimg1.3/libpng/ANNOUNCE b/tkimg1.3/libpng/ANNOUNCE
deleted file mode 100644
index b320cba..0000000
--- a/tkimg1.3/libpng/ANNOUNCE
+++ /dev/null
@@ -1,128 +0,0 @@
-
-Libpng 1.2.6rc5 - August 10, 2004
-
-This is not intended to be a public release.  It will be replaced
-within a few weeks by a public version or by another test version.
-
-Changes since the last public release (1.2.5):
-
-  Commented out warning about uninitialized mmx_support in pnggccrd.c.
-  Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h.
-  Relocated two more misplaced PNGAPI lines in pngtest.c
-  Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams,
-    introduced in version 1.0.2.
-  Fixed potential overrun in pngerror.c by using strncpy instead of memcpy.
-  Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu.
-  Changed the one instance of "ln -sf" to "ln -f -s" in each Sun makefile.
-  Fixed potential overrun in pngerror.c by using strncpy instead of memcpy.
-  Added "#!/bin/sh" at the top of configure, for recognition of the
-    'x' flag under Cygwin (Cosmin).
-  Optimized vacuous tests that silence compiler warnings, in png.c (Cosmin).
-  Added support for PNG_USER_CONFIG, in pngconf.h (Cosmin).
-  Fixed the special memory handler for Borland C under DOS, in pngmem.c
-    (Cosmin).
-  Removed some spurious assignments in pngrutil.c (Cosmin).
-  Replaced 65536 with 65536L, and 0xffff with 0xffffL, to silence warnings
-    on 16-bit platforms (Cosmin).
-  Enclosed shift op expressions in parentheses, to silence warnings (Cosmin).
-  Used proper type png_fixed_point, to avoid problems on 16-bit platforms,
-    in png_handle_sRGB() (Cosmin).
-  Added compression_type to png_struct, and optimized the window size
-    inside the deflate stream (Cosmin).
-  Fixed definition of isnonalpha(), in pngerror.c and pngrutil.c (Cosmin).
-  Fixed handling of unknown chunks that come after IDAT (Cosmin).
-  Allowed png_error() and png_warning() to work even if png_ptr == NULL
-    (Cosmin).
-  Replaced row_info->rowbytes with row_bytes in png_write_find_filter()
-    (Cosmin).
-  Fixed definition of PNG_LIBPNG_VER_DLLNUM (Simon-Pierre).
-  Used PNG_LIBPNG_VER and PNG_LIBPNG_VER_STRING instead of the hardcoded
-    values in png.c (Simon-Pierre, Cosmin).
-  Initialized png_libpng_ver[] with PNG_LIBPNG_VER_STRING (Simon-Pierre).
-  Replaced PNG_LIBPNG_VER_MAJOR with PNG_LIBPNG_VER_DLLNUM in png.rc
-    (Simon-Pierre).
-  Moved the definition of PNG_HEADER_VERSION_STRING near the definitions
-    of the other PNG_LIBPNG_VER_... symbols in png.h (Cosmin).
-  Relocated #ifndef PNGAPI guards in pngconf.h (Simon-Pierre, Cosmin).
-  Updated scripts/makefile.vc(a)win32 (Cosmin).
-  Updated the MSVC project (Simon-Pierre, Cosmin).
-  Updated the Borland C++ Builder project (Cosmin).
-  Avoided access to asm_flags in pngvcrd.c, if PNG_1_0_X is defined (Cosmin).
-  Commented out warning about uninitialized mmx_support in pngvcrd.c (Cosmin).
-  Removed scripts/makefile.bd32 and scripts/pngdef.pas (Cosmin).
-  Added extra guard around inclusion of Turbo C memory headers, in pngconf.h
-    (Cosmin).
-  Renamed projects/msvc/ to projects/visualc6/, and projects/borland/ to
-    projects/cbuilder5/ (Cosmin).
-  Moved projects/visualc6/png32ms.def to scripts/pngw32.def,
-    and projects/visualc6/png.rc to scripts/pngw32.rc (Cosmin).
-  Added projects/visualc6/pngtest.dsp; removed contrib/msvctest/ (Cosmin).
-  Updated contrib/visupng/VisualPng.dsp (Cosmin).
-  Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin).
-  Added a separate distribution with "configure" and supporting files (Junichi).
-version 1.2.6rc1 [August 4, 2004]
-  Added user ability to change png_size_t via a PNG_SIZE_T macro.
-  Added png_sizeof() and png_convert_size() functions.
-  Added PNG_SIZE_MAX (maximum value of a png_size_t variable.
-  Added check in png_malloc_default() for (size_t)size != (png_uint_32)size
-    which would indicate an overflow.
-  Changed sPLT failure action from png_error to png_warning and abandon chunk.
-  Changed sCAL and iCCP failures from png_error to png_warning and abandon.
-  Added png_get_uint_31(png_ptr, buf) function.
-  Added PNG_UINT_32_MAX macro.
-  Renamed PNG_MAX_UINT to PNG_UINT_31_MAX.
-  Made png_zalloc() issue a png_warning and return NULL on potential
-    overflow.
-  Revised "clobber list" in pnggccrd.c so it will compile under gcc-3.4.
-  Revised Borland portion of png_malloc() to return NULL or issue
-    png_error() according to setting of PNG_FLAG_MALLOC_NULL_MEM_OK.
-  Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove
-    sequential read support.
-  Added some "#if PNG_WRITE_SUPPORTED" blocks.
-  #ifdef'ed out some redundancy in png_malloc_default().
-  Use png_malloc instead of png_zalloc to allocate the pallete.
-  Rearranged order of processing of color types in png_handle_tRNS().
-  Added PNG_ROWBYTES macro to calculate rowbytes without integer overflow.
-  Updated makefile.darwin and removed makefile.macosx from scripts directory.
-  Imposed default one million column, one-million row limits on the image
-    dimensions, and added png_set_user_limits() function and
-    PNG_SET_USER_LIMITS_SUPPORTED macro to override them.
-  Fixed wrong cast of returns from png_get_user_width|height_max().
-  Fixed buffer overflow vulnerability in png_handle_tRNS()
-  Fixed integer arithmetic overflow vulnerability in png_read_png().
-  Fixed some harmless bugs in png_handle_sBIT, etc, that would cause
-    duplicate chunk types to go undetected.
-  Changed some "keep the compiler happy" from empty statements to returns,
-Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution
-version 1.2.6rc2 [August 8, 2004]
-  Revised makefile.darwin and makefile.solaris.  Removed makefile.macosx.
-  Revised pngtest's png_debug_malloc() to use png_malloc() instead of
-     png_malloc_default() which is not supposed to be exported.
-  Fixed off-by-one error in one of the conversions to PNG_ROWBYTES() in
-     pngpread.c.  Bug was introduced in 1.2.6rc1.
-  Fixed bug in RGB to RGBX transformation introduced in 1.2.6rc1.
-  Fixed old bug in RGB to Gray transformation.
-  Fixed problem with 64-bit compilers by casting arguments to abs()
-    to png_int_32.
-  Changed "ln -sf" to "ln -f -s" in three makefiles (solaris, sco, so9).
-  Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin)
-  Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles.
-  Added code to update the row_info->colortype in png_do_read_filler() (MSB).
-version 1.2.6rc3 [August 9, 2004]
-  Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid
-    trouble with some 64-bit compilers.  Created PNG_OUT_OF_RANGE() macro.
-  Revised documentation of png_set_keep_unknown_chunks().
-  Check handle_as_unknown status in pngpread.c, as in pngread.c previously.
-  Moved  "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h
-  Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c
-version 1.2.6rc4 [August 10, 2004]
-  Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of
-    "pinfo" was out of place).
-version 1.2.6rc5 [August 10, 2004]
-  Moved  "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
-     section of png.h where they were inadvertently placed in version rc3.
-
-Send comments/corrections/commendations to
-png-implement at ccrc.wustl.edu or to glennrp at users.sourceforge.net
-
-Glenn R-P
diff --git a/tkimg1.3/libpng/CHANGES b/tkimg1.3/libpng/CHANGES
deleted file mode 100644
index 3d7a6a1..0000000
--- a/tkimg1.3/libpng/CHANGES
+++ /dev/null
@@ -1,1311 +0,0 @@
-
-CHANGES - changes for libpng
-
-version 0.2
-  added reader into png.h
-  fixed small problems in stub file
-version 0.3
-  added pull reader
-  split up pngwrite.c to several files
-  added pnglib.txt
-  added example.c
-  cleaned up writer, adding a few new tranformations
-  fixed some bugs in writer
-  interfaced with zlib 0.5
-  added K&R support
-  added check for 64 KB blocks for 16 bit machines
-version 0.4
-  cleaned up code and commented code
-  simplified time handling into png_time
-  created png_color_16 and png_color_8 to handle color needs
-  cleaned up color type defines
-  fixed various bugs
-  made various names more consistant
-  interfaced with zlib 0.71
-  cleaned up zTXt reader and writer (using zlib's Reset functions)
-  split transformations into pngrtran.c and pngwtran.c
-version 0.5
-  interfaced with zlib 0.8
-  fixed many reading and writing bugs
-  saved using 3 spaces instead of tabs
-version 0.6
-  added png_large_malloc() and png_large_free()
-  added png_size_t
-  cleaned up some compiler warnings
-  added png_start_read_image()
-version 0.7
-  cleaned up lots of bugs
-  finished dithering and other stuff
-  added test program
-  changed name from pnglib to libpng
-version 0.71 [June, 1995]
-  changed pngtest.png for zlib 0.93
-  fixed error in libpng.txt and example.c
-version 0.8
-  cleaned up some bugs
-  added png_set_filler()
-  split up pngstub.c into pngmem.c, pngio.c, and pngerror.c
-  added #define's to remove unwanted code
-  moved png_info_init() to png.c
-  added old_size into png_realloc()
-  added functions to manually set filtering and compression info
-  changed compression parameters based on image type
-  optimized filter selection code
-  added version info
-  changed external functions passing floats to doubles (k&r problems?)
-  put all the configurable stuff in pngconf.h
-  enabled png_set_shift to work with paletted images on read
-  added png_read_update_info() - updates info structure with
-     transformations
-version 0.81 [August, 1995]
-  incorporated Tim Wegner's medium model code (thanks, Tim)
-version 0.82 [September, 1995]
-  [unspecified changes]
-version 0.85 [December, 1995]
-  added more medium model code (almost everything's a far)
-  added i/o, error, and memory callback functions
-  fixed some bugs (16 bit, 4 bit interlaced, etc.)
-  added first run progressive reader (barely tested)
-version 0.86 [January, 1996]
-  fixed bugs
-  improved documentation
-version 0.87 [January, 1996]
-  fixed medium model bugs
-  fixed other bugs introduced in 0.85 and 0.86
-  added some minor documentation
-version 0.88 [January, 1996]
-  fixed progressive bugs
-  replaced tabs with spaces
-  cleaned up documentation
-  added callbacks for read/write and warning/error functions
-version 0.89 [July, 1996]
-  added new initialization API to make libpng work better with shared libs
-     we now have png_create_read_struct(), png_create_write_struct(),
-     png_create_info_struct(), png_destroy_read_struct(), and
-     png_destroy_write_struct() instead of the separate calls to
-     malloc and png_read_init(), png_info_init(), and png_write_init()
-  changed warning/error callback functions to fix bug - this means you
-     should use the new initialization API if you were using the old
-     png_set_message_fn() calls, and that the old API no longer exists
-     so that people are aware that they need to change their code
-  changed filter selection API to allow selection of multiple filters
-     since it didn't work in previous versions of libpng anyways
-  optimized filter selection code
-  fixed png_set_background() to allow using an arbitrary RGB color for
-     paletted images
-  fixed gamma and background correction for paletted images, so
-     png_correct_palette is not needed unless you are correcting an
-     external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED
-     in pngconf.h) - if nobody uses this, it may disappear in the future.
-  fixed bug with Borland 64K memory allocation (Alexander Lehmann)
-  fixed bug in interlace handling (Smarasderagd, I think)
-  added more error checking for writing and image to reduce invalid files
-  separated read and write functions so that they won't both be linked
-     into a binary when only reading or writing functionality is used
-  new pngtest image also has interlacing and zTXt
-  updated documentation to reflect new API
-version 0.90 [January, 1997]
-  made CRC errors/warnings on critical and ancillary chunks configurable
-  libpng will use the zlib CRC routines by (compile-time) default
-  changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner)
-  added external C++ wrapper statements to png.h (Gilles Dauphin)
-  allow PNG file to be read when some or all of file signature has already
-     been read from the beginning of the stream.  ****This affects the size
-     of info_struct and invalidates all programs that use a shared libpng****
-  fixed png_filler() declarations
-  fixed? background color conversions
-  fixed order of error function pointers to match documentation
-  current chunk name is now available in png_struct to reduce the number
-     of nearly identical error messages (will simplify multi-lingual
-     support when available)
-  try to get ready for unknown-chunk callback functions:
-     - previously read critical chunks are flagged, so the chunk handling
-       routines can determine if the chunk is in the right place
-     - all chunk handling routines have the same prototypes, so we will
-       be able to handle all chunks via a callback mechanism
-  try to fix Linux "setjmp" buffer size problems
-  removed png_large_malloc, png_large_free, and png_realloc functions.
-version 0.95 [March, 1997]
-  fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never
-  fixed bug in PNG file signature compares when start != 0
-  changed parameter type of png_set_filler(...filler...) from png_byte
-     to png_uint_32
-  added test for MACOS to ensure that both math.h and fp.h are not #included
-  added macros for libpng to be compiled as a Windows DLL (Andreas Kupries)
-  added "packswap" transformation, which changes the endianness of
-     packed-pixel bytes (Kevin Bracey)
-  added "strip_alpha" transformation, which removes the alpha channel of
-     input images without using it (not neccesarily a good idea)
-  added "swap_alpha" transformation, which puts the alpha channel in front
-     of the color bytes instead of after
-  removed all implicit variable tests which assume NULL == 0 (I think)
-  changed several variables to "png_size_t" to show 16/32-bit limitations
-  added new pCAL chunk read/write support
-  added experimental filter selection weighting (Greg Roelofs)
-  removed old png_set_rgbx() and png_set_xrgb() functions that have been
-     obsolete for about 2 years now (use png_set_filler() instead)
-  added macros to read 16- and 32-bit ints directly from buffer, to be
-     used only on those systems that support it (namely PowerPC and 680x0)
-     With some testing, this may become the default for MACOS/PPC systems.
-  only calculate CRC on data if we are going to use it
-  added macros for zTXt compression type PNG_zTXt_COMPRESSION_???
-  added macros for simple libpng debugging output selectable at compile time
-  removed PNG_READ_END_MODE in progressive reader (Smarasderagd)
-  more description of info_struct in libpng.txt and png.h
-  more instructions in example.c
-  more chunk types tested in pngtest.c
-  renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
-     png_set_<chunk>.  We now have corresponding png_get_<chunk>
-     functions in pngget.c to get infomation in info_ptr.  This isolates
-     the application from the internal organization of png_info_struct
-     (good for shared library implementations).
-version 0.96 [May, 1997]
-  fixed serious bug with < 8bpp images introduced in 0.95
-  fixed 256-color transparency bug (Greg Roelofs)
-  fixed up documentation (Greg Roelofs, Laszlo Nyul)
-  fixed "error" in pngconf.h for Linux setjmp() behaviour
-  fixed DOS medium model support (Tim Wegner)
-  fixed png_check_keyword() for case with error in static string text
-  added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul)
-  added typecasts to quiet compiler errors
-  added more debugging info
-version 0.97 [January, 1998]
-  removed PNG_USE_OWN_CRC capability
-  relocated png_set_crc_action from pngrutil.c to pngrtran.c
-  fixed typecasts of "new_key", etc. (Andreas Dilger)
-  added RFC 1152 [sic] date support
-  fixed bug in gamma handling of 4-bit grayscale
-  added 2-bit grayscale gamma handling (Glenn R-P)
-  added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
-  minor corrections in libpng.txt
-  added simple sRGB support (Glenn R-P)
-  easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
-     all configurable options can be selected from command-line instead
-     of having to edit pngconf.h (Glenn R-P)
-  fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
-  added more conditions for png_do_background, to avoid changing
-     black pixels to background when a background is supplied and
-     no pixels are transparent
-  repaired PNG_NO_STDIO behaviour
-  tested NODIV support and made it default behaviour (Greg Roelofs)
-  added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler)
-  regularized version numbering scheme and bumped shared-library major
-     version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs)
-version 0.98 [January, 1998]
-  cleaned up some typos in libpng.txt and in code documentation
-  fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler)
-  cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c
-  changed recommendation about file_gamma for PC images to .51 from .45,
-     in example.c and libpng.txt, added comments to distinguish between
-     screen_gamma, viewing_gamma, and display_gamma.
-  changed all references to RFC1152 to read RFC1123 and changed the
-     PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED
-  added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent)
-  changed srgb_intent from png_byte to int to avoid compiler bugs
-version 0.99 [January 30, 1998]
-  free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler)
-  fixed a longstanding "packswap" bug in pngtrans.c
-  fixed some inconsistencies in pngconf.h that prevented compiling with
-     PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined
-  fixed some typos and made other minor rearrangement of libpng.txt (Andreas)
-  changed recommendation about file_gamma for PC images to .50 from .51 in
-     example.c and libpng.txt, and changed file_gamma for sRGB images to .45
-  added a number of functions to access information from the png structure
-     png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit)
-  added TARGET_MACOS similar to zlib-1.0.8
-  define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined
-  added type casting to all png_malloc() function calls
-version 0.99a [January 31, 1998]
-  Added type casts and parentheses to all returns that return a value.(Tim W.)
-version 0.99b [February 4, 1998]
-  Added type cast png_uint_32 on malloc function calls where needed.
-  Changed type of num_hist from png_uint_32 to int (same as num_palette).
-  Added checks for rowbytes overflow, in case png_size_t is less than 32 bits.
-  Renamed makefile.elf to makefile.lnx.
-version 0.99c [February 7, 1998]
-  More type casting.  Removed erroneous overflow test in pngmem.c.
-  Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes.
-  Added UNIX manual pages libpng.3 (incorporating libpng.txt) and  png.5.
-version 0.99d [February 11, 1998]
-  Renamed "far_to_near()" "png_far_to_near()"
-  Revised libpng.3
-  Version 99c "buffered" operations didn't work as intended.  Replaced them
-    with png_memcpy_check() and png_memset_check().
-  Added many "if (png_ptr == NULL) return" to quell compiler warnings about
-    unused png_ptr, mostly in pngget.c and pngset.c.
-  Check for overlength tRNS chunk present when indexed-color PLTE is read.
-  Cleaned up spelling errors in libpng.3/libpng.txt
-  Corrected a problem with png_get_tRNS() which returned undefined trans array
-version 0.99e [February 28, 1998]
-  Corrected png_get_tRNS() again.
-  Add parentheses for easier reading of pngget.c, fixed "||" should be "&&".
-  Touched up example.c to make more of it compileable, although the entire
-    file still can't be compiled (Willem van Schaik)
-  Fixed a bug in png_do_shift() (Bryan Tsai)
-  Added a space in png.h prototype for png_write_chunk_start()
-  Replaced pngtest.png with one created with zlib 1.1.1
-  Changed pngtest to report PASS even when file size is different (Jean-loup G.)
-  Corrected some logic errors in png_do_invert_alpha() (Chris Patterson)
-version 0.99f [March 5, 1998]
-  Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey)
-  Moved makefiles into a "scripts" directory, and added INSTALL instruction file
-  Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok)
-  Added pointers to "note on libpng versions" in makefile.lnx and README
-  Added row callback feature when reading and writing nonprogressive rows
-     and added a test of this feature in pngtest.c
-  Added user transform callbacks, with test of the feature in pngtest.c
-version 0.99g [March 6, 1998, morning]
-  Minor changes to pngtest.c to suppress compiler warnings.
-  Removed "beta" language from documentation.
-version 0.99h [March 6, 1998, evening]
-  Minor changes to previous minor changes to pngtest.c
-  Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED
-  and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro
-  Added user transform capability
-version 1.00 [March 7, 1998]
-  Changed several typedefs in pngrutil.c
-  Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik)
-  replaced "while(1)" with "for(;;)"
-  added PNGARG() to prototypes in pngtest.c and removed some prototypes
-  updated some of the makefiles (Tom Lane)
-  changed some typedefs (s_start, etc.) in pngrutil.c
-  fixed dimensions of "short_months" array in pngwrite.c
-  Replaced ansi2knr.c with the one from jpeg-v6
-version 1.0.0 [March 8, 1998]
-  Changed name from 1.00 to 1.0.0 (Adam Costello)
-  Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)
-version 1.0.0a [March 9, 1998]
-  Fixed three bugs in pngrtran.c to make gamma+background handling consistent
-  (Greg Roelofs)
-  Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz
-  for major, minor, and bugfix releases.  This is 10001. (Adam Costello,
-  Tom Lane)
-  Make months range from 1-12 in png_convert_to_rfc1123
-version 1.0.0b [March 13, 1998]
-  Quieted compiler complaints about two empty "for" loops in pngrutil.c
-  Minor changes to makefile.s2x
-  Removed #ifdef/#endif around a png_free() in pngread.c
-version 1.0.1 [March 14, 1998]
-  Changed makefile.s2x to reduce security risk of using a relative pathname
-  Fixed some typos in the documentation (Greg).
-  Fixed a problem with value of "channels" returned by png_read_update_info()
-version 1.0.1a [April 21, 1998]
-  Optimized Paeth calculations by replacing abs() function calls with intrinsics
-  plus other loop optimizations. Improves avg decoding speed by about 20%.
-  Commented out i386istic "align" compiler flags in makefile.lnx.
-  Reduced the default warning level in some makefiles, to make them consistent.
-  Removed references to IJG and JPEG in the ansi2knr.c copyright statement.
-  Fixed a bug in png_do_strip_filler with XXRRGGBB => RRGGBB transformation.
-  Added grayscale and 16-bit capability to png_do_read_filler().
-  Fixed a bug in pngset.c, introduced in version 0.99c, that sets rowbytes
-    too large when writing an image with bit_depth < 8 (Bob Dellaca).
-  Corrected some bugs in the experimental weighted filtering heuristics.
-  Moved a misplaced pngrutil code block that truncates tRNS if it has more
-    than num_palette entries -- test was done before num_palette was defined.
-  Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins).
-  Changed compiler flags in makefile.wat for better optimization (Pawel Mrochen).
-version 1.0.1b [May 2, 1998]
-  Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg).
-  Relocated the png_composite macros from pngrtran.c to png.h (Greg).
-  Added makefile.sco (contributed by Mike Hopkirk).
-  Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a.
-  Fixed a bug in pngrtran.c that would set channels=5 under some circumstances.
-  More work on the Paeth-filtering, achieving imperceptible speedup (A Kleinert).
-  More work on loop optimization which may help when compiled with C++ compilers.
-  Added warnings when people try to use transforms they've defined out.
-  Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran.
-  Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg)
-version 1.0.1c [May 11, 1998]
-  Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for
-    filler bytes should have been 0xff instead of 0xf.
-  Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images.
-  Moved PNG_WRITE_WEIGHTED_FILTER_SUPPORTED and PNG_WRITE_FLUSH_SUPPORTED
-    out of the PNG_WRITE_TRANSFORMS_NOT_SUPPORTED block of pngconf.h
-  Added "PNG_NO_WRITE_TRANSFORMS" etc., as alternatives for *_NOT_SUPPORTED,
-    for consistency, in pngconf.h
-  Added individual "ifndef PNG_NO_[CAPABILITY]" in pngconf.h to make it easier
-    to remove unwanted capabilities via the compile line
-  Made some corrections to grammar (which, it's) in documentation (Greg).
-  Corrected example.c, use of row_pointers in png_write_image().
-version 1.0.1d [May 24, 1998]
-  Corrected several statements that used side effects illegally in pngrutil.c
-    and pngtrans.c, that were introduced in version 1.0.1b
-  Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert)
-  More corrections to example.c, use of row_pointers in png_write_image()
-    and png_read_rows().
-  Added pngdll.mak and pngdef.pas to scripts directory, contributed by
-    Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5
-  Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.)
-  Changed several loops from count-down to count-up, for consistency.
-version 1.0.1e [June 6, 1998]
-  Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and
-    added warnings when people try to set png_read_fn and png_write_fn in
-    the same structure.
-  Added a test such that png_do_gamma will be done when num_trans==0
-    for truecolor images that have defined a background.  This corrects an
-    error that was introduced in libpng-0.90 that can cause gamma processing
-    to be skipped.
-  Added tests in png.h to include "trans" and "trans_values" in structures
-    when PNG_READ_BACKGROUND_SUPPORTED or PNG_READ_EXPAND_SUPPORTED is defined.
-  Add png_free(png_ptr->time_buffer) in png_destroy_read_struct()
-  Moved png_convert_to_rfc_1123() from pngwrite.c to png.c
-  Added capability for user-provided malloc_fn() and free_fn() functions,
-    and revised pngtest.c to demonstrate their use, replacing the
-    PNGTEST_DEBUG_MEM feature.
-  Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner).
-version 1.0.2 [June 14, 1998]
-  Fixed two bugs in makefile.bor .
-version 1.0.2a [December 30, 1998]
-  Replaced and extended code that was removed from png_set_filler() in 1.0.1a.
-  Fixed a bug in png_do_filler() that made it fail to write filler bytes in
-    the left-most pixel of each row (Kevin Bracey).
-  Changed "static pngcharp tIME_string" to "static char tIME_string[30]"
-    in pngtest.c (Duncan Simpson).
-  Fixed a bug in pngtest.c that caused pngtest to try to write a tIME chunk
-    even when no tIME chunk was present in the source file.
-  Fixed a problem in pngrutil.c: gray_to_rgb didn't always work with 16-bit.
-  Fixed a problem in png_read_push_finish_row(), which would not skip some
-    passes that it should skip, for images that are less than 3 pixels high.
-  Interchanged the order of calls to png_do_swap() and png_do_shift()
-    in pngwtran.c (John Cromer).
-  Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h .
-  Changed "bad adaptive filter type" from error to warning in pngrutil.c .
-  Fixed a documentation error about default filtering with 8-bit indexed-color.
-  Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO
-    (L. Peter Deutsch).
-  Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions.
-  Added png_get_copyright() and png_get_header_version() functions.
-  Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c
-  Added information about debugging in libpng.txt and libpng.3 .
-  Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and makefile.sco.
-  Removed lines after Dynamic Dependencies" in makefile.aco .
-  Revised makefile.dec to make a shared library (Jeremie Petit).
-  Removed trailing blanks from all files.
-version 1.0.2a [January 6, 1999]
-  Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h
-  Added "if" tests to silence complaints about unused png_ptr in png.h and png.c
-  Changed "check_if_png" function in example.c to return true (nonzero) if PNG.
-  Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig()
-    which is obsolete.
-version 1.0.3 [January 14, 1999]
-  Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice)
-  Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO.
-version 1.0.3a [August 12, 1999]
-  Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning
-     if an attempt is made to read an interlaced image when it's not supported.
-  Added check if png_ptr->trans is defined before freeing it in pngread.c
-  Modified the Y2K statement to include versions back to version 0.71
-  Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c
-  Modified makefile.wat (added -zp8 flag, ".symbolic", changed some comments)
-  Replaced leading blanks with tab characters in makefile.hux
-  Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents.
-  Changed (float)red and (float)green to (double)red, (double)green
-     in png_set_rgb_to_gray() to avoid "promotion" problems in AIX.
-  Fixed a bug in pngconf.h that omitted <stdio.h> when PNG_DEBUG==0 (K Bracey).
-  Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt).
-  Updated documentation to refer to the PNG-1.2 specification.
-  Removed ansi2knr.c and left pointers to the latest source for ansi2knr.c
-    in makefile.knr, INSTALL, and README (L. Peter Deutsch)
-  Fixed bugs in calculation of the length of rowbytes when adding alpha
-    channels to 16-bit images, in pngrtran.c (Chris Nokleberg)
-  Added function png_set_user_transform_info() to store user_transform_ptr,
-    user_depth, and user_channels into the png_struct, and a function
-    png_get_user_transform_ptr() to retrieve the pointer (Chris Nokleberg)
-  Added function png_set_empty_plte_permitted() to make libpng useable
-    in MNG applications.
-  Corrected the typedef for png_free_ptr in png.h (Jesse Jones).
-  Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be
-    consistent with PNG-1.2, and allow variance of 500 before complaining.
-  Added assembler code contributed by Intel in file pngvcrd.c and modified
-    makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant)
-  Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy.
-  Added some aliases for png_set_expand() in pngrtran.c, namely
-    png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS()
-    (Greg Roelofs, in "PNG: The Definitive Guide").
-  Added makefile.beo for BEOS on X86, contributed by Sander Stok.
-version 1.0.3b [August 26, 1999]
-  Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h
-  Changed leading blanks to tabs in all makefiles.
-  Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code.
-  Made alternate versions of  png_set_expand() in pngrtran.c, namely
-    png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha
-    (Greg Roelofs, in "PNG: The Definitive Guide").  Deleted the 1.0.3a aliases.
-  Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h
-  Revised calculation of num_blocks in pngmem.c to avoid a potentially
-    negative shift distance, whose results are undefined in the C language.
-  Added a check in pngset.c to prevent writing multiple tIME chunks.
-  Added a check in pngwrite.c to detect invalid small window_bits sizes.
-version 1.0.3d [September 4, 1999]
-  Fixed type casting of igamma in pngrutil.c
-  Added new png_expand functions to scripts/pngdef.pas and pngos2.def
-  Added a demo read_user_transform_fn that examines the row filters in pngtest.c
-version 1.0.4 [September 24, 1999]
-  Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
-  Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
-  Made several minor corrections to pngtest.c
-  Renamed the makefiles with longer but more user friendly extensions.
-  Copied the PNG copyright and license to a separate LICENSE file.
-  Revised documentation, png.h, and example.c to remove reference to
-    "viewing_gamma" which no longer appears in the PNG specification.
-  Revised pngvcrd.c to use MMX code for interlacing only on the final pass.
-  Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a
-  Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX
-    assembler code) and makefile.vcwin32 (doesn't).
-  Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
-  Added a copy of pngnow.png to the distribution.
-version 1.0.4a [September 25, 1999]
-  Increase max_pixel_depth in pngrutil.c if a user transform needs it.
-  Changed several division operations to right-shifts in pngvcrd.c
-version 1.0.4b [September 30, 1999]
-  Added parentheses in line 3732 of pngvcrd.c
-  Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1
-version 1.0.4c [October 1, 1999]
-  Added a "png_check_version" function in png.c and pngtest.c that will generate
-    a helpful compiler error if an old png.h is found in the search path.
-  Changed type of png_user_transform_depth|channels from int to png_byte.
-version 1.0.4d [October 6, 1999]
-  Changed 0.45 to 0.45455 in png_set_sRGB()
-  Removed unused PLTE entries from pngnow.png
-  Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly.
-version 1.0.4e [October 10, 1999]
-  Fixed sign error in pngvcrd.c (Greg Roelofs)
-  Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P)
-version 1.0.4f [October 15, 1999]
-  Surrounded example.c code with #if 0 .. #endif to prevent people from
-    inadvertently trying to compile it.
-  Changed png_get_header_version() from a function to a macro in png.h
-  Added type casting mostly in pngrtran.c and pngwtran.c
-  Removed some pointless "ptr = NULL" in pngmem.c
-  Added a "contrib" directory containing the source code from Greg's book.
-version 1.0.5 [October 15, 1999]
-  Minor editing of the INSTALL and README files.
-version 1.0.5a [October 23, 1999]
-  Added contrib/pngsuite and contrib/pngminus (Willem van Schaik)
-  Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans)
-  Further optimization and bugfix of pngvcrd.c
-  Revised pngset.c so that it does not allocate or free memory in the user's
-    text_ptr structure.  Instead, it makes its own copy.
-  Created separate write_end_info_struct in pngtest.c for a more severe test.
-  Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak.
-version 1.0.5b [November 23, 1999]
-  Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and
-    PNG_FLAG_WROTE_tIME from flags to mode.
-  Added png_write_info_before_PLTE() function.
-  Fixed some typecasting in contrib/gregbook/*.c
-  Updated scripts/makevms.com and added makevms.com to contrib/gregbook
-    and contrib/pngminus (Martin Zinser)
-version 1.0.5c [November 26, 1999]
-  Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr.
-  Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to
-    accomodate making DLL's: Moved usr_png_ver from global variable to function
-    png_get_header_ver() in png.c.  Moved png_sig to png_sig_bytes in png.c and
-    eliminated use of png_sig in pngwutil.c.  Moved the various png_CHNK arrays
-    into pngtypes.h.  Eliminated use of global png_pass arrays.  Declared the
-    png_CHNK and png_pass arrays to be "const".  Made the global arrays
-    available to applications (although none are used in libpng itself) when
-    PNG_NO_GLOBAL_ARRAYS is not defined or when PNG_GLOBAL_ARRAYS is defined.
-  Removed some extraneous "-I" from contrib/pngminus/makefile.std
-  Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2.
-  Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3
-version 1.0.5d [November 29, 1999]
-  Add type cast (png_const_charp) two places in png.c
-  Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays.
-  Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available
-    to applications a macro "PNG_USE_LOCAL_ARRAYS".
-  #ifdef out all the new declarations when PNG_USE_GLOBAL_ARRAYS is defined.
-  Added PNG_EXPORT_VAR macro to accommodate making DLL's.
-version 1.0.5e [November 30, 1999]
-  Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text
-    structure; refactored the inflate/deflate support to make adding new chunks
-    with trailing compressed parts easier in the future, and added new functions
-    png_free_iCCP, png_free_pCAL, png_free_sPLT, png_free_text, png_get_iCCP,
-    png_get_spalettes, png_set_iCCP, png_set_spalettes (Eric S. Raymond).
-  NOTE: Applications that write text chunks MUST define png_text->lang
-    before calling png_set_text(). It must be set to NULL if you want to
-    write tEXt or zTXt chunks.  If you want your application to be able to
-    run with older versions of libpng, use
-
-      #ifdef PNG_iTXt_SUPPORTED
-         png_text[i].lang = NULL;
-      #endif
-
-  Changed png_get_oFFs() and png_set_oFFs() to use signed rather than unsigned
-    offsets (Eric S. Raymond).
-  Combined PNG_READ_cHNK_SUPPORTED and PNG_WRITE_cHNK_SUPPORTED macros into
-    PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED
-    macros, leaving the separate macros also available.
-  Removed comments on #endifs at the end of many short, non-nested #if-blocks.
-version 1.0.5f [December 6, 1999]
-  Changed makefile.solaris to issue a warning about potential problems when
-    the ucb "ld" is in the path ahead of the ccs "ld".
-  Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3.
-  Added sCAL chunk support (Eric S. Raymond).
-version 1.0.5g [December 7, 1999]
-  Fixed "png_free_spallettes" typo in png.h
-  Added code to handle new chunks in pngpread.c
-  Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block
-  Added "translated_key" to png_text structure and png_write_iTXt().
-  Added code in pngwrite.c to work around a newly discovered zlib bug.
-version 1.0.5h [December 10, 1999]
-  NOTE: regarding the note for version 1.0.5e, the following must also
-    be included in your code:
-        png_text[i].translated_key = NULL;
-  Unknown chunk handling is now supported.
-  Option to eliminate all floating point support was added.  Some new
-    fixed-point functions such as png_set_gAMA_fixed() were added.
-  Expanded tabs and removed trailing blanks in source files.
-version 1.0.5i [December 13, 1999]
-  Added some type casts to silence compiler warnings.
-  Renamed "png_free_spalette" to "png_free_spalettes" for consistency.
-  Removed leading blanks from a #define in pngvcrd.c
-  Added some parameters to the new png_set_keep_unknown_chunks() function.
-  Added a test for up->location != 0 in the first instance of writing
-    unknown chunks in pngwrite.c
-  Changed "num" to "i" in png_free_spalettes() and png_free_unknowns() to
-    prevent recursion.
-  Added png_free_hIST() function.
-  Various patches to fix bugs in the sCAL and integer cHRM processing,
-    and to add some convenience macros for use with sCAL.
-version 1.0.5j [December 21, 1999]
-  Changed "unit" parameter of png_write_sCAL from png_byte to int, to work
-    around buggy compilers.
-  Added new type "png_fixed_point" for integers that hold float*100000 values
-  Restored backward compatibility of tEXt/zTXt chunk processing:
-    Restored the first four members of png_text to the same order as v.1.0.5d.
-    Added members "lang_key" and "itxt_length" to png_text struct.  Set
-    text_length=0 when "text" contains iTXt data.  Use the "compression"
-    member to distinguish among tEXt/zTXt/iTXt types.  Added
-    PNG_ITXT_COMPRESSION_NONE (1) and PNG_ITXT_COMPRESSION_zTXt(2) macros.
-    The "Note" above, about backward incompatibility of libpng-1.0.5e, no
-    longer applies.
-  Fixed png_read|write_iTXt() to read|write parameters in the right order,
-    and to write the iTXt chunk after IDAT if it appears in the end_ptr.
-  Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs)
-  Reversed the order of trying to write floating-point and fixed-point gAMA.
-version 1.0.5k [December 27, 1999]
-  Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))"
-  Added png_handle_as_unknown() function (Glenn)
-  Added png_free_chunk_list() function and chunk_list and num_chunk_list members
-    of png_ptr.
-  Eliminated erroneous warnings about multiple sPLT chunks and sPLT-after-PLTE.
-  Fixed a libpng-1.0.5h bug in pngrutil.c that was issuing erroneous warnings
-    about ignoring incorrect gAMA with sRGB (gAMA was in fact not ignored)
-  Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR).
-  Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is.
-  Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP().
-version 1.0.5l [January 1, 2000]
-  Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr()
-    for setting a callback function to handle unknown chunks and for
-    retrieving the associated user pointer (Glenn).
-version 1.0.5m [January 7, 2000]
-  Added high-level functions png_read_png(), png_write_png(), png_free_pixels().
-version 1.0.5n [January 9, 2000]
-  Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its
-    own memory for info_ptr->palette.  This makes it safe for the calling
-    application to free its copy of the palette any time after it calls
-    png_set_PLTE().
-version 1.0.5o [January 20, 2000]
-  Cosmetic changes only (removed some trailing blanks and TABs)
-version 1.0.5p [January 31, 2000]
-  Renamed pngdll.mak to makefile.bd32
-  Cosmetic changes in pngtest.c
-version 1.0.5q [February 5, 2000]
-  Relocated the makefile.solaris warning about PATH problems.
-  Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg)
-  Revised makefile.gcmmx
-  Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros
-version 1.0.5r [February 7, 2000]
-  Removed superfluous prototype for png_get_itxt from png.h
-  Fixed a bug in pngrtran.c that improperly expanded the background color.
-  Return *num_text=0 from png_get_text() when appropriate, and fix documentation
-    of png_get_text() in libpng.txt/libpng.3.
-version 1.0.5s [February 18, 2000]
-  Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the
-    new error handler that's planned for the next libpng release, and changed
-    example.c, pngtest.c, and contrib programs to use this macro.
-  Revised some of the DLL-export macros in pngconf.h (Greg Roelofs)
-  Fixed a bug in png_read_png() that caused it to fail to expand some images
-    that it should have expanded.
-  Fixed some mistakes in the unused and undocumented INCH_CONVERSIONS functions
-    in pngget.c
-  Changed the allocation of palette, history, and trans arrays back to
-    the version 1.0.5 method (linking instead of copying) which restores
-    backward compatibility with version 1.0.5.  Added some remarks about
-    that in example.c.  Added "free_me" member to info_ptr and png_ptr
-    and added png_free_data() function.
-  Updated makefile.linux and makefile.gccmmx to make directories conditionally.
-  Made cosmetic changes to pngasmrd.h
-  Added png_set_rows() and png_get_rows(), for use with png_read|write_png().
-  Modified png_read_png() to allocate info_ptr->row_pointers only if it
-    hasn't already been allocated.
-version 1.0.5t [March 4, 2000]
-  Changed png_jmp_env() migration aiding macro to png_jmpbuf().
-  Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c
-  Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when
-    PNG_FLAG_HAVE_CHUNK_HEADER was moved into png_ptr->mode in version 1.0.5b
-  Files in contrib/gregbook were revised to use png_jmpbuf() and to select
-    a 24-bit visual if one is available, and to allow abbreviated options.
-  Files in contrib/pngminus were revised to use the png_jmpbuf() macro.
-  Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s
-version 1.0.5u [March 5, 2000]
-  Simplified the code that detects old png.h in png.c and pngtest.c
-  Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp)
-  Increased precision of rgb_to_gray calculations from 8 to 15 bits and
-    added png_set_rgb_to_gray_fixed() function.
-  Added makefile.bc32 (32-bit Borland C++, C mode)
-version 1.0.5v [March 11, 2000]
-  Added some parentheses to the png_jmpbuf macro definition.
-  Updated references to the zlib home page, which has moved to freesoftware.com.
-  Corrected bugs in documentation regarding png_read_row() and png_write_row().
-  Updated documentation of png_rgb_to_gray calculations in libpng.3/libpng.txt.
-  Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3,
-    revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin)
-version 1.0.6 [March 20, 2000]
-  Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c
-  Added makefile.sggcc (SGI IRIX with gcc)
-version 1.0.6d [April 7, 2000]
-  Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO
-  Added data_length parameter to png_decompress_chunk() function
-  Revised documentation to remove reference to abandoned png_free_chnk functions
-  Fixed an error in png_rgb_to_gray_fixed()
-  Revised example.c, usage of png_destroy_write_struct().
-  Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file
-  Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c
-  Simplify png_sig_bytes() function to remove use of non-ISO-C strdup().
-version 1.0.6e [April 9, 2000]
-  Added png_data_freer() function.
-  In the code that checks for over-length tRNS chunks, added check of
-    info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann)
-  Minor revisions of libpng.txt/libpng.3.
-  Check for existing data and free it if the free_me flag is set, in png_set_*()
-    and png_handle_*().
-  Only define PNG_WEIGHTED_FILTERS_SUPPORTED when PNG_FLOATING_POINT_SUPPORTED
-    is defined.
-  Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c
-    and mentioned the purposes of the two macros in libpng.txt/libpng.3.
-version 1.0.6f [April 14, 2000]
-  Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data.
-  Add checks in png_set_text() for NULL members of the input text structure.
-  Revised libpng.txt/libpng.3.
-  Removed superfluous prototype for png_set_itxt from png.h
-  Removed "else" from pngread.c, after png_error(), and changed "0" to "length".
-  Changed several png_errors about malformed ancillary chunks to png_warnings.
-version 1.0.6g [April 24, 2000]
-  Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined.
-  Relocated paragraph about png_set_background() in libpng.3/libpng.txt
-    and other revisions (Matthias Benckmann)
-  Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and
-    png_ptr members to restore binary compatibility with libpng-1.0.5
-    (breaks compatibility with libpng-1.0.6).
-version 1.0.6h [April 24, 2000]
-  Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds
-    libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h)
-    This is a temporary change for test purposes.
-version 1.0.6i [May 2, 2000]
-  Rearranged some members at the end of png_info and png_struct, to put
-    unknown_chunks_num and free_me within the original size of the png_structs
-    and free_me, png_read_user_fn, and png_free_fn within the original png_info,
-    because some old applications allocate the structs directly instead of
-    using png_create_*().
-  Added documentation of user memory functions in libpng.txt/libpng.3
-  Modified png_read_png so that it will use user_allocated row_pointers
-    if present, unless free_me directs that it be freed, and added description
-    of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3.
-  Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version
-    1.00) members of png_struct and png_info, to regain binary compatibility
-    when you define this macro.  Capabilities lost in this event
-    are user transforms (new in version 1.0.0),the user transform pointer
-    (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT,
-    the high-level interface, and unknown chunks support (all new in 1.0.6).
-    This was necessary because of old applications that allocate the structs
-    directly as authors were instructed to do in libpng-0.88 and earlier,
-    instead of using png_create_*().
-  Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which
-    can be used to detect codes that directly allocate the structs, and
-    code to check these modes in png_read_init() and png_write_init() and
-    generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED
-    was not defined.
-  Added makefile.intel and updated makefile.watcom (Pawel Mrochen)
-version 1.0.6j [May 3, 2000]
-  Overloaded png_read_init() and png_write_init() with macros that convert
-    calls to png_read_init_2() or png_write_init_2() that check the version
-    and structure sizes.
-version 1.0.7beta11 [May 7, 2000]
-  Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes
-    which are no longer used.
-  Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is
-    defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXT_SUPPORTED
-    is defined.
-  Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory
-    overrun when old applications fill the info_ptr->text structure directly.
-  Added PNGAPI macro, and added it to the definitions of all exported functions.
-  Relocated version macro definitions ahead of the includes of zlib.h and
-    pngconf.h in png.h.
-version 1.0.7beta12 [May 12, 2000]
-  Revised pngset.c to avoid a problem with expanding the png_debug macro.
-  Deleted some extraneous defines from pngconf.h
-  Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined.
-  Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined.
-  Added png_access_version_number() function.
-  Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data().
-  Expanded libpng.3/libpng.txt information about png_data_freer().
-version 1.0.7beta14 [May 17, 2000] (beta13 was not published)
-  Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as
-    warnings instead of errors, as pngrutil.c does.
-  Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png()
-    will actually write IDATs.
-  Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32.
-  Make png_free_data() ignore its final parameter except when freeing data
-    that can have multiple instances (text, sPLT, unknowns).
-  Fixed a new bug in png_set_rows().
-  Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5.
-  Added png_set_invalid() function.
-  Fixed incorrect illustrations of png_destroy_write_struct() in example.c.
-version 1.0.7beta15 [May 30, 2000]
-  Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce
-    fewer error messages.
-  Rearranged checks for Z_OK to check the most likely path first in pngpread.c
-    and pngwutil.c.
-  Added checks in pngtest.c for png_create_*() returning NULL, and mentioned
-    in libpng.txt/libpng.3 the need for applications to check this.
-  Changed names of png_default_*() functions in pngtest to pngtest_*().
-  Changed return type of png_get_x|y_offset_*() from png_uint_32 to png_int_32.
-  Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c
-  Set each pointer to NULL after freeing it in png_free_data().
-  Worked around a problem in pngconf.h; AIX's strings.h defines an "index"
-    macro that conflicts with libpng's png_color_16.index. (Dimitri Papadapoulos)
-  Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux).
-version 1.0.7beta16 [June 4, 2000]
-  Revised the workaround of AIX string.h "index" bug.
-  Added a check for overlength PLTE chunk in pngrutil.c.
-  Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer
-    indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler.
-  Added a warning in png_decompress_chunk() when it runs out of data, e.g.
-    when it tries to read an erroneous PhotoShop iCCP chunk.
-  Added PNG_USE_DLL macro.
-  Revised the copyright/disclaimer/license notice.
-  Added contrib/msvctest directory
-version 1.0.7rc1 [June 9, 2000]
-  Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA  (0x0400 not 0x0200)
-  Added contrib/visupng directory (Willem van Schaik)
-version 1.0.7beta18 [June 23, 2000]
-  Revised PNGAPI definition, and pngvcrd.c to work with __GCC__
-    and do not redefine PNGAPI if it is passed in via a compiler directive.
-  Revised visupng/PngFile.c to remove returns from within the Try block.
-  Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros.
-  Updated contrib/visupng/cexcept.h to version 1.0.0.
-  Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks.
-version 1.0.7rc2 [June 28, 2000]
-  Updated license to include disclaimers required by UCITA.
-  Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
-version 1.0.7 [July 1, 2000]
-  Revised the definition of "trans_values" in libpng.3/libpng.txt
-version 1.0.8beta1 [July 8, 2000]
-  Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
-  Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
-     pngwutil.c.
-  Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
-  Removed unused "#include <assert.h>" from png.c
-  Added WindowsCE support.
-  Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
-version 1.0.8beta2 [July 10, 2000]
-  Added project files to the wince directory and made further revisions
-     of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE.
-version 1.0.8beta3 [July 11, 2000]
-  Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
-     for indexed-color input files to avoid potential double-freeing trans array
-     under some unusual conditions; problem was introduced in version 1.0.6f.
-  Further revisions to pngtest.c and files in the wince subdirectory.
-version 1.0.8beta4 [July 14, 2000]
-  Added the files pngbar.png and pngbar.jpg to the distribution.
-  Added makefile.cygwin, and cygwin support in pngconf.h
-  Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
-version 1.0.8rc1 [July 16, 2000]
-  Revised png_debug() macros and statements to eliminate compiler warnings.
-version 1.0.8 [July 24, 2000]
-  Added png_flush() in pngwrite.c, after png_write_IEND().
-  Updated makefile.hpux to build a shared library.
-version 1.0.9beta1 [November 10, 2000]
-  Fixed typo in scripts/makefile.hpux
-  Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
-  Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
-  Changed "cdrom.com" in documentation to "libpng.org"
-  Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
-  Changed type of "params" from voidp to png_voidp in png_read|write_png().
-  Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h.
-  Revised the 3 instances of WRITEFILE in pngtest.c.
-  Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory.
-  Updated png.rc in dll/msvc project
-  Revised makefile.dec to define and use LIBPATH and INCPATH
-  Increased size of global png_libpng_ver[] array from 12 to 18 chars.
-  Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const.
-  Removed duplicate png_crc_finish() from png_handle_bKGD() function.
-  Added a warning when application calls png_read_update_info() multiple times.
-  Revised makefile.cygwin
-  Fixed bugs in iCCP support in pngrutil.c and pngwutil.c.
-  Replaced png_set_empty_plte_permitted() with png_permit_mng_features().
-version 1.0.9beta2 [November 19, 2000]
-  Renamed the "dll" subdirectory "projects".
-  Added borland project files to "projects" subdirectory.
-  Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate.
-  Add error message in png_set_compression_buffer_size() when malloc fails.
-version 1.0.9beta3 [November 23, 2000]
-  Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project.
-  Removed the png_flush() in pngwrite.c that crashes some applications
-    that don't set png_output_flush_fn.
-  Added makefile.macosx and makefile.aix to scripts directory.
-version 1.0.9beta4 [December 1, 2000]
-  Change png_chunk_warning to png_warning in png_check_keyword().
-  Increased the first part of msg buffer from 16 to 18 in png_chunk_error().
-version 1.0.9beta5 [December 15, 2000]
-  Added support for filter method 64 (for PNG datastreams embedded in MNG).
-version 1.0.9beta6 [December 18, 2000]
-  Revised png_set_filter() to accept filter method 64 when appropriate.
-  Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to
-    help prevent applications from using MNG features in PNG datastreams.
-  Added png_permit_mng_features() function.
-  Revised libpng.3/libpng.txt.  Changed "filter type" to "filter method".
-version 1.0.9rc1 [December 23, 2000]
-  Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c
-  Fixed error handling of unknown compression type in png_decompress_chunk().
-  In pngconf.h, define __cdecl when _MSC_VER is defined.
-version 1.0.9beta7 [December 28, 2000]
-  Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places.
-  Revised memory management in png_set_hIST and png_handle_hIST in a backward
-    compatible manner.  PLTE and tRNS were revised similarly.
-  Revised the iCCP chunk reader to ignore trailing garbage.
-version 1.0.9beta8 [January 12, 2001]
-  Moved pngasmrd.h into pngconf.h.
-  Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop.
-version 1.0.9beta9 [January 15, 2001]
-  Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to
-    wince and msvc project module definition files.
-  Minor revision of makefile.cygwin.
-  Fixed bug with progressive reading of narrow interlaced images in pngpread.c
-version 1.0.9beta10 [January 16, 2001]
-  Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined.
-  Fixed "png_mmx_supported" typo in project definition files.
-version 1.0.9beta11 [January 19, 2001]
-  Updated makefile.sgi to make shared library.
-  Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED
-    by default, for the benefit of DLL forward compatibility.  These will
-    be re-enabled in version 1.2.0.
-version 1.0.9rc2 [January 22, 2001]
-  Revised cygwin support.
-version 1.0.9 [January 31, 2001]
-  Added check of cygwin's ALL_STATIC in pngconf.h
-  Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos.
-version 1.0.10beta1 [March 14, 2001]
-  Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc.
-  Reformatted libpng.3 to eliminate bad line breaks.
-  Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c
-  Added prototype for png_mmx_support() near the top of pnggccrd.c
-  Moved some error checking from png_handle_IHDR to png_set_IHDR.
-  Added PNG_NO_READ_SUPPORTED and PNG_NO_WRITE_SUPPORTED macros.
-  Revised png_mmx_support() function in pnggccrd.c
-  Restored version 1.0.8 PNG_WRITE_EMPTY_PLTE_SUPPORTED behavior in pngwutil.c
-  Fixed memory leak in contrib/visupng/PngFile.c
-  Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version)
-  Added warnings when retrieving or setting gamma=0.
-  Increased the first part of msg buffer from 16 to 18 in png_chunk_warning().
-version 1.0.10rc1 [March 23, 2001]
-  Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy,
-    and png_strlen.
-  Revised png_mmx_supported() function in pnggccrd.c to return proper value.
-  Fixed bug in progressive reading (pngpread.c) with small images (height < 8).
-version 1.0.10 [March 30, 2001]
-  Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin
-  Added beos project files (Chris Herborth)
-version 1.0.11beta1 [April 3, 2001]
-  Added type casts on several png_malloc() calls (Dimitri Papadapoulos).
-  Removed a no-longer needed AIX work-around from pngconf.h
-  Changed several "//" single-line comments to C-style in pnggccrd.c
-version 1.0.11beta2 [April 11, 2001]
-  Removed PNGAPI from several functions whose prototypes did not have PNGAPI.
-  Updated scripts/pngos2.def
-version 1.0.11beta3 [April 14, 2001]
-  Added checking the results of many instances of png_malloc() for NULL
-version 1.0.11beta4 [April 20, 2001]
-  Undid the changes from version 1.0.11beta3.  Added a check for NULL return
-    from user's malloc_fn().
-  Removed some useless type casts of the NULL pointer.
-  Added makefile.netbsd
-version 1.0.11 [April 27, 2001]
-  Revised makefile.netbsd
-version 1.0.12beta1 [May 14, 2001]
-  Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
-  Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
-  Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
-  Eliminated the png_error about apps using png_read|write_init().  Instead,
-    libpng will reallocate the png_struct and info_struct if they are too small.
-    This retains future binary compatibility for old applications written for
-    libpng-0.88 and earlier.
-version 1.2.0beta1 [May 6, 2001]
-  Bumped DLLNUM to 2.
-  Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
-    by default.
-  Added runtime selection of MMX features.
-  Added png_set_strip_error_numbers function and related macros.
-version 1.2.0beta2 [May 7, 2001]
-  Finished merging 1.2.0beta1 with version 1.0.11
-  Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
-version 1.2.0beta3 [May 17, 2001]
-  Enabled user memory function by default.
-  Modified png_create_struct so it passes user mem_ptr to user memory allocator.
-  Increased png_mng_features flag from png_byte to png_uint_32.
-  Bumped shared-library (so-number) and dll-number to 3.
-version 1.2.0beta4 [June 23, 2001]
-  Check for missing profile length field in iCCP chunk and free chunk_data
-     in case of truncated iCCP chunk.
-  Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
-  Bumped dll-number from 2 to 3 in makefile.cygwin
-  Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
-     if user attempts to run it on an 8-bit display.
-  Updated contrib/gregbook
-  Use png_malloc instead of png_zalloc to allocate palette in pngset.c
-  Updated makefile.ibmc
-  Added some typecasts to eliminate gcc 3.0 warnings.  Changed prototypes
-     of png_write_oFFS width and height from png_uint_32 to png_int_32.
-  Updated example.c
-  Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
-version 1.2.0beta5 [August 8, 2001]
-  Revised contrib/gregbook
-  Revised makefile.gcmmx
-  Revised pnggccrd.c to conditionally compile some thread-unsafe code only
-     when PNG_THREAD_UNSAFE_OK is defined.
-  Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
-     value exceeding 2^bit_depth-1
-  Revised makefile.sgi and makefile.sggcc
-  Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
-  Removed restriction that do_invert_mono only operate on 1-bit opaque files
-version 1.2.0 [September 1, 2001]
-  Changed a png_warning() to png_debug() in pnggccrd.c
-  Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().
-version 1.2.1beta1 [October 19, 2001]
-  Revised makefile.std in contrib/pngminus
-  Include background_1 in png_struct regardless of gamma support.
-  Revised makefile.netbsd and makefile.macosx, added makefile.darwin.
-  Revised example.c to provide more details about using row_callback().
-version 1.2.1beta2 [October 25, 2001]
-  Added type cast to each NULL appearing in a function call, except for
-    WINCE functions.
-  Added makefile.so9.
-version 1.2.1beta3 [October 27, 2001]
-  Removed type casts from all NULLs.
-  Simplified png_create_struct_2().
-version 1.2.1beta4 [November 7, 2001]
-  Revised png_create_info_struct() and png_creat_struct_2().
-  Added error message if png_write_info() was omitted.
-  Type cast NULLs appearing in function calls when _NO_PROTO or
-    PNG_TYPECAST_NULL is defined.
-version 1.2.1rc1 [November 24, 2001]
-  Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL
-    is defined.
-  Changed typecast of "size" argument to png_size_t in pngmem.c calls to
-    the user malloc_fn, to agree with the prototype in png.h
-  Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev)
-  Updated makefile.sgi to recognize LIBPATH and INCPATH.
-  Updated various makefiles so "make clean" does not remove previous major
-    version of the shared library.
-version 1.2.1rc2 [December 4, 2001]
-  Always allocate 256-entry internal palette, hist, and trans arrays, to
-    avoid out-of-bounds memory reference caused by invalid PNG datastreams.
-  Added a check for prefix_length > data_length in iCCP chunk handler.
-version 1.2.1 [December 7, 2001]
-  None.
-version 1.2.2beta1 [February 22, 2002]
-  Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
-  Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
-    libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h
-  Revised makefile.darwin to remove "-undefined suppress" option.
-  Added checks for gamma and chromaticity values over 21474.83, which exceed
-    the limit for PNG unsigned 32-bit integers when encoded.
-  Revised calls to png_create_read_struct() and png_create_write_struct()
-    for simpler debugging.
-  Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
-version 1.2.2beta2 [February 23, 2002]
-  Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths.
-  Check for invalid image dimensions in png_get_IHDR.
-  Added missing "fi;" in the install target of the SGI makefiles.
-  Added install-static to all makefiles that make shared libraries.
-  Always do gamma compensation when image is partially transparent.
-version 1.2.2beta3 [March 7, 2002]
-  Compute background.gray and background_1.gray even when color_type is RGB
-    in case image gets reduced to gray later.
-  Modified shared-library makefiles to install pkgconfig/libpngNN.pc.
-  Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown
-  Removed unused png_write_destroy_info prototype from png.h
-  Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case
-  Added install-shared target to all makefiles that make shared libraries.
-  Stopped a double free of palette, hist, and trans when not using free_me.
-  Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64.
-version 1.2.2beta4 [March 8, 2002]
-  Compute background.gray and background_1.gray even when color_type is RGB
-    in case image gets reduced to gray later (Jason Summers).
-  Relocated a misplaced /bin/rm in the "install-shared" makefile targets
-  Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library.
-version 1.2.2beta5 [March 26, 2002]
-  Added missing PNGAPI to several function definitions.
-  Check for invalid bit_depth or color_type in png_get_IHDR(), and
-    check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen).
-  Revised iTXt support to accept NULL for lang and lang_key.
-  Compute gamma for color components of background even when color_type is gray.
-  Changed "()" to "{}" in scripts/libpng.pc.in.
-  Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN
-  Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so
-version 1.2.2beta6 [March 31, 2002]
-version 1.0.13beta1 [March 31, 2002]
-  Prevent png_zalloc() from trying to memset memory that it failed to acquire.
-  Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate).
-  Ensure that the right function (user or default) is used to free the
-    png_struct after an error in png_create_read_struct_2().
-version 1.2.2rc1 [April 7, 2002]
-version 1.0.13rc1 [April 7, 2002]
-  Save the ebx register in pnggccrd.c (Sami Farin)
-  Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner).
-  Updated makefiles to put headers in include/libpng and remove old include/*.h.
-version 1.2.2 [April 15, 2002]
-version 1.0.13 [April 15, 2002]
-  Revised description of png_set_filter() in libpng.3/libpng.txt.
-  Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd
-version 1.0.13patch01 [April 17, 2002]
-version 1.2.2patch01 [April 17, 2002]
-  Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc
-  Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install
-  Added install: target to makefile.32sunu and makefile.64sunu
-version 1.0.13patch03 [April 18, 2002]
-version 1.2.2patch03 [April 18, 2002]
-  Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng
-  subdirectory to libpngNN subdirectory without the full pathname.
-  Moved generation of libpng.pc from "install" to "all" in 15 makefiles.
-version 1.2.3rc1 [April 28, 2002]
-  Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos).
-  Added $(DESTDIR) feature to 24 makefiles (Tim Mooney)
-  Fixed bug with $prefix, should be $(prefix) in makefile.hpux.
-  Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin
-  Added a link from libpngNN.pc to libpng.pc in 15 makefiles.
-  Added links from include/libpngNN/*.h to include/*.h in 24 makefiles.
-  Revised makefile.darwin to make relative links without full pathname.
-  Added setjmp() at the end of png_create_*_struct_2() in case user forgets
-    to put one in their application.
-  Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and
-    removed them from module definition files.
-version 1.2.3rc2 [May 1, 2002]
-  Fixed bug in reporting number of channels in pngget.c and pngset.c,
-    that was introduced in version 1.2.2beta5.
-  Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(),
-    png_default_flush(), and png_push_fill_buffer() and included them in
-    module definition files.
-  Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles.
-version 1.2.3rc3 [May 1, 2002]
-  Revised prototype for png_default_flush()
-  Remove old libpng.pc and libpngNN.pc before installing new ones.
-version 1.2.3rc4 [May 2, 2002]
-  Typos in *.def files (png_default_read|write -> png_default_read|write_data)
-  In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc
-  Added libpng-config and libpngNN-config and modified makefiles to install them.
-  Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles
-  Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp
-version 1.2.3rc5 [May 11, 2002]
-  Changed "error" and "message" in prototypes to "error_message" and
-    "warning_message" to avoid namespace conflict.
-  Revised 15 makefiles to build libpng-config from libpng-config-*.in
-  Once more restored png_zalloc and png_zfree to regular nonexported form.
-  Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer
-    to nonexported form, but with PNGAPI, and removed them from module def files.
-version 1.2.3rc6 [May 14, 2002]
-  Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c
-  Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp.
-  Removed leftover libpng-config "sed" script from four makefiles.
-  Revised libpng-config creating script in 16 makefiles.
-version 1.2.3 [May 22, 2002]
-  Revised libpng-config target in makefile.cygwin.
-  Removed description of png_set_mem_fn() from documentation.
-  Revised makefile.freebsd.
-  Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR).
-  Revised projects/msvc/README.txt
-  Changed -lpng to -lpngNN in LDFLAGS in several makefiles.
-version 1.2.4beta1 [May 24, 2002]
-  Added libpng.pc and libpng-config to "all:" target in 16 makefiles.
-  Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH)
-  Added missing "\" before closing double quote in makefile.gcmmx.
-  Plugged various memory leaks; added png_malloc_warn() and png_set_text_2()
-    functions.
-version 1.2.4beta2 [June 25, 2002]
-  Plugged memory leak of png_ptr->current_text (Matt Holgate).
-  Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison)
-  Added -soname to the loader flags in makefile.dec, makefile.sgi, and
-    makefile.sggcc.
-  Added "test-installed" target to makefile.linux, makefile.gcmmx,
-    makefile.sgi, and makefile.sggcc.
-version 1.2.4beta3 [June 28, 2002]
-  Plugged memory leak of row_buf in pngtest.c when there is a png_error().
-  Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data.
-  Added "test-installed" target to makefile.32sunu, makefile.64sunu,
-    makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, 
-    makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9.
-version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002]
-  Added "test-installed" target to makefile.cygwin and makefile.sco.
-  Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro.
-version 1.2.4 and 1.0.14 [July 8, 2002]
-  Changed png_warning() to png_error() when width is too large to process.
-version 1.2.4patch01 [July 20, 2002]
-  Revised makefile.cygwin to use DLL number 12 instead of 13.
-version 1.2.5beta1 [August 6, 2002]
-  Added code to contrib/gregbook/readpng2.c to ignore unused chunks.
-  Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11)
-  Removed some stray *.o files from contrib/gregbook.
-  Changed png_error() to png_warning() about "Too much data" in pngpread.c
-    and about "Extra compressed data" in pngrutil.c.
-  Prevent png_ptr->pass from exceeding 7 in png_push_finish_row().
-  Updated makefile.hpgcc
-  Updated png.c and pnggccrd.c handling of return from png_mmx_support()
-version 1.2.5beta2 [August 15, 2002]
-  Only issue png_warning() about "Too much data" in pngpread.c when avail_in
-    is nonzero.
-  Updated makefiles to install a separate libpng.so.3 with its own rpath.
-version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002]
-  Revised makefiles to not remove previous minor versions of shared libraries.
-version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002]
-  Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared
-    library loader directive.
-  Added missing "$OBJSDLL" line to makefile.gcmmx.
-  Added missing "; fi" to makefile.32sunu.
-version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002]
-  Revised libpng-config script.
-version 1.2.5 and 1.0.15 [October 3, 2002]
-  Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux,
-    and makefile.aix.
-  Relocated two misplaced PNGAPI lines in pngtest.c
-version 1.2.6beta1 [October 22, 2002]
-  Commented out warning about uninitialized mmx_support in pnggccrd.c.
-  Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h.
-  Relocated two more misplaced PNGAPI lines in pngtest.c
-  Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams,
-    introduced in version 1.0.2.
-  Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu.
-version 1.2.6beta2 [November 1, 2002]
-  Added libpng-config "--ldopts" output.
-  Added "AR=ar" and "ARFLAGS=rc" and changed "ar rc" to "$(AR) $(ARFLAGS)"
-    in makefiles.
-version 1.2.6beta3 [July 18, 2004]
-  Reverted makefile changes from version 1.2.6beta2 and some of the changes
-    from version 1.2.6beta1; these will be postponed until version 1.2.7.
-    Version 1.2.6 is going to be a simple bugfix release.
-  Changed the one instance of "ln -sf" to "ln -f -s" in each Sun makefile.
-  Fixed potential overrun in pngerror.c by using strncpy instead of memcpy.
-  Added "#!/bin/sh" at the top of configure, for recognition of the
-    'x' flag under Cygwin (Cosmin).
-  Optimized vacuous tests that silence compiler warnings, in png.c (Cosmin).
-  Added support for PNG_USER_CONFIG, in pngconf.h (Cosmin).
-  Fixed the special memory handler for Borland C under DOS, in pngmem.c
-    (Cosmin).
-  Removed some spurious assignments in pngrutil.c (Cosmin).
-  Replaced 65536 with 65536L, and 0xffff with 0xffffL, to silence warnings
-    on 16-bit platforms (Cosmin).
-  Enclosed shift op expressions in parentheses, to silence warnings (Cosmin).
-  Used proper type png_fixed_point, to avoid problems on 16-bit platforms,
-    in png_handle_sRGB() (Cosmin).
-  Added compression_type to png_struct, and optimized the window size
-    inside the deflate stream (Cosmin).
-  Fixed definition of isnonalpha(), in pngerror.c and pngrutil.c (Cosmin).
-  Fixed handling of unknown chunks that come after IDAT (Cosmin).
-  Allowed png_error() and png_warning() to work even if png_ptr == NULL
-    (Cosmin).
-  Replaced row_info->rowbytes with row_bytes in png_write_find_filter()
-    (Cosmin).
-  Fixed definition of PNG_LIBPNG_VER_DLLNUM (Simon-Pierre).
-  Used PNG_LIBPNG_VER and PNG_LIBPNG_VER_STRING instead of the hardcoded
-    values in png.c (Simon-Pierre, Cosmin).
-  Initialized png_libpng_ver[] with PNG_LIBPNG_VER_STRING (Simon-Pierre).
-  Replaced PNG_LIBPNG_VER_MAJOR with PNG_LIBPNG_VER_DLLNUM in png.rc
-    (Simon-Pierre).
-  Moved the definition of PNG_HEADER_VERSION_STRING near the definitions
-    of the other PNG_LIBPNG_VER_... symbols in png.h (Cosmin).
-  Relocated #ifndef PNGAPI guards in pngconf.h (Simon-Pierre, Cosmin).
-  Updated scripts/makefile.vc(a)win32 (Cosmin).
-  Updated the MSVC project (Simon-Pierre, Cosmin).
-  Updated the Borland C++ Builder project (Cosmin).
-  Avoided access to asm_flags in pngvcrd.c, if PNG_1_0_X is defined (Cosmin).
-  Commented out warning about uninitialized mmx_support in pngvcrd.c (Cosmin).
-  Removed scripts/makefile.bd32 and scripts/pngdef.pas (Cosmin).
-  Added extra guard around inclusion of Turbo C memory headers, in pngconf.h
-    (Cosmin).
-  Renamed projects/msvc/ to projects/visualc6/, and projects/borland/ to
-    projects/cbuilder5/ (Cosmin).
-  Moved projects/visualc6/png32ms.def to scripts/pngw32.def,
-    and projects/visualc6/png.rc to scripts/pngw32.rc (Cosmin).
-  Added projects/visualc6/pngtest.dsp; removed contrib/msvctest/ (Cosmin).
-  Changed line endings to DOS style in cbuilder5 and visualc6 files, even
-    in the tar.* distributions (Cosmin).
-  Updated contrib/visupng/VisualPng.dsp (Cosmin).
-  Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin).
-  Added a separate distribution with "configure" and supporting files (Junichi).
-version 1.2.6beta4 [July 28, 2004]
-  Added user ability to change png_size_t via a PNG_SIZE_T macro.
-  Added png_sizeof() and png_convert_size() functions.
-  Added PNG_SIZE_MAX (maximum value of a png_size_t variable.
-  Added check in png_malloc_default() for (size_t)size != (png_uint_32)size
-    which would indicate an overflow.
-  Changed sPLT failure action from png_error to png_warning and abandon chunk.
-  Changed sCAL and iCCP failures from png_error to png_warning and abandon.
-  Added png_get_uint_31(png_ptr, buf) function.
-  Added PNG_UINT_32_MAX macro.
-  Renamed PNG_MAX_UINT to PNG_UINT_31_MAX.
-  Made png_zalloc() issue a png_warning and return NULL on potential
-    overflow.
-  Turn on PNG_NO_ZALLOC_ZERO by default in version 1.2.x
-  Revised "clobber list" in pnggccrd.c so it will compile under gcc-3.4.
-  Revised Borland portion of png_malloc() to return NULL or issue
-    png_error() according to setting of PNG_FLAG_MALLOC_NULL_MEM_OK.
-  Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove
-    sequential read support.
-  Added some "#if PNG_WRITE_SUPPORTED" blocks.
-  #ifdef'ed out some redundancy in png_malloc_default().
-  Use png_malloc instead of png_zalloc to allocate the pallete.
-version 1.2.6rc1 [August 4, 2004]
-  Fixed buffer overflow vulnerability in png_handle_tRNS()
-  Fixed integer arithmetic overflow vulnerability in png_read_png().
-  Fixed some harmless bugs in png_handle_sBIT, etc, that would cause
-    duplicate chunk types to go undetected.
-  Fixed some timestamps in the -config version
-  Rearranged order of processing of color types in png_handle_tRNS().
-  Added ROWBYTES macro to calculate rowbytes without integer overflow.
-  Updated makefile.darwin and removed makefile.macosx from scripts directory.
-  Imposed default one million column, one-million row limits on the image
-    dimensions, and added png_set_user_limits() function to override them.
-  Revised use of PNG_SET_USER_LIMITS_SUPPORTED macro.
-  Fixed wrong cast of returns from png_get_user_width|height_max().
-  Changed some "keep the compiler happy" from empty statements to returns,
-version 1.2.6rc2 [August 7, 2004]
-  Revised makefile.darwin and makefile.solaris.  Removed makefile.macosx.
-  Revised pngtest's png_debug_malloc() to use png_malloc() instead of
-    png_malloc_default() which is not supposed to be exported.
-  Fixed off-by-one error in one of the conversions to PNG_ROWBYTES() in
-    pngpread.c.  Bug was introduced in 1.2.6rc1.
-  Fixed bug in RGB to RGBX transformation introduced in 1.2.6rc1.
-  Fixed old bug in RGB to Gray transformation.
-  Fixed problem with 64-bit compilers by casting arguments to abs()
-    to png_int_32.
-  Changed "ln -sf" to "ln -f -s" in three makefiles (solaris, sco, so9).
-  Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin)
-  Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles.
-  Added code to update the row_info->colortype in png_do_read_filler() (MSB).
-version 1.2.6rc3 [August 9, 2004]
-  Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid
-    trouble with some 64-bit compilers.  Created PNG_OUT_OF_RANGE() macro.
-  Revised documentation of png_set_keep_unknown_chunks().
-  Check handle_as_unknown status in pngpread.c, as in pngread.c previously.
-  Moved  "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h
-  Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c
-version 1.2.6rc4 [August 10, 2004]
-  Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of
-    "pinfo" was out of place).
-version 1.2.6rc5 [August 10, 2004]
-  Moved  "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
-     section of png.h where they were inadvertently placed in version rc3.
-
-Send comments/corrections/commendations to
-png-implement at ccrc.wustl.edu or to glennrp at users.sourceforge.net
-
-Glenn R-P
diff --git a/tkimg1.3/libpng/INSTALL b/tkimg1.3/libpng/INSTALL
deleted file mode 100644
index ca85169..0000000
--- a/tkimg1.3/libpng/INSTALL
+++ /dev/null
@@ -1,160 +0,0 @@
-
-Installing libpng version 1.2.6rc5 - August 10, 2004
-
-Before installing libpng, you must first install zlib.  zlib
-can usually be found wherever you got libpng.  zlib can be
-placed in another directory, at the same level as libpng.
-Note that your system might already have a preinstalled
-zlib, but you will still need to have access to the
-zlib.h and zconf.h include files that correspond to the
-version of zlib that's installed.
-
-You can rename the directories that you downloaded (they
-might be called "libpng-1.2.6rc5" or "lpng109" and "zlib-1.1.3"
-or "zlib113") so that you have directories called "zlib" and "libpng".
-
-Your directory structure should look like this:
-
-   ..       (the parent directory)
-      libpng  (this directory)
-          INSTALL (this file)
-          README
-          *.h
-          *.c
-          contrib
-             gregbook
-             msvctest
-             pngminus
-             pngsuite
-             visupng
-          projects
-             beos
-             borland
-             msvc
-             netware.txt
-             wince.txt
-          scripts
-             makefile.*
-          pngtest.png
-          etc.
-      zlib
-          README
-          *.h
-          *.c
-          contrib
-          etc.
-
-If the line endings in the files look funny, you may wish to get the other
-distribution of libpng.  It is available in both tar.gz (UNIX style line
-endings) and zip (DOS style line endings) formats.
-
-If you are building libpng with MSVC, you can enter the libpng\msvc directory
-and follow the instructions in msvc\README.txt.
-
-You can build libpng for WindowsCE by entering the downloading and installing
-the libpng\wince directory as instructed in the projects\wince.txt file, and
-then following the instructions in the README* files.  Similarly, you can
-build libpng for Netware as instructed in projects\netware.txt.
-
-Else enter the zlib directory and follow the instructions in zlib/README,
-then come back here and choose the appropriate makefile.sys in the scripts
-directory.
-
-The files that are presently available in the scripts directory
-include
-
- makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
- makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.6rc5)
- makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.6rc5,
-                       uses assembler code tuned for Intel MMX platform)
- makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
- makefile.knr      =>  Archaic UNIX Makefile that converts files with
-                       ansi2knr (Requires ansi2knr.c from
-                       ftp://ftp.cs.wisc.edu/ghost)
- makefile.aix      =>  AIX/gcc makefile
- makefile.cygwin   =>  Cygwin/gcc makefile
- makefile.darwin   =>  Darwin makefile, can use on MacosX
- makefile.dec      =>  DEC Alpha UNIX makefile
- makefile.hpgcc    =>  FreeBSD makefile
- makefile.hpgcc    =>  HPUX makefile using gcc
- makefile.hpux     =>  HPUX (10.20 and 11.00) makefile
- makefile.ibmc     =>  IBM C/C++ version 3.x for Win32 and OS/2 (static)
- makefile.intel    =>  Intel C/C++ version 4.0 and later
- libpng.icc        =>  Project file for IBM VisualAge/C++ version 4.0 or later
- makefile.netbsd   =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
- makefile.ne0bsd  =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so
- makefile.openbsd  =>  OpenBSD makefile
- makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng12.so.0.1.2.6rc5)
- makefile.sunos    =>  Sun makefile
- makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.6rc5)
- makefile.so9      =>  Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.6rc5)
- makefile.32sunu   =>  Sun Ultra 32-bit makefile
- makefile.64sunu   =>  Sun Ultra 64-bit makefile
- makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
- makefile.mips     =>  MIPS makefile
- makefile.acorn    =>  Acorn makefile
- makefile.amiga    =>  Amiga makefile
- smakefile.ppc     =>  AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
-                       (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
- makefile.atari    =>  Atari makefile
- makefile.beos     =>  BEOS makefile for X86
- makefile.bor      =>  Borland makefile (uses bcc)
- makefile.bc32     =>  32-bit Borland C++ (all modules compiled in C mode)
- makefile.bd32     =>  To make a png32bd.dll with Borland C++ 4.5
- makefile.tc3      =>  Turbo C 3.0 makefile
- makefile.dj2      =>  DJGPP 2 makefile
- makefile.msc      =>  Microsoft C makefile
- makefile.vcawin32 =>  makefile for Microsoft Visual C++ 5.0 and later (uses
-                       assembler code tuned for Intel MMX platform)
- makefile.vcwin32  =>  makefile for Microsoft Visual C++ 4.0 and later (does
-                       not use assembler code)
- makefile.os2      =>  OS/2 Makefile (gcc and emx, requires pngos2.def)
- pngos2.def        =>  OS/2 module definition file used by makefile.os2
- makefile.watcom   =>  Watcom 10a+ Makefile, 32-bit flat memory model
- makevms.com       =>  VMS build script
- descrip.mms       =>  VMS makefile for MMS or MMK
- pngdef.pas        =>  Defines for a png32bd.dll with Borland C++ 4.5
- SCOPTIONS.ppc     =>  Used with smakefile.ppc
-
-Copy the file (or files) that you need from the
-scripts directory into this directory, for example
-
-   MSDOS example: copy scripts\makefile.msc makefile
-   UNIX example:    cp scripts/makefile.std makefile
-
-Read the makefile to see if you need to change any source or
-target directories to match your preferences.
-
-Then read pngconf.h to see if you want to make any configuration
-changes.
-
-Then just run "make test" which will create the libpng library in
-this directory and run a quick test that reads the "pngtest.png"
-file and writes a "pngout.png" file that should be identical to it.
-Look for "9782 zero samples" in the output of the test.  For more
-confidence, you can run another test by typing "pngtest pngnow.png"
-and looking for "289 zero samples" in the output.  Also, you can
-run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare
-your output with the result shown in contrib/pngsuite/README.
-
-Most of the makefiles will allow you to run "make install" to
-put the library in its final resting place (if you want to
-do that, run "make install" in the zlib directory first if necessary).
-Some also allow you to run "make test-installed" after you have
-run "make install".
-
-If you encounter a compiler error message complaining about the
-lines
-      __png.h__ already includes setjmp.h;
-      __dont__ include it again.;
-This means you have compiled another module that includes setjmp.h,
-which is hazardous because the two modules might not include exactly
-the same setjmp.h.  If you are sure that you know what you are doing
-and that they are exactly the same, then you can comment out or
-delete the two lines.  Better yet, use the cexcept interface
-instead, as demonstrated in contrib/visupng of the libpng distribution.
-
-Further information can be found in the README and libpng.txt
-files, in the individual makefiles, in png.h, and the manual pages
-libpng.3 and png.5.
diff --git a/tkimg1.3/libpng/KNOWNBUG b/tkimg1.3/libpng/KNOWNBUG
deleted file mode 100644
index 192c27f..0000000
--- a/tkimg1.3/libpng/KNOWNBUG
+++ /dev/null
@@ -1,11 +0,0 @@
-
-Known bugs in libpng version 1.2.6rc5
-
-1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
-   reading interlaced PNG files, when assembler code is enabled but running
-   on a non-MMX i386 platform.
-
-   STATUS: Under investigation.  The change to pnggccrd.c in libpng-1.2.1
-   fixed a problem under FreeBSD but not the problem with NetBSD, which
-   still fails as of libpng-1.2.2rc1.
-
diff --git a/tkimg1.3/libpng/LICENSE b/tkimg1.3/libpng/LICENSE
deleted file mode 100644
index b7f9999..0000000
--- a/tkimg1.3/libpng/LICENSE
+++ /dev/null
@@ -1,109 +0,0 @@
-
-This copy of the libpng notices is provided for your convenience.  In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-libpng version 1.2.6, August 10, 2004, is
-Copyright (c) 2004 Glenn Randers-Pehrson, and is
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
-   Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
-
-   Simon-Pierre Cadieux
-   Eric S. Raymond
-   Gilles Vollant
-
-and with the following additions to the disclaimer:
-
-   There is no warranty against interference with your enjoyment of the
-   library or against infringement.  There is no warranty that our
-   efforts or the library will fulfill any of your particular purposes
-   or needs.  This library is provided with all faults, and the entire
-   risk of satisfactory quality, performance, accuracy, and effort is with
-   the user.
-
-libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
-
-   Tom Lane
-   Glenn Randers-Pehrson
-   Willem van Schaik
-
-libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
-
-   John Bowler
-   Kevin Bracey
-   Sam Bushell
-   Magnus Holmgren
-   Greg Roelofs
-   Tom Tanner
-
-libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
-
-For the purposes of this copyright and license, "Contributing Authors"
-is defined as the following set of individuals:
-
-   Andreas Dilger
-   Dave Martindale
-   Guy Eric Schalnat
-   Paul Schmidt
-   Tim Wegner
-
-The PNG Reference Library is supplied "AS IS".  The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose.  The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-source code, or portions hereof, for any purpose, without fee, subject
-to the following restrictions:
-
-1. The origin of this source code must not be misrepresented.
-
-2. Altered versions must be plainly marked as such and must not
-   be misrepresented as being the original source.
-
-3. This Copyright notice may not be removed or altered from any
-   source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products.  If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
-   printf("%s",png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-
-Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
-
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-August 10, 2004
diff --git a/tkimg1.3/libpng/README b/tkimg1.3/libpng/README
deleted file mode 100644
index 7fa1822..0000000
--- a/tkimg1.3/libpng/README
+++ /dev/null
@@ -1,269 +0,0 @@
-README for libpng version 1.2.6rc5 - August 10, 2004 (shared library 12.0)
-See the note about version numbers near the top of png.h
-
-See INSTALL for instructions on how to install libpng.
-
-Libpng comes in several distribution formats.  Get libpng-*.tar.gz
-or libpng-*.tar.bz2 if you want UNIX-style line endings in the text
-files, or lpng*.zip if you want DOS-style line endings.
-
-Version 0.89 was the first official release of libpng.  Don't let the
-fact that it's the first release fool you.  The libpng library has been in
-extensive use and testing since mid-1995.  By late 1997 it had
-finally gotten to the stage where there hadn't been significant
-changes to the API in some time, and people have a bad feeling about
-libraries with versions < 1.0.  Version 1.0.0 was released in
-March 1998.
-
-****
-Note that some of the changes to the png_info structure render this
-version of the library binary incompatible with libpng-0.89 or
-earlier versions if you are using a shared library.  The type of the
-"filler" parameter for png_set_filler() has changed from png_byte to
-png_uint_32, which will affect shared-library applications that use
-this function.
-
-To avoid problems with changes to the internals of png_info_struct,
-new APIs have been made available in 0.95 to avoid direct application
-access to info_ptr.  These functions are the png_set_<chunk> and
-png_get_<chunk> functions.  These functions should be used when
-accessing/storing the info_struct data, rather than manipulating it
-directly, to avoid such problems in the future.
-
-It is important to note that the APIs do not make current programs
-that access the info struct directly incompatible with the new
-library.  However, it is strongly suggested that new programs use
-the new APIs (as shown in example.c and pngtest.c), and older programs
-be converted to the new format, to facilitate upgrades in the future.
-****
-
-Additions since 0.90 include the ability to compile libpng as a
-Windows DLL, and new APIs for accessing data in the info struct.
-Experimental functions include the ability to set weighting and cost
-factors for row filter selection, direct reads of integers from buffers
-on big-endian processors that support misaligned data access, faster
-methods of doing alpha composition, and more accurate 16->8 bit color
-conversion.
-
-The additions since 0.89 include the ability to read from a PNG stream
-which has had some (or all) of the signature bytes read by the calling
-application.  This also allows the reading of embedded PNG streams that
-do not have the PNG file signature.  As well, it is now possible to set
-the library action on the detection of chunk CRC errors.  It is possible
-to set different actions based on whether the CRC error occurred in a
-critical or an ancillary chunk.
-
-The changes made to the library, and bugs fixed are based on discussions
-on the PNG implementation mailing list <png-implement at ccrc.wustl.edu>
-and not on material submitted privately to Guy, Andreas, or Glenn.  They will
-forward any good suggestions to the list.
-
-For a detailed description on using libpng, read libpng.txt.  For
-examples of libpng in a program, see example.c and pngtest.c.  For usage
-information and restrictions (what little they are) on libpng, see
-png.h.  For a description on using zlib (the compression library used by
-libpng) and zlib's restrictions, see zlib.h
-
-I have included a general makefile, as well as several machine and
-compiler specific ones, but you may have to modify one for your own needs.
-
-You should use zlib 1.0.4 or later to run this, but it MAY work with
-versions as old as zlib 0.95.  Even so, there are bugs in older zlib
-versions which can cause the output of invalid compression streams for
-some images.  You will definitely need zlib 1.0.4 or later if you are
-taking advantage of the MS-DOS "far" structure allocation for the small
-and medium memory models.  You should also note that zlib is a
-compression library that is useful for more things than just PNG files.
-You can use zlib as a drop-in replacement for fread() and fwrite() if
-you are so inclined.
-
-zlib should be available at the same place that libpng is.
-If not, it should be at ftp.uu.net in /graphics/png
-Eventually, it will be at ftp.uu.net in /pub/archiving/zip/zlib
-
-You may also want a copy of the PNG specification.  It is available
-as an RFC and a W3C Recommendation.  Failing
-these resources you can try ftp.uu.net in the /graphics/png directory.
-
-This code is currently being archived at ftp.uu.net in the
-/graphics/png directory, and on CompuServe, Lib 20 (PNG SUPPORT)
-at GO GRAPHSUP.  If you can't find it in any of those places,
-e-mail me, and I'll help you find it.
-
-If you have any code changes, requests, problems, etc., please e-mail
-them to me.  Also, I'd appreciate any make files or project files,
-and any modifications you needed to make to get libpng to compile,
-along with a #define variable to tell what compiler/system you are on.
-If you needed to add transformations to libpng, or wish libpng would
-provide the image in a different way, drop me a note (and code, if
-possible), so I can consider supporting the transformation.
-Finally, if you get any warning messages when compiling libpng
-(note: not zlib), and they are easy to fix, I'd appreciate the
-fix.  Please mention "libpng" somewhere in the subject line.  Thanks.
-
-This release was created and will be supported by myself (of course
-based in a large way on Guy's and Andreas' earlier work), and the PNG group.
-
-glennrp at users.sourceforge.net
-png-implement at ccrc.wustl.edu
-
-You can't reach Guy, the original libpng author, at the addresses
-given in previous versions of this document.  He and Andreas will read mail
-addressed to the png-implement list, however.
-
-Please do not send general questions about PNG.  Send them to
-the address in the specification (png-group at w3.org).  At the same
-time, please do not send libpng questions to that address, send them to me
-or to png-implement at ccrc.wustl.edu.  I'll
-get them in the end anyway.  If you have a question about something
-in the PNG specification that is related to using libpng, send it
-to me.  Send me any questions that start with "I was using libpng,
-and ...".  If in doubt, send questions to me.  I'll bounce them
-to others, if necessary.
-
-Please do not send suggestions on how to change PNG.  We have
-been discussing PNG for three years now, and it is official and
-finished.  If you have suggestions for libpng, however, I'll
-gladly listen.  Even if your suggestion is not used for version
-1.0, it may be used later.
-
-Files in this distribution:
-
-      ANNOUNCE      =>  Announcement of this version, with recent changes
-      CHANGES       =>  Description of changes between libpng versions
-      KNOWNBUG      =>  List of known bugs and deficiencies
-      LICENSE       =>  License to use and redistribute libpng
-      README        =>  This file
-      TODO          =>  Things not implemented in the current library
-      Y2KINFO       =>  Statement of Y2K compliance
-      example.c     =>  Example code for using libpng functions
-      libpng.3      =>  manual page for libpng (includes libpng.txt)
-      libpng.txt    =>  Description of libpng and its functions
-      libpngpf.3    =>  manual page for libpng's private functions
-      png.5         =>  manual page for the PNG format
-      png.c         =>  Basic interface functions common to library
-      png.h         =>  Library function and interface declarations
-      pngconf.h     =>  System specific library configuration
-      pngasmrd.h    =>  Header file for assembler-coded functions
-      pngerror.c    =>  Error/warning message I/O functions
-      pngget.c      =>  Functions for retrieving info from struct
-      pngmem.c      =>  Memory handling functions
-      pngbar.png    =>  PNG logo, 88x31
-      pngnow.png    =>  PNG logo, 98x31
-      pngpread.c    =>  Progressive reading functions
-      pngread.c     =>  Read data/helper high-level functions
-      pngrio.c      =>  Lowest-level data read I/O functions
-      pngrtran.c    =>  Read data transformation functions
-      pngrutil.c    =>  Read data utility functions
-      pngset.c      =>  Functions for storing data into the info_struct
-      pngtest.c     =>  Library test program
-      pngtest.png   =>  Library test sample image
-      pngtrans.c    =>  Common data transformation functions
-      pngwio.c      =>  Lowest-level write I/O functions
-      pngwrite.c    =>  High-level write functions
-      pngwtran.c    =>  Write data transformations
-      pngwutil.c    =>  Write utility functions
-      contrib       =>  Contributions
-       gregbook         =>  source code for PNG reading and writing, from
-                            Greg Roelofs' "PNG: The Definitive Guide",
-                            O'Reilly, 1999
-       msvctest     =>  Builds and runs pngtest using a MSVC workspace
-       pngminus     =>  Simple pnm2png and png2pnm programs
-       pngsuite     =>  Test images
-       visupng      =>  Contains a MSVC workspace for VisualPng
-      projects      =>  Contains project files and workspaces for building DLL
-       beos             =>  Contains a Beos workspace for building libpng
-       borland          =>  Contains a Borland workspace for building libpng
-                            and zlib
-       msvc             =>  Contains a Microsoft Visual C++ (MSVC) workspace
-                            for building libpng and zlib
-       netware.txt      =>  Contains instructions for downloading a set of
-                            project files for building libpng and zlib on
-                            Netware.
-       wince.txt        =>  Contains instructions for downloading a Microsoft
-                            Visual C++ (Windows CD Toolkit) workspace for
-                            building libpng and zlib on WindowsCE
-      scripts       =>  Directory containing scripts for building libpng:
-       descrip.mms      =>  VMS makefile for MMS or MMK
-       makefile.std     =>  Generic UNIX makefile (cc, creates static libpng.a)
-       makefile.linux   =>  Linux/ELF makefile
-                            (gcc, creates libpng12.so.0.1.2.5)
-       makefile.gcmmx   =>  Linux/ELF makefile (gcc, creates
-                            libpng12.so.0.1.2.5, uses assembler code
-                            tuned for Intel MMX platform)
-       makefile.gcc     =>  Generic makefile (gcc, creates static libpng.a)
-       makefile.knr     =>  Archaic UNIX Makefile that converts files with
-                            ansi2knr (Requires ansi2knr.c from
-                            ftp://ftp.cs.wisc.edu/ghost)
-       makefile.aix     =>  AIX makefile
-       makefile.cygwin  =>  Cygwin/gcc makefile
-       makefile.darwin  =>  Darwin makefile
-       makefile.dec     =>  DEC Alpha UNIX makefile
-       makefile.freebsd =>  FreeBSD makefile
-       makefile.hpgcc   =>  HPUX makefile using gcc
-       makefile.hpux    =>  HPUX (10.20 and 11.00) makefile
-       makefile.ibmc    =>  IBM C/C++ version 3.x for Win32 and OS/2 (static)
-       makefile.intel   =>  Intel C/C++ version 4.0 and later
-       libpng.icc       =>  Project file, IBM VisualAge/C++ 4.0 or later
-       makefile.macosx  =>  MACOS X Makefile
-       makefile.netbsd  =>  NetBSD/cc makefile, PNGGCCRD, makes libpng.so.
-       makefile.ne0bsd =>  NetBSD/cc makefile, PNGGCCRD, makes libpng0.so
-       makefile.openbsd =>  OpenBSD makefile
-       makefile.sgi     =>  Silicon Graphics IRIX (cc, creates static lib)
-       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng12.so.0.1.2.5)
-       makefile.sunos   =>  Sun makefile
-       makefile.solaris =>  Solaris 2.X makefile
-                            (gcc, creates libpng12.so.0.1.2.5)
-       makefile.so9     =>  Solaris 9 makefile
-                            (gcc, creates libpng12.so.0.1.2.5)
-       makefile.32sunu  =>  Sun Ultra 32-bit makefile
-       makefile.64sunu  =>  Sun Ultra 64-bit makefile
-       makefile.sco     =>  For SCO OSr5  ELF and Unixware 7 with Native cc
-       makefile.mips    =>  MIPS makefile
-       makefile.acorn   =>  Acorn makefile
-       makefile.amiga   =>  Amiga makefile
-       smakefile.ppc    =>  AMIGA smakefile for SAS C V6.58/7.00 PPC
-                            compiler (Requires SCOPTIONS, copied from
-                            scripts/SCOPTIONS.ppc)
-       makefile.atari   =>  Atari makefile
-       makefile.beos    =>  BEOS makefile for X86
-       makefile.bor     =>  Borland makefile (uses bcc)
-       makefile.bc32    =>  32-bit Borland C++ (all modules compiled in C mode)
-       makefile.bd32    =>  To make a png32bd.dll with Borland C++ 4.5
-       makefile.tc3     =>  Turbo C 3.0 makefile
-       makefile.dj2     =>  DJGPP 2 makefile
-       makefile.msc     =>  Microsoft C makefile
-       makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and
-                            later (uses assembler code tuned for Intel MMX
-                            platform)
-       makefile.vcwin32 =>  makefile for Microsoft Visual C++ 4.0 and
-                            later (does not use assembler code)
-       makefile.os2     =>  OS/2 Makefile (gcc and emx, requires pngos2.def)
-       pngos2.def       =>  OS/2 module definition file used by makefile.os2
-       makefile.watcom  =>  Watcom 10a+ Makefile, 32-bit flat memory model
-       makevms.com      =>  VMS build script
-       pngdef.pas       =>  Defines for a png32bd.dll with Borland C++ 4.5
-       SCOPTIONS.ppc    =>  Used with smakefile.ppc
-      mangle        =>  Directory containing scripts to build libpng12m.so:
-       mangle.in        =>  Function-decoration macros added to png.h by the
-                            makefiles.
-       makefile.linux   =>  Linux/ELF makefile
-                            (gcc, creates libpng12m.so.0.1.2.5)
-       makefile.gcmmx   =>  Linux/ELF makefile (gcc, creates
-                            libpng12.so.0m.1.2.5, uses assembler code
-                            tuned for Intel MMX platform)
-       makefile.sgi     =>  Silicon Graphics (cc, creates libpng12m.so)
-       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng12m.so)
-
-Good luck, and happy coding.
-
--Glenn Randers-Pehrson
- Internet: randeg at alum.rpi.edu
-
--Andreas Eric Dilger
- Internet: adilger at enel.ucalgary.ca
- Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
-
--Guy Eric Schalnat
- (formerly of Group 42, Inc)
- Internet: gschal at infinet.com
diff --git a/tkimg1.3/libpng/TODO b/tkimg1.3/libpng/TODO
deleted file mode 100644
index a5f6395..0000000
--- a/tkimg1.3/libpng/TODO
+++ /dev/null
@@ -1,24 +0,0 @@
-TODO - list of things to do for libpng:
-
-Final bug fixes.
-Improve API by hiding the png_struct and png_info structs.
-Finish work on the no-floating-point version (including gamma compensation)
-Better C++ wrapper/full C++ implementation?
-Fix problem with C++ and EXTERN "C".
-cHRM transformation.
-Improve setjmp/longjmp usage or remove it in favor of returning error codes.
-Add "grayscale->palette" transformation and "palette->grayscale" detection.
-Improved dithering.
-Multi-lingual error and warning message support.
-Complete sRGB transformation (presently it simply uses gamma=0.45455).
-Man pages for function calls.
-Better documentation.
-Better filter selection
-   (counting huffman bits/precompression?  filter inertia?  filter costs?).
-Histogram creation.
-Text conversion between different code pages (Latin-1 -> Mac and DOS).
-Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety?
-Build gamma tables using fixed point (and do away with floating point entirely).
-Use greater precision when changing to linear gamma for compositing against
-  background and doing rgb-to-gray transformation.
-Investigate pre-incremented loop counters and other loop constructions.
diff --git a/tkimg1.3/libpng/Y2KINFO b/tkimg1.3/libpng/Y2KINFO
deleted file mode 100644
index f34fa87..0000000
--- a/tkimg1.3/libpng/Y2KINFO
+++ /dev/null
@@ -1,55 +0,0 @@
-   Y2K compliance in libpng:
-   =========================
-
-      August 10, 2004
-
-      Since the PNG Development group is an ad-hoc body, we can't make
-      an official declaration.
-
-      This is your unofficial assurance that libpng from version 0.71 and
-      upward through 1.2.6rc5 are Y2K compliant.  It is my belief that earlier
-      versions were also Y2K compliant.
-
-      Libpng only has three year fields.  One is a 2-byte unsigned integer
-      that will hold years up to 65535.  The other two hold the date in text
-      format, and will hold years up to 9999.
-
-      The integer is
-          "png_uint_16 year" in png_time_struct.
-
-      The strings are
-          "png_charp time_buffer" in png_struct and
-          "near_time_buffer", which is a local character string in png.c.
-
-      There are seven time-related functions:
-
-          png_convert_to_rfc_1123() in png.c
-            (formerly png_convert_to_rfc_1152() in error)
-          png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
-          png_convert_from_time_t() in pngwrite.c
-          png_get_tIME() in pngget.c
-          png_handle_tIME() in pngrutil.c, called in pngread.c
-          png_set_tIME() in pngset.c
-          png_write_tIME() in pngwutil.c, called in pngwrite.c
-
-      All appear to handle dates properly in a Y2K environment.  The
-      png_convert_from_time_t() function calls gmtime() to convert from system
-      clock time, which returns (year - 1900), which we properly convert to
-      the full 4-digit year.  There is a possibility that applications using
-      libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
-      function, or that they are incorrectly passing only a 2-digit year
-      instead of "year - 1900" into the png_convert_from_struct_tm() function,
-      but this is not under our control.  The libpng documentation has always
-      stated that it works with 4-digit years, and the APIs have been
-      documented as such.
-
-      The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
-      integer to hold the year, and can hold years as large as 65535.
-
-      zlib, upon which libpng depends, is also Y2K compliant.  It contains
-      no date-related code.
-
-
-         Glenn Randers-Pehrson
-         libpng maintainer
-         PNG Development Group
diff --git a/tkimg1.3/libpng/configure b/tkimg1.3/libpng/configure
deleted file mode 100755
index 785db05..0000000
--- a/tkimg1.3/libpng/configure
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-echo "
-  There is no \"configure\" script in this distribution of
-  libpng-1.2.6rc5.
-
-  Instead, please copy the appropriate makefile for your system from the
-  \"scripts\" directory.  Read the INSTALL file for more details.
-
-  Update, July 2004: you can get a "configure" based distribution
-  from the libpng distribution sites.  Download the file
-  libpng-1.2.6rc5-config.tar.gz
-"
-
diff --git a/tkimg1.3/libpng/contrib/gregbook/LICENSE b/tkimg1.3/libpng/contrib/gregbook/LICENSE
deleted file mode 100644
index 175ebfd..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------
diff --git a/tkimg1.3/libpng/contrib/gregbook/Makefile.sgi b/tkimg1.3/libpng/contrib/gregbook/Makefile.sgi
deleted file mode 100644
index e3ca6ce..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/Makefile.sgi
+++ /dev/null
@@ -1,104 +0,0 @@
-# Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make.
-# Greg Roelofs
-# Last modified:  7 March 2002
-#
-#	The programs built by this makefile are described in the book,
-#	"PNG:  The Definitive Guide," by Greg Roelofs (O'Reilly and
-#	Associates, 1999).  Go buy a copy, eh?  Buy some for friends
-#	and family, too.  (Not that this is a blatant plug or anything.)
-#
-# Invoke this makefile from a shell prompt in the usual way; for example:
-#
-#	make -f Makefile.sgi
-#
-# This makefile assumes libpng and zlib have already been built or downloaded
-# and are both installed in /usr/local/{include,lib} (as indicated by the
-# PNG* and Z* macros below).  Edit as appropriate--choose only ONE each of
-# the PNGINC, PNGLIB, ZINC and ZLIB lines.
-#
-# This makefile builds dynamically linked executables (against libpng and zlib,
-# that is), but that can be changed by uncommenting the appropriate PNGLIB and
-# ZLIB lines.
-
-
-# macros --------------------------------------------------------------------
-
-PNGINC = -I/usr/local/include/libpng12
-PNGLIB = -L/usr/local/lib -lpng12	  # dynamically linked against libpng
-#PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng
-# or:
-#PNGINC = -I../..
-#PNGLIB = -L../.. -lpng
-#PNGLIB = ../../libpng.a
-
-ZINC = -I/usr/local/include
-ZLIB = -L/usr/local/lib -lz		# dynamically linked against zlib
-#ZLIB = /usr/local/lib/libz.a		# statically linked against zlib
-#ZINC = -I../zlib
-#ZLIB = -L../zlib -lz
-#ZLIB = ../../../zlib/libz.a
-
-XINC = -I/usr/include/X11		# old-style, stock X distributions
-XLIB = -L/usr/lib/X11 -lX11
-#XINC = -I/usr/openwin/include    	# Sun workstations (OpenWindows)
-#XLIB = -L/usr/openwin/lib -lX11
-#XINC = -I/usr/X11R6/include		# new X distributions (XFree86, etc.)
-#XLIB = -L/usr/X11R6/lib -lX11
-
-INCS = $(PNGINC) $(ZINC) $(XINC)
-RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm
-WLIBS = $(PNGLIB) $(ZLIB)
-
-CC = cc
-LD = cc
-RM = rm -f
-# ABI must be the same as that used to build libpng.
-ABI=
-CFLAGS = $(ABI) -O -fullwarn $(INCS)
-LDFLAGS = $(ABI)
-O = .o
-E =
-
-RPNG  = rpng-x
-RPNG2 = rpng2-x
-WPNG  = wpng
-
-ROBJS  = $(RPNG)$(O) readpng$(O)
-ROBJS2 = $(RPNG2)$(O) readpng2$(O)
-WOBJS  = $(WPNG)$(O) writepng$(O)
-
-EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
-
-
-# implicit make rules -------------------------------------------------------
-
-.c$(O):
-	$(CC) -c $(CFLAGS) $<
-
-
-# dependencies --------------------------------------------------------------
-
-all:  $(EXES)
-
-$(RPNG)$(E): $(ROBJS)
-	$(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS)
-
-$(RPNG2)$(E): $(ROBJS2)
-	$(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS)
-
-$(WPNG)$(E): $(WOBJS)
-	$(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS)
-
-$(RPNG)$(O):	$(RPNG).c readpng.h
-$(RPNG2)$(O):	$(RPNG2).c readpng2.h
-$(WPNG)$(O):	$(WPNG).c writepng.h
-
-readpng$(O):	readpng.c readpng.h
-readpng2$(O):	readpng2.c readpng2.h
-writepng$(O):	writepng.c writepng.h
-
-
-# maintenance ---------------------------------------------------------------
-
-clean:
-	$(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS)
diff --git a/tkimg1.3/libpng/contrib/gregbook/Makefile.unx b/tkimg1.3/libpng/contrib/gregbook/Makefile.unx
deleted file mode 100644
index c0c3fb1..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/Makefile.unx
+++ /dev/null
@@ -1,104 +0,0 @@
-# Sample makefile for rpng-x / rpng2-x / wpng using gcc and make.
-# Greg Roelofs
-# Last modified:  7 March 2002
-#
-#	The programs built by this makefile are described in the book,
-#	"PNG:  The Definitive Guide," by Greg Roelofs (O'Reilly and
-#	Associates, 1999).  Go buy a copy, eh?  Buy some for friends
-#	and family, too.  (Not that this is a blatant plug or anything.)
-#
-# Invoke this makefile from a shell prompt in the usual way; for example:
-#
-#	make -f Makefile.unx
-#
-# This makefile assumes libpng and zlib have already been built or downloaded
-# and are both installed in /usr/local/{include,lib} (as indicated by the
-# PNG* and Z* macros below).  Edit as appropriate--choose only ONE each of
-# the PNGINC, PNGLIB, ZINC and ZLIB lines.
-#
-# This makefile builds statically linked executables (against libpng and zlib,
-# that is), but that can be changed by uncommenting the appropriate PNGLIB and
-# ZLIB lines.
-
-
-# macros --------------------------------------------------------------------
-
-PNGINC = -I/usr/local/include/libpng12
-#PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng
-PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng
-# or:
-#PNGINC = -I../libpng
-#PNGLIB = -L../libpng -lpng
-#PNGLIB = ../libpng/libpng.a
-
-ZINC = -I/usr/local/include
-#ZLIB = -L/usr/local/lib -lz		# dynamically linked against zlib
-ZLIB = /usr/local/lib/libz.a		# statically linked against zlib
-#ZINC = -I../zlib
-#ZLIB = -L../zlib -lz
-#ZLIB = ../zlib/libz.a
-
-#XINC = -I/usr/include			# old-style, stock X distributions
-#XLIB = -L/usr/lib/X11 -lX11
-#XINC = -I/usr/openwin/include		# Sun workstations (OpenWindows)
-#XLIB = -L/usr/openwin/lib -lX11
-XINC = -I/usr/X11R6/include		# new X distributions (XFree86, etc.)
-XLIB = -L/usr/X11R6/lib -lX11
-
-INCS = $(PNGINC) $(ZINC) $(XINC)
-RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm
-WLIBS = $(PNGLIB) $(ZLIB)
-
-CC = gcc
-LD = gcc
-RM = rm -f
-CFLAGS = -O -Wall $(INCS)
-# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
-# [-ansi, -pedantic and -W can also be used]
-LDFLAGS =
-O = .o
-E =
-
-RPNG  = rpng-x
-RPNG2 = rpng2-x
-WPNG  = wpng
-
-ROBJS  = $(RPNG)$(O) readpng$(O)
-ROBJS2 = $(RPNG2)$(O) readpng2$(O)
-WOBJS  = $(WPNG)$(O) writepng$(O)
-
-EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
-
-
-# implicit make rules -------------------------------------------------------
-
-.c$(O):
-	$(CC) -c $(CFLAGS) $<
-
-
-# dependencies --------------------------------------------------------------
-
-all:  $(EXES)
-
-$(RPNG)$(E): $(ROBJS)
-	$(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS)
-
-$(RPNG2)$(E): $(ROBJS2)
-	$(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS)
-
-$(WPNG)$(E): $(WOBJS)
-	$(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS)
-
-$(RPNG)$(O):	$(RPNG).c readpng.h
-$(RPNG2)$(O):	$(RPNG2).c readpng2.h
-$(WPNG)$(O):	$(WPNG).c writepng.h
-
-readpng$(O):	readpng.c readpng.h
-readpng2$(O):	readpng2.c readpng2.h
-writepng$(O):	writepng.c writepng.h
-
-
-# maintenance ---------------------------------------------------------------
-
-clean:
-	$(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS)
diff --git a/tkimg1.3/libpng/contrib/gregbook/Makefile.w32 b/tkimg1.3/libpng/contrib/gregbook/Makefile.w32
deleted file mode 100644
index 62041cd..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/Makefile.w32
+++ /dev/null
@@ -1,112 +0,0 @@
-# Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE.
-# Greg Roelofs
-# Last modified:  16 February 1999
-#
-#	The programs built by this makefile are described in the book,
-#	"PNG:  The Definitive Guide," by Greg Roelofs (O'Reilly and
-#	Associates, 1999).  Go buy a copy, eh?  Buy some for friends
-#	and family, too.  (Not that this is a blatant plug or anything.)
-#
-# Invoke this makefile from a DOS prompt window via:
-#
-#	%devstudio%\vc\bin\vcvars32.bat
-#	nmake -nologo -f Makefile.w32
-#
-# where %devstudio% is the installation directory for MSVC / DevStudio.  If
-# you get "environment out of space" errors, create a desktop shortcut with
-# "c:\windows\command.com /e:4096" as the program command line and set the
-# working directory to this directory.  Then double-click to open the new
-# DOS-prompt window with a bigger environment and retry the commands above.
-# 
-# This makefile assumes libpng and zlib have already been built or downloaded
-# and are in subdirectories at the same level as the current subdirectory
-# (as indicated by the PNGPATH and ZPATH macros below).  Edit as appropriate.
-#
-# Note that the names of the dynamic and static libpng and zlib libraries
-# used below may change in later releases of the libraries.  This makefile
-# builds statically linked executables, but that can be changed by uncom-
-# menting the appropriate PNGLIB and ZLIB lines.
-
-!include <ntwin32.mak>
-
-
-# macros --------------------------------------------------------------------
-
-PNGPATH = ../libpng
-PNGINC = -I$(PNGPATH)
-#PNGLIB = $(PNGPATH)/pngdll.lib
-PNGLIB = $(PNGPATH)/libpng.lib
-
-ZPATH = ../zlib
-ZINC = -I$(ZPATH)
-#ZLIB = $(ZPATH)/zlibdll.lib
-ZLIB = $(ZPATH)/zlibstat.lib
-
-WINLIBS = -defaultlib:user32.lib gdi32.lib
-# ["real" apps may also need comctl32.lib, comdlg32.lib, winmm.lib, etc.]
-
-INCS = $(PNGINC) $(ZINC)
-RLIBS = $(PNGLIB) $(ZLIB) $(WINLIBS)
-WLIBS = $(PNGLIB) $(ZLIB)
-
-CC = cl
-LD = link
-RM = del
-CFLAGS = -nologo -O -W3 $(INCS) $(cvars)
-# [note that -Wall is an MSVC-specific compilation flag ("all warnings on")]
-# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
-O = .obj
-E = .exe
-
-RLDFLAGS = -nologo -subsystem:windows
-WLDFLAGS = -nologo
-
-RPNG  = rpng-win
-RPNG2 = rpng2-win
-WPNG  = wpng
-
-ROBJS  = $(RPNG)$(O) readpng$(O)
-ROBJS2 = $(RPNG2)$(O) readpng2$(O)
-WOBJS  = $(WPNG)$(O) writepng$(O)
-
-EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
-
-
-# implicit make rules -------------------------------------------------------
-
-.c$(O):
-	$(CC) -c $(CFLAGS) $<
-
-
-# dependencies --------------------------------------------------------------
-
-all:  $(EXES)
-
-$(RPNG)$(E): $(ROBJS)
-	$(LD) $(RLDFLAGS) -out:$@ $(ROBJS) $(RLIBS)
-
-$(RPNG2)$(E): $(ROBJS2)
-	$(LD) $(RLDFLAGS) -out:$@ $(ROBJS2) $(RLIBS)
-
-$(WPNG)$(E): $(WOBJS)
-	$(LD) $(WLDFLAGS) -out:$@ $(WOBJS) $(WLIBS)
-
-$(RPNG)$(O):	$(RPNG).c readpng.h
-$(RPNG2)$(O):	$(RPNG2).c readpng2.h
-$(WPNG)$(O):	$(WPNG).c writepng.h
-
-readpng$(O):	readpng.c readpng.h
-readpng2$(O):	readpng2.c readpng2.h
-writepng$(O):	writepng.c writepng.h
-
-
-# maintenance ---------------------------------------------------------------
-
-clean:
-#	ideally we could just do this:
-#	$(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS)
-#	...but the Windows "DEL" command is none too bright, so:
-	$(RM) r*$(E)
-	$(RM) w*$(E)
-	$(RM) r*$(O)
-	$(RM) w*$(O)
diff --git a/tkimg1.3/libpng/contrib/gregbook/README b/tkimg1.3/libpng/contrib/gregbook/README
deleted file mode 100644
index c67045c..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/README
+++ /dev/null
@@ -1,185 +0,0 @@
-                     ===========================
-                      PNG: The Definitive Guide
-                     ===========================
-
-                             Source Code
-
-Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free,
-cross-platform demo programs that show how to use the libpng reference
-library:  rpng, rpng2 and wpng.  rpng and rpng2 are viewers; the first is
-a very simple example that that shows how a standard file-viewer might use
-libpng, while the second is designed to process streaming data and shows
-how a web browser might be written.  wpng is a simple command-line program
-that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets
-of PBMPLUS/NetPBM) and converts them to PNG.
-
-The source code for all three demo programs currently compiles under
-Unix, OpenVMS, and 32-bit Windows.  (Special thanks to Martin Zinser,
-zinser at decus.de, for making the necessary changes for OpenVMS and for
-providing an appropriate build script.)  Build instructions can be found
-below.
-
-Files:
-
-   README             this file
-   LICENSE            terms of distribution and reuse (BSD-like)
-
-   Makefile.unx       Unix makefile
-   Makefile.w32       Windows (MSVC) makefile
-   makevms.com        OpenVMS build script
-
-   rpng-win.c         Windows front end for the basic viewer
-   rpng-x.c           X Window System (Unix, OpenVMS) front end
-   readpng.c          generic back end for the basic viewer
-   readpng.h          header file for the basic viewer
-
-   rpng2-win.c        Windows front end for the progressive viewer
-   rpng2-x.c          X front end for the progressive viewer
-   readpng2.c         generic back end for the progressive viewer
-   readpng2.h         header file for the progressive viewer
-
-   wpng.c             generic (text) front end for the converter
-   writepng.c         generic back end for the converter
-   writepng.h         header file for the converter
-
-   toucan.png         transparent PNG for testing (by Stefan Schneider)
-
-Note that, although the programs are designed to be functional, their
-primary purpose is to illustrate how to use libpng to add PNG support to
-other programs.  As such, their user interfaces are crude and definitely
-are not intended for everyday use.
-
-Please see http://www.libpng.org/pub/png/pngbook.html for further infor-
-mation and links to the latest version of the source code, and Chapters
-13-15 of the book for detailed discussion of the three programs.
-
-Greg Roelofs
-newt at pobox.com
-30 June 2001
-
-
-BUILD INSTRUCTIONS
-
- - Prerequisites (in order of compilation):
-
-      - zlib		http://www.gzip.org/zlib/
-      - libpng		http://www.libpng.org/pub/png/libpng.html
-      - pngbook		http://www.libpng.org/pub/png/book/sources.html
-
-     The pngbook demo programs are explicitly designed to demonstrate proper
-     coding techniques for using the libpng reference library.  As a result,
-     you need to download and build both zlib (on which libpng depends) and
-     libpng.  A common build setup is to place the zlib, libpng and pngbook
-     subdirectory trees ("folders") in the same parent directory.  Then the
-     libpng build can refer to files in ../zlib (or ..\zlib or [-.zlib]),
-     and similarly for the pngbook build.
-
-     Note that all three packages are designed to be built from a command
-     line by default; those who wish to use a graphical or other integrated
-     development environments are on their own.
-
-
- - Unix:
-
-     Unpack the latest pngbook sources (which should correspond to this
-     README file) into a directory and change into that directory.
-
-     Copy Makefile.unx to Makefile and edit the PNG* and Z* variables
-     appropriately (possibly also the X* variables if necessary).
-
-     make
-
-     There is no "install" target, so copy the three executables somewhere
-     in your path or run them from the current directory.  All three will
-     print a basic usage screen when run without any command-line arguments;
-     see the book for more details.
-
-
- - Windows:
-
-     Unpack the latest pngbook sources (which should correspond to this
-     README file) into a folder, open a "DOS shell" or "command prompt"
-     or equivalent command-line window, and cd into the folder where you
-     unpacked the source code.
-
-     For MSVC, set up the necessary environment variables by invoking
- 
-        %devstudio%\vc\bin\vcvars32.bat
-
-     where where %devstudio% is the installation directory for MSVC /
-     DevStudio.  If you get "environment out of space" errors under 95/98,
-     create a desktop shortcut with "c:\windows\command.com /e:4096" as
-     the program command line and set the working directory to the pngbook
-     directory.  Then double-click to open the new DOS-prompt window with
-     a bigger environment and retry the commands above.
-
-     Copy Makefile.w32 to Makefile and edit the PNGPATH and ZPATH variables
-     appropriately (possibly also the "INC" and "LIB" variables if needed).
-     Note that the names of the dynamic and static libpng and zlib libraries
-     used in the makefile may change in later releases of the libraries.
-     Also note that, as of libpng version 1.0.5, MSVC DLL builds do not work.
-     This makefile therefore builds statically linked executables, but if
-     the DLL problems ever get fixed, uncommenting the appropriate PNGLIB
-     and ZLIB lines will build dynamically linked executables instead.
-
-     Do the build by typing
-
-        nmake
-
-     The result should be three executables:  rpng-win.exe, rpng2-win.exe,
-     and wpng.exe.  Copy them somewhere in your PATH or run them from the
-     current folder.  Like the Unix versions, the two windowed programs
-     (rpng and rpng2) now display a usage screen in a console window when
-     invoked without command-line arguments; this is new behavior as of
-     the June 2001 release.  Note that the programs use the Unix-style "-"
-     character to specify options, instead of the more common DOS/Windows
-     "/" character.  (For example:  "rpng2-win -bgpat 4 foo.png", not
-     "rpng2-win /bgpat 4 foo.png")
-
-
- - OpenVMS:
-
-     Unpack the pngbook sources into a subdirectory and change into that
-     subdirectory.
-
-     Edit makevms.com appropriately, specifically the zpath and pngpath
-     variables.
-
-     @makevms
-
-     To run the programs, they probably first need to be set up as "foreign
-     symbols," with "disk" and "dir" set appropriately:
-
-     $ rpng == "$disk:[dir]rpng-x.exe"
-     $ rpng2 == "$disk:[dir]rpng2-x.exe"
-     $ wpng == "$disk:[dir]wpng.exe"
-
-     All three will print a basic usage screen when run without any command-
-     line arguments; see the book for more details.  Note that the options
-     style is Unix-like, i.e., preceded by "-" rather than "/".
-
-
-RUNNING THE PROGRAMS:  (VERY) BRIEF INTRO
-
-     rpng is a simple PNG viewer that can display transparent PNGs with a
-     specified background color; for example,
-
-	rpng -bgcolor #ff0000 toucan.png
-
-     would display the image with a red background.  rpng2 is a progressive
-     viewer that simulates a web browser in some respects; it can display
-     images against either a background color or a dynamically generated
-     background image.  For example:
-
-	rpng2 -bgpat 16 toucan.png
-
-     wpng is a purely command-line image converter from binary PBMPLUS/NetPBM
-     format (.pgm or .ppm) to PNG; for example,
-
-	wpng -time < toucan.ppm > toucan.png
-
-     would convert the specified PPM file (using redirection) to PNG, auto-
-     matically setting the PNG modification-time chunk.
-
-     All options can be abbreviated to the shortest unique value; for example,
-     "-bgc" for -bgcolor (versus "-bgp" for -bgpat), or "-g" for -gamma.
diff --git a/tkimg1.3/libpng/contrib/gregbook/makevms.com b/tkimg1.3/libpng/contrib/gregbook/makevms.com
deleted file mode 100644
index bd37dc0..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/makevms.com
+++ /dev/null
@@ -1,132 +0,0 @@
-$!------------------------------------------------------------------------------
-$! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS
-$!
-$! Script created by Martin Zinser for libpng; modified by Greg Roelofs
-$! for standalone pngbook source distribution.
-$!
-$!
-$!    Set locations where zlib and libpng sources live.
-$!
-$ zpath   = ""
-$ pngpath = ""
-$!
-$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]"
-$ if f$search("[--]png.h").nes."" then pngpath = "[--]"
-$!
-$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
-$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
-$!
-$ if zpath .eqs. ""
-$ then
-$   write sys$output "zlib include not found. Exiting..."
-$   exit 2
-$ endif 
-$!
-$ if pngpath .eqs. ""
-$ then
-$   write sys$output "libpng include not found. Exiting..."
-$   exit 2
-$ endif 
-$!
-$!    Look for the compiler used.
-$!
-$ ccopt="/include=(''zpath',''pngpath')"
-$ if f$getsyi("HW_MODEL").ge.1024
-$ then
-$  ccopt = "/prefix=all"+ccopt
-$  comp  = "__decc__=1"
-$  if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ else
-$  if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
-$   then
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$    if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
-$     then
-$      comp  = "__gcc__=1"
-$      CC :== GCC
-$     else
-$      comp = "__vaxc__=1"
-$     endif
-$   else
-$    if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
-$    ccopt = "/decc/prefix=all"+ccopt
-$    comp  = "__decc__=1"
-$  endif
-$ endif
-$ open/write lopt lib.opt
-$ write lopt "''pngpath'libpng.olb/lib"
-$ write lopt "''zpath'libz.olb/lib"
-$ close lopt
-$ open/write xopt x11.opt
-$ write xopt "sys$library:decw$xlibshr.exe/share"
-$ close xopt
-$!
-$!    Build 'em.
-$!
-$ write sys$output "Compiling PNG book programs ..."
-$   CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" -
-	readpng.c readpng.h
-$   CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" -
-	readpng2.c readpng2.h
-$   CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" -
-	writepng.c writepng.h
-$   write sys$output "Building rpng-x..."
-$   CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" -
-	rpng-x.c readpng.h
-$   call make rpng-x.exe -
-	"LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" -
-	rpng-x.obj readpng.obj
-$   write sys$output "Building rpng2-x..."
-$   CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" -
-	rpng2-x.c readpng2.h
-$   call make rpng2-x.exe -
-	"LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" -
-	rpng2-x.obj readpng2.obj
-$   write sys$output "Building wpng..."
-$   CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" -
-	wpng.c writepng.h
-$   call make wpng.exe -
-	"LINK wpng,writepng,lib.opt/opt" -
-	wpng.obj writepng.obj
-$ exit
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
diff --git a/tkimg1.3/libpng/contrib/gregbook/readpng.c b/tkimg1.3/libpng/contrib/gregbook/readpng.c
deleted file mode 100644
index b8e0904..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/readpng.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng - simple PNG display program                              readpng.c
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "png.h"        /* libpng header; includes zlib.h */
-#include "readpng.h"    /* typedefs, common macros, public prototypes */
-
-/* future versions of libpng will provide this macro: */
-#ifndef png_jmpbuf
-#  define png_jmpbuf(png_ptr)   ((png_ptr)->jmpbuf)
-#endif
-
-
-static png_structp png_ptr = NULL;
-static png_infop info_ptr = NULL;
-
-png_uint_32  width, height;
-int  bit_depth, color_type;
-uch  *image_data = NULL;
-
-
-void readpng_version_info(void)
-{
-    fprintf(stderr, "   Compiled with libpng %s; using libpng %s.\n",
-      PNG_LIBPNG_VER_STRING, png_libpng_ver);
-    fprintf(stderr, "   Compiled with zlib %s; using zlib %s.\n",
-      ZLIB_VERSION, zlib_version);
-}
-
-
-/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */
-
-int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
-{
-    uch sig[8];
-
-
-    /* first do a quick check that the file really is a PNG image; could
-     * have used slightly more general png_sig_cmp() function instead */
-
-    fread(sig, 1, 8, infile);
-    if (!png_check_sig(sig, 8))
-        return 1;   /* bad signature */
-
-
-    /* could pass pointers to user-defined error handlers instead of NULLs: */
-
-    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-    if (!png_ptr)
-        return 4;   /* out of memory */
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-        png_destroy_read_struct(&png_ptr, NULL, NULL);
-        return 4;   /* out of memory */
-    }
-
-
-    /* we could create a second info struct here (end_info), but it's only
-     * useful if we want to keep pre- and post-IDAT chunk info separated
-     * (mainly for PNG-aware image editors and converters) */
-
-
-    /* setjmp() must be called in every function that calls a PNG-reading
-     * libpng function */
-
-    if (setjmp(png_jmpbuf(png_ptr))) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        return 2;
-    }
-
-
-    png_init_io(png_ptr, infile);
-    png_set_sig_bytes(png_ptr, 8);  /* we already read the 8 signature bytes */
-
-    png_read_info(png_ptr, info_ptr);  /* read all PNG info up to image data */
-
-
-    /* alternatively, could make separate calls to png_get_image_width(),
-     * etc., but want bit_depth and color_type for later [don't care about
-     * compression_type and filter_type => NULLs] */
-
-    png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-      NULL, NULL, NULL);
-    *pWidth = width;
-    *pHeight = height;
-
-
-    /* OK, that's all we need for now; return happy */
-
-    return 0;
-}
-
-
-
-
-/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error;
- * scales values to 8-bit if necessary */
-
-int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
-{
-    png_color_16p pBackground;
-
-
-    /* setjmp() must be called in every function that calls a PNG-reading
-     * libpng function */
-
-    if (setjmp(png_jmpbuf(png_ptr))) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        return 2;
-    }
-
-
-    if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD))
-        return 1;
-
-    /* it is not obvious from the libpng documentation, but this function
-     * takes a pointer to a pointer, and it always returns valid red, green
-     * and blue values, regardless of color_type: */
-
-    png_get_bKGD(png_ptr, info_ptr, &pBackground);
-
-
-    /* however, it always returns the raw bKGD data, regardless of any
-     * bit-depth transformations, so check depth and adjust if necessary */
-
-    if (bit_depth == 16) {
-        *red   = pBackground->red   >> 8;
-        *green = pBackground->green >> 8;
-        *blue  = pBackground->blue  >> 8;
-    } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
-        if (bit_depth == 1)
-            *red = *green = *blue = pBackground->gray? 255 : 0;
-        else if (bit_depth == 2)
-            *red = *green = *blue = (255/3) * pBackground->gray;
-        else /* bit_depth == 4 */
-            *red = *green = *blue = (255/15) * pBackground->gray;
-    } else {
-        *red   = (uch)pBackground->red;
-        *green = (uch)pBackground->green;
-        *blue  = (uch)pBackground->blue;
-    }
-
-    return 0;
-}
-
-
-
-
-/* display_exponent == LUT_exponent * CRT_exponent */
-
-uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
-{
-    double  gamma;
-    png_uint_32  i, rowbytes;
-    png_bytepp  row_pointers = NULL;
-
-
-    /* setjmp() must be called in every function that calls a PNG-reading
-     * libpng function */
-
-    if (setjmp(png_jmpbuf(png_ptr))) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        return NULL;
-    }
-
-
-    /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits,
-     * transparency chunks to full alpha channel; strip 16-bit-per-sample
-     * images to 8 bits per sample; and convert grayscale to RGB[A] */
-
-    if (color_type == PNG_COLOR_TYPE_PALETTE)
-        png_set_expand(png_ptr);
-    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-        png_set_expand(png_ptr);
-    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-        png_set_expand(png_ptr);
-    if (bit_depth == 16)
-        png_set_strip_16(png_ptr);
-    if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-        png_set_gray_to_rgb(png_ptr);
-
-
-    /* unlike the example in the libpng documentation, we have *no* idea where
-     * this file may have come from--so if it doesn't have a file gamma, don't
-     * do any correction ("do no harm") */
-
-    if (png_get_gAMA(png_ptr, info_ptr, &gamma))
-        png_set_gamma(png_ptr, display_exponent, gamma);
-
-
-    /* all transformations have been registered; now update info_ptr data,
-     * get rowbytes and channels, and allocate image memory */
-
-    png_read_update_info(png_ptr, info_ptr);
-
-    *pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr);
-    *pChannels = (int)png_get_channels(png_ptr, info_ptr);
-
-    if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        return NULL;
-    }
-    if ((row_pointers = (png_bytepp)malloc(height*sizeof(png_bytep))) == NULL) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        free(image_data);
-        image_data = NULL;
-        return NULL;
-    }
-
-    Trace((stderr, "readpng_get_image:  channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height));
-
-
-    /* set the individual row_pointers to point at the correct offsets */
-
-    for (i = 0;  i < height;  ++i)
-        row_pointers[i] = image_data + i*rowbytes;
-
-
-    /* now we can go ahead and just read the whole image */
-
-    png_read_image(png_ptr, row_pointers);
-
-
-    /* and we're done!  (png_read_end() can be omitted if no processing of
-     * post-IDAT text/time/etc. is desired) */
-
-    free(row_pointers);
-    row_pointers = NULL;
-
-    png_read_end(png_ptr, NULL);
-
-    return image_data;
-}
-
-
-void readpng_cleanup(int free_image_data)
-{
-    if (free_image_data && image_data) {
-        free(image_data);
-        image_data = NULL;
-    }
-
-    if (png_ptr && info_ptr) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        png_ptr = NULL;
-        info_ptr = NULL;
-    }
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/readpng.h b/tkimg1.3/libpng/contrib/gregbook/readpng.h
deleted file mode 100644
index 1c19aca..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/readpng.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng - simple PNG display program                              readpng.h
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#ifndef TRUE
-#  define TRUE 1
-#  define FALSE 0
-#endif
-
-#ifndef MAX
-#  define MAX(a,b)  ((a) > (b)? (a) : (b))
-#  define MIN(a,b)  ((a) < (b)? (a) : (b))
-#endif
-
-#ifdef DEBUG
-#  define Trace(x)  {fprintf x ; fflush(stderr); fflush(stdout);}
-#else
-#  define Trace(x)  ;
-#endif
-
-typedef unsigned char   uch;
-typedef unsigned short  ush;
-typedef unsigned long   ulg;
-
-
-/* prototypes for public functions in readpng.c */
-
-void readpng_version_info(void);
-
-int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight);
-
-int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue);
-
-uch *readpng_get_image(double display_exponent, int *pChannels,
-                       ulg *pRowbytes);
-
-void readpng_cleanup(int free_image_data);
diff --git a/tkimg1.3/libpng/contrib/gregbook/readpng2.c b/tkimg1.3/libpng/contrib/gregbook/readpng2.c
deleted file mode 100644
index 9e66a0b..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/readpng2.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng2 - progressive-model PNG display program                 readpng2.c
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.01:  initial public release
-    - 1.02:  added code to skip unused chunks (GR-P)
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2002 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-
-#include <stdlib.h>     /* for exit() prototype */
-
-#include "png.h"        /* libpng header; includes zlib.h and setjmp.h */
-#include "readpng2.h"   /* typedefs, common macros, public prototypes */
-
-
-/* local prototypes */
-
-static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr);
-static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row,
-                                 png_uint_32 row_num, int pass);
-static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr);
-static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg);
-
-
-
-
-void readpng2_version_info(void)
-{
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
-    (defined(__i386__) || defined(_M_IX86)) && \
-    defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-    /*
-     * WARNING:  This preprocessor approach means that the following code
-     *           cannot be used with a libpng DLL older than 1.2.0--the
-     *           compiled-in symbols for the new functions will not exist.
-     *           (Could use dlopen() and dlsym() on Unix and corresponding
-     *           calls for Windows, but not portable...)
-     */
-    {
-        int mmxsupport = png_mmx_support();
-        if (mmxsupport < 0)
-            fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
-              "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
-        else {
-            int compilerID;
-            png_uint_32 mmx_mask = png_get_mmx_flagmask(
-              PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
-
-            fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
-              "with MMX support\n   (%s version).", PNG_LIBPNG_VER_STRING,
-              png_libpng_ver, compilerID == 1? "MSVC++" :
-              (compilerID == 2? "GNU C" : "unknown"));
-            fprintf(stderr, "  Processor %s MMX instructions.\n",
-              mmxsupport? "supports" : "does not support");
-            if (mmxsupport > 0) {
-                int num_optims = 0;
-
-                fprintf(stderr,
-                  "      Potential MMX optimizations supported by libpng:\n");
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)
-                    ++num_optims;
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP)
-                    ++num_optims;
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)
-                    ++num_optims;
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)
-                    ++num_optims;
-                if (num_optims)
-                    fprintf(stderr,
-                      "         decoding %s row filters (reading)\n",
-                      (num_optims == 4)? "all non-trivial" : "some");
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) {
-                    fprintf(stderr, "         combining rows (reading)\n");
-                    ++num_optims;
-                }
-                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) {
-                    fprintf(stderr,
-                      "         expanding interlacing (reading)\n");
-                    ++num_optims;
-                }
-                mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-                             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-                             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-                if (mmx_mask) {
-                    fprintf(stderr, "         other (unknown)\n");
-                    ++num_optims;
-                }
-                if (num_optims == 0)
-                    fprintf(stderr, "         (none)\n");
-            }
-        }
-    }
-#else
-    fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
-      "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
-#endif
-
-    fprintf(stderr, "   Compiled with zlib %s; using zlib %s.\n",
-      ZLIB_VERSION, zlib_version);
-}
-
-
-
-
-int readpng2_check_sig(uch *sig, int num)
-{
-    return png_check_sig(sig, num);
-}
-
-
-
-
-/* returns 0 for success, 2 for libpng problem, 4 for out of memory */
-
-int readpng2_init(mainprog_info *mainprog_ptr)
-{
-    png_structp  png_ptr;       /* note:  temporary variables! */
-    png_infop  info_ptr;
-
-
-    /* could also replace libpng warning-handler (final NULL), but no need: */
-
-    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr,
-      readpng2_error_handler, NULL);
-    if (!png_ptr)
-        return 4;   /* out of memory */
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-        png_destroy_read_struct(&png_ptr, NULL, NULL);
-        return 4;   /* out of memory */
-    }
-
-
-    /* we could create a second info struct here (end_info), but it's only
-     * useful if we want to keep pre- and post-IDAT chunk info separated
-     * (mainly for PNG-aware image editors and converters) */
-
-
-    /* setjmp() must be called in every function that calls a PNG-reading
-     * libpng function, unless an alternate error handler was installed--
-     * but compatible error handlers must either use longjmp() themselves
-     * (as in this program) or exit immediately, so here we are: */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        return 2;
-    }
-
-    /* prepare the reader to ignore all recognized chunks whose data isn't
-     * going to be used, i.e., all chunks recognized by libpng except for
-     * IHDR, PLTE, IDAT, IEND, tRNS, bKGD, gAMA, and sRGB : */
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-    {
-#ifndef HANDLE_CHUNK_NEVER
-/* prior to libpng-1.2.5, this macro was internal, so we define it here. */
-# define HANDLE_CHUNK_NEVER 1
-#endif
-       /* these byte strings were copied from png.h.
-        * If a future libpng version recognizes more chunks, add them
-        * to this list.  If a future version of readpng2.c recognizes
-        * more chunks, delete them from this list. */
-       png_byte png_chunk_types_to_ignore[]=
-          { 99,  72,  82,  77, '\0', /* cHRM */
-           104,  73,  83,  84, '\0', /* hIST */
-           105,  67,  67,  80, '\0', /* iCCP */
-           105,  84,  88, 116, '\0', /* iTXt */
-           111,  70,  70, 115, '\0', /* oFFs */
-           112,  67,  65,  76, '\0', /* pCAL */
-           115,  67,  65,  76, '\0', /* sCAL */
-           112,  72,  89, 115, '\0', /* pHYs */
-           115,  66,  73,  84, '\0', /* sBIT */
-           115,  80,  76,  84, '\0', /* sPLT */
-           116,  69,  88, 116, '\0', /* tEXt */
-           116,  73,  77,  69, '\0', /* tIME */
-           122,  84,  88, 116, '\0'}; /* zTXt */
-#define NUM_PNG_CHUNK_TYPES_TO_IGNORE 13
-
-    png_set_keep_unknown_chunks(png_ptr, HANDLE_CHUNK_NEVER,
-        png_chunk_types_to_ignore, NUM_PNG_CHUNK_TYPES_TO_IGNORE);
-    }
-#endif
-
-    /* instead of doing png_init_io() here, now we set up our callback
-     * functions for progressive decoding */
-
-    png_set_progressive_read_fn(png_ptr, mainprog_ptr,
-      readpng2_info_callback, readpng2_row_callback, readpng2_end_callback);
-
-
-    /*
-     * may as well enable or disable MMX routines here, if supported;
-     *
-     * to enable all:  mask = png_get_mmx_flagmask (
-     *                   PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
-     *                 flags = png_get_asm_flags (png_ptr);
-     *                 flags |= mask;
-     *                 png_set_asm_flags (png_ptr, flags);
-     *
-     * to disable all:  mask = png_get_mmx_flagmask (
-     *                   PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
-     *                  flags = png_get_asm_flags (png_ptr);
-     *                  flags &= ~mask;
-     *                  png_set_asm_flags (png_ptr, flags);
-     */
-
-#if (defined(__i386__) || defined(_M_IX86)) && \
-    defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-    /*
-     * WARNING:  This preprocessor approach means that the following code
-     *           cannot be used with a libpng DLL older than 1.2.0--the
-     *           compiled-in symbols for the new functions will not exist.
-     *           (Could use dlopen() and dlsym() on Unix and corresponding
-     *           calls for Windows, but not portable...)
-     */
-    {
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-        png_uint_32 mmx_disable_mask = 0;
-        png_uint_32 asm_flags, mmx_mask;
-        int compilerID;
-
-        if (mainprog_ptr->nommxfilters)
-            mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                                | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-                                | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                                | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-        if (mainprog_ptr->nommxcombine)
-            mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW;
-        if (mainprog_ptr->nommxinterlace)
-            mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE;
-        asm_flags = png_get_asm_flags(png_ptr);
-        png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
-
-
-        /* Now query libpng's asm settings, just for yuks.  Note that this
-         * differs from the querying of its *potential* MMX capabilities
-         * in readpng2_version_info(); this is true runtime verification. */
-
-        asm_flags = png_get_asm_flags(png_ptr);
-        mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE,
-          &compilerID);
-        if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED)
-            fprintf(stderr,
-              "  MMX support (%s version) is compiled into libpng\n",
-              compilerID == 1? "MSVC++" :
-              (compilerID == 2? "GNU C" : "unknown"));
-        else
-            fprintf(stderr, "  MMX support is not compiled into libpng\n");
-        fprintf(stderr, "  MMX instructions are %ssupported by CPU\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not ");
-        fprintf(stderr, "  MMX read support for combining rows is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis");
-        fprintf(stderr,
-          "  MMX read support for expanding interlacing is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis");
-        fprintf(stderr, "  MMX read support for \"sub\" filter is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis");
-        fprintf(stderr, "  MMX read support for \"up\" filter is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis");
-        fprintf(stderr, "  MMX read support for \"avg\" filter is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis");
-        fprintf(stderr, "  MMX read support for \"Paeth\" filter is %sabled\n",
-          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis");
-        asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                                  | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-                                  | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                                  | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-                                  | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                                  | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ));
-        if (asm_flags)
-            fprintf(stderr,
-              "  additional MMX support is also enabled (0x%02lx)\n",
-              asm_flags);
-#else  /* !PNG_ASSEMBLER_CODE_SUPPORTED */
-        fprintf(stderr, "  MMX querying is disabled in libpng.\n");
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
-    }
-#endif
-
-
-    /* make sure we save our pointers for use in readpng2_decode_data() */
-
-    mainprog_ptr->png_ptr = png_ptr;
-    mainprog_ptr->info_ptr = info_ptr;
-
-
-    /* and that's all there is to initialization */
-
-    return 0;
-}
-
-
-
-
-/* returns 0 for success, 2 for libpng (longjmp) problem */
-
-int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length)
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-
-    /* setjmp() must be called in every function that calls a PNG-reading
-     * libpng function */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-        mainprog_ptr->png_ptr = NULL;
-        mainprog_ptr->info_ptr = NULL;
-        return 2;
-    }
-
-
-    /* hand off the next chunk of input data to libpng for decoding */
-
-    png_process_data(png_ptr, info_ptr, rawbuf, length);
-
-    return 0;
-}
-
-
-
-
-static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr)
-{
-    mainprog_info  *mainprog_ptr;
-    int  color_type, bit_depth;
-    double  gamma;
-
-
-    /* setjmp() doesn't make sense here, because we'd either have to exit(),
-     * longjmp() ourselves, or return control to libpng, which doesn't want
-     * to see us again.  By not doing anything here, libpng will instead jump
-     * to readpng2_decode_data(), which can return an error value to the main
-     * program. */
-
-
-    /* retrieve the pointer to our special-purpose struct, using the png_ptr
-     * that libpng passed back to us (i.e., not a global this time--there's
-     * no real difference for a single image, but for a multithreaded browser
-     * decoding several PNG images at the same time, one needs to avoid mixing
-     * up different images' structs) */
-
-    mainprog_ptr = png_get_progressive_ptr(png_ptr);
-
-    if (mainprog_ptr == NULL) {         /* we be hosed */
-        fprintf(stderr,
-          "readpng2 error:  main struct not recoverable in info_callback.\n");
-        fflush(stderr);
-        return;
-        /*
-         * Alternatively, we could call our error-handler just like libpng
-         * does, which would effectively terminate the program.  Since this
-         * can only happen if png_ptr gets redirected somewhere odd or the
-         * main PNG struct gets wiped, we're probably toast anyway.  (If
-         * png_ptr itself is NULL, we would not have been called.)
-         */
-    }
-
-
-    /* this is just like in the non-progressive case */
-
-    png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width,
-      &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL);
-
-
-    /* since we know we've read all of the PNG file's "header" (i.e., up
-     * to IDAT), we can check for a background color here */
-
-    if (mainprog_ptr->need_bgcolor &&
-        png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD))
-    {
-        png_color_16p pBackground;
-
-        /* it is not obvious from the libpng documentation, but this function
-         * takes a pointer to a pointer, and it always returns valid red,
-         * green and blue values, regardless of color_type: */
-        png_get_bKGD(png_ptr, info_ptr, &pBackground);
-
-        /* however, it always returns the raw bKGD data, regardless of any
-         * bit-depth transformations, so check depth and adjust if necessary */
-        if (bit_depth == 16) {
-            mainprog_ptr->bg_red   = pBackground->red   >> 8;
-            mainprog_ptr->bg_green = pBackground->green >> 8;
-            mainprog_ptr->bg_blue  = pBackground->blue  >> 8;
-        } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
-            if (bit_depth == 1)
-                mainprog_ptr->bg_red = mainprog_ptr->bg_green =
-                  mainprog_ptr->bg_blue = pBackground->gray? 255 : 0;
-            else if (bit_depth == 2)
-                mainprog_ptr->bg_red = mainprog_ptr->bg_green =
-                  mainprog_ptr->bg_blue = (255/3) * pBackground->gray;
-            else /* bit_depth == 4 */
-                mainprog_ptr->bg_red = mainprog_ptr->bg_green =
-                  mainprog_ptr->bg_blue = (255/15) * pBackground->gray;
-        } else {
-            mainprog_ptr->bg_red   = (uch)pBackground->red;
-            mainprog_ptr->bg_green = (uch)pBackground->green;
-            mainprog_ptr->bg_blue  = (uch)pBackground->blue;
-        }
-    }
-
-
-    /* as before, let libpng expand palette images to RGB, low-bit-depth
-     * grayscale images to 8 bits, transparency chunks to full alpha channel;
-     * strip 16-bit-per-sample images to 8 bits per sample; and convert
-     * grayscale to RGB[A] */
-
-    if (color_type == PNG_COLOR_TYPE_PALETTE)
-        png_set_expand(png_ptr);
-    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-        png_set_expand(png_ptr);
-    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-        png_set_expand(png_ptr);
-    if (bit_depth == 16)
-        png_set_strip_16(png_ptr);
-    if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-        png_set_gray_to_rgb(png_ptr);
-
-
-    /* Unlike the basic viewer, which was designed to operate on local files,
-     * this program is intended to simulate a web browser--even though we
-     * actually read from a local file, too.  But because we are pretending
-     * that most of the images originate on the Internet, we follow the recom-
-     * mendation of the sRGB proposal and treat unlabelled images (no gAMA
-     * chunk) as existing in the sRGB color space.  That is, we assume that
-     * such images have a file gamma of 0.45455, which corresponds to a PC-like
-     * display system.  This change in assumptions will have no effect on a
-     * PC-like system, but on a Mac, SGI, NeXT or other system with a non-
-     * identity lookup table, it will darken unlabelled images, which effec-
-     * tively favors images from PC-like systems over those originating on
-     * the local platform.  Note that mainprog_ptr->display_exponent is the
-     * "gamma" value for the entire display system, i.e., the product of
-     * LUT_exponent and CRT_exponent. */
-
-    if (png_get_gAMA(png_ptr, info_ptr, &gamma))
-        png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma);
-    else
-        png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455);
-
-
-    /* we'll let libpng expand interlaced images, too */
-
-    mainprog_ptr->passes = png_set_interlace_handling(png_ptr);
-
-
-    /* all transformations have been registered; now update info_ptr data and
-     * then get rowbytes and channels */
-
-    png_read_update_info(png_ptr, info_ptr);
-
-    mainprog_ptr->rowbytes = (int)png_get_rowbytes(png_ptr, info_ptr);
-    mainprog_ptr->channels = png_get_channels(png_ptr, info_ptr);
-
-
-    /* Call the main program to allocate memory for the image buffer and
-     * initialize windows and whatnot.  (The old-style function-pointer
-     * invocation is used for compatibility with a few supposedly ANSI
-     * compilers that nevertheless barf on "fn_ptr()"-style syntax.) */
-
-    (*mainprog_ptr->mainprog_init)();
-
-
-    /* and that takes care of initialization */
-
-    return;
-}
-
-
-
-
-
-static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row,
-                                  png_uint_32 row_num, int pass)
-{
-    mainprog_info  *mainprog_ptr;
-
-
-    /* first check whether the row differs from the previous pass; if not,
-     * nothing to combine or display */
-
-    if (!new_row)
-        return;
-
-
-    /* retrieve the pointer to our special-purpose struct so we can access
-     * the old rows and image-display callback function */
-
-    mainprog_ptr = png_get_progressive_ptr(png_ptr);
-
-
-    /* save the pass number for optional use by the front end */
-
-    mainprog_ptr->pass = pass;
-
-
-    /* have libpng either combine the new row data with the existing row data
-     * from previous passes (if interlaced) or else just copy the new row
-     * into the main program's image buffer */
-
-    png_progressive_combine_row(png_ptr, mainprog_ptr->row_pointers[row_num],
-      new_row);
-
-
-    /* finally, call the display routine in the main program with the number
-     * of the row we just updated */
-
-    (*mainprog_ptr->mainprog_display_row)(row_num);
-
-
-    /* and we're ready for more */
-
-    return;
-}
-
-
-
-
-
-static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr)
-{
-    mainprog_info  *mainprog_ptr;
-
-
-    /* retrieve the pointer to our special-purpose struct */
-
-    mainprog_ptr = png_get_progressive_ptr(png_ptr);
-
-
-    /* let the main program know that it should flush any buffered image
-     * data to the display now and set a "done" flag or whatever, but note
-     * that it SHOULD NOT DESTROY THE PNG STRUCTS YET--in other words, do
-     * NOT call readpng2_cleanup() either here or in the finish_display()
-     * routine; wait until control returns to the main program via
-     * readpng2_decode_data() */
-
-    (*mainprog_ptr->mainprog_finish_display)();
-
-
-    /* all done */
-
-    return;
-}
-
-
-
-
-
-void readpng2_cleanup(mainprog_info *mainprog_ptr)
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-    if (png_ptr && info_ptr)
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-
-    mainprog_ptr->png_ptr = NULL;
-    mainprog_ptr->info_ptr = NULL;
-}
-
-
-
-
-
-static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg)
-{
-    mainprog_info  *mainprog_ptr;
-
-    /* This function, aside from the extra step of retrieving the "error
-     * pointer" (below) and the fact that it exists within the application
-     * rather than within libpng, is essentially identical to libpng's
-     * default error handler.  The second point is critical:  since both
-     * setjmp() and longjmp() are called from the same code, they are
-     * guaranteed to have compatible notions of how big a jmp_buf is,
-     * regardless of whether _BSD_SOURCE or anything else has (or has not)
-     * been defined. */
-
-    fprintf(stderr, "readpng2 libpng error: %s\n", msg);
-    fflush(stderr);
-
-    mainprog_ptr = png_get_error_ptr(png_ptr);
-    if (mainprog_ptr == NULL) {         /* we are completely hosed now */
-        fprintf(stderr,
-          "readpng2 severe error:  jmpbuf not recoverable; terminating.\n");
-        fflush(stderr);
-        exit(99);
-    }
-
-    longjmp(mainprog_ptr->jmpbuf, 1);
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/readpng2.h b/tkimg1.3/libpng/contrib/gregbook/readpng2.h
deleted file mode 100644
index 7caa9d9..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/readpng2.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng2 - progressive-model PNG display program                 readpng2.h
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#ifndef TRUE
-#  define TRUE 1
-#  define FALSE 0
-#endif
-
-#ifndef MAX
-#  define MAX(a,b)  ((a) > (b)? (a) : (b))
-#  define MIN(a,b)  ((a) < (b)? (a) : (b))
-#endif
-
-#ifdef DEBUG
-#  define Trace(x)  {fprintf x ; fflush(stderr); fflush(stdout);}
-#else
-#  define Trace(x)  ;
-#endif
-
-typedef unsigned char   uch;
-typedef unsigned short  ush;
-typedef unsigned long   ulg;
-
-typedef struct _mainprog_info {
-    double display_exponent;
-    ulg width;
-    ulg height;
-    void *png_ptr;
-    void *info_ptr;
-    void (*mainprog_init)(void);
-    void (*mainprog_display_row)(ulg row_num);
-    void (*mainprog_finish_display)(void);
-    uch *image_data;
-    uch **row_pointers;
-    jmp_buf jmpbuf;
-    int passes;              /* not used */
-    int pass;
-    int rowbytes;
-    int channels;
-    int need_bgcolor;
-#if (defined(__i386__) || defined(_M_IX86))
-    int nommxfilters;
-    int nommxcombine;
-    int nommxinterlace;
-#endif
-    int done;
-    uch bg_red;
-    uch bg_green;
-    uch bg_blue;
-} mainprog_info;
-
-
-/* prototypes for public functions in readpng2.c */
-
-void readpng2_version_info(void);
-
-int readpng2_check_sig(uch *sig, int num);
-
-int readpng2_init(mainprog_info *mainprog_ptr);
-
-int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length);
-
-void readpng2_cleanup(mainprog_info *mainprog_ptr);
diff --git a/tkimg1.3/libpng/contrib/gregbook/rpng-win.c b/tkimg1.3/libpng/contrib/gregbook/rpng-win.c
deleted file mode 100644
index b84a7fc..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/rpng-win.c
+++ /dev/null
@@ -1,642 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng - simple PNG display program                             rpng-win.c
-
-   This program decodes and displays PNG images, with gamma correction and
-   optionally with a user-specified background color (in case the image has
-   transparency).  It is very nearly the most basic PNG viewer possible.
-   This version is for 32-bit Windows; it may compile under 16-bit Windows
-   with a little tweaking (or maybe not).
-
-   to do:
-    - handle quoted command-line args (especially filenames with spaces)
-    - have minimum window width:  oh well
-    - use %.1023s to simplify truncation of title-bar string?
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.00:  initial public release
-    - 1.01:  modified to allow abbreviated options; fixed long/ulong mis-
-              match; switched to png_jmpbuf() macro
-    - 1.02:  added extra set of parentheses to png_jmpbuf() macro; fixed
-              command-line parsing bug
-    - 1.10:  enabled "message window"/console (thanks to David Geldreich)
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#define PROGNAME  "rpng-win"
-#define LONGNAME  "Simple PNG Viewer for Windows"
-#define VERSION   "1.20 of 28 May 2001"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <windows.h>
-#include <conio.h>      /* only for _getch() */
-
-/* #define DEBUG  :  this enables the Trace() macros */
-
-#include "readpng.h"    /* typedefs, common macros, readpng prototypes */
-
-
-/* could just include png.h, but this macro is the only thing we need
- * (name and typedefs changed to local versions); note that side effects
- * only happen with alpha (which could easily be avoided with
- * "ush acopy = (alpha);") */
-
-#define alpha_composite(composite, fg, alpha, bg) {               \
-    ush temp = ((ush)(fg)*(ush)(alpha) +                          \
-                (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128);  \
-    (composite) = (uch)((temp + (temp >> 8)) >> 8);               \
-}
-
-
-/* local prototypes */
-static int        rpng_win_create_window(HINSTANCE hInst, int showmode);
-static int        rpng_win_display_image(void);
-static void       rpng_win_cleanup(void);
-LRESULT CALLBACK  rpng_win_wndproc(HWND, UINT, WPARAM, LPARAM);
-
-
-static char titlebar[1024], *window_name = titlebar;
-static char *progname = PROGNAME;
-static char *appname = LONGNAME;
-static char *icon_name = PROGNAME;     /* GRR:  not (yet) used */
-static char *filename;
-static FILE *infile;
-
-static char *bgstr;
-static uch bg_red=0, bg_green=0, bg_blue=0;
-
-static double display_exponent;
-
-static ulg image_width, image_height, image_rowbytes;
-static int image_channels;
-static uch *image_data;
-
-/* Windows-specific variables */
-static ulg wimage_rowbytes;
-static uch *dib;
-static uch *wimage_data;
-static BITMAPINFOHEADER *bmih;
-
-static HWND global_hwnd;
-
-
-
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
-{
-    char *args[1024];                 /* arbitrary limit, but should suffice */
-    char *p, *q, **argv = args;
-    int argc = 0;
-    int rc, alen, flen;
-    int error = 0;
-    int have_bg = FALSE;
-    double LUT_exponent;              /* just the lookup table */
-    double CRT_exponent = 2.2;        /* just the monitor */
-    double default_display_exponent;  /* whole display system */
-    MSG msg;
-
-
-    filename = (char *)NULL;
-
-
-    /* First reenable console output, which normally goes to the bit bucket
-     * for windowed apps.  Closing the console window will terminate the
-     * app.  Thanks to David.Geldreich at realviz.com for supplying the magical
-     * incantation. */
-
-    AllocConsole();
-    freopen("CONOUT$", "a", stderr);
-    freopen("CONOUT$", "a", stdout);
-
-
-    /* Next set the default value for our display-system exponent, i.e.,
-     * the product of the CRT exponent and the exponent corresponding to
-     * the frame-buffer's lookup table (LUT), if any.  This is not an
-     * exhaustive list of LUT values (e.g., OpenStep has a lot of weird
-     * ones), but it should cover 99% of the current possibilities.  And
-     * yes, these ifdefs are completely wasted in a Windows program... */
-
-#if defined(NeXT)
-    LUT_exponent = 1.0 / 2.2;
-    /*
-    if (some_next_function_that_returns_gamma(&next_gamma))
-        LUT_exponent = 1.0 / next_gamma;
-     */
-#elif defined(sgi)
-    LUT_exponent = 1.0 / 1.7;
-    /* there doesn't seem to be any documented function to get the
-     * "gamma" value, so we do it the hard way */
-    infile = fopen("/etc/config/system.glGammaVal", "r");
-    if (infile) {
-        double sgi_gamma;
-
-        fgets(tmpline, 80, infile);
-        fclose(infile);
-        sgi_gamma = atof(tmpline);
-        if (sgi_gamma > 0.0)
-            LUT_exponent = 1.0 / sgi_gamma;
-    }
-#elif defined(Macintosh)
-    LUT_exponent = 1.8 / 2.61;
-    /*
-    if (some_mac_function_that_returns_gamma(&mac_gamma))
-        LUT_exponent = mac_gamma / 2.61;
-     */
-#else
-    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */
-#endif
-
-    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */
-    default_display_exponent = LUT_exponent * CRT_exponent;
-
-
-    /* If the user has set the SCREEN_GAMMA environment variable as suggested
-     * (somewhat imprecisely) in the libpng documentation, use that; otherwise
-     * use the default value we just calculated.  Either way, the user may
-     * override this via a command-line option. */
-
-    if ((p = getenv("SCREEN_GAMMA")) != NULL)
-        display_exponent = atof(p);
-    else
-        display_exponent = default_display_exponent;
-
-
-    /* Windows really hates command lines, so we have to set up our own argv.
-     * Note that we do NOT bother with quoted arguments here, so don't use
-     * filenames with spaces in 'em! */
-
-    argv[argc++] = PROGNAME;
-    p = cmd;
-    for (;;) {
-        if (*p == ' ')
-            while (*++p == ' ')
-                ;
-        /* now p points at the first non-space after some spaces */
-        if (*p == '\0')
-            break;    /* nothing after the spaces:  done */
-        argv[argc++] = q = p;
-        while (*q && *q != ' ')
-            ++q;
-        /* now q points at a space or the end of the string */
-        if (*q == '\0')
-            break;    /* last argv already terminated; quit */
-        *q = '\0';    /* change space to terminator */
-        p = q + 1;
-    }
-    argv[argc] = NULL;   /* terminate the argv array itself */
-
-
-    /* Now parse the command line for options and the PNG filename. */
-
-    while (*++argv && !error) {
-        if (!strncmp(*argv, "-gamma", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                display_exponent = atof(*argv);
-                if (display_exponent <= 0.0)
-                    ++error;
-            }
-        } else if (!strncmp(*argv, "-bgcolor", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                bgstr = *argv;
-                if (strlen(bgstr) != 7 || bgstr[0] != '#')
-                    ++error;
-                else
-                    have_bg = TRUE;
-            }
-        } else {
-            if (**argv != '-') {
-                filename = *argv;
-                if (argv[1])   /* shouldn't be any more args after filename */
-                    ++error;
-            } else
-                ++error;   /* not expecting any other options */
-        }
-    }
-
-    if (!filename) {
-        ++error;
-    } else if (!(infile = fopen(filename, "rb"))) {
-        fprintf(stderr, PROGNAME ":  can't open PNG file [%s]\n", filename);
-        ++error;
-    } else {
-        if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) {
-            switch (rc) {
-                case 1:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] is not a PNG file: incorrect signature\n",
-                      filename);
-                    break;
-                case 2:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] has bad IHDR (libpng longjmp)\n",
-                      filename);
-                    break;
-                case 4:
-                    fprintf(stderr, PROGNAME ":  insufficient memory\n");
-                    break;
-                default:
-                    fprintf(stderr, PROGNAME
-                      ":  unknown readpng_init() error\n");
-                    break;
-            }
-            ++error;
-        }
-        if (error)
-            fclose(infile);
-    }
-
-
-    /* usage screen */
-
-    if (error) {
-        int ch;
-
-        fprintf(stderr, "\n%s %s:  %s\n\n", PROGNAME, VERSION, appname);
-        readpng_version_info();
-        fprintf(stderr, "\n"
-          "Usage:  %s [-gamma exp] [-bgcolor bg] file.png\n"
-          "    exp \ttransfer-function exponent (``gamma'') of the display\n"
-          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
-          "\t\t  to the product of the lookup-table exponent (varies)\n"
-          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
-          "    bg  \tdesired background color in 7-character hex RGB format\n"
-          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
-          "\t\t  used with transparent images\n"
-          "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
-          "Press Q or Esc to quit this usage screen.\n"
-          "\n", PROGNAME, default_display_exponent);
-        do
-            ch = _getch();
-        while (ch != 'q' && ch != 'Q' && ch != 0x1B);
-        exit(1);
-    } else {
-        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);
-        fprintf(stderr,
-          "\n   [console window:  closing this window will terminate %s]\n\n",
-          PROGNAME);
-    }
-
-
-    /* set the title-bar string, but make sure buffer doesn't overflow */
-
-    alen = strlen(appname);
-    flen = strlen(filename);
-    if (alen + flen + 3 > 1023)
-        sprintf(titlebar, "%s:  ...%s", appname, filename+(alen+flen+6-1023));
-    else
-        sprintf(titlebar, "%s:  %s", appname, filename);
-
-
-    /* if the user didn't specify a background color on the command line,
-     * check for one in the PNG file--if not, the initialized values of 0
-     * (black) will be used */
-
-    if (have_bg)
-        sscanf(bgstr+1, "%2x%2x%2x", &bg_red, &bg_green, &bg_blue);
-    else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) {
-        readpng_cleanup(TRUE);
-        fprintf(stderr, PROGNAME
-          ":  libpng error while checking for background color\n");
-        exit(2);
-    }
-
-
-    /* do the basic Windows initialization stuff, make the window and fill it
-     * with the background color */
-
-    if (rpng_win_create_window(hInst, showmode))
-        exit(2);
-
-
-    /* decode the image, all at once */
-
-    Trace((stderr, "calling readpng_get_image()\n"))
-    image_data = readpng_get_image(display_exponent, &image_channels,
-      &image_rowbytes);
-    Trace((stderr, "done with readpng_get_image()\n"))
-
-
-    /* done with PNG file, so clean up to minimize memory usage (but do NOT
-     * nuke image_data!) */
-
-    readpng_cleanup(FALSE);
-    fclose(infile);
-
-    if (!image_data) {
-        fprintf(stderr, PROGNAME ":  unable to decode PNG image\n");
-        exit(3);
-    }
-
-
-    /* display image (composite with background if requested) */
-
-    Trace((stderr, "calling rpng_win_display_image()\n"))
-    if (rpng_win_display_image()) {
-        free(image_data);
-        exit(4);
-    }
-    Trace((stderr, "done with rpng_win_display_image()\n"))
-
-
-    /* wait for the user to tell us when to quit */
-
-    printf(
-      "Done.  Press Q, Esc or mouse button 1 (within image window) to quit.\n");
-    fflush(stdout);
-
-    while (GetMessage(&msg, NULL, 0, 0)) {
-        TranslateMessage(&msg);
-        DispatchMessage(&msg);
-    }
-
-
-    /* OK, we're done:  clean up all image and Windows resources and go away */
-
-    rpng_win_cleanup();
-
-    return msg.wParam;
-}
-
-
-
-
-
-static int rpng_win_create_window(HINSTANCE hInst, int showmode)
-{
-    uch *dest;
-    int extra_width, extra_height;
-    ulg i, j;
-    WNDCLASSEX wndclass;
-
-
-/*---------------------------------------------------------------------------
-    Allocate memory for the display-specific version of the image (round up
-    to multiple of 4 for Windows DIB).
-  ---------------------------------------------------------------------------*/
-
-    wimage_rowbytes = ((3*image_width + 3L) >> 2) << 2;
-
-    if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) +
-                              wimage_rowbytes*image_height)))
-    {
-        return 4;   /* fail */
-    }
-
-/*---------------------------------------------------------------------------
-    Initialize the DIB.  Negative height means to use top-down BMP ordering
-    (must be uncompressed, but that's what we want).  Bit count of 1, 4 or 8
-    implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values
-    directly => wimage_data begins immediately after BMP header.
-  ---------------------------------------------------------------------------*/
-
-    memset(dib, 0, sizeof(BITMAPINFOHEADER));
-    bmih = (BITMAPINFOHEADER *)dib;
-    bmih->biSize = sizeof(BITMAPINFOHEADER);
-    bmih->biWidth = image_width;
-    bmih->biHeight = -((long)image_height);
-    bmih->biPlanes = 1;
-    bmih->biBitCount = 24;
-    bmih->biCompression = 0;
-    wimage_data = dib + sizeof(BITMAPINFOHEADER);
-
-/*---------------------------------------------------------------------------
-    Fill in background color (black by default); data are in BGR order.
-  ---------------------------------------------------------------------------*/
-
-    for (j = 0;  j < image_height;  ++j) {
-        dest = wimage_data + j*wimage_rowbytes;
-        for (i = image_width;  i > 0;  --i) {
-            *dest++ = bg_blue;
-            *dest++ = bg_green;
-            *dest++ = bg_red;
-        }
-    }
-
-/*---------------------------------------------------------------------------
-    Set the window parameters.
-  ---------------------------------------------------------------------------*/
-
-    memset(&wndclass, 0, sizeof(wndclass));
-
-    wndclass.cbSize = sizeof(wndclass);
-    wndclass.style = CS_HREDRAW | CS_VREDRAW;
-    wndclass.lpfnWndProc = rpng_win_wndproc;
-    wndclass.hInstance = hInst;
-    wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
-    wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
-    wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH);
-    wndclass.lpszMenuName = NULL;
-    wndclass.lpszClassName = progname;
-    wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
-
-    RegisterClassEx(&wndclass);
-
-/*---------------------------------------------------------------------------
-    Finally, create the window.
-  ---------------------------------------------------------------------------*/
-
-    extra_width  = 2*(GetSystemMetrics(SM_CXBORDER) +
-                      GetSystemMetrics(SM_CXDLGFRAME));
-    extra_height = 2*(GetSystemMetrics(SM_CYBORDER) +
-                      GetSystemMetrics(SM_CYDLGFRAME)) +
-                      GetSystemMetrics(SM_CYCAPTION);
-
-    global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW,
-      CW_USEDEFAULT, CW_USEDEFAULT, image_width+extra_width,
-      image_height+extra_height, NULL, NULL, hInst, NULL);
-
-    ShowWindow(global_hwnd, showmode);
-    UpdateWindow(global_hwnd);
-
-    return 0;
-
-} /* end function rpng_win_create_window() */
-
-
-
-
-
-static int rpng_win_display_image()
-{
-    uch *src, *dest;
-    uch r, g, b, a;
-    ulg i, row, lastrow;
-    RECT rect;
-
-
-    Trace((stderr, "beginning display loop (image_channels == %d)\n",
-      image_channels))
-    Trace((stderr, "(width = %ld, rowbytes = %ld, wimage_rowbytes = %d)\n",
-      image_width, image_rowbytes, wimage_rowbytes))
-
-
-/*---------------------------------------------------------------------------
-    Blast image data to buffer.  This whole routine takes place before the
-    message loop begins, so there's no real point in any pseudo-progressive
-    display...
-  ---------------------------------------------------------------------------*/
-
-    for (lastrow = row = 0;  row < image_height;  ++row) {
-        src = image_data + row*image_rowbytes;
-        dest = wimage_data + row*wimage_rowbytes;
-        if (image_channels == 3) {
-            for (i = image_width;  i > 0;  --i) {
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                *dest++ = b;
-                *dest++ = g;   /* note reverse order */
-                *dest++ = r;
-            }
-        } else /* if (image_channels == 4) */ {
-            for (i = image_width;  i > 0;  --i) {
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                a = *src++;
-                if (a == 255) {
-                    *dest++ = b;
-                    *dest++ = g;
-                    *dest++ = r;
-                } else if (a == 0) {
-                    *dest++ = bg_blue;
-                    *dest++ = bg_green;
-                    *dest++ = bg_red;
-                } else {
-                    /* this macro (copied from png.h) composites the
-                     * foreground and background values and puts the
-                     * result into the first argument; there are no
-                     * side effects with the first argument */
-                    alpha_composite(*dest++, b, a, bg_blue);
-                    alpha_composite(*dest++, g, a, bg_green);
-                    alpha_composite(*dest++, r, a, bg_red);
-                }
-            }
-        }
-        /* display after every 16 lines */
-        if (((row+1) & 0xf) == 0) {
-            rect.left = 0L;
-            rect.top = (LONG)lastrow;
-            rect.right = (LONG)image_width;      /* possibly off by one? */
-            rect.bottom = (LONG)lastrow + 16L;   /* possibly off by one? */
-            InvalidateRect(global_hwnd, &rect, FALSE);
-            UpdateWindow(global_hwnd);     /* similar to XFlush() */
-            lastrow = row + 1;
-        }
-    }
-
-    Trace((stderr, "calling final image-flush routine\n"))
-    if (lastrow < image_height) {
-        rect.left = 0L;
-        rect.top = (LONG)lastrow;
-        rect.right = (LONG)image_width;      /* possibly off by one? */
-        rect.bottom = (LONG)image_height;    /* possibly off by one? */
-        InvalidateRect(global_hwnd, &rect, FALSE);
-        UpdateWindow(global_hwnd);     /* similar to XFlush() */
-    }
-
-/*
-    last param determines whether or not background is wiped before paint
-    InvalidateRect(global_hwnd, NULL, TRUE);
-    UpdateWindow(global_hwnd);
- */
-
-    return 0;
-}
-
-
-
-
-
-static void rpng_win_cleanup()
-{
-    if (image_data) {
-        free(image_data);
-        image_data = NULL;
-    }
-
-    if (dib) {
-        free(dib);
-        dib = NULL;
-    }
-}
-
-
-
-
-
-LRESULT CALLBACK rpng_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP)
-{
-    HDC         hdc;
-    PAINTSTRUCT ps;
-    int rc;
-
-    switch (iMsg) {
-        case WM_CREATE:
-            /* one-time processing here, if any */
-            return 0;
-
-        case WM_PAINT:
-            hdc = BeginPaint(hwnd, &ps);
-                    /*                    dest                          */
-            rc = StretchDIBits(hdc, 0, 0, image_width, image_height,
-                    /*                    source                        */
-                                    0, 0, image_width, image_height,
-                                    wimage_data, (BITMAPINFO *)bmih,
-                    /*              iUsage: no clue                     */
-                                    0, SRCCOPY);
-            EndPaint(hwnd, &ps);
-            return 0;
-
-        /* wait for the user to tell us when to quit */
-        case WM_CHAR:
-            switch (wP) {      /* only need one, so ignore repeat count */
-                case 'q':
-                case 'Q':
-                case 0x1B:     /* Esc key */
-                    PostQuitMessage(0);
-            }
-            return 0;
-
-        case WM_LBUTTONDOWN:   /* another way of quitting */
-        case WM_DESTROY:
-            PostQuitMessage(0);
-            return 0;
-    }
-
-    return DefWindowProc(hwnd, iMsg, wP, lP);
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/rpng-x.c b/tkimg1.3/libpng/contrib/gregbook/rpng-x.c
deleted file mode 100644
index e787ef1..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/rpng-x.c
+++ /dev/null
@@ -1,858 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng - simple PNG display program                               rpng-x.c
-
-   This program decodes and displays PNG images, with gamma correction and
-   optionally with a user-specified background color (in case the image has
-   transparency).  It is very nearly the most basic PNG viewer possible.
-   This version is for the X Window System (tested by author under Unix and
-   by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking).
-
-   to do:
-    - 8-bit support
-    - use %.1023s to simplify truncation of title-bar string?
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.01:  initial public release
-    - 1.02:  modified to allow abbreviated options; fixed long/ulong mis-
-              match; switched to png_jmpbuf() macro
-    - 1.10:  added support for non-default visuals; fixed X pixel-conversion
-    - 1.11:  added extra set of parentheses to png_jmpbuf() macro; fixed
-              command-line parsing bug
-    - 1.12:  fixed small X memory leak (thanks to Francois Petitjean)
-    - 1.13:  fixed XFreeGC() crash bug
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#define PROGNAME  "rpng-x"
-#define LONGNAME  "Simple PNG Viewer for X"
-#define VERSION   "1.13 of 16 August 2001"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xos.h>
-#include <X11/keysym.h>
-
-/* #define DEBUG  :  this enables the Trace() macros */
-
-#include "readpng.h"   /* typedefs, common macros, readpng prototypes */
-
-
-/* could just include png.h, but this macro is the only thing we need
- * (name and typedefs changed to local versions); note that side effects
- * only happen with alpha (which could easily be avoided with
- * "ush acopy = (alpha);") */
-
-#define alpha_composite(composite, fg, alpha, bg) {               \
-    ush temp = ((ush)(fg)*(ush)(alpha) +                          \
-                (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128);  \
-    (composite) = (uch)((temp + (temp >> 8)) >> 8);               \
-}
-
-
-/* local prototypes */
-static int  rpng_x_create_window(void);
-static int  rpng_x_display_image(void);
-static void rpng_x_cleanup(void);
-static int  rpng_x_msb(ulg u32val);
-
-
-static char titlebar[1024], *window_name = titlebar;
-static char *appname = LONGNAME;
-static char *icon_name = PROGNAME;
-static char *filename;
-static FILE *infile;
-
-static char *bgstr;
-static uch bg_red=0, bg_green=0, bg_blue=0;
-
-static double display_exponent;
-
-static ulg image_width, image_height, image_rowbytes;
-static int image_channels;
-static uch *image_data;
-
-/* X-specific variables */
-static char *displayname;
-static XImage *ximage;
-static Display *display;
-static int depth;
-static Visual *visual;
-static XVisualInfo *visual_list;
-static int RShift, GShift, BShift;
-static ulg RMask, GMask, BMask;
-static Window window;
-static GC gc;
-static Colormap colormap;
-
-static int have_nondefault_visual = FALSE;
-static int have_colormap = FALSE;
-static int have_window = FALSE;
-static int have_gc = FALSE;
-/*
-ulg numcolors=0, pixels[256];
-ush reds[256], greens[256], blues[256];
- */
-
-
-
-
-int main(int argc, char **argv)
-{
-#ifdef sgi
-    char tmpline[80];
-#endif
-    char *p;
-    int rc, alen, flen;
-    int error = 0;
-    int have_bg = FALSE;
-    double LUT_exponent;               /* just the lookup table */
-    double CRT_exponent = 2.2;         /* just the monitor */
-    double default_display_exponent;   /* whole display system */
-    XEvent e;
-    KeySym k;
-
-
-    displayname = (char *)NULL;
-    filename = (char *)NULL;
-
-
-    /* First set the default value for our display-system exponent, i.e.,
-     * the product of the CRT exponent and the exponent corresponding to
-     * the frame-buffer's lookup table (LUT), if any.  This is not an
-     * exhaustive list of LUT values (e.g., OpenStep has a lot of weird
-     * ones), but it should cover 99% of the current possibilities. */
-
-#if defined(NeXT)
-    LUT_exponent = 1.0 / 2.2;
-    /*
-    if (some_next_function_that_returns_gamma(&next_gamma))
-        LUT_exponent = 1.0 / next_gamma;
-     */
-#elif defined(sgi)
-    LUT_exponent = 1.0 / 1.7;
-    /* there doesn't seem to be any documented function to get the
-     * "gamma" value, so we do it the hard way */
-    infile = fopen("/etc/config/system.glGammaVal", "r");
-    if (infile) {
-        double sgi_gamma;
-
-        fgets(tmpline, 80, infile);
-        fclose(infile);
-        sgi_gamma = atof(tmpline);
-        if (sgi_gamma > 0.0)
-            LUT_exponent = 1.0 / sgi_gamma;
-    }
-#elif defined(Macintosh)
-    LUT_exponent = 1.8 / 2.61;
-    /*
-    if (some_mac_function_that_returns_gamma(&mac_gamma))
-        LUT_exponent = mac_gamma / 2.61;
-     */
-#else
-    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */
-#endif
-
-    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */
-    default_display_exponent = LUT_exponent * CRT_exponent;
-
-
-    /* If the user has set the SCREEN_GAMMA environment variable as suggested
-     * (somewhat imprecisely) in the libpng documentation, use that; otherwise
-     * use the default value we just calculated.  Either way, the user may
-     * override this via a command-line option. */
-
-    if ((p = getenv("SCREEN_GAMMA")) != NULL)
-        display_exponent = atof(p);
-    else
-        display_exponent = default_display_exponent;
-
-
-    /* Now parse the command line for options and the PNG filename. */
-
-    while (*++argv && !error) {
-        if (!strncmp(*argv, "-display", 2)) {
-            if (!*++argv)
-                ++error;
-            else
-                displayname = *argv;
-        } else if (!strncmp(*argv, "-gamma", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                display_exponent = atof(*argv);
-                if (display_exponent <= 0.0)
-                    ++error;
-            }
-        } else if (!strncmp(*argv, "-bgcolor", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                bgstr = *argv;
-                if (strlen(bgstr) != 7 || bgstr[0] != '#')
-                    ++error; 
-                else 
-                    have_bg = TRUE;
-            }
-        } else {
-            if (**argv != '-') {
-                filename = *argv;
-                if (argv[1])   /* shouldn't be any more args after filename */
-                    ++error;
-            } else
-                ++error;   /* not expecting any other options */
-        }
-    }
-
-    if (!filename) {
-        ++error;
-    } else if (!(infile = fopen(filename, "rb"))) {
-        fprintf(stderr, PROGNAME ":  can't open PNG file [%s]\n", filename);
-        ++error;
-    } else {
-        if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) {
-            switch (rc) {
-                case 1:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] is not a PNG file: incorrect signature\n",
-                      filename);
-                    break;
-                case 2:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] has bad IHDR (libpng longjmp)\n",
-                      filename);
-                    break;
-                case 4:
-                    fprintf(stderr, PROGNAME ":  insufficient memory\n");
-                    break;
-                default:
-                    fprintf(stderr, PROGNAME
-                      ":  unknown readpng_init() error\n");
-                    break;
-            }
-            ++error;
-        } else {
-            display = XOpenDisplay(displayname);
-            if (!display) {
-                readpng_cleanup(TRUE);
-                fprintf(stderr, PROGNAME ":  can't open X display [%s]\n",
-                  displayname? displayname : "default");
-                ++error;
-            }
-        }
-        if (error)
-            fclose(infile);
-    }
-
-
-    /* usage screen */
-
-    if (error) {
-        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);
-        readpng_version_info();
-        fprintf(stderr, "\n"
-          "Usage:  %s [-display xdpy] [-gamma exp] [-bgcolor bg] file.png\n"
-          "    xdpy\tname of the target X display (e.g., ``hostname:0'')\n"
-          "    exp \ttransfer-function exponent (``gamma'') of the display\n"
-          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
-          "\t\t  to the product of the lookup-table exponent (varies)\n"
-          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
-          "    bg  \tdesired background color in 7-character hex RGB format\n"
-          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
-          "\t\t  used with transparent images\n"
-          "\nPress Q, Esc or mouse button 1 (within image window, after image\n"
-          "is displayed) to quit.\n"
-          "\n", PROGNAME, default_display_exponent);
-        exit(1);
-    }
-
-
-    /* set the title-bar string, but make sure buffer doesn't overflow */
-
-    alen = strlen(appname);
-    flen = strlen(filename);
-    if (alen + flen + 3 > 1023)
-        sprintf(titlebar, "%s:  ...%s", appname, filename+(alen+flen+6-1023));
-    else
-        sprintf(titlebar, "%s:  %s", appname, filename);
-
-
-    /* if the user didn't specify a background color on the command line,
-     * check for one in the PNG file--if not, the initialized values of 0
-     * (black) will be used */
-
-    if (have_bg) {
-        unsigned r, g, b;   /* this approach quiets compiler warnings */
-
-        sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b);
-        bg_red   = (uch)r;
-        bg_green = (uch)g;
-        bg_blue  = (uch)b;
-    } else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) {
-        readpng_cleanup(TRUE);
-        fprintf(stderr, PROGNAME
-          ":  libpng error while checking for background color\n");
-        exit(2);
-    }
-
-
-    /* do the basic X initialization stuff, make the window and fill it
-     * with the background color */
-
-    if (rpng_x_create_window())
-        exit(2);
-
-
-    /* decode the image, all at once */
-
-    Trace((stderr, "calling readpng_get_image()\n"))
-    image_data = readpng_get_image(display_exponent, &image_channels,
-      &image_rowbytes);
-    Trace((stderr, "done with readpng_get_image()\n"))
-
-
-    /* done with PNG file, so clean up to minimize memory usage (but do NOT
-     * nuke image_data!) */
-
-    readpng_cleanup(FALSE);
-    fclose(infile);
-
-    if (!image_data) {
-        fprintf(stderr, PROGNAME ":  unable to decode PNG image\n");
-        exit(3);
-    }
-
-
-    /* display image (composite with background if requested) */
-
-    Trace((stderr, "calling rpng_x_display_image()\n"))
-    if (rpng_x_display_image()) {
-        free(image_data);
-        exit(4);
-    }
-    Trace((stderr, "done with rpng_x_display_image()\n"))
-
-
-    /* wait for the user to tell us when to quit */
-
-    printf(
-      "Done.  Press Q, Esc or mouse button 1 (within image window) to quit.\n");
-    fflush(stdout);
-
-    do
-        XNextEvent(display, &e);
-    while (!(e.type == ButtonPress && e.xbutton.button == Button1) &&
-           !(e.type == KeyPress &&    /*  v--- or 1 for shifted keys */
-             ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) ));
-
-
-    /* OK, we're done:  clean up all image and X resources and go away */
-
-    rpng_x_cleanup();
-
-    return 0;
-}
-
-
-
-
-
-static int rpng_x_create_window(void)
-{
-    uch *xdata;
-    int need_colormap = FALSE;
-    int screen, pad;
-    ulg bg_pixel = 0L;
-    ulg attrmask;
-    Window root;
-    XEvent e;
-    XGCValues gcvalues;
-    XSetWindowAttributes attr;
-    XSizeHints *size_hints;
-    XTextProperty windowName, *pWindowName = &windowName;
-    XTextProperty iconName, *pIconName = &iconName;
-    XVisualInfo visual_info;
-    XWMHints *wm_hints;
-
-
-    screen = DefaultScreen(display);
-    depth = DisplayPlanes(display, screen);
-    root = RootWindow(display, screen);
-
-#ifdef DEBUG
-    XSynchronize(display, True);
-#endif
-
-#if 0
-/* GRR:  add 8-bit support */
-    if (/* depth != 8 && */ depth != 16 && depth != 24 && depth != 32) {
-        fprintf(stderr,
-          "screen depth %d not supported (only 16-, 24- or 32-bit TrueColor)\n",
-          depth);
-        return 2;
-    }
-
-    XMatchVisualInfo(display, screen, depth,
-      (depth == 8)? PseudoColor : TrueColor, &visual_info);
-    visual = visual_info.visual;
-#else
-    if (depth != 16 && depth != 24 && depth != 32) {
-        int visuals_matched = 0;
-
-        Trace((stderr, "default depth is %d:  checking other visuals\n",
-          depth))
-
-        /* 24-bit first */
-        visual_info.screen = screen;
-        visual_info.depth = 24;
-        visual_list = XGetVisualInfo(display,
-          VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched);
-        if (visuals_matched == 0) {
-/* GRR:  add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */
-            fprintf(stderr, "default screen depth %d not supported, and no"
-              " 24-bit visuals found\n", depth);
-            return 2;
-        }
-        Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n",
-          visuals_matched))
-        visual = visual_list[0].visual;
-        depth = visual_list[0].depth;
-/*
-        colormap_size = visual_list[0].colormap_size;
-        visual_class = visual->class;
-        visualID = XVisualIDFromVisual(visual);
- */
-        have_nondefault_visual = TRUE;
-        need_colormap = TRUE;
-    } else {
-        XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info);
-        visual = visual_info.visual;
-    }
-#endif
-
-    RMask = visual->red_mask;
-    GMask = visual->green_mask;
-    BMask = visual->blue_mask;
-
-/* GRR:  add/check 8-bit support */
-    if (depth == 8 || need_colormap) {
-        colormap = XCreateColormap(display, root, visual, AllocNone);
-        if (!colormap) {
-            fprintf(stderr, "XCreateColormap() failed\n");
-            return 2;
-        }
-        have_colormap = TRUE;
-    }
-    if (depth == 15 || depth == 16) {
-        RShift = 15 - rpng_x_msb(RMask);    /* these are right-shifts */
-        GShift = 15 - rpng_x_msb(GMask);
-        BShift = 15 - rpng_x_msb(BMask);
-    } else if (depth > 16) {
-#define NO_24BIT_MASKS
-#ifdef NO_24BIT_MASKS
-        RShift = rpng_x_msb(RMask) - 7;     /* these are left-shifts */
-        GShift = rpng_x_msb(GMask) - 7;
-        BShift = rpng_x_msb(BMask) - 7;
-#else
-        RShift = 7 - rpng_x_msb(RMask);     /* these are right-shifts, too */
-        GShift = 7 - rpng_x_msb(GMask);
-        BShift = 7 - rpng_x_msb(BMask);
-#endif
-    }
-    if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) {
-        fprintf(stderr, "rpng internal logic error:  negative X shift(s)!\n");
-        return 2;
-    }
-
-/*---------------------------------------------------------------------------
-    Finally, create the window.
-  ---------------------------------------------------------------------------*/
-
-    attr.backing_store = Always;
-    attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask;
-    attrmask = CWBackingStore | CWEventMask;
-    if (have_nondefault_visual) {
-        attr.colormap = colormap;
-        attr.background_pixel = 0;
-        attr.border_pixel = 1;
-        attrmask |= CWColormap | CWBackPixel | CWBorderPixel;
-    }
-
-    window = XCreateWindow(display, root, 0, 0, image_width, image_height, 0,
-      depth, InputOutput, visual, attrmask, &attr);
-
-    if (window == None) {
-        fprintf(stderr, "XCreateWindow() failed\n");
-        return 2;
-    } else
-        have_window = TRUE;
-
-    if (depth == 8)
-        XSetWindowColormap(display, window, colormap);
-
-    if (!XStringListToTextProperty(&window_name, 1, pWindowName))
-        pWindowName = NULL;
-    if (!XStringListToTextProperty(&icon_name, 1, pIconName))
-        pIconName = NULL;
-
-    /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */
-
-    if ((size_hints = XAllocSizeHints()) != NULL) {
-        /* window will not be resizable */
-        size_hints->flags = PMinSize | PMaxSize;
-        size_hints->min_width = size_hints->max_width = (int)image_width;
-        size_hints->min_height = size_hints->max_height = (int)image_height;
-    }
-
-    if ((wm_hints = XAllocWMHints()) != NULL) {
-        wm_hints->initial_state = NormalState;
-        wm_hints->input = True;
-     /* wm_hints->icon_pixmap = icon_pixmap; */
-        wm_hints->flags = StateHint | InputHint  /* | IconPixmapHint */ ;
-    }
-
-    XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
-      size_hints, wm_hints, NULL);
-
-    /* various properties and hints no longer needed; free memory */
-    if (pWindowName)
-       XFree(pWindowName->value);
-    if (pIconName)
-       XFree(pIconName->value);
-    if (size_hints)
-        XFree(size_hints);
-    if (wm_hints)
-       XFree(wm_hints);
-
-    XMapWindow(display, window);
-
-    gc = XCreateGC(display, window, 0, &gcvalues);
-    have_gc = TRUE;
-
-/*---------------------------------------------------------------------------
-    Fill window with the specified background color.
-  ---------------------------------------------------------------------------*/
-
-    if (depth == 24 || depth == 32) {
-        bg_pixel = ((ulg)bg_red   << RShift) |
-                   ((ulg)bg_green << GShift) |
-                   ((ulg)bg_blue  << BShift);
-    } else if (depth == 16) {
-        bg_pixel = ((((ulg)bg_red   << 8) >> RShift) & RMask) |
-                   ((((ulg)bg_green << 8) >> GShift) & GMask) |
-                   ((((ulg)bg_blue  << 8) >> BShift) & BMask);
-    } else /* depth == 8 */ {
-
-        /* GRR:  add 8-bit support */
-
-    }
-
-    XSetForeground(display, gc, bg_pixel);
-    XFillRectangle(display, window, gc, 0, 0, image_width, image_height);
-
-/*---------------------------------------------------------------------------
-    Wait for first Expose event to do any drawing, then flush.
-  ---------------------------------------------------------------------------*/
-
-    do
-        XNextEvent(display, &e);
-    while (e.type != Expose || e.xexpose.count);
-
-    XFlush(display);
-
-/*---------------------------------------------------------------------------
-    Allocate memory for the X- and display-specific version of the image.
-  ---------------------------------------------------------------------------*/
-
-    if (depth == 24 || depth == 32) {
-        xdata = (uch *)malloc(4*image_width*image_height);
-        pad = 32;
-    } else if (depth == 16) {
-        xdata = (uch *)malloc(2*image_width*image_height);
-        pad = 16;
-    } else /* depth == 8 */ {
-        xdata = (uch *)malloc(image_width*image_height);
-        pad = 8;
-    }
-
-    if (!xdata) {
-        fprintf(stderr, PROGNAME ":  unable to allocate image memory\n");
-        return 4;
-    }
-
-    ximage = XCreateImage(display, visual, depth, ZPixmap, 0,
-      (char *)xdata, image_width, image_height, pad, 0);
-
-    if (!ximage) {
-        fprintf(stderr, PROGNAME ":  XCreateImage() failed\n");
-        free(xdata);
-        return 3;
-    }
-
-    /* to avoid testing the byte order every pixel (or doubling the size of
-     * the drawing routine with a giant if-test), we arbitrarily set the byte
-     * order to MSBFirst and let Xlib worry about inverting things on little-
-     * endian machines (like Linux/x86, old VAXen, etc.)--this is not the most
-     * efficient approach (the giant if-test would be better), but in the
-     * interest of clarity, we take the easy way out... */
-
-    ximage->byte_order = MSBFirst;
-
-    return 0;
-
-} /* end function rpng_x_create_window() */
-
-
-
-
-
-static int rpng_x_display_image(void)
-{
-    uch *src;
-    char *dest;
-    uch r, g, b, a;
-    ulg i, row, lastrow = 0;
-    ulg pixel;
-    int ximage_rowbytes = ximage->bytes_per_line;
-/*  int bpp = ximage->bits_per_pixel;  */
-
-
-    Trace((stderr, "beginning display loop (image_channels == %d)\n",
-      image_channels))
-    Trace((stderr, "   (width = %ld, rowbytes = %ld, ximage_rowbytes = %d)\n",
-      image_width, image_rowbytes, ximage_rowbytes))
-    Trace((stderr, "   (bpp = %d)\n", ximage->bits_per_pixel))
-    Trace((stderr, "   (byte_order = %s)\n", ximage->byte_order == MSBFirst?
-      "MSBFirst" : (ximage->byte_order == LSBFirst? "LSBFirst" : "unknown")))
-
-    if (depth == 24 || depth == 32) {
-        ulg red, green, blue;
-
-        for (lastrow = row = 0;  row < image_height;  ++row) {
-            src = image_data + row*image_rowbytes;
-            dest = ximage->data + row*ximage_rowbytes;
-            if (image_channels == 3) {
-                for (i = image_width;  i > 0;  --i) {
-                    red   = *src++;
-                    green = *src++;
-                    blue  = *src++;
-#ifdef NO_24BIT_MASKS
-                    pixel = (red   << RShift) |
-                            (green << GShift) |
-                            (blue  << BShift);
-                    /* recall that we set ximage->byte_order = MSBFirst above */
-                    /* GRR BUG:  this assumes bpp == 32, but may be 24: */
-                    *dest++ = (char)((pixel >> 24) & 0xff);
-                    *dest++ = (char)((pixel >> 16) & 0xff);
-                    *dest++ = (char)((pixel >>  8) & 0xff);
-                    *dest++ = (char)( pixel        & 0xff);
-#else
-                    red   = (RShift < 0)? red   << (-RShift) : red   >> RShift;
-                    green = (GShift < 0)? green << (-GShift) : green >> GShift;
-                    blue  = (BShift < 0)? blue  << (-BShift) : blue  >> BShift;
-                    pixel = (red & RMask) | (green & GMask) | (blue & BMask);
-                    /* recall that we set ximage->byte_order = MSBFirst above */
-                    *dest++ = (char)((pixel >> 24) & 0xff);
-                    *dest++ = (char)((pixel >> 16) & 0xff);
-                    *dest++ = (char)((pixel >>  8) & 0xff);
-                    *dest++ = (char)( pixel        & 0xff);
-#endif
-                }
-            } else /* if (image_channels == 4) */ {
-                for (i = image_width;  i > 0;  --i) {
-                    r = *src++;
-                    g = *src++;
-                    b = *src++;
-                    a = *src++;
-                    if (a == 255) {
-                        red   = r;
-                        green = g;
-                        blue  = b;
-                    } else if (a == 0) {
-                        red   = bg_red;
-                        green = bg_green;
-                        blue  = bg_blue;
-                    } else {
-                        /* this macro (from png.h) composites the foreground
-                         * and background values and puts the result into the
-                         * first argument */
-                        alpha_composite(red,   r, a, bg_red);
-                        alpha_composite(green, g, a, bg_green);
-                        alpha_composite(blue,  b, a, bg_blue);
-                    }
-                    pixel = (red   << RShift) |
-                            (green << GShift) |
-                            (blue  << BShift);
-                    /* recall that we set ximage->byte_order = MSBFirst above */
-                    *dest++ = (char)((pixel >> 24) & 0xff);
-                    *dest++ = (char)((pixel >> 16) & 0xff);
-                    *dest++ = (char)((pixel >>  8) & 0xff);
-                    *dest++ = (char)( pixel        & 0xff);
-                }
-            }
-            /* display after every 16 lines */
-            if (((row+1) & 0xf) == 0) {
-                XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0,
-                  (int)lastrow, image_width, 16);
-                XFlush(display);
-                lastrow = row + 1;
-            }
-        }
-
-    } else if (depth == 16) {
-        ush red, green, blue;
-
-        for (lastrow = row = 0;  row < image_height;  ++row) {
-            src = image_data + row*image_rowbytes;
-            dest = ximage->data + row*ximage_rowbytes;
-            if (image_channels == 3) {
-                for (i = image_width;  i > 0;  --i) {
-                    red   = ((ush)(*src) << 8);
-                    ++src;
-                    green = ((ush)(*src) << 8);
-                    ++src;
-                    blue  = ((ush)(*src) << 8);
-                    ++src;
-                    pixel = ((red   >> RShift) & RMask) |
-                            ((green >> GShift) & GMask) |
-                            ((blue  >> BShift) & BMask);
-                    /* recall that we set ximage->byte_order = MSBFirst above */
-                    *dest++ = (char)((pixel >>  8) & 0xff);
-                    *dest++ = (char)( pixel        & 0xff);
-                }
-            } else /* if (image_channels == 4) */ {
-                for (i = image_width;  i > 0;  --i) {
-                    r = *src++;
-                    g = *src++;
-                    b = *src++;
-                    a = *src++;
-                    if (a == 255) {
-                        red   = ((ush)r << 8);
-                        green = ((ush)g << 8);
-                        blue  = ((ush)b << 8);
-                    } else if (a == 0) {
-                        red   = ((ush)bg_red   << 8);
-                        green = ((ush)bg_green << 8);
-                        blue  = ((ush)bg_blue  << 8);
-                    } else {
-                        /* this macro (from png.h) composites the foreground
-                         * and background values and puts the result back into
-                         * the first argument (== fg byte here:  safe) */
-                        alpha_composite(r, r, a, bg_red);
-                        alpha_composite(g, g, a, bg_green);
-                        alpha_composite(b, b, a, bg_blue);
-                        red   = ((ush)r << 8);
-                        green = ((ush)g << 8);
-                        blue  = ((ush)b << 8);
-                    }
-                    pixel = ((red   >> RShift) & RMask) |
-                            ((green >> GShift) & GMask) |
-                            ((blue  >> BShift) & BMask);
-                    /* recall that we set ximage->byte_order = MSBFirst above */
-                    *dest++ = (char)((pixel >>  8) & 0xff);
-                    *dest++ = (char)( pixel        & 0xff);
-                }
-            }
-            /* display after every 16 lines */
-            if (((row+1) & 0xf) == 0) {
-                XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0,
-                  (int)lastrow, image_width, 16);
-                XFlush(display);
-                lastrow = row + 1;
-            }
-        }
-
-    } else /* depth == 8 */ {
-
-        /* GRR:  add 8-bit support */
-
-    }
-
-    Trace((stderr, "calling final XPutImage()\n"))
-    if (lastrow < image_height) {
-        XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0,
-          (int)lastrow, image_width, image_height-lastrow);
-        XFlush(display);
-    }
-
-    return 0;
-}
-
-
-
-
-static void rpng_x_cleanup(void)
-{
-    if (image_data) {
-        free(image_data);
-        image_data = NULL;
-    }
-
-    if (ximage) {
-        if (ximage->data) {
-            free(ximage->data);           /* we allocated it, so we free it */
-            ximage->data = (char *)NULL;  /*  instead of XDestroyImage() */
-        }
-        XDestroyImage(ximage);
-        ximage = NULL;
-    }
-
-    if (have_gc)
-        XFreeGC(display, gc);
-
-    if (have_window)
-        XDestroyWindow(display, window);
-
-    if (have_colormap)
-        XFreeColormap(display, colormap);
-
-    if (have_nondefault_visual)
-        XFree(visual_list);
-}
-
-
-
-
-
-static int rpng_x_msb(ulg u32val)
-{
-    int i;
-
-    for (i = 31;  i >= 0;  --i) {
-        if (u32val & 0x80000000L)
-            break;
-        u32val <<= 1;
-    }
-    return i;
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/rpng2-win.c b/tkimg1.3/libpng/contrib/gregbook/rpng2-win.c
deleted file mode 100644
index 0c1a9d1..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/rpng2-win.c
+++ /dev/null
@@ -1,1166 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng2 - progressive-model PNG display program                rpng2-win.c
-
-   This program decodes and displays PNG files progressively, as if it were
-   a web browser (though the front end is only set up to read from files).
-   It supports gamma correction, user-specified background colors, and user-
-   specified background patterns (for transparent images).  This version is
-   for 32-bit Windows; it may compile under 16-bit Windows with a little
-   tweaking (or maybe not).  Thanks to Adam Costello and Pieter S. van der
-   Meulen for the "diamond" and "radial waves" patterns, respectively.
-
-   to do:
-    - handle quoted command-line args (especially filenames with spaces)
-    - finish resizable checkerboard-gradient (sizes 4-128?)
-    - use %.1023s to simplify truncation of title-bar string?
-    - have minimum window width:  oh well
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.01:  initial public release
-    - 1.02:  fixed cut-and-paste error in usage screen (oops...)
-    - 1.03:  modified to allow abbreviated options
-    - 1.04:  removed bogus extra argument from usage fprintf() [Glenn R-P?];
-              fixed command-line parsing bug
-    - 1.10:  enabled "message window"/console (thanks to David Geldreich)
-    - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options
-    - 1.21:  made minor tweak to usage screen to fit within 25-line console
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#define PROGNAME  "rpng2-win"
-#define LONGNAME  "Progressive PNG Viewer for Windows"
-#define VERSION   "1.21 of 29 June 2001"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <setjmp.h>    /* for jmpbuf declaration in readpng2.h */
-#include <time.h>
-#include <math.h>      /* only for PvdM background code */
-#include <windows.h>
-#include <conio.h>     /* only for _getch() */
-
-/* all for PvdM background code: */
-#ifndef PI
-#  define PI             3.141592653589793238
-#endif
-#define PI_2             (PI*0.5)
-#define INV_PI_360       (360.0 / PI)
-#define MAX(a,b)         (a>b?a:b)
-#define MIN(a,b)         (a<b?a:b)
-#define CLIP(a,min,max)  MAX(min,MIN((a),max))
-#define ABS(a)           ((a)<0?-(a):(a))
-#define CLIP8P(c)        MAX(0,(MIN((c),255)))   /* 8-bit pos. integer (uch) */
-#define ROUNDF(f)        ((int)(f + 0.5))
-
-#define rgb1_max   bg_freq
-#define rgb1_min   bg_gray
-#define rgb2_max   bg_bsat
-#define rgb2_min   bg_brot
-
-/* #define DEBUG */     /* this enables the Trace() macros */
-
-#include "readpng2.h"   /* typedefs, common macros, readpng2 prototypes */
-
-
-/* could just include png.h, but this macro is the only thing we need
- * (name and typedefs changed to local versions); note that side effects
- * only happen with alpha (which could easily be avoided with
- * "ush acopy = (alpha);") */
-
-#define alpha_composite(composite, fg, alpha, bg) {               \
-    ush temp = ((ush)(fg)*(ush)(alpha) +                          \
-                (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128);  \
-    (composite) = (uch)((temp + (temp >> 8)) >> 8);               \
-}
-
-
-#define INBUFSIZE 4096   /* with pseudo-timing on (1 sec delay/block), this
-                          *  block size corresponds roughly to a download
-                          *  speed 10% faster than theoretical 33.6K maximum
-                          *  (assuming 8 data bits, 1 stop bit and no other
-                          *  overhead) */
-
-/* local prototypes */
-static void       rpng2_win_init(void);
-static int        rpng2_win_create_window(void);
-static int        rpng2_win_load_bg_image(void);
-static void       rpng2_win_display_row(ulg row);
-static void       rpng2_win_finish_display(void);
-static void       rpng2_win_cleanup(void);
-LRESULT CALLBACK  rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM);
-
-
-static char titlebar[1024], *window_name = titlebar;
-static char *progname = PROGNAME;
-static char *appname = LONGNAME;
-static char *icon_name = PROGNAME;    /* GRR:  not (yet) used */
-static char *filename;
-static FILE *infile;
-
-static mainprog_info rpng2_info;
-
-static uch inbuf[INBUFSIZE];
-static int incount;
-
-static int pat = 6;         /* must be less than num_bgpat */
-static int bg_image = 0;
-static int bgscale = 16;
-static ulg bg_rowbytes;
-static uch *bg_data;
-
-static struct rgb_color {
-    uch r, g, b;
-} rgb[] = {
-    {  0,   0,   0},    /*  0:  black */
-    {255, 255, 255},    /*  1:  white */
-    {173, 132,  57},    /*  2:  tan */
-    { 64, 132,   0},    /*  3:  medium green */
-    {189, 117,   1},    /*  4:  gold */
-    {253, 249,   1},    /*  5:  yellow */
-    {  0,   0, 255},    /*  6:  blue */
-    {  0,   0, 120},    /*  7:  medium blue */
-    {255,   0, 255},    /*  8:  magenta */
-    { 64,   0,  64},    /*  9:  dark magenta */
-    {255,   0,   0},    /* 10:  red */
-    { 64,   0,   0},    /* 11:  dark red */
-    {255, 127,   0},    /* 12:  orange */
-    {192,  96,   0},    /* 13:  darker orange */
-    { 24,  60,   0},    /* 14:  dark green-yellow */
-    { 85, 125, 200}     /* 15:  ice blue */
-};
-/* not used for now, but should be for error-checking:
-static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color);
- */
-
-/*
-    This whole struct is a fairly cheesy way to keep the number of
-    command-line options to a minimum.  The radial-waves background
-    type is a particularly poor fit to the integer elements of the
-    struct...but a few macros and a little fixed-point math will do
-    wonders for ya.
-
-    type bits:
-       F E D C B A 9 8 7 6 5 4 3 2 1 0
-                             | | | | |
-                             | | +-+-+-- 0 = sharp-edged checkerboard
-                             | |         1 = soft diamonds
-                             | |         2 = radial waves
-                             | |       3-7 = undefined
-                             | +-- gradient #2 inverted?
-                             +-- alternating columns inverted?
- */
-static struct background_pattern {
-    ush type;
-    int rgb1_max, rgb1_min;     /* or bg_freq, bg_gray */
-    int rgb2_max, rgb2_min;     /* or bg_bsat, bg_brot (both scaled by 10)*/
-} bg[] = {
-    {0+8,   2,0,  1,15},        /* checkered:  tan/black vs. white/ice blue */
-    {0+24,  2,0,  1,0},         /* checkered:  tan/black vs. white/black */
-    {0+8,   4,5,  0,2},         /* checkered:  gold/yellow vs. black/tan */
-    {0+8,   4,5,  0,6},         /* checkered:  gold/yellow vs. black/blue */
-    {0,     7,0,  8,9},         /* checkered:  deep blue/black vs. magenta */
-    {0+8,  13,0,  5,14},        /* checkered:  orange/black vs. yellow */
-    {0+8,  12,0, 10,11},        /* checkered:  orange/black vs. red */
-    {1,     7,0,  8,0},         /* diamonds:  deep blue/black vs. magenta */
-    {1,    12,0, 11,0},         /* diamonds:  orange vs. dark red */
-    {1,    10,0,  7,0},         /* diamonds:  red vs. medium blue */
-    {1,     4,0,  5,0},         /* diamonds:  gold vs. yellow */
-    {1,     3,0,  0,0},         /* diamonds:  medium green vs. black */
-    {2,    16, 100,  20,   0},  /* radial:  ~hard radial color-beams */
-    {2,    18, 100,  10,   2},  /* radial:  soft, curved radial color-beams */
-    {2,    16, 256, 100, 250},  /* radial:  very tight spiral */
-    {2, 10000, 256,  11,   0}   /* radial:  dipole-moire' (almost fractal) */
-};
-static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern);
-
-
-/* Windows-specific global variables (could go in struct, but messy...) */
-static ulg wimage_rowbytes;
-static uch *dib;
-static uch *wimage_data;
-static BITMAPINFOHEADER *bmih;
-
-static HWND global_hwnd;
-static HINSTANCE global_hInst;
-static int global_showmode;
-
-
-
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
-{
-    char *args[1024];                 /* arbitrary limit, but should suffice */
-    char **argv = args;
-    char *p, *q, *bgstr = NULL;
-    int argc = 0;
-    int rc, alen, flen;
-    int error = 0;
-    int timing = FALSE;
-    int have_bg = FALSE;
-    double LUT_exponent;              /* just the lookup table */
-    double CRT_exponent = 2.2;        /* just the monitor */
-    double default_display_exponent;  /* whole display system */
-    MSG msg;
-
-
-    /* First initialize a few things, just to be sure--memset takes care of
-     * default background color (black), booleans (FALSE), pointers (NULL),
-     * etc. */
-
-    global_hInst = hInst;
-    global_showmode = showmode;
-    filename = (char *)NULL;
-    memset(&rpng2_info, 0, sizeof(mainprog_info));
-
-
-    /* Next reenable console output, which normally goes to the bit bucket
-     * for windowed apps.  Closing the console window will terminate the
-     * app.  Thanks to David.Geldreich at realviz.com for supplying the magical
-     * incantation. */
-
-    AllocConsole();
-    freopen("CONOUT$", "a", stderr);
-    freopen("CONOUT$", "a", stdout);
-
-
-    /* Set the default value for our display-system exponent, i.e., the
-     * product of the CRT exponent and the exponent corresponding to
-     * the frame-buffer's lookup table (LUT), if any.  This is not an
-     * exhaustive list of LUT values (e.g., OpenStep has a lot of weird
-     * ones), but it should cover 99% of the current possibilities.  And
-     * yes, these ifdefs are completely wasted in a Windows program... */
-
-#if defined(NeXT)
-    /* third-party utilities can modify the default LUT exponent */
-    LUT_exponent = 1.0 / 2.2;
-    /*
-    if (some_next_function_that_returns_gamma(&next_gamma))
-        LUT_exponent = 1.0 / next_gamma;
-     */
-#elif defined(sgi)
-    LUT_exponent = 1.0 / 1.7;
-    /* there doesn't seem to be any documented function to
-     * get the "gamma" value, so we do it the hard way */
-    infile = fopen("/etc/config/system.glGammaVal", "r");
-    if (infile) {
-        double sgi_gamma;
-
-        fgets(tmpline, 80, infile);
-        fclose(infile);
-        sgi_gamma = atof(tmpline);
-        if (sgi_gamma > 0.0)
-            LUT_exponent = 1.0 / sgi_gamma;
-    }
-#elif defined(Macintosh)
-    LUT_exponent = 1.8 / 2.61;
-    /*
-    if (some_mac_function_that_returns_gamma(&mac_gamma))
-        LUT_exponent = mac_gamma / 2.61;
-     */
-#else
-    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */
-#endif
-
-    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */
-    default_display_exponent = LUT_exponent * CRT_exponent;
-
-
-    /* If the user has set the SCREEN_GAMMA environment variable as suggested
-     * (somewhat imprecisely) in the libpng documentation, use that; otherwise
-     * use the default value we just calculated.  Either way, the user may
-     * override this via a command-line option. */
-
-    if ((p = getenv("SCREEN_GAMMA")) != NULL)
-        rpng2_info.display_exponent = atof(p);
-    else
-        rpng2_info.display_exponent = default_display_exponent;
-
-
-    /* Windows really hates command lines, so we have to set up our own argv.
-     * Note that we do NOT bother with quoted arguments here, so don't use
-     * filenames with spaces in 'em! */
-
-    argv[argc++] = PROGNAME;
-    p = cmd;
-    for (;;) {
-        if (*p == ' ')
-            while (*++p == ' ')
-                ;
-        /* now p points at the first non-space after some spaces */
-        if (*p == '\0')
-            break;    /* nothing after the spaces:  done */
-        argv[argc++] = q = p;
-        while (*q && *q != ' ')
-            ++q;
-        /* now q points at a space or the end of the string */
-        if (*q == '\0')
-            break;    /* last argv already terminated; quit */
-        *q = '\0';    /* change space to terminator */
-        p = q + 1;
-    }
-    argv[argc] = NULL;   /* terminate the argv array itself */
-
-
-    /* Now parse the command line for options and the PNG filename. */
-
-    while (*++argv && !error) {
-        if (!strncmp(*argv, "-gamma", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                rpng2_info.display_exponent = atof(*argv);
-                if (rpng2_info.display_exponent <= 0.0)
-                    ++error;
-            }
-        } else if (!strncmp(*argv, "-bgcolor", 4)) {
-            if (!*++argv)
-                ++error;
-            else {
-                bgstr = *argv;
-                if (strlen(bgstr) != 7 || bgstr[0] != '#')
-                    ++error;
-                else {
-                    have_bg = TRUE;
-                    bg_image = FALSE;
-                }
-            }
-        } else if (!strncmp(*argv, "-bgpat", 4)) {
-            if (!*++argv)
-                ++error;
-            else {
-                pat = atoi(*argv) - 1;
-                if (pat < 0 || pat >= num_bgpat)
-                    ++error;
-                else {
-                    bg_image = TRUE;
-                    have_bg = FALSE;
-                }
-            }
-        } else if (!strncmp(*argv, "-timing", 2)) {
-            timing = TRUE;
-#if (defined(__i386__) || defined(_M_IX86))
-        } else if (!strncmp(*argv, "-nommxfilters", 7)) {
-            rpng2_info.nommxfilters = TRUE;
-        } else if (!strncmp(*argv, "-nommxcombine", 7)) {
-            rpng2_info.nommxcombine = TRUE;
-        } else if (!strncmp(*argv, "-nommxinterlace", 7)) {
-            rpng2_info.nommxinterlace = TRUE;
-        } else if (!strcmp(*argv, "-nommx")) {
-            rpng2_info.nommxfilters = TRUE;
-            rpng2_info.nommxcombine = TRUE;
-            rpng2_info.nommxinterlace = TRUE;
-#endif
-        } else {
-            if (**argv != '-') {
-                filename = *argv;
-                if (argv[1])   /* shouldn't be any more args after filename */
-                    ++error;
-            } else
-                ++error;   /* not expecting any other options */
-        }
-    }
-
-    if (!filename) {
-        ++error;
-    } else if (!(infile = fopen(filename, "rb"))) {
-        fprintf(stderr, PROGNAME ":  can't open PNG file [%s]\n", filename);
-        ++error;
-    } else {
-        incount = fread(inbuf, 1, INBUFSIZE, infile);
-        if (incount < 8 || !readpng2_check_sig(inbuf, 8)) {
-            fprintf(stderr, PROGNAME
-              ":  [%s] is not a PNG file: incorrect signature\n",
-              filename);
-            ++error;
-        } else if ((rc = readpng2_init(&rpng2_info)) != 0) {
-            switch (rc) {
-                case 2:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] has bad IHDR (libpng longjmp)\n",
-                      filename);
-                    break;
-                case 4:
-                    fprintf(stderr, PROGNAME ":  insufficient memory\n");
-                    break;
-                default:
-                    fprintf(stderr, PROGNAME
-                      ":  unknown readpng2_init() error\n");
-                    break;
-            }
-            ++error;
-        }
-        if (error)
-            fclose(infile);
-    }
-
-
-    /* usage screen */
-
-    if (error) {
-        int ch;
-
-        fprintf(stderr, "\n%s %s:  %s\n\n", PROGNAME, VERSION, appname);
-        readpng2_version_info();
-        fprintf(stderr, "\n"
-          "Usage:  %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n"
-#if (defined(__i386__) || defined(_M_IX86))
-          "        %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
-#endif
-          "        %*s file.png\n\n"
-          "    exp \ttransfer-function exponent (``gamma'') of the display\n"
-          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
-          "\t\t  to the product of the lookup-table exponent (varies)\n"
-          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
-          "    bg  \tdesired background color in 7-character hex RGB format\n"
-          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
-          "\t\t  used with transparent images; overrides -bgpat option\n"
-          "    pat \tdesired background pattern number (1-%d); used with\n"
-          "\t\t  transparent images; overrides -bgcolor option\n"
-          "    -timing\tenables delay for every block read, to simulate modem\n"
-          "\t\t  download of image (~36 Kbps)\n"
-#if (defined(__i386__) || defined(_M_IX86))
-          "    -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
-          "\t\t  combining rows, and expanding interlacing, respectively\n"
-#endif
-          "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
-          "Press Q or Esc to quit this usage screen. ",
-          PROGNAME,
-#if (defined(__i386__) || defined(_M_IX86))
-          strlen(PROGNAME), " ",
-#endif
-          strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
-        fflush(stderr);
-        do
-            ch = _getch();
-        while (ch != 'q' && ch != 'Q' && ch != 0x1B);
-        exit(1);
-    } else {
-        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);
-        fprintf(stderr,
-          "\n   [console window:  closing this window will terminate %s]\n\n",
-          PROGNAME);
-        fflush(stderr);
-    }
-
-
-    /* set the title-bar string, but make sure buffer doesn't overflow */
-
-    alen = strlen(appname);
-    flen = strlen(filename);
-    if (alen + flen + 3 > 1023)
-        sprintf(titlebar, "%s:  ...%s", appname, filename+(alen+flen+6-1023));
-    else
-        sprintf(titlebar, "%s:  %s", appname, filename);
-
-
-    /* set some final rpng2_info variables before entering main data loop */
-
-    if (have_bg) {
-        unsigned r, g, b;   /* this approach quiets compiler warnings */
-
-        sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b);
-        rpng2_info.bg_red   = (uch)r;
-        rpng2_info.bg_green = (uch)g;
-        rpng2_info.bg_blue  = (uch)b;
-    } else
-        rpng2_info.need_bgcolor = TRUE;
-
-    rpng2_info.done = FALSE;
-    rpng2_info.mainprog_init = rpng2_win_init;
-    rpng2_info.mainprog_display_row = rpng2_win_display_row;
-    rpng2_info.mainprog_finish_display = rpng2_win_finish_display;
-
-
-    /* OK, this is the fun part:  call readpng2_decode_data() at the start of
-     * the loop to deal with our first buffer of data (read in above to verify
-     * that the file is a PNG image), then loop through the file and continue
-     * calling the same routine to handle each chunk of data.  It in turn
-     * passes the data to libpng, which will invoke one or more of our call-
-     * backs as decoded data become available.  We optionally call Sleep() for
-     * one second per iteration to simulate downloading the image via an analog
-     * modem. */
-
-    for (;;) {
-        Trace((stderr, "about to call readpng2_decode_data()\n"))
-        if (readpng2_decode_data(&rpng2_info, inbuf, incount))
-            ++error;
-        Trace((stderr, "done with readpng2_decode_data()\n"))
-        if (error || feof(infile) || rpng2_info.done)
-            break;
-        if (timing)
-            Sleep(1000L);
-        incount = fread(inbuf, 1, INBUFSIZE, infile);
-    }
-
-
-    /* clean up PNG stuff and report any decoding errors */
-
-    fclose(infile);
-    Trace((stderr, "about to call readpng2_cleanup()\n"))
-    readpng2_cleanup(&rpng2_info);
-
-    if (error) {
-        fprintf(stderr, PROGNAME ":  libpng error while decoding PNG image\n");
-        exit(3);
-    }
-
-
-    /* wait for the user to tell us when to quit */
-
-    while (GetMessage(&msg, NULL, 0, 0)) {
-        TranslateMessage(&msg);
-        DispatchMessage(&msg);
-    }
-
-
-    /* we're done:  clean up all image and Windows resources and go away */
-
-    Trace((stderr, "about to call rpng2_win_cleanup()\n"))
-    rpng2_win_cleanup();
-
-    return msg.wParam;
-}
-
-
-
-
-
-/* this function is called by readpng2_info_callback() in readpng2.c, which
- * in turn is called by libpng after all of the pre-IDAT chunks have been
- * read and processed--i.e., we now have enough info to finish initializing */
-
-static void rpng2_win_init()
-{
-    ulg i;
-    ulg rowbytes = rpng2_info.rowbytes;
-
-    Trace((stderr, "beginning rpng2_win_init()\n"))
-    Trace((stderr, "  rowbytes = %ld\n", rpng2_info.rowbytes))
-    Trace((stderr, "  width  = %ld\n", rpng2_info.width))
-    Trace((stderr, "  height = %ld\n", rpng2_info.height))
-
-    rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height);
-    if (!rpng2_info.image_data) {
-        readpng2_cleanup(&rpng2_info);
-        return;
-    }
-
-    rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *));
-    if (!rpng2_info.row_pointers) {
-        free(rpng2_info.image_data);
-        rpng2_info.image_data = NULL;
-        readpng2_cleanup(&rpng2_info);
-        return;
-    }
-
-    for (i = 0;  i < rpng2_info.height;  ++i)
-        rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes;
-
-/*---------------------------------------------------------------------------
-    Do the basic Windows initialization stuff, make the window, and fill it
-    with the user-specified, file-specified or default background color.
-  ---------------------------------------------------------------------------*/
-
-    if (rpng2_win_create_window()) {
-        readpng2_cleanup(&rpng2_info);
-        return;
-    }
-}
-
-
-
-
-
-static int rpng2_win_create_window()
-{
-    uch bg_red   = rpng2_info.bg_red;
-    uch bg_green = rpng2_info.bg_green;
-    uch bg_blue  = rpng2_info.bg_blue;
-    uch *dest;
-    int extra_width, extra_height;
-    ulg i, j;
-    WNDCLASSEX wndclass;
-    RECT rect;
-
-
-/*---------------------------------------------------------------------------
-    Allocate memory for the display-specific version of the image (round up
-    to multiple of 4 for Windows DIB).
-  ---------------------------------------------------------------------------*/
-
-    wimage_rowbytes = ((3*rpng2_info.width + 3L) >> 2) << 2;
-
-    if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) +
-                              wimage_rowbytes*rpng2_info.height)))
-    {
-        return 4;   /* fail */
-    }
-
-/*---------------------------------------------------------------------------
-    Initialize the DIB.  Negative height means to use top-down BMP ordering
-    (must be uncompressed, but that's what we want).  Bit count of 1, 4 or 8
-    implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values
-    directly => wimage_data begins immediately after BMP header.
-  ---------------------------------------------------------------------------*/
-
-    memset(dib, 0, sizeof(BITMAPINFOHEADER));
-    bmih = (BITMAPINFOHEADER *)dib;
-    bmih->biSize = sizeof(BITMAPINFOHEADER);
-    bmih->biWidth = rpng2_info.width;
-    bmih->biHeight = -((long)rpng2_info.height);
-    bmih->biPlanes = 1;
-    bmih->biBitCount = 24;
-    bmih->biCompression = 0;
-    wimage_data = dib + sizeof(BITMAPINFOHEADER);
-
-/*---------------------------------------------------------------------------
-    Fill window with the specified background color (default is black), but
-    defer loading faked "background image" until window is displayed (may be
-    slow to compute).  Data are in BGR order.
-  ---------------------------------------------------------------------------*/
-
-    if (bg_image) {   /* just fill with black for now */
-        memset(wimage_data, 0, wimage_rowbytes*rpng2_info.height);
-    } else {
-        for (j = 0;  j < rpng2_info.height;  ++j) {
-            dest = wimage_data + j*wimage_rowbytes;
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                *dest++ = bg_blue;
-                *dest++ = bg_green;
-                *dest++ = bg_red;
-            }
-        }
-    }
-
-/*---------------------------------------------------------------------------
-    Set the window parameters.
-  ---------------------------------------------------------------------------*/
-
-    memset(&wndclass, 0, sizeof(wndclass));
-
-    wndclass.cbSize = sizeof(wndclass);
-    wndclass.style = CS_HREDRAW | CS_VREDRAW;
-    wndclass.lpfnWndProc = rpng2_win_wndproc;
-    wndclass.hInstance = global_hInst;
-    wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
-    wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
-    wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH);
-    wndclass.lpszMenuName = NULL;
-    wndclass.lpszClassName = progname;
-    wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
-
-    RegisterClassEx(&wndclass);
-
-/*---------------------------------------------------------------------------
-    Finally, create the window.
-  ---------------------------------------------------------------------------*/
-
-    extra_width  = 2*(GetSystemMetrics(SM_CXBORDER) +
-                      GetSystemMetrics(SM_CXDLGFRAME));
-    extra_height = 2*(GetSystemMetrics(SM_CYBORDER) +
-                      GetSystemMetrics(SM_CYDLGFRAME)) +
-                      GetSystemMetrics(SM_CYCAPTION);
-
-    global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW,
-      CW_USEDEFAULT, CW_USEDEFAULT, rpng2_info.width+extra_width,
-      rpng2_info.height+extra_height, NULL, NULL, global_hInst, NULL);
-
-    ShowWindow(global_hwnd, global_showmode);
-    UpdateWindow(global_hwnd);
-
-/*---------------------------------------------------------------------------
-    Now compute the background image and display it.  If it fails (memory
-    allocation), revert to a plain background color.
-  ---------------------------------------------------------------------------*/
-
-    if (bg_image) {
-        static const char *msg = "Computing background image...";
-        int x, y, len = strlen(msg);
-        HDC hdc = GetDC(global_hwnd);
-        TEXTMETRIC tm;
-
-        GetTextMetrics(hdc, &tm);
-        x = (rpng2_info.width - len*tm.tmAveCharWidth)/2;
-        y = (rpng2_info.height - tm.tmHeight)/2;
-        SetBkMode(hdc, TRANSPARENT);
-        SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
-        /* this can still begin out of bounds even if x is positive (???): */
-        TextOut(hdc, ((x < 0)? 0 : x), ((y < 0)? 0 : y), msg, len);
-        ReleaseDC(global_hwnd, hdc);
-
-        rpng2_win_load_bg_image();   /* resets bg_image if fails */
-    }
-
-    if (!bg_image) {
-        for (j = 0;  j < rpng2_info.height;  ++j) {
-            dest = wimage_data + j*wimage_rowbytes;
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                *dest++ = bg_blue;
-                *dest++ = bg_green;
-                *dest++ = bg_red;
-            }
-        }
-    }
-
-    rect.left = 0L;
-    rect.top = 0L;
-    rect.right = (LONG)rpng2_info.width;       /* possibly off by one? */
-    rect.bottom = (LONG)rpng2_info.height;     /* possibly off by one? */
-    InvalidateRect(global_hwnd, &rect, FALSE);
-    UpdateWindow(global_hwnd);                 /* similar to XFlush() */
-
-    return 0;
-
-} /* end function rpng2_win_create_window() */
-
-
-
-
-
-static int rpng2_win_load_bg_image()
-{
-    uch *src, *dest;
-    uch r1, r2, g1, g2, b1, b2;
-    uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv;
-    int k, hmax, max;
-    int xidx, yidx, yidx_max = (bgscale-1);
-    int even_odd_vert, even_odd_horiz, even_odd;
-    int invert_gradient2 = (bg[pat].type & 0x08);
-    int invert_column;
-    ulg i, row;
-
-/*---------------------------------------------------------------------------
-    Allocate buffer for fake background image to be used with transparent
-    images; if this fails, revert to plain background color.
-  ---------------------------------------------------------------------------*/
-
-    bg_rowbytes = 3 * rpng2_info.width;
-    bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height);
-    if (!bg_data) {
-        fprintf(stderr, PROGNAME
-          ":  unable to allocate memory for background image\n");
-        bg_image = 0;
-        return 1;
-    }
-
-/*---------------------------------------------------------------------------
-    Vertical gradients (ramps) in NxN squares, alternating direction and
-    colors (N == bgscale).
-  ---------------------------------------------------------------------------*/
-
-    if ((bg[pat].type & 0x07) == 0) {
-        uch r1_min  = rgb[bg[pat].rgb1_min].r;
-        uch g1_min  = rgb[bg[pat].rgb1_min].g;
-        uch b1_min  = rgb[bg[pat].rgb1_min].b;
-        uch r2_min  = rgb[bg[pat].rgb2_min].r;
-        uch g2_min  = rgb[bg[pat].rgb2_min].g;
-        uch b2_min  = rgb[bg[pat].rgb2_min].b;
-        int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min;
-        int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min;
-        int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min;
-        int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min;
-        int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min;
-        int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            yidx = row % bgscale;
-            even_odd_vert = (row / bgscale) & 1;
-
-            r1 = r1_min + (r1_diff * yidx) / yidx_max;
-            g1 = g1_min + (g1_diff * yidx) / yidx_max;
-            b1 = b1_min + (b1_diff * yidx) / yidx_max;
-            r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max;
-            g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max;
-            b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max;
-
-            r2 = r2_min + (r2_diff * yidx) / yidx_max;
-            g2 = g2_min + (g2_diff * yidx) / yidx_max;
-            b2 = b2_min + (b2_diff * yidx) / yidx_max;
-            r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max;
-            g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max;
-            b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max;
-
-            dest = bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                even_odd_horiz = (i / bgscale) & 1;
-                even_odd = even_odd_vert ^ even_odd_horiz;
-                invert_column =
-                  (even_odd_horiz && (bg[pat].type & 0x10));
-                if (even_odd == 0) {         /* gradient #1 */
-                    if (invert_column) {
-                        *dest++ = r1_inv;
-                        *dest++ = g1_inv;
-                        *dest++ = b1_inv;
-                    } else {
-                        *dest++ = r1;
-                        *dest++ = g1;
-                        *dest++ = b1;
-                    }
-                } else {                     /* gradient #2 */
-                    if ((invert_column && invert_gradient2) ||
-                        (!invert_column && !invert_gradient2))
-                    {
-                        *dest++ = r2;        /* not inverted or */
-                        *dest++ = g2;        /*  doubly inverted */
-                        *dest++ = b2;
-                    } else {
-                        *dest++ = r2_inv;
-                        *dest++ = g2_inv;    /* singly inverted */
-                        *dest++ = b2_inv;
-                    }
-                }
-            }
-        }
-
-/*---------------------------------------------------------------------------
-    Soft gradient-diamonds with scale = bgscale.  Code contributed by Adam
-    M. Costello.
-  ---------------------------------------------------------------------------*/
-
-    } else if ((bg[pat].type & 0x07) == 1) {
-
-        hmax = (bgscale-1)/2;   /* half the max weight of a color */
-        max = 2*hmax;           /* the max weight of a color */
-
-        r1 = rgb[bg[pat].rgb1_max].r;
-        g1 = rgb[bg[pat].rgb1_max].g;
-        b1 = rgb[bg[pat].rgb1_max].b;
-        r2 = rgb[bg[pat].rgb2_max].r;
-        g2 = rgb[bg[pat].rgb2_max].g;
-        b2 = rgb[bg[pat].rgb2_max].b;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            yidx = row % bgscale;
-            if (yidx > hmax)
-                yidx = bgscale-1 - yidx;
-            dest = bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                xidx = i % bgscale;
-                if (xidx > hmax)
-                    xidx = bgscale-1 - xidx;
-                k = xidx + yidx;
-                *dest++ = (k*r1 + (max-k)*r2) / max;
-                *dest++ = (k*g1 + (max-k)*g2) / max;
-                *dest++ = (k*b1 + (max-k)*b2) / max;
-            }
-        }
-
-/*---------------------------------------------------------------------------
-    Radial "starburst" with azimuthal sinusoids; [eventually number of sinu-
-    soids will equal bgscale?].  This one is slow but very cool.  Code con-
-    tributed by Pieter S. van der Meulen (originally in Smalltalk).
-  ---------------------------------------------------------------------------*/
-
-    } else if ((bg[pat].type & 0x07) == 2) {
-        uch ch;
-        int ii, x, y, hw, hh, grayspot;
-        double freq, rotate, saturate, gray, intensity;
-        double angle=0.0, aoffset=0.0, maxDist, dist;
-        double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t;
-
-        fprintf(stderr, "%s:  computing radial background...",
-          PROGNAME);
-        fflush(stderr);
-
-        hh = rpng2_info.height / 2;
-        hw = rpng2_info.width / 2;
-
-        /* variables for radial waves:
-         *   aoffset:  number of degrees to rotate hue [CURRENTLY NOT USED]
-         *   freq:  number of color beams originating from the center
-         *   grayspot:  size of the graying center area (anti-alias)
-         *   rotate:  rotation of the beams as a function of radius
-         *   saturate:  saturation of beams' shape azimuthally
-         */
-        angle = CLIP(angle, 0.0, 360.0);
-        grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw));
-        freq = MAX((double)bg[pat].bg_freq, 0.0);
-        saturate = (double)bg[pat].bg_bsat * 0.1;
-        rotate = (double)bg[pat].bg_brot * 0.1;
-        gray = 0.0;
-        intensity = 0.0;
-        maxDist = (double)((hw*hw) + (hh*hh));
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            y = row - hh;
-            dest = bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                x = i - hw;
-                angle = (x == 0)? PI_2 : atan((double)y / (double)x);
-                gray = (double)MAX(ABS(y), ABS(x)) / grayspot;
-                gray = MIN(1.0, gray);
-                dist = (double)((x*x) + (y*y)) / maxDist;
-                intensity = cos((angle+(rotate*dist*PI)) * freq) *
-                  gray * saturate;
-                intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5;
-                hue = (angle + PI) * INV_PI_360 + aoffset;
-                s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh));
-                s = MIN(MAX(s,0.0), 1.0);
-                v = MIN(MAX(intensity,0.0), 1.0);
-
-                if (s == 0.0) {
-                    ch = (uch)(v * 255.0);
-                    *dest++ = ch;
-                    *dest++ = ch;
-                    *dest++ = ch;
-                } else {
-                    if ((hue < 0.0) || (hue >= 360.0))
-                        hue -= (((int)(hue / 360.0)) * 360.0);
-                    hue /= 60.0;
-                    ii = (int)hue;
-                    f = hue - (double)ii;
-                    p = (1.0 - s) * v;
-                    q = (1.0 - (s * f)) * v;
-                    t = (1.0 - (s * (1.0 - f))) * v;
-                    if      (ii == 0) { red = v; green = t; blue = p; }
-                    else if (ii == 1) { red = q; green = v; blue = p; }
-                    else if (ii == 2) { red = p; green = v; blue = t; }
-                    else if (ii == 3) { red = p; green = q; blue = v; }
-                    else if (ii == 4) { red = t; green = p; blue = v; }
-                    else if (ii == 5) { red = v; green = p; blue = q; }
-                    *dest++ = (uch)(red * 255.0);
-                    *dest++ = (uch)(green * 255.0);
-                    *dest++ = (uch)(blue * 255.0);
-                }
-            }
-        }
-        fprintf(stderr, "done.\n");
-        fflush(stderr);
-    }
-
-/*---------------------------------------------------------------------------
-    Blast background image to display buffer before beginning PNG decode;
-    calling function will handle invalidation and UpdateWindow() call.
-  ---------------------------------------------------------------------------*/
-
-    for (row = 0;  row < rpng2_info.height;  ++row) {
-        src = bg_data + row*bg_rowbytes;
-        dest = wimage_data + row*wimage_rowbytes;
-        for (i = rpng2_info.width;  i > 0;  --i) {
-            r1 = *src++;
-            g1 = *src++;
-            b1 = *src++;
-            *dest++ = b1;
-            *dest++ = g1;   /* note reverse order */
-            *dest++ = r1;
-        }
-    }
-
-    return 0;
-
-} /* end function rpng2_win_load_bg_image() */
-
-
-
-
-
-static void rpng2_win_display_row(ulg row)
-{
-    uch bg_red   = rpng2_info.bg_red;
-    uch bg_green = rpng2_info.bg_green;
-    uch bg_blue  = rpng2_info.bg_blue;
-    uch *src, *src2=NULL, *dest;
-    uch r, g, b, a;
-    ulg i;
-    static int rows=0;
-    static ulg firstrow;
-
-/*---------------------------------------------------------------------------
-    rows and firstrow simply track how many rows (and which ones) have not
-    yet been displayed; alternatively, we could call InvalidateRect() for
-    every row and not bother with the records-keeping.
-  ---------------------------------------------------------------------------*/
-
-    Trace((stderr, "beginning rpng2_win_display_row()\n"))
-
-    if (rows == 0)
-        firstrow = row;   /* first row not yet displayed */
-
-    ++rows;   /* count of rows received but not yet displayed */
-
-/*---------------------------------------------------------------------------
-    Aside from the use of the rpng2_info struct and the lack of an outer
-    loop (over rows), this routine is identical to rpng_win_display_image()
-    in the non-progressive version of the program.
-  ---------------------------------------------------------------------------*/
-
-    src = rpng2_info.image_data + row*rpng2_info.rowbytes;
-    if (bg_image)
-        src2 = bg_data + row*bg_rowbytes;
-    dest = wimage_data + row*wimage_rowbytes;
-
-    if (rpng2_info.channels == 3) {
-        for (i = rpng2_info.width;  i > 0;  --i) {
-            r = *src++;
-            g = *src++;
-            b = *src++;
-            *dest++ = b;
-            *dest++ = g;   /* note reverse order */
-            *dest++ = r;
-        }
-    } else /* if (rpng2_info.channels == 4) */ {
-        for (i = rpng2_info.width;  i > 0;  --i) {
-            r = *src++;
-            g = *src++;
-            b = *src++;
-            a = *src++;
-            if (bg_image) {
-                bg_red   = *src2++;
-                bg_green = *src2++;
-                bg_blue  = *src2++;
-            }
-            if (a == 255) {
-                *dest++ = b;
-                *dest++ = g;
-                *dest++ = r;
-            } else if (a == 0) {
-                *dest++ = bg_blue;
-                *dest++ = bg_green;
-                *dest++ = bg_red;
-            } else {
-                /* this macro (copied from png.h) composites the
-                 * foreground and background values and puts the
-                 * result into the first argument; there are no
-                 * side effects with the first argument */
-                alpha_composite(*dest++, b, a, bg_blue);
-                alpha_composite(*dest++, g, a, bg_green);
-                alpha_composite(*dest++, r, a, bg_red);
-            }
-        }
-    }
-
-/*---------------------------------------------------------------------------
-    Display after every 16 rows or when on last row.  (Region may include
-    previously displayed lines due to interlacing--i.e., not contiguous.)
-  ---------------------------------------------------------------------------*/
-
-    if ((rows & 0xf) == 0 || row == rpng2_info.height-1) {
-        RECT rect;
-
-        rect.left = 0L;
-        rect.top = (LONG)firstrow;
-        rect.right = (LONG)rpng2_info.width;       /* possibly off by one? */
-        rect.bottom = (LONG)row + 1L;              /* possibly off by one? */
-        InvalidateRect(global_hwnd, &rect, FALSE);
-        UpdateWindow(global_hwnd);                 /* similar to XFlush() */
-        rows = 0;
-    }
-
-} /* end function rpng2_win_display_row() */
-
-
-
-
-
-static void rpng2_win_finish_display()
-{
-    Trace((stderr, "beginning rpng2_win_finish_display()\n"))
-
-    /* last row has already been displayed by rpng2_win_display_row(), so
-     * we have nothing to do here except set a flag and let the user know
-     * that the image is done */
-
-    rpng2_info.done = TRUE;
-    printf(
-      "Done.  Press Q, Esc or mouse button 1 (within image window) to quit.\n");
-    fflush(stdout);
-}
-
-
-
-
-
-static void rpng2_win_cleanup()
-{
-    if (bg_image && bg_data) {
-        free(bg_data);
-        bg_data = NULL;
-    }
-
-    if (rpng2_info.image_data) {
-        free(rpng2_info.image_data);
-        rpng2_info.image_data = NULL;
-    }
-
-    if (rpng2_info.row_pointers) {
-        free(rpng2_info.row_pointers);
-        rpng2_info.row_pointers = NULL;
-    }
-
-    if (dib) {
-        free(dib);
-        dib = NULL;
-    }
-}
-
-
-
-
-
-LRESULT CALLBACK rpng2_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP)
-{
-    HDC         hdc;
-    PAINTSTRUCT ps;
-    int rc;
-
-    switch (iMsg) {
-        case WM_CREATE:
-            /* one-time processing here, if any */
-            return 0;
-
-        case WM_PAINT:
-            hdc = BeginPaint(hwnd, &ps);
-            rc = StretchDIBits(hdc, 0, 0, rpng2_info.width, rpng2_info.height,
-                                    0, 0, rpng2_info.width, rpng2_info.height,
-                                    wimage_data, (BITMAPINFO *)bmih,
-                                    0, SRCCOPY);
-            EndPaint(hwnd, &ps);
-            return 0;
-
-        /* wait for the user to tell us when to quit */
-        case WM_CHAR:
-            switch (wP) {       /* only need one, so ignore repeat count */
-                case 'q':
-                case 'Q':
-                case 0x1B:      /* Esc key */
-                    PostQuitMessage(0);
-            }
-            return 0;
-
-        case WM_LBUTTONDOWN:    /* another way of quitting */
-        case WM_DESTROY:
-            PostQuitMessage(0);
-            return 0;
-    }
-
-    return DefWindowProc(hwnd, iMsg, wP, lP);
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/rpng2-x.c b/tkimg1.3/libpng/contrib/gregbook/rpng2-x.c
deleted file mode 100644
index 5fc29ea..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/rpng2-x.c
+++ /dev/null
@@ -1,1408 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   rpng2 - progressive-model PNG display program                  rpng2-x.c
-
-   This program decodes and displays PNG files progressively, as if it were
-   a web browser (though the front end is only set up to read from files).
-   It supports gamma correction, user-specified background colors, and user-
-   specified background patterns (for transparent images).  This version is
-   for the X Window System (tested by the author under Unix and by Martin
-   Zinser under OpenVMS; may work under OS/2 with a little tweaking).
-
-   Thanks to Adam Costello and Pieter S. van der Meulen for the "diamond"
-   and "radial waves" patterns, respectively.
-
-   to do:
-    - 8-bit support
-    - finish resizable checkerboard-gradient (sizes 4-128?)
-    - use %.1023s to simplify truncation of title-bar string?
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.01:  initial public release
-    - 1.02:  modified to allow abbreviated options; fixed char/uchar mismatch
-    - 1.10:  added support for non-default visuals; fixed X pixel-conversion
-    - 1.11:  added -usleep option for demos; fixed command-line parsing bug
-    - 1.12:  added -pause option for demos and testing
-    - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options
-    - 1.21:  fixed small X memory leak (thanks to Francois Petitjean)
-    - 1.22:  fixed XFreeGC() crash bug
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#define PROGNAME  "rpng2-x"
-#define LONGNAME  "Progressive PNG Viewer for X"
-#define VERSION   "1.22 of 16 August 2001"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <setjmp.h>       /* for jmpbuf declaration in readpng2.h */
-#include <time.h>
-#include <math.h>         /* only for PvdM background code */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xos.h>
-#include <X11/keysym.h>   /* defines XK_* macros */
-
-#ifdef VMS
-#  include <unistd.h>
-#endif
-
-/* all for PvdM background code: */
-#ifndef PI
-#  define PI             3.141592653589793238
-#endif
-#define PI_2             (PI*0.5)
-#define INV_PI_360       (360.0 / PI)
-#define MAX(a,b)         (a>b?a:b)
-#define MIN(a,b)         (a<b?a:b)
-#define CLIP(a,min,max)  MAX(min,MIN((a),max))
-#define ABS(a)           ((a)<0?-(a):(a))
-#define CLIP8P(c)        MAX(0,(MIN((c),255)))   /* 8-bit pos. integer (uch) */
-#define ROUNDF(f)        ((int)(f + 0.5))
-
-#define rgb1_max   bg_freq
-#define rgb1_min   bg_gray
-#define rgb2_max   bg_bsat
-#define rgb2_min   bg_brot
-
-/* #define DEBUG */     /* this enables the Trace() macros */
-
-#include "readpng2.h"   /* typedefs, common macros, readpng2 prototypes */
-
-
-/* could just include png.h, but this macro is the only thing we need
- * (name and typedefs changed to local versions); note that side effects
- * only happen with alpha (which could easily be avoided with
- * "ush acopy = (alpha);") */
-
-#define alpha_composite(composite, fg, alpha, bg) {               \
-    ush temp = ((ush)(fg)*(ush)(alpha) +                          \
-                (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128);  \
-    (composite) = (uch)((temp + (temp >> 8)) >> 8);               \
-}
-
-
-#define INBUFSIZE 4096   /* with pseudo-timing on (1 sec delay/block), this
-                          *  block size corresponds roughly to a download
-                          *  speed 10% faster than theoretical 33.6K maximum
-                          *  (assuming 8 data bits, 1 stop bit and no other
-                          *  overhead) */
-
-/* local prototypes */
-static void rpng2_x_init(void);
-static int  rpng2_x_create_window(void);
-static int  rpng2_x_load_bg_image(void);
-static void rpng2_x_display_row(ulg row);
-static void rpng2_x_finish_display(void);
-static void rpng2_x_cleanup(void);
-static int  rpng2_x_msb(ulg u32val);
-
-
-static char titlebar[1024], *window_name = titlebar;
-static char *appname = LONGNAME;
-static char *icon_name = PROGNAME;
-static char *filename;
-static FILE *infile;
-
-static mainprog_info rpng2_info;
-
-static uch inbuf[INBUFSIZE];
-static int incount;
-
-static int pat = 6;        /* must be less than num_bgpat */
-static int bg_image = 0;
-static int bgscale = 16;
-static ulg bg_rowbytes;
-static uch *bg_data;
-
-int pause_after_pass = FALSE;
-int demo_timing = FALSE;
-ulg usleep_duration = 0L;
-
-static struct rgb_color {
-    uch r, g, b;
-} rgb[] = {
-    {  0,   0,   0},    /*  0:  black */
-    {255, 255, 255},    /*  1:  white */
-    {173, 132,  57},    /*  2:  tan */
-    { 64, 132,   0},    /*  3:  medium green */
-    {189, 117,   1},    /*  4:  gold */
-    {253, 249,   1},    /*  5:  yellow */
-    {  0,   0, 255},    /*  6:  blue */
-    {  0,   0, 120},    /*  7:  medium blue */
-    {255,   0, 255},    /*  8:  magenta */
-    { 64,   0,  64},    /*  9:  dark magenta */
-    {255,   0,   0},    /* 10:  red */
-    { 64,   0,   0},    /* 11:  dark red */
-    {255, 127,   0},    /* 12:  orange */
-    {192,  96,   0},    /* 13:  darker orange */
-    { 24,  60,   0},    /* 14:  dark green-yellow */
-    { 85, 125, 200}     /* 15:  ice blue */
-};
-/* not used for now, but should be for error-checking:
-static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color);
- */
-
-/*
-    This whole struct is a fairly cheesy way to keep the number of
-    command-line options to a minimum.  The radial-waves background
-    type is a particularly poor fit to the integer elements of the
-    struct...but a few macros and a little fixed-point math will do
-    wonders for ya.
-
-    type bits:
-       F E D C B A 9 8 7 6 5 4 3 2 1 0
-                             | | | | |
-                             | | +-+-+-- 0 = sharp-edged checkerboard
-                             | |         1 = soft diamonds
-                             | |         2 = radial waves
-                             | |       3-7 = undefined
-                             | +-- gradient #2 inverted?
-                             +-- alternating columns inverted?
- */
-static struct background_pattern {
-    ush type;
-    int rgb1_max, rgb1_min;     /* or bg_freq, bg_gray */
-    int rgb2_max, rgb2_min;     /* or bg_bsat, bg_brot (both scaled by 10)*/
-} bg[] = {
-    {0+8,   2,0,  1,15},        /* checkered:  tan/black vs. white/ice blue */
-    {0+24,  2,0,  1,0},         /* checkered:  tan/black vs. white/black */
-    {0+8,   4,5,  0,2},         /* checkered:  gold/yellow vs. black/tan */
-    {0+8,   4,5,  0,6},         /* checkered:  gold/yellow vs. black/blue */
-    {0,     7,0,  8,9},         /* checkered:  deep blue/black vs. magenta */
-    {0+8,  13,0,  5,14},        /* checkered:  orange/black vs. yellow */
-    {0+8,  12,0, 10,11},        /* checkered:  orange/black vs. red */
-    {1,     7,0,  8,0},         /* diamonds:  deep blue/black vs. magenta */
-    {1,    12,0, 11,0},         /* diamonds:  orange vs. dark red */
-    {1,    10,0,  7,0},         /* diamonds:  red vs. medium blue */
-    {1,     4,0,  5,0},         /* diamonds:  gold vs. yellow */
-    {1,     3,0,  0,0},         /* diamonds:  medium green vs. black */
-    {2,    16, 100,  20,   0},  /* radial:  ~hard radial color-beams */
-    {2,    18, 100,  10,   2},  /* radial:  soft, curved radial color-beams */
-    {2,    16, 256, 100, 250},  /* radial:  very tight spiral */
-    {2, 10000, 256,  11,   0}   /* radial:  dipole-moire' (almost fractal) */
-};
-static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern);
-
-
-/* X-specific variables */
-static char *displayname;
-static XImage *ximage;
-static Display *display;
-static int depth;
-static Visual *visual;
-static XVisualInfo *visual_list;
-static int RShift, GShift, BShift;
-static ulg RMask, GMask, BMask;
-static Window window;
-static GC gc;
-static Colormap colormap;
-
-static int have_nondefault_visual = FALSE;
-static int have_colormap = FALSE;
-static int have_window = FALSE;
-static int have_gc = FALSE;
-
-
-
-
-int main(int argc, char **argv)
-{
-#ifdef sgi
-    char tmpline[80];
-#endif
-    char *p, *bgstr = NULL;
-    int rc, alen, flen;
-    int error = 0;
-    int timing = FALSE;
-    int have_bg = FALSE;
-    double LUT_exponent;                /* just the lookup table */
-    double CRT_exponent = 2.2;          /* just the monitor */
-    double default_display_exponent;    /* whole display system */
-    XEvent e;
-    KeySym k;
-
-
-    /* First initialize a few things, just to be sure--memset takes care of
-     * default background color (black), booleans (FALSE), pointers (NULL),
-     * etc. */
-
-    displayname = (char *)NULL;
-    filename = (char *)NULL;
-    memset(&rpng2_info, 0, sizeof(mainprog_info));
-
-
-    /* Set the default value for our display-system exponent, i.e., the
-     * product of the CRT exponent and the exponent corresponding to
-     * the frame-buffer's lookup table (LUT), if any.  This is not an
-     * exhaustive list of LUT values (e.g., OpenStep has a lot of weird
-     * ones), but it should cover 99% of the current possibilities. */
-
-#if defined(NeXT)
-    /* third-party utilities can modify the default LUT exponent */
-    LUT_exponent = 1.0 / 2.2;
-    /*
-    if (some_next_function_that_returns_gamma(&next_gamma))
-        LUT_exponent = 1.0 / next_gamma;
-     */
-#elif defined(sgi)
-    LUT_exponent = 1.0 / 1.7;
-    /* there doesn't seem to be any documented function to
-     * get the "gamma" value, so we do it the hard way */
-    infile = fopen("/etc/config/system.glGammaVal", "r");
-    if (infile) {
-        double sgi_gamma;
-
-        fgets(tmpline, 80, infile);
-        fclose(infile);
-        sgi_gamma = atof(tmpline);
-        if (sgi_gamma > 0.0)
-            LUT_exponent = 1.0 / sgi_gamma;
-    }
-#elif defined(Macintosh)
-    LUT_exponent = 1.8 / 2.61;
-    /*
-    if (some_mac_function_that_returns_gamma(&mac_gamma))
-        LUT_exponent = mac_gamma / 2.61;
-     */
-#else
-    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */
-#endif
-
-    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */
-    default_display_exponent = LUT_exponent * CRT_exponent;
-
-
-    /* If the user has set the SCREEN_GAMMA environment variable as suggested
-     * (somewhat imprecisely) in the libpng documentation, use that; otherwise
-     * use the default value we just calculated.  Either way, the user may
-     * override this via a command-line option. */
-
-    if ((p = getenv("SCREEN_GAMMA")) != NULL)
-        rpng2_info.display_exponent = atof(p);
-    else
-        rpng2_info.display_exponent = default_display_exponent;
-
-
-    /* Now parse the command line for options and the PNG filename. */
-
-    while (*++argv && !error) {
-        if (!strncmp(*argv, "-display", 2)) {
-            if (!*++argv)
-                ++error;
-            else
-                displayname = *argv;
-        } else if (!strncmp(*argv, "-gamma", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                rpng2_info.display_exponent = atof(*argv);
-                if (rpng2_info.display_exponent <= 0.0)
-                    ++error;
-            }
-        } else if (!strncmp(*argv, "-bgcolor", 4)) {
-            if (!*++argv)
-                ++error;
-            else {
-                bgstr = *argv;
-                if (strlen(bgstr) != 7 || bgstr[0] != '#')
-                    ++error;
-                else {
-                    have_bg = TRUE;
-                    bg_image = FALSE;
-                }
-            }
-        } else if (!strncmp(*argv, "-bgpat", 4)) {
-            if (!*++argv)
-                ++error;
-            else {
-                pat = atoi(*argv) - 1;
-                if (pat < 0 || pat >= num_bgpat)
-                    ++error;
-                else {
-                    bg_image = TRUE;
-                    have_bg = FALSE;
-                }
-            }
-        } else if (!strncmp(*argv, "-usleep", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                usleep_duration = (ulg)atol(*argv);
-                demo_timing = TRUE;
-            }
-        } else if (!strncmp(*argv, "-pause", 2)) {
-            pause_after_pass = TRUE;
-        } else if (!strncmp(*argv, "-timing", 2)) {
-            timing = TRUE;
-#if (defined(__i386__) || defined(_M_IX86))
-        } else if (!strncmp(*argv, "-nommxfilters", 7)) {
-            rpng2_info.nommxfilters = TRUE;
-        } else if (!strncmp(*argv, "-nommxcombine", 7)) {
-            rpng2_info.nommxcombine = TRUE;
-        } else if (!strncmp(*argv, "-nommxinterlace", 7)) {
-            rpng2_info.nommxinterlace = TRUE;
-        } else if (!strcmp(*argv, "-nommx")) {
-            rpng2_info.nommxfilters = TRUE;
-            rpng2_info.nommxcombine = TRUE;
-            rpng2_info.nommxinterlace = TRUE;
-#endif
-        } else {
-            if (**argv != '-') {
-                filename = *argv;
-                if (argv[1])   /* shouldn't be any more args after filename */
-                    ++error;
-            } else
-                ++error;   /* not expecting any other options */
-        }
-    }
-
-    if (!filename) {
-        ++error;
-    } else if (!(infile = fopen(filename, "rb"))) {
-        fprintf(stderr, PROGNAME ":  can't open PNG file [%s]\n", filename);
-        ++error;
-    } else {
-        incount = fread(inbuf, 1, INBUFSIZE, infile);
-        if (incount < 8 || !readpng2_check_sig(inbuf, 8)) {
-            fprintf(stderr, PROGNAME
-              ":  [%s] is not a PNG file: incorrect signature\n",
-              filename);
-            ++error;
-        } else if ((rc = readpng2_init(&rpng2_info)) != 0) {
-            switch (rc) {
-                case 2:
-                    fprintf(stderr, PROGNAME
-                      ":  [%s] has bad IHDR (libpng longjmp)\n",
-                      filename);
-                    break;
-                case 4:
-                    fprintf(stderr, PROGNAME ":  insufficient memory\n");
-                    break;
-                default:
-                    fprintf(stderr, PROGNAME
-                      ":  unknown readpng2_init() error\n");
-                    break;
-            }
-            ++error;
-        } else {
-            display = XOpenDisplay(displayname);
-            if (!display) {
-                readpng2_cleanup(&rpng2_info);
-                fprintf(stderr, PROGNAME ":  can't open X display [%s]\n",
-                  displayname? displayname : "default");
-                ++error;
-            }
-        }
-        if (error)
-            fclose(infile);
-    }
-
-
-    /* usage screen */
-
-    if (error) {
-        fprintf(stderr, "\n%s %s:  %s\n\n", PROGNAME, VERSION, appname);
-        readpng2_version_info();
-        fprintf(stderr, "\n"
-          "Usage:  %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n"
-#if (defined(__i386__) || defined(_M_IX86))
-          "        %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
-#endif
-          "        %*s [-usleep dur | -timing] [-pause] file.png\n\n"
-          "    xdpy\tname of the target X display (e.g., ``hostname:0'')\n"
-          "    exp \ttransfer-function exponent (``gamma'') of the display\n"
-          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
-          "\t\t  to the product of the lookup-table exponent (varies)\n"
-          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
-          "    bg  \tdesired background color in 7-character hex RGB format\n"
-          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
-          "\t\t  used with transparent images; overrides -bgpat\n"
-          "    pat \tdesired background pattern number (1-%d); used with\n"
-          "\t\t  transparent images; overrides -bgcolor\n"
-#if (defined(__i386__) || defined(_M_IX86))
-          "    -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
-          "\t\t  combining rows, and expanding interlacing, respectively\n"
-#endif
-          "    dur \tduration in microseconds to wait after displaying each\n"
-          "\t\t  row (for demo purposes)\n"
-          "    -timing\tenables delay for every block read, to simulate modem\n"
-          "\t\t  download of image (~36 Kbps)\n"
-          "    -pause\tpauses after displaying each pass until key pressed\n"
-          "\nPress Q, Esc or mouse button 1 (within image window, after image\n"
-          "is displayed) to quit.\n"
-          "\n", PROGNAME,
-#if (defined(__i386__) || defined(_M_IX86))
-          strlen(PROGNAME), " ",
-#endif
-          strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
-        exit(1);
-    }
-
-
-    /* set the title-bar string, but make sure buffer doesn't overflow */
-
-    alen = strlen(appname);
-    flen = strlen(filename);
-    if (alen + flen + 3 > 1023)
-        sprintf(titlebar, "%s:  ...%s", appname, filename+(alen+flen+6-1023));
-    else
-        sprintf(titlebar, "%s:  %s", appname, filename);
-
-
-    /* set some final rpng2_info variables before entering main data loop */
-
-    if (have_bg) {
-        unsigned r, g, b;   /* this approach quiets compiler warnings */
-
-        sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b);
-        rpng2_info.bg_red   = (uch)r;
-        rpng2_info.bg_green = (uch)g;
-        rpng2_info.bg_blue  = (uch)b;
-    } else
-        rpng2_info.need_bgcolor = TRUE;
-
-    rpng2_info.done = FALSE;
-    rpng2_info.mainprog_init = rpng2_x_init;
-    rpng2_info.mainprog_display_row = rpng2_x_display_row;
-    rpng2_info.mainprog_finish_display = rpng2_x_finish_display;
-
-
-    /* OK, this is the fun part:  call readpng2_decode_data() at the start of
-     * the loop to deal with our first buffer of data (read in above to verify
-     * that the file is a PNG image), then loop through the file and continue
-     * calling the same routine to handle each chunk of data.  It in turn
-     * passes the data to libpng, which will invoke one or more of our call-
-     * backs as decoded data become available.  We optionally call sleep() for
-     * one second per iteration to simulate downloading the image via an analog
-     * modem. */
-
-    for (;;) {
-        Trace((stderr, "about to call readpng2_decode_data()\n"))
-        if (readpng2_decode_data(&rpng2_info, inbuf, incount))
-            ++error;
-        Trace((stderr, "done with readpng2_decode_data()\n"))
-        if (error || feof(infile) || rpng2_info.done)
-            break;
-        if (timing)
-            sleep(1);
-        incount = fread(inbuf, 1, INBUFSIZE, infile);
-    }
-
-
-    /* clean up PNG stuff and report any decoding errors */
-
-    fclose(infile);
-    Trace((stderr, "about to call readpng2_cleanup()\n"))
-    readpng2_cleanup(&rpng2_info);
-
-    if (error) {
-        fprintf(stderr, PROGNAME ":  libpng error while decoding PNG image\n");
-        exit(3);
-    }
-
-
-    /* wait for the user to tell us when to quit */
-
-    do
-        XNextEvent(display, &e);
-    while (!(e.type == ButtonPress && e.xbutton.button == Button1) &&
-           !(e.type == KeyPress &&    /*  v--- or 1 for shifted keys */
-             ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) ));
-
-
-    /* we're done:  clean up all image and X resources and go away */
-
-    Trace((stderr, "about to call rpng2_x_cleanup()\n"))
-    rpng2_x_cleanup();
-
-    return 0;
-}
-
-
-
-
-
-/* this function is called by readpng2_info_callback() in readpng2.c, which
- * in turn is called by libpng after all of the pre-IDAT chunks have been
- * read and processed--i.e., we now have enough info to finish initializing */
-
-static void rpng2_x_init(void)
-{
-    ulg i;
-    ulg rowbytes = rpng2_info.rowbytes;
-
-    Trace((stderr, "beginning rpng2_x_init()\n"))
-    Trace((stderr, "  rowbytes = %ld\n", rpng2_info.rowbytes))
-    Trace((stderr, "  width  = %ld\n", rpng2_info.width))
-    Trace((stderr, "  height = %ld\n", rpng2_info.height))
-
-    rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height);
-    if (!rpng2_info.image_data) {
-        readpng2_cleanup(&rpng2_info);
-        return;
-    }
-
-    rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *));
-    if (!rpng2_info.row_pointers) {
-        free(rpng2_info.image_data);
-        rpng2_info.image_data = NULL;
-        readpng2_cleanup(&rpng2_info);
-        return;
-    }
-
-    for (i = 0;  i < rpng2_info.height;  ++i)
-        rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes;
-
-
-    /* do the basic X initialization stuff, make the window, and fill it with
-     * the user-specified, file-specified or default background color or
-     * pattern */
-
-    if (rpng2_x_create_window()) {
-
-        /* GRR TEMPORARY HACK:  this is fundamentally no different from cases
-         * above; libpng should longjmp() back to us when png_ptr goes away.
-         * If we/it segfault instead, seems like a libpng bug... */
-
-        /* we're here via libpng callback, so if window fails, clean and bail */
-printf("readpng2_cleanup.\n");
-        readpng2_cleanup(&rpng2_info);
-        rpng2_x_cleanup();
-        exit(2);
-    }
-}
-
-
-
-
-
-static int rpng2_x_create_window(void)
-{
-    ulg bg_red   = rpng2_info.bg_red;
-    ulg bg_green = rpng2_info.bg_green;
-    ulg bg_blue  = rpng2_info.bg_blue;
-    ulg bg_pixel = 0L;
-    ulg attrmask;
-    int need_colormap = FALSE;
-    int screen, pad;
-    uch *xdata;
-    Window root;
-    XEvent e;
-    XGCValues gcvalues;
-    XSetWindowAttributes attr;
-    XSizeHints *size_hints;
-    XTextProperty windowName, *pWindowName = &windowName;
-    XTextProperty iconName, *pIconName = &iconName;
-    XVisualInfo visual_info;
-    XWMHints *wm_hints;
-
-
-    Trace((stderr, "beginning rpng2_x_create_window()\n"))
-
-    screen = DefaultScreen(display);
-    depth = DisplayPlanes(display, screen);
-    root = RootWindow(display, screen);
-
-#ifdef DEBUG
-    XSynchronize(display, True);
-#endif
-
-    if (depth != 16 && depth != 24 && depth != 32) {
-        int visuals_matched = 0;
-
-        Trace((stderr, "default depth is %d:  checking other visuals\n",
-          depth))
-
-        /* 24-bit first */
-        visual_info.screen = screen;
-        visual_info.depth = 24;
-        visual_list = XGetVisualInfo(display,
-          VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched);
-        if (visuals_matched == 0) {
-/* GRR:  add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */
-            fprintf(stderr, "default screen depth %d not supported, and no"
-              " 24-bit visuals found\n", depth);
-            return 2;
-        }
-        Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n",
-          visuals_matched))
-        visual = visual_list[0].visual;
-        depth = visual_list[0].depth;
-/*
-        colormap_size = visual_list[0].colormap_size;
-        visual_class = visual->class;
-        visualID = XVisualIDFromVisual(visual);
- */
-        have_nondefault_visual = TRUE;
-        need_colormap = TRUE;
-    } else {
-        XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info);
-        visual = visual_info.visual;
-    }
-
-    RMask = visual->red_mask;
-    GMask = visual->green_mask;
-    BMask = visual->blue_mask;
-
-/* GRR:  add/check 8-bit support */
-    if (depth == 8 || need_colormap) {
-        colormap = XCreateColormap(display, root, visual, AllocNone);
-        if (!colormap) {
-            fprintf(stderr, "XCreateColormap() failed\n");
-            return 2;
-        }
-        have_colormap = TRUE;
-        if (depth == 8)
-            bg_image = FALSE;   /* gradient just wastes palette entries */
-    }
-    if (depth == 15 || depth == 16) {
-        RShift = 15 - rpng2_x_msb(RMask);    /* these are right-shifts */
-        GShift = 15 - rpng2_x_msb(GMask);
-        BShift = 15 - rpng2_x_msb(BMask);
-    } else if (depth > 16) {
-        RShift = rpng2_x_msb(RMask) - 7;     /* these are left-shifts */
-        GShift = rpng2_x_msb(GMask) - 7;
-        BShift = rpng2_x_msb(BMask) - 7;
-    }
-    if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) {
-        fprintf(stderr, "rpng2 internal logic error:  negative X shift(s)!\n");
-        return 2;
-    }
-
-/*---------------------------------------------------------------------------
-    Finally, create the window.
-  ---------------------------------------------------------------------------*/
-
-    attr.backing_store = Always;
-    attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask;
-    attrmask = CWBackingStore | CWEventMask;
-    if (have_nondefault_visual) {
-        attr.colormap = colormap;
-        attr.background_pixel = 0;
-        attr.border_pixel = 1;
-        attrmask |= CWColormap | CWBackPixel | CWBorderPixel;
-    }
-
-    window = XCreateWindow(display, root, 0, 0, rpng2_info.width,
-      rpng2_info.height, 0, depth, InputOutput, visual, attrmask, &attr);
-
-    if (window == None) {
-        fprintf(stderr, "XCreateWindow() failed\n");
-        return 2;
-    } else
-        have_window = TRUE;
-
-    if (depth == 8)
-        XSetWindowColormap(display, window, colormap);
-
-    if (!XStringListToTextProperty(&window_name, 1, pWindowName))
-        pWindowName = NULL;
-    if (!XStringListToTextProperty(&icon_name, 1, pIconName))
-        pIconName = NULL;
-
-    /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */
-
-    if ((size_hints = XAllocSizeHints()) != NULL) {
-        /* window will not be resizable */
-        size_hints->flags = PMinSize | PMaxSize;
-        size_hints->min_width = size_hints->max_width = (int)rpng2_info.width;
-        size_hints->min_height = size_hints->max_height =
-          (int)rpng2_info.height;
-    }
-
-    if ((wm_hints = XAllocWMHints()) != NULL) {
-        wm_hints->initial_state = NormalState;
-        wm_hints->input = True;
-     /* wm_hints->icon_pixmap = icon_pixmap; */
-        wm_hints->flags = StateHint | InputHint  /* | IconPixmapHint */ ;
-    }
-
-    XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
-      size_hints, wm_hints, NULL);
-
-    /* various properties and hints no longer needed; free memory */
-    if (pWindowName)
-       XFree(pWindowName->value);
-    if (pIconName)
-       XFree(pIconName->value);
-    if (size_hints)
-        XFree(size_hints);
-    if (wm_hints)
-       XFree(wm_hints);
-
-    XMapWindow(display, window);
-
-    gc = XCreateGC(display, window, 0, &gcvalues);
-    have_gc = TRUE;
-
-/*---------------------------------------------------------------------------
-    Allocate memory for the X- and display-specific version of the image.
-  ---------------------------------------------------------------------------*/
-
-    if (depth == 24 || depth == 32) {
-        xdata = (uch *)malloc(4*rpng2_info.width*rpng2_info.height);
-        pad = 32;
-    } else if (depth == 16) {
-        xdata = (uch *)malloc(2*rpng2_info.width*rpng2_info.height);
-        pad = 16;
-    } else /* depth == 8 */ {
-        xdata = (uch *)malloc(rpng2_info.width*rpng2_info.height);
-        pad = 8;
-    }
-
-    if (!xdata) {
-        fprintf(stderr, PROGNAME ":  unable to allocate image memory\n");
-        return 4;
-    }
-
-    ximage = XCreateImage(display, visual, depth, ZPixmap, 0,
-      (char *)xdata, rpng2_info.width, rpng2_info.height, pad, 0);
-
-    if (!ximage) {
-        fprintf(stderr, PROGNAME ":  XCreateImage() failed\n");
-        free(xdata);
-        return 3;
-    }
-
-    /* to avoid testing the byte order every pixel (or doubling the size of
-     * the drawing routine with a giant if-test), we arbitrarily set the byte
-     * order to MSBFirst and let Xlib worry about inverting things on little-
-     * endian machines (e.g., Linux/x86, old VAXen, etc.)--this is not the
-     * most efficient approach (the giant if-test would be better), but in
-     * the interest of clarity, we'll take the easy way out... */
-
-    ximage->byte_order = MSBFirst;
-
-/*---------------------------------------------------------------------------
-    Fill window with the specified background color (default is black) or
-    faked "background image" (but latter is disabled if 8-bit; gradients
-    just waste palette entries).
-  ---------------------------------------------------------------------------*/
-
-    if (bg_image)
-        rpng2_x_load_bg_image();    /* resets bg_image if fails */
-
-    if (!bg_image) {
-        if (depth == 24 || depth == 32) {
-            bg_pixel = (bg_red   << RShift) |
-                       (bg_green << GShift) |
-                       (bg_blue  << BShift);
-        } else if (depth == 16) {
-            bg_pixel = (((bg_red   << 8) >> RShift) & RMask) |
-                       (((bg_green << 8) >> GShift) & GMask) |
-                       (((bg_blue  << 8) >> BShift) & BMask);
-        } else /* depth == 8 */ {
-
-            /* GRR:  add 8-bit support */
-
-        }
-        XSetForeground(display, gc, bg_pixel);
-        XFillRectangle(display, window, gc, 0, 0, rpng2_info.width,
-          rpng2_info.height);
-    }
-
-/*---------------------------------------------------------------------------
-    Wait for first Expose event to do any drawing, then flush and return.
-  ---------------------------------------------------------------------------*/
-
-    do
-        XNextEvent(display, &e);
-    while (e.type != Expose || e.xexpose.count);
-
-    XFlush(display);
-
-    return 0;
-
-} /* end function rpng2_x_create_window() */
-
-
-
-
-
-static int rpng2_x_load_bg_image(void)
-{
-    uch *src;
-    char *dest;
-    uch r1, r2, g1, g2, b1, b2;
-    uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv;
-    int k, hmax, max;
-    int xidx, yidx, yidx_max = (bgscale-1);
-    int even_odd_vert, even_odd_horiz, even_odd;
-    int invert_gradient2 = (bg[pat].type & 0x08);
-    int invert_column;
-    int ximage_rowbytes = ximage->bytes_per_line;
-    ulg i, row;
-    ulg pixel;
-
-/*---------------------------------------------------------------------------
-    Allocate buffer for fake background image to be used with transparent
-    images; if this fails, revert to plain background color.
-  ---------------------------------------------------------------------------*/
-
-    bg_rowbytes = 3 * rpng2_info.width;
-    bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height);
-    if (!bg_data) {
-        fprintf(stderr, PROGNAME
-          ":  unable to allocate memory for background image\n");
-        bg_image = 0;
-        return 1;
-    }
-
-/*---------------------------------------------------------------------------
-    Vertical gradients (ramps) in NxN squares, alternating direction and
-    colors (N == bgscale).
-  ---------------------------------------------------------------------------*/
-
-    if ((bg[pat].type & 0x07) == 0) {
-        uch r1_min  = rgb[bg[pat].rgb1_min].r;
-        uch g1_min  = rgb[bg[pat].rgb1_min].g;
-        uch b1_min  = rgb[bg[pat].rgb1_min].b;
-        uch r2_min  = rgb[bg[pat].rgb2_min].r;
-        uch g2_min  = rgb[bg[pat].rgb2_min].g;
-        uch b2_min  = rgb[bg[pat].rgb2_min].b;
-        int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min;
-        int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min;
-        int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min;
-        int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min;
-        int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min;
-        int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            yidx = (int)(row % bgscale);
-            even_odd_vert = (int)((row / bgscale) & 1);
-
-            r1 = r1_min + (r1_diff * yidx) / yidx_max;
-            g1 = g1_min + (g1_diff * yidx) / yidx_max;
-            b1 = b1_min + (b1_diff * yidx) / yidx_max;
-            r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max;
-            g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max;
-            b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max;
-
-            r2 = r2_min + (r2_diff * yidx) / yidx_max;
-            g2 = g2_min + (g2_diff * yidx) / yidx_max;
-            b2 = b2_min + (b2_diff * yidx) / yidx_max;
-            r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max;
-            g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max;
-            b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max;
-
-            dest = (char *)bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                even_odd_horiz = (int)((i / bgscale) & 1);
-                even_odd = even_odd_vert ^ even_odd_horiz;
-                invert_column =
-                  (even_odd_horiz && (bg[pat].type & 0x10));
-                if (even_odd == 0) {        /* gradient #1 */
-                    if (invert_column) {
-                        *dest++ = r1_inv;
-                        *dest++ = g1_inv;
-                        *dest++ = b1_inv;
-                    } else {
-                        *dest++ = r1;
-                        *dest++ = g1;
-                        *dest++ = b1;
-                    }
-                } else {                    /* gradient #2 */
-                    if ((invert_column && invert_gradient2) ||
-                        (!invert_column && !invert_gradient2))
-                    {
-                        *dest++ = r2;       /* not inverted or */
-                        *dest++ = g2;       /*  doubly inverted */
-                        *dest++ = b2;
-                    } else {
-                        *dest++ = r2_inv;
-                        *dest++ = g2_inv;   /* singly inverted */
-                        *dest++ = b2_inv;
-                    }
-                }
-            }
-        }
-
-/*---------------------------------------------------------------------------
-    Soft gradient-diamonds with scale = bgscale.  Code contributed by Adam
-    M. Costello.
-  ---------------------------------------------------------------------------*/
-
-    } else if ((bg[pat].type & 0x07) == 1) {
-
-        hmax = (bgscale-1)/2;   /* half the max weight of a color */
-        max = 2*hmax;           /* the max weight of a color */
-
-        r1 = rgb[bg[pat].rgb1_max].r;
-        g1 = rgb[bg[pat].rgb1_max].g;
-        b1 = rgb[bg[pat].rgb1_max].b;
-        r2 = rgb[bg[pat].rgb2_max].r;
-        g2 = rgb[bg[pat].rgb2_max].g;
-        b2 = rgb[bg[pat].rgb2_max].b;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            yidx = (int)(row % bgscale);
-            if (yidx > hmax)
-                yidx = bgscale-1 - yidx;
-            dest = (char *)bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                xidx = (int)(i % bgscale);
-                if (xidx > hmax)
-                    xidx = bgscale-1 - xidx;
-                k = xidx + yidx;
-                *dest++ = (k*r1 + (max-k)*r2) / max;
-                *dest++ = (k*g1 + (max-k)*g2) / max;
-                *dest++ = (k*b1 + (max-k)*b2) / max;
-            }
-        }
-
-/*---------------------------------------------------------------------------
-    Radial "starburst" with azimuthal sinusoids; [eventually number of sinu-
-    soids will equal bgscale?].  This one is slow but very cool.  Code con-
-    tributed by Pieter S. van der Meulen (originally in Smalltalk).
-  ---------------------------------------------------------------------------*/
-
-    } else if ((bg[pat].type & 0x07) == 2) {
-        uch ch;
-        int ii, x, y, hw, hh, grayspot;
-        double freq, rotate, saturate, gray, intensity;
-        double angle=0.0, aoffset=0.0, maxDist, dist;
-        double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t;
-
-        fprintf(stderr, "%s:  computing radial background...",
-          PROGNAME);
-        fflush(stderr);
-
-        hh = (int)(rpng2_info.height / 2);
-        hw = (int)(rpng2_info.width / 2);
-
-        /* variables for radial waves:
-         *   aoffset:  number of degrees to rotate hue [CURRENTLY NOT USED]
-         *   freq:  number of color beams originating from the center
-         *   grayspot:  size of the graying center area (anti-alias)
-         *   rotate:  rotation of the beams as a function of radius
-         *   saturate:  saturation of beams' shape azimuthally
-         */
-        angle = CLIP(angle, 0.0, 360.0);
-        grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw));
-        freq = MAX((double)bg[pat].bg_freq, 0.0);
-        saturate = (double)bg[pat].bg_bsat * 0.1;
-        rotate = (double)bg[pat].bg_brot * 0.1;
-        gray = 0.0;
-        intensity = 0.0;
-        maxDist = (double)((hw*hw) + (hh*hh));
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            y = (int)(row - hh);
-            dest = (char *)bg_data + row*bg_rowbytes;
-            for (i = 0;  i < rpng2_info.width;  ++i) {
-                x = (int)(i - hw);
-                angle = (x == 0)? PI_2 : atan((double)y / (double)x);
-                gray = (double)MAX(ABS(y), ABS(x)) / grayspot;
-                gray = MIN(1.0, gray);
-                dist = (double)((x*x) + (y*y)) / maxDist;
-                intensity = cos((angle+(rotate*dist*PI)) * freq) *
-                  gray * saturate;
-                intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5;
-                hue = (angle + PI) * INV_PI_360 + aoffset;
-                s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh));
-                s = MIN(MAX(s,0.0), 1.0);
-                v = MIN(MAX(intensity,0.0), 1.0);
-
-                if (s == 0.0) {
-                    ch = (uch)(v * 255.0);
-                    *dest++ = ch;
-                    *dest++ = ch;
-                    *dest++ = ch;
-                } else {
-                    if ((hue < 0.0) || (hue >= 360.0))
-                        hue -= (((int)(hue / 360.0)) * 360.0);
-                    hue /= 60.0;
-                    ii = (int)hue;
-                    f = hue - (double)ii;
-                    p = (1.0 - s) * v;
-                    q = (1.0 - (s * f)) * v;
-                    t = (1.0 - (s * (1.0 - f))) * v;
-                    if      (ii == 0) { red = v; green = t; blue = p; }
-                    else if (ii == 1) { red = q; green = v; blue = p; }
-                    else if (ii == 2) { red = p; green = v; blue = t; }
-                    else if (ii == 3) { red = p; green = q; blue = v; }
-                    else if (ii == 4) { red = t; green = p; blue = v; }
-                    else if (ii == 5) { red = v; green = p; blue = q; }
-                    *dest++ = (uch)(red * 255.0);
-                    *dest++ = (uch)(green * 255.0);
-                    *dest++ = (uch)(blue * 255.0);
-                }
-            }
-        }
-        fprintf(stderr, "done.\n");
-        fflush(stderr);
-    }
-
-/*---------------------------------------------------------------------------
-    Blast background image to display buffer before beginning PNG decode.
-  ---------------------------------------------------------------------------*/
-
-    if (depth == 24 || depth == 32) {
-        ulg red, green, blue;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            src = bg_data + row*bg_rowbytes;
-            dest = ximage->data + row*ximage_rowbytes;
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                red   = *src++;
-                green = *src++;
-                blue  = *src++;
-                pixel = (red   << RShift) |
-                        (green << GShift) |
-                        (blue  << BShift);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                /* GRR BUG:  this assumes bpp == 32, but may be 24: */
-                *dest++ = (char)((pixel >> 24) & 0xff);
-                *dest++ = (char)((pixel >> 16) & 0xff);
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        }
-
-    } else if (depth == 16) {
-        ush red, green, blue;
-
-        for (row = 0;  row < rpng2_info.height;  ++row) {
-            src = bg_data + row*bg_rowbytes;
-            dest = ximage->data + row*ximage_rowbytes;
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                red   = ((ush)(*src) << 8);  ++src;
-                green = ((ush)(*src) << 8);  ++src;
-                blue  = ((ush)(*src) << 8);  ++src;
-                pixel = ((red   >> RShift) & RMask) |
-                        ((green >> GShift) & GMask) |
-                        ((blue  >> BShift) & BMask);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        }
-
-    } else /* depth == 8 */ {
-
-        /* GRR:  add 8-bit support */
-
-    }
-
-    XPutImage(display, window, gc, ximage, 0, 0, 0, 0, rpng2_info.width,
-      rpng2_info.height);
-
-    return 0;
-
-} /* end function rpng2_x_load_bg_image() */
-
-
-
-
-
-static void rpng2_x_display_row(ulg row)
-{
-    uch bg_red   = rpng2_info.bg_red;
-    uch bg_green = rpng2_info.bg_green;
-    uch bg_blue  = rpng2_info.bg_blue;
-    uch *src, *src2=NULL;
-    char *dest;
-    uch r, g, b, a;
-    int ximage_rowbytes = ximage->bytes_per_line;
-    ulg i, pixel;
-    static int rows=0, prevpass=(-1);
-    static ulg firstrow;
-
-/*---------------------------------------------------------------------------
-    rows and firstrow simply track how many rows (and which ones) have not
-    yet been displayed; alternatively, we could call XPutImage() for every
-    row and not bother with the records-keeping.
-  ---------------------------------------------------------------------------*/
-
-    Trace((stderr, "beginning rpng2_x_display_row()\n"))
-
-    if (rpng2_info.pass != prevpass) {
-        if (pause_after_pass && rpng2_info.pass > 0) {
-            XEvent e;
-            KeySym k;
-
-            fprintf(stderr,
-              "%s:  end of pass %d of 7; click in image window to continue\n",
-              PROGNAME, prevpass + 1);
-            do
-                XNextEvent(display, &e);
-            while (!(e.type == ButtonPress && e.xbutton.button == Button1)
-                   && !(e.type == KeyPress &&
-                   ((k = XLookupKeysym(&e.xkey, 0)) == XK_q
-                    || k == XK_Escape) )) ;
-        }
-        fprintf(stderr, "%s:  pass %d of 7\r", PROGNAME, rpng2_info.pass + 1);
-        fflush(stderr);
-        prevpass = rpng2_info.pass;
-    }
-
-    if (rows == 0)
-        firstrow = row;   /* first row that is not yet displayed */
-
-    ++rows;   /* count of rows received but not yet displayed */
-
-/*---------------------------------------------------------------------------
-    Aside from the use of the rpng2_info struct, the lack of an outer loop
-    (over rows) and moving the XPutImage() call outside the "if (depth)"
-    tests, this routine is identical to rpng_x_display_image() in the non-
-    progressive version of the program.
-  ---------------------------------------------------------------------------*/
-
-    if (depth == 24 || depth == 32) {
-        ulg red, green, blue;
-
-        src = rpng2_info.image_data + row*rpng2_info.rowbytes;
-        if (bg_image)
-            src2 = bg_data + row*bg_rowbytes;
-        dest = ximage->data + row*ximage_rowbytes;
-        if (rpng2_info.channels == 3) {
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                red   = *src++;
-                green = *src++;
-                blue  = *src++;
-                pixel = (red   << RShift) |
-                        (green << GShift) |
-                        (blue  << BShift);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                /* GRR BUG:  this assumes bpp == 32, but may be 24: */
-                *dest++ = (char)((pixel >> 24) & 0xff);
-                *dest++ = (char)((pixel >> 16) & 0xff);
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        } else /* if (rpng2_info.channels == 4) */ {
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                a = *src++;
-                if (bg_image) {
-                    bg_red   = *src2++;
-                    bg_green = *src2++;
-                    bg_blue  = *src2++;
-                }
-                if (a == 255) {
-                    red   = r;
-                    green = g;
-                    blue  = b;
-                } else if (a == 0) {
-                    red   = bg_red;
-                    green = bg_green;
-                    blue  = bg_blue;
-                } else {
-                    /* this macro (from png.h) composites the foreground
-                     * and background values and puts the result into the
-                     * first argument */
-                    alpha_composite(red,   r, a, bg_red);
-                    alpha_composite(green, g, a, bg_green);
-                    alpha_composite(blue,  b, a, bg_blue);
-                }
-                pixel = (red   << RShift) |
-                        (green << GShift) |
-                        (blue  << BShift);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                /* GRR BUG:  this assumes bpp == 32, but may be 24: */
-                *dest++ = (char)((pixel >> 24) & 0xff);
-                *dest++ = (char)((pixel >> 16) & 0xff);
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        }
-
-    } else if (depth == 16) {
-        ush red, green, blue;
-
-        src = rpng2_info.row_pointers[row];
-        if (bg_image)
-            src2 = bg_data + row*bg_rowbytes;
-        dest = ximage->data + row*ximage_rowbytes;
-        if (rpng2_info.channels == 3) {
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                red   = ((ush)(*src) << 8);
-                ++src;
-                green = ((ush)(*src) << 8);
-                ++src;
-                blue  = ((ush)(*src) << 8);
-                ++src;
-                pixel = ((red   >> RShift) & RMask) |
-                        ((green >> GShift) & GMask) |
-                        ((blue  >> BShift) & BMask);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        } else /* if (rpng2_info.channels == 4) */ {
-            for (i = rpng2_info.width;  i > 0;  --i) {
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                a = *src++;
-                if (bg_image) {
-                    bg_red   = *src2++;
-                    bg_green = *src2++;
-                    bg_blue  = *src2++;
-                }
-                if (a == 255) {
-                    red   = ((ush)r << 8);
-                    green = ((ush)g << 8);
-                    blue  = ((ush)b << 8);
-                } else if (a == 0) {
-                    red   = ((ush)bg_red   << 8);
-                    green = ((ush)bg_green << 8);
-                    blue  = ((ush)bg_blue  << 8);
-                } else {
-                    /* this macro (from png.h) composites the foreground
-                     * and background values and puts the result back into
-                     * the first argument (== fg byte here:  safe) */
-                    alpha_composite(r, r, a, bg_red);
-                    alpha_composite(g, g, a, bg_green);
-                    alpha_composite(b, b, a, bg_blue);
-                    red   = ((ush)r << 8);
-                    green = ((ush)g << 8);
-                    blue  = ((ush)b << 8);
-                }
-                pixel = ((red   >> RShift) & RMask) |
-                        ((green >> GShift) & GMask) |
-                        ((blue  >> BShift) & BMask);
-                /* recall that we set ximage->byte_order = MSBFirst above */
-                *dest++ = (char)((pixel >>  8) & 0xff);
-                *dest++ = (char)( pixel        & 0xff);
-            }
-        }
-
-    } else /* depth == 8 */ {
-
-        /* GRR:  add 8-bit support */
-
-    }
-
-
-/*---------------------------------------------------------------------------
-    Display after every 16 rows or when on one of last two rows.  (Region
-    may include previously displayed lines due to interlacing--i.e., not
-    contiguous.  Also, second-to-last row is final one in interlaced images
-    with odd number of rows.)  For demos, flush (and delay) after every 16th
-    row so "sparse" passes don't go twice as fast.
-  ---------------------------------------------------------------------------*/
-
-    if (demo_timing && (row - firstrow >= 16 || row >= rpng2_info.height-2)) {
-        XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0,
-          (int)firstrow, rpng2_info.width, row - firstrow + 1);
-        XFlush(display);
-        rows = 0;
-        usleep(usleep_duration);
-    } else
-    if (!demo_timing && ((rows & 0xf) == 0 || row >= rpng2_info.height-2)) {
-        XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0,
-          (int)firstrow, rpng2_info.width, row - firstrow + 1);
-        XFlush(display);
-        rows = 0;
-    }
-
-}
-
-
-
-
-
-static void rpng2_x_finish_display(void)
-{
-    Trace((stderr, "beginning rpng2_x_finish_display()\n"))
-
-    /* last row has already been displayed by rpng2_x_display_row(), so we
-     * have nothing to do here except set a flag and let the user know that
-     * the image is done */
-
-    rpng2_info.done = TRUE;
-    printf(
-      "Done.  Press Q, Esc or mouse button 1 (within image window) to quit.\n");
-    fflush(stdout);
-}
-
-
-
-
-
-static void rpng2_x_cleanup(void)
-{
-    if (bg_image && bg_data) {
-        free(bg_data);
-        bg_data = NULL;
-    }
-
-    if (rpng2_info.image_data) {
-        free(rpng2_info.image_data);
-        rpng2_info.image_data = NULL;
-    }
-
-    if (rpng2_info.row_pointers) {
-        free(rpng2_info.row_pointers);
-        rpng2_info.row_pointers = NULL;
-    }
-
-    if (ximage) {
-        if (ximage->data) {
-            free(ximage->data);           /* we allocated it, so we free it */
-            ximage->data = (char *)NULL;  /*  instead of XDestroyImage() */
-        }
-        XDestroyImage(ximage);
-        ximage = NULL;
-    }
-
-    if (have_gc)
-        XFreeGC(display, gc);
-
-    if (have_window)
-        XDestroyWindow(display, window);
-
-    if (have_colormap)
-        XFreeColormap(display, colormap);
-
-    if (have_nondefault_visual)
-        XFree(visual_list);
-}
-
-
-
-
-
-static int rpng2_x_msb(ulg u32val)
-{
-    int i;
-
-    for (i = 31;  i >= 0;  --i) {
-        if (u32val & 0x80000000L)
-            break;
-        u32val <<= 1;
-    }
-    return i;
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/toucan.png b/tkimg1.3/libpng/contrib/gregbook/toucan.png
deleted file mode 100644
index 03960d4..0000000
Binary files a/tkimg1.3/libpng/contrib/gregbook/toucan.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/gregbook/wpng.c b/tkimg1.3/libpng/contrib/gregbook/wpng.c
deleted file mode 100644
index d6e8514..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/wpng.c
+++ /dev/null
@@ -1,816 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   wpng - simple PNG-writing program                                 wpng.c
-
-   This program converts certain NetPBM binary files (grayscale and RGB,
-   maxval = 255) to PNG.  Non-interlaced PNGs are written progressively;
-   interlaced PNGs are read and written in one memory-intensive blast.
-   Thanks to Jean-loup Gailly for providing the necessary trick to read
-   interactive text from the keyboard while stdin is redirected.
-
-   NOTE:  includes provisional support for PNM type "8" (portable alphamap)
-          images, presumed to be a 32-bit interleaved RGBA format; no pro-
-          vision for possible interleaved grayscale+alpha (16-bit) format.
-          THIS IS UNLIKELY TO BECOME AN OFFICIAL NETPBM ALPHA FORMAT!
-
-   to do:
-    - delete output file if quit before calling any writepng routines
-    - process backspace with -text option under DOS/Win? (currently get ^H)
-
-  ---------------------------------------------------------------------------
-
-   Changelog:
-    - 1.01:  initial public release
-    - 1.02:  modified to allow abbreviated options
-    - 1.03:  removed extraneous character from usage screen; fixed bug in
-              command-line parsing
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#define PROGNAME  "wpng"
-#define VERSION   "1.03 of 19 March 2000"
-#define APPNAME   "Simple PGM/PPM/PAM to PNG Converter"
-
-#if defined(__MSDOS__) || defined(__OS2__)
-#  define DOS_OS2_W32
-#elif defined(_WIN32) || defined(__WIN32__)
-#  define DOS_OS2_W32
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <setjmp.h>     /* for jmpbuf declaration in writepng.h */
-#include <time.h>
-
-#ifdef DOS_OS2_W32
-#  include <io.h>       /* for isatty(), setmode() prototypes */
-#  include <fcntl.h>    /* O_BINARY for fdopen() without text translation */
-#  ifdef __EMX__
-#    ifndef getch
-#      define getch() _read_kbd(0, 1, 0)    /* need getche() */
-#    endif
-#  else /* !__EMX__ */
-#    ifdef __GO32__
-#      include <pc.h>
-#      define getch() getkey()  /* GRR:  need getche() */
-#    else
-#      include <conio.h>        /* for getche() console input */
-#    endif
-#  endif /* ?__EMX__ */
-#  define FGETS(buf,len,stream)  dos_kbd_gets(buf,len)
-#else
-#  include <unistd.h>           /* for isatty() prototype */
-#  define FGETS fgets
-#endif
-
-/* #define DEBUG  :  this enables the Trace() macros */
-
-/* #define FORBID_LATIN1_CTRL  :  this requires the user to re-enter any
-   text that includes control characters discouraged by the PNG spec; text
-   that includes an escape character (27) must be re-entered regardless */
-
-#include "writepng.h"   /* typedefs, common macros, writepng prototypes */
-
-
-
-/* local prototypes */
-
-static int  wpng_isvalid_latin1(uch *p, int len);
-static void wpng_cleanup(void);
-
-#ifdef DOS_OS2_W32
-   static char *dos_kbd_gets(char *buf, int len);
-#endif
-
-
-
-static mainprog_info wpng_info;   /* lone global */
-
-
-
-int main(int argc, char **argv)
-{
-#ifndef DOS_OS2_W32
-    FILE *keybd;
-#endif
-#ifdef sgi
-    FILE *tmpfile;      /* or we could just use keybd, since no overlap */
-    char tmpline[80];
-#endif
-    char *inname = NULL, outname[256];
-    char *p, pnmchar, pnmline[256];
-    char *bgstr, *textbuf = NULL;
-    ulg rowbytes;
-    int rc, len = 0;
-    int error = 0;
-    int text = FALSE;
-    int maxval;
-    double LUT_exponent;                /* just the lookup table */
-    double CRT_exponent = 2.2;          /* just the monitor */
-    double default_display_exponent;    /* whole display system */
-    double default_gamma = 0.0;
-
-
-    wpng_info.infile = NULL;
-    wpng_info.outfile = NULL;
-    wpng_info.image_data = NULL;
-    wpng_info.row_pointers = NULL;
-    wpng_info.filter = FALSE;
-    wpng_info.interlaced = FALSE;
-    wpng_info.have_bg = FALSE;
-    wpng_info.have_time = FALSE;
-    wpng_info.have_text = 0;
-    wpng_info.gamma = 0.0;
-
-
-    /* First get the default value for our display-system exponent, i.e.,
-     * the product of the CRT exponent and the exponent corresponding to
-     * the frame-buffer's lookup table (LUT), if any.  If the PNM image
-     * looks correct on the user's display system, its file gamma is the
-     * inverse of this value.  (Note that this is not an exhaustive list
-     * of LUT values--e.g., OpenStep has a lot of weird ones--but it should
-     * cover 99% of the current possibilities.  This section must ensure
-     * that default_display_exponent is positive.) */
-
-#if defined(NeXT)
-    /* third-party utilities can modify the default LUT exponent */
-    LUT_exponent = 1.0 / 2.2;
-    /*
-    if (some_next_function_that_returns_gamma(&next_gamma))
-        LUT_exponent = 1.0 / next_gamma;
-     */
-#elif defined(sgi)
-    LUT_exponent = 1.0 / 1.7;
-    /* there doesn't seem to be any documented function to
-     * get the "gamma" value, so we do it the hard way */
-    tmpfile = fopen("/etc/config/system.glGammaVal", "r");
-    if (tmpfile) {
-        double sgi_gamma;
-
-        fgets(tmpline, 80, tmpfile);
-        fclose(tmpfile);
-        sgi_gamma = atof(tmpline);
-        if (sgi_gamma > 0.0)
-            LUT_exponent = 1.0 / sgi_gamma;
-    }
-#elif defined(Macintosh)
-    LUT_exponent = 1.8 / 2.61;
-    /*
-    if (some_mac_function_that_returns_gamma(&mac_gamma))
-        LUT_exponent = mac_gamma / 2.61;
-     */
-#else
-    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */
-#endif
-
-    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */
-    default_display_exponent = LUT_exponent * CRT_exponent;
-
-
-    /* If the user has set the SCREEN_GAMMA environment variable as suggested
-     * (somewhat imprecisely) in the libpng documentation, use that; otherwise
-     * use the default value we just calculated.  Either way, the user may
-     * override this via a command-line option. */
-
-    if ((p = getenv("SCREEN_GAMMA")) != NULL) {
-        double exponent = atof(p);
-
-        if (exponent > 0.0)
-            default_gamma = 1.0 / exponent;
-    }
-
-    if (default_gamma == 0.0)
-        default_gamma = 1.0 / default_display_exponent;
-
-
-    /* Now parse the command line for options and the PNM filename. */
-
-    while (*++argv && !error) {
-        if (!strncmp(*argv, "-i", 2)) {
-            wpng_info.interlaced = TRUE;
-        } else if (!strncmp(*argv, "-time", 3)) {
-            wpng_info.modtime = time(NULL);
-            wpng_info.have_time = TRUE;
-        } else if (!strncmp(*argv, "-text", 3)) {
-            text = TRUE;
-        } else if (!strncmp(*argv, "-gamma", 2)) {
-            if (!*++argv)
-                ++error;
-            else {
-                wpng_info.gamma = atof(*argv);
-                if (wpng_info.gamma <= 0.0)
-                    ++error;
-                else if (wpng_info.gamma > 1.01)
-                    fprintf(stderr, PROGNAME
-                      " warning:  file gammas are usually less than 1.0\n");
-            }
-        } else if (!strncmp(*argv, "-bgcolor", 4)) {
-            if (!*++argv)
-                ++error;
-            else {
-                bgstr = *argv;
-                if (strlen(bgstr) != 7 || bgstr[0] != '#')
-                    ++error;
-                else {
-                    unsigned r, g, b;  /* this way quiets compiler warnings */
-
-                    sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b);
-                    wpng_info.bg_red   = (uch)r;
-                    wpng_info.bg_green = (uch)g;
-                    wpng_info.bg_blue  = (uch)b;
-                    wpng_info.have_bg = TRUE;
-                }
-            }
-        } else {
-            if (**argv != '-') {
-                inname = *argv;
-                if (argv[1])   /* shouldn't be any more args after filename */
-                    ++error;
-            } else
-                ++error;   /* not expecting any other options */
-        }
-    }
-
-
-    /* open the input and output files, or register an error and abort */
-
-    if (!inname) {
-        if (isatty(0)) {
-            fprintf(stderr, PROGNAME
-              ":  must give input filename or provide image data via stdin\n");
-            ++error;
-        } else {
-#ifdef DOS_OS2_W32
-            /* some buggy C libraries require BOTH setmode() and fdopen(bin) */
-            setmode(fileno(stdin), O_BINARY);
-            setmode(fileno(stdout), O_BINARY);
-#endif
-            if ((wpng_info.infile = fdopen(fileno(stdin), "rb")) == NULL) {
-                fprintf(stderr, PROGNAME
-                  ":  unable to reopen stdin in binary mode\n");
-                ++error;
-            } else
-            if ((wpng_info.outfile = fdopen(fileno(stdout), "wb")) == NULL) {
-                fprintf(stderr, PROGNAME
-                  ":  unable to reopen stdout in binary mode\n");
-                fclose(wpng_info.infile);
-                ++error;
-            } else
-                wpng_info.filter = TRUE;
-        }
-    } else if ((len = strlen(inname)) > 250) {
-        fprintf(stderr, PROGNAME ":  input filename is too long [%d chars]\n",
-          len);
-        ++error;
-    } else if (!(wpng_info.infile = fopen(inname, "rb"))) {
-        fprintf(stderr, PROGNAME ":  can't open input file [%s]\n", inname);
-        ++error;
-    }
-
-    if (!error) {
-        fgets(pnmline, 256, wpng_info.infile);
-        if (pnmline[0] != 'P' || ((pnmchar = pnmline[1]) != '5' &&
-            pnmchar != '6' && pnmchar != '8'))
-        {
-            fprintf(stderr, PROGNAME
-              ":  input file [%s] is not a binary PGM, PPM or PAM file\n",
-              inname);
-            ++error;
-        } else {
-            wpng_info.pnmtype = (int)(pnmchar - '0');
-            if (wpng_info.pnmtype != 8)
-                wpng_info.have_bg = FALSE;  /* no need for bg if opaque */
-            do {
-                fgets(pnmline, 256, wpng_info.infile);  /* lose any comments */
-            } while (pnmline[0] == '#');
-            sscanf(pnmline, "%ld %ld", &wpng_info.width, &wpng_info.height);
-            do {
-                fgets(pnmline, 256, wpng_info.infile);  /* more comment lines */
-            } while (pnmline[0] == '#');
-            sscanf(pnmline, "%d", &maxval);
-            if (wpng_info.width <= 0L || wpng_info.height <= 0L ||
-                maxval != 255)
-            {
-                fprintf(stderr, PROGNAME
-                  ":  only positive width/height, maxval == 255 allowed \n");
-                ++error;
-            }
-            wpng_info.sample_depth = 8;  /* <==> maxval 255 */
-
-            if (!wpng_info.filter) {
-                /* make outname from inname */
-                if ((p = strrchr(inname, '.')) == NULL ||
-                    (p - inname) != (len - 4))
-                {
-                    strcpy(outname, inname);
-                    strcpy(outname+len, ".png");
-                } else {
-                    len -= 4;
-                    strncpy(outname, inname, len);
-                    strcpy(outname+len, ".png");
-                }
-                /* check if outname already exists; if not, open */
-                if ((wpng_info.outfile = fopen(outname, "rb")) != NULL) {
-                    fprintf(stderr, PROGNAME ":  output file exists [%s]\n",
-                      outname);
-                    fclose(wpng_info.outfile);
-                    ++error;
-                } else if (!(wpng_info.outfile = fopen(outname, "wb"))) {
-                    fprintf(stderr, PROGNAME ":  can't open output file [%s]\n",
-                      outname);
-                    ++error;
-                }
-            }
-        }
-        if (error) {
-            fclose(wpng_info.infile);
-            wpng_info.infile = NULL;
-            if (wpng_info.filter) {
-                fclose(wpng_info.outfile);
-                wpng_info.outfile = NULL;
-            }
-        }
-    }
-
-
-    /* if we had any errors, print usage and die horrible death...arrr! */
-
-    if (error) {
-        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, APPNAME);
-        writepng_version_info();
-        fprintf(stderr, "\n"
-"Usage:  %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] pnmfile\n"
-"or: ... | %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] | ...\n"
-         "    exp \ttransfer-function exponent (``gamma'') of the image in\n"
-         "\t\t  floating-point format (e.g., ``%.5f''); if image looks\n"
-         "\t\t  correct on given display system, image gamma is equal to\n"
-         "\t\t  inverse of display-system exponent, i.e., 1 / (LUT * CRT)\n"
-         "\t\t  (where LUT = lookup-table exponent and CRT = CRT exponent;\n"
-         "\t\t  first varies, second is usually 2.2, all are positive)\n"
-         "    bg  \tdesired background color for alpha-channel images, in\n"
-         "\t\t  7-character hex RGB format (e.g., ``#ff7700'' for orange:\n"
-         "\t\t  same as HTML colors)\n"
-         "    -text\tprompt interactively for text info (tEXt chunks)\n"
-         "    -time\tinclude a tIME chunk (last modification time)\n"
-         "    -interlace\twrite interlaced PNG image\n"
-         "\n"
-"pnmfile or stdin must be a binary PGM (`P5'), PPM (`P6') or (extremely\n"
-"unofficial and unsupported!) PAM (`P8') file.  Currently it is required\n"
-"to have maxval == 255 (i.e., no scaling).  If pnmfile is specified, it\n"
-"is converted to the corresponding PNG file with the same base name but a\n"
-"``.png'' extension; files read from stdin are converted and sent to stdout.\n"
-"The conversion is progressive (low memory usage) unless interlacing is\n"
-"requested; in that case the whole image will be buffered in memory and\n"
-"written in one call.\n"
-         "\n", PROGNAME, PROGNAME, default_gamma);
-        exit(1);
-    }
-
-
-    /* prepare the text buffers for libpng's use; note that even though
-     * PNG's png_text struct includes a length field, we don't have to fill
-     * it out */
-
-    if (text &&
-#ifndef DOS_OS2_W32
-        (keybd = fdopen(fileno(stderr), "r")) != NULL &&
-#endif
-        (textbuf = (char *)malloc((5 + 9)*75)) != NULL)
-    {
-        int i, valid, result;
-
-        fprintf(stderr,
-          "Enter text info (no more than 72 characters per line);\n");
-        fprintf(stderr, "to skip a field, hit the <Enter> key.\n");
-        /* note:  just <Enter> leaves len == 1 */
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_TITLE_OFFSET;
-            fprintf(stderr, "  Title: ");
-            fflush(stderr);
-            if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) {
-                if (p[len-1] == '\n')
-                    p[--len] = '\0';
-                wpng_info.title = p;
-                wpng_info.have_text |= TEXT_TITLE;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_TITLE;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_TITLE;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_AUTHOR_OFFSET;
-            fprintf(stderr, "  Author: ");
-            fflush(stderr);
-            if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) {
-                if (p[len-1] == '\n')
-                    p[--len] = '\0';
-                wpng_info.author = p;
-                wpng_info.have_text |= TEXT_AUTHOR;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_AUTHOR;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_AUTHOR;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_DESC_OFFSET;
-            fprintf(stderr, "  Description (up to 9 lines):\n");
-            for (i = 1;  i < 10;  ++i) {
-                fprintf(stderr, "    [%d] ", i);
-                fflush(stderr);
-                if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1)
-                    p += len;   /* now points at NULL; char before is newline */
-                else
-                    break;
-            }
-            if ((len = p - (textbuf + TEXT_DESC_OFFSET)) > 1) {
-                if (p[-1] == '\n') {
-                    p[-1] = '\0';
-                    --len;
-                }
-                wpng_info.desc = textbuf + TEXT_DESC_OFFSET;
-                wpng_info.have_text |= TEXT_DESC;
-                p = textbuf + TEXT_DESC_OFFSET;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_DESC;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_DESC;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_COPY_OFFSET;
-            fprintf(stderr, "  Copyright: ");
-            fflush(stderr);
-            if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) {
-                if (p[len-1] == '\n')
-                    p[--len] = '\0';
-                wpng_info.copyright = p;
-                wpng_info.have_text |= TEXT_COPY;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_COPY;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_COPY;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_EMAIL_OFFSET;
-            fprintf(stderr, "  E-mail: ");
-            fflush(stderr);
-            if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) {
-                if (p[len-1] == '\n')
-                    p[--len] = '\0';
-                wpng_info.email = p;
-                wpng_info.have_text |= TEXT_EMAIL;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_EMAIL;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_EMAIL;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-        do {
-            valid = TRUE;
-            p = textbuf + TEXT_URL_OFFSET;
-            fprintf(stderr, "  URL: ");
-            fflush(stderr);
-            if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) {
-                if (p[len-1] == '\n')
-                    p[--len] = '\0';
-                wpng_info.url = p;
-                wpng_info.have_text |= TEXT_URL;
-                if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) {
-                    fprintf(stderr, "    " PROGNAME " warning:  character code"
-                      " %u is %sdiscouraged by the PNG\n    specification "
-                      "[first occurrence was at character position #%d]\n",
-                      (unsigned)p[result], (p[result] == 27)? "strongly " : "",
-                      result+1);
-                    fflush(stderr);
-#ifdef FORBID_LATIN1_CTRL
-                    wpng_info.have_text &= ~TEXT_URL;
-                    valid = FALSE;
-#else
-                    if (p[result] == 27) {    /* escape character */
-                        wpng_info.have_text &= ~TEXT_URL;
-                        valid = FALSE;
-                    }
-#endif
-                }
-            }
-        } while (!valid);
-
-#ifndef DOS_OS2_W32
-        fclose(keybd);
-#endif
-
-    } else if (text) {
-        fprintf(stderr, PROGNAME ":  unable to allocate memory for text\n");
-        text = FALSE;
-        wpng_info.have_text = 0;
-    }
-
-
-    /* allocate libpng stuff, initialize transformations, write pre-IDAT data */
-
-    if ((rc = writepng_init(&wpng_info)) != 0) {
-        switch (rc) {
-            case 2:
-                fprintf(stderr, PROGNAME
-                  ":  libpng initialization problem (longjmp)\n");
-                break;
-            case 4:
-                fprintf(stderr, PROGNAME ":  insufficient memory\n");
-                break;
-            case 11:
-                fprintf(stderr, PROGNAME
-                  ":  internal logic error (unexpected PNM type)\n");
-                break;
-            default:
-                fprintf(stderr, PROGNAME
-                  ":  unknown writepng_init() error\n");
-                break;
-        }
-        exit(rc);
-    }
-
-
-    /* free textbuf, since it's a completely local variable and all text info
-     * has just been written to the PNG file */
-
-    if (text && textbuf) {
-        free(textbuf);
-        textbuf = NULL;
-    }
-
-
-    /* calculate rowbytes on basis of image type; note that this becomes much
-     * more complicated if we choose to support PBM type, ASCII PNM types, or
-     * 16-bit-per-sample binary data [currently not an official NetPBM type] */
-
-    if (wpng_info.pnmtype == 5)
-        rowbytes = wpng_info.width;
-    else if (wpng_info.pnmtype == 6)
-        rowbytes = wpng_info.width * 3;
-    else /* if (wpng_info.pnmtype == 8) */
-        rowbytes = wpng_info.width * 4;
-
-
-    /* read and write the image, either in its entirety (if writing interlaced
-     * PNG) or row by row (if non-interlaced) */
-
-    fprintf(stderr, "Encoding image data...\n");
-    fflush(stderr);
-
-    if (wpng_info.interlaced) {
-        long i;
-        ulg bytes;
-        ulg image_bytes = rowbytes * wpng_info.height;   /* overflow? */
-
-        wpng_info.image_data = (uch *)malloc(image_bytes);
-        wpng_info.row_pointers = (uch **)malloc(wpng_info.height*sizeof(uch *));
-        if (wpng_info.image_data == NULL || wpng_info.row_pointers == NULL) {
-            fprintf(stderr, PROGNAME ":  insufficient memory for image data\n");
-            writepng_cleanup(&wpng_info);
-            wpng_cleanup();
-            exit(5);
-        }
-        for (i = 0;  i < wpng_info.height;  ++i)
-            wpng_info.row_pointers[i] = wpng_info.image_data + i*rowbytes;
-        bytes = fread(wpng_info.image_data, 1, image_bytes, wpng_info.infile);
-        if (bytes != image_bytes) {
-            fprintf(stderr, PROGNAME ":  expected %lu bytes, got %lu bytes\n",
-              image_bytes, bytes);
-            fprintf(stderr, "  (continuing anyway)\n");
-        }
-        if (writepng_encode_image(&wpng_info) != 0) {
-            fprintf(stderr, PROGNAME
-              ":  libpng problem (longjmp) while writing image data\n");
-            writepng_cleanup(&wpng_info);
-            wpng_cleanup();
-            exit(2);
-        }
-
-    } else /* not interlaced:  write progressively (row by row) */ {
-        long j;
-        ulg bytes;
-
-        wpng_info.image_data = (uch *)malloc(rowbytes);
-        if (wpng_info.image_data == NULL) {
-            fprintf(stderr, PROGNAME ":  insufficient memory for row data\n");
-            writepng_cleanup(&wpng_info);
-            wpng_cleanup();
-            exit(5);
-        }
-        error = 0;
-        for (j = wpng_info.height;  j > 0L;  --j) {
-            bytes = fread(wpng_info.image_data, 1, rowbytes, wpng_info.infile);
-            if (bytes != rowbytes) {
-                fprintf(stderr, PROGNAME
-                  ":  expected %lu bytes, got %lu bytes (row %ld)\n", rowbytes,
-                  bytes, wpng_info.height-j);
-                ++error;
-                break;
-            }
-            if (writepng_encode_row(&wpng_info) != 0) {
-                fprintf(stderr, PROGNAME
-                  ":  libpng problem (longjmp) while writing row %ld\n",
-                  wpng_info.height-j);
-                ++error;
-                break;
-            }
-        }
-        if (error) {
-            writepng_cleanup(&wpng_info);
-            wpng_cleanup();
-            exit(2);
-        }
-        if (writepng_encode_finish(&wpng_info) != 0) {
-            fprintf(stderr, PROGNAME ":  error on final libpng call\n");
-            writepng_cleanup(&wpng_info);
-            wpng_cleanup();
-            exit(2);
-        }
-    }
-
-
-    /* OK, we're done (successfully):  clean up all resources and quit */
-
-    fprintf(stderr, "Done.\n");
-    fflush(stderr);
-
-    writepng_cleanup(&wpng_info);
-    wpng_cleanup();
-
-    return 0;
-}
-
-
-
-
-
-static int wpng_isvalid_latin1(uch *p, int len)
-{
-    int i, result = -1;
-
-    for (i = 0;  i < len;  ++i) {
-        if (p[i] == 10 || (p[i] > 31 && p[i] < 127) || p[i] > 160)
-            continue;           /* character is completely OK */
-        if (result < 0 || (p[result] != 27 && p[i] == 27))
-            result = i;         /* mark location of first questionable one */
-    }                           /*  or of first escape character (bad) */
-
-    return result;
-}
-
-
-
-
-
-static void wpng_cleanup(void)
-{
-    if (wpng_info.outfile) {
-        fclose(wpng_info.outfile);
-        wpng_info.outfile = NULL;
-    }
-
-    if (wpng_info.infile) {
-        fclose(wpng_info.infile);
-        wpng_info.infile = NULL;
-    }
-
-    if (wpng_info.image_data) {
-        free(wpng_info.image_data);
-        wpng_info.image_data = NULL;
-    }
-
-    if (wpng_info.row_pointers) {
-        free(wpng_info.row_pointers);
-        wpng_info.row_pointers = NULL;
-    }
-}
-
-
-
-
-#ifdef DOS_OS2_W32
-
-static char *dos_kbd_gets(char *buf, int len)
-{
-    int ch, count=0;
-
-    do {
-        buf[count++] = ch = getche();
-    } while (ch != '\r' && count < len-1);
-
-    buf[count--] = '\0';        /* terminate string */
-    if (buf[count] == '\r')     /* Enter key makes CR, so change to newline */
-        buf[count] = '\n';
-
-    fprintf(stderr, "\n");      /* Enter key does *not* cause a newline */
-    fflush(stderr);
-
-    return buf;
-}
-
-#endif /* DOS_OS2_W32 */
diff --git a/tkimg1.3/libpng/contrib/gregbook/writepng.c b/tkimg1.3/libpng/contrib/gregbook/writepng.c
deleted file mode 100644
index 6802b12..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/writepng.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   wpng - simple PNG-writing program                             writepng.c
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-
-#include <stdlib.h>     /* for exit() prototype */
-
-#include "png.h"        /* libpng header; includes zlib.h and setjmp.h */
-#include "writepng.h"   /* typedefs, common macros, public prototypes */
-
-
-/* local prototype */
-
-static void writepng_error_handler(png_structp png_ptr, png_const_charp msg);
-
-
-
-void writepng_version_info(void)
-{
-  fprintf(stderr, "   Compiled with libpng %s; using libpng %s.\n",
-    PNG_LIBPNG_VER_STRING, png_libpng_ver);
-  fprintf(stderr, "   Compiled with zlib %s; using zlib %s.\n",
-    ZLIB_VERSION, zlib_version);
-}
-
-
-
-
-/* returns 0 for success, 2 for libpng problem, 4 for out of memory, 11 for
- *  unexpected pnmtype; note that outfile might be stdout */
-
-int writepng_init(mainprog_info *mainprog_ptr)
-{
-    png_structp  png_ptr;       /* note:  temporary variables! */
-    png_infop  info_ptr;
-    int color_type, interlace_type;
-
-
-    /* could also replace libpng warning-handler (final NULL), but no need: */
-
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr,
-      writepng_error_handler, NULL);
-    if (!png_ptr)
-        return 4;   /* out of memory */
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-        png_destroy_write_struct(&png_ptr, NULL);
-        return 4;   /* out of memory */
-    }
-
-
-    /* setjmp() must be called in every function that calls a PNG-writing
-     * libpng function, unless an alternate error handler was installed--
-     * but compatible error handlers must either use longjmp() themselves
-     * (as in this program) or exit immediately, so here we go: */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-        return 2;
-    }
-
-
-    /* make sure outfile is (re)opened in BINARY mode */
-
-    png_init_io(png_ptr, mainprog_ptr->outfile);
-
-
-    /* set the compression levels--in general, always want to leave filtering
-     * turned on (except for palette images) and allow all of the filters,
-     * which is the default; want 32K zlib window, unless entire image buffer
-     * is 16K or smaller (unknown here)--also the default; usually want max
-     * compression (NOT the default); and remaining compression flags should
-     * be left alone */
-
-    png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
-/*
-    >> this is default for no filtering; Z_FILTERED is default otherwise:
-    png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY);
-    >> these are all defaults:
-    png_set_compression_mem_level(png_ptr, 8);
-    png_set_compression_window_bits(png_ptr, 15);
-    png_set_compression_method(png_ptr, 8);
- */
-
-
-    /* set the image parameters appropriately */
-
-    if (mainprog_ptr->pnmtype == 5)
-        color_type = PNG_COLOR_TYPE_GRAY;
-    else if (mainprog_ptr->pnmtype == 6)
-        color_type = PNG_COLOR_TYPE_RGB;
-    else if (mainprog_ptr->pnmtype == 8)
-        color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-    else {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-        return 11;
-    }
-
-    interlace_type = mainprog_ptr->interlaced? PNG_INTERLACE_ADAM7 :
-                                               PNG_INTERLACE_NONE;
-
-    png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height,
-      mainprog_ptr->sample_depth, color_type, interlace_type,
-      PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
-
-    if (mainprog_ptr->gamma > 0.0)
-        png_set_gAMA(png_ptr, info_ptr, mainprog_ptr->gamma);
-
-    if (mainprog_ptr->have_bg) {   /* we know it's RGBA, not gray+alpha */
-        png_color_16  background;
-
-        background.red = mainprog_ptr->bg_red;
-        background.green = mainprog_ptr->bg_green;
-        background.blue = mainprog_ptr->bg_blue;
-        png_set_bKGD(png_ptr, info_ptr, &background);
-    }
-
-    if (mainprog_ptr->have_time) {
-        png_time  modtime;
-
-        png_convert_from_time_t(&modtime, mainprog_ptr->modtime);
-        png_set_tIME(png_ptr, info_ptr, &modtime);
-    }
-
-    if (mainprog_ptr->have_text) {
-        png_text  text[6];
-        int  num_text = 0;
-
-        if (mainprog_ptr->have_text & TEXT_TITLE) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "Title";
-            text[num_text].text = mainprog_ptr->title;
-            ++num_text;
-        }
-        if (mainprog_ptr->have_text & TEXT_AUTHOR) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "Author";
-            text[num_text].text = mainprog_ptr->author;
-            ++num_text;
-        }
-        if (mainprog_ptr->have_text & TEXT_DESC) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "Description";
-            text[num_text].text = mainprog_ptr->desc;
-            ++num_text;
-        }
-        if (mainprog_ptr->have_text & TEXT_COPY) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "Copyright";
-            text[num_text].text = mainprog_ptr->copyright;
-            ++num_text;
-        }
-        if (mainprog_ptr->have_text & TEXT_EMAIL) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "E-mail";
-            text[num_text].text = mainprog_ptr->email;
-            ++num_text;
-        }
-        if (mainprog_ptr->have_text & TEXT_URL) {
-            text[num_text].compression = PNG_TEXT_COMPRESSION_NONE;
-            text[num_text].key = "URL";
-            text[num_text].text = mainprog_ptr->url;
-            ++num_text;
-        }
-        png_set_text(png_ptr, info_ptr, text, num_text);
-    }
-
-
-    /* write all chunks up to (but not including) first IDAT */
-
-    png_write_info(png_ptr, info_ptr);
-
-
-    /* if we wanted to write any more text info *after* the image data, we
-     * would set up text struct(s) here and call png_set_text() again, with
-     * just the new data; png_set_tIME() could also go here, but it would
-     * have no effect since we already called it above (only one tIME chunk
-     * allowed) */
-
-
-    /* set up the transformations:  for now, just pack low-bit-depth pixels
-     * into bytes (one, two or four pixels per byte) */
-
-    png_set_packing(png_ptr);
-/*  png_set_shift(png_ptr, &sig_bit);  to scale low-bit-depth values */
-
-
-    /* make sure we save our pointers for use in writepng_encode_image() */
-
-    mainprog_ptr->png_ptr = png_ptr;
-    mainprog_ptr->info_ptr = info_ptr;
-
-
-    /* OK, that's all we need to do for now; return happy */
-
-    return 0;
-}
-
-
-
-
-
-/* returns 0 for success, 2 for libpng (longjmp) problem */
-
-int writepng_encode_image(mainprog_info *mainprog_ptr)
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-
-    /* as always, setjmp() must be called in every function that calls a
-     * PNG-writing libpng function */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-        mainprog_ptr->png_ptr = NULL;
-        mainprog_ptr->info_ptr = NULL;
-        return 2;
-    }
-
-
-    /* and now we just write the whole image; libpng takes care of interlacing
-     * for us */
-
-    png_write_image(png_ptr, mainprog_ptr->row_pointers);
-
-
-    /* since that's it, we also close out the end of the PNG file now--if we
-     * had any text or time info to write after the IDATs, second argument
-     * would be info_ptr, but we optimize slightly by sending NULL pointer: */
-
-    png_write_end(png_ptr, NULL);
-
-    return 0;
-}
-
-
-
-
-
-/* returns 0 if succeeds, 2 if libpng problem */
-
-int writepng_encode_row(mainprog_info *mainprog_ptr)  /* NON-interlaced only! */
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-
-    /* as always, setjmp() must be called in every function that calls a
-     * PNG-writing libpng function */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-        mainprog_ptr->png_ptr = NULL;
-        mainprog_ptr->info_ptr = NULL;
-        return 2;
-    }
-
-
-    /* image_data points at our one row of image data */
-
-    png_write_row(png_ptr, mainprog_ptr->image_data);
-
-    return 0;
-}
-
-
-
-
-
-/* returns 0 if succeeds, 2 if libpng problem */
-
-int writepng_encode_finish(mainprog_info *mainprog_ptr)   /* NON-interlaced! */
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-
-    /* as always, setjmp() must be called in every function that calls a
-     * PNG-writing libpng function */
-
-    if (setjmp(mainprog_ptr->jmpbuf)) {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-        mainprog_ptr->png_ptr = NULL;
-        mainprog_ptr->info_ptr = NULL;
-        return 2;
-    }
-
-
-    /* close out PNG file; if we had any text or time info to write after
-     * the IDATs, second argument would be info_ptr: */
-
-    png_write_end(png_ptr, NULL);
-
-    return 0;
-}
-
-
-
-
-
-void writepng_cleanup(mainprog_info *mainprog_ptr)
-{
-    png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
-    png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
-
-    if (png_ptr && info_ptr)
-        png_destroy_write_struct(&png_ptr, &info_ptr);
-}
-
-
-
-
-
-static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
-{
-    mainprog_info  *mainprog_ptr;
-
-    /* This function, aside from the extra step of retrieving the "error
-     * pointer" (below) and the fact that it exists within the application
-     * rather than within libpng, is essentially identical to libpng's
-     * default error handler.  The second point is critical:  since both
-     * setjmp() and longjmp() are called from the same code, they are
-     * guaranteed to have compatible notions of how big a jmp_buf is,
-     * regardless of whether _BSD_SOURCE or anything else has (or has not)
-     * been defined. */
-
-    fprintf(stderr, "writepng libpng error: %s\n", msg);
-    fflush(stderr);
-
-    mainprog_ptr = png_get_error_ptr(png_ptr);
-    if (mainprog_ptr == NULL) {         /* we are completely hosed now */
-        fprintf(stderr,
-          "writepng severe error:  jmpbuf not recoverable; terminating.\n");
-        fflush(stderr);
-        exit(99);
-    }
-
-    longjmp(mainprog_ptr->jmpbuf, 1);
-}
diff --git a/tkimg1.3/libpng/contrib/gregbook/writepng.h b/tkimg1.3/libpng/contrib/gregbook/writepng.h
deleted file mode 100644
index 93c3da8..0000000
--- a/tkimg1.3/libpng/contrib/gregbook/writepng.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*---------------------------------------------------------------------------
-
-   wpng - simple PNG-writing program                             writepng.h
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/
-
-#ifndef TRUE
-#  define TRUE 1
-#  define FALSE 0
-#endif
-
-#ifndef MAX
-#  define MAX(a,b)  ((a) > (b)? (a) : (b))
-#  define MIN(a,b)  ((a) < (b)? (a) : (b))
-#endif
-
-#ifdef DEBUG
-#  define Trace(x)  {fprintf x ; fflush(stderr); fflush(stdout);}
-#else
-#  define Trace(x)  ;
-#endif
-
-#define TEXT_TITLE    0x01
-#define TEXT_AUTHOR   0x02
-#define TEXT_DESC     0x04
-#define TEXT_COPY     0x08
-#define TEXT_EMAIL    0x10
-#define TEXT_URL      0x20
-
-#define TEXT_TITLE_OFFSET        0
-#define TEXT_AUTHOR_OFFSET      72
-#define TEXT_COPY_OFFSET     (2*72)
-#define TEXT_EMAIL_OFFSET    (3*72)
-#define TEXT_URL_OFFSET      (4*72)
-#define TEXT_DESC_OFFSET     (5*72)
-
-typedef unsigned char   uch;
-typedef unsigned short  ush;
-typedef unsigned long   ulg;
-
-typedef struct _mainprog_info {
-    double gamma;
-    long width;
-    long height;
-    time_t modtime;
-    FILE *infile;
-    FILE *outfile;
-    void *png_ptr;
-    void *info_ptr;
-    uch *image_data;
-    uch **row_pointers;
-    char *title;
-    char *author;
-    char *desc;
-    char *copyright;
-    char *email;
-    char *url;
-    int filter;    /* command-line-filter flag, not PNG row filter! */
-    int pnmtype;
-    int sample_depth;
-    int interlaced;
-    int have_bg;
-    int have_time;
-    int have_text;
-    jmp_buf jmpbuf;
-    uch bg_red;
-    uch bg_green;
-    uch bg_blue;
-} mainprog_info;
-
-
-/* prototypes for public functions in writepng.c */
-
-void writepng_version_info(void);
-
-int writepng_init(mainprog_info *mainprog_ptr);
-
-int writepng_encode_image(mainprog_info *mainprog_ptr);
-
-int writepng_encode_row(mainprog_info *mainprog_ptr);
-
-int writepng_encode_finish(mainprog_info *mainprog_ptr);
-
-void writepng_cleanup(mainprog_info *mainprog_ptr);
diff --git a/tkimg1.3/libpng/contrib/pngminus/README b/tkimg1.3/libpng/contrib/pngminus/README
deleted file mode 100644
index 8683a59..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/README
+++ /dev/null
@@ -1,153 +0,0 @@
-PngMinus
---------
-(copyright Willem van Schaik, 1999)
-
-
-License
--------
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear in
-supporting documentation. This software is provided "as is" without
-express or implied warranty.
-
-
-Some history
-------------
-Soon after the creation of PNG in 1995, the need was felt for a set of
-pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
-(Willem van Schaik) started such a project. Luckily we discovered this
-and merged the two together into pnmtopng.tar.gz, which is available
-from a/o ftp://swrinde.nde.swri.edu/pub/png/.
-
-These two utilities have many, many options and make use of most of the
-features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
-the utilities quite complex and by now not anymore very maintainable.
-When we wrote these programs, libpng was still in an early stage.
-Therefore, lots of the functionality that we put in our software can now
-be done using transform-functions in libpng.
-
-Finally, to compile these programs, you need to have installed and
-compiled three libraries: libpng, zlib and netpbm. Especially the latter
-makes the whole setup a bit bulky. But that's unavoidable given the many
-features of pnmtopng.
-
-
-What now
---------
-At this moment libpng is in a very stable state and can do much of the
-work done in pnmtopng. Also, pnmtopng needs to be upgraded to the new
-interface of libpng. Hence, it is time for a rewrite from the ground up
-of pnmtopng and pngtopnm. This will happen in the near future (stay
-tuned). The new package will get a different name to distinguish it from
-the old one: PngPlus.
-
-To experiment a bit with the new interface of libpng, I started off with
-a small prototype that contains only the basic functionality. It doesn't
-have any of the options to read or write special chunks and it will do
-no gamma correction. But this makes it also a simple program that is
-quite easy to understand and can serve well as a template for other
-software developments. (By now there are of course a couple of programs,
-like Greg Roelofs' rpng/wpng, that can be used just as good.)
-
-
-Can and can not
----------------
-As this is the small brother of the future PngPlus, I called this fellow
-PngMinus. Because I started this development in good-old Turbo-C, I
-avoided the use the netpbm library, which requires DOS extenders. Again,
-another reason to call it PngMinus (minus netpbm :-). So, part of the
-program are some elementary routines to read / write pgm- and ppm-files.
-It does not read b&w pbm-files.
-
-The downside of this approach is that you can not use them on images
-that require blocks of memory bigger than 64k (the DOS version). For
-larger images you will get an out-of-memory error.
-
-As said before, PngMinus doesn't correct for gamma. When reading
-png-files you can do this just as well by piping the output of png2pnm
-to pnmgamma, one of the standard PbmPlus tools. This same scenario will
-most probably also be followed in the full-blown future PngPlus, with
-the addition of course of the possibility to create gamma-chunks when
-writing png-files.
-
-On the other hand it supports alpha-channels. When reading a png-image
-you can write the alpha-channel into a pgm-file. And when creating an
-RGB+A png-image, you just combine a ppm-file with a corresponding
-pgm-file containing the alpha-channel. When reading, transparency chunks
-are converted into an alpha-channel and from there on treated the same
-way.
-
-Finally you can opt for writing ascii or binary pgm- and ppm-files. When
-the bit-depth is 16, the format will always be ascii.
-
-
-Using it
---------
-To distinguish them from pnmtopng and PngPlus, the utilities are named
-png2pnm and pnm2png (2 instead of to). The input- and output-files can
-be given as parameters or through redirection. Therefore the programs
-can be part of a pipe.
-
-To list the options type "png2pnm -h" or "pnm2png -h".
-
-
-Just like Scandinavian furniture
---------------------------------
-You have to put it together yourself. I did test the software under
-MS-DOS with Turbo-C 3.0 and under RedHat Linux 4.2 with gcc. In both
-cases I used libpng-1.0.4 and zlib-1.1.3. Later versions should be OK,
-however some older libpng versions have a bug in pngmem.c when using
-Turbo-C 3.0 (see below).
-
-You can build it using one of the two makefiles (make -f makefile.###)
-or use the batch/script files pngminus.bat / pngminus.sh. This assumes
-that you have built the libraries in ../libpng and ../zlib. Using Linux,
-make sure that you have built libpng with makefile.std and not
-makefile.linux (also called .lnx in earlier versions of libpng). The
-latter creates a .so shared-library, while the PngMinus makefile assumes
-a normal .a static library.
-
-If you create a ../pngsuite directory and then store the basn####.png
-files from PngSuite (http://www.schaik.com/pngsuite/) in there, you can
-test in one go the proper functioning of PngMinus, see png2pnm.bat and
-pnm2png.bat (or the .sh versions).
-
-
-Warranty
--------
-Please, remember that this was just a small experiment to learn a few
-things. It will have many unforeseen features <vbg>. Who said bugs? Use
-it when you are in need for something simple or when you want to start
-developing your own stuff.
-
-
-The Turbo bug
--------------
-** pngmem.old
-          hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
-          hptr += 16L;
-** pngmem.c
-          hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
-          hptr = hptr + 16L;
-**
-
-** pngmem.old
-          png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
-          hptr += (png_uint_32)65536L;
-** pngmem.c
-          png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
-          hptr = hptr + 65536L;
-**
-
-
-The end
--------
-Willem van Schaik
-mailto:willem at schaik.com
-http://www.schaik.com/png/
--------
-Oct 1999
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/makefile.std b/tkimg1.3/libpng/contrib/pngminus/makefile.std
deleted file mode 100644
index 2fb061b..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/makefile.std
+++ /dev/null
@@ -1,65 +0,0 @@
-# Makefile for PngMinus (png2pnm and pnm2png)
-# Linux / Unix
-
-#CC=cc
-CC=gcc
-LD=$(CC)
-
-RM=rm -f
-
-#PNGPATH = /usr/local
-#PNGINC = -I$(PNGPATH)/include/libpng12
-#PNGLIB = -L$(PNGPATH)/lib -lpng12
-#PNGLIBS = $(PNGPATH)/lib/libpng12.a
-PNGINC = -I../..
-PNGLIB = -L../.. -lpng
-PNGLIBS = ../../libpng.a
-
-#ZPATH = /usr/local
-#ZINC = -I$(ZPATH)/include
-#ZLIB = -L$(ZPATH)/lib -lz
-#ZLIBS = $(ZPATH)/lib/libz.a
-ZINC = -I../../../zlib
-ZLIB = -L../../../zlib -lz
-ZLIBS = ../../../zlib/libz.a
-
-CFLAGS=-O3 $(PNGINC) $(ZINC)
-LDFLAGS=$(PNGLIB) $(ZLIB)
-LDFLAGSS=$(PNGLIBS) $(ZLIBS)
-C=.c
-O=.o
-L=.a
-E=
-
-# dependencies
-
-#all: png2pnm$(E) pnm2png$(E)
-all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
-
-png2pnm$(O): png2pnm$(C)
-	$(CC) -c $(CFLAGS) png2pnm$(C)
-
-png2pnm$(E): png2pnm$(O)
-	$(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lm
-
-png2pnm-static$(E): png2pnm$(O)
-	$(LD) -o png2pnm-static$(E) png2pnm$(O) $(LDFLAGSS) -lm
-
-pnm2png$(O): pnm2png$(C)
-	$(CC) -c $(CFLAGS) pnm2png$(C)
-
-pnm2png$(E): pnm2png$(O)
-	$(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lm
-
-pnm2png-static$(E): pnm2png$(O)
-	$(LD) -o pnm2png-static$(E) pnm2png$(O) $(LDFLAGSS) -lm
-
-clean:
-	$(RM) png2pnm$(O)
-	$(RM) pnm2png$(O)
-	$(RM) png2pnm$(E)
-	$(RM) pnm2png$(E)
-	$(RM) png2pnm-static$(E)
-	$(RM) pnm2png-static$(E)
-
-# End of makefile for png2pnm / pnm2png
diff --git a/tkimg1.3/libpng/contrib/pngminus/makefile.tc3 b/tkimg1.3/libpng/contrib/pngminus/makefile.tc3
deleted file mode 100644
index 404f18d..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/makefile.tc3
+++ /dev/null
@@ -1,38 +0,0 @@
-# Makefile for PngMinus (png2pnm and pnm2png)
-# TurboC++ 3.0
-
-CC=tcc -Ic:\tc3\inc
-LD=tcc -Lc:\tc3\lib
-LB=tlib
-RM=del
-CP=copy
-MODEL=l
-CCFLAGS=-O -m$(MODEL) -I..\libpng -I..\zlib
-LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib
-C=.c
-O=.obj
-L=.lib
-E=.exe
-
-# dependencies
-
-all: png2pnm$(E) pnm2png$(E)
-
-png2pnm$(O): png2pnm$(C)
-        $(CC) -c $(CCFLAGS) png2pnm$(C)
-
-png2pnm$(E): png2pnm$(O)
-        $(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L)
-
-pnm2png$(O): pnm2png$(C)
-        $(CC) -c $(CCFLAGS) pnm2png$(C)
-
-pnm2png$(E): pnm2png$(O)
-        $(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L)
-
-clean:
-        $(RM) *$(O)
-        $(RM) *$(E)
-
-# End of makefile for png2pnm / pnm2png
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/makevms.com b/tkimg1.3/libpng/contrib/pngminus/makevms.com
deleted file mode 100644
index 00561bc..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/makevms.com
+++ /dev/null
@@ -1,92 +0,0 @@
-$!------------------------------------------------------------------------------
-$! make Contrib programs of libpng under OpenVMS
-$!
-$!
-$! Look for the compiler used
-$!
-$ zlibsrc = "[---.zlib]"
-$ ccopt="/include=(''zlibsrc',[--])"
-$ if f$getsyi("HW_MODEL").ge.1024
-$ then
-$  ccopt = "/prefix=all"+ccopt
-$  comp  = "__decc__=1"
-$  if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ else
-$  if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
-$   then
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$    if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
-$     then
-$      comp  = "__gcc__=1"
-$      CC :== GCC
-$     else
-$      comp = "__vaxc__=1"
-$     endif
-$   else
-$    if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
-$    ccopt = "/decc/prefix=all"+ccopt
-$    comp  = "__decc__=1"
-$  endif
-$ endif
-$ open/write lopt lib.opt
-$ write lopt "[--]libpng.olb/lib"
-$ write lopt "''zlibsrc'libz.olb/lib"
-$ close lopt
-$ open/write xopt x11.opt
-$ write xopt "sys$library:decw$xlibshr.exe/share"
-$ close xopt
-$ write sys$output "Compiling PNG contrib programs ..."
-$   write sys$output "Building pnm2png..."
-$   CALL MAKE pnm2png.OBJ "cc ''CCOPT' pnm2png" -
-	pnm2png.c
-$   call make pnm2png.exe -
-	"LINK pnm2png,lib.opt/opt" -
-	pnm2png.obj
-$   write sys$output "Building png2pnm..."
-$   CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" -
-	png2pnm.c
-$   call make png2pnm.exe -
-	"LINK png2pnm,lib.opt/opt" -
-	png2pnm.obj
-$ exit
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
diff --git a/tkimg1.3/libpng/contrib/pngminus/png2pnm.bat b/tkimg1.3/libpng/contrib/pngminus/png2pnm.bat
deleted file mode 100644
index 449cf36..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/png2pnm.bat
+++ /dev/null
@@ -1,41 +0,0 @@
-REM -- grayscale
-png2pnm.exe -noraw ..\pngsuite\basn0g01.png basn0g01.pgm
-png2pnm.exe -noraw ..\pngsuite\basn0g02.png basn0g02.pgm
-png2pnm.exe -noraw ..\pngsuite\basn0g04.png basn0g04.pgm
-png2pnm.exe -noraw ..\pngsuite\basn0g08.png basn0g08.pgm
-png2pnm.exe -noraw ..\pngsuite\basn0g16.png basn0g16.pgm
-REM -- full-color
-png2pnm.exe -noraw ..\pngsuite\basn2c08.png basn2c08.ppm
-png2pnm.exe -noraw ..\pngsuite\basn2c16.png basn2c16.ppm
-REM -- palletted
-png2pnm.exe -noraw ..\pngsuite\basn3p01.png basn3p01.ppm
-png2pnm.exe -noraw ..\pngsuite\basn3p02.png basn3p02.ppm
-png2pnm.exe -noraw ..\pngsuite\basn3p04.png basn3p04.ppm
-png2pnm.exe -noraw ..\pngsuite\basn3p08.png basn3p08.ppm
-REM -- gray with alpha-channel
-png2pnm.exe -noraw ..\pngsuite\basn4a08.png basn4a08.pgm
-png2pnm.exe -noraw ..\pngsuite\basn4a16.png basn4a16.pgm
-REM -- color with alpha-channel
-png2pnm.exe -noraw -alpha basn6a08.pgm ..\pngsuite\basn6a08.png basn6a08.ppm
-png2pnm.exe -noraw -alpha basn6a16.pgm ..\pngsuite\basn6a16.png basn6a16.ppm
-REM -- grayscale
-png2pnm.exe -raw ..\pngsuite\basn0g01.png rawn0g01.pgm
-png2pnm.exe -raw ..\pngsuite\basn0g02.png rawn0g02.pgm
-png2pnm.exe -raw ..\pngsuite\basn0g04.png rawn0g04.pgm
-png2pnm.exe -raw ..\pngsuite\basn0g08.png rawn0g08.pgm
-png2pnm.exe -raw ..\pngsuite\basn0g16.png rawn0g16.pgm
-REM -- full-color
-png2pnm.exe -raw ..\pngsuite\basn2c08.png rawn2c08.ppm
-png2pnm.exe -raw ..\pngsuite\basn2c16.png rawn2c16.ppm
-REM -- palletted
-png2pnm.exe -raw ..\pngsuite\basn3p01.png rawn3p01.ppm
-png2pnm.exe -raw ..\pngsuite\basn3p02.png rawn3p02.ppm
-png2pnm.exe -raw ..\pngsuite\basn3p04.png rawn3p04.ppm
-png2pnm.exe -raw ..\pngsuite\basn3p08.png rawn3p08.ppm
-REM -- gray with alpha-channel
-png2pnm.exe -raw ..\pngsuite\basn4a08.png rawn4a08.pgm
-png2pnm.exe -raw ..\pngsuite\basn4a16.png rawn4a16.pgm
-REM -- color with alpha-channel
-png2pnm.exe -noraw -alpha rawn6a08.pgm ..\pngsuite\basn6a08.png rawn6a08.ppm
-png2pnm.exe -noraw -alpha rawn6a16.pgm ..\pngsuite\basn6a16.png rawn6a16.ppm
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/png2pnm.c b/tkimg1.3/libpng/contrib/pngminus/png2pnm.c
deleted file mode 100644
index 010870a..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/png2pnm.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- *  png2pnm.c --- conversion from PNG-file to PGM/PPM-file
- *  copyright (C) 1999 by Willem van Schaik <willem at schaik.com>
- *
- *  version 1.0 - 1999.10.15 - First version.
- *
- *  Permission to use, copy, modify, and distribute this software and
- *  its documentation for any purpose and without fee is hereby granted,
- *  provided that the above copyright notice appear in all copies and
- *  that both that copyright notice and this permission notice appear in
- *  supporting documentation. This software is provided "as is" without
- *  express or implied warranty.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef __TURBOC__
-#include <mem.h>
-#include <fcntl.h>
-#endif
-
-#ifndef BOOL
-#define BOOL unsigned char
-#endif
-#ifndef TRUE
-#define TRUE (BOOL) 1
-#endif
-#ifndef FALSE
-#define FALSE (BOOL) 0
-#endif
-
-#ifdef __TURBOC__
-#define STDIN  0
-#define STDOUT 1
-#define STDERR 2
-#endif
-
-/* to make png2pnm verbose so we can find problems (needs to be before png.h) */
-#ifndef PNG_DEBUG
-#define PNG_DEBUG 0
-#endif
-
-#include "png.h"
-
-/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
-#ifndef png_jmpbuf
-#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#endif
-
-/* function prototypes */
-
-int  main (int argc, char *argv[]);
-void usage ();
-BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha);
-
-/*
- *  main
- */
-
-int main(int argc, char *argv[])
-{
-  FILE *fp_rd = stdin;
-  FILE *fp_wr = stdout;
-  FILE *fp_al = NULL;
-  BOOL raw = TRUE;
-  BOOL alpha = FALSE;
-  int argi;
-
-  for (argi = 1; argi < argc; argi++)
-  {
-    if (argv[argi][0] == '-')
-    {
-      switch (argv[argi][1])
-      {
-        case 'n':
-          raw = FALSE;
-          break;
-        case 'r':
-          raw = TRUE;
-          break;
-        case 'a':
-          alpha = TRUE;
-          argi++;
-          if ((fp_al = fopen (argv[argi], "wb")) == NULL)
-          {
-            fprintf (stderr, "PNM2PNG\n");
-            fprintf (stderr, "Error:  can not create alpha-channel file %s\n", argv[argi]);
-            exit (1);
-          }
-          break;
-        case 'h':
-        case '?':
-          usage();
-          exit(0);
-          break;
-        default:
-          fprintf (stderr, "PNG2PNM\n");
-          fprintf (stderr, "Error:  unknown option %s\n", argv[argi]);
-          usage();
-          exit(1);
-          break;
-      } /* end switch */
-    }
-    else if (fp_rd == stdin)
-    {
-      if ((fp_rd = fopen (argv[argi], "rb")) == NULL)
-      {
-             fprintf (stderr, "PNG2PNM\n");
-            fprintf (stderr, "Error:  file %s does not exist\n", argv[argi]);
-            exit (1);
-      }
-    }
-    else if (fp_wr == stdout)
-    {
-      if ((fp_wr = fopen (argv[argi], "wb")) == NULL)
-      {
-        fprintf (stderr, "PNG2PNM\n");
-        fprintf (stderr, "Error:  can not create file %s\n", argv[argi]);
-        exit (1);
-      }
-    }
-    else
-    {
-      fprintf (stderr, "PNG2PNM\n");
-      fprintf (stderr, "Error:  too many parameters\n");
-      usage();
-      exit(1);
-    }
-  } /* end for */
-
-#ifdef __TURBOC__
-  /* set stdin/stdout if required to binary */
-  if (fp_rd == stdin)
-  {
-    setmode (STDIN, O_BINARY);
-  }
-  if ((raw) && (fp_wr == stdout))
-  {
-    setmode (STDOUT, O_BINARY);
-  }
-#endif
-
-  /* call the conversion program itself */
-  if (png2pnm (fp_rd, fp_wr, fp_al, raw, alpha) == FALSE)
-  {
-    fprintf (stderr, "PNG2PNM\n");
-    fprintf (stderr, "Error:  unsuccessful convertion of PNG-image\n");
-    exit(1);
-  }
-
-  /* close input file */
-  fclose (fp_rd);
-  /* close output file */
-  fclose (fp_wr);
-  /* close alpha file */
-  if (alpha)
-    fclose (fp_al);
-
-  return 0;
-}
-
-/*
- *  usage
- */
-
-void usage()
-{
-  fprintf (stderr, "PNG2PNM\n");
-  fprintf (stderr, "   by Willem van Schaik, 1999\n");
-#ifdef __TURBOC__
-  fprintf (stderr, "   for Turbo-C and Borland-C compilers\n");
-#else
-  fprintf (stderr, "   for Linux (and Unix) compilers\n");
-#endif
-  fprintf (stderr, "Usage:  png2pnm [options] <file>.png [<file>.pnm]\n");
-  fprintf (stderr, "   or:  ... | png2pnm [options]\n");
-  fprintf (stderr, "Options:\n");
-  fprintf (stderr, "   -r[aw]   write pnm-file in binary format (P4/P5/P6) (default)\n");
-  fprintf (stderr, "   -n[oraw] write pnm-file in ascii format (P1/P2/P3)\n");
-  fprintf (stderr, "   -a[lpha] <file>.pgm write PNG alpha channel as pgm-file\n");
-  fprintf (stderr, "   -h | -?  print this help-information\n");
-}
-
-/*
- *  png2pnm
- */
-
-BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha)
-{
-  png_struct    *png_ptr = NULL;
-  png_info	*info_ptr = NULL;
-  png_byte      buf[8];
-  png_byte      *png_pixels = NULL;
-  png_byte      **row_pointers = NULL;
-  png_byte      *pix_ptr = NULL;
-  png_uint_32   row_bytes;
-
-  png_uint_32   width;
-  png_uint_32   height;
-  int           bit_depth;
-  int           channels;
-  int           color_type;
-  int           alpha_present;
-  int           row, col;
-  int           ret;
-  int           i;
-  long          dep_16;
-
-  /* read and check signature in PNG file */
-  ret = fread (buf, 1, 8, png_file);
-  if (ret != 8)
-    return FALSE;
-
-  ret = png_check_sig (buf, 8);
-  if (!ret)
-    return FALSE;
-
-  /* create png and info structures */
-
-  png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING,
-    NULL, NULL, NULL);
-  if (!png_ptr)
-    return FALSE;   /* out of memory */
-
-  info_ptr = png_create_info_struct (png_ptr);
-  if (!info_ptr)
-  {
-    png_destroy_read_struct (&png_ptr, NULL, NULL);
-    return FALSE;   /* out of memory */
-  }
-
-  if (setjmp (png_jmpbuf(png_ptr)))
-  {
-    png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
-    return FALSE;
-  }
-
-  /* set up the input control for C streams */
-  png_init_io (png_ptr, png_file);
-  png_set_sig_bytes (png_ptr, 8);  /* we already read the 8 signature bytes */
-
-  /* read the file information */
-  png_read_info (png_ptr, info_ptr);
-
-  /* get size and bit-depth of the PNG-image */
-  png_get_IHDR (png_ptr, info_ptr,
-    &width, &height, &bit_depth, &color_type,
-    NULL, NULL, NULL);
-
-  /* set-up the transformations */
-
-  /* transform paletted images into full-color rgb */
-  if (color_type == PNG_COLOR_TYPE_PALETTE)
-    png_set_expand (png_ptr);
-  /* expand images to bit-depth 8 (only applicable for grayscale images) */
-  if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-    png_set_expand (png_ptr);
-  /* transform transparency maps into full alpha-channel */
-  if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS))
-    png_set_expand (png_ptr);
-
-#ifdef NJET
-  /* downgrade 16-bit images to 8 bit */
-  if (bit_depth == 16)
-    png_set_strip_16 (png_ptr);
-  /* transform grayscale images into full-color */
-  if (color_type == PNG_COLOR_TYPE_GRAY ||
-    color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-    png_set_gray_to_rgb (png_ptr);
-  /* only if file has a file gamma, we do a correction */
-  if (png_get_gAMA (png_ptr, info_ptr, &file_gamma))
-    png_set_gamma (png_ptr, (double) 2.2, file_gamma);
-#endif
-
-  /* all transformations have been registered; now update info_ptr data,
-   * get rowbytes and channels, and allocate image memory */
-
-  png_read_update_info (png_ptr, info_ptr);
-
-  /* get the new color-type and bit-depth (after expansion/stripping) */
-  png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-    NULL, NULL, NULL);
-
-  /* check for 16-bit files */
-  if (bit_depth == 16)
-  {
-    raw = FALSE;
-#ifdef __TURBOC__
-    pnm_file->flags &= ~((unsigned) _F_BIN);
-#endif
-  }
-
-  /* calculate new number of channels and store alpha-presence */
-  if (color_type == PNG_COLOR_TYPE_GRAY)
-    channels = 1;
-  else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-    channels = 2;
-  else if (color_type == PNG_COLOR_TYPE_RGB)
-    channels = 3;
-  else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-    channels = 4;
-  else
-    channels = 0; /* should never happen */
-  alpha_present = (channels - 1) % 2;
-
-  /* check if alpha is expected to be present in file */
-  if (alpha && !alpha_present)
-  {
-    fprintf (stderr, "PNG2PNM\n");
-    fprintf (stderr, "Error:  PNG-file doesn't contain alpha channel\n");
-    exit (1);
-  }
-
-  /* row_bytes is the width x number of channels x (bit-depth / 8) */
-  row_bytes = png_get_rowbytes (png_ptr, info_ptr);
-
-  if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL) {
-    png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
-    return FALSE;
-  }
-
-  if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL)
-  {
-    png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
-    free (png_pixels);
-    png_pixels = NULL;
-    return FALSE;
-  }
-
-  /* set the individual row_pointers to point at the correct offsets */
-  for (i = 0; i < (height); i++)
-    row_pointers[i] = png_pixels + i * row_bytes;
-
-  /* now we can go ahead and just read the whole image */
-  png_read_image (png_ptr, row_pointers);
-
-  /* read rest of file, and get additional chunks in info_ptr - REQUIRED */
-  png_read_end (png_ptr, info_ptr);
-
-  /* clean up after the read, and free any memory allocated - REQUIRED */
-  png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp) NULL);
-
-  /* write header of PNM file */
-
-  if ((color_type == PNG_COLOR_TYPE_GRAY) ||
-      (color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
-  {
-    fprintf (pnm_file, "%s\n", (raw) ? "P5" : "P2");
-    fprintf (pnm_file, "%d %d\n", (int) width, (int) height);
-    fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L));
-  }
-  else if ((color_type == PNG_COLOR_TYPE_RGB) ||
-           (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
-  {
-    fprintf (pnm_file, "%s\n", (raw) ? "P6" : "P3");
-    fprintf (pnm_file, "%d %d\n", (int) width, (int) height);
-    fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L));
-  }
-
-  /* write header of PGM file with alpha channel */
-
-  if ((alpha) &&
-      ((color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ||
-       (color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
-  {
-    fprintf (alpha_file, "%s\n", (raw) ? "P5" : "P2");
-    fprintf (alpha_file, "%d %d\n", (int) width, (int) height);
-    fprintf (alpha_file, "%ld\n", ((1L << (int) bit_depth) - 1L));
-  }
-
-  /* write data to PNM file */
-  pix_ptr = png_pixels;
-
-  for (row = 0; row < height; row++)
-  {
-    for (col = 0; col < width; col++)
-    {
-      for (i = 0; i < (channels - alpha_present); i++)
-      {
-        if (raw)
-          fputc ((int) *pix_ptr++ , pnm_file);
-        else
-          if (bit_depth == 16){
-	    dep_16 = (long) *pix_ptr++;
-            fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++));
-          }
-          else
-            fprintf (pnm_file, "%ld ", (long) *pix_ptr++);
-      }
-      if (alpha_present)
-      {
-        if (!alpha)
-        {
-          pix_ptr++; /* alpha */
-          if (bit_depth == 16)
-            pix_ptr++;
-        }
-        else /* output alpha-channel as pgm file */
-        {
-          if (raw)
-            fputc ((int) *pix_ptr++ , alpha_file);
-          else
-            if (bit_depth == 16){
-	      dep_16 = (long) *pix_ptr++;
-              fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++);
-	    }  
-            else
-              fprintf (alpha_file, "%ld ", (long) *pix_ptr++);
-        }
-      } /* if alpha_present */
-
-      if (!raw)
-        if (col % 4 == 3)
-          fprintf (pnm_file, "\n");
-    } /* end for col */
-
-    if (!raw)
-      if (col % 4 != 0)
-        fprintf (pnm_file, "\n");
-  } /* end for row */
-
-  if (row_pointers != (unsigned char**) NULL)
-    free (row_pointers);
-  if (png_pixels != (unsigned char*) NULL)
-    free (png_pixels);
-
-  return TRUE;
-
-} /* end of source */
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/png2pnm.sh b/tkimg1.3/libpng/contrib/pngminus/png2pnm.sh
deleted file mode 100644
index 854313b..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/png2pnm.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-# -- grayscale
-./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
-./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
-./png2pnm -noraw ../pngsuite/basn0g04.png basn0g04.pgm
-./png2pnm -noraw ../pngsuite/basn0g08.png basn0g08.pgm
-./png2pnm -noraw ../pngsuite/basn0g16.png basn0g16.pgm
-# -- full-color
-./png2pnm -noraw ../pngsuite/basn2c08.png basn2c08.ppm
-./png2pnm -noraw ../pngsuite/basn2c16.png basn2c16.ppm
-# -- palletted
-./png2pnm -noraw ../pngsuite/basn3p01.png basn3p01.ppm
-./png2pnm -noraw ../pngsuite/basn3p02.png basn3p02.ppm
-./png2pnm -noraw ../pngsuite/basn3p04.png basn3p04.ppm
-./png2pnm -noraw ../pngsuite/basn3p08.png basn3p08.ppm
-# -- gray with alpha-channel
-./png2pnm -noraw ../pngsuite/basn4a08.png basn4a08.pgm
-./png2pnm -noraw ../pngsuite/basn4a16.png basn4a16.pgm
-# -- color with alpha-channel
-./png2pnm -noraw -alpha basn6a08.pgm ../pngsuite/basn6a08.png basn6a08.ppm
-./png2pnm -noraw -alpha basn6a16.pgm ../pngsuite/basn6a16.png basn6a16.ppm
-# -- grayscale
-./png2pnm -raw ../pngsuite/basn0g01.png rawn0g01.pgm
-./png2pnm -raw ../pngsuite/basn0g02.png rawn0g02.pgm
-./png2pnm -raw ../pngsuite/basn0g04.png rawn0g04.pgm
-./png2pnm -raw ../pngsuite/basn0g08.png rawn0g08.pgm
-./png2pnm -raw ../pngsuite/basn0g16.png rawn0g16.pgm
-# -- full-color
-./png2pnm -raw ../pngsuite/basn2c08.png rawn2c08.ppm
-./png2pnm -raw ../pngsuite/basn2c16.png rawn2c16.ppm
-# -- palletted
-./png2pnm -raw ../pngsuite/basn3p01.png rawn3p01.ppm
-./png2pnm -raw ../pngsuite/basn3p02.png rawn3p02.ppm
-./png2pnm -raw ../pngsuite/basn3p04.png rawn3p04.ppm
-./png2pnm -raw ../pngsuite/basn3p08.png rawn3p08.ppm
-# -- gray with alpha-channel
-./png2pnm -raw ../pngsuite/basn4a08.png rawn4a08.pgm
-./png2pnm -raw ../pngsuite/basn4a16.png rawn4a16.pgm
-# -- color with alpha-channel
-./png2pnm -noraw -alpha rawn6a08.pgm ../pngsuite/basn6a08.png rawn6a08.ppm
-./png2pnm -noraw -alpha rawn6a16.pgm ../pngsuite/basn6a16.png rawn6a16.ppm
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/pngminus.bat b/tkimg1.3/libpng/contrib/pngminus/pngminus.bat
deleted file mode 100644
index 911bb8d..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/pngminus.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-make -f makefile.tc3
-call png2pnm.bat
-call pnm2png.bat
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/pngminus.sh b/tkimg1.3/libpng/contrib/pngminus/pngminus.sh
deleted file mode 100644
index 6b2d8c5..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/pngminus.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-make -f makefile.std
-sh png2pnm.sh
-sh pnm2png.sh
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/pnm2png.bat b/tkimg1.3/libpng/contrib/pngminus/pnm2png.bat
deleted file mode 100644
index f756cb8..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/pnm2png.bat
+++ /dev/null
@@ -1,41 +0,0 @@
-REM -- grayscale
-pnm2png.exe basn0g01.pgm basn0g01.png
-pnm2png.exe basn0g02.pgm basn0g02.png
-pnm2png.exe basn0g04.pgm basn0g04.png
-pnm2png.exe basn0g08.pgm basn0g08.png
-pnm2png.exe basn0g16.pgm basn0g16.png
-REM -- full-color
-pnm2png.exe basn2c08.ppm basn2c08.png
-pnm2png.exe basn2c16.ppm basn2c16.png
-REM -- palletted
-pnm2png.exe basn3p01.ppm basn3p01.png
-pnm2png.exe basn3p02.ppm basn3p02.png
-pnm2png.exe basn3p04.ppm basn3p04.png
-pnm2png.exe basn3p08.ppm basn3p08.png
-REM -- gray with alpha-channel
-pnm2png.exe -alpha basn6a08.pgm basn4a08.pgm basn4a08.png
-pnm2png.exe -alpha basn6a16.pgm basn4a16.pgm basn4a16.png
-REM -- color with alpha-channel
-pnm2png.exe -alpha basn6a08.pgm basn6a08.ppm basn6a08.png
-pnm2png.exe -alpha basn6a16.pgm basn6a16.ppm basn6a16.png
-REM -- grayscale
-pnm2png.exe rawn0g01.pgm rawn0g01.png
-pnm2png.exe rawn0g02.pgm rawn0g02.png
-pnm2png.exe rawn0g04.pgm rawn0g04.png
-pnm2png.exe rawn0g08.pgm rawn0g08.png
-pnm2png.exe rawn0g16.pgm rawn0g16.png
-REM -- full-color
-pnm2png.exe rawn2c08.ppm rawn2c08.png
-pnm2png.exe rawn2c16.ppm rawn2c16.png
-REM -- palletted
-pnm2png.exe rawn3p01.ppm rawn3p01.png
-pnm2png.exe rawn3p02.ppm rawn3p02.png
-pnm2png.exe rawn3p04.ppm rawn3p04.png
-pnm2png.exe rawn3p08.ppm rawn3p08.png
-REM -- gray with alpha-channel
-pnm2png.exe -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png
-pnm2png.exe -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png
-REM -- color with alpha-channel
-pnm2png.exe -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png
-pnm2png.exe -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/pnm2png.c b/tkimg1.3/libpng/contrib/pngminus/pnm2png.c
deleted file mode 100644
index 4cdfad8..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/pnm2png.c
+++ /dev/null
@@ -1,533 +0,0 @@
-/*
- *  pnm2png.c --- conversion from PBM/PGM/PPM-file to PNG-file
- *  copyright (C) 1999 by Willem van Schaik <willem at schaik.com>
- *
- *  version 1.0 - 1999.10.15 - First version.
- *
- *  Permission to use, copy, modify, and distribute this software and
- *  its documentation for any purpose and without fee is hereby granted,
- *  provided that the above copyright notice appear in all copies and
- *  that both that copyright notice and this permission notice appear in
- *  supporting documentation. This software is provided "as is" without
- *  express or implied warranty.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef __TURBOC__
-#include <mem.h>
-#include <fcntl.h>
-#endif
-
-#ifndef BOOL
-#define BOOL unsigned char
-#endif
-#ifndef TRUE
-#define TRUE (BOOL) 1
-#endif
-#ifndef FALSE
-#define FALSE (BOOL) 0
-#endif
-
-#define STDIN  0
-#define STDOUT 1
-#define STDERR 2
-
-/* to make pnm2png verbose so we can find problems (needs to be before png.h) */
-#ifndef PNG_DEBUG
-#define PNG_DEBUG 0
-#endif
-
-#include "png.h"
-
-/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
-#ifndef png_jmpbuf
-#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#endif
-
-/* function prototypes */
-
-int  main (int argc, char *argv[]);
-void usage ();
-BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha);
-void get_token(FILE *pnm_file, char *token);
-png_uint_32 get_data (FILE *pnm_file, int depth);
-png_uint_32 get_value (FILE *pnm_file, int depth);
-
-/*
- *  main
- */
-
-int main(int argc, char *argv[])
-{
-  FILE *fp_rd = stdin;
-  FILE *fp_al = NULL;
-  FILE *fp_wr = stdout;
-  BOOL interlace = FALSE;
-  BOOL alpha = FALSE;
-  int argi;
-
-  for (argi = 1; argi < argc; argi++)
-  {
-    if (argv[argi][0] == '-')
-    {
-      switch (argv[argi][1])
-      {
-        case 'i':
-          interlace = TRUE;
-          break;
-        case 'a':
-          alpha = TRUE;
-          argi++;
-          if ((fp_al = fopen (argv[argi], "rb")) == NULL)
-          {
-            fprintf (stderr, "PNM2PNG\n");
-            fprintf (stderr, "Error:  alpha-channel file %s does not exist\n",
-               argv[argi]);
-            exit (1);
-          }
-          break;
-        case 'h':
-        case '?':
-          usage();
-          exit(0);
-          break;
-        default:
-          fprintf (stderr, "PNM2PNG\n");
-          fprintf (stderr, "Error:  unknown option %s\n", argv[argi]);
-          usage();
-          exit(1);
-          break;
-      } /* end switch */
-    }
-    else if (fp_rd == stdin)
-    {
-      if ((fp_rd = fopen (argv[argi], "rb")) == NULL)
-      {
-        fprintf (stderr, "PNM2PNG\n");
-        fprintf (stderr, "Error:  file %s does not exist\n", argv[argi]);
-        exit (1);
-      }
-    }
-    else if (fp_wr == stdout)
-    {
-      if ((fp_wr = fopen (argv[argi], "wb")) == NULL)
-      {
-        fprintf (stderr, "PNM2PNG\n");
-        fprintf (stderr, "Error:  can not create PNG-file %s\n", argv[argi]);
-        exit (1);
-      }
-    }
-    else
-    {
-      fprintf (stderr, "PNM2PNG\n");
-      fprintf (stderr, "Error:  too many parameters\n");
-      usage();
-      exit (1);
-    }
-  } /* end for */
-
-#ifdef __TURBOC__
-  /* set stdin/stdout to binary, we're reading the PNM always! in binary format */
-  if (fp_rd == stdin)
-  {
-    setmode (STDIN, O_BINARY);
-  }
-  if (fp_wr == stdout)
-  {
-    setmode (STDOUT, O_BINARY);
-  }
-#endif
-
-  /* call the conversion program itself */
-  if (pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha) == FALSE)
-  {
-    fprintf (stderr, "PNM2PNG\n");
-    fprintf (stderr, "Error:  unsuccessful converting to PNG-image\n");
-    exit (1);
-  }
-
-  /* close input file */
-  fclose (fp_rd);
-  /* close output file */
-  fclose (fp_wr);
-  /* close alpha file */
-  if (alpha)
-    fclose (fp_al);
-
-  return 0;
-}
-
-/*
- *  usage
- */
-
-void usage()
-{
-  fprintf (stderr, "PNM2PNG\n");
-  fprintf (stderr, "   by Willem van Schaik, 1999\n");
-#ifdef __TURBOC__
-  fprintf (stderr, "   for Turbo-C and Borland-C compilers\n");
-#else
-  fprintf (stderr, "   for Linux (and Unix) compilers\n");
-#endif
-  fprintf (stderr, "Usage:  pnm2png [options] <file>.<pnm> [<file>.png]\n");
-  fprintf (stderr, "   or:  ... | pnm2png [options]\n");
-  fprintf (stderr, "Options:\n");
-  fprintf (stderr, "   -i[nterlace]   write png-file with interlacing on\n");
-  fprintf (stderr, "   -a[lpha] <file>.pgm read PNG alpha channel as pgm-file\n");
-  fprintf (stderr, "   -h | -?  print this help-information\n");
-}
-
-/*
- *  pnm2png
- */
-
-BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha)
-{
-  png_struct    *png_ptr = NULL;
-  png_info      *info_ptr = NULL;
-  png_byte      *png_pixels = NULL;
-  png_byte      **row_pointers = NULL;
-  png_byte      *pix_ptr = NULL;
-  png_uint_32   row_bytes;
-
-  char          type_token[16];
-  char          width_token[16];
-  char          height_token[16];
-  char          maxval_token[16];
-  int           color_type;
-  png_uint_32   width, alpha_width;
-  png_uint_32   height, alpha_height;
-  png_uint_32   maxval;
-  int           bit_depth = 0;
-  int           channels;
-  int           alpha_depth = 0;
-  int           alpha_present;
-  int           row, col;
-  BOOL          raw, alpha_raw = FALSE;
-  png_uint_32   tmp16;
-  int           i;
-
-  /* read header of PNM file */
-
-  get_token(pnm_file, type_token);
-  if (type_token[0] != 'P')
-  {
-    return FALSE;
-  }
-  else if ((type_token[1] == '1') || (type_token[1] == '4'))
-  {
-    raw = (type_token[1] == '4');
-    color_type = PNG_COLOR_TYPE_GRAY;
-    bit_depth = 1;
-  }
-  else if ((type_token[1] == '2') || (type_token[1] == '5'))
-  {
-    raw = (type_token[1] == '5');
-    color_type = PNG_COLOR_TYPE_GRAY;
-    get_token(pnm_file, width_token);
-    sscanf (width_token, "%lu", &width);
-    get_token(pnm_file, height_token);
-    sscanf (height_token, "%lu", &height);
-    get_token(pnm_file, maxval_token);
-    sscanf (maxval_token, "%lu", &maxval);
-    if (maxval <= 1)
-      bit_depth = 1;
-    else if (maxval <= 3)
-      bit_depth = 2;
-    else if (maxval <= 15)
-      bit_depth = 4;
-    else if (maxval <= 255)
-      bit_depth = 8;
-    else /* if (maxval <= 65535) */
-      bit_depth = 16;
-  }
-  else if ((type_token[1] == '3') || (type_token[1] == '6'))
-  {
-    raw = (type_token[1] == '6');
-    color_type = PNG_COLOR_TYPE_RGB;
-    get_token(pnm_file, width_token);
-    sscanf (width_token, "%lu", &width);
-    get_token(pnm_file, height_token);
-    sscanf (height_token, "%lu", &height);
-    get_token(pnm_file, maxval_token);
-    sscanf (maxval_token, "%lu", &maxval);
-    if (maxval <= 1)
-      bit_depth = 1;
-    else if (maxval <= 3)
-      bit_depth = 2;
-    else if (maxval <= 15)
-      bit_depth = 4;
-    else if (maxval <= 255)
-      bit_depth = 8;
-    else /* if (maxval <= 65535) */
-      bit_depth = 16;
-  }
-  else
-  {
-    return FALSE;
-  }
-
-  /* read header of PGM file with alpha channel */
-
-  if (alpha)
-  {
-    if (color_type == PNG_COLOR_TYPE_GRAY)
-      color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
-    if (color_type == PNG_COLOR_TYPE_RGB)
-      color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-
-    get_token(alpha_file, type_token);
-    if (type_token[0] != 'P')
-    {
-      return FALSE;
-    }
-    else if ((type_token[1] == '2') || (type_token[1] == '5'))
-    {
-      alpha_raw = (type_token[1] == '5');
-      get_token(alpha_file, width_token);
-      sscanf (width_token, "%lu", &alpha_width);
-      if (alpha_width != width)
-        return FALSE;
-      get_token(alpha_file, height_token);
-      sscanf (height_token, "%lu", &alpha_height);
-      if (alpha_height != height)
-        return FALSE;
-      get_token(alpha_file, maxval_token);
-      sscanf (maxval_token, "%lu", &maxval);
-      if (maxval <= 1)
-        alpha_depth = 1;
-      else if (maxval <= 3)
-        alpha_depth = 2;
-      else if (maxval <= 15)
-        alpha_depth = 4;
-      else if (maxval <= 255)
-        alpha_depth = 8;
-      else /* if (maxval <= 65535) */
-        alpha_depth = 16;
-      if (alpha_depth != bit_depth)
-        return FALSE;
-    }
-    else
-    {
-      return FALSE;
-    }
-  } /* end if alpha */
-
-  /* calculate the number of channels and store alpha-presence */
-  if (color_type == PNG_COLOR_TYPE_GRAY)
-    channels = 1;
-  else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-    channels = 2;
-  else if (color_type == PNG_COLOR_TYPE_RGB)
-    channels = 3;
-  else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-    channels = 4;
-  else
-    channels = 0; /* should not happen */
-
-  alpha_present = (channels - 1) % 2;
-
-  /* row_bytes is the width x number of channels x (bit-depth / 8) */
-  row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
-
-  if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL)
-    return FALSE;
-
-  /* read data from PNM file */
-  pix_ptr = png_pixels;
-
-  for (row = 0; row < height; row++)
-  {
-    for (col = 0; col < width; col++)
-    {
-      for (i = 0; i < (channels - alpha_present); i++)
-      {
-        if (raw)
-          *pix_ptr++ = get_data (pnm_file, bit_depth);
-        else
-          if (bit_depth <= 8)
-            *pix_ptr++ = get_value (pnm_file, bit_depth);
-          else
-          {
-            tmp16 = get_value (pnm_file, bit_depth);
-            *pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF);
-            pix_ptr++;
-            *pix_ptr = (png_byte) (tmp16 & 0xFF);
-            pix_ptr++;
-          }
-      }
-
-      if (alpha) /* read alpha-channel from pgm file */
-      {
-        if (alpha_raw)
-          *pix_ptr++ = get_data (alpha_file, alpha_depth);
-        else
-          if (alpha_depth <= 8)
-            *pix_ptr++ = get_value (alpha_file, bit_depth);
-          else
-          {
-            tmp16 = get_value (alpha_file, bit_depth);
-            *pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF);
-            *pix_ptr++ = (png_byte) (tmp16 & 0xFF);
-          }
-      } /* if alpha */
-
-    } /* end for col */
-  } /* end for row */
-
-  /* prepare the standard PNG structures */
-  png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-  if (!png_ptr)
-  {
-    return FALSE;
-  }
-  info_ptr = png_create_info_struct (png_ptr);
-  if (!info_ptr)
-  {
-    png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
-    return FALSE;
-  }
-
-  /* setjmp() must be called in every function that calls a PNG-reading libpng function */
-  if (setjmp (png_jmpbuf(png_ptr)))
-  {
-    png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
-    return FALSE;
-  }
-
-  /* initialize the png structure */
-  png_init_io (png_ptr, png_file);
-
-  /* we're going to write more or less the same PNG as the input file */
-  png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type,
-    (!interlace) ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7,
-    PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-
-  /* write the file header information */
-  png_write_info (png_ptr, info_ptr);
-
-  /* if needed we will allocate memory for an new array of row-pointers */
-  if (row_pointers == (unsigned char**) NULL)
-  {
-    if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL)
-    {
-      png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
-      return FALSE;
-    }
-  }
-
-  /* set the individual row_pointers to point at the correct offsets */
-  for (i = 0; i < (height); i++)
-    row_pointers[i] = png_pixels + i * row_bytes;
-
-  /* write out the entire image data in one call */
-  png_write_image (png_ptr, row_pointers);
-
-  /* write the additional chuncks to the PNG file (not really needed) */
-  png_write_end (png_ptr, info_ptr);
-
-  /* clean up after the write, and free any memory allocated */
-  png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
-
-  if (row_pointers != (unsigned char**) NULL)
-    free (row_pointers);
-  if (png_pixels != (unsigned char*) NULL)
-    free (png_pixels);
-
-  return TRUE;
-} /* end of pnm2png */
-
-/*
- * get_token() - gets the first string after whitespace
- */
-
-void get_token(FILE *pnm_file, char *token)
-{
-  int i = 0;
-
-  /* remove white-space */
-  do
-  {
-    token[i] = (unsigned char) fgetc (pnm_file);
-  }
-  while ((token[i] == '\n') || (token[i] == '\r') || (token[i] == ' '));
-
-  /* read string */
-  do
-  {
-    i++;
-    token[i] = (unsigned char) fgetc (pnm_file);
-  }
-  while ((token[i] != '\n') && (token[i] != '\r') && (token[i] != ' '));
-
-  token[i] = '\0';
-
-  return;
-}
-
-/*
- * get_data() - takes first byte and converts into next pixel value,
- *        taking as much bits as defined by bit-depth and
- *        using the bit-depth to fill up a byte (0Ah -> AAh)
- */
-
-png_uint_32 get_data (FILE *pnm_file, int depth)
-{
-  static int bits_left = 0;
-  static int old_value = 0;
-  static int mask = 0;
-  int i;
-  png_uint_32 ret_value;
-
-  if (mask == 0)
-    for (i = 0; i < depth; i++)
-      mask = (mask >> 1) | 0x80;
-
-  if (bits_left <= 0)
-  {
-    old_value = fgetc (pnm_file);
-    bits_left = 8;
-  }
-
-  ret_value = old_value & mask;
-  for (i = 1; i < (8 / depth); i++)
-    ret_value = ret_value || (ret_value >> depth);
-
-  old_value = (old_value << depth) & 0xFF;
-  bits_left -= depth;
-
-  return ret_value;
-}
-
-/*
- * get_value() - takes first (numeric) string and converts into number,
- *         using the bit-depth to fill up a byte (0Ah -> AAh)
- */
-
-png_uint_32 get_value (FILE *pnm_file, int depth)
-{
-  static png_uint_32 mask = 0;
-  png_byte token[16];
-  png_uint_32 ret_value;
-  int i = 0;
-
-  if (mask == 0)
-    for (i = 0; i < depth; i++)
-      mask = (mask << 1) | 0x01;
-
-  get_token (pnm_file, (char *) token);
-  sscanf ((const char *) token, "%lu", &ret_value);
-
-  ret_value &= mask;
-
-  if (depth < 8)
-    for (i = 0; i < (8 / depth); i++)
-      ret_value = (ret_value << depth) || ret_value;
-
-  return ret_value;
-}
-
-/* end of source */
-
diff --git a/tkimg1.3/libpng/contrib/pngminus/pnm2png.sh b/tkimg1.3/libpng/contrib/pngminus/pnm2png.sh
deleted file mode 100644
index 5afda9f..0000000
--- a/tkimg1.3/libpng/contrib/pngminus/pnm2png.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-# -- grayscale
-./pnm2png basn0g01.pgm basn0g01.png
-./pnm2png basn0g02.pgm basn0g02.png
-./pnm2png basn0g04.pgm basn0g04.png
-./pnm2png basn0g08.pgm basn0g08.png
-./pnm2png basn0g16.pgm basn0g16.png
-# -- full-color
-./pnm2png basn2c08.ppm basn2c08.png
-./pnm2png basn2c16.ppm basn2c16.png
-# -- palletted
-./pnm2png basn3p01.ppm basn3p01.png
-./pnm2png basn3p02.ppm basn3p02.png
-./pnm2png basn3p04.ppm basn3p04.png
-./pnm2png basn3p08.ppm basn3p08.png
-# -- gray with alpha-channel
-./pnm2png -alpha basn6a08.pgm basn4a08.pgm basn4a08.png
-./pnm2png -alpha basn6a16.pgm basn4a16.pgm basn4a16.png
-# -- color with alpha-channel
-./pnm2png -alpha basn6a08.pgm basn6a08.ppm basn6a08.png
-./pnm2png -alpha basn6a16.pgm basn6a16.ppm basn6a16.png
-# -- grayscale
-./pnm2png rawn0g01.pgm rawn0g01.png
-./pnm2png rawn0g02.pgm rawn0g02.png
-./pnm2png rawn0g04.pgm rawn0g04.png
-./pnm2png rawn0g08.pgm rawn0g08.png
-./pnm2png rawn0g16.pgm rawn0g16.png
-# -- full-color
-./pnm2png rawn2c08.ppm rawn2c08.png
-./pnm2png rawn2c16.ppm rawn2c16.png
-# -- palletted
-./pnm2png rawn3p01.ppm rawn3p01.png
-./pnm2png rawn3p02.ppm rawn3p02.png
-./pnm2png rawn3p04.ppm rawn3p04.png
-./pnm2png rawn3p08.ppm rawn3p08.png
-# -- gray with alpha-channel
-./pnm2png -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png
-./pnm2png -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png
-# -- color with alpha-channel
-./pnm2png -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png
-./pnm2png -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png
-
diff --git a/tkimg1.3/libpng/contrib/pngsuite/README b/tkimg1.3/libpng/contrib/pngsuite/README
deleted file mode 100644
index 714d12c..0000000
--- a/tkimg1.3/libpng/contrib/pngsuite/README
+++ /dev/null
@@ -1,85 +0,0 @@
-
-pngsuite
---------
-(c) Willem van Schaik, 1999
-
-Permission to use, copy, and distribute these images for any purpose and
-without fee is hereby granted.
-
-These 15 images are part of the much larger PngSuite test-set of 
-images, available for developers of PNG supporting software. The 
-complete set, available at http:/www.schaik.com/pngsuite/, contains 
-a variety of images to test interlacing, gamma settings, ancillary
-chunks, etc.
-
-The images in this directory represent the basic PNG color-types:
-grayscale (1-16 bit deep), full color (8 or 16 bit), paletted
-(1-8 bit) and grayscale or color images with alpha channel. You
-can use them to test the proper functioning of PNG software.
-
-    filename      depth type
-    ------------ ------ --------------
-    basn0g01.png  1-bit grayscale
-    basn0g02.png  2-bit grayscale
-    basn0g04.png  4-bit grayscale
-    basn0g08.png  8-bit grayscale
-    basn0g16.png 16-bit grayscale
-    basn2c08.png  8-bit truecolor
-    basn2c16.png 16-bit truecolor
-    basn3p01.png  1-bit paletted
-    basn3p02.png  2-bit paletted
-    basn3p04.png  4-bit paletted
-    basn3p08.png  8-bit paletted
-    basn4a08.png  8-bit gray with alpha
-    basn4a16.png 16-bit gray with alpha
-    basn6a08.png  8-bit RGBA
-    basn6a16.png 16-bit RGBA
-
-Here is the correct result of typing "pngtest -m *.png" in
-this directory:
-
-Testing basn0g01.png: PASS (524 zero samples)
- Filter 0 was used 32 times
-Testing basn0g02.png: PASS (448 zero samples)
- Filter 0 was used 32 times
-Testing basn0g04.png: PASS (520 zero samples)
- Filter 0 was used 32 times
-Testing basn0g08.png: PASS (3 zero samples)
- Filter 1 was used 9 times
- Filter 4 was used 23 times
-Testing basn0g16.png: PASS (1 zero samples)
- Filter 1 was used 1 times
- Filter 2 was used 31 times
-Testing basn2c08.png: PASS (6 zero samples)
- Filter 1 was used 5 times
- Filter 4 was used 27 times
-Testing basn2c16.png: PASS (592 zero samples)
- Filter 1 was used 1 times
- Filter 4 was used 31 times
-Testing basn3p01.png: PASS (512 zero samples)
- Filter 0 was used 32 times
-Testing basn3p02.png: PASS (448 zero samples)
- Filter 0 was used 32 times
-Testing basn3p04.png: PASS (544 zero samples)
- Filter 0 was used 32 times
-Testing basn3p08.png: PASS (4 zero samples)
- Filter 0 was used 32 times
-Testing basn4a08.png: PASS (32 zero samples)
- Filter 1 was used 1 times
- Filter 4 was used 31 times
-Testing basn4a16.png: PASS (64 zero samples)
- Filter 0 was used 1 times
- Filter 1 was used 2 times
- Filter 2 was used 1 times
- Filter 4 was used 28 times
-Testing basn6a08.png: PASS (160 zero samples)
- Filter 1 was used 1 times
- Filter 4 was used 31 times
-Testing basn6a16.png: PASS (1072 zero samples)
- Filter 1 was used 4 times
- Filter 4 was used 28 times
-libpng passes test
-
-Willem van Schaik
-<willem at schaik.com>
-October 1999
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn0g01.png b/tkimg1.3/libpng/contrib/pngsuite/basn0g01.png
deleted file mode 100644
index 1d72242..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn0g01.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn0g02.png b/tkimg1.3/libpng/contrib/pngsuite/basn0g02.png
deleted file mode 100644
index 5083324..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn0g02.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn0g04.png b/tkimg1.3/libpng/contrib/pngsuite/basn0g04.png
deleted file mode 100644
index 0bf3687..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn0g04.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn0g08.png b/tkimg1.3/libpng/contrib/pngsuite/basn0g08.png
deleted file mode 100644
index 23c8237..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn0g08.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn0g16.png b/tkimg1.3/libpng/contrib/pngsuite/basn0g16.png
deleted file mode 100644
index e7c82f7..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn0g16.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn2c08.png b/tkimg1.3/libpng/contrib/pngsuite/basn2c08.png
deleted file mode 100644
index db5ad15..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn2c08.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn2c16.png b/tkimg1.3/libpng/contrib/pngsuite/basn2c16.png
deleted file mode 100644
index 50c1cb9..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn2c16.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn3p01.png b/tkimg1.3/libpng/contrib/pngsuite/basn3p01.png
deleted file mode 100644
index b145c2b..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn3p01.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn3p02.png b/tkimg1.3/libpng/contrib/pngsuite/basn3p02.png
deleted file mode 100644
index 8985b3d..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn3p02.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn3p04.png b/tkimg1.3/libpng/contrib/pngsuite/basn3p04.png
deleted file mode 100644
index 0fbf9e8..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn3p04.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn3p08.png b/tkimg1.3/libpng/contrib/pngsuite/basn3p08.png
deleted file mode 100644
index 0ddad07..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn3p08.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn4a08.png b/tkimg1.3/libpng/contrib/pngsuite/basn4a08.png
deleted file mode 100644
index 3e13052..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn4a08.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn4a16.png b/tkimg1.3/libpng/contrib/pngsuite/basn4a16.png
deleted file mode 100644
index 8243644..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn4a16.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn6a08.png b/tkimg1.3/libpng/contrib/pngsuite/basn6a08.png
deleted file mode 100644
index e608738..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn6a08.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/pngsuite/basn6a16.png b/tkimg1.3/libpng/contrib/pngsuite/basn6a16.png
deleted file mode 100644
index 984a995..0000000
Binary files a/tkimg1.3/libpng/contrib/pngsuite/basn6a16.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/visupng/PngFile.c b/tkimg1.3/libpng/contrib/visupng/PngFile.c
deleted file mode 100644
index 959afe9..0000000
--- a/tkimg1.3/libpng/contrib/visupng/PngFile.c
+++ /dev/null
@@ -1,439 +0,0 @@
-//-------------------------------------
-//  PNGFILE.C -- Image File Functions
-//-------------------------------------
-
-// Copyright 2000, Willem van Schaik.  For conditions of distribution and
-// use, see the copyright/license/disclaimer notice in png.h
-
-#include <windows.h>
-#include <commdlg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "png.h"
-#include "pngfile.h"
-#include "cexcept.h"
-
-define_exception_type(const char *);
-extern struct exception_context the_exception_context[1];
-struct exception_context the_exception_context[1];
-png_const_charp msg;
-
-static OPENFILENAME ofn;
-
-static png_structp png_ptr = NULL;
-static png_infop info_ptr = NULL;
-
-
-// cexcept interface
-
-static void
-png_cexcept_error(png_structp png_ptr, png_const_charp msg)
-{
-   if(png_ptr)
-     ;
-#ifndef PNG_NO_CONSOLE_IO
-   fprintf(stderr, "libpng error: %s\n", msg);
-#endif
-   {
-      Throw msg;
-   }
-}
-
-// Windows open-file functions
-
-void PngFileInitialize (HWND hwnd)
-{
-    static TCHAR szFilter[] = TEXT ("PNG Files (*.PNG)\0*.png\0")
-        TEXT ("All Files (*.*)\0*.*\0\0");
-
-    ofn.lStructSize       = sizeof (OPENFILENAME);
-    ofn.hwndOwner         = hwnd;
-    ofn.hInstance         = NULL;
-    ofn.lpstrFilter       = szFilter;
-    ofn.lpstrCustomFilter = NULL;
-    ofn.nMaxCustFilter    = 0;
-    ofn.nFilterIndex      = 0;
-    ofn.lpstrFile         = NULL;          // Set in Open and Close functions
-    ofn.nMaxFile          = MAX_PATH;
-    ofn.lpstrFileTitle    = NULL;          // Set in Open and Close functions
-    ofn.nMaxFileTitle     = MAX_PATH;
-    ofn.lpstrInitialDir   = NULL;
-    ofn.lpstrTitle        = NULL;
-    ofn.Flags             = 0;             // Set in Open and Close functions
-    ofn.nFileOffset       = 0;
-    ofn.nFileExtension    = 0;
-    ofn.lpstrDefExt       = TEXT ("png");
-    ofn.lCustData         = 0;
-    ofn.lpfnHook          = NULL;
-    ofn.lpTemplateName    = NULL;
-}
-
-BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName)
-{
-    ofn.hwndOwner         = hwnd;
-    ofn.lpstrFile         = pstrFileName;
-    ofn.lpstrFileTitle    = pstrTitleName;
-    ofn.Flags             = OFN_HIDEREADONLY;
-
-    return GetOpenFileName (&ofn);
-}
-
-BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName)
-{
-    ofn.hwndOwner         = hwnd;
-    ofn.lpstrFile         = pstrFileName;
-    ofn.lpstrFileTitle    = pstrTitleName;
-    ofn.Flags             = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
-
-    return GetSaveFileName (&ofn);
-}
-
-// PNG image handler functions
-
-BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
-                   int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor)
-{
-    static FILE        *pfFile;
-    png_byte            pbSig[8];
-    int                 iBitDepth;
-    int                 iColorType;
-    double              dGamma;
-    png_color_16       *pBackground;
-    png_uint_32         ulChannels;
-    png_uint_32         ulRowBytes;
-    png_byte           *pbImageData = *ppbImageData;
-    static png_byte   **ppbRowPointers = NULL;
-    int                 i;
-
-    // open the PNG input file
-
-    if (!pstrFileName)
-    {
-        *ppbImageData = pbImageData = NULL;
-        return FALSE;
-    }
-
-    if (!(pfFile = fopen(pstrFileName, "rb")))
-    {
-        *ppbImageData = pbImageData = NULL;
-        return FALSE;
-    }
-
-    // first check the eight byte PNG signature
-
-    fread(pbSig, 1, 8, pfFile);
-    if (!png_check_sig(pbSig, 8))
-    {
-        *ppbImageData = pbImageData = NULL;
-        return FALSE;
-    }
-
-    // create the two png(-info) structures
-
-    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL,
-      (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL);
-    if (!png_ptr)
-    {
-        *ppbImageData = pbImageData = NULL;
-        return FALSE;
-    }
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-        png_destroy_read_struct(&png_ptr, NULL, NULL);
-        *ppbImageData = pbImageData = NULL;
-        return FALSE;
-    }
-
-    Try
-    {
-        
-        // initialize the png structure
-        
-#if !defined(PNG_NO_STDIO)
-        png_init_io(png_ptr, pfFile);
-#else
-        png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data);
-#endif
-        
-        png_set_sig_bytes(png_ptr, 8);
-        
-        // read all PNG info up to image data
-        
-        png_read_info(png_ptr, info_ptr);
-        
-        // get width, height, bit-depth and color-type
-        
-        png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth,
-            &iColorType, NULL, NULL, NULL);
-        
-        // expand images of all color-type and bit-depth to 3x8 bit RGB images
-        // let the library process things like alpha, transparency, background
-        
-        if (iBitDepth == 16)
-            png_set_strip_16(png_ptr);
-        if (iColorType == PNG_COLOR_TYPE_PALETTE)
-            png_set_expand(png_ptr);
-        if (iBitDepth < 8)
-            png_set_expand(png_ptr);
-        if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-            png_set_expand(png_ptr);
-        if (iColorType == PNG_COLOR_TYPE_GRAY ||
-            iColorType == PNG_COLOR_TYPE_GRAY_ALPHA)
-            png_set_gray_to_rgb(png_ptr);
-        
-        // set the background color to draw transparent and alpha images over.
-        if (png_get_bKGD(png_ptr, info_ptr, &pBackground))
-        {
-            png_set_background(png_ptr, pBackground, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
-            pBkgColor->red   = (byte) pBackground->red;
-            pBkgColor->green = (byte) pBackground->green;
-            pBkgColor->blue  = (byte) pBackground->blue;
-        }
-        else
-        {
-            pBkgColor = NULL;
-        }
-        
-        // if required set gamma conversion
-        if (png_get_gAMA(png_ptr, info_ptr, &dGamma))
-            png_set_gamma(png_ptr, (double) 2.2, dGamma);
-        
-        // after the transformations have been registered update info_ptr data
-        
-        png_read_update_info(png_ptr, info_ptr);
-        
-        // get again width, height and the new bit-depth and color-type
-        
-        png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth,
-            &iColorType, NULL, NULL, NULL);
-        
-        
-        // row_bytes is the width x number of channels
-        
-        ulRowBytes = png_get_rowbytes(png_ptr, info_ptr);
-        ulChannels = png_get_channels(png_ptr, info_ptr);
-        
-        *piChannels = ulChannels;
-        
-        // now we can allocate memory to store the image
-        
-        if (pbImageData)
-        {
-            free (pbImageData);
-            pbImageData = NULL;
-        }
-        if ((pbImageData = (png_byte *) malloc(ulRowBytes * (*piHeight)
-                            * sizeof(png_byte))) == NULL)
-        {
-            png_error(png_ptr, "Visual PNG: out of memory");
-        }
-        *ppbImageData = pbImageData;
-        
-        // and allocate memory for an array of row-pointers
-        
-        if ((ppbRowPointers = (png_bytepp) malloc((*piHeight)
-                            * sizeof(png_bytep))) == NULL)
-        {
-            png_error(png_ptr, "Visual PNG: out of memory");
-        }
-        
-        // set the individual row-pointers to point at the correct offsets
-        
-        for (i = 0; i < (*piHeight); i++)
-            ppbRowPointers[i] = pbImageData + i * ulRowBytes;
-        
-        // now we can go ahead and just read the whole image
-        
-        png_read_image(png_ptr, ppbRowPointers);
-        
-        // read the additional chunks in the PNG file (not really needed)
-        
-        png_read_end(png_ptr, NULL);
-        
-        // and we're done
-        
-        free (ppbRowPointers);
-        ppbRowPointers = NULL;
-        
-        // yepp, done
-    }
-
-    Catch (msg)
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-
-        *ppbImageData = pbImageData = NULL;
-        
-        if(ppbRowPointers)
-            free (ppbRowPointers);
-
-        fclose(pfFile);
-
-        return FALSE;
-    }
-
-    fclose (pfFile);
-
-    return TRUE;
-}
-
-
-BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
-                   int iWidth, int iHeight, png_color bkgColor)
-{
-    const int           ciBitDepth = 8;
-    const int           ciChannels = 3;
-
-    static FILE        *pfFile;
-    png_uint_32         ulRowBytes;
-    static png_byte   **ppbRowPointers = NULL;
-    int                 i;
-
-    // open the PNG output file
-
-    if (!pstrFileName)
-        return FALSE;
-
-    if (!(pfFile = fopen(pstrFileName, "wb")))
-        return FALSE;
-
-    // prepare the standard PNG structures
-
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
-      (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL);
-    if (!png_ptr)
-    {
-        fclose(pfFile);
-        return FALSE;
-    }
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-        fclose(pfFile);
-        png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
-        return FALSE;
-    }
-
-    Try
-    {
-        // initialize the png structure
-        
-#if !defined(PNG_NO_STDIO)
-        png_init_io(png_ptr, pfFile);
-#else
-        png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush);
-#endif
-        
-        // we're going to write a very simple 3x8 bit RGB image
-        
-        png_set_IHDR(png_ptr, info_ptr, iWidth, iHeight, ciBitDepth,
-            PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
-            PNG_FILTER_TYPE_BASE);
-        
-        // write the file header information
-        
-        png_write_info(png_ptr, info_ptr);
-        
-        // swap the BGR pixels in the DiData structure to RGB
-        
-        png_set_bgr(png_ptr);
-        
-        // row_bytes is the width x number of channels
-        
-        ulRowBytes = iWidth * ciChannels;
-        
-        // we can allocate memory for an array of row-pointers
-        
-        if ((ppbRowPointers = (png_bytepp) malloc(iHeight * sizeof(png_bytep))) == NULL)
-            Throw "Visualpng: Out of memory";
-        
-        // set the individual row-pointers to point at the correct offsets
-        
-        for (i = 0; i < iHeight; i++)
-            ppbRowPointers[i] = pDiData + i * (((ulRowBytes + 3) >> 2) << 2);
-        
-        // write out the entire image data in one call
-        
-        png_write_image (png_ptr, ppbRowPointers);
-        
-        // write the additional chunks to the PNG file (not really needed)
-        
-        png_write_end(png_ptr, info_ptr);
-        
-        // and we're done
-        
-        free (ppbRowPointers);
-        ppbRowPointers = NULL;
-        
-        // clean up after the write, and free any memory allocated
-        
-        png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
-        
-        // yepp, done
-    }
-
-    Catch (msg)
-    {
-        png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
-
-        if(ppbRowPointers)
-            free (ppbRowPointers);
-
-        fclose(pfFile);
-
-        return FALSE;
-    }
-    
-    fclose (pfFile);
-    
-    return TRUE;
-}
-
-#ifdef PNG_NO_STDIO
-
-static void
-png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_size_t check;
-
-   /* fread() returns 0 on error, so it is OK to store this in a png_size_t
-    * instead of an int, which is what fread() actually returns.
-    */
-   check = (png_size_t)fread(data, (png_size_t)1, length,
-      (FILE *)png_ptr->io_ptr);
-
-   if (check != length)
-   {
-      png_error(png_ptr, "Read Error");
-   }
-}
-
-static void
-png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_uint_32 check;
-
-   check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr));
-   if (check != length)
-   {
-      png_error(png_ptr, "Write Error");
-   }
-}
-
-static void
-png_flush(png_structp png_ptr)
-{
-   FILE *io_ptr;
-   io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr));
-   if (io_ptr != NULL)
-      fflush(io_ptr);
-}
-
-#endif
-
-//-----------------
-//  end of source
-//-----------------
diff --git a/tkimg1.3/libpng/contrib/visupng/PngFile.h b/tkimg1.3/libpng/contrib/visupng/PngFile.h
deleted file mode 100644
index a900fd4..0000000
--- a/tkimg1.3/libpng/contrib/visupng/PngFile.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//------------------------------------------
-//  PNGFILE.H -- Header File for pngfile.c
-//------------------------------------------
-
-// Copyright 2000, Willem van Schaik.  For conditions of distribution and
-// use, see the copyright/license/disclaimer notice in png.h
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-
-void PngFileInitialize (HWND hwnd) ;
-BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ;
-BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ;
-
-BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, 
-                   int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor);
-BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
-                   int iWidth, int iHeight, png_color BkgColor);
-
-#if defined(PNG_NO_STDIO)
-static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length);
-static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length);
-static void png_flush(png_structp png_ptr);
-#endif
-
diff --git a/tkimg1.3/libpng/contrib/visupng/README.txt b/tkimg1.3/libpng/contrib/visupng/README.txt
deleted file mode 100644
index 4a753d8..0000000
--- a/tkimg1.3/libpng/contrib/visupng/README.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-Microsoft Developer Studio Build File, Format Version 6.00 for VisualPng
-------------------------------------------------------------------------
-
-Copyright 2000, Willem van Schaik.  For conditions of distribution and
-use, see the copyright/license/disclaimer notice in png.h
-
-As a PNG .dll demo VisualPng is finished. More features would only hinder
-the program's objective. However, further extensions (like support for other 
-graphics formats) are in development. To get these, or for pre-compiled 
-binaries, go to "http://www.schaik.com/png/visualpng.html".
-
-------------------------------------------------------------------------
-
-Assumes that
-
-   libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng
-   zlib DLLs and LIBs are in   ..\..\projects\msvc\win32\zlib
-   libpng header files are in  ..\..\..\libpng
-   zlib header files are in    ..\..\..\zlib
-   the pngsuite images are in  ..\pngsuite
-
-To build:
-
-1) On the main menu Select "Build|Set Active configuration".
-   Choose the configuration that corresponds to the library you want to test.
-   This library must have been built using the libpng MS project located in
-   the "..\..\mscv" subdirectory.
-
-2) Select "Build|Clean"
-
-3) Select "Build|Rebuild All"
-
-4) After compiling and linking VisualPng will be started to view an image
-   from the PngSuite directory.  Press Ctrl-N (and Ctrl-V) for other images.
-
-
-To install:
-
-When distributing VisualPng (or a further development) the following options
-are available:
-
-1) Build the program with the configuration "Win32 LIB" and you only need to
-   include the executable from the ./lib directory in your distribution.
-
-2) Build the program with the configuration "Win32 DLL" and you need to put
-   in your distribution the executable from the ./dll directory and the dll's
-   libpng1.dll, zlib.dll and msvcrt.dll.  These need to be in the user's PATH.
-
-
-Willem van Schaik
-Calgary, June 6th 2000
-
-P.S. VisualPng was written based on preliminary work of:
-
-    - Simon-Pierre Cadieux
-    - Glenn Randers-Pehrson
-    - Greg Roelofs
-
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.c b/tkimg1.3/libpng/contrib/visupng/VisualPng.c
deleted file mode 100644
index f2cf6ee..0000000
--- a/tkimg1.3/libpng/contrib/visupng/VisualPng.c
+++ /dev/null
@@ -1,961 +0,0 @@
-//------------------------------------
-//  VisualPng.C -- Shows a PNG image
-//------------------------------------
-
-// Copyright 2000, Willem van Schaik.  For conditions of distribution and
-// use, see the copyright/license/disclaimer notice in png.h
-
-// switches
-
-// defines
-
-#define PROGNAME  "VisualPng"
-#define LONGNAME  "Win32 Viewer for PNG-files"
-#define VERSION   "1.0 of 2000 June 07"
-
-// constants
-
-#define MARGIN 8
-
-// standard includes
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-
-// application includes
-
-#include "png.h"
-#include "pngfile.h"
-#include "resource.h"
-
-// macros
-
-// function prototypes
-
-LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
-BOOL    CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM) ;
-
-BOOL CenterAbout (HWND hwndChild, HWND hwndParent);
-
-BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount,
-        int *pFileIndex);
-
-BOOL SearchPngList (TCHAR *pFileList, int FileCount, int *pFileIndex,
-        PTSTR pstrPrevName, PTSTR pstrNextName);
-
-BOOL LoadImageFile(HWND hwnd, PTSTR pstrPathName,
-        png_byte **ppbImage, int *pxImgSize, int *pyImgSize, int *piChannels,
-        png_color *pBkgColor);
-
-BOOL DisplayImage (HWND hwnd, BYTE **ppDib,
-        BYTE **ppDiData, int cxWinSize, int cyWinSize,
-        BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels,
-        BOOL bStretched);
-
-BOOL InitBitmap (
-        BYTE *pDiData, int cxWinSize, int cyWinSize);
-
-BOOL FillBitmap (
-        BYTE *pDiData, int cxWinSize, int cyWinSize,
-        BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels,
-        BOOL bStretched);
-
-// a few global variables
-
-static char *szProgName = PROGNAME;
-static char *szAppName = LONGNAME;
-static char *szIconName = PROGNAME;
-static char szCmdFileName [MAX_PATH];
-
-// MAIN routine
-
-int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
-                    PSTR szCmdLine, int iCmdShow)
-{
-    HACCEL   hAccel;
-    HWND     hwnd;
-    MSG      msg;
-    WNDCLASS wndclass;
-    int ixBorders, iyBorders;
-
-    wndclass.style         = CS_HREDRAW | CS_VREDRAW;
-    wndclass.lpfnWndProc   = WndProc;
-    wndclass.cbClsExtra    = 0;
-    wndclass.cbWndExtra    = 0;
-    wndclass.hInstance     = hInstance;
-    wndclass.hIcon         = LoadIcon (hInstance, szIconName) ;
-    wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW);
-    wndclass.hbrBackground = NULL; // (HBRUSH) GetStockObject (GRAY_BRUSH);
-    wndclass.lpszMenuName  = szProgName;
-    wndclass.lpszClassName = szProgName;
-
-    if (!RegisterClass (&wndclass))
-    {
-        MessageBox (NULL, TEXT ("Error: this program requires Windows NT!"),
-            szProgName, MB_ICONERROR);
-        return 0;
-    }
-
-    // if filename given on commandline, store it
-    if ((szCmdLine != NULL) && (*szCmdLine != '\0'))
-        if (szCmdLine[0] == '"')
-            strncpy (szCmdFileName, szCmdLine + 1, strlen(szCmdLine) - 2);
-        else
-            strcpy (szCmdFileName, szCmdLine);
-    else
-        strcpy (szCmdFileName, "");
-
-    // calculate size of window-borders
-    ixBorders = 2 * (GetSystemMetrics (SM_CXBORDER) +
-                     GetSystemMetrics (SM_CXDLGFRAME));
-    iyBorders = 2 * (GetSystemMetrics (SM_CYBORDER) +
-                     GetSystemMetrics (SM_CYDLGFRAME)) +
-                     GetSystemMetrics (SM_CYCAPTION) +
-                     GetSystemMetrics (SM_CYMENUSIZE) +
-                     1; /* WvS: don't ask me why? */
-
-    hwnd = CreateWindow (szProgName, szAppName,
-        WS_OVERLAPPEDWINDOW,
-        CW_USEDEFAULT, CW_USEDEFAULT,
-        512 + 2 * MARGIN + ixBorders, 384 + 2 * MARGIN + iyBorders,
-//      CW_USEDEFAULT, CW_USEDEFAULT,
-        NULL, NULL, hInstance, NULL);
-
-    ShowWindow (hwnd, iCmdShow);
-    UpdateWindow (hwnd);
-
-    hAccel = LoadAccelerators (hInstance, szProgName);
-
-    while (GetMessage (&msg, NULL, 0, 0))
-    {
-        if (!TranslateAccelerator (hwnd, hAccel, &msg))
-        {
-            TranslateMessage (&msg);
-            DispatchMessage (&msg);
-        }
-    }
-    return msg.wParam;
-}
-
-LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam,
-        LPARAM lParam)
-{
-    static HINSTANCE          hInstance ;
-    static HDC                hdc;
-    static PAINTSTRUCT        ps;
-    static HMENU              hMenu;
-
-    static BITMAPFILEHEADER  *pbmfh;
-    static BITMAPINFOHEADER  *pbmih;
-    static BYTE              *pbImage;
-    static int                cxWinSize, cyWinSize;
-    static int                cxImgSize, cyImgSize;
-    static int                cImgChannels;
-    static png_color          bkgColor = {127, 127, 127};
-
-    static BOOL               bStretched = TRUE;
-
-    static BYTE              *pDib = NULL;
-    static BYTE              *pDiData = NULL;
-
-    static TCHAR              szImgPathName [MAX_PATH];
-    static TCHAR              szTitleName [MAX_PATH];
-
-    static TCHAR             *pPngFileList = NULL;
-    static int                iPngFileCount;
-    static int                iPngFileIndex;
-
-    BOOL                      bOk;
-
-    switch (message)
-    {
-    case WM_CREATE:
-        hInstance = ((LPCREATESTRUCT) lParam)->hInstance ;
-        PngFileInitialize (hwnd);
-
-        strcpy (szImgPathName, "");
-
-        // in case we process file given on command-line
-
-        if (szCmdFileName[0] != '\0')
-        {
-            strcpy (szImgPathName, szCmdFileName);
-
-            // read the other png-files in the directory for later
-            // next/previous commands
-
-            BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount,
-                          &iPngFileIndex);
-
-            // load the image from file
-
-            if (!LoadImageFile (hwnd, szImgPathName,
-                &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor))
-                return 0;
-
-            // invalidate the client area for later update
-
-            InvalidateRect (hwnd, NULL, TRUE);
-
-            // display the PNG into the DIBitmap
-
-            DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-                pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-        }
-
-        return 0;
-
-    case WM_SIZE:
-        cxWinSize = LOWORD (lParam);
-        cyWinSize = HIWORD (lParam);
-
-        // invalidate the client area for later update
-
-        InvalidateRect (hwnd, NULL, TRUE);
-
-        // display the PNG into the DIBitmap
-
-        DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-            pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-
-        return 0;
-
-    case WM_INITMENUPOPUP:
-        hMenu = GetMenu (hwnd);
-
-        if (pbImage)
-            EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_ENABLED);
-        else
-            EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_GRAYED);
-
-        return 0;
-
-    case WM_COMMAND:
-        hMenu = GetMenu (hwnd);
-
-        switch (LOWORD (wParam))
-        {
-        case IDM_FILE_OPEN:
-
-            // show the File Open dialog box
-
-            if (!PngFileOpenDlg (hwnd, szImgPathName, szTitleName))
-                return 0;
-
-            // read the other png-files in the directory for later
-            // next/previous commands
-
-            BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount,
-                          &iPngFileIndex);
-
-            // load the image from file
-
-            if (!LoadImageFile (hwnd, szImgPathName,
-                &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor))
-                return 0;
-
-            // invalidate the client area for later update
-
-            InvalidateRect (hwnd, NULL, TRUE);
-
-            // display the PNG into the DIBitmap
-
-            DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-                pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-
-            return 0;
-
-        case IDM_FILE_SAVE:
-
-            // show the File Save dialog box
-
-            if (!PngFileSaveDlg (hwnd, szImgPathName, szTitleName))
-                return 0;
-
-            // save the PNG to a disk file
-
-            SetCursor (LoadCursor (NULL, IDC_WAIT));
-            ShowCursor (TRUE);
-
-            bOk = PngSaveImage (szImgPathName, pDiData, cxWinSize, cyWinSize,
-                  bkgColor);
-
-            ShowCursor (FALSE);
-            SetCursor (LoadCursor (NULL, IDC_ARROW));
-
-            if (!bOk)
-                MessageBox (hwnd, TEXT ("Error in saving the PNG image"),
-                szProgName, MB_ICONEXCLAMATION | MB_OK);
-            return 0;
-
-        case IDM_FILE_NEXT:
-
-            // read next entry in the directory
-
-            if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex,
-                NULL, szImgPathName))
-            {
-                if (strcmp (szImgPathName, "") == 0)
-                    return 0;
-                
-                // load the image from file
-                
-                if (!LoadImageFile (hwnd, szImgPathName, &pbImage,
-                        &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor))
-                    return 0;
-                
-                // invalidate the client area for later update
-                
-                InvalidateRect (hwnd, NULL, TRUE);
-                
-                // display the PNG into the DIBitmap
-                
-                DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-                    pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-            }
-            
-            return 0;
-
-        case IDM_FILE_PREVIOUS:
-
-            // read previous entry in the directory
-
-            if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex,
-                szImgPathName, NULL))
-            {
-                
-                if (strcmp (szImgPathName, "") == 0)
-                    return 0;
-                
-                // load the image from file
-                
-                if (!LoadImageFile (hwnd, szImgPathName, &pbImage, &cxImgSize,
-                    &cyImgSize, &cImgChannels, &bkgColor))
-                    return 0;
-                
-                // invalidate the client area for later update
-                
-                InvalidateRect (hwnd, NULL, TRUE);
-                
-                // display the PNG into the DIBitmap
-                
-                DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-                    pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-            }
-
-            return 0;
-
-        case IDM_FILE_EXIT:
-
-            // more cleanup needed...
-
-            // free image buffer
-
-            if (pDib != NULL)
-            {
-                free (pDib);
-                pDib = NULL;
-            }
-
-            // free file-list
-
-            if (pPngFileList != NULL)
-            {
-                free (pPngFileList);
-                pPngFileList = NULL;
-            }
-
-            // let's go ...
-
-            exit (0);
-
-            return 0;
-
-        case IDM_OPTIONS_STRETCH:
-            bStretched = !bStretched;
-            if (bStretched)
-                CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_CHECKED);
-            else
-                CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_UNCHECKED);
-
-            // invalidate the client area for later update
-
-            InvalidateRect (hwnd, NULL, TRUE);
-
-            // display the PNG into the DIBitmap
-
-            DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize,
-                pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched);
-
-            return 0;
-
-        case IDM_HELP_ABOUT:
-            DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc) ;
-            return 0;
-
-        } // end switch
-
-        break;
-
-    case WM_PAINT:
-        hdc = BeginPaint (hwnd, &ps);
-
-        if (pDib)
-            SetDIBitsToDevice (hdc, 0, 0, cxWinSize, cyWinSize, 0, 0,
-                0, cyWinSize, pDiData, (BITMAPINFO *) pDib, DIB_RGB_COLORS);
-
-        EndPaint (hwnd, &ps);
-        return 0;
-
-    case WM_DESTROY:
-        if (pbmfh)
-        {
-            free (pbmfh);
-            pbmfh = NULL;
-        }
-
-        PostQuitMessage (0);
-        return 0;
-    }
-
-    return DefWindowProc (hwnd, message, wParam, lParam);
-}
-
-BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,
-                            WPARAM wParam, LPARAM lParam)
-{
-     switch (message)
-     {
-     case WM_INITDIALOG :
-          ShowWindow (hDlg, SW_HIDE);
-          CenterAbout (hDlg, GetWindow (hDlg, GW_OWNER));
-          ShowWindow (hDlg, SW_SHOW);
-          return TRUE ;
-
-     case WM_COMMAND :
-          switch (LOWORD (wParam))
-          {
-          case IDOK :
-          case IDCANCEL :
-               EndDialog (hDlg, 0) ;
-               return TRUE ;
-          }
-          break ;
-     }
-     return FALSE ;
-}
-
-//---------------
-//  CenterAbout
-//---------------
-
-BOOL CenterAbout (HWND hwndChild, HWND hwndParent)
-{
-   RECT    rChild, rParent, rWorkArea;
-   int     wChild, hChild, wParent, hParent;
-   int     xNew, yNew;
-   BOOL  bResult;
-
-   // Get the Height and Width of the child window
-   GetWindowRect (hwndChild, &rChild);
-   wChild = rChild.right - rChild.left;
-   hChild = rChild.bottom - rChild.top;
-
-   // Get the Height and Width of the parent window
-   GetWindowRect (hwndParent, &rParent);
-   wParent = rParent.right - rParent.left;
-   hParent = rParent.bottom - rParent.top;
-
-   // Get the limits of the 'workarea'
-   bResult = SystemParametersInfo(
-      SPI_GETWORKAREA,  // system parameter to query or set
-      sizeof(RECT),
-      &rWorkArea,
-      0);
-   if (!bResult) {
-      rWorkArea.left = rWorkArea.top = 0;
-      rWorkArea.right = GetSystemMetrics(SM_CXSCREEN);
-      rWorkArea.bottom = GetSystemMetrics(SM_CYSCREEN);
-   }
-
-   // Calculate new X position, then adjust for workarea
-   xNew = rParent.left + ((wParent - wChild) /2);
-   if (xNew < rWorkArea.left) {
-      xNew = rWorkArea.left;
-   } else if ((xNew+wChild) > rWorkArea.right) {
-      xNew = rWorkArea.right - wChild;
-   }
-
-   // Calculate new Y position, then adjust for workarea
-   yNew = rParent.top  + ((hParent - hChild) /2);
-   if (yNew < rWorkArea.top) {
-      yNew = rWorkArea.top;
-   } else if ((yNew+hChild) > rWorkArea.bottom) {
-      yNew = rWorkArea.bottom - hChild;
-   }
-
-   // Set it, and return
-   return SetWindowPos (hwndChild, NULL, xNew, yNew, 0, 0, SWP_NOSIZE |
-          SWP_NOZORDER);
-}
-
-//----------------
-//  BuildPngList
-//----------------
-
-BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount,
-     int *pFileIndex)
-{
-    static TCHAR              szImgPathName [MAX_PATH];
-    static TCHAR              szImgFileName [MAX_PATH];
-    static TCHAR              szImgFindName [MAX_PATH];
-
-    WIN32_FIND_DATA           finddata;
-    HANDLE                    hFind;
-
-    static TCHAR              szTmp [MAX_PATH];
-    BOOL                      bOk;
-    int                       i, ii;
-    int                       j, jj;
-
-    // free previous file-list
-
-    if (*ppFileList != NULL)
-    {
-        free (*ppFileList);
-        *ppFileList = NULL;
-    }
-
-    // extract foldername, filename and search-name
-
-    strcpy (szImgPathName, pstrPathName);
-    strcpy (szImgFileName, strrchr (pstrPathName, '\\') + 1);
-
-    strcpy (szImgFindName, szImgPathName);
-    *(strrchr (szImgFindName, '\\') + 1) = '\0';
-    strcat (szImgFindName, "*.png");
-
-    // first cycle: count number of files in directory for memory allocation
-
-    *pFileCount = 0;
-
-    hFind = FindFirstFile(szImgFindName, &finddata);
-    bOk = (hFind != (HANDLE) -1);
-
-    while (bOk)
-    {
-        *pFileCount += 1;
-        bOk = FindNextFile(hFind, &finddata);
-    }
-    FindClose(hFind);
-
-    // allocation memory for file-list
-
-    *ppFileList = (TCHAR *) malloc (*pFileCount * MAX_PATH);
-
-    // second cycle: read directory and store filenames in file-list
-
-    hFind = FindFirstFile(szImgFindName, &finddata);
-    bOk = (hFind != (HANDLE) -1);
-
-    i = 0;
-    ii = 0;
-    while (bOk)
-    {
-        strcpy (*ppFileList + ii, szImgPathName);
-        strcpy (strrchr(*ppFileList + ii, '\\') + 1, finddata.cFileName);
-
-        if (strcmp(pstrPathName, *ppFileList + ii) == 0)
-            *pFileIndex = i;
-
-        ii += MAX_PATH;
-        i++;
-
-        bOk = FindNextFile(hFind, &finddata);
-    }
-    FindClose(hFind);
-
-    // finally we must sort the file-list
-
-    for (i = 0; i < *pFileCount - 1; i++)
-    {
-        ii = i * MAX_PATH;
-        for (j = i+1; j < *pFileCount; j++)
-        {
-            jj = j * MAX_PATH;
-            if (strcmp (*ppFileList + ii, *ppFileList + jj) > 0)
-            {
-                strcpy (szTmp, *ppFileList + jj);
-                strcpy (*ppFileList + jj, *ppFileList + ii);
-                strcpy (*ppFileList + ii, szTmp);
-
-                // check if this was the current image that we moved
-
-                if (*pFileIndex == i)
-                    *pFileIndex = j;
-                else
-                    if (*pFileIndex == j)
-                        *pFileIndex = i;
-            }
-        }
-    }
-
-    return TRUE;
-}
-
-//----------------
-//  SearchPngList
-//----------------
-
-BOOL SearchPngList (
-        TCHAR *pFileList, int FileCount, int *pFileIndex,
-        PTSTR pstrPrevName, PTSTR pstrNextName)
-{
-    if (FileCount > 0)
-    {
-        // get previous entry
-        
-        if (pstrPrevName != NULL)
-        {
-            if (*pFileIndex > 0)
-                *pFileIndex -= 1;
-            else
-                *pFileIndex = FileCount - 1;
-            
-            strcpy (pstrPrevName, pFileList + (*pFileIndex * MAX_PATH));
-        }
-        
-        // get next entry
-        
-        if (pstrNextName != NULL)
-        {
-            if (*pFileIndex < FileCount - 1)
-                *pFileIndex += 1;
-            else
-                *pFileIndex = 0;
-            
-            strcpy (pstrNextName, pFileList + (*pFileIndex * MAX_PATH));
-        }
-        
-        return TRUE;
-    }
-    else
-    {
-        return FALSE;
-    }
-}
-
-//-----------------
-//  LoadImageFile
-//-----------------
-
-BOOL LoadImageFile (HWND hwnd, PTSTR pstrPathName,
-                png_byte **ppbImage, int *pxImgSize, int *pyImgSize,
-                int *piChannels, png_color *pBkgColor)
-{
-    static TCHAR szTmp [MAX_PATH];
-
-    // if there's an existing PNG, free the memory
-
-    if (*ppbImage)
-    {
-        free (*ppbImage);
-        *ppbImage = NULL;
-    }
-
-    // Load the entire PNG into memory
-
-    SetCursor (LoadCursor (NULL, IDC_WAIT));
-    ShowCursor (TRUE);
-
-    PngLoadImage (pstrPathName, ppbImage, pxImgSize, pyImgSize, piChannels,
-                  pBkgColor);
-
-    ShowCursor (FALSE);
-    SetCursor (LoadCursor (NULL, IDC_ARROW));
-
-    if (*ppbImage != NULL)
-    {
-        sprintf (szTmp, "VisualPng - %s", strrchr(pstrPathName, '\\') + 1);
-        SetWindowText (hwnd, szTmp);
-    }
-    else
-    {
-        MessageBox (hwnd, TEXT ("Error in loading the PNG image"),
-            szProgName, MB_ICONEXCLAMATION | MB_OK);
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-//----------------
-//  DisplayImage
-//----------------
-
-BOOL DisplayImage (HWND hwnd, BYTE **ppDib,
-        BYTE **ppDiData, int cxWinSize, int cyWinSize,
-        BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels,
-        BOOL bStretched)
-{
-    BYTE                       *pDib = *ppDib;
-    BYTE                       *pDiData = *ppDiData;
-    // BITMAPFILEHEADER        *pbmfh;
-    BITMAPINFOHEADER           *pbmih;
-    WORD                        wDIRowBytes;
-    png_color                   bkgBlack = {0, 0, 0};
-    png_color                   bkgGray  = {127, 127, 127};
-    png_color                   bkgWhite = {255, 255, 255};
-
-    // allocate memory for the Device Independant bitmap
-
-    wDIRowBytes = (WORD) ((3 * cxWinSize + 3L) >> 2) << 2;
-
-    if (pDib)
-    {
-        free (pDib);
-        pDib = NULL;
-    }
-
-    if (!(pDib = (BYTE *) malloc (sizeof(BITMAPINFOHEADER) +
-        wDIRowBytes * cyWinSize)))
-    {
-        MessageBox (hwnd, TEXT ("Error in displaying the PNG image"),
-            szProgName, MB_ICONEXCLAMATION | MB_OK);
-        *ppDib = pDib = NULL;
-        return FALSE;
-    }
-    *ppDib = pDib;
-    memset (pDib, 0, sizeof(BITMAPINFOHEADER));
-
-    // initialize the dib-structure
-
-    pbmih = (BITMAPINFOHEADER *) pDib;
-    pbmih->biSize = sizeof(BITMAPINFOHEADER);
-    pbmih->biWidth = cxWinSize;
-    pbmih->biHeight = -((long) cyWinSize);
-    pbmih->biPlanes = 1;
-    pbmih->biBitCount = 24;
-    pbmih->biCompression = 0;
-    pDiData = pDib + sizeof(BITMAPINFOHEADER);
-    *ppDiData = pDiData;
-
-    // first fill bitmap with gray and image border
-
-    InitBitmap (pDiData, cxWinSize, cyWinSize);
-
-    // then fill bitmap with image
-
-    if (pbImage)
-    {
-        FillBitmap (
-            pDiData, cxWinSize, cyWinSize,
-            pbImage, cxImgSize, cyImgSize, cImgChannels,
-            bStretched);
-    }
-
-    return TRUE;
-}
-
-//--------------
-//  InitBitmap
-//--------------
-
-BOOL InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize)
-{
-    BYTE *dst;
-    int x, y, col;
-
-    // initialize the background with gray
-
-    dst = pDiData;
-    for (y = 0; y < cyWinSize; y++)
-    {
-        col = 0;
-        for (x = 0; x < cxWinSize; x++)
-        {
-            // fill with GRAY
-            *dst++ = 127;
-            *dst++ = 127;
-            *dst++ = 127;
-            col += 3;
-        }
-        // rows start on 4 byte boundaries
-        while ((col % 4) != 0)
-        {
-            dst++;
-            col++;
-        }
-    }
-
-    return TRUE;
-}
-
-//--------------
-//  FillBitmap
-//--------------
-
-BOOL FillBitmap (
-        BYTE *pDiData, int cxWinSize, int cyWinSize,
-        BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels,
-        BOOL bStretched)
-{
-    BYTE *pStretchedImage;
-    BYTE *pImg;
-    BYTE *src, *dst;
-    BYTE r, g, b, a;
-    const int cDIChannels = 3;
-    WORD wImgRowBytes;
-    WORD wDIRowBytes;
-    int cxNewSize, cyNewSize;
-    int cxImgPos, cyImgPos;
-    int xImg, yImg;
-    int xWin, yWin;
-    int xOld, yOld;
-    int xNew, yNew;
-
-    if (bStretched)
-    {
-        cxNewSize = cxWinSize - 2 * MARGIN;
-        cyNewSize = cyWinSize - 2 * MARGIN;
-
-        // stretch the image to it's window determined size
-
-        // the following two are the same, but the first has side-effects
-        // because of rounding
-//      if ((cyNewSize / cxNewSize) > (cyImgSize / cxImgSize))
-        if ((cyNewSize * cxImgSize) > (cyImgSize * cxNewSize))
-        {
-            cyNewSize = cxNewSize * cyImgSize / cxImgSize;
-            cxImgPos = MARGIN;
-            cyImgPos = (cyWinSize - cyNewSize) / 2;
-        }
-        else
-        {
-            cxNewSize = cyNewSize * cxImgSize / cyImgSize;
-            cyImgPos = MARGIN;
-            cxImgPos = (cxWinSize - cxNewSize) / 2;
-        }
-
-        pStretchedImage = malloc (cImgChannels * cxNewSize * cyNewSize);
-        pImg = pStretchedImage;
-
-        for (yNew = 0; yNew < cyNewSize; yNew++)
-        {
-            yOld = yNew * cyImgSize / cyNewSize;
-            for (xNew = 0; xNew < cxNewSize; xNew++)
-            {
-                xOld = xNew * cxImgSize / cxNewSize;
-
-                r = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 0);
-                g = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 1);
-                b = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 2);
-                *pImg++ = r;
-                *pImg++ = g;
-                *pImg++ = b;
-                if (cImgChannels == 4)
-                {
-                    a = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld)
-                        + 3);
-                    *pImg++ = a;
-                }
-            }
-        }
-
-        // calculate row-bytes
-
-        wImgRowBytes = cImgChannels * cxNewSize;
-        wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2;
-
-        // copy image to screen
-
-        for (yImg = 0, yWin = cyImgPos; yImg < cyNewSize; yImg++, yWin++)
-        {
-            if (yWin >= cyWinSize - cyImgPos)
-                break;
-            src = pStretchedImage + yImg * wImgRowBytes;
-            dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels;
-
-            for (xImg = 0, xWin = cxImgPos; xImg < cxNewSize; xImg++, xWin++)
-            {
-                if (xWin >= cxWinSize - cxImgPos)
-                    break;
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                *dst++ = b; /* note the reverse order */
-                *dst++ = g;
-                *dst++ = r;
-                if (cImgChannels == 4)
-                {
-                    a = *src++;
-                }
-            }
-        }
-
-        // free memory
-
-        if (pStretchedImage != NULL)
-        {
-            free (pStretchedImage);
-            pStretchedImage = NULL;
-        }
-
-    }
-
-    // process the image not-stretched
-
-    else
-    {
-        // calculate the central position
-
-        cxImgPos = (cxWinSize - cxImgSize) / 2;
-        cyImgPos = (cyWinSize - cyImgSize) / 2;
-
-        // check for image larger than window
-
-        if (cxImgPos < MARGIN)
-            cxImgPos = MARGIN;
-        if (cyImgPos < MARGIN)
-            cyImgPos = MARGIN;
-
-        // calculate both row-bytes
-
-        wImgRowBytes = cImgChannels * cxImgSize;
-        wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2;
-
-        // copy image to screen
-
-        for (yImg = 0, yWin = cyImgPos; yImg < cyImgSize; yImg++, yWin++)
-        {
-            if (yWin >= cyWinSize - MARGIN)
-                break;
-            src = pbImage + yImg * wImgRowBytes;
-            dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels;
-
-            for (xImg = 0, xWin = cxImgPos; xImg < cxImgSize; xImg++, xWin++)
-            {
-                if (xWin >= cxWinSize - MARGIN)
-                    break;
-                r = *src++;
-                g = *src++;
-                b = *src++;
-                *dst++ = b; /* note the reverse order */
-                *dst++ = g;
-                *dst++ = r;
-                if (cImgChannels == 4)
-                {
-                    a = *src++;
-                }
-            }
-        }
-    }
-
-    return TRUE;
-}
-
-//-----------------
-//  end of source
-//-----------------
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.dsp b/tkimg1.3/libpng/contrib/visupng/VisualPng.dsp
deleted file mode 100644
index 53ef5a2..0000000
--- a/tkimg1.3/libpng/contrib/visupng/VisualPng.dsp
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="VisualPng" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=VisualPng - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "VisualPng.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "VisualPng.mak" CFG="VisualPng - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "VisualPng - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "VisualPng - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "VisualPng - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 ..\..\projects\visualc6\Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# Begin Special Build Tool
-OutDir=.\Release
-SOURCE="$(InputPath)"
-PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "VisualPng - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\projects\visualc6\Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Debug
-SOURCE="$(InputPath)"
-PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "VisualPng - Win32 Release"
-# Name "VisualPng - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\PngFile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\VisualPng.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\cexcept.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\PngFile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\VisualPng.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\VisualPng.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.dsw b/tkimg1.3/libpng/contrib/visupng/VisualPng.dsw
deleted file mode 100644
index a30e1cc..0000000
--- a/tkimg1.3/libpng/contrib/visupng/VisualPng.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "VisualPng"=.\VisualPng.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.ico b/tkimg1.3/libpng/contrib/visupng/VisualPng.ico
deleted file mode 100644
index 68aa371..0000000
Binary files a/tkimg1.3/libpng/contrib/visupng/VisualPng.ico and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.png b/tkimg1.3/libpng/contrib/visupng/VisualPng.png
deleted file mode 100644
index c6aa80a..0000000
Binary files a/tkimg1.3/libpng/contrib/visupng/VisualPng.png and /dev/null differ
diff --git a/tkimg1.3/libpng/contrib/visupng/VisualPng.rc b/tkimg1.3/libpng/contrib/visupng/VisualPng.rc
deleted file mode 100644
index 151c68c..0000000
--- a/tkimg1.3/libpng/contrib/visupng/VisualPng.rc
+++ /dev/null
@@ -1,152 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-VISUALPNG MENU DISCARDABLE 
-BEGIN
-    POPUP "&File"
-    BEGIN
-        MENUITEM "&Open Image...\tCtrl+O",      IDM_FILE_OPEN
-        MENUITEM "Save &As...",                 IDM_FILE_SAVE
-        MENUITEM SEPARATOR
-        MENUITEM "&Next Image\tCtrl+N",         IDM_FILE_NEXT
-        MENUITEM "Pre&vious Image\tCtrl+V",     IDM_FILE_PREVIOUS
-        MENUITEM SEPARATOR
-        MENUITEM "E&xit\tAlt+X",                IDM_FILE_EXIT
-    END
-    POPUP "&Options"
-    BEGIN
-        MENUITEM "&Stretch",                    IDM_OPTIONS_STRETCH, CHECKED
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "&About",                      IDM_HELP_ABOUT
-    END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-VISUALPNG ACCELERATORS DISCARDABLE 
-BEGIN
-    "N",            IDM_FILE_NEXT,          VIRTKEY, CONTROL, NOINVERT
-    "O",            IDM_FILE_OPEN,          VIRTKEY, CONTROL, NOINVERT
-    "P",            IDM_FILE_PREVIOUS,      VIRTKEY, CONTROL, NOINVERT
-    "V",            IDM_FILE_PREVIOUS,      VIRTKEY, CONTROL, NOINVERT
-    "X",            IDM_FILE_EXIT,          VIRTKEY, ALT, NOINVERT
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-VISUALPNG               ICON    DISCARDABLE     "VisualPng.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-ABOUTBOX DIALOG DISCARDABLE  0, 0, 186, 94
-STYLE DS_MODALFRAME | WS_POPUP
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,68,67,50,14
-    CTEXT           "VisualPng 1.0  -  June 2000",IDC_STATIC,49,14,88,8
-    LTEXT           "a PNG image viewer",IDC_STATIC,60,30,66,8
-    LTEXT           "(c) Willem van Schaik, 2000",IDC_STATIC,48,52,90,8
-    LTEXT           "to demonstrate the use of libpng in Visual C",
-                    IDC_STATIC,25,38,136,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    "ABOUTBOX", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 179
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 87
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/tkimg1.3/libpng/contrib/visupng/cexcept.h b/tkimg1.3/libpng/contrib/visupng/cexcept.h
deleted file mode 100644
index dbea51e..0000000
--- a/tkimg1.3/libpng/contrib/visupng/cexcept.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*===
-cexcept.h 2.0.0 (2001-Jul-12-Thu)
-Adam M. Costello <amc at cs.berkeley.edu>
-
-An interface for exception-handling in ANSI C (C89 and subsequent ISO
-standards), developed jointly with Cosmin Truta <cosmin at cs.toronto.edu>.
-
-    Copyright (c) 2001 Adam M. Costello and Cosmin Truta.  Everyone
-    is hereby granted permission to do whatever they like with this
-    file, provided that if they modify it they take reasonable steps to
-    avoid confusing or misleading people about the authors, version,
-    and terms of use of the derived file.  The copyright holders make
-    no guarantees regarding this file, and are not responsible for any
-    damage resulting from its use.
-
-Only user-defined exceptions are supported, not "real" exceptions like
-division by zero or memory segmentation violations.
-
-If this interface is used by multiple .c files, they shouldn't include
-this header file directly.  Instead, create a wrapper header file that
-includes this header file and then invokes the define_exception_type
-macro (see below), and let your .c files include that header file.
-
-The interface consists of one type, one well-known name, and six macros.
-
-
-define_exception_type(type_name);
-
-    This macro is used like an external declaration.  It specifies
-    the type of object that gets copied from the exception thrower to
-    the exception catcher.  The type_name can be any type that can be
-    assigned to, that is, a non-constant arithmetic type, struct, union,
-    or pointer.  Examples:
-
-        define_exception_type(int);
-
-        enum exception { out_of_memory, bad_arguments, disk_full };
-        define_exception_type(enum exception);
-
-        struct exception { int code; const char *msg; };
-        define_exception_type(struct exception);
-
-    Because throwing an exception causes the object to be copied (not
-    just once, but twice), programmers may wish to consider size when
-    choosing the exception type.
-
-
-struct exception_context;
-
-    This type may be used after the define_exception_type() macro has
-    been invoked.  A struct exception_context must be known to both
-    the thrower and the catcher.  It is expected that there be one
-    context for each thread that uses exceptions.  It would certainly
-    be dangerous for multiple threads to access the same context.
-    One thread can use multiple contexts, but that is likely to be
-    confusing and not typically useful.  The application can allocate
-    this structure in any way it pleases--automatic, static, or dynamic.
-    The application programmer should pretend not to know the structure
-    members, which are subject to change.
-
-
-struct exception_context *the_exception_context;
-
-    The Try/Catch and Throw statements (described below) implicitly
-    refer to a context, using the name the_exception_context.  It is
-    the application's responsibility to make sure that this name yields
-    the address of a mutable (non-constant) struct exception_context
-    wherever those statements are used.  Subject to that constraint, the
-    application may declare a variable of this name anywhere it likes
-    (inside a function, in a parameter list, or externally), and may
-    use whatever storage class specifiers (static, extern, etc) or type
-    qualifiers (const, volatile, etc) it likes.  Examples:
-
-        static struct exception_context
-          * const the_exception_context = &foo;
-
-        { struct exception_context *the_exception_context = bar; ... }
-
-        int blah(struct exception_context *the_exception_context, ...);
-
-        extern struct exception_context the_exception_context[1];
-
-    The last example illustrates a trick that avoids creating a pointer
-    object separate from the structure object.
-
-    The name could even be a macro, for example:
-
-        struct exception_context ec_array[numthreads];
-        #define the_exception_context (ec_array + thread_id)
-
-    Be aware that the_exception_context is used several times by the
-    Try/Catch/Throw macros, so it shouldn't be expensive or have side
-    effects.  The expansion must be a drop-in replacement for an
-    identifier, so it's safest to put parentheses around it.
-
-
-void init_exception_context(struct exception_context *ec);
-
-    For context structures allocated statically (by an external
-    definition or using the "static" keyword), the implicit
-    initialization to all zeros is sufficient, but contexts allocated
-    by other means must be initialized using this macro before they
-    are used by a Try/Catch statement.  It does no harm to initialize
-    a context more than once (by using this macro on a statically
-    allocated context, or using this macro twice on the same context),
-    but a context must not be re-initialized after it has been used by a
-    Try/Catch statement.
-
-
-Try statement
-Catch (expression) statement
-
-    The Try/Catch/Throw macros are capitalized in order to avoid
-    confusion with the C++ keywords, which have subtly different
-    semantics.
-
-    A Try/Catch statement has a syntax similar to an if/else statement,
-    except that the parenthesized expression goes after the second
-    keyword rather than the first.  As with if/else, there are two
-    clauses, each of which may be a simple statement ending with a
-    semicolon or a brace-enclosed compound statement.  But whereas
-    the else clause is optional, the Catch clause is required.  The
-    expression must be a modifiable lvalue (something capable of being
-    assigned to) of the same type (disregarding type qualifiers) that
-    was passed to define_exception_type().
-
-    If a Throw that uses the same exception context as the Try/Catch is
-    executed within the Try clause (typically within a function called
-    by the Try clause), and the exception is not caught by a nested
-    Try/Catch statement, then a copy of the exception will be assigned
-    to the expression, and control will jump to the Catch clause.  If no
-    such Throw is executed, then the assignment is not performed, and
-    the Catch clause is not executed.
-
-    The expression is not evaluated unless and until the exception is
-    caught, which is significant if it has side effects, for example:
-
-        Try foo();
-        Catch (p[++i].e) { ... }
-
-    IMPORTANT: Jumping into or out of a Try clause (for example via
-    return, break, continue, goto, longjmp) is forbidden--the compiler
-    will not complain, but bad things will happen at run-time.  Jumping
-    into or out of a Catch clause is okay, and so is jumping around
-    inside a Try clause.  In many cases where one is tempted to return
-    from a Try clause, it will suffice to use Throw, and then return
-    from the Catch clause.  Another option is to set a flag variable and
-    use goto to jump to the end of the Try clause, then check the flag
-    after the Try/Catch statement.
-
-    IMPORTANT: The values of any non-volatile automatic variables
-    changed within the Try clause are undefined after an exception is
-    caught.  Therefore, variables modified inside the Try block whose
-    values are needed later outside the Try block must either use static
-    storage or be declared with the "volatile" type qualifier.
-
-
-Throw expression;
-
-    A Throw statement is very much like a return statement, except that
-    the expression is required.  Whereas return jumps back to the place
-    where the current function was called, Throw jumps back to the Catch
-    clause of the innermost enclosing Try clause.  The expression must
-    be compatible with the type passed to define_exception_type().  The
-    exception must be caught, otherwise the program may crash.
-
-    Slight limitation:  If the expression is a comma-expression it must
-    be enclosed in parentheses.
-
-
-Try statement
-Catch_anonymous statement
-
-    When the value of the exception is not needed, a Try/Catch statement
-    can use Catch_anonymous instead of Catch (expression).
-
-
-Everything below this point is for the benefit of the compiler.  The
-application programmer should pretend not to know any of it, because it
-is subject to change.
-
-===*/
-
-
-#ifndef CEXCEPT_H
-#define CEXCEPT_H
-
-
-#include <setjmp.h>
-
-#define define_exception_type(etype) \
-struct exception_context { \
-  jmp_buf *penv; \
-  int caught; \
-  volatile struct { etype etmp; } v; \
-}
-
-/* etmp must be volatile because the application might use automatic */
-/* storage for the_exception_context, and etmp is modified between   */
-/* the calls to setjmp() and longjmp().  A wrapper struct is used to */
-/* avoid warnings about a duplicate volatile qualifier in case etype */
-/* already includes it.                                              */
-
-#define init_exception_context(ec) ((void)((ec)->penv = 0))
-
-#define Try \
-  { \
-    jmp_buf *exception__prev, exception__env; \
-    exception__prev = the_exception_context->penv; \
-    the_exception_context->penv = &exception__env; \
-    if (setjmp(exception__env) == 0) { \
-      if (&exception__prev)
-
-#define exception__catch(action) \
-      else { } \
-      the_exception_context->caught = 0; \
-    } \
-    else { \
-      the_exception_context->caught = 1; \
-    } \
-    the_exception_context->penv = exception__prev; \
-  } \
-  if (!the_exception_context->caught || action) { } \
-  else
-
-#define Catch(e) exception__catch(((e) = the_exception_context->v.etmp, 0))
-#define Catch_anonymous exception__catch(0)
-
-/* Try ends with if(), and Catch begins and ends with else.  This     */
-/* ensures that the Try/Catch syntax is really the same as the        */
-/* if/else syntax.                                                    */
-/*                                                                    */
-/* We use &exception__prev instead of 1 to appease compilers that     */
-/* warn about constant expressions inside if().  Most compilers       */
-/* should still recognize that &exception__prev is never zero and     */
-/* avoid generating test code.                                        */
-
-#define Throw \
-  for (;; longjmp(*the_exception_context->penv, 1)) \
-    the_exception_context->v.etmp =
-
-
-#endif /* CEXCEPT_H */
diff --git a/tkimg1.3/libpng/contrib/visupng/resource.h b/tkimg1.3/libpng/contrib/visupng/resource.h
deleted file mode 100644
index 611dd03..0000000
--- a/tkimg1.3/libpng/contrib/visupng/resource.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by VisualPng.rc
-//
-#define IDM_FILE_OPEN                   40001
-#define IDM_FILE_SAVE                   40002
-#define IDM_FILE_NEXT                   40003
-#define IDM_FILE_PREVIOUS               40004
-#define IDM_FILE_EXIT                   40005
-#define IDM_OPTIONS_BACKGROUND          40006
-#define IDM_OPTIONS_STRETCH             40007
-#define IDM_HELP_ABOUT                  40008
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        113
-#define _APS_NEXT_COMMAND_VALUE         40009
-#define _APS_NEXT_CONTROL_VALUE         1001
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
diff --git a/tkimg1.3/libpng/example.c b/tkimg1.3/libpng/example.c
deleted file mode 100644
index fb1f5ed..0000000
--- a/tkimg1.3/libpng/example.c
+++ /dev/null
@@ -1,805 +0,0 @@
-
-#if 0 /* in case someone actually tries to compile this */
-
-/* example.c - an example of using libpng */
-
-/* This is an example of how to use libpng to read and write PNG files.
- * The file libpng.txt is much more verbose then this.  If you have not
- * read it, do so first.  This was designed to be a starting point of an
- * implementation.  This is not officially part of libpng, is hereby placed
- * in the public domain, and therefore does not require a copyright notice.
- *
- * This file does not currently compile, because it is missing certain
- * parts, like allocating memory to hold an image.  You will have to
- * supply these parts to get it to compile.  For an example of a minimal
- * working PNG reader/writer, see pngtest.c, included in this distribution;
- * see also the programs in the contrib directory.
- */
-
-#include "png.h"
-
- /* The png_jmpbuf() macro, used in error handling, became available in
-  * libpng version 1.0.6.  If you want to be able to run your code with older
-  * versions of libpng, you must define the macro yourself (but only if it
-  * is not already defined by libpng!).
-  */
-
-#ifndef png_jmpbuf
-#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#endif
-
-/* Check to see if a file is a PNG file using png_sig_cmp().  png_sig_cmp()
- * returns zero if the image is a PNG and nonzero if it isn't a PNG.
- *
- * The function check_if_png() shown here, but not used, returns nonzero (true)
- * if the file can be opened and is a PNG, 0 (false) otherwise.
- *
- * If this call is successful, and you are going to keep the file open,
- * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once
- * you have created the png_ptr, so that libpng knows your application
- * has read that many bytes from the start of the file.  Make sure you
- * don't call png_set_sig_bytes() with more than 8 bytes read or give it
- * an incorrect number of bytes read, or you will either have read too
- * many bytes (your fault), or you are telling libpng to read the wrong
- * number of magic bytes (also your fault).
- *
- * Many applications already read the first 2 or 4 bytes from the start
- * of the image to determine the file type, so it would be easiest just
- * to pass the bytes to png_sig_cmp() or even skip that if you know
- * you have a PNG file, and call png_set_sig_bytes().
- */
-#define PNG_BYTES_TO_CHECK 4
-int check_if_png(char *file_name, FILE **fp)
-{
-   char buf[PNG_BYTES_TO_CHECK];
-
-   /* Open the prospective PNG file. */
-   if ((*fp = fopen(file_name, "rb")) == NULL)
-      return 0;
-
-   /* Read in some of the signature bytes */
-   if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK)
-      return 0;
-
-   /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature.
-      Return nonzero (true) if they match */
-
-   return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK));
-}
-
-/* Read a PNG file.  You may want to return an error code if the read
- * fails (depending upon the failure).  There are two "prototypes" given
- * here - one where we are given the filename, and we need to open the
- * file, and the other where we are given an open file (possibly with
- * some or all of the magic bytes read - see comments above).
- */
-#ifdef open_file /* prototype 1 */
-void read_png(char *file_name)  /* We need to open the file */
-{
-   png_structp png_ptr;
-   png_infop info_ptr;
-   unsigned int sig_read = 0;
-   png_uint_32 width, height;
-   int bit_depth, color_type, interlace_type;
-   FILE *fp;
-
-   if ((fp = fopen(file_name, "rb")) == NULL)
-      return (ERROR);
-#else no_open_file /* prototype 2 */
-void read_png(FILE *fp, unsigned int sig_read)  /* file is already open */
-{
-   png_structp png_ptr;
-   png_infop info_ptr;
-   png_uint_32 width, height;
-   int bit_depth, color_type, interlace_type;
-#endif no_open_file /* only use one prototype! */
-
-   /* Create and initialize the png_struct with the desired error handler
-    * functions.  If you want to use the default stderr and longjump method,
-    * you can supply NULL for the last three parameters.  We also supply the
-    * the compiler header file version, so that we know if the application
-    * was compiled with a compatible version of the library.  REQUIRED
-    */
-   png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
-      png_voidp user_error_ptr, user_error_fn, user_warning_fn);
-
-   if (png_ptr == NULL)
-   {
-      fclose(fp);
-      return (ERROR);
-   }
-
-   /* Allocate/initialize the memory for image information.  REQUIRED. */
-   info_ptr = png_create_info_struct(png_ptr);
-   if (info_ptr == NULL)
-   {
-      fclose(fp);
-      png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
-      return (ERROR);
-   }
-
-   /* Set error handling if you are using the setjmp/longjmp method (this is
-    * the normal method of doing things with libpng).  REQUIRED unless you
-    * set up your own error handlers in the png_create_read_struct() earlier.
-    */
-
-   if (setjmp(png_jmpbuf(png_ptr)))
-   {
-      /* Free all of the memory associated with the png_ptr and info_ptr */
-      png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
-      fclose(fp);
-      /* If we get here, we had a problem reading the file */
-      return (ERROR);
-   }
-
-   /* One of the following I/O initialization methods is REQUIRED */
-#ifdef streams /* PNG file I/O method 1 */
-   /* Set up the input control if you are using standard C streams */
-   png_init_io(png_ptr, fp);
-
-#else no_streams /* PNG file I/O method 2 */
-   /* If you are using replacement read functions, instead of calling
-    * png_init_io() here you would call:
-    */
-   png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn);
-   /* where user_io_ptr is a structure you want available to the callbacks */
-#endif no_streams /* Use only one I/O method! */
-
-   /* If we have already read some of the signature */
-   png_set_sig_bytes(png_ptr, sig_read);
-
-#ifdef hilevel
-   /*
-    * If you have enough memory to read in the entire image at once,
-    * and you need to specify only transforms that can be controlled
-    * with one of the PNG_TRANSFORM_* bits (this presently excludes
-    * dithering, filling, setting background, and doing gamma
-    * adjustment), then you can read the entire image (including
-    * pixels) into the info structure with this call:
-    */
-   png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
-#else
-   /* OK, you're doing it the hard way, with the lower-level functions */
-
-   /* The call to png_read_info() gives us all of the information from the
-    * PNG file before the first IDAT (image data chunk).  REQUIRED
-    */
-   png_read_info(png_ptr, info_ptr);
-
-   png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-       &interlace_type, int_p_NULL, int_p_NULL);
-
-/* Set up the data transformations you want.  Note that these are all
- * optional.  Only call them if you want/need them.  Many of the
- * transformations only work on specific types of images, and many
- * are mutually exclusive.
- */
-
-   /* tell libpng to strip 16 bit/color files down to 8 bits/color */
-   png_set_strip_16(png_ptr);
-
-   /* Strip alpha bytes from the input data without combining with the
-    * background (not recommended).
-    */
-   png_set_strip_alpha(png_ptr);
-
-   /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single
-    * byte into separate bytes (useful for paletted and grayscale images).
-    */
-   png_set_packing(png_ptr);
-
-   /* Change the order of packed pixels to least significant bit first
-    * (not useful if you are using png_set_packing). */
-   png_set_packswap(png_ptr);
-
-   /* Expand paletted colors into true RGB triplets */
-   if (color_type == PNG_COLOR_TYPE_PALETTE)
-      png_set_palette_rgb(png_ptr);
-
-   /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
-   if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-      png_set_gray_1_2_4_to_8(png_ptr);
-
-   /* Expand paletted or RGB images with transparency to full alpha channels
-    * so the data will be available as RGBA quartets.
-    */
-   if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-      png_set_tRNS_to_alpha(png_ptr);
-
-   /* Set the background color to draw transparent and alpha images over.
-    * It is possible to set the red, green, and blue components directly
-    * for paletted images instead of supplying a palette index.  Note that
-    * even if the PNG file supplies a background, you are not required to
-    * use it - you should use the (solid) application background if it has one.
-    */
-
-   png_color_16 my_background, *image_background;
-
-   if (png_get_bKGD(png_ptr, info_ptr, &image_background))
-      png_set_background(png_ptr, image_background,
-                         PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
-   else
-      png_set_background(png_ptr, &my_background,
-                         PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-
-   /* Some suggestions as to how to get a screen gamma value */
-
-   /* Note that screen gamma is the display_exponent, which includes
-    * the CRT_exponent and any correction for viewing conditions */
-   if (/* We have a user-defined screen gamma value */)
-   {
-      screen_gamma = user-defined screen_gamma;
-   }
-   /* This is one way that applications share the same screen gamma value */
-   else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL)
-   {
-      screen_gamma = atof(gamma_str);
-   }
-   /* If we don't have another value */
-   else
-   {
-      screen_gamma = 2.2;  /* A good guess for a PC monitors in a dimly
-                              lit room */
-      screen_gamma = 1.7 or 1.0;  /* A good guess for Mac systems */
-   }
-
-   /* Tell libpng to handle the gamma conversion for you.  The final call
-    * is a good guess for PC generated images, but it should be configurable
-    * by the user at run time by the user.  It is strongly suggested that
-    * your application support gamma correction.
-    */
-
-   int intent;
-
-   if (png_get_sRGB(png_ptr, info_ptr, &intent))
-      png_set_gamma(png_ptr, screen_gamma, 0.45455);
-   else
-   {
-      double image_gamma;
-      if (png_get_gAMA(png_ptr, info_ptr, &image_gamma))
-         png_set_gamma(png_ptr, screen_gamma, image_gamma);
-      else
-         png_set_gamma(png_ptr, screen_gamma, 0.45455);
-   }
-
-   /* Dither RGB files down to 8 bit palette or reduce palettes
-    * to the number of colors available on your screen.
-    */
-   if (color_type & PNG_COLOR_MASK_COLOR)
-   {
-      int num_palette;
-      png_colorp palette;
-
-      /* This reduces the image to the application supplied palette */
-      if (/* we have our own palette */)
-      {
-         /* An array of colors to which the image should be dithered */
-         png_color std_color_cube[MAX_SCREEN_COLORS];
-
-         png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
-            MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
-      }
-      /* This reduces the image to the palette supplied in the file */
-      else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
-      {
-         png_uint_16p histogram = NULL;
-
-         png_get_hIST(png_ptr, info_ptr, &histogram);
-
-         png_set_dither(png_ptr, palette, num_palette,
-                        max_screen_colors, histogram, 0);
-      }
-   }
-
-   /* invert monochrome files to have 0 as white and 1 as black */
-   png_set_invert_mono(png_ptr);
-
-   /* If you want to shift the pixel values from the range [0,255] or
-    * [0,65535] to the original [0,7] or [0,31], or whatever range the
-    * colors were originally in:
-    */
-   if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
-   {
-      png_color_8p sig_bit;
-
-      png_get_sBIT(png_ptr, info_ptr, &sig_bit);
-      png_set_shift(png_ptr, sig_bit);
-   }
-
-   /* flip the RGB pixels to BGR (or RGBA to BGRA) */
-   if (color_type & PNG_COLOR_MASK_COLOR)
-      png_set_bgr(png_ptr);
-
-   /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
-   png_set_swap_alpha(png_ptr);
-
-   /* swap bytes of 16 bit files to least significant byte first */
-   png_set_swap(png_ptr);
-
-   /* Add filler (or alpha) byte (before/after each RGB triplet) */
-   png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
-
-   /* Turn on interlace handling.  REQUIRED if you are not using
-    * png_read_image().  To see how to handle interlacing passes,
-    * see the png_read_row() method below:
-    */
-   number_passes = png_set_interlace_handling(png_ptr);
-
-   /* Optional call to gamma correct and add the background to the palette
-    * and update info structure.  REQUIRED if you are expecting libpng to
-    * update the palette for you (ie you selected such a transform above).
-    */
-   png_read_update_info(png_ptr, info_ptr);
-
-   /* Allocate the memory to hold the image using the fields of info_ptr. */
-
-   /* The easiest way to read the image: */
-   png_bytep row_pointers[height];
-
-   for (row = 0; row < height; row++)
-   {
-      row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr,
-         info_ptr));
-   }
-
-   /* Now it's time to read the image.  One of these methods is REQUIRED */
-#ifdef entire /* Read the entire image in one go */
-   png_read_image(png_ptr, row_pointers);
-
-#else no_entire /* Read the image one or more scanlines at a time */
-   /* The other way to read images - deal with interlacing: */
-
-   for (pass = 0; pass < number_passes; pass++)
-   {
-#ifdef single /* Read the image a single row at a time */
-      for (y = 0; y < height; y++)
-      {
-         png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
-      }
-
-#else no_single /* Read the image several rows at a time */
-      for (y = 0; y < height; y += number_of_rows)
-      {
-#ifdef sparkle /* Read the image using the "sparkle" effect. */
-         png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
-            number_of_rows);
-#else no_sparkle /* Read the image using the "rectangle" effect */
-         png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
-            number_of_rows);
-#endif no_sparkle /* use only one of these two methods */
-      }
-
-      /* if you want to display the image after every pass, do
-         so here */
-#endif no_single /* use only one of these two methods */
-   }
-#endif no_entire /* use only one of these two methods */
-
-   /* read rest of file, and get additional chunks in info_ptr - REQUIRED */
-   png_read_end(png_ptr, info_ptr);
-#endif hilevel
-
-   /* At this point you have read the entire image */
-
-   /* clean up after the read, and free any memory allocated - REQUIRED */
-   png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
-
-   /* close the file */
-   fclose(fp);
-
-   /* that's it */
-   return (OK);
-}
-
-/* progressively read a file */
-
-int
-initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
-{
-   /* Create and initialize the png_struct with the desired error handler
-    * functions.  If you want to use the default stderr and longjump method,
-    * you can supply NULL for the last three parameters.  We also check that
-    * the library version is compatible in case we are using dynamically
-    * linked libraries.
-    */
-   *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
-       png_voidp user_error_ptr, user_error_fn, user_warning_fn);
-
-   if (*png_ptr == NULL)
-   {
-      *info_ptr = NULL;
-      return (ERROR);
-   }
-
-   *info_ptr = png_create_info_struct(png_ptr);
-
-   if (*info_ptr == NULL)
-   {
-      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
-      return (ERROR);
-   }
-
-   if (setjmp(png_jmpbuf((*png_ptr))))
-   {
-      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
-      return (ERROR);
-   }
-
-   /* This one's new.  You will need to provide all three
-    * function callbacks, even if you aren't using them all.
-    * If you aren't using all functions, you can specify NULL
-    * parameters.  Even when all three functions are NULL,
-    * you need to call png_set_progressive_read_fn().
-    * These functions shouldn't be dependent on global or
-    * static variables if you are decoding several images
-    * simultaneously.  You should store stream specific data
-    * in a separate struct, given as the second parameter,
-    * and retrieve the pointer from inside the callbacks using
-    * the function png_get_progressive_ptr(png_ptr).
-    */
-   png_set_progressive_read_fn(*png_ptr, (void *)stream_data,
-      info_callback, row_callback, end_callback);
-
-   return (OK);
-}
-
-int
-process_data(png_structp *png_ptr, png_infop *info_ptr,
-   png_bytep buffer, png_uint_32 length)
-{
-   if (setjmp(png_jmpbuf((*png_ptr))))
-   {
-      /* Free the png_ptr and info_ptr memory on error */
-      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
-      return (ERROR);
-   }
-
-   /* This one's new also.  Simply give it chunks of data as
-    * they arrive from the data stream (in order, of course).
-    * On Segmented machines, don't give it any more than 64K.
-    * The library seems to run fine with sizes of 4K, although
-    * you can give it much less if necessary (I assume you can
-    * give it chunks of 1 byte, but I haven't tried with less
-    * than 256 bytes yet).  When this function returns, you may
-    * want to display any rows that were generated in the row
-    * callback, if you aren't already displaying them there.
-    */
-   png_process_data(*png_ptr, *info_ptr, buffer, length);
-   return (OK);
-}
-
-info_callback(png_structp png_ptr, png_infop info)
-{
-/* do any setup here, including setting any of the transformations
- * mentioned in the Reading PNG files section.  For now, you _must_
- * call either png_start_read_image() or png_read_update_info()
- * after all the transformations are set (even if you don't set
- * any).  You may start getting rows before png_process_data()
- * returns, so this is your last chance to prepare for that.
- */
-}
-
-row_callback(png_structp png_ptr, png_bytep new_row,
-   png_uint_32 row_num, int pass)
-{
-/*
- * This function is called for every row in the image.  If the
- * image is interlaced, and you turned on the interlace handler,
- * this function will be called for every row in every pass.
- *
- * In this function you will receive a pointer to new row data from
- * libpng called new_row that is to replace a corresponding row (of
- * the same data format) in a buffer allocated by your application.
- * 
- * The new row data pointer new_row may be NULL, indicating there is
- * no new data to be replaced (in cases of interlace loading).
- * 
- * If new_row is not NULL then you need to call
- * png_progressive_combine_row() to replace the corresponding row as
- * shown below:
- */
-   /* Check if row_num is in bounds. */
-   if((row_num >= 0) && (row_num < height))
-   {
-     /* Get pointer to corresponding row in our
-      * PNG read buffer.
-      */
-     png_bytep old_row = ((png_bytep *)our_data)[row_num];
-
-     /* If both rows are allocated then copy the new row
-      * data to the corresponding row data.
-      */
-     if((old_row != NULL) && (new_row != NULL))
-     png_progressive_combine_row(png_ptr, old_row, new_row);
-   }
-/*
- * The rows and passes are called in order, so you don't really
- * need the row_num and pass, but I'm supplying them because it
- * may make your life easier.
- *
- * For the non-NULL rows of interlaced images, you must call
- * png_progressive_combine_row() passing in the new row and the
- * old row, as demonstrated above.  You can call this function for
- * NULL rows (it will just return) and for non-interlaced images
- * (it just does the png_memcpy for you) if it will make the code
- * easier.  Thus, you can just do this for all cases:
- */
-
-   png_progressive_combine_row(png_ptr, old_row, new_row);
-
-/* where old_row is what was displayed for previous rows.  Note
- * that the first pass (pass == 0 really) will completely cover
- * the old row, so the rows do not have to be initialized.  After
- * the first pass (and only for interlaced images), you will have
- * to pass the current row as new_row, and the function will combine
- * the old row and the new row.
- */
-}
-
-end_callback(png_structp png_ptr, png_infop info)
-{
-/* this function is called when the whole image has been read,
- * including any chunks after the image (up to and including
- * the IEND).  You will usually have the same info chunk as you
- * had in the header, although some data may have been added
- * to the comments and time fields.
- *
- * Most people won't do much here, perhaps setting a flag that
- * marks the image as finished.
- */
-}
-
-/* write a png file */
-void write_png(char *file_name /* , ... other image information ... */)
-{
-   FILE *fp;
-   png_structp png_ptr;
-   png_infop info_ptr;
-   png_colorp palette;
-
-   /* open the file */
-   fp = fopen(file_name, "wb");
-   if (fp == NULL)
-      return (ERROR);
-
-   /* Create and initialize the png_struct with the desired error handler
-    * functions.  If you want to use the default stderr and longjump method,
-    * you can supply NULL for the last three parameters.  We also check that
-    * the library version is compatible with the one used at compile time,
-    * in case we are using dynamically linked libraries.  REQUIRED.
-    */
-   png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
-      png_voidp user_error_ptr, user_error_fn, user_warning_fn);
-
-   if (png_ptr == NULL)
-   {
-      fclose(fp);
-      return (ERROR);
-   }
-
-   /* Allocate/initialize the image information data.  REQUIRED */
-   info_ptr = png_create_info_struct(png_ptr);
-   if (info_ptr == NULL)
-   {
-      fclose(fp);
-      png_destroy_write_struct(&png_ptr,  png_infopp_NULL);
-      return (ERROR);
-   }
-
-   /* Set error handling.  REQUIRED if you aren't supplying your own
-    * error handling functions in the png_create_write_struct() call.
-    */
-   if (setjmp(png_jmpbuf(png_ptr)))
-   {
-      /* If we get here, we had a problem reading the file */
-      fclose(fp);
-      png_destroy_write_struct(&png_ptr, &info_ptr);
-      return (ERROR);
-   }
-
-   /* One of the following I/O initialization functions is REQUIRED */
-#ifdef streams /* I/O initialization method 1 */
-   /* set up the output control if you are using standard C streams */
-   png_init_io(png_ptr, fp);
-#else no_streams /* I/O initialization method 2 */
-   /* If you are using replacement read functions, instead of calling
-    * png_init_io() here you would call */
-   png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn,
-      user_IO_flush_function);
-   /* where user_io_ptr is a structure you want available to the callbacks */
-#endif no_streams /* only use one initialization method */
-
-#ifdef hilevel
-   /* This is the easy way.  Use it if you already have all the
-    * image info living info in the structure.  You could "|" many
-    * PNG_TRANSFORM flags into the png_transforms integer here.
-    */
-   png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
-#else
-   /* This is the hard way */
-
-   /* Set the image information here.  Width and height are up to 2^31,
-    * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on
-    * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY,
-    * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB,
-    * or PNG_COLOR_TYPE_RGB_ALPHA.  interlace is either PNG_INTERLACE_NONE or
-    * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST
-    * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED
-    */
-   png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???,
-      PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-
-   /* set the palette if there is one.  REQUIRED for indexed-color images */
-   palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH
-             * png_sizeof (png_color));
-   /* ... set palette colors ... */
-   png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH);
-   /* You must not free palette here, because png_set_PLTE only makes a link to
-      the palette that you malloced.  Wait until you are about to destroy
-      the png structure. */
-
-   /* optional significant bit chunk */
-   /* if we are dealing with a grayscale image then */
-   sig_bit.gray = true_bit_depth;
-   /* otherwise, if we are dealing with a color image then */
-   sig_bit.red = true_red_bit_depth;
-   sig_bit.green = true_green_bit_depth;
-   sig_bit.blue = true_blue_bit_depth;
-   /* if the image has an alpha channel then */
-   sig_bit.alpha = true_alpha_bit_depth;
-   png_set_sBIT(png_ptr, info_ptr, sig_bit);
-
-
-   /* Optional gamma chunk is strongly suggested if you have any guess
-    * as to the correct gamma of the image.
-    */
-   png_set_gAMA(png_ptr, info_ptr, gamma);
-
-   /* Optionally write comments into the image */
-   text_ptr[0].key = "Title";
-   text_ptr[0].text = "Mona Lisa";
-   text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
-   text_ptr[1].key = "Author";
-   text_ptr[1].text = "Leonardo DaVinci";
-   text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
-   text_ptr[2].key = "Description";
-   text_ptr[2].text = "<long text>";
-   text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
-#ifdef PNG_iTXt_SUPPORTED
-   text_ptr[0].lang = NULL;
-   text_ptr[1].lang = NULL;
-   text_ptr[2].lang = NULL;
-#endif
-   png_set_text(png_ptr, info_ptr, text_ptr, 3);
-
-   /* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */
-   /* note that if sRGB is present the gAMA and cHRM chunks must be ignored
-    * on read and must be written in accordance with the sRGB profile */
-
-   /* Write the file header information.  REQUIRED */
-   png_write_info(png_ptr, info_ptr);
-
-   /* If you want, you can write the info in two steps, in case you need to
-    * write your private chunk ahead of PLTE:
-    *
-    *   png_write_info_before_PLTE(write_ptr, write_info_ptr);
-    *   write_my_chunk();
-    *   png_write_info(png_ptr, info_ptr);
-    *
-    * However, given the level of known- and unknown-chunk support in 1.1.0
-    * and up, this should no longer be necessary.
-    */
-
-   /* Once we write out the header, the compression type on the text
-    * chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or
-    * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again
-    * at the end.
-    */
-
-   /* set up the transformations you want.  Note that these are
-    * all optional.  Only call them if you want them.
-    */
-
-   /* invert monochrome pixels */
-   png_set_invert_mono(png_ptr);
-
-   /* Shift the pixels up to a legal bit depth and fill in
-    * as appropriate to correctly scale the image.
-    */
-   png_set_shift(png_ptr, &sig_bit);
-
-   /* pack pixels into bytes */
-   png_set_packing(png_ptr);
-
-   /* swap location of alpha bytes from ARGB to RGBA */
-   png_set_swap_alpha(png_ptr);
-
-   /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into
-    * RGB (4 channels -> 3 channels). The second parameter is not used.
-    */
-   png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
-
-   /* flip BGR pixels to RGB */
-   png_set_bgr(png_ptr);
-
-   /* swap bytes of 16-bit files to most significant byte first */
-   png_set_swap(png_ptr);
-
-   /* swap bits of 1, 2, 4 bit packed pixel formats */
-   png_set_packswap(png_ptr);
-
-   /* turn on interlace handling if you are not using png_write_image() */
-   if (interlacing)
-      number_passes = png_set_interlace_handling(png_ptr);
-   else
-      number_passes = 1;
-
-   /* The easiest way to write the image (you may have a different memory
-    * layout, however, so choose what fits your needs best).  You need to
-    * use the first method if you aren't handling interlacing yourself.
-    */
-   png_uint_32 k, height, width;
-   png_byte image[height][width*bytes_per_pixel];
-   png_bytep row_pointers[height];
-
-   for (k = 0; k < height; k++)
-     row_pointers[k] = image + k*width*bytes_per_pixel;
-
-   /* One of the following output methods is REQUIRED */
-#ifdef entire /* write out the entire image data in one call */
-   png_write_image(png_ptr, row_pointers);
-
-   /* the other way to write the image - deal with interlacing */
-
-#else no_entire /* write out the image data by one or more scanlines */
-   /* The number of passes is either 1 for non-interlaced images,
-    * or 7 for interlaced images.
-    */
-   for (pass = 0; pass < number_passes; pass++)
-   {
-      /* Write a few rows at a time. */
-      png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows);
-
-      /* If you are only writing one row at a time, this works */
-      for (y = 0; y < height; y++)
-      {
-         png_write_rows(png_ptr, &row_pointers[y], 1);
-      }
-   }
-#endif no_entire /* use only one output method */
-
-   /* You can write optional chunks like tEXt, zTXt, and tIME at the end
-    * as well.  Shouldn't be necessary in 1.1.0 and up as all the public
-    * chunks are supported and you can use png_set_unknown_chunks() to
-    * register unknown chunks into the info structure to be written out.
-    */
-
-   /* It is REQUIRED to call this to finish writing the rest of the file */
-   png_write_end(png_ptr, info_ptr);
-#endif hilevel
-
-   /* If you png_malloced a palette, free it here (don't free info_ptr->palette,
-      as recommended in versions 1.0.5m and earlier of this example; if
-      libpng mallocs info_ptr->palette, libpng will free it).  If you
-      allocated it with malloc() instead of png_malloc(), use free() instead
-      of png_free(). */
-   png_free(png_ptr, palette);
-   palette=NULL;
-
-   /* Similarly, if you png_malloced any data that you passed in with
-      png_set_something(), such as a hist or trans array, free it here,
-      when you can be sure that libpng is through with it. */
-   png_free(png_ptr, trans);
-   trans=NULL;
-
-   /* clean up after the write, and free any memory allocated */
-   png_destroy_write_struct(&png_ptr, &info_ptr);
-
-   /* close the file */
-   fclose(fp);
-
-   /* that's it */
-   return (OK);
-}
-
-#endif /* if 0 */
diff --git a/tkimg1.3/libpng/libpng.3 b/tkimg1.3/libpng/libpng.3
deleted file mode 100644
index 964adab..0000000
--- a/tkimg1.3/libpng/libpng.3
+++ /dev/null
@@ -1,3984 +0,0 @@
-.TH LIBPNG 3 "August 10, 2004"
-.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.6rc5
-.SH SYNOPSIS
-\fI\fB
-
-\fB#include <png.h>\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_structp png_create_read_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_free_default(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_channels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_error_ptr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_filter_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_header_ver (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_header_version (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_charpp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*width\fP\fB, png_uint_32 \fP\fI*height\fP\fB, int \fP\fI*bit_depth\fP\fB, int \fP\fI*color_type\fP\fB, int \fP\fI*interlace_type\fP\fB, int \fP\fI*compression_type\fP\fB, int \fI*filter_type\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_image_height (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_libpng_ver (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
-
-\fI\fB
-
-\fBfloat png_get_pixel_aspect_ratio (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_progressive_ptr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_byte png_get_rgb_to_gray_status (png_structp \fIpng_ptr)
-
-\fBpng_uint_32 png_get_rowbytes (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_bytepp png_get_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_bytep png_get_signature (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_user_chunk_ptr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_user_height_max( png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_get_user_transform_ptr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_user_width_max (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_valid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_int_32 png_get_x_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_int_32 png_get_x_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_x_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_int_32 png_get_y_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_int_32 png_get_y_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_bytepp \fP\fIdisplay_row\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_dither (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_dither\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_filter_heuristics (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_doublep \fP\fIfilter_weights\fP\fB, png_doublep \fIfilter_costs\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIfile_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_palette_to_rgb(png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIres_x\fP\fB, png_uint_32 \fP\fIres_y\fP\fB, int \fIunit_type\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_progressive_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIprogressive_ptr\fP\fB, png_progressive_info_ptr \fP\fIinfo_fn\fP\fB, png_progressive_row_ptr \fP\fIrow_fn\fP\fB, png_progressive_end_ptr \fIend_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_rgb_to_gray (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIerror_action\fP\fB, double \fP\fIred\fP\fB, double \fIgreen\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_fixed_point \fP\fIred\fP\fB, png_fixed_point \fIgreen\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytepp \fIrow_pointers\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fIsig_bit\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fP\fIsplt_ptr\fP\fB, int \fInum_spalettes\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_uint_32 png_set_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkp \fP\fIunknowns\fP\fB, int \fP\fInum\fP\fB, int \fIlocation\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_unknown_chunk_location(png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_user_limits (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIuser_width_max\fP\fB, png_uint_32 \fIuser_height_max\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_user_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_transform_ptr\fP\fB, int \fP\fIuser_transform_depth\fP\fB, int \fIuser_transform_channels\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_write_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fP\fIwrite_data_fn\fP\fB, png_flush_ptr \fIoutput_flush_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_compression_buffer_size(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP
-
-\fI\fB
-
-\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
-
-\fI\fB
-
-.SH DESCRIPTION
-The
-.I libpng
-library supports encoding, decoding, and various manipulations of
-the Portable Network Graphics (PNG) format image files.  It uses the
-.IR zlib(3)
-compression library.
-Following is a copy of the libpng.txt file that accompanies libpng.
-.SH LIBPNG.TXT
-libpng.txt - A description on how to use and modify libpng
-
- libpng version 1.2.6rc5 - August 10, 2004
- Updated and distributed by Glenn Randers-Pehrson
- <glennrp at users.sourceforge.net>
- Copyright (c) 1998-2004 Glenn Randers-Pehrson
- For conditions of distribution and use, see copyright
- notice in png.h.
-
- based on:
-
- libpng 1.0 beta 6  version 0.96 May 28, 1997
- Updated and distributed by Andreas Dilger
- Copyright (c) 1996, 1997 Andreas Dilger
-
- libpng 1.0 beta 2 - version 0.88  January 26, 1996
- For conditions of distribution and use, see copyright
- notice in png.h. Copyright (c) 1995, 1996 Guy Eric
- Schalnat, Group 42, Inc.
-
- Updated/rewritten per request in the libpng FAQ
- Copyright (c) 1995, 1996 Frank J. T. Wojcik
- December 18, 1995 & January 20, 1996
-
-.SH I. Introduction
-
-This file describes how to use and modify the PNG reference library
-(known as libpng) for your own use.  There are five sections to this
-file: introduction, structures, reading, writing, and modification and
-configuration notes for various special platforms.  In addition to this
-file, example.c is a good starting point for using the library, as
-it is heavily commented and should include everything most people
-will need.  We assume that libpng is already installed; see the
-INSTALL file for instructions on how to install libpng.
-
-Libpng was written as a companion to the PNG specification, as a way
-of reducing the amount of time and effort it takes to support the PNG
-file format in application programs.
-
-The PNG-1.2 specification is available at <http://www.libpng.org/pub/png>
-and at <ftp://ftp.uu.net/graphics/png/documents/>.
-
-The PNG-1.0 specification is available
-as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC.png.html>. Some
-additional chunks are described in the special-purpose public chunks
-documents at <ftp://ftp.uu.net/graphics/png/documents/>.
-
-Other information
-about PNG, and the latest version of libpng, can be found at the PNG home
-page, <http://www.libpng.org/pub/png/>
-and at <ftp://ftp.uu.net/graphics/png/>.
-
-Most users will not have to modify the library significantly; advanced
-users may want to modify it more.  All attempts were made to make it as
-complete as possible, while keeping the code easy to understand.
-Currently, this library only supports C.  Support for other languages
-is being considered.
-
-Libpng has been designed to handle multiple sessions at one time,
-to be easily modifiable, to be portable to the vast majority of
-machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy
-to use.  The ultimate goal of libpng is to promote the acceptance of
-the PNG file format in whatever way possible.  While there is still
-work to be done (see the TODO file), libpng should cover the
-majority of the needs of its users.
-
-Libpng uses zlib for its compression and decompression of PNG files.
-Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
-The zlib compression utility is a general purpose utility that is
-useful for more than PNG files, and can be used without libpng.
-See the documentation delivered with zlib for more details.
-You can usually find the source files for the zlib utility wherever you
-find the libpng source files.
-
-Libpng is thread safe, provided the threads are using different
-instances of the structures.  Each thread should have its own
-png_struct and png_info instances, and thus its own image.
-Libpng does not protect itself against two threads using the
-same instance of a structure.  Note: thread safety may be defeated
-by use of some of the MMX assembler code in pnggccrd.c, which is only
-compiled when the user defines PNG_THREAD_UNSAFE_OK.
-
-
-.SH II. Structures
-
-There are two main structures that are important to libpng, png_struct
-and png_info.  The first, png_struct, is an internal structure that
-will not, for the most part, be used by a user except as the first
-variable passed to every libpng function call.
-
-The png_info structure is designed to provide information about the
-PNG file.  At one time, the fields of png_info were intended to be
-directly accessible to the user.  However, this tended to cause problems
-with applications using dynamically loaded libraries, and as a result
-a set of interface functions for png_info (the png_get_*() and png_set_*()
-functions) was developed.  The fields of png_info are still available for
-older applications, but it is suggested that applications use the new
-interfaces if at all possible.
-
-Applications that do make direct access to the members of png_struct (except
-for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
-and applications that make direct access to the members of png_info must
-be recompiled if they were compiled or loaded with libpng version 1.0.6,
-in which the members were in a different order.  In version 1.0.7, the
-members of the png_info structure reverted to the old order, as they were
-in versions 0.97c through 1.0.5.  Starting with version 2.0.0, both
-structures are going to be hidden, and the contents of the structures will
-only be accessible through the png_get/png_set functions.
-
-The png.h header file is an invaluable reference for programming with libpng.
-And while I'm on the topic, make sure you include the libpng header file:
-
-#include <png.h>
-
-.SH III. Reading
-
-We'll now walk you through the possible functions to call when reading
-in a PNG file sequentially, briefly explaining the syntax and purpose
-of each one.  See example.c and png.h for more detail.  While
-progressive reading is covered in the next section, you will still
-need some of the functions discussed in this section to read a PNG
-file.
-
-.SS Setup
-
-You will want to do the I/O initialization(*) before you get into libpng,
-so if it doesn't work, you don't have much to undo.  Of course, you
-will also want to insure that you are, in fact, dealing with a PNG
-file.  Libpng provides a simple check to see if a file is a PNG file.
-To use it, pass in the first 1 to 8 bytes of the file to the function
-png_sig_cmp(), and it will return 0 if the bytes match the corresponding
-bytes of the PNG signature, or nonzero otherwise.  Of course, the more bytes
-you pass in, the greater the accuracy of the prediction.
-
-If you are intending to keep the file pointer open for use in libpng,
-you must ensure you don't read more than 8 bytes from the beginning
-of the file, and you also have to make a call to png_set_sig_bytes_read()
-with the number of bytes you read from the beginning.  Libpng will
-then only check the bytes (if any) that your program didn't read.
-
-(*): If you are not using the standard I/O functions, you will need
-to replace them with custom functions.  See the discussion under
-Customizing libpng.
-
-
-    FILE *fp = fopen(file_name, "rb");
-    if (!fp)
-    {
-        return (ERROR);
-    }
-    fread(header, 1, number, fp);
-    is_png = !png_sig_cmp(header, 0, number);
-    if (!is_png)
-    {
-        return (NOT_PNG);
-    }
-
-
-Next, png_struct and png_info need to be allocated and initialized.  In
-order to ensure that the size of these structures is correct even with a
-dynamically linked libpng, there are functions to initialize and
-allocate the structures.  We also pass the library version, optional
-pointers to error handling functions, and a pointer to a data struct for
-use by the error functions, if necessary (the pointer and functions can
-be NULL if the default error handlers are to be used).  See the section
-on Changes to Libpng below regarding the old initialization functions.
-The structure allocation functions quietly return NULL if they fail to
-create the structure, so your application should check for that.
-
-    png_structp png_ptr = png_create_read_struct
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn);
-    if (!png_ptr)
-        return (ERROR);
-
-    png_infop info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-        png_destroy_read_struct(&png_ptr,
-           (png_infopp)NULL, (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    png_infop end_info = png_create_info_struct(png_ptr);
-    if (!end_info)
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-          (png_infopp)NULL);
-        return (ERROR);
-    }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_read_struct_2() instead of png_create_read_struct():
-
-    png_structp png_ptr = png_create_read_struct_2
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn, (png_voidp)
-        user_mem_ptr, user_malloc_fn, user_free_fn);
-
-The error handling routines passed to png_create_read_struct()
-and the memory alloc/free routines passed to png_create_struct_2()
-are only necessary if you are not using the libpng supplied error
-handling and memory alloc/free functions.
-
-When libpng encounters an error, it expects to longjmp back
-to your routine.  Therefore, you will need to call setjmp and pass
-your png_jmpbuf(png_ptr).  If you read the file from different
-routines, you will need to update the jmpbuf field every time you enter
-a new routine that will call a png_*() function.
-
-See your documentation of setjmp/longjmp for your compiler for more
-information on setjmp/longjmp.  See the discussion on libpng error
-handling in the Customizing Libpng section below for more information
-on the libpng error handling.  If an error occurs, and libpng longjmp's
-back to your setjmp, you will want to call png_destroy_read_struct() to
-free any memory.
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           &end_info);
-        fclose(fp);
-        return (ERROR);
-    }
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the input code.  The default for libpng is to
-use the C function fread().  If you use this, you will need to pass a
-valid FILE * in the function png_init_io().  Be sure that the file is
-opened in binary mode.  If you wish to handle reading data in another
-way, you need not call the png_init_io() function, but you must then
-implement the libpng I/O methods discussed in the Customizing Libpng
-section below.
-
-    png_init_io(png_ptr, fp);
-
-If you had previously opened the file and read any of the signature from
-the beginning in order to see if this was a PNG file, you need to let
-libpng know that there are some bytes missing from the start of the file.
-
-    png_set_sig_bytes(png_ptr, number);
-
-.SS Setting up callback code
-
-You can set up a callback function to handle any unknown chunks in the
-input stream. You must supply the function
-
-    read_chunk_callback(png_ptr ptr,
-         png_unknown_chunkp chunk);
-    {
-       /* The unknown chunk structure contains your
-          chunk data: */
-           png_byte name[5];
-           png_byte *data;
-           png_size_t size;
-       /* Note that libpng has already taken care of
-          the CRC handling */
-
-       /* put your code here.  Return one of the
-          following: */
-
-       return (-n); /* chunk had an error */
-       return (0); /* did not recognize */
-       return (n); /* success */
-    }
-
-(You can give your function another name that you like instead of
-"read_chunk_callback")
-
-To inform libpng about your function, use
-
-    png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr,
-        read_chunk_callback);
-
-This names not only the callback function, but also a user pointer that
-you can retrieve with
-
-    png_get_user_chunk_ptr(png_ptr);
-
-At this point, you can set up a callback function that will be
-called after each row has been read, which you can use to control
-a progress meter or the like.  It's demonstrated in pngtest.c.
-You must supply a function
-
-    void read_row_callback(png_ptr ptr, png_uint_32 row,
-       int pass);
-    {
-      /* put your code here */
-    }
-
-(You can give it another name that you like instead of "read_row_callback")
-
-To inform libpng about your function, use
-
-    png_set_read_status_fn(png_ptr, read_row_callback);
-
-%-%.SS Width and height limits
-%-%
-%-%The PNG specification allows the width and height of an image to be as
-%-%large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
-%-%Since very few applications really need to process such large images,
-%-%we have imposed an arbitrary 1-million limit on rows and columns.
-%-%Larger images will be rejected immediately with a png_error() call. If
-%-%you wish to override this limit, you can use
-%-%
-%-%   png_set_user_limits(png_ptr, width_max, height_max);
-%-%
-%-%to set your own limits, or use width_max = height_max = 0x7fffffffL
-%-%to allow all valid dimensions (libpng may reject some very large images
-%-%anyway because of potential buffer overflow conditions).
-%-%
-%-%You should put this statement after you create the PNG structure and
-%-%before calling png_read_info(), png_read_png(), or png_process_data().
-%-%If you need to retrieve the limits that are being applied, use
-%-%
-%-%   width_max = png_get_user_width_max(png_ptr);
-%-%   height_max = png_get_user_height_max(png_ptr);
-%-%
-.SS Unknown-chunk handling
-
-Now you get to set the way the library processes unknown chunks in the
-input PNG stream. Both known and unknown chunks will be read.  Normal
-behavior is that known chunks will be parsed into information in
-various info_ptr members; unknown chunks will be discarded. To change
-this, you can call:
-
-    png_set_keep_unknown_chunks(png_ptr, keep,
-        chunk_list, num_chunks);
-    keep       - 0: do not handle as unknown
-                 1: do not keep
-                 2: keep only if safe-to-copy
-                 3: keep even if unsafe-to-copy
-               You can use these definitions:
-                 PNG_HANDLE_CHUNK_AS_DEFAULT   0
-                 PNG_HANDLE_CHUNK_NEVER        1
-                 PNG_HANDLE_CHUNK_IF_SAFE      2
-                 PNG_HANDLE_CHUNK_ALWAYS       3
-    chunk_list - list of chunks affected (a byte string,
-                 five bytes per chunk, NULL or '\0' if
-                 num_chunks is 0)
-    num_chunks - number of chunks affected; if 0, all
-                 unknown chunks are affected.  If nonzero,
-                 only the chunks in the list are affected
-
-Unknown chunks declared in this way will be saved as raw data onto a
-list of png_unknown_chunk structures.  If a chunk that is normally
-known to libpng is named in the list, it will be handled as unknown,
-according to the "keep" directive.  If a chunk is named in successive
-instances of png_set_keep_unknown_chunks(), the final instance will
-take precedence.  The IHDR and IEND chunks should not be named in
-chunk_list; if they are, libpng will process them normally anyway.
-
-.SS The high-level read interface
-
-At this point there are two ways to proceed; through the high-level
-read interface, or through a sequence of low-level read operations.
-You can use the high-level interface if (a) you are willing to read
-the entire image into memory, and (b) the input transformations
-you want to do are limited to the following set:
-
-    PNG_TRANSFORM_IDENTITY      No transformation
-    PNG_TRANSFORM_STRIP_16      Strip 16-bit samples to
-                                8 bits
-    PNG_TRANSFORM_STRIP_ALPHA   Discard the alpha channel
-    PNG_TRANSFORM_PACKING       Expand 1, 2 and 4-bit
-                                samples to bytes
-    PNG_TRANSFORM_PACKSWAP      Change order of packed
-                                pixels to LSB first
-    PNG_TRANSFORM_EXPAND        Perform set_expand()
-    PNG_TRANSFORM_INVERT_MONO   Invert monochrome images
-    PNG_TRANSFORM_SHIFT         Normalize pixels to the
-                                sBIT depth
-    PNG_TRANSFORM_BGR           Flip RGB to BGR, RGBA
-                                to BGRA
-    PNG_TRANSFORM_SWAP_ALPHA    Flip RGBA to ARGB or GA
-                                to AG
-    PNG_TRANSFORM_INVERT_ALPHA  Change alpha from opacity
-                                to transparency
-    PNG_TRANSFORM_SWAP_ENDIAN   Byte-swap 16-bit samples
-
-(This excludes setting a background color, doing gamma transformation,
-dithering, and setting filler.)  If this is the case, simply do this:
-
-    png_read_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the logical OR of
-some set of transformation flags.  This call is equivalent to png_read_info(),
-followed the set of transformations indicated by the transform mask,
-then png_read_image(), and finally png_read_end().
-
-(The final parameter of this call is not yet used.  Someday it might point
-to transformation parameters required by some future input transform.)
-
-After you have called png_read_png(), you can retrieve the image data
-with
-
-   row_pointers = png_get_rows(png_ptr, info_ptr);
-
-where row_pointers is an array of pointers to the pixel data for each row:
-
-   png_bytep row_pointers[height];
-
-If you know your image size and pixel size ahead of time, you can allocate
-row_pointers prior to calling png_read_png() with
-
-   if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
-      png_error (png_ptr,
-         "Image is too tall to process in memory");
-   if (width > PNG_UINT_32_MAX/pixel_size)
-      png_error (png_ptr,
-         "Image is too wide to process in memory");
-   row_pointers = png_malloc(png_ptr,
-      height*png_sizeof(png_bytep));
-   for (int i=0; i<height, i++)
-      row_pointers[i]=png_malloc(png_ptr,
-         width*pixel_size);
-   png_set_rows(png_ptr, info_ptr, &row_pointers);
-
-Alternatively you could allocate your image in one big block and define
-row_pointers[i] to point into the proper places in your block.
-
-If you use png_set_rows(), the application is responsible for freeing
-row_pointers (and row_pointers[i], if they were separately allocated).
-
-If you don't allocate row_pointers ahead of time, png_read_png() will
-do it, and it'll be free'ed when you call png_destroy_*().
-
-.SS The low-level read interface
-
-If you are going the low-level route, you are now ready to read all
-the file information up to the actual image data.  You do this with a
-call to png_read_info().
-
-    png_read_info(png_ptr, info_ptr);
-
-This will process all chunks up to but not including the image data.
-
-.SS Querying the info structure
-
-Functions are used to get the information from the info_ptr once it
-has been read.  Note that these fields may not be completely filled
-in until png_read_end() has read the chunk data following the image.
-
-    png_get_IHDR(png_ptr, info_ptr, &width, &height,
-       &bit_depth, &color_type, &interlace_type,
-       &compression_type, &filter_method);
-
-    width          - holds the width of the image
-                     in pixels (up to 2^31).
-    height         - holds the height of the image
-                     in pixels (up to 2^31).
-    bit_depth      - holds the bit depth of one of the
-                     image channels.  (valid values are
-                     1, 2, 4, 8, 16 and depend also on
-                     the color_type.  See also
-                     significant bits (sBIT) below).
-    color_type     - describes which color/alpha channels
-                         are present.
-                     PNG_COLOR_TYPE_GRAY
-                        (bit depths 1, 2, 4, 8, 16)
-                     PNG_COLOR_TYPE_GRAY_ALPHA
-                        (bit depths 8, 16)
-                     PNG_COLOR_TYPE_PALETTE
-                        (bit depths 1, 2, 4, 8)
-                     PNG_COLOR_TYPE_RGB
-                        (bit_depths 8, 16)
-                     PNG_COLOR_TYPE_RGB_ALPHA
-                        (bit_depths 8, 16)
-
-                     PNG_COLOR_MASK_PALETTE
-                     PNG_COLOR_MASK_COLOR
-                     PNG_COLOR_MASK_ALPHA
-
-    filter_method  - (must be PNG_FILTER_TYPE_BASE
-                     for PNG 1.0, and can also be
-                     PNG_INTRAPIXEL_DIFFERENCING if
-                     the PNG datastream is embedded in
-                     a MNG-1.0 datastream)
-    compression_type - (must be PNG_COMPRESSION_TYPE_BASE
-                     for PNG 1.0)
-    interlace_type - (PNG_INTERLACE_NONE or
-                     PNG_INTERLACE_ADAM7)
-    Any or all of interlace_type, compression_type, of
-    filter_method can be NULL if you are
-    not interested in their values.
-
-    channels = png_get_channels(png_ptr, info_ptr);
-    channels       - number of channels of info for the
-                     color type (valid values are 1 (GRAY,
-                     PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
-                     4 (RGB_ALPHA or RGB + filler byte))
-    rowbytes = png_get_rowbytes(png_ptr, info_ptr);
-    rowbytes       - number of bytes needed to hold a row
-
-    signature = png_get_signature(png_ptr, info_ptr);
-    signature      - holds the signature read from the
-                     file (if any).  The data is kept in
-                     the same offset it would be if the
-                     whole signature were read (i.e. if an
-                     application had already read in 4
-                     bytes of signature before starting
-                     libpng, the remaining 4 bytes would
-                     be in signature[4] through signature[7]
-                     (see png_set_sig_bytes())).
-
-
-    width            = png_get_image_width(png_ptr,
-                         info_ptr);
-    height           = png_get_image_height(png_ptr,
-                         info_ptr);
-    bit_depth        = png_get_bit_depth(png_ptr,
-                         info_ptr);
-    color_type       = png_get_color_type(png_ptr,
-                         info_ptr);
-    filter_method    = png_get_filter_type(png_ptr,
-                         info_ptr);
-    compression_type = png_get_compression_type(png_ptr,
-                         info_ptr);
-    interlace_type   = png_get_interlace_type(png_ptr,
-                         info_ptr);
-
-
-These are also important, but their validity depends on whether the chunk
-has been read.  The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and
-png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the
-data has been read, or zero if it is missing.  The parameters to the
-png_get_<chunk> are set directly if they are simple data types, or a pointer
-into the info_ptr is returned for any complex types.
-
-    png_get_PLTE(png_ptr, info_ptr, &palette,
-                     &num_palette);
-    palette        - the palette for the file
-                     (array of png_color)
-    num_palette    - number of entries in the palette
-
-    png_get_gAMA(png_ptr, info_ptr, &gamma);
-    gamma          - the gamma the file is written
-                     at (PNG_INFO_gAMA)
-
-    png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
-    srgb_intent    - the rendering intent (PNG_INFO_sRGB)
-                     The presence of the sRGB chunk
-                     means that the pixel data is in the
-                     sRGB color space.  This chunk also
-                     implies specific values of gAMA and
-                     cHRM.
-
-    png_get_iCCP(png_ptr, info_ptr, &name,
-       &compression_type, &profile, &proflen);
-    name            - The profile name.
-    compression     - The compression type; always
-                      PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
-                      You may give NULL to this argument to
-                      ignore it.
-    profile         - International Color Consortium color
-                      profile data. May contain NULs.
-    proflen         - length of profile data in bytes.
-
-    png_get_sBIT(png_ptr, info_ptr, &sig_bit);
-    sig_bit        - the number of significant bits for
-                     (PNG_INFO_sBIT) each of the gray,
-                     red, green, and blue channels,
-                     whichever are appropriate for the
-                     given color type (png_color_16)
-
-    png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
-                     &trans_values);
-    trans          - array of transparent entries for
-                     palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
-                     the single transparent color for
-                     non-paletted images (PNG_INFO_tRNS)
-    num_trans      - number of transparent entries
-                     (PNG_INFO_tRNS)
-
-    png_get_hIST(png_ptr, info_ptr, &hist);
-                     (PNG_INFO_hIST)
-    hist           - histogram of palette (array of
-                     png_uint_16)
-
-    png_get_tIME(png_ptr, info_ptr, &mod_time);
-    mod_time       - time image was last modified
-                    (PNG_VALID_tIME)
-
-    png_get_bKGD(png_ptr, info_ptr, &background);
-    background     - background color (PNG_VALID_bKGD)
-                     valid 16-bit red, green and blue
-                     values, regardless of color_type
-
-    num_comments   = png_get_text(png_ptr, info_ptr,
-                     &text_ptr, &num_text);
-    num_comments   - number of comments
-    text_ptr       - array of png_text holding image
-                     comments
-    text_ptr[i].compression - type of compression used
-                 on "text" PNG_TEXT_COMPRESSION_NONE
-                           PNG_TEXT_COMPRESSION_zTXt
-                           PNG_ITXT_COMPRESSION_NONE
-                           PNG_ITXT_COMPRESSION_zTXt
-    text_ptr[i].key   - keyword for comment.  Must contain
-                         1-79 characters.
-    text_ptr[i].text  - text comments for current
-                         keyword.  Can be empty.
-    text_ptr[i].text_length - length of text string,
-                 after decompression, 0 for iTXt
-    text_ptr[i].itxt_length - length of itxt string,
-                 after decompression, 0 for tEXt/zTXt
-    text_ptr[i].lang  - language of comment (empty
-                         string for unknown).
-    text_ptr[i].lang_key  - keyword in UTF-8
-                         (empty string for unknown).
-    num_text       - number of comments (same as
-                     num_comments; you can put NULL here
-                     to avoid the duplication)
-    Note while png_set_text() will accept text, language,
-    and translated keywords that can be NULL pointers, the
-    structure returned by png_get_text will always contain
-    regular zero-terminated C strings.  They might be
-    empty strings but they will never be NULL pointers.
-
-    num_spalettes = png_get_sPLT(png_ptr, info_ptr,
-       &palette_ptr);
-    palette_ptr    - array of palette structures holding
-                     contents of one or more sPLT chunks
-                     read.
-    num_spalettes  - number of sPLT chunks read.
-
-    png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
-       &unit_type);
-    offset_x       - positive offset from the left edge
-                     of the screen
-    offset_y       - positive offset from the top edge
-                     of the screen
-    unit_type      - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
-    png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
-       &unit_type);
-    res_x          - pixels/unit physical resolution in
-                     x direction
-    res_y          - pixels/unit physical resolution in
-                     x direction
-    unit_type      - PNG_RESOLUTION_UNKNOWN,
-                     PNG_RESOLUTION_METER
-
-    png_get_sCAL(png_ptr, info_ptr, &unit, &width,
-       &height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are doubles)
-
-    png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
-       &height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are strings like "2.54")
-
-    num_unknown_chunks = png_get_unknown_chunks(png_ptr,
-       info_ptr, &unknowns)
-    unknowns          - array of png_unknown_chunk
-                        structures holding unknown chunks
-    unknowns[i].name  - name of unknown chunk
-    unknowns[i].data  - data of unknown chunk
-    unknowns[i].size  - size of unknown chunk's data
-    unknowns[i].location - position of chunk in file
-
-    The value of "i" corresponds to the order in which the
-    chunks were read from the PNG file or inserted with the
-    png_set_unknown_chunks() function.
-
-The data from the pHYs chunk can be retrieved in several convenient
-forms:
-
-    res_x = png_get_x_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_y = png_get_y_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_x_and_y = png_get_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_x = png_get_x_pixels_per_inch(png_ptr,
-       info_ptr)
-    res_y = png_get_y_pixels_per_inch(png_ptr,
-       info_ptr)
-    res_x_and_y = png_get_pixels_per_inch(png_ptr,
-       info_ptr)
-    aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
-       info_ptr)
-
-   (Each of these returns 0 [signifying "unknown"] if
-       the data is not present or if res_x is 0;
-       res_x_and_y is 0 if res_x != res_y)
-
-The data from the oFFs chunk can be retrieved in several convenient
-forms:
-
-    x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
-    y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
-    x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
-    y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
-
-   (Each of these returns 0 [signifying "unknown" if both
-       x and y are 0] if the data is not present or if the
-       chunk is present but the unit is the pixel)
-
-For more information, see the png_info definition in png.h and the
-PNG specification for chunk contents.  Be careful with trusting
-rowbytes, as some of the transformations could increase the space
-needed to hold a row (expand, filler, gray_to_rgb, etc.).
-See png_read_update_info(), below.
-
-A quick word about text_ptr and num_text.  PNG stores comments in
-keyword/text pairs, one pair per chunk, with no limit on the number
-of text chunks, and a 2^31 byte limit on their size.  While there are
-suggested keywords, there is no requirement to restrict the use to these
-strings.  It is strongly suggested that keywords and text be sensible
-to humans (that's the point), so don't use abbreviations.  Non-printing
-symbols are not allowed.  See the PNG specification for more details.
-There is also no requirement to have text after the keyword.
-
-Keywords should be limited to 79 Latin-1 characters without leading or
-trailing spaces, but non-consecutive spaces are allowed within the
-keyword.  It is possible to have the same keyword any number of times.
-The text_ptr is an array of png_text structures, each holding a
-pointer to a language string, a pointer to a keyword and a pointer to
-a text string.  The text string, language code, and translated
-keyword may be empty or NULL pointers.  The keyword/text
-pairs are put into the array in the order that they are received.
-However, some or all of the text chunks may be after the image, so, to
-make sure you have read all the text chunks, don't mess with these
-until after you read the stuff after the image.  This will be
-mentioned again below in the discussion that goes with png_read_end().
-
-.SS Input transformations
-
-After you've read the header information, you can set up the library
-to handle any special transformations of the image data.  The various
-ways to transform the data will be described in the order that they
-should occur.  This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths.  Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data.  For example, don't swap red and blue on grayscale data.
-
-The colors used for the background and transparency values should be
-supplied in the same format/depth as the current image data.  They
-are stored in the same format/depth as the image data in a bKGD or tRNS
-chunk, so this is what libpng expects for this data.  The colors are
-transformed to keep in sync with the image data when an application
-calls the png_read_update_info() routine (see below).
-
-Data will be decoded into the supplied row buffers packed into bytes
-unless the library has been told to transform it into another format.
-For example, 4 bit/pixel paletted or grayscale data will be returned
-2 pixels/byte with the leftmost pixel in the high-order bits of the
-byte, unless png_set_packing() is called.  8-bit RGB data will be stored
-in RGB RGB RGB format unless png_set_filler() is called to insert filler
-bytes, either before or after each RGB triplet.  16-bit RGB data will
-be returned RRGGBB RRGGBB, with the most significant byte of the color
-value first, unless png_set_strip_16() is called to transform it to
-regular RGB RGB triplets, or png_set_filler() is called to insert
-filler bytes, either before or after each RRGGBB triplet.  Similarly,
-8-bit or 16-bit grayscale data can be modified with png_set_filler()
-or png_set_strip_16().
-
-The following code transforms grayscale images of less than 8 to 8 bits,
-changes paletted images to RGB, and adds a full alpha channel if there is
-transparency information in a tRNS chunk.  This is most useful on
-grayscale images with bit depths of 2 or 4 or if there is a multiple-image
-viewing application that wishes to treat all images in the same way.
-
-    if (color_type == PNG_COLOR_TYPE_PALETTE)
-        png_set_palette_to_rgb(png_ptr);
-
-    if (color_type == PNG_COLOR_TYPE_GRAY &&
-        bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr);
-
-    if (png_get_valid(png_ptr, info_ptr,
-        PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
-
-These three functions are actually aliases for png_set_expand(), added
-in libpng version 1.0.4, with the function names expanded to improve code
-readability.  In some future version they may actually do different
-things.
-
-PNG can have files with 16 bits per channel.  If you only can handle
-8 bits per channel, this will strip the pixels down to 8 bit.
-
-    if (bit_depth == 16)
-        png_set_strip_16(png_ptr);
-
-If, for some reason, you don't need the alpha channel on an image,
-and you want to remove it rather than combining it with the background
-(but the image author certainly had in mind that you *would* combine
-it with the background, so that's what you should probably do):
-
-    if (color_type & PNG_COLOR_MASK_ALPHA)
-        png_set_strip_alpha(png_ptr);
-
-In PNG files, the alpha channel in an image
-is the level of opacity.  If you need the alpha channel in an image to
-be the level of transparency instead of opacity, you can invert the
-alpha channel (or the tRNS chunk data) after it's read, so that 0 is
-fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit
-images) is fully transparent, with
-
-    png_set_invert_alpha(png_ptr);
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit
-files.  This code expands to 1 pixel per byte without changing the
-values of the pixels:
-
-    if (bit_depth < 8)
-        png_set_packing(png_ptr);
-
-PNG files have possible bit depths of 1, 2, 4, 8, and 16.  All pixels
-stored in a PNG image have been "scaled" or "shifted" up to the next
-higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
-8 bits/sample in the range [0, 255]).  However, it is also possible to
-convert the PNG pixel data back to the original bit depth of the image.
-This call reduces the pixels back down to the original bit depth:
-
-    png_color_8p sig_bit;
-
-    if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
-        png_set_shift(png_ptr, sig_bit);
-
-PNG files store 3-color pixels in red, green, blue order.  This code
-changes the storage of the pixels to blue, green, red:
-
-    if (color_type == PNG_COLOR_TYPE_RGB ||
-        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-        png_set_bgr(png_ptr);
-
-PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
-into 4 or 8 bytes for windowing systems that need them in this format:
-
-    if (color_type == PNG_COLOR_TYPE_RGB)
-        png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
-
-where "filler" is the 8 or 16-bit number to fill with, and the location is
-either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
-you want the filler before the RGB or after.  This transformation
-does not affect images that already have full alpha channels.  To add an
-opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
-will generate RGBA pixels.
-
-If you are reading an image with an alpha channel, and you need the
-data as ARGB instead of the normal PNG format RGBA:
-
-    if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-        png_set_swap_alpha(png_ptr);
-
-For some uses, you may want a grayscale image to be represented as
-RGB.  This code will do that conversion:
-
-    if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-          png_set_gray_to_rgb(png_ptr);
-
-Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
-with alpha.
-
-    if (color_type == PNG_COLOR_TYPE_RGB ||
-        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-          png_set_rgb_to_gray_fixed(png_ptr, error_action,
-             int red_weight, int green_weight);
-
-    error_action = 1: silently do the conversion
-    error_action = 2: issue a warning if the original
-                      image has any pixel where
-                      red != green or red != blue
-    error_action = 3: issue an error and abort the
-                      conversion if the original
-                      image has any pixel where
-                      red != green or red != blue
-
-    red_weight:       weight of red component times 100000
-    green_weight:     weight of green component times 100000
-                      If either weight is negative, default
-                      weights (21268, 71514) are used.
-
-If you have set error_action = 1 or 2, you can
-later check whether the image really was gray, after processing
-the image rows, with the png_get_rgb_to_gray_status(png_ptr) function.
-It will return a png_byte that is zero if the image was gray or
-1 if there were any non-gray pixels.  bKGD and sBIT data
-will be silently converted to grayscale, using the green channel
-data, regardless of the error_action setting.
-
-With red_weight+green_weight<=100000,
-the normalized graylevel is computed:
-
-    int rw = red_weight * 65536;
-    int gw = green_weight * 65536;
-    int bw = 65536 - (rw + gw);
-    gray = (rw*red + gw*green + bw*blue)/65536;
-
-The default values approximate those recommended in the Charles
-Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
-Copyright (c) 1998-01-04 Charles Poynton poynton at inforamp.net
-
-    Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
-
-Libpng approximates this with
-
-    Y = 0.21268 * R    + 0.7151 * G    + 0.07217 * B
-
-which can be expressed with integers as
-
-    Y = (6969 * R + 23434 * G + 2365 * B)/32768
-
-The calculation is done in a linear colorspace, if the image gamma
-is known.
-
-If you have a grayscale and you are using png_set_expand_depth(),
-png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
-a higher bit-depth, you must either supply the background color as a gray
-value at the original file bit-depth (need_expand = 1) or else supply the
-background color as an RGB triplet at the final, expanded bit depth
-(need_expand = 0).  Similarly, if you are reading a paletted image, you
-must either supply the background color as a palette index (need_expand = 1)
-or as an RGB triplet that may or may not be in the palette (need_expand = 0).
-
-    png_color_16 my_background;
-    png_color_16p image_background;
-
-    if (png_get_bKGD(png_ptr, info_ptr, &image_background))
-        png_set_background(png_ptr, image_background,
-          PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
-    else
-        png_set_background(png_ptr, &my_background,
-          PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-
-The png_set_background() function tells libpng to composite images
-with alpha or simple transparency against the supplied background
-color.  If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid),
-you may use this color, or supply another color more suitable for
-the current display (e.g., the background color from a web page).  You
-need to tell libpng whether the color is in the gamma space of the
-display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file
-(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one
-that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't
-know why anyone would use this, but it's here).
-
-To properly display PNG images on any kind of system, the application needs
-to know what the display gamma is.  Ideally, the user will know this, and
-the application will allow them to set it.  One method of allowing the user
-to set the display gamma separately for each system is to check for a
-SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
-correctly set.
-
-Note that display_gamma is the overall gamma correction required to produce
-pleasing results, which depends on the lighting conditions in the surrounding
-environment.  In a dim or brightly lit room, no compensation other than
-the physical gamma exponent of the monitor is needed, while in a dark room
-a slightly smaller exponent is better.
-
-   double gamma, screen_gamma;
-
-   if (/* We have a user-defined screen
-       gamma value */)
-   {
-      screen_gamma = user_defined_screen_gamma;
-   }
-   /* One way that applications can share the same
-      screen gamma value */
-   else if ((gamma_str = getenv("SCREEN_GAMMA"))
-      != NULL)
-   {
-      screen_gamma = (double)atof(gamma_str);
-   }
-   /* If we don't have another value */
-   else
-   {
-      screen_gamma = 2.2; /* A good guess for a
-           PC monitor in a bright office or a dim room */
-      screen_gamma = 2.0; /* A good guess for a
-           PC monitor in a dark room */
-      screen_gamma = 1.7 or 1.0;  /* A good
-           guess for Mac systems */
-   }
-
-The png_set_gamma() function handles gamma transformations of the data.
-Pass both the file gamma and the current screen_gamma.  If the file does
-not have a gamma value, you can pass one anyway if you have an idea what
-it is (usually 0.45455 is a good guess for GIF images on PCs).  Note
-that file gammas are inverted from screen gammas.  See the discussions
-on gamma in the PNG specification for an excellent description of what
-gamma is, and why all applications should support it.  It is strongly
-recommended that PNG viewers support gamma correction.
-
-   if (png_get_gAMA(png_ptr, info_ptr, &gamma))
-      png_set_gamma(png_ptr, screen_gamma, gamma);
-   else
-      png_set_gamma(png_ptr, screen_gamma, 0.45455);
-
-If you need to reduce an RGB file to a paletted file, or if a paletted
-file has more entries then will fit on your screen, png_set_dither()
-will do that.  Note that this is a simple match dither that merely
-finds the closest color available.  This should work fairly well with
-optimized palettes, and fairly badly with linear color cubes.  If you
-pass a palette that is larger then maximum_colors, the file will
-reduce the number of colors in the palette so it will fit into
-maximum_colors.  If there is a histogram, it will use it to make
-more intelligent choices when reducing the palette.  If there is no
-histogram, it may not do as good a job.
-
-   if (color_type & PNG_COLOR_MASK_COLOR)
-   {
-      if (png_get_valid(png_ptr, info_ptr,
-         PNG_INFO_PLTE))
-      {
-         png_uint_16p histogram = NULL;
-
-         png_get_hIST(png_ptr, info_ptr,
-            &histogram);
-         png_set_dither(png_ptr, palette, num_palette,
-            max_screen_colors, histogram, 1);
-      }
-      else
-      {
-         png_color std_color_cube[MAX_SCREEN_COLORS] =
-            { ... colors ... };
-
-         png_set_dither(png_ptr, std_color_cube,
-            MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
-            NULL,0);
-      }
-   }
-
-PNG files describe monochrome as black being zero and white being one.
-The following code will reverse this (make black be one and white be
-zero):
-
-   if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
-      png_set_invert_mono(png_ptr);
-
-This function can also be used to invert grayscale and gray-alpha images:
-
-   if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      png_set_invert_mono(png_ptr);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first).  This code changes the storage to the
-other way (little-endian, i.e. least significant bits first, the
-way PCs store them):
-
-    if (bit_depth == 16)
-        png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
-    if (bit_depth < 8)
-       png_set_packswap(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs.  This is done by setting a callback
-with
-
-    png_set_read_user_transform_fn(png_ptr,
-       read_transform_fn);
-
-You must supply the function
-
-    void read_transform_fn(png_ptr ptr, row_info_ptr
-       row_info, png_bytep data)
-
-See pngtest.c for a working example.  Your function will be called
-after all of the other transformations have been processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function, and you can inform libpng that your transform
-function will change the number of channels or bit depth with the
-function
-
-    png_set_user_transform_info(png_ptr, user_ptr,
-       user_depth, user_channels);
-
-The user's application, not libpng, is responsible for allocating and
-freeing any memory required for the user structure.
-
-You can retrieve the pointer via the function
-png_get_user_transform_ptr().  For example:
-
-    voidp read_user_transform_ptr =
-       png_get_user_transform_ptr(png_ptr);
-
-The last thing to handle is interlacing; this is covered in detail below,
-but you must call the function here if you want libpng to handle expansion
-of the interlaced image.
-
-    number_of_passes = png_set_interlace_handling(png_ptr);
-
-After setting the transformations, libpng can update your png_info
-structure to reflect any transformations you've requested with this
-call.  This is most useful to update the info structure's rowbytes
-field so you can use it to allocate your image memory.  This function
-will also update your palette with the correct screen_gamma and
-background if these have been given with the calls above.
-
-    png_read_update_info(png_ptr, info_ptr);
-
-After you call png_read_update_info(), you can allocate any
-memory you need to hold the image.  The row data is simply
-raw byte data for all forms of images.  As the actual allocation
-varies among applications, no example will be given.  If you
-are allocating one large chunk, you will need to build an
-array of pointers to each row, as it will be needed for some
-of the functions below.
-
-.SS Reading image data
-
-After you've allocated memory, you can read the image data.
-The simplest way to do this is in one function call.  If you are
-allocating enough memory to hold the whole image, you can just
-call png_read_image() and libpng will read in all the image data
-and put it in the memory area supplied.  You will need to pass in
-an array of pointers to each row.
-
-This function automatically handles interlacing, so you don't need
-to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_read_rows().
-
-   png_read_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
-   png_bytep row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to read in the whole image at once, you can
-use png_read_rows() instead.  If there is no interlacing (check
-interlace_type == PNG_INTERLACE_NONE), this is simple:
-
-    png_read_rows(png_ptr, row_pointers, NULL,
-       number_of_rows);
-
-where row_pointers is the same as in the png_read_image() call.
-
-If you are doing this just one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
-    png_bytep row_pointer = row;
-    png_read_row(png_ptr, row_pointer, NULL);
-
-If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
-get somewhat harder.  The only current (PNG Specification version 1.2)
-interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
-is a somewhat complicated 2D interlace scheme, known as Adam7, that
-breaks down an image into seven smaller images of varying size, based
-on an 8x8 grid.
-
-libpng can fill out those images or it can give them to you "as is".
-If you want them filled out, there are two ways to do that.  The one
-mentioned in the PNG specification is to expand each pixel to cover
-those pixels that have not been read yet (the "rectangle" method).
-This results in a blocky image for the first pass, which gradually
-smooths out as more pixels are read.  The other method is the "sparkle"
-method, where pixels are drawn only in their final locations, with the
-rest of the image remaining whatever colors they were initialized to
-before the start of the read.  The first method usually looks better,
-but tends to be slower, as there are more pixels to put in the rows.
-
-If you don't want libpng to handle the interlacing details, just call
-png_read_rows() seven times to read in all seven images.  Each of the
-images is a valid image by itself, or they can all be combined on an
-8x8 grid to form a single image (although if you intend to combine them
-you would be far better off using the libpng interlace handling).
-
-The first pass will return an image 1/8 as wide as the entire image
-(every 8th column starting in column 0) and 1/8 as high as the original
-(every 8th row starting in row 0), the second will be 1/8 as wide
-(starting in column 4) and 1/8 as high (also starting in row 0).  The
-third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
-1/8 as high (every 8th row starting in row 4), and the fourth pass will
-be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
-and every 4th row starting in row 0).  The fifth pass will return an
-image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
-while the sixth pass will be 1/2 as wide and 1/2 as high as the original
-(starting in column 1 and row 0).  The seventh and final pass will be as
-wide as the original, and 1/2 as high, containing all of the odd
-numbered scanlines.  Phew!
-
-If you want libpng to expand the images, call this before calling
-png_start_read_image() or png_read_update_info():
-
-    if (interlace_type == PNG_INTERLACE_ADAM7)
-        number_of_passes
-           = png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed.  Currently, this
-is seven, but may change if another interlace type is added.
-This function can be called even if the file is not interlaced,
-where it will return one pass.
-
-If you are not going to display the image after each pass, but are
-going to wait until the entire image is read in, use the sparkle
-effect.  This effect is faster and the end result of either method
-is exactly the same.  If you are planning on displaying the image
-after each pass, the "rectangle" effect is generally considered the
-better looking one.
-
-If you only want the "sparkle" effect, just call png_read_rows() as
-normal, with the third parameter NULL.  Make sure you make pass over
-the image number_of_passes times, and you don't change the data in the
-rows between calls.  You can change the locations of the data, just
-not the data.  Each pass only writes the pixels appropriate for that
-pass, and assumes the data from previous passes is still valid.
-
-    png_read_rows(png_ptr, row_pointers, NULL,
-       number_of_rows);
-
-If you only want the first effect (the rectangles), do the same as
-before except pass the row buffer in the third parameter, and leave
-the second parameter NULL.
-
-    png_read_rows(png_ptr, NULL, row_pointers,
-       number_of_rows);
-
-.SS Finishing a sequential read
-
-After you are finished reading the image through either the high- or
-low-level interfaces, you can finish reading the file.  If you are
-interested in comments or time, which may be stored either before or
-after the image data, you should pass the separate png_info struct if
-you want to keep the comments from before and after the image
-separate.  If you are not interested, you can pass NULL.
-
-   png_read_end(png_ptr, end_info);
-
-When you are done, you can free all memory allocated by libpng like this:
-
-   png_destroy_read_struct(&png_ptr, &info_ptr,
-       &end_info);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
-    png_free_data(png_ptr, info_ptr, mask, seq)
-    mask - identifies data to be freed, a mask
-           containing the logical OR of one or
-           more of
-             PNG_FREE_PLTE, PNG_FREE_TRNS,
-             PNG_FREE_HIST, PNG_FREE_ICCP,
-             PNG_FREE_PCAL, PNG_FREE_ROWS,
-             PNG_FREE_SCAL, PNG_FREE_SPLT,
-             PNG_FREE_TEXT, PNG_FREE_UNKN,
-           or simply PNG_FREE_ALL
-    seq  - sequence number of item to be freed
-           (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng,  and will in those
-cases do nothing.  The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed.  If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-The default behavior is only to free data that was allocated internally
-by libpng.  This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
-    png_data_freer(png_ptr, info_ptr, freer, mask)
-    mask   - which data elements are affected
-             same choices as in png_free_data()
-    freer  - one of
-               PNG_DESTROY_WILL_FREE_DATA
-               PNG_SET_WILL_FREE_DATA
-               PNG_USER_WILL_FREE_DATA
-
-This function only affects data that has already been allocated.
-You can call this function after reading the PNG data but before calling
-any png_set_*() functions, to control whether the user or the png_set_*()
-function is responsible for freeing any existing data that might be present,
-and again after the png_set_*() functions to control whether the user
-or png_destroy_*() is supposed to free the data.  When the user assumes
-responsibility for libpng-allocated data, the application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated your row_pointers in a single block, as suggested above in
-the description of the high level read interface, you must not transfer
-responsibility for freeing it to the png_set_rows or png_read_destroy function,
-because they would also try to free the individual row_pointers[i].
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key.  Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-
-The png_free_data() function will turn off the "valid" flag for anything
-it frees.  If you need to turn the flag off for a chunk that was freed by your
-application instead of by libpng, you can use
-
-    png_set_invalid(png_ptr, info_ptr, mask);
-    mask - identifies the chunks to be made invalid,
-           containing the logical OR of one or
-           more of
-             PNG_INFO_gAMA, PNG_INFO_sBIT,
-             PNG_INFO_cHRM, PNG_INFO_PLTE,
-             PNG_INFO_tRNS, PNG_INFO_bKGD,
-             PNG_INFO_hIST, PNG_INFO_pHYs,
-             PNG_INFO_oFFs, PNG_INFO_tIME,
-             PNG_INFO_pCAL, PNG_INFO_sRGB,
-             PNG_INFO_iCCP, PNG_INFO_sPLT,
-             PNG_INFO_sCAL, PNG_INFO_IDAT
-
-For a more compact example of reading a PNG image, see the file example.c.
-
-.SS Reading PNG files progressively
-
-The progressive reader is slightly different then the non-progressive
-reader.  Instead of calling png_read_info(), png_read_rows(), and
-png_read_end(), you make one call to png_process_data(), which calls
-callbacks when it has the info, a row, or the end of the image.  You
-set up these callbacks with png_set_progressive_read_fn().  You don't
-have to worry about the input/output functions of libpng, as you are
-giving the library the data directly in png_process_data().  I will
-assume that you have read the section on reading PNG files above,
-so I will only highlight the differences (although I will show
-all of the code).
-
-png_structp png_ptr;
-png_infop info_ptr;
-
- /*  An example code fragment of how you would
-     initialize the progressive reader in your
-     application. */
- int
- initialize_png_reader()
- {
-    png_ptr = png_create_read_struct
-        (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-         user_error_fn, user_warning_fn);
-    if (!png_ptr)
-        return (ERROR);
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-        png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    /* This one's new.  You can provide functions
-       to be called when the header info is valid,
-       when each row is completed, and when the image
-       is finished.  If you aren't using all functions,
-       you can specify NULL parameters.  Even when all
-       three functions are NULL, you need to call
-       png_set_progressive_read_fn().  You can use
-       any struct as the user_ptr (cast to a void pointer
-       for the function call), and retrieve the pointer
-       from inside the callbacks using the function
-
-          png_get_progressive_ptr(png_ptr);
-
-       which will return a void pointer, which you have
-       to cast appropriately.
-     */
-    png_set_progressive_read_fn(png_ptr, (void *)user_ptr,
-        info_callback, row_callback, end_callback);
-
-    return 0;
- }
-
- /* A code fragment that you call as you receive blocks
-   of data */
- int
- process_data(png_bytep buffer, png_uint_32 length)
- {
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    /* This one's new also.  Simply give it a chunk
-       of data from the file stream (in order, of
-       course).  On machines with segmented memory
-       models machines, don't give it any more than
-       64K.  The library seems to run fine with sizes
-       of 4K. Although you can give it much less if
-       necessary (I assume you can give it chunks of
-       1 byte, I haven't tried less then 256 bytes
-       yet).  When this function returns, you may
-       want to display any rows that were generated
-       in the row callback if you don't already do
-       so there.
-     */
-    png_process_data(png_ptr, info_ptr, buffer, length);
-    return 0;
- }
-
- /* This function is called (as set by
-    png_set_progressive_read_fn() above) when enough data
-    has been supplied so all of the header has been
-    read.
- */
- void
- info_callback(png_structp png_ptr, png_infop info)
- {
-    /* Do any setup here, including setting any of
-       the transformations mentioned in the Reading
-       PNG files section.  For now, you _must_ call
-       either png_start_read_image() or
-       png_read_update_info() after all the
-       transformations are set (even if you don't set
-       any).  You may start getting rows before
-       png_process_data() returns, so this is your
-       last chance to prepare for that.
-     */
- }
-
- /* This function is called when each row of image
-    data is complete */
- void
- row_callback(png_structp png_ptr, png_bytep new_row,
-    png_uint_32 row_num, int pass)
- {
-    /* If the image is interlaced, and you turned
-       on the interlace handler, this function will
-       be called for every row in every pass.  Some
-       of these rows will not be changed from the
-       previous pass.  When the row is not changed,
-       the new_row variable will be NULL.  The rows
-       and passes are called in order, so you don't
-       really need the row_num and pass, but I'm
-       supplying them because it may make your life
-       easier.
-
-       For the non-NULL rows of interlaced images,
-       you must call png_progressive_combine_row()
-       passing in the row and the old row.  You can
-       call this function for NULL rows (it will just
-       return) and for non-interlaced images (it just
-       does the memcpy for you) if it will make the
-       code easier.  Thus, you can just do this for
-       all cases:
-     */
-
-        png_progressive_combine_row(png_ptr, old_row,
-          new_row);
-
-    /* where old_row is what was displayed for
-       previously for the row.  Note that the first
-       pass (pass == 0, really) will completely cover
-       the old row, so the rows do not have to be
-       initialized.  After the first pass (and only
-       for interlaced images), you will have to pass
-       the current row, and the function will combine
-       the old row and the new row.
-    */
- }
-
- void
- end_callback(png_structp png_ptr, png_infop info)
- {
-    /* This function is called after the whole image
-       has been read, including any chunks after the
-       image (up to and including the IEND).  You
-       will usually have the same info chunk as you
-       had in the header, although some data may have
-       been added to the comments and time fields.
-
-       Most people won't do much here, perhaps setting
-       a flag that marks the image as finished.
-     */
- }
-
-
-
-.SH IV. Writing
-
-Much of this is very similar to reading.  However, everything of
-importance is repeated here, so you won't have to constantly look
-back up in the reading section to understand writing.
-
-.SS Setup
-
-You will want to do the I/O initialization before you get into libpng,
-so if it doesn't work, you don't have anything to undo. If you are not
-using the standard I/O functions, you will need to replace them with
-custom writing functions.  See the discussion under Customizing libpng.
-
-    FILE *fp = fopen(file_name, "wb");
-    if (!fp)
-    {
-       return (ERROR);
-    }
-
-Next, png_struct and png_info need to be allocated and initialized.
-As these can be both relatively large, you may not want to store these
-on the stack, unless you have stack space to spare.  Of course, you
-will want to check if they return NULL.  If you are also reading,
-you won't want to name your read structure and your write structure
-both "png_ptr"; you can call them anything you like, such as
-"read_ptr" and "write_ptr".  Look at pngtest.c, for example.
-
-    png_structp png_ptr = png_create_write_struct
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn);
-    if (!png_ptr)
-       return (ERROR);
-
-    png_infop info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-       png_destroy_write_struct(&png_ptr,
-         (png_infopp)NULL);
-       return (ERROR);
-    }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_write_struct_2() instead of png_create_write_struct():
-
-    png_structp png_ptr = png_create_write_struct_2
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn, (png_voidp)
-        user_mem_ptr, user_malloc_fn, user_free_fn);
-
-After you have these structures, you will need to set up the
-error handling.  When libpng encounters an error, it expects to
-longjmp() back to your routine.  Therefore, you will need to call
-setjmp() and pass the png_jmpbuf(png_ptr).  If you
-write the file from different routines, you will need to update
-the png_jmpbuf(png_ptr) every time you enter a new routine that will
-call a png_*() function.  See your documentation of setjmp/longjmp
-for your compiler for more information on setjmp/longjmp.  See
-the discussion on libpng error handling in the Customizing Libpng
-section below for more information on the libpng error handling.
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-       png_destroy_write_struct(&png_ptr, &info_ptr);
-       fclose(fp);
-       return (ERROR);
-    }
-    ...
-    return;
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the output code.  The default for libpng is to
-use the C function fwrite().  If you use this, you will need to pass a
-valid FILE * in the function png_init_io().  Be sure that the file is
-opened in binary mode.  Again, if you wish to handle writing data in
-another way, see the discussion on libpng I/O handling in the Customizing
-Libpng section below.
-
-    png_init_io(png_ptr, fp);
-
-.SS Write callbacks
-
-At this point, you can set up a callback function that will be
-called after each row has been written, which you can use to control
-a progress meter or the like.  It's demonstrated in pngtest.c.
-You must supply a function
-
-    void write_row_callback(png_ptr, png_uint_32 row,
-       int pass);
-    {
-      /* put your code here */
-    }
-
-(You can give it another name that you like instead of "write_row_callback")
-
-To inform libpng about your function, use
-
-    png_set_write_status_fn(png_ptr, write_row_callback);
-
-You now have the option of modifying how the compression library will
-run.  The following functions are mainly for testing, but may be useful
-in some cases, like if you need to write PNG files extremely fast and
-are willing to give up some compression, or if you want to get the
-maximum possible compression at the expense of slower writing.  If you
-have no special needs in this area, let the library do what it wants by
-not calling this function at all, as it has been tuned to deliver a good
-speed/compression ratio. The second parameter to png_set_filter() is
-the filter method, for which the only valid values are 0 (as of the
-July 1999 PNG specification, version 1.2) or 64 (if you are writing
-a PNG datastream that is to be embedded in a MNG datastream).  The third
-parameter is a flag that indicates which filter type(s) are to be tested
-for each scanline.  See the PNG specification for details on the specific filter
-types.
-
-
-    /* turn on or off filtering, and/or choose
-       specific filters.  You can use either a single
-       PNG_FILTER_VALUE_NAME or the logical OR of one
-       or more PNG_FILTER_NAME masks. */
-    png_set_filter(png_ptr, 0,
-       PNG_FILTER_NONE  | PNG_FILTER_VALUE_NONE |
-       PNG_FILTER_SUB   | PNG_FILTER_VALUE_SUB  |
-       PNG_FILTER_UP    | PNG_FILTER_VALUE_UP   |
-       PNG_FILTER_AVE   | PNG_FILTER_VALUE_AVE  |
-       PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
-       PNG_ALL_FILTERS);
-
-If an application
-wants to start and stop using particular filters during compression,
-it should start out with all of the filters (to ensure that the previous
-row of pixels will be stored in case it's needed later), and then add
-and remove them after the start of compression.
-
-If you are writing a PNG datastream that is to be embedded in a MNG
-datastream, the second parameter can be either 0 or 64.
-
-The png_set_compression_*() functions interface to the zlib compression
-library, and should mostly be ignored unless you really know what you are
-doing.  The only generally useful call is png_set_compression_level()
-which changes how much time zlib spends on trying to compress the image
-data.  See the Compression Library (zlib.h and algorithm.txt, distributed
-with zlib) for details on the compression levels.
-
-    /* set the zlib compression level */
-    png_set_compression_level(png_ptr,
-        Z_BEST_COMPRESSION);
-
-    /* set other zlib parameters */
-    png_set_compression_mem_level(png_ptr, 8);
-    png_set_compression_strategy(png_ptr,
-        Z_DEFAULT_STRATEGY);
-    png_set_compression_window_bits(png_ptr, 15);
-    png_set_compression_method(png_ptr, 8);
-    png_set_compression_buffer_size(png_ptr, 8192)
-
-extern PNG_EXPORT(void,png_set_zbuf_size)
-
-.SS Setting the contents of info for output
-
-You now need to fill in the png_info structure with all the data you
-wish to write before the actual image.  Note that the only thing you
-are allowed to write after the image is the text chunks and the time
-chunk (as of PNG Specification 1.2, anyway).  See png_write_end() and
-the latest PNG specification for more information on that.  If you
-wish to write them before the image, fill them in now, and flag that
-data as being valid.  If you want to wait until after the data, don't
-fill them until png_write_end().  For all the fields in png_info and
-their data types, see png.h.  For explanations of what the fields
-contain, see the PNG specification.
-
-Some of the more important parts of the png_info are:
-
-    png_set_IHDR(png_ptr, info_ptr, width, height,
-       bit_depth, color_type, interlace_type,
-       compression_type, filter_method)
-    width          - holds the width of the image
-                     in pixels (up to 2^31).
-    height         - holds the height of the image
-                     in pixels (up to 2^31).
-    bit_depth      - holds the bit depth of one of the
-                     image channels.
-                     (valid values are 1, 2, 4, 8, 16
-                     and depend also on the
-                     color_type.  See also significant
-                     bits (sBIT) below).
-    color_type     - describes which color/alpha
-                     channels are present.
-                     PNG_COLOR_TYPE_GRAY
-                        (bit depths 1, 2, 4, 8, 16)
-                     PNG_COLOR_TYPE_GRAY_ALPHA
-                        (bit depths 8, 16)
-                     PNG_COLOR_TYPE_PALETTE
-                        (bit depths 1, 2, 4, 8)
-                     PNG_COLOR_TYPE_RGB
-                        (bit_depths 8, 16)
-                     PNG_COLOR_TYPE_RGB_ALPHA
-                        (bit_depths 8, 16)
-
-                     PNG_COLOR_MASK_PALETTE
-                     PNG_COLOR_MASK_COLOR
-                     PNG_COLOR_MASK_ALPHA
-
-    interlace_type - PNG_INTERLACE_NONE or
-                     PNG_INTERLACE_ADAM7
-    compression_type - (must be
-                     PNG_COMPRESSION_TYPE_DEFAULT)
-    filter_method  - (must be PNG_FILTER_TYPE_DEFAULT
-                     or, if you are writing a PNG to
-                     be embedded in a MNG datastream,
-                     can also be
-                     PNG_INTRAPIXEL_DIFFERENCING)
-
-    png_set_PLTE(png_ptr, info_ptr, palette,
-       num_palette);
-    palette        - the palette for the file
-                     (array of png_color)
-    num_palette    - number of entries in the palette
-
-    png_set_gAMA(png_ptr, info_ptr, gamma);
-    gamma          - the gamma the image was created
-                     at (PNG_INFO_gAMA)
-
-    png_set_sRGB(png_ptr, info_ptr, srgb_intent);
-    srgb_intent    - the rendering intent
-                     (PNG_INFO_sRGB) The presence of
-                     the sRGB chunk means that the pixel
-                     data is in the sRGB color space.
-                     This chunk also implies specific
-                     values of gAMA and cHRM.  Rendering
-                     intent is the CSS-1 property that
-                     has been defined by the International
-                     Color Consortium
-                     (http://www.color.org).
-                     It can be one of
-                     PNG_sRGB_INTENT_SATURATION,
-                     PNG_sRGB_INTENT_PERCEPTUAL,
-                     PNG_sRGB_INTENT_ABSOLUTE, or
-                     PNG_sRGB_INTENT_RELATIVE.
-
-
-    png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
-       srgb_intent);
-    srgb_intent    - the rendering intent
-                     (PNG_INFO_sRGB) The presence of the
-                     sRGB chunk means that the pixel
-                     data is in the sRGB color space.
-                     This function also causes gAMA and
-                     cHRM chunks with the specific values
-                     that are consistent with sRGB to be
-                     written.
-
-    png_set_iCCP(png_ptr, info_ptr, name, compression_type,
-                      profile, proflen);
-    name            - The profile name.
-    compression     - The compression type; always
-                      PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
-                      You may give NULL to this argument to
-                      ignore it.
-    profile         - International Color Consortium color
-                      profile data. May contain NULs.
-    proflen         - length of profile data in bytes.
-
-    png_set_sBIT(png_ptr, info_ptr, sig_bit);
-    sig_bit        - the number of significant bits for
-                     (PNG_INFO_sBIT) each of the gray, red,
-                     green, and blue channels, whichever are
-                     appropriate for the given color type
-                     (png_color_16)
-
-    png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
-       trans_values);
-    trans          - array of transparent entries for
-                     palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
-                     the single transparent color for
-                     non-paletted images (PNG_INFO_tRNS)
-    num_trans      - number of transparent entries
-                     (PNG_INFO_tRNS)
-
-    png_set_hIST(png_ptr, info_ptr, hist);
-                    (PNG_INFO_hIST)
-    hist           - histogram of palette (array of
-                     png_uint_16)
-
-    png_set_tIME(png_ptr, info_ptr, mod_time);
-    mod_time       - time image was last modified
-                     (PNG_VALID_tIME)
-
-    png_set_bKGD(png_ptr, info_ptr, background);
-    background     - background color (PNG_VALID_bKGD)
-
-    png_set_text(png_ptr, info_ptr, text_ptr, num_text);
-    text_ptr       - array of png_text holding image
-                     comments
-    text_ptr[i].compression - type of compression used
-                 on "text" PNG_TEXT_COMPRESSION_NONE
-                           PNG_TEXT_COMPRESSION_zTXt
-                           PNG_ITXT_COMPRESSION_NONE
-                           PNG_ITXT_COMPRESSION_zTXt
-    text_ptr[i].key   - keyword for comment.  Must contain
-                 1-79 characters.
-    text_ptr[i].text  - text comments for current
-                         keyword.  Can be NULL or empty.
-    text_ptr[i].text_length - length of text string,
-                 after decompression, 0 for iTXt
-    text_ptr[i].itxt_length - length of itxt string,
-                 after decompression, 0 for tEXt/zTXt
-    text_ptr[i].lang  - language of comment (NULL or
-                         empty for unknown).
-    text_ptr[i].translated_keyword  - keyword in UTF-8 (NULL
-                         or empty for unknown).
-    num_text       - number of comments
-
-    png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
-       num_spalettes);
-    palette_ptr    - array of png_sPLT_struct structures
-                     to be added to the list of palettes
-                     in the info structure.
-    num_spalettes  - number of palette structures to be
-                     added.
-
-    png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
-        unit_type);
-    offset_x  - positive offset from the left
-                     edge of the screen
-    offset_y  - positive offset from the top
-                     edge of the screen
-    unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
-    png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
-        unit_type);
-    res_x       - pixels/unit physical resolution
-                  in x direction
-    res_y       - pixels/unit physical resolution
-                  in y direction
-    unit_type   - PNG_RESOLUTION_UNKNOWN,
-                  PNG_RESOLUTION_METER
-
-    png_set_sCAL(png_ptr, info_ptr, unit, width, height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                  (width and height are doubles)
-
-    png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are strings like "2.54")
-
-    png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
-       num_unknowns)
-    unknowns          - array of png_unknown_chunk
-                        structures holding unknown chunks
-    unknowns[i].name  - name of unknown chunk
-    unknowns[i].data  - data of unknown chunk
-    unknowns[i].size  - size of unknown chunk's data
-    unknowns[i].location - position to write chunk in file
-                           0: do not write chunk
-                           PNG_HAVE_IHDR: before PLTE
-                           PNG_HAVE_PLTE: before IDAT
-                           PNG_AFTER_IDAT: after IDAT
-
-The "location" member is set automatically according to
-what part of the output file has already been written.
-You can change its value after calling png_set_unknown_chunks()
-as demonstrated in pngtest.c.  Within each of the "locations",
-the chunks are sequenced according to their position in the
-structure (that is, the value of "i", which is the order in which
-the chunk was either read from the input file or defined with
-png_set_unknown_chunks).
-
-A quick word about text and num_text.  text is an array of png_text
-structures.  num_text is the number of valid structures in the array.
-Each png_text structure holds a language code, a keyword, a text value,
-and a compression type.
-
-The compression types have the same valid numbers as the compression
-types of the image data.  Currently, the only valid number is zero.
-However, you can store text either compressed or uncompressed, unlike
-images, which always have to be compressed.  So if you don't want the
-text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE.
-Because tEXt and zTXt chunks don't have a language field, if you
-specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt
-any language code or translated keyword will not be written out.
-
-Until text gets around 1000 bytes, it is not worth compressing it.
-After the text has been written out to the file, the compression type
-is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
-so that it isn't written out again at the end (in case you are calling
-png_write_end() with the same struct.
-
-The keywords that are given in the PNG Specification are:
-
-    Title            Short (one line) title or
-                     caption for image
-    Author           Name of image's creator
-    Description      Description of image (possibly long)
-    Copyright        Copyright notice
-    Creation Time    Time of original image creation
-                     (usually RFC 1123 format, see below)
-    Software         Software used to create the image
-    Disclaimer       Legal disclaimer
-    Warning          Warning of nature of content
-    Source           Device used to create the image
-    Comment          Miscellaneous comment; conversion
-                     from other image format
-
-The keyword-text pairs work like this.  Keywords should be short
-simple descriptions of what the comment is about.  Some typical
-keywords are found in the PNG specification, as is some recommendations
-on keywords.  You can repeat keywords in a file.  You can even write
-some text before the image and some after.  For example, you may want
-to put a description of the image before the image, but leave the
-disclaimer until after, so viewers working over modem connections
-don't have to wait for the disclaimer to go over the modem before
-they start seeing the image.  Finally, keywords should be full
-words, not abbreviations.  Keywords and text are in the ISO 8859-1
-(Latin-1) character set (a superset of regular ASCII) and can not
-contain NUL characters, and should not contain control or other
-unprintable characters.  To make the comments widely readable, stick
-with basic ASCII, and avoid machine specific character set extensions
-like the IBM-PC character set.  The keyword must be present, but
-you can leave off the text string on non-compressed pairs.
-Compressed pairs must have a text string, as only the text string
-is compressed anyway, so the compression would be meaningless.
-
-PNG supports modification time via the png_time structure.  Two
-conversion routines are provided, png_convert_from_time_t() for
-time_t and png_convert_from_struct_tm() for struct tm.  The
-time_t routine uses gmtime().  You don't have to use either of
-these, but if you wish to fill in the png_time structure directly,
-you should provide the time in universal time (GMT) if possible
-instead of your local time.  Note that the year number is the full
-year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and
-that months start with 1.
-
-If you want to store the time of the original image creation, you should
-use a plain tEXt chunk with the "Creation Time" keyword.  This is
-necessary because the "creation time" of a PNG image is somewhat vague,
-depending on whether you mean the PNG file, the time the image was
-created in a non-PNG format, a still photo from which the image was
-scanned, or possibly the subject matter itself.  In order to facilitate
-machine-readable dates, it is recommended that the "Creation Time"
-tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
-although this isn't a requirement.  Unlike the tIME chunk, the
-"Creation Time" tEXt chunk is not expected to be automatically changed
-by the software.  To facilitate the use of RFC 1123 dates, a function
-png_convert_to_rfc1123(png_timep) is provided to convert from PNG
-time to an RFC 1123 format string.
-
-.SS Writing unknown chunks
-
-You can use the png_set_unknown_chunks function to queue up chunks
-for writing.  You give it a chunk name, raw data, and a size; that's
-all there is to it.  The chunks will be written by the next following
-png_write_info_before_PLTE, png_write_info, or png_write_end function.
-Any chunks previously read into the info structure's unknown-chunk
-list will also be written out in a sequence that satisfies the PNG
-specification's ordering rules.
-
-.SS The high-level write interface
-
-At this point there are two ways to proceed; through the high-level
-write interface, or through a sequence of low-level write operations.
-You can use the high-level interface if your image data is present
-in the info structure.  All defined output
-transformations are permitted, enabled by the following masks.
-
-    PNG_TRANSFORM_IDENTITY      No transformation
-    PNG_TRANSFORM_PACKING       Pack 1, 2 and 4-bit samples
-    PNG_TRANSFORM_PACKSWAP      Change order of packed
-                                pixels to LSB first
-    PNG_TRANSFORM_INVERT_MONO   Invert monochrome images
-    PNG_TRANSFORM_SHIFT         Normalize pixels to the
-                                sBIT depth
-    PNG_TRANSFORM_BGR           Flip RGB to BGR, RGBA
-                                to BGRA
-    PNG_TRANSFORM_SWAP_ALPHA    Flip RGBA to ARGB or GA
-                                to AG
-    PNG_TRANSFORM_INVERT_ALPHA  Change alpha from opacity
-                                to transparency
-    PNG_TRANSFORM_SWAP_ENDIAN   Byte-swap 16-bit samples
-    PNG_TRANSFORM_STRIP_FILLER  Strip out filler bytes.
-
-If you have valid image data in the info structure (you can use
-png_set_rows() to put image data in the info structure), simply do this:
-
-    png_write_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the logical OR of some set of
-transformation flags.  This call is equivalent to png_write_info(),
-followed the set of transformations indicated by the transform mask,
-then png_write_image(), and finally png_write_end().
-
-(The final parameter of this call is not yet used.  Someday it might point
-to transformation parameters required by some future output transform.)
-
-.SS The low-level write interface
-
-If you are going the low-level route instead, you are now ready to
-write all the file information up to the actual image data.  You do
-this with a call to png_write_info().
-
-    png_write_info(png_ptr, info_ptr);
-
-Note that there is one transformation you may need to do before
-png_write_info().  In PNG files, the alpha channel in an image is the
-level of opacity.  If your data is supplied as a level of
-transparency, you can invert the alpha channel before you write it, so
-that 0 is fully transparent and 255 (in 8-bit or paletted images) or
-65535 (in 16-bit images) is fully opaque, with
-
-    png_set_invert_alpha(png_ptr);
-
-This must appear before png_write_info() instead of later with the
-other transformations because in the case of paletted images the tRNS
-chunk data has to be inverted before the tRNS chunk is written.  If
-your image is not a paletted image, the tRNS data (which in such cases
-represents a single color to be rendered as transparent) won't need to
-be changed, and you can safely do this transformation after your
-png_write_info() call.
-
-If you need to write a private chunk that you want to appear before
-the PLTE chunk when PLTE is present, you can write the PNG info in
-two steps, and insert code to write your own chunk between them:
-
-    png_write_info_before_PLTE(png_ptr, info_ptr);
-    png_set_unknown_chunks(png_ptr, info_ptr, ...);
-    png_write_info(png_ptr, info_ptr);
-
-After you've written the file information, you can set up the library
-to handle any special transformations of the image data.  The various
-ways to transform the data will be described in the order that they
-should occur.  This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths.  Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data.  For example, don't swap red and blue on grayscale data.
-
-PNG files store RGB pixels packed into 3 or 6 bytes.  This code tells
-the library to strip input data that has 4 or 8 bytes per pixel down
-to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2
-bytes per pixel).
-
-    png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
-
-where the 0 is unused, and the location is either PNG_FILLER_BEFORE or
-PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel
-is stored XRGB or RGBX.
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit files.
-If the data is supplied at 1 pixel per byte, use this code, which will
-correctly pack the pixels into a single byte:
-
-    png_set_packing(png_ptr);
-
-PNG files reduce possible bit depths to 1, 2, 4, 8, and 16.  If your
-data is of another bit depth, you can write an sBIT chunk into the
-file so that decoders can recover the original data if desired.
-
-    /* Set the true bit depth of the image data */
-    if (color_type & PNG_COLOR_MASK_COLOR)
-    {
-        sig_bit.red = true_bit_depth;
-        sig_bit.green = true_bit_depth;
-        sig_bit.blue = true_bit_depth;
-    }
-    else
-    {
-        sig_bit.gray = true_bit_depth;
-    }
-    if (color_type & PNG_COLOR_MASK_ALPHA)
-    {
-        sig_bit.alpha = true_bit_depth;
-    }
-
-    png_set_sBIT(png_ptr, info_ptr, &sig_bit);
-
-If the data is stored in the row buffer in a bit depth other than
-one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG),
-this will scale the values to appear to be the correct bit depth as
-is required by PNG.
-
-    png_set_shift(png_ptr, &sig_bit);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first).  This code would be used if they are
-supplied the other way (little-endian, i.e. least significant bits
-first, the way PCs store them):
-
-    if (bit_depth > 8)
-       png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
-    if (bit_depth < 8)
-       png_set_packswap(png_ptr);
-
-PNG files store 3 color pixels in red, green, blue order.  This code
-would be used if they are supplied as blue, green, red:
-
-    png_set_bgr(png_ptr);
-
-PNG files describe monochrome as black being zero and white being
-one. This code would be used if the pixels are supplied with this reversed
-(black being one and white being zero):
-
-    png_set_invert_mono(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs.  This is done by setting a callback
-with
-
-    png_set_write_user_transform_fn(png_ptr,
-       write_transform_fn);
-
-You must supply the function
-
-    void write_transform_fn(png_ptr ptr, row_info_ptr
-       row_info, png_bytep data)
-
-See pngtest.c for a working example.  Your function will be called
-before any of the other transformations are processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function.
-
-    png_set_user_transform_info(png_ptr, user_ptr, 0, 0);
-
-The user_channels and user_depth parameters of this function are ignored
-when writing; you can set them to zero as shown.
-
-You can retrieve the pointer via the function png_get_user_transform_ptr().
-For example:
-
-    voidp write_user_transform_ptr =
-       png_get_user_transform_ptr(png_ptr);
-
-It is possible to have libpng flush any pending output, either manually,
-or automatically after a certain number of lines have been written.  To
-flush the output stream a single time call:
-
-    png_write_flush(png_ptr);
-
-and to have libpng flush the output stream periodically after a certain
-number of scanlines have been written, call:
-
-    png_set_flush(png_ptr, nrows);
-
-Note that the distance between rows is from the last time png_write_flush()
-was called, or the first row of the image if it has never been called.
-So if you write 50 lines, and then png_set_flush 25, it will flush the
-output on the next scanline, and every 25 lines thereafter, unless
-png_write_flush() is called before 25 more lines have been written.
-If nrows is too small (less than about 10 lines for a 640 pixel wide
-RGB image) the image compression may decrease noticeably (although this
-may be acceptable for real-time applications).  Infrequent flushing will
-only degrade the compression performance by a few percent over images
-that do not use flushing.
-
-.SS Writing the image data
-
-That's it for the transformations.  Now you can write the image data.
-The simplest way to do this is in one function call.  If you have the
-whole image in memory, you can just call png_write_image() and libpng
-will write the image.  You will need to pass in an array of pointers to
-each row.  This function automatically handles interlacing, so you don't
-need to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_write_rows().
-
-    png_write_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
-    png_byte *row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to write the whole image at once, you can
-use png_write_rows() instead.  If the file is not interlaced,
-this is simple:
-
-    png_write_rows(png_ptr, row_pointers,
-       number_of_rows);
-
-row_pointers is the same as in the png_write_image() call.
-
-If you are just writing one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
-    png_bytep row_pointer = row;
-
-    png_write_row(png_ptr, row_pointer);
-
-When the file is interlaced, things can get a good deal more
-complicated.  The only currently (as of the PNG Specification
-version 1.2, dated July 1999) defined interlacing scheme for PNG files
-is the "Adam7" interlace scheme, that breaks down an
-image into seven smaller images of varying size.  libpng will build
-these images for you, or you can do them yourself.  If you want to
-build them yourself, see the PNG specification for details of which
-pixels to write when.
-
-If you don't want libpng to handle the interlacing details, just
-use png_set_interlace_handling() and call png_write_rows() the
-correct number of times to write all seven sub-images.
-
-If you want libpng to build the sub-images, call this before you start
-writing any rows:
-
-    number_of_passes =
-       png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed.  Currently, this
-is seven, but may change if another interlace type is added.
-
-Then write the complete image number_of_passes times.
-
-    png_write_rows(png_ptr, row_pointers,
-       number_of_rows);
-
-As some of these rows are not used, and thus return immediately,
-you may want to read about interlacing in the PNG specification,
-and only update the rows that are actually used.
-
-.SS Finishing a sequential write
-
-After you are finished writing the image, you should finish writing
-the file.  If you are interested in writing comments or time, you should
-pass an appropriately filled png_info pointer.  If you are not interested,
-you can pass NULL.
-
-    png_write_end(png_ptr, info_ptr);
-
-When you are done, you can free all memory used by libpng like this:
-
-    png_destroy_write_struct(&png_ptr, &info_ptr);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
-    png_free_data(png_ptr, info_ptr, mask, seq)
-    mask  - identifies data to be freed, a mask
-            containing the logical OR of one or
-            more of
-              PNG_FREE_PLTE, PNG_FREE_TRNS,
-              PNG_FREE_HIST, PNG_FREE_ICCP,
-              PNG_FREE_PCAL, PNG_FREE_ROWS,
-              PNG_FREE_SCAL, PNG_FREE_SPLT,
-              PNG_FREE_TEXT, PNG_FREE_UNKN,
-            or simply PNG_FREE_ALL
-    seq   - sequence number of item to be freed
-            (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user  and not by libpng,  and will in those
-cases do nothing.  The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed.  If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-If you allocated data such as a palette that you passed
-in to libpng with png_set_*, you must not free it until just before the call to
-png_destroy_write_struct().
-
-The default behavior is only to free data that was allocated internally
-by libpng.  This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
-    png_data_freer(png_ptr, info_ptr, freer, mask)
-    mask   - which data elements are affected
-             same choices as in png_free_data()
-    freer  - one of
-               PNG_DESTROY_WILL_FREE_DATA
-               PNG_SET_WILL_FREE_DATA
-               PNG_USER_WILL_FREE_DATA
-
-For example, to transfer responsibility for some data from a read structure
-to a write structure, you could use
-
-    png_data_freer(read_ptr, read_info_ptr,
-       PNG_USER_WILL_FREE_DATA,
-       PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
-    png_data_freer(write_ptr, write_info_ptr,
-       PNG_DESTROY_WILL_FREE_DATA,
-       PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
-
-thereby briefly reassigning responsibility for freeing to the user but
-immediately afterwards reassigning it once more to the write_destroy
-function.  Having done this, it would then be safe to destroy the read
-structure and continue to use the PLTE, tRNS, and hIST data in the write
-structure.
-
-This function only affects data that has already been allocated.
-You can call this function before calling after the png_set_*() functions
-to control whether the user or png_destroy_*() is supposed to free the data.
-When the user assumes responsibility for libpng-allocated data, the
-application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key.  Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-For a more compact example of writing a PNG image, see the file example.c.
-
-.SH V. Modifying/Customizing libpng:
-
-There are three issues here.  The first is changing how libpng does
-standard things like memory allocation, input/output, and error handling.
-The second deals with more complicated things like adding new chunks,
-adding new transformations, and generally changing how libpng works.
-Both of those are compile-time issues; that is, they are generally
-determined at the time the code is written, and there is rarely a need
-to provide the user with a means of changing them.  The third is a
-run-time issue:  choosing between and/or tuning one or more alternate
-versions of computationally intensive routines; specifically, optimized
-assembly-language (and therefore compiler- and platform-dependent)
-versions.
-
-Memory allocation, input/output, and error handling
-
-All of the memory allocation, input/output, and error handling in libpng
-goes through callbacks that are user-settable.  The default routines are
-in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively.  To change
-these functions, call the appropriate png_set_*_fn() function.
-
-Memory allocation is done through the functions png_malloc()
-and png_free().  These currently just call the standard C functions.  If
-your pointers can't access more then 64K at a time, you will want to set
-MAXSEG_64K in zlib.h.  Since it is unlikely that the method of handling
-memory allocation on a platform will change between applications, these
-functions must be modified in the library at compile time.  If you prefer
-to use a different method of allocating and freeing data, you can use
-png_create_read_struct_2() or png_create_write_struct_2() to register
-your own functions as described above.
-These functions also provide a void pointer that can be retrieved via
-
-    mem_ptr=png_get_mem_ptr(png_ptr);
-
-Your replacement memory functions must have prototypes as follows:
-
-    png_voidp malloc_fn(png_structp png_ptr,
-       png_size_t size);
-    void free_fn(png_structp png_ptr, png_voidp ptr);
-
-Your malloc_fn() must return NULL in case of failure.  The png_malloc()
-function will normally call png_error() if it receives a NULL from the
-system memory allocator or from your replacement malloc_fn().
-
-Input/Output in libpng is done through png_read() and png_write(),
-which currently just call fread() and fwrite().  The FILE * is stored in
-png_struct and is initialized via png_init_io().  If you wish to change
-the method of I/O, the library supplies callbacks that you can set
-through the function png_set_read_fn() and png_set_write_fn() at run
-time, instead of calling the png_init_io() function.  These functions
-also provide a void pointer that can be retrieved via the function
-png_get_io_ptr().  For example:
-
-    png_set_read_fn(png_structp read_ptr,
-        voidp read_io_ptr, png_rw_ptr read_data_fn)
-
-    png_set_write_fn(png_structp write_ptr,
-        voidp write_io_ptr, png_rw_ptr write_data_fn,
-        png_flush_ptr output_flush_fn);
-
-    voidp read_io_ptr = png_get_io_ptr(read_ptr);
-    voidp write_io_ptr = png_get_io_ptr(write_ptr);
-
-The replacement I/O functions must have prototypes as follows:
-
-    void user_read_data(png_structp png_ptr,
-        png_bytep data, png_size_t length);
-    void user_write_data(png_structp png_ptr,
-        png_bytep data, png_size_t length);
-    void user_flush_data(png_structp png_ptr);
-
-Supplying NULL for the read, write, or flush functions sets them back
-to using the default C stream functions.  It is an error to read from
-a write stream, and vice versa.
-
-Error handling in libpng is done through png_error() and png_warning().
-Errors handled through png_error() are fatal, meaning that png_error()
-should never return to its caller.  Currently, this is handled via
-setjmp() and longjmp() (unless you have compiled libpng with
-PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
-but you could change this to do things like exit() if you should wish.
-
-On non-fatal errors, png_warning() is called
-to print a warning message, and then control returns to the calling code.
-By default png_error() and png_warning() print a message on stderr via
-fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined
-(because you don't want the messages) or PNG_NO_STDIO defined (because
-fprintf() isn't available).  If you wish to change the behavior of the error
-functions, you will need to set up your own message callbacks.  These
-functions are normally supplied at the time that the png_struct is created.
-It is also possible to redirect errors and warnings to your own replacement
-functions after png_create_*_struct() has been called by calling:
-
-    png_set_error_fn(png_structp png_ptr,
-        png_voidp error_ptr, png_error_ptr error_fn,
-        png_error_ptr warning_fn);
-
-    png_voidp error_ptr = png_get_error_ptr(png_ptr);
-
-If NULL is supplied for either error_fn or warning_fn, then the libpng
-default function will be used, calling fprintf() and/or longjmp() if a
-problem is encountered.  The replacement error functions should have
-parameters as follows:
-
-    void user_error_fn(png_structp png_ptr,
-        png_const_charp error_msg);
-    void user_warning_fn(png_structp png_ptr,
-        png_const_charp warning_msg);
-
-The motivation behind using setjmp() and longjmp() is the C++ throw and
-catch exception handling methods.  This makes the code much easier to write,
-as there is no need to check every return code of every function call.
-However, there are some uncertainties about the status of local variables
-after a longjmp, so the user may want to be careful about doing anything after
-setjmp returns non-zero besides returning itself.  Consult your compiler
-documentation for more details.  For an alternative approach, you may wish
-to use the "cexcept" facility (see http://cexcept.sourceforge.net).
-
-.SS Custom chunks
-
-If you need to read or write custom chunks, you may need to get deeper
-into the libpng code.  The library now has mechanisms for storing
-and writing chunks of unknown type; you can even declare callbacks
-for custom chunks.  Hoewver, this may not be good enough if the
-library code itself needs to know about interactions between your
-chunk and existing `intrinsic' chunks.
-
-If you need to write a new intrinsic chunk, first read the PNG
-specification. Acquire a first level of
-understanding of how it works.  Pay particular attention to the
-sections that describe chunk names, and look at how other chunks were
-designed, so you can do things similarly.  Second, check out the
-sections of libpng that read and write chunks.  Try to find a chunk
-that is similar to yours and use it as a template.  More details can
-be found in the comments inside the code.  It is best to handle unknown
-chunks in a generic method, via callback functions, instead of by
-modifying libpng functions.
-
-If you wish to write your own transformation for the data, look through
-the part of the code that does the transformations, and check out some of
-the simpler ones to get an idea of how they work.  Try to find a similar
-transformation to the one you want to add and copy off of it.  More details
-can be found in the comments inside the code itself.
-
-.SS Configuring for 16 bit platforms
-
-You will want to look into zconf.h to tell zlib (and thus libpng) that
-it cannot allocate more then 64K at a time.  Even if you can, the memory
-won't be accessible.  So limit zlib and libpng to 64K by defining MAXSEG_64K.
-
-.SS Configuring for DOS
-
-For DOS users who only have access to the lower 640K, you will
-have to limit zlib's memory usage via a png_set_compression_mem_level()
-call.  See zlib.h or zconf.h in the zlib library for more information.
-
-.SS Configuring for Medium Model
-
-Libpng's support for medium model has been tested on most of the popular
-compilers.  Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
-defined, and FAR gets defined to far in pngconf.h, and you should be
-all set.  Everything in the library (except for zlib's structure) is
-expecting far data.  You must use the typedefs with the p or pp on
-the end for pointers (or at least look at them and be careful).  Make
-note that the rows of data are defined as png_bytepp, which is an
-unsigned char far * far *.
-
-.SS Configuring for gui/windowing platforms:
-
-You will need to write new error and warning functions that use the GUI
-interface, as described previously, and set them to be the error and
-warning functions at the time that png_create_*_struct() is called,
-in order to have them available during the structure initialization.
-They can be changed later via png_set_error_fn().  On some compilers,
-you may also have to change the memory allocators (png_malloc, etc.).
-
-.SS Configuring for compiler xxx:
-
-All includes for libpng are in pngconf.h.  If you need to add/change/delete
-an include, this is the place to do it.  The includes that are not
-needed outside libpng are protected by the PNG_INTERNAL definition,
-which is only defined for those routines inside libpng itself.  The
-files in libpng proper only include png.h, which includes pngconf.h.
-
-.SS Configuring zlib:
-
-There are special functions to configure the compression.  Perhaps the
-most useful one changes the compression level, which currently uses
-input compression values in the range 0 - 9.  The library normally
-uses the default compression level (Z_DEFAULT_COMPRESSION = 6).  Tests
-have shown that for a large majority of images, compression values in
-the range 3-6 compress nearly as well as higher levels, and do so much
-faster.  For online applications it may be desirable to have maximum speed
-(Z_BEST_SPEED = 1).  With versions of zlib after v0.99, you can also
-specify no compression (Z_NO_COMPRESSION = 0), but this would create
-files larger than just storing the raw bitmap.  You can specify the
-compression level by calling:
-
-    png_set_compression_level(png_ptr, level);
-
-Another useful one is to reduce the memory level used by the library.
-The memory level defaults to 8, but it can be lowered if you are
-short on memory (running DOS, for example, where you only have 640K).
-Note that the memory level does have an effect on compression; among
-other things, lower levels will result in sections of incompressible
-data being emitted in smaller stored blocks, with a correspondingly
-larger relative overhead of up to 15% in the worst case.
-
-    png_set_compression_mem_level(png_ptr, level);
-
-The other functions are for configuring zlib.  They are not recommended
-for normal use and may result in writing an invalid PNG file.  See
-zlib.h for more information on what these mean.
-
-    png_set_compression_strategy(png_ptr,
-        strategy);
-    png_set_compression_window_bits(png_ptr,
-        window_bits);
-    png_set_compression_method(png_ptr, method);
-    png_set_compression_buffer_size(png_ptr, size);
-
-.SS Controlling row filtering
-
-If you want to control whether libpng uses filtering or not, which
-filters are used, and how it goes about picking row filters, you
-can call one of these functions.  The selection and configuration
-of row filters can have a significant impact on the size and
-encoding speed and a somewhat lesser impact on the decoding speed
-of an image.  Filtering is enabled by default for RGB and grayscale
-images (with and without alpha), but not for paletted images nor
-for any images with bit depths less than 8 bits/pixel.
-
-The 'method' parameter sets the main filtering method, which is
-currently only '0' in the PNG 1.2 specification.  The 'filters'
-parameter sets which filter(s), if any, should be used for each
-scanline.  Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
-to turn filtering on and off, respectively.
-
-Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
-PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
-ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification.
-If you intend to change the filter type during the course of writing
-the image, you should start with flags set for all of the filters
-you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types.  (Note that this
-means the first row must always be adaptively filtered, because libpng
-currently does not allocate the filter buffers until png_write_row()
-is called for the first time.)
-
-    filters = PNG_FILTER_NONE | PNG_FILTER_SUB
-              PNG_FILTER_UP | PNG_FILTER_AVE |
-              PNG_FILTER_PAETH | PNG_ALL_FILTERS;
-
-    png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
-       filters);
-              The second parameter can also be
-              PNG_INTRAPIXEL_DIFFERENCING if you are
-              writing a PNG to be embedded in a MNG
-              datastream.  This parameter must be the
-              same as the value of filter_method used
-              in png_set_IHDR().
-
-It is also possible to influence how libpng chooses from among the
-available filters.  This is done in one or both of two ways - by
-telling it how important it is to keep the same filter for successive
-rows, and by telling it the relative computational costs of the filters.
-
-    double weights[3] = {1.5, 1.3, 1.1},
-       costs[PNG_FILTER_VALUE_LAST] =
-       {1.0, 1.3, 1.3, 1.5, 1.7};
-
-    png_set_filter_heuristics(png_ptr,
-       PNG_FILTER_HEURISTIC_WEIGHTED, 3,
-       weights, costs);
-
-The weights are multiplying factors that indicate to libpng that the
-row filter should be the same for successive rows unless another row filter
-is that many times better than the previous filter.  In the above example,
-if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a
-"sum of absolute differences" 1.5 x 1.3 times higher than other filters
-and still be chosen, while the NONE filter could have a sum 1.1 times
-higher than other filters and still be chosen.  Unspecified weights are
-taken to be 1.0, and the specified weights should probably be declining
-like those above in order to emphasize recent filters over older filters.
-
-The filter costs specify for each filter type a relative decoding cost
-to be considered when selecting row filters.  This means that filters
-with higher costs are less likely to be chosen over filters with lower
-costs, unless their "sum of absolute differences" is that much smaller.
-The costs do not necessarily reflect the exact computational speeds of
-the various filters, since this would unduly influence the final image
-size.
-
-Note that the numbers above were invented purely for this example and
-are given only to help explain the function usage.  Little testing has
-been done to find optimum values for either the costs or the weights.
-
-.SS Removing unwanted object code
-
-There are a bunch of #define's in pngconf.h that control what parts of
-libpng are compiled.  All the defines end in _SUPPORTED.  If you are
-never going to use a capability, you can change the #define to #undef
-before recompiling libpng and save yourself code and data space, or
-you can turn off individual capabilities with defines that begin with
-PNG_NO_.
-
-You can also turn all of the transforms and ancillary chunk capabilities
-off en masse with compiler directives that define
-PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
-or all four,
-along with directives to turn on any of the capabilities that you do
-want.  The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable
-the extra transformations but still leave the library fully capable of reading
-and writing PNG files with all known public chunks
-Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive
-produces a library that is incapable of reading or writing ancillary chunks.
-If you are not using the progressive reading capability, you can
-turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse
-this with the INTERLACING capability, which you'll still have).
-
-All the reading and writing specific code are in separate files, so the
-linker should only grab the files it needs.  However, if you want to
-make sure, or if you are building a stand alone library, all the
-reading files start with pngr and all the writing files start with
-pngw.  The files that don't match either (like png.c, pngtrans.c, etc.)
-are used for both reading and writing, and always need to be included.
-The progressive reader is in pngpread.c
-
-If you are creating or distributing a dynamically linked library (a .so
-or DLL file), you should not remove or disable any parts of the library,
-as this will cause applications linked with different versions of the
-library to fail if they call functions not available in your library.
-The size of the library itself should not be an issue, because only
-those sections that are actually used will be loaded into memory.
-
-.SS Requesting debug printout
-
-The macro definition PNG_DEBUG can be used to request debugging
-printout.  Set it to an integer value in the range 0 to 3.  Higher
-numbers result in increasing amounts of debugging information.  The
-information is printed to the "stderr" file, unless another file
-name is specified in the PNG_DEBUG_FILE macro definition.
-
-When PNG_DEBUG > 0, the following functions (macros) become available:
-
-   png_debug(level, message)
-   png_debug1(level, message, p1)
-   png_debug2(level, message, p1, p2)
-
-in which "level" is compared to PNG_DEBUG to decide whether to print
-the message, "message" is the formatted string to be printed,
-and p1 and p2 are parameters that are to be embedded in the string
-according to printf-style formatting directives.  For example,
-
-   png_debug1(2, "foo=%d\n", foo);
-
-is expanded to
-
-   if(PNG_DEBUG > 2)
-     fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
-
-When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
-can still use PNG_DEBUG to control your own debugging:
-
-   #ifdef PNG_DEBUG
-       fprintf(stderr, ...
-   #endif
-
-When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
-having level = 0 will be printed.  There aren't any such statements in
-this version of libpng, but if you insert some they will be printed.
-
-%-%.SH VI.  Runtime optimization
-%-%
-%-%A new feature in libpng 1.2.0 is the ability to dynamically switch between
-%-%standard and optimized versions of some routines.  Currently these are
-%-%limited to three computationally intensive tasks when reading PNG files:
-%-%decoding row filters, expanding interlacing, and combining interlaced or
-%-%transparent row data with previous row data.  Currently the optimized
-%-%versions are available only for x86 (Intel, AMD, etc.) platforms with
-%-%MMX support, though this may change in future versions.  (For example,
-%-%the non-MMX assembler optimizations for zlib might become similarly
-%-%runtime-selectable in future releases, in which case libpng could be
-%-%extended to support them.  Alternatively, the compile-time choice of
-%-%floating-point versus integer routines for gamma correction might become
-%-%runtime-selectable.)
-%-%
-%-%Because such optimizations tend to be very platform- and compiler-dependent,
-%-%both in how they are written and in how they perform, the new runtime code
-%-%in libpng has been written to allow programs to query, enable, and disable
-%-%either specific optimizations or all such optimizations.  For example, to
-%-%enable all possible optimizations (bearing in mind that some "optimizations"
-%-%may actually run more slowly in rare cases):
-%-%
-%-%    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-%-%       png_uint_32 mask, flags;
-%-%
-%-%       flags = png_get_asm_flags(png_ptr);
-%-%       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-%-%       png_set_asm_flags(png_ptr, flags | mask);
-%-%    #endif
-%-%
-%-%To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
-%-%by itself when calling png_get_asm_flagmask(); similarly for optimizing
-%-%only writing.  To disable all optimizations:
-%-%
-%-%    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-%-%       flags = png_get_asm_flags(png_ptr);
-%-%       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-%-%       png_set_asm_flags(png_ptr, flags & ~mask);
-%-%    #endif
-%-%
-%-%To enable or disable only MMX-related features, use png_get_mmx_flagmask()
-%-%in place of png_get_asm_flagmask().  The mmx version takes one additional
-%-%parameter:
-%-%
-%-%    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-%-%       int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
-%-%       int compilerID;
-%-%
-%-%       mask = png_get_mmx_flagmask(selection, &compilerID);
-%-%    #endif
-%-%
-%-%On return, compilerID will indicate which version of the MMX assembler
-%-%optimizations was compiled.  Currently two flavors exist:  Microsoft
-%-%Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
-%-%On non-x86 platforms or on systems compiled without MMX optimizations, a
-%-%value of -1 is used.
-%-%
-%-%Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
-%-%all valid, settable optimization bits for the version of the library that's
-%-%currently in use.  In the case of shared (dynamically linked) libraries,
-%-%this may include optimizations that did not exist at the time the code was
-%-%written and compiled.  It is also possible, of course, to enable only known,
-%-%specific optimizations; for example:
-%-%
-%-%    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-%-%       flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-%-%             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-%-%             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-%-%             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-%-%             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-%-%             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-%-%       png_set_asm_flags(png_ptr, flags);
-%-%    #endif
-%-%
-%-%This method would enable only the MMX read-optimizations available at the
-%-%time of libpng 1.2.0's release, regardless of whether a later version of
-%-%the DLL were actually being used.  (Also note that these functions did not
-%-%exist in versions older than 1.2.0, so any attempt to run a dynamically
-%-%linked app on such an older version would fail.)
-%-%
-%-%To determine whether the processor supports MMX instructions at all, use
-%-%the png_mmx_support() function:
-%-%
-%-%    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-%-%       mmxsupport = png_mmx_support();
-%-%    #endif
-%-%
-%-%It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
-%-%is compiled but MMX is not supported by the processor, or 1 if MMX support
-%-%is fully available.  Note that png_mmx_support(), png_get_mmx_flagmask(),
-%-%and png_get_asm_flagmask() all may be called without allocating and ini-
-%-%tializing any PNG structures (for example, as part of a usage screen or
-%-%"about" box).
-%-%
-%-%The following code can be used to prevent an application from using the
-%-%thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK
-%-%defined:
-%-%
-%-%#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
-%-%  && defined(PNG_THREAD_UNSAFE_OK)
-%-%    /* Disable thread-unsafe features of pnggccrd */
-%-%    if (png_access_version() >= 10200)
-%-%    {
-%-%      png_uint_32 mmx_disable_mask = 0;
-%-%      png_uint_32 asm_flags;
-%-%
-%-%      mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-%-%                          | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-%-%                          | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-%-%                          | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-%-%      asm_flags = png_get_asm_flags(png_ptr);
-%-%      png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
-%-%    }
-%-%#endif
-%-%
-%-%For more extensive examples of runtime querying, enabling and disabling
-%-%of optimized features, see contrib/gregbook/readpng2.c in the libpng
-%-%source-code distribution.
-%-%
-.SH VI.  MNG support
-
-The MNG specification (available at http://www.libpng.org/pub/mng) allows
-certain extensions to PNG for PNG images that are embedded in MNG datastreams.
-Libpng can support some of these extensions.  To enable them, use the
-png_permit_mng_features() function:
-
-   feature_set = png_permit_mng_features(png_ptr, mask)
-   mask is a png_uint_32 containing the logical OR of the
-        features you want to enable.  These include
-        PNG_FLAG_MNG_EMPTY_PLTE
-        PNG_FLAG_MNG_FILTER_64
-        PNG_ALL_MNG_FEATURES
-   feature_set is a png_uint_32 that is the logical AND of
-      your mask with the set of MNG features that is
-      supported by the version of libpng that you are using.
-
-It is an error to use this function when reading or writing a standalone
-PNG file with the PNG 8-byte signature.  The PNG datastream must be wrapped
-in a MNG datastream.  As a minimum, it must have the MNG 8-byte signature
-and the MHDR and MEND chunks.  Libpng does not provide support for these
-or any other MNG chunks; your application must provide its own support for
-them.  You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
-
-.SH VII.  Changes to Libpng from version 0.88
-
-It should be noted that versions of libpng later than 0.96 are not
-distributed by the original libpng author, Guy Schalnat, nor by
-Andreas Dilger, who had taken over from Guy during 1996 and 1997, and
-distributed versions 0.89 through 0.96, but rather by another member
-of the original PNG Group, Glenn Randers-Pehrson.  Guy and Andreas are
-still alive and well, but they have moved on to other things.
-
-The old libpng functions png_read_init(), png_write_init(),
-png_info_init(), png_read_destroy(), and png_write_destroy() have been
-moved to PNG_INTERNAL in version 0.95 to discourage their use.  These
-functions will be removed from libpng version 2.0.0.
-
-The preferred method of creating and initializing the libpng structures is
-via the png_create_read_struct(), png_create_write_struct(), and
-png_create_info_struct() because they isolate the size of the structures
-from the application, allow version error checking, and also allow the
-use of custom error handling routines during the initialization, which
-the old functions do not.  The functions png_read_destroy() and
-png_write_destroy() do not actually free the memory that libpng
-allocated for these structs, but just reset the data structures, so they
-can be used instead of png_destroy_read_struct() and
-png_destroy_write_struct() if you feel there is too much system overhead
-allocating and freeing the png_struct for each image read.
-
-Setting the error callbacks via png_set_message_fn() before
-png_read_init() as was suggested in libpng-0.88 is no longer supported
-because this caused applications that do not use custom error functions
-to fail if the png_ptr was not initialized to zero.  It is still possible
-to set the error callbacks AFTER png_read_init(), or to change them with
-png_set_error_fn(), which is essentially the same function, but with a new
-name to force compilation errors with applications that try to use the old
-method.
-
-Starting with version 1.0.7, you can find out which version of the library
-you are using at run-time:
-
-   png_uint_32 libpng_vn = png_access_version_number();
-
-The number libpng_vn is constructed from the major version, minor
-version with leading zero, and release number with leading zero,
-(e.g., libpng_vn for version 1.0.7 is 10007).
-
-You can also check which version of png.h you used when compiling your
-application:
-
-   png_uint_32 application_vn = PNG_LIBPNG_VER;
-
-.SH VII. Y2K Compliance in libpng
-
-August 10, 2004
-
-Since the PNG Development group is an ad-hoc body, we can't make
-an official declaration.
-
-This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.6rc5 are Y2K compliant.  It is my belief that earlier
-versions were also Y2K compliant.
-
-Libpng only has three year fields.  One is a 2-byte unsigned integer that
-will hold years up to 65535.  The other two hold the date in text
-format, and will hold years up to 9999.
-
-The integer is
-    "png_uint_16 year" in png_time_struct.
-
-The strings are
-    "png_charp time_buffer" in png_struct and
-    "near_time_buffer", which is a local character string in png.c.
-
-There are seven time-related functions:
-
-    png_convert_to_rfc_1123() in png.c
-      (formerly png_convert_to_rfc_1152() in error)
-    png_convert_from_struct_tm() in pngwrite.c, called
-      in pngwrite.c
-    png_convert_from_time_t() in pngwrite.c
-    png_get_tIME() in pngget.c
-    png_handle_tIME() in pngrutil.c, called in pngread.c
-    png_set_tIME() in pngset.c
-    png_write_tIME() in pngwutil.c, called in pngwrite.c
-
-All appear to handle dates properly in a Y2K environment.  The
-png_convert_from_time_t() function calls gmtime() to convert from system
-clock time, which returns (year - 1900), which we properly convert to
-the full 4-digit year.  There is a possibility that applications using
-libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
-function, or that they are incorrectly passing only a 2-digit year
-instead of "year - 1900" into the png_convert_from_struct_tm() function,
-but this is not under our control.  The libpng documentation has always
-stated that it works with 4-digit years, and the APIs have been
-documented as such.
-
-The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
-integer to hold the year, and can hold years as large as 65535.
-
-zlib, upon which libpng depends, is also Y2K compliant.  It contains
-no date-related code.
-
-
-   Glenn Randers-Pehrson
-   libpng maintainer
-   PNG Development Group
-
-.SH NOTE
-
-Note about libpng version numbers:
-
-Due to various miscommunications, unforeseen code incompatibilities
-and occasional factors outside the authors' control, version numbering
-on the library has not always been consistent and straightforward.
-The following table summarizes matters since version 0.89c, which was
-the first widely used release:
-
- source             png.h  png.h  shared-lib
- version            string   int  version
- -------            ------  ----- ----------
- 0.89c ("beta 3")  0.89       89  1.0.89
- 0.90  ("beta 4")  0.90       90  0.90
- 0.95  ("beta 5")  0.95       95  0.95
- 0.96  ("beta 6")  0.96       96  0.96
- 0.97b ("beta 7")  1.00.97    97  1.0.1
- 0.97c             0.97       97  2.0.97
- 0.98              0.98       98  2.0.98
- 0.99              0.99       98  2.0.99
- 0.99a-m           0.99       99  2.0.99
- 1.00              1.00      100  2.1.0
- 1.0.0             1.0.0     100  2.1.0
- 1.0.0   (from here on, the  100  2.1.0
- 1.0.1    png.h string is  10001  2.1.0
- 1.0.1a-e identical to the 10002  from here on, the
- 1.0.2    source version)  10002  shared library is 2.V
- 1.0.2a-b                  10003  where V is the source
- 1.0.1                     10001  code version except as
- 1.0.1a-e                  10002  2.1.0.1a-e   noted.
- 1.0.2                     10002  2.1.0.2
- 1.0.2a-b                  10003  2.1.0.2a-b
- 1.0.3                     10003  2.1.0.3
- 1.0.3a-d                  10004  2.1.0.3a-d
- 1.0.4                     10004  2.1.0.4
- 1.0.4a-f                  10005  2.1.0.4a-f
- 1.0.5 (+ 2 patches)       10005  2.1.0.5
- 1.0.5a-d                  10006  2.1.0.5a-d
- 1.0.5e-r                  10100  2.1.0.5e-r
- 1.0.5s-v                  10006  2.1.0.5s-v
- 1.0.6 (+ 3 patches)       10006  2.1.0.6
- 1.0.6d-g                  10007  2.1.0.6d-g
- 1.0.6h                    10007  10.6h
- 1.0.6i                    10007  10.6i
- 1.0.6j                    10007  2.1.0.6j
- 1.0.7beta11-14    DLLNUM  10007  2.1.0.7beta11-14
- 1.0.7beta15-18       1    10007  2.1.0.7beta15-18
- 1.0.7rc1-2           1    10007  2.1.0.7rc1-2
- 1.0.7                1    10007  2.1.0.7
- 1.0.8beta1-4         1    10008  2.1.0.8beta1-4
- 1.0.8rc1             1    10008  2.1.0.8rc1
- 1.0.8                1    10008  2.1.0.8
- 1.0.9beta1-6         1    10009  2.1.0.9beta1-6
- 1.0.9rc1             1    10009  2.1.0.9rc1
- 1.0.9beta7-10        1    10009  2.1.0.9beta7-10
- 1.0.9rc2             1    10009  2.1.0.9rc2
- 1.0.9                1    10009  2.1.0.9
- 1.0.10beta1          1    10010  2.1.0.10beta1
- 1.0.10rc1            1    10010  2.1.0.10rc1
- 1.0.10               1    10010  2.1.0.10
- 1.0.11beta1-3        1    10011  2.1.0.11beta1-3
- 1.0.11rc1            1    10011  2.1.0.11rc1
- 1.0.11               1    10011  2.1.0.11
- 1.0.12beta1-2        2    10012  2.1.0.12beta1-2
- 1.0.12rc1            2    10012  2.1.0.12rc1
- 1.0.12               2    10012  2.1.0.12
- 1.1.0a-f             -    10100  2.1.1.0a-f abandoned
- 1.2.0beta1-2         2    10200  2.1.2.0beta1-2
- 1.2.0beta3-5         3    10200  3.1.2.0beta3-5
- 1.2.0rc1             3    10200  3.1.2.0rc1
- 1.2.0                3    10200  3.1.2.0
- 1.2.1beta-4          3    10201  3.1.2.1beta1-4
- 1.2.1rc1-2           3    10201  3.1.2.1rc1-2
- 1.2.1                3    10201  3.1.2.1
- 1.2.2beta1-6        12    10202  12.so.0.1.2.2beta1-6
- 1.0.13beta1         10    10013  10.so.0.1.0.13beta1
- 1.0.13rc1           10    10013  10.so.0.1.0.13rc1
- 1.2.2rc1            12    10202  12.so.0.1.2.2rc1
- 1.0.13              10    10013  10.so.0.1.0.13
- 1.2.2               12    10202  12.so.0.1.2.2
- 1.2.3rc1-6          12    10203  12.so.0.1.2.3rc1-6
- 1.2.3               12    10203  12.so.0.1.2.3
- 1.2.4beta1-3        13    10204  12.so.0.1.2.4beta1-3
- 1.2.4rc1            13    10204  12.so.0.1.2.4rc1
- 1.0.14              10    10014  10.so.0.1.0.14
- 1.2.4               13    10204  12.so.0.1.2.4
- 1.2.5beta1-2        13    10205  12.so.0.1.2.5beta1-2
- 1.0.15rc1           10    10015  10.so.0.1.0.15rc1
- 1.0.15              10    10015  10.so.0.1.0.15
- 1.2.5               13    10205  12.so.0.1.2.5
- 1.2.6beta1-4        13    10206  12.so.0.1.2.6beta1-4
- 1.0.16rc1-3         10    10016  10.so.0.1.0.16rc1-3
- 1.2.6rc1-3          13    10206  12.so.0.1.2.6rc1-3
-
-Henceforth the source version will match the shared-library minor
-and patch numbers; the shared-library major version number will be
-used for changes in backward compatibility, as it is intended.  The
-PNG_PNGLIB_VER macro, which is not used within libpng but is available
-for applications, is an unsigned integer of the form xyyzz corresponding
-to the source version x.y.z (leading zeros in y and z).  Beta versions
-were given the previous public release number plus a letter, until
-version 1.0.6j; from then on they were given the upcoming public
-release number plus "betaNN" or "rcN".
-
-.SH "SEE ALSO"
-libpngpf(3), png(5)
-.LP
-.IR libpng :
-.IP
-ftp://ftp.uu.net/graphics/png
-http://www.libpng.org/pub/png
-
-.LP
-.IR zlib :
-.IP
-(generally) at the same location as
-.I libpng
-or at
-.br
-ftp://ftp.uu.net/pub/archiving/zip/zlib
-.br
-ftp://ftp.info-zip.org/pub/infozip/zlib
-
-.LP
-.IR PNG specification: RFC 2083
-.IP
-(generally) at the same location as
-.I libpng
-or at
-.br
-ftp://ds.internic.net/rfc/rfc2083.txt
-.br
-or (as a W3C Recommendation) at
-.br
-http://www.w3.org/TR/REC-png.html
-
-.LP
-In the case of any inconsistency between the PNG specification
-and this library, the specification takes precedence.
-
-.SH AUTHORS
-This man page: Glenn Randers-Pehrson
-<glennrp at users.sourceforge.net>
-
-The contributing authors would like to thank all those who helped
-with testing, bug fixes, and patience.  This wouldn't have been
-possible without all of you.
-
-Thanks to Frank J. T. Wojcik for helping with the documentation.
-
-Libpng version 1.2.6rc5 - August 10, 2004:
-Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
-Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
-
-Supported by the PNG development group
-.br
-(png-implement at ccrc.wustl.edu).
-
-.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-(This copy of the libpng notices is provided for your convenience.  In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.)
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-libpng version 1.2.6, August 10, 2004, is
-Copyright (c) 2004 Glenn Randers-Pehrson, and is
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
-   Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
-
-   Simon-Pierre Cadieux
-   Eric S. Raymond
-   Gilles Vollant
-
-and with the following additions to the disclaimer:
-
-   There is no warranty against interference with your
-   enjoyment of the library or against infringement.
-   There is no warranty that our efforts or the library
-   will fulfill any of your particular purposes or needs.
-   This library is provided with all faults, and the entire
-   risk of satisfactory quality, performance, accuracy, and
-   effort is with the user.
-
-libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson
-Distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
-
-   Tom Lane
-   Glenn Randers-Pehrson
-   Willem van Schaik
-
-libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
-
-   John Bowler
-   Kevin Bracey
-   Sam Bushell
-   Magnus Holmgren
-   Greg Roelofs
-   Tom Tanner
-
-libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
-
-For the purposes of this copyright and license, "Contributing Authors"
-is defined as the following set of individuals:
-
-   Andreas Dilger
-   Dave Martindale
-   Guy Eric Schalnat
-   Paul Schmidt
-   Tim Wegner
-
-The PNG Reference Library is supplied "AS IS".  The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose.  The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-source code, or portions hereof, for any purpose, without fee, subject
-to the following restrictions:
-
-1. The origin of this source code must not be misrepresented.
-
-2. Altered versions must be plainly marked as such and
-   must not be misrepresented as being the original source.
-
-3. This Copyright notice may not be removed or altered from
-   any source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products.  If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
-   printf("%s",png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-
-Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
-
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-August 10, 2004
-
-.\" end of man page
-
diff --git a/tkimg1.3/libpng/libpng.txt b/tkimg1.3/libpng/libpng.txt
deleted file mode 100644
index 449d4ee..0000000
--- a/tkimg1.3/libpng/libpng.txt
+++ /dev/null
@@ -1,2939 +0,0 @@
-libpng.txt - A description on how to use and modify libpng
-
- libpng version 1.2.6rc5 - August 10, 2004
- Updated and distributed by Glenn Randers-Pehrson
- <glennrp at users.sourceforge.net>
- Copyright (c) 1998-2004 Glenn Randers-Pehrson
- For conditions of distribution and use, see copyright
- notice in png.h.
-
- based on:
-
- libpng 1.0 beta 6  version 0.96 May 28, 1997
- Updated and distributed by Andreas Dilger
- Copyright (c) 1996, 1997 Andreas Dilger
-
- libpng 1.0 beta 2 - version 0.88  January 26, 1996
- For conditions of distribution and use, see copyright
- notice in png.h. Copyright (c) 1995, 1996 Guy Eric
- Schalnat, Group 42, Inc.
-
- Updated/rewritten per request in the libpng FAQ
- Copyright (c) 1995, 1996 Frank J. T. Wojcik
- December 18, 1995 & January 20, 1996
-
-I. Introduction
-
-This file describes how to use and modify the PNG reference library
-(known as libpng) for your own use.  There are five sections to this
-file: introduction, structures, reading, writing, and modification and
-configuration notes for various special platforms.  In addition to this
-file, example.c is a good starting point for using the library, as
-it is heavily commented and should include everything most people
-will need.  We assume that libpng is already installed; see the
-INSTALL file for instructions on how to install libpng.
-
-Libpng was written as a companion to the PNG specification, as a way
-of reducing the amount of time and effort it takes to support the PNG
-file format in application programs.
-
-The PNG-1.2 specification is available at <http://www.libpng.org/pub/png>
-and at <ftp://ftp.uu.net/graphics/png/documents/>.
-
-The PNG-1.0 specification is available
-as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC.png.html>. Some
-additional chunks are described in the special-purpose public chunks
-documents at <ftp://ftp.uu.net/graphics/png/documents/>.
-
-Other information
-about PNG, and the latest version of libpng, can be found at the PNG home
-page, <http://www.libpng.org/pub/png/>
-and at <ftp://ftp.uu.net/graphics/png/>.
-
-Most users will not have to modify the library significantly; advanced
-users may want to modify it more.  All attempts were made to make it as
-complete as possible, while keeping the code easy to understand.
-Currently, this library only supports C.  Support for other languages
-is being considered.
-
-Libpng has been designed to handle multiple sessions at one time,
-to be easily modifiable, to be portable to the vast majority of
-machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy
-to use.  The ultimate goal of libpng is to promote the acceptance of
-the PNG file format in whatever way possible.  While there is still
-work to be done (see the TODO file), libpng should cover the
-majority of the needs of its users.
-
-Libpng uses zlib for its compression and decompression of PNG files.
-Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
-The zlib compression utility is a general purpose utility that is
-useful for more than PNG files, and can be used without libpng.
-See the documentation delivered with zlib for more details.
-You can usually find the source files for the zlib utility wherever you
-find the libpng source files.
-
-Libpng is thread safe, provided the threads are using different
-instances of the structures.  Each thread should have its own
-png_struct and png_info instances, and thus its own image.
-Libpng does not protect itself against two threads using the
-same instance of a structure.  Note: thread safety may be defeated
-by use of some of the MMX assembler code in pnggccrd.c, which is only
-compiled when the user defines PNG_THREAD_UNSAFE_OK.
-
-
-II. Structures
-
-There are two main structures that are important to libpng, png_struct
-and png_info.  The first, png_struct, is an internal structure that
-will not, for the most part, be used by a user except as the first
-variable passed to every libpng function call.
-
-The png_info structure is designed to provide information about the
-PNG file.  At one time, the fields of png_info were intended to be
-directly accessible to the user.  However, this tended to cause problems
-with applications using dynamically loaded libraries, and as a result
-a set of interface functions for png_info (the png_get_*() and png_set_*()
-functions) was developed.  The fields of png_info are still available for
-older applications, but it is suggested that applications use the new
-interfaces if at all possible.
-
-Applications that do make direct access to the members of png_struct (except
-for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
-and applications that make direct access to the members of png_info must
-be recompiled if they were compiled or loaded with libpng version 1.0.6,
-in which the members were in a different order.  In version 1.0.7, the
-members of the png_info structure reverted to the old order, as they were
-in versions 0.97c through 1.0.5.  Starting with version 2.0.0, both
-structures are going to be hidden, and the contents of the structures will
-only be accessible through the png_get/png_set functions.
-
-The png.h header file is an invaluable reference for programming with libpng.
-And while I'm on the topic, make sure you include the libpng header file:
-
-#include <png.h>
-
-III. Reading
-
-We'll now walk you through the possible functions to call when reading
-in a PNG file sequentially, briefly explaining the syntax and purpose
-of each one.  See example.c and png.h for more detail.  While
-progressive reading is covered in the next section, you will still
-need some of the functions discussed in this section to read a PNG
-file.
-
-Setup
-
-You will want to do the I/O initialization(*) before you get into libpng,
-so if it doesn't work, you don't have much to undo.  Of course, you
-will also want to insure that you are, in fact, dealing with a PNG
-file.  Libpng provides a simple check to see if a file is a PNG file.
-To use it, pass in the first 1 to 8 bytes of the file to the function
-png_sig_cmp(), and it will return 0 if the bytes match the corresponding
-bytes of the PNG signature, or nonzero otherwise.  Of course, the more bytes
-you pass in, the greater the accuracy of the prediction.
-
-If you are intending to keep the file pointer open for use in libpng,
-you must ensure you don't read more than 8 bytes from the beginning
-of the file, and you also have to make a call to png_set_sig_bytes_read()
-with the number of bytes you read from the beginning.  Libpng will
-then only check the bytes (if any) that your program didn't read.
-
-(*): If you are not using the standard I/O functions, you will need
-to replace them with custom functions.  See the discussion under
-Customizing libpng.
-
-
-    FILE *fp = fopen(file_name, "rb");
-    if (!fp)
-    {
-        return (ERROR);
-    }
-    fread(header, 1, number, fp);
-    is_png = !png_sig_cmp(header, 0, number);
-    if (!is_png)
-    {
-        return (NOT_PNG);
-    }
-
-
-Next, png_struct and png_info need to be allocated and initialized.  In
-order to ensure that the size of these structures is correct even with a
-dynamically linked libpng, there are functions to initialize and
-allocate the structures.  We also pass the library version, optional
-pointers to error handling functions, and a pointer to a data struct for
-use by the error functions, if necessary (the pointer and functions can
-be NULL if the default error handlers are to be used).  See the section
-on Changes to Libpng below regarding the old initialization functions.
-The structure allocation functions quietly return NULL if they fail to
-create the structure, so your application should check for that.
-
-    png_structp png_ptr = png_create_read_struct
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn);
-    if (!png_ptr)
-        return (ERROR);
-
-    png_infop info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-        png_destroy_read_struct(&png_ptr,
-           (png_infopp)NULL, (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    png_infop end_info = png_create_info_struct(png_ptr);
-    if (!end_info)
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-          (png_infopp)NULL);
-        return (ERROR);
-    }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_read_struct_2() instead of png_create_read_struct():
-
-    png_structp png_ptr = png_create_read_struct_2
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn, (png_voidp)
-        user_mem_ptr, user_malloc_fn, user_free_fn);
-
-The error handling routines passed to png_create_read_struct()
-and the memory alloc/free routines passed to png_create_struct_2()
-are only necessary if you are not using the libpng supplied error
-handling and memory alloc/free functions.
-
-When libpng encounters an error, it expects to longjmp back
-to your routine.  Therefore, you will need to call setjmp and pass
-your png_jmpbuf(png_ptr).  If you read the file from different
-routines, you will need to update the jmpbuf field every time you enter
-a new routine that will call a png_*() function.
-
-See your documentation of setjmp/longjmp for your compiler for more
-information on setjmp/longjmp.  See the discussion on libpng error
-handling in the Customizing Libpng section below for more information
-on the libpng error handling.  If an error occurs, and libpng longjmp's
-back to your setjmp, you will want to call png_destroy_read_struct() to
-free any memory.
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           &end_info);
-        fclose(fp);
-        return (ERROR);
-    }
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the input code.  The default for libpng is to
-use the C function fread().  If you use this, you will need to pass a
-valid FILE * in the function png_init_io().  Be sure that the file is
-opened in binary mode.  If you wish to handle reading data in another
-way, you need not call the png_init_io() function, but you must then
-implement the libpng I/O methods discussed in the Customizing Libpng
-section below.
-
-    png_init_io(png_ptr, fp);
-
-If you had previously opened the file and read any of the signature from
-the beginning in order to see if this was a PNG file, you need to let
-libpng know that there are some bytes missing from the start of the file.
-
-    png_set_sig_bytes(png_ptr, number);
-
-Setting up callback code
-
-You can set up a callback function to handle any unknown chunks in the
-input stream. You must supply the function
-
-    read_chunk_callback(png_ptr ptr,
-         png_unknown_chunkp chunk);
-    {
-       /* The unknown chunk structure contains your
-          chunk data: */
-           png_byte name[5];
-           png_byte *data;
-           png_size_t size;
-       /* Note that libpng has already taken care of
-          the CRC handling */
-
-       /* put your code here.  Return one of the
-          following: */
-
-       return (-n); /* chunk had an error */
-       return (0); /* did not recognize */
-       return (n); /* success */
-    }
-
-(You can give your function another name that you like instead of
-"read_chunk_callback")
-
-To inform libpng about your function, use
-
-    png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr,
-        read_chunk_callback);
-
-This names not only the callback function, but also a user pointer that
-you can retrieve with
-
-    png_get_user_chunk_ptr(png_ptr);
-
-At this point, you can set up a callback function that will be
-called after each row has been read, which you can use to control
-a progress meter or the like.  It's demonstrated in pngtest.c.
-You must supply a function
-
-    void read_row_callback(png_ptr ptr, png_uint_32 row,
-       int pass);
-    {
-      /* put your code here */
-    }
-
-(You can give it another name that you like instead of "read_row_callback")
-
-To inform libpng about your function, use
-
-    png_set_read_status_fn(png_ptr, read_row_callback);
-
-Width and height limits
-
-The PNG specification allows the width and height of an image to be as
-large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
-Since very few applications really need to process such large images,
-we have imposed an arbitrary 1-million limit on rows and columns.
-Larger images will be rejected immediately with a png_error() call. If
-you wish to override this limit, you can use
-
-   png_set_user_limits(png_ptr, width_max, height_max);
-
-to set your own limits, or use width_max = height_max = 0x7fffffffL
-to allow all valid dimensions (libpng may reject some very large images
-anyway because of potential buffer overflow conditions).
-
-You should put this statement after you create the PNG structure and
-before calling png_read_info(), png_read_png(), or png_process_data().
-If you need to retrieve the limits that are being applied, use
-
-   width_max = png_get_user_width_max(png_ptr);
-   height_max = png_get_user_height_max(png_ptr);
-
-Unknown-chunk handling
-
-Now you get to set the way the library processes unknown chunks in the
-input PNG stream. Both known and unknown chunks will be read.  Normal
-behavior is that known chunks will be parsed into information in
-various info_ptr members; unknown chunks will be discarded. To change
-this, you can call:
-
-    png_set_keep_unknown_chunks(png_ptr, keep,
-        chunk_list, num_chunks);
-    keep       - 0: do not handle as unknown
-                 1: do not keep
-                 2: keep only if safe-to-copy
-                 3: keep even if unsafe-to-copy
-               You can use these definitions:
-                 PNG_HANDLE_CHUNK_AS_DEFAULT   0
-                 PNG_HANDLE_CHUNK_NEVER        1
-                 PNG_HANDLE_CHUNK_IF_SAFE      2
-                 PNG_HANDLE_CHUNK_ALWAYS       3
-    chunk_list - list of chunks affected (a byte string,
-                 five bytes per chunk, NULL or '\0' if
-                 num_chunks is 0)
-    num_chunks - number of chunks affected; if 0, all
-                 unknown chunks are affected.  If nonzero,
-                 only the chunks in the list are affected
-
-Unknown chunks declared in this way will be saved as raw data onto a
-list of png_unknown_chunk structures.  If a chunk that is normally
-known to libpng is named in the list, it will be handled as unknown,
-according to the "keep" directive.  If a chunk is named in successive
-instances of png_set_keep_unknown_chunks(), the final instance will
-take precedence.  The IHDR and IEND chunks should not be named in
-chunk_list; if they are, libpng will process them normally anyway.
-
-The high-level read interface
-
-At this point there are two ways to proceed; through the high-level
-read interface, or through a sequence of low-level read operations.
-You can use the high-level interface if (a) you are willing to read
-the entire image into memory, and (b) the input transformations
-you want to do are limited to the following set:
-
-    PNG_TRANSFORM_IDENTITY      No transformation
-    PNG_TRANSFORM_STRIP_16      Strip 16-bit samples to
-                                8 bits
-    PNG_TRANSFORM_STRIP_ALPHA   Discard the alpha channel
-    PNG_TRANSFORM_PACKING       Expand 1, 2 and 4-bit
-                                samples to bytes
-    PNG_TRANSFORM_PACKSWAP      Change order of packed
-                                pixels to LSB first
-    PNG_TRANSFORM_EXPAND        Perform set_expand()
-    PNG_TRANSFORM_INVERT_MONO   Invert monochrome images
-    PNG_TRANSFORM_SHIFT         Normalize pixels to the
-                                sBIT depth
-    PNG_TRANSFORM_BGR           Flip RGB to BGR, RGBA
-                                to BGRA
-    PNG_TRANSFORM_SWAP_ALPHA    Flip RGBA to ARGB or GA
-                                to AG
-    PNG_TRANSFORM_INVERT_ALPHA  Change alpha from opacity
-                                to transparency
-    PNG_TRANSFORM_SWAP_ENDIAN   Byte-swap 16-bit samples
-
-(This excludes setting a background color, doing gamma transformation,
-dithering, and setting filler.)  If this is the case, simply do this:
-
-    png_read_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the logical OR of
-some set of transformation flags.  This call is equivalent to png_read_info(),
-followed the set of transformations indicated by the transform mask,
-then png_read_image(), and finally png_read_end().
-
-(The final parameter of this call is not yet used.  Someday it might point
-to transformation parameters required by some future input transform.)
-
-After you have called png_read_png(), you can retrieve the image data
-with
-
-   row_pointers = png_get_rows(png_ptr, info_ptr);
-
-where row_pointers is an array of pointers to the pixel data for each row:
-
-   png_bytep row_pointers[height];
-
-If you know your image size and pixel size ahead of time, you can allocate
-row_pointers prior to calling png_read_png() with
-
-   if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
-      png_error (png_ptr,
-         "Image is too tall to process in memory");
-   if (width > PNG_UINT_32_MAX/pixel_size)
-      png_error (png_ptr,
-         "Image is too wide to process in memory");
-   row_pointers = png_malloc(png_ptr,
-      height*png_sizeof(png_bytep));
-   for (int i=0; i<height, i++)
-      row_pointers[i]=png_malloc(png_ptr,
-         width*pixel_size);
-   png_set_rows(png_ptr, info_ptr, &row_pointers);
-
-Alternatively you could allocate your image in one big block and define
-row_pointers[i] to point into the proper places in your block.
-
-If you use png_set_rows(), the application is responsible for freeing
-row_pointers (and row_pointers[i], if they were separately allocated).
-
-If you don't allocate row_pointers ahead of time, png_read_png() will
-do it, and it'll be free'ed when you call png_destroy_*().
-
-The low-level read interface
-
-If you are going the low-level route, you are now ready to read all
-the file information up to the actual image data.  You do this with a
-call to png_read_info().
-
-    png_read_info(png_ptr, info_ptr);
-
-This will process all chunks up to but not including the image data.
-
-Querying the info structure
-
-Functions are used to get the information from the info_ptr once it
-has been read.  Note that these fields may not be completely filled
-in until png_read_end() has read the chunk data following the image.
-
-    png_get_IHDR(png_ptr, info_ptr, &width, &height,
-       &bit_depth, &color_type, &interlace_type,
-       &compression_type, &filter_method);
-
-    width          - holds the width of the image
-                     in pixels (up to 2^31).
-    height         - holds the height of the image
-                     in pixels (up to 2^31).
-    bit_depth      - holds the bit depth of one of the
-                     image channels.  (valid values are
-                     1, 2, 4, 8, 16 and depend also on
-                     the color_type.  See also
-                     significant bits (sBIT) below).
-    color_type     - describes which color/alpha channels
-                         are present.
-                     PNG_COLOR_TYPE_GRAY
-                        (bit depths 1, 2, 4, 8, 16)
-                     PNG_COLOR_TYPE_GRAY_ALPHA
-                        (bit depths 8, 16)
-                     PNG_COLOR_TYPE_PALETTE
-                        (bit depths 1, 2, 4, 8)
-                     PNG_COLOR_TYPE_RGB
-                        (bit_depths 8, 16)
-                     PNG_COLOR_TYPE_RGB_ALPHA
-                        (bit_depths 8, 16)
-
-                     PNG_COLOR_MASK_PALETTE
-                     PNG_COLOR_MASK_COLOR
-                     PNG_COLOR_MASK_ALPHA
-
-    filter_method  - (must be PNG_FILTER_TYPE_BASE
-                     for PNG 1.0, and can also be
-                     PNG_INTRAPIXEL_DIFFERENCING if
-                     the PNG datastream is embedded in
-                     a MNG-1.0 datastream)
-    compression_type - (must be PNG_COMPRESSION_TYPE_BASE
-                     for PNG 1.0)
-    interlace_type - (PNG_INTERLACE_NONE or
-                     PNG_INTERLACE_ADAM7)
-    Any or all of interlace_type, compression_type, of
-    filter_method can be NULL if you are
-    not interested in their values.
-
-    channels = png_get_channels(png_ptr, info_ptr);
-    channels       - number of channels of info for the
-                     color type (valid values are 1 (GRAY,
-                     PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
-                     4 (RGB_ALPHA or RGB + filler byte))
-    rowbytes = png_get_rowbytes(png_ptr, info_ptr);
-    rowbytes       - number of bytes needed to hold a row
-
-    signature = png_get_signature(png_ptr, info_ptr);
-    signature      - holds the signature read from the
-                     file (if any).  The data is kept in
-                     the same offset it would be if the
-                     whole signature were read (i.e. if an
-                     application had already read in 4
-                     bytes of signature before starting
-                     libpng, the remaining 4 bytes would
-                     be in signature[4] through signature[7]
-                     (see png_set_sig_bytes())).
-
-
-    width            = png_get_image_width(png_ptr,
-                         info_ptr);
-    height           = png_get_image_height(png_ptr,
-                         info_ptr);
-    bit_depth        = png_get_bit_depth(png_ptr,
-                         info_ptr);
-    color_type       = png_get_color_type(png_ptr,
-                         info_ptr);
-    filter_method    = png_get_filter_type(png_ptr,
-                         info_ptr);
-    compression_type = png_get_compression_type(png_ptr,
-                         info_ptr);
-    interlace_type   = png_get_interlace_type(png_ptr,
-                         info_ptr);
-
-
-These are also important, but their validity depends on whether the chunk
-has been read.  The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and
-png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the
-data has been read, or zero if it is missing.  The parameters to the
-png_get_<chunk> are set directly if they are simple data types, or a pointer
-into the info_ptr is returned for any complex types.
-
-    png_get_PLTE(png_ptr, info_ptr, &palette,
-                     &num_palette);
-    palette        - the palette for the file
-                     (array of png_color)
-    num_palette    - number of entries in the palette
-
-    png_get_gAMA(png_ptr, info_ptr, &gamma);
-    gamma          - the gamma the file is written
-                     at (PNG_INFO_gAMA)
-
-    png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
-    srgb_intent    - the rendering intent (PNG_INFO_sRGB)
-                     The presence of the sRGB chunk
-                     means that the pixel data is in the
-                     sRGB color space.  This chunk also
-                     implies specific values of gAMA and
-                     cHRM.
-
-    png_get_iCCP(png_ptr, info_ptr, &name,
-       &compression_type, &profile, &proflen);
-    name            - The profile name.
-    compression     - The compression type; always
-                      PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
-                      You may give NULL to this argument to
-                      ignore it.
-    profile         - International Color Consortium color
-                      profile data. May contain NULs.
-    proflen         - length of profile data in bytes.
-
-    png_get_sBIT(png_ptr, info_ptr, &sig_bit);
-    sig_bit        - the number of significant bits for
-                     (PNG_INFO_sBIT) each of the gray,
-                     red, green, and blue channels,
-                     whichever are appropriate for the
-                     given color type (png_color_16)
-
-    png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
-                     &trans_values);
-    trans          - array of transparent entries for
-                     palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
-                     the single transparent color for
-                     non-paletted images (PNG_INFO_tRNS)
-    num_trans      - number of transparent entries
-                     (PNG_INFO_tRNS)
-
-    png_get_hIST(png_ptr, info_ptr, &hist);
-                     (PNG_INFO_hIST)
-    hist           - histogram of palette (array of
-                     png_uint_16)
-
-    png_get_tIME(png_ptr, info_ptr, &mod_time);
-    mod_time       - time image was last modified
-                    (PNG_VALID_tIME)
-
-    png_get_bKGD(png_ptr, info_ptr, &background);
-    background     - background color (PNG_VALID_bKGD)
-                     valid 16-bit red, green and blue
-                     values, regardless of color_type
-
-    num_comments   = png_get_text(png_ptr, info_ptr,
-                     &text_ptr, &num_text);
-    num_comments   - number of comments
-    text_ptr       - array of png_text holding image
-                     comments
-    text_ptr[i].compression - type of compression used
-                 on "text" PNG_TEXT_COMPRESSION_NONE
-                           PNG_TEXT_COMPRESSION_zTXt
-                           PNG_ITXT_COMPRESSION_NONE
-                           PNG_ITXT_COMPRESSION_zTXt
-    text_ptr[i].key   - keyword for comment.  Must contain
-                         1-79 characters.
-    text_ptr[i].text  - text comments for current
-                         keyword.  Can be empty.
-    text_ptr[i].text_length - length of text string,
-                 after decompression, 0 for iTXt
-    text_ptr[i].itxt_length - length of itxt string,
-                 after decompression, 0 for tEXt/zTXt
-    text_ptr[i].lang  - language of comment (empty
-                         string for unknown).
-    text_ptr[i].lang_key  - keyword in UTF-8
-                         (empty string for unknown).
-    num_text       - number of comments (same as
-                     num_comments; you can put NULL here
-                     to avoid the duplication)
-    Note while png_set_text() will accept text, language,
-    and translated keywords that can be NULL pointers, the
-    structure returned by png_get_text will always contain
-    regular zero-terminated C strings.  They might be
-    empty strings but they will never be NULL pointers.
-
-    num_spalettes = png_get_sPLT(png_ptr, info_ptr,
-       &palette_ptr);
-    palette_ptr    - array of palette structures holding
-                     contents of one or more sPLT chunks
-                     read.
-    num_spalettes  - number of sPLT chunks read.
-
-    png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
-       &unit_type);
-    offset_x       - positive offset from the left edge
-                     of the screen
-    offset_y       - positive offset from the top edge
-                     of the screen
-    unit_type      - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
-    png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
-       &unit_type);
-    res_x          - pixels/unit physical resolution in
-                     x direction
-    res_y          - pixels/unit physical resolution in
-                     x direction
-    unit_type      - PNG_RESOLUTION_UNKNOWN,
-                     PNG_RESOLUTION_METER
-
-    png_get_sCAL(png_ptr, info_ptr, &unit, &width,
-       &height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are doubles)
-
-    png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
-       &height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are strings like "2.54")
-
-    num_unknown_chunks = png_get_unknown_chunks(png_ptr,
-       info_ptr, &unknowns)
-    unknowns          - array of png_unknown_chunk
-                        structures holding unknown chunks
-    unknowns[i].name  - name of unknown chunk
-    unknowns[i].data  - data of unknown chunk
-    unknowns[i].size  - size of unknown chunk's data
-    unknowns[i].location - position of chunk in file
-
-    The value of "i" corresponds to the order in which the
-    chunks were read from the PNG file or inserted with the
-    png_set_unknown_chunks() function.
-
-The data from the pHYs chunk can be retrieved in several convenient
-forms:
-
-    res_x = png_get_x_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_y = png_get_y_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_x_and_y = png_get_pixels_per_meter(png_ptr,
-       info_ptr)
-    res_x = png_get_x_pixels_per_inch(png_ptr,
-       info_ptr)
-    res_y = png_get_y_pixels_per_inch(png_ptr,
-       info_ptr)
-    res_x_and_y = png_get_pixels_per_inch(png_ptr,
-       info_ptr)
-    aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
-       info_ptr)
-
-   (Each of these returns 0 [signifying "unknown"] if
-       the data is not present or if res_x is 0;
-       res_x_and_y is 0 if res_x != res_y)
-
-The data from the oFFs chunk can be retrieved in several convenient
-forms:
-
-    x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
-    y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
-    x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
-    y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
-
-   (Each of these returns 0 [signifying "unknown" if both
-       x and y are 0] if the data is not present or if the
-       chunk is present but the unit is the pixel)
-
-For more information, see the png_info definition in png.h and the
-PNG specification for chunk contents.  Be careful with trusting
-rowbytes, as some of the transformations could increase the space
-needed to hold a row (expand, filler, gray_to_rgb, etc.).
-See png_read_update_info(), below.
-
-A quick word about text_ptr and num_text.  PNG stores comments in
-keyword/text pairs, one pair per chunk, with no limit on the number
-of text chunks, and a 2^31 byte limit on their size.  While there are
-suggested keywords, there is no requirement to restrict the use to these
-strings.  It is strongly suggested that keywords and text be sensible
-to humans (that's the point), so don't use abbreviations.  Non-printing
-symbols are not allowed.  See the PNG specification for more details.
-There is also no requirement to have text after the keyword.
-
-Keywords should be limited to 79 Latin-1 characters without leading or
-trailing spaces, but non-consecutive spaces are allowed within the
-keyword.  It is possible to have the same keyword any number of times.
-The text_ptr is an array of png_text structures, each holding a
-pointer to a language string, a pointer to a keyword and a pointer to
-a text string.  The text string, language code, and translated
-keyword may be empty or NULL pointers.  The keyword/text
-pairs are put into the array in the order that they are received.
-However, some or all of the text chunks may be after the image, so, to
-make sure you have read all the text chunks, don't mess with these
-until after you read the stuff after the image.  This will be
-mentioned again below in the discussion that goes with png_read_end().
-
-Input transformations
-
-After you've read the header information, you can set up the library
-to handle any special transformations of the image data.  The various
-ways to transform the data will be described in the order that they
-should occur.  This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths.  Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data.  For example, don't swap red and blue on grayscale data.
-
-The colors used for the background and transparency values should be
-supplied in the same format/depth as the current image data.  They
-are stored in the same format/depth as the image data in a bKGD or tRNS
-chunk, so this is what libpng expects for this data.  The colors are
-transformed to keep in sync with the image data when an application
-calls the png_read_update_info() routine (see below).
-
-Data will be decoded into the supplied row buffers packed into bytes
-unless the library has been told to transform it into another format.
-For example, 4 bit/pixel paletted or grayscale data will be returned
-2 pixels/byte with the leftmost pixel in the high-order bits of the
-byte, unless png_set_packing() is called.  8-bit RGB data will be stored
-in RGB RGB RGB format unless png_set_filler() is called to insert filler
-bytes, either before or after each RGB triplet.  16-bit RGB data will
-be returned RRGGBB RRGGBB, with the most significant byte of the color
-value first, unless png_set_strip_16() is called to transform it to
-regular RGB RGB triplets, or png_set_filler() is called to insert
-filler bytes, either before or after each RRGGBB triplet.  Similarly,
-8-bit or 16-bit grayscale data can be modified with png_set_filler()
-or png_set_strip_16().
-
-The following code transforms grayscale images of less than 8 to 8 bits,
-changes paletted images to RGB, and adds a full alpha channel if there is
-transparency information in a tRNS chunk.  This is most useful on
-grayscale images with bit depths of 2 or 4 or if there is a multiple-image
-viewing application that wishes to treat all images in the same way.
-
-    if (color_type == PNG_COLOR_TYPE_PALETTE)
-        png_set_palette_to_rgb(png_ptr);
-
-    if (color_type == PNG_COLOR_TYPE_GRAY &&
-        bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr);
-
-    if (png_get_valid(png_ptr, info_ptr,
-        PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
-
-These three functions are actually aliases for png_set_expand(), added
-in libpng version 1.0.4, with the function names expanded to improve code
-readability.  In some future version they may actually do different
-things.
-
-PNG can have files with 16 bits per channel.  If you only can handle
-8 bits per channel, this will strip the pixels down to 8 bit.
-
-    if (bit_depth == 16)
-        png_set_strip_16(png_ptr);
-
-If, for some reason, you don't need the alpha channel on an image,
-and you want to remove it rather than combining it with the background
-(but the image author certainly had in mind that you *would* combine
-it with the background, so that's what you should probably do):
-
-    if (color_type & PNG_COLOR_MASK_ALPHA)
-        png_set_strip_alpha(png_ptr);
-
-In PNG files, the alpha channel in an image
-is the level of opacity.  If you need the alpha channel in an image to
-be the level of transparency instead of opacity, you can invert the
-alpha channel (or the tRNS chunk data) after it's read, so that 0 is
-fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit
-images) is fully transparent, with
-
-    png_set_invert_alpha(png_ptr);
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit
-files.  This code expands to 1 pixel per byte without changing the
-values of the pixels:
-
-    if (bit_depth < 8)
-        png_set_packing(png_ptr);
-
-PNG files have possible bit depths of 1, 2, 4, 8, and 16.  All pixels
-stored in a PNG image have been "scaled" or "shifted" up to the next
-higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
-8 bits/sample in the range [0, 255]).  However, it is also possible to
-convert the PNG pixel data back to the original bit depth of the image.
-This call reduces the pixels back down to the original bit depth:
-
-    png_color_8p sig_bit;
-
-    if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
-        png_set_shift(png_ptr, sig_bit);
-
-PNG files store 3-color pixels in red, green, blue order.  This code
-changes the storage of the pixels to blue, green, red:
-
-    if (color_type == PNG_COLOR_TYPE_RGB ||
-        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-        png_set_bgr(png_ptr);
-
-PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
-into 4 or 8 bytes for windowing systems that need them in this format:
-
-    if (color_type == PNG_COLOR_TYPE_RGB)
-        png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
-
-where "filler" is the 8 or 16-bit number to fill with, and the location is
-either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
-you want the filler before the RGB or after.  This transformation
-does not affect images that already have full alpha channels.  To add an
-opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
-will generate RGBA pixels.
-
-If you are reading an image with an alpha channel, and you need the
-data as ARGB instead of the normal PNG format RGBA:
-
-    if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-        png_set_swap_alpha(png_ptr);
-
-For some uses, you may want a grayscale image to be represented as
-RGB.  This code will do that conversion:
-
-    if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-          png_set_gray_to_rgb(png_ptr);
-
-Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
-with alpha.
-
-    if (color_type == PNG_COLOR_TYPE_RGB ||
-        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-          png_set_rgb_to_gray_fixed(png_ptr, error_action,
-             int red_weight, int green_weight);
-
-    error_action = 1: silently do the conversion
-    error_action = 2: issue a warning if the original
-                      image has any pixel where
-                      red != green or red != blue
-    error_action = 3: issue an error and abort the
-                      conversion if the original
-                      image has any pixel where
-                      red != green or red != blue
-
-    red_weight:       weight of red component times 100000
-    green_weight:     weight of green component times 100000
-                      If either weight is negative, default
-                      weights (21268, 71514) are used.
-
-If you have set error_action = 1 or 2, you can
-later check whether the image really was gray, after processing
-the image rows, with the png_get_rgb_to_gray_status(png_ptr) function.
-It will return a png_byte that is zero if the image was gray or
-1 if there were any non-gray pixels.  bKGD and sBIT data
-will be silently converted to grayscale, using the green channel
-data, regardless of the error_action setting.
-
-With red_weight+green_weight<=100000,
-the normalized graylevel is computed:
-
-    int rw = red_weight * 65536;
-    int gw = green_weight * 65536;
-    int bw = 65536 - (rw + gw);
-    gray = (rw*red + gw*green + bw*blue)/65536;
-
-The default values approximate those recommended in the Charles
-Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
-Copyright (c) 1998-01-04 Charles Poynton poynton at inforamp.net
-
-    Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
-
-Libpng approximates this with
-
-    Y = 0.21268 * R    + 0.7151 * G    + 0.07217 * B
-
-which can be expressed with integers as
-
-    Y = (6969 * R + 23434 * G + 2365 * B)/32768
-
-The calculation is done in a linear colorspace, if the image gamma
-is known.
-
-If you have a grayscale and you are using png_set_expand_depth(),
-png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
-a higher bit-depth, you must either supply the background color as a gray
-value at the original file bit-depth (need_expand = 1) or else supply the
-background color as an RGB triplet at the final, expanded bit depth
-(need_expand = 0).  Similarly, if you are reading a paletted image, you
-must either supply the background color as a palette index (need_expand = 1)
-or as an RGB triplet that may or may not be in the palette (need_expand = 0).
-
-    png_color_16 my_background;
-    png_color_16p image_background;
-
-    if (png_get_bKGD(png_ptr, info_ptr, &image_background))
-        png_set_background(png_ptr, image_background,
-          PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
-    else
-        png_set_background(png_ptr, &my_background,
-          PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-
-The png_set_background() function tells libpng to composite images
-with alpha or simple transparency against the supplied background
-color.  If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid),
-you may use this color, or supply another color more suitable for
-the current display (e.g., the background color from a web page).  You
-need to tell libpng whether the color is in the gamma space of the
-display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file
-(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one
-that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't
-know why anyone would use this, but it's here).
-
-To properly display PNG images on any kind of system, the application needs
-to know what the display gamma is.  Ideally, the user will know this, and
-the application will allow them to set it.  One method of allowing the user
-to set the display gamma separately for each system is to check for a
-SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
-correctly set.
-
-Note that display_gamma is the overall gamma correction required to produce
-pleasing results, which depends on the lighting conditions in the surrounding
-environment.  In a dim or brightly lit room, no compensation other than
-the physical gamma exponent of the monitor is needed, while in a dark room
-a slightly smaller exponent is better.
-
-   double gamma, screen_gamma;
-
-   if (/* We have a user-defined screen
-       gamma value */)
-   {
-      screen_gamma = user_defined_screen_gamma;
-   }
-   /* One way that applications can share the same
-      screen gamma value */
-   else if ((gamma_str = getenv("SCREEN_GAMMA"))
-      != NULL)
-   {
-      screen_gamma = (double)atof(gamma_str);
-   }
-   /* If we don't have another value */
-   else
-   {
-      screen_gamma = 2.2; /* A good guess for a
-           PC monitor in a bright office or a dim room */
-      screen_gamma = 2.0; /* A good guess for a
-           PC monitor in a dark room */
-      screen_gamma = 1.7 or 1.0;  /* A good
-           guess for Mac systems */
-   }
-
-The png_set_gamma() function handles gamma transformations of the data.
-Pass both the file gamma and the current screen_gamma.  If the file does
-not have a gamma value, you can pass one anyway if you have an idea what
-it is (usually 0.45455 is a good guess for GIF images on PCs).  Note
-that file gammas are inverted from screen gammas.  See the discussions
-on gamma in the PNG specification for an excellent description of what
-gamma is, and why all applications should support it.  It is strongly
-recommended that PNG viewers support gamma correction.
-
-   if (png_get_gAMA(png_ptr, info_ptr, &gamma))
-      png_set_gamma(png_ptr, screen_gamma, gamma);
-   else
-      png_set_gamma(png_ptr, screen_gamma, 0.45455);
-
-If you need to reduce an RGB file to a paletted file, or if a paletted
-file has more entries then will fit on your screen, png_set_dither()
-will do that.  Note that this is a simple match dither that merely
-finds the closest color available.  This should work fairly well with
-optimized palettes, and fairly badly with linear color cubes.  If you
-pass a palette that is larger then maximum_colors, the file will
-reduce the number of colors in the palette so it will fit into
-maximum_colors.  If there is a histogram, it will use it to make
-more intelligent choices when reducing the palette.  If there is no
-histogram, it may not do as good a job.
-
-   if (color_type & PNG_COLOR_MASK_COLOR)
-   {
-      if (png_get_valid(png_ptr, info_ptr,
-         PNG_INFO_PLTE))
-      {
-         png_uint_16p histogram = NULL;
-
-         png_get_hIST(png_ptr, info_ptr,
-            &histogram);
-         png_set_dither(png_ptr, palette, num_palette,
-            max_screen_colors, histogram, 1);
-      }
-      else
-      {
-         png_color std_color_cube[MAX_SCREEN_COLORS] =
-            { ... colors ... };
-
-         png_set_dither(png_ptr, std_color_cube,
-            MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
-            NULL,0);
-      }
-   }
-
-PNG files describe monochrome as black being zero and white being one.
-The following code will reverse this (make black be one and white be
-zero):
-
-   if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
-      png_set_invert_mono(png_ptr);
-
-This function can also be used to invert grayscale and gray-alpha images:
-
-   if (color_type == PNG_COLOR_TYPE_GRAY ||
-        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      png_set_invert_mono(png_ptr);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first).  This code changes the storage to the
-other way (little-endian, i.e. least significant bits first, the
-way PCs store them):
-
-    if (bit_depth == 16)
-        png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
-    if (bit_depth < 8)
-       png_set_packswap(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs.  This is done by setting a callback
-with
-
-    png_set_read_user_transform_fn(png_ptr,
-       read_transform_fn);
-
-You must supply the function
-
-    void read_transform_fn(png_ptr ptr, row_info_ptr
-       row_info, png_bytep data)
-
-See pngtest.c for a working example.  Your function will be called
-after all of the other transformations have been processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function, and you can inform libpng that your transform
-function will change the number of channels or bit depth with the
-function
-
-    png_set_user_transform_info(png_ptr, user_ptr,
-       user_depth, user_channels);
-
-The user's application, not libpng, is responsible for allocating and
-freeing any memory required for the user structure.
-
-You can retrieve the pointer via the function
-png_get_user_transform_ptr().  For example:
-
-    voidp read_user_transform_ptr =
-       png_get_user_transform_ptr(png_ptr);
-
-The last thing to handle is interlacing; this is covered in detail below,
-but you must call the function here if you want libpng to handle expansion
-of the interlaced image.
-
-    number_of_passes = png_set_interlace_handling(png_ptr);
-
-After setting the transformations, libpng can update your png_info
-structure to reflect any transformations you've requested with this
-call.  This is most useful to update the info structure's rowbytes
-field so you can use it to allocate your image memory.  This function
-will also update your palette with the correct screen_gamma and
-background if these have been given with the calls above.
-
-    png_read_update_info(png_ptr, info_ptr);
-
-After you call png_read_update_info(), you can allocate any
-memory you need to hold the image.  The row data is simply
-raw byte data for all forms of images.  As the actual allocation
-varies among applications, no example will be given.  If you
-are allocating one large chunk, you will need to build an
-array of pointers to each row, as it will be needed for some
-of the functions below.
-
-Reading image data
-
-After you've allocated memory, you can read the image data.
-The simplest way to do this is in one function call.  If you are
-allocating enough memory to hold the whole image, you can just
-call png_read_image() and libpng will read in all the image data
-and put it in the memory area supplied.  You will need to pass in
-an array of pointers to each row.
-
-This function automatically handles interlacing, so you don't need
-to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_read_rows().
-
-   png_read_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
-   png_bytep row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to read in the whole image at once, you can
-use png_read_rows() instead.  If there is no interlacing (check
-interlace_type == PNG_INTERLACE_NONE), this is simple:
-
-    png_read_rows(png_ptr, row_pointers, NULL,
-       number_of_rows);
-
-where row_pointers is the same as in the png_read_image() call.
-
-If you are doing this just one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
-    png_bytep row_pointer = row;
-    png_read_row(png_ptr, row_pointer, NULL);
-
-If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
-get somewhat harder.  The only current (PNG Specification version 1.2)
-interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
-is a somewhat complicated 2D interlace scheme, known as Adam7, that
-breaks down an image into seven smaller images of varying size, based
-on an 8x8 grid.
-
-libpng can fill out those images or it can give them to you "as is".
-If you want them filled out, there are two ways to do that.  The one
-mentioned in the PNG specification is to expand each pixel to cover
-those pixels that have not been read yet (the "rectangle" method).
-This results in a blocky image for the first pass, which gradually
-smooths out as more pixels are read.  The other method is the "sparkle"
-method, where pixels are drawn only in their final locations, with the
-rest of the image remaining whatever colors they were initialized to
-before the start of the read.  The first method usually looks better,
-but tends to be slower, as there are more pixels to put in the rows.
-
-If you don't want libpng to handle the interlacing details, just call
-png_read_rows() seven times to read in all seven images.  Each of the
-images is a valid image by itself, or they can all be combined on an
-8x8 grid to form a single image (although if you intend to combine them
-you would be far better off using the libpng interlace handling).
-
-The first pass will return an image 1/8 as wide as the entire image
-(every 8th column starting in column 0) and 1/8 as high as the original
-(every 8th row starting in row 0), the second will be 1/8 as wide
-(starting in column 4) and 1/8 as high (also starting in row 0).  The
-third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
-1/8 as high (every 8th row starting in row 4), and the fourth pass will
-be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
-and every 4th row starting in row 0).  The fifth pass will return an
-image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
-while the sixth pass will be 1/2 as wide and 1/2 as high as the original
-(starting in column 1 and row 0).  The seventh and final pass will be as
-wide as the original, and 1/2 as high, containing all of the odd
-numbered scanlines.  Phew!
-
-If you want libpng to expand the images, call this before calling
-png_start_read_image() or png_read_update_info():
-
-    if (interlace_type == PNG_INTERLACE_ADAM7)
-        number_of_passes
-           = png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed.  Currently, this
-is seven, but may change if another interlace type is added.
-This function can be called even if the file is not interlaced,
-where it will return one pass.
-
-If you are not going to display the image after each pass, but are
-going to wait until the entire image is read in, use the sparkle
-effect.  This effect is faster and the end result of either method
-is exactly the same.  If you are planning on displaying the image
-after each pass, the "rectangle" effect is generally considered the
-better looking one.
-
-If you only want the "sparkle" effect, just call png_read_rows() as
-normal, with the third parameter NULL.  Make sure you make pass over
-the image number_of_passes times, and you don't change the data in the
-rows between calls.  You can change the locations of the data, just
-not the data.  Each pass only writes the pixels appropriate for that
-pass, and assumes the data from previous passes is still valid.
-
-    png_read_rows(png_ptr, row_pointers, NULL,
-       number_of_rows);
-
-If you only want the first effect (the rectangles), do the same as
-before except pass the row buffer in the third parameter, and leave
-the second parameter NULL.
-
-    png_read_rows(png_ptr, NULL, row_pointers,
-       number_of_rows);
-
-Finishing a sequential read
-
-After you are finished reading the image through either the high- or
-low-level interfaces, you can finish reading the file.  If you are
-interested in comments or time, which may be stored either before or
-after the image data, you should pass the separate png_info struct if
-you want to keep the comments from before and after the image
-separate.  If you are not interested, you can pass NULL.
-
-   png_read_end(png_ptr, end_info);
-
-When you are done, you can free all memory allocated by libpng like this:
-
-   png_destroy_read_struct(&png_ptr, &info_ptr,
-       &end_info);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
-    png_free_data(png_ptr, info_ptr, mask, seq)
-    mask - identifies data to be freed, a mask
-           containing the logical OR of one or
-           more of
-             PNG_FREE_PLTE, PNG_FREE_TRNS,
-             PNG_FREE_HIST, PNG_FREE_ICCP,
-             PNG_FREE_PCAL, PNG_FREE_ROWS,
-             PNG_FREE_SCAL, PNG_FREE_SPLT,
-             PNG_FREE_TEXT, PNG_FREE_UNKN,
-           or simply PNG_FREE_ALL
-    seq  - sequence number of item to be freed
-           (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng,  and will in those
-cases do nothing.  The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed.  If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-The default behavior is only to free data that was allocated internally
-by libpng.  This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
-    png_data_freer(png_ptr, info_ptr, freer, mask)
-    mask   - which data elements are affected
-             same choices as in png_free_data()
-    freer  - one of
-               PNG_DESTROY_WILL_FREE_DATA
-               PNG_SET_WILL_FREE_DATA
-               PNG_USER_WILL_FREE_DATA
-
-This function only affects data that has already been allocated.
-You can call this function after reading the PNG data but before calling
-any png_set_*() functions, to control whether the user or the png_set_*()
-function is responsible for freeing any existing data that might be present,
-and again after the png_set_*() functions to control whether the user
-or png_destroy_*() is supposed to free the data.  When the user assumes
-responsibility for libpng-allocated data, the application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated your row_pointers in a single block, as suggested above in
-the description of the high level read interface, you must not transfer
-responsibility for freeing it to the png_set_rows or png_read_destroy function,
-because they would also try to free the individual row_pointers[i].
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key.  Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-
-The png_free_data() function will turn off the "valid" flag for anything
-it frees.  If you need to turn the flag off for a chunk that was freed by your
-application instead of by libpng, you can use
-
-    png_set_invalid(png_ptr, info_ptr, mask);
-    mask - identifies the chunks to be made invalid,
-           containing the logical OR of one or
-           more of
-             PNG_INFO_gAMA, PNG_INFO_sBIT,
-             PNG_INFO_cHRM, PNG_INFO_PLTE,
-             PNG_INFO_tRNS, PNG_INFO_bKGD,
-             PNG_INFO_hIST, PNG_INFO_pHYs,
-             PNG_INFO_oFFs, PNG_INFO_tIME,
-             PNG_INFO_pCAL, PNG_INFO_sRGB,
-             PNG_INFO_iCCP, PNG_INFO_sPLT,
-             PNG_INFO_sCAL, PNG_INFO_IDAT
-
-For a more compact example of reading a PNG image, see the file example.c.
-
-Reading PNG files progressively
-
-The progressive reader is slightly different then the non-progressive
-reader.  Instead of calling png_read_info(), png_read_rows(), and
-png_read_end(), you make one call to png_process_data(), which calls
-callbacks when it has the info, a row, or the end of the image.  You
-set up these callbacks with png_set_progressive_read_fn().  You don't
-have to worry about the input/output functions of libpng, as you are
-giving the library the data directly in png_process_data().  I will
-assume that you have read the section on reading PNG files above,
-so I will only highlight the differences (although I will show
-all of the code).
-
-png_structp png_ptr;
-png_infop info_ptr;
-
- /*  An example code fragment of how you would
-     initialize the progressive reader in your
-     application. */
- int
- initialize_png_reader()
- {
-    png_ptr = png_create_read_struct
-        (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-         user_error_fn, user_warning_fn);
-    if (!png_ptr)
-        return (ERROR);
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-        png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    /* This one's new.  You can provide functions
-       to be called when the header info is valid,
-       when each row is completed, and when the image
-       is finished.  If you aren't using all functions,
-       you can specify NULL parameters.  Even when all
-       three functions are NULL, you need to call
-       png_set_progressive_read_fn().  You can use
-       any struct as the user_ptr (cast to a void pointer
-       for the function call), and retrieve the pointer
-       from inside the callbacks using the function
-
-          png_get_progressive_ptr(png_ptr);
-
-       which will return a void pointer, which you have
-       to cast appropriately.
-     */
-    png_set_progressive_read_fn(png_ptr, (void *)user_ptr,
-        info_callback, row_callback, end_callback);
-
-    return 0;
- }
-
- /* A code fragment that you call as you receive blocks
-   of data */
- int
- process_data(png_bytep buffer, png_uint_32 length)
- {
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-        png_destroy_read_struct(&png_ptr, &info_ptr,
-           (png_infopp)NULL);
-        return (ERROR);
-    }
-
-    /* This one's new also.  Simply give it a chunk
-       of data from the file stream (in order, of
-       course).  On machines with segmented memory
-       models machines, don't give it any more than
-       64K.  The library seems to run fine with sizes
-       of 4K. Although you can give it much less if
-       necessary (I assume you can give it chunks of
-       1 byte, I haven't tried less then 256 bytes
-       yet).  When this function returns, you may
-       want to display any rows that were generated
-       in the row callback if you don't already do
-       so there.
-     */
-    png_process_data(png_ptr, info_ptr, buffer, length);
-    return 0;
- }
-
- /* This function is called (as set by
-    png_set_progressive_read_fn() above) when enough data
-    has been supplied so all of the header has been
-    read.
- */
- void
- info_callback(png_structp png_ptr, png_infop info)
- {
-    /* Do any setup here, including setting any of
-       the transformations mentioned in the Reading
-       PNG files section.  For now, you _must_ call
-       either png_start_read_image() or
-       png_read_update_info() after all the
-       transformations are set (even if you don't set
-       any).  You may start getting rows before
-       png_process_data() returns, so this is your
-       last chance to prepare for that.
-     */
- }
-
- /* This function is called when each row of image
-    data is complete */
- void
- row_callback(png_structp png_ptr, png_bytep new_row,
-    png_uint_32 row_num, int pass)
- {
-    /* If the image is interlaced, and you turned
-       on the interlace handler, this function will
-       be called for every row in every pass.  Some
-       of these rows will not be changed from the
-       previous pass.  When the row is not changed,
-       the new_row variable will be NULL.  The rows
-       and passes are called in order, so you don't
-       really need the row_num and pass, but I'm
-       supplying them because it may make your life
-       easier.
-
-       For the non-NULL rows of interlaced images,
-       you must call png_progressive_combine_row()
-       passing in the row and the old row.  You can
-       call this function for NULL rows (it will just
-       return) and for non-interlaced images (it just
-       does the memcpy for you) if it will make the
-       code easier.  Thus, you can just do this for
-       all cases:
-     */
-
-        png_progressive_combine_row(png_ptr, old_row,
-          new_row);
-
-    /* where old_row is what was displayed for
-       previously for the row.  Note that the first
-       pass (pass == 0, really) will completely cover
-       the old row, so the rows do not have to be
-       initialized.  After the first pass (and only
-       for interlaced images), you will have to pass
-       the current row, and the function will combine
-       the old row and the new row.
-    */
- }
-
- void
- end_callback(png_structp png_ptr, png_infop info)
- {
-    /* This function is called after the whole image
-       has been read, including any chunks after the
-       image (up to and including the IEND).  You
-       will usually have the same info chunk as you
-       had in the header, although some data may have
-       been added to the comments and time fields.
-
-       Most people won't do much here, perhaps setting
-       a flag that marks the image as finished.
-     */
- }
-
-
-
-IV. Writing
-
-Much of this is very similar to reading.  However, everything of
-importance is repeated here, so you won't have to constantly look
-back up in the reading section to understand writing.
-
-Setup
-
-You will want to do the I/O initialization before you get into libpng,
-so if it doesn't work, you don't have anything to undo. If you are not
-using the standard I/O functions, you will need to replace them with
-custom writing functions.  See the discussion under Customizing libpng.
-
-    FILE *fp = fopen(file_name, "wb");
-    if (!fp)
-    {
-       return (ERROR);
-    }
-
-Next, png_struct and png_info need to be allocated and initialized.
-As these can be both relatively large, you may not want to store these
-on the stack, unless you have stack space to spare.  Of course, you
-will want to check if they return NULL.  If you are also reading,
-you won't want to name your read structure and your write structure
-both "png_ptr"; you can call them anything you like, such as
-"read_ptr" and "write_ptr".  Look at pngtest.c, for example.
-
-    png_structp png_ptr = png_create_write_struct
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn);
-    if (!png_ptr)
-       return (ERROR);
-
-    png_infop info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr)
-    {
-       png_destroy_write_struct(&png_ptr,
-         (png_infopp)NULL);
-       return (ERROR);
-    }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_write_struct_2() instead of png_create_write_struct():
-
-    png_structp png_ptr = png_create_write_struct_2
-       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
-        user_error_fn, user_warning_fn, (png_voidp)
-        user_mem_ptr, user_malloc_fn, user_free_fn);
-
-After you have these structures, you will need to set up the
-error handling.  When libpng encounters an error, it expects to
-longjmp() back to your routine.  Therefore, you will need to call
-setjmp() and pass the png_jmpbuf(png_ptr).  If you
-write the file from different routines, you will need to update
-the png_jmpbuf(png_ptr) every time you enter a new routine that will
-call a png_*() function.  See your documentation of setjmp/longjmp
-for your compiler for more information on setjmp/longjmp.  See
-the discussion on libpng error handling in the Customizing Libpng
-section below for more information on the libpng error handling.
-
-    if (setjmp(png_jmpbuf(png_ptr)))
-    {
-       png_destroy_write_struct(&png_ptr, &info_ptr);
-       fclose(fp);
-       return (ERROR);
-    }
-    ...
-    return;
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the output code.  The default for libpng is to
-use the C function fwrite().  If you use this, you will need to pass a
-valid FILE * in the function png_init_io().  Be sure that the file is
-opened in binary mode.  Again, if you wish to handle writing data in
-another way, see the discussion on libpng I/O handling in the Customizing
-Libpng section below.
-
-    png_init_io(png_ptr, fp);
-
-Write callbacks
-
-At this point, you can set up a callback function that will be
-called after each row has been written, which you can use to control
-a progress meter or the like.  It's demonstrated in pngtest.c.
-You must supply a function
-
-    void write_row_callback(png_ptr, png_uint_32 row,
-       int pass);
-    {
-      /* put your code here */
-    }
-
-(You can give it another name that you like instead of "write_row_callback")
-
-To inform libpng about your function, use
-
-    png_set_write_status_fn(png_ptr, write_row_callback);
-
-You now have the option of modifying how the compression library will
-run.  The following functions are mainly for testing, but may be useful
-in some cases, like if you need to write PNG files extremely fast and
-are willing to give up some compression, or if you want to get the
-maximum possible compression at the expense of slower writing.  If you
-have no special needs in this area, let the library do what it wants by
-not calling this function at all, as it has been tuned to deliver a good
-speed/compression ratio. The second parameter to png_set_filter() is
-the filter method, for which the only valid values are 0 (as of the
-July 1999 PNG specification, version 1.2) or 64 (if you are writing
-a PNG datastream that is to be embedded in a MNG datastream).  The third
-parameter is a flag that indicates which filter type(s) are to be tested
-for each scanline.  See the PNG specification for details on the specific filter
-types.
-
-
-    /* turn on or off filtering, and/or choose
-       specific filters.  You can use either a single
-       PNG_FILTER_VALUE_NAME or the logical OR of one
-       or more PNG_FILTER_NAME masks. */
-    png_set_filter(png_ptr, 0,
-       PNG_FILTER_NONE  | PNG_FILTER_VALUE_NONE |
-       PNG_FILTER_SUB   | PNG_FILTER_VALUE_SUB  |
-       PNG_FILTER_UP    | PNG_FILTER_VALUE_UP   |
-       PNG_FILTER_AVE   | PNG_FILTER_VALUE_AVE  |
-       PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
-       PNG_ALL_FILTERS);
-
-If an application
-wants to start and stop using particular filters during compression,
-it should start out with all of the filters (to ensure that the previous
-row of pixels will be stored in case it's needed later), and then add
-and remove them after the start of compression.
-
-If you are writing a PNG datastream that is to be embedded in a MNG
-datastream, the second parameter can be either 0 or 64.
-
-The png_set_compression_*() functions interface to the zlib compression
-library, and should mostly be ignored unless you really know what you are
-doing.  The only generally useful call is png_set_compression_level()
-which changes how much time zlib spends on trying to compress the image
-data.  See the Compression Library (zlib.h and algorithm.txt, distributed
-with zlib) for details on the compression levels.
-
-    /* set the zlib compression level */
-    png_set_compression_level(png_ptr,
-        Z_BEST_COMPRESSION);
-
-    /* set other zlib parameters */
-    png_set_compression_mem_level(png_ptr, 8);
-    png_set_compression_strategy(png_ptr,
-        Z_DEFAULT_STRATEGY);
-    png_set_compression_window_bits(png_ptr, 15);
-    png_set_compression_method(png_ptr, 8);
-    png_set_compression_buffer_size(png_ptr, 8192)
-
-extern PNG_EXPORT(void,png_set_zbuf_size)
-
-Setting the contents of info for output
-
-You now need to fill in the png_info structure with all the data you
-wish to write before the actual image.  Note that the only thing you
-are allowed to write after the image is the text chunks and the time
-chunk (as of PNG Specification 1.2, anyway).  See png_write_end() and
-the latest PNG specification for more information on that.  If you
-wish to write them before the image, fill them in now, and flag that
-data as being valid.  If you want to wait until after the data, don't
-fill them until png_write_end().  For all the fields in png_info and
-their data types, see png.h.  For explanations of what the fields
-contain, see the PNG specification.
-
-Some of the more important parts of the png_info are:
-
-    png_set_IHDR(png_ptr, info_ptr, width, height,
-       bit_depth, color_type, interlace_type,
-       compression_type, filter_method)
-    width          - holds the width of the image
-                     in pixels (up to 2^31).
-    height         - holds the height of the image
-                     in pixels (up to 2^31).
-    bit_depth      - holds the bit depth of one of the
-                     image channels.
-                     (valid values are 1, 2, 4, 8, 16
-                     and depend also on the
-                     color_type.  See also significant
-                     bits (sBIT) below).
-    color_type     - describes which color/alpha
-                     channels are present.
-                     PNG_COLOR_TYPE_GRAY
-                        (bit depths 1, 2, 4, 8, 16)
-                     PNG_COLOR_TYPE_GRAY_ALPHA
-                        (bit depths 8, 16)
-                     PNG_COLOR_TYPE_PALETTE
-                        (bit depths 1, 2, 4, 8)
-                     PNG_COLOR_TYPE_RGB
-                        (bit_depths 8, 16)
-                     PNG_COLOR_TYPE_RGB_ALPHA
-                        (bit_depths 8, 16)
-
-                     PNG_COLOR_MASK_PALETTE
-                     PNG_COLOR_MASK_COLOR
-                     PNG_COLOR_MASK_ALPHA
-
-    interlace_type - PNG_INTERLACE_NONE or
-                     PNG_INTERLACE_ADAM7
-    compression_type - (must be
-                     PNG_COMPRESSION_TYPE_DEFAULT)
-    filter_method  - (must be PNG_FILTER_TYPE_DEFAULT
-                     or, if you are writing a PNG to
-                     be embedded in a MNG datastream,
-                     can also be
-                     PNG_INTRAPIXEL_DIFFERENCING)
-
-    png_set_PLTE(png_ptr, info_ptr, palette,
-       num_palette);
-    palette        - the palette for the file
-                     (array of png_color)
-    num_palette    - number of entries in the palette
-
-    png_set_gAMA(png_ptr, info_ptr, gamma);
-    gamma          - the gamma the image was created
-                     at (PNG_INFO_gAMA)
-
-    png_set_sRGB(png_ptr, info_ptr, srgb_intent);
-    srgb_intent    - the rendering intent
-                     (PNG_INFO_sRGB) The presence of
-                     the sRGB chunk means that the pixel
-                     data is in the sRGB color space.
-                     This chunk also implies specific
-                     values of gAMA and cHRM.  Rendering
-                     intent is the CSS-1 property that
-                     has been defined by the International
-                     Color Consortium
-                     (http://www.color.org).
-                     It can be one of
-                     PNG_sRGB_INTENT_SATURATION,
-                     PNG_sRGB_INTENT_PERCEPTUAL,
-                     PNG_sRGB_INTENT_ABSOLUTE, or
-                     PNG_sRGB_INTENT_RELATIVE.
-
-
-    png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
-       srgb_intent);
-    srgb_intent    - the rendering intent
-                     (PNG_INFO_sRGB) The presence of the
-                     sRGB chunk means that the pixel
-                     data is in the sRGB color space.
-                     This function also causes gAMA and
-                     cHRM chunks with the specific values
-                     that are consistent with sRGB to be
-                     written.
-
-    png_set_iCCP(png_ptr, info_ptr, name, compression_type,
-                      profile, proflen);
-    name            - The profile name.
-    compression     - The compression type; always
-                      PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
-                      You may give NULL to this argument to
-                      ignore it.
-    profile         - International Color Consortium color
-                      profile data. May contain NULs.
-    proflen         - length of profile data in bytes.
-
-    png_set_sBIT(png_ptr, info_ptr, sig_bit);
-    sig_bit        - the number of significant bits for
-                     (PNG_INFO_sBIT) each of the gray, red,
-                     green, and blue channels, whichever are
-                     appropriate for the given color type
-                     (png_color_16)
-
-    png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
-       trans_values);
-    trans          - array of transparent entries for
-                     palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
-                     the single transparent color for
-                     non-paletted images (PNG_INFO_tRNS)
-    num_trans      - number of transparent entries
-                     (PNG_INFO_tRNS)
-
-    png_set_hIST(png_ptr, info_ptr, hist);
-                    (PNG_INFO_hIST)
-    hist           - histogram of palette (array of
-                     png_uint_16)
-
-    png_set_tIME(png_ptr, info_ptr, mod_time);
-    mod_time       - time image was last modified
-                     (PNG_VALID_tIME)
-
-    png_set_bKGD(png_ptr, info_ptr, background);
-    background     - background color (PNG_VALID_bKGD)
-
-    png_set_text(png_ptr, info_ptr, text_ptr, num_text);
-    text_ptr       - array of png_text holding image
-                     comments
-    text_ptr[i].compression - type of compression used
-                 on "text" PNG_TEXT_COMPRESSION_NONE
-                           PNG_TEXT_COMPRESSION_zTXt
-                           PNG_ITXT_COMPRESSION_NONE
-                           PNG_ITXT_COMPRESSION_zTXt
-    text_ptr[i].key   - keyword for comment.  Must contain
-                 1-79 characters.
-    text_ptr[i].text  - text comments for current
-                         keyword.  Can be NULL or empty.
-    text_ptr[i].text_length - length of text string,
-                 after decompression, 0 for iTXt
-    text_ptr[i].itxt_length - length of itxt string,
-                 after decompression, 0 for tEXt/zTXt
-    text_ptr[i].lang  - language of comment (NULL or
-                         empty for unknown).
-    text_ptr[i].translated_keyword  - keyword in UTF-8 (NULL
-                         or empty for unknown).
-    num_text       - number of comments
-
-    png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
-       num_spalettes);
-    palette_ptr    - array of png_sPLT_struct structures
-                     to be added to the list of palettes
-                     in the info structure.
-    num_spalettes  - number of palette structures to be
-                     added.
-
-    png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
-        unit_type);
-    offset_x  - positive offset from the left
-                     edge of the screen
-    offset_y  - positive offset from the top
-                     edge of the screen
-    unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
-    png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
-        unit_type);
-    res_x       - pixels/unit physical resolution
-                  in x direction
-    res_y       - pixels/unit physical resolution
-                  in y direction
-    unit_type   - PNG_RESOLUTION_UNKNOWN,
-                  PNG_RESOLUTION_METER
-
-    png_set_sCAL(png_ptr, info_ptr, unit, width, height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                  (width and height are doubles)
-
-    png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
-    unit        - physical scale units (an integer)
-    width       - width of a pixel in physical scale units
-    height      - height of a pixel in physical scale units
-                 (width and height are strings like "2.54")
-
-    png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
-       num_unknowns)
-    unknowns          - array of png_unknown_chunk
-                        structures holding unknown chunks
-    unknowns[i].name  - name of unknown chunk
-    unknowns[i].data  - data of unknown chunk
-    unknowns[i].size  - size of unknown chunk's data
-    unknowns[i].location - position to write chunk in file
-                           0: do not write chunk
-                           PNG_HAVE_IHDR: before PLTE
-                           PNG_HAVE_PLTE: before IDAT
-                           PNG_AFTER_IDAT: after IDAT
-
-The "location" member is set automatically according to
-what part of the output file has already been written.
-You can change its value after calling png_set_unknown_chunks()
-as demonstrated in pngtest.c.  Within each of the "locations",
-the chunks are sequenced according to their position in the
-structure (that is, the value of "i", which is the order in which
-the chunk was either read from the input file or defined with
-png_set_unknown_chunks).
-
-A quick word about text and num_text.  text is an array of png_text
-structures.  num_text is the number of valid structures in the array.
-Each png_text structure holds a language code, a keyword, a text value,
-and a compression type.
-
-The compression types have the same valid numbers as the compression
-types of the image data.  Currently, the only valid number is zero.
-However, you can store text either compressed or uncompressed, unlike
-images, which always have to be compressed.  So if you don't want the
-text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE.
-Because tEXt and zTXt chunks don't have a language field, if you
-specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt
-any language code or translated keyword will not be written out.
-
-Until text gets around 1000 bytes, it is not worth compressing it.
-After the text has been written out to the file, the compression type
-is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
-so that it isn't written out again at the end (in case you are calling
-png_write_end() with the same struct.
-
-The keywords that are given in the PNG Specification are:
-
-    Title            Short (one line) title or
-                     caption for image
-    Author           Name of image's creator
-    Description      Description of image (possibly long)
-    Copyright        Copyright notice
-    Creation Time    Time of original image creation
-                     (usually RFC 1123 format, see below)
-    Software         Software used to create the image
-    Disclaimer       Legal disclaimer
-    Warning          Warning of nature of content
-    Source           Device used to create the image
-    Comment          Miscellaneous comment; conversion
-                     from other image format
-
-The keyword-text pairs work like this.  Keywords should be short
-simple descriptions of what the comment is about.  Some typical
-keywords are found in the PNG specification, as is some recommendations
-on keywords.  You can repeat keywords in a file.  You can even write
-some text before the image and some after.  For example, you may want
-to put a description of the image before the image, but leave the
-disclaimer until after, so viewers working over modem connections
-don't have to wait for the disclaimer to go over the modem before
-they start seeing the image.  Finally, keywords should be full
-words, not abbreviations.  Keywords and text are in the ISO 8859-1
-(Latin-1) character set (a superset of regular ASCII) and can not
-contain NUL characters, and should not contain control or other
-unprintable characters.  To make the comments widely readable, stick
-with basic ASCII, and avoid machine specific character set extensions
-like the IBM-PC character set.  The keyword must be present, but
-you can leave off the text string on non-compressed pairs.
-Compressed pairs must have a text string, as only the text string
-is compressed anyway, so the compression would be meaningless.
-
-PNG supports modification time via the png_time structure.  Two
-conversion routines are provided, png_convert_from_time_t() for
-time_t and png_convert_from_struct_tm() for struct tm.  The
-time_t routine uses gmtime().  You don't have to use either of
-these, but if you wish to fill in the png_time structure directly,
-you should provide the time in universal time (GMT) if possible
-instead of your local time.  Note that the year number is the full
-year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and
-that months start with 1.
-
-If you want to store the time of the original image creation, you should
-use a plain tEXt chunk with the "Creation Time" keyword.  This is
-necessary because the "creation time" of a PNG image is somewhat vague,
-depending on whether you mean the PNG file, the time the image was
-created in a non-PNG format, a still photo from which the image was
-scanned, or possibly the subject matter itself.  In order to facilitate
-machine-readable dates, it is recommended that the "Creation Time"
-tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
-although this isn't a requirement.  Unlike the tIME chunk, the
-"Creation Time" tEXt chunk is not expected to be automatically changed
-by the software.  To facilitate the use of RFC 1123 dates, a function
-png_convert_to_rfc1123(png_timep) is provided to convert from PNG
-time to an RFC 1123 format string.
-
-Writing unknown chunks
-
-You can use the png_set_unknown_chunks function to queue up chunks
-for writing.  You give it a chunk name, raw data, and a size; that's
-all there is to it.  The chunks will be written by the next following
-png_write_info_before_PLTE, png_write_info, or png_write_end function.
-Any chunks previously read into the info structure's unknown-chunk
-list will also be written out in a sequence that satisfies the PNG
-specification's ordering rules.
-
-The high-level write interface
-
-At this point there are two ways to proceed; through the high-level
-write interface, or through a sequence of low-level write operations.
-You can use the high-level interface if your image data is present
-in the info structure.  All defined output
-transformations are permitted, enabled by the following masks.
-
-    PNG_TRANSFORM_IDENTITY      No transformation
-    PNG_TRANSFORM_PACKING       Pack 1, 2 and 4-bit samples
-    PNG_TRANSFORM_PACKSWAP      Change order of packed
-                                pixels to LSB first
-    PNG_TRANSFORM_INVERT_MONO   Invert monochrome images
-    PNG_TRANSFORM_SHIFT         Normalize pixels to the
-                                sBIT depth
-    PNG_TRANSFORM_BGR           Flip RGB to BGR, RGBA
-                                to BGRA
-    PNG_TRANSFORM_SWAP_ALPHA    Flip RGBA to ARGB or GA
-                                to AG
-    PNG_TRANSFORM_INVERT_ALPHA  Change alpha from opacity
-                                to transparency
-    PNG_TRANSFORM_SWAP_ENDIAN   Byte-swap 16-bit samples
-    PNG_TRANSFORM_STRIP_FILLER  Strip out filler bytes.
-
-If you have valid image data in the info structure (you can use
-png_set_rows() to put image data in the info structure), simply do this:
-
-    png_write_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the logical OR of some set of
-transformation flags.  This call is equivalent to png_write_info(),
-followed the set of transformations indicated by the transform mask,
-then png_write_image(), and finally png_write_end().
-
-(The final parameter of this call is not yet used.  Someday it might point
-to transformation parameters required by some future output transform.)
-
-The low-level write interface
-
-If you are going the low-level route instead, you are now ready to
-write all the file information up to the actual image data.  You do
-this with a call to png_write_info().
-
-    png_write_info(png_ptr, info_ptr);
-
-Note that there is one transformation you may need to do before
-png_write_info().  In PNG files, the alpha channel in an image is the
-level of opacity.  If your data is supplied as a level of
-transparency, you can invert the alpha channel before you write it, so
-that 0 is fully transparent and 255 (in 8-bit or paletted images) or
-65535 (in 16-bit images) is fully opaque, with
-
-    png_set_invert_alpha(png_ptr);
-
-This must appear before png_write_info() instead of later with the
-other transformations because in the case of paletted images the tRNS
-chunk data has to be inverted before the tRNS chunk is written.  If
-your image is not a paletted image, the tRNS data (which in such cases
-represents a single color to be rendered as transparent) won't need to
-be changed, and you can safely do this transformation after your
-png_write_info() call.
-
-If you need to write a private chunk that you want to appear before
-the PLTE chunk when PLTE is present, you can write the PNG info in
-two steps, and insert code to write your own chunk between them:
-
-    png_write_info_before_PLTE(png_ptr, info_ptr);
-    png_set_unknown_chunks(png_ptr, info_ptr, ...);
-    png_write_info(png_ptr, info_ptr);
-
-After you've written the file information, you can set up the library
-to handle any special transformations of the image data.  The various
-ways to transform the data will be described in the order that they
-should occur.  This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths.  Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data.  For example, don't swap red and blue on grayscale data.
-
-PNG files store RGB pixels packed into 3 or 6 bytes.  This code tells
-the library to strip input data that has 4 or 8 bytes per pixel down
-to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2
-bytes per pixel).
-
-    png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
-
-where the 0 is unused, and the location is either PNG_FILLER_BEFORE or
-PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel
-is stored XRGB or RGBX.
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit files.
-If the data is supplied at 1 pixel per byte, use this code, which will
-correctly pack the pixels into a single byte:
-
-    png_set_packing(png_ptr);
-
-PNG files reduce possible bit depths to 1, 2, 4, 8, and 16.  If your
-data is of another bit depth, you can write an sBIT chunk into the
-file so that decoders can recover the original data if desired.
-
-    /* Set the true bit depth of the image data */
-    if (color_type & PNG_COLOR_MASK_COLOR)
-    {
-        sig_bit.red = true_bit_depth;
-        sig_bit.green = true_bit_depth;
-        sig_bit.blue = true_bit_depth;
-    }
-    else
-    {
-        sig_bit.gray = true_bit_depth;
-    }
-    if (color_type & PNG_COLOR_MASK_ALPHA)
-    {
-        sig_bit.alpha = true_bit_depth;
-    }
-
-    png_set_sBIT(png_ptr, info_ptr, &sig_bit);
-
-If the data is stored in the row buffer in a bit depth other than
-one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG),
-this will scale the values to appear to be the correct bit depth as
-is required by PNG.
-
-    png_set_shift(png_ptr, &sig_bit);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first).  This code would be used if they are
-supplied the other way (little-endian, i.e. least significant bits
-first, the way PCs store them):
-
-    if (bit_depth > 8)
-       png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
-    if (bit_depth < 8)
-       png_set_packswap(png_ptr);
-
-PNG files store 3 color pixels in red, green, blue order.  This code
-would be used if they are supplied as blue, green, red:
-
-    png_set_bgr(png_ptr);
-
-PNG files describe monochrome as black being zero and white being
-one. This code would be used if the pixels are supplied with this reversed
-(black being one and white being zero):
-
-    png_set_invert_mono(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs.  This is done by setting a callback
-with
-
-    png_set_write_user_transform_fn(png_ptr,
-       write_transform_fn);
-
-You must supply the function
-
-    void write_transform_fn(png_ptr ptr, row_info_ptr
-       row_info, png_bytep data)
-
-See pngtest.c for a working example.  Your function will be called
-before any of the other transformations are processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function.
-
-    png_set_user_transform_info(png_ptr, user_ptr, 0, 0);
-
-The user_channels and user_depth parameters of this function are ignored
-when writing; you can set them to zero as shown.
-
-You can retrieve the pointer via the function png_get_user_transform_ptr().
-For example:
-
-    voidp write_user_transform_ptr =
-       png_get_user_transform_ptr(png_ptr);
-
-It is possible to have libpng flush any pending output, either manually,
-or automatically after a certain number of lines have been written.  To
-flush the output stream a single time call:
-
-    png_write_flush(png_ptr);
-
-and to have libpng flush the output stream periodically after a certain
-number of scanlines have been written, call:
-
-    png_set_flush(png_ptr, nrows);
-
-Note that the distance between rows is from the last time png_write_flush()
-was called, or the first row of the image if it has never been called.
-So if you write 50 lines, and then png_set_flush 25, it will flush the
-output on the next scanline, and every 25 lines thereafter, unless
-png_write_flush() is called before 25 more lines have been written.
-If nrows is too small (less than about 10 lines for a 640 pixel wide
-RGB image) the image compression may decrease noticeably (although this
-may be acceptable for real-time applications).  Infrequent flushing will
-only degrade the compression performance by a few percent over images
-that do not use flushing.
-
-Writing the image data
-
-That's it for the transformations.  Now you can write the image data.
-The simplest way to do this is in one function call.  If you have the
-whole image in memory, you can just call png_write_image() and libpng
-will write the image.  You will need to pass in an array of pointers to
-each row.  This function automatically handles interlacing, so you don't
-need to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_write_rows().
-
-    png_write_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
-    png_byte *row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to write the whole image at once, you can
-use png_write_rows() instead.  If the file is not interlaced,
-this is simple:
-
-    png_write_rows(png_ptr, row_pointers,
-       number_of_rows);
-
-row_pointers is the same as in the png_write_image() call.
-
-If you are just writing one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
-    png_bytep row_pointer = row;
-
-    png_write_row(png_ptr, row_pointer);
-
-When the file is interlaced, things can get a good deal more
-complicated.  The only currently (as of the PNG Specification
-version 1.2, dated July 1999) defined interlacing scheme for PNG files
-is the "Adam7" interlace scheme, that breaks down an
-image into seven smaller images of varying size.  libpng will build
-these images for you, or you can do them yourself.  If you want to
-build them yourself, see the PNG specification for details of which
-pixels to write when.
-
-If you don't want libpng to handle the interlacing details, just
-use png_set_interlace_handling() and call png_write_rows() the
-correct number of times to write all seven sub-images.
-
-If you want libpng to build the sub-images, call this before you start
-writing any rows:
-
-    number_of_passes =
-       png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed.  Currently, this
-is seven, but may change if another interlace type is added.
-
-Then write the complete image number_of_passes times.
-
-    png_write_rows(png_ptr, row_pointers,
-       number_of_rows);
-
-As some of these rows are not used, and thus return immediately,
-you may want to read about interlacing in the PNG specification,
-and only update the rows that are actually used.
-
-Finishing a sequential write
-
-After you are finished writing the image, you should finish writing
-the file.  If you are interested in writing comments or time, you should
-pass an appropriately filled png_info pointer.  If you are not interested,
-you can pass NULL.
-
-    png_write_end(png_ptr, info_ptr);
-
-When you are done, you can free all memory used by libpng like this:
-
-    png_destroy_write_struct(&png_ptr, &info_ptr);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
-    png_free_data(png_ptr, info_ptr, mask, seq)
-    mask  - identifies data to be freed, a mask
-            containing the logical OR of one or
-            more of
-              PNG_FREE_PLTE, PNG_FREE_TRNS,
-              PNG_FREE_HIST, PNG_FREE_ICCP,
-              PNG_FREE_PCAL, PNG_FREE_ROWS,
-              PNG_FREE_SCAL, PNG_FREE_SPLT,
-              PNG_FREE_TEXT, PNG_FREE_UNKN,
-            or simply PNG_FREE_ALL
-    seq   - sequence number of item to be freed
-            (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user  and not by libpng,  and will in those
-cases do nothing.  The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed.  If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-If you allocated data such as a palette that you passed
-in to libpng with png_set_*, you must not free it until just before the call to
-png_destroy_write_struct().
-
-The default behavior is only to free data that was allocated internally
-by libpng.  This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
-    png_data_freer(png_ptr, info_ptr, freer, mask)
-    mask   - which data elements are affected
-             same choices as in png_free_data()
-    freer  - one of
-               PNG_DESTROY_WILL_FREE_DATA
-               PNG_SET_WILL_FREE_DATA
-               PNG_USER_WILL_FREE_DATA
-
-For example, to transfer responsibility for some data from a read structure
-to a write structure, you could use
-
-    png_data_freer(read_ptr, read_info_ptr,
-       PNG_USER_WILL_FREE_DATA,
-       PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
-    png_data_freer(write_ptr, write_info_ptr,
-       PNG_DESTROY_WILL_FREE_DATA,
-       PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
-
-thereby briefly reassigning responsibility for freeing to the user but
-immediately afterwards reassigning it once more to the write_destroy
-function.  Having done this, it would then be safe to destroy the read
-structure and continue to use the PLTE, tRNS, and hIST data in the write
-structure.
-
-This function only affects data that has already been allocated.
-You can call this function before calling after the png_set_*() functions
-to control whether the user or png_destroy_*() is supposed to free the data.
-When the user assumes responsibility for libpng-allocated data, the
-application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key.  Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-For a more compact example of writing a PNG image, see the file example.c.
-
-V. Modifying/Customizing libpng:
-
-There are three issues here.  The first is changing how libpng does
-standard things like memory allocation, input/output, and error handling.
-The second deals with more complicated things like adding new chunks,
-adding new transformations, and generally changing how libpng works.
-Both of those are compile-time issues; that is, they are generally
-determined at the time the code is written, and there is rarely a need
-to provide the user with a means of changing them.  The third is a
-run-time issue:  choosing between and/or tuning one or more alternate
-versions of computationally intensive routines; specifically, optimized
-assembly-language (and therefore compiler- and platform-dependent)
-versions.
-
-Memory allocation, input/output, and error handling
-
-All of the memory allocation, input/output, and error handling in libpng
-goes through callbacks that are user-settable.  The default routines are
-in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively.  To change
-these functions, call the appropriate png_set_*_fn() function.
-
-Memory allocation is done through the functions png_malloc()
-and png_free().  These currently just call the standard C functions.  If
-your pointers can't access more then 64K at a time, you will want to set
-MAXSEG_64K in zlib.h.  Since it is unlikely that the method of handling
-memory allocation on a platform will change between applications, these
-functions must be modified in the library at compile time.  If you prefer
-to use a different method of allocating and freeing data, you can use
-png_create_read_struct_2() or png_create_write_struct_2() to register
-your own functions as described above.
-These functions also provide a void pointer that can be retrieved via
-
-    mem_ptr=png_get_mem_ptr(png_ptr);
-
-Your replacement memory functions must have prototypes as follows:
-
-    png_voidp malloc_fn(png_structp png_ptr,
-       png_size_t size);
-    void free_fn(png_structp png_ptr, png_voidp ptr);
-
-Your malloc_fn() must return NULL in case of failure.  The png_malloc()
-function will normally call png_error() if it receives a NULL from the
-system memory allocator or from your replacement malloc_fn().
-
-Input/Output in libpng is done through png_read() and png_write(),
-which currently just call fread() and fwrite().  The FILE * is stored in
-png_struct and is initialized via png_init_io().  If you wish to change
-the method of I/O, the library supplies callbacks that you can set
-through the function png_set_read_fn() and png_set_write_fn() at run
-time, instead of calling the png_init_io() function.  These functions
-also provide a void pointer that can be retrieved via the function
-png_get_io_ptr().  For example:
-
-    png_set_read_fn(png_structp read_ptr,
-        voidp read_io_ptr, png_rw_ptr read_data_fn)
-
-    png_set_write_fn(png_structp write_ptr,
-        voidp write_io_ptr, png_rw_ptr write_data_fn,
-        png_flush_ptr output_flush_fn);
-
-    voidp read_io_ptr = png_get_io_ptr(read_ptr);
-    voidp write_io_ptr = png_get_io_ptr(write_ptr);
-
-The replacement I/O functions must have prototypes as follows:
-
-    void user_read_data(png_structp png_ptr,
-        png_bytep data, png_size_t length);
-    void user_write_data(png_structp png_ptr,
-        png_bytep data, png_size_t length);
-    void user_flush_data(png_structp png_ptr);
-
-Supplying NULL for the read, write, or flush functions sets them back
-to using the default C stream functions.  It is an error to read from
-a write stream, and vice versa.
-
-Error handling in libpng is done through png_error() and png_warning().
-Errors handled through png_error() are fatal, meaning that png_error()
-should never return to its caller.  Currently, this is handled via
-setjmp() and longjmp() (unless you have compiled libpng with
-PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
-but you could change this to do things like exit() if you should wish.
-
-On non-fatal errors, png_warning() is called
-to print a warning message, and then control returns to the calling code.
-By default png_error() and png_warning() print a message on stderr via
-fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined
-(because you don't want the messages) or PNG_NO_STDIO defined (because
-fprintf() isn't available).  If you wish to change the behavior of the error
-functions, you will need to set up your own message callbacks.  These
-functions are normally supplied at the time that the png_struct is created.
-It is also possible to redirect errors and warnings to your own replacement
-functions after png_create_*_struct() has been called by calling:
-
-    png_set_error_fn(png_structp png_ptr,
-        png_voidp error_ptr, png_error_ptr error_fn,
-        png_error_ptr warning_fn);
-
-    png_voidp error_ptr = png_get_error_ptr(png_ptr);
-
-If NULL is supplied for either error_fn or warning_fn, then the libpng
-default function will be used, calling fprintf() and/or longjmp() if a
-problem is encountered.  The replacement error functions should have
-parameters as follows:
-
-    void user_error_fn(png_structp png_ptr,
-        png_const_charp error_msg);
-    void user_warning_fn(png_structp png_ptr,
-        png_const_charp warning_msg);
-
-The motivation behind using setjmp() and longjmp() is the C++ throw and
-catch exception handling methods.  This makes the code much easier to write,
-as there is no need to check every return code of every function call.
-However, there are some uncertainties about the status of local variables
-after a longjmp, so the user may want to be careful about doing anything after
-setjmp returns non-zero besides returning itself.  Consult your compiler
-documentation for more details.  For an alternative approach, you may wish
-to use the "cexcept" facility (see http://cexcept.sourceforge.net).
-
-Custom chunks
-
-If you need to read or write custom chunks, you may need to get deeper
-into the libpng code.  The library now has mechanisms for storing
-and writing chunks of unknown type; you can even declare callbacks
-for custom chunks.  Hoewver, this may not be good enough if the
-library code itself needs to know about interactions between your
-chunk and existing `intrinsic' chunks.
-
-If you need to write a new intrinsic chunk, first read the PNG
-specification. Acquire a first level of
-understanding of how it works.  Pay particular attention to the
-sections that describe chunk names, and look at how other chunks were
-designed, so you can do things similarly.  Second, check out the
-sections of libpng that read and write chunks.  Try to find a chunk
-that is similar to yours and use it as a template.  More details can
-be found in the comments inside the code.  It is best to handle unknown
-chunks in a generic method, via callback functions, instead of by
-modifying libpng functions.
-
-If you wish to write your own transformation for the data, look through
-the part of the code that does the transformations, and check out some of
-the simpler ones to get an idea of how they work.  Try to find a similar
-transformation to the one you want to add and copy off of it.  More details
-can be found in the comments inside the code itself.
-
-Configuring for 16 bit platforms
-
-You will want to look into zconf.h to tell zlib (and thus libpng) that
-it cannot allocate more then 64K at a time.  Even if you can, the memory
-won't be accessible.  So limit zlib and libpng to 64K by defining MAXSEG_64K.
-
-Configuring for DOS
-
-For DOS users who only have access to the lower 640K, you will
-have to limit zlib's memory usage via a png_set_compression_mem_level()
-call.  See zlib.h or zconf.h in the zlib library for more information.
-
-Configuring for Medium Model
-
-Libpng's support for medium model has been tested on most of the popular
-compilers.  Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
-defined, and FAR gets defined to far in pngconf.h, and you should be
-all set.  Everything in the library (except for zlib's structure) is
-expecting far data.  You must use the typedefs with the p or pp on
-the end for pointers (or at least look at them and be careful).  Make
-note that the rows of data are defined as png_bytepp, which is an
-unsigned char far * far *.
-
-Configuring for gui/windowing platforms:
-
-You will need to write new error and warning functions that use the GUI
-interface, as described previously, and set them to be the error and
-warning functions at the time that png_create_*_struct() is called,
-in order to have them available during the structure initialization.
-They can be changed later via png_set_error_fn().  On some compilers,
-you may also have to change the memory allocators (png_malloc, etc.).
-
-Configuring for compiler xxx:
-
-All includes for libpng are in pngconf.h.  If you need to add/change/delete
-an include, this is the place to do it.  The includes that are not
-needed outside libpng are protected by the PNG_INTERNAL definition,
-which is only defined for those routines inside libpng itself.  The
-files in libpng proper only include png.h, which includes pngconf.h.
-
-Configuring zlib:
-
-There are special functions to configure the compression.  Perhaps the
-most useful one changes the compression level, which currently uses
-input compression values in the range 0 - 9.  The library normally
-uses the default compression level (Z_DEFAULT_COMPRESSION = 6).  Tests
-have shown that for a large majority of images, compression values in
-the range 3-6 compress nearly as well as higher levels, and do so much
-faster.  For online applications it may be desirable to have maximum speed
-(Z_BEST_SPEED = 1).  With versions of zlib after v0.99, you can also
-specify no compression (Z_NO_COMPRESSION = 0), but this would create
-files larger than just storing the raw bitmap.  You can specify the
-compression level by calling:
-
-    png_set_compression_level(png_ptr, level);
-
-Another useful one is to reduce the memory level used by the library.
-The memory level defaults to 8, but it can be lowered if you are
-short on memory (running DOS, for example, where you only have 640K).
-Note that the memory level does have an effect on compression; among
-other things, lower levels will result in sections of incompressible
-data being emitted in smaller stored blocks, with a correspondingly
-larger relative overhead of up to 15% in the worst case.
-
-    png_set_compression_mem_level(png_ptr, level);
-
-The other functions are for configuring zlib.  They are not recommended
-for normal use and may result in writing an invalid PNG file.  See
-zlib.h for more information on what these mean.
-
-    png_set_compression_strategy(png_ptr,
-        strategy);
-    png_set_compression_window_bits(png_ptr,
-        window_bits);
-    png_set_compression_method(png_ptr, method);
-    png_set_compression_buffer_size(png_ptr, size);
-
-Controlling row filtering
-
-If you want to control whether libpng uses filtering or not, which
-filters are used, and how it goes about picking row filters, you
-can call one of these functions.  The selection and configuration
-of row filters can have a significant impact on the size and
-encoding speed and a somewhat lesser impact on the decoding speed
-of an image.  Filtering is enabled by default for RGB and grayscale
-images (with and without alpha), but not for paletted images nor
-for any images with bit depths less than 8 bits/pixel.
-
-The 'method' parameter sets the main filtering method, which is
-currently only '0' in the PNG 1.2 specification.  The 'filters'
-parameter sets which filter(s), if any, should be used for each
-scanline.  Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
-to turn filtering on and off, respectively.
-
-Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
-PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
-ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification.
-If you intend to change the filter type during the course of writing
-the image, you should start with flags set for all of the filters
-you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types.  (Note that this
-means the first row must always be adaptively filtered, because libpng
-currently does not allocate the filter buffers until png_write_row()
-is called for the first time.)
-
-    filters = PNG_FILTER_NONE | PNG_FILTER_SUB
-              PNG_FILTER_UP | PNG_FILTER_AVE |
-              PNG_FILTER_PAETH | PNG_ALL_FILTERS;
-
-    png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
-       filters);
-              The second parameter can also be
-              PNG_INTRAPIXEL_DIFFERENCING if you are
-              writing a PNG to be embedded in a MNG
-              datastream.  This parameter must be the
-              same as the value of filter_method used
-              in png_set_IHDR().
-
-It is also possible to influence how libpng chooses from among the
-available filters.  This is done in one or both of two ways - by
-telling it how important it is to keep the same filter for successive
-rows, and by telling it the relative computational costs of the filters.
-
-    double weights[3] = {1.5, 1.3, 1.1},
-       costs[PNG_FILTER_VALUE_LAST] =
-       {1.0, 1.3, 1.3, 1.5, 1.7};
-
-    png_set_filter_heuristics(png_ptr,
-       PNG_FILTER_HEURISTIC_WEIGHTED, 3,
-       weights, costs);
-
-The weights are multiplying factors that indicate to libpng that the
-row filter should be the same for successive rows unless another row filter
-is that many times better than the previous filter.  In the above example,
-if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a
-"sum of absolute differences" 1.5 x 1.3 times higher than other filters
-and still be chosen, while the NONE filter could have a sum 1.1 times
-higher than other filters and still be chosen.  Unspecified weights are
-taken to be 1.0, and the specified weights should probably be declining
-like those above in order to emphasize recent filters over older filters.
-
-The filter costs specify for each filter type a relative decoding cost
-to be considered when selecting row filters.  This means that filters
-with higher costs are less likely to be chosen over filters with lower
-costs, unless their "sum of absolute differences" is that much smaller.
-The costs do not necessarily reflect the exact computational speeds of
-the various filters, since this would unduly influence the final image
-size.
-
-Note that the numbers above were invented purely for this example and
-are given only to help explain the function usage.  Little testing has
-been done to find optimum values for either the costs or the weights.
-
-Removing unwanted object code
-
-There are a bunch of #define's in pngconf.h that control what parts of
-libpng are compiled.  All the defines end in _SUPPORTED.  If you are
-never going to use a capability, you can change the #define to #undef
-before recompiling libpng and save yourself code and data space, or
-you can turn off individual capabilities with defines that begin with
-PNG_NO_.
-
-You can also turn all of the transforms and ancillary chunk capabilities
-off en masse with compiler directives that define
-PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
-or all four,
-along with directives to turn on any of the capabilities that you do
-want.  The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable
-the extra transformations but still leave the library fully capable of reading
-and writing PNG files with all known public chunks
-Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive
-produces a library that is incapable of reading or writing ancillary chunks.
-If you are not using the progressive reading capability, you can
-turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse
-this with the INTERLACING capability, which you'll still have).
-
-All the reading and writing specific code are in separate files, so the
-linker should only grab the files it needs.  However, if you want to
-make sure, or if you are building a stand alone library, all the
-reading files start with pngr and all the writing files start with
-pngw.  The files that don't match either (like png.c, pngtrans.c, etc.)
-are used for both reading and writing, and always need to be included.
-The progressive reader is in pngpread.c
-
-If you are creating or distributing a dynamically linked library (a .so
-or DLL file), you should not remove or disable any parts of the library,
-as this will cause applications linked with different versions of the
-library to fail if they call functions not available in your library.
-The size of the library itself should not be an issue, because only
-those sections that are actually used will be loaded into memory.
-
-Requesting debug printout
-
-The macro definition PNG_DEBUG can be used to request debugging
-printout.  Set it to an integer value in the range 0 to 3.  Higher
-numbers result in increasing amounts of debugging information.  The
-information is printed to the "stderr" file, unless another file
-name is specified in the PNG_DEBUG_FILE macro definition.
-
-When PNG_DEBUG > 0, the following functions (macros) become available:
-
-   png_debug(level, message)
-   png_debug1(level, message, p1)
-   png_debug2(level, message, p1, p2)
-
-in which "level" is compared to PNG_DEBUG to decide whether to print
-the message, "message" is the formatted string to be printed,
-and p1 and p2 are parameters that are to be embedded in the string
-according to printf-style formatting directives.  For example,
-
-   png_debug1(2, "foo=%d\n", foo);
-
-is expanded to
-
-   if(PNG_DEBUG > 2)
-     fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
-
-When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
-can still use PNG_DEBUG to control your own debugging:
-
-   #ifdef PNG_DEBUG
-       fprintf(stderr, ...
-   #endif
-
-When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
-having level = 0 will be printed.  There aren't any such statements in
-this version of libpng, but if you insert some they will be printed.
-
-VI.  Runtime optimization
-
-A new feature in libpng 1.2.0 is the ability to dynamically switch between
-standard and optimized versions of some routines.  Currently these are
-limited to three computationally intensive tasks when reading PNG files:
-decoding row filters, expanding interlacing, and combining interlaced or
-transparent row data with previous row data.  Currently the optimized
-versions are available only for x86 (Intel, AMD, etc.) platforms with
-MMX support, though this may change in future versions.  (For example,
-the non-MMX assembler optimizations for zlib might become similarly
-runtime-selectable in future releases, in which case libpng could be
-extended to support them.  Alternatively, the compile-time choice of
-floating-point versus integer routines for gamma correction might become
-runtime-selectable.)
-
-Because such optimizations tend to be very platform- and compiler-dependent,
-both in how they are written and in how they perform, the new runtime code
-in libpng has been written to allow programs to query, enable, and disable
-either specific optimizations or all such optimizations.  For example, to
-enable all possible optimizations (bearing in mind that some "optimizations"
-may actually run more slowly in rare cases):
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       png_uint_32 mask, flags;
-
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags | mask);
-    #endif
-
-To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
-by itself when calling png_get_asm_flagmask(); similarly for optimizing
-only writing.  To disable all optimizations:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags & ~mask);
-    #endif
-
-To enable or disable only MMX-related features, use png_get_mmx_flagmask()
-in place of png_get_asm_flagmask().  The mmx version takes one additional
-parameter:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
-       int compilerID;
-
-       mask = png_get_mmx_flagmask(selection, &compilerID);
-    #endif
-
-On return, compilerID will indicate which version of the MMX assembler
-optimizations was compiled.  Currently two flavors exist:  Microsoft
-Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
-On non-x86 platforms or on systems compiled without MMX optimizations, a
-value of -1 is used.
-
-Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
-all valid, settable optimization bits for the version of the library that's
-currently in use.  In the case of shared (dynamically linked) libraries,
-this may include optimizations that did not exist at the time the code was
-written and compiled.  It is also possible, of course, to enable only known,
-specific optimizations; for example:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-       png_set_asm_flags(png_ptr, flags);
-    #endif
-
-This method would enable only the MMX read-optimizations available at the
-time of libpng 1.2.0's release, regardless of whether a later version of
-the DLL were actually being used.  (Also note that these functions did not
-exist in versions older than 1.2.0, so any attempt to run a dynamically
-linked app on such an older version would fail.)
-
-To determine whether the processor supports MMX instructions at all, use
-the png_mmx_support() function:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       mmxsupport = png_mmx_support();
-    #endif
-
-It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
-is compiled but MMX is not supported by the processor, or 1 if MMX support
-is fully available.  Note that png_mmx_support(), png_get_mmx_flagmask(),
-and png_get_asm_flagmask() all may be called without allocating and ini-
-tializing any PNG structures (for example, as part of a usage screen or
-"about" box).
-
-The following code can be used to prevent an application from using the
-thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK
-defined:
-
-#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
-  && defined(PNG_THREAD_UNSAFE_OK)
-    /* Disable thread-unsafe features of pnggccrd */
-    if (png_access_version() >= 10200)
-    {
-      png_uint_32 mmx_disable_mask = 0;
-      png_uint_32 asm_flags;
-
-      mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-      asm_flags = png_get_asm_flags(png_ptr);
-      png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
-    }
-#endif
-
-For more extensive examples of runtime querying, enabling and disabling
-of optimized features, see contrib/gregbook/readpng2.c in the libpng
-source-code distribution.
-
-VI.  MNG support
-
-The MNG specification (available at http://www.libpng.org/pub/mng) allows
-certain extensions to PNG for PNG images that are embedded in MNG datastreams.
-Libpng can support some of these extensions.  To enable them, use the
-png_permit_mng_features() function:
-
-   feature_set = png_permit_mng_features(png_ptr, mask)
-   mask is a png_uint_32 containing the logical OR of the
-        features you want to enable.  These include
-        PNG_FLAG_MNG_EMPTY_PLTE
-        PNG_FLAG_MNG_FILTER_64
-        PNG_ALL_MNG_FEATURES
-   feature_set is a png_uint_32 that is the logical AND of
-      your mask with the set of MNG features that is
-      supported by the version of libpng that you are using.
-
-It is an error to use this function when reading or writing a standalone
-PNG file with the PNG 8-byte signature.  The PNG datastream must be wrapped
-in a MNG datastream.  As a minimum, it must have the MNG 8-byte signature
-and the MHDR and MEND chunks.  Libpng does not provide support for these
-or any other MNG chunks; your application must provide its own support for
-them.  You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
-
-VII.  Changes to Libpng from version 0.88
-
-It should be noted that versions of libpng later than 0.96 are not
-distributed by the original libpng author, Guy Schalnat, nor by
-Andreas Dilger, who had taken over from Guy during 1996 and 1997, and
-distributed versions 0.89 through 0.96, but rather by another member
-of the original PNG Group, Glenn Randers-Pehrson.  Guy and Andreas are
-still alive and well, but they have moved on to other things.
-
-The old libpng functions png_read_init(), png_write_init(),
-png_info_init(), png_read_destroy(), and png_write_destroy() have been
-moved to PNG_INTERNAL in version 0.95 to discourage their use.  These
-functions will be removed from libpng version 2.0.0.
-
-The preferred method of creating and initializing the libpng structures is
-via the png_create_read_struct(), png_create_write_struct(), and
-png_create_info_struct() because they isolate the size of the structures
-from the application, allow version error checking, and also allow the
-use of custom error handling routines during the initialization, which
-the old functions do not.  The functions png_read_destroy() and
-png_write_destroy() do not actually free the memory that libpng
-allocated for these structs, but just reset the data structures, so they
-can be used instead of png_destroy_read_struct() and
-png_destroy_write_struct() if you feel there is too much system overhead
-allocating and freeing the png_struct for each image read.
-
-Setting the error callbacks via png_set_message_fn() before
-png_read_init() as was suggested in libpng-0.88 is no longer supported
-because this caused applications that do not use custom error functions
-to fail if the png_ptr was not initialized to zero.  It is still possible
-to set the error callbacks AFTER png_read_init(), or to change them with
-png_set_error_fn(), which is essentially the same function, but with a new
-name to force compilation errors with applications that try to use the old
-method.
-
-Starting with version 1.0.7, you can find out which version of the library
-you are using at run-time:
-
-   png_uint_32 libpng_vn = png_access_version_number();
-
-The number libpng_vn is constructed from the major version, minor
-version with leading zero, and release number with leading zero,
-(e.g., libpng_vn for version 1.0.7 is 10007).
-
-You can also check which version of png.h you used when compiling your
-application:
-
-   png_uint_32 application_vn = PNG_LIBPNG_VER;
-
-VII. Y2K Compliance in libpng
-
-August 10, 2004
-
-Since the PNG Development group is an ad-hoc body, we can't make
-an official declaration.
-
-This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.6rc5 are Y2K compliant.  It is my belief that earlier
-versions were also Y2K compliant.
-
-Libpng only has three year fields.  One is a 2-byte unsigned integer that
-will hold years up to 65535.  The other two hold the date in text
-format, and will hold years up to 9999.
-
-The integer is
-    "png_uint_16 year" in png_time_struct.
-
-The strings are
-    "png_charp time_buffer" in png_struct and
-    "near_time_buffer", which is a local character string in png.c.
-
-There are seven time-related functions:
-
-    png_convert_to_rfc_1123() in png.c
-      (formerly png_convert_to_rfc_1152() in error)
-    png_convert_from_struct_tm() in pngwrite.c, called
-      in pngwrite.c
-    png_convert_from_time_t() in pngwrite.c
-    png_get_tIME() in pngget.c
-    png_handle_tIME() in pngrutil.c, called in pngread.c
-    png_set_tIME() in pngset.c
-    png_write_tIME() in pngwutil.c, called in pngwrite.c
-
-All appear to handle dates properly in a Y2K environment.  The
-png_convert_from_time_t() function calls gmtime() to convert from system
-clock time, which returns (year - 1900), which we properly convert to
-the full 4-digit year.  There is a possibility that applications using
-libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
-function, or that they are incorrectly passing only a 2-digit year
-instead of "year - 1900" into the png_convert_from_struct_tm() function,
-but this is not under our control.  The libpng documentation has always
-stated that it works with 4-digit years, and the APIs have been
-documented as such.
-
-The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
-integer to hold the year, and can hold years as large as 65535.
-
-zlib, upon which libpng depends, is also Y2K compliant.  It contains
-no date-related code.
-
-
-   Glenn Randers-Pehrson
-   libpng maintainer
-   PNG Development Group
diff --git a/tkimg1.3/libpng/libpngpf.3 b/tkimg1.3/libpng/libpngpf.3
deleted file mode 100644
index 597638b..0000000
--- a/tkimg1.3/libpng/libpngpf.3
+++ /dev/null
@@ -1,1096 +0,0 @@
-.TH LIBPNGPF 3 "August 10, 2004"
-.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.6rc5
-(private functions)
-.SH SYNOPSIS
-\fB\fB#include <png.h>\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_build_gamma_table (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_build_grayscale_palette (int \fP\fI\fP\fIbit_depth\fP\fB\fP\fB, png_colorp \fI\fIpalette\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_calculate_crc (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIptr\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_check_chunk_name (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fI\fIchunk_name\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_size_t png_check_keyword (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charpp \fI\fInew_key\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_combine_row (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, int \fI\fImask\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_correct_palette (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_colorp \fP\fI\fP\fIpalette\fP\fB\fP\fB, int \fI\fInum_palette\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBint png_crc_error (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBint png_crc_finish (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIskip\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_crc_read (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIbuf\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_voidp png_create_struct (int \fI\fItype\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_voidp png_create_struct_2 (int \fP\fI\fP\fItype\fP\fB\fP\fB, png_malloc_ptr \fP\fI\fP\fImalloc_fn\fP\fB\fP\fB, png_voidp \fI\fImem_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_charp png_decompress_chunk (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, int \fP\fI\fP\fIcomp_type\fP\fB\fP\fB, png_charp \fP\fI\fP\fIchunkdata\fP\fB\fP\fB, png_size_t \fP\fI\fP\fIchunklength\fP\fB\fP\fB, png_size_t \fP\fI\fP\fIprefix_length\fP\fB\fP\fB, png_size_t \fI\fI*data_length\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_destroy_struct (png_voidp \fI\fIstruct_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_destroy_struct_2 (png_voidp \fP\fI\fP\fIstruct_ptr\fP\fB\fP\fB, png_free_ptr \fP\fI\fP\fIfree_fn\fP\fB\fP\fB, png_voidp \fI\fImem_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_background (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_color_16p \fP\fI\fP\fItrans_values\fP\fB\fP\fB, png_color_16p \fP\fI\fP\fIbackground\fP\fB\fP\fB, png_color_16p \fP\fI\fP\fIbackground_1\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIgamma_table\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIgamma_from_1\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIgamma_to_1\fP\fB\fP\fB, png_uint_16pp \fP\fI\fP\fIgamma_16\fP\fB\fP\fB, png_uint_16pp \fP\fI\fP\fIgamma_16_from_1\fP\fB\fP\fB, png_uint_16pp \fP\fI\fP\fIgamma_16_to_1\fP\fB\fP\fB, int \fI\fIgamma_shift\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_bgr (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_chop (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_dither (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIpalette_lookup\fP\fB\fP\fB, png_bytep \fI\fIdither_lookup\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_expand (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_color_16p \fI\fItrans_value\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_expand_palette (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_colorp \fP\fI\fP\fIpalette\fP\fB\fP\fB, png_bytep \fP\fI\fP\fItrans\fP\fB\fP\fB, int \fI\fInum_trans\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_gamma (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIgamma_table\fP\fB\fP\fB, png_uint_16pp \fP\fI\fP\fIgamma_16_table\fP\fB\fP\fB, int \fI\fIgamma_shift\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_invert (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_pack (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_uint_32 \fI\fIbit_depth\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_packswap (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_read_filler (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIfiller\fP\fB\fP\fB, png_uint_32 \fI\fIflags\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_read_interlace (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, int \fP\fI\fP\fIpass\fP\fB\fP\fB, png_uint_32 \fI\fItransformations\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_read_transformations (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBint png_do_rgb_to_gray (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_shift (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_color_8p \fI\fIbit_depth\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_strip_filler (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_uint_32 \fI\fIflags\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_swap (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_unpack (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_unshift (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_color_8p \fI\fIsig_bits\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_write_interlace (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, int \fI\fIpass\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_do_write_transformations (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fI\fP\fIptr\fP\fB\fP\fB, int \fI\fIcheck\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_flush (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_int_32 png_get_int_32 (png_bytep \fI\fIbuf\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_uint_16 png_get_uint_16 (png_bytep \fI\fIbuf\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_uint_32 png_get_uint_31 (png_bytep \fI\fIbuf\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBpng_uint_32 png_get_uint_32 (png_bytep \fI\fIbuf\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_bKGD (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_cHRM (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_gAMA (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_hIST (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_IEND (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_IHDR (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_iCCP (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_iTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_oFFs (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_pCAL (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_pHYs (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_PLTE (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_sBIT (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_sCAL (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_sPLT (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_sRGB (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_tEXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_tIME (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_tRNS (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_unknown (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_handle_zTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_info_destroy (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_init_mmx_flags (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_init_read_transformations (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_process_IDAT_data (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIbuffer\fP\fB\fP\fB, png_size_t \fI\fIbuffer_length\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_process_some_data (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_check_crc (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_crc_finish (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_crc_skip (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_fill_buffer (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIbuffer\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_handle_tEXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_handle_unknown (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_handle_zTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_have_end (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_have_info (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_have_row (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fI\fIrow\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_process_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_chunk (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_end (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_IDAT (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_sig (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_tEXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_read_zTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_restore_buffer (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIbuffer\fP\fB\fP\fB, png_size_t \fI\fIbuffer_length\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_push_save_buffer (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_data (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIdata\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_filter_row (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_row_infop \fP\fI\fP\fIrow_info\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIrow\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIprev_row\fP\fB\fP\fB, int \fI\fIfilter\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_finish_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_push_finish_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_start_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_read_transform_info (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fI\fIinfo_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_reset_crc (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_save_int_32 (png_bytep \fP\fI\fP\fIbuf\fP\fB\fP\fB, png_int_32 \fI\fIi\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_save_uint_16 (png_bytep \fP\fI\fP\fIbuf\fP\fB\fP\fB, unsigned int \fI\fIi\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_save_uint_32 (png_bytep \fP\fI\fP\fIbuf\fP\fB\fP\fB, png_uint_32 \fI\fIi\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBint png_set_text_2 (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_textp \fP\fI\fP\fItext_ptr\fP\fB\fP\fB, int \fI\fInum_text)\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_cHRM (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, double \fP\fI\fP\fIwhite_x\fP\fB\fP\fB, double \fP\fI\fP\fIwhite_y\fP\fB\fP\fB, double \fP\fI\fP\fIred_x\fP\fB\fP\fB, double \fP\fI\fP\fIred_y\fP\fB\fP\fB, double \fP\fI\fP\fIgreen_x\fP\fB\fP\fB, double \fP\fI\fP\fIgreen_y\fP\fB\fP\fB, double \fP\fI\fP\fIblue_x\fP\fB\fP\fB, double \fI\fIblue_y\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_cHRM_fixed (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIwhite_x\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIwhite_y\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIred_x\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIred_y\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIgreen_x\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIgreen_y\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIblue_x\fP\fB\fP\fB, png_uint_32 \fI\fIblue_y\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_data (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIdata\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_filtered_row (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fI\fIfiltered_row\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_find_filter (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_row_infop \fI\fIrow_info\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_finish_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_gAMA (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, double \fI\fIfile_gamma\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_gAMA_fixed (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fI\fIint_file_gamma\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_hIST (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_16p \fP\fI\fP\fIhist\fP\fB\fP\fB, int \fI\fInum_hist\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_iCCP (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIname\fP\fB\fP\fB, int \fP\fI\fP\fIcompression_type\fP\fB\fP\fB, png_charp \fP\fI\fP\fIprofile\fP\fB\fP\fB, int \fI\fIproflen\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_IDAT (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fIdata\fP\fB\fP\fB, png_size_t \fI\fIlength\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_IEND (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_IHDR (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIwidth\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIheight\fP\fB\fP\fB, int \fP\fI\fP\fIbit_depth\fP\fB\fP\fB, int \fP\fI\fP\fIcolor_type\fP\fB\fP\fB, int \fP\fI\fP\fIcompression_type\fP\fB\fP\fB, int \fP\fI\fP\fIfilter_type\fP\fB\fP\fB, int \fI\fIinterlace_type\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_iTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, int \fP\fI\fP\fIcompression\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charp \fP\fI\fP\fIlang\fP\fB\fP\fB, png_charp \fP\fI\fP\fItranslated_key\fP\fB\fP\fB, png_charp \fI\fItext)\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_oFFs (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIx_offset\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIy_offset\fP\fB\fP\fB, int \fI\fIunit_type\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_pCAL (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIpurpose\fP\fB\fP\fB, png_int_32 \fP\fI\fP\fIX0\fP\fB\fP\fB, png_int_32 \fP\fI\fP\fIX1\fP\fB\fP\fB, int \fP\fI\fP\fItype\fP\fB\fP\fB, int \fP\fI\fP\fInparams\fP\fB\fP\fB, png_charp \fP\fI\fP\fIunits\fP\fB\fP\fB, png_charpp \fI\fIparams\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_pHYs (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIx_pixels_per_unit\fP\fB\fP\fB, png_uint_32 \fP\fI\fP\fIy_pixels_per_unit\fP\fB\fP\fB, int \fI\fIunit_type\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_PLTE (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_colorp \fP\fI\fP\fIpalette\fP\fB\fP\fB, png_uint_32 \fI\fInum_pal\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sBIT (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_color_8p \fP\fI\fP\fIsbit\fP\fB\fP\fB, int \fI\fIcolor_type\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sCAL (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIunit\fP\fB\fP\fB, double \fP\fI\fP\fIwidth\fP\fB\fP\fB, double \fI\fIheight\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sCAL_s (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIunit\fP\fB\fP\fB, png_charp \fP\fI\fP\fIwidth\fP\fB\fP\fB, png_charp \fI\fIheight\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sig (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sRGB (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, int \fI\fIintent\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_sPLT (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_spalette_p \fI\fIpalette\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_start_row (png_structp \fI\fIpng_ptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_tEXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charp \fP\fI\fP\fItext\fP\fB\fP\fB, png_size_t \fI\fItext_len\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_tIME (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_timep \fI\fImod_time\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_tRNS (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_bytep \fP\fI\fP\fItrans\fP\fB\fP\fB, png_color_16p \fP\fI\fP\fIvalues\fP\fB\fP\fB, int \fP\fI\fP\fInumber\fP\fB\fP\fB, int \fI\fIcolor_type\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_write_zTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charp \fP\fI\fP\fItext\fP\fB\fP\fB, png_size_t \fP\fI\fP\fItext_len\fP\fB\fP\fB, int \fI\fIcompression\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoidpf png_zalloc (voidpf \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, uInt \fP\fI\fP\fIitems\fP\fB\fP\fB, uInt \fI\fIsize\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-\fB\fBvoid png_zfree (voidpf \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, voidpf \fI\fIptr\fP\fB\fP\fB);\fP\fP
-
-\fI\fB
-
-\fI\fB\fI\fB
-
-\fI\fB
-
-.SH DESCRIPTION
-The functions listed above are used privately by libpng
-and are not recommended for use by applications.  They are
-not "exported" to applications using shared libraries.  They
-are listed alphabetically here as an aid to libpng maintainers.
-See png.h for more information on these functions.
-
-.SH SEE ALSO
-libpng(3), png(5)
-.SH AUTHOR
-Glenn Randers-Pehrson
diff --git a/tkimg1.3/libpng/png.5 b/tkimg1.3/libpng/png.5
deleted file mode 100644
index 1ea9417..0000000
--- a/tkimg1.3/libpng/png.5
+++ /dev/null
@@ -1,60 +0,0 @@
-.TH PNG 5 "August 10, 2004"
-.SH NAME
-png \- Portable Network Graphics (PNG) format
-.SH DESCRIPTION
-PNG (Portable Network Graphics) is an extensible file format for the
-lossless, portable, well-compressed storage of raster images. PNG provides
-a patent-free replacement for GIF and can also replace many
-common uses of TIFF. Indexed-color, grayscale, and truecolor images are
-supported, plus an optional alpha channel. Sample depths range from
-1 to 16 bits.
-.br
-
-PNG is designed to work well in online viewing applications, such as the
-World Wide Web, so it is fully streamable with a progressive display
-option. PNG is robust, providing both full file integrity checking and
-fast, simple detection of common transmission errors. Also, PNG can store
-gamma and chromaticity data for improved color matching on heterogeneous
-platforms.
-
-.SH "SEE ALSO"
-.IR libpng(3), zlib(3), deflate(5), and zlib(5)
-.LP
-PNG 1.2 specification, July 1999:
-.IP
-.br
-http://www.libpng.org/pub/png
-.br
-or ftp://ftp.uu.net/graphics/png/documents
-.LP
-PNG 1.0 specification, October 1996:
-.IP
-.br
-RFC 2083
-.IP
-.br
-ftp://ds.internic.net/rfc/rfc2083.txt
-.br
-or (as a W3C Recommendation) at
-.br
-http://www.w3.org/TR/REC-png.html
-.SH AUTHORS
-This man page: Glenn Randers-Pehrson
-.LP
-Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999):
-Glenn Randers-Pehrson and others (png-list at ccrc.wustl.edu).
-.LP
-Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996):
-Thomas Boutell and others (png-list at ccrc.wustl.edu).
-.LP
-
-
-.SH COPYRIGHT NOTICE
-The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson.
-See the specification for conditions of use and distribution.
-.LP
-The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of
-Technology.  See the specification for conditions of use and distribution.
-.LP
-.\" end of man page
-
diff --git a/tkimg1.3/libpng/png.c b/tkimg1.3/libpng/png.c
deleted file mode 100644
index 76446de..0000000
--- a/tkimg1.3/libpng/png.c
+++ /dev/null
@@ -1,826 +0,0 @@
-
-/* png.c - location for general purpose libpng functions
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#define PNG_NO_EXTERN
-#include "png.h"
-
-/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_6rc5 Your_png_h_is_not_version_1_2_6rc5;
-
-/* Version information for C files.  This had better match the version
- * string defined in png.h.  */
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-/* png_libpng_ver was changed to a function in version 1.0.5c */
-const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
-
-/* png_sig was changed to a function in version 1.0.5c */
-/* Place to hold the signature string for a PNG file. */
-const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
-
-/* Invoke global declarations for constant strings for known chunk types */
-PNG_IHDR;
-PNG_IDAT;
-PNG_IEND;
-PNG_PLTE;
-PNG_bKGD;
-PNG_cHRM;
-PNG_gAMA;
-PNG_hIST;
-PNG_iCCP;
-PNG_iTXt;
-PNG_oFFs;
-PNG_pCAL;
-PNG_sCAL;
-PNG_pHYs;
-PNG_sBIT;
-PNG_sPLT;
-PNG_sRGB;
-PNG_tEXt;
-PNG_tIME;
-PNG_tRNS;
-PNG_zTXt;
-
-/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-/* start of interlace block */
-const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
-
-/* offset to next interlace block */
-const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-
-/* start of interlace block in the y direction */
-const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
-
-/* offset to next interlace block in the y direction */
-const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-
-/* width of interlace block (used in assembler routines only) */
-#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
-const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
-#endif
-
-/* Height of interlace block.  This is not currently used - if you need
- * it, uncomment it here and in png.h
-const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
-*/
-
-/* Mask to determine which pixels are valid in a pass */
-const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-
-/* Mask to determine which pixels to overwrite while displaying */
-const int FARDATA png_pass_dsp_mask[]
-   = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
-
-#endif
-
-/* Tells libpng that we have already handled the first "num_bytes" bytes
- * of the PNG file signature.  If the PNG data is embedded into another
- * stream we can set num_bytes = 8 so that libpng will not attempt to read
- * or write any of the magic bytes before it starts on the IHDR.
- */
-
-void PNGAPI
-png_set_sig_bytes(png_structp png_ptr, int num_bytes)
-{
-   png_debug(1, "in png_set_sig_bytes\n");
-   if (num_bytes > 8)
-      png_error(png_ptr, "Too many bytes for PNG signature.");
-
-   png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
-}
-
-/* Checks whether the supplied bytes match the PNG signature.  We allow
- * checking less than the full 8-byte signature so that those apps that
- * already read the first few bytes of a file to determine the file type
- * can simply check the remaining bytes for extra assurance.  Returns
- * an integer less than, equal to, or greater than zero if sig is found,
- * respectively, to be less than, to match, or be greater than the correct
- * PNG signature (this is the same behaviour as strcmp, memcmp, etc).
- */
-int PNGAPI
-png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
-{
-   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
-   if (num_to_check > 8)
-      num_to_check = 8;
-   else if (num_to_check < 1)
-      return (0);
-
-   if (start > 7)
-      return (0);
-
-   if (start + num_to_check > 8)
-      num_to_check = 8 - start;
-
-   return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
-}
-
-/* (Obsolete) function to check signature bytes.  It does not allow one
- * to check a partial signature.  This function might be removed in the
- * future - use png_sig_cmp().  Returns true (nonzero) if the file is a PNG.
- */
-int PNGAPI
-png_check_sig(png_bytep sig, int num)
-{
-  return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
-}
-
-/* Function to allocate memory for zlib and clear it to 0. */
-#ifdef PNG_1_0_X
-voidpf PNGAPI
-#else
-voidpf /* private */
-#endif
-png_zalloc(voidpf png_ptr, uInt items, uInt size)
-{
-   png_voidp ptr;
-   png_structp p=png_ptr;
-   png_uint_32 save_flags=p->flags;
-   png_uint_32 num_bytes;
-
-   if (items > PNG_UINT_32_MAX/size)
-   {
-     png_warning (png_ptr, "Potential overflow in png_zalloc()");
-     return (NULL);
-   }
-   num_bytes = (png_uint_32)items * size;
-
-   p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
-   ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
-   p->flags=save_flags;
-
-#if defined(PNG_1_0_X) && !defined(PNG_NO_ZALLOC_ZERO)
-   if (ptr == NULL)
-       return ((voidpf)ptr);
-
-   if (num_bytes > (png_uint_32)0x8000L)
-   {
-      png_memset(ptr, 0, (png_size_t)0x8000L);
-      png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0,
-         (png_size_t)(num_bytes - (png_uint_32)0x8000L));
-   }
-   else
-   {
-      png_memset(ptr, 0, (png_size_t)num_bytes);
-   }
-#endif
-   return ((voidpf)ptr);
-}
-
-/* function to free memory for zlib */
-#ifdef PNG_1_0_X
-void PNGAPI
-#else
-void /* private */
-#endif
-png_zfree(voidpf png_ptr, voidpf ptr)
-{
-   png_free((png_structp)png_ptr, (png_voidp)ptr);
-}
-
-/* Reset the CRC variable to 32 bits of 1's.  Care must be taken
- * in case CRC is > 32 bits to leave the top bits 0.
- */
-void /* PRIVATE */
-png_reset_crc(png_structp png_ptr)
-{
-   png_ptr->crc = crc32(0, Z_NULL, 0);
-}
-
-/* Calculate the CRC over a section of data.  We can only pass as
- * much data to this routine as the largest single buffer size.  We
- * also check that this data will actually be used before going to the
- * trouble of calculating it.
- */
-void /* PRIVATE */
-png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)
-{
-   int need_crc = 1;
-
-   if (png_ptr->chunk_name[0] & 0x20)                     /* ancillary */
-   {
-      if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==
-          (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
-         need_crc = 0;
-   }
-   else                                                    /* critical */
-   {
-      if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
-         need_crc = 0;
-   }
-
-   if (need_crc)
-      png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length);
-}
-
-/* Allocate the memory for an info_struct for the application.  We don't
- * really need the png_ptr, but it could potentially be useful in the
- * future.  This should be used in favour of malloc(png_sizeof(png_info))
- * and png_info_init() so that applications that want to use a shared
- * libpng don't have to be recompiled if png_info changes size.
- */
-png_infop PNGAPI
-png_create_info_struct(png_structp png_ptr)
-{
-   png_infop info_ptr;
-
-   png_debug(1, "in png_create_info_struct\n");
-   if(png_ptr == NULL) return (NULL);
-#ifdef PNG_USER_MEM_SUPPORTED
-   info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
-      png_ptr->malloc_fn, png_ptr->mem_ptr);
-#else
-   info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
-#endif
-   if (info_ptr != NULL)
-      png_info_init_3(&info_ptr, png_sizeof(png_info));
-
-   return (info_ptr);
-}
-
-/* This function frees the memory associated with a single info struct.
- * Normally, one would use either png_destroy_read_struct() or
- * png_destroy_write_struct() to free an info struct, but this may be
- * useful for some applications.
- */
-void PNGAPI
-png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
-{
-   png_infop info_ptr = NULL;
-
-   png_debug(1, "in png_destroy_info_struct\n");
-   if (info_ptr_ptr != NULL)
-      info_ptr = *info_ptr_ptr;
-
-   if (info_ptr != NULL)
-   {
-      png_info_destroy(png_ptr, info_ptr);
-
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn,
-          png_ptr->mem_ptr);
-#else
-      png_destroy_struct((png_voidp)info_ptr);
-#endif
-      *info_ptr_ptr = NULL;
-   }
-}
-
-/* Initialize the info structure.  This is now an internal function (0.89)
- * and applications using it are urged to use png_create_info_struct()
- * instead.
- */
-#undef png_info_init
-void PNGAPI
-png_info_init(png_infop info_ptr)
-{
-   /* We only come here via pre-1.0.12-compiled applications */
-   png_info_init_3(&info_ptr, 0);
-}
-
-void PNGAPI
-png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
-{
-   png_infop info_ptr = *ptr_ptr;
-
-   png_debug(1, "in png_info_init_3\n");
-
-   if(png_sizeof(png_info) > png_info_struct_size)
-     {
-       png_destroy_struct(info_ptr);
-       info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
-       *ptr_ptr = info_ptr;
-     }
-
-   /* set everything to 0 */
-   png_memset(info_ptr, 0, png_sizeof (png_info));
-}
-
-#ifdef PNG_FREE_ME_SUPPORTED
-void PNGAPI
-png_data_freer(png_structp png_ptr, png_infop info_ptr,
-   int freer, png_uint_32 mask)
-{
-   png_debug(1, "in png_data_freer\n");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-   if(freer == PNG_DESTROY_WILL_FREE_DATA)
-      info_ptr->free_me |= mask;
-   else if(freer == PNG_USER_WILL_FREE_DATA)
-      info_ptr->free_me &= ~mask;
-   else
-      png_warning(png_ptr,
-         "Unknown freer parameter in png_data_freer.");
-}
-#endif
-
-void PNGAPI
-png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
-   int num)
-{
-   png_debug(1, "in png_free_data\n");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-#if defined(PNG_TEXT_SUPPORTED)
-/* free text item num or (if num == -1) all text items */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_TEXT)
-#endif
-{
-   if (num != -1)
-   {
-     if (info_ptr->text && info_ptr->text[num].key)
-     {
-         png_free(png_ptr, info_ptr->text[num].key);
-         info_ptr->text[num].key = NULL;
-     }
-   }
-   else
-   {
-       int i;
-       for (i = 0; i < info_ptr->num_text; i++)
-           png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);
-       png_free(png_ptr, info_ptr->text);
-       info_ptr->text = NULL;
-       info_ptr->num_text=0;
-   }
-}
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-/* free any tRNS entry */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
-#else
-if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
-#endif
-{
-    png_free(png_ptr, info_ptr->trans);
-    info_ptr->valid &= ~PNG_INFO_tRNS;
-#ifndef PNG_FREE_ME_SUPPORTED
-    png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
-#endif
-    info_ptr->trans = NULL;
-}
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-/* free any sCAL entry */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_SCAL)
-#endif
-{
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
-    png_free(png_ptr, info_ptr->scal_s_width);
-    png_free(png_ptr, info_ptr->scal_s_height);
-    info_ptr->scal_s_width = NULL;
-    info_ptr->scal_s_height = NULL;
-#endif
-    info_ptr->valid &= ~PNG_INFO_sCAL;
-}
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-/* free any pCAL entry */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_PCAL)
-#endif
-{
-    png_free(png_ptr, info_ptr->pcal_purpose);
-    png_free(png_ptr, info_ptr->pcal_units);
-    info_ptr->pcal_purpose = NULL;
-    info_ptr->pcal_units = NULL;
-    if (info_ptr->pcal_params != NULL)
-    {
-        int i;
-        for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
-        {
-          png_free(png_ptr, info_ptr->pcal_params[i]);
-          info_ptr->pcal_params[i]=NULL;
-        }
-        png_free(png_ptr, info_ptr->pcal_params);
-        info_ptr->pcal_params = NULL;
-    }
-    info_ptr->valid &= ~PNG_INFO_pCAL;
-}
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-/* free any iCCP entry */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_ICCP)
-#endif
-{
-    png_free(png_ptr, info_ptr->iccp_name);
-    png_free(png_ptr, info_ptr->iccp_profile);
-    info_ptr->iccp_name = NULL;
-    info_ptr->iccp_profile = NULL;
-    info_ptr->valid &= ~PNG_INFO_iCCP;
-}
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-/* free a given sPLT entry, or (if num == -1) all sPLT entries */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_SPLT)
-#endif
-{
-   if (num != -1)
-   {
-      if(info_ptr->splt_palettes)
-      {
-          png_free(png_ptr, info_ptr->splt_palettes[num].name);
-          png_free(png_ptr, info_ptr->splt_palettes[num].entries);
-          info_ptr->splt_palettes[num].name = NULL;
-          info_ptr->splt_palettes[num].entries = NULL;
-      }
-   }
-   else
-   {
-       if(info_ptr->splt_palettes_num)
-       {
-         int i;
-         for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
-            png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i);
-
-         png_free(png_ptr, info_ptr->splt_palettes);
-         info_ptr->splt_palettes = NULL;
-         info_ptr->splt_palettes_num = 0;
-       }
-       info_ptr->valid &= ~PNG_INFO_sPLT;
-   }
-}
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_UNKN)
-#endif
-{
-   if (num != -1)
-   {
-       if(info_ptr->unknown_chunks)
-       {
-          png_free(png_ptr, info_ptr->unknown_chunks[num].data);
-          info_ptr->unknown_chunks[num].data = NULL;
-       }
-   }
-   else
-   {
-       int i;
-
-       if(info_ptr->unknown_chunks_num)
-       {
-         for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++)
-            png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);
-
-         png_free(png_ptr, info_ptr->unknown_chunks);
-         info_ptr->unknown_chunks = NULL;
-         info_ptr->unknown_chunks_num = 0;
-       }
-   }
-}
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-/* free any hIST entry */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_HIST)  & info_ptr->free_me)
-#else
-if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
-#endif
-{
-    png_free(png_ptr, info_ptr->hist);
-    info_ptr->hist = NULL;
-    info_ptr->valid &= ~PNG_INFO_hIST;
-#ifndef PNG_FREE_ME_SUPPORTED
-    png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
-#endif
-}
-#endif
-
-/* free any PLTE entry that was internally allocated */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
-#else
-if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))
-#endif
-{
-    png_zfree(png_ptr, info_ptr->palette);
-    info_ptr->palette = NULL;
-    info_ptr->valid &= ~PNG_INFO_PLTE;
-#ifndef PNG_FREE_ME_SUPPORTED
-    png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
-#endif
-    info_ptr->num_palette = 0;
-}
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-/* free any image bits attached to the info structure */
-#ifdef PNG_FREE_ME_SUPPORTED
-if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
-#else
-if (mask & PNG_FREE_ROWS)
-#endif
-{
-    if(info_ptr->row_pointers)
-    {
-       int row;
-       for (row = 0; row < (int)info_ptr->height; row++)
-       {
-          png_free(png_ptr, info_ptr->row_pointers[row]);
-          info_ptr->row_pointers[row]=NULL;
-       }
-       png_free(png_ptr, info_ptr->row_pointers);
-       info_ptr->row_pointers=NULL;
-    }
-    info_ptr->valid &= ~PNG_INFO_IDAT;
-}
-#endif
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   if(num == -1)
-     info_ptr->free_me &= ~mask;
-   else
-     info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
-#endif
-}
-
-/* This is an internal routine to free any memory that the info struct is
- * pointing to before re-using it or freeing the struct itself.  Recall
- * that png_free() checks for NULL pointers for us.
- */
-void /* PRIVATE */
-png_info_destroy(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_info_destroy\n");
-
-   png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   if (png_ptr->num_chunk_list)
-   {
-       png_free(png_ptr, png_ptr->chunk_list);
-       png_ptr->chunk_list=NULL;
-       png_ptr->num_chunk_list=0;
-   }
-#endif
-
-   png_info_init_3(&info_ptr, png_sizeof(png_info));
-}
-
-/* This function returns a pointer to the io_ptr associated with the user
- * functions.  The application should free any memory associated with this
- * pointer before png_write_destroy() or png_read_destroy() are called.
- */
-png_voidp PNGAPI
-png_get_io_ptr(png_structp png_ptr)
-{
-   return (png_ptr->io_ptr);
-}
-
-#if !defined(PNG_NO_STDIO)
-/* Initialize the default input/output functions for the PNG file.  If you
- * use your own read or write routines, you can call either png_set_read_fn()
- * or png_set_write_fn() instead of png_init_io().  If you have defined
- * PNG_NO_STDIO, you must use a function of your own because "FILE *" isn't
- * necessarily available.
- */
-void PNGAPI
-png_init_io(png_structp png_ptr, png_FILE_p fp)
-{
-   png_debug(1, "in png_init_io\n");
-   png_ptr->io_ptr = (png_voidp)fp;
-}
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-/* Convert the supplied time into an RFC 1123 string suitable for use in
- * a "Creation Time" or other text-based time string.
- */
-png_charp PNGAPI
-png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
-{
-   static PNG_CONST char short_months[12][4] =
-        {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
-         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
-
-   if (png_ptr->time_buffer == NULL)
-   {
-      png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
-         png_sizeof(char)));
-   }
-
-#if defined(_WIN32_WCE)
-   {
-      wchar_t time_buf[29];
-      wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"),
-          ptime->day % 32, short_months[(ptime->month - 1) % 12],
-        ptime->year, ptime->hour % 24, ptime->minute % 60,
-          ptime->second % 61);
-      WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
-          NULL, NULL);
-   }
-#else
-#ifdef USE_FAR_KEYWORD
-   {
-      char near_time_buf[29];
-      sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000",
-          ptime->day % 32, short_months[(ptime->month - 1) % 12],
-          ptime->year, ptime->hour % 24, ptime->minute % 60,
-          ptime->second % 61);
-      png_memcpy(png_ptr->time_buffer, near_time_buf,
-          29*png_sizeof(char));
-   }
-#else
-   sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000",
-       ptime->day % 32, short_months[(ptime->month - 1) % 12],
-       ptime->year, ptime->hour % 24, ptime->minute % 60,
-       ptime->second % 61);
-#endif
-#endif /* _WIN32_WCE */
-   return ((png_charp)png_ptr->time_buffer);
-}
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-
-#if 0
-/* Signature string for a PNG file. */
-png_bytep PNGAPI
-png_sig_bytes(void)
-{
-   return ((png_bytep)"\211\120\116\107\015\012\032\012");
-}
-#endif
-
-png_charp PNGAPI
-png_get_copyright(png_structp png_ptr)
-{
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-   return ((png_charp) "\n libpng version 1.2.6rc5 - August 10, 2004\n\
-   Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\
-   Copyright (c) 1996-1997 Andreas Dilger\n\
-   Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
-   return ((png_charp) "");
-}
-
-/* The following return the library version as a short string in the
- * format 1.0.0 through 99.99.99zz.  To get the version of *.h files
- * used with your application, print out PNG_LIBPNG_VER_STRING, which
- * is defined in png.h.
- * Note: now there is no difference between png_get_libpng_ver() and
- * png_get_header_ver().  Due to the version_nn_nn_nn typedef guard,
- * it is guaranteed that png.c uses the correct version of png.h.
- */
-png_charp PNGAPI
-png_get_libpng_ver(png_structp png_ptr)
-{
-   /* Version of *.c files used when building libpng */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_LIBPNG_VER_STRING);
-   return ((png_charp) "");
-}
-
-png_charp PNGAPI
-png_get_header_ver(png_structp png_ptr)
-{
-   /* Version of *.h files used when building libpng */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_LIBPNG_VER_STRING);
-   return ((png_charp) "");
-}
-
-png_charp PNGAPI
-png_get_header_version(png_structp png_ptr)
-{
-   /* Returns longer string containing both version and date */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_HEADER_VERSION_STRING);
-   return ((png_charp) "");
-}
-
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-int PNGAPI
-png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
-{
-   /* check chunk_name and return "keep" value if it's on the list, else 0 */
-   int i;
-   png_bytep p;
-   if((png_ptr == NULL && chunk_name == NULL) || png_ptr->num_chunk_list<=0)
-      return 0;
-   p=png_ptr->chunk_list+png_ptr->num_chunk_list*5-5;
-   for (i = png_ptr->num_chunk_list; i; i--, p-=5)
-      if (!png_memcmp(chunk_name, p, 4))
-        return ((int)*(p+4));
-   return 0;
-}
-#endif
-
-/* This function, added to libpng-1.0.6g, is untested. */
-int PNGAPI
-png_reset_zstream(png_structp png_ptr)
-{
-   return (inflateReset(&png_ptr->zstream));
-}
-
-/* This function was added to libpng-1.0.7 */
-png_uint_32 PNGAPI
-png_access_version_number(void)
-{
-   /* Version of *.c files used when building libpng */
-   return((png_uint_32) PNG_LIBPNG_VER);
-}
-
-
-#if !defined(PNG_1_0_X)
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-    /* GRR:  could add this:   && defined(PNG_MMX_CODE_SUPPORTED) */
-/* this INTERNAL function was added to libpng 1.2.0 */
-void /* PRIVATE */
-png_init_mmx_flags (png_structp png_ptr)
-{
-    png_ptr->mmx_rowbytes_threshold = 0;
-    png_ptr->mmx_bitdepth_threshold = 0;
-
-#  if (defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD))
-
-    png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_COMPILED;
-
-    if (png_mmx_support() > 0) {
-        png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
-#    ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
-                              | PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
-#    endif
-#    ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
-                              | PNG_ASM_FLAG_MMX_READ_INTERLACE
-#    endif
-#    ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
-                              ;
-#    else
-                              | PNG_ASM_FLAG_MMX_READ_FILTER_SUB
-                              | PNG_ASM_FLAG_MMX_READ_FILTER_UP
-                              | PNG_ASM_FLAG_MMX_READ_FILTER_AVG
-                              | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-
-        png_ptr->mmx_rowbytes_threshold = PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT;
-        png_ptr->mmx_bitdepth_threshold = PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT;
-#    endif
-    } else {
-        png_ptr->asm_flags &= ~( PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
-                               | PNG_MMX_READ_FLAGS
-                               | PNG_MMX_WRITE_FLAGS );
-    }
-
-#  else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */
-
-    /* clear all MMX flags; no support is compiled in */
-    png_ptr->asm_flags &= ~( PNG_MMX_FLAGS );
-
-#  endif /* ?(PNGVCRD || PNGGCCRD) */
-}
-
-#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */
-
-/* this function was added to libpng 1.2.0 */
-#if !defined(PNG_USE_PNGGCCRD) && \
-    !(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
-int PNGAPI
-png_mmx_support(void)
-{
-    return -1;
-}
-#endif
-#endif /* PNG_1_0_X */
-
-#ifdef PNG_SIZE_T
-/* Added at libpng version 1.2.6 */
-   PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
-png_size_t PNGAPI
-png_convert_size(size_t size)
-{
-  if (size > (png_size_t)-1)
-     PNG_ABORT();  /* We haven't got access to png_ptr, so no png_error() */
-  return ((png_size_t)size);
-}
-#endif /* PNG_SIZE_T */
diff --git a/tkimg1.3/libpng/png.h b/tkimg1.3/libpng/png.h
deleted file mode 100644
index fa35e8f..0000000
--- a/tkimg1.3/libpng/png.h
+++ /dev/null
@@ -1,3350 +0,0 @@
-/* png.h - header file for PNG reference library
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * Authors and maintainers:
- *  libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
- *  libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *  libpng versions 0.97, January 1998, through 1.2.6rc5 - August 10, 2004: Glenn
- *  See also "Contributing Authors", below.
- *
- * Note about libpng version numbers:
- *
- *    Due to various miscommunications, unforeseen code incompatibilities
- *    and occasional factors outside the authors' control, version numbering
- *    on the library has not always been consistent and straightforward.
- *    The following table summarizes matters since version 0.89c, which was
- *    the first widely used release:
- *
- *    source                 png.h  png.h  shared-lib
- *    version                string   int  version
- *    -------                ------ -----  ----------
- *    0.89c "1.0 beta 3"     0.89      89  1.0.89
- *    0.90  "1.0 beta 4"     0.90      90  0.90  [should have been 2.0.90]
- *    0.95  "1.0 beta 5"     0.95      95  0.95  [should have been 2.0.95]
- *    0.96  "1.0 beta 6"     0.96      96  0.96  [should have been 2.0.96]
- *    0.97b "1.00.97 beta 7" 1.00.97   97  1.0.1 [should have been 2.0.97]
- *    0.97c                  0.97      97  2.0.97
- *    0.98                   0.98      98  2.0.98
- *    0.99                   0.99      98  2.0.99
- *    0.99a-m                0.99      99  2.0.99
- *    1.00                   1.00     100  2.1.0 [100 should be 10000]
- *    1.0.0      (from here on, the   100  2.1.0 [100 should be 10000]
- *    1.0.1       png.h string is   10001  2.1.0
- *    1.0.1a-e    identical to the  10002  from here on, the shared library
- *    1.0.2       source version)   10002  is 2.V where V is the source code
- *    1.0.2a-b                      10003  version, except as noted.
- *    1.0.3                         10003
- *    1.0.3a-d                      10004
- *    1.0.4                         10004
- *    1.0.4a-f                      10005
- *    1.0.5 (+ 2 patches)           10005
- *    1.0.5a-d                      10006
- *    1.0.5e-r                      10100 (not source compatible)
- *    1.0.5s-v                      10006 (not binary compatible)
- *    1.0.6 (+ 3 patches)           10006 (still binary incompatible)
- *    1.0.6d-f                      10007 (still binary incompatible)
- *    1.0.6g                        10007
- *    1.0.6h                        10007  10.6h (testing xy.z so-numbering)
- *    1.0.6i                        10007  10.6i
- *    1.0.6j                        10007  2.1.0.6j (incompatible with 1.0.0)
- *    1.0.7beta11-14        DLLNUM  10007  2.1.0.7beta11-14 (binary compatible)
- *    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)
- *    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)
- *    1.0.7                    1    10007  (still compatible)
- *    1.0.8beta1-4             1    10008  2.1.0.8beta1-4
- *    1.0.8rc1                 1    10008  2.1.0.8rc1
- *    1.0.8                    1    10008  2.1.0.8
- *    1.0.9beta1-6             1    10009  2.1.0.9beta1-6
- *    1.0.9rc1                 1    10009  2.1.0.9rc1
- *    1.0.9beta7-10            1    10009  2.1.0.9beta7-10
- *    1.0.9rc2                 1    10009  2.1.0.9rc2
- *    1.0.9                    1    10009  2.1.0.9
- *    1.0.10beta1              1    10010  2.1.0.10beta1
- *    1.0.10rc1                1    10010  2.1.0.10rc1
- *    1.0.10                   1    10010  2.1.0.10
- *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3
- *    1.0.11rc1                1    10011  2.1.0.11rc1
- *    1.0.11                   1    10011  2.1.0.11
- *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2
- *    1.0.12rc1                2    10012  2.1.0.12rc1
- *    1.0.12                   2    10012  2.1.0.12
- *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)
- *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2
- *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5
- *    1.2.0rc1                 3    10200  3.1.2.0rc1
- *    1.2.0                    3    10200  3.1.2.0
- *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4
- *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2
- *    1.2.1                    3    10201  3.1.2.1
- *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6
- *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1
- *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1
- *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1
- *    1.0.13                  10    10013  10.so.0.1.0.13
- *    1.2.2                   12    10202  12.so.0.1.2.2
- *    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6
- *    1.2.3                   12    10203  12.so.0.1.2.3
- *    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3
- *    1.0.14rc1               13    10014  10.so.0.1.0.14rc1
- *    1.2.4rc1                13    10204  12.so.0.1.2.4rc1
- *    1.0.14                  10    10014  10.so.0.1.0.14
- *    1.2.4                   13    10204  12.so.0.1.2.4
- *    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2
- *    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3
- *    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3
- *    1.0.15                  10    10015  10.so.0.1.0.15
- *    1.2.5                   13    10205  12.so.0.1.2.5
- *    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4
- *    1.0.16rc1-3             10    10016  10.so.0.1.0.16rc1-3
- *    1.2.6rc1-3              13    10206  12.so.0.1.2.6rc1-3
- *
- *    Henceforth the source version will match the shared-library major
- *    and minor numbers; the shared-library major version number will be
- *    used for changes in backward compatibility, as it is intended.  The
- *    PNG_LIBPNG_VER macro, which is not used within libpng but is available
- *    for applications, is an unsigned integer of the form xyyzz corresponding
- *    to the source version x.y.z (leading zeros in y and z).  Beta versions
- *    were given the previous public release number plus a letter, until
- *    version 1.0.6j; from then on they were given the upcoming public
- *    release number plus "betaNN" or "rcN".
- *
- *    Binary incompatibility exists only when applications make direct access
- *    to the info_ptr or png_ptr members through png.h, and the compiled
- *    application is loaded with a different version of the library.
- *
- *    DLLNUM will change each time there are forward or backward changes
- *    in binary compatibility (e.g., when a new feature is added).
- *
- * See libpng.txt or libpng.3 for more information.  The PNG specification
- * is available as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
- * and as a W3C Recommendation <http://www.w3.org/TR/REC.png.html>
- */
-
-/*
- * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
- *
- * If you modify libpng you may insert additional notices immediately following
- * this sentence.
- *
- * libpng version 1.2.6, August 10, 2004, is
- * Copyright (c) 2004 Glenn Randers-Pehrson, and is
- * distributed according to the same disclaimer and license as libpng-1.2.5
- * with the following individual added to the list of Contributing Authors
- *
- *    Cosmin Truta
- *
- * libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
- * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-1.0.6
- * with the following individuals added to the list of Contributing Authors
- *
- *    Simon-Pierre Cadieux
- *    Eric S. Raymond
- *    Gilles Vollant
- *
- * and with the following additions to the disclaimer:
- *
- *    There is no warranty against interference with your enjoyment of the
- *    library or against infringement.  There is no warranty that our
- *    efforts or the library will fulfill any of your particular purposes
- *    or needs.  This library is provided with all faults, and the entire
- *    risk of satisfactory quality, performance, accuracy, and effort is with
- *    the user.
- *
- * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
- * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
- * Distributed according to the same disclaimer and license as libpng-0.96,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    Tom Lane
- *    Glenn Randers-Pehrson
- *    Willem van Schaik
- *
- * libpng versions 0.89, June 1996, through 0.96, May 1997, are
- * Copyright (c) 1996, 1997 Andreas Dilger
- * Distributed according to the same disclaimer and license as libpng-0.88,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    John Bowler
- *    Kevin Bracey
- *    Sam Bushell
- *    Magnus Holmgren
- *    Greg Roelofs
- *    Tom Tanner
- *
- * libpng versions 0.5, May 1995, through 0.88, January 1996, are
- * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
- *
- * For the purposes of this copyright and license, "Contributing Authors"
- * is defined as the following set of individuals:
- *
- *    Andreas Dilger
- *    Dave Martindale
- *    Guy Eric Schalnat
- *    Paul Schmidt
- *    Tim Wegner
- *
- * The PNG Reference Library is supplied "AS IS".  The Contributing Authors
- * and Group 42, Inc. disclaim all warranties, expressed or implied,
- * including, without limitation, the warranties of merchantability and of
- * fitness for any purpose.  The Contributing Authors and Group 42, Inc.
- * assume no liability for direct, indirect, incidental, special, exemplary,
- * or consequential damages, which may result from the use of the PNG
- * Reference Library, even if advised of the possibility of such damage.
- *
- * Permission is hereby granted to use, copy, modify, and distribute this
- * source code, or portions hereof, for any purpose, without fee, subject
- * to the following restrictions:
- *
- * 1. The origin of this source code must not be misrepresented.
- *
- * 2. Altered versions must be plainly marked as such and
- * must not be misrepresented as being the original source.
- *
- * 3. This Copyright notice may not be removed or altered from
- *    any source or altered source distribution.
- *
- * The Contributing Authors and Group 42, Inc. specifically permit, without
- * fee, and encourage the use of this source code as a component to
- * supporting the PNG file format in commercial products.  If you use this
- * source code in a product, acknowledgment is not required but would be
- * appreciated.
- */
-
-/*
- * A "png_get_copyright" function is available, for convenient use in "about"
- * boxes and the like:
- *
- * printf("%s",png_get_copyright(NULL));
- *
- * Also, the PNG logo (in PNG format, of course) is supplied in the
- * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
- */
-
-/*
- * Libpng is OSI Certified Open Source Software.  OSI Certified is a
- * certification mark of the Open Source Initiative.
- */
-
-/*
- * The contributing authors would like to thank all those who helped
- * with testing, bug fixes, and patience.  This wouldn't have been
- * possible without all of you.
- *
- * Thanks to Frank J. T. Wojcik for helping with the documentation.
- */
-
-/*
- * Y2K compliance in libpng:
- * =========================
- *
- *    August 10, 2004
- *
- *    Since the PNG Development group is an ad-hoc body, we can't make
- *    an official declaration.
- *
- *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.2.6rc5 are Y2K compliant.  It is my belief that earlier
- *    versions were also Y2K compliant.
- *
- *    Libpng only has three year fields.  One is a 2-byte unsigned integer
- *    that will hold years up to 65535.  The other two hold the date in text
- *    format, and will hold years up to 9999.
- *
- *    The integer is
- *        "png_uint_16 year" in png_time_struct.
- *
- *    The strings are
- *        "png_charp time_buffer" in png_struct and
- *        "near_time_buffer", which is a local character string in png.c.
- *
- *    There are seven time-related functions:
- *        png.c: png_convert_to_rfc_1123() in png.c
- *          (formerly png_convert_to_rfc_1152() in error)
- *        png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
- *        png_convert_from_time_t() in pngwrite.c
- *        png_get_tIME() in pngget.c
- *        png_handle_tIME() in pngrutil.c, called in pngread.c
- *        png_set_tIME() in pngset.c
- *        png_write_tIME() in pngwutil.c, called in pngwrite.c
- *
- *    All handle dates properly in a Y2K environment.  The
- *    png_convert_from_time_t() function calls gmtime() to convert from system
- *    clock time, which returns (year - 1900), which we properly convert to
- *    the full 4-digit year.  There is a possibility that applications using
- *    libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
- *    function, or that they are incorrectly passing only a 2-digit year
- *    instead of "year - 1900" into the png_convert_from_struct_tm() function,
- *    but this is not under our control.  The libpng documentation has always
- *    stated that it works with 4-digit years, and the APIs have been
- *    documented as such.
- *
- *    The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
- *    integer to hold the year, and can hold years as large as 65535.
- *
- *    zlib, upon which libpng depends, is also Y2K compliant.  It contains
- *    no date-related code.
- *
- *       Glenn Randers-Pehrson
- *       libpng maintainer
- *       PNG Development Group
- */
-
-#ifndef PNG_H
-#define PNG_H
-
-/* This is not the place to learn how to use libpng.  The file libpng.txt
- * describes how to use libpng, and the file example.c summarizes it
- * with some code on which to build.  This file is useful for looking
- * at the actual function definitions and structure components.
- */
-
-/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.6rc5"
-#define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.2.6rc5 - August 10, 2004 (header)\n"
-
-#define PNG_LIBPNG_VER_SONUM   0
-#define PNG_LIBPNG_VER_DLLNUM  %DLLNUM%
-
-/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
-#define PNG_LIBPNG_VER_MAJOR   1
-#define PNG_LIBPNG_VER_MINOR   2
-#define PNG_LIBPNG_VER_RELEASE 6
-/* This should match the numeric part of the final component of
- * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
-
-#define PNG_LIBPNG_VER_BUILD  5
-
-#define PNG_LIBPNG_BUILD_ALPHA    1
-#define PNG_LIBPNG_BUILD_BETA     2
-#define PNG_LIBPNG_BUILD_RC       3
-#define PNG_LIBPNG_BUILD_STABLE   4
-#define PNG_LIBPNG_BUILD_TYPEMASK 7
-#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with STABLE only */
-#define PNG_LIBPNG_BUILD_TYPE 3
-
-/* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
- * We must not include leading zeros.
- * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
- * version 1.0.0 was mis-numbered 100 instead of 10000).  From
- * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release */
-#define PNG_LIBPNG_VER 10206 /* 1.2.6 */
-
-#ifndef PNG_VERSION_INFO_ONLY
-
-/* include the compression library's header */
-#include "zlib.h"
-
-/* include all user configurable info, including optional assembler routines */
-#include "pngconf.h"
-
-/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* This file is arranged in several sections.  The first section contains
- * structure and type definitions.  The second section contains the external
- * library functions, while the third has the internal library functions,
- * which applications aren't expected to use directly.
- */
-
-#ifndef PNG_NO_TYPECAST_NULL
-#define int_p_NULL                (int *)NULL
-#define png_bytep_NULL            (png_bytep)NULL
-#define png_bytepp_NULL           (png_bytepp)NULL
-#define png_doublep_NULL          (png_doublep)NULL
-#define png_error_ptr_NULL        (png_error_ptr)NULL
-#define png_flush_ptr_NULL        (png_flush_ptr)NULL
-#define png_free_ptr_NULL         (png_free_ptr)NULL
-#define png_infopp_NULL           (png_infopp)NULL
-#define png_malloc_ptr_NULL       (png_malloc_ptr)NULL
-#define png_read_status_ptr_NULL  (png_read_status_ptr)NULL
-#define png_rw_ptr_NULL           (png_rw_ptr)NULL
-#define png_structp_NULL          (png_structp)NULL
-#define png_uint_16p_NULL         (png_uint_16p)NULL
-#define png_voidp_NULL            (png_voidp)NULL
-#define png_write_status_ptr_NULL (png_write_status_ptr)NULL
-#else
-#define int_p_NULL                NULL
-#define png_bytep_NULL            NULL
-#define png_bytepp_NULL           NULL
-#define png_doublep_NULL          NULL
-#define png_error_ptr_NULL        NULL
-#define png_flush_ptr_NULL        NULL
-#define png_free_ptr_NULL         NULL
-#define png_infopp_NULL           NULL
-#define png_malloc_ptr_NULL       NULL
-#define png_read_status_ptr_NULL  NULL
-#define png_rw_ptr_NULL           NULL
-#define png_structp_NULL          NULL
-#define png_uint_16p_NULL         NULL
-#define png_voidp_NULL            NULL
-#define png_write_status_ptr_NULL NULL
-#endif
-
-/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
-/* Version information for C files, stored in png.c.  This had better match
- * the version above.
- */
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (const char) png_libpng_ver[18];
-  /* need room for 99.99.99beta99z */
-#else
-#define png_libpng_ver png_get_header_ver(NULL)
-#endif
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-/* This was removed in version 1.0.5c */
-/* Structures to facilitate easy interlacing.  See png.c for more details */
-PNG_EXPORT_VAR (const int FARDATA) png_pass_start[7];
-PNG_EXPORT_VAR (const int FARDATA) png_pass_inc[7];
-PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7];
-PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
-PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
-PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
-#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
-PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
-#endif
-/* This isn't currently used.  If you need it, see png.c for more details.
-PNG_EXPORT_VAR (const int FARDATA) png_pass_height[7];
-*/
-#endif
-
-#endif /* PNG_NO_EXTERN */
-
-/* Three color definitions.  The order of the red, green, and blue, (and the
- * exact size) is not important, although the size of the fields need to
- * be png_byte or png_uint_16 (as defined below).
- */
-typedef struct png_color_struct
-{
-   png_byte red;
-   png_byte green;
-   png_byte blue;
-} png_color;
-typedef png_color FAR * png_colorp;
-typedef png_color FAR * FAR * png_colorpp;
-
-typedef struct png_color_16_struct
-{
-   png_byte index;    /* used for palette files */
-   png_uint_16 red;   /* for use in red green blue files */
-   png_uint_16 green;
-   png_uint_16 blue;
-   png_uint_16 gray;  /* for use in grayscale files */
-} png_color_16;
-typedef png_color_16 FAR * png_color_16p;
-typedef png_color_16 FAR * FAR * png_color_16pp;
-
-typedef struct png_color_8_struct
-{
-   png_byte red;   /* for use in red green blue files */
-   png_byte green;
-   png_byte blue;
-   png_byte gray;  /* for use in grayscale files */
-   png_byte alpha; /* for alpha channel files */
-} png_color_8;
-typedef png_color_8 FAR * png_color_8p;
-typedef png_color_8 FAR * FAR * png_color_8pp;
-
-/*
- * The following two structures are used for the in-core representation
- * of sPLT chunks.
- */
-typedef struct png_sPLT_entry_struct
-{
-   png_uint_16 red;
-   png_uint_16 green;
-   png_uint_16 blue;
-   png_uint_16 alpha;
-   png_uint_16 frequency;
-} png_sPLT_entry;
-typedef png_sPLT_entry FAR * png_sPLT_entryp;
-typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
-
-/*  When the depth of the sPLT palette is 8 bits, the color and alpha samples
- *  occupy the LSB of their respective members, and the MSB of each member
- *  is zero-filled.  The frequency member always occupies the full 16 bits.
- */
-
-typedef struct png_sPLT_struct
-{
-   png_charp name;           /* palette name */
-   png_byte depth;           /* depth of palette samples */
-   png_sPLT_entryp entries;  /* palette entries */
-   png_int_32 nentries;      /* number of palette entries */
-} png_sPLT_t;
-typedef png_sPLT_t FAR * png_sPLT_tp;
-typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
-
-#ifdef PNG_TEXT_SUPPORTED
-/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
- * and whether that contents is compressed or not.  The "key" field
- * points to a regular zero-terminated C string.  The "text", "lang", and
- * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
- * However, the * structure returned by png_get_text() will always contain
- * regular zero-terminated C strings (possibly empty), never NULL pointers,
- * so they can be safely used in printf() and other string-handling functions.
- */
-typedef struct png_text_struct
-{
-   int  compression;       /* compression value:
-                             -1: tEXt, none
-                              0: zTXt, deflate
-                              1: iTXt, none
-                              2: iTXt, deflate  */
-   png_charp key;          /* keyword, 1-79 character description of "text" */
-   png_charp text;         /* comment, may be an empty string (ie "")
-                              or a NULL pointer */
-   png_size_t text_length; /* length of the text string */
-#ifdef PNG_iTXt_SUPPORTED
-   png_size_t itxt_length; /* length of the itxt string */
-   png_charp lang;         /* language code, 0-79 characters
-                              or a NULL pointer */
-   png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more
-                              chars or a NULL pointer */
-#endif
-} png_text;
-typedef png_text FAR * png_textp;
-typedef png_text FAR * FAR * png_textpp;
-#endif
-
-/* Supported compression types for text in PNG files (tEXt, and zTXt).
- * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */
-#define PNG_TEXT_COMPRESSION_NONE_WR -3
-#define PNG_TEXT_COMPRESSION_zTXt_WR -2
-#define PNG_TEXT_COMPRESSION_NONE    -1
-#define PNG_TEXT_COMPRESSION_zTXt     0
-#define PNG_ITXT_COMPRESSION_NONE     1
-#define PNG_ITXT_COMPRESSION_zTXt     2
-#define PNG_TEXT_COMPRESSION_LAST     3  /* Not a valid value */
-
-/* png_time is a way to hold the time in an machine independent way.
- * Two conversions are provided, both from time_t and struct tm.  There
- * is no portable way to convert to either of these structures, as far
- * as I know.  If you know of a portable way, send it to me.  As a side
- * note - PNG has always been Year 2000 compliant!
- */
-typedef struct png_time_struct
-{
-   png_uint_16 year; /* full year, as in, 1995 */
-   png_byte month;   /* month of year, 1 - 12 */
-   png_byte day;     /* day of month, 1 - 31 */
-   png_byte hour;    /* hour of day, 0 - 23 */
-   png_byte minute;  /* minute of hour, 0 - 59 */
-   png_byte second;  /* second of minute, 0 - 60 (for leap seconds) */
-} png_time;
-typedef png_time FAR * png_timep;
-typedef png_time FAR * FAR * png_timepp;
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-/* png_unknown_chunk is a structure to hold queued chunks for which there is
- * no specific support.  The idea is that we can use this to queue
- * up private chunks for output even though the library doesn't actually
- * know about their semantics.
- */
-typedef struct png_unknown_chunk_t
-{
-    png_byte name[5];
-    png_byte *data;
-    png_size_t size;
-
-    /* libpng-using applications should NOT directly modify this byte. */
-    png_byte location; /* mode of operation at read time */
-}
-png_unknown_chunk;
-typedef png_unknown_chunk FAR * png_unknown_chunkp;
-typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
-#endif
-
-/* png_info is a structure that holds the information in a PNG file so
- * that the application can find out the characteristics of the image.
- * If you are reading the file, this structure will tell you what is
- * in the PNG file.  If you are writing the file, fill in the information
- * you want to put into the PNG file, then call png_write_info().
- * The names chosen should be very close to the PNG specification, so
- * consult that document for information about the meaning of each field.
- *
- * With libpng < 0.95, it was only possible to directly set and read the
- * the values in the png_info_struct, which meant that the contents and
- * order of the values had to remain fixed.  With libpng 0.95 and later,
- * however, there are now functions that abstract the contents of
- * png_info_struct from the application, so this makes it easier to use
- * libpng with dynamic libraries, and even makes it possible to use
- * libraries that don't have all of the libpng ancillary chunk-handing
- * functionality.
- *
- * In any case, the order of the parameters in png_info_struct should NOT
- * be changed for as long as possible to keep compatibility with applications
- * that use the old direct-access method with png_info_struct.
- *
- * The following members may have allocated storage attached that should be
- * cleaned up before the structure is discarded: palette, trans, text,
- * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
- * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these
- * are automatically freed when the info structure is deallocated, if they were
- * allocated internally by libpng.  This behavior can be changed by means
- * of the png_data_freer() function.
- *
- * More allocation details: all the chunk-reading functions that
- * change these members go through the corresponding png_set_*
- * functions.  A function to clear these members is available: see
- * png_free_data().  The png_set_* functions do not depend on being
- * able to point info structure members to any of the storage they are
- * passed (they make their own copies), EXCEPT that the png_set_text
- * functions use the same storage passed to them in the text_ptr or
- * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
- * functions do not make their own copies.
- */
-typedef struct png_info_struct
-{
-   /* the following are necessary for every PNG file */
-   png_uint_32 width;       /* width of image in pixels (from IHDR) */
-   png_uint_32 height;      /* height of image in pixels (from IHDR) */
-   png_uint_32 valid;       /* valid chunk data (see PNG_INFO_ below) */
-   png_uint_32 rowbytes;    /* bytes needed to hold an untransformed row */
-   png_colorp palette;      /* array of color values (valid & PNG_INFO_PLTE) */
-   png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
-   png_uint_16 num_trans;   /* number of transparent palette color (tRNS) */
-   png_byte bit_depth;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
-   png_byte color_type;     /* see PNG_COLOR_TYPE_ below (from IHDR) */
-   /* The following three should have been named *_method not *_type */
-   png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
-   png_byte filter_type;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
-   png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
-
-   /* The following is informational only on read, and not used on writes. */
-   png_byte channels;       /* number of data channels per pixel (1, 2, 3, 4) */
-   png_byte pixel_depth;    /* number of bits per pixel */
-   png_byte spare_byte;     /* to align the data, and for future use */
-   png_byte signature[8];   /* magic bytes read by libpng from start of file */
-
-   /* The rest of the data is optional.  If you are reading, check the
-    * valid field to see if the information in these are valid.  If you
-    * are writing, set the valid field to those chunks you want written,
-    * and initialize the appropriate fields below.
-    */
-
-#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
-   /* The gAMA chunk describes the gamma characteristics of the system
-    * on which the image was created, normally in the range [1.0, 2.5].
-    * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
-    */
-   float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-    /* GR-P, 0.96a */
-    /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
-   png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-   /* The tEXt, and zTXt chunks contain human-readable textual data in
-    * uncompressed, compressed, and optionally compressed forms, respectively.
-    * The data in "text" is an array of pointers to uncompressed,
-    * null-terminated C strings. Each chunk has a keyword that describes the
-    * textual data contained in that chunk.  Keywords are not required to be
-    * unique, and the text string may be empty.  Any number of text chunks may
-    * be in an image.
-    */
-   int num_text; /* number of comments read/to write */
-   int max_text; /* current size of text array */
-   png_textp text; /* array of comments read/to write */
-#endif /* PNG_TEXT_SUPPORTED */
-
-#if defined(PNG_tIME_SUPPORTED)
-   /* The tIME chunk holds the last time the displayed image data was
-    * modified.  See the png_time struct for the contents of this struct.
-    */
-   png_time mod_time;
-#endif
-
-#if defined(PNG_sBIT_SUPPORTED)
-   /* The sBIT chunk specifies the number of significant high-order bits
-    * in the pixel data.  Values are in the range [1, bit_depth], and are
-    * only specified for the channels in the pixel data.  The contents of
-    * the low-order bits is not specified.  Data is valid if
-    * (valid & PNG_INFO_sBIT) is non-zero.
-    */
-   png_color_8 sig_bit; /* significant bits in color channels */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
-defined(PNG_READ_BACKGROUND_SUPPORTED)
-   /* The tRNS chunk supplies transparency data for paletted images and
-    * other image types that don't need a full alpha channel.  There are
-    * "num_trans" transparency values for a paletted image, stored in the
-    * same order as the palette colors, starting from index 0.  Values
-    * for the data are in the range [0, 255], ranging from fully transparent
-    * to fully opaque, respectively.  For non-paletted images, there is a
-    * single color specified that should be treated as fully transparent.
-    * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
-    */
-   png_bytep trans; /* transparent values for paletted image */
-   png_color_16 trans_values; /* transparent color for non-palette image */
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   /* The bKGD chunk gives the suggested image background color if the
-    * display program does not have its own background color and the image
-    * is needs to composited onto a background before display.  The colors
-    * in "background" are normally in the same color space/depth as the
-    * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
-    */
-   png_color_16 background;
-#endif
-
-#if defined(PNG_oFFs_SUPPORTED)
-   /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
-    * and downwards from the top-left corner of the display, page, or other
-    * application-specific co-ordinate space.  See the PNG_OFFSET_ defines
-    * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.
-    */
-   png_int_32 x_offset; /* x offset on page */
-   png_int_32 y_offset; /* y offset on page */
-   png_byte offset_unit_type; /* offset units type */
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-   /* The pHYs chunk gives the physical pixel density of the image for
-    * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
-    * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
-    */
-   png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
-   png_uint_32 y_pixels_per_unit; /* vertical pixel density */
-   png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-   /* The hIST chunk contains the relative frequency or importance of the
-    * various palette entries, so that a viewer can intelligently select a
-    * reduced-color palette, if required.  Data is an array of "num_palette"
-    * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
-    * is non-zero.
-    */
-   png_uint_16p hist;
-#endif
-
-#ifdef PNG_cHRM_SUPPORTED
-   /* The cHRM chunk describes the CIE color characteristics of the monitor
-    * on which the PNG was created.  This data allows the viewer to do gamut
-    * mapping of the input image to ensure that the viewer sees the same
-    * colors in the image as the creator.  Values are in the range
-    * [0.0, 0.8].  Data valid if (valid & PNG_INFO_cHRM) non-zero.
-    */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float x_white;
-   float y_white;
-   float x_red;
-   float y_red;
-   float x_green;
-   float y_green;
-   float x_blue;
-   float y_blue;
-#endif
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-   /* The pCAL chunk describes a transformation between the stored pixel
-    * values and original physical data values used to create the image.
-    * The integer range [0, 2^bit_depth - 1] maps to the floating-point
-    * range given by [pcal_X0, pcal_X1], and are further transformed by a
-    * (possibly non-linear) transformation function given by "pcal_type"
-    * and "pcal_params" into "pcal_units".  Please see the PNG_EQUATION_
-    * defines below, and the PNG-Group's PNG extensions document for a
-    * complete description of the transformations and how they should be
-    * implemented, and for a description of the ASCII parameter strings.
-    * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
-    */
-   png_charp pcal_purpose;  /* pCAL chunk description string */
-   png_int_32 pcal_X0;      /* minimum value */
-   png_int_32 pcal_X1;      /* maximum value */
-   png_charp pcal_units;    /* Latin-1 string giving physical units */
-   png_charpp pcal_params;  /* ASCII strings containing parameter values */
-   png_byte pcal_type;      /* equation type (see PNG_EQUATION_ below) */
-   png_byte pcal_nparams;   /* number of parameters given in pcal_params */
-#endif
-
-/* New members added in libpng-1.0.6 */
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_uint_32 free_me;     /* flags items libpng is responsible for freeing */
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   /* storage for unknown chunks that the library doesn't recognize. */
-   png_unknown_chunkp unknown_chunks;
-   png_size_t unknown_chunks_num;
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-   /* iCCP chunk data. */
-   png_charp iccp_name;     /* profile name */
-   png_charp iccp_profile;  /* International Color Consortium profile data */
-                            /* Note to maintainer: should be png_bytep */
-   png_uint_32 iccp_proflen;  /* ICC profile data length */
-   png_byte iccp_compression; /* Always zero */
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-   /* data on sPLT chunks (there may be more than one). */
-   png_sPLT_tp splt_palettes;
-   png_uint_32 splt_palettes_num;
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-   /* The sCAL chunk describes the actual physical dimensions of the
-    * subject matter of the graphic.  The chunk contains a unit specification
-    * a byte value, and two ASCII strings representing floating-point
-    * values.  The values are width and height corresponsing to one pixel
-    * in the image.  This external representation is converted to double
-    * here.  Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
-    */
-   png_byte scal_unit;         /* unit of physical scale */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   double scal_pixel_width;    /* width of one pixel */
-   double scal_pixel_height;   /* height of one pixel */
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_charp scal_s_width;     /* string containing height */
-   png_charp scal_s_height;    /* string containing width */
-#endif
-#endif
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-   /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
-   /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
-   png_bytepp row_pointers;        /* the image bits */
-#endif
-
-#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
-   png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
-   png_fixed_point int_x_white;
-   png_fixed_point int_y_white;
-   png_fixed_point int_x_red;
-   png_fixed_point int_y_red;
-   png_fixed_point int_x_green;
-   png_fixed_point int_y_green;
-   png_fixed_point int_x_blue;
-   png_fixed_point int_y_blue;
-#endif
-
-} png_info;
-
-typedef png_info FAR * png_infop;
-typedef png_info FAR * FAR * png_infopp;
-
-/* Maximum positive integer used in PNG is (2^31)-1 */
-#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
-#define PNG_UINT_32_MAX (~((png_uint_32)0))
-#define PNG_SIZE_MAX (~((png_size_t)0))
-/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
-#define PNG_MAX_UINT PNG_UINT_31_MAX
-
-/* These describe the color_type field in png_info. */
-/* color type masks */
-#define PNG_COLOR_MASK_PALETTE    1
-#define PNG_COLOR_MASK_COLOR      2
-#define PNG_COLOR_MASK_ALPHA      4
-
-/* color types.  Note that not all combinations are legal */
-#define PNG_COLOR_TYPE_GRAY 0
-#define PNG_COLOR_TYPE_PALETTE  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
-#define PNG_COLOR_TYPE_RGB        (PNG_COLOR_MASK_COLOR)
-#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
-#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)
-/* aliases */
-#define PNG_COLOR_TYPE_RGBA  PNG_COLOR_TYPE_RGB_ALPHA
-#define PNG_COLOR_TYPE_GA  PNG_COLOR_TYPE_GRAY_ALPHA
-
-/* This is for compression type. PNG 1.0-1.2 only define the single type. */
-#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */
-#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
-
-/* This is for filter type. PNG 1.0-1.2 only define the single type. */
-#define PNG_FILTER_TYPE_BASE      0 /* Single row per-byte filtering */
-#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */
-#define PNG_FILTER_TYPE_DEFAULT   PNG_FILTER_TYPE_BASE
-
-/* These are for the interlacing type.  These values should NOT be changed. */
-#define PNG_INTERLACE_NONE        0 /* Non-interlaced image */
-#define PNG_INTERLACE_ADAM7       1 /* Adam7 interlacing */
-#define PNG_INTERLACE_LAST        2 /* Not a valid value */
-
-/* These are for the oFFs chunk.  These values should NOT be changed. */
-#define PNG_OFFSET_PIXEL          0 /* Offset in pixels */
-#define PNG_OFFSET_MICROMETER     1 /* Offset in micrometers (1/10^6 meter) */
-#define PNG_OFFSET_LAST           2 /* Not a valid value */
-
-/* These are for the pCAL chunk.  These values should NOT be changed. */
-#define PNG_EQUATION_LINEAR       0 /* Linear transformation */
-#define PNG_EQUATION_BASE_E       1 /* Exponential base e transform */
-#define PNG_EQUATION_ARBITRARY    2 /* Arbitrary base exponential transform */
-#define PNG_EQUATION_HYPERBOLIC   3 /* Hyperbolic sine transformation */
-#define PNG_EQUATION_LAST         4 /* Not a valid value */
-
-/* These are for the sCAL chunk.  These values should NOT be changed. */
-#define PNG_SCALE_UNKNOWN         0 /* unknown unit (image scale) */
-#define PNG_SCALE_METER           1 /* meters per pixel */
-#define PNG_SCALE_RADIAN          2 /* radians per pixel */
-#define PNG_SCALE_LAST            3 /* Not a valid value */
-
-/* These are for the pHYs chunk.  These values should NOT be changed. */
-#define PNG_RESOLUTION_UNKNOWN    0 /* pixels/unknown unit (aspect ratio) */
-#define PNG_RESOLUTION_METER      1 /* pixels/meter */
-#define PNG_RESOLUTION_LAST       2 /* Not a valid value */
-
-/* These are for the sRGB chunk.  These values should NOT be changed. */
-#define PNG_sRGB_INTENT_PERCEPTUAL 0
-#define PNG_sRGB_INTENT_RELATIVE   1
-#define PNG_sRGB_INTENT_SATURATION 2
-#define PNG_sRGB_INTENT_ABSOLUTE   3
-#define PNG_sRGB_INTENT_LAST       4 /* Not a valid value */
-
-/* This is for text chunks */
-#define PNG_KEYWORD_MAX_LENGTH     79
-
-/* Maximum number of entries in PLTE/sPLT/tRNS arrays */
-#define PNG_MAX_PALETTE_LENGTH    256
-
-/* These determine if an ancillary chunk's data has been successfully read
- * from the PNG header, or if the application has filled in the corresponding
- * data in the info_struct to be written into the output file.  The values
- * of the PNG_INFO_<chunk> defines should NOT be changed.
- */
-#define PNG_INFO_gAMA 0x0001
-#define PNG_INFO_sBIT 0x0002
-#define PNG_INFO_cHRM 0x0004
-#define PNG_INFO_PLTE 0x0008
-#define PNG_INFO_tRNS 0x0010
-#define PNG_INFO_bKGD 0x0020
-#define PNG_INFO_hIST 0x0040
-#define PNG_INFO_pHYs 0x0080
-#define PNG_INFO_oFFs 0x0100
-#define PNG_INFO_tIME 0x0200
-#define PNG_INFO_pCAL 0x0400
-#define PNG_INFO_sRGB 0x0800   /* GR-P, 0.96a */
-#define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */
-#define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */
-#define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */
-#define PNG_INFO_IDAT 0x8000L  /* ESR, 1.0.6 */
-
-/* This is used for the transformation routines, as some of them
- * change these values for the row.  It also should enable using
- * the routines for other purposes.
- */
-typedef struct png_row_info_struct
-{
-   png_uint_32 width; /* width of row */
-   png_uint_32 rowbytes; /* number of bytes in row */
-   png_byte color_type; /* color type of row */
-   png_byte bit_depth; /* bit depth of row */
-   png_byte channels; /* number of channels (1, 2, 3, or 4) */
-   png_byte pixel_depth; /* bits per pixel (depth * channels) */
-} png_row_info;
-
-typedef png_row_info FAR * png_row_infop;
-typedef png_row_info FAR * FAR * png_row_infopp;
-
-/* These are the function types for the I/O functions and for the functions
- * that allow the user to override the default I/O functions with his or her
- * own.  The png_error_ptr type should match that of user-supplied warning
- * and error functions, while the png_rw_ptr type should match that of the
- * user read/write data functions.
- */
-typedef struct png_struct_def png_struct;
-typedef png_struct FAR * png_structp;
-
-typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
-typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
-typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
-typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
-   int));
-typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
-   int));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
-   png_uint_32, int));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
-    png_row_infop, png_bytep));
-#endif
-
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
-typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
-#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
-#endif
-
-/* Transform masks for the high-level interface */
-#define PNG_TRANSFORM_IDENTITY       0x0000    /* read and write */
-#define PNG_TRANSFORM_STRIP_16       0x0001    /* read only */
-#define PNG_TRANSFORM_STRIP_ALPHA    0x0002    /* read only */
-#define PNG_TRANSFORM_PACKING        0x0004    /* read and write */
-#define PNG_TRANSFORM_PACKSWAP       0x0008    /* read and write */
-#define PNG_TRANSFORM_EXPAND         0x0010    /* read only */
-#define PNG_TRANSFORM_INVERT_MONO    0x0020    /* read and write */
-#define PNG_TRANSFORM_SHIFT          0x0040    /* read and write */
-#define PNG_TRANSFORM_BGR            0x0080    /* read and write */
-#define PNG_TRANSFORM_SWAP_ALPHA     0x0100    /* read and write */
-#define PNG_TRANSFORM_SWAP_ENDIAN    0x0200    /* read and write */
-#define PNG_TRANSFORM_INVERT_ALPHA   0x0400    /* read and write */
-#define PNG_TRANSFORM_STRIP_FILLER   0x0800    /* WRITE only */
-
-/* Flags for MNG supported features */
-#define PNG_FLAG_MNG_EMPTY_PLTE     0x01
-#define PNG_FLAG_MNG_FILTER_64      0x04
-#define PNG_ALL_MNG_FEATURES        0x05
-
-typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t));
-typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
-
-/* The structure that holds the information to read and write PNG files.
- * The only people who need to care about what is inside of this are the
- * people who will be modifying the library for their own special needs.
- * It should NOT be accessed directly by an application, except to store
- * the jmp_buf.
- */
-
-struct png_struct_def
-{
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf jmpbuf;            /* used in png_error */
-#endif
-   png_error_ptr error_fn;    /* function for printing errors and aborting */
-   png_error_ptr warning_fn;  /* function for printing warnings */
-   png_voidp error_ptr;       /* user supplied struct for error functions */
-   png_rw_ptr write_data_fn;  /* function for writing output data */
-   png_rw_ptr read_data_fn;   /* function for reading input data */
-   png_voidp io_ptr;          /* ptr to application struct for I/O functions */
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   png_user_transform_ptr read_user_transform_fn; /* user read transform */
-#endif
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   png_user_transform_ptr write_user_transform_fn; /* user write transform */
-#endif
-
-/* These were added in libpng-1.0.2 */
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   png_voidp user_transform_ptr; /* user supplied struct for user transform */
-   png_byte user_transform_depth;    /* bit depth of user transformed pixels */
-   png_byte user_transform_channels; /* channels in user transformed pixels */
-#endif
-#endif
-
-   png_uint_32 mode;          /* tells us where we are in the PNG file */
-   png_uint_32 flags;         /* flags indicating various things to libpng */
-   png_uint_32 transformations; /* which transformations to perform */
-
-   z_stream zstream;          /* pointer to decompression structure (below) */
-   png_bytep zbuf;            /* buffer for zlib */
-   png_size_t zbuf_size;      /* size of zbuf */
-   int zlib_level;            /* holds zlib compression level */
-   int zlib_method;           /* holds zlib compression method */
-   int zlib_window_bits;      /* holds zlib compression window bits */
-   int zlib_mem_level;        /* holds zlib compression memory level */
-   int zlib_strategy;         /* holds zlib compression strategy */
-
-   png_uint_32 width;         /* width of image in pixels */
-   png_uint_32 height;        /* height of image in pixels */
-   png_uint_32 num_rows;      /* number of rows in current pass */
-   png_uint_32 usr_width;     /* width of row at start of write */
-   png_uint_32 rowbytes;      /* size of row in bytes */
-   png_uint_32 irowbytes;     /* size of current interlaced row in bytes */
-   png_uint_32 iwidth;        /* width of current interlaced row in pixels */
-   png_uint_32 row_number;    /* current row in interlace pass */
-   png_bytep prev_row;        /* buffer to save previous (unfiltered) row */
-   png_bytep row_buf;         /* buffer to save current (unfiltered) row */
-   png_bytep sub_row;         /* buffer to save "sub" row when filtering */
-   png_bytep up_row;          /* buffer to save "up" row when filtering */
-   png_bytep avg_row;         /* buffer to save "avg" row when filtering */
-   png_bytep paeth_row;       /* buffer to save "Paeth" row when filtering */
-   png_row_info row_info;     /* used for transformation routines */
-
-   png_uint_32 idat_size;     /* current IDAT size for read */
-   png_uint_32 crc;           /* current chunk CRC value */
-   png_colorp palette;        /* palette from the input file */
-   png_uint_16 num_palette;   /* number of color entries in palette */
-   png_uint_16 num_trans;     /* number of transparency values */
-   png_byte chunk_name[5];    /* null-terminated name of current chunk */
-   png_byte compression;      /* file compression type (always 0) */
-   png_byte filter;           /* file filter type (always 0) */
-   png_byte interlaced;       /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
-   png_byte pass;             /* current interlace pass (0 - 6) */
-   png_byte do_filter;        /* row filter flags (see PNG_FILTER_ below ) */
-   png_byte color_type;       /* color type of file */
-   png_byte bit_depth;        /* bit depth of file */
-   png_byte usr_bit_depth;    /* bit depth of users row */
-   png_byte pixel_depth;      /* number of bits per pixel */
-   png_byte channels;         /* number of channels in file */
-   png_byte usr_channels;     /* channels at start of write */
-   png_byte sig_bytes;        /* magic bytes read/written from start of file */
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-#ifdef PNG_LEGACY_SUPPORTED
-   png_byte filler;           /* filler byte for pixel expansion */
-#else
-   png_uint_16 filler;           /* filler bytes for pixel expansion */
-#endif
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED)
-   png_byte background_gamma_type;
-#  ifdef PNG_FLOATING_POINT_SUPPORTED
-   float background_gamma;
-#  endif
-   png_color_16 background;   /* background color in screen gamma space */
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   png_color_16 background_1; /* background normalized to gamma 1.0 */
-#endif
-#endif /* PNG_bKGD_SUPPORTED */
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-   png_flush_ptr output_flush_fn;/* Function for flushing output */
-   png_uint_32 flush_dist;    /* how many rows apart to flush, 0 - no flush */
-   png_uint_32 flush_rows;    /* number of rows written since last flush */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   int gamma_shift;      /* number of "insignificant" bits 16-bit gamma */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float gamma;          /* file gamma value */
-   float screen_gamma;   /* screen gamma value (display_exponent) */
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_bytep gamma_table;     /* gamma table for 8-bit depth files */
-   png_bytep gamma_from_1;    /* converts from 1.0 to screen */
-   png_bytep gamma_to_1;      /* converts from file to 1.0 */
-   png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
-   png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
-   png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
-   png_color_8 sig_bit;       /* significant bits in each available channel */
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
-   png_color_8 shift;         /* shift for significant bit tranformation */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
- || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_bytep trans;           /* transparency values for paletted files */
-   png_color_16 trans_values; /* transparency values for non-paletted files */
-#endif
-
-   png_read_status_ptr read_row_fn;   /* called after each row is decoded */
-   png_write_status_ptr write_row_fn; /* called after each row is encoded */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-   png_progressive_info_ptr info_fn; /* called after header data fully read */
-   png_progressive_row_ptr row_fn;   /* called after each prog. row is decoded */
-   png_progressive_end_ptr end_fn;   /* called after image is complete */
-   png_bytep save_buffer_ptr;        /* current location in save_buffer */
-   png_bytep save_buffer;            /* buffer for previously read data */
-   png_bytep current_buffer_ptr;     /* current location in current_buffer */
-   png_bytep current_buffer;         /* buffer for recently used data */
-   png_uint_32 push_length;          /* size of current input chunk */
-   png_uint_32 skip_length;          /* bytes to skip in input data */
-   png_size_t save_buffer_size;      /* amount of data now in save_buffer */
-   png_size_t save_buffer_max;       /* total size of save_buffer */
-   png_size_t buffer_size;           /* total amount of available input data */
-   png_size_t current_buffer_size;   /* amount of data now in current_buffer */
-   int process_mode;                 /* what push library is currently doing */
-   int cur_palette;                  /* current push library palette index */
-
-#  if defined(PNG_TEXT_SUPPORTED)
-     png_size_t current_text_size;   /* current size of text input data */
-     png_size_t current_text_left;   /* how much text left to read in input */
-     png_charp current_text;         /* current text chunk buffer */
-     png_charp current_text_ptr;     /* current location in current_text */
-#  endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
-
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
-/* for the Borland special 64K segment handler */
-   png_bytepp offset_table_ptr;
-   png_bytep offset_table;
-   png_uint_16 offset_table_number;
-   png_uint_16 offset_table_count;
-   png_uint_16 offset_table_count_free;
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-   png_bytep palette_lookup;         /* lookup table for dithering */
-   png_bytep dither_index;           /* index translation for palette files */
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
-   png_uint_16p hist;                /* histogram */
-#endif
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   png_byte heuristic_method;        /* heuristic for row filter selection */
-   png_byte num_prev_filters;        /* number of weights for previous rows */
-   png_bytep prev_filters;           /* filter type(s) of previous row(s) */
-   png_uint_16p filter_weights;      /* weight(s) for previous line(s) */
-   png_uint_16p inv_filter_weights;  /* 1/weight(s) for previous line(s) */
-   png_uint_16p filter_costs;        /* relative filter calculation cost */
-   png_uint_16p inv_filter_costs;    /* 1/relative filter calculation cost */
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-   png_charp time_buffer;            /* String to hold RFC 1123 time text */
-#endif
-
-/* New members added in libpng-1.0.6 */
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_uint_32 free_me;       /* flags items libpng is responsible for freeing */
-#endif
-
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
-   png_voidp user_chunk_ptr;
-   png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   int num_chunk_list;
-   png_bytep chunk_list;
-#endif
-
-/* New members added in libpng-1.0.3 */
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-   png_byte rgb_to_gray_status;
-   /* These were changed from png_byte in libpng-1.0.6 */
-   png_uint_16 rgb_to_gray_red_coeff;
-   png_uint_16 rgb_to_gray_green_coeff;
-   png_uint_16 rgb_to_gray_blue_coeff;
-#endif
-
-/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
-    defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* changed from png_byte to png_uint_32 at version 1.2.0 */
-#ifdef PNG_1_0_X
-   png_byte mng_features_permitted;
-#else
-   png_uint_32 mng_features_permitted;
-#endif /* PNG_1_0_X */
-#endif
-
-/* New member added in libpng-1.0.7 */
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_fixed_point int_gamma;
-#endif
-
-/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   png_byte filter_type;
-#endif
-
-#if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD))
-/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
-   png_uint_32 row_buf_size;
-#endif
-
-/* New members added in libpng-1.2.0 */
-#if !defined(PNG_1_0_X) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-   png_byte     mmx_bitdepth_threshold;
-   png_uint_32  mmx_rowbytes_threshold;
-   png_uint_32  asm_flags;
-#endif
-
-/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_voidp mem_ptr;                /* user supplied struct for mem functions */
-   png_malloc_ptr malloc_fn;         /* function for allocating memory */
-   png_free_ptr free_fn;             /* function for freeing memory */
-#endif
-
-/* New member added in libpng-1.0.13 and 1.2.0 */
-   png_bytep big_row_buf;         /* buffer to save current (unfiltered) row */
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-/* The following three members were added at version 1.0.14 and 1.2.4 */
-   png_bytep dither_sort;            /* working sort array */
-   png_bytep index_to_palette;       /* where the original index currently is */
-                                     /* in the palette */
-   png_bytep palette_to_index;       /* which original index points to this */
-                                     /* palette color */
-#endif
-
-/* New members added in libpng-1.0.16 and 1.2.6 */
-   png_byte compression_type;
-
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_uint_32 user_width_max;
-   png_uint_32 user_height_max;
-#endif
-
-};
-
-
-/* This triggers a compiler error in png.c, if png.c and png.h
- * do not agree upon the version number.
- */
-typedef png_structp version_1_2_6rc5;
-
-typedef png_struct FAR * FAR * png_structpp;
-
-/* Here are the function definitions most commonly used.  This is not
- * the place to find out how to use libpng.  See libpng.txt for the
- * full explanation, see example.c for the summary.  This just provides
- * a simple one line description of the use of each function.
- */
-
-/* Returns the version number of the library */
-extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
-
-/* Tell lib we have already handled the first <num_bytes> magic bytes.
- * Handling more than 8 bytes from the beginning of the file is an error.
- */
-extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
-   int num_bytes));
-
-/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
- * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG
- * signature, and non-zero otherwise.  Having num_to_check == 0 or
- * start > 7 will always fail (ie return non-zero).
- */
-extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
-   png_size_t num_to_check));
-
-/* Simple signature checking function.  This is the same as calling
- * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
- */
-extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num));
-
-/* Allocate and initialize png_ptr struct for reading, and any other memory. */
-extern PNG_EXPORT(png_structp,png_create_read_struct)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn));
-
-/* Allocate and initialize png_ptr struct for writing, and any other memory */
-extern PNG_EXPORT(png_structp,png_create_write_struct)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn));
-
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size)
-   PNGARG((png_structp png_ptr));
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(void,png_set_compression_buffer_size)
-   PNGARG((png_structp png_ptr, png_uint_32 size));
-#endif
-
-/* Reset the compression stream */
-extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
-
-/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
-#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_structp,png_create_read_struct_2)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-extern PNG_EXPORT(png_structp,png_create_write_struct_2)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-#endif
-
-/* Write a PNG chunk - size, type, (optional) data, CRC. */
-extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
-   png_bytep chunk_name, png_bytep data, png_size_t length));
-
-/* Write the start of a PNG chunk - length and chunk name. */
-extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
-   png_bytep chunk_name, png_uint_32 length));
-
-/* Write the data of a PNG chunk started with png_write_chunk_start(). */
-extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
-extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
-
-/* Allocate and initialize the info structure */
-extern PNG_EXPORT(png_infop,png_create_info_struct)
-   PNGARG((png_structp png_ptr));
-
-/* Initialize the info structure (old interface - DEPRECATED) */
-extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
-#undef png_info_init
-#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
-    png_sizeof(png_info));
-extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
-    png_size_t png_info_struct_size));
-
-/* Writes all the PNG information before the image. */
-extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the information before the actual image data. */
-extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
-   PNGARG((png_structp png_ptr, png_timep ptime));
-#endif
-
-#if !defined(_WIN32_WCE)
-/* "time.h" functions are not supported on WindowsCE */
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-/* convert from a struct tm to png_time */
-extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
-   struct tm FAR * ttime));
-
-/* convert from time_t to png_time.  Uses gmtime() */
-extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
-   time_t ttime));
-#endif /* PNG_WRITE_tIME_SUPPORTED */
-#endif /* _WIN32_WCE */
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
-extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-/* Use blue, green, red order for pixels. */
-extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-/* Expand the grayscale to 24-bit RGB if necessary. */
-extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-/* Reduce RGB to grayscale. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
-   int error_action, double red, double green ));
-#endif
-extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
-   int error_action, png_fixed_point red, png_fixed_point green ));
-extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
-   png_ptr));
-#endif
-
-extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
-   png_colorp palette));
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-/* Add a filler byte to 24-bit RGB images. */
-extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
-   png_uint_32 filler, int flags));
-/* The values of the PNG_FILLER_ defines should NOT be changed */
-#define PNG_FILLER_BEFORE 0
-#define PNG_FILLER_AFTER 1
-#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-/* Swap bytes in 16-bit depth files. */
-extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
-/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
-extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-/* Swap packing order of pixels in bytes. */
-extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
-/* Converts files to legal bit depths. */
-extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
-   png_color_8p true_bits));
-#endif
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
-    defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* Have the code handle the interlacing.  Returns the number of passes. */
-extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-/* Invert monochrome files */
-extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-/* Handle alpha and tRNS by replacing with a background color. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
-   png_color_16p background_color, int background_gamma_code,
-   int need_expand, double background_gamma));
-#endif
-#define PNG_BACKGROUND_GAMMA_UNKNOWN 0
-#define PNG_BACKGROUND_GAMMA_SCREEN  1
-#define PNG_BACKGROUND_GAMMA_FILE    2
-#define PNG_BACKGROUND_GAMMA_UNIQUE  3
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-/* strip the second byte of information from a 16-bit depth file. */
-extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-/* Turn on dithering, and reduce the palette to the number of colors available. */
-extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
-   png_colorp palette, int num_palette, int maximum_colors,
-   png_uint_16p histogram, int full_dither));
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-/* Handle gamma correction. Screen_gamma=(display_exponent) */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
-   double screen_gamma, double default_file_gamma));
-#endif
-#endif
-
-#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
-/* Deprecated and will be removed.  Use png_permit_mng_features() instead. */
-extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
-   int empty_plte_permitted));
-#endif
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-/* Set how many lines between output flushes - 0 for no flushing */
-extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
-/* Flush the current PNG output buffer */
-extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
-#endif
-
-/* optional update palette with requested transformations */
-extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
-
-/* optional call to update the users info structure */
-extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read one or more rows of image data. */
-extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
-   png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
-#endif
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read a row of data. */
-extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
-   png_bytep row,
-   png_bytep display_row));
-#endif
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the whole image into memory at once. */
-extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
-   png_bytepp image));
-#endif
-
-/* write a row of image data */
-extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
-   png_bytep row));
-
-/* write a few rows of image data */
-extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
-   png_bytepp row, png_uint_32 num_rows));
-
-/* write the image data */
-extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
-   png_bytepp image));
-
-/* writes the end of the PNG file. */
-extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the end of the PNG file. */
-extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-/* free any memory associated with the png_info_struct */
-extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
-   png_infopp info_ptr_ptr));
-
-/* free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
-   png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
-
-/* free all memory used by the read (old method - NOT DLL EXPORTED) */
-extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_infop end_info_ptr));
-
-/* free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_write_struct)
-   PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
-
-/* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
-extern void png_write_destroy PNGARG((png_structp png_ptr));
-
-/* set the libpng method of handling chunk CRC errors */
-extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
-   int crit_action, int ancil_action));
-
-/* Values for png_set_crc_action() to say how to handle CRC errors in
- * ancillary and critical chunks, and whether to use the data contained
- * therein.  Note that it is impossible to "discard" data in a critical
- * chunk.  For versions prior to 0.90, the action was always error/quit,
- * whereas in version 0.90 and later, the action for CRC errors in ancillary
- * chunks is warn/discard.  These values should NOT be changed.
- *
- *      value                       action:critical     action:ancillary
- */
-#define PNG_CRC_DEFAULT       0  /* error/quit          warn/discard data */
-#define PNG_CRC_ERROR_QUIT    1  /* error/quit          error/quit        */
-#define PNG_CRC_WARN_DISCARD  2  /* (INVALID)           warn/discard data */
-#define PNG_CRC_WARN_USE      3  /* warn/use data       warn/use data     */
-#define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */
-#define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */
-
-/* These functions give the user control over the scan-line filtering in
- * libpng and the compression methods used by zlib.  These functions are
- * mainly useful for testing, as the defaults should work with most users.
- * Those users who are tight on memory or want faster performance at the
- * expense of compression can modify them.  See the compression library
- * header file (zlib.h) for an explination of the compression functions.
- */
-
-/* set the filtering method(s) used by libpng.  Currently, the only valid
- * value for "method" is 0.
- */
-extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
-   int filters));
-
-/* Flags for png_set_filter() to say which filters to use.  The flags
- * are chosen so that they don't conflict with real filter types
- * below, in case they are supplied instead of the #defined constants.
- * These values should NOT be changed.
- */
-#define PNG_NO_FILTERS     0x00
-#define PNG_FILTER_NONE    0x08
-#define PNG_FILTER_SUB     0x10
-#define PNG_FILTER_UP      0x20
-#define PNG_FILTER_AVG     0x40
-#define PNG_FILTER_PAETH   0x80
-#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
-                         PNG_FILTER_AVG | PNG_FILTER_PAETH)
-
-/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
- * These defines should NOT be changed.
- */
-#define PNG_FILTER_VALUE_NONE  0
-#define PNG_FILTER_VALUE_SUB   1
-#define PNG_FILTER_VALUE_UP    2
-#define PNG_FILTER_VALUE_AVG   3
-#define PNG_FILTER_VALUE_PAETH 4
-#define PNG_FILTER_VALUE_LAST  5
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */
-/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
- * defines, either the default (minimum-sum-of-absolute-differences), or
- * the experimental method (weighted-minimum-sum-of-absolute-differences).
- *
- * Weights are factors >= 1.0, indicating how important it is to keep the
- * filter type consistent between rows.  Larger numbers mean the current
- * filter is that many times as likely to be the same as the "num_weights"
- * previous filters.  This is cumulative for each previous row with a weight.
- * There needs to be "num_weights" values in "filter_weights", or it can be
- * NULL if the weights aren't being specified.  Weights have no influence on
- * the selection of the first row filter.  Well chosen weights can (in theory)
- * improve the compression for a given image.
- *
- * Costs are factors >= 1.0 indicating the relative decoding costs of a
- * filter type.  Higher costs indicate more decoding expense, and are
- * therefore less likely to be selected over a filter with lower computational
- * costs.  There needs to be a value in "filter_costs" for each valid filter
- * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
- * setting the costs.  Costs try to improve the speed of decompression without
- * unduly increasing the compressed image size.
- *
- * A negative weight or cost indicates the default value is to be used, and
- * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
- * The default values for both weights and costs are currently 1.0, but may
- * change if good general weighting/cost heuristics can be found.  If both
- * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
- * to the UNWEIGHTED method, but with added encoding time/computation.
- */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
-   int heuristic_method, int num_weights, png_doublep filter_weights,
-   png_doublep filter_costs));
-#endif
-#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
-
-/* Heuristic used for row filter selection.  These defines should NOT be
- * changed.
- */
-#define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently "UNWEIGHTED" */
-#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */
-#define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */
-#define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */
-
-/* Set the library compression level.  Currently, valid values range from
- * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
- * (0 - no compression, 9 - "maximal" compression).  Note that tests have
- * shown that zlib compression levels 3-6 usually perform as well as level 9
- * for PNG images, and do considerably fewer caclulations.  In the future,
- * these values may not correspond directly to the zlib compression levels.
- */
-extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
-   int level));
-
-extern PNG_EXPORT(void,png_set_compression_mem_level)
-   PNGARG((png_structp png_ptr, int mem_level));
-
-extern PNG_EXPORT(void,png_set_compression_strategy)
-   PNGARG((png_structp png_ptr, int strategy));
-
-extern PNG_EXPORT(void,png_set_compression_window_bits)
-   PNGARG((png_structp png_ptr, int window_bits));
-
-extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
-   int method));
-
-/* These next functions are called for input/output, memory, and error
- * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
- * and call standard C I/O routines such as fread(), fwrite(), and
- * fprintf().  These functions can be made to use other I/O routines
- * at run time for those applications that need to handle I/O in a
- * different manner by calling png_set_???_fn().  See libpng.txt for
- * more information.
- */
-
-#if !defined(PNG_NO_STDIO)
-/* Initialize the input/output for the PNG file to the default functions. */
-extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));
-#endif
-
-/* Replace the (error and abort), and warning functions with user
- * supplied functions.  If no messages are to be printed you must still
- * write and use replacement functions. The replacement error_fn should
- * still do a longjmp to the last setjmp location if you are using this
- * method of error handling.  If error_fn or warning_fn is NULL, the
- * default function will be used.
- */
-
-extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
-   png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
-
-/* Return the user pointer associated with the error functions */
-extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
-
-/* Replace the default data output functions with a user supplied one(s).
- * If buffered output is not used, then output_flush_fn can be set to NULL.
- * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time
- * output_flush_fn will be ignored (and thus can be NULL).
- */
-extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
-   png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
-
-/* Replace the default data input function with a user supplied one. */
-extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
-   png_voidp io_ptr, png_rw_ptr read_data_fn));
-
-/* Return the user pointer associated with the I/O functions */
-extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
-
-extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
-   png_read_status_ptr read_row_fn));
-
-extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
-   png_write_status_ptr write_row_fn));
-
-#ifdef PNG_USER_MEM_SUPPORTED
-/* Replace the default memory allocation functions with user supplied one(s). */
-extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
-   png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-/* Return the user pointer associated with the memory functions */
-extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
-   png_ptr, png_user_transform_ptr read_user_transform_fn));
-#endif
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
-   png_ptr, png_user_transform_ptr write_user_transform_fn));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
-   png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
-   int user_transform_channels));
-/* Return the user pointer associated with the user transform functions */
-extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
-   PNGARG((png_structp png_ptr));
-#endif
-
-#ifdef PNG_USER_CHUNKS_SUPPORTED
-extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
-   png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
-extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
-   png_ptr));
-#endif
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-/* Sets the function callbacks for the push reader, and a pointer to a
- * user-defined structure available to the callback functions.
- */
-extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
-   png_voidp progressive_ptr,
-   png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
-   png_progressive_end_ptr end_fn));
-
-/* returns the user pointer associated with the push read functions */
-extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
-   PNGARG((png_structp png_ptr));
-
-/* function to be called when data becomes available */
-extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
-
-/* function that combines rows.  Not very much different than the
- * png_combine_row() call.  Is this even used?????
- */
-extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
-   png_bytep old_row, png_bytep new_row));
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-
-#if defined(PNG_1_0_X)
-#  define png_malloc_warn png_malloc
-#else
-/* Added at libpng version 1.2.4 */
-extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-#endif
-
-/* frees a pointer allocated by png_malloc() */
-extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
-
-#if defined(PNG_1_0_X)
-/* Function to allocate memory for zlib. */
-extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,
-   uInt size));
-
-/* Function to free memory for zlib */
-extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));
-#endif
-
-/* Free data that was allocated internally */
-extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 free_me, int num));
-#ifdef PNG_FREE_ME_SUPPORTED
-/* Reassign responsibility for freeing existing data, whether allocated
- * by libpng or by the application */
-extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int freer, png_uint_32 mask));
-#endif
-/* assignments for png_data_freer */
-#define PNG_DESTROY_WILL_FREE_DATA 1
-#define PNG_SET_WILL_FREE_DATA 1
-#define PNG_USER_WILL_FREE_DATA 2
-/* Flags for png_ptr->free_me and info_ptr->free_me */
-#define PNG_FREE_HIST 0x0008
-#define PNG_FREE_ICCP 0x0010
-#define PNG_FREE_SPLT 0x0020
-#define PNG_FREE_ROWS 0x0040
-#define PNG_FREE_PCAL 0x0080
-#define PNG_FREE_SCAL 0x0100
-#define PNG_FREE_UNKN 0x0200
-#define PNG_FREE_LIST 0x0400
-#define PNG_FREE_PLTE 0x1000
-#define PNG_FREE_TRNS 0x2000
-#define PNG_FREE_TEXT 0x4000
-#define PNG_FREE_ALL  0x7fff
-#define PNG_FREE_MUL  0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
-
-#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
-   png_voidp ptr));
-#endif
-
-extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr,
-   png_voidp s1, png_voidp s2, png_uint_32 size));
-
-extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr,
-   png_voidp s1, int value, png_uint_32 size));
-
-#if defined(USE_FAR_KEYWORD)  /* memory model conversion function */
-extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
-   int check));
-#endif /* USE_FAR_KEYWORD */
-
-/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
-   png_const_charp error_message));
-
-/* The same, but the chunk name is prepended to the error string. */
-extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
-   png_const_charp error_message));
-
-/* Non-fatal error in libpng.  Can continue, but may have a problem. */
-extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
-   png_const_charp warning_message));
-
-/* Non-fatal error in libpng, chunk name is prepended to message. */
-extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
-   png_const_charp warning_message));
-
-/* The png_set_<chunk> functions are for storing values in the png_info_struct.
- * Similarly, the png_get_<chunk> calls are used to read values from the
- * png_info_struct, either storing the parameters in the passed variables, or
- * setting pointers into the png_info_struct where the data is stored.  The
- * png_get_<chunk> functions return a non-zero value if the data was available
- * in info_ptr, or return zero and do not change any of the parameters if the
- * data was not available.
- *
- * These functions should be used instead of directly accessing png_info
- * to avoid problems with future changes in the size and internal layout of
- * png_info_struct.
- */
-/* Returns "flag" if chunk data is valid in info_ptr. */
-extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 flag));
-
-/* Returns number of bytes needed to hold a transformed row. */
-extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-/* Returns row_pointers, which is an array of pointers to scanlines that was
-returned from png_read_png(). */
-extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-/* Set row_pointers, which is an array of pointers to scanlines for use
-by png_write_png(). */
-extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytepp row_pointers));
-#endif
-
-/* Returns number of color channels in image. */
-extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#ifdef PNG_EASY_ACCESS_SUPPORTED
-/* Returns image width in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image height in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image bit_depth. */
-extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image color_type. */
-extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image filter_type. */
-extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image interlace_type. */
-extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image compression_type. */
-extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image resolution in pixels per meter, from pHYs chunk data. */
-extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns pixel aspect ratio, computed from pHYs chunk data.  */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-#endif
-
-/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
-extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-#endif /* PNG_EASY_ACCESS_SUPPORTED */
-
-/* Returns pointer to signature string read from PNG header */
-extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_bKGD_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_16p *background));
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED)
-extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_16p background));
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double *white_x, double *white_y, double *red_x,
-   double *red_y, double *green_x, double *green_y, double *blue_x,
-   double *blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
-   *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
-   png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
-   *int_blue_x, png_fixed_point *int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double white_x, double white_y, double red_x,
-   double red_y, double green_x, double green_y, double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,
-   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
-   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
-   png_fixed_point int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double *file_gamma));
-#endif
-extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point *int_file_gamma));
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double file_gamma));
-#endif
-extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point int_file_gamma));
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_16p *hist));
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_16p hist));
-#endif
-
-extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
-   int *bit_depth, int *color_type, int *interlace_method,
-   int *compression_method, int *filter_method));
-
-extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
-   int color_type, int interlace_method, int compression_method,
-   int filter_method));
-
-#if defined(PNG_oFFs_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
-   int *unit_type));
-#endif
-
-#if defined(PNG_oFFs_SUPPORTED)
-extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
-   int unit_type));
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
-   int *type, int *nparams, png_charp *units, png_charpp *params));
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
-   int type, int nparams, png_charp units, png_charpp params));
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
-#endif
-
-extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_colorp *palette, int *num_palette));
-
-extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_colorp palette, int num_palette));
-
-#if defined(PNG_sBIT_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_8p *sig_bit));
-#endif
-
-#if defined(PNG_sBIT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_8p sig_bit));
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *intent));
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int intent));
-extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int intent));
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charpp name, int *compression_type,
-   png_charpp profile, png_uint_32 *proflen));
-   /* Note to maintainer: profile should be png_bytepp */
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp name, int compression_type,
-   png_charp profile, png_uint_32 proflen));
-   /* Note to maintainer: profile should be png_bytep */
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_sPLT_tpp entries));
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_sPLT_tp entries, int nentries));
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-/* png_get_text also returns the number of text chunks in *num_text */
-extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp *text_ptr, int *num_text));
-#endif
-
-/*
- *  Note while png_set_text() will accept a structure whose text,
- *  language, and  translated keywords are NULL pointers, the structure
- *  returned by png_get_text will always contain regular
- *  zero-terminated C strings.  They might be empty strings but
- *  they will never be NULL pointers.
- */
-
-#if defined(PNG_TEXT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp text_ptr, int num_text));
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_timep *mod_time));
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_timep mod_time));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep *trans, int *num_trans,
-   png_color_16p *trans_values));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep trans, int num_trans,
-   png_color_16p trans_values));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *unit, double *width, double *height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
-#endif
-#endif
-#endif /* PNG_sCAL_SUPPORTED */
-
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int unit, double width, double height));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
-#endif
-#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-/* provide a list of chunks and how they are to be handled, if the built-in
-   handling or default unknown chunk handling is not desired.  Any chunks not
-   listed will be handled in the default manner.  The IHDR and IEND chunks
-   must not be listed.
-      keep = 0: follow default behavour
-           = 1: do not keep
-           = 2: keep only if safe-to-copy
-           = 3: keep even if unsafe-to-copy
-*/
-extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
-   png_ptr, int keep, png_bytep chunk_list, int num_chunks));
-extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
-extern PNG_EXPORT(void, png_set_unknown_chunk_location)
-   PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
-extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
-   png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
-#endif
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
-   chunk_name));
-#endif
-
-/* Png_free_data() will turn off the "valid" flag for anything it frees.
-   If you need to turn it off for a chunk that your application has freed,
-   you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */
-extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int mask));
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-/* The "params" pointer is currently not used and is for future expansion. */
-extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
-                        png_infop info_ptr,
-                        int transforms,
-                        png_voidp params));
-extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
-                        png_infop info_ptr,
-                        int transforms,
-                        png_voidp params));
-#endif
-
-/* Define PNG_DEBUG at compile time for debugging information.  Higher
- * numbers for PNG_DEBUG mean more debugging information.  This has
- * only been added since version 0.95 so it is not implemented throughout
- * libpng yet, but more support will be added as needed.
- */
-#ifdef PNG_DEBUG
-#if (PNG_DEBUG > 0)
-#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
-#include <crtdbg.h>
-#if (PNG_DEBUG > 1)
-#define png_debug(l,m)  _RPT0(_CRT_WARN,m)
-#define png_debug1(l,m,p1)  _RPT1(_CRT_WARN,m,p1)
-#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2)
-#endif
-#else /* PNG_DEBUG_FILE || !_MSC_VER */
-#ifndef PNG_DEBUG_FILE
-#define PNG_DEBUG_FILE stderr
-#endif /* PNG_DEBUG_FILE */
-#if (PNG_DEBUG > 1)
-#define png_debug(l,m) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
-}
-#define png_debug1(l,m,p1) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
-}
-#define png_debug2(l,m,p1,p2) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
-}
-#endif /* (PNG_DEBUG > 1) */
-#endif /* _MSC_VER */
-#endif /* (PNG_DEBUG > 0) */
-#endif /* PNG_DEBUG */
-#ifndef png_debug
-#define png_debug(l, m)
-#endif
-#ifndef png_debug1
-#define png_debug1(l, m, p1)
-#endif
-#ifndef png_debug2
-#define png_debug2(l, m, p1, p2)
-#endif
-
-extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void));
-
-extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
-
-#ifdef PNG_MNG_FEATURES_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
-   png_ptr, png_uint_32 mng_features_permitted));
-#endif
-
-/* For use in png_set_keep_unknown, added to version 1.2.6 */
-#define PNG_HANDLE_CHUNK_AS_DEFAULT   0
-#define PNG_HANDLE_CHUNK_NEVER        1
-#define PNG_HANDLE_CHUNK_IF_SAFE      2
-#define PNG_HANDLE_CHUNK_ALWAYS       3
-
-/* Added to version 1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED  0x01  /* not user-settable */
-#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU    0x02  /* not user-settable */
-#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  0x04
-#define PNG_ASM_FLAG_MMX_READ_INTERLACE    0x08
-#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB   0x10
-#define PNG_ASM_FLAG_MMX_READ_FILTER_UP    0x20
-#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG   0x40
-#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
-#define PNG_ASM_FLAGS_INITIALIZED          0x80000000  /* not user-settable */
-
-#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                           | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
-#define PNG_MMX_WRITE_FLAGS ( 0 )
-
-#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
-                      | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU   \
-                      | PNG_MMX_READ_FLAGS                \
-                      | PNG_MMX_WRITE_FLAGS )
-
-#define PNG_SELECT_READ   1
-#define PNG_SELECT_WRITE  2
-
-#if !defined(PNG_1_0_X)
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
-   PNGARG((int flag_select, int *compilerID));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
-   PNGARG((int flag_select));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
-   PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
-   PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
-   PNGARG((png_structp png_ptr));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_asm_flags)
-   PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_mmx_thresholds)
-   PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
-   png_uint_32 mmx_rowbytes_threshold));
-
-#endif /* PNG_1_0_X */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-#if !defined(PNG_1_0_X)
-/* png.c, pnggccrd.c, or pngvcrd.c */
-extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
-
-/* Strip the prepended error numbers ("#nnn ") from error and warning
- * messages before passing them to the error or warning handler. */
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
-   png_ptr, png_uint_32 strip_mode));
-#endif
-
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
-   png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
-extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
-   png_ptr));
-extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
-   png_ptr));
-#endif
-
-/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
-
-#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
-/* With these routines we avoid an integer divide, which will be slower on
- * most machines.  However, it does take more operations than the corresponding
- * divide method, so it may be slower on a few RISC systems.  There are two
- * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.
- *
- * Note that the rounding factors are NOT supposed to be the same!  128 and
- * 32768 are correct for the NODIV code; 127 and 32767 are correct for the
- * standard method.
- *
- * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
- */
-
- /* fg and bg should be in `gamma 1.0' space; alpha is the opacity          */
-
-#  define png_composite(composite, fg, alpha, bg)                            \
-     { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \
-                        +        (png_uint_16)(bg)*(png_uint_16)(255 -       \
-                        (png_uint_16)(alpha)) + (png_uint_16)128);           \
-       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
-
-#  define png_composite_16(composite, fg, alpha, bg)                         \
-     { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \
-                        + (png_uint_32)(bg)*(png_uint_32)(65535L -           \
-                        (png_uint_32)(alpha)) + (png_uint_32)32768L);        \
-       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
-
-#else  /* standard method using integer division */
-
-#  define png_composite(composite, fg, alpha, bg)                            \
-     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +    \
-       (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \
-       (png_uint_16)127) / 255)
-
-#  define png_composite_16(composite, fg, alpha, bg)                         \
-     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
-       (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) +      \
-       (png_uint_32)32767) / (png_uint_32)65535L)
-
-#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
-
-/* These next functions are used internally in the code.  They generally
- * shouldn't be used unless you are writing code to add or replace some
- * functionality in libpng.  More information about most functions can
- * be found in the files where the functions are located.
- */
-
-#if defined(PNG_INTERNAL)
-
-/* Various modes of operation.  Note that after an init, mode is set to
- * zero automatically when the structure is created.
- */
-#define PNG_HAVE_IHDR               0x01
-#define PNG_HAVE_PLTE               0x02
-#define PNG_HAVE_IDAT               0x04
-#define PNG_AFTER_IDAT              0x08
-#define PNG_HAVE_IEND               0x10
-#define PNG_HAVE_gAMA               0x20
-#define PNG_HAVE_cHRM               0x40
-#define PNG_HAVE_sRGB               0x80
-#define PNG_HAVE_CHUNK_HEADER      0x100
-#define PNG_WROTE_tIME             0x200
-#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
-#define PNG_BACKGROUND_IS_GRAY     0x800
-#define PNG_HAVE_PNG_SIGNATURE    0x1000
-
-/* flags for the transformations the PNG library does on the image data */
-#define PNG_BGR                0x0001
-#define PNG_INTERLACE          0x0002
-#define PNG_PACK               0x0004
-#define PNG_SHIFT              0x0008
-#define PNG_SWAP_BYTES         0x0010
-#define PNG_INVERT_MONO        0x0020
-#define PNG_DITHER             0x0040
-#define PNG_BACKGROUND         0x0080
-#define PNG_BACKGROUND_EXPAND  0x0100
-                          /*   0x0200 unused */
-#define PNG_16_TO_8            0x0400
-#define PNG_RGBA               0x0800
-#define PNG_EXPAND             0x1000
-#define PNG_GAMMA              0x2000
-#define PNG_GRAY_TO_RGB        0x4000
-#define PNG_FILLER             0x8000L
-#define PNG_PACKSWAP          0x10000L
-#define PNG_SWAP_ALPHA        0x20000L
-#define PNG_STRIP_ALPHA       0x40000L
-#define PNG_INVERT_ALPHA      0x80000L
-#define PNG_USER_TRANSFORM   0x100000L
-#define PNG_RGB_TO_GRAY_ERR  0x200000L
-#define PNG_RGB_TO_GRAY_WARN 0x400000L
-#define PNG_RGB_TO_GRAY      0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */
-
-/* flags for png_create_struct */
-#define PNG_STRUCT_PNG   0x0001
-#define PNG_STRUCT_INFO  0x0002
-
-/* Scaling factor for filter heuristic weighting calculations */
-#define PNG_WEIGHT_SHIFT 8
-#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
-#define PNG_COST_SHIFT 3
-#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
-
-/* flags for the png_ptr->flags rather than declaring a byte for each one */
-#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY     0x0001
-#define PNG_FLAG_ZLIB_CUSTOM_LEVEL        0x0002
-#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL    0x0004
-#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS  0x0008
-#define PNG_FLAG_ZLIB_CUSTOM_METHOD       0x0010
-#define PNG_FLAG_ZLIB_FINISHED            0x0020
-#define PNG_FLAG_ROW_INIT                 0x0040
-#define PNG_FLAG_FILLER_AFTER             0x0080
-#define PNG_FLAG_CRC_ANCILLARY_USE        0x0100
-#define PNG_FLAG_CRC_ANCILLARY_NOWARN     0x0200
-#define PNG_FLAG_CRC_CRITICAL_USE         0x0400
-#define PNG_FLAG_CRC_CRITICAL_IGNORE      0x0800
-#define PNG_FLAG_FREE_PLTE                0x1000
-#define PNG_FLAG_FREE_TRNS                0x2000
-#define PNG_FLAG_FREE_HIST                0x4000
-#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS      0x8000L
-#define PNG_FLAG_KEEP_UNSAFE_CHUNKS       0x10000L
-#define PNG_FLAG_LIBRARY_MISMATCH         0x20000L
-#define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L
-#define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L
-#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L
-
-#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
-                                     PNG_FLAG_CRC_ANCILLARY_NOWARN)
-
-#define PNG_FLAG_CRC_CRITICAL_MASK  (PNG_FLAG_CRC_CRITICAL_USE | \
-                                     PNG_FLAG_CRC_CRITICAL_IGNORE)
-
-#define PNG_FLAG_CRC_MASK           (PNG_FLAG_CRC_ANCILLARY_MASK | \
-                                     PNG_FLAG_CRC_CRITICAL_MASK)
-
-/* save typing and make code easier to understand */
-
-#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
-   abs((int)((c1).green) - (int)((c2).green)) + \
-   abs((int)((c1).blue) - (int)((c2).blue)))
-
-/* Added to libpng-1.2.6 JB */
-#define PNG_ROWBYTES(pixel_bits, width) \
-    ((pixel_bits) >= 8 ? \
-    ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \
-    (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )
-
-/* PNG_OUT_OF_RANGE returns true if value is outside the range
-   ideal-delta..ideal+delta.  Each argument is evaluated twice.
-   "ideal" and "delta" should be constants, normally simple
-   integers, "value" a variable. Added to libpng-1.2.6 JB */
-#define PNG_OUT_OF_RANGE(value, ideal, delta) \
-        ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
-
-/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
-/* place to hold the signature string for a PNG file. */
-#ifdef PNG_USE_GLOBAL_ARRAYS
-   PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8];
-#else
-#define png_sig png_sig_bytes(NULL)
-#endif
-#endif /* PNG_NO_EXTERN */
-
-/* Constant strings for known chunk types.  If you need to add a chunk,
- * define the name here, and add an invocation of the macro in png.c and
- * wherever it's needed.
- */
-#define PNG_IHDR const png_byte png_IHDR[5] = { 73,  72,  68,  82, '\0'}
-#define PNG_IDAT const png_byte png_IDAT[5] = { 73,  68,  65,  84, '\0'}
-#define PNG_IEND const png_byte png_IEND[5] = { 73,  69,  78,  68, '\0'}
-#define PNG_PLTE const png_byte png_PLTE[5] = { 80,  76,  84,  69, '\0'}
-#define PNG_bKGD const png_byte png_bKGD[5] = { 98,  75,  71,  68, '\0'}
-#define PNG_cHRM const png_byte png_cHRM[5] = { 99,  72,  82,  77, '\0'}
-#define PNG_gAMA const png_byte png_gAMA[5] = {103,  65,  77,  65, '\0'}
-#define PNG_hIST const png_byte png_hIST[5] = {104,  73,  83,  84, '\0'}
-#define PNG_iCCP const png_byte png_iCCP[5] = {105,  67,  67,  80, '\0'}
-#define PNG_iTXt const png_byte png_iTXt[5] = {105,  84,  88, 116, '\0'}
-#define PNG_oFFs const png_byte png_oFFs[5] = {111,  70,  70, 115, '\0'}
-#define PNG_pCAL const png_byte png_pCAL[5] = {112,  67,  65,  76, '\0'}
-#define PNG_sCAL const png_byte png_sCAL[5] = {115,  67,  65,  76, '\0'}
-#define PNG_pHYs const png_byte png_pHYs[5] = {112,  72,  89, 115, '\0'}
-#define PNG_sBIT const png_byte png_sBIT[5] = {115,  66,  73,  84, '\0'}
-#define PNG_sPLT const png_byte png_sPLT[5] = {115,  80,  76,  84, '\0'}
-#define PNG_sRGB const png_byte png_sRGB[5] = {115,  82,  71,  66, '\0'}
-#define PNG_tEXt const png_byte png_tEXt[5] = {116,  69,  88, 116, '\0'}
-#define PNG_tIME const png_byte png_tIME[5] = {116,  73,  77,  69, '\0'}
-#define PNG_tRNS const png_byte png_tRNS[5] = {116,  82,  78,  83, '\0'}
-#define PNG_zTXt const png_byte png_zTXt[5] = {122,  84,  88, 116, '\0'}
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (const png_byte FARDATA) png_IHDR[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_IDAT[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_IEND[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_PLTE[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_bKGD[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_cHRM[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_gAMA[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_hIST[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_iCCP[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_iTXt[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_oFFs[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_pCAL[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_sCAL[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_pHYs[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_sBIT[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_sPLT[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_sRGB[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_tEXt[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_tIME[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5];
-PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
-#endif /* PNG_USE_GLOBAL_ARRAYS */
-
-
-/* Inline macros to do direct reads of bytes from the input buffer.  These
- * require that you are using an architecture that uses PNG byte ordering
- * (MSB first) and supports unaligned data storage.  I think that PowerPC
- * in big-endian mode and 680x0 are the only ones that will support this.
- * The x86 line of processors definitely do not.  The png_get_int_32()
- * routine also assumes we are using two's complement format for negative
- * values, which is almost certainly true.
- */
-#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
-#  if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
-#    define png_get_int_32(buf) ( *((png_int_32p) (buf)))
-#  endif
-#  define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
-#  define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
-#else
-#  if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
-PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf));
-#  endif
-PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf));
-PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf));
-#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
-PNG_EXTERN png_uint_32 png_get_uint_31 PNGARG((png_structp png_ptr,
-  png_bytep buf));
-
-/* Initialize png_ptr struct for reading, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_read_struct instead).
- */
-extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
-#undef png_read_init
-#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
-    PNG_LIBPNG_VER_STRING,  png_sizeof(png_struct));
-extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size));
-extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
-    png_info_size));
-
-/* Initialize png_ptr struct for writing, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_write_struct instead).
- */
-extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
-#undef png_write_init
-#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
-    PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
-extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size));
-extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
-    png_info_size));
-
-/* Allocate memory for an internal libpng struct */
-PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
-
-/* Free memory from internal libpng struct */
-PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
-
-PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
-  malloc_fn, png_voidp mem_ptr));
-PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
-   png_free_ptr free_fn, png_voidp mem_ptr));
-
-/* Free any memory that info_ptr points to and reset struct. */
-PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_1_0_X
-/* Function to allocate memory for zlib. */
-PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
-
-/* Function to free memory for zlib */
-PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
-
-#ifdef PNG_SIZE_T
-/* Function to convert a sizeof an item to png_sizeof item */
-   PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
-#endif
-
-/* Next four functions are used internally as callbacks.  PNGAPI is required
- * but not PNG_EXPORT.  PNGAPI added at libpng version 1.2.3. */
-
-PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t length));
-#endif
-
-PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
-PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
-#endif
-#endif
-#else /* PNG_1_0_X */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t length));
-#endif
-#endif /* PNG_1_0_X */
-
-/* Reset the CRC variable */
-PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
-
-/* Write the "data" buffer to whatever output you are using. */
-PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-/* Read data from whatever input you are using into the "data" buffer */
-PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-/* Read bytes into buf, and update png_ptr->crc */
-PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
-   png_size_t length));
-
-/* Decompress data in a chunk that uses compression */
-#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
-    defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
-PNG_EXTERN png_charp png_decompress_chunk PNGARG((png_structp png_ptr,
-   int comp_type, png_charp chunkdata, png_size_t chunklength,
-   png_size_t prefix_length, png_size_t *data_length));
-#endif
-
-/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
-PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
-
-/* Read the CRC from the file and compare it to the libpng calculated CRC */
-PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
-
-/* Calculate the CRC over a section of data.  Note that we are only
- * passing a maximum of 64K on systems that have this as a memory limit,
- * since this is the maximum buffer size we can specify.
- */
-PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
-   png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
-#endif
-
-
-/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
- * The only currently known PNG chunks that use signed numbers are
- * the ancillary extension chunks, oFFs and pCAL.
- */
-PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i));
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
-PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i));
-#endif
-
-/* Place a 16-bit number into a buffer in PNG byte order.
- * The parameter is declared unsigned int, not png_uint_16,
- * just to avoid potential problems on pre-ANSI C compilers.
- */
-PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i));
-
-/* simple function to write the signature */
-PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
-
-/* write various chunks */
-
-/* Write the IHDR chunk, and update the png_struct with the necessary
- * information.
- */
-PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
-   png_uint_32 height,
-   int bit_depth, int color_type, int compression_method, int filter_method,
-   int interlace_method));
-
-PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
-   png_uint_32 num_pal));
-
-PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
-
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
-    file_gamma));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
-PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
-   int color_type));
-#endif
-
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
-   double white_x, double white_y,
-   double red_x, double red_y, double green_x, double green_y,
-   double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
-   png_fixed_point int_white_x, png_fixed_point int_white_y,
-   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
-   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
-   png_fixed_point int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
-PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
-   int intent));
-#endif
-
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
-PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
-   png_charp name, int compression_type,
-   png_charp profile, int proflen));
-   /* Note to maintainer: profile should be png_bytep */
-#endif
-
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
-   png_sPLT_tp palette));
-#endif
-
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
-PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
-   png_color_16p values, int number, int color_type));
-#endif
-
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
-PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
-   png_color_16p values, int color_type));
-#endif
-
-#if defined(PNG_WRITE_hIST_SUPPORTED)
-PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
-   int num_hist));
-#endif
-
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
-    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
-   png_charp key, png_charpp new_key));
-#endif
-
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
-   png_charp text, png_size_t text_len));
-#endif
-
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
-   png_charp text, png_size_t text_len, int compression));
-#endif
-
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
-   int compression, png_charp key, png_charp lang, png_charp lang_key,
-   png_charp text));
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)  /* Added at version 1.0.14 and 1.2.4 */
-PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp text_ptr, int num_text));
-#endif
-
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
-PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
-   png_int_32 x_offset, png_int_32 y_offset, int unit_type));
-#endif
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
-PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
-   png_int_32 X0, png_int_32 X1, int type, int nparams,
-   png_charp units, png_charpp params));
-#endif
-
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
-PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
-   png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
-   int unit_type));
-#endif
-
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
-   png_timep mod_time));
-#endif
-
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
-   int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
-   int unit, png_charp width, png_charp height));
-#endif
-#endif
-#endif
-
-/* Called when finished processing a row of data */
-PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
-
-/* Internal use only.   Called before first row of data */
-PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
-#endif
-
-/* combine a row of data, dealing with alpha, etc. if requested */
-PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
-   int mask));
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-/* expand an interlaced row */
-/* OLD pre-1.0.9 interface:
-PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
-   png_bytep row, int pass, png_uint_32 transformations));
- */
-PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
-#endif
-
-/* GRR TO DO (2.0 or whenever):  simplify other internal calling interfaces */
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* grab pixels out of a row for an interlaced pass */
-PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
-   png_bytep row, int pass));
-#endif
-
-/* unfilter a row */
-PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
-   png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
-
-/* Choose the best filter to use and filter the row data */
-PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
-   png_row_infop row_info));
-
-/* Write out the filtered row. */
-PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
-   png_bytep filtered_row));
-/* finish a row while reading, dealing with interlacing passes, etc. */
-PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
-
-/* initialize the row buffers, etc. */
-PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
-/* optional call to update the users info structure */
-PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-/* these are the functions that do the transformations */
-#if defined(PNG_READ_FILLER_SUPPORTED)
-PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 filler, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
-    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
-   row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_8p sig_bits));
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
-   png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
-
-#  if defined(PNG_CORRECT_PALETTE_SUPPORTED)
-PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
-   png_colorp palette, int num_palette));
-#  endif
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 bit_depth));
-#endif
-
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_8p bit_depth));
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background,
-   png_color_16p background_1,
-   png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
-   png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
-   png_uint_16pp gamma_16_to_1, int gamma_shift));
-#else
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background));
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
-   png_bytep gamma_table, png_uint_16pp gamma_16_table,
-   int gamma_shift));
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
-   png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
-PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
-   png_bytep row, png_color_16p trans_value));
-#endif
-
-/* The following decodes the appropriate chunks, and does error correction,
- * then calls the appropriate callback for the chunk if it is valid.
- */
-
-/* decode the IHDR chunk */
-PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-
-#if defined(PNG_READ_bKGD_SUPPORTED)
-PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_cHRM_SUPPORTED)
-PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_gAMA_SUPPORTED)
-PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_hIST_SUPPORTED)
-PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_iCCP_SUPPORTED)
-extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif /* PNG_READ_iCCP_SUPPORTED */
-
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_oFFs_SUPPORTED)
-PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pCAL_SUPPORTED)
-PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pHYs_SUPPORTED)
-PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sBIT_SUPPORTED)
-PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sCAL_SUPPORTED)
-PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sPLT_SUPPORTED)
-extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif /* PNG_READ_sPLT_SUPPORTED */
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tIME_SUPPORTED)
-PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tRNS_SUPPORTED)
-PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-
-PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
-   png_bytep chunk_name));
-
-/* handle the transformations for reading and writing */
-PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
-
-PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
-PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#ifdef PNG_MNG_FEATURES_SUPPORTED
-PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
-   png_bytep row));
-PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-/* png.c */ /* PRIVATE */
-PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
-#endif
-/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-
-#endif /* PNG_INTERNAL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PNG_VERSION_INFO_ONLY */
-/* do not put anything past this line */
-#endif /* PNG_H */
diff --git a/tkimg1.3/libpng/pngasmrd.h b/tkimg1.3/libpng/pngasmrd.h
deleted file mode 100644
index 0c6e1f7..0000000
--- a/tkimg1.3/libpng/pngasmrd.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* pngasmrd.h - assembler version of utilities to read a PNG file
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 2002-2004 Glenn Randers-Pehrson
- *
- */
-
-/* This file is obsolete in libpng-1.0.9 and later; its contents now appear
- * at the end of pngconf.h.
- */
diff --git a/tkimg1.3/libpng/pngbar.jpg b/tkimg1.3/libpng/pngbar.jpg
deleted file mode 100644
index 70ba8d8..0000000
Binary files a/tkimg1.3/libpng/pngbar.jpg and /dev/null differ
diff --git a/tkimg1.3/libpng/pngbar.png b/tkimg1.3/libpng/pngbar.png
deleted file mode 100644
index 49798c8..0000000
Binary files a/tkimg1.3/libpng/pngbar.png and /dev/null differ
diff --git a/tkimg1.3/libpng/pngconf.h b/tkimg1.3/libpng/pngconf.h
deleted file mode 100644
index ce66ab9..0000000
--- a/tkimg1.3/libpng/pngconf.h
+++ /dev/null
@@ -1,1378 +0,0 @@
-
-/* pngconf.h - machine configurable file for libpng
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-/* Any machine specific code is near the front of this file, so if you
- * are configuring libpng for a machine, you may want to read the section
- * starting here down to where it starts to typedef png_color, png_text,
- * and png_info.
- */
-
-#ifndef PNGCONF_H
-#define PNGCONF_H
-
-#ifdef PNG_USER_CONFIG
-#include "pngusr.h"
-#endif
-
-/* This is the size of the compression buffer, and thus the size of
- * an IDAT chunk.  Make this whatever size you feel is best for your
- * machine.  One of these will be allocated per png_struct.  When this
- * is full, it writes the data to the disk, and does some other
- * calculations.  Making this an extremely small size will slow
- * the library down, but you may want to experiment to determine
- * where it becomes significant, if you are concerned with memory
- * usage.  Note that zlib allocates at least 32Kb also.  For readers,
- * this describes the size of the buffer available to read the data in.
- * Unless this gets smaller than the size of a row (compressed),
- * it should not make much difference how big this is.
- */
-
-#ifndef PNG_ZBUF_SIZE
-#  define PNG_ZBUF_SIZE 8192
-#endif
-
-/* Enable if you want a write-only libpng */
-
-#ifndef PNG_NO_READ_SUPPORTED
-#  define PNG_READ_SUPPORTED
-#endif
-
-/* Enable if you want a read-only libpng */
-
-#ifndef PNG_NO_WRITE_SUPPORTED
-#  define PNG_WRITE_SUPPORTED
-#endif
-
-/* Enabled by default in 1.2.0.  You can disable this if you don't need to
-   support PNGs that are embedded in MNG datastreams */
-#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
-#  ifndef PNG_MNG_FEATURES_SUPPORTED
-#    define PNG_MNG_FEATURES_SUPPORTED
-#  endif
-#endif
-
-#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
-#  ifndef PNG_FLOATING_POINT_SUPPORTED
-#    define PNG_FLOATING_POINT_SUPPORTED
-#  endif
-#endif
-
-/* If you are running on a machine where you cannot allocate more
- * than 64K of memory at once, uncomment this.  While libpng will not
- * normally need that much memory in a chunk (unless you load up a very
- * large file), zlib needs to know how big of a chunk it can use, and
- * libpng thus makes sure to check any memory allocation to verify it
- * will fit into memory.
-#define PNG_MAX_MALLOC_64K
- */
-#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
-#  define PNG_MAX_MALLOC_64K
-#endif
-
-/* Special munging to support doing things the 'cygwin' way:
- * 'Normal' png-on-win32 defines/defaults:
- *   PNG_BUILD_DLL -- building dll
- *   PNG_USE_DLL   -- building an application, linking to dll
- *   (no define)   -- building static library, or building an
- *                    application and linking to the static lib
- * 'Cygwin' defines/defaults:
- *   PNG_BUILD_DLL -- (ignored) building the dll
- *   (no define)   -- (ignored) building an application, linking to the dll
- *   PNG_STATIC    -- (ignored) building the static lib, or building an 
- *                    application that links to the static lib.
- *   ALL_STATIC    -- (ignored) building various static libs, or building an 
- *                    application that links to the static libs.
- * Thus,
- * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
- * this bit of #ifdefs will define the 'correct' config variables based on
- * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
- * unnecessary.
- *
- * Also, the precedence order is:
- *   ALL_STATIC (since we can't #undef something outside our namespace)
- *   PNG_BUILD_DLL
- *   PNG_STATIC
- *   (nothing) == PNG_USE_DLL
- * 
- * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
- *   of auto-import in binutils, we no longer need to worry about 
- *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,
- *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
- *   to __declspec() stuff.  However, we DO need to worry about 
- *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults
- *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
- */
-#define PNG_STATIC
-
-#if defined(__CYGWIN__)
-#  if defined(ALL_STATIC)
-#    if defined(PNG_BUILD_DLL)
-#      undef PNG_BUILD_DLL
-#    endif
-#    if defined(PNG_USE_DLL)
-#      undef PNG_USE_DLL
-#    endif
-#    if defined(PNG_DLL)
-#      undef PNG_DLL
-#    endif
-#    if !defined(PNG_STATIC)
-#      define PNG_STATIC
-#    endif
-#  else
-#    if defined (PNG_BUILD_DLL)
-#      if defined(PNG_STATIC)
-#        undef PNG_STATIC
-#      endif
-#      if defined(PNG_USE_DLL)
-#        undef PNG_USE_DLL
-#      endif
-#      if !defined(PNG_DLL)
-#        define PNG_DLL
-#      endif
-#    else
-#      if defined(PNG_STATIC)
-#        if defined(PNG_USE_DLL)
-#          undef PNG_USE_DLL
-#        endif
-#        if defined(PNG_DLL)
-#          undef PNG_DLL
-#        endif
-#      else
-#        if !defined(PNG_USE_DLL)
-#          define PNG_USE_DLL
-#        endif
-#        if !defined(PNG_DLL)
-#          define PNG_DLL
-#        endif
-#      endif  
-#    endif  
-#  endif
-#endif
-
-/* This protects us against compilers that run on a windowing system
- * and thus don't have or would rather us not use the stdio types:
- * stdin, stdout, and stderr.  The only one currently used is stderr
- * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will
- * prevent these from being compiled and used. #defining PNG_NO_STDIO
- * will also prevent these, plus will prevent the entire set of stdio
- * macros and functions (FILE *, printf, etc.) from being compiled and used,
- * unless (PNG_DEBUG > 0) has been #defined.
- *
- * #define PNG_NO_CONSOLE_IO
- * #define PNG_NO_STDIO
- */
-
-#if defined(_WIN32_WCE)
-#  include <windows.h>
-   /* Console I/O functions are not supported on WindowsCE */
-#  define PNG_NO_CONSOLE_IO
-#  ifdef PNG_DEBUG
-#    undef PNG_DEBUG
-#  endif
-#endif
-
-#ifdef PNG_BUILD_DLL
-#  ifndef PNG_CONSOLE_IO_SUPPORTED
-#    ifndef PNG_NO_CONSOLE_IO
-#      define PNG_NO_CONSOLE_IO
-#    endif
-#  endif
-#endif
-
-#  ifdef PNG_NO_STDIO
-#    ifndef PNG_NO_CONSOLE_IO
-#      define PNG_NO_CONSOLE_IO
-#    endif
-#    ifdef PNG_DEBUG
-#      if (PNG_DEBUG > 0)
-#        include <stdio.h>
-#      endif
-#    endif
-#  else
-#    if !defined(_WIN32_WCE)
-/* "stdio.h" functions are not supported on WindowsCE */
-#      include <stdio.h>
-#    endif
-#  endif
-
-/* This macro protects us against machines that don't have function
- * prototypes (ie K&R style headers).  If your compiler does not handle
- * function prototypes, define this macro and use the included ansi2knr.
- * I've always been able to use _NO_PROTO as the indicator, but you may
- * need to drag the empty declaration out in front of here, or change the
- * ifdef to suit your own needs.
- */
-#ifndef PNGARG
-
-#ifdef OF /* zlib prototype munger */
-#  define PNGARG(arglist) OF(arglist)
-#else
-
-#ifdef _NO_PROTO
-#  define PNGARG(arglist) ()
-#  ifndef PNG_TYPECAST_NULL
-#     define PNG_TYPECAST_NULL
-#  endif
-#else
-#  define PNGARG(arglist) arglist
-#endif /* _NO_PROTO */
-
-#endif /* OF */
-
-#endif /* PNGARG */
-
-/* Try to determine if we are compiling on a Mac.  Note that testing for
- * just __MWERKS__ is not good enough, because the Codewarrior is now used
- * on non-Mac platforms.
- */
-#ifndef MACOS
-#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
-      defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
-#    define MACOS
-#  endif
-#endif
-
-/* enough people need this for various reasons to include it here */
-#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
-#  include <sys/types.h>
-#endif
-
-#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
-#  define PNG_SETJMP_SUPPORTED
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* This is an attempt to force a single setjmp behaviour on Linux.  If
- * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
- */
-
-#  ifdef __linux__
-#    ifdef _BSD_SOURCE
-#      define PNG_SAVE_BSD_SOURCE
-#      undef _BSD_SOURCE
-#    endif
-#    ifdef _SETJMP_H
-     /* If you encounter a compiler error here, see the explanation
-      * near the end of INSTALL.
-      */
-         __png.h__ already includes setjmp.h;
-         __dont__ include it again.;
-#    endif
-#  endif /* __linux__ */
-
-   /* include setjmp.h for error handling */
-#  include <setjmp.h>
-
-#  ifdef __linux__
-#    ifdef PNG_SAVE_BSD_SOURCE
-#      define _BSD_SOURCE
-#      undef PNG_SAVE_BSD_SOURCE
-#    endif
-#  endif /* __linux__ */
-#endif /* PNG_SETJMP_SUPPORTED */
-
-#ifdef BSD
-#  include <strings.h>
-#else
-#  include <string.h>
-#endif
-
-/* Other defines for things like memory and the like can go here.  */
-#ifdef PNG_INTERNAL
-
-#include <stdlib.h>
-
-/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
- * aren't usually used outside the library (as far as I know), so it is
- * debatable if they should be exported at all.  In the future, when it is
- * possible to have run-time registry of chunk-handling functions, some of
- * these will be made available again.
-#define PNG_EXTERN extern
- */
-#define PNG_EXTERN
-
-/* Other defines specific to compilers can go here.  Try to keep
- * them inside an appropriate ifdef/endif pair for portability.
- */
-
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-#  if defined(MACOS)
-     /* We need to check that <math.h> hasn't already been included earlier
-      * as it seems it doesn't agree with <fp.h>, yet we should really use
-      * <fp.h> if possible.
-      */
-#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-#      include <fp.h>
-#    endif
-#  else
-#    include <math.h>
-#  endif
-#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
-     /* Amiga SAS/C: We must include builtin FPU functions when compiling using
-      * MATH=68881
-      */
-#    include <m68881.h>
-#  endif
-#endif
-
-/* Codewarrior on NT has linking problems without this. */
-#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
-#  define PNG_ALWAYS_EXTERN
-#endif
-
-/* This provides the non-ANSI (far) memory allocation routines. */
-#if defined(__TURBOC__) && defined(__MSDOS__)
-#  include <mem.h>
-#  include <alloc.h>
-#endif
-
-/* I have no idea why is this necessary... */
-#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
-    defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
-#  include <malloc.h>
-#endif
-
-/* This controls how fine the dithering gets.  As this allocates
- * a largish chunk of memory (32K), those who are not as concerned
- * with dithering quality can decrease some or all of these.
- */
-#ifndef PNG_DITHER_RED_BITS
-#  define PNG_DITHER_RED_BITS 5
-#endif
-#ifndef PNG_DITHER_GREEN_BITS
-#  define PNG_DITHER_GREEN_BITS 5
-#endif
-#ifndef PNG_DITHER_BLUE_BITS
-#  define PNG_DITHER_BLUE_BITS 5
-#endif
-
-/* This controls how fine the gamma correction becomes when you
- * are only interested in 8 bits anyway.  Increasing this value
- * results in more memory being used, and more pow() functions
- * being called to fill in the gamma tables.  Don't set this value
- * less then 8, and even that may not work (I haven't tested it).
- */
-
-#ifndef PNG_MAX_GAMMA_8
-#  define PNG_MAX_GAMMA_8 11
-#endif
-
-/* This controls how much a difference in gamma we can tolerate before
- * we actually start doing gamma conversion.
- */
-#ifndef PNG_GAMMA_THRESHOLD
-#  define PNG_GAMMA_THRESHOLD 0.05
-#endif
-
-#endif /* PNG_INTERNAL */
-
-/* The following uses const char * instead of char * for error
- * and warning message functions, so some compilers won't complain.
- * If you do not want to use const, define PNG_NO_CONST here.
- */
-
-#ifndef PNG_NO_CONST
-#  define PNG_CONST const
-#else
-#  define PNG_CONST
-#endif
-
-/* The following defines give you the ability to remove code from the
- * library that you will not be using.  I wish I could figure out how to
- * automate this, but I can't do that without making it seriously hard
- * on the users.  So if you are not using an ability, change the #define
- * to and #undef, and that part of the library will not be compiled.  If
- * your linker can't find a function, you may want to make sure the
- * ability is defined here.  Some of these depend upon some others being
- * defined.  I haven't figured out all the interactions here, so you may
- * have to experiment awhile to get everything to compile.  If you are
- * creating or using a shared library, you probably shouldn't touch this,
- * as it will affect the size of the structures, and this will cause bad
- * things to happen if the library and/or application ever change.
- */
-
-/* Any features you will not be using can be undef'ed here */
-
-/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
- * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
- * on the compile line, then pick and choose which ones to define without
- * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
- * if you only want to have a png-compliant reader/writer but don't need
- * any of the extra transformations.  This saves about 80 kbytes in a
- * typical installation of the library. (PNG_NO_* form added in version
- * 1.0.1c, for consistency)
- */
-
-/* The size of the png_text structure changed in libpng-1.0.6 when
- * iTXt is supported.  It is turned off by default, to support old apps
- * that malloc the png_text structure instead of calling png_set_text()
- * and letting libpng malloc it.  It will be turned on by default in
- * libpng-1.3.0.
- */
-
-#ifndef PNG_iTXt_SUPPORTED
-#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
-#    define PNG_NO_READ_iTXt
-#  endif
-#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
-#    define PNG_NO_WRITE_iTXt
-#  endif
-#endif
-
-/* The following support, added after version 1.0.0, can be turned off here en
- * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
- * with old applications that require the length of png_struct and png_info
- * to remain unchanged.
- */
-
-#ifdef PNG_LEGACY_SUPPORTED
-#  define PNG_NO_FREE_ME
-#  define PNG_NO_READ_UNKNOWN_CHUNKS
-#  define PNG_NO_WRITE_UNKNOWN_CHUNKS
-#  define PNG_NO_READ_USER_CHUNKS
-#  define PNG_NO_READ_iCCP
-#  define PNG_NO_WRITE_iCCP
-#  define PNG_NO_READ_iTXt
-#  define PNG_NO_WRITE_iTXt
-#  define PNG_NO_READ_sCAL
-#  define PNG_NO_WRITE_sCAL
-#  define PNG_NO_READ_sPLT
-#  define PNG_NO_WRITE_sPLT
-#  define PNG_NO_INFO_IMAGE
-#  define PNG_NO_READ_RGB_TO_GRAY
-#  define PNG_NO_READ_USER_TRANSFORM
-#  define PNG_NO_WRITE_USER_TRANSFORM
-#  define PNG_NO_USER_MEM
-#  define PNG_NO_READ_EMPTY_PLTE
-#  define PNG_NO_MNG_FEATURES
-#  define PNG_NO_FIXED_POINT_SUPPORTED
-#endif
-
-/* Ignore attempt to turn off both floating and fixed point support */
-#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
-    !defined(PNG_NO_FIXED_POINT_SUPPORTED)
-#  define PNG_FIXED_POINT_SUPPORTED
-#endif
-
-#ifndef PNG_NO_FREE_ME
-#  define PNG_FREE_ME_SUPPORTED
-#endif
-
-#if defined(PNG_READ_SUPPORTED)
-
-#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
-      !defined(PNG_NO_READ_TRANSFORMS)
-#  define PNG_READ_TRANSFORMS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_TRANSFORMS_SUPPORTED
-#  ifndef PNG_NO_READ_EXPAND
-#    define PNG_READ_EXPAND_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SHIFT
-#    define PNG_READ_SHIFT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_PACK
-#    define PNG_READ_PACK_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_BGR
-#    define PNG_READ_BGR_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SWAP
-#    define PNG_READ_SWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_PACKSWAP
-#    define PNG_READ_PACKSWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_INVERT
-#    define PNG_READ_INVERT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_DITHER
-#    define PNG_READ_DITHER_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_BACKGROUND
-#    define PNG_READ_BACKGROUND_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_16_TO_8
-#    define PNG_READ_16_TO_8_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_FILLER
-#    define PNG_READ_FILLER_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_GAMMA
-#    define PNG_READ_GAMMA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_GRAY_TO_RGB
-#    define PNG_READ_GRAY_TO_RGB_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SWAP_ALPHA
-#    define PNG_READ_SWAP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_INVERT_ALPHA
-#    define PNG_READ_INVERT_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_STRIP_ALPHA
-#    define PNG_READ_STRIP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_USER_TRANSFORM
-#    define PNG_READ_USER_TRANSFORM_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_RGB_TO_GRAY
-#    define PNG_READ_RGB_TO_GRAY_SUPPORTED
-#  endif
-#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
-
-#if !defined(PNG_NO_PROGRESSIVE_READ) && \
- !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)  /* if you don't do progressive */
-#  define PNG_PROGRESSIVE_READ_SUPPORTED     /* reading.  This is not talking */
-#endif                               /* about interlacing capability!  You'll */
-              /* still have interlacing unless you change the following line: */
-
-#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
-
-#ifndef PNG_NO_READ_COMPOSITE_NODIV
-#  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */
-#    define PNG_READ_COMPOSITE_NODIV_SUPPORTED   /* well tested on Intel, SGI */
-#  endif
-#endif
-
-/* Deprecated, will be removed from version 2.0.0.
-   Use PNG_MNG_FEATURES_SUPPORTED instead. */
-#ifndef PNG_NO_READ_EMPTY_PLTE
-#  define PNG_READ_EMPTY_PLTE_SUPPORTED
-#endif
-
-#endif /* PNG_READ_SUPPORTED */
-
-#if defined(PNG_WRITE_SUPPORTED)
-
-# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_WRITE_TRANSFORMS)
-#  define PNG_WRITE_TRANSFORMS_SUPPORTED
-#endif
-
-#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
-#  ifndef PNG_NO_WRITE_SHIFT
-#    define PNG_WRITE_SHIFT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_PACK
-#    define PNG_WRITE_PACK_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_BGR
-#    define PNG_WRITE_BGR_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_SWAP
-#    define PNG_WRITE_SWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_PACKSWAP
-#    define PNG_WRITE_PACKSWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_INVERT
-#    define PNG_WRITE_INVERT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_FILLER
-#    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */
-#  endif
-#  ifndef PNG_NO_WRITE_SWAP_ALPHA
-#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_INVERT_ALPHA
-#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_USER_TRANSFORM
-#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED
-#  endif
-#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-#  ifndef PNG_NO_USER_TRANSFORM_PTR
-#    define PNG_USER_TRANSFORM_PTR_SUPPORTED
-#  endif
-#endif
-
-#define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant
-                                            encoders, but can cause trouble
-                                            if left undefined */
-
-#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
-     defined(PNG_FLOATING_POINT_SUPPORTED)
-#  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
-#endif
-
-#ifndef PNG_1_0_X
-#ifndef PNG_NO_ERROR_NUMBERS
-#define PNG_ERROR_NUMBERS_SUPPORTED
-#endif
-#endif /* PNG_1_0_X */
-
-#ifndef PNG_NO_WRITE_FLUSH
-#  define PNG_WRITE_FLUSH_SUPPORTED
-#endif
-
-/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
-#ifndef PNG_NO_WRITE_EMPTY_PLTE
-#  define PNG_WRITE_EMPTY_PLTE_SUPPORTED
-#endif
-
-#endif /* PNG_WRITE_SUPPORTED */
-
-#ifndef PNG_NO_STDIO
-#  define PNG_TIME_RFC1123_SUPPORTED
-#endif
-
-/* This adds extra functions in pngget.c for accessing data from the
- * info pointer (added in version 0.99)
- * png_get_image_width()
- * png_get_image_height()
- * png_get_bit_depth()
- * png_get_color_type()
- * png_get_compression_type()
- * png_get_filter_type()
- * png_get_interlace_type()
- * png_get_pixel_aspect_ratio()
- * png_get_pixels_per_meter()
- * png_get_x_offset_pixels()
- * png_get_y_offset_pixels()
- * png_get_x_offset_microns()
- * png_get_y_offset_microns()
- */
-#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
-#  define PNG_EASY_ACCESS_SUPPORTED
-#endif
-
-/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 
-   even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
-#  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
-#    define PNG_ASSEMBLER_CODE_SUPPORTED
-#  endif
-#  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#    define PNG_MMX_CODE_SUPPORTED
-#  endif
-#endif
-
-/* If you are sure that you don't need thread safety and you are compiling
-   with PNG_USE_PNGCCRD for an MMX application, you can define this for
-   faster execution.  See pnggccrd.c.
-#define PNG_THREAD_UNSAFE_OK
-*/
-
-#if !defined(PNG_1_0_X)
-#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
-#  define PNG_USER_MEM_SUPPORTED
-#endif
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.2.6 */
-#if !defined(PNG_1_0_X)
-#ifndef PNG_SET_USER_LIMITS_SUPPORTED
-#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
-#  define PNG_SET_USER_LIMITS_SUPPORTED
-#endif
-#endif
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter
- * how large, set these limits to 0x7fffffffL
- */
-#ifndef PNG_USER_WIDTH_MAX
-#  define PNG_USER_WIDTH_MAX 1000000L
-#endif
-#ifndef PNG_USER_HEIGHT_MAX
-#  define PNG_USER_HEIGHT_MAX 1000000L
-#endif
-
-/* These are currently experimental features, define them if you want */
-
-/* very little testing */
-/*
-#ifdef PNG_READ_SUPPORTED
-#  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-#    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-#  endif
-#endif
-*/
-
-/* This is only for PowerPC big-endian and 680x0 systems */
-/* some testing */
-/*
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
-#  define PNG_READ_BIG_ENDIAN_SUPPORTED
-#endif
-*/
-
-/* Buggy compilers (e.g., gcc 2.7.2.2) need this */
-/*
-#define PNG_NO_POINTER_INDEXING
-*/
-
-/* These functions are turned off by default, as they will be phased out. */
-/*
-#define  PNG_USELESS_TESTS_SUPPORTED
-#define  PNG_CORRECT_PALETTE_SUPPORTED
-*/
-
-/* Any chunks you are not interested in, you can undef here.  The
- * ones that allocate memory may be expecially important (hIST,
- * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
- * a bit smaller.
- */
-
-#if defined(PNG_READ_SUPPORTED) && \
-    !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
-#  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-#if defined(PNG_WRITE_SUPPORTED) && \
-    !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
-#  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-
-#ifdef PNG_NO_READ_TEXT
-#  define PNG_NO_READ_iTXt
-#  define PNG_NO_READ_tEXt
-#  define PNG_NO_READ_zTXt
-#endif
-#ifndef PNG_NO_READ_bKGD
-#  define PNG_READ_bKGD_SUPPORTED
-#  define PNG_bKGD_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_cHRM
-#  define PNG_READ_cHRM_SUPPORTED
-#  define PNG_cHRM_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_gAMA
-#  define PNG_READ_gAMA_SUPPORTED
-#  define PNG_gAMA_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_hIST
-#  define PNG_READ_hIST_SUPPORTED
-#  define PNG_hIST_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iCCP
-#  define PNG_READ_iCCP_SUPPORTED
-#  define PNG_iCCP_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iTXt
-#  ifndef PNG_READ_iTXt_SUPPORTED
-#    define PNG_READ_iTXt_SUPPORTED
-#  endif
-#  ifndef PNG_iTXt_SUPPORTED
-#    define PNG_iTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_READ_oFFs
-#  define PNG_READ_oFFs_SUPPORTED
-#  define PNG_oFFs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pCAL
-#  define PNG_READ_pCAL_SUPPORTED
-#  define PNG_pCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sCAL
-#  define PNG_READ_sCAL_SUPPORTED
-#  define PNG_sCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pHYs
-#  define PNG_READ_pHYs_SUPPORTED
-#  define PNG_pHYs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sBIT
-#  define PNG_READ_sBIT_SUPPORTED
-#  define PNG_sBIT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sPLT
-#  define PNG_READ_sPLT_SUPPORTED
-#  define PNG_sPLT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sRGB
-#  define PNG_READ_sRGB_SUPPORTED
-#  define PNG_sRGB_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tEXt
-#  define PNG_READ_tEXt_SUPPORTED
-#  define PNG_tEXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tIME
-#  define PNG_READ_tIME_SUPPORTED
-#  define PNG_tIME_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tRNS
-#  define PNG_READ_tRNS_SUPPORTED
-#  define PNG_tRNS_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_zTXt
-#  define PNG_READ_zTXt_SUPPORTED
-#  define PNG_zTXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
-#  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
-#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
-#  endif
-#  ifndef PNG_NO_HANDLE_AS_UNKNOWN
-#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#  endif
-#endif
-#if !defined(PNG_NO_READ_USER_CHUNKS) && \
-     defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-#  define PNG_READ_USER_CHUNKS_SUPPORTED
-#  define PNG_USER_CHUNKS_SUPPORTED
-#  ifdef PNG_NO_READ_UNKNOWN_CHUNKS
-#    undef PNG_NO_READ_UNKNOWN_CHUNKS
-#  endif
-#  ifdef PNG_NO_HANDLE_AS_UNKNOWN
-#    undef PNG_NO_HANDLE_AS_UNKNOWN
-#  endif
-#endif
-#ifndef PNG_NO_READ_OPT_PLTE
-#  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
-#endif                      /* optional PLTE chunk in RGB and RGBA images */
-#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
-    defined(PNG_READ_zTXt_SUPPORTED)
-#  define PNG_READ_TEXT_SUPPORTED
-#  define PNG_TEXT_SUPPORTED
-#endif
-
-#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
-
-#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
-
-#ifdef PNG_NO_WRITE_TEXT
-#  define PNG_NO_WRITE_iTXt
-#  define PNG_NO_WRITE_tEXt
-#  define PNG_NO_WRITE_zTXt
-#endif
-#ifndef PNG_NO_WRITE_bKGD
-#  define PNG_WRITE_bKGD_SUPPORTED
-#  ifndef PNG_bKGD_SUPPORTED
-#    define PNG_bKGD_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_cHRM
-#  define PNG_WRITE_cHRM_SUPPORTED
-#  ifndef PNG_cHRM_SUPPORTED
-#    define PNG_cHRM_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_gAMA
-#  define PNG_WRITE_gAMA_SUPPORTED
-#  ifndef PNG_gAMA_SUPPORTED
-#    define PNG_gAMA_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_hIST
-#  define PNG_WRITE_hIST_SUPPORTED
-#  ifndef PNG_hIST_SUPPORTED
-#    define PNG_hIST_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_iCCP
-#  define PNG_WRITE_iCCP_SUPPORTED
-#  ifndef PNG_iCCP_SUPPORTED
-#    define PNG_iCCP_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_iTXt
-#  ifndef PNG_WRITE_iTXt_SUPPORTED
-#    define PNG_WRITE_iTXt_SUPPORTED
-#  endif
-#  ifndef PNG_iTXt_SUPPORTED
-#    define PNG_iTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_oFFs
-#  define PNG_WRITE_oFFs_SUPPORTED
-#  ifndef PNG_oFFs_SUPPORTED
-#    define PNG_oFFs_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_pCAL
-#  define PNG_WRITE_pCAL_SUPPORTED
-#  ifndef PNG_pCAL_SUPPORTED
-#    define PNG_pCAL_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sCAL
-#  define PNG_WRITE_sCAL_SUPPORTED
-#  ifndef PNG_sCAL_SUPPORTED
-#    define PNG_sCAL_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_pHYs
-#  define PNG_WRITE_pHYs_SUPPORTED
-#  ifndef PNG_pHYs_SUPPORTED
-#    define PNG_pHYs_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sBIT
-#  define PNG_WRITE_sBIT_SUPPORTED
-#  ifndef PNG_sBIT_SUPPORTED
-#    define PNG_sBIT_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sPLT
-#  define PNG_WRITE_sPLT_SUPPORTED
-#  ifndef PNG_sPLT_SUPPORTED
-#    define PNG_sPLT_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sRGB
-#  define PNG_WRITE_sRGB_SUPPORTED
-#  ifndef PNG_sRGB_SUPPORTED
-#    define PNG_sRGB_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tEXt
-#  define PNG_WRITE_tEXt_SUPPORTED
-#  ifndef PNG_tEXt_SUPPORTED
-#    define PNG_tEXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tIME
-#  define PNG_WRITE_tIME_SUPPORTED
-#  ifndef PNG_tIME_SUPPORTED
-#    define PNG_tIME_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tRNS
-#  define PNG_WRITE_tRNS_SUPPORTED
-#  ifndef PNG_tRNS_SUPPORTED
-#    define PNG_tRNS_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_zTXt
-#  define PNG_WRITE_zTXt_SUPPORTED
-#  ifndef PNG_zTXt_SUPPORTED
-#    define PNG_zTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
-#  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
-#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
-#  endif
-#  ifndef PNG_NO_HANDLE_AS_UNKNOWN
-#     ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#       define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#     endif
-#  endif
-#endif
-#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
-    defined(PNG_WRITE_zTXt_SUPPORTED)
-#  define PNG_WRITE_TEXT_SUPPORTED
-#  ifndef PNG_TEXT_SUPPORTED
-#    define PNG_TEXT_SUPPORTED
-#  endif
-#endif
-
-#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
-
-/* Turn this off to disable png_read_png() and
- * png_write_png() and leave the row_pointers member
- * out of the info structure.
- */
-#ifndef PNG_NO_INFO_IMAGE
-#  define PNG_INFO_IMAGE_SUPPORTED
-#endif
-
-/* need the time information for reading tIME chunks */
-#if defined(PNG_tIME_SUPPORTED)
-#  if !defined(_WIN32_WCE)
-     /* "time.h" functions are not supported on WindowsCE */
-#    include <time.h>
-#  endif
-#endif
-
-/* Some typedefs to get us started.  These should be safe on most of the
- * common platforms.  The typedefs should be at least as large as the
- * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
- * don't have to be exactly that size.  Some compilers dislike passing
- * unsigned shorts as function parameters, so you may be better off using
- * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may
- * want to have unsigned int for png_uint_32 instead of unsigned long.
- */
-
-typedef unsigned long png_uint_32;
-typedef long png_int_32;
-typedef unsigned short png_uint_16;
-typedef short png_int_16;
-typedef unsigned char png_byte;
-
-/* This is usually size_t.  It is typedef'ed just in case you need it to
-   change (I'm not sure if you will or not, so I thought I'd be safe) */
-#ifdef PNG_SIZE_T
-   typedef PNG_SIZE_T png_size_t;
-#  define png_sizeof(x) png_convert_size(sizeof (x))
-#else
-   typedef size_t png_size_t;
-#  define png_sizeof(x) sizeof (x)
-#endif
-
-/* The following is needed for medium model support.  It cannot be in the
- * PNG_INTERNAL section.  Needs modification for other compilers besides
- * MSC.  Model independent support declares all arrays and pointers to be
- * large using the far keyword.  The zlib version used must also support
- * model independent data.  As of version zlib 1.0.4, the necessary changes
- * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
- * changes that are needed. (Tim Wegner)
- */
-
-/* Separate compiler dependencies (problem here is that zlib.h always
-   defines FAR. (SJT) */
-#ifdef __BORLANDC__
-#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
-#    define LDATA 1
-#  else
-#    define LDATA 0
-#  endif
-   /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
-#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
-#    define PNG_MAX_MALLOC_64K
-#    if (LDATA != 1)
-#      ifndef FAR
-#        define FAR __far
-#      endif
-#      define USE_FAR_KEYWORD
-#    endif   /* LDATA != 1 */
-     /* Possibly useful for moving data out of default segment.
-      * Uncomment it if you want. Could also define FARDATA as
-      * const if your compiler supports it. (SJT)
-#    define FARDATA FAR
-      */
-#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
-#endif   /* __BORLANDC__ */
-
-
-/* Suggest testing for specific compiler first before testing for
- * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
- * making reliance oncertain keywords suspect. (SJT)
- */
-
-/* MSC Medium model */
-#if defined(FAR)
-#  if defined(M_I86MM)
-#    define USE_FAR_KEYWORD
-#    define FARDATA FAR
-#    include <dos.h>
-#  endif
-#endif
-
-/* SJT: default case */
-#ifndef FAR
-#  define FAR
-#endif
-
-/* At this point FAR is always defined */
-#ifndef FARDATA
-#  define FARDATA
-#endif
-
-/* Typedef for floating-point numbers that are converted
-   to fixed-point with a multiple of 100,000, e.g., int_gamma */
-typedef png_int_32 png_fixed_point;
-
-/* Add typedefs for pointers */
-typedef void            FAR * png_voidp;
-typedef png_byte        FAR * png_bytep;
-typedef png_uint_32     FAR * png_uint_32p;
-typedef png_int_32      FAR * png_int_32p;
-typedef png_uint_16     FAR * png_uint_16p;
-typedef png_int_16      FAR * png_int_16p;
-typedef PNG_CONST char  FAR * png_const_charp;
-typedef char            FAR * png_charp;
-typedef png_fixed_point FAR * png_fixed_point_p;
-
-#ifndef PNG_NO_STDIO
-#if defined(_WIN32_WCE)
-typedef HANDLE                png_FILE_p;
-#else
-typedef FILE                * png_FILE_p;
-#endif
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double          FAR * png_doublep;
-#endif
-
-/* Pointers to pointers; i.e. arrays */
-typedef png_byte        FAR * FAR * png_bytepp;
-typedef png_uint_32     FAR * FAR * png_uint_32pp;
-typedef png_int_32      FAR * FAR * png_int_32pp;
-typedef png_uint_16     FAR * FAR * png_uint_16pp;
-typedef png_int_16      FAR * FAR * png_int_16pp;
-typedef PNG_CONST char  FAR * FAR * png_const_charpp;
-typedef char            FAR * FAR * png_charpp;
-typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double          FAR * FAR * png_doublepp;
-#endif
-
-/* Pointers to pointers to pointers; i.e., pointer to array */
-typedef char            FAR * FAR * FAR * png_charppp;
-
-/* libpng typedefs for types in zlib. If zlib changes
- * or another compression library is used, then change these.
- * Eliminates need to change all the source files.
- */
-typedef charf *         png_zcharp;
-typedef charf * FAR *   png_zcharpp;
-typedef z_stream FAR *  png_zstreamp;
-
-/*
- * Define PNG_BUILD_DLL if the module being built is a Windows
- * LIBPNG DLL.
- *
- * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
- * It is equivalent to Microsoft predefined macro _DLL that is
- * automatically defined when you compile using the share
- * version of the CRT (C Run-Time library)
- *
- * The cygwin mods make this behavior a little different:
- * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
- * Define PNG_STATIC if you are building a static library for use with cygwin,
- *   -or- if you are building an application that you want to link to the
- *   static library.
- * PNG_USE_DLL is defined by default (no user action needed) unless one of
- *   the other flags is defined.
- */
-
-#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
-#  define PNG_DLL
-#endif
-/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
- * When building a static lib, default to no GLOBAL ARRAYS, but allow
- * command-line override
- */
-#if defined(__CYGWIN__)
-#  if !defined(PNG_STATIC)
-#    if defined(PNG_USE_GLOBAL_ARRAYS)
-#      undef PNG_USE_GLOBAL_ARRAYS
-#    endif
-#    if !defined(PNG_USE_LOCAL_ARRAYS)
-#      define PNG_USE_LOCAL_ARRAYS
-#    endif
-#  else
-#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
-#      if defined(PNG_USE_GLOBAL_ARRAYS)
-#        undef PNG_USE_GLOBAL_ARRAYS
-#      endif
-#    endif
-#  endif
-#  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-#    define PNG_USE_LOCAL_ARRAYS
-#  endif
-#endif
-
-/* Do not use global arrays (helps with building DLL's)
- * They are no longer used in libpng itself, since version 1.0.5c,
- * but might be required for some pre-1.0.5c applications.
- */
-#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-#  if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
-#    define PNG_USE_LOCAL_ARRAYS
-#  else
-#    define PNG_USE_GLOBAL_ARRAYS
-#  endif
-#endif
-
-#if defined(__CYGWIN__)
-#  undef PNGAPI
-#  define PNGAPI __cdecl
-#  undef PNG_IMPEXP
-#  define PNG_IMPEXP
-#endif  
-
-/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
- * you may get warnings regarding the linkage of png_zalloc and png_zfree.
- * Don't ignore those warnings; you must also reset the default calling
- * convention in your compiler to match your PNGAPI, and you must build
- * zlib and your applications the same way you build libpng.
- */
-
-#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
-#  ifndef PNG_NO_MODULEDEF
-#    define PNG_NO_MODULEDEF
-#  endif
-#endif
-
-#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
-#  define PNG_IMPEXP
-#endif
-
-#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
-    (( defined(_Windows) || defined(_WINDOWS) || \
-       defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
-
-#  ifndef PNGAPI
-#     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
-#        define PNGAPI __cdecl
-#     else
-#        define PNGAPI _cdecl
-#     endif
-#  endif
-
-#  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
-       0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
-#     define PNG_IMPEXP
-#  endif
-
-#  if !defined(PNG_IMPEXP)
-
-#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol
-#     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol
-
-      /* Borland/Microsoft */
-#     if defined(_MSC_VER) || defined(__BORLANDC__)
-#        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
-#           define PNG_EXPORT PNG_EXPORT_TYPE1
-#        else
-#           define PNG_EXPORT PNG_EXPORT_TYPE2
-#           if defined(PNG_BUILD_DLL)
-#              define PNG_IMPEXP __export
-#           else
-#              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
-                                                 VC++ */
-#           endif                             /* Exists in Borland C++ for
-                                                 C++ classes (== huge) */
-#        endif
-#     endif
-
-#     if !defined(PNG_IMPEXP)
-#        if defined(PNG_BUILD_DLL)
-#           define PNG_IMPEXP __declspec(dllexport)
-#        else
-#           define PNG_IMPEXP __declspec(dllimport)
-#        endif
-#     endif
-#  endif  /* PNG_IMPEXP */
-#else /* !(DLL || non-cygwin WINDOWS) */
-#   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
-#      ifndef PNGAPI
-#         define PNGAPI _System
-#      endif
-#   else
-#      if 0 /* ... other platforms, with other meanings */
-#      endif
-#   endif
-#endif
-
-#ifndef PNGAPI
-#  define PNGAPI
-#endif
-#ifndef PNG_IMPEXP
-#  define PNG_IMPEXP
-#endif
-
-#ifndef PNG_EXPORT
-#  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
-#endif
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-#  ifndef PNG_EXPORT_VAR
-#    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
-#  endif
-#endif
-
-/* User may want to use these so they are not in PNG_INTERNAL. Any library
- * functions that are passed far data must be model independent.
- */
-
-#ifndef PNG_ABORT
-#  define PNG_ABORT() abort()
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#else
-#  define png_jmpbuf(png_ptr) \
-   (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
-#endif
-
-#if defined(USE_FAR_KEYWORD)  /* memory model independent fns */
-/* use this to make far-to-near assignments */
-#  define CHECK   1
-#  define NOCHECK 0
-#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
-#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
-#  define png_strcpy  _fstrcpy
-#  define png_strncpy _fstrncpy   /* Added to v 1.2.6 */
-#  define png_strlen  _fstrlen
-#  define png_memcmp  _fmemcmp    /* SJT: added */
-#  define png_memcpy  _fmemcpy
-#  define png_memset  _fmemset
-#else /* use the usual functions */
-#  define CVT_PTR(ptr)         (ptr)
-#  define CVT_PTR_NOCHECK(ptr) (ptr)
-#  define png_strcpy  strcpy
-#  define png_strncpy strncpy     /* Added to v 1.2.6 */
-#  define png_strlen  strlen
-#  define png_memcmp  memcmp      /* SJT: added */
-#  define png_memcpy  memcpy
-#  define png_memset  memset
-#endif
-/* End of memory model independent support */
-
-/* Just a little check that someone hasn't tried to define something
- * contradictory.
- */
-#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
-#  undef PNG_ZBUF_SIZE
-#  define PNG_ZBUF_SIZE 65536L
-#endif
-
-#ifdef PNG_READ_SUPPORTED
-/* Prior to libpng-1.0.9, this block was in pngasmrd.h */
-#if defined(PNG_INTERNAL)
-
-/* These are the default thresholds before the MMX code kicks in; if either
- * rowbytes or bitdepth is below the threshold, plain C code is used.  These
- * can be overridden at runtime via the png_set_mmx_thresholds() call in
- * libpng 1.2.0 and later.  The values below were chosen by Intel.
- */
-
-#ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
-#  define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT  128  /*  >=  */
-#endif
-#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
-#  define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT  9    /*  >=  */   
-#endif
-
-/* Set this in the makefile for VC++ on Pentium, not here. */
-/* Platform must be Pentium.  Makefile must assemble and load pngvcrd.c .
- * MMX will be detected at run time and used if present.
- */
-#ifdef PNG_USE_PNGVCRD
-#  define PNG_HAVE_ASSEMBLER_COMBINE_ROW
-#  define PNG_HAVE_ASSEMBLER_READ_INTERLACE
-#  define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
-#endif
-
-/* Set this in the makefile for gcc/as on Pentium, not here. */
-/* Platform must be Pentium.  Makefile must assemble and load pnggccrd.c .
- * MMX will be detected at run time and used if present.
- */
-#ifdef PNG_USE_PNGGCCRD
-#  define PNG_HAVE_ASSEMBLER_COMBINE_ROW
-#  define PNG_HAVE_ASSEMBLER_READ_INTERLACE
-#  define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
-#endif
-/* - see pnggccrd.c for info about what is currently enabled */
-
-#endif /* PNG_INTERNAL */
-#endif /* PNG_READ_SUPPORTED */
-
-#endif /* PNGCONF_H */
-
diff --git a/tkimg1.3/libpng/pngerror.c b/tkimg1.3/libpng/pngerror.c
deleted file mode 100644
index 12e1b7a..0000000
--- a/tkimg1.3/libpng/pngerror.c
+++ /dev/null
@@ -1,295 +0,0 @@
-
-/* pngerror.c - stub functions for i/o and memory allocation
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file provides a location for all error handling.  Users who
- * need special error handling are expected to write replacement functions
- * and use png_set_error_fn() to use those functions.  See the instructions
- * at each function.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-static void /* PRIVATE */
-png_default_error PNGARG((png_structp png_ptr,
-  png_const_charp error_message));
-static void /* PRIVATE */
-png_default_warning PNGARG((png_structp png_ptr,
-  png_const_charp warning_message));
-
-/* This function is called whenever there is a fatal error.  This function
- * should not be changed.  If there is a need to handle errors differently,
- * you should supply a replacement error function and use png_set_error_fn()
- * to replace the error function at run-time.
- */
-void PNGAPI
-png_error(png_structp png_ptr, png_const_charp error_message)
-{
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-   char msg[16];
-   if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
-   {
-     if (*error_message == '#')
-     {
-         int offset;
-         for (offset=1; offset<15; offset++)
-            if (*(error_message+offset) == ' ')
-                break;
-         if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
-         {
-            int i;
-            for (i=0; i<offset-1; i++)
-               msg[i]=error_message[i+1];
-            msg[i]='\0';
-            error_message=msg;
-         }
-         else
-            error_message+=offset;
-     }
-     else
-     {
-         if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
-         {
-            msg[0]='0';        
-            msg[1]='\0';
-            error_message=msg;
-         }
-     }
-   }
-#endif
-   if (png_ptr != NULL && png_ptr->error_fn != NULL)
-      (*(png_ptr->error_fn))(png_ptr, error_message);
-
-   /* If the custom handler doesn't exist, or if it returns,
-      use the default handler, which will not return. */
-   png_default_error(png_ptr, error_message);
-}
-
-/* This function is called whenever there is a non-fatal error.  This function
- * should not be changed.  If there is a need to handle warnings differently,
- * you should supply a replacement warning function and use
- * png_set_error_fn() to replace the warning function at run-time.
- */
-void PNGAPI
-png_warning(png_structp png_ptr, png_const_charp warning_message)
-{
-   int offset = 0;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-   if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
-#endif
-   {
-     if (*warning_message == '#')
-     {
-         for (offset=1; offset<15; offset++)
-            if (*(warning_message+offset) == ' ')
-                break;
-     }
-   }
-   if (png_ptr != NULL && png_ptr->warning_fn != NULL)
-      (*(png_ptr->warning_fn))(png_ptr, warning_message+offset);
-   else
-      png_default_warning(png_ptr, warning_message+offset);
-}
-
-/* These utilities are used internally to build an error message that relates
- * to the current chunk.  The chunk name comes from png_ptr->chunk_name,
- * this is used to prefix the message.  The message is limited in length
- * to 63 bytes, the name characters are output as hex digits wrapped in []
- * if the character is invalid.
- */
-#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
-static PNG_CONST char png_digit[16] = {
-   '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
-   'A', 'B', 'C', 'D', 'E', 'F'
-};
-
-static void /* PRIVATE */
-png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
-   error_message)
-{
-   int iout = 0, iin = 0;
-
-   while (iin < 4)
-   {
-      int c = png_ptr->chunk_name[iin++];
-      if (isnonalpha(c))
-      {
-         buffer[iout++] = '[';
-         buffer[iout++] = png_digit[(c & 0xf0) >> 4];
-         buffer[iout++] = png_digit[c & 0x0f];
-         buffer[iout++] = ']';
-      }
-      else
-      {
-         buffer[iout++] = (png_byte)c;
-      }
-   }
-
-   if (error_message == NULL)
-      buffer[iout] = 0;
-   else
-   {
-      buffer[iout++] = ':';
-      buffer[iout++] = ' ';
-      png_strncpy(buffer+iout, error_message, 63);
-      buffer[iout+63] = 0;
-   }
-}
-
-void PNGAPI
-png_chunk_error(png_structp png_ptr, png_const_charp error_message)
-{
-   char msg[18+64];
-   png_format_buffer(png_ptr, msg, error_message);
-   png_error(png_ptr, msg);
-}
-
-void PNGAPI
-png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
-{
-   char msg[18+64];
-   png_format_buffer(png_ptr, msg, warning_message);
-   png_warning(png_ptr, msg);
-}
-
-/* This is the default error handling function.  Note that replacements for
- * this function MUST NOT RETURN, or the program will likely crash.  This
- * function is used by default, or if the program supplies NULL for the
- * error function pointer in png_set_error_fn().
- */
-static void /* PRIVATE */
-png_default_error(png_structp png_ptr, png_const_charp error_message)
-{
-#ifndef PNG_NO_CONSOLE_IO
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-   if (*error_message == '#')
-   {
-     int offset;
-     char error_number[16];
-     for (offset=0; offset<15; offset++)
-     {
-         error_number[offset] = *(error_message+offset+1);
-         if (*(error_message+offset) == ' ')
-             break;
-     }
-     if((offset > 1) && (offset < 15))
-     {
-       error_number[offset-1]='\0';
-       fprintf(stderr, "libpng error no. %s: %s\n", error_number,
-          error_message+offset);
-     }
-     else
-       fprintf(stderr, "libpng error: %s, offset=%d\n", error_message,offset);
-   }
-   else
-#endif
-   fprintf(stderr, "libpng error: %s\n", error_message);
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-#  ifdef USE_FAR_KEYWORD
-   {
-      jmp_buf jmpbuf;
-      png_memcpy(jmpbuf,png_ptr->jmpbuf,png_sizeof(jmp_buf));
-      longjmp(jmpbuf, 1);
-   }
-#  else
-   longjmp(png_ptr->jmpbuf, 1);
-# endif
-#else
-   /* make compiler happy */ ;
-   if (png_ptr)
-   PNG_ABORT();
-#endif
-#ifdef PNG_NO_CONSOLE_IO
-   /* make compiler happy */ ;
-   if (&error_message != NULL)
-      return;
-#endif
-}
-
-/* This function is called when there is a warning, but the library thinks
- * it can continue anyway.  Replacement functions don't have to do anything
- * here if you don't want them to.  In the default configuration, png_ptr is
- * not used, but it is passed in case it may be useful.
- */
-static void /* PRIVATE */
-png_default_warning(png_structp png_ptr, png_const_charp warning_message)
-{
-#ifndef PNG_NO_CONSOLE_IO
-#  ifdef PNG_ERROR_NUMBERS_SUPPORTED
-   if (*warning_message == '#')
-   {
-     int offset;
-     char warning_number[16];
-     for (offset=0; offset<15; offset++)
-     {
-        warning_number[offset]=*(warning_message+offset+1);
-        if (*(warning_message+offset) == ' ')
-            break;
-     }
-     if((offset > 1) && (offset < 15))
-     {
-       warning_number[offset-1]='\0';
-       fprintf(stderr, "libpng warning no. %s: %s\n", warning_number,
-          warning_message+offset);
-     }
-     else
-       fprintf(stderr, "libpng warning: %s\n", warning_message);
-   }
-   else
-#  endif
-     fprintf(stderr, "libpng warning: %s\n", warning_message);
-#else
-   /* make compiler happy */ ;
-   if (warning_message)
-     return;
-#endif
-   /* make compiler happy */ ;
-   if (png_ptr)
-      return;
-}
-
-/* This function is called when the application wants to use another method
- * of handling errors and warnings.  Note that the error function MUST NOT
- * return to the calling routine or serious problems will occur.  The return
- * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)
- */
-void PNGAPI
-png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warning_fn)
-{
-   png_ptr->error_ptr = error_ptr;
-   png_ptr->error_fn = error_fn;
-   png_ptr->warning_fn = warning_fn;
-}
-
-
-/* This function returns a pointer to the error_ptr associated with the user
- * functions.  The application should free any memory associated with this
- * pointer before png_write_destroy and png_read_destroy are called.
- */
-png_voidp PNGAPI
-png_get_error_ptr(png_structp png_ptr)
-{
-   return ((png_voidp)png_ptr->error_ptr);
-}
-
-
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-void PNGAPI
-png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
-{
-   if(png_ptr != NULL)
-   {
-     png_ptr->flags &=
-       ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
-   }
-}
-#endif
diff --git a/tkimg1.3/libpng/pnggccrd.c b/tkimg1.3/libpng/pnggccrd.c
deleted file mode 100644
index 27e0fc8..0000000
--- a/tkimg1.3/libpng/pnggccrd.c
+++ /dev/null
@@ -1,5408 +0,0 @@
-/* pnggccrd.c - mixed C/assembler version of utilities to read a PNG file
- *
- * For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler.
- *
- *     See http://www.intel.com/drg/pentiumII/appnotes/916/916.htm
- *     and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
- *     for Intel's performance analysis of the MMX vs. non-MMX code.
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * Copyright (c) 1998, Intel Corporation
- *
- * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
- * Interface to libpng contributed by Gilles Vollant, 1999.
- * GNU C port by Greg Roelofs, 1999-2001.
- *
- * Lines 2350-4300 converted in place with intel2gas 1.3.1:
- *
- *   intel2gas -mdI pnggccrd.c.partially-msvc -o pnggccrd.c
- *
- * and then cleaned up by hand.  See http://hermes.terminal.at/intel2gas/ .
- *
- * NOTE:  A sufficiently recent version of GNU as (or as.exe under DOS/Windows)
- *        is required to assemble the newer MMX instructions such as movq.
- *        For djgpp, see
- *
- *           ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bnu281b.zip
- *
- *        (or a later version in the same directory).  For Linux, check your
- *        distribution's web site(s) or try these links:
- *
- *           http://rufus.w3.org/linux/RPM/binutils.html
- *           http://www.debian.org/Packages/stable/devel/binutils.html
- *           ftp://ftp.slackware.com/pub/linux/slackware/slackware/slakware/d1/
- *             binutils.tgz
- *
- *        For other platforms, see the main GNU site:
- *
- *           ftp://ftp.gnu.org/pub/gnu/binutils/
- *
- *        Version 2.5.2l.15 is definitely too old...
- */
-
-/*
- * TEMPORARY PORTING NOTES AND CHANGELOG (mostly by Greg Roelofs)
- * =====================================
- *
- * 19991006:
- *  - fixed sign error in post-MMX cleanup code (16- & 32-bit cases)
- *
- * 19991007:
- *  - additional optimizations (possible or definite):
- *     x [DONE] write MMX code for 64-bit case (pixel_bytes == 8) [not tested]
- *     - write MMX code for 48-bit case (pixel_bytes == 6)
- *     - figure out what's up with 24-bit case (pixel_bytes == 3):
- *        why subtract 8 from width_mmx in the pass 4/5 case?
- *        (only width_mmx case) (near line 1606)
- *     x [DONE] replace pixel_bytes within each block with the true
- *        constant value (or are compilers smart enough to do that?)
- *     - rewrite all MMX interlacing code so it's aligned with
- *        the *beginning* of the row buffer, not the end.  This
- *        would not only allow one to eliminate half of the memory
- *        writes for odd passes (that is, pass == odd), it may also
- *        eliminate some unaligned-data-access exceptions (assuming
- *        there's a penalty for not aligning 64-bit accesses on
- *        64-bit boundaries).  The only catch is that the "leftover"
- *        pixel(s) at the end of the row would have to be saved,
- *        but there are enough unused MMX registers in every case,
- *        so this is not a problem.  A further benefit is that the
- *        post-MMX cleanup code (C code) in at least some of the
- *        cases could be done within the assembler block.
- *  x [DONE] the "v3 v2 v1 v0 v7 v6 v5 v4" comments are confusing,
- *     inconsistent, and don't match the MMX Programmer's Reference
- *     Manual conventions anyway.  They should be changed to
- *     "b7 b6 b5 b4 b3 b2 b1 b0," where b0 indicates the byte that
- *     was lowest in memory (e.g., corresponding to a left pixel)
- *     and b7 is the byte that was highest (e.g., a right pixel).
- *
- * 19991016:
- *  - Brennan's Guide notwithstanding, gcc under Linux does *not*
- *     want globals prefixed by underscores when referencing them--
- *     i.e., if the variable is const4, then refer to it as const4,
- *     not _const4.  This seems to be a djgpp-specific requirement.
- *     Also, such variables apparently *must* be declared outside
- *     of functions; neither static nor automatic variables work if
- *     defined within the scope of a single function, but both
- *     static and truly global (multi-module) variables work fine.
- *
- * 19991023:
- *  - fixed png_combine_row() non-MMX replication bug (odd passes only?)
- *  - switched from string-concatenation-with-macros to cleaner method of
- *     renaming global variables for djgpp--i.e., always use prefixes in
- *     inlined assembler code (== strings) and conditionally rename the
- *     variables, not the other way around.  Hence _const4, _mask8_0, etc.
- *
- * 19991024:
- *  - fixed mmxsupport()/png_do_read_interlace() first-row bug
- *     This one was severely weird:  even though mmxsupport() doesn't touch
- *     ebx (where "row" pointer was stored), it nevertheless managed to zero
- *     the register (even in static/non-fPIC code--see below), which in turn
- *     caused png_do_read_interlace() to return prematurely on the first row of
- *     interlaced images (i.e., without expanding the interlaced pixels).
- *     Inspection of the generated assembly code didn't turn up any clues,
- *     although it did point at a minor optimization (i.e., get rid of
- *     mmx_supported_local variable and just use eax).  Possibly the CPUID
- *     instruction is more destructive than it looks?  (Not yet checked.)
- *  - "info gcc" was next to useless, so compared fPIC and non-fPIC assembly
- *     listings...  Apparently register spillage has to do with ebx, since
- *     it's used to index the global offset table.  Commenting it out of the
- *     input-reg lists in png_combine_row() eliminated compiler barfage, so
- *     ifdef'd with __PIC__ macro:  if defined, use a global for unmask
- *
- * 19991107:
- *  - verified CPUID clobberage:  12-char string constant ("GenuineIntel",
- *     "AuthenticAMD", etc.) placed in ebx:ecx:edx.  Still need to polish.
- *
- * 19991120:
- *  - made "diff" variable (now "_dif") global to simplify conversion of
- *     filtering routines (running out of regs, sigh).  "diff" is still used
- *     in interlacing routines, however.
- *  - fixed up both versions of mmxsupport() (ORIG_THAT_USED_TO_CLOBBER_EBX
- *     macro determines which is used); original not yet tested.
- *
- * 20000213:
- *  - when compiling with gcc, be sure to use  -fomit-frame-pointer
- *
- * 20000319:
- *  - fixed a register-name typo in png_do_read_interlace(), default (MMX) case,
- *     pass == 4 or 5, that caused visible corruption of interlaced images
- *
- * 20000623:
- *  - Various problems were reported with gcc 2.95.2 in the Cygwin environment,
- *     many of the form "forbidden register 0 (ax) was spilled for class AREG."
- *     This is explained at http://gcc.gnu.org/fom_serv/cache/23.html, and
- *     Chuck Wilson supplied a patch involving dummy output registers.  See
- *     http://sourceforge.net/bugs/?func=detailbug&bug_id=108741&group_id=5624
- *     for the original (anonymous) SourceForge bug report.
- *
- * 20000706:
- *  - Chuck Wilson passed along these remaining gcc 2.95.2 errors:
- *       pnggccrd.c: In function `png_combine_row':
- *       pnggccrd.c:525: more than 10 operands in `asm'
- *       pnggccrd.c:669: more than 10 operands in `asm'
- *       pnggccrd.c:828: more than 10 operands in `asm'
- *       pnggccrd.c:994: more than 10 operands in `asm'
- *       pnggccrd.c:1177: more than 10 operands in `asm'
- *     They are all the same problem and can be worked around by using the
- *     global _unmask variable unconditionally, not just in the -fPIC case.
- *     Reportedly earlier versions of gcc also have the problem with more than
- *     10 operands; they just don't report it.  Much strangeness ensues, etc.
- *
- * 20000729:
- *  - enabled png_read_filter_row_mmx_up() (shortest remaining unconverted
- *     MMX routine); began converting png_read_filter_row_mmx_sub()
- *  - to finish remaining sections:
- *     - clean up indentation and comments
- *     - preload local variables
- *     - add output and input regs (order of former determines numerical
- *        mapping of latter)
- *     - avoid all usage of ebx (including bx, bh, bl) register [20000823]
- *     - remove "$" from addressing of Shift and Mask variables [20000823]
- *
- * 20000731:
- *  - global union vars causing segfaults in png_read_filter_row_mmx_sub()?
- *
- * 20000822:
- *  - ARGH, stupid png_read_filter_row_mmx_sub() segfault only happens with
- *     shared-library (-fPIC) version!  Code works just fine as part of static
- *     library.  Damn damn damn damn damn, should have tested that sooner.
- *     ebx is getting clobbered again (explicitly this time); need to save it
- *     on stack or rewrite asm code to avoid using it altogether.  Blargh!
- *
- * 20000823:
- *  - first section was trickiest; all remaining sections have ebx -> edx now.
- *     (-fPIC works again.)  Also added missing underscores to various Shift*
- *     and *Mask* globals and got rid of leading "$" signs.
- *
- * 20000826:
- *  - added visual separators to help navigate microscopic printed copies
- *     (http://pobox.com/~newt/code/gpr-latest.zip, mode 10); started working
- *     on png_read_filter_row_mmx_avg()
- *
- * 20000828:
- *  - finished png_read_filter_row_mmx_avg():  only Paeth left! (930 lines...)
- *     What the hell, did png_read_filter_row_mmx_paeth(), too.  Comments not
- *     cleaned up/shortened in either routine, but functionality is complete
- *     and seems to be working fine.
- *
- * 20000829:
- *  - ahhh, figured out last(?) bit of gcc/gas asm-fu:  if register is listed
- *     as an input reg (with dummy output variables, etc.), then it *cannot*
- *     also appear in the clobber list or gcc 2.95.2 will barf.  The solution
- *     is simple enough...
- *
- * 20000914:
- *  - bug in png_read_filter_row_mmx_avg():  16-bit grayscale not handled
- *     correctly (but 48-bit RGB just fine)
- *
- * 20000916:
- *  - fixed bug in png_read_filter_row_mmx_avg(), bpp == 2 case; three errors:
- *     - "_ShiftBpp.use = 24;"      should have been   "_ShiftBpp.use = 16;"
- *     - "_ShiftRem.use = 40;"      should have been   "_ShiftRem.use = 48;"
- *     - "psllq _ShiftRem, %%mm2"   should have been   "psrlq _ShiftRem, %%mm2"
- *
- * 20010101:
- *  - added new png_init_mmx_flags() function (here only because it needs to
- *     call mmxsupport(), which should probably become global png_mmxsupport());
- *     modified other MMX routines to run conditionally (png_ptr->asm_flags)
- *
- * 20010103:
- *  - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported,
- *     and made it public; moved png_init_mmx_flags() to png.c as internal func
- *
- * 20010104:
- *  - removed dependency on png_read_filter_row_c() (C code already duplicated
- *     within MMX version of png_read_filter_row()) so no longer necessary to
- *     compile it into pngrutil.o
- *
- * 20010310:
- *  - fixed buffer-overrun bug in png_combine_row() C code (non-MMX)
- *
- * 20020304:
- *  - eliminated incorrect use of width_mmx in pixel_bytes == 8 case
- *
- * 20040724:
- *   - more tinkering with clobber list at lines 4529 and 5033, to get
- *     it to compile on gcc-3.4.
- *
- * STILL TO DO:
- *     - test png_do_read_interlace() 64-bit case (pixel_bytes == 8)
- *     - write MMX code for 48-bit case (pixel_bytes == 6)
- *     - figure out what's up with 24-bit case (pixel_bytes == 3):
- *        why subtract 8 from width_mmx in the pass 4/5 case?
- *        (only width_mmx case) (near line 1606)
- *     - rewrite all MMX interlacing code so it's aligned with beginning
- *        of the row buffer, not the end (see 19991007 for details)
- *     x pick one version of mmxsupport() and get rid of the other
- *     - add error messages to any remaining bogus default cases
- *     - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed)
- *     x add support for runtime enable/disable/query of various MMX routines
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#if defined(PNG_USE_PNGGCCRD)
-
-int PNGAPI png_mmx_support(void);
-
-#ifdef PNG_USE_LOCAL_ARRAYS
-static const int FARDATA png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-static const int FARDATA png_pass_inc[7]   = {8, 8, 4, 4, 2, 2, 1};
-static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
-#endif
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-/* djgpp, Win32, and Cygwin add their own underscores to global variables,
- * so define them without: */
-#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
-#  define _mmx_supported  mmx_supported
-#  define _const4         const4
-#  define _const6         const6
-#  define _mask8_0        mask8_0
-#  define _mask16_1       mask16_1
-#  define _mask16_0       mask16_0
-#  define _mask24_2       mask24_2
-#  define _mask24_1       mask24_1
-#  define _mask24_0       mask24_0
-#  define _mask32_3       mask32_3
-#  define _mask32_2       mask32_2
-#  define _mask32_1       mask32_1
-#  define _mask32_0       mask32_0
-#  define _mask48_5       mask48_5
-#  define _mask48_4       mask48_4
-#  define _mask48_3       mask48_3
-#  define _mask48_2       mask48_2
-#  define _mask48_1       mask48_1
-#  define _mask48_0       mask48_0
-#  define _LBCarryMask    LBCarryMask
-#  define _HBClearMask    HBClearMask
-#  define _ActiveMask     ActiveMask
-#  define _ActiveMask2    ActiveMask2
-#  define _ActiveMaskEnd  ActiveMaskEnd
-#  define _ShiftBpp       ShiftBpp
-#  define _ShiftRem       ShiftRem
-#ifdef PNG_THREAD_UNSAFE_OK
-#  define _unmask         unmask
-#  define _FullLength     FullLength
-#  define _MMXLength      MMXLength
-#  define _dif            dif
-#  define _patemp         patemp
-#  define _pbtemp         pbtemp
-#  define _pctemp         pctemp
-#endif
-#endif
-
-
-/* These constants are used in the inlined MMX assembly code.
-   Ignore gcc's "At top level: defined but not used" warnings. */
-
-/* GRR 20000706:  originally _unmask was needed only when compiling with -fPIC,
- *  since that case uses the %ebx register for indexing the Global Offset Table
- *  and there were no other registers available.  But gcc 2.95 and later emit
- *  "more than 10 operands in `asm'" errors when %ebx is used to preload unmask
- *  in the non-PIC case, so we'll just use the global unconditionally now.
- */
-#ifdef PNG_THREAD_UNSAFE_OK
-static int _unmask;
-#endif
-
-static unsigned long long _mask8_0  = 0x0102040810204080LL;
-
-static unsigned long long _mask16_1 = 0x0101020204040808LL;
-static unsigned long long _mask16_0 = 0x1010202040408080LL;
-
-static unsigned long long _mask24_2 = 0x0101010202020404LL;
-static unsigned long long _mask24_1 = 0x0408080810101020LL;
-static unsigned long long _mask24_0 = 0x2020404040808080LL;
-
-static unsigned long long _mask32_3 = 0x0101010102020202LL;
-static unsigned long long _mask32_2 = 0x0404040408080808LL;
-static unsigned long long _mask32_1 = 0x1010101020202020LL;
-static unsigned long long _mask32_0 = 0x4040404080808080LL;
-
-static unsigned long long _mask48_5 = 0x0101010101010202LL;
-static unsigned long long _mask48_4 = 0x0202020204040404LL;
-static unsigned long long _mask48_3 = 0x0404080808080808LL;
-static unsigned long long _mask48_2 = 0x1010101010102020LL;
-static unsigned long long _mask48_1 = 0x2020202040404040LL;
-static unsigned long long _mask48_0 = 0x4040808080808080LL;
-
-static unsigned long long _const4   = 0x0000000000FFFFFFLL;
-//static unsigned long long _const5 = 0x000000FFFFFF0000LL;     // NOT USED
-static unsigned long long _const6   = 0x00000000000000FFLL;
-
-// These are used in the row-filter routines and should/would be local
-//  variables if not for gcc addressing limitations.
-// WARNING: Their presence probably defeats the thread safety of libpng.
-
-#ifdef PNG_THREAD_UNSAFE_OK
-static png_uint_32  _FullLength;
-static png_uint_32  _MMXLength;
-static int          _dif;
-static int          _patemp; // temp variables for Paeth routine
-static int          _pbtemp;
-static int          _pctemp;
-#endif
-
-void /* PRIVATE */
-png_squelch_warnings(void)
-{
-#ifdef PNG_THREAD_UNSAFE_OK
-   _dif = _dif;
-   _patemp = _patemp;
-   _pbtemp = _pbtemp;
-   _pctemp = _pctemp;
-   _MMXLength = _MMXLength;
-#endif
-   _const4  = _const4;
-   _const6  = _const6;
-   _mask8_0  = _mask8_0;
-   _mask16_1 = _mask16_1;
-   _mask16_0 = _mask16_0;
-   _mask24_2 = _mask24_2;
-   _mask24_1 = _mask24_1;
-   _mask24_0 = _mask24_0;
-   _mask32_3 = _mask32_3;
-   _mask32_2 = _mask32_2;
-   _mask32_1 = _mask32_1;
-   _mask32_0 = _mask32_0;
-   _mask48_5 = _mask48_5;
-   _mask48_4 = _mask48_4;
-   _mask48_3 = _mask48_3;
-   _mask48_2 = _mask48_2;
-   _mask48_1 = _mask48_1;
-   _mask48_0 = _mask48_0;
-}
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-
-static int _mmx_supported = 2;
-
-/*===========================================================================*/
-/*                                                                           */
-/*                       P N G _ C O M B I N E _ R O W                       */
-/*                                                                           */
-/*===========================================================================*/
-
-#if defined(PNG_HAVE_ASSEMBLER_COMBINE_ROW)
-
-#define BPP2  2
-#define BPP3  3 /* bytes per pixel (a.k.a. pixel_bytes) */
-#define BPP4  4
-#define BPP6  6 /* (defined only to help avoid cut-and-paste errors) */
-#define BPP8  8
-
-/* Combines the row recently read in with the previous row.
-   This routine takes care of alpha and transparency if requested.
-   This routine also handles the two methods of progressive display
-   of interlaced images, depending on the mask value.
-   The mask value describes which pixels are to be combined with
-   the row.  The pattern always repeats every 8 pixels, so just 8
-   bits are needed.  A one indicates the pixel is to be combined; a
-   zero indicates the pixel is to be skipped.  This is in addition
-   to any alpha or transparency value associated with the pixel.
-   If you want all pixels to be combined, pass 0xff (255) in mask. */
-
-/* Use this routine for the x86 platform - it uses a faster MMX routine
-   if the machine supports MMX. */
-
-void /* PRIVATE */
-png_combine_row(png_structp png_ptr, png_bytep row, int mask)
-{
-   png_debug(1, "in png_combine_row (pnggccrd.c)\n");
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-   if (_mmx_supported == 2) {
-#if !defined(PNG_1_0_X)
-       /* this should have happened in png_init_mmx_flags() already */
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-#endif
-
-   if (mask == 0xff)
-   {
-      png_debug(2,"mask == 0xff:  doing single png_memcpy()\n");
-      png_memcpy(row, png_ptr->row_buf + 1,
-       (png_size_t)PNG_ROWBYTES(png_ptr->row_info.pixel_depth,png_ptr->width));
-   }
-   else   /* (png_combine_row() is never called with mask == 0) */
-   {
-      switch (png_ptr->row_info.pixel_depth)
-      {
-         case 1:        /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_inc, s_start, s_end;
-            int m;
-            int shift;
-            png_uint_32 i;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-                s_start = 0;
-                s_end = 7;
-                s_inc = 1;
-            }
-            else
-#endif
-            {
-                s_start = 7;
-                s_end = 0;
-                s_inc = -1;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  int value;
-
-                  value = (*sp >> shift) & 0x1;
-                  *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 2:        /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_start, s_end, s_inc;
-            int m;
-            int shift;
-            png_uint_32 i;
-            int value;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-            else
-#endif
-            {
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0x3;
-                  *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 4:        /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_start, s_end, s_inc;
-            int m;
-            int shift;
-            png_uint_32 i;
-            int value;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-            else
-#endif
-            {
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0xf;
-                  *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 8:        /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               png_uint_32 len;
-               int diff;
-               int dummy_value_a;   // fix 'forbidden register spilled' error
-               int dummy_value_d;
-               int dummy_value_c;
-               int dummy_value_S;
-               int dummy_value_D;
-               _unmask = ~mask;            // global variable for -fPIC version
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               len  = png_ptr->width &~7;  // reduce to multiple of 8
-               diff = (int) (png_ptr->width & 7);  // amount lost
-
-               __asm__ __volatile__ (
-                  "movd      _unmask, %%mm7  \n\t" // load bit pattern
-                  "psubb     %%mm6, %%mm6    \n\t" // zero mm6
-                  "punpcklbw %%mm7, %%mm7    \n\t"
-                  "punpcklwd %%mm7, %%mm7    \n\t"
-                  "punpckldq %%mm7, %%mm7    \n\t" // fill reg with 8 masks
-
-                  "movq      _mask8_0, %%mm0 \n\t"
-                  "pand      %%mm7, %%mm0    \n\t" // nonzero if keep byte
-                  "pcmpeqb   %%mm6, %%mm0    \n\t" // zeros->1s, v versa
-
-// preload        "movl      len, %%ecx      \n\t" // load length of line
-// preload        "movl      srcptr, %%esi   \n\t" // load source
-// preload        "movl      dstptr, %%edi   \n\t" // load dest
-
-                  "cmpl      $0, %%ecx       \n\t" // len == 0 ?
-                  "je        mainloop8end    \n\t"
-
-                "mainloop8:                  \n\t"
-                  "movq      (%%esi), %%mm4  \n\t" // *srcptr
-                  "pand      %%mm0, %%mm4    \n\t"
-                  "movq      %%mm0, %%mm6    \n\t"
-                  "pandn     (%%edi), %%mm6  \n\t" // *dstptr
-                  "por       %%mm6, %%mm4    \n\t"
-                  "movq      %%mm4, (%%edi)  \n\t"
-                  "addl      $8, %%esi       \n\t" // inc by 8 bytes processed
-                  "addl      $8, %%edi       \n\t"
-                  "subl      $8, %%ecx       \n\t" // dec by 8 pixels processed
-                  "ja        mainloop8       \n\t"
-
-                "mainloop8end:               \n\t"
-// preload        "movl      diff, %%ecx     \n\t" // (diff is in eax)
-                  "movl      %%eax, %%ecx    \n\t"
-                  "cmpl      $0, %%ecx       \n\t"
-                  "jz        end8            \n\t"
-// preload        "movl      mask, %%edx     \n\t"
-                  "sall      $24, %%edx      \n\t" // make low byte, high byte
-
-                "secondloop8:                \n\t"
-                  "sall      %%edx           \n\t" // move high bit to CF
-                  "jnc       skip8           \n\t" // if CF = 0
-                  "movb      (%%esi), %%al   \n\t"
-                  "movb      %%al, (%%edi)   \n\t"
-
-                "skip8:                      \n\t"
-                  "incl      %%esi           \n\t"
-                  "incl      %%edi           \n\t"
-                  "decl      %%ecx           \n\t"
-                  "jnz       secondloop8     \n\t"
-
-                "end8:                       \n\t"
-                  "EMMS                      \n\t"  // DONE
-
-                  : "=a" (dummy_value_a),           // output regs (dummy)
-                    "=d" (dummy_value_d),
-                    "=c" (dummy_value_c),
-                    "=S" (dummy_value_S),
-                    "=D" (dummy_value_D)
-
-                  : "3" (srcptr),      // esi       // input regs
-                    "4" (dstptr),      // edi
-                    "0" (diff),        // eax
-// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
-                    "2" (len),         // ecx
-                    "1" (mask)         // edx
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  : "%mm0", "%mm4", "%mm6", "%mm7"  // clobber list
-#endif
-               );
-            }
-            else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               register png_uint_32 i;
-               png_uint_32 initial_val = png_pass_start[png_ptr->pass];
-                 /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-               register int stride = png_pass_inc[png_ptr->pass];
-                 /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-               register int rep_bytes = png_pass_width[png_ptr->pass];
-                 /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-               png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-               int diff = (int) (png_ptr->width & 7); /* amount lost */
-               register png_uint_32 final_val = len;  /* GRR bugfix */
-
-               srcptr = png_ptr->row_buf + 1 + initial_val;
-               dstptr = row + initial_val;
-
-               for (i = initial_val; i < final_val; i += stride)
-               {
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-               if (diff)  /* number of leftover pixels:  3 for pngtest */
-               {
-                  final_val+=diff /* *BPP1 */ ;
-                  for (; i < final_val; i += stride)
-                  {
-                     if (rep_bytes > (int)(final_val-i))
-                        rep_bytes = (int)(final_val-i);
-                     png_memcpy(dstptr, srcptr, rep_bytes);
-                     srcptr += stride;
-                     dstptr += stride;
-                  }
-               }
-
-            } /* end of else (_mmx_supported) */
-
-            break;
-         }       /* end 8 bpp */
-
-         case 16:       /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               png_uint_32 len;
-               int diff;
-               int dummy_value_a;   // fix 'forbidden register spilled' error
-               int dummy_value_d;
-               int dummy_value_c;
-               int dummy_value_S;
-               int dummy_value_D;
-               _unmask = ~mask;            // global variable for -fPIC version
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               len  = png_ptr->width &~7;  // reduce to multiple of 8
-               diff = (int) (png_ptr->width & 7); // amount lost //
-
-               __asm__ __volatile__ (
-                  "movd      _unmask, %%mm7   \n\t" // load bit pattern
-                  "psubb     %%mm6, %%mm6     \n\t" // zero mm6
-                  "punpcklbw %%mm7, %%mm7     \n\t"
-                  "punpcklwd %%mm7, %%mm7     \n\t"
-                  "punpckldq %%mm7, %%mm7     \n\t" // fill reg with 8 masks
-
-                  "movq      _mask16_0, %%mm0 \n\t"
-                  "movq      _mask16_1, %%mm1 \n\t"
-
-                  "pand      %%mm7, %%mm0     \n\t"
-                  "pand      %%mm7, %%mm1     \n\t"
-
-                  "pcmpeqb   %%mm6, %%mm0     \n\t"
-                  "pcmpeqb   %%mm6, %%mm1     \n\t"
-
-// preload        "movl      len, %%ecx       \n\t" // load length of line
-// preload        "movl      srcptr, %%esi    \n\t" // load source
-// preload        "movl      dstptr, %%edi    \n\t" // load dest
-
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        mainloop16end    \n\t"
-
-                "mainloop16:                  \n\t"
-                  "movq      (%%esi), %%mm4   \n\t"
-                  "pand      %%mm0, %%mm4     \n\t"
-                  "movq      %%mm0, %%mm6     \n\t"
-                  "movq      (%%edi), %%mm7   \n\t"
-                  "pandn     %%mm7, %%mm6     \n\t"
-                  "por       %%mm6, %%mm4     \n\t"
-                  "movq      %%mm4, (%%edi)   \n\t"
-
-                  "movq      8(%%esi), %%mm5  \n\t"
-                  "pand      %%mm1, %%mm5     \n\t"
-                  "movq      %%mm1, %%mm7     \n\t"
-                  "movq      8(%%edi), %%mm6  \n\t"
-                  "pandn     %%mm6, %%mm7     \n\t"
-                  "por       %%mm7, %%mm5     \n\t"
-                  "movq      %%mm5, 8(%%edi)  \n\t"
-
-                  "addl      $16, %%esi       \n\t" // inc by 16 bytes processed
-                  "addl      $16, %%edi       \n\t"
-                  "subl      $8, %%ecx        \n\t" // dec by 8 pixels processed
-                  "ja        mainloop16       \n\t"
-
-                "mainloop16end:               \n\t"
-// preload        "movl      diff, %%ecx      \n\t" // (diff is in eax)
-                  "movl      %%eax, %%ecx     \n\t"
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        end16            \n\t"
-// preload        "movl      mask, %%edx      \n\t"
-                  "sall      $24, %%edx       \n\t" // make low byte, high byte
-
-                "secondloop16:                \n\t"
-                  "sall      %%edx            \n\t" // move high bit to CF
-                  "jnc       skip16           \n\t" // if CF = 0
-                  "movw      (%%esi), %%ax    \n\t"
-                  "movw      %%ax, (%%edi)    \n\t"
-
-                "skip16:                      \n\t"
-                  "addl      $2, %%esi        \n\t"
-                  "addl      $2, %%edi        \n\t"
-                  "decl      %%ecx            \n\t"
-                  "jnz       secondloop16     \n\t"
-
-                "end16:                       \n\t"
-                  "EMMS                       \n\t" // DONE
-
-                  : "=a" (dummy_value_a),           // output regs (dummy)
-                    "=c" (dummy_value_c),
-                    "=d" (dummy_value_d),
-                    "=S" (dummy_value_S),
-                    "=D" (dummy_value_D)
-
-                  : "0" (diff),        // eax       // input regs
-// was (unmask)     " "    RESERVED    // ebx       // Global Offset Table idx
-                    "1" (len),         // ecx
-                    "2" (mask),        // edx
-                    "3" (srcptr),      // esi
-                    "4" (dstptr)       // edi
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  : "%mm0", "%mm1", "%mm4"          // clobber list
-                  , "%mm5", "%mm6", "%mm7"
-#endif
-               );
-            }
-            else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               register png_uint_32 i;
-               png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass];
-                 /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-               register int stride = BPP2 * png_pass_inc[png_ptr->pass];
-                 /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-               register int rep_bytes = BPP2 * png_pass_width[png_ptr->pass];
-                 /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-               png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-               int diff = (int) (png_ptr->width & 7); /* amount lost */
-               register png_uint_32 final_val = BPP2 * len;   /* GRR bugfix */
-
-               srcptr = png_ptr->row_buf + 1 + initial_val;
-               dstptr = row + initial_val;
-
-               for (i = initial_val; i < final_val; i += stride)
-               {
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-               if (diff)  /* number of leftover pixels:  3 for pngtest */
-               {
-                  final_val+=diff*BPP2;
-                  for (; i < final_val; i += stride)
-                  {
-                     if (rep_bytes > (int)(final_val-i))
-                        rep_bytes = (int)(final_val-i);
-                     png_memcpy(dstptr, srcptr, rep_bytes);
-                     srcptr += stride;
-                     dstptr += stride;
-                  }
-               }
-            } /* end of else (_mmx_supported) */
-
-            break;
-         }       /* end 16 bpp */
-
-         case 24:       /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               png_uint_32 len;
-               int diff;
-               int dummy_value_a;   // fix 'forbidden register spilled' error
-               int dummy_value_d;
-               int dummy_value_c;
-               int dummy_value_S;
-               int dummy_value_D;
-               _unmask = ~mask;            // global variable for -fPIC version
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               len  = png_ptr->width &~7;  // reduce to multiple of 8
-               diff = (int) (png_ptr->width & 7); // amount lost //
-
-               __asm__ __volatile__ (
-                  "movd      _unmask, %%mm7   \n\t" // load bit pattern
-                  "psubb     %%mm6, %%mm6     \n\t" // zero mm6
-                  "punpcklbw %%mm7, %%mm7     \n\t"
-                  "punpcklwd %%mm7, %%mm7     \n\t"
-                  "punpckldq %%mm7, %%mm7     \n\t" // fill reg with 8 masks
-
-                  "movq      _mask24_0, %%mm0 \n\t"
-                  "movq      _mask24_1, %%mm1 \n\t"
-                  "movq      _mask24_2, %%mm2 \n\t"
-
-                  "pand      %%mm7, %%mm0     \n\t"
-                  "pand      %%mm7, %%mm1     \n\t"
-                  "pand      %%mm7, %%mm2     \n\t"
-
-                  "pcmpeqb   %%mm6, %%mm0     \n\t"
-                  "pcmpeqb   %%mm6, %%mm1     \n\t"
-                  "pcmpeqb   %%mm6, %%mm2     \n\t"
-
-// preload        "movl      len, %%ecx       \n\t" // load length of line
-// preload        "movl      srcptr, %%esi    \n\t" // load source
-// preload        "movl      dstptr, %%edi    \n\t" // load dest
-
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        mainloop24end    \n\t"
-
-                "mainloop24:                  \n\t"
-                  "movq      (%%esi), %%mm4   \n\t"
-                  "pand      %%mm0, %%mm4     \n\t"
-                  "movq      %%mm0, %%mm6     \n\t"
-                  "movq      (%%edi), %%mm7   \n\t"
-                  "pandn     %%mm7, %%mm6     \n\t"
-                  "por       %%mm6, %%mm4     \n\t"
-                  "movq      %%mm4, (%%edi)   \n\t"
-
-                  "movq      8(%%esi), %%mm5  \n\t"
-                  "pand      %%mm1, %%mm5     \n\t"
-                  "movq      %%mm1, %%mm7     \n\t"
-                  "movq      8(%%edi), %%mm6  \n\t"
-                  "pandn     %%mm6, %%mm7     \n\t"
-                  "por       %%mm7, %%mm5     \n\t"
-                  "movq      %%mm5, 8(%%edi)  \n\t"
-
-                  "movq      16(%%esi), %%mm6 \n\t"
-                  "pand      %%mm2, %%mm6     \n\t"
-                  "movq      %%mm2, %%mm4     \n\t"
-                  "movq      16(%%edi), %%mm7 \n\t"
-                  "pandn     %%mm7, %%mm4     \n\t"
-                  "por       %%mm4, %%mm6     \n\t"
-                  "movq      %%mm6, 16(%%edi) \n\t"
-
-                  "addl      $24, %%esi       \n\t" // inc by 24 bytes processed
-                  "addl      $24, %%edi       \n\t"
-                  "subl      $8, %%ecx        \n\t" // dec by 8 pixels processed
-
-                  "ja        mainloop24       \n\t"
-
-                "mainloop24end:               \n\t"
-// preload        "movl      diff, %%ecx      \n\t" // (diff is in eax)
-                  "movl      %%eax, %%ecx     \n\t"
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        end24            \n\t"
-// preload        "movl      mask, %%edx      \n\t"
-                  "sall      $24, %%edx       \n\t" // make low byte, high byte
-
-                "secondloop24:                \n\t"
-                  "sall      %%edx            \n\t" // move high bit to CF
-                  "jnc       skip24           \n\t" // if CF = 0
-                  "movw      (%%esi), %%ax    \n\t"
-                  "movw      %%ax, (%%edi)    \n\t"
-                  "xorl      %%eax, %%eax     \n\t"
-                  "movb      2(%%esi), %%al   \n\t"
-                  "movb      %%al, 2(%%edi)   \n\t"
-
-                "skip24:                      \n\t"
-                  "addl      $3, %%esi        \n\t"
-                  "addl      $3, %%edi        \n\t"
-                  "decl      %%ecx            \n\t"
-                  "jnz       secondloop24     \n\t"
-
-                "end24:                       \n\t"
-                  "EMMS                       \n\t" // DONE
-
-                  : "=a" (dummy_value_a),           // output regs (dummy)
-                    "=d" (dummy_value_d),
-                    "=c" (dummy_value_c),
-                    "=S" (dummy_value_S),
-                    "=D" (dummy_value_D)
-
-                  : "3" (srcptr),      // esi       // input regs
-                    "4" (dstptr),      // edi
-                    "0" (diff),        // eax
-// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
-                    "2" (len),         // ecx
-                    "1" (mask)         // edx
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  : "%mm0", "%mm1", "%mm2"          // clobber list
-                  , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-               );
-            }
-            else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               register png_uint_32 i;
-               png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass];
-                 /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-               register int stride = BPP3 * png_pass_inc[png_ptr->pass];
-                 /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-               register int rep_bytes = BPP3 * png_pass_width[png_ptr->pass];
-                 /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-               png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-               int diff = (int) (png_ptr->width & 7); /* amount lost */
-               register png_uint_32 final_val = BPP3 * len;   /* GRR bugfix */
-
-               srcptr = png_ptr->row_buf + 1 + initial_val;
-               dstptr = row + initial_val;
-
-               for (i = initial_val; i < final_val; i += stride)
-               {
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-               if (diff)  /* number of leftover pixels:  3 for pngtest */
-               {
-                  final_val+=diff*BPP3;
-                  for (; i < final_val; i += stride)
-                  {
-                     if (rep_bytes > (int)(final_val-i))
-                        rep_bytes = (int)(final_val-i);
-                     png_memcpy(dstptr, srcptr, rep_bytes);
-                     srcptr += stride;
-                     dstptr += stride;
-                  }
-               }
-            } /* end of else (_mmx_supported) */
-
-            break;
-         }       /* end 24 bpp */
-
-         case 32:       /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               png_uint_32 len;
-               int diff;
-               int dummy_value_a;   // fix 'forbidden register spilled' error
-               int dummy_value_d;
-               int dummy_value_c;
-               int dummy_value_S;
-               int dummy_value_D;
-               _unmask = ~mask;            // global variable for -fPIC version
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               len  = png_ptr->width &~7;  // reduce to multiple of 8
-               diff = (int) (png_ptr->width & 7); // amount lost //
-
-               __asm__ __volatile__ (
-                  "movd      _unmask, %%mm7   \n\t" // load bit pattern
-                  "psubb     %%mm6, %%mm6     \n\t" // zero mm6
-                  "punpcklbw %%mm7, %%mm7     \n\t"
-                  "punpcklwd %%mm7, %%mm7     \n\t"
-                  "punpckldq %%mm7, %%mm7     \n\t" // fill reg with 8 masks
-
-                  "movq      _mask32_0, %%mm0 \n\t"
-                  "movq      _mask32_1, %%mm1 \n\t"
-                  "movq      _mask32_2, %%mm2 \n\t"
-                  "movq      _mask32_3, %%mm3 \n\t"
-
-                  "pand      %%mm7, %%mm0     \n\t"
-                  "pand      %%mm7, %%mm1     \n\t"
-                  "pand      %%mm7, %%mm2     \n\t"
-                  "pand      %%mm7, %%mm3     \n\t"
-
-                  "pcmpeqb   %%mm6, %%mm0     \n\t"
-                  "pcmpeqb   %%mm6, %%mm1     \n\t"
-                  "pcmpeqb   %%mm6, %%mm2     \n\t"
-                  "pcmpeqb   %%mm6, %%mm3     \n\t"
-
-// preload        "movl      len, %%ecx       \n\t" // load length of line
-// preload        "movl      srcptr, %%esi    \n\t" // load source
-// preload        "movl      dstptr, %%edi    \n\t" // load dest
-
-                  "cmpl      $0, %%ecx        \n\t" // lcr
-                  "jz        mainloop32end    \n\t"
-
-                "mainloop32:                  \n\t"
-                  "movq      (%%esi), %%mm4   \n\t"
-                  "pand      %%mm0, %%mm4     \n\t"
-                  "movq      %%mm0, %%mm6     \n\t"
-                  "movq      (%%edi), %%mm7   \n\t"
-                  "pandn     %%mm7, %%mm6     \n\t"
-                  "por       %%mm6, %%mm4     \n\t"
-                  "movq      %%mm4, (%%edi)   \n\t"
-
-                  "movq      8(%%esi), %%mm5  \n\t"
-                  "pand      %%mm1, %%mm5     \n\t"
-                  "movq      %%mm1, %%mm7     \n\t"
-                  "movq      8(%%edi), %%mm6  \n\t"
-                  "pandn     %%mm6, %%mm7     \n\t"
-                  "por       %%mm7, %%mm5     \n\t"
-                  "movq      %%mm5, 8(%%edi)  \n\t"
-
-                  "movq      16(%%esi), %%mm6 \n\t"
-                  "pand      %%mm2, %%mm6     \n\t"
-                  "movq      %%mm2, %%mm4     \n\t"
-                  "movq      16(%%edi), %%mm7 \n\t"
-                  "pandn     %%mm7, %%mm4     \n\t"
-                  "por       %%mm4, %%mm6     \n\t"
-                  "movq      %%mm6, 16(%%edi) \n\t"
-
-                  "movq      24(%%esi), %%mm7 \n\t"
-                  "pand      %%mm3, %%mm7     \n\t"
-                  "movq      %%mm3, %%mm5     \n\t"
-                  "movq      24(%%edi), %%mm4 \n\t"
-                  "pandn     %%mm4, %%mm5     \n\t"
-                  "por       %%mm5, %%mm7     \n\t"
-                  "movq      %%mm7, 24(%%edi) \n\t"
-
-                  "addl      $32, %%esi       \n\t" // inc by 32 bytes processed
-                  "addl      $32, %%edi       \n\t"
-                  "subl      $8, %%ecx        \n\t" // dec by 8 pixels processed
-                  "ja        mainloop32       \n\t"
-
-                "mainloop32end:               \n\t"
-// preload        "movl      diff, %%ecx      \n\t" // (diff is in eax)
-                  "movl      %%eax, %%ecx     \n\t"
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        end32            \n\t"
-// preload        "movl      mask, %%edx      \n\t"
-                  "sall      $24, %%edx       \n\t" // low byte => high byte
-
-                "secondloop32:                \n\t"
-                  "sall      %%edx            \n\t" // move high bit to CF
-                  "jnc       skip32           \n\t" // if CF = 0
-                  "movl      (%%esi), %%eax   \n\t"
-                  "movl      %%eax, (%%edi)   \n\t"
-
-                "skip32:                      \n\t"
-                  "addl      $4, %%esi        \n\t"
-                  "addl      $4, %%edi        \n\t"
-                  "decl      %%ecx            \n\t"
-                  "jnz       secondloop32     \n\t"
-
-                "end32:                       \n\t"
-                  "EMMS                       \n\t" // DONE
-
-                  : "=a" (dummy_value_a),           // output regs (dummy)
-                    "=d" (dummy_value_d),
-                    "=c" (dummy_value_c),
-                    "=S" (dummy_value_S),
-                    "=D" (dummy_value_D)
-
-                  : "3" (srcptr),      // esi       // input regs
-                    "4" (dstptr),      // edi
-                    "0" (diff),        // eax
-// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
-                    "2" (len),         // ecx
-                    "1" (mask)         // edx
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  : "%mm0", "%mm1", "%mm2", "%mm3"  // clobber list
-                  , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-               );
-            }
-            else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               register png_uint_32 i;
-               png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass];
-                 /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-               register int stride = BPP4 * png_pass_inc[png_ptr->pass];
-                 /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-               register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass];
-                 /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-               png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-               int diff = (int) (png_ptr->width & 7); /* amount lost */
-               register png_uint_32 final_val = BPP4 * len;   /* GRR bugfix */
-
-               srcptr = png_ptr->row_buf + 1 + initial_val;
-               dstptr = row + initial_val;
-
-               for (i = initial_val; i < final_val; i += stride)
-               {
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-               if (diff)  /* number of leftover pixels:  3 for pngtest */
-               {
-                  final_val+=diff*BPP4;
-                  for (; i < final_val; i += stride)
-                  {
-                     if (rep_bytes > (int)(final_val-i))
-                        rep_bytes = (int)(final_val-i);
-                     png_memcpy(dstptr, srcptr, rep_bytes);
-                     srcptr += stride;
-                     dstptr += stride;
-                  }
-               }
-            } /* end of else (_mmx_supported) */
-
-            break;
-         }       /* end 32 bpp */
-
-         case 48:       /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               png_uint_32 len;
-               int diff;
-               int dummy_value_a;   // fix 'forbidden register spilled' error
-               int dummy_value_d;
-               int dummy_value_c;
-               int dummy_value_S;
-               int dummy_value_D;
-               _unmask = ~mask;            // global variable for -fPIC version
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               len  = png_ptr->width &~7;  // reduce to multiple of 8
-               diff = (int) (png_ptr->width & 7); // amount lost //
-
-               __asm__ __volatile__ (
-                  "movd      _unmask, %%mm7   \n\t" // load bit pattern
-                  "psubb     %%mm6, %%mm6     \n\t" // zero mm6
-                  "punpcklbw %%mm7, %%mm7     \n\t"
-                  "punpcklwd %%mm7, %%mm7     \n\t"
-                  "punpckldq %%mm7, %%mm7     \n\t" // fill reg with 8 masks
-
-                  "movq      _mask48_0, %%mm0 \n\t"
-                  "movq      _mask48_1, %%mm1 \n\t"
-                  "movq      _mask48_2, %%mm2 \n\t"
-                  "movq      _mask48_3, %%mm3 \n\t"
-                  "movq      _mask48_4, %%mm4 \n\t"
-                  "movq      _mask48_5, %%mm5 \n\t"
-
-                  "pand      %%mm7, %%mm0     \n\t"
-                  "pand      %%mm7, %%mm1     \n\t"
-                  "pand      %%mm7, %%mm2     \n\t"
-                  "pand      %%mm7, %%mm3     \n\t"
-                  "pand      %%mm7, %%mm4     \n\t"
-                  "pand      %%mm7, %%mm5     \n\t"
-
-                  "pcmpeqb   %%mm6, %%mm0     \n\t"
-                  "pcmpeqb   %%mm6, %%mm1     \n\t"
-                  "pcmpeqb   %%mm6, %%mm2     \n\t"
-                  "pcmpeqb   %%mm6, %%mm3     \n\t"
-                  "pcmpeqb   %%mm6, %%mm4     \n\t"
-                  "pcmpeqb   %%mm6, %%mm5     \n\t"
-
-// preload        "movl      len, %%ecx       \n\t" // load length of line
-// preload        "movl      srcptr, %%esi    \n\t" // load source
-// preload        "movl      dstptr, %%edi    \n\t" // load dest
-
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        mainloop48end    \n\t"
-
-                "mainloop48:                  \n\t"
-                  "movq      (%%esi), %%mm7   \n\t"
-                  "pand      %%mm0, %%mm7     \n\t"
-                  "movq      %%mm0, %%mm6     \n\t"
-                  "pandn     (%%edi), %%mm6   \n\t"
-                  "por       %%mm6, %%mm7     \n\t"
-                  "movq      %%mm7, (%%edi)   \n\t"
-
-                  "movq      8(%%esi), %%mm6  \n\t"
-                  "pand      %%mm1, %%mm6     \n\t"
-                  "movq      %%mm1, %%mm7     \n\t"
-                  "pandn     8(%%edi), %%mm7  \n\t"
-                  "por       %%mm7, %%mm6     \n\t"
-                  "movq      %%mm6, 8(%%edi)  \n\t"
-
-                  "movq      16(%%esi), %%mm6 \n\t"
-                  "pand      %%mm2, %%mm6     \n\t"
-                  "movq      %%mm2, %%mm7     \n\t"
-                  "pandn     16(%%edi), %%mm7 \n\t"
-                  "por       %%mm7, %%mm6     \n\t"
-                  "movq      %%mm6, 16(%%edi) \n\t"
-
-                  "movq      24(%%esi), %%mm7 \n\t"
-                  "pand      %%mm3, %%mm7     \n\t"
-                  "movq      %%mm3, %%mm6     \n\t"
-                  "pandn     24(%%edi), %%mm6 \n\t"
-                  "por       %%mm6, %%mm7     \n\t"
-                  "movq      %%mm7, 24(%%edi) \n\t"
-
-                  "movq      32(%%esi), %%mm6 \n\t"
-                  "pand      %%mm4, %%mm6     \n\t"
-                  "movq      %%mm4, %%mm7     \n\t"
-                  "pandn     32(%%edi), %%mm7 \n\t"
-                  "por       %%mm7, %%mm6     \n\t"
-                  "movq      %%mm6, 32(%%edi) \n\t"
-
-                  "movq      40(%%esi), %%mm7 \n\t"
-                  "pand      %%mm5, %%mm7     \n\t"
-                  "movq      %%mm5, %%mm6     \n\t"
-                  "pandn     40(%%edi), %%mm6 \n\t"
-                  "por       %%mm6, %%mm7     \n\t"
-                  "movq      %%mm7, 40(%%edi) \n\t"
-
-                  "addl      $48, %%esi       \n\t" // inc by 48 bytes processed
-                  "addl      $48, %%edi       \n\t"
-                  "subl      $8, %%ecx        \n\t" // dec by 8 pixels processed
-
-                  "ja        mainloop48       \n\t"
-
-                "mainloop48end:               \n\t"
-// preload        "movl      diff, %%ecx      \n\t" // (diff is in eax)
-                  "movl      %%eax, %%ecx     \n\t"
-                  "cmpl      $0, %%ecx        \n\t"
-                  "jz        end48            \n\t"
-// preload        "movl      mask, %%edx      \n\t"
-                  "sall      $24, %%edx       \n\t" // make low byte, high byte
-
-                "secondloop48:                \n\t"
-                  "sall      %%edx            \n\t" // move high bit to CF
-                  "jnc       skip48           \n\t" // if CF = 0
-                  "movl      (%%esi), %%eax   \n\t"
-                  "movl      %%eax, (%%edi)   \n\t"
-
-                "skip48:                      \n\t"
-                  "addl      $4, %%esi        \n\t"
-                  "addl      $4, %%edi        \n\t"
-                  "decl      %%ecx            \n\t"
-                  "jnz       secondloop48     \n\t"
-
-                "end48:                       \n\t"
-                  "EMMS                       \n\t" // DONE
-
-                  : "=a" (dummy_value_a),           // output regs (dummy)
-                    "=d" (dummy_value_d),
-                    "=c" (dummy_value_c),
-                    "=S" (dummy_value_S),
-                    "=D" (dummy_value_D)
-
-                  : "3" (srcptr),      // esi       // input regs
-                    "4" (dstptr),      // edi
-                    "0" (diff),        // eax
-// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
-                    "2" (len),         // ecx
-                    "1" (mask)         // edx
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  : "%mm0", "%mm1", "%mm2", "%mm3"  // clobber list
-                  , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-               );
-            }
-            else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               register png_uint_32 i;
-               png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass];
-                 /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-               register int stride = BPP6 * png_pass_inc[png_ptr->pass];
-                 /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-               register int rep_bytes = BPP6 * png_pass_width[png_ptr->pass];
-                 /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-               png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-               int diff = (int) (png_ptr->width & 7); /* amount lost */
-               register png_uint_32 final_val = BPP6 * len;   /* GRR bugfix */
-
-               srcptr = png_ptr->row_buf + 1 + initial_val;
-               dstptr = row + initial_val;
-
-               for (i = initial_val; i < final_val; i += stride)
-               {
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-               if (diff)  /* number of leftover pixels:  3 for pngtest */
-               {
-                  final_val+=diff*BPP6;
-                  for (; i < final_val; i += stride)
-                  {
-                     if (rep_bytes > (int)(final_val-i))
-                        rep_bytes = (int)(final_val-i);
-                     png_memcpy(dstptr, srcptr, rep_bytes);
-                     srcptr += stride;
-                     dstptr += stride;
-                  }
-               }
-            } /* end of else (_mmx_supported) */
-
-            break;
-         }       /* end 48 bpp */
-
-         case 64:       /* png_ptr->row_info.pixel_depth */
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            register png_uint_32 i;
-            png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass];
-              /* png.c:  png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
-            register int stride = BPP8 * png_pass_inc[png_ptr->pass];
-              /* png.c:  png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
-            register int rep_bytes = BPP8 * png_pass_width[png_ptr->pass];
-              /* png.c:  png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
-            png_uint_32 len = png_ptr->width &~7;  /* reduce to mult. of 8 */
-            int diff = (int) (png_ptr->width & 7); /* amount lost */
-            register png_uint_32 final_val = BPP8 * len;   /* GRR bugfix */
-
-            srcptr = png_ptr->row_buf + 1 + initial_val;
-            dstptr = row + initial_val;
-
-            for (i = initial_val; i < final_val; i += stride)
-            {
-               png_memcpy(dstptr, srcptr, rep_bytes);
-               srcptr += stride;
-               dstptr += stride;
-            }
-            if (diff)  /* number of leftover pixels:  3 for pngtest */
-            {
-               final_val+=diff*BPP8;
-               for (; i < final_val; i += stride)
-               {
-                  if (rep_bytes > (int)(final_val-i))
-                     rep_bytes = (int)(final_val-i);
-                  png_memcpy(dstptr, srcptr, rep_bytes);
-                  srcptr += stride;
-                  dstptr += stride;
-               }
-            }
-
-            break;
-         }       /* end 64 bpp */
-
-         default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */
-         {
-            /* this should never happen */
-            png_warning(png_ptr, "Invalid row_info.pixel_depth in pnggccrd");
-            break;
-         }
-      } /* end switch (png_ptr->row_info.pixel_depth) */
-
-   } /* end if (non-trivial mask) */
-
-} /* end png_combine_row() */
-
-#endif /* PNG_HAVE_ASSEMBLER_COMBINE_ROW */
-
-
-
-
-/*===========================================================================*/
-/*                                                                           */
-/*                 P N G _ D O _ R E A D _ I N T E R L A C E                 */
-/*                                                                           */
-/*===========================================================================*/
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-#if defined(PNG_HAVE_ASSEMBLER_READ_INTERLACE)
-
-/* png_do_read_interlace() is called after any 16-bit to 8-bit conversion
- * has taken place.  [GRR: what other steps come before and/or after?]
- */
-
-void /* PRIVATE */
-png_do_read_interlace(png_structp png_ptr)
-{
-   png_row_infop row_info = &(png_ptr->row_info);
-   png_bytep row = png_ptr->row_buf + 1;
-   int pass = png_ptr->pass;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-   png_uint_32 transformations = png_ptr->transformations;
-#endif
-
-   png_debug(1, "in png_do_read_interlace (pnggccrd.c)\n");
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-   if (_mmx_supported == 2) {
-#if !defined(PNG_1_0_X)
-       /* this should have happened in png_init_mmx_flags() already */
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-#endif
-
-   if (row != NULL && row_info != NULL)
-   {
-      png_uint_32 final_width;
-
-      final_width = row_info->width * png_pass_inc[pass];
-
-      switch (row_info->pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_byte v;
-            png_uint_32 i;
-            int j;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 3);
-            dp = row + (png_size_t)((final_width - 1) >> 3);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (int)((row_info->width + 7) & 7);
-               dshift = (int)((final_width + 7) & 7);
-               s_start = 7;
-               s_end = 0;
-               s_inc = -1;
-            }
-            else
-#endif
-            {
-               sshift = 7 - (int)((row_info->width + 7) & 7);
-               dshift = 7 - (int)((final_width + 7) & 7);
-               s_start = 0;
-               s_end = 7;
-               s_inc = 1;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               v = (png_byte)((*sp >> sshift) & 0x1);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-         case 2:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_uint_32 i;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 2);
-            dp = row + (png_size_t)((final_width - 1) >> 2);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (png_size_t)(((row_info->width + 3) & 3) << 1);
-               dshift = (png_size_t)(((final_width + 3) & 3) << 1);
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-            else
-#endif
-            {
-               sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1);
-               dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1);
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               png_byte v;
-               int j;
-
-               v = (png_byte)((*sp >> sshift) & 0x3);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-         case 4:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_uint_32 i;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 1);
-            dp = row + (png_size_t)((final_width - 1) >> 1);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (png_size_t)(((row_info->width + 1) & 1) << 2);
-               dshift = (png_size_t)(((final_width + 1) & 1) << 2);
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            else
-#endif
-            {
-               sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2);
-               dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2);
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               png_byte v;
-               int j;
-
-               v = (png_byte)((*sp >> sshift) & 0xf);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-       /*====================================================================*/
-
-         default: /* 8-bit or larger (this is where the routine is modified) */
-         {
-#if 0
-//          static unsigned long long _const4 = 0x0000000000FFFFFFLL;  no good
-//          static unsigned long long const4 = 0x0000000000FFFFFFLL;   no good
-//          unsigned long long _const4 = 0x0000000000FFFFFFLL;         no good
-//          unsigned long long const4 = 0x0000000000FFFFFFLL;          no good
-#endif
-            png_bytep sptr, dp;
-            png_uint_32 i;
-            png_size_t pixel_bytes;
-            int width = (int)row_info->width;
-
-            pixel_bytes = (row_info->pixel_depth >> 3);
-
-            /* point sptr at the last pixel in the pre-expanded row: */
-            sptr = row + (width - 1) * pixel_bytes;
-
-            /* point dp at the last pixel position in the expanded row: */
-            dp = row + (final_width - 1) * pixel_bytes;
-
-            /* New code by Nirav Chhatrapati - Intel Corporation */
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
-                /* && _mmx_supported */ )
-#else
-            if (_mmx_supported)
-#endif
-            {
-               //--------------------------------------------------------------
-               if (pixel_bytes == 3)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int dummy_value_c;   // fix 'forbidden register spilled'
-                     int dummy_value_S;
-                     int dummy_value_D;
-
-                     __asm__ __volatile__ (
-                        "subl $21, %%edi         \n\t"
-                                     // (png_pass_inc[pass] - 1)*pixel_bytes
-
-                     ".loop3_pass0:              \n\t"
-                        "movd (%%esi), %%mm0     \n\t" // x x x x x 2 1 0
-                        "pand _const4, %%mm0     \n\t" // z z z z z 2 1 0
-                        "movq %%mm0, %%mm1       \n\t" // z z z z z 2 1 0
-                        "psllq $16, %%mm0        \n\t" // z z z 2 1 0 z z
-                        "movq %%mm0, %%mm2       \n\t" // z z z 2 1 0 z z
-                        "psllq $24, %%mm0        \n\t" // 2 1 0 z z z z z
-                        "psrlq $8, %%mm1         \n\t" // z z z z z z 2 1
-                        "por %%mm2, %%mm0        \n\t" // 2 1 0 2 1 0 z z
-                        "por %%mm1, %%mm0        \n\t" // 2 1 0 2 1 0 2 1
-                        "movq %%mm0, %%mm3       \n\t" // 2 1 0 2 1 0 2 1
-                        "psllq $16, %%mm0        \n\t" // 0 2 1 0 2 1 z z
-                        "movq %%mm3, %%mm4       \n\t" // 2 1 0 2 1 0 2 1
-                        "punpckhdq %%mm0, %%mm3  \n\t" // 0 2 1 0 2 1 0 2
-                        "movq %%mm4, 16(%%edi)   \n\t"
-                        "psrlq $32, %%mm0        \n\t" // z z z z 0 2 1 0
-                        "movq %%mm3, 8(%%edi)    \n\t"
-                        "punpckldq %%mm4, %%mm0  \n\t" // 1 0 2 1 0 2 1 0
-                        "subl $3, %%esi          \n\t"
-                        "movq %%mm0, (%%edi)     \n\t"
-                        "subl $24, %%edi         \n\t"
-                        "decl %%ecx              \n\t"
-                        "jnz .loop3_pass0        \n\t"
-                        "EMMS                    \n\t" // DONE
-
-                        : "=c" (dummy_value_c),        // output regs (dummy)
-                          "=S" (dummy_value_S),
-                          "=D" (dummy_value_D)
-
-                        : "1" (sptr),      // esi      // input regs
-                          "2" (dp),        // edi
-                          "0" (width),     // ecx
-                          "rim" (_const4)  // %1(?)  (0x0000000000FFFFFFLL)
-
-#if 0  /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                        : "%mm0", "%mm1", "%mm2"       // clobber list
-                        , "%mm3", "%mm4"
-#endif
-                     );
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int dummy_value_c;   // fix 'forbidden register spilled'
-                     int dummy_value_S;
-                     int dummy_value_D;
-
-                     __asm__ __volatile__ (
-                        "subl $9, %%edi          \n\t"
-                                     // (png_pass_inc[pass] - 1)*pixel_bytes
-
-                     ".loop3_pass2:              \n\t"
-                        "movd (%%esi), %%mm0     \n\t" // x x x x x 2 1 0
-                        "pand _const4, %%mm0     \n\t" // z z z z z 2 1 0
-                        "movq %%mm0, %%mm1       \n\t" // z z z z z 2 1 0
-                        "psllq $16, %%mm0        \n\t" // z z z 2 1 0 z z
-                        "movq %%mm0, %%mm2       \n\t" // z z z 2 1 0 z z
-                        "psllq $24, %%mm0        \n\t" // 2 1 0 z z z z z
-                        "psrlq $8, %%mm1         \n\t" // z z z z z z 2 1
-                        "por %%mm2, %%mm0        \n\t" // 2 1 0 2 1 0 z z
-                        "por %%mm1, %%mm0        \n\t" // 2 1 0 2 1 0 2 1
-                        "movq %%mm0, 4(%%edi)    \n\t"
-                        "psrlq $16, %%mm0        \n\t" // z z 2 1 0 2 1 0
-                        "subl $3, %%esi          \n\t"
-                        "movd %%mm0, (%%edi)     \n\t"
-                        "subl $12, %%edi         \n\t"
-                        "decl %%ecx              \n\t"
-                        "jnz .loop3_pass2        \n\t"
-                        "EMMS                    \n\t" // DONE
-
-                        : "=c" (dummy_value_c),        // output regs (dummy)
-                          "=S" (dummy_value_S),
-                          "=D" (dummy_value_D)
-
-                        : "1" (sptr),      // esi      // input regs
-                          "2" (dp),        // edi
-                          "0" (width),     // ecx
-                          "rim" (_const4)  // (0x0000000000FFFFFFLL)
-
-#if 0  /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                        : "%mm0", "%mm1", "%mm2"       // clobber list
-#endif
-                     );
-                  }
-                  else if (width) /* && ((pass == 4) || (pass == 5)) */
-                  {
-                     int width_mmx = ((width >> 1) << 1) - 8;   // GRR:  huh?
-                     if (width_mmx < 0)
-                         width_mmx = 0;
-                     width -= width_mmx;        // 8 or 9 pix, 24 or 27 bytes
-                     if (width_mmx)
-                     {
-                        // png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-                        // sptr points at last pixel in pre-expanded row
-                        // dp points at last pixel position in expanded row
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $3, %%esi          \n\t"
-                           "subl $9, %%edi          \n\t"
-                                        // (png_pass_inc[pass] + 1)*pixel_bytes
-
-                        ".loop3_pass4:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // x x 5 4 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // x x 5 4 3 2 1 0
-                           "movq %%mm0, %%mm2       \n\t" // x x 5 4 3 2 1 0
-                           "psllq $24, %%mm0        \n\t" // 4 3 2 1 0 z z z
-                           "pand _const4, %%mm1     \n\t" // z z z z z 2 1 0
-                           "psrlq $24, %%mm2        \n\t" // z z z x x 5 4 3
-                           "por %%mm1, %%mm0        \n\t" // 4 3 2 1 0 2 1 0
-                           "movq %%mm2, %%mm3       \n\t" // z z z x x 5 4 3
-                           "psllq $8, %%mm2         \n\t" // z z x x 5 4 3 z
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "psrlq $16, %%mm3        \n\t" // z z z z z x x 5
-                           "pand _const6, %%mm3     \n\t" // z z z z z z z 5
-                           "por %%mm3, %%mm2        \n\t" // z z x x 5 4 3 5
-                           "subl $6, %%esi          \n\t"
-                           "movd %%mm2, 8(%%edi)    \n\t"
-                           "subl $12, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop3_pass4        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx), // ecx
-                             "rim" (_const4), // 0x0000000000FFFFFFLL
-                             "rim" (_const6)  // 0x00000000000000FFLL
-
-#if 0  /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-                           , "%mm2", "%mm3"
-#endif
-                        );
-                     }
-
-                     sptr -= width_mmx*3;
-                     dp -= width_mmx*6;
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-
-                        png_memcpy(v, sptr, 3);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           png_memcpy(dp, v, 3);
-                           dp -= 3;
-                        }
-                        sptr -= 3;
-                     }
-                  }
-               } /* end of pixel_bytes == 3 */
-
-               //--------------------------------------------------------------
-               else if (pixel_bytes == 1)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 2) << 2);
-                     width -= width_mmx;        // 0-3 pixels => 0-3 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $3, %%esi          \n\t"
-                           "subl $31, %%edi         \n\t"
-
-                        ".loop1_pass0:              \n\t"
-                           "movd (%%esi), %%mm0     \n\t" // x x x x 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // x x x x 3 2 1 0
-                           "punpcklbw %%mm0, %%mm0  \n\t" // 3 3 2 2 1 1 0 0
-                           "movq %%mm0, %%mm2       \n\t" // 3 3 2 2 1 1 0 0
-                           "punpcklwd %%mm0, %%mm0  \n\t" // 1 1 1 1 0 0 0 0
-                           "movq %%mm0, %%mm3       \n\t" // 1 1 1 1 0 0 0 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 0 0 0 0 0 0 0 0
-                           "punpckhdq %%mm3, %%mm3  \n\t" // 1 1 1 1 1 1 1 1
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "punpckhwd %%mm2, %%mm2  \n\t" // 3 3 3 3 2 2 2 2
-                           "movq %%mm3, 8(%%edi)    \n\t"
-                           "movq %%mm2, %%mm4       \n\t" // 3 3 3 3 2 2 2 2
-                           "punpckldq %%mm2, %%mm2  \n\t" // 2 2 2 2 2 2 2 2
-                           "punpckhdq %%mm4, %%mm4  \n\t" // 3 3 3 3 3 3 3 3
-                           "movq %%mm2, 16(%%edi)   \n\t"
-                           "subl $4, %%esi          \n\t"
-                           "movq %%mm4, 24(%%edi)   \n\t"
-                           "subl $32, %%edi         \n\t"
-                           "subl $4, %%ecx          \n\t"
-                           "jnz .loop1_pass0        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1", "%mm2"       // clobber list
-                           , "%mm3", "%mm4"
-#endif
-                        );
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*8;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                       /* I simplified this part in version 1.0.4e
-                        * here and in several other instances where
-                        * pixel_bytes == 1  -- GR-P
-                        *
-                        * Original code:
-                        *
-                        * png_byte v[8];
-                        * png_memcpy(v, sptr, pixel_bytes);
-                        * for (j = 0; j < png_pass_inc[pass]; j++)
-                        * {
-                        *    png_memcpy(dp, v, pixel_bytes);
-                        *    dp -= pixel_bytes;
-                        * }
-                        * sptr -= pixel_bytes;
-                        *
-                        * Replacement code is in the next three lines:
-                        */
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           *dp-- = *sptr;
-                        }
-                        --sptr;
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 2) << 2);
-                     width -= width_mmx;        // 0-3 pixels => 0-3 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $3, %%esi          \n\t"
-                           "subl $15, %%edi         \n\t"
-
-                        ".loop1_pass2:              \n\t"
-                           "movd (%%esi), %%mm0     \n\t" // x x x x 3 2 1 0
-                           "punpcklbw %%mm0, %%mm0  \n\t" // 3 3 2 2 1 1 0 0
-                           "movq %%mm0, %%mm1       \n\t" // 3 3 2 2 1 1 0 0
-                           "punpcklwd %%mm0, %%mm0  \n\t" // 1 1 1 1 0 0 0 0
-                           "punpckhwd %%mm1, %%mm1  \n\t" // 3 3 3 3 2 2 2 2
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $4, %%esi          \n\t"
-                           "movq %%mm1, 8(%%edi)    \n\t"
-                           "subl $16, %%edi         \n\t"
-                           "subl $4, %%ecx          \n\t"
-                           "jnz .loop1_pass2        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*4;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           *dp-- = *sptr;
-                        }
-                        --sptr;
-                     }
-                  }
-                  else if (width)  /* && ((pass == 4) || (pass == 5)) */
-                  {
-                     int width_mmx = ((width >> 3) << 3);
-                     width -= width_mmx;        // 0-3 pixels => 0-3 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $7, %%esi          \n\t"
-                           "subl $15, %%edi         \n\t"
-
-                        ".loop1_pass4:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 7 6 5 4 3 2 1 0
-                           "punpcklbw %%mm0, %%mm0  \n\t" // 3 3 2 2 1 1 0 0
-                           "punpckhbw %%mm1, %%mm1  \n\t" // 7 7 6 6 5 5 4 4
-                           "movq %%mm1, 8(%%edi)    \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $16, %%edi         \n\t"
-                           "subl $8, %%ecx          \n\t"
-                           "jnz .loop1_pass4        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (none)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*2;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           *dp-- = *sptr;
-                        }
-                        --sptr;
-                     }
-                  }
-               } /* end of pixel_bytes == 1 */
-
-               //--------------------------------------------------------------
-               else if (pixel_bytes == 2)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1);
-                     width -= width_mmx;        // 0,1 pixels => 0,2 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $2, %%esi          \n\t"
-                           "subl $30, %%edi         \n\t"
-
-                        ".loop2_pass0:              \n\t"
-                           "movd (%%esi), %%mm0     \n\t" // x x x x 3 2 1 0
-                           "punpcklwd %%mm0, %%mm0  \n\t" // 3 2 3 2 1 0 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 3 2 3 2 1 0 1 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 1 0 1 0 1 0 1 0
-                           "punpckhdq %%mm1, %%mm1  \n\t" // 3 2 3 2 3 2 3 2
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "movq %%mm0, 8(%%edi)    \n\t"
-                           "movq %%mm1, 16(%%edi)   \n\t"
-                           "subl $4, %%esi          \n\t"
-                           "movq %%mm1, 24(%%edi)   \n\t"
-                           "subl $32, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop2_pass0        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*2 - 2); // sign fixed
-                     dp -= (width_mmx*16 - 2);  // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;        // 0,1 pixels => 0,2 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $2, %%esi          \n\t"
-                           "subl $14, %%edi         \n\t"
-
-                        ".loop2_pass2:              \n\t"
-                           "movd (%%esi), %%mm0     \n\t" // x x x x 3 2 1 0
-                           "punpcklwd %%mm0, %%mm0  \n\t" // 3 2 3 2 1 0 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 3 2 3 2 1 0 1 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 1 0 1 0 1 0 1 0
-                           "punpckhdq %%mm1, %%mm1  \n\t" // 3 2 3 2 3 2 3 2
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $4, %%esi          \n\t"
-                           "movq %%mm1, 8(%%edi)    \n\t"
-                           "subl $16, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop2_pass2        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*2 - 2); // sign fixed
-                     dp -= (width_mmx*8 - 2);   // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-                  else if (width)  // pass == 4 or 5
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;        // 0,1 pixels => 0,2 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $2, %%esi          \n\t"
-                           "subl $6, %%edi          \n\t"
-
-                        ".loop2_pass4:              \n\t"
-                           "movd (%%esi), %%mm0     \n\t" // x x x x 3 2 1 0
-                           "punpcklwd %%mm0, %%mm0  \n\t" // 3 2 3 2 1 0 1 0
-                           "subl $4, %%esi          \n\t"
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $8, %%edi          \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop2_pass4        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0"                       // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*2 - 2); // sign fixed
-                     dp -= (width_mmx*4 - 2);   // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-               } /* end of pixel_bytes == 2 */
-
-               //--------------------------------------------------------------
-               else if (pixel_bytes == 4)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1);
-                     width -= width_mmx;        // 0,1 pixels => 0,4 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $4, %%esi          \n\t"
-                           "subl $60, %%edi         \n\t"
-
-                        ".loop4_pass0:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 7 6 5 4 3 2 1 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 3 2 1 0 3 2 1 0
-                           "punpckhdq %%mm1, %%mm1  \n\t" // 7 6 5 4 7 6 5 4
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "movq %%mm0, 8(%%edi)    \n\t"
-                           "movq %%mm0, 16(%%edi)   \n\t"
-                           "movq %%mm0, 24(%%edi)   \n\t"
-                           "movq %%mm1, 32(%%edi)   \n\t"
-                           "movq %%mm1, 40(%%edi)   \n\t"
-                           "movq %%mm1, 48(%%edi)   \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "movq %%mm1, 56(%%edi)   \n\t"
-                           "subl $64, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop4_pass0        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*4 - 4); // sign fixed
-                     dp -= (width_mmx*32 - 4);  // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1);
-                     width -= width_mmx;        // 0,1 pixels => 0,4 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $4, %%esi          \n\t"
-                           "subl $28, %%edi         \n\t"
-
-                        ".loop4_pass2:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 7 6 5 4 3 2 1 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 3 2 1 0 3 2 1 0
-                           "punpckhdq %%mm1, %%mm1  \n\t" // 7 6 5 4 7 6 5 4
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "movq %%mm0, 8(%%edi)    \n\t"
-                           "movq %%mm1, 16(%%edi)   \n\t"
-                           "movq %%mm1, 24(%%edi)   \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "subl $32, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop4_pass2        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*4 - 4); // sign fixed
-                     dp -= (width_mmx*16 - 4);  // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-                  else if (width)  // pass == 4 or 5
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;        // 0,1 pixels => 0,4 bytes
-                     if (width_mmx)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $4, %%esi          \n\t"
-                           "subl $12, %%edi         \n\t"
-
-                        ".loop4_pass4:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, %%mm1       \n\t" // 7 6 5 4 3 2 1 0
-                           "punpckldq %%mm0, %%mm0  \n\t" // 3 2 1 0 3 2 1 0
-                           "punpckhdq %%mm1, %%mm1  \n\t" // 7 6 5 4 7 6 5 4
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "movq %%mm1, 8(%%edi)    \n\t"
-                           "subl $16, %%edi         \n\t"
-                           "subl $2, %%ecx          \n\t"
-                           "jnz .loop4_pass4        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width_mmx)  // ecx
-
-#if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0", "%mm1"               // clobber list
-#endif
-                        );
-                     }
-
-                     sptr -= (width_mmx*4 - 4); // sign fixed
-                     dp -= (width_mmx*8 - 4);   // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-               } /* end of pixel_bytes == 4 */
-
-               //--------------------------------------------------------------
-               else if (pixel_bytes == 8)
-               {
-// GRR TEST:  should work, but needs testing (special 64-bit version of rpng2?)
-                  // GRR NOTE:  no need to combine passes here!
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int dummy_value_c;  // fix 'forbidden register spilled'
-                     int dummy_value_S;
-                     int dummy_value_D;
-
-                     // source is 8-byte RRGGBBAA
-                     // dest is 64-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA ...
-                     __asm__ __volatile__ (
-                        "subl $56, %%edi         \n\t" // start of last block
-
-                     ".loop8_pass0:              \n\t"
-                        "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                        "movq %%mm0, (%%edi)     \n\t"
-                        "movq %%mm0, 8(%%edi)    \n\t"
-                        "movq %%mm0, 16(%%edi)   \n\t"
-                        "movq %%mm0, 24(%%edi)   \n\t"
-                        "movq %%mm0, 32(%%edi)   \n\t"
-                        "movq %%mm0, 40(%%edi)   \n\t"
-                        "movq %%mm0, 48(%%edi)   \n\t"
-                        "subl $8, %%esi          \n\t"
-                        "movq %%mm0, 56(%%edi)   \n\t"
-                        "subl $64, %%edi         \n\t"
-                        "decl %%ecx              \n\t"
-                        "jnz .loop8_pass0        \n\t"
-                        "EMMS                    \n\t" // DONE
-
-                        : "=c" (dummy_value_c),        // output regs (dummy)
-                          "=S" (dummy_value_S),
-                          "=D" (dummy_value_D)
-
-                        : "1" (sptr),      // esi      // input regs
-                          "2" (dp),        // edi
-                          "0" (width)      // ecx
-
-#if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                        : "%mm0"                       // clobber list
-#endif
-                     );
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     // source is 8-byte RRGGBBAA
-                     // dest is 32-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA
-                     // (recall that expansion is _in place_:  sptr and dp
-                     //  both point at locations within same row buffer)
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $24, %%edi         \n\t" // start of last block
-
-                        ".loop8_pass2:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "movq %%mm0, 8(%%edi)    \n\t"
-                           "movq %%mm0, 16(%%edi)   \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "movq %%mm0, 24(%%edi)   \n\t"
-                           "subl $32, %%edi         \n\t"
-                           "decl %%ecx              \n\t"
-                           "jnz .loop8_pass2        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width)      // ecx
-
-#if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0"                       // clobber list
-#endif
-                        );
-                     }
-                  }
-                  else if (width)  // pass == 4 or 5
-                  {
-                     // source is 8-byte RRGGBBAA
-                     // dest is 16-byte RRGGBBAA RRGGBBAA
-                     {
-                        int dummy_value_c;  // fix 'forbidden register spilled'
-                        int dummy_value_S;
-                        int dummy_value_D;
-
-                        __asm__ __volatile__ (
-                           "subl $8, %%edi          \n\t" // start of last block
-
-                        ".loop8_pass4:              \n\t"
-                           "movq (%%esi), %%mm0     \n\t" // 7 6 5 4 3 2 1 0
-                           "movq %%mm0, (%%edi)     \n\t"
-                           "subl $8, %%esi          \n\t"
-                           "movq %%mm0, 8(%%edi)    \n\t"
-                           "subl $16, %%edi         \n\t"
-                           "decl %%ecx              \n\t"
-                           "jnz .loop8_pass4        \n\t"
-                           "EMMS                    \n\t" // DONE
-
-                           : "=c" (dummy_value_c),        // output regs (dummy)
-                             "=S" (dummy_value_S),
-                             "=D" (dummy_value_D)
-
-                           : "1" (sptr),      // esi      // input regs
-                             "2" (dp),        // edi
-                             "0" (width)      // ecx
-
-#if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           : "%mm0"                       // clobber list
-#endif
-                        );
-                     }
-                  }
-
-               } /* end of pixel_bytes == 8 */
-
-               //--------------------------------------------------------------
-               else if (pixel_bytes == 6)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 6);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 6);
-                        dp -= 6;
-                     }
-                     sptr -= 6;
-                  }
-               } /* end of pixel_bytes == 6 */
-
-               //--------------------------------------------------------------
-               else
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr-= pixel_bytes;
-                  }
-               }
-            } // end of _mmx_supported ========================================
-
-            else /* MMX not supported:  use modified C code - takes advantage
-                  *   of inlining of png_memcpy for a constant */
-                 /* GRR 19991007:  does it?  or should pixel_bytes in each
-                  *   block be replaced with immediate value (e.g., 1)? */
-                 /* GRR 19991017:  replaced with constants in each case */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-            {
-               if (pixel_bytes == 1)
-               {
-                  for (i = width; i; i--)
-                  {
-                     int j;
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        *dp-- = *sptr;
-                     }
-                     --sptr;
-                  }
-               }
-               else if (pixel_bytes == 3)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 3);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 3);
-                        dp -= 3;
-                     }
-                     sptr -= 3;
-                  }
-               }
-               else if (pixel_bytes == 2)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 2);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 2);
-                        dp -= 2;
-                     }
-                     sptr -= 2;
-                  }
-               }
-               else if (pixel_bytes == 4)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 4);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-#ifdef PNG_DEBUG
-                        if (dp < row || dp+3 > row+png_ptr->row_buf_size)
-                        {
-                           printf("dp out of bounds: row=%d, dp=%d, rp=%d\n",
-                             row, dp, row+png_ptr->row_buf_size);
-                           printf("row_buf=%d\n",png_ptr->row_buf_size);
-                        }
-#endif
-                        png_memcpy(dp, v, 4);
-                        dp -= 4;
-                     }
-                     sptr -= 4;
-                  }
-               }
-               else if (pixel_bytes == 6)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 6);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 6);
-                        dp -= 6;
-                     }
-                     sptr -= 6;
-                  }
-               }
-               else if (pixel_bytes == 8)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 8);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 8);
-                        dp -= 8;
-                     }
-                     sptr -= 8;
-                  }
-               }
-               else     /* GRR:  should never be reached */
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-
-            } /* end if (MMX not supported) */
-            break;
-         }
-      } /* end switch (row_info->pixel_depth) */
-
-      row_info->width = final_width;
-
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,final_width);
-   }
-
-} /* end png_do_read_interlace() */
-
-#endif /* PNG_HAVE_ASSEMBLER_READ_INTERLACE */
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
-
-
-
-#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW)
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-
-// These variables are utilized in the functions below.  They are declared
-// globally here to ensure alignment on 8-byte boundaries.
-
-union uAll {
-   long long use;
-   double  align;
-} _LBCarryMask = {0x0101010101010101LL},
-  _HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
-  _ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
-
-#ifdef PNG_THREAD_UNSAFE_OK
-//===========================================================================//
-//                                                                           //
-//           P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G           //
-//                                                                           //
-//===========================================================================//
-
-// Optimized code for PNG Average filter decoder
-
-static void /* PRIVATE */
-png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
-                            png_bytep prev_row)
-{
-   int bpp;
-   int dummy_value_c;   // fix 'forbidden register 2 (cx) was spilled' error
-   int dummy_value_S;
-   int dummy_value_D;
-
-   bpp = (row_info->pixel_depth + 7) >> 3;  // get # bytes per pixel
-   _FullLength  = row_info->rowbytes;       // # of bytes to filter
-
-   __asm__ __volatile__ (
-      // initialize address pointers and offset
-#ifdef __PIC__
-      "pushl %%ebx                 \n\t" // save index to Global Offset Table
-#endif
-//pre "movl row, %%edi             \n\t" // edi:  Avg(x)
-      "xorl %%ebx, %%ebx           \n\t" // ebx:  x
-      "movl %%edi, %%edx           \n\t"
-//pre "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-//pre "subl bpp, %%edx             \n\t" // (bpp is preloaded into ecx)
-      "subl %%ecx, %%edx           \n\t" // edx:  Raw(x-bpp)
-
-      "xorl %%eax,%%eax            \n\t"
-
-      // Compute the Raw value for the first bpp bytes
-      //    Raw(x) = Avg(x) + (Prior(x)/2)
-   "avg_rlp:                       \n\t"
-      "movb (%%esi,%%ebx,),%%al    \n\t" // load al with Prior(x)
-      "incl %%ebx                  \n\t"
-      "shrb %%al                   \n\t" // divide by 2
-      "addb -1(%%edi,%%ebx,),%%al  \n\t" // add Avg(x); -1 to offset inc ebx
-//pre "cmpl bpp, %%ebx             \n\t" // (bpp is preloaded into ecx)
-      "cmpl %%ecx, %%ebx           \n\t"
-      "movb %%al,-1(%%edi,%%ebx,)  \n\t" // write Raw(x); -1 to offset inc ebx
-      "jb avg_rlp                  \n\t" // mov does not affect flags
-
-      // get # of bytes to alignment
-      "movl %%edi, _dif            \n\t" // take start of row
-      "addl %%ebx, _dif            \n\t" // add bpp
-      "addl $0xf, _dif             \n\t" // add 7+8 to incr past alignment bdry
-      "andl $0xfffffff8, _dif      \n\t" // mask to alignment boundary
-      "subl %%edi, _dif            \n\t" // subtract from start => value ebx at
-      "jz avg_go                   \n\t" //  alignment
-
-      // fix alignment
-      // Compute the Raw value for the bytes up to the alignment boundary
-      //    Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-      "xorl %%ecx, %%ecx           \n\t"
-
-   "avg_lp1:                       \n\t"
-      "xorl %%eax, %%eax           \n\t"
-      "movb (%%esi,%%ebx,), %%cl   \n\t" // load cl with Prior(x)
-      "movb (%%edx,%%ebx,), %%al   \n\t" // load al with Raw(x-bpp)
-      "addw %%cx, %%ax             \n\t"
-      "incl %%ebx                  \n\t"
-      "shrw %%ax                   \n\t" // divide by 2
-      "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx
-      "cmpl _dif, %%ebx            \n\t" // check if at alignment boundary
-      "movb %%al, -1(%%edi,%%ebx,) \n\t" // write Raw(x); -1 to offset inc ebx
-      "jb avg_lp1                  \n\t" // repeat until at alignment boundary
-
-   "avg_go:                        \n\t"
-      "movl _FullLength, %%eax     \n\t"
-      "movl %%eax, %%ecx           \n\t"
-      "subl %%ebx, %%eax           \n\t" // subtract alignment fix
-      "andl $0x00000007, %%eax     \n\t" // calc bytes over mult of 8
-      "subl %%eax, %%ecx           \n\t" // drop over bytes from original length
-      "movl %%ecx, _MMXLength      \n\t"
-#ifdef __PIC__
-      "popl %%ebx                  \n\t" // restore index to Global Offset Table
-#endif
-
-      : "=c" (dummy_value_c),            // output regs (dummy)
-        "=S" (dummy_value_S),
-        "=D" (dummy_value_D)
-
-      : "0" (bpp),       // ecx          // input regs
-        "1" (prev_row),  // esi
-        "2" (row)        // edi
-
-      : "%eax", "%edx"                   // clobber list
-#ifndef __PIC__
-      , "%ebx"
-#endif
-      // GRR: INCLUDE "memory" as clobbered? (_dif, _MMXLength)
-      // (seems to work fine without...)
-   );
-
-   // now do the math for the rest of the row
-   switch (bpp)
-   {
-      case 3:
-      {
-         _ActiveMask.use  = 0x0000000000ffffffLL;
-         _ShiftBpp.use = 24;    // == 3 * 8
-         _ShiftRem.use = 40;    // == 64 - 24
-
-         __asm__ __volatile__ (
-            // re-init address pointers and offset
-            "movq _ActiveMask, %%mm7      \n\t"
-            "movl _dif, %%ecx             \n\t" // ecx:  x = offset to
-            "movq _LBCarryMask, %%mm5     \n\t" //  alignment boundary
-// preload  "movl row, %%edi              \n\t" // edi:  Avg(x)
-            "movq _HBClearMask, %%mm4     \n\t"
-// preload  "movl prev_row, %%esi         \n\t" // esi:  Prior(x)
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes
-                                                // (correct pos. in loop below)
-         "avg_3lp:                        \n\t"
-            "movq (%%edi,%%ecx,), %%mm0   \n\t" // load mm0 with Avg(x)
-            "movq %%mm5, %%mm3            \n\t"
-            "psrlq _ShiftRem, %%mm2       \n\t" // correct position Raw(x-bpp)
-                                                // data
-            "movq (%%esi,%%ecx,), %%mm1   \n\t" // load mm1 with Prior(x)
-            "movq %%mm7, %%mm6            \n\t"
-            "pand %%mm1, %%mm3            \n\t" // get lsb for each prev_row byte
-            "psrlq $1, %%mm1              \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1           \n\t" // clear invalid bit 7 of each
-                                                // byte
-            "paddb %%mm1, %%mm0           \n\t" // add (Prev_row/2) to Avg for
-                                                // each byte
-            // add 1st active group (Raw(x-bpp)/2) to average with LBCarry
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
-                                                // LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
-                                                // where both
-                               // lsb's were == 1 (only valid for active group)
-            "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
-                                                // byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                                // for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 1
-                                                // bytes to add to Avg
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
-                                                // Avg for each Active
-                               //  byte
-            // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6       \n\t" // shift the mm6 mask to cover
-                                                // bytes 3-5
-            "movq %%mm0, %%mm2            \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2       \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
-                                                // LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
-                                                // where both
-                               // lsb's were == 1 (only valid for active group)
-            "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
-                                                // byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                                // for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2
-                                                // bytes to add to Avg
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
-                                                // Avg for each Active
-                               //  byte
-
-            // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6       \n\t" // shift mm6 mask to cover last
-                                                // two
-                                 // bytes
-            "movq %%mm0, %%mm2            \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2       \n\t" // shift data to pos. correctly
-                              // Data only needs to be shifted once here to
-                              // get the correct x-bpp offset.
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
-                                                // LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
-                                                // where both
-                              // lsb's were == 1 (only valid for active group)
-            "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
-                                                // byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                                // for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2
-                                                // bytes to add to Avg
-            "addl $8, %%ecx               \n\t"
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
-                                                // Avg for each Active
-                                                // byte
-            // now ready to write back to memory
-            "movq %%mm0, -8(%%edi,%%ecx,) \n\t"
-            // move updated Raw(x) to use as Raw(x-bpp) for next loop
-            "cmpl _MMXLength, %%ecx       \n\t"
-            "movq %%mm0, %%mm2            \n\t" // mov updated Raw(x) to mm2
-            "jb avg_3lp                   \n\t"
-
-            : "=S" (dummy_value_S),             // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi           // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                            // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 3 bpp
-
-      case 6:
-      case 4:
-      //case 7:   // who wrote this?  PNG doesn't support 5 or 7 bytes/pixel
-      //case 5:   // GRR BOGUS
-      {
-         _ActiveMask.use  = 0xffffffffffffffffLL; // use shift below to clear
-                                                  // appropriate inactive bytes
-         _ShiftBpp.use = bpp << 3;
-         _ShiftRem.use = 64 - _ShiftBpp.use;
-
-         __asm__ __volatile__ (
-            "movq _HBClearMask, %%mm4    \n\t"
-
-            // re-init address pointers and offset
-            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to
-                                               // alignment boundary
-
-            // load _ActiveMask and clear all bytes except for 1st active group
-            "movq _ActiveMask, %%mm7     \n\t"
-// preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
-            "psrlq _ShiftRem, %%mm7      \n\t"
-// preload  "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-            "movq %%mm7, %%mm6           \n\t"
-            "movq _LBCarryMask, %%mm5    \n\t"
-            "psllq _ShiftBpp, %%mm6      \n\t" // create mask for 2nd active
-                                               // group
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes
-                                          // (we correct pos. in loop below)
-         "avg_4lp:                       \n\t"
-            "movq (%%edi,%%ecx,), %%mm0  \n\t"
-            "psrlq _ShiftRem, %%mm2      \n\t" // shift data to pos. correctly
-            "movq (%%esi,%%ecx,), %%mm1  \n\t"
-            // add (Prev_row/2) to average
-            "movq %%mm5, %%mm3           \n\t"
-            "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
-            "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
-                                               // each byte
-            // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both
-                              // lsb's were == 1 (only valid for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm7, %%mm2           \n\t" // leave only Active Group 1
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg
-                                               // for each Active
-                              // byte
-            // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "addl $8, %%ecx              \n\t"
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both
-                              // lsb's were == 1 (only valid for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
-                                               // Avg for each Active
-                              // byte
-            "cmpl _MMXLength, %%ecx      \n\t"
-            // now ready to write back to memory
-            "movq %%mm0, -8(%%edi,%%ecx,) \n\t"
-            // prep Raw(x-bpp) for next loop
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "jb avg_4lp                  \n\t"
-
-            : "=S" (dummy_value_S),            // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi          // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                           // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 4,6 bpp
-
-      case 2:
-      {
-         _ActiveMask.use  = 0x000000000000ffffLL;
-         _ShiftBpp.use = 16;   // == 2 * 8
-         _ShiftRem.use = 48;   // == 64 - 16
-
-         __asm__ __volatile__ (
-            // load _ActiveMask
-            "movq _ActiveMask, %%mm7     \n\t"
-            // re-init address pointers and offset
-            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to alignment
-                                               // boundary
-            "movq _LBCarryMask, %%mm5    \n\t"
-// preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
-            "movq _HBClearMask, %%mm4    \n\t"
-// preload  "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes
-                              // (we correct pos. in loop below)
-         "avg_2lp:                       \n\t"
-            "movq (%%edi,%%ecx,), %%mm0  \n\t"
-            "psrlq _ShiftRem, %%mm2      \n\t" // shift data to pos. correctly
-            "movq (%%esi,%%ecx,), %%mm1  \n\t" //  (GRR BUGFIX:  was psllq)
-            // add (Prev_row/2) to average
-            "movq %%mm5, %%mm3           \n\t"
-            "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
-            "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "movq %%mm7, %%mm6           \n\t"
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
-                                               // each byte
-
-            // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both
-                                               // lsb's were == 1 (only valid
-                                               // for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 1
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg
-                                               // for each Active byte
-
-            // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
-                                               // bytes 2 & 3
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both
-                                               // lsb's were == 1 (only valid
-                                               // for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
-                                               // Avg for each Active byte
-
-            // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
-                                               // bytes 4 & 5
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both lsb's were == 1
-                                               // (only valid for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
-                                               // Avg for each Active byte
-
-            // add 4th active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
-                                               // bytes 6 & 7
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "addl $8, %%ecx              \n\t"
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
-                                               // LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
-                                               // where both
-                                               // lsb's were == 1 (only valid
-                                               // for active group)
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
-                                               // for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
-                                               // bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
-                                               // Avg for each Active byte
-
-            "cmpl _MMXLength, %%ecx      \n\t"
-            // now ready to write back to memory
-            "movq %%mm0, -8(%%edi,%%ecx,) \n\t"
-            // prep Raw(x-bpp) for next loop
-            "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
-            "jb avg_2lp                  \n\t"
-
-            : "=S" (dummy_value_S),            // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi          // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                           // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 2 bpp
-
-      case 1:
-      {
-         __asm__ __volatile__ (
-            // re-init address pointers and offset
-#ifdef __PIC__
-            "pushl %%ebx                 \n\t" // save Global Offset Table index
-#endif
-            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to alignment
-                                               // boundary
-// preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
-            "cmpl _FullLength, %%ebx     \n\t" // test if offset at end of array
-            "jnb avg_1end                \n\t"
-            // do Paeth decode for remaining bytes
-// preload  "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-            "movl %%edi, %%edx           \n\t"
-// preload  "subl bpp, %%edx             \n\t" // (bpp is preloaded into ecx)
-            "subl %%ecx, %%edx           \n\t" // edx:  Raw(x-bpp)
-            "xorl %%ecx, %%ecx           \n\t" // zero ecx before using cl & cx
-                                               //  in loop below
-         "avg_1lp:                       \n\t"
-            // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-            "xorl %%eax, %%eax           \n\t"
-            "movb (%%esi,%%ebx,), %%cl   \n\t" // load cl with Prior(x)
-            "movb (%%edx,%%ebx,), %%al   \n\t" // load al with Raw(x-bpp)
-            "addw %%cx, %%ax             \n\t"
-            "incl %%ebx                  \n\t"
-            "shrw %%ax                   \n\t" // divide by 2
-            "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset
-                                               // inc ebx
-            "cmpl _FullLength, %%ebx     \n\t" // check if at end of array
-            "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x);
-                         // mov does not affect flags; -1 to offset inc ebx
-            "jb avg_1lp                  \n\t"
-
-         "avg_1end:                      \n\t"
-#ifdef __PIC__
-            "popl %%ebx                  \n\t" // Global Offset Table index
-#endif
-
-            : "=c" (dummy_value_c),            // output regs (dummy)
-              "=S" (dummy_value_S),
-              "=D" (dummy_value_D)
-
-            : "0" (bpp),       // ecx          // input regs
-              "1" (prev_row),  // esi
-              "2" (row)        // edi
-
-            : "%eax", "%edx"                   // clobber list
-#ifndef __PIC__
-            , "%ebx"
-#endif
-         );
-      }
-      return;  // end 1 bpp
-
-      case 8:
-      {
-         __asm__ __volatile__ (
-            // re-init address pointers and offset
-            "movl _dif, %%ecx            \n\t" // ecx:  x == offset to alignment
-            "movq _LBCarryMask, %%mm5    \n\t" //            boundary
-// preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
-            "movq _HBClearMask, %%mm4    \n\t"
-// preload  "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes
-                                      // (NO NEED to correct pos. in loop below)
-
-         "avg_8lp:                       \n\t"
-            "movq (%%edi,%%ecx,), %%mm0  \n\t"
-            "movq %%mm5, %%mm3           \n\t"
-            "movq (%%esi,%%ecx,), %%mm1  \n\t"
-            "addl $8, %%ecx              \n\t"
-            "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
-            "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand %%mm2, %%mm3           \n\t" // get LBCarrys for each byte
-                                               //  where both lsb's were == 1
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7, each byte
-            "paddb %%mm3, %%mm0          \n\t" // add LBCarrys to Avg, each byte
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7, each byte
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg, each
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) to Avg for each
-            "cmpl _MMXLength, %%ecx      \n\t"
-            "movq %%mm0, -8(%%edi,%%ecx,) \n\t"
-            "movq %%mm0, %%mm2           \n\t" // reuse as Raw(x-bpp)
-            "jb avg_8lp                  \n\t"
-
-            : "=S" (dummy_value_S),            // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi          // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                           // clobber list
-#if 0  /* %mm0, ..., %mm5 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2"
-            , "%mm3", "%mm4", "%mm5"
-#endif
-         );
-      }
-      break;  // end 8 bpp
-
-      default:                  // bpp greater than 8 (!= 1,2,3,4,[5],6,[7],8)
-      {
-
-#ifdef PNG_DEBUG
-         // GRR:  PRINT ERROR HERE:  SHOULD NEVER BE REACHED
-        png_debug(1,
-        "Internal logic error in pnggccrd (png_read_filter_row_mmx_avg())\n");
-#endif
-
-#if 0
-        __asm__ __volatile__ (
-            "movq _LBCarryMask, %%mm5    \n\t"
-            // re-init address pointers and offset
-            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to
-                                               // alignment boundary
-            "movl row, %%edi             \n\t" // edi:  Avg(x)
-            "movq _HBClearMask, %%mm4    \n\t"
-            "movl %%edi, %%edx           \n\t"
-            "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-            "subl bpp, %%edx             \n\t" // edx:  Raw(x-bpp)
-         "avg_Alp:                       \n\t"
-            "movq (%%edi,%%ebx,), %%mm0  \n\t"
-            "movq %%mm5, %%mm3           \n\t"
-            "movq (%%esi,%%ebx,), %%mm1  \n\t"
-            "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
-            "movq (%%edx,%%ebx,), %%mm2  \n\t"
-            "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand %%mm2, %%mm3           \n\t" // get LBCarrys for each byte
-                                               // where both lsb's were == 1
-            "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm3, %%mm0          \n\t" // add LBCarrys to Avg for each
-                                               // byte
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
-                                               // byte
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
-                                               // each byte
-            "addl $8, %%ebx              \n\t"
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) to Avg for each
-                                               // byte
-            "cmpl _MMXLength, %%ebx      \n\t"
-            "movq %%mm0, -8(%%edi,%%ebx,) \n\t"
-            "jb avg_Alp                  \n\t"
-
-            : // FIXASM: output regs/vars go here, e.g.:  "=m" (memory_var)
-
-            : // FIXASM: input regs, e.g.:  "c" (count), "S" (src), "D" (dest)
-
-            : "%ebx", "%edx", "%edi", "%esi" // CHECKASM: clobber list
-         );
-#endif /* 0 - NEVER REACHED */
-      }
-      break;
-
-   } // end switch (bpp)
-
-   __asm__ __volatile__ (
-      // MMX acceleration complete; now do clean-up
-      // check if any remaining bytes left to decode
-#ifdef __PIC__
-      "pushl %%ebx                 \n\t" // save index to Global Offset Table
-#endif
-      "movl _MMXLength, %%ebx      \n\t" // ebx:  x == offset bytes after MMX
-//pre "movl row, %%edi             \n\t" // edi:  Avg(x)
-      "cmpl _FullLength, %%ebx     \n\t" // test if offset at end of array
-      "jnb avg_end                 \n\t"
-
-      // do Avg decode for remaining bytes
-//pre "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
-      "movl %%edi, %%edx           \n\t"
-//pre "subl bpp, %%edx             \n\t" // (bpp is preloaded into ecx)
-      "subl %%ecx, %%edx           \n\t" // edx:  Raw(x-bpp)
-      "xorl %%ecx, %%ecx           \n\t" // zero ecx before using cl & cx below
-
-   "avg_lp2:                       \n\t"
-      // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-      "xorl %%eax, %%eax           \n\t"
-      "movb (%%esi,%%ebx,), %%cl   \n\t" // load cl with Prior(x)
-      "movb (%%edx,%%ebx,), %%al   \n\t" // load al with Raw(x-bpp)
-      "addw %%cx, %%ax             \n\t"
-      "incl %%ebx                  \n\t"
-      "shrw %%ax                   \n\t" // divide by 2
-      "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx
-      "cmpl _FullLength, %%ebx     \n\t" // check if at end of array
-      "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x) [mov does not
-      "jb avg_lp2                  \n\t" //  affect flags; -1 to offset inc ebx]
-
-   "avg_end:                       \n\t"
-      "EMMS                        \n\t" // end MMX; prep for poss. FP instrs.
-#ifdef __PIC__
-      "popl %%ebx                  \n\t" // restore index to Global Offset Table
-#endif
-
-      : "=c" (dummy_value_c),            // output regs (dummy)
-        "=S" (dummy_value_S),
-        "=D" (dummy_value_D)
-
-      : "0" (bpp),       // ecx          // input regs
-        "1" (prev_row),  // esi
-        "2" (row)        // edi
-
-      : "%eax", "%edx"                   // clobber list
-#ifndef __PIC__
-      , "%ebx"
-#endif
-   );
-
-} /* end png_read_filter_row_mmx_avg() */
-#endif
-
-
-
-#ifdef PNG_THREAD_UNSAFE_OK
-//===========================================================================//
-//                                                                           //
-//         P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H         //
-//                                                                           //
-//===========================================================================//
-
-// Optimized code for PNG Paeth filter decoder
-
-static void /* PRIVATE */
-png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
-                              png_bytep prev_row)
-{
-   int bpp;
-   int dummy_value_c;   // fix 'forbidden register 2 (cx) was spilled' error
-   int dummy_value_S;
-   int dummy_value_D;
-
-   bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel
-   _FullLength  = row_info->rowbytes; // # of bytes to filter
-
-   __asm__ __volatile__ (
-#ifdef __PIC__
-      "pushl %%ebx                 \n\t" // save index to Global Offset Table
-#endif
-      "xorl %%ebx, %%ebx           \n\t" // ebx:  x offset
-//pre "movl row, %%edi             \n\t"
-      "xorl %%edx, %%edx           \n\t" // edx:  x-bpp offset
-//pre "movl prev_row, %%esi        \n\t"
-      "xorl %%eax, %%eax           \n\t"
-
-      // Compute the Raw value for the first bpp bytes
-      // Note: the formula works out to be always
-      //   Paeth(x) = Raw(x) + Prior(x)      where x < bpp
-   "paeth_rlp:                     \n\t"
-      "movb (%%edi,%%ebx,), %%al   \n\t"
-      "addb (%%esi,%%ebx,), %%al   \n\t"
-      "incl %%ebx                  \n\t"
-//pre "cmpl bpp, %%ebx             \n\t" (bpp is preloaded into ecx)
-      "cmpl %%ecx, %%ebx           \n\t"
-      "movb %%al, -1(%%edi,%%ebx,) \n\t"
-      "jb paeth_rlp                \n\t"
-      // get # of bytes to alignment
-      "movl %%edi, _dif            \n\t" // take start of row
-      "addl %%ebx, _dif            \n\t" // add bpp
-      "xorl %%ecx, %%ecx           \n\t"
-      "addl $0xf, _dif             \n\t" // add 7 + 8 to incr past alignment
-                                         // boundary
-      "andl $0xfffffff8, _dif      \n\t" // mask to alignment boundary
-      "subl %%edi, _dif            \n\t" // subtract from start ==> value ebx
-                                         // at alignment
-      "jz paeth_go                 \n\t"
-      // fix alignment
-
-   "paeth_lp1:                     \n\t"
-      "xorl %%eax, %%eax           \n\t"
-      // pav = p - a = (a + b - c) - a = b - c
-      "movb (%%esi,%%ebx,), %%al   \n\t" // load Prior(x) into al
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-      "movl %%eax, _patemp         \n\t" // Save pav for later use
-      "xorl %%eax, %%eax           \n\t"
-      // pbv = p - b = (a + b - c) - b = a - c
-      "movb (%%edi,%%edx,), %%al   \n\t" // load Raw(x-bpp) into al
-      "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-      "movl %%eax, %%ecx           \n\t"
-      // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-      "addl _patemp, %%eax         \n\t" // pcv = pav + pbv
-      // pc = abs(pcv)
-      "testl $0x80000000, %%eax    \n\t"
-      "jz paeth_pca                \n\t"
-      "negl %%eax                  \n\t" // reverse sign of neg values
-
-   "paeth_pca:                     \n\t"
-      "movl %%eax, _pctemp         \n\t" // save pc for later use
-      // pb = abs(pbv)
-      "testl $0x80000000, %%ecx    \n\t"
-      "jz paeth_pba                \n\t"
-      "negl %%ecx                  \n\t" // reverse sign of neg values
-
-   "paeth_pba:                     \n\t"
-      "movl %%ecx, _pbtemp         \n\t" // save pb for later use
-      // pa = abs(pav)
-      "movl _patemp, %%eax         \n\t"
-      "testl $0x80000000, %%eax    \n\t"
-      "jz paeth_paa                \n\t"
-      "negl %%eax                  \n\t" // reverse sign of neg values
-
-   "paeth_paa:                     \n\t"
-      "movl %%eax, _patemp         \n\t" // save pa for later use
-      // test if pa <= pb
-      "cmpl %%ecx, %%eax           \n\t"
-      "jna paeth_abb               \n\t"
-      // pa > pb; now test if pb <= pc
-      "cmpl _pctemp, %%ecx         \n\t"
-      "jna paeth_bbc               \n\t"
-      // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "jmp paeth_paeth             \n\t"
-
-   "paeth_bbc:                     \n\t"
-      // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-      "movb (%%esi,%%ebx,), %%cl   \n\t" // load Prior(x) into cl
-      "jmp paeth_paeth             \n\t"
-
-   "paeth_abb:                     \n\t"
-      // pa <= pb; now test if pa <= pc
-      "cmpl _pctemp, %%eax         \n\t"
-      "jna paeth_abc               \n\t"
-      // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "jmp paeth_paeth             \n\t"
-
-   "paeth_abc:                     \n\t"
-      // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-      "movb (%%edi,%%edx,), %%cl   \n\t" // load Raw(x-bpp) into cl
-
-   "paeth_paeth:                   \n\t"
-      "incl %%ebx                  \n\t"
-      "incl %%edx                  \n\t"
-      // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-      "addb %%cl, -1(%%edi,%%ebx,) \n\t"
-      "cmpl _dif, %%ebx            \n\t"
-      "jb paeth_lp1                \n\t"
-
-   "paeth_go:                      \n\t"
-      "movl _FullLength, %%ecx     \n\t"
-      "movl %%ecx, %%eax           \n\t"
-      "subl %%ebx, %%eax           \n\t" // subtract alignment fix
-      "andl $0x00000007, %%eax     \n\t" // calc bytes over mult of 8
-      "subl %%eax, %%ecx           \n\t" // drop over bytes from original length
-      "movl %%ecx, _MMXLength      \n\t"
-#ifdef __PIC__
-      "popl %%ebx                  \n\t" // restore index to Global Offset Table
-#endif
-
-      : "=c" (dummy_value_c),            // output regs (dummy)
-        "=S" (dummy_value_S),
-        "=D" (dummy_value_D)
-
-      : "0" (bpp),       // ecx          // input regs
-        "1" (prev_row),  // esi
-        "2" (row)        // edi
-
-      : "%eax", "%edx"                   // clobber list
-#ifndef __PIC__
-      , "%ebx"
-#endif
-   );
-
-   // now do the math for the rest of the row
-   switch (bpp)
-   {
-      case 3:
-      {
-         _ActiveMask.use = 0x0000000000ffffffLL;
-         _ActiveMaskEnd.use = 0xffff000000000000LL;
-         _ShiftBpp.use = 24;    // == bpp(3) * 8
-         _ShiftRem.use = 40;    // == 64 - 24
-
-         __asm__ __volatile__ (
-            "movl _dif, %%ecx            \n\t"
-// preload  "movl row, %%edi             \n\t"
-// preload  "movl prev_row, %%esi        \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t"
-         "paeth_3lp:                     \n\t"
-            "psrlq _ShiftRem, %%mm1      \n\t" // shift last 3 bytes to 1st
-                                               // 3 bytes
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "punpcklbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // prep c=Prior(x-bpp) bytes
-            "punpcklbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "psrlq _ShiftRem, %%mm3      \n\t" // shift last 3 bytes to 1st
-                                               // 3 bytes
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "punpcklbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "packuswb %%mm1, %%mm7       \n\t"
-            "movq (%%esi,%%ecx,), %%mm3  \n\t" // load c=Prior(x-bpp)
-            "pand _ActiveMask, %%mm7     \n\t"
-            "movq %%mm3, %%mm2           \n\t" // load b=Prior(x) step 1
-            "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
-            "punpcklbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq %%mm7, %%mm1           \n\t" // now mm1 will be used as
-                                               // Raw(x-bpp)
-            // now do Paeth for 2nd set of bytes (3-5)
-            "psrlq _ShiftBpp, %%mm2      \n\t" // load b=Prior(x) step 2
-            "punpcklbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
-            "pxor %%mm7, %%mm7           \n\t"
-            "punpcklbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) =
-            //       pav + pbv = pbv + pav
-            "movq %%mm5, %%mm6           \n\t"
-            "paddw %%mm4, %%mm6          \n\t"
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm5, %%mm0        \n\t" // create mask pbv bytes < 0
-            "pcmpgtw %%mm4, %%mm7        \n\t" // create mask pav bytes < 0
-            "pand %%mm5, %%mm0           \n\t" // only pbv bytes < 0 in mm0
-            "pand %%mm4, %%mm7           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm0, %%mm5          \n\t"
-            "psubw %%mm7, %%mm4          \n\t"
-            "psubw %%mm0, %%mm5          \n\t"
-            "psubw %%mm7, %%mm4          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "pxor %%mm1, %%mm1           \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "packuswb %%mm1, %%mm7       \n\t"
-            "movq %%mm2, %%mm3           \n\t" // load c=Prior(x-bpp) step 1
-            "pand _ActiveMask, %%mm7     \n\t"
-            "punpckhbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "psllq _ShiftBpp, %%mm7      \n\t" // shift bytes to 2nd group of
-                                               // 3 bytes
-             // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
-            "psllq _ShiftBpp, %%mm3      \n\t" // load c=Prior(x-bpp) step 2
-            "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq %%mm7, %%mm1           \n\t"
-            "punpckhbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            "psllq _ShiftBpp, %%mm1      \n\t" // shift bytes
-                                    // now mm1 will be used as Raw(x-bpp)
-            // now do Paeth for 3rd, and final, set of bytes (6-7)
-            "pxor %%mm7, %%mm7           \n\t"
-            "punpckhbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
-            "psubw %%mm3, %%mm4          \n\t"
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "paddw %%mm5, %%mm6          \n\t"
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm1, %%mm1           \n\t"
-            "packuswb %%mm7, %%mm1       \n\t"
-            // step ecx to next set of 8 bytes and repeat loop til done
-            "addl $8, %%ecx              \n\t"
-            "pand _ActiveMaskEnd, %%mm1  \n\t"
-            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with
-                                                 // Raw(x)
-
-            "cmpl _MMXLength, %%ecx      \n\t"
-            "pxor %%mm0, %%mm0           \n\t" // pxor does not affect flags
-            "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value
-                                 // mm1 will be used as Raw(x-bpp) next loop
-                           // mm3 ready to be used as Prior(x-bpp) next loop
-            "jb paeth_3lp                \n\t"
-
-            : "=S" (dummy_value_S),             // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi           // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                            // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 3 bpp
-
-      case 6:
-      //case 7:   // GRR BOGUS
-      //case 5:   // GRR BOGUS
-      {
-         _ActiveMask.use  = 0x00000000ffffffffLL;
-         _ActiveMask2.use = 0xffffffff00000000LL;
-         _ShiftBpp.use = bpp << 3;    // == bpp * 8
-         _ShiftRem.use = 64 - _ShiftBpp.use;
-
-         __asm__ __volatile__ (
-            "movl _dif, %%ecx            \n\t"
-// preload  "movl row, %%edi             \n\t"
-// preload  "movl prev_row, %%esi        \n\t"
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-
-         "paeth_6lp:                     \n\t"
-            // must shift to position Raw(x-bpp) data
-            "psrlq _ShiftRem, %%mm1      \n\t"
-            // do first set of 4 bytes
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes
-            "punpcklbw %%mm0, %%mm1      \n\t" // unpack Low bytes of a
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "punpcklbw %%mm0, %%mm2      \n\t" // unpack Low bytes of b
-            // must shift to position Prior(x-bpp) data
-            "psrlq _ShiftRem, %%mm3      \n\t"
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "punpcklbw %%mm0, %%mm3      \n\t" // unpack Low bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "packuswb %%mm1, %%mm7       \n\t"
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp)
-            "pand _ActiveMask, %%mm7     \n\t"
-            "psrlq _ShiftRem, %%mm3      \n\t"
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x) step 1
-            "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor and Raw(x)
-            "movq %%mm2, %%mm6           \n\t"
-            "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t"
-            "psllq _ShiftBpp, %%mm6      \n\t"
-            "movq %%mm7, %%mm5           \n\t"
-            "psrlq _ShiftRem, %%mm1      \n\t"
-            "por %%mm6, %%mm3            \n\t"
-            "psllq _ShiftBpp, %%mm5      \n\t"
-            "punpckhbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            "por %%mm5, %%mm1            \n\t"
-            // do second set of 4 bytes
-            "punpckhbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "punpckhbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "pxor %%mm1, %%mm1           \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // step ecx to next set of 8 bytes and repeat loop til done
-            "addl $8, %%ecx              \n\t"
-            "packuswb %%mm7, %%mm1       \n\t"
-            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x)
-            "cmpl _MMXLength, %%ecx      \n\t"
-            "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value
-                                // mm1 will be used as Raw(x-bpp) next loop
-            "jb paeth_6lp                \n\t"
-
-            : "=S" (dummy_value_S),             // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi           // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                            // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 6 bpp
-
-      case 4:
-      {
-         _ActiveMask.use  = 0x00000000ffffffffLL;
-
-         __asm__ __volatile__ (
-            "movl _dif, %%ecx            \n\t"
-// preload  "movl row, %%edi             \n\t"
-// preload  "movl prev_row, %%esi        \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read
-                                     //  a=Raw(x-bpp) bytes
-         "paeth_4lp:                     \n\t"
-            // do first set of 4 bytes
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes
-            "punpckhbw %%mm0, %%mm1      \n\t" // unpack Low bytes of a
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "punpcklbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "punpckhbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "packuswb %%mm1, %%mm7       \n\t"
-            "movq (%%esi,%%ecx,), %%mm3  \n\t" // load c=Prior(x-bpp)
-            "pand _ActiveMask, %%mm7     \n\t"
-            "movq %%mm3, %%mm2           \n\t" // load b=Prior(x) step 1
-            "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
-            "punpcklbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq %%mm7, %%mm1           \n\t" // now mm1 will be used as Raw(x-bpp)
-            // do second set of 4 bytes
-            "punpckhbw %%mm0, %%mm2      \n\t" // unpack Low bytes of b
-            "punpcklbw %%mm0, %%mm1      \n\t" // unpack Low bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "pxor %%mm1, %%mm1           \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // step ecx to next set of 8 bytes and repeat loop til done
-            "addl $8, %%ecx              \n\t"
-            "packuswb %%mm7, %%mm1       \n\t"
-            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add predictor with Raw(x)
-            "cmpl _MMXLength, %%ecx      \n\t"
-            "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value
-                                // mm1 will be used as Raw(x-bpp) next loop
-            "jb paeth_4lp                \n\t"
-
-            : "=S" (dummy_value_S),             // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi           // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                            // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 4 bpp
-
-      case 8:                          // bpp == 8
-      {
-         _ActiveMask.use  = 0x00000000ffffffffLL;
-
-         __asm__ __volatile__ (
-            "movl _dif, %%ecx            \n\t"
-// preload  "movl row, %%edi             \n\t"
-// preload  "movl prev_row, %%esi        \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read
-                                       //  a=Raw(x-bpp) bytes
-         "paeth_8lp:                     \n\t"
-            // do first set of 4 bytes
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes
-            "punpcklbw %%mm0, %%mm1      \n\t" // unpack Low bytes of a
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "punpcklbw %%mm0, %%mm2      \n\t" // unpack Low bytes of b
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            "punpcklbw %%mm0, %%mm3      \n\t" // unpack Low bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "packuswb %%mm1, %%mm7       \n\t"
-            "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes
-            "pand _ActiveMask, %%mm7     \n\t"
-            "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
-            "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
-            "punpckhbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
-            "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // read a=Raw(x-bpp) bytes
-
-            // do second set of 4 bytes
-            "punpckhbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "punpckhbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            "movq %%mm2, %%mm4           \n\t"
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movq %%mm1, %%mm5           \n\t"
-            "psubw %%mm3, %%mm4          \n\t"
-            "pxor %%mm7, %%mm7           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "movq %%mm4, %%mm6           \n\t"
-            "psubw %%mm3, %%mm5          \n\t"
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            "pcmpgtw %%mm4, %%mm0        \n\t" // create mask pav bytes < 0
-            "paddw %%mm5, %%mm6          \n\t"
-            "pand %%mm4, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "pcmpgtw %%mm5, %%mm7        \n\t" // create mask pbv bytes < 0
-            "psubw %%mm0, %%mm4          \n\t"
-            "pand %%mm5, %%mm7           \n\t" // only pbv bytes < 0 in mm0
-            "psubw %%mm0, %%mm4          \n\t"
-            "psubw %%mm7, %%mm5          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            "pcmpgtw %%mm6, %%mm0        \n\t" // create mask pcv bytes < 0
-            "pand %%mm6, %%mm0           \n\t" // only pav bytes < 0 in mm7
-            "psubw %%mm7, %%mm5          \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            //  test pa <= pb
-            "movq %%mm4, %%mm7           \n\t"
-            "psubw %%mm0, %%mm6          \n\t"
-            "pcmpgtw %%mm5, %%mm7        \n\t" // pa > pb?
-            "movq %%mm7, %%mm0           \n\t"
-            // use mm7 mask to merge pa & pb
-            "pand %%mm7, %%mm5           \n\t"
-            // use mm0 mask copy to merge a & b
-            "pand %%mm0, %%mm2           \n\t"
-            "pandn %%mm4, %%mm7          \n\t"
-            "pandn %%mm1, %%mm0          \n\t"
-            "paddw %%mm5, %%mm7          \n\t"
-            "paddw %%mm2, %%mm0          \n\t"
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            "pcmpgtw %%mm6, %%mm7        \n\t" // pab > pc?
-            "pxor %%mm1, %%mm1           \n\t"
-            "pand %%mm7, %%mm3           \n\t"
-            "pandn %%mm0, %%mm7          \n\t"
-            "pxor %%mm1, %%mm1           \n\t"
-            "paddw %%mm3, %%mm7          \n\t"
-            "pxor %%mm0, %%mm0           \n\t"
-            // step ecx to next set of 8 bytes and repeat loop til done
-            "addl $8, %%ecx              \n\t"
-            "packuswb %%mm7, %%mm1       \n\t"
-            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x)
-            "cmpl _MMXLength, %%ecx      \n\t"
-            "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value
-                            // mm1 will be used as Raw(x-bpp) next loop
-            "jb paeth_8lp                \n\t"
-
-            : "=S" (dummy_value_S),             // output regs (dummy)
-              "=D" (dummy_value_D)
-
-            : "0" (prev_row),  // esi           // input regs
-              "1" (row)        // edi
-
-            : "%ecx"                            // clobber list
-#if 0  /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3"
-            , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;  // end 8 bpp
-
-      case 1:                // bpp = 1
-      case 2:                // bpp = 2
-      default:               // bpp > 8
-      {
-         __asm__ __volatile__ (
-#ifdef __PIC__
-            "pushl %%ebx                 \n\t" // save Global Offset Table index
-#endif
-            "movl _dif, %%ebx            \n\t"
-            "cmpl _FullLength, %%ebx     \n\t"
-            "jnb paeth_dend              \n\t"
-
-// preload  "movl row, %%edi             \n\t"
-// preload  "movl prev_row, %%esi        \n\t"
-            // do Paeth decode for remaining bytes
-            "movl %%ebx, %%edx           \n\t"
-// preload  "subl bpp, %%edx             \n\t" // (bpp is preloaded into ecx)
-            "subl %%ecx, %%edx           \n\t" // edx = ebx - bpp
-            "xorl %%ecx, %%ecx           \n\t" // zero ecx before using cl & cx
-
-         "paeth_dlp:                     \n\t"
-            "xorl %%eax, %%eax           \n\t"
-            // pav = p - a = (a + b - c) - a = b - c
-            "movb (%%esi,%%ebx,), %%al   \n\t" // load Prior(x) into al
-            "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-            "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-            "movl %%eax, _patemp         \n\t" // Save pav for later use
-            "xorl %%eax, %%eax           \n\t"
-            // pbv = p - b = (a + b - c) - b = a - c
-            "movb (%%edi,%%edx,), %%al   \n\t" // load Raw(x-bpp) into al
-            "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-            "movl %%eax, %%ecx           \n\t"
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            "addl _patemp, %%eax         \n\t" // pcv = pav + pbv
-            // pc = abs(pcv)
-            "testl $0x80000000, %%eax    \n\t"
-            "jz paeth_dpca               \n\t"
-            "negl %%eax                  \n\t" // reverse sign of neg values
-
-         "paeth_dpca:                    \n\t"
-            "movl %%eax, _pctemp         \n\t" // save pc for later use
-            // pb = abs(pbv)
-            "testl $0x80000000, %%ecx    \n\t"
-            "jz paeth_dpba               \n\t"
-            "negl %%ecx                  \n\t" // reverse sign of neg values
-
-         "paeth_dpba:                    \n\t"
-            "movl %%ecx, _pbtemp         \n\t" // save pb for later use
-            // pa = abs(pav)
-            "movl _patemp, %%eax         \n\t"
-            "testl $0x80000000, %%eax    \n\t"
-            "jz paeth_dpaa               \n\t"
-            "negl %%eax                  \n\t" // reverse sign of neg values
-
-         "paeth_dpaa:                    \n\t"
-            "movl %%eax, _patemp         \n\t" // save pa for later use
-            // test if pa <= pb
-            "cmpl %%ecx, %%eax           \n\t"
-            "jna paeth_dabb              \n\t"
-            // pa > pb; now test if pb <= pc
-            "cmpl _pctemp, %%ecx         \n\t"
-            "jna paeth_dbbc              \n\t"
-            // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-            "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-            "jmp paeth_dpaeth            \n\t"
-
-         "paeth_dbbc:                    \n\t"
-            // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-            "movb (%%esi,%%ebx,), %%cl   \n\t" // load Prior(x) into cl
-            "jmp paeth_dpaeth            \n\t"
-
-         "paeth_dabb:                    \n\t"
-            // pa <= pb; now test if pa <= pc
-            "cmpl _pctemp, %%eax         \n\t"
-            "jna paeth_dabc              \n\t"
-            // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-            "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-            "jmp paeth_dpaeth            \n\t"
-
-         "paeth_dabc:                    \n\t"
-            // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-            "movb (%%edi,%%edx,), %%cl   \n\t" // load Raw(x-bpp) into cl
-
-         "paeth_dpaeth:                  \n\t"
-            "incl %%ebx                  \n\t"
-            "incl %%edx                  \n\t"
-            // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-            "addb %%cl, -1(%%edi,%%ebx,) \n\t"
-            "cmpl _FullLength, %%ebx     \n\t"
-            "jb paeth_dlp                \n\t"
-
-         "paeth_dend:                    \n\t"
-#ifdef __PIC__
-            "popl %%ebx                  \n\t" // index to Global Offset Table
-#endif
-
-            : "=c" (dummy_value_c),            // output regs (dummy)
-              "=S" (dummy_value_S),
-              "=D" (dummy_value_D)
-
-            : "0" (bpp),       // ecx          // input regs
-              "1" (prev_row),  // esi
-              "2" (row)        // edi
-
-            : "%eax", "%edx"                   // clobber list
-#ifndef __PIC__
-            , "%ebx"
-#endif
-         );
-      }
-      return;                   // No need to go further with this one
-
-   } // end switch (bpp)
-
-   __asm__ __volatile__ (
-      // MMX acceleration complete; now do clean-up
-      // check if any remaining bytes left to decode
-#ifdef __PIC__
-      "pushl %%ebx                 \n\t" // save index to Global Offset Table
-#endif
-      "movl _MMXLength, %%ebx      \n\t"
-      "cmpl _FullLength, %%ebx     \n\t"
-      "jnb paeth_end               \n\t"
-//pre "movl row, %%edi             \n\t"
-//pre "movl prev_row, %%esi        \n\t"
-      // do Paeth decode for remaining bytes
-      "movl %%ebx, %%edx           \n\t"
-//pre "subl bpp, %%edx             \n\t" // (bpp is preloaded into ecx)
-      "subl %%ecx, %%edx           \n\t" // edx = ebx - bpp
-      "xorl %%ecx, %%ecx           \n\t" // zero ecx before using cl & cx below
-
-   "paeth_lp2:                     \n\t"
-      "xorl %%eax, %%eax           \n\t"
-      // pav = p - a = (a + b - c) - a = b - c
-      "movb (%%esi,%%ebx,), %%al   \n\t" // load Prior(x) into al
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-      "movl %%eax, _patemp         \n\t" // Save pav for later use
-      "xorl %%eax, %%eax           \n\t"
-      // pbv = p - b = (a + b - c) - b = a - c
-      "movb (%%edi,%%edx,), %%al   \n\t" // load Raw(x-bpp) into al
-      "subl %%ecx, %%eax           \n\t" // subtract Prior(x-bpp)
-      "movl %%eax, %%ecx           \n\t"
-      // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-      "addl _patemp, %%eax         \n\t" // pcv = pav + pbv
-      // pc = abs(pcv)
-      "testl $0x80000000, %%eax    \n\t"
-      "jz paeth_pca2               \n\t"
-      "negl %%eax                  \n\t" // reverse sign of neg values
-
-   "paeth_pca2:                    \n\t"
-      "movl %%eax, _pctemp         \n\t" // save pc for later use
-      // pb = abs(pbv)
-      "testl $0x80000000, %%ecx    \n\t"
-      "jz paeth_pba2               \n\t"
-      "negl %%ecx                  \n\t" // reverse sign of neg values
-
-   "paeth_pba2:                    \n\t"
-      "movl %%ecx, _pbtemp         \n\t" // save pb for later use
-      // pa = abs(pav)
-      "movl _patemp, %%eax         \n\t"
-      "testl $0x80000000, %%eax    \n\t"
-      "jz paeth_paa2               \n\t"
-      "negl %%eax                  \n\t" // reverse sign of neg values
-
-   "paeth_paa2:                    \n\t"
-      "movl %%eax, _patemp         \n\t" // save pa for later use
-      // test if pa <= pb
-      "cmpl %%ecx, %%eax           \n\t"
-      "jna paeth_abb2              \n\t"
-      // pa > pb; now test if pb <= pc
-      "cmpl _pctemp, %%ecx         \n\t"
-      "jna paeth_bbc2              \n\t"
-      // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "jmp paeth_paeth2            \n\t"
-
-   "paeth_bbc2:                    \n\t"
-      // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-      "movb (%%esi,%%ebx,), %%cl   \n\t" // load Prior(x) into cl
-      "jmp paeth_paeth2            \n\t"
-
-   "paeth_abb2:                    \n\t"
-      // pa <= pb; now test if pa <= pc
-      "cmpl _pctemp, %%eax         \n\t"
-      "jna paeth_abc2              \n\t"
-      // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-      "movb (%%esi,%%edx,), %%cl   \n\t" // load Prior(x-bpp) into cl
-      "jmp paeth_paeth2            \n\t"
-
-   "paeth_abc2:                    \n\t"
-      // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-      "movb (%%edi,%%edx,), %%cl   \n\t" // load Raw(x-bpp) into cl
-
-   "paeth_paeth2:                  \n\t"
-      "incl %%ebx                  \n\t"
-      "incl %%edx                  \n\t"
-      // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-      "addb %%cl, -1(%%edi,%%ebx,) \n\t"
-      "cmpl _FullLength, %%ebx     \n\t"
-      "jb paeth_lp2                \n\t"
-
-   "paeth_end:                     \n\t"
-      "EMMS                        \n\t" // end MMX; prep for poss. FP instrs.
-#ifdef __PIC__
-      "popl %%ebx                  \n\t" // restore index to Global Offset Table
-#endif
-
-      : "=c" (dummy_value_c),            // output regs (dummy)
-        "=S" (dummy_value_S),
-        "=D" (dummy_value_D)
-
-      : "0" (bpp),       // ecx          // input regs
-        "1" (prev_row),  // esi
-        "2" (row)        // edi
-
-      : "%eax", "%edx"                   // clobber list (no input regs!)
-#ifndef __PIC__
-      , "%ebx"
-#endif
-   );
-
-} /* end png_read_filter_row_mmx_paeth() */
-#endif
-
-
-
-
-#ifdef PNG_THREAD_UNSAFE_OK
-//===========================================================================//
-//                                                                           //
-//           P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B           //
-//                                                                           //
-//===========================================================================//
-
-// Optimized code for PNG Sub filter decoder
-
-static void /* PRIVATE */
-png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
-{
-   int bpp;
-   int dummy_value_a;
-   int dummy_value_D;
-
-   bpp = (row_info->pixel_depth + 7) >> 3;   // calc number of bytes per pixel
-   _FullLength = row_info->rowbytes - bpp;   // number of bytes to filter
-
-   __asm__ __volatile__ (
-//pre "movl row, %%edi             \n\t"
-      "movl %%edi, %%esi           \n\t" // lp = row
-//pre "movl bpp, %%eax             \n\t"
-      "addl %%eax, %%edi           \n\t" // rp = row + bpp
-//irr "xorl %%eax, %%eax           \n\t"
-      // get # of bytes to alignment
-      "movl %%edi, _dif            \n\t" // take start of row
-      "addl $0xf, _dif             \n\t" // add 7 + 8 to incr past
-                                         //  alignment boundary
-      "xorl %%ecx, %%ecx           \n\t"
-      "andl $0xfffffff8, _dif      \n\t" // mask to alignment boundary
-      "subl %%edi, _dif            \n\t" // subtract from start ==> value
-      "jz sub_go                   \n\t" //  ecx at alignment
-
-   "sub_lp1:                       \n\t" // fix alignment
-      "movb (%%esi,%%ecx,), %%al   \n\t"
-      "addb %%al, (%%edi,%%ecx,)   \n\t"
-      "incl %%ecx                  \n\t"
-      "cmpl _dif, %%ecx            \n\t"
-      "jb sub_lp1                  \n\t"
-
-   "sub_go:                        \n\t"
-      "movl _FullLength, %%eax     \n\t"
-      "movl %%eax, %%edx           \n\t"
-      "subl %%ecx, %%edx           \n\t" // subtract alignment fix
-      "andl $0x00000007, %%edx     \n\t" // calc bytes over mult of 8
-      "subl %%edx, %%eax           \n\t" // drop over bytes from length
-      "movl %%eax, _MMXLength      \n\t"
-
-      : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-        "=D" (dummy_value_D)    // 1
-
-      : "0" (bpp),              // eax    // input regs
-        "1" (row)               // edi
-
-      : "%esi", "%ecx", "%edx"            // clobber list
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-      , "%mm0", "%mm1", "%mm2", "%mm3"
-      , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-   );
-
-   // now do the math for the rest of the row
-   switch (bpp)
-   {
-      case 3:
-      {
-         _ActiveMask.use  = 0x0000ffffff000000LL;
-         _ShiftBpp.use = 24;       // == 3 * 8
-         _ShiftRem.use  = 40;      // == 64 - 24
-
-         __asm__ __volatile__ (
-// preload  "movl row, %%edi              \n\t"
-            "movq _ActiveMask, %%mm7       \n\t" // load _ActiveMask for 2nd
-                                                //  active byte group
-            "movl %%edi, %%esi            \n\t" // lp = row
-// preload  "movl bpp, %%eax              \n\t"
-            "addl %%eax, %%edi            \n\t" // rp = row + bpp
-            "movq %%mm7, %%mm6            \n\t"
-            "movl _dif, %%edx             \n\t"
-            "psllq _ShiftBpp, %%mm6       \n\t" // move mask in mm6 to cover
-                                                //  3rd active byte group
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%edx,), %%mm1 \n\t"
-
-         "sub_3lp:                        \n\t" // shift data for adding first
-            "psrlq _ShiftRem, %%mm1       \n\t" //  bpp bytes (no need for mask;
-                                                //  shift clears inactive bytes)
-            // add 1st active group
-            "movq (%%edi,%%edx,), %%mm0   \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 2nd active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "pand %%mm7, %%mm1            \n\t" // mask to use 2nd active group
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 3rd active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "pand %%mm6, %%mm1            \n\t" // mask to use 3rd active group
-            "addl $8, %%edx               \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-
-            "cmpl _MMXLength, %%edx       \n\t"
-            "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array
-            "movq %%mm0, %%mm1            \n\t" // prep 1st add at top of loop
-            "jb sub_3lp                   \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%edx", "%esi"                    // clobber list
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;
-
-      case 1:
-      {
-         __asm__ __volatile__ (
-            "movl _dif, %%edx            \n\t"
-// preload  "movl row, %%edi             \n\t"
-            "cmpl _FullLength, %%edx     \n\t"
-            "jnb sub_1end                \n\t"
-            "movl %%edi, %%esi           \n\t" // lp = row
-            "xorl %%eax, %%eax           \n\t"
-// preload  "movl bpp, %%eax             \n\t"
-            "addl %%eax, %%edi           \n\t" // rp = row + bpp
-
-         "sub_1lp:                       \n\t"
-            "movb (%%esi,%%edx,), %%al   \n\t"
-            "addb %%al, (%%edi,%%edx,)   \n\t"
-            "incl %%edx                  \n\t"
-            "cmpl _FullLength, %%edx     \n\t"
-            "jb sub_1lp                  \n\t"
-
-         "sub_1end:                      \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%edx", "%esi"                    // clobber list
-         );
-      }
-      return;
-
-      case 6:
-      case 4:
-      //case 7:   // GRR BOGUS
-      //case 5:   // GRR BOGUS
-      {
-         _ShiftBpp.use = bpp << 3;
-         _ShiftRem.use = 64 - _ShiftBpp.use;
-
-         __asm__ __volatile__ (
-// preload  "movl row, %%edi              \n\t"
-            "movl _dif, %%edx             \n\t"
-            "movl %%edi, %%esi            \n\t" // lp = row
-// preload  "movl bpp, %%eax              \n\t"
-            "addl %%eax, %%edi            \n\t" // rp = row + bpp
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%edx,), %%mm1 \n\t"
-
-         "sub_4lp:                        \n\t" // shift data for adding first
-            "psrlq _ShiftRem, %%mm1       \n\t" //  bpp bytes (no need for mask;
-                                                //  shift clears inactive bytes)
-            "movq (%%edi,%%edx,), %%mm0   \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 2nd active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "addl $8, %%edx               \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-
-            "cmpl _MMXLength, %%edx       \n\t"
-            "movq %%mm0, -8(%%edi,%%edx,) \n\t"
-            "movq %%mm0, %%mm1            \n\t" // prep 1st add at top of loop
-            "jb sub_4lp                   \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%edx", "%esi"                    // clobber list
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1"
-#endif
-         );
-      }
-      break;
-
-      case 2:
-      {
-         _ActiveMask.use = 0x00000000ffff0000LL;
-         _ShiftBpp.use = 16;       // == 2 * 8
-         _ShiftRem.use = 48;       // == 64 - 16
-
-         __asm__ __volatile__ (
-            "movq _ActiveMask, %%mm7      \n\t" // load _ActiveMask for 2nd
-                                                //  active byte group
-            "movl _dif, %%edx             \n\t"
-            "movq %%mm7, %%mm6            \n\t"
-// preload  "movl row, %%edi              \n\t"
-            "psllq _ShiftBpp, %%mm6       \n\t" // move mask in mm6 to cover
-                                                //  3rd active byte group
-            "movl %%edi, %%esi            \n\t" // lp = row
-            "movq %%mm6, %%mm5            \n\t"
-// preload  "movl bpp, %%eax              \n\t"
-            "addl %%eax, %%edi            \n\t" // rp = row + bpp
-            "psllq _ShiftBpp, %%mm5       \n\t" // move mask in mm5 to cover
-                                                //  4th active byte group
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%edx,), %%mm1 \n\t"
-
-         "sub_2lp:                        \n\t" // shift data for adding first
-            "psrlq _ShiftRem, %%mm1       \n\t" //  bpp bytes (no need for mask;
-                                                //  shift clears inactive bytes)
-            // add 1st active group
-            "movq (%%edi,%%edx,), %%mm0   \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 2nd active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "pand %%mm7, %%mm1            \n\t" // mask to use 2nd active group
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 3rd active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "pand %%mm6, %%mm1            \n\t" // mask to use 3rd active group
-            "paddb %%mm1, %%mm0           \n\t"
-
-            // add 4th active group
-            "movq %%mm0, %%mm1            \n\t" // mov updated Raws to mm1
-            "psllq _ShiftBpp, %%mm1       \n\t" // shift data to pos. correctly
-            "pand %%mm5, %%mm1            \n\t" // mask to use 4th active group
-            "addl $8, %%edx               \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-            "cmpl _MMXLength, %%edx       \n\t"
-            "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array
-            "movq %%mm0, %%mm1            \n\t" // prep 1st add at top of loop
-            "jb sub_2lp                   \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%edx", "%esi"                    // clobber list
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;
-
-      case 8:
-      {
-         __asm__ __volatile__ (
-// preload  "movl row, %%edi              \n\t"
-            "movl _dif, %%edx             \n\t"
-            "movl %%edi, %%esi            \n\t" // lp = row
-// preload  "movl bpp, %%eax              \n\t"
-            "addl %%eax, %%edi            \n\t" // rp = row + bpp
-            "movl _MMXLength, %%ecx       \n\t"
-
-            // prime the pump:  load the first Raw(x-bpp) data set
-            "movq -8(%%edi,%%edx,), %%mm7 \n\t"
-            "andl $0x0000003f, %%ecx      \n\t" // calc bytes over mult of 64
-
-         "sub_8lp:                        \n\t"
-            "movq (%%edi,%%edx,), %%mm0   \n\t" // load Sub(x) for 1st 8 bytes
-            "paddb %%mm7, %%mm0           \n\t"
-            "movq 8(%%edi,%%edx,), %%mm1  \n\t" // load Sub(x) for 2nd 8 bytes
-            "movq %%mm0, (%%edi,%%edx,)   \n\t" // write Raw(x) for 1st 8 bytes
-
-            // Now mm0 will be used as Raw(x-bpp) for the 2nd group of 8 bytes.
-            // This will be repeated for each group of 8 bytes with the 8th
-            // group being used as the Raw(x-bpp) for the 1st group of the
-            // next loop.
-
-            "paddb %%mm0, %%mm1           \n\t"
-            "movq 16(%%edi,%%edx,), %%mm2 \n\t" // load Sub(x) for 3rd 8 bytes
-            "movq %%mm1, 8(%%edi,%%edx,)  \n\t" // write Raw(x) for 2nd 8 bytes
-            "paddb %%mm1, %%mm2           \n\t"
-            "movq 24(%%edi,%%edx,), %%mm3 \n\t" // load Sub(x) for 4th 8 bytes
-            "movq %%mm2, 16(%%edi,%%edx,) \n\t" // write Raw(x) for 3rd 8 bytes
-            "paddb %%mm2, %%mm3           \n\t"
-            "movq 32(%%edi,%%edx,), %%mm4 \n\t" // load Sub(x) for 5th 8 bytes
-            "movq %%mm3, 24(%%edi,%%edx,) \n\t" // write Raw(x) for 4th 8 bytes
-            "paddb %%mm3, %%mm4           \n\t"
-            "movq 40(%%edi,%%edx,), %%mm5 \n\t" // load Sub(x) for 6th 8 bytes
-            "movq %%mm4, 32(%%edi,%%edx,) \n\t" // write Raw(x) for 5th 8 bytes
-            "paddb %%mm4, %%mm5           \n\t"
-            "movq 48(%%edi,%%edx,), %%mm6 \n\t" // load Sub(x) for 7th 8 bytes
-            "movq %%mm5, 40(%%edi,%%edx,) \n\t" // write Raw(x) for 6th 8 bytes
-            "paddb %%mm5, %%mm6           \n\t"
-            "movq 56(%%edi,%%edx,), %%mm7 \n\t" // load Sub(x) for 8th 8 bytes
-            "movq %%mm6, 48(%%edi,%%edx,) \n\t" // write Raw(x) for 7th 8 bytes
-            "addl $64, %%edx              \n\t"
-            "paddb %%mm6, %%mm7           \n\t"
-            "cmpl %%ecx, %%edx            \n\t"
-            "movq %%mm7, -8(%%edi,%%edx,) \n\t" // write Raw(x) for 8th 8 bytes
-            "jb sub_8lp                   \n\t"
-
-            "cmpl _MMXLength, %%edx       \n\t"
-            "jnb sub_8lt8                 \n\t"
-
-         "sub_8lpA:                       \n\t"
-            "movq (%%edi,%%edx,), %%mm0   \n\t"
-            "addl $8, %%edx               \n\t"
-            "paddb %%mm7, %%mm0           \n\t"
-            "cmpl _MMXLength, %%edx       \n\t"
-            "movq %%mm0, -8(%%edi,%%edx,) \n\t" // -8 to offset early addl edx
-            "movq %%mm0, %%mm7            \n\t" // move calculated Raw(x) data
-                                                //  to mm1 to be new Raw(x-bpp)
-                                                //  for next loop
-            "jb sub_8lpA                  \n\t"
-
-         "sub_8lt8:                       \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%ecx", "%edx", "%esi"            // clobber list
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-         );
-      }
-      break;
-
-      default:                // bpp greater than 8 bytes   GRR BOGUS
-      {
-         __asm__ __volatile__ (
-            "movl _dif, %%edx             \n\t"
-// preload  "movl row, %%edi              \n\t"
-            "movl %%edi, %%esi            \n\t" // lp = row
-// preload  "movl bpp, %%eax              \n\t"
-            "addl %%eax, %%edi            \n\t" // rp = row + bpp
-
-         "sub_Alp:                        \n\t"
-            "movq (%%edi,%%edx,), %%mm0   \n\t"
-            "movq (%%esi,%%edx,), %%mm1   \n\t"
-            "addl $8, %%edx               \n\t"
-            "paddb %%mm1, %%mm0           \n\t"
-            "cmpl _MMXLength, %%edx       \n\t"
-            "movq %%mm0, -8(%%edi,%%edx,) \n\t" // mov does not affect flags;
-                                                //  -8 to offset addl edx
-            "jb sub_Alp                   \n\t"
-
-            : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-              "=D" (dummy_value_D)    // 1
-
-            : "0" (bpp),              // eax    // input regs
-              "1" (row)               // edi
-
-            : "%edx", "%esi"                    // clobber list
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-            , "%mm0", "%mm1"
-#endif
-         );
-      }
-      break;
-
-   } // end switch (bpp)
-
-   __asm__ __volatile__ (
-      "movl _MMXLength, %%edx       \n\t"
-//pre "movl row, %%edi              \n\t"
-      "cmpl _FullLength, %%edx      \n\t"
-      "jnb sub_end                  \n\t"
-
-      "movl %%edi, %%esi            \n\t" // lp = row
-//pre "movl bpp, %%eax              \n\t"
-      "addl %%eax, %%edi            \n\t" // rp = row + bpp
-      "xorl %%eax, %%eax            \n\t"
-
-   "sub_lp2:                        \n\t"
-      "movb (%%esi,%%edx,), %%al    \n\t"
-      "addb %%al, (%%edi,%%edx,)    \n\t"
-      "incl %%edx                   \n\t"
-      "cmpl _FullLength, %%edx      \n\t"
-      "jb sub_lp2                   \n\t"
-
-   "sub_end:                        \n\t"
-      "EMMS                         \n\t" // end MMX instructions
-
-      : "=a" (dummy_value_a),   // 0      // output regs (dummy)
-        "=D" (dummy_value_D)    // 1
-
-      : "0" (bpp),              // eax    // input regs
-        "1" (row)               // edi
-
-      : "%edx", "%esi"                    // clobber list
-   );
-
-} // end of png_read_filter_row_mmx_sub()
-#endif
-
-
-
-
-//===========================================================================//
-//                                                                           //
-//            P N G _ R E A D _ F I L T E R _ R O W _ M M X _ U P            //
-//                                                                           //
-//===========================================================================//
-
-// Optimized code for PNG Up filter decoder
-
-static void /* PRIVATE */
-png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row,
-                           png_bytep prev_row)
-{
-   png_uint_32 len;
-   int dummy_value_d;   // fix 'forbidden register 3 (dx) was spilled' error
-   int dummy_value_S;
-   int dummy_value_D;
-
-   len = row_info->rowbytes;              // number of bytes to filter
-
-   __asm__ __volatile__ (
-//pre "movl row, %%edi              \n\t"
-      // get # of bytes to alignment
-#ifdef __PIC__
-      "pushl %%ebx                  \n\t"
-#endif
-      "movl %%edi, %%ecx            \n\t"
-      "xorl %%ebx, %%ebx            \n\t"
-      "addl $0x7, %%ecx             \n\t"
-      "xorl %%eax, %%eax            \n\t"
-      "andl $0xfffffff8, %%ecx      \n\t"
-//pre "movl prev_row, %%esi         \n\t"
-      "subl %%edi, %%ecx            \n\t"
-      "jz up_go                     \n\t"
-
-   "up_lp1:                         \n\t" // fix alignment
-      "movb (%%edi,%%ebx,), %%al    \n\t"
-      "addb (%%esi,%%ebx,), %%al    \n\t"
-      "incl %%ebx                   \n\t"
-      "cmpl %%ecx, %%ebx            \n\t"
-      "movb %%al, -1(%%edi,%%ebx,)  \n\t" // mov does not affect flags; -1 to
-      "jb up_lp1                    \n\t" //  offset incl ebx
-
-   "up_go:                          \n\t"
-//pre "movl len, %%edx              \n\t"
-      "movl %%edx, %%ecx            \n\t"
-      "subl %%ebx, %%edx            \n\t" // subtract alignment fix
-      "andl $0x0000003f, %%edx      \n\t" // calc bytes over mult of 64
-      "subl %%edx, %%ecx            \n\t" // drop over bytes from length
-
-      // unrolled loop - use all MMX registers and interleave to reduce
-      // number of branch instructions (loops) and reduce partial stalls
-   "up_loop:                        \n\t"
-      "movq (%%esi,%%ebx,), %%mm1   \n\t"
-      "movq (%%edi,%%ebx,), %%mm0   \n\t"
-      "movq 8(%%esi,%%ebx,), %%mm3  \n\t"
-      "paddb %%mm1, %%mm0           \n\t"
-      "movq 8(%%edi,%%ebx,), %%mm2  \n\t"
-      "movq %%mm0, (%%edi,%%ebx,)   \n\t"
-      "paddb %%mm3, %%mm2           \n\t"
-      "movq 16(%%esi,%%ebx,), %%mm5 \n\t"
-      "movq %%mm2, 8(%%edi,%%ebx,)  \n\t"
-      "movq 16(%%edi,%%ebx,), %%mm4 \n\t"
-      "movq 24(%%esi,%%ebx,), %%mm7 \n\t"
-      "paddb %%mm5, %%mm4           \n\t"
-      "movq 24(%%edi,%%ebx,), %%mm6 \n\t"
-      "movq %%mm4, 16(%%edi,%%ebx,) \n\t"
-      "paddb %%mm7, %%mm6           \n\t"
-      "movq 32(%%esi,%%ebx,), %%mm1 \n\t"
-      "movq %%mm6, 24(%%edi,%%ebx,) \n\t"
-      "movq 32(%%edi,%%ebx,), %%mm0 \n\t"
-      "movq 40(%%esi,%%ebx,), %%mm3 \n\t"
-      "paddb %%mm1, %%mm0           \n\t"
-      "movq 40(%%edi,%%ebx,), %%mm2 \n\t"
-      "movq %%mm0, 32(%%edi,%%ebx,) \n\t"
-      "paddb %%mm3, %%mm2           \n\t"
-      "movq 48(%%esi,%%ebx,), %%mm5 \n\t"
-      "movq %%mm2, 40(%%edi,%%ebx,) \n\t"
-      "movq 48(%%edi,%%ebx,), %%mm4 \n\t"
-      "movq 56(%%esi,%%ebx,), %%mm7 \n\t"
-      "paddb %%mm5, %%mm4           \n\t"
-      "movq 56(%%edi,%%ebx,), %%mm6 \n\t"
-      "movq %%mm4, 48(%%edi,%%ebx,) \n\t"
-      "addl $64, %%ebx              \n\t"
-      "paddb %%mm7, %%mm6           \n\t"
-      "cmpl %%ecx, %%ebx            \n\t"
-      "movq %%mm6, -8(%%edi,%%ebx,) \n\t" // (+56)movq does not affect flags;
-      "jb up_loop                   \n\t" //  -8 to offset addl ebx
-
-      "cmpl $0, %%edx               \n\t" // test for bytes over mult of 64
-      "jz up_end                    \n\t"
-
-      "cmpl $8, %%edx               \n\t" // test for less than 8 bytes
-      "jb up_lt8                    \n\t" //  [added by lcreeve at netins.net]
-
-      "addl %%edx, %%ecx            \n\t"
-      "andl $0x00000007, %%edx      \n\t" // calc bytes over mult of 8
-      "subl %%edx, %%ecx            \n\t" // drop over bytes from length
-      "jz up_lt8                    \n\t"
-
-   "up_lpA:                         \n\t" // use MMX regs to update 8 bytes sim.
-      "movq (%%esi,%%ebx,), %%mm1   \n\t"
-      "movq (%%edi,%%ebx,), %%mm0   \n\t"
-      "addl $8, %%ebx               \n\t"
-      "paddb %%mm1, %%mm0           \n\t"
-      "cmpl %%ecx, %%ebx            \n\t"
-      "movq %%mm0, -8(%%edi,%%ebx,) \n\t" // movq does not affect flags; -8 to
-      "jb up_lpA                    \n\t" //  offset add ebx
-      "cmpl $0, %%edx               \n\t" // test for bytes over mult of 8
-      "jz up_end                    \n\t"
-
-   "up_lt8:                         \n\t"
-      "xorl %%eax, %%eax            \n\t"
-      "addl %%edx, %%ecx            \n\t" // move over byte count into counter
-
-   "up_lp2:                         \n\t" // use x86 regs for remaining bytes
-      "movb (%%edi,%%ebx,), %%al    \n\t"
-      "addb (%%esi,%%ebx,), %%al    \n\t"
-      "incl %%ebx                   \n\t"
-      "cmpl %%ecx, %%ebx            \n\t"
-      "movb %%al, -1(%%edi,%%ebx,)  \n\t" // mov does not affect flags; -1 to
-      "jb up_lp2                    \n\t" //  offset inc ebx
-
-   "up_end:                         \n\t"
-      "EMMS                         \n\t" // conversion of filtered row complete
-#ifdef __PIC__
-      "popl %%ebx                   \n\t"
-#endif
-
-      : "=d" (dummy_value_d),   // 0      // output regs (dummy)
-        "=S" (dummy_value_S),   // 1
-        "=D" (dummy_value_D)    // 2
-
-      : "0" (len),              // edx    // input regs
-        "1" (prev_row),         // esi
-        "2" (row)               // edi
-
-      : "%eax", "%ecx"            // clobber list (no input regs!)
-#ifndef __PIC__
-      , "%ebx"
-#endif
-
-#if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-      , "%mm0", "%mm1", "%mm2", "%mm3"
-      , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
-   );
-
-} // end of png_read_filter_row_mmx_up()
-
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-
-
-
-/*===========================================================================*/
-/*                                                                           */
-/*                   P N G _ R E A D _ F I L T E R _ R O W                   */
-/*                                                                           */
-/*===========================================================================*/
-
-
-/* Optimized png_read_filter_row routines */
-
-void /* PRIVATE */
-png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
-   row, png_bytep prev_row, int filter)
-{
-#ifdef PNG_DEBUG
-   char filnm[10];
-#endif
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-/* GRR:  these are superseded by png_ptr->asm_flags: */
-#define UseMMX_sub    1   // GRR:  converted 20000730
-#define UseMMX_up     1   // GRR:  converted 20000729
-#define UseMMX_avg    1   // GRR:  converted 20000828 (+ 16-bit bugfix 20000916)
-#define UseMMX_paeth  1   // GRR:  converted 20000828
-
-   if (_mmx_supported == 2) {
-       /* this should have happened in png_init_mmx_flags() already */
-#if !defined(PNG_1_0_X)
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-#ifdef PNG_DEBUG
-   png_debug(1, "in png_read_filter_row (pnggccrd.c)\n");
-   switch (filter)
-   {
-      case 0: sprintf(filnm, "none");
-         break;
-      case 1: sprintf(filnm, "sub-%s",
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : 
-#endif
-#endif
-"x86");
-         break;
-      case 2: sprintf(filnm, "up-%s",
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-#if !defined(PNG_1_0_X)
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" :
-#endif
-#endif
- "x86");
-         break;
-      case 3: sprintf(filnm, "avg-%s",
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" :
-#endif
-#endif
- "x86");
-         break;
-      case 4: sprintf(filnm, "Paeth-%s",
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":
-#endif
-#endif
-"x86");
-         break;
-      default: sprintf(filnm, "unknw");
-         break;
-   }
-   png_debug2(0, "row_number=%5ld, %5s, ", png_ptr->row_number, filnm);
-   png_debug1(0, "row=0x%08lx, ", (unsigned long)row);
-   png_debug2(0, "pixdepth=%2d, bytes=%d, ", (int)row_info->pixel_depth,
-      (int)((row_info->pixel_depth + 7) >> 3));
-   png_debug1(0,"rowbytes=%8ld\n", row_info->rowbytes);
-#endif /* PNG_DEBUG */
-
-   switch (filter)
-   {
-      case PNG_FILTER_VALUE_NONE:
-         break;
-
-      case PNG_FILTER_VALUE_SUB:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (_mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_sub(row_info, row);
-         }
-         else
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-         {
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_bytep rp = row + bpp;
-            png_bytep lp = row;
-
-            for (i = bpp; i < istop; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
-               rp++;
-            }
-         }  /* end !UseMMX_sub */
-         break;
-
-      case PNG_FILTER_VALUE_UP:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (_mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_up(row_info, row, prev_row);
-         }
-          else
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-         {
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-
-            for (i = 0; i < istop; ++i)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-               rp++;
-            }
-         }  /* end !UseMMX_up */
-         break;
-
-      case PNG_FILTER_VALUE_AVG:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (_mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_avg(row_info, row, prev_row);
-         }
-         else
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-         {
-            png_uint_32 i;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-            png_bytep lp = row;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_uint_32 istop = row_info->rowbytes - bpp;
-
-            for (i = 0; i < bpp; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) +
-                  ((int)(*pp++) >> 1)) & 0xff);
-               rp++;
-            }
-
-            for (i = 0; i < istop; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) +
-                  ((int)(*pp++ + *lp++) >> 1)) & 0xff);
-               rp++;
-            }
-         }  /* end !UseMMX_avg */
-         break;
-
-      case PNG_FILTER_VALUE_PAETH:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (_mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_paeth(row_info, row, prev_row);
-         }
-         else
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-         {
-            png_uint_32 i;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-            png_bytep lp = row;
-            png_bytep cp = prev_row;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_uint_32 istop = row_info->rowbytes - bpp;
-
-            for (i = 0; i < bpp; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-               rp++;
-            }
-
-            for (i = 0; i < istop; i++)   /* use leftover rp,pp */
-            {
-               int a, b, c, pa, pb, pc, p;
-
-               a = *lp++;
-               b = *pp++;
-               c = *cp++;
-
-               p = b - c;
-               pc = a - c;
-
-#ifdef PNG_USE_ABS
-               pa = abs(p);
-               pb = abs(pc);
-               pc = abs(p + pc);
-#else
-               pa = p < 0 ? -p : p;
-               pb = pc < 0 ? -pc : pc;
-               pc = (p + pc) < 0 ? -(p + pc) : p + pc;
-#endif
-
-               /*
-                  if (pa <= pb && pa <= pc)
-                     p = a;
-                  else if (pb <= pc)
-                     p = b;
-                  else
-                     p = c;
-                */
-
-               p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;
-
-               *rp = (png_byte)(((int)(*rp) + p) & 0xff);
-               rp++;
-            }
-         }  /* end !UseMMX_paeth */
-         break;
-
-      default:
-         png_warning(png_ptr, "Ignoring bad row-filter type");
-         *row=0;
-         break;
-   }
-}
-
-#endif /* PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */
-
-
-/*===========================================================================*/
-/*                                                                           */
-/*                      P N G _ M M X _ S U P P O R T                        */
-/*                                                                           */
-/*===========================================================================*/
-
-/* GRR NOTES:  (1) the following code assumes 386 or better (pushfl/popfl)
- *             (2) all instructions compile with gcc 2.7.2.3 and later
- *             (3) the function is moved down here to prevent gcc from
- *                  inlining it in multiple places and then barfing be-
- *                  cause the ".NOT_SUPPORTED" label is multiply defined
- *             [is there a way to signal that a *single* function should
- *              not be inlined?  is there a way to modify the label for
- *              each inlined instance, e.g., by appending _1, _2, etc.?
- *              maybe if don't use leading "." in label name? (nope...sigh)]
- */
-
-int PNGAPI
-png_mmx_support(void)
-{
-#if defined(PNG_MMX_CODE_SUPPORTED)
-    __asm__ __volatile__ (
-        "pushl %%ebx          \n\t"  // ebx gets clobbered by CPUID instruction
-        "pushl %%ecx          \n\t"  // so does ecx...
-        "pushl %%edx          \n\t"  // ...and edx (but ecx & edx safe on Linux)
-//      ".byte  0x66          \n\t"  // convert 16-bit pushf to 32-bit pushfd
-//      "pushf                \n\t"  // 16-bit pushf
-        "pushfl               \n\t"  // save Eflag to stack
-        "popl %%eax           \n\t"  // get Eflag from stack into eax
-        "movl %%eax, %%ecx    \n\t"  // make another copy of Eflag in ecx
-        "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
-        "pushl %%eax          \n\t"  // save modified Eflag back to stack
-//      ".byte  0x66          \n\t"  // convert 16-bit popf to 32-bit popfd
-//      "popf                 \n\t"  // 16-bit popf
-        "popfl                \n\t"  // restore modified value to Eflag reg
-        "pushfl               \n\t"  // save Eflag to stack
-        "popl %%eax           \n\t"  // get Eflag from stack
-        "pushl %%ecx          \n\t"  // save original Eflag to stack
-        "popfl                \n\t"  // restore original Eflag
-        "xorl %%ecx, %%eax    \n\t"  // compare new Eflag with original Eflag
-        "jz 0f                \n\t"  // if same, CPUID instr. is not supported
-
-        "xorl %%eax, %%eax    \n\t"  // set eax to zero
-//      ".byte  0x0f, 0xa2    \n\t"  // CPUID instruction (two-byte opcode)
-        "cpuid                \n\t"  // get the CPU identification info
-        "cmpl $1, %%eax       \n\t"  // make sure eax return non-zero value
-        "jl 0f                \n\t"  // if eax is zero, MMX is not supported
-
-        "xorl %%eax, %%eax    \n\t"  // set eax to zero and...
-        "incl %%eax           \n\t"  // ...increment eax to 1.  This pair is
-                                     // faster than the instruction "mov eax, 1"
-        "cpuid                \n\t"  // get the CPU identification info again
-        "andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
-        "cmpl $0, %%edx       \n\t"  // 0 = MMX not supported
-        "jz 0f                \n\t"  // non-zero = yes, MMX IS supported
-
-        "movl $1, %%eax       \n\t"  // set return value to 1
-        "jmp  1f              \n\t"  // DONE:  have MMX support
-
-    "0:                       \n\t"  // .NOT_SUPPORTED: target label for jump instructions
-        "movl $0, %%eax       \n\t"  // set return value to 0
-    "1:                       \n\t"  // .RETURN: target label for jump instructions
-        "movl %%eax, _mmx_supported \n\t" // save in global static variable, too
-        "popl %%edx           \n\t"  // restore edx
-        "popl %%ecx           \n\t"  // restore ecx
-        "popl %%ebx           \n\t"  // restore ebx
-
-//      "ret                  \n\t"  // DONE:  no MMX support
-                                     // (fall through to standard C "ret")
-
-        :                            // output list (none)
-
-        :                            // any variables used on input (none)
-
-        : "%eax"                     // clobber list
-//      , "%ebx", "%ecx", "%edx"     // GRR:  we handle these manually
-//      , "memory"   // if write to a variable gcc thought was in a reg
-//      , "cc"       // "condition codes" (flag bits)
-    );
-#else     
-    _mmx_supported = 0;
-#endif /* PNG_MMX_CODE_SUPPORTED */
-
-    return _mmx_supported;
-}
-
-
-#endif /* PNG_USE_PNGGCCRD */
diff --git a/tkimg1.3/libpng/pngget.c b/tkimg1.3/libpng/pngget.c
deleted file mode 100644
index c5fce3c..0000000
--- a/tkimg1.3/libpng/pngget.c
+++ /dev/null
@@ -1,934 +0,0 @@
-
-/* pngget.c - retrieval of values from info struct
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-png_uint_32 PNGAPI
-png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-      return(info_ptr->valid & flag);
-   else
-      return(0);
-}
-
-png_uint_32 PNGAPI
-png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-      return(info_ptr->rowbytes);
-   else
-      return(0);
-}
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-png_bytepp PNGAPI
-png_get_rows(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-      return(info_ptr->row_pointers);
-   else
-      return(0);
-}
-#endif
-
-#ifdef PNG_EASY_ACCESS_SUPPORTED
-/* easy access to info, added in libpng-0.99 */
-png_uint_32 PNGAPI
-png_get_image_width(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->width;
-   }
-   return (0);
-}
-
-png_uint_32 PNGAPI
-png_get_image_height(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->height;
-   }
-   return (0);
-}
-
-png_byte PNGAPI
-png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->bit_depth;
-   }
-   return (0);
-}
-
-png_byte PNGAPI
-png_get_color_type(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->color_type;
-   }
-   return (0);
-}
-
-png_byte PNGAPI
-png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->filter_type;
-   }
-   return (0);
-}
-
-png_byte PNGAPI
-png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->interlace_type;
-   }
-   return (0);
-}
-
-png_byte PNGAPI
-png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-   {
-      return info_ptr->compression_type;
-   }
-   return (0);
-}
-
-png_uint_32 PNGAPI
-png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pHYs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_x_pixels_per_meter");
-      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
-          return (0);
-      else return (info_ptr->x_pixels_per_unit);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-png_uint_32 PNGAPI
-png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pHYs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_y_pixels_per_meter");
-      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
-          return (0);
-      else return (info_ptr->y_pixels_per_unit);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-png_uint_32 PNGAPI
-png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pHYs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_pixels_per_meter");
-      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||
-         info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)
-          return (0);
-      else return (info_ptr->x_pixels_per_unit);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-float PNGAPI
-png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
-   {
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pHYs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio");
-      if (info_ptr->x_pixels_per_unit == 0)
-         return ((float)0.0);
-      else
-         return ((float)((float)info_ptr->y_pixels_per_unit
-            /(float)info_ptr->x_pixels_per_unit));
-   }
-#else
-   return (0.0);
-#endif
-   return ((float)0.0);
-}
-#endif
-
-png_int_32 PNGAPI
-png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_oFFs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns");
-      if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
-          return (0);
-      else return (info_ptr->x_offset);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-png_int_32 PNGAPI
-png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_oFFs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns");
-      if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
-          return (0);
-      else return (info_ptr->y_offset);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-png_int_32 PNGAPI
-png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_oFFs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns");
-      if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
-          return (0);
-      else return (info_ptr->x_offset);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-png_int_32 PNGAPI
-png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_oFFs)
-   {
-      png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns");
-      if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
-          return (0);
-      else return (info_ptr->y_offset);
-   }
-#else
-   return (0);
-#endif
-   return (0);
-}
-
-#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
-{
-   return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr)
-     *.0254 +.5));
-}
-
-png_uint_32 PNGAPI
-png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
-{
-   return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr)
-     *.0254 +.5));
-}
-
-png_uint_32 PNGAPI
-png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
-{
-   return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr)
-     *.0254 +.5));
-}
-
-float PNGAPI
-png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)
-{
-   return ((float)png_get_x_offset_microns(png_ptr, info_ptr)
-     *.00003937);
-}
-
-float PNGAPI
-png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
-{
-   return ((float)png_get_y_offset_microns(png_ptr, info_ptr)
-     *.00003937);
-}
-
-#if defined(PNG_pHYs_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
-{
-   png_uint_32 retval = 0;
-
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
-   {
-      png_debug1(1, "in %s retrieval function\n", "pHYs");
-      if (res_x != NULL)
-      {
-         *res_x = info_ptr->x_pixels_per_unit;
-         retval |= PNG_INFO_pHYs;
-      }
-      if (res_y != NULL)
-      {
-         *res_y = info_ptr->y_pixels_per_unit;
-         retval |= PNG_INFO_pHYs;
-      }
-      if (unit_type != NULL)
-      {
-         *unit_type = (int)info_ptr->phys_unit_type;
-         retval |= PNG_INFO_pHYs;
-         if(*unit_type == 1)
-         {
-            if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50);
-            if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50);
-         }
-      }
-   }
-   return (retval);
-}
-#endif /* PNG_pHYs_SUPPORTED */
-#endif  /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
-
-/* png_get_channels really belongs in here, too, but it's been around longer */
-
-#endif  /* PNG_EASY_ACCESS_SUPPORTED */
-
-png_byte PNGAPI
-png_get_channels(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-      return(info_ptr->channels);
-   else
-      return (0);
-}
-
-png_bytep PNGAPI
-png_get_signature(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr != NULL && info_ptr != NULL)
-      return(info_ptr->signature);
-   else
-      return (NULL);
-}
-
-#if defined(PNG_bKGD_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
-   png_color_16p *background)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
-      && background != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "bKGD");
-      *background = &(info_ptr->background);
-      return (PNG_INFO_bKGD);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
-   double *white_x, double *white_y, double *red_x, double *red_y,
-   double *green_x, double *green_y, double *blue_x, double *blue_y)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
-   {
-      png_debug1(1, "in %s retrieval function\n", "cHRM");
-      if (white_x != NULL)
-         *white_x = (double)info_ptr->x_white;
-      if (white_y != NULL)
-         *white_y = (double)info_ptr->y_white;
-      if (red_x != NULL)
-         *red_x = (double)info_ptr->x_red;
-      if (red_y != NULL)
-         *red_y = (double)info_ptr->y_red;
-      if (green_x != NULL)
-         *green_x = (double)info_ptr->x_green;
-      if (green_y != NULL)
-         *green_y = (double)info_ptr->y_green;
-      if (blue_x != NULL)
-         *blue_x = (double)info_ptr->x_blue;
-      if (blue_y != NULL)
-         *blue_y = (double)info_ptr->y_blue;
-      return (PNG_INFO_cHRM);
-   }
-   return (0);
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
-   png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
-   png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
-   png_fixed_point *blue_x, png_fixed_point *blue_y)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
-   {
-      png_debug1(1, "in %s retrieval function\n", "cHRM");
-      if (white_x != NULL)
-         *white_x = info_ptr->int_x_white;
-      if (white_y != NULL)
-         *white_y = info_ptr->int_y_white;
-      if (red_x != NULL)
-         *red_x = info_ptr->int_x_red;
-      if (red_y != NULL)
-         *red_y = info_ptr->int_y_red;
-      if (green_x != NULL)
-         *green_x = info_ptr->int_x_green;
-      if (green_y != NULL)
-         *green_y = info_ptr->int_y_green;
-      if (blue_x != NULL)
-         *blue_x = info_ptr->int_x_blue;
-      if (blue_y != NULL)
-         *blue_y = info_ptr->int_y_blue;
-      return (PNG_INFO_cHRM);
-   }
-   return (0);
-}
-#endif
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
-      && file_gamma != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "gAMA");
-      *file_gamma = (double)info_ptr->gamma;
-      return (PNG_INFO_gAMA);
-   }
-   return (0);
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
-    png_fixed_point *int_file_gamma)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
-      && int_file_gamma != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "gAMA");
-      *int_file_gamma = info_ptr->int_gamma;
-      return (PNG_INFO_gAMA);
-   }
-   return (0);
-}
-#endif
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
-      && file_srgb_intent != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "sRGB");
-      *file_srgb_intent = (int)info_ptr->srgb_intent;
-      return (PNG_INFO_sRGB);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
-             png_charpp name, int *compression_type,
-             png_charpp profile, png_uint_32 *proflen)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
-      && name != NULL && profile != NULL && proflen != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "iCCP");
-      *name = info_ptr->iccp_name;
-      *profile = info_ptr->iccp_profile;
-      /* compression_type is a dummy so the API won't have to change
-         if we introduce multiple compression types later. */
-      *proflen = (int)info_ptr->iccp_proflen;
-      *compression_type = (int)info_ptr->iccp_compression;
-      return (PNG_INFO_iCCP);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
-             png_sPLT_tpp spalettes)
-{
-   if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
-     *spalettes = info_ptr->splt_palettes;
-   return ((png_uint_32)info_ptr->splt_palettes_num);
-}
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
-      && hist != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "hIST");
-      *hist = info_ptr->hist;
-      return (PNG_INFO_hIST);
-   }
-   return (0);
-}
-#endif
-
-png_uint_32 PNGAPI
-png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 *width, png_uint_32 *height, int *bit_depth,
-   int *color_type, int *interlace_type, int *compression_type,
-   int *filter_type)
-
-{
-   if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL &&
-      bit_depth != NULL && color_type != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "IHDR");
-      *width = info_ptr->width;
-      *height = info_ptr->height;
-      *bit_depth = info_ptr->bit_depth;
-      if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
-        png_error(png_ptr, "Invalid bit depth");
-      *color_type = info_ptr->color_type;
-      if (info_ptr->color_type > 6)
-        png_error(png_ptr, "Invalid color type");
-      if (compression_type != NULL)
-         *compression_type = info_ptr->compression_type;
-      if (filter_type != NULL)
-         *filter_type = info_ptr->filter_type;
-      if (interlace_type != NULL)
-         *interlace_type = info_ptr->interlace_type;
-
-      /* check for potential overflow of rowbytes */
-      if (width == 0 || *width > PNG_UINT_31_MAX)
-        png_error(png_ptr, "Invalid image width");
-      if (height == 0 || *height > PNG_UINT_31_MAX)
-        png_error(png_ptr, "Invalid image height");
-      if (info_ptr->width > (PNG_UINT_32_MAX
-                 >> 3)      /* 8-byte RGBA pixels */
-                 - 64       /* bigrowbuf hack */
-                 - 1        /* filter byte */
-                 - 7*8      /* rounding of width to multiple of 8 pixels */
-                 - 8)       /* extra max_pixel_depth pad */
-      {
-         png_warning(png_ptr,
-            "Width too large for libpng to process image data.");
-      }
-      return (1);
-   }
-   return (0);
-}
-
-#if defined(PNG_oFFs_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
-   png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
-      && offset_x != NULL && offset_y != NULL && unit_type != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "oFFs");
-      *offset_x = info_ptr->x_offset;
-      *offset_y = info_ptr->y_offset;
-      *unit_type = (int)info_ptr->offset_unit_type;
-      return (PNG_INFO_oFFs);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
-   png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
-   png_charp *units, png_charpp *params)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
-      && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
-      nparams != NULL && units != NULL && params != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "pCAL");
-      *purpose = info_ptr->pcal_purpose;
-      *X0 = info_ptr->pcal_X0;
-      *X1 = info_ptr->pcal_X1;
-      *type = (int)info_ptr->pcal_type;
-      *nparams = (int)info_ptr->pcal_nparams;
-      *units = info_ptr->pcal_units;
-      *params = info_ptr->pcal_params;
-      return (PNG_INFO_pCAL);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
-             int *unit, double *width, double *height)
-{
-    if (png_ptr != NULL && info_ptr != NULL &&
-       (info_ptr->valid & PNG_INFO_sCAL))
-    {
-        *unit = info_ptr->scal_unit;
-        *width = info_ptr->scal_pixel_width;
-        *height = info_ptr->scal_pixel_height;
-        return (PNG_INFO_sCAL);
-    }
-    return(0);
-}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
-             int *unit, png_charpp width, png_charpp height)
-{
-    if (png_ptr != NULL && info_ptr != NULL &&
-       (info_ptr->valid & PNG_INFO_sCAL))
-    {
-        *unit = info_ptr->scal_unit;
-        *width = info_ptr->scal_s_width;
-        *height = info_ptr->scal_s_height;
-        return (PNG_INFO_sCAL);
-    }
-    return(0);
-}
-#endif
-#endif
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
-{
-   png_uint_32 retval = 0;
-
-   if (png_ptr != NULL && info_ptr != NULL &&
-      (info_ptr->valid & PNG_INFO_pHYs))
-   {
-      png_debug1(1, "in %s retrieval function\n", "pHYs");
-      if (res_x != NULL)
-      {
-         *res_x = info_ptr->x_pixels_per_unit;
-         retval |= PNG_INFO_pHYs;
-      }
-      if (res_y != NULL)
-      {
-         *res_y = info_ptr->y_pixels_per_unit;
-         retval |= PNG_INFO_pHYs;
-      }
-      if (unit_type != NULL)
-      {
-         *unit_type = (int)info_ptr->phys_unit_type;
-         retval |= PNG_INFO_pHYs;
-      }
-   }
-   return (retval);
-}
-#endif
-
-png_uint_32 PNGAPI
-png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
-   int *num_palette)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
-       && palette != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "PLTE");
-      *palette = info_ptr->palette;
-      *num_palette = info_ptr->num_palette;
-      png_debug1(3, "num_palette = %d\n", *num_palette);
-      return (PNG_INFO_PLTE);
-   }
-   return (0);
-}
-
-#if defined(PNG_sBIT_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
-      && sig_bit != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "sBIT");
-      *sig_bit = &(info_ptr->sig_bit);
-      return (PNG_INFO_sBIT);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
-   int *num_text)
-{
-   if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
-   {
-      png_debug1(1, "in %s retrieval function\n",
-         (png_ptr->chunk_name[0] == '\0' ? "text"
-             : (png_const_charp)png_ptr->chunk_name));
-      if (text_ptr != NULL)
-         *text_ptr = info_ptr->text;
-      if (num_text != NULL)
-         *num_text = info_ptr->num_text;
-      return ((png_uint_32)info_ptr->num_text);
-   }
-   if (num_text != NULL)
-     *num_text = 0;
-   return(0);
-}
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
-{
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
-       && mod_time != NULL)
-   {
-      png_debug1(1, "in %s retrieval function\n", "tIME");
-      *mod_time = &(info_ptr->mod_time);
-      return (PNG_INFO_tIME);
-   }
-   return (0);
-}
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
-   png_bytep *trans, int *num_trans, png_color_16p *trans_values)
-{
-   png_uint_32 retval = 0;
-   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
-   {
-      png_debug1(1, "in %s retrieval function\n", "tRNS");
-      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-          if (trans != NULL)
-          {
-             *trans = info_ptr->trans;
-             retval |= PNG_INFO_tRNS;
-          }
-          if (trans_values != NULL)
-             *trans_values = &(info_ptr->trans_values);
-      }
-      else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
-      {
-          if (trans_values != NULL)
-          {
-             *trans_values = &(info_ptr->trans_values);
-             retval |= PNG_INFO_tRNS;
-          }
-          if(trans != NULL)
-             *trans = NULL;
-      }
-      if(num_trans != NULL)
-      {
-         *num_trans = info_ptr->num_trans;
-         retval |= PNG_INFO_tRNS;
-      }
-   }
-   return (retval);
-}
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-png_uint_32 PNGAPI
-png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
-             png_unknown_chunkpp unknowns)
-{
-   if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
-     *unknowns = info_ptr->unknown_chunks;
-   return ((png_uint_32)info_ptr->unknown_chunks_num);
-}
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-png_byte PNGAPI
-png_get_rgb_to_gray_status (png_structp png_ptr)
-{
-   return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
-}
-#endif
-
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
-png_voidp PNGAPI
-png_get_user_chunk_ptr(png_structp png_ptr)
-{
-   return (png_ptr? png_ptr->user_chunk_ptr : NULL);
-}
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-png_uint_32 PNGAPI
-png_get_compression_buffer_size(png_structp png_ptr)
-{
-   return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
-}
-#endif
-
-#ifndef PNG_1_0_X
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-/* this function was added to libpng 1.2.0 and should exist by default */
-png_uint_32 PNGAPI
-png_get_asm_flags (png_structp png_ptr)
-{
-    return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L);
-}
-
-/* this function was added to libpng 1.2.0 and should exist by default */
-png_uint_32 PNGAPI
-png_get_asm_flagmask (int flag_select)
-{
-    png_uint_32 settable_asm_flags = 0;
-
-    if (flag_select & PNG_SELECT_READ)
-        settable_asm_flags |=
-          PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  |
-          PNG_ASM_FLAG_MMX_READ_INTERLACE    |
-          PNG_ASM_FLAG_MMX_READ_FILTER_SUB   |
-          PNG_ASM_FLAG_MMX_READ_FILTER_UP    |
-          PNG_ASM_FLAG_MMX_READ_FILTER_AVG   |
-          PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-          /* no non-MMX flags yet */
-
-#if 0
-    /* GRR:  no write-flags yet, either, but someday... */
-    if (flag_select & PNG_SELECT_WRITE)
-        settable_asm_flags |=
-          PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
-#endif /* 0 */
-
-    return settable_asm_flags;  /* _theoretically_ settable capabilities only */
-}
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-    /* GRR:  could add this:   && defined(PNG_MMX_CODE_SUPPORTED) */
-/* this function was added to libpng 1.2.0 */
-png_uint_32 PNGAPI
-png_get_mmx_flagmask (int flag_select, int *compilerID)
-{
-    png_uint_32 settable_mmx_flags = 0;
-
-    if (flag_select & PNG_SELECT_READ)
-        settable_mmx_flags |=
-          PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  |
-          PNG_ASM_FLAG_MMX_READ_INTERLACE    |
-          PNG_ASM_FLAG_MMX_READ_FILTER_SUB   |
-          PNG_ASM_FLAG_MMX_READ_FILTER_UP    |
-          PNG_ASM_FLAG_MMX_READ_FILTER_AVG   |
-          PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-#if 0
-    /* GRR:  no MMX write support yet, but someday... */
-    if (flag_select & PNG_SELECT_WRITE)
-        settable_mmx_flags |=
-          PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
-#endif /* 0 */
-
-    if (compilerID != NULL) {
-#ifdef PNG_USE_PNGVCRD
-        *compilerID = 1;    /* MSVC */
-#else
-#ifdef PNG_USE_PNGGCCRD
-        *compilerID = 2;    /* gcc/gas */
-#else
-        *compilerID = -1;   /* unknown (i.e., no asm/MMX code compiled) */
-#endif
-#endif
-    }
-
-    return settable_mmx_flags;  /* _theoretically_ settable capabilities only */
-}
-
-/* this function was added to libpng 1.2.0 */
-png_byte PNGAPI
-png_get_mmx_bitdepth_threshold (png_structp png_ptr)
-{
-    return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0);
-}
-
-/* this function was added to libpng 1.2.0 */
-png_uint_32 PNGAPI
-png_get_mmx_rowbytes_threshold (png_structp png_ptr)
-{
-    return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
-}
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
-
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-/* these functions were added to libpng 1.2.6 */
-png_uint_32 PNGAPI
-png_get_user_width_max (png_structp png_ptr)
-{
-    return (png_ptr? png_ptr->user_width_max : 0);
-}
-png_uint_32 PNGAPI
-png_get_user_height_max (png_structp png_ptr)
-{
-    return (png_ptr? png_ptr->user_height_max : 0);
-}
-#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
-
-#endif /* ?PNG_1_0_X */
diff --git a/tkimg1.3/libpng/pngmem.c b/tkimg1.3/libpng/pngmem.c
deleted file mode 100644
index 42d2a3e..0000000
--- a/tkimg1.3/libpng/pngmem.c
+++ /dev/null
@@ -1,595 +0,0 @@
-
-/* pngmem.c - stub functions for memory allocation
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file provides a location for all memory allocation.  Users who
- * need special memory handling are expected to supply replacement
- * functions for png_malloc() and png_free(), and to use
- * png_create_read_struct_2() and png_create_write_struct_2() to
- * identify the replacement functions.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-/* Borland DOS special memory handler */
-#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
-/* if you change this, be sure to change the one in png.h also */
-
-/* Allocate memory for a png_struct.  The malloc and memset can be replaced
-   by a single call to calloc() if this is thought to improve performance. */
-png_voidp /* PRIVATE */
-png_create_struct(int type)
-{
-#ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
-}
-
-/* Alternate version of png_create_struct, for use with user-defined malloc. */
-png_voidp /* PRIVATE */
-png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-   png_size_t size;
-   png_voidp struct_ptr;
-
-   if (type == PNG_STRUCT_INFO)
-     size = png_sizeof(png_info);
-   else if (type == PNG_STRUCT_PNG)
-     size = png_sizeof(png_struct);
-   else
-     return (png_get_copyright(NULL));
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if(malloc_fn != NULL)
-   {
-      png_struct dummy_struct;
-      png_structp png_ptr = &dummy_struct;
-      png_ptr->mem_ptr=mem_ptr;
-      struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
-   }
-   else
-#endif /* PNG_USER_MEM_SUPPORTED */
-      struct_ptr = (png_voidp)farmalloc(size);
-   if (struct_ptr != NULL)
-      png_memset(struct_ptr, 0, size);
-   return (struct_ptr);
-}
-
-/* Free memory allocated by a png_create_struct() call */
-void /* PRIVATE */
-png_destroy_struct(png_voidp struct_ptr)
-{
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
-}
-
-/* Free memory allocated by a png_create_struct() call */
-void /* PRIVATE */
-png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
-    png_voidp mem_ptr)
-{
-#endif
-   if (struct_ptr != NULL)
-   {
-#ifdef PNG_USER_MEM_SUPPORTED
-      if(free_fn != NULL)
-      {
-         png_struct dummy_struct;
-         png_structp png_ptr = &dummy_struct;
-         png_ptr->mem_ptr=mem_ptr;
-         (*(free_fn))(png_ptr, struct_ptr);
-         return;
-      }
-#endif /* PNG_USER_MEM_SUPPORTED */
-      farfree (struct_ptr);
-   }
-}
-
-/* Allocate memory.  For reasonable files, size should never exceed
- * 64K.  However, zlib may allocate more then 64K if you don't tell
- * it not to.  See zconf.h and png.h for more information. zlib does
- * need to allocate exactly 64K, so whatever you call here must
- * have the ability to do that.
- *
- * Borland seems to have a problem in DOS mode for exactly 64K.
- * It gives you a segment with an offset of 8 (perhaps to store its
- * memory stuff).  zlib doesn't like this at all, so we have to
- * detect and deal with it.  This code should not be needed in
- * Windows or OS/2 modes, and only in 16 bit mode.  This code has
- * been updated by Alexander Lehmann for version 0.89 to waste less
- * memory.
- *
- * Note that we can't use png_size_t for the "size" declaration,
- * since on some systems a png_size_t is a 16-bit quantity, and as a
- * result, we would be truncating potentially larger memory requests
- * (which should cause a fatal error) and introducing major problems.
- */
-
-png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_uint_32 size)
-{
-   png_voidp ret;
-
-   if (png_ptr == NULL || size == 0)
-      return (NULL);
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if(png_ptr->malloc_fn != NULL)
-       ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
-   else
-       ret = (png_malloc_default(png_ptr, size));
-   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-       png_error(png_ptr, "Out of memory!");
-   return (ret);
-}
-
-png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_uint_32 size)
-{
-   png_voidp ret;
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-#ifdef PNG_MAX_MALLOC_64K
-   if (size > (png_uint_32)65536L)
-   {
-      png_warning(png_ptr, "Cannot Allocate > 64K");
-      ret = NULL;
-   }
-   else
-#endif
-
-   if (size != (size_t)size)
-     ret = NULL;
-   else if (size == (png_uint_32)65536L)
-   {
-      if (png_ptr->offset_table == NULL)
-      {
-         /* try to see if we need to do any of this fancy stuff */
-         ret = farmalloc(size);
-         if (ret == NULL || ((png_size_t)ret & 0xffff))
-         {
-            int num_blocks;
-            png_uint_32 total_size;
-            png_bytep table;
-            int i;
-            png_byte huge * hptr;
-
-            if (ret != NULL)
-            {
-               farfree(ret);
-               ret = NULL;
-            }
-
-            if(png_ptr->zlib_window_bits > 14)
-               num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14));
-            else
-               num_blocks = 1;
-            if (png_ptr->zlib_mem_level >= 7)
-               num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7));
-            else
-               num_blocks++;
-
-            total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16;
-
-            table = farmalloc(total_size);
-
-            if (table == NULL)
-            {
-#ifndef PNG_USER_MEM_SUPPORTED
-               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-                  png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
-               else
-                  png_warning(png_ptr, "Out Of Memory.");
-#endif
-               return (NULL);
-            }
-
-            if ((png_size_t)table & 0xfff0)
-            {
-#ifndef PNG_USER_MEM_SUPPORTED
-               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-                  png_error(png_ptr,
-                    "Farmalloc didn't return normalized pointer");
-               else
-                  png_warning(png_ptr,
-                    "Farmalloc didn't return normalized pointer");
-#endif
-               return (NULL);
-            }
-
-            png_ptr->offset_table = table;
-            png_ptr->offset_table_ptr = farmalloc(num_blocks *
-               png_sizeof (png_bytep));
-
-            if (png_ptr->offset_table_ptr == NULL)
-            {
-#ifndef PNG_USER_MEM_SUPPORTED
-               if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-                  png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
-               else
-                  png_warning(png_ptr, "Out Of memory.");
-#endif
-               return (NULL);
-            }
-
-            hptr = (png_byte huge *)table;
-            if ((png_size_t)hptr & 0xf)
-            {
-               hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
-               hptr = hptr + 16L;  /* "hptr += 16L" fails on Turbo C++ 3.0 */
-            }
-            for (i = 0; i < num_blocks; i++)
-            {
-               png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
-               hptr = hptr + (png_uint_32)65536L;  /* "+=" fails on TC++3.0 */
-            }
-
-            png_ptr->offset_table_number = num_blocks;
-            png_ptr->offset_table_count = 0;
-            png_ptr->offset_table_count_free = 0;
-         }
-      }
-
-      if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
-      {
-#ifndef PNG_USER_MEM_SUPPORTED
-         if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-            png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
-         else
-            png_warning(png_ptr, "Out of Memory.");
-#endif
-         return (NULL);
-      }
-
-      ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
-   }
-   else
-      ret = farmalloc(size);
-
-#ifndef PNG_USER_MEM_SUPPORTED
-   if (ret == NULL)
-   {
-      if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-         png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
-      else
-         png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
-   }
-#endif
-
-   return (ret);
-}
-
-/* free a pointer allocated by png_malloc().  In the default
-   configuration, png_ptr is not used, but is passed in case it
-   is needed.  If ptr is NULL, return without taking any action. */
-void PNGAPI
-png_free(png_structp png_ptr, png_voidp ptr)
-{
-   if (png_ptr == NULL || ptr == NULL)
-      return;
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if (png_ptr->free_fn != NULL)
-   {
-      (*(png_ptr->free_fn))(png_ptr, ptr);
-      return;
-   }
-   else png_free_default(png_ptr, ptr);
-}
-
-void PNGAPI
-png_free_default(png_structp png_ptr, png_voidp ptr)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-   if (png_ptr->offset_table != NULL)
-   {
-      int i;
-
-      for (i = 0; i < png_ptr->offset_table_count; i++)
-      {
-         if (ptr == png_ptr->offset_table_ptr[i])
-         {
-            ptr = NULL;
-            png_ptr->offset_table_count_free++;
-            break;
-         }
-      }
-      if (png_ptr->offset_table_count_free == png_ptr->offset_table_count)
-      {
-         farfree(png_ptr->offset_table);
-         farfree(png_ptr->offset_table_ptr);
-         png_ptr->offset_table = NULL;
-         png_ptr->offset_table_ptr = NULL;
-      }
-   }
-
-   if (ptr != NULL)
-   {
-      farfree(ptr);
-   }
-}
-
-#else /* Not the Borland DOS special memory handler */
-
-/* Allocate memory for a png_struct or a png_info.  The malloc and
-   memset can be replaced by a single call to calloc() if this is thought
-   to improve performance noticably. */
-png_voidp /* PRIVATE */
-png_create_struct(int type)
-{
-#ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
-}
-
-/* Allocate memory for a png_struct or a png_info.  The malloc and
-   memset can be replaced by a single call to calloc() if this is thought
-   to improve performance noticably. */
-png_voidp /* PRIVATE */
-png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-   png_size_t size;
-   png_voidp struct_ptr;
-
-   if (type == PNG_STRUCT_INFO)
-      size = png_sizeof(png_info);
-   else if (type == PNG_STRUCT_PNG)
-      size = png_sizeof(png_struct);
-   else
-      return (NULL);
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if(malloc_fn != NULL)
-   {
-      png_struct dummy_struct;
-      png_structp png_ptr = &dummy_struct;
-      png_ptr->mem_ptr=mem_ptr;
-      struct_ptr = (*(malloc_fn))(png_ptr, size);
-      if (struct_ptr != NULL)
-         png_memset(struct_ptr, 0, size);
-      return (struct_ptr);
-   }
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-#if defined(__TURBOC__) && !defined(__FLAT__)
-   struct_ptr = (png_voidp)farmalloc(size);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
-   struct_ptr = (png_voidp)halloc(size,1);
-# else
-   struct_ptr = (png_voidp)malloc(size);
-# endif
-#endif
-   if (struct_ptr != NULL)
-      png_memset(struct_ptr, 0, size);
-
-   return (struct_ptr);
-}
-
-
-/* Free memory allocated by a png_create_struct() call */
-void /* PRIVATE */
-png_destroy_struct(png_voidp struct_ptr)
-{
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
-}
-
-/* Free memory allocated by a png_create_struct() call */
-void /* PRIVATE */
-png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
-    png_voidp mem_ptr)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-   if (struct_ptr != NULL)
-   {
-#ifdef PNG_USER_MEM_SUPPORTED
-      if(free_fn != NULL)
-      {
-         png_struct dummy_struct;
-         png_structp png_ptr = &dummy_struct;
-         png_ptr->mem_ptr=mem_ptr;
-         (*(free_fn))(png_ptr, struct_ptr);
-         return;
-      }
-#endif /* PNG_USER_MEM_SUPPORTED */
-#if defined(__TURBOC__) && !defined(__FLAT__)
-      farfree(struct_ptr);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
-      hfree(struct_ptr);
-# else
-      free(struct_ptr);
-# endif
-#endif
-   }
-}
-
-/* Allocate memory.  For reasonable files, size should never exceed
-   64K.  However, zlib may allocate more then 64K if you don't tell
-   it not to.  See zconf.h and png.h for more information.  zlib does
-   need to allocate exactly 64K, so whatever you call here must
-   have the ability to do that. */
-
-png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_uint_32 size)
-{
-   png_voidp ret;
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if (png_ptr == NULL || size == 0)
-      return (NULL);
-
-   if(png_ptr->malloc_fn != NULL)
-       ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
-   else
-       ret = (png_malloc_default(png_ptr, size));
-   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-       png_error(png_ptr, "Out of Memory!");
-   return (ret);
-}
-
-png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_uint_32 size)
-{
-   png_voidp ret;
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-   if (png_ptr == NULL || size == 0)
-      return (NULL);
-
-#ifdef PNG_MAX_MALLOC_64K
-   if (size > (png_uint_32)65536L)
-   {
-#ifndef PNG_USER_MEM_SUPPORTED
-      if(png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-         png_error(png_ptr, "Cannot Allocate > 64K");
-      else
-#endif
-         return NULL;
-   }
-#endif
-
- /* Check for overflow */
-#if defined(__TURBOC__) && !defined(__FLAT__)
- if (size != (unsigned long)size)
-   ret = NULL;
- else
-   ret = farmalloc(size);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
- if (size != (unsigned long)size)
-   ret = NULL;
- else
-   ret = halloc(size, 1);
-# else
- if (size != (size_t)size)
-   ret = NULL;
- else
-   ret = malloc((size_t)size);
-# endif
-#endif
-
-#ifndef PNG_USER_MEM_SUPPORTED
-   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
-      png_error(png_ptr, "Out of Memory");
-#endif
-
-   return (ret);
-}
-
-/* Free a pointer allocated by png_malloc().  If ptr is NULL, return
-   without taking any action. */
-void PNGAPI
-png_free(png_structp png_ptr, png_voidp ptr)
-{
-   if (png_ptr == NULL || ptr == NULL)
-      return;
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   if (png_ptr->free_fn != NULL)
-   {
-      (*(png_ptr->free_fn))(png_ptr, ptr);
-      return;
-   }
-   else png_free_default(png_ptr, ptr);
-}
-void PNGAPI
-png_free_default(png_structp png_ptr, png_voidp ptr)
-{
-   if (png_ptr == NULL || ptr == NULL)
-      return;
-
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-#if defined(__TURBOC__) && !defined(__FLAT__)
-   farfree(ptr);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
-   hfree(ptr);
-# else
-   free(ptr);
-# endif
-#endif
-}
-
-#endif /* Not Borland DOS special memory handler */
-
-#if defined(PNG_1_0_X)
-#  define png_malloc_warn png_malloc
-#else
-/* This function was added at libpng version 1.2.3.  The png_malloc_warn()
- * function will set up png_malloc() to issue a png_warning and return NULL
- * instead of issuing a png_error, if it fails to allocate the requested
- * memory.
- */
-png_voidp PNGAPI
-png_malloc_warn(png_structp png_ptr, png_uint_32 size)
-{
-   png_voidp ptr;
-   png_uint_32 save_flags=png_ptr->flags;
-
-   png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
-   ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);
-   png_ptr->flags=save_flags;
-   return(ptr);
-}
-#endif
-
-png_voidp PNGAPI
-png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
-   png_uint_32 length)
-{
-   png_size_t size;
-
-   size = (png_size_t)length;
-   if ((png_uint_32)size != length)
-      png_error(png_ptr,"Overflow in png_memcpy_check.");
-
-   return(png_memcpy (s1, s2, size));
-}
-
-png_voidp PNGAPI
-png_memset_check (png_structp png_ptr, png_voidp s1, int value,
-   png_uint_32 length)
-{
-   png_size_t size;
-
-   size = (png_size_t)length;
-   if ((png_uint_32)size != length)
-      png_error(png_ptr,"Overflow in png_memset_check.");
-
-   return (png_memset (s1, value, size));
-
-}
-
-#ifdef PNG_USER_MEM_SUPPORTED
-/* This function is called when the application wants to use another method
- * of allocating and freeing memory.
- */
-void PNGAPI
-png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
-  malloc_fn, png_free_ptr free_fn)
-{
-   png_ptr->mem_ptr = mem_ptr;
-   png_ptr->malloc_fn = malloc_fn;
-   png_ptr->free_fn = free_fn;
-}
-
-/* This function returns a pointer to the mem_ptr associated with the user
- * functions.  The application should free any memory associated with this
- * pointer before png_write_destroy and png_read_destroy are called.
- */
-png_voidp PNGAPI
-png_get_mem_ptr(png_structp png_ptr)
-{
-   return ((png_voidp)png_ptr->mem_ptr);
-}
-#endif /* PNG_USER_MEM_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngnow.png b/tkimg1.3/libpng/pngnow.png
deleted file mode 100644
index 174b5fa..0000000
Binary files a/tkimg1.3/libpng/pngnow.png and /dev/null differ
diff --git a/tkimg1.3/libpng/pngpread.c b/tkimg1.3/libpng/pngpread.c
deleted file mode 100644
index d97691b..0000000
--- a/tkimg1.3/libpng/pngpread.c
+++ /dev/null
@@ -1,1573 +0,0 @@
-
-/* pngpread.c - read a png file in push mode
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-
-/* push model modes */
-#define PNG_READ_SIG_MODE   0
-#define PNG_READ_CHUNK_MODE 1
-#define PNG_READ_IDAT_MODE  2
-#define PNG_SKIP_MODE       3
-#define PNG_READ_tEXt_MODE  4
-#define PNG_READ_zTXt_MODE  5
-#define PNG_READ_DONE_MODE  6
-#define PNG_READ_iTXt_MODE  7
-#define PNG_ERROR_MODE      8
-
-void PNGAPI
-png_process_data(png_structp png_ptr, png_infop info_ptr,
-   png_bytep buffer, png_size_t buffer_size)
-{
-   png_push_restore_buffer(png_ptr, buffer, buffer_size);
-
-   while (png_ptr->buffer_size)
-   {
-      png_process_some_data(png_ptr, info_ptr);
-   }
-}
-
-/* What we do with the incoming data depends on what we were previously
- * doing before we ran out of data...
- */
-void /* PRIVATE */
-png_process_some_data(png_structp png_ptr, png_infop info_ptr)
-{
-   switch (png_ptr->process_mode)
-   {
-      case PNG_READ_SIG_MODE:
-      {
-         png_push_read_sig(png_ptr, info_ptr);
-         break;
-      }
-      case PNG_READ_CHUNK_MODE:
-      {
-         png_push_read_chunk(png_ptr, info_ptr);
-         break;
-      }
-      case PNG_READ_IDAT_MODE:
-      {
-         png_push_read_IDAT(png_ptr);
-         break;
-      }
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      case PNG_READ_tEXt_MODE:
-      {
-         png_push_read_tEXt(png_ptr, info_ptr);
-         break;
-      }
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      case PNG_READ_zTXt_MODE:
-      {
-         png_push_read_zTXt(png_ptr, info_ptr);
-         break;
-      }
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      case PNG_READ_iTXt_MODE:
-      {
-         png_push_read_iTXt(png_ptr, info_ptr);
-         break;
-      }
-#endif
-      case PNG_SKIP_MODE:
-      {
-         png_push_crc_finish(png_ptr);
-         break;
-      }
-      default:
-      {
-         png_ptr->buffer_size = 0;
-         break;
-      }
-   }
-}
-
-/* Read any remaining signature bytes from the stream and compare them with
- * the correct PNG signature.  It is possible that this routine is called
- * with bytes already read from the signature, either because they have been
- * checked by the calling application, or because of multiple calls to this
- * routine.
- */
-void /* PRIVATE */
-png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
-{
-   png_size_t num_checked = png_ptr->sig_bytes,
-             num_to_check = 8 - num_checked;
-
-   if (png_ptr->buffer_size < num_to_check)
-   {
-      num_to_check = png_ptr->buffer_size;
-   }
-
-   png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]),
-      num_to_check);
-   png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes+num_to_check);
-
-   if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
-   {
-      if (num_checked < 4 &&
-          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
-         png_error(png_ptr, "Not a PNG file");
-      else
-         png_error(png_ptr, "PNG file corrupted by ASCII conversion");
-   }
-   else
-   {
-      if (png_ptr->sig_bytes >= 8)
-      {
-         png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-      }
-   }
-}
-
-void /* PRIVATE */
-png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-      PNG_IHDR;
-      PNG_IDAT;
-      PNG_IEND;
-      PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
-      PNG_bKGD;
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-      PNG_cHRM;
-#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
-      PNG_gAMA;
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-      PNG_hIST;
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-      PNG_iCCP;
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      PNG_iTXt;
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-      PNG_oFFs;
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-      PNG_pCAL;
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-      PNG_pHYs;
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-      PNG_sBIT;
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-      PNG_sCAL;
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      PNG_sRGB;
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-      PNG_sPLT;
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      PNG_tEXt;
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-      PNG_tIME;
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-      PNG_tRNS;
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      PNG_zTXt;
-#endif
-#endif /* PNG_USE_LOCAL_ARRAYS */
-   /* First we make sure we have enough data for the 4 byte chunk name
-    * and the 4 byte chunk length before proceeding with decoding the
-    * chunk data.  To fully decode each of these chunks, we also make
-    * sure we have enough data in the buffer for the 4 byte CRC at the
-    * end of every chunk (except IDAT, which is handled separately).
-    */
-   if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
-   {
-      png_byte chunk_length[4];
-
-      if (png_ptr->buffer_size < 8)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_push_fill_buffer(png_ptr, chunk_length, 4);
-      png_ptr->push_length = png_get_uint_31(png_ptr,chunk_length);
-      png_reset_crc(png_ptr);
-      png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-      png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
-   }
-
-   if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length);
-   }
-   else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length);
-
-      png_ptr->process_mode = PNG_READ_DONE_MODE;
-      png_push_have_end(png_ptr, info_ptr);
-   }
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-   else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-         png_ptr->mode |= PNG_HAVE_IDAT;
-      png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
-      if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-         png_ptr->mode |= PNG_HAVE_PLTE;
-      else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-      {
-         if (!(png_ptr->mode & PNG_HAVE_IHDR))
-            png_error(png_ptr, "Missing IHDR before IDAT");
-         else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-                  !(png_ptr->mode & PNG_HAVE_PLTE))
-            png_error(png_ptr, "Missing PLTE before IDAT");
-      }
-   }
-#endif
-   else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length);
-   }
-   else if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
-   {
-      /* If we reach an IDAT chunk, this means we have read all of the
-       * header chunks, and we can start reading the image (or if this
-       * is called after the image has been read - we have an error).
-       */
-     if (!(png_ptr->mode & PNG_HAVE_IHDR))
-       png_error(png_ptr, "Missing IHDR before IDAT");
-     else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-         !(png_ptr->mode & PNG_HAVE_PLTE))
-       png_error(png_ptr, "Missing PLTE before IDAT");
-
-      if (png_ptr->mode & PNG_HAVE_IDAT)
-      {
-         if (png_ptr->push_length == 0)
-            return;
-
-         if (png_ptr->mode & PNG_AFTER_IDAT)
-            png_error(png_ptr, "Too many IDAT's found");
-      }
-
-      png_ptr->idat_size = png_ptr->push_length;
-      png_ptr->mode |= PNG_HAVE_IDAT;
-      png_ptr->process_mode = PNG_READ_IDAT_MODE;
-      png_push_have_info(png_ptr, info_ptr);
-      png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
-      png_ptr->zstream.next_out = png_ptr->row_buf;
-      return;
-   }
-#if defined(PNG_READ_gAMA_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_bKGD_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-   else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4))
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
-   }
-#endif
-   else
-   {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-      png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
-   }
-
-   png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-}
-
-void /* PRIVATE */
-png_push_crc_skip(png_structp png_ptr, png_uint_32 skip)
-{
-   png_ptr->process_mode = PNG_SKIP_MODE;
-   png_ptr->skip_length = skip;
-}
-
-void /* PRIVATE */
-png_push_crc_finish(png_structp png_ptr)
-{
-   if (png_ptr->skip_length && png_ptr->save_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size)
-         save_size = (png_size_t)png_ptr->skip_length;
-      else
-         save_size = png_ptr->save_buffer_size;
-
-      png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
-
-      png_ptr->skip_length -= save_size;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->save_buffer_size -= save_size;
-      png_ptr->save_buffer_ptr += save_size;
-   }
-   if (png_ptr->skip_length && png_ptr->current_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size)
-         save_size = (png_size_t)png_ptr->skip_length;
-      else
-         save_size = png_ptr->current_buffer_size;
-
-      png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
-
-      png_ptr->skip_length -= save_size;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->current_buffer_size -= save_size;
-      png_ptr->current_buffer_ptr += save_size;
-   }
-   if (!png_ptr->skip_length)
-   {
-      if (png_ptr->buffer_size < 4)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_crc_finish(png_ptr, 0);
-      png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-   }
-}
-
-void PNGAPI
-png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
-{
-   png_bytep ptr;
-
-   ptr = buffer;
-   if (png_ptr->save_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (length < png_ptr->save_buffer_size)
-         save_size = length;
-      else
-         save_size = png_ptr->save_buffer_size;
-
-      png_memcpy(ptr, png_ptr->save_buffer_ptr, save_size);
-      length -= save_size;
-      ptr += save_size;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->save_buffer_size -= save_size;
-      png_ptr->save_buffer_ptr += save_size;
-   }
-   if (length && png_ptr->current_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (length < png_ptr->current_buffer_size)
-         save_size = length;
-      else
-         save_size = png_ptr->current_buffer_size;
-
-      png_memcpy(ptr, png_ptr->current_buffer_ptr, save_size);
-      png_ptr->buffer_size -= save_size;
-      png_ptr->current_buffer_size -= save_size;
-      png_ptr->current_buffer_ptr += save_size;
-   }
-}
-
-void /* PRIVATE */
-png_push_save_buffer(png_structp png_ptr)
-{
-   if (png_ptr->save_buffer_size)
-   {
-      if (png_ptr->save_buffer_ptr != png_ptr->save_buffer)
-      {
-         png_size_t i,istop;
-         png_bytep sp;
-         png_bytep dp;
-
-         istop = png_ptr->save_buffer_size;
-         for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;
-            i < istop; i++, sp++, dp++)
-         {
-            *dp = *sp;
-         }
-      }
-   }
-   if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
-      png_ptr->save_buffer_max)
-   {
-      png_size_t new_max;
-      png_bytep old_buffer;
-
-      if (png_ptr->save_buffer_size > PNG_SIZE_MAX - 
-         (png_ptr->current_buffer_size + 256))
-      {
-        png_error(png_ptr, "Potential overflow of save_buffer");
-      }
-      new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
-      old_buffer = png_ptr->save_buffer;
-      png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr,
-         (png_uint_32)new_max);
-      png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
-      png_free(png_ptr, old_buffer);
-      png_ptr->save_buffer_max = new_max;
-   }
-   if (png_ptr->current_buffer_size)
-   {
-      png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size,
-         png_ptr->current_buffer_ptr, png_ptr->current_buffer_size);
-      png_ptr->save_buffer_size += png_ptr->current_buffer_size;
-      png_ptr->current_buffer_size = 0;
-   }
-   png_ptr->save_buffer_ptr = png_ptr->save_buffer;
-   png_ptr->buffer_size = 0;
-}
-
-void /* PRIVATE */
-png_push_restore_buffer(png_structp png_ptr, png_bytep buffer,
-   png_size_t buffer_length)
-{
-   png_ptr->current_buffer = buffer;
-   png_ptr->current_buffer_size = buffer_length;
-   png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size;
-   png_ptr->current_buffer_ptr = png_ptr->current_buffer;
-}
-
-void /* PRIVATE */
-png_push_read_IDAT(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_IDAT;
-#endif
-   if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
-   {
-      png_byte chunk_length[4];
-
-      if (png_ptr->buffer_size < 8)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_push_fill_buffer(png_ptr, chunk_length, 4);
-      png_ptr->push_length = png_get_uint_31(png_ptr,chunk_length);
-      png_reset_crc(png_ptr);
-      png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-      png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
-
-      if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
-      {
-         png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-         if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
-            png_error(png_ptr, "Not enough compressed data");
-         return;
-      }
-
-      png_ptr->idat_size = png_ptr->push_length;
-   }
-   if (png_ptr->idat_size && png_ptr->save_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size)
-      {
-         save_size = (png_size_t)png_ptr->idat_size;
-         /* check for overflow */
-         if((png_uint_32)save_size != png_ptr->idat_size)
-            png_error(png_ptr, "save_size overflowed in pngpread");
-      }
-      else
-         save_size = png_ptr->save_buffer_size;
-
-      png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
-      if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
-         png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size);
-      png_ptr->idat_size -= save_size;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->save_buffer_size -= save_size;
-      png_ptr->save_buffer_ptr += save_size;
-   }
-   if (png_ptr->idat_size && png_ptr->current_buffer_size)
-   {
-      png_size_t save_size;
-
-      if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size)
-      {
-         save_size = (png_size_t)png_ptr->idat_size;
-         /* check for overflow */
-         if((png_uint_32)save_size != png_ptr->idat_size)
-            png_error(png_ptr, "save_size overflowed in pngpread");
-      }
-      else
-         save_size = png_ptr->current_buffer_size;
-
-      png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
-      if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
-        png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size);
-
-      png_ptr->idat_size -= save_size;
-      png_ptr->buffer_size -= save_size;
-      png_ptr->current_buffer_size -= save_size;
-      png_ptr->current_buffer_ptr += save_size;
-   }
-   if (!png_ptr->idat_size)
-   {
-      if (png_ptr->buffer_size < 4)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_crc_finish(png_ptr, 0);
-      png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-      png_ptr->mode |= PNG_AFTER_IDAT;
-   }
-}
-
-void /* PRIVATE */
-png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
-   png_size_t buffer_length)
-{
-   int ret;
-
-   if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length)
-      png_error(png_ptr, "Extra compression data");
-
-   png_ptr->zstream.next_in = buffer;
-   png_ptr->zstream.avail_in = (uInt)buffer_length;
-   for(;;)
-   {
-      ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
-      if (ret != Z_OK)
-      {
-         if (ret == Z_STREAM_END)
-         {
-            if (png_ptr->zstream.avail_in)
-               png_error(png_ptr, "Extra compressed data");
-            if (!(png_ptr->zstream.avail_out))
-            {
-               png_push_process_row(png_ptr);
-            }
-
-            png_ptr->mode |= PNG_AFTER_IDAT;
-            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-            break;
-         }
-         else if (ret == Z_BUF_ERROR)
-            break;
-         else
-            png_error(png_ptr, "Decompression Error");
-      }
-      if (!(png_ptr->zstream.avail_out))
-      {
-         if ((
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-             png_ptr->interlaced && png_ptr->pass > 6) ||
-             (!png_ptr->interlaced &&
-#endif
-             png_ptr->row_number == png_ptr->num_rows))
-         {
-           if (png_ptr->zstream.avail_in)
-             png_warning(png_ptr, "Too much data in IDAT chunks");
-           png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-           break;
-         }
-         png_push_process_row(png_ptr);
-         png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
-         png_ptr->zstream.next_out = png_ptr->row_buf;
-      }
-      else
-         break;
-   }
-}
-
-void /* PRIVATE */
-png_push_process_row(png_structp png_ptr)
-{
-   png_ptr->row_info.color_type = png_ptr->color_type;
-   png_ptr->row_info.width = png_ptr->iwidth;
-   png_ptr->row_info.channels = png_ptr->channels;
-   png_ptr->row_info.bit_depth = png_ptr->bit_depth;
-   png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
-
-   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
-       png_ptr->row_info.width);
-
-   png_read_filter_row(png_ptr, &(png_ptr->row_info),
-      png_ptr->row_buf + 1, png_ptr->prev_row + 1,
-      (int)(png_ptr->row_buf[0]));
-
-   png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
-      png_ptr->rowbytes + 1);
-
-   if (png_ptr->transformations)
-      png_do_read_transformations(png_ptr);
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-   /* blow up interlaced rows to full size */
-   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
-   {
-      if (png_ptr->pass < 6)
-/*       old interface (pre-1.0.9):
-         png_do_read_interlace(&(png_ptr->row_info),
-            png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
- */
-         png_do_read_interlace(png_ptr);
-
-    switch (png_ptr->pass)
-    {
-         case 0:
-         {
-            int i;
-            for (i = 0; i < 8 && png_ptr->pass == 0; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr); /* updates png_ptr->pass */
-            }
-            if (png_ptr->pass == 2) /* pass 1 might be empty */
-            {
-               for (i = 0; i < 4 && png_ptr->pass == 2; i++)
-               {
-                  png_push_have_row(png_ptr, png_bytep_NULL);
-                  png_read_push_finish_row(png_ptr);
-               }
-            }
-            if (png_ptr->pass == 4 && png_ptr->height <= 4)
-            {
-               for (i = 0; i < 2 && png_ptr->pass == 4; i++)
-               {
-                  png_push_have_row(png_ptr, png_bytep_NULL);
-                  png_read_push_finish_row(png_ptr);
-               }
-            }
-            if (png_ptr->pass == 6 && png_ptr->height <= 4)
-            {
-                png_push_have_row(png_ptr, png_bytep_NULL);
-                png_read_push_finish_row(png_ptr);
-            }
-            break;
-         }
-         case 1:
-         {
-            int i;
-            for (i = 0; i < 8 && png_ptr->pass == 1; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr);
-            }
-            if (png_ptr->pass == 2) /* skip top 4 generated rows */
-            {
-               for (i = 0; i < 4 && png_ptr->pass == 2; i++)
-               {
-                  png_push_have_row(png_ptr, png_bytep_NULL);
-                  png_read_push_finish_row(png_ptr);
-               }
-            }
-            break;
-         }
-         case 2:
-         {
-            int i;
-            for (i = 0; i < 4 && png_ptr->pass == 2; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr);
-            }
-            for (i = 0; i < 4 && png_ptr->pass == 2; i++)
-            {
-               png_push_have_row(png_ptr, png_bytep_NULL);
-               png_read_push_finish_row(png_ptr);
-            }
-            if (png_ptr->pass == 4) /* pass 3 might be empty */
-            {
-               for (i = 0; i < 2 && png_ptr->pass == 4; i++)
-               {
-                  png_push_have_row(png_ptr, png_bytep_NULL);
-                  png_read_push_finish_row(png_ptr);
-               }
-            }
-            break;
-         }
-         case 3:
-         {
-            int i;
-            for (i = 0; i < 4 && png_ptr->pass == 3; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr);
-            }
-            if (png_ptr->pass == 4) /* skip top two generated rows */
-            {
-               for (i = 0; i < 2 && png_ptr->pass == 4; i++)
-               {
-                  png_push_have_row(png_ptr, png_bytep_NULL);
-                  png_read_push_finish_row(png_ptr);
-               }
-            }
-            break;
-         }
-         case 4:
-         {
-            int i;
-            for (i = 0; i < 2 && png_ptr->pass == 4; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr);
-            }
-            for (i = 0; i < 2 && png_ptr->pass == 4; i++)
-            {
-               png_push_have_row(png_ptr, png_bytep_NULL);
-               png_read_push_finish_row(png_ptr);
-            }
-            if (png_ptr->pass == 6) /* pass 5 might be empty */
-            {
-               png_push_have_row(png_ptr, png_bytep_NULL);
-               png_read_push_finish_row(png_ptr);
-            }
-            break;
-         }
-         case 5:
-         {
-            int i;
-            for (i = 0; i < 2 && png_ptr->pass == 5; i++)
-            {
-               png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-               png_read_push_finish_row(png_ptr);
-            }
-            if (png_ptr->pass == 6) /* skip top generated row */
-            {
-               png_push_have_row(png_ptr, png_bytep_NULL);
-               png_read_push_finish_row(png_ptr);
-            }
-            break;
-         }
-         case 6:
-         {
-            png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-            png_read_push_finish_row(png_ptr);
-            if (png_ptr->pass != 6)
-               break;
-            png_push_have_row(png_ptr, png_bytep_NULL);
-            png_read_push_finish_row(png_ptr);
-         }
-      }
-   }
-   else
-#endif
-   {
-      png_push_have_row(png_ptr, png_ptr->row_buf + 1);
-      png_read_push_finish_row(png_ptr);
-   }
-}
-
-void /* PRIVATE */
-png_read_push_finish_row(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-
-   /* start of interlace block in the y direction */
-   const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
-
-   /* offset to next interlace block in the y direction */
-   const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-
-   /* Width of interlace block.  This is not currently used - if you need
-    * it, uncomment it here and in png.h
-   const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
-   */
-
-   /* Height of interlace block.  This is not currently used - if you need
-    * it, uncomment it here and in png.h
-   const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
-   */
-#endif
-
-   png_ptr->row_number++;
-   if (png_ptr->row_number < png_ptr->num_rows)
-      return;
-
-   if (png_ptr->interlaced)
-   {
-      png_ptr->row_number = 0;
-      png_memset_check(png_ptr, png_ptr->prev_row, 0,
-         png_ptr->rowbytes + 1);
-      do
-      {
-         png_ptr->pass++;
-         if ((png_ptr->pass == 1 && png_ptr->width < 5) ||
-             (png_ptr->pass == 3 && png_ptr->width < 3) ||
-             (png_ptr->pass == 5 && png_ptr->width < 2))
-           png_ptr->pass++;
-
-         if (png_ptr->pass > 7)
-            png_ptr->pass--;
-         if (png_ptr->pass >= 7)
-            break;
-
-         png_ptr->iwidth = (png_ptr->width +
-            png_pass_inc[png_ptr->pass] - 1 -
-            png_pass_start[png_ptr->pass]) /
-            png_pass_inc[png_ptr->pass];
-
-         png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
-            png_ptr->iwidth) + 1;
-
-         if (png_ptr->transformations & PNG_INTERLACE)
-            break;
-
-         png_ptr->num_rows = (png_ptr->height +
-            png_pass_yinc[png_ptr->pass] - 1 -
-            png_pass_ystart[png_ptr->pass]) /
-            png_pass_yinc[png_ptr->pass];
-
-      } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0);
-   }
-}
-
-#if defined(PNG_READ_tEXt_SUPPORTED)
-void /* PRIVATE */
-png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
-   length)
-{
-   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
-      {
-         png_error(png_ptr, "Out of place tEXt");
-         /* to quiet some compiler warnings */
-         if(info_ptr == NULL) return;
-      }
-
-#ifdef PNG_MAX_MALLOC_64K
-   png_ptr->skip_length = 0;  /* This may not be necessary */
-
-   if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
-   {
-      png_warning(png_ptr, "tEXt chunk too large to fit in memory");
-      png_ptr->skip_length = length - (png_uint_32)65535L;
-      length = (png_uint_32)65535L;
-   }
-#endif
-
-   png_ptr->current_text = (png_charp)png_malloc(png_ptr,
-         (png_uint_32)(length+1));
-   png_ptr->current_text[length] = '\0';
-   png_ptr->current_text_ptr = png_ptr->current_text;
-   png_ptr->current_text_size = (png_size_t)length;
-   png_ptr->current_text_left = (png_size_t)length;
-   png_ptr->process_mode = PNG_READ_tEXt_MODE;
-}
-
-void /* PRIVATE */
-png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr->buffer_size && png_ptr->current_text_left)
-   {
-      png_size_t text_size;
-
-      if (png_ptr->buffer_size < png_ptr->current_text_left)
-         text_size = png_ptr->buffer_size;
-      else
-         text_size = png_ptr->current_text_left;
-      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
-      png_ptr->current_text_left -= text_size;
-      png_ptr->current_text_ptr += text_size;
-   }
-   if (!(png_ptr->current_text_left))
-   {
-      png_textp text_ptr;
-      png_charp text;
-      png_charp key;
-      int ret;
-
-      if (png_ptr->buffer_size < 4)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_push_crc_finish(png_ptr);
-
-#if defined(PNG_MAX_MALLOC_64K)
-      if (png_ptr->skip_length)
-         return;
-#endif
-
-      key = png_ptr->current_text;
-
-      for (text = key; *text; text++)
-         /* empty loop */ ;
-
-      if (text != key + png_ptr->current_text_size)
-         text++;
-
-      text_ptr = (png_textp)png_malloc(png_ptr,
-         (png_uint_32)png_sizeof(png_text));
-      text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
-      text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
-      text_ptr->lang = NULL;
-      text_ptr->lang_key = NULL;
-#endif
-      text_ptr->text = text;
-
-      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-      png_free(png_ptr, key);
-      png_free(png_ptr, text_ptr);
-      png_ptr->current_text = NULL;
-
-      if (ret)
-        png_warning(png_ptr, "Insufficient memory to store text chunk.");
-   }
-}
-#endif
-
-#if defined(PNG_READ_zTXt_SUPPORTED)
-void /* PRIVATE */
-png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
-   length)
-{
-   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
-      {
-         png_error(png_ptr, "Out of place zTXt");
-         /* to quiet some compiler warnings */
-         if(info_ptr == NULL) return;
-      }
-
-#ifdef PNG_MAX_MALLOC_64K
-   /* We can't handle zTXt chunks > 64K, since we don't have enough space
-    * to be able to store the uncompressed data.  Actually, the threshold
-    * is probably around 32K, but it isn't as definite as 64K is.
-    */
-   if (length > (png_uint_32)65535L)
-   {
-      png_warning(png_ptr, "zTXt chunk too large to fit in memory");
-      png_push_crc_skip(png_ptr, length);
-      return;
-   }
-#endif
-
-   png_ptr->current_text = (png_charp)png_malloc(png_ptr,
-       (png_uint_32)(length+1));
-   png_ptr->current_text[length] = '\0';
-   png_ptr->current_text_ptr = png_ptr->current_text;
-   png_ptr->current_text_size = (png_size_t)length;
-   png_ptr->current_text_left = (png_size_t)length;
-   png_ptr->process_mode = PNG_READ_zTXt_MODE;
-}
-
-void /* PRIVATE */
-png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr->buffer_size && png_ptr->current_text_left)
-   {
-      png_size_t text_size;
-
-      if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left)
-         text_size = png_ptr->buffer_size;
-      else
-         text_size = png_ptr->current_text_left;
-      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
-      png_ptr->current_text_left -= text_size;
-      png_ptr->current_text_ptr += text_size;
-   }
-   if (!(png_ptr->current_text_left))
-   {
-      png_textp text_ptr;
-      png_charp text;
-      png_charp key;
-      int ret;
-      png_size_t text_size, key_size;
-
-      if (png_ptr->buffer_size < 4)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_push_crc_finish(png_ptr);
-
-      key = png_ptr->current_text;
-
-      for (text = key; *text; text++)
-         /* empty loop */ ;
-
-      /* zTXt can't have zero text */
-      if (text == key + png_ptr->current_text_size)
-      {
-         png_ptr->current_text = NULL;
-         png_free(png_ptr, key);
-         return;
-      }
-
-      text++;
-
-      if (*text != PNG_TEXT_COMPRESSION_zTXt) /* check compression byte */
-      {
-         png_ptr->current_text = NULL;
-         png_free(png_ptr, key);
-         return;
-      }
-
-      text++;
-
-      png_ptr->zstream.next_in = (png_bytep )text;
-      png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size -
-         (text - key));
-      png_ptr->zstream.next_out = png_ptr->zbuf;
-      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
-      key_size = text - key;
-      text_size = 0;
-      text = NULL;
-      ret = Z_STREAM_END;
-
-      while (png_ptr->zstream.avail_in)
-      {
-         ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
-         if (ret != Z_OK && ret != Z_STREAM_END)
-         {
-            inflateReset(&png_ptr->zstream);
-            png_ptr->zstream.avail_in = 0;
-            png_ptr->current_text = NULL;
-            png_free(png_ptr, key);
-            png_free(png_ptr, text);
-            return;
-         }
-         if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END)
-         {
-            if (text == NULL)
-            {
-               text = (png_charp)png_malloc(png_ptr,
-                  (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out
-                     + key_size + 1));
-               png_memcpy(text + key_size, png_ptr->zbuf,
-                  png_ptr->zbuf_size - png_ptr->zstream.avail_out);
-               png_memcpy(text, key, key_size);
-               text_size = key_size + png_ptr->zbuf_size -
-                  png_ptr->zstream.avail_out;
-               *(text + text_size) = '\0';
-            }
-            else
-            {
-               png_charp tmp;
-
-               tmp = text;
-               text = (png_charp)png_malloc(png_ptr, text_size +
-                  (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out
-                   + 1));
-               png_memcpy(text, tmp, text_size);
-               png_free(png_ptr, tmp);
-               png_memcpy(text + text_size, png_ptr->zbuf,
-                  png_ptr->zbuf_size - png_ptr->zstream.avail_out);
-               text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
-               *(text + text_size) = '\0';
-            }
-            if (ret != Z_STREAM_END)
-            {
-               png_ptr->zstream.next_out = png_ptr->zbuf;
-               png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-            }
-         }
-         else
-         {
-            break;
-         }
-
-         if (ret == Z_STREAM_END)
-            break;
-      }
-
-      inflateReset(&png_ptr->zstream);
-      png_ptr->zstream.avail_in = 0;
-
-      if (ret != Z_STREAM_END)
-      {
-         png_ptr->current_text = NULL;
-         png_free(png_ptr, key);
-         png_free(png_ptr, text);
-         return;
-      }
-
-      png_ptr->current_text = NULL;
-      png_free(png_ptr, key);
-      key = text;
-      text += key_size;
-
-      text_ptr = (png_textp)png_malloc(png_ptr,
-          (png_uint_32)png_sizeof(png_text));
-      text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
-      text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
-      text_ptr->lang = NULL;
-      text_ptr->lang_key = NULL;
-#endif
-      text_ptr->text = text;
-
-      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-      png_free(png_ptr, key);
-      png_free(png_ptr, text_ptr);
-
-      if (ret)
-        png_warning(png_ptr, "Insufficient memory to store text chunk.");
-   }
-}
-#endif
-
-#if defined(PNG_READ_iTXt_SUPPORTED)
-void /* PRIVATE */
-png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
-   length)
-{
-   if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
-      {
-         png_error(png_ptr, "Out of place iTXt");
-         /* to quiet some compiler warnings */
-         if(info_ptr == NULL) return;
-      }
-
-#ifdef PNG_MAX_MALLOC_64K
-   png_ptr->skip_length = 0;  /* This may not be necessary */
-
-   if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
-   {
-      png_warning(png_ptr, "iTXt chunk too large to fit in memory");
-      png_ptr->skip_length = length - (png_uint_32)65535L;
-      length = (png_uint_32)65535L;
-   }
-#endif
-
-   png_ptr->current_text = (png_charp)png_malloc(png_ptr,
-         (png_uint_32)(length+1));
-   png_ptr->current_text[length] = '\0';
-   png_ptr->current_text_ptr = png_ptr->current_text;
-   png_ptr->current_text_size = (png_size_t)length;
-   png_ptr->current_text_left = (png_size_t)length;
-   png_ptr->process_mode = PNG_READ_iTXt_MODE;
-}
-
-void /* PRIVATE */
-png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
-{
-
-   if (png_ptr->buffer_size && png_ptr->current_text_left)
-   {
-      png_size_t text_size;
-
-      if (png_ptr->buffer_size < png_ptr->current_text_left)
-         text_size = png_ptr->buffer_size;
-      else
-         text_size = png_ptr->current_text_left;
-      png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
-      png_ptr->current_text_left -= text_size;
-      png_ptr->current_text_ptr += text_size;
-   }
-   if (!(png_ptr->current_text_left))
-   {
-      png_textp text_ptr;
-      png_charp key;
-      int comp_flag;
-      png_charp lang;
-      png_charp lang_key;
-      png_charp text;
-      int ret;
-
-      if (png_ptr->buffer_size < 4)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
-      png_push_crc_finish(png_ptr);
-
-#if defined(PNG_MAX_MALLOC_64K)
-      if (png_ptr->skip_length)
-         return;
-#endif
-
-      key = png_ptr->current_text;
-
-      for (lang = key; *lang; lang++)
-         /* empty loop */ ;
-
-      if (lang != key + png_ptr->current_text_size)
-         lang++;
-
-      comp_flag = *lang++;
-      lang++;     /* skip comp_type, always zero */
-
-      for (lang_key = lang; *lang_key; lang_key++)
-         /* empty loop */ ;
-      lang_key++;        /* skip NUL separator */
-
-      for (text = lang_key; *text; text++)
-         /* empty loop */ ;
-
-      if (text != key + png_ptr->current_text_size)
-         text++;
-
-      text_ptr = (png_textp)png_malloc(png_ptr,
-         (png_uint_32)png_sizeof(png_text));
-      text_ptr->compression = comp_flag + 2;
-      text_ptr->key = key;
-      text_ptr->lang = lang;
-      text_ptr->lang_key = lang_key;
-      text_ptr->text = text;
-      text_ptr->text_length = 0;
-      text_ptr->itxt_length = png_strlen(text);
-
-      ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-      png_ptr->current_text = NULL;
-
-      png_free(png_ptr, text_ptr);
-      if (ret)
-        png_warning(png_ptr, "Insufficient memory to store iTXt chunk.");
-   }
-}
-#endif
-
-/* This function is called when we haven't found a handler for this
- * chunk.  If there isn't a problem with the chunk itself (ie a bad chunk
- * name or a critical chunk), the chunk is (currently) silently ignored.
- */
-void /* PRIVATE */
-png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
-   length)
-{
-   png_uint_32 skip=0;
-   png_check_chunk_name(png_ptr, png_ptr->chunk_name);
-
-   if (!(png_ptr->chunk_name[0] & 0x20))
-   {
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-      if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
-           PNG_HANDLE_CHUNK_ALWAYS
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-           && png_ptr->read_user_chunk_fn == NULL
-#endif
-         )
-#endif
-         png_chunk_error(png_ptr, "unknown critical chunk");
-
-      /* to quiet compiler warnings about unused info_ptr */
-      if (info_ptr == NULL)
-         return;
-   }
-
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-   if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
-   {
-       png_unknown_chunk chunk;
-
-#ifdef PNG_MAX_MALLOC_64K
-       if (length > (png_uint_32)65535L)
-       {
-           png_warning(png_ptr, "unknown chunk too large to fit in memory");
-           skip = length - (png_uint_32)65535L;
-           length = (png_uint_32)65535L;
-       }
-#endif
-
-       png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name);
-       chunk.data = (png_bytep)png_malloc(png_ptr, length);
-       png_crc_read(png_ptr, chunk.data, length);
-       chunk.size = length;
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-       if(png_ptr->read_user_chunk_fn != NULL)
-       {
-          /* callback to user unknown chunk handler */
-          if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0)
-          {
-             if (!(png_ptr->chunk_name[0] & 0x20))
-                if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
-                     PNG_HANDLE_CHUNK_ALWAYS)
-                   png_chunk_error(png_ptr, "unknown critical chunk");
-          }
-             png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
-       }
-       else
-#endif
-          png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
-       png_free(png_ptr, chunk.data);
-   }
-   else
-#endif
-      skip=length;
-   png_push_crc_skip(png_ptr, skip);
-}
-
-void /* PRIVATE */
-png_push_have_info(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr->info_fn != NULL)
-      (*(png_ptr->info_fn))(png_ptr, info_ptr);
-}
-
-void /* PRIVATE */
-png_push_have_end(png_structp png_ptr, png_infop info_ptr)
-{
-   if (png_ptr->end_fn != NULL)
-      (*(png_ptr->end_fn))(png_ptr, info_ptr);
-}
-
-void /* PRIVATE */
-png_push_have_row(png_structp png_ptr, png_bytep row)
-{
-   if (png_ptr->row_fn != NULL)
-      (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number,
-         (int)png_ptr->pass);
-}
-
-void PNGAPI
-png_progressive_combine_row (png_structp png_ptr,
-   png_bytep old_row, png_bytep new_row)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   const int FARDATA png_pass_dsp_mask[7] =
-      {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
-#endif
-   if (new_row != NULL)    /* new_row must == png_ptr->row_buf here. */
-      png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]);
-}
-
-void PNGAPI
-png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
-   png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
-   png_progressive_end_ptr end_fn)
-{
-   png_ptr->info_fn = info_fn;
-   png_ptr->row_fn = row_fn;
-   png_ptr->end_fn = end_fn;
-
-   png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
-}
-
-png_voidp PNGAPI
-png_get_progressive_ptr(png_structp png_ptr)
-{
-   return png_ptr->io_ptr;
-}
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngread.c b/tkimg1.3/libpng/pngread.c
deleted file mode 100644
index 11a3626..0000000
--- a/tkimg1.3/libpng/pngread.c
+++ /dev/null
@@ -1,1453 +0,0 @@
-
-/* pngread.c - read a PNG file
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file contains routines that an application calls directly to
- * read a PNG file or stream.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-/* Create a PNG structure for reading, and allocate any memory needed. */
-png_structp PNGAPI
-png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn)
-{
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
-      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
-}
-
-/* Alternate create PNG structure for reading, and allocate any memory needed. */
-png_structp PNGAPI
-png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-
-   png_structp png_ptr;
-
-#ifdef PNG_SETJMP_SUPPORTED
-#ifdef USE_FAR_KEYWORD
-   jmp_buf jmpbuf;
-#endif
-#endif
-
-   int i;
-
-   png_debug(1, "in png_create_read_struct\n");
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
-      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
-#else
-   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
-#endif
-   if (png_ptr == NULL)
-      return (NULL);
-
-#if !defined(PNG_1_0_X)
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
-#endif
-#endif /* PNG_1_0_X */
-
-   /* added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
-   png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-#else
-   if (setjmp(png_ptr->jmpbuf))
-#endif
-   {
-      png_free(png_ptr, png_ptr->zbuf);
-      png_ptr->zbuf=NULL;
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)png_ptr, 
-         (png_free_ptr)free_fn, (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)png_ptr);
-#endif
-      return (NULL);
-   }
-#ifdef USE_FAR_KEYWORD
-   png_memcpy(png_ptr->jmpbuf,jmpbuf,png_sizeof(jmp_buf));
-#endif
-#endif
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);
-#endif
-
-   png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn);
-
-   i=0;
-   do
-   {
-     if(user_png_ver[i] != png_libpng_ver[i])
-        png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
-   } while (png_libpng_ver[i++]);
-
-   if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
-   {
-     /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
-      * we must recompile any applications that use any older library version.
-      * For versions after libpng 1.0, we will be compatible, so we need
-      * only check the first digit.
-      */
-     if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
-         (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
-         (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
-     {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-        char msg[80];
-        if (user_png_ver)
-        {
-          sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
-             user_png_ver);
-          png_warning(png_ptr, msg);
-        }
-        sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
-           png_libpng_ver);
-        png_warning(png_ptr, msg);
-#endif
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-        png_ptr->flags=0;
-#endif
-        png_error(png_ptr,
-           "Incompatible libpng version in application and library");
-     }
-   }
-
-   /* initialize zbuf - compression buffer */
-   png_ptr->zbuf_size = PNG_ZBUF_SIZE;
-   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
-     (png_uint_32)png_ptr->zbuf_size);
-   png_ptr->zstream.zalloc = png_zalloc;
-   png_ptr->zstream.zfree = png_zfree;
-   png_ptr->zstream.opaque = (voidpf)png_ptr;
-
-   switch (inflateInit(&png_ptr->zstream))
-   {
-     case Z_OK: /* Do nothing */ break;
-     case Z_MEM_ERROR:
-     case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break;
-     case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break;
-     default: png_error(png_ptr, "Unknown zlib error");
-   }
-
-   png_ptr->zstream.next_out = png_ptr->zbuf;
-   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
-   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* Applications that neglect to set up their own setjmp() and then encounter
-   a png_error() will longjmp here.  Since the jmpbuf is then meaningless we
-   abort instead of returning. */
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-      PNG_ABORT();
-   png_memcpy(png_ptr->jmpbuf,jmpbuf,png_sizeof(jmp_buf));
-#else
-   if (setjmp(png_ptr->jmpbuf))
-      PNG_ABORT();
-#endif
-#endif
-   return (png_ptr);
-}
-
-/* Initialize PNG structure for reading, and allocate any memory needed.
-   This interface is deprecated in favour of the png_create_read_struct(),
-   and it will eventually disappear. */
-#undef png_read_init
-void PNGAPI
-png_read_init(png_structp png_ptr)
-{
-   /* We only come here via pre-1.0.7-compiled applications */
-   png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
-}
-
-void PNGAPI
-png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
-   png_size_t png_struct_size, png_size_t png_info_size)
-{
-   /* We only come here via pre-1.0.12-compiled applications */
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-   if(png_sizeof(png_struct) > png_struct_size || 
-      png_sizeof(png_info) > png_info_size)
-   {
-      char msg[80];
-      png_ptr->warning_fn=NULL;
-      if (user_png_ver)
-      {
-        sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
-           user_png_ver);
-        png_warning(png_ptr, msg);
-      }
-      sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
-         png_libpng_ver);
-      png_warning(png_ptr, msg);
-   }
-#endif
-   if(png_sizeof(png_struct) > png_struct_size)
-     {
-       png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-       png_ptr->flags=0;
-#endif
-       png_error(png_ptr,
-       "The png struct allocated by the application for reading is too small.");
-     }
-   if(png_sizeof(png_info) > png_info_size)
-     {
-       png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-       png_ptr->flags=0;
-#endif
-       png_error(png_ptr,
-         "The info struct allocated by application for reading is too small.");
-     }
-   png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
-}
-
-void PNGAPI
-png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
-   png_size_t png_struct_size)
-{
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf tmp_jmp;  /* to save current jump buffer */
-#endif
-
-   int i=0;
-
-   png_structp png_ptr=*ptr_ptr;
-
-   do
-   {
-     if(user_png_ver[i] != png_libpng_ver[i])
-     {
-#ifdef PNG_LEGACY_SUPPORTED
-       png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
-#else
-       png_ptr->warning_fn=NULL;
-       png_warning(png_ptr,
-        "Application uses deprecated png_read_init() and should be recompiled.");
-       break;
-#endif
-     }
-   } while (png_libpng_ver[i++]);
-
-   png_debug(1, "in png_read_init_3\n");
-
-#ifdef PNG_SETJMP_SUPPORTED
-   /* save jump buffer and error functions */
-   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof (jmp_buf));
-#endif
-
-   if(png_sizeof(png_struct) > png_struct_size)
-     {
-       png_destroy_struct(png_ptr);
-       *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
-       png_ptr = *ptr_ptr;
-     }
-
-   /* reset all variables to 0 */
-   png_memset(png_ptr, 0, png_sizeof (png_struct));
-
-#ifdef PNG_SETJMP_SUPPORTED
-   /* restore jump buffer */
-   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof (jmp_buf));
-#endif
-
-   /* added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
-   png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
-#endif
-
-   /* initialize zbuf - compression buffer */
-   png_ptr->zbuf_size = PNG_ZBUF_SIZE;
-   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
-     (png_uint_32)png_ptr->zbuf_size);
-   png_ptr->zstream.zalloc = png_zalloc;
-   png_ptr->zstream.zfree = png_zfree;
-   png_ptr->zstream.opaque = (voidpf)png_ptr;
-
-   switch (inflateInit(&png_ptr->zstream))
-   {
-     case Z_OK: /* Do nothing */ break;
-     case Z_MEM_ERROR:
-     case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break;
-     case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break;
-     default: png_error(png_ptr, "Unknown zlib error");
-   }
-
-   png_ptr->zstream.next_out = png_ptr->zbuf;
-   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
-   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
-}
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* Read the information before the actual image data.  This has been
- * changed in v0.90 to allow reading a file that already has the magic
- * bytes read from the stream.  You can tell libpng how many bytes have
- * been read from the beginning of the stream (up to the maximum of 8)
- * via png_set_sig_bytes(), and we will only check the remaining bytes
- * here.  The application can then have access to the signature bytes we
- * read if it is determined that this isn't a valid PNG file.
- */
-void PNGAPI
-png_read_info(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_read_info\n");
-   /* If we haven't checked all of the PNG signature bytes, do so now. */
-   if (png_ptr->sig_bytes < 8)
-   {
-      png_size_t num_checked = png_ptr->sig_bytes,
-                 num_to_check = 8 - num_checked;
-
-      png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
-      png_ptr->sig_bytes = 8;
-
-      if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
-      {
-         if (num_checked < 4 &&
-             png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
-            png_error(png_ptr, "Not a PNG file");
-         else
-            png_error(png_ptr, "PNG file corrupted by ASCII conversion");
-      }
-      if (num_checked < 3)
-         png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
-   }
-
-   for(;;)
-   {
-#ifdef PNG_USE_LOCAL_ARRAYS
-      PNG_IHDR;
-      PNG_IDAT;
-      PNG_IEND;
-      PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
-      PNG_bKGD;
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-      PNG_cHRM;
-#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
-      PNG_gAMA;
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-      PNG_hIST;
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-      PNG_iCCP;
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      PNG_iTXt;
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-      PNG_oFFs;
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-      PNG_pCAL;
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-      PNG_pHYs;
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-      PNG_sBIT;
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-      PNG_sCAL;
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-      PNG_sPLT;
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      PNG_sRGB;
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      PNG_tEXt;
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-      PNG_tIME;
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-      PNG_tRNS;
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      PNG_zTXt;
-#endif
-#endif /* PNG_GLOBAL_ARRAYS */
-      png_byte chunk_length[4];
-      png_uint_32 length;
-
-      png_read_data(png_ptr, chunk_length, 4);
-      length = png_get_uint_31(png_ptr,chunk_length);
-
-      png_reset_crc(png_ptr);
-      png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-
-      png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name,
-         length);
-
-      /* This should be a binary subdivision search or a hash for
-       * matching the chunk name rather than a linear search.
-       */
-      if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
-         png_handle_IHDR(png_ptr, info_ptr, length);
-      else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-         png_handle_IEND(png_ptr, info_ptr, length);
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-      else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))
-      {
-         if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-            png_ptr->mode |= PNG_HAVE_IDAT;
-         png_handle_unknown(png_ptr, info_ptr, length);
-         if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-            png_ptr->mode |= PNG_HAVE_PLTE;
-         else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-         {
-            if (!(png_ptr->mode & PNG_HAVE_IHDR))
-               png_error(png_ptr, "Missing IHDR before IDAT");
-            else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-                     !(png_ptr->mode & PNG_HAVE_PLTE))
-               png_error(png_ptr, "Missing PLTE before IDAT");
-            break;
-         }
-      }
-#endif
-      else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-         png_handle_PLTE(png_ptr, info_ptr, length);
-      else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-      {
-         if (!(png_ptr->mode & PNG_HAVE_IHDR))
-            png_error(png_ptr, "Missing IHDR before IDAT");
-         else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-                  !(png_ptr->mode & PNG_HAVE_PLTE))
-            png_error(png_ptr, "Missing PLTE before IDAT");
-
-         png_ptr->idat_size = length;
-         png_ptr->mode |= PNG_HAVE_IDAT;
-         break;
-      }
-#if defined(PNG_READ_bKGD_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4))
-         png_handle_bKGD(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4))
-         png_handle_cHRM(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4))
-         png_handle_gAMA(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4))
-         png_handle_hIST(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4))
-         png_handle_oFFs(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4))
-         png_handle_pCAL(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4))
-         png_handle_sCAL(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4))
-         png_handle_pHYs(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4))
-         png_handle_sBIT(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4))
-         png_handle_sRGB(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4))
-         png_handle_iCCP(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4))
-         png_handle_sPLT(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))
-         png_handle_tEXt(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))
-         png_handle_tIME(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4))
-         png_handle_tRNS(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))
-         png_handle_zTXt(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4))
-         png_handle_iTXt(png_ptr, info_ptr, length);
-#endif
-      else
-         png_handle_unknown(png_ptr, info_ptr, length);
-   }
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-/* optional call to update the users info_ptr structure */
-void PNGAPI
-png_read_update_info(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_read_update_info\n");
-   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
-      png_read_start_row(png_ptr);
-   else
-      png_warning(png_ptr,
-      "Ignoring extra png_read_update_info() call; row buffer not reallocated");
-   png_read_transform_info(png_ptr, info_ptr);
-}
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* Initialize palette, background, etc, after transformations
- * are set, but before any reading takes place.  This allows
- * the user to obtain a gamma-corrected palette, for example.
- * If the user doesn't call this, we will do it ourselves.
- */
-void PNGAPI
-png_start_read_image(png_structp png_ptr)
-{
-   png_debug(1, "in png_start_read_image\n");
-   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
-      png_read_start_row(png_ptr);
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-void PNGAPI
-png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_IDAT;
-   const int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
-   const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-#endif
-   int ret;
-   png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
-      png_ptr->row_number, png_ptr->pass);
-   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
-      png_read_start_row(png_ptr);
-   if (png_ptr->row_number == 0 && png_ptr->pass == 0)
-   {
-   /* check for transforms that have been set but were defined out */
-#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_MONO)
-      png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED)
-   if (png_ptr->transformations & PNG_FILLER)
-      png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACKSWAP)
-      png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACK)
-      png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED)
-   if (png_ptr->transformations & PNG_SHIFT)
-      png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED)
-   if (png_ptr->transformations & PNG_BGR)
-      png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined.");
-#endif
-#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_BYTES)
-      png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined.");
-#endif
-   }
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-   /* if interlaced and we do not need a new row, combine row and return */
-   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
-   {
-      switch (png_ptr->pass)
-      {
-         case 0:
-            if (png_ptr->row_number & 0x07)
-            {
-               if (dsp_row != NULL)
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 1:
-            if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)
-            {
-               if (dsp_row != NULL)
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 2:
-            if ((png_ptr->row_number & 0x07) != 4)
-            {
-               if (dsp_row != NULL && (png_ptr->row_number & 4))
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 3:
-            if ((png_ptr->row_number & 3) || png_ptr->width < 3)
-            {
-               if (dsp_row != NULL)
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 4:
-            if ((png_ptr->row_number & 3) != 2)
-            {
-               if (dsp_row != NULL && (png_ptr->row_number & 2))
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 5:
-            if ((png_ptr->row_number & 1) || png_ptr->width < 2)
-            {
-               if (dsp_row != NULL)
-                  png_combine_row(png_ptr, dsp_row,
-                     png_pass_dsp_mask[png_ptr->pass]);
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 6:
-            if (!(png_ptr->row_number & 1))
-            {
-               png_read_finish_row(png_ptr);
-               return;
-            }
-            break;
-      }
-   }
-#endif
-
-   if (!(png_ptr->mode & PNG_HAVE_IDAT))
-      png_error(png_ptr, "Invalid attempt to read row data");
-
-   png_ptr->zstream.next_out = png_ptr->row_buf;
-   png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
-   do
-   {
-      if (!(png_ptr->zstream.avail_in))
-      {
-         while (!png_ptr->idat_size)
-         {
-            png_byte chunk_length[4];
-
-            png_crc_finish(png_ptr, 0);
-
-            png_read_data(png_ptr, chunk_length, 4);
-            png_ptr->idat_size = png_get_uint_31(png_ptr,chunk_length);
-
-            png_reset_crc(png_ptr);
-            png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-            if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-               png_error(png_ptr, "Not enough image data");
-         }
-         png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
-         png_ptr->zstream.next_in = png_ptr->zbuf;
-         if (png_ptr->zbuf_size > png_ptr->idat_size)
-            png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
-         png_crc_read(png_ptr, png_ptr->zbuf,
-            (png_size_t)png_ptr->zstream.avail_in);
-         png_ptr->idat_size -= png_ptr->zstream.avail_in;
-      }
-      ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
-      if (ret == Z_STREAM_END)
-      {
-         if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
-            png_ptr->idat_size)
-            png_error(png_ptr, "Extra compressed data");
-         png_ptr->mode |= PNG_AFTER_IDAT;
-         png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-         break;
-      }
-      if (ret != Z_OK)
-         png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
-                   "Decompression error");
-
-   } while (png_ptr->zstream.avail_out);
-
-   png_ptr->row_info.color_type = png_ptr->color_type;
-   png_ptr->row_info.width = png_ptr->iwidth;
-   png_ptr->row_info.channels = png_ptr->channels;
-   png_ptr->row_info.bit_depth = png_ptr->bit_depth;
-   png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
-   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
-       png_ptr->row_info.width);
-
-   if(png_ptr->row_buf[0])
-   png_read_filter_row(png_ptr, &(png_ptr->row_info),
-      png_ptr->row_buf + 1, png_ptr->prev_row + 1,
-      (int)(png_ptr->row_buf[0]));
-
-   png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
-      png_ptr->rowbytes + 1);
-   
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
-      (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
-   {
-      /* Intrapixel differencing */
-      png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);
-   }
-#endif
-
-   if (png_ptr->transformations)
-      png_do_read_transformations(png_ptr);
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-   /* blow up interlaced rows to full size */
-   if (png_ptr->interlaced &&
-      (png_ptr->transformations & PNG_INTERLACE))
-   {
-      if (png_ptr->pass < 6)
-/*       old interface (pre-1.0.9):
-         png_do_read_interlace(&(png_ptr->row_info),
-            png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
- */
-         png_do_read_interlace(png_ptr);
-
-      if (dsp_row != NULL)
-         png_combine_row(png_ptr, dsp_row,
-            png_pass_dsp_mask[png_ptr->pass]);
-      if (row != NULL)
-         png_combine_row(png_ptr, row,
-            png_pass_mask[png_ptr->pass]);
-   }
-   else
-#endif
-   {
-      if (row != NULL)
-         png_combine_row(png_ptr, row, 0xff);
-      if (dsp_row != NULL)
-         png_combine_row(png_ptr, dsp_row, 0xff);
-   }
-   png_read_finish_row(png_ptr);
-
-   if (png_ptr->read_row_fn != NULL)
-      (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* Read one or more rows of image data.  If the image is interlaced,
- * and png_set_interlace_handling() has been called, the rows need to
- * contain the contents of the rows from the previous pass.  If the
- * image has alpha or transparency, and png_handle_alpha()[*] has been
- * called, the rows contents must be initialized to the contents of the
- * screen.
- *
- * "row" holds the actual image, and pixels are placed in it
- * as they arrive.  If the image is displayed after each pass, it will
- * appear to "sparkle" in.  "display_row" can be used to display a
- * "chunky" progressive image, with finer detail added as it becomes
- * available.  If you do not want this "chunky" display, you may pass
- * NULL for display_row.  If you do not want the sparkle display, and
- * you have not called png_handle_alpha(), you may pass NULL for rows.
- * If you have called png_handle_alpha(), and the image has either an
- * alpha channel or a transparency chunk, you must provide a buffer for
- * rows.  In this case, you do not have to provide a display_row buffer
- * also, but you may.  If the image is not interlaced, or if you have
- * not called png_set_interlace_handling(), the display_row buffer will
- * be ignored, so pass NULL to it.
- *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.6rc5
- */
-
-void PNGAPI
-png_read_rows(png_structp png_ptr, png_bytepp row,
-   png_bytepp display_row, png_uint_32 num_rows)
-{
-   png_uint_32 i;
-   png_bytepp rp;
-   png_bytepp dp;
-
-   png_debug(1, "in png_read_rows\n");
-   rp = row;
-   dp = display_row;
-   if (rp != NULL && dp != NULL)
-      for (i = 0; i < num_rows; i++)
-      {
-         png_bytep rptr = *rp++;
-         png_bytep dptr = *dp++;
-
-         png_read_row(png_ptr, rptr, dptr);
-      }
-   else if(rp != NULL)
-      for (i = 0; i < num_rows; i++)
-      {
-         png_bytep rptr = *rp;
-         png_read_row(png_ptr, rptr, png_bytep_NULL);
-         rp++;
-      }
-   else if(dp != NULL)
-      for (i = 0; i < num_rows; i++)
-      {
-         png_bytep dptr = *dp;
-         png_read_row(png_ptr, png_bytep_NULL, dptr);
-         dp++;
-      }
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* Read the entire image.  If the image has an alpha channel or a tRNS
- * chunk, and you have called png_handle_alpha()[*], you will need to
- * initialize the image to the current image that PNG will be overlaying.
- * We set the num_rows again here, in case it was incorrectly set in
- * png_read_start_row() by a call to png_read_update_info() or
- * png_start_read_image() if png_set_interlace_handling() wasn't called
- * prior to either of these functions like it should have been.  You can
- * only call this function once.  If you desire to have an image for
- * each pass of a interlaced image, use png_read_rows() instead.
- *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.6rc5
- */
-void PNGAPI
-png_read_image(png_structp png_ptr, png_bytepp image)
-{
-   png_uint_32 i,image_height;
-   int pass, j;
-   png_bytepp rp;
-
-   png_debug(1, "in png_read_image\n");
-
-#ifdef PNG_READ_INTERLACING_SUPPORTED
-   pass = png_set_interlace_handling(png_ptr);
-#else
-   if (png_ptr->interlaced)
-      png_error(png_ptr,
-        "Cannot read interlaced image -- interlace handler disabled.");
-   pass = 1;
-#endif
-
-
-   image_height=png_ptr->height;
-   png_ptr->num_rows = image_height; /* Make sure this is set correctly */
-
-   for (j = 0; j < pass; j++)
-   {
-      rp = image;
-      for (i = 0; i < image_height; i++)
-      {
-         png_read_row(png_ptr, *rp, png_bytep_NULL);
-         rp++;
-      }
-   }
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* Read the end of the PNG file.  Will not read past the end of the
- * file, will verify the end is accurate, and will read any comments
- * or time information at the end of the file, if info is not NULL.
- */
-void PNGAPI
-png_read_end(png_structp png_ptr, png_infop info_ptr)
-{
-   png_byte chunk_length[4];
-   png_uint_32 length;
-
-   png_debug(1, "in png_read_end\n");
-   png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
-
-   do
-   {
-#ifdef PNG_USE_LOCAL_ARRAYS
-      PNG_IHDR;
-      PNG_IDAT;
-      PNG_IEND;
-      PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
-      PNG_bKGD;
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-      PNG_cHRM;
-#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
-      PNG_gAMA;
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-      PNG_hIST;
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-      PNG_iCCP;
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      PNG_iTXt;
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-      PNG_oFFs;
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-      PNG_pCAL;
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-      PNG_pHYs;
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-      PNG_sBIT;
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-      PNG_sCAL;
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-      PNG_sPLT;
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      PNG_sRGB;
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      PNG_tEXt;
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-      PNG_tIME;
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-      PNG_tRNS;
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      PNG_zTXt;
-#endif
-#endif /* PNG_GLOBAL_ARRAYS */
-
-      png_read_data(png_ptr, chunk_length, 4);
-      length = png_get_uint_31(png_ptr,chunk_length);
-
-      png_reset_crc(png_ptr);
-      png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-
-      png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name);
-
-      if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
-         png_handle_IHDR(png_ptr, info_ptr, length);
-      else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-         png_handle_IEND(png_ptr, info_ptr, length);
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-      else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))
-      {
-         if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-         {
-            if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
-               png_error(png_ptr, "Too many IDAT's found");
-         }
-         else
-            png_ptr->mode |= PNG_AFTER_IDAT;
-         png_handle_unknown(png_ptr, info_ptr, length);
-         if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-            png_ptr->mode |= PNG_HAVE_PLTE;
-      }
-#endif
-      else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-      {
-         /* Zero length IDATs are legal after the last IDAT has been
-          * read, but not after other chunks have been read.
-          */
-         if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
-            png_error(png_ptr, "Too many IDAT's found");
-         png_crc_finish(png_ptr, length);
-      }
-      else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
-         png_handle_PLTE(png_ptr, info_ptr, length);
-#if defined(PNG_READ_bKGD_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4))
-         png_handle_bKGD(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4))
-         png_handle_cHRM(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4))
-         png_handle_gAMA(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4))
-         png_handle_hIST(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4))
-         png_handle_oFFs(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4))
-         png_handle_pCAL(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4))
-         png_handle_sCAL(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4))
-         png_handle_pHYs(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4))
-         png_handle_sBIT(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4))
-         png_handle_sRGB(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4))
-         png_handle_iCCP(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4))
-         png_handle_sPLT(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))
-         png_handle_tEXt(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))
-         png_handle_tIME(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4))
-         png_handle_tRNS(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))
-         png_handle_zTXt(png_ptr, info_ptr, length);
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-      else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4))
-         png_handle_iTXt(png_ptr, info_ptr, length);
-#endif
-      else
-         png_handle_unknown(png_ptr, info_ptr, length);
-   } while (!(png_ptr->mode & PNG_HAVE_IEND));
-}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
-
-/* free all memory used by the read */
-void PNGAPI
-png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
-   png_infopp end_info_ptr_ptr)
-{
-   png_structp png_ptr = NULL;
-   png_infop info_ptr = NULL, end_info_ptr = NULL;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_free_ptr free_fn;
-   png_voidp mem_ptr;
-#endif
-
-   png_debug(1, "in png_destroy_read_struct\n");
-   if (png_ptr_ptr != NULL)
-      png_ptr = *png_ptr_ptr;
-
-   if (info_ptr_ptr != NULL)
-      info_ptr = *info_ptr_ptr;
-
-   if (end_info_ptr_ptr != NULL)
-      end_info_ptr = *end_info_ptr_ptr;
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   free_fn = png_ptr->free_fn;
-   mem_ptr = png_ptr->mem_ptr;
-#endif
-
-   png_read_destroy(png_ptr, info_ptr, end_info_ptr);
-
-   if (info_ptr != NULL)
-   {
-#if defined(PNG_TEXT_SUPPORTED)
-      png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);
-#endif
-
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,
-          (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)info_ptr);
-#endif
-      *info_ptr_ptr = NULL;
-   }
-
-   if (end_info_ptr != NULL)
-   {
-#if defined(PNG_READ_TEXT_SUPPORTED)
-      png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1);
-#endif
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn,
-         (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)end_info_ptr);
-#endif
-      *end_info_ptr_ptr = NULL;
-   }
-
-   if (png_ptr != NULL)
-   {
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,
-          (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)png_ptr);
-#endif
-      *png_ptr_ptr = NULL;
-   }
-}
-
-/* free all memory used by the read (old method) */
-void /* PRIVATE */
-png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
-{
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf tmp_jmp;
-#endif
-   png_error_ptr error_fn;
-   png_error_ptr warning_fn;
-   png_voidp error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_free_ptr free_fn;
-#endif
-
-   png_debug(1, "in png_read_destroy\n");
-   if (info_ptr != NULL)
-      png_info_destroy(png_ptr, info_ptr);
-
-   if (end_info_ptr != NULL)
-      png_info_destroy(png_ptr, end_info_ptr);
-
-   png_free(png_ptr, png_ptr->zbuf);
-   png_free(png_ptr, png_ptr->big_row_buf);
-   png_free(png_ptr, png_ptr->prev_row);
-#if defined(PNG_READ_DITHER_SUPPORTED)
-   png_free(png_ptr, png_ptr->palette_lookup);
-   png_free(png_ptr, png_ptr->dither_index);
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   png_free(png_ptr, png_ptr->gamma_table);
-#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_free(png_ptr, png_ptr->gamma_from_1);
-   png_free(png_ptr, png_ptr->gamma_to_1);
-#endif
-#ifdef PNG_FREE_ME_SUPPORTED
-   if (png_ptr->free_me & PNG_FREE_PLTE)
-      png_zfree(png_ptr, png_ptr->palette);
-   png_ptr->free_me &= ~PNG_FREE_PLTE;
-#else
-   if (png_ptr->flags & PNG_FLAG_FREE_PLTE)
-      png_zfree(png_ptr, png_ptr->palette);
-   png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
-#endif
-#if defined(PNG_tRNS_SUPPORTED) || \
-    defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-#ifdef PNG_FREE_ME_SUPPORTED
-   if (png_ptr->free_me & PNG_FREE_TRNS)
-      png_free(png_ptr, png_ptr->trans);
-   png_ptr->free_me &= ~PNG_FREE_TRNS;
-#else
-   if (png_ptr->flags & PNG_FLAG_FREE_TRNS)
-      png_free(png_ptr, png_ptr->trans);
-   png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
-#endif
-#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-#ifdef PNG_FREE_ME_SUPPORTED
-   if (png_ptr->free_me & PNG_FREE_HIST)
-      png_free(png_ptr, png_ptr->hist);
-   png_ptr->free_me &= ~PNG_FREE_HIST;
-#else
-   if (png_ptr->flags & PNG_FLAG_FREE_HIST)
-      png_free(png_ptr, png_ptr->hist);
-   png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
-#endif
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   if (png_ptr->gamma_16_table != NULL)
-   {
-      int i;
-      int istop = (1 << (8 - png_ptr->gamma_shift));
-      for (i = 0; i < istop; i++)
-      {
-         png_free(png_ptr, png_ptr->gamma_16_table[i]);
-      }
-   png_free(png_ptr, png_ptr->gamma_16_table);
-   }
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if (png_ptr->gamma_16_from_1 != NULL)
-   {
-      int i;
-      int istop = (1 << (8 - png_ptr->gamma_shift));
-      for (i = 0; i < istop; i++)
-      {
-         png_free(png_ptr, png_ptr->gamma_16_from_1[i]);
-      }
-   png_free(png_ptr, png_ptr->gamma_16_from_1);
-   }
-   if (png_ptr->gamma_16_to_1 != NULL)
-   {
-      int i;
-      int istop = (1 << (8 - png_ptr->gamma_shift));
-      for (i = 0; i < istop; i++)
-      {
-         png_free(png_ptr, png_ptr->gamma_16_to_1[i]);
-      }
-   png_free(png_ptr, png_ptr->gamma_16_to_1);
-   }
-#endif
-#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-   png_free(png_ptr, png_ptr->time_buffer);
-#endif
-
-   inflateEnd(&png_ptr->zstream);
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-   png_free(png_ptr, png_ptr->save_buffer);
-#endif
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-#ifdef PNG_TEXT_SUPPORTED
-   png_free(png_ptr, png_ptr->current_text);
-#endif /* PNG_TEXT_SUPPORTED */
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-   /* Save the important info out of the png_struct, in case it is
-    * being used again.
-    */
-#ifdef PNG_SETJMP_SUPPORTED
-   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof (jmp_buf));
-#endif
-
-   error_fn = png_ptr->error_fn;
-   warning_fn = png_ptr->warning_fn;
-   error_ptr = png_ptr->error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   free_fn = png_ptr->free_fn;
-#endif
-
-   png_memset(png_ptr, 0, png_sizeof (png_struct));
-
-   png_ptr->error_fn = error_fn;
-   png_ptr->warning_fn = warning_fn;
-   png_ptr->error_ptr = error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_ptr->free_fn = free_fn;
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof (jmp_buf));
-#endif
-
-}
-
-void PNGAPI
-png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
-{
-   png_ptr->read_row_fn = read_row_fn;
-}
-
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-void PNGAPI
-png_read_png(png_structp png_ptr, png_infop info_ptr,
-                           int transforms,
-                           voidp params)
-{
-   int row;
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-   /* invert the alpha channel from opacity to transparency
-    */
-   if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
-       png_set_invert_alpha(png_ptr);
-#endif
-
-   /* png_read_info() gives us all of the information from the
-    * PNG file before the first IDAT (image data chunk).
-    */
-   png_read_info(png_ptr, info_ptr);
-   if (info_ptr->height > PNG_UINT_32_MAX/png_sizeof(png_bytep))
-      png_error(png_ptr,"Image is too high to process with png_read_png()");
-
-   /* -------------- image transformations start here ------------------- */
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-   /* tell libpng to strip 16 bit/color files down to 8 bits per color
-    */
-   if (transforms & PNG_TRANSFORM_STRIP_16)
-       png_set_strip_16(png_ptr);
-#endif
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-   /* Strip alpha bytes from the input data without combining with
-    * the background (not recommended).
-    */
-   if (transforms & PNG_TRANSFORM_STRIP_ALPHA)
-       png_set_strip_alpha(png_ptr);
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED)
-   /* Extract multiple pixels with bit depths of 1, 2, or 4 from a single
-    * byte into separate bytes (useful for paletted and grayscale images).
-    */
-   if (transforms & PNG_TRANSFORM_PACKING)
-       png_set_packing(png_ptr);
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-   /* Change the order of packed pixels to least significant bit first
-    * (not useful if you are using png_set_packing).
-    */
-   if (transforms & PNG_TRANSFORM_PACKSWAP)
-       png_set_packswap(png_ptr);
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-   /* Expand paletted colors into true RGB triplets
-    * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel
-    * Expand paletted or RGB images with transparency to full alpha
-    * channels so the data will be available as RGBA quartets.
-    */
-   if (transforms & PNG_TRANSFORM_EXPAND)
-       if ((png_ptr->bit_depth < 8) ||
-           (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
-           (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
-         png_set_expand(png_ptr);
-#endif
-
-   /* We don't handle background color or gamma transformation or dithering.
-    */
-
-#if defined(PNG_READ_INVERT_SUPPORTED)
-   /* invert monochrome files to have 0 as white and 1 as black
-    */
-   if (transforms & PNG_TRANSFORM_INVERT_MONO)
-       png_set_invert_mono(png_ptr);
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-   /* If you want to shift the pixel values from the range [0,255] or
-    * [0,65535] to the original [0,7] or [0,31], or whatever range the
-    * colors were originally in:
-    */
-   if ((transforms & PNG_TRANSFORM_SHIFT)
-       && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
-   {
-      png_color_8p sig_bit;
-
-      png_get_sBIT(png_ptr, info_ptr, &sig_bit);
-      png_set_shift(png_ptr, sig_bit);
-   }
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED)
-   /* flip the RGB pixels to BGR (or RGBA to BGRA)
-    */
-   if (transforms & PNG_TRANSFORM_BGR)
-       png_set_bgr(png_ptr);
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-   /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR)
-    */
-   if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
-       png_set_swap_alpha(png_ptr);
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED)
-   /* swap bytes of 16 bit files to least significant byte first
-    */
-   if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
-       png_set_swap(png_ptr);
-#endif
-
-   /* We don't handle adding filler bytes */
-
-   /* Optional call to gamma correct and add the background to the palette
-    * and update info structure.  REQUIRED if you are expecting libpng to
-    * update the palette for you (i.e., you selected such a transform above).
-    */
-   png_read_update_info(png_ptr, info_ptr);
-
-   /* -------------- image transformations end here ------------------- */
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
-#endif
-   if(info_ptr->row_pointers == NULL)
-   {
-      info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
-         info_ptr->height * png_sizeof(png_bytep));
-#ifdef PNG_FREE_ME_SUPPORTED
-      info_ptr->free_me |= PNG_FREE_ROWS;
-#endif
-      for (row = 0; row < (int)info_ptr->height; row++)
-      {
-         info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
-            png_get_rowbytes(png_ptr, info_ptr));
-      }
-   }
-
-   png_read_image(png_ptr, info_ptr->row_pointers);
-   info_ptr->valid |= PNG_INFO_IDAT;
-
-   /* read rest of file, and get additional chunks in info_ptr - REQUIRED */
-   png_read_end(png_ptr, info_ptr);
-
-   if(transforms == 0 || params == NULL)
-      /* quiet compiler warnings */ return;
-
-}
-#endif
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngrio.c b/tkimg1.3/libpng/pngrio.c
deleted file mode 100644
index 6b1a753..0000000
--- a/tkimg1.3/libpng/pngrio.c
+++ /dev/null
@@ -1,161 +0,0 @@
-
-/* pngrio.c - functions for data input
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file provides a location for all input.  Users who need
- * special handling are expected to write a function that has the same
- * arguments as this and performs a similar function, but that possibly
- * has a different input method.  Note that you shouldn't change this
- * function, but rather write a replacement function and then make
- * libpng use it at run time with png_set_read_fn(...).
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-/* Read the data from whatever input you are using.  The default routine
-   reads from a file pointer.  Note that this routine sometimes gets called
-   with very small lengths, so you should implement some kind of simple
-   buffering if you are using unbuffered reads.  This should never be asked
-   to read more then 64K on a 16 bit machine. */
-void /* PRIVATE */
-png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_debug1(4,"reading %d bytes\n", (int)length);
-   if (png_ptr->read_data_fn != NULL)
-      (*(png_ptr->read_data_fn))(png_ptr, data, length);
-   else
-      png_error(png_ptr, "Call to NULL read function");
-}
-
-#if !defined(PNG_NO_STDIO)
-/* This is the function that does the actual reading of data.  If you are
-   not reading from a standard C stream, you should create a replacement
-   read_data function and use it at run time with png_set_read_fn(), rather
-   than changing the library. */
-#ifndef USE_FAR_KEYWORD
-void PNGAPI
-png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_size_t check;
-
-   /* fread() returns 0 on error, so it is OK to store this in a png_size_t
-    * instead of an int, which is what fread() actually returns.
-    */
-#if defined(_WIN32_WCE)
-   if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
-      check = 0;
-#else
-   check = (png_size_t)fread(data, (png_size_t)1, length,
-      (png_FILE_p)png_ptr->io_ptr);
-#endif
-
-   if (check != length)
-      png_error(png_ptr, "Read Error");
-}
-#else
-/* this is the model-independent version. Since the standard I/O library
-   can't handle far buffers in the medium and small models, we have to copy
-   the data.
-*/
-
-#define NEAR_BUF_SIZE 1024
-#define MIN(a,b) (a <= b ? a : b)
-
-static void /* PRIVATE */
-png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   int check;
-   png_byte *n_data;
-   png_FILE_p io_ptr;
-
-   /* Check if data really is near. If so, use usual code. */
-   n_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
-   if ((png_bytep)n_data == data)
-   {
-#if defined(_WIN32_WCE)
-      if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
-         check = 0;
-#else
-      check = fread(n_data, 1, length, io_ptr);
-#endif
-   }
-   else
-   {
-      png_byte buf[NEAR_BUF_SIZE];
-      png_size_t read, remaining, err;
-      check = 0;
-      remaining = length;
-      do
-      {
-         read = MIN(NEAR_BUF_SIZE, remaining);
-#if defined(_WIN32_WCE)
-         if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )
-            err = 0;
-#else
-         err = fread(buf, (png_size_t)1, read, io_ptr);
-#endif
-         png_memcpy(data, buf, read); /* copy far buffer to near buffer */
-         if(err != read)
-            break;
-         else
-            check += err;
-         data += read;
-         remaining -= read;
-      }
-      while (remaining != 0);
-   }
-   if ((png_uint_32)check != (png_uint_32)length)
-      png_error(png_ptr, "read Error");
-}
-#endif
-#endif
-
-/* This function allows the application to supply a new input function
-   for libpng if standard C streams aren't being used.
-
-   This function takes as its arguments:
-   png_ptr      - pointer to a png input data structure
-   io_ptr       - pointer to user supplied structure containing info about
-                  the input functions.  May be NULL.
-   read_data_fn - pointer to a new input function that takes as its
-                  arguments a pointer to a png_struct, a pointer to
-                  a location where input data can be stored, and a 32-bit
-                  unsigned int that is the number of bytes to be read.
-                  To exit and output any fatal error messages the new write
-                  function should call png_error(png_ptr, "Error msg"). */
-void PNGAPI
-png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
-   png_rw_ptr read_data_fn)
-{
-   png_ptr->io_ptr = io_ptr;
-
-#if !defined(PNG_NO_STDIO)
-   if (read_data_fn != NULL)
-      png_ptr->read_data_fn = read_data_fn;
-   else
-      png_ptr->read_data_fn = png_default_read_data;
-#else
-   png_ptr->read_data_fn = read_data_fn;
-#endif
-
-   /* It is an error to write to a read device */
-   if (png_ptr->write_data_fn != NULL)
-   {
-      png_ptr->write_data_fn = NULL;
-      png_warning(png_ptr,
-         "It's an error to set both read_data_fn and write_data_fn in the ");
-      png_warning(png_ptr,
-         "same structure.  Resetting write_data_fn to NULL.");
-   }
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-   png_ptr->output_flush_fn = NULL;
-#endif
-}
diff --git a/tkimg1.3/libpng/pngrtran.c b/tkimg1.3/libpng/pngrtran.c
deleted file mode 100644
index 3f15bc6..0000000
--- a/tkimg1.3/libpng/pngrtran.c
+++ /dev/null
@@ -1,4177 +0,0 @@
-
-/* pngrtran.c - transforms the data in a row for PNG readers
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file contains functions optionally called by an application
- * in order to tell libpng how to handle data when reading a PNG.
- * Transformations that are used in both reading and writing are
- * in pngtrans.c.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-/* Set the action on getting a CRC error for an ancillary or critical chunk. */
-void PNGAPI
-png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
-{
-   png_debug(1, "in png_set_crc_action\n");
-   /* Tell libpng how we react to CRC errors in critical chunks */
-   switch (crit_action)
-   {
-      case PNG_CRC_NO_CHANGE:                        /* leave setting as is */
-         break;
-      case PNG_CRC_WARN_USE:                               /* warn/use data */
-         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;
-         png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE;
-         break;
-      case PNG_CRC_QUIET_USE:                             /* quiet/use data */
-         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;
-         png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE |
-                           PNG_FLAG_CRC_CRITICAL_IGNORE;
-         break;
-      case PNG_CRC_WARN_DISCARD:    /* not a valid action for critical data */
-         png_warning(png_ptr, "Can't discard critical data on CRC error.");
-      case PNG_CRC_ERROR_QUIT:                                /* error/quit */
-      case PNG_CRC_DEFAULT:
-      default:
-         png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK;
-         break;
-   }
-
-   switch (ancil_action)
-   {
-      case PNG_CRC_NO_CHANGE:                       /* leave setting as is */
-         break;
-      case PNG_CRC_WARN_USE:                              /* warn/use data */
-         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;
-         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE;
-         break;
-      case PNG_CRC_QUIET_USE:                            /* quiet/use data */
-         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;
-         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE |
-                           PNG_FLAG_CRC_ANCILLARY_NOWARN;
-         break;
-      case PNG_CRC_ERROR_QUIT:                               /* error/quit */
-         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;
-         png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN;
-         break;
-      case PNG_CRC_WARN_DISCARD:                      /* warn/discard data */
-      case PNG_CRC_DEFAULT:
-      default:
-         png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK;
-         break;
-   }
-}
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
-    defined(PNG_FLOATING_POINT_SUPPORTED)
-/* handle alpha and tRNS via a background color */
-void PNGAPI
-png_set_background(png_structp png_ptr,
-   png_color_16p background_color, int background_gamma_code,
-   int need_expand, double background_gamma)
-{
-   png_debug(1, "in png_set_background\n");
-   if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
-   {
-      png_warning(png_ptr, "Application must supply a known background gamma");
-      return;
-   }
-
-   png_ptr->transformations |= PNG_BACKGROUND;
-   png_memcpy(&(png_ptr->background), background_color,
-      png_sizeof(png_color_16));
-   png_ptr->background_gamma = (float)background_gamma;
-   png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
-   png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0);
-
-   /* Note:  if need_expand is set and color_type is either RGB or RGB_ALPHA
-    * (in which case need_expand is superfluous anyway), the background color
-    * might actually be gray yet not be flagged as such. This is not a problem
-    * for the current code, which uses PNG_BACKGROUND_IS_GRAY only to
-    * decide when to do the png_do_gray_to_rgb() transformation.
-    */
-   if ((need_expand && !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) ||
-       (!need_expand && background_color->red == background_color->green &&
-        background_color->red == background_color->blue))
-      png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
-}
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-/* strip 16 bit depth files to 8 bit depth */
-void PNGAPI
-png_set_strip_16(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_strip_16\n");
-   png_ptr->transformations |= PNG_16_TO_8;
-}
-#endif
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-void PNGAPI
-png_set_strip_alpha(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_strip_alpha\n");
-   png_ptr->transformations |= PNG_STRIP_ALPHA;
-}
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-/* Dither file to 8 bit.  Supply a palette, the current number
- * of elements in the palette, the maximum number of elements
- * allowed, and a histogram if possible.  If the current number
- * of colors is greater then the maximum number, the palette will be
- * modified to fit in the maximum number.  "full_dither" indicates
- * whether we need a dithering cube set up for RGB images, or if we
- * simply are reducing the number of colors in a paletted image.
- */
-
-typedef struct png_dsort_struct
-{
-   struct png_dsort_struct FAR * next;
-   png_byte left;
-   png_byte right;
-} png_dsort;
-typedef png_dsort FAR *       png_dsortp;
-typedef png_dsort FAR * FAR * png_dsortpp;
-
-void PNGAPI
-png_set_dither(png_structp png_ptr, png_colorp palette,
-   int num_palette, int maximum_colors, png_uint_16p histogram,
-   int full_dither)
-{
-   png_debug(1, "in png_set_dither\n");
-   png_ptr->transformations |= PNG_DITHER;
-
-   if (!full_dither)
-   {
-      int i;
-
-      png_ptr->dither_index = (png_bytep)png_malloc(png_ptr,
-         (png_uint_32)(num_palette * png_sizeof (png_byte)));
-      for (i = 0; i < num_palette; i++)
-         png_ptr->dither_index[i] = (png_byte)i;
-   }
-
-   if (num_palette > maximum_colors)
-   {
-      if (histogram != NULL)
-      {
-         /* This is easy enough, just throw out the least used colors.
-            Perhaps not the best solution, but good enough. */
-
-         int i;
-
-         /* initialize an array to sort colors */
-         png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)(num_palette * png_sizeof (png_byte)));
-
-         /* initialize the dither_sort array */
-         for (i = 0; i < num_palette; i++)
-            png_ptr->dither_sort[i] = (png_byte)i;
-
-         /* Find the least used palette entries by starting a
-            bubble sort, and running it until we have sorted
-            out enough colors.  Note that we don't care about
-            sorting all the colors, just finding which are
-            least used. */
-
-         for (i = num_palette - 1; i >= maximum_colors; i--)
-         {
-            int done; /* to stop early if the list is pre-sorted */
-            int j;
-
-            done = 1;
-            for (j = 0; j < i; j++)
-            {
-               if (histogram[png_ptr->dither_sort[j]]
-                   < histogram[png_ptr->dither_sort[j + 1]])
-               {
-                  png_byte t;
-
-                  t = png_ptr->dither_sort[j];
-                  png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1];
-                  png_ptr->dither_sort[j + 1] = t;
-                  done = 0;
-               }
-            }
-            if (done)
-               break;
-         }
-
-         /* swap the palette around, and set up a table, if necessary */
-         if (full_dither)
-         {
-            int j = num_palette;
-
-            /* put all the useful colors within the max, but don't
-               move the others */
-            for (i = 0; i < maximum_colors; i++)
-            {
-               if ((int)png_ptr->dither_sort[i] >= maximum_colors)
-               {
-                  do
-                     j--;
-                  while ((int)png_ptr->dither_sort[j] >= maximum_colors);
-                  palette[i] = palette[j];
-               }
-            }
-         }
-         else
-         {
-            int j = num_palette;
-
-            /* move all the used colors inside the max limit, and
-               develop a translation table */
-            for (i = 0; i < maximum_colors; i++)
-            {
-               /* only move the colors we need to */
-               if ((int)png_ptr->dither_sort[i] >= maximum_colors)
-               {
-                  png_color tmp_color;
-
-                  do
-                     j--;
-                  while ((int)png_ptr->dither_sort[j] >= maximum_colors);
-
-                  tmp_color = palette[j];
-                  palette[j] = palette[i];
-                  palette[i] = tmp_color;
-                  /* indicate where the color went */
-                  png_ptr->dither_index[j] = (png_byte)i;
-                  png_ptr->dither_index[i] = (png_byte)j;
-               }
-            }
-
-            /* find closest color for those colors we are not using */
-            for (i = 0; i < num_palette; i++)
-            {
-               if ((int)png_ptr->dither_index[i] >= maximum_colors)
-               {
-                  int min_d, k, min_k, d_index;
-
-                  /* find the closest color to one we threw out */
-                  d_index = png_ptr->dither_index[i];
-                  min_d = PNG_COLOR_DIST(palette[d_index], palette[0]);
-                  for (k = 1, min_k = 0; k < maximum_colors; k++)
-                  {
-                     int d;
-
-                     d = PNG_COLOR_DIST(palette[d_index], palette[k]);
-
-                     if (d < min_d)
-                     {
-                        min_d = d;
-                        min_k = k;
-                     }
-                  }
-                  /* point to closest color */
-                  png_ptr->dither_index[i] = (png_byte)min_k;
-               }
-            }
-         }
-         png_free(png_ptr, png_ptr->dither_sort);
-         png_ptr->dither_sort=NULL;
-      }
-      else
-      {
-         /* This is much harder to do simply (and quickly).  Perhaps
-            we need to go through a median cut routine, but those
-            don't always behave themselves with only a few colors
-            as input.  So we will just find the closest two colors,
-            and throw out one of them (chosen somewhat randomly).
-            [We don't understand this at all, so if someone wants to
-             work on improving it, be our guest - AED, GRP]
-            */
-         int i;
-         int max_d;
-         int num_new_palette;
-         png_dsortp t;
-         png_dsortpp hash;
-
-         t=NULL;
-
-         /* initialize palette index arrays */
-         png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)(num_palette * png_sizeof (png_byte)));
-         png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)(num_palette * png_sizeof (png_byte)));
-
-         /* initialize the sort array */
-         for (i = 0; i < num_palette; i++)
-         {
-            png_ptr->index_to_palette[i] = (png_byte)i;
-            png_ptr->palette_to_index[i] = (png_byte)i;
-         }
-
-         hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 *
-            png_sizeof (png_dsortp)));
-         for (i = 0; i < 769; i++)
-            hash[i] = NULL;
-/*         png_memset(hash, 0, 769 * png_sizeof (png_dsortp)); */
-
-         num_new_palette = num_palette;
-
-         /* initial wild guess at how far apart the farthest pixel
-            pair we will be eliminating will be.  Larger
-            numbers mean more areas will be allocated, Smaller
-            numbers run the risk of not saving enough data, and
-            having to do this all over again.
-
-            I have not done extensive checking on this number.
-            */
-         max_d = 96;
-
-         while (num_new_palette > maximum_colors)
-         {
-            for (i = 0; i < num_new_palette - 1; i++)
-            {
-               int j;
-
-               for (j = i + 1; j < num_new_palette; j++)
-               {
-                  int d;
-
-                  d = PNG_COLOR_DIST(palette[i], palette[j]);
-
-                  if (d <= max_d)
-                  {
-
-                     t = (png_dsortp)png_malloc_warn(png_ptr,
-                         (png_uint_32)(png_sizeof(png_dsort)));
-                     if (t == NULL)
-                         break;
-                     t->next = hash[d];
-                     t->left = (png_byte)i;
-                     t->right = (png_byte)j;
-                     hash[d] = t;
-                  }
-               }
-               if (t == NULL)
-                  break;
-            }
-
-            if (t != NULL)
-            for (i = 0; i <= max_d; i++)
-            {
-               if (hash[i] != NULL)
-               {
-                  png_dsortp p;
-
-                  for (p = hash[i]; p; p = p->next)
-                  {
-                     if ((int)png_ptr->index_to_palette[p->left]
-                        < num_new_palette &&
-                        (int)png_ptr->index_to_palette[p->right]
-                        < num_new_palette)
-                     {
-                        int j, next_j;
-
-                        if (num_new_palette & 0x01)
-                        {
-                           j = p->left;
-                           next_j = p->right;
-                        }
-                        else
-                        {
-                           j = p->right;
-                           next_j = p->left;
-                        }
-
-                        num_new_palette--;
-                        palette[png_ptr->index_to_palette[j]]
-                          = palette[num_new_palette];
-                        if (!full_dither)
-                        {
-                           int k;
-
-                           for (k = 0; k < num_palette; k++)
-                           {
-                              if (png_ptr->dither_index[k] ==
-                                 png_ptr->index_to_palette[j])
-                                 png_ptr->dither_index[k] =
-                                    png_ptr->index_to_palette[next_j];
-                              if ((int)png_ptr->dither_index[k] ==
-                                 num_new_palette)
-                                 png_ptr->dither_index[k] =
-                                    png_ptr->index_to_palette[j];
-                           }
-                        }
-
-                        png_ptr->index_to_palette[png_ptr->palette_to_index
-                           [num_new_palette]] = png_ptr->index_to_palette[j];
-                        png_ptr->palette_to_index[png_ptr->index_to_palette[j]]
-                           = png_ptr->palette_to_index[num_new_palette];
-
-                        png_ptr->index_to_palette[j] = (png_byte)num_new_palette;
-                        png_ptr->palette_to_index[num_new_palette] = (png_byte)j;
-                     }
-                     if (num_new_palette <= maximum_colors)
-                        break;
-                  }
-                  if (num_new_palette <= maximum_colors)
-                     break;
-               }
-            }
-
-            for (i = 0; i < 769; i++)
-            {
-               if (hash[i] != NULL)
-               {
-                  png_dsortp p = hash[i];
-                  while (p)
-                  {
-                     t = p->next;
-                     png_free(png_ptr, p);
-                     p = t;
-                  }
-               }
-               hash[i] = 0;
-            }
-            max_d += 96;
-         }
-         png_free(png_ptr, hash);
-         png_free(png_ptr, png_ptr->palette_to_index);
-         png_free(png_ptr, png_ptr->index_to_palette);
-         png_ptr->palette_to_index=NULL;
-         png_ptr->index_to_palette=NULL;
-      }
-      num_palette = maximum_colors;
-   }
-   if (png_ptr->palette == NULL)
-   {
-      png_ptr->palette = palette;
-   }
-   png_ptr->num_palette = (png_uint_16)num_palette;
-
-   if (full_dither)
-   {
-      int i;
-      png_bytep distance;
-      int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS +
-         PNG_DITHER_BLUE_BITS;
-      int num_red = (1 << PNG_DITHER_RED_BITS);
-      int num_green = (1 << PNG_DITHER_GREEN_BITS);
-      int num_blue = (1 << PNG_DITHER_BLUE_BITS);
-      png_size_t num_entries = ((png_size_t)1 << total_bits);
-
-      png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr,
-         (png_uint_32)(num_entries * png_sizeof (png_byte)));
-
-      png_memset(png_ptr->palette_lookup, 0, num_entries *
-         png_sizeof (png_byte));
-
-      distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries *
-         png_sizeof(png_byte)));
-
-      png_memset(distance, 0xff, num_entries * png_sizeof(png_byte));
-
-      for (i = 0; i < num_palette; i++)
-      {
-         int ir, ig, ib;
-         int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS));
-         int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS));
-         int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS));
-
-         for (ir = 0; ir < num_red; ir++)
-         {
-            /* int dr = abs(ir - r); */
-            int dr = ((ir > r) ? ir - r : r - ir);
-            int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS));
-
-            for (ig = 0; ig < num_green; ig++)
-            {
-               /* int dg = abs(ig - g); */
-               int dg = ((ig > g) ? ig - g : g - ig);
-               int dt = dr + dg;
-               int dm = ((dr > dg) ? dr : dg);
-               int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS);
-
-               for (ib = 0; ib < num_blue; ib++)
-               {
-                  int d_index = index_g | ib;
-                  /* int db = abs(ib - b); */
-                  int db = ((ib > b) ? ib - b : b - ib);
-                  int dmax = ((dm > db) ? dm : db);
-                  int d = dmax + dt + db;
-
-                  if (d < (int)distance[d_index])
-                  {
-                     distance[d_index] = (png_byte)d;
-                     png_ptr->palette_lookup[d_index] = (png_byte)i;
-                  }
-               }
-            }
-         }
-      }
-
-      png_free(png_ptr, distance);
-   }
-}
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
-/* Transform the image from the file_gamma to the screen_gamma.  We
- * only do transformations on images where the file_gamma and screen_gamma
- * are not close reciprocals, otherwise it slows things down slightly, and
- * also needlessly introduces small errors.
- *
- * We will turn off gamma transformation later if no semitransparent entries
- * are present in the tRNS array for palette images.  We can't do it here
- * because we don't necessarily have the tRNS chunk yet.
- */
-void PNGAPI
-png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
-{
-   png_debug(1, "in png_set_gamma\n");
-   if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
-       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
-       (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
-     png_ptr->transformations |= PNG_GAMMA;
-   png_ptr->gamma = (float)file_gamma;
-   png_ptr->screen_gamma = (float)scrn_gamma;
-}
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-/* Expand paletted images to RGB, expand grayscale images of
- * less than 8-bit depth to 8-bit depth, and expand tRNS chunks
- * to alpha channels.
- */
-void PNGAPI
-png_set_expand(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_expand\n");
-   png_ptr->transformations |= PNG_EXPAND;
-}
-
-/* GRR 19990627:  the following three functions currently are identical
- *  to png_set_expand().  However, it is entirely reasonable that someone
- *  might wish to expand an indexed image to RGB but *not* expand a single,
- *  fully transparent palette entry to a full alpha channel--perhaps instead
- *  convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace
- *  the transparent color with a particular RGB value, or drop tRNS entirely.
- *  IOW, a future version of the library may make the transformations flag
- *  a bit more fine-grained, with separate bits for each of these three
- *  functions.
- *
- *  More to the point, these functions make it obvious what libpng will be
- *  doing, whereas "expand" can (and does) mean any number of things.
- */
-
-/* Expand paletted images to RGB. */
-void PNGAPI
-png_set_palette_to_rgb(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_expand\n");
-   png_ptr->transformations |= PNG_EXPAND;
-}
-
-/* Expand grayscale images of less than 8-bit depth to 8 bits. */
-void PNGAPI
-png_set_gray_1_2_4_to_8(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_expand\n");
-   png_ptr->transformations |= PNG_EXPAND;
-}
-
-/* Expand tRNS chunks to alpha channels. */
-void PNGAPI
-png_set_tRNS_to_alpha(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_expand\n");
-   png_ptr->transformations |= PNG_EXPAND;
-}
-#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-void PNGAPI
-png_set_gray_to_rgb(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_gray_to_rgb\n");
-   png_ptr->transformations |= PNG_GRAY_TO_RGB;
-}
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-/* Convert a RGB image to a grayscale of the same width.  This allows us,
- * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image.
- */
-
-void PNGAPI
-png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
-   double green)
-{
-      int red_fixed = (int)((float)red*100000.0 + 0.5);
-      int green_fixed = (int)((float)green*100000.0 + 0.5);
-      png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);
-}
-#endif
-
-void PNGAPI
-png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
-   png_fixed_point red, png_fixed_point green)
-{
-   png_debug(1, "in png_set_rgb_to_gray\n");
-   switch(error_action)
-   {
-      case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;
-              break;
-      case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;
-              break;
-      case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
-   }
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-      png_ptr->transformations |= PNG_EXPAND;
-#else
-   {
-      png_warning(png_ptr, "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED.");
-      png_ptr->transformations &= ~PNG_RGB_TO_GRAY;
-   }
-#endif
-   {
-      png_uint_16 red_int, green_int;
-      if(red < 0 || green < 0)
-      {
-         red_int   =  6968; /* .212671 * 32768 + .5 */
-         green_int = 23434; /* .715160 * 32768 + .5 */
-      }
-      else if(red + green < 100000L)
-      {
-        red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L);
-        green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L);
-      }
-      else
-      {
-         png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients");
-         red_int   =  6968;
-         green_int = 23434;
-      }
-      png_ptr->rgb_to_gray_red_coeff   = red_int;
-      png_ptr->rgb_to_gray_green_coeff = green_int;
-      png_ptr->rgb_to_gray_blue_coeff  = (png_uint_16)(32768-red_int-green_int);
-   }
-}
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-void PNGAPI
-png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
-   read_user_transform_fn)
-{
-   png_debug(1, "in png_set_read_user_transform_fn\n");
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   png_ptr->transformations |= PNG_USER_TRANSFORM;
-   png_ptr->read_user_transform_fn = read_user_transform_fn;
-#endif
-#ifdef PNG_LEGACY_SUPPORTED
-   if(read_user_transform_fn)
-      png_warning(png_ptr,
-        "This version of libpng does not support user transforms");
-#endif
-}
-#endif
-
-/* Initialize everything needed for the read.  This includes modifying
- * the palette.
- */
-void /* PRIVATE */
-png_init_read_transformations(png_structp png_ptr)
-{
-   png_debug(1, "in png_init_read_transformations\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if(png_ptr != NULL)
-#endif
-  {
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \
- || defined(PNG_READ_GAMMA_SUPPORTED)
-   int color_type = png_ptr->color_type;
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
-       (png_ptr->transformations & PNG_EXPAND))
-   {
-      if (!(color_type & PNG_COLOR_MASK_COLOR))  /* i.e., GRAY or GRAY_ALPHA */
-      {
-         /* expand background chunk. */
-         switch (png_ptr->bit_depth)
-         {
-            case 1:
-               png_ptr->background.gray *= (png_uint_16)0xff;
-               png_ptr->background.red = png_ptr->background.green
-                 =  png_ptr->background.blue = png_ptr->background.gray;
-               break;
-            case 2:
-               png_ptr->background.gray *= (png_uint_16)0x55;
-               png_ptr->background.red = png_ptr->background.green
-                 = png_ptr->background.blue = png_ptr->background.gray;
-               break;
-            case 4:
-               png_ptr->background.gray *= (png_uint_16)0x11;
-               png_ptr->background.red = png_ptr->background.green
-                 = png_ptr->background.blue = png_ptr->background.gray;
-               break;
-            case 8:
-            case 16:
-               png_ptr->background.red = png_ptr->background.green
-                 = png_ptr->background.blue = png_ptr->background.gray;
-               break;
-         }
-      }
-      else if (color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         png_ptr->background.red   =
-            png_ptr->palette[png_ptr->background.index].red;
-         png_ptr->background.green =
-            png_ptr->palette[png_ptr->background.index].green;
-         png_ptr->background.blue  =
-            png_ptr->palette[png_ptr->background.index].blue;
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-        if (png_ptr->transformations & PNG_INVERT_ALPHA)
-        {
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-           if (!(png_ptr->transformations & PNG_EXPAND))
-#endif
-           {
-           /* invert the alpha channel (in tRNS) unless the pixels are
-              going to be expanded, in which case leave it for later */
-              int i,istop;
-              istop=(int)png_ptr->num_trans;
-              for (i=0; i<istop; i++)
-                 png_ptr->trans[i] = (png_byte)(255 - png_ptr->trans[i]);
-           }
-        }
-#endif
-
-      }
-   }
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
-   png_ptr->background_1 = png_ptr->background;
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
-
-   if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0)
-       && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0)
-         < PNG_GAMMA_THRESHOLD))
-   {
-    int i,k;
-    k=0;
-    for (i=0; i<png_ptr->num_trans; i++)
-    {
-      if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff)
-        k=1; /* partial transparency is present */
-    }
-    if (k == 0)
-      png_ptr->transformations &= (~PNG_GAMMA);
-   }
-
-   if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY))
-   {
-      png_build_gamma_table(png_ptr);
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-      if (png_ptr->transformations & PNG_BACKGROUND)
-      {
-         if (color_type == PNG_COLOR_TYPE_PALETTE)
-         {
-           /* could skip if no transparency and 
-           */
-            png_color back, back_1;
-            png_colorp palette = png_ptr->palette;
-            int num_palette = png_ptr->num_palette;
-            int i;
-            if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)
-            {
-               back.red = png_ptr->gamma_table[png_ptr->background.red];
-               back.green = png_ptr->gamma_table[png_ptr->background.green];
-               back.blue = png_ptr->gamma_table[png_ptr->background.blue];
-
-               back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];
-               back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];
-               back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];
-            }
-            else
-            {
-               double g, gs;
-
-               switch (png_ptr->background_gamma_type)
-               {
-                  case PNG_BACKGROUND_GAMMA_SCREEN:
-                     g = (png_ptr->screen_gamma);
-                     gs = 1.0;
-                     break;
-                  case PNG_BACKGROUND_GAMMA_FILE:
-                     g = 1.0 / (png_ptr->gamma);
-                     gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
-                     break;
-                  case PNG_BACKGROUND_GAMMA_UNIQUE:
-                     g = 1.0 / (png_ptr->background_gamma);
-                     gs = 1.0 / (png_ptr->background_gamma *
-                                 png_ptr->screen_gamma);
-                     break;
-                  default:
-                     g = 1.0;    /* back_1 */
-                     gs = 1.0;   /* back */
-               }
-
-               if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD)
-               {
-                  back.red   = (png_byte)png_ptr->background.red;
-                  back.green = (png_byte)png_ptr->background.green;
-                  back.blue  = (png_byte)png_ptr->background.blue;
-               }
-               else
-               {
-                  back.red = (png_byte)(pow(
-                     (double)png_ptr->background.red/255, gs) * 255.0 + .5);
-                  back.green = (png_byte)(pow(
-                     (double)png_ptr->background.green/255, gs) * 255.0 + .5);
-                  back.blue = (png_byte)(pow(
-                     (double)png_ptr->background.blue/255, gs) * 255.0 + .5);
-               }
-
-               back_1.red = (png_byte)(pow(
-                  (double)png_ptr->background.red/255, g) * 255.0 + .5);
-               back_1.green = (png_byte)(pow(
-                  (double)png_ptr->background.green/255, g) * 255.0 + .5);
-               back_1.blue = (png_byte)(pow(
-                  (double)png_ptr->background.blue/255, g) * 255.0 + .5);
-            }
-            for (i = 0; i < num_palette; i++)
-            {
-               if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff)
-               {
-                  if (png_ptr->trans[i] == 0)
-                  {
-                     palette[i] = back;
-                  }
-                  else /* if (png_ptr->trans[i] != 0xff) */
-                  {
-                     png_byte v, w;
-
-                     v = png_ptr->gamma_to_1[palette[i].red];
-                     png_composite(w, v, png_ptr->trans[i], back_1.red);
-                     palette[i].red = png_ptr->gamma_from_1[w];
-
-                     v = png_ptr->gamma_to_1[palette[i].green];
-                     png_composite(w, v, png_ptr->trans[i], back_1.green);
-                     palette[i].green = png_ptr->gamma_from_1[w];
-
-                     v = png_ptr->gamma_to_1[palette[i].blue];
-                     png_composite(w, v, png_ptr->trans[i], back_1.blue);
-                     palette[i].blue = png_ptr->gamma_from_1[w];
-                  }
-               }
-               else
-               {
-                  palette[i].red = png_ptr->gamma_table[palette[i].red];
-                  palette[i].green = png_ptr->gamma_table[palette[i].green];
-                  palette[i].blue = png_ptr->gamma_table[palette[i].blue];
-               }
-            }
-         }
-         /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
-         else
-         /* color_type != PNG_COLOR_TYPE_PALETTE */
-         {
-            double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1);
-            double g = 1.0;
-            double gs = 1.0;
-
-            switch (png_ptr->background_gamma_type)
-            {
-               case PNG_BACKGROUND_GAMMA_SCREEN:
-                  g = (png_ptr->screen_gamma);
-                  gs = 1.0;
-                  break;
-               case PNG_BACKGROUND_GAMMA_FILE:
-                  g = 1.0 / (png_ptr->gamma);
-                  gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
-                  break;
-               case PNG_BACKGROUND_GAMMA_UNIQUE:
-                  g = 1.0 / (png_ptr->background_gamma);
-                  gs = 1.0 / (png_ptr->background_gamma *
-                     png_ptr->screen_gamma);
-                  break;
-            }
-
-            png_ptr->background_1.gray = (png_uint_16)(pow(
-               (double)png_ptr->background.gray / m, g) * m + .5);
-            png_ptr->background.gray = (png_uint_16)(pow(
-               (double)png_ptr->background.gray / m, gs) * m + .5);
-
-            if ((png_ptr->background.red != png_ptr->background.green) ||
-                (png_ptr->background.red != png_ptr->background.blue) ||
-                (png_ptr->background.red != png_ptr->background.gray))
-            {
-               /* RGB or RGBA with color background */
-               png_ptr->background_1.red = (png_uint_16)(pow(
-                  (double)png_ptr->background.red / m, g) * m + .5);
-               png_ptr->background_1.green = (png_uint_16)(pow(
-                  (double)png_ptr->background.green / m, g) * m + .5);
-               png_ptr->background_1.blue = (png_uint_16)(pow(
-                  (double)png_ptr->background.blue / m, g) * m + .5);
-               png_ptr->background.red = (png_uint_16)(pow(
-                  (double)png_ptr->background.red / m, gs) * m + .5);
-               png_ptr->background.green = (png_uint_16)(pow(
-                  (double)png_ptr->background.green / m, gs) * m + .5);
-               png_ptr->background.blue = (png_uint_16)(pow(
-                  (double)png_ptr->background.blue / m, gs) * m + .5);
-            }
-            else
-            {
-               /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */
-               png_ptr->background_1.red = png_ptr->background_1.green
-                 = png_ptr->background_1.blue = png_ptr->background_1.gray;
-               png_ptr->background.red = png_ptr->background.green
-                 = png_ptr->background.blue = png_ptr->background.gray;
-            }
-         }
-      }
-      else
-      /* transformation does not include PNG_BACKGROUND */
-#endif /* PNG_READ_BACKGROUND_SUPPORTED */
-      if (color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         png_colorp palette = png_ptr->palette;
-         int num_palette = png_ptr->num_palette;
-         int i;
-
-         for (i = 0; i < num_palette; i++)
-         {
-            palette[i].red = png_ptr->gamma_table[palette[i].red];
-            palette[i].green = png_ptr->gamma_table[palette[i].green];
-            palette[i].blue = png_ptr->gamma_table[palette[i].blue];
-         }
-      }
-   }
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   else
-#endif
-#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   /* No GAMMA transformation */
-   if ((png_ptr->transformations & PNG_BACKGROUND) &&
-       (color_type == PNG_COLOR_TYPE_PALETTE))
-   {
-      int i;
-      int istop = (int)png_ptr->num_trans;
-      png_color back;
-      png_colorp palette = png_ptr->palette;
-
-      back.red   = (png_byte)png_ptr->background.red;
-      back.green = (png_byte)png_ptr->background.green;
-      back.blue  = (png_byte)png_ptr->background.blue;
-
-      for (i = 0; i < istop; i++)
-      {
-         if (png_ptr->trans[i] == 0)
-         {
-            palette[i] = back;
-         }
-         else if (png_ptr->trans[i] != 0xff)
-         {
-            /* The png_composite() macro is defined in png.h */
-            png_composite(palette[i].red, palette[i].red,
-               png_ptr->trans[i], back.red);
-            png_composite(palette[i].green, palette[i].green,
-               png_ptr->trans[i], back.green);
-            png_composite(palette[i].blue, palette[i].blue,
-               png_ptr->trans[i], back.blue);
-         }
-      }
-   }
-#endif /* PNG_READ_BACKGROUND_SUPPORTED */
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-   if ((png_ptr->transformations & PNG_SHIFT) &&
-      (color_type == PNG_COLOR_TYPE_PALETTE))
-   {
-      png_uint_16 i;
-      png_uint_16 istop = png_ptr->num_palette;
-      int sr = 8 - png_ptr->sig_bit.red;
-      int sg = 8 - png_ptr->sig_bit.green;
-      int sb = 8 - png_ptr->sig_bit.blue;
-
-      if (sr < 0 || sr > 8)
-         sr = 0;
-      if (sg < 0 || sg > 8)
-         sg = 0;
-      if (sb < 0 || sb > 8)
-         sb = 0;
-      for (i = 0; i < istop; i++)
-      {
-         png_ptr->palette[i].red >>= sr;
-         png_ptr->palette[i].green >>= sg;
-         png_ptr->palette[i].blue >>= sb;
-      }
-   }
-#endif  /* PNG_READ_SHIFT_SUPPORTED */
- }
-#if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \
- && !defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if(png_ptr)
-      return;
-#endif
-}
-
-/* Modify the info structure to reflect the transformations.  The
- * info should be updated so a PNG file could be written with it,
- * assuming the transformations result in valid PNG data.
- */
-void /* PRIVATE */
-png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_read_transform_info\n");
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-   if (png_ptr->transformations & PNG_EXPAND)
-   {
-      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         if (png_ptr->num_trans)
-            info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-         else
-            info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-         info_ptr->bit_depth = 8;
-         info_ptr->num_trans = 0;
-      }
-      else
-      {
-         if (png_ptr->num_trans)
-            info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
-         if (info_ptr->bit_depth < 8)
-            info_ptr->bit_depth = 8;
-         info_ptr->num_trans = 0;
-      }
-   }
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if (png_ptr->transformations & PNG_BACKGROUND)
-   {
-      info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
-      info_ptr->num_trans = 0;
-      info_ptr->background = png_ptr->background;
-   }
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   if (png_ptr->transformations & PNG_GAMMA)
-   {
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-      info_ptr->gamma = png_ptr->gamma;
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-      info_ptr->int_gamma = png_ptr->int_gamma;
-#endif
-   }
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-   if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16))
-      info_ptr->bit_depth = 8;
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-   if (png_ptr->transformations & PNG_DITHER)
-   {
-      if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
-         (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
-         png_ptr->palette_lookup && info_ptr->bit_depth == 8)
-      {
-         info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-      }
-   }
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-   if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))
-      info_ptr->bit_depth = 8;
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-   if (png_ptr->transformations & PNG_GRAY_TO_RGB)
-      info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-   if (png_ptr->transformations & PNG_RGB_TO_GRAY)
-      info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
-#endif
-
-   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      info_ptr->channels = 1;
-   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
-      info_ptr->channels = 3;
-   else
-      info_ptr->channels = 1;
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_STRIP_ALPHA)
-      info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
-#endif
-
-   if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
-      info_ptr->channels++;
-
-#if defined(PNG_READ_FILLER_SUPPORTED)
-   /* STRIP_ALPHA and FILLER allowed:  MASK_ALPHA bit stripped above */
-   if ((png_ptr->transformations & PNG_FILLER) &&
-       ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
-       (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)))
-   {
-      info_ptr->channels++;
-#if 0 /* if adding a true alpha channel not just filler */
-      info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
-#endif
-   }
-#endif
-
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \
-defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   if(png_ptr->transformations & PNG_USER_TRANSFORM)
-     {
-       if(info_ptr->bit_depth < png_ptr->user_transform_depth)
-         info_ptr->bit_depth = png_ptr->user_transform_depth;
-       if(info_ptr->channels < png_ptr->user_transform_channels)
-         info_ptr->channels = png_ptr->user_transform_channels;
-     }
-#endif
-
-   info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
-      info_ptr->bit_depth);
-
-   info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth,info_ptr->width);
-
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
-   if(png_ptr)
-      return;
-#endif
-}
-
-/* Transform the row.  The order of transformations is significant,
- * and is very touchy.  If you add a transformation, take care to
- * decide how it fits in with the other transformations here.
- */
-void /* PRIVATE */
-png_do_read_transformations(png_structp png_ptr)
-{
-   png_debug(1, "in png_do_read_transformations\n");
-#if !defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (png_ptr->row_buf == NULL)
-   {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-      char msg[50];
-
-      sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number,
-         png_ptr->pass);
-      png_error(png_ptr, msg);
-#else
-      png_error(png_ptr, "NULL row buffer");
-#endif
-   }
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-   if (png_ptr->transformations & PNG_EXPAND)
-   {
-      if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1,
-            png_ptr->palette, png_ptr->trans, png_ptr->num_trans);
-      }
-      else
-      {
-         if (png_ptr->num_trans)
-            png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
-               &(png_ptr->trans_values));
-         else
-            png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
-               NULL);
-      }
-   }
-#endif
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_STRIP_ALPHA)
-      png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         PNG_FLAG_FILLER_AFTER);
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-   if (png_ptr->transformations & PNG_RGB_TO_GRAY)
-   {
-      int rgb_error =
-         png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1);
-      if(rgb_error)
-      {
-         png_ptr->rgb_to_gray_status=1;
-         if(png_ptr->transformations == PNG_RGB_TO_GRAY_WARN)
-            png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel");
-         if(png_ptr->transformations == PNG_RGB_TO_GRAY_ERR)
-            png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel");
-      }
-   }
-#endif
-
-/*
-From Andreas Dilger e-mail to png-implement, 26 March 1998:
-
-  In most cases, the "simple transparency" should be done prior to doing
-  gray-to-RGB, or you will have to test 3x as many bytes to check if a
-  pixel is transparent.  You would also need to make sure that the
-  transparency information is upgraded to RGB.
-
-  To summarize, the current flow is:
-  - Gray + simple transparency -> compare 1 or 2 gray bytes and composite
-                                  with background "in place" if transparent,
-                                  convert to RGB if necessary
-  - Gray + alpha -> composite with gray background and remove alpha bytes,
-                                  convert to RGB if necessary
-
-  To support RGB backgrounds for gray images we need:
-  - Gray + simple transparency -> convert to RGB + simple transparency, compare
-                                  3 or 6 bytes and composite with background
-                                  "in place" if transparent (3x compare/pixel
-                                  compared to doing composite with gray bkgrnd)
-  - Gray + alpha -> convert to RGB + alpha, composite with background and
-                                  remove alpha bytes (3x float operations/pixel
-                                  compared with composite on gray background)
-
-  Greg's change will do this.  The reason it wasn't done before is for
-  performance, as this increases the per-pixel operations.  If we would check
-  in advance if the background was gray or RGB, and position the gray-to-RGB
-  transform appropriately, then it would save a lot of work/time.
- */
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-   /* if gray -> RGB, do so now only if background is non-gray; else do later
-    * for performance reasons */
-   if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
-       !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
-      png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if ((png_ptr->transformations & PNG_BACKGROUND) &&
-      ((png_ptr->num_trans != 0 ) ||
-      (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
-      png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         &(png_ptr->trans_values), &(png_ptr->background)
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-         , &(png_ptr->background_1),
-         png_ptr->gamma_table, png_ptr->gamma_from_1,
-         png_ptr->gamma_to_1, png_ptr->gamma_16_table,
-         png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1,
-         png_ptr->gamma_shift
-#endif
-);
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   if ((png_ptr->transformations & PNG_GAMMA) &&
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-      !((png_ptr->transformations & PNG_BACKGROUND) &&
-      ((png_ptr->num_trans != 0) ||
-      (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
-#endif
-      (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))
-      png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         png_ptr->gamma_table, png_ptr->gamma_16_table,
-         png_ptr->gamma_shift);
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-   if (png_ptr->transformations & PNG_16_TO_8)
-      png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-   if (png_ptr->transformations & PNG_DITHER)
-   {
-      png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1,
-         png_ptr->palette_lookup, png_ptr->dither_index);
-      if(png_ptr->row_info.rowbytes == (png_uint_32)0)
-         png_error(png_ptr, "png_do_dither returned rowbytes=0");
-   }
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_MONO)
-      png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-   if (png_ptr->transformations & PNG_SHIFT)
-      png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         &(png_ptr->shift));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACK)
-      png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED)
-   if (png_ptr->transformations & PNG_BGR)
-      png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACKSWAP)
-      png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-   /* if gray -> RGB, do so now only if we did not do so above */
-   if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
-       (png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
-      png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED)
-   if (png_ptr->transformations & PNG_FILLER)
-      png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         (png_uint_32)png_ptr->filler, png_ptr->flags);
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_ALPHA)
-      png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_ALPHA)
-      png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_BYTES)
-      png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   if (png_ptr->transformations & PNG_USER_TRANSFORM)
-    {
-      if(png_ptr->read_user_transform_fn != NULL)
-        (*(png_ptr->read_user_transform_fn)) /* user read transform function */
-          (png_ptr,                    /* png_ptr */
-           &(png_ptr->row_info),       /* row_info:     */
-             /*  png_uint_32 width;          width of row */
-             /*  png_uint_32 rowbytes;       number of bytes in row */
-             /*  png_byte color_type;        color type of pixels */
-             /*  png_byte bit_depth;         bit depth of samples */
-             /*  png_byte channels;          number of channels (1-4) */
-             /*  png_byte pixel_depth;       bits per pixel (depth*channels) */
-           png_ptr->row_buf + 1);      /* start of pixel data for row */
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-      if(png_ptr->user_transform_depth)
-         png_ptr->row_info.bit_depth = png_ptr->user_transform_depth;
-      if(png_ptr->user_transform_channels)
-         png_ptr->row_info.channels = png_ptr->user_transform_channels;
-#endif
-      png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *
-         png_ptr->row_info.channels);
-      png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
-         png_ptr->row_info.width);
-   }
-#endif
-
-}
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel,
- * without changing the actual values.  Thus, if you had a row with
- * a bit depth of 1, you would end up with bytes that only contained
- * the numbers 0 or 1.  If you would rather they contain 0 and 255, use
- * png_do_shift() after this.
- */
-void /* PRIVATE */
-png_do_unpack(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_unpack\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL && row_info->bit_depth < 8)
-#else
-   if (row_info->bit_depth < 8)
-#endif
-   {
-      png_uint_32 i;
-      png_uint_32 row_width=row_info->width;
-
-      switch (row_info->bit_depth)
-      {
-         case 1:
-         {
-            png_bytep sp = row + (png_size_t)((row_width - 1) >> 3);
-            png_bytep dp = row + (png_size_t)row_width - 1;
-            png_uint_32 shift = 7 - (int)((row_width + 7) & 0x07);
-            for (i = 0; i < row_width; i++)
-            {
-               *dp = (png_byte)((*sp >> shift) & 0x01);
-               if (shift == 7)
-               {
-                  shift = 0;
-                  sp--;
-               }
-               else
-                  shift++;
-
-               dp--;
-            }
-            break;
-         }
-         case 2:
-         {
-
-            png_bytep sp = row + (png_size_t)((row_width - 1) >> 2);
-            png_bytep dp = row + (png_size_t)row_width - 1;
-            png_uint_32 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
-            for (i = 0; i < row_width; i++)
-            {
-               *dp = (png_byte)((*sp >> shift) & 0x03);
-               if (shift == 6)
-               {
-                  shift = 0;
-                  sp--;
-               }
-               else
-                  shift += 2;
-
-               dp--;
-            }
-            break;
-         }
-         case 4:
-         {
-            png_bytep sp = row + (png_size_t)((row_width - 1) >> 1);
-            png_bytep dp = row + (png_size_t)row_width - 1;
-            png_uint_32 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);
-            for (i = 0; i < row_width; i++)
-            {
-               *dp = (png_byte)((*sp >> shift) & 0x0f);
-               if (shift == 4)
-               {
-                  shift = 0;
-                  sp--;
-               }
-               else
-                  shift = 4;
-
-               dp--;
-            }
-            break;
-         }
-      }
-      row_info->bit_depth = 8;
-      row_info->pixel_depth = (png_byte)(8 * row_info->channels);
-      row_info->rowbytes = row_width * row_info->channels;
-   }
-}
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-/* Reverse the effects of png_do_shift.  This routine merely shifts the
- * pixels back to their significant bits values.  Thus, if you have
- * a row of bit depth 8, but only 5 are significant, this will shift
- * the values back to 0 through 31.
- */
-void /* PRIVATE */
-png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
-{
-   png_debug(1, "in png_do_unshift\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL && sig_bits != NULL &&
-#endif
-       row_info->color_type != PNG_COLOR_TYPE_PALETTE)
-   {
-      int shift[4];
-      int channels = 0;
-      int c;
-      png_uint_16 value = 0;
-      png_uint_32 row_width = row_info->width;
-
-      if (row_info->color_type & PNG_COLOR_MASK_COLOR)
-      {
-         shift[channels++] = row_info->bit_depth - sig_bits->red;
-         shift[channels++] = row_info->bit_depth - sig_bits->green;
-         shift[channels++] = row_info->bit_depth - sig_bits->blue;
-      }
-      else
-      {
-         shift[channels++] = row_info->bit_depth - sig_bits->gray;
-      }
-      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
-      {
-         shift[channels++] = row_info->bit_depth - sig_bits->alpha;
-      }
-
-      for (c = 0; c < channels; c++)
-      {
-         if (shift[c] <= 0)
-            shift[c] = 0;
-         else
-            value = 1;
-      }
-
-      if (!value)
-         return;
-
-      switch (row_info->bit_depth)
-      {
-         case 2:
-         {
-            png_bytep bp;
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-
-            for (bp = row, i = 0; i < istop; i++)
-            {
-               *bp >>= 1;
-               *bp++ &= 0x55;
-            }
-            break;
-         }
-         case 4:
-         {
-            png_bytep bp = row;
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-            png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) |
-               (png_byte)((int)0xf >> shift[0]));
-
-            for (i = 0; i < istop; i++)
-            {
-               *bp >>= shift[0];
-               *bp++ &= mask;
-            }
-            break;
-         }
-         case 8:
-         {
-            png_bytep bp = row;
-            png_uint_32 i;
-            png_uint_32 istop = row_width * channels;
-
-            for (i = 0; i < istop; i++)
-            {
-               *bp++ >>= shift[i%channels];
-            }
-            break;
-         }
-         case 16:
-         {
-            png_bytep bp = row;
-            png_uint_32 i;
-            png_uint_32 istop = channels * row_width;
-
-            for (i = 0; i < istop; i++)
-            {
-               value = (png_uint_16)((*bp << 8) + *(bp + 1));
-               value >>= shift[i%channels];
-               *bp++ = (png_byte)(value >> 8);
-               *bp++ = (png_byte)(value & 0xff);
-            }
-            break;
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-/* chop rows of bit depth 16 down to 8 */
-void /* PRIVATE */
-png_do_chop(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_chop\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL && row_info->bit_depth == 16)
-#else
-   if (row_info->bit_depth == 16)
-#endif
-   {
-      png_bytep sp = row;
-      png_bytep dp = row;
-      png_uint_32 i;
-      png_uint_32 istop = row_info->width * row_info->channels;
-
-      for (i = 0; i<istop; i++, sp += 2, dp++)
-      {
-#if defined(PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED)
-      /* This does a more accurate scaling of the 16-bit color
-       * value, rather than a simple low-byte truncation.
-       *
-       * What the ideal calculation should be:
-       *   *dp = (((((png_uint_32)(*sp) << 8) |
-       *          (png_uint_32)(*(sp + 1))) * 255 + 127) / (png_uint_32)65535L;
-       *
-       * GRR: no, I think this is what it really should be:
-       *   *dp = (((((png_uint_32)(*sp) << 8) |
-       *           (png_uint_32)(*(sp + 1))) + 128L) / (png_uint_32)257L;
-       *
-       * GRR: here's the exact calculation with shifts:
-       *   temp = (((png_uint_32)(*sp) << 8) | (png_uint_32)(*(sp + 1))) + 128L;
-       *   *dp = (temp - (temp >> 8)) >> 8;
-       *
-       * Approximate calculation with shift/add instead of multiply/divide:
-       *   *dp = ((((png_uint_32)(*sp) << 8) |
-       *          (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8;
-       *
-       * What we actually do to avoid extra shifting and conversion:
-       */
-
-         *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0);
-#else
-       /* Simply discard the low order byte */
-         *dp = *sp;
-#endif
-      }
-      row_info->bit_depth = 8;
-      row_info->pixel_depth = (png_byte)(8 * row_info->channels);
-      row_info->rowbytes = row_info->width * row_info->channels;
-   }
-}
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-void /* PRIVATE */
-png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_read_swap_alpha\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      png_uint_32 row_width = row_info->width;
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-      {
-         /* This converts from RGBA to ARGB */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_byte save;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               save = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = save;
-            }
-         }
-         /* This converts from RRGGBBAA to AARRGGBB */
-         else
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_byte save[2];
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               save[0] = *(--sp);
-               save[1] = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = save[0];
-               *(--dp) = save[1];
-            }
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         /* This converts from GA to AG */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_byte save;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               save = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = save;
-            }
-         }
-         /* This converts from GGAA to AAGG */
-         else
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_byte save[2];
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               save[0] = *(--sp);
-               save[1] = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = save[0];
-               *(--dp) = save[1];
-            }
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-void /* PRIVATE */
-png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_read_invert_alpha\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      png_uint_32 row_width = row_info->width;
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-      {
-         /* This inverts the alpha channel in RGBA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = (png_byte)(255 - *(--sp));
-
-/*             This does nothing:
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               We can replace it with:
-*/
-               sp-=3;
-               dp=sp;
-            }
-         }
-         /* This inverts the alpha channel in RRGGBBAA */
-         else
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = (png_byte)(255 - *(--sp));
-               *(--dp) = (png_byte)(255 - *(--sp));
-
-/*             This does nothing:
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               We can replace it with:
-*/
-               sp-=6;
-               dp=sp;
-            }
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         /* This inverts the alpha channel in GA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = (png_byte)(255 - *(--sp));
-               *(--dp) = *(--sp);
-            }
-         }
-         /* This inverts the alpha channel in GGAA */
-         else
-         {
-            png_bytep sp  = row + row_info->rowbytes;
-            png_bytep dp = sp;
-            png_uint_32 i;
-
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = (png_byte)(255 - *(--sp));
-               *(--dp) = (png_byte)(255 - *(--sp));
-/*
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-*/
-               sp-=2;
-               dp=sp;
-            }
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED)
-/* Add filler channel if we have RGB color */
-void /* PRIVATE */
-png_do_read_filler(png_row_infop row_info, png_bytep row,
-   png_uint_32 filler, png_uint_32 flags)
-{
-   png_uint_32 i;
-   png_uint_32 row_width = row_info->width;
-
-   png_byte hi_filler = (png_byte)((filler>>8) & 0xff);
-   png_byte lo_filler = (png_byte)(filler & 0xff);
-
-   png_debug(1, "in png_do_read_filler\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL  && row_info != NULL &&
-#endif
-       row_info->color_type == PNG_COLOR_TYPE_GRAY)
-   {
-      if(row_info->bit_depth == 8)
-      {
-         /* This changes the data from G to GX */
-         if (flags & PNG_FLAG_FILLER_AFTER)
-         {
-            png_bytep sp = row + (png_size_t)row_width;
-            png_bytep dp =  sp + (png_size_t)row_width;
-            for (i = 1; i < row_width; i++)
-            {
-               *(--dp) = lo_filler;
-               *(--dp) = *(--sp);
-            }
-            *(--dp) = lo_filler;
-            row_info->channels = 2;
-            row_info->pixel_depth = 16;
-            row_info->rowbytes = row_width * 2;
-         }
-      /* This changes the data from G to XG */
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width;
-            png_bytep dp = sp  + (png_size_t)row_width;
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = *(--sp);
-               *(--dp) = lo_filler;
-            }
-            row_info->channels = 2;
-            row_info->pixel_depth = 16;
-            row_info->rowbytes = row_width * 2;
-         }
-      }
-      else if(row_info->bit_depth == 16)
-      {
-         /* This changes the data from GG to GGXX */
-         if (flags & PNG_FLAG_FILLER_AFTER)
-         {
-            png_bytep sp = row + (png_size_t)row_width * 2;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 1; i < row_width; i++)
-            {
-               *(--dp) = hi_filler;
-               *(--dp) = lo_filler;
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-            }
-            *(--dp) = hi_filler;
-            *(--dp) = lo_filler;
-            row_info->channels = 2;
-            row_info->pixel_depth = 32;
-            row_info->rowbytes = row_width * 4;
-         }
-         /* This changes the data from GG to XXGG */
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width * 2;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = hi_filler;
-               *(--dp) = lo_filler;
-            }
-            row_info->channels = 2;
-            row_info->pixel_depth = 32;
-            row_info->rowbytes = row_width * 4;
-         }
-      }
-      row_info->color_type |= PNG_COLOR_MASK_ALPHA;
-   } /* COLOR_TYPE == GRAY */
-   else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-   {
-      if(row_info->bit_depth == 8)
-      {
-         /* This changes the data from RGB to RGBX */
-         if (flags & PNG_FLAG_FILLER_AFTER)
-         {
-            png_bytep sp = row + (png_size_t)row_width * 3;
-            png_bytep dp = sp  + (png_size_t)row_width;
-            for (i = 1; i < row_width; i++)
-            {
-               *(--dp) = lo_filler;
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-            }
-            *(--dp) = lo_filler;
-            row_info->channels = 4;
-            row_info->pixel_depth = 32;
-            row_info->rowbytes = row_width * 4;
-         }
-      /* This changes the data from RGB to XRGB */
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width * 3;
-            png_bytep dp = sp + (png_size_t)row_width;
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = lo_filler;
-            }
-            row_info->channels = 4;
-            row_info->pixel_depth = 32;
-            row_info->rowbytes = row_width * 4;
-         }
-      }
-      else if(row_info->bit_depth == 16)
-      {
-         /* This changes the data from RRGGBB to RRGGBBXX */
-         if (flags & PNG_FLAG_FILLER_AFTER)
-         {
-            png_bytep sp = row + (png_size_t)row_width * 6;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 1; i < row_width; i++)
-            {
-               *(--dp) = hi_filler;
-               *(--dp) = lo_filler;
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-            }
-            *(--dp) = hi_filler;
-            *(--dp) = lo_filler;
-            row_info->channels = 4;
-            row_info->pixel_depth = 64;
-            row_info->rowbytes = row_width * 8;
-         }
-         /* This changes the data from RRGGBB to XXRRGGBB */
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width * 6;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 0; i < row_width; i++)
-            {
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = *(--sp);
-               *(--dp) = hi_filler;
-               *(--dp) = lo_filler;
-            }
-            row_info->channels = 4;
-            row_info->pixel_depth = 64;
-            row_info->rowbytes = row_width * 8;
-         }
-      }
-      row_info->color_type |= PNG_COLOR_MASK_ALPHA;
-   } /* COLOR_TYPE == RGB */
-}
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-/* expand grayscale files to RGB, with or without alpha */
-void /* PRIVATE */
-png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
-{
-   png_uint_32 i;
-   png_uint_32 row_width = row_info->width;
-
-   png_debug(1, "in png_do_gray_to_rgb\n");
-   if (row_info->bit_depth >= 8 &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-      !(row_info->color_type & PNG_COLOR_MASK_COLOR))
-   {
-      if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
-      {
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + (png_size_t)row_width - 1;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 0; i < row_width; i++)
-            {
-               *(dp--) = *sp;
-               *(dp--) = *sp;
-               *(dp--) = *(sp--);
-            }
-         }
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width * 2 - 1;
-            png_bytep dp = sp  + (png_size_t)row_width * 4;
-            for (i = 0; i < row_width; i++)
-            {
-               *(dp--) = *sp;
-               *(dp--) = *(sp - 1);
-               *(dp--) = *sp;
-               *(dp--) = *(sp - 1);
-               *(dp--) = *(sp--);
-               *(dp--) = *(sp--);
-            }
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp = row + (png_size_t)row_width * 2 - 1;
-            png_bytep dp = sp  + (png_size_t)row_width * 2;
-            for (i = 0; i < row_width; i++)
-            {
-               *(dp--) = *(sp--);
-               *(dp--) = *sp;
-               *(dp--) = *sp;
-               *(dp--) = *(sp--);
-            }
-         }
-         else
-         {
-            png_bytep sp = row + (png_size_t)row_width * 4 - 1;
-            png_bytep dp = sp  + (png_size_t)row_width * 4;
-            for (i = 0; i < row_width; i++)
-            {
-               *(dp--) = *(sp--);
-               *(dp--) = *(sp--);
-               *(dp--) = *sp;
-               *(dp--) = *(sp - 1);
-               *(dp--) = *sp;
-               *(dp--) = *(sp - 1);
-               *(dp--) = *(sp--);
-               *(dp--) = *(sp--);
-            }
-         }
-      }
-      row_info->channels += (png_byte)2;
-      row_info->color_type |= PNG_COLOR_MASK_COLOR;
-      row_info->pixel_depth = (png_byte)(row_info->channels *
-         row_info->bit_depth);
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-   }
-}
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-/* reduce RGB files to grayscale, with or without alpha
- * using the equation given in Poynton's ColorFAQ at
- * <http://www.inforamp.net/~poynton/>
- * Copyright (c) 1998-01-04 Charles Poynton poynton at inforamp.net
- *
- *     Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
- *
- *  We approximate this with
- *
- *     Y = 0.21268 * R    + 0.7151 * G    + 0.07217 * B
- *
- *  which can be expressed with integers as
- *
- *     Y = (6969 * R + 23434 * G + 2365 * B)/32768
- *
- *  The calculation is to be done in a linear colorspace.
- *
- *  Other integer coefficents can be used via png_set_rgb_to_gray().
- */
-int /* PRIVATE */
-png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
-
-{
-   png_uint_32 i;
-
-   png_uint_32 row_width = row_info->width;
-   int rgb_error = 0;
-
-   png_debug(1, "in png_do_rgb_to_gray\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-      (row_info->color_type & PNG_COLOR_MASK_COLOR))
-   {
-      png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
-      png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;
-      png_uint_32 bc = png_ptr->rgb_to_gray_blue_coeff;
-
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-      {
-         if (row_info->bit_depth == 8)
-         {
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-
-               for (i = 0; i < row_width; i++)
-               {
-                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];
-                  png_byte green = png_ptr->gamma_to_1[*(sp++)];
-                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];
-                  if(red != green || red != blue)
-                  {
-                     rgb_error |= 1;
-                     *(dp++) = png_ptr->gamma_from_1[
-                       (rc*red+gc*green+bc*blue)>>15];
-                  }
-                  else
-                     *(dp++) = *(sp-1);
-               }
-            }
-            else
-#endif
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_byte red   = *(sp++);
-                  png_byte green = *(sp++);
-                  png_byte blue  = *(sp++);
-                  if(red != green || red != blue)
-                  {
-                     rgb_error |= 1;
-                     *(dp++) = (png_byte)((rc*red+gc*green+bc*blue)>>15);
-                  }
-                  else
-                     *(dp++) = *(sp-1);
-               }
-            }
-         }
-
-         else /* RGB bit_depth == 16 */
-         {
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-            if (png_ptr->gamma_16_to_1 != NULL &&
-                png_ptr->gamma_16_from_1 != NULL)
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 red, green, blue, w;
-
-                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-
-                  if(red == green && red == blue)
-                     w = red;
-                  else
-                  {
-                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>
-                                  png_ptr->gamma_shift][red>>8];
-                     png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
-                                  png_ptr->gamma_shift][green>>8];
-                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>
-                                  png_ptr->gamma_shift][blue>>8];
-                     png_uint_16 gray16  = (png_uint_16)((rc*red_1 + gc*green_1
-                                  + bc*blue_1)>>15);
-                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
-                         png_ptr->gamma_shift][gray16 >> 8];
-                     rgb_error |= 1;
-                  }
-
-                  *(dp++) = (png_byte)((w>>8) & 0xff);
-                  *(dp++) = (png_byte)(w & 0xff);
-               }
-            }
-            else
-#endif
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 red, green, blue, gray16;
-
-                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-
-                  if(red != green || red != blue)
-                     rgb_error |= 1;
-                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
-                  *(dp++) = (png_byte)((gray16>>8) & 0xff);
-                  *(dp++) = (png_byte)(gray16 & 0xff);
-               }
-            }
-         }
-      }
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-      {
-         if (row_info->bit_depth == 8)
-         {
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];
-                  png_byte green = png_ptr->gamma_to_1[*(sp++)];
-                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];
-                  if(red != green || red != blue)
-                     rgb_error |= 1;
-                  *(dp++) =  png_ptr->gamma_from_1
-                             [(rc*red + gc*green + bc*blue)>>15];
-                  *(dp++) = *(sp++);  /* alpha */
-               }
-            }
-            else
-#endif
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_byte red   = *(sp++);
-                  png_byte green = *(sp++);
-                  png_byte blue  = *(sp++);
-                  if(red != green || red != blue)
-                     rgb_error |= 1;
-                  *(dp++) =  (png_byte)((rc*red + gc*green + bc*blue)>>15);
-                  *(dp++) = *(sp++);  /* alpha */
-               }
-            }
-         }
-         else /* RGBA bit_depth == 16 */
-         {
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-            if (png_ptr->gamma_16_to_1 != NULL &&
-                png_ptr->gamma_16_from_1 != NULL)
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 red, green, blue, w;
-
-                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
-
-                  if(red == green && red == blue)
-                     w = red;
-                  else
-                  {
-                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>
-                                  png_ptr->gamma_shift][red>>8];
-                     png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
-                                  png_ptr->gamma_shift][green>>8];
-                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>
-                                  png_ptr->gamma_shift][blue>>8];
-                     png_uint_16 gray16  = (png_uint_16)((rc * red_1
-                                  + gc * green_1 + bc * blue_1)>>15);
-                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
-                         png_ptr->gamma_shift][gray16 >> 8];
-                     rgb_error |= 1;
-                  }
-
-                  *(dp++) = (png_byte)((w>>8) & 0xff);
-                  *(dp++) = (png_byte)(w & 0xff);
-                  *(dp++) = *(sp++);  /* alpha */
-                  *(dp++) = *(sp++);
-               }
-            }
-            else
-#endif
-            {
-               png_bytep sp = row;
-               png_bytep dp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 red, green, blue, gray16;
-                  red   = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
-                  green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
-                  blue  = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
-                  if(red != green || red != blue)
-                     rgb_error |= 1;
-                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
-                  *(dp++) = (png_byte)((gray16>>8) & 0xff);
-                  *(dp++) = (png_byte)(gray16 & 0xff);
-                  *(dp++) = *(sp++);  /* alpha */
-                  *(dp++) = *(sp++);
-               }
-            }
-         }
-      }
-   row_info->channels -= (png_byte)2;
-      row_info->color_type &= ~PNG_COLOR_MASK_COLOR;
-      row_info->pixel_depth = (png_byte)(row_info->channels *
-         row_info->bit_depth);
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-   }
-   return rgb_error;
-}
-#endif
-
-/* Build a grayscale palette.  Palette is assumed to be 1 << bit_depth
- * large of png_color.  This lets grayscale images be treated as
- * paletted.  Most useful for gamma correction and simplification
- * of code.
- */
-void PNGAPI
-png_build_grayscale_palette(int bit_depth, png_colorp palette)
-{
-   int num_palette;
-   int color_inc;
-   int i;
-   int v;
-
-   png_debug(1, "in png_do_build_grayscale_palette\n");
-   if (palette == NULL)
-      return;
-
-   switch (bit_depth)
-   {
-      case 1:
-         num_palette = 2;
-         color_inc = 0xff;
-         break;
-      case 2:
-         num_palette = 4;
-         color_inc = 0x55;
-         break;
-      case 4:
-         num_palette = 16;
-         color_inc = 0x11;
-         break;
-      case 8:
-         num_palette = 256;
-         color_inc = 1;
-         break;
-      default:
-         num_palette = 0;
-         color_inc = 0;
-         break;
-   }
-
-   for (i = 0, v = 0; i < num_palette; i++, v += color_inc)
-   {
-      palette[i].red = (png_byte)v;
-      palette[i].green = (png_byte)v;
-      palette[i].blue = (png_byte)v;
-   }
-}
-
-/* This function is currently unused.  Do we really need it? */
-#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED)
-void /* PRIVATE */
-png_correct_palette(png_structp png_ptr, png_colorp palette,
-   int num_palette)
-{
-   png_debug(1, "in png_correct_palette\n");
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
-    defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
-   if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND))
-   {
-      png_color back, back_1;
-
-      if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)
-      {
-         back.red = png_ptr->gamma_table[png_ptr->background.red];
-         back.green = png_ptr->gamma_table[png_ptr->background.green];
-         back.blue = png_ptr->gamma_table[png_ptr->background.blue];
-
-         back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];
-         back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];
-         back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];
-      }
-      else
-      {
-         double g;
-
-         g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);
-
-         if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN ||
-             fabs(g - 1.0) < PNG_GAMMA_THRESHOLD)
-         {
-            back.red = png_ptr->background.red;
-            back.green = png_ptr->background.green;
-            back.blue = png_ptr->background.blue;
-         }
-         else
-         {
-            back.red =
-               (png_byte)(pow((double)png_ptr->background.red/255, g) *
-                255.0 + 0.5);
-            back.green =
-               (png_byte)(pow((double)png_ptr->background.green/255, g) *
-                255.0 + 0.5);
-            back.blue =
-               (png_byte)(pow((double)png_ptr->background.blue/255, g) *
-                255.0 + 0.5);
-         }
-
-         g = 1.0 / png_ptr->background_gamma;
-
-         back_1.red =
-            (png_byte)(pow((double)png_ptr->background.red/255, g) *
-             255.0 + 0.5);
-         back_1.green =
-            (png_byte)(pow((double)png_ptr->background.green/255, g) *
-             255.0 + 0.5);
-         back_1.blue =
-            (png_byte)(pow((double)png_ptr->background.blue/255, g) *
-             255.0 + 0.5);
-      }
-
-      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         png_uint_32 i;
-
-         for (i = 0; i < (png_uint_32)num_palette; i++)
-         {
-            if (i < png_ptr->num_trans && png_ptr->trans[i] == 0)
-            {
-               palette[i] = back;
-            }
-            else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff)
-            {
-               png_byte v, w;
-
-               v = png_ptr->gamma_to_1[png_ptr->palette[i].red];
-               png_composite(w, v, png_ptr->trans[i], back_1.red);
-               palette[i].red = png_ptr->gamma_from_1[w];
-
-               v = png_ptr->gamma_to_1[png_ptr->palette[i].green];
-               png_composite(w, v, png_ptr->trans[i], back_1.green);
-               palette[i].green = png_ptr->gamma_from_1[w];
-
-               v = png_ptr->gamma_to_1[png_ptr->palette[i].blue];
-               png_composite(w, v, png_ptr->trans[i], back_1.blue);
-               palette[i].blue = png_ptr->gamma_from_1[w];
-            }
-            else
-            {
-               palette[i].red = png_ptr->gamma_table[palette[i].red];
-               palette[i].green = png_ptr->gamma_table[palette[i].green];
-               palette[i].blue = png_ptr->gamma_table[palette[i].blue];
-            }
-         }
-      }
-      else
-      {
-         int i;
-
-         for (i = 0; i < num_palette; i++)
-         {
-            if (palette[i].red == (png_byte)png_ptr->trans_values.gray)
-            {
-               palette[i] = back;
-            }
-            else
-            {
-               palette[i].red = png_ptr->gamma_table[palette[i].red];
-               palette[i].green = png_ptr->gamma_table[palette[i].green];
-               palette[i].blue = png_ptr->gamma_table[palette[i].blue];
-            }
-         }
-      }
-   }
-   else
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   if (png_ptr->transformations & PNG_GAMMA)
-   {
-      int i;
-
-      for (i = 0; i < num_palette; i++)
-      {
-         palette[i].red = png_ptr->gamma_table[palette[i].red];
-         palette[i].green = png_ptr->gamma_table[palette[i].green];
-         palette[i].blue = png_ptr->gamma_table[palette[i].blue];
-      }
-   }
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   else
-#endif
-#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-   if (png_ptr->transformations & PNG_BACKGROUND)
-   {
-      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         png_color back;
-
-         back.red   = (png_byte)png_ptr->background.red;
-         back.green = (png_byte)png_ptr->background.green;
-         back.blue  = (png_byte)png_ptr->background.blue;
-
-         for (i = 0; i < (int)png_ptr->num_trans; i++)
-         {
-            if (png_ptr->trans[i] == 0)
-            {
-               palette[i].red = back.red;
-               palette[i].green = back.green;
-               palette[i].blue = back.blue;
-            }
-            else if (png_ptr->trans[i] != 0xff)
-            {
-               png_composite(palette[i].red, png_ptr->palette[i].red,
-                  png_ptr->trans[i], back.red);
-               png_composite(palette[i].green, png_ptr->palette[i].green,
-                  png_ptr->trans[i], back.green);
-               png_composite(palette[i].blue, png_ptr->palette[i].blue,
-                  png_ptr->trans[i], back.blue);
-            }
-         }
-      }
-      else /* assume grayscale palette (what else could it be?) */
-      {
-         int i;
-
-         for (i = 0; i < num_palette; i++)
-         {
-            if (i == (png_byte)png_ptr->trans_values.gray)
-            {
-               palette[i].red = (png_byte)png_ptr->background.red;
-               palette[i].green = (png_byte)png_ptr->background.green;
-               palette[i].blue = (png_byte)png_ptr->background.blue;
-            }
-         }
-      }
-   }
-#endif
-}
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-/* Replace any alpha or transparency with the supplied background color.
- * "background" is already in the screen gamma, while "background_1" is
- * at a gamma of 1.0.  Paletted files have already been taken care of.
- */
-void /* PRIVATE */
-png_do_background(png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   , png_color_16p background_1,
-   png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
-   png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
-   png_uint_16pp gamma_16_to_1, int gamma_shift
-#endif
-   )
-{
-   png_bytep sp, dp;
-   png_uint_32 i;
-   png_uint_32 row_width=row_info->width;
-   int shift;
-
-   png_debug(1, "in png_do_background\n");
-   if (background != NULL &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-      (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) ||
-      (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values)))
-   {
-      switch (row_info->color_type)
-      {
-         case PNG_COLOR_TYPE_GRAY:
-         {
-            switch (row_info->bit_depth)
-            {
-               case 1:
-               {
-                  sp = row;
-                  shift = 7;
-                  for (i = 0; i < row_width; i++)
-                  {
-                     if ((png_uint_16)((*sp >> shift) & 0x01)
-                        == trans_values->gray)
-                     {
-                        *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
-                        *sp |= (png_byte)(background->gray << shift);
-                     }
-                     if (!shift)
-                     {
-                        shift = 7;
-                        sp++;
-                     }
-                     else
-                        shift--;
-                  }
-                  break;
-               }
-               case 2:
-               {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                  if (gamma_table != NULL)
-                  {
-                     sp = row;
-                     shift = 6;
-                     for (i = 0; i < row_width; i++)
-                     {
-                        if ((png_uint_16)((*sp >> shift) & 0x03)
-                            == trans_values->gray)
-                        {
-                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                           *sp |= (png_byte)(background->gray << shift);
-                        }
-                        else
-                        {
-                           png_byte p = (png_byte)((*sp >> shift) & 0x03);
-                           png_byte g = (png_byte)((gamma_table [p | (p << 2) |
-                               (p << 4) | (p << 6)] >> 6) & 0x03);
-                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                           *sp |= (png_byte)(g << shift);
-                        }
-                        if (!shift)
-                        {
-                           shift = 6;
-                           sp++;
-                        }
-                        else
-                           shift -= 2;
-                     }
-                  }
-                  else
-#endif
-                  {
-                     sp = row;
-                     shift = 6;
-                     for (i = 0; i < row_width; i++)
-                     {
-                        if ((png_uint_16)((*sp >> shift) & 0x03)
-                            == trans_values->gray)
-                        {
-                           *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                           *sp |= (png_byte)(background->gray << shift);
-                        }
-                        if (!shift)
-                        {
-                           shift = 6;
-                           sp++;
-                        }
-                        else
-                           shift -= 2;
-                     }
-                  }
-                  break;
-               }
-               case 4:
-               {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                  if (gamma_table != NULL)
-                  {
-                     sp = row;
-                     shift = 4;
-                     for (i = 0; i < row_width; i++)
-                     {
-                        if ((png_uint_16)((*sp >> shift) & 0x0f)
-                            == trans_values->gray)
-                        {
-                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                           *sp |= (png_byte)(background->gray << shift);
-                        }
-                        else
-                        {
-                           png_byte p = (png_byte)((*sp >> shift) & 0x0f);
-                           png_byte g = (png_byte)((gamma_table[p |
-                             (p << 4)] >> 4) & 0x0f);
-                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                           *sp |= (png_byte)(g << shift);
-                        }
-                        if (!shift)
-                        {
-                           shift = 4;
-                           sp++;
-                        }
-                        else
-                           shift -= 4;
-                     }
-                  }
-                  else
-#endif
-                  {
-                     sp = row;
-                     shift = 4;
-                     for (i = 0; i < row_width; i++)
-                     {
-                        if ((png_uint_16)((*sp >> shift) & 0x0f)
-                            == trans_values->gray)
-                        {
-                           *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                           *sp |= (png_byte)(background->gray << shift);
-                        }
-                        if (!shift)
-                        {
-                           shift = 4;
-                           sp++;
-                        }
-                        else
-                           shift -= 4;
-                     }
-                  }
-                  break;
-               }
-               case 8:
-               {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                  if (gamma_table != NULL)
-                  {
-                     sp = row;
-                     for (i = 0; i < row_width; i++, sp++)
-                     {
-                        if (*sp == trans_values->gray)
-                        {
-                           *sp = (png_byte)background->gray;
-                        }
-                        else
-                        {
-                           *sp = gamma_table[*sp];
-                        }
-                     }
-                  }
-                  else
-#endif
-                  {
-                     sp = row;
-                     for (i = 0; i < row_width; i++, sp++)
-                     {
-                        if (*sp == trans_values->gray)
-                        {
-                           *sp = (png_byte)background->gray;
-                        }
-                     }
-                  }
-                  break;
-               }
-               case 16:
-               {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                  if (gamma_16 != NULL)
-                  {
-                     sp = row;
-                     for (i = 0; i < row_width; i++, sp += 2)
-                     {
-                        png_uint_16 v;
-
-                        v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        if (v == trans_values->gray)
-                        {
-                           /* background is already in screen gamma */
-                           *sp = (png_byte)((background->gray >> 8) & 0xff);
-                           *(sp + 1) = (png_byte)(background->gray & 0xff);
-                        }
-                        else
-                        {
-                           v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
-                           *sp = (png_byte)((v >> 8) & 0xff);
-                           *(sp + 1) = (png_byte)(v & 0xff);
-                        }
-                     }
-                  }
-                  else
-#endif
-                  {
-                     sp = row;
-                     for (i = 0; i < row_width; i++, sp += 2)
-                     {
-                        png_uint_16 v;
-
-                        v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        if (v == trans_values->gray)
-                        {
-                           *sp = (png_byte)((background->gray >> 8) & 0xff);
-                           *(sp + 1) = (png_byte)(background->gray & 0xff);
-                        }
-                     }
-                  }
-                  break;
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_RGB:
-         {
-            if (row_info->bit_depth == 8)
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_table != NULL)
-               {
-                  sp = row;
-                  for (i = 0; i < row_width; i++, sp += 3)
-                  {
-                     if (*sp == trans_values->red &&
-                        *(sp + 1) == trans_values->green &&
-                        *(sp + 2) == trans_values->blue)
-                     {
-                        *sp = (png_byte)background->red;
-                        *(sp + 1) = (png_byte)background->green;
-                        *(sp + 2) = (png_byte)background->blue;
-                     }
-                     else
-                     {
-                        *sp = gamma_table[*sp];
-                        *(sp + 1) = gamma_table[*(sp + 1)];
-                        *(sp + 2) = gamma_table[*(sp + 2)];
-                     }
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  for (i = 0; i < row_width; i++, sp += 3)
-                  {
-                     if (*sp == trans_values->red &&
-                        *(sp + 1) == trans_values->green &&
-                        *(sp + 2) == trans_values->blue)
-                     {
-                        *sp = (png_byte)background->red;
-                        *(sp + 1) = (png_byte)background->green;
-                        *(sp + 2) = (png_byte)background->blue;
-                     }
-                  }
-               }
-            }
-            else /* if (row_info->bit_depth == 16) */
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_16 != NULL)
-               {
-                  sp = row;
-                  for (i = 0; i < row_width; i++, sp += 6)
-                  {
-                     png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                     png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
-                     png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
-                     if (r == trans_values->red && g == trans_values->green &&
-                        b == trans_values->blue)
-                     {
-                        /* background is already in screen gamma */
-                        *sp = (png_byte)((background->red >> 8) & 0xff);
-                        *(sp + 1) = (png_byte)(background->red & 0xff);
-                        *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);
-                        *(sp + 3) = (png_byte)(background->green & 0xff);
-                        *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);
-                        *(sp + 5) = (png_byte)(background->blue & 0xff);
-                     }
-                     else
-                     {
-                        png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
-                        *sp = (png_byte)((v >> 8) & 0xff);
-                        *(sp + 1) = (png_byte)(v & 0xff);
-                        v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
-                        *(sp + 2) = (png_byte)((v >> 8) & 0xff);
-                        *(sp + 3) = (png_byte)(v & 0xff);
-                        v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
-                        *(sp + 4) = (png_byte)((v >> 8) & 0xff);
-                        *(sp + 5) = (png_byte)(v & 0xff);
-                     }
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  for (i = 0; i < row_width; i++, sp += 6)
-                  {
-                     png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1));
-                     png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
-                     png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
-
-                     if (r == trans_values->red && g == trans_values->green &&
-                        b == trans_values->blue)
-                     {
-                        *sp = (png_byte)((background->red >> 8) & 0xff);
-                        *(sp + 1) = (png_byte)(background->red & 0xff);
-                        *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);
-                        *(sp + 3) = (png_byte)(background->green & 0xff);
-                        *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);
-                        *(sp + 5) = (png_byte)(background->blue & 0xff);
-                     }
-                  }
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_GRAY_ALPHA:
-         {
-            if (row_info->bit_depth == 8)
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_to_1 != NULL && gamma_from_1 != NULL &&
-                   gamma_table != NULL)
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 2, dp++)
-                  {
-                     png_uint_16 a = *(sp + 1);
-
-                     if (a == 0xff)
-                     {
-                        *dp = gamma_table[*sp];
-                     }
-                     else if (a == 0)
-                     {
-                        /* background is already in screen gamma */
-                        *dp = (png_byte)background->gray;
-                     }
-                     else
-                     {
-                        png_byte v, w;
-
-                        v = gamma_to_1[*sp];
-                        png_composite(w, v, a, background_1->gray);
-                        *dp = gamma_from_1[w];
-                     }
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 2, dp++)
-                  {
-                     png_byte a = *(sp + 1);
-
-                     if (a == 0xff)
-                     {
-                        *dp = *sp;
-                     }
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                     else if (a == 0)
-                     {
-                        *dp = (png_byte)background->gray;
-                     }
-                     else
-                     {
-                        png_composite(*dp, *sp, a, background_1->gray);
-                     }
-#else
-                     *dp = (png_byte)background->gray;
-#endif
-                  }
-               }
-            }
-            else /* if (png_ptr->bit_depth == 16) */
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_16 != NULL && gamma_16_from_1 != NULL &&
-                   gamma_16_to_1 != NULL)
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 4, dp += 2)
-                  {
-                     png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
-
-                     if (a == (png_uint_16)0xffff)
-                     {
-                        png_uint_16 v;
-
-                        v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
-                        *dp = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(v & 0xff);
-                     }
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                     else if (a == 0)
-#else
-                     else
-#endif
-                     {
-                        /* background is already in screen gamma */
-                        *dp = (png_byte)((background->gray >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(background->gray & 0xff);
-                     }
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                     else
-                     {
-                        png_uint_16 g, v, w;
-
-                        g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
-                        png_composite_16(v, g, a, background_1->gray);
-                        w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8];
-                        *dp = (png_byte)((w >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(w & 0xff);
-                     }
-#endif
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 4, dp += 2)
-                  {
-                     png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
-                     if (a == (png_uint_16)0xffff)
-                     {
-                        png_memcpy(dp, sp, 2);
-                     }
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                     else if (a == 0)
-#else
-                     else
-#endif
-                     {
-                        *dp = (png_byte)((background->gray >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(background->gray & 0xff);
-                     }
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-                     else
-                     {
-                        png_uint_16 g, v;
-
-                        g = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        png_composite_16(v, g, a, background_1->gray);
-                        *dp = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(v & 0xff);
-                     }
-#endif
-                  }
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_RGB_ALPHA:
-         {
-            if (row_info->bit_depth == 8)
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_to_1 != NULL && gamma_from_1 != NULL &&
-                   gamma_table != NULL)
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 4, dp += 3)
-                  {
-                     png_byte a = *(sp + 3);
-
-                     if (a == 0xff)
-                     {
-                        *dp = gamma_table[*sp];
-                        *(dp + 1) = gamma_table[*(sp + 1)];
-                        *(dp + 2) = gamma_table[*(sp + 2)];
-                     }
-                     else if (a == 0)
-                     {
-                        /* background is already in screen gamma */
-                        *dp = (png_byte)background->red;
-                        *(dp + 1) = (png_byte)background->green;
-                        *(dp + 2) = (png_byte)background->blue;
-                     }
-                     else
-                     {
-                        png_byte v, w;
-
-                        v = gamma_to_1[*sp];
-                        png_composite(w, v, a, background_1->red);
-                        *dp = gamma_from_1[w];
-                        v = gamma_to_1[*(sp + 1)];
-                        png_composite(w, v, a, background_1->green);
-                        *(dp + 1) = gamma_from_1[w];
-                        v = gamma_to_1[*(sp + 2)];
-                        png_composite(w, v, a, background_1->blue);
-                        *(dp + 2) = gamma_from_1[w];
-                     }
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 4, dp += 3)
-                  {
-                     png_byte a = *(sp + 3);
-
-                     if (a == 0xff)
-                     {
-                        *dp = *sp;
-                        *(dp + 1) = *(sp + 1);
-                        *(dp + 2) = *(sp + 2);
-                     }
-                     else if (a == 0)
-                     {
-                        *dp = (png_byte)background->red;
-                        *(dp + 1) = (png_byte)background->green;
-                        *(dp + 2) = (png_byte)background->blue;
-                     }
-                     else
-                     {
-                        png_composite(*dp, *sp, a, background->red);
-                        png_composite(*(dp + 1), *(sp + 1), a,
-                           background->green);
-                        png_composite(*(dp + 2), *(sp + 2), a,
-                           background->blue);
-                     }
-                  }
-               }
-            }
-            else /* if (row_info->bit_depth == 16) */
-            {
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-               if (gamma_16 != NULL && gamma_16_from_1 != NULL &&
-                   gamma_16_to_1 != NULL)
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 8, dp += 6)
-                  {
-                     png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
-                         << 8) + (png_uint_16)(*(sp + 7)));
-                     if (a == (png_uint_16)0xffff)
-                     {
-                        png_uint_16 v;
-
-                        v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
-                        *dp = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(v & 0xff);
-                        v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
-                        *(dp + 2) = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 3) = (png_byte)(v & 0xff);
-                        v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
-                        *(dp + 4) = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 5) = (png_byte)(v & 0xff);
-                     }
-                     else if (a == 0)
-                     {
-                        /* background is already in screen gamma */
-                        *dp = (png_byte)((background->red >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(background->red & 0xff);
-                        *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);
-                        *(dp + 3) = (png_byte)(background->green & 0xff);
-                        *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
-                        *(dp + 5) = (png_byte)(background->blue & 0xff);
-                     }
-                     else
-                     {
-                        png_uint_16 v, w, x;
-
-                        v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
-                        png_composite_16(w, v, a, background_1->red);
-                        x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
-                        *dp = (png_byte)((x >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(x & 0xff);
-                        v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
-                        png_composite_16(w, v, a, background_1->green);
-                        x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
-                        *(dp + 2) = (png_byte)((x >> 8) & 0xff);
-                        *(dp + 3) = (png_byte)(x & 0xff);
-                        v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
-                        png_composite_16(w, v, a, background_1->blue);
-                        x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8];
-                        *(dp + 4) = (png_byte)((x >> 8) & 0xff);
-                        *(dp + 5) = (png_byte)(x & 0xff);
-                     }
-                  }
-               }
-               else
-#endif
-               {
-                  sp = row;
-                  dp = row;
-                  for (i = 0; i < row_width; i++, sp += 8, dp += 6)
-                  {
-                     png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
-                        << 8) + (png_uint_16)(*(sp + 7)));
-                     if (a == (png_uint_16)0xffff)
-                     {
-                        png_memcpy(dp, sp, 6);
-                     }
-                     else if (a == 0)
-                     {
-                        *dp = (png_byte)((background->red >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(background->red & 0xff);
-                        *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);
-                        *(dp + 3) = (png_byte)(background->green & 0xff);
-                        *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
-                        *(dp + 5) = (png_byte)(background->blue & 0xff);
-                     }
-                     else
-                     {
-                        png_uint_16 v;
-
-                        png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
-                            + *(sp + 3));
-                        png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
-                            + *(sp + 5));
-
-                        png_composite_16(v, r, a, background->red);
-                        *dp = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 1) = (png_byte)(v & 0xff);
-                        png_composite_16(v, g, a, background->green);
-                        *(dp + 2) = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 3) = (png_byte)(v & 0xff);
-                        png_composite_16(v, b, a, background->blue);
-                        *(dp + 4) = (png_byte)((v >> 8) & 0xff);
-                        *(dp + 5) = (png_byte)(v & 0xff);
-                     }
-                  }
-               }
-            }
-            break;
-         }
-      }
-
-      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
-      {
-         row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
-         row_info->channels--;
-         row_info->pixel_depth = (png_byte)(row_info->channels *
-            row_info->bit_depth);
-         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-/* Gamma correct the image, avoiding the alpha channel.  Make sure
- * you do this after you deal with the transparency issue on grayscale
- * or RGB images. If your bit depth is 8, use gamma_table, if it
- * is 16, use gamma_16_table and gamma_shift.  Build these with
- * build_gamma_table().
- */
-void /* PRIVATE */
-png_do_gamma(png_row_infop row_info, png_bytep row,
-   png_bytep gamma_table, png_uint_16pp gamma_16_table,
-   int gamma_shift)
-{
-   png_bytep sp;
-   png_uint_32 i;
-   png_uint_32 row_width=row_info->width;
-
-   png_debug(1, "in png_do_gamma\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       ((row_info->bit_depth <= 8 && gamma_table != NULL) ||
-        (row_info->bit_depth == 16 && gamma_16_table != NULL)))
-   {
-      switch (row_info->color_type)
-      {
-         case PNG_COLOR_TYPE_RGB:
-         {
-            if (row_info->bit_depth == 8)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  *sp = gamma_table[*sp];
-                  sp++;
-                  *sp = gamma_table[*sp];
-                  sp++;
-                  *sp = gamma_table[*sp];
-                  sp++;
-               }
-            }
-            else /* if (row_info->bit_depth == 16) */
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 v;
-
-                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_RGB_ALPHA:
-         {
-            if (row_info->bit_depth == 8)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  *sp = gamma_table[*sp];
-                  sp++;
-                  *sp = gamma_table[*sp];
-                  sp++;
-                  *sp = gamma_table[*sp];
-                  sp++;
-                  sp++;
-               }
-            }
-            else /* if (row_info->bit_depth == 16) */
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-                  v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 4;
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_GRAY_ALPHA:
-         {
-            if (row_info->bit_depth == 8)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  *sp = gamma_table[*sp];
-                  sp += 2;
-               }
-            }
-            else /* if (row_info->bit_depth == 16) */
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 4;
-               }
-            }
-            break;
-         }
-         case PNG_COLOR_TYPE_GRAY:
-         {
-            if (row_info->bit_depth == 2)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i += 4)
-               {
-                  int a = *sp & 0xc0;
-                  int b = *sp & 0x30;
-                  int c = *sp & 0x0c;
-                  int d = *sp & 0x03;
-
-                  *sp = (png_byte)(
-                        ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)])   ) & 0xc0)|
-                        ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
-                        ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
-                        ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
-                  sp++;
-               }
-            }
-            if (row_info->bit_depth == 4)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i += 2)
-               {
-                  int msb = *sp & 0xf0;
-                  int lsb = *sp & 0x0f;
-
-                  *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0)
-                          | (((int)gamma_table[(lsb << 4) | lsb]) >> 4));
-                  sp++;
-               }
-            }
-            else if (row_info->bit_depth == 8)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  *sp = gamma_table[*sp];
-                  sp++;
-               }
-            }
-            else if (row_info->bit_depth == 16)
-            {
-               sp = row;
-               for (i = 0; i < row_width; i++)
-               {
-                  png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
-                  *sp = (png_byte)((v >> 8) & 0xff);
-                  *(sp + 1) = (png_byte)(v & 0xff);
-                  sp += 2;
-               }
-            }
-            break;
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-/* Expands a palette row to an RGB or RGBA row depending
- * upon whether you supply trans and num_trans.
- */
-void /* PRIVATE */
-png_do_expand_palette(png_row_infop row_info, png_bytep row,
-   png_colorp palette, png_bytep trans, int num_trans)
-{
-   int shift, value;
-   png_bytep sp, dp;
-   png_uint_32 i;
-   png_uint_32 row_width=row_info->width;
-
-   png_debug(1, "in png_do_expand_palette\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       row_info->color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      if (row_info->bit_depth < 8)
-      {
-         switch (row_info->bit_depth)
-         {
-            case 1:
-            {
-               sp = row + (png_size_t)((row_width - 1) >> 3);
-               dp = row + (png_size_t)row_width - 1;
-               shift = 7 - (int)((row_width + 7) & 0x07);
-               for (i = 0; i < row_width; i++)
-               {
-                  if ((*sp >> shift) & 0x01)
-                     *dp = 1;
-                  else
-                     *dp = 0;
-                  if (shift == 7)
-                  {
-                     shift = 0;
-                     sp--;
-                  }
-                  else
-                     shift++;
-
-                  dp--;
-               }
-               break;
-            }
-            case 2:
-            {
-               sp = row + (png_size_t)((row_width - 1) >> 2);
-               dp = row + (png_size_t)row_width - 1;
-               shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
-               for (i = 0; i < row_width; i++)
-               {
-                  value = (*sp >> shift) & 0x03;
-                  *dp = (png_byte)value;
-                  if (shift == 6)
-                  {
-                     shift = 0;
-                     sp--;
-                  }
-                  else
-                     shift += 2;
-
-                  dp--;
-               }
-               break;
-            }
-            case 4:
-            {
-               sp = row + (png_size_t)((row_width - 1) >> 1);
-               dp = row + (png_size_t)row_width - 1;
-               shift = (int)((row_width & 0x01) << 2);
-               for (i = 0; i < row_width; i++)
-               {
-                  value = (*sp >> shift) & 0x0f;
-                  *dp = (png_byte)value;
-                  if (shift == 4)
-                  {
-                     shift = 0;
-                     sp--;
-                  }
-                  else
-                     shift += 4;
-
-                  dp--;
-               }
-               break;
-            }
-         }
-         row_info->bit_depth = 8;
-         row_info->pixel_depth = 8;
-         row_info->rowbytes = row_width;
-      }
-      switch (row_info->bit_depth)
-      {
-         case 8:
-         {
-            if (trans != NULL)
-            {
-               sp = row + (png_size_t)row_width - 1;
-               dp = row + (png_size_t)(row_width << 2) - 1;
-
-               for (i = 0; i < row_width; i++)
-               {
-                  if ((int)(*sp) >= num_trans)
-                     *dp-- = 0xff;
-                  else
-                     *dp-- = trans[*sp];
-                  *dp-- = palette[*sp].blue;
-                  *dp-- = palette[*sp].green;
-                  *dp-- = palette[*sp].red;
-                  sp--;
-               }
-               row_info->bit_depth = 8;
-               row_info->pixel_depth = 32;
-               row_info->rowbytes = row_width * 4;
-               row_info->color_type = 6;
-               row_info->channels = 4;
-            }
-            else
-            {
-               sp = row + (png_size_t)row_width - 1;
-               dp = row + (png_size_t)(row_width * 3) - 1;
-
-               for (i = 0; i < row_width; i++)
-               {
-                  *dp-- = palette[*sp].blue;
-                  *dp-- = palette[*sp].green;
-                  *dp-- = palette[*sp].red;
-                  sp--;
-               }
-               row_info->bit_depth = 8;
-               row_info->pixel_depth = 24;
-               row_info->rowbytes = row_width * 3;
-               row_info->color_type = 2;
-               row_info->channels = 3;
-            }
-            break;
-         }
-      }
-   }
-}
-
-/* If the bit depth < 8, it is expanded to 8.  Also, if the
- * transparency value is supplied, an alpha channel is built.
- */
-void /* PRIVATE */
-png_do_expand(png_row_infop row_info, png_bytep row,
-   png_color_16p trans_value)
-{
-   int shift, value;
-   png_bytep sp, dp;
-   png_uint_32 i;
-   png_uint_32 row_width=row_info->width;
-
-   png_debug(1, "in png_do_expand\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
-      {
-         png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0);
-
-         if (row_info->bit_depth < 8)
-         {
-            switch (row_info->bit_depth)
-            {
-               case 1:
-               {
-                  gray = (png_uint_16)(gray*0xff);
-                  sp = row + (png_size_t)((row_width - 1) >> 3);
-                  dp = row + (png_size_t)row_width - 1;
-                  shift = 7 - (int)((row_width + 7) & 0x07);
-                  for (i = 0; i < row_width; i++)
-                  {
-                     if ((*sp >> shift) & 0x01)
-                        *dp = 0xff;
-                     else
-                        *dp = 0;
-                     if (shift == 7)
-                     {
-                        shift = 0;
-                        sp--;
-                     }
-                     else
-                        shift++;
-
-                     dp--;
-                  }
-                  break;
-               }
-               case 2:
-               {
-                  gray = (png_uint_16)(gray*0x55);
-                  sp = row + (png_size_t)((row_width - 1) >> 2);
-                  dp = row + (png_size_t)row_width - 1;
-                  shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
-                  for (i = 0; i < row_width; i++)
-                  {
-                     value = (*sp >> shift) & 0x03;
-                     *dp = (png_byte)(value | (value << 2) | (value << 4) |
-                        (value << 6));
-                     if (shift == 6)
-                     {
-                        shift = 0;
-                        sp--;
-                     }
-                     else
-                        shift += 2;
-
-                     dp--;
-                  }
-                  break;
-               }
-               case 4:
-               {
-                  gray = (png_uint_16)(gray*0x11);
-                  sp = row + (png_size_t)((row_width - 1) >> 1);
-                  dp = row + (png_size_t)row_width - 1;
-                  shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);
-                  for (i = 0; i < row_width; i++)
-                  {
-                     value = (*sp >> shift) & 0x0f;
-                     *dp = (png_byte)(value | (value << 4));
-                     if (shift == 4)
-                     {
-                        shift = 0;
-                        sp--;
-                     }
-                     else
-                        shift = 4;
-
-                     dp--;
-                  }
-                  break;
-               }
-            }
-            row_info->bit_depth = 8;
-            row_info->pixel_depth = 8;
-            row_info->rowbytes = row_width;
-         }
-
-         if (trans_value != NULL)
-         {
-            if (row_info->bit_depth == 8)
-            {
-               sp = row + (png_size_t)row_width - 1;
-               dp = row + (png_size_t)(row_width << 1) - 1;
-               for (i = 0; i < row_width; i++)
-               {
-                  if (*sp == gray)
-                     *dp-- = 0;
-                  else
-                     *dp-- = 0xff;
-                  *dp-- = *sp--;
-               }
-            }
-            else if (row_info->bit_depth == 16)
-            {
-               sp = row + row_info->rowbytes - 1;
-               dp = row + (row_info->rowbytes << 1) - 1;
-               for (i = 0; i < row_width; i++)
-               {
-                  if (((png_uint_16)*(sp) |
-                     ((png_uint_16)*(sp - 1) << 8)) == gray)
-                  {
-                     *dp-- = 0;
-                     *dp-- = 0;
-                  }
-                  else
-                  {
-                     *dp-- = 0xff;
-                     *dp-- = 0xff;
-                  }
-                  *dp-- = *sp--;
-                  *dp-- = *sp--;
-               }
-            }
-            row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
-            row_info->channels = 2;
-            row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
-            row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
-               row_width);
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value)
-      {
-         if (row_info->bit_depth == 8)
-         {
-            sp = row + (png_size_t)row_info->rowbytes - 1;
-            dp = row + (png_size_t)(row_width << 2) - 1;
-            for (i = 0; i < row_width; i++)
-            {
-               if (*(sp - 2) == trans_value->red &&
-                  *(sp - 1) == trans_value->green &&
-                  *(sp - 0) == trans_value->blue)
-                  *dp-- = 0;
-               else
-                  *dp-- = 0xff;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-            }
-         }
-         else if (row_info->bit_depth == 16)
-         {
-            sp = row + row_info->rowbytes - 1;
-            dp = row + (png_size_t)(row_width << 3) - 1;
-            for (i = 0; i < row_width; i++)
-            {
-               if ((((png_uint_16)*(sp - 4) |
-                  ((png_uint_16)*(sp - 5) << 8)) == trans_value->red) &&
-                  (((png_uint_16)*(sp - 2) |
-                  ((png_uint_16)*(sp - 3) << 8)) == trans_value->green) &&
-                  (((png_uint_16)*(sp - 0) |
-                  ((png_uint_16)*(sp - 1) << 8)) == trans_value->blue))
-               {
-                  *dp-- = 0;
-                  *dp-- = 0;
-               }
-               else
-               {
-                  *dp-- = 0xff;
-                  *dp-- = 0xff;
-               }
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-               *dp-- = *sp--;
-            }
-         }
-         row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-         row_info->channels = 4;
-         row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
-         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-void /* PRIVATE */
-png_do_dither(png_row_infop row_info, png_bytep row,
-    png_bytep palette_lookup, png_bytep dither_lookup)
-{
-   png_bytep sp, dp;
-   png_uint_32 i;
-   png_uint_32 row_width=row_info->width;
-
-   png_debug(1, "in png_do_dither\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
-         palette_lookup && row_info->bit_depth == 8)
-      {
-         int r, g, b, p;
-         sp = row;
-         dp = row;
-         for (i = 0; i < row_width; i++)
-         {
-            r = *sp++;
-            g = *sp++;
-            b = *sp++;
-
-            /* this looks real messy, but the compiler will reduce
-               it down to a reasonable formula.  For example, with
-               5 bits per color, we get:
-               p = (((r >> 3) & 0x1f) << 10) |
-                  (((g >> 3) & 0x1f) << 5) |
-                  ((b >> 3) & 0x1f);
-               */
-            p = (((r >> (8 - PNG_DITHER_RED_BITS)) &
-               ((1 << PNG_DITHER_RED_BITS) - 1)) <<
-               (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |
-               (((g >> (8 - PNG_DITHER_GREEN_BITS)) &
-               ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<
-               (PNG_DITHER_BLUE_BITS)) |
-               ((b >> (8 - PNG_DITHER_BLUE_BITS)) &
-               ((1 << PNG_DITHER_BLUE_BITS) - 1));
-
-            *dp++ = palette_lookup[p];
-         }
-         row_info->color_type = PNG_COLOR_TYPE_PALETTE;
-         row_info->channels = 1;
-         row_info->pixel_depth = row_info->bit_depth;
-         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
-         palette_lookup != NULL && row_info->bit_depth == 8)
-      {
-         int r, g, b, p;
-         sp = row;
-         dp = row;
-         for (i = 0; i < row_width; i++)
-         {
-            r = *sp++;
-            g = *sp++;
-            b = *sp++;
-            sp++;
-
-            p = (((r >> (8 - PNG_DITHER_RED_BITS)) &
-               ((1 << PNG_DITHER_RED_BITS) - 1)) <<
-               (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |
-               (((g >> (8 - PNG_DITHER_GREEN_BITS)) &
-               ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<
-               (PNG_DITHER_BLUE_BITS)) |
-               ((b >> (8 - PNG_DITHER_BLUE_BITS)) &
-               ((1 << PNG_DITHER_BLUE_BITS) - 1));
-
-            *dp++ = palette_lookup[p];
-         }
-         row_info->color_type = PNG_COLOR_TYPE_PALETTE;
-         row_info->channels = 1;
-         row_info->pixel_depth = row_info->bit_depth;
-         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,row_width);
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
-         dither_lookup && row_info->bit_depth == 8)
-      {
-         sp = row;
-         for (i = 0; i < row_width; i++, sp++)
-         {
-            *sp = dither_lookup[*sp];
-         }
-      }
-   }
-}
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-static int png_gamma_shift[] =
-   {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0};
-
-/* We build the 8- or 16-bit gamma tables here.  Note that for 16-bit
- * tables, we don't make a full table if we are reducing to 8-bit in
- * the future.  Note also how the gamma_16 tables are segmented so that
- * we don't need to allocate > 64K chunks for a full 16-bit table.
- */
-void /* PRIVATE */
-png_build_gamma_table(png_structp png_ptr)
-{
-  png_debug(1, "in png_build_gamma_table\n");
-  if(png_ptr->gamma != 0.0)
-  {
-   if (png_ptr->bit_depth <= 8)
-   {
-      int i;
-      double g;
-
-      if (png_ptr->screen_gamma > .000001)
-         g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
-      else
-         g = 1.0;
-
-      png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,
-         (png_uint_32)256);
-
-      for (i = 0; i < 256; i++)
-      {
-         png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,
-            g) * 255.0 + .5);
-      }
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
-    defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-      if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
-      {
-
-         g = 1.0 / (png_ptr->gamma);
-
-         png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)256);
-
-         for (i = 0; i < 256; i++)
-         {
-            png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,
-               g) * 255.0 + .5);
-         }
-
-
-         png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)256);
-
-         if(png_ptr->screen_gamma > 0.000001)
-            g = 1.0 / png_ptr->screen_gamma;
-         else
-            g = png_ptr->gamma;   /* probably doing rgb_to_gray */
-
-         for (i = 0; i < 256; i++)
-         {
-            png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,
-               g) * 255.0 + .5);
-
-         }
-      }
-#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
-   }
-   else
-   {
-      double g;
-      int i, j, shift, num;
-      int sig_bit;
-      png_uint_32 ig;
-
-      if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
-      {
-         sig_bit = (int)png_ptr->sig_bit.red;
-         if ((int)png_ptr->sig_bit.green > sig_bit)
-            sig_bit = png_ptr->sig_bit.green;
-         if ((int)png_ptr->sig_bit.blue > sig_bit)
-            sig_bit = png_ptr->sig_bit.blue;
-      }
-      else
-      {
-         sig_bit = (int)png_ptr->sig_bit.gray;
-      }
-
-      if (sig_bit > 0)
-         shift = 16 - sig_bit;
-      else
-         shift = 0;
-
-      if (png_ptr->transformations & PNG_16_TO_8)
-      {
-         if (shift < (16 - PNG_MAX_GAMMA_8))
-            shift = (16 - PNG_MAX_GAMMA_8);
-      }
-
-      if (shift > 8)
-         shift = 8;
-      if (shift < 0)
-         shift = 0;
-
-      png_ptr->gamma_shift = (png_byte)shift;
-
-      num = (1 << (8 - shift));
-
-      if (png_ptr->screen_gamma > .000001)
-         g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
-      else
-         g = 1.0;
-
-      png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
-         (png_uint_32)(num * png_sizeof (png_uint_16p)));
-
-      if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
-      {
-         double fin, fout;
-         png_uint_32 last, max;
-
-         for (i = 0; i < num; i++)
-         {
-            png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
-               (png_uint_32)(256 * png_sizeof (png_uint_16)));
-         }
-
-         g = 1.0 / g;
-         last = 0;
-         for (i = 0; i < 256; i++)
-         {
-            fout = ((double)i + 0.5) / 256.0;
-            fin = pow(fout, g);
-            max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));
-            while (last <= max)
-            {
-               png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
-                  [(int)(last >> (8 - shift))] = (png_uint_16)(
-                  (png_uint_16)i | ((png_uint_16)i << 8));
-               last++;
-            }
-         }
-         while (last < ((png_uint_32)num << 8))
-         {
-            png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
-               [(int)(last >> (8 - shift))] = (png_uint_16)65535L;
-            last++;
-         }
-      }
-      else
-      {
-         for (i = 0; i < num; i++)
-         {
-            png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
-               (png_uint_32)(256 * png_sizeof (png_uint_16)));
-
-            ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);
-            for (j = 0; j < 256; j++)
-            {
-               png_ptr->gamma_16_table[i][j] =
-                  (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
-                     65535.0, g) * 65535.0 + .5);
-            }
-         }
-      }
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
-    defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-      if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
-      {
-
-         g = 1.0 / (png_ptr->gamma);
-
-         png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
-            (png_uint_32)(num * png_sizeof (png_uint_16p )));
-
-         for (i = 0; i < num; i++)
-         {
-            png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
-               (png_uint_32)(256 * png_sizeof (png_uint_16)));
-
-            ig = (((png_uint_32)i *
-               (png_uint_32)png_gamma_shift[shift]) >> 4);
-            for (j = 0; j < 256; j++)
-            {
-               png_ptr->gamma_16_to_1[i][j] =
-                  (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
-                     65535.0, g) * 65535.0 + .5);
-            }
-         }
-
-         if(png_ptr->screen_gamma > 0.000001)
-            g = 1.0 / png_ptr->screen_gamma;
-         else
-            g = png_ptr->gamma;   /* probably doing rgb_to_gray */
-
-         png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
-            (png_uint_32)(num * png_sizeof (png_uint_16p)));
-
-         for (i = 0; i < num; i++)
-         {
-            png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
-               (png_uint_32)(256 * png_sizeof (png_uint_16)));
-
-            ig = (((png_uint_32)i *
-               (png_uint_32)png_gamma_shift[shift]) >> 4);
-            for (j = 0; j < 256; j++)
-            {
-               png_ptr->gamma_16_from_1[i][j] =
-                  (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
-                     65535.0, g) * 65535.0 + .5);
-            }
-         }
-      }
-#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
-   }
- }
-}
-#endif
-/* To do: install integer version of png_build_gamma_table here */
-#endif
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-/* undoes intrapixel differencing  */
-void /* PRIVATE */
-png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_read_intrapixel\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       (row_info->color_type & PNG_COLOR_MASK_COLOR))
-   {
-      int bytes_per_pixel;
-      png_uint_32 row_width = row_info->width;
-      if (row_info->bit_depth == 8)
-      {
-         png_bytep rp;
-         png_uint_32 i;
-
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-            bytes_per_pixel = 3;
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-            bytes_per_pixel = 4;
-         else
-            return;
-
-         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
-         {
-            *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff);
-            *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff);
-         }
-      }
-      else if (row_info->bit_depth == 16)
-      {
-         png_bytep rp;
-         png_uint_32 i;
-
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-            bytes_per_pixel = 6;
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-            bytes_per_pixel = 8;
-         else
-            return;
-
-         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
-         {
-            png_uint_32 s0   = (*(rp  ) << 8) | *(rp+1);
-            png_uint_32 s1   = (*(rp+2) << 8) | *(rp+3);
-            png_uint_32 s2   = (*(rp+4) << 8) | *(rp+5);
-            png_uint_32 red  = (png_uint_32)((s0+s1+65536L) & 0xffffL);
-            png_uint_32 blue = (png_uint_32)((s2+s1+65536L) & 0xffffL);
-            *(rp  ) = (png_byte)((red >> 8) & 0xff);
-            *(rp+1) = (png_byte)(red & 0xff);
-            *(rp+4) = (png_byte)((blue >> 8) & 0xff);
-            *(rp+5) = (png_byte)(blue & 0xff);
-         }
-      }
-   }
-}
-#endif /* PNG_MNG_FEATURES_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngrutil.c b/tkimg1.3/libpng/pngrutil.c
deleted file mode 100644
index 236dea3..0000000
--- a/tkimg1.3/libpng/pngrutil.c
+++ /dev/null
@@ -1,3124 +0,0 @@
-/* pngrutil.c - utilities to read a PNG file
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file contains routines that are only called from within
- * libpng itself during the course of reading an image.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#if defined(_WIN32_WCE)
-/* strtod() function is not supported on WindowsCE */
-#  ifdef PNG_FLOATING_POINT_SUPPORTED
-__inline double strtod(const char *nptr, char **endptr)
-{
-   double result = 0;
-   int len;
-   wchar_t *str, *end;
-
-   len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0);
-   str = (wchar_t *)malloc(len * sizeof(wchar_t));
-   if ( NULL != str )
-   {
-      MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len);
-      result = wcstod(str, &end);
-      len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL);
-      *endptr = (char *)nptr + (png_strlen(nptr) - len + 1);
-      free(str);
-   }
-   return result;
-}
-#  endif
-#endif
-
-png_uint_32 /* PRIVATE */
-png_get_uint_31(png_structp png_ptr, png_bytep buf)
-{
-   png_uint_32 i = png_get_uint_32(buf);
-   if (i > PNG_UINT_31_MAX)
-     png_error(png_ptr, "PNG unsigned integer out of range.\n");
-   return (i);
-}
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
-/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
-png_uint_32 /* PRIVATE */
-png_get_uint_32(png_bytep buf)
-{
-   png_uint_32 i = ((png_uint_32)(*buf) << 24) +
-      ((png_uint_32)(*(buf + 1)) << 16) +
-      ((png_uint_32)(*(buf + 2)) << 8) +
-      (png_uint_32)(*(buf + 3));
-
-   return (i);
-}
-
-#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_oFFs_SUPPORTED)
-/* Grab a signed 32-bit integer from a buffer in big-endian format.  The
- * data is stored in the PNG file in two's complement format, and it is
- * assumed that the machine format for signed integers is the same. */
-png_int_32 /* PRIVATE */
-png_get_int_32(png_bytep buf)
-{
-   png_int_32 i = ((png_int_32)(*buf) << 24) +
-      ((png_int_32)(*(buf + 1)) << 16) +
-      ((png_int_32)(*(buf + 2)) << 8) +
-      (png_int_32)(*(buf + 3));
-
-   return (i);
-}
-#endif /* PNG_READ_pCAL_SUPPORTED */
-
-/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
-png_uint_16 /* PRIVATE */
-png_get_uint_16(png_bytep buf)
-{
-   png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
-      (png_uint_16)(*(buf + 1)));
-
-   return (i);
-}
-#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */
-
-/* Read data, and (optionally) run it through the CRC. */
-void /* PRIVATE */
-png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length)
-{
-   png_read_data(png_ptr, buf, length);
-   png_calculate_crc(png_ptr, buf, length);
-}
-
-/* Optionally skip data and then check the CRC.  Depending on whether we
-   are reading a ancillary or critical chunk, and how the program has set
-   things up, we may calculate the CRC on the data and print a message.
-   Returns '1' if there was a CRC error, '0' otherwise. */
-int /* PRIVATE */
-png_crc_finish(png_structp png_ptr, png_uint_32 skip)
-{
-   png_size_t i;
-   png_size_t istop = png_ptr->zbuf_size;
-
-   for (i = (png_size_t)skip; i > istop; i -= istop)
-   {
-      png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
-   }
-   if (i)
-   {
-      png_crc_read(png_ptr, png_ptr->zbuf, i);
-   }
-
-   if (png_crc_error(png_ptr))
-   {
-      if (((png_ptr->chunk_name[0] & 0x20) &&                /* Ancillary */
-           !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) ||
-          (!(png_ptr->chunk_name[0] & 0x20) &&             /* Critical  */
-          (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)))
-      {
-         png_chunk_warning(png_ptr, "CRC error");
-      }
-      else
-      {
-         png_chunk_error(png_ptr, "CRC error");
-      }
-      return (1);
-   }
-
-   return (0);
-}
-
-/* Compare the CRC stored in the PNG file with that calculated by libpng from
-   the data it has read thus far. */
-int /* PRIVATE */
-png_crc_error(png_structp png_ptr)
-{
-   png_byte crc_bytes[4];
-   png_uint_32 crc;
-   int need_crc = 1;
-
-   if (png_ptr->chunk_name[0] & 0x20)                     /* ancillary */
-   {
-      if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==
-          (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
-         need_crc = 0;
-   }
-   else                                                    /* critical */
-   {
-      if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
-         need_crc = 0;
-   }
-
-   png_read_data(png_ptr, crc_bytes, 4);
-
-   if (need_crc)
-   {
-      crc = png_get_uint_32(crc_bytes);
-      return ((int)(crc != png_ptr->crc));
-   }
-   else
-      return (0);
-}
-
-#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \
-    defined(PNG_READ_iCCP_SUPPORTED)
-/*
- * Decompress trailing data in a chunk.  The assumption is that chunkdata
- * points at an allocated area holding the contents of a chunk with a
- * trailing compressed part.  What we get back is an allocated area
- * holding the original prefix part and an uncompressed version of the
- * trailing part (the malloc area passed in is freed).
- */
-png_charp /* PRIVATE */
-png_decompress_chunk(png_structp png_ptr, int comp_type,
-                              png_charp chunkdata, png_size_t chunklength,
-                              png_size_t prefix_size, png_size_t *newlength)
-{
-   static char msg[] = "Error decoding compressed text";
-   png_charp text;
-   png_size_t text_size;
-
-   if (comp_type == PNG_COMPRESSION_TYPE_BASE)
-   {
-      int ret = Z_OK;
-      png_ptr->zstream.next_in = (png_bytep)(chunkdata + prefix_size);
-      png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size);
-      png_ptr->zstream.next_out = png_ptr->zbuf;
-      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
-      text_size = 0;
-      text = NULL;
-
-      while (png_ptr->zstream.avail_in)
-      {
-         ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
-         if (ret != Z_OK && ret != Z_STREAM_END)
-         {
-            if (png_ptr->zstream.msg != NULL)
-               png_warning(png_ptr, png_ptr->zstream.msg);
-            else
-               png_warning(png_ptr, msg);
-            inflateReset(&png_ptr->zstream);
-            png_ptr->zstream.avail_in = 0;
-
-            if (text ==  NULL)
-            {
-               text_size = prefix_size + png_sizeof(msg) + 1;
-               text = (png_charp)png_malloc_warn(png_ptr, text_size);
-               if (text ==  NULL)
-                 {
-                    png_free(png_ptr,chunkdata);
-                    png_error(png_ptr,"Not enough memory to decompress chunk");
-                 }
-               png_memcpy(text, chunkdata, prefix_size);
-            }
-
-            text[text_size - 1] = 0x00;
-
-            /* Copy what we can of the error message into the text chunk */
-            text_size = (png_size_t)(chunklength - (text - chunkdata) - 1);
-            text_size = png_sizeof(msg) > text_size ? text_size :
-               png_sizeof(msg);
-            png_memcpy(text + prefix_size, msg, text_size + 1);
-            break;
-         }
-         if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END)
-         {
-            if (text == NULL)
-            {
-               text_size = prefix_size +
-                   png_ptr->zbuf_size - png_ptr->zstream.avail_out;
-               text = (png_charp)png_malloc_warn(png_ptr, text_size + 1);
-               if (text ==  NULL)
-                 {
-                    png_free(png_ptr,chunkdata);
-                    png_error(png_ptr,"Not enough memory to decompress chunk.");
-                 }
-               png_memcpy(text + prefix_size, png_ptr->zbuf,
-                    text_size - prefix_size);
-               png_memcpy(text, chunkdata, prefix_size);
-               *(text + text_size) = 0x00;
-            }
-            else
-            {
-               png_charp tmp;
-
-               tmp = text;
-               text = (png_charp)png_malloc_warn(png_ptr,
-                  (png_uint_32)(text_size +
-                  png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
-               if (text == NULL)
-               {
-                  png_free(png_ptr, tmp);
-                  png_free(png_ptr, chunkdata);
-                  png_error(png_ptr,"Not enough memory to decompress chunk..");
-               }
-               png_memcpy(text, tmp, text_size);
-               png_free(png_ptr, tmp);
-               png_memcpy(text + text_size, png_ptr->zbuf,
-                  (png_ptr->zbuf_size - png_ptr->zstream.avail_out));
-               text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
-               *(text + text_size) = 0x00;
-            }
-            if (ret == Z_STREAM_END)
-               break;
-            else
-            {
-               png_ptr->zstream.next_out = png_ptr->zbuf;
-               png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-            }
-         }
-      }
-      if (ret != Z_STREAM_END)
-      {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-         char umsg[50];
-
-         if (ret == Z_BUF_ERROR)
-            sprintf(umsg,"Buffer error in compressed datastream in %s chunk",
-                png_ptr->chunk_name);
-         else if (ret == Z_DATA_ERROR)
-            sprintf(umsg,"Data error in compressed datastream in %s chunk",
-                png_ptr->chunk_name);
-         else
-            sprintf(umsg,"Incomplete compressed datastream in %s chunk",
-                png_ptr->chunk_name);
-         png_warning(png_ptr, umsg);
-#else
-         png_warning(png_ptr,
-            "Incomplete compressed datastream in chunk other than IDAT");
-#endif
-         text_size=prefix_size;
-         if (text ==  NULL)
-         {
-            text = (png_charp)png_malloc_warn(png_ptr, text_size+1);
-            if (text == NULL)
-              {
-                png_free(png_ptr, chunkdata);
-                png_error(png_ptr,"Not enough memory for text.");
-              }
-            png_memcpy(text, chunkdata, prefix_size);
-         }
-         *(text + text_size) = 0x00;
-      }
-
-      inflateReset(&png_ptr->zstream);
-      png_ptr->zstream.avail_in = 0;
-
-      png_free(png_ptr, chunkdata);
-      chunkdata = text;
-      *newlength=text_size;
-   }
-   else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
-   {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-      char umsg[50];
-
-      sprintf(umsg, "Unknown zTXt compression type %d", comp_type);
-      png_warning(png_ptr, umsg);
-#else
-      png_warning(png_ptr, "Unknown zTXt compression type");
-#endif
-
-      *(chunkdata + prefix_size) = 0x00;
-      *newlength=prefix_size;
-   }
-
-   return chunkdata;
-}
-#endif
-
-/* read and check the IDHR chunk */
-void /* PRIVATE */
-png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte buf[13];
-   png_uint_32 width, height;
-   int bit_depth, color_type, compression_type, filter_type;
-   int interlace_type;
-
-   png_debug(1, "in png_handle_IHDR\n");
-
-   if (png_ptr->mode & PNG_HAVE_IHDR)
-      png_error(png_ptr, "Out of place IHDR");
-
-   /* check the length */
-   if (length != 13)
-      png_error(png_ptr, "Invalid IHDR chunk");
-
-   png_ptr->mode |= PNG_HAVE_IHDR;
-
-   png_crc_read(png_ptr, buf, 13);
-   png_crc_finish(png_ptr, 0);
-
-   width = png_get_uint_31(png_ptr, buf);
-   height = png_get_uint_31(png_ptr, buf + 4);
-   bit_depth = buf[8];
-   color_type = buf[9];
-   compression_type = buf[10];
-   filter_type = buf[11];
-   interlace_type = buf[12];
-
-   /* set internal variables */
-   png_ptr->width = width;
-   png_ptr->height = height;
-   png_ptr->bit_depth = (png_byte)bit_depth;
-   png_ptr->interlaced = (png_byte)interlace_type;
-   png_ptr->color_type = (png_byte)color_type;
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   png_ptr->filter_type = (png_byte)filter_type;
-#endif
-   png_ptr->compression_type = (png_byte)compression_type;
-
-   /* find number of channels */
-   switch (png_ptr->color_type)
-   {
-      case PNG_COLOR_TYPE_GRAY:
-      case PNG_COLOR_TYPE_PALETTE:
-         png_ptr->channels = 1;
-         break;
-      case PNG_COLOR_TYPE_RGB:
-         png_ptr->channels = 3;
-         break;
-      case PNG_COLOR_TYPE_GRAY_ALPHA:
-         png_ptr->channels = 2;
-         break;
-      case PNG_COLOR_TYPE_RGB_ALPHA:
-         png_ptr->channels = 4;
-         break;
-   }
-
-   /* set up other useful info */
-   png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth *
-   png_ptr->channels);
-   png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
-   png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth);
-   png_debug1(3,"channels = %d\n", png_ptr->channels);
-   png_debug1(3,"rowbytes = %lu\n", png_ptr->rowbytes);
-   png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,
-      color_type, interlace_type, compression_type, filter_type);
-}
-
-/* read and check the palette */
-void /* PRIVATE */
-png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_color palette[PNG_MAX_PALETTE_LENGTH];
-   int num, i;
-#ifndef PNG_NO_POINTER_INDEXING
-   png_colorp pal_ptr;
-#endif
-
-   png_debug(1, "in png_handle_PLTE\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before PLTE");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid PLTE after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-      png_error(png_ptr, "Duplicate PLTE chunk");
-
-   png_ptr->mode |= PNG_HAVE_PLTE;
-
-   if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))
-   {
-      png_warning(png_ptr,
-        "Ignoring PLTE chunk in grayscale PNG");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
-   if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
-   {
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-#endif
-
-   if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3)
-   {
-      if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
-      {
-         png_warning(png_ptr, "Invalid palette chunk");
-         png_crc_finish(png_ptr, length);
-         return;
-      }
-      else
-      {
-         png_error(png_ptr, "Invalid palette chunk");
-      }
-   }
-
-   num = (int)length / 3;
-
-#ifndef PNG_NO_POINTER_INDEXING
-   for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
-   {
-      png_byte buf[3];
-
-      png_crc_read(png_ptr, buf, 3);
-      pal_ptr->red = buf[0];
-      pal_ptr->green = buf[1];
-      pal_ptr->blue = buf[2];
-   }
-#else
-   for (i = 0; i < num; i++)
-   {
-      png_byte buf[3];
-
-      png_crc_read(png_ptr, buf, 3);
-      /* don't depend upon png_color being any order */
-      palette[i].red = buf[0];
-      palette[i].green = buf[1];
-      palette[i].blue = buf[2];
-   }
-#endif
-
-   /* If we actually NEED the PLTE chunk (ie for a paletted image), we do
-      whatever the normal CRC configuration tells us.  However, if we
-      have an RGB image, the PLTE can be considered ancillary, so
-      we will act as though it is. */
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-#endif
-   {
-      png_crc_finish(png_ptr, 0);
-   }
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
-   else if (png_crc_error(png_ptr))  /* Only if we have a CRC error */
-   {
-      /* If we don't want to use the data from an ancillary chunk,
-         we have two options: an error abort, or a warning and we
-         ignore the data in this chunk (which should be OK, since
-         it's considered ancillary for a RGB or RGBA image). */
-      if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE))
-      {
-         if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)
-         {
-            png_chunk_error(png_ptr, "CRC error");
-         }
-         else
-         {
-            png_chunk_warning(png_ptr, "CRC error");
-            return;
-         }
-      }
-      /* Otherwise, we (optionally) emit a warning and use the chunk. */
-      else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN))
-      {
-         png_chunk_warning(png_ptr, "CRC error");
-      }
-   }
-#endif
-
-   png_set_PLTE(png_ptr, info_ptr, palette, num);
-
-#if defined(PNG_READ_tRNS_SUPPORTED)
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
-      {
-         if (png_ptr->num_trans > (png_uint_16)num)
-         {
-            png_warning(png_ptr, "Truncating incorrect tRNS chunk length");
-            png_ptr->num_trans = (png_uint_16)num;
-         }
-         if (info_ptr->num_trans > (png_uint_16)num)
-         {
-            png_warning(png_ptr, "Truncating incorrect info tRNS chunk length");
-            info_ptr->num_trans = (png_uint_16)num;
-         }
-      }
-   }
-#endif
-
-}
-
-void /* PRIVATE */
-png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_debug(1, "in png_handle_IEND\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT))
-   {
-      png_error(png_ptr, "No image in file");
-   }
-
-   png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND);
-
-   if (length != 0)
-   {
-      png_warning(png_ptr, "Incorrect IEND chunk length");
-   }
-   png_crc_finish(png_ptr, length);
-
-   if (&info_ptr == NULL) /* quiet compiler warnings about unused info_ptr */
-      return;
-}
-
-#if defined(PNG_READ_gAMA_SUPPORTED)
-void /* PRIVATE */
-png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_fixed_point igamma;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float file_gamma;
-#endif
-   png_byte buf[4];
-
-   png_debug(1, "in png_handle_gAMA\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before gAMA");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid gAMA after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-      /* Should be an error, but we can cope with it */
-      png_warning(png_ptr, "Out of place gAMA chunk");
-
-   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      && !(info_ptr->valid & PNG_INFO_sRGB)
-#endif
-      )
-   {
-      png_warning(png_ptr, "Duplicate gAMA chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (length != 4)
-   {
-      png_warning(png_ptr, "Incorrect gAMA chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 4);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   igamma = (png_fixed_point)png_get_uint_32(buf);
-   /* check for zero gamma */
-   if (igamma == 0)
-      {
-         png_warning(png_ptr,
-           "Ignoring gAMA chunk with gamma=0");
-         return;
-      }
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sRGB)
-      if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
-      {
-         png_warning(png_ptr,
-           "Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
-         fprintf(stderr, "gamma = (%d/100000)\n", (int)igamma);
-#endif
-         return;
-      }
-#endif /* PNG_READ_sRGB_SUPPORTED */
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   file_gamma = (float)igamma / (float)100000.0;
-#  ifdef PNG_READ_GAMMA_SUPPORTED
-     png_ptr->gamma = file_gamma;
-#  endif
-     png_set_gAMA(png_ptr, info_ptr, file_gamma);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_set_gAMA_fixed(png_ptr, info_ptr, igamma);
-#endif
-}
-#endif
-
-#if defined(PNG_READ_sBIT_SUPPORTED)
-void /* PRIVATE */
-png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_size_t truelen;
-   png_byte buf[4];
-
-   png_debug(1, "in png_handle_sBIT\n");
-
-   buf[0] = buf[1] = buf[2] = buf[3] = 0;
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before sBIT");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid sBIT after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-   {
-      /* Should be an error, but we can cope with it */
-      png_warning(png_ptr, "Out of place sBIT chunk");
-   }
-   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT))
-   {
-      png_warning(png_ptr, "Duplicate sBIT chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      truelen = 3;
-   else
-      truelen = (png_size_t)png_ptr->channels;
-
-   if (length != truelen || length > 4)
-   {
-      png_warning(png_ptr, "Incorrect sBIT chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, truelen);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
-   {
-      png_ptr->sig_bit.red = buf[0];
-      png_ptr->sig_bit.green = buf[1];
-      png_ptr->sig_bit.blue = buf[2];
-      png_ptr->sig_bit.alpha = buf[3];
-   }
-   else
-   {
-      png_ptr->sig_bit.gray = buf[0];
-      png_ptr->sig_bit.red = buf[0];
-      png_ptr->sig_bit.green = buf[0];
-      png_ptr->sig_bit.blue = buf[0];
-      png_ptr->sig_bit.alpha = buf[1];
-   }
-   png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit));
-}
-#endif
-
-#if defined(PNG_READ_cHRM_SUPPORTED)
-void /* PRIVATE */
-png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte buf[4];
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
-#endif
-   png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
-      int_y_green, int_x_blue, int_y_blue;
-
-   png_uint_32 uint_x, uint_y;
-
-   png_debug(1, "in png_handle_cHRM\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before cHRM");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid cHRM after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-      /* Should be an error, but we can cope with it */
-      png_warning(png_ptr, "Missing PLTE before cHRM");
-
-   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
-#if defined(PNG_READ_sRGB_SUPPORTED)
-      && !(info_ptr->valid & PNG_INFO_sRGB)
-#endif
-      )
-   {
-      png_warning(png_ptr, "Duplicate cHRM chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (length != 32)
-   {
-      png_warning(png_ptr, "Incorrect cHRM chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_x = png_get_uint_32(buf);
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_y = png_get_uint_32(buf);
-
-   if (uint_x > 80000L || uint_y > 80000L ||
-      uint_x + uint_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid cHRM white point");
-      png_crc_finish(png_ptr, 24);
-      return;
-   }
-   int_x_white = (png_fixed_point)uint_x;
-   int_y_white = (png_fixed_point)uint_y;
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_x = png_get_uint_32(buf);
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_y = png_get_uint_32(buf);
-
-   if (uint_x > 80000L || uint_y > 80000L ||
-      uint_x + uint_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid cHRM red point");
-      png_crc_finish(png_ptr, 16);
-      return;
-   }
-   int_x_red = (png_fixed_point)uint_x;
-   int_y_red = (png_fixed_point)uint_y;
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_x = png_get_uint_32(buf);
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_y = png_get_uint_32(buf);
-
-   if (uint_x > 80000L || uint_y > 80000L ||
-      uint_x + uint_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid cHRM green point");
-      png_crc_finish(png_ptr, 8);
-      return;
-   }
-   int_x_green = (png_fixed_point)uint_x;
-   int_y_green = (png_fixed_point)uint_y;
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_x = png_get_uint_32(buf);
-
-   png_crc_read(png_ptr, buf, 4);
-   uint_y = png_get_uint_32(buf);
-
-   if (uint_x > 80000L || uint_y > 80000L ||
-      uint_x + uint_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid cHRM blue point");
-      png_crc_finish(png_ptr, 0);
-      return;
-   }
-   int_x_blue = (png_fixed_point)uint_x;
-   int_y_blue = (png_fixed_point)uint_y;
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   white_x = (float)int_x_white / (float)100000.0;
-   white_y = (float)int_y_white / (float)100000.0;
-   red_x   = (float)int_x_red   / (float)100000.0;
-   red_y   = (float)int_y_red   / (float)100000.0;
-   green_x = (float)int_x_green / (float)100000.0;
-   green_y = (float)int_y_green / (float)100000.0;
-   blue_x  = (float)int_x_blue  / (float)100000.0;
-   blue_y  = (float)int_y_blue  / (float)100000.0;
-#endif
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sRGB)
-      {
-      if (PNG_OUT_OF_RANGE(int_x_white, 31270,  1000) ||
-          PNG_OUT_OF_RANGE(int_y_white, 32900,  1000) ||
-          PNG_OUT_OF_RANGE(int_x_red,   64000L, 1000) ||
-          PNG_OUT_OF_RANGE(int_y_red,   33000,  1000) ||
-          PNG_OUT_OF_RANGE(int_x_green, 30000,  1000) ||
-          PNG_OUT_OF_RANGE(int_y_green, 60000L, 1000) ||
-          PNG_OUT_OF_RANGE(int_x_blue,  15000,  1000) ||
-          PNG_OUT_OF_RANGE(int_y_blue,   6000,  1000))
-         {
-
-            png_warning(png_ptr,
-              "Ignoring incorrect cHRM value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-            fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n",
-               white_x, white_y, red_x, red_y);
-            fprintf(stderr,"gx=%f, gy=%f, bx=%f, by=%f\n",
-               green_x, green_y, blue_x, blue_y);
-#else
-            fprintf(stderr,"wx=%ld, wy=%ld, rx=%ld, ry=%ld\n",
-               int_x_white, int_y_white, int_x_red, int_y_red);
-            fprintf(stderr,"gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
-               int_x_green, int_y_green, int_x_blue, int_y_blue);
-#endif
-#endif /* PNG_NO_CONSOLE_IO */
-         }
-         png_crc_finish(png_ptr, 0);
-         return;
-      }
-#endif /* PNG_READ_sRGB_SUPPORTED */
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   png_set_cHRM(png_ptr, info_ptr,
-      white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_set_cHRM_fixed(png_ptr, info_ptr,
-      int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
-      int_y_green, int_x_blue, int_y_blue);
-#endif
-   if (png_crc_finish(png_ptr, 0))
-      return;
-}
-#endif
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-void /* PRIVATE */
-png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   int intent;
-   png_byte buf[1];
-
-   png_debug(1, "in png_handle_sRGB\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before sRGB");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid sRGB after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-      /* Should be an error, but we can cope with it */
-      png_warning(png_ptr, "Out of place sRGB chunk");
-
-   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))
-   {
-      png_warning(png_ptr, "Duplicate sRGB chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (length != 1)
-   {
-      png_warning(png_ptr, "Incorrect sRGB chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 1);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   intent = buf[0];
-   /* check for bad intent */
-   if (intent >= PNG_sRGB_INTENT_LAST)
-   {
-      png_warning(png_ptr, "Unknown sRGB intent");
-      return;
-   }
-
-#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
-   if ((info_ptr->valid & PNG_INFO_gAMA))
-   {
-   png_fixed_point igamma;
-#ifdef PNG_FIXED_POINT_SUPPORTED
-      igamma=info_ptr->int_gamma;
-#else
-#  ifdef PNG_FLOATING_POINT_SUPPORTED
-      igamma=(png_fixed_point)(info_ptr->gamma * 100000.);
-#  endif
-#endif
-      if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
-      {
-         png_warning(png_ptr,
-           "Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
-#  ifdef PNG_FIXED_POINT_SUPPORTED
-         fprintf(stderr,"incorrect gamma=(%d/100000)\n",(int)png_ptr->int_gamma);
-#  else
-#    ifdef PNG_FLOATING_POINT_SUPPORTED
-         fprintf(stderr,"incorrect gamma=%f\n",png_ptr->gamma);
-#    endif
-#  endif
-#endif
-      }
-   }
-#endif /* PNG_READ_gAMA_SUPPORTED */
-
-#ifdef PNG_READ_cHRM_SUPPORTED
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   if (info_ptr->valid & PNG_INFO_cHRM)
-      if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270,  1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900,  1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_x_red,   64000L, 1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_y_red,   33000,  1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_x_green, 30000,  1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_y_green, 60000L, 1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_x_blue,  15000,  1000) ||
-          PNG_OUT_OF_RANGE(info_ptr->int_y_blue,   6000,  1000))
-         {
-            png_warning(png_ptr,
-              "Ignoring incorrect cHRM value when sRGB is also present");
-         }
-#endif /* PNG_FIXED_POINT_SUPPORTED */
-#endif /* PNG_READ_cHRM_SUPPORTED */
-
-   png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent);
-}
-#endif /* PNG_READ_sRGB_SUPPORTED */
-
-#if defined(PNG_READ_iCCP_SUPPORTED)
-void /* PRIVATE */
-png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-/* Note: this does not properly handle chunks that are > 64K under DOS */
-{
-   png_charp chunkdata;
-   png_byte compression_type;
-   png_bytep pC;
-   png_charp profile;
-   png_uint_32 skip = 0;
-   png_uint_32 profile_size, profile_length;
-   png_size_t slength, prefix_length, data_length;
-
-   png_debug(1, "in png_handle_iCCP\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before iCCP");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid iCCP after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->mode & PNG_HAVE_PLTE)
-      /* Should be an error, but we can cope with it */
-      png_warning(png_ptr, "Out of place iCCP chunk");
-
-   if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP))
-   {
-      png_warning(png_ptr, "Duplicate iCCP chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-#ifdef PNG_MAX_MALLOC_64K
-   if (length > (png_uint_32)65535L)
-   {
-      png_warning(png_ptr, "iCCP chunk too large to fit in memory");
-      skip = length - (png_uint_32)65535L;
-      length = (png_uint_32)65535L;
-   }
-#endif
-
-   chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
-
-   if (png_crc_finish(png_ptr, skip))
-   {
-      png_free(png_ptr, chunkdata);
-      return;
-   }
-
-   chunkdata[slength] = 0x00;
-
-   for (profile = chunkdata; *profile; profile++)
-      /* empty loop to find end of name */ ;
-
-   ++profile;
-
-   /* there should be at least one zero (the compression type byte)
-      following the separator, and we should be on it  */
-   if ( profile >= chunkdata + slength)
-   {
-      png_free(png_ptr, chunkdata);
-      png_warning(png_ptr, "Malformed iCCP chunk");
-      return;
-   }
-
-   /* compression_type should always be zero */
-   compression_type = *profile++;
-   if (compression_type)
-   {
-      png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk");
-      compression_type=0x00;  /* Reset it to zero (libpng-1.0.6 through 1.0.8
-                                 wrote nonzero) */
-   }
-
-   prefix_length = profile - chunkdata;
-   chunkdata = png_decompress_chunk(png_ptr, compression_type, chunkdata,
-                                    slength, prefix_length, &data_length);
-
-   profile_length = data_length - prefix_length;
-
-   if ( prefix_length > data_length || profile_length < 4)
-   {
-      png_free(png_ptr, chunkdata);
-      png_warning(png_ptr, "Profile size field missing from iCCP chunk");
-      return;
-   }
-
-   /* Check the profile_size recorded in the first 32 bits of the ICC profile */
-   pC = (png_bytep)(chunkdata+prefix_length);
-   profile_size = ((*(pC  ))<<24) |
-                  ((*(pC+1))<<16) |
-                  ((*(pC+2))<< 8) |
-                  ((*(pC+3))    );
-
-   if(profile_size < profile_length)
-      profile_length = profile_size;
-
-   if(profile_size > profile_length)
-   {
-      png_free(png_ptr, chunkdata);
-      png_warning(png_ptr, "Ignoring truncated iCCP profile.\n");
-      return;
-   }
-
-   png_set_iCCP(png_ptr, info_ptr, chunkdata, compression_type,
-                chunkdata + prefix_length, profile_length);
-   png_free(png_ptr, chunkdata);
-}
-#endif /* PNG_READ_iCCP_SUPPORTED */
-
-#if defined(PNG_READ_sPLT_SUPPORTED)
-void /* PRIVATE */
-png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-/* Note: this does not properly handle chunks that are > 64K under DOS */
-{
-   png_bytep chunkdata;
-   png_bytep entry_start;
-   png_sPLT_t new_palette;
-#ifdef PNG_NO_POINTER_INDEXING
-   png_sPLT_entryp pp;
-#endif
-   int data_length, entry_size, i;
-   png_uint_32 skip = 0;
-   png_size_t slength;
-
-   png_debug(1, "in png_handle_sPLT\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before sPLT");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid sPLT after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-#ifdef PNG_MAX_MALLOC_64K
-   if (length > (png_uint_32)65535L)
-   {
-      png_warning(png_ptr, "sPLT chunk too large to fit in memory");
-      skip = length - (png_uint_32)65535L;
-      length = (png_uint_32)65535L;
-   }
-#endif
-
-   chunkdata = (png_bytep)png_malloc(png_ptr, length + 1);
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
-
-   if (png_crc_finish(png_ptr, skip))
-   {
-      png_free(png_ptr, chunkdata);
-      return;
-   }
-
-   chunkdata[slength] = 0x00;
-
-   for (entry_start = chunkdata; *entry_start; entry_start++)
-      /* empty loop to find end of name */ ;
-   ++entry_start;
-
-   /* a sample depth should follow the separator, and we should be on it  */
-   if (entry_start > chunkdata + slength)
-   {
-      png_free(png_ptr, chunkdata);
-      png_warning(png_ptr, "malformed sPLT chunk");
-      return;
-   }
-
-   new_palette.depth = *entry_start++;
-   entry_size = (new_palette.depth == 8 ? 6 : 10);
-   data_length = (slength - (entry_start - chunkdata));
-
-   /* integrity-check the data length */
-   if (data_length % entry_size)
-   {
-      png_free(png_ptr, chunkdata);
-      png_warning(png_ptr, "sPLT chunk has bad length");
-      return;
-   }
-
-   new_palette.nentries = (png_uint_32) (data_length / entry_size);
-   if ((png_uint_32) new_palette.nentries > (png_uint_32) (PNG_SIZE_MAX /
-       png_sizeof(png_sPLT_entry)))
-   {
-       png_warning(png_ptr, "sPLT chunk too long");
-       return;
-   }
-   new_palette.entries = (png_sPLT_entryp)png_malloc_warn(
-       png_ptr, new_palette.nentries * png_sizeof(png_sPLT_entry));
-   if (new_palette.entries == NULL)
-   {
-       png_warning(png_ptr, "sPLT chunk requires too much memory");
-       return;
-   }
-
-#ifndef PNG_NO_POINTER_INDEXING
-   for (i = 0; i < new_palette.nentries; i++)
-   {
-      png_sPLT_entryp pp = new_palette.entries + i;
-
-      if (new_palette.depth == 8)
-      {
-          pp->red = *entry_start++;
-          pp->green = *entry_start++;
-          pp->blue = *entry_start++;
-          pp->alpha = *entry_start++;
-      }
-      else
-      {
-          pp->red   = png_get_uint_16(entry_start); entry_start += 2;
-          pp->green = png_get_uint_16(entry_start); entry_start += 2;
-          pp->blue  = png_get_uint_16(entry_start); entry_start += 2;
-          pp->alpha = png_get_uint_16(entry_start); entry_start += 2;
-      }
-      pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
-   }
-#else
-   pp = new_palette.entries;
-   for (i = 0; i < new_palette.nentries; i++)
-   {
-
-      if (new_palette.depth == 8)
-      {
-          pp[i].red   = *entry_start++;
-          pp[i].green = *entry_start++;
-          pp[i].blue  = *entry_start++;
-          pp[i].alpha = *entry_start++;
-      }
-      else
-      {
-          pp[i].red   = png_get_uint_16(entry_start); entry_start += 2;
-          pp[i].green = png_get_uint_16(entry_start); entry_start += 2;
-          pp[i].blue  = png_get_uint_16(entry_start); entry_start += 2;
-          pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
-      }
-      pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
-   }
-#endif
-
-   /* discard all chunk data except the name and stash that */
-   new_palette.name = (png_charp)chunkdata;
-
-   png_set_sPLT(png_ptr, info_ptr, &new_palette, 1);
-
-   png_free(png_ptr, chunkdata);
-   png_free(png_ptr, new_palette.entries);
-}
-#endif /* PNG_READ_sPLT_SUPPORTED */
-
-#if defined(PNG_READ_tRNS_SUPPORTED)
-void /* PRIVATE */
-png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte readbuf[PNG_MAX_PALETTE_LENGTH];
-
-   png_debug(1, "in png_handle_tRNS\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before tRNS");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid tRNS after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
-   {
-      png_warning(png_ptr, "Duplicate tRNS chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
-   {
-      png_byte buf[2];
-
-      if (length != 2)
-      {
-         png_warning(png_ptr, "Incorrect tRNS chunk length");
-         png_crc_finish(png_ptr, length);
-         return;
-      }
-
-      png_crc_read(png_ptr, buf, 2);
-      png_ptr->num_trans = 1;
-      png_ptr->trans_values.gray = png_get_uint_16(buf);
-   }
-   else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
-   {
-      png_byte buf[6];
-
-      if (length != 6)
-      {
-         png_warning(png_ptr, "Incorrect tRNS chunk length");
-         png_crc_finish(png_ptr, length);
-         return;
-      }
-      png_crc_read(png_ptr, buf, (png_size_t)length);
-      png_ptr->num_trans = 1;
-      png_ptr->trans_values.red = png_get_uint_16(buf);
-      png_ptr->trans_values.green = png_get_uint_16(buf + 2);
-      png_ptr->trans_values.blue = png_get_uint_16(buf + 4);
-   }
-   else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      if (!(png_ptr->mode & PNG_HAVE_PLTE))
-      {
-         /* Should be an error, but we can cope with it. */
-         png_warning(png_ptr, "Missing PLTE before tRNS");
-      }
-      if (length > (png_uint_32)png_ptr->num_palette ||
-          length > PNG_MAX_PALETTE_LENGTH)
-      {
-         png_warning(png_ptr, "Incorrect tRNS chunk length");
-         png_crc_finish(png_ptr, length);
-         return;
-      }
-      if (length == 0)
-      {
-         png_warning(png_ptr, "Zero length tRNS chunk");
-         png_crc_finish(png_ptr, length);
-         return;
-      }
-      png_crc_read(png_ptr, readbuf, (png_size_t)length);
-      png_ptr->num_trans = (png_uint_16)length;
-   }
-   else
-   {
-      png_warning(png_ptr, "tRNS chunk not allowed with alpha channel");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
-      &(png_ptr->trans_values));
-}
-#endif
-
-#if defined(PNG_READ_bKGD_SUPPORTED)
-void /* PRIVATE */
-png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_size_t truelen;
-   png_byte buf[6];
-
-   png_debug(1, "in png_handle_bKGD\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before bKGD");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid bKGD after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-            !(png_ptr->mode & PNG_HAVE_PLTE))
-   {
-      png_warning(png_ptr, "Missing PLTE before bKGD");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD))
-   {
-      png_warning(png_ptr, "Duplicate bKGD chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      truelen = 1;
-   else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
-      truelen = 6;
-   else
-      truelen = 2;
-
-   if (length != truelen)
-   {
-      png_warning(png_ptr, "Incorrect bKGD chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, truelen);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   /* We convert the index value into RGB components so that we can allow
-    * arbitrary RGB values for background when we have transparency, and
-    * so it is easy to determine the RGB values of the background color
-    * from the info_ptr struct. */
-   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      png_ptr->background.index = buf[0];
-      if(info_ptr->num_palette)
-      {
-          if(buf[0] > info_ptr->num_palette)
-          {
-             png_warning(png_ptr, "Incorrect bKGD chunk index value");
-             return;
-          }
-          png_ptr->background.red =
-             (png_uint_16)png_ptr->palette[buf[0]].red;
-          png_ptr->background.green =
-             (png_uint_16)png_ptr->palette[buf[0]].green;
-          png_ptr->background.blue =
-             (png_uint_16)png_ptr->palette[buf[0]].blue;
-      }
-   }
-   else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */
-   {
-      png_ptr->background.red =
-      png_ptr->background.green =
-      png_ptr->background.blue =
-      png_ptr->background.gray = png_get_uint_16(buf);
-   }
-   else
-   {
-      png_ptr->background.red = png_get_uint_16(buf);
-      png_ptr->background.green = png_get_uint_16(buf + 2);
-      png_ptr->background.blue = png_get_uint_16(buf + 4);
-   }
-
-   png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background));
-}
-#endif
-
-#if defined(PNG_READ_hIST_SUPPORTED)
-void /* PRIVATE */
-png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   unsigned int num, i;
-   png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH];
-
-   png_debug(1, "in png_handle_hIST\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before hIST");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid hIST after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (!(png_ptr->mode & PNG_HAVE_PLTE))
-   {
-      png_warning(png_ptr, "Missing PLTE before hIST");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST))
-   {
-      png_warning(png_ptr, "Duplicate hIST chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   num = length / 2 ;
-   if (num != (unsigned int) png_ptr->num_palette || num >
-      (unsigned int) PNG_MAX_PALETTE_LENGTH)
-   {
-      png_warning(png_ptr, "Incorrect hIST chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   for (i = 0; i < num; i++)
-   {
-      png_byte buf[2];
-
-      png_crc_read(png_ptr, buf, 2);
-      readbuf[i] = png_get_uint_16(buf);
-   }
-
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   png_set_hIST(png_ptr, info_ptr, readbuf);
-}
-#endif
-
-#if defined(PNG_READ_pHYs_SUPPORTED)
-void /* PRIVATE */
-png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte buf[9];
-   png_uint_32 res_x, res_y;
-   int unit_type;
-
-   png_debug(1, "in png_handle_pHYs\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before pHYs");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid pHYs after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
-   {
-      png_warning(png_ptr, "Duplicate pHYs chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (length != 9)
-   {
-      png_warning(png_ptr, "Incorrect pHYs chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 9);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   res_x = png_get_uint_32(buf);
-   res_y = png_get_uint_32(buf + 4);
-   unit_type = buf[8];
-   png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type);
-}
-#endif
-
-#if defined(PNG_READ_oFFs_SUPPORTED)
-void /* PRIVATE */
-png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte buf[9];
-   png_int_32 offset_x, offset_y;
-   int unit_type;
-
-   png_debug(1, "in png_handle_oFFs\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before oFFs");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid oFFs after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
-   {
-      png_warning(png_ptr, "Duplicate oFFs chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (length != 9)
-   {
-      png_warning(png_ptr, "Incorrect oFFs chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 9);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   offset_x = png_get_int_32(buf);
-   offset_y = png_get_int_32(buf + 4);
-   unit_type = buf[8];
-   png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type);
-}
-#endif
-
-#if defined(PNG_READ_pCAL_SUPPORTED)
-/* read the pCAL chunk (described in the PNG Extensions document) */
-void /* PRIVATE */
-png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_charp purpose;
-   png_int_32 X0, X1;
-   png_byte type, nparams;
-   png_charp buf, units, endptr;
-   png_charpp params;
-   png_size_t slength;
-   int i;
-
-   png_debug(1, "in png_handle_pCAL\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before pCAL");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid pCAL after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL))
-   {
-      png_warning(png_ptr, "Duplicate pCAL chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n",
-      length + 1);
-   purpose = (png_charp)png_malloc_warn(png_ptr, length + 1);
-   if (purpose == NULL)
-     {
-       png_warning(png_ptr, "No memory for pCAL purpose.");
-       return;
-     }
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)purpose, slength);
-
-   if (png_crc_finish(png_ptr, 0))
-   {
-      png_free(png_ptr, purpose);
-      return;
-   }
-
-   purpose[slength] = 0x00; /* null terminate the last string */
-
-   png_debug(3, "Finding end of pCAL purpose string\n");
-   for (buf = purpose; *buf; buf++)
-      /* empty loop */ ;
-
-   endptr = purpose + slength;
-
-   /* We need to have at least 12 bytes after the purpose string
-      in order to get the parameter information. */
-   if (endptr <= buf + 12)
-   {
-      png_warning(png_ptr, "Invalid pCAL data");
-      png_free(png_ptr, purpose);
-      return;
-   }
-
-   png_debug(3, "Reading pCAL X0, X1, type, nparams, and units\n");
-   X0 = png_get_int_32((png_bytep)buf+1);
-   X1 = png_get_int_32((png_bytep)buf+5);
-   type = buf[9];
-   nparams = buf[10];
-   units = buf + 11;
-
-   png_debug(3, "Checking pCAL equation type and number of parameters\n");
-   /* Check that we have the right number of parameters for known
-      equation types. */
-   if ((type == PNG_EQUATION_LINEAR && nparams != 2) ||
-       (type == PNG_EQUATION_BASE_E && nparams != 3) ||
-       (type == PNG_EQUATION_ARBITRARY && nparams != 3) ||
-       (type == PNG_EQUATION_HYPERBOLIC && nparams != 4))
-   {
-      png_warning(png_ptr, "Invalid pCAL parameters for equation type");
-      png_free(png_ptr, purpose);
-      return;
-   }
-   else if (type >= PNG_EQUATION_LAST)
-   {
-      png_warning(png_ptr, "Unrecognized equation type for pCAL chunk");
-   }
-
-   for (buf = units; *buf; buf++)
-      /* Empty loop to move past the units string. */ ;
-
-   png_debug(3, "Allocating pCAL parameters array\n");
-   params = (png_charpp)png_malloc_warn(png_ptr, (png_uint_32)(nparams
-      *png_sizeof(png_charp))) ;
-   if (params == NULL)
-     {
-       png_free(png_ptr, purpose);
-       png_warning(png_ptr, "No memory for pCAL params.");
-       return;
-     }
-
-   /* Get pointers to the start of each parameter string. */
-   for (i = 0; i < (int)nparams; i++)
-   {
-      buf++; /* Skip the null string terminator from previous parameter. */
-
-      png_debug1(3, "Reading pCAL parameter %d\n", i);
-      for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++)
-         /* Empty loop to move past each parameter string */ ;
-
-      /* Make sure we haven't run out of data yet */
-      if (buf > endptr)
-      {
-         png_warning(png_ptr, "Invalid pCAL data");
-         png_free(png_ptr, purpose);
-         png_free(png_ptr, params);
-         return;
-      }
-   }
-
-   png_set_pCAL(png_ptr, info_ptr, purpose, X0, X1, type, nparams,
-      units, params);
-
-   png_free(png_ptr, purpose);
-   png_free(png_ptr, params);
-}
-#endif
-
-#if defined(PNG_READ_sCAL_SUPPORTED)
-/* read the sCAL chunk */
-void /* PRIVATE */
-png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_charp buffer, ep;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   double width, height;
-   png_charp vp;
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_charp swidth, sheight;
-#endif
-#endif
-   png_size_t slength;
-
-   png_debug(1, "in png_handle_sCAL\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before sCAL");
-   else if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-      png_warning(png_ptr, "Invalid sCAL after IDAT");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL))
-   {
-      png_warning(png_ptr, "Duplicate sCAL chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n",
-      length + 1);
-   buffer = (png_charp)png_malloc_warn(png_ptr, length + 1);
-   if (buffer == NULL)
-     {
-       png_warning(png_ptr, "Out of memory while processing sCAL chunk");
-       return;
-     }
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)buffer, slength);
-
-   if (png_crc_finish(png_ptr, 0))
-   {
-      png_free(png_ptr, buffer);
-      return;
-   }
-
-   buffer[slength] = 0x00; /* null terminate the last string */
-
-   ep = buffer + 1;        /* skip unit byte */
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   width = strtod(ep, &vp);
-   if (*vp)
-   {
-       png_warning(png_ptr, "malformed width string in sCAL chunk");
-       return;
-   }
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
-   if (swidth == NULL)
-     {
-       png_warning(png_ptr, "Out of memory while processing sCAL chunk width");
-       return;
-     }
-   png_memcpy(swidth, ep, (png_size_t)png_strlen(ep));
-#endif
-#endif
-
-   for (ep = buffer; *ep; ep++)
-      /* empty loop */ ;
-   ep++;
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   height = strtod(ep, &vp);
-   if (*vp)
-   {
-       png_warning(png_ptr, "malformed height string in sCAL chunk");
-       return;
-   }
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
-   if (swidth == NULL)
-     {
-       png_warning(png_ptr, "Out of memory while processing sCAL chunk height");
-       return;
-     }
-   png_memcpy(sheight, ep, (png_size_t)png_strlen(ep));
-#endif
-#endif
-
-   if (buffer + slength < ep
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-      || width <= 0. || height <= 0.
-#endif
-      )
-   {
-      png_warning(png_ptr, "Invalid sCAL data");
-      png_free(png_ptr, buffer);
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
-      png_free(png_ptr, swidth);
-      png_free(png_ptr, sheight);
-#endif
-      return;
-   }
-
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   png_set_sCAL(png_ptr, info_ptr, buffer[0], width, height);
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_set_sCAL_s(png_ptr, info_ptr, buffer[0], swidth, sheight);
-#endif
-#endif
-
-   png_free(png_ptr, buffer);
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
-   png_free(png_ptr, swidth);
-   png_free(png_ptr, sheight);
-#endif
-}
-#endif
-
-#if defined(PNG_READ_tIME_SUPPORTED)
-void /* PRIVATE */
-png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_byte buf[7];
-   png_time mod_time;
-
-   png_debug(1, "in png_handle_tIME\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Out of place tIME chunk");
-   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME))
-   {
-      png_warning(png_ptr, "Duplicate tIME chunk");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   if (png_ptr->mode & PNG_HAVE_IDAT)
-      png_ptr->mode |= PNG_AFTER_IDAT;
-
-   if (length != 7)
-   {
-      png_warning(png_ptr, "Incorrect tIME chunk length");
-      png_crc_finish(png_ptr, length);
-      return;
-   }
-
-   png_crc_read(png_ptr, buf, 7);
-   if (png_crc_finish(png_ptr, 0))
-      return;
-
-   mod_time.second = buf[6];
-   mod_time.minute = buf[5];
-   mod_time.hour = buf[4];
-   mod_time.day = buf[3];
-   mod_time.month = buf[2];
-   mod_time.year = png_get_uint_16(buf);
-
-   png_set_tIME(png_ptr, info_ptr, &mod_time);
-}
-#endif
-
-#if defined(PNG_READ_tEXt_SUPPORTED)
-/* Note: this does not properly handle chunks that are > 64K under DOS */
-void /* PRIVATE */
-png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_textp text_ptr;
-   png_charp key;
-   png_charp text;
-   png_uint_32 skip = 0;
-   png_size_t slength;
-   int ret;
-
-   png_debug(1, "in png_handle_tEXt\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before tEXt");
-
-   if (png_ptr->mode & PNG_HAVE_IDAT)
-      png_ptr->mode |= PNG_AFTER_IDAT;
-
-#ifdef PNG_MAX_MALLOC_64K
-   if (length > (png_uint_32)65535L)
-   {
-      png_warning(png_ptr, "tEXt chunk too large to fit in memory");
-      skip = length - (png_uint_32)65535L;
-      length = (png_uint_32)65535L;
-   }
-#endif
-
-   key = (png_charp)png_malloc_warn(png_ptr, length + 1);
-   if (key == NULL)
-   {
-     png_warning(png_ptr, "No memory to process text chunk.");
-     return;
-   }
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)key, slength);
-
-   if (png_crc_finish(png_ptr, skip))
-   {
-      png_free(png_ptr, key);
-      return;
-   }
-
-   key[slength] = 0x00;
-
-   for (text = key; *text; text++)
-      /* empty loop to find end of key */ ;
-
-   if (text != key + slength)
-      text++;
-
-   text_ptr = (png_textp)png_malloc_warn(png_ptr,
-      (png_uint_32)png_sizeof(png_text));
-   if (text_ptr == NULL)
-   {
-     png_warning(png_ptr, "Not enough memory to process text chunk.");
-     png_free(png_ptr, key);
-     return;
-   }
-   text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
-   text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
-   text_ptr->lang = NULL;
-   text_ptr->lang_key = NULL;
-   text_ptr->itxt_length = 0;
-#endif
-   text_ptr->text = text;
-   text_ptr->text_length = png_strlen(text);
-
-   ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-   png_free(png_ptr, key);
-   png_free(png_ptr, text_ptr);
-   if (ret)
-     png_warning(png_ptr, "Insufficient memory to process text chunk.");
-}
-#endif
-
-#if defined(PNG_READ_zTXt_SUPPORTED)
-/* note: this does not correctly handle chunks that are > 64K under DOS */
-void /* PRIVATE */
-png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_textp text_ptr;
-   png_charp chunkdata;
-   png_charp text;
-   int comp_type;
-   int ret;
-   png_size_t slength, prefix_len, data_len;
-
-   png_debug(1, "in png_handle_zTXt\n");
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before zTXt");
-
-   if (png_ptr->mode & PNG_HAVE_IDAT)
-      png_ptr->mode |= PNG_AFTER_IDAT;
-
-#ifdef PNG_MAX_MALLOC_64K
-   /* We will no doubt have problems with chunks even half this size, but
-      there is no hard and fast rule to tell us where to stop. */
-   if (length > (png_uint_32)65535L)
-   {
-     png_warning(png_ptr,"zTXt chunk too large to fit in memory");
-     png_crc_finish(png_ptr, length);
-     return;
-   }
-#endif
-
-   chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
-   if (chunkdata == NULL)
-   {
-     png_warning(png_ptr,"Out of memory processing zTXt chunk.");
-     return;
-   }
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
-   if (png_crc_finish(png_ptr, 0))
-   {
-      png_free(png_ptr, chunkdata);
-      return;
-   }
-
-   chunkdata[slength] = 0x00;
-
-   for (text = chunkdata; *text; text++)
-      /* empty loop */ ;
-
-   /* zTXt must have some text after the chunkdataword */
-   if (text == chunkdata + slength)
-   {
-      comp_type = PNG_TEXT_COMPRESSION_NONE;
-      png_warning(png_ptr, "Zero length zTXt chunk");
-   }
-   else
-   {
-       comp_type = *(++text);
-       if (comp_type != PNG_TEXT_COMPRESSION_zTXt)
-       {
-          png_warning(png_ptr, "Unknown compression type in zTXt chunk");
-          comp_type = PNG_TEXT_COMPRESSION_zTXt;
-       }
-       text++;        /* skip the compression_method byte */
-   }
-   prefix_len = text - chunkdata;
-
-   chunkdata = (png_charp)png_decompress_chunk(png_ptr, comp_type, chunkdata,
-                                    (png_size_t)length, prefix_len, &data_len);
-
-   text_ptr = (png_textp)png_malloc_warn(png_ptr,
-     (png_uint_32)png_sizeof(png_text));
-   if (text_ptr == NULL)
-   {
-     png_warning(png_ptr,"Not enough memory to process zTXt chunk.");
-     png_free(png_ptr, chunkdata);
-     return;
-   }
-   text_ptr->compression = comp_type;
-   text_ptr->key = chunkdata;
-#ifdef PNG_iTXt_SUPPORTED
-   text_ptr->lang = NULL;
-   text_ptr->lang_key = NULL;
-   text_ptr->itxt_length = 0;
-#endif
-   text_ptr->text = chunkdata + prefix_len;
-   text_ptr->text_length = data_len;
-
-   ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-   png_free(png_ptr, text_ptr);
-   png_free(png_ptr, chunkdata);
-   if (ret)
-     png_error(png_ptr, "Insufficient memory to store zTXt chunk.");
-}
-#endif
-
-#if defined(PNG_READ_iTXt_SUPPORTED)
-/* note: this does not correctly handle chunks that are > 64K under DOS */
-void /* PRIVATE */
-png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_textp text_ptr;
-   png_charp chunkdata;
-   png_charp key, lang, text, lang_key;
-   int comp_flag;
-   int comp_type = 0;
-   int ret;
-   png_size_t slength, prefix_len, data_len;
-
-   png_debug(1, "in png_handle_iTXt\n");
-
-   if (!(png_ptr->mode & PNG_HAVE_IHDR))
-      png_error(png_ptr, "Missing IHDR before iTXt");
-
-   if (png_ptr->mode & PNG_HAVE_IDAT)
-      png_ptr->mode |= PNG_AFTER_IDAT;
-
-#ifdef PNG_MAX_MALLOC_64K
-   /* We will no doubt have problems with chunks even half this size, but
-      there is no hard and fast rule to tell us where to stop. */
-   if (length > (png_uint_32)65535L)
-   {
-     png_warning(png_ptr,"iTXt chunk too large to fit in memory");
-     png_crc_finish(png_ptr, length);
-     return;
-   }
-#endif
-
-   chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
-   if (chunkdata == NULL)
-   {
-     png_warning(png_ptr, "No memory to process iTXt chunk.");
-     return;
-   }
-   slength = (png_size_t)length;
-   png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
-   if (png_crc_finish(png_ptr, 0))
-   {
-      png_free(png_ptr, chunkdata);
-      return;
-   }
-
-   chunkdata[slength] = 0x00;
-
-   for (lang = chunkdata; *lang; lang++)
-      /* empty loop */ ;
-   lang++;        /* skip NUL separator */
-
-   /* iTXt must have a language tag (possibly empty), two compression bytes,
-      translated keyword (possibly empty), and possibly some text after the
-      keyword */
-
-   if (lang >= chunkdata + slength)
-   {
-      comp_flag = PNG_TEXT_COMPRESSION_NONE;
-      png_warning(png_ptr, "Zero length iTXt chunk");
-   }
-   else
-   {
-       comp_flag = *lang++;
-       comp_type = *lang++;
-   }
-
-   for (lang_key = lang; *lang_key; lang_key++)
-      /* empty loop */ ;
-   lang_key++;        /* skip NUL separator */
-
-   for (text = lang_key; *text; text++)
-      /* empty loop */ ;
-   text++;        /* skip NUL separator */
-
-   prefix_len = text - chunkdata;
-
-   key=chunkdata;
-   if (comp_flag)
-       chunkdata = png_decompress_chunk(png_ptr, comp_type, chunkdata,
-          (size_t)length, prefix_len, &data_len);
-   else
-       data_len=png_strlen(chunkdata + prefix_len);
-   text_ptr = (png_textp)png_malloc_warn(png_ptr,
-      (png_uint_32)png_sizeof(png_text));
-   if (text_ptr == NULL)
-   {
-     png_warning(png_ptr,"Not enough memory to process iTXt chunk.");
-     png_free(png_ptr, chunkdata);
-     return;
-   }
-   text_ptr->compression = (int)comp_flag + 1;
-   text_ptr->lang_key = chunkdata+(lang_key-key);
-   text_ptr->lang = chunkdata+(lang-key);
-   text_ptr->itxt_length = data_len;
-   text_ptr->text_length = 0;
-   text_ptr->key = chunkdata;
-   text_ptr->text = chunkdata + prefix_len;
-
-   ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
-
-   png_free(png_ptr, text_ptr);
-   png_free(png_ptr, chunkdata);
-   if (ret)
-     png_error(png_ptr, "Insufficient memory to store iTXt chunk.");
-}
-#endif
-
-/* This function is called when we haven't found a handler for a
-   chunk.  If there isn't a problem with the chunk itself (ie bad
-   chunk name, CRC, or a critical chunk), the chunk is silently ignored
-   -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which
-   case it will be saved away to be written out later. */
-void /* PRIVATE */
-png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-{
-   png_uint_32 skip = 0;
-
-   png_debug(1, "in png_handle_unknown\n");
-
-   if (png_ptr->mode & PNG_HAVE_IDAT)
-   {
-#ifdef PNG_USE_LOCAL_ARRAYS
-      PNG_IDAT;
-#endif
-      if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))  /* not an IDAT */
-         png_ptr->mode |= PNG_AFTER_IDAT;
-   }
-
-   png_check_chunk_name(png_ptr, png_ptr->chunk_name);
-
-   if (!(png_ptr->chunk_name[0] & 0x20))
-   {
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-      if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
-           PNG_HANDLE_CHUNK_ALWAYS
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-           && png_ptr->read_user_chunk_fn == NULL
-#endif
-        )
-#endif
-          png_chunk_error(png_ptr, "unknown critical chunk");
-   }
-
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-   if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
-   {
-       png_unknown_chunk chunk;
-
-#ifdef PNG_MAX_MALLOC_64K
-       if (length > (png_uint_32)65535L)
-       {
-           png_warning(png_ptr, "unknown chunk too large to fit in memory");
-           skip = length - (png_uint_32)65535L;
-           length = (png_uint_32)65535L;
-       }
-#endif
-       png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name);
-       chunk.data = (png_bytep)png_malloc(png_ptr, length);
-       chunk.size = (png_size_t)length;
-       png_crc_read(png_ptr, (png_bytep)chunk.data, length);
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-       if(png_ptr->read_user_chunk_fn != NULL)
-       {
-          /* callback to user unknown chunk handler */
-          if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0)
-          {
-             if (!(png_ptr->chunk_name[0] & 0x20))
-                if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
-                     PNG_HANDLE_CHUNK_ALWAYS)
-                 {
-                   png_free(png_ptr, chunk.data);
-                   png_chunk_error(png_ptr, "unknown critical chunk");
-                 }
-             png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
-          }
-       }
-       else
-#endif
-          png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
-       png_free(png_ptr, chunk.data);
-   }
-   else
-#endif
-      skip = length;
-
-   png_crc_finish(png_ptr, skip);
-
-#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-   if (&info_ptr == NULL) /* quiet compiler warnings about unused info_ptr */
-      return;
-#endif
-}
-
-/* This function is called to verify that a chunk name is valid.
-   This function can't have the "critical chunk check" incorporated
-   into it, since in the future we will need to be able to call user
-   functions to handle unknown critical chunks after we check that
-   the chunk name itself is valid. */
-
-#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
-
-void /* PRIVATE */
-png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
-{
-   png_debug(1, "in png_check_chunk_name\n");
-   if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) ||
-       isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3]))
-   {
-      png_chunk_error(png_ptr, "invalid chunk type");
-   }
-}
-
-/* Combines the row recently read in with the existing pixels in the
-   row.  This routine takes care of alpha and transparency if requested.
-   This routine also handles the two methods of progressive display
-   of interlaced images, depending on the mask value.
-   The mask value describes which pixels are to be combined with
-   the row.  The pattern always repeats every 8 pixels, so just 8
-   bits are needed.  A one indicates the pixel is to be combined,
-   a zero indicates the pixel is to be skipped.  This is in addition
-   to any alpha or transparency value associated with the pixel.  If
-   you want all pixels to be combined, pass 0xff (255) in mask.  */
-#ifndef PNG_HAVE_ASSEMBLER_COMBINE_ROW
-void /* PRIVATE */
-png_combine_row(png_structp png_ptr, png_bytep row, int mask)
-{
-   png_debug(1,"in png_combine_row\n");
-   if (mask == 0xff)
-   {
-      png_memcpy(row, png_ptr->row_buf + 1,
-         PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width));
-   }
-   else
-   {
-      switch (png_ptr->row_info.pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp = png_ptr->row_buf + 1;
-            png_bytep dp = row;
-            int s_inc, s_start, s_end;
-            int m = 0x80;
-            int shift;
-            png_uint_32 i;
-            png_uint_32 row_width = png_ptr->width;
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-                s_start = 0;
-                s_end = 7;
-                s_inc = 1;
-            }
-            else
-#endif
-            {
-                s_start = 7;
-                s_end = 0;
-                s_inc = -1;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < row_width; i++)
-            {
-               if (m & mask)
-               {
-                  int value;
-
-                  value = (*sp >> shift) & 0x01;
-                  *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-         case 2:
-         {
-            png_bytep sp = png_ptr->row_buf + 1;
-            png_bytep dp = row;
-            int s_start, s_end, s_inc;
-            int m = 0x80;
-            int shift;
-            png_uint_32 i;
-            png_uint_32 row_width = png_ptr->width;
-            int value;
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-            else
-#endif
-            {
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < row_width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0x03;
-                  *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-         case 4:
-         {
-            png_bytep sp = png_ptr->row_buf + 1;
-            png_bytep dp = row;
-            int s_start, s_end, s_inc;
-            int m = 0x80;
-            int shift;
-            png_uint_32 i;
-            png_uint_32 row_width = png_ptr->width;
-            int value;
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-            else
-#endif
-            {
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            shift = s_start;
-
-            for (i = 0; i < row_width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0xf;
-                  *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-         default:
-         {
-            png_bytep sp = png_ptr->row_buf + 1;
-            png_bytep dp = row;
-            png_size_t pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-            png_uint_32 i;
-            png_uint_32 row_width = png_ptr->width;
-            png_byte m = 0x80;
-
-
-            for (i = 0; i < row_width; i++)
-            {
-               if (m & mask)
-               {
-                  png_memcpy(dp, sp, pixel_bytes);
-               }
-
-               sp += pixel_bytes;
-               dp += pixel_bytes;
-
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-      }
-   }
-}
-#endif /* !PNG_HAVE_ASSEMBLER_COMBINE_ROW */
-
-#ifdef PNG_READ_INTERLACING_SUPPORTED
-#ifndef PNG_HAVE_ASSEMBLER_READ_INTERLACE   /* else in pngvcrd.c, pnggccrd.c */
-/* OLD pre-1.0.9 interface:
-void png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
-   png_uint_32 transformations)
- */
-void /* PRIVATE */
-png_do_read_interlace(png_structp png_ptr)
-{
-   png_row_infop row_info = &(png_ptr->row_info);
-   png_bytep row = png_ptr->row_buf + 1;
-   int pass = png_ptr->pass;
-   png_uint_32 transformations = png_ptr->transformations;
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-   /* offset to next interlace block */
-   const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
-
-   png_debug(1,"in png_do_read_interlace (stock C version)\n");
-   if (row != NULL && row_info != NULL)
-   {
-      png_uint_32 final_width;
-
-      final_width = row_info->width * png_pass_inc[pass];
-
-      switch (row_info->pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3);
-            png_bytep dp = row + (png_size_t)((final_width - 1) >> 3);
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            int jstop = png_pass_inc[pass];
-            png_byte v;
-            png_uint_32 i;
-            int j;
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-                sshift = (int)((row_info->width + 7) & 0x07);
-                dshift = (int)((final_width + 7) & 0x07);
-                s_start = 7;
-                s_end = 0;
-                s_inc = -1;
-            }
-            else
-#endif
-            {
-                sshift = 7 - (int)((row_info->width + 7) & 0x07);
-                dshift = 7 - (int)((final_width + 7) & 0x07);
-                s_start = 0;
-                s_end = 7;
-                s_inc = 1;
-            }
-
-            for (i = 0; i < row_info->width; i++)
-            {
-               v = (png_byte)((*sp >> sshift) & 0x01);
-               for (j = 0; j < jstop; j++)
-               {
-                  *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-         case 2:
-         {
-            png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2);
-            png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2);
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            int jstop = png_pass_inc[pass];
-            png_uint_32 i;
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (int)(((row_info->width + 3) & 0x03) << 1);
-               dshift = (int)(((final_width + 3) & 0x03) << 1);
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-            else
-#endif
-            {
-               sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1);
-               dshift = (int)((3 - ((final_width + 3) & 0x03)) << 1);
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-
-            for (i = 0; i < row_info->width; i++)
-            {
-               png_byte v;
-               int j;
-
-               v = (png_byte)((*sp >> sshift) & 0x03);
-               for (j = 0; j < jstop; j++)
-               {
-                  *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-         case 4:
-         {
-            png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1);
-            png_bytep dp = row + (png_size_t)((final_width - 1) >> 1);
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_uint_32 i;
-            int jstop = png_pass_inc[pass];
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (int)(((row_info->width + 1) & 0x01) << 2);
-               dshift = (int)(((final_width + 1) & 0x01) << 2);
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            else
-#endif
-            {
-               sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2);
-               dshift = (int)((1 - ((final_width + 1) & 0x01)) << 2);
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-
-            for (i = 0; i < row_info->width; i++)
-            {
-               png_byte v = (png_byte)((*sp >> sshift) & 0xf);
-               int j;
-
-               for (j = 0; j < jstop; j++)
-               {
-                  *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-         default:
-         {
-            png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
-            png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes;
-            png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
-
-            int jstop = png_pass_inc[pass];
-            png_uint_32 i;
-
-            for (i = 0; i < row_info->width; i++)
-            {
-               png_byte v[8];
-               int j;
-
-               png_memcpy(v, sp, pixel_bytes);
-               for (j = 0; j < jstop; j++)
-               {
-                  png_memcpy(dp, v, pixel_bytes);
-                  dp -= pixel_bytes;
-               }
-               sp -= pixel_bytes;
-            }
-            break;
-         }
-      }
-      row_info->width = final_width;
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,final_width);
-   }
-#if !defined(PNG_READ_PACKSWAP_SUPPORTED)
-   if (&transformations == NULL) /* silence compiler warning */
-      return;
-#endif
-}
-#endif /* !PNG_HAVE_ASSEMBLER_READ_INTERLACE */
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
-
-#ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
-void /* PRIVATE */
-png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
-   png_bytep prev_row, int filter)
-{
-   png_debug(1, "in png_read_filter_row\n");
-   png_debug2(2,"row = %lu, filter = %d\n", png_ptr->row_number, filter);
-   switch (filter)
-   {
-      case PNG_FILTER_VALUE_NONE:
-         break;
-      case PNG_FILTER_VALUE_SUB:
-      {
-         png_uint_32 i;
-         png_uint_32 istop = row_info->rowbytes;
-         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-         png_bytep rp = row + bpp;
-         png_bytep lp = row;
-
-         for (i = bpp; i < istop; i++)
-         {
-            *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
-            rp++;
-         }
-         break;
-      }
-      case PNG_FILTER_VALUE_UP:
-      {
-         png_uint_32 i;
-         png_uint_32 istop = row_info->rowbytes;
-         png_bytep rp = row;
-         png_bytep pp = prev_row;
-
-         for (i = 0; i < istop; i++)
-         {
-            *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-            rp++;
-         }
-         break;
-      }
-      case PNG_FILTER_VALUE_AVG:
-      {
-         png_uint_32 i;
-         png_bytep rp = row;
-         png_bytep pp = prev_row;
-         png_bytep lp = row;
-         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-         png_uint_32 istop = row_info->rowbytes - bpp;
-
-         for (i = 0; i < bpp; i++)
-         {
-            *rp = (png_byte)(((int)(*rp) +
-               ((int)(*pp++) / 2 )) & 0xff);
-            rp++;
-         }
-
-         for (i = 0; i < istop; i++)
-         {
-            *rp = (png_byte)(((int)(*rp) +
-               (int)(*pp++ + *lp++) / 2 ) & 0xff);
-            rp++;
-         }
-         break;
-      }
-      case PNG_FILTER_VALUE_PAETH:
-      {
-         png_uint_32 i;
-         png_bytep rp = row;
-         png_bytep pp = prev_row;
-         png_bytep lp = row;
-         png_bytep cp = prev_row;
-         png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-         png_uint_32 istop=row_info->rowbytes - bpp;
-
-         for (i = 0; i < bpp; i++)
-         {
-            *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-            rp++;
-         }
-
-         for (i = 0; i < istop; i++)   /* use leftover rp,pp */
-         {
-            int a, b, c, pa, pb, pc, p;
-
-            a = *lp++;
-            b = *pp++;
-            c = *cp++;
-
-            p = b - c;
-            pc = a - c;
-
-#ifdef PNG_USE_ABS
-            pa = abs(p);
-            pb = abs(pc);
-            pc = abs(p + pc);
-#else
-            pa = p < 0 ? -p : p;
-            pb = pc < 0 ? -pc : pc;
-            pc = (p + pc) < 0 ? -(p + pc) : p + pc;
-#endif
-
-            /*
-               if (pa <= pb && pa <= pc)
-                  p = a;
-               else if (pb <= pc)
-                  p = b;
-               else
-                  p = c;
-             */
-
-            p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
-
-            *rp = (png_byte)(((int)(*rp) + p) & 0xff);
-            rp++;
-         }
-         break;
-      }
-      default:
-         png_warning(png_ptr, "Ignoring bad adaptive filter type");
-         *row=0;
-         break;
-   }
-}
-#endif /* !PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */
-
-void /* PRIVATE */
-png_read_finish_row(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-
-   /* start of interlace block in the y direction */
-   const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
-
-   /* offset to next interlace block in the y direction */
-   const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
-#endif
-
-   png_debug(1, "in png_read_finish_row\n");
-   png_ptr->row_number++;
-   if (png_ptr->row_number < png_ptr->num_rows)
-      return;
-
-   if (png_ptr->interlaced)
-   {
-      png_ptr->row_number = 0;
-      png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
-      do
-      {
-         png_ptr->pass++;
-         if (png_ptr->pass >= 7)
-            break;
-         png_ptr->iwidth = (png_ptr->width +
-            png_pass_inc[png_ptr->pass] - 1 -
-            png_pass_start[png_ptr->pass]) /
-            png_pass_inc[png_ptr->pass];
-
-         png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
-            png_ptr->iwidth) + 1;
-
-         if (!(png_ptr->transformations & PNG_INTERLACE))
-         {
-            png_ptr->num_rows = (png_ptr->height +
-               png_pass_yinc[png_ptr->pass] - 1 -
-               png_pass_ystart[png_ptr->pass]) /
-               png_pass_yinc[png_ptr->pass];
-            if (!(png_ptr->num_rows))
-               continue;
-         }
-         else  /* if (png_ptr->transformations & PNG_INTERLACE) */
-            break;
-      } while (png_ptr->iwidth == 0);
-
-      if (png_ptr->pass < 7)
-         return;
-   }
-
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
-   {
-#ifdef PNG_USE_LOCAL_ARRAYS
-      PNG_IDAT;
-#endif
-      char extra;
-      int ret;
-
-      png_ptr->zstream.next_out = (Byte *)&extra;
-      png_ptr->zstream.avail_out = (uInt)1;
-      for(;;)
-      {
-         if (!(png_ptr->zstream.avail_in))
-         {
-            while (!png_ptr->idat_size)
-            {
-               png_byte chunk_length[4];
-
-               png_crc_finish(png_ptr, 0);
-
-               png_read_data(png_ptr, chunk_length, 4);
-               png_ptr->idat_size = png_get_uint_31(png_ptr, chunk_length);
-               png_reset_crc(png_ptr);
-               png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-               if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
-                  png_error(png_ptr, "Not enough image data");
-
-            }
-            png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
-            png_ptr->zstream.next_in = png_ptr->zbuf;
-            if (png_ptr->zbuf_size > png_ptr->idat_size)
-               png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
-            png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in);
-            png_ptr->idat_size -= png_ptr->zstream.avail_in;
-         }
-         ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
-         if (ret == Z_STREAM_END)
-         {
-            if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in ||
-               png_ptr->idat_size)
-               png_warning(png_ptr, "Extra compressed data");
-            png_ptr->mode |= PNG_AFTER_IDAT;
-            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-            break;
-         }
-         if (ret != Z_OK)
-            png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
-                      "Decompression Error");
-
-         if (!(png_ptr->zstream.avail_out))
-         {
-            png_warning(png_ptr, "Extra compressed data.");
-            png_ptr->mode |= PNG_AFTER_IDAT;
-            png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-            break;
-         }
-
-      }
-      png_ptr->zstream.avail_out = 0;
-   }
-
-   if (png_ptr->idat_size || png_ptr->zstream.avail_in)
-      png_warning(png_ptr, "Extra compression data");
-
-   inflateReset(&png_ptr->zstream);
-
-   png_ptr->mode |= PNG_AFTER_IDAT;
-}
-
-void /* PRIVATE */
-png_read_start_row(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-
-   /* start of interlace block in the y direction */
-   const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
-
-   /* offset to next interlace block in the y direction */
-   const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
-#endif
-
-   int max_pixel_depth;
-   png_uint_32 row_bytes;
-
-   png_debug(1, "in png_read_start_row\n");
-   png_ptr->zstream.avail_in = 0;
-   png_init_read_transformations(png_ptr);
-   if (png_ptr->interlaced)
-   {
-      if (!(png_ptr->transformations & PNG_INTERLACE))
-         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
-            png_pass_ystart[0]) / png_pass_yinc[0];
-      else
-         png_ptr->num_rows = png_ptr->height;
-
-      png_ptr->iwidth = (png_ptr->width +
-         png_pass_inc[png_ptr->pass] - 1 -
-         png_pass_start[png_ptr->pass]) /
-         png_pass_inc[png_ptr->pass];
-
-         row_bytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->iwidth) + 1;
-
-         png_ptr->irowbytes = (png_size_t)row_bytes;
-         if((png_uint_32)png_ptr->irowbytes != row_bytes)
-            png_error(png_ptr, "Rowbytes overflow in png_read_start_row");
-   }
-   else
-   {
-      png_ptr->num_rows = png_ptr->height;
-      png_ptr->iwidth = png_ptr->width;
-      png_ptr->irowbytes = png_ptr->rowbytes + 1;
-   }
-   max_pixel_depth = png_ptr->pixel_depth;
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-   if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8)
-      max_pixel_depth = 8;
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-   if (png_ptr->transformations & PNG_EXPAND)
-   {
-      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      {
-         if (png_ptr->num_trans)
-            max_pixel_depth = 32;
-         else
-            max_pixel_depth = 24;
-      }
-      else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
-      {
-         if (max_pixel_depth < 8)
-            max_pixel_depth = 8;
-         if (png_ptr->num_trans)
-            max_pixel_depth *= 2;
-      }
-      else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
-      {
-         if (png_ptr->num_trans)
-         {
-            max_pixel_depth *= 4;
-            max_pixel_depth /= 3;
-         }
-      }
-   }
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED)
-   if (png_ptr->transformations & (PNG_FILLER))
-   {
-      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-         max_pixel_depth = 32;
-      else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
-      {
-         if (max_pixel_depth <= 8)
-            max_pixel_depth = 16;
-         else
-            max_pixel_depth = 32;
-      }
-      else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
-      {
-         if (max_pixel_depth <= 32)
-            max_pixel_depth = 32;
-         else
-            max_pixel_depth = 64;
-      }
-   }
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-   if (png_ptr->transformations & PNG_GRAY_TO_RGB)
-   {
-      if (
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-        (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) ||
-#endif
-#if defined(PNG_READ_FILLER_SUPPORTED)
-        (png_ptr->transformations & (PNG_FILLER)) ||
-#endif
-        png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         if (max_pixel_depth <= 16)
-            max_pixel_depth = 32;
-         else
-            max_pixel_depth = 64;
-      }
-      else
-      {
-         if (max_pixel_depth <= 8)
-           {
-             if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-               max_pixel_depth = 32;
-             else
-               max_pixel_depth = 24;
-           }
-         else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-            max_pixel_depth = 64;
-         else
-            max_pixel_depth = 48;
-      }
-   }
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \
-defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-   if(png_ptr->transformations & PNG_USER_TRANSFORM)
-     {
-       int user_pixel_depth=png_ptr->user_transform_depth*
-         png_ptr->user_transform_channels;
-       if(user_pixel_depth > max_pixel_depth)
-         max_pixel_depth=user_pixel_depth;
-     }
-#endif
-
-   /* align the width on the next larger 8 pixels.  Mainly used
-      for interlacing */
-   row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7));
-   /* calculate the maximum bytes needed, adding a byte and a pixel
-      for safety's sake */
-   row_bytes = PNG_ROWBYTES(max_pixel_depth,row_bytes) +
-      1 + ((max_pixel_depth + 7) >> 3);
-#ifdef PNG_MAX_MALLOC_64K
-   if (row_bytes > (png_uint_32)65536L)
-      png_error(png_ptr, "This image requires a row greater than 64KB");
-#endif
-   png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64);
-   png_ptr->row_buf = png_ptr->big_row_buf+32;
-#if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)
-   png_ptr->row_buf_size = row_bytes;
-#endif
-
-#ifdef PNG_MAX_MALLOC_64K
-   if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
-      png_error(png_ptr, "This image requires a row greater than 64KB");
-#endif
-   if ((png_uint_32)png_ptr->rowbytes + 1 > PNG_SIZE_MAX)
-      png_error(png_ptr, "Row has too many bytes to allocate in memory.");
-   png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
-      png_ptr->rowbytes + 1));
-
-   png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
-
-   png_debug1(3, "width = %lu,\n", png_ptr->width);
-   png_debug1(3, "height = %lu,\n", png_ptr->height);
-   png_debug1(3, "iwidth = %lu,\n", png_ptr->iwidth);
-   png_debug1(3, "num_rows = %lu\n", png_ptr->num_rows);
-   png_debug1(3, "rowbytes = %lu,\n", png_ptr->rowbytes);
-   png_debug1(3, "irowbytes = %lu,\n", png_ptr->irowbytes);
-
-   png_ptr->flags |= PNG_FLAG_ROW_INIT;
-}
diff --git a/tkimg1.3/libpng/pngset.c b/tkimg1.3/libpng/pngset.c
deleted file mode 100644
index 25fb1e6..0000000
--- a/tkimg1.3/libpng/pngset.c
+++ /dev/null
@@ -1,1219 +0,0 @@
-
-/* pngset.c - storage of image information into info struct
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * The functions here are used during reads to store data from the file
- * into the info struct, and during writes to store application data
- * into the info struct for writing into the file.  This abstracts the
- * info struct and allows us to change the structure in the future.
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#if defined(PNG_bKGD_SUPPORTED)
-void PNGAPI
-png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
-{
-   png_debug1(1, "in %s storage function\n", "bKGD");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   png_memcpy(&(info_ptr->background), background, png_sizeof(png_color_16));
-   info_ptr->valid |= PNG_INFO_bKGD;
-}
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void PNGAPI
-png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
-   double white_x, double white_y, double red_x, double red_y,
-   double green_x, double green_y, double blue_x, double blue_y)
-{
-   png_debug1(1, "in %s storage function\n", "cHRM");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   if (white_x < 0.0 || white_y < 0.0 ||
-         red_x < 0.0 ||   red_y < 0.0 ||
-       green_x < 0.0 || green_y < 0.0 ||
-        blue_x < 0.0 ||  blue_y < 0.0)
-   {
-      png_warning(png_ptr,
-        "Ignoring attempt to set negative chromaticity value");
-      return;
-   }
-   if (white_x > 21474.83 || white_y > 21474.83 ||
-         red_x > 21474.83 ||   red_y > 21474.83 ||
-       green_x > 21474.83 || green_y > 21474.83 ||
-        blue_x > 21474.83 ||  blue_y > 21474.83)
-   {
-      png_warning(png_ptr,
-        "Ignoring attempt to set chromaticity value exceeding 21474.83");
-      return;
-   }
-
-   info_ptr->x_white = (float)white_x;
-   info_ptr->y_white = (float)white_y;
-   info_ptr->x_red   = (float)red_x;
-   info_ptr->y_red   = (float)red_y;
-   info_ptr->x_green = (float)green_x;
-   info_ptr->y_green = (float)green_y;
-   info_ptr->x_blue  = (float)blue_x;
-   info_ptr->y_blue  = (float)blue_y;
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
-   info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
-   info_ptr->int_x_red   = (png_fixed_point)(  red_x*100000.+0.5);
-   info_ptr->int_y_red   = (png_fixed_point)(  red_y*100000.+0.5);
-   info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
-   info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
-   info_ptr->int_x_blue  = (png_fixed_point)( blue_x*100000.+0.5);
-   info_ptr->int_y_blue  = (png_fixed_point)( blue_y*100000.+0.5);
-#endif
-   info_ptr->valid |= PNG_INFO_cHRM;
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void PNGAPI
-png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
-   png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,
-   png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,
-   png_fixed_point blue_x, png_fixed_point blue_y)
-{
-   png_debug1(1, "in %s storage function\n", "cHRM");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   if (white_x < 0 || white_y < 0 ||
-         red_x < 0 ||   red_y < 0 ||
-       green_x < 0 || green_y < 0 ||
-        blue_x < 0 ||  blue_y < 0)
-   {
-      png_warning(png_ptr,
-        "Ignoring attempt to set negative chromaticity value");
-      return;
-   }
-   if (white_x > (double) PNG_UINT_31_MAX ||
-       white_y > (double) PNG_UINT_31_MAX ||
-         red_x > (double) PNG_UINT_31_MAX ||
-         red_y > (double) PNG_UINT_31_MAX ||
-       green_x > (double) PNG_UINT_31_MAX ||
-       green_y > (double) PNG_UINT_31_MAX ||
-        blue_x > (double) PNG_UINT_31_MAX ||
-        blue_y > (double) PNG_UINT_31_MAX)
-   {
-      png_warning(png_ptr,
-        "Ignoring attempt to set chromaticity value exceeding 21474.83");
-      return;
-   }
-   info_ptr->int_x_white = white_x;
-   info_ptr->int_y_white = white_y;
-   info_ptr->int_x_red   = red_x;
-   info_ptr->int_y_red   = red_y;
-   info_ptr->int_x_green = green_x;
-   info_ptr->int_y_green = green_y;
-   info_ptr->int_x_blue  = blue_x;
-   info_ptr->int_y_blue  = blue_y;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   info_ptr->x_white = (float)(white_x/100000.);
-   info_ptr->y_white = (float)(white_y/100000.);
-   info_ptr->x_red   = (float)(  red_x/100000.);
-   info_ptr->y_red   = (float)(  red_y/100000.);
-   info_ptr->x_green = (float)(green_x/100000.);
-   info_ptr->y_green = (float)(green_y/100000.);
-   info_ptr->x_blue  = (float)( blue_x/100000.);
-   info_ptr->y_blue  = (float)( blue_y/100000.);
-#endif
-   info_ptr->valid |= PNG_INFO_cHRM;
-}
-#endif
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void PNGAPI
-png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
-{
-   double gamma;
-   png_debug1(1, "in %s storage function\n", "gAMA");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   /* Check for overflow */
-   if (file_gamma > 21474.83)
-   {
-      png_warning(png_ptr, "Limiting gamma to 21474.83");
-      gamma=21474.83;
-   }
-   else
-      gamma=file_gamma;
-   info_ptr->gamma = (float)gamma;
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   info_ptr->int_gamma = (int)(gamma*100000.+.5);
-#endif
-   info_ptr->valid |= PNG_INFO_gAMA;
-   if(gamma == 0.0)
-      png_warning(png_ptr, "Setting gamma=0");
-}
-#endif
-void PNGAPI
-png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
-   int_gamma)
-{
-   png_fixed_point gamma;
-
-   png_debug1(1, "in %s storage function\n", "gAMA");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   if (int_gamma > (png_fixed_point) PNG_UINT_31_MAX)
-   {
-     png_warning(png_ptr, "Limiting gamma to 21474.83");
-     gamma=PNG_UINT_31_MAX;
-   }
-   else
-   {
-     if (int_gamma < 0)
-     {
-       png_warning(png_ptr, "Setting negative gamma to zero");
-       gamma=0;
-     }
-     else
-       gamma=int_gamma;
-   }
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   info_ptr->gamma = (float)(gamma/100000.);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   info_ptr->int_gamma = gamma;
-#endif
-   info_ptr->valid |= PNG_INFO_gAMA;
-   if(gamma == 0)
-      png_warning(png_ptr, "Setting gamma=0");
-}
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-void PNGAPI
-png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
-{
-   int i;
-
-   png_debug1(1, "in %s storage function\n", "hIST");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-   if (info_ptr->num_palette == 0)
-   {
-       png_warning(png_ptr,
-          "Palette size 0, hIST allocation skipped.");
-       return;
-   }
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
-#endif
-   /* Changed from info->num_palette to 256 in version 1.2.1 */
-   png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
-      (png_uint_32)(256 * png_sizeof (png_uint_16)));
-   if (png_ptr->hist == NULL)
-     {
-       png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
-       return;
-     }
-
-   for (i = 0; i < info_ptr->num_palette; i++)
-       png_ptr->hist[i] = hist[i];
-   info_ptr->hist = png_ptr->hist;
-   info_ptr->valid |= PNG_INFO_hIST;
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   info_ptr->free_me |= PNG_FREE_HIST;
-#else
-   png_ptr->flags |= PNG_FLAG_FREE_HIST;
-#endif
-}
-#endif
-
-void PNGAPI
-png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 width, png_uint_32 height, int bit_depth,
-   int color_type, int interlace_type, int compression_type,
-   int filter_type)
-{
-   png_debug1(1, "in %s storage function\n", "IHDR");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   /* check for width and height valid values */
-   if (width == 0 || height == 0)
-      png_error(png_ptr, "Image width or height is zero in IHDR");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   if (width > png_ptr->user_width_max || height > png_ptr->user_height_max)
-      png_error(png_ptr, "image size exceeds user limits in IHDR");
-#else
-   if (width > PNG_USER_WIDTH_MAX || height > PNG_USER_HEIGHT_MAX)
-      png_error(png_ptr, "image size exceeds user limits in IHDR");
-#endif
-   if (width > PNG_UINT_31_MAX || height > PNG_UINT_31_MAX)
-      png_error(png_ptr, "Invalid image size in IHDR");
-   if ( width > (PNG_UINT_32_MAX
-                 >> 3)      /* 8-byte RGBA pixels */
-                 - 64       /* bigrowbuf hack */
-                 - 1        /* filter byte */
-                 - 7*8      /* rounding of width to multiple of 8 pixels */
-                 - 8)       /* extra max_pixel_depth pad */
-      png_warning(png_ptr, "Width is too large for libpng to process pixels");
-
-   /* check other values */
-   if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
-      bit_depth != 8 && bit_depth != 16)
-      png_error(png_ptr, "Invalid bit depth in IHDR");
-
-   if (color_type < 0 || color_type == 1 ||
-      color_type == 5 || color_type > 6)
-      png_error(png_ptr, "Invalid color type in IHDR");
-
-   if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) ||
-       ((color_type == PNG_COLOR_TYPE_RGB ||
-         color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
-         color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8))
-      png_error(png_ptr, "Invalid color type/bit depth combination in IHDR");
-
-   if (interlace_type >= PNG_INTERLACE_LAST)
-      png_error(png_ptr, "Unknown interlace method in IHDR");
-
-   if (compression_type != PNG_COMPRESSION_TYPE_BASE)
-      png_error(png_ptr, "Unknown compression method in IHDR");
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   /* Accept filter_method 64 (intrapixel differencing) only if
-    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
-    * 2. Libpng did not read a PNG signature (this filter_method is only
-    *    used in PNG datastreams that are embedded in MNG datastreams) and
-    * 3. The application called png_permit_mng_features with a mask that
-    *    included PNG_FLAG_MNG_FILTER_64 and
-    * 4. The filter_method is 64 and
-    * 5. The color_type is RGB or RGBA
-    */
-   if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted)
-      png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n");
-   if(filter_type != PNG_FILTER_TYPE_BASE)
-   {
-     if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
-        (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
-        ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
-        (color_type == PNG_COLOR_TYPE_RGB || 
-         color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
-        png_error(png_ptr, "Unknown filter method in IHDR");
-     if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)
-        png_warning(png_ptr, "Invalid filter method in IHDR");
-   }
-#else
-   if(filter_type != PNG_FILTER_TYPE_BASE)
-      png_error(png_ptr, "Unknown filter method in IHDR");
-#endif
-
-   info_ptr->width = width;
-   info_ptr->height = height;
-   info_ptr->bit_depth = (png_byte)bit_depth;
-   info_ptr->color_type =(png_byte) color_type;
-   info_ptr->compression_type = (png_byte)compression_type;
-   info_ptr->filter_type = (png_byte)filter_type;
-   info_ptr->interlace_type = (png_byte)interlace_type;
-   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      info_ptr->channels = 1;
-   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
-      info_ptr->channels = 3;
-   else
-      info_ptr->channels = 1;
-   if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
-      info_ptr->channels++;
-   info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
-
-   /* check for potential overflow */
-   if ( width > (PNG_UINT_32_MAX
-                 >> 3)      /* 8-byte RGBA pixels */
-                 - 64       /* bigrowbuf hack */
-                 - 1        /* filter byte */
-                 - 7*8      /* rounding of width to multiple of 8 pixels */
-                 - 8)       /* extra max_pixel_depth pad */
-      info_ptr->rowbytes = (png_size_t)0;
-   else
-      info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth,width);
-}
-
-#if defined(PNG_oFFs_SUPPORTED)
-void PNGAPI
-png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
-   png_int_32 offset_x, png_int_32 offset_y, int unit_type)
-{
-   png_debug1(1, "in %s storage function\n", "oFFs");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   info_ptr->x_offset = offset_x;
-   info_ptr->y_offset = offset_y;
-   info_ptr->offset_unit_type = (png_byte)unit_type;
-   info_ptr->valid |= PNG_INFO_oFFs;
-}
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-void PNGAPI
-png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
-   png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams,
-   png_charp units, png_charpp params)
-{
-   png_uint_32 length;
-   int i;
-
-   png_debug1(1, "in %s storage function\n", "pCAL");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   length = png_strlen(purpose) + 1;
-   png_debug1(3, "allocating purpose for info (%lu bytes)\n", length);
-   info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
-   if (info_ptr->pcal_purpose == NULL)
-     {
-       png_warning(png_ptr, "Insufficient memory for pCAL purpose.");
-       return;
-     }
-   png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length);
-
-   png_debug(3, "storing X0, X1, type, and nparams in info\n");
-   info_ptr->pcal_X0 = X0;
-   info_ptr->pcal_X1 = X1;
-   info_ptr->pcal_type = (png_byte)type;
-   info_ptr->pcal_nparams = (png_byte)nparams;
-
-   length = png_strlen(units) + 1;
-   png_debug1(3, "allocating units for info (%lu bytes)\n", length);
-   info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
-   if (info_ptr->pcal_units == NULL)
-     {
-       png_warning(png_ptr, "Insufficient memory for pCAL units.");
-       return;
-     }
-   png_memcpy(info_ptr->pcal_units, units, (png_size_t)length);
-
-   info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr,
-      (png_uint_32)((nparams + 1) * png_sizeof(png_charp)));
-   if (info_ptr->pcal_params == NULL)
-     {
-       png_warning(png_ptr, "Insufficient memory for pCAL params.");
-       return;
-     }
-
-   info_ptr->pcal_params[nparams] = NULL;
-
-   for (i = 0; i < nparams; i++)
-   {
-      length = png_strlen(params[i]) + 1;
-      png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length);
-      info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
-      if (info_ptr->pcal_params[i] == NULL)
-        {
-          png_warning(png_ptr, "Insufficient memory for pCAL parameter.");
-          return;
-        }
-      png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length);
-   }
-
-   info_ptr->valid |= PNG_INFO_pCAL;
-#ifdef PNG_FREE_ME_SUPPORTED
-   info_ptr->free_me |= PNG_FREE_PCAL;
-#endif
-}
-#endif
-
-#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void PNGAPI
-png_set_sCAL(png_structp png_ptr, png_infop info_ptr,
-             int unit, double width, double height)
-{
-   png_debug1(1, "in %s storage function\n", "sCAL");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   info_ptr->scal_unit = (png_byte)unit;
-   info_ptr->scal_pixel_width = width;
-   info_ptr->scal_pixel_height = height;
-
-   info_ptr->valid |= PNG_INFO_sCAL;
-}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void PNGAPI
-png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
-             int unit, png_charp swidth, png_charp sheight)
-{
-   png_uint_32 length;
-
-   png_debug1(1, "in %s storage function\n", "sCAL");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   info_ptr->scal_unit = (png_byte)unit;
-
-   length = png_strlen(swidth) + 1;
-   png_debug1(3, "allocating unit for info (%d bytes)\n", length);
-   info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length);
-   if (info_ptr->scal_s_width == NULL)
-   {
-      png_warning(png_ptr, "Memory allocation failed while processing sCAL.");
-   }
-   png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length);
-
-   length = png_strlen(sheight) + 1;
-   png_debug1(3, "allocating unit for info (%d bytes)\n", length);
-   info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, length);
-   if (info_ptr->scal_s_height == NULL)
-   {
-      png_free (png_ptr, info_ptr->scal_s_width);
-      png_warning(png_ptr, "Memory allocation failed while processing sCAL.");
-   }
-   png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length);
-
-   info_ptr->valid |= PNG_INFO_sCAL;
-#ifdef PNG_FREE_ME_SUPPORTED
-   info_ptr->free_me |= PNG_FREE_SCAL;
-#endif
-}
-#endif
-#endif
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-void PNGAPI
-png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 res_x, png_uint_32 res_y, int unit_type)
-{
-   png_debug1(1, "in %s storage function\n", "pHYs");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   info_ptr->x_pixels_per_unit = res_x;
-   info_ptr->y_pixels_per_unit = res_y;
-   info_ptr->phys_unit_type = (png_byte)unit_type;
-   info_ptr->valid |= PNG_INFO_pHYs;
-}
-#endif
-
-void PNGAPI
-png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
-   png_colorp palette, int num_palette)
-{
-
-   png_debug1(1, "in %s storage function\n", "PLTE");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   /*
-    * It may not actually be necessary to set png_ptr->palette here;
-    * we do it for backward compatibility with the way the png_handle_tRNS
-    * function used to do the allocation.
-    */
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
-#endif
-
-   /* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries,
-      in case of an invalid PNG file that has too-large sample values. */
-   png_ptr->palette = (png_colorp)png_malloc(png_ptr,
-      256 * png_sizeof(png_color));
-   png_memset(png_ptr->palette, 0, 256 * png_sizeof(png_color));
-   png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof (png_color));
-   info_ptr->palette = png_ptr->palette;
-   info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   info_ptr->free_me |= PNG_FREE_PLTE;
-#else
-   png_ptr->flags |= PNG_FLAG_FREE_PLTE;
-#endif
-
-   info_ptr->valid |= PNG_INFO_PLTE;
-}
-
-#if defined(PNG_sBIT_SUPPORTED)
-void PNGAPI
-png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
-   png_color_8p sig_bit)
-{
-   png_debug1(1, "in %s storage function\n", "sBIT");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   png_memcpy(&(info_ptr->sig_bit), sig_bit, png_sizeof (png_color_8));
-   info_ptr->valid |= PNG_INFO_sBIT;
-}
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-void PNGAPI
-png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
-{
-   png_debug1(1, "in %s storage function\n", "sRGB");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   info_ptr->srgb_intent = (png_byte)intent;
-   info_ptr->valid |= PNG_INFO_sRGB;
-}
-
-void PNGAPI
-png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
-   int intent)
-{
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float file_gamma;
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_fixed_point int_file_gamma;
-#endif
-#endif
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
-      int_green_y, int_blue_x, int_blue_y;
-#endif
-#endif
-   png_debug1(1, "in %s storage function\n", "sRGB_gAMA_and_cHRM");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   png_set_sRGB(png_ptr, info_ptr, intent);
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   file_gamma = (float).45455;
-   png_set_gAMA(png_ptr, info_ptr, file_gamma);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   int_file_gamma = 45455L;
-   png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
-#endif
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   int_white_x = 31270L;
-   int_white_y = 32900L;
-   int_red_x   = 64000L;
-   int_red_y   = 33000L;
-   int_green_x = 30000L;
-   int_green_y = 60000L;
-   int_blue_x  = 15000L;
-   int_blue_y  =  6000L;
-
-   png_set_cHRM_fixed(png_ptr, info_ptr,
-      int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, int_green_y,
-      int_blue_x, int_blue_y);
-#endif
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   white_x = (float).3127;
-   white_y = (float).3290;
-   red_x   = (float).64;
-   red_y   = (float).33;
-   green_x = (float).30;
-   green_y = (float).60;
-   blue_x  = (float).15;
-   blue_y  = (float).06;
-
-   png_set_cHRM(png_ptr, info_ptr,
-      white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
-#endif
-#endif
-}
-#endif
-
-
-#if defined(PNG_iCCP_SUPPORTED)
-void PNGAPI
-png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
-             png_charp name, int compression_type,
-             png_charp profile, png_uint_32 proflen)
-{
-   png_charp new_iccp_name;
-   png_charp new_iccp_profile;
-
-   png_debug1(1, "in %s storage function\n", "iCCP");
-   if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
-      return;
-
-   new_iccp_name = (png_charp)png_malloc_warn(png_ptr, png_strlen(name)+1);
-   if (new_iccp_name == NULL)
-   {
-      png_warning(png_ptr, "Insufficient memory to process iCCP chunk.");
-      return;
-   }
-   png_strcpy(new_iccp_name, name);
-   new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);
-   if (new_iccp_profile == NULL)
-   {
-      png_free (png_ptr, new_iccp_name);
-      png_warning(png_ptr, "Insufficient memory to process iCCP profile.");
-      return;
-   }
-   png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);
-
-   png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0);
-
-   info_ptr->iccp_proflen = proflen;
-   info_ptr->iccp_name = new_iccp_name;
-   info_ptr->iccp_profile = new_iccp_profile;
-   /* Compression is always zero but is here so the API and info structure
-    * does not have to change if we introduce multiple compression types */
-   info_ptr->iccp_compression = (png_byte)compression_type;
-#ifdef PNG_FREE_ME_SUPPORTED
-   info_ptr->free_me |= PNG_FREE_ICCP;
-#endif
-   info_ptr->valid |= PNG_INFO_iCCP;
-}
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-void PNGAPI
-png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
-   int num_text)
-{
-   int ret;
-   ret=png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);
-   if (ret)
-     png_error(png_ptr, "Insufficient memory to store text");
-}
-
-int /* PRIVATE */
-png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
-   int num_text)
-{
-   int i;
-
-   png_debug1(1, "in %s storage function\n", (png_ptr->chunk_name[0] == '\0' ?
-      "text" : (png_const_charp)png_ptr->chunk_name));
-
-   if (png_ptr == NULL || info_ptr == NULL || num_text == 0)
-      return(0);
-
-   /* Make sure we have enough space in the "text" array in info_struct
-    * to hold all of the incoming text_ptr objects.
-    */
-   if (info_ptr->num_text + num_text > info_ptr->max_text)
-   {
-      if (info_ptr->text != NULL)
-      {
-         png_textp old_text;
-         int old_max;
-
-         old_max = info_ptr->max_text;
-         info_ptr->max_text = info_ptr->num_text + num_text + 8;
-         old_text = info_ptr->text;
-         info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
-            (png_uint_32)(info_ptr->max_text * png_sizeof (png_text)));
-         if (info_ptr->text == NULL)
-           {
-             png_free(png_ptr, old_text);
-             return(1);
-           }
-         png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max *
-            png_sizeof(png_text)));
-         png_free(png_ptr, old_text);
-      }
-      else
-      {
-         info_ptr->max_text = num_text + 8;
-         info_ptr->num_text = 0;
-         info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
-            (png_uint_32)(info_ptr->max_text * png_sizeof (png_text)));
-         if (info_ptr->text == NULL)
-           return(1);
-#ifdef PNG_FREE_ME_SUPPORTED
-         info_ptr->free_me |= PNG_FREE_TEXT;
-#endif
-      }
-      png_debug1(3, "allocated %d entries for info_ptr->text\n",
-         info_ptr->max_text);
-   }
-   for (i = 0; i < num_text; i++)
-   {
-      png_size_t text_length,key_len;
-      png_size_t lang_len,lang_key_len;
-      png_textp textp = &(info_ptr->text[info_ptr->num_text]);
-
-      if (text_ptr[i].key == NULL)
-          continue;
-
-      key_len = png_strlen(text_ptr[i].key);
-
-      if(text_ptr[i].compression <= 0)
-      {
-        lang_len = 0;
-        lang_key_len = 0;
-      }
-      else
-#ifdef PNG_iTXt_SUPPORTED
-      {
-        /* set iTXt data */
-        if (text_ptr[i].lang != NULL)
-          lang_len = png_strlen(text_ptr[i].lang);
-        else
-          lang_len = 0;
-        if (text_ptr[i].lang_key != NULL)
-          lang_key_len = png_strlen(text_ptr[i].lang_key);
-        else
-          lang_key_len = 0;
-      }
-#else
-      {
-        png_warning(png_ptr, "iTXt chunk not supported.");
-        continue;
-      }
-#endif
-
-      if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0')
-      {
-         text_length = 0;
-#ifdef PNG_iTXt_SUPPORTED
-         if(text_ptr[i].compression > 0)
-            textp->compression = PNG_ITXT_COMPRESSION_NONE;
-         else
-#endif
-            textp->compression = PNG_TEXT_COMPRESSION_NONE;
-      }
-      else
-      {
-         text_length = png_strlen(text_ptr[i].text);
-         textp->compression = text_ptr[i].compression;
-      }
-
-      textp->key = (png_charp)png_malloc_warn(png_ptr,
-         (png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4));
-      if (textp->key == NULL)
-        return(1);
-      png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n",
-         (png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4),
-         (int)textp->key);
-
-      png_memcpy(textp->key, text_ptr[i].key,
-         (png_size_t)(key_len));
-      *(textp->key+key_len) = '\0';
-#ifdef PNG_iTXt_SUPPORTED
-      if (text_ptr[i].compression > 0)
-      {
-         textp->lang=textp->key + key_len + 1;
-         png_memcpy(textp->lang, text_ptr[i].lang, lang_len);
-         *(textp->lang+lang_len) = '\0';
-         textp->lang_key=textp->lang + lang_len + 1;
-         png_memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len);
-         *(textp->lang_key+lang_key_len) = '\0';
-         textp->text=textp->lang_key + lang_key_len + 1;
-      }
-      else
-#endif
-      {
-#ifdef PNG_iTXt_SUPPORTED
-         textp->lang=NULL;
-         textp->lang_key=NULL;
-#endif
-         textp->text=textp->key + key_len + 1;
-      }
-      if(text_length)
-         png_memcpy(textp->text, text_ptr[i].text,
-            (png_size_t)(text_length));
-      *(textp->text+text_length) = '\0';
-
-#ifdef PNG_iTXt_SUPPORTED
-      if(textp->compression > 0)
-      {
-         textp->text_length = 0;
-         textp->itxt_length = text_length;
-      }
-      else
-#endif
-      {
-         textp->text_length = text_length;
-#ifdef PNG_iTXt_SUPPORTED
-         textp->itxt_length = 0;
-#endif
-      }
-      info_ptr->text[info_ptr->num_text]= *textp;
-      info_ptr->num_text++;
-      png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text);
-   }
-   return(0);
-}
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-void PNGAPI
-png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
-{
-   png_debug1(1, "in %s storage function\n", "tIME");
-   if (png_ptr == NULL || info_ptr == NULL ||
-       (png_ptr->mode & PNG_WROTE_tIME))
-      return;
-
-   png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof (png_time));
-   info_ptr->valid |= PNG_INFO_tIME;
-}
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-void PNGAPI
-png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
-   png_bytep trans, int num_trans, png_color_16p trans_values)
-{
-   png_debug1(1, "in %s storage function\n", "tRNS");
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   if (trans != NULL)
-   {
-       /*
-        * It may not actually be necessary to set png_ptr->trans here;
-        * we do it for backward compatibility with the way the png_handle_tRNS
-        * function used to do the allocation.
-        */
-#ifdef PNG_FREE_ME_SUPPORTED
-       png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
-#endif
-       /* Changed from num_trans to 256 in version 1.2.1 */
-       png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
-           (png_uint_32)256);
-       png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
-#ifdef PNG_FREE_ME_SUPPORTED
-       info_ptr->free_me |= PNG_FREE_TRNS;
-#else
-       png_ptr->flags |= PNG_FLAG_FREE_TRNS;
-#endif
-   }
-
-   if (trans_values != NULL)
-   {
-      png_memcpy(&(info_ptr->trans_values), trans_values,
-         png_sizeof(png_color_16));
-      if (num_trans == 0)
-        num_trans = 1;
-   }
-   info_ptr->num_trans = (png_uint_16)num_trans;
-   info_ptr->valid |= PNG_INFO_tRNS;
-}
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-void PNGAPI
-png_set_sPLT(png_structp png_ptr,
-             png_infop info_ptr, png_sPLT_tp entries, int nentries)
-{
-    png_sPLT_tp np;
-    int i;
-
-    np = (png_sPLT_tp)png_malloc_warn(png_ptr,
-        (info_ptr->splt_palettes_num + nentries) * png_sizeof(png_sPLT_t));
-    if (np == NULL)
-    {
-      png_warning(png_ptr, "No memory for sPLT palettes.");
-      return;
-    }
-
-    png_memcpy(np, info_ptr->splt_palettes,
-           info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
-    png_free(png_ptr, info_ptr->splt_palettes);
-    info_ptr->splt_palettes=NULL;
-
-    for (i = 0; i < nentries; i++)
-    {
-        png_sPLT_tp to = np + info_ptr->splt_palettes_num + i;
-        png_sPLT_tp from = entries + i;
-
-        to->name = (png_charp)png_malloc(png_ptr,
-            png_strlen(from->name) + 1);
-        /* TODO: use png_malloc_warn */
-        png_strcpy(to->name, from->name);
-        to->entries = (png_sPLT_entryp)png_malloc(png_ptr,
-            from->nentries * png_sizeof(png_sPLT_t));
-        /* TODO: use png_malloc_warn */
-        png_memcpy(to->entries, from->entries,
-            from->nentries * png_sizeof(png_sPLT_t));
-        to->nentries = from->nentries;
-        to->depth = from->depth;
-    }
-
-    info_ptr->splt_palettes = np;
-    info_ptr->splt_palettes_num += nentries;
-    info_ptr->valid |= PNG_INFO_sPLT;
-#ifdef PNG_FREE_ME_SUPPORTED
-    info_ptr->free_me |= PNG_FREE_SPLT;
-#endif
-}
-#endif /* PNG_sPLT_SUPPORTED */
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-void PNGAPI
-png_set_unknown_chunks(png_structp png_ptr,
-   png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
-{
-    png_unknown_chunkp np;
-    int i;
-
-    if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0)
-        return;
-
-    np = (png_unknown_chunkp)png_malloc_warn(png_ptr,
-        (info_ptr->unknown_chunks_num + num_unknowns) *
-        png_sizeof(png_unknown_chunk));
-    if (np == NULL)
-    {
-       png_warning(png_ptr, "Out of memory while processing unknown chunk.");
-       return;
-    }
-
-    png_memcpy(np, info_ptr->unknown_chunks,
-           info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk));
-    png_free(png_ptr, info_ptr->unknown_chunks);
-    info_ptr->unknown_chunks=NULL;
-
-    for (i = 0; i < num_unknowns; i++)
-    {
-        png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
-        png_unknown_chunkp from = unknowns + i;
-
-        png_strncpy((png_charp)to->name, (png_charp)from->name, 5);
-        to->data = (png_bytep)png_malloc_warn(png_ptr, from->size);
-        if (to->data == NULL)
-        {
-           png_warning(png_ptr, "Out of memory processing unknown chunk.");
-        }
-        else
-        {
-           png_memcpy(to->data, from->data, from->size);
-           to->size = from->size;
-
-           /* note our location in the read or write sequence */
-           to->location = (png_byte)(png_ptr->mode & 0xff);
-        }
-    }
-
-    info_ptr->unknown_chunks = np;
-    info_ptr->unknown_chunks_num += num_unknowns;
-#ifdef PNG_FREE_ME_SUPPORTED
-    info_ptr->free_me |= PNG_FREE_UNKN;
-#endif
-}
-void PNGAPI
-png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
-   int chunk, int location)
-{
-   if(png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk <
-         (int)info_ptr->unknown_chunks_num)
-      info_ptr->unknown_chunks[chunk].location = (png_byte)location;
-}
-#endif
-
-#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-void PNGAPI
-png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
-{
-   /* This function is deprecated in favor of png_permit_mng_features()
-      and will be removed from libpng-2.0.0 */
-   png_debug(1, "in png_permit_empty_plte, DEPRECATED.\n");
-   if (png_ptr == NULL)
-      return;
-   png_ptr->mng_features_permitted = (png_byte)
-     ((png_ptr->mng_features_permitted & (~(PNG_FLAG_MNG_EMPTY_PLTE))) |
-     ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
-}
-#endif
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-png_uint_32 PNGAPI
-png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
-{
-   png_debug(1, "in png_permit_mng_features\n");
-   if (png_ptr == NULL)
-      return (png_uint_32)0;
-   png_ptr->mng_features_permitted =
-     (png_byte)(mng_features & PNG_ALL_MNG_FEATURES);
-   return (png_uint_32)png_ptr->mng_features_permitted;
-}
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-void PNGAPI
-png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
-   chunk_list, int num_chunks)
-{
-    png_bytep new_list, p;
-    int i, old_num_chunks;
-    if (num_chunks == 0)
-    {
-      if(keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)
-        png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
-      else
-        png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
-
-      if(keep == PNG_HANDLE_CHUNK_ALWAYS)
-        png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS;
-      else
-        png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS;
-      return;
-    }
-    if (chunk_list == NULL)
-      return;
-    old_num_chunks=png_ptr->num_chunk_list;
-    new_list=(png_bytep)png_malloc(png_ptr,
-       (png_uint_32)(5*(num_chunks+old_num_chunks)));
-    if(png_ptr->chunk_list != NULL)
-    {
-       png_memcpy(new_list, png_ptr->chunk_list,
-          (png_size_t)(5*old_num_chunks));
-       png_free(png_ptr, png_ptr->chunk_list);
-       png_ptr->chunk_list=NULL;
-    }
-    png_memcpy(new_list+5*old_num_chunks, chunk_list,
-       (png_size_t)(5*num_chunks));
-    for (p=new_list+5*old_num_chunks+4, i=0; i<num_chunks; i++, p+=5)
-       *p=(png_byte)keep;
-    png_ptr->num_chunk_list=old_num_chunks+num_chunks;
-    png_ptr->chunk_list=new_list;
-#ifdef PNG_FREE_ME_SUPPORTED
-    png_ptr->free_me |= PNG_FREE_LIST;
-#endif
-}
-#endif
-
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-void PNGAPI
-png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
-   png_user_chunk_ptr read_user_chunk_fn)
-{
-   png_debug(1, "in png_set_read_user_chunk_fn\n");
-   png_ptr->read_user_chunk_fn = read_user_chunk_fn;
-   png_ptr->user_chunk_ptr = user_chunk_ptr;
-}
-#endif
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-void PNGAPI
-png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
-{
-   png_debug1(1, "in %s storage function\n", "rows");
-
-   if (png_ptr == NULL || info_ptr == NULL)
-      return;
-
-   if(info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
-      png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
-   info_ptr->row_pointers = row_pointers;
-   if(row_pointers)
-      info_ptr->valid |= PNG_INFO_IDAT;
-}
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-void PNGAPI
-png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size)
-{
-    if(png_ptr->zbuf)
-       png_free(png_ptr, png_ptr->zbuf);
-    png_ptr->zbuf_size = (png_size_t)size;
-    png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size);
-    png_ptr->zstream.next_out = png_ptr->zbuf;
-    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-}
-#endif
-
-void PNGAPI
-png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
-{
-   if (png_ptr && info_ptr)
-      info_ptr->valid &= ~(mask);
-}
-
-
-#ifndef PNG_1_0_X
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-/* this function was added to libpng 1.2.0 and should always exist by default */
-void PNGAPI
-png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
-{
-    png_uint_32 settable_asm_flags;
-    png_uint_32 settable_mmx_flags;
-
-    settable_mmx_flags =
-#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
-                         PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  |
-#endif
-#ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
-                         PNG_ASM_FLAG_MMX_READ_INTERLACE    |
-#endif
-#ifdef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
-                         PNG_ASM_FLAG_MMX_READ_FILTER_SUB   |
-                         PNG_ASM_FLAG_MMX_READ_FILTER_UP    |
-                         PNG_ASM_FLAG_MMX_READ_FILTER_AVG   |
-                         PNG_ASM_FLAG_MMX_READ_FILTER_PAETH |
-#endif
-                         0;
-
-    /* could be some non-MMX ones in the future, but not currently: */
-    settable_asm_flags = settable_mmx_flags;
-
-    if (!(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) ||
-        !(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU))
-    {
-        /* clear all MMX flags if MMX isn't supported */
-        settable_asm_flags &= ~settable_mmx_flags;
-        png_ptr->asm_flags &= ~settable_mmx_flags;
-    }
-
-    /* we're replacing the settable bits with those passed in by the user,
-     * so first zero them out of the master copy, then logical-OR in the
-     * allowed subset that was requested */
-
-    png_ptr->asm_flags &= ~settable_asm_flags;               /* zero them */
-    png_ptr->asm_flags |= (asm_flags & settable_asm_flags);  /* set them */
-}
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
-
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-/* this function was added to libpng 1.2.0 */
-void PNGAPI
-png_set_mmx_thresholds (png_structp png_ptr,
-                        png_byte mmx_bitdepth_threshold,
-                        png_uint_32 mmx_rowbytes_threshold)
-{
-    png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold;
-    png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold;
-}
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
-
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-/* this function was added to libpng 1.2.6 */
-void PNGAPI
-png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
-    png_uint_32 user_height_max)
-{
-    /* Images with dimensions larger than these limits will be
-     * rejected by png_set_IHDR().  To accept any PNG datastream
-     * regardless of dimensions, set both limits to 0x7ffffffL.
-     */
-    png_ptr->user_width_max = user_width_max;
-    png_ptr->user_height_max = user_height_max;
-}
-#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
-
-#endif /* ?PNG_1_0_X */
diff --git a/tkimg1.3/libpng/pngtest.c b/tkimg1.3/libpng/pngtest.c
deleted file mode 100644
index 2f3ff81..0000000
--- a/tkimg1.3/libpng/pngtest.c
+++ /dev/null
@@ -1,1558 +0,0 @@
-
-/* pngtest.c - a simple test program to test libpng
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This program reads in a PNG image, writes it out again, and then
- * compares the two files.  If the files are identical, this shows that
- * the basic chunk handling, filtering, and (de)compression code is working
- * properly.  It does not currently test all of the transforms, although
- * it probably should.
- *
- * The program will report "FAIL" in certain legitimate cases:
- * 1) when the compression level or filter selection method is changed.
- * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192.
- * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks
- *    exist in the input file.
- * 4) others not listed here...
- * In these cases, it is best to check with another tool such as "pngcheck"
- * to see what the differences between the two files are.
- *
- * If a filename is given on the command-line, then this file is used
- * for the input, rather than the default "pngtest.png".  This allows
- * testing a wide variety of files easily.  You can also test a number
- * of files at once by typing "pngtest -m file1.png file2.png ..."
- */
-
-#include "png.h"
-
-#if defined(_WIN32_WCE)
-#  if _WIN32_WCE < 211
-     __error__ (f|w)printf functions are not supported on old WindowsCE.;
-#  endif
-#  include <windows.h>
-#  include <stdlib.h>
-#  define READFILE(file, data, length, check) \
-     if (ReadFile(file, data, length, &check,NULL)) check = 0
-#  define WRITEFILE(file, data, length, check)) \
-     if (WriteFile(file, data, length, &check, NULL)) check = 0
-#  define FCLOSE(file) CloseHandle(file)
-#else
-#  include <stdio.h>
-#  include <stdlib.h>
-#  include <assert.h>
-#  define READFILE(file, data, length, check) \
-     check=(png_size_t)fread(data,(png_size_t)1,length,file)
-#  define WRITEFILE(file, data, length, check) \
-     check=(png_size_t)fwrite(data,(png_size_t)1, length, file)
-#  define FCLOSE(file) fclose(file)
-#endif
-
-#if defined(PNG_NO_STDIO)
-#  if defined(_WIN32_WCE)
-     typedef HANDLE                png_FILE_p;
-#  else
-     typedef FILE                * png_FILE_p;
-#  endif
-#endif
-
-/* Makes pngtest verbose so we can find problems (needs to be before png.h) */
-#ifndef PNG_DEBUG
-#  define PNG_DEBUG 0
-#endif
-
-#if !PNG_DEBUG
-#  define SINGLE_ROWBUF_ALLOC  /* makes buffer overruns easier to nail */
-#endif
-
-/* Turn on CPU timing
-#define PNGTEST_TIMING
-*/
-
-#ifdef PNG_NO_FLOATING_POINT_SUPPORTED
-#undef PNGTEST_TIMING
-#endif
-
-#ifdef PNGTEST_TIMING
-static float t_start, t_stop, t_decode, t_encode, t_misc;
-#include <time.h>
-#endif
-
-/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
-#ifndef png_jmpbuf
-#  define png_jmpbuf(png_ptr) png_ptr->jmpbuf
-#endif
-
-#ifdef PNGTEST_TIMING
-static float t_start, t_stop, t_decode, t_encode, t_misc;
-#if !defined(PNG_tIME_SUPPORTED)
-#include <time.h>
-#endif
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-static int tIME_chunk_present=0;
-static char tIME_string[30] = "no tIME chunk present in file";
-#endif
-
-static int verbose = 0;
-
-int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));
-
-#ifdef __TURBOC__
-#include <mem.h>
-#endif
-
-/* defined so I can write to a file on gui/windowing platforms */
-/*  #define STDERR stderr  */
-#define STDERR stdout   /* for DOS */
-
-/* example of using row callbacks to make a simple progress meter */
-static int status_pass=1;
-static int status_dots_requested=0;
-static int status_dots=1;
-
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
-{
-    if(png_ptr == NULL || row_number > PNG_UINT_31_MAX) return;
-    if(status_pass != pass)
-    {
-       fprintf(stdout,"\n Pass %d: ",pass);
-       status_pass = pass;
-       status_dots = 31;
-    }
-    status_dots--;
-    if(status_dots == 0)
-    {
-       fprintf(stdout, "\n         ");
-       status_dots=30;
-    }
-    fprintf(stdout, "r");
-}
-
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
-{
-    if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return;
-    fprintf(stdout, "w");
-}
-
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-/* Example of using user transform callback (we don't transform anything,
-   but merely examine the row filters.  We set this to 256 rather than
-   5 in case illegal filter values are present.) */
-static png_uint_32 filters_used[256];
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
-{
-    if(png_ptr != NULL && row_info != NULL)
-      ++filters_used[*(data-1)];
-}
-#endif
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-/* example of using user transform callback (we don't transform anything,
-   but merely count the zero samples) */
-
-static png_uint_32 zero_samples;
-
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);
-void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
-count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
-{
-   png_bytep dp = data;
-   if(png_ptr == NULL)return;
-
-   /* contents of row_info:
-    *  png_uint_32 width      width of row
-    *  png_uint_32 rowbytes   number of bytes in row
-    *  png_byte color_type    color type of pixels
-    *  png_byte bit_depth     bit depth of samples
-    *  png_byte channels      number of channels (1-4)
-    *  png_byte pixel_depth   bits per pixel (depth*channels)
-    */
-
-
-    /* counts the number of zero samples (or zero pixels if color_type is 3 */
-
-    if(row_info->color_type == 0 || row_info->color_type == 3)
-    {
-       int pos=0;
-       png_uint_32 n, nstop;
-       for (n=0, nstop=row_info->width; n<nstop; n++)
-       {
-          if(row_info->bit_depth == 1)
-          {
-             if(((*dp << pos++ ) & 0x80) == 0) zero_samples++;
-             if(pos == 8)
-             {
-                pos = 0;
-                dp++;
-             }
-          }
-          if(row_info->bit_depth == 2)
-          {
-             if(((*dp << (pos+=2)) & 0xc0) == 0) zero_samples++;
-             if(pos == 8)
-             {
-                pos = 0;
-                dp++;
-             }
-          }
-          if(row_info->bit_depth == 4)
-          {
-             if(((*dp << (pos+=4)) & 0xf0) == 0) zero_samples++;
-             if(pos == 8)
-             {
-                pos = 0;
-                dp++;
-             }
-          }
-          if(row_info->bit_depth == 8)
-             if(*dp++ == 0) zero_samples++;
-          if(row_info->bit_depth == 16)
-          {
-             if((*dp | *(dp+1)) == 0) zero_samples++;
-             dp+=2;
-          }
-       }
-    }
-    else /* other color types */
-    {
-       png_uint_32 n, nstop;
-       int channel;
-       int color_channels = row_info->channels;
-       if(row_info->color_type > 3)color_channels--;
-
-       for (n=0, nstop=row_info->width; n<nstop; n++)
-       {
-          for (channel = 0; channel < color_channels; channel++)
-          {
-             if(row_info->bit_depth == 8)
-                if(*dp++ == 0) zero_samples++;
-             if(row_info->bit_depth == 16)
-             {
-                if((*dp | *(dp+1)) == 0) zero_samples++;
-                dp+=2;
-             }
-          }
-          if(row_info->color_type > 3)
-          {
-             dp++;
-             if(row_info->bit_depth == 16)dp++;
-          }
-       }
-    }
-}
-#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */
-
-static int wrote_question = 0;
-
-#if defined(PNG_NO_STDIO)
-/* START of code to validate stdio-free compilation */
-/* These copies of the default read/write functions come from pngrio.c and */
-/* pngwio.c.  They allow "don't include stdio" testing of the library. */
-/* This is the function that does the actual reading of data.  If you are
-   not reading from a standard C stream, you should create a replacement
-   read_data function and use it at run time with png_set_read_fn(), rather
-   than changing the library. */
-
-#ifndef USE_FAR_KEYWORD
-static void
-pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_size_t check;
-
-   /* fread() returns 0 on error, so it is OK to store this in a png_size_t
-    * instead of an int, which is what fread() actually returns.
-    */
-   READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
-
-   if (check != length)
-   {
-      png_error(png_ptr, "Read Error!");
-   }
-}
-#else
-/* this is the model-independent version. Since the standard I/O library
-   can't handle far buffers in the medium and small models, we have to copy
-   the data.
-*/
-
-#define NEAR_BUF_SIZE 1024
-#define MIN(a,b) (a <= b ? a : b)
-
-static void
-pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   int check;
-   png_byte *n_data;
-   png_FILE_p io_ptr;
-
-   /* Check if data really is near. If so, use usual code. */
-   n_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
-   if ((png_bytep)n_data == data)
-   {
-      READFILE(io_ptr, n_data, length, check);
-   }
-   else
-   {
-      png_byte buf[NEAR_BUF_SIZE];
-      png_size_t read, remaining, err;
-      check = 0;
-      remaining = length;
-      do
-      {
-         read = MIN(NEAR_BUF_SIZE, remaining);
-         READFILE(io_ptr, buf, 1, err);
-         png_memcpy(data, buf, read); /* copy far buffer to near buffer */
-         if(err != read)
-            break;
-         else
-            check += err;
-         data += read;
-         remaining -= read;
-      }
-      while (remaining != 0);
-   }
-   if (check != length)
-   {
-      png_error(png_ptr, "read Error");
-   }
-}
-#endif /* USE_FAR_KEYWORD */
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-static void
-pngtest_flush(png_structp png_ptr)
-{
-#if !defined(_WIN32_WCE)
-   png_FILE_p io_ptr;
-   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
-   if (io_ptr != NULL)
-      fflush(io_ptr);
-#endif
-}
-#endif
-
-/* This is the function that does the actual writing of data.  If you are
-   not writing to a standard C stream, you should create a replacement
-   write_data function and use it at run time with png_set_write_fn(), rather
-   than changing the library. */
-#ifndef USE_FAR_KEYWORD
-static void
-pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_uint_32 check;
-
-   WRITEFILE((png_FILE_p)png_ptr->io_ptr,  data, length, check);
-   if (check != length)
-   {
-      png_error(png_ptr, "Write Error");
-   }
-}
-#else
-/* this is the model-independent version. Since the standard I/O library
-   can't handle far buffers in the medium and small models, we have to copy
-   the data.
-*/
-
-#define NEAR_BUF_SIZE 1024
-#define MIN(a,b) (a <= b ? a : b)
-
-static void
-pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_uint_32 check;
-   png_byte *near_data;  /* Needs to be "png_byte *" instead of "png_bytep" */
-   png_FILE_p io_ptr;
-
-   /* Check if data really is near. If so, use usual code. */
-   near_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
-   if ((png_bytep)near_data == data)
-   {
-      WRITEFILE(io_ptr, near_data, length, check);
-   }
-   else
-   {
-      png_byte buf[NEAR_BUF_SIZE];
-      png_size_t written, remaining, err;
-      check = 0;
-      remaining = length;
-      do
-      {
-         written = MIN(NEAR_BUF_SIZE, remaining);
-         png_memcpy(buf, data, written); /* copy far buffer to near buffer */
-         WRITEFILE(io_ptr, buf, written, err);
-         if (err != written)
-            break;
-         else
-            check += err;
-         data += written;
-         remaining -= written;
-      }
-      while (remaining != 0);
-   }
-   if (check != length)
-   {
-      png_error(png_ptr, "Write Error");
-   }
-}
-
-#endif /* USE_FAR_KEYWORD */
-
-/* This function is called when there is a warning, but the library thinks
- * it can continue anyway.  Replacement functions don't have to do anything
- * here if you don't want to.  In the default configuration, png_ptr is
- * not used, but it is passed in case it may be useful.
- */
-static void
-pngtest_warning(png_structp png_ptr, png_const_charp message)
-{
-   PNG_CONST char *name = "UNKNOWN (ERROR!)";
-   if (png_ptr != NULL && png_ptr->error_ptr != NULL)
-      name = png_ptr->error_ptr;
-   fprintf(STDERR, "%s: libpng warning: %s\n", name, message);
-}
-
-/* This is the default error handling function.  Note that replacements for
- * this function MUST NOT RETURN, or the program will likely crash.  This
- * function is used by default, or if the program supplies NULL for the
- * error function pointer in png_set_error_fn().
- */
-static void
-pngtest_error(png_structp png_ptr, png_const_charp message)
-{
-   pngtest_warning(png_ptr, message);
-   /* We can return because png_error calls the default handler, which is
-    * actually OK in this case. */
-}
-#endif /* PNG_NO_STDIO */
-/* END of code to validate stdio-free compilation */
-
-/* START of code to validate memory allocation and deallocation */
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-
-/* Allocate memory.  For reasonable files, size should never exceed
-   64K.  However, zlib may allocate more then 64K if you don't tell
-   it not to.  See zconf.h and png.h for more information.  zlib does
-   need to allocate exactly 64K, so whatever you call here must
-   have the ability to do that.
-
-   This piece of code can be compiled to validate max 64K allocations
-   by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */
-typedef struct memory_information
-{
-   png_uint_32               size;
-   png_voidp                 pointer;
-   struct memory_information FAR *next;
-} memory_information;
-typedef memory_information FAR *memory_infop;
-
-static memory_infop pinformation = NULL;
-static int current_allocation = 0;
-static int maximum_allocation = 0;
-static int total_allocation = 0;
-static int num_allocations = 0;
-
-png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size));
-void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
-
-png_voidp
-png_debug_malloc(png_structp png_ptr, png_uint_32 size)
-{
-
-   /* png_malloc has already tested for NULL; png_create_struct calls
-      png_debug_malloc directly, with png_ptr == NULL which is OK */
-
-   if (size == 0)
-      return (NULL);
-
-   /* This calls the library allocator twice, once to get the requested
-      buffer and once to get a new free list entry. */
-   {
-      /* Disable malloc_fn and free_fn */
-      memory_infop pinfo;
-      png_set_mem_fn(png_ptr, NULL, NULL, NULL);
-      pinfo = (memory_infop)png_malloc(png_ptr,
-         (png_uint_32)png_sizeof (*pinfo));
-      pinfo->size = size;
-      current_allocation += size;
-      total_allocation += size;
-      num_allocations ++;
-      if (current_allocation > maximum_allocation)
-         maximum_allocation = current_allocation;
-      pinfo->pointer = (png_voidp)png_malloc(png_ptr, size);
-      /* Restore malloc_fn and free_fn */
-      png_set_mem_fn(png_ptr, png_voidp_NULL, (png_malloc_ptr)png_debug_malloc,
-         (png_free_ptr)png_debug_free);
-      if (size != 0 && pinfo->pointer == NULL)
-      {
-         current_allocation -= size;
-         total_allocation -= size;
-         png_error(png_ptr,
-           "out of memory in pngtest->png_debug_malloc.");
-      }
-      pinfo->next = pinformation;
-      pinformation = pinfo;
-      /* Make sure the caller isn't assuming zeroed memory. */
-      png_memset(pinfo->pointer, 0xdd, pinfo->size);
-#if PNG_DEBUG
-      if(verbose)
-         printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer);
-#endif
-      assert(pinfo->size != 12345678);
-      return (png_voidp)(pinfo->pointer);
-   }
-}
-
-/* Free a pointer.  It is removed from the list at the same time. */
-void
-png_debug_free(png_structp png_ptr, png_voidp ptr)
-{
-   if (png_ptr == NULL)
-      fprintf(STDERR, "NULL pointer to png_debug_free.\n");
-   if (ptr == 0)
-   {
-#if 0 /* This happens all the time. */
-      fprintf(STDERR, "WARNING: freeing NULL pointer\n");
-#endif
-      return;
-   }
-
-   /* Unlink the element from the list. */
-   {
-      memory_infop FAR *ppinfo = &pinformation;
-      for (;;)
-      {
-         memory_infop pinfo = *ppinfo;
-         if (pinfo->pointer == ptr)
-         {
-            *ppinfo = pinfo->next;
-            current_allocation -= pinfo->size;
-            if (current_allocation < 0)
-               fprintf(STDERR, "Duplicate free of memory\n");
-            /* We must free the list element too, but first kill
-               the memory that is to be freed. */
-            png_memset(ptr, 0x55, pinfo->size);
-            png_free_default(png_ptr, pinfo);
-            pinfo=NULL;
-            break;
-         }
-         if (pinfo->next == NULL)
-         {
-            fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr);
-            break;
-         }
-         ppinfo = &pinfo->next;
-      }
-   }
-
-   /* Finally free the data. */
-#if PNG_DEBUG
-   if(verbose)
-      printf("Freeing %x\n",ptr);
-#endif
-   png_free_default(png_ptr, ptr);
-   ptr=NULL;
-}
-#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
-/* END of code to test memory allocation/deallocation */
-
-/* Test one file */
-int
-test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
-{
-   static png_FILE_p fpin;
-   static png_FILE_p fpout;  /* "static" prevents setjmp corruption */
-   png_structp read_ptr;
-   png_infop read_info_ptr, end_info_ptr;
-#ifdef PNG_WRITE_SUPPORTED
-   png_structp write_ptr;
-   png_infop write_info_ptr;
-   png_infop write_end_info_ptr;
-#else
-   png_structp write_ptr = NULL;
-   png_infop write_info_ptr = NULL;
-   png_infop write_end_info_ptr = NULL;
-#endif
-   png_bytep row_buf;
-   png_uint_32 y;
-   png_uint_32 width, height;
-   int num_pass, pass;
-   int bit_depth, color_type;
-#ifdef PNG_SETJMP_SUPPORTED
-#ifdef USE_FAR_KEYWORD
-   jmp_buf jmpbuf;
-#endif
-#endif
-
-#if defined(_WIN32_WCE)
-   TCHAR path[MAX_PATH];
-#endif
-   char inbuf[256], outbuf[256];
-
-   row_buf = NULL;
-
-#if defined(_WIN32_WCE)
-   MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
-   if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
-   if ((fpin = fopen(inname, "rb")) == NULL)
-#endif
-   {
-      fprintf(STDERR, "Could not find input file %s\n", inname);
-      return (1);
-   }
-
-#if defined(_WIN32_WCE)
-   MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
-   if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
-   if ((fpout = fopen(outname, "wb")) == NULL)
-#endif
-   {
-      fprintf(STDERR, "Could not open output file %s\n", outname);
-      FCLOSE(fpin);
-      return (1);
-   }
-
-   png_debug(0, "Allocating read and write structures\n");
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-   read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
-      (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
-#else
-   read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-      png_error_ptr_NULL, png_error_ptr_NULL);
-#endif
-#if defined(PNG_NO_STDIO)
-   png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error,
-       pngtest_warning);
-#endif
-#ifdef PNG_WRITE_SUPPORTED
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-   write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
-      (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
-#else
-   write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
-      png_error_ptr_NULL, png_error_ptr_NULL);
-#endif
-#if defined(PNG_NO_STDIO)
-   png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error,
-       pngtest_warning);
-#endif
-#endif
-   png_debug(0, "Allocating read_info, write_info and end_info structures\n");
-   read_info_ptr = png_create_info_struct(read_ptr);
-   end_info_ptr = png_create_info_struct(read_ptr);
-#ifdef PNG_WRITE_SUPPORTED
-   write_info_ptr = png_create_info_struct(write_ptr);
-   write_end_info_ptr = png_create_info_struct(write_ptr);
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-   png_debug(0, "Setting jmpbuf for read struct\n");
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-#else
-   if (setjmp(png_jmpbuf(read_ptr)))
-#endif
-   {
-      fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname);
-      if (row_buf)
-         png_free(read_ptr, row_buf);
-      png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
-#ifdef PNG_WRITE_SUPPORTED
-      png_destroy_info_struct(write_ptr, &write_end_info_ptr);
-      png_destroy_write_struct(&write_ptr, &write_info_ptr);
-#endif
-      FCLOSE(fpin);
-      FCLOSE(fpout);
-      return (1);
-   }
-#ifdef USE_FAR_KEYWORD
-   png_memcpy(png_jmpbuf(read_ptr),jmpbuf,png_sizeof(jmp_buf));
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-   png_debug(0, "Setting jmpbuf for write struct\n");
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-#else
-   if (setjmp(png_jmpbuf(write_ptr)))
-#endif
-   {
-      fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname);
-      png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
-      png_destroy_info_struct(write_ptr, &write_end_info_ptr);
-#ifdef PNG_WRITE_SUPPORTED
-      png_destroy_write_struct(&write_ptr, &write_info_ptr);
-#endif
-      FCLOSE(fpin);
-      FCLOSE(fpout);
-      return (1);
-   }
-#ifdef USE_FAR_KEYWORD
-   png_memcpy(png_jmpbuf(write_ptr),jmpbuf,png_sizeof(jmp_buf));
-#endif
-#endif
-#endif
-
-   png_debug(0, "Initializing input and output streams\n");
-#if !defined(PNG_NO_STDIO)
-   png_init_io(read_ptr, fpin);
-#  ifdef PNG_WRITE_SUPPORTED
-   png_init_io(write_ptr, fpout);
-#  endif
-#else
-   png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data);
-#  ifdef PNG_WRITE_SUPPORTED
-   png_set_write_fn(write_ptr, (png_voidp)fpout,  pngtest_write_data,
-#    if defined(PNG_WRITE_FLUSH_SUPPORTED)
-      pngtest_flush);
-#    else
-      NULL);
-#    endif
-#  endif
-#endif
-   if(status_dots_requested == 1)
-   {
-#ifdef PNG_WRITE_SUPPORTED
-      png_set_write_status_fn(write_ptr, write_row_callback);
-#endif
-      png_set_read_status_fn(read_ptr, read_row_callback);
-   }
-   else
-   {
-#ifdef PNG_WRITE_SUPPORTED
-      png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL);
-#endif
-      png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL);
-   }
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   {
-     int i;
-     for(i=0; i<256; i++)
-        filters_used[i]=0;
-     png_set_read_user_transform_fn(read_ptr, count_filters);
-   }
-#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   zero_samples=0;
-   png_set_write_user_transform_fn(write_ptr, count_zero_samples);
-#endif
-
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-#  ifndef PNG_HANDLE_CHUNK_ALWAYS
-#    define PNG_HANDLE_CHUNK_ALWAYS       3
-#  endif
-   png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS,
-      png_bytep_NULL, 0);
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-#  ifndef PNG_HANDLE_CHUNK_IF_SAFE
-#    define PNG_HANDLE_CHUNK_IF_SAFE      2
-#  endif
-   png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_IF_SAFE,
-      png_bytep_NULL, 0);
-#endif
-
-   png_debug(0, "Reading info struct\n");
-   png_read_info(read_ptr, read_info_ptr);
-
-   png_debug(0, "Transferring info struct\n");
-   {
-      int interlace_type, compression_type, filter_type;
-
-      if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth,
-          &color_type, &interlace_type, &compression_type, &filter_type))
-      {
-         png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-            color_type, interlace_type, compression_type, filter_type);
-#else
-            color_type, PNG_INTERLACE_NONE, compression_type, filter_type);
-#endif
-      }
-   }
-#if defined(PNG_FIXED_POINT_SUPPORTED)
-#if defined(PNG_cHRM_SUPPORTED)
-   {
-      png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
-         blue_y;
-      if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
-         &red_y, &green_x, &green_y, &blue_x, &blue_y))
-      {
-         png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x,
-            red_y, green_x, green_y, blue_x, blue_y);
-      }
-   }
-#endif
-#if defined(PNG_gAMA_SUPPORTED)
-   {
-      png_fixed_point gamma;
-
-      if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma))
-      {
-         png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma);
-      }
-   }
-#endif
-#else /* Use floating point versions */
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-#if defined(PNG_cHRM_SUPPORTED)
-   {
-      double white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
-         blue_y;
-      if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
-         &red_y, &green_x, &green_y, &blue_x, &blue_y))
-      {
-         png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x,
-            red_y, green_x, green_y, blue_x, blue_y);
-      }
-   }
-#endif
-#if defined(PNG_gAMA_SUPPORTED)
-   {
-      double gamma;
-
-      if (png_get_gAMA(read_ptr, read_info_ptr, &gamma))
-      {
-         png_set_gAMA(write_ptr, write_info_ptr, gamma);
-      }
-   }
-#endif
-#endif /* floating point */
-#endif /* fixed point */
-#if defined(PNG_iCCP_SUPPORTED)
-   {
-      png_charp name;
-      png_charp profile;
-      png_uint_32 proflen;
-      int compression_type;
-
-      if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type,
-                      &profile, &proflen))
-      {
-         png_set_iCCP(write_ptr, write_info_ptr, name, compression_type,
-                      profile, proflen);
-      }
-   }
-#endif
-#if defined(PNG_sRGB_SUPPORTED)
-   {
-      int intent;
-
-      if (png_get_sRGB(read_ptr, read_info_ptr, &intent))
-      {
-         png_set_sRGB(write_ptr, write_info_ptr, intent);
-      }
-   }
-#endif
-   {
-      png_colorp palette;
-      int num_palette;
-
-      if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette))
-      {
-         png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette);
-      }
-   }
-#if defined(PNG_bKGD_SUPPORTED)
-   {
-      png_color_16p background;
-
-      if (png_get_bKGD(read_ptr, read_info_ptr, &background))
-      {
-         png_set_bKGD(write_ptr, write_info_ptr, background);
-      }
-   }
-#endif
-#if defined(PNG_hIST_SUPPORTED)
-   {
-      png_uint_16p hist;
-
-      if (png_get_hIST(read_ptr, read_info_ptr, &hist))
-      {
-         png_set_hIST(write_ptr, write_info_ptr, hist);
-      }
-   }
-#endif
-#if defined(PNG_oFFs_SUPPORTED)
-   {
-      png_int_32 offset_x, offset_y;
-      int unit_type;
-
-      if (png_get_oFFs(read_ptr, read_info_ptr,&offset_x,&offset_y,&unit_type))
-      {
-         png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type);
-      }
-   }
-#endif
-#if defined(PNG_pCAL_SUPPORTED)
-   {
-      png_charp purpose, units;
-      png_charpp params;
-      png_int_32 X0, X1;
-      int type, nparams;
-
-      if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type,
-         &nparams, &units, &params))
-      {
-         png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type,
-            nparams, units, params);
-      }
-   }
-#endif
-#if defined(PNG_pHYs_SUPPORTED)
-   {
-      png_uint_32 res_x, res_y;
-      int unit_type;
-
-      if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type))
-      {
-         png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type);
-      }
-   }
-#endif
-#if defined(PNG_sBIT_SUPPORTED)
-   {
-      png_color_8p sig_bit;
-
-      if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit))
-      {
-         png_set_sBIT(write_ptr, write_info_ptr, sig_bit);
-      }
-   }
-#endif
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   {
-      int unit;
-      double scal_width, scal_height;
-
-      if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width,
-         &scal_height))
-      {
-         png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height);
-      }
-   }
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   {
-      int unit;
-      png_charp scal_width, scal_height;
-
-      if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width,
-          &scal_height))
-      {
-         png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height);
-      }
-   }
-#endif
-#endif
-#endif
-#if defined(PNG_TEXT_SUPPORTED)
-   {
-      png_textp text_ptr;
-      int num_text;
-
-      if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)
-      {
-         png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text);
-         png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);
-      }
-   }
-#endif
-#if defined(PNG_tIME_SUPPORTED)
-   {
-      png_timep mod_time;
-
-      if (png_get_tIME(read_ptr, read_info_ptr, &mod_time))
-      {
-         png_set_tIME(write_ptr, write_info_ptr, mod_time);
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-         /* we have to use png_strcpy instead of "=" because the string
-            pointed to by png_convert_to_rfc1123() gets free'ed before
-            we use it */
-         png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time));
-         tIME_chunk_present++;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-      }
-   }
-#endif
-#if defined(PNG_tRNS_SUPPORTED)
-   {
-      png_bytep trans;
-      int num_trans;
-      png_color_16p trans_values;
-
-      if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
-         &trans_values))
-      {
-         png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans,
-            trans_values);
-      }
-   }
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   {
-      png_unknown_chunkp unknowns;
-      int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr,
-         &unknowns);
-      if (num_unknowns)
-      {
-         png_size_t i;
-         png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,
-           num_unknowns);
-         /* copy the locations from the read_info_ptr.  The automatically
-            generated locations in write_info_ptr are wrong because we
-            haven't written anything yet */
-         for (i = 0; i < (png_size_t)num_unknowns; i++)
-           png_set_unknown_chunk_location(write_ptr, write_info_ptr, i,
-             unknowns[i].location);
-      }
-   }
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-   png_debug(0, "\nWriting info struct\n");
-
-/* If we wanted, we could write info in two steps:
-   png_write_info_before_PLTE(write_ptr, write_info_ptr);
- */
-   png_write_info(write_ptr, write_info_ptr);
-#endif
-
-#ifdef SINGLE_ROWBUF_ALLOC
-   png_debug(0, "\nAllocating row buffer...");
-   row_buf = (png_bytep)png_malloc(read_ptr,
-      png_get_rowbytes(read_ptr, read_info_ptr));
-   png_debug1(0, "0x%08lx\n\n", (unsigned long)row_buf);
-#endif /* SINGLE_ROWBUF_ALLOC */
-   png_debug(0, "Writing row data\n");
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
-  defined(PNG_WRITE_INTERLACING_SUPPORTED)
-   num_pass = png_set_interlace_handling(read_ptr);
-#  ifdef PNG_WRITE_SUPPORTED
-   png_set_interlace_handling(write_ptr);
-#  endif
-#else
-   num_pass=1;
-#endif
-
-#ifdef PNGTEST_TIMING
-   t_stop = (float)clock();
-   t_misc += (t_stop - t_start);
-   t_start = t_stop;
-#endif
-   for (pass = 0; pass < num_pass; pass++)
-   {
-      png_debug1(0, "Writing row data for pass %d\n",pass);
-      for (y = 0; y < height; y++)
-      {
-#ifndef SINGLE_ROWBUF_ALLOC
-         png_debug2(0, "\nAllocating row buffer (pass %d, y = %ld)...", pass,y);
-         row_buf = (png_bytep)png_malloc(read_ptr,
-            png_get_rowbytes(read_ptr, read_info_ptr));
-         png_debug2(0, "0x%08lx (%ld bytes)\n", (unsigned long)row_buf,
-            png_get_rowbytes(read_ptr, read_info_ptr));
-#endif /* !SINGLE_ROWBUF_ALLOC */
-         png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1);
-
-#ifdef PNG_WRITE_SUPPORTED
-#ifdef PNGTEST_TIMING
-         t_stop = (float)clock();
-         t_decode += (t_stop - t_start);
-         t_start = t_stop;
-#endif
-         png_write_rows(write_ptr, (png_bytepp)&row_buf, 1);
-#ifdef PNGTEST_TIMING
-         t_stop = (float)clock();
-         t_encode += (t_stop - t_start);
-         t_start = t_stop;
-#endif
-#endif /* PNG_WRITE_SUPPORTED */
-
-#ifndef SINGLE_ROWBUF_ALLOC
-         png_debug2(0, "Freeing row buffer (pass %d, y = %ld)\n\n", pass, y);
-         png_free(read_ptr, row_buf);
-#endif /* !SINGLE_ROWBUF_ALLOC */
-      }
-   }
-
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-   png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1);
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);
-#endif
-
-   png_debug(0, "Reading and writing end_info data\n");
-
-   png_read_end(read_ptr, end_info_ptr);
-#if defined(PNG_TEXT_SUPPORTED)
-   {
-      png_textp text_ptr;
-      int num_text;
-
-      if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0)
-      {
-         png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text);
-         png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text);
-      }
-   }
-#endif
-#if defined(PNG_tIME_SUPPORTED)
-   {
-      png_timep mod_time;
-
-      if (png_get_tIME(read_ptr, end_info_ptr, &mod_time))
-      {
-         png_set_tIME(write_ptr, write_end_info_ptr, mod_time);
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-         /* we have to use png_strcpy instead of "=" because the string
-            pointed to by png_convert_to_rfc1123() gets free'ed before
-            we use it */
-         png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time));
-         tIME_chunk_present++;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-      }
-   }
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   {
-      png_unknown_chunkp unknowns;
-      int num_unknowns;
-      num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr,
-         &unknowns);
-      if (num_unknowns)
-      {
-         png_size_t i;
-         png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,
-           num_unknowns);
-         /* copy the locations from the read_info_ptr.  The automatically
-            generated locations in write_end_info_ptr are wrong because we
-            haven't written the end_info yet */
-         for (i = 0; i < (png_size_t)num_unknowns; i++)
-           png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i,
-             unknowns[i].location);
-      }
-   }
-#endif
-#ifdef PNG_WRITE_SUPPORTED
-   png_write_end(write_ptr, write_end_info_ptr);
-#endif
-
-#ifdef PNG_EASY_ACCESS_SUPPORTED
-   if(verbose)
-   {
-      png_uint_32 iwidth, iheight;
-      iwidth = png_get_image_width(write_ptr, write_info_ptr);
-      iheight = png_get_image_height(write_ptr, write_info_ptr);
-      fprintf(STDERR, "Image width = %lu, height = %lu\n",
-         iwidth, iheight);
-   }
-#endif
-
-   png_debug(0, "Destroying data structs\n");
-#ifdef SINGLE_ROWBUF_ALLOC
-   png_debug(1, "destroying row_buf for read_ptr\n");
-   png_free(read_ptr, row_buf);
-   row_buf=NULL;
-#endif /* SINGLE_ROWBUF_ALLOC */
-   png_debug(1, "destroying read_ptr, read_info_ptr, end_info_ptr\n");
-   png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
-#ifdef PNG_WRITE_SUPPORTED
-   png_debug(1, "destroying write_end_info_ptr\n");
-   png_destroy_info_struct(write_ptr, &write_end_info_ptr);
-   png_debug(1, "destroying write_ptr, write_info_ptr\n");
-   png_destroy_write_struct(&write_ptr, &write_info_ptr);
-#endif
-   png_debug(0, "Destruction complete.\n");
-
-   FCLOSE(fpin);
-   FCLOSE(fpout);
-
-   png_debug(0, "Opening files for comparison\n");
-#if defined(_WIN32_WCE)
-   MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
-   if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
-   if ((fpin = fopen(inname, "rb")) == NULL)
-#endif
-   {
-      fprintf(STDERR, "Could not find file %s\n", inname);
-      return (1);
-   }
-
-#if defined(_WIN32_WCE)
-   MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
-   if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
-   if ((fpout = fopen(outname, "rb")) == NULL)
-#endif
-   {
-      fprintf(STDERR, "Could not find file %s\n", outname);
-      FCLOSE(fpin);
-      return (1);
-   }
-
-   for(;;)
-   {
-      png_size_t num_in, num_out;
-
-      READFILE(fpin, inbuf, 1, num_in);
-      READFILE(fpout, outbuf, 1, num_out);
-
-      if (num_in != num_out)
-      {
-         fprintf(STDERR, "\nFiles %s and %s are of a different size\n",
-                 inname, outname);
-         if(wrote_question == 0)
-         {
-            fprintf(STDERR,
-         "   Was %s written with the same maximum IDAT chunk size (%d bytes),",
-              inname,PNG_ZBUF_SIZE);
-            fprintf(STDERR,
-              "\n   filtering heuristic (libpng default), compression");
-            fprintf(STDERR,
-              " level (zlib default),\n   and zlib version (%s)?\n\n",
-              ZLIB_VERSION);
-            wrote_question=1;
-         }
-         FCLOSE(fpin);
-         FCLOSE(fpout);
-         return (0);
-      }
-
-      if (!num_in)
-         break;
-
-      if (png_memcmp(inbuf, outbuf, num_in))
-      {
-         fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname);
-         if(wrote_question == 0)
-         {
-            fprintf(STDERR,
-         "   Was %s written with the same maximum IDAT chunk size (%d bytes),",
-                 inname,PNG_ZBUF_SIZE);
-            fprintf(STDERR,
-              "\n   filtering heuristic (libpng default), compression");
-            fprintf(STDERR,
-              " level (zlib default),\n   and zlib version (%s)?\n\n",
-              ZLIB_VERSION);
-            wrote_question=1;
-         }
-         FCLOSE(fpin);
-         FCLOSE(fpout);
-         return (0);
-      }
-   }
-
-   FCLOSE(fpin);
-   FCLOSE(fpout);
-
-   return (0);
-}
-
-/* input and output filenames */
-#ifdef RISCOS
-static PNG_CONST char *inname = "pngtest/png";
-static PNG_CONST char *outname = "pngout/png";
-#else
-static PNG_CONST char *inname = "pngtest.png";
-static PNG_CONST char *outname = "pngout.png";
-#endif
-
-int
-main(int argc, char *argv[])
-{
-   int multiple = 0;
-   int ierror = 0;
-
-   fprintf(STDERR, "Testing libpng version %s\n", PNG_LIBPNG_VER_STRING);
-   fprintf(STDERR, "   with zlib   version %s\n", ZLIB_VERSION);
-   fprintf(STDERR,"%s",png_get_copyright(NULL));
-   /* Show the version of libpng used in building the library */
-   fprintf(STDERR," library (%lu):%s", png_access_version_number(),
-      png_get_header_version(NULL));
-   /* Show the version of libpng used in building the application */
-   fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
-      PNG_HEADER_VERSION_STRING);
-   fprintf(STDERR," png_sizeof(png_struct)=%ld, png_sizeof(png_info)=%ld\n",
-                    (long)png_sizeof(png_struct), (long)png_sizeof(png_info));
-
-   /* Do some consistency checking on the memory allocation settings, I'm
-      not sure this matters, but it is nice to know, the first of these
-      tests should be impossible because of the way the macros are set
-      in pngconf.h */
-#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
-      fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n");
-#endif
-   /* I think the following can happen. */
-#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K)
-      fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n");
-#endif
-
-   if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING))
-   {
-      fprintf(STDERR,
-         "Warning: versions are different between png.h and png.c\n");
-      fprintf(STDERR, "  png.h version: %s\n", PNG_LIBPNG_VER_STRING);
-      fprintf(STDERR, "  png.c version: %s\n\n", png_libpng_ver);
-      ++ierror;
-   }
-
-   if (argc > 1)
-   {
-      if (strcmp(argv[1], "-m") == 0)
-      {
-         multiple = 1;
-         status_dots_requested = 0;
-      }
-      else if (strcmp(argv[1], "-mv") == 0 ||
-               strcmp(argv[1], "-vm") == 0 )
-      {
-         multiple = 1;
-         verbose = 1;
-         status_dots_requested = 1;
-      }
-      else if (strcmp(argv[1], "-v") == 0)
-      {
-         verbose = 1;
-         status_dots_requested = 1;
-         inname = argv[2];
-      }
-      else
-      {
-         inname = argv[1];
-         status_dots_requested = 0;
-      }
-   }
-
-   if (!multiple && argc == 3+verbose)
-     outname = argv[2+verbose];
-
-   if ((!multiple && argc > 3+verbose) || (multiple && argc < 2))
-   {
-     fprintf(STDERR,
-       "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n",
-        argv[0], argv[0]);
-     fprintf(STDERR,
-       "  reads/writes one PNG file (without -m) or multiple files (-m)\n");
-     fprintf(STDERR,
-       "  with -m %s is used as a temporary file\n", outname);
-     exit(1);
-   }
-
-   if (multiple)
-   {
-      int i;
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-      int allocation_now = current_allocation;
-#endif
-      for (i=2; i<argc; ++i)
-      {
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-         int k;
-#endif
-         int kerror;
-         fprintf(STDERR, "Testing %s:",argv[i]);
-         kerror = test_one_file(argv[i], outname);
-         if (kerror == 0)
-         {
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-            fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples);
-#else
-            fprintf(STDERR, " PASS\n");
-#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-            for (k=0; k<256; k++)
-               if(filters_used[k])
-                  fprintf(STDERR, " Filter %d was used %lu times\n",
-                     k,filters_used[k]);
-#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-         if(tIME_chunk_present != 0)
-            fprintf(STDERR, " tIME = %s\n",tIME_string);
-         tIME_chunk_present = 0;
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-         }
-         else
-         {
-            fprintf(STDERR, " FAIL\n");
-            ierror += kerror;
-         }
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-         if (allocation_now != current_allocation)
-            fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
-               current_allocation-allocation_now);
-         if (current_allocation != 0)
-         {
-            memory_infop pinfo = pinformation;
-
-            fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
-               current_allocation);
-            while (pinfo != NULL)
-            {
-               fprintf(STDERR, " %lu bytes at %x\n", pinfo->size, 
-                 (unsigned int) pinfo->pointer);
-               pinfo = pinfo->next;
-            }
-         }
-#endif
-      }
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-         fprintf(STDERR, " Current memory allocation: %10d bytes\n",
-            current_allocation);
-         fprintf(STDERR, " Maximum memory allocation: %10d bytes\n",
-            maximum_allocation);
-         fprintf(STDERR, " Total   memory allocation: %10d bytes\n",
-            total_allocation);
-         fprintf(STDERR, "     Number of allocations: %10d\n",
-            num_allocations);
-#endif
-   }
-   else
-   {
-      int i;
-      for (i=0; i<3; ++i)
-      {
-         int kerror;
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-         int allocation_now = current_allocation;
-#endif
-         if (i == 1) status_dots_requested = 1;
-         else if(verbose == 0)status_dots_requested = 0;
-         if (i == 0 || verbose == 1 || ierror != 0)
-            fprintf(STDERR, "Testing %s:",inname);
-         kerror = test_one_file(inname, outname);
-         if(kerror == 0)
-         {
-            if(verbose == 1 || i == 2)
-            {
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-                int k;
-#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-                fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples);
-#else
-                fprintf(STDERR, " PASS\n");
-#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-                for (k=0; k<256; k++)
-                   if(filters_used[k])
-                      fprintf(STDERR, " Filter %d was used %lu times\n",
-                         k,filters_used[k]);
-#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-             if(tIME_chunk_present != 0)
-                fprintf(STDERR, " tIME = %s\n",tIME_string);
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-            }
-         }
-         else
-         {
-            if(verbose == 0 && i != 2)
-               fprintf(STDERR, "Testing %s:",inname);
-            fprintf(STDERR, " FAIL\n");
-            ierror += kerror;
-         }
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-         if (allocation_now != current_allocation)
-             fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
-               current_allocation-allocation_now);
-         if (current_allocation != 0)
-         {
-             memory_infop pinfo = pinformation;
-
-             fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
-                current_allocation);
-             while (pinfo != NULL)
-             {
-                fprintf(STDERR," %lu bytes at %x\n",
-                   pinfo->size, (unsigned int)pinfo->pointer);
-                pinfo = pinfo->next;
-             }
-          }
-#endif
-       }
-#if defined(PNG_USER_MEM_SUPPORTED) && defined(PNG_DEBUG)
-       fprintf(STDERR, " Current memory allocation: %10d bytes\n",
-          current_allocation);
-       fprintf(STDERR, " Maximum memory allocation: %10d bytes\n",
-          maximum_allocation);
-       fprintf(STDERR, " Total   memory allocation: %10d bytes\n",
-          total_allocation);
-       fprintf(STDERR, "     Number of allocations: %10d\n",
-            num_allocations);
-#endif
-   }
-
-#ifdef PNGTEST_TIMING
-   t_stop = (float)clock();
-   t_misc += (t_stop - t_start);
-   t_start = t_stop;
-   fprintf(STDERR," CPU time used = %.3f seconds",
-      (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC);
-   fprintf(STDERR," (decoding %.3f,\n",
-      t_decode/(float)CLOCKS_PER_SEC);
-   fprintf(STDERR,"        encoding %.3f ,",
-      t_encode/(float)CLOCKS_PER_SEC);
-   fprintf(STDERR," other %.3f seconds)\n\n",
-      t_misc/(float)CLOCKS_PER_SEC);
-#endif
-
-   if (ierror == 0)
-      fprintf(STDERR, "libpng passes test\n");
-   else
-      fprintf(STDERR, "libpng FAILS test\n");
-   return (int)(ierror != 0);
-}
-
-/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_6rc5 your_png_h_is_not_version_1_2_6rc5;
diff --git a/tkimg1.3/libpng/pngtest.png b/tkimg1.3/libpng/pngtest.png
deleted file mode 100644
index ebea081..0000000
Binary files a/tkimg1.3/libpng/pngtest.png and /dev/null differ
diff --git a/tkimg1.3/libpng/pngtrans.c b/tkimg1.3/libpng/pngtrans.c
deleted file mode 100644
index afdcd69..0000000
--- a/tkimg1.3/libpng/pngtrans.c
+++ /dev/null
@@ -1,640 +0,0 @@
-
-/* pngtrans.c - transforms the data in a row (used by both readers and writers)
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-/* turn on BGR-to-RGB mapping */
-void PNGAPI
-png_set_bgr(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_bgr\n");
-   png_ptr->transformations |= PNG_BGR;
-}
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-/* turn on 16 bit byte swapping */
-void PNGAPI
-png_set_swap(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_swap\n");
-   if (png_ptr->bit_depth == 16)
-      png_ptr->transformations |= PNG_SWAP_BYTES;
-}
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
-/* turn on pixel packing */
-void PNGAPI
-png_set_packing(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_packing\n");
-   if (png_ptr->bit_depth < 8)
-   {
-      png_ptr->transformations |= PNG_PACK;
-      png_ptr->usr_bit_depth = 8;
-   }
-}
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-/* turn on packed pixel swapping */
-void PNGAPI
-png_set_packswap(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_packswap\n");
-   if (png_ptr->bit_depth < 8)
-      png_ptr->transformations |= PNG_PACKSWAP;
-}
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
-void PNGAPI
-png_set_shift(png_structp png_ptr, png_color_8p true_bits)
-{
-   png_debug(1, "in png_set_shift\n");
-   png_ptr->transformations |= PNG_SHIFT;
-   png_ptr->shift = *true_bits;
-}
-#endif
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
-    defined(PNG_WRITE_INTERLACING_SUPPORTED)
-int PNGAPI
-png_set_interlace_handling(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_interlace handling\n");
-   if (png_ptr->interlaced)
-   {
-      png_ptr->transformations |= PNG_INTERLACE;
-      return (7);
-   }
-
-   return (1);
-}
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-/* Add a filler byte on read, or remove a filler or alpha byte on write.
- * The filler type has changed in v0.95 to allow future 2-byte fillers
- * for 48-bit input data, as well as to avoid problems with some compilers
- * that don't like bytes as parameters.
- */
-void PNGAPI
-png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
-{
-   png_debug(1, "in png_set_filler\n");
-   png_ptr->transformations |= PNG_FILLER;
-   png_ptr->filler = (png_byte)filler;
-   if (filler_loc == PNG_FILLER_AFTER)
-      png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
-   else
-      png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;
-
-   /* This should probably go in the "do_filler" routine.
-    * I attempted to do that in libpng-1.0.1a but that caused problems
-    * so I restored it in libpng-1.0.2a
-   */
-
-   if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
-   {
-      png_ptr->usr_channels = 4;
-   }
-
-   /* Also I added this in libpng-1.0.2a (what happens when we expand
-    * a less-than-8-bit grayscale to GA? */
-
-   if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)
-   {
-      png_ptr->usr_channels = 2;
-   }
-}
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-void PNGAPI
-png_set_swap_alpha(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_swap_alpha\n");
-   png_ptr->transformations |= PNG_SWAP_ALPHA;
-}
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-void PNGAPI
-png_set_invert_alpha(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_invert_alpha\n");
-   png_ptr->transformations |= PNG_INVERT_ALPHA;
-}
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-void PNGAPI
-png_set_invert_mono(png_structp png_ptr)
-{
-   png_debug(1, "in png_set_invert_mono\n");
-   png_ptr->transformations |= PNG_INVERT_MONO;
-}
-
-/* invert monochrome grayscale data */
-void /* PRIVATE */
-png_do_invert(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_invert\n");
-  /* This test removed from libpng version 1.0.13 and 1.2.0:
-   *   if (row_info->bit_depth == 1 &&
-   */
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row == NULL || row_info == NULL)
-     return;
-#endif
-   if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
-   {
-      png_bytep rp = row;
-      png_uint_32 i;
-      png_uint_32 istop = row_info->rowbytes;
-
-      for (i = 0; i < istop; i++)
-      {
-         *rp = (png_byte)(~(*rp));
-         rp++;
-      }
-   }
-   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
-      row_info->bit_depth == 8)
-   {
-      png_bytep rp = row;
-      png_uint_32 i;
-      png_uint_32 istop = row_info->rowbytes;
-
-      for (i = 0; i < istop; i+=2)
-      {
-         *rp = (png_byte)(~(*rp));
-         rp+=2;
-      }
-   }
-   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
-      row_info->bit_depth == 16)
-   {
-      png_bytep rp = row;
-      png_uint_32 i;
-      png_uint_32 istop = row_info->rowbytes;
-
-      for (i = 0; i < istop; i+=4)
-      {
-         *rp = (png_byte)(~(*rp));
-         *(rp+1) = (png_byte)(~(*(rp+1)));
-         rp+=4;
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-/* swaps byte order on 16 bit depth images */
-void /* PRIVATE */
-png_do_swap(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_swap\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       row_info->bit_depth == 16)
-   {
-      png_bytep rp = row;
-      png_uint_32 i;
-      png_uint_32 istop= row_info->width * row_info->channels;
-
-      for (i = 0; i < istop; i++, rp += 2)
-      {
-         png_byte t = *rp;
-         *rp = *(rp + 1);
-         *(rp + 1) = t;
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-static png_byte onebppswaptable[256] = {
-   0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
-   0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
-   0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
-   0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
-   0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
-   0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
-   0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
-   0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
-   0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
-   0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
-   0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
-   0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
-   0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
-   0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
-   0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
-   0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
-   0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
-   0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
-   0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
-   0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
-   0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
-   0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
-   0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
-   0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
-   0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
-   0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
-   0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
-   0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
-   0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
-   0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
-   0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
-   0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
-};
-
-static png_byte twobppswaptable[256] = {
-   0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,
-   0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,
-   0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,
-   0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4,
-   0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8,
-   0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8,
-   0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC,
-   0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC,
-   0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1,
-   0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1,
-   0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5,
-   0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5,
-   0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9,
-   0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9,
-   0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD,
-   0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD,
-   0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2,
-   0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2,
-   0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6,
-   0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6,
-   0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA,
-   0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA,
-   0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE,
-   0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE,
-   0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3,
-   0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3,
-   0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7,
-   0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7,
-   0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB,
-   0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB,
-   0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF,
-   0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF
-};
-
-static png_byte fourbppswaptable[256] = {
-   0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
-   0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,
-   0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
-   0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1,
-   0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72,
-   0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2,
-   0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73,
-   0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3,
-   0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74,
-   0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4,
-   0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75,
-   0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5,
-   0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76,
-   0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6,
-   0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77,
-   0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7,
-   0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78,
-   0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8,
-   0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79,
-   0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9,
-   0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A,
-   0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA,
-   0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B,
-   0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB,
-   0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C,
-   0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC,
-   0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D,
-   0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD,
-   0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E,
-   0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE,
-   0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F,
-   0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF
-};
-
-/* swaps pixel packing order within bytes */
-void /* PRIVATE */
-png_do_packswap(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_packswap\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       row_info->bit_depth < 8)
-   {
-      png_bytep rp, end, table;
-
-      end = row + row_info->rowbytes;
-
-      if (row_info->bit_depth == 1)
-         table = onebppswaptable;
-      else if (row_info->bit_depth == 2)
-         table = twobppswaptable;
-      else if (row_info->bit_depth == 4)
-         table = fourbppswaptable;
-      else
-         return;
-
-      for (rp = row; rp < end; rp++)
-         *rp = table[*rp];
-   }
-}
-#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */
-
-#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
-    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-/* remove filler or alpha byte(s) */
-void /* PRIVATE */
-png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
-{
-   png_debug(1, "in png_do_strip_filler\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-/*
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB ||
-          row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-*/
-      png_bytep sp=row;
-      png_bytep dp=row;
-      png_uint_32 row_width=row_info->width;
-      png_uint_32 i;
-
-      if (row_info->channels == 4)
-      {
-         if (row_info->bit_depth == 8)
-         {
-            /* This converts from RGBX or RGBA to RGB */
-            if (flags & PNG_FLAG_FILLER_AFTER)
-            {
-               dp+=3; sp+=4;
-               for (i = 1; i < row_width; i++)
-               {
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  sp++;
-               }
-            }
-            /* This converts from XRGB or ARGB to RGB */
-            else
-            {
-               for (i = 0; i < row_width; i++)
-               {
-                  sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-               }
-            }
-            row_info->pixel_depth = 24;
-            row_info->rowbytes = row_width * 3;
-         }
-         else /* if (row_info->bit_depth == 16) */
-         {
-            if (flags & PNG_FLAG_FILLER_AFTER)
-            {
-               /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */
-               sp += 8; dp += 6;
-               for (i = 1; i < row_width; i++)
-               {
-                  /* This could be (although png_memcpy is probably slower):
-                  png_memcpy(dp, sp, 6);
-                  sp += 8;
-                  dp += 6;
-                  */
-
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  sp += 2;
-               }
-            }
-            else
-            {
-               /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */
-               for (i = 0; i < row_width; i++)
-               {
-                  /* This could be (although png_memcpy is probably slower):
-                  png_memcpy(dp, sp, 6);
-                  sp += 8;
-                  dp += 6;
-                  */
-
-                  sp+=2;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-               }
-            }
-            row_info->pixel_depth = 48;
-            row_info->rowbytes = row_width * 6;
-         }
-         row_info->channels = 3;
-         row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
-      }
-/*
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY ||
-               row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-*/
-      else if (row_info->channels == 2)
-      {
-         if (row_info->bit_depth == 8)
-         {
-            /* This converts from GX or GA to G */
-            if (flags & PNG_FLAG_FILLER_AFTER)
-            {
-               for (i = 0; i < row_width; i++)
-               {
-                  *dp++ = *sp++;
-                  sp++;
-               }
-            }
-            /* This converts from XG or AG to G */
-            else
-            {
-               for (i = 0; i < row_width; i++)
-               {
-                  sp++;
-                  *dp++ = *sp++;
-               }
-            }
-            row_info->pixel_depth = 8;
-            row_info->rowbytes = row_width;
-         }
-         else /* if (row_info->bit_depth == 16) */
-         {
-            if (flags & PNG_FLAG_FILLER_AFTER)
-            {
-               /* This converts from GGXX or GGAA to GG */
-               sp += 4; dp += 2;
-               for (i = 1; i < row_width; i++)
-               {
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-                  sp += 2;
-               }
-            }
-            else
-            {
-               /* This converts from XXGG or AAGG to GG */
-               for (i = 0; i < row_width; i++)
-               {
-                  sp += 2;
-                  *dp++ = *sp++;
-                  *dp++ = *sp++;
-               }
-            }
-            row_info->pixel_depth = 16;
-            row_info->rowbytes = row_width * 2;
-         }
-         row_info->channels = 1;
-         row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
-      }
-   }
-}
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-/* swaps red and blue bytes within a pixel */
-void /* PRIVATE */
-png_do_bgr(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_bgr\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       (row_info->color_type & PNG_COLOR_MASK_COLOR))
-   {
-      png_uint_32 row_width = row_info->width;
-      if (row_info->bit_depth == 8)
-      {
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-         {
-            png_bytep rp;
-            png_uint_32 i;
-
-            for (i = 0, rp = row; i < row_width; i++, rp += 3)
-            {
-               png_byte save = *rp;
-               *rp = *(rp + 2);
-               *(rp + 2) = save;
-            }
-         }
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-         {
-            png_bytep rp;
-            png_uint_32 i;
-
-            for (i = 0, rp = row; i < row_width; i++, rp += 4)
-            {
-               png_byte save = *rp;
-               *rp = *(rp + 2);
-               *(rp + 2) = save;
-            }
-         }
-      }
-      else if (row_info->bit_depth == 16)
-      {
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-         {
-            png_bytep rp;
-            png_uint_32 i;
-
-            for (i = 0, rp = row; i < row_width; i++, rp += 6)
-            {
-               png_byte save = *rp;
-               *rp = *(rp + 4);
-               *(rp + 4) = save;
-               save = *(rp + 1);
-               *(rp + 1) = *(rp + 5);
-               *(rp + 5) = save;
-            }
-         }
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-         {
-            png_bytep rp;
-            png_uint_32 i;
-
-            for (i = 0, rp = row; i < row_width; i++, rp += 8)
-            {
-               png_byte save = *rp;
-               *rp = *(rp + 4);
-               *(rp + 4) = save;
-               save = *(rp + 1);
-               *(rp + 1) = *(rp + 5);
-               *(rp + 5) = save;
-            }
-         }
-      }
-   }
-}
-#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-void PNGAPI
-png_set_user_transform_info(png_structp png_ptr, png_voidp
-   user_transform_ptr, int user_transform_depth, int user_transform_channels)
-{
-   png_debug(1, "in png_set_user_transform_info\n");
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-   png_ptr->user_transform_ptr = user_transform_ptr;
-   png_ptr->user_transform_depth = (png_byte)user_transform_depth;
-   png_ptr->user_transform_channels = (png_byte)user_transform_channels;
-#else
-   if(user_transform_ptr || user_transform_depth || user_transform_channels)
-      png_warning(png_ptr,
-        "This version of libpng does not support user transform info");
-#endif
-}
-#endif
-
-/* This function returns a pointer to the user_transform_ptr associated with
- * the user transform functions.  The application should free any memory
- * associated with this pointer before png_write_destroy and png_read_destroy
- * are called.
- */
-png_voidp PNGAPI
-png_get_user_transform_ptr(png_structp png_ptr)
-{
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-   return ((png_voidp)png_ptr->user_transform_ptr);
-#else
-   if(png_ptr)
-     return (NULL);
-   return (NULL);
-#endif
-}
diff --git a/tkimg1.3/libpng/pngvcrd.c b/tkimg1.3/libpng/pngvcrd.c
deleted file mode 100644
index 5f5b157..0000000
--- a/tkimg1.3/libpng/pngvcrd.c
+++ /dev/null
@@ -1,3903 +0,0 @@
-/* pngvcrd.c - mixed C/assembler version of utilities to read a PNG file
- *
- * For Intel x86 CPU and Microsoft Visual C++ compiler
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * Copyright (c) 1998, Intel Corporation
- *
- * Contributed by Nirav Chhatrapati, Intel Corporation, 1998
- * Interface to libpng contributed by Gilles Vollant, 1999
- *
- *
- * In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d,
- * a sign error in the post-MMX cleanup code for each pixel_depth resulted
- * in bad pixels at the beginning of some rows of some images, and also
- * (due to out-of-range memory reads and writes) caused heap corruption
- * when compiled with MSVC 6.0.  The error was fixed in version 1.0.4e.
- *
- * [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916]
- *
- * [runtime MMX configuration, GRR 20010102]
- *
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD)
-
-static int mmx_supported=2;
-
-
-int PNGAPI
-png_mmx_support(void)
-{
-  int mmx_supported_local = 0;
-  _asm {
-    push ebx          //CPUID will trash these
-    push ecx
-    push edx
-
-    pushfd            //Save Eflag to stack
-    pop eax           //Get Eflag from stack into eax
-    mov ecx, eax      //Make another copy of Eflag in ecx
-    xor eax, 0x200000 //Toggle ID bit in Eflag [i.e. bit(21)]
-    push eax          //Save modified Eflag back to stack
-
-    popfd             //Restored modified value back to Eflag reg
-    pushfd            //Save Eflag to stack
-    pop eax           //Get Eflag from stack
-    push ecx          // save original Eflag to stack
-    popfd             // restore original Eflag
-    xor eax, ecx      //Compare the new Eflag with the original Eflag
-    jz NOT_SUPPORTED  //If the same, CPUID instruction is not supported,
-                      //skip following instructions and jump to
-                      //NOT_SUPPORTED label
-
-    xor eax, eax      //Set eax to zero
-
-    _asm _emit 0x0f   //CPUID instruction  (two bytes opcode)
-    _asm _emit 0xa2
-
-    cmp eax, 1        //make sure eax return non-zero value
-    jl NOT_SUPPORTED  //If eax is zero, mmx not supported
-
-    xor eax, eax      //set eax to zero
-    inc eax           //Now increment eax to 1.  This instruction is
-                      //faster than the instruction "mov eax, 1"
-
-    _asm _emit 0x0f   //CPUID instruction
-    _asm _emit 0xa2
-
-    and edx, 0x00800000  //mask out all bits but mmx bit(24)
-    cmp edx, 0        // 0 = mmx not supported
-    jz  NOT_SUPPORTED // non-zero = Yes, mmx IS supported
-
-    mov  mmx_supported_local, 1  //set return value to 1
-
-NOT_SUPPORTED:
-    mov  eax, mmx_supported_local  //move return value to eax
-    pop edx          //CPUID trashed these
-    pop ecx
-    pop ebx
-  }
-
-  //mmx_supported_local=0; // test code for force don't support MMX
-  //printf("MMX : %u (1=MMX supported)\n",mmx_supported_local);
-
-  mmx_supported = mmx_supported_local;
-  return mmx_supported_local;
-}
-
-/* Combines the row recently read in with the previous row.
-   This routine takes care of alpha and transparency if requested.
-   This routine also handles the two methods of progressive display
-   of interlaced images, depending on the mask value.
-   The mask value describes which pixels are to be combined with
-   the row.  The pattern always repeats every 8 pixels, so just 8
-   bits are needed.  A one indicates the pixel is to be combined; a
-   zero indicates the pixel is to be skipped.  This is in addition
-   to any alpha or transparency value associated with the pixel.  If
-   you want all pixels to be combined, pass 0xff (255) in mask.  */
-
-/* Use this routine for x86 platform - uses faster MMX routine if machine
-   supports MMX */
-
-void /* PRIVATE */
-png_combine_row(png_structp png_ptr, png_bytep row, int mask)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
-
-   png_debug(1,"in png_combine_row_asm\n");
-
-   if (mmx_supported == 2) {
-#if !defined(PNG_1_0_X)
-       /* this should have happened in png_init_mmx_flags() already */
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-
-   if (mask == 0xff)
-   {
-      png_memcpy(row, png_ptr->row_buf + 1,
-       (png_size_t)PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
-       png_ptr->width));
-   }
-   /* GRR:  add "else if (mask == 0)" case?
-    *       or does png_combine_row() not even get called in that case? */
-   else
-   {
-      switch (png_ptr->row_info.pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_inc, s_start, s_end;
-            int m;
-            int shift;
-            png_uint_32 i;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-                s_start = 0;
-                s_end = 7;
-                s_inc = 1;
-            }
-            else
-#endif
-            {
-                s_start = 7;
-                s_end = 0;
-                s_inc = -1;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  int value;
-
-                  value = (*sp >> shift) & 0x1;
-                  *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 2:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_start, s_end, s_inc;
-            int m;
-            int shift;
-            png_uint_32 i;
-            int value;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-            else
-#endif
-            {
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0x3;
-                  *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 4:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int s_start, s_end, s_inc;
-            int m;
-            int shift;
-            png_uint_32 i;
-            int value;
-
-            sp = png_ptr->row_buf + 1;
-            dp = row;
-            m = 0x80;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (png_ptr->transformations & PNG_PACKSWAP)
-            {
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-            else
-#endif
-            {
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            shift = s_start;
-
-            for (i = 0; i < png_ptr->width; i++)
-            {
-               if (m & mask)
-               {
-                  value = (*sp >> shift) & 0xf;
-                  *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
-                  *dp |= (png_byte)(value << shift);
-               }
-
-               if (shift == s_end)
-               {
-                  shift = s_start;
-                  sp++;
-                  dp++;
-               }
-               else
-                  shift += s_inc;
-               if (m == 1)
-                  m = 0x80;
-               else
-                  m >>= 1;
-            }
-            break;
-         }
-
-         case 8:
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            png_uint_32 len;
-            int m;
-            int diff, unmask;
-
-            __int64 mask0=0x0102040810204080;
-
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-               m = 0x80;
-               unmask = ~mask;
-               len  = png_ptr->width &~7;  //reduce to multiple of 8
-               diff = png_ptr->width & 7;  //amount lost
-
-               _asm
-               {
-                  movd       mm7, unmask   //load bit pattern
-                  psubb      mm6,mm6       //zero mm6
-                  punpcklbw  mm7,mm7
-                  punpcklwd  mm7,mm7
-                  punpckldq  mm7,mm7       //fill register with 8 masks
-
-                  movq       mm0,mask0
-
-                  pand       mm0,mm7       //nonzero if keep byte
-                  pcmpeqb    mm0,mm6       //zeros->1s, v versa
-
-                  mov        ecx,len       //load length of line (pixels)
-                  mov        esi,srcptr    //load source
-                  mov        ebx,dstptr    //load dest
-                  cmp        ecx,0         //lcr
-                  je         mainloop8end
-
-mainloop8:
-                  movq       mm4,[esi]
-                  pand       mm4,mm0
-                  movq       mm6,mm0
-                  pandn      mm6,[ebx]
-                  por        mm4,mm6
-                  movq       [ebx],mm4
-
-                  add        esi,8         //inc by 8 bytes processed
-                  add        ebx,8
-                  sub        ecx,8         //dec by 8 pixels processed
-
-                  ja         mainloop8
-mainloop8end:
-
-                  mov        ecx,diff
-                  cmp        ecx,0
-                  jz         end8
-
-                  mov        edx,mask
-                  sal        edx,24        //make low byte the high byte
-
-secondloop8:
-                  sal        edx,1         //move high bit to CF
-                  jnc        skip8         //if CF = 0
-                  mov        al,[esi]
-                  mov        [ebx],al
-skip8:
-                  inc        esi
-                  inc        ebx
-
-                  dec        ecx
-                  jnz        secondloop8
-end8:
-                  emms
-               }
-            }
-            else /* mmx not supported - use modified C routine */
-            {
-               register unsigned int incr1, initial_val, final_val;
-               png_size_t pixel_bytes;
-               png_uint_32 i;
-               register int disp = png_pass_inc[png_ptr->pass];
-               int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-
-               pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-               srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-                  pixel_bytes;
-               dstptr = row + offset_table[png_ptr->pass]*pixel_bytes;
-               initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-               final_val = png_ptr->width*pixel_bytes;
-               incr1 = (disp)*pixel_bytes;
-               for (i = initial_val; i < final_val; i += incr1)
-               {
-                  png_memcpy(dstptr, srcptr, pixel_bytes);
-                  srcptr += incr1;
-                  dstptr += incr1;
-               }
-            } /* end of else */
-
-            break;
-         }       // end 8 bpp
-
-         case 16:
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            png_uint_32 len;
-            int unmask, diff;
-            __int64 mask1=0x0101020204040808,
-                    mask0=0x1010202040408080;
-
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-
-               unmask = ~mask;
-               len     = (png_ptr->width)&~7;
-               diff = (png_ptr->width)&7;
-               _asm
-               {
-                  movd       mm7, unmask       //load bit pattern
-                  psubb      mm6,mm6           //zero mm6
-                  punpcklbw  mm7,mm7
-                  punpcklwd  mm7,mm7
-                  punpckldq  mm7,mm7           //fill register with 8 masks
-
-                  movq       mm0,mask0
-                  movq       mm1,mask1
-
-                  pand       mm0,mm7
-                  pand       mm1,mm7
-
-                  pcmpeqb    mm0,mm6
-                  pcmpeqb    mm1,mm6
-
-                  mov        ecx,len           //load length of line
-                  mov        esi,srcptr        //load source
-                  mov        ebx,dstptr        //load dest
-                  cmp        ecx,0             //lcr
-                  jz         mainloop16end
-
-mainloop16:
-                  movq       mm4,[esi]
-                  pand       mm4,mm0
-                  movq       mm6,mm0
-                  movq       mm7,[ebx]
-                  pandn      mm6,mm7
-                  por        mm4,mm6
-                  movq       [ebx],mm4
-
-                  movq       mm5,[esi+8]
-                  pand       mm5,mm1
-                  movq       mm7,mm1
-                  movq       mm6,[ebx+8]
-                  pandn      mm7,mm6
-                  por        mm5,mm7
-                  movq       [ebx+8],mm5
-
-                  add        esi,16            //inc by 16 bytes processed
-                  add        ebx,16
-                  sub        ecx,8             //dec by 8 pixels processed
-
-                  ja         mainloop16
-
-mainloop16end:
-                  mov        ecx,diff
-                  cmp        ecx,0
-                  jz         end16
-
-                  mov        edx,mask
-                  sal        edx,24            //make low byte the high byte
-secondloop16:
-                  sal        edx,1             //move high bit to CF
-                  jnc        skip16            //if CF = 0
-                  mov        ax,[esi]
-                  mov        [ebx],ax
-skip16:
-                  add        esi,2
-                  add        ebx,2
-
-                  dec        ecx
-                  jnz        secondloop16
-end16:
-                  emms
-               }
-            }
-            else /* mmx not supported - use modified C routine */
-            {
-               register unsigned int incr1, initial_val, final_val;
-               png_size_t pixel_bytes;
-               png_uint_32 i;
-               register int disp = png_pass_inc[png_ptr->pass];
-               int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-
-               pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-               srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-                  pixel_bytes;
-               dstptr = row + offset_table[png_ptr->pass]*pixel_bytes;
-               initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-               final_val = png_ptr->width*pixel_bytes;
-               incr1 = (disp)*pixel_bytes;
-               for (i = initial_val; i < final_val; i += incr1)
-               {
-                  png_memcpy(dstptr, srcptr, pixel_bytes);
-                  srcptr += incr1;
-                  dstptr += incr1;
-               }
-            } /* end of else */
-
-            break;
-         }       // end 16 bpp
-
-         case 24:
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            png_uint_32 len;
-            int unmask, diff;
-
-            __int64 mask2=0x0101010202020404,  //24bpp
-                    mask1=0x0408080810101020,
-                    mask0=0x2020404040808080;
-
-            srcptr = png_ptr->row_buf + 1;
-            dstptr = row;
-
-            unmask = ~mask;
-            len     = (png_ptr->width)&~7;
-            diff = (png_ptr->width)&7;
-
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               _asm
-               {
-                  movd       mm7, unmask       //load bit pattern
-                  psubb      mm6,mm6           //zero mm6
-                  punpcklbw  mm7,mm7
-                  punpcklwd  mm7,mm7
-                  punpckldq  mm7,mm7           //fill register with 8 masks
-
-                  movq       mm0,mask0
-                  movq       mm1,mask1
-                  movq       mm2,mask2
-
-                  pand       mm0,mm7
-                  pand       mm1,mm7
-                  pand       mm2,mm7
-
-                  pcmpeqb    mm0,mm6
-                  pcmpeqb    mm1,mm6
-                  pcmpeqb    mm2,mm6
-
-                  mov        ecx,len           //load length of line
-                  mov        esi,srcptr        //load source
-                  mov        ebx,dstptr        //load dest
-                  cmp        ecx,0
-                  jz         mainloop24end
-
-mainloop24:
-                  movq       mm4,[esi]
-                  pand       mm4,mm0
-                  movq       mm6,mm0
-                  movq       mm7,[ebx]
-                  pandn      mm6,mm7
-                  por        mm4,mm6
-                  movq       [ebx],mm4
-
-
-                  movq       mm5,[esi+8]
-                  pand       mm5,mm1
-                  movq       mm7,mm1
-                  movq       mm6,[ebx+8]
-                  pandn      mm7,mm6
-                  por        mm5,mm7
-                  movq       [ebx+8],mm5
-
-                  movq       mm6,[esi+16]
-                  pand       mm6,mm2
-                  movq       mm4,mm2
-                  movq       mm7,[ebx+16]
-                  pandn      mm4,mm7
-                  por        mm6,mm4
-                  movq       [ebx+16],mm6
-
-                  add        esi,24            //inc by 24 bytes processed
-                  add        ebx,24
-                  sub        ecx,8             //dec by 8 pixels processed
-
-                  ja         mainloop24
-
-mainloop24end:
-                  mov        ecx,diff
-                  cmp        ecx,0
-                  jz         end24
-
-                  mov        edx,mask
-                  sal        edx,24            //make low byte the high byte
-secondloop24:
-                  sal        edx,1             //move high bit to CF
-                  jnc        skip24            //if CF = 0
-                  mov        ax,[esi]
-                  mov        [ebx],ax
-                  xor        eax,eax
-                  mov        al,[esi+2]
-                  mov        [ebx+2],al
-skip24:
-                  add        esi,3
-                  add        ebx,3
-
-                  dec        ecx
-                  jnz        secondloop24
-
-end24:
-                  emms
-               }
-            }
-            else /* mmx not supported - use modified C routine */
-            {
-               register unsigned int incr1, initial_val, final_val;
-               png_size_t pixel_bytes;
-               png_uint_32 i;
-               register int disp = png_pass_inc[png_ptr->pass];
-               int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-
-               pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-               srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-                  pixel_bytes;
-               dstptr = row + offset_table[png_ptr->pass]*pixel_bytes;
-               initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-               final_val = png_ptr->width*pixel_bytes;
-               incr1 = (disp)*pixel_bytes;
-               for (i = initial_val; i < final_val; i += incr1)
-               {
-                  png_memcpy(dstptr, srcptr, pixel_bytes);
-                  srcptr += incr1;
-                  dstptr += incr1;
-               }
-            } /* end of else */
-
-            break;
-         }       // end 24 bpp
-
-         case 32:
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            png_uint_32 len;
-            int unmask, diff;
-
-            __int64 mask3=0x0101010102020202,  //32bpp
-                    mask2=0x0404040408080808,
-                    mask1=0x1010101020202020,
-                    mask0=0x4040404080808080;
-
-            srcptr = png_ptr->row_buf + 1;
-            dstptr = row;
-
-            unmask = ~mask;
-            len     = (png_ptr->width)&~7;
-            diff = (png_ptr->width)&7;
-
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               _asm
-               {
-                  movd       mm7, unmask       //load bit pattern
-                  psubb      mm6,mm6           //zero mm6
-                  punpcklbw  mm7,mm7
-                  punpcklwd  mm7,mm7
-                  punpckldq  mm7,mm7           //fill register with 8 masks
-
-                  movq       mm0,mask0
-                  movq       mm1,mask1
-                  movq       mm2,mask2
-                  movq       mm3,mask3
-
-                  pand       mm0,mm7
-                  pand       mm1,mm7
-                  pand       mm2,mm7
-                  pand       mm3,mm7
-
-                  pcmpeqb    mm0,mm6
-                  pcmpeqb    mm1,mm6
-                  pcmpeqb    mm2,mm6
-                  pcmpeqb    mm3,mm6
-
-                  mov        ecx,len           //load length of line
-                  mov        esi,srcptr        //load source
-                  mov        ebx,dstptr        //load dest
-
-                  cmp        ecx,0             //lcr
-                  jz         mainloop32end
-
-mainloop32:
-                  movq       mm4,[esi]
-                  pand       mm4,mm0
-                  movq       mm6,mm0
-                  movq       mm7,[ebx]
-                  pandn      mm6,mm7
-                  por        mm4,mm6
-                  movq       [ebx],mm4
-
-                  movq       mm5,[esi+8]
-                  pand       mm5,mm1
-                  movq       mm7,mm1
-                  movq       mm6,[ebx+8]
-                  pandn      mm7,mm6
-                  por        mm5,mm7
-                  movq       [ebx+8],mm5
-
-                  movq       mm6,[esi+16]
-                  pand       mm6,mm2
-                  movq       mm4,mm2
-                  movq       mm7,[ebx+16]
-                  pandn      mm4,mm7
-                  por        mm6,mm4
-                  movq       [ebx+16],mm6
-
-                  movq       mm7,[esi+24]
-                  pand       mm7,mm3
-                  movq       mm5,mm3
-                  movq       mm4,[ebx+24]
-                  pandn      mm5,mm4
-                  por        mm7,mm5
-                  movq       [ebx+24],mm7
-
-                  add        esi,32            //inc by 32 bytes processed
-                  add        ebx,32
-                  sub        ecx,8             //dec by 8 pixels processed
-
-                  ja         mainloop32
-
-mainloop32end:
-                  mov        ecx,diff
-                  cmp        ecx,0
-                  jz         end32
-
-                  mov        edx,mask
-                  sal        edx,24            //make low byte the high byte
-secondloop32:
-                  sal        edx,1             //move high bit to CF
-                  jnc        skip32            //if CF = 0
-                  mov        eax,[esi]
-                  mov        [ebx],eax
-skip32:
-                  add        esi,4
-                  add        ebx,4
-
-                  dec        ecx
-                  jnz        secondloop32
-
-end32:
-                  emms
-               }
-            }
-            else /* mmx _not supported - Use modified C routine */
-            {
-               register unsigned int incr1, initial_val, final_val;
-               png_size_t pixel_bytes;
-               png_uint_32 i;
-               register int disp = png_pass_inc[png_ptr->pass];
-               int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-
-               pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-               srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-                  pixel_bytes;
-               dstptr = row + offset_table[png_ptr->pass]*pixel_bytes;
-               initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-               final_val = png_ptr->width*pixel_bytes;
-               incr1 = (disp)*pixel_bytes;
-               for (i = initial_val; i < final_val; i += incr1)
-               {
-                  png_memcpy(dstptr, srcptr, pixel_bytes);
-                  srcptr += incr1;
-                  dstptr += incr1;
-               }
-            } /* end of else */
-
-            break;
-         }       // end 32 bpp
-
-         case 48:
-         {
-            png_bytep srcptr;
-            png_bytep dstptr;
-            png_uint_32 len;
-            int unmask, diff;
-
-            __int64 mask5=0x0101010101010202,
-                    mask4=0x0202020204040404,
-                    mask3=0x0404080808080808,
-                    mask2=0x1010101010102020,
-                    mask1=0x2020202040404040,
-                    mask0=0x4040808080808080;
-
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               srcptr = png_ptr->row_buf + 1;
-               dstptr = row;
-
-               unmask = ~mask;
-               len     = (png_ptr->width)&~7;
-               diff = (png_ptr->width)&7;
-               _asm
-               {
-                  movd       mm7, unmask       //load bit pattern
-                  psubb      mm6,mm6           //zero mm6
-                  punpcklbw  mm7,mm7
-                  punpcklwd  mm7,mm7
-                  punpckldq  mm7,mm7           //fill register with 8 masks
-
-                  movq       mm0,mask0
-                  movq       mm1,mask1
-                  movq       mm2,mask2
-                  movq       mm3,mask3
-                  movq       mm4,mask4
-                  movq       mm5,mask5
-
-                  pand       mm0,mm7
-                  pand       mm1,mm7
-                  pand       mm2,mm7
-                  pand       mm3,mm7
-                  pand       mm4,mm7
-                  pand       mm5,mm7
-
-                  pcmpeqb    mm0,mm6
-                  pcmpeqb    mm1,mm6
-                  pcmpeqb    mm2,mm6
-                  pcmpeqb    mm3,mm6
-                  pcmpeqb    mm4,mm6
-                  pcmpeqb    mm5,mm6
-
-                  mov        ecx,len           //load length of line
-                  mov        esi,srcptr        //load source
-                  mov        ebx,dstptr        //load dest
-
-                  cmp        ecx,0
-                  jz         mainloop48end
-
-mainloop48:
-                  movq       mm7,[esi]
-                  pand       mm7,mm0
-                  movq       mm6,mm0
-                  pandn      mm6,[ebx]
-                  por        mm7,mm6
-                  movq       [ebx],mm7
-
-                  movq       mm6,[esi+8]
-                  pand       mm6,mm1
-                  movq       mm7,mm1
-                  pandn      mm7,[ebx+8]
-                  por        mm6,mm7
-                  movq       [ebx+8],mm6
-
-                  movq       mm6,[esi+16]
-                  pand       mm6,mm2
-                  movq       mm7,mm2
-                  pandn      mm7,[ebx+16]
-                  por        mm6,mm7
-                  movq       [ebx+16],mm6
-
-                  movq       mm7,[esi+24]
-                  pand       mm7,mm3
-                  movq       mm6,mm3
-                  pandn      mm6,[ebx+24]
-                  por        mm7,mm6
-                  movq       [ebx+24],mm7
-
-                  movq       mm6,[esi+32]
-                  pand       mm6,mm4
-                  movq       mm7,mm4
-                  pandn      mm7,[ebx+32]
-                  por        mm6,mm7
-                  movq       [ebx+32],mm6
-
-                  movq       mm7,[esi+40]
-                  pand       mm7,mm5
-                  movq       mm6,mm5
-                  pandn      mm6,[ebx+40]
-                  por        mm7,mm6
-                  movq       [ebx+40],mm7
-
-                  add        esi,48            //inc by 32 bytes processed
-                  add        ebx,48
-                  sub        ecx,8             //dec by 8 pixels processed
-
-                  ja         mainloop48
-mainloop48end:
-
-                  mov        ecx,diff
-                  cmp        ecx,0
-                  jz         end48
-
-                  mov        edx,mask
-                  sal        edx,24            //make low byte the high byte
-
-secondloop48:
-                  sal        edx,1             //move high bit to CF
-                  jnc        skip48            //if CF = 0
-                  mov        eax,[esi]
-                  mov        [ebx],eax
-skip48:
-                  add        esi,4
-                  add        ebx,4
-
-                  dec        ecx
-                  jnz        secondloop48
-
-end48:
-                  emms
-               }
-            }
-            else /* mmx _not supported - Use modified C routine */
-            {
-               register unsigned int incr1, initial_val, final_val;
-               png_size_t pixel_bytes;
-               png_uint_32 i;
-               register int disp = png_pass_inc[png_ptr->pass];
-               int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-
-               pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-               srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-                  pixel_bytes;
-               dstptr = row + offset_table[png_ptr->pass]*pixel_bytes;
-               initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-               final_val = png_ptr->width*pixel_bytes;
-               incr1 = (disp)*pixel_bytes;
-               for (i = initial_val; i < final_val; i += incr1)
-               {
-                  png_memcpy(dstptr, srcptr, pixel_bytes);
-                  srcptr += incr1;
-                  dstptr += incr1;
-               }
-            } /* end of else */
-
-            break;
-         }       // end 48 bpp
-
-         default:
-         {
-            png_bytep sptr;
-            png_bytep dp;
-            png_size_t pixel_bytes;
-            int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
-            unsigned int i;
-            register int disp = png_pass_inc[png_ptr->pass];  // get the offset
-            register unsigned int incr1, initial_val, final_val;
-
-            pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
-            sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
-               pixel_bytes;
-            dp = row + offset_table[png_ptr->pass]*pixel_bytes;
-            initial_val = offset_table[png_ptr->pass]*pixel_bytes;
-            final_val = png_ptr->width*pixel_bytes;
-            incr1 = (disp)*pixel_bytes;
-            for (i = initial_val; i < final_val; i += incr1)
-            {
-               png_memcpy(dp, sptr, pixel_bytes);
-               sptr += incr1;
-               dp += incr1;
-            }
-            break;
-         }
-      } /* end switch (png_ptr->row_info.pixel_depth) */
-   } /* end if (non-trivial mask) */
-
-} /* end png_combine_row() */
-
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-
-void /* PRIVATE */
-png_do_read_interlace(png_structp png_ptr)
-{
-   png_row_infop row_info = &(png_ptr->row_info);
-   png_bytep row = png_ptr->row_buf + 1;
-   int pass = png_ptr->pass;
-   png_uint_32 transformations = png_ptr->transformations;
-#ifdef PNG_USE_LOCAL_ARRAYS
-   const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
-
-   png_debug(1,"in png_do_read_interlace\n");
-
-   if (mmx_supported == 2) {
-#if !defined(PNG_1_0_X)
-       /* this should have happened in png_init_mmx_flags() already */
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-
-   if (row != NULL && row_info != NULL)
-   {
-      png_uint_32 final_width;
-
-      final_width = row_info->width * png_pass_inc[pass];
-
-      switch (row_info->pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_byte v;
-            png_uint_32 i;
-            int j;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 3);
-            dp = row + (png_size_t)((final_width - 1) >> 3);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (int)((row_info->width + 7) & 7);
-               dshift = (int)((final_width + 7) & 7);
-               s_start = 7;
-               s_end = 0;
-               s_inc = -1;
-            }
-            else
-#endif
-            {
-               sshift = 7 - (int)((row_info->width + 7) & 7);
-               dshift = 7 - (int)((final_width + 7) & 7);
-               s_start = 0;
-               s_end = 7;
-               s_inc = 1;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               v = (png_byte)((*sp >> sshift) & 0x1);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-         case 2:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_uint_32 i;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 2);
-            dp = row + (png_size_t)((final_width - 1) >> 2);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (png_size_t)(((row_info->width + 3) & 3) << 1);
-               dshift = (png_size_t)(((final_width + 3) & 3) << 1);
-               s_start = 6;
-               s_end = 0;
-               s_inc = -2;
-            }
-            else
-#endif
-            {
-               sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1);
-               dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1);
-               s_start = 0;
-               s_end = 6;
-               s_inc = 2;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               png_byte v;
-               int j;
-
-               v = (png_byte)((*sp >> sshift) & 0x3);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-         case 4:
-         {
-            png_bytep sp, dp;
-            int sshift, dshift;
-            int s_start, s_end, s_inc;
-            png_uint_32 i;
-
-            sp = row + (png_size_t)((row_info->width - 1) >> 1);
-            dp = row + (png_size_t)((final_width - 1) >> 1);
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
-            if (transformations & PNG_PACKSWAP)
-            {
-               sshift = (png_size_t)(((row_info->width + 1) & 1) << 2);
-               dshift = (png_size_t)(((final_width + 1) & 1) << 2);
-               s_start = 4;
-               s_end = 0;
-               s_inc = -4;
-            }
-            else
-#endif
-            {
-               sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2);
-               dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2);
-               s_start = 0;
-               s_end = 4;
-               s_inc = 4;
-            }
-
-            for (i = row_info->width; i; i--)
-            {
-               png_byte v;
-               int j;
-
-               v = (png_byte)((*sp >> sshift) & 0xf);
-               for (j = 0; j < png_pass_inc[pass]; j++)
-               {
-                  *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);
-                  *dp |= (png_byte)(v << dshift);
-                  if (dshift == s_end)
-                  {
-                     dshift = s_start;
-                     dp--;
-                  }
-                  else
-                     dshift += s_inc;
-               }
-               if (sshift == s_end)
-               {
-                  sshift = s_start;
-                  sp--;
-               }
-               else
-                  sshift += s_inc;
-            }
-            break;
-         }
-
-         default:         // This is the place where the routine is modified
-         {
-            __int64 const4 = 0x0000000000FFFFFF;
-            // __int64 const5 = 0x000000FFFFFF0000;  // unused...
-            __int64 const6 = 0x00000000000000FF;
-            png_bytep sptr, dp;
-            png_uint_32 i;
-            png_size_t pixel_bytes;
-            int width = row_info->width;
-
-            pixel_bytes = (row_info->pixel_depth >> 3);
-
-            sptr = row + (width - 1) * pixel_bytes;
-            dp = row + (final_width - 1) * pixel_bytes;
-            // New code by Nirav Chhatrapati - Intel Corporation
-            // sign fix by GRR
-            // NOTE:  there is NO MMX code for 48-bit and 64-bit images
-
-            // use MMX routine if machine supports it
-#if !defined(PNG_1_0_X)
-            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
-                /* && mmx_supported */ )
-#else
-            if (mmx_supported)
-#endif
-            {
-               if (pixel_bytes == 3)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     _asm
-                     {
-                        mov esi, sptr
-                        mov edi, dp
-                        mov ecx, width
-                        sub edi, 21   // (png_pass_inc[pass] - 1)*pixel_bytes
-loop_pass0:
-                        movd mm0, [esi]     ; X X X X X v2 v1 v0
-                        pand mm0, const4    ; 0 0 0 0 0 v2 v1 v0
-                        movq mm1, mm0       ; 0 0 0 0 0 v2 v1 v0
-                        psllq mm0, 16       ; 0 0 0 v2 v1 v0 0 0
-                        movq mm2, mm0       ; 0 0 0 v2 v1 v0 0 0
-                        psllq mm0, 24       ; v2 v1 v0 0 0 0 0 0
-                        psrlq mm1, 8        ; 0 0 0 0 0 0 v2 v1
-                        por mm0, mm2        ; v2 v1 v0 v2 v1 v0 0 0
-                        por mm0, mm1        ; v2 v1 v0 v2 v1 v0 v2 v1
-                        movq mm3, mm0       ; v2 v1 v0 v2 v1 v0 v2 v1
-                        psllq mm0, 16       ; v0 v2 v1 v0 v2 v1 0 0
-                        movq mm4, mm3       ; v2 v1 v0 v2 v1 v0 v2 v1
-                        punpckhdq mm3, mm0  ; v0 v2 v1 v0 v2 v1 v0 v2
-                        movq [edi+16] , mm4
-                        psrlq mm0, 32       ; 0 0 0 0 v0 v2 v1 v0
-                        movq [edi+8] , mm3
-                        punpckldq mm0, mm4  ; v1 v0 v2 v1 v0 v2 v1 v0
-                        sub esi, 3
-                        movq [edi], mm0
-                        sub edi, 24
-                        //sub esi, 3
-                        dec ecx
-                        jnz loop_pass0
-                        EMMS
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     _asm
-                     {
-                        mov esi, sptr
-                        mov edi, dp
-                        mov ecx, width
-                        sub edi, 9   // (png_pass_inc[pass] - 1)*pixel_bytes
-loop_pass2:
-                        movd mm0, [esi]     ; X X X X X v2 v1 v0
-                        pand mm0, const4    ; 0 0 0 0 0 v2 v1 v0
-                        movq mm1, mm0       ; 0 0 0 0 0 v2 v1 v0
-                        psllq mm0, 16       ; 0 0 0 v2 v1 v0 0 0
-                        movq mm2, mm0       ; 0 0 0 v2 v1 v0 0 0
-                        psllq mm0, 24       ; v2 v1 v0 0 0 0 0 0
-                        psrlq mm1, 8        ; 0 0 0 0 0 0 v2 v1
-                        por mm0, mm2        ; v2 v1 v0 v2 v1 v0 0 0
-                        por mm0, mm1        ; v2 v1 v0 v2 v1 v0 v2 v1
-                        movq [edi+4], mm0   ; move to memory
-                        psrlq mm0, 16       ; 0 0 v2 v1 v0 v2 v1 v0
-                        movd [edi], mm0     ; move to memory
-                        sub esi, 3
-                        sub edi, 12
-                        dec ecx
-                        jnz loop_pass2
-                        EMMS
-                     }
-                  }
-                  else if (width) /* && ((pass == 4) || (pass == 5)) */
-                  {
-                     int width_mmx = ((width >> 1) << 1) - 8;
-                     if (width_mmx < 0)
-                         width_mmx = 0;
-                     width -= width_mmx;        // 8 or 9 pix, 24 or 27 bytes
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 3
-                           sub edi, 9
-loop_pass4:
-                           movq mm0, [esi]     ; X X v2 v1 v0 v5 v4 v3
-                           movq mm7, mm0       ; X X v2 v1 v0 v5 v4 v3
-                           movq mm6, mm0       ; X X v2 v1 v0 v5 v4 v3
-                           psllq mm0, 24       ; v1 v0 v5 v4 v3 0 0 0
-                           pand mm7, const4    ; 0 0 0 0 0 v5 v4 v3
-                           psrlq mm6, 24       ; 0 0 0 X X v2 v1 v0
-                           por mm0, mm7        ; v1 v0 v5 v4 v3 v5 v4 v3
-                           movq mm5, mm6       ; 0 0 0 X X v2 v1 v0
-                           psllq mm6, 8        ; 0 0 X X v2 v1 v0 0
-                           movq [edi], mm0     ; move quad to memory
-                           psrlq mm5, 16       ; 0 0 0 0 0 X X v2
-                           pand mm5, const6    ; 0 0 0 0 0 0 0 v2
-                           por mm6, mm5        ; 0 0 X X v2 v1 v0 v2
-                           movd [edi+8], mm6   ; move double to memory
-                           sub esi, 6
-                           sub edi, 12
-                           sub ecx, 2
-                           jnz loop_pass4
-                           EMMS
-                        }
-                     }
-
-                     sptr -= width_mmx*3;
-                     dp -= width_mmx*6;
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-
-                        png_memcpy(v, sptr, 3);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           png_memcpy(dp, v, 3);
-                           dp -= 3;
-                        }
-                        sptr -= 3;
-                     }
-                  }
-               } /* end of pixel_bytes == 3 */
-
-               else if (pixel_bytes == 1)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 2) << 2);
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub edi, 31
-                           sub esi, 3
-loop1_pass0:
-                           movd mm0, [esi]     ; X X X X v0 v1 v2 v3
-                           movq mm1, mm0       ; X X X X v0 v1 v2 v3
-                           punpcklbw mm0, mm0  ; v0 v0 v1 v1 v2 v2 v3 v3
-                           movq mm2, mm0       ; v0 v0 v1 v1 v2 v2 v3 v3
-                           punpcklwd mm0, mm0  ; v2 v2 v2 v2 v3 v3 v3 v3
-                           movq mm3, mm0       ; v2 v2 v2 v2 v3 v3 v3 v3
-                           punpckldq mm0, mm0  ; v3 v3 v3 v3 v3 v3 v3 v3
-                           punpckhdq mm3, mm3  ; v2 v2 v2 v2 v2 v2 v2 v2
-                           movq [edi], mm0     ; move to memory v3
-                           punpckhwd mm2, mm2  ; v0 v0 v0 v0 v1 v1 v1 v1
-                           movq [edi+8], mm3   ; move to memory v2
-                           movq mm4, mm2       ; v0 v0 v0 v0 v1 v1 v1 v1
-                           punpckldq mm2, mm2  ; v1 v1 v1 v1 v1 v1 v1 v1
-                           punpckhdq mm4, mm4  ; v0 v0 v0 v0 v0 v0 v0 v0
-                           movq [edi+16], mm2  ; move to memory v1
-                           movq [edi+24], mm4  ; move to memory v0
-                           sub esi, 4
-                           sub edi, 32
-                           sub ecx, 4
-                           jnz loop1_pass0
-                           EMMS
-                        }
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*8;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                       /* I simplified this part in version 1.0.4e
-                        * here and in several other instances where
-                        * pixel_bytes == 1  -- GR-P
-                        *
-                        * Original code:
-                        *
-                        * png_byte v[8];
-                        * png_memcpy(v, sptr, pixel_bytes);
-                        * for (j = 0; j < png_pass_inc[pass]; j++)
-                        * {
-                        *    png_memcpy(dp, v, pixel_bytes);
-                        *    dp -= pixel_bytes;
-                        * }
-                        * sptr -= pixel_bytes;
-                        *
-                        * Replacement code is in the next three lines:
-                        */
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                           *dp-- = *sptr;
-                        sptr--;
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 2) << 2);
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub edi, 15
-                           sub esi, 3
-loop1_pass2:
-                           movd mm0, [esi]     ; X X X X v0 v1 v2 v3
-                           punpcklbw mm0, mm0  ; v0 v0 v1 v1 v2 v2 v3 v3
-                           movq mm1, mm0       ; v0 v0 v1 v1 v2 v2 v3 v3
-                           punpcklwd mm0, mm0  ; v2 v2 v2 v2 v3 v3 v3 v3
-                           punpckhwd mm1, mm1  ; v0 v0 v0 v0 v1 v1 v1 v1
-                           movq [edi], mm0     ; move to memory v2 and v3
-                           sub esi, 4
-                           movq [edi+8], mm1   ; move to memory v1     and v0
-                           sub edi, 16
-                           sub ecx, 4
-                           jnz loop1_pass2
-                           EMMS
-                        }
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*4;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           *dp-- = *sptr;
-                        }
-                        sptr --;
-                     }
-                  }
-                  else if (width) /* && ((pass == 4) || (pass == 5))) */
-                  {
-                     int width_mmx = ((width >> 3) << 3);
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub edi, 15
-                           sub esi, 7
-loop1_pass4:
-                           movq mm0, [esi]     ; v0 v1 v2 v3 v4 v5 v6 v7
-                           movq mm1, mm0       ; v0 v1 v2 v3 v4 v5 v6 v7
-                           punpcklbw mm0, mm0  ; v4 v4 v5 v5 v6 v6 v7 v7
-                           //movq mm1, mm0     ; v0 v0 v1 v1 v2 v2 v3 v3
-                           punpckhbw mm1, mm1  ;v0 v0 v1 v1 v2 v2 v3 v3
-                           movq [edi+8], mm1   ; move to memory v0 v1 v2 and v3
-                           sub esi, 8
-                           movq [edi], mm0     ; move to memory v4 v5 v6 and v7
-                           //sub esi, 4
-                           sub edi, 16
-                           sub ecx, 8
-                           jnz loop1_pass4
-                           EMMS
-                        }
-                     }
-
-                     sptr -= width_mmx;
-                     dp -= width_mmx*2;
-                     for (i = width; i; i--)
-                     {
-                        int j;
-
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           *dp-- = *sptr;
-                        }
-                        sptr --;
-                     }
-                  }
-               } /* end of pixel_bytes == 1 */
-
-               else if (pixel_bytes == 2)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1);
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 2
-                           sub edi, 30
-loop2_pass0:
-                           movd mm0, [esi]        ; X X X X v1 v0 v3 v2
-                           punpcklwd mm0, mm0     ; v1 v0 v1 v0 v3 v2 v3 v2
-                           movq mm1, mm0          ; v1 v0 v1 v0 v3 v2 v3 v2
-                           punpckldq mm0, mm0     ; v3 v2 v3 v2 v3 v2 v3 v2
-                           punpckhdq mm1, mm1     ; v1 v0 v1 v0 v1 v0 v1 v0
-                           movq [edi], mm0
-                           movq [edi + 8], mm0
-                           movq [edi + 16], mm1
-                           movq [edi + 24], mm1
-                           sub esi, 4
-                           sub edi, 32
-                           sub ecx, 2
-                           jnz loop2_pass0
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*2 - 2);            // sign fixed
-                     dp -= (width_mmx*16 - 2);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 2
-                           sub edi, 14
-loop2_pass2:
-                           movd mm0, [esi]        ; X X X X v1 v0 v3 v2
-                           punpcklwd mm0, mm0     ; v1 v0 v1 v0 v3 v2 v3 v2
-                           movq mm1, mm0          ; v1 v0 v1 v0 v3 v2 v3 v2
-                           punpckldq mm0, mm0     ; v3 v2 v3 v2 v3 v2 v3 v2
-                           punpckhdq mm1, mm1     ; v1 v0 v1 v0 v1 v0 v1 v0
-                           movq [edi], mm0
-                           sub esi, 4
-                           movq [edi + 8], mm1
-                           //sub esi, 4
-                           sub edi, 16
-                           sub ecx, 2
-                           jnz loop2_pass2
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*2 - 2);            // sign fixed
-                     dp -= (width_mmx*8 - 2);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-                  else if (width)  // pass == 4 or 5
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 2
-                           sub edi, 6
-loop2_pass4:
-                           movd mm0, [esi]        ; X X X X v1 v0 v3 v2
-                           punpcklwd mm0, mm0     ; v1 v0 v1 v0 v3 v2 v3 v2
-                           sub esi, 4
-                           movq [edi], mm0
-                           sub edi, 8
-                           sub ecx, 2
-                           jnz loop2_pass4
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*2 - 2);            // sign fixed
-                     dp -= (width_mmx*4 - 2);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 2;
-                        png_memcpy(v, sptr, 2);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 2;
-                           png_memcpy(dp, v, 2);
-                        }
-                     }
-                  }
-               } /* end of pixel_bytes == 2 */
-
-               else if (pixel_bytes == 4)
-               {
-                  if (((pass == 0) || (pass == 1)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 4
-                           sub edi, 60
-loop4_pass0:
-                           movq mm0, [esi]        ; v3 v2 v1 v0 v7 v6 v5 v4
-                           movq mm1, mm0          ; v3 v2 v1 v0 v7 v6 v5 v4
-                           punpckldq mm0, mm0     ; v7 v6 v5 v4 v7 v6 v5 v4
-                           punpckhdq mm1, mm1     ; v3 v2 v1 v0 v3 v2 v1 v0
-                           movq [edi], mm0
-                           movq [edi + 8], mm0
-                           movq [edi + 16], mm0
-                           movq [edi + 24], mm0
-                           movq [edi+32], mm1
-                           movq [edi + 40], mm1
-                           movq [edi+ 48], mm1
-                           sub esi, 8
-                           movq [edi + 56], mm1
-                           sub edi, 64
-                           sub ecx, 2
-                           jnz loop4_pass0
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*4 - 4);            // sign fixed
-                     dp -= (width_mmx*32 - 4);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-                  else if (((pass == 2) || (pass == 3)) && width)
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 4
-                           sub edi, 28
-loop4_pass2:
-                           movq mm0, [esi]      ; v3 v2 v1 v0 v7 v6 v5 v4
-                           movq mm1, mm0        ; v3 v2 v1 v0 v7 v6 v5 v4
-                           punpckldq mm0, mm0   ; v7 v6 v5 v4 v7 v6 v5 v4
-                           punpckhdq mm1, mm1   ; v3 v2 v1 v0 v3 v2 v1 v0
-                           movq [edi], mm0
-                           movq [edi + 8], mm0
-                           movq [edi+16], mm1
-                           movq [edi + 24], mm1
-                           sub esi, 8
-                           sub edi, 32
-                           sub ecx, 2
-                           jnz loop4_pass2
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*4 - 4);            // sign fixed
-                     dp -= (width_mmx*16 - 4);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-                  else if (width)  // pass == 4 or 5
-                  {
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
-                     {
-                        _asm
-                        {
-                           mov esi, sptr
-                           mov edi, dp
-                           mov ecx, width_mmx
-                           sub esi, 4
-                           sub edi, 12
-loop4_pass4:
-                           movq mm0, [esi]      ; v3 v2 v1 v0 v7 v6 v5 v4
-                           movq mm1, mm0        ; v3 v2 v1 v0 v7 v6 v5 v4
-                           punpckldq mm0, mm0   ; v7 v6 v5 v4 v7 v6 v5 v4
-                           punpckhdq mm1, mm1   ; v3 v2 v1 v0 v3 v2 v1 v0
-                           movq [edi], mm0
-                           sub esi, 8
-                           movq [edi + 8], mm1
-                           sub edi, 16
-                           sub ecx, 2
-                           jnz loop4_pass4
-                           EMMS
-                        }
-                     }
-
-                     sptr -= (width_mmx*4 - 4);          // sign fixed
-                     dp -= (width_mmx*8 - 4);            // sign fixed
-                     for (i = width; i; i--)
-                     {
-                        png_byte v[8];
-                        int j;
-                        sptr -= 4;
-                        png_memcpy(v, sptr, 4);
-                        for (j = 0; j < png_pass_inc[pass]; j++)
-                        {
-                           dp -= 4;
-                           png_memcpy(dp, v, 4);
-                        }
-                     }
-                  }
-
-               } /* end of pixel_bytes == 4 */
-
-               else if (pixel_bytes == 6)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, 6);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, 6);
-                        dp -= 6;
-                     }
-                     sptr -= 6;
-                  }
-               } /* end of pixel_bytes == 6 */
-
-               else
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr-= pixel_bytes;
-                  }
-               }
-            } /* end of mmx_supported */
-
-            else /* MMX not supported:  use modified C code - takes advantage
-                  * of inlining of memcpy for a constant */
-            {
-               if (pixel_bytes == 1)
-               {
-                  for (i = width; i; i--)
-                  {
-                     int j;
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                        *dp-- = *sptr;
-                     sptr--;
-                  }
-               }
-               else if (pixel_bytes == 3)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-               else if (pixel_bytes == 2)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-               else if (pixel_bytes == 4)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-               else if (pixel_bytes == 6)
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-               else
-               {
-                  for (i = width; i; i--)
-                  {
-                     png_byte v[8];
-                     int j;
-                     png_memcpy(v, sptr, pixel_bytes);
-                     for (j = 0; j < png_pass_inc[pass]; j++)
-                     {
-                        png_memcpy(dp, v, pixel_bytes);
-                        dp -= pixel_bytes;
-                     }
-                     sptr -= pixel_bytes;
-                  }
-               }
-
-            } /* end of MMX not supported */
-            break;
-         }
-      } /* end switch (row_info->pixel_depth) */
-
-      row_info->width = final_width;
-
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,final_width);
-   }
-
-}
-
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
-
-
-// These variables are utilized in the functions below.  They are declared
-// globally here to ensure alignment on 8-byte boundaries.
-
-union uAll {
-   __int64 use;
-   double  align;
-} LBCarryMask = {0x0101010101010101},
-  HBClearMask = {0x7f7f7f7f7f7f7f7f},
-  ActiveMask, ActiveMask2, ActiveMaskEnd, ShiftBpp, ShiftRem;
-
-
-// Optimized code for PNG Average filter decoder
-void /* PRIVATE */
-png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row
-                            , png_bytep prev_row)
-{
-   int bpp;
-   png_uint_32 FullLength;
-   png_uint_32 MMXLength;
-   //png_uint_32 len;
-   int diff;
-
-   bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel
-   FullLength  = row_info->rowbytes; // # of bytes to filter
-   _asm {
-         // Init address pointers and offset
-         mov edi, row          // edi ==> Avg(x)
-         xor ebx, ebx          // ebx ==> x
-         mov edx, edi
-         mov esi, prev_row           // esi ==> Prior(x)
-         sub edx, bpp          // edx ==> Raw(x-bpp)
-
-         xor eax, eax
-         // Compute the Raw value for the first bpp bytes
-         //    Raw(x) = Avg(x) + (Prior(x)/2)
-davgrlp:
-         mov al, [esi + ebx]   // Load al with Prior(x)
-         inc ebx
-         shr al, 1             // divide by 2
-         add al, [edi+ebx-1]   // Add Avg(x); -1 to offset inc ebx
-         cmp ebx, bpp
-         mov [edi+ebx-1], al    // Write back Raw(x);
-                            // mov does not affect flags; -1 to offset inc ebx
-         jb davgrlp
-         // get # of bytes to alignment
-         mov diff, edi         // take start of row
-         add diff, ebx         // add bpp
-         add diff, 0xf         // add 7 + 8 to incr past alignment boundary
-         and diff, 0xfffffff8  // mask to alignment boundary
-         sub diff, edi         // subtract from start ==> value ebx at alignment
-         jz davggo
-         // fix alignment
-         // Compute the Raw value for the bytes upto the alignment boundary
-         //    Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-         xor ecx, ecx
-davglp1:
-         xor eax, eax
-         mov cl, [esi + ebx]        // load cl with Prior(x)
-         mov al, [edx + ebx]  // load al with Raw(x-bpp)
-         add ax, cx
-         inc ebx
-         shr ax, 1            // divide by 2
-         add al, [edi+ebx-1]  // Add Avg(x); -1 to offset inc ebx
-         cmp ebx, diff              // Check if at alignment boundary
-         mov [edi+ebx-1], al        // Write back Raw(x);
-                            // mov does not affect flags; -1 to offset inc ebx
-         jb davglp1               // Repeat until at alignment boundary
-davggo:
-         mov eax, FullLength
-         mov ecx, eax
-         sub eax, ebx          // subtract alignment fix
-         and eax, 0x00000007   // calc bytes over mult of 8
-         sub ecx, eax          // drop over bytes from original length
-         mov MMXLength, ecx
-   } // end _asm block
-   // Now do the math for the rest of the row
-   switch ( bpp )
-   {
-      case 3:
-      {
-         ActiveMask.use  = 0x0000000000ffffff;
-         ShiftBpp.use = 24;    // == 3 * 8
-         ShiftRem.use = 40;    // == 64 - 24
-         _asm {
-            // Re-init address pointers and offset
-            movq mm7, ActiveMask
-            mov ebx, diff      // ebx ==> x = offset to alignment boundary
-            movq mm5, LBCarryMask
-            mov edi, row       // edi ==> Avg(x)
-            movq mm4, HBClearMask
-            mov esi, prev_row        // esi ==> Prior(x)
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm2, [edi + ebx - 8]  // Load previous aligned 8 bytes
-                               // (we correct position in loop below)
-davg3lp:
-            movq mm0, [edi + ebx]      // Load mm0 with Avg(x)
-            // Add (Prev_row/2) to Average
-            movq mm3, mm5
-            psrlq mm2, ShiftRem      // Correct position Raw(x-bpp) data
-            movq mm1, [esi + ebx]    // Load mm1 with Prior(x)
-            movq mm6, mm7
-            pand mm3, mm1      // get lsb for each prev_row byte
-            psrlq mm1, 1       // divide prev_row bytes by 2
-            pand  mm1, mm4     // clear invalid bit 7 of each byte
-            paddb mm0, mm1     // add (Prev_row/2) to Avg for each byte
-            // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
-            movq mm1, mm3      // now use mm1 for getting LBCarrys
-            pand mm1, mm2      // get LBCarrys for each byte where both
-                               // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1       // divide raw bytes by 2
-            pand  mm2, mm4     // clear invalid bit 7 of each byte
-            paddb mm2, mm1     // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6      // Leave only Active Group 1 bytes to add to Avg
-            paddb mm0, mm2     // add (Raw/2) + LBCarrys to Avg for each Active
-                               //  byte
-            // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry
-            psllq mm6, ShiftBpp  // shift the mm6 mask to cover bytes 3-5
-            movq mm2, mm0        // mov updated Raws to mm2
-            psllq mm2, ShiftBpp  // shift data to position correctly
-            movq mm1, mm3        // now use mm1 for getting LBCarrys
-            pand mm1, mm2      // get LBCarrys for each byte where both
-                               // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1       // divide raw bytes by 2
-            pand  mm2, mm4     // clear invalid bit 7 of each byte
-            paddb mm2, mm1     // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6      // Leave only Active Group 2 bytes to add to Avg
-            paddb mm0, mm2     // add (Raw/2) + LBCarrys to Avg for each Active
-                               //  byte
-
-            // Add 3rd active group (Raw(x-bpp)/2) to Average with LBCarry
-            psllq mm6, ShiftBpp  // shift the mm6 mask to cover the last two
-                                 // bytes
-            movq mm2, mm0        // mov updated Raws to mm2
-            psllq mm2, ShiftBpp  // shift data to position correctly
-                              // Data only needs to be shifted once here to
-                              // get the correct x-bpp offset.
-            movq mm1, mm3     // now use mm1 for getting LBCarrys
-            pand mm1, mm2     // get LBCarrys for each byte where both
-                              // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1      // divide raw bytes by 2
-            pand  mm2, mm4    // clear invalid bit 7 of each byte
-            paddb mm2, mm1    // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6     // Leave only Active Group 2 bytes to add to Avg
-            add ebx, 8
-            paddb mm0, mm2    // add (Raw/2) + LBCarrys to Avg for each Active
-                              // byte
-
-            // Now ready to write back to memory
-            movq [edi + ebx - 8], mm0
-            // Move updated Raw(x) to use as Raw(x-bpp) for next loop
-            cmp ebx, MMXLength
-            movq mm2, mm0     // mov updated Raw(x) to mm2
-            jb davg3lp
-         } // end _asm block
-      }
-      break;
-
-      case 6:
-      case 4:
-      case 7:
-      case 5:
-      {
-         ActiveMask.use  = 0xffffffffffffffff;  // use shift below to clear
-                                                // appropriate inactive bytes
-         ShiftBpp.use = bpp << 3;
-         ShiftRem.use = 64 - ShiftBpp.use;
-         _asm {
-            movq mm4, HBClearMask
-            // Re-init address pointers and offset
-            mov ebx, diff       // ebx ==> x = offset to alignment boundary
-            // Load ActiveMask and clear all bytes except for 1st active group
-            movq mm7, ActiveMask
-            mov edi, row         // edi ==> Avg(x)
-            psrlq mm7, ShiftRem
-            mov esi, prev_row    // esi ==> Prior(x)
-            movq mm6, mm7
-            movq mm5, LBCarryMask
-            psllq mm6, ShiftBpp  // Create mask for 2nd active group
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm2, [edi + ebx - 8]  // Load previous aligned 8 bytes
-                                 // (we correct position in loop below)
-davg4lp:
-            movq mm0, [edi + ebx]
-            psrlq mm2, ShiftRem  // shift data to position correctly
-            movq mm1, [esi + ebx]
-            // Add (Prev_row/2) to Average
-            movq mm3, mm5
-            pand mm3, mm1     // get lsb for each prev_row byte
-            psrlq mm1, 1      // divide prev_row bytes by 2
-            pand  mm1, mm4    // clear invalid bit 7 of each byte
-            paddb mm0, mm1    // add (Prev_row/2) to Avg for each byte
-            // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
-            movq mm1, mm3     // now use mm1 for getting LBCarrys
-            pand mm1, mm2     // get LBCarrys for each byte where both
-                              // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1      // divide raw bytes by 2
-            pand  mm2, mm4    // clear invalid bit 7 of each byte
-            paddb mm2, mm1    // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm7     // Leave only Active Group 1 bytes to add to Avg
-            paddb mm0, mm2    // add (Raw/2) + LBCarrys to Avg for each Active
-                              // byte
-            // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry
-            movq mm2, mm0     // mov updated Raws to mm2
-            psllq mm2, ShiftBpp // shift data to position correctly
-            add ebx, 8
-            movq mm1, mm3     // now use mm1 for getting LBCarrys
-            pand mm1, mm2     // get LBCarrys for each byte where both
-                              // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1      // divide raw bytes by 2
-            pand  mm2, mm4    // clear invalid bit 7 of each byte
-            paddb mm2, mm1    // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6     // Leave only Active Group 2 bytes to add to Avg
-            paddb mm0, mm2    // add (Raw/2) + LBCarrys to Avg for each Active
-                              // byte
-            cmp ebx, MMXLength
-            // Now ready to write back to memory
-            movq [edi + ebx - 8], mm0
-            // Prep Raw(x-bpp) for next loop
-            movq mm2, mm0     // mov updated Raws to mm2
-            jb davg4lp
-         } // end _asm block
-      }
-      break;
-      case 2:
-      {
-         ActiveMask.use  = 0x000000000000ffff;
-         ShiftBpp.use = 16;   // == 2 * 8     [BUGFIX]
-         ShiftRem.use = 48;   // == 64 - 16   [BUGFIX]
-         _asm {
-            // Load ActiveMask
-            movq mm7, ActiveMask
-            // Re-init address pointers and offset
-            mov ebx, diff     // ebx ==> x = offset to alignment boundary
-            movq mm5, LBCarryMask
-            mov edi, row      // edi ==> Avg(x)
-            movq mm4, HBClearMask
-            mov esi, prev_row  // esi ==> Prior(x)
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm2, [edi + ebx - 8]  // Load previous aligned 8 bytes
-                              // (we correct position in loop below)
-davg2lp:
-            movq mm0, [edi + ebx]
-            psrlq mm2, ShiftRem  // shift data to position correctly   [BUGFIX]
-            movq mm1, [esi + ebx]
-            // Add (Prev_row/2) to Average
-            movq mm3, mm5
-            pand mm3, mm1     // get lsb for each prev_row byte
-            psrlq mm1, 1      // divide prev_row bytes by 2
-            pand  mm1, mm4    // clear invalid bit 7 of each byte
-            movq mm6, mm7
-            paddb mm0, mm1    // add (Prev_row/2) to Avg for each byte
-            // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
-            movq mm1, mm3     // now use mm1 for getting LBCarrys
-            pand mm1, mm2     // get LBCarrys for each byte where both
-                              // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1      // divide raw bytes by 2
-            pand  mm2, mm4    // clear invalid bit 7 of each byte
-            paddb mm2, mm1    // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6     // Leave only Active Group 1 bytes to add to Avg
-            paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte
-            // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry
-            psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 2 & 3
-            movq mm2, mm0       // mov updated Raws to mm2
-            psllq mm2, ShiftBpp // shift data to position correctly
-            movq mm1, mm3       // now use mm1 for getting LBCarrys
-            pand mm1, mm2       // get LBCarrys for each byte where both
-                                // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1        // divide raw bytes by 2
-            pand  mm2, mm4      // clear invalid bit 7 of each byte
-            paddb mm2, mm1      // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6       // Leave only Active Group 2 bytes to add to Avg
-            paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte
-
-            // Add rdd active group (Raw(x-bpp)/2) to Average with LBCarry
-            psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 4 & 5
-            movq mm2, mm0       // mov updated Raws to mm2
-            psllq mm2, ShiftBpp // shift data to position correctly
-                                // Data only needs to be shifted once here to
-                                // get the correct x-bpp offset.
-            movq mm1, mm3       // now use mm1 for getting LBCarrys
-            pand mm1, mm2       // get LBCarrys for each byte where both
-                                // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1        // divide raw bytes by 2
-            pand  mm2, mm4      // clear invalid bit 7 of each byte
-            paddb mm2, mm1      // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6       // Leave only Active Group 2 bytes to add to Avg
-            paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte
-
-            // Add 4th active group (Raw(x-bpp)/2) to Average with LBCarry
-            psllq mm6, ShiftBpp  // shift the mm6 mask to cover bytes 6 & 7
-            movq mm2, mm0        // mov updated Raws to mm2
-            psllq mm2, ShiftBpp  // shift data to position correctly
-                                 // Data only needs to be shifted once here to
-                                 // get the correct x-bpp offset.
-            add ebx, 8
-            movq mm1, mm3    // now use mm1 for getting LBCarrys
-            pand mm1, mm2    // get LBCarrys for each byte where both
-                             // lsb's were == 1 (Only valid for active group)
-            psrlq mm2, 1     // divide raw bytes by 2
-            pand  mm2, mm4   // clear invalid bit 7 of each byte
-            paddb mm2, mm1   // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            pand mm2, mm6    // Leave only Active Group 2 bytes to add to Avg
-            paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte
-
-            cmp ebx, MMXLength
-            // Now ready to write back to memory
-            movq [edi + ebx - 8], mm0
-            // Prep Raw(x-bpp) for next loop
-            movq mm2, mm0    // mov updated Raws to mm2
-            jb davg2lp
-        } // end _asm block
-      }
-      break;
-
-      case 1:                 // bpp == 1
-      {
-         _asm {
-            // Re-init address pointers and offset
-            mov ebx, diff     // ebx ==> x = offset to alignment boundary
-            mov edi, row      // edi ==> Avg(x)
-            cmp ebx, FullLength  // Test if offset at end of array
-            jnb davg1end
-            // Do Paeth decode for remaining bytes
-            mov esi, prev_row    // esi ==> Prior(x)
-            mov edx, edi
-            xor ecx, ecx         // zero ecx before using cl & cx in loop below
-            sub edx, bpp         // edx ==> Raw(x-bpp)
-davg1lp:
-            // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-            xor eax, eax
-            mov cl, [esi + ebx]  // load cl with Prior(x)
-            mov al, [edx + ebx]  // load al with Raw(x-bpp)
-            add ax, cx
-            inc ebx
-            shr ax, 1            // divide by 2
-            add al, [edi+ebx-1]  // Add Avg(x); -1 to offset inc ebx
-            cmp ebx, FullLength  // Check if at end of array
-            mov [edi+ebx-1], al  // Write back Raw(x);
-                         // mov does not affect flags; -1 to offset inc ebx
-            jb davg1lp
-davg1end:
-         } // end _asm block
-      }
-      return;
-
-      case 8:             // bpp == 8
-      {
-         _asm {
-            // Re-init address pointers and offset
-            mov ebx, diff           // ebx ==> x = offset to alignment boundary
-            movq mm5, LBCarryMask
-            mov edi, row            // edi ==> Avg(x)
-            movq mm4, HBClearMask
-            mov esi, prev_row       // esi ==> Prior(x)
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm2, [edi + ebx - 8]  // Load previous aligned 8 bytes
-                                // (NO NEED to correct position in loop below)
-davg8lp:
-            movq mm0, [edi + ebx]
-            movq mm3, mm5
-            movq mm1, [esi + ebx]
-            add ebx, 8
-            pand mm3, mm1       // get lsb for each prev_row byte
-            psrlq mm1, 1        // divide prev_row bytes by 2
-            pand mm3, mm2       // get LBCarrys for each byte where both
-                                // lsb's were == 1
-            psrlq mm2, 1        // divide raw bytes by 2
-            pand  mm1, mm4      // clear invalid bit 7 of each byte
-            paddb mm0, mm3      // add LBCarrys to Avg for each byte
-            pand  mm2, mm4      // clear invalid bit 7 of each byte
-            paddb mm0, mm1      // add (Prev_row/2) to Avg for each byte
-            paddb mm0, mm2      // add (Raw/2) to Avg for each byte
-            cmp ebx, MMXLength
-            movq [edi + ebx - 8], mm0
-            movq mm2, mm0       // reuse as Raw(x-bpp)
-            jb davg8lp
-        } // end _asm block
-      }
-      break;
-      default:                  // bpp greater than 8
-      {
-        _asm {
-            movq mm5, LBCarryMask
-            // Re-init address pointers and offset
-            mov ebx, diff       // ebx ==> x = offset to alignment boundary
-            mov edi, row        // edi ==> Avg(x)
-            movq mm4, HBClearMask
-            mov edx, edi
-            mov esi, prev_row   // esi ==> Prior(x)
-            sub edx, bpp        // edx ==> Raw(x-bpp)
-davgAlp:
-            movq mm0, [edi + ebx]
-            movq mm3, mm5
-            movq mm1, [esi + ebx]
-            pand mm3, mm1       // get lsb for each prev_row byte
-            movq mm2, [edx + ebx]
-            psrlq mm1, 1        // divide prev_row bytes by 2
-            pand mm3, mm2       // get LBCarrys for each byte where both
-                                // lsb's were == 1
-            psrlq mm2, 1        // divide raw bytes by 2
-            pand  mm1, mm4      // clear invalid bit 7 of each byte
-            paddb mm0, mm3      // add LBCarrys to Avg for each byte
-            pand  mm2, mm4      // clear invalid bit 7 of each byte
-            paddb mm0, mm1      // add (Prev_row/2) to Avg for each byte
-            add ebx, 8
-            paddb mm0, mm2      // add (Raw/2) to Avg for each byte
-            cmp ebx, MMXLength
-            movq [edi + ebx - 8], mm0
-            jb davgAlp
-        } // end _asm block
-      }
-      break;
-   }                         // end switch ( bpp )
-
-   _asm {
-         // MMX acceleration complete now do clean-up
-         // Check if any remaining bytes left to decode
-         mov ebx, MMXLength    // ebx ==> x = offset bytes remaining after MMX
-         mov edi, row          // edi ==> Avg(x)
-         cmp ebx, FullLength   // Test if offset at end of array
-         jnb davgend
-         // Do Paeth decode for remaining bytes
-         mov esi, prev_row     // esi ==> Prior(x)
-         mov edx, edi
-         xor ecx, ecx          // zero ecx before using cl & cx in loop below
-         sub edx, bpp          // edx ==> Raw(x-bpp)
-davglp2:
-         // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2)
-         xor eax, eax
-         mov cl, [esi + ebx]   // load cl with Prior(x)
-         mov al, [edx + ebx]   // load al with Raw(x-bpp)
-         add ax, cx
-         inc ebx
-         shr ax, 1              // divide by 2
-         add al, [edi+ebx-1]    // Add Avg(x); -1 to offset inc ebx
-         cmp ebx, FullLength    // Check if at end of array
-         mov [edi+ebx-1], al    // Write back Raw(x);
-                          // mov does not affect flags; -1 to offset inc ebx
-         jb davglp2
-davgend:
-         emms             // End MMX instructions; prep for possible FP instrs.
-   } // end _asm block
-}
-
-// Optimized code for PNG Paeth filter decoder
-void /* PRIVATE */
-png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
-                              png_bytep prev_row)
-{
-   png_uint_32 FullLength;
-   png_uint_32 MMXLength;
-   //png_uint_32 len;
-   int bpp;
-   int diff;
-   //int ptemp;
-   int patemp, pbtemp, pctemp;
-
-   bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel
-   FullLength  = row_info->rowbytes; // # of bytes to filter
-   _asm
-   {
-         xor ebx, ebx        // ebx ==> x offset
-         mov edi, row
-         xor edx, edx        // edx ==> x-bpp offset
-         mov esi, prev_row
-         xor eax, eax
-
-         // Compute the Raw value for the first bpp bytes
-         // Note: the formula works out to be always
-         //   Paeth(x) = Raw(x) + Prior(x)      where x < bpp
-dpthrlp:
-         mov al, [edi + ebx]
-         add al, [esi + ebx]
-         inc ebx
-         cmp ebx, bpp
-         mov [edi + ebx - 1], al
-         jb dpthrlp
-         // get # of bytes to alignment
-         mov diff, edi         // take start of row
-         add diff, ebx         // add bpp
-         xor ecx, ecx
-         add diff, 0xf         // add 7 + 8 to incr past alignment boundary
-         and diff, 0xfffffff8  // mask to alignment boundary
-         sub diff, edi         // subtract from start ==> value ebx at alignment
-         jz dpthgo
-         // fix alignment
-dpthlp1:
-         xor eax, eax
-         // pav = p - a = (a + b - c) - a = b - c
-         mov al, [esi + ebx]   // load Prior(x) into al
-         mov cl, [esi + edx]   // load Prior(x-bpp) into cl
-         sub eax, ecx          // subtract Prior(x-bpp)
-         mov patemp, eax       // Save pav for later use
-         xor eax, eax
-         // pbv = p - b = (a + b - c) - b = a - c
-         mov al, [edi + edx]   // load Raw(x-bpp) into al
-         sub eax, ecx          // subtract Prior(x-bpp)
-         mov ecx, eax
-         // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-         add eax, patemp       // pcv = pav + pbv
-         // pc = abs(pcv)
-         test eax, 0x80000000
-         jz dpthpca
-         neg eax               // reverse sign of neg values
-dpthpca:
-         mov pctemp, eax       // save pc for later use
-         // pb = abs(pbv)
-         test ecx, 0x80000000
-         jz dpthpba
-         neg ecx               // reverse sign of neg values
-dpthpba:
-         mov pbtemp, ecx       // save pb for later use
-         // pa = abs(pav)
-         mov eax, patemp
-         test eax, 0x80000000
-         jz dpthpaa
-         neg eax               // reverse sign of neg values
-dpthpaa:
-         mov patemp, eax       // save pa for later use
-         // test if pa <= pb
-         cmp eax, ecx
-         jna dpthabb
-         // pa > pb; now test if pb <= pc
-         cmp ecx, pctemp
-         jna dpthbbc
-         // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-         mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-         jmp dpthpaeth
-dpthbbc:
-         // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-         mov cl, [esi + ebx]   // load Prior(x) into cl
-         jmp dpthpaeth
-dpthabb:
-         // pa <= pb; now test if pa <= pc
-         cmp eax, pctemp
-         jna dpthabc
-         // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-         mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-         jmp dpthpaeth
-dpthabc:
-         // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-         mov cl, [edi + edx]  // load Raw(x-bpp) into cl
-dpthpaeth:
-         inc ebx
-         inc edx
-         // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-         add [edi + ebx - 1], cl
-         cmp ebx, diff
-         jb dpthlp1
-dpthgo:
-         mov ecx, FullLength
-         mov eax, ecx
-         sub eax, ebx          // subtract alignment fix
-         and eax, 0x00000007   // calc bytes over mult of 8
-         sub ecx, eax          // drop over bytes from original length
-         mov MMXLength, ecx
-   } // end _asm block
-   // Now do the math for the rest of the row
-   switch ( bpp )
-   {
-      case 3:
-      {
-         ActiveMask.use = 0x0000000000ffffff;
-         ActiveMaskEnd.use = 0xffff000000000000;
-         ShiftBpp.use = 24;    // == bpp(3) * 8
-         ShiftRem.use = 40;    // == 64 - 24
-         _asm
-         {
-            mov ebx, diff
-            mov edi, row
-            mov esi, prev_row
-            pxor mm0, mm0
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]
-dpth3lp:
-            psrlq mm1, ShiftRem     // shift last 3 bytes to 1st 3 bytes
-            movq mm2, [esi + ebx]   // load b=Prior(x)
-            punpcklbw mm1, mm0      // Unpack High bytes of a
-            movq mm3, [esi+ebx-8]   // Prep c=Prior(x-bpp) bytes
-            punpcklbw mm2, mm0      // Unpack High bytes of b
-            psrlq mm3, ShiftRem     // shift last 3 bytes to 1st 3 bytes
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            punpcklbw mm3, mm0      // Unpack High bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4    // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4       // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5    // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5       // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6    // Create mask pcv bytes < 0
-            pand mm0, mm6       // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5    // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            paddw mm7, mm3
-            pxor mm0, mm0
-            packuswb mm7, mm1
-            movq mm3, [esi + ebx]   // load c=Prior(x-bpp)
-            pand mm7, ActiveMask
-            movq mm2, mm3           // load b=Prior(x) step 1
-            paddb mm7, [edi + ebx]  // add Paeth predictor with Raw(x)
-            punpcklbw mm3, mm0      // Unpack High bytes of c
-            movq [edi + ebx], mm7   // write back updated value
-            movq mm1, mm7           // Now mm1 will be used as Raw(x-bpp)
-            // Now do Paeth for 2nd set of bytes (3-5)
-            psrlq mm2, ShiftBpp     // load b=Prior(x) step 2
-            punpcklbw mm1, mm0      // Unpack High bytes of a
-            pxor mm7, mm7
-            punpcklbw mm2, mm0      // Unpack High bytes of b
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            psubw mm5, mm3
-            psubw mm4, mm3
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) =
-            //       pav + pbv = pbv + pav
-            movq mm6, mm5
-            paddw mm6, mm4
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm5       // Create mask pbv bytes < 0
-            pcmpgtw mm7, mm4       // Create mask pav bytes < 0
-            pand mm0, mm5          // Only pbv bytes < 0 in mm0
-            pand mm7, mm4          // Only pav bytes < 0 in mm7
-            psubw mm5, mm0
-            psubw mm4, mm7
-            psubw mm5, mm0
-            psubw mm4, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            movq mm2, [esi + ebx]  // load b=Prior(x)
-            pand mm3, mm7
-            pandn mm7, mm0
-            pxor mm1, mm1
-            paddw mm7, mm3
-            pxor mm0, mm0
-            packuswb mm7, mm1
-            movq mm3, mm2           // load c=Prior(x-bpp) step 1
-            pand mm7, ActiveMask
-            punpckhbw mm2, mm0      // Unpack High bytes of b
-            psllq mm7, ShiftBpp     // Shift bytes to 2nd group of 3 bytes
-             // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            paddb mm7, [edi + ebx]  // add Paeth predictor with Raw(x)
-            psllq mm3, ShiftBpp     // load c=Prior(x-bpp) step 2
-            movq [edi + ebx], mm7   // write back updated value
-            movq mm1, mm7
-            punpckhbw mm3, mm0      // Unpack High bytes of c
-            psllq mm1, ShiftBpp     // Shift bytes
-                                    // Now mm1 will be used as Raw(x-bpp)
-            // Now do Paeth for 3rd, and final, set of bytes (6-7)
-            pxor mm7, mm7
-            punpckhbw mm1, mm0      // Unpack High bytes of a
-            psubw mm4, mm3
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            pxor mm0, mm0
-            paddw mm6, mm5
-
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4    // Create mask pav bytes < 0
-            pcmpgtw mm7, mm5    // Create mask pbv bytes < 0
-            pand mm0, mm4       // Only pav bytes < 0 in mm7
-            pand mm7, mm5       // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6    // Create mask pcv bytes < 0
-            pand mm0, mm6       // Only pav bytes < 0 in mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5    // pa > pb?
-            movq mm0, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            pandn mm0, mm1
-            pandn mm7, mm4
-            paddw mm0, mm2
-            paddw mm7, mm5
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6    // pab > pc?
-            pand mm3, mm7
-            pandn mm7, mm0
-            paddw mm7, mm3
-            pxor mm1, mm1
-            packuswb mm1, mm7
-            // Step ebx to next set of 8 bytes and repeat loop til done
-            add ebx, 8
-            pand mm1, ActiveMaskEnd
-            paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x)
-
-            cmp ebx, MMXLength
-            pxor mm0, mm0              // pxor does not affect flags
-            movq [edi + ebx - 8], mm1  // write back updated value
-                                 // mm1 will be used as Raw(x-bpp) next loop
-                           // mm3 ready to be used as Prior(x-bpp) next loop
-            jb dpth3lp
-         } // end _asm block
-      }
-      break;
-
-      case 6:
-      case 7:
-      case 5:
-      {
-         ActiveMask.use  = 0x00000000ffffffff;
-         ActiveMask2.use = 0xffffffff00000000;
-         ShiftBpp.use = bpp << 3;    // == bpp * 8
-         ShiftRem.use = 64 - ShiftBpp.use;
-         _asm
-         {
-            mov ebx, diff
-            mov edi, row
-            mov esi, prev_row
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]
-            pxor mm0, mm0
-dpth6lp:
-            // Must shift to position Raw(x-bpp) data
-            psrlq mm1, ShiftRem
-            // Do first set of 4 bytes
-            movq mm3, [esi+ebx-8]      // read c=Prior(x-bpp) bytes
-            punpcklbw mm1, mm0      // Unpack Low bytes of a
-            movq mm2, [esi + ebx]   // load b=Prior(x)
-            punpcklbw mm2, mm0      // Unpack Low bytes of b
-            // Must shift to position Prior(x-bpp) data
-            psrlq mm3, ShiftRem
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            punpcklbw mm3, mm0      // Unpack Low bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4    // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4       // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5    // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5       // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6    // Create mask pcv bytes < 0
-            pand mm0, mm6       // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5    // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6    // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            paddw mm7, mm3
-            pxor mm0, mm0
-            packuswb mm7, mm1
-            movq mm3, [esi + ebx - 8]  // load c=Prior(x-bpp)
-            pand mm7, ActiveMask
-            psrlq mm3, ShiftRem
-            movq mm2, [esi + ebx]      // load b=Prior(x) step 1
-            paddb mm7, [edi + ebx]     // add Paeth predictor with Raw(x)
-            movq mm6, mm2
-            movq [edi + ebx], mm7      // write back updated value
-            movq mm1, [edi+ebx-8]
-            psllq mm6, ShiftBpp
-            movq mm5, mm7
-            psrlq mm1, ShiftRem
-            por mm3, mm6
-            psllq mm5, ShiftBpp
-            punpckhbw mm3, mm0         // Unpack High bytes of c
-            por mm1, mm5
-            // Do second set of 4 bytes
-            punpckhbw mm2, mm0         // Unpack High bytes of b
-            punpckhbw mm1, mm0         // Unpack High bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4       // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4          // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5       // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5          // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6           // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            pxor mm1, mm1
-            paddw mm7, mm3
-            pxor mm0, mm0
-            // Step ex to next set of 8 bytes and repeat loop til done
-            add ebx, 8
-            packuswb mm1, mm7
-            paddb mm1, [edi + ebx - 8]     // add Paeth predictor with Raw(x)
-            cmp ebx, MMXLength
-            movq [edi + ebx - 8], mm1      // write back updated value
-                                // mm1 will be used as Raw(x-bpp) next loop
-            jb dpth6lp
-         } // end _asm block
-      }
-      break;
-
-      case 4:
-      {
-         ActiveMask.use  = 0x00000000ffffffff;
-         _asm {
-            mov ebx, diff
-            mov edi, row
-            mov esi, prev_row
-            pxor mm0, mm0
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]    // Only time should need to read
-                                     //  a=Raw(x-bpp) bytes
-dpth4lp:
-            // Do first set of 4 bytes
-            movq mm3, [esi+ebx-8]    // read c=Prior(x-bpp) bytes
-            punpckhbw mm1, mm0       // Unpack Low bytes of a
-            movq mm2, [esi + ebx]    // load b=Prior(x)
-            punpcklbw mm2, mm0       // Unpack High bytes of b
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            punpckhbw mm3, mm0       // Unpack High bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4       // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4          // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5       // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5          // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            paddw mm7, mm3
-            pxor mm0, mm0
-            packuswb mm7, mm1
-            movq mm3, [esi + ebx]      // load c=Prior(x-bpp)
-            pand mm7, ActiveMask
-            movq mm2, mm3              // load b=Prior(x) step 1
-            paddb mm7, [edi + ebx]     // add Paeth predictor with Raw(x)
-            punpcklbw mm3, mm0         // Unpack High bytes of c
-            movq [edi + ebx], mm7      // write back updated value
-            movq mm1, mm7              // Now mm1 will be used as Raw(x-bpp)
-            // Do second set of 4 bytes
-            punpckhbw mm2, mm0         // Unpack Low bytes of b
-            punpcklbw mm1, mm0         // Unpack Low bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4       // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4          // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5       // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5          // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            pxor mm1, mm1
-            paddw mm7, mm3
-            pxor mm0, mm0
-            // Step ex to next set of 8 bytes and repeat loop til done
-            add ebx, 8
-            packuswb mm1, mm7
-            paddb mm1, [edi + ebx - 8]     // add Paeth predictor with Raw(x)
-            cmp ebx, MMXLength
-            movq [edi + ebx - 8], mm1      // write back updated value
-                                // mm1 will be used as Raw(x-bpp) next loop
-            jb dpth4lp
-         } // end _asm block
-      }
-      break;
-      case 8:                          // bpp == 8
-      {
-         ActiveMask.use  = 0x00000000ffffffff;
-         _asm {
-            mov ebx, diff
-            mov edi, row
-            mov esi, prev_row
-            pxor mm0, mm0
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]      // Only time should need to read
-                                       //  a=Raw(x-bpp) bytes
-dpth8lp:
-            // Do first set of 4 bytes
-            movq mm3, [esi+ebx-8]      // read c=Prior(x-bpp) bytes
-            punpcklbw mm1, mm0         // Unpack Low bytes of a
-            movq mm2, [esi + ebx]      // load b=Prior(x)
-            punpcklbw mm2, mm0         // Unpack Low bytes of b
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            punpcklbw mm3, mm0         // Unpack Low bytes of c
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4       // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4          // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5       // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5          // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            paddw mm7, mm3
-            pxor mm0, mm0
-            packuswb mm7, mm1
-            movq mm3, [esi+ebx-8]    // read c=Prior(x-bpp) bytes
-            pand mm7, ActiveMask
-            movq mm2, [esi + ebx]    // load b=Prior(x)
-            paddb mm7, [edi + ebx]   // add Paeth predictor with Raw(x)
-            punpckhbw mm3, mm0       // Unpack High bytes of c
-            movq [edi + ebx], mm7    // write back updated value
-            movq mm1, [edi+ebx-8]    // read a=Raw(x-bpp) bytes
-
-            // Do second set of 4 bytes
-            punpckhbw mm2, mm0       // Unpack High bytes of b
-            punpckhbw mm1, mm0       // Unpack High bytes of a
-            // pav = p - a = (a + b - c) - a = b - c
-            movq mm4, mm2
-            // pbv = p - b = (a + b - c) - b = a - c
-            movq mm5, mm1
-            psubw mm4, mm3
-            pxor mm7, mm7
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            movq mm6, mm4
-            psubw mm5, mm3
-            // pa = abs(p-a) = abs(pav)
-            // pb = abs(p-b) = abs(pbv)
-            // pc = abs(p-c) = abs(pcv)
-            pcmpgtw mm0, mm4       // Create mask pav bytes < 0
-            paddw mm6, mm5
-            pand mm0, mm4          // Only pav bytes < 0 in mm7
-            pcmpgtw mm7, mm5       // Create mask pbv bytes < 0
-            psubw mm4, mm0
-            pand mm7, mm5          // Only pbv bytes < 0 in mm0
-            psubw mm4, mm0
-            psubw mm5, mm7
-            pxor mm0, mm0
-            pcmpgtw mm0, mm6       // Create mask pcv bytes < 0
-            pand mm0, mm6          // Only pav bytes < 0 in mm7
-            psubw mm5, mm7
-            psubw mm6, mm0
-            //  test pa <= pb
-            movq mm7, mm4
-            psubw mm6, mm0
-            pcmpgtw mm7, mm5       // pa > pb?
-            movq mm0, mm7
-            // use mm7 mask to merge pa & pb
-            pand mm5, mm7
-            // use mm0 mask copy to merge a & b
-            pand mm2, mm0
-            pandn mm7, mm4
-            pandn mm0, mm1
-            paddw mm7, mm5
-            paddw mm0, mm2
-            //  test  ((pa <= pb)? pa:pb) <= pc
-            pcmpgtw mm7, mm6       // pab > pc?
-            pxor mm1, mm1
-            pand mm3, mm7
-            pandn mm7, mm0
-            pxor mm1, mm1
-            paddw mm7, mm3
-            pxor mm0, mm0
-            // Step ex to next set of 8 bytes and repeat loop til done
-            add ebx, 8
-            packuswb mm1, mm7
-            paddb mm1, [edi + ebx - 8]     // add Paeth predictor with Raw(x)
-            cmp ebx, MMXLength
-            movq [edi + ebx - 8], mm1      // write back updated value
-                            // mm1 will be used as Raw(x-bpp) next loop
-            jb dpth8lp
-         } // end _asm block
-      }
-      break;
-
-      case 1:                // bpp = 1
-      case 2:                // bpp = 2
-      default:               // bpp > 8
-      {
-         _asm {
-            mov ebx, diff
-            cmp ebx, FullLength
-            jnb dpthdend
-            mov edi, row
-            mov esi, prev_row
-            // Do Paeth decode for remaining bytes
-            mov edx, ebx
-            xor ecx, ecx        // zero ecx before using cl & cx in loop below
-            sub edx, bpp        // Set edx = ebx - bpp
-dpthdlp:
-            xor eax, eax
-            // pav = p - a = (a + b - c) - a = b - c
-            mov al, [esi + ebx]        // load Prior(x) into al
-            mov cl, [esi + edx]        // load Prior(x-bpp) into cl
-            sub eax, ecx                 // subtract Prior(x-bpp)
-            mov patemp, eax                 // Save pav for later use
-            xor eax, eax
-            // pbv = p - b = (a + b - c) - b = a - c
-            mov al, [edi + edx]        // load Raw(x-bpp) into al
-            sub eax, ecx                 // subtract Prior(x-bpp)
-            mov ecx, eax
-            // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-            add eax, patemp                 // pcv = pav + pbv
-            // pc = abs(pcv)
-            test eax, 0x80000000
-            jz dpthdpca
-            neg eax                     // reverse sign of neg values
-dpthdpca:
-            mov pctemp, eax             // save pc for later use
-            // pb = abs(pbv)
-            test ecx, 0x80000000
-            jz dpthdpba
-            neg ecx                     // reverse sign of neg values
-dpthdpba:
-            mov pbtemp, ecx             // save pb for later use
-            // pa = abs(pav)
-            mov eax, patemp
-            test eax, 0x80000000
-            jz dpthdpaa
-            neg eax                     // reverse sign of neg values
-dpthdpaa:
-            mov patemp, eax             // save pa for later use
-            // test if pa <= pb
-            cmp eax, ecx
-            jna dpthdabb
-            // pa > pb; now test if pb <= pc
-            cmp ecx, pctemp
-            jna dpthdbbc
-            // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-            mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-            jmp dpthdpaeth
-dpthdbbc:
-            // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-            mov cl, [esi + ebx]        // load Prior(x) into cl
-            jmp dpthdpaeth
-dpthdabb:
-            // pa <= pb; now test if pa <= pc
-            cmp eax, pctemp
-            jna dpthdabc
-            // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-            mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-            jmp dpthdpaeth
-dpthdabc:
-            // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-            mov cl, [edi + edx]  // load Raw(x-bpp) into cl
-dpthdpaeth:
-            inc ebx
-            inc edx
-            // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-            add [edi + ebx - 1], cl
-            cmp ebx, FullLength
-            jb dpthdlp
-dpthdend:
-         } // end _asm block
-      }
-      return;                   // No need to go further with this one
-   }                         // end switch ( bpp )
-   _asm
-   {
-         // MMX acceleration complete now do clean-up
-         // Check if any remaining bytes left to decode
-         mov ebx, MMXLength
-         cmp ebx, FullLength
-         jnb dpthend
-         mov edi, row
-         mov esi, prev_row
-         // Do Paeth decode for remaining bytes
-         mov edx, ebx
-         xor ecx, ecx         // zero ecx before using cl & cx in loop below
-         sub edx, bpp         // Set edx = ebx - bpp
-dpthlp2:
-         xor eax, eax
-         // pav = p - a = (a + b - c) - a = b - c
-         mov al, [esi + ebx]  // load Prior(x) into al
-         mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-         sub eax, ecx         // subtract Prior(x-bpp)
-         mov patemp, eax      // Save pav for later use
-         xor eax, eax
-         // pbv = p - b = (a + b - c) - b = a - c
-         mov al, [edi + edx]  // load Raw(x-bpp) into al
-         sub eax, ecx         // subtract Prior(x-bpp)
-         mov ecx, eax
-         // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv
-         add eax, patemp      // pcv = pav + pbv
-         // pc = abs(pcv)
-         test eax, 0x80000000
-         jz dpthpca2
-         neg eax              // reverse sign of neg values
-dpthpca2:
-         mov pctemp, eax      // save pc for later use
-         // pb = abs(pbv)
-         test ecx, 0x80000000
-         jz dpthpba2
-         neg ecx              // reverse sign of neg values
-dpthpba2:
-         mov pbtemp, ecx      // save pb for later use
-         // pa = abs(pav)
-         mov eax, patemp
-         test eax, 0x80000000
-         jz dpthpaa2
-         neg eax              // reverse sign of neg values
-dpthpaa2:
-         mov patemp, eax      // save pa for later use
-         // test if pa <= pb
-         cmp eax, ecx
-         jna dpthabb2
-         // pa > pb; now test if pb <= pc
-         cmp ecx, pctemp
-         jna dpthbbc2
-         // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-         mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-         jmp dpthpaeth2
-dpthbbc2:
-         // pb <= pc; Raw(x) = Paeth(x) + Prior(x)
-         mov cl, [esi + ebx]        // load Prior(x) into cl
-         jmp dpthpaeth2
-dpthabb2:
-         // pa <= pb; now test if pa <= pc
-         cmp eax, pctemp
-         jna dpthabc2
-         // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp)
-         mov cl, [esi + edx]  // load Prior(x-bpp) into cl
-         jmp dpthpaeth2
-dpthabc2:
-         // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp)
-         mov cl, [edi + edx]  // load Raw(x-bpp) into cl
-dpthpaeth2:
-         inc ebx
-         inc edx
-         // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256
-         add [edi + ebx - 1], cl
-         cmp ebx, FullLength
-         jb dpthlp2
-dpthend:
-         emms             // End MMX instructions; prep for possible FP instrs.
-   } // end _asm block
-}
-
-// Optimized code for PNG Sub filter decoder
-void /* PRIVATE */
-png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
-{
-   //int test;
-   int bpp;
-   png_uint_32 FullLength;
-   png_uint_32 MMXLength;
-   int diff;
-
-   bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel
-   FullLength  = row_info->rowbytes - bpp; // # of bytes to filter
-   _asm {
-        mov edi, row
-        mov esi, edi               // lp = row
-        add edi, bpp               // rp = row + bpp
-        xor eax, eax
-        // get # of bytes to alignment
-        mov diff, edi               // take start of row
-        add diff, 0xf               // add 7 + 8 to incr past
-                                        // alignment boundary
-        xor ebx, ebx
-        and diff, 0xfffffff8        // mask to alignment boundary
-        sub diff, edi               // subtract from start ==> value
-                                        //  ebx at alignment
-        jz dsubgo
-        // fix alignment
-dsublp1:
-        mov al, [esi+ebx]
-        add [edi+ebx], al
-        inc ebx
-        cmp ebx, diff
-        jb dsublp1
-dsubgo:
-        mov ecx, FullLength
-        mov edx, ecx
-        sub edx, ebx                  // subtract alignment fix
-        and edx, 0x00000007           // calc bytes over mult of 8
-        sub ecx, edx                  // drop over bytes from length
-        mov MMXLength, ecx
-   } // end _asm block
-
-   // Now do the math for the rest of the row
-   switch ( bpp )
-   {
-        case 3:
-        {
-         ActiveMask.use  = 0x0000ffffff000000;
-         ShiftBpp.use = 24;       // == 3 * 8
-         ShiftRem.use  = 40;      // == 64 - 24
-         _asm {
-            mov edi, row
-            movq mm7, ActiveMask  // Load ActiveMask for 2nd active byte group
-            mov esi, edi              // lp = row
-            add edi, bpp          // rp = row + bpp
-            movq mm6, mm7
-            mov ebx, diff
-            psllq mm6, ShiftBpp   // Move mask in mm6 to cover 3rd active
-                                  // byte group
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]
-dsub3lp:
-            psrlq mm1, ShiftRem   // Shift data for adding 1st bpp bytes
-                          // no need for mask; shift clears inactive bytes
-            // Add 1st active group
-            movq mm0, [edi+ebx]
-            paddb mm0, mm1
-            // Add 2nd active group
-            movq mm1, mm0         // mov updated Raws to mm1
-            psllq mm1, ShiftBpp   // shift data to position correctly
-            pand mm1, mm7         // mask to use only 2nd active group
-            paddb mm0, mm1
-            // Add 3rd active group
-            movq mm1, mm0         // mov updated Raws to mm1
-            psllq mm1, ShiftBpp   // shift data to position correctly
-            pand mm1, mm6         // mask to use only 3rd active group
-            add ebx, 8
-            paddb mm0, mm1
-            cmp ebx, MMXLength
-            movq [edi+ebx-8], mm0     // Write updated Raws back to array
-            // Prep for doing 1st add at top of loop
-            movq mm1, mm0
-            jb dsub3lp
-         } // end _asm block
-      }
-      break;
-
-      case 1:
-      {
-         // Placed here just in case this is a duplicate of the
-         // non-MMX code for the SUB filter in png_read_filter_row below
-         //
-         //         png_bytep rp;
-         //         png_bytep lp;
-         //         png_uint_32 i;
-         //         bpp = (row_info->pixel_depth + 7) >> 3;
-         //         for (i = (png_uint_32)bpp, rp = row + bpp, lp = row;
-         //            i < row_info->rowbytes; i++, rp++, lp++)
-         //      {
-         //            *rp = (png_byte)(((int)(*rp) + (int)(*lp)) & 0xff);
-         //      }
-         _asm {
-            mov ebx, diff
-            mov edi, row
-            cmp ebx, FullLength
-            jnb dsub1end
-            mov esi, edi          // lp = row
-            xor eax, eax
-            add edi, bpp      // rp = row + bpp
-dsub1lp:
-            mov al, [esi+ebx]
-            add [edi+ebx], al
-            inc ebx
-            cmp ebx, FullLength
-            jb dsub1lp
-dsub1end:
-         } // end _asm block
-      }
-      return;
-
-      case 6:
-      case 7:
-      case 4:
-      case 5:
-      {
-         ShiftBpp.use = bpp << 3;
-         ShiftRem.use = 64 - ShiftBpp.use;
-         _asm {
-            mov edi, row
-            mov ebx, diff
-            mov esi, edi               // lp = row
-            add edi, bpp           // rp = row + bpp
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]
-dsub4lp:
-            psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes
-                          // no need for mask; shift clears inactive bytes
-            movq mm0, [edi+ebx]
-            paddb mm0, mm1
-            // Add 2nd active group
-            movq mm1, mm0          // mov updated Raws to mm1
-            psllq mm1, ShiftBpp    // shift data to position correctly
-                                   // there is no need for any mask
-                                   // since shift clears inactive bits/bytes
-            add ebx, 8
-            paddb mm0, mm1
-            cmp ebx, MMXLength
-            movq [edi+ebx-8], mm0
-            movq mm1, mm0          // Prep for doing 1st add at top of loop
-            jb dsub4lp
-         } // end _asm block
-      }
-      break;
-
-      case 2:
-      {
-         ActiveMask.use  = 0x00000000ffff0000;
-         ShiftBpp.use = 16;       // == 2 * 8
-         ShiftRem.use = 48;       // == 64 - 16
-         _asm {
-            movq mm7, ActiveMask  // Load ActiveMask for 2nd active byte group
-            mov ebx, diff
-            movq mm6, mm7
-            mov edi, row
-            psllq mm6, ShiftBpp     // Move mask in mm6 to cover 3rd active
-                                    //  byte group
-            mov esi, edi            // lp = row
-            movq mm5, mm6
-            add edi, bpp            // rp = row + bpp
-            psllq mm5, ShiftBpp     // Move mask in mm5 to cover 4th active
-                                    //  byte group
-            // PRIME the pump (load the first Raw(x-bpp) data set
-            movq mm1, [edi+ebx-8]
-dsub2lp:
-            // Add 1st active group
-            psrlq mm1, ShiftRem     // Shift data for adding 1st bpp bytes
-                                    // no need for mask; shift clears inactive
-                                    //  bytes
-            movq mm0, [edi+ebx]
-            paddb mm0, mm1
-            // Add 2nd active group
-            movq mm1, mm0           // mov updated Raws to mm1
-            psllq mm1, ShiftBpp     // shift data to position correctly
-            pand mm1, mm7           // mask to use only 2nd active group
-            paddb mm0, mm1
-            // Add 3rd active group
-            movq mm1, mm0           // mov updated Raws to mm1
-            psllq mm1, ShiftBpp     // shift data to position correctly
-            pand mm1, mm6           // mask to use only 3rd active group
-            paddb mm0, mm1
-            // Add 4th active group
-            movq mm1, mm0           // mov updated Raws to mm1
-            psllq mm1, ShiftBpp     // shift data to position correctly
-            pand mm1, mm5           // mask to use only 4th active group
-            add ebx, 8
-            paddb mm0, mm1
-            cmp ebx, MMXLength
-            movq [edi+ebx-8], mm0   // Write updated Raws back to array
-            movq mm1, mm0           // Prep for doing 1st add at top of loop
-            jb dsub2lp
-         } // end _asm block
-      }
-      break;
-      case 8:
-      {
-         _asm {
-            mov edi, row
-            mov ebx, diff
-            mov esi, edi            // lp = row
-            add edi, bpp            // rp = row + bpp
-            mov ecx, MMXLength
-            movq mm7, [edi+ebx-8]   // PRIME the pump (load the first
-                                    // Raw(x-bpp) data set
-            and ecx, 0x0000003f     // calc bytes over mult of 64
-dsub8lp:
-            movq mm0, [edi+ebx]     // Load Sub(x) for 1st 8 bytes
-            paddb mm0, mm7
-            movq mm1, [edi+ebx+8]   // Load Sub(x) for 2nd 8 bytes
-            movq [edi+ebx], mm0    // Write Raw(x) for 1st 8 bytes
-                                   // Now mm0 will be used as Raw(x-bpp) for
-                                   // the 2nd group of 8 bytes.  This will be
-                                   // repeated for each group of 8 bytes with
-                                   // the 8th group being used as the Raw(x-bpp)
-                                   // for the 1st group of the next loop.
-            paddb mm1, mm0
-            movq mm2, [edi+ebx+16]  // Load Sub(x) for 3rd 8 bytes
-            movq [edi+ebx+8], mm1   // Write Raw(x) for 2nd 8 bytes
-            paddb mm2, mm1
-            movq mm3, [edi+ebx+24]  // Load Sub(x) for 4th 8 bytes
-            movq [edi+ebx+16], mm2  // Write Raw(x) for 3rd 8 bytes
-            paddb mm3, mm2
-            movq mm4, [edi+ebx+32]  // Load Sub(x) for 5th 8 bytes
-            movq [edi+ebx+24], mm3  // Write Raw(x) for 4th 8 bytes
-            paddb mm4, mm3
-            movq mm5, [edi+ebx+40]  // Load Sub(x) for 6th 8 bytes
-            movq [edi+ebx+32], mm4  // Write Raw(x) for 5th 8 bytes
-            paddb mm5, mm4
-            movq mm6, [edi+ebx+48]  // Load Sub(x) for 7th 8 bytes
-            movq [edi+ebx+40], mm5  // Write Raw(x) for 6th 8 bytes
-            paddb mm6, mm5
-            movq mm7, [edi+ebx+56]  // Load Sub(x) for 8th 8 bytes
-            movq [edi+ebx+48], mm6  // Write Raw(x) for 7th 8 bytes
-            add ebx, 64
-            paddb mm7, mm6
-            cmp ebx, ecx
-            movq [edi+ebx-8], mm7   // Write Raw(x) for 8th 8 bytes
-            jb dsub8lp
-            cmp ebx, MMXLength
-            jnb dsub8lt8
-dsub8lpA:
-            movq mm0, [edi+ebx]
-            add ebx, 8
-            paddb mm0, mm7
-            cmp ebx, MMXLength
-            movq [edi+ebx-8], mm0   // use -8 to offset early add to ebx
-            movq mm7, mm0           // Move calculated Raw(x) data to mm1 to
-                                    // be the new Raw(x-bpp) for the next loop
-            jb dsub8lpA
-dsub8lt8:
-         } // end _asm block
-      }
-      break;
-
-      default:                // bpp greater than 8 bytes
-      {
-         _asm {
-            mov ebx, diff
-            mov edi, row
-            mov esi, edi           // lp = row
-            add edi, bpp           // rp = row + bpp
-dsubAlp:
-            movq mm0, [edi+ebx]
-            movq mm1, [esi+ebx]
-            add ebx, 8
-            paddb mm0, mm1
-            cmp ebx, MMXLength
-            movq [edi+ebx-8], mm0  // mov does not affect flags; -8 to offset
-                                   //  add ebx
-            jb dsubAlp
-         } // end _asm block
-      }
-      break;
-
-   } // end switch ( bpp )
-
-   _asm {
-        mov ebx, MMXLength
-        mov edi, row
-        cmp ebx, FullLength
-        jnb dsubend
-        mov esi, edi               // lp = row
-        xor eax, eax
-        add edi, bpp               // rp = row + bpp
-dsublp2:
-        mov al, [esi+ebx]
-        add [edi+ebx], al
-        inc ebx
-        cmp ebx, FullLength
-        jb dsublp2
-dsubend:
-        emms             // End MMX instructions; prep for possible FP instrs.
-   } // end _asm block
-}
-
-// Optimized code for PNG Up filter decoder
-void /* PRIVATE */
-png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row,
-   png_bytep prev_row)
-{
-   png_uint_32 len;
-   len  = row_info->rowbytes;       // # of bytes to filter
-   _asm {
-      mov edi, row
-      // get # of bytes to alignment
-      mov ecx, edi
-      xor ebx, ebx
-      add ecx, 0x7
-      xor eax, eax
-      and ecx, 0xfffffff8
-      mov esi, prev_row
-      sub ecx, edi
-      jz dupgo
-      // fix alignment
-duplp1:
-      mov al, [edi+ebx]
-      add al, [esi+ebx]
-      inc ebx
-      cmp ebx, ecx
-      mov [edi + ebx-1], al  // mov does not affect flags; -1 to offset inc ebx
-      jb duplp1
-dupgo:
-      mov ecx, len
-      mov edx, ecx
-      sub edx, ebx                  // subtract alignment fix
-      and edx, 0x0000003f           // calc bytes over mult of 64
-      sub ecx, edx                  // drop over bytes from length
-      // Unrolled loop - use all MMX registers and interleave to reduce
-      // number of branch instructions (loops) and reduce partial stalls
-duploop:
-      movq mm1, [esi+ebx]
-      movq mm0, [edi+ebx]
-      movq mm3, [esi+ebx+8]
-      paddb mm0, mm1
-      movq mm2, [edi+ebx+8]
-      movq [edi+ebx], mm0
-      paddb mm2, mm3
-      movq mm5, [esi+ebx+16]
-      movq [edi+ebx+8], mm2
-      movq mm4, [edi+ebx+16]
-      movq mm7, [esi+ebx+24]
-      paddb mm4, mm5
-      movq mm6, [edi+ebx+24]
-      movq [edi+ebx+16], mm4
-      paddb mm6, mm7
-      movq mm1, [esi+ebx+32]
-      movq [edi+ebx+24], mm6
-      movq mm0, [edi+ebx+32]
-      movq mm3, [esi+ebx+40]
-      paddb mm0, mm1
-      movq mm2, [edi+ebx+40]
-      movq [edi+ebx+32], mm0
-      paddb mm2, mm3
-      movq mm5, [esi+ebx+48]
-      movq [edi+ebx+40], mm2
-      movq mm4, [edi+ebx+48]
-      movq mm7, [esi+ebx+56]
-      paddb mm4, mm5
-      movq mm6, [edi+ebx+56]
-      movq [edi+ebx+48], mm4
-      add ebx, 64
-      paddb mm6, mm7
-      cmp ebx, ecx
-      movq [edi+ebx-8], mm6 // (+56)movq does not affect flags;
-                                     // -8 to offset add ebx
-      jb duploop
-
-      cmp edx, 0                     // Test for bytes over mult of 64
-      jz dupend
-
-
-      // 2 lines added by lcreeve at netins.net
-      // (mail 11 Jul 98 in png-implement list)
-      cmp edx, 8 //test for less than 8 bytes
-      jb duplt8
-
-
-      add ecx, edx
-      and edx, 0x00000007           // calc bytes over mult of 8
-      sub ecx, edx                  // drop over bytes from length
-      jz duplt8
-      // Loop using MMX registers mm0 & mm1 to update 8 bytes simultaneously
-duplpA:
-      movq mm1, [esi+ebx]
-      movq mm0, [edi+ebx]
-      add ebx, 8
-      paddb mm0, mm1
-      cmp ebx, ecx
-      movq [edi+ebx-8], mm0 // movq does not affect flags; -8 to offset add ebx
-      jb duplpA
-      cmp edx, 0            // Test for bytes over mult of 8
-      jz dupend
-duplt8:
-      xor eax, eax
-      add ecx, edx          // move over byte count into counter
-      // Loop using x86 registers to update remaining bytes
-duplp2:
-      mov al, [edi + ebx]
-      add al, [esi + ebx]
-      inc ebx
-      cmp ebx, ecx
-      mov [edi + ebx-1], al // mov does not affect flags; -1 to offset inc ebx
-      jb duplp2
-dupend:
-      // Conversion of filtered row completed
-      emms          // End MMX instructions; prep for possible FP instrs.
-   } // end _asm block
-}
-
-
-// Optimized png_read_filter_row routines
-void /* PRIVATE */
-png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
-   row, png_bytep prev_row, int filter)
-{
-#ifdef PNG_DEBUG
-   char filnm[10];
-#endif
-
-   if (mmx_supported == 2) {
-#if !defined(PNG_1_0_X)
-       /* this should have happened in png_init_mmx_flags() already */
-       png_warning(png_ptr, "asm_flags may not have been initialized");
-#endif
-       png_mmx_support();
-   }
-
-#ifdef PNG_DEBUG
-   png_debug(1, "in png_read_filter_row\n");
-   switch (filter)
-   {
-      case 0: sprintf(filnm, "none");
-         break;
-#if !defined(PNG_1_0_X)
-      case 1: sprintf(filnm, "sub-%s",
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : "x86");
-         break;
-      case 2: sprintf(filnm, "up-%s",
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : "x86");
-         break;
-      case 3: sprintf(filnm, "avg-%s",
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : "x86");
-         break;
-      case 4: sprintf(filnm, "Paeth-%s",
-        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":"x86");
-         break;
-#else
-      case 1: sprintf(filnm, "sub");
-         break;
-      case 2: sprintf(filnm, "up");
-         break;
-      case 3: sprintf(filnm, "avg");
-         break;
-      case 4: sprintf(filnm, "Paeth");
-         break;
-#endif
-      default: sprintf(filnm, "unknw");
-         break;
-   }
-   png_debug2(0,"row=%5d, %s, ", png_ptr->row_number, filnm);
-   png_debug2(0, "pd=%2d, b=%d, ", (int)row_info->pixel_depth,
-      (int)((row_info->pixel_depth + 7) >> 3));
-   png_debug1(0,"len=%8d, ", row_info->rowbytes);
-#endif /* PNG_DEBUG */
-
-   switch (filter)
-   {
-      case PNG_FILTER_VALUE_NONE:
-         break;
-
-      case PNG_FILTER_VALUE_SUB:
-      {
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_sub(row_info, row);
-         }
-         else
-         {
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_bytep rp = row + bpp;
-            png_bytep lp = row;
-
-            for (i = bpp; i < istop; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
-               rp++;
-            }
-         }
-         break;
-      }
-
-      case PNG_FILTER_VALUE_UP:
-      {
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_up(row_info, row, prev_row);
-         }
-         else
-         {
-            png_uint_32 i;
-            png_uint_32 istop = row_info->rowbytes;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-
-            for (i = 0; i < istop; ++i)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-               rp++;
-            }
-         }
-         break;
-      }
-
-      case PNG_FILTER_VALUE_AVG:
-      {
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_avg(row_info, row, prev_row);
-         }
-         else
-         {
-            png_uint_32 i;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-            png_bytep lp = row;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_uint_32 istop = row_info->rowbytes - bpp;
-
-            for (i = 0; i < bpp; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) +
-                  ((int)(*pp++) >> 1)) & 0xff);
-               rp++;
-            }
-
-            for (i = 0; i < istop; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) +
-                  ((int)(*pp++ + *lp++) >> 1)) & 0xff);
-               rp++;
-            }
-         }
-         break;
-      }
-
-      case PNG_FILTER_VALUE_PAETH:
-      {
-#if !defined(PNG_1_0_X)
-         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
-             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
-             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
-#else
-         if (mmx_supported)
-#endif
-         {
-            png_read_filter_row_mmx_paeth(row_info, row, prev_row);
-         }
-         else
-         {
-            png_uint_32 i;
-            png_bytep rp = row;
-            png_bytep pp = prev_row;
-            png_bytep lp = row;
-            png_bytep cp = prev_row;
-            png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
-            png_uint_32 istop=row_info->rowbytes - bpp;
-
-            for (i = 0; i < bpp; i++)
-            {
-               *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
-               rp++;
-            }
-
-            for (i = 0; i < istop; i++)   // use leftover rp,pp
-            {
-               int a, b, c, pa, pb, pc, p;
-
-               a = *lp++;
-               b = *pp++;
-               c = *cp++;
-
-               p = b - c;
-               pc = a - c;
-
-#ifdef PNG_USE_ABS
-               pa = abs(p);
-               pb = abs(pc);
-               pc = abs(p + pc);
-#else
-               pa = p < 0 ? -p : p;
-               pb = pc < 0 ? -pc : pc;
-               pc = (p + pc) < 0 ? -(p + pc) : p + pc;
-#endif
-
-               /*
-                  if (pa <= pb && pa <= pc)
-                     p = a;
-                  else if (pb <= pc)
-                     p = b;
-                  else
-                     p = c;
-                */
-
-               p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
-
-               *rp = (png_byte)(((int)(*rp) + p) & 0xff);
-               rp++;
-            }
-         }
-         break;
-      }
-
-      default:
-         png_warning(png_ptr, "Ignoring bad row filter type");
-         *row=0;
-         break;
-   }
-}
-
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED && PNG_USE_PNGVCRD */
diff --git a/tkimg1.3/libpng/pngwio.c b/tkimg1.3/libpng/pngwio.c
deleted file mode 100644
index 9bbf35e..0000000
--- a/tkimg1.3/libpng/pngwio.c
+++ /dev/null
@@ -1,228 +0,0 @@
-
-/* pngwio.c - functions for data output
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This file provides a location for all output.  Users who need
- * special handling are expected to write functions that have the same
- * arguments as these and perform similar functions, but that possibly
- * use different output methods.  Note that you shouldn't change these
- * functions, but rather write replacement functions and then change
- * them at run time with png_set_write_fn(...).
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
-
-/* Write the data to whatever output you are using.  The default routine
-   writes to a file pointer.  Note that this routine sometimes gets called
-   with very small lengths, so you should implement some kind of simple
-   buffering if you are using unbuffered writes.  This should never be asked
-   to write more than 64K on a 16 bit machine.  */
-
-void /* PRIVATE */
-png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   if (png_ptr->write_data_fn != NULL )
-      (*(png_ptr->write_data_fn))(png_ptr, data, length);
-   else
-      png_error(png_ptr, "Call to NULL write function");
-}
-
-#if !defined(PNG_NO_STDIO)
-/* This is the function that does the actual writing of data.  If you are
-   not writing to a standard C stream, you should create a replacement
-   write_data function and use it at run time with png_set_write_fn(), rather
-   than changing the library. */
-#ifndef USE_FAR_KEYWORD
-void PNGAPI
-png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_uint_32 check;
-
-#if defined(_WIN32_WCE)
-   if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
-      check = 0;
-#else
-   check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
-#endif
-   if (check != length)
-      png_error(png_ptr, "Write Error");
-}
-#else
-/* this is the model-independent version. Since the standard I/O library
-   can't handle far buffers in the medium and small models, we have to copy
-   the data.
-*/
-
-#define NEAR_BUF_SIZE 1024
-#define MIN(a,b) (a <= b ? a : b)
-
-void PNGAPI
-png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   png_uint_32 check;
-   png_byte *near_data;  /* Needs to be "png_byte *" instead of "png_bytep" */
-   png_FILE_p io_ptr;
-
-   /* Check if data really is near. If so, use usual code. */
-   near_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
-   if ((png_bytep)near_data == data)
-   {
-#if defined(_WIN32_WCE)
-      if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )
-         check = 0;
-#else
-      check = fwrite(near_data, 1, length, io_ptr);
-#endif
-   }
-   else
-   {
-      png_byte buf[NEAR_BUF_SIZE];
-      png_size_t written, remaining, err;
-      check = 0;
-      remaining = length;
-      do
-      {
-         written = MIN(NEAR_BUF_SIZE, remaining);
-         png_memcpy(buf, data, written); /* copy far buffer to near buffer */
-#if defined(_WIN32_WCE)
-         if ( !WriteFile(io_ptr, buf, written, &err, NULL) )
-            err = 0;
-#else
-         err = fwrite(buf, 1, written, io_ptr);
-#endif
-         if (err != written)
-            break;
-         else
-            check += err;
-         data += written;
-         remaining -= written;
-      }
-      while (remaining != 0);
-   }
-   if (check != length)
-      png_error(png_ptr, "Write Error");
-}
-
-#endif
-#endif
-
-/* This function is called to output any data pending writing (normally
-   to disk).  After png_flush is called, there should be no data pending
-   writing in any buffers. */
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-void /* PRIVATE */
-png_flush(png_structp png_ptr)
-{
-   if (png_ptr->output_flush_fn != NULL)
-      (*(png_ptr->output_flush_fn))(png_ptr);
-}
-
-#if !defined(PNG_NO_STDIO)
-void PNGAPI
-png_default_flush(png_structp png_ptr)
-{
-#if !defined(_WIN32_WCE)
-   png_FILE_p io_ptr;
-   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
-   if (io_ptr != NULL)
-      fflush(io_ptr);
-#endif
-}
-#endif
-#endif
-
-/* This function allows the application to supply new output functions for
-   libpng if standard C streams aren't being used.
-
-   This function takes as its arguments:
-   png_ptr       - pointer to a png output data structure
-   io_ptr        - pointer to user supplied structure containing info about
-                   the output functions.  May be NULL.
-   write_data_fn - pointer to a new output function that takes as its
-                   arguments a pointer to a png_struct, a pointer to
-                   data to be written, and a 32-bit unsigned int that is
-                   the number of bytes to be written.  The new write
-                   function should call png_error(png_ptr, "Error msg")
-                   to exit and output any fatal error messages.
-   flush_data_fn - pointer to a new flush function that takes as its
-                   arguments a pointer to a png_struct.  After a call to
-                   the flush function, there should be no data in any buffers
-                   or pending transmission.  If the output method doesn't do
-                   any buffering of ouput, a function prototype must still be
-                   supplied although it doesn't have to do anything.  If
-                   PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
-                   time, output_flush_fn will be ignored, although it must be
-                   supplied for compatibility. */
-void PNGAPI
-png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
-   png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
-{
-   png_ptr->io_ptr = io_ptr;
-
-#if !defined(PNG_NO_STDIO)
-   if (write_data_fn != NULL)
-      png_ptr->write_data_fn = write_data_fn;
-   else
-      png_ptr->write_data_fn = png_default_write_data;
-#else
-   png_ptr->write_data_fn = write_data_fn;
-#endif
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
-   if (output_flush_fn != NULL)
-      png_ptr->output_flush_fn = output_flush_fn;
-   else
-      png_ptr->output_flush_fn = png_default_flush;
-#else
-   png_ptr->output_flush_fn = output_flush_fn;
-#endif
-#endif /* PNG_WRITE_FLUSH_SUPPORTED */
-
-   /* It is an error to read while writing a png file */
-   if (png_ptr->read_data_fn != NULL)
-   {
-      png_ptr->read_data_fn = NULL;
-      png_warning(png_ptr,
-         "Attempted to set both read_data_fn and write_data_fn in");
-      png_warning(png_ptr,
-         "the same structure.  Resetting read_data_fn to NULL.");
-   }
-}
-
-#if defined(USE_FAR_KEYWORD)
-#if defined(_MSC_VER)
-void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check)
-{
-   void *near_ptr;
-   void FAR *far_ptr;
-   FP_OFF(near_ptr) = FP_OFF(ptr);
-   far_ptr = (void FAR *)near_ptr;
-   if(check != 0)
-      if(FP_SEG(ptr) != FP_SEG(far_ptr))
-         png_error(png_ptr,"segment lost in conversion");
-   return(near_ptr);
-}
-#  else
-void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check)
-{
-   void *near_ptr;
-   void FAR *far_ptr;
-   near_ptr = (void FAR *)ptr;
-   far_ptr = (void FAR *)near_ptr;
-   if(check != 0)
-      if(far_ptr != ptr)
-         png_error(png_ptr,"segment lost in conversion");
-   return(near_ptr);
-}
-#   endif
-#   endif
-#endif /* PNG_WRITE_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngwrite.c b/tkimg1.3/libpng/pngwrite.c
deleted file mode 100644
index 9c4bdf7..0000000
--- a/tkimg1.3/libpng/pngwrite.c
+++ /dev/null
@@ -1,1464 +0,0 @@
-
-/* pngwrite.c - general routines to write a PNG file
- *
- * libpng 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-/* get internal access to png.h */
-#define PNG_INTERNAL
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
-
-/* Writes all the PNG information.  This is the suggested way to use the
- * library.  If you have a new chunk to add, make a function to write it,
- * and put it in the correct location here.  If you want the chunk written
- * after the image data, put it in png_write_end().  I strongly encourage
- * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing
- * the chunk, as that will keep the code from breaking if you want to just
- * write a plain PNG file.  If you have long comments, I suggest writing
- * them in png_write_end(), and compressing them.
- */
-void PNGAPI
-png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_write_info_before_PLTE\n");
-   if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
-   {
-   png_write_sig(png_ptr); /* write PNG signature */
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
-   {
-      png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n");
-      png_ptr->mng_features_permitted=0;
-   }
-#endif
-   /* write IHDR information. */
-   png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
-      info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
-      info_ptr->filter_type,
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-      info_ptr->interlace_type);
-#else
-      0);
-#endif
-   /* the rest of these check to see if the valid field has the appropriate
-      flag set, and if it does, writes the chunk. */
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_gAMA)
-   {
-#  ifdef PNG_FLOATING_POINT_SUPPORTED
-      png_write_gAMA(png_ptr, info_ptr->gamma);
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-      png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma);
-#  endif
-#endif
-   }
-#endif
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sRGB)
-      png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);
-#endif
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_iCCP)
-      png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
-                     info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
-#endif
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sBIT)
-      png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
-#endif
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_cHRM)
-   {
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-      png_write_cHRM(png_ptr,
-         info_ptr->x_white, info_ptr->y_white,
-         info_ptr->x_red, info_ptr->y_red,
-         info_ptr->x_green, info_ptr->y_green,
-         info_ptr->x_blue, info_ptr->y_blue);
-#else
-#  ifdef PNG_FIXED_POINT_SUPPORTED
-      png_write_cHRM_fixed(png_ptr,
-         info_ptr->int_x_white, info_ptr->int_y_white,
-         info_ptr->int_x_red, info_ptr->int_y_red,
-         info_ptr->int_x_green, info_ptr->int_y_green,
-         info_ptr->int_x_blue, info_ptr->int_y_blue);
-#  endif
-#endif
-   }
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   if (info_ptr->unknown_chunks_num)
-   {
-       png_unknown_chunk *up;
-
-       png_debug(5, "writing extra chunks\n");
-
-       for (up = info_ptr->unknown_chunks;
-            up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
-            up++)
-       {
-         int keep=png_handle_as_unknown(png_ptr, up->name);
-         if (keep != PNG_HANDLE_CHUNK_NEVER &&
-            up->location && !(up->location & PNG_HAVE_PLTE) &&
-            !(up->location & PNG_HAVE_IDAT) &&
-            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
-            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
-         {
-            png_write_chunk(png_ptr, up->name, up->data, up->size);
-         }
-       }
-   }
-#endif
-      png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE;
-   }
-}
-
-void PNGAPI
-png_write_info(png_structp png_ptr, png_infop info_ptr)
-{
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
-   int i;
-#endif
-
-   png_debug(1, "in png_write_info\n");
-
-   png_write_info_before_PLTE(png_ptr, info_ptr);
-
-   if (info_ptr->valid & PNG_INFO_PLTE)
-      png_write_PLTE(png_ptr, info_ptr->palette,
-         (png_uint_32)info_ptr->num_palette);
-   else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      png_error(png_ptr, "Valid palette required for paletted images\n");
-
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_tRNS)
-      {
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-         /* invert the alpha channel (in tRNS) */
-         if ((png_ptr->transformations & PNG_INVERT_ALPHA) &&
-            info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-         {
-            int j;
-            for (j=0; j<(int)info_ptr->num_trans; j++)
-               info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]);
-         }
-#endif
-      png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values),
-         info_ptr->num_trans, info_ptr->color_type);
-      }
-#endif
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_bKGD)
-      png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);
-#endif
-#if defined(PNG_WRITE_hIST_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_hIST)
-      png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);
-#endif
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_oFFs)
-      png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset,
-         info_ptr->offset_unit_type);
-#endif
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pCAL)
-      png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0,
-         info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
-         info_ptr->pcal_units, info_ptr->pcal_params);
-#endif
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sCAL)
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-      png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
-          info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-      png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
-          info_ptr->scal_s_width, info_ptr->scal_s_height);
-#else
-      png_warning(png_ptr,
-          "png_write_sCAL not supported; sCAL chunk not written.\n");
-#endif
-#endif
-#endif
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_pHYs)
-      png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,
-         info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);
-#endif
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_tIME)
-   {
-      png_write_tIME(png_ptr, &(info_ptr->mod_time));
-      png_ptr->mode |= PNG_WROTE_tIME;
-   }
-#endif
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
-   if (info_ptr->valid & PNG_INFO_sPLT)
-     for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
-       png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);
-#endif
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
-   /* Check to see if we need to write text chunks */
-   for (i = 0; i < info_ptr->num_text; i++)
-   {
-      png_debug2(2, "Writing header text chunk %d, type %d\n", i,
-         info_ptr->text[i].compression);
-      /* an internationalized chunk? */
-      if (info_ptr->text[i].compression > 0)
-      {
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-          /* write international chunk */
-          png_write_iTXt(png_ptr,
-                         info_ptr->text[i].compression,
-                         info_ptr->text[i].key,
-                         info_ptr->text[i].lang,
-                         info_ptr->text[i].lang_key,
-                         info_ptr->text[i].text);
-#else
-          png_warning(png_ptr, "Unable to write international text\n");
-#endif
-          /* Mark this chunk as written */
-          info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
-      }
-      /* If we want a compressed text chunk */
-      else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt)
-      {
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-         /* write compressed chunk */
-         png_write_zTXt(png_ptr, info_ptr->text[i].key,
-            info_ptr->text[i].text, 0,
-            info_ptr->text[i].compression);
-#else
-         png_warning(png_ptr, "Unable to write compressed text\n");
-#endif
-         /* Mark this chunk as written */
-         info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
-      }
-      else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
-      {
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-         /* write uncompressed chunk */
-         png_write_tEXt(png_ptr, info_ptr->text[i].key,
-                         info_ptr->text[i].text,
-                         0);
-#else
-         png_warning(png_ptr, "Unable to write uncompressed text\n");
-#endif
-         /* Mark this chunk as written */
-         info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
-      }
-   }
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   if (info_ptr->unknown_chunks_num)
-   {
-       png_unknown_chunk *up;
-
-       png_debug(5, "writing extra chunks\n");
-
-       for (up = info_ptr->unknown_chunks;
-            up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
-            up++)
-       {
-         int keep=png_handle_as_unknown(png_ptr, up->name);
-         if (keep != PNG_HANDLE_CHUNK_NEVER &&
-            up->location && (up->location & PNG_HAVE_PLTE) &&
-            !(up->location & PNG_HAVE_IDAT) &&
-            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
-            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
-         {
-            png_write_chunk(png_ptr, up->name, up->data, up->size);
-         }
-       }
-   }
-#endif
-}
-
-/* Writes the end of the PNG file.  If you don't want to write comments or
- * time information, you can pass NULL for info.  If you already wrote these
- * in png_write_info(), do not write them again here.  If you have long
- * comments, I suggest writing them here, and compressing them.
- */
-void PNGAPI
-png_write_end(png_structp png_ptr, png_infop info_ptr)
-{
-   png_debug(1, "in png_write_end\n");
-   if (!(png_ptr->mode & PNG_HAVE_IDAT))
-      png_error(png_ptr, "No IDATs written into file");
-
-   /* see if user wants us to write information chunks */
-   if (info_ptr != NULL)
-   {
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
-      int i; /* local index variable */
-#endif
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-      /* check to see if user has supplied a time chunk */
-      if ((info_ptr->valid & PNG_INFO_tIME) &&
-         !(png_ptr->mode & PNG_WROTE_tIME))
-         png_write_tIME(png_ptr, &(info_ptr->mod_time));
-#endif
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
-      /* loop through comment chunks */
-      for (i = 0; i < info_ptr->num_text; i++)
-      {
-         png_debug2(2, "Writing trailer text chunk %d, type %d\n", i,
-            info_ptr->text[i].compression);
-         /* an internationalized chunk? */
-         if (info_ptr->text[i].compression > 0)
-         {
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-             /* write international chunk */
-             png_write_iTXt(png_ptr,
-                         info_ptr->text[i].compression,
-                         info_ptr->text[i].key,
-                         info_ptr->text[i].lang,
-                         info_ptr->text[i].lang_key,
-                         info_ptr->text[i].text);
-#else
-             png_warning(png_ptr, "Unable to write international text\n");
-#endif
-             /* Mark this chunk as written */
-             info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
-         }
-         else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
-         {
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-            /* write compressed chunk */
-            png_write_zTXt(png_ptr, info_ptr->text[i].key,
-               info_ptr->text[i].text, 0,
-               info_ptr->text[i].compression);
-#else
-            png_warning(png_ptr, "Unable to write compressed text\n");
-#endif
-            /* Mark this chunk as written */
-            info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
-         }
-         else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
-         {
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-            /* write uncompressed chunk */
-            png_write_tEXt(png_ptr, info_ptr->text[i].key,
-               info_ptr->text[i].text, 0);
-#else
-            png_warning(png_ptr, "Unable to write uncompressed text\n");
-#endif
-
-            /* Mark this chunk as written */
-            info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
-         }
-      }
-#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   if (info_ptr->unknown_chunks_num)
-   {
-       png_unknown_chunk *up;
-
-       png_debug(5, "writing extra chunks\n");
-
-       for (up = info_ptr->unknown_chunks;
-            up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
-            up++)
-       {
-         int keep=png_handle_as_unknown(png_ptr, up->name);
-         if (keep != PNG_HANDLE_CHUNK_NEVER &&
-            up->location && (up->location & PNG_AFTER_IDAT) &&
-            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
-            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
-         {
-            png_write_chunk(png_ptr, up->name, up->data, up->size);
-         }
-       }
-   }
-#endif
-   }
-
-   png_ptr->mode |= PNG_AFTER_IDAT;
-
-   /* write end of PNG file */
-   png_write_IEND(png_ptr);
-#if 0
-/* This flush, added in libpng-1.0.8,  causes some applications to crash
-   because they do not set png_ptr->output_flush_fn */
-   png_flush(png_ptr);
-#endif
-}
-
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-#if !defined(_WIN32_WCE)
-/* "time.h" functions are not supported on WindowsCE */
-void PNGAPI
-png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
-{
-   png_debug(1, "in png_convert_from_struct_tm\n");
-   ptime->year = (png_uint_16)(1900 + ttime->tm_year);
-   ptime->month = (png_byte)(ttime->tm_mon + 1);
-   ptime->day = (png_byte)ttime->tm_mday;
-   ptime->hour = (png_byte)ttime->tm_hour;
-   ptime->minute = (png_byte)ttime->tm_min;
-   ptime->second = (png_byte)ttime->tm_sec;
-}
-
-void PNGAPI
-png_convert_from_time_t(png_timep ptime, time_t ttime)
-{
-   struct tm *tbuf;
-
-   png_debug(1, "in png_convert_from_time_t\n");
-   tbuf = gmtime(&ttime);
-   png_convert_from_struct_tm(ptime, tbuf);
-}
-#endif
-#endif
-
-/* Initialize png_ptr structure, and allocate any memory needed */
-png_structp PNGAPI
-png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn)
-{
-#ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
-      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
-}
-
-/* Alternate initialize png_ptr structure, and allocate any memory needed */
-png_structp PNGAPI
-png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn)
-{
-#endif /* PNG_USER_MEM_SUPPORTED */
-   png_structp png_ptr;
-#ifdef PNG_SETJMP_SUPPORTED
-#ifdef USE_FAR_KEYWORD
-   jmp_buf jmpbuf;
-#endif
-#endif
-   int i;
-   png_debug(1, "in png_create_write_struct\n");
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
-      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
-#else
-   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
-#endif /* PNG_USER_MEM_SUPPORTED */
-   if (png_ptr == NULL)
-      return (NULL);
-
-#if !defined(PNG_1_0_X)
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
-#endif
-#endif /* PNG_1_0_X */
-
-   /* added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
-   png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-#else
-   if (setjmp(png_ptr->jmpbuf))
-#endif
-   {
-      png_free(png_ptr, png_ptr->zbuf);
-      png_ptr->zbuf=NULL;
-      png_destroy_struct(png_ptr);
-      return (NULL);
-   }
-#ifdef USE_FAR_KEYWORD
-   png_memcpy(png_ptr->jmpbuf,jmpbuf,png_sizeof(jmp_buf));
-#endif
-#endif
-
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);
-#endif /* PNG_USER_MEM_SUPPORTED */
-   png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn);
-
-   i=0;
-   do
-   {
-     if(user_png_ver[i] != png_libpng_ver[i])
-        png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
-   } while (png_libpng_ver[i++]);
-
-   if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
-   {
-     /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
-      * we must recompile any applications that use any older library version.
-      * For versions after libpng 1.0, we will be compatible, so we need
-      * only check the first digit.
-      */
-     if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
-         (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
-         (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
-     {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-        char msg[80];
-        if (user_png_ver)
-        {
-          sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
-             user_png_ver);
-          png_warning(png_ptr, msg);
-        }
-        sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
-           png_libpng_ver);
-        png_warning(png_ptr, msg);
-#endif
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-        png_ptr->flags=0;
-#endif
-        png_error(png_ptr,
-           "Incompatible libpng version in application and library");
-     }
-   }
-
-   /* initialize zbuf - compression buffer */
-   png_ptr->zbuf_size = PNG_ZBUF_SIZE;
-   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
-      (png_uint_32)png_ptr->zbuf_size);
-
-   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
-      png_flush_ptr_NULL);
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
-      1, png_doublep_NULL, png_doublep_NULL);
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* Applications that neglect to set up their own setjmp() and then encounter
-   a png_error() will longjmp here.  Since the jmpbuf is then meaningless we
-   abort instead of returning. */
-#ifdef USE_FAR_KEYWORD
-   if (setjmp(jmpbuf))
-      PNG_ABORT();
-   png_memcpy(png_ptr->jmpbuf,jmpbuf,png_sizeof(jmp_buf));
-#else
-   if (setjmp(png_ptr->jmpbuf))
-      PNG_ABORT();
-#endif
-#endif
-   return (png_ptr);
-}
-
-/* Initialize png_ptr structure, and allocate any memory needed */
-#undef png_write_init
-void PNGAPI
-png_write_init(png_structp png_ptr)
-{
-   /* We only come here via pre-1.0.7-compiled applications */
-   png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
-}
-
-void PNGAPI
-png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
-   png_size_t png_struct_size, png_size_t png_info_size)
-{
-   /* We only come here via pre-1.0.12-compiled applications */
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-   if(png_sizeof(png_struct) > png_struct_size ||
-      png_sizeof(png_info) > png_info_size)
-   {
-      char msg[80];
-      png_ptr->warning_fn=NULL;
-      if (user_png_ver)
-      {
-        sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
-           user_png_ver);
-        png_warning(png_ptr, msg);
-      }
-      sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
-         png_libpng_ver);
-      png_warning(png_ptr, msg);
-   }
-#endif
-   if(png_sizeof(png_struct) > png_struct_size)
-     {
-       png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-       png_ptr->flags=0;
-#endif
-       png_error(png_ptr,
-       "The png struct allocated by the application for writing is too small.");
-     }
-   if(png_sizeof(png_info) > png_info_size)
-     {
-       png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-       png_ptr->flags=0;
-#endif
-       png_error(png_ptr,
-       "The info struct allocated by the application for writing is too small.");
-     }
-   png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
-}
-
-
-void PNGAPI
-png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
-   png_size_t png_struct_size)
-{
-   png_structp png_ptr=*ptr_ptr;
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf tmp_jmp; /* to save current jump buffer */
-#endif
-   int i = 0;
-   do
-   {
-     if (user_png_ver[i] != png_libpng_ver[i])
-     {
-#ifdef PNG_LEGACY_SUPPORTED
-       png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
-#else
-       png_ptr->warning_fn=NULL;
-       png_warning(png_ptr,
-     "Application uses deprecated png_write_init() and should be recompiled.");
-       break;
-#endif
-     }
-   } while (png_libpng_ver[i++]);
-
-   png_debug(1, "in png_write_init_3\n");
-
-#ifdef PNG_SETJMP_SUPPORTED
-   /* save jump buffer and error functions */
-   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof (jmp_buf));
-#endif
-
-   if (png_sizeof(png_struct) > png_struct_size)
-     {
-       png_destroy_struct(png_ptr);
-       png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
-       *ptr_ptr = png_ptr;
-     }
-
-   /* reset all variables to 0 */
-   png_memset(png_ptr, 0, png_sizeof (png_struct));
-
-   /* added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
-   png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
-#endif
-
-#if !defined(PNG_1_0_X)
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
-#endif
-#endif /* PNG_1_0_X */
-
-#ifdef PNG_SETJMP_SUPPORTED
-   /* restore jump buffer */
-   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof (jmp_buf));
-#endif
-
-   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
-      png_flush_ptr_NULL);
-
-   /* initialize zbuf - compression buffer */
-   png_ptr->zbuf_size = PNG_ZBUF_SIZE;
-   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
-      (png_uint_32)png_ptr->zbuf_size);
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
-      1, png_doublep_NULL, png_doublep_NULL);
-#endif
-}
-
-/* Write a few rows of image data.  If the image is interlaced,
- * either you will have to write the 7 sub images, or, if you
- * have called png_set_interlace_handling(), you will have to
- * "write" the image seven times.
- */
-void PNGAPI
-png_write_rows(png_structp png_ptr, png_bytepp row,
-   png_uint_32 num_rows)
-{
-   png_uint_32 i; /* row counter */
-   png_bytepp rp; /* row pointer */
-
-   png_debug(1, "in png_write_rows\n");
-   /* loop through the rows */
-   for (i = 0, rp = row; i < num_rows; i++, rp++)
-   {
-      png_write_row(png_ptr, *rp);
-   }
-}
-
-/* Write the image.  You only need to call this function once, even
- * if you are writing an interlaced image.
- */
-void PNGAPI
-png_write_image(png_structp png_ptr, png_bytepp image)
-{
-   png_uint_32 i; /* row index */
-   int pass, num_pass; /* pass variables */
-   png_bytepp rp; /* points to current row */
-
-   png_debug(1, "in png_write_image\n");
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-   /* intialize interlace handling.  If image is not interlaced,
-      this will set pass to 1 */
-   num_pass = png_set_interlace_handling(png_ptr);
-#else
-   num_pass = 1;
-#endif
-   /* loop through passes */
-   for (pass = 0; pass < num_pass; pass++)
-   {
-      /* loop through image */
-      for (i = 0, rp = image; i < png_ptr->height; i++, rp++)
-      {
-         png_write_row(png_ptr, *rp);
-      }
-   }
-}
-
-/* called by user to write a row of image data */
-void PNGAPI
-png_write_row(png_structp png_ptr, png_bytep row)
-{
-   png_debug2(1, "in png_write_row (row %ld, pass %d)\n",
-      png_ptr->row_number, png_ptr->pass);
-   /* initialize transformations and other stuff if first time */
-   if (png_ptr->row_number == 0 && png_ptr->pass == 0)
-   {
-   /* make sure we wrote the header info */
-   if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
-      png_error(png_ptr,
-         "png_write_info was never called before png_write_row.");
-
-   /* check for transforms that have been set but were defined out */
-#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_MONO)
-      png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
-   if (png_ptr->transformations & PNG_FILLER)
-      png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACKSWAP)
-      png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACK)
-      png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)
-   if (png_ptr->transformations & PNG_SHIFT)
-      png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)
-   if (png_ptr->transformations & PNG_BGR)
-      png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined.");
-#endif
-#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_BYTES)
-      png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined.");
-#endif
-
-      png_write_start_row(png_ptr);
-   }
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-   /* if interlaced and not interested in row, return */
-   if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
-   {
-      switch (png_ptr->pass)
-      {
-         case 0:
-            if (png_ptr->row_number & 0x07)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 1:
-            if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 2:
-            if ((png_ptr->row_number & 0x07) != 4)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 3:
-            if ((png_ptr->row_number & 0x03) || png_ptr->width < 3)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 4:
-            if ((png_ptr->row_number & 0x03) != 2)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 5:
-            if ((png_ptr->row_number & 0x01) || png_ptr->width < 2)
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-         case 6:
-            if (!(png_ptr->row_number & 0x01))
-            {
-               png_write_finish_row(png_ptr);
-               return;
-            }
-            break;
-      }
-   }
-#endif
-
-   /* set up row info for transformations */
-   png_ptr->row_info.color_type = png_ptr->color_type;
-   png_ptr->row_info.width = png_ptr->usr_width;
-   png_ptr->row_info.channels = png_ptr->usr_channels;
-   png_ptr->row_info.bit_depth = png_ptr->usr_bit_depth;
-   png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *
-      png_ptr->row_info.channels);
-
-   png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
-      png_ptr->row_info.width);
-
-   png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type);
-   png_debug1(3, "row_info->width = %lu\n", png_ptr->row_info.width);
-   png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels);
-   png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth);
-   png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth);
-   png_debug1(3, "row_info->rowbytes = %lu\n", png_ptr->row_info.rowbytes);
-
-   /* Copy user's row into buffer, leaving room for filter byte. */
-   png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row,
-      png_ptr->row_info.rowbytes);
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-   /* handle interlacing */
-   if (png_ptr->interlaced && png_ptr->pass < 6 &&
-      (png_ptr->transformations & PNG_INTERLACE))
-   {
-      png_do_write_interlace(&(png_ptr->row_info),
-         png_ptr->row_buf + 1, png_ptr->pass);
-      /* this should always get caught above, but still ... */
-      if (!(png_ptr->row_info.width))
-      {
-         png_write_finish_row(png_ptr);
-         return;
-      }
-   }
-#endif
-
-   /* handle other transformations */
-   if (png_ptr->transformations)
-      png_do_write_transformations(png_ptr);
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   /* Write filter_method 64 (intrapixel differencing) only if
-    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
-    * 2. Libpng did not write a PNG signature (this filter_method is only
-    *    used in PNG datastreams that are embedded in MNG datastreams) and
-    * 3. The application called png_permit_mng_features with a mask that
-    *    included PNG_FLAG_MNG_FILTER_64 and
-    * 4. The filter_method is 64 and
-    * 5. The color_type is RGB or RGBA
-    */
-   if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
-      (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
-   {
-      /* Intrapixel differencing */
-      png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);
-   }
-#endif
-
-   /* Find a filter if necessary, filter the row and write it out. */
-   png_write_find_filter(png_ptr, &(png_ptr->row_info));
-
-   if (png_ptr->write_row_fn != NULL)
-      (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
-}
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-/* Set the automatic flush interval or 0 to turn flushing off */
-void PNGAPI
-png_set_flush(png_structp png_ptr, int nrows)
-{
-   png_debug(1, "in png_set_flush\n");
-   png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);
-}
-
-/* flush the current output buffers now */
-void PNGAPI
-png_write_flush(png_structp png_ptr)
-{
-   int wrote_IDAT;
-
-   png_debug(1, "in png_write_flush\n");
-   /* We have already written out all of the data */
-   if (png_ptr->row_number >= png_ptr->num_rows)
-     return;
-
-   do
-   {
-      int ret;
-
-      /* compress the data */
-      ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH);
-      wrote_IDAT = 0;
-
-      /* check for compression errors */
-      if (ret != Z_OK)
-      {
-         if (png_ptr->zstream.msg != NULL)
-            png_error(png_ptr, png_ptr->zstream.msg);
-         else
-            png_error(png_ptr, "zlib error");
-      }
-
-      if (!(png_ptr->zstream.avail_out))
-      {
-         /* write the IDAT and reset the zlib output buffer */
-         png_write_IDAT(png_ptr, png_ptr->zbuf,
-                        png_ptr->zbuf_size);
-         png_ptr->zstream.next_out = png_ptr->zbuf;
-         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-         wrote_IDAT = 1;
-      }
-   } while(wrote_IDAT == 1);
-
-   /* If there is any data left to be output, write it into a new IDAT */
-   if (png_ptr->zbuf_size != png_ptr->zstream.avail_out)
-   {
-      /* write the IDAT and reset the zlib output buffer */
-      png_write_IDAT(png_ptr, png_ptr->zbuf,
-                     png_ptr->zbuf_size - png_ptr->zstream.avail_out);
-      png_ptr->zstream.next_out = png_ptr->zbuf;
-      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-   }
-   png_ptr->flush_rows = 0;
-   png_flush(png_ptr);
-}
-#endif /* PNG_WRITE_FLUSH_SUPPORTED */
-
-/* free all memory used by the write */
-void PNGAPI
-png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
-{
-   png_structp png_ptr = NULL;
-   png_infop info_ptr = NULL;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_free_ptr free_fn = NULL;
-   png_voidp mem_ptr = NULL;
-#endif
-
-   png_debug(1, "in png_destroy_write_struct\n");
-   if (png_ptr_ptr != NULL)
-   {
-      png_ptr = *png_ptr_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-      free_fn = png_ptr->free_fn;
-      mem_ptr = png_ptr->mem_ptr;
-#endif
-   }
-
-   if (info_ptr_ptr != NULL)
-      info_ptr = *info_ptr_ptr;
-
-   if (info_ptr != NULL)
-   {
-      png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-      if (png_ptr->num_chunk_list)
-      {
-         png_free(png_ptr, png_ptr->chunk_list);
-         png_ptr->chunk_list=NULL;
-         png_ptr->num_chunk_list=0;
-      }
-#endif
-
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,
-         (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)info_ptr);
-#endif
-      *info_ptr_ptr = NULL;
-   }
-
-   if (png_ptr != NULL)
-   {
-      png_write_destroy(png_ptr);
-#ifdef PNG_USER_MEM_SUPPORTED
-      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,
-         (png_voidp)mem_ptr);
-#else
-      png_destroy_struct((png_voidp)png_ptr);
-#endif
-      *png_ptr_ptr = NULL;
-   }
-}
-
-
-/* Free any memory used in png_ptr struct (old method) */
-void /* PRIVATE */
-png_write_destroy(png_structp png_ptr)
-{
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf tmp_jmp; /* save jump buffer */
-#endif
-   png_error_ptr error_fn;
-   png_error_ptr warning_fn;
-   png_voidp error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_free_ptr free_fn;
-#endif
-
-   png_debug(1, "in png_write_destroy\n");
-   /* free any memory zlib uses */
-   deflateEnd(&png_ptr->zstream);
-
-   /* free our memory.  png_free checks NULL for us. */
-   png_free(png_ptr, png_ptr->zbuf);
-   png_free(png_ptr, png_ptr->row_buf);
-   png_free(png_ptr, png_ptr->prev_row);
-   png_free(png_ptr, png_ptr->sub_row);
-   png_free(png_ptr, png_ptr->up_row);
-   png_free(png_ptr, png_ptr->avg_row);
-   png_free(png_ptr, png_ptr->paeth_row);
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-   png_free(png_ptr, png_ptr->time_buffer);
-#endif
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   png_free(png_ptr, png_ptr->prev_filters);
-   png_free(png_ptr, png_ptr->filter_weights);
-   png_free(png_ptr, png_ptr->inv_filter_weights);
-   png_free(png_ptr, png_ptr->filter_costs);
-   png_free(png_ptr, png_ptr->inv_filter_costs);
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-   /* reset structure */
-   png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof (jmp_buf));
-#endif
-
-   error_fn = png_ptr->error_fn;
-   warning_fn = png_ptr->warning_fn;
-   error_ptr = png_ptr->error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   free_fn = png_ptr->free_fn;
-#endif
-
-   png_memset(png_ptr, 0, png_sizeof (png_struct));
-
-   png_ptr->error_fn = error_fn;
-   png_ptr->warning_fn = warning_fn;
-   png_ptr->error_ptr = error_ptr;
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_ptr->free_fn = free_fn;
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-   png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof (jmp_buf));
-#endif
-}
-
-/* Allow the application to select one or more row filters to use. */
-void PNGAPI
-png_set_filter(png_structp png_ptr, int method, int filters)
-{
-   png_debug(1, "in png_set_filter\n");
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
-      (method == PNG_INTRAPIXEL_DIFFERENCING))
-         method = PNG_FILTER_TYPE_BASE;
-#endif
-   if (method == PNG_FILTER_TYPE_BASE)
-   {
-      switch (filters & (PNG_ALL_FILTERS | 0x07))
-      {
-         case 5:
-         case 6:
-         case 7: png_warning(png_ptr, "Unknown row filter for method 0");
-         case PNG_FILTER_VALUE_NONE:  png_ptr->do_filter=PNG_FILTER_NONE; break;
-         case PNG_FILTER_VALUE_SUB:   png_ptr->do_filter=PNG_FILTER_SUB;  break;
-         case PNG_FILTER_VALUE_UP:    png_ptr->do_filter=PNG_FILTER_UP;   break;
-         case PNG_FILTER_VALUE_AVG:   png_ptr->do_filter=PNG_FILTER_AVG;  break;
-         case PNG_FILTER_VALUE_PAETH: png_ptr->do_filter=PNG_FILTER_PAETH;break;
-         default: png_ptr->do_filter = (png_byte)filters; break;
-      }
-
-      /* If we have allocated the row_buf, this means we have already started
-       * with the image and we should have allocated all of the filter buffers
-       * that have been selected.  If prev_row isn't already allocated, then
-       * it is too late to start using the filters that need it, since we
-       * will be missing the data in the previous row.  If an application
-       * wants to start and stop using particular filters during compression,
-       * it should start out with all of the filters, and then add and
-       * remove them after the start of compression.
-       */
-      if (png_ptr->row_buf != NULL)
-      {
-         if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
-         {
-            png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
-              (png_ptr->rowbytes + 1));
-            png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;
-         }
-
-         if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL)
-         {
-            if (png_ptr->prev_row == NULL)
-            {
-               png_warning(png_ptr, "Can't add Up filter after starting");
-               png_ptr->do_filter &= ~PNG_FILTER_UP;
-            }
-            else
-            {
-               png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
-                  (png_ptr->rowbytes + 1));
-               png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
-            }
-         }
-
-         if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL)
-         {
-            if (png_ptr->prev_row == NULL)
-            {
-               png_warning(png_ptr, "Can't add Average filter after starting");
-               png_ptr->do_filter &= ~PNG_FILTER_AVG;
-            }
-            else
-            {
-               png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,
-                  (png_ptr->rowbytes + 1));
-               png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;
-            }
-         }
-
-         if ((png_ptr->do_filter & PNG_FILTER_PAETH) &&
-             png_ptr->paeth_row == NULL)
-         {
-            if (png_ptr->prev_row == NULL)
-            {
-               png_warning(png_ptr, "Can't add Paeth filter after starting");
-               png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH);
-            }
-            else
-            {
-               png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
-                  (png_ptr->rowbytes + 1));
-               png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
-            }
-         }
-
-         if (png_ptr->do_filter == PNG_NO_FILTERS)
-            png_ptr->do_filter = PNG_FILTER_NONE;
-      }
-   }
-   else
-      png_error(png_ptr, "Unknown custom filter method");
-}
-
-/* This allows us to influence the way in which libpng chooses the "best"
- * filter for the current scanline.  While the "minimum-sum-of-absolute-
- * differences metric is relatively fast and effective, there is some
- * question as to whether it can be improved upon by trying to keep the
- * filtered data going to zlib more consistent, hopefully resulting in
- * better compression.
- */
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)      /* GRR 970116 */
-void PNGAPI
-png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
-   int num_weights, png_doublep filter_weights,
-   png_doublep filter_costs)
-{
-   int i;
-
-   png_debug(1, "in png_set_filter_heuristics\n");
-   if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)
-   {
-      png_warning(png_ptr, "Unknown filter heuristic method");
-      return;
-   }
-
-   if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT)
-   {
-      heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED;
-   }
-
-   if (num_weights < 0 || filter_weights == NULL ||
-      heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED)
-   {
-      num_weights = 0;
-   }
-
-   png_ptr->num_prev_filters = (png_byte)num_weights;
-   png_ptr->heuristic_method = (png_byte)heuristic_method;
-
-   if (num_weights > 0)
-   {
-      if (png_ptr->prev_filters == NULL)
-      {
-         png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr,
-            (png_uint_32)(png_sizeof(png_byte) * num_weights));
-
-         /* To make sure that the weighting starts out fairly */
-         for (i = 0; i < num_weights; i++)
-         {
-            png_ptr->prev_filters[i] = 255;
-         }
-      }
-
-      if (png_ptr->filter_weights == NULL)
-      {
-         png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr,
-            (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
-
-         png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr,
-            (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
-         for (i = 0; i < num_weights; i++)
-         {
-            png_ptr->inv_filter_weights[i] =
-            png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;
-         }
-      }
-
-      for (i = 0; i < num_weights; i++)
-      {
-         if (filter_weights[i] < 0.0)
-         {
-            png_ptr->inv_filter_weights[i] =
-            png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;
-         }
-         else
-         {
-            png_ptr->inv_filter_weights[i] =
-               (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5);
-            png_ptr->filter_weights[i] =
-               (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5);
-         }
-      }
-   }
-
-   /* If, in the future, there are other filter methods, this would
-    * need to be based on png_ptr->filter.
-    */
-   if (png_ptr->filter_costs == NULL)
-   {
-      png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr,
-         (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
-
-      png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr,
-         (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
-
-      for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
-      {
-         png_ptr->inv_filter_costs[i] =
-         png_ptr->filter_costs[i] = PNG_COST_FACTOR;
-      }
-   }
-
-   /* Here is where we set the relative costs of the different filters.  We
-    * should take the desired compression level into account when setting
-    * the costs, so that Paeth, for instance, has a high relative cost at low
-    * compression levels, while it has a lower relative cost at higher
-    * compression settings.  The filter types are in order of increasing
-    * relative cost, so it would be possible to do this with an algorithm.
-    */
-   for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
-   {
-      if (filter_costs == NULL || filter_costs[i] < 0.0)
-      {
-         png_ptr->inv_filter_costs[i] =
-         png_ptr->filter_costs[i] = PNG_COST_FACTOR;
-      }
-      else if (filter_costs[i] >= 1.0)
-      {
-         png_ptr->inv_filter_costs[i] =
-            (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5);
-         png_ptr->filter_costs[i] =
-            (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5);
-      }
-   }
-}
-#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
-
-void PNGAPI
-png_set_compression_level(png_structp png_ptr, int level)
-{
-   png_debug(1, "in png_set_compression_level\n");
-   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;
-   png_ptr->zlib_level = level;
-}
-
-void PNGAPI
-png_set_compression_mem_level(png_structp png_ptr, int mem_level)
-{
-   png_debug(1, "in png_set_compression_mem_level\n");
-   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;
-   png_ptr->zlib_mem_level = mem_level;
-}
-
-void PNGAPI
-png_set_compression_strategy(png_structp png_ptr, int strategy)
-{
-   png_debug(1, "in png_set_compression_strategy\n");
-   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
-   png_ptr->zlib_strategy = strategy;
-}
-
-void PNGAPI
-png_set_compression_window_bits(png_structp png_ptr, int window_bits)
-{
-   if (window_bits > 15)
-      png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
-   else if (window_bits < 8)
-      png_warning(png_ptr, "Only compression windows >= 256 supported by PNG");
-#ifndef WBITS_8_OK
-   /* avoid libpng bug with 256-byte windows */
-   if (window_bits == 8)
-     {
-       png_warning(png_ptr, "Compression window is being reset to 512");
-       window_bits=9;
-     }
-#endif
-   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS;
-   png_ptr->zlib_window_bits = window_bits;
-}
-
-void PNGAPI
-png_set_compression_method(png_structp png_ptr, int method)
-{
-   png_debug(1, "in png_set_compression_method\n");
-   if (method != 8)
-      png_warning(png_ptr, "Only compression method 8 is supported by PNG");
-   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;
-   png_ptr->zlib_method = method;
-}
-
-void PNGAPI
-png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)
-{
-   png_ptr->write_row_fn = write_row_fn;
-}
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-void PNGAPI
-png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
-   write_user_transform_fn)
-{
-   png_debug(1, "in png_set_write_user_transform_fn\n");
-   png_ptr->transformations |= PNG_USER_TRANSFORM;
-   png_ptr->write_user_transform_fn = write_user_transform_fn;
-}
-#endif
-
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-void PNGAPI
-png_write_png(png_structp png_ptr, png_infop info_ptr,
-              int transforms, voidp params)
-{
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-   /* invert the alpha channel from opacity to transparency */
-   if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
-       png_set_invert_alpha(png_ptr);
-#endif
-
-   /* Write the file header information. */
-   png_write_info(png_ptr, info_ptr);
-
-   /* ------ these transformations don't touch the info structure ------- */
-
-#if defined(PNG_WRITE_INVERT_SUPPORTED)
-   /* invert monochrome pixels */
-   if (transforms & PNG_TRANSFORM_INVERT_MONO)
-       png_set_invert_mono(png_ptr);
-#endif
-
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-   /* Shift the pixels up to a legal bit depth and fill in
-    * as appropriate to correctly scale the image.
-    */
-   if ((transforms & PNG_TRANSFORM_SHIFT)
-               && (info_ptr->valid & PNG_INFO_sBIT))
-       png_set_shift(png_ptr, &info_ptr->sig_bit);
-#endif
-
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-   /* pack pixels into bytes */
-   if (transforms & PNG_TRANSFORM_PACKING)
-       png_set_packing(png_ptr);
-#endif
-
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-   /* swap location of alpha bytes from ARGB to RGBA */
-   if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
-       png_set_swap_alpha(png_ptr);
-#endif
-
-#if defined(PNG_WRITE_FILLER_SUPPORTED)
-   /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into
-    * RGB (4 channels -> 3 channels). The second parameter is not used.
-    */
-   if (transforms & PNG_TRANSFORM_STRIP_FILLER)
-       png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
-#endif
-
-#if defined(PNG_WRITE_BGR_SUPPORTED)
-   /* flip BGR pixels to RGB */
-   if (transforms & PNG_TRANSFORM_BGR)
-       png_set_bgr(png_ptr);
-#endif
-
-#if defined(PNG_WRITE_SWAP_SUPPORTED)
-   /* swap bytes of 16-bit files to most significant byte first */
-   if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
-       png_set_swap(png_ptr);
-#endif
-
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-   /* swap bits of 1, 2, 4 bit packed pixel formats */
-   if (transforms & PNG_TRANSFORM_PACKSWAP)
-       png_set_packswap(png_ptr);
-#endif
-
-   /* ----------------------- end of transformations ------------------- */
-
-   /* write the bits */
-   if (info_ptr->valid & PNG_INFO_IDAT)
-       png_write_image(png_ptr, info_ptr->row_pointers);
-
-   /* It is REQUIRED to call this to finish writing the rest of the file */
-   png_write_end(png_ptr, info_ptr);
-
-   if(transforms == 0 || params == NULL)
-      /* quiet compiler warnings */ return;
-}
-#endif
-#endif /* PNG_WRITE_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngwtran.c b/tkimg1.3/libpng/pngwtran.c
deleted file mode 100644
index b06dbb6..0000000
--- a/tkimg1.3/libpng/pngwtran.c
+++ /dev/null
@@ -1,563 +0,0 @@
-
-/* pngwtran.c - transforms the data in a row for PNG writers
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
-
-/* Transform the data according to the user's wishes.  The order of
- * transformations is significant.
- */
-void /* PRIVATE */
-png_do_write_transformations(png_structp png_ptr)
-{
-   png_debug(1, "in png_do_write_transformations\n");
-
-   if (png_ptr == NULL)
-      return;
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   if (png_ptr->transformations & PNG_USER_TRANSFORM)
-      if(png_ptr->write_user_transform_fn != NULL)
-        (*(png_ptr->write_user_transform_fn)) /* user write transform function */
-          (png_ptr,                    /* png_ptr */
-           &(png_ptr->row_info),       /* row_info:     */
-             /*  png_uint_32 width;          width of row */
-             /*  png_uint_32 rowbytes;       number of bytes in row */
-             /*  png_byte color_type;        color type of pixels */
-             /*  png_byte bit_depth;         bit depth of samples */
-             /*  png_byte channels;          number of channels (1-4) */
-             /*  png_byte pixel_depth;       bits per pixel (depth*channels) */
-           png_ptr->row_buf + 1);      /* start of pixel data for row */
-#endif
-#if defined(PNG_WRITE_FILLER_SUPPORTED)
-   if (png_ptr->transformations & PNG_FILLER)
-      png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         png_ptr->flags);
-#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACKSWAP)
-      png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-   if (png_ptr->transformations & PNG_PACK)
-      png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         (png_uint_32)png_ptr->bit_depth);
-#endif
-#if defined(PNG_WRITE_SWAP_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_BYTES)
-      png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-   if (png_ptr->transformations & PNG_SHIFT)
-      png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         &(png_ptr->shift));
-#endif
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_ALPHA)
-      png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_SWAP_ALPHA)
-      png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-#if defined(PNG_WRITE_BGR_SUPPORTED)
-   if (png_ptr->transformations & PNG_BGR)
-      png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-#if defined(PNG_WRITE_INVERT_SUPPORTED)
-   if (png_ptr->transformations & PNG_INVERT_MONO)
-      png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
-#endif
-}
-
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-/* Pack pixels into bytes.  Pass the true bit depth in bit_depth.  The
- * row_info bit depth should be 8 (one pixel per byte).  The channels
- * should be 1 (this only happens on grayscale and paletted images).
- */
-void /* PRIVATE */
-png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
-{
-   png_debug(1, "in png_do_pack\n");
-   if (row_info->bit_depth == 8 &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-      row_info->channels == 1)
-   {
-      switch ((int)bit_depth)
-      {
-         case 1:
-         {
-            png_bytep sp, dp;
-            int mask, v;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            sp = row;
-            dp = row;
-            mask = 0x80;
-            v = 0;
-
-            for (i = 0; i < row_width; i++)
-            {
-               if (*sp != 0)
-                  v |= mask;
-               sp++;
-               if (mask > 1)
-                  mask >>= 1;
-               else
-               {
-                  mask = 0x80;
-                  *dp = (png_byte)v;
-                  dp++;
-                  v = 0;
-               }
-            }
-            if (mask != 0x80)
-               *dp = (png_byte)v;
-            break;
-         }
-         case 2:
-         {
-            png_bytep sp, dp;
-            int shift, v;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            sp = row;
-            dp = row;
-            shift = 6;
-            v = 0;
-            for (i = 0; i < row_width; i++)
-            {
-               png_byte value;
-
-               value = (png_byte)(*sp & 0x03);
-               v |= (value << shift);
-               if (shift == 0)
-               {
-                  shift = 6;
-                  *dp = (png_byte)v;
-                  dp++;
-                  v = 0;
-               }
-               else
-                  shift -= 2;
-               sp++;
-            }
-            if (shift != 6)
-               *dp = (png_byte)v;
-            break;
-         }
-         case 4:
-         {
-            png_bytep sp, dp;
-            int shift, v;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            sp = row;
-            dp = row;
-            shift = 4;
-            v = 0;
-            for (i = 0; i < row_width; i++)
-            {
-               png_byte value;
-
-               value = (png_byte)(*sp & 0x0f);
-               v |= (value << shift);
-
-               if (shift == 0)
-               {
-                  shift = 4;
-                  *dp = (png_byte)v;
-                  dp++;
-                  v = 0;
-               }
-               else
-                  shift -= 4;
-
-               sp++;
-            }
-            if (shift != 4)
-               *dp = (png_byte)v;
-            break;
-         }
-      }
-      row_info->bit_depth = (png_byte)bit_depth;
-      row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
-      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
-         row_info->width);
-   }
-}
-#endif
-
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-/* Shift pixel values to take advantage of whole range.  Pass the
- * true number of bits in bit_depth.  The row should be packed
- * according to row_info->bit_depth.  Thus, if you had a row of
- * bit depth 4, but the pixels only had values from 0 to 7, you
- * would pass 3 as bit_depth, and this routine would translate the
- * data to 0 to 15.
- */
-void /* PRIVATE */
-png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
-{
-   png_debug(1, "in png_do_shift\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL &&
-#else
-   if (
-#endif
-      row_info->color_type != PNG_COLOR_TYPE_PALETTE)
-   {
-      int shift_start[4], shift_dec[4];
-      int channels = 0;
-
-      if (row_info->color_type & PNG_COLOR_MASK_COLOR)
-      {
-         shift_start[channels] = row_info->bit_depth - bit_depth->red;
-         shift_dec[channels] = bit_depth->red;
-         channels++;
-         shift_start[channels] = row_info->bit_depth - bit_depth->green;
-         shift_dec[channels] = bit_depth->green;
-         channels++;
-         shift_start[channels] = row_info->bit_depth - bit_depth->blue;
-         shift_dec[channels] = bit_depth->blue;
-         channels++;
-      }
-      else
-      {
-         shift_start[channels] = row_info->bit_depth - bit_depth->gray;
-         shift_dec[channels] = bit_depth->gray;
-         channels++;
-      }
-      if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
-      {
-         shift_start[channels] = row_info->bit_depth - bit_depth->alpha;
-         shift_dec[channels] = bit_depth->alpha;
-         channels++;
-      }
-
-      /* with low row depths, could only be grayscale, so one channel */
-      if (row_info->bit_depth < 8)
-      {
-         png_bytep bp = row;
-         png_uint_32 i;
-         png_byte mask;
-         png_uint_32 row_bytes = row_info->rowbytes;
-
-         if (bit_depth->gray == 1 && row_info->bit_depth == 2)
-            mask = 0x55;
-         else if (row_info->bit_depth == 4 && bit_depth->gray == 3)
-            mask = 0x11;
-         else
-            mask = 0xff;
-
-         for (i = 0; i < row_bytes; i++, bp++)
-         {
-            png_uint_16 v;
-            int j;
-
-            v = *bp;
-            *bp = 0;
-            for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0])
-            {
-               if (j > 0)
-                  *bp |= (png_byte)((v << j) & 0xff);
-               else
-                  *bp |= (png_byte)((v >> (-j)) & mask);
-            }
-         }
-      }
-      else if (row_info->bit_depth == 8)
-      {
-         png_bytep bp = row;
-         png_uint_32 i;
-         png_uint_32 istop = channels * row_info->width;
-
-         for (i = 0; i < istop; i++, bp++)
-         {
-
-            png_uint_16 v;
-            int j;
-            int c = (int)(i%channels);
-
-            v = *bp;
-            *bp = 0;
-            for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
-            {
-               if (j > 0)
-                  *bp |= (png_byte)((v << j) & 0xff);
-               else
-                  *bp |= (png_byte)((v >> (-j)) & 0xff);
-            }
-         }
-      }
-      else
-      {
-         png_bytep bp;
-         png_uint_32 i;
-         png_uint_32 istop = channels * row_info->width;
-
-         for (bp = row, i = 0; i < istop; i++)
-         {
-            int c = (int)(i%channels);
-            png_uint_16 value, v;
-            int j;
-
-            v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1));
-            value = 0;
-            for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
-            {
-               if (j > 0)
-                  value |= (png_uint_16)((v << j) & (png_uint_16)0xffff);
-               else
-                  value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff);
-            }
-            *bp++ = (png_byte)(value >> 8);
-            *bp++ = (png_byte)(value & 0xff);
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-void /* PRIVATE */
-png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_write_swap_alpha\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-      {
-         /* This converts from ARGB to RGBA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               png_byte save = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = save;
-            }
-         }
-         /* This converts from AARRGGBB to RRGGBBAA */
-         else
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               png_byte save[2];
-               save[0] = *(sp++);
-               save[1] = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = save[0];
-               *(dp++) = save[1];
-            }
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         /* This converts from AG to GA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               png_byte save = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = save;
-            }
-         }
-         /* This converts from AAGG to GGAA */
-         else
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               png_byte save[2];
-               save[0] = *(sp++);
-               save[1] = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = save[0];
-               *(dp++) = save[1];
-            }
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-void /* PRIVATE */
-png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_write_invert_alpha\n");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL)
-#endif
-   {
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-      {
-         /* This inverts the alpha channel in RGBA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = (png_byte)(255 - *(sp++));
-            }
-         }
-         /* This inverts the alpha channel in RRGGBBAA */
-         else
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = (png_byte)(255 - *(sp++));
-               *(dp++) = (png_byte)(255 - *(sp++));
-            }
-         }
-      }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-      {
-         /* This inverts the alpha channel in GA */
-         if (row_info->bit_depth == 8)
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               *(dp++) = *(sp++);
-               *(dp++) = (png_byte)(255 - *(sp++));
-            }
-         }
-         /* This inverts the alpha channel in GGAA */
-         else
-         {
-            png_bytep sp, dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            for (i = 0, sp = dp = row; i < row_width; i++)
-            {
-               *(dp++) = *(sp++);
-               *(dp++) = *(sp++);
-               *(dp++) = (png_byte)(255 - *(sp++));
-               *(dp++) = (png_byte)(255 - *(sp++));
-            }
-         }
-      }
-   }
-}
-#endif
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-/* undoes intrapixel differencing  */
-void /* PRIVATE */
-png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
-{
-   png_debug(1, "in png_do_write_intrapixel\n");
-   if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
-#endif
-       (row_info->color_type & PNG_COLOR_MASK_COLOR))
-   {
-      int bytes_per_pixel;
-      png_uint_32 row_width = row_info->width;
-      if (row_info->bit_depth == 8)
-      {
-         png_bytep rp;
-         png_uint_32 i;
-
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-            bytes_per_pixel = 3;
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-            bytes_per_pixel = 4;
-         else
-            return;
-
-         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
-         {
-            *(rp)   = (png_byte)((*rp     - *(rp+1))&0xff);
-            *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);
-         }
-      }
-      else if (row_info->bit_depth == 16)
-      {
-         png_bytep rp;
-         png_uint_32 i;
-
-         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
-            bytes_per_pixel = 6;
-         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-            bytes_per_pixel = 8;
-         else
-            return;
-
-         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
-         {
-            png_uint_32 s0   = (*(rp  ) << 8) | *(rp+1);
-            png_uint_32 s1   = (*(rp+2) << 8) | *(rp+3);
-            png_uint_32 s2   = (*(rp+4) << 8) | *(rp+5);
-            png_uint_32 red  = (png_uint_32)((s0-s1) & 0xffffL);
-            png_uint_32 blue = (png_uint_32)((s2-s1) & 0xffffL);
-            *(rp  ) = (png_byte)((red >> 8) & 0xff);
-            *(rp+1) = (png_byte)(red & 0xff);
-            *(rp+4) = (png_byte)((blue >> 8) & 0xff);
-            *(rp+5) = (png_byte)(blue & 0xff);
-         }
-      }
-   }
-}
-#endif /* PNG_MNG_FEATURES_SUPPORTED */
-#endif /* PNG_WRITE_SUPPORTED */
diff --git a/tkimg1.3/libpng/pngwutil.c b/tkimg1.3/libpng/pngwutil.c
deleted file mode 100644
index 8411e75..0000000
--- a/tkimg1.3/libpng/pngwutil.c
+++ /dev/null
@@ -1,2724 +0,0 @@
-
-/* pngwutil.c - utilities to write a PNG file
- *
- * libpng version 1.2.6rc5 - August 10, 2004
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2004 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-#define PNG_INTERNAL
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
-
-/* Place a 32-bit number into a buffer in PNG byte order.  We work
- * with unsigned numbers for convenience, although one supported
- * ancillary chunk uses signed (two's complement) numbers.
- */
-void /* PRIVATE */
-png_save_uint_32(png_bytep buf, png_uint_32 i)
-{
-   buf[0] = (png_byte)((i >> 24) & 0xff);
-   buf[1] = (png_byte)((i >> 16) & 0xff);
-   buf[2] = (png_byte)((i >> 8) & 0xff);
-   buf[3] = (png_byte)(i & 0xff);
-}
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
-/* The png_save_int_32 function assumes integers are stored in two's
- * complement format.  If this isn't the case, then this routine needs to
- * be modified to write data in two's complement format.
- */
-void /* PRIVATE */
-png_save_int_32(png_bytep buf, png_int_32 i)
-{
-   buf[0] = (png_byte)((i >> 24) & 0xff);
-   buf[1] = (png_byte)((i >> 16) & 0xff);
-   buf[2] = (png_byte)((i >> 8) & 0xff);
-   buf[3] = (png_byte)(i & 0xff);
-}
-#endif
-
-/* Place a 16-bit number into a buffer in PNG byte order.
- * The parameter is declared unsigned int, not png_uint_16,
- * just to avoid potential problems on pre-ANSI C compilers.
- */
-void /* PRIVATE */
-png_save_uint_16(png_bytep buf, unsigned int i)
-{
-   buf[0] = (png_byte)((i >> 8) & 0xff);
-   buf[1] = (png_byte)(i & 0xff);
-}
-
-/* Write a PNG chunk all at once.  The type is an array of ASCII characters
- * representing the chunk name.  The array must be at least 4 bytes in
- * length, and does not need to be null terminated.  To be safe, pass the
- * pre-defined chunk names here, and if you need a new one, define it
- * where the others are defined.  The length is the length of the data.
- * All the data must be present.  If that is not possible, use the
- * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end()
- * functions instead.
- */
-void PNGAPI
-png_write_chunk(png_structp png_ptr, png_bytep chunk_name,
-   png_bytep data, png_size_t length)
-{
-   png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length);
-   png_write_chunk_data(png_ptr, data, length);
-   png_write_chunk_end(png_ptr);
-}
-
-/* Write the start of a PNG chunk.  The type is the chunk type.
- * The total_length is the sum of the lengths of all the data you will be
- * passing in png_write_chunk_data().
- */
-void PNGAPI
-png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
-   png_uint_32 length)
-{
-   png_byte buf[4];
-   png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length);
-
-   /* write the length */
-   png_save_uint_32(buf, length);
-   png_write_data(png_ptr, buf, (png_size_t)4);
-
-   /* write the chunk name */
-   png_write_data(png_ptr, chunk_name, (png_size_t)4);
-   /* reset the crc and run it over the chunk name */
-   png_reset_crc(png_ptr);
-   png_calculate_crc(png_ptr, chunk_name, (png_size_t)4);
-}
-
-/* Write the data of a PNG chunk started with png_write_chunk_start().
- * Note that multiple calls to this function are allowed, and that the
- * sum of the lengths from these calls *must* add up to the total_length
- * given to png_write_chunk_start().
- */
-void PNGAPI
-png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-   /* write the data, and run the CRC over it */
-   if (data != NULL && length > 0)
-   {
-      png_calculate_crc(png_ptr, data, length);
-      png_write_data(png_ptr, data, length);
-   }
-}
-
-/* Finish a chunk started with png_write_chunk_start(). */
-void PNGAPI
-png_write_chunk_end(png_structp png_ptr)
-{
-   png_byte buf[4];
-
-   /* write the crc */
-   png_save_uint_32(buf, png_ptr->crc);
-
-   png_write_data(png_ptr, buf, (png_size_t)4);
-}
-
-/* Simple function to write the signature.  If we have already written
- * the magic bytes of the signature, or more likely, the PNG stream is
- * being embedded into another stream and doesn't need its own signature,
- * we should call png_set_sig_bytes() to tell libpng how many of the
- * bytes have already been written.
- */
-void /* PRIVATE */
-png_write_sig(png_structp png_ptr)
-{
-   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
-   /* write the rest of the 8 byte signature */
-   png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
-      (png_size_t)8 - png_ptr->sig_bytes);
-   if(png_ptr->sig_bytes < 3)
-      png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
-}
-
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED)
-/*
- * This pair of functions encapsulates the operation of (a) compressing a
- * text string, and (b) issuing it later as a series of chunk data writes.
- * The compression_state structure is shared context for these functions
- * set up by the caller in order to make the whole mess thread-safe.
- */
-
-typedef struct
-{
-    char *input;   /* the uncompressed input data */
-    int input_len;   /* its length */
-    int num_output_ptr; /* number of output pointers used */
-    int max_output_ptr; /* size of output_ptr */
-    png_charpp output_ptr; /* array of pointers to output */
-} compression_state;
-
-/* compress given text into storage in the png_ptr structure */
-static int /* PRIVATE */
-png_text_compress(png_structp png_ptr,
-        png_charp text, png_size_t text_len, int compression,
-        compression_state *comp)
-{
-   int ret;
-
-   comp->num_output_ptr = comp->max_output_ptr = 0;
-   comp->output_ptr = NULL;
-   comp->input = NULL;
-
-   /* we may just want to pass the text right through */
-   if (compression == PNG_TEXT_COMPRESSION_NONE)
-   {
-       comp->input = text;
-       comp->input_len = text_len;
-       return((int)text_len);
-   }
-
-   if (compression >= PNG_TEXT_COMPRESSION_LAST)
-   {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-      char msg[50];
-      sprintf(msg, "Unknown compression type %d", compression);
-      png_warning(png_ptr, msg);
-#else
-      png_warning(png_ptr, "Unknown compression type");
-#endif
-   }
-
-   /* We can't write the chunk until we find out how much data we have,
-    * which means we need to run the compressor first and save the
-    * output.  This shouldn't be a problem, as the vast majority of
-    * comments should be reasonable, but we will set up an array of
-    * malloc'd pointers to be sure.
-    *
-    * If we knew the application was well behaved, we could simplify this
-    * greatly by assuming we can always malloc an output buffer large
-    * enough to hold the compressed text ((1001 * text_len / 1000) + 12)
-    * and malloc this directly.  The only time this would be a bad idea is
-    * if we can't malloc more than 64K and we have 64K of random input
-    * data, or if the input string is incredibly large (although this
-    * wouldn't cause a failure, just a slowdown due to swapping).
-    */
-
-   /* set up the compression buffers */
-   png_ptr->zstream.avail_in = (uInt)text_len;
-   png_ptr->zstream.next_in = (Bytef *)text;
-   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-   png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf;
-
-   /* this is the same compression loop as in png_write_row() */
-   do
-   {
-      /* compress the data */
-      ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);
-      if (ret != Z_OK)
-      {
-         /* error */
-         if (png_ptr->zstream.msg != NULL)
-            png_error(png_ptr, png_ptr->zstream.msg);
-         else
-            png_error(png_ptr, "zlib error");
-      }
-      /* check to see if we need more room */
-      if (!png_ptr->zstream.avail_out && png_ptr->zstream.avail_in)
-      {
-         /* make sure the output array has room */
-         if (comp->num_output_ptr >= comp->max_output_ptr)
-         {
-            int old_max;
-
-            old_max = comp->max_output_ptr;
-            comp->max_output_ptr = comp->num_output_ptr + 4;
-            if (comp->output_ptr != NULL)
-            {
-               png_charpp old_ptr;
-
-               old_ptr = comp->output_ptr;
-               comp->output_ptr = (png_charpp)png_malloc(png_ptr,
-                  (png_uint_32)(comp->max_output_ptr *
-                  png_sizeof (png_charpp)));
-               png_memcpy(comp->output_ptr, old_ptr, old_max
-                  * png_sizeof (png_charp));
-               png_free(png_ptr, old_ptr);
-            }
-            else
-               comp->output_ptr = (png_charpp)png_malloc(png_ptr,
-                  (png_uint_32)(comp->max_output_ptr *
-                  png_sizeof (png_charp)));
-         }
-
-         /* save the data */
-         comp->output_ptr[comp->num_output_ptr] = (png_charp)png_malloc(png_ptr,
-            (png_uint_32)png_ptr->zbuf_size);
-         png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
-            png_ptr->zbuf_size);
-         comp->num_output_ptr++;
-
-         /* and reset the buffer */
-         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-         png_ptr->zstream.next_out = png_ptr->zbuf;
-      }
-   /* continue until we don't have any more to compress */
-   } while (png_ptr->zstream.avail_in);
-
-   /* finish the compression */
-   do
-   {
-      /* tell zlib we are finished */
-      ret = deflate(&png_ptr->zstream, Z_FINISH);
-
-      if (ret == Z_OK)
-      {
-         /* check to see if we need more room */
-         if (!(png_ptr->zstream.avail_out))
-         {
-            /* check to make sure our output array has room */
-            if (comp->num_output_ptr >= comp->max_output_ptr)
-            {
-               int old_max;
-
-               old_max = comp->max_output_ptr;
-               comp->max_output_ptr = comp->num_output_ptr + 4;
-               if (comp->output_ptr != NULL)
-               {
-                  png_charpp old_ptr;
-
-                  old_ptr = comp->output_ptr;
-                  /* This could be optimized to realloc() */
-                  comp->output_ptr = (png_charpp)png_malloc(png_ptr,
-                     (png_uint_32)(comp->max_output_ptr *
-                     png_sizeof (png_charpp)));
-                  png_memcpy(comp->output_ptr, old_ptr,
-                     old_max * png_sizeof (png_charp));
-                  png_free(png_ptr, old_ptr);
-               }
-               else
-                  comp->output_ptr = (png_charpp)png_malloc(png_ptr,
-                     (png_uint_32)(comp->max_output_ptr *
-                     png_sizeof (png_charp)));
-            }
-
-            /* save off the data */
-            comp->output_ptr[comp->num_output_ptr] =
-               (png_charp)png_malloc(png_ptr, (png_uint_32)png_ptr->zbuf_size);
-            png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
-               png_ptr->zbuf_size);
-            comp->num_output_ptr++;
-
-            /* and reset the buffer pointers */
-            png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-            png_ptr->zstream.next_out = png_ptr->zbuf;
-         }
-      }
-      else if (ret != Z_STREAM_END)
-      {
-         /* we got an error */
-         if (png_ptr->zstream.msg != NULL)
-            png_error(png_ptr, png_ptr->zstream.msg);
-         else
-            png_error(png_ptr, "zlib error");
-      }
-   } while (ret != Z_STREAM_END);
-
-   /* text length is number of buffers plus last buffer */
-   text_len = png_ptr->zbuf_size * comp->num_output_ptr;
-   if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)
-      text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out;
-
-   return((int)text_len);
-}
-
-/* ship the compressed text out via chunk writes */
-static void /* PRIVATE */
-png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
-{
-   int i;
-
-   /* handle the no-compression case */
-   if (comp->input)
-   {
-       png_write_chunk_data(png_ptr, (png_bytep)comp->input,
-                            (png_size_t)comp->input_len);
-       return;
-   }
-
-   /* write saved output buffers, if any */
-   for (i = 0; i < comp->num_output_ptr; i++)
-   {
-      png_write_chunk_data(png_ptr,(png_bytep)comp->output_ptr[i],
-         png_ptr->zbuf_size);
-      png_free(png_ptr, comp->output_ptr[i]);
-      comp->output_ptr[i]=NULL;
-   }
-   if (comp->max_output_ptr != 0)
-      png_free(png_ptr, comp->output_ptr);
-      comp->output_ptr=NULL;
-   /* write anything left in zbuf */
-   if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
-      png_write_chunk_data(png_ptr, png_ptr->zbuf,
-         png_ptr->zbuf_size - png_ptr->zstream.avail_out);
-
-   /* reset zlib for another zTXt/iTXt or the image data */
-   deflateReset(&png_ptr->zstream);
-
-}
-#endif
-
-/* Write the IHDR chunk, and update the png_struct with the necessary
- * information.  Note that the rest of this code depends upon this
- * information being correct.
- */
-void /* PRIVATE */
-png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
-   int bit_depth, int color_type, int compression_type, int filter_type,
-   int interlace_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_IHDR;
-#endif
-   png_byte buf[13]; /* buffer to store the IHDR info */
-
-   png_debug(1, "in png_write_IHDR\n");
-   /* Check that we have valid input data from the application info */
-   switch (color_type)
-   {
-      case PNG_COLOR_TYPE_GRAY:
-         switch (bit_depth)
-         {
-            case 1:
-            case 2:
-            case 4:
-            case 8:
-            case 16: png_ptr->channels = 1; break;
-            default: png_error(png_ptr,"Invalid bit depth for grayscale image");
-         }
-         break;
-      case PNG_COLOR_TYPE_RGB:
-         if (bit_depth != 8 && bit_depth != 16)
-            png_error(png_ptr, "Invalid bit depth for RGB image");
-         png_ptr->channels = 3;
-         break;
-      case PNG_COLOR_TYPE_PALETTE:
-         switch (bit_depth)
-         {
-            case 1:
-            case 2:
-            case 4:
-            case 8: png_ptr->channels = 1; break;
-            default: png_error(png_ptr, "Invalid bit depth for paletted image");
-         }
-         break;
-      case PNG_COLOR_TYPE_GRAY_ALPHA:
-         if (bit_depth != 8 && bit_depth != 16)
-            png_error(png_ptr, "Invalid bit depth for grayscale+alpha image");
-         png_ptr->channels = 2;
-         break;
-      case PNG_COLOR_TYPE_RGB_ALPHA:
-         if (bit_depth != 8 && bit_depth != 16)
-            png_error(png_ptr, "Invalid bit depth for RGBA image");
-         png_ptr->channels = 4;
-         break;
-      default:
-         png_error(png_ptr, "Invalid image color type specified");
-   }
-
-   if (compression_type != PNG_COMPRESSION_TYPE_BASE)
-   {
-      png_warning(png_ptr, "Invalid compression type specified");
-      compression_type = PNG_COMPRESSION_TYPE_BASE;
-   }
-
-   /* Write filter_method 64 (intrapixel differencing) only if
-    * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
-    * 2. Libpng did not write a PNG signature (this filter_method is only
-    *    used in PNG datastreams that are embedded in MNG datastreams) and
-    * 3. The application called png_permit_mng_features with a mask that
-    *    included PNG_FLAG_MNG_FILTER_64 and
-    * 4. The filter_method is 64 and
-    * 5. The color_type is RGB or RGBA
-    */
-   if (
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-      !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
-      ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
-      (color_type == PNG_COLOR_TYPE_RGB ||
-       color_type == PNG_COLOR_TYPE_RGB_ALPHA) &&
-      (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) &&
-#endif
-      filter_type != PNG_FILTER_TYPE_BASE)
-   {
-      png_warning(png_ptr, "Invalid filter type specified");
-      filter_type = PNG_FILTER_TYPE_BASE;
-   }
-
-#ifdef PNG_WRITE_INTERLACING_SUPPORTED
-   if (interlace_type != PNG_INTERLACE_NONE &&
-      interlace_type != PNG_INTERLACE_ADAM7)
-   {
-      png_warning(png_ptr, "Invalid interlace type specified");
-      interlace_type = PNG_INTERLACE_ADAM7;
-   }
-#else
-   interlace_type=PNG_INTERLACE_NONE;
-#endif
-
-   /* save off the relevent information */
-   png_ptr->bit_depth = (png_byte)bit_depth;
-   png_ptr->color_type = (png_byte)color_type;
-   png_ptr->interlaced = (png_byte)interlace_type;
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   png_ptr->filter_type = (png_byte)filter_type;
-#endif
-   png_ptr->compression_type = (png_byte)compression_type;
-   png_ptr->width = width;
-   png_ptr->height = height;
-
-   png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels);
-   png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
-   /* set the usr info, so any transformations can modify it */
-   png_ptr->usr_width = png_ptr->width;
-   png_ptr->usr_bit_depth = png_ptr->bit_depth;
-   png_ptr->usr_channels = png_ptr->channels;
-
-   /* pack the header information into the buffer */
-   png_save_uint_32(buf, width);
-   png_save_uint_32(buf + 4, height);
-   buf[8] = (png_byte)bit_depth;
-   buf[9] = (png_byte)color_type;
-   buf[10] = (png_byte)compression_type;
-   buf[11] = (png_byte)filter_type;
-   buf[12] = (png_byte)interlace_type;
-
-   /* write the chunk */
-   png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);
-
-   /* initialize zlib with PNG info */
-   png_ptr->zstream.zalloc = png_zalloc;
-   png_ptr->zstream.zfree = png_zfree;
-   png_ptr->zstream.opaque = (voidpf)png_ptr;
-   if (!(png_ptr->do_filter))
-   {
-      if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
-         png_ptr->bit_depth < 8)
-         png_ptr->do_filter = PNG_FILTER_NONE;
-      else
-         png_ptr->do_filter = PNG_ALL_FILTERS;
-   }
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY))
-   {
-      if (png_ptr->do_filter != PNG_FILTER_NONE)
-         png_ptr->zlib_strategy = Z_FILTERED;
-      else
-         png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY;
-   }
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL))
-      png_ptr->zlib_level = Z_DEFAULT_COMPRESSION;
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL))
-      png_ptr->zlib_mem_level = 8;
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS))
-      png_ptr->zlib_window_bits = 15;
-   if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD))
-      png_ptr->zlib_method = 8;
-   deflateInit2(&png_ptr->zstream, png_ptr->zlib_level,
-      png_ptr->zlib_method, png_ptr->zlib_window_bits,
-      png_ptr->zlib_mem_level, png_ptr->zlib_strategy);
-   png_ptr->zstream.next_out = png_ptr->zbuf;
-   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
-   png_ptr->mode = PNG_HAVE_IHDR;
-}
-
-/* write the palette.  We are careful not to trust png_color to be in the
- * correct order for PNG, so people can redefine it to any convenient
- * structure.
- */
-void /* PRIVATE */
-png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_PLTE;
-#endif
-   png_uint_32 i;
-   png_colorp pal_ptr;
-   png_byte buf[3];
-
-   png_debug(1, "in png_write_PLTE\n");
-   if ((
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-        !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
-#endif
-        num_pal == 0) || num_pal > 256)
-   {
-     if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-     {
-        png_error(png_ptr, "Invalid number of colors in palette");
-     }
-     else
-     {
-        png_warning(png_ptr, "Invalid number of colors in palette");
-        return;
-     }
-   }
-
-   if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))
-   {
-      png_warning(png_ptr,
-        "Ignoring request to write a PLTE chunk in grayscale PNG");
-      return;
-   }
-
-   png_ptr->num_palette = (png_uint_16)num_pal;
-   png_debug1(3, "num_palette = %d\n", png_ptr->num_palette);
-
-   png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, num_pal * 3);
-#ifndef PNG_NO_POINTER_INDEXING
-   for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
-   {
-      buf[0] = pal_ptr->red;
-      buf[1] = pal_ptr->green;
-      buf[2] = pal_ptr->blue;
-      png_write_chunk_data(png_ptr, buf, (png_size_t)3);
-   }
-#else
-   /* This is a little slower but some buggy compilers need to do this instead */
-   pal_ptr=palette;
-   for (i = 0; i < num_pal; i++)
-   {
-      buf[0] = pal_ptr[i].red;
-      buf[1] = pal_ptr[i].green;
-      buf[2] = pal_ptr[i].blue;
-      png_write_chunk_data(png_ptr, buf, (png_size_t)3);
-   }
-#endif
-   png_write_chunk_end(png_ptr);
-   png_ptr->mode |= PNG_HAVE_PLTE;
-}
-
-/* write an IDAT chunk */
-void /* PRIVATE */
-png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_IDAT;
-#endif
-   png_debug(1, "in png_write_IDAT\n");
-
-   /* Optimize the CMF field in the zlib stream. */
-   /* This hack of the zlib stream is compliant to the stream specification. */
-   if (!(png_ptr->mode & PNG_HAVE_IDAT) &&
-       png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE)
-   {
-      unsigned int z_cmf = data[0];  /* zlib compression method and flags */
-      if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70)
-      {
-         /* Avoid memory underflows and multiplication overflows. */
-         /* The conditions below are practically always satisfied;
-            however, they still must be checked. */
-         if (length >= 2 &&
-             png_ptr->height < 16384 && png_ptr->width < 16384)
-         {
-            png_uint_32 uncompressed_idat_size = png_ptr->height *
-               (PNG_ROWBYTES(png_ptr->channels*png_ptr->bit_depth,
-                  png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
-            unsigned int z_cinfo = z_cmf >> 4;
-            unsigned int half_z_window_size = 1 << (z_cinfo + 7);
-            while (uncompressed_idat_size <= half_z_window_size &&
-                   half_z_window_size >= 256)
-            {
-               z_cinfo--;
-               half_z_window_size >>= 1;
-            }
-            z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4);
-            if (data[0] != (png_byte)z_cmf)
-            {
-               data[0] = (png_byte)z_cmf;
-               data[1] &= 0xe0;
-               data[1] += (png_byte)(0x1f - ((z_cmf << 8) + data[1]) % 0x1f);
-            }
-         }
-      }
-      else
-         png_error(png_ptr,
-            "Invalid zlib compression method or flags in IDAT");
-   }
-
-   png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length);
-   png_ptr->mode |= PNG_HAVE_IDAT;
-}
-
-/* write an IEND chunk */
-void /* PRIVATE */
-png_write_IEND(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_IEND;
-#endif
-   png_debug(1, "in png_write_IEND\n");
-   png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,
-     (png_size_t)0);
-   png_ptr->mode |= PNG_HAVE_IEND;
-}
-
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
-/* write a gAMA chunk */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_gAMA(png_structp png_ptr, double file_gamma)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_gAMA;
-#endif
-   png_uint_32 igamma;
-   png_byte buf[4];
-
-   png_debug(1, "in png_write_gAMA\n");
-   /* file_gamma is saved in 1/100,000ths */
-   igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5);
-   png_save_uint_32(buf, igamma);
-   png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_gAMA;
-#endif
-   png_byte buf[4];
-
-   png_debug(1, "in png_write_gAMA\n");
-   /* file_gamma is saved in 1/100,000ths */
-   png_save_uint_32(buf, (png_uint_32)file_gamma);
-   png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
-}
-#endif
-#endif
-
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
-/* write a sRGB chunk */
-void /* PRIVATE */
-png_write_sRGB(png_structp png_ptr, int srgb_intent)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_sRGB;
-#endif
-   png_byte buf[1];
-
-   png_debug(1, "in png_write_sRGB\n");
-   if(srgb_intent >= PNG_sRGB_INTENT_LAST)
-         png_warning(png_ptr,
-            "Invalid sRGB rendering intent specified");
-   buf[0]=(png_byte)srgb_intent;
-   png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1);
-}
-#endif
-
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
-/* write an iCCP chunk */
-void /* PRIVATE */
-png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
-   png_charp profile, int profile_len)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_iCCP;
-#endif
-   png_size_t name_len;
-   png_charp new_name;
-   compression_state comp;
-
-   png_debug(1, "in png_write_iCCP\n");
-   if (name == NULL || (name_len = png_check_keyword(png_ptr, name,
-      &new_name)) == 0)
-   {
-      png_warning(png_ptr, "Empty keyword in iCCP chunk");
-      return;
-   }
-
-   if (compression_type != PNG_COMPRESSION_TYPE_BASE)
-      png_warning(png_ptr, "Unknown compression type in iCCP chunk");
-
-   if (profile == NULL)
-      profile_len = 0;
-
-   if (profile_len)
-       profile_len = png_text_compress(png_ptr, profile, (png_size_t)profile_len,
-          PNG_COMPRESSION_TYPE_BASE, &comp);
-
-   /* make sure we include the NULL after the name and the compression type */
-   png_write_chunk_start(png_ptr, (png_bytep)png_iCCP,
-          (png_uint_32)name_len+profile_len+2);
-   new_name[name_len+1]=0x00;
-   png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 2);
-
-   if (profile_len)
-      png_write_compressed_data_out(png_ptr, &comp);
-
-   png_write_chunk_end(png_ptr);
-   png_free(png_ptr, new_name);
-}
-#endif
-
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
-/* write a sPLT chunk */
-void /* PRIVATE */
-png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_sPLT;
-#endif
-   png_size_t name_len;
-   png_charp new_name;
-   png_byte entrybuf[10];
-   int entry_size = (spalette->depth == 8 ? 6 : 10);
-   int palette_size = entry_size * spalette->nentries;
-   png_sPLT_entryp ep;
-#ifdef PNG_NO_POINTER_INDEXING
-   int i;
-#endif
-
-   png_debug(1, "in png_write_sPLT\n");
-   if (spalette->name == NULL || (name_len = png_check_keyword(png_ptr,
-      spalette->name, &new_name))==0)
-   {
-      png_warning(png_ptr, "Empty keyword in sPLT chunk");
-      return;
-   }
-
-   /* make sure we include the NULL after the name */
-   png_write_chunk_start(png_ptr, (png_bytep)png_sPLT,
-          (png_uint_32)(name_len + 2 + palette_size));
-   png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 1);
-   png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, 1);
-
-   /* loop through each palette entry, writing appropriately */
-#ifndef PNG_NO_POINTER_INDEXING
-   for (ep = spalette->entries; ep<spalette->entries+spalette->nentries; ep++)
-   {
-       if (spalette->depth == 8)
-       {
-           entrybuf[0] = (png_byte)ep->red;
-           entrybuf[1] = (png_byte)ep->green;
-           entrybuf[2] = (png_byte)ep->blue;
-           entrybuf[3] = (png_byte)ep->alpha;
-           png_save_uint_16(entrybuf + 4, ep->frequency);
-       }
-       else
-       {
-           png_save_uint_16(entrybuf + 0, ep->red);
-           png_save_uint_16(entrybuf + 2, ep->green);
-           png_save_uint_16(entrybuf + 4, ep->blue);
-           png_save_uint_16(entrybuf + 6, ep->alpha);
-           png_save_uint_16(entrybuf + 8, ep->frequency);
-       }
-       png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);
-   }
-#else
-   ep=spalette->entries;
-   for (i=0; i>spalette->nentries; i++)
-   {
-       if (spalette->depth == 8)
-       {
-           entrybuf[0] = (png_byte)ep[i].red;
-           entrybuf[1] = (png_byte)ep[i].green;
-           entrybuf[2] = (png_byte)ep[i].blue;
-           entrybuf[3] = (png_byte)ep[i].alpha;
-           png_save_uint_16(entrybuf + 4, ep[i].frequency);
-       }
-       else
-       {
-           png_save_uint_16(entrybuf + 0, ep[i].red);
-           png_save_uint_16(entrybuf + 2, ep[i].green);
-           png_save_uint_16(entrybuf + 4, ep[i].blue);
-           png_save_uint_16(entrybuf + 6, ep[i].alpha);
-           png_save_uint_16(entrybuf + 8, ep[i].frequency);
-       }
-       png_write_chunk_data(png_ptr, entrybuf, entry_size);
-   }
-#endif
-
-   png_write_chunk_end(png_ptr);
-   png_free(png_ptr, new_name);
-}
-#endif
-
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
-/* write the sBIT chunk */
-void /* PRIVATE */
-png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_sBIT;
-#endif
-   png_byte buf[4];
-   png_size_t size;
-
-   png_debug(1, "in png_write_sBIT\n");
-   /* make sure we don't depend upon the order of PNG_COLOR_8 */
-   if (color_type & PNG_COLOR_MASK_COLOR)
-   {
-      png_byte maxbits;
-
-      maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
-                png_ptr->usr_bit_depth);
-      if (sbit->red == 0 || sbit->red > maxbits ||
-          sbit->green == 0 || sbit->green > maxbits ||
-          sbit->blue == 0 || sbit->blue > maxbits)
-      {
-         png_warning(png_ptr, "Invalid sBIT depth specified");
-         return;
-      }
-      buf[0] = sbit->red;
-      buf[1] = sbit->green;
-      buf[2] = sbit->blue;
-      size = 3;
-   }
-   else
-   {
-      if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)
-      {
-         png_warning(png_ptr, "Invalid sBIT depth specified");
-         return;
-      }
-      buf[0] = sbit->gray;
-      size = 1;
-   }
-
-   if (color_type & PNG_COLOR_MASK_ALPHA)
-   {
-      if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)
-      {
-         png_warning(png_ptr, "Invalid sBIT depth specified");
-         return;
-      }
-      buf[size++] = sbit->alpha;
-   }
-
-   png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size);
-}
-#endif
-
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
-/* write the cHRM chunk */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
-   double red_x, double red_y, double green_x, double green_y,
-   double blue_x, double blue_y)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_cHRM;
-#endif
-   png_byte buf[32];
-   png_uint_32 itemp;
-
-   png_debug(1, "in png_write_cHRM\n");
-   /* each value is saved in 1/100,000ths */
-   if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 ||
-       white_x + white_y > 1.0)
-   {
-      png_warning(png_ptr, "Invalid cHRM white point specified");
-#if !defined(PNG_NO_CONSOLE_IO)
-      fprintf(stderr,"white_x=%f, white_y=%f\n",white_x, white_y);
-#endif
-      return;
-   }
-   itemp = (png_uint_32)(white_x * 100000.0 + 0.5);
-   png_save_uint_32(buf, itemp);
-   itemp = (png_uint_32)(white_y * 100000.0 + 0.5);
-   png_save_uint_32(buf + 4, itemp);
-
-   if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 ||
-       red_x + red_y > 1.0)
-   {
-      png_warning(png_ptr, "Invalid cHRM red point specified");
-      return;
-   }
-   itemp = (png_uint_32)(red_x * 100000.0 + 0.5);
-   png_save_uint_32(buf + 8, itemp);
-   itemp = (png_uint_32)(red_y * 100000.0 + 0.5);
-   png_save_uint_32(buf + 12, itemp);
-
-   if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 ||
-       green_x + green_y > 1.0)
-   {
-      png_warning(png_ptr, "Invalid cHRM green point specified");
-      return;
-   }
-   itemp = (png_uint_32)(green_x * 100000.0 + 0.5);
-   png_save_uint_32(buf + 16, itemp);
-   itemp = (png_uint_32)(green_y * 100000.0 + 0.5);
-   png_save_uint_32(buf + 20, itemp);
-
-   if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 ||
-       blue_x + blue_y > 1.0)
-   {
-      png_warning(png_ptr, "Invalid cHRM blue point specified");
-      return;
-   }
-   itemp = (png_uint_32)(blue_x * 100000.0 + 0.5);
-   png_save_uint_32(buf + 24, itemp);
-   itemp = (png_uint_32)(blue_y * 100000.0 + 0.5);
-   png_save_uint_32(buf + 28, itemp);
-
-   png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
-   png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y,
-   png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x,
-   png_fixed_point blue_y)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_cHRM;
-#endif
-   png_byte buf[32];
-
-   png_debug(1, "in png_write_cHRM\n");
-   /* each value is saved in 1/100,000ths */
-   if (white_x > 80000L || white_y > 80000L || white_x + white_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid fixed cHRM white point specified");
-#if !defined(PNG_NO_CONSOLE_IO)
-      fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y);
-#endif
-      return;
-   }
-   png_save_uint_32(buf, (png_uint_32)white_x);
-   png_save_uint_32(buf + 4, (png_uint_32)white_y);
-
-   if (red_x > 80000L || red_y > 80000L || red_x + red_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid cHRM fixed red point specified");
-      return;
-   }
-   png_save_uint_32(buf + 8, (png_uint_32)red_x);
-   png_save_uint_32(buf + 12, (png_uint_32)red_y);
-
-   if (green_x > 80000L || green_y > 80000L || green_x + green_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid fixed cHRM green point specified");
-      return;
-   }
-   png_save_uint_32(buf + 16, (png_uint_32)green_x);
-   png_save_uint_32(buf + 20, (png_uint_32)green_y);
-
-   if (blue_x > 80000L || blue_y > 80000L || blue_x + blue_y > 100000L)
-   {
-      png_warning(png_ptr, "Invalid fixed cHRM blue point specified");
-      return;
-   }
-   png_save_uint_32(buf + 24, (png_uint_32)blue_x);
-   png_save_uint_32(buf + 28, (png_uint_32)blue_y);
-
-   png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);
-}
-#endif
-#endif
-
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
-/* write the tRNS chunk */
-void /* PRIVATE */
-png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
-   int num_trans, int color_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_tRNS;
-#endif
-   png_byte buf[6];
-
-   png_debug(1, "in png_write_tRNS\n");
-   if (color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette)
-      {
-         png_warning(png_ptr,"Invalid number of transparent colors specified");
-         return;
-      }
-      /* write the chunk out as it is */
-      png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans, (png_size_t)num_trans);
-   }
-   else if (color_type == PNG_COLOR_TYPE_GRAY)
-   {
-      /* one 16 bit value */
-      if(tran->gray >= (1 << png_ptr->bit_depth))
-      {
-         png_warning(png_ptr,
-           "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
-         return;
-      }
-      png_save_uint_16(buf, tran->gray);
-      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
-   }
-   else if (color_type == PNG_COLOR_TYPE_RGB)
-   {
-      /* three 16 bit values */
-      png_save_uint_16(buf, tran->red);
-      png_save_uint_16(buf + 2, tran->green);
-      png_save_uint_16(buf + 4, tran->blue);
-      if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
-         {
-            png_warning(png_ptr,
-              "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
-            return;
-         }
-      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
-   }
-   else
-   {
-      png_warning(png_ptr, "Can't write tRNS with an alpha channel");
-   }
-}
-#endif
-
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
-/* write the background chunk */
-void /* PRIVATE */
-png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_bKGD;
-#endif
-   png_byte buf[6];
-
-   png_debug(1, "in png_write_bKGD\n");
-   if (color_type == PNG_COLOR_TYPE_PALETTE)
-   {
-      if (
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-          (png_ptr->num_palette ||
-          (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&
-#endif
-         back->index > png_ptr->num_palette)
-      {
-         png_warning(png_ptr, "Invalid background palette index");
-         return;
-      }
-      buf[0] = back->index;
-      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1);
-   }
-   else if (color_type & PNG_COLOR_MASK_COLOR)
-   {
-      png_save_uint_16(buf, back->red);
-      png_save_uint_16(buf + 2, back->green);
-      png_save_uint_16(buf + 4, back->blue);
-      if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
-         {
-            png_warning(png_ptr,
-              "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
-            return;
-         }
-      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
-   }
-   else
-   {
-      if(back->gray >= (1 << png_ptr->bit_depth))
-      {
-         png_warning(png_ptr,
-           "Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
-         return;
-      }
-      png_save_uint_16(buf, back->gray);
-      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
-   }
-}
-#endif
-
-#if defined(PNG_WRITE_hIST_SUPPORTED)
-/* write the histogram */
-void /* PRIVATE */
-png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_hIST;
-#endif
-   int i;
-   png_byte buf[3];
-
-   png_debug(1, "in png_write_hIST\n");
-   if (num_hist > (int)png_ptr->num_palette)
-   {
-      png_debug2(3, "num_hist = %d, num_palette = %d\n", num_hist,
-         png_ptr->num_palette);
-      png_warning(png_ptr, "Invalid number of histogram entries specified");
-      return;
-   }
-
-   png_write_chunk_start(png_ptr, (png_bytep)png_hIST, (png_uint_32)(num_hist * 2));
-   for (i = 0; i < num_hist; i++)
-   {
-      png_save_uint_16(buf, hist[i]);
-      png_write_chunk_data(png_ptr, buf, (png_size_t)2);
-   }
-   png_write_chunk_end(png_ptr);
-}
-#endif
-
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
-    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
-/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification,
- * and if invalid, correct the keyword rather than discarding the entire
- * chunk.  The PNG 1.0 specification requires keywords 1-79 characters in
- * length, forbids leading or trailing whitespace, multiple internal spaces,
- * and the non-break space (0x80) from ISO 8859-1.  Returns keyword length.
- *
- * The new_key is allocated to hold the corrected keyword and must be freed
- * by the calling routine.  This avoids problems with trying to write to
- * static keywords without having to have duplicate copies of the strings.
- */
-png_size_t /* PRIVATE */
-png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
-{
-   png_size_t key_len;
-   png_charp kp, dp;
-   int kflag;
-   int kwarn=0;
-
-   png_debug(1, "in png_check_keyword\n");
-   *new_key = NULL;
-
-   if (key == NULL || (key_len = png_strlen(key)) == 0)
-   {
-      png_warning(png_ptr, "zero length keyword");
-      return ((png_size_t)0);
-   }
-
-   png_debug1(2, "Keyword to be checked is '%s'\n", key);
-
-   *new_key = (png_charp)png_malloc_warn(png_ptr, (png_uint_32)(key_len + 2));
-   if (*new_key == NULL)
-   {
-      png_warning(png_ptr, "Out of memory while procesing keyword");
-      return ((png_size_t)0);
-   }
-
-   /* Replace non-printing characters with a blank and print a warning */
-   for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++)
-   {
-      if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1))
-      {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
-         char msg[40];
-
-         sprintf(msg, "invalid keyword character 0x%02X", *kp);
-         png_warning(png_ptr, msg);
-#else
-         png_warning(png_ptr, "invalid character in keyword");
-#endif
-         *dp = ' ';
-      }
-      else
-      {
-         *dp = *kp;
-      }
-   }
-   *dp = '\0';
-
-   /* Remove any trailing white space. */
-   kp = *new_key + key_len - 1;
-   if (*kp == ' ')
-   {
-      png_warning(png_ptr, "trailing spaces removed from keyword");
-
-      while (*kp == ' ')
-      {
-        *(kp--) = '\0';
-        key_len--;
-      }
-   }
-
-   /* Remove any leading white space. */
-   kp = *new_key;
-   if (*kp == ' ')
-   {
-      png_warning(png_ptr, "leading spaces removed from keyword");
-
-      while (*kp == ' ')
-      {
-        kp++;
-        key_len--;
-      }
-   }
-
-   png_debug1(2, "Checking for multiple internal spaces in '%s'\n", kp);
-
-   /* Remove multiple internal spaces. */
-   for (kflag = 0, dp = *new_key; *kp != '\0'; kp++)
-   {
-      if (*kp == ' ' && kflag == 0)
-      {
-         *(dp++) = *kp;
-         kflag = 1;
-      }
-      else if (*kp == ' ')
-      {
-         key_len--;
-         kwarn=1;
-      }
-      else
-      {
-         *(dp++) = *kp;
-         kflag = 0;
-      }
-   }
-   *dp = '\0';
-   if(kwarn)
-      png_warning(png_ptr, "extra interior spaces removed from keyword");
-
-   if (key_len == 0)
-   {
-      png_free(png_ptr, *new_key);
-      *new_key=NULL;
-      png_warning(png_ptr, "Zero length keyword");
-   }
-
-   if (key_len > 79)
-   {
-      png_warning(png_ptr, "keyword length must be 1 - 79 characters");
-      new_key[79] = '\0';
-      key_len = 79;
-   }
-
-   return (key_len);
-}
-#endif
-
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-/* write a tEXt chunk */
-void /* PRIVATE */
-png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
-   png_size_t text_len)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_tEXt;
-#endif
-   png_size_t key_len;
-   png_charp new_key;
-
-   png_debug(1, "in png_write_tEXt\n");
-   if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
-   {
-      png_warning(png_ptr, "Empty keyword in tEXt chunk");
-      return;
-   }
-
-   if (text == NULL || *text == '\0')
-      text_len = 0;
-   else
-      text_len = png_strlen(text);
-
-   /* make sure we include the 0 after the key */
-   png_write_chunk_start(png_ptr, (png_bytep)png_tEXt, (png_uint_32)key_len+text_len+1);
-   /*
-    * We leave it to the application to meet PNG-1.0 requirements on the
-    * contents of the text.  PNG-1.0 through PNG-1.2 discourage the use of
-    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.
-    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
-    */
-   png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1);
-   if (text_len)
-      png_write_chunk_data(png_ptr, (png_bytep)text, text_len);
-
-   png_write_chunk_end(png_ptr);
-   png_free(png_ptr, new_key);
-}
-#endif
-
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-/* write a compressed text chunk */
-void /* PRIVATE */
-png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
-   png_size_t text_len, int compression)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_zTXt;
-#endif
-   png_size_t key_len;
-   char buf[1];
-   png_charp new_key;
-   compression_state comp;
-
-   png_debug(1, "in png_write_zTXt\n");
-
-   if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
-   {
-      png_warning(png_ptr, "Empty keyword in zTXt chunk");
-      return;
-   }
-
-   if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE)
-   {
-      png_write_tEXt(png_ptr, new_key, text, (png_size_t)0);
-      png_free(png_ptr, new_key);
-      return;
-   }
-
-   text_len = png_strlen(text);
-
-   png_free(png_ptr, new_key);
-
-   /* compute the compressed data; do it now for the length */
-   text_len = png_text_compress(png_ptr, text, text_len, compression,
-       &comp);
-
-   /* write start of chunk */
-   png_write_chunk_start(png_ptr, (png_bytep)png_zTXt, (png_uint_32)
-      (key_len+text_len+2));
-   /* write key */
-   png_write_chunk_data(png_ptr, (png_bytep)key, key_len + 1);
-   buf[0] = (png_byte)compression;
-   /* write compression */
-   png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1);
-   /* write the compressed data */
-   png_write_compressed_data_out(png_ptr, &comp);
-
-   /* close the chunk */
-   png_write_chunk_end(png_ptr);
-}
-#endif
-
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-/* write an iTXt chunk */
-void /* PRIVATE */
-png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
-    png_charp lang, png_charp lang_key, png_charp text)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_iTXt;
-#endif
-   png_size_t lang_len, key_len, lang_key_len, text_len;
-   png_charp new_lang, new_key;
-   png_byte cbuf[2];
-   compression_state comp;
-
-   png_debug(1, "in png_write_iTXt\n");
-
-   if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
-   {
-      png_warning(png_ptr, "Empty keyword in iTXt chunk");
-      return;
-   }
-   if (lang == NULL || (lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0)
-   {
-      png_warning(png_ptr, "Empty language field in iTXt chunk");
-      new_lang = NULL;
-      lang_len = 0;
-   }
-
-   if (lang_key == NULL)
-     lang_key_len = 0;
-   else
-     lang_key_len = png_strlen(lang_key);
-
-   if (text == NULL)
-      text_len = 0;
-   else
-     text_len = png_strlen(text);
-
-   /* compute the compressed data; do it now for the length */
-   text_len = png_text_compress(png_ptr, text, text_len, compression-2,
-      &comp);
-
-
-   /* make sure we include the compression flag, the compression byte,
-    * and the NULs after the key, lang, and lang_key parts */
-
-   png_write_chunk_start(png_ptr, (png_bytep)png_iTXt,
-          (png_uint_32)(
-        5 /* comp byte, comp flag, terminators for key, lang and lang_key */
-        + key_len
-        + lang_len
-        + lang_key_len
-        + text_len));
-
-   /*
-    * We leave it to the application to meet PNG-1.0 requirements on the
-    * contents of the text.  PNG-1.0 through PNG-1.2 discourage the use of
-    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.
-    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
-    */
-   png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1);
-
-   /* set the compression flag */
-   if (compression == PNG_ITXT_COMPRESSION_NONE || \
-       compression == PNG_TEXT_COMPRESSION_NONE)
-       cbuf[0] = 0;
-   else /* compression == PNG_ITXT_COMPRESSION_zTXt */
-       cbuf[0] = 1;
-   /* set the compression method */
-   cbuf[1] = 0;
-   png_write_chunk_data(png_ptr, cbuf, 2);
-
-   cbuf[0] = 0;
-   png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf), lang_len + 1);
-   png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf), lang_key_len + 1);
-   png_write_compressed_data_out(png_ptr, &comp);
-
-   png_write_chunk_end(png_ptr);
-   png_free(png_ptr, new_key);
-   if (new_lang)
-     png_free(png_ptr, new_lang);
-}
-#endif
-
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
-/* write the oFFs chunk */
-void /* PRIVATE */
-png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
-   int unit_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_oFFs;
-#endif
-   png_byte buf[9];
-
-   png_debug(1, "in png_write_oFFs\n");
-   if (unit_type >= PNG_OFFSET_LAST)
-      png_warning(png_ptr, "Unrecognized unit type for oFFs chunk");
-
-   png_save_int_32(buf, x_offset);
-   png_save_int_32(buf + 4, y_offset);
-   buf[8] = (png_byte)unit_type;
-
-   png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
-}
-#endif
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
-/* write the pCAL chunk (described in the PNG extensions document) */
-void /* PRIVATE */
-png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
-   png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_pCAL;
-#endif
-   png_size_t purpose_len, units_len, total_len;
-   png_uint_32p params_len;
-   png_byte buf[10];
-   png_charp new_purpose;
-   int i;
-
-   png_debug1(1, "in png_write_pCAL (%d parameters)\n", nparams);
-   if (type >= PNG_EQUATION_LAST)
-      png_warning(png_ptr, "Unrecognized equation type for pCAL chunk");
-
-   purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1;
-   png_debug1(3, "pCAL purpose length = %d\n", (int)purpose_len);
-   units_len = png_strlen(units) + (nparams == 0 ? 0 : 1);
-   png_debug1(3, "pCAL units length = %d\n", (int)units_len);
-   total_len = purpose_len + units_len + 10;
-
-   params_len = (png_uint_32p)png_malloc(png_ptr, (png_uint_32)(nparams
-      *png_sizeof(png_uint_32)));
-
-   /* Find the length of each parameter, making sure we don't count the
-      null terminator for the last parameter. */
-   for (i = 0; i < nparams; i++)
-   {
-      params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1);
-      png_debug2(3, "pCAL parameter %d length = %lu\n", i, params_len[i]);
-      total_len += (png_size_t)params_len[i];
-   }
-
-   png_debug1(3, "pCAL total length = %d\n", (int)total_len);
-   png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len);
-   png_write_chunk_data(png_ptr, (png_bytep)new_purpose, purpose_len);
-   png_save_int_32(buf, X0);
-   png_save_int_32(buf + 4, X1);
-   buf[8] = (png_byte)type;
-   buf[9] = (png_byte)nparams;
-   png_write_chunk_data(png_ptr, buf, (png_size_t)10);
-   png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len);
-
-   png_free(png_ptr, new_purpose);
-
-   for (i = 0; i < nparams; i++)
-   {
-      png_write_chunk_data(png_ptr, (png_bytep)params[i],
-         (png_size_t)params_len[i]);
-   }
-
-   png_free(png_ptr, params_len);
-   png_write_chunk_end(png_ptr);
-}
-#endif
-
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-/* write the sCAL chunk */
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-void /* PRIVATE */
-png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_sCAL;
-#endif
-   png_size_t total_len;
-   char wbuf[32], hbuf[32];
-
-   png_debug(1, "in png_write_sCAL\n");
-
-#if defined(_WIN32_WCE)
-/* sprintf() function is not supported on WindowsCE */
-   {
-      wchar_t wc_buf[32];
-      swprintf(wc_buf, TEXT("%12.12e"), width);
-      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
-      swprintf(wc_buf, TEXT("%12.12e"), height);
-      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
-   }
-#else
-   sprintf(wbuf, "%12.12e", width);
-   sprintf(hbuf, "%12.12e", height);
-#endif
-   total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
-
-   png_debug1(3, "sCAL total length = %d\n", (int)total_len);
-   png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
-   png_write_chunk_data(png_ptr, (png_bytep)&unit, 1);
-   png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
-   png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
-
-   png_write_chunk_end(png_ptr);
-}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
-   png_charp height)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_sCAL;
-#endif
-   png_size_t total_len;
-   char wbuf[32], hbuf[32];
-
-   png_debug(1, "in png_write_sCAL_s\n");
-
-   png_strcpy(wbuf,(const char *)width);
-   png_strcpy(hbuf,(const char *)height);
-   total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
-
-   png_debug1(3, "sCAL total length = %d\n", total_len);
-   png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
-   png_write_chunk_data(png_ptr, (png_bytep)&unit, 1);
-   png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
-   png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
-
-   png_write_chunk_end(png_ptr);
-}
-#endif
-#endif
-#endif
-
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
-/* write the pHYs chunk */
-void /* PRIVATE */
-png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
-   png_uint_32 y_pixels_per_unit,
-   int unit_type)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_pHYs;
-#endif
-   png_byte buf[9];
-
-   png_debug(1, "in png_write_pHYs\n");
-   if (unit_type >= PNG_RESOLUTION_LAST)
-      png_warning(png_ptr, "Unrecognized unit type for pHYs chunk");
-
-   png_save_uint_32(buf, x_pixels_per_unit);
-   png_save_uint_32(buf + 4, y_pixels_per_unit);
-   buf[8] = (png_byte)unit_type;
-
-   png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9);
-}
-#endif
-
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-/* Write the tIME chunk.  Use either png_convert_from_struct_tm()
- * or png_convert_from_time_t(), or fill in the structure yourself.
- */
-void /* PRIVATE */
-png_write_tIME(png_structp png_ptr, png_timep mod_time)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   PNG_tIME;
-#endif
-   png_byte buf[7];
-
-   png_debug(1, "in png_write_tIME\n");
-   if (mod_time->month  > 12 || mod_time->month  < 1 ||
-       mod_time->day    > 31 || mod_time->day    < 1 ||
-       mod_time->hour   > 23 || mod_time->second > 60)
-   {
-      png_warning(png_ptr, "Invalid time specified for tIME chunk");
-      return;
-   }
-
-   png_save_uint_16(buf, mod_time->year);
-   buf[2] = mod_time->month;
-   buf[3] = mod_time->day;
-   buf[4] = mod_time->hour;
-   buf[5] = mod_time->minute;
-   buf[6] = mod_time->second;
-
-   png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7);
-}
-#endif
-
-/* initializes the row writing capability of libpng */
-void /* PRIVATE */
-png_write_start_row(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-
-   /* start of interlace block in the y direction */
-   int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
-
-   /* offset to next interlace block in the y direction */
-   int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
-#endif
-
-   png_size_t buf_size;
-
-   png_debug(1, "in png_write_start_row\n");
-   buf_size = (png_size_t)(PNG_ROWBYTES(
-      png_ptr->usr_channels*png_ptr->usr_bit_depth,png_ptr->width)+1);
-
-   /* set up row buffer */
-   png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size);
-   png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;
-
-   /* set up filtering buffer, if using this filter */
-   if (png_ptr->do_filter & PNG_FILTER_SUB)
-   {
-      png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
-         (png_ptr->rowbytes + 1));
-      png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;
-   }
-
-   /* We only need to keep the previous row if we are using one of these. */
-   if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH))
-   {
-     /* set up previous row buffer */
-      png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size);
-      png_memset(png_ptr->prev_row, 0, buf_size);
-
-      if (png_ptr->do_filter & PNG_FILTER_UP)
-      {
-         png_ptr->up_row = (png_bytep )png_malloc(png_ptr,
-            (png_ptr->rowbytes + 1));
-         png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
-      }
-
-      if (png_ptr->do_filter & PNG_FILTER_AVG)
-      {
-         png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,
-            (png_ptr->rowbytes + 1));
-         png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;
-      }
-
-      if (png_ptr->do_filter & PNG_FILTER_PAETH)
-      {
-         png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr,
-            (png_ptr->rowbytes + 1));
-         png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
-      }
-   }
-
-#ifdef PNG_WRITE_INTERLACING_SUPPORTED
-   /* if interlaced, we need to set up width and height of pass */
-   if (png_ptr->interlaced)
-   {
-      if (!(png_ptr->transformations & PNG_INTERLACE))
-      {
-         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
-            png_pass_ystart[0]) / png_pass_yinc[0];
-         png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 -
-            png_pass_start[0]) / png_pass_inc[0];
-      }
-      else
-      {
-         png_ptr->num_rows = png_ptr->height;
-         png_ptr->usr_width = png_ptr->width;
-      }
-   }
-   else
-#endif
-   {
-      png_ptr->num_rows = png_ptr->height;
-      png_ptr->usr_width = png_ptr->width;
-   }
-   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-   png_ptr->zstream.next_out = png_ptr->zbuf;
-}
-
-/* Internal use only.  Called when finished processing a row of data. */
-void /* PRIVATE */
-png_write_finish_row(png_structp png_ptr)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-
-   /* start of interlace block in the y direction */
-   int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
-
-   /* offset to next interlace block in the y direction */
-   int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
-#endif
-
-   int ret;
-
-   png_debug(1, "in png_write_finish_row\n");
-   /* next row */
-   png_ptr->row_number++;
-
-   /* see if we are done */
-   if (png_ptr->row_number < png_ptr->num_rows)
-      return;
-
-#ifdef PNG_WRITE_INTERLACING_SUPPORTED
-   /* if interlaced, go to next pass */
-   if (png_ptr->interlaced)
-   {
-      png_ptr->row_number = 0;
-      if (png_ptr->transformations & PNG_INTERLACE)
-      {
-         png_ptr->pass++;
-      }
-      else
-      {
-         /* loop until we find a non-zero width or height pass */
-         do
-         {
-            png_ptr->pass++;
-            if (png_ptr->pass >= 7)
-               break;
-            png_ptr->usr_width = (png_ptr->width +
-               png_pass_inc[png_ptr->pass] - 1 -
-               png_pass_start[png_ptr->pass]) /
-               png_pass_inc[png_ptr->pass];
-            png_ptr->num_rows = (png_ptr->height +
-               png_pass_yinc[png_ptr->pass] - 1 -
-               png_pass_ystart[png_ptr->pass]) /
-               png_pass_yinc[png_ptr->pass];
-            if (png_ptr->transformations & PNG_INTERLACE)
-               break;
-         } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0);
-
-      }
-
-      /* reset the row above the image for the next pass */
-      if (png_ptr->pass < 7)
-      {
-         if (png_ptr->prev_row != NULL)
-            png_memset(png_ptr->prev_row, 0,
-               (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels*
-               png_ptr->usr_bit_depth,png_ptr->width))+1);
-         return;
-      }
-   }
-#endif
-
-   /* if we get here, we've just written the last row, so we need
-      to flush the compressor */
-   do
-   {
-      /* tell the compressor we are done */
-      ret = deflate(&png_ptr->zstream, Z_FINISH);
-      /* check for an error */
-      if (ret == Z_OK)
-      {
-         /* check to see if we need more room */
-         if (!(png_ptr->zstream.avail_out))
-         {
-            png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
-            png_ptr->zstream.next_out = png_ptr->zbuf;
-            png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-         }
-      }
-      else if (ret != Z_STREAM_END)
-      {
-         if (png_ptr->zstream.msg != NULL)
-            png_error(png_ptr, png_ptr->zstream.msg);
-         else
-            png_error(png_ptr, "zlib error");
-      }
-   } while (ret != Z_STREAM_END);
-
-   /* write any extra space */
-   if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)
-   {
-      png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size -
-         png_ptr->zstream.avail_out);
-   }
-
-   deflateReset(&png_ptr->zstream);
-}
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* Pick out the correct pixels for the interlace pass.
- * The basic idea here is to go through the row with a source
- * pointer and a destination pointer (sp and dp), and copy the
- * correct pixels for the pass.  As the row gets compacted,
- * sp will always be >= dp, so we should never overwrite anything.
- * See the default: case for the easiest code to understand.
- */
-void /* PRIVATE */
-png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
-{
-#ifdef PNG_USE_LOCAL_ARRAYS
-   /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-   /* start of interlace block */
-   int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
-
-   /* offset to next interlace block */
-   int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
-
-   png_debug(1, "in png_do_write_interlace\n");
-   /* we don't have to do anything on the last pass (6) */
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
-   if (row != NULL && row_info != NULL && pass < 6)
-#else
-   if (pass < 6)
-#endif
-   {
-      /* each pixel depth is handled separately */
-      switch (row_info->pixel_depth)
-      {
-         case 1:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int shift;
-            int d;
-            int value;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            dp = row;
-            d = 0;
-            shift = 7;
-            for (i = png_pass_start[pass]; i < row_width;
-               i += png_pass_inc[pass])
-            {
-               sp = row + (png_size_t)(i >> 3);
-               value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01;
-               d |= (value << shift);
-
-               if (shift == 0)
-               {
-                  shift = 7;
-                  *dp++ = (png_byte)d;
-                  d = 0;
-               }
-               else
-                  shift--;
-
-            }
-            if (shift != 7)
-               *dp = (png_byte)d;
-            break;
-         }
-         case 2:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int shift;
-            int d;
-            int value;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            dp = row;
-            shift = 6;
-            d = 0;
-            for (i = png_pass_start[pass]; i < row_width;
-               i += png_pass_inc[pass])
-            {
-               sp = row + (png_size_t)(i >> 2);
-               value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03;
-               d |= (value << shift);
-
-               if (shift == 0)
-               {
-                  shift = 6;
-                  *dp++ = (png_byte)d;
-                  d = 0;
-               }
-               else
-                  shift -= 2;
-            }
-            if (shift != 6)
-                   *dp = (png_byte)d;
-            break;
-         }
-         case 4:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            int shift;
-            int d;
-            int value;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-
-            dp = row;
-            shift = 4;
-            d = 0;
-            for (i = png_pass_start[pass]; i < row_width;
-               i += png_pass_inc[pass])
-            {
-               sp = row + (png_size_t)(i >> 1);
-               value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f;
-               d |= (value << shift);
-
-               if (shift == 0)
-               {
-                  shift = 4;
-                  *dp++ = (png_byte)d;
-                  d = 0;
-               }
-               else
-                  shift -= 4;
-            }
-            if (shift != 4)
-               *dp = (png_byte)d;
-            break;
-         }
-         default:
-         {
-            png_bytep sp;
-            png_bytep dp;
-            png_uint_32 i;
-            png_uint_32 row_width = row_info->width;
-            png_size_t pixel_bytes;
-
-            /* start at the beginning */
-            dp = row;
-            /* find out how many bytes each pixel takes up */
-            pixel_bytes = (row_info->pixel_depth >> 3);
-            /* loop through the row, only looking at the pixels that
-               matter */
-            for (i = png_pass_start[pass]; i < row_width;
-               i += png_pass_inc[pass])
-            {
-               /* find out where the original pixel is */
-               sp = row + (png_size_t)i * pixel_bytes;
-               /* move the pixel */
-               if (dp != sp)
-                  png_memcpy(dp, sp, pixel_bytes);
-               /* next pixel */
-               dp += pixel_bytes;
-            }
-            break;
-         }
-      }
-      /* set new row width */
-      row_info->width = (row_info->width +
-         png_pass_inc[pass] - 1 -
-         png_pass_start[pass]) /
-         png_pass_inc[pass];
-         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
-            row_info->width);
-   }
-}
-#endif
-
-/* This filters the row, chooses which filter to use, if it has not already
- * been specified by the application, and then writes the row out with the
- * chosen filter.
- */
-#define PNG_MAXSUM (~((png_uint_32)0) >> 1)
-#define PNG_HISHIFT 10
-#define PNG_LOMASK ((png_uint_32)0xffffL)
-#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT))
-void /* PRIVATE */
-png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
-{
-   png_bytep prev_row, best_row, row_buf;
-   png_uint_32 mins, bpp;
-   png_byte filter_to_do = png_ptr->do_filter;
-   png_uint_32 row_bytes = row_info->rowbytes;
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   int num_p_filters = (int)png_ptr->num_prev_filters;
-#endif
-
-   png_debug(1, "in png_write_find_filter\n");
-   /* find out how many bytes offset each pixel is */
-   bpp = (row_info->pixel_depth + 7) >> 3;
-
-   prev_row = png_ptr->prev_row;
-   best_row = row_buf = png_ptr->row_buf;
-   mins = PNG_MAXSUM;
-
-   /* The prediction method we use is to find which method provides the
-    * smallest value when summing the absolute values of the distances
-    * from zero, using anything >= 128 as negative numbers.  This is known
-    * as the "minimum sum of absolute differences" heuristic.  Other
-    * heuristics are the "weighted minimum sum of absolute differences"
-    * (experimental and can in theory improve compression), and the "zlib
-    * predictive" method (not implemented yet), which does test compressions
-    * of lines using different filter methods, and then chooses the
-    * (series of) filter(s) that give minimum compressed data size (VERY
-    * computationally expensive).
-    *
-    * GRR 980525:  consider also
-    *   (1) minimum sum of absolute differences from running average (i.e.,
-    *       keep running sum of non-absolute differences & count of bytes)
-    *       [track dispersion, too?  restart average if dispersion too large?]
-    *  (1b) minimum sum of absolute differences from sliding average, probably
-    *       with window size <= deflate window (usually 32K)
-    *   (2) minimum sum of squared differences from zero or running average
-    *       (i.e., ~ root-mean-square approach)
-    */
-
-
-   /* We don't need to test the 'no filter' case if this is the only filter
-    * that has been chosen, as it doesn't actually do anything to the data.
-    */
-   if ((filter_to_do & PNG_FILTER_NONE) &&
-       filter_to_do != PNG_FILTER_NONE)
-   {
-      png_bytep rp;
-      png_uint_32 sum = 0;
-      png_uint_32 i;
-      int v;
-
-      for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++)
-      {
-         v = *rp;
-         sum += (v < 128) ? v : 256 - v;
-      }
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         png_uint_32 sumhi, sumlo;
-         int j;
-         sumlo = sum & PNG_LOMASK;
-         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */
-
-         /* Reduce the sum if we match any of the previous rows */
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)
-            {
-               sumlo = (sumlo * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               sumhi = (sumhi * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         /* Factor in the cost of this filter (this is here for completeness,
-          * but it makes no sense to have a "cost" for the NONE filter, as
-          * it has the minimum possible computational cost - none).
-          */
-         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>
-            PNG_COST_SHIFT;
-         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>
-            PNG_COST_SHIFT;
-
-         if (sumhi > PNG_HIMASK)
-            sum = PNG_MAXSUM;
-         else
-            sum = (sumhi << PNG_HISHIFT) + sumlo;
-      }
-#endif
-      mins = sum;
-   }
-
-   /* sub filter */
-   if (filter_to_do == PNG_FILTER_SUB)
-   /* it's the only filter so no testing is needed */
-   {
-      png_bytep rp, lp, dp;
-      png_uint_32 i;
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp;
-           i++, rp++, dp++)
-      {
-         *dp = *rp;
-      }
-      for (lp = row_buf + 1; i < row_bytes;
-         i++, rp++, lp++, dp++)
-      {
-         *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);
-      }
-      best_row = png_ptr->sub_row;
-   }
-
-   else if (filter_to_do & PNG_FILTER_SUB)
-   {
-      png_bytep rp, dp, lp;
-      png_uint_32 sum = 0, lmins = mins;
-      png_uint_32 i;
-      int v;
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      /* We temporarily increase the "minimum sum" by the factor we
-       * would reduce the sum of this filter, so that we can do the
-       * early exit comparison without scaling the sum each time.
-       */
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 lmhi, lmlo;
-         lmlo = lmins & PNG_LOMASK;
-         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)
-            {
-               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
-            PNG_COST_SHIFT;
-         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
-            PNG_COST_SHIFT;
-
-         if (lmhi > PNG_HIMASK)
-            lmins = PNG_MAXSUM;
-         else
-            lmins = (lmhi << PNG_HISHIFT) + lmlo;
-      }
-#endif
-
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp;
-           i++, rp++, dp++)
-      {
-         v = *dp = *rp;
-
-         sum += (v < 128) ? v : 256 - v;
-      }
-      for (lp = row_buf + 1; i < row_bytes;
-         i++, rp++, lp++, dp++)
-      {
-         v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-
-         if (sum > lmins)  /* We are already worse, don't continue. */
-            break;
-      }
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 sumhi, sumlo;
-         sumlo = sum & PNG_LOMASK;
-         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)
-            {
-               sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
-            PNG_COST_SHIFT;
-         sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
-            PNG_COST_SHIFT;
-
-         if (sumhi > PNG_HIMASK)
-            sum = PNG_MAXSUM;
-         else
-            sum = (sumhi << PNG_HISHIFT) + sumlo;
-      }
-#endif
-
-      if (sum < mins)
-      {
-         mins = sum;
-         best_row = png_ptr->sub_row;
-      }
-   }
-
-   /* up filter */
-   if (filter_to_do == PNG_FILTER_UP)
-   {
-      png_bytep rp, dp, pp;
-      png_uint_32 i;
-
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,
-           pp = prev_row + 1; i < row_bytes;
-           i++, rp++, pp++, dp++)
-      {
-         *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff);
-      }
-      best_row = png_ptr->up_row;
-   }
-
-   else if (filter_to_do & PNG_FILTER_UP)
-   {
-      png_bytep rp, dp, pp;
-      png_uint_32 sum = 0, lmins = mins;
-      png_uint_32 i;
-      int v;
-
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 lmhi, lmlo;
-         lmlo = lmins & PNG_LOMASK;
-         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)
-            {
-               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>
-            PNG_COST_SHIFT;
-         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>
-            PNG_COST_SHIFT;
-
-         if (lmhi > PNG_HIMASK)
-            lmins = PNG_MAXSUM;
-         else
-            lmins = (lmhi << PNG_HISHIFT) + lmlo;
-      }
-#endif
-
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,
-           pp = prev_row + 1; i < row_bytes; i++)
-      {
-         v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-
-         if (sum > lmins)  /* We are already worse, don't continue. */
-            break;
-      }
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 sumhi, sumlo;
-         sumlo = sum & PNG_LOMASK;
-         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)
-            {
-               sumlo = (sumlo * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               sumhi = (sumhi * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>
-            PNG_COST_SHIFT;
-         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>
-            PNG_COST_SHIFT;
-
-         if (sumhi > PNG_HIMASK)
-            sum = PNG_MAXSUM;
-         else
-            sum = (sumhi << PNG_HISHIFT) + sumlo;
-      }
-#endif
-
-      if (sum < mins)
-      {
-         mins = sum;
-         best_row = png_ptr->up_row;
-      }
-   }
-
-   /* avg filter */
-   if (filter_to_do == PNG_FILTER_AVG)
-   {
-      png_bytep rp, dp, pp, lp;
-      png_uint_32 i;
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1,
-           pp = prev_row + 1; i < bpp; i++)
-      {
-         *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);
-      }
-      for (lp = row_buf + 1; i < row_bytes; i++)
-      {
-         *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2))
-                 & 0xff);
-      }
-      best_row = png_ptr->avg_row;
-   }
-
-   else if (filter_to_do & PNG_FILTER_AVG)
-   {
-      png_bytep rp, dp, pp, lp;
-      png_uint_32 sum = 0, lmins = mins;
-      png_uint_32 i;
-      int v;
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 lmhi, lmlo;
-         lmlo = lmins & PNG_LOMASK;
-         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG)
-            {
-               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>
-            PNG_COST_SHIFT;
-         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>
-            PNG_COST_SHIFT;
-
-         if (lmhi > PNG_HIMASK)
-            lmins = PNG_MAXSUM;
-         else
-            lmins = (lmhi << PNG_HISHIFT) + lmlo;
-      }
-#endif
-
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1,
-           pp = prev_row + 1; i < bpp; i++)
-      {
-         v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-      }
-      for (lp = row_buf + 1; i < row_bytes; i++)
-      {
-         v = *dp++ =
-          (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-
-         if (sum > lmins)  /* We are already worse, don't continue. */
-            break;
-      }
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 sumhi, sumlo;
-         sumlo = sum & PNG_LOMASK;
-         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)
-            {
-               sumlo = (sumlo * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               sumhi = (sumhi * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>
-            PNG_COST_SHIFT;
-         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>
-            PNG_COST_SHIFT;
-
-         if (sumhi > PNG_HIMASK)
-            sum = PNG_MAXSUM;
-         else
-            sum = (sumhi << PNG_HISHIFT) + sumlo;
-      }
-#endif
-
-      if (sum < mins)
-      {
-         mins = sum;
-         best_row = png_ptr->avg_row;
-      }
-   }
-
-   /* Paeth filter */
-   if (filter_to_do == PNG_FILTER_PAETH)
-   {
-      png_bytep rp, dp, pp, cp, lp;
-      png_uint_32 i;
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,
-           pp = prev_row + 1; i < bpp; i++)
-      {
-         *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
-      }
-
-      for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++)
-      {
-         int a, b, c, pa, pb, pc, p;
-
-         b = *pp++;
-         c = *cp++;
-         a = *lp++;
-
-         p = b - c;
-         pc = a - c;
-
-#ifdef PNG_USE_ABS
-         pa = abs(p);
-         pb = abs(pc);
-         pc = abs(p + pc);
-#else
-         pa = p < 0 ? -p : p;
-         pb = pc < 0 ? -pc : pc;
-         pc = (p + pc) < 0 ? -(p + pc) : p + pc;
-#endif
-
-         p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
-
-         *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);
-      }
-      best_row = png_ptr->paeth_row;
-   }
-
-   else if (filter_to_do & PNG_FILTER_PAETH)
-   {
-      png_bytep rp, dp, pp, cp, lp;
-      png_uint_32 sum = 0, lmins = mins;
-      png_uint_32 i;
-      int v;
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 lmhi, lmlo;
-         lmlo = lmins & PNG_LOMASK;
-         lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)
-            {
-               lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>
-            PNG_COST_SHIFT;
-         lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>
-            PNG_COST_SHIFT;
-
-         if (lmhi > PNG_HIMASK)
-            lmins = PNG_MAXSUM;
-         else
-            lmins = (lmhi << PNG_HISHIFT) + lmlo;
-      }
-#endif
-
-      for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,
-           pp = prev_row + 1; i < bpp; i++)
-      {
-         v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-      }
-
-      for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++)
-      {
-         int a, b, c, pa, pb, pc, p;
-
-         b = *pp++;
-         c = *cp++;
-         a = *lp++;
-
-#ifndef PNG_SLOW_PAETH
-         p = b - c;
-         pc = a - c;
-#ifdef PNG_USE_ABS
-         pa = abs(p);
-         pb = abs(pc);
-         pc = abs(p + pc);
-#else
-         pa = p < 0 ? -p : p;
-         pb = pc < 0 ? -pc : pc;
-         pc = (p + pc) < 0 ? -(p + pc) : p + pc;
-#endif
-         p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
-#else /* PNG_SLOW_PAETH */
-         p = a + b - c;
-         pa = abs(p - a);
-         pb = abs(p - b);
-         pc = abs(p - c);
-         if (pa <= pb && pa <= pc)
-            p = a;
-         else if (pb <= pc)
-            p = b;
-         else
-            p = c;
-#endif /* PNG_SLOW_PAETH */
-
-         v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);
-
-         sum += (v < 128) ? v : 256 - v;
-
-         if (sum > lmins)  /* We are already worse, don't continue. */
-            break;
-      }
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-      if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
-      {
-         int j;
-         png_uint_32 sumhi, sumlo;
-         sumlo = sum & PNG_LOMASK;
-         sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK;
-
-         for (j = 0; j < num_p_filters; j++)
-         {
-            if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)
-            {
-               sumlo = (sumlo * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-               sumhi = (sumhi * png_ptr->filter_weights[j]) >>
-                  PNG_WEIGHT_SHIFT;
-            }
-         }
-
-         sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>
-            PNG_COST_SHIFT;
-         sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>
-            PNG_COST_SHIFT;
-
-         if (sumhi > PNG_HIMASK)
-            sum = PNG_MAXSUM;
-         else
-            sum = (sumhi << PNG_HISHIFT) + sumlo;
-      }
-#endif
-
-      if (sum < mins)
-      {
-         best_row = png_ptr->paeth_row;
-      }
-   }
-
-   /* Do the actual writing of the filtered row data from the chosen filter. */
-
-   png_write_filtered_row(png_ptr, best_row);
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   /* Save the type of filter we picked this time for future calculations */
-   if (png_ptr->num_prev_filters > 0)
-   {
-      int j;
-      for (j = 1; j < num_p_filters; j++)
-      {
-         png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1];
-      }
-      png_ptr->prev_filters[j] = best_row[0];
-   }
-#endif
-}
-
-
-/* Do the actual writing of a previously filtered row. */
-void /* PRIVATE */
-png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
-{
-   png_debug(1, "in png_write_filtered_row\n");
-   png_debug1(2, "filter = %d\n", filtered_row[0]);
-   /* set up the zlib input buffer */
-
-   png_ptr->zstream.next_in = filtered_row;
-   png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1;
-   /* repeat until we have compressed all the data */
-   do
-   {
-      int ret; /* return of zlib */
-
-      /* compress the data */
-      ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);
-      /* check for compression errors */
-      if (ret != Z_OK)
-      {
-         if (png_ptr->zstream.msg != NULL)
-            png_error(png_ptr, png_ptr->zstream.msg);
-         else
-            png_error(png_ptr, "zlib error");
-      }
-
-      /* see if it is time to write another IDAT */
-      if (!(png_ptr->zstream.avail_out))
-      {
-         /* write the IDAT and reset the zlib output buffer */
-         png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
-         png_ptr->zstream.next_out = png_ptr->zbuf;
-         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-      }
-   /* repeat until all data has been compressed */
-   } while (png_ptr->zstream.avail_in);
-
-   /* swap the current and previous rows */
-   if (png_ptr->prev_row != NULL)
-   {
-      png_bytep tptr;
-
-      tptr = png_ptr->prev_row;
-      png_ptr->prev_row = png_ptr->row_buf;
-      png_ptr->row_buf = tptr;
-   }
-
-   /* finish row - updates counters and flushes zlib if last row */
-   png_write_finish_row(png_ptr);
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-   png_ptr->flush_rows++;
-
-   if (png_ptr->flush_dist > 0 &&
-       png_ptr->flush_rows >= png_ptr->flush_dist)
-   {
-      png_write_flush(png_ptr);
-   }
-#endif
-}
-#endif /* PNG_WRITE_SUPPORTED */
diff --git a/tkimg1.3/libpng/projects/beos/x86-shared.proj b/tkimg1.3/libpng/projects/beos/x86-shared.proj
deleted file mode 100644
index 6d2e3c3..0000000
Binary files a/tkimg1.3/libpng/projects/beos/x86-shared.proj and /dev/null differ
diff --git a/tkimg1.3/libpng/projects/beos/x86-shared.txt b/tkimg1.3/libpng/projects/beos/x86-shared.txt
deleted file mode 100644
index 0cd4d9d..0000000
--- a/tkimg1.3/libpng/projects/beos/x86-shared.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This project builds a shared library version of libpng on x86 BeOS.
-
-It defines PNG_USE_PNGGCCRD, which activates the assembly code in
-pnggccrd.c; this hasn't been extensively tested on BeOS.
-
-To install:
-
-1) build
-
-   Note: As of version 1.0.10, you'll get a fair number of warnings when
-         you compile pnggccrd.c.  As far as I know, these are harmless,
-         but it would be better if someone fixed them.
-
-2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
-   you'll have to make) is a good choice
-
-3) copy libpng.so to /boot/home/config/lib
-
-4) build your libpng.so applications (remember to include libz.a as
-   well when you link)
-
-- Chris Herborth, March 27, 2001
diff --git a/tkimg1.3/libpng/projects/beos/x86-static.proj b/tkimg1.3/libpng/projects/beos/x86-static.proj
deleted file mode 100644
index 37c0753..0000000
Binary files a/tkimg1.3/libpng/projects/beos/x86-static.proj and /dev/null differ
diff --git a/tkimg1.3/libpng/projects/beos/x86-static.txt b/tkimg1.3/libpng/projects/beos/x86-static.txt
deleted file mode 100644
index bb80aaa..0000000
--- a/tkimg1.3/libpng/projects/beos/x86-static.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This project builds a static library version of libpng on x86 BeOS.
-
-It defines PNG_USE_PNGGCCRD, which activates the assembly code in
-pnggccrd.c; this hasn't been extensively tested on BeOS.
-
-To install:
-
-1) build
-
-   Note: As of version 1.0.10, you'll get a fair number of warnings when
-         you compile pnggccrd.c.  As far as I know, these are harmless,
-         but it would be better if someone fixed them.
-
-2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
-   you'll have to make) is a good choice
-
-3) copy libpng.a to /boot/home/config/lib
-
-4) build your libpng.a applications (remember to include libz.a as
-   well when you link)
-
-- Chris Herborth, March 27, 2001
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpf b/tkimg1.3/libpng/projects/cbuilder5/libpng.bpf
deleted file mode 100644
index 2af81e7..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpf
+++ /dev/null
@@ -1,22 +0,0 @@
-USEUNIT("libpng.cpp");
-USEUNIT("..\..\png.c");
-USEUNIT("..\..\pngerror.c");
-USEUNIT("..\..\pngget.c");
-USEUNIT("..\..\pngmem.c");
-USEUNIT("..\..\pngpread.c");
-USEUNIT("..\..\pngread.c");
-USEUNIT("..\..\pngrio.c");
-USEUNIT("..\..\pngrtran.c");
-USEUNIT("..\..\pngrutil.c");
-USEUNIT("..\..\pngset.c");
-USEUNIT("..\..\pngtrans.c");
-USEUNIT("..\..\pngwio.c");
-USEUNIT("..\..\pngwrite.c");
-USEUNIT("..\..\pngwtran.c");
-USEUNIT("..\..\pngwutil.c");
-USELIB("..\..\..\zlib\zlib.lib");
-//---------------------------------------------------------------------------
-This file is used by the project manager only and should be treated like the project file
-
-
-DllEntryPoint
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpg b/tkimg1.3/libpng/projects/cbuilder5/libpng.bpg
deleted file mode 100644
index 80c1977..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpg
+++ /dev/null
@@ -1,25 +0,0 @@
-#------------------------------------------------------------------------------
-VERSION = BWS.01
-#------------------------------------------------------------------------------
-!ifndef ROOT
-ROOT = $(MAKEDIR)\..
-!endif
-#------------------------------------------------------------------------------
-MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
-DCC = $(ROOT)\bin\dcc32.exe $**
-BRCC = $(ROOT)\bin\brcc32.exe $**
-#------------------------------------------------------------------------------
-PROJECTS = libpngstat.lib libpng.dll
-#------------------------------------------------------------------------------
-default: $(PROJECTS)
-#------------------------------------------------------------------------------
-
-libpngstat.lib: libpngstat.bpr
-  $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
-  $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
-
-libpng.dll: libpng.bpr
-  $(ROOT)\bin\bpr2mak $**
-  $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
-
-
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpr b/tkimg1.3/libpng/projects/cbuilder5/libpng.bpr
deleted file mode 100644
index b9fdbe4..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpng.bpr
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!-- C++Builder XML Project -->
-<PROJECT>
-  <MACROS>
-    <VERSION value="BCB.05.03"/>
-    <PROJECT value="libpng.dll"/>
-    <OBJFILES value="libpng.obj ..\..\pngwutil.obj ..\..\pngerror.obj ..\..\pngget.obj 
-      ..\..\pngmem.obj ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj 
-      ..\..\pngrtran.obj ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj 
-      ..\..\pngwio.obj ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\png.obj"/>
-    <RESFILES value=""/>
-    <DEFFILE value=""/>
-    <RESDEPEN value="$(RESFILES)"/>
-    <LIBFILES value="..\..\..\zlib\zlib.lib"/>
-    <LIBRARIES value="bcbsmp50.lib dclocx50.lib NMFast50.lib Tee50.lib Vclx50.lib Vcl50.lib"/>
-    <SPARELIBS value="Vcl50.lib Vclx50.lib Tee50.lib NMFast50.lib dclocx50.lib bcbsmp50.lib"/>
-    <PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi 
-      ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi 
-      VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi 
-      dclocx50.bpi bcb97axserver50.bpi SIMULUSCOMPONENTS.bpi Simulus2.bpi"/>
-    <PATHCPP value=".;..\.."/>
-    <PATHPAS value=".;"/>
-    <PATHRC value=".;"/>
-    <PATHASM value=".;"/>
-    <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
-    <RELEASELIBPATH value="$(BCB)\lib\release"/>
-    <LINKER value="tlink32"/>
-    <USERDEFINES value="PNG_BUILD_DLL;PNG_NO_MODULEDEF"/>
-    <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
-    <MAINSOURCE value="libpng.bpf"/>
-    <INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
-    <LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
-    <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wucp -wstv -wstu -wsig -wpin 
-      -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/>
-  </MACROS>
-  <OPTIONS>
-    <CFLAG1 value="-WD -O2 -w -Vx -Ve -x- -RT- -X- -a8 -5 -b- -d -k- -vi -tWD -tWM -c"/>
-    <PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
-    <RFLAGS value=""/>
-    <AFLAGS value="/mx /w2 /zn"/>
-    <LFLAGS value="-D"" -aa -Tpd -x -Gn -Gi -w"/>
-  </OPTIONS>
-  <LINKER>
-    <ALLOBJ value="c0d32.obj $(OBJFILES)"/>
-    <ALLRES value="$(RESFILES)"/>
-    <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
-  </LINKER>
-  <IDEOPTIONS>
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=1
-Locale=2057
-CodePage=1252
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=
-Comments=
-
-[HistoryLists\hlIncludePath]
-Count=18
-Item0=..\..;..\..\..\zlib;$(BCB)\include
-Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
-Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
-Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
-Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include
-Item8=$(BCB)\include
-Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
-Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
-Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl
-Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl
-Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl
-Item17=$(BCB)\include;$(BCB)\include\vcl
-
-[HistoryLists\hlLibraryPath]
-Count=10
-Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
-Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item4=$(BCB)\lib\obj;$(BCB)\lib
-Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib
-Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib
-
-[HistoryLists\hlDebugSourcePath]
-Count=1
-Item0=$(BCB)\source\vcl
-
-[HistoryLists\hlConditionals]
-Count=20
-Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
-Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
-Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF
-Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS
-Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr
-Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
-Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
-Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF
-Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5
-Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG
-Item10=PNG_BUILD_DLL;ZLIB_DLL
-Item11=PNG_BUILD_DLL
-Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL
-Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL
-Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS
-Item15=PNG_DLL;PNG_BUILD_DLL
-Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF
-Item17=_HTML_FORM
-Item18=_DEBUG;_HTML_FORM
-Item19=_DEBUG
-
-[HistoryLists\hlIntOutputDir]
-Count=2
-Item0=..\Obj
-Item1=P:\Development\Obj
-
-[Debugging]
-DebugSourceDirs=
-
-[Parameters]
-RunParams=
-HostApplication=P:\Development\Executables\LibPNGTestApp.exe
-RemoteHost=
-RemotePath=
-RemoteDebug=0
-
-[Compiler]
-ShowInfoMsgs=0
-LinkDebugVcl=0
-LinkCGLIB=0
-  </IDEOPTIONS>
-</PROJECT>
\ No newline at end of file
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpng.cpp b/tkimg1.3/libpng/projects/cbuilder5/libpng.cpp
deleted file mode 100644
index 4e2f274..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpng.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//---------------------------------------------------------------------------
-#include <windows.h>
-//---------------------------------------------------------------------------
-//   Important note about DLL memory management when your DLL uses the
-//   static version of the RunTime Library:
-//
-//   If your DLL exports any functions that pass String objects (or structs/
-//   classes containing nested Strings) as parameter or function results,
-//   you will need to add the library MEMMGR.LIB to both the DLL project and
-//   any other projects that use the DLL.  You will also need to use MEMMGR.LIB
-//   if any other projects which use the DLL will be performing new or delete
-//   operations on any non-TObject-derived classes which are exported from the
-//   DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
-//   EXE's to use the BORLNDMM.DLL as their memory manager.  In these cases,
-//   the file BORLNDMM.DLL should be deployed along with your DLL.
-//
-//   To avoid using BORLNDMM.DLL, pass string information using "char *" or
-//   ShortString parameters.
-//
-//   If your DLL uses the dynamic version of the RTL, you do not need to
-//   explicitly add MEMMGR.LIB as this will be done implicitly for you
-//---------------------------------------------------------------------------
-
-int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
-{
-    return 1;
-}
-//---------------------------------------------------------------------------
- 
\ No newline at end of file
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpng.readme.txt b/tkimg1.3/libpng/projects/cbuilder5/libpng.readme.txt
deleted file mode 100644
index c99c1e9..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpng.readme.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Project files to build libpng using Borland C++ Builder v5.0
-
-In order to build and use libpng, please follow these steps:
-
- 1). Install zlib in a directory at the same level with libpng.
-
- 2). In a console window, go to the zlib directory and type:
-       make -f win32\Makefile.bor
-     After performing this step, you should have a file named
-     zlib.lib in the zlib directory.
-
- 3). Add the following conditional define to your project:
-       PNG_USE_DLL
-
- 4). Add libpng.lib or libpngstat.lib to the project.
-     Build the project.
-
- 5). If the build fails, add the paths to png.h and zlib.h to
-     your include path, and restart the build.
-
-By default, the libpng project uses zlib as a static library.  If
-you wish to use zlib as a DLL, please read the important notes from
-the zlib DLL FAQ, found inside the zlib distribution.
-
-See the libpng documentation for instructions on how to use the code.
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpf b/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpf
deleted file mode 100644
index fbc5c40..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpf
+++ /dev/null
@@ -1,22 +0,0 @@
-USEUNIT("..\..\png.c");
-USEUNIT("..\..\pngerror.c");
-USEUNIT("..\..\pngget.c");
-USEUNIT("..\..\pngmem.c");
-USEUNIT("..\..\pngpread.c");
-USEUNIT("..\..\pngread.c");
-USEUNIT("..\..\pngrio.c");
-USEUNIT("..\..\pngrtran.c");
-USEUNIT("..\..\pngrutil.c");
-USEUNIT("..\..\pngset.c");
-USEUNIT("..\..\pngtrans.c");
-USEUNIT("..\..\pngwio.c");
-USEUNIT("..\..\pngwrite.c");
-USEUNIT("..\..\pngwtran.c");
-USEUNIT("..\..\pngwutil.c");
-USELIB("..\..\..\zlib\zlib.lib");
-//---------------------------------------------------------------------------
-#define Library
-
-// To add a file to the library use the Project menu 'Add to Project'.
-
- 
\ No newline at end of file
diff --git a/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpr b/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpr
deleted file mode 100644
index 9a51ecc..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/libpngstat.bpr
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!-- C++Builder XML Project -->
-<PROJECT>
-  <MACROS>
-    <VERSION value="BCB.05.03"/>
-    <PROJECT value="libpngstat.lib"/>
-    <OBJFILES value="..\..\pngerror.obj ..\..\png.obj ..\..\pngwutil.obj ..\..\pngmem.obj 
-      ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj ..\..\pngrtran.obj 
-      ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj ..\..\pngwio.obj 
-      ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\pngget.obj"/>
-    <RESFILES value=""/>
-    <DEFFILE value=""/>
-    <RESDEPEN value="$(RESFILES)"/>
-    <LIBFILES value="..\..\..\zlib\zlib.lib"/>
-    <LIBRARIES value=""/>
-    <PACKAGES value=""/>
-    <PATHCPP value=".;..\.."/>
-    <PATHPAS value=".;"/>
-    <PATHRC value=".;"/>
-    <PATHASM value=".;"/>
-    <LINKER value="TLib"/>
-    <USERDEFINES value=""/>
-    <SYSDEFINES value="_RTLDLL;NO_STRICT"/>
-    <MAINSOURCE value="libpngstat.bpf"/>
-    <INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
-    <LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
-    <WARNINGS value="-w-par"/>
-    <LISTFILE value=""/>
-  </MACROS>
-  <OPTIONS>
-    <CFLAG1 value="-O2 -w -Vx -Ve -X- -a8 -5 -b- -d -k- -vi -c -tW -tWM"/>
-    <PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
-    <AFLAGS value="/mx /w2 /zn"/>
-    <LFLAGS value=""/>
-  </OPTIONS>
-  <LINKER>
-    <ALLOBJ value="$(OBJFILES)"/>
-    <ALLLIB value=""/>
-  </LINKER>
-  <IDEOPTIONS>
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-Locale=2057
-CodePage=1252
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=
-
-[HistoryLists\hlIncludePath]
-Count=2
-Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
-Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
-
-[HistoryLists\hlLibraryPath]
-Count=1
-Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
-
-[HistoryLists\hlDebugSourcePath]
-Count=1
-Item0=$(BCB)\source\vcl
-
-[HistoryLists\hlConditionals]
-Count=1
-Item0=_DEBUG
-
-[HistoryLists\hlTlibPageSize]
-Count=1
-Item0=0x0010
-
-[Debugging]
-DebugSourceDirs=$(BCB)\source\vcl
-
-[Parameters]
-RunParams=
-HostApplication=
-RemoteHost=
-RemotePath=
-RemoteDebug=0
-
-[Compiler]
-ShowInfoMsgs=0
-LinkDebugVcl=0
-LinkCGLIB=0
-
-[Language]
-ActiveLang=
-ProjectLang=
-RootDir=
-  </IDEOPTIONS>
-</PROJECT>
\ No newline at end of file
diff --git a/tkimg1.3/libpng/projects/cbuilder5/zlib.readme.txt b/tkimg1.3/libpng/projects/cbuilder5/zlib.readme.txt
deleted file mode 100644
index cb6a7a8..0000000
--- a/tkimg1.3/libpng/projects/cbuilder5/zlib.readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-The project that builds libpng under Borland C++ Builder does not
-explicitly build zlib.  By taking this decision, there is no need
-to update the libpng project each time when there is a change in
-the list of zlib source files.  After all, this list is private to
-zlib, and applications (such as libpng) should not assume anything
-about it.
-
-If you wish to contribute a project that builds zlib under Borland
-C++ Builder, please submit it to the zlib developers, not to the
-libpng developers.
-
-By default, the libpng project uses zlib as a static library.  If
-you wish to use zlib as a DLL, please read the important notes from
-the zlib DLL FAQ, found inside the zlib distribution.
diff --git a/tkimg1.3/libpng/projects/netware.txt b/tkimg1.3/libpng/projects/netware.txt
deleted file mode 100644
index 178361d..0000000
--- a/tkimg1.3/libpng/projects/netware.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-A set of project files is available for Netware.  Get
-libpng-1.2.5-project-netware.zip from a libpng distribution
-site such as http://libpng.sourceforge.net
-
-Put the zip file in this directory (projects) and then run
-"unzip -a libpng-1.2.5-project-netware.zip"
diff --git a/tkimg1.3/libpng/projects/visualc6/README.txt b/tkimg1.3/libpng/projects/visualc6/README.txt
deleted file mode 100644
index 6da12e4..0000000
--- a/tkimg1.3/libpng/projects/visualc6/README.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-Microsoft Developer Studio Project File, Format Version 6.00 for libpng.
-
-Copyright (C) 2000-2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-For conditions of distribution and use, see copyright notice in png.h
-
-
-Assumptions:
-* The libpng source files are in ..\..
-* The zlib source files are in ..\..\..\zlib
-* The zlib project files are in ..\..\..\zlib\projects\visualc6
-
-
-To use:
-
-1) On the main menu, select "File | Open Workspace".
-   Open "libpng.dsw".
-
-2) Select "Build | Set Active Configuration".
-   Choose the configuration you wish to build.
-   (Choose libpng or pngtest; zlib will be built automatically.)
-
-3) Select "Build | Clean".
-
-4) Select "Build | Build ... (F7)".  Ignore warning messages about
-   not being able to find certain include files (e.g. alloc.h).
-
-5) If you built the sample program (pngtest),
-   select "Build | Execute ... (Ctrl+F5)".
-
-
-This project builds the libpng binaries as follows:
-
-* Win32_DLL_Release\libpng13.dll      DLL build
-* Win32_DLL_Debug\libpng13d.dll       DLL build (debug version)
-* Win32_DLL_ASM_Release\libpng13.dll  DLL build using ASM code
-* Win32_DLL_ASM_Debug\libpng13d.dll   DLL build using ASM (debug version)
-* Win32_DLL_VB\libpng13vb.dll         DLL build for Visual Basic, using stdcall
-* Win32_LIB_Release\libpng.lib        static build
-* Win32_LIB_Debug\libpngd.lib         static build (debug version)
-* Win32_LIB_ASM_Release\libpng.lib    static build using ASM code
-* Win32_LIB_ASM_Debug\libpngd.lib     static build using ASM (debug version)
-
-
-Notes:
-
-If you change anything in the source files, or select different compiler
-settings, please change the DLL name to something different than any of
-the above names.
-
-Also, make sure that DLLFNAME_POSTFIX and (PRIVATEBUILD or SPECIALBUILD)
-are defined when compiling the resource file.  DLLFNAME_POSTFIX contains
-the trailing letters that come after the version number.  PRIVATEBUILD
-and/or SPECIALBUILD store information describing the type of change made
-in the VERSIONINFO structure.  Please refer to MSDN for more information
-on the used macros and the nature of their content.  For an example on
-how to define these macros, look at the resource compiler settings for
-the "Win32 DLL VB" configuration.
-
-All DLLs built by this project use the Microsoft dynamic C runtime library
-MSVCRT.DLL (MSVCRTD.DLL for debug versions).  If you distribute any of the
-above mentioned libraries you should also include this DLL in your package.
-For a list of files that are redistributable in Visual C++ 6.0, see
-Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs.
diff --git a/tkimg1.3/libpng/projects/visualc6/libpng.dsp b/tkimg1.3/libpng/projects/visualc6/libpng.dsp
deleted file mode 100644
index 73a3766..0000000
--- a/tkimg1.3/libpng/projects/visualc6/libpng.dsp
+++ /dev/null
@@ -1,507 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libpng" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libpng - Win32 DLL Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "libpng.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "libpng.mak" CFG="libpng - Win32 DLL Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "libpng - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF  "$(CFG)" == "libpng - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /d "PNG_USE_PNGVCRD"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 /d "PNG_USE_PNGVCRD"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL VB"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_VB"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_VB"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_VB"
-# PROP Intermediate_Dir "Win32_DLL_VB"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /dDLLFNAME_POSTFIX=""""VB"""" /dSPECIALBUILD=""""__stdcall calling convention used for exported functions""""
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng13vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_VB
-TargetName=libpng13vb
-SOURCE="$(InputPath)"
-PostBuild_Cmds=echo    Deleting $(targetname) import library and export file (Not required for VB projects)	del $(outdir)\$(targetname).lib	del $(outdir)\$(targetname).exp
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_Debug\libpngd.lib"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\libpngd.lib"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "libpng - Win32 DLL Release"
-# Name "libpng - Win32 DLL Debug"
-# Name "libpng - Win32 DLL ASM Release"
-# Name "libpng - Win32 DLL ASM Debug"
-# Name "libpng - Win32 DLL VB"
-# Name "libpng - Win32 LIB Release"
-# Name "libpng - Win32 LIB Debug"
-# Name "libpng - Win32 LIB ASM Release"
-# Name "libpng - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\png.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngget.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngmem.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngpread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngset.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngtrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngvcrd.c
-
-!IF  "$(CFG)" == "libpng - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL VB"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\scripts\pngw32.def
-
-!IF  "$(CFG)" == "libpng - Win32 DLL Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL VB"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\png.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngconf.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\scripts\pngw32.rc
-
-!IF  "$(CFG)" == "libpng - Win32 DLL Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 DLL VB"
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\README.txt
-# End Source File
-# End Target
-# End Project
diff --git a/tkimg1.3/libpng/projects/visualc6/libpng.dsw b/tkimg1.3/libpng/projects/visualc6/libpng.dsw
deleted file mode 100644
index 4f3856f..0000000
--- a/tkimg1.3/libpng/projects/visualc6/libpng.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libpng"=".\libpng.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "pngtest"=".\pngtest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name libpng
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlib"="..\..\..\zlib\projects\visualc6\zlib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/tkimg1.3/libpng/projects/visualc6/pngtest.dsp b/tkimg1.3/libpng/projects/visualc6/pngtest.dsp
deleted file mode 100644
index a1be73c..0000000
--- a/tkimg1.3/libpng/projects/visualc6/pngtest.dsp
+++ /dev/null
@@ -1,314 +0,0 @@
-# Microsoft Developer Studio Project File - Name="pngtest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pngtest - Win32 DLL Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "pngtest.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "pngtest.mak" CFG="pngtest - Win32 DLL Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "pngtest - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_DLL_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Release;	$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_DLL_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug;	$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_DLL_ASM_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release\zlib1.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_ASM_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release;	$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_DLL_ASM_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_ASM_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug;	$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_LIB_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_LIB_ASM_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Release\zlib.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_ASM_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_LIB_ASM_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_ASM_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "pngtest - Win32 DLL Release"
-# Name "pngtest - Win32 DLL Debug"
-# Name "pngtest - Win32 DLL ASM Release"
-# Name "pngtest - Win32 DLL ASM Debug"
-# Name "pngtest - Win32 LIB Release"
-# Name "pngtest - Win32 LIB Debug"
-# Name "pngtest - Win32 LIB ASM Release"
-# Name "pngtest - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\pngtest.c
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/tkimg1.3/libpng/projects/wince.txt b/tkimg1.3/libpng/projects/wince.txt
deleted file mode 100644
index a1a26c0..0000000
--- a/tkimg1.3/libpng/projects/wince.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-A set of project files is available for WinCE.  Get
-libpng-1.2.5-project-wince.zip from a libpng distribution
-site such as http://libpng.sourceforge.net
-
-Put the zip file in this directory (projects) and then run
-"unzip -a libpng-1.2.5-project-wince.zip"
diff --git a/tkimg1.3/libpng/scripts/SCOPTIONS.ppc b/tkimg1.3/libpng/scripts/SCOPTIONS.ppc
deleted file mode 100644
index 2c3503e..0000000
--- a/tkimg1.3/libpng/scripts/SCOPTIONS.ppc
+++ /dev/null
@@ -1,7 +0,0 @@
-OPTIMIZE
-OPTPEEP
-OPTTIME
-OPTSCHED
-AUTOREGISTER
-PARMS=REGISTERS
-INCLUDEDIR=hlp:ppc/include
diff --git a/tkimg1.3/libpng/scripts/descrip.mms b/tkimg1.3/libpng/scripts/descrip.mms
deleted file mode 100644
index 3584b0d..0000000
--- a/tkimg1.3/libpng/scripts/descrip.mms
+++ /dev/null
@@ -1,52 +0,0 @@
-
-cc_defs = /inc=$(ZLIBSRC)
-c_deb = 
-
-.ifdef __DECC__
-pref = /prefix=all
-.endif
-
-
-
-OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\
-	pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\
-	pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj
-
-
-CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
-
-all : pngtest.exe libpng.olb
-		@ write sys$output " pngtest available"
-
-libpng.olb : libpng.olb($(OBJS))
-	@ write sys$output " Libpng available"
-
-
-pngtest.exe : pngtest.obj libpng.olb
-              link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib
-
-test : pngtest.exe
-   run pngtest
-
-clean :
-	delete *.obj;*,*.exe;*
-
-
-# Other dependencies.
-png.obj : png.h, pngconf.h
-pngpread.obj : png.h, pngconf.h
-pngset.obj : png.h, pngconf.h
-pngget.obj : png.h, pngconf.h
-pngread.obj : png.h, pngconf.h
-pngrtran.obj : png.h, pngconf.h
-pngrutil.obj : png.h, pngconf.h
-pngerror.obj : png.h, pngconf.h
-pngmem.obj : png.h, pngconf.h
-pngrio.obj : png.h, pngconf.h
-pngwio.obj : png.h, pngconf.h
-pngtest.obj : png.h, pngconf.h
-pngtrans.obj : png.h, pngconf.h
-pngwrite.obj : png.h, pngconf.h
-pngwtran.obj : png.h, pngconf.h
-pngwutil.obj : png.h, pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/libpng-config-body.in b/tkimg1.3/libpng/scripts/libpng-config-body.in
deleted file mode 100755
index b466432..0000000
--- a/tkimg1.3/libpng/scripts/libpng-config-body.in
+++ /dev/null
@@ -1,96 +0,0 @@
-
-usage()
-{
-    cat <<EOF
-Usage: libpng-config [OPTION] ...
-
-Known values for OPTION are:
-
-  --prefix        print libpng prefix
-  --libdir        print path to directory containing library
-  --libs          print library linking information
-  --ccopts        print compiler options
-  --cppflags      print pre-processor flags
-  --cflags        print preprocessor flags, I_opts, and compiler options
-  --I_opts        print "-I" include options
-  --L_opts        print linker "-L" flags for dynamic linking
-  --R_opts        print dynamic linker "-R" or "-rpath" flags
-  --ldopts        print linker options
-  --ldflags       print linker flags (ldopts, L_opts, R_opts, and libs)
-  --static        revise subsequent outputs for static linking
-  --help          print this help and exit
-  --version       print version information
-EOF
-
-    exit $1
-}
-
-if test $# -eq 0; then
-    usage 1
-fi
-
-while test $# -gt 0; do
-    case "$1" in
-
-    --prefix)
-        echo ${prefix}
-        ;;
-
-    --version)
-        echo ${version}
-        exit 0
-        ;;
-
-    --help)
-        usage 0
-        ;;
-
-    --ccopts)
-        echo ${ccopts}
-        ;;
-
-    --cppflags)
-        echo ${cppflags}
-        ;;
-
-    --cflags)
-        echo ${I_opts} ${cppflags} ${ccopts}
-        ;;
-
-    --libdir)
-        echo ${libdir}
-        ;;
-
-    --libs)
-        echo ${libs}
-        ;;
-
-    --I_opts)
-        echo ${I_opts}
-        ;;
-
-    --L_opts)
-        echo ${L_opts}
-        ;;
-
-    --R_opts)
-        echo ${R_opts}
-        ;;
-
-    --ldflags)
-        echo ${ldflags} ${L_opts} ${R_opts} ${libs}
-        ;;
-
-    --static)
-        R_opts=""
-        ;;
-
-    *)
-        usage
-        exit 1
-        ;;
-    esac
-    shift
-done
-
-exit 0
diff --git a/tkimg1.3/libpng/scripts/libpng-config-head.in b/tkimg1.3/libpng/scripts/libpng-config-head.in
deleted file mode 100755
index b237f72..0000000
--- a/tkimg1.3/libpng/scripts/libpng-config-head.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-# libpng-config
-# provides configuration info for libpng.
-
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Modeled after libxml-config.
-
-version=1.2.6rc5
-prefix=""
-libdir=""
-libs=""
-I_opts=""
-L_opts=""
-R_opts=""
-cppflags=""
-ccopts=""
-ldopts=""
-
diff --git a/tkimg1.3/libpng/scripts/libpng.icc b/tkimg1.3/libpng/scripts/libpng.icc
deleted file mode 100644
index f9c51af..0000000
--- a/tkimg1.3/libpng/scripts/libpng.icc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Project file for libpng (static)
-// IBM VisualAge/C++ version 4.0 or later
-// Copyright (C) 2000 Cosmin Truta
-// For conditions of distribution and use, see copyright notice in png.h
-// Notes:
-//   All modules are compiled in C mode
-//   Tested with IBM VAC++ 4.0 under Win32
-//   Expected to work with IBM VAC++ 4.0 or later under OS/2 and Win32
-//   Can be easily adapted for IBM VAC++ 4.0 or later under AIX
-// For conditions of distribution and use, see copyright notice in png.h
-
-option incl(searchpath, "../zlib"), opt(level, "2"),
- link(libsearchpath, "../zlib")
-{
-   target type(lib) "libpng.lib"
-   {
-      source type(c) "png.c"
-      source type(c) "pngerror.c"
-      source type(c) "pngget.c"
-      source type(c) "pngmem.c"
-      source type(c) "pngpread.c"
-      source type(c) "pngread.c"
-      source type(c) "pngrio.c"
-      source type(c) "pngrtran.c"
-      source type(c) "pngrutil.c"
-      source type(c) "pngset.c"
-      source type(c) "pngtrans.c"
-      source type(c) "pngwio.c"
-      source type(c) "pngwrite.c"
-      source type(c) "pngwtran.c"
-      source type(c) "pngwutil.c"
-   }
-}
-
-option incl(searchpath, "../zlib"), opt(level, "2"),
- link(libsearchpath, "../zlib")
-{
-   target type(exe) "pngtest.exe"
-   {
-      source type(c) "pngtest.c"
-      source type(lib) "libpng.lib"
-      source type(lib) "zlib.lib"
-   }
-}
diff --git a/tkimg1.3/libpng/scripts/libpng.pc.in b/tkimg1.3/libpng/scripts/libpng.pc.in
deleted file mode 100644
index a88fccd..0000000
--- a/tkimg1.3/libpng/scripts/libpng.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-
-prefix=@PREFIX@
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${exec_prefix}/include
-
-Name: libpng12
-Description: Loads and saves PNG files
-Version: 1.2.6rc5
-Libs: -L${libdir} -lpng12 -lz -lm
-Cflags: -I${includedir}/libpng12
diff --git a/tkimg1.3/libpng/scripts/makefile.32sunu b/tkimg1.3/libpng/scripts/makefile.32sunu
deleted file mode 100644
index 210f893..0000000
--- a/tkimg1.3/libpng/scripts/makefile.32sunu
+++ /dev/null
@@ -1,225 +0,0 @@
-# makefile for libpng on Solaris 2.x with cc
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=cc
-SUN_CC_FLAGS=-fast -xtarget=ultra
-SUN_LD_FLAGS=-fast -xtarget=ultra
-
-# where make install puts libpng.a, libpng12.so and libpng12/png.h
-prefix=/a
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk.  If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
-	# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo libdir=\"$(LIBPATH)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-R$(LIBPATH)\"; \
-	echo ccopts=\"-xtarget=ultra\"; \
-	echo ldopts=\"-xtarget=ultra\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	@case "`type ld`" in *ucb*) \
-	echo; \
-	echo '## WARNING:'; \
-	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
-	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
-	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
-	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
-	echo '## at all.  If it is, things are likely to break because of'; \
-	echo '## the libucb dependency that is created.'; \
-	echo; \
-	;; \
-	esac
-	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \
-	 -o libpng.so.3.$(PNGMIN)  $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/libpng12.pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/libpng12.pc
-	chmod 644 $(DL)/pkgconfig/libpng12.pc
-	(cd $(DL)/pkgconfig; ln -f -s libpng12.pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/libpng12-config
-	cp libpng-config $(DB)/libpng12-config
-	chmod 755 $(DB)/libpng12-config
-	(cd $(DB); ln -f -s libpng12-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \
-	   $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.64sunu b/tkimg1.3/libpng/scripts/makefile.64sunu
deleted file mode 100644
index 53e27bd..0000000
--- a/tkimg1.3/libpng/scripts/makefile.64sunu
+++ /dev/null
@@ -1,226 +0,0 @@
-# makefile for libpng on Solaris 2.x with cc
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=cc
-SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
-SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
-
-# where make install puts libpng.a, libpng12.so and libpng12/png.h
-prefix=/a
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk.  If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
-	# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo libdir=\"$(LIBPATH)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-R$(LIBPATH)\"; \
-	echo ccopts=\"-xtarget=ultra -xarch=v9\"; \
-	echo ldopts=\"-xtarget=ultra -xarch=v9\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	@case "`type ld`" in *ucb*) \
-	echo; \
-	echo '## WARNING:'; \
-	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
-	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
-	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
-	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
-	echo '## at all.  If it is, things are likely to break because of'; \
-	echo '## the libucb dependency that is created.'; \
-	echo; \
-	;; \
-	esac
-	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
-	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \
-	 -o libpng.so.3.$(PNGMIN)  $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)*
-	-@/bin/rm -f $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -f -s $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags ` \
-	   $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.acorn b/tkimg1.3/libpng/scripts/makefile.acorn
deleted file mode 100644
index 470cf89..0000000
--- a/tkimg1.3/libpng/scripts/makefile.acorn
+++ /dev/null
@@ -1,51 +0,0 @@
-# Project:   libpng
-
-
-# Toolflags:
-CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback  -DRISCOS  -fnah
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags = 
-LibFileflags = -c -l -o $@
-Squeezeflags = -o $@
-
-
-# Final targets:
- at .libpng-lib:   @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \
-	@.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \
-	@.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil
-	LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \
-	@.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \
-	@.o.pngrutil @.o.pngtrans  @.o.pngwrite @.o.pngwtran @.o.pngwutil
- at .mm-libpng-lib:   @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \
-	@.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \
-	@.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil
-	LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \
-	@.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \
-	@.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \
-	@.mm.pngwtran @.mm.pngwutil
-
-
-# User-editable dependencies:
-# (C) Copyright 1997 Tom Tanner
-Test: @.pngtest
-	<Prefix$Dir>.pngtest
-	@remove <Prefix$Dir>.pngtest
-
-#It would be nice if you could stop "make" listing from here on!
- at .pngtest:   @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
-	Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
-
-.SUFFIXES: .o .mm .c
-
-.c.mm:
-	MemCheck.CC cc $(ccflags) -o $@ LibPng:$<
-.c.o:
-	cc $(ccflags) -o $@ $<
-
-
-# Static dependencies:
-
-
-# Dynamic dependencies:
diff --git a/tkimg1.3/libpng/scripts/makefile.aix b/tkimg1.3/libpng/scripts/makefile.aix
deleted file mode 100644
index 5ab50e8..0000000
--- a/tkimg1.3/libpng/scripts/makefile.aix
+++ /dev/null
@@ -1,111 +0,0 @@
-# makefile for libpng using gcc (generic, static library)
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 2000 Cosmin Truta
-# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = gcc
-LD = $(CC)
-AR = ar rcs
-RANLIB = ranlib
-RM = rm -f
-
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-
-CDEBUG = -g -DPNG_DEBUG=5
-LDDEBUG =
-CRELEASE = -O2
-LDRELEASE = -s
-WARNMORE=-Wall
-CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
-LDFLAGS = -L. -L$(ZLIBLIB) -lpng12 -lz -lm $(LDRELEASE)
-
-# File extensions
-O=.o
-A=.a
-E=
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
-	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
-	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-# Targets
-all: $(LIBNAME)$(A) pngtest$(E)
-
-$(LIBNAME)$(A): $(OBJS)
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-test: pngtest$(E)
-	./pngtest$(E)
-
-pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
-	$(LD) -o $@ pngtest$(O) $(LDFLAGS)
-
-install: $(LIBNAME)$(A)
-	- at if [ ! -d $(DI)  ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME)  ]; then mkdir $(DI)/$(LIBNAME); fi
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	- at rm -f $(DI)/$(LIBNAME)/png.h
-	- at rm -f $(DI)/$(LIBNAME)/pngconf.h
-	- at rm -f $(DI)/png.h
-	- at rm -f $(DI)/pngconf.h
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h \
-	$(DI)/$(LIBNAME)/pngconf.h
-	- at rm -rf $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-	- at rm -f $(DL)/$(LIBNAME)$(A)
-	- at rm -f $(DL)/libpng$(A)
-	cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
-	chmod 644 $(DL)/$(LIBNAME)$(A)
-	(cd $(DL); ln -f -s $(LIBNAME)$(A) libpng$(A))
-	(cd $(DI); ln -f -s libpng/* .;)
-
-clean:
-	/bin/rm -f *.o $(LIBNAME)$(A) pngtest pngout.png
-
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtest$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.amiga b/tkimg1.3/libpng/scripts/makefile.amiga
deleted file mode 100644
index 79cb424..0000000
--- a/tkimg1.3/libpng/scripts/makefile.amiga
+++ /dev/null
@@ -1,48 +0,0 @@
-# Commodore Amiga Makefile
-# makefile for libpng and SAS C V6.5x compiler
-# Copyright (C) 1995-2000 Wolf Faust
-# For conditions of distribution and use, see copyright notice in png.h
-#
-# Note: Use #define PNG_READ_BIG_ENDIAN_SUPPORTED in pngconf.h
-#
-# Location/path of zlib include files
-ZLIB=/zlib
-#compiler
-CC=sc
-#compiler flags
-# WARNING: a bug in V6.51 causes bad code with OPTGO
-#          So use V6.55 or set NOOPTGO!!!!!!!!!
-CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
-	OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \
-	DEFINE=PNG_INTERNAL
-#linker flags
-LDFLAGS= SD ND BATCH
-#link libs
-LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib
-# linker
-LN= slink
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= oml
-# make directory command
-MKDIR= makedir
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.lib pngtest
-
-libpng.lib: $(OBJS)
--$(RM) libpng.lib
-$(AR) libpng.lib r $(OBJS)
-
-pngtest: pngtest.o libpng.lib
-$(LN) <WITH <
-$(LDFLAGS)
-TO pngtest
-FROM LIB:c.o pngtest.o
-LIB $(LDLIBS)
-<
-
diff --git a/tkimg1.3/libpng/scripts/makefile.atari b/tkimg1.3/libpng/scripts/makefile.atari
deleted file mode 100644
index 9566d5d..0000000
--- a/tkimg1.3/libpng/scripts/makefile.atari
+++ /dev/null
@@ -1,51 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-# modified for LC56/ATARI assumes libz.lib is in same dir and uses default
-# rules for library management
-#
-CFLAGS=-I..\zlib -O
-LBR = png.lib
-LDFLAGS=-lpng -lz -lm
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
-	$(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
-	$(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
-	$(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
-	$(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
-
-all: $(LBR) pngtest.ttp
-
-$(LBR): $(OBJS)
-
-pngtest.ttp: pngtest.o $(LBR)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
-
-install: libpng.a
-	- at mkdir $(DESTDIR)$(INCPATH)
-	- at mkdir $(DESTDIR)$(INCPATH)/libpng
-	- at mkdir $(DESTDIR)$(LIBPATH)
-	- at rm -f $(DESTDIR)$(INCPATH)/png.h
-	- at rm -f $(DESTDIR)$(INCPATH)/pngconf.h
-	cp png.h $(DESTDIR)$(INCPATH)/libpng
-	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
-	(cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
-	ln -f -s $(LIBNAME)/* .)
diff --git a/tkimg1.3/libpng/scripts/makefile.bc32 b/tkimg1.3/libpng/scripts/makefile.bc32
deleted file mode 100644
index 90b178b..0000000
--- a/tkimg1.3/libpng/scripts/makefile.bc32
+++ /dev/null
@@ -1,151 +0,0 @@
-# Makefile for libpng
-# 32-bit Borland C++ (Note: All modules are compiled in C mode)
-# To build the library, do:
-#       "make -fmakefile.bc32"
-#
-# -------------------- 32-bit Borland C++ --------------------
-
-### Absolutely necessary for this makefile to work
-.AUTODEPEND
-
-## Where zlib.h, zconf.h and zlib.lib are
-ZLIB_DIR=..\zlib
-
-
-## Compiler, linker and lib stuff
-CC=bcc32
-LD=bcc32
-LIB=tlib
-
-#TARGET_CPU=6
-# 3 = 386, 4 = 486, 5 = Pentium etc.
-!ifndef TARGET_CPU
-TARGET_CPU=5
-!endif
-
-# Use this if you don't want Borland's fancy exception handling
-NOEHLIB=noeh32.lib
-
-!ifdef DEBUG
-CDEBUG=-v
-LDEBUG=-v
-!else
-CDEBUG=
-LDEBUG=
-!endif
-
-# STACKOFLOW=1
-!ifdef STACKOFLOW
-CDEBUG=$(CDEBUG) -N
-LDEBUG=$(LDEBUG) -N
-!endif
-
-# -X- turn on dependency generation in the object file
-# -w  set all warnings on
-# -O2 optimize for speed
-# -Z  global optimization
-CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(CDEBUG)
-
-# -M  generate map file
-LDFLAGS=-M -L$(ZLIB_DIR) $(LDEBUG)
-
-
-## Variables
-OBJS = \
-	png.obj \
-	pngerror.obj \
-	pngget.obj \
-	pngmem.obj \
-	pngpread.obj \
-	pngread.obj \
-	pngrio.obj \
-	pngrtran.obj \
-	pngrutil.obj \
-	pngset.obj \
-	pngtrans.obj \
-	pngwio.obj \
-	pngwrite.obj \
-	pngwtran.obj \
-	pngwutil.obj
-
-LIBOBJS = \
-	+png.obj \
-	+pngerror.obj \
-	+pngget.obj \
-	+pngmem.obj \
-	+pngpread.obj \
-	+pngread.obj \
-	+pngrio.obj \
-	+pngrtran.obj \
-	+pngrutil.obj \
-	+pngset.obj \
-	+pngtrans.obj \
-	+pngwio.obj \
-	+pngwrite.obj \
-	+pngwtran.obj \
-	+pngwutil.obj
-
-LIBNAME=libpng.lib
-
-
-## Implicit rules
-# Braces let make "batch" calls to the compiler,
-# 2 calls instead of 12; space is important.
-.c.obj:
-	$(CC) $(CFLAGS) -c {$*.c }
-
-.c.exe:
-	$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
-
-.obj.exe:
-	$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
-
-
-## Major targets
-all: libpng pngtest
-
-libpng: $(LIBNAME)
-
-pngtest: pngtest.exe
-
-test: pngtest.exe
-	pngtest
-
-
-## Minor Targets
-
-png.obj: png.c
-pngerror.obj: pngerror.c
-pngget.obj: pngget.c
-pngmem.obj: pngmem.c
-pngpread.obj: pngpread.c
-pngread.obj: pngread.c
-pngrio.obj: pngrio.c
-pngrtran.obj: pngrtran.c
-pngrutil.obj: pngrutil.c
-pngset.obj: pngset.c
-pngtrans.obj: pngtrans.c
-pngwio.obj: pngwio.c
-pngwrite.obj: pngwrite.c
-pngwtran.obj: pngwtran.c
-pngwutil.obj: pngwutil.c
-
-
-$(LIBNAME): $(OBJS)
-	-del $(LIBNAME)
-	$(LIB) $(LIBNAME) @&&|
-$(LIBOBJS), libpng
-|
-
-
-# Clean up anything else you want
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.lst
-	-del *.map
-	-del *.tds
-
-
-# End of makefile for libpng
diff --git a/tkimg1.3/libpng/scripts/makefile.beos b/tkimg1.3/libpng/scripts/makefile.beos
deleted file mode 100644
index c023d0b..0000000
--- a/tkimg1.3/libpng/scripts/makefile.beos
+++ /dev/null
@@ -1,200 +0,0 @@
-# makefile for libpng on BeOS x86 ELF with gcc
-# modified from makefile.linux by Sander Stoks
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1999 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=gcc
-
-# Where the zlib library and include files are located
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-ALIGN=
-# For i386:
-# ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# On BeOS, -O1 is actually better than -O3.  This is a known bug but it's
-# still here in R4.5
-CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
-	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
-LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
-
-RANLIB=ranlib
-#RANLIB=echo
-
-# where make install puts libpng.a, libpng12.so*, and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-LIBNAME=libpng12
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS)
-
-.SUFFIXES:      .c .o
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-	cp $(LIBNAME).so* /boot/home/config/lib
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	$(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \
-	$(LIBNAME).so.$(PNGVER) $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
-	$(CC) -nostart -Wl,-soname,libpng.so.3 -o \
-	libpng.so.3.$(PNGMIN) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -sf libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) $(CFLAGS) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.bor b/tkimg1.3/libpng/scripts/makefile.bor
deleted file mode 100644
index a5651aa..0000000
--- a/tkimg1.3/libpng/scripts/makefile.bor
+++ /dev/null
@@ -1,162 +0,0 @@
-# Makefile for libpng
-# 16-bit Borland C++ (Note: All modules are compiled in C mode)
-# To build the library, do:
-#       "make -fmakefile.bor -DMODEL=c"
-# or:   "make -fmakefile.bor -DMODEL=l"
-#
-# ------------ Borland C++ ------------
-
-### Absolutely necessary for this makefile to work
-.AUTODEPEND
-
-## Where zlib.h, zconf.h and zlib_MODEL.lib are
-ZLIB_DIR=..\zlib
-
-
-## Compiler, linker and lib stuff
-CC=bcc
-LD=bcc
-LIB=tlib
-
-!ifndef MODEL
-MODEL=l
-!endif
-
-MODEL_ARG=-m$(MODEL)
-
-#TARGET_CPU=3
-# 2 = 286, 3 = 386, etc.
-!ifndef TARGET_CPU
-TARGET_CPU=2
-!endif
-
-# Use this if you don't want Borland's fancy exception handling
-# (for Borland C++ 4.0 or later)
-#NOEHLIB=noeh$(MODEL).lib
-
-!ifdef DEBUG
-CDEBUG=-v
-LDEBUG=-v
-!else
-CDEBUG=
-LDEBUG=
-!endif
-
-# STACKOFLOW=1
-!ifdef STACKOFLOW
-CDEBUG=$(CDEBUG) -N
-LDEBUG=$(LDEBUG) -N
-!endif
-
-# -X- turn on dependency generation in the object file
-# -w  set all warnings on
-# -O2 optimize for speed
-# -Z  global optimization
-CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
-
-# -M  generate map file
-LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
-
-
-## Variables
-OBJS = \
-	png.obj \
-	pngerror.obj \
-	pngget.obj \
-	pngmem.obj \
-	pngpread.obj \
-	pngread.obj \
-	pngrio.obj \
-	pngrtran.obj \
-	pngrutil.obj \
-	pngset.obj \
-	pngtrans.obj \
-	pngwio.obj \
-	pngwrite.obj \
-	pngwtran.obj \
-	pngwutil.obj
-
-LIBOBJS = \
-	+png.obj \
-	+pngerror.obj \
-	+pngget.obj \
-	+pngmem.obj \
-	+pngpread.obj \
-	+pngread.obj \
-	+pngrio.obj \
-	+pngrtran.obj \
-	+pngrutil.obj \
-	+pngset.obj \
-	+pngtrans.obj \
-	+pngwio.obj \
-	+pngwrite.obj \
-	+pngwtran.obj \
-	+pngwutil.obj
-
-LIBNAME=libpng$(MODEL).lib
-
-
-## Implicit rules
-# Braces let make "batch" calls to the compiler,
-# 2 calls instead of 12; space is important.
-.c.obj:
-	$(CC) $(CFLAGS) -c {$*.c }
-
-.c.exe:
-	$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
-
-
-## Major targets
-all: libpng pngtest
-
-libpng: $(LIBNAME)
-
-pngtest: pngtest$(MODEL).exe
-
-test: pngtest$(MODEL).exe
-	pngtest$(MODEL)
-
-
-## Minor Targets
-
-png.obj: png.c
-pngerror.obj: pngerror.c
-pngget.obj: pngget.c
-pngmem.obj: pngmem.c
-pngpread.obj: pngpread.c
-pngread.obj: pngread.c
-pngrio.obj: pngrio.c
-pngrtran.obj: pngrtran.c
-pngrutil.obj: pngrutil.c
-pngset.obj: pngset.c
-pngtrans.obj: pngtrans.c
-pngwio.obj: pngwio.c
-pngwrite.obj: pngwrite.c
-pngwtran.obj: pngwtran.c
-pngwutil.obj: pngwutil.c
-
-
-$(LIBNAME): $(OBJS)
-	-del $(LIBNAME)
-	$(LIB) $(LIBNAME) @&&|
-$(LIBOBJS), libpng$(MODEL)
-|
-
-
-pngtest$(MODEL).obj: pngtest.c
-	$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
-
-pngtest$(MODEL).exe: pngtest$(MODEL).obj
-	$(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
-
-
-# Clean up anything else you want
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.lst
-	-del *.map
-
-
-# End of makefile for libpng
diff --git a/tkimg1.3/libpng/scripts/makefile.cygwin b/tkimg1.3/libpng/scripts/makefile.cygwin
deleted file mode 100644
index 0379345..0000000
--- a/tkimg1.3/libpng/scripts/makefile.cygwin
+++ /dev/null
@@ -1,305 +0,0 @@
-# makefile for cygwin on x86
-#   Builds both dll (with import lib) and static lib versions
-#   of the library, and builds two copies of pngtest: one
-#   statically linked and one dynamically linked.
-#
-# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson
-#   based on makefile for linux-elf w/mmx by:
-# Copyright (C) 1998-2000 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-# This makefile intends to support building outside the src directory
-# if desired. When invoking it, specify an argument to SRCDIR on the
-# command line that points to the top of the directory where your source
-# is located.
-
-ifdef SRCDIR
-VPATH = $(SRCDIR)
-else
-SRCDIR = .
-endif
-
-# Override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-
-DESTDIR=
-
-# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
-# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
-# list at the bottom of this makefile.
-
-CC=gcc
-ifdef MINGW
-MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
-MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
-endif
-
-# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
-ifndef prefix
-prefix=/usr
-$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
-endif
-
-# Where the zlib library and include files are located
-ZLIBLIB= /usr/lib
-ZLIBINC=
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-### if you use the asm, add pnggccrd.o to the OBJS list
-###
-### if you don't need thread safety, but want the asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \
-#	$(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \
-#	-fomit-frame-pointer)  # $(WARNMORE) -g -DPNG_DEBUG=5
-### if you need thread safety and want (minimal) asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \
-#	-Wall -O3 $(ALIGN) -funroll-loops \
-#	-fomit-frame-pointer)  # $(WARNMORE) -g -DPNG_DEBUG=5
-### Normal (non-asm) compilation
-CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
-        -Wall -O3 $(ALIGN) -funroll-loops \
-	-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LIBNAME = libpng12
-PNGMAJ = 0
-CYGDLL = 12
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-SHAREDLIB=cygpng$(CYGDLL).dll
-STATLIB=libpng.a
-IMPLIB=libpng.dll.a
-SHAREDDEF=libpng.def
-LIBS=$(SHAREDLIB) $(STATLIB)
-EXE=.exe
-
-LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
-LDSFLAGS=$(strip -shared -L.  $(MINGW_LDFLAGS) -Wl,--export-all)
-LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
-
-MKDIR=/bin/mkdir -pv
-RANLIB=ranlib
-#RANLIB=echo
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-BINPATH=$(prefix)/bin
-MANPATH=$(prefix)/man
-MAN3PATH=$(MANPATH)/man3
-MAN5PATH=$(MANPATH)/man5
-
-# cosmetic: shortened strings:
-S =$(SRCDIR)
-D =$(DESTDIR)
-DB =$(D)$(BINPATH)
-DI =$(D)$(INCPATH)
-DL =$(D)$(LIBPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-%.o : %.c
-	$(CC) -c $(CFLAGS) -o $@ $<
-%.pic.o : CFLAGS += -DPNG_BUILD_DLL
-%.pic.o : %.c
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
-
-# Make this to verify that "make [...] install" will do what you want.
-buildsetup-tell:
-	@echo  VPATH is set to: \"$(VPATH)\"
-	@echo  prefix is set to: \"$(prefix)\"
-	@echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
- $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
-   $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
-
-libpng.pc: scripts/libpng.pc.in
-	@echo -e Making pkg-config file for this libpng installation..'\n' \
-           using PREFIX=\"$(prefix)\"'\n'
-	cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \
-	   sed -e s/-lm// > libpng.pc
-
-libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
-	@echo -e Making $(LIBNAME) libpng-config file for this libpng \
- installation..'\n' using PREFIX=\"$(prefix)\"'\n'
-	( cat $(S)/scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libs=\"-lpng$(CYGDLL) -lz\"; \
-	cat $(S)/scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-static: all-static
-shared: all-shared
-all-static: $(STATLIB) pngtest-stat$(EXE)
-all-shared: $(SHAREDLIB) pngtest$(EXE)
-
-pnggccrd.o: pnggccrd.c png.h pngconf.h
-	@echo ""
-	@echo '    You can ignore the "control reaches end of non-void function"'
-	@echo '    warning and "<variable> defined but not used" warnings:'
-	@echo ""
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-pnggccrd.pic.o:	pnggccrd.c png.h pngconf.h
-	@echo ""
-	@echo '    You can ignore the "control reaches end of non-void function"'
-	@echo '    warning and "<variable> defined but not used" warnings:'
-	@echo ""
-	$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
-
-$(STATLIB): $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-$(SHAREDDEF): projects/msvc/png32ms.def
-	cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
-	sed -e 's/\([^;]*\);/;/' > $@
-
-$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
-	$(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
-
-pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
-	$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
-
-pngtest-stat$(EXE): pngtest.o $(STATLIB)
-	$(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
-
-pngtest.pic.o: pngtest.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-pngtest.o: pngtest.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-test: test-static test-shared
-
-test-static: pngtest-stat$(EXE)
-	./pngtest-stat $(S)/pngtest.png
-
-test-shared: pngtest$(EXE)
-	./pngtest $(S)/pngtest.png
-
-install-static: $(STATLIB) install-headers install-man
-	- at if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
-	install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
-	- at rm -f $(DL)/$(STATLIB)
-	(cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
-
-install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
-	- at if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
-	- at if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi
-	- at if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
-	- at rm -f $(DL)/$(IMPLIB)
-	(cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
-	install -s -m 755 $(SHAREDLIB) $(DB)
-	install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-headers:
-	- at if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi
-	- at rm -f $(DI)/png.h
-	- at rm -f $(DI)/pngconf.h
-	install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
-	- at rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-man:
-	- at if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi
-	- at if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi
-	install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
-	install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-# Run this to verify that a future `configure' run will pick up the settings
-# you want.
-test-config-install: SHELL=/bin/bash
-test-config-install: $(DB)/libpng-config
-	@echo -e Testing libpng-config functions...'\n'
-	@ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
-   do \
-    printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
-    "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
-    gytiu=$$(( $$gytiu + 1 )); \
-   done
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) $(CFLAGS) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) \
-	   -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti$(EXE) pngtest.png
-
-clean:
-	/bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
-	pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
-	libpng-config libpng.pc pngtesti$(EXE)
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o:		png.h pngconf.h png.c
-pngerror.o pngerror.pic.o:	png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o:		png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o:		png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o:		png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o:		png.h pngconf.h pngset.c
-pngget.o pngget.pic.o:		png.h pngconf.h pngget.c
-pngread.o pngread.pic.o:	png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o:	png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o:	png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o:	png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o:	png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o:	png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o:	png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o:	png.h pngconf.h pngpread.c
-
-pngtest.o:			png.h pngconf.h pngtest.c
-pngtest-stat.o:			png.h pngconf.h pngtest.c
-
-
-
diff --git a/tkimg1.3/libpng/scripts/makefile.darwin b/tkimg1.3/libpng/scripts/makefile.darwin
deleted file mode 100644
index 38381c1..0000000
--- a/tkimg1.3/libpng/scripts/makefile.darwin
+++ /dev/null
@@ -1,206 +0,0 @@
-# makefile for libpng on Darwin / Mac OS X
-# Copyright (C) 2002,2004 Glenn Randers-Pehrson
-# Copyright (C) 2001 Christoph Pfisterer
-# derived from makefile.linux:
-#  Copyright (C) 1998, 1999 Greg Roelofs
-#  Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CC=cc
-CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
-
-#RANLIB=echo
-RANLIB=ranlib
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
-
-all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \
-	   sed -e s/-lm// > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib
-	ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib
-
-$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
-	ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib
-
-$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
-	$(CC) -dynamiclib \
-	 -install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
-	 -current_version $(PNGVER) -compatibility_version $(PNGVER) \
-	 -o $(LIBNAME).$(PNGVER).dylib \
-	 $(OBJSDLL) -L$(ZLIBLIB) -lz
-
-libpng.3.$(PNGMIN).dylib: $(OBJSDLL)
-	$(CC) -dynamiclib \
-	 -install_name $(LIBPATH)/libpng.3.dylib \
-	 -current_version 3 -compatibility_version 3 \
-	 -o libpng.3.$(PNGMIN).dylib \
-	 $(OBJSDLL) -L$(ZLIBLIB) -lz
-
-pngtest: pngtest.o $(LIBNAME).dylib
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	$(RANLIB) $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).dylib libpng.pc \
-	libpng.3.$(PNGMIN).dylib
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).$(PNGVER)*.dylib
-	-@/bin/rm -f $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
-	-@/bin/rm -f $(DL)/$(LIBNAME).dylib
-	-@/bin/rm -f $(DL)/libpng.dylib
-	-@/bin/rm -f $(DL)/libpng.3.dylib
-	-@/bin/rm -f $(DL)/libpng.3.$(PNGMIN)*.dylib
-	cp $(LIBNAME).$(PNGVER).dylib $(DL)
-	cp libpng.3.$(PNGMIN).dylib $(DL)
-	chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib
-	chmod 755 $(DL)/libpng.3.$(PNGMIN).dylib
-	(cd $(DL); \
-	ln -sf libpng.3.$(PNGMIN).dylib libpng.3.dylib; \
-	ln -sf libpng.3.dylib libpng.dylib; \
-	ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
-	ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) $(CFLAGS) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	rm -f *.o libpng.a pngtest pngout.png libpng-config \
-	libpng.3.$(PNGMIN).dylib \
-	libpng.pc $(LIBNAME).*dylib pngtesti
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.dec b/tkimg1.3/libpng/scripts/makefile.dec
deleted file mode 100644
index e02dd7b..0000000
--- a/tkimg1.3/libpng/scripts/makefile.dec
+++ /dev/null
@@ -1,186 +0,0 @@
-# makefile for libpng on DEC Alpha Unix
-# Copyright (C) 2000-2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-CC=cc
-CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
-LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
-
-#RANLIB=echo
-RANLIB=ranlib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo ccopts=\"-std\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJS)
-	$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
-	-soname $(LIBNAME).so.$(PNGMAJ)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
-	-soname libpng.so.3
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -w1 -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -R$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.dj2 b/tkimg1.3/libpng/scripts/makefile.dj2
deleted file mode 100644
index 09045c2..0000000
--- a/tkimg1.3/libpng/scripts/makefile.dj2
+++ /dev/null
@@ -1,55 +0,0 @@
-# DJGPP (DOS gcc) makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where make install will put libpng.a and png.h
-#prefix=/usr/local
-prefix=.
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-CC=gcc
-CFLAGS=-I../zlib -O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-
-RANLIB=ranlib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
-	pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-	coff2exe pngtest
-
-test: pngtest
-	./pngtest
-clean:
-	rm -f *.o libpng.a pngtest pngout.png
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.freebsd b/tkimg1.3/libpng/scripts/makefile.freebsd
deleted file mode 100644
index d7d5fae..0000000
--- a/tkimg1.3/libpng/scripts/makefile.freebsd
+++ /dev/null
@@ -1,48 +0,0 @@
-# makefile for libpng under FreeBSD
-# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
-# For conditions of distribution and use, see copyright notice in png.h
-
-PREFIX?=        /usr/local
-SHLIB_VER?=     5
-
-LIB=		png
-SHLIB_MAJOR=	${SHLIB_VER}
-SHLIB_MINOR=	0
-NOPROFILE=	YES
-NOOBJ=          YES
-
-# where make install puts libpng.a and png.h
-DESTDIR=	${PREFIX}
-LIBDIR=		/lib
-INCS=		png.h pngconf.h
-INCSDIR=	/include/libpng
-INCDIR=		${INCSDIR}		# for 4.x bsd.lib.mk
-MAN=		libpng.3 libpngpf.3 png.5
-MANDIR=		/man/man
-SYMLINKS=       libpng/png.h ${INCSDIR}/../png.h \
-		libpng/pngconf.h ${INCSDIR}/../pngconf.h
-LDADD+=         -lm -lz
-DPADD+=         ${LIBM} ${LIBZ}
-
-CFLAGS+= -I. -DPNG_USE_PNGGCCRD
-.if (${MACHINE_ARCH} != "i386")
-CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
-.endif
-
-SRCS=	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
-	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
-	pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c
-
-pngtest: pngtest.o libpng.a
-	${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
-
-CLEANFILES= pngtest pngtest.o pngout.png
-
-test: pngtest
-	./pngtest
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-.include <bsd.lib.mk>
diff --git a/tkimg1.3/libpng/scripts/makefile.gcc b/tkimg1.3/libpng/scripts/makefile.gcc
deleted file mode 100644
index f7fc368..0000000
--- a/tkimg1.3/libpng/scripts/makefile.gcc
+++ /dev/null
@@ -1,66 +0,0 @@
-# makefile for libpng using gcc (generic, static library)
-# Copyright (C) 2000 Cosmin Truta
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = gcc
-LD = $(CC)
-AR = ar rcs
-RANLIB = ranlib
-RM = rm -f
-
-CDEBUG = -g -DPNG_DEBUG=5
-LDDEBUG =
-CRELEASE = -O2
-LDRELEASE = -s
-CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
-LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
-
-# File extensions
-O=.o
-A=.a
-E=
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
-	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
-	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-# Targets
-all: libpng$(A) pngtest$(E)
-
-libpng$(A): $(OBJS)
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-test: pngtest$(E)
-	./pngtest$(E)
-
-pngtest$(E): pngtest$(O) libpng$(A)
-	$(LD) -o $@ pngtest$(O) $(LDFLAGS)
-
-clean:
-	$(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
-
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtest$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.gcmmx b/tkimg1.3/libpng/scripts/makefile.gcmmx
deleted file mode 100644
index 5164850..0000000
--- a/tkimg1.3/libpng/scripts/makefile.gcmmx
+++ /dev/null
@@ -1,250 +0,0 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX
-# assembler code
-# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson
-# Copyright 1998-2001 Greg Roelofs
-# Copyright 1996-1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
-
-# WARNING: The assembler code in pnggccrd.c may not be thread safe.
-
-# NOTE:  When testing MMX performance on a multitasking system, make sure
-#        there are no floating-point programs (e.g., SETI at Home) running in
-#        the background!  Context switches between MMX and FPU are expensive.
-
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-CC=gcc
-
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-
-# Where the zlib library and include files are located.
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
-### for generic gcc:
-CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
-	-O3 $(ALIGN) -funroll-loops \
-	-fomit-frame-pointer  # $(WARNMORE) -g -DPNG_DEBUG=5
-### for gcc 2.95.2 on 686:
-#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
-#	-mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
-#	$(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer 
-### for gcc 2.7.2.3 on 486 and up:
-#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
-#	-m486 -malign-double -ffast-math \
-#	$(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer 
-
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
-
-RANLIB=ranlib
-#RANLIB=echo
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo cppflags=\"-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-pnggccrd.o:	pnggccrd.c png.h pngconf.h
-	$(CC) -c $(CFLAGS) -o $@ $*.c
-
-pnggccrd.pic.o:	pnggccrd.c png.h pngconf.h
-	$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
-	-o $(LIBNAME).so.$(PNGVER) \
-	$(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,libpng.so.3 \
-	-o libpng.so.3.$(PNGMIN) \
-	$(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
-	$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
-	@echo ""
-	@echo "   Running pngtest dynamically linked with $(LIBNAME).so:"
-	@echo ""
-	./pngtest
-	@echo ""
-	@echo "   Running pngtest statically linked with libpng.a:"
-	@echo ""
-	./pngtest-static
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -sf libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-png.o png.pic.o:		png.h pngconf.h png.c
-pngerror.o pngerror.pic.o:	png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o:		png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o:		png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o:		png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o:		png.h pngconf.h pngset.c
-pngget.o pngget.pic.o:		png.h pngconf.h pngget.c
-pngread.o pngread.pic.o:	png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o:	png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o:	png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o:	png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o:	png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o:	png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o:	png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o:	png.h pngconf.h pngpread.c
-
-pngtest.o:			png.h pngconf.h pngtest.c
diff --git a/tkimg1.3/libpng/scripts/makefile.hpgcc b/tkimg1.3/libpng/scripts/makefile.hpgcc
deleted file mode 100644
index ca4c6c3..0000000
--- a/tkimg1.3/libpng/scripts/makefile.hpgcc
+++ /dev/null
@@ -1,218 +0,0 @@
-# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
-# Copyright (C) 2002, Glenn Randers-Pehrson
-# Copyright (C) 2001, Laurent faillie
-# Copyright (C) 1998, 1999 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=gcc
-LD=ld
-
-# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-ZLIBLIB=/opt/zlib/lib
-ZLIBINC=/opt/zlib/include
-
-# Note that if you plan to build a libpng shared library, zlib must also
-# be a shared library, which zlib's configure does not do.  After running
-# zlib's configure, edit the appropriate lines of makefile to read:
-#   CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
-#   LDSHARED=ld -b
-#   SHAREDLIB=libz.sl
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
-	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
-
-RANLIB=ranlib
-#RANLIB=echo
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
-	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
-
-$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
-	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
-
-$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
-	$(LD) -b +s \
-	+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
-
-libpng.sl.3.$(PNGMIN): $(OBJSDLL)
-	$(LD) -b +s \
-	+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).sl
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
-	libpng.sl.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
-	-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.sl
-	-@/bin/rm -f $(DL)/libpng.sl.3
-	-@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
-	cp $(LIBNAME).sl.$(PNGVER) $(DL)
-	cp libpng.sl.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
-	chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
-	ln -sf libpng.sl.3 libpng.sl; \
-	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
-	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
-	libpng.sl.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.hpux b/tkimg1.3/libpng/scripts/makefile.hpux
deleted file mode 100644
index d22f7f4..0000000
--- a/tkimg1.3/libpng/scripts/makefile.hpux
+++ /dev/null
@@ -1,203 +0,0 @@
-# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
-# Copyright (C) 1999-2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42
-# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Where the zlib library and include files are located
-ZLIBLIB=/opt/zlib/lib
-ZLIBINC=/opt/zlib/include
-
-# Note that if you plan to build a libpng shared library, zlib must also
-# be a shared library, which zlib's configure does not do.  After running
-# zlib's configure, edit the appropriate lines of makefile to read:
-#   CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
-#   LDSHARED=ld -b
-#   SHAREDLIB=libz.sl
-
-CC=cc
-CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
-# Caution: be sure you have built zlib with the same CFLAGS.
-CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-RANLIB=ranlib
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-# where make install puts libpng.a, libpng12.sl, and png.h
-prefix=/opt/libpng
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:	.c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) +z -o $@ $*.c
-
-all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
-	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
-
-$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
-	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
-
-$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
-	$(LD) -b +s \
-	+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
-
-libpng.sl.3.$(PNGMIN): $(OBJSDLL)
-	$(LD) -b +s \
-	+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
-	libpng.sl.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
-	-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.sl
-	-@/bin/rm -f $(DL)/libpng.sl.3
-	-@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
-	cp $(LIBNAME).sl.$(PNGVER) $(DL)
-	cp libpng.sl.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
-	chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
-	ln -sf libpng.sl.3 libpng.sl; \
-	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
-	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) $(CCFLAGS) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
-	libpng.sl.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.ibmc b/tkimg1.3/libpng/scripts/makefile.ibmc
deleted file mode 100644
index f09a62c..0000000
--- a/tkimg1.3/libpng/scripts/makefile.ibmc
+++ /dev/null
@@ -1,71 +0,0 @@
-# Makefile for libpng (static)
-# IBM C version 3.x for Win32 and OS/2
-# Copyright (C) 2000 Cosmin Truta
-# For conditions of distribution and use, see copyright notice in png.h
-# Notes:
-#   Derived from makefile.std
-#   All modules are compiled in C mode
-#   Tested under Win32, expected to work under OS/2
-#   Can be easily adapted for IBM VisualAge/C++ for AIX
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = icc
-LD = ilink
-AR = ilib
-RM = del
-
-CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
-LDFLAGS =
-
-# File extensions
-O=.obj
-A=.lib
-E=.exe
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
-	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
-	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
-
-# Targets
-all: libpng$(A) pngtest$(E)
-
-libpng$(A): $(OBJS)
-	$(AR) -out:$@ $(OBJS)
-
-test: pngtest$(E)
-	pngtest$(E)
-
-pngtest: pngtest$(E)
-
-pngtest$(E): pngtest$(O) libpng$(A)
-	$(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
-
-clean:
-	$(RM) *$(O)
-	$(RM) libpng$(A)
-	$(RM) pngtest$(E)
-	$(RM) pngout.png
-
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtest$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.intel b/tkimg1.3/libpng/scripts/makefile.intel
deleted file mode 100644
index 1cabe77..0000000
--- a/tkimg1.3/libpng/scripts/makefile.intel
+++ /dev/null
@@ -1,114 +0,0 @@
-# Makefile for libpng
-# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
-
-# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
-# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# To use, do "nmake /f scripts\makefile.intel"
-
-
-# ------------------- Intel C/C++ Compiler 4.0 and later -------------------
-
-# Caution: the assembler code was introduced at libpng version 1.0.4 and has
-# not yet been thoroughly tested.
-
-# Use assembler code
-ASMCODE=-DPNG_USE_PNGVCRD
-
-# Where the zlib library and include files are located
-ZLIBLIB=..\zlib
-ZLIBINC=..\zlib
-
-# Target CPU
-CPU=6		# Pentium II
-#CPU=5		# Pentium
-
-# Calling convention
-CALLING=r	# __fastcall
-#CALLING=z	# __stdcall
-#CALLING=d	# __cdecl
-
-# Uncomment next to put error messages in a file
-#ERRFILE=>>pngerrs
-
-# --------------------------------------------------------------------------
-
-
-CC=icl -c
-CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) $(ASMCODE) -nologo
-LD=link
-LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
-
-O=.obj
-
-OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
-pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
-pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O)
-
-
-all: test
-
-png$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngvcrd$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
-	if exist libpng.lib del libpng.lib
-	lib /NOLOGO /OUT:libpng.lib $(OBJS)
-
-pngtest.exe: pngtest.obj libpng.lib
-	$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
-
-test: pngtest.exe
-	pngtest.exe
-
-
-# End of makefile for libpng
diff --git a/tkimg1.3/libpng/scripts/makefile.knr b/tkimg1.3/libpng/scripts/makefile.knr
deleted file mode 100644
index 44ee538..0000000
--- a/tkimg1.3/libpng/scripts/makefile.knr
+++ /dev/null
@@ -1,99 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# This makefile requires the file ansi2knr.c, which you can get
-# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/
-# If you have libjpeg, you probably already have ansi2knr.c in the jpeg
-# source distribution.
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-CC=cc
-CFLAGS=-I../zlib -O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-# flags for ansi2knr
-ANSI2KNRFLAGS=
-
-RANLIB=ranlib
-#RANLIB=echo
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: ansi2knr libpng.a pngtest
-
-# general rule to allow ansi2knr to work
-.c.o:
-	./ansi2knr $*.c T$*.c
-	$(CC) $(CFLAGS) -c T$*.c
-	rm -f T$*.c $*.o
-	mv T$*.o $*.o
-
-ansi2knr: ansi2knr.c
-	$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
-libpng.a: ansi2knr $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install: libpng.a
-	- at mkdir $(DESTDIR)$(INCPATH)
-	- at mkdir $(DESTDIR)$(INCPATH)/libpng
-	- at mkdir $(DESTDIR)$(LIBPATH)
-	- at rm -f $(DESTDIR)$(INCPATH)/png.h
-	- at rm -f $(DESTDIR)$(INCPATH)/pngconf.h
-	cp png.h $(DESTDIR)$(INCPATH)/libpng
-	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
-	(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
-	cp libpng.a $(DESTDIR)$(LIBPATH)
-	chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
-	rm -f *.o libpng.a pngtest pngout.png ansi2knr
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.linux b/tkimg1.3/libpng/scripts/makefile.linux
deleted file mode 100644
index 793d445..0000000
--- a/tkimg1.3/libpng/scripts/makefile.linux
+++ /dev/null
@@ -1,224 +0,0 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc
-# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-CC=gcc
-
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-
-# Where the zlib library and include files are located.
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
-	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
-
-RANLIB=ranlib
-#RANLIB=echo
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
-	-o $(LIBNAME).so.$(PNGVER) \
-	$(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,libpng.so.3 \
-	-o libpng.so.3.$(PNGMIN) \
-	$(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
-	$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
-	@echo ""
-	@echo "   Running pngtest dynamically linked with $(LIBNAME).so:"
-	@echo ""
-	./pngtest
-	@echo ""
-	@echo "   Running pngtest statically linked with libpng.a:"
-	@echo ""
-	./pngtest-static
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -sf libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.mips b/tkimg1.3/libpng/scripts/makefile.mips
deleted file mode 100644
index f1a557d..0000000
--- a/tkimg1.3/libpng/scripts/makefile.mips
+++ /dev/null
@@ -1,83 +0,0 @@
-# makefile for libpng
-# Copyright (C) Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-CC=cc
-CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
-#CFLAGS=-O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install: libpng.a
-	- at mkdir $(DESTDIR)$(INCPATH)
-	- at mkdir $(DESTDIR)$(INCPATH)/libpng
-	- at mkdir $(DESTDIR)$(LIBPATH)
-	- at rm -f $(DESTDIR)$(INCPATH)/png.h
-	- at rm -f $(DESTDIR)$(INCPATH)/pngconf.h
-	cp png.h $(DESTDIR)$(INCPATH)/libpng
-	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
-	(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
-	cp libpng.a $(DESTDIR)$(LIBPATH)
-	chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
-	rm -f *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.msc b/tkimg1.3/libpng/scripts/makefile.msc
deleted file mode 100644
index 1cbfd91..0000000
--- a/tkimg1.3/libpng/scripts/makefile.msc
+++ /dev/null
@@ -1,86 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-
-# -------- Microsoft C 5.1 and later, does not use assembler code --------
-MODEL=L
-CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
-#-Ox generates bad code with MSC 5.1
-CC=cl
-LD=link
-LDFLAGS=/e/st:0x1500/noe
-O=.obj
-
-#uncomment next to put error messages in a file
-ERRFILE= >> pngerrs
-
-# variables
-OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-all: libpng.lib
-
-png$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
-	del libpng.lib
-	lib libpng $(OBJS1);
-	lib libpng $(OBJS2);
-	lib libpng $(OBJS3);
-
-pngtest.exe: pngtest.obj libpng.lib
-	$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
-
-test: pngtest.exe
-	pngtest
-
-# End of makefile for libpng
-
diff --git a/tkimg1.3/libpng/scripts/makefile.ne12bsd b/tkimg1.3/libpng/scripts/makefile.ne12bsd
deleted file mode 100644
index 325ea6b..0000000
--- a/tkimg1.3/libpng/scripts/makefile.ne12bsd
+++ /dev/null
@@ -1,44 +0,0 @@
-# makefile for libpng for NetBSD for the standard
-# make obj && make depend && make && make test
-# make includes && make install
-# Copyright (C) 2002 Patrick R.L. Welche
-# For conditions of distribution and use, see copyright notice in png.h
-
-# You should also run makefile.netbsd
-
-LOCALBASE?=/usr/local
-LIBDIR=	${LOCALBASE}/lib
-MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng12
-
-LIB=	png12
-SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.2.6rc5
-SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
-		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
-		pngwtran.c pngmem.c pngerror.c pngpread.c
-INCS=	png.h pngconf.h
-MAN=	libpng.3 libpngpf.3 png.5
-
-CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
-
-# something like this for mmx assembler, but it core dumps for me at the moment
-# .if ${MACHINE_ARCH} == "i386"
-#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
-#   MKLINT= no
-# .else
-    CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
-# .endif
-
-CLEANFILES+=pngtest.o pngtest
-
-pngtest.o:	pngtest.c
-	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
-
-pngtest:	pngtest.o libpng.a
-	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
-
-test:	pngtest
-	cd ${.CURDIR} && ${.OBJDIR}/pngtest
-
-.include <bsd.lib.mk>
diff --git a/tkimg1.3/libpng/scripts/makefile.netbsd b/tkimg1.3/libpng/scripts/makefile.netbsd
deleted file mode 100644
index f22b771..0000000
--- a/tkimg1.3/libpng/scripts/makefile.netbsd
+++ /dev/null
@@ -1,44 +0,0 @@
-# makefile for libpng for NetBSD for the standard
-# make obj && make depend && make && make test
-# make includes && make install
-# Copyright (C) 2002 Patrick R.L. Welche
-# For conditions of distribution and use, see copyright notice in png.h
-
-# You should also run makefile.ne0bsd
-
-LOCALBASE?=/usr/local
-LIBDIR=	${LOCALBASE}/lib
-MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng
-
-LIB=	png
-SHLIB_MAJOR=	3
-SHLIB_MINOR=	1.2.6rc5
-SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
-		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
-		pngwtran.c pngmem.c pngerror.c pngpread.c
-INCS=	png.h pngconf.h
-MAN=	libpng.3 libpngpf.3 png.5
-
-CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
-
-# something like this for mmx assembler, but it core dumps for me at the moment
-# .if ${MACHINE_ARCH} == "i386"
-#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
-#   MKLINT= no
-# .else
-    CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
-# .endif
-
-CLEANFILES+=pngtest.o pngtest
-
-pngtest.o:	pngtest.c
-	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
-
-pngtest:	pngtest.o libpng.a
-	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
-
-test:	pngtest
-	cd ${.CURDIR} && ${.OBJDIR}/pngtest
-
-.include <bsd.lib.mk>
diff --git a/tkimg1.3/libpng/scripts/makefile.openbsd b/tkimg1.3/libpng/scripts/makefile.openbsd
deleted file mode 100644
index 40f3f3e..0000000
--- a/tkimg1.3/libpng/scripts/makefile.openbsd
+++ /dev/null
@@ -1,72 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-PREFIX?= /usr/local
-LIBDIR=	${PREFIX}/lib
-MANDIR= ${PREFIX}/man/cat
-
-SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.2.6rc5
-
-LIB=	png
-SRCS=	png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
-	pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
-	pngwio.c pngwrite.c pngwtran.c pngwutil.c
-
-HDRS=	png.h pngconf.h
-
-CFLAGS+= -Wall
-CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
-
-NOPROFILE= Yes
-
-CLEANFILES+= pngtest.o pngtest
-
-MAN=	libpng.3 libpngpf.3 png.5
-DOCS=	ANNOUNCE CHANGES LICENSE README libpng.txt
-
-pngtest.o:	pngtest.c
-	${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
-
-pngtest:	pngtest.o
-	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
-
-test:	pngtest
-	cd ${.OBJDIR} && env \
-		LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
-
-beforeinstall:
-	if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
-	fi
-	if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
-	fi
-	if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
-	fi
-	if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
-	fi
-	if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
-	fi
-	if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
-	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
-	fi
-
-afterinstall:
-	@rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
-	@rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
-	@rm -f ${DESTDIR}${PREFIX}/include/png.h
-	@rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
-	@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
-	${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
-		-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
-	${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
-		-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
-	${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
-		-m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
-
-.include <bsd.lib.mk>
diff --git a/tkimg1.3/libpng/scripts/makefile.os2 b/tkimg1.3/libpng/scripts/makefile.os2
deleted file mode 100644
index 588067d..0000000
--- a/tkimg1.3/libpng/scripts/makefile.os2
+++ /dev/null
@@ -1,69 +0,0 @@
-# makefile for libpng on OS/2 with gcc
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Related files: pngos2.def
-
-CC=gcc -Zomf -s
-
-# Where the zlib library and include files are located
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \
-	-malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
-AR=emxomfar
-
-PNGLIB=png.lib
-IMPLIB=emximp
-SHAREDLIB=png.dll
-SHAREDLIBIMP=pngdll.lib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-.SUFFIXES:      .c .o
-
-all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
-
-$(PNGLIB): $(OBJS)
-	$(AR) rc $@ $(OBJS)
-
-$(SHAREDLIB): $(OBJS) pngos2.def
-	$(CC) $(LDFLAGS) -Zdll -o $@ $^
-
-$(SHAREDLIBIMP): pngos2.def
-	$(IMPLIB) -o $@ $^
-
-pngtest.exe: pngtest.o png.dll pngdll.lib
-	$(CC) -o $@ $(CFLAGS) $< $(LDFLAGS)
-
-test: pngtest.exe
-	./pngtest.exe
-
-clean:
-	rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.sco b/tkimg1.3/libpng/scripts/makefile.sco
deleted file mode 100644
index 38d8ea8..0000000
--- a/tkimg1.3/libpng/scripts/makefile.sco
+++ /dev/null
@@ -1,202 +0,0 @@
-# makefile for SCO OSr5  ELF and Unixware 7 with Native cc
-# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
-#   force ELF build dynamic linking, SONAME setting in lib and RPATH in app
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=cc
-
-# where make install puts libpng.a, libpng.so*, and png.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CFLAGS= -dy -belf -I$(ZLIBINC) -O3
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include/libpng
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo ccopts=\"-belf\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	$(CC) -G  -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
-	 $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
-	$(CC) -G  -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \
-	$(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	-@/bin/rm -f $(DI)/png.h
-	-@/bin/rm -f $(DI)/pngconf.h
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -f -s $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	$(CC) $(CFLAGS) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.sggcc b/tkimg1.3/libpng/scripts/makefile.sggcc
deleted file mode 100644
index 2c19dab..0000000
--- a/tkimg1.3/libpng/scripts/makefile.sggcc
+++ /dev/null
@@ -1,212 +0,0 @@
-# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
-# Copyright (C) 2001-2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib32
-#ZLIBINC=/usr/local/include
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-CC=gcc
-
-# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
-# See "man abi".  zlib must be built with the same ABI.
-ABI=
-
-WARNMORE= # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
-LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-  -set_version sgi$(PNGMAJ).0
-LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \
-  -set_version sgi$3.0
-# See "man dso" for info about shared objects
-
-RANLIB=echo
-#RANLIB=ranlib
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-#LIBPATH=$(prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest shared libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-shared: $(LIBNAME).so.$(PNGVER)
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo ccopts=\"$(ABI)\"; \
-	echo ldopts=\"$(ABI)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libdir=\"$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJS)
-	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(LDLEGACY) -o $@ $(OBJS)
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	echo
-	echo Testing local static library.
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -sf libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	so_locations
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pnggccrd.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.sgi b/tkimg1.3/libpng/scripts/makefile.sgi
deleted file mode 100644
index 2d7383f..0000000
--- a/tkimg1.3/libpng/scripts/makefile.sgi
+++ /dev/null
@@ -1,218 +0,0 @@
-# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
-# Copyright (C) 2001-2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib32
-#ZLIBINC=/usr/local/include
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CC=cc
-
-# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
-# See "man abi".  zlib must be built with the same ABI.
-ABI=
-
-WARNMORE=-fullwarn
-# Note: -KPIC is the default anyhow
-#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \
-  -DPNG_NO_ASSEMBLER_CODE
-LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-  -set_version sgi$(PNGMAJ).0
-LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \
-  -set_version sgi$3.0
-# See "man dso" for info about shared objects
-
-RANLIB=echo
-#RANLIB=ranlib
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-#LIBPATH=$(prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest shared libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-shared: $(LIBNAME).so.$(PNGVER)
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \
-	echo ccopts=\"$(ABI)\"; \
-	echo ldopts=\"$(ABI)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo libdir=\"$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJS)
-	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(LDLEGACY) -o $@ $(OBJS)
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	echo
-	echo Testing local static library.
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -sf libpng.so.3 libpng.so; \
-	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
-	./pngtesti pngtest.png
-
-clean:
-	rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
-	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	so_locations
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pnggccrd.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.so9 b/tkimg1.3/libpng/scripts/makefile.so9
deleted file mode 100644
index e60aa42..0000000
--- a/tkimg1.3/libpng/scripts/makefile.so9
+++ /dev/null
@@ -1,224 +0,0 @@
-# makefile for libpng on Solaris 9 (beta) with Forte cc
-# Updated by Chad Schrock for Solaris 9
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1998-2001 Greg Roelofs
-# Copyright (C) 1996-1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-# gcc 2.95 doesn't work.
-CC=cc
-
-# Where make install puts libpng.a, libpng.so*, and png.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk.  If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-#Use the preinstalled zlib that comes with Solaris 9:
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-#CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5
-CFLAGS=-I$(ZLIBINC) -O3
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-R$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	@case "`type ld`" in *ucb*) \
-	echo; \
-	echo '## WARNING:'; \
-	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
-	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
-	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
-	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
-	echo '## at all.  If it is, things are likely to break because of'; \
-	echo '## the libucb dependency that is created.'; \
-	echo; \
-	;; \
-	esac
-	$(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \
-	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(LD) -G -h libpng.so.3 \
-	 -o libpng.so.3.$(PNGMIN) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -f -s $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \
-	   -L$(ZLIBLIB) -R$(ZLIBLIB)
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.solaris b/tkimg1.3/libpng/scripts/makefile.solaris
deleted file mode 100644
index be0c25a..0000000
--- a/tkimg1.3/libpng/scripts/makefile.solaris
+++ /dev/null
@@ -1,221 +0,0 @@
-# makefile for libpng on Solaris 2.x with gcc
-# Copyright (C) 2004 Glenn Randers-Pehrson
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=gcc
-
-# Where make install puts libpng.a, libpng12.so*, and png.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk.  If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -Wall -O \
-	# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-PNGMAJ = 0
-PNGMIN = 1.2.6rc5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES:      .c .o .pic.o
-
-.c.pic.o:
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
-	ar rc $@ $(OBJS)
-	$(RANLIB) $@
-
-libpng.pc:
-	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
-	( cat scripts/libpng-config-head.in; \
-	echo prefix=\"$(prefix)\"; \
-	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
-	echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \
-	echo L_opts=\"-L$(LIBPATH)\"; \
-	echo R_opts=\"-R$(LIBPATH)\"; \
-	echo libs=\"-lpng12 -lz -lm\"; \
-	cat scripts/libpng-config-body.in ) > libpng-config
-	chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
-	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-	@case "`type ld`" in *ucb*) \
-	echo; \
-	echo '## WARNING:'; \
-	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
-	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
-	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
-	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
-	echo '## at all.  If it is, things are likely to break because of'; \
-	echo '## the libucb dependency that is created.'; \
-	echo; \
-	;; \
-	esac
-	$(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \
-	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJS)
-	$(LD) -G -h libpng.so.3 \
-	 -o libpng.so.3.$(PNGMIN) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install-headers: png.h pngconf.h
-	- at if [ ! -d $(DI) ]; then mkdir $(DI); fi
-	- at if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
-	cp png.h pngconf.h $(DI)/$(LIBNAME)
-	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-	-@/bin/rm -f $(DI)/libpng
-	(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	cp libpng.a $(DL)/$(LIBNAME).a
-	chmod 644 $(DL)/$(LIBNAME).a
-	-@/bin/rm -f $(DL)/libpng.a
-	(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
-	libpng.so.3.$(PNGMIN)
-	- at if [ ! -d $(DL) ]; then mkdir $(DL); fi
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-	-@/bin/rm -f $(DL)/libpng.so
-	-@/bin/rm -f $(DL)/libpng.so.3
-	-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
-	cp $(LIBNAME).so.$(PNGVER) $(DL)
-	cp libpng.so.3.$(PNGMIN) $(DL)
-	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
-	chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
-	(cd $(DL); \
-	ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
-	ln -f -s libpng.so.3 libpng.so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \
-	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ))
-	- at if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
-	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
-	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
-	(cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
-	- at if [ ! -d $(DM) ]; then mkdir $(DM); fi
-	- at if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-	-@/bin/rm -f $(DM)/man3/libpng.3
-	-@/bin/rm -f $(DM)/man3/libpngpf.3
-	cp libpng.3 $(DM)/man3
-	cp libpngpf.3 $(DM)/man3
-	- at if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-	-@/bin/rm -f $(DM)/man5/png.5
-	cp png.5 $(DM)/man5
-
-install-config: libpng-config
-	- at if [ ! -d $(DB) ]; then mkdir $(DB); fi
-	-@/bin/rm -f $(DB)/libpng-config
-	-@/bin/rm -f $(DB)/$(LIBNAME)-config
-	cp libpng-config $(DB)/$(LIBNAME)-config
-	chmod 755 $(DB)/$(LIBNAME)-config
-	(cd $(DB); ln -s -f $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
-	echo
-	echo Testing installed dynamic shared library.
-	$(CC) -I$(ZLIBINC) \
-	   `$(BINPATH)/libpng12-config --cflags` pngtest.c \
-	   -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \
-	   -L$(ZLIBLIB) -R$(ZLIBLIB)
-	./pngtesti pngtest.png
-
-clean:
-	/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
-	libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
-	libpng.so.3.$(PNGMIN) \
-	libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/tkimg1.3/libpng/scripts/makefile.std b/tkimg1.3/libpng/scripts/makefile.std
deleted file mode 100644
index 5d1f529..0000000
--- a/tkimg1.3/libpng/scripts/makefile.std
+++ /dev/null
@@ -1,89 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CC=cc
-CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-#RANLIB=echo
-RANLIB=ranlib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install: libpng.a
-	- at mkdir $(DESTDIR)$(INCPATH)
-	- at mkdir $(DESTDIR)$(INCPATH)/libpng
-	- at mkdir $(DESTDIR)$(LIBPATH)
-	- at rm -f $(DESTDIR)$(INCPATH)/png.h
-	- at rm -f $(DESTDIR)$(INCPATH)/pngconf.h
-	cp png.h $(DESTDIR)$(INCPATH)/libpng
-	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
-	(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
-	cp libpng.a $(DESTDIR)$(LIBPATH)
-	chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
-	rm -f *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.sunos b/tkimg1.3/libpng/scripts/makefile.sunos
deleted file mode 100644
index 70a6e88..0000000
--- a/tkimg1.3/libpng/scripts/makefile.sunos
+++ /dev/null
@@ -1,93 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location.  Example:
-#
-#    make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
-	-Wmissing-declarations -Wtraditional -Wcast-align \
-	-Wstrict-prototypes -Wmissing-prototypes
-CC=gcc
-CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-RANLIB=ranlib
-#RANLIB=echo
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
-	pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
-	./pngtest
-
-install: libpng.a
-	- at mkdir $(DESTDIR)$(INCPATH)
-	- at mkdir $(DESTDIR)$(INCPATH)/libpng
-	- at mkdir $(DESTDIR)$(LIBPATH)
-	- at rm -f $(DESTDIR)$(INCPATH)/png.h
-	- at rm -f $(DESTDIR)$(INCPATH)/pngconf.h
-	cp png.h $(DESTDIR)$(INCPATH)/libpng
-	cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
-	chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
-	(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
-	cp libpng.a $(DESTDIR)$(LIBPATH)
-	chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
-	rm -f *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
-	chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-
diff --git a/tkimg1.3/libpng/scripts/makefile.tc3 b/tkimg1.3/libpng/scripts/makefile.tc3
deleted file mode 100644
index 21435a6..0000000
--- a/tkimg1.3/libpng/scripts/makefile.tc3
+++ /dev/null
@@ -1,89 +0,0 @@
-# Makefile for libpng
-# TurboC/C++ (Note: All modules are compiled in C mode)
-
-# To use, do "make -fmakefile.tc3"
-
-# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
-
-MODEL=l
-CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
-#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib  # Turbo C older than 3.00
-CC=tcc
-LD=tcc
-LIB=tlib
-LDFLAGS=-m$(MODEL) -L..\zlib
-O=.obj
-E=.exe
-
-# variables
-OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O)
-OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O)
-OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
-
-all: libpng$(MODEL).lib pngtest$(E)
-
-pngtest: pngtest$(E)
-
-test: pngtest$(E)
-	pngtest$(E)
-
-png$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngset$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngget$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngread$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngpread$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngrtran$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngrutil$(O): png.h pngconf.h
-		  $(CC) -c $(CFLAGS) $*.c
-
-pngerror$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngmem$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngrio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngwio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngtest$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
-	$(LIB) libpng$(MODEL) +$(OBJSL1)
-	$(LIB) libpng$(MODEL) +$(OBJSL2)
-	$(LIB) libpng$(MODEL) +$(OBJSL3)
-
-pngtest$(E): pngtest$(O) libpng$(MODEL).lib
-	$(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib
-
-# End of makefile for libpng
diff --git a/tkimg1.3/libpng/scripts/makefile.vcawin32 b/tkimg1.3/libpng/scripts/makefile.vcawin32
deleted file mode 100644
index 4c2f3cc..0000000
--- a/tkimg1.3/libpng/scripts/makefile.vcawin32
+++ /dev/null
@@ -1,103 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1998 Tim Wegner
-# For conditions of distribution and use, see copyright notice in png.h
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-# To use, do "nmake /f scripts\makefile.vcawin32"
-
-# -------- Microsoft Visual C++ 5.0 and later, uses assembler code --------
-# If you don't want to use assembler (MMX) code, use makefile.vcwin32 instead.
-
-# Compiler, linker, librarian, and other tools
-CC = cl
-LD = link
-AR = lib
-CFLAGS  = -DPNG_USE_PNGVCRD -nologo -MD -O2 -W3 -I..\zlib
-LDFLAGS = -nologo
-ARFLAGS = -nologo
-RM = del
-
-# File extensions
-O=.obj
-
-#uncomment next to put error messages in a file
-#ERRFILE= >> pngerrs.log
-
-# Variables
-OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
-OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
-OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-OBJS4 = pngvcrd$(O)
-OBJS  = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
-
-# Targets
-all: libpng.lib
-
-png$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngvcrd$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
-	-$(RM) $@
-	$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
-
-pngtest.exe: pngtest$(O) libpng.lib
-	$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
-
-test: pngtest.exe
-	pngtest
-
-clean:
-	-$(RM) *$(O)
-	-$(RM) libpng.lib
-	-$(RM) pngtest.exe
-	-$(RM) pngout.png
-
-# End of makefile for libpng
-
diff --git a/tkimg1.3/libpng/scripts/makefile.vcwin32 b/tkimg1.3/libpng/scripts/makefile.vcwin32
deleted file mode 100644
index d23d812..0000000
--- a/tkimg1.3/libpng/scripts/makefile.vcwin32
+++ /dev/null
@@ -1,99 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1998 Tim Wegner
-# For conditions of distribution and use, see copyright notice in png.h
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-# To use, do "nmake /f scripts\makefile.vcwin32"
-
-# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
-# If you want to use assembler (MMX) code, use makefile.vcawin32 instead.
-
-# Compiler, linker, librarian, and other tools
-CC = cl
-LD = link
-AR = lib
-CFLAGS  = -nologo -MD -O2 -W3 -I..\zlib
-LDFLAGS = -nologo
-ARFLAGS = -nologo
-RM = del
-
-# File extensions
-O=.obj
-
-#uncomment next to put error messages in a file
-#ERRFILE= >> pngerrs.log
-
-# Variables
-OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
-OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
-OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-OBJS  = $(OBJS1) $(OBJS2) $(OBJS3)
-
-# Targets
-all: libpng.lib
-
-png$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
-	-$(RM) $@
-	$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
-
-pngtest.exe: pngtest$(O) libpng.lib
-	$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
-
-test: pngtest.exe
-	pngtest
-
-clean:
-	-$(RM) *$(O)
-	-$(RM) libpng.lib
-	-$(RM) pngtest.exe
-	-$(RM) pngout.png
-
-# End of makefile for libpng
-
diff --git a/tkimg1.3/libpng/scripts/makefile.watcom b/tkimg1.3/libpng/scripts/makefile.watcom
deleted file mode 100644
index 5e860fc..0000000
--- a/tkimg1.3/libpng/scripts/makefile.watcom
+++ /dev/null
@@ -1,109 +0,0 @@
-# Makefile for libpng
-# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model
-
-# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
-# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# To use, do "wmake /f scripts\makefile.watcom"
-
-
-# ---------------------- Watcom C/C++ 10.0 and later -----------------------
-
-# Where the zlib library and include files are located
-ZLIBLIB=..\zlib
-ZLIBINC=..\zlib
-
-# Target OS
-OS=DOS
-#OS=NT
-
-# Target CPU
-CPU=6		# Pentium Pro
-#CPU=5		# Pentium
-
-# Calling convention
-CALLING=r	# registers
-#CALLING=s	# stack
-
-# Uncomment next to put error messages in a file
-#ERRFILE=>>pngerrs
-
-# --------------------------------------------------------------------------
-
-
-CC=wcc386
-CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
-LD=wcl386
-LDFLAGS=-zq
-
-O=.obj
-
-OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-
-all: test
-
-png$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
-	$(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
-	wlib -b -c -n -q libpng.lib $(OBJS1)
-	wlib -b -c -q libpng.lib $(OBJS2)
-	wlib -b -c -q libpng.lib $(OBJS3)
-
-pngtest.exe: pngtest.obj libpng.lib
-	$(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
-
-test: pngtest.exe .symbolic
-	pngtest.exe
-
-
-# End of makefile for libpng
diff --git a/tkimg1.3/libpng/scripts/makevms.com b/tkimg1.3/libpng/scripts/makevms.com
deleted file mode 100644
index b9e3895..0000000
--- a/tkimg1.3/libpng/scripts/makevms.com
+++ /dev/null
@@ -1,144 +0,0 @@
-$! make libpng under VMS
-$!
-$!
-$! Check for MMK/MMS
-$!
-$! This procedure accepts one parameter (contrib), which causes it to build
-$! the programs from the contrib directory instead of libpng.
-$!
-$ p1 = f$edit(p1,"UPCASE")
-$ if p1 .eqs. "CONTRIB"
-$ then
-$   set def [.contrib.gregbook]
-$   @makevms
-$   set def [-.pngminus]
-$   @makevms
-$   set def [--]
-$   exit
-$ endif
-$ Make = ""
-$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
-$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
-$!
-$! Look for the compiler used
-$!
-$ zlibsrc = "[-.zlib]"
-$ ccopt="/include=''zlibsrc'"
-$ if f$getsyi("HW_MODEL").ge.1024
-$ then
-$  ccopt = "/prefix=all"+ccopt
-$  comp  = "__decc__=1"
-$  if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ else
-$  if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
-$   then
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$    if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
-$     then
-$      comp  = "__gcc__=1"
-$      CC :== GCC
-$     else
-$      comp = "__vaxc__=1"
-$     endif
-$   else
-$    if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
-$    ccopt = "/decc/prefix=all"+ccopt
-$    comp  = "__decc__=1"
-$  endif
-$ endif
-$!
-$! Build the thing plain or with mms/mmk
-$!
-$ write sys$output "Compiling Libpng sources ..."
-$ if make.eqs.""
-$  then
-$   dele pngtest.obj;*
-$   CALL MAKE png.OBJ "cc ''CCOPT' png" -
-	png.c png.h pngconf.h
-$   CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
-					 pngpread.c png.h pngconf.h
-$   CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
-	pngset.c png.h pngconf.h
-$   CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
-	pngget.c png.h pngconf.h
-$   CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
-	pngread.c png.h pngconf.h
-$   CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
-					 pngpread.c png.h pngconf.h
-$   CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
-	pngrtran.c png.h pngconf.h
-$   CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
-	pngrutil.c png.h pngconf.h
-$   CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
-	pngerror.c png.h pngconf.h
-$   CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
-	pngmem.c png.h pngconf.h
-$   CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
-	pngrio.c png.h pngconf.h
-$   CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
-	pngwio.c png.h pngconf.h
-$   CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
-	pngtrans.c png.h pngconf.h
-$   CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
-	pngwrite.c png.h pngconf.h
-$   CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
-	pngwtran.c png.h pngconf.h
-$   CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
-	pngwutil.c png.h pngconf.h
-$   write sys$output "Building Libpng ..."
-$   CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
-$   write sys$output "Building pngtest..."
-$   CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" -
-	pngtest.c png.h pngconf.h
-$   call make pngtest.exe -
-	"LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" -
-	pngtest.obj libpng.olb
-$   write sys$output "Testing Libpng..."
-$   run pngtest
-$  else
-$   if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
-$   'make'/macro=('comp',zlibsrc='zlibsrc')
-$  endif
-$ write sys$output "Libpng build completed"
-$ exit
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
diff --git a/tkimg1.3/libpng/scripts/pngos2.def b/tkimg1.3/libpng/scripts/pngos2.def
deleted file mode 100644
index a9d2a88..0000000
--- a/tkimg1.3/libpng/scripts/pngos2.def
+++ /dev/null
@@ -1,220 +0,0 @@
-;----------------------------------------
-; PNG.LIB module definition file for OS/2
-;----------------------------------------
-
-; Version 1.2.6rc5
-
-LIBRARY		PNG
-DESCRIPTION	"PNG image compression library for OS/2"
-CODE		PRELOAD MOVEABLE DISCARDABLE
-DATA		PRELOAD MOVEABLE MULTIPLE
-
-EXPORTS
-
-
-  png_build_grayscale_palette
-  png_check_sig
-  png_chunk_error
-  png_chunk_warning
-  png_convert_from_struct_tm
-  png_convert_from_time_t
-  png_create_info_struct
-  png_create_read_struct
-  png_create_write_struct
-  png_data_freer
-  png_destroy_info_struct
-  png_destroy_read_struct
-  png_destroy_write_struct
-  png_error
-  png_free
-  png_free_data
-  png_get_IHDR
-  png_get_PLTE
-  png_get_bKGD
-  png_get_bit_depth
-  png_get_cHRM
-  png_get_cHRM_fixed
-  png_get_channels
-  png_get_color_type
-  png_get_compression_buffer_size
-  png_get_compression_type
-  png_get_copyright
-  png_get_error_ptr
-  png_get_filter_type
-  png_get_gAMA
-  png_get_gAMA_fixed
-  png_get_hIST
-  png_get_header_ver
-  png_get_header_version
-  png_get_iCCP
-  png_get_image_height
-  png_get_image_width
-  png_get_interlace_type
-  png_get_io_ptr
-  png_get_libpng_ver
-  png_get_oFFs
-  png_get_pCAL
-  png_get_pHYs
-  png_get_pixel_aspect_ratio
-  png_get_pixels_per_meter
-  png_get_progressive_ptr
-  png_get_rgb_to_gray_status
-  png_get_rowbytes
-  png_get_rows
-  png_get_sBIT
-  png_get_sCAL
-  png_get_sPLT
-  png_get_sRGB
-  png_get_signature
-  png_get_tIME
-  png_get_tRNS
-  png_get_text
-  png_get_unknown_chunks
-  png_get_user_chunk_ptr
-  png_get_user_transform_ptr
-  png_get_valid
-  png_get_x_offset_microns
-  png_get_x_offset_pixels
-  png_get_x_pixels_per_meter
-  png_get_y_offset_microns
-  png_get_y_offset_pixels
-  png_get_y_pixels_per_meter
-  png_malloc
-  png_memcpy_check
-  png_memset_check
-  png_permit_empty_plte
-  png_process_data
-  png_progressive_combine_row
-  png_read_end
-  png_read_image
-  png_read_info
-  png_read_init ; deprecated
-  png_read_png
-  png_read_row
-  png_read_rows
-  png_read_update_info
-  png_reset_zstream
-  png_set_IHDR
-  png_set_PLTE
-  png_set_bKGD
-  png_set_background
-  png_set_bgr
-  png_set_cHRM
-  png_set_cHRM_fixed
-  png_set_compression_buffer_size
-  png_set_compression_level
-  png_set_compression_mem_level
-  png_set_compression_method
-  png_set_compression_strategy
-  png_set_compression_window_bits
-  png_set_crc_action
-  png_set_dither
-  png_set_error_fn
-  png_set_expand
-  png_set_filler
-  png_set_filter
-  png_set_filter_heuristics
-  png_set_flush
-  png_set_gAMA
-  png_set_gAMA_fixed
-  png_set_gamma
-  png_set_gray_1_2_4_to_8
-  png_set_gray_to_rgb
-  png_set_hIST
-  png_set_iCCP
-  png_set_interlace_handling
-  png_set_invert_alpha
-  png_set_invert_mono
-  png_set_keep_unknown_chunks
-  png_set_oFFs
-  png_set_pCAL
-  png_set_pHYs
-  png_set_packing
-  png_set_packswap
-  png_set_palette_to_rgb
-  png_set_progressive_read_fn
-  png_set_read_fn
-  png_set_read_status_fn
-  png_set_read_user_chunk_fn
-  png_set_read_user_transform_fn
-  png_set_rgb_to_gray
-  png_set_rgb_to_gray_fixed
-  png_set_rows
-  png_set_sBIT
-  png_set_sCAL
-  png_set_sPLT
-  png_set_sRGB
-  png_set_sRGB_gAMA_and_cHRM
-  png_set_shift
-  png_set_sig_bytes
-  png_set_strip_16
-  png_set_strip_alpha
-  png_set_swap
-  png_set_swap_alpha
-  png_set_tIME
-  png_set_tRNS
-  png_set_tRNS_to_alpha
-  png_set_text
-  png_set_unknown_chunk_location
-  png_set_unknown_chunks
-  png_set_user_transform_info
-  png_set_write_fn
-  png_set_write_status_fn
-  png_set_write_user_transform_fn
-  png_sig_cmp
-  png_start_read_image
-  png_warning
-  png_write_chunk
-  png_write_chunk_data
-  png_write_chunk_end
-  png_write_chunk_start
-  png_write_end
-  png_write_flush
-  png_write_image
-  png_write_info
-  png_write_info_before_PLTE
-  png_write_init ; deprecated
-  png_write_png
-  png_write_row
-  png_write_rows
-  png_read_init_2
-  png_write_init_2
-  png_access_version_number
-  png_init_io
-  png_convert_to_rfc1123
-  png_set_invalid
-
-
-; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
-  png_libpng_ver
-  png_pass_start
-  png_pass_inc
-  png_pass_ystart
-  png_pass_yinc
-  png_pass_mask
-  png_pass_dsp_mask
-; png_pass_width
-; png_pass_height
-
-; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
-  png_IHDR
-  png_IDAT
-  png_IEND
-  png_PLTE
-  png_bKGD
-  png_cHRM
-  png_gAMA
-  png_hIST
-  png_iCCP
-  png_iTXt
-  png_oFFs
-  png_pCAL
-  png_pHYs
-  png_sBIT
-  png_sCAL
-  png_sPLT
-  png_sRGB
-  png_tEXt
-  png_tIME
-  png_tRNS
-  png_zTXt
diff --git a/tkimg1.3/libpng/scripts/pngw32.def b/tkimg1.3/libpng/scripts/pngw32.def
deleted file mode 100644
index d846e91..0000000
--- a/tkimg1.3/libpng/scripts/pngw32.def
+++ /dev/null
@@ -1,193 +0,0 @@
-;------------------------------------------
-; LIBPNG module definition file for Windows
-;------------------------------------------
-
-LIBRARY
-DESCRIPTION "PNG image compression library for Windows"
-
-EXPORTS
-;Version 1.2.6rc5
-  png_build_grayscale_palette  @1
-  png_check_sig        @2
-  png_chunk_error      @3
-  png_chunk_warning      @4
-  png_convert_from_struct_tm   @5
-  png_convert_from_time_t    @6
-  png_create_info_struct     @7
-  png_create_read_struct     @8
-  png_create_write_struct    @9
-  png_data_freer    @10
-  png_destroy_info_struct  @11
-  png_destroy_read_struct  @12
-  png_destroy_write_struct  @13
-  png_error    @14
-  png_free      @15
-  png_free_data    @16
-  png_get_IHDR    @17
-  png_get_PLTE    @18
-  png_get_bKGD    @19
-  png_get_bit_depth    @20
-  png_get_cHRM    @21
-  png_get_cHRM_fixed  @22
-  png_get_channels    @23
-  png_get_color_type  @24
-  png_get_compression_buffer_size  @25
-  png_get_compression_type  @26
-  png_get_copyright    @27
-  png_get_error_ptr    @28
-  png_get_filter_type  @29
-  png_get_gAMA    @30
-  png_get_gAMA_fixed  @31
-  png_get_hIST    @32
-  png_get_header_ver  @33
-  png_get_header_version  @34
-  png_get_iCCP    @35
-  png_get_image_height  @36
-  png_get_image_width  @37
-  png_get_interlace_type  @38
-  png_get_io_ptr    @39
-  png_get_libpng_ver  @40
-  png_get_oFFs    @41
-  png_get_pCAL    @42
-  png_get_pHYs    @43
-  png_get_pixel_aspect_ratio  @44
-  png_get_pixels_per_meter  @45
-  png_get_progressive_ptr  @46
-  png_get_rgb_to_gray_status  @47
-  png_get_rowbytes    @48
-  png_get_rows    @49
-  png_get_sBIT    @50
-  png_get_sCAL    @51
-  png_get_sPLT    @52
-  png_get_sRGB    @53
-  png_get_signature    @54
-  png_get_tIME    @55
-  png_get_tRNS    @56
-  png_get_text    @57
-  png_get_unknown_chunks  @58
-  png_get_user_chunk_ptr  @59
-  png_get_user_transform_ptr  @60
-  png_get_valid    @61
-  png_get_x_offset_microns  @62
-  png_get_x_offset_pixels  @63
-  png_get_x_pixels_per_meter  @64
-  png_get_y_offset_microns  @65
-  png_get_y_offset_pixels  @66
-  png_get_y_pixels_per_meter  @67
-  png_malloc    @68
-  png_memcpy_check    @69
-  png_memset_check    @70
-; png_permit_empty_plte is deprecated
-  png_permit_empty_plte  @71
-  png_process_data    @72
-  png_progressive_combine_row  @73
-  png_read_end    @74
-  png_read_image    @75
-  png_read_info    @76
-; png_read_init is deprecated
-  png_read_init    @77
-  png_read_png    @78
-  png_read_row    @79
-  png_read_rows    @80
-  png_read_update_info  @81
-  png_reset_zstream    @82
-  png_set_IHDR    @83
-  png_set_PLTE    @84
-  png_set_bKGD    @85
-  png_set_background  @86
-  png_set_bgr    @87
-  png_set_cHRM    @88
-  png_set_cHRM_fixed  @89
-  png_set_compression_buffer_size  @90
-  png_set_compression_level  @91
-  png_set_compression_mem_level  @92
-  png_set_compression_method  @93
-  png_set_compression_strategy  @94
-  png_set_compression_window_bits  @95
-  png_set_crc_action  @96
-  png_set_dither    @97
-  png_set_error_fn    @98
-  png_set_expand    @99
-  png_set_filler    @100
-  png_set_filter    @101
-  png_set_filter_heuristics  @102
-  png_set_flush    @103
-  png_set_gAMA    @104
-  png_set_gAMA_fixed  @105
-  png_set_gamma    @106
-  png_set_gray_1_2_4_to_8  @107
-  png_set_gray_to_rgb  @108
-  png_set_hIST    @109
-  png_set_iCCP    @110
-  png_set_interlace_handling  @111
-  png_set_invert_alpha  @112
-  png_set_invert_mono  @113
-  png_set_keep_unknown_chunks  @114
-  png_set_oFFs    @115
-  png_set_pCAL    @116
-  png_set_pHYs    @117
-  png_set_packing    @118
-  png_set_packswap    @119
-  png_set_palette_to_rgb  @120
-  png_set_progressive_read_fn  @121
-  png_set_read_fn    @122
-  png_set_read_status_fn  @123
-  png_set_read_user_chunk_fn  @124
-  png_set_read_user_transform_fn  @125
-  png_set_rgb_to_gray  @126
-  png_set_rgb_to_gray_fixed  @127
-  png_set_rows    @128
-  png_set_sBIT    @129
-  png_set_sCAL    @130
-  png_set_sPLT    @131
-  png_set_sRGB    @132
-  png_set_sRGB_gAMA_and_cHRM  @133
-  png_set_shift    @134
-  png_set_sig_bytes    @135
-  png_set_strip_16    @136
-  png_set_strip_alpha  @137
-  png_set_swap    @138
-  png_set_swap_alpha  @139
-  png_set_tIME    @140
-  png_set_tRNS    @141
-  png_set_tRNS_to_alpha  @142
-  png_set_text    @143
-  png_set_unknown_chunk_location  @144
-  png_set_unknown_chunks  @145
-  png_set_user_transform_info  @146
-  png_set_write_fn    @147
-  png_set_write_status_fn  @148
-  png_set_write_user_transform_fn  @149
-  png_sig_cmp    @150
-  png_start_read_image  @151
-  png_warning    @152
-  png_write_chunk    @153
-  png_write_chunk_data  @154
-  png_write_chunk_end  @155
-  png_write_chunk_start  @156
-  png_write_end    @157
-  png_write_flush    @158
-  png_write_image    @159
-  png_write_info    @160
-  png_write_info_before_PLTE  @161
-; png_write_init is deprecated
-  png_write_init    @162
-  png_write_png    @163
-  png_write_row    @164
-  png_write_rows    @165
-; png_read_init_2 and png_write_init_2 are deprecated.
-  png_read_init_2    @166
-  png_write_init_2    @167
-  png_access_version_number  @168
-;  png_sig_bytes    @169
-;  png_libpng_ver    @170
-  png_init_io    @171
-  png_convert_to_rfc1123     @172
-  png_set_invalid  @173
-; Added at version 1.0.12
-; For compatiblity with 1.0.7-1.0.11
-  png_info_init @174
-  png_read_init_3    @175
-  png_write_init_3    @176
-  png_info_init_3 @177
-  png_destroy_struct  @178
diff --git a/tkimg1.3/libpng/scripts/pngw32.rc b/tkimg1.3/libpng/scripts/pngw32.rc
deleted file mode 100644
index e69d732..0000000
--- a/tkimg1.3/libpng/scripts/pngw32.rc
+++ /dev/null
@@ -1,95 +0,0 @@
-#define PNG_VERSION_INFO_ONLY
-
-#include <windows.h>
-#include "../png.h"
-
-#define _QUOTE(x) # x
-#define QUOTE(x) _QUOTE(x)
-
-#define PNG_LIBPNG_DLLFNAME "LIBPNG"
-
-#if defined(DLLFNAME_POSTFIX) && !defined(PRIVATEBUILD) && !defined(SPECIALBUILD)
-#  error PRIVATEBUILD or SPECIALBUILD must be defined as a string describing the type of change brought to the standard library
-#endif /* defined(DLLFNAME_POSTFIX)... */
-
-#if defined(PNG_USE_PNGVCRD)
-#  if !defined(SPECIALBUILD)
-#    define SPECIALBUILD "Use MMX instructions"
-#  endif /* SPECIALBUILD */
-#endif
-
-#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
-#  define VS_DEBUG VS_FF_DEBUG
-#  ifndef DLLFNAME_POSTFIX
-#    define DLLFNAME_POSTFIX "D"
-#  endif /* DLLFNAME_POSTFIX */
-#  ifndef COMMENTS 
-#    define COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
-#  endif /* COMMENTS */
-#else
-#  define VS_DEBUG 0
-#  ifndef DLLFNAME_POSTFIX
-#     define DLLFNAME_POSTFIX
-#  endif /* DLLFNAME_POSTFIX */
-#endif /* defined(DEBUG)... */
-
-#ifdef PRIVATEBUILD
-#  define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
-#else
-#  define VS_PRIVATEBUILD 0
-#endif /* PRIVATEBUILD */
-
-#ifdef SPECIALBUILD
-#  define VS_SPECIALBUILD VS_FF_SPECIALBUILD
-#else
-#  define VS_SPECIALBUILD 0
-#endif /* SPECIALBUILD */
-
-#if ((PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_TYPEMASK) != \
-      PNG_LIBPNG_BUILD_STABLE)
-#  define VS_PRERELEASE VS_FF_PRERELEASE
-#  define VS_PATCHED 0
-#else
-#  define VS_PRERELEASE 0
-#  if (PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_PATCHED)
-#    define VS_PATCHED VS_FF_PATCHED
-#  else
-#    define VS_PATCHED 0
-#  endif
-#endif
-
-VS_VERSION_INFO VERSIONINFO 
-FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_DLL
-FILESUBTYPE VFT2_UNKNOWN
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
-    BEGIN
-#ifdef COMMENTS
-      VALUE "Comments", COMMENTS "\000"
-#endif /* COMMENTS */
-      VALUE "FileDescription", "PNG image compression library\000"
-      VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
-      VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX " (Windows 32 bit)\000"
-      VALUE "LegalCopyright", "\251 1998-2004 Glenn Randers-Pehrson et al.\000"
-      VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX ".DLL\000"
-#ifdef PRIVATEBUILD
-      VALUE "PrivateBuild", PRIVATEBUILD
-#endif /* PRIVATEBUILD */
-      VALUE "ProductName", "LibPNG\000"
-      VALUE "ProductVersion", "1\000"
-#ifdef SPECIALBUILD
-      VALUE "SpecialBuild", SPECIALBUILD
-#endif /* SPECIALBUILD */
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 0x04E4
-  END
-END
diff --git a/tkimg1.3/libpng/scripts/smakefile.ppc b/tkimg1.3/libpng/scripts/smakefile.ppc
deleted file mode 100644
index e5c0278..0000000
--- a/tkimg1.3/libpng/scripts/smakefile.ppc
+++ /dev/null
@@ -1,30 +0,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC       = scppc
-CFLAGS   = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \
-           OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8
-LIBNAME  = libpng.a
-AR       = ppc-amigaos-ar
-AR_FLAGS = cr
-RANLIB   = ppc-amigaos-ranlib
-LDFLAGS  = -r -o
-LDLIBS   =  ../zlib/libzip.a LIB:scppc.a
-LN       = ppc-amigaos-ld
-RM       = delete quiet
-MKDIR    = makedir
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \
-pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o
-
-all: $(LIBNAME) pngtest
-
-$(LIBNAME): $(OBJS)
-            $(AR) $(AR_FLAGS) $@ $(OBJS)
-            $(RANLIB) $@
-
-pngtest: pngtest.o $(LIBNAME)
-        $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \
-LIB:end.o
diff --git a/tkimg1.3/libpng/tcl/ChangeLog b/tkimg1.3/libpng/tcl/ChangeLog
deleted file mode 100644
index 4a1d5e4..0000000
--- a/tkimg1.3/libpng/tcl/ChangeLog
+++ /dev/null
@@ -1,25 +0,0 @@
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* pngtcl.h: Updated the hardwired version information in this
-	  header file.
-
-2004-08-13  Andreas Kupries  <andreask at activestate.com>
-
-	* libpng/tcl: Changed version of wrapper to 1.2.6, synchronized to
-	  version of libpng.
-
-2004-08-12  Andreas Kupries  <andreask at activestate.com>
-
-	* libpng:     Updated libpng from version 1.0.8 to 1.2.6rc5.
-	* libpng/tcl: Updated to handle the new version of libpng.
-
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* Configure and build ok for all platforms available to me at AS.
-
-2002-11-13  Andreas Kupries  <andreask at activestate.com>
-
-	* Start of logging.
-
-	* libpng/tcl/: New directory, packaging of support library for
-	  tcl. Splices the zlib packaging into the code here.
diff --git a/tkimg1.3/libpng/tcl/Makefile.in b/tkimg1.3/libpng/tcl/Makefile.in
deleted file mode 100644
index a461548..0000000
--- a/tkimg1.3/libpng/tcl/Makefile.in
+++ /dev/null
@@ -1,537 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for pngtcl TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 1999 Scriptics Corporation.
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-pngtcl_SOURCES	=		\
-		pngtcl.c		\
-		pngtclStubInit.c	\
-		pngtclStubLib.c	\
-		$(png_Sources)		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-png_Sources	=						\
-		png.c		pngerror.c	pngmem.c	\
-		pngpread.c	pngread.c	pngrio.c	\
-		pngrtran.c	pngrutil.c	pngset.c	\
-		pngtrans.c	pngwio.c	pngwrite.c	\
-		pngwtran.c	pngwutil.c	pngget.c
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "pngtcl_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-pngtcl_OBJECTS		= $(pngtcl_SOURCES:.c=. at OBJEXT@)
-pngtcl_LIB_FILE		= @pngtcl_LIB_FILE@
-
-pngtclstub_OBJECTS	= pngtclStubLib.$(OBJEXT)
-pngtclstub_LIB_FILE	= @pngtclstub_LIB_FILE@
-
-zlibtcl_STUB_LIB_FILE	= @zlibtcl_STUB_LIB_FILE@
-zlibtcl_SRC_PATH	= @zlibtcl_SRC_PATH@
-zlibtcl_VERSION		= @zlibtcl_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	$(srcdir)/pngtcl.h		\
-			$(srcdir)/pngtclDecls.h		\
-			$(srcdir)/pngtclDeclsMask.h	\
-			$(srcdir)/pngtclDeclsUnmask.h
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#PNGTCL_NEW_VAR	= @PNGTCL_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-INCLUDES	= -I$(zlibtcl_SRC_PATH) -I$(srcdir) @TCL_INCLUDES@
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pngtclConfig.sh pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@					\
-		-DZLIBTCL_VERSION=\"$(zlibtcl_VERSION)\"	\
-		-DPACKAGE_NAME=\"$(PACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-	@mkdir -p $(DESTDIR)$(includedir)
-	@echo "Installing header files in $(DESTDIR)$(includedir)"
-	@for i in $(GENERIC_HDRS) ; do \
-	    echo "Installing $$i" ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(TCLSH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo The support package "'pngtcl'" cannot be tested separately.
-	@echo Test the package "'tkimg::png'" to exercise its functionality.
-
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-#	$(testshell)	\
-#		-load 'load ./$(pngtcl_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(pngtcl_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(TCLSH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(TCLSH) $(SCRIPT)
-
-gdb:
-	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-	-rm -f $($(PACKAGE)stub_LIB_FILE)
-	${MAKE_STUB_LIB}
-	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# pngtcl.$(OBJEXT): $(srcdir)/generic/pngtcl.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/pngtcl.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/..
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -f $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-	$(INSTALL_DATA) pngtclConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/pngtcl.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-pngtcl_DECLS = \
-	$(srcdir)/pngtcl.decls
-
-checkstubs:
-	- at for i in `nm -p $(pngtcl_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(pngtcl_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/libpng/tcl/aclocal.m4 b/tkimg1.3/libpng/tcl/aclocal.m4
deleted file mode 100644
index 0b05739..0000000
--- a/tkimg1.3/libpng/tcl/aclocal.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/libpng/tcl/configure b/tkimg1.3/libpng/tcl/configure
deleted file mode 100755
index 8deef6b..0000000
--- a/tkimg1.3/libpng/tcl/configure
+++ /dev/null
@@ -1,5806 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'pngtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-zlibtcl              directory containing zlibtcl configuration (zlibtclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./pngtcl.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=pngtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=2
-PATCHLEVEL=6
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-PNGTCL_VERSION=${VERSION}
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define PNGTCL_VERSION "${PNGTCL_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1438: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1450: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1519: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1593: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1685: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1690 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1718: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1723 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1747: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1762 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1779 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1796 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1836: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1866: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1917: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1960 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1996: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2024: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2063: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2067 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2099: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2157: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2191: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2224: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2250: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2287: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2294 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2309 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2359 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2397: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2422 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2453: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2459 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2488: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2494 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2523: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2529 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2562: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2564 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2611: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2616 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2648: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2685: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2690 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2722: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2727 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2759: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2764 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2792 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2806 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2820 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2841: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2846 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2888 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:2914: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2919 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2951: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2956 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2993: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2998 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3033: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3038 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3083: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3088 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the zlibtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-zlibtcl
-    #
-
-    if test x"${no_zlibtcl}" = x ; then
-	# we reset no_zlibtcl in case something fails here
-	no_zlibtcl=true
-	# Check whether --with-zlibtcl or --without-zlibtcl was given.
-if test "${with_zlibtcl+set}" = set; then
-  withval="$with_zlibtcl"
-  with_zlibtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for zlibtcl configuration""... $ac_c" 1>&6
-echo "configure:3152: checking for zlibtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_zlibtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-zlibtcl was specified.
-	    if test x"${with_zlibtclconfig}" != x ; then
-		if test -f "${with_zlibtclconfig}/zlibtclConfig.sh" ; then
-		    ac_cv_c_zlibtclconfig=`(cd ${with_zlibtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private zlibtcl installation
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in \
-			../zlibtcl \
-			`ls -dr ../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../zlibtcl \
-			`ls -dr ../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../zlibtcl \
-			`ls -dr ../../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../zlibtcl \
-			`ls -dr ${srcdir}/../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-	    zlibtcl_BIN_DIR="# no zlibtcl configs found"
-	    echo "configure: warning: "Cannot find zlibtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_zlibtcl=
-	    zlibtcl_BIN_DIR=${ac_cv_c_zlibtclconfig}
-	    echo "$ac_t""found $zlibtcl_BIN_DIR/zlibtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3221: checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh" >&5
-
-    if test -f "${zlibtcl_BIN_DIR}/zlibtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${zlibtcl_BIN_DIR}/zlibtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the zlibtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable zlibtcl_LIB_SPEC will be set to the value
-    # of zlibtcl_BUILD_LIB_SPEC. An extension should make use of zlibtcl_LIB_SPEC
-    # instead of zlibtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${zlibtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for zlibtcl" 1>&2
-        zlibtcl_LIB_SPEC=${zlibtcl_BUILD_LIB_SPEC}
-        zlibtcl_STUB_LIB_SPEC=${zlibtcl_BUILD_STUB_LIB_SPEC}
-        zlibtcl_STUB_LIB_PATH=${zlibtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of 'zlibtcl'. We
-# need the special 'zlib.h' header which routes through
-# 'zlibtcl.h' to splice the stub definitions into the unchanged
-# sources of png.
-#--------------------------------------------------------------------
-
-case $zlibtcl_SRC_DIR in
-/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
-	;;
-\.)     # SRC_DIR top level, splice with BUILD_PATH
- 	zlibtcl_SRC_PATH=`dirname $zlibtcl_BUILD_STUB_LIB_PATH`
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	zlibtcl_SRC_PATH=`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR
-esac
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    zlibtcl_SRC_PATH="\"`$CYGPATH $zlibtcl_SRC_PATH`\""
-fi
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3289: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_pngtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_pngtcl 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3414: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3422 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3462: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3509: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3517 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3554: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3562 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3596: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3604 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3655: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3660 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3711: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3716 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3769: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:3807: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:3853: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:3867: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:3888: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3917: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3925 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3980: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4137: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4145 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4238: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4246 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4322: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4330 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4461: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4466 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4528: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4533 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4593: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4598 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4630: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4632 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:4967: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 4970 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5023: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5025 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5061: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5063 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5099: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5101 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5243: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_ZLIBTCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:5400: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    #--------------------------------------------------------------------
-    # These are for pngtclConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/pngtcl${VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval pngtcl_LIB_FLAG="-lpngtcl${VERSION}${DBGX}"
-    else
-	eval pngtcl_LIB_FLAG="-lpngtcl`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    pngtcl_BUILD_LIB_SPEC="-L`pwd` ${pngtcl_LIB_FLAG}"
-    pngtcl_LIB_SPEC="-L${pkglibdir} ${pngtcl_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval pngtcl_STUB_LIB_FLAG="-lpngtclstub${VERSION}${DBGX}"
-    else
-	eval pngtcl_STUB_LIB_FLAG="-lpngtclstub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    pngtcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${pngtcl_STUB_LIB_FLAG}"
-    pngtcl_STUB_LIB_SPEC="-L${pkglibdir} ${pngtcl_STUB_LIB_FLAG}"
-    pngtcl_BUILD_STUB_LIB_PATH="`pwd`/${pngtclstub_LIB_FILE}"
-    pngtcl_STUB_LIB_PATH="${pkglibdir}/${pngtclstub_LIB_FILE}"
-
-    
-    
-    
-    
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl pngtclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@PNGTCL_VERSION@%$PNGTCL_VERSION%g
-s%@pngtcl_LIB_FILE@%$pngtcl_LIB_FILE%g
-s%@pngtclstub_LIB_FILE@%$pngtclstub_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@zlibtcl_VERSION@%$zlibtcl_VERSION%g
-s%@zlibtcl_SRC_DIR@%$zlibtcl_SRC_DIR%g
-s%@zlibtcl_LIB_FILE@%$zlibtcl_LIB_FILE%g
-s%@zlibtcl_LIB_SPEC@%$zlibtcl_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_FILE@%$zlibtcl_STUB_LIB_FILE%g
-s%@zlibtcl_STUB_LIB_SPEC@%$zlibtcl_STUB_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_PATH@%$zlibtcl_STUB_LIB_PATH%g
-s%@zlibtcl_SRC_PATH@%$zlibtcl_SRC_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@pngtcl_BUILD_LIB_SPEC@%$pngtcl_BUILD_LIB_SPEC%g
-s%@pngtcl_LIB_SPEC@%$pngtcl_LIB_SPEC%g
-s%@pngtcl_BUILD_STUB_LIB_SPEC@%$pngtcl_BUILD_STUB_LIB_SPEC%g
-s%@pngtcl_STUB_LIB_SPEC@%$pngtcl_STUB_LIB_SPEC%g
-s%@pngtcl_BUILD_STUB_LIB_PATH@%$pngtcl_BUILD_STUB_LIB_PATH%g
-s%@pngtcl_STUB_LIB_PATH@%$pngtcl_STUB_LIB_PATH%g
-s%@MAJOR_VERSION@%$MAJOR_VERSION%g
-s%@MINOR_VERSION@%$MINOR_VERSION%g
-s%@PATCHLEVEL@%$PATCHLEVEL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl pngtclConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libpng/tcl/configure.in b/tkimg1.3/libpng/tcl/configure.in
deleted file mode 100644
index d92c27c..0000000
--- a/tkimg1.3/libpng/tcl/configure.in
+++ /dev/null
@@ -1,228 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'pngtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./pngtcl.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=pngtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=2
-PATCHLEVEL=6
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-PNGTCL_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(PNGTCL_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(pngtcl_LIB_FILE)
-AC_SUBST(pngtclstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(PNGTCL_VERSION, "${PNGTCL_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(zlibtcl)
-TEA_LOAD_CONFIG(zlibtcl)
-AC_SUBST(zlibtcl_VERSION)
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of 'zlibtcl'. We
-# need the special 'zlib.h' header which routes through
-# 'zlibtcl.h' to splice the stub definitions into the unchanged
-# sources of png.
-#--------------------------------------------------------------------
-
-case $zlibtcl_SRC_DIR in
-/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	zlibtcl_SRC_PATH=`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR
-esac
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    zlibtcl_SRC_PATH="\"`$CYGPATH $zlibtcl_SRC_PATH`\""
-fi
-
-AC_SUBST(zlibtcl_SRC_PATH)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_pngtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_pngtcl)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_ZLIBTCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_EXPORT_CONFIG(pngtcl)
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl pngtclConfig.sh])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libpng/tcl/pkgIndex.tcl.in b/tkimg1.3/libpng/tcl/pkgIndex.tcl.in
deleted file mode 100644
index 88fbb59..0000000
--- a/tkimg1.3/libpng/tcl/pkgIndex.tcl.in
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @pngtcl_LIB_FILE@]]
-
-# distinguish static and dyn variants, later.
-if {0} {
-package ifneeded @PACKAGE@ @VERSION@ [string map [list @dir@ $dir] \
-"if {[catch {load [file join @dir@ @pngtcl_LIB_FILE@]}]} {
-    load [file join @dir@ @pngtcl_LIB_FILE@]
-}"]
-}
diff --git a/tkimg1.3/libpng/tcl/png.h b/tkimg1.3/libpng/tcl/png.h
deleted file mode 100644
index c865be0..0000000
--- a/tkimg1.3/libpng/tcl/png.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
- * Redirect the png definitions through the stub definitions of the
- * binding. A wrapper for a support library using png has to use this
- * header to ensure usage of the stub macros during the compilation of
- * the support library itself. In this way we avoid the need for
- * changing the original sources.
- *
- * This header has to be avoided when building the libpng wrapper itself.
- */
-
-#include "pngtclDecls.h"
diff --git a/tkimg1.3/libpng/tcl/pngtcl.c b/tkimg1.3/libpng/tcl/pngtcl.c
deleted file mode 100644
index e879f3e..0000000
--- a/tkimg1.3/libpng/tcl/pngtcl.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * pngtcl.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: pngtcl.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- */
-
-#include "zlibtcl.h"
-#include "pngtcl.h"
-
-#define TCL_DOES_STUBS \
-    (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
-    (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
-
-/*
- * Declarations for externally visible functions.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_pngtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_PNGTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-EXTERN int Pngtcl_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Pngtcl_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-/*
- *----------------------------------------------------------------------------
- *
- * Pngtcl_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Pngtcl_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-#if TCL_DOES_STUBS
-  extern PngtclStubs pngtclStubs;
-#endif
-
-#ifdef USE_TCL_STUBS
-  if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-    return TCL_ERROR;
-  }
-#endif
-#ifdef USE_ZLIBTCL_STUBS
-  if (Zlibtcl_InitStubs(interp, ZLIBTCL_VERSION, 1) == NULL) {
-    return TCL_ERROR;
-  }
-#endif
-
-#if TCL_DOES_STUBS
-  if (Tcl_PkgProvideEx(interp, PACKAGE_NAME, PNGTCL_VERSION,
-		       (ClientData) &pngtclStubs) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#else
-  if (Tcl_PkgProvide(interp, PACKAGE_NAME, PNGTCL_VERSION) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#endif
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Pngtcl_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Pngtcl_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Pngtcl_Init(interp);
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Pngtcl_XXX --
- *
- *  Wrappers around the zlib functionality.
- *
- * Results:
- *  Depends on function.
- *
- * Side effects:
- *  Depends on function.
- *
- *----------------------------------------------------------------------------
- */
-
-/*
- * No wrappers are required. Due to intelligent definition of the stub
- * table using the function names of the libz sources the stub table
- * contains jumps to the actual functionality.
- */
diff --git a/tkimg1.3/libpng/tcl/pngtcl.decls b/tkimg1.3/libpng/tcl/pngtcl.decls
deleted file mode 100644
index b5e3abf..0000000
--- a/tkimg1.3/libpng/tcl/pngtcl.decls
+++ /dev/null
@@ -1,1016 +0,0 @@
-# pngtcl.decls -- -*- tcl -*-
-#
-# This file contains the declarations for all supported public functions
-# that are exported by the PNGTCL library via the stubs table. This file
-# is used to generate the pngtclDecls.h/pngtclStubsLib.c/pngtclStubsInit.c
-# files.
-#	
-
-# Declare each of the functions in the public BLT interface.  Note that
-# the an index should never be reused for a different function in order
-# to preserve backwards compatibility.
-
-library pngtcl
-
-# Define the PNGTCL interface:
-
-interface pngtcl
-#hooks {}
-
-#########################################################################
-###  PNG API
-
-declare 0 generic {
-    png_uint_32 png_access_version_number (void)
-}
-declare 1 generic {
-    void png_set_sig_bytes (png_structp png_ptr, int num_bytes)
-}
-declare 2 generic {
-    int png_sig_cmp (png_bytep sig, png_size_t start, png_size_t num_to_check)
-}
-declare 3 generic {
-    int png_check_sig (png_bytep sig, int num)
-}
-declare 4 generic {
-    png_structp png_create_read_struct (png_const_charp user_png_ver,
-    	png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
-}
-declare 5 generic {
-    png_structp png_create_write_struct (png_const_charp user_png_ver,
-    	png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
-}
-declare 6 generic {
-    png_uint_32 png_get_compression_buffer_size (png_structp png_ptr)
-}
-declare 7 generic {
-    void png_set_compression_buffer_size (png_structp png_ptr, png_uint_32 size)
-}
-declare 8 generic {
-    int png_reset_zstream (png_structp png_ptr)
-}
-declare 9 generic {!PNG_USER_MEM_SUPPORTED} {
-    png_structp png_create_read_struct_2 (png_const_charp user_png_ver,
-    	png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn,
-    	png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)
-}
-declare 10 generic {!PNG_USER_MEM_SUPPORTED} {
-    png_structp png_create_write_struct_2 (png_const_charp user_png_ver,
-    	png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn,
-    	png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)
-}
-declare 11 generic {
-    void png_write_chunk (png_structp png_ptr, png_bytep chunk_name,
-    	png_bytep data, png_size_t length)
-}
-declare 12 generic {
-    void png_write_chunk_start (png_structp png_ptr, png_bytep chunk_name,
-    	png_uint_32 length)
-}
-declare 13 generic {
-    void png_write_chunk_data (png_structp png_ptr, png_bytep data,
-    	png_size_t length)
-}
-declare 14 generic {
-    void png_write_chunk_end (png_structp png_ptr)
-}
-declare 15 generic {
-    png_infop png_create_info_struct (png_structp png_ptr)
-}
-declare 16 generic {
-    void png_info_init (png_infop info_ptr)
-}
-declare 17 generic {
-    void png_write_info_before_PLTE (png_structp png_ptr, png_infop info_ptr)
-}
-declare 18 generic {
-    void png_write_info (png_structp png_ptr, png_infop info_ptr)
-}
-declare 19 generic {
-    void png_read_info (png_structp png_ptr, png_infop info_ptr)
-}
-declare 20 generic {!PNG_TIME_RFC1123_SUPPORTED} {
-    png_charp png_convert_to_rfc1123 (png_structp png_ptr, png_timep ptime)
-}
-declare 21 generic {_WIN32_WCE !PNG_WRITE_tIME_SUPPORTED} {
-    void png_convert_from_struct_tm (png_timep ptime, struct tm FAR * ttime)
-}
-declare 22 generic {_WIN32_WCE !PNG_WRITE_tIME_SUPPORTED} {
-    void png_convert_from_time_t (png_timep ptime, time_t ttime)
-}
-declare 23 generic {!PNG_READ_EXPAND_SUPPORTED} {
-    void png_set_expand (png_structp png_ptr)
-}
-declare 24 generic {!PNG_READ_EXPAND_SUPPORTED} {
-    void png_set_gray_1_2_4_to_8 (png_structp png_ptr)
-}
-declare 25 generic {!PNG_READ_EXPAND_SUPPORTED} {
-    void png_set_palette_to_rgb (png_structp png_ptr)
-}
-declare 26 generic {!PNG_READ_EXPAND_SUPPORTED} {
-    void png_set_tRNS_to_alpha (png_structp png_ptr)
-}
-declare 27 generic {{!PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED}} {
-    void png_set_bgr (png_structp png_ptr)
-}
-declare 28 generic {!PNG_READ_GRAY_TO_RGB_SUPPORTED} {
-    void png_set_gray_to_rgb (png_structp png_ptr)
-}
-declare 29 generic {!PNG_READ_RGB_TO_GRAY_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_rgb_to_gray (png_structp png_ptr, int error_action, double red, double green)
-}
-declare 30 generic {!PNG_READ_RGB_TO_GRAY_SUPPORTED} {
-    void png_set_rgb_to_gray_fixed (png_structp png_ptr, int error_action,
-    	png_fixed_point red, png_fixed_point green)
-}
-declare 31 generic {!PNG_READ_RGB_TO_GRAY_SUPPORTED} {
-    png_byte png_get_rgb_to_gray_status (png_structp png_ptr)
-}
-declare 32 generic {
-    void png_build_grayscale_palette (int bit_depth, png_colorp palette)
-}
-declare 33 generic {!PNG_READ_STRIP_ALPHA_SUPPORTED} {
-    void png_set_strip_alpha (png_structp png_ptr)
-}
-declare 34 generic {{!PNG_READ_SWAP_ALPHA_SUPPORTED !PNG_WRITE_SWAP_ALPHA_SUPPORTED}} {
-    void png_set_swap_alpha (png_structp png_ptr)
-}
-declare 35 generic {{!PNG_READ_INVERT_ALPHA_SUPPORTED !PNG_WRITE_INVERT_ALPHA_SUPPORTED}} {
-    void png_set_invert_alpha (png_structp png_ptr)
-}
-declare 36 generic {{!PNG_READ_FILLER_SUPPORTED !PNG_WRITE_FILLER_SUPPORTED}} {
-    void png_set_filler (png_structp png_ptr, png_uint_32 filler, int flags)
-}
-declare 37 generic {{!PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED}} {
-    void png_set_swap (png_structp png_ptr)
-}
-declare 38 generic {{!PNG_READ_PACK_SUPPORTED !PNG_WRITE_PACK_SUPPORTED}} {
-    void png_set_packing (png_structp png_ptr)
-}
-declare 39 generic {{!PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED}} {
-    void png_set_packswap (png_structp png_ptr)
-}
-declare 40 generic {{!PNG_READ_SHIFT_SUPPORTED !PNG_WRITE_SHIFT_SUPPORTED}} {
-    void png_set_shift (png_structp png_ptr, png_color_8p true_bits)
-}
-declare 41 generic {{!PNG_READ_INTERLACING_SUPPORTED !PNG_WRITE_INTERLACING_SUPPORTED}} {
-    int png_set_interlace_handling (png_structp png_ptr)
-}
-declare 42 generic {{!PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED}} {
-    void png_set_invert_mono (png_structp png_ptr)
-}
-declare 43 generic {!PNG_READ_BACKGROUND_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_background (png_structp png_ptr, png_color_16p background_color,
-    	int background_gamma_code, int need_expand, double background_gamma)
-}
-declare 44 generic {!PNG_READ_16_TO_8_SUPPORTED} {
-    void png_set_strip_16 (png_structp png_ptr)
-}
-declare 45 generic {!PNG_READ_DITHER_SUPPORTED} {
-    void png_set_dither (png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither)
-}
-declare 46 generic {!PNG_READ_GAMMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_gamma (png_structp png_ptr, double screen_gamma, double default_file_gamma)
-}
-declare 47 generic {{!PNG_READ_EMPTY_PLTE_SUPPORTED !PNG_WRITE_EMPTY_PLTE_SUPPORTED}} {
-    void png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
-}
-declare 48 generic {!PNG_WRITE_FLUSH_SUPPORTED} {
-    void png_set_flush (png_structp png_ptr, int nrows)
-}
-declare 49 generic {!PNG_WRITE_FLUSH_SUPPORTED} {
-    void png_write_flush (png_structp png_ptr)
-}
-declare 50 generic {
-    void png_start_read_image (png_structp png_ptr)
-}
-declare 51 generic {
-    void png_read_update_info (png_structp png_ptr, png_infop info_ptr)
-}
-declare 52 generic {
-    void png_read_rows (png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)
-}
-declare 53 generic {
-    void png_read_row (png_structp png_ptr, png_bytep row, png_bytep display_row)
-}
-declare 54 generic {
-    void png_read_image (png_structp png_ptr, png_bytepp image)
-}
-declare 55 generic {
-    void png_write_row (png_structp png_ptr, png_bytep row)
-}
-declare 56 generic {
-    void png_write_rows (png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)
-}
-declare 57 generic {
-    void png_write_image (png_structp png_ptr, png_bytepp image)
-}
-declare 58 generic {
-    void png_write_end (png_structp png_ptr, png_infop info_ptr)
-}
-declare 59 generic {
-    void png_read_end (png_structp png_ptr, png_infop info_ptr)
-}
-declare 60 generic {
-    void png_destroy_info_struct (png_structp png_ptr, png_infopp info_ptr_ptr)
-}
-declare 61 generic {
-    void png_destroy_read_struct (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
-    	png_infopp end_info_ptr_ptr)
-}
-declare 62 generic {
-    void png_read_destroy (png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
-}
-declare 63 generic {
-    void png_destroy_write_struct (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
-}
-if 0 {
-    # Declared, not defined
-    declare 64 generic {
-	void png_write_destroy_info (png_infop info_ptr)
-    }
-}
-declare 65 generic {
-    void png_write_destroy (png_structp png_ptr)
-}
-declare 66 generic {
-    void png_set_crc_action (png_structp png_ptr, int crit_action, int ancil_action)
-}
-declare 67 generic {
-    void png_set_filter (png_structp png_ptr, int method, int filters)
-}
-declare 68 generic {!PNG_WRITE_WEIGHTED_FILTER_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_filter_heuristics (png_structp png_ptr, int heuristic_method,
-    	int num_weights, png_doublep filter_weights, png_doublep filter_costs)
-}
-declare 69 generic {
-    void png_set_compression_level (png_structp png_ptr, int level)
-}
-declare 70 generic {
-    void png_set_compression_mem_level (png_structp png_ptr, int mem_level)
-}
-declare 71 generic {
-    void png_set_compression_strategy (png_structp png_ptr, int strategy)
-}
-declare 72 generic {
-    void png_set_compression_window_bits (png_structp png_ptr, int window_bits)
-}
-declare 73 generic {
-    void png_set_compression_method (png_structp png_ptr, int method)
-}
-declare 74 generic {PNG_NO_STDIO} {
-    void png_init_io (png_structp png_ptr, png_FILE_p fp)
-}
-declare 75 generic {
-    void png_set_error_fn (png_structp png_ptr, png_voidp error_ptr,
-    	png_error_ptr error_fn, png_error_ptr warning_fn)
-}
-declare 76 generic {
-    png_voidp png_get_error_ptr (png_structp png_ptr)
-}
-declare 77 generic {
-    void png_set_write_fn (png_structp png_ptr, png_voidp io_ptr,
-    	png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
-}
-declare 78 generic {
-    void png_set_read_fn (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)
-}
-declare 79 generic {
-    png_voidp png_get_io_ptr (png_structp png_ptr)
-}
-declare 80 generic {
-    void png_set_read_status_fn (png_structp png_ptr, png_read_status_ptr read_row_fn)
-}
-declare 81 generic {
-    void png_set_write_status_fn (png_structp png_ptr, png_write_status_ptr write_row_fn)
-}
-declare 82 generic {!PNG_USER_MEM_SUPPORTED} {
-    void png_set_mem_fn (png_structp png_ptr, png_voidp mem_ptr,
-    	png_malloc_ptr malloc_fn, png_free_ptr free_fn)
-}
-declare 83 generic {!PNG_USER_MEM_SUPPORTED} {
-    png_voidp png_get_mem_ptr (png_structp png_ptr)
-}
-declare 84 generic {{!PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED}} {
-    void png_set_read_user_transform_fn (png_structp png_ptr,
-    	png_user_transform_ptr read_user_transform_fn)
-}
-declare 85 generic {{!PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED}} {
-    void png_set_write_user_transform_fn (png_structp png_ptr,
-    	png_user_transform_ptr write_user_transform_fn)
-}
-declare 86 generic {{!PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED}} {
-    void png_set_user_transform_info (png_structp png_ptr, png_voidp user_transform_ptr,
-    	int user_transform_depth, int user_transform_channels)
-}
-declare 87 generic {{!PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED}} {
-    png_voidp png_get_user_transform_ptr (png_structp png_ptr)
-}
-declare 88 generic {!PNG_READ_USER_CHUNKS_SUPPORTED} {
-    void png_set_read_user_chunk_fn (png_structp png_ptr, png_voidp user_chunk_ptr,
-    	png_user_chunk_ptr read_user_chunk_fn)
-}
-declare 89 generic {!PNG_READ_USER_CHUNKS_SUPPORTED} {
-    png_voidp png_get_user_chunk_ptr (png_structp png_ptr)
-}
-declare 90 generic {!PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_set_progressive_read_fn (png_structp png_ptr, png_voidp progressive_ptr,
-    	png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
-    	png_progressive_end_ptr end_fn)
-}
-declare 91 generic {!PNG_PROGRESSIVE_READ_SUPPORTED} {
-    png_voidp png_get_progressive_ptr (png_structp png_ptr)
-}
-declare 92 generic {!PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_process_data (png_structp png_ptr, png_infop info_ptr,
-    	png_bytep buffer, png_size_t buffer_size)
-}
-declare 93 generic {!PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_progressive_combine_row (png_structp png_ptr, png_bytep old_row,
-    	png_bytep new_row)
-}
-declare 94 generic {
-    png_voidp png_malloc (png_structp png_ptr, png_uint_32 size)
-}
-declare 95 generic {
-    void png_free (png_structp png_ptr, png_voidp ptr)
-}
-declare 96 generic {
-    void png_free_data (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)
-}
-declare 97 generic {!PNG_FREE_ME_SUPPORTED} {
-    void png_data_freer (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)
-}
-declare 98 generic {!PNG_USER_MEM_SUPPORTED} {
-    png_voidp png_malloc_default (png_structp png_ptr, png_uint_32 size)
-}
-declare 99 generic {!PNG_USER_MEM_SUPPORTED} {
-    void png_free_default (png_structp png_ptr, png_voidp ptr)
-}
-declare 100 generic {
-    png_voidp png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, png_uint_32 size)
-}
-declare 101 generic {
-    png_voidp png_memset_check (png_structp png_ptr, png_voidp s1, int value, png_uint_32 size)
-}
-declare 102 generic {!USE_FAR_KEYWORD} {
-    void *png_far_to_near (png_structp png_ptr,png_voidp ptr, int check)
-}
-declare 103 generic {
-    void png_error (png_structp png_ptr, png_const_charp error)
-}
-declare 104 generic {
-    void png_chunk_error (png_structp png_ptr, png_const_charp error)
-}
-declare 105 generic {
-    void png_warning (png_structp png_ptr, png_const_charp message)
-}
-declare 106 generic {
-    void png_chunk_warning (png_structp png_ptr, png_const_charp message)
-}
-declare 107 generic {
-    png_uint_32 png_get_valid (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
-}
-declare 108 generic {
-    png_uint_32 png_get_rowbytes (png_structp png_ptr, png_infop info_ptr)
-}
-declare 109 generic {!PNG_INFO_IMAGE_SUPPORTED} {
-    png_bytepp png_get_rows (png_structp png_ptr, png_infop info_ptr)
-}
-declare 110 generic {!PNG_INFO_IMAGE_SUPPORTED} {
-    void png_set_rows (png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
-}
-declare 111 generic {
-    png_byte png_get_channels (png_structp png_ptr, png_infop info_ptr)
-}
-declare 112 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_uint_32 png_get_image_width (png_structp png_ptr, png_infop info_ptr)
-}
-declare 113 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_uint_32 png_get_image_height (png_structp png_ptr, png_infop info_ptr)
-}
-declare 114 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_byte png_get_bit_depth (png_structp png_ptr, png_infop info_ptr)
-}
-declare 115 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_byte png_get_color_type (png_structp png_ptr, png_infop info_ptr)
-}
-declare 116 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_byte png_get_filter_type (png_structp png_ptr, png_infop info_ptr)
-}
-declare 117 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_byte png_get_interlace_type (png_structp png_ptr, png_infop info_ptr)
-}
-declare 118 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_byte png_get_compression_type (png_structp png_ptr, png_infop info_ptr)
-}
-declare 119 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_uint_32 png_get_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
-}
-declare 120 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_uint_32 png_get_x_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
-}
-declare 121 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_uint_32 png_get_y_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
-}
-declare 122 generic {!PNG_EASY_ACCESS_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    float png_get_pixel_aspect_ratio (png_structp png_ptr, png_infop info_ptr)
-}
-declare 123 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_int_32 png_get_x_offset_pixels (png_structp png_ptr, png_infop info_ptr)
-}
-declare 124 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_int_32 png_get_y_offset_pixels (png_structp png_ptr, png_infop info_ptr)
-}
-declare 125 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_int_32 png_get_x_offset_microns (png_structp png_ptr, png_infop info_ptr)
-}
-declare 126 generic {!PNG_EASY_ACCESS_SUPPORTED} {
-    png_int_32 png_get_y_offset_microns (png_structp png_ptr, png_infop info_ptr)
-}
-declare 127 generic {
-    png_bytep png_get_signature (png_structp png_ptr, png_infop info_ptr)
-}
-declare 128 generic {!PNG_READ_bKGD_SUPPORTED} {
-    png_uint_32 png_get_bKGD (png_structp png_ptr, png_infop info_ptr, png_color_16p* background)
-}
-declare 129 generic {!PNG_bKGD_SUPPORTED} {
-    void png_set_bKGD (png_structp png_ptr, png_infop info_ptr, png_color_16p background)
-}
-declare 130 generic {!PNG_READ_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    png_uint_32 png_get_cHRM (png_structp png_ptr, png_infop info_ptr,
-    	double *white_x, double *white_y, double *red_x, double *red_y,
-    	double *green_x, double *green_y, double *blue_x, double *blue_y)
-}
-declare 131 generic {!PNG_READ_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    png_uint_32 png_get_cHRM_fixed (png_structp png_ptr, png_infop info_ptr,
-    	png_fixed_point *int_white_x, png_fixed_point *int_white_y, png_fixed_point *int_red_x,
-    	png_fixed_point *int_red_y, png_fixed_point *int_green_x, png_fixed_point *int_green_y,
-    	png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)
-}
-declare 132 generic {!PNG_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_cHRM (png_structp png_ptr, png_infop info_ptr, double white_x,
-    	double white_y, double red_x, double red_y, double green_x, double green_y,
-    	double blue_x, double blue_y)
-}
-declare 133 generic {!PNG_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    void png_set_cHRM_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point int_white_x,
-    	png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y,
-    	png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
-    	png_fixed_point int_blue_y)
-}
-declare 134 generic {!PNG_READ_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    png_uint_32 png_get_gAMA (png_structp png_ptr, png_infop info_ptr, double *file_gamma)
-}
-declare 135 generic {!PNG_READ_gAMA_SUPPORTED} {
-    png_uint_32 png_get_gAMA_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point* int_file_gamma)
-}
-declare 136 generic {!PNG_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_gAMA (png_structp png_ptr, png_infop info_ptr, double file_gamma)
-}
-declare 137 generic {!PNG_gAMA_SUPPORTED} {
-    void png_set_gAMA_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)
-}
-declare 138 generic {!PNG_READ_hIST_SUPPORTED} {
-    png_uint_32 png_get_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
-}
-declare 139 generic {!PNG_hIST_SUPPORTED} {
-    void png_set_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
-}
-declare 140 generic {
-    png_uint_32 png_get_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_type, int *compression_type, int *filter_type)
-}
-declare 141 generic {
-    void png_set_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
-}
-declare 142 generic {!PNG_READ_oFFs_SUPPORTED} {
-    png_uint_32 png_get_oFFs (png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
-}
-declare 143 generic {!PNG_oFFs_SUPPORTED} {
-    void png_set_oFFs (png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)
-}
-declare 144 generic {!PNG_READ_pCAL_SUPPORTED} {
-    png_uint_32 png_get_pCAL (png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)
-}
-declare 145 generic {!PNG_pCAL_SUPPORTED} {
-    void png_set_pCAL (png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
-}
-declare 146 generic {!PNG_READ_pHYs_SUPPORTED} {
-    png_uint_32 png_get_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
-}
-declare 147 generic {!PNG_pHYs_SUPPORTED} {
-    void png_set_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)
-}
-declare 148 generic {
-    png_uint_32 png_get_PLTE (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette)
-}
-declare 149 generic {
-    void png_set_PLTE (png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)
-}
-
-declare 150 generic {!PNG_READ_sBIT_SUPPORTED} {
-    png_uint_32 png_get_sBIT (png_structp png_ptr, png_infop info_ptr, png_color_8p* sig_bit)
-}
-declare 151 generic {!PNG_sBIT_SUPPORTED} {
-    void png_set_sBIT (png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)
-}
-declare 152 generic {!PNG_READ_sRGB_SUPPORTED} {
-    png_uint_32 png_get_sRGB (png_structp png_ptr, png_infop info_ptr, int *intent)
-}
-declare 153 generic {!PNG_sRGB_SUPPORTED} {
-    void png_set_sRGB (png_structp png_ptr, png_infop info_ptr, int intent)
-}
-declare 154 generic {!PNG_sRGB_SUPPORTED} {
-    void png_set_sRGB_gAMA_and_cHRM (png_structp png_ptr, png_infop info_ptr, int intent)
-}
-declare 155 generic {!PNG_READ_iCCP_SUPPORTED} {
-    png_uint_32 png_get_iCCP (png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen)
-}
-declare 156 generic {!PNG_iCCP_SUPPORTED} {
-    void png_set_iCCP (png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)
-}
-declare 157 generic {!PNG_READ_sPLT_SUPPORTED} {
-    png_uint_32 png_get_sPLT (png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries)
-}
-declare 158 generic {!PNG_sPLT_SUPPORTED} {
-    void png_set_sPLT (png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)
-}
-declare 159 generic {!PNG_READ_TEXT_SUPPORTED} {
-    png_uint_32 png_get_text (png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text)
-}
-declare 160 generic {!PNG_TEXT_SUPPORTED} {
-    void png_set_text (png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)
-}
-declare 161 generic {!PNG_READ_tIME_SUPPORTED} {
-    png_uint_32 png_get_tIME (png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
-}
-declare 162 generic {!PNG_tIME_SUPPORTED} {
-    void png_set_tIME (png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
-}
-declare 163 generic {!PNG_READ_tRNS_SUPPORTED} {
-    png_uint_32 png_get_tRNS (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values)
-}
-declare 164 generic {!PNG_tRNS_SUPPORTED} {
-    void png_set_tRNS (png_structp png_ptr, png_infop info_ptr, png_bytep trans, int num_trans, png_color_16p trans_values)
-}
-declare 165 generic {!PNG_READ_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    png_uint_32 png_get_sCAL (png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height)
-}
-declare 166 generic {!PNG_READ_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    png_uint_32 png_get_sCAL_s (png_structp png_ptr, png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)
-}
-declare 167 generic {!PNG_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_set_sCAL (png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)
-}
-declare 168 generic {!PNG_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    void png_set_sCAL_s (png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)
-}
-declare 169 generic {!PNG_UNKNOWN_CHUNKS_SUPPORTED} {
-    void png_set_keep_unknown_chunks (png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks)
-}
-declare 170 generic {!PNG_UNKNOWN_CHUNKS_SUPPORTED} {
-    void png_set_unknown_chunks (png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
-}
-declare 171 generic {!PNG_UNKNOWN_CHUNKS_SUPPORTED} {
-    void png_set_unknown_chunk_location (png_structp png_ptr, png_infop info_ptr, int chunk, int location)
-}
-declare 172 generic {!PNG_UNKNOWN_CHUNKS_SUPPORTED} {
-    png_uint_32 png_get_unknown_chunks (png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)
-}
-declare 173 generic {
-    void png_set_invalid (png_structp png_ptr, png_infop info_ptr, int mask)
-}
-declare 174 generic {!PNG_INFO_IMAGE_SUPPORTED} {
-    void png_read_png (png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)
-}
-declare 175 generic {!PNG_INFO_IMAGE_SUPPORTED} {
-    void png_write_png (png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)
-}
-declare 176 generic {!PNG_INTERNAL PNG_USE_GLOBAL_ARRAYS {PNG_NO_EXTERN !PNG_ALWAYS_EXTERN}} {
-    png_bytep png_sig_bytes (void)
-}
-declare 177 generic {
-    png_charp png_get_copyright (png_structp png_ptr)
-}
-declare 178 generic {
-    png_charp png_get_header_ver (png_structp png_ptr)
-}
-declare 179 generic {
-    png_charp png_get_header_version (png_structp png_ptr)
-}
-declare 180 generic {
-    png_charp png_get_libpng_ver (png_structp png_ptr)
-}
-declare 181 generic {!PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED {!PNG_READ_pCAL_SUPPORTED !PNG_READ_oFFs_SUPPORTED}} {
-    png_int_32 png_get_int_32 (png_bytep buf)
-}
-declare 182 generic {!PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED} {
-    png_uint_32 png_get_uint_32 (png_bytep buf)
-}
-declare 183 generic {!PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED} {
-    png_uint_16 png_get_uint_16 (png_bytep buf)
-}
-declare 184 generic {!PNG_INTERNAL} {
-    void png_read_init (png_structp png_ptr)
-}
-declare 185 generic {!PNG_INTERNAL} {
-    void png_read_init_2 (png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size)
-}
-declare 186 generic {!PNG_INTERNAL} {
-    void png_write_init (png_structp png_ptr)
-}
-declare 187 generic {!PNG_INTERNAL} {
-    void png_write_init_2 (png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size)
-}
-declare 188 generic {!PNG_INTERNAL} {
-    png_voidp png_create_struct (int type)
-}
-declare 189 generic {!PNG_INTERNAL} {
-    void png_destroy_struct (png_voidp struct_ptr)
-}
-declare 190 generic {!PNG_INTERNAL} {
-    png_voidp png_create_struct_2 (int type, png_malloc_ptr malloc_fn)
-}
-declare 191 generic {!PNG_INTERNAL} {
-    void png_destroy_struct_2 (png_voidp struct_ptr, png_free_ptr free_fn)
-}
-declare 192 generic {!PNG_INTERNAL} {
-    void png_info_destroy (png_structp png_ptr, png_infop info_ptr)
-}
-declare 193 generic {!PNG_INTERNAL} {
-    voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size)
-}
-declare 194 generic {!PNG_INTERNAL} {
-    void png_zfree (voidpf png_ptr, voidpf ptr)
-}
-declare 195 generic {!PNG_INTERNAL} {
-    void png_reset_crc (png_structp png_ptr)
-}
-declare 196 generic {!PNG_INTERNAL} {
-    void png_write_data (png_structp png_ptr, png_bytep data, png_size_t length)
-}
-declare 197 generic {!PNG_INTERNAL} {
-    void png_read_data (png_structp png_ptr, png_bytep data, png_size_t length)
-}
-declare 198 generic {!PNG_INTERNAL} {
-    void png_crc_read (png_structp png_ptr, png_bytep buf, png_size_t length)
-}
-declare 199 generic {!PNG_INTERNAL {!PNG_READ_zTXt_SUPPORTED !PNG_READ_iTXt_SUPPORTED !PNG_READ_iCCP_SUPPORTED !PNG_READ_sPLT_SUPPORTED}} {
-    png_charp png_decompress_chunk (png_structp png_ptr, int comp_type, png_charp chunkdata, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length)
-}
-declare 200 generic {!PNG_INTERNAL} {
-    int png_crc_finish (png_structp png_ptr, png_uint_32 skip)
-}
-declare 201 generic {!PNG_INTERNAL} {
-    int png_crc_error (png_structp png_ptr)
-}
-declare 202 generic {!PNG_INTERNAL} {
-    void png_calculate_crc (png_structp png_ptr, png_bytep ptr, png_size_t length)
-}
-declare 203 generic {!PNG_INTERNAL !PNG_WRITE_FLUSH_SUPPORTED} {
-    void png_flush (png_structp png_ptr)
-}
-declare 204 generic {!PNG_INTERNAL} {
-    void png_save_uint_32 (png_bytep buf, png_uint_32 i)
-}
-declare 205 generic {!PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED} {
-    void png_save_int_32 (png_bytep buf, png_int_32 i)
-}
-declare 206 generic {!PNG_INTERNAL} {
-    void png_save_uint_16 (png_bytep buf, unsigned int i)
-}
-declare 207 generic {!PNG_INTERNAL} {
-    void png_write_sig (png_structp png_ptr)
-}
-declare 208 generic {!PNG_INTERNAL} {
-    void png_write_IHDR (png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_type, int filter_type, int interlace_type)
-}
-declare 209 generic {!PNG_INTERNAL} {
-    void png_write_PLTE (png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
-}
-declare 210 generic {!PNG_INTERNAL} {
-    void png_write_IDAT (png_structp png_ptr, png_bytep data, png_size_t length)
-}
-declare 211 generic {!PNG_INTERNAL} {
-    void png_write_IEND (png_structp png_ptr)
-}
-declare 212 generic {!PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_write_gAMA (png_structp png_ptr, double file_gamma)
-}
-declare 213 generic {!PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    void png_write_gAMA_fixed (png_structp png_ptr, png_fixed_point file_gamma)
-}
-declare 214 generic {!PNG_INTERNAL !PNG_WRITE_sBIT_SUPPORTED} {
-    void png_write_sBIT (png_structp png_ptr, png_color_8p sbit, int color_type)
-}
-declare 215 generic {!PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED} {
-    void png_write_cHRM (png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)
-}
-declare 216 generic {!PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED} {
-    void png_write_cHRM_fixed (png_structp png_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)
-}
-declare 217 generic {!PNG_INTERNAL !PNG_WRITE_sRGB_SUPPORTED} {
-    void png_write_sRGB (png_structp png_ptr, int intent)
-}
-declare 218 generic {!PNG_INTERNAL !PNG_WRITE_iCCP_SUPPORTED} {
-    void png_write_iCCP (png_structp png_ptr, png_charp name, int compression_type, png_charp profile, int proflen)
-}
-declare 219 generic {!PNG_INTERNAL !PNG_WRITE_sPLT_SUPPORTED} {
-    void png_write_sPLT (png_structp png_ptr, png_sPLT_tp palette)
-}
-declare 220 generic {!PNG_INTERNAL !PNG_WRITE_tRNS_SUPPORTED} {
-    void png_write_tRNS (png_structp png_ptr, png_bytep trans, png_color_16p values, int number, int color_type)
-}
-declare 221 generic {!PNG_INTERNAL !PNG_WRITE_bKGD_SUPPORTED} {
-    void png_write_bKGD (png_structp png_ptr, png_color_16p values, int color_type)
-}
-declare 222 generic {!PNG_INTERNAL !PNG_WRITE_hIST_SUPPORTED} {
-    void png_write_hIST (png_structp png_ptr, png_uint_16p hist, int num_hist)
-}
-declare 223 generic {!PNG_INTERNAL {!PNG_WRITE_TEXT_SUPPORTED !PNG_WRITE_pCAL_SUPPORTED !PNG_WRITE_iCCP_SUPPORTED !PNG_WRITE_sPLT_SUPPORTED}} {
-    png_size_t png_check_keyword (png_structp png_ptr, png_charp key, png_charpp new_key)
-}
-declare 224 generic {!PNG_INTERNAL !PNG_WRITE_tEXt_SUPPORTED} {
-    void png_write_tEXt (png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len)
-}
-declare 225 generic {!PNG_INTERNAL !PNG_WRITE_zTXt_SUPPORTED} {
-    void png_write_zTXt (png_structp png_ptr, png_charp key, png_size_t text_len, int compression)
-}
-declare 226 generic {!PNG_INTERNAL !PNG_iTXt_SUPPORTED} {
-    void png_write_iTXt (png_structp png_ptr, int compression, png_charp key, png_charp lang, png_charp lang_key, png_charp text)
-}
-declare 227 generic {!PNG_INTERNAL !PNG_WRITE_oFFs_SUPPORTED} {
-    void png_write_oFFs (png_structp png_ptr, png_uint_32 x_offset, png_uint_32 y_offset, int unit_type)
-}
-declare 228 generic {!PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED} {
-    void png_write_pCAL (png_structp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
-}
-declare 229 generic {!PNG_INTERNAL !PNG_WRITE_pHYs_SUPPORTED} {
-    void png_write_pHYs (png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type)
-}
-declare 230 generic {!PNG_INTERNAL !PNG_WRITE_tIME_SUPPORTED} {
-    void png_write_tIME (png_structp png_ptr, png_timep mod_time)
-}
-declare 231 generic {!PNG_INTERNAL !PNG_WRITE_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED PNG_NO_STDIO} {
-    void png_write_sCAL (png_structp png_ptr, int unit, double width, double height)
-}
-declare 232 generic {!PNG_INTERNAL !PNG_FIXED_POINT_SUPPORTED {PNG_WRITE_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_NO_STDIO}} {
-    void png_write_sCAL_s (png_structp png_ptr, int unit, png_charp width, png_charp height)
-}
-declare 233 generic {!PNG_INTERNAL} {
-    void png_write_finish_row (png_structp png_ptr)
-}
-declare 234 generic {!PNG_INTERNAL} {
-    void png_write_start_row (png_structp png_ptr)
-}
-declare 235 generic {!PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED} {
-    void png_build_gamma_table (png_structp png_ptr)
-}
-declare 236 generic {!PNG_INTERNAL} {
-    void png_combine_row (png_structp png_ptr, png_bytep row, int mask)
-}
-declare 237 generic {!PNG_INTERNAL !PNG_READ_INTERLACING_SUPPORTED} {
-    void png_do_read_interlace (png_row_infop row_info, png_bytep row, int pass, png_uint_32 transformations)
-}
-declare 238 generic {!PNG_INTERNAL !PNG_WRITE_INTERLACING_SUPPORTED} {
-    void png_do_write_interlace (png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)
-}
-declare 239 generic {!PNG_INTERNAL} {
-    void png_read_filter_row (png_structp png_ptr, png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)
-}
-declare 240 generic {!PNG_INTERNAL} {
-    void png_write_find_filter (png_structp png_ptr, png_row_infop row_info)
-}
-declare 241 generic {!PNG_INTERNAL} {
-    void png_write_filtered_row (png_structp png_ptr, png_bytep filtered_row)
-}
-declare 242 generic {!PNG_INTERNAL} {
-    void png_read_finish_row (png_structp png_ptr)
-}
-declare 243 generic {!PNG_INTERNAL} {
-    void png_read_start_row (png_structp png_ptr)
-}
-declare 244 generic {!PNG_INTERNAL} {
-    void png_read_transform_info (png_structp png_ptr, png_infop info_ptr)
-}
-declare 245 generic {!PNG_INTERNAL !PNG_READ_FILLER_SUPPORTED} {
-    void png_do_read_filler (png_row_infop row_info, png_bytep row, png_uint_32 filler, png_uint_32 flags)
-}
-declare 246 generic {!PNG_INTERNAL !PNG_READ_SWAP_ALPHA_SUPPORTED} {
-    void png_do_read_swap_alpha (png_row_infop row_info, png_bytep row)
-}
-declare 247 generic {!PNG_INTERNAL !PNG_WRITE_SWAP_ALPHA_SUPPORTED} {
-    void png_do_write_swap_alpha (png_row_infop row_info, png_bytep row)
-}
-declare 248 generic {!PNG_INTERNAL !PNG_READ_INVERT_ALPHA_SUPPORTED} {
-    void png_do_read_invert_alpha (png_row_infop row_info, png_bytep row)
-}
-declare 249 generic {!PNG_INTERNAL !PNG_WRITE_INVERT_ALPHA_SUPPORTED} {
-    void png_do_write_invert_alpha (png_row_infop row_info, png_bytep row)
-}
-declare 250 generic {!PNG_INTERNAL {!PNG_WRITE_FILLER_SUPPORTED !PNG_READ_STRIP_ALPHA_SUPPORTED}} {
-    void png_do_strip_filler (png_row_infop row_info, png_bytep row, png_uint_32 flags)
-}
-declare 251 generic {!PNG_INTERNAL {!PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED}} {
-    void png_do_swap (png_row_infop row_info, png_bytep row)
-}
-declare 252 generic {!PNG_INTERNAL {!PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED}} {
-    void png_do_packswap (png_row_infop row_info, png_bytep row)
-}
-declare 253 generic {!PNG_INTERNAL !PNG_READ_RGB_TO_GRAY_SUPPORTED} {
-    int png_do_rgb_to_gray (png_structp png_ptr, png_row_infop row_info, png_bytep row)
-}
-declare 254 generic {!PNG_INTERNAL !PNG_READ_GRAY_TO_RGB_SUPPORTED} {
-    void png_do_gray_to_rgb (png_row_infop row_info, png_bytep row)
-}
-declare 255 generic {!PNG_INTERNAL !PNG_READ_PACK_SUPPORTED} {
-    void png_do_unpack (png_row_infop row_info, png_bytep row)
-}
-declare 256 generic {!PNG_INTERNAL !PNG_READ_SHIFT_SUPPORTED} {
-    void png_do_unshift (png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
-}
-declare 257 generic {!PNG_INTERNAL {!PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED}} {
-    void png_do_invert (png_row_infop row_info, png_bytep row)
-}
-declare 258 generic {!PNG_INTERNAL !PNG_READ_16_TO_8_SUPPORTED} {
-    void png_do_chop (png_row_infop row_info, png_bytep row)
-}
-declare 259 generic {!PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED} {
-    void png_do_dither (png_row_infop row_info, png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)
-}
-declare 260 generic {!PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED !PNG_CORRECT_PALETTE_SUPPORTED} {
-    void png_correct_palette (png_structp png_ptr, png_colorp palette, int num_palette)
-}
-declare 261 generic {!PNG_INTERNAL {!PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED}} {
-    void png_do_bgr (png_row_infop row_info, png_bytep row)
-}
-declare 262 generic {!PNG_INTERNAL !PNG_WRITE_PACK_SUPPORTED} {
-    void png_do_pack (png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
-}
-declare 263 generic {!PNG_INTERNAL !PNG_WRITE_SHIFT_SUPPORTED} {
-    void png_do_shift (png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
-}
-declare 264 generic {!PNG_INTERNAL !PNG_READ_BACKGROUND_SUPPORTED} {
-    void png_do_background (png_row_infop row_info, png_bytep row, png_color_16p trans_values, png_color_16p background, png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, png_uint_16pp gamma_16_to_1, int gamma_shift)
-}
-declare 265 generic {!PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED} {
-    void png_do_gamma (png_row_infop row_info, png_bytep row, png_bytep gamma_table, png_uint_16pp gamma_16_table, int gamma_shift)
-}
-declare 266 generic {!PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED} {
-    void png_do_expand_palette (png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans)
-}
-declare 267 generic {!PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED} {
-    void png_do_expand (png_row_infop row_info, png_bytep row, png_color_16p trans_value)
-}
-declare 268 generic {!PNG_INTERNAL} {
-    void png_handle_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 269 generic {!PNG_INTERNAL} {
-    void png_handle_PLTE (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 270 generic {!PNG_INTERNAL} {
-    void png_handle_IEND (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 271 generic {!PNG_INTERNAL !PNG_READ_bKGD_SUPPORTED} {
-    void png_handle_bKGD (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 272 generic {!PNG_INTERNAL !PNG_READ_cHRM_SUPPORTED} {
-    void png_handle_cHRM (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 273 generic {!PNG_INTERNAL !PNG_READ_gAMA_SUPPORTED} {
-    void png_handle_gAMA (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 274 generic {!PNG_INTERNAL !PNG_READ_hIST_SUPPORTED} {
-    void png_handle_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 275 generic {!PNG_INTERNAL !PNG_READ_iCCP_SUPPORTED} {
-    void png_handle_iCCP (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 276 generic {!PNG_INTERNAL !PNG_iTXt_SUPPORTED} {
-    void png_handle_iTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 277 generic {!PNG_INTERNAL !PNG_READ_oFFs_SUPPORTED} {
-    void png_handle_oFFs (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 278 generic {!PNG_INTERNAL !PNG_READ_pCAL_SUPPORTED} {
-    void png_handle_pCAL (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 279 generic {!PNG_INTERNAL !PNG_READ_pHYs_SUPPORTED} {
-    void png_handle_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 280 generic {!PNG_INTERNAL !PNG_READ_sBIT_SUPPORTED} {
-    void png_handle_sBIT (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 281 generic {!PNG_INTERNAL !PNG_READ_sCAL_SUPPORTED} {
-    void png_handle_sCAL (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 282 generic {!PNG_INTERNAL !PNG_READ_sPLT_SUPPORTED} {
-    void png_handle_sPLT (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 283 generic {!PNG_INTERNAL !PNG_READ_sRGB_SUPPORTED} {
-    void png_handle_sRGB (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 284 generic {!PNG_INTERNAL !PNG_READ_tEXt_SUPPORTED} {
-    void png_handle_tEXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 285 generic {!PNG_INTERNAL !PNG_READ_tIME_SUPPORTED} {
-    void png_handle_tIME (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 286 generic {!PNG_INTERNAL !PNG_READ_tRNS_SUPPORTED} {
-    void png_handle_tRNS (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 287 generic {!PNG_INTERNAL !PNG_READ_zTXt_SUPPORTED} {
-    void png_handle_zTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 288 generic {!PNG_INTERNAL !PNG_HANDLE_AS_UNKNOWN_SUPPORTED} {
-    int png_handle_as_unknown (png_structp png_ptr, png_bytep chunk_name)
-}
-declare 289 generic {!PNG_INTERNAL} {
-    void png_handle_unknown (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 290 generic {!PNG_INTERNAL} {
-    void png_check_chunk_name (png_structp png_ptr, png_bytep chunk_name)
-}
-declare 291 generic {!PNG_INTERNAL} {
-    void png_do_read_transformations (png_structp png_ptr)
-}
-declare 292 generic {!PNG_INTERNAL} {
-    void png_do_write_transformations (png_structp png_ptr)
-}
-declare 293 generic {!PNG_INTERNAL} {
-    void png_init_read_transformations (png_structp png_ptr)
-}
-declare 294 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_read_chunk (png_structp png_ptr, png_infop info_ptr)
-}
-declare 295 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_read_sig (png_structp png_ptr, png_infop info_ptr)
-}
-declare 296 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_check_crc (png_structp png_ptr)
-}
-declare 297 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_crc_skip (png_structp png_ptr, png_uint_32 length)
-}
-declare 298 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_crc_finish (png_structp png_ptr)
-}
-declare 299 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_fill_buffer (png_structp png_ptr, png_bytep buffer, png_size_t length)
-}
-declare 300 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_save_buffer (png_structp png_ptr)
-}
-declare 301 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_restore_buffer (png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)
-}
-declare 302 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_read_IDAT (png_structp png_ptr)
-}
-declare 303 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_process_IDAT_data (png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)
-}
-declare 304 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_process_row (png_structp png_ptr)
-}
-declare 305 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_handle_unknown (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 306 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_have_info (png_structp png_ptr, png_infop info_ptr)
-}
-declare 307 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_have_end (png_structp png_ptr, png_infop info_ptr)
-}
-declare 308 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_have_row (png_structp png_ptr, png_bytep row)
-}
-declare 309 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_push_read_end (png_structp png_ptr, png_infop info_ptr)
-}
-declare 310 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_process_some_data (png_structp png_ptr, png_infop info_ptr)
-}
-declare 311 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED} {
-    void png_read_push_finish_row (png_structp png_ptr)
-}
-declare 312 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED} {
-    void png_push_handle_tEXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 313 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED} {
-    void png_push_read_tEXt (png_structp png_ptr, png_infop info_ptr)
-}
-declare 314 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED} {
-    void png_push_handle_zTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 315 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED} {
-    void png_push_read_zTXt (png_structp png_ptr, png_infop info_ptr)
-}
-declare 316 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED} {
-    void png_push_handle_iTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-declare 317 generic {!PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED} {
-    void png_push_read_iTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-}
-
-#########################################################################
diff --git a/tkimg1.3/libpng/tcl/pngtcl.h b/tkimg1.3/libpng/tcl/pngtcl.h
deleted file mode 100644
index af5c473..0000000
--- a/tkimg1.3/libpng/tcl/pngtcl.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * pngtcl.h --
- *
- *	Interface to libpng.
- *
- * Copyright (c) 2002-2004 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: pngtcl.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- */
-
-#ifndef __PNGTCL_H__
-#define __PNGTCL_H__
-
-#include "tcl.h"
-
-#define PNGTCL_MAJOR_VERSION	1
-#define PNGTCL_MINOR_VERSION	2
-#define PNGTCL_RELEASE_LEVEL	TCL_RELEASE
-#define PNGTCL_RELEASE_SERIAL	6
-
-#define PNGTCL_VERSION		"1.2.6"
-#define PNGTCL_PATCH_LEVEL	"1.2.6"
-
-/*
- * Used to block the rest of this header file from resource compilers so
- * we can just get the version info.
- */
-#ifndef RC_INVOKED
-
-/* TIP 27 update. If CONST84 is not defined we are compiling against a
- * core before 8.4 and have to disable some CONST'ness.
- */
-
-#ifndef CONST84
-#   define CONST84
-#endif
-
-/*
- * Fix the Borland bug that's in the EXTERN macro from tcl.h.
- */
-#ifndef TCL_EXTERN
-#   undef DLLIMPORT
-#   undef DLLEXPORT
-#   if defined(STATIC_BUILD)
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
-#	define DLLIMPORT __declspec(dllimport)
-#	define DLLEXPORT __declspec(dllexport)
-#   elif defined(__BORLANDC__)
-#	define OLDBORLAND 1
-#	define DLLIMPORT __import
-#	define DLLEXPORT __export
-#   else
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   endif
-    /* Avoid name mangling from C++ compilers. */
-#   ifdef __cplusplus
-#	define TCL_EXTRNC extern "C"
-#   else
-#	define TCL_EXTRNC extern
-#   endif
-    /* Pre-5.5 Borland requires the attributes be placed after the */
-    /* return type. */
-#   ifdef OLDBORLAND
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
-#   else
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
-#   endif
-#endif
-
-
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_pngtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_PNGTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * C API for Pngtcl generic layer
- *----------------------------------------------------------------------------
- */
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for publically accessible routines
- *----------------------------------------------------------------------------
- */
-
-#include "pngtclDecls.h"
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for stub initialization.
- *----------------------------------------------------------------------------
- */
-
-#ifdef USE_PNGTCL_STUBS
-EXTERN CONST char *
-Pngtcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
-#else
-/*
- * When not using stubs, make it a macro.
- */
-
-#define Pngtcl_InitStubs(interp, version, exact) \
-    Tcl_PkgRequire(interp, "pngtcl", version, exact)
-#endif
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* RC_INVOKED */
-#endif /* __PNGTCL_H__ */
diff --git a/tkimg1.3/libpng/tcl/pngtclConfig.sh.in b/tkimg1.3/libpng/tcl/pngtclConfig.sh.in
deleted file mode 100644
index 4e3af80..0000000
--- a/tkimg1.3/libpng/tcl/pngtclConfig.sh.in
+++ /dev/null
@@ -1,55 +0,0 @@
-# pngtclConfig.sh --
-# 
-# This shell script (for sh) is generated automatically by pngtcl's
-# configure script.  It will create shell variables for most of
-# the configuration options discovered by the configure script.
-# This script is intended to be included by the configure scripts
-# for pngtcl extensions so that they don't have to figure this all
-# out for themselves.  This file does not duplicate information
-# already provided by tclConfig.sh, so you may need to use that
-# file in addition to this one.
-#
-# The information in this file is specific to a single platform.
-
-# pngtcl's version number.
-pngtcl_VERSION='@VERSION@'
-pngtcl_MAJOR_VERSION='@MAJOR_VERSION@'
-pngtcl_MINOR_VERSION='@MINOR_VERSION@'
-pngtcl_RELEASE_LEVEL='@PATCHLEVEL@'
-
-# The name of the pngtcl library (may be either a .a file or a shared library):
-pngtcl_LIB_FILE=@pngtcl_LIB_FILE@
-
-# String to pass to linker to pick up the pngtcl library from its
-# build directory.
-pngtcl_BUILD_LIB_SPEC='@pngtcl_BUILD_LIB_SPEC@'
-
-# String to pass to linker to pick up the pngtcl library from its
-# installed directory.
-pngtcl_LIB_SPEC='@pngtcl_LIB_SPEC@'
-
-# The name of the pngtcl stub library (a .a file):
-pngtcl_STUB_LIB_FILE=@pngtclstub_LIB_FILE@
-
-# String to pass to linker to pick up the pngtcl stub library from its
-# build directory.
-pngtcl_BUILD_STUB_LIB_SPEC='@pngtcl_BUILD_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the pngtcl stub library from its
-# installed directory.
-pngtcl_STUB_LIB_SPEC='@pngtcl_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the pngtcl stub library from its
-# build directory.
-pngtcl_BUILD_STUB_LIB_PATH='@pngtcl_BUILD_STUB_LIB_PATH@'
-
-# String to pass to linker to pick up the pngtcl stub library from its
-# installed directory.
-pngtcl_STUB_LIB_PATH='@pngtcl_STUB_LIB_PATH@'
-
-# Location of the top-level source directories from which [incr Tcl]
-# was built.  This is the directory that contains generic, unix, etc.
-# If [incr Tcl] was compiled in a different place than the directory
-# containing the source files, this points to the location of the sources,
-# not the location where [incr Tcl] was compiled.
-pngtcl_SRC_DIR='@srcdir@'
diff --git a/tkimg1.3/libpng/tcl/pngtclDecls.h b/tkimg1.3/libpng/tcl/pngtclDecls.h
deleted file mode 100644
index 167d6a8..0000000
--- a/tkimg1.3/libpng/tcl/pngtclDecls.h
+++ /dev/null
@@ -1,2721 +0,0 @@
-/*
- * pngtclDecls.h --
- *
- *	Declarations of functions in the platform independent public PNGTCL API.
- *
- */
-
-#ifndef _PNGTCLDECLS
-#define _PNGTCLDECLS
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the pngtcl.decls script.
- */
-
-#include <tcl.h>
-#include <pngtclDeclsMask.h>
-#include <../png.h>
-#include <pngtclDeclsUnmask.h>
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-/* 0 */
-EXTERN png_uint_32	png_access_version_number _ANSI_ARGS_((void));
-/* 1 */
-EXTERN void		png_set_sig_bytes _ANSI_ARGS_((png_structp png_ptr, 
-				int num_bytes));
-/* 2 */
-EXTERN int		png_sig_cmp _ANSI_ARGS_((png_bytep sig, 
-				png_size_t start, png_size_t num_to_check));
-/* 3 */
-EXTERN int		png_check_sig _ANSI_ARGS_((png_bytep sig, int num));
-/* 4 */
-EXTERN png_structp	png_create_read_struct _ANSI_ARGS_((
-				png_const_charp user_png_ver, 
-				png_voidp error_ptr, png_error_ptr error_fn, 
-				png_error_ptr warn_fn));
-/* 5 */
-EXTERN png_structp	png_create_write_struct _ANSI_ARGS_((
-				png_const_charp user_png_ver, 
-				png_voidp error_ptr, png_error_ptr error_fn, 
-				png_error_ptr warn_fn));
-/* 6 */
-EXTERN png_uint_32	png_get_compression_buffer_size _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 7 */
-EXTERN void		png_set_compression_buffer_size _ANSI_ARGS_((
-				png_structp png_ptr, png_uint_32 size));
-/* 8 */
-EXTERN int		png_reset_zstream _ANSI_ARGS_((png_structp png_ptr));
-/* 9 */
-EXTERN png_structp	png_create_read_struct_2 _ANSI_ARGS_((
-				png_const_charp user_png_ver, 
-				png_voidp error_ptr, png_error_ptr error_fn, 
-				png_error_ptr warn_fn, png_voidp mem_ptr, 
-				png_malloc_ptr malloc_fn, 
-				png_free_ptr free_fn));
-/* 10 */
-EXTERN png_structp	png_create_write_struct_2 _ANSI_ARGS_((
-				png_const_charp user_png_ver, 
-				png_voidp error_ptr, png_error_ptr error_fn, 
-				png_error_ptr warn_fn, png_voidp mem_ptr, 
-				png_malloc_ptr malloc_fn, 
-				png_free_ptr free_fn));
-/* 11 */
-EXTERN void		png_write_chunk _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep chunk_name, png_bytep data, 
-				png_size_t length));
-/* 12 */
-EXTERN void		png_write_chunk_start _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep chunk_name, 
-				png_uint_32 length));
-/* 13 */
-EXTERN void		png_write_chunk_data _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep data, 
-				png_size_t length));
-/* 14 */
-EXTERN void		png_write_chunk_end _ANSI_ARGS_((png_structp png_ptr));
-/* 15 */
-EXTERN png_infop	png_create_info_struct _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 16 */
-EXTERN void		png_info_init _ANSI_ARGS_((png_infop info_ptr));
-/* 17 */
-EXTERN void		png_write_info_before_PLTE _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 18 */
-EXTERN void		png_write_info _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 19 */
-EXTERN void		png_read_info _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 20 */
-EXTERN png_charp	png_convert_to_rfc1123 _ANSI_ARGS_((
-				png_structp png_ptr, png_timep ptime));
-/* 21 */
-EXTERN void		png_convert_from_struct_tm _ANSI_ARGS_((
-				png_timep ptime, struct tm FAR * ttime));
-/* 22 */
-EXTERN void		png_convert_from_time_t _ANSI_ARGS_((png_timep ptime, 
-				time_t ttime));
-/* 23 */
-EXTERN void		png_set_expand _ANSI_ARGS_((png_structp png_ptr));
-/* 24 */
-EXTERN void		png_set_gray_1_2_4_to_8 _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 25 */
-EXTERN void		png_set_palette_to_rgb _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 26 */
-EXTERN void		png_set_tRNS_to_alpha _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 27 */
-EXTERN void		png_set_bgr _ANSI_ARGS_((png_structp png_ptr));
-/* 28 */
-EXTERN void		png_set_gray_to_rgb _ANSI_ARGS_((png_structp png_ptr));
-/* 29 */
-EXTERN void		png_set_rgb_to_gray _ANSI_ARGS_((png_structp png_ptr, 
-				int error_action, double red, double green));
-/* 30 */
-EXTERN void		png_set_rgb_to_gray_fixed _ANSI_ARGS_((
-				png_structp png_ptr, int error_action, 
-				png_fixed_point red, png_fixed_point green));
-/* 31 */
-EXTERN png_byte		png_get_rgb_to_gray_status _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 32 */
-EXTERN void		png_build_grayscale_palette _ANSI_ARGS_((
-				int bit_depth, png_colorp palette));
-/* 33 */
-EXTERN void		png_set_strip_alpha _ANSI_ARGS_((png_structp png_ptr));
-/* 34 */
-EXTERN void		png_set_swap_alpha _ANSI_ARGS_((png_structp png_ptr));
-/* 35 */
-EXTERN void		png_set_invert_alpha _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 36 */
-EXTERN void		png_set_filler _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 filler, int flags));
-/* 37 */
-EXTERN void		png_set_swap _ANSI_ARGS_((png_structp png_ptr));
-/* 38 */
-EXTERN void		png_set_packing _ANSI_ARGS_((png_structp png_ptr));
-/* 39 */
-EXTERN void		png_set_packswap _ANSI_ARGS_((png_structp png_ptr));
-/* 40 */
-EXTERN void		png_set_shift _ANSI_ARGS_((png_structp png_ptr, 
-				png_color_8p true_bits));
-/* 41 */
-EXTERN int		png_set_interlace_handling _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 42 */
-EXTERN void		png_set_invert_mono _ANSI_ARGS_((png_structp png_ptr));
-/* 43 */
-EXTERN void		png_set_background _ANSI_ARGS_((png_structp png_ptr, 
-				png_color_16p background_color, 
-				int background_gamma_code, int need_expand, 
-				double background_gamma));
-/* 44 */
-EXTERN void		png_set_strip_16 _ANSI_ARGS_((png_structp png_ptr));
-/* 45 */
-EXTERN void		png_set_dither _ANSI_ARGS_((png_structp png_ptr, 
-				png_colorp palette, int num_palette, 
-				int maximum_colors, png_uint_16p histogram, 
-				int full_dither));
-/* 46 */
-EXTERN void		png_set_gamma _ANSI_ARGS_((png_structp png_ptr, 
-				double screen_gamma, 
-				double default_file_gamma));
-/* 47 */
-EXTERN void		png_permit_empty_plte _ANSI_ARGS_((
-				png_structp png_ptr, 
-				int empty_plte_permitted));
-/* 48 */
-EXTERN void		png_set_flush _ANSI_ARGS_((png_structp png_ptr, 
-				int nrows));
-/* 49 */
-EXTERN void		png_write_flush _ANSI_ARGS_((png_structp png_ptr));
-/* 50 */
-EXTERN void		png_start_read_image _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 51 */
-EXTERN void		png_read_update_info _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 52 */
-EXTERN void		png_read_rows _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytepp row, png_bytepp display_row, 
-				png_uint_32 num_rows));
-/* 53 */
-EXTERN void		png_read_row _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep row, png_bytep display_row));
-/* 54 */
-EXTERN void		png_read_image _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytepp image));
-/* 55 */
-EXTERN void		png_write_row _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep row));
-/* 56 */
-EXTERN void		png_write_rows _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytepp row, png_uint_32 num_rows));
-/* 57 */
-EXTERN void		png_write_image _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytepp image));
-/* 58 */
-EXTERN void		png_write_end _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 59 */
-EXTERN void		png_read_end _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 60 */
-EXTERN void		png_destroy_info_struct _ANSI_ARGS_((
-				png_structp png_ptr, png_infopp info_ptr_ptr));
-/* 61 */
-EXTERN void		png_destroy_read_struct _ANSI_ARGS_((
-				png_structpp png_ptr_ptr, 
-				png_infopp info_ptr_ptr, 
-				png_infopp end_info_ptr_ptr));
-/* 62 */
-EXTERN void		png_read_destroy _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_infop end_info_ptr));
-/* 63 */
-EXTERN void		png_destroy_write_struct _ANSI_ARGS_((
-				png_structpp png_ptr_ptr, 
-				png_infopp info_ptr_ptr));
-/* Slot 64 is reserved */
-/* 65 */
-EXTERN void		png_write_destroy _ANSI_ARGS_((png_structp png_ptr));
-/* 66 */
-EXTERN void		png_set_crc_action _ANSI_ARGS_((png_structp png_ptr, 
-				int crit_action, int ancil_action));
-/* 67 */
-EXTERN void		png_set_filter _ANSI_ARGS_((png_structp png_ptr, 
-				int method, int filters));
-/* 68 */
-EXTERN void		png_set_filter_heuristics _ANSI_ARGS_((
-				png_structp png_ptr, int heuristic_method, 
-				int num_weights, png_doublep filter_weights, 
-				png_doublep filter_costs));
-/* 69 */
-EXTERN void		png_set_compression_level _ANSI_ARGS_((
-				png_structp png_ptr, int level));
-/* 70 */
-EXTERN void		png_set_compression_mem_level _ANSI_ARGS_((
-				png_structp png_ptr, int mem_level));
-/* 71 */
-EXTERN void		png_set_compression_strategy _ANSI_ARGS_((
-				png_structp png_ptr, int strategy));
-/* 72 */
-EXTERN void		png_set_compression_window_bits _ANSI_ARGS_((
-				png_structp png_ptr, int window_bits));
-/* 73 */
-EXTERN void		png_set_compression_method _ANSI_ARGS_((
-				png_structp png_ptr, int method));
-/* 74 */
-EXTERN void		png_init_io _ANSI_ARGS_((png_structp png_ptr, 
-				png_FILE_p fp));
-/* 75 */
-EXTERN void		png_set_error_fn _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp error_ptr, png_error_ptr error_fn, 
-				png_error_ptr warning_fn));
-/* 76 */
-EXTERN png_voidp	png_get_error_ptr _ANSI_ARGS_((png_structp png_ptr));
-/* 77 */
-EXTERN void		png_set_write_fn _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp io_ptr, png_rw_ptr write_data_fn, 
-				png_flush_ptr output_flush_fn));
-/* 78 */
-EXTERN void		png_set_read_fn _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp io_ptr, png_rw_ptr read_data_fn));
-/* 79 */
-EXTERN png_voidp	png_get_io_ptr _ANSI_ARGS_((png_structp png_ptr));
-/* 80 */
-EXTERN void		png_set_read_status_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_read_status_ptr read_row_fn));
-/* 81 */
-EXTERN void		png_set_write_status_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_write_status_ptr write_row_fn));
-/* 82 */
-EXTERN void		png_set_mem_fn _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp mem_ptr, png_malloc_ptr malloc_fn, 
-				png_free_ptr free_fn));
-/* 83 */
-EXTERN png_voidp	png_get_mem_ptr _ANSI_ARGS_((png_structp png_ptr));
-/* 84 */
-EXTERN void		png_set_read_user_transform_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_user_transform_ptr read_user_transform_fn));
-/* 85 */
-EXTERN void		png_set_write_user_transform_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_user_transform_ptr write_user_transform_fn));
-/* 86 */
-EXTERN void		png_set_user_transform_info _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_voidp user_transform_ptr, 
-				int user_transform_depth, 
-				int user_transform_channels));
-/* 87 */
-EXTERN png_voidp	png_get_user_transform_ptr _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 88 */
-EXTERN void		png_set_read_user_chunk_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_voidp user_chunk_ptr, 
-				png_user_chunk_ptr read_user_chunk_fn));
-/* 89 */
-EXTERN png_voidp	png_get_user_chunk_ptr _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 90 */
-EXTERN void		png_set_progressive_read_fn _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_voidp progressive_ptr, 
-				png_progressive_info_ptr info_fn, 
-				png_progressive_row_ptr row_fn, 
-				png_progressive_end_ptr end_fn));
-/* 91 */
-EXTERN png_voidp	png_get_progressive_ptr _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 92 */
-EXTERN void		png_process_data _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_bytep buffer, 
-				png_size_t buffer_size));
-/* 93 */
-EXTERN void		png_progressive_combine_row _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep old_row, 
-				png_bytep new_row));
-/* 94 */
-EXTERN png_voidp	png_malloc _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 size));
-/* 95 */
-EXTERN void		png_free _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp ptr));
-/* 96 */
-EXTERN void		png_free_data _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 free_me, 
-				int num));
-/* 97 */
-EXTERN void		png_data_freer _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int freer, 
-				png_uint_32 mask));
-/* 98 */
-EXTERN png_voidp	png_malloc_default _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 size));
-/* 99 */
-EXTERN void		png_free_default _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp ptr));
-/* 100 */
-EXTERN png_voidp	png_memcpy_check _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp s1, png_voidp s2, png_uint_32 size));
-/* 101 */
-EXTERN png_voidp	png_memset_check _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp s1, int value, png_uint_32 size));
-/* 102 */
-EXTERN void *		png_far_to_near _ANSI_ARGS_((png_structp png_ptr, 
-				png_voidp ptr, int check));
-/* 103 */
-EXTERN void		png_error _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp error));
-/* 104 */
-EXTERN void		png_chunk_error _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp error));
-/* 105 */
-EXTERN void		png_warning _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp message));
-/* 106 */
-EXTERN void		png_chunk_warning _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp message));
-/* 107 */
-EXTERN png_uint_32	png_get_valid _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 flag));
-/* 108 */
-EXTERN png_uint_32	png_get_rowbytes _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 109 */
-EXTERN png_bytepp	png_get_rows _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 110 */
-EXTERN void		png_set_rows _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_bytepp row_pointers));
-/* 111 */
-EXTERN png_byte		png_get_channels _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 112 */
-EXTERN png_uint_32	png_get_image_width _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 113 */
-EXTERN png_uint_32	png_get_image_height _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 114 */
-EXTERN png_byte		png_get_bit_depth _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 115 */
-EXTERN png_byte		png_get_color_type _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 116 */
-EXTERN png_byte		png_get_filter_type _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 117 */
-EXTERN png_byte		png_get_interlace_type _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 118 */
-EXTERN png_byte		png_get_compression_type _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 119 */
-EXTERN png_uint_32	png_get_pixels_per_meter _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 120 */
-EXTERN png_uint_32	png_get_x_pixels_per_meter _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 121 */
-EXTERN png_uint_32	png_get_y_pixels_per_meter _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 122 */
-EXTERN float		png_get_pixel_aspect_ratio _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 123 */
-EXTERN png_int_32	png_get_x_offset_pixels _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 124 */
-EXTERN png_int_32	png_get_y_offset_pixels _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 125 */
-EXTERN png_int_32	png_get_x_offset_microns _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 126 */
-EXTERN png_int_32	png_get_y_offset_microns _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 127 */
-EXTERN png_bytep	png_get_signature _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 128 */
-EXTERN png_uint_32	png_get_bKGD _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, 
-				png_color_16p* background));
-/* 129 */
-EXTERN void		png_set_bKGD _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_color_16p background));
-/* 130 */
-EXTERN png_uint_32	png_get_cHRM _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, double * white_x, 
-				double * white_y, double * red_x, 
-				double * red_y, double * green_x, 
-				double * green_y, double * blue_x, 
-				double * blue_y));
-/* 131 */
-EXTERN png_uint_32	png_get_cHRM_fixed _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, 
-				png_fixed_point * int_white_x, 
-				png_fixed_point * int_white_y, 
-				png_fixed_point * int_red_x, 
-				png_fixed_point * int_red_y, 
-				png_fixed_point * int_green_x, 
-				png_fixed_point * int_green_y, 
-				png_fixed_point * int_blue_x, 
-				png_fixed_point * int_blue_y));
-/* 132 */
-EXTERN void		png_set_cHRM _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, double white_x, 
-				double white_y, double red_x, double red_y, 
-				double green_x, double green_y, 
-				double blue_x, double blue_y));
-/* 133 */
-EXTERN void		png_set_cHRM_fixed _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, 
-				png_fixed_point int_white_x, 
-				png_fixed_point int_white_y, 
-				png_fixed_point int_red_x, 
-				png_fixed_point int_red_y, 
-				png_fixed_point int_green_x, 
-				png_fixed_point int_green_y, 
-				png_fixed_point int_blue_x, 
-				png_fixed_point int_blue_y));
-/* 134 */
-EXTERN png_uint_32	png_get_gAMA _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, double * file_gamma));
-/* 135 */
-EXTERN png_uint_32	png_get_gAMA_fixed _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, 
-				png_fixed_point* int_file_gamma));
-/* 136 */
-EXTERN void		png_set_gAMA _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, double file_gamma));
-/* 137 */
-EXTERN void		png_set_gAMA_fixed _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, 
-				png_fixed_point int_file_gamma));
-/* 138 */
-EXTERN png_uint_32	png_get_hIST _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_16p * hist));
-/* 139 */
-EXTERN void		png_set_hIST _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_16p hist));
-/* 140 */
-EXTERN png_uint_32	png_get_IHDR _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 * width, 
-				png_uint_32 * height, int * bit_depth, 
-				int * color_type, int * interlace_type, 
-				int * compression_type, int * filter_type));
-/* 141 */
-EXTERN void		png_set_IHDR _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 width, 
-				png_uint_32 height, int bit_depth, 
-				int color_type, int interlace_type, 
-				int compression_type, int filter_type));
-/* 142 */
-EXTERN png_uint_32	png_get_oFFs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_int_32 * offset_x, 
-				png_int_32 * offset_y, int * unit_type));
-/* 143 */
-EXTERN void		png_set_oFFs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_int_32 offset_x, 
-				png_int_32 offset_y, int unit_type));
-/* 144 */
-EXTERN png_uint_32	png_get_pCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_charp * purpose, 
-				png_int_32 * X0, png_int_32 * X1, int * type, 
-				int * nparams, png_charp * units, 
-				png_charpp * params));
-/* 145 */
-EXTERN void		png_set_pCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_charp purpose, 
-				png_int_32 X0, png_int_32 X1, int type, 
-				int nparams, png_charp units, 
-				png_charpp params));
-/* 146 */
-EXTERN png_uint_32	png_get_pHYs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 * res_x, 
-				png_uint_32 * res_y, int * unit_type));
-/* 147 */
-EXTERN void		png_set_pHYs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 res_x, 
-				png_uint_32 res_y, int unit_type));
-/* 148 */
-EXTERN png_uint_32	png_get_PLTE _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_colorp * palette, 
-				int * num_palette));
-/* 149 */
-EXTERN void		png_set_PLTE _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_colorp palette, 
-				int num_palette));
-/* 150 */
-EXTERN png_uint_32	png_get_sBIT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_color_8p* sig_bit));
-/* 151 */
-EXTERN void		png_set_sBIT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_color_8p sig_bit));
-/* 152 */
-EXTERN png_uint_32	png_get_sRGB _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int * intent));
-/* 153 */
-EXTERN void		png_set_sRGB _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int intent));
-/* 154 */
-EXTERN void		png_set_sRGB_gAMA_and_cHRM _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				int intent));
-/* 155 */
-EXTERN png_uint_32	png_get_iCCP _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_charpp name, 
-				int * compression_type, png_charpp profile, 
-				png_uint_32 * proflen));
-/* 156 */
-EXTERN void		png_set_iCCP _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_charp name, 
-				int compression_type, png_charp profile, 
-				png_uint_32 proflen));
-/* 157 */
-EXTERN png_uint_32	png_get_sPLT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_sPLT_tpp entries));
-/* 158 */
-EXTERN void		png_set_sPLT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_sPLT_tp entries, 
-				int nentries));
-/* 159 */
-EXTERN png_uint_32	png_get_text _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_textp * text_ptr, 
-				int * num_text));
-/* 160 */
-EXTERN void		png_set_text _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_textp text_ptr, 
-				int num_text));
-/* 161 */
-EXTERN png_uint_32	png_get_tIME _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_timep * mod_time));
-/* 162 */
-EXTERN void		png_set_tIME _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_timep mod_time));
-/* 163 */
-EXTERN png_uint_32	png_get_tRNS _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_bytep * trans, 
-				int * num_trans, 
-				png_color_16p * trans_values));
-/* 164 */
-EXTERN void		png_set_tRNS _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_bytep trans, 
-				int num_trans, png_color_16p trans_values));
-/* 165 */
-EXTERN png_uint_32	png_get_sCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int * unit, 
-				double * width, double * height));
-/* 166 */
-EXTERN png_uint_32	png_get_sCAL_s _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int * unit, 
-				png_charpp swidth, png_charpp sheight));
-/* 167 */
-EXTERN void		png_set_sCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int unit, double width, 
-				double height));
-/* 168 */
-EXTERN void		png_set_sCAL_s _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int unit, 
-				png_charp swidth, png_charp sheight));
-/* 169 */
-EXTERN void		png_set_keep_unknown_chunks _ANSI_ARGS_((
-				png_structp png_ptr, int keep, 
-				png_bytep chunk_list, int num_chunks));
-/* 170 */
-EXTERN void		png_set_unknown_chunks _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_unknown_chunkp unknowns, 
-				int num_unknowns));
-/* 171 */
-EXTERN void		png_set_unknown_chunk_location _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				int chunk, int location));
-/* 172 */
-EXTERN png_uint_32	png_get_unknown_chunks _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_unknown_chunkpp entries));
-/* 173 */
-EXTERN void		png_set_invalid _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int mask));
-/* 174 */
-EXTERN void		png_read_png _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int transforms, 
-				voidp params));
-/* 175 */
-EXTERN void		png_write_png _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, int transforms, 
-				voidp params));
-/* 176 */
-EXTERN png_bytep	png_sig_bytes _ANSI_ARGS_((void));
-/* 177 */
-EXTERN png_charp	png_get_copyright _ANSI_ARGS_((png_structp png_ptr));
-/* 178 */
-EXTERN png_charp	png_get_header_ver _ANSI_ARGS_((png_structp png_ptr));
-/* 179 */
-EXTERN png_charp	png_get_header_version _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 180 */
-EXTERN png_charp	png_get_libpng_ver _ANSI_ARGS_((png_structp png_ptr));
-/* 181 */
-EXTERN png_int_32	png_get_int_32 _ANSI_ARGS_((png_bytep buf));
-/* 182 */
-EXTERN png_uint_32	png_get_uint_32 _ANSI_ARGS_((png_bytep buf));
-/* 183 */
-EXTERN png_uint_16	png_get_uint_16 _ANSI_ARGS_((png_bytep buf));
-/* 184 */
-EXTERN void		png_read_init _ANSI_ARGS_((png_structp png_ptr));
-/* 185 */
-EXTERN void		png_read_init_2 _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp user_png_ver, 
-				png_size_t png_struct_size, 
-				png_size_t png_info_size));
-/* 186 */
-EXTERN void		png_write_init _ANSI_ARGS_((png_structp png_ptr));
-/* 187 */
-EXTERN void		png_write_init_2 _ANSI_ARGS_((png_structp png_ptr, 
-				png_const_charp user_png_ver, 
-				png_size_t png_struct_size, 
-				png_size_t png_info_size));
-/* 188 */
-EXTERN png_voidp	png_create_struct _ANSI_ARGS_((int type));
-/* 189 */
-EXTERN void		png_destroy_struct _ANSI_ARGS_((png_voidp struct_ptr));
-/* 190 */
-EXTERN png_voidp	png_create_struct_2 _ANSI_ARGS_((int type, 
-				png_malloc_ptr malloc_fn));
-/* 191 */
-EXTERN void		png_destroy_struct_2 _ANSI_ARGS_((
-				png_voidp struct_ptr, png_free_ptr free_fn));
-/* 192 */
-EXTERN void		png_info_destroy _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 193 */
-EXTERN voidpf		png_zalloc _ANSI_ARGS_((voidpf png_ptr, uInt items, 
-				uInt size));
-/* 194 */
-EXTERN void		png_zfree _ANSI_ARGS_((voidpf png_ptr, voidpf ptr));
-/* 195 */
-EXTERN void		png_reset_crc _ANSI_ARGS_((png_structp png_ptr));
-/* 196 */
-EXTERN void		png_write_data _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep data, png_size_t length));
-/* 197 */
-EXTERN void		png_read_data _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep data, png_size_t length));
-/* 198 */
-EXTERN void		png_crc_read _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep buf, png_size_t length));
-/* 199 */
-EXTERN png_charp	png_decompress_chunk _ANSI_ARGS_((
-				png_structp png_ptr, int comp_type, 
-				png_charp chunkdata, png_size_t chunklength, 
-				png_size_t prefix_length, 
-				png_size_t * data_length));
-/* 200 */
-EXTERN int		png_crc_finish _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 skip));
-/* 201 */
-EXTERN int		png_crc_error _ANSI_ARGS_((png_structp png_ptr));
-/* 202 */
-EXTERN void		png_calculate_crc _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep ptr, png_size_t length));
-/* 203 */
-EXTERN void		png_flush _ANSI_ARGS_((png_structp png_ptr));
-/* 204 */
-EXTERN void		png_save_uint_32 _ANSI_ARGS_((png_bytep buf, 
-				png_uint_32 i));
-/* 205 */
-EXTERN void		png_save_int_32 _ANSI_ARGS_((png_bytep buf, 
-				png_int_32 i));
-/* 206 */
-EXTERN void		png_save_uint_16 _ANSI_ARGS_((png_bytep buf, 
-				unsigned int i));
-/* 207 */
-EXTERN void		png_write_sig _ANSI_ARGS_((png_structp png_ptr));
-/* 208 */
-EXTERN void		png_write_IHDR _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 width, png_uint_32 height, 
-				int bit_depth, int color_type, 
-				int compression_type, int filter_type, 
-				int interlace_type));
-/* 209 */
-EXTERN void		png_write_PLTE _ANSI_ARGS_((png_structp png_ptr, 
-				png_colorp palette, png_uint_32 num_pal));
-/* 210 */
-EXTERN void		png_write_IDAT _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep data, png_size_t length));
-/* 211 */
-EXTERN void		png_write_IEND _ANSI_ARGS_((png_structp png_ptr));
-/* 212 */
-EXTERN void		png_write_gAMA _ANSI_ARGS_((png_structp png_ptr, 
-				double file_gamma));
-/* 213 */
-EXTERN void		png_write_gAMA_fixed _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_fixed_point file_gamma));
-/* 214 */
-EXTERN void		png_write_sBIT _ANSI_ARGS_((png_structp png_ptr, 
-				png_color_8p sbit, int color_type));
-/* 215 */
-EXTERN void		png_write_cHRM _ANSI_ARGS_((png_structp png_ptr, 
-				double white_x, double white_y, double red_x, 
-				double red_y, double green_x, double green_y, 
-				double blue_x, double blue_y));
-/* 216 */
-EXTERN void		png_write_cHRM_fixed _ANSI_ARGS_((
-				png_structp png_ptr, 
-				png_fixed_point int_white_x, 
-				png_fixed_point int_white_y, 
-				png_fixed_point int_red_x, 
-				png_fixed_point int_red_y, 
-				png_fixed_point int_green_x, 
-				png_fixed_point int_green_y, 
-				png_fixed_point int_blue_x, 
-				png_fixed_point int_blue_y));
-/* 217 */
-EXTERN void		png_write_sRGB _ANSI_ARGS_((png_structp png_ptr, 
-				int intent));
-/* 218 */
-EXTERN void		png_write_iCCP _ANSI_ARGS_((png_structp png_ptr, 
-				png_charp name, int compression_type, 
-				png_charp profile, int proflen));
-/* 219 */
-EXTERN void		png_write_sPLT _ANSI_ARGS_((png_structp png_ptr, 
-				png_sPLT_tp palette));
-/* 220 */
-EXTERN void		png_write_tRNS _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep trans, png_color_16p values, 
-				int number, int color_type));
-/* 221 */
-EXTERN void		png_write_bKGD _ANSI_ARGS_((png_structp png_ptr, 
-				png_color_16p values, int color_type));
-/* 222 */
-EXTERN void		png_write_hIST _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_16p hist, int num_hist));
-/* 223 */
-EXTERN png_size_t	png_check_keyword _ANSI_ARGS_((png_structp png_ptr, 
-				png_charp key, png_charpp new_key));
-/* 224 */
-EXTERN void		png_write_tEXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_charp key, png_charp text, 
-				png_size_t text_len));
-/* 225 */
-EXTERN void		png_write_zTXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_charp key, png_size_t text_len, 
-				int compression));
-/* 226 */
-EXTERN void		png_write_iTXt _ANSI_ARGS_((png_structp png_ptr, 
-				int compression, png_charp key, 
-				png_charp lang, png_charp lang_key, 
-				png_charp text));
-/* 227 */
-EXTERN void		png_write_oFFs _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 x_offset, png_uint_32 y_offset, 
-				int unit_type));
-/* 228 */
-EXTERN void		png_write_pCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_charp purpose, png_int_32 X0, 
-				png_int_32 X1, int type, int nparams, 
-				png_charp units, png_charpp params));
-/* 229 */
-EXTERN void		png_write_pHYs _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 x_pixels_per_unit, 
-				png_uint_32 y_pixels_per_unit, int unit_type));
-/* 230 */
-EXTERN void		png_write_tIME _ANSI_ARGS_((png_structp png_ptr, 
-				png_timep mod_time));
-/* 231 */
-EXTERN void		png_write_sCAL _ANSI_ARGS_((png_structp png_ptr, 
-				int unit, double width, double height));
-/* 232 */
-EXTERN void		png_write_sCAL_s _ANSI_ARGS_((png_structp png_ptr, 
-				int unit, png_charp width, png_charp height));
-/* 233 */
-EXTERN void		png_write_finish_row _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 234 */
-EXTERN void		png_write_start_row _ANSI_ARGS_((png_structp png_ptr));
-/* 235 */
-EXTERN void		png_build_gamma_table _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 236 */
-EXTERN void		png_combine_row _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep row, int mask));
-/* 237 */
-EXTERN void		png_do_read_interlace _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				int pass, png_uint_32 transformations));
-/* 238 */
-EXTERN void		png_do_write_interlace _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				png_bytep prev_row, int filter));
-/* 239 */
-EXTERN void		png_read_filter_row _ANSI_ARGS_((png_structp png_ptr, 
-				png_row_infop row_info, png_bytep row, 
-				png_bytep prev_row, int filter));
-/* 240 */
-EXTERN void		png_write_find_filter _ANSI_ARGS_((
-				png_structp png_ptr, png_row_infop row_info));
-/* 241 */
-EXTERN void		png_write_filtered_row _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep filtered_row));
-/* 242 */
-EXTERN void		png_read_finish_row _ANSI_ARGS_((png_structp png_ptr));
-/* 243 */
-EXTERN void		png_read_start_row _ANSI_ARGS_((png_structp png_ptr));
-/* 244 */
-EXTERN void		png_read_transform_info _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 245 */
-EXTERN void		png_do_read_filler _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				png_uint_32 filler, png_uint_32 flags));
-/* 246 */
-EXTERN void		png_do_read_swap_alpha _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row));
-/* 247 */
-EXTERN void		png_do_write_swap_alpha _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row));
-/* 248 */
-EXTERN void		png_do_read_invert_alpha _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row));
-/* 249 */
-EXTERN void		png_do_write_invert_alpha _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row));
-/* 250 */
-EXTERN void		png_do_strip_filler _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				png_uint_32 flags));
-/* 251 */
-EXTERN void		png_do_swap _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 252 */
-EXTERN void		png_do_packswap _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 253 */
-EXTERN int		png_do_rgb_to_gray _ANSI_ARGS_((png_structp png_ptr, 
-				png_row_infop row_info, png_bytep row));
-/* 254 */
-EXTERN void		png_do_gray_to_rgb _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row));
-/* 255 */
-EXTERN void		png_do_unpack _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 256 */
-EXTERN void		png_do_unshift _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_color_8p sig_bits));
-/* 257 */
-EXTERN void		png_do_invert _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 258 */
-EXTERN void		png_do_chop _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 259 */
-EXTERN void		png_do_dither _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_bytep palette_lookup, 
-				png_bytep dither_lookup));
-/* 260 */
-EXTERN void		png_correct_palette _ANSI_ARGS_((png_structp png_ptr, 
-				png_colorp palette, int num_palette));
-/* 261 */
-EXTERN void		png_do_bgr _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row));
-/* 262 */
-EXTERN void		png_do_pack _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_uint_32 bit_depth));
-/* 263 */
-EXTERN void		png_do_shift _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_color_8p bit_depth));
-/* 264 */
-EXTERN void		png_do_background _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				png_color_16p trans_values, 
-				png_color_16p background, 
-				png_color_16p background_1, 
-				png_bytep gamma_table, 
-				png_bytep gamma_from_1, png_bytep gamma_to_1, 
-				png_uint_16pp gamma_16, 
-				png_uint_16pp gamma_16_from_1, 
-				png_uint_16pp gamma_16_to_1, int gamma_shift));
-/* 265 */
-EXTERN void		png_do_gamma _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_bytep gamma_table, 
-				png_uint_16pp gamma_16_table, 
-				int gamma_shift));
-/* 266 */
-EXTERN void		png_do_expand_palette _ANSI_ARGS_((
-				png_row_infop row_info, png_bytep row, 
-				png_colorp palette, png_bytep trans, 
-				int num_trans));
-/* 267 */
-EXTERN void		png_do_expand _ANSI_ARGS_((png_row_infop row_info, 
-				png_bytep row, png_color_16p trans_value));
-/* 268 */
-EXTERN void		png_handle_IHDR _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 269 */
-EXTERN void		png_handle_PLTE _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 270 */
-EXTERN void		png_handle_IEND _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 271 */
-EXTERN void		png_handle_bKGD _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 272 */
-EXTERN void		png_handle_cHRM _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 273 */
-EXTERN void		png_handle_gAMA _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 274 */
-EXTERN void		png_handle_hIST _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 275 */
-EXTERN void		png_handle_iCCP _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 276 */
-EXTERN void		png_handle_iTXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 277 */
-EXTERN void		png_handle_oFFs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 278 */
-EXTERN void		png_handle_pCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 279 */
-EXTERN void		png_handle_pHYs _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 280 */
-EXTERN void		png_handle_sBIT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 281 */
-EXTERN void		png_handle_sCAL _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 282 */
-EXTERN void		png_handle_sPLT _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 283 */
-EXTERN void		png_handle_sRGB _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 284 */
-EXTERN void		png_handle_tEXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 285 */
-EXTERN void		png_handle_tIME _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 286 */
-EXTERN void		png_handle_tRNS _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 287 */
-EXTERN void		png_handle_zTXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 288 */
-EXTERN int		png_handle_as_unknown _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep chunk_name));
-/* 289 */
-EXTERN void		png_handle_unknown _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-/* 290 */
-EXTERN void		png_check_chunk_name _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep chunk_name));
-/* 291 */
-EXTERN void		png_do_read_transformations _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 292 */
-EXTERN void		png_do_write_transformations _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 293 */
-EXTERN void		png_init_read_transformations _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 294 */
-EXTERN void		png_push_read_chunk _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 295 */
-EXTERN void		png_push_read_sig _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 296 */
-EXTERN void		png_push_check_crc _ANSI_ARGS_((png_structp png_ptr));
-/* 297 */
-EXTERN void		png_push_crc_skip _ANSI_ARGS_((png_structp png_ptr, 
-				png_uint_32 length));
-/* 298 */
-EXTERN void		png_push_crc_finish _ANSI_ARGS_((png_structp png_ptr));
-/* 299 */
-EXTERN void		png_push_fill_buffer _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep buffer, 
-				png_size_t length));
-/* 300 */
-EXTERN void		png_push_save_buffer _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 301 */
-EXTERN void		png_push_restore_buffer _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep buffer, 
-				png_size_t buffer_length));
-/* 302 */
-EXTERN void		png_push_read_IDAT _ANSI_ARGS_((png_structp png_ptr));
-/* 303 */
-EXTERN void		png_process_IDAT_data _ANSI_ARGS_((
-				png_structp png_ptr, png_bytep buffer, 
-				png_size_t buffer_length));
-/* 304 */
-EXTERN void		png_push_process_row _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 305 */
-EXTERN void		png_push_handle_unknown _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_uint_32 length));
-/* 306 */
-EXTERN void		png_push_have_info _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 307 */
-EXTERN void		png_push_have_end _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 308 */
-EXTERN void		png_push_have_row _ANSI_ARGS_((png_structp png_ptr, 
-				png_bytep row));
-/* 309 */
-EXTERN void		png_push_read_end _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 310 */
-EXTERN void		png_process_some_data _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr));
-/* 311 */
-EXTERN void		png_read_push_finish_row _ANSI_ARGS_((
-				png_structp png_ptr));
-/* 312 */
-EXTERN void		png_push_handle_tEXt _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_uint_32 length));
-/* 313 */
-EXTERN void		png_push_read_tEXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 314 */
-EXTERN void		png_push_handle_zTXt _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_uint_32 length));
-/* 315 */
-EXTERN void		png_push_read_zTXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr));
-/* 316 */
-EXTERN void		png_push_handle_iTXt _ANSI_ARGS_((
-				png_structp png_ptr, png_infop info_ptr, 
-				png_uint_32 length));
-/* 317 */
-EXTERN void		png_push_read_iTXt _ANSI_ARGS_((png_structp png_ptr, 
-				png_infop info_ptr, png_uint_32 length));
-
-typedef struct PngtclStubs {
-    int magic;
-    struct PngtclStubHooks *hooks;
-
-    png_uint_32 (*png_access_version_number) _ANSI_ARGS_((void)); /* 0 */
-    void (*png_set_sig_bytes) _ANSI_ARGS_((png_structp png_ptr, int num_bytes)); /* 1 */
-    int (*png_sig_cmp) _ANSI_ARGS_((png_bytep sig, png_size_t start, png_size_t num_to_check)); /* 2 */
-    int (*png_check_sig) _ANSI_ARGS_((png_bytep sig, int num)); /* 3 */
-    png_structp (*png_create_read_struct) _ANSI_ARGS_((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)); /* 4 */
-    png_structp (*png_create_write_struct) _ANSI_ARGS_((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)); /* 5 */
-    png_uint_32 (*png_get_compression_buffer_size) _ANSI_ARGS_((png_structp png_ptr)); /* 6 */
-    void (*png_set_compression_buffer_size) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 size)); /* 7 */
-    int (*png_reset_zstream) _ANSI_ARGS_((png_structp png_ptr)); /* 8 */
-    png_structp (*png_create_read_struct_2) _ANSI_ARGS_((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* 9 */
-    png_structp (*png_create_write_struct_2) _ANSI_ARGS_((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* 10 */
-    void (*png_write_chunk) _ANSI_ARGS_((png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length)); /* 11 */
-    void (*png_write_chunk_start) _ANSI_ARGS_((png_structp png_ptr, png_bytep chunk_name, png_uint_32 length)); /* 12 */
-    void (*png_write_chunk_data) _ANSI_ARGS_((png_structp png_ptr, png_bytep data, png_size_t length)); /* 13 */
-    void (*png_write_chunk_end) _ANSI_ARGS_((png_structp png_ptr)); /* 14 */
-    png_infop (*png_create_info_struct) _ANSI_ARGS_((png_structp png_ptr)); /* 15 */
-    void (*png_info_init) _ANSI_ARGS_((png_infop info_ptr)); /* 16 */
-    void (*png_write_info_before_PLTE) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 17 */
-    void (*png_write_info) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 18 */
-    void (*png_read_info) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 19 */
-    png_charp (*png_convert_to_rfc1123) _ANSI_ARGS_((png_structp png_ptr, png_timep ptime)); /* 20 */
-    void (*png_convert_from_struct_tm) _ANSI_ARGS_((png_timep ptime, struct tm FAR * ttime)); /* 21 */
-    void (*png_convert_from_time_t) _ANSI_ARGS_((png_timep ptime, time_t ttime)); /* 22 */
-    void (*png_set_expand) _ANSI_ARGS_((png_structp png_ptr)); /* 23 */
-    void (*png_set_gray_1_2_4_to_8) _ANSI_ARGS_((png_structp png_ptr)); /* 24 */
-    void (*png_set_palette_to_rgb) _ANSI_ARGS_((png_structp png_ptr)); /* 25 */
-    void (*png_set_tRNS_to_alpha) _ANSI_ARGS_((png_structp png_ptr)); /* 26 */
-    void (*png_set_bgr) _ANSI_ARGS_((png_structp png_ptr)); /* 27 */
-    void (*png_set_gray_to_rgb) _ANSI_ARGS_((png_structp png_ptr)); /* 28 */
-    void (*png_set_rgb_to_gray) _ANSI_ARGS_((png_structp png_ptr, int error_action, double red, double green)); /* 29 */
-    void (*png_set_rgb_to_gray_fixed) _ANSI_ARGS_((png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green)); /* 30 */
-    png_byte (*png_get_rgb_to_gray_status) _ANSI_ARGS_((png_structp png_ptr)); /* 31 */
-    void (*png_build_grayscale_palette) _ANSI_ARGS_((int bit_depth, png_colorp palette)); /* 32 */
-    void (*png_set_strip_alpha) _ANSI_ARGS_((png_structp png_ptr)); /* 33 */
-    void (*png_set_swap_alpha) _ANSI_ARGS_((png_structp png_ptr)); /* 34 */
-    void (*png_set_invert_alpha) _ANSI_ARGS_((png_structp png_ptr)); /* 35 */
-    void (*png_set_filler) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 filler, int flags)); /* 36 */
-    void (*png_set_swap) _ANSI_ARGS_((png_structp png_ptr)); /* 37 */
-    void (*png_set_packing) _ANSI_ARGS_((png_structp png_ptr)); /* 38 */
-    void (*png_set_packswap) _ANSI_ARGS_((png_structp png_ptr)); /* 39 */
-    void (*png_set_shift) _ANSI_ARGS_((png_structp png_ptr, png_color_8p true_bits)); /* 40 */
-    int (*png_set_interlace_handling) _ANSI_ARGS_((png_structp png_ptr)); /* 41 */
-    void (*png_set_invert_mono) _ANSI_ARGS_((png_structp png_ptr)); /* 42 */
-    void (*png_set_background) _ANSI_ARGS_((png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)); /* 43 */
-    void (*png_set_strip_16) _ANSI_ARGS_((png_structp png_ptr)); /* 44 */
-    void (*png_set_dither) _ANSI_ARGS_((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither)); /* 45 */
-    void (*png_set_gamma) _ANSI_ARGS_((png_structp png_ptr, double screen_gamma, double default_file_gamma)); /* 46 */
-    void (*png_permit_empty_plte) _ANSI_ARGS_((png_structp png_ptr, int empty_plte_permitted)); /* 47 */
-    void (*png_set_flush) _ANSI_ARGS_((png_structp png_ptr, int nrows)); /* 48 */
-    void (*png_write_flush) _ANSI_ARGS_((png_structp png_ptr)); /* 49 */
-    void (*png_start_read_image) _ANSI_ARGS_((png_structp png_ptr)); /* 50 */
-    void (*png_read_update_info) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 51 */
-    void (*png_read_rows) _ANSI_ARGS_((png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); /* 52 */
-    void (*png_read_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep row, png_bytep display_row)); /* 53 */
-    void (*png_read_image) _ANSI_ARGS_((png_structp png_ptr, png_bytepp image)); /* 54 */
-    void (*png_write_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep row)); /* 55 */
-    void (*png_write_rows) _ANSI_ARGS_((png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)); /* 56 */
-    void (*png_write_image) _ANSI_ARGS_((png_structp png_ptr, png_bytepp image)); /* 57 */
-    void (*png_write_end) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 58 */
-    void (*png_read_end) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 59 */
-    void (*png_destroy_info_struct) _ANSI_ARGS_((png_structp png_ptr, png_infopp info_ptr_ptr)); /* 60 */
-    void (*png_destroy_read_struct) _ANSI_ARGS_((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* 61 */
-    void (*png_read_destroy) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)); /* 62 */
-    void (*png_destroy_write_struct) _ANSI_ARGS_((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* 63 */
-    void *reserved64;
-    void (*png_write_destroy) _ANSI_ARGS_((png_structp png_ptr)); /* 65 */
-    void (*png_set_crc_action) _ANSI_ARGS_((png_structp png_ptr, int crit_action, int ancil_action)); /* 66 */
-    void (*png_set_filter) _ANSI_ARGS_((png_structp png_ptr, int method, int filters)); /* 67 */
-    void (*png_set_filter_heuristics) _ANSI_ARGS_((png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, png_doublep filter_costs)); /* 68 */
-    void (*png_set_compression_level) _ANSI_ARGS_((png_structp png_ptr, int level)); /* 69 */
-    void (*png_set_compression_mem_level) _ANSI_ARGS_((png_structp png_ptr, int mem_level)); /* 70 */
-    void (*png_set_compression_strategy) _ANSI_ARGS_((png_structp png_ptr, int strategy)); /* 71 */
-    void (*png_set_compression_window_bits) _ANSI_ARGS_((png_structp png_ptr, int window_bits)); /* 72 */
-    void (*png_set_compression_method) _ANSI_ARGS_((png_structp png_ptr, int method)); /* 73 */
-    void (*png_init_io) _ANSI_ARGS_((png_structp png_ptr, png_FILE_p fp)); /* 74 */
-    void (*png_set_error_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* 75 */
-    png_voidp (*png_get_error_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 76 */
-    void (*png_set_write_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* 77 */
-    void (*png_set_read_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)); /* 78 */
-    png_voidp (*png_get_io_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 79 */
-    void (*png_set_read_status_fn) _ANSI_ARGS_((png_structp png_ptr, png_read_status_ptr read_row_fn)); /* 80 */
-    void (*png_set_write_status_fn) _ANSI_ARGS_((png_structp png_ptr, png_write_status_ptr write_row_fn)); /* 81 */
-    void (*png_set_mem_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* 82 */
-    png_voidp (*png_get_mem_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 83 */
-    void (*png_set_read_user_transform_fn) _ANSI_ARGS_((png_structp png_ptr, png_user_transform_ptr read_user_transform_fn)); /* 84 */
-    void (*png_set_write_user_transform_fn) _ANSI_ARGS_((png_structp png_ptr, png_user_transform_ptr write_user_transform_fn)); /* 85 */
-    void (*png_set_user_transform_info) _ANSI_ARGS_((png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); /* 86 */
-    png_voidp (*png_get_user_transform_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 87 */
-    void (*png_set_read_user_chunk_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); /* 88 */
-    png_voidp (*png_get_user_chunk_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 89 */
-    void (*png_set_progressive_read_fn) _ANSI_ARGS_((png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); /* 90 */
-    png_voidp (*png_get_progressive_ptr) _ANSI_ARGS_((png_structp png_ptr)); /* 91 */
-    void (*png_process_data) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); /* 92 */
-    void (*png_progressive_combine_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep old_row, png_bytep new_row)); /* 93 */
-    png_voidp (*png_malloc) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 size)); /* 94 */
-    void (*png_free) _ANSI_ARGS_((png_structp png_ptr, png_voidp ptr)); /* 95 */
-    void (*png_free_data) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); /* 96 */
-    void (*png_data_freer) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); /* 97 */
-    png_voidp (*png_malloc_default) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 size)); /* 98 */
-    void (*png_free_default) _ANSI_ARGS_((png_structp png_ptr, png_voidp ptr)); /* 99 */
-    png_voidp (*png_memcpy_check) _ANSI_ARGS_((png_structp png_ptr, png_voidp s1, png_voidp s2, png_uint_32 size)); /* 100 */
-    png_voidp (*png_memset_check) _ANSI_ARGS_((png_structp png_ptr, png_voidp s1, int value, png_uint_32 size)); /* 101 */
-    void * (*png_far_to_near) _ANSI_ARGS_((png_structp png_ptr, png_voidp ptr, int check)); /* 102 */
-    void (*png_error) _ANSI_ARGS_((png_structp png_ptr, png_const_charp error)); /* 103 */
-    void (*png_chunk_error) _ANSI_ARGS_((png_structp png_ptr, png_const_charp error)); /* 104 */
-    void (*png_warning) _ANSI_ARGS_((png_structp png_ptr, png_const_charp message)); /* 105 */
-    void (*png_chunk_warning) _ANSI_ARGS_((png_structp png_ptr, png_const_charp message)); /* 106 */
-    png_uint_32 (*png_get_valid) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)); /* 107 */
-    png_uint_32 (*png_get_rowbytes) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 108 */
-    png_bytepp (*png_get_rows) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 109 */
-    void (*png_set_rows) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)); /* 110 */
-    png_byte (*png_get_channels) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 111 */
-    png_uint_32 (*png_get_image_width) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 112 */
-    png_uint_32 (*png_get_image_height) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 113 */
-    png_byte (*png_get_bit_depth) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 114 */
-    png_byte (*png_get_color_type) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 115 */
-    png_byte (*png_get_filter_type) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 116 */
-    png_byte (*png_get_interlace_type) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 117 */
-    png_byte (*png_get_compression_type) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 118 */
-    png_uint_32 (*png_get_pixels_per_meter) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 119 */
-    png_uint_32 (*png_get_x_pixels_per_meter) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 120 */
-    png_uint_32 (*png_get_y_pixels_per_meter) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 121 */
-    float (*png_get_pixel_aspect_ratio) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 122 */
-    png_int_32 (*png_get_x_offset_pixels) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 123 */
-    png_int_32 (*png_get_y_offset_pixels) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 124 */
-    png_int_32 (*png_get_x_offset_microns) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 125 */
-    png_int_32 (*png_get_y_offset_microns) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 126 */
-    png_bytep (*png_get_signature) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 127 */
-    png_uint_32 (*png_get_bKGD) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_color_16p* background)); /* 128 */
-    void (*png_set_bKGD) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_color_16p background)); /* 129 */
-    png_uint_32 (*png_get_cHRM) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, double * white_x, double * white_y, double * red_x, double * red_y, double * green_x, double * green_y, double * blue_x, double * blue_y)); /* 130 */
-    png_uint_32 (*png_get_cHRM_fixed) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_fixed_point * int_white_x, png_fixed_point * int_white_y, png_fixed_point * int_red_x, png_fixed_point * int_red_y, png_fixed_point * int_green_x, png_fixed_point * int_green_y, png_fixed_point * int_blue_x, png_fixed_point * int_blue_y)); /* 131 */
-    void (*png_set_cHRM) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); /* 132 */
-    void (*png_set_cHRM_fixed) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); /* 133 */
-    png_uint_32 (*png_get_gAMA) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, double * file_gamma)); /* 134 */
-    png_uint_32 (*png_get_gAMA_fixed) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_fixed_point* int_file_gamma)); /* 135 */
-    void (*png_set_gAMA) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, double file_gamma)); /* 136 */
-    void (*png_set_gAMA_fixed) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)); /* 137 */
-    png_uint_32 (*png_get_hIST) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_16p * hist)); /* 138 */
-    void (*png_set_hIST) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)); /* 139 */
-    png_uint_32 (*png_get_IHDR) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 * width, png_uint_32 * height, int * bit_depth, int * color_type, int * interlace_type, int * compression_type, int * filter_type)); /* 140 */
-    void (*png_set_IHDR) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)); /* 141 */
-    png_uint_32 (*png_get_oFFs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_int_32 * offset_x, png_int_32 * offset_y, int * unit_type)); /* 142 */
-    void (*png_set_oFFs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); /* 143 */
-    png_uint_32 (*png_get_pCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_charp * purpose, png_int_32 * X0, png_int_32 * X1, int * type, int * nparams, png_charp * units, png_charpp * params)); /* 144 */
-    void (*png_set_pCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); /* 145 */
-    png_uint_32 (*png_get_pHYs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 * res_x, png_uint_32 * res_y, int * unit_type)); /* 146 */
-    void (*png_set_pHYs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); /* 147 */
-    png_uint_32 (*png_get_PLTE) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_colorp * palette, int * num_palette)); /* 148 */
-    void (*png_set_PLTE) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)); /* 149 */
-    png_uint_32 (*png_get_sBIT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_color_8p* sig_bit)); /* 150 */
-    void (*png_set_sBIT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)); /* 151 */
-    png_uint_32 (*png_get_sRGB) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int * intent)); /* 152 */
-    void (*png_set_sRGB) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int intent)); /* 153 */
-    void (*png_set_sRGB_gAMA_and_cHRM) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int intent)); /* 154 */
-    png_uint_32 (*png_get_iCCP) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_charpp name, int * compression_type, png_charpp profile, png_uint_32 * proflen)); /* 155 */
-    void (*png_set_iCCP) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)); /* 156 */
-    png_uint_32 (*png_get_sPLT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries)); /* 157 */
-    void (*png_set_sPLT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)); /* 158 */
-    png_uint_32 (*png_get_text) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_textp * text_ptr, int * num_text)); /* 159 */
-    void (*png_set_text) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)); /* 160 */
-    png_uint_32 (*png_get_tIME) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_timep * mod_time)); /* 161 */
-    void (*png_set_tIME) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_timep mod_time)); /* 162 */
-    png_uint_32 (*png_get_tRNS) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_bytep * trans, int * num_trans, png_color_16p * trans_values)); /* 163 */
-    void (*png_set_tRNS) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_bytep trans, int num_trans, png_color_16p trans_values)); /* 164 */
-    png_uint_32 (*png_get_sCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int * unit, double * width, double * height)); /* 165 */
-    png_uint_32 (*png_get_sCAL_s) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int * unit, png_charpp swidth, png_charpp sheight)); /* 166 */
-    void (*png_set_sCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)); /* 167 */
-    void (*png_set_sCAL_s) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); /* 168 */
-    void (*png_set_keep_unknown_chunks) _ANSI_ARGS_((png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks)); /* 169 */
-    void (*png_set_unknown_chunks) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); /* 170 */
-    void (*png_set_unknown_chunk_location) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); /* 171 */
-    png_uint_32 (*png_get_unknown_chunks) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); /* 172 */
-    void (*png_set_invalid) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int mask)); /* 173 */
-    void (*png_read_png) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)); /* 174 */
-    void (*png_write_png) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, int transforms, voidp params)); /* 175 */
-    png_bytep (*png_sig_bytes) _ANSI_ARGS_((void)); /* 176 */
-    png_charp (*png_get_copyright) _ANSI_ARGS_((png_structp png_ptr)); /* 177 */
-    png_charp (*png_get_header_ver) _ANSI_ARGS_((png_structp png_ptr)); /* 178 */
-    png_charp (*png_get_header_version) _ANSI_ARGS_((png_structp png_ptr)); /* 179 */
-    png_charp (*png_get_libpng_ver) _ANSI_ARGS_((png_structp png_ptr)); /* 180 */
-    png_int_32 (*png_get_int_32) _ANSI_ARGS_((png_bytep buf)); /* 181 */
-    png_uint_32 (*png_get_uint_32) _ANSI_ARGS_((png_bytep buf)); /* 182 */
-    png_uint_16 (*png_get_uint_16) _ANSI_ARGS_((png_bytep buf)); /* 183 */
-    void (*png_read_init) _ANSI_ARGS_((png_structp png_ptr)); /* 184 */
-    void (*png_read_init_2) _ANSI_ARGS_((png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size)); /* 185 */
-    void (*png_write_init) _ANSI_ARGS_((png_structp png_ptr)); /* 186 */
-    void (*png_write_init_2) _ANSI_ARGS_((png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size)); /* 187 */
-    png_voidp (*png_create_struct) _ANSI_ARGS_((int type)); /* 188 */
-    void (*png_destroy_struct) _ANSI_ARGS_((png_voidp struct_ptr)); /* 189 */
-    png_voidp (*png_create_struct_2) _ANSI_ARGS_((int type, png_malloc_ptr malloc_fn)); /* 190 */
-    void (*png_destroy_struct_2) _ANSI_ARGS_((png_voidp struct_ptr, png_free_ptr free_fn)); /* 191 */
-    void (*png_info_destroy) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 192 */
-    voidpf (*png_zalloc) _ANSI_ARGS_((voidpf png_ptr, uInt items, uInt size)); /* 193 */
-    void (*png_zfree) _ANSI_ARGS_((voidpf png_ptr, voidpf ptr)); /* 194 */
-    void (*png_reset_crc) _ANSI_ARGS_((png_structp png_ptr)); /* 195 */
-    void (*png_write_data) _ANSI_ARGS_((png_structp png_ptr, png_bytep data, png_size_t length)); /* 196 */
-    void (*png_read_data) _ANSI_ARGS_((png_structp png_ptr, png_bytep data, png_size_t length)); /* 197 */
-    void (*png_crc_read) _ANSI_ARGS_((png_structp png_ptr, png_bytep buf, png_size_t length)); /* 198 */
-    png_charp (*png_decompress_chunk) _ANSI_ARGS_((png_structp png_ptr, int comp_type, png_charp chunkdata, png_size_t chunklength, png_size_t prefix_length, png_size_t * data_length)); /* 199 */
-    int (*png_crc_finish) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 skip)); /* 200 */
-    int (*png_crc_error) _ANSI_ARGS_((png_structp png_ptr)); /* 201 */
-    void (*png_calculate_crc) _ANSI_ARGS_((png_structp png_ptr, png_bytep ptr, png_size_t length)); /* 202 */
-    void (*png_flush) _ANSI_ARGS_((png_structp png_ptr)); /* 203 */
-    void (*png_save_uint_32) _ANSI_ARGS_((png_bytep buf, png_uint_32 i)); /* 204 */
-    void (*png_save_int_32) _ANSI_ARGS_((png_bytep buf, png_int_32 i)); /* 205 */
-    void (*png_save_uint_16) _ANSI_ARGS_((png_bytep buf, unsigned int i)); /* 206 */
-    void (*png_write_sig) _ANSI_ARGS_((png_structp png_ptr)); /* 207 */
-    void (*png_write_IHDR) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_type, int filter_type, int interlace_type)); /* 208 */
-    void (*png_write_PLTE) _ANSI_ARGS_((png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)); /* 209 */
-    void (*png_write_IDAT) _ANSI_ARGS_((png_structp png_ptr, png_bytep data, png_size_t length)); /* 210 */
-    void (*png_write_IEND) _ANSI_ARGS_((png_structp png_ptr)); /* 211 */
-    void (*png_write_gAMA) _ANSI_ARGS_((png_structp png_ptr, double file_gamma)); /* 212 */
-    void (*png_write_gAMA_fixed) _ANSI_ARGS_((png_structp png_ptr, png_fixed_point file_gamma)); /* 213 */
-    void (*png_write_sBIT) _ANSI_ARGS_((png_structp png_ptr, png_color_8p sbit, int color_type)); /* 214 */
-    void (*png_write_cHRM) _ANSI_ARGS_((png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); /* 215 */
-    void (*png_write_cHRM_fixed) _ANSI_ARGS_((png_structp png_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); /* 216 */
-    void (*png_write_sRGB) _ANSI_ARGS_((png_structp png_ptr, int intent)); /* 217 */
-    void (*png_write_iCCP) _ANSI_ARGS_((png_structp png_ptr, png_charp name, int compression_type, png_charp profile, int proflen)); /* 218 */
-    void (*png_write_sPLT) _ANSI_ARGS_((png_structp png_ptr, png_sPLT_tp palette)); /* 219 */
-    void (*png_write_tRNS) _ANSI_ARGS_((png_structp png_ptr, png_bytep trans, png_color_16p values, int number, int color_type)); /* 220 */
-    void (*png_write_bKGD) _ANSI_ARGS_((png_structp png_ptr, png_color_16p values, int color_type)); /* 221 */
-    void (*png_write_hIST) _ANSI_ARGS_((png_structp png_ptr, png_uint_16p hist, int num_hist)); /* 222 */
-    png_size_t (*png_check_keyword) _ANSI_ARGS_((png_structp png_ptr, png_charp key, png_charpp new_key)); /* 223 */
-    void (*png_write_tEXt) _ANSI_ARGS_((png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len)); /* 224 */
-    void (*png_write_zTXt) _ANSI_ARGS_((png_structp png_ptr, png_charp key, png_size_t text_len, int compression)); /* 225 */
-    void (*png_write_iTXt) _ANSI_ARGS_((png_structp png_ptr, int compression, png_charp key, png_charp lang, png_charp lang_key, png_charp text)); /* 226 */
-    void (*png_write_oFFs) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 x_offset, png_uint_32 y_offset, int unit_type)); /* 227 */
-    void (*png_write_pCAL) _ANSI_ARGS_((png_structp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); /* 228 */
-    void (*png_write_pHYs) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type)); /* 229 */
-    void (*png_write_tIME) _ANSI_ARGS_((png_structp png_ptr, png_timep mod_time)); /* 230 */
-    void (*png_write_sCAL) _ANSI_ARGS_((png_structp png_ptr, int unit, double width, double height)); /* 231 */
-    void (*png_write_sCAL_s) _ANSI_ARGS_((png_structp png_ptr, int unit, png_charp width, png_charp height)); /* 232 */
-    void (*png_write_finish_row) _ANSI_ARGS_((png_structp png_ptr)); /* 233 */
-    void (*png_write_start_row) _ANSI_ARGS_((png_structp png_ptr)); /* 234 */
-    void (*png_build_gamma_table) _ANSI_ARGS_((png_structp png_ptr)); /* 235 */
-    void (*png_combine_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep row, int mask)); /* 236 */
-    void (*png_do_read_interlace) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, int pass, png_uint_32 transformations)); /* 237 */
-    void (*png_do_write_interlace) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); /* 238 */
-    void (*png_read_filter_row) _ANSI_ARGS_((png_structp png_ptr, png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); /* 239 */
-    void (*png_write_find_filter) _ANSI_ARGS_((png_structp png_ptr, png_row_infop row_info)); /* 240 */
-    void (*png_write_filtered_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep filtered_row)); /* 241 */
-    void (*png_read_finish_row) _ANSI_ARGS_((png_structp png_ptr)); /* 242 */
-    void (*png_read_start_row) _ANSI_ARGS_((png_structp png_ptr)); /* 243 */
-    void (*png_read_transform_info) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 244 */
-    void (*png_do_read_filler) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_uint_32 filler, png_uint_32 flags)); /* 245 */
-    void (*png_do_read_swap_alpha) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 246 */
-    void (*png_do_write_swap_alpha) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 247 */
-    void (*png_do_read_invert_alpha) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 248 */
-    void (*png_do_write_invert_alpha) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 249 */
-    void (*png_do_strip_filler) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_uint_32 flags)); /* 250 */
-    void (*png_do_swap) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 251 */
-    void (*png_do_packswap) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 252 */
-    int (*png_do_rgb_to_gray) _ANSI_ARGS_((png_structp png_ptr, png_row_infop row_info, png_bytep row)); /* 253 */
-    void (*png_do_gray_to_rgb) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 254 */
-    void (*png_do_unpack) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 255 */
-    void (*png_do_unshift) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_color_8p sig_bits)); /* 256 */
-    void (*png_do_invert) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 257 */
-    void (*png_do_chop) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 258 */
-    void (*png_do_dither) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); /* 259 */
-    void (*png_correct_palette) _ANSI_ARGS_((png_structp png_ptr, png_colorp palette, int num_palette)); /* 260 */
-    void (*png_do_bgr) _ANSI_ARGS_((png_row_infop row_info, png_bytep row)); /* 261 */
-    void (*png_do_pack) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)); /* 262 */
-    void (*png_do_shift) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_color_8p bit_depth)); /* 263 */
-    void (*png_do_background) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_color_16p trans_values, png_color_16p background, png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, png_uint_16pp gamma_16_to_1, int gamma_shift)); /* 264 */
-    void (*png_do_gamma) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_bytep gamma_table, png_uint_16pp gamma_16_table, int gamma_shift)); /* 265 */
-    void (*png_do_expand_palette) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); /* 266 */
-    void (*png_do_expand) _ANSI_ARGS_((png_row_infop row_info, png_bytep row, png_color_16p trans_value)); /* 267 */
-    void (*png_handle_IHDR) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 268 */
-    void (*png_handle_PLTE) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 269 */
-    void (*png_handle_IEND) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 270 */
-    void (*png_handle_bKGD) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 271 */
-    void (*png_handle_cHRM) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 272 */
-    void (*png_handle_gAMA) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 273 */
-    void (*png_handle_hIST) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 274 */
-    void (*png_handle_iCCP) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 275 */
-    void (*png_handle_iTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 276 */
-    void (*png_handle_oFFs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 277 */
-    void (*png_handle_pCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 278 */
-    void (*png_handle_pHYs) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 279 */
-    void (*png_handle_sBIT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 280 */
-    void (*png_handle_sCAL) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 281 */
-    void (*png_handle_sPLT) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 282 */
-    void (*png_handle_sRGB) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 283 */
-    void (*png_handle_tEXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 284 */
-    void (*png_handle_tIME) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 285 */
-    void (*png_handle_tRNS) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 286 */
-    void (*png_handle_zTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 287 */
-    int (*png_handle_as_unknown) _ANSI_ARGS_((png_structp png_ptr, png_bytep chunk_name)); /* 288 */
-    void (*png_handle_unknown) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 289 */
-    void (*png_check_chunk_name) _ANSI_ARGS_((png_structp png_ptr, png_bytep chunk_name)); /* 290 */
-    void (*png_do_read_transformations) _ANSI_ARGS_((png_structp png_ptr)); /* 291 */
-    void (*png_do_write_transformations) _ANSI_ARGS_((png_structp png_ptr)); /* 292 */
-    void (*png_init_read_transformations) _ANSI_ARGS_((png_structp png_ptr)); /* 293 */
-    void (*png_push_read_chunk) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 294 */
-    void (*png_push_read_sig) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 295 */
-    void (*png_push_check_crc) _ANSI_ARGS_((png_structp png_ptr)); /* 296 */
-    void (*png_push_crc_skip) _ANSI_ARGS_((png_structp png_ptr, png_uint_32 length)); /* 297 */
-    void (*png_push_crc_finish) _ANSI_ARGS_((png_structp png_ptr)); /* 298 */
-    void (*png_push_fill_buffer) _ANSI_ARGS_((png_structp png_ptr, png_bytep buffer, png_size_t length)); /* 299 */
-    void (*png_push_save_buffer) _ANSI_ARGS_((png_structp png_ptr)); /* 300 */
-    void (*png_push_restore_buffer) _ANSI_ARGS_((png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)); /* 301 */
-    void (*png_push_read_IDAT) _ANSI_ARGS_((png_structp png_ptr)); /* 302 */
-    void (*png_process_IDAT_data) _ANSI_ARGS_((png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)); /* 303 */
-    void (*png_push_process_row) _ANSI_ARGS_((png_structp png_ptr)); /* 304 */
-    void (*png_push_handle_unknown) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 305 */
-    void (*png_push_have_info) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 306 */
-    void (*png_push_have_end) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 307 */
-    void (*png_push_have_row) _ANSI_ARGS_((png_structp png_ptr, png_bytep row)); /* 308 */
-    void (*png_push_read_end) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 309 */
-    void (*png_process_some_data) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 310 */
-    void (*png_read_push_finish_row) _ANSI_ARGS_((png_structp png_ptr)); /* 311 */
-    void (*png_push_handle_tEXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 312 */
-    void (*png_push_read_tEXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 313 */
-    void (*png_push_handle_zTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 314 */
-    void (*png_push_read_zTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr)); /* 315 */
-    void (*png_push_handle_iTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 316 */
-    void (*png_push_read_iTXt) _ANSI_ARGS_((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); /* 317 */
-} PngtclStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern PngtclStubs *pngtclStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_PNGTCL_STUBS) && !defined(USE_PNGTCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef png_access_version_number
-#define png_access_version_number \
-	(pngtclStubsPtr->png_access_version_number) /* 0 */
-#endif
-#ifndef png_set_sig_bytes
-#define png_set_sig_bytes \
-	(pngtclStubsPtr->png_set_sig_bytes) /* 1 */
-#endif
-#ifndef png_sig_cmp
-#define png_sig_cmp \
-	(pngtclStubsPtr->png_sig_cmp) /* 2 */
-#endif
-#ifndef png_check_sig
-#define png_check_sig \
-	(pngtclStubsPtr->png_check_sig) /* 3 */
-#endif
-#ifndef png_create_read_struct
-#define png_create_read_struct \
-	(pngtclStubsPtr->png_create_read_struct) /* 4 */
-#endif
-#ifndef png_create_write_struct
-#define png_create_write_struct \
-	(pngtclStubsPtr->png_create_write_struct) /* 5 */
-#endif
-#ifndef png_get_compression_buffer_size
-#define png_get_compression_buffer_size \
-	(pngtclStubsPtr->png_get_compression_buffer_size) /* 6 */
-#endif
-#ifndef png_set_compression_buffer_size
-#define png_set_compression_buffer_size \
-	(pngtclStubsPtr->png_set_compression_buffer_size) /* 7 */
-#endif
-#ifndef png_reset_zstream
-#define png_reset_zstream \
-	(pngtclStubsPtr->png_reset_zstream) /* 8 */
-#endif
-#ifndef png_create_read_struct_2
-#define png_create_read_struct_2 \
-	(pngtclStubsPtr->png_create_read_struct_2) /* 9 */
-#endif
-#ifndef png_create_write_struct_2
-#define png_create_write_struct_2 \
-	(pngtclStubsPtr->png_create_write_struct_2) /* 10 */
-#endif
-#ifndef png_write_chunk
-#define png_write_chunk \
-	(pngtclStubsPtr->png_write_chunk) /* 11 */
-#endif
-#ifndef png_write_chunk_start
-#define png_write_chunk_start \
-	(pngtclStubsPtr->png_write_chunk_start) /* 12 */
-#endif
-#ifndef png_write_chunk_data
-#define png_write_chunk_data \
-	(pngtclStubsPtr->png_write_chunk_data) /* 13 */
-#endif
-#ifndef png_write_chunk_end
-#define png_write_chunk_end \
-	(pngtclStubsPtr->png_write_chunk_end) /* 14 */
-#endif
-#ifndef png_create_info_struct
-#define png_create_info_struct \
-	(pngtclStubsPtr->png_create_info_struct) /* 15 */
-#endif
-#ifndef png_info_init
-#define png_info_init \
-	(pngtclStubsPtr->png_info_init) /* 16 */
-#endif
-#ifndef png_write_info_before_PLTE
-#define png_write_info_before_PLTE \
-	(pngtclStubsPtr->png_write_info_before_PLTE) /* 17 */
-#endif
-#ifndef png_write_info
-#define png_write_info \
-	(pngtclStubsPtr->png_write_info) /* 18 */
-#endif
-#ifndef png_read_info
-#define png_read_info \
-	(pngtclStubsPtr->png_read_info) /* 19 */
-#endif
-#ifndef png_convert_to_rfc1123
-#define png_convert_to_rfc1123 \
-	(pngtclStubsPtr->png_convert_to_rfc1123) /* 20 */
-#endif
-#ifndef png_convert_from_struct_tm
-#define png_convert_from_struct_tm \
-	(pngtclStubsPtr->png_convert_from_struct_tm) /* 21 */
-#endif
-#ifndef png_convert_from_time_t
-#define png_convert_from_time_t \
-	(pngtclStubsPtr->png_convert_from_time_t) /* 22 */
-#endif
-#ifndef png_set_expand
-#define png_set_expand \
-	(pngtclStubsPtr->png_set_expand) /* 23 */
-#endif
-#ifndef png_set_gray_1_2_4_to_8
-#define png_set_gray_1_2_4_to_8 \
-	(pngtclStubsPtr->png_set_gray_1_2_4_to_8) /* 24 */
-#endif
-#ifndef png_set_palette_to_rgb
-#define png_set_palette_to_rgb \
-	(pngtclStubsPtr->png_set_palette_to_rgb) /* 25 */
-#endif
-#ifndef png_set_tRNS_to_alpha
-#define png_set_tRNS_to_alpha \
-	(pngtclStubsPtr->png_set_tRNS_to_alpha) /* 26 */
-#endif
-#ifndef png_set_bgr
-#define png_set_bgr \
-	(pngtclStubsPtr->png_set_bgr) /* 27 */
-#endif
-#ifndef png_set_gray_to_rgb
-#define png_set_gray_to_rgb \
-	(pngtclStubsPtr->png_set_gray_to_rgb) /* 28 */
-#endif
-#ifndef png_set_rgb_to_gray
-#define png_set_rgb_to_gray \
-	(pngtclStubsPtr->png_set_rgb_to_gray) /* 29 */
-#endif
-#ifndef png_set_rgb_to_gray_fixed
-#define png_set_rgb_to_gray_fixed \
-	(pngtclStubsPtr->png_set_rgb_to_gray_fixed) /* 30 */
-#endif
-#ifndef png_get_rgb_to_gray_status
-#define png_get_rgb_to_gray_status \
-	(pngtclStubsPtr->png_get_rgb_to_gray_status) /* 31 */
-#endif
-#ifndef png_build_grayscale_palette
-#define png_build_grayscale_palette \
-	(pngtclStubsPtr->png_build_grayscale_palette) /* 32 */
-#endif
-#ifndef png_set_strip_alpha
-#define png_set_strip_alpha \
-	(pngtclStubsPtr->png_set_strip_alpha) /* 33 */
-#endif
-#ifndef png_set_swap_alpha
-#define png_set_swap_alpha \
-	(pngtclStubsPtr->png_set_swap_alpha) /* 34 */
-#endif
-#ifndef png_set_invert_alpha
-#define png_set_invert_alpha \
-	(pngtclStubsPtr->png_set_invert_alpha) /* 35 */
-#endif
-#ifndef png_set_filler
-#define png_set_filler \
-	(pngtclStubsPtr->png_set_filler) /* 36 */
-#endif
-#ifndef png_set_swap
-#define png_set_swap \
-	(pngtclStubsPtr->png_set_swap) /* 37 */
-#endif
-#ifndef png_set_packing
-#define png_set_packing \
-	(pngtclStubsPtr->png_set_packing) /* 38 */
-#endif
-#ifndef png_set_packswap
-#define png_set_packswap \
-	(pngtclStubsPtr->png_set_packswap) /* 39 */
-#endif
-#ifndef png_set_shift
-#define png_set_shift \
-	(pngtclStubsPtr->png_set_shift) /* 40 */
-#endif
-#ifndef png_set_interlace_handling
-#define png_set_interlace_handling \
-	(pngtclStubsPtr->png_set_interlace_handling) /* 41 */
-#endif
-#ifndef png_set_invert_mono
-#define png_set_invert_mono \
-	(pngtclStubsPtr->png_set_invert_mono) /* 42 */
-#endif
-#ifndef png_set_background
-#define png_set_background \
-	(pngtclStubsPtr->png_set_background) /* 43 */
-#endif
-#ifndef png_set_strip_16
-#define png_set_strip_16 \
-	(pngtclStubsPtr->png_set_strip_16) /* 44 */
-#endif
-#ifndef png_set_dither
-#define png_set_dither \
-	(pngtclStubsPtr->png_set_dither) /* 45 */
-#endif
-#ifndef png_set_gamma
-#define png_set_gamma \
-	(pngtclStubsPtr->png_set_gamma) /* 46 */
-#endif
-#ifndef png_permit_empty_plte
-#define png_permit_empty_plte \
-	(pngtclStubsPtr->png_permit_empty_plte) /* 47 */
-#endif
-#ifndef png_set_flush
-#define png_set_flush \
-	(pngtclStubsPtr->png_set_flush) /* 48 */
-#endif
-#ifndef png_write_flush
-#define png_write_flush \
-	(pngtclStubsPtr->png_write_flush) /* 49 */
-#endif
-#ifndef png_start_read_image
-#define png_start_read_image \
-	(pngtclStubsPtr->png_start_read_image) /* 50 */
-#endif
-#ifndef png_read_update_info
-#define png_read_update_info \
-	(pngtclStubsPtr->png_read_update_info) /* 51 */
-#endif
-#ifndef png_read_rows
-#define png_read_rows \
-	(pngtclStubsPtr->png_read_rows) /* 52 */
-#endif
-#ifndef png_read_row
-#define png_read_row \
-	(pngtclStubsPtr->png_read_row) /* 53 */
-#endif
-#ifndef png_read_image
-#define png_read_image \
-	(pngtclStubsPtr->png_read_image) /* 54 */
-#endif
-#ifndef png_write_row
-#define png_write_row \
-	(pngtclStubsPtr->png_write_row) /* 55 */
-#endif
-#ifndef png_write_rows
-#define png_write_rows \
-	(pngtclStubsPtr->png_write_rows) /* 56 */
-#endif
-#ifndef png_write_image
-#define png_write_image \
-	(pngtclStubsPtr->png_write_image) /* 57 */
-#endif
-#ifndef png_write_end
-#define png_write_end \
-	(pngtclStubsPtr->png_write_end) /* 58 */
-#endif
-#ifndef png_read_end
-#define png_read_end \
-	(pngtclStubsPtr->png_read_end) /* 59 */
-#endif
-#ifndef png_destroy_info_struct
-#define png_destroy_info_struct \
-	(pngtclStubsPtr->png_destroy_info_struct) /* 60 */
-#endif
-#ifndef png_destroy_read_struct
-#define png_destroy_read_struct \
-	(pngtclStubsPtr->png_destroy_read_struct) /* 61 */
-#endif
-#ifndef png_read_destroy
-#define png_read_destroy \
-	(pngtclStubsPtr->png_read_destroy) /* 62 */
-#endif
-#ifndef png_destroy_write_struct
-#define png_destroy_write_struct \
-	(pngtclStubsPtr->png_destroy_write_struct) /* 63 */
-#endif
-/* Slot 64 is reserved */
-#ifndef png_write_destroy
-#define png_write_destroy \
-	(pngtclStubsPtr->png_write_destroy) /* 65 */
-#endif
-#ifndef png_set_crc_action
-#define png_set_crc_action \
-	(pngtclStubsPtr->png_set_crc_action) /* 66 */
-#endif
-#ifndef png_set_filter
-#define png_set_filter \
-	(pngtclStubsPtr->png_set_filter) /* 67 */
-#endif
-#ifndef png_set_filter_heuristics
-#define png_set_filter_heuristics \
-	(pngtclStubsPtr->png_set_filter_heuristics) /* 68 */
-#endif
-#ifndef png_set_compression_level
-#define png_set_compression_level \
-	(pngtclStubsPtr->png_set_compression_level) /* 69 */
-#endif
-#ifndef png_set_compression_mem_level
-#define png_set_compression_mem_level \
-	(pngtclStubsPtr->png_set_compression_mem_level) /* 70 */
-#endif
-#ifndef png_set_compression_strategy
-#define png_set_compression_strategy \
-	(pngtclStubsPtr->png_set_compression_strategy) /* 71 */
-#endif
-#ifndef png_set_compression_window_bits
-#define png_set_compression_window_bits \
-	(pngtclStubsPtr->png_set_compression_window_bits) /* 72 */
-#endif
-#ifndef png_set_compression_method
-#define png_set_compression_method \
-	(pngtclStubsPtr->png_set_compression_method) /* 73 */
-#endif
-#ifndef png_init_io
-#define png_init_io \
-	(pngtclStubsPtr->png_init_io) /* 74 */
-#endif
-#ifndef png_set_error_fn
-#define png_set_error_fn \
-	(pngtclStubsPtr->png_set_error_fn) /* 75 */
-#endif
-#ifndef png_get_error_ptr
-#define png_get_error_ptr \
-	(pngtclStubsPtr->png_get_error_ptr) /* 76 */
-#endif
-#ifndef png_set_write_fn
-#define png_set_write_fn \
-	(pngtclStubsPtr->png_set_write_fn) /* 77 */
-#endif
-#ifndef png_set_read_fn
-#define png_set_read_fn \
-	(pngtclStubsPtr->png_set_read_fn) /* 78 */
-#endif
-#ifndef png_get_io_ptr
-#define png_get_io_ptr \
-	(pngtclStubsPtr->png_get_io_ptr) /* 79 */
-#endif
-#ifndef png_set_read_status_fn
-#define png_set_read_status_fn \
-	(pngtclStubsPtr->png_set_read_status_fn) /* 80 */
-#endif
-#ifndef png_set_write_status_fn
-#define png_set_write_status_fn \
-	(pngtclStubsPtr->png_set_write_status_fn) /* 81 */
-#endif
-#ifndef png_set_mem_fn
-#define png_set_mem_fn \
-	(pngtclStubsPtr->png_set_mem_fn) /* 82 */
-#endif
-#ifndef png_get_mem_ptr
-#define png_get_mem_ptr \
-	(pngtclStubsPtr->png_get_mem_ptr) /* 83 */
-#endif
-#ifndef png_set_read_user_transform_fn
-#define png_set_read_user_transform_fn \
-	(pngtclStubsPtr->png_set_read_user_transform_fn) /* 84 */
-#endif
-#ifndef png_set_write_user_transform_fn
-#define png_set_write_user_transform_fn \
-	(pngtclStubsPtr->png_set_write_user_transform_fn) /* 85 */
-#endif
-#ifndef png_set_user_transform_info
-#define png_set_user_transform_info \
-	(pngtclStubsPtr->png_set_user_transform_info) /* 86 */
-#endif
-#ifndef png_get_user_transform_ptr
-#define png_get_user_transform_ptr \
-	(pngtclStubsPtr->png_get_user_transform_ptr) /* 87 */
-#endif
-#ifndef png_set_read_user_chunk_fn
-#define png_set_read_user_chunk_fn \
-	(pngtclStubsPtr->png_set_read_user_chunk_fn) /* 88 */
-#endif
-#ifndef png_get_user_chunk_ptr
-#define png_get_user_chunk_ptr \
-	(pngtclStubsPtr->png_get_user_chunk_ptr) /* 89 */
-#endif
-#ifndef png_set_progressive_read_fn
-#define png_set_progressive_read_fn \
-	(pngtclStubsPtr->png_set_progressive_read_fn) /* 90 */
-#endif
-#ifndef png_get_progressive_ptr
-#define png_get_progressive_ptr \
-	(pngtclStubsPtr->png_get_progressive_ptr) /* 91 */
-#endif
-#ifndef png_process_data
-#define png_process_data \
-	(pngtclStubsPtr->png_process_data) /* 92 */
-#endif
-#ifndef png_progressive_combine_row
-#define png_progressive_combine_row \
-	(pngtclStubsPtr->png_progressive_combine_row) /* 93 */
-#endif
-#ifndef png_malloc
-#define png_malloc \
-	(pngtclStubsPtr->png_malloc) /* 94 */
-#endif
-#ifndef png_free
-#define png_free \
-	(pngtclStubsPtr->png_free) /* 95 */
-#endif
-#ifndef png_free_data
-#define png_free_data \
-	(pngtclStubsPtr->png_free_data) /* 96 */
-#endif
-#ifndef png_data_freer
-#define png_data_freer \
-	(pngtclStubsPtr->png_data_freer) /* 97 */
-#endif
-#ifndef png_malloc_default
-#define png_malloc_default \
-	(pngtclStubsPtr->png_malloc_default) /* 98 */
-#endif
-#ifndef png_free_default
-#define png_free_default \
-	(pngtclStubsPtr->png_free_default) /* 99 */
-#endif
-#ifndef png_memcpy_check
-#define png_memcpy_check \
-	(pngtclStubsPtr->png_memcpy_check) /* 100 */
-#endif
-#ifndef png_memset_check
-#define png_memset_check \
-	(pngtclStubsPtr->png_memset_check) /* 101 */
-#endif
-#ifndef png_far_to_near
-#define png_far_to_near \
-	(pngtclStubsPtr->png_far_to_near) /* 102 */
-#endif
-#ifndef png_error
-#define png_error \
-	(pngtclStubsPtr->png_error) /* 103 */
-#endif
-#ifndef png_chunk_error
-#define png_chunk_error \
-	(pngtclStubsPtr->png_chunk_error) /* 104 */
-#endif
-#ifndef png_warning
-#define png_warning \
-	(pngtclStubsPtr->png_warning) /* 105 */
-#endif
-#ifndef png_chunk_warning
-#define png_chunk_warning \
-	(pngtclStubsPtr->png_chunk_warning) /* 106 */
-#endif
-#ifndef png_get_valid
-#define png_get_valid \
-	(pngtclStubsPtr->png_get_valid) /* 107 */
-#endif
-#ifndef png_get_rowbytes
-#define png_get_rowbytes \
-	(pngtclStubsPtr->png_get_rowbytes) /* 108 */
-#endif
-#ifndef png_get_rows
-#define png_get_rows \
-	(pngtclStubsPtr->png_get_rows) /* 109 */
-#endif
-#ifndef png_set_rows
-#define png_set_rows \
-	(pngtclStubsPtr->png_set_rows) /* 110 */
-#endif
-#ifndef png_get_channels
-#define png_get_channels \
-	(pngtclStubsPtr->png_get_channels) /* 111 */
-#endif
-#ifndef png_get_image_width
-#define png_get_image_width \
-	(pngtclStubsPtr->png_get_image_width) /* 112 */
-#endif
-#ifndef png_get_image_height
-#define png_get_image_height \
-	(pngtclStubsPtr->png_get_image_height) /* 113 */
-#endif
-#ifndef png_get_bit_depth
-#define png_get_bit_depth \
-	(pngtclStubsPtr->png_get_bit_depth) /* 114 */
-#endif
-#ifndef png_get_color_type
-#define png_get_color_type \
-	(pngtclStubsPtr->png_get_color_type) /* 115 */
-#endif
-#ifndef png_get_filter_type
-#define png_get_filter_type \
-	(pngtclStubsPtr->png_get_filter_type) /* 116 */
-#endif
-#ifndef png_get_interlace_type
-#define png_get_interlace_type \
-	(pngtclStubsPtr->png_get_interlace_type) /* 117 */
-#endif
-#ifndef png_get_compression_type
-#define png_get_compression_type \
-	(pngtclStubsPtr->png_get_compression_type) /* 118 */
-#endif
-#ifndef png_get_pixels_per_meter
-#define png_get_pixels_per_meter \
-	(pngtclStubsPtr->png_get_pixels_per_meter) /* 119 */
-#endif
-#ifndef png_get_x_pixels_per_meter
-#define png_get_x_pixels_per_meter \
-	(pngtclStubsPtr->png_get_x_pixels_per_meter) /* 120 */
-#endif
-#ifndef png_get_y_pixels_per_meter
-#define png_get_y_pixels_per_meter \
-	(pngtclStubsPtr->png_get_y_pixels_per_meter) /* 121 */
-#endif
-#ifndef png_get_pixel_aspect_ratio
-#define png_get_pixel_aspect_ratio \
-	(pngtclStubsPtr->png_get_pixel_aspect_ratio) /* 122 */
-#endif
-#ifndef png_get_x_offset_pixels
-#define png_get_x_offset_pixels \
-	(pngtclStubsPtr->png_get_x_offset_pixels) /* 123 */
-#endif
-#ifndef png_get_y_offset_pixels
-#define png_get_y_offset_pixels \
-	(pngtclStubsPtr->png_get_y_offset_pixels) /* 124 */
-#endif
-#ifndef png_get_x_offset_microns
-#define png_get_x_offset_microns \
-	(pngtclStubsPtr->png_get_x_offset_microns) /* 125 */
-#endif
-#ifndef png_get_y_offset_microns
-#define png_get_y_offset_microns \
-	(pngtclStubsPtr->png_get_y_offset_microns) /* 126 */
-#endif
-#ifndef png_get_signature
-#define png_get_signature \
-	(pngtclStubsPtr->png_get_signature) /* 127 */
-#endif
-#ifndef png_get_bKGD
-#define png_get_bKGD \
-	(pngtclStubsPtr->png_get_bKGD) /* 128 */
-#endif
-#ifndef png_set_bKGD
-#define png_set_bKGD \
-	(pngtclStubsPtr->png_set_bKGD) /* 129 */
-#endif
-#ifndef png_get_cHRM
-#define png_get_cHRM \
-	(pngtclStubsPtr->png_get_cHRM) /* 130 */
-#endif
-#ifndef png_get_cHRM_fixed
-#define png_get_cHRM_fixed \
-	(pngtclStubsPtr->png_get_cHRM_fixed) /* 131 */
-#endif
-#ifndef png_set_cHRM
-#define png_set_cHRM \
-	(pngtclStubsPtr->png_set_cHRM) /* 132 */
-#endif
-#ifndef png_set_cHRM_fixed
-#define png_set_cHRM_fixed \
-	(pngtclStubsPtr->png_set_cHRM_fixed) /* 133 */
-#endif
-#ifndef png_get_gAMA
-#define png_get_gAMA \
-	(pngtclStubsPtr->png_get_gAMA) /* 134 */
-#endif
-#ifndef png_get_gAMA_fixed
-#define png_get_gAMA_fixed \
-	(pngtclStubsPtr->png_get_gAMA_fixed) /* 135 */
-#endif
-#ifndef png_set_gAMA
-#define png_set_gAMA \
-	(pngtclStubsPtr->png_set_gAMA) /* 136 */
-#endif
-#ifndef png_set_gAMA_fixed
-#define png_set_gAMA_fixed \
-	(pngtclStubsPtr->png_set_gAMA_fixed) /* 137 */
-#endif
-#ifndef png_get_hIST
-#define png_get_hIST \
-	(pngtclStubsPtr->png_get_hIST) /* 138 */
-#endif
-#ifndef png_set_hIST
-#define png_set_hIST \
-	(pngtclStubsPtr->png_set_hIST) /* 139 */
-#endif
-#ifndef png_get_IHDR
-#define png_get_IHDR \
-	(pngtclStubsPtr->png_get_IHDR) /* 140 */
-#endif
-#ifndef png_set_IHDR
-#define png_set_IHDR \
-	(pngtclStubsPtr->png_set_IHDR) /* 141 */
-#endif
-#ifndef png_get_oFFs
-#define png_get_oFFs \
-	(pngtclStubsPtr->png_get_oFFs) /* 142 */
-#endif
-#ifndef png_set_oFFs
-#define png_set_oFFs \
-	(pngtclStubsPtr->png_set_oFFs) /* 143 */
-#endif
-#ifndef png_get_pCAL
-#define png_get_pCAL \
-	(pngtclStubsPtr->png_get_pCAL) /* 144 */
-#endif
-#ifndef png_set_pCAL
-#define png_set_pCAL \
-	(pngtclStubsPtr->png_set_pCAL) /* 145 */
-#endif
-#ifndef png_get_pHYs
-#define png_get_pHYs \
-	(pngtclStubsPtr->png_get_pHYs) /* 146 */
-#endif
-#ifndef png_set_pHYs
-#define png_set_pHYs \
-	(pngtclStubsPtr->png_set_pHYs) /* 147 */
-#endif
-#ifndef png_get_PLTE
-#define png_get_PLTE \
-	(pngtclStubsPtr->png_get_PLTE) /* 148 */
-#endif
-#ifndef png_set_PLTE
-#define png_set_PLTE \
-	(pngtclStubsPtr->png_set_PLTE) /* 149 */
-#endif
-#ifndef png_get_sBIT
-#define png_get_sBIT \
-	(pngtclStubsPtr->png_get_sBIT) /* 150 */
-#endif
-#ifndef png_set_sBIT
-#define png_set_sBIT \
-	(pngtclStubsPtr->png_set_sBIT) /* 151 */
-#endif
-#ifndef png_get_sRGB
-#define png_get_sRGB \
-	(pngtclStubsPtr->png_get_sRGB) /* 152 */
-#endif
-#ifndef png_set_sRGB
-#define png_set_sRGB \
-	(pngtclStubsPtr->png_set_sRGB) /* 153 */
-#endif
-#ifndef png_set_sRGB_gAMA_and_cHRM
-#define png_set_sRGB_gAMA_and_cHRM \
-	(pngtclStubsPtr->png_set_sRGB_gAMA_and_cHRM) /* 154 */
-#endif
-#ifndef png_get_iCCP
-#define png_get_iCCP \
-	(pngtclStubsPtr->png_get_iCCP) /* 155 */
-#endif
-#ifndef png_set_iCCP
-#define png_set_iCCP \
-	(pngtclStubsPtr->png_set_iCCP) /* 156 */
-#endif
-#ifndef png_get_sPLT
-#define png_get_sPLT \
-	(pngtclStubsPtr->png_get_sPLT) /* 157 */
-#endif
-#ifndef png_set_sPLT
-#define png_set_sPLT \
-	(pngtclStubsPtr->png_set_sPLT) /* 158 */
-#endif
-#ifndef png_get_text
-#define png_get_text \
-	(pngtclStubsPtr->png_get_text) /* 159 */
-#endif
-#ifndef png_set_text
-#define png_set_text \
-	(pngtclStubsPtr->png_set_text) /* 160 */
-#endif
-#ifndef png_get_tIME
-#define png_get_tIME \
-	(pngtclStubsPtr->png_get_tIME) /* 161 */
-#endif
-#ifndef png_set_tIME
-#define png_set_tIME \
-	(pngtclStubsPtr->png_set_tIME) /* 162 */
-#endif
-#ifndef png_get_tRNS
-#define png_get_tRNS \
-	(pngtclStubsPtr->png_get_tRNS) /* 163 */
-#endif
-#ifndef png_set_tRNS
-#define png_set_tRNS \
-	(pngtclStubsPtr->png_set_tRNS) /* 164 */
-#endif
-#ifndef png_get_sCAL
-#define png_get_sCAL \
-	(pngtclStubsPtr->png_get_sCAL) /* 165 */
-#endif
-#ifndef png_get_sCAL_s
-#define png_get_sCAL_s \
-	(pngtclStubsPtr->png_get_sCAL_s) /* 166 */
-#endif
-#ifndef png_set_sCAL
-#define png_set_sCAL \
-	(pngtclStubsPtr->png_set_sCAL) /* 167 */
-#endif
-#ifndef png_set_sCAL_s
-#define png_set_sCAL_s \
-	(pngtclStubsPtr->png_set_sCAL_s) /* 168 */
-#endif
-#ifndef png_set_keep_unknown_chunks
-#define png_set_keep_unknown_chunks \
-	(pngtclStubsPtr->png_set_keep_unknown_chunks) /* 169 */
-#endif
-#ifndef png_set_unknown_chunks
-#define png_set_unknown_chunks \
-	(pngtclStubsPtr->png_set_unknown_chunks) /* 170 */
-#endif
-#ifndef png_set_unknown_chunk_location
-#define png_set_unknown_chunk_location \
-	(pngtclStubsPtr->png_set_unknown_chunk_location) /* 171 */
-#endif
-#ifndef png_get_unknown_chunks
-#define png_get_unknown_chunks \
-	(pngtclStubsPtr->png_get_unknown_chunks) /* 172 */
-#endif
-#ifndef png_set_invalid
-#define png_set_invalid \
-	(pngtclStubsPtr->png_set_invalid) /* 173 */
-#endif
-#ifndef png_read_png
-#define png_read_png \
-	(pngtclStubsPtr->png_read_png) /* 174 */
-#endif
-#ifndef png_write_png
-#define png_write_png \
-	(pngtclStubsPtr->png_write_png) /* 175 */
-#endif
-#ifndef png_sig_bytes
-#define png_sig_bytes \
-	(pngtclStubsPtr->png_sig_bytes) /* 176 */
-#endif
-#ifndef png_get_copyright
-#define png_get_copyright \
-	(pngtclStubsPtr->png_get_copyright) /* 177 */
-#endif
-#ifndef png_get_header_ver
-#define png_get_header_ver \
-	(pngtclStubsPtr->png_get_header_ver) /* 178 */
-#endif
-#ifndef png_get_header_version
-#define png_get_header_version \
-	(pngtclStubsPtr->png_get_header_version) /* 179 */
-#endif
-#ifndef png_get_libpng_ver
-#define png_get_libpng_ver \
-	(pngtclStubsPtr->png_get_libpng_ver) /* 180 */
-#endif
-#ifndef png_get_int_32
-#define png_get_int_32 \
-	(pngtclStubsPtr->png_get_int_32) /* 181 */
-#endif
-#ifndef png_get_uint_32
-#define png_get_uint_32 \
-	(pngtclStubsPtr->png_get_uint_32) /* 182 */
-#endif
-#ifndef png_get_uint_16
-#define png_get_uint_16 \
-	(pngtclStubsPtr->png_get_uint_16) /* 183 */
-#endif
-#ifndef png_read_init
-#define png_read_init \
-	(pngtclStubsPtr->png_read_init) /* 184 */
-#endif
-#ifndef png_read_init_2
-#define png_read_init_2 \
-	(pngtclStubsPtr->png_read_init_2) /* 185 */
-#endif
-#ifndef png_write_init
-#define png_write_init \
-	(pngtclStubsPtr->png_write_init) /* 186 */
-#endif
-#ifndef png_write_init_2
-#define png_write_init_2 \
-	(pngtclStubsPtr->png_write_init_2) /* 187 */
-#endif
-#ifndef png_create_struct
-#define png_create_struct \
-	(pngtclStubsPtr->png_create_struct) /* 188 */
-#endif
-#ifndef png_destroy_struct
-#define png_destroy_struct \
-	(pngtclStubsPtr->png_destroy_struct) /* 189 */
-#endif
-#ifndef png_create_struct_2
-#define png_create_struct_2 \
-	(pngtclStubsPtr->png_create_struct_2) /* 190 */
-#endif
-#ifndef png_destroy_struct_2
-#define png_destroy_struct_2 \
-	(pngtclStubsPtr->png_destroy_struct_2) /* 191 */
-#endif
-#ifndef png_info_destroy
-#define png_info_destroy \
-	(pngtclStubsPtr->png_info_destroy) /* 192 */
-#endif
-#ifndef png_zalloc
-#define png_zalloc \
-	(pngtclStubsPtr->png_zalloc) /* 193 */
-#endif
-#ifndef png_zfree
-#define png_zfree \
-	(pngtclStubsPtr->png_zfree) /* 194 */
-#endif
-#ifndef png_reset_crc
-#define png_reset_crc \
-	(pngtclStubsPtr->png_reset_crc) /* 195 */
-#endif
-#ifndef png_write_data
-#define png_write_data \
-	(pngtclStubsPtr->png_write_data) /* 196 */
-#endif
-#ifndef png_read_data
-#define png_read_data \
-	(pngtclStubsPtr->png_read_data) /* 197 */
-#endif
-#ifndef png_crc_read
-#define png_crc_read \
-	(pngtclStubsPtr->png_crc_read) /* 198 */
-#endif
-#ifndef png_decompress_chunk
-#define png_decompress_chunk \
-	(pngtclStubsPtr->png_decompress_chunk) /* 199 */
-#endif
-#ifndef png_crc_finish
-#define png_crc_finish \
-	(pngtclStubsPtr->png_crc_finish) /* 200 */
-#endif
-#ifndef png_crc_error
-#define png_crc_error \
-	(pngtclStubsPtr->png_crc_error) /* 201 */
-#endif
-#ifndef png_calculate_crc
-#define png_calculate_crc \
-	(pngtclStubsPtr->png_calculate_crc) /* 202 */
-#endif
-#ifndef png_flush
-#define png_flush \
-	(pngtclStubsPtr->png_flush) /* 203 */
-#endif
-#ifndef png_save_uint_32
-#define png_save_uint_32 \
-	(pngtclStubsPtr->png_save_uint_32) /* 204 */
-#endif
-#ifndef png_save_int_32
-#define png_save_int_32 \
-	(pngtclStubsPtr->png_save_int_32) /* 205 */
-#endif
-#ifndef png_save_uint_16
-#define png_save_uint_16 \
-	(pngtclStubsPtr->png_save_uint_16) /* 206 */
-#endif
-#ifndef png_write_sig
-#define png_write_sig \
-	(pngtclStubsPtr->png_write_sig) /* 207 */
-#endif
-#ifndef png_write_IHDR
-#define png_write_IHDR \
-	(pngtclStubsPtr->png_write_IHDR) /* 208 */
-#endif
-#ifndef png_write_PLTE
-#define png_write_PLTE \
-	(pngtclStubsPtr->png_write_PLTE) /* 209 */
-#endif
-#ifndef png_write_IDAT
-#define png_write_IDAT \
-	(pngtclStubsPtr->png_write_IDAT) /* 210 */
-#endif
-#ifndef png_write_IEND
-#define png_write_IEND \
-	(pngtclStubsPtr->png_write_IEND) /* 211 */
-#endif
-#ifndef png_write_gAMA
-#define png_write_gAMA \
-	(pngtclStubsPtr->png_write_gAMA) /* 212 */
-#endif
-#ifndef png_write_gAMA_fixed
-#define png_write_gAMA_fixed \
-	(pngtclStubsPtr->png_write_gAMA_fixed) /* 213 */
-#endif
-#ifndef png_write_sBIT
-#define png_write_sBIT \
-	(pngtclStubsPtr->png_write_sBIT) /* 214 */
-#endif
-#ifndef png_write_cHRM
-#define png_write_cHRM \
-	(pngtclStubsPtr->png_write_cHRM) /* 215 */
-#endif
-#ifndef png_write_cHRM_fixed
-#define png_write_cHRM_fixed \
-	(pngtclStubsPtr->png_write_cHRM_fixed) /* 216 */
-#endif
-#ifndef png_write_sRGB
-#define png_write_sRGB \
-	(pngtclStubsPtr->png_write_sRGB) /* 217 */
-#endif
-#ifndef png_write_iCCP
-#define png_write_iCCP \
-	(pngtclStubsPtr->png_write_iCCP) /* 218 */
-#endif
-#ifndef png_write_sPLT
-#define png_write_sPLT \
-	(pngtclStubsPtr->png_write_sPLT) /* 219 */
-#endif
-#ifndef png_write_tRNS
-#define png_write_tRNS \
-	(pngtclStubsPtr->png_write_tRNS) /* 220 */
-#endif
-#ifndef png_write_bKGD
-#define png_write_bKGD \
-	(pngtclStubsPtr->png_write_bKGD) /* 221 */
-#endif
-#ifndef png_write_hIST
-#define png_write_hIST \
-	(pngtclStubsPtr->png_write_hIST) /* 222 */
-#endif
-#ifndef png_check_keyword
-#define png_check_keyword \
-	(pngtclStubsPtr->png_check_keyword) /* 223 */
-#endif
-#ifndef png_write_tEXt
-#define png_write_tEXt \
-	(pngtclStubsPtr->png_write_tEXt) /* 224 */
-#endif
-#ifndef png_write_zTXt
-#define png_write_zTXt \
-	(pngtclStubsPtr->png_write_zTXt) /* 225 */
-#endif
-#ifndef png_write_iTXt
-#define png_write_iTXt \
-	(pngtclStubsPtr->png_write_iTXt) /* 226 */
-#endif
-#ifndef png_write_oFFs
-#define png_write_oFFs \
-	(pngtclStubsPtr->png_write_oFFs) /* 227 */
-#endif
-#ifndef png_write_pCAL
-#define png_write_pCAL \
-	(pngtclStubsPtr->png_write_pCAL) /* 228 */
-#endif
-#ifndef png_write_pHYs
-#define png_write_pHYs \
-	(pngtclStubsPtr->png_write_pHYs) /* 229 */
-#endif
-#ifndef png_write_tIME
-#define png_write_tIME \
-	(pngtclStubsPtr->png_write_tIME) /* 230 */
-#endif
-#ifndef png_write_sCAL
-#define png_write_sCAL \
-	(pngtclStubsPtr->png_write_sCAL) /* 231 */
-#endif
-#ifndef png_write_sCAL_s
-#define png_write_sCAL_s \
-	(pngtclStubsPtr->png_write_sCAL_s) /* 232 */
-#endif
-#ifndef png_write_finish_row
-#define png_write_finish_row \
-	(pngtclStubsPtr->png_write_finish_row) /* 233 */
-#endif
-#ifndef png_write_start_row
-#define png_write_start_row \
-	(pngtclStubsPtr->png_write_start_row) /* 234 */
-#endif
-#ifndef png_build_gamma_table
-#define png_build_gamma_table \
-	(pngtclStubsPtr->png_build_gamma_table) /* 235 */
-#endif
-#ifndef png_combine_row
-#define png_combine_row \
-	(pngtclStubsPtr->png_combine_row) /* 236 */
-#endif
-#ifndef png_do_read_interlace
-#define png_do_read_interlace \
-	(pngtclStubsPtr->png_do_read_interlace) /* 237 */
-#endif
-#ifndef png_do_write_interlace
-#define png_do_write_interlace \
-	(pngtclStubsPtr->png_do_write_interlace) /* 238 */
-#endif
-#ifndef png_read_filter_row
-#define png_read_filter_row \
-	(pngtclStubsPtr->png_read_filter_row) /* 239 */
-#endif
-#ifndef png_write_find_filter
-#define png_write_find_filter \
-	(pngtclStubsPtr->png_write_find_filter) /* 240 */
-#endif
-#ifndef png_write_filtered_row
-#define png_write_filtered_row \
-	(pngtclStubsPtr->png_write_filtered_row) /* 241 */
-#endif
-#ifndef png_read_finish_row
-#define png_read_finish_row \
-	(pngtclStubsPtr->png_read_finish_row) /* 242 */
-#endif
-#ifndef png_read_start_row
-#define png_read_start_row \
-	(pngtclStubsPtr->png_read_start_row) /* 243 */
-#endif
-#ifndef png_read_transform_info
-#define png_read_transform_info \
-	(pngtclStubsPtr->png_read_transform_info) /* 244 */
-#endif
-#ifndef png_do_read_filler
-#define png_do_read_filler \
-	(pngtclStubsPtr->png_do_read_filler) /* 245 */
-#endif
-#ifndef png_do_read_swap_alpha
-#define png_do_read_swap_alpha \
-	(pngtclStubsPtr->png_do_read_swap_alpha) /* 246 */
-#endif
-#ifndef png_do_write_swap_alpha
-#define png_do_write_swap_alpha \
-	(pngtclStubsPtr->png_do_write_swap_alpha) /* 247 */
-#endif
-#ifndef png_do_read_invert_alpha
-#define png_do_read_invert_alpha \
-	(pngtclStubsPtr->png_do_read_invert_alpha) /* 248 */
-#endif
-#ifndef png_do_write_invert_alpha
-#define png_do_write_invert_alpha \
-	(pngtclStubsPtr->png_do_write_invert_alpha) /* 249 */
-#endif
-#ifndef png_do_strip_filler
-#define png_do_strip_filler \
-	(pngtclStubsPtr->png_do_strip_filler) /* 250 */
-#endif
-#ifndef png_do_swap
-#define png_do_swap \
-	(pngtclStubsPtr->png_do_swap) /* 251 */
-#endif
-#ifndef png_do_packswap
-#define png_do_packswap \
-	(pngtclStubsPtr->png_do_packswap) /* 252 */
-#endif
-#ifndef png_do_rgb_to_gray
-#define png_do_rgb_to_gray \
-	(pngtclStubsPtr->png_do_rgb_to_gray) /* 253 */
-#endif
-#ifndef png_do_gray_to_rgb
-#define png_do_gray_to_rgb \
-	(pngtclStubsPtr->png_do_gray_to_rgb) /* 254 */
-#endif
-#ifndef png_do_unpack
-#define png_do_unpack \
-	(pngtclStubsPtr->png_do_unpack) /* 255 */
-#endif
-#ifndef png_do_unshift
-#define png_do_unshift \
-	(pngtclStubsPtr->png_do_unshift) /* 256 */
-#endif
-#ifndef png_do_invert
-#define png_do_invert \
-	(pngtclStubsPtr->png_do_invert) /* 257 */
-#endif
-#ifndef png_do_chop
-#define png_do_chop \
-	(pngtclStubsPtr->png_do_chop) /* 258 */
-#endif
-#ifndef png_do_dither
-#define png_do_dither \
-	(pngtclStubsPtr->png_do_dither) /* 259 */
-#endif
-#ifndef png_correct_palette
-#define png_correct_palette \
-	(pngtclStubsPtr->png_correct_palette) /* 260 */
-#endif
-#ifndef png_do_bgr
-#define png_do_bgr \
-	(pngtclStubsPtr->png_do_bgr) /* 261 */
-#endif
-#ifndef png_do_pack
-#define png_do_pack \
-	(pngtclStubsPtr->png_do_pack) /* 262 */
-#endif
-#ifndef png_do_shift
-#define png_do_shift \
-	(pngtclStubsPtr->png_do_shift) /* 263 */
-#endif
-#ifndef png_do_background
-#define png_do_background \
-	(pngtclStubsPtr->png_do_background) /* 264 */
-#endif
-#ifndef png_do_gamma
-#define png_do_gamma \
-	(pngtclStubsPtr->png_do_gamma) /* 265 */
-#endif
-#ifndef png_do_expand_palette
-#define png_do_expand_palette \
-	(pngtclStubsPtr->png_do_expand_palette) /* 266 */
-#endif
-#ifndef png_do_expand
-#define png_do_expand \
-	(pngtclStubsPtr->png_do_expand) /* 267 */
-#endif
-#ifndef png_handle_IHDR
-#define png_handle_IHDR \
-	(pngtclStubsPtr->png_handle_IHDR) /* 268 */
-#endif
-#ifndef png_handle_PLTE
-#define png_handle_PLTE \
-	(pngtclStubsPtr->png_handle_PLTE) /* 269 */
-#endif
-#ifndef png_handle_IEND
-#define png_handle_IEND \
-	(pngtclStubsPtr->png_handle_IEND) /* 270 */
-#endif
-#ifndef png_handle_bKGD
-#define png_handle_bKGD \
-	(pngtclStubsPtr->png_handle_bKGD) /* 271 */
-#endif
-#ifndef png_handle_cHRM
-#define png_handle_cHRM \
-	(pngtclStubsPtr->png_handle_cHRM) /* 272 */
-#endif
-#ifndef png_handle_gAMA
-#define png_handle_gAMA \
-	(pngtclStubsPtr->png_handle_gAMA) /* 273 */
-#endif
-#ifndef png_handle_hIST
-#define png_handle_hIST \
-	(pngtclStubsPtr->png_handle_hIST) /* 274 */
-#endif
-#ifndef png_handle_iCCP
-#define png_handle_iCCP \
-	(pngtclStubsPtr->png_handle_iCCP) /* 275 */
-#endif
-#ifndef png_handle_iTXt
-#define png_handle_iTXt \
-	(pngtclStubsPtr->png_handle_iTXt) /* 276 */
-#endif
-#ifndef png_handle_oFFs
-#define png_handle_oFFs \
-	(pngtclStubsPtr->png_handle_oFFs) /* 277 */
-#endif
-#ifndef png_handle_pCAL
-#define png_handle_pCAL \
-	(pngtclStubsPtr->png_handle_pCAL) /* 278 */
-#endif
-#ifndef png_handle_pHYs
-#define png_handle_pHYs \
-	(pngtclStubsPtr->png_handle_pHYs) /* 279 */
-#endif
-#ifndef png_handle_sBIT
-#define png_handle_sBIT \
-	(pngtclStubsPtr->png_handle_sBIT) /* 280 */
-#endif
-#ifndef png_handle_sCAL
-#define png_handle_sCAL \
-	(pngtclStubsPtr->png_handle_sCAL) /* 281 */
-#endif
-#ifndef png_handle_sPLT
-#define png_handle_sPLT \
-	(pngtclStubsPtr->png_handle_sPLT) /* 282 */
-#endif
-#ifndef png_handle_sRGB
-#define png_handle_sRGB \
-	(pngtclStubsPtr->png_handle_sRGB) /* 283 */
-#endif
-#ifndef png_handle_tEXt
-#define png_handle_tEXt \
-	(pngtclStubsPtr->png_handle_tEXt) /* 284 */
-#endif
-#ifndef png_handle_tIME
-#define png_handle_tIME \
-	(pngtclStubsPtr->png_handle_tIME) /* 285 */
-#endif
-#ifndef png_handle_tRNS
-#define png_handle_tRNS \
-	(pngtclStubsPtr->png_handle_tRNS) /* 286 */
-#endif
-#ifndef png_handle_zTXt
-#define png_handle_zTXt \
-	(pngtclStubsPtr->png_handle_zTXt) /* 287 */
-#endif
-#ifndef png_handle_as_unknown
-#define png_handle_as_unknown \
-	(pngtclStubsPtr->png_handle_as_unknown) /* 288 */
-#endif
-#ifndef png_handle_unknown
-#define png_handle_unknown \
-	(pngtclStubsPtr->png_handle_unknown) /* 289 */
-#endif
-#ifndef png_check_chunk_name
-#define png_check_chunk_name \
-	(pngtclStubsPtr->png_check_chunk_name) /* 290 */
-#endif
-#ifndef png_do_read_transformations
-#define png_do_read_transformations \
-	(pngtclStubsPtr->png_do_read_transformations) /* 291 */
-#endif
-#ifndef png_do_write_transformations
-#define png_do_write_transformations \
-	(pngtclStubsPtr->png_do_write_transformations) /* 292 */
-#endif
-#ifndef png_init_read_transformations
-#define png_init_read_transformations \
-	(pngtclStubsPtr->png_init_read_transformations) /* 293 */
-#endif
-#ifndef png_push_read_chunk
-#define png_push_read_chunk \
-	(pngtclStubsPtr->png_push_read_chunk) /* 294 */
-#endif
-#ifndef png_push_read_sig
-#define png_push_read_sig \
-	(pngtclStubsPtr->png_push_read_sig) /* 295 */
-#endif
-#ifndef png_push_check_crc
-#define png_push_check_crc \
-	(pngtclStubsPtr->png_push_check_crc) /* 296 */
-#endif
-#ifndef png_push_crc_skip
-#define png_push_crc_skip \
-	(pngtclStubsPtr->png_push_crc_skip) /* 297 */
-#endif
-#ifndef png_push_crc_finish
-#define png_push_crc_finish \
-	(pngtclStubsPtr->png_push_crc_finish) /* 298 */
-#endif
-#ifndef png_push_fill_buffer
-#define png_push_fill_buffer \
-	(pngtclStubsPtr->png_push_fill_buffer) /* 299 */
-#endif
-#ifndef png_push_save_buffer
-#define png_push_save_buffer \
-	(pngtclStubsPtr->png_push_save_buffer) /* 300 */
-#endif
-#ifndef png_push_restore_buffer
-#define png_push_restore_buffer \
-	(pngtclStubsPtr->png_push_restore_buffer) /* 301 */
-#endif
-#ifndef png_push_read_IDAT
-#define png_push_read_IDAT \
-	(pngtclStubsPtr->png_push_read_IDAT) /* 302 */
-#endif
-#ifndef png_process_IDAT_data
-#define png_process_IDAT_data \
-	(pngtclStubsPtr->png_process_IDAT_data) /* 303 */
-#endif
-#ifndef png_push_process_row
-#define png_push_process_row \
-	(pngtclStubsPtr->png_push_process_row) /* 304 */
-#endif
-#ifndef png_push_handle_unknown
-#define png_push_handle_unknown \
-	(pngtclStubsPtr->png_push_handle_unknown) /* 305 */
-#endif
-#ifndef png_push_have_info
-#define png_push_have_info \
-	(pngtclStubsPtr->png_push_have_info) /* 306 */
-#endif
-#ifndef png_push_have_end
-#define png_push_have_end \
-	(pngtclStubsPtr->png_push_have_end) /* 307 */
-#endif
-#ifndef png_push_have_row
-#define png_push_have_row \
-	(pngtclStubsPtr->png_push_have_row) /* 308 */
-#endif
-#ifndef png_push_read_end
-#define png_push_read_end \
-	(pngtclStubsPtr->png_push_read_end) /* 309 */
-#endif
-#ifndef png_process_some_data
-#define png_process_some_data \
-	(pngtclStubsPtr->png_process_some_data) /* 310 */
-#endif
-#ifndef png_read_push_finish_row
-#define png_read_push_finish_row \
-	(pngtclStubsPtr->png_read_push_finish_row) /* 311 */
-#endif
-#ifndef png_push_handle_tEXt
-#define png_push_handle_tEXt \
-	(pngtclStubsPtr->png_push_handle_tEXt) /* 312 */
-#endif
-#ifndef png_push_read_tEXt
-#define png_push_read_tEXt \
-	(pngtclStubsPtr->png_push_read_tEXt) /* 313 */
-#endif
-#ifndef png_push_handle_zTXt
-#define png_push_handle_zTXt \
-	(pngtclStubsPtr->png_push_handle_zTXt) /* 314 */
-#endif
-#ifndef png_push_read_zTXt
-#define png_push_read_zTXt \
-	(pngtclStubsPtr->png_push_read_zTXt) /* 315 */
-#endif
-#ifndef png_push_handle_iTXt
-#define png_push_handle_iTXt \
-	(pngtclStubsPtr->png_push_handle_iTXt) /* 316 */
-#endif
-#ifndef png_push_read_iTXt
-#define png_push_read_iTXt \
-	(pngtclStubsPtr->png_push_read_iTXt) /* 317 */
-#endif
-
-#endif /* defined(USE_PNGTCL_STUBS) && !defined(USE_PNGTCL_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _PNGTCLDECLS */
-
diff --git a/tkimg1.3/libpng/tcl/pngtclDeclsMask.h b/tkimg1.3/libpng/tcl/pngtclDeclsMask.h
deleted file mode 100644
index fdb2d7c..0000000
--- a/tkimg1.3/libpng/tcl/pngtclDeclsMask.h
+++ /dev/null
@@ -1,327 +0,0 @@
-#ifdef WIN32
-/*
- * While the definitions in the original header are technically the
- * same as the definitions in 'zlibDecls.h' on Windows they are not,
- * in a small detail: DLLEXPORT vs. DLLIMPORT. As our artificial
- * definitions do the right thing we use the macro definitions below
- * to move the original definitionsd out of the way. We do retain the
- * inclusion of all the type definitions, etc.
- */
-#define png_access_version_number __mask_png_access_version_number
-#define png_set_sig_bytes __mask_png_set_sig_bytes
-#define png_sig_cmp __mask_png_sig_cmp
-#define png_check_sig __mask_png_check_sig
-#define png_create_read_struct __mask_png_create_read_struct
-#define png_create_write_struct __mask_png_create_write_struct
-#define png_get_compression_buffer_size __mask_png_get_compression_buffer_size
-#define png_set_compression_buffer_size __mask_png_set_compression_buffer_size
-#define png_reset_zstream __mask_png_reset_zstream
-#define png_create_read_struct_2 __mask_png_create_read_struct_2
-#define png_create_write_struct_2 __mask_png_create_write_struct_2
-#define png_write_chunk __mask_png_write_chunk
-#define png_write_chunk_start __mask_png_write_chunk_start
-#define png_write_chunk_data __mask_png_write_chunk_data
-#define png_write_chunk_end __mask_png_write_chunk_end
-#define png_create_info_struct __mask_png_create_info_struct
-#define png_info_init __mask_png_info_init
-#define png_write_info_before_PLTE __mask_png_write_info_before_PLTE
-#define png_write_info __mask_png_write_info
-#define png_read_info __mask_png_read_info
-#define png_convert_to_rfc1123 __mask_png_convert_to_rfc1123
-#define png_convert_from_struct_tm __mask_png_convert_from_struct_tm
-#define png_convert_from_time_t __mask_png_convert_from_time_t
-#define png_set_expand __mask_png_set_expand
-#define png_set_gray_1_2_4_to_8 __mask_png_set_gray_1_2_4_to_8
-#define png_set_palette_to_rgb __mask_png_set_palette_to_rgb
-#define png_set_tRNS_to_alpha __mask_png_set_tRNS_to_alpha
-#define png_set_bgr __mask_png_set_bgr
-#define png_set_gray_to_rgb __mask_png_set_gray_to_rgb
-#define png_set_rgb_to_gray __mask_png_set_rgb_to_gray
-#define png_set_rgb_to_gray_fixed __mask_png_set_rgb_to_gray_fixed
-#define png_get_rgb_to_gray_status __mask_png_get_rgb_to_gray_status
-#define png_build_grayscale_palette __mask_png_build_grayscale_palette
-#define png_set_strip_alpha __mask_png_set_strip_alpha
-#define png_set_swap_alpha __mask_png_set_swap_alpha
-#define png_set_invert_alpha __mask_png_set_invert_alpha
-#define png_set_filler __mask_png_set_filler
-#define png_set_swap __mask_png_set_swap
-#define png_set_packing __mask_png_set_packing
-#define png_set_packswap __mask_png_set_packswap
-#define png_set_shift __mask_png_set_shift
-#define png_set_interlace_handling __mask_png_set_interlace_handling
-#define png_set_invert_mono __mask_png_set_invert_mono
-#define png_set_background __mask_png_set_background
-#define png_set_strip_16 __mask_png_set_strip_16
-#define png_set_dither __mask_png_set_dither
-#define png_set_gamma __mask_png_set_gamma
-#define png_permit_empty_plte __mask_png_permit_empty_plte
-#define png_set_flush __mask_png_set_flush
-#define png_write_flush __mask_png_write_flush
-#define png_start_read_image __mask_png_start_read_image
-#define png_read_update_info __mask_png_read_update_info
-#define png_read_rows __mask_png_read_rows
-#define png_read_row __mask_png_read_row
-#define png_read_image __mask_png_read_image
-#define png_write_row __mask_png_write_row
-#define png_write_rows __mask_png_write_rows
-#define png_write_image __mask_png_write_image
-#define png_write_end __mask_png_write_end
-#define png_read_end __mask_png_read_end
-#define png_destroy_info_struct __mask_png_destroy_info_struct
-#define png_destroy_read_struct __mask_png_destroy_read_struct
-#define png_read_destroy __mask_png_read_destroy
-#define png_destroy_write_struct __mask_png_destroy_write_struct
-#define png_write_destroy __mask_png_write_destroy
-#define png_set_crc_action __mask_png_set_crc_action
-#define png_set_filter __mask_png_set_filter
-#define png_set_filter_heuristics __mask_png_set_filter_heuristics
-#define png_set_compression_level __mask_png_set_compression_level
-#define png_set_compression_mem_level __mask_png_set_compression_mem_level
-#define png_set_compression_strategy __mask_png_set_compression_strategy
-#define png_set_compression_window_bits __mask_png_set_compression_window_bits
-#define png_set_compression_method __mask_png_set_compression_method
-#define png_init_io __mask_png_init_io
-#define png_set_error_fn __mask_png_set_error_fn
-#define png_get_error_ptr __mask_png_get_error_ptr
-#define png_set_write_fn __mask_png_set_write_fn
-#define png_set_read_fn __mask_png_set_read_fn
-#define png_get_io_ptr __mask_png_get_io_ptr
-#define png_set_read_status_fn __mask_png_set_read_status_fn
-#define png_set_write_status_fn __mask_png_set_write_status_fn
-#define png_set_mem_fn __mask_png_set_mem_fn
-#define png_get_mem_ptr __mask_png_get_mem_ptr
-#define png_set_read_user_transform_fn __mask_png_set_read_user_transform_fn
-#define png_set_write_user_transform_fn __mask_png_set_write_user_transform_fn
-#define png_set_user_transform_info __mask_png_set_user_transform_info
-#define png_get_user_transform_ptr __mask_png_get_user_transform_ptr
-#define png_set_read_user_chunk_fn __mask_png_set_read_user_chunk_fn
-#define png_get_user_chunk_ptr __mask_png_get_user_chunk_ptr
-#define png_set_progressive_read_fn __mask_png_set_progressive_read_fn
-#define png_get_progressive_ptr __mask_png_get_progressive_ptr
-#define png_process_data __mask_png_process_data
-#define png_progressive_combine_row __mask_png_progressive_combine_row
-#define png_malloc __mask_png_malloc
-#define png_free __mask_png_free
-#define png_free_data __mask_png_free_data
-#define png_data_freer __mask_png_data_freer
-#define png_malloc_default __mask_png_malloc_default
-#define png_free_default __mask_png_free_default
-#define png_memcpy_check __mask_png_memcpy_check
-#define png_memset_check __mask_png_memset_check
-#define png_far_to_near __mask_png_far_to_near
-#define png_error __mask_png_error
-#define png_chunk_error __mask_png_chunk_error
-#define png_warning __mask_png_warning
-#define png_chunk_warning __mask_png_chunk_warning
-#define png_get_valid __mask_png_get_valid
-#define png_get_rowbytes __mask_png_get_rowbytes
-#define png_get_rows __mask_png_get_rows
-#define png_set_rows __mask_png_set_rows
-#define png_get_channels __mask_png_get_channels
-#define png_get_image_width __mask_png_get_image_width
-#define png_get_image_height __mask_png_get_image_height
-#define png_get_bit_depth __mask_png_get_bit_depth
-#define png_get_color_type __mask_png_get_color_type
-#define png_get_filter_type __mask_png_get_filter_type
-#define png_get_interlace_type __mask_png_get_interlace_type
-#define png_get_compression_type __mask_png_get_compression_type
-#define png_get_pixels_per_meter __mask_png_get_pixels_per_meter
-#define png_get_x_pixels_per_meter __mask_png_get_x_pixels_per_meter
-#define png_get_y_pixels_per_meter __mask_png_get_y_pixels_per_meter
-#define png_get_pixel_aspect_ratio __mask_png_get_pixel_aspect_ratio
-#define png_get_x_offset_pixels __mask_png_get_x_offset_pixels
-#define png_get_y_offset_pixels __mask_png_get_y_offset_pixels
-#define png_get_x_offset_microns __mask_png_get_x_offset_microns
-#define png_get_y_offset_microns __mask_png_get_y_offset_microns
-#define png_get_signature __mask_png_get_signature
-#define png_get_bKGD __mask_png_get_bKGD
-#define png_set_bKGD __mask_png_set_bKGD
-#define png_get_cHRM __mask_png_get_cHRM
-#define png_get_cHRM_fixed __mask_png_get_cHRM_fixed
-#define png_set_cHRM __mask_png_set_cHRM
-#define png_set_cHRM_fixed __mask_png_set_cHRM_fixed
-#define png_get_gAMA __mask_png_get_gAMA
-#define png_get_gAMA_fixed __mask_png_get_gAMA_fixed
-#define png_set_gAMA __mask_png_set_gAMA
-#define png_set_gAMA_fixed __mask_png_set_gAMA_fixed
-#define png_get_hIST __mask_png_get_hIST
-#define png_set_hIST __mask_png_set_hIST
-#define png_get_IHDR __mask_png_get_IHDR
-#define png_set_IHDR __mask_png_set_IHDR
-#define png_get_oFFs __mask_png_get_oFFs
-#define png_set_oFFs __mask_png_set_oFFs
-#define png_get_pCAL __mask_png_get_pCAL
-#define png_set_pCAL __mask_png_set_pCAL
-#define png_get_pHYs __mask_png_get_pHYs
-#define png_set_pHYs __mask_png_set_pHYs
-#define png_get_PLTE __mask_png_get_PLTE
-#define png_set_PLTE __mask_png_set_PLTE
-#define png_get_sBIT __mask_png_get_sBIT
-#define png_set_sBIT __mask_png_set_sBIT
-#define png_get_sRGB __mask_png_get_sRGB
-#define png_set_sRGB __mask_png_set_sRGB
-#define png_set_sRGB_gAMA_and_cHRM __mask_png_set_sRGB_gAMA_and_cHRM
-#define png_get_iCCP __mask_png_get_iCCP
-#define png_set_iCCP __mask_png_set_iCCP
-#define png_get_sPLT __mask_png_get_sPLT
-#define png_set_sPLT __mask_png_set_sPLT
-#define png_get_text __mask_png_get_text
-#define png_set_text __mask_png_set_text
-#define png_get_tIME __mask_png_get_tIME
-#define png_set_tIME __mask_png_set_tIME
-#define png_get_tRNS __mask_png_get_tRNS
-#define png_set_tRNS __mask_png_set_tRNS
-#define png_get_sCAL __mask_png_get_sCAL
-#define png_get_sCAL_s __mask_png_get_sCAL_s
-#define png_set_sCAL __mask_png_set_sCAL
-#define png_set_sCAL_s __mask_png_set_sCAL_s
-#define png_set_keep_unknown_chunks __mask_png_set_keep_unknown_chunks
-#define png_set_unknown_chunks __mask_png_set_unknown_chunks
-#define png_set_unknown_chunk_location __mask_png_set_unknown_chunk_location
-#define png_get_unknown_chunks __mask_png_get_unknown_chunks
-#define png_set_invalid __mask_png_set_invalid
-#define png_read_png __mask_png_read_png
-#define png_write_png __mask_png_write_png
-#define png_sig_bytes __mask_png_sig_bytes
-#define png_get_copyright __mask_png_get_copyright
-#define png_get_header_ver __mask_png_get_header_ver
-#define png_get_header_version __mask_png_get_header_version
-#define png_get_libpng_ver __mask_png_get_libpng_ver
-#define png_get_int_32 __mask_png_get_int_32
-#define png_get_uint_32 __mask_png_get_uint_32
-#define png_get_uint_16 __mask_png_get_uint_16
-#define png_read_init __mask_png_read_init
-#define png_read_init_2 __mask_png_read_init_2
-#define png_write_init __mask_png_write_init
-#define png_write_init_2 __mask_png_write_init_2
-#define png_create_struct __mask_png_create_struct
-#define png_destroy_struct __mask_png_destroy_struct
-#define png_create_struct_2 __mask_png_create_struct_2
-#define png_destroy_struct_2 __mask_png_destroy_struct_2
-#define png_info_destroy __mask_png_info_destroy
-#define png_zalloc __mask_png_zalloc
-#define png_zfree __mask_png_zfree
-#define png_reset_crc __mask_png_reset_crc
-#define png_write_data __mask_png_write_data
-#define png_read_data __mask_png_read_data
-#define png_crc_read __mask_png_crc_read
-#define png_decompress_chunk __mask_png_decompress_chunk
-#define png_crc_finish __mask_png_crc_finish
-#define png_crc_error __mask_png_crc_error
-#define png_calculate_crc __mask_png_calculate_crc
-#define png_flush __mask_png_flush
-#define png_save_uint_32 __mask_png_save_uint_32
-#define png_save_int_32 __mask_png_save_int_32
-#define png_save_uint_16 __mask_png_save_uint_16
-#define png_write_sig __mask_png_write_sig
-#define png_write_IHDR __mask_png_write_IHDR
-#define png_write_PLTE __mask_png_write_PLTE
-#define png_write_IDAT __mask_png_write_IDAT
-#define png_write_IEND __mask_png_write_IEND
-#define png_write_gAMA __mask_png_write_gAMA
-#define png_write_gAMA_fixed __mask_png_write_gAMA_fixed
-#define png_write_sBIT __mask_png_write_sBIT
-#define png_write_cHRM __mask_png_write_cHRM
-#define png_write_cHRM_fixed __mask_png_write_cHRM_fixed
-#define png_write_sRGB __mask_png_write_sRGB
-#define png_write_iCCP __mask_png_write_iCCP
-#define png_write_sPLT __mask_png_write_sPLT
-#define png_write_tRNS __mask_png_write_tRNS
-#define png_write_bKGD __mask_png_write_bKGD
-#define png_write_hIST __mask_png_write_hIST
-#define png_check_keyword __mask_png_check_keyword
-#define png_write_tEXt __mask_png_write_tEXt
-#define png_write_zTXt __mask_png_write_zTXt
-#define png_write_iTXt __mask_png_write_iTXt
-#define png_write_oFFs __mask_png_write_oFFs
-#define png_write_pCAL __mask_png_write_pCAL
-#define png_write_pHYs __mask_png_write_pHYs
-#define png_write_tIME __mask_png_write_tIME
-#define png_write_sCAL __mask_png_write_sCAL
-#define png_write_sCAL_s __mask_png_write_sCAL_s
-#define png_write_finish_row __mask_png_write_finish_row
-#define png_write_start_row __mask_png_write_start_row
-#define png_build_gamma_table __mask_png_build_gamma_table
-#define png_combine_row __mask_png_combine_row
-#define png_do_read_interlace __mask_png_do_read_interlace
-#define png_do_write_interlace __mask_png_do_write_interlace
-#define png_read_filter_row __mask_png_read_filter_row
-#define png_write_find_filter __mask_png_write_find_filter
-#define png_write_filtered_row __mask_png_write_filtered_row
-#define png_read_finish_row __mask_png_read_finish_row
-#define png_read_start_row __mask_png_read_start_row
-#define png_read_transform_info __mask_png_read_transform_info
-#define png_do_read_filler __mask_png_do_read_filler
-#define png_do_read_swap_alpha __mask_png_do_read_swap_alpha
-#define png_do_write_swap_alpha __mask_png_do_write_swap_alpha
-#define png_do_read_invert_alpha __mask_png_do_read_invert_alpha
-#define png_do_write_invert_alpha __mask_png_do_write_invert_alpha
-#define png_do_strip_filler __mask_png_do_strip_filler
-#define png_do_swap __mask_png_do_swap
-#define png_do_packswap __mask_png_do_packswap
-#define png_do_rgb_to_gray __mask_png_do_rgb_to_gray
-#define png_do_gray_to_rgb __mask_png_do_gray_to_rgb
-#define png_do_unpack __mask_png_do_unpack
-#define png_do_unshift __mask_png_do_unshift
-#define png_do_invert __mask_png_do_invert
-#define png_do_chop __mask_png_do_chop
-#define png_do_dither __mask_png_do_dither
-#define png_correct_palette __mask_png_correct_palette
-#define png_do_bgr __mask_png_do_bgr
-#define png_do_pack __mask_png_do_pack
-#define png_do_shift __mask_png_do_shift
-#define png_do_background __mask_png_do_background
-#define png_do_gamma __mask_png_do_gamma
-#define png_do_expand_palette __mask_png_do_expand_palette
-#define png_do_expand __mask_png_do_expand
-#define png_handle_IHDR __mask_png_handle_IHDR
-#define png_handle_PLTE __mask_png_handle_PLTE
-#define png_handle_IEND __mask_png_handle_IEND
-#define png_handle_bKGD __mask_png_handle_bKGD
-#define png_handle_cHRM __mask_png_handle_cHRM
-#define png_handle_gAMA __mask_png_handle_gAMA
-#define png_handle_hIST __mask_png_handle_hIST
-#define png_handle_iCCP __mask_png_handle_iCCP
-#define png_handle_iTXt __mask_png_handle_iTXt
-#define png_handle_oFFs __mask_png_handle_oFFs
-#define png_handle_pCAL __mask_png_handle_pCAL
-#define png_handle_pHYs __mask_png_handle_pHYs
-#define png_handle_sBIT __mask_png_handle_sBIT
-#define png_handle_sCAL __mask_png_handle_sCAL
-#define png_handle_sPLT __mask_png_handle_sPLT
-#define png_handle_sRGB __mask_png_handle_sRGB
-#define png_handle_tEXt __mask_png_handle_tEXt
-#define png_handle_tIME __mask_png_handle_tIME
-#define png_handle_tRNS __mask_png_handle_tRNS
-#define png_handle_zTXt __mask_png_handle_zTXt
-#define png_handle_as_unknown __mask_png_handle_as_unknown
-#define png_handle_unknown __mask_png_handle_unknown
-#define png_check_chunk_name __mask_png_check_chunk_name
-#define png_do_read_transformations __mask_png_do_read_transformations
-#define png_do_write_transformations __mask_png_do_write_transformations
-#define png_init_read_transformations __mask_png_init_read_transformations
-#define png_push_read_chunk __mask_png_push_read_chunk
-#define png_push_read_sig __mask_png_push_read_sig
-#define png_push_check_crc __mask_png_push_check_crc
-#define png_push_crc_skip __mask_png_push_crc_skip
-#define png_push_crc_finish __mask_png_push_crc_finish
-#define png_push_fill_buffer __mask_png_push_fill_buffer
-#define png_push_save_buffer __mask_png_push_save_buffer
-#define png_push_restore_buffer __mask_png_push_restore_buffer
-#define png_push_read_IDAT __mask_png_push_read_IDAT
-#define png_process_IDAT_data __mask_png_process_IDAT_data
-#define png_push_process_row __mask_png_push_process_row
-#define png_push_handle_unknown __mask_png_push_handle_unknown
-#define png_push_have_info __mask_png_push_have_info
-#define png_push_have_end __mask_png_push_have_end
-#define png_push_have_row __mask_png_push_have_row
-#define png_push_read_end __mask_png_push_read_end
-#define png_process_some_data __mask_png_process_some_data
-#define png_read_push_finish_row __mask_png_read_push_finish_row
-#define png_push_handle_tEXt __mask_png_push_handle_tEXt
-#define png_push_read_tEXt __mask_png_push_read_tEXt
-#define png_push_handle_zTXt __mask_png_push_handle_zTXt
-#define png_push_read_zTXt __mask_png_push_read_zTXt
-#define png_push_handle_iTXt __mask_png_push_handle_iTXt
-#define png_push_read_iTXt __mask_png_push_read_iTXt
-#endif /* WIN32 */
diff --git a/tkimg1.3/libpng/tcl/pngtclDeclsUnmask.h b/tkimg1.3/libpng/tcl/pngtclDeclsUnmask.h
deleted file mode 100644
index 8a09843..0000000
--- a/tkimg1.3/libpng/tcl/pngtclDeclsUnmask.h
+++ /dev/null
@@ -1,321 +0,0 @@
-#ifdef WIN32
-/* Restore the usage of the original names */
-#undef png_access_version_number
-#undef png_set_sig_bytes
-#undef png_sig_cmp
-#undef png_check_sig
-#undef png_create_read_struct
-#undef png_create_write_struct
-#undef png_get_compression_buffer_size
-#undef png_set_compression_buffer_size
-#undef png_reset_zstream
-#undef png_create_read_struct_2
-#undef png_create_write_struct_2
-#undef png_write_chunk
-#undef png_write_chunk_start
-#undef png_write_chunk_data
-#undef png_write_chunk_end
-#undef png_create_info_struct
-#undef png_info_init
-#undef png_write_info_before_PLTE
-#undef png_write_info
-#undef png_read_info
-#undef png_convert_to_rfc1123
-#undef png_convert_from_struct_tm
-#undef png_convert_from_time_t
-#undef png_set_expand
-#undef png_set_gray_1_2_4_to_8
-#undef png_set_palette_to_rgb
-#undef png_set_tRNS_to_alpha
-#undef png_set_bgr
-#undef png_set_gray_to_rgb
-#undef png_set_rgb_to_gray
-#undef png_set_rgb_to_gray_fixed
-#undef png_get_rgb_to_gray_status
-#undef png_build_grayscale_palette
-#undef png_set_strip_alpha
-#undef png_set_swap_alpha
-#undef png_set_invert_alpha
-#undef png_set_filler
-#undef png_set_swap
-#undef png_set_packing
-#undef png_set_packswap
-#undef png_set_shift
-#undef png_set_interlace_handling
-#undef png_set_invert_mono
-#undef png_set_background
-#undef png_set_strip_16
-#undef png_set_dither
-#undef png_set_gamma
-#undef png_permit_empty_plte
-#undef png_set_flush
-#undef png_write_flush
-#undef png_start_read_image
-#undef png_read_update_info
-#undef png_read_rows
-#undef png_read_row
-#undef png_read_image
-#undef png_write_row
-#undef png_write_rows
-#undef png_write_image
-#undef png_write_end
-#undef png_read_end
-#undef png_destroy_info_struct
-#undef png_destroy_read_struct
-#undef png_read_destroy
-#undef png_destroy_write_struct
-#undef png_write_destroy
-#undef png_set_crc_action
-#undef png_set_filter
-#undef png_set_filter_heuristics
-#undef png_set_compression_level
-#undef png_set_compression_mem_level
-#undef png_set_compression_strategy
-#undef png_set_compression_window_bits
-#undef png_set_compression_method
-#undef png_init_io
-#undef png_set_error_fn
-#undef png_get_error_ptr
-#undef png_set_write_fn
-#undef png_set_read_fn
-#undef png_get_io_ptr
-#undef png_set_read_status_fn
-#undef png_set_write_status_fn
-#undef png_set_mem_fn
-#undef png_get_mem_ptr
-#undef png_set_read_user_transform_fn
-#undef png_set_write_user_transform_fn
-#undef png_set_user_transform_info
-#undef png_get_user_transform_ptr
-#undef png_set_read_user_chunk_fn
-#undef png_get_user_chunk_ptr
-#undef png_set_progressive_read_fn
-#undef png_get_progressive_ptr
-#undef png_process_data
-#undef png_progressive_combine_row
-#undef png_malloc
-#undef png_free
-#undef png_free_data
-#undef png_data_freer
-#undef png_malloc_default
-#undef png_free_default
-#undef png_memcpy_check
-#undef png_memset_check
-#undef png_far_to_near
-#undef png_error
-#undef png_chunk_error
-#undef png_warning
-#undef png_chunk_warning
-#undef png_get_valid
-#undef png_get_rowbytes
-#undef png_get_rows
-#undef png_set_rows
-#undef png_get_channels
-#undef png_get_image_width
-#undef png_get_image_height
-#undef png_get_bit_depth
-#undef png_get_color_type
-#undef png_get_filter_type
-#undef png_get_interlace_type
-#undef png_get_compression_type
-#undef png_get_pixels_per_meter
-#undef png_get_x_pixels_per_meter
-#undef png_get_y_pixels_per_meter
-#undef png_get_pixel_aspect_ratio
-#undef png_get_x_offset_pixels
-#undef png_get_y_offset_pixels
-#undef png_get_x_offset_microns
-#undef png_get_y_offset_microns
-#undef png_get_signature
-#undef png_get_bKGD
-#undef png_set_bKGD
-#undef png_get_cHRM
-#undef png_get_cHRM_fixed
-#undef png_set_cHRM
-#undef png_set_cHRM_fixed
-#undef png_get_gAMA
-#undef png_get_gAMA_fixed
-#undef png_set_gAMA
-#undef png_set_gAMA_fixed
-#undef png_get_hIST
-#undef png_set_hIST
-#undef png_get_IHDR
-#undef png_set_IHDR
-#undef png_get_oFFs
-#undef png_set_oFFs
-#undef png_get_pCAL
-#undef png_set_pCAL
-#undef png_get_pHYs
-#undef png_set_pHYs
-#undef png_get_PLTE
-#undef png_set_PLTE
-#undef png_get_sBIT
-#undef png_set_sBIT
-#undef png_get_sRGB
-#undef png_set_sRGB
-#undef png_set_sRGB_gAMA_and_cHRM
-#undef png_get_iCCP
-#undef png_set_iCCP
-#undef png_get_sPLT
-#undef png_set_sPLT
-#undef png_get_text
-#undef png_set_text
-#undef png_get_tIME
-#undef png_set_tIME
-#undef png_get_tRNS
-#undef png_set_tRNS
-#undef png_get_sCAL
-#undef png_get_sCAL_s
-#undef png_set_sCAL
-#undef png_set_sCAL_s
-#undef png_set_keep_unknown_chunks
-#undef png_set_unknown_chunks
-#undef png_set_unknown_chunk_location
-#undef png_get_unknown_chunks
-#undef png_set_invalid
-#undef png_read_png
-#undef png_write_png
-#undef png_sig_bytes
-#undef png_get_copyright
-#undef png_get_header_ver
-#undef png_get_header_version
-#undef png_get_libpng_ver
-#undef png_get_int_32
-#undef png_get_uint_32
-#undef png_get_uint_16
-#undef png_read_init
-#undef png_read_init_2
-#undef png_write_init
-#undef png_write_init_2
-#undef png_create_struct
-#undef png_destroy_struct
-#undef png_create_struct_2
-#undef png_destroy_struct_2
-#undef png_info_destroy
-#undef png_zalloc
-#undef png_zfree
-#undef png_reset_crc
-#undef png_write_data
-#undef png_read_data
-#undef png_crc_read
-#undef png_decompress_chunk
-#undef png_crc_finish
-#undef png_crc_error
-#undef png_calculate_crc
-#undef png_flush
-#undef png_save_uint_32
-#undef png_save_int_32
-#undef png_save_uint_16
-#undef png_write_sig
-#undef png_write_IHDR
-#undef png_write_PLTE
-#undef png_write_IDAT
-#undef png_write_IEND
-#undef png_write_gAMA
-#undef png_write_gAMA_fixed
-#undef png_write_sBIT
-#undef png_write_cHRM
-#undef png_write_cHRM_fixed
-#undef png_write_sRGB
-#undef png_write_iCCP
-#undef png_write_sPLT
-#undef png_write_tRNS
-#undef png_write_bKGD
-#undef png_write_hIST
-#undef png_check_keyword
-#undef png_write_tEXt
-#undef png_write_zTXt
-#undef png_write_iTXt
-#undef png_write_oFFs
-#undef png_write_pCAL
-#undef png_write_pHYs
-#undef png_write_tIME
-#undef png_write_sCAL
-#undef png_write_sCAL_s
-#undef png_write_finish_row
-#undef png_write_start_row
-#undef png_build_gamma_table
-#undef png_combine_row
-#undef png_do_read_interlace
-#undef png_do_write_interlace
-#undef png_read_filter_row
-#undef png_write_find_filter
-#undef png_write_filtered_row
-#undef png_read_finish_row
-#undef png_read_start_row
-#undef png_read_transform_info
-#undef png_do_read_filler
-#undef png_do_read_swap_alpha
-#undef png_do_write_swap_alpha
-#undef png_do_read_invert_alpha
-#undef png_do_write_invert_alpha
-#undef png_do_strip_filler
-#undef png_do_swap
-#undef png_do_packswap
-#undef png_do_rgb_to_gray
-#undef png_do_gray_to_rgb
-#undef png_do_unpack
-#undef png_do_unshift
-#undef png_do_invert
-#undef png_do_chop
-#undef png_do_dither
-#undef png_correct_palette
-#undef png_do_bgr
-#undef png_do_pack
-#undef png_do_shift
-#undef png_do_background
-#undef png_do_gamma
-#undef png_do_expand_palette
-#undef png_do_expand
-#undef png_handle_IHDR
-#undef png_handle_PLTE
-#undef png_handle_IEND
-#undef png_handle_bKGD
-#undef png_handle_cHRM
-#undef png_handle_gAMA
-#undef png_handle_hIST
-#undef png_handle_iCCP
-#undef png_handle_iTXt
-#undef png_handle_oFFs
-#undef png_handle_pCAL
-#undef png_handle_pHYs
-#undef png_handle_sBIT
-#undef png_handle_sCAL
-#undef png_handle_sPLT
-#undef png_handle_sRGB
-#undef png_handle_tEXt
-#undef png_handle_tIME
-#undef png_handle_tRNS
-#undef png_handle_zTXt
-#undef png_handle_as_unknown
-#undef png_handle_unknown
-#undef png_check_chunk_name
-#undef png_do_read_transformations
-#undef png_do_write_transformations
-#undef png_init_read_transformations
-#undef png_push_read_chunk
-#undef png_push_read_sig
-#undef png_push_check_crc
-#undef png_push_crc_skip
-#undef png_push_crc_finish
-#undef png_push_fill_buffer
-#undef png_push_save_buffer
-#undef png_push_restore_buffer
-#undef png_push_read_IDAT
-#undef png_process_IDAT_data
-#undef png_push_process_row
-#undef png_push_handle_unknown
-#undef png_push_have_info
-#undef png_push_have_end
-#undef png_push_have_row
-#undef png_push_read_end
-#undef png_process_some_data
-#undef png_read_push_finish_row
-#undef png_push_handle_tEXt
-#undef png_push_read_tEXt
-#undef png_push_handle_zTXt
-#undef png_push_read_zTXt
-#undef png_push_handle_iTXt
-#undef png_push_read_iTXt
-#endif /* WIN32 */
-
diff --git a/tkimg1.3/libpng/tcl/pngtclStubInit.c b/tkimg1.3/libpng/tcl/pngtclStubInit.c
deleted file mode 100644
index a986498..0000000
--- a/tkimg1.3/libpng/tcl/pngtclStubInit.c
+++ /dev/null
@@ -1,1330 +0,0 @@
-/* 
- * pngtclStubInit.c --
- */
-
-#include "pngtcl.h"
-
-/*
- * Remove macros that will interfere with the definitions below.
- */
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the pngtcl.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-PngtclStubs pngtclStubs = {
-    TCL_STUB_MAGIC,
-    NULL,
-    png_access_version_number, /* 0 */
-    png_set_sig_bytes, /* 1 */
-    png_sig_cmp, /* 2 */
-    png_check_sig, /* 3 */
-    png_create_read_struct, /* 4 */
-    png_create_write_struct, /* 5 */
-    png_get_compression_buffer_size, /* 6 */
-    png_set_compression_buffer_size, /* 7 */
-    png_reset_zstream, /* 8 */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 9 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_create_read_struct_2, /* 9 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 10 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_create_write_struct_2, /* 10 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-    png_write_chunk, /* 11 */
-    png_write_chunk_start, /* 12 */
-    png_write_chunk_data, /* 13 */
-    png_write_chunk_end, /* 14 */
-    png_create_info_struct, /* 15 */
-    png_info_init, /* 16 */
-    png_write_info_before_PLTE, /* 17 */
-    png_write_info, /* 18 */
-    png_read_info, /* 19 */
-#if !defined(PNG_TIME_RFC1123_SUPPORTED)
-    NULL, /* 20 */
-#else  /* !PNG_TIME_RFC1123_SUPPORTED */
-    png_convert_to_rfc1123, /* 20 */
-#endif /* !PNG_TIME_RFC1123_SUPPORTED */
-#if defined(_WIN32_WCE) || !defined(PNG_WRITE_tIME_SUPPORTED)
-    NULL, /* 21 */
-#else  /* _WIN32_WCE !PNG_WRITE_tIME_SUPPORTED */
-    png_convert_from_struct_tm, /* 21 */
-#endif /* _WIN32_WCE !PNG_WRITE_tIME_SUPPORTED */
-#if defined(_WIN32_WCE) || !defined(PNG_WRITE_tIME_SUPPORTED)
-    NULL, /* 22 */
-#else  /* _WIN32_WCE !PNG_WRITE_tIME_SUPPORTED */
-    png_convert_from_time_t, /* 22 */
-#endif /* _WIN32_WCE !PNG_WRITE_tIME_SUPPORTED */
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 23 */
-#else  /* !PNG_READ_EXPAND_SUPPORTED */
-    png_set_expand, /* 23 */
-#endif /* !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 24 */
-#else  /* !PNG_READ_EXPAND_SUPPORTED */
-    png_set_gray_1_2_4_to_8, /* 24 */
-#endif /* !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 25 */
-#else  /* !PNG_READ_EXPAND_SUPPORTED */
-    png_set_palette_to_rgb, /* 25 */
-#endif /* !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 26 */
-#else  /* !PNG_READ_EXPAND_SUPPORTED */
-    png_set_tRNS_to_alpha, /* 26 */
-#endif /* !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_READ_BGR_SUPPORTED) && !defined(PNG_WRITE_BGR_SUPPORTED)
-    NULL, /* 27 */
-#else  /* !PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED */
-    png_set_bgr, /* 27 */
-#endif /* !PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED */
-#if !defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-    NULL, /* 28 */
-#else  /* !PNG_READ_GRAY_TO_RGB_SUPPORTED */
-    png_set_gray_to_rgb, /* 28 */
-#endif /* !PNG_READ_GRAY_TO_RGB_SUPPORTED */
-#if !defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 29 */
-#else  /* !PNG_READ_RGB_TO_GRAY_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_rgb_to_gray, /* 29 */
-#endif /* !PNG_READ_RGB_TO_GRAY_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-    NULL, /* 30 */
-#else  /* !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-    png_set_rgb_to_gray_fixed, /* 30 */
-#endif /* !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-#if !defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-    NULL, /* 31 */
-#else  /* !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-    png_get_rgb_to_gray_status, /* 31 */
-#endif /* !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-    png_build_grayscale_palette, /* 32 */
-#if !defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-    NULL, /* 33 */
-#else  /* !PNG_READ_STRIP_ALPHA_SUPPORTED */
-    png_set_strip_alpha, /* 33 */
-#endif /* !PNG_READ_STRIP_ALPHA_SUPPORTED */
-#if !defined(PNG_READ_SWAP_ALPHA_SUPPORTED) && !defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-    NULL, /* 34 */
-#else  /* !PNG_READ_SWAP_ALPHA_SUPPORTED !PNG_WRITE_SWAP_ALPHA_SUPPORTED */
-    png_set_swap_alpha, /* 34 */
-#endif /* !PNG_READ_SWAP_ALPHA_SUPPORTED !PNG_WRITE_SWAP_ALPHA_SUPPORTED */
-#if !defined(PNG_READ_INVERT_ALPHA_SUPPORTED) && !defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-    NULL, /* 35 */
-#else  /* !PNG_READ_INVERT_ALPHA_SUPPORTED !PNG_WRITE_INVERT_ALPHA_SUPPORTED */
-    png_set_invert_alpha, /* 35 */
-#endif /* !PNG_READ_INVERT_ALPHA_SUPPORTED !PNG_WRITE_INVERT_ALPHA_SUPPORTED */
-#if !defined(PNG_READ_FILLER_SUPPORTED) && !defined(PNG_WRITE_FILLER_SUPPORTED)
-    NULL, /* 36 */
-#else  /* !PNG_READ_FILLER_SUPPORTED !PNG_WRITE_FILLER_SUPPORTED */
-    png_set_filler, /* 36 */
-#endif /* !PNG_READ_FILLER_SUPPORTED !PNG_WRITE_FILLER_SUPPORTED */
-#if !defined(PNG_READ_SWAP_SUPPORTED) && !defined(PNG_WRITE_SWAP_SUPPORTED)
-    NULL, /* 37 */
-#else  /* !PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED */
-    png_set_swap, /* 37 */
-#endif /* !PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED */
-#if !defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_WRITE_PACK_SUPPORTED)
-    NULL, /* 38 */
-#else  /* !PNG_READ_PACK_SUPPORTED !PNG_WRITE_PACK_SUPPORTED */
-    png_set_packing, /* 38 */
-#endif /* !PNG_READ_PACK_SUPPORTED !PNG_WRITE_PACK_SUPPORTED */
-#if !defined(PNG_READ_PACKSWAP_SUPPORTED) && !defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-    NULL, /* 39 */
-#else  /* !PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED */
-    png_set_packswap, /* 39 */
-#endif /* !PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED */
-#if !defined(PNG_READ_SHIFT_SUPPORTED) && !defined(PNG_WRITE_SHIFT_SUPPORTED)
-    NULL, /* 40 */
-#else  /* !PNG_READ_SHIFT_SUPPORTED !PNG_WRITE_SHIFT_SUPPORTED */
-    png_set_shift, /* 40 */
-#endif /* !PNG_READ_SHIFT_SUPPORTED !PNG_WRITE_SHIFT_SUPPORTED */
-#if !defined(PNG_READ_INTERLACING_SUPPORTED) && !defined(PNG_WRITE_INTERLACING_SUPPORTED)
-    NULL, /* 41 */
-#else  /* !PNG_READ_INTERLACING_SUPPORTED !PNG_WRITE_INTERLACING_SUPPORTED */
-    png_set_interlace_handling, /* 41 */
-#endif /* !PNG_READ_INTERLACING_SUPPORTED !PNG_WRITE_INTERLACING_SUPPORTED */
-#if !defined(PNG_READ_INVERT_SUPPORTED) && !defined(PNG_WRITE_INVERT_SUPPORTED)
-    NULL, /* 42 */
-#else  /* !PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED */
-    png_set_invert_mono, /* 42 */
-#endif /* !PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED */
-#if !defined(PNG_READ_BACKGROUND_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 43 */
-#else  /* !PNG_READ_BACKGROUND_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_background, /* 43 */
-#endif /* !PNG_READ_BACKGROUND_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_16_TO_8_SUPPORTED)
-    NULL, /* 44 */
-#else  /* !PNG_READ_16_TO_8_SUPPORTED */
-    png_set_strip_16, /* 44 */
-#endif /* !PNG_READ_16_TO_8_SUPPORTED */
-#if !defined(PNG_READ_DITHER_SUPPORTED)
-    NULL, /* 45 */
-#else  /* !PNG_READ_DITHER_SUPPORTED */
-    png_set_dither, /* 45 */
-#endif /* !PNG_READ_DITHER_SUPPORTED */
-#if !defined(PNG_READ_GAMMA_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 46 */
-#else  /* !PNG_READ_GAMMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_gamma, /* 46 */
-#endif /* !PNG_READ_GAMMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_EMPTY_PLTE_SUPPORTED) && !defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-    NULL, /* 47 */
-#else  /* !PNG_READ_EMPTY_PLTE_SUPPORTED !PNG_WRITE_EMPTY_PLTE_SUPPORTED */
-    png_permit_empty_plte, /* 47 */
-#endif /* !PNG_READ_EMPTY_PLTE_SUPPORTED !PNG_WRITE_EMPTY_PLTE_SUPPORTED */
-#if !defined(PNG_WRITE_FLUSH_SUPPORTED)
-    NULL, /* 48 */
-#else  /* !PNG_WRITE_FLUSH_SUPPORTED */
-    png_set_flush, /* 48 */
-#endif /* !PNG_WRITE_FLUSH_SUPPORTED */
-#if !defined(PNG_WRITE_FLUSH_SUPPORTED)
-    NULL, /* 49 */
-#else  /* !PNG_WRITE_FLUSH_SUPPORTED */
-    png_write_flush, /* 49 */
-#endif /* !PNG_WRITE_FLUSH_SUPPORTED */
-    png_start_read_image, /* 50 */
-    png_read_update_info, /* 51 */
-    png_read_rows, /* 52 */
-    png_read_row, /* 53 */
-    png_read_image, /* 54 */
-    png_write_row, /* 55 */
-    png_write_rows, /* 56 */
-    png_write_image, /* 57 */
-    png_write_end, /* 58 */
-    png_read_end, /* 59 */
-    png_destroy_info_struct, /* 60 */
-    png_destroy_read_struct, /* 61 */
-    png_read_destroy, /* 62 */
-    png_destroy_write_struct, /* 63 */
-    NULL, /* 64 */
-    png_write_destroy, /* 65 */
-    png_set_crc_action, /* 66 */
-    png_set_filter, /* 67 */
-#if !defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 68 */
-#else  /* !PNG_WRITE_WEIGHTED_FILTER_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_filter_heuristics, /* 68 */
-#endif /* !PNG_WRITE_WEIGHTED_FILTER_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_compression_level, /* 69 */
-    png_set_compression_mem_level, /* 70 */
-    png_set_compression_strategy, /* 71 */
-    png_set_compression_window_bits, /* 72 */
-    png_set_compression_method, /* 73 */
-#if defined(PNG_NO_STDIO)
-    NULL, /* 74 */
-#else  /* PNG_NO_STDIO */
-    png_init_io, /* 74 */
-#endif /* PNG_NO_STDIO */
-    png_set_error_fn, /* 75 */
-    png_get_error_ptr, /* 76 */
-    png_set_write_fn, /* 77 */
-    png_set_read_fn, /* 78 */
-    png_get_io_ptr, /* 79 */
-    png_set_read_status_fn, /* 80 */
-    png_set_write_status_fn, /* 81 */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 82 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_set_mem_fn, /* 82 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 83 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_get_mem_ptr, /* 83 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-#if !defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && !defined(PNG_LEGACY_SUPPORTED)
-    NULL, /* 84 */
-#else  /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-    png_set_read_user_transform_fn, /* 84 */
-#endif /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-#if !defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) && !defined(PNG_LEGACY_SUPPORTED)
-    NULL, /* 85 */
-#else  /* !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-    png_set_write_user_transform_fn, /* 85 */
-#endif /* !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-#if !defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && !defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) && !defined(PNG_LEGACY_SUPPORTED)
-    NULL, /* 86 */
-#else  /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-    png_set_user_transform_info, /* 86 */
-#endif /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-#if !defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && !defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) && !defined(PNG_LEGACY_SUPPORTED)
-    NULL, /* 87 */
-#else  /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-    png_get_user_transform_ptr, /* 87 */
-#endif /* !PNG_READ_USER_TRANSFORM_SUPPORTED !PNG_WRITE_USER_TRANSFORM_SUPPORTED !PNG_LEGACY_SUPPORTED */
-#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-    NULL, /* 88 */
-#else  /* !PNG_READ_USER_CHUNKS_SUPPORTED */
-    png_set_read_user_chunk_fn, /* 88 */
-#endif /* !PNG_READ_USER_CHUNKS_SUPPORTED */
-#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED)
-    NULL, /* 89 */
-#else  /* !PNG_READ_USER_CHUNKS_SUPPORTED */
-    png_get_user_chunk_ptr, /* 89 */
-#endif /* !PNG_READ_USER_CHUNKS_SUPPORTED */
-#if !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 90 */
-#else  /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_set_progressive_read_fn, /* 90 */
-#endif /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 91 */
-#else  /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_get_progressive_ptr, /* 91 */
-#endif /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 92 */
-#else  /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_process_data, /* 92 */
-#endif /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 93 */
-#else  /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_progressive_combine_row, /* 93 */
-#endif /* !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_malloc, /* 94 */
-    png_free, /* 95 */
-    png_free_data, /* 96 */
-#if !defined(PNG_FREE_ME_SUPPORTED)
-    NULL, /* 97 */
-#else  /* !PNG_FREE_ME_SUPPORTED */
-    png_data_freer, /* 97 */
-#endif /* !PNG_FREE_ME_SUPPORTED */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 98 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_malloc_default, /* 98 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-#if !defined(PNG_USER_MEM_SUPPORTED)
-    NULL, /* 99 */
-#else  /* !PNG_USER_MEM_SUPPORTED */
-    png_free_default, /* 99 */
-#endif /* !PNG_USER_MEM_SUPPORTED */
-    png_memcpy_check, /* 100 */
-    png_memset_check, /* 101 */
-#if !defined(USE_FAR_KEYWORD)
-    NULL, /* 102 */
-#else  /* !USE_FAR_KEYWORD */
-    png_far_to_near, /* 102 */
-#endif /* !USE_FAR_KEYWORD */
-    png_error, /* 103 */
-    png_chunk_error, /* 104 */
-    png_warning, /* 105 */
-    png_chunk_warning, /* 106 */
-    png_get_valid, /* 107 */
-    png_get_rowbytes, /* 108 */
-#if !defined(PNG_INFO_IMAGE_SUPPORTED)
-    NULL, /* 109 */
-#else  /* !PNG_INFO_IMAGE_SUPPORTED */
-    png_get_rows, /* 109 */
-#endif /* !PNG_INFO_IMAGE_SUPPORTED */
-#if !defined(PNG_INFO_IMAGE_SUPPORTED)
-    NULL, /* 110 */
-#else  /* !PNG_INFO_IMAGE_SUPPORTED */
-    png_set_rows, /* 110 */
-#endif /* !PNG_INFO_IMAGE_SUPPORTED */
-    png_get_channels, /* 111 */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 112 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_image_width, /* 112 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 113 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_image_height, /* 113 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 114 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_bit_depth, /* 114 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 115 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_color_type, /* 115 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 116 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_filter_type, /* 116 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 117 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_interlace_type, /* 117 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 118 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_compression_type, /* 118 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 119 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_pixels_per_meter, /* 119 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 120 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_x_pixels_per_meter, /* 120 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 121 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_y_pixels_per_meter, /* 121 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 122 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_get_pixel_aspect_ratio, /* 122 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 123 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_x_offset_pixels, /* 123 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 124 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_y_offset_pixels, /* 124 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 125 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_x_offset_microns, /* 125 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-#if !defined(PNG_EASY_ACCESS_SUPPORTED)
-    NULL, /* 126 */
-#else  /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_y_offset_microns, /* 126 */
-#endif /* !PNG_EASY_ACCESS_SUPPORTED */
-    png_get_signature, /* 127 */
-#if !defined(PNG_READ_bKGD_SUPPORTED)
-    NULL, /* 128 */
-#else  /* !PNG_READ_bKGD_SUPPORTED */
-    png_get_bKGD, /* 128 */
-#endif /* !PNG_READ_bKGD_SUPPORTED */
-#if !defined(PNG_bKGD_SUPPORTED)
-    NULL, /* 129 */
-#else  /* !PNG_bKGD_SUPPORTED */
-    png_set_bKGD, /* 129 */
-#endif /* !PNG_bKGD_SUPPORTED */
-#if !defined(PNG_READ_cHRM_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 130 */
-#else  /* !PNG_READ_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_get_cHRM, /* 130 */
-#endif /* !PNG_READ_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_cHRM_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 131 */
-#else  /* !PNG_READ_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_get_cHRM_fixed, /* 131 */
-#endif /* !PNG_READ_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_cHRM_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 132 */
-#else  /* !PNG_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_cHRM, /* 132 */
-#endif /* !PNG_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_cHRM_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 133 */
-#else  /* !PNG_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_set_cHRM_fixed, /* 133 */
-#endif /* !PNG_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_READ_gAMA_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 134 */
-#else  /* !PNG_READ_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_get_gAMA, /* 134 */
-#endif /* !PNG_READ_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_gAMA_SUPPORTED)
-    NULL, /* 135 */
-#else  /* !PNG_READ_gAMA_SUPPORTED */
-    png_get_gAMA_fixed, /* 135 */
-#endif /* !PNG_READ_gAMA_SUPPORTED */
-#if !defined(PNG_gAMA_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 136 */
-#else  /* !PNG_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_gAMA, /* 136 */
-#endif /* !PNG_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_gAMA_SUPPORTED)
-    NULL, /* 137 */
-#else  /* !PNG_gAMA_SUPPORTED */
-    png_set_gAMA_fixed, /* 137 */
-#endif /* !PNG_gAMA_SUPPORTED */
-#if !defined(PNG_READ_hIST_SUPPORTED)
-    NULL, /* 138 */
-#else  /* !PNG_READ_hIST_SUPPORTED */
-    png_get_hIST, /* 138 */
-#endif /* !PNG_READ_hIST_SUPPORTED */
-#if !defined(PNG_hIST_SUPPORTED)
-    NULL, /* 139 */
-#else  /* !PNG_hIST_SUPPORTED */
-    png_set_hIST, /* 139 */
-#endif /* !PNG_hIST_SUPPORTED */
-    png_get_IHDR, /* 140 */
-    png_set_IHDR, /* 141 */
-#if !defined(PNG_READ_oFFs_SUPPORTED)
-    NULL, /* 142 */
-#else  /* !PNG_READ_oFFs_SUPPORTED */
-    png_get_oFFs, /* 142 */
-#endif /* !PNG_READ_oFFs_SUPPORTED */
-#if !defined(PNG_oFFs_SUPPORTED)
-    NULL, /* 143 */
-#else  /* !PNG_oFFs_SUPPORTED */
-    png_set_oFFs, /* 143 */
-#endif /* !PNG_oFFs_SUPPORTED */
-#if !defined(PNG_READ_pCAL_SUPPORTED)
-    NULL, /* 144 */
-#else  /* !PNG_READ_pCAL_SUPPORTED */
-    png_get_pCAL, /* 144 */
-#endif /* !PNG_READ_pCAL_SUPPORTED */
-#if !defined(PNG_pCAL_SUPPORTED)
-    NULL, /* 145 */
-#else  /* !PNG_pCAL_SUPPORTED */
-    png_set_pCAL, /* 145 */
-#endif /* !PNG_pCAL_SUPPORTED */
-#if !defined(PNG_READ_pHYs_SUPPORTED)
-    NULL, /* 146 */
-#else  /* !PNG_READ_pHYs_SUPPORTED */
-    png_get_pHYs, /* 146 */
-#endif /* !PNG_READ_pHYs_SUPPORTED */
-#if !defined(PNG_pHYs_SUPPORTED)
-    NULL, /* 147 */
-#else  /* !PNG_pHYs_SUPPORTED */
-    png_set_pHYs, /* 147 */
-#endif /* !PNG_pHYs_SUPPORTED */
-    png_get_PLTE, /* 148 */
-    png_set_PLTE, /* 149 */
-#if !defined(PNG_READ_sBIT_SUPPORTED)
-    NULL, /* 150 */
-#else  /* !PNG_READ_sBIT_SUPPORTED */
-    png_get_sBIT, /* 150 */
-#endif /* !PNG_READ_sBIT_SUPPORTED */
-#if !defined(PNG_sBIT_SUPPORTED)
-    NULL, /* 151 */
-#else  /* !PNG_sBIT_SUPPORTED */
-    png_set_sBIT, /* 151 */
-#endif /* !PNG_sBIT_SUPPORTED */
-#if !defined(PNG_READ_sRGB_SUPPORTED)
-    NULL, /* 152 */
-#else  /* !PNG_READ_sRGB_SUPPORTED */
-    png_get_sRGB, /* 152 */
-#endif /* !PNG_READ_sRGB_SUPPORTED */
-#if !defined(PNG_sRGB_SUPPORTED)
-    NULL, /* 153 */
-#else  /* !PNG_sRGB_SUPPORTED */
-    png_set_sRGB, /* 153 */
-#endif /* !PNG_sRGB_SUPPORTED */
-#if !defined(PNG_sRGB_SUPPORTED)
-    NULL, /* 154 */
-#else  /* !PNG_sRGB_SUPPORTED */
-    png_set_sRGB_gAMA_and_cHRM, /* 154 */
-#endif /* !PNG_sRGB_SUPPORTED */
-#if !defined(PNG_READ_iCCP_SUPPORTED)
-    NULL, /* 155 */
-#else  /* !PNG_READ_iCCP_SUPPORTED */
-    png_get_iCCP, /* 155 */
-#endif /* !PNG_READ_iCCP_SUPPORTED */
-#if !defined(PNG_iCCP_SUPPORTED)
-    NULL, /* 156 */
-#else  /* !PNG_iCCP_SUPPORTED */
-    png_set_iCCP, /* 156 */
-#endif /* !PNG_iCCP_SUPPORTED */
-#if !defined(PNG_READ_sPLT_SUPPORTED)
-    NULL, /* 157 */
-#else  /* !PNG_READ_sPLT_SUPPORTED */
-    png_get_sPLT, /* 157 */
-#endif /* !PNG_READ_sPLT_SUPPORTED */
-#if !defined(PNG_sPLT_SUPPORTED)
-    NULL, /* 158 */
-#else  /* !PNG_sPLT_SUPPORTED */
-    png_set_sPLT, /* 158 */
-#endif /* !PNG_sPLT_SUPPORTED */
-#if !defined(PNG_READ_TEXT_SUPPORTED)
-    NULL, /* 159 */
-#else  /* !PNG_READ_TEXT_SUPPORTED */
-    png_get_text, /* 159 */
-#endif /* !PNG_READ_TEXT_SUPPORTED */
-#if !defined(PNG_TEXT_SUPPORTED)
-    NULL, /* 160 */
-#else  /* !PNG_TEXT_SUPPORTED */
-    png_set_text, /* 160 */
-#endif /* !PNG_TEXT_SUPPORTED */
-#if !defined(PNG_READ_tIME_SUPPORTED)
-    NULL, /* 161 */
-#else  /* !PNG_READ_tIME_SUPPORTED */
-    png_get_tIME, /* 161 */
-#endif /* !PNG_READ_tIME_SUPPORTED */
-#if !defined(PNG_tIME_SUPPORTED)
-    NULL, /* 162 */
-#else  /* !PNG_tIME_SUPPORTED */
-    png_set_tIME, /* 162 */
-#endif /* !PNG_tIME_SUPPORTED */
-#if !defined(PNG_READ_tRNS_SUPPORTED)
-    NULL, /* 163 */
-#else  /* !PNG_READ_tRNS_SUPPORTED */
-    png_get_tRNS, /* 163 */
-#endif /* !PNG_READ_tRNS_SUPPORTED */
-#if !defined(PNG_tRNS_SUPPORTED)
-    NULL, /* 164 */
-#else  /* !PNG_tRNS_SUPPORTED */
-    png_set_tRNS, /* 164 */
-#endif /* !PNG_tRNS_SUPPORTED */
-#if !defined(PNG_READ_sCAL_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 165 */
-#else  /* !PNG_READ_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_get_sCAL, /* 165 */
-#endif /* !PNG_READ_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 166 */
-#else  /* !PNG_READ_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_get_sCAL_s, /* 166 */
-#endif /* !PNG_READ_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_sCAL_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 167 */
-#else  /* !PNG_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_set_sCAL, /* 167 */
-#endif /* !PNG_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_sCAL_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 168 */
-#else  /* !PNG_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_set_sCAL_s, /* 168 */
-#endif /* !PNG_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-    NULL, /* 169 */
-#else  /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-    png_set_keep_unknown_chunks, /* 169 */
-#endif /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-#if !defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-    NULL, /* 170 */
-#else  /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-    png_set_unknown_chunks, /* 170 */
-#endif /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-#if !defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-    NULL, /* 171 */
-#else  /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-    png_set_unknown_chunk_location, /* 171 */
-#endif /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-#if !defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-    NULL, /* 172 */
-#else  /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-    png_get_unknown_chunks, /* 172 */
-#endif /* !PNG_UNKNOWN_CHUNKS_SUPPORTED */
-    png_set_invalid, /* 173 */
-#if !defined(PNG_INFO_IMAGE_SUPPORTED)
-    NULL, /* 174 */
-#else  /* !PNG_INFO_IMAGE_SUPPORTED */
-    png_read_png, /* 174 */
-#endif /* !PNG_INFO_IMAGE_SUPPORTED */
-#if !defined(PNG_INFO_IMAGE_SUPPORTED)
-    NULL, /* 175 */
-#else  /* !PNG_INFO_IMAGE_SUPPORTED */
-    png_write_png, /* 175 */
-#endif /* !PNG_INFO_IMAGE_SUPPORTED */
-#if !defined(PNG_INTERNAL) || defined(PNG_USE_GLOBAL_ARRAYS) || defined(PNG_NO_EXTERN) && !defined(PNG_ALWAYS_EXTERN)
-    NULL, /* 176 */
-#else  /* !PNG_INTERNAL PNG_USE_GLOBAL_ARRAYS PNG_NO_EXTERN !PNG_ALWAYS_EXTERN */
-    png_sig_bytes, /* 176 */
-#endif /* !PNG_INTERNAL PNG_USE_GLOBAL_ARRAYS PNG_NO_EXTERN !PNG_ALWAYS_EXTERN */
-    png_get_copyright, /* 177 */
-    png_get_header_ver, /* 178 */
-    png_get_header_version, /* 179 */
-    png_get_libpng_ver, /* 180 */
-#if !defined(PNG_INTERNAL) || defined(PNG_READ_BIG_ENDIAN_SUPPORTED) || !defined(PNG_READ_pCAL_SUPPORTED) && !defined(PNG_READ_oFFs_SUPPORTED)
-    NULL, /* 181 */
-#else  /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED !PNG_READ_pCAL_SUPPORTED !PNG_READ_oFFs_SUPPORTED */
-    png_get_int_32, /* 181 */
-#endif /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED !PNG_READ_pCAL_SUPPORTED !PNG_READ_oFFs_SUPPORTED */
-#if !defined(PNG_INTERNAL) || defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
-    NULL, /* 182 */
-#else  /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED */
-    png_get_uint_32, /* 182 */
-#endif /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED */
-#if !defined(PNG_INTERNAL) || defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
-    NULL, /* 183 */
-#else  /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED */
-    png_get_uint_16, /* 183 */
-#endif /* !PNG_INTERNAL PNG_READ_BIG_ENDIAN_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 184 */
-#else  /* !PNG_INTERNAL */
-    png_read_init, /* 184 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 185 */
-#else  /* !PNG_INTERNAL */
-    png_read_init_2, /* 185 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 186 */
-#else  /* !PNG_INTERNAL */
-    png_write_init, /* 186 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 187 */
-#else  /* !PNG_INTERNAL */
-    png_write_init_2, /* 187 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 188 */
-#else  /* !PNG_INTERNAL */
-    png_create_struct, /* 188 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 189 */
-#else  /* !PNG_INTERNAL */
-    png_destroy_struct, /* 189 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 190 */
-#else  /* !PNG_INTERNAL */
-    png_create_struct_2, /* 190 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 191 */
-#else  /* !PNG_INTERNAL */
-    png_destroy_struct_2, /* 191 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 192 */
-#else  /* !PNG_INTERNAL */
-    png_info_destroy, /* 192 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 193 */
-#else  /* !PNG_INTERNAL */
-    png_zalloc, /* 193 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 194 */
-#else  /* !PNG_INTERNAL */
-    png_zfree, /* 194 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 195 */
-#else  /* !PNG_INTERNAL */
-    png_reset_crc, /* 195 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 196 */
-#else  /* !PNG_INTERNAL */
-    png_write_data, /* 196 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 197 */
-#else  /* !PNG_INTERNAL */
-    png_read_data, /* 197 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 198 */
-#else  /* !PNG_INTERNAL */
-    png_crc_read, /* 198 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_zTXt_SUPPORTED) && !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_READ_iCCP_SUPPORTED) && !defined(PNG_READ_sPLT_SUPPORTED)
-    NULL, /* 199 */
-#else  /* !PNG_INTERNAL !PNG_READ_zTXt_SUPPORTED !PNG_READ_iTXt_SUPPORTED !PNG_READ_iCCP_SUPPORTED !PNG_READ_sPLT_SUPPORTED */
-    png_decompress_chunk, /* 199 */
-#endif /* !PNG_INTERNAL !PNG_READ_zTXt_SUPPORTED !PNG_READ_iTXt_SUPPORTED !PNG_READ_iCCP_SUPPORTED !PNG_READ_sPLT_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 200 */
-#else  /* !PNG_INTERNAL */
-    png_crc_finish, /* 200 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 201 */
-#else  /* !PNG_INTERNAL */
-    png_crc_error, /* 201 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 202 */
-#else  /* !PNG_INTERNAL */
-    png_calculate_crc, /* 202 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_FLUSH_SUPPORTED)
-    NULL, /* 203 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_FLUSH_SUPPORTED */
-    png_flush, /* 203 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_FLUSH_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 204 */
-#else  /* !PNG_INTERNAL */
-    png_save_uint_32, /* 204 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_pCAL_SUPPORTED)
-    NULL, /* 205 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED */
-    png_save_int_32, /* 205 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 206 */
-#else  /* !PNG_INTERNAL */
-    png_save_uint_16, /* 206 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 207 */
-#else  /* !PNG_INTERNAL */
-    png_write_sig, /* 207 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 208 */
-#else  /* !PNG_INTERNAL */
-    png_write_IHDR, /* 208 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 209 */
-#else  /* !PNG_INTERNAL */
-    png_write_PLTE, /* 209 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 210 */
-#else  /* !PNG_INTERNAL */
-    png_write_IDAT, /* 210 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 211 */
-#else  /* !PNG_INTERNAL */
-    png_write_IEND, /* 211 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_gAMA_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 212 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_write_gAMA, /* 212 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_gAMA_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 213 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_write_gAMA_fixed, /* 213 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_gAMA_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_sBIT_SUPPORTED)
-    NULL, /* 214 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_sBIT_SUPPORTED */
-    png_write_sBIT, /* 214 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_sBIT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_cHRM_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED)
-    NULL, /* 215 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-    png_write_cHRM, /* 215 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_cHRM_SUPPORTED) || !defined(PNG_FIXED_POINT_SUPPORTED)
-    NULL, /* 216 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-    png_write_cHRM_fixed, /* 216 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_cHRM_SUPPORTED !PNG_FIXED_POINT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_sRGB_SUPPORTED)
-    NULL, /* 217 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_sRGB_SUPPORTED */
-    png_write_sRGB, /* 217 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_sRGB_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_iCCP_SUPPORTED)
-    NULL, /* 218 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_iCCP_SUPPORTED */
-    png_write_iCCP, /* 218 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_iCCP_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_sPLT_SUPPORTED)
-    NULL, /* 219 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_sPLT_SUPPORTED */
-    png_write_sPLT, /* 219 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_sPLT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_tRNS_SUPPORTED)
-    NULL, /* 220 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_tRNS_SUPPORTED */
-    png_write_tRNS, /* 220 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_tRNS_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_bKGD_SUPPORTED)
-    NULL, /* 221 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_bKGD_SUPPORTED */
-    png_write_bKGD, /* 221 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_bKGD_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_hIST_SUPPORTED)
-    NULL, /* 222 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_hIST_SUPPORTED */
-    png_write_hIST, /* 222 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_hIST_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_TEXT_SUPPORTED) && !defined(PNG_WRITE_pCAL_SUPPORTED) && !defined(PNG_WRITE_iCCP_SUPPORTED) && !defined(PNG_WRITE_sPLT_SUPPORTED)
-    NULL, /* 223 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_TEXT_SUPPORTED !PNG_WRITE_pCAL_SUPPORTED !PNG_WRITE_iCCP_SUPPORTED !PNG_WRITE_sPLT_SUPPORTED */
-    png_check_keyword, /* 223 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_TEXT_SUPPORTED !PNG_WRITE_pCAL_SUPPORTED !PNG_WRITE_iCCP_SUPPORTED !PNG_WRITE_sPLT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_tEXt_SUPPORTED)
-    NULL, /* 224 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_tEXt_SUPPORTED */
-    png_write_tEXt, /* 224 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_tEXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_zTXt_SUPPORTED)
-    NULL, /* 225 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_zTXt_SUPPORTED */
-    png_write_zTXt, /* 225 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_zTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_iTXt_SUPPORTED)
-    NULL, /* 226 */
-#else  /* !PNG_INTERNAL !PNG_iTXt_SUPPORTED */
-    png_write_iTXt, /* 226 */
-#endif /* !PNG_INTERNAL !PNG_iTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_oFFs_SUPPORTED)
-    NULL, /* 227 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_oFFs_SUPPORTED */
-    png_write_oFFs, /* 227 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_oFFs_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_pCAL_SUPPORTED)
-    NULL, /* 228 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED */
-    png_write_pCAL, /* 228 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_pCAL_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_pHYs_SUPPORTED)
-    NULL, /* 229 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_pHYs_SUPPORTED */
-    png_write_pHYs, /* 229 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_pHYs_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_tIME_SUPPORTED)
-    NULL, /* 230 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_tIME_SUPPORTED */
-    png_write_tIME, /* 230 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_tIME_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_sCAL_SUPPORTED) || !defined(PNG_FLOATING_POINT_SUPPORTED) || defined(PNG_NO_STDIO)
-    NULL, /* 231 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED PNG_NO_STDIO */
-    png_write_sCAL, /* 231 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_sCAL_SUPPORTED !PNG_FLOATING_POINT_SUPPORTED PNG_NO_STDIO */
-#if !defined(PNG_INTERNAL) || !defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-    NULL, /* 232 */
-#else  /* !PNG_INTERNAL !PNG_FIXED_POINT_SUPPORTED PNG_WRITE_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_NO_STDIO */
-    png_write_sCAL_s, /* 232 */
-#endif /* !PNG_INTERNAL !PNG_FIXED_POINT_SUPPORTED PNG_WRITE_sCAL_SUPPORTED PNG_FLOATING_POINT_SUPPORTED !PNG_NO_STDIO */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 233 */
-#else  /* !PNG_INTERNAL */
-    png_write_finish_row, /* 233 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 234 */
-#else  /* !PNG_INTERNAL */
-    png_write_start_row, /* 234 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_GAMMA_SUPPORTED)
-    NULL, /* 235 */
-#else  /* !PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED */
-    png_build_gamma_table, /* 235 */
-#endif /* !PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 236 */
-#else  /* !PNG_INTERNAL */
-    png_combine_row, /* 236 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_INTERLACING_SUPPORTED)
-    NULL, /* 237 */
-#else  /* !PNG_INTERNAL !PNG_READ_INTERLACING_SUPPORTED */
-    png_do_read_interlace, /* 237 */
-#endif /* !PNG_INTERNAL !PNG_READ_INTERLACING_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_INTERLACING_SUPPORTED)
-    NULL, /* 238 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_INTERLACING_SUPPORTED */
-    png_do_write_interlace, /* 238 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_INTERLACING_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 239 */
-#else  /* !PNG_INTERNAL */
-    png_read_filter_row, /* 239 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 240 */
-#else  /* !PNG_INTERNAL */
-    png_write_find_filter, /* 240 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 241 */
-#else  /* !PNG_INTERNAL */
-    png_write_filtered_row, /* 241 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 242 */
-#else  /* !PNG_INTERNAL */
-    png_read_finish_row, /* 242 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 243 */
-#else  /* !PNG_INTERNAL */
-    png_read_start_row, /* 243 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 244 */
-#else  /* !PNG_INTERNAL */
-    png_read_transform_info, /* 244 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_FILLER_SUPPORTED)
-    NULL, /* 245 */
-#else  /* !PNG_INTERNAL !PNG_READ_FILLER_SUPPORTED */
-    png_do_read_filler, /* 245 */
-#endif /* !PNG_INTERNAL !PNG_READ_FILLER_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-    NULL, /* 246 */
-#else  /* !PNG_INTERNAL !PNG_READ_SWAP_ALPHA_SUPPORTED */
-    png_do_read_swap_alpha, /* 246 */
-#endif /* !PNG_INTERNAL !PNG_READ_SWAP_ALPHA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-    NULL, /* 247 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_SWAP_ALPHA_SUPPORTED */
-    png_do_write_swap_alpha, /* 247 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_SWAP_ALPHA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-    NULL, /* 248 */
-#else  /* !PNG_INTERNAL !PNG_READ_INVERT_ALPHA_SUPPORTED */
-    png_do_read_invert_alpha, /* 248 */
-#endif /* !PNG_INTERNAL !PNG_READ_INVERT_ALPHA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-    NULL, /* 249 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_INVERT_ALPHA_SUPPORTED */
-    png_do_write_invert_alpha, /* 249 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_INVERT_ALPHA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-    NULL, /* 250 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_FILLER_SUPPORTED !PNG_READ_STRIP_ALPHA_SUPPORTED */
-    png_do_strip_filler, /* 250 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_FILLER_SUPPORTED !PNG_READ_STRIP_ALPHA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_SWAP_SUPPORTED) && !defined(PNG_WRITE_SWAP_SUPPORTED)
-    NULL, /* 251 */
-#else  /* !PNG_INTERNAL !PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED */
-    png_do_swap, /* 251 */
-#endif /* !PNG_INTERNAL !PNG_READ_SWAP_SUPPORTED !PNG_WRITE_SWAP_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_PACKSWAP_SUPPORTED) && !defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-    NULL, /* 252 */
-#else  /* !PNG_INTERNAL !PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED */
-    png_do_packswap, /* 252 */
-#endif /* !PNG_INTERNAL !PNG_READ_PACKSWAP_SUPPORTED !PNG_WRITE_PACKSWAP_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-    NULL, /* 253 */
-#else  /* !PNG_INTERNAL !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-    png_do_rgb_to_gray, /* 253 */
-#endif /* !PNG_INTERNAL !PNG_READ_RGB_TO_GRAY_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-    NULL, /* 254 */
-#else  /* !PNG_INTERNAL !PNG_READ_GRAY_TO_RGB_SUPPORTED */
-    png_do_gray_to_rgb, /* 254 */
-#endif /* !PNG_INTERNAL !PNG_READ_GRAY_TO_RGB_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_PACK_SUPPORTED)
-    NULL, /* 255 */
-#else  /* !PNG_INTERNAL !PNG_READ_PACK_SUPPORTED */
-    png_do_unpack, /* 255 */
-#endif /* !PNG_INTERNAL !PNG_READ_PACK_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_SHIFT_SUPPORTED)
-    NULL, /* 256 */
-#else  /* !PNG_INTERNAL !PNG_READ_SHIFT_SUPPORTED */
-    png_do_unshift, /* 256 */
-#endif /* !PNG_INTERNAL !PNG_READ_SHIFT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_INVERT_SUPPORTED) && !defined(PNG_WRITE_INVERT_SUPPORTED)
-    NULL, /* 257 */
-#else  /* !PNG_INTERNAL !PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED */
-    png_do_invert, /* 257 */
-#endif /* !PNG_INTERNAL !PNG_READ_INVERT_SUPPORTED !PNG_WRITE_INVERT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_16_TO_8_SUPPORTED)
-    NULL, /* 258 */
-#else  /* !PNG_INTERNAL !PNG_READ_16_TO_8_SUPPORTED */
-    png_do_chop, /* 258 */
-#endif /* !PNG_INTERNAL !PNG_READ_16_TO_8_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_DITHER_SUPPORTED)
-    NULL, /* 259 */
-#else  /* !PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED */
-    png_do_dither, /* 259 */
-#endif /* !PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_DITHER_SUPPORTED) || !defined(PNG_CORRECT_PALETTE_SUPPORTED)
-    NULL, /* 260 */
-#else  /* !PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED !PNG_CORRECT_PALETTE_SUPPORTED */
-    png_correct_palette, /* 260 */
-#endif /* !PNG_INTERNAL !PNG_READ_DITHER_SUPPORTED !PNG_CORRECT_PALETTE_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_BGR_SUPPORTED) && !defined(PNG_WRITE_BGR_SUPPORTED)
-    NULL, /* 261 */
-#else  /* !PNG_INTERNAL !PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED */
-    png_do_bgr, /* 261 */
-#endif /* !PNG_INTERNAL !PNG_READ_BGR_SUPPORTED !PNG_WRITE_BGR_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_PACK_SUPPORTED)
-    NULL, /* 262 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_PACK_SUPPORTED */
-    png_do_pack, /* 262 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_PACK_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_WRITE_SHIFT_SUPPORTED)
-    NULL, /* 263 */
-#else  /* !PNG_INTERNAL !PNG_WRITE_SHIFT_SUPPORTED */
-    png_do_shift, /* 263 */
-#endif /* !PNG_INTERNAL !PNG_WRITE_SHIFT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_BACKGROUND_SUPPORTED)
-    NULL, /* 264 */
-#else  /* !PNG_INTERNAL !PNG_READ_BACKGROUND_SUPPORTED */
-    png_do_background, /* 264 */
-#endif /* !PNG_INTERNAL !PNG_READ_BACKGROUND_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_GAMMA_SUPPORTED)
-    NULL, /* 265 */
-#else  /* !PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED */
-    png_do_gamma, /* 265 */
-#endif /* !PNG_INTERNAL !PNG_READ_GAMMA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 266 */
-#else  /* !PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED */
-    png_do_expand_palette, /* 266 */
-#endif /* !PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_EXPAND_SUPPORTED)
-    NULL, /* 267 */
-#else  /* !PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED */
-    png_do_expand, /* 267 */
-#endif /* !PNG_INTERNAL !PNG_READ_EXPAND_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 268 */
-#else  /* !PNG_INTERNAL */
-    png_handle_IHDR, /* 268 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 269 */
-#else  /* !PNG_INTERNAL */
-    png_handle_PLTE, /* 269 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 270 */
-#else  /* !PNG_INTERNAL */
-    png_handle_IEND, /* 270 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_bKGD_SUPPORTED)
-    NULL, /* 271 */
-#else  /* !PNG_INTERNAL !PNG_READ_bKGD_SUPPORTED */
-    png_handle_bKGD, /* 271 */
-#endif /* !PNG_INTERNAL !PNG_READ_bKGD_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_cHRM_SUPPORTED)
-    NULL, /* 272 */
-#else  /* !PNG_INTERNAL !PNG_READ_cHRM_SUPPORTED */
-    png_handle_cHRM, /* 272 */
-#endif /* !PNG_INTERNAL !PNG_READ_cHRM_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_gAMA_SUPPORTED)
-    NULL, /* 273 */
-#else  /* !PNG_INTERNAL !PNG_READ_gAMA_SUPPORTED */
-    png_handle_gAMA, /* 273 */
-#endif /* !PNG_INTERNAL !PNG_READ_gAMA_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_hIST_SUPPORTED)
-    NULL, /* 274 */
-#else  /* !PNG_INTERNAL !PNG_READ_hIST_SUPPORTED */
-    png_handle_hIST, /* 274 */
-#endif /* !PNG_INTERNAL !PNG_READ_hIST_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_iCCP_SUPPORTED)
-    NULL, /* 275 */
-#else  /* !PNG_INTERNAL !PNG_READ_iCCP_SUPPORTED */
-    png_handle_iCCP, /* 275 */
-#endif /* !PNG_INTERNAL !PNG_READ_iCCP_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_iTXt_SUPPORTED)
-    NULL, /* 276 */
-#else  /* !PNG_INTERNAL !PNG_iTXt_SUPPORTED */
-    png_handle_iTXt, /* 276 */
-#endif /* !PNG_INTERNAL !PNG_iTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_oFFs_SUPPORTED)
-    NULL, /* 277 */
-#else  /* !PNG_INTERNAL !PNG_READ_oFFs_SUPPORTED */
-    png_handle_oFFs, /* 277 */
-#endif /* !PNG_INTERNAL !PNG_READ_oFFs_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_pCAL_SUPPORTED)
-    NULL, /* 278 */
-#else  /* !PNG_INTERNAL !PNG_READ_pCAL_SUPPORTED */
-    png_handle_pCAL, /* 278 */
-#endif /* !PNG_INTERNAL !PNG_READ_pCAL_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_pHYs_SUPPORTED)
-    NULL, /* 279 */
-#else  /* !PNG_INTERNAL !PNG_READ_pHYs_SUPPORTED */
-    png_handle_pHYs, /* 279 */
-#endif /* !PNG_INTERNAL !PNG_READ_pHYs_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_sBIT_SUPPORTED)
-    NULL, /* 280 */
-#else  /* !PNG_INTERNAL !PNG_READ_sBIT_SUPPORTED */
-    png_handle_sBIT, /* 280 */
-#endif /* !PNG_INTERNAL !PNG_READ_sBIT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_sCAL_SUPPORTED)
-    NULL, /* 281 */
-#else  /* !PNG_INTERNAL !PNG_READ_sCAL_SUPPORTED */
-    png_handle_sCAL, /* 281 */
-#endif /* !PNG_INTERNAL !PNG_READ_sCAL_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_sPLT_SUPPORTED)
-    NULL, /* 282 */
-#else  /* !PNG_INTERNAL !PNG_READ_sPLT_SUPPORTED */
-    png_handle_sPLT, /* 282 */
-#endif /* !PNG_INTERNAL !PNG_READ_sPLT_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_sRGB_SUPPORTED)
-    NULL, /* 283 */
-#else  /* !PNG_INTERNAL !PNG_READ_sRGB_SUPPORTED */
-    png_handle_sRGB, /* 283 */
-#endif /* !PNG_INTERNAL !PNG_READ_sRGB_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_tEXt_SUPPORTED)
-    NULL, /* 284 */
-#else  /* !PNG_INTERNAL !PNG_READ_tEXt_SUPPORTED */
-    png_handle_tEXt, /* 284 */
-#endif /* !PNG_INTERNAL !PNG_READ_tEXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_tIME_SUPPORTED)
-    NULL, /* 285 */
-#else  /* !PNG_INTERNAL !PNG_READ_tIME_SUPPORTED */
-    png_handle_tIME, /* 285 */
-#endif /* !PNG_INTERNAL !PNG_READ_tIME_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_tRNS_SUPPORTED)
-    NULL, /* 286 */
-#else  /* !PNG_INTERNAL !PNG_READ_tRNS_SUPPORTED */
-    png_handle_tRNS, /* 286 */
-#endif /* !PNG_INTERNAL !PNG_READ_tRNS_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_READ_zTXt_SUPPORTED)
-    NULL, /* 287 */
-#else  /* !PNG_INTERNAL !PNG_READ_zTXt_SUPPORTED */
-    png_handle_zTXt, /* 287 */
-#endif /* !PNG_INTERNAL !PNG_READ_zTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
-    NULL, /* 288 */
-#else  /* !PNG_INTERNAL !PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
-    png_handle_as_unknown, /* 288 */
-#endif /* !PNG_INTERNAL !PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 289 */
-#else  /* !PNG_INTERNAL */
-    png_handle_unknown, /* 289 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 290 */
-#else  /* !PNG_INTERNAL */
-    png_check_chunk_name, /* 290 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 291 */
-#else  /* !PNG_INTERNAL */
-    png_do_read_transformations, /* 291 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 292 */
-#else  /* !PNG_INTERNAL */
-    png_do_write_transformations, /* 292 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL)
-    NULL, /* 293 */
-#else  /* !PNG_INTERNAL */
-    png_init_read_transformations, /* 293 */
-#endif /* !PNG_INTERNAL */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 294 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_read_chunk, /* 294 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 295 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_read_sig, /* 295 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 296 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_check_crc, /* 296 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 297 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_crc_skip, /* 297 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 298 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_crc_finish, /* 298 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 299 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_fill_buffer, /* 299 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 300 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_save_buffer, /* 300 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 301 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_restore_buffer, /* 301 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 302 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_read_IDAT, /* 302 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 303 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_process_IDAT_data, /* 303 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 304 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_process_row, /* 304 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 305 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_handle_unknown, /* 305 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 306 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_have_info, /* 306 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 307 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_have_end, /* 307 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 308 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_have_row, /* 308 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 309 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_push_read_end, /* 309 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 310 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_process_some_data, /* 310 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
-    NULL, /* 311 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-    png_read_push_finish_row, /* 311 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_tEXt_SUPPORTED)
-    NULL, /* 312 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED */
-    png_push_handle_tEXt, /* 312 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_tEXt_SUPPORTED)
-    NULL, /* 313 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED */
-    png_push_read_tEXt, /* 313 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_tEXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_zTXt_SUPPORTED)
-    NULL, /* 314 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED */
-    png_push_handle_zTXt, /* 314 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_zTXt_SUPPORTED)
-    NULL, /* 315 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED */
-    png_push_read_zTXt, /* 315 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_zTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_iTXt_SUPPORTED)
-    NULL, /* 316 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED */
-    png_push_handle_iTXt, /* 316 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED */
-#if !defined(PNG_INTERNAL) || !defined(PNG_PROGRESSIVE_READ_SUPPORTED) || !defined(PNG_iTXt_SUPPORTED)
-    NULL, /* 317 */
-#else  /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED */
-    png_push_read_iTXt, /* 317 */
-#endif /* !PNG_INTERNAL !PNG_PROGRESSIVE_READ_SUPPORTED !PNG_iTXt_SUPPORTED */
-};
-
-/* !END!: Do not edit above this line. */
diff --git a/tkimg1.3/libpng/tcl/pngtclStubLib.c b/tkimg1.3/libpng/tcl/pngtclStubLib.c
deleted file mode 100644
index f095ff0..0000000
--- a/tkimg1.3/libpng/tcl/pngtclStubLib.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
- * pngtclStubLib.c --
- *
- *	Stub object that will be statically linked into extensions that wish
- *	to access the PNGTCL API.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: pngtclStubLib.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- */
-
-#ifndef USE_TCL_STUBS
-#define USE_TCL_STUBS
-#endif
-
-#include "pngtcl.h"
-
-PngtclStubs *pngtclStubsPtr;
-
-/*
- *----------------------------------------------------------------------
- *
- * Pngtcl_InitStubs --
- *
- *	Checks that the correct version of Blt is loaded and that it
- *	supports stubs. It then initialises the stub table pointers.
- *
- * Results:
- *	The actual version of BLT that satisfies the request, or
- *	NULL to indicate that an error occurred.
- *
- * Side effects:
- *	Sets the stub table pointers.
- *
- *----------------------------------------------------------------------
- */
-
-#ifdef Pngtcl_InitStubs
-#undef Pngtcl_InitStubs
-#endif
-
-CONST char *
-Pngtcl_InitStubs(interp, version, exact)
-    Tcl_Interp *interp;
-    CONST char *version;
-    int exact;
-{
-    CONST char *result;
-
-    /* HACK: de-CONST 'version' if compiled against 8.3.
-     * The API has no CONST despite not modifying the argument
-     * And a debug build with high warning-level on windows
-     * will abort the compilation.
-     */
-
-#if ((TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)))
-#define UNCONST (char*)
-#else
-#define UNCONST 
-#endif
-
-    result = Tcl_PkgRequireEx(interp, PACKAGE_NAME, UNCONST version, exact,
-		(ClientData *) &pngtclStubsPtr);
-    if (!result || !pngtclStubsPtr) {
-        return (char *) NULL;
-    }
-
-    return result;
-}
-#undef UNCONST
diff --git a/tkimg1.3/libpng/tcl/tclconfig/ChangeLog b/tkimg1.3/libpng/tcl/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/libpng/tcl/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/libpng/tcl/tclconfig/README.txt b/tkimg1.3/libpng/tcl/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/libpng/tcl/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/libpng/tcl/tclconfig/install-sh b/tkimg1.3/libpng/tcl/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/libpng/tcl/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/libpng/tcl/tclconfig/tcl.m4 b/tkimg1.3/libpng/tcl/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/libpng/tcl/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/libpng/tcl/tools/genStubs.tcl b/tkimg1.3/libpng/tcl/tools/genStubs.tcl
deleted file mode 100644
index 2c22380..0000000
--- a/tkimg1.3/libpng/tcl/tools/genStubs.tcl
+++ /dev/null
@@ -1,935 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-package require Tcl 8
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3 && [llength $args] != 4} {
-	puts stderr "wrong # args: declare $args"
-    }
-    if {[llength $args] == 3} {
-	lassign $args index platformList decl
-	set supressorList {}
-    } else {
-	lassign $args index platformList supressorList decl
-    }
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) [list $decl $supressorList]
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "Only one argument is allowed in varargs form: $decl"
-	}
-	set arg [parseArg [lindex $argList 0]]
-	if {$arg == "" || ([llength $arg] != 2)} {
-	    puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-	    return
-	}
-	set args [list TCL_VARARGS $arg]
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    set decl [lindex $decl 0] ; # ignore supressors here.
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    lassign $decl decl suppressors
-    if {[llength $suppressors] > 0} {
-	set sup [list]
-	foreach s $suppressors {
-	    if {[llength $s] > 1} {
-		# Note that elements in the sublist can be negated!
-		set and [list]
-		foreach i $s {
-		    if {[string match !* $i]} {
-			lappend and "!defined([string range $i 1 end])"
-		    } else {
-			lappend and "defined($i)"
-		    }
-		}
-		lappend sup "[join $and " && "]"
-	    } else {
-		if {[string match !* $s]} {
-		    lappend sup "!defined([string range $s 1 end])"
-		} else {
-		    lappend sup "defined($s)"
-		}
-	    }
-	}
-	append text "#if " [join $sup " || "] "\n"
-	append text "    NULL, /* " $index " */\n"
-	append text "#else  /* " [join $suppressors] " */\n"
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-	append text "#endif /* " [join $suppressors] " */\n"
-    } else {
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    }
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/libtiff/COPYRIGHT b/tkimg1.3/libtiff/COPYRIGHT
deleted file mode 100644
index 8282186..0000000
--- a/tkimg1.3/libtiff/COPYRIGHT
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 1988-1997 Sam Leffler
-Copyright (c) 1991-1997 Silicon Graphics, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and 
-its documentation for any purpose is hereby granted without fee, provided
-that (i) the above copyright notices and this permission notice appear in
-all copies of the software and related documentation, and (ii) the names of
-Sam Leffler and Silicon Graphics may not be used in any advertising or
-publicity relating to the software without the specific, prior written
-permission of Sam Leffler and Silicon Graphics.
-
-THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-
-IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-OF THIS SOFTWARE.
diff --git a/tkimg1.3/libtiff/Makefile.in b/tkimg1.3/libtiff/Makefile.in
deleted file mode 100644
index 71ae317..0000000
--- a/tkimg1.3/libtiff/Makefile.in
+++ /dev/null
@@ -1,589 +0,0 @@
-#! smake
-# $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/Makefile.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# @WARNING@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-SRCDIR	= @SRCDIR@
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
- at SETMAKE@
-SHELL	= @SCRIPT_SH@
-SCRIPT_SH = @SCRIPT_SH@
-NULL	=
-ECHO	= echo
-GENDIST	= ${TOOLROOT}/usr/sbin/gendist
-INSTALL	= @INSTALL@
-
-all default:
-	@if [ "@PORT@" = yes ]; then \
-	    ${ECHO} "= "port; cd port; ${MAKE} -${MAKEFLAGS}; \
-	else \
-	    true; \
-	fi
-	@${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS}
-	@${ECHO} "= "tools; cd tools; ${MAKE} -${MAKEFLAGS}
-	@${ECHO} "= "man; cd man; ${MAKE} -${MAKEFLAGS}
-
-install:
-	@${ECHO} "= "libtiff; cd libtiff; ${MAKE} install
-	@${ECHO} "= "tools; cd tools; ${MAKE} install
-	@${ECHO} "= "man; cd man; ${MAKE} install
-	@if [ "@HTML@" = yes ]; then \
-	    ${ECHO} "= "html; cd html; ${MAKE} install; \
-	else \
-	    true; \
-	fi
-
-install-private: install
-	@${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} installPrivateHdrs
-
-clean:
-	@if [ "@PORT@" = yes ]; then \
-	    ${ECHO} "= "port; cd port; ${MAKE} -${MAKEFLAGS} clean; \
-	else \
-	    true; \
-	fi
-	@${ECHO} "= "libtiff; cd libtiff; ${MAKE} -${MAKEFLAGS} clean
-	@${ECHO} "= "tools; cd tools; ${MAKE} -${MAKEFLAGS} clean
-	@${ECHO} "= "man; cd man; ${MAKE} -${MAKEFLAGS} clean
-#	-cd contrib/dbs; ${MAKE} -${MAKEFLAGS} clean
-#	-cd contrib/dbs/xtiff; ${MAKE} -${MAKEFLAGS} clean
-
-clobber distclean: clean
-	rm -f Makefile libtiff/port.h config.log
-	rm -f libtiff/Makefile
-	rm -f tools/Makefile
-	rm -f man/Makefile
-	rm -f port/Makefile port/install.sh
-	rm -f html/Makefile
-
-#
-# The folllowing rule creates a binary distribution for IRIX.
-#
-installLink::
-	if [ @DIR_LIB@ != /usr/lib ]; then				\
-	    ${INSTALL} -idb tiff.sw.tools -F /usr/lib			\
-		-lns @DIR_LIB@/libtiff. at DSOSUF@ -O libtiff. at DSOSUF@;	\
-	else								\
-	    true;							\
-	fi
-product::
-	test -d dist || mkdir dist
-	rm -f dist/rawidb
-	SRC=`pwd` RAWIDB=`pwd`/dist/rawidb ${MAKE} -${MAKEFLAGS} install installLink
-	rm -f dist/idb
-	sort -u +4 dist/rawidb > dist/idb
-	${GENDIST} -v -dist dist -idb dist/idb \
-	    -sbase `pwd` -spec ${SRCDIR}/dist/tiff.spec
-
-#
-# These rules are used to create the source distribution images
-#
-
-HOST	= sgi
-COMPRESS= gzip
-ZIPSUF	= gz
-
-TIFFFILES=\
-	configure				\
-	config.guess				\
-	config.sub				\
-	config.site				\
-	Makefile.in				\
-	README					\
-	VERSION					\
-	RELEASE-DATE				\
-	COPYRIGHT				\
-	TODO					\
-	test_pics.sh				\
-	dist/tiff.spec				\
-	    dist/newalpha			\
-	    dist/newversion			\
-	libtiff/Makefile.in			\
-	    libtiff/Makefile.lcc		\
-	    libtiff/makefile.vc			\
-	    libtiff/libtiff.def			\
-	    libtiff/t4.h			\
-	    libtiff/tiff.h			\
-	    libtiff/tiffcomp.h			\
-	    libtiff/tiffconf.h			\
-	    libtiff/tiffio.h			\
-	    libtiff/tiffiop.h			\
-	    libtiff/uvcode.h			\
-	    libtiff/mkg3states.c		\
-	    libtiff/mkspans.c			\
-	    libtiff/mkversion.c			\
-	    libtiff/tif_acorn.c			\
-	    libtiff/tif_apple.c			\
-	    libtiff/tif_atari.c			\
-	    libtiff/tif_aux.c			\
-	    libtiff/tif_close.c			\
-	    libtiff/tif_codec.c			\
-	    libtiff/tif_compress.c		\
-	    libtiff/tif_color.c			\
-	    libtiff/tif_dir.h			\
-	    libtiff/tif_dir.c			\
-	    libtiff/tif_dirinfo.c		\
-	    libtiff/tif_dirread.c		\
-	    libtiff/tif_dirwrite.c		\
-	    libtiff/tif_dumpmode.c		\
-	    libtiff/tif_error.c			\
-	    libtiff/tif_extension.c		\
-	    libtiff/tif_fax3.c			\
-	    libtiff/fax3sm_winnt.c		\
-	    libtiff/tif_fax3.h			\
-	    libtiff/tif_flush.c			\
-	    libtiff/tif_getimage.c		\
-	    libtiff/tif_jpeg.c			\
-	    libtiff/tif_ojpeg.c			\
-	    libtiff/tif_luv.c			\
-	    libtiff/tif_lzw.c			\
-	    libtiff/tif_msdos.c			\
-	    libtiff/tif_next.c			\
-	    libtiff/tif_open.c			\
-	    libtiff/tif_packbits.c		\
-	    libtiff/tif_pixarlog.c		\
-	    libtiff/tif_predict.h		\
-	    libtiff/tif_predict.c		\
-	    libtiff/tif_print.c			\
-	    libtiff/tif_read.c			\
-	    libtiff/tif_strip.c			\
-	    libtiff/tif_swab.c			\
-	    libtiff/tif_thunder.c		\
-	    libtiff/tif_tile.c			\
-	    libtiff/tif_unix.c			\
-	    libtiff/tif_version.c		\
-	    libtiff/tiffvers.h			\
-	    libtiff/tif_vms.c			\
-	    libtiff/tif_warning.c		\
-	    libtiff/tif_win3.c			\
-	    libtiff/tif_win32.c			\
-	    libtiff/tif_write.c			\
-	    libtiff/tif_zip.c			\
-	port/Makefile.in			\
-	    port/getopt.c			\
-	    port/install.sh.in			\
-	    port/irix/so_locations		\
-	    port/strcasecmp.c			\
-	    port/strtoul.c			\
-	tools/Makefile.in			\
-	    tools/Makefile.vc			\
-	    tools/Makefile.lcc			\
-	    tools/fax2tiff.c			\
-	    tools/fax2ps.c			\
-	    tools/gif2tiff.c			\
-	    tools/pal2rgb.c			\
-	    tools/ppm2tiff.c			\
-	    tools/ras2tiff.c			\
-	    tools/rasterfile.h			\
-	    tools/raw2tiff.c			\
-	    tools/rgb2ycbcr.c			\
-	    tools/sgi2tiff.c			\
-	    tools/tiffgt.c			\
-	    tools/sgisv.c			\
-	    tools/thumbnail.c			\
-	    tools/tiff2bw.c			\
-	    tools/tiff2rgba.c			\
-	    tools/tiff2pdf.c			\
-	    tools/tiff2ps.c			\
-	    tools/tiffcmp.c			\
-	    tools/tiffcp.c			\
-	    tools/tiffdither.c			\
-	    tools/tiffdump.c			\
-	    tools/tiffinfo.c			\
-	    tools/tiffmedian.c			\
-	    tools/tiffsplit.c			\
-	    tools/tiffset.c			\
-	    tools/ycbcr.c			\
-	man/Makefile.in				\
-	    man/fax2tiff.1			\
-	    man/fax2ps.1			\
-	    man/gif2tiff.1			\
-	    man/pal2rgb.1			\
-	    man/ppm2tiff.1			\
-	    man/ras2tiff.1			\
-	    man/raw2tiff.1			\
-	    man/rgb2ycbcr.1			\
-	    man/sgi2tiff.1			\
-	    man/thumbnail.1			\
-	    man/tiff2bw.1			\
-	    man/tiff2rgba.1			\
-	    man/tiff2pdf.1			\
-	    man/tiff2ps.1			\
-	    man/tiffcmp.1			\
-	    man/tiffcp.1			\
-	    man/tiffdither.1			\
-	    man/tiffdump.1			\
-	    man/tiffgt.1			\
-	    man/tiffinfo.1			\
-	    man/tiffmedian.1			\
-	    man/tiffsplit.1			\
-	    man/tiffsv.1			\
-	    man/TIFFClose.3t			\
-	    man/TIFFDataWidth.3t		\
-	    man/TIFFError.3t			\
-	    man/TIFFFlush.3t			\
-	    man/TIFFGetField.3t			\
-	    man/TIFFOpen.3t			\
-	    man/TIFFPrintDirectory.3t		\
-	    man/TIFFReadDirectory.3t		\
-	    man/TIFFReadEncodedStrip.3t		\
-	    man/TIFFReadEncodedTile.3t		\
-	    man/TIFFReadRGBAImage.3t		\
-	    man/TIFFReadRGBAStrip.3t		\
-	    man/TIFFReadRGBATile.3t		\
-	    man/TIFFReadRawStrip.3t		\
-	    man/TIFFReadRawTile.3t		\
-	    man/TIFFReadScanline.3t		\
-	    man/TIFFReadTile.3t			\
-	    man/TIFFRGBAImage.3t		\
-	    man/TIFFSetDirectory.3t		\
-	    man/TIFFSetField.3t			\
-	    man/TIFFWarning.3t			\
-	    man/TIFFWriteDirectory.3t 		\
-	    man/TIFFWriteEncodedStrip.3t	\
-	    man/TIFFWriteEncodedTile.3t		\
-	    man/TIFFWriteTile.3t		\
-	    man/TIFFWriteRawStrip.3t		\
-	    man/TIFFWriteRawTile.3t		\
-	    man/TIFFWriteScanline.3t		\
-	    man/libtiff.3t			\
-	    man/TIFFbuffer.3t			\
-	    man/TIFFcodec.3t			\
-	    man/TIFFcolor.3t			\
-	    man/TIFFmemory.3t			\
-	    man/TIFFquery.3t			\
-	    man/TIFFsize.3t			\
-	    man/TIFFstrip.3t			\
-	    man/TIFFswab.3t			\
-	    man/TIFFtile.3t			\
-	    html/images				\
-	    html/images/back.gif				\
-	    html/images/bali.jpg				\
-	    html/images/cat.gif				\
-	    html/images/cover.jpg				\
-	    html/images/cramps.gif				\
-	    html/images/dave.gif				\
-	    html/images/info.gif				\
-	    html/images/jello.jpg				\
-	    html/images/jim.gif				\
-	    html/images/note.gif				\
-	    html/images/oxford.gif				\
-	    html/images/quad.jpg				\
-	    html/images/ring.gif				\
-	    html/images/smallliz.jpg				\
-	    html/images/strike.gif				\
-	    html/images/warning.gif				\
-	    html/Makefile.in				\
-	    html/bugs.html				\
-	    html/build.html				\
-	    html/contrib.html				\
-	    html/document.html				\
-	    html/images.html				\
-	    html/index.html				\
-	    html/internals.html				\
-	    html/intro.html				\
-	    html/libtiff.html				\
-	    html/misc.html				\
-	    html/support.html				\
-	    html/tools.html				\
-	    html/v3.4beta007.html				\
-	    html/v3.4beta016.html				\
-	    html/v3.4beta018.html				\
-	    html/v3.4beta024.html				\
-	    html/v3.4beta028.html				\
-	    html/v3.4beta029.html				\
-	    html/v3.4beta031.html				\
-	    html/v3.4beta032.html				\
-	    html/v3.4beta033.html				\
-	    html/v3.4beta034.html				\
-	    html/v3.4beta035.html				\
-	    html/v3.4beta036.html				\
-	    html/v3.5.1.html					\
-	    html/v3.5.2.html					\
-	    html/v3.5.3.html					\
-	    html/v3.5.4.html					\
-	    html/v3.5.5.html					\
-	    html/v3.5.6-beta.html				\
-	    html/v3.5.7.html					\
-	    html/v3.6.0.html					\
-	    html/v3.6.1.html					\
-	    html/man						\
-	    html/man/TIFFClose.3t.html				\
-	    html/man/TIFFDataWidth.3t.html			\
-	    html/man/TIFFError.3t.html				\
-	    html/man/TIFFFlush.3t.html				\
-	    html/man/TIFFGetField.3t.html				\
-	    html/man/TIFFOpen.3t.html				\
-	    html/man/TIFFPrintDirectory.3t.html				\
-	    html/man/TIFFRGBAImage.3t.html				\
-	    html/man/TIFFReadDirectory.3t.html				\
-	    html/man/TIFFReadEncodedStrip.3t.html				\
-	    html/man/TIFFReadEncodedTile.3t.html				\
-	    html/man/TIFFReadRGBAImage.3t.html				\
-	    html/man/TIFFReadRGBAStrip.3t.html				\
-	    html/man/TIFFReadRGBATile.3t.html				\
-	    html/man/TIFFReadRawStrip.3t.html				\
-	    html/man/TIFFReadRawTile.3t.html				\
-	    html/man/TIFFReadScanline.3t.html				\
-	    html/man/TIFFReadTile.3t.html				\
-	    html/man/TIFFSetDirectory.3t.html				\
-	    html/man/TIFFSetField.3t.html				\
-	    html/man/TIFFWarning.3t.html				\
-	    html/man/TIFFWriteDirectory.3t.html				\
-	    html/man/TIFFWriteEncodedStrip.3t.html				\
-	    html/man/TIFFWriteEncodedTile.3t.html				\
-	    html/man/TIFFWriteRawStrip.3t.html			\
-	    html/man/TIFFWriteRawTile.3t.html			\
-	    html/man/TIFFWriteScanline.3t.html			\
-	    html/man/TIFFbuffer.3t.html				\
-	    html/man/TIFFcodec.3t.html				\
-	    html/man/TIFFcolor.3t.html				\
-	    html/man/TIFFmemory.3t.html				\
-	    html/man/TIFFquery.3t.html				\
-	    html/man/TIFFsize.3t.html				\
-	    html/man/TIFFstrip.3t.html				\
-	    html/man/TIFFswab.3t.html				\
-	    html/man/TIFFtile.3t.html				\
-	    html/man/fax2ps.1.html				\
-	    html/man/fax2tiff.1.html				\
-	    html/man/gif2tiff.1.html				\
-	    html/man/libtiff.3t.html				\
-	    html/man/pal2rgb.1.html				\
-	    html/man/ppm2tiff.1.html				\
-	    html/man/ras2tiff.1.html				\
-	    html/man/raw2tiff.1.html				\
-	    html/man/rgb2ycbcr.1.html				\
-	    html/man/sgi2tiff.1.html				\
-	    html/man/thumbnail.1.html				\
-	    html/man/tiff2bw.1.html				\
-	    html/man/tiff2pdf.1.html				\
-	    html/man/tiff2ps.1.html				\
-	    html/man/tiff2rgba.1.html				\
-	    html/man/tiffcmp.1.html				\
-	    html/man/tiffcp.1.html				\
-	    html/man/tiffdither.1.html				\
-	    html/man/tiffdump.1.html				\
-	    html/man/tiffgt.1.html				\
-	    html/man/tiffinfo.1.html				\
-	    html/man/tiffmedian.1.html				\
-	    html/man/tiffsplit.1.html				\
-	    html/man/tiffsv.1.html				\
-	    html/man/index.html					\
-	    html/man/TIFFWriteTile.3t.html			\
-	    ${NULL}
-OTHERFILES=\
-	${NULL}
-CONTRIBFILES=\
-	contrib/dbs/README			\
-	    contrib/dbs/Imakefile		\
-	    contrib/dbs/tiff-bi.c		\
-	    contrib/dbs/tiff-grayscale.c	\
-	    contrib/dbs/tiff-palette.c		\
-	    contrib/dbs/tiff-rgb.c		\
-	    contrib/dbs/xtiff/README		\
-		contrib/dbs/xtiff/Imakefile	\
-		contrib/dbs/xtiff/patchlevel.h	\
-		contrib/dbs/xtiff/xtiff.c	\
-		contrib/dbs/xtiff/xtifficon.h	\
-	contrib/ras/README			\
-	    contrib/ras/ras2tif.c		\
-	    contrib/ras/tif2ras.c		\
-	contrib/ojpeg/README			\
-	    contrib/ojpeg/jdhuff_add.c		\
-	contrib/vms/libtiff/makevms.com		\
-	    contrib/vms/libtiff/tiff.opt	\
-	    contrib/vms/libtiff/tiffshraxp.opt	\
-	    contrib/vms/libtiff/tiffshrvax.opt	\
-	    contrib/vms/libtiff/tiffvec.mar	\
-	    contrib/vms/tools/makevms.com	\
-	contrib/tags/README			\
-	    contrib/tags/Makefile.gcc		\
-	    contrib/tags/Makefile.mpw		\
-	    contrib/tags/listtif.c		\
-	    contrib/tags/maketif.c		\
-	    contrib/tags/xtif_dir.c		\
-	    contrib/tags/xtiffio.h		\
-	    contrib/tags/xtiffiop.h		\
-	contrib/mac-mpw/README			\
-	    contrib/mac-mpw/BUILD.mpw		\
-	    contrib/mac-mpw/libtiff.make	\
-	    contrib/mac-mpw/mactrans.c		\
-	    contrib/mac-mpw/port.make		\
-	    contrib/mac-mpw/tools.make		\
-	    contrib/mac-mpw/top.make		\
-	contrib/acorn/ReadMe			\
-	    contrib/acorn/Makefile		\
-	    contrib/acorn/SetVars		\
-	    contrib/acorn/cleanlib		\
-	    contrib/acorn/convert		\
-	    contrib/acorn/install		\
-	contrib/win32/README			\
-	    contrib/win32/dllshell.c		\
-	    contrib/win32/libtiff.def		\
-	contrib/win_dib/README.tiff2dib		\
-	    contrib/win_dib/Makefile.w95	\
-	    contrib/win_dib/tiff2dib.c		\
-	    contrib/win_dib/README.Tiffile	\
-	    contrib/win_dib/Tiffile.cpp		\
-	contrib/winnt/README			\
-	    contrib/winnt/README.console	\
-	    contrib/winnt/fax3sm.c		\
-	    contrib/winnt/libtiff.def		\
-	    contrib/winnt/libtiff.mak		\
-	    contrib/winnt/libtiff.vcp		\
-	    contrib/winnt/version.h		\
-	contrib/mac-cw/README			\
-	    contrib/mac-cw/Makefile.script	\
-	    contrib/mac-cw/mac_main.c		\
-	    contrib/mac-cw/mac_main.h		\
-	    contrib/mac-cw/metrowerks.note	\
-	    contrib/mac-cw/mkg3_main.c		\
-	    contrib/mac-cw/version.h		\
-	contrib/dosdjgpp/README			\
-	    contrib/dosdjgpp/Makefile.lib	\
-	    contrib/dosdjgpp/Makefile.tools	\
-	    contrib/dosdjgpp/Makefile.top	\
-	    contrib/dosdjgpp/conf.bat		\
-	    contrib/dosdjgpp/port.h		\
-	contrib/mfs/README			\
-	    contrib/mfs/mfs_file.c		\
-	contrib/pds/README			\
-	    contrib/pds/tif_imageiter.c		\
-	    contrib/pds/tif_imageiter.h		\
-	    contrib/pds/tif_pdsdirread.c	\
-	    contrib/pds/tif_pdsdirwrite.c	\
-	contrib/addtiffo/README			\
-	    contrib/addtiffo/Makefile		\
-	    contrib/addtiffo/Makefile.vc	\
-	    contrib/addtiffo/addtiffo.c		\
-	    contrib/addtiffo/tif_overview.c	\
-	    contrib/addtiffo/tif_ovrcache.c	\
-	    contrib/addtiffo/tif_ovrcache.h	\
-	contrib/iptcutil/Makefile		\
-		contrib/iptcutil/iptcutil.c	\
-		contrib/iptcutil/test.iptc	\
-		contrib/iptcutil/test.txt	\
-	${NULL}
-
-DISTFILES=\
-	${TIFFFILES}				\
-	dist/tiff.alpha				\
-	dist/tiff.version			\
-	${OTHERFILES}				\
-	${CONTRIBFILES}				\
-	${NULL}
-
-CONFIG=\
-	-with-CC=cc \
-	-with-GCOPTS=" " \
-	-with-JPEG=yes \
-	-with-DIR_JPEG=../src/jpeg-5a \
-	-with-ZIP=yes \
-	-with-DIR_LIBGZ=../src/zlib \
-	${NULL}
-
-rcsclean:
-	rcsclean ${TIFFFILES} && co ${TIFFFILES}
-
-release:
-	(cd ${SRCDIR}/dist; sh newversion)
-	${MAKE}  -${MAKEFLAGS} release.stamp
-	(cd ${SRCDIR}/libtiff; ${MAKE} -${MAKEFLAGS} tiffvers.h)
-#	${SRCDIR}/configure ${CONFIG}
-#	${MAKE} -${MAKEFLAGS} product
-	${MAKE} -${MAKEFLAGS} release.tar.zip
-
-
-# stamp relevant files according to current alpha
-release.stamp:
-	date "+%m/%d/%Y" > RELEASE-DATE
-
-#diffs since last release
-releasediff:
-	- at for i in ${TIFFFILES}; do					\
-	    cvs diff -D`cat RELEASE-DATE` ${SRCDIR}/$$i;				\
-	done
-
-# create release or beta distribution archive
-release.tar.zip:
-	if test "@RELEASE@" = "" ; then					\
-	  VERSIONREL="@VERSION@";					\
-	else								\
-	  VERSIONREL="@VERSION at -@RELEASE@";				\
-	fi;								\
-	rm -f ../tiff-$$VERSIONREL $$VERSIONREL $$VERSIONREL-tar;			\
-	ln -s ${SRCDIR} tiff-$$VERSIONREL;					\
-	(for i in ${DISTFILES}; do					\
-	   echo $$i;							\
-	done) | sed "s;.*;tiff-$$VERSIONREL/&;" >$$VERSIONREL;		\
-	tar cvf $$VERSIONREL-tar `cat $$VERSIONREL`;				\
-	zip ../tiff-$$VERSIONREL.zip `cat $$VERSIONREL`; 				\
-	cat $$VERSIONREL-tar | ${COMPRESS} >../tiff-$$VERSIONREL.tar.${ZIPSUF};	\
-	rm -f tiff-$$VERSIONREL $$VERSIONREL $$VERSIONREL-tar;
-#
-#	Simple rule to run test suite assuming that pics directory is 
-#	just below this one, and that .rpt files are available. 
-#
-test:
-	${SRCDIR}/test_pics.sh pics/*.tif
-
-#
-# Create a package of the test images.
-#
-
-PICS=\
-	pics/README		 \
-	pics/cramps.tif		 \
-	pics/cramps-tile.tif	\
-	pics/fax2d.tif		\
-	pics/g3test.tif		\
-	pics/jello.tif		\
-	pics/jim___cg.tif	\
-	pics/jim___dg.tif	\
-	pics/jim___gg.tif	\
-	pics/jim___ah.tif	\
-	pics/strike.tif		\
-	pics/oxford.tif		\
-	pics/quad-lzw.tif	\
-	pics/quad-tile.tif	\
-	pics/text.tif		\
-	pics/ycbcr-cat.tif	\
-	pics/smallliz.tif	\
-	pics/zackthecat.tif	\
-	pics/fax2d.g3		\
-	pics/g3test.g3		\
-	${NULL}
-
-pics.tar:
-	tar cvf - ${PICS} | ${COMPRESS} > tiffpics.tar.${ZIPSUF}
diff --git a/tkimg1.3/libtiff/README b/tkimg1.3/libtiff/README
deleted file mode 100644
index 9607e42..0000000
--- a/tkimg1.3/libtiff/README
+++ /dev/null
@@ -1,59 +0,0 @@
-$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/README,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-
-TIFF Software Distribution
---------------------------
-This file is just a placeholder; all the documentation is now in
-HTML in the html directory.  To view the documentation point your
-favorite WWW viewer at html/index.html; e.g.
-
-    netscape html/index.html
-
-If you don't have an HTML viewer then you can read the HTML source
-or fetch a PostScript version of this documentation from the directory
-
-    ftp://ftp.remotesensing.org/pub/libtiff/
-
-If you can't hack either of these options then basically what you
-want to do is:
-
-    % ./configure
-    % make
-    % su
-    # make install
-
-More information, email contacts, and mailing list information can be 
-found online at http://www.libtiff.org/.
-
-
-Use and Copyright
------------------
-Silicon Graphics has seen fit to allow us to give this work away.  It
-is free.  There is no support or guarantee of any sort as to its
-operations, correctness, or whatever.  If you do anything useful with
-all or parts of it you need to honor the copyright notices.   I would
-also be interested in knowing about it and, hopefully, be acknowledged.
-
-The legal way of saying that is:
-
-Copyright (c) 1988-1997 Sam Leffler
-Copyright (c) 1991-1997 Silicon Graphics, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and 
-its documentation for any purpose is hereby granted without fee, provided
-that (i) the above copyright notices and this permission notice appear in
-all copies of the software and related documentation, and (ii) the names of
-Sam Leffler and Silicon Graphics may not be used in any advertising or
-publicity relating to the software without the specific, prior written
-permission of Sam Leffler and Silicon Graphics.
-
-THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-
-IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-OF THIS SOFTWARE.
diff --git a/tkimg1.3/libtiff/RELEASE-DATE b/tkimg1.3/libtiff/RELEASE-DATE
deleted file mode 100644
index d423ad1..0000000
--- a/tkimg1.3/libtiff/RELEASE-DATE
+++ /dev/null
@@ -1 +0,0 @@
-12/26/2003
diff --git a/tkimg1.3/libtiff/TODO b/tkimg1.3/libtiff/TODO
deleted file mode 100644
index fd5a6ff..0000000
--- a/tkimg1.3/libtiff/TODO
+++ /dev/null
@@ -1,12 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/TODO,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-
-o gif2tiff segaulting on selected images
-o tiffcmp read data by strip/tile instead of scanline
-o YCbCr sampling support
-o extracate colorspace conversion support
-o look at isolating all codecs from TIFF library
-o JPEG colormode order dependency problem
-o Write documentation on how do extend tags, and how the custom field
-  stuff all works. 
-
-
diff --git a/tkimg1.3/libtiff/VERSION b/tkimg1.3/libtiff/VERSION
deleted file mode 100644
index 9575d51..0000000
--- a/tkimg1.3/libtiff/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.6.1
diff --git a/tkimg1.3/libtiff/config.guess b/tkimg1.3/libtiff/config.guess
deleted file mode 100755
index 1127162..0000000
--- a/tkimg1.3/libtiff/config.guess
+++ /dev/null
@@ -1,1415 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-10-07'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit 0 ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit 0;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit 0 ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit 0 ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit 0 ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit 0 ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit 0 ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit 0 ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit 0 ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#ifdef __INTEL_COMPILER
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit 0 ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit 0 ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit 0 ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit 0 ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit 0 ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit 0 ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit 0 ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit 0 ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit 0 ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit 0 ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Darwin:*:*)
-	case `uname -p` in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit 0 ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit 0 ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit 0 ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit 0 ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit 0 ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit 0 ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit 0 ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit 0 ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-    ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/tkimg1.3/libtiff/config.site b/tkimg1.3/libtiff/config.site
deleted file mode 100644
index 10db7ec..0000000
--- a/tkimg1.3/libtiff/config.site
+++ /dev/null
@@ -1,174 +0,0 @@
-# $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/config.site,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# TIFF Software
-#
-# Copyright (c) 1990-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# This file holds site-specific configuration parameters.
-#
-# Nothing is defined in here by default, the definitions
-# commented out below serve as documentation for what you
-# can set in this file or a config.local file.
-#
-# Note that you do not need to set anything here unless you
-# want to override the auto-configuration behaviour and/or
-# interactive prompting done by the configure script.
-#
-
-#
-# Package controls.
-#
-#DSO="auto"			# auto|IRIX|IRIX52 enable DSO support for system
-#JPEG="yes"			# yes|no configure JPEG support (see below)
-#ZIP="yes"			# yes|no configure Deflate support (see below)
-#LIBGL="auto"			# yes|no|auto configure IRIS GL-based tools
-#LIBIMAGE="auto"		# yes|no|auto configure SGI RGB image tools
-#HTML="yes"			# yes|no install HTML documentation
-
-#NONINTERACTIVE=yes		# yes|no Don't ask for confirmation on console
-
-#
-# Directory parameters.
-#
-#DIR_BIN="/usr/local/bin"		# directory for tools
-#DIR_LIB="/usr/local/lib"		# directory for libraries
-#DIR_INC="/usr/local/include"		# directory for include files
-#DIR_MAN="/usr/local/man"		# directory for manual pages
-#DIR_HTML="/var/httpd/htdocs/tiff"	# directory for HTML documentation
-
-#
-# Configuring supporting libraries.
-#
-# The TIFF software makes use of two ancillary packages: the IJG
-# distribution to support the JPEG codec and the zlib distribution
-# to support the Deflate codec.  To setup use of these packages you
-# need to specify where each package's include files are located and
-# where the pre-built library (static archive or DSO) is located.
-# These may be different or the same (as when the package is compiled
-# and referenced directly from the place where the software was
-# loaded and compiled).
-#
-# DIRS_LIBINC is a space-separated list of directories to use for
-# locating include files in these packages.  Note that it should not
-# include -I options as might be passed to the C preprocessor; these
-# are automatically added by the configure script when the Makefiles
-# are generated.
-#
-# DIR_<package>LIB is the pathname of the directory where <package>'s
-# pre-built library may be found; this is used when building a TIFF
-# DSO (on systems where support is present) and when building the
-# programs in the tools directory.  By default the configure script
-# will load the associated library using
-#
-#     -L${DIR_<package>LIB} -l<package>
-#
-# e.g. -L${DIR_JPEGLIB} -ljpeg.  If this is wrong for your system
-# (e.g. your compiler/loader does not support the -L option), then
-# the LIB<package> parameter can be set explicitly to specify the
-# library to use.
-#
-
-#
-# JPEG-specific parameters; used when JPEG support is enabled (see above).
-#
-# JPEG support requires release 5 or later of the IJG code,
-# which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
-#
-#DIRS_LIBINC="$DIRS_LIBINC ../src/jpeg-6b" # directory for jpeg include files
-#DIR_JPEGLIB=../src/jpeg-6b		# directory for libjpeg
-
-# The following will enable OJPEG support.  Note that a patch libjpeg is
-# required before this can be enabled.  It is also only supported if JPEG is
-# enabled.  
-
-#OJPEG="yes"			        # yes|no configure OJPEG support
-
-#
-# Deflate-specific parameters; used when Deflate support is enabled (see above).
-#
-# NB: Deflate support requires version 0.92 or later of the zlib
-#     library written by Jean-loup Gailly and Mark Adler.  Starting
-#     with about 0.95 the library is called libz.a (previously it was
-#     libgz.a).  The library was last found at
-#
-#        ftp://ftp.uu.net/graphics/png/code/zlib-0.93.tar.gz
-#
-#     Look for it also at ftp://ftp.uu.net/pub/archiving/zip/zlib.
-#
-#DIRS_LIBINC="$DIRS_LIBINC ../zlib"	# directory for zlib include files
-#DIR_GZLIB="../zlib"			# directory for libz
-
-#
-# Miscellaneous parameters.
-#
-#FILLORDER="MS2LSB"			# bit order of cpu (MSB2LSB/LSB2MSB)
-#MANSCHEME="sysv-source-cat-strip"	# manual page installation scheme
-#LARGEFILE="yes"			# support for large (>2GiB) files
-
-#
-# Parameters used when building the software.
-#
-# Note that configure has several ENVOPTS built into it that are
-# set according to the target.  This is done to help naive folks.
-#
-# Beware of changing the INSTALL definition; you *must* have an
-# install script that emulates the Silicon Graphics install program!
-#
-#AR="/bin/ar"				# pathname of suitable ar program
-#AROPTS="rc"				# options to ar for creating archive
-#CC="gcc"				# name/pathname of C compiler
-#CCOMPILER=/opt/ansic/bin/$CC		# path to compiler if not in PATH.
-#ENVOPTS="-Aa"				# options for getting ANSI C
-#GCOPTS="-g"				# options to pass C compiler
-#OPTIMIZER="-O"				# Optimization options for compiler
-#LDFLAGS="-Wl,-O"                       # Special linker flags.
-#LIBPORT='${PORT}/libport.a'		# library with emulation code
-#MACHDEPLIBS="-lm"			# extra libraries for linking
-#PORTFUNCS=""				# non-standard functions to emulate
-#RANLIB=":"				# pathname of suitable ranlib program
-#DSOSUF="so"				# DSO filename suffix
-#LIBCOPTS="-K PIC"			# compiler options for building library
-#TARGET=hppa1.1-hp-hpux11.11            # Force TARGET platform setting.
-#PATH="$PATH:/usr/ccs/bin"		# Modify path for finding compilers,etc
-
-#
-# Makefile construction parameters.
-#
-# These should not normally be set; configure will
-# deduce the appropriate syntax to use for includes.
-#
-#SETMAKE='MAKE	= ${MAKE}'		# define if make does not setup $MAKE
-
-#
-# General system stuff used by the distribution.
-#
-#CHMOD="/etc/chmod"			# pathname of suitable chmod program
-#INSTALL='${SHELL} ${PORT}/install.sh'	# SGI install program/emulator
-#LN="/bin/ln"				# pathname of suitable ln program
-#LN_S="-s"				# option to ${LN} to create symlink
-#MV_F="-f"				# option to ${MV} to force operation
-#SED="/bin/sed"				# pathname of suitable sed program
-#SCRIPT_SH="/bin/sh"			# pathname of suitable shell
-#STRIP="/bin/strip"			# strip program used by install.sh
diff --git a/tkimg1.3/libtiff/config.sub b/tkimg1.3/libtiff/config.sub
deleted file mode 100755
index 79657cd..0000000
--- a/tkimg1.3/libtiff/config.sub
+++ /dev/null
@@ -1,1510 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-10-07'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit 0;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32r | m68000 | m68k | m88k | mcore \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| msp430 \
-	| ns16k | ns32k \
-	| openrisc | or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32r-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	or32 | or32-*)
-		basic_machine=or32-unknown
-		os=-coff
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/tkimg1.3/libtiff/configure b/tkimg1.3/libtiff/configure
deleted file mode 100755
index 9daeb46..0000000
--- a/tkimg1.3/libtiff/configure
+++ /dev/null
@@ -1,1921 +0,0 @@
-#!/bin/sh
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/configure,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-# Configuration script for the TIFF Software
-
-#
-# Shell script to setup machine-dependent files in
-# preparation for building TIFF source.
-#
-
-POSIXLY_CORRECT=1; export POSIXLY_CORRECT	# disable GNU extensions
-
-QUIET=no				# suppress messages to tty
-NONINTERACTIVE=no			# control prompting of config params
-SITE=					# dir where config.site is located
-TARGET=					# target system identity
-SRCDIR=					# dir where source is located
-
-#
-# Setup general configuration parameters.
-#
-PREFIX=/usr/local                       # root of installation 
-EPREFIX=${PREFIX}
-DIRS_LIBINC=				# dirs to search for ancillary includes
-DIR_JPEGLIB=				# dir for IJG -ljpeg
-DIR_GZLIB=				# dir for zlib -lgz
-DSO=auto				# auto-enable DSO support
-LIBCOPTS=				# library-specific C-compiler options
-JPEG=no					# configure JPEG support
-ZIP=no					# configure ZIP/Deflate support
-PORT=auto				# enable portability emulations
-HTML=no					# install HTML documentation
-LIBGL=auto				# auto-enable build of SGI -lgl apps
-LIBIMAGE=auto				# auto-enable build of SGI -limage apps
-: ${CC=}				# name of C compiler to use
-: ${CCOMPILER=}				# full pathname of C compiler
-: ${OPTIMIZER=-O}			# Optimization flag
-: ${ENVOPTS=}				# CC opts for ANSI C compilation
-: ${MAKE=make}				# make to use
-
-# screws up the test of `-f -'
-: ${MAKEFLAGS=}				# unset MAKEFLAGS
-RM="rm -f"
-
-#
-# Error diagnostics that should go to the terminal are
-# done with this interface (or cat).
-#
-bitch()
-{
-    echo "configure: $@" 1>&2
-}
-
-#
-# This is the preferred interface for
-# configure to terminate abnormally.
-#
-boom()
-{
-    bitch ""
-    bitch "Unrecoverable error!  Once you've corrected the problem rerun this script."
-    kill -1 $$				# use kill so trap handler is called
-}
-
-usage()
-{
-    cat<<'EOF'
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-  --help                  print this message
-  --quiet                 do not print `Using ...' messages
-  --verbose		  opposite of --quiet
-  --noninteractive        don't ask any questions
-  --version               print the version of autoconf that created configure
-  --prefix=PREFIX         root of installation [PREFIX=/usr/local]
-  --exec-prefix=EPREFIX   root of installation [EPREFIX=PREFIX]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --with-PARAM[=ARG]      set configuration PARAM [ARG=yes]
-EOF
-}
-
-#
-# Crack command line arguments.  We purposely
-# use syntax and options that are compatible
-# with GNU autoconf.
-#
-ac_prev=
-for ac_option
-do
-    if [ -n "$ac_prev" ]; then		# assign the argument to previous option
-	eval "$ac_prev=\$ac_option"
-	ac_prev=
-	continue
-    fi
-    case "$ac_option" in		# collect optional argument
-    -*=*)	ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'`;;
-    *)		ac_optarg=;;
-    esac
-    case "$ac_option" in
-    -with-*|--with-*)
-	ac_with=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-	# Reject names that are not valid shell variable names.
-	if [ -n "`echo $ac_with| sed 's/[-_a-zA-Z0-9]//g'`" ]; then
-	    bitch "configure: $ac_with: invalid parameter name."
-	    kill -1 $$
-	fi
-	ac_with=`echo $ac_with| sed 's/-/_/g'`
-	case "$ac_option" in
-	*=*)	;;
-	*)	ac_optarg=yes;;
-	esac
-	eval "${ac_with}='$ac_optarg'"
-	;;
-    -quiet|--quiet)		QUIET=yes;;
-    -verbose|--verbose)		QUIET=no;;
-    -noninteractive|--noninteractive) NONINTERACTIVE=yes;;
-    -site|--site)		ac_prev=SITE;;
-    -site=*|--site=*)		SITE="$ac_optarg";;
-    -srcdir|--srcdir)		ac_prev=SRCDIR;;
-    -srcdir=*|--srcdir=*)	SRCDIR="$ac_optarg";;
-    --exec-prefix)		ac_prev=EPREFIX;;
-    --exec-prefix=*)		EPREFIX="$ac_optarg" ;;
-    --prefix)			ac_prev=PREFIX;;
-    --prefix=*)			PREFIX="$ac_optarg";
-                                EPREFIX=${PREFIX} ;;
-    -target|--target)		ac_prev=TARGET;;
-    -target=*|--target=*)	TARGET="$ac_optarg" ;;
-    -version|--version)
-	echo "This is TIFF configure $Revision: 1.1.1.1 $"
-	exit 0
-	;;
-    -help|--help)		usage; exit 0;;
-    -*)
-	bitch "configure: $ac_option: invalid option; use -help for usage."
-	kill -1 $$
-	;;
-    *)
-	if [ x"$TARGET" != x ]; then
-	    bitch "configure: Can only configure for one target at a time."
-	    kill -1 $$
-	fi
-	TARGET="$ac_option"
-	;;
-    esac
-done
-
-DIR_BIN=${EPREFIX}/bin		# destination for applications
-DIR_LIB=${EPREFIX}/lib		# destination for library
-DIR_INC=${PREFIX}/include		# destination for include files
-DIR_HTML=${PREFIX}/doc/libtiff		# destination for HTML files
-
-if [ -n "$ac_prev" ]; then
-    bitch "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`"
-    kill -1 $$
-fi
-
-#
-# Locate source directory by looking for the VERSION file.
-# The directory must either be specified through the
-# environment or be located in the current directory or a
-# parent of the current directory.
-#
-test "$SRCDIR" || {
-    configure=$0
-    # NB: don't use dirname since it may not exist
-    SRCDIR=`echo $configure | sed 's;/[^/][^/]*$;;'`
-    if [ @"$SRCDIR" = @"$configure" ]; then
-        SRCDIR=.
-    fi
-    while [ ! -r $SRCDIR/VERSION ]; do
-	# strip last directory from pathname
-	newdir=`echo $SRCDIR | sed 's;/[^/]*$;;'`
-	if [ -z "$newdir" ] || [ "$newdir" = $SRCDIR ]; then
-	    break;
-	fi
-	SRCDIR=$newdir
-    done
-}
-if [ ! -r $SRCDIR/VERSION ]; then
-    bitch "Cannot locate sources in $SRCDIR."
-    kill -1 $$
-fi
-SRCDIR=`echo "$SRCDIR" | sed 's;\([^/]\)/*$;\1;'`
-
-if [ -r ${SRCDIR}/tif_version.c ] ; then
-    SRCDIR_IS_LIBTIFF=yes
-    PORTDOTH=port.h
-else
-    SRCDIR_IS_LIBTIFF=no
-    PORTDOTH=libtiff/port.h
-fi
-
-#
-# Descriptor usage:
-# 1: ???
-# 2: errors that should be seen even if we're in the background.
-# 3: [stdout from test runs]
-# 4: verbose-style messages (Using ...)
-# 5: compiler stderr when running tests
-#
-if [ $QUIET = yes ]; then
-    exec 4>/dev/null			# chuck messages
-else
-    exec 4>&1				# messages got to stdout
-fi
-exec 5>./config.log			# compiler messages and the like
-
-capture()
-{
-    (eval "set -x; $*") >&5 2>&1
-    return
-}
-captureX()
-{
-    (eval "set -x; $*") 2>&5
-    return
-}
-
-date >&5
-echo Running "$0" with arguments: "$@" >&5
-
-cat 1>&5 <<'EOF'
-
-This file contains information that is captured from running the configure
-script.  Lines that begin with a "+" are command lines echoed by the
-shell.  Other lines are the output of commands; usually the contents of
-test case files or the output from compilers.  If configure does the
-wrong thing, you can use the information captured here to aid in debugging.
-
-EOF
-
-VERSIONFILE=$SRCDIR/VERSION
-RELEASE_DATE_FILE=$SRCDIR/RELEASE-DATE
-DATE=`date`
-
-eval `cat $VERSIONFILE |  sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\(.*\)/DIST_MAJOR=\1; DIST_MINOR=\2; DIST_POINT=\3/'`
-VERSION="v${DIST_MAJOR}.${DIST_MINOR}.${DIST_POINT}"
-
-RELEASE=`cat $VERSIONFILE |  sed -e 's/[0-9 \.]//g'`
-Note()
-{
-    echo "$@" 1>&4
-}
-
-Note ""
-if [ $SRCDIR_IS_LIBTIFF = yes ] ; then
-  Note "Configuring TIFF Software (library only) $VERSION"
-else
-  Note "Configuring TIFF Software $VERSION"
-fi
-
-Note ""
-Note "If configure does the wrong thing, check the file config.log for"
-Note "information that may help you understand what went wrong."
-Note ""
-
-#
-# Read site and local configuration parameters.
-#
-if [ -f $SITE/config.site ]; then
-    Note "Reading site-wide parameters from $SITE/config.site."
-    . $SITE/config.site
-    capture . $SITE/config.site
-elif [ -f $SRCDIR/config.site ]; then
-    Note "Reading site-wide parameters from $SRCDIR/config.site."
-    . $SRCDIR/config.site
-    capture . $SRCDIR/config.site
-fi
-if [ -f config.local ]; then
-    Note "Reading local parameters from config.local."
-    . ./config.local
-    capture . ./config.local
-elif [ -f $SRCDIR/config.local ]; then
-    Note "Reading local parameters from $SRCDIR/config.local."
-    . $SRCDIR/config.local
-    capture . $SRCDIR/config.local
-fi
-
-#
-# Emulate old-style settups...
-#
-test -z "${DIR_JPEG-}"  || {
-    DIRS_LIBINC="${DIRS_LIBINC} ${DIR_JPEG}"
-    DIR_JPEGLIB="${DIR_JPEG}"
-}
-test -z "${DIR_LIBGZ-}" || {
-    DIRS_LIBINC="${DIRS_LIBINC} ${DIR_LIBGZ}"
-    DIR_GZLIB="${DIR_LIBGZ}"
-}
-
-identifyTarget()
-{
-    random=`date | awk '{print $4}' | sed -e 's/.*://'` 2>/dev/null
-    case "$random" in
-    *0) Note "Wow, you've got a $1 system!";;
-    *1) Note "Hmm, looks like a $1 system.";;
-    *2) Note "Oh no, not another $1 system...";;
-    *3) Note "Well I'll be, a $1 system.";;
-    *4) Note "Fee, fie, foe, this smells like a $1 system.";;
-    *5)	Note "Gosh, aren't you lucky to have a $1 system!";;
-    *6)	Note "YOW!!  Did something bad happen or am I on a $1 system?";;
-    *7)	Note "Do they really still make $1 systems?!";;
-    *8)	Note "I'm always happy to encounter another $1 system.";;
-    *9)	Note "Here we are again, this time on a $1 system.";;
-esac
-}
-
-#
-# If no target is specified, try to deduce the system.
-# We use the GNU scripts for guessing and canonicalizing
-# the system identification, if available.
-#
-if [ -z "$TARGET" ]; then
-    test -f $SRCDIR/config.guess && TARGET=`sh $SRCDIR/config.guess` 2>/dev/null
-    if [ -z "$TARGET" ]; then
-	bitch "Sorry, no target specified on the command line and I don't seem"
-	bitch "to have the GNU config.guess script that is used to deduce your"
-	bitch "system type."
-	kill -1 $$
-    fi
-    identifyTarget $TARGET
-elif [ -f $SRCDIR/config.sub ]; then
-    TARGET=`sh $SRCDIR/config.sub "$TARGET"`
-else
-    Note "Warning, I don't seem to have the GNU config.sub script to canonicalize"
-    Note "your target specification; this may cause problems later on..."
-fi
-if [ -z "${FILLORDER-}" ]; then
-    #
-    # Host bit order within a word.
-    #
-    case $TARGET in
-    mips-dec-*)	FILLORDER=LSB2MSB;;
-    i[345]86-*)	FILLORDER=LSB2MSB;;
-    *)		FILLORDER=MSB2LSB;;
-    esac
-fi
-
-#
-# Find the full pathname of a file
-# using the specified test operation.
-#
-findThing()
-{
-    t="$1"; app="$2"; path="$3";
-    case "$app" in
-    /*) eval "$t" "$app" && { echo "$app"; return; };;
-    esac
-    (IFS=:
-    for i in $path; do
-	eval "$t" "$i/$app" && { echo "$i/$app"; return 0; }
-    done
-    return 1
-    )
-}
-
-#
-# Find the full pathname of a plain file.
-#
-findFile()
-{
-    findThing "test -f" "$1" "$2"
-}
-
-#
-# Find the full pathname of an executable.
-#
-findApp()
-{
-    findThing "test -x" $1 $2
-}
-
-#
-# Find the full pathname of an executable;
-# supply a default if nothing is found.
-#
-findAppDef()
-{
-    app=$1; path=$2; def=$3
-    case $app in
-    /*) test -x $app && { echo $app; return; };;
-    esac
-    IFS=:
-    for i in $path; do
-	test -x $i/$app && { echo $i/$app; return; }
-    done
-    echo $def
-}
-
-#
-# Find the full pathname of a header file; in search-path $DIRS_LIBINC
-#
-findHeader()
-{
-    case "$1" in
-    /*) echo "$1"; return ;;
-    esac
-    for i in ${DIRS_LIBINC} /usr/include; do
-	test -r $i/$1 && {
-	    case "$i" in
-	    /*) echo "$i/$1"; return ;;
-	    esac
-	    if [ $SRCDIR_IS_LIBTIFF = yes ]; then
-		echo "$i/$1";
-	    else
-		echo "../$i/$1";
-	    fi
-	    return;
-	}
-    done
-}
-
-#
-# Locate a C compiler that satisfies our needs (using assorted heuristics).
-#
-JUNK="
-    a.out
-    confsed
-    conftestmmap
-    confx confy
-    confMakefile
-    core
-    dummy
-    dummy.a
-    dummy.c
-    dummy.o
-    foo
-    so_locations
-    t.c
-    t.o
-    t
-    xMakedepend
-    xdefs
-    xgnu.c
-    xmakeinc
-    xport.h
-"
-trap "$RM \$JUNK; exit 1" 1 2 15
-
-$RM $JUNK
-
-cat>xgnu.c<<EOF
-#ifdef __GNUC__
-yes;
-#endif
-EOF
-
-#
-# Check if the specified compiler is from GNU 
-#
-isGNU()
-{
-    capture "cat xgnu.c; ($1 -E xgnu.c 2>&5 | egrep yes)"
-}
-
-#
-# NB: use ANSI C prototype to weed out non-ANSI compilers.
-#
-cat>dummy.c<<EOF
-main(int argc, char* argv) { exit(0); }
-EOF
-
-checkCompiler()
-{
-    compiler=$1
-    if isGNU $compiler; then
-	ISGCC=yes
-    else
-	ISGCC=no
-    fi
-    #
-    # Guess special options needed to get an
-    # ANSI C compiler and/or similar.  Must
-    # be combined with above checks so we only
-    # select an ANSI C compiler.
-    #
-    if [ -z "${ENVOPTS-}" ]; then
-	case $ISGCC-$TARGET in
-	no-*-irix*)	C_ANSI="-ansi";;
-	no-*-hp*)	C_ANSI="-D_HPUX_SOURCE";;
-	no-*-apollo-*)	C_ANSI="-A nansi";;
-	no-*-aix*)	C_ANSI="-Dunix -qlanglvl=ansi -qsrcmsg -qmaxmem=8192";;
-	*-sco*)		C_ANSI="-Dsco";;
-	esac
-    else
-	C_ANSI="$ENVOPTS"
-    fi
-    $RM dummy dummy.o
-    capture $compiler -o dummy ${C_ANSI} dummy.c && {
-	CC=$compiler;
-	test -z "${CCOMPILER-}" && CCOMPILER=`findApp $compiler $PATH`
-	test -z "${ENVOPTS-}"   && ENVOPTS="${C_ANSI-}"
-	return 0
-    }
-    return 1
-}
-
-CCtested=
-capture cat dummy.c
-if [ -z "${CC-}" ]; then
-    CCOMPILER=
-    for i in gcc cc ncc dcc xlc c89 gcc2; do
-	CCtested="$CCtested $i"
-	checkCompiler $i && break
-    done
-else
-    CCtested="$CCtested $CC"
-    checkCompiler $CC
-fi
-if [ -z "$CCOMPILER" ]; then
-    cat<<EOF
-
-Cannot locate a working ANSI C compiler.
-
-We attempted to compile the following test program:
-
-----------------------------------------------------------
-EOF
-    cat dummy.c
-    cat<<EOF
-----------------------------------------------------------
-
-with these compilers:
-
-    $CCtested
-
-but none of them were successful.
-
-If your compiler is in a non-standard location, you can specify its
-location in several ways:
-
-    o set the environment variable CC
-    o create a config.local or config.site file that includes a
-      definition for CC
-    o supply it on the command line using -with-CC=<pathname>
-
-If command line options are required for ANSI C compilation, set the
-ENVOPTS parameter to these options in a similar way (either through
-an environment variable or config.local/config.site) and then rerun
-this script.
-EOF
-    boom
-fi
-Note "Using $CCOMPILER for a C compiler (use -with-CC=compilername to override)."
-
-test "$ENVOPTS" && {
-    Note "Using $ENVOPTS to get the appropriate compilation environment."
-}
-
-if [ ${ISGCC} = yes ] ; then
-    GCCversion="`${CCOMPILER} -v 2>&1 | \
-	sed -n -e '/version/s/.* \([0-9]*\)\.\([0-9]*\).\([0-9]*\)/\1.\2.\3/p'`"
-fi
-
-
-CheckForGandO()
-{
-   f=$1
-   if test -s $f; then
-	capture grep -i \(error\|warning\) $f || return 1
-    fi
-    return 0
-}
-
-if [ -z "${GCOPTS-}" ]; then
-    if capture $CCOMPILER $ENVOPTS -g -c dummy.c; then
-	Note "Looks like $CCOMPILER supports the -g option."
-	# NB: cannot use captureX here 'cuz we lose stderr
-	if $CCOMPILER $ENVOPTS -c -g $OPTIMIZER dummy.c >t 2>&1 && CheckForGandO t; then
-	    GCOPTS="-g"
-	else
-	    Note "... but not together with the $OPTIMIZER option, not using it."
-	    GCOPTS=
-	fi
-    else
-	GCOPTS=
-    fi
-fi
-if [ ! -z "${GCOPTS}" ]; then
-    Note "Using \"$GCOPTS\" for C compiler options."
-fi
-
-#
-# Verify that $MAKE is accessible
-#
-PATHMAKE=`findApp ${MAKE} $PATH`
-if [ "$PATHMAKE" ]; then
-    Note "Using $PATHMAKE to configure the software."
-    (echo 'all:') | ${MAKE} -f - all >/dev/null 2>&5 || {
-	cat<<EOF
-
-Something is wrong with "$MAKE" or $MAKE does not accept Makefiles
-from stdin with "-f -".  If you have MAKE set in your environment,
-verify it points to the right program you want to" use to build this
-software.  Otherwise, verify that you have the make program installed
-somewhere on your system and set the MAKE environment variable to the
-pathname of the program.
-EOF
-	boom
-    }
-else
-    cat<<EOF
-No $MAKE located in the search path.
-
-There was no $MAKE program in the restricted search used by this script
-If $MAKE is in a non-standard location set the MAKE environment variable
-to the pathname of the appropriate program.
-EOF
-    boom
-fi
-
-# Find sh (likely /bin/sh or /usr/bin/sh), and put in SCRIPT_SH
-
-test -z "${SCRIPT_SH-}" && SCRIPT_SH=`findAppDef sh $PATH sh`
-
-#
-# Check whether or not $MAKE automatically sets MAKE
-# in the Makefiles.  If not, we add an explicit define
-# for places where recursive calls are made.
-#
-if [ -z "${SETMAKE-}" ]; then
-    if (sed "s;@SHELL@;$SCRIPT_SH;" <<'EOF'
-SHELL=@SHELL@
-all:
-	@if [ -n "${MAKE}" ] ; then echo "make sets make"  ; fi
-EOF
-) | $MAKE -f - | grep "make sets make" > /dev/null ; then
-	SETMAKE=
-    else
-	Note "Looks like $MAKE does not setup MAKE in Makefiles, will compensate."
-	SETMAKE="MAKE	= ${MAKE}"
-    fi
-fi
-
-test -z "${AR-}" && AR=`findApp ar $PATH`
-if [ -z "$AR" ]; then
-    Note "*** Warning, could not locate a suitable ar command; using a default."
-    AR=ar
-fi
-test -z "${AROPTS-}" && AROPTS=rc
-test -z "${RANLIB-}" && RANLIB=`findApp ranlib $PATH`
-if [ -z "$RANLIB" ]; then
-    Note "Warning, no ranlib, assuming it's not needed."
-    RANLIB=":"
-    $RM dummy.a
-    if $AR rcs dummy.a >/dev/null 2>&1; then
-       AROPTS=crs
-       Note "Looks like ar has an s option to build symbol tables."
-    fi
-fi
-
-#
-# runMake target rules ...
-#
-runMakeX()
-{
-    target="$1"; shift
-    $RM $target
-    (echo SRCDIR=.
-       for i in "$@"; do
-	  echo "$i";
-       done
-    )>confMakefile
-    captureX ${MAKE} -f confMakefile $target
-    return
-}
-runMake()
-{
-    runMakeX "$@" >&5
-    return
-}
-
-#
-# Look for a library using a known (unique) function.
-#
-CheckForLibrary()
-{
-    f=$1; shift
-    libs="$@";
-    cat>t.c<<EOF
-int t() { $f(); return 0; }
-int main(){ t(); return 0; }
-EOF
-    runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c $libs"
-}
-
-#
-# Look for an include file.
-#
-CheckForIncludeFile()
-{
-    (for i do
-	echo "#include \"$i\""
-     done)>t.c
-    runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c"
-}
-
-#
-# Figure out if certain system-specific interfaces are
-# supported.  We craft a port.h file that has external
-# declarations for missing routines that are required by
-# the system and modify defs to reflect which optional
-# interfaces are supported.
-#
-
-EmitCPlusPlusPrologue()
-{
-    echo '/*'
-    echo ' * Warning, this file was automatically created by the TIFF configure script'
-    echo ' * VERSION:	' $VERSION
-    echo ' * RELEASE:   ' $RELEASE
-    echo ' * DATE:	' $DATE
-    echo ' * TARGET:	' $TARGET
-    if [ $ISGCC = yes ]; then
-	echo ' * CCOMPILER:	' ${CCOMPILER}-${GCCversion}
-    else
-	echo ' * CCOMPILER:	' $CCOMPILER
-    fi
-    echo ' */'
-    echo "#ifndef $1"
-    echo "#define $1 1"
-    echo '#ifdef __cplusplus'
-    echo 'extern "C" {'
-    echo '#endif'
-}
-
-EmitCPlusPlusEpilogue()
-{
-    echo '#ifdef __cplusplus'
-    echo '}'
-    echo '#endif'
-    echo '#endif'
-}
-
-#
-# Look for a function in one of the standard libraries
-# or one of the machine-dependent libraries selected above.
-#
-CheckForFunc()
-{
-    echo "extern int $1(); main(){$1();exit(0);}" >t.c
-    runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}"
-}
-
-# 
-# Verify that we have -lm.  Darwin (for instance) does not.  Add to 
-# MACHDEPLIBS if required.
-#
-
-if [ -z "${MACHDEPLIBS-}" ]; then
-    MACHDEPLIBS=""
-    if CheckForFunc cos ; then
-        echo "Leaving MACHDEPLIBS empty, apparently you don't need -lm."
-    else
-        MACHDEPLIBS="-lm"
-        echo "Defaulting MACHDEPLIBS to -lm."
-    fi
-fi
-
-#
-# Look for a function declaration in system include files.
-#
-AddFuncDecl()
-{
-    echo "$2";
-    Note "... add function prototype for $1"
-}
-CheckForFuncDecl()
-{
-    f=$1; shift
-    (for i do
-	echo "#include \"$i\""
-     done)>t.c
-    capture cat t.c
-    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" |\
-     awk '{while($0~/[,(][ \t]*$/){printf"%s",$0;getline}print}' |\
-     grep "$f[ ]*(.*)" >&5
-    return
-}
-CheckFuncDecl()
-{
-    f=$1; shift
-    decl=$1; shift
-    CheckForFuncDecl "$f" "$@" || AddFuncDecl "$f" "$decl"
-}
-
-#
-# Look for a variable declaration in system include files.
-#
-CheckForVarDecl()
-{
-    v="$1"; shift
-    (for i do
-	echo "#include \"$i\""
-     done)>t.c
-    capture cat t.c
-    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep "$v" >&5
-    return
-}
-CheckVarDecl()
-{
-    v="$1"; shift
-    decl="$1"; shift
-    CheckForVarDecl "$v" "$@" || \
-	(echo "$decl"; Note "... add declaration $decl")
-}
-
-#
-# Look for a #define in system include files.
-#
-AddDefine()
-{
-   echo '#ifndef' $1
-   echo '#define' "$2"
-   echo '#endif'
-   Note '... add #define for' "$1"
-}
-CheckForDefine()
-{
-    def=$1; shift
-    (for i do
-	echo "#include \"$i\""
-     done
-     echo "#ifdef $def"
-     echo "FOUND();"
-     echo "#endif"
-    )>t.c
-    capture cat t.c
-    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep FOUND >&5
-}
-CheckDefine()
-{
-    def=$1; shift
-    decl=$1; shift
-    CheckForDefine "$def" "$@" || AddDefine "$def" "$decl"
-}
-
-CheckForMMAP()
-{
-    if CheckForFunc getpagesize; then
-	cat>t.c<<'EOF'
-/* this was lifted from GNU autoconf */
-/* Thanks to Mike Haertel and Jim Avera for this test. */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-EOF
-    else
-	cat>t.c<<'EOF'
-/* this was lifted from GNU autoconf */
-/* Thanks to Mike Haertel and Jim Avera for this test. */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#ifdef BSD
-# ifndef BSD4_1
-#  define HAVE_GETPAGESIZE
-# endif
-#endif
-
-#ifndef HAVE_GETPAGESIZE
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-#  define getpagesize() EXEC_PAGESIZE
-# else
-#  ifdef NBPG
-#   define getpagesize() NBPG * CLSIZE
-#   ifndef CLSIZE
-#    define CLSIZE 1
-#   endif
-#  else
-#   ifdef NBPC
-#    define getpagesize() NBPC
-#   else
-#    define getpagesize() PAGESIZE /* SVR4 */
-#   endif
-#  endif
-# endif
-#endif
-EOF
-    fi
-cat>>t.c<<'EOF'
-#if defined(__osf__) || defined(_AIX)
-# define valloc malloc
-#endif
-char *valloc(), *malloc();
-
-int
-main()
-{
-  char *buf1, *buf2, *buf3;
-  int i = getpagesize(), j;
-  int i2 = getpagesize()*2;
-  int fd;
-
-  buf1 = (char *)valloc(i2);
-  buf3 = (char *)malloc(i2);
-  for (j = 0; j < i2; ++j)
-    *(buf1 + j) = rand();
-  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
-  write(fd, buf1, i2);
-  buf2 = mmap(0, i, PROT_READ|PROT_WRITE, MAP_VARIABLE|MAP_PRIVATE, fd, 0);
-  for (j = 0; j < i; ++j)
-    if (*(buf1 + j) != *(buf2 + j))
-      exit(1);
-  lseek(fd, (long)i, 0);
-  read(fd, buf2, i); /* read into mapped memory -- file should not change */
-  /* (it does in i386 SVR4.0 - Jim Avera, jima at netcom.com) */
-  lseek(fd, (long)0, 0);
-  read(fd, buf3, i2);
-  for (j = 0; j < i2; ++j)
-    if (*(buf1 + j) != *(buf3 + j))
-      exit(1);
-  exit(0);
-}
-EOF
-    capture cat t.c
-    runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}" && ./a.out
-}
-
-CheckForBigEndian()
-{
-    cat>t.c<<EOF
-#include <endian.h>
-#ifdef __BYTE_ORDER
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-little;
-#elif __BYTE_ORDER == __BIG_ENDIAN
-big;
-#endif
-#endif
-EOF
-    capture cat t.c
-    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep little >&5 && \
-       return 1
-    runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep big >&5 && \
-       return 0
-    echo 'main() { int one = 1; char* cp = (char*)&one; exit(*cp!=0); }'>t.c
-    capture cat t.c
-    runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c" && ./a.out
-}
-
-#
-# Check an existing port.h to see if it was created
-# for the target and compiler we are using.
-#
-CheckPortDotH()
-{
-    getConfigTag()
-    {
-	param=`grep "$1:" $2 | sed -e 's/.*:[ 	]*\([^ 	]*\).*/\1/'`
-    }
-    getConfigTag TARGET $PORTDOTH; target="$param"
-    getConfigTag CCOMPILER $PORTDOTH; ccompiler="$param"
-    CCOMP=$CCOMPILER
-    if [ $ISGCC = yes ]; then
-	CCOMP="${CCOMP}-${GCCversion}"
-    fi
-    test "$target" = "$TARGET" && test "$ccompiler" = "$CCOMP"
-}
-
-#
-# Built port.h based on the system and compiler setup.
-#
-BuildPortDotH()
-{
-    Note ""
-    Note "Creating $PORTDOTH with necessary definitions."
-
-    (EmitCPlusPlusPrologue _PORT_
-
-    CheckForIncludeFile sys/types.h && echo '#include <sys/types.h>'
-    CheckVarDecl off_t 'typedef long off_t;' sys/types.h stdlib.h
-    CheckVarDecl size_t 'typedef unsigned size_t;' sys/types.h stdlib.h
-    CheckVarDecl u_char 'typedef unsigned char u_char;' sys/types.h
-    CheckVarDecl u_short 'typedef unsigned short u_short;' sys/types.h
-    CheckVarDecl u_int 'typedef unsigned int u_int;' sys/types.h
-    CheckVarDecl u_long 'typedef unsigned long u_long;' sys/types.h
-
-    echo "#define HOST_FILLORDER FILLORDER_${FILLORDER}"
-    CPU=`echo $TARGET | sed 's/-.*//'`
-    Note "... using $FILLORDER bit order for your $CPU cpu"
-    if CheckForBigEndian; then
-	echo "#define HOST_BIGENDIAN	1"
-	Note "... using big-endian byte order for your $CPU cpu"
-    else
-	echo "#define HOST_BIGENDIAN	0"
-	Note "... using little-endian byte order for your $CPU cpu"
-    fi
-
-    CheckForMMAP && {
-	echo '#define HAVE_MMAP 1'
-	Note "... configure use of mmap for memory-mapped files"
-	CheckFuncDecl mmap \
-	    'extern void* mmap(void*, size_t, int, int, int, off_t);' sys/mman.h
-    }
-
-    CheckForIncludeFile stdio.h		&& echo '#include <stdio.h>'
-    CheckForIncludeFile unistd.h	&& echo '#include <unistd.h>'
-    CheckForIncludeFile string.h	&& echo '#include <string.h>'
-    CheckForIncludeFile stdlib.h	&& echo '#include <stdlib.h>'
-    if CheckForDefine O_RDONLY fcntl.h; then
-	echo '#include <fcntl.h>'
-	Note "... O_RDONLY is in <fcntl.h>"
-    elif CheckForDefine O_RDONLY sys/file.h; then
-	echo '#include <sys/file.h>'
-	Note "... O_RDONLY is in <sys/file.h>"
-    else
-	AddDefine O_RDONLY "O_RDONLY	0"
-	AddDefine O_WRONLY "O_WRONLY	1"
-	AddDefine O_RDWR   "O_RDWR	2"
-    fi
-
-    echo 'typedef double dblparam_t;'
-	Note "... using double for promoted floating point parameters"
-
-    if [ -z "${INLINE-}" ]; then
-	if [ $ISGCC = yes ]; then
-	    echo '#ifdef __STRICT_ANSI__'
-	    echo '#define	INLINE	__inline__'
-	    echo '#else'
-	    echo '#define	INLINE	inline'
-	    echo '#endif'
-	    Note "... enabling use of inline functions"
-	else
-	    echo '#define	INLINE'
-	    Note "... disabling use of inline functions"
-	fi
-    else
-	echo "#define INLINE $INLINE"
-	Note "... using \"$INLINE\" to control inline function usage"
-    fi
-
-    echo '#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME'
-
-    CheckFuncDecl memset 'extern void* memset(void*, int, size_t);' string.h
-    CheckFuncDecl floor 'extern double floor(double);' math.h
-    CheckFuncDecl ceil 'extern double ceil(double);' math.h
-    CheckFuncDecl exp 'extern double exp(double);' math.h
-    CheckFuncDecl pow 'extern double pow(double, double);' math.h
-    CheckFuncDecl read 'extern int read(int, const void*, unsigned int);' unistd.h
-    CheckFuncDecl malloc 'extern void* malloc(size_t);' stdlib.h
-    CheckFuncDecl realloc 'extern void* realloc(void*, size_t);' stdlib.h
-    CheckFuncDecl free 'extern void free(void*);' stdlib.h
-    EmitCPlusPlusEpilogue
-    )>xport.h
-    if [ $SRCDIR_IS_LIBTIFF = no -a ! -d libtiff ]; then
-	Note "Creating libtiff directory"
-	mkdir libtiff
-    fi
-    mv xport.h $PORTDOTH; chmod 444 $PORTDOTH
-    Note "Done creating $PORTDOTH."
-}
-
-if [ "$PORT" != no ] && test -f $PORTDOTH && CheckPortDotH; then
-    Note ""
-    Note "Using previously created $PORTDOTH."
-else
-    $RM xport.h t.c a.out $PORTDOTH
-    BuildPortDotH
-fi
-
-if [ "$PORT" = auto ]; then
-    Note ""
-    Note "Checking system libraries for functionality to emulate."
-
-    FUNCS="
-        strcasecmp
-        strtoul
-        getopt
-    "
-
-    for i in $FUNCS; do
-        CheckForFunc $i || {
-            Note "... emulate $i"
-            PORTFUNCS="${PORTFUNCS-} $i.c"
-        }
-    done
-    if [ "${PORTFUNCS-}" ]; then
-        LIBPORT='../port/libport.a'
-        PORT=yes
-    else
-        PORT=no
-    fi
-fi
-if [ $PORT != yes ] ; then
-   LIBPORT=
-   PORTFUNCS=
-fi
-Note "Done checking system libraries."
-
-Note ""
-Note "Checking for Dynamic Shared Object (DSO) support."
-if [ "$DSO" = auto ]; then
-    DSO=no
-    DSOSUF_VERSION=
-    DSOLD='${LD}'
-    TIFFLIBREF=
-    case $TARGET-$CC-$ISGCC in
-    *-irix5.2*)
-	if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then
-	    DSOSUF=so
-	    DSOOPTS='-elf -shared -no_unresolved -all'
-	    DSO=IRIX52
-	    TIFFLIBREF='-L${DEPTH}/libtiff -rpath '${DIR_LIB}' -ltiff'
-	fi
-	;;
-    *-irix*)
-	if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then
-	    DSOSUF=so
-	    DSOLD="${CCOMPILER} ${ENVOPTS}"
-            if [ $ISGCC = yes ]; then
-               LIBCOPTS="-fpic"
-               DSOOPTS='-shared -rdata_shared'
-            else
-               LIBCOPTS="-KPIC"
-               DSOOPTS='-shared -rdata_shared -check_registry ${SRCDIR}/port/irix/so_locations -quickstart_info'
-            fi
-	    DSO=IRIX
-	    TIFFLIBREF='-L${DEPTH}/libtiff -rpath '${DIR_LIB}' -ltiff'
-	fi
-	;;
-    *-aix*)
-	DSOSUF=a
-	DSOOPTS='-r'
-	LIBCOPTS="-bM\:SRE"
-	DSO=AIX
-	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'
-	;;
-    *-hpux*yes)
-        DSOSUF=sl
-        DSOLD=gcc
-        DSOOPTS='-fpic -shared'
-        LIBCOPTS=-fpic
-        DSO=HPUX
-	TIFFLIBREF="-Wl,+s,+b${DIR_LIB}"' -L${DEPTH}/libtiff -ltiff'
-        ;;		 
-    *-hpux*)
-	DSOSUF=sl
-	DSOSUF_VERSION=${DIST_MAJOR}.${DIST_MINOR}${DIST_POINT}
-	DSOOPTS='-b'
-	LIBCOPTS="+z"
-	DSO=HPUX
-	TIFFLIBREF='-L$(DEPTH)/libtiff -ltiff'
-	;;
-    *-solaris*)
-	DSOSUF=so
-	DSOOPTS='-G'
-	if [ $ISGCC = yes ]; then
-	    LIBCOPTS="-fpic"
-	else
-	    LIBCOPTS="-K PIC"
-	fi
-	DSO=SOLARIS
-	TIFFLIBREF='-L${DEPTH}/libtiff -R'${DIR_LIB}' -ltiff'
-	;;
-    *-netbsd*)
-	DSOSUF=so.${DIST_MAJOR}.0
-	LIBCOPTS='-fPIC'
-	DSO=NETBSD
-	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'
-	;;
-    *-freebsd*)
-	DSOSUF=so.${DIST_MAJOR}
-	DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}
-	LIBCOPTS='-fPIC'
-	DSOOPTS='-shared'
-	DSO=GNULD
-	;;
-    *-openbsd*)
-	DSOSUF=so.${DIST_MAJOR}.${DIST_MINOR}
-	LIBCOPTS='-fpic'
-	DSOSUF=so.${DIST_MAJOR}${DIST_MINOR}.${DIST_POINT}
-	if [ "`uname -m`" = "sparc64" ]; then
-	  LIBCOPTS='-fPIC'
-	else
-	  LIBCOPTS='-fpic'
-	fi
-	TIFFLIBREF='-L${DEPTH}/libtiff -ltiff'
-	case "$TARGET" in
-	   *-openbsd[01].* | *-openbsd2.[0-7] | *-openbsd2.[0-7].*)
-	      DSO=oldOPENBSD
-	   ;;
-	   *)
-	      DSO=OPENBSD
-	      DSOLD="${CCOMPILER} ${ENVOPTS}"
-	      DSOOPTS='-shared ${LIBCOPTS}'
-	   ;;
-	esac
-	;;
-    *-darwin*)
-        DSOSUF=dylib
-        DSOSUF_VERSION=${DIST_MAJOR}.${DIST_MINOR}.${DIST_POINT}.dylib
-        LIBCOPTS='-fno-common'
-        DSOLD="${CCOMPILER} ${ENVOPTS}"
-        DSOOPTS='-dynamiclib -undefined error'
-        DSO=DARWIN
-        ;;
-    *-linux*)
-	DSOSUF=so.${DIST_MAJOR}
-	DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}
-	LIBCOPTS='-fPIC'
-	DSOOPTS='-shared'
-	DSO=GNULD
-	;;
-    *-osf3*|*-osf4*)
-	DSOSUF=so
-	DSOOPTS='-shared'
-	DSO=OSF
-	;;
-    *-sco3.2*)
-        DSOSUF=so.${DIST_MAJOR}
-        DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_POINT}
-        LIBCOPTS='-fPIC'
-        DSOOPTS='-shared'
-        DSO=OPENSERVER
-        ;;
-
-    esac
-fi
-if [ "$DSO" != no ]; then
-    JUNK="$JUNK t.${DSOSUF}"
-    #
-    # Check to make sure the compilers process
-    # the DSO options in the expected way.
-    #
-    CheckCCDSO()
-    {
-    $RM t.c t.o t.${DSOSUF}
-    cat>t.c<<EOF
-int f() { return 0; }
-EOF
-    capture cat t.c
-    runMake t \
-	"t.o:; ${CCOMPILER} ${ENVOPTS} ${LIBCOPTS} -c t.c" \
-	"t: t.o; ${DSOLD} ${DSOOPTS} -o t.${DSOSUF} t.o"
-    }
-    if CheckCCDSO; then
-	Note "Looks like your system supports $DSO-style DSOs."
-    else
-	cat 1>&4 <<EOF
-Looks like your system supports $DSO-style DSOs...
-... sigh, but $CCOMPILER does not support DSOs in the expected way.
-EOF
-	DSO=no
-    fi
-fi
-if [ "$DSO" = no ]; then
-    DSOSUF=a DSOOPTS= LIBCOPTS= 
-    DSOSUF_VERSION=$DSOSUF
-fi
-test -z "$TIFFLIBREF" && TIFFLIBREF="\${DEPTH}/libtiff/libtiff.${DSOSUF}"
-test -z "$DSOSUF_VERSION" && DSOSUF_VERSION=${DSOSUF}
-Note "Done checking for DSO support."
-
-Note ""
-if [ "$LIBIMAGE" = auto ]; then
-    if CheckForLibrary iopen -limage && CheckForIncludeFile gl/image.h; then
-	Note "Looks like there is support for SGI RGB images."
-	LIBIMAGE=yes
-    else
-	LIBIMAGE=no
-    fi
-fi
-if [ "$LIBGL" = auto ]; then
-    if CheckForLibrary winopen -lgl && CheckForIncludeFile gl.h; then
-	Note "Looks like there is support for IRIS GL."
-	LIBGL=yes
-    else
-	LIBGL=no
-    fi
-fi
-
-test $LIBGL = no -a $LIBIMAGE = no || Note ""
-Note "Selecting programs used during installation."
-
-
-#
-# Miscellaneous ``little'' programs.
-#
-test -z "${CHMOD-}"	&& CHMOD=`findAppDef chmod $PATH chmod`
-test -z "${LN-}"	&& LN=`findAppDef ln $PATH ln`
-test -z "${SED-}"	&& SED=`findAppDef sed $PATH sed`
-test -z "${STRIP-}"	&& STRIP=`findAppDef strip $PATH strip`
-
-#
-# Check if mv -f is supported
-#
-if [ -z "${MV_F-}" ]; then
-    $RM t.c; echo "">t.c
-    if mv -f t.c t.o; then
-	Note "Looks like mv supports the -f option to force a move."
-	MV_F=-f
-    else
-	Note "Warning, looks like mv has no -f option to force move operations;"
-	Note "... this may cause problems during installation."
-	MV_F=
-    fi
-fi
-
-#
-# Check if ln -s creates a symbolic link.
-#
-if [ -z "${LN_S-}" ]; then
-    $RM t.c; $LN -s foo t.c && LN_S=-s
-fi
-if [ -n "$LN_S" ]; then
-    Note "Looks like $LN supports the -s option to create a symbolic link."
-else
-    Note "Warning, looks like $LN has no -s option to create symbolic links;"
-    Note "... this may cause problems during installation."
-fi
-
-#
-# Pick install mechanism.
-#
-if [ -z "${INSTALL-}" ]; then
-    case $TARGET in
-    *-irix*)	INSTALL=`findApp install /sbin:$PATH`;;
-    *)		INSTALL='${SCRIPT_SH} ../port/install.sh';;
-    esac
-fi
-
-Note "Done selecting programs."
-
-#
-# User-changable configuration parameters section.
-# Anything selected here is presented to the user
-# and may be interactively changed.
-#
-
-Note ""
-Note "Selecting default TIFF configuration parameters."
-Note ""
-
-#
-# Fill in any other configuration parameters not
-# setup in the site and local files.
-#
-
-bitchExecutable()
-{
-    echo ""
-    echo "Warning, $1 does not seem to be an executable program;"
-    echo "you'll need to correct this before starting up the fax server."
-    echo ""
-}
-
-#
-# Setup manual page-related stuff.
-#
-# Manual pages are processed according to:
-# 1. Section organization (BSD or System V)
-# 2. Pre-formatted (w/ nroff) or source.
-# 3. Compressed (compress, gzip, pack) or uncompressed.
-# 4. Whether or not the FlexFAX ``F'' suffix must be
-#    stripped for pages to be found (only for 4F pages).
-#
-if [ -z "${DIR_MAN-}" ]; then
-    MANPATH="
-	$MANPATH
-	/usr/local/man
-	/usr/contrib/man
-	/usr/catman/local
-    "
-    DIR_MAN=
-    for i in $MANPATH; do
-	test -d $i && { DIR_MAN=$i; break; }
-    done
-    test -z "$DIR_MAN" && DIR_MAN=${PREFIX}/man
-fi
-Note "Looks like manual pages go in $DIR_MAN."
-if [ -z "${MANSCHEME-}" ]; then
-    case $TARGET in
-    *-bsdi*|*-netbsd*)		MANSCHEME=bsd-nroff-gzip-0.gz;;
-    *-freebsd*)			MANSCHEME=bsd-source-cat;;
-    *-linux*)			MANSCHEME=bsd-source-cat;;
-    *-ultrix*)			MANSCHEME=bsd-source-cat;;
-    *-sunos*)			MANSCHEME=bsd-source-cat-strip;;
-    *-sysv[234]*)		MANSCHEME=sysv-source-cat-strip;;
-    *-hpux*)			MANSCHEME=sysv-source-cat;;
-    *-solaris*)			MANSCHEME=sysv-source-cat-strip;;
-    *-aix*)			MANSCHEME=sysv-source-strip;;
-    *-isc*|*-sco*)		MANSCHEME=sysv-source-cat;;
-    *-irix*)			MANSCHEME=sysv-nroff-compress-Z;;
-    *)
-	#
-	# Try to deduce the setup from existing manual pages.
-	# XXX needs more work XXX
-	#
-	MANSCHEME=sysv-source-cat
-	if [ -d /usr/share/man ]; then
-	    if [ -d /usr/share/man/u_man ]; then
-	       MANSCHEME=sysv-source-cat
-	    elif [ -d /usr/share/man/man8 ]; then
-	       MANSCHEME=bsd-source-cat
-	    fi
-	elif [ -d /usr/share/catman ]; then
-	    if [ -d /usr/share/catman/u_man ]; then
-	       MANSCHEME=sysv-nroff-cat
-	    elif [ -d /usr/share/catman/man8 ]; then
-	       MANSCHEME=bsd-nroff-cat
-	    fi
-	fi
-	;;
-    esac
-fi
-Note "Looks like manual pages should be installed with $MANSCHEME."
-
-#
-# Figure out which brand of echo we have and define
-# prompt and print shell functions accordingly.
-#
-if [ `echo foo\\\c`@ = "foo@" ]; then
-    prompt()
-    {
-	echo "$* \\c"
-    }
-elif [ "`echo -n foo`@" = "foo@" ]; then
-    prompt()
-    {
-	echo -n "$* "
-    }
-else
-    prompt()
-    {
-	echo "$*"
-    }
-fi
-
-#
-# Prompt the user for a string that can not be null.
-#
-promptForNonNullStringParameter()
-{
-    x="" val="$1" desc="$2"
-    while [ -z "$x" ]; do
-	prompt "$desc [$val]?"; read x
-	if [ "$x" ]; then
-	    # strip leading and trailing white space
-	    x=`echo "$x" | sed -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
-	else
-	    x="$val"
-	fi
-    done
-    param="$x"
-}
-
-promptForManPageScheme()
-{
-    x=""
-    while [ -z "$x" ]; do
-	prompt "Manual page installation scheme [$MANSCHEME]?"; read x
-	if [ "$x" ]; then
-	    # strip leading and trailing white space
-	    x=`echo "$x" | sed -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
-	    # XXX do a better job of validating...
-	    case "$x" in
-	    bsd-nroff-cat*|sysv-nroff-cat*)	;;
-	    bsd-nroff-gzip*|sysv-nroff-gzip*)	;;
-	    bsd-nroff-comp*|sysv-nroff-comp*)	;;
-	    bsd-nroff-pack*|sysv-nroff-pack*)	;;
-	    bsd-source-cat*|sysv-source-cat*)	;;
-	    bsd-source-gzip*|sysv-source-gzip*)	;;
-	    bsd-source-comp*|sysv-source-comp*)	;;
-	    bsd-source-pack*|sysv-source-pack*)	;;
-	    *)
-cat <<EOF
-
-"$x" is not a valid manual page installation scheme.  Schemes are
-constructed according to:
-
-    <organization>-<formatting>-<compression>[-<suffix>]
-
-where:
-
-<organization>  is either "bsd" for BSD-style section organization (e.g.
-		file formats in section 5) or "sysv" for System V-style
-		organization (e.g. file formats in section 4).
-
-<formatting>    is either "nroff" to force installation of formatted
-                materials (using nroff) or "source" to get the nroff
-		source installed.
-
-<compression>   is either the name of a program to compress the manual
-                pages (gipz, compress, pack) or "cat" for uncompressed data.
-
-<suffix>        is either the file suffix to convert installed pages to
-                (e.g. 0.gz for gzip-compressed pages under BSD) or "strip"
-		to force the normal ".4f" suffix to be converted to ".4"
-		(or ".5" if using the BSD organization).  If no -<suffix>
-		is specified then filenames are not converted when they
-		are installed.
-
-Common schemes are:
-
-bsd-nroff-gzip-0.gz	compressed formatted pages for BSD 
-bsd-source-cat		nroff source w/ BSD organization
-sysv-source-cat-strip	nroff source for SysV w/o .4f suffix
-sysv-source-cat		nroff source for SysV as-is
-
-EOF
-		x="";;
-	    esac
-	else
-	    x="$MANSCHEME"
-	fi
-    done
-    MANSCHEME="$x"
-}
-
-printConfig()
-{
-    cat<<EOF
-
-TIFF configuration parameters are:
-
-[ 1] Directory for tools:        	$DIR_BIN
-[ 2] Directory for libraries:           $DIR_LIB
-[ 3] Directory for include files:       $DIR_INC
-[ 4] Directory for manual pages:        $DIR_MAN
-[ 5] Directory for HTML documents:      $DIR_HTML
-[ 6] Manual page installation scheme:   $MANSCHEME
-
-EOF
-}
-
-promptForParameter()
-{
-    case $1 in
-    1)	promptForNonNullStringParameter "$DIR_BIN" \
-	    "Directory to install tools";		DIR_BIN="$param"
-	;;
-    2)	promptForNonNullStringParameter "$DIR_LIB" \
-	    "Directory to install libraries";		DIR_LIB="$param"
-	;;
-    3)	promptForNonNullStringParameter "$DIR_INC" \
-	    "Directory to install include files";	DIR_INC="$param"
-	;;
-    4)	promptForNonNullStringParameter "$DIR_MAN" \
-	    "Directory to install manual pages";	DIR_MAN="$param"
-	;;
-    5)	promptForNonNullStringParameter "$DIR_HTML" \
-	    "Directory to install HTML documents";	DIR_HTML="$param"
-	;;
-    6)	promptForManPageScheme;;
-    esac
-}
-
-checkJPEG()
-{
-    if [ "${JPEG}" = yes ]; then
-	test "`findHeader jpeglib.h`" || {
-	    cat<<EOF
-
-The set of libtiff include directories,
-
-    DIRS_LIBINC=${DIRS_LIBINC}
-
-does not seem to be setup correctly; "jpeglib.h" was not found.
-This must be corrected if the JPEG support is to be enabled.
-Either fix the pathname or disable the JPEG support.
-
-EOF
-	}
-        test $SRCDIR_IS_LIBTIFF = yes || \
-	  test -d "${DIR_JPEGLIB:-/dev/null/no-such-file}" || {
-	    cat<<EOF
-
-The JPEG library directory, "${DIR_JPEGLIB}", does not seem to exist.
-This must be corrected if the JPEG support is to be enabled.
-Either fix the pathname or disable the JPEG support.
-
-EOF
-        }
-    fi
-}
-
-checkZIP()
-{
-    if [ "${ZIP}" = yes ]; then
-	test "`findHeader zlib.h`" || {
-            cat<<EOF
-
-The set of libtiff include directories,
-
-    DIRS_LIBINC=${DIRS_LIBINC}
-
-does not seem to be setup correctly; "zlib.h" was not found.
-This must be corrected if the (G)ZIP support is to be enabled.
-Either fix the pathname or disable the (G)ZIP support.
-
-EOF
-        }
-        test $SRCDIR_IS_LIBTIFF = yes \
-          || test -d "${DIR_GZLIB:-/dev/null/no-such-file}" || {
-	    cat<<EOF
-
-The libgz library directory, "${DIR_GZLIB}", does not seem to exist.
-This must be corrected if the ZIP support is to be enabled.
-Either fix the pathname or disable the ZIP support.
-
-EOF
-        }
-    fi
-}
-
-if [ $NONINTERACTIVE = no ] ; then
-    ok=skip
-    while [ "$ok" != y ] && [ "$ok" != yes ]; do
-	if [ "$ok" != skip ]; then
-	    for i in 1 2 3 4 5 6; do
-		promptForParameter $i;
-	    done
-	fi
-	printConfig; prompt "Are these ok [yes]?"; read ok
-	test -z "$ok" && ok=yes
-	case "$ok" in
-	[1-9]|1[0-7])	promptForParameter $ok;;
-	[yY]*|[nN]*)	continue;;
-	?*)
-	    echo ""
-	    echo "\"y\", \"yes\", or <RETURN> accepts the displayed parameters."
-	    echo "A number lets you change the numbered parameter."
-	    echo ""
-	    ;;
-	esac
-	ok=skip
-    done
-    checkJPEG
-    checkZIP
-else
-    checkJPEG
-    checkZIP
-fi
-
-case $MANSCHEME in
-*-source-*)	MANAPPS=man1 MANLIB=man3;;
-*-nroff-*)	MANAPPS=cat1 MANLIB=cat3;;
-esac
-case $MANSCHEME in
-*-strip)	MANSEDLOCAL="-e s/3T/3/g";;
-*)		MANSEDLOCAL="";;
-esac
-case $MANSCHEME in
-*-source-*)	MANCVT='${MANSED} $? >$@';;
-*-nroff-gzip-*)	MANCVT='${MANSED} $? | nroff -man | gzip > $@';;
-*-nroff-pack-*)	MANCVT='${MANSED} $? | nroff -man | pack > $@';;
-*-nroff-com*-*)	MANCVT='${MANSED} $? | nroff -man | compress > $@';;
-*-nroff-cat-*)	MANCVT='${MANSED} $? | nroff -man > $@';;
-esac
-case $MANSCHEME in
-*-0|*-0.gz|*-0.Z|*-gz|*-Z|*-z)
-    suf=`echo $MANSCHEME | sed 's/.*-/./'`
-    A='`echo $$i | sed' B='`'		# workaround shell bugs
-    MANAPPNAME="$A s/\\\\.1\$\$/$suf/$B"
-    MANLIBNAME="$A s/\\\\.3t\$\$/$suf/$B"
-    ;;
-*-strip)
-    MANAPPNAME='$$i'
-    MANLIBNAME='`echo $$i | sed s/\\.3t$$/.3/`'
-    ;;
-*)
-    MANAPPNAME='$$i' MANLIBNAME='$$i'
-    ;;
-esac
-
-if [ "${JPEG}" = yes ]; then
-    test -z "${CONF_JPEG-}"	&& CONF_JPEG="-DJPEG_SUPPORT"
-    if test -z "${LIBJPEG-}" ; then
-      LIBJPEG="-ljpeg"
-      test -z "${DIR_JPEGLIB-}" || LIBJPEG="-L${DIR_JPEGLIB} ${LIBJPEG}"
-    fi
-    if [ "${OJPEG}" = yes ]; then
-      CONF_JPEG="$CONF_JPEG -DOJPEG_SUPPORT"
-    fi
-else
-    CONF_JPEG=
-    LIBJPEG=
-fi
-if [ "${ZIP}" = yes ]; then
-    test -z "${CONF_ZIP-}"	&& CONF_ZIP="-DZIP_SUPPORT -DPIXARLOG_SUPPORT"
-    if test -z "${LIBGZ-}" ; then
-      LIBGZ="-lz"
-      test -z "${DIR_GZLIB-}" || LIBGZ="-L${DIR_GZLIB} ${LIBGZ}"
-    fi
-else
-    CONF_ZIP=
-    LIBGZ=
-fi
-
-if [ "${LARGEFILE}" = yes ]; then
-    LFSOPTS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DUSE_64BIT_API=1"
-else
-    LFSOPTS=
-fi
-
-Note ""
-
-#
-# Fixup a list of potentially relative pathnames so
-# that they work when used in a subdirectory.  The
-# string sent to stdout has no extraneous spaces so
-# it can be used, for example, in building pathnames.
-#
-# NB: There's an extra echo done here so we get a
-#     \n-terminated string passed to sed.
-#
-relativize()
-{
-    echo `if [ $SRCDIR_IS_LIBTIFF = no ]; then
-	(for i do
-	    case "$i" in
-	    /*|-l*)	echo "$i" ;;
-	    -[LR])	;;				# XXX???
-	    -[LR]/*)	echo "$i" ;;
-	    -L*)	echo "$i" | sed 's;^-L;-L../;' ;;
-	    -R*)	echo "$i" | sed 's;^-R;-R../;' ;;
-	    *)		echo "../$i" ;;
-	    esac
-	done) | tr '\012' ' '
-    else
-	echo "$@"
-    fi` | sed -e 's;[ ][ ]*$;;' -e 's;/[.]$;;'
-}
-#
-# Generate a list of compiler include options,
-# prepending ``../'' to any relative pathnames.
-#
-makeIncArgs()
-{
-    (for i do
-        case "$i" in
-	/*)  echo "-I$i" ;;
-	*)
-	    if [ $SRCDIR_IS_LIBTIFF = yes ]; then
-		echo "-I$i" 
-	    else
-		echo "-I../$i" 
-	    fi ;;
-        esac
-    done) | tr '\012' ' '
-}
-
-#
-# Setup parameters needed below.
-#
-if [ $SRCDIR_IS_LIBTIFF = yes ]; then
-    CONFIGDIR="."
-    LIBSRCDIR="${SRCDIR}"
-else
-    CONFIGDIR=".."
-    LIBSRCDIR=`relativize ${SRCDIR}`/libtiff
-fi
-
-# NB: these should be sorted alphabetically
-cat>>confsed<<EOF
-s;@AR@;${AR};g
-s;@AROPTS@;${AROPTS};g
-s;@CONFIGDIR@;${CONFIGDIR};g
-s;@CCOMPILER@;${CCOMPILER};g
-s;@CHMOD@;${CHMOD};g
-s;@CONF_JPEG@;${CONF_JPEG};g
-s;@CONF_ZIP@;${CONF_ZIP};g
-s;@COPT_LIBINC@;`makeIncArgs ${DIRS_LIBINC}`;g
-s;@DATE@;${DATE};g
-s;@DEPEND_JPEGLIB@;${CONF_JPEG:+`findHeader jpeglib.h` `findHeader jerror.h`};g
-s;@DEPEND_ZLIB@;${CONF_ZIP:+`findHeader zlib.h`};g
-s;@DIR_BIN@;${DIR_BIN};g
-s;@DIR_JPEGLIB@;`relativize ${DIR_JPEGLIB}`;g
-s;@DIR_GZLIB@;`relativize ${DIR_GZLIB}`;g
-s;@DIR_HTML@;${DIR_HTML};g
-s;@DIR_INC@;${DIR_INC};g
-s;@DIR_LIB@;${DIR_LIB};g
-s;@DIR_MAN@;${DIR_MAN};g
-s;@DIRS_LIBINC@;`relativize ${DIRS_LIBINC}`;g
-s;@DIST_POINT@;${DIST_POINT};g
-s;@DIST_MAJOR@;${DIST_MAJOR};g
-s;@DIST_MINOR@;${DIST_MINOR};g
-s;@DSO@;${DSO};g
-s;@DSOSUF@;${DSOSUF};g
-s;@DSOSUF_VERSION@;${DSOSUF_VERSION};g
-s;@ENVOPTS@;${ENVOPTS};g
-s;@FILLORDER@;${FILLORDER};g
-s;@GCOPTS@;${GCOPTS};g
-s;@HTML@;${HTML};g
-s;@INSTALL@;${INSTALL};g
-s;@LIBJPEG@;`relativize ${LIBJPEG}`;g
-s;@LIBGL@;${LIBGL};g
-s;@LIBGZ@;`relativize ${LIBGZ}`;g
-s;@LIBSRCDIR@;${LIBSRCDIR};g
-s;@LIBIMAGE@;${LIBIMAGE};g
-s;@LIBCOPTS@;${LIBCOPTS};g
-s;@LIBPORT@;${LIBPORT};g
-s;@LN@;${LN};g
-s;@LN_S@;${LN_S};g
-s;@LFSOPTS@;${LFSOPTS};g
-s;@MACHDEPLIBS@;${MACHDEPLIBS};g
-s;@MANAPPS@;${MANAPPS};g
-s;@MANAPPNAME@;${MANAPPNAME};g
-s;@MANLIBNAME@;${MANLIBNAME};g
-s;@MANCVT@;${MANCVT};g
-s;@MANSEDLOCAL@;${MANSEDLOCAL};g
-s;@MANLIB@;${MANLIB};g
-s;@MV_F@;${MV_F};g
-s;@OPTIMIZER@;${OPTIMIZER};g
-s;@PORT@;${PORT};g
-s;@PORTFUNCS@;${PORTFUNCS};g
-s;@RANLIB@;${RANLIB};g
-s;@SCRIPT_SH@;${SCRIPT_SH};g
-s;@SED@;${SED};g
-s;@SETMAKE@;${SETMAKE};g
-s;@SRCDIR@;${SRCDIR};g
-s;@RELSRCDIR@;`relativize ${SRCDIR}`;g
-s;@STRIP@;${STRIP};g
-s;@TARGET@;${TARGET};g
-s;@TIFFLIBREF@;${TIFFLIBREF};g
-s;@VERSION@;${VERSION};g
-s;@RELEASE@;${RELEASE};g
-s;@VERSIONFILE@;`relativize ${VERSIONFILE}`;g
-s;@RELEASE_DATE_FILE@;`relativize ${RELEASE_DATE_FILE}`;g
-s;@WARNING@;Warning, this file was automatically created by the TIFF configure script;g
-EOF
-
-SedConfigFiles()
-{
-    for F do
-	test -f $SRCDIR/$F.in || {
-	    bitch "$SRCDIR/$F.in is missing; this should be part of the distribution."
-	    boom
-	}
-	dir=`echo $F | $SED 's;/[^/]*$;;'`
-	if [ $dir != $F ] && [ ! -d $dir ]; then
-	    Note "Creating $dir directory"
-	    mkdir $dir
-	fi
-	suffix=`echo $F | $SED 's/.*\.//'`
-	if [ "$suffix" = h ]; then
-	    #
-	    # Compare old and new versions so that include files
-	    # are only updated when something has changed--this
-	    # saves time for subsequent makes.  Note we screen
-	    # out use of @DATE@ 'cuz otherwise that'll mess up
-	    # the comparison (this assumes dates are used in lines
-	    # of the form DATE: @DATE@).
-	    #
-	    $RM $F.new; $SED -f confsed $SRCDIR/$F.in > $F.new
-	    $RM confx; $SED '/DATE:/d' $F.new >confx
-	    $RM confy; $SED '/DATE:/d' $F >confy 2>/dev/null
-	    if cmp -s confx confy >/dev/null 2>&1; then
-		$RM $F.new
-	    else
-		Note "Creating $F from $SRCDIR/$F.in"
-		$RM $F; mv $F.new $F; $CHMOD 444 $F
-	    fi
-	else
-	    Note "Creating $F from $SRCDIR/$F.in"
-	    if $SED -f confsed $SRCDIR/$F.in >$F.new; then
-		$RM $F; mv $F.new $F; $CHMOD 444 $F
-	    else
-		cat 1>&2 <<EOF
-Help, there was a problem crafting $F from $F.in.
-The command:
-
-    $SED -f confsed $SRCDIR/$F.in >$F.new
-
-failed.  Aborting without cleaning up files so you can take a look...
-EOF
-		exit 1
-	    fi
-	fi
-    done
-}
-
-#
-# port/install.sh is the SGI install program emulator script.
-#
-CONF_FILES="Makefile"
-if [ $SRCDIR_IS_LIBTIFF != yes ] ; then
-    CONF_FILES="$CONF_FILES
-        libtiff/Makefile
-        man/Makefile
-        tools/Makefile
-        port/install.sh
-        "
-    test $HTML = yes &&		CONF_FILES="$CONF_FILES html/Makefile"
-    test $PORT = yes &&		CONF_FILES="$CONF_FILES port/Makefile"
-fi
-SedConfigFiles $CONF_FILES
-
-Note "Done."
-
-$RM $JUNK
-exit 0
diff --git a/tkimg1.3/libtiff/contrib/acorn/Makefile b/tkimg1.3/libtiff/contrib/acorn/Makefile
deleted file mode 100644
index 8f01477..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/Makefile
+++ /dev/null
@@ -1,165 +0,0 @@
-# Project:   LibTIFF
-
-
-# Toolflags:
-CCflags = -c -zo -ffah -depend !Depend -IC:
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@
-DrLinkflags = -nounused -aif -c++ -o $@
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags = 
-LibFileflags = -c -o $@
-Squeezeflags = -o $@
-
-
-# Final targets:
- at .o.LIBTIFF:   \
-        @.o.tif_acorn \
-        @.o.tif_aux \
-        @.o.tif_close \
-        @.o.tif_codec \
-	@.o.tif_compress \
-	@.o.tif_dir \
-	@.o.tif_dirinfo \
-	@.o.tif_dirread \
-	@.o.tif_dirwrite \
-	@.o.tif_dumpmode \
-	@.o.tif_error \
-	@.o.tif_fax3 \
-	@.o.tif_flush \
-	@.o.tif_getimage \
-	@.o.tif_jpeg \
-	@.o.tif_lzw \
-	@.o.tif_next \
-	@.o.tif_open \
-	@.o.tif_packbits \
-	@.o.tif_predict \
-	@.o.tif_print \
-	@.o.tif_read \
-	@.o.tif_strip \
-	@.o.tif_swab \
-	@.o.tif_thunder \
-	@.o.tif_tile \
-	@.o.tif_version \
-	@.o.tif_warning \
-	@.o.tif_write \
-	@.o.tif_zip \
-	@.o.tif_fax3sm \
-	@.h.version 
-	LibFile $(LibFileflags) \
-	@.o.tif_acorn \
-	@.o.tif_aux \
-	@.o.tif_close \
-	@.o.tif_codec \
-	@.o.tif_compress \
-	@.o.tif_dir \
-	@.o.tif_dirinfo \
-	@.o.tif_dirread \
-	@.o.tif_dirwrite \
-	@.o.tif_dumpmode \
-	@.o.tif_error \
-	@.o.tif_fax3 \
-	@.o.tif_flush \
-	@.o.tif_getimage \
-	@.o.tif_jpeg \
-	@.o.tif_lzw \
-	@.o.tif_next \
-	@.o.tif_open \
-	@.o.tif_packbits \
-	@.o.tif_predict \
-	@.o.tif_print \
-	@.o.tif_read \
-	@.o.tif_strip \
-	@.o.tif_swab \
-	@.o.tif_thunder \
-	@.o.tif_tile \
-	@.o.tif_version \
-	@.o.tif_warning \
-	@.o.tif_write \
-	@.o.tif_zip \
-	@.o.tif_fax3sm 
-
-
-# User-editable dependencies:
- at .mkversion:   @.o.mkversion C:o.Stubs 
-	Link $(linkflags) @.o.mkversion C:o.Stubs 
- at .h.version:   @.VERSION @.mkversion 
-	<Prefix$Dir>.mkversion -v @.VERSION -a @.tiff/alpha @.h.version 
- at .mkg3states:   @.o.mkg3states @.o.getopt C:o.Stubs 
-	link $(linkflags) @.o.mkg3states C:o.Stubs @.o.getopt 
- at .c.tif_fax3sm:   @.mkg3states 
-	<Prefix$Dir>.mkg3states -c const @.c.tif_fax3sm 
-
-# Static dependencies:
- at .o.tif_acorn:   @.c.tif_acorn
-	cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn 
- at .o.tif_aux:   @.c.tif_aux
-	cc $(ccflags) -o @.o.tif_aux @.c.tif_aux 
- at .o.tif_close:   @.c.tif_close
-	cc $(ccflags) -o @.o.tif_close @.c.tif_close 
- at .o.tif_codec:   @.c.tif_codec
-	cc $(ccflags) -o @.o.tif_codec @.c.tif_codec 
- at .o.tif_compress:   @.c.tif_compress
-	cc $(ccflags) -o @.o.tif_compress @.c.tif_compress 
- at .o.tif_dir:   @.c.tif_dir
-	cc $(ccflags) -o @.o.tif_dir @.c.tif_dir 
- at .o.tif_dirinfo:   @.c.tif_dirinfo
-	cc $(ccflags) -o @.o.tif_dirinfo @.c.tif_dirinfo 
- at .o.tif_dirread:   @.c.tif_dirread
-	cc $(ccflags) -o @.o.tif_dirread @.c.tif_dirread 
- at .o.tif_dirwrite:   @.c.tif_dirwrite
-	cc $(ccflags) -o @.o.tif_dirwrite @.c.tif_dirwrite 
- at .o.tif_dumpmode:   @.c.tif_dumpmode
-	cc $(ccflags) -o @.o.tif_dumpmode @.c.tif_dumpmode 
- at .o.tif_error:   @.c.tif_error
-	cc $(ccflags) -o @.o.tif_error @.c.tif_error 
- at .o.tif_fax3:   @.c.tif_fax3
-	cc $(ccflags) -o @.o.tif_fax3 @.c.tif_fax3 
- at .o.tif_flush:   @.c.tif_flush
-	cc $(ccflags) -o @.o.tif_flush @.c.tif_flush 
- at .o.tif_getimage:   @.c.tif_getimage
-	cc $(ccflags) -o @.o.tif_getimage @.c.tif_getimage 
- at .o.tif_jpeg:   @.c.tif_jpeg
-	cc $(ccflags) -o @.o.tif_jpeg @.c.tif_jpeg 
- at .o.tif_lzw:   @.c.tif_lzw
-	cc $(ccflags) -o @.o.tif_lzw @.c.tif_lzw 
- at .o.tif_next:   @.c.tif_next
-	cc $(ccflags) -o @.o.tif_next @.c.tif_next 
- at .o.tif_open:   @.c.tif_open
-	cc $(ccflags) -o @.o.tif_open @.c.tif_open 
- at .o.tif_packbits:   @.c.tif_packbits
-	cc $(ccflags) -o @.o.tif_packbits @.c.tif_packbits 
- at .o.tif_predict:   @.c.tif_predict
-	cc $(ccflags) -o @.o.tif_predict @.c.tif_predict 
- at .o.tif_print:   @.c.tif_print
-	cc $(ccflags) -o @.o.tif_print @.c.tif_print 
- at .o.tif_read:   @.c.tif_read
-	cc $(ccflags) -o @.o.tif_read @.c.tif_read 
- at .o.tif_strip:   @.c.tif_strip
-	cc $(ccflags) -o @.o.tif_strip @.c.tif_strip 
- at .o.tif_swab:   @.c.tif_swab
-	cc $(ccflags) -o @.o.tif_swab @.c.tif_swab 
- at .o.tif_thunder:   @.c.tif_thunder
-	cc $(ccflags) -o @.o.tif_thunder @.c.tif_thunder 
- at .o.tif_tile:   @.c.tif_tile
-	cc $(ccflags) -o @.o.tif_tile @.c.tif_tile 
- at .o.tif_version:   @.c.tif_version
-	cc $(ccflags) -o @.o.tif_version @.c.tif_version 
- at .o.tif_warning:   @.c.tif_warning
-	cc $(ccflags) -o @.o.tif_warning @.c.tif_warning 
- at .o.tif_write:   @.c.tif_write
-	cc $(ccflags) -o @.o.tif_write @.c.tif_write 
- at .o.tif_zip:   @.c.tif_zip
-	cc $(ccflags) -o @.o.tif_zip @.c.tif_zip 
- at .o.mkg3states:   @.c.mkg3states
-	cc $(ccflags) -o @.o.mkg3states @.c.mkg3states 
- at .o.getopt:   @.c.getopt
-	cc $(ccflags) -o @.o.getopt @.c.getopt 
- at .o.mkspans:   @.c.mkspans
-	cc $(ccflags) -o @.o.mkspans @.c.mkspans 
- at .o.tif_fax3sm:   @.c.tif_fax3sm
-	cc $(ccflags) -o @.o.tif_fax3sm @.c.tif_fax3sm 
- at .o.mkversion:   @.c.mkversion
-	cc $(ccflags) -o @.o.mkversion @.c.mkversion 
-
-# Dynamic dependencies:
diff --git a/tkimg1.3/libtiff/contrib/acorn/ReadMe b/tkimg1.3/libtiff/contrib/acorn/ReadMe
deleted file mode 100644
index dc16a79..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/ReadMe
+++ /dev/null
@@ -1,79 +0,0 @@
-Building the Software on an Acorn RISC OS system
-
-The directory contrib/acorn contains support for compiling the library under
-Acorn C/C++ under Acorn's RISC OS 3.10 or above. Subsequent pathnames will
-use the Acorn format: The full-stop or period character is a pathname
-delimeter, and the slash character is not interpreted; the reverse position
-from Unix. Thus "libtiff/tif_acorn.c" becomes "libtiff.tif_acorn/c".
-
-This support was contributed by Peter Greenham.
-(peterg at angmulti.demon.co.uk).
-
-Installing LibTIFF:
-
-LIBTIFF uses several files which have names longer than the normal RISC OS
-maximum of ten characters. This complicates matters. Maybe one day Acorn will
-address the problem and implement long filenames properly. Until then this
-gets messy, especially as I'm trying to do this with obeyfiles and not have
-to include binaries in this distribution.
-
-First of all, ensure you have Truncate configured on (type *Configure
-Truncate On) Although it is, of course, preferable to have long filenames,
-LIBTIFF can be installed with short filenames, and it will compile and link
-without problems. However, getting it there is more problematic.
-contrib.acorn.install is an installation obeyfile which will create a normal
-Acorn-style library from the source (ie: with c, h and o folders etc.), but
-needs the distribution library to have been unpacked into a location which is
-capable of supporting long filenames, even if only temporarily.
-
-My recommendation, until Acorn address this problem properly, is to use Jason
-Tribbeck's LongFilenames , or any other working system that gives you long
-filenames, like a nearby NFS server for instance.
-
-If you are using Longfilenames, even if only temporarily to install LIBTIFF,
-unpack the TAR into a RAMDisc which has been longfilenamed (ie: *addlongfs
-ram) and then install from there to the hard disk. Unfortunately
-Longfilenames seems a bit unhappy about copying a bunch of long-named files
-across the same filing system, but is happy going between systems. You'll
-need to create a ramdisk of about 2Mb.
-
-Now you can run the installation script I've supplied (in contrib.acorn),
-which will automate the process of installing LIBTIFF as an Acorn-style
-library. The syntax is as follows:
-
-install <source_dir> <dest_dir>
-
-Install will then create <dest_dir> and put the library in there. For
-example, having used LongFilenames on the RAMDisk and unpacked the library
-into there, you can then type:
-
-Obey RAM::RamDisc0.$.contrib.acorn.install RAM::RamDisc0.$ ADFS::4.$.LIBTIFF
-
-It doesn't matter if the destination location can cope with long filenames or
-not. The filenames will be truncated if necessary (*Configure Truncate On if
-you get errors) and all will be well.
-
-Compiling LibTIFF:
-
-Once the LibTIFF folder has been created and the files put inside, making the
-library should be just a matter of running 'SetVars' to set the appropriate
-system variables, then running 'Makefile'.
-
-OSLib
-
-OSLib is a comprehensive API for RISC OS machines, written by Jonathan
-Coxhead of Acorn Computers (although OSLib is not an official Acorn product).
-Using the OSLib SWI veneers produces code which is more compact and more
-efficient than code written using _kernel_swi or _swi. The Acorn port of
-LibTIFF can take advantage of this if present. Edit the Makefile and go to
-the Static dependencies section. The first entry is:
-
-# Static dependencies:
- at .o.tif_acorn:   @.c.tif_acorn
-        cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn  
-Change the cc line to:
-
-        cc $(ccflags) -DINCLUDE_OSLIB -o @.o.tif_acorn @.c.tif_acorn  
-
-Remember, however, that OSLib is only recommended for efficiency's sake. It
-is not required.
diff --git a/tkimg1.3/libtiff/contrib/acorn/SetVars b/tkimg1.3/libtiff/contrib/acorn/SetVars
deleted file mode 100755
index ea12d71..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/SetVars
+++ /dev/null
@@ -1,3 +0,0 @@
-Set LibTIFF$Dir <Obey$Dir>
-Set LibTIFF$Path <LibTIFF$Dir>.
-Set C$Path <C$Path>,LibTIFF:
diff --git a/tkimg1.3/libtiff/contrib/acorn/cleanlib b/tkimg1.3/libtiff/contrib/acorn/cleanlib
deleted file mode 100755
index 78a2d03..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/cleanlib
+++ /dev/null
@@ -1,5 +0,0 @@
-IfThere LibTIFF:o.* THEN Wipe LibTIFF:o.* ~CFR~V
-IfThere LibTIFF:c.tif_fax3sm THEN Delete LibTIFF:c.tif_fax3sm
-IfThere LibTIFF:mkg3states THEN Delete LibTIFF:mkg3states
-IfThere LibTIFF:h.version THEN Delete LibTIFF:h.version
-IfThere LibTIFF:mkversion THEN Delete LibTIFF:mkversion
diff --git a/tkimg1.3/libtiff/contrib/acorn/convert b/tkimg1.3/libtiff/contrib/acorn/convert
deleted file mode 100644
index 1f64ed2..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/convert
+++ /dev/null
@@ -1,175 +0,0 @@
-RISC OS Conversion log
-======================
-
-mkversion.c
-~~~~~~~~~~~
-The RISC OS command-line does not allow the direct creation of the version.h
-file in the proper manner. To remedy this in such a way that the version
-header is made at compiletime, I wrote this small program. It is fully
-portable, so should work quite happily for any other platform that might need
-it.
-
-msg3states.c
-~~~~~~~~~~~~
-Needed getopt.c from the port folder, then compiled and worked fine.
-
-
-tiff.h
-~~~~~~
-
-====1====
-
-The symbol _MIPS_SZLONG, if not defined, causes a compiler error. Fixed by
-ensuring it does exist. This looks to me like this wouldn't be an
-Acorn-specific problem. The new code fragment is as follows:
-
-#ifndef _MIPS_SZLONG
-#define _MIPS_SZLONG 32
-#endif
-#if defined(__alpha) || _MIPS_SZLONG == 64
-
-
-
-tiffcomp.h
-~~~~~~~~~~
-
-====1====
-
-#if !defined(__MWERKS__) && !defined(THINK_C)
-#include <sys/types.h>
-#endif
-
-Acorn also doesn't have this header so:
-
-#if !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acorn)
-#include <sys/types.h>
-#endif
-
-====2====
-
-#ifdef VMS
-#include <file.h>
-#include <unixio.h>
-#else
-#include <fcntl.h>
-#endif
-
-This seems to indicate that fcntl.h is included on all systems except
-VMS. Odd, because I've never heard of it before. Sure it's in the ANSI
-definition? Anyway, following change:
-
-#ifdef VMS
-#include <file.h>
-#include <unixio.h>
-#else
-#ifndef __acorn
-#include <fcntl.h>
-#endif
-#endif
-
-This will probably change when I find out what it wants from fcntl.h!
-
-====3====
-
-#if defined(__MWERKS__) || defined(THINK_C) || defined(applec)
-#include <stdlib.h>
-#define	BSDTYPES
-#endif
-
-Added RISC OS to above thus:
-
-#if defined(__MWERKS__) || defined(THINK_C) || defined(applec) || defined(__acorn)
-#include <stdlib.h>
-#define	BSDTYPES
-#endif
-
-====4====
-
-/*
- * The library uses the ANSI C/POSIX SEEK_*
- * definitions that should be defined in unistd.h
- * (except on VMS where they are in stdio.h and
- * there is no unistd.h).
- */
-#ifndef SEEK_SET
-#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__)
-#include <unistd.h>
-#endif
-
-RISC OS is like VMS and Mac in this regard. So changed to:
-
-/*
- * The library uses the ANSI C/POSIX SEEK_*
- * definitions that should be defined in unistd.h
- * (except on VMS or the Mac or RISC OS, where they are in stdio.h and
- * there is no unistd.h).
- */
-#ifndef SEEK_SET
-#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__) && !defined(__acorn)
-#include <unistd.h>
-#endif
-#endif
-
-====5====
-
-NB: HAVE_IEEEFP is defined in tiffconf.h, not tiffcomp.h as mentioned
-in libtiff.README. (Note written on original port from 3.4beta004)
-
-Acorn C/C++ claims to accord with IEEE 754, so no change (yet) to
-tiffconf.h.
-
-====6====
-
-Unsure about whether this compiler supports inline functions. Will
-leave it on for the time being and see if it works! (Likely if
-everything else does.)
-
-... Seems to be OK ...
-
-====7====
-
-Added to the end:
-
-/*
- * osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
- * on C alone. For that reason, the relevant functions have been
- * implemented by myself in tif_acorn.c, and the elements from the header
- * included here.
- */
-
-#ifdef __acorn
-#ifdef __cplusplus
-#include <osfcn.h>
-#else
-#include "kernel.h"
-#define	O_RDONLY	0
-#define	O_WRONLY	1
-#define	O_RDWR		2
-#define	O_APPEND	8
-#define	O_CREAT		0x200
-#define	O_TRUNC		0x400
-typedef long off_t;
-extern int open(const char *name, int flags, int mode);
-extern int close(int fd);
-extern int write(int fd, const char *buf, int nbytes);
-extern int read(int fd, char *buf, int nbytes);
-extern off_t lseek(int fd, off_t offset, int whence);
-#endif
-#endif
-
-
-===============================================================================
-
-tif_acorn.c
-~~~~~~~~~~~
-
-Created file tif_acorn.c, copied initially from tif_unix.c
-
-Documented internally where necessary.
-
-Note that I have implemented the low-level file-handling functions normally
-found in osfcn.h in here, and put the header info at the bottom of
-tiffcomp.h. This is further documented from a RISC OS perspective inside the
-file.
-
-===============================================================================
diff --git a/tkimg1.3/libtiff/contrib/acorn/install b/tkimg1.3/libtiff/contrib/acorn/install
deleted file mode 100755
index fa49d1b..0000000
--- a/tkimg1.3/libtiff/contrib/acorn/install
+++ /dev/null
@@ -1,128 +0,0 @@
-If "%0" = "" Then Error Syntax: install |<source_dir> |<dest_dir>
-If "%1" = "" Then Error Syntax: install |<source_dir> |<dest_dir>
-Set LibTiffInstall$Dir %0
-Set LibTiff$Dir %1
-Set Alias$CPY Copy <LibTiffInstall$Dir>.%%0 <LibTiff$Dir>.%%1 ~C~DF~NRV
-CDir <LibTiff$Dir>
-CDir <LibTiff$Dir>.c
-CDir <LibTiff$Dir>.h
-CDir <LibTiff$Dir>.o
-CPY COPYRIGHT			COPYRIGHT
-CPY README			README
-CPY VERSION			VERSION
-CPY dist.tiff/alpha             tiff/alpha
-CPY contrib.acorn.SetVars	SetVars
-CPY contrib.acorn.Makefile	Makefile
-CPY contrib.acorn.cleanlib      cleanlib
-CPY port.getopt/c		c.getopt
-CPY libtiff.mkg3states/c	c.mkg3states
-CPY libtiff.mkspans/c		c.mkspans
-CPY libtiff.mkversion/c		c.mkversion
-CPY libtiff.tif_acorn/c		c.tif_acorn
-CPY libtiff.tif_aux/c		c.tif_aux
-CPY libtiff.tif_close/c		c.tif_close
-CPY libtiff.tif_codec/c		c.tif_codec
-CPY libtiff.tif_compress/c	c.tif_compre
-CPY libtiff.tif_dir/c		c.tif_dir
-CPY libtiff.tif_dirinfo/c	c.tif_dirinf
-CPY libtiff.tif_dirread/c	c.tif_dirrea
-CPY libtiff.tif_dirwrite/c	c.tif_dirwri
-CPY libtiff.tif_dumpmode/c	c.tif_dumpmo
-CPY libtiff.tif_error/c		c.tif_error
-CPY libtiff.tif_fax3/c		c.tif_fax3
-CPY libtiff.tif_flush/c		c.tif_flush
-CPY libtiff.tif_getimage/c	c.tif_getima
-CPY libtiff.tif_jpeg/c		c.tif_jpeg
-CPY libtiff.tif_lzw/c		c.tif_lzw
-CPY libtiff.tif_next/c		c.tif_next
-CPY libtiff.tif_open/c		c.tif_open
-CPY libtiff.tif_packbits/c	c.tif_packbi
-CPY libtiff.tif_predict/c	c.tif_predic
-CPY libtiff.tif_print/c		c.tif_print
-CPY libtiff.tif_read/c		c.tif_read
-CPY libtiff.tif_strip/c		c.tif_strip
-CPY libtiff.tif_swab/c		c.tif_swab
-CPY libtiff.tif_thunder/c	c.tif_thunde
-CPY libtiff.tif_tile/c		c.tif_tile
-CPY libtiff.tif_version/c	c.tif_versio
-CPY libtiff.tif_warning/c	c.tif_warnin
-CPY libtiff.tif_write/c		c.tif_write
-CPY libtiff.tif_zip/c		c.tif_zip
-CPY libtiff.t4/h		h.t4
-CPY libtiff.tiff/h		h.tiff
-CPY libtiff.tiffcomp/h		h.tiffcomp
-CPY libtiff.tiffconf/h		h.tiffconf
-CPY libtiff.tiffio/h		h.tiffio
-CPY libtiff.tiffiop/h		h.tiffiop
-CPY libtiff.tif_dir/h		h.tif_dir
-CPY libtiff.tif_fax3/h		h.tif_fax3
-CPY libtiff.tif_predict/h	h.tif_predic
-SetType <LibTiff$Dir>.COPYRIGHT		Text
-SetType <LibTiff$Dir>.README		Text
-SetType <LibTiff$Dir>.VERSION		Text
-SetType <LibTiff$Dir>.tiff/alpha        Text
-SetType <LibTiff$Dir>.SetVars		Obey
-SetType <LibTiff$Dir>.Makefile		fe1
-SetType <LibTiff$Dir>.cleanlib          Obey
-SetType <LibTiff$Dir>.c.getopt		Text
-SetType <LibTiff$Dir>.c.mkg3states	Text
-SetType <LibTiff$Dir>.c.mkspans		Text
-SetType <LibTiff$Dir>.c.mkversion	Text
-SetType <LibTiff$Dir>.c.tif_acorn	Text
-SetType <LibTiff$Dir>.c.tif_aux		Text
-SetType <LibTiff$Dir>.c.tif_close	Text
-SetType <LibTiff$Dir>.c.tif_codec	Text
-SetType <LibTiff$Dir>.c.tif_compre	Text
-SetType <LibTiff$Dir>.c.tif_dir		Text
-SetType <LibTiff$Dir>.c.tif_dirinf	Text
-SetType <LibTiff$Dir>.c.tif_dirrea	Text
-SetType <LibTiff$Dir>.c.tif_dirwri	Text
-SetType <LibTiff$Dir>.c.tif_dumpmo	Text
-SetType <LibTiff$Dir>.c.tif_error	Text
-SetType <LibTiff$Dir>.c.tif_fax3	Text
-SetType <LibTiff$Dir>.c.tif_flush	Text
-SetType <LibTiff$Dir>.c.tif_getima	Text
-SetType <LibTiff$Dir>.c.tif_jpeg	Text
-SetType <LibTiff$Dir>.c.tif_lzw		Text
-SetType <LibTiff$Dir>.c.tif_next	Text
-SetType <LibTiff$Dir>.c.tif_open	Text
-SetType <LibTiff$Dir>.c.tif_packbi	Text
-SetType <LibTiff$Dir>.c.tif_predic	Text
-SetType <LibTiff$Dir>.c.tif_print	Text
-SetType <LibTiff$Dir>.c.tif_read	Text
-SetType <LibTiff$Dir>.c.tif_strip	Text
-SetType <LibTiff$Dir>.c.tif_swab	Text
-SetType <LibTiff$Dir>.c.tif_thunde	Text
-SetType <LibTiff$Dir>.c.tif_tile	Text
-SetType <LibTiff$Dir>.c.tif_versio	Text
-SetType <LibTiff$Dir>.c.tif_warnin	Text
-SetType <LibTiff$Dir>.c.tif_write	Text
-SetType <LibTiff$Dir>.c.tif_zip		Text
-SetType <LibTiff$Dir>.h.t4		Text
-SetType <LibTiff$Dir>.h.tiff		Text
-SetType <LibTiff$Dir>.h.tiffcomp	Text
-SetType <LibTiff$Dir>.h.tiffconf	Text
-SetType <LibTiff$Dir>.h.tiffio		Text
-SetType <LibTiff$Dir>.h.tiffiop		Text
-SetType <LibTiff$Dir>.h.tif_dir		Text
-SetType <LibTiff$Dir>.h.tif_fax3	Text
-SetType <LibTiff$Dir>.h.tif_predic	Text
-Unset Alias$CPY
-Unset LibTiffInstall$Dir
-| Now attempt to restore longfilename status. If it causes an error, OK.
-Set Alias$RN Rename <LibTiff$Dir>.%%0 <LibTiff$Dir>.%%1
-Unset LibTiff$Dir
-RN c.tif_compre c.tif_compress
-RN c.tif_dirinf c.tif_dirinfo
-RN c.tif_dirrea c.tif_dirread
-RN c.tif_dirwri c.tif_dirwrite
-RN c.tif_dumpmo c.tif_dumpmode
-RN c.tif_getima c.tif_getimage
-RN c.tif_packbi c.tif_packbits
-RN c.tif_predic c.tif_predict
-RN c.tif_thunde c.tif_thunder
-RN c.tif_versio c.tif_version
-RN c.tif_warnin c.tif_warning
-RN h.tif_predic h.tif_predict
-Unset Alias$RN
-Echo All done!
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/Makefile b/tkimg1.3/libtiff/contrib/addtiffo/Makefile
deleted file mode 100644
index df725e6..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# If libtiff.a is installed in /usr/lib or /usr/local/lib just point
-# LIBTIFF_DIR there.  It doesn't need a full libtiff tree.
-#
-LIBTIFF_DIR =	../../libtiff
-#
-CC	=	gcc
-CFLAGS	=	-O -I$(LIBTIFF_DIR)
-LIBS	=	$(LIBTIFF_DIR)/libtiff.a -lm
-
-addtiffo:	addtiffo.o tif_overview.o tif_ovrcache.o
-	$(CXX) $(CFLAGS) addtiffo.o tif_overview.o tif_ovrcache.o \
-		$(LIBS) -o addtiffo 
-
-
-addtiffo.o:	addtiffo.c
-	$(CC) -c $(CFLAGS) addtiffo.c
-
-tif_overview.o:	tif_overview.c
-	$(CC) -c $(CFLAGS) tif_overview.c
-
-tif_ovrcache.o:	tif_ovrcache.c
-	$(CC) -c $(CFLAGS) tif_ovrcache.c
-
-clean:
-	rm *.o addtiffo
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/Makefile.vc b/tkimg1.3/libtiff/contrib/addtiffo/Makefile.vc
deleted file mode 100755
index 3e30820..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/Makefile.vc
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# If libtiff.a is installed in /usr/lib or /usr/local/lib just point
-# LIBTIFF_DIR there.  It doesn't need a full libtiff tree.
-#
-LIBTIFF_DIR =	..\..\libtiff
-#
-CC	=	cl.exe
-CPPC	=	cl.exe
-CFLAGS	=	-O -I$(LIBTIFF_DIR)
-LIBS	=	$(LIBTIFF_DIR)\libtiff.lib
-
-addtiffo:	addtiffo.obj tif_overview.obj tif_ovrcache.obj
-	$(CC) $(CFLAGS) addtiffo.obj tif_overview.obj tif_ovrcache.obj \
-		$(LIBS) /Feaddtiffo.exe
-
-
-addtiffo.obj:	addtiffo.c
-	$(CC) -c $(CFLAGS) addtiffo.c
-
-tif_overview.obj:	tif_overview.c
-	$(CPPC) -c $(CFLAGS) tif_overview.c
-
-tif_ovrcache.obj:	tif_ovrcache.c
-	$(CPPC) -c $(CFLAGS) tif_ovrcache.c
-
-clean:
-	del *.obj addtiffo.exe
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/README b/tkimg1.3/libtiff/contrib/addtiffo/README
deleted file mode 100644
index 985a99d..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/README
+++ /dev/null
@@ -1,142 +0,0 @@
-	addtiffo 1.0
-	============
-
-The addtiffo utility is used to add overview pyramids to an existing 
-TIFF or GeoTIFF file.  Some applications can take advantage of these
-overviews to accelerate overview display performance of large rasters. 
-
-This release of addtiffo is primarily intended for compatibility testing
-with applications, and to see if there is interest in a cleaner release
-of the capability ... perhaps incorporation into the libtiff tools 
-distribution. 
-
-Please feel free to contact me with questions, or problems.
-
-warmerda at home.com
-http://members.home.com/warmerda
-
-
-Usage
------
-
-Usage: addtiffo [-r {average/nearest} [-subifd] 
-                tiff_filename [resolution_reductions]
-
-Example:
- % addtiffo abc.tif 2 4 8 16
-
-The numeric arguments are the list of reduction factors to 
-generate.  In this example a 1/2, 1/4 1/8 and 1/16 
-
-
-
-Limitations
------------
-
-See tif_overview.cpp for up to date details. 
-
-  o Currently only images with bits_per_sample of a multiple of eight
-    will work.
-
-  o The code will attempt to use the same kind of compression,
-    photometric interpretation, and organization as the source image, but
-    it doesn't copy geotiff tags to the reduced resolution images.
-
-  o Reduced resolution overviews for multi-sample files will currently
-    always be generated as PLANARCONFIG_SEPARATE.  This could be fixed
-    reasonable easily if needed to improve compatibility with other
-    packages.  Many don't properly support PLANARCONFIG_SEPARATE. 
-
-  o Overviews are always written as appended IFDs, rather than using the
-    ``tree of tree's'' approach using the SUBIFD tag.  I wanted to implement
-    both, but it isn't currently easy to add a SUBIFD tag to an existing
-    main tiff IFD with libtiff.  I hope to try this again later. 
-
-
-TIFF File Tags
---------------
-
-The results of running addtiffo on a 1024x1024 tiled greyscale file 
-with the arguments ``2 4 8 16'' is to add four additional TIFF directories
-appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra
-items are reduced resolution images. 
-
-The tiffinfo output of such a file might look like this:
-
-TIFF Directory at offset 0x118008
-  Image Width: 1024 Image Length: 1024
-  Tile Width: 256 Tile Length: 112
-  Bits/Sample: 8
-  Compression Scheme: none
-  Photometric Interpretation: min-is-black
-  Samples/Pixel: 1
-  Planar Configuration: single image plane
-TIFF Directory at offset 0x15e1d2
-  Subfile Type: reduced-resolution image (1 = 0x1)
-  Image Width: 512 Image Length: 512
-  Tile Width: 256 Tile Length: 112
-  Bits/Sample: 8
-  Compression Scheme: none
-  Photometric Interpretation: min-is-black
-  Samples/Pixel: 1
-  Planar Configuration: separate image planes
-TIFF Directory at offset 0x1732b8
-  Subfile Type: reduced-resolution image (1 = 0x1)
-  Image Width: 256 Image Length: 256
-  Tile Width: 256 Tile Length: 112
-  Bits/Sample: 8
-  Compression Scheme: none
-  Photometric Interpretation: min-is-black
-  Samples/Pixel: 1
-  Planar Configuration: separate image planes
-TIFF Directory at offset 0x17a366
-  Subfile Type: reduced-resolution image (1 = 0x1)
-  Image Width: 128 Image Length: 128
-  Tile Width: 128 Tile Length: 112
-  Bits/Sample: 8
-  Compression Scheme: none
-  Photometric Interpretation: min-is-black
-  Samples/Pixel: 1
-  Planar Configuration: separate image planes
-TIFF Directory at offset 0x17b40c
-  Subfile Type: reduced-resolution image (1 = 0x1)
-  Image Width: 64 Image Length: 64
-  Tile Width: 64 Tile Length: 64
-  Bits/Sample: 8
-  Compression Scheme: none
-  Photometric Interpretation: min-is-black
-  Samples/Pixel: 1
-  Planar Configuration: separate image planes
-
-
-Building
---------
-
-You will need a C compiler.  You will need to have libtiff already
-built and installed.  The provided Makefile should work on most Unix systems.
-A similar file will be needed for Windows, but is not provided. 
-
-The CFLAGS and LIBS macros in the Makefile will have to be updated to 
-point to the correct location of the libtiff include files, and library.
-
-
-Credits
--------
-
- o Intergraph Corporation for partially funding the work. 
-
- o Global Geomatics for partially funding reorganization of the overview
-   building ability as a separate utility.
-
- o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to 
-   be done. 
-
- o Max Martinez of Erdas for his discussion of external overviews. 
-
- o Atlantis Scientific who supported adding averaging, and some other
-   generalizations. 
-
- o Frank Warmerdam for writing the bulk of the code. 
-
- o Sam Leffler since this only exists because of his libtiff. 
-
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/addtiffo.c b/tkimg1.3/libtiff/contrib/addtiffo/addtiffo.c
deleted file mode 100644
index 5842e3c..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/addtiffo.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/******************************************************************************
- * $Id: addtiffo.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- * Project:  GeoTIFF Overview Builder
- * Purpose:  Mainline for building overviews in a TIFF file.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: addtiffo.c,v $
- * Revision 1.1.1.1  2007/01/03 20:47:10  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:09  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.3  2000/04/18 22:48:31  warmerda
- * Added support for averaging resampling
- *
- * Revision 1.2  2000/01/28 15:36:38  warmerda
- * pass TIFF handle instead of filename to overview builder
- *
- * Revision 1.1  1999/08/17 01:47:59  warmerda
- * New
- *
- * Revision 1.1  1999/03/12 17:46:32  warmerda
- * New
- *
- * Revision 1.2  1999/02/11 22:27:12  warmerda
- * Added multi-sample support
- *
- * Revision 1.1  1999/02/11 18:12:30  warmerda
- * New
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "tiffio.h"
-
-void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
-                         int (*)(double,void*), void * );
-
-/************************************************************************/
-/*                                main()                                */
-/************************************************************************/
-
-int main( int argc, char ** argv )
-
-{
-    int		anOverviews[100];
-    int		nOverviewCount = 0;
-    int		bUseSubIFD = 0;
-    TIFF	*hTIFF;
-    const char  *pszResampling = "nearest";
-
-/* -------------------------------------------------------------------- */
-/*      Usage:                                                          */
-/* -------------------------------------------------------------------- */
-    if( argc < 2 )
-    {
-        printf( "Usage: addtiffo [-r {nearest,average,mode}]\n"
-                "                tiff_filename [resolution_reductions]\n"
-                "\n"
-                "Example:\n"
-                " %% addtifo abc.tif 2 4 8 16\n" );
-        exit( 1 );
-    }
-
-    while( argv[1][0] == '-' )
-    {
-        if( strcmp(argv[1],"-subifd") == 0 )
-        {
-            bUseSubIFD = 1;
-            argv++;
-            argc--;
-        }
-        else if( strcmp(argv[1],"-r") == 0 )
-        {
-            argv += 2;
-            argc -= 2;
-            pszResampling = *argv;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Collect the user requested reduction factors.                   */
-/* -------------------------------------------------------------------- */
-    while( nOverviewCount < argc - 2 && nOverviewCount < 100 )
-    {
-        anOverviews[nOverviewCount] = atoi(argv[nOverviewCount+2]);
-        nOverviewCount++;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Default to four overview levels.  It would be nicer if it       */
-/*      defaulted based on the size of the source image.                */
-/* -------------------------------------------------------------------- */
-    if( nOverviewCount == 0 )
-    {
-        nOverviewCount = 4;
-        
-        anOverviews[0] = 2;
-        anOverviews[1] = 4;
-        anOverviews[2] = 8;
-        anOverviews[3] = 16;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Build the overview.                                             */
-/* -------------------------------------------------------------------- */
-    hTIFF = TIFFOpen( argv[1], "r+" );
-    if( hTIFF == NULL )
-    {
-        fprintf( stderr, "TIFFOpen(%s) failed.\n", argv[1] );
-        exit( 1 );
-    }
-
-    TIFFBuildOverviews( hTIFF, nOverviewCount, anOverviews, bUseSubIFD,
-                        pszResampling, NULL, NULL );
-
-    TIFFClose( hTIFF );
-    
-/* -------------------------------------------------------------------- */
-/*      Optionally test for memory leaks.                               */
-/* -------------------------------------------------------------------- */
-#ifdef DBMALLOC
-    malloc_dump(1);
-#endif
-    
-    exit( 0 );
-}
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/tif_overview.c b/tkimg1.3/libtiff/contrib/addtiffo/tif_overview.c
deleted file mode 100644
index 7cea46c..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/tif_overview.c
+++ /dev/null
@@ -1,655 +0,0 @@
-/******************************************************************************
- * $Id: tif_overview.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- * Project:  TIFF Overview Builder
- * Purpose:  Library function for building overviews in a TIFF file.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- * Notes:
- *  o Currently only images with bits_per_sample of a multiple of eight
- *    will work.
- *
- *  o The downsampler currently just takes the top left pixel from the
- *    source rectangle.  Eventually sampling options of averaging, mode, and
- *    ``center pixel'' should be offered.
- *
- *  o The code will attempt to use the same kind of compression,
- *    photometric interpretation, and organization as the source image, but
- *    it doesn't copy geotiff tags to the reduced resolution images.
- *
- *  o Reduced resolution overviews for multi-sample files will currently
- *    always be generated as PLANARCONFIG_SEPARATE.  This could be fixed
- *    reasonable easily if needed to improve compatibility with other
- *    packages.  Many don't properly support PLANARCONFIG_SEPARATE. 
- * 
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: tif_overview.c,v $
- * Revision 1.1.1.1  2007/01/03 20:47:10  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:09  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.3  2000/04/18 22:48:31  warmerda
- * Added support for averaging resampling
- *
- * Revision 1.2  2000/01/28 15:36:38  warmerda
- * pass TIFF handle instead of filename to overview builder
- *
- * Revision 1.1  2000/01/28 15:04:03  warmerda
- * New
- *
- */
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-
-#include "tiffio.h"
-#include "tif_ovrcache.h"
-
-
-#ifndef FALSE
-#  define FALSE 0
-#  define TRUE 1
-#endif
-
-#ifndef MAX
-#  define MIN(a,b)      ((a<b) ? a : b)
-#  define MAX(a,b)      ((a>b) ? a : b)
-#endif
-
-void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
-                         int (*)(double,void*), void * );
-
-/************************************************************************/
-/*                         TIFF_WriteOverview()                         */
-/*                                                                      */
-/*      Create a new directory, without any image data for an overview. */
-/*      Returns offset of newly created overview directory, but the     */
-/*      current directory is reset to be the one in used when this      */
-/*      function is called.                                             */
-/********************************* ***************************************/
-
-static
-uint32 TIFF_WriteOverview( TIFF *hTIFF, int nXSize, int nYSize,
-                           int nBitsPerPixel, int nSamples, 
-                           int nBlockXSize, int nBlockYSize,
-                           int bTiled, int nCompressFlag, int nPhotometric,
-                           int nSampleFormat,
-                           unsigned short *panRed,
-                           unsigned short *panGreen,
-                           unsigned short *panBlue,
-                           int bUseSubIFDs )
-
-{
-    uint32	nBaseDirOffset;
-    uint32	nOffset;
-
-    nBaseDirOffset = TIFFCurrentDirOffset( hTIFF );
-
-    TIFFCreateDirectory( hTIFF );
-    
-/* -------------------------------------------------------------------- */
-/*      Setup TIFF fields.                                              */
-/* -------------------------------------------------------------------- */
-    TIFFSetField( hTIFF, TIFFTAG_IMAGEWIDTH, nXSize );
-    TIFFSetField( hTIFF, TIFFTAG_IMAGELENGTH, nYSize );
-    if( nSamples == 1 )
-        TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG );
-    else
-        TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE );
-
-    TIFFSetField( hTIFF, TIFFTAG_BITSPERSAMPLE, nBitsPerPixel );
-    TIFFSetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, nSamples );
-    TIFFSetField( hTIFF, TIFFTAG_COMPRESSION, nCompressFlag );
-    TIFFSetField( hTIFF, TIFFTAG_PHOTOMETRIC, nPhotometric );
-    TIFFSetField( hTIFF, TIFFTAG_SAMPLEFORMAT, nSampleFormat );
-
-    if( bTiled )
-    {
-        TIFFSetField( hTIFF, TIFFTAG_TILEWIDTH, nBlockXSize );
-        TIFFSetField( hTIFF, TIFFTAG_TILELENGTH, nBlockYSize );
-    }
-    else
-        TIFFSetField( hTIFF, TIFFTAG_ROWSPERSTRIP, nBlockYSize );
-
-    TIFFSetField( hTIFF, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
-    
-/* -------------------------------------------------------------------- */
-/*	Write color table if one is present.				*/
-/* -------------------------------------------------------------------- */
-    if( panRed != NULL )
-    {
-        TIFFSetField( hTIFF, TIFFTAG_COLORMAP, panRed, panGreen, panBlue );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Write directory, and return byte offset.                        */
-/* -------------------------------------------------------------------- */
-    TIFFWriteCheck( hTIFF, bTiled, "TIFFBuildOverviews" );
-    TIFFWriteDirectory( hTIFF );
-    TIFFSetDirectory( hTIFF, TIFFNumberOfDirectories(hTIFF)-1 );
-
-    nOffset = TIFFCurrentDirOffset( hTIFF );
-
-    TIFFSetSubDirectory( hTIFF, nBaseDirOffset );
-
-    return nOffset;
-}
-
-/************************************************************************/
-/*                       TIFF_GetSourceSamples()                        */
-/************************************************************************/
-
-static void 
-TIFF_GetSourceSamples( double * padfSamples, unsigned char *pabySrc, 
-                       int nPixelBytes, int nSampleFormat, 
-                       int nXSize, int nYSize, 
-                       int nPixelOffset, int nLineOffset )
-{
-    int  iXOff, iYOff, iSample;
-
-    iSample = 0;
-
-    for( iYOff = 0; iYOff < nYSize; iYOff++ )
-    {
-        for( iXOff = 0; iXOff < nXSize; iXOff++ )
-        {
-            unsigned char *pabyData;
-
-            pabyData = pabySrc + iYOff * nLineOffset + iXOff * nPixelOffset;
-
-            if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
-            {
-                padfSamples[iSample++] = *pabyData;
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
-            {
-                padfSamples[iSample++] = ((uint16 *) pabyData)[0];
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
-            {
-                padfSamples[iSample++] = ((uint32 *) pabyData)[0];
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
-            {
-                padfSamples[iSample++] = ((int16 *) pabyData)[0];
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
-            {
-                padfSamples[iSample++] = ((int32 *) pabyData)[0];
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
-            {
-                padfSamples[iSample++] = ((float *) pabyData)[0];
-            }
-            else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
-            {
-                padfSamples[iSample++] = ((double *) pabyData)[0];
-            }
-        }
-    }
-} 
-
-/************************************************************************/
-/*                           TIFF_SetSample()                           */
-/************************************************************************/
-
-static void 
-TIFF_SetSample( unsigned char * pabyData, int nPixelBytes, int nSampleFormat, 
-                double dfValue )
-
-{
-    if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
-    {
-        *pabyData = (unsigned char) MAX(0,MIN(255,dfValue));
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
-    {
-        *((uint16 *)pabyData) = (uint16) MAX(0,MIN(65535,dfValue));
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
-    {
-        *((uint32 *)pabyData) = (uint32) dfValue;
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
-    {
-        *((int16 *)pabyData) = (int16) MAX(-32768,MIN(32767,dfValue));
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
-    {
-        *((int32 *)pabyData) = (int32) dfValue;
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
-    {
-        *((float *)pabyData) = (float) dfValue;
-    }
-    else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
-    {
-        *((double *)pabyData) = dfValue;
-    }
-}
-
-/************************************************************************/
-/*                          TIFF_DownSample()                           */
-/*                                                                      */
-/*      Down sample a tile of full res data into a window of a tile     */
-/*      of downsampled data.                                            */
-/************************************************************************/
-
-static
-void TIFF_DownSample( unsigned char *pabySrcTile,
-                      int nBlockXSize, int nBlockYSize,
-                      int nPixelSkewBits, int nBitsPerPixel,
-                      unsigned char * pabyOTile,
-                      int nOBlockXSize, int nOBlockYSize,
-                      int nTXOff, int nTYOff, int nOMult,
-                      int nSampleFormat, const char * pszResampling )
-
-{
-    int		i, j, k, nPixelBytes = (nBitsPerPixel) / 8;
-    int		nPixelGroupBytes = (nBitsPerPixel+nPixelSkewBits)/8;
-    unsigned char *pabySrc, *pabyDst;
-    double      *padfSamples;
-
-    assert( nBitsPerPixel >= 8 );
-
-    padfSamples = (double *) malloc(sizeof(double) * nOMult * nOMult);
-
-/* ==================================================================== */
-/*      Loop over scanline chunks to process, establishing where the    */
-/*      data is going.                                                  */
-/* ==================================================================== */
-    for( j = 0; j*nOMult < nBlockYSize; j++ )
-    {
-        if( j + nTYOff >= nOBlockYSize )
-            break;
-            
-        pabyDst = pabyOTile
-            + ((j+nTYOff)*nOBlockXSize + nTXOff) * nPixelBytes;
-
-/* -------------------------------------------------------------------- */
-/*      Handler nearest resampling ... we don't even care about the     */
-/*      data type, we just do a bytewise copy.                          */
-/* -------------------------------------------------------------------- */
-        if( strncmp(pszResampling,"nearest",4) == 0
-            || strncmp(pszResampling,"NEAR",4) == 0 )
-        {
-            pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
-
-            for( i = 0; i*nOMult < nBlockXSize; i++ )
-            {
-                if( i + nTXOff >= nOBlockXSize )
-                    break;
-            
-                /*
-                 * For now use simple subsampling, from the top left corner
-                 * of the source block of pixels.
-                 */
-
-                for( k = 0; k < nPixelBytes; k++ )
-                {
-                    *(pabyDst++) = pabySrc[k];
-                }
-            
-                pabySrc += nOMult * nPixelGroupBytes;
-            }
-        }
-
-/* -------------------------------------------------------------------- */
-/*      Handle the case of averaging.  For this we also have to         */
-/*      handle each sample format we are concerned with.                */
-/* -------------------------------------------------------------------- */
-        else if( strncmp(pszResampling,"averag",6) == 0 
-                 || strncmp(pszResampling,"AVERAG",6) == 0 )
-        {
-            pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
-
-            for( i = 0; i*nOMult < nBlockXSize; i++ )
-            {
-                double   dfTotal;
-                int      iSample;
-                int      nXSize, nYSize;
-
-                if( i + nTXOff >= nOBlockXSize )
-                    break;
-
-                nXSize = MIN(nOMult,nBlockXSize-i);
-                nYSize = MIN(nOMult,nBlockYSize-j);
-
-                TIFF_GetSourceSamples( padfSamples, pabySrc, 
-                                       nPixelBytes, nSampleFormat, 
-                                       nXSize, nYSize, 
-                                       nPixelGroupBytes, 
-                                       nPixelGroupBytes * nBlockXSize );
-                
-                dfTotal = 0;
-                for( iSample = 0; iSample < nXSize*nYSize; iSample++ )
-                {
-                    dfTotal += padfSamples[iSample];
-                }
-
-                TIFF_SetSample( pabyDst, nPixelBytes, nSampleFormat, 
-                                dfTotal / (nXSize*nYSize) );
-
-                pabySrc += nOMult * nPixelGroupBytes;
-                pabyDst += nPixelBytes;
-            }
-        }
-    }
-
-    free( padfSamples );
-}
-
-/************************************************************************/
-/*                      TIFF_ProcessFullResBlock()                      */
-/*                                                                      */
-/*      Process one block of full res data, downsampling into each      */
-/*      of the overviews.                                               */
-/************************************************************************/
-
-void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
-                               int nOverviews, int * panOvList,
-                               int nBitsPerPixel, 
-                               int nSamples, TIFFOvrCache ** papoRawBIs,
-                               int nSXOff, int nSYOff,
-                               unsigned char *pabySrcTile,
-                               int nBlockXSize, int nBlockYSize,
-                               int nSampleFormat, const char * pszResampling )
-    
-{
-    int		iOverview, iSample;
-
-    for( iSample = 0; iSample < nSamples; iSample++ )
-    {
-        /*
-         * We have to read a tile/strip for each sample for
-         * PLANARCONFIG_SEPARATE.  Otherwise, we just read all the samples
-         * at once when handling the first sample.
-         */
-        if( nPlanarConfig == PLANARCONFIG_SEPARATE || iSample == 0 )
-        {
-            if( TIFFIsTiled(hTIFF) )
-            {
-                TIFFReadEncodedTile( hTIFF,
-                                     TIFFComputeTile(hTIFF, nSXOff, nSYOff,
-                                                     0, iSample ),
-                                     pabySrcTile,
-                                     TIFFTileSize(hTIFF));
-            }
-            else
-            {
-                TIFFReadEncodedStrip( hTIFF,
-                                      TIFFComputeStrip(hTIFF, nSYOff, iSample),
-                                      pabySrcTile,
-                                      TIFFStripSize(hTIFF) );
-            }
-        }
-
-        /*        
-         * Loop over destination overview layers
-         */
-        for( iOverview = 0; iOverview < nOverviews; iOverview++ )
-        {
-            TIFFOvrCache *poRBI = papoRawBIs[iOverview];
-            unsigned char *pabyOTile;
-            int	nTXOff, nTYOff, nOXOff, nOYOff, nOMult;
-            int	nOBlockXSize = poRBI->nBlockXSize;
-            int	nOBlockYSize = poRBI->nBlockYSize;
-            int	nSkewBits, nSampleByteOffset; 
-
-            /*
-             * Fetch the destination overview tile
-             */
-            nOMult = panOvList[iOverview];
-            nOXOff = (nSXOff/nOMult) / nOBlockXSize;
-            nOYOff = (nSYOff/nOMult) / nOBlockYSize;
-            pabyOTile = TIFFGetOvrBlock( poRBI, nOXOff, nOYOff, iSample );
-                
-            /*
-             * Establish the offset into this tile at which we should
-             * start placing data.
-             */
-            nTXOff = (nSXOff - nOXOff*nOMult*nOBlockXSize) / nOMult;
-            nTYOff = (nSYOff - nOYOff*nOMult*nOBlockYSize) / nOMult;
-
-            /*
-             * Figure out the skew (extra space between ``our samples'') and
-             * the byte offset to the first sample.
-             */
-            assert( (nBitsPerPixel % 8) == 0 );
-            if( nPlanarConfig == PLANARCONFIG_SEPARATE )
-            {
-                nSkewBits = 0;
-                nSampleByteOffset = 0;
-            }
-            else
-            {
-                nSkewBits = nBitsPerPixel * (nSamples-1);
-                nSampleByteOffset = (nBitsPerPixel/8) * iSample;
-            }
-            
-            /*
-             * Perform the downsampling.
-             */
-#ifdef DBMALLOC
-            malloc_chain_check( 1 );
-#endif
-            TIFF_DownSample( pabySrcTile + nSampleByteOffset,
-                             nBlockXSize, nBlockYSize,
-                             nSkewBits, nBitsPerPixel, pabyOTile,
-                             poRBI->nBlockXSize, poRBI->nBlockYSize,
-                             nTXOff, nTYOff,
-                             nOMult, nSampleFormat, pszResampling );
-#ifdef DBMALLOC
-            malloc_chain_check( 1 );
-#endif            
-        }
-    }
-}
-
-/************************************************************************/
-/*                        TIFF_BuildOverviews()                         */
-/*                                                                      */
-/*      Build the requested list of overviews.  Overviews are           */
-/*      maintained in a bunch of temporary files and then these are     */
-/*      written back to the TIFF file.  Only one pass through the       */
-/*      source TIFF file is made for any number of output               */
-/*      overviews.                                                      */
-/************************************************************************/
-
-void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList,
-                         int bUseSubIFDs, const char *pszResampleMethod,
-                         int (*pfnProgress)( double, void * ),
-                         void * pProgressData )
-
-{
-    TIFFOvrCache	**papoRawBIs;
-    uint32		nXSize, nYSize, nBlockXSize, nBlockYSize;
-    uint16		nBitsPerPixel, nPhotometric, nCompressFlag, nSamples,
-                        nPlanarConfig, nSampleFormat;
-    int			bTiled, nSXOff, nSYOff, i;
-    unsigned char	*pabySrcTile;
-    uint16		*panRedMap, *panGreenMap, *panBlueMap;
-    TIFFErrorHandler    pfnWarning;
-
-/* -------------------------------------------------------------------- */
-/*      Get the base raster size.                                       */
-/* -------------------------------------------------------------------- */
-    TIFFGetField( hTIFF, TIFFTAG_IMAGEWIDTH, &nXSize );
-    TIFFGetField( hTIFF, TIFFTAG_IMAGELENGTH, &nYSize );
-
-    TIFFGetField( hTIFF, TIFFTAG_BITSPERSAMPLE, &nBitsPerPixel );
-    TIFFGetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, &nSamples );
-    TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PLANARCONFIG, &nPlanarConfig );
-
-    TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PHOTOMETRIC, &nPhotometric );
-    TIFFGetFieldDefaulted( hTIFF, TIFFTAG_COMPRESSION, &nCompressFlag );
-    TIFFGetFieldDefaulted( hTIFF, TIFFTAG_SAMPLEFORMAT, &nSampleFormat );
-
-    if( nBitsPerPixel < 8 )
-    {
-        TIFFError( "TIFFBuildOverviews",
-                   "File `%s' has samples of %d bits per sample.  Sample\n"
-                   "sizes of less than 8 bits per sample are not supported.\n",
-                   TIFFFileName(hTIFF), nBitsPerPixel );
-        return;
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Turn off warnings to avoid alot of repeated warnings while      */
-/*      rereading directories.                                          */
-/* -------------------------------------------------------------------- */
-    pfnWarning = TIFFSetWarningHandler( NULL );
-
-/* -------------------------------------------------------------------- */
-/*      Get the base raster block size.                                 */
-/* -------------------------------------------------------------------- */
-    if( TIFFGetField( hTIFF, TIFFTAG_ROWSPERSTRIP, &(nBlockYSize) ) )
-    {
-        nBlockXSize = nXSize;
-        bTiled = FALSE;
-    }
-    else
-    {
-        TIFFGetField( hTIFF, TIFFTAG_TILEWIDTH, &nBlockXSize );
-        TIFFGetField( hTIFF, TIFFTAG_TILELENGTH, &nBlockYSize );
-        bTiled = TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Capture the pallette if there is one.				*/
-/* -------------------------------------------------------------------- */
-    if( TIFFGetField( hTIFF, TIFFTAG_COLORMAP,
-                      &panRedMap, &panGreenMap, &panBlueMap ) )
-    {
-        uint16		*panRed2, *panGreen2, *panBlue2;
-
-        panRed2 = (uint16 *) _TIFFmalloc(2*256);
-        panGreen2 = (uint16 *) _TIFFmalloc(2*256);
-        panBlue2 = (uint16 *) _TIFFmalloc(2*256);
-
-        memcpy( panRed2, panRedMap, 512 );
-        memcpy( panGreen2, panGreenMap, 512 );
-        memcpy( panBlue2, panBlueMap, 512 );
-
-        panRedMap = panRed2;
-        panGreenMap = panGreen2;
-        panBlueMap = panBlue2;
-    }
-    else
-    {
-        panRedMap = panGreenMap = panBlueMap = NULL;
-    }
-        
-/* -------------------------------------------------------------------- */
-/*      Initialize overviews.                                           */
-/* -------------------------------------------------------------------- */
-    papoRawBIs = (TIFFOvrCache **) _TIFFmalloc(nOverviews*sizeof(void*));
-
-    for( i = 0; i < nOverviews; i++ )
-    {
-        int	nOXSize, nOYSize, nOBlockXSize, nOBlockYSize;
-        uint32  nDirOffset;
-
-        nOXSize = (nXSize + panOvList[i] - 1) / panOvList[i];
-        nOYSize = (nYSize + panOvList[i] - 1) / panOvList[i];
-
-        nOBlockXSize = MIN((int)nBlockXSize,nOXSize);
-        nOBlockYSize = MIN((int)nBlockYSize,nOYSize);
-
-        if( bTiled )
-        {
-            if( (nOBlockXSize % 16) != 0 )
-                nOBlockXSize = nOBlockXSize + 16 - (nOBlockXSize % 16);
-            
-            if( (nOBlockYSize % 16) != 0 )
-                nOBlockYSize = nOBlockYSize + 16 - (nOBlockYSize % 16);
-        }
-
-        nDirOffset = TIFF_WriteOverview( hTIFF, nOXSize, nOYSize,
-                                         nBitsPerPixel, nSamples,
-                                         nOBlockXSize, nOBlockYSize,
-                                         bTiled, nCompressFlag, nPhotometric,
-                                         nSampleFormat,
-                                         panRedMap, panGreenMap, panBlueMap,
-                                         bUseSubIFDs );
-        
-        papoRawBIs[i] = TIFFCreateOvrCache( hTIFF, nDirOffset );
-    }
-
-    if( panRedMap != NULL )
-    {
-        _TIFFfree( panRedMap );
-        _TIFFfree( panGreenMap );
-        _TIFFfree( panBlueMap );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Allocate a buffer to hold a source block.                       */
-/* -------------------------------------------------------------------- */
-    if( bTiled )
-        pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFTileSize(hTIFF));
-    else
-        pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFStripSize(hTIFF));
-    
-/* -------------------------------------------------------------------- */
-/*      Loop over the source raster, applying data to the               */
-/*      destination raster.                                             */
-/* -------------------------------------------------------------------- */
-    for( nSYOff = 0; nSYOff < (int) nYSize; nSYOff += nBlockYSize )
-    {
-        for( nSXOff = 0; nSXOff < (int) nXSize; nSXOff += nBlockXSize )
-        {
-            /*
-             * Read and resample into the various overview images.
-             */
-            
-            TIFF_ProcessFullResBlock( hTIFF, nPlanarConfig,
-                                      nOverviews, panOvList,
-                                      nBitsPerPixel, nSamples, papoRawBIs,
-                                      nSXOff, nSYOff, pabySrcTile,
-                                      nBlockXSize, nBlockYSize,
-                                      nSampleFormat, pszResampleMethod );
-        }
-    }
-
-    _TIFFfree( pabySrcTile );
-
-/* -------------------------------------------------------------------- */
-/*      Cleanup the rawblockedimage files.                              */
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < nOverviews; i++ )
-    {
-        TIFFDestroyOvrCache( papoRawBIs[i] );
-    }
-
-    if( papoRawBIs != NULL )
-        _TIFFfree( papoRawBIs );
-
-    TIFFSetWarningHandler( pfnWarning );
-}
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.c b/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.c
deleted file mode 100644
index 894035a..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/******************************************************************************
- * $Id: tif_ovrcache.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- * Project:  TIFF Overview Builder
- * Purpose:  Library functions to maintain two rows of tiles or two strips
- *           of data for output overviews as an output cache. 
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 2000, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: tif_ovrcache.c,v $
- * Revision 1.1.1.1  2007/01/03 20:47:10  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:09  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.2  2000/01/28 15:42:25  warmerda
- * Avoid warnings on Windows.
- *
- * Revision 1.1  2000/01/28 15:03:44  warmerda
- * New
- *
- */
-
-#include "tiffiop.h"
-#include "tif_ovrcache.h"
-#include <assert.h>
-
-/************************************************************************/
-/*                         TIFFCreateOvrCache()                         */
-/*                                                                      */
-/*      Create an overview cache to hold two rows of blocks from an     */
-/*      existing TIFF directory.                                        */
-/************************************************************************/
-
-TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset )
-
-{
-    TIFFOvrCache	*psCache;
-    int			nBytesPerRow;
-    uint32		nBaseDirOffset;
-
-    psCache = (TIFFOvrCache *) _TIFFmalloc(sizeof(TIFFOvrCache));
-    psCache->nDirOffset = nDirOffset;
-    psCache->hTIFF = hTIFF;
-    
-/* -------------------------------------------------------------------- */
-/*      Get definition of this raster from the TIFF file itself.        */
-/* -------------------------------------------------------------------- */
-    nBaseDirOffset = TIFFCurrentDirOffset( psCache->hTIFF );
-    TIFFSetSubDirectory( hTIFF, nDirOffset );
-    
-    TIFFGetField( hTIFF, TIFFTAG_IMAGEWIDTH, &(psCache->nXSize) );
-    TIFFGetField( hTIFF, TIFFTAG_IMAGELENGTH, &(psCache->nYSize) );
-
-    TIFFGetField( hTIFF, TIFFTAG_BITSPERSAMPLE, &(psCache->nBitsPerPixel) );
-    TIFFGetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, &(psCache->nSamples) );
-
-    if( !TIFFIsTiled( hTIFF ) )
-    {
-        TIFFGetField( hTIFF, TIFFTAG_ROWSPERSTRIP, &(psCache->nBlockYSize) );
-        psCache->nBlockXSize = psCache->nXSize;
-        psCache->bTiled = FALSE;
-    }
-    else
-    {
-        TIFFGetField( hTIFF, TIFFTAG_TILEWIDTH, &(psCache->nBlockXSize) );
-        TIFFGetField( hTIFF, TIFFTAG_TILELENGTH, &(psCache->nBlockYSize) );
-        psCache->bTiled = TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Compute some values from this.                                  */
-/* -------------------------------------------------------------------- */
-
-    psCache->nBlocksPerRow = (psCache->nXSize + psCache->nBlockXSize - 1)
-        		/ psCache->nBlockXSize;
-    psCache->nBlocksPerColumn = (psCache->nYSize + psCache->nBlockYSize - 1)
-        		/ psCache->nBlockYSize;
-    
-    psCache->nBytesPerBlock =
-        (psCache->nBlockXSize*psCache->nBlockYSize*psCache->nBitsPerPixel + 7) / 8;
-
-/* -------------------------------------------------------------------- */
-/*      Allocate and initialize the data buffers.                       */
-/* -------------------------------------------------------------------- */
-    nBytesPerRow = psCache->nBytesPerBlock * psCache->nBlocksPerRow
-                    * psCache->nSamples;
-
-    psCache->pabyRow1Blocks = (unsigned char *) _TIFFmalloc(nBytesPerRow);
-    psCache->pabyRow2Blocks = (unsigned char *) _TIFFmalloc(nBytesPerRow);
-
-    if( psCache->pabyRow1Blocks == NULL
-        || psCache->pabyRow2Blocks == NULL )
-    {
-        TIFFError( hTIFF->tif_name,
-                   "Can't allocate memory for overview cache." );
-        return NULL;
-    }
-
-    _TIFFmemset( psCache->pabyRow1Blocks, 0, nBytesPerRow );
-    _TIFFmemset( psCache->pabyRow2Blocks, 0, nBytesPerRow );
-
-    psCache->nBlockOffset = 0;
-
-    TIFFSetSubDirectory( psCache->hTIFF, nBaseDirOffset );
-    
-    return psCache;
-}
-
-/************************************************************************/
-/*                          TIFFWriteOvrRow()                           */
-/*                                                                      */
-/*      Write one entire row of blocks (row 1) to the tiff file, and    */
-/*      then rotate the block buffers, essentially moving things        */
-/*      down by one block.                                              */
-/************************************************************************/
-
-static void TIFFWriteOvrRow( TIFFOvrCache * psCache )
-
-{
-    int		nRet, iSample, iTileX, iTileY = psCache->nBlockOffset;
-    unsigned char *pabyData;
-    uint32	nBaseDirOffset;
-    
-/* -------------------------------------------------------------------- */
-/*	If the output cache is multi-byte per sample, and the file	*/
-/*	being written to is of a different byte order than the current	*/
-/*	platform, we will need to byte swap the data. 			*/
-/* -------------------------------------------------------------------- */
-    if( TIFFIsByteSwapped(psCache->hTIFF) )
-    {
-        if( psCache->nBitsPerPixel == 16 )
-            TIFFSwabArrayOfShort( (uint16 *) psCache->pabyRow1Blocks,
-                      (psCache->nBytesPerBlock * psCache->nSamples) / 2 );
-
-        else if( psCache->nBitsPerPixel == 32 )
-            TIFFSwabArrayOfLong( (uint32 *) psCache->pabyRow1Blocks,
-                         (psCache->nBytesPerBlock * psCache->nSamples) / 4 );
-
-        else if( psCache->nBitsPerPixel == 64 )
-            TIFFSwabArrayOfDouble( (double *) psCache->pabyRow1Blocks,
-                         (psCache->nBytesPerBlock * psCache->nSamples) / 8 );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Record original directory position, so we can restore it at     */
-/*      end.                                                            */
-/* -------------------------------------------------------------------- */
-    nBaseDirOffset = TIFFCurrentDirOffset( psCache->hTIFF );
-    nRet = TIFFSetSubDirectory( psCache->hTIFF, psCache->nDirOffset );
-    assert( nRet == 1 );
-
-/* -------------------------------------------------------------------- */
-/*      Write blocks to TIFF file.                                      */
-/* -------------------------------------------------------------------- */
-    for( iTileX = 0; iTileX < psCache->nBlocksPerRow; iTileX++ )
-    {
-        for( iSample = 0; iSample < psCache->nSamples; iSample++ )
-        {
-            int		  nTileID;
-
-            pabyData = TIFFGetOvrBlock( psCache, iTileX, iTileY, iSample );
-
-            if( psCache->bTiled )
-            {
-                nTileID =
-                    TIFFComputeTile(psCache->hTIFF,
-                                    iTileX * psCache->nBlockXSize,
-                                    iTileY * psCache->nBlockYSize,
-                                    0, (tsample_t) iSample );
-                TIFFWriteEncodedTile( psCache->hTIFF, nTileID, 
-                                      pabyData,
-                                      TIFFTileSize(psCache->hTIFF) );
-            }
-            else
-            {
-                nTileID =
-                    TIFFComputeStrip(psCache->hTIFF,
-                                     iTileY * psCache->nBlockYSize,
-                                     (tsample_t) iSample);
-
-                TIFFWriteEncodedStrip( psCache->hTIFF, nTileID,
-                                       pabyData,
-                                       TIFFStripSize(psCache->hTIFF) );
-            }
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Rotate buffers.                                                 */
-/* -------------------------------------------------------------------- */
-    pabyData = psCache->pabyRow1Blocks;
-    psCache->pabyRow1Blocks = psCache->pabyRow2Blocks;
-    psCache->pabyRow2Blocks = pabyData;
-
-    _TIFFmemset( pabyData, 0,
-                 psCache->nBytesPerBlock * psCache->nSamples
-                 * psCache->nBlocksPerRow );
-
-    psCache->nBlockOffset++;
-
-/* -------------------------------------------------------------------- */
-/*      Restore access to original directory.                           */
-/* -------------------------------------------------------------------- */
-    TIFFFlush( psCache->hTIFF );
-    
-    TIFFSetSubDirectory( psCache->hTIFF, nBaseDirOffset );
-}
-
-/************************************************************************/
-/*                          TIFFGetOvrBlock()                           */
-/************************************************************************/
-
-unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
-                                int iSample )
-
-{
-    int		nRowOffset;
-    
-    if( iTileY > psCache->nBlockOffset + 1 )
-        TIFFWriteOvrRow( psCache );
-
-    assert( iTileX >= 0 && iTileX < psCache->nBlocksPerRow );
-    assert( iTileY >= 0 && iTileY < psCache->nBlocksPerColumn );
-    assert( iTileY >= psCache->nBlockOffset
-            && iTileY < psCache->nBlockOffset+2 );
-    assert( iSample >= 0 && iSample < psCache->nSamples );
-
-    nRowOffset = ((iTileX * psCache->nSamples) + iSample)
-        		* psCache->nBytesPerBlock;
-
-    if( iTileY == psCache->nBlockOffset )
-        return psCache->pabyRow1Blocks + nRowOffset;
-    else
-        return psCache->pabyRow2Blocks + nRowOffset;
-}
-
-/************************************************************************/
-/*                        TIFFDestroyOvrCache()                         */
-/************************************************************************/
-
-void TIFFDestroyOvrCache( TIFFOvrCache * psCache )
-
-{
-    while( psCache->nBlockOffset < psCache->nBlocksPerColumn )
-        TIFFWriteOvrRow( psCache );
-
-    _TIFFfree( psCache->pabyRow1Blocks );
-    _TIFFfree( psCache->pabyRow2Blocks );
-    _TIFFfree( psCache );
-}
diff --git a/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.h b/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.h
deleted file mode 100644
index 6dbcef2..0000000
--- a/tkimg1.3/libtiff/contrib/addtiffo/tif_ovrcache.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/******************************************************************************
- * $Id: tif_ovrcache.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
- *
- * Project:  TIFF Overview Builder
- * Purpose:  Library functions to maintain two rows of tiles or two strips
- *           of data for output overviews as an output cache. 
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- * This code could potentially be used by other applications wanting to
- * manage a once-through write cache. 
- *
- ******************************************************************************
- * Copyright (c) 2000, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: tif_ovrcache.h,v $
- * Revision 1.1.1.1  2007/01/03 20:47:10  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:09  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.1  2000/01/28 15:03:32  warmerda
- * New
- *
- */
-
-#ifndef TIF_OVRCACHE_H_INCLUDED
-#define TIF_OVRCACHE_H_INCLUDED
-
-typedef struct 
-{
-    uint32	nXSize;
-    uint32	nYSize;
-
-    uint32	nBlockXSize;
-    uint32	nBlockYSize;
-    uint16	nBitsPerPixel;
-    uint16	nSamples;
-    int		nBytesPerBlock;
-
-    int		nBlocksPerRow;
-    int		nBlocksPerColumn;
-
-    int	        nBlockOffset; /* what block is the first in papabyBlocks? */
-    unsigned char *pabyRow1Blocks;
-    unsigned char *pabyRow2Blocks;
-
-    int		nDirOffset;
-    TIFF	*hTIFF;
-    int		bTiled;
-    
-} TIFFOvrCache;
-
-TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset );
-unsigned char *TIFFGetOvrBlock( TIFFOvrCache *, int, int, int );
-void           TIFFDestroyOvrCache( TIFFOvrCache * );
-
-#endif /* ndef TIF_OVRCACHE_H_INCLUDED */
-
diff --git a/tkimg1.3/libtiff/contrib/dbs/Imakefile b/tkimg1.3/libtiff/contrib/dbs/Imakefile
deleted file mode 100644
index e9e2266..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/Imakefile
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# Imakefile -- to generate a Makefile, do xmkmf
-#
-            TIFF = ../../libtiff
- EXTRA_LIBRARIES = $(TIFF)/libtiff.a
-  EXTRA_INCLUDES = -I$(TIFF)
-
-AllTarget(bi gray pal rgb)
-NormalProgramTarget(bi,tiff-bi.o,,,)
-NormalProgramTarget(gray,tiff-grayscale.o,,,-lm)
-NormalProgramTarget(pal,tiff-palette.o,,,)
-NormalProgramTarget(rgb,tiff-rgb.o,,,-lm)
diff --git a/tkimg1.3/libtiff/contrib/dbs/README b/tkimg1.3/libtiff/contrib/dbs/README
deleted file mode 100644
index e05d0a9..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Wed May  9 09:11:35 PDT 1990
-
-This directory contains programs from Dan Sears
-(dbs at decwrl.dec.com).  Contact him directly if
-you have questions/problems.
-
-	Sam
diff --git a/tkimg1.3/libtiff/contrib/dbs/tiff-bi.c b/tkimg1.3/libtiff/contrib/dbs/tiff-bi.c
deleted file mode 100644
index 584fdfd..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/tiff-bi.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * tiff-bi.c -- create a Class B (bilevel) TIFF file
- *
- * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
- *
- *                        All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Digital not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#include <tiffio.h>
-
-#define WIDTH       512
-#define HEIGHT      WIDTH
-
-typedef	unsigned char u_char;
-
-void
-main(argc, argv)
-    int             argc;
-    char **         argv;
-{
-    int             i;
-    u_char *        scan_line;
-    TIFF *          tif;
-
-    if (argc != 2) {
-        fprintf(stderr, "Usage: %s tiff-image\n", argv[0]);
-        exit(0);
-    }
-
-    if ((tif = TIFFOpen(argv[1], "w")) == NULL) {
-        fprintf(stderr, "can't open %s as a TIFF file\n", argv[1]);
-        exit(0);
-    }
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 1);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
-
-    scan_line = (u_char *) malloc(WIDTH / 8);
-
-    for (i = 0; i < (WIDTH / 8) / 2; i++)
-        scan_line[i] = 0;
-
-    for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)
-        scan_line[i] = 255;
-
-    for (i = 0; i < HEIGHT / 2; i++)
-        TIFFWriteScanline(tif, scan_line, i, 0);
-
-    for (i = 0; i < (WIDTH / 8) / 2; i++)
-        scan_line[i] = 255;
-
-    for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)
-        scan_line[i] = 0;
-
-    for (i = HEIGHT / 2; i < HEIGHT; i++)
-        TIFFWriteScanline(tif, scan_line, i, 0);
-
-    free(scan_line);
-    TIFFClose(tif);
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/dbs/tiff-grayscale.c b/tkimg1.3/libtiff/contrib/dbs/tiff-grayscale.c
deleted file mode 100644
index f3e9484..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/tiff-grayscale.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * tiff-grayscale.c -- create a Class G (grayscale) TIFF file
- *      with a gray response curve in linear optical density
- *
- * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
- *
- *                        All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Digital not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <math.h>
-#include <stdio.h>
-#include <tiffio.h>
-
-#define WIDTH       512
-#define HEIGHT      WIDTH
-
-typedef	unsigned char u_char;
-typedef	unsigned short u_short;
-typedef	unsigned long u_long;
-
-char *              programName;
-void                Usage();
-
-void
-main(argc, argv)
-    int             argc;
-    char **         argv;
-{
-    int             bits_per_pixel, cmsize, i, j, k,
-                    gray_index, chunk_size, nchunks;
-    u_char *        scan_line;
-    u_short *       gray;
-    u_long	    refblackwhite[2*1];
-    TIFF *          tif;
-
-    programName = argv[0];
-
-    if (argc != 4)
-        Usage();
-
-    if (!strcmp(argv[1], "-depth"))
-         bits_per_pixel = atoi(argv[2]);
-    else
-         Usage();
-
-    switch (bits_per_pixel) {
-        case 8:
-            nchunks = 16;
-            chunk_size = 32;
-            break;
-        case 4:
-            nchunks = 4;
-            chunk_size = 128;
-            break;
-        case 2:
-            nchunks = 2;
-            chunk_size = 256;
-            break;
-        default:
-            Usage();
-    }
-
-    cmsize = nchunks * nchunks;
-    gray = (u_short *) malloc(cmsize * sizeof(u_short));
-
-    gray[0] = 3000;
-    for (i = 1; i < cmsize; i++)
-        gray[i] = (u_short) (-log10((double) i / (cmsize - 1)) * 1000);
-
-    refblackwhite[0] = 0;
-    refblackwhite[0] = (1L<<bits_per_pixel) - 1;
-
-    if ((tif = TIFFOpen(argv[3], "w")) == NULL) {
-        fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);
-        exit(0);
-    }
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
-    TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray);
-    TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
-
-    scan_line = (u_char *) malloc(WIDTH / (8 / bits_per_pixel));
-
-    for (i = 0; i < HEIGHT; i++) {
-        for (j = 0, k = 0; j < WIDTH;) {
-            gray_index = (j / chunk_size) + ((i / chunk_size) * nchunks);
-
-            switch (bits_per_pixel) {
-            case 8:
-                scan_line[k++] = gray_index;
-                j++;
-                break;
-            case 4:
-                scan_line[k++] = (gray_index << 4) + gray_index;
-                j += 2;
-                break;
-            case 2:
-                scan_line[k++] = (gray_index << 6) + (gray_index << 4)
-                    + (gray_index << 2) + gray_index;
-                j += 4;
-                break;
-            }
-        }
-        TIFFWriteScanline(tif, scan_line, i, 0);
-    }
-
-    free(scan_line);
-    TIFFClose(tif);
-    exit(0);
-}
-
-void
-Usage()
-{
-    fprintf(stderr, "Usage: %s -depth (8 | 4 | 2) tiff-image\n", programName);
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/dbs/tiff-palette.c b/tkimg1.3/libtiff/contrib/dbs/tiff-palette.c
deleted file mode 100644
index 3c456ff..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/tiff-palette.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * tiff-palette.c -- create a Class P (palette) TIFF file
- *
- * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
- *
- *                        All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Digital not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#include <tiffio.h>
-
-#define WIDTH       512
-#define HEIGHT      WIDTH
-#define SCALE(x)    ((x) * 257L)
-
-typedef	unsigned char u_char;
-typedef	unsigned short u_short;
-
-char *              programName;
-void                Usage();
-
-void
-main(argc, argv)
-    int             argc;
-    char **         argv;
-{
-    int             bits_per_pixel, cmsize, i, j, k,
-                    cmap_index, chunk_size, nchunks;
-    u_char *        scan_line;
-    u_short         *red, *green, *blue;
-    TIFF *          tif;
-
-    programName = argv[0];
-
-    if (argc != 4)
-        Usage();
-
-    if (!strcmp(argv[1], "-depth"))
-         bits_per_pixel = atoi(argv[2]);
-    else
-         Usage();
-
-    switch (bits_per_pixel) {
-        case 8:
-            nchunks = 16;
-            chunk_size = 32;
-            break;
-        case 4:
-            nchunks = 4;
-            chunk_size = 128;
-            break;
-        case 2:
-            nchunks = 2;
-            chunk_size = 256;
-            break;
-	case 1:
-	    nchunks = 2;
-	    chunk_size = 256;
-	    break;
-        default:
-            Usage();
-    }
-
-    if (bits_per_pixel != 1) {
-	cmsize = nchunks * nchunks;
-    } else {
-	cmsize = 2;
-    }
-    red = (u_short *) malloc(cmsize * sizeof(u_short));
-    green = (u_short *) malloc(cmsize * sizeof(u_short));
-    blue = (u_short *) malloc(cmsize * sizeof(u_short));
-
-    switch (bits_per_pixel) {
-    case 8:
-        for (i = 0; i < cmsize; i++) {
-            if (i < 32)
-                red[i] = 0;
-            else if (i < 64)
-                red[i] = SCALE(36);
-            else if (i < 96)
-                red[i] = SCALE(73);
-            else if (i < 128)
-                red[i] = SCALE(109);
-            else if (i < 160)
-                red[i] = SCALE(146);
-            else if (i < 192)
-                red[i] = SCALE(182);
-            else if (i < 224)
-                red[i] = SCALE(219);
-            else if (i < 256)
-                red[i] = SCALE(255);
-
-            if ((i % 32) < 4)
-                green[i] = 0;
-            else if (i < 8)
-                green[i] = SCALE(36);
-            else if ((i % 32) < 12)
-                green[i] = SCALE(73);
-            else if ((i % 32) < 16)
-                green[i] = SCALE(109);
-            else if ((i % 32) < 20)
-                green[i] = SCALE(146);
-            else if ((i % 32) < 24)
-                green[i] = SCALE(182);
-            else if ((i % 32) < 28)
-                green[i] = SCALE(219);
-            else if ((i % 32) < 32)
-                green[i] = SCALE(255);
-
-            if ((i % 4) == 0)
-                blue[i] = SCALE(0);
-            else if ((i % 4) == 1)
-                blue[i] = SCALE(85);
-            else if ((i % 4) == 2)
-                blue[i] = SCALE(170);
-            else if ((i % 4) == 3)
-                blue[i] = SCALE(255);
-        }
-        break;
-    case 4:
-        red[0] = SCALE(255);
-        green[0] = 0;
-        blue[0] = 0;
-
-        red[1] = 0;
-        green[1] = SCALE(255);
-        blue[1] = 0;
-
-        red[2] = 0;
-        green[2] = 0;
-        blue[2] = SCALE(255);
-
-        red[3] = SCALE(255);
-        green[3] = SCALE(255);
-        blue[3] = SCALE(255);
-
-        red[4] = 0;
-        green[4] = SCALE(255);
-        blue[4] = SCALE(255);
-
-        red[5] = SCALE(255);
-        green[5] = 0;
-        blue[5] = SCALE(255);
-
-        red[6] = SCALE(255);
-        green[6] = SCALE(255);
-        blue[6] = 0;
-
-        red[7] = 0;
-        green[7] = 0;
-        blue[7] = 0;
-
-        red[8] = SCALE(176);
-        green[8] = SCALE(224);
-        blue[8] = SCALE(230);
-        red[9] = SCALE(100);
-        green[9] = SCALE(149);
-        blue[9] = SCALE(237);
-        red[10] = SCALE(46);
-        green[10] = SCALE(139);
-        blue[10] = SCALE(87);
-        red[11] = SCALE(160);
-        green[11] = SCALE(82);
-        blue[11] = SCALE(45);
-        red[12] = SCALE(238);
-        green[12] = SCALE(130);
-        blue[12] = SCALE(238);
-        red[13] = SCALE(176);
-        green[13] = SCALE(48);
-        blue[13] = SCALE(96);
-        red[14] = SCALE(50);
-        green[14] = SCALE(205);
-        blue[14] = SCALE(50);
-        red[15] = SCALE(240);
-        green[15] = SCALE(152);
-        blue[15] = SCALE(35);
-        break;
-    case 2:
-        red[0] = SCALE(255);
-        green[0] = 0;
-        blue[0] = 0;
-
-        red[1] = 0;
-        green[1] = SCALE(255);
-        blue[1] = 0;
-
-        red[2] = 0;
-        green[2] = 0;
-        blue[2] = SCALE(255);
-        red[3] = SCALE(255);
-        green[3] = SCALE(255);
-        blue[3] = SCALE(255);
-        break;
-    case 1:
-        red[0] = 0;
-        green[0] = 0;
-        blue[0] = 0;
-
-        red[1] = SCALE(255);
-        green[1] = SCALE(255);
-        blue[1] = SCALE(255);
-        break;
-    }
-
-    if ((tif = TIFFOpen(argv[3], "w")) == NULL) {
-        fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);
-        exit(0);
-    }
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
-    TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
-
-    scan_line = (u_char *) malloc(WIDTH / (8 / bits_per_pixel));
-
-    for (i = 0; i < HEIGHT; i++) {
-        for (j = 0, k = 0; j < WIDTH;) {
-            cmap_index = (j / chunk_size) + ((i / chunk_size) * nchunks);
-
-            switch (bits_per_pixel) {
-            case 8:
-                scan_line[k++] = cmap_index;
-                j++;
-                break;
-            case 4:
-                scan_line[k++] = (cmap_index << 4) + cmap_index;
-                j += 2;
-                break;
-            case 2:
-                scan_line[k++] = (cmap_index << 6) + (cmap_index << 4)
-                    + (cmap_index << 2) + cmap_index;
-                j += 4;
-                break;
-	    case 1:
-		scan_line[k++] =
-			((j / chunk_size) == (i / chunk_size)) ? 0x00 : 0xff;
-		j += 8;
-		break;
-            }
-        }
-        TIFFWriteScanline(tif, scan_line, i, 0);
-    }
-
-    free(scan_line);
-    TIFFClose(tif);
-    exit(0);
-}
-
-void
-Usage()
-{
-    fprintf(stderr, "Usage: %s -depth (8 | 4 | 2 | 1) tiff-image\n", programName);
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/dbs/tiff-rgb.c b/tkimg1.3/libtiff/contrib/dbs/tiff-rgb.c
deleted file mode 100644
index 6930e3a..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/tiff-rgb.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * tiff-rgb.c -- create a 24-bit Class R (rgb) TIFF file
- *
- * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
- *
- *                        All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Digital not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <math.h>
-#include <stdio.h>
-#include <tiffio.h>
-
-#define ROUND(x)    (u_short) ((x) + 0.5)
-#define CMSIZE      256
-#define WIDTH       525
-#define HEIGHT      512
-#define TIFF_GAMMA  2.2
-
-typedef	unsigned char u_char;
-typedef	unsigned short u_short;
-typedef	unsigned long u_long;
-
-void                Usage();
-char *              programName;
-
-void
-main(argc, argv)
-    int             argc;
-    char **         argv;
-{
-    char *          input_file;
-    double          image_gamma;
-    int             i, j;
-    TIFF *          tif;
-    u_char *        scan_line;
-    u_short         red[CMSIZE], green[CMSIZE], blue[CMSIZE];
-    u_long	    refblackwhite[2*3];
-
-    programName = argv[0];
-
-    switch (argc) {
-    case 2:
-        image_gamma = TIFF_GAMMA;
-        input_file = argv[1];
-        break;
-    case 4:
-        if (!strcmp(argv[1], "-gamma")) {
-            image_gamma = atof(argv[2]);
-            input_file = argv[3];
-        } else
-            Usage();
-        break;
-    default:
-        Usage();
-    }
-
-    for (i = 0; i < CMSIZE; i++) {
-        if (i == 0)
-            red[i] = green[i] = blue[i] = 0;
-        else {
-            red[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
-            green[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
-            blue[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
-        }
-    }
-    refblackwhite[0] = 0; refblackwhite[1] = 255;
-    refblackwhite[2] = 0; refblackwhite[3] = 255;
-    refblackwhite[4] = 0; refblackwhite[5] = 255;
-
-    if ((tif = TIFFOpen(input_file, "w")) == NULL) {
-        fprintf(stderr, "can't open %s as a TIFF file\n", input_file);
-        exit(0);
-    }
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
-#ifdef notdef
-    TIFFSetField(tif, TIFFTAG_WHITEPOINT, whitex, whitey);
-    TIFFSetField(tif, TIFFTAG_PRIMARYCHROMATICITIES, primaries);
-#endif
-    TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
-    TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, red, green, blue);
-
-    scan_line = (u_char *) malloc(WIDTH * 3);
-
-    for (i = 0; i < 255; i++) {
-        for (j = 0; j < 75; j++) {
-             scan_line[j * 3] = 255;
-             scan_line[(j * 3) + 1] = 255 - i;
-             scan_line[(j * 3) + 2] = 255 - i;
-        }
-        for (j = 75; j < 150; j++) {
-             scan_line[j * 3] = 255 - i;
-             scan_line[(j * 3) + 1] = 255;
-             scan_line[(j * 3) + 2] = 255 - i;
-        }
-        for (j = 150; j < 225; j++) {
-             scan_line[j * 3] = 255 - i;
-             scan_line[(j * 3) + 1] = 255 - i;
-             scan_line[(j * 3) + 2] = 255;
-        }
-        for (j = 225; j < 300; j++) {
-             scan_line[j * 3] = (i - 1) / 2;
-             scan_line[(j * 3) + 1] = (i - 1) / 2;
-             scan_line[(j * 3) + 2] = (i - 1) / 2;
-        }
-        for (j = 300; j < 375; j++) {
-             scan_line[j * 3] = 255 - i;
-             scan_line[(j * 3) + 1] = 255;
-             scan_line[(j * 3) + 2] = 255;
-        }
-        for (j = 375; j < 450; j++) {
-             scan_line[j * 3] = 255;
-             scan_line[(j * 3) + 1] = 255 - i;
-             scan_line[(j * 3) + 2] = 255;
-        }
-        for (j = 450; j < 525; j++) {
-             scan_line[j * 3] = 255;
-             scan_line[(j * 3) + 1] = 255;
-             scan_line[(j * 3) + 2] = 255 - i;
-        }
-        TIFFWriteScanline(tif, scan_line, i, 0);
-    }
-    for (i = 255; i < 512; i++) {
-        for (j = 0; j < 75; j++) {
-             scan_line[j * 3] = i;
-             scan_line[(j * 3) + 1] = 0;
-             scan_line[(j * 3) + 2] = 0;
-        }
-        for (j = 75; j < 150; j++) {
-             scan_line[j * 3] = 0;
-             scan_line[(j * 3) + 1] = i;
-             scan_line[(j * 3) + 2] = 0;
-        }
-        for (j = 150; j < 225; j++) {
-             scan_line[j * 3] = 0;
-             scan_line[(j * 3) + 1] = 0;
-             scan_line[(j * 3) + 2] = i;
-        }
-        for (j = 225; j < 300; j++) {
-             scan_line[j * 3] = (i - 1) / 2;
-             scan_line[(j * 3) + 1] = (i - 1) / 2;
-             scan_line[(j * 3) + 2] = (i - 1) / 2;
-        }
-        for (j = 300; j < 375; j++) {
-             scan_line[j * 3] = 0;
-             scan_line[(j * 3) + 1] = i;
-             scan_line[(j * 3) + 2] = i;
-        }
-        for (j = 375; j < 450; j++) {
-             scan_line[j * 3] = i;
-             scan_line[(j * 3) + 1] = 0;
-             scan_line[(j * 3) + 2] = i;
-        }
-        for (j = 450; j < 525; j++) {
-             scan_line[j * 3] = i;
-             scan_line[(j * 3) + 1] = i;
-             scan_line[(j * 3) + 2] = 0;
-        }
-        TIFFWriteScanline(tif, scan_line, i, 0);
-    }
-
-    free(scan_line);
-    TIFFClose(tif);
-    exit(0);
-}
-
-void
-Usage()
-{
-    fprintf(stderr, "Usage: %s -gamma gamma tiff-image\n", programName);
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/dbs/xtiff/Imakefile b/tkimg1.3/libtiff/contrib/dbs/xtiff/Imakefile
deleted file mode 100644
index 1aad45a..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/xtiff/Imakefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Imakefile -- to generate a Makefile for xtiff, use:
-#   /usr/local/X11/mit/config/imake \
-#       -I/usr/local/X11/mit/config \
-#       -DTOPDIR=/usr/local/X11/mit \
-#       -DCURDIR=/usr/local/X11/mit \
-#       -DDESTDIR=/usr/local/X11/mit
-#
-
-   SYS_LIBRARIES = -lm
- LOCAL_LIBRARIES = XawClientLibs
-         DEPLIBS = XawClientDepLibs
-            TIFF = ../../../libtiff
- EXTRA_LIBRARIES = $(TIFF)/libtiff.so -lm
-  EXTRA_INCLUDES = -I$(TIFF)
-
-SimpleProgramTarget(xtiff)
diff --git a/tkimg1.3/libtiff/contrib/dbs/xtiff/README b/tkimg1.3/libtiff/contrib/dbs/xtiff/README
deleted file mode 100644
index fa15147..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/xtiff/README
+++ /dev/null
@@ -1,6 +0,0 @@
-xtiff 2.0
-
-xtiff is a tool for viewing a TIFF file in an X window.  It was written to
-handle as many different kinds of TIFF files as possible while remaining
-simple, portable and efficient.  xtiff requires X11 R4, the Athena Widgets
-and Sam Leffler's libtiff package (which can be found on ucbvax.berkeley.edu).
diff --git a/tkimg1.3/libtiff/contrib/dbs/xtiff/patchlevel.h b/tkimg1.3/libtiff/contrib/dbs/xtiff/patchlevel.h
deleted file mode 100644
index 935ec35..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/xtiff/patchlevel.h
+++ /dev/null
@@ -1 +0,0 @@
-#define PATCHLEVEL 0
diff --git a/tkimg1.3/libtiff/contrib/dbs/xtiff/xtiff.c b/tkimg1.3/libtiff/contrib/dbs/xtiff/xtiff.c
deleted file mode 100644
index 918265e..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/xtiff/xtiff.c
+++ /dev/null
@@ -1,1275 +0,0 @@
-/*
- * xtiff - view a TIFF file in an X window
- *
- * Dan Sears
- * Chris Sears
- *
- * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
- *
- *                      All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Digital not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Revision 1.0  90/05/07
- *      Initial release.
- * Revision 2.0  90/12/20
- *      Converted to use the Athena Widgets and the Xt Intrinsics.
- *
- * Notes:
- *
- * According to the TIFF 5.0 Specification, it is possible to have
- * both a TIFFTAG_COLORMAP and a TIFFTAG_COLORRESPONSECURVE.  This
- * doesn't make sense since a TIFFTAG_COLORMAP is 16 bits wide and
- * a TIFFTAG_COLORRESPONSECURVE is tfBitsPerSample bits wide for each
- * channel.  This is probably a bug in the specification.
- * In this case, TIFFTAG_COLORRESPONSECURVE is ignored.
- * This might make sense if TIFFTAG_COLORMAP was 8 bits wide.
- *
- * TIFFTAG_COLORMAP is often incorrectly written as ranging from
- * 0 to 255 rather than from 0 to 65535.  CheckAndCorrectColormap()
- * takes care of this.
- *
- * Only ORIENTATION_TOPLEFT is supported correctly.  This is the
- * default TIFF and X orientation.  Other orientations will be
- * displayed incorrectly.
- *
- * There is no support for or use of 3/3/2 DirectColor visuals.
- * TIFFTAG_MINSAMPLEVALUE and TIFFTAG_MAXSAMPLEVALUE are not supported.
- *
- * Only TIFFTAG_BITSPERSAMPLE values that are 1, 2, 4 or 8 are supported.
- */
-#include <math.h>
-#include <stdio.h>
-#include <tiffio.h>
-#include <X11/Xatom.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xproto.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Label.h>
-#include <X11/cursorfont.h>
-#define XK_MISCELLANY
-#include <X11/keysymdef.h>
-#include "xtifficon.h"
-
-#define TIFF_GAMMA      "2.2"     /* default gamma from the TIFF 5.0 spec */
-#define ROUND(x)        (u_short) ((x) + 0.5)
-#define SCALE(x, s)     (((x) * 65535L) / (s))
-#define MCHECK(m)       if (!m) { fprintf(stderr, "malloc failed\n"); exit(0); }
-#define MIN(a, b)       (((a) < (b)) ? (a) : (b))
-#define MAX(a, b)       (((a) > (b)) ? (a) : (b))
-#define VIEWPORT_WIDTH  700
-#define VIEWPORT_HEIGHT 500
-#define KEY_TRANSLATE   20
-
-#ifdef __STDC__
-#define PP(args)    args
-#else
-#define PP(args)    ()
-#endif
-
-void main PP((int argc, char **argv));
-void OpenTIFFFile PP((void));
-void GetTIFFHeader PP((void));
-void SetNameLabel PP((void));
-void CheckAndCorrectColormap PP((void));
-void SimpleGammaCorrection PP((void));
-void GetVisual PP((void));
-Boolean SearchVisualList PP((int image_depth,
-    int visual_class, Visual **visual));
-void GetTIFFImage PP((void));
-void CreateXImage PP((void));
-XtCallbackProc SelectProc PP((Widget w, caddr_t unused_1, caddr_t unused_2));
-void QuitProc PP((void));
-void NextProc PP((void));
-void PreviousProc PP((void));
-void PageProc PP((int direction));
-void EventProc PP((Widget widget, caddr_t unused, XEvent *event));
-void ResizeProc PP((void));
-int XTiffErrorHandler PP((Display *display, XErrorEvent *error_event));
-void Usage PP((void));
-
-int xtVersion = XtSpecificationRelease;     /* xtiff depends on R4 or higher */
-
-/*
- * Xt data structures
- */
-Widget shellWidget, formWidget, listWidget, labelWidget, imageWidget;
-
-enum { ButtonQuit = 0, ButtonPreviousPage = 1, ButtonNextPage = 2 };
-
-String buttonStrings[] = { "Quit", "Previous", "Next" };
-
-static XrmOptionDescRec shellOptions[] = {
-    { "-help", "*help", XrmoptionNoArg, (caddr_t) "True" },
-    { "-gamma", "*gamma", XrmoptionSepArg, NULL },
-    { "-usePixmap", "*usePixmap", XrmoptionSepArg, NULL },
-    { "-viewportWidth", "*viewportWidth", XrmoptionSepArg, NULL },
-    { "-viewportHeight", "*viewportHeight", XrmoptionSepArg, NULL },
-    { "-translate", "*translate", XrmoptionSepArg, NULL },
-    { "-verbose", "*verbose", XrmoptionSepArg, NULL }
-};
-
-typedef struct {
-    Boolean help;
-    float gamma;
-    Boolean usePixmap;
-    int viewportWidth;
-    int viewportHeight;
-    int translate;
-    Boolean verbose;
-} AppData, *AppDataPtr;
-
-AppData appData;
-
-XtResource clientResources[] = {
-    {
-        "help", XtCBoolean, XtRBoolean, sizeof(Boolean),
-        XtOffset(AppDataPtr, help), XtRImmediate, (XtPointer) False
-    }, {
-        "gamma", "Gamma", XtRFloat, sizeof(float),
-        XtOffset(AppDataPtr, gamma), XtRString, (XtPointer) TIFF_GAMMA
-    }, {
-        "usePixmap", "UsePixmap", XtRBoolean, sizeof(Boolean),
-        XtOffset(AppDataPtr, usePixmap), XtRImmediate, (XtPointer) True
-    }, {
-        "viewportWidth", "ViewportWidth", XtRInt, sizeof(int),
-        XtOffset(AppDataPtr, viewportWidth), XtRImmediate,
-        (XtPointer) VIEWPORT_WIDTH
-    }, {
-        "viewportHeight", "ViewportHeight", XtRInt, sizeof(int),
-        XtOffset(AppDataPtr, viewportHeight), XtRImmediate,
-        (XtPointer) VIEWPORT_HEIGHT
-    }, {
-        "translate", "Translate", XtRInt, sizeof(int),
-        XtOffset(AppDataPtr, translate), XtRImmediate, (XtPointer) KEY_TRANSLATE
-    }, {
-        "verbose", "Verbose", XtRBoolean, sizeof(Boolean),
-        XtOffset(AppDataPtr, verbose), XtRImmediate, (XtPointer) True
-    }
-};
-
-Arg formArgs[] = {
-    { XtNresizable, True }
-};
-
-Arg listArgs[] = {
-    { XtNresizable, False },
-    { XtNborderWidth, 0 },
-    { XtNdefaultColumns, 3 },
-    { XtNforceColumns, True },
-    { XtNlist, (int) buttonStrings },
-    { XtNnumberStrings, XtNumber(buttonStrings) },
-    { XtNtop, XtChainTop },
-    { XtNleft, XtChainLeft },
-    { XtNbottom, XtChainTop },
-    { XtNright, XtChainLeft }
-};
-
-Arg labelArgs[] = {
-    { XtNresizable, False },
-    { XtNwidth, 200 },
-    { XtNborderWidth, 0 },
-    { XtNjustify, XtJustifyLeft },
-    { XtNtop, XtChainTop },
-    { XtNleft, XtChainLeft },
-    { XtNbottom, XtChainTop },
-    { XtNright, XtChainLeft }
-};
-
-Arg imageArgs[] = {
-    { XtNresizable, True },
-    { XtNborderWidth, 0 },
-    { XtNtop, XtChainTop },
-    { XtNleft, XtChainLeft },
-    { XtNbottom, XtChainTop },
-    { XtNright, XtChainLeft }
-};
-
-XtActionsRec actionsTable[] = {
-    { "quit", QuitProc },
-    { "next", NextProc },
-    { "previous", PreviousProc },
-    { "notifyresize", ResizeProc }
-};
-
-char translationsTable[] = "<Key>q:      quit() \n \
-                            <Key>Q:      quit() \n \
-                            <Message>WM_PROTOCOLS: quit()\n \
-                            <Key>p:      previous() \n \
-                            <Key>P:      previous() \n \
-                            <Key>n:      next() \n \
-                            <Key>N:      next() \n \
-                            <Configure>: notifyresize()";
-
-/*
- * X data structures
- */
-Colormap            xColormap;
-Display *           xDisplay;
-Pixmap              xImagePixmap;
-Visual *            xVisual;
-XImage *            xImage;
-GC                  xWinGc;
-int                 xImageDepth, xScreen, xRedMask, xGreenMask, xBlueMask,
-                    xOffset = 0, yOffset = 0, grabX = -1, grabY = -1;
-u_char              basePixel = 0;
-
-/*
- * TIFF data structures
- */
-TIFF *              tfFile = NULL;
-u_long              tfImageWidth, tfImageHeight;
-u_short             tfBitsPerSample, tfSamplesPerPixel, tfPlanarConfiguration,
-                    tfPhotometricInterpretation, tfGrayResponseUnit,
-                    tfImageDepth, tfBytesPerRow;
-int                 tfDirectory = 0, tfMultiPage = False;
-double              tfUnitMap, tfGrayResponseUnitMap[] = {
-                        -1, -10, -100, -1000, -10000, -100000
-                    };
-
-/*
- * display data structures
- */
-double              *dRed, *dGreen, *dBlue;
-
-/*
- * shared data structures
- */
-u_short *           redMap = NULL, *greenMap = NULL, *blueMap = NULL,
-                    *grayMap = NULL, colormapSize;
-u_char *            imageMemory;
-char *              fileName;
-
-void
-main(argc, argv)
-    int argc;
-    char ** argv;
-{
-    XSetWindowAttributes window_attributes;
-    Widget widget_list[3];
-    Arg args[5];
-
-    setbuf(stdout, NULL); setbuf(stderr, NULL);
-
-    shellWidget = XtInitialize(argv[0], "XTiff", shellOptions,
-        XtNumber(shellOptions), &argc, argv);
-
-    XSetErrorHandler(XTiffErrorHandler);
-
-    XtGetApplicationResources(shellWidget, &appData,
-        (XtResourceList) clientResources, (Cardinal) XtNumber(clientResources),
-        (ArgList) NULL, (Cardinal) 0);
-
-    if ((argc <= 1) || (argc > 2) || appData.help)
-        Usage();
-
-    if (appData.verbose == False) {
-        TIFFSetErrorHandler(0);
-        TIFFSetWarningHandler(0);
-    }
-
-    fileName = argv[1];
-
-    xDisplay = XtDisplay(shellWidget);
-    xScreen = DefaultScreen(xDisplay);
-
-    OpenTIFFFile();
-    GetTIFFHeader();
-    SimpleGammaCorrection();
-    GetVisual();
-    GetTIFFImage();
-
-    /*
-     * Send visual, colormap, depth and iconPixmap to shellWidget.
-     * Sending the visual to the shell is only possible with the advent of R4.
-     */
-    XtSetArg(args[0], XtNvisual, xVisual);
-    XtSetArg(args[1], XtNcolormap, xColormap);
-    XtSetArg(args[2], XtNdepth,
-        xImageDepth == 1 ? DefaultDepth(xDisplay, xScreen) : xImageDepth);
-    XtSetArg(args[3], XtNiconPixmap,
-        XCreateBitmapFromData(xDisplay, RootWindow(xDisplay, xScreen),
-            xtifficon_bits, xtifficon_width, xtifficon_height));
-    XtSetArg(args[4], XtNallowShellResize, True);
-    XtSetValues(shellWidget, args, 5);
-
-    /*
-     * widget instance hierarchy
-     */
-    formWidget = XtCreateManagedWidget("form", formWidgetClass,
-        shellWidget, formArgs, XtNumber(formArgs));
-
-        widget_list[0] = listWidget = XtCreateWidget("list",
-            listWidgetClass, formWidget, listArgs, XtNumber(listArgs));
-
-        widget_list[1] = labelWidget = XtCreateWidget("label",
-            labelWidgetClass, formWidget, labelArgs, XtNumber(labelArgs));
-
-        widget_list[2] = imageWidget = XtCreateWidget("image",
-            widgetClass, formWidget, imageArgs, XtNumber(imageArgs));
-
-    XtManageChildren(widget_list, XtNumber(widget_list));
-
-    /*
-     * initial widget sizes - for small images let xtiff size itself
-     */
-    if (tfImageWidth >= appData.viewportWidth) {
-        XtSetArg(args[0], XtNwidth, appData.viewportWidth);
-        XtSetValues(shellWidget, args, 1);
-    }
-    if (tfImageHeight >= appData.viewportHeight) {
-        XtSetArg(args[0], XtNheight, appData.viewportHeight);
-        XtSetValues(shellWidget, args, 1);
-    }
-
-    XtSetArg(args[0], XtNwidth, tfImageWidth);
-    XtSetArg(args[1], XtNheight, tfImageHeight);
-    XtSetValues(imageWidget, args, 2);
-
-    /*
-     * formWidget uses these constraints but they are stored in the children.
-     */
-    XtSetArg(args[0], XtNfromVert, listWidget);
-    XtSetValues(imageWidget, args, 1);
-    XtSetArg(args[0], XtNfromHoriz, listWidget);
-    XtSetValues(labelWidget, args, 1);
-
-    SetNameLabel();
-
-    XtAddCallback(listWidget, XtNcallback, (XtCallbackProc) SelectProc,
-        (XtPointer) NULL);
-
-    XtAddActions(actionsTable, XtNumber(actionsTable));
-    XtSetArg(args[0], XtNtranslations,
-        XtParseTranslationTable(translationsTable));
-    XtSetValues(formWidget, &args[0], 1);
-    XtSetValues(imageWidget, &args[0], 1);
-
-    /*
-     * This is intended to be a little faster than going through
-     * the translation manager.
-     */
-    XtAddEventHandler(imageWidget, ExposureMask | ButtonPressMask
-        | ButtonReleaseMask | Button1MotionMask | KeyPressMask,
-        False, EventProc, NULL);
-
-    XtRealizeWidget(shellWidget);
-
-    window_attributes.cursor = XCreateFontCursor(xDisplay, XC_fleur);
-    XChangeWindowAttributes(xDisplay, XtWindow(imageWidget),
-        CWCursor, &window_attributes);
-
-    CreateXImage();
-
-    XtMainLoop();
-}
-
-void
-OpenTIFFFile()
-{
-    if (tfFile != NULL)
-        TIFFClose(tfFile);
-
-    if ((tfFile = TIFFOpen(fileName, "r")) == NULL) {
-	fprintf(appData.verbose ? stderr : stdout,
-	    "xtiff: can't open %s as a TIFF file\n", fileName);
-        exit(0);
-    }
-
-    tfMultiPage = (TIFFLastDirectory(tfFile) ? False : True);
-}
-
-void
-GetTIFFHeader()
-{
-    register int i;
-
-    if (!TIFFSetDirectory(tfFile, tfDirectory)) {
-        fprintf(stderr, "xtiff: can't seek to directory %d in %s\n",
-            tfDirectory, fileName);
-        exit(0);
-    }
-
-    TIFFGetField(tfFile, TIFFTAG_IMAGEWIDTH, &tfImageWidth);
-    TIFFGetField(tfFile, TIFFTAG_IMAGELENGTH, &tfImageHeight);
-
-    /*
-     * If the following tags aren't present then use the TIFF defaults.
-     */
-    TIFFGetFieldDefaulted(tfFile, TIFFTAG_BITSPERSAMPLE, &tfBitsPerSample);
-    TIFFGetFieldDefaulted(tfFile, TIFFTAG_SAMPLESPERPIXEL, &tfSamplesPerPixel);
-    TIFFGetFieldDefaulted(tfFile, TIFFTAG_PLANARCONFIG, &tfPlanarConfiguration);
-    TIFFGetFieldDefaulted(tfFile, TIFFTAG_GRAYRESPONSEUNIT, &tfGrayResponseUnit);
-
-    tfUnitMap = tfGrayResponseUnitMap[tfGrayResponseUnit];
-    colormapSize = 1 << tfBitsPerSample;
-    tfImageDepth = tfBitsPerSample * tfSamplesPerPixel;
-
-    dRed = (double *) malloc(colormapSize * sizeof(double));
-    dGreen = (double *) malloc(colormapSize * sizeof(double));
-    dBlue = (double *) malloc(colormapSize * sizeof(double));
-    MCHECK(dRed); MCHECK(dGreen); MCHECK(dBlue);
-
-    /*
-     * If TIFFTAG_PHOTOMETRIC is not present then assign a reasonable default.
-     * The TIFF 5.0 specification doesn't give a default.
-     */
-    if (!TIFFGetField(tfFile, TIFFTAG_PHOTOMETRIC,
-            &tfPhotometricInterpretation)) {
-        if (tfSamplesPerPixel != 1)
-            tfPhotometricInterpretation = PHOTOMETRIC_RGB;
-        else if (tfBitsPerSample == 1)
-            tfPhotometricInterpretation = PHOTOMETRIC_MINISBLACK;
-        else if (TIFFGetField(tfFile, TIFFTAG_COLORMAP,
-                &redMap, &greenMap, &blueMap)) {
-            tfPhotometricInterpretation = PHOTOMETRIC_PALETTE;
-            redMap = greenMap = blueMap = NULL;
-        } else
-            tfPhotometricInterpretation = PHOTOMETRIC_MINISBLACK;
-    }
-
-    /*
-     * Given TIFFTAG_PHOTOMETRIC extract or create the response curves.
-     */
-    switch (tfPhotometricInterpretation) {
-    case PHOTOMETRIC_RGB:
-	redMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-	greenMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-	blueMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-	MCHECK(redMap); MCHECK(greenMap); MCHECK(blueMap);
-	for (i = 0; i < colormapSize; i++)
-	    dRed[i] = dGreen[i] = dBlue[i]
-		= (double) SCALE(i, colormapSize - 1);
-        break;
-    case PHOTOMETRIC_PALETTE:
-        if (!TIFFGetField(tfFile, TIFFTAG_COLORMAP,
-                &redMap, &greenMap, &blueMap)) {
-            redMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-            greenMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-            blueMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-            MCHECK(redMap); MCHECK(greenMap); MCHECK(blueMap);
-            for (i = 0; i < colormapSize; i++)
-                dRed[i] = dGreen[i] = dBlue[i]
-                    = (double) SCALE(i, colormapSize - 1);
-        } else {
-            CheckAndCorrectColormap();
-            for (i = 0; i < colormapSize; i++) {
-                dRed[i] = (double) redMap[i];
-                dGreen[i] = (double) greenMap[i];
-                dBlue[i] = (double) blueMap[i];
-            }
-        }
-        break;
-    case PHOTOMETRIC_MINISWHITE:
-        redMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        greenMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        blueMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        MCHECK(redMap); MCHECK(greenMap); MCHECK(blueMap);
-	for (i = 0; i < colormapSize; i++)
-	    dRed[i] = dGreen[i] = dBlue[i] = (double)
-		 SCALE(colormapSize-1-i, colormapSize-1);
-        break;
-    case PHOTOMETRIC_MINISBLACK:
-        redMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        greenMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        blueMap = (u_short *) malloc(colormapSize * sizeof(u_short));
-        MCHECK(redMap); MCHECK(greenMap); MCHECK(blueMap);
-	for (i = 0; i < colormapSize; i++)
-	    dRed[i] = dGreen[i] = dBlue[i] = (double) SCALE(i, colormapSize-1);
-        break;
-    default:
-        fprintf(stderr,
-            "xtiff: can't display photometric interpretation type %d\n",
-            tfPhotometricInterpretation);
-        exit(0);
-    }
-}
-
-void
-SetNameLabel()
-{
-    char buffer[BUFSIZ];
-    Arg args[1];
-
-    if (tfMultiPage)
-        sprintf(buffer, "%s - page %d", fileName, tfDirectory);
-    else
-        strcpy(buffer, fileName);
-    XtSetArg(args[0], XtNlabel, buffer);
-    XtSetValues(labelWidget, args, 1);
-}
-
-/*
- * Many programs get TIFF colormaps wrong.  They use 8-bit colormaps instead of
- * 16-bit colormaps.  This function is a heuristic to detect and correct this.
- */
-void
-CheckAndCorrectColormap()
-{
-    register int i;
-
-    for (i = 0; i < colormapSize; i++)
-        if ((redMap[i] > 255) || (greenMap[i] > 255) || (blueMap[i] > 255))
-            return;
-
-    for (i = 0; i < colormapSize; i++) {
-        redMap[i] = SCALE(redMap[i], 255);
-        greenMap[i] = SCALE(greenMap[i], 255);
-        blueMap[i] = SCALE(blueMap[i], 255);
-    }
-    TIFFWarning(fileName, "Assuming 8-bit colormap");
-}
-
-void
-SimpleGammaCorrection()
-{
-    register int i;
-    register double i_gamma = 1.0 / appData.gamma;
-
-    for (i = 0; i < colormapSize; i++) {
-        if (((tfPhotometricInterpretation == PHOTOMETRIC_MINISWHITE)
-            && (i == colormapSize - 1))
-            || ((tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK)
-            && (i == 0)))
-            redMap[i] = greenMap[i] = blueMap[i] = 0;
-        else {
-            redMap[i] = ROUND((pow(dRed[i] / 65535.0, i_gamma) * 65535.0));
-            greenMap[i] = ROUND((pow(dGreen[i] / 65535.0, i_gamma) * 65535.0));
-            blueMap[i] = ROUND((pow(dBlue[i] / 65535.0, i_gamma) * 65535.0));
-        }
-    }
-
-    free(dRed); free(dGreen); free(dBlue);
-}
-
-static char* classNames[] = {
-    "StaticGray",
-    "GrayScale",
-    "StaticColor",
-    "PseudoColor",
-    "TrueColor",
-    "DirectColor"
-};
-
-/*
- * Current limitation: the visual is set initially by the first file.
- * It cannot be changed.
- */
-void
-GetVisual()
-{
-    register XColor *colors = NULL;
-    register u_long *pixels = NULL;
-    register int i;
-
-    switch (tfImageDepth) {
-    /*
-     * X really wants a 32-bit image with the fourth channel unused,
-     * but the visual structure thinks it's 24-bit.  bitmap_unit is 32.
-     */
-    case 32:
-    case 24:
-        if (SearchVisualList(24, DirectColor, &xVisual) == False) {
-            fprintf(stderr, "xtiff: 24-bit DirectColor visual not available\n");
-            exit(0);
-        }
-
-        colors = (XColor *) malloc(3 * colormapSize * sizeof(XColor));
-        MCHECK(colors);
-
-        for (i = 0; i < colormapSize; i++) {
-            colors[i].pixel = (u_long) (i << 16) + (i << 8) + i;
-            colors[i].red = redMap[i];
-            colors[i].green = greenMap[i];
-            colors[i].blue = blueMap[i];
-            colors[i].flags = DoRed | DoGreen | DoBlue;
-        }
-
-        xColormap = XCreateColormap(xDisplay, RootWindow(xDisplay, xScreen),
-            xVisual, AllocAll);
-        XStoreColors(xDisplay, xColormap, colors, colormapSize);
-        break;
-    case 8:
-    case 4:
-    case 2:
-        /*
-         * We assume that systems with 24-bit visuals also have 8-bit visuals.
-         * We don't promote from 8-bit PseudoColor to 24/32 bit DirectColor.
-         */
-        switch (tfPhotometricInterpretation) {
-        case PHOTOMETRIC_MINISWHITE:
-        case PHOTOMETRIC_MINISBLACK:
-            if (SearchVisualList((int) tfImageDepth, GrayScale, &xVisual) == True)
-                break;
-        case PHOTOMETRIC_PALETTE:
-            if (SearchVisualList((int) tfImageDepth, PseudoColor, &xVisual) == True)
-                break;
-        default:
-            fprintf(stderr, "xtiff: Unsupported TIFF/X configuration\n");
-            exit(0);
-        }
-
-        colors = (XColor *) malloc(colormapSize * sizeof(XColor));
-        MCHECK(colors);
-
-        for (i = 0; i < colormapSize; i++) {
-            colors[i].pixel = (u_long) i;
-            colors[i].red = redMap[i];
-            colors[i].green = greenMap[i];
-            colors[i].blue = blueMap[i];
-            colors[i].flags = DoRed | DoGreen | DoBlue;
-        }
-
-        /*
-         * xtiff's colormap allocation is private.  It does not attempt
-         * to detect whether any existing colormap entries are suitable
-         * for its use.  This will cause colormap flashing.  Furthermore,
-         * background and foreground are taken from the environment.
-         * For example, the foreground color may be red when the visual
-         * is GrayScale.  If the colormap is completely populated,
-         * Xt will not be able to allocate fg and bg.
-         */
-        if (tfImageDepth == 8)
-            xColormap = XCreateColormap(xDisplay, RootWindow(xDisplay, xScreen),
-                xVisual, AllocAll);
-        else {
-            xColormap = XCreateColormap(xDisplay, RootWindow(xDisplay, xScreen),
-                xVisual, AllocNone);
-            pixels = (u_long *) malloc(colormapSize * sizeof(u_long));
-            MCHECK(pixels);
-            (void) XAllocColorCells(xDisplay, xColormap, True,
-                NULL, 0, pixels, colormapSize);
-            basePixel = (u_char) pixels[0];
-            free(pixels);
-        }
-        XStoreColors(xDisplay, xColormap, colors, colormapSize);
-        break;
-    case 1:
-        xImageDepth = 1;
-        xVisual = DefaultVisual(xDisplay, xScreen);
-        xColormap = DefaultColormap(xDisplay, xScreen);
-        break;
-    default:
-        fprintf(stderr, "xtiff: unsupported image depth %d\n", tfImageDepth);
-        exit(0);
-    }
-
-    if (appData.verbose == True)
-	fprintf(stderr, "%s: Using %d-bit %s visual.\n",
-	    fileName, xImageDepth, classNames[xVisual->class]);
-
-    if (colors != NULL)
-        free(colors);
-    if (grayMap != NULL)
-        free(grayMap);
-    if (redMap != NULL)
-        free(redMap);
-    if (greenMap != NULL)
-        free(greenMap);
-    if (blueMap != NULL)
-        free(blueMap);
-
-    colors = NULL; grayMap = redMap = greenMap = blueMap = NULL;
-}
-
-/*
- * Search for an appropriate visual.  Promote where necessary.
- * Check to make sure that ENOUGH colormap entries are writeable.
- * basePixel was determined when XAllocColorCells() contiguously
- * allocated enough entries.  basePixel is used below in GetTIFFImage.
- */
-Boolean
-SearchVisualList(image_depth, visual_class, visual)
-    int image_depth, visual_class;
-    Visual **visual;
-{
-    XVisualInfo template_visual, *visual_list, *vl;
-    int i, n_visuals;
-
-    template_visual.screen = xScreen;
-    vl = visual_list = XGetVisualInfo(xDisplay, VisualScreenMask,
-        &template_visual, &n_visuals);
-
-    if (n_visuals == 0) {
-        fprintf(stderr, "xtiff: visual list not available\n");
-        exit(0);
-    }
-
-    for (i = 0; i < n_visuals; vl++, i++) {
-        if ((vl->class == visual_class) && (vl->depth >= image_depth)
-            && (vl->visual->map_entries >= (1 << vl->depth))) {
-            *visual = vl->visual;
-            xImageDepth = vl->depth;
-            xRedMask = vl->red_mask;
-            xGreenMask = vl->green_mask;
-            xBlueMask = vl->blue_mask;
-            XFree((char *) visual_list);
-            return True;
-        }
-    }
-
-    XFree((char *) visual_list);
-    return False;
-}
-
-void
-GetTIFFImage()
-{
-    int pixel_map[3], red_shift, green_shift, blue_shift;
-    register u_char *scan_line, *output_p, *input_p;
-    register int i, j, s;
-
-    scan_line = (u_char *) malloc(tfBytesPerRow = TIFFScanlineSize(tfFile));
-    MCHECK(scan_line);
-
-    if ((tfImageDepth == 32) || (tfImageDepth == 24)) {
-        output_p = imageMemory = (u_char *)
-            malloc(tfImageWidth * tfImageHeight * 4);
-        MCHECK(imageMemory);
-
-        /*
-         * Handle different color masks for different frame buffers.
-         */
-        if (ImageByteOrder(xDisplay) == LSBFirst) { /* DECstation 5000 */
-            red_shift = pixel_map[0] = xRedMask == 0xFF000000 ? 3
-                : (xRedMask == 0xFF0000 ? 2 : (xRedMask == 0xFF00 ? 1 : 0));
-            green_shift = pixel_map[1] = xGreenMask == 0xFF000000 ? 3
-                : (xGreenMask == 0xFF0000 ? 2 : (xGreenMask == 0xFF00 ? 1 : 0));
-            blue_shift = pixel_map[2] = xBlueMask == 0xFF000000 ? 3
-                : (xBlueMask == 0xFF0000 ? 2 : (xBlueMask == 0xFF00 ? 1 : 0));
-        } else { /* Ardent */
-            red_shift = pixel_map[0] = xRedMask == 0xFF000000 ? 0
-                : (xRedMask == 0xFF0000 ? 1 : (xRedMask == 0xFF00 ? 2 : 3));
-            green_shift = pixel_map[0] = xGreenMask == 0xFF000000 ? 0
-                : (xGreenMask == 0xFF0000 ? 1 : (xGreenMask == 0xFF00 ? 2 : 3));
-            blue_shift = pixel_map[0] = xBlueMask == 0xFF000000 ? 0
-                : (xBlueMask == 0xFF0000 ? 1 : (xBlueMask == 0xFF00 ? 2 : 3));
-        }
-
-        if (tfPlanarConfiguration == PLANARCONFIG_CONTIG) {
-            for (i = 0; i < tfImageHeight; i++) {
-                if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0)
-                    break;
-                for (input_p = scan_line, j = 0; j < tfImageWidth; j++) {
-                    *(output_p + red_shift) = *input_p++;
-                    *(output_p + green_shift) = *input_p++;
-                    *(output_p + blue_shift) = *input_p++;
-                    output_p += 4;
-                    if (tfSamplesPerPixel == 4) /* skip the fourth channel */
-                        input_p++;
-                }
-            }
-        } else {
-            for (s = 0; s < tfSamplesPerPixel; s++) {
-                if (s == 3)             /* skip the fourth channel */
-                    continue;
-                for (i = 0; i < tfImageHeight; i++) {
-                    if (TIFFReadScanline(tfFile, scan_line, i, s) < 0)
-                        break;
-                    input_p = scan_line;
-                    output_p = imageMemory + (i*tfImageWidth*4) + pixel_map[s];
-                    for (j = 0; j < tfImageWidth; j++, output_p += 4)
-                        *output_p = *input_p++;
-                }
-            }
-        }
-    } else {
-        if (xImageDepth == tfImageDepth) {
-            output_p = imageMemory = (u_char *)
-                malloc(tfBytesPerRow * tfImageHeight);
-            MCHECK(imageMemory);
-
-            for (i = 0; i < tfImageHeight; i++, output_p += tfBytesPerRow)
-                if (TIFFReadScanline(tfFile, output_p, i, 0) < 0)
-                    break;
-        } else if ((xImageDepth == 8) && (tfImageDepth == 4)) {
-            output_p = imageMemory = (u_char *)
-                malloc(tfBytesPerRow * 2 * tfImageHeight + 2);
-            MCHECK(imageMemory);
-
-            /*
-             * If a scanline is of odd size the inner loop below will overshoot.
-             * This is handled very simply by recalculating the start point at
-             * each scanline and padding imageMemory a little at the end.
-             */
-            for (i = 0; i < tfImageHeight; i++) {
-                if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0)
-                    break;
-                output_p = &imageMemory[i * tfImageWidth];
-                input_p = scan_line;
-                for (j = 0; j < tfImageWidth; j += 2, input_p++) {
-                    *output_p++ = (*input_p >> 4) + basePixel;
-                    *output_p++ = (*input_p & 0xf) + basePixel;
-                }
-            }
-        } else if ((xImageDepth == 8) && (tfImageDepth == 2)) {
-            output_p = imageMemory = (u_char *)
-                malloc(tfBytesPerRow * 4 * tfImageHeight + 4);
-            MCHECK(imageMemory);
-
-            for (i = 0; i < tfImageHeight; i++) {
-                if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0)
-                    break;
-                output_p = &imageMemory[i * tfImageWidth];
-                input_p = scan_line;
-                for (j = 0; j < tfImageWidth; j += 4, input_p++) {
-                    *output_p++ = (*input_p >> 6) + basePixel;
-                    *output_p++ = ((*input_p >> 4) & 3) + basePixel;
-                    *output_p++ = ((*input_p >> 2) & 3) + basePixel;
-                    *output_p++ = (*input_p & 3) + basePixel;
-                }
-            }
-        } else if ((xImageDepth == 4) && (tfImageDepth == 2)) {
-            output_p = imageMemory = (u_char *)
-                malloc(tfBytesPerRow * 2 * tfImageHeight + 2);
-            MCHECK(imageMemory);
-
-            for (i = 0; i < tfImageHeight; i++) {
-                if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0)
-                    break;
-                output_p = &imageMemory[i * tfBytesPerRow * 2];
-                input_p = scan_line;
-                for (j = 0; j < tfImageWidth; j += 4, input_p++) {
-                    *output_p++ = (((*input_p>>6) << 4)
-                        | ((*input_p >> 4) & 3)) + basePixel;
-                    *output_p++ = ((((*input_p>>2) & 3) << 4)
-                        | (*input_p & 3)) + basePixel;
-                }
-            }
-        } else {
-            fprintf(stderr,
-                "xtiff: can't handle %d-bit TIFF file on an %d-bit display\n",
-                tfImageDepth, xImageDepth);
-            exit(0);
-        }
-    }
-
-    free(scan_line);
-}
-
-void
-CreateXImage()
-{
-    XGCValues gc_values;
-    GC bitmap_gc;
-
-    xOffset = yOffset = 0;
-    grabX = grabY = -1;
-
-    xImage = XCreateImage(xDisplay, xVisual, xImageDepth,
-        xImageDepth == 1 ? XYBitmap : ZPixmap, /* offset */ 0,
-        (char *) imageMemory, tfImageWidth, tfImageHeight,
-        /* bitmap_pad */ 8, /* bytes_per_line */ 0);
-
-    /*
-     * libtiff converts LSB data into MSB but doesn't change the FillOrder tag.
-     */
-    if (xImageDepth == 1)
-        xImage->bitmap_bit_order = MSBFirst;
-    if (xImageDepth <= 8)
-        xImage->byte_order = MSBFirst;
-
-    /*
-     * create an appropriate GC
-     */
-    gc_values.function = GXcopy;
-    gc_values.plane_mask = AllPlanes;
-    if (tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK) {
-        gc_values.foreground = XWhitePixel(xDisplay, xScreen);
-        gc_values.background = XBlackPixel(xDisplay, xScreen);
-    } else {
-        gc_values.foreground = XBlackPixel(xDisplay, xScreen);
-        gc_values.background = XWhitePixel(xDisplay, xScreen);
-    }
-    xWinGc = XCreateGC(xDisplay, XtWindow(shellWidget),
-        GCFunction | GCPlaneMask | GCForeground | GCBackground, &gc_values);
-
-    /*
-     * create the pixmap and load the image
-     */
-    if (appData.usePixmap == True) {
-        xImagePixmap = XCreatePixmap(xDisplay, RootWindow(xDisplay, xScreen),
-            xImage->width, xImage->height, xImageDepth);
-
-        /*
-         * According to the O'Reilly X Protocol Reference Manual, page 53,
-         * "A pixmap depth of one is always supported and listed, but windows
-         * of depth one might not be supported."  Therefore we create a pixmap
-         * of depth one and use XCopyPlane().  This is idiomatic.
-         */
-        if (xImageDepth == 1) {         /* just pass the bits through */
-            gc_values.foreground = 1;   /* foreground describes set bits */
-            gc_values.background = 0;   /* background describes clear bits */
-            bitmap_gc = XCreateGC(xDisplay, xImagePixmap,
-                GCForeground | GCBackground, &gc_values);
-            XPutImage(xDisplay, xImagePixmap, bitmap_gc, xImage,
-                0, 0, 0, 0, xImage->width, xImage->height);
-        } else
-            XPutImage(xDisplay, xImagePixmap, xWinGc, xImage,
-                0, 0, 0, 0, xImage->width, xImage->height);
-        XDestroyImage(xImage);
-        free(imageMemory);
-    }
-}
-
-XtCallbackProc
-SelectProc(w, unused_1, unused_2)
-    Widget w;
-    caddr_t unused_1;
-    caddr_t unused_2;
-{
-    XawListReturnStruct *list_return;
-
-    list_return = XawListShowCurrent(w);
-
-    switch (list_return->list_index) {
-    case ButtonQuit:
-        QuitProc();
-        break;
-    case ButtonPreviousPage:
-        PreviousProc();
-        break;
-    case ButtonNextPage:
-        NextProc();
-        break;
-    default:
-        fprintf(stderr, "error in SelectProc\n");
-        exit(0);
-    }
-    XawListUnhighlight(w);
-}
-
-void
-QuitProc(void)
-{
-    exit(0);
-}
-
-void
-NextProc()
-{
-    PageProc(ButtonNextPage);
-}
-
-void
-PreviousProc()
-{
-    PageProc(ButtonPreviousPage);
-}
-
-void
-PageProc(direction)
-    int direction;
-{
-    XEvent fake_event;
-    Arg args[4];
-
-    switch (direction) {
-    case ButtonPreviousPage:
-        if (tfDirectory > 0)
-            TIFFSetDirectory(tfFile, --tfDirectory);
-        else
-            return;
-        break;
-    case ButtonNextPage:
-        if (TIFFReadDirectory(tfFile) == True)
-            tfDirectory++;
-        else
-            return;
-        break;
-    default:
-        fprintf(stderr, "error in PageProc\n");
-        exit(0);
-    }
-
-    xOffset = yOffset = 0;
-    grabX = grabY = -1;
-
-    GetTIFFHeader();
-    SetNameLabel();
-    GetTIFFImage();
-
-    if (appData.usePixmap == True)
-        XFreePixmap(xDisplay, xImagePixmap);
-    else
-        XDestroyImage(xImage);
-
-    CreateXImage();
-
-    /*
-     * Using XtSetValues() to set the widget size causes a resize.
-     * This resize gets propagated up to the parent shell.
-     * In order to disable this visually disconcerting effect,
-     * shell resizing is temporarily disabled.
-     */
-    XtSetArg(args[0], XtNallowShellResize, False);
-    XtSetValues(shellWidget, args, 1);
-
-    XtSetArg(args[0], XtNwidth, tfImageWidth);
-    XtSetArg(args[1], XtNheight, tfImageHeight);
-    XtSetValues(imageWidget, args, 2);
-
-    XtSetArg(args[0], XtNallowShellResize, True);
-    XtSetValues(shellWidget, args, 1);
-
-    XClearWindow(xDisplay, XtWindow(imageWidget));
-
-    fake_event.type = Expose;
-    fake_event.xexpose.x = fake_event.xexpose.y = 0;
-    fake_event.xexpose.width = tfImageWidth;    /* the window will clip */
-    fake_event.xexpose.height = tfImageHeight;
-    EventProc(imageWidget, NULL, &fake_event);
-}
-
-void
-EventProc(widget, unused, event)
-    Widget widget;
-    caddr_t unused;
-    XEvent *event;
-{
-    int ih, iw, ww, wh, sx, sy, w, h, dx, dy;
-    Dimension w_width, w_height;
-    XEvent next_event;
-    Arg args[2];
-
-    if (event->type == MappingNotify) {
-        XRefreshKeyboardMapping((XMappingEvent *) event);
-        return;
-    }
-
-    if (!XtIsRealized(widget))
-        return;
-
-    if ((event->type == ButtonPress) || (event->type == ButtonRelease))
-        if (event->xbutton.button != Button1)
-            return;
-
-    iw = tfImageWidth;  /* avoid sign problems */
-    ih = tfImageHeight;
-
-    /*
-     * The grabX and grabY variables record where the user grabbed the image.
-     * They also record whether the mouse button is down or not.
-     */
-    if (event->type == ButtonPress) {
-        grabX = event->xbutton.x;
-        grabY = event->xbutton.y;
-        return;
-    }
-
-    /*
-     * imageWidget is a Core widget and doesn't get resized.
-     * So we calculate the size of its viewport here.
-     */
-    XtSetArg(args[0], XtNwidth, &w_width);
-    XtSetArg(args[1], XtNheight, &w_height);
-    XtGetValues(shellWidget, args, 2);
-    ww = w_width;
-    wh = w_height;
-    XtGetValues(listWidget, args, 2);
-    wh -= w_height;
-
-    switch (event->type) {
-    case Expose:
-        dx = event->xexpose.x;
-        dy = event->xexpose.y;
-        sx = dx + xOffset;
-        sy = dy + yOffset;
-        w = MIN(event->xexpose.width, iw);
-        h = MIN(event->xexpose.height, ih);
-        break;
-    case KeyPress:
-        if ((grabX >= 0) || (grabY >= 0)) /* Mouse button is still down */
-            return;
-        switch (XLookupKeysym((XKeyEvent *) event, /* KeySyms index */ 0)) {
-        case XK_Up:
-            if (ih < wh)    /* Don't scroll if the window fits the image. */
-                return;
-            sy = yOffset + appData.translate;
-            sy = MIN(ih - wh, sy);
-            if (sy == yOffset)  /* Filter redundant stationary refreshes. */
-                return;
-            yOffset = sy;
-            sx = xOffset;
-            dx = dy = 0;
-            w = ww; h = wh;
-            break;
-        case XK_Down:
-            if (ih < wh)
-                return;
-            sy = yOffset - appData.translate;
-            sy = MAX(sy, 0);
-            if (sy == yOffset)
-                return;
-            yOffset = sy;
-            sx = xOffset;
-            dx = dy = 0;
-            w = ww; h = wh;
-            break;
-        case XK_Left:
-            if (iw < ww)
-                return;
-            sx = xOffset + appData.translate;
-            sx = MIN(iw - ww, sx);
-            if (sx == xOffset)
-                return;
-            xOffset = sx;
-            sy = yOffset;
-            dx = dy = 0;
-            w = ww; h = wh;
-            break;
-        case XK_Right:
-            if (iw < ww)
-                return;
-            sx = xOffset - appData.translate;
-            sx = MAX(sx, 0);
-            if (sx == xOffset)
-                return;
-            xOffset = sx;
-            sy = yOffset;
-            dx = dy = 0;
-            w = ww; h = wh;
-            break;
-        default:
-            return;
-        }
-        break;
-    case MotionNotify:
-        /*
-         * MotionEvent compression.  Ignore multiple motion events.
-         * Ignore motion events if the mouse button is up.
-         */
-        if (XPending(xDisplay)) /* Xlib doesn't flush the output buffer */
-            if (XtPeekEvent(&next_event))
-                if (next_event.type == MotionNotify)
-                    return;
-        if ((grabX < 0) || (grabY < 0))
-            return;
-        sx = xOffset + grabX - (int) event->xmotion.x;
-        if (sx >= (iw - ww))    /* clamp x motion but allow y motion */
-            sx = iw - ww;
-        sx = MAX(sx, 0);
-        sy = yOffset + grabY - (int) event->xmotion.y;
-        if (sy >= (ih - wh)) /* clamp y motion but allow x motion */
-            sy = ih - wh;
-        sy = MAX(sy, 0);
-        if ((sx == xOffset) && (sy == yOffset))
-            return;
-        dx = dy = 0;
-        w = ww; h = wh;
-        break;
-    case ButtonRelease:
-        xOffset = xOffset + grabX - (int) event->xbutton.x;
-        xOffset = MIN(iw - ww, xOffset);
-        xOffset = MAX(xOffset, 0);
-        yOffset = yOffset + grabY - (int) event->xbutton.y;
-        yOffset = MIN(ih - wh, yOffset);
-        yOffset = MAX(yOffset, 0);
-        grabX = grabY = -1;
-    default:
-        return;
-    }
-
-    if (appData.usePixmap == True) {
-        if (xImageDepth == 1)
-            XCopyPlane(xDisplay, xImagePixmap, XtWindow(widget),
-                xWinGc, sx, sy, w, h, dx, dy, 1);
-        else
-            XCopyArea(xDisplay, xImagePixmap, XtWindow(widget),
-                xWinGc, sx, sy, w, h, dx, dy);
-    } else
-        XPutImage(xDisplay, XtWindow(widget), xWinGc, xImage,
-            sx, sy, dx, dy, w, h);
-}
-
-void
-ResizeProc()
-{
-    Dimension w_width, w_height;
-    int xo, yo, ww, wh;
-    XEvent fake_event;
-    Arg args[2];
-
-    if ((xOffset == 0) && (yOffset == 0))
-        return;
-
-    XtSetArg(args[0], XtNwidth, &w_width);
-    XtSetArg(args[1], XtNheight, &w_height);
-    XtGetValues(shellWidget, args, 2);
-    ww = w_width;
-    wh = w_height;
-    XtGetValues(listWidget, args, 2);
-    wh -= w_height;
-
-    xo = xOffset; yo = yOffset;
-
-    if ((xOffset + ww) >= tfImageWidth)
-        xOffset = MAX((int) tfImageWidth - ww, 0);
-    if ((yOffset + wh) >= tfImageHeight)
-        yOffset = MAX((int) tfImageHeight - wh, 0);
-
-    /*
-     * Send an ExposeEvent if the origin changed.
-     * We have to do this because of the use and semantics of bit gravity.
-     */
-    if ((xo != xOffset) || (yo != yOffset)) {
-        fake_event.type = Expose;
-        fake_event.xexpose.x = fake_event.xexpose.y = 0;
-        fake_event.xexpose.width = tfImageWidth;
-        fake_event.xexpose.height = tfImageHeight;
-        EventProc(imageWidget, NULL, &fake_event);
-    }
-}
-
-int
-XTiffErrorHandler(display, error_event)
-    Display *display;
-    XErrorEvent *error_event;
-{
-    char message[80];
-
-    /*
-     * Some X servers limit the size of pixmaps.
-     */
-    if ((error_event->error_code == BadAlloc)
-            && (error_event->request_code == X_CreatePixmap))
-        fprintf(stderr, "xtiff: requested pixmap too big for display\n");
-    else {
-        XGetErrorText(display, error_event->error_code, message, 80);
-        fprintf(stderr, "xtiff: error code %s\n", message);
-    }
-
-    exit(0);
-}
-
-void
-Usage()
-{
-    fprintf(stderr, "Usage xtiff: [options] tiff-file\n");
-    fprintf(stderr, "\tstandard Xt options\n");
-    fprintf(stderr, "\t[-help]\n");
-    fprintf(stderr, "\t[-gamma gamma]\n");
-    fprintf(stderr, "\t[-usePixmap (True | False)]\n");
-    fprintf(stderr, "\t[-viewportWidth pixels]\n");
-    fprintf(stderr, "\t[-viewportHeight pixels]\n");
-    fprintf(stderr, "\t[-translate pixels]\n");
-    fprintf(stderr, "\t[-verbose (True | False)]\n");
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/dbs/xtiff/xtifficon.h b/tkimg1.3/libtiff/contrib/dbs/xtiff/xtifficon.h
deleted file mode 100644
index 8ee1667..0000000
--- a/tkimg1.3/libtiff/contrib/dbs/xtiff/xtifficon.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#define xtifficon_width 32
-#define xtifficon_height 32
-static char xtifficon_bits[] = {
-   0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x7e, 0xc0, 0xfc, 0x03, 0x7e, 0x60,
-   0xf8, 0x07, 0x06, 0x30, 0xf8, 0x07, 0x1e, 0x18, 0xf0, 0x0f, 0x1e, 0x0c,
-   0xe0, 0x1f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x03,
-   0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00,
-   0x00, 0xfe, 0x31, 0x7e, 0x7e, 0xfc, 0x33, 0x7e, 0x7e, 0xf8, 0x1b, 0x06,
-   0x18, 0xf0, 0x0d, 0x1e, 0x18, 0xf0, 0x0e, 0x1e, 0x18, 0x60, 0x1f, 0x06,
-   0x18, 0xb0, 0x3f, 0x06, 0x18, 0x98, 0x7f, 0x06, 0x18, 0x98, 0x7f, 0x00,
-   0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x63, 0xfc, 0x03,
-   0x80, 0x61, 0xfc, 0x03, 0xc0, 0x60, 0xf8, 0x07, 0xc0, 0x60, 0xf0, 0x0f,
-   0x60, 0x60, 0xe0, 0x1f, 0x30, 0x60, 0xe0, 0x1f, 0x18, 0x60, 0xc0, 0x3f,
-   0x0c, 0x60, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff};
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.lib b/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.lib
deleted file mode 100644
index 3f44c6f..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.lib
+++ /dev/null
@@ -1,249 +0,0 @@
-#       $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.lib,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# manually derived from Makefile.in for DJGPP v2.x (GNU C for DOS/386).
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988-1996 Sam Leffler
-# Copyright (c) 1991-1996 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-SRCDIR	= .
-
-NULL	=
-CC	= gcc
-AR	= ar
-AROPTS	= rc
-RANLIB	= ranlib
-
-#
-# If JPEG support is to be included and the Independent JPEG
-# Software distribution is not installed then DIR_JPEG must
-# refer to the directory where the include files reside.
-#
-# Similarly, if the libgz distribution is not installed, then
-# DIR_LIBGZ must refer to the directory where the include files
-# are located.  Note that recent versions 
-#
-IPATH	= -I. -I${SRCDIR}
-# @COPT_LIBINC@
-#
-# To enable JPEG support include -DJPEG_SUPPORT here.
-# To enable Deflate support add a -DZIP_SUPPORT here.
-# Note that where the configure script is used these defines
-# are automatically setup when JPEG/ZIP is set to "yes".
-#
-# Otherwise, consult tiffconf.h for information on controlling
-# the configuration of optional library support.
-#
-CONF_LIBRARY=#@CONF_JPEG@ @CONF_ZIP@
-COPTS	= 
-OPTIMIZER=-O
-CFLAGS	= ${COPTS} ${OPTIMIZER} ${IPATH} ${CONF_LIBRARY}
-#
-SRCS	= \
-	tif_aux.c \
-	tif_close.c \
-	tif_codec.c \
-	tif_compress.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_fax3.c \
-	tif_fx3s.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_flush.c \
-	tif_lzw.c \
-	tif_next.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_predict.c \
-	tif_print.c \
-	tif_read.c \
-	tif_swab.c \
-	tif_strip.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_msdos.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	tif_zip.c \
-	tif_luv.c \
-	${NULL}
-OBJS	= \
-	tif_aux.o \
-	tif_close.o \
-	tif_codec.o \
-	tif_compress.o \
-	tif_dir.o \
-	tif_dirinfo.o \
-	tif_dirread.o \
-	tif_dirwrite.o \
-	tif_dumpmode.o \
-	tif_error.o \
-	tif_fax3.o \
-	tif_fx3s.o \
-	tif_getimage.o \
-	tif_jpeg.o \
-	tif_flush.o \
-	tif_lzw.o \
-	tif_next.o \
-	tif_open.o \
-	tif_packbits.o \
-	tif_predict.o \
-	tif_print.o \
-	tif_read.o \
-	tif_swab.o \
-	tif_strip.o \
-	tif_thunder.o \
-	tif_tile.o \
-	tif_msdos.o \
-	tif_version.o \
-	tif_warning.o \
-	tif_write.o \
-	tif_zip.o \
-	tif_luv.o \
-	${NULL}
-TARGETS	= libtiff.a
-
-all:	${TARGETS}
-
-libtiff.a: ${OBJS}
-	${AR} ${AROPTS} libtiff.a $?
-	${RANLIB} libtiff.a
-
-${OBJS}: ${SRCDIR}/tiffio.h ${SRCDIR}/tiff.h ${SRCDIR}/tif_dir.h
-${OBJS}: ${SRCDIR}/tiffcomp.h ${SRCDIR}/tiffiop.h ${SRCDIR}/tiffconf.h
-
-ALPHA   = ../dist/tiff.alpha
-VERSION = ../VERSION
-
-version.h: ${VERSION} ${ALPHA} ${SRCDIR}/mkversion.c
-	${CC} -o mkversion ${CFLAGS} ${SRCDIR}/mkversion.c
-	del version.h
-	mkversion -v ${VERSION} -a ${ALPHA} version.h
-
-tif_version.o: version.h
-
-#
-# The finite state machine tables used by the G3/G4 decoders
-# are generated by the mkg3states program.  On systems without
-# make these rules have to be manually carried out.
-#
-# The file is called tif_fax3sm.c is the normal (unix) Makefile, but this
-# may cause problems when compiling without support for LFN, then the file
-# tif_fax3.o is considered the same name as tif_fax3sm.o, since only 8 chars
-# are significant.
-#
-tif_fx3s.c: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h
-	${CC} -o mkg3states ${CFLAGS} ${SRCDIR}/mkg3states.c
-	del tif_fx3s.c
-	mkg3states -c const tif_fx3s.c
-
-tif_fx3s.o: tif_fx3s.c
-	@echo If the following gcc command fails due to lack of virtual memory, try
-	@echo compiling it in a non-DPMI environment with the cwsdpmi swapfile on a
-	@echo drive that has plenty of space.
-	${CC} -c ${CFLAGS} tif_fx3s.c
-
-tif_aux.o: ${SRCDIR}/tif_aux.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_aux.c
-tif_close.o: ${SRCDIR}/tif_close.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_close.c
-tif_codec.o: ${SRCDIR}/tif_codec.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_codec.c
-tif_compress.o: ${SRCDIR}/tif_compress.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_compress.c
-tif_dir.o: ${SRCDIR}/tif_dir.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dir.c
-tif_dirinfo.o: ${SRCDIR}/tif_dirinfo.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirinfo.c
-tif_dirread.o: ${SRCDIR}/tif_dirread.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirread.c
-tif_dirwrite.o: ${SRCDIR}/tif_dirwrite.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirwrite.c
-tif_dumpmode.o: ${SRCDIR}/tif_dumpmode.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dumpmode.c
-tif_error.o: ${SRCDIR}/tif_error.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_error.c
-tif_fax3.o: ${SRCDIR}/tif_fax3.c ${SRCDIR}/t4.h ${SRCDIR}/tif_fax3.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_fax3.c
-tif_getimage.o: ${SRCDIR}/tif_getimage.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_getimage.c
-tif_jpeg.o: ${SRCDIR}/tif_jpeg.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_jpeg.c
-tif_flush.o: ${SRCDIR}/tif_flush.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_flush.c
-tif_lzw.o: ${SRCDIR}/tif_lzw.c ${SRCDIR}/tif_predict.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_lzw.c
-tif_next.o: ${SRCDIR}/tif_next.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_next.c
-tif_open.o: ${SRCDIR}/tif_open.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_open.c
-tif_packbits.o: ${SRCDIR}/tif_packbits.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_packbits.c
-tif_predict.o: ${SRCDIR}/tif_predict.c ${SRCDIR}/tif_predict.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_predict.c
-tif_print.o: ${SRCDIR}/tif_print.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_print.c
-tif_read.o: ${SRCDIR}/tif_read.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_read.c
-tif_swab.o: ${SRCDIR}/tif_swab.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_swab.c
-tif_strip.o: ${SRCDIR}/tif_strip.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_strip.c
-tif_thunder.o: ${SRCDIR}/tif_thunder.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_thunder.c
-tif_tile.o: ${SRCDIR}/tif_tile.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_tile.c
-tif_unix.o: ${SRCDIR}/tif_unix.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_unix.c
-tif_version.o: ${SRCDIR}/tif_version.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_version.c
-tif_warning.o: ${SRCDIR}/tif_warning.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_warning.c
-tif_write.o: ${SRCDIR}/tif_write.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_write.c
-tif_zip.o: ${SRCDIR}/tif_zip.c ${SRCDIR}/tif_predict.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_zip.c
-
-tif_apple.o: ${SRCDIR}/tif_apple.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_apple.c
-tif_atari.o: ${SRCDIR}/tif_atari.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_atari.c
-tif_msdos.o: ${SRCDIR}/tif_msdos.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_msdos.c
-tif_vms.o: ${SRCDIR}/tif_vms.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_vms.c
-tif_win3.o: ${SRCDIR}/tif_win3.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_win3.c
-
-INCS	= ${SRCDIR}/tiff.h ${SRCDIR}/tiffio.h
-
-clean:
-	rm -f ${TARGETS} ${OBJS} mkg3states mkg3states.exe tif_fx3s.c
-	rm -f version.h libtiff.a mkversion mkversion.exe
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.tools b/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.tools
deleted file mode 100644
index 5266390..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.tools
+++ /dev/null
@@ -1,217 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.tools,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# manually derived from Makefile.in for DJGPP v2.x (GNU C for DOS/386).
-#
-# TIFF Library Tools
-#
-# Copyright (c) 1988-1996 Sam Leffler
-# Copyright (c) 1991-1996 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-DEPTH	= ..
-SRCDIR	= .
-LIBDIR	= ${DEPTH}/libtiff
-
-NULL	=
-CC	= gcc
-#
-COPTS	= 
-OPTIMIZER=-O
-IPATH	= -I. -I${SRCDIR} -I${LIBDIR}
-CFLAGS	= ${COPTS} ${OPTIMIZER} ${IPATH}
-#
-LIBTIFF	= ${DEPTH}/libtiff/libtiff.a
-LIBJPEG	= #@LIBJPEG@
-LIBGZ	= #@LIBGZ@
-LIBS	= ${LIBTIFF} ${LIBJPEG} ${LIBGZ}
-#
-OBJS=	\
-	fax2tiff.o \
-	fax2ps.o \
-	gif2tiff.o \
-	pal2rgb.o \
-	ppm2tiff.o \
-	rgb2ycbcr.o \
-	ras2tiff.o \
-	thumbnail.o \
-	tiff2bw.o \
-	tiff2ps.o \
-	tiffcmp.o \
-	tiffcp.o \
-	tiffdither.o \
-	tiffdump.o \
-	tiffinfo.o \
-	tiffmedian.o \
-	tiffsplit.o \
-	${NULL}
-TARGETS	=\
-	fax2tiff \
-	fax2ps \
-	gif2tiff \
-	pal2rgb \
-	ppm2tiff \
-	rgb2ycbcr \
-	thumbnail \
-	ras2tiff \
-	tiff2bw \
-	tiff2ps \
-	tiffcmp \
-	tiffcp \
-	tiffdither \
-	tiffdump \
-	tiffinfo \
-	tiffmedian \
-	tiffsplit \
-	${NULL}
-
-all:	${TARGETS}
-
-clean:
-	rm -f ${TARGETS} ${addsuffix .exe, ${TARGETS}} ${OBJS}
-	rm -f sgigt.o tiffgt sgisv.o tiffsv sgi2tiff.o sgi2tiff ycbcr 
-
-#
-# System-independent tools
-#
-
-tiffinfo: tiffinfo.o ${LIBTIFF}
-	${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
-tiffinfo.o: ${SRCDIR}/tiffinfo.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
-
-tiffcmp:tiffcmp.o ${LIBTIFF}
-	${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
-tiffcmp.o: ${SRCDIR}/tiffcmp.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
-
-tiffcp:	tiffcp.o ${LIBTIFF}
-	${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
-tiffcp.o: ${SRCDIR}/tiffcp.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
-
-tiffdump: tiffdump.o
-	${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
-tiffdump.o: ${SRCDIR}/tiffdump.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
-
-tiffmedian: tiffmedian.o ${LIBTIFF}
-	${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
-tiffmedian.o: ${SRCDIR}/tiffmedian.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
-
-tiffsplit: tiffsplit.o ${LIBTIFF}
-	${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
-tiffsplit.o: ${SRCDIR}/tiffsplit.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
-
-tiff2ps: tiff2ps.o ${LIBTIFF}
-	${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
-tiff2ps.o: ${SRCDIR}/tiff2ps.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
-
-#
-# Junky stuff... programs that are more examples of how
-# to use the library than full-blown useful tools.
-#
-
-# convert RGB image to B&W
-tiff2bw: tiff2bw.o ${LIBTIFF}
-	${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
-tiff2bw.o: ${SRCDIR}/tiff2bw.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
-
-# convert B&W image to bilevel w/ FS dithering
-tiffdither: tiffdither.o ${LIBTIFF}
-	${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
-tiffdither.o: ${SRCDIR}/tiffdither.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
-
-# simple Sun rasterfile converter
-ras2tiff: ras2tiff.o ${LIBTIFF}
-	${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
-ras2tiff.o: ${SRCDIR}/ras2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
-
-# simple GIF converter
-gif2tiff: gif2tiff.o ${LIBTIFF}
-	${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
-gif2tiff.o: ${SRCDIR}/gif2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
-
-# very limited PBM converter
-ppm2tiff: ppm2tiff.o ${LIBTIFF}
-	${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
-ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
-
-# Group 3/4 FAX file converter
-fax2tiff: fax2tiff.o ${LIBTIFF}
-	${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
-fax2tiff.o: ${SRCDIR}/fax2tiff.c
-	${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
-
-# Group 3/4 FAX to encoded PS converter
-fax2ps: fax2ps.o ${LIBTIFF}
-	${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
-fax2ps.o: ${SRCDIR}/fax2ps.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
-
-# convert Palette image to RGB
-pal2rgb: pal2rgb.o ${LIBTIFF}
-	${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
-pal2rgb.o: ${SRCDIR}/pal2rgb.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
-
-# convert RGB image to YCbCr
-rgb2ycbcr: rgb2ycbcr.o ${LIBTIFF}
-	${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
-rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
-
-# generate thumbnail images from fax (example of SubIFD usage)
-thumbnail: thumbnail.o ${LIBTIFF}
-	${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
-thumbnail.o: ${SRCDIR}/thumbnail.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
-
-#
-# System-specific tools.
-#
-
-#
-# sgi2tiff converts SGI RGB images to TIFF; it requires
-# the SGI image library -limage.
-#
-sgi2tiff: sgi2tiff.o ${LIBTIFF}
-	${CC} -o sgi2tiff ${CFLAGS} sgi2tiff.o -limage ${LIBS}
-sgi2tiff.o: ${SRCDIR}/sgi2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/sgi2tiff.c
-
-# SGI versions of tiffgt & tiffsv that require -lgl
-tiffgt:	sgigt.o ${LIBTIFF}
-	${CC} -o tiffgt ${CFLAGS} sgigt.o ${LIBS} -lgutil -lgl_s
-sgigt.o: ${SRCDIR}/sgigt.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/sgigt.c
-
-tiffsv:	sgisv.o ${LIBTIFF}
-	${CC} -o tiffsv ${CFLAGS} sgisv.o ${LIBS} -lgutil -lgl_s
-sgisv.o: ${SRCDIR}/sgisv.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.top b/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.top
deleted file mode 100644
index b2b54e1..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.top
+++ /dev/null
@@ -1,54 +0,0 @@
-#! smake
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/dosdjgpp/Makefile.top,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# manually derived from Makefile.in (though basically nothing remains)
-# for DJGPP v2.x (GNU C for DOS/386).
-#
-# A warning about the filename structure:
-#
-# Some of the filenames used in the Makefiles are longer than 8 characters
-# this will work with the normal 8.3 file system since all files are unique
-# in the first 8 chars. To compile under the long filename support in Win95
-# you can either extract the files with a program that truncates filenames
-# (e.g. the DOS pkunzip) and disable LFN support with set LFN=n or with a
-# program that supports long filenames (e.g. WinZip 6.0) and set LFN=y.
-# The default environment in djgpp 2 is supposed to have LFN disabled, but
-# due to a bug in the init code it doesn't work properly. Setting the LFN
-# variable explicitly should fix that.
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988-1996 Sam Leffler
-# Copyright (c) 1991-1996 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-SRCDIR  = .
-
-all default:
-	@${MAKE} -C libtiff
-	@${MAKE} -C tools
-
-clean:
-	@${MAKE} -C libtiff clean
-	@${MAKE} -C tools clean
-
-
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/README b/tkimg1.3/libtiff/contrib/dosdjgpp/README
deleted file mode 100644
index e14d1bf..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/README
+++ /dev/null
@@ -1,30 +0,0 @@
-
-This directory contains the files necessary to build the free TIFF library
-with the DJGPP v2 compiler under MSDOS. Since DJGPP defines the unix flag,
-I have created a port.h instead of putting the necessary defines into
-tiffcomp.h. Makefiles are included for the top level and the libtiff and
-tools directories.
-
-All you have to do is copy the files into the respective directories and run
-make. If you want, you can use the conf.bat to do that for you, make sure that
-the file is stored with MSDOS text EOL-convention (CR/LF), otherwise the
-command.com will not do anything (if you used unzip, use the -a option,
-otherwise edit the file and save it again).
-
-Note that you probably will not be able to built the library with the v1.x
-versions of djgpp, due to two problems. First, the top makefile calls a
-sub-make for each directory and you are likely to run out of memory, since
-each recursive invocation of a djgpp v1.x program requires about 130k, to
-avoid that, you can enter the directories manually and call make (well, there
-are only two dirs). The 2nd problem is that djgpp 1.x doesn't call the
-coff2exe (stubify) program when creating an executable. This means that all
-programs compiled are not converted to exe and consequently are not available
-for calling directly. For the tools directory, you can just call coff2exe for
-each program after make finishes, but in the libtiff directory, a few programs
-are created during the make process that have to be called for make to
-continue (e.g. mkg3states). Make will probably report an error at each
-such stage. To fix that, either add a coff2exe call before each program is
-called or call coff2exe manually and rerun make (there 2-3 such programs).
-
-Alexander Lehmann <alex at hal.rhein-main.de>
-
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/conf.bat b/tkimg1.3/libtiff/contrib/dosdjgpp/conf.bat
deleted file mode 100644
index f28e12d..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/conf.bat
+++ /dev/null
@@ -1,11 +0,0 @@
- at echo off
-rem copy the Makefiles for libtiff for DJGPP2 into proper locations
-rem we assume to be in $(top)/contrib/dosdjgpp/
-
-copy Makefile.top ..\..\Makefile
-copy Makefile.lib ..\..\libtiff\Makefile
-copy port.h ..\..\libtiff\port.h
-copy Makefile.too* ..\..\tools\Makefile
-
-echo all set for building the library. Now just do make
-cd ..\..
diff --git a/tkimg1.3/libtiff/contrib/dosdjgpp/port.h b/tkimg1.3/libtiff/contrib/dosdjgpp/port.h
deleted file mode 100644
index 4299c5e..0000000
--- a/tkimg1.3/libtiff/contrib/dosdjgpp/port.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _PORT_
-#define _PORT_ 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <sys/types.h>
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-#define HOST_BIGENDIAN	0
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-typedef double dblparam_t;
-#ifdef __STRICT_ANSI__
-#define	INLINE	__inline__
-#else
-#define	INLINE	inline
-#endif
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/tkimg1.3/libtiff/contrib/iptcutil/Makefile b/tkimg1.3/libtiff/contrib/iptcutil/Makefile
deleted file mode 100644
index e8aacda..0000000
--- a/tkimg1.3/libtiff/contrib/iptcutil/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-CC=gcc
-CFLAGS=
-iptcutil: iptcutil.c
-	$(CC) $(CFLAGS) -o iptcutil iptcutil.c
-
-clean: 
-	rm iptcutil *~
-
-all: iptcutil
-
-
-
diff --git a/tkimg1.3/libtiff/contrib/iptcutil/iptcutil.c b/tkimg1.3/libtiff/contrib/iptcutil/iptcutil.c
deleted file mode 100644
index 1ee68bb..0000000
--- a/tkimg1.3/libtiff/contrib/iptcutil/iptcutil.c
+++ /dev/null
@@ -1,920 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#ifdef  WIN32
-#include <io.h>
-#endif
-#include <string.h>
-#include <memory.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#define STRNICMP strnicmp
-#else 
-#define STRNICMP strncasecmp
-#endif 
-
-typedef struct _tag_spec
-{
-  short
-    id;
-
-  char
-    *name;
-} tag_spec;
-
-static tag_spec tags[] = {
-  5,"Image Name",
-  7,"Edit Status",
-  10,"Priority",
-  15,"Category",
-  20,"Supplemental Category",
-  22,"Fixture Identifier",
-  25,"Keyword",
-  30,"Release Date",
-  35,"Release Time",
-  40,"Special Instructions",
-  45,"Reference Service",
-  47,"Reference Date",
-  50,"Reference Number",
-  55,"Created Date",
-  60,"Created Time",
-  65,"Originating Program",
-  70,"Program Version",
-  75,"Object Cycle",
-  80,"Byline",
-  85,"Byline Title",
-  90,"City",
-  95,"Province State",
-  100,"Country Code",
-  101,"Country",
-  103,"Original Transmission Reference",
-  105,"Headline",
-  110,"Credit",
-  115,"Source",
-  116,"Copyright String",
-  120,"Caption",
-  121,"Local Caption",
-  122,"Caption Writer",
-  200,"Custom Field 1",
-  201,"Custom Field 2",
-  202,"Custom Field 3",
-  203,"Custom Field 4",
-  204,"Custom Field 5",
-  205,"Custom Field 6",
-  206,"Custom Field 7",
-  207,"Custom Field 8",
-  208,"Custom Field 9",
-  209,"Custom Field 10",
-  210,"Custom Field 11",
-  211,"Custom Field 12",
-  212,"Custom Field 13",
-  213,"Custom Field 14",
-  214,"Custom Field 15",
-  215,"Custom Field 16",
-  216,"Custom Field 17",
-  217,"Custom Field 18",
-  218,"Custom Field 19",
-  219,"Custom Field 20"
-};
-
-/*
- * We format the output using HTML conventions
- * to preserve control characters and such.
- */
-void formatString(FILE *ofile, const char *s, int len)
-{
-  putc('"', ofile);
-  for (; len > 0; --len, ++s) {
-    char c = *s;
-    switch (c) {
-    case '&':
-      fputs("&", ofile);
-      break;
-#ifdef HANDLE_GT_LT
-    case '<':
-      fputs("<", ofile);
-      break;
-    case '>':
-      fputs(">", ofile);
-      break;
-#endif
-    case '"':
-      fputs(""", ofile);
-      break;
-    default:
-      if (iscntrl(c))
-        fprintf(ofile, "&#%d;", c);
-      else
-        putc(*s, ofile);
-      break;
-    }
-  }
-  fputs("\"\n", ofile);
-}
-
-typedef struct _html_code
-{
-  short
-    len;
-  const char
-    *code,
-    val;
-} html_code;
-
-static html_code html_codes[] = {
-#ifdef HANDLE_GT_LT
-  4,"<",'<',
-  4,">",'>',
-#endif
-  5,"&",'&',
-  6,""",'"'
-};
-
-/*
- * This routine converts HTML escape sequence
- * back to the original ASCII representation.
- * - returns the number of characters dropped.
- */
-int convertHTMLcodes(char *s, int len)
-{
-  if (len <=0 || s==(char*)NULL || *s=='\0')
-    return 0;
-
-  if (s[1] == '#')
-    {
-      int val, o;
-
-      if (sscanf(s,"&#%d;",&val) == 1)
-      {
-        o = 3;
-        while (s[o] != ';')
-        {
-          o++;
-          if (o > 5)
-            break;
-        }
-        if (o < 5)
-          strcpy(s+1, s+1+o);
-        *s = val;
-        return o;
-      }
-    }
-  else
-    {
-      int
-        i,
-        codes = sizeof(html_codes) / sizeof(html_code);
-
-      for (i=0; i < codes; i++)
-      {
-        if (html_codes[i].len <= len)
-          if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0)
-            {
-              strcpy(s+1, s+html_codes[i].len);
-              *s = html_codes[i].val;
-              return html_codes[i].len-1;
-            }
-      }
-    }
-}
-
-int formatIPTC(FILE *ifile, FILE *ofile)
-{
-  unsigned int
-    foundiptc,
-    tagsfound;
-
-  unsigned char
-    recnum,
-    dataset;
-
-  unsigned char
-    *readable,
-    *str;
-
-  long
-    tagindx,
-    taglen;
-
-  int
-    i,
-    tagcount = sizeof(tags) / sizeof(tag_spec);
-
-  char
-    c;
-
-  foundiptc = 0; /* found the IPTC-Header */
-  tagsfound = 0; /* number of tags found */
-
-  c = getc(ifile);
-  while (c != EOF)
-  {
-	  if (c == 0x1c)
-	    foundiptc = 1;
-	  else
-      {
-        if (foundiptc)
-	        return -1;
-        else
-	        continue;
-	    }
-
-    /* we found the 0x1c tag and now grab the dataset and record number tags */
-    dataset = getc(ifile);
-	  if ((char) dataset == EOF)
-	    return -1;
-    recnum = getc(ifile);
-	  if ((char) recnum == EOF)
-	    return -1;
-    /* try to match this record to one of the ones in our named table */
-    for (i=0; i< tagcount; i++)
-    {
-      if (tags[i].id == recnum)
-          break;
-    }
-    if (i < tagcount)
-      readable = tags[i].name;
-    else
-      readable = "";
-
-    /* then we decode the length of the block that follows - long or short fmt */
-    c = getc(ifile);
-	  if (c == EOF)
-	    return 0;
-	  if (c & (unsigned char) 0x80)
-      {
-        unsigned char
-          buffer[4];
-
-        for (i=0; i<4; i++)
-        {
-          c = buffer[i] = getc(ifile);
-          if (c == EOF)
-            return -1;
-        }
-        taglen = (((long) buffer[ 0 ]) << 24) |
-                 (((long) buffer[ 1 ]) << 16) | 
-	               (((long) buffer[ 2 ]) <<  8) |
-                 (((long) buffer[ 3 ]));
-	    }
-    else
-      {
-        unsigned char
-          x = c;
-
-        taglen = ((long) x) << 8;
-        x = getc(ifile);
-        if ((char)x == EOF)
-          return -1;
-        taglen |= (long) x;
-	    }
-    /* make a buffer to hold the tag data and snag it from the input stream */
-    str=(unsigned char *) malloc((unsigned int) (taglen+1));
-    if (str == (unsigned char *) NULL)
-      {
-        printf("Memory allocation failed");
-        return 0;
-      }
-    for (tagindx=0; tagindx<taglen; tagindx++)
-    {
-      c = str[tagindx] = getc(ifile);
-      if (c == EOF)
-        return -1;
-    }
-    str[ taglen ] = 0;
-
-    /* now finish up by formatting this binary data into ASCII equivalent */
-    if (strlen(readable) > 0)
-	    fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable);
-    else
-	    fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum);
-    formatString( ofile, str, taglen );
-    free(str);
-
-	  tagsfound++;
-
-    c = getc(ifile);
-  }
-  return tagsfound;
-}
-
-int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
-char *white,char *brkchar,char *quote,char eschar,char *brkused,
-int *next,char *quoted);
-
-char *super_fgets(char *b, int *blen, FILE *file)
-{
-  int
-    c,
-    len;
-
-  unsigned char
-    *q;
-
-  len=*blen;
-  for (q=b; ; q++)
-  {
-    c=fgetc(file);
-    if (c == EOF || c == '\n')
-      break;
-    if (((int)q - (int)b + 1 ) >= (int) len)
-      {
-        int
-          tlen;
-
-        tlen=(int)q-(int)b;
-        len<<=1;
-        b=(unsigned char *) realloc((char *) b,(len+2));
-        if ((unsigned char *) b == (unsigned char *) NULL)
-          break;
-        q=b+tlen;
-      }
-    *q=(unsigned char) c;
-  }
-  *blen=0;
-  if ((unsigned char *)b != (unsigned char *) NULL)
-    {
-      int
-        tlen;
-
-      tlen=(int)q - (int)b;
-      if (tlen == 0)
-        return (char *) NULL;
-      b[tlen] = '\0';
-      *blen=++tlen;
-    }
-  return b;
-}
-
-#define BUFFER_SZ 4096
-
-int main(int argc, char *argv[])
-{            
-  unsigned int
-    length;
-
-  unsigned char
-    *buffer;
-
-  int
-    i,
-    mode; /* iptc binary, or iptc text */
-
-  FILE
-    *ifile = stdin,
-    *ofile = stdout;
-
-  char
-    c,
-    *usage = "usage: iptcutil -t | -b [-i file] [-o file] <input >output";
-
-  if( argc < 2 )
-    {
-      printf(usage);
-	    return 1;
-    }
-
-  mode = 0;
-  length = -1;
-  buffer = (unsigned char *)NULL;
-
-  for (i=1; i<argc; i++)
-  {
-    c = argv[i][0];
-    if (c == '-' || c == '/')
-      {
-        c = argv[i][1];
-        switch( c )
-        {
-        case 't':
-	        mode = 1;
-#ifdef WIN32
-          /* Set "stdout" to binary mode: */
-          _setmode( _fileno( ofile ), _O_BINARY );
-#endif
-	        break;
-        case 'b':
-	        mode = 0;
-#ifdef WIN32
-          /* Set "stdin" to binary mode: */
-          _setmode( _fileno( ifile ), _O_BINARY );
-#endif
-	        break;
-        case 'i':
-          if (mode == 0)
-            ifile = fopen(argv[++i], "rb");
-          else
-            ifile = fopen(argv[++i], "rt");
-          if (ifile == (FILE *)NULL)
-            {
-	            printf("Unable to open: %s\n", argv[i]);
-              return 1;
-            }
-	        break;
-        case 'o':
-          if (mode == 0)
-            ofile = fopen(argv[++i], "wt");
-          else
-            ofile = fopen(argv[++i], "wb");
-          if (ofile == (FILE *)NULL)
-            {
-	            printf("Unable to open: %s\n", argv[i]);
-              return 1;
-            }
-	        break;
-        default:
-	        printf("Unknown option: %s\n", argv[i]);
-	        return 1;
-        }
-      }
-    else
-      {
-        printf(usage);
-	      return 1;
-      }
-  }
-
-  if (mode == 0) /* handle binary iptc info */
-    formatIPTC(ifile, ofile);
-
-  if (mode == 1) /* handle text form of iptc info */
-    {
-      char
-        brkused,
-        quoted,
-        *line,
-        *token,
-        *newstr;
-
-      int
-        state,
-        next;
-
-      unsigned char
-        recnum,
-        dataset;
-
-      int
-        inputlen = BUFFER_SZ;
-
-      line = (char *) malloc(inputlen);     
-      token = (char *)NULL;
-      while((line = super_fgets(line,&inputlen,ifile))!=NULL)
-      {
-        state=0;
-        next=0;
-
-        token = (char *) malloc(inputlen);     
-        newstr = (char *) malloc(inputlen);     
-        while(tokenizer(0, token, inputlen, line, "", "=", "\"", 0,
-          &brkused,&next,&quoted)==0)
-        {
-          if (state == 0)
-            {                  
-              int
-                state,
-                next;
-
-              char
-                brkused,
-                quoted;
-
-              state=0;
-              next=0;
-              while(tokenizer(0, newstr, inputlen, token, "", "#", "", 0,
-                &brkused, &next, &quoted)==0)
-              {
-                if (state == 0)
-                  dataset = (unsigned char) atoi(newstr);
-                else
-                   if (state == 1)
-                     recnum = (unsigned char) atoi(newstr);
-                state++;
-              }
-            }
-          else
-            if (state == 1)
-              {
-                int
-                  next;
-
-                unsigned long
-                  len;
-
-                char
-                  brkused,
-                  quoted;
-
-                next=0;
-                len = strlen(token);
-                while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0,
-                  &brkused, &next, &quoted)==0)
-                {
-                  if (brkused && next > 0)
-                    {
-                      char
-                        *s = &token[next-1];
-
-                      len -= convertHTMLcodes(s, strlen(s));
-                    }
-                }
-
-                fputc(0x1c, ofile);
-                fputc(dataset, ofile);
-                fputc(recnum, ofile);
-                if (len < 0x10000)
-                  {
-                    fputc((len >> 8) & 255, ofile);
-                    fputc(len & 255, ofile);
-                  }
-                else
-                  {
-                    fputc(((len >> 24) & 255) | 0x80, ofile);
-                    fputc((len >> 16) & 255, ofile);
-                    fputc((len >> 8) & 255, ofile);
-                    fputc(len & 255, ofile);
-                  }
-                next=0;
-                while (len--)
-                  fputc(token[next++], ofile);
-              }
-          state++;
-        }
-        free(token);
-        token = (char *)NULL;
-        free(newstr);
-        newstr = (char *)NULL;
-      }
-      free(line);
-
-      fclose( ifile );
-      fclose( ofile );
-    }
-
-  return 0;
-}
-
-/*
-	This routine is a generalized, finite state token parser. It allows
-    you extract tokens one at a time from a string of characters.  The
-    characters used for white space, for break characters, and for quotes
-    can be specified. Also, characters in the string can be preceded by
-    a specifiable escape character which removes any special meaning the
-    character may have.
-
-	There are a lot of formal parameters in this subroutine call, but
-	once you get familiar with them, this routine is fairly easy to use.
-	"#define" macros can be used to generate simpler looking calls for
-	commonly used applications of this routine.
-
-	First, some terminology:
-
-	token:		used here, a single unit of information in
-				the form of a group of characters.
-
-	white space:	space that gets ignored (except within quotes
-				or when escaped), like blanks and tabs.  in
-				addition, white space terminates a non-quoted
-				token.
-
-	break character: a character that separates non-quoted tokens.
-				commas are a common break character.  the
-				usage of break characters to signal the end
-				of a token is the same as that of white space,
-				except multiple break characters with nothing
-				or only white space between generate a null
-				token for each two break characters together.
-
-				for example, if blank is set to be the white
-				space and comma is set to be the break
-				character, the line ...
-
-				A, B, C ,  , DEF
-
-				... consists of 5 tokens:
-
-				1)	"A"
-				2)	"B"
-				3)	"C"
-				4)	""      (the null string)
-				5)	"DEF"
-
-	quote character: 	a character that, when surrounding a group
-				of other characters, causes the group of
-				characters to be treated as a single token,
-				no matter how many white spaces or break
-				characters exist in the group.	also, a
-				token always terminates after the closing
-				quote.	for example, if ' is the quote
-				character, blank is white space, and comma
-				is the break character, the following
-				string ...
-
-				A, ' B, CD'EF GHI
-
-				... consists of 4 tokens:
-
-				1)	"A"
-				2)	" B, CD" (note the blanks & comma)
-				3)	"EF"
-				4)	"GHI"
-
-				the quote characters themselves do
-				not appear in the resultant tokens.  the
-				double quotes are delimiters i use here for
-				documentation purposes only.
-
-	escape character:	a character which itself is ignored but
-				which causes the next character to be
-				used as is.  ^ and \ are often used as
-				escape characters.  an escape in the last
-				position of the string gets treated as a
-				"normal" (i.e., non-quote, non-white,
-				non-break, and non-escape) character.
-				for example, assume white space, break
-				character, and quote are the same as in the
-				above examples, and further, assume that
-				^ is the escape character.  then, in the
-				string ...
-
-				ABC, ' DEF ^' GH' I ^ J K^ L ^
-
-				... there are 7 tokens:
-
-				1)	"ABC"
-				2)	" DEF ' GH"
-				3)	"I"
-				4)	" "     (a lone blank)
-				5)	"J"
-				6)	"K L"
-				7)	"^"     (passed as is at end of line)
-
-
-	OK, now that you have this background, here's how to call "tokenizer":
-
-	result=tokenizer(flag,token,maxtok,string,white,break,quote,escape,
-		      brkused,next,quoted)
-
-	result: 	0 if we haven't reached EOS (end of string), and
-			1 if we have (this is an "int").
-
-	flag:		right now, only the low order 3 bits are used.
-			1 => convert non-quoted tokens to upper case
-			2 => convert non-quoted tokens to lower case
-			0 => do not convert non-quoted tokens
-			(this is a "char").
-
-	token:		a character string containing the returned next token
-			(this is a "char[]").
-
-	maxtok: 	the maximum size of "token".  characters beyond
-			"maxtok" are truncated (this is an "int").
-
-	string: 	the string to be parsed (this is a "char[]").
-
-	white:		a string of the valid white spaces.  example:
-
-			char whitesp[]={" \t"};
-
-			blank and tab will be valid white space (this is
-			a "char[]").
-
-	break:		a string of the valid break characters.  example:
-
-			char breakch[]={";,"};
-
-			semicolon and comma will be valid break characters
-			(this is a "char[]").
-
-			IMPORTANT:  do not use the name "break" as a C
-			variable, as this is a reserved word in C.
-
-	quote:		a string of the valid quote characters.  an example
-			would be
-
-			char whitesp[]={"'\"");
-
-			(this causes single and double quotes to be valid)
-			note that a token starting with one of these characters
-			needs the same quote character to terminate it.
-
-			for example,
-
-			"ABC '
-
-			is unterminated, but
-
-			"DEF" and 'GHI'
-
-			are properly terminated.  note that different quote
-			characters can appear on the same line; only for
-			a given token do the quote characters have to be
-			the same (this is a "char[]").
-
-	escape: 	the escape character (NOT a string ... only one
-			allowed).  use zero if none is desired (this is
-			a "char").
-
-	brkused:	the break character used to terminate the current
-			token.	if the token was quoted, this will be the
-			quote used.  if the token is the last one on the
-			line, this will be zero (this is a pointer to a
-			"char").
-
-	next:		this variable points to the first character of the
-			next token.  it gets reset by "tokenizer" as it steps
-			through the string.  set it to 0 upon initialization,
-			and leave it alone after that.	you can change it
-			if you want to jump around in the string or re-parse
-			from the beginning, but be careful (this is a
-			pointer to an "int").
-
-	quoted: 	set to 1 (true) if the token was quoted and 0 (false)
-			if not.  you may need this information (for example:
-			in C, a string with quotes around it is a character
-			string, while one without is an identifier).
-
-			(this is a pointer to a "char").
-*/
-
-/* states */
-
-#define IN_WHITE 0
-#define IN_TOKEN 1
-#define IN_QUOTE 2
-#define IN_OZONE 3
-
-int _p_state;	   /* current state	 */
-unsigned _p_flag;  /* option flag	 */
-char _p_curquote;  /* current quote char */
-int _p_tokpos;	   /* current token pos  */
-
-/* routine to find character in string ... used only by "tokenizer" */
-
-int sindex(char ch,char *string)
-{
-  char *cp;
-  for(cp=string;*cp;++cp)
-    if(ch==*cp)
-      return (int)(cp-string);	/* return postion of character */
-  return -1;			/* eol ... no match found */
-}
-
-/* routine to store a character in a string ... used only by "tokenizer" */
-
-void chstore(char *string,int max,char ch)
-{
-  char c;
-  if(_p_tokpos>=0&&_p_tokpos<max-1)
-  {
-    if(_p_state==IN_QUOTE)
-      c=ch;
-    else
-      switch(_p_flag&3)
-      {
-	    case 1: 	    /* convert to upper */
-	      c=toupper(ch);
-	      break;
-
-	    case 2: 	    /* convert to lower */
-	      c=tolower(ch);
-	      break;
-
-	    default:	    /* use as is */
-	      c=ch;
-	      break;
-      }
-    string[_p_tokpos++]=c;
-  }
-  return;
-}
-
-int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
-  char *white,char *brkchar,char *quote,char eschar,char *brkused,
-    int *next,char *quoted)
-{
-  int qp;
-  char c,nc;
-
-  *brkused=0;		/* initialize to null */
-  *quoted=0;		/* assume not quoted  */
-
-  if(!line[*next])	/* if we're at end of line, indicate such */
-    return 1;
-
-  _p_state=IN_WHITE;   /* initialize state */
-  _p_curquote=0;	   /* initialize previous quote char */
-  _p_flag=inflag;	   /* set option flag */
-
-  for(_p_tokpos=0;c=line[*next];++(*next))	/* main loop */
-  {
-    if((qp=sindex(c,brkchar))>=0)  /* break */
-    {
-      switch(_p_state)
-      {
-	    case IN_WHITE:		/* these are the same here ...	*/
-	    case IN_TOKEN:		/* ... just get out		*/
-	    case IN_OZONE:		/* ditto			*/
-	      ++(*next);
-	      *brkused=brkchar[qp];
-	      goto byebye;
-
-	    case IN_QUOTE:		 /* just keep going */
-	      chstore(token,tokmax,c);
-	      break;
-      }
-    }
-    else if((qp=sindex(c,quote))>=0)  /* quote */
-    {
-      switch(_p_state)
-      {
-	    case IN_WHITE:	 /* these are identical, */
-	      _p_state=IN_QUOTE; /* change states   */
-	      _p_curquote=quote[qp]; /* save quote char */
-	      *quoted=1;	/* set to true as long as something is in quotes */
-	      break;
-
-	    case IN_QUOTE:
-	      if(quote[qp]==_p_curquote) /* same as the beginning quote? */
-	      {
-	        _p_state=IN_OZONE;
-	        _p_curquote=0;
-	      }
-	      else
-	        chstore(token,tokmax,c); /* treat as regular char */
-	      break;
-
-	    case IN_TOKEN:
-	    case IN_OZONE:
-	      *brkused=c; /* uses quote as break char */
-	      goto byebye;
-      }
-    }
-    else if((qp=sindex(c,white))>=0) /* white */
-    {
-      switch(_p_state)
-      {
-	    case IN_WHITE:
-	    case IN_OZONE:
-	      break;		/* keep going */
-
-	    case IN_TOKEN:
-	      _p_state=IN_OZONE;
-	      break;
-
-	    case IN_QUOTE:
-	      chstore(token,tokmax,c); /* it's valid here */
-	      break;
-      }
-    }
-    else if(c==eschar)  /* escape */
-    {
-      nc=line[(*next)+1];
-      if(nc==0) 		/* end of line */
-      {
-	    *brkused=0;
-	    chstore(token,tokmax,c);
-	    ++(*next);
-	    goto byebye;
-      }
-      switch(_p_state)
-      {
-	    case IN_WHITE:
-	      --(*next);
-	      _p_state=IN_TOKEN;
-	      break;
-
-	    case IN_TOKEN:
-	    case IN_QUOTE:
-	      ++(*next);
-	      chstore(token,tokmax,nc);
-	      break;
-
-	    case IN_OZONE:
-	      goto byebye;
-      }
-    }
-    else	/* anything else is just a real character */
-    {
-      switch(_p_state)
-      {
-	    case IN_WHITE:
-	      _p_state=IN_TOKEN; /* switch states */
-
-	    case IN_TOKEN:		 /* these 2 are     */
-	    case IN_QUOTE:		 /*  identical here */
-	      chstore(token,tokmax,c);
-	      break;
-
-	    case IN_OZONE:
-	      goto byebye;
-      }
-    }
-  }		/* end of main loop */
-
-byebye:
-  token[_p_tokpos]=0;	/* make sure token ends with EOS */
-
-  return 0;
-}
diff --git a/tkimg1.3/libtiff/contrib/iptcutil/test.iptc b/tkimg1.3/libtiff/contrib/iptcutil/test.iptc
deleted file mode 100644
index a260562..0000000
Binary files a/tkimg1.3/libtiff/contrib/iptcutil/test.iptc and /dev/null differ
diff --git a/tkimg1.3/libtiff/contrib/iptcutil/test.txt b/tkimg1.3/libtiff/contrib/iptcutil/test.txt
deleted file mode 100644
index d518100..0000000
--- a/tkimg1.3/libtiff/contrib/iptcutil/test.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-2#0="�"
-2#120#Caption="Chairman of the US House Judiciary Committee, Henry Hyde,R-IL, makes his opening statement during impeachment hearings 11 December on Capitol Hill in Washington, DC. The committee is debating the articles of impechment and my take a vote on the impeachment of US President BIll Clinton on charges that he obstucted justice, lied and abused the power of his office as early as today.    AFP PHOTO Paul J. RICHARDS
"
-2#122#Caption Writer="kb/lt"
-2#100#Country Code="USA"
-2#105#Headline="Old fart squeezing two fingers."
-2#30#Release Date="19981211"
-2#35#Release Time="000000+0000"
-2#40#Special Instructions="This is a test. This is only a test. ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890"
-2#80#Byline="PAUL J. RICHARDS"
-2#85#Byline Title="STF"
-2#110#Credit="AFP"
-2#65#Originating Program="MacDesk Reporter"
-2#115#Source="AFP"
-2#5#Image Name="US-HYDE"
-2#55#Created Date="19981211"
-2#90#City="WASHINGTON"
-2#95#Province State="DC"
-2#101#Country="UNITED STATES"
-2#103#Original Transmission Reference="DCA03"
-2#15#Category="POL"
-2#20#Supplemental Category="GOVERNMENT"
-2#10#Priority="5"
-2#25#Keyword="fart"
-2#25#Keyword="squeezing"
-2#25#Keyword="old"
-2#25#Keyword="fingers"
-2#75#Object Cycle="a"
-2#60#Created Time="000000+0000"
-2#70#Program Version="2.0.3"
-2#130="3S"
-2#135="GB"
-2#231="Kaya A. Hoffmann 12/14/98 12:00:44 PM  Copy To : Selects - \\KINYANI\Selects������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������"
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/Makefile.script b/tkimg1.3/libtiff/contrib/mac-cw/Makefile.script
deleted file mode 100644
index 85614c8..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/Makefile.script
+++ /dev/null
@@ -1,72 +0,0 @@
-
-(* You must manually set the top-level PATHNAME here; everything else is automatic *)
-
-set PATHNAME to "ritter:tiff-v3.4beta028:"
-set PRINTING to "NO"
-
-set MKG3STATES to PATHNAME & "mkg3states.mw"
-set LIBTIFF to PATHNAME & "libtiff-68K.mw"
-set TIFFINFO to PATHNAME & "tiffinfo.mw"
-
-with timeout of 60000 seconds
-	tell application "MW C/C++ 68K 1.2.2"
-		
-		activate
-		
-		
-		(* Create tif_fax3sm.c file *)
-		Create Project {file MKG3STATES}
-		Add Files {"mkg3states.c", "mkg3_main.c", "getopt.c"}
-		Add Files {"MacOS.lib"} To Segment 2
-		Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
-		Add Files {"SIOUX.68K.Lib"} To Segment 4
-		Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
-		
-		Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
-		Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
-		Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
-		Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
-		Set Preferences To {Project Type:0, File Name:"mkg3states", File Creator:"????", File Type:"APPL"}
-		
-		Make Project
-		Run Project
-		Remove Binaries
-		Close Project
-		
-		
-		(* Create LIBTIFF *)
-		Create Project {file LIBTIFF}
-		Add Files {"tif_apple.c", "tif_aux.c", "tif_close.c", "tif_codec.c", "tif_compress.c", "tif_dumpmode.c", "tif_error.c", "tif_flush.c", "tif_lzw.c", "tif_next.c", "tif_open.c", "tif_packbits.c"}
-		Add Files {"tif_fax3.c"} To Segment 2
-		Add Files {"tif_dirinfo.c", "tif_dir.c", "tif_dirwrite.c", "tif_dirread.c"} To Segment 3
-		Add Files {"tif_predict.c", "tif_print.c", "tif_read.c", "tif_strip.c", "tif_swab.c", "tif_thunder.c", "tif_tile.c", "tif_version.c", "tif_zip.c", "tif_jpeg.c", "tif_warning.c", "tif_write.c"} To Segment 4
-		Add Files {"tif_fax3sm.c"} To Segment 5
-		Add Files {"tif_getimage.c"} To Segment 6
-		
-		Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"MacHeaders68K"}
-		Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
-		Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
-		Set Preferences To {MacsBug Symbols:2, Generate SYM File:true, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
-		Set Preferences To {Project Type:2, File Name:"libtiff-68K", File Creator:"????", File Type:"APPL"}
-		Make Project
-		Close Project
-
-		Create Project {file TIFFINFO}
-		Add Files {"tiffinfo.c", "mac_main.c", "getopt.c"}
-		Add Files {"MacOS.lib"} To Segment 2
-		Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
-		Add Files {"SIOUX.68K.Lib"} To Segment 4
-		Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
-		Add Files {"libtiff-68K"} To Segment 6
-		
-		Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
-		Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
-		Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
-		Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
-		Set Preferences To {Project Type:0, File Name:"tiffinfo", File Creator:"????", File Type:"APPL"}
-		
-		Make Project
-		Close Project
-		
-	end tell
-end timeout
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/README b/tkimg1.3/libtiff/contrib/mac-cw/README
deleted file mode 100644
index a973469..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/README
+++ /dev/null
@@ -1,18 +0,0 @@
-----------------------------------------------------
-Build instructions for LIBTIFF - CodeWarrior (6.1):
-----------------------------------------------------
-
-In this directory you will find a Makefile.script Applescript
-file, which should be run in order to build the libtiff code
-using MetroWerks CodeWarrior.
-
-Refer to the "metrowerks.note" instructions on building the
-library for 68k and PowerPC native code, as well as building
-some of the libtiff tools, which are rather unix-like, but
-at least give an example of how to link everything together.
-
-  Questions, comments, bug reports to Niles Ritter
-  (ndr at tazboy.jpl.nasa.gov). Sam Leffler takes no responsibility
-  for the viability of this stuff.
-  
-    -Niles.
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/mac_main.c b/tkimg1.3/libtiff/contrib/mac-cw/mac_main.c
deleted file mode 100644
index 294655d..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/mac_main.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  mac_main.c -- The REAL entry point which
- *   calls the tools main code. For the tools
- *   the symbol "main" has been #defined to "tool_main"
- *   so that this entry point may be used to access
- *   the user-input first.
- */
-
-#undef main
-
-int
-main()
-{
-	int argc;
-	char **argv;
-	
-	argc=ccommand(&argv);
-
-	return tool_main(argc,argv);  // Call the tool "main()" routine
-}
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/mac_main.h b/tkimg1.3/libtiff/contrib/mac-cw/mac_main.h
deleted file mode 100644
index 523300f..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/mac_main.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 
- * mac_main.h  -- redefines main entry point
- */
- 
-#ifndef _mac_main_h
-#define _mac_main_h
-
-#undef main
-#define main tool_main
-
-#endif  /* _mac_main_h */
-
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/metrowerks.note b/tkimg1.3/libtiff/contrib/mac-cw/metrowerks.note
deleted file mode 100644
index 9917cfd..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/metrowerks.note
+++ /dev/null
@@ -1,84 +0,0 @@
-----------------------------------------------------
-Build instructions for LIBTIFF - CodeWarrior (6.1):
-----------------------------------------------------
-
-Note: there is a bug in CW earlier than 6.1 which will generate
-16-bit offset link errors for any projects using libtiff; you must
-download the CodeWarrior 6.1 patch located at:
-
-  ftp://ftp.metrowerks.com/pub/updates/metro-patches-61.hqx
-
-unpack the archive, insert the files and recompile the libraries
-using the AppleScript provided.
-
-
-1. Make sure that the directory containing these files is under
-   the "contrib" directory of the tiff folder; otherwise, some
-   access path preferences will need to be updated.
-
-2. The instructions below are for the 68k platform build. 
-    A similar script can be put together for the PPC version,
-    or you can just directly convert the projects. Be sure to
-   use the native libraries as well. NOTE: if anyone cooks  
-  up an equivalent script for PPC, send it to me and I'll include
-  it with the rest of the package.
-
-3.   Open the file Makefile.script with an AppleScript Editor
-   and change the PATHNAME variable to point to your
-   top-level TIFF directory
-
-4. Run the Script. It will do the following things:
- 
-   4a. Prompt you for the current location of the CodeWarrior 68K
-   program.
-
-   4b. Create the source file "tif_fax3sm.c":
-
-        i) Build the project CW project mkg3states.cw. It will
-     produce a small program called mkg3states. Only a
-     68k version is provided, since you only have to run
-     this code once, and it only takes a few seconds.
-     
-        ii) Run the built mkg3states program: 
-        
-    The program will temporarily take over ALL of the CPU, so
-    don't panic. After a few seconds it will produce a file called
-    "tif_fax3sm.c".
-
-  4c. Build the library project libtiff-68K.mw, producing library
-   called libtiff-68K.
-
-  4d. Build program project tiffinfo.mw; it will produce a
-   program called tiffinfo, which can dump the tiff tags of
-   a named file. Passing in no arguments will dump a help file
-   for the program. It is unix-flavored, but hey, it works.
-
-5  When the script finishes, you will have a usable libtiff-68K
-   library, a passable "tiffinfo" program, and the projects used
-   to build them. Note that to get tiffinfo to work I have put 
-   an include file in the project that redefines main(), and
-   then have a mac_main.c program that calls ccommand() first
-   and passes that to the actual main code. A real mac app,
-   of course, would never use this stuff at all...
-
- . The tiffinfo.mw project may be used as a template to build
-   most of the other libtiff tools, or your own code. When
-   modifying a copy of the project, you will most likely need
-   to update the "Access Paths" directory if it is moved out of
-   the contrib folder.
-   
-6. If you are going to create a project from scratch, be sure
-   to set up the preferences with 
-   
-      4-byte ints
-      8-byte doubles
-      Far Code/Far Data
-      Large Linking model
-      
-   and everything should work fine. If the console-style error
-   reports bother you, you can always override the error and
-   warning mechanism with TIFFSetErrorHandler to do something
-   more Mac-like.
-
-Questions, comments to Niles Ritter (ndr at tazboy.jpl.nasa.gov).
-
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/mkg3_main.c b/tkimg1.3/libtiff/contrib/mac-cw/mkg3_main.c
deleted file mode 100644
index b31c8d1..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/mkg3_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- *  mkg3_main.c -- passes fake arguments into main
- */
-
-#undef main
-
-int
-main()
-{
-	static char *argv[4] = {
-	 "mkg3states", "-c", "const", "tif_fax3sm.c" };
-	
-	return tool_main(4,argv);  // Call the tool "main()" routine
-}
diff --git a/tkimg1.3/libtiff/contrib/mac-cw/version.h b/tkimg1.3/libtiff/contrib/mac-cw/version.h
deleted file mode 100644
index 3c5c56e..0000000
--- a/tkimg1.3/libtiff/contrib/mac-cw/version.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define VERSION \
-"LIBTIFF, Version 3.4beta028 \n"\
-"Copyright (c) 1988-1995 Sam Leffler\n"\
-"Copyright (c) 1991-1996 Silicon Graphics, Inc."
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/BUILD.mpw b/tkimg1.3/libtiff/contrib/mac-mpw/BUILD.mpw
deleted file mode 100644
index 7abf83a..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/BUILD.mpw
+++ /dev/null
@@ -1,47 +0,0 @@
-# BUILD.mpw:  
-#
-#   Full build for Apple Macintosh Programmer's Workshop (MPW).
-#
-#  This is an executable MPW script which creates various
-#  utilities, sets up the MPW makefiles and runs the builds.
-#  This script should be run at the top level TIFF directory with:
-#
-#     directory :::
-#     :contrib:mac-mpw:BUILD.mpw
-#
-#  NOTE: The full build requires that MPW have at least 6 MB
-#   allocated to it to compile the CCITT Fax codec tables. To
-#   deactivate CCITT compression edit the file :contrib:mac:libtiff.make
-#   first and follow the directions for disabling Fax decoding.
-#
-#  All TIFF tools are built as MPW tools, executable from the
-#  MPW shell or other compatible tool server.
-#
-#  Written by: Niles Ritter (ndr at tazboy.jpl.nasa.gov).
-#
-
-echo "############# Full Scratch Build for MPW #############"
-
-# Create the ascii->mpw translation tool; this is used to
-# convert standard ASCII files into ones using the special
-# MPW characters, which don't live comfortably in unix tar files.
-#
-echo "######## Creating ASCII->MPW translator ########"
-set contrib ':contrib:mac-mpw:'
-directory {contrib}
-createmake -tool mactrans mactrans.c > dev:null
-make -f mactrans.make | streamedit -e "/CSANELib/||/Math/||/ToolLibs/ del" > mactrans.bld
-execute mactrans.bld  > dev:null
-delete -y mactrans.make mactrans.bld mactrans.c.o || set status 0
-directory :::   #An mpw trick for going up two levels
-
-# Create the top-level Makefile and run it
-echo "######## Creating Makefile ########"
-catenate {contrib}top.make | {contrib}mactrans > Makefile
-
-echo "######## Running Makefile ########"
-make  > build.mpw
-execute build.mpw
-echo "############# MPW Build Complete #############"
-exit 0
-
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/README b/tkimg1.3/libtiff/contrib/mac-mpw/README
deleted file mode 100644
index 053b0d0..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/README
+++ /dev/null
@@ -1,20 +0,0 @@
-######################
-About contrib:mac-mpw:
-######################
-
-This directory contains all of the utilities and makefile source
-to build the LIBTIFF library and tools from the MPW Shell. The
-file BUILD.mpw in this directory is an executable script
-which uses all of these files to create the MPW makefiles and 
-run them. 
-
-The <file>.make files are not MPW makefiles as such,
-but are when run through the "mactrans" program, which turns
-the ascii "%nn" metacharacters into the standard weird MPW
-make characters.
-
-This translation trick is necessary to protect the files when
-they are put into unix tarfiles, which tend to mangle the
-special characters.
-
- --Niles Ritter (ndr at tazboy.jpl.nasa.gov)
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/libtiff.make b/tkimg1.3/libtiff/contrib/mac-mpw/libtiff.make
deleted file mode 100644
index ee5296e..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/libtiff.make
+++ /dev/null
@@ -1,202 +0,0 @@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
-# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# Makefile for Mac using MPW 3.3.1 and MPW C 3.2.4
-#
-#  Note:  This file must be run through "mactrans" before it can
-#  be recognized by MPW as a valid makefile. The problem is that MPW
-#  uses special non-ASCII characters, which tend to get mangled when stored
-#  in unix tar files, etc. "mactrans" is built as part of the TIFF MPW build.
-#
-#
-
-DEPTH   = ::
-
-# FAX Options: If you do not wish to include the FAX options, uncomment
-# the first four definitions and comment out the next four 
-# definitions. Note that to build programs with the FAX libraries you
-# have to include "-model far" in your compile and link statements.
-#
-# Also, to build the fax code (including the tif_fax3sm.c file, which is
-# created by the MPW tool "mkg3states", also built below), you will
-# need to size the MPW program up to about 6 megabytes or so.
-
-#FAX_OPTIONS = 
-#FAX_OBJECTS = 	
-#FAX_SOURCES = tif_fax3.c 
-#FAX_CONFIG = 
-
-FAX_OPTIONS = -model far
-FAX_OBJECTS = 	tif_fax3.c.o tif_fax3sm.c.o
-FAX_SOURCES = tif_fax3.c tif_fax3sm.c
-FAX_CONFIG = -d CCITT_SUPPORT
-
-NULL=
-
-RM = delete -y -i 
-COPTS = 
-
-LIBPORT=::port:libport.o
-
-#
-.c.o %c4 .c
-	{C} -model far {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
-
-CONF_LIBRARY= %b6
-	-d HAVE_IEEEFP=1 %b6
-	-d BSDTYPES 
-
-CONF_COMPRESSION= %b6
-	{FAX_CONFIG} %b6
-	-d COMPRESSION_SUPPORT %b6
-	-d PACKBITS_SUPPORT 	%b6
-	-d LZW_SUPPORT 	%b6
-	-d THUNDER_SUPPORT %b6
-	-d NEXT_SUPPORT 
-
-CFLAGS=	{FAX_OPTIONS} {IPATH} {CONF_LIBRARY} {CONF_COMPRESSION} 
-
-INCS=	tiff.h tiffio.h
-
-SRCS=	%b6
-	{FAX_SOURCES} %b6
-	tif_apple.c %b6
-	tif_aux.c %b6
-	tif_close.c %b6
-	tif_codec.c %b6
-	tif_compress.c %b6
-	tif_dir.c %b6
-	tif_dirinfo.c %b6
-	tif_dirread.c %b6
-	tif_dirwrite.c %b6
-	tif_dumpmode.c %b6
-	tif_error.c %b6
-	tif_getimage.c %b6
-	tif_jpeg.c %b6
-	tif_flush.c %b6
-	tif_lzw.c %b6
-	tif_next.c %b6
-	tif_open.c %b6
-	tif_packbits.c %b6
-	tif_predict.c %b6
-	tif_print.c %b6
-	tif_read.c %b6
-	tif_swab.c %b6
-	tif_strip.c %b6
-	tif_thunder.c %b6
-	tif_tile.c %b6
-	tif_version.c %b6
-	tif_warning.c %b6
-	tif_write.c %b6
-	tif_zip.c %b6
-	{NULL}
-
-OBJS=	%b6
-	{FAX_OBJECTS} %b6
-	tif_apple.c.o %b6
-	tif_aux.c.o %b6
-	tif_close.c.o %b6
-	tif_codec.c.o %b6
-	tif_compress.c.o %b6
-	tif_dir.c.o %b6
-	tif_dirinfo.c.o %b6
-	tif_dirread.c.o %b6
-	tif_dirwrite.c.o %b6
-	tif_dumpmode.c.o %b6
-	tif_error.c.o %b6
-	tif_getimage.c.o %b6
-	tif_jpeg.c.o %b6
-	tif_flush.c.o %b6
-	tif_lzw.c.o %b6
-	tif_next.c.o %b6
-	tif_open.c.o %b6
-	tif_packbits.c.o %b6
-	tif_predict.c.o %b6
-	tif_print.c.o %b6
-	tif_read.c.o %b6
-	tif_swab.c.o %b6
-	tif_strip.c.o %b6
-	tif_thunder.c.o %b6
-	tif_tile.c.o %b6
-	tif_version.c.o %b6
-	tif_warning.c.o %b6
-	tif_write.c.o %b6
-	tif_zip.c.o %b6
-	{NULL}
-
-ALL=libtiff.o
-
-all %c4 {ALL}
-
-libtiff.o %c4 {OBJS}
-	Lib  {OBJS} -o libtiff.o
-	
-
-{OBJS} %c4 tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
-
-#
-# The finite state machine tables used by the G3/G4 decoders
-# are generated by the mkg3states program.  On systems without
-# make these rules have to be manually carried out.
-#
-tif_fax3sm.c %c4 mkg3states tif_fax3.h
-        {RM} tif_fax3sm.c || set status 0
-	:mkg3states -c const tif_fax3sm.c
-
-mkg3states.c.o %c4 mkg3states.c
-   C -model far  mkg3states.c -o mkg3states.c.o
-
-mkg3states %c4%c4 mkg3states.c.o
-	Link -model far -d -c 'MPS ' -t MPST %b6
-		mkg3states.c.o %b6
-		{LIBPORT} %b6
-		"{CLibraries}"StdClib.o %b6
-		"{Libraries}"Stubs.o %b6
-		"{Libraries}"Runtime.o %b6
-		"{Libraries}"Interface.o %b6
-		-o mkg3states
-
-ALPHA   = "{DEPTH}dist:tiff.alpha"
-VERSION = "{DEPTH}VERSION"
-
-version.h %c4 {VERSION} {ALPHA}
-        Set VERSION1 `catenate {VERSION}` 
-        Set VERSION2 "{VERSION1}`streamedit -e "1 rep /%a5%c5 %c5 (%c5)%a81/ %a81" {ALPHA}`" 
-        delete -y -i version.h || set status 0
-	echo '#define VERSION "LIBTIFF, Version' {VERSION2} '\nCopyright (c) 1988-1995 Sam Leffler\nCopyright (c) 1991-1995 Silicon Graphics, Inc."' >version.h
-
-tif_version.c.o %c4 version.h
-
-clean %c4
-	{RM} {ALL}  || set status 0
-	{RM} {OBJS} || set status 0
-	{RM} mkg3states || set status 0
-	{RM} mkg3states.c.o || set status 0
-	{RM} tif_fax3sm.c%c5 || set status 0
-	{RM} version.h || set status 0
- 
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/mactrans.c b/tkimg1.3/libtiff/contrib/mac-mpw/mactrans.c
deleted file mode 100644
index 5e321b9..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/mactrans.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  mactrans.c  -- Hack filter used to generate MPW files 
- *    with special characters from pure ASCII, denoted "%nn" 
- *    where nn is hex. (except for "%%", which is literal '%').
- *
- *  calling sequence:
- *
- *    catenate file | mactrans [-toascii | -fromascii] > output
- *
- *    Written by: Niles Ritter.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-void to_ascii(void);
-void from_ascii(void);
-
-main(int argc, char *argv[])
-{
-	if (argc<2 || argv[1][1]=='f') from_ascii();
-	else to_ascii();
-	exit (0);
-}
-
-void from_ascii(void)
-{
-    char c;
-    int d;
-    while ((c=getchar())!=EOF)
-    {
-    	if (c!='%' || (c=getchar())=='%') putchar(c);
-	else
-	{
-		ungetc(c,stdin);
-		scanf("%2x",&d);
-		*((unsigned char *)&c) = d;
-		putchar(c);
-	}
-    }
-}
-
-void to_ascii(void)
-{
-    char c;
-    int d;
-    while ((c=getchar())!=EOF)
-    {
-    	if (isascii(c)) putchar (c);
-	else
-	{
-		d = *((unsigned char *)&c);
-		printf("%%%2x",d);
-	}
-    }
-}
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/port.make b/tkimg1.3/libtiff/contrib/mac-mpw/port.make
deleted file mode 100644
index 492c527..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/port.make
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1995 Sam Leffler
-# Copyright (c) 1995 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-DEPTH= ::
-SRCDIR= :
-
-NULL	=
-CC	= C
-AR	= Lib
-AROPTS	= 
-RM= delete -y
-
-IPATH	=  -I {DEPTH} -I {SRCDIR}
-COPTS	= 
-OPTIMIZER=
-CFLAGS	=  {COPTS} {OPTIMIZER} {IPATH}
-
-CFILES	= 
-OBJECTS	= getopt.c.o
-TARGETS	= libport.o
-
-.c.o %c4 .c
-	{CC} -model far {COptions} {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
-all %c4  {TARGETS}
-
-libport.o %c4  {OBJECTS}
-	{AR} {OBJECTS} -o libport.o
-	
-clean %c4
-	{RM} {TARGETS} {OBJECTS} || set status 0
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/tools.make b/tkimg1.3/libtiff/contrib/mac-mpw/tools.make
deleted file mode 100644
index 13b14e4..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/tools.make
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
-# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# Makefile for Mac using MPW 3.2.3 and MPW C 3.2.4
-#
-COPTS = -model far
-
-.c.o %c4 .c
-	{C} {COPTS} {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
-RM = delete -y -i
-
-CONF_LIBRARY= %b6
-	-d USE_CONST=0 %b6
-	-d BSDTYPES
-NULL=
-
-IPATH= -I ::libtiff
-
-CFLAGS=	-w -m {IPATH} {CONF_LIBRARY}
-
-LIBPORT= ::port:libport.o
-
-LOptions= -model far -w -srt -d -c 'MPS ' -t MPST
-
-LIBTIFF= ::libtiff:libtiff.o
-
-LIBS=	{LIBTIFF} %b6
-	{LIBPORT} %b6
-	"{CLibraries}"CSANELib.o  %b6
-	"{CLibraries}"Math.o  %b6
-	"{CLibraries}"StdClib.o  %b6
-	"{Libraries}"Stubs.o  %b6
-	"{Libraries}"Runtime.o  %b6
-	"{Libraries}"Interface.o  %b6
-	"{Libraries}"ToolLibs.o  %b6
-	{NULL}
-
-SRCS= %b6
-	pal2rgb.c %b6
-	ras2tiff.c %b6
-	thumbnail.c %b6
-	tiff2bw.c %b6
-	tiff2ps.c %b6
-	tiffcmp.c %b6
-	tiffcp.c %b6
-	tiffdither.c %b6
-	tiffdump.c %b6
-	tiffinfo.c %b6
-	tiffmedian.c %b6
-	{NULL}
-	
-MACHALL=ras2tiff
-
-ALL= %b6
-	tiffinfo  %b6
-	tiffcmp  %b6
-	tiffcp  %b6
-	tiffdump  %b6
-	tiffmedian  %b6
-	tiff2bw  %b6
-	tiffdither  %b6
-	tiff2ps  %b6
-	pal2rgb  %b6
-	gif2tiff  %b6
-	{MACHALL}
-
-all %c4 {ALL}
-
-tiffinfo %c4 tiffinfo.c.o {LIBTIFF} 
-	Link {LOptions} tiffinfo.c.o {LIBS} -o tiffinfo
-	
-tiffcmp %c4 tiffcmp.c.o {LIBTIFF}
-	Link {LOptions} tiffcmp.c.o {LIBS} -o tiffcmp
-	
-tiffcp %c4 tiffcp.c.o {LIBTIFF}
-	Link {LOptions} tiffcp.c.o {LIBS} -o tiffcp
-	
-tiffdump %c4 tiffdump.c.o {LIBTIFF}
-	Link {LOptions} tiffdump.c.o {LIBS} -o tiffdump 
-	
-tiffmedian %c4 tiffmedian.c.o {LIBTIFF}
-	Link {LOptions} tiffmedian.c.o {LIBS} -o tiffmedian
-	
-tiff2ps %c4 tiff2ps.c.o {LIBTIFF}
-	Link {LOptions} tiff2ps.c.o {LIBS} -o tiff2ps
-	
-# junky stuff...
-# convert RGB image to B&W
-tiff2bw %c4 tiff2bw.c.o {LIBTIFF}
-	Link {LOptions} tiff2bw.c.o {LIBS} -o tiff2bw
-	
-# convert B&W image to bilevel w/ FS dithering
-tiffdither %c4 tiffdither.c.o {LIBTIFF}
-	Link {LOptions} tiffdither.c.o {LIBS} -o tiffdither
-	
-# GIF converter
-gif2tiff %c4 gif2tiff.c.o {LIBTIFF}
-	Link {LOptions} gif2tiff.c.o {LIBS} -o gif2tiff
-	
-# convert Palette image to RGB
-pal2rgb %c4 pal2rgb.c.o {LIBTIFF}
-	Link {LOptions} pal2rgb.c.o {LIBS} -o pal2rgb
-	
-# Sun rasterfile converter
-ras2tiff %c4 ras2tiff.c.o {LIBTIFF}
-	Link {LOptions} ras2tiff.c.o {LIBS} -o ras2tiff
-
-# generate thumbnail images from fax
-thumbnail %c4 thumbnail.c.o {LIBTIFF}
-        Link {LOptions} thumbnail.c.o {LIBS} -o thumbnail
-	
-clean %c4
-	{RM} {ALL} %c5.c.o ycbcr
diff --git a/tkimg1.3/libtiff/contrib/mac-mpw/top.make b/tkimg1.3/libtiff/contrib/mac-mpw/top.make
deleted file mode 100644
index 5a6a29b..0000000
--- a/tkimg1.3/libtiff/contrib/mac-mpw/top.make
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
-# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# Makefile for Mac using MPW 3.2.3 and MPW C 3.2.4
-#
-#
-#  Written by: Niles D. Ritter
-#
-
-RM= delete -y -i
-PORT=:port:
-LIBTIFF=:libtiff:
-TOOLS=:tools:
-CONTRIB=:contrib:mac-mpw:
-
-MACTRANS="{CONTRIB}mactrans"
-
-NULL=
-
-MAKEFILES = %b6
-	{PORT}Makefile %b6
-	{LIBTIFF}Makefile %b6
-	{TOOLS}Makefile %b6
-	{NULL}
-	
-all %c4 PORT LIBTIFF TOOLS
-
-MAKEFILES %c4 {MAKEFILES}
-TOOLS %c4 LIBTIFF
-
-LIBTIFF %c4 PORT
-
-# Create the port routines
-PORT %c4 {PORT}Makefile
-	directory {PORT}
-	(make || set status 0) > build.mpw
-	set echo 1
-	execute build.mpw
-	set echo 0
-	{RM} build.mpw  || set status 0
-	directory ::
-
-# Create the port routines
-LIBTIFF %c4 {LIBTIFF}Makefile
-	directory {LIBTIFF}
-	(make || set status 0) > build.mpw
-	set echo 1
-	execute build.mpw
-	set echo 0
-	{RM} build.mpw  || set status 0
-	directory ::
-
-# Create the tools
-TOOLS %c4 {TOOLS}Makefile
-	directory {TOOLS}
-	(make || set status 0) > build.mpw
-	set echo 1
-	execute build.mpw
-	set echo 0
-	{RM} build.mpw  || set status 0
-	directory ::
-
-# Makefile dependencies
-{PORT}Makefile  %c4 {CONTRIB}port.make
-	catenate {CONTRIB}port.make | {MACTRANS} > {PORT}Makefile
-
-{LIBTIFF}Makefile  %c4 {CONTRIB}libtiff.make
-	catenate {CONTRIB}libtiff.make | {MACTRANS} > {LIBTIFF}Makefile
-
-{TOOLS}Makefile  %c4 {CONTRIB}tools.make
-	catenate {CONTRIB}tools.make | {MACTRANS} > {TOOLS}Makefile
-
-
-clean %c4  clean.port clean.contrib clean.libtiff clean.tools clean.make
-
-clean.port %c4
-	directory {PORT}
-	(make clean || set status 0) > purge
-	purge
-	{RM} purge  || set status 0
-	{RM} Makefile || set status 0
-	{RM} build.mpw || set status 0
-	cd ::
-
-clean.contrib %c4
-	{RM} {MACTRANS} || set status 0
-	
-clean.libtiff %c4
-	directory {LIBTIFF}
-	(make clean || set status 0) > purge
-	purge
-	{RM} purge  || set status 0
-	{RM} Makefile || set status 0
-	{RM} build.mpw || set status 0
-	cd ::
-
-clean.tools %c4
-	directory {TOOLS}
-	(make clean || set status 0) > purge
-	purge
-	{RM} purge  || set status 0
-	{RM} Makefile || set status 0
-	{RM} build.mpw || set status 0
-	cd ::
-
-clean.make %c4
-	{RM} {MAKEFILES} || set status 0
-	{RM} build.mpw || set status 0
-
diff --git a/tkimg1.3/libtiff/contrib/mfs/README b/tkimg1.3/libtiff/contrib/mfs/README
deleted file mode 100644
index 6f9befb..0000000
--- a/tkimg1.3/libtiff/contrib/mfs/README
+++ /dev/null
@@ -1,37 +0,0 @@
-Date:    Mon, 23 Jun 1997 13:30:48 +0200
-To:      <sam at cthulhu.engr.sgi.com>
-
-From:    "Mike Johnson" <mikehunt at swipnet.se>
-Subject: libtiff - Thanks
-
-Return-Path: mikehunt at swipnet.se 
-Delivery-Date: Mon, 23 Jun 1997 06:53:39 -0700
-
-Hi Sam,
-
-I noticed in the README from libtiff that you would like to know about
-what people have done with libtiff, so I thought I would drop you a
-line.
-
-We have used libtiff to create and convert TIFF images of financial
-documents which are sent from and to major document processing systems
-in Sweden and Denmark.
-
-I would like to express my deep gratitude to yourself and Sillicon
-Graphics for making this excellent library available for public use.
-There is obviously a lot of work that has gone in to libtiff and the
-quality of the code and documentation is an example to others.
-
-One thing that libtiff did not do was work on a memory area rather than
-files. In my applications I had already read a TIFF or other format
-file in to memory and did not want to waste I/O writing it out again
-for libtiff's benefit. I therefore constructed a set of functions to
-pass up to TIFFClientOpen to simulate a file in memory. I have attached
-my mfs (memory file system) source code for you to use or junk, as you
-see fit. :-)
-
-Once again, thanks very much for making my life simpler.
-
-Best Regards,
-
-Mike Johnson.
diff --git a/tkimg1.3/libtiff/contrib/mfs/mfs_file.c b/tkimg1.3/libtiff/contrib/mfs/mfs_file.c
deleted file mode 100644
index 53a7c4c..0000000
--- a/tkimg1.3/libtiff/contrib/mfs/mfs_file.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
---------------------------------------------------------------------------------
--   Module      :   mem_file.c
--   Description :   A general purpose library for manipulating a memory area
--                   as if it were a file.
--                   mfs_ stands for memory file system.
--   Author      :   Mike Johnson - Banctec AB 03/07/96
--                   
---------------------------------------------------------------------------------
-*/
-
-/* 
-
-Copyright (c) 1996 Mike Johnson
-Copyright (c) 1996 BancTec AB
-
-Permission to use, copy, modify, distribute, and sell this software
-for any purpose is hereby granted without fee, provided
-that (i) the above copyright notices and this permission notice appear in
-all copies of the software and related documentation, and (ii) the names of
-Mike Johnson and BancTec may not be used in any advertising or
-publicity relating to the software.
-
-THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-
-IN NO EVENT SHALL MIKE JOHNSON OR BANCTEC BE LIABLE FOR
-ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-OF THIS SOFTWARE.
-
-*/
-
-
-/*
---------------------------------------------------------------------------------
--   Includes
---------------------------------------------------------------------------------
-*/
-
-#include    <stdio.h>
-#include    <stdlib.h>
-#include    <string.h>
-
-/*
---------------------------------------------------------------------------------
--   Definitions
---------------------------------------------------------------------------------
-*/
-
-#define MAX_BUFFS   20
-#define FALSE       0
-#define TRUE        1
-
-/*
---------------------------------------------------------------------------------
--   Globals
---------------------------------------------------------------------------------
-*/
-
-static char *buf[MAX_BUFFS];        /* Memory for each open buf */
-static long  buf_off[MAX_BUFFS];    /* File pointer for each buf */
-static long  buf_size[MAX_BUFFS];   /* Count of bytes allocated for each buf */
-static long  fds[MAX_BUFFS];        /* File descriptor status */
-static int   buf_mode[MAX_BUFFS];   /* Mode of buffer (r, w, a) */
-
-static int library_init_done = FALSE;
-
-
-/*
---------------------------------------------------------------------------------
--   Function prototypes
---------------------------------------------------------------------------------
-*/
-
-int mfs_open (void *ptr, int size, char *mode);
-int mfs_lseek (int fd, int offset, int whence);
-int mfs_read (int fd, void *buf, int size);
-int mfs_write (int fd, void *buf, int size);
-int mfs_size (int fd);
-int mfs_map (int fd, char **addr, size_t *len);
-int mfs_unmap (int fd);
-int mfs_close (int fd);
-static int extend_mem_file (int fd, int size);
-static void mem_init ();
-
-/*
---------------------------------------------------------------------------------
--   Function code
---------------------------------------------------------------------------------
-*/
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_open ()
--
--   Arguments   :   Pointer to allocated buffer, initial size of buffer, 
--                   mode spec (r, w, a)
--
--   Returns     :   File descriptor or -1 if error.
--
--   Description :   Register this area of memory (which has been allocated
--                   and has a file read into it) under the mem_file library.
--                   A file descriptor is returned which can the be passed
--                   back to TIFFClientOpen and used as if it was a disk
--                   based fd.
--                   If the call is for mode 'w' then pass (void *)NULL as
--                   the buffer and zero size and the library will 
--                   allocate memory for you.
--                   If the mode is append then pass (void *)NULL and size
--                   zero or with a valid address.
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_open (void *buffer, int size, char *mode)
-{
-    int ret, i;
-    void *tmp;
-
-    if (library_init_done == FALSE)
-    {
-        mem_init ();
-        library_init_done = TRUE;
-    }
-
-    ret = -1;
-
-    /* Find a free fd */
-
-    for (i = 0; i < MAX_BUFFS; i++)
-    {
-        if (fds[i] == -1)
-        {
-            ret = i;
-            break;
-        }
-    }
-
-    if (i == MAX_BUFFS)     /* No more free descriptors */
-    {
-        ret = -1;
-        errno = EMFILE;
-    }
-
-    if (ret >= 0 && *mode == 'r')
-    {
-        if (buffer == (void *)NULL)
-        {
-            ret = -1;
-            errno = EINVAL;
-        }
-        else
-        {
-            buf[ret] = (char *)buffer;
-            buf_size[ret] = size;
-            buf_off[ret] = 0;
-        }
-    }
-    else if (ret >= 0 && *mode == 'w')
-    {
-
-        if (buffer != (void *)NULL)
-        {
-            ret = -1;
-            errno = EINVAL;
-        }
-
-        else
-        {
-            tmp = malloc (0);   /* Get a pointer */
-            if (tmp == (void *)NULL)
-            {
-                ret = -1;
-                errno = EDQUOT;
-            }
-            else
-            {
-                buf[ret] = (char *)tmp;
-                buf_size[ret] = 0;
-                buf_off[ret] = 0;
-            }
-        }
-    }
-    else if (ret >= 0 && *mode == 'a')
-    {
-        if (buffer == (void *) NULL)    /* Create space for client */
-        {
-            tmp = malloc (0);   /* Get a pointer */
-            if (tmp == (void *)NULL)
-            {
-                ret = -1;
-                errno = EDQUOT;
-            }
-            else
-            {
-                buf[ret] = (char *)tmp;
-                buf_size[ret] = 0;
-                buf_off[ret] = 0;
-            }
-        }
-        else                            /* Client has file read in already */
-        {
-            buf[ret] = (char *)buffer;
-            buf_size[ret] = size;
-            buf_off[ret] = 0;
-        }
-    }
-    else        /* Some other invalid combination of parameters */
-    {
-        ret = -1;
-        errno = EINVAL;
-    }
-
-    if (ret != -1)
-    {
-        fds[ret] = 0;
-        buf_mode[ret] = *mode;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_lseek ()
--
--   Arguments   :   File descriptor, offset, whence
--
--   Returns     :   as per man lseek (2)
--
--   Description :   Does the same as lseek (2) except on a memory based file.
--                   Note: the memory area will be extended if the caller
--                   attempts to seek past the current end of file (memory).
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_lseek (int fd, int offset, int whence)
-{
-    int ret;
-    long test_off;
-
-    if (fds[fd] == -1)  /* Not open */
-    {
-        ret = -1;
-        errno = EBADF;
-    }
-    else if (offset < 0 && whence == SEEK_SET)
-    {
-        ret = -1;
-        errno = EINVAL;
-    }
-    else
-    {
-        switch (whence)
-        {
-            case SEEK_SET:
-                if (offset > buf_size[fd])
-                    extend_mem_file (fd, offset);
-                buf_off[fd] = offset;
-                ret = offset;
-                break;
-
-            case SEEK_CUR:
-                test_off = buf_off[fd] + offset;
-
-                if (test_off < 0)
-                {
-                    ret = -1;
-                    errno = EINVAL;
-                }
-                else
-                {
-                    if (test_off > buf_size[fd])
-                        extend_mem_file (fd, test_off);
-                    buf_off[fd] = test_off;
-                    ret = test_off;
-                }
-                break;
-
-            case SEEK_END:
-                test_off = buf_size[fd] + offset;
-
-                if (test_off < 0)
-                {
-                    ret = -1;
-                    errno = EINVAL;
-                }
-                else
-                {
-                    if (test_off > buf_size[fd])
-                        extend_mem_file (fd, test_off);
-                    buf_off[fd] = test_off;
-                    ret = test_off;
-                }
-                break;
-
-            default:
-                errno = EINVAL;
-                ret = -1;
-                break;
-        }
-    }
-
-    return (ret);
-}   
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_read ()
--
--   Arguments   :   File descriptor, buffer, size
--
--   Returns     :   as per man read (2)
--
--   Description :   Does the same as read (2) except on a memory based file.
--                   Note: An attempt to read past the end of memory currently
--                   allocated to the file will return 0 (End Of File)
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_read (int fd, void *clnt_buf, int size)
-{
-    int ret;
-
-    if (fds[fd] == -1 || buf_mode[fd] != 'r')
-    {
-        /* File is either not open, or not opened for read */
-
-        ret = -1;
-        errno = EBADF;
-    }
-    else if (buf_off[fd] + size > buf_size[fd])
-    {
-        ret = 0;        /* EOF */
-    }
-    else
-    {
-        memcpy (clnt_buf, (void *) (buf[fd] + buf_off[fd]), size);
-        buf_off[fd] = buf_off[fd] + size;
-        ret = size;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_write ()
--
--   Arguments   :   File descriptor, buffer, size
--
--   Returns     :   as per man write (2)
--
--   Description :   Does the same as write (2) except on a memory based file.
--                   Note: the memory area will be extended if the caller
--                   attempts to write past the current end of file (memory).
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_write (int fd, void *clnt_buf, int size)
-{
-    int ret;
-
-    if (fds[fd] == -1 || buf_mode[fd] == 'r')
-    {
-        /* Either the file is not open or it is opened for reading only */
-
-        ret = -1;
-        errno = EBADF;
-    }
-    else if (buf_mode[fd] == 'w')
-    {
-        /* Write */
-
-        if (buf_off[fd] + size > buf_size[fd])
-        {       
-            extend_mem_file (fd, buf_off[fd] + size);
-            buf_size[fd] = (buf_off[fd] + size);
-        }
-
-        memcpy ((buf[fd] + buf_off[fd]), clnt_buf, size);
-        buf_off[fd] = buf_off[fd] + size;
-
-        ret = size;
-    }
-    else
-    {
-        /* Append */
-
-        if (buf_off[fd] != buf_size[fd])
-            buf_off[fd] = buf_size[fd];
-
-        extend_mem_file (fd, buf_off[fd] + size);
-        buf_size[fd] += size;
-
-        memcpy ((buf[fd] + buf_off[fd]), clnt_buf, size);
-        buf_off[fd] = buf_off[fd] + size;
-
-        ret = size;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_size ()
--
--   Arguments   :   File descriptor
--
--   Returns     :   integer file size
--
--   Description :   This function returns the current size of the file in bytes.
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_size (int fd)
-{
-    int ret;
-
-    if (fds[fd] == -1)  /* Not open */
-    {
-        ret = -1;
-        errno = EBADF;
-    }
-    else
-        ret = buf_size[fd];
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_map ()
--
--   Arguments   :   File descriptor, ptr to address, ptr to length
--
--   Returns     :   Map status (succeeded or otherwise)
--
--   Description :   This function tells the client where the file is mapped
--                   in memory and what size the mapped area is. It is provided
--                   to satisfy the MapProc function in libtiff. It pretends
--                   that the file has been mmap (2)ped.
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_map (int fd, char **addr, size_t *len)
-{
-    int ret; 
-
-    if (fds[fd] == -1)  /* Not open */
-    {
-        ret = -1;
-        errno = EBADF;
-    }
-    else
-    {
-        *addr = buf[fd];
-        *len = buf_size[fd];
-        ret = 0;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_unmap ()
--
--   Arguments   :   File descriptor
--
--   Returns     :   UnMap status (succeeded or otherwise)
--
--   Description :   This function does nothing as the file is always
--                   in memory.
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_unmap (int fd)
-{
-    return (0);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mfs_close ()
--
--   Arguments   :   File descriptor
--
--   Returns     :   close status (succeeded or otherwise)
--
--   Description :   Close the open memory file. (Make fd available again.)
--                   
---------------------------------------------------------------------------------
-*/
-
-int mfs_close (int fd)
-{
-    int ret; 
-
-    if (fds[fd] == -1)  /* Not open */
-    {
-        ret = -1;
-        errno = EBADF;
-    }
-    else
-    {
-        fds[fd] = -1;
-        ret = 0;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   extend_mem_file ()
--
--   Arguments   :   File descriptor, length to extend to.
--
--   Returns     :   0 - All OK, -1 - realloc () failed.
--
--   Description :   Increase the amount of memory allocated to a file.
--                   
---------------------------------------------------------------------------------
-*/
-
-static int extend_mem_file (int fd, int size)
-{
-    void *new_mem;
-    int ret;
-
-    if ((new_mem = realloc (buf[fd], size)) == (void *) NULL)
-        ret = -1;
-    else
-    {
-        buf[fd] = (char *) new_mem;
-        ret = 0;
-    }
-
-    return (ret);
-}
-
-/*
---------------------------------------------------------------------------------
--   Function    :   mem_init ()
--
--   Arguments   :   None
--
--   Returns     :   void
--
--   Description :   Initialise the library.
--                   
---------------------------------------------------------------------------------
-*/
-
-static void mem_init ()
-{
-    int i;
-
-    for (i = 0; i < MAX_BUFFS; i++)
-    {
-        fds[i] = -1;
-        buf[i] = (char *)NULL;
-        buf_size[i] = 0;
-        buf_off[i] = 0;
-    }
-}
-
diff --git a/tkimg1.3/libtiff/contrib/ojpeg/README b/tkimg1.3/libtiff/contrib/ojpeg/README
deleted file mode 100644
index bae3d62..0000000
--- a/tkimg1.3/libtiff/contrib/ojpeg/README
+++ /dev/null
@@ -1,23 +0,0 @@
-
-For the broadest possible support for OJPEG files the following steps are 
-necessary:
-
- o Ensure you are able to build with JPEG support (see config.site).
-
- o #define OJPEG_SUPPORT somewhere.  This can be put in tiffconf.h for
-   instance.
-
- o Append the jdhuff_add.c code to the end of jdhuff.c within the IJG JPEG
-   libraries jdhuff.c file and recompile libjpeg (jpeg-6b tested).
-
- o Rebuild cleanly.
-
-
-OJPEG support implemented by Scott Marovich at HP (marovich at hpl.hp.com).
-
----
-
-For notes on further improved JPEG-in-TIFF support also see the following
-bug in bugzilla:
-
-  http://bugzilla.remotesensing.org/show_bug.cgi?id=156
diff --git a/tkimg1.3/libtiff/contrib/ojpeg/jdhuff_add.c b/tkimg1.3/libtiff/contrib/ojpeg/jdhuff_add.c
deleted file mode 100644
index 8d4221b..0000000
--- a/tkimg1.3/libtiff/contrib/ojpeg/jdhuff_add.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * BEWARE OF KLUDGE:  This subroutine is a hack for decoding illegal JPEG-in-
- *                    TIFF encapsulations produced by Microsoft's Wang Imaging
- * for Windows application with the public-domain TIFF Library.  Based upon an
- * examination of selected output files, this program apparently divides a JPEG
- * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
- * encoder's/decoder's DC coefficients for each image component are reset before
- * each "strip".  Moreover, a "strip" is not necessarily encoded in a multiple
- * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
- * for alignment to the next input-Byte storage boundary.  IJG JPEG Library
- * decoder state is not normally exposed to client applications, so this sub-
- * routine provides the TIFF Library with a "hook" to make these corrections.
- * It should be called after "jpeg_start_decompress()" and before
- * "jpeg_finish_decompress()", just before decoding each "strip" using
- * "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
- *
- * This kludge is not sanctioned or supported by the Independent JPEG Group, and
- * future changes to the IJG JPEG Library might invalidate it.  Do not send bug
- * reports about this code to IJG developers.  Instead, contact the author for
- * advice: Scott B. Marovich <marovich at hpl.hp.com>, Hewlett-Packard Labs, 6/01.
- */
-GLOBAL(void)
-jpeg_reset_huff_decode (register j_decompress_ptr cinfo,register float *refbw)
-{ register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
-  register int ci = 0;
-
-  /* Re-initialize DC predictions */
-  do entropy->saved.last_dc_val[ci] = -refbw[ci << 1];
-  while (++ci < cinfo->comps_in_scan);
-  /* Discard encoded input bits, up to the next Byte boundary */
-  entropy->bitstate.bits_left &= ~7;
-}
diff --git a/tkimg1.3/libtiff/contrib/pds/README b/tkimg1.3/libtiff/contrib/pds/README
deleted file mode 100644
index b9abc6b..0000000
--- a/tkimg1.3/libtiff/contrib/pds/README
+++ /dev/null
@@ -1,90 +0,0 @@
-Date:    Fri, 01 Aug 1997 20:14:52 MDT
-To:      Sam Leffler <sam at cthulhu.engr.sgi.com>
-
-From:    "Conrad J. Poelman (WSAT)" <poelmanc at plk.af.mil>
-Subject: Potential TIFF library additions
-
-Delivery-Date: Fri, 01 Aug 1997 19:21:06 -0700
-
-Sam,
-
-You probably don't remember me, but I sent in a couple of bug fixes
-regarding the TIFF library about a 16 months ago or so...
-
-I just wanted to send you two other additions that I have made to our
-local version of the TIFF library in hopes that you will want to
-incorporate them into your next major release of the TIFF library.
-(These additions are based on TIFF version 3.4beta31, but they sit on
-top of the library so they shouldn't be much trouble to incorporate them
-into any more recent version.) They are internally documented to a
-reasonable extent and we've been successfully using them in our code
-here for over a year. If you think they would make good additions to the
-TIFF library, I'd be happy to clean them up more, document them more,
-and/or integrate them with the latest version of the TIFF library, but I
-figured I'd see if you were interested in using them before I went to
-all that trouble.
-
-TIFF Image Iterator
--------------------
-Your ReadRGBA() routine works well for reading many different formats
-(TILED, STIP, compressed or not, etc.) of the most basic types of data
-(RGB, 8-bit greyscale, 8-bit colormapped) into an SGI-style data array,
-and serves as a good template for users with other needs. I used it as
-an exmaple of how to make an iterator which, rather than fill a data
-array, calls an arbitrary user-supplied callback function for each
-"chunk" of data - that "chunk" might be a strip or a tile, and might
-have one sample-per-pixel or two, and might be 8-bit data or 16-bit or
-24-bit. The callback function can do whatever it wants with the data -
-store it in a big array, convert it to RGBA, or draw it directly to the
-screen. I was able to use this iterator to read 16-bit greyscale and 32-
-and 64-bit floating point data, which wasn't possible with ReadRGBA().
-
-I have tested this routine with 8- and 16-bit greyscale data as well as
-with 32- and 64-bit floating point data. I believe nearly all of our
-data is organized in strips, so actually I'd appreciate it if you had
-some tiled images that I could test it with.
-
-It should certainly be possible and would be cleanest to reimplement
-ReadRGBA() in terms of the image iterator, but I haven't done that.
-
-
-Private Sub-Directory Read/Write
---------------------------------
-TIFF-PL is a Phillips Laboratory extension to the TIFF tags that allows
-us to store satellite imaging-specific information in a TIFF format,
-such as the satellite's trajectory, the imaging time, etc. In order to
-give us the flexibility to modify the tag definitions without getting
-approval from the TIFF committee every time, we were given only three
-TIFF tags - a PL signature, a PL version number, and PL directory
-offset, which lists the position in the file at which to find a private
-sub-directory of tags-value pairs. So I wrote two routines:
-TIFFWritePrivateDataSubDirectory(), which takes a list of tags and a
-"get" function and writes the tag values into the TIFF file, returning
-the offset within the file at which it wrote the directory; and
-TIFFReadPrivateDataSubDirectory(), which takes an offset, a list of
-tags, and a "set" function and reads all the data from the private
-directory. The functions themselves are pretty simple. (The files are
-huge because I had to basically copy all of the tif_dirread.c and
-tif_dirwrite.c files in order to access the various fetching routines
-which were all declared static and therefore inaccessible in the TIFF
-library.)
-
-
-I'm including the four source files (tif_imgiter.h, tif_imgiter.c,
-tif_pdsdirread.c, tif_pdsdirwrite.c) in case you want to take a look at
-them. I can also send you some sample code that uses them if you like.
-If you're interested in having them incorporated into the standard TIFF
-library, I'd be happy to do that integration and clean up and document
-the routines. (For example, I've already realized that instead of
-limiting the SEP callback function to three bands (R,G,B) it should take
-an array to enable the handling of n-banded multi-spectral data...) If
-not, I'll just leave them as they are, since they work fine for us now.
-
-Holler if you have any questions.
-
--- Conrad
-__________________________________________________________________
-  Capt Conrad J. Poelman         PL/WSAT   (Phillips Laboratory)
-    505-846-4347                   3550 Aberdeen Ave SE 
-      (FAX) 505-846-4374             Kirtland AFB, NM 87117-5776
-
diff --git a/tkimg1.3/libtiff/contrib/pds/tif_imageiter.c b/tkimg1.3/libtiff/contrib/pds/tif_imageiter.c
deleted file mode 100644
index 74f3ce9..0000000
--- a/tkimg1.3/libtiff/contrib/pds/tif_imageiter.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/pds/tif_imageiter.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1996 Sam Leffler
- * Copyright (c) 1991-1996 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Written by Conrad J. Poelman, PL/WSAT, Kirtland AFB, NM on 26 Mar 96.
- *
- * This file contains code to allow a calling program to "iterate" over each
- * pixels in an image as it is read from the file. The iterator takes care of
- * reading strips versus (possibly clipped) tiles, decoding the information
- * according to the decoding method, and so on, so that calling program can
- * ignore those details. The calling program does, however, need to be
- * conscious of the type of the pixel data that it is receiving.
- *
- * For reasons of efficiency, the callback function actually gets called for 
- * "blocks" of pixels rather than for individual pixels. The format of the
- * callback arguments is given below.
- *
- * This code was taken from TIFFReadRGBAImage() in tif_getimage.c of the original
- * TIFF distribution, and simplified and generalized to provide this general
- * iteration capability. Those routines could certainly be re-implemented in terms
- * of a TIFFImageIter if desired.
- *
- */
-#include "tiffiop.h"
-#include "tif_imgiter.h"
-#include <assert.h>
-#include <stdio.h>
-
-static	int gtTileContig(TIFFImageIter*, void *udata, uint32, uint32);
-static	int gtTileSeparate(TIFFImageIter*, void *udata, uint32, uint32);
-static	int gtStripContig(TIFFImageIter*, void *udata, uint32, uint32);
-static	int gtStripSeparate(TIFFImageIter*, void *udata, uint32, uint32);
-
-static	const char photoTag[] = "PhotometricInterpretation";
-
-static int
-isCCITTCompression(TIFF* tif)
-{
-    uint16 compress;
-    TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
-    return (compress == COMPRESSION_CCITTFAX3 ||
-	    compress == COMPRESSION_CCITTFAX4 ||
-	    compress == COMPRESSION_CCITTRLE ||
-	    compress == COMPRESSION_CCITTRLEW);
-}
-
-int
-TIFFImageIterBegin(TIFFImageIter* img, TIFF* tif, int stop, char emsg[1024])
-{
-    uint16* sampleinfo;
-    uint16 extrasamples;
-    uint16 planarconfig;
-    int colorchannels;
-
-    img->tif = tif;
-    img->stoponerr = stop;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
-    img->alpha = 0;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
-	&extrasamples, &sampleinfo);
-    if (extrasamples == 1)
-	switch (sampleinfo[0]) {
-	case EXTRASAMPLE_ASSOCALPHA:	/* data is pre-multiplied */
-	case EXTRASAMPLE_UNASSALPHA:	/* data is not pre-multiplied */
-	    img->alpha = sampleinfo[0];
-	    break;
-	}
-    colorchannels = img->samplesperpixel - extrasamples;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
-    if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
-	switch (colorchannels) {
-	case 1:
-	    if (isCCITTCompression(tif))
-		img->photometric = PHOTOMETRIC_MINISWHITE;
-	    else
-		img->photometric = PHOTOMETRIC_MINISBLACK;
-	    break;
-	case 3:
-	    img->photometric = PHOTOMETRIC_RGB;
-	    break;
-	default:
-	    sprintf(emsg, "Missing needed %s tag", photoTag);
-	    return (0);
-	}
-    }
-    switch (img->photometric) {
-    case PHOTOMETRIC_PALETTE:
-	if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
-	    &img->redcmap, &img->greencmap, &img->bluecmap)) {
-	    TIFFError(TIFFFileName(tif), "Missing required \"Colormap\" tag");
-	    return (0);
-	}
-	/* fall thru... */
-    case PHOTOMETRIC_MINISWHITE:
-    case PHOTOMETRIC_MINISBLACK:
-/* This should work now so skip the check - BSR
-	if (planarconfig == PLANARCONFIG_CONTIG && img->samplesperpixel != 1) {
-	    sprintf(emsg,
-		"Sorry, can not handle contiguous data with %s=%d, and %s=%d",
-		photoTag, img->photometric,
-		"Samples/pixel", img->samplesperpixel);
-	    return (0);
-	}
- */
-	break;
-    case PHOTOMETRIC_YCBCR:
-	if (planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
-		"Planarconfiguration", planarconfig);
-	    return (0);
-	}
-	/* It would probably be nice to have a reality check here. */
-	{ uint16 compress;
-	  TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
-	  if (compress == COMPRESSION_JPEG && planarconfig == PLANARCONFIG_CONTIG) {
-	    /* can rely on libjpeg to convert to RGB */
-	    /* XXX should restore current state on exit */
-	    TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-	    img->photometric = PHOTOMETRIC_RGB;
-	  }
-	}
-	break;
-    case PHOTOMETRIC_RGB: 
-	if (colorchannels < 3) {
-	    sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
-		"Color channels", colorchannels);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_SEPARATED: {
-	uint16 inkset;
-	TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
-	if (inkset != INKSET_CMYK) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"InkSet", inkset);
-	    return (0);
-	}
-	if (img->samplesperpixel != 4) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"Samples/pixel", img->samplesperpixel);
-	    return (0);
-	}
-	break;
-    }
-    default:
-	sprintf(emsg, "Sorry, can not handle image with %s=%d",
-	    photoTag, img->photometric);
-	return (0);
-    }
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
-
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
-    switch (img->orientation) {
-    case ORIENTATION_BOTRIGHT:
-    case ORIENTATION_RIGHTBOT:	/* XXX */
-    case ORIENTATION_LEFTBOT:	/* XXX */
-	TIFFWarning(TIFFFileName(tif), "using bottom-left orientation");
-	img->orientation = ORIENTATION_BOTLEFT;
-	/* fall thru... */
-    case ORIENTATION_BOTLEFT:
-	break;
-    case ORIENTATION_TOPRIGHT:
-    case ORIENTATION_RIGHTTOP:	/* XXX */
-    case ORIENTATION_LEFTTOP:	/* XXX */
-    default:
-	TIFFWarning(TIFFFileName(tif), "using top-left orientation");
-	img->orientation = ORIENTATION_TOPLEFT;
-	/* fall thru... */
-    case ORIENTATION_TOPLEFT:
-	break;
-    }
-
-    img->isContig =
-	!(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
-    if (img->isContig) {
-	img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig;
-    } else {
-	img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate;
-    }
-    return (1);
-}
-
-int
-TIFFImageIterGet(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
-{
-    if (img->get == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No \"get\" routine setup");
-	return (0);
-    }
-    if (img->callback.any == NULL) {
-	TIFFError(TIFFFileName(img->tif),
-	    "No \"put\" routine setupl; probably can not handle image format");
-	return (0);
-    }
-    return (*img->get)(img, udata, w, h);
-}
-
-TIFFImageIterEnd(TIFFImageIter* img)
-{
-    /* Nothing to free... ? */
-}
-
-/*
- * Read the specified image into an ABGR-format raster.
- */
-int
-TIFFReadImageIter(TIFF* tif,
-    uint32 rwidth, uint32 rheight, uint8* raster, int stop)
-{
-    char emsg[1024];
-    TIFFImageIter img;
-    int ok;
-
-    if (TIFFImageIterBegin(&img, tif, stop, emsg)) {
-	/* XXX verify rwidth and rheight against width and height */
-	ok = TIFFImageIterGet(&img, raster, rwidth, img.height);
-	TIFFImageIterEnd(&img);
-    } else {
-	TIFFError(TIFFFileName(tif), emsg);
-	ok = 0;
-    }
-    return (ok);
-}
-
-
-/*
- * Get an tile-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtTileContig(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    ImageIterTileContigRoutine callback = img->callback.contig;
-    uint16 orientation;
-    uint32 col, row;
-    uint32 tw, th;
-    u_char* buf;
-    int32 fromskew;
-    uint32 nrow;
-
-    buf = (u_char*) _TIFFmalloc(TIFFTileSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-    orientation = img->orientation;
-    for (row = 0; row < h; row += th) {
-	nrow = (row + th > h ? h - row : th);
-	for (col = 0; col < w; col += tw) {
-	    if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0 && img->stoponerr)
-		break;
-	    if (col + tw > w) {
-		/*
-		 * Tile is clipped horizontally.  Calculate
-		 * visible portion and skewing factors.
-		 */
-		uint32 npix = w - col;
-		fromskew = tw - npix;
-		(*callback)(img, udata, col, row, npix, nrow, fromskew, buf);
-	    } else {
-		(*callback)(img, udata, col, row, tw, nrow, 0, buf);
-	    }
-	}
-    }
-    _TIFFfree(buf);
-    return (1);
-}
-
-/*
- * Get an tile-organized image that has
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */	
-static int
-gtTileSeparate(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    ImageIterTileSeparateRoutine callback = img->callback.separate;
-    uint16 orientation;
-    uint32 col, row;
-    uint32 tw, th;
-    u_char* buf;
-    u_char* r;
-    u_char* g;
-    u_char* b;
-    u_char* a;
-    tsize_t tilesize;
-    int32 fromskew;
-    int alpha = img->alpha;
-    uint32 nrow;
-
-    tilesize = TIFFTileSize(tif);
-    buf = (u_char*) _TIFFmalloc(4*tilesize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    r = buf;
-    g = r + tilesize;
-    b = g + tilesize;
-    a = b + tilesize;
-    if (!alpha)
-	memset(a, 0xff, tilesize);
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-    orientation = img->orientation;
-    for (row = 0; row < h; row += th) {
-	nrow = (row + th > h ? h - row : th);
-	for (col = 0; col < w; col += tw) {
-	    if (TIFFReadTile(tif, r, col, row,0,0) < 0 && img->stoponerr)
-		break;
-	    if (TIFFReadTile(tif, g, col, row,0,1) < 0 && img->stoponerr)
-		break;
-	    if (TIFFReadTile(tif, b, col, row,0,2) < 0 && img->stoponerr)
-		break;
-	    if (alpha && TIFFReadTile(tif,a,col,row,0,3) < 0 && img->stoponerr)
-		break;
-	    if (col + tw > w) {
-		/*
-		 * Tile is clipped horizontally.  Calculate
-		 * visible portion and skewing factors.
-		 */
-		uint32 npix = w - col;
-		fromskew = tw - npix;
-		(*callback)(img, udata, col, row, npix, nrow, fromskew, r, g, b, a);
-	    } else {
-		(*callback)(img, udata, col, row, tw, nrow, 0, r, g, b, a);
-	    }
-	}
-    }
-    _TIFFfree(buf);
-    return (1);
-}
-
-/*
- * Get a strip-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtStripContig(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    ImageIterTileContigRoutine callback = img->callback.contig;
-    uint16 orientation;
-    uint32 row, nrow;
-    u_char* buf;
-    uint32 rowsperstrip;
-    uint32 imagewidth = img->width;
-    tsize_t scanline;
-    int32 fromskew;
-
-    buf = (u_char*) _TIFFmalloc(TIFFStripSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for strip buffer");
-	return (0);
-    }
-    orientation = img->orientation;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += rowsperstrip) {
-	nrow = (row + rowsperstrip > h ? h - row : rowsperstrip);
-	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0),
-	    buf, nrow*scanline) < 0 && img->stoponerr)
-		break;
-	(*callback)(img, udata, 0, row, w, nrow, fromskew, buf);
-    }
-    _TIFFfree(buf);
-    return (1);
-}
-
-/*
- * Get a strip-organized image with
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */
-static int
-gtStripSeparate(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    ImageIterTileSeparateRoutine callback = img->callback.separate;
-    uint16 orientation;
-    u_char *buf;
-    u_char *r, *g, *b, *a;
-    uint32 row, nrow;
-    tsize_t scanline;
-    uint32 rowsperstrip;
-    uint32 imagewidth = img->width;
-    tsize_t stripsize;
-    int32 fromskew;
-    int alpha = img->alpha;
-
-    stripsize = TIFFStripSize(tif);
-    r = buf = (u_char *)_TIFFmalloc(4*stripsize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    g = r + stripsize;
-    b = g + stripsize;
-    a = b + stripsize;
-    if (!alpha)
-	memset(a, 0xff, stripsize);
-    orientation = img->orientation;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += rowsperstrip) {
-	nrow = (row + rowsperstrip > h ? h - row : rowsperstrip);
-	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0),
-	    r, nrow*scanline) < 0 && img->stoponerr)
-	    break;
-	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 1),
-	    g, nrow*scanline) < 0 && img->stoponerr)
-	    break;
-	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 2),
-	    b, nrow*scanline) < 0 && img->stoponerr)
-	    break;
-	if (alpha &&
-	    (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 3),
-	    a, nrow*scanline) < 0 && img->stoponerr))
-	    break;
-	(*callback)(img, udata, 0, row, w, nrow, fromskew, r, g, b, a);
-    }
-    _TIFFfree(buf);
-    return (1);
-}
-
-DECLAREContigCallbackFunc(TestContigCallback)
-{
-    printf("Contig Callback called with x = %d, y = %d, w = %d, h = %d, fromskew = %d\n",
-	   x, y, w, h, fromskew);
-}
-
-
-DECLARESepCallbackFunc(TestSepCallback)
-{
-    printf("Sep Callback called with x = %d, y = %d, w = %d, h = %d, fromskew = %d\n",
-	   x, y, w, h, fromskew);
-}
-
-
-#ifdef MAIN
-main(int argc, char **argv)
-{
-    char emsg[1024];
-    TIFFImageIter img;
-    int ok;
-    int stop = 1;
-
-    TIFF *tif;
-    unsigned long nx, ny;
-    unsigned short BitsPerSample, SamplesPerPixel;
-    int isColorMapped, isPliFile;
-    unsigned char *ColorMap;
-    unsigned char *data;
-
-    if (argc < 2) {
-	fprintf(stderr,"usage: %s tiff_file\n",argv[0]);
-	exit(1);
-    }
-    tif = (TIFF *)PLIGetImage(argv[1], (void *) &data, &ColorMap, 
-			      &nx, &ny, &BitsPerSample, &SamplesPerPixel, 
-			      &isColorMapped, &isPliFile);
-    if (tif != NULL) {
-
-	if (TIFFImageIterBegin(&img, tif, stop, emsg)) {
-	    /* Here need to set data and callback function! */
-	    if (img.isContig) {
-		img.callback = TestContigCallback;
-	    } else {
-		img.callback = TestSepCallback;
-	    }
-	    ok = TIFFImageIterGet(&img, NULL, img.width, img.height);
-	    TIFFImageIterEnd(&img);
-	} else {
-	    TIFFError(TIFFFileName(tif), emsg);
-	}
-    }
-    
-}
-#endif
diff --git a/tkimg1.3/libtiff/contrib/pds/tif_imageiter.h b/tkimg1.3/libtiff/contrib/pds/tif_imageiter.h
deleted file mode 100644
index 5b7ea40..0000000
--- a/tkimg1.3/libtiff/contrib/pds/tif_imageiter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-typedef struct _TIFFImageIter TIFFImageIter;
-
-/* The callback function is called for each "block" of image pixel data after
-   it has been read from the file and decoded. This image pixel data is in the
-   buffer pp, and this data represents the image pixels from (x,y) to
-   (x+w,y+h). It is stored in pixel format, so each pixel contains
-   img->samplesperpixel consecutive samples each containing img->bitspersample
-   bits of data. The array pp is ordered in h consecutive rows of w+fromskew
-   pixels each. */
-typedef void (*ImageIterTileContigRoutine)
-    (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
-	unsigned char*);
-#define	DECLAREContigCallbackFunc(name) \
-static void name(\
-    TIFFImageIter* img, \
-    void* user_data, \
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h, \
-    int32 fromskew, \
-    u_char* pp \
-)
-
-typedef void (*ImageIterTileSeparateRoutine)
-    (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
-	unsigned char*, unsigned char*, unsigned char*, unsigned char*);
-#define	DECLARESepCallbackFunc(name) \
-static void name(\
-    TIFFImageIter* img, \
-    void* user_data, \
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h,\
-    int32 fromskew, \
-    u_char* r, u_char* g, u_char* b, u_char* a\
-)
-
-struct _TIFFImageIter {
-	TIFF*	tif;				/* image handle */
-	int	stoponerr;			/* stop on read error */
-	int	isContig;			/* data is packed/separate */
-	int	alpha;				/* type of alpha data present */
-	uint32	width;				/* image width */
-	uint32	height;				/* image height */
-	uint16	bitspersample;			/* image bits/sample */
-	uint16	samplesperpixel;		/* image samples/pixel */
-	uint16	orientation;			/* image orientation */
-	uint16	photometric;			/* image photometric interp */
-	uint16*	redcmap;			/* colormap pallete */
-	uint16*	greencmap;
-	uint16*	bluecmap;
-						/* get image data routine */
-	int	(*get)(TIFFImageIter*, void *udata, uint32, uint32);
-	union {
-	    void (*any)(TIFFImageIter*);
-	    ImageIterTileContigRoutine		contig;
-	    ImageIterTileSeparateRoutine	separate;
-	} callback;				/* fn to exec for each block */
-};
diff --git a/tkimg1.3/libtiff/contrib/pds/tif_pdsdirread.c b/tkimg1.3/libtiff/contrib/pds/tif_pdsdirread.c
deleted file mode 100644
index f2be1b3..0000000
--- a/tkimg1.3/libtiff/contrib/pds/tif_pdsdirread.c
+++ /dev/null
@@ -1,1124 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/pds/tif_pdsdirread.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1996 Sam Leffler
- * Copyright (c) 1991-1996 Silicon Graphics, Inc.
- * Copyright (c( 1996 USAF Phillips Laboratory
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- * 
- * These routines written by Conrad J. Poelman on a single late-night of
- * March 20-21, 1996.
- *
- * The entire purpose of this file is to provide a single external function,
- * TIFFReadPrivateDataSubDirectory(). This function is intended for use in reading a
- * private subdirectory from a TIFF file into a private structure. The
- * actual writing of data into the structure is handled by the setFieldFn(),
- * which is passed to TIFFReadPrivateDataSubDirectory() as a parameter. The idea is to
- * enable any application wishing to store private subdirectories to do so
- * easily using this function, without modifying the TIFF library.
- *
- * The astute observer will notice that only two functions are at all different
- * from the original tif_dirread.c file: TIFFReadPrivateDataSubDirectory() and
- * TIFFFetchNormalSubTag(). All the other stuff that makes this file so huge
- * is only necessary because all of those functions are declared static in
- * tif_dirread.c, so we have to totally duplicate them in order to use them.
- *
- * Oh, also note the bug fix in TIFFFetchFloat().
- *
- */
-
-#include "tiffiop.h"
-
-#define	IGNORE	0		/* tag placeholder used below */
-
-#if HAVE_IEEEFP
-#define	TIFFCvtIEEEFloatToNative(tif, n, fp)
-#define	TIFFCvtIEEEDoubleToNative(tif, n, dp)
-#else
-extern	void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*);
-extern	void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*);
-#endif
-
-static	void EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16);
-static	void MissingRequired(TIFF*, const char*);
-static	int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
-static	tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*);
-static	tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*);
-static	float TIFFFetchRational(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchNormalSubTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*,
-				  int (*getFieldFn)(TIFF *tif,ttag_t tag,...));
-static	int TIFFFetchPerSampleShorts(TIFF*, TIFFDirEntry*, int*);
-static	int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*);
-static	int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**);
-static	int TIFFFetchExtraSamples(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*);
-static	float TIFFFetchFloat(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*);
-static	int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchAnyArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortPair(TIFF*, TIFFDirEntry*);
-#if STRIPCHOP_SUPPORT
-static	void ChopUpSingleUncompressedStrip(TIFF*);
-#endif
-
-static char *
-CheckMalloc(TIFF* tif, tsize_t n, const char* what)
-{
-	char *cp = (char*)_TIFFmalloc(n);
-	if (cp == NULL)
-		TIFFError(tif->tif_name, "No space %s", what);
-	return (cp);
-}
-
-/* Just as was done with TIFFWritePrivateDataSubDirectory(), here we implement
-   TIFFReadPrivateDataSubDirectory() which takes an offset into the TIFF file,
-   a TIFFFieldInfo structure specifying the types of the various tags,
-   and a function to use to set individual tags when they are encountered.
-   The data is read from the file, translated using the TIFF library's
-   built-in machine-independent conversion functions, and filled into
-   private subdirectory structure.
-
-   This code was written by copying the original TIFFReadDirectory() function
-   from tif_dirread.c and paring it down to what is needed for this.
-
-   It is the caller's responsibility to allocate and initialize the internal
-   structure that setFieldFn() will be writing into. If this function is being
-   called more than once before closing the file, the caller also must be
-   careful to free data in the structure before re-initializing.
-
-   It is also the caller's responsibility to verify the presence of
-   any required fields after reading the directory in.
-*/
-
-
-int
-TIFFReadPrivateDataSubDirectory(TIFF* tif, toff_t pdir_offset,
-				TIFFFieldInfo *field_info,
-				int (*setFieldFn)(TIFF *tif, ttag_t tag, ...))
-{
-	register TIFFDirEntry* dp;
-	register int n;
-	register TIFFDirectory* td;
-	TIFFDirEntry* dir;
-	int iv;
-	long v;
-	double dv;
-	const TIFFFieldInfo* fip;
-	int fix;
-	uint16 dircount;
-	uint32 nextdiroff;
-	char* cp;
-	int diroutoforderwarning = 0;
-
-	/* Skipped part about checking for directories or compression data. */
-
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, pdir_offset)) {
-			TIFFError(tif->tif_name,
-			    "Seek error accessing TIFF private subdirectory");
-			return (0);
-		}
-		if (!ReadOK(tif, &dircount, sizeof (uint16))) {
-			TIFFError(tif->tif_name,
-			    "Can not read TIFF private subdirectory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory");
-		if (dir == NULL)
-			return (0);
-		if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
-			TIFFError(tif->tif_name, "Can not read TIFF private subdirectory");
-			goto bad;
-		}
-		/*
-		 * Read offset to next directory for sequential scans.
-		 */
-		(void) ReadOK(tif, &nextdiroff, sizeof (uint32));
-	} else {
-		toff_t off = pdir_offset;
-
-		if (off + sizeof (short) > tif->tif_size) {
-			TIFFError(tif->tif_name,
-			    "Can not read TIFF private subdirectory count");
-			return (0);
-		} else
-			_TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
-		off += sizeof (uint16);
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory");
-		if (dir == NULL)
-			return (0);
-		if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) {
-			TIFFError(tif->tif_name, "Can not read TIFF private subdirectory");
-			goto bad;
-		} else
-			_TIFFmemcpy(dir, tif->tif_base + off,
-			    dircount*sizeof (TIFFDirEntry));
-		off += dircount* sizeof (TIFFDirEntry);
-		if (off + sizeof (uint32) < tif->tif_size)
-			_TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32));
-	}
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&nextdiroff);
-
-	/*
-	 * Setup default value and then make a pass over
-	 * the fields to check type and tag information,
-	 * and to extract info required to size data
-	 * structures.  A second pass is made afterwards
-	 * to read in everthing not taken in the first pass.
-	 */
-	td = &tif->tif_dir;
-	
-	for (fip = field_info, dp = dir, n = dircount;
-	     n > 0; n--, dp++) {
-		if (tif->tif_flags & TIFF_SWAB) {
-			TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dp->tdir_count, 2);
-		}
-		/*
-		 * Find the field information entry for this tag.
-		 */
-		/*
-		 * Silicon Beach (at least) writes unordered
-		 * directory tags (violating the spec).  Handle
-		 * it here, but be obnoxious (maybe they'll fix it?).
-		 */
-		if (dp->tdir_tag < fip->field_tag) {
-			if (!diroutoforderwarning) {
-				TIFFWarning(tif->tif_name,
-	"invalid TIFF private subdirectory; tags are not sorted in ascending order");
-				diroutoforderwarning = 1;
-			}
-			fip = field_info;    /* O(n^2) */
-		}
-
-		while (fip->field_tag && fip->field_tag < dp->tdir_tag)
-			fip++;
-		if (!fip->field_tag || fip->field_tag != dp->tdir_tag) {
-			TIFFWarning(tif->tif_name,
-			    "unknown field with tag %d (0x%x) in private subdirectory ignored",
-			    dp->tdir_tag,  dp->tdir_tag);
-			dp->tdir_tag = IGNORE;
-			fip = field_info;/* restart search */
-			continue;
-		}
-		/*
-		 * Null out old tags that we ignore.
-		 */
-
-		/* Not implemented yet, since FIELD_IGNORE is specific to
-		   the main directories. Could pass this in too... */
-		if (0 /* && fip->field_bit == FIELD_IGNORE */) {
-	ignore:
-			dp->tdir_tag = IGNORE;
-			continue;
-		}
-
-		/*
-		 * Check data type.
-		 */
-
-		while (dp->tdir_type != (u_short)fip->field_type) {
-			if (fip->field_type == TIFF_ANY)	/* wildcard */
-				break;
-			fip++;
-			if (!fip->field_tag || fip->field_tag != dp->tdir_tag) {
-				TIFFWarning(tif->tif_name,
-				   "wrong data type %d for \"%s\"; tag ignored",
-				    dp->tdir_type, fip[-1].field_name);
-				goto ignore;
-			}
-		}
-		/*
-		 * Check count if known in advance.
-		 */
-		if (fip->field_readcount != TIFF_VARIABLE) {
-			uint32 expected = (fip->field_readcount == TIFF_SPP) ?
-			    (uint32) td->td_samplesperpixel :
-			    (uint32) fip->field_readcount;
-			if (!CheckDirCount(tif, dp, expected))
-				goto ignore;
-		}
-
-		/* Now read in and process data from field. */
-		if (!TIFFFetchNormalSubTag(tif, dp, fip, setFieldFn))
-		    goto bad;
-
-	}
-
-	if (dir)
-		_TIFFfree(dir);
-	return (1);
-bad:
-	if (dir)
-		_TIFFfree(dir);
-	return (0);
-}
-
-static void
-EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
-{
-	register TIFFDirEntry *dp;
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint16 i;
-
-	if (td->td_stripbytecount)
-		_TIFFfree(td->td_stripbytecount);
-	td->td_stripbytecount = (uint32*)
-	    CheckMalloc(tif, td->td_nstrips * sizeof (uint32),
-		"for \"StripByteCounts\" array");
-	if (td->td_compression != COMPRESSION_NONE) {
-		uint32 space = (uint32)(sizeof (TIFFHeader)
-		    + sizeof (uint16)
-		    + (dircount * sizeof (TIFFDirEntry))
-		    + sizeof (uint32));
-		toff_t filesize = TIFFGetFileSize(tif);
-		uint16 n;
-
-		/* calculate amount of space used by indirect values */
-		for (dp = dir, n = dircount; n > 0; n--, dp++) {
-			uint32 cc = dp->tdir_count*TIFFDataWidth(dp->tdir_type);
-			if (cc > sizeof (uint32))
-				space += cc;
-		}
-		space = (filesize - space) / td->td_samplesperpixel;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = space;
-		/*
-		 * This gross hack handles the case were the offset to
-		 * the last strip is past the place where we think the strip
-		 * should begin.  Since a strip of data must be contiguous,
-		 * it's safe to assume that we've overestimated the amount
-		 * of data in the strip and trim this number back accordingly.
-		 */ 
-		i--;
-		if (td->td_stripoffset[i] + td->td_stripbytecount[i] > filesize)
-			td->td_stripbytecount[i] =
-			    filesize - td->td_stripoffset[i];
-	} else {
-		uint32 rowbytes = TIFFScanlineSize(tif);
-		uint32 rowsperstrip = td->td_imagelength / td->td_nstrips;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = rowbytes*rowsperstrip;
-	}
-	TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
-	if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP))
-		td->td_rowsperstrip = td->td_imagelength;
-}
-
-static void
-MissingRequired(TIFF* tif, const char* tagname)
-{
-	TIFFError(tif->tif_name,
-	    "TIFF directory is missing required \"%s\" field", tagname);
-}
-
-/*
- * Check the count field of a directory
- * entry against a known value.  The caller
- * is expected to skip/ignore the tag if
- * there is a mismatch.
- */
-static int
-CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
-{
-	if (count != dir->tdir_count) {
-		TIFFWarning(tif->tif_name,
-	"incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-		    dir->tdir_count, count);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Fetch a contiguous directory item.
- */
-static tsize_t
-TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	int w = TIFFDataWidth(dir->tdir_type);
-	tsize_t cc = dir->tdir_count * w;
-
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, dir->tdir_offset))
-			goto bad;
-		if (!ReadOK(tif, cp, cc))
-			goto bad;
-	} else {
-		if (dir->tdir_offset + cc > tif->tif_size)
-			goto bad;
-		_TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc);
-	}
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	return (cc);
-bad:
-	TIFFError(tif->tif_name, "Error fetching data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return ((tsize_t) 0);
-}
-
-/*
- * Fetch an ASCII item from the file.
- */
-static tsize_t
-TIFFFetchString(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count <= 4) {
-		uint32 l = dir->tdir_offset;
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&l);
-		_TIFFmemcpy(cp, &l, dir->tdir_count);
-		return (1);
-	}
-	return (TIFFFetchData(tif, dir, cp));
-}
-
-/*
- * Convert numerator+denominator to float.
- */
-static int
-cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
-{
-	if (denom == 0) {
-		TIFFError(tif->tif_name,
-		    "%s: Rational with zero denominator (num = %lu)",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
-		return (0);
-	} else {
-		if (dir->tdir_type == TIFF_RATIONAL)
-			*rv = ((float)num / (float)denom);
-		else
-			*rv = ((float)(int32)num / (float)(int32)denom);
-		return (1);
-	}
-}
-
-/*
- * Fetch a rational item from the file
- * at offset off and return the value
- * as a floating point number.
- */
-static float
-TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint32 l[2];
-	float v;
-
-	return (!TIFFFetchData(tif, dir, (char *)l) ||
-	    !cvtRational(tif, dir, l[0], l[1], &v) ? 1.0f : v);
-}
-
-/*
- * Fetch a single floating point value
- * from the offset field and return it
- * as a native float.
- */
-static float
-TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir)
-{
-	/* This appears to be a flagrant bug in the TIFF library, yet I
-	   actually don't understand how it could have ever worked the old
-	   way. Look at the comments in my new code and you'll understand. */
-#if (0)
-	float v = (float)
-	    TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
-	TIFFCvtIEEEFloatToNative(tif, 1, &v);
-#else
-	float v;
-	/* This is a little bit tricky - if we just cast the uint32 to a float,
-	   C will perform a numerical conversion, which is not what we want.
-	   We want to take the actual bit pattern in the uint32 and interpret
-	   it as a float. Thus we cast a uint32 * into a float * and then
-	   dereference to get v. */
-	uint32 l = (uint32)
-	    TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
-	v = * (float *) &l;
-	TIFFCvtIEEEFloatToNative(tif, 1, &v);
-#endif
-	return (v);
-
-}
-
-/*
- * Fetch an array of BYTE or SBYTE values.
- */
-static int
-TIFFFetchByteArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-	if (dir->tdir_count <= 4) {
-		/*
-		 * Extract data from offset field.
-		 */
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			switch (dir->tdir_count) {
-			case 4: v[3] = dir->tdir_offset & 0xff;
-			case 3: v[2] = (dir->tdir_offset >> 8) & 0xff;
-			case 2: v[1] = (dir->tdir_offset >> 16) & 0xff;
-			case 1: v[0] = dir->tdir_offset >> 24;
-			}
-		} else {
-			switch (dir->tdir_count) {
-			case 4: v[3] = dir->tdir_offset >> 24;
-			case 3: v[2] = (dir->tdir_offset >> 16) & 0xff;
-			case 2: v[1] = (dir->tdir_offset >> 8) & 0xff;
-			case 1: v[0] = dir->tdir_offset & 0xff;
-			}
-		}
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char*) v) != 0);	/* XXX */
-}
-
-/*
- * Fetch an array of SHORT or SSHORT values.
- */
-static int
-TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-	if (dir->tdir_count <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			switch (dir->tdir_count) {
-			case 2: v[1] = dir->tdir_offset & 0xffff;
-			case 1: v[0] = dir->tdir_offset >> 16;
-			}
-		} else {
-			switch (dir->tdir_count) {
-			case 2: v[1] = dir->tdir_offset >> 16;
-			case 1: v[0] = dir->tdir_offset & 0xffff;
-			}
-		}
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char *)v) != 0);
-}
-
-/*
- * Fetch a pair of SHORT or BYTE values.
- */
-static int
-TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 v[2];
-	int ok = 0;
-
-	switch (dir->tdir_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		ok = TIFFFetchShortArray(tif, dir, v);
-		break;
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		ok  = TIFFFetchByteArray(tif, dir, v);
-		break;
-	}
-	if (ok)
-		TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
-	return (ok);
-}
-
-/*
- * Fetch an array of LONG or SLONG values.
- */
-static int
-TIFFFetchLongArray(TIFF* tif, TIFFDirEntry* dir, uint32* v)
-{
-	if (dir->tdir_count == 1) {
-		v[0] = dir->tdir_offset;
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char*) v) != 0);
-}
-
-/*
- * Fetch an array of RATIONAL or SRATIONAL values.
- */
-static int
-TIFFFetchRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-	int ok = 0;
-	uint32* l;
-
-	l = (uint32*)CheckMalloc(tif,
-	    dir->tdir_count*TIFFDataWidth(dir->tdir_type),
-	    "to fetch array of rationals");
-	if (l) {
-		if (TIFFFetchData(tif, dir, (char *)l)) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++) {
-				ok = cvtRational(tif, dir,
-				    l[2*i+0], l[2*i+1], &v[i]);
-				if (!ok)
-					break;
-			}
-		}
-		_TIFFfree((char *)l);
-	}
-	return (ok);
-}
-
-/*
- * Fetch an array of FLOAT values.
- */
-static int
-TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-
-	if (dir->tdir_count == 1) {
-		v[0] = *(float*) &dir->tdir_offset;
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of DOUBLE values.
- */
-static int
-TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of ANY values.  The actual values are
- * returned as doubles which should be able hold all the
- * types.  Yes, there really should be an tany_t to avoid
- * this potential non-portability ...  Note in particular
- * that we assume that the double return value vector is
- * large enough to read in any fundamental type.  We use
- * that vector as a buffer to read in the base type vector
- * and then convert it in place to double (from end
- * to front of course).
- */
-static int
-TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	int i;
-
-	switch (dir->tdir_type) {
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		if (!TIFFFetchByteArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_BYTE) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (!TIFFFetchShortArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_SHORT) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-		if (!TIFFFetchLongArray(tif, dir, (uint32*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_LONG) {
-			uint32* vp = (uint32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int32* vp = (int32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (!TIFFFetchRationalArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_FLOAT:
-		if (!TIFFFetchFloatArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFFetchDoubleArray(tif, dir, (double*) v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		TIFFError(tif->tif_name,
-		    "Cannot read TIFF_ANY type %d for field \"%s\"",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-		return (0);
-	}
-	return (1);
-}
-
-
-/*
- * Fetch a tag that is not handled by special case code.
- */
-/* The standard function TIFFFetchNormalTag() could definitely be replaced
-   with a simple call to this function, just adding TIFFSetField() as the
-   last argument. */
-static int
-TIFFFetchNormalSubTag(TIFF* tif, TIFFDirEntry* dp, const TIFFFieldInfo* fip,
-		      int (*setFieldFn)(TIFF *tif, ttag_t tag, ...))
-{
-	static char mesg[] = "to fetch tag value";
-	int ok = 0;
-
-	if (dp->tdir_count > 1) {		/* array of values */
-		char* cp = NULL;
-
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-			/* NB: always expand BYTE values to shorts */
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint32), mesg);
-			ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_FLOAT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_DOUBLE:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (double), mesg);
-			ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp);
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			/*
-			 * Some vendors write strings w/o the trailing
-			 * NULL byte, so always append one just in case.
-			 */
-			cp = CheckMalloc(tif, dp->tdir_count+1, mesg);
-			if (ok = (cp && TIFFFetchString(tif, dp, cp)))
-				cp[dp->tdir_count] = '\0';	/* XXX */
-			break;
-		}
-		if (ok) {
-			ok = (fip->field_passcount ?
-			    (*setFieldFn)(tif, dp->tdir_tag, dp->tdir_count, cp)
-			  : (*setFieldFn)(tif, dp->tdir_tag, cp));
-		}
-		if (cp != NULL)
-			_TIFFfree(cp);
-	} else if (CheckDirCount(tif, dp, 1)) {	/* singleton value */
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			/*
-			 * If the tag is also acceptable as a LONG or SLONG
-			 * then (*setFieldFn) will expect an uint32 parameter
-			 * passed to it (through varargs).  Thus, for machines
-			 * where sizeof (int) != sizeof (uint32) we must do
-			 * a careful check here.  It's hard to say if this
-			 * is worth optimizing.
-			 *
-			 * NB: We use TIFFFieldWithTag here knowing that
-			 *     it returns us the first entry in the table
-			 *     for the tag and that that entry is for the
-			 *     widest potential data type the tag may have.
-			 */
-			{ TIFFDataType type = fip->field_type;
-			  if (type != TIFF_LONG && type != TIFF_SLONG) {
-				uint16 v = (uint16)
-			   TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-				ok = (fip->field_passcount ?
-				    (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
-				  : (*setFieldFn)(tif, dp->tdir_tag, v));
-				break;
-			  }
-			}
-			/* fall thru... */
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			{ uint32 v32 =
-		    TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-			  ok = (fip->field_passcount ? 
-			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v32)
-			    : (*setFieldFn)(tif, dp->tdir_tag, v32));
-			}
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-		case TIFF_FLOAT:
-			{ float v = (dp->tdir_type == TIFF_FLOAT ? 
-			      TIFFFetchFloat(tif, dp)
-			    : TIFFFetchRational(tif, dp));
-			  ok = (fip->field_passcount ?
-			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
-			    : (*setFieldFn)(tif, dp->tdir_tag, v));
-			}
-			break;
-		case TIFF_DOUBLE:
-			{ double v;
-			  ok = (TIFFFetchDoubleArray(tif, dp, &v) &&
-			    (fip->field_passcount ?
-			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
-			    : (*setFieldFn)(tif, dp->tdir_tag, v))
-			  );
-			}
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			{ char c[2];
-			  if (ok = (TIFFFetchString(tif, dp, c) != 0)) {
-				c[1] = '\0';		/* XXX paranoid */
-				ok = (*setFieldFn)(tif, dp->tdir_tag, c);
-			  }
-			}
-			break;
-		}
-	}
-	return (ok);
-}
-
-/* Everything after this is exactly duplicated from the standard tif_dirread.c
-   file, necessitated by the fact that they are declared static there so
-   we can't call them!
-*/
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch samples/pixel short values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl)
-{
-	int samples = tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		uint16 buf[10];
-		uint16* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-		if (TIFFFetchShortArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree((char*) v);
-	}
-	return (status);
-}
-
-/*
- * Fetch samples/pixel ANY values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
-{
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		double buf[10];
-		double* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (double*) _TIFFmalloc(samples * sizeof (double));
-		if (TIFFFetchAnyArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree(v);
-	}
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Fetch a set of offsets or lengths.
- * While this routine says "strips",
- * in fact it's also used for tiles.
- */
-static int
-TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
-{
-	register uint32* lp;
-	int status;
-
-	if (!CheckDirCount(tif, dir, (uint32) nstrips))
-		return (0);
-	/*
-	 * Allocate space for strip information.
-	 */
-	if (*lpp == NULL &&
-	    (*lpp = (uint32 *)CheckMalloc(tif,
-	      nstrips * sizeof (uint32), "for strip array")) == NULL)
-		return (0);
-	lp = *lpp;
-	if (dir->tdir_type == (int)TIFF_SHORT) {
-		/*
-		 * Handle uint16->uint32 expansion.
-		 */
-		uint16* dp = (uint16*) CheckMalloc(tif,
-		    dir->tdir_count* sizeof (uint16), "to fetch strip tag");
-		if (dp == NULL)
-			return (0);
-		if (status = TIFFFetchShortArray(tif, dir, dp)) {
-			register uint16* wp = dp;
-			while (nstrips-- > 0)
-				*lp++ = *wp++;
-		}
-		_TIFFfree((char*) dp);
-	} else
-		status = TIFFFetchLongArray(tif, dir, lp);
-	return (status);
-}
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch and set the ExtraSamples tag.
- */
-static int
-TIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 buf[10];
-	uint16* v = buf;
-	int status;
-
-	if (dir->tdir_count > NITEMS(buf))
-		v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16));
-	if (dir->tdir_type == TIFF_BYTE)
-		status = TIFFFetchByteArray(tif, dir, v);
-	else
-		status = TIFFFetchShortArray(tif, dir, v);
-	if (status)
-		status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v);
-	if (v != buf)
-		_TIFFfree((char*) v);
-	return (status);
-}
-#undef NITEMS
-
-#ifdef COLORIMETRY_SUPPORT
-/*
- * Fetch and set the RefBlackWhite tag.
- */
-static int
-TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir)
-{
-	static char mesg[] = "for \"ReferenceBlackWhite\" array";
-	char* cp;
-	int ok;
-
-	if (dir->tdir_type == TIFF_RATIONAL)
-		return (1/*TIFFFetchNormalTag(tif, dir) just so linker won't complain - this part of the code is never used anyway */);
-	/*
-	 * Handle LONG's for backward compatibility.
-	 */
-	cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg);
-	if (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) {
-		float* fp = (float*)
-		    CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg);
-		if (ok = (fp != NULL)) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++)
-				fp[i] = (float)((uint32*) cp)[i];
-			ok = TIFFSetField(tif, dir->tdir_tag, fp);
-			_TIFFfree((char*) fp);
-		}
-	}
-	if (cp)
-		_TIFFfree(cp);
-	return (ok);
-}
-#endif
-
-#if STRIPCHOP_SUPPORT
-/*
- * Replace a single strip (tile) of uncompressed data by
- * multiple strips (tiles), each approximately 8Kbytes.
- * This is useful for dealing with large images or
- * for dealing with machines with a limited amount
- * memory.
- */
-static void
-ChopUpSingleUncompressedStrip(TIFF* tif)
-{
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint32 bytecount = td->td_stripbytecount[0];
-	uint32 offset = td->td_stripoffset[0];
-	tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes;
-	tstrip_t strip, nstrips, rowsperstrip;
-	uint32* newcounts;
-	uint32* newoffsets;
-
-	/*
-	 * Make the rows hold at least one
-	 * scanline, but fill 8k if possible.
-	 */
-	if (rowbytes > 8192) {
-		stripbytes = rowbytes;
-		rowsperstrip = 1;
-	} else {
-		rowsperstrip = 8192 / rowbytes;
-		stripbytes = rowbytes * rowsperstrip;
-	}
-	/* never increase the number of strips in an image */
-	if (rowsperstrip >= td->td_rowsperstrip)
-		return;
-	nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes);
-	newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripByteCounts\" array");
-	newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripOffsets\" array");
-	if (newcounts == NULL || newoffsets == NULL) {
-	        /*
-		 * Unable to allocate new strip information, give
-		 * up and use the original one strip information.
-		 */
-		if (newcounts != NULL)
-			_TIFFfree(newcounts);
-		if (newoffsets != NULL)
-			_TIFFfree(newoffsets);
-		return;
-	}
-	/*
-	 * Fill the strip information arrays with
-	 * new bytecounts and offsets that reflect
-	 * the broken-up format.
-	 */
-	for (strip = 0; strip < nstrips; strip++) {
-		if (stripbytes > bytecount)
-			stripbytes = bytecount;
-		newcounts[strip] = stripbytes;
-		newoffsets[strip] = offset;
-		offset += stripbytes;
-		bytecount -= stripbytes;
-	}
-	/*
-	 * Replace old single strip info with multi-strip info.
-	 */
-	td->td_stripsperimage = td->td_nstrips = nstrips;
-	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-	_TIFFfree(td->td_stripbytecount);
-	_TIFFfree(td->td_stripoffset);
-	td->td_stripbytecount = newcounts;
-	td->td_stripoffset = newoffsets;
-}
-#endif /* STRIPCHOP_SUPPORT */
diff --git a/tkimg1.3/libtiff/contrib/pds/tif_pdsdirwrite.c b/tkimg1.3/libtiff/contrib/pds/tif_pdsdirwrite.c
deleted file mode 100644
index 11cdf2c..0000000
--- a/tkimg1.3/libtiff/contrib/pds/tif_pdsdirwrite.c
+++ /dev/null
@@ -1,964 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/contrib/pds/tif_pdsdirwrite.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/* When writing data to TIFF files, it is often useful to store application-
-   specific data in a private TIFF directory so that the tags don't need to
-   be registered and won't conflict with other people's user-defined tags.
-   One needs to have a registered public tag which contains some amount of
-   raw data. That raw data, however, is interpreted at an independent,
-   separate, private tiff directory. This file provides some routines which
-   will be useful for converting that data from its raw binary form into
-   the proper form for your application.
-*/
-
-/*
- * Copyright (c) 1988-1996 Sam Leffler
- * Copyright (c) 1991-1996 Silicon Graphics, Inc.
- * Copyright (c( 1996 USAF Phillips Laboratory
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * These routines written by Conrad J. Poelman on a single late-night of
- * March 20-21, 1996.
- *
- * The entire purpose of this file is to provide a single external function,
- * TIFFWritePrivateDataSubDirectory(). This function is intended for use
- * in writing a private subdirectory structure into a TIFF file. The
- * actual reading of data from the structure is handled by the getFieldFn(),
- * which is passed to TIFFWritePrivateDataSubDirectory() as a parameter. The
- * idea is to enable any application wishing to read private subdirectories to
- * do so easily using this function, without modifying the TIFF library.
- *
- * The astute observer will notice that only two functions are at all different
- * from the original tif_dirwrite.c file: TIFFWritePrivateDataSubDirectory()and
- * TIFFWriteNormalSubTag(). All the other stuff that makes this file so huge
- * is only necessary because all of those functions are declared static in
- * tif_dirwrite.c, so we have to totally duplicate them in order to use them.
- *
- * Oh, also please note the bug-fix in the routine TIFFWriteNormalSubTag(),
- * which equally should be applied to TIFFWriteNormalTag().
- *
- */
-#include "tiffiop.h"
-
-#if HAVE_IEEEFP
-#define	TIFFCvtNativeToIEEEFloat(tif, n, fp)
-#define	TIFFCvtNativeToIEEEDouble(tif, n, dp)
-#else
-extern	void TIFFCvtNativeToIEEEFloat(TIFF*, uint32, float*);
-extern	void TIFFCvtNativeToIEEEDouble(TIFF*, uint32, double*);
-#endif
-
-static	int TIFFWriteNormalTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*);
-static	int TIFFWriteNormalSubTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*,
-				  int (*getFieldFn)(TIFF *tif,ttag_t tag,...));
-static	void TIFFSetupShortLong(TIFF*, ttag_t, TIFFDirEntry*, uint32);
-static	int TIFFSetupShortPair(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleShorts(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleAnys(TIFF*, TIFFDataType, ttag_t, TIFFDirEntry*);
-static	int TIFFWriteShortTable(TIFF*, ttag_t, TIFFDirEntry*, uint32, uint16**);
-static	int TIFFWriteShortArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint16*);
-static	int TIFFWriteLongArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint32*);
-static	int TIFFWriteRationalArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteFloatArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteDoubleArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-static	int TIFFWriteByteArray(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFWriteAnyArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-#ifdef COLORIMETRY_SUPPORT
-static	int TIFFWriteTransferFunction(TIFF*, TIFFDirEntry*);
-#endif
-static	int TIFFWriteData(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFLinkDirectory(TIFF*);
-
-#define	WriteRationalPair(type, tag1, v1, tag2, v2) {		\
-	if (!TIFFWriteRational(tif, type, tag1, dir, v1))	\
-		goto bad;					\
-	if (!TIFFWriteRational(tif, type, tag2, dir+1, v2))	\
-		goto bad;					\
-	dir++;							\
-}
-#define	TIFFWriteRational(tif, type, tag, dir, v) \
-	TIFFWriteRationalArray((tif), (type), (tag), (dir), 1, &(v))
-#ifndef TIFFWriteRational
-static	int TIFFWriteRational(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, float);
-#endif
-
-/* This function will write an entire directory to the disk, and return the
-   offset value indicating where in the file it wrote the beginning of the
-   directory structure. This is NOT the same as the offset value before
-   calling this function, because some of the fields may have caused various
-   data items to be written out BEFORE writing the directory structure.
-
-   This code was basically written by ripping of the TIFFWriteDirectory() 
-   code and generalizing it, using RPS's TIFFWritePliIfd() code for
-   inspiration.  My original goal was to make this code general enough that
-   the original TIFFWriteDirectory() could be rewritten to just call this
-   function with the appropriate field and field-accessing arguments.
-
-   However, now I realize that there's a lot of code that gets executed for
-   the main, standard TIFF directories that does not apply to special
-   private subdirectories, so such a reimplementation for the sake of
-   eliminating redundant or duplicate code is probably not possible,
-   unless we also pass in a Main flag to indiciate which type of handling
-   to do, which would be kind of a hack. I've marked those places where I
-   changed or ripped out code which would have to be re-inserted to
-   generalize this function. If it can be done in a clean and graceful way,
-   it would be a great way to generalize the TIFF library. Otherwise, I'll
-   just leave this code here where it duplicates but remains on top of and
-   hopefully mostly independent of the main TIFF library.
-
-   The caller will probably want to free the sub directory structure after
-   returning from this call, since otherwise once written out, the user
-   is likely to forget about it and leave data lying around.
-*/
-toff_t
-TIFFWritePrivateDataSubDirectory(TIFF* tif,
-				 uint32 pdir_fieldsset[], int pdir_fields_last,
-				 TIFFFieldInfo *field_info,
-				 int (*getFieldFn)(TIFF *tif, ttag_t tag, ...))
-{
-	uint16 dircount;
-	uint32 diroff, nextdiroff;
-	ttag_t tag;
-	uint32 nfields;
-	tsize_t dirsize;
-	char* data;
-	TIFFDirEntry* dir;
-	u_long b, *fields, fields_size;
-	toff_t directory_offset;
-	TIFFFieldInfo* fip;
-
-	/*
-	 * Deleted out all of the encoder flushing and such code from here -
-	 * not necessary for subdirectories.
-	 */
-
-	/* Finish writing out any image data. */
-	TIFFFlushData(tif);
-
-	/*
-	 * Size the directory so that we can calculate
-	 * offsets for the data items that aren't kept
-	 * in-place in each field.
-	 */
-	nfields = 0;
-	for (b = 0; b <= pdir_fields_last; b++)
-		if (FieldSet(pdir_fieldsset, b))
-			/* Deleted code to make size of first 4 tags 2
-			   instead of 1. */
-			nfields += 1;
-	dirsize = nfields * sizeof (TIFFDirEntry);
-	data = (char*) _TIFFmalloc(dirsize);
-	if (data == NULL) {
-		TIFFError(tif->tif_name,
-		    "Cannot write private subdirectory, out of space");
-		return (0);
-	}
-	/*
-	 * Place directory in data section of the file. If there isn't one
-	 * yet, place it at the end of the file. The directory is treated as
-	 * data, so we don't link it into the directory structure at all.
-	 */
-	if (tif->tif_dataoff == 0)
-	    tif->tif_dataoff =(TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
-	diroff = tif->tif_dataoff;
-	tif->tif_dataoff = (toff_t)(
-	    diroff + sizeof (uint16) + dirsize + sizeof (toff_t));
-	if (tif->tif_dataoff & 1)
-		tif->tif_dataoff++;
-	(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
-	/*tif->tif_curdir++;*/
-	dir = (TIFFDirEntry*) data;
-	/*
-	 * Setup external form of directory
-	 * entries and write data items.
-	 */
-	/*
-	 * We make a local copy of the fieldsset here so that we don't mess
-	 * up the original one when we call ResetFieldBit(). But I'm not sure
-	 * why the original code calls ResetFieldBit(), since we're already
-	 * going through the fields in order...
-	 *
-	 * fields_size is the number of uint32's we will need to hold the
-	 * bit-mask for all of the fields. If our highest field number is
-	 * 100, then we'll need 100 / (8*4)+1 == 4 uint32's to hold the
-	 * fieldset.
-	 *
-	 * Unlike the original code, we allocate fields dynamically based
-	 * on the requested pdir_fields_last value, allowing private
-	 * data subdirectories to contain more than the built-in code's limit
-	 * of 95 tags in a directory.
-	 */
-	fields_size = pdir_fields_last / (8*sizeof(uint32)) + 1;
-	fields = _TIFFmalloc(fields_size*sizeof(uint32));
-	_TIFFmemcpy(fields, pdir_fieldsset, fields_size * sizeof(uint32));
-
-	/* Deleted "write out extra samples tag" code here. */
-
-	/* Deleted code for checking a billion little special cases for the
-	 * standard TIFF tags. Should add a general mechanism for overloading
-	 * write function for each field, just like Brian kept telling me!!!
-	 */
-	for (fip = field_info; fip->field_tag; fip++) {
-		/* Deleted code to check for FIELD_IGNORE!! */
-		if (/* fip->field_bit == FIELD_IGNORE || */
-		    !FieldSet(fields, fip->field_bit))
-			continue;
-		if (!TIFFWriteNormalSubTag(tif, dir, fip, getFieldFn))
-			goto bad;
-		dir++;
-		ResetFieldBit(fields, fip->field_bit);
-	}
-
-	/* Now we've written all of the referenced data, and are about to
-	   write the main directory structure, so grab the tif_dataoff value
-	   now so we can remember where we wrote the directory. */
-	directory_offset = tif->tif_dataoff;
-
-	/*
-	 * Write directory.
-	 */
-	dircount = (uint16) nfields;
-	/* Deleted code to link to the next directory - we set it to zero! */
-	nextdiroff = 0;
-	if (tif->tif_flags & TIFF_SWAB) {
-		/*
-		 * The file's byte order is opposite to the
-		 * native machine architecture.  We overwrite
-		 * the directory information with impunity
-		 * because it'll be released below after we
-		 * write it to the file.  Note that all the
-		 * other tag construction routines assume that
-		 * we do this byte-swapping; i.e. they only
-		 * byte-swap indirect data.
-		 */
-		for (dir = (TIFFDirEntry*) data; dircount; dir++, dircount--) {
-			TIFFSwabArrayOfShort(&dir->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dir->tdir_count, 2);
-		}
-		dircount = (uint16) nfields;
-		TIFFSwabShort(&dircount);
-		TIFFSwabLong(&nextdiroff);
-	}
-
-	(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
-	if (!WriteOK(tif, &dircount, sizeof (dircount))) {
-		TIFFError(tif->tif_name, "Error writing private subdirectory count");
-		goto bad;
-	}
-	if (!WriteOK(tif, data, dirsize)) {
-		TIFFError(tif->tif_name, "Error writing private subdirectory contents");
-		goto bad;
-	}
-	if (!WriteOK(tif, &nextdiroff, sizeof (nextdiroff))) {
-		TIFFError(tif->tif_name, "Error writing private subdirectory link");
-		goto bad;
-	}
-	tif->tif_dataoff += sizeof(dircount) + dirsize + sizeof(nextdiroff);
-
-	_TIFFfree(data);
-	_TIFFfree(fields);
-	tif->tif_flags &= ~TIFF_DIRTYDIRECT;
-
-#if (0)
-	/* This stuff commented out because I don't think we want it for
-	   subdirectories, but I could be wrong. */
-	(*tif->tif_cleanup)(tif);
-
-	/*
-	 * Reset directory-related state for subsequent
-	 * directories.
-	 */
-	TIFFDefaultDirectory(tif);
-	tif->tif_curoff = 0;
-	tif->tif_row = (uint32) -1;
-	tif->tif_curstrip = (tstrip_t) -1;
-#endif
-
-	return (directory_offset);
-bad:
-	_TIFFfree(data);
-	_TIFFfree(fields);
-	return (0);
-}
-#undef WriteRationalPair
-
-/*
- * Process tags that are not special cased.
- */
-/* The standard function TIFFWriteNormalTag() could definitely be replaced
-   with a simple call to this function, just adding TIFFGetField() as the
-   last argument. */
-static int
-TIFFWriteNormalSubTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip,
-		      int (*getFieldFn)(TIFF *tif, ttag_t tag, ...))
-{
-	u_short wc = (u_short) fip->field_writecount;
-
-	dir->tdir_tag = fip->field_tag;
-	dir->tdir_type = (u_short) fip->field_type;
-	dir->tdir_count = wc;
-#define	WRITEF(x,y)	x(tif, fip->field_type, fip->field_tag, dir, wc, y)
-	switch (fip->field_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (wc > 1) {
-			uint16* wp;
-			if (wc == (u_short) TIFF_VARIABLE) {
-				(*getFieldFn)(tif, fip->field_tag, &wc, &wp);
-				dir->tdir_count = wc;
-			} else
-				(*getFieldFn)(tif, fip->field_tag, &wp);
-			if (!WRITEF(TIFFWriteShortArray, wp))
-				return (0);
-		} else {
-			uint16 sv;
-			(*getFieldFn)(tif, fip->field_tag, &sv);
-			dir->tdir_offset =
-			    TIFFInsertData(tif, dir->tdir_type, sv);
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-		if (wc > 1) {
-			uint32* lp;
-			if (wc == (u_short) TIFF_VARIABLE) {
-				(*getFieldFn)(tif, fip->field_tag, &wc, &lp);
-				dir->tdir_count = wc;
-			} else
-				(*getFieldFn)(tif, fip->field_tag, &lp);
-			if (!WRITEF(TIFFWriteLongArray, lp))
-				return (0);
-		} else {
-			/* XXX handle LONG->SHORT conversion */
-			(*getFieldFn)(tif, fip->field_tag, &dir->tdir_offset);
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE) {
-				(*getFieldFn)(tif, fip->field_tag, &wc, &fp);
-				dir->tdir_count = wc;
-			} else
-				(*getFieldFn)(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteRationalArray, fp))
-				return (0);
-		} else {
-			float fv;
-			(*getFieldFn)(tif, fip->field_tag, &fv);
-			if (!WRITEF(TIFFWriteRationalArray, &fv))
-				return (0);
-		}
-		break;
-	case TIFF_FLOAT:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE) {
-				(*getFieldFn)(tif, fip->field_tag, &wc, &fp);
-				dir->tdir_count = wc;
-			} else
-				(*getFieldFn)(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteFloatArray, fp))
-				return (0);
-		} else {
-			float fv;
-			(*getFieldFn)(tif, fip->field_tag, &fv);
-			if (!WRITEF(TIFFWriteFloatArray, &fv))
-				return (0);
-		}
-		break;
-	case TIFF_DOUBLE:
-		/* Hey - I think this is a bug, or at least a "gross
-		   inconsistency", in the TIFF library. Look at the original
-		   TIFF library code below within the "#if (0) ... #else".
-		   Just from the type of *dp, you can see that this code
-		   expects TIFFGetField() to be handed a double ** for
-		   any TIFF_DOUBLE tag, even for the constant wc==1 case.
-		   This is totally inconsistent with other fields (like
-		   TIFF_FLOAT, above) and is also inconsistent with the
-		   TIFFSetField() function for TIFF_DOUBLEs, which expects
-		   to be passed a single double by value for the wc==1 case.
-		   (See the handling of TIFFFetchNormalTag() in tif_dirread.c
-		   for an example.) Maybe this function was written before
-		   TIFFWriteDoubleArray() was written, not that that's an
-		   excuse. Anyway, the new code below is a trivial modification
-		   of the TIFF_FLOAT code above. The fact that even single
-		   doubles get written out in the data segment and get an
-		   offset value stored is irrelevant here - that is all
-		   handled by TIFFWriteDoubleArray(). */
-#if (0)
-		{ double* dp;
-		  if (wc == (u_short) TIFF_VARIABLE) {
-			(*getFieldFn)(tif, fip->field_tag, &wc, &dp);
-			dir->tdir_count = wc;
-		  } else
-			(*getFieldFn)(tif, fip->field_tag, &dp);
-		  TIFFCvtNativeToIEEEDouble(tif, wc, dp);
-		  if (!TIFFWriteData(tif, dir, (char*) dp))
-			return (0);
-		}
-#else
-		if (wc > 1) {
-			double* dp;
-			if (wc == (u_short) TIFF_VARIABLE) {
-				(*getFieldFn)(tif, fip->field_tag, &wc, &dp);
-				dir->tdir_count = wc;
-			} else
-				(*getFieldFn)(tif, fip->field_tag, &dp);
-			if (!WRITEF(TIFFWriteDoubleArray, dp))
-				return (0);
-		} else {
-			double dv;
-			(*getFieldFn)(tif, fip->field_tag, &dv);
-			if (!WRITEF(TIFFWriteDoubleArray, &dv))
-				return (0);
-		}
-#endif
-		break;
-	case TIFF_ASCII:
-		{ char* cp;
-		  (*getFieldFn)(tif, fip->field_tag, &cp);
-		  dir->tdir_count = (uint32) (strlen(cp) + 1);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-	case TIFF_UNDEFINED:
-		{ char* cp;
-		  if (wc == (u_short) TIFF_VARIABLE) {
-			(*getFieldFn)(tif, fip->field_tag, &wc, &cp);
-			dir->tdir_count = wc;
-		  } else 
-			(*getFieldFn)(tif, fip->field_tag, &cp);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-	}
-	return (1);
-}
-#undef WRITEF
-
-/* Everything after this is exactly duplicated from the standard tif_dirwrite.c
-   file, necessitated by the fact that they are declared static there so
-   we can't call them!
-*/
-/*
- * Setup a directory entry with either a SHORT
- * or LONG type according to the value.
- */
-static void
-TIFFSetupShortLong(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint32 v)
-{
-	dir->tdir_tag = tag;
-	dir->tdir_count = 1;
-	if (v > 0xffffL) {
-		dir->tdir_type = (short) TIFF_LONG;
-		dir->tdir_offset = v;
-	} else {
-		dir->tdir_type = (short) TIFF_SHORT;
-		dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
-	}
-}
-#undef MakeShortDirent
-
-#ifndef TIFFWriteRational
-/*
- * Setup a RATIONAL directory entry and
- * write the associated indirect value.
- */
-static int
-TIFFWriteRational(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, float v)
-{
-	return (TIFFWriteRationalArray(tif, type, tag, dir, 1, &v));
-}
-#endif
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Setup a directory entry that references a
- * samples/pixel array of SHORT values and
- * (potentially) write the associated indirect
- * values.
- */
-static int
-TIFFWritePerSampleShorts(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 buf[10], v;
-	uint16* w = buf;
-	int i, status, samples = tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree((char*) w);
-	return (status);
-}
-
-/*
- * Setup a directory entry that references a samples/pixel array of ``type''
- * values and (potentially) write the associated indirect values.  The source
- * data from TIFFGetField() for the specified tag must be returned as double.
- */
-static int
-TIFFWritePerSampleAnys(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir)
-{
-	double buf[10], v;
-	double* w = buf;
-	int i, status;
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (double*) _TIFFmalloc(samples * sizeof (double));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteAnyArray(tif, type, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Setup a pair of shorts that are returned by
- * value, rather than as a reference to an array.
- */
-static int
-TIFFSetupShortPair(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 v[2];
-
-	TIFFGetField(tif, tag, &v[0], &v[1]);
-	return (TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, 2, v));
-}
-
-/*
- * Setup a directory entry for an NxM table of shorts,
- * where M is known to be 2**bitspersample, and write
- * the associated indirect data.
- */
-static int
-TIFFWriteShortTable(TIFF* tif,
-    ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16** table)
-{
-	uint32 i, off;
-
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) TIFF_SHORT;
-	/* XXX -- yech, fool TIFFWriteData */
-	dir->tdir_count = (uint32) (1L<<tif->tif_dir.td_bitspersample);
-	off = tif->tif_dataoff;
-	for (i = 0; i < n; i++)
-		if (!TIFFWriteData(tif, dir, (char *)table[i]))
-			return (0);
-	dir->tdir_count *= n;
-	dir->tdir_offset = off;
-	return (1);
-}
-
-/*
- * Write/copy data associated with an ASCII or opaque tag value.
- */
-static int
-TIFFWriteByteArray(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count > 4) {
-		if (!TIFFWriteData(tif, dir, cp))
-			return (0);
-	} else
-		_TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count);
-	return (1);
-}
-
-/*
- * Setup a directory entry of an array of SHORT
- * or SSHORT and write the associated indirect values.
- */
-static int
-TIFFWriteShortArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16* v)
-{
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			dir->tdir_offset = (uint32) ((long) v[0] << 16);
-			if (n == 2)
-				dir->tdir_offset |= v[1] & 0xffff;
-		} else {
-			dir->tdir_offset = v[0] & 0xffff;
-			if (n == 2)
-				dir->tdir_offset |= (long) v[1] << 16;
-		}
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of LONG
- * or SLONG and write the associated indirect values.
- */
-static int
-TIFFWriteLongArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint32* v)
-{
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n == 1) {
-		dir->tdir_offset = v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of RATIONAL
- * or SRATIONAL and write the associated indirect values.
- */
-static int
-TIFFWriteRationalArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	uint32 i;
-	uint32* t;
-	int status;
-
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	t = (uint32*) _TIFFmalloc(2*n * sizeof (uint32));
-	for (i = 0; i < n; i++) {
-		float fv = v[i];
-		int sign = 1;
-		uint32 den;
-
-		if (fv < 0) {
-			if (type == TIFF_RATIONAL) {
-				TIFFWarning(tif->tif_name,
-	"\"%s\": Information lost writing value (%g) as (unsigned) RATIONAL",
-				_TIFFFieldWithTag(tif,tag)->field_name, v);
-				fv = 0;
-			} else
-				fv = -fv, sign = -1;
-		}
-		den = 1L;
-		if (fv > 0) {
-			while (fv < 1L<<(31-3) && den < 1L<<(31-3))
-				fv *= 1<<3, den *= 1L<<3;
-		}
-		t[2*i+0] = sign * (fv + 0.5);
-		t[2*i+1] = den;
-	}
-	status = TIFFWriteData(tif, dir, (char *)t);
-	_TIFFfree((char*) t);
-	return (status);
-}
-
-static int
-TIFFWriteFloatArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEFloat(tif, n, v);
-	if (n == 1) {
-		dir->tdir_offset = *(uint32*) &v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-static int
-TIFFWriteDoubleArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	dir->tdir_tag = tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEDouble(tif, n, v);
-	return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Write an array of ``type'' values for a specified tag (i.e. this is a tag
- * which is allowed to have different types, e.g. SMaxSampleType).
- * Internally the data values are represented as double since a double can
- * hold any of the TIFF tag types (yes, this should really be an abstract
- * type tany_t for portability).  The data is converted into the specified
- * type in a temporary buffer and then handed off to the appropriate array
- * writer.
- */
-static int
-TIFFWriteAnyArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	char buf[10 * sizeof(double)];
-	char* w = buf;
-	int i, status = 0;
-
-	if (n * TIFFDataWidth(type) > sizeof buf)
-		w = (char*) _TIFFmalloc(n * TIFFDataWidth(type));
-	switch (type) {
-	case TIFF_BYTE:
-		{ unsigned char* bp = (unsigned char*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (unsigned char) v[i];
-		  dir->tdir_tag = tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SBYTE:
-		{ signed char* bp = (signed char*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (signed char) v[i];
-		  dir->tdir_tag = tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SHORT:
-		{ uint16* bp = (uint16*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (uint16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-				goto out;
-		}
-		break;
-	case TIFF_SSHORT:
-		{ int16* bp = (int16*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (int16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-			goto out;
-		}
-		break;
-	case TIFF_LONG:
-		{ uint32* bp = (uint32*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (uint32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_SLONG:
-		{ int32* bp = (int32*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (int32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, (uint32*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_FLOAT:
-		{ float* bp = (float*) w;
-		  for (i = 0; i < n; i++)
-			bp[i] = (float) v[i];
-		  if (!TIFFWriteFloatArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFWriteDoubleArray(tif, type, tag, dir, n, v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		/* TIFF_RATIONAL */
-		/* TIFF_SRATIONAL */
-		goto out;
-	}
-	status = 1;
- out:
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-
-#ifdef COLORIMETRY_SUPPORT
-static int
-TIFFWriteTransferFunction(TIFF* tif, TIFFDirEntry* dir)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	tsize_t n = (1L<<td->td_bitspersample) * sizeof (uint16);
-	uint16** tf = td->td_transferfunction;
-	int ncols;
-
-	/*
-	 * Check if the table can be written as a single column,
-	 * or if it must be written as 3 columns.  Note that we
-	 * write a 3-column tag if there are 2 samples/pixel and
-	 * a single column of data won't suffice--hmm.
-	 */
-	switch (td->td_samplesperpixel - td->td_extrasamples) {
-	default:	if (_TIFFmemcmp(tf[0], tf[2], n)) { ncols = 3; break; }
-	case 2:		if (_TIFFmemcmp(tf[0], tf[1], n)) { ncols = 3; break; }
-	case 1: case 0:	ncols = 1;
-	}
-	return (TIFFWriteShortTable(tif,
-	    TIFFTAG_TRANSFERFUNCTION, dir, ncols, tf));
-}
-#endif
-
-/*
- * Write a contiguous directory item.
- */
-static int
-TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	tsize_t cc;
-
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	dir->tdir_offset = tif->tif_dataoff;
-	cc = dir->tdir_count * TIFFDataWidth(dir->tdir_type);
-	if (SeekOK(tif, dir->tdir_offset) &&
-	    WriteOK(tif, cp, cc)) {
-		tif->tif_dataoff += (cc + 1) & ~1;
-		return (1);
-	}
-	TIFFError(tif->tif_name, "Error writing data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return (0);
-}
-
-/*
- * Link the current directory into the
- * directory chain for the file.
- */
-static int
-TIFFLinkDirectory(TIFF* tif)
-{
-	static const char module[] = "TIFFLinkDirectory";
-	uint32 nextdir;
-	uint32 diroff;
-
-	tif->tif_diroff = (TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
-	diroff = (uint32) tif->tif_diroff;
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&diroff);
-#if SUBIFD_SUPPORT
-	if (tif->tif_flags & TIFF_INSUBIFD) {
-		(void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(module,
-			    "%s: Error writing SubIFD directory link",
-			    tif->tif_name);
-			return (0);
-		}
-		/*
-		 * Advance to the next SubIFD or, if this is
-		 * the last one configured, revert back to the
-		 * normal directory linkage.
-		 */
-		if (--tif->tif_nsubifd)
-			tif->tif_subifdoff += sizeof (diroff);
-		else
-			tif->tif_flags &= ~TIFF_INSUBIFD;
-		return (1);
-	}
-#endif
-	if (tif->tif_header.tiff_diroff == 0) {
-		/*
-		 * First directory, overwrite offset in header.
-		 */
-		tif->tif_header.tiff_diroff = (uint32) tif->tif_diroff;
-#define	HDROFF(f)	((toff_t) &(((TIFFHeader*) 0)->f))
-		(void) TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(tif->tif_name, "Error writing TIFF header");
-			return (0);
-		}
-		return (1);
-	}
-	/*
-	 * Not the first directory, search to the last and append.
-	 */
-	nextdir = tif->tif_header.tiff_diroff;
-	do {
-		uint16 dircount;
-
-		if (!SeekOK(tif, nextdir) ||
-		    !ReadOK(tif, &dircount, sizeof (dircount))) {
-			TIFFError(module, "Error fetching directory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		(void) TIFFSeekFile(tif,
-		    dircount * sizeof (TIFFDirEntry), SEEK_CUR);
-		if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
-			TIFFError(module, "Error fetching directory link");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&nextdir);
-	} while (nextdir != 0);
-	(void) TIFFSeekFile(tif, -(toff_t) sizeof (nextdir), SEEK_CUR);
-	if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-	return (1);
-}
diff --git a/tkimg1.3/libtiff/contrib/ras/README b/tkimg1.3/libtiff/contrib/ras/README
deleted file mode 100644
index f87bfde..0000000
--- a/tkimg1.3/libtiff/contrib/ras/README
+++ /dev/null
@@ -1,10 +0,0 @@
-Sun May 19 22:28:16 PDT 1991
-
-These programs are from Patrick Naughton (naughton at wind.sun.com).
-I've tried to update them to reflect changes to the library, but
-I am unable to verify that they operate properly, because they
-require the Sun pixrect library.
-
-Please contact Patrick directly if you have questions/problems.
-
-	Sam
diff --git a/tkimg1.3/libtiff/contrib/ras/ras2tif.c b/tkimg1.3/libtiff/contrib/ras/ras2tif.c
deleted file mode 100644
index b11b879..0000000
--- a/tkimg1.3/libtiff/contrib/ras/ras2tif.c
+++ /dev/null
@@ -1,247 +0,0 @@
-#ifndef lint
-static char sccsid[] = "@(#)ras2tif.c 1.2 90/03/06";
-#endif
-/*-
- * ras2tif.c - Converts from a Sun Rasterfile to a Tagged Image File.
- *
- * Copyright (c) 1990 by Sun Microsystems, Inc.
- *
- * Author: Patrick J. Naughton
- * naughton at wind.sun.com
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * This file is provided AS IS with no warranties of any kind.  The author
- * shall have no liability with respect to the infringement of copyrights,
- * trade secrets or any patents by this file or any part thereof.  In no
- * event will the author be liable for any lost revenue or profits or
- * other special, indirect and consequential damages.
- *
- * Comments and additions should be sent to the author:
- *
- *                     Patrick J. Naughton
- *                     Sun Microsystems
- *                     2550 Garcia Ave, MS 14-40
- *                     Mountain View, CA 94043
- *                     (415) 336-1080
- *
- * Revision History:
- * 11-Jan-89: Created.
- * 06-Mar-90: fix bug in SCALE() macro.
- *	      got rid of xres and yres, (they weren't working anyways).
- *	      fixed bpsl calculation.
- * 25-Nov-99: y2k fix (year as 1900 + tm_year) <mike at onshore.com>
- *
- * Description:
- *   This program takes a Sun Rasterfile [see rasterfile(5)] as input and
- * writes a MicroSoft/Aldus "Tagged Image File Format" image or "TIFF" file.
- * The input file may be standard input, but the output TIFF file must be a
- * real file since seek(2) is used.
- */
-
-#include <stdio.h>
-#include <sys/time.h>
-#include <pixrect/pixrect_hs.h>
-#include "tiffio.h"
-
-typedef int boolean;
-#define True (1)
-#define False (0)
-#define	SCALE(x)	(((x)*((1L<<16)-1))/255)
-
-boolean     Verbose = False;
-boolean     dummyinput = False;
-char       *pname;		/* program name (used for error messages) */
-
-void
-error(s1, s2)
-    char       *s1,
-               *s2;
-{
-    fprintf(stderr, s1, pname, s2);
-    exit(1);
-}
-
-void
-usage()
-{
-    error("usage: %s -[vq] [-|rasterfile] TIFFfile\n", NULL);
-}
-
-
-main(argc, argv)
-    int         argc;
-    char       *argv[];
-{
-    char       *inf = NULL;
-    char       *outf = NULL;
-    FILE       *fp;
-    int         depth,
-                i;
-    long        row;
-    TIFF       *tif;
-    Pixrect    *pix;		/* The Sun Pixrect */
-    colormap_t  Colormap;	/* The Pixrect Colormap */
-    u_short     red[256],
-                green[256],
-                blue[256];
-    struct tm  *ct;
-    struct timeval tv;
-    long        width,
-                height;
-    long        rowsperstrip;
-    int         year; 
-    short       photometric;
-    short       samplesperpixel;
-    short       bitspersample;
-    int         bpsl;
-    static char *version = "ras2tif 1.0";
-    static char *datetime = "1990:01:01 12:00:00";
-
-    gettimeofday(&tv, (struct timezone *) NULL);
-    ct = localtime(&tv.tv_sec);
-    year=1900 + ct->tm_year; 
-    sprintf(datetime, "%04d:%02d:%02d %02d:%02d:%02d",
-	    year, ct->tm_mon + 1, ct->tm_mday,
-	    ct->tm_hour, ct->tm_min, ct->tm_sec);
-
-    setbuf(stderr, NULL);
-    pname = argv[0];
-
-    while (--argc) {
-	if ((++argv)[0][0] == '-') {
-	    switch (argv[0][1]) {
-	    case 'v':
-		Verbose = True;
-		break;
-	    case 'q':
-		usage();
-		break;
-	    case '\0':
-		if (inf == NULL)
-		    dummyinput = True;
-		else
-		    usage();
-		break;
-	    default:
-		fprintf(stderr, "%s: illegal option -%c.\n", pname,
-			argv[0][1]);
-		exit(1);
-	    }
-	} else if (inf == NULL && !dummyinput) {
-	    inf = argv[0];
-	} else if (outf == NULL)
-	    outf = argv[0];
-	else
-	    usage();
-    }
-
-    if (outf == NULL)
-	error("%s: can't write output file to a stream.\n", NULL);
-
-    if (dummyinput || inf == NULL) {
-	inf = "Standard Input";
-	fp = stdin;
-    } else if ((fp = fopen(inf, "r")) == NULL)
-	error("%s: %s couldn't be opened.\n", inf);
-
-    if (Verbose)
-	fprintf(stderr, "Reading rasterfile from %s...", inf);
-
-    pix = pr_load(fp, &Colormap);
-    if (pix == NULL)
-	error("%s: %s is not a raster file.\n", inf);
-
-    if (Verbose)
-	fprintf(stderr, "done.\n");
-
-    if (Verbose)
-	fprintf(stderr, "Writing %s...", outf);
-
-    tif = TIFFOpen(outf, "w");
-
-    if (tif == NULL)
-	error("%s: error opening TIFF file %s", outf);
-
-    width = pix->pr_width;
-    height = pix->pr_height;
-    depth = pix->pr_depth;
-
-    switch (depth) {
-    case 1:
-	samplesperpixel = 1;
-	bitspersample = 1;
-	photometric = PHOTOMETRIC_MINISBLACK;
-	break;
-    case 8:
-	samplesperpixel = 1;
-	bitspersample = 8;
-	photometric = PHOTOMETRIC_PALETTE;
-	break;
-    case 24:
-	samplesperpixel = 3;
-	bitspersample = 8;
-	photometric = PHOTOMETRIC_RGB;
-	break;
-    case 32:
-	samplesperpixel = 4;
-	bitspersample = 8;
-	photometric = PHOTOMETRIC_RGB;
-	break;
-    default:
-	error("%s: bogus depth: %d\n", depth);
-    }
-
-    bpsl = ((depth * width + 15) >> 3) & ~1;
-    rowsperstrip = (8 * 1024) / bpsl;
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bitspersample);
-    TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric);
-    TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, inf);
-    TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "converted Sun rasterfile");
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-    TIFFSetField(tif, TIFFTAG_STRIPBYTECOUNTS, height / rowsperstrip);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_SOFTWARE, version);
-    TIFFSetField(tif, TIFFTAG_DATETIME, datetime);
-
-    memset(red, 0, sizeof(red));
-    memset(green, 0, sizeof(green));
-    memset(blue, 0, sizeof(blue));
-    if (depth == 8) {
-	TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
-	for (i = 0; i < Colormap.length; i++) {
-	    red[i] = SCALE(Colormap.map[0][i]);
-	    green[i] = SCALE(Colormap.map[1][i]);
-	    blue[i] = SCALE(Colormap.map[2][i]);
-	}
-    }
-    if (Verbose)
-	fprintf(stderr, "%dx%dx%d image, ", width, height, depth);
-
-    for (row = 0; row < height; row++)
-	if (TIFFWriteScanline(tif,
-			      (u_char *) mprd_addr(mpr_d(pix), 0, row),
-			      row, 0) < 0) {
-	    fprintf("failed a scanline write (%d)\n", row);
-	    break;
-	}
-    TIFFFlushData(tif);
-    TIFFClose(tif);
-
-    if (Verbose)
-	fprintf(stderr, "done.\n");
-
-    pr_destroy(pix);
-
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/ras/tif2ras.c b/tkimg1.3/libtiff/contrib/ras/tif2ras.c
deleted file mode 100644
index 49d1bb1..0000000
--- a/tkimg1.3/libtiff/contrib/ras/tif2ras.c
+++ /dev/null
@@ -1,337 +0,0 @@
-#ifndef lint
-static char id[] = "$Id: tif2ras.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $"; 
-#endif
-/*-
- * tif2ras.c - Converts from a Tagged Image File Format image to a Sun Raster.
- *
- * Copyright (c) 1990 by Sun Microsystems, Inc.
- *
- * Author: Patrick J. Naughton
- * naughton at wind.sun.com
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * This file is provided AS IS with no warranties of any kind.  The author
- * shall have no liability with respect to the infringement of copyrights,
- * trade secrets or any patents by this file or any part thereof.  In no
- * event will the author be liable for any lost revenue or profits or
- * other special, indirect and consequential damages.
- *
- * Comments and additions should be sent to the author:
- *
- *                     Patrick J. Naughton
- *                     Sun Microsystems
- *                     2550 Garcia Ave, MS 14-40
- *                     Mountain View, CA 94043
- *                     (415) 336-1080
- *
- * Revision History:
- * 10-Jan-89: Created.
- * 06-Mar-90: Change to byte encoded rasterfiles.
- *	      fix bug in call to ReadScanline().
- *	      fix bug in CVT() macro.
- *	      fix assignment of td, (missing &).
- *
- * Description:
- *   This program takes a MicroSoft/Aldus "Tagged Image File Format" image or
- * "TIFF" file as input and writes a Sun Rasterfile [see rasterfile(5)].  The
- * output file may be standard output, but the input TIFF file must be a real
- * file since seek(2) is used.
- */
-
-#include <stdio.h>
-#include <pixrect/pixrect_hs.h>
-#include "tiffio.h"
-
-typedef int boolean;
-#define True (1)
-#define False (0)
-#define	CVT(x)		(((x) * 255) / ((1L<<16)-1))
-
-boolean     Verbose = False;
-char       *pname;		/* program name (used for error messages) */
-
-void
-error(s1, s2)
-    char       *s1,
-               *s2;
-{
-    fprintf(stderr, s1, pname, s2);
-    exit(1);
-}
-
-void
-usage()
-{
-    error("usage: %s -[vq] TIFFfile [rasterfile]\n", NULL);
-}
-
-
-main(argc, argv)
-    int         argc;
-    char       *argv[];
-{
-    char       *inf = NULL;
-    char       *outf = NULL;
-    FILE       *fp;
-    long        width,
-                height;
-    int         depth,
-                numcolors;
-    register TIFF *tif;
-    TIFFDirectory *td;
-    register u_char *inp,
-               *outp;
-    register int col,
-                i;
-    register long row;
-    u_char     *Map = NULL;
-    u_char     *buf;
-    short	bitspersample;
-    short	samplesperpixel;
-    short	photometric;
-    u_short    *redcolormap,
-	       *bluecolormap,
-	       *greencolormap;
-
-    Pixrect    *pix;		/* The Sun Pixrect */
-    colormap_t  Colormap;	/* The Pixrect Colormap */
-    u_char      red[256],
-                green[256],
-                blue[256];
-
-    setbuf(stderr, NULL);
-    pname = argv[0];
-
-    while (--argc) {
-	if ((++argv)[0][0] == '-')
-	    switch (argv[0][1]) {
-	    case 'v':
-		Verbose = True;
-		break;
-	    case 'q':
-		usage();
-		break;
-	    default:
-		fprintf(stderr, "%s: illegal option -%c.\n", pname,
-			argv[0][1]);
-		exit(1);
-	    }
-	else if (inf == NULL)
-	    inf = argv[0];
-	else if (outf == NULL)
-	    outf = argv[0];
-	else
-	    usage();
-
-    }
-
-    if (inf == NULL)
-	error("%s: can't read input file from a stream.\n", NULL);
-
-    if (Verbose)
-	fprintf(stderr, "Reading %s...", inf);
-
-    tif = TIFFOpen(inf, "r");
-
-    if (tif == NULL)
-	error("%s: error opening TIFF file %s", inf);
-
-    if (Verbose)
-	TIFFPrintDirectory(tif, stderr, True, False, False);
-    TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-    if (bitspersample > 8)
-	error("%s: can't handle more than 8-bits per sample\n", NULL);
-
-    TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-    switch (samplesperpixel) {
-    case 1:
-	if (bitspersample == 1)
-	    depth = 1;
-	else
-	    depth = 8;
-	break;
-    case 3:
-    case 4:
-	depth = 24;
-	break;
-    default:
-	error("%s: only handle 1-channel gray scale or 3-channel color\n");
-    }
-
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);
-
-    if (Verbose)
-	fprintf(stderr, "%dx%dx%d image, ", width, height, depth);
-    if (Verbose)
-	fprintf(stderr, "%d bits/sample, %d samples/pixel, ",
-		bitspersample, samplesperpixel);
-
-    pix = mem_create(width, height, depth);
-    if (pix == (Pixrect *) NULL)
-	error("%s: can't allocate memory for output pixrect...\n", NULL);
-
-    numcolors = (1 << bitspersample);
-
-    TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric);
-    if (numcolors == 2) {
-	if (Verbose)
-	    fprintf(stderr, "monochrome ");
-	Colormap.type = RMT_NONE;
-	Colormap.length = 0;
-	Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = NULL;
-    } else {
-	switch (photometric) {
-	case PHOTOMETRIC_MINISBLACK:
-	    if (Verbose)
-		fprintf(stderr, "%d graylevels (min=black), ", numcolors);
-	    Map = (u_char *) malloc(numcolors * sizeof(u_char));
-	    for (i = 0; i < numcolors; i++)
-		Map[i] = (255 * i) / numcolors;
-	    Colormap.type = RMT_EQUAL_RGB;
-	    Colormap.length = numcolors;
-	    Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = Map;
-	    break;
-	case PHOTOMETRIC_MINISWHITE:
-	    if (Verbose)
-		fprintf(stderr, "%d graylevels (min=white), ", numcolors);
-	    Map = (u_char *) malloc(numcolors * sizeof(u_char));
-	    for (i = 0; i < numcolors; i++)
-		Map[i] = 255 - ((255 * i) / numcolors);
-	    Colormap.type = RMT_EQUAL_RGB;
-	    Colormap.length = numcolors;
-	    Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = Map;
-	    break;
-	case PHOTOMETRIC_RGB:
-	    if (Verbose)
-		fprintf(stderr, "truecolor ");
-	    Colormap.type = RMT_NONE;
-	    Colormap.length = 0;
-	    Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = NULL;
-	    break;
-	case PHOTOMETRIC_PALETTE:
-	    if (Verbose)
-		fprintf(stderr, "colormapped ");
-	    Colormap.type = RMT_EQUAL_RGB;
-	    Colormap.length = numcolors;
-	    memset(red, 0, sizeof(red));
-	    memset(green, 0, sizeof(green));
-	    memset(blue, 0, sizeof(blue));
-	    TIFFGetField(tif, TIFFTAG_COLORMAP,
-		&redcolormap, &greencolormap, &bluecolormap);
-	    for (i = 0; i < numcolors; i++) {
-		red[i] = (u_char) CVT(redcolormap[i]);
-		green[i] = (u_char) CVT(greencolormap[i]);
-		blue[i] = (u_char) CVT(bluecolormap[i]);
-	    }
-	    Colormap.map[0] = red;
-	    Colormap.map[1] = green;
-	    Colormap.map[2] = blue;
-	    break;
-	case PHOTOMETRIC_MASK:
-	    error("%s: Don't know how to handle PHOTOMETRIC_MASK\n");
-	    break;
-	case PHOTOMETRIC_DEPTH:
-	    error("%s: Don't know how to handle PHOTOMETRIC_DEPTH\n");
-	    break;
-	default:
-	    error("%s: unknown photometric (cmap): %d\n", photometric);
-	}
-    }
-
-    buf = (u_char *) malloc(TIFFScanlineSize(tif));
-    if (buf == NULL)
-	error("%s: can't allocate memory for scanline buffer...\n", NULL);
-
-    for (row = 0; row < height; row++) {
-	if (TIFFReadScanline(tif, buf, row, 0) < 0)
-	    error("%s: bad data read on line: %d\n", row);
-	inp = buf;
-	outp = (u_char *) mprd_addr(mpr_d(pix), 0, row);
-	switch (photometric) {
-	case PHOTOMETRIC_RGB:
-	    if (samplesperpixel == 4)
-		for (col = 0; col < width; col++) {
-		    *outp++ = *inp++;	/* Blue */
-		    *outp++ = *inp++;	/* Green */
-		    *outp++ = *inp++;	/* Red */
-		    inp++;	/* skip alpha channel */
-		}
-	    else
-		for (col = 0; col < width; col++) {
-		    *outp++ = *inp++;	/* Blue */
-		    *outp++ = *inp++;	/* Green */
-		    *outp++ = *inp++;	/* Red */
-		}
-	    break;
-	case PHOTOMETRIC_MINISWHITE:
-	case PHOTOMETRIC_MINISBLACK:
-	    switch (bitspersample) {
-	    case 1:
-		for (col = 0; col < ((width + 7) / 8); col++)
-		    *outp++ = *inp++;
-		break;
-	    case 2:
-		for (col = 0; col < ((width + 3) / 4); col++) {
-		    *outp++ = (*inp >> 6) & 3;
-		    *outp++ = (*inp >> 4) & 3;
-		    *outp++ = (*inp >> 2) & 3;
-		    *outp++ = *inp++ & 3;
-		}
-		break;
-	    case 4:
-		for (col = 0; col < width / 2; col++) {
-		    *outp++ = *inp >> 4;
-		    *outp++ = *inp++ & 0xf;
-		}
-		break;
-	    case 8:
-		for (col = 0; col < width; col++)
-		    *outp++ = *inp++;
-		break;
-	    default:
-		error("%s: bad bits/sample: %d\n", bitspersample);
-	    }
-	    break;
-	case PHOTOMETRIC_PALETTE:
-	    memcpy(outp, inp, width);
-	    break;
-	default:
-	    error("%s: unknown photometric (write): %d\n", photometric);
-	}
-    }
-
-    free((char *) buf);
-
-    if (Verbose)
-	fprintf(stderr, "done.\n");
-
-    if (outf == NULL || strcmp(outf, "Standard Output") == 0) {
-	outf = "Standard Output";
-	fp = stdout;
-    } else {
-	if (!(fp = fopen(outf, "w")))
-	    error("%s: %s couldn't be opened for writing.\n", outf);
-    }
-
-    if (Verbose)
-	fprintf(stderr, "Writing rasterfile in %s...", outf);
-
-    if (pr_dump(pix, fp, &Colormap, RT_BYTE_ENCODED, 0) == PIX_ERR)
-	error("%s: error writing Sun Rasterfile: %s\n", outf);
-
-    if (Verbose)
-	fprintf(stderr, "done.\n");
-
-    pr_destroy(pix);
-
-    if (fp != stdout)
-	fclose(fp);
-
-    exit(0);
-}
diff --git a/tkimg1.3/libtiff/contrib/vms/libtiff/makevms.com b/tkimg1.3/libtiff/contrib/vms/libtiff/makevms.com
deleted file mode 100755
index 90964e8..0000000
--- a/tkimg1.3/libtiff/contrib/vms/libtiff/makevms.com
+++ /dev/null
@@ -1,229 +0,0 @@
-$!========================================================================
-$!
-$! Name      : MAKEVMS
-$!
-$! Purpose   : Compile TIFF library
-$!
-$! Arguments : If P1 is DEBUG, compile with debug
-$!
-$! Created   1-DEC-1994   Karsten Spang
-$!
-$!========================================================================
-$   CURRENT_DIR=F$ENVIRONMENT("DEFAULT")
-$   ON CONTROL_Y THEN GOTO EXIT
-$   ON ERROR THEN GOTO EXIT
-$!
-$! Get hold on definitions
-$!
-$!  Older versions of VMS may not recoqnize the "ARCH_NAME" keyword
-$!  This happens only on VAX
-$!
-$   SAVE_MESS=F$ENVIRONMENT("MESSAGE")
-$   SET MESSAGE/NOID/NOFAC/NOSEV/NOTEXT
-$   ARCH=F$GETSYI("ARCH_NAME")
-$   SET MESSAGE 'SAVE_MESS'
-$   IF F$TYPE(ARCH).EQS."" THEN ARCH="VAX"
-$   ARCH=F$EDIT(ARCH,"UPCASE")
-$!
-$   DEFINE/NOLOG SYS SYS$LIBRARY
-$   THIS_FILE=F$ENVIRONMENT("PROCEDURE")
-$   PROC_NAME=F$PARSE(THIS_FILE,,,"NAME","SYNTAX_ONLY")
-$   THIS_DIR=F$PARSE(THIS_FILE,,,"DEVICE","SYNTAX_ONLY")+ -
-        F$PARSE(THIS_FILE,,,"DIRECTORY","SYNTAX_ONLY")
-$   SET DEFAULT 'THIS_DIR'
-$   IF ARCH.EQS."ALPHA"
-$   THEN
-$       CONF_FP="HAVE_IEEEFP=1"
-$   ELSE
-$       CONF_FP="HAVE_IEEEFP=0"
-$   ENDIF
-$   CONF_LIBRARY="BSDTYPES,HAVE_MMAP"
-$   IF P1.EQS."DEBUG"
-$   THEN
-$       DEBUG_OPTIONS="/DEBUG/NOOPTIMIZE"
-$       CONF_LIBRARY=CONF_LIBRARY+",DEBUG"
-$       LINK_OPTIONS="/DEBUG"
-$   ELSE
-$       DEBUG_OPTIONS=""
-$       LINK_OPTIONS=""
-$   ENDIF
-$   DEFINES="/DEFINE=("+CONF_FP+","+CONF_LIBRARY+")"
-$   C_COMPILE="CC"+DEBUG_OPTIONS+DEFINES
-$   IF ARCH.EQS."ALPHA"
-$   THEN
-$!
-$!      You may want a different floating point option
-$!
-$       C_COMPILE=C_COMPILE+ -
-            "/FLOAT=IEEE_FLOAT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES"
-$   ENDIF
-$!
-$   SOURCES="TIF_AUX,TIF_CLOSE,TIF_CODEC,TIF_COMPRESS,"+ -
-        "TIF_DIR,TIF_DIRINFO,TIF_DIRREAD,TIF_DIRWRITE,"+ -
-        "TIF_DUMPMODE,TIF_ERROR,TIF_FAX3,TIF_FAX3SM,TIF_FLUSH,TIF_GETIMAGE,"+ -
--!        "TIF_JPEG,"+ -
-        "TIF_LZW,TIF_NEXT,TIF_OPEN,TIF_PACKBITS,TIF_PIXARLOG,TIF_PREDICT,"+ -
-        "TIF_PRINT,TIF_READ,TIF_STRIP,TIF_SWAB,TIF_THUNDER,TIF_TILE,"+ -
-        "TIF_VERSION,TIF_VMS,TIF_WARNING,TIF_WRITE"
-! ",TIF_ZIP"
-$   LIBFILE="TIFF"
-$   IF F$SEARCH(LIBFILE+".OLB").EQS."" THEN -
-        LIBRARY/CREATE 'LIBFILE'
-$!
-$! Create the port library
-$!
-$   LIBPORT="[-.PORT]PORT"
-$   IF F$SEARCH(LIBPORT+".OLB") .EQS "" 
-$   THEN
-$       WRITE SYS$OUTPUT "Creating PORT.OLB"
-$       LIBRARY/CREATE 'LIBPORT'
-$       CREATE DUM.C
-main(){getopt();strtoul();strcasecmp();}
-$       C_COMPILE DUM
-$       SET MESSAGE/ID/FAC/SEV/TEXT
-$       DEFINE/USER SYS$OUTPUT LINK.WARNINGS
-$       DEFINE/USER SYS$ERROR NLA0:
-$       IF ARCH.EQS."ALPHA"
-$       THEN
-$           LINK DUM
-$       ELSE
-$           LINK DUM,SYS$INPUT:/OPTIONS
-SYS$SHARE:VAXCRTL/SHARE
-$       ENDIF
-$       DELETE DUM.C;,DUM.OBJ;,DUM.EXE;
-$       SEARCH/OUT=MISSING.OBJECTS LINK.WARNINGS LINK-I-UDFSYM
-$       DELETE LINK.WARNINGS;
-$       OPEN/READ MISSING MISSING.OBJECTS
-$NEXTMIS:
-$           READ/END=NOMOREMIS MISSING LINE
-$           LINE=F$EDIT(LINE,"TRIM,COMPRESS,UPCASE")
-$           LINE=F$ELEMENT(1," ",LINE)
-$           IF LINE .EQS. " " THEN GOTO NEXTMIS
-$           WRITE SYS$OUTPUT "   "+LINE
-$           C_COMPILE/OBJECT=[-.PORT]'LINE' [-.PORT]'LINE'
-$           LIBRARY 'LIBPORT' [-.PORT]'LINE'
-$           DELETE [-.PORT]'LINE'.OBJ;
-$       GOTO NEXTMIS
-$NOMOREMIS:
-$       CLOSE MISSING
-$       DELETE MISSING.OBJECTS;
-$   ENDIF
-$!
-$! Create VERSION.H
-$!
-$   IF F$SEARCH("VERSION.H").EQS.""
-$   THEN
-$       WRITE SYS$OUTPUT "Creating VERSION.H"
-$       IF F$SEARCH("MKVERSION.EXE").EQS.""
-$       THEN
-$           IF F$SEARCH("MKVERSION.OBJ").EQS.""
-$           THEN
-$               C_COMPILE MKVERSION
-$           ENDIF
-$           IF ARCH.EQS."ALPHA"
-$           THEN
-$               LINK MKVERSION,'LIBPORT'/LIBRARY
-$           ELSE
-$               LINK MKVERSION,'LIBPORT'/LIBRARY,SYS$INPUT:/OPTIONS
-SYS$SHARE:VAXCRTL/SHARE
-$           ENDIF
-$           DELETE MKVERSION.OBJ;*
-$       ENDIF
-$       MKVERSION:=$'THIS_DIR'MKVERSION
-$       MKVERSION -V [-]VERSION -A [-.DIST]TIFF.ALPHA VERSION.H
-$       DELETE MKVERSION.EXE;*
-$   ENDIF
-$!
-$! Create TIF_FAX3SM.C
-$!
-$   IF F$SEARCH("TIF_FAX3SM.C").EQS.""
-$   THEN
-$       WRITE SYS$OUTPUT "Creating FAX3SM.C"
-$       IF F$SEARCH("MKG3STATES.EXE").EQS.""
-$       THEN
-$           IF F$SEARCH("MKG3STATES.OBJ").EQS.""
-$           THEN
-$               C_COMPILE MKG3STATES
-$           ENDIF
-$           IF ARCH.EQS."ALPHA"
-$           THEN
-$               LINK MKG3STATES,'LIBPORT'/LIBRARY
-$           ELSE
-$               LINK MKG3STATES,'LIBPORT'/LIBRARY,SYS$INPUT:/OPTIONS
-SYS$SHARE:VAXCRTL/SHARE
-$           ENDIF
-$           DELETE MKG3STATES.OBJ;*
-$       ENDIF
-$       MKG3STATES:=$'THIS_DIR'MKG3STATES
-$       MKG3STATES -c const TIF_FAX3SM.C
-$       DELETE MKG3STATES.EXE;*
-$   ENDIF
-$!
-$! Loop over modules
-$!
-$   NUMBER=0
-$COMPILE_LOOP:
-$       FILE=F$ELEMENT(NUMBER,",",SOURCES)
-$       IF FILE.EQS."," THEN GOTO END_COMPILE
-$       C_FILE=F$PARSE(FILE,".C",,,"SYNTAX_ONLY")
-$       C_FILE=F$SEARCH(C_FILE)
-$       IF C_FILE.EQS.""
-$       THEN
-$           WRITE SYS$OUTPUT "Source file "+FILE+" not found"
-$           GOTO EXIT
-$       ENDIF
-$       C_DATE=F$CVTIME(F$FILE_ATTRIBUTES(C_FILE,"RDT"))
-$       OBJ_FILE=F$PARSE("",".OBJ",C_FILE,,"SYNTAX_ONLY")
-$       OBJ_FILE=F$EXTRACT(0,F$LOCATE(";",OBJ_FILE),OBJ_FILE)
-$       FOUND_OBJ_FILE=F$SEARCH(OBJ_FILE)
-$       IF FOUND_OBJ_FILE.EQS.""
-$       THEN
-$           OBJ_DATE=""
-$       ELSE
-$           OBJ_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_OBJ_FILE,"CDT"))
-$       ENDIF
-$       IF OBJ_DATE.LTS.C_DATE
-$       THEN
-$           WRITE SYS$OUTPUT "Compiling "+FILE
-$           ON ERROR THEN CONTINUE
-$           C_COMPILE/OBJECT='OBJ_FILE' 'C_FILE'
-$           ON ERROR THEN GOTO EXIT
-$           LIBRARY 'LIBFILE' 'OBJ_FILE'
-$
-$       ENDIF
-$       NUMBER=NUMBER+1
-$   GOTO COMPILE_LOOP
-$END_COMPILE:
-$   IF ARCH.EQS."ALPHA"
-$   THEN
-$       OPT_FILE="TIFFSHRAXP"
-$   ELSE
-$       OPT_FILE="TIFFSHRVAX"
-$       FILE="TIFFVEC"
-$       MAR_FILE=F$PARSE(FILE,".MAR",,,"SYNTAX_ONLY")
-$       MAR_FILE=F$SEARCH(MAR_FILE)
-$       MAR_FILE=F$SEARCH("TIFFVEC.MAR")
-$       MAR_DATE=F$CVTIME(F$FILE_ATTRIBUTES(MAR_FILE,"RDT"))
-$       OBJ_FILE=F$PARSE("",".OBJ",MAR_FILE,,"SYNTAX_ONLY")
-$       OBJ_FILE=F$EXTRACT(0,F$LOCATE(";",OBJ_FILE),OBJ_FILE)
-$       FOUND_OBJ_FILE=F$SEARCH(OBJ_FILE)
-$       IF FOUND_OBJ_FILE.EQS.""
-$       THEN
-$           OBJ_DATE=""
-$       ELSE                                 
-$           OBJ_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_OBJ_FILE,"CDT"))
-$       ENDIF
-$       IF OBJ_DATE.LTS.MAR_DATE
-$       THEN
-$           WRITE SYS$OUTPUT "Compiling "+FILE
-$           MACRO 'MAR_FILE'
-$           LIBRARY 'LIBFILE' 'OBJ_FILE'
-$           PURGE 'OBJ_FILE'
-$       ENDIF
-$   ENDIF
-$   WRITE SYS$OUTPUT "Creating shareable library"
-$   LINK/SHAREABLE='THIS_DIR'TIFFSHR'LINK_OPTIONS' 'OPT_FILE'/OPTIONS
-$   PURGE/LOG TIFFSHR.EXE
-$EXIT:
-$   SET DEFAULT 'CURRENT_DIR'
-$   EXIT
diff --git a/tkimg1.3/libtiff/contrib/vms/libtiff/tiff.opt b/tkimg1.3/libtiff/contrib/vms/libtiff/tiff.opt
deleted file mode 100755
index 587bf11..0000000
--- a/tkimg1.3/libtiff/contrib/vms/libtiff/tiff.opt
+++ /dev/null
@@ -1 +0,0 @@
-TIFFSHR/SHAREABLE
diff --git a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshraxp.opt b/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshraxp.opt
deleted file mode 100755
index f800651..0000000
--- a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshraxp.opt
+++ /dev/null
@@ -1,122 +0,0 @@
-! VMS linker options file for linking the TIFF library into a shareable image
-!
-IDENTIFICATION="LIBTIFF 3.4-032"
-!
-! Please update the minor version number below, when adding new routines
-GSMATCH=LEQUAL,1,9
-!
-! Here goes the definitions of all public functions in the library, plus
-! a few extra that are called by the tools.
-! The sequence MUST NOT be changed, otherwise you will have to relink
-! all applications. Add new functions at the end.
-!
-SYMBOL_VECTOR=(-
-	TIFFCheckTile=PROCEDURE,-
-	TIFFClose=PROCEDURE,-
-	TIFFComputeStrip=PROCEDURE,-
-	TIFFComputeTile=PROCEDURE,-
-	TIFFCurrentDirectory=PROCEDURE,-
-	TIFFCurrentRow=PROCEDURE,-
-	TIFFCurrentStrip=PROCEDURE,-
-	TIFFCurrentTile=PROCEDURE,-
-	TIFFError=PROCEDURE,-
-	TIFFFdOpen=PROCEDURE,-
-	TIFFFileName=PROCEDURE,-
-	TIFFFileno=PROCEDURE,-
-	TIFFFlush=PROCEDURE,-
-	TIFFFlushData=PROCEDURE,-
-	TIFFGetField=PROCEDURE,-
-	TIFFGetFieldDefaulted=PROCEDURE,-
-	TIFFGetMode=PROCEDURE,-
-	TIFFIsTiled=PROCEDURE,-
-	TIFFModeCCITTFax3=PRIVATE_PROCEDURE,- ! gone in 3.3 beta 024
-	TIFFNumberOfStrips=PROCEDURE,-
-	TIFFNumberOfTiles=PROCEDURE,-
-	TIFFOpen=PROCEDURE,-
-	TIFFPrintDirectory=PROCEDURE,-
-	TIFFReadBufferSetup=PROCEDURE,-
-	TIFFReadDirectory=PROCEDURE,-
-	TIFFReadEncodedStrip=PROCEDURE,-
-	TIFFReadEncodedTile=PROCEDURE,-
-	TIFFReadRawStrip=PROCEDURE,-
-	TIFFReadRawTile=PROCEDURE,-
-	TIFFReadRGBAImage=PROCEDURE,-
-	TIFFReadScanline=PROCEDURE,-
-	TIFFReadTile=PROCEDURE,-
-	TIFFReverseBits=PROCEDURE,-
-	TIFFScanlineSize=PROCEDURE,-
-	TIFFSetDirectory=PROCEDURE,-
-	TIFFSetErrorHandler=PROCEDURE,-
-	TIFFSetField=PROCEDURE,-
-	TIFFSetWarningHandler=PROCEDURE,-
-	TIFFStripSize=PROCEDURE,-
-	TIFFSwabShort=PROCEDURE,-
-	TIFFSwabLong=PROCEDURE,-
-	TIFFSwabArrayOfShort=PROCEDURE,-
-	TIFFSwabArrayOfLong=PROCEDURE,-
-	TIFFTileRowSize=PROCEDURE,-
-	TIFFTileSize=PROCEDURE,-
-	TIFFVGetField=PROCEDURE,-
-	TIFFVGetFieldDefaulted=PROCEDURE,-
-	TIFFVSetField=PROCEDURE,-
-	TIFFWarning=PROCEDURE,-
-	TIFFWriteDirectory=PROCEDURE,-
-	TIFFWriteEncodedStrip=PROCEDURE,-
-	TIFFWriteEncodedTile=PROCEDURE,-
-	TIFFWriteRawStrip=PROCEDURE,-
-	TIFFWriteRawTile=PROCEDURE,-
-	TIFFWriteScanline=PROCEDURE,-
-	TIFFWriteTile=PROCEDURE,-
-!
-! New entries in version 3.1
-!
-	TIFFClientOpen=PROCEDURE,-
-	TIFFVStripSize=PROCEDURE,-	! For tiffcp
-!
-! New entries in version 3.2
-!
-	TIFFGetVersion=PROCEDURE,-
-	TIFFGetBitRevTable=PROCEDURE,-
-	_TIFFmalloc=PROCEDURE,-	! For fax2tiff
-!
-! New entries in version 3.3
-!
-	TIFFIsByteSwapped=PROCEDURE,-
-	TIFFSetWriteOffset=PROCEDURE,-
-!
-! New entries in version 3.3 beta 020
-!
-	TIFFSetSubDirectory=PROCEDURE,-
-	TIFFUnlinkDirectory=PROCEDURE,-
-!
-! These needs to be global on the Alpha (used in fax2tiff)
-!
-	tiffDataWidth=DATA,-
-	tiffFieldInfo=DATA,-
-!
-! New entries in version 3.3 beta 026 (for the tools)
-!
-	_TIFFfree=PROCEDURE,-
-	_TIFFrealloc=PROCEDURE,-
-	_TIFFmemset=PROCEDURE,-
-	_TIFFmemcpy=PROCEDURE,-
-	_TIFFmemcmp=PROCEDURE,-
-!
-! New entries in version 3.4 beta 002
-!
-	TIFFRasterScanlineSize=PROCEDURE,-
-	TIFFDefaultStripSize=PROCEDURE,-
-	TIFFDefaultTileSize=PROCEDURE,-
-	TIFFVTileSize=PROCEDURE,- ! not new, but omitted previously
-	TIFFSwabDouble=PROCEDURE,-
-	TIFFSwabArrayOfDouble=PROCEDURE,-
-	TIFFLastDirectory=PROCEDURE,- ! not new either
-!
-! New entries in version 3.4 beta 007 through 032
-!
-	TIFFCurrentDirOffset=PROCEDURE,-
-	TIFFWriteBufferSetup=PROCEDURE)
-!
-! Then take the object library
-!
-TIFF/LIBRARY
diff --git a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshrvax.opt b/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshrvax.opt
deleted file mode 100755
index 28b7ea4..0000000
--- a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffshrvax.opt
+++ /dev/null
@@ -1,18 +0,0 @@
-! VMS linker options file for linking the TIFF library into a shareable image
-!
-IDENTIFICATION="LIBTIFF 3.4-032"
-!
-! Please update the minor version number below, when adding new routines
-GSMATCH=LEQUAL,1,9
-!
-! Place the transfer vector at the beginning of the image
-!
-CLUSTER=TIFFVEC,,,TIFFVEC
-!
-! Then take the object library
-!
-TIFF/LIBRARY/INCLUDE=(TIF_FAX3SM,TIF_CODEC)
-!
-! The C RTL shareable image
-!
-SYS$SHARE:VAXCRTL/SHARE
diff --git a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffvec.mar b/tkimg1.3/libtiff/contrib/vms/libtiff/tiffvec.mar
deleted file mode 100755
index f17e5b2..0000000
--- a/tkimg1.3/libtiff/contrib/vms/libtiff/tiffvec.mar
+++ /dev/null
@@ -1,131 +0,0 @@
-	.TITLE TIFFVEC - Transfer vector for TIFF library
-	.IDENT /LIBTIFF 3.4-002/
-;	
-	.PSECT TIFFVEC,EXE,NOWRT,PIC,SHR,GBL,QUAD
-;
-; Macro that defines one entry in the transfer vector
-;
-	.MACRO VECTOR,NAME
-	.ALIGN QUAD
-	.TRANSFER NAME
-	.MASK NAME
-	JMP L^NAME+2
-	.ENDM
-;
-; Here goes the definitions of all public functions in the library, plus
-; a few extra that are called by the tools.
-; The sequence MUST NOT be changed, otherwise you will have to relink
-; all applications. Add new functions at the end.
-;
-	VECTOR TIFFCheckTile
-	VECTOR TIFFClose
-	VECTOR TIFFComputeStrip
-	VECTOR TIFFComputeTile
-	VECTOR TIFFCurrentDirectory
-	VECTOR TIFFCurrentRow
-	VECTOR TIFFCurrentStrip
-	VECTOR TIFFCurrentTile
-	VECTOR TIFFError
-	VECTOR TIFFFdOpen
-	VECTOR TIFFFileName
-	VECTOR TIFFFileno
-	VECTOR TIFFFlush
-	VECTOR TIFFFlushData
-	VECTOR TIFFGetField
-	VECTOR TIFFGetFieldDefaulted
-;
-; TIFFGetFileSize was removed in version 3.2. It has been replaced by a 
-; dummy value that makes the program abort with a privileged instruction 
-; fault, in case an old program calls TIFFGetFileSize.
-;
-;	VECTOR TIFFGetFileSize
-	.QUAD  0
-;
-	VECTOR TIFFGetMode
-	VECTOR TIFFIsTiled
-;
-; TIFFModeCCITTFax3 gone in 3.3 beta 024
-;	VECTOR TIFFModeCCITTFax3
-	.QUAD  0
-	VECTOR TIFFNumberOfStrips
-	VECTOR TIFFNumberOfTiles
-	VECTOR TIFFOpen
-	VECTOR TIFFPrintDirectory
-	VECTOR TIFFReadBufferSetup
-	VECTOR TIFFReadDirectory
-	VECTOR TIFFReadEncodedStrip
-	VECTOR TIFFReadEncodedTile
-	VECTOR TIFFReadRawStrip
-	VECTOR TIFFReadRawTile
-	VECTOR TIFFReadRGBAImage
-	VECTOR TIFFReadScanline
-	VECTOR TIFFReadTile
-	VECTOR TIFFReverseBits
-	VECTOR TIFFScanlineSize
-	VECTOR TIFFSetDirectory
-	VECTOR TIFFSetErrorHandler
-	VECTOR TIFFSetField
-	VECTOR TIFFSetWarningHandler
-	VECTOR TIFFStripSize
-	VECTOR TIFFSwabShort
-	VECTOR TIFFSwabLong
-	VECTOR TIFFSwabArrayOfShort
-	VECTOR TIFFSwabArrayOfLong
-	VECTOR TIFFTileRowSize
-	VECTOR TIFFTileSize
-	VECTOR TIFFVGetField
-	VECTOR TIFFVGetFieldDefaulted
-	VECTOR TIFFVSetField
-	VECTOR TIFFWarning
-	VECTOR TIFFWriteDirectory
-	VECTOR TIFFWriteEncodedStrip
-	VECTOR TIFFWriteEncodedTile
-	VECTOR TIFFWriteRawStrip
-	VECTOR TIFFWriteRawTile
-	VECTOR TIFFWriteScanline
-	VECTOR TIFFWriteTile
-;
-; New entries in version 3.1
-;
-	VECTOR TIFFClientOpen
-	VECTOR TIFFVStripSize	; For tiffcp
-;
-; New entries in version 3.2
-;
-	VECTOR TIFFGetVersion
-	VECTOR TIFFGetBitRevTable
-	VECTOR _TIFFmalloc	; For fax2tiff
-;
-; New entries in version 3.3
-;
-	VECTOR TIFFIsByteSwapped
-	VECTOR TIFFSetWriteOffset
-;
-; New entries in version 3.3 beta 020
-;
-	VECTOR TIFFSetSubDirectory
-	VECTOR TIFFUnlinkDirectory
-;
-; New entries in version 3.3 beta 026 (for the tools)
-;
-	VECTOR _TIFFfree
-	VECTOR _TIFFrealloc
-	VECTOR _TIFFmemset
-	VECTOR _TIFFmemcpy
-	VECTOR _TIFFmemcmp
-;
-; New entries in version 3.4 beta 002
-;
-	VECTOR TIFFRasterScanlineSize
-	VECTOR TIFFDefaultStripSize
-	VECTOR TIFFDefaultTileSize
-	VECTOR TIFFVTileSize ; not new, but omitted previously
-	VECTOR TIFFSwabDouble
-	VECTOR TIFFSwabArrayOfDouble
-	VECTOR TIFFLastDirectory ; not new either
-;
-; New entries in version 3.4 beta 007 through 032
-;
-	VECTOR TIFFCurrentDirOffset
-	VECTOR TIFFWriteBufferSetup
-	.END
diff --git a/tkimg1.3/libtiff/contrib/vms/tools/makevms.com b/tkimg1.3/libtiff/contrib/vms/tools/makevms.com
deleted file mode 100755
index 174b94d..0000000
--- a/tkimg1.3/libtiff/contrib/vms/tools/makevms.com
+++ /dev/null
@@ -1,113 +0,0 @@
-$!========================================================================
-$!
-$! Name      : MAKEVMS
-$!
-$! Purpose   : Compile TIFF tools
-$!
-$! Arguments : 
-$!
-$! Created   6-DEC-1991   Karsten Spang
-$!
-$!========================================================================
-$   CURRENT_DIR=F$ENVIRONMENT("DEFAULT")
-$   ON CONTROL_Y THEN GOTO EXIT
-$   ON ERROR THEN GOTO EXIT
-$!
-$! Get hold on definitions
-$!
-$!  Older versions of VMS may not recoqnize the "ARCH_NAME" keyword
-$!  This happens only on VAX
-$!
-$   SAVE_MESS=F$ENVIRONMENT("MESSAGE")
-$   SET MESSAGE/NOID/NOFAC/NOSEV/NOTEXT
-$   ARCH=F$GETSYI("ARCH_NAME")
-$   SET MESSAGE 'SAVE_MESS'
-$   IF F$TYPE(ARCH).EQS."" THEN ARCH="VAX"
-$   ARCH=F$EDIT(ARCH,"UPCASE")
-$!
-$   DEFINE SYS SYS$LIBRARY
-$   THIS_FILE=F$ENVIRONMENT("PROCEDURE")
-$   PROC_NAME=F$PARSE(THIS_FILE,,,"NAME","SYNTAX_ONLY")
-$   THIS_DIR=F$PARSE(THIS_FILE,,,"DEVICE","SYNTAX_ONLY")+ -
-        F$PARSE(THIS_FILE,,,"DIRECTORY","SYNTAX_ONLY")
-$   SET DEFAULT 'THIS_DIR'
-$   LIB_DIR=F$PARSE("[-.LIBTIFF]")
-$   LIB_DIR=F$PARSE(LIB_DIR,,,"DEVICE","SYNTAX_ONLY")+ -
-        F$PARSE(LIB_DIR,,,"DIRECTORY","SYNTAX_ONLY")
-$   DEFINE TIFFSHR 'LIB_DIR'TIFFSHR
-$   CONF_LIBRARY="USE_VARARGS=0,USE_PROTOTYPES=1,USE_CONST=1,"+ -
-	"BSDTYPES,MMAP_SUPPORT"
-$   IF ARCH.EQS."ALPHA"
-$   THEN
-$!
-$! You may want a different floating point option
-$!
-$       CONF_FP="HAVE_IEEEFP=1"
-$       ALPHA_OPT="/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES/FLOAT=IEEE_FLOAT"
-$   ELSE
-$       CONF_FP="HAVE_IEEEFP=0"
-$       ALPHA_OPT=""
-$   ENDIF
-$   DEFINES="/DEFINE=("+CONF_LIBRARY+","+CONF_FP+")"
-$   INCLUDES="/INCLUDE="+LIB_DIR
-$   IF P1.EQS."DEBUG"
-$   THEN
-$       DEBUG_OPTIONS="/DEBUG/NOOPTIMIZE"
-$       LINK_OPTIONS="/DEBUG"
-$   ELSE
-$       DEBUG_OPTIONS=""
-$       LINK_OPTIONS=""
-$   ENDIF
-$   C_COMPILE="CC"+DEBUG_OPTIONS+DEFINES+INCLUDES+ALPHA_OPT
-$   LIBPORT="[-.PORT]PORT"
-$!
-$   SOURCES="FAX2PS,FAX2TIFF,GIF2TIFF,PAL2RGB," + -
-        "PPM2TIFF,RAS2TIFF,RGB2YCBCR," + -
-        "THUMBNAIL,TIFF2BW," + -
-        "TIFF2PS,TIFFCMP,TIFFCP,TIFFDITHER," + -
-        "TIFFDUMP,TIFFINFO,TIFFMEDIAN,TIFFSPLIT,YCBCR"
-$!
-$! Loop over programs
-$!
-$   NUMBER=0
-$COMPILE_LOOP:
-$       FILE=F$ELEMENT(NUMBER,",",SOURCES)
-$       IF FILE.EQS."," THEN GOTO END_COMPILE
-$       C_FILE=F$PARSE(FILE,".C",,,"SYNTAX_ONLY")
-$       C_FILE=F$SEARCH(C_FILE)
-$       IF C_FILE.EQS.""
-$       THEN
-$           WRITE SYS$OUTPUT "Source file "+FILE+" not found"
-$           GOTO EXIT
-$       ENDIF
-$       C_DATE=F$CVTIME(F$FILE_ATTRIBUTES(C_FILE,"RDT"))
-$       EXE_FILE=F$PARSE("",".EXE",C_FILE,,"SYNTAX_ONLY")
-$       EXE_FILE=F$EXTRACT(0,F$LOCATE(";",EXE_FILE),EXE_FILE)
-$       FOUND_EXE_FILE=F$SEARCH(EXE_FILE)
-$       IF FOUND_EXE_FILE.EQS.""
-$       THEN
-$           EXE_DATE=""
-$       ELSE
-$           EXE_DATE=F$CVTIME(F$FILE_ATTRIBUTES(FOUND_EXE_FILE,"CDT"))
-$       ENDIF
-$       IF EXE_DATE.LTS.C_DATE
-$       THEN
-$           WRITE SYS$OUTPUT "Compiling "+FILE
-$           C_COMPILE 'FILE'
-$           IF ARCH.EQS."ALPHA"
-$           THEN
-$               LINK'LINK_OPTIONS' 'FILE','LIBPORT'/LIB,'LIB_DIR'TIFF/OPTIONS
-$           ELSE
-$               LINK'LINK_OPTIONS' 'FILE','LIBPORT'/LIB, -
-                    'LIB_DIR'TIFF/OPTIONS,SYS$INPUT:/OPTIONS
-SYS$SHARE:VAXCRTL/SHAREABLE
-$           ENDIF
-$           DELETE 'FILE'.OBJ;*
-$           PURGE 'EXE_FILE'
-$       ENDIF
-$       NUMBER=NUMBER+1
-$   GOTO COMPILE_LOOP
-$END_COMPILE:
-$EXIT:
-$   SET DEFAULT 'CURRENT_DIR'
-$   EXIT
diff --git a/tkimg1.3/libtiff/contrib/win32/README b/tkimg1.3/libtiff/contrib/win32/README
deleted file mode 100644
index 649f829..0000000
--- a/tkimg1.3/libtiff/contrib/win32/README
+++ /dev/null
@@ -1,111 +0,0 @@
-This mail from Scott describes changes to the library that I have
-not made because I couldn't figure out exactly where they went.
-Anything not in this file has either been placed in the appropriate
-directory (e.g. libtiff/tif_win32.c) or applied to the current
-source code (e.g. libtiff/tiffiop.h).
-
-Note that the Window NT/Window 95 support is untested; Scott's work
-was done with an earlier version of the library.  Hopefully this'll
-get cleaned up soon.
-
-	Sam
-
-Date: Fri, 14 Apr 95 17:01:42 EDT
-From: wagner at itek.com (scott wagner)
-Message-Id: <9504142101.AA00764 at cyan.>
-To: sam at cthulhu.engr.sgi.com
-Subject: Re: Libtiff for Win32 (Windows NT / Windows 95)
-
-Hi, Sam!
-
-Enclosed are my libtiff for win32 pieces.  They are in the form of 3 files
-(tif_w32.c, dllshell.c, and libtiff.def), and 2 diffs (for tiffiop.h and 
-tiffio.h).
-
-Hope this is not too difficult to separate!
-
-Regards,
-Scott Wagner (wagner at itek.com)
-
-tif_w32.c  ---------------------------------------------------------------
-
-tiffiop.h  ---------------------------------------------------------------
-
-tiffio.h  ---------------------------------------------------------------
-38a39
-> #ifdef _TIFFIOP_
-39a41,43
-> #else
-> typedef void TIFF;	/* Avoid ANSI undefined structure warning */
-> #endif
-66a71,75
-> #ifdef WIN32			/* WIN32 identifies Win32 compiles */
-> #pragma warn -sig		/* Turn off Borland warn of long to short int convert */
-> #pragma warn -par		/* Turn off Borland warn "Parameter x is never used" */
-> DECLARE_HANDLE(thandle_t);		/* Win32 file handle */
-> #else						/* if not WIN32_ */
-67a77
-> #endif					/* defined WIN32 */
-
-(Message tiff:1396)
- -- using template mhl.format --
-Date:    Mon, 17 Apr 1995 07:51:03 EDT
-To:      sam at cthulhu.engr.sgi.com
-
-From:    wagner at itek.com (scott wagner)
-Subject: Libtiff for Win32
-
-Return-Path: sam at flake.asd.sgi.com 
-Delivery-Date: Mon, 17 Apr 1995 05:36:50 PDT
-Return-Path: sam at flake.asd.sgi.com
-
-Hello, Sam!
-
->   ... libtiff for win32 pieces.  They are in the form of 3 files
->   (tif_w32.c, dllshell.c, and libtiff.def), and 2 diffs (for tiffiop.h and 
->   tiffio.h).
->   
-> I don't understand how these pieces fit together.  Can you please explain
-> what dllshell.c and libtiff.def are for? 
-
-Sorry I was short on documentation here ... I was rushing to get home to
-dinner on Friday and the material for you was the last loose end I had to
-deal with.  Excuses aside ...
-
-The goal of the adaptation of libtiff to Win32 was to replace only one
-environment-specific code module and to make minimal changes to header
-files.  tif_win32.c required one addition to tiffio.h (the
-DECLARE_HANDLE line, which is probably a better way to typedef thandle-t
-under Windows 3.1 as well); it also required the addition of pv_map_handle
-to the tiff structure and the conditional definition of the
-TIFFUnmapFileContents macro in tiffiop.h (this because Win32 uses a handle
-and a pointer in mapping memory, and I needed to save both).
-
-Additionally, I made a general style change to tiffio.h.  If tiffio.h is
-included by a client, which does not include tiffiop.h, then ANSI compilers
-warn about the typedef of TIFF to a non-existent structure.  To avoid this,
-I changed the typedef of TIFF in this case to void.
-
-I also made a style change in the tiff structure.  All references to tif_fd
-in the library treat it as int, yet the tif_fd member itself is short.  I
-changed this member to int and added the reserved member to maintain
-32-bit structure member alignment in a 32 bit environment.  [ At cost of
-4 more bytes in an already bloated structure! :-) ]  As long as fd's are
-less than 64k, the old member works; this is not the case in Win32, and is
-not generally a safe assumption.
-
-The module dllshell.c and the file libtiff.def are not specific to the 
-functionality of libtiff; they are used to make a Win32 dynamic link
-library, and would be best packaged with a Win32 makefile, which I have
-not yet perfected.  I will, however, commit to a Borland and Microsoft C
-makefile for libtiff; perhaps these two could be combined with the
-makefile for the _next_ (!) release of libtiff when it is ready.
-
-Once again, sorry for the confused message on Friday.  I hope that at
-least tif_w32 and the tiffio.h and tiffiop.h diffs will be useful for
-this release.
-
-Regards,
-Scott Wagner   (wagner at itek.com)
-Itek Graphix
-Rochester, NY
diff --git a/tkimg1.3/libtiff/contrib/win32/dllshell.c b/tkimg1.3/libtiff/contrib/win32/dllshell.c
deleted file mode 100644
index 839ebdb..0000000
--- a/tkimg1.3/libtiff/contrib/win32/dllshell.c
+++ /dev/null
@@ -1,38 +0,0 @@
-dllshell.c  ---------------------------------------------------------------
-#define  STRICT
-#include <windows.h>
-#pragma hdrstop
-
-#pragma argsused
-
-/* DLL has an entry point LibMain || DllEntryPoint and an exit point WEP. */
-
-#if defined(__FLAT__)
-
-BOOL WINAPI DllEntryPoint(HINSTANCE hinstDll, DWORD fdwRreason,
-		LPVOID plvReserved)
-{
-	 return 1;   /* Indicate that the DLL was initialized successfully. */
-}
-
-#else /* not flat model  */
-
-int FAR PASCAL LibMain(HINSTANCE hInstance, WORD wDataSegment, WORD wHeapSize,
-		LPSTR lpszCmdLine)
-{
-/* The startup code for the DLL initializes the local heap(if there is one)
-	with a call to LocalInit which locks the data segment. */
-
-	 if ( wHeapSize != 0 )
-		  UnlockData( 0 );
-	 return 1;   /* Indicate that the DLL was initialized successfully. */
-}
-
-#endif /* __FLAT */
-
-#pragma argsused
-
-int FAR PASCAL WEP ( int bSystemExit )
-{
-	 return 1;
-}
diff --git a/tkimg1.3/libtiff/contrib/win32/libtiff.def b/tkimg1.3/libtiff/contrib/win32/libtiff.def
deleted file mode 100644
index 7f41bed..0000000
--- a/tkimg1.3/libtiff/contrib/win32/libtiff.def
+++ /dev/null
@@ -1,72 +0,0 @@
-LIBRARY LIBTIFF
-EXETYPE WINDOWS
-CODE PRELOAD MOVEABLE DISCARDABLE
-DATA PRELOAD MOVEABLE MULTIPLE
-HEAPSIZE 4096
-STACKSIZE 8192
-EXPORTS
-_TIFFGetVersion             @1
-_TIFFClose                  @2
-_TIFFFlush                  @3
-_TIFFFlushData              @4
-_TIFFGetField               @5
-_TIFFVGetField              @6
-_TIFFGetFieldDefaulted      @7
-_TIFFVGetFieldDefaulted     @8
-_TIFFReadDirectory          @9
-_TIFFScanlineSize           @10
-_TIFFStripSize              @11
-_TIFFVStripSize             @12
-_TIFFTileRowSize            @13
-_TIFFTileSize               @14
-_TIFFVTileSize              @15
-_TIFFFileno                 @16
-_TIFFGetMode                @17
-_TIFFIsTiled                @18
-_TIFFIsByteSwapped          @19
-_TIFFCurrentRow             @20
-_TIFFCurrentDirectory       @21
-_TIFFCurrentStrip           @22
-_TIFFCurrentTile            @23
-_TIFFReadBufferSetup        @24
-_TIFFLastDirectory          @25
-_TIFFSetDirectory           @26
-_TIFFSetSubDirectory        @27
-_TIFFUnlinkDirectory        @28
-_TIFFSetField               @29
-_TIFFVSetField              @30
-_TIFFWriteDirectory         @31
-_TIFFReadScanline           @32
-_TIFFWriteScanline          @33
-_TIFFReadRGBAImage          @34
-_TIFFOpen                   @35
-_TIFFFdOpen                 @36
-_TIFFClientOpen             @37
-_TIFFFileName         		 @38
-_TIFFError                  @39
-_TIFFWarning                @40
-_TIFFSetErrorHandler        @41
-_TIFFSetWarningHandler      @42
-_TIFFComputeTile            @43
-_TIFFCheckTile              @44
-_TIFFNumberOfTiles          @45
-_TIFFReadTile               @46
-_TIFFWriteTile              @47
-_TIFFComputeStrip           @48
-_TIFFNumberOfStrips         @49
-_TIFFReadEncodedStrip       @50
-_TIFFReadRawStrip           @51
-_TIFFReadEncodedTile        @52
-_TIFFReadRawTile            @53
-_TIFFWriteEncodedStrip      @54
-_TIFFWriteRawStrip          @55
-_TIFFWriteEncodedTile       @56
-_TIFFWriteRawTile           @57
-_TIFFSetWriteOffset         @58
-_TIFFSwabShort              @59
-_TIFFSwabLong               @60
-_TIFFSwabArrayOfShort       @61
-_TIFFSwabArrayOfLong        @62
-_TIFFReverseBits            @63
-_TIFFGetBitRevTable         @64
-_TIFFModeCCITTFax3          @65
diff --git a/tkimg1.3/libtiff/contrib/win_dib/Makefile.w95 b/tkimg1.3/libtiff/contrib/win_dib/Makefile.w95
deleted file mode 100644
index 3f461ef..0000000
--- a/tkimg1.3/libtiff/contrib/win_dib/Makefile.w95
+++ /dev/null
@@ -1,134 +0,0 @@
-#	$Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.w95,v 1.2 1994/11/28
-06:13:31 sam Exp $
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler
-# Copyright (c) 1991, 1992 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-# This Makefile is for use with microsoft nmake version 1.50 and 
-# Microsoft 32-bit C/C++ Compiler 9.00
-#
-DESTDIR=.
-#
-IPATH=	-I. 
-CONF_LIBRARY=$(NULL)
-COPTS=	-Oxa -DBSDTYPES -Zd
-CFLAGS=	$(COPTS)  $(CONF_LIBRARY)
-#
-INCS=	tiff.h tiffio.h
-SRCS=	tif_aux.c \
-	tif_close.c \
-	tif_codec.c \
-	tif_compress.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_flush.c \
-	tif_lzw.c \
-	tif_next.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_predict \
-	tif_print.c \
-	tif_read.c \
-	tif_swab.c \
-	tif_strip.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	tif_win32.c 
-		
-	
-OBJS=	tif_aux.obj \
-	tif_close.obj \
-	tif_codec.obj \
-	tif_compress.obj \
-	tif_dir.obj \
-	tif_dirinfo.obj \
-	tif_dirread.obj \
-	tif_dirwrite.obj \
-	tif_dumpmode.obj \
-	tif_error.obj \
-	tif_getimage.obj \
-	tif_jpeg.obj \
-	tif_flush.obj \
-	tif_lzw.obj \
-	tif_next.obj \
-	tif_open.obj \
-	tif_packbits.obj \
-	tif_predict.obj \
-	tif_print.obj \
-	tif_read.obj \
-	tif_swab.obj \
-	tif_strip.obj \
-	tif_thunder.obj \
-	tif_tile.obj \
-	tif_version.obj \
-	tif_warning.obj \
-	tif_write.obj \
-	tif_win32.obj 
-	
-	
-
-ALL=	libtiff.lib
-
-all:	 $(ALL)
-
-%.obj : %.c
-	$(CC) $(CFLAGS) -c $*.c
-
-
-#.INCLUDE .IGNORE : depend
-
-libtiff.lib: $(OBJS)
-	 - del libtiff.lib
-	 lib /OUT:libtiff.lib $(OBJS)
-
-
-#To include fax3 support, you need to modify mkg3states.c so it could run
-#under windows 95 or NT. This application make the file g3state.h.
-#after that, you have to add to the build script : tif_fax3.c and tif_fax3.obj
-#and define CCITT_SUPPORT in the file tifconf.h
-
-#$(OBJS): tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
-#tif_fax3.obj: tif_fax3.c g3states.h t4.h tif_fax3.h
-
-#g3states.h: mkg3states.c t4.h
-#	$(CC) $(CFLAGS) mkg3states.c
-#	mkg3states -c > g3states.h
-
-
-clean:
-	del *.obj
-        del mkg3stat
-        del g3states.h
-
-tags:	$(SRCS)
-	$(CTAGS) $(SRCS)
diff --git a/tkimg1.3/libtiff/contrib/win_dib/README.Tiffile b/tkimg1.3/libtiff/contrib/win_dib/README.Tiffile
deleted file mode 100644
index 82c6e5c..0000000
--- a/tkimg1.3/libtiff/contrib/win_dib/README.Tiffile
+++ /dev/null
@@ -1,31 +0,0 @@
-Frank,
-
-I attached a file that uses RGBA interface (tif_getimage.c) to read a tiff
-file and convert to a DIB.  It's advantage is that it is easy to read *any*
-tiff file suported by libtiff and easily convert it to a DIB.  The disadvantage
-is that bilevel (B&W) bitmaps (and all other non-rgba images) are also 
-converted to RGBA, thus taking up 32x as much memory as needed (4 bytes per 
-pixel, rather than 1 bit).  I read tiff files, but don't need to
-write them.  And my files are typically small, so the overhead is mostly
-inconsequential.  But for bilevel images, I overrode the get() and put()
-routines of the RGBA interface to just copy the data from the input raster
-to the output raster, rather than expanding out to full 32 bit format.  It
-would be nice if there were a simple way to handle all palletized images,
-but that would take more custom routines, and it's not that important to me.
-
-Usage:
-
-    m_pDIB = (PBITMAPINFOHEADER)::ReadTIFF(pathName);
-    if (m_pDIB != 0) {
-       m_format = IMAGETYPE_TIF;
-    }
-
-This is intended as Win32, but the modifications for new get() and put()
-routines may be independent of platform.
-
-Thanks for your work supporting the forum and the library!
-
-Regards,
-
-Mark James
-mark at james.net
diff --git a/tkimg1.3/libtiff/contrib/win_dib/README.tiff2dib b/tkimg1.3/libtiff/contrib/win_dib/README.tiff2dib
deleted file mode 100644
index 3e6075f..0000000
--- a/tkimg1.3/libtiff/contrib/win_dib/README.tiff2dib
+++ /dev/null
@@ -1,51 +0,0 @@
-
-Date: 04 Dec 95 10:34:23 EST
-From: Philippe <100423.3705 at compuserve.com>
-To: TIFF/sam Leffler <sam at cthulhu.engr.sgi.com>
-Subject: TIFF library and Windows 95
-Message-Id: <951204153422_100423.3705_BHG101-1 at CompuServe.COM>
-
-Sam, 
-
-First, let me thanks all of you how have worked 
-on that great TIFF library !
-
-Here is some information that may help someone.
-
-I build the library under Windows 95 as a 32-bit library.
-The contribution of Scott Wagner (tif_win32.c) worked fine, but 
-the makefile "makefile.msc" was unsable because it was
-written for DOS or Windows 3.1 and all the files names 
-are limited to 8 characters.
-
-Here is the makefile I used : makefile.w95
-
-Also, I had to disable fax3 support because I wasn't able
-to build (as it is) the tool "mkg3states" to generate the include
-file "g3states.h". 
-This source file must be modify to be build under Windows 95.
-
-To build the library under Windows 95 with Visual C++ 2.0, 
-I had to :
-
-- undefine CCITT_SUPPORT in "tiffconf.h"
-
-- create the file version.h with this line :
-      #define VERSION "3.4beta024"
-
-- build the makefile "makefile.w95"
-
-I also join the source file "tif2dib.c" that I created, 
-it contain the function LoadTIFFinDIB that load 
-a TIFF file and build a memory DIB with it and return the 
-HANDLE (HDIB) of the memory bloc containing this DIB.
-Since DIB is the "natural" bitmap format for Windows 3.1, 95 and NT,
-this function sould be usefull for some Windows 95 (or NT) developer.
-
-
-Sorry for my approximate english ...
-
-Regards,
-
-Philippe Tenenhaus   100423.3705 at compuserve.com
-Paris
diff --git a/tkimg1.3/libtiff/contrib/win_dib/Tiffile.cpp b/tkimg1.3/libtiff/contrib/win_dib/Tiffile.cpp
deleted file mode 100644
index 0c14416..0000000
--- a/tkimg1.3/libtiff/contrib/win_dib/Tiffile.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-#include "StdAfx.h"
-
-//#define STRICT
-#include <windows.h>
-#include <windowsx.h>
-#include <commdlg.h>
-#include <stdlib.h>                     // MAX_ constants
-#include "diblib.h"
-
-/*--------------------------------------------------------------------
-        READ TIFF
-        Load the TIFF data from the file into memory.  Return
-        a pointer to a valid DIB (or NULL for errors).
-        Uses the TIFFRGBA interface to libtiff.lib to convert
-        most file formats to a useable form.  We just keep the 32 bit
-        form of the data to display, rather than optimizing for the
-        display.
-
-        Main entry points:
-
-            int ChkTIFF ( LPCTSTR lpszPath )
-            PVOID ReadTIFF ( LPCTSTR lpszPath )
-
-        RETURN
-            A valid DIB pointer for success; NULL for failure.
-
-  --------------------------------------------------------------------*/
-
-#include "TiffLib/tiff.h"
-#include "TiffLib/tiffio.h"
-#include <assert.h>
-#include <stdio.h>
-
-
-// piggyback some data on top of the RGBA Image
-struct TIFFDibImage {
-    TIFFRGBAImage tif;
-    int  dibinstalled;
-} ;
-
-
-HANDLE LoadTIFFinDIB(LPCTSTR lpFileName);
-HANDLE TIFFRGBA2DIB(TIFFDibImage* dib, uint32* raster)  ;
-
-static void
-MyWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-    // ignore all warnings (unused tags, etc)
-    return;
-}
-
-static void
-MyErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-    return;
-}
-
-//  Turn off the error and warning handlers to check if a valid file.
-//  Necessary because of the way that the Doc loads images and restart files.
-int ChkTIFF ( LPCTSTR lpszPath )
-{
-    int rtn = 0;
-
-    TIFFErrorHandler  eh;
-    TIFFErrorHandler  wh;
-
-    eh = TIFFSetErrorHandler(NULL);
-    wh = TIFFSetWarningHandler(NULL);
-
-    TIFF* tif = TIFFOpen(lpszPath, "r");
-    if (tif) {
-        rtn = 1;
-        TIFFClose(tif);
-    }
-
-    TIFFSetErrorHandler(eh);
-    TIFFSetWarningHandler(wh);
-
-    return rtn;
-}
-
-void DibInstallHack(TIFFDibImage* img) ;
-
-PVOID ReadTIFF ( LPCTSTR lpszPath )
-{
-    void*             pDIB = 0;
-    TIFFErrorHandler  wh;
-
-    wh = TIFFSetWarningHandler(MyWarningHandler);
-
-    if (ChkTIFF(lpszPath)) {
-        TIFF* tif = TIFFOpen(lpszPath, "r");
-        if (tif) {
-            char emsg[1024];
-
-            if (TIFFRGBAImageOK(tif, emsg)) {
-                TIFFDibImage img;
-                char emsg[1024];
-
-                if (TIFFRGBAImageBegin(&img.tif, tif, -1, emsg)) {
-                    size_t npixels;
-                    uint32* raster;
-
-                    DibInstallHack(&img);
-
-                    npixels = img.tif.width * img.tif.height;
-                    raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32));
-                    if (raster != NULL) {
-                        if (TIFFRGBAImageGet(&img.tif, raster, img.tif.width, img.tif.height)) {
-                            pDIB = TIFFRGBA2DIB(&img, raster);
-                        }
-                    }
-                    _TIFFfree(raster);
-                }
-                TIFFRGBAImageEnd(&img.tif);
-            }
-            else {
-                TRACE("Unable to open image(%s): %s\n", lpszPath, emsg );
-            }
-            TIFFClose(tif);
-        }
-    }
-
-    TIFFSetWarningHandler(wh);
-
-    return pDIB;
-}
-
-
-
-HANDLE TIFFRGBA2DIB(TIFFDibImage* dib, uint32* raster)
-{
-    void*   pDIB = 0;
-    TIFFRGBAImage* img = &dib->tif;
-
-    uint32 imageLength;
-    uint32 imageWidth;
-    uint16 BitsPerSample;
-    uint16 SamplePerPixel;
-    uint32 RowsPerStrip;
-    uint16 PhotometricInterpretation;
-
-    BITMAPINFOHEADER   bi;
-    int                dwDIBSize ;
-
-    TIFFGetField(img->tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
-    TIFFGetField(img->tif, TIFFTAG_IMAGELENGTH, &imageLength);
-    TIFFGetField(img->tif, TIFFTAG_BITSPERSAMPLE, &BitsPerSample);
-    TIFFGetField(img->tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip);
-    TIFFGetField(img->tif, TIFFTAG_SAMPLESPERPIXEL, &SamplePerPixel);
-    TIFFGetField(img->tif, TIFFTAG_PHOTOMETRIC, &PhotometricInterpretation);
-
-    if ( BitsPerSample == 1 && SamplePerPixel == 1 && dib->dibinstalled ) {   // bilevel
-        bi.biSize           = sizeof(BITMAPINFOHEADER);
-        bi.biWidth          = imageWidth;
-        bi.biHeight         = imageLength;
-        bi.biPlanes         = 1;  // always
-        bi.biBitCount       = 1;
-        bi.biCompression    = BI_RGB;
-        bi.biSizeImage      = WIDTHBYTES(bi.biWidth * bi.biBitCount) * bi.biHeight;
-        bi.biXPelsPerMeter  = 0;
-        bi.biYPelsPerMeter  = 0;
-        bi.biClrUsed        = 0;  //  must be zero for RGB compression (none)
-        bi.biClrImportant   = 0;  // always
-
-        // Get the size of the DIB
-        dwDIBSize = GetDIBSize( &bi );
-
-        // Allocate for the BITMAPINFO structure and the color table.
-        pDIB = GlobalAllocPtr( GHND, dwDIBSize );
-        if (pDIB == 0) {
-            return( NULL );
-        }
-
-        // Copy the header info
-        *((BITMAPINFOHEADER*)pDIB) = bi;
-
-        // Get a pointer to the color table
-        RGBQUAD   *pRgbq = (RGBQUAD   *)((LPSTR)pDIB + sizeof(BITMAPINFOHEADER));
-
-        pRgbq[0].rgbRed      = 0;
-        pRgbq[0].rgbBlue     = 0;
-        pRgbq[0].rgbGreen    = 0;
-        pRgbq[0].rgbReserved = 0;
-        pRgbq[1].rgbRed      = 255;
-        pRgbq[1].rgbBlue     = 255;
-        pRgbq[1].rgbGreen    = 255;
-        pRgbq[1].rgbReserved = 255;
-
-        // Pointers to the bits
-        //PVOID pbiBits = (LPSTR)pRgbq + bi.biClrUsed * sizeof(RGBQUAD);
-        //
-        // In the BITMAPINFOHEADER documentation, it appears that
-        // there should be no color table for 32 bit images, but
-        // experience shows that the image is off by 3 words if it
-        // is not included.  So here it is.
-        PVOID pbiBits = GetDIBImagePtr((BITMAPINFOHEADER*)pDIB);  //(LPSTR)pRgbq + 3 * sizeof(RGBQUAD);
-
-        int       sizeWords = bi.biSizeImage/4;
-        RGBQUAD*  rgbDib = (RGBQUAD*)pbiBits;
-        long*     rgbTif = (long*)raster;
-
-        _TIFFmemcpy(pbiBits, raster, bi.biSizeImage);
-    }
-
-        //  For now just always default to the RGB 32 bit form.                                                       // save as 32 bit for simplicity
-    else if ( true /*BitsPerSample == 8 && SamplePerPixel == 3*/ ) {   // 24 bit color
-
-        bi.biSize           = sizeof(BITMAPINFOHEADER);
-        bi.biWidth          = imageWidth;
-        bi.biHeight         = imageLength;
-        bi.biPlanes         = 1;  // always
-        bi.biBitCount       = 32;
-        bi.biCompression    = BI_RGB;
-        bi.biSizeImage      = WIDTHBYTES(bi.biWidth * bi.biBitCount) * bi.biHeight;
-        bi.biXPelsPerMeter  = 0;
-        bi.biYPelsPerMeter  = 0;
-        bi.biClrUsed        = 0;  //  must be zero for RGB compression (none)
-        bi.biClrImportant   = 0;  // always
-
-        // Get the size of the DIB
-        dwDIBSize = GetDIBSize( &bi );
-
-        // Allocate for the BITMAPINFO structure and the color table.
-        pDIB = GlobalAllocPtr( GHND, dwDIBSize );
-        if (pDIB == 0) {
-            return( NULL );
-        }
-
-        // Copy the header info
-        *((BITMAPINFOHEADER*)pDIB) = bi;
-
-        // Get a pointer to the color table
-        RGBQUAD   *pRgbq = (RGBQUAD   *)((LPSTR)pDIB + sizeof(BITMAPINFOHEADER));
-
-        // Pointers to the bits
-        //PVOID pbiBits = (LPSTR)pRgbq + bi.biClrUsed * sizeof(RGBQUAD);
-        //
-        // In the BITMAPINFOHEADER documentation, it appears that
-        // there should be no color table for 32 bit images, but
-        // experience shows that the image is off by 3 words if it
-        // is not included.  So here it is.
-        PVOID pbiBits = (LPSTR)pRgbq + 3 * sizeof(RGBQUAD);
-
-        int       sizeWords = bi.biSizeImage/4;
-        RGBQUAD*  rgbDib = (RGBQUAD*)pbiBits;
-        long*     rgbTif = (long*)raster;
-
-        // Swap the byte order while copying
-        for ( int i = 0 ; i < sizeWords ; ++i )
-        {
-            rgbDib[i].rgbRed   = TIFFGetR(rgbTif[i]);
-            rgbDib[i].rgbBlue  = TIFFGetB(rgbTif[i]);
-            rgbDib[i].rgbGreen = TIFFGetG(rgbTif[i]);
-            rgbDib[i].rgbReserved = 0;
-        }
-    }
-
-    return pDIB;
-}
-
-
-
-
-///////////////////////////////////////////////////////////////
-//
-//  Hacked from tif_getimage.c in libtiff in v3.5.7
-//
-//
-typedef unsigned char u_char;
-
-
-#define DECLAREContigPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img, \
-    uint32* cp, \
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h, \
-    int32 fromskew, int32 toskew, \
-    u_char* pp \
-)
-
-#define DECLARESepPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img,\
-    uint32* cp,\
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h,\
-    int32 fromskew, int32 toskew,\
-    u_char* r, u_char* g, u_char* b, u_char* a\
-)
-
-DECLAREContigPutFunc(putContig1bitTile);
-static int getStripContig1Bit(TIFFRGBAImage* img, uint32* uraster, uint32 w, uint32 h);
-
-//typdef struct TIFFDibImage {
-//    TIFFRGBAImage tif;
-//    dibinstalled;
-//} TIFFDibImage ;
-
-void DibInstallHack(TIFFDibImage* dib) {
-    TIFFRGBAImage* img = &dib->tif;
-    dib->dibinstalled = false;
-    switch (img->photometric) {
-        case PHOTOMETRIC_MINISWHITE:
-        case PHOTOMETRIC_MINISBLACK:
-        switch (img->bitspersample) {
-            case 1:
-                img->put.contig = putContig1bitTile;
-                img->get = getStripContig1Bit;
-                dib->dibinstalled = true;
-                break;
-        }
-        break;
-    }
-}
-
-/*
- * 1-bit packed samples => 1-bit
- *
- *   Override to just copy the data
- */
-DECLAREContigPutFunc(putContig1bitTile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    int wb = WIDTHBYTES(w);
-    u_char*  ucp = (u_char*)cp;
-
-    /* Conver 'w' to bytes from pixels (rounded up) */
-    w = (w+7)/8;
-
-    while (h-- > 0) {
-        _TIFFmemcpy(ucp, pp, w);
-        /*
-        for (x = wb; x-- > 0;) {
-            *cp++ = rgbi(Map[pp[0]], Map[pp[1]], Map[pp[2]]);
-            pp += samplesperpixel;
-        }
-        */
-        ucp += (wb + toskew);
-        pp += (w + fromskew);
-    }
-}
-
-/*
- *  Hacked from the tif_getimage.c file.
- */
-static uint32
-setorientation(TIFFRGBAImage* img, uint32 h)
-{
-    TIFF* tif = img->tif;
-    uint32 y;
-
-    switch (img->orientation) {
-    case ORIENTATION_BOTRIGHT:
-    case ORIENTATION_RIGHTBOT:  /* XXX */
-    case ORIENTATION_LEFTBOT:   /* XXX */
-    TIFFWarning(TIFFFileName(tif), "using bottom-left orientation");
-    img->orientation = ORIENTATION_BOTLEFT;
-    /* fall thru... */
-    case ORIENTATION_BOTLEFT:
-    y = 0;
-    break;
-    case ORIENTATION_TOPRIGHT:
-    case ORIENTATION_RIGHTTOP:  /* XXX */
-    case ORIENTATION_LEFTTOP:   /* XXX */
-    default:
-    TIFFWarning(TIFFFileName(tif), "using top-left orientation");
-    img->orientation = ORIENTATION_TOPLEFT;
-    /* fall thru... */
-    case ORIENTATION_TOPLEFT:
-    y = h-1;
-    break;
-    }
-    return (y);
-}
-
-/*
- * Get a strip-organized image that has
- *  PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *  SamplesPerPixel == 1
- *
- *  Hacked from the tif_getimage.c file.
- *
- *    This is set up to allow us to just copy the data to the raster
- *    for 1-bit bitmaps
- */
-static int
-getStripContig1Bit(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileContigRoutine put = img->put.contig;
-    uint16 orientation;
-    uint32 row, y, nrow, rowstoread;
-    uint32 pos;
-    u_char* buf;
-    uint32 rowsperstrip;
-    uint32 imagewidth = img->width;
-    tsize_t scanline;
-    int32 fromskew, toskew;
-    tstrip_t strip;
-    tsize_t  stripsize;
-    u_char* braster = (u_char*)raster; // byte wide raster
-    uint32  wb = WIDTHBYTES(w);
-    int ret = 1;
-
-    buf = (u_char*) _TIFFmalloc(TIFFStripSize(tif));
-    if (buf == 0) {
-        TIFFError(TIFFFileName(tif), "No space for strip buffer");
-        return (0);
-    }
-    y = setorientation(img, h);
-    orientation = img->orientation;
-    toskew = -(int32) (orientation == ORIENTATION_TOPLEFT ? wb+wb : wb-wb);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0)/8;
-    for (row = 0; row < h; row += nrow)
-    {
-        rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
-        nrow = (row + rowstoread > h ? h - row : rowstoread);
-        strip = TIFFComputeStrip(tif,row+img->row_offset, 0);
-        stripsize = ((row + img->row_offset)%rowsperstrip + nrow) * scanline;
-        if (TIFFReadEncodedStrip(tif, strip, buf, stripsize ) < 0
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-
-        pos = ((row + img->row_offset) % rowsperstrip) * scanline;
-        (*put)(img, (uint32*)(braster+y*wb), 0, y, w, nrow, fromskew, toskew, buf + pos);
-        y += (orientation == ORIENTATION_TOPLEFT ?-(int32) nrow : (int32) nrow);
-    }
-    _TIFFfree(buf);
-    return (ret);
-}
-
diff --git a/tkimg1.3/libtiff/contrib/win_dib/tiff2dib.c b/tkimg1.3/libtiff/contrib/win_dib/tiff2dib.c
deleted file mode 100644
index f5d4040..0000000
--- a/tkimg1.3/libtiff/contrib/win_dib/tiff2dib.c
+++ /dev/null
@@ -1,372 +0,0 @@
-/*************************************************************************
- *
- * Source file for Windows 95/Win32. 
- *
- * The function LoadTIFFinDIB in this source file let you load 
- * a TIFF file and build a memory DIB with it and return the 
- * HANDLE (HDIB) of the memory bloc containing the DIB.
- *
- *  Example : 
- * 
- *   HDIB   hDIB;
- *   hDIB = LoadTIFFinDIB("sample.tif");
- *
- *
- * To build this source file you must include the TIFF library   
- * in your project.
- *
- * 4/12/95   Philippe Tenenhaus   100423.3705 at compuserve.com
- *
- ************************************************************************/
-
-
-#include "tiffio.h" 
-
-#define HDIB HANDLE
-#define IS_WIN30_DIB(lpbi)  ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
-#define CVT(x)      (((x) * 255L) / ((1L<<16)-1))
-
-static HDIB CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount);
-static LPSTR FindDIBBits(LPSTR lpDIB);
-static WORD PaletteSize(LPSTR lpDIB);
-static WORD DIBNumColors(LPSTR lpDIB);
-static int checkcmap(int n, uint16* r, uint16* g, uint16* b);
-
-
-
-/*************************************************************************
- *
- * HDIB LoadTIFFinDIB(LPSTR lpFileName) 
- *
- * Parameter:
- *
- * LPSTR lpDIB      - File name of a tiff imag
- *
- * Return Value:
- *
- * LPSTR            - HANDLE of a DIB
- *
- * Description:
- *
- * This function load a TIFF file and build a memory DIB with it
- * and return the HANDLE (HDIB) of the memory bloc containing
- * the DIB.
- *
- * 4/12/95   Philippe Tenenhaus   100423.3705 at compuserve.com
- *
- ************************************************************************/
-
-HDIB LoadTIFFinDIB(LPSTR lpFileName)    
-{
-    TIFF          *tif;
-    unsigned long imageLength; 
-    unsigned long imageWidth; 
-    unsigned int  BitsPerSample;
-    unsigned long LineSize;
-    unsigned int  SamplePerPixel;
-    unsigned long RowsPerStrip;  
-    int           PhotometricInterpretation;
-    long          nrow;
-	unsigned long row;
-    char          *buf;          
-    LPBITMAPINFOHEADER lpDIB; 
-    HDIB          hDIB;
-    char          *lpBits;
-    HGLOBAL       hStrip;
-    int           i,l;
-    int           Align; 
-    
-    tif = TIFFOpen(lpFileName, "r");
-    
-    if (!tif)
-        goto TiffOpenError;
-    
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);  
-    TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &BitsPerSample);
-    TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip);  
-    TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip);   
-    TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &PhotometricInterpretation);
-           
-    LineSize = TIFFScanlineSize(tif); //Number of byte in ine line
-
-    SamplePerPixel = (int) (LineSize/imageWidth);
-
-    //Align = Number of byte to add at the end of each line of the DIB
-    Align = 4 - (LineSize % 4);
-    if (Align == 4)	Align = 0;
-
-    
-    //Create a new DIB
-    hDIB = CreateDIB((DWORD) imageWidth, (DWORD) imageLength, (WORD)
-(BitsPerSample*SamplePerPixel));
-    lpDIB  = (LPBITMAPINFOHEADER) GlobalLock(hDIB);
-    if (!lpDIB)
-          goto OutOfDIBMemory;
-          
-    if (lpDIB)
-       lpBits = FindDIBBits((LPSTR) lpDIB);
-
-    //In the tiff file the lines are save from up to down 
-	//In a DIB the lines must be save from down to up
-    if (lpBits)
-      {
-        lpBits = FindDIBBits((LPSTR) lpDIB);
-        lpBits+=((imageWidth*SamplePerPixel)+Align)*(imageLength-1);
-		//now lpBits pointe on the bottom line
-        
-        hStrip = GlobalAlloc(GHND,TIFFStripSize(tif));
-        buf = GlobalLock(hStrip);           
-        
-        if (!buf)
-           goto OutOfBufMemory;
-        
-        //PhotometricInterpretation = 2 image is RGB
-        //PhotometricInterpretation = 3 image have a color palette              
-        if (PhotometricInterpretation == 3)
-        {
-          uint16* red;
-          uint16* green;
-          uint16* blue;
-          int16 i;
-          LPBITMAPINFO lpbmi;   
-          int   Palette16Bits;          
-           
-          TIFFGetField(tif, TIFFTAG_COLORMAP, &red, &green, &blue); 
-
-		  //Is the palette 16 or 8 bits ?
-          if (checkcmap(1<<BitsPerSample, red, green, blue) == 16) 
-             Palette16Bits = TRUE;
-          else
-             Palette16Bits = FALSE;
-             
-          lpbmi = (LPBITMAPINFO)lpDIB;                      
-                
-          //load the palette in the DIB
-          for (i = (1<<BitsPerSample)-1; i >= 0; i--) 
-            {             
-             if (Palette16Bits)
-                {
-                  lpbmi->bmiColors[i].rgbRed =(BYTE) CVT(red[i]);
-                  lpbmi->bmiColors[i].rgbGreen = (BYTE) CVT(green[i]);
-                  lpbmi->bmiColors[i].rgbBlue = (BYTE) CVT(blue[i]);           
-                }
-             else
-                {
-                  lpbmi->bmiColors[i].rgbRed = (BYTE) red[i];
-                  lpbmi->bmiColors[i].rgbGreen = (BYTE) green[i];
-                  lpbmi->bmiColors[i].rgbBlue = (BYTE) blue[i];        
-                }
-            }  
-                 
-        }
-        
-        //read the tiff lines and save them in the DIB
-		//with RGB mode, we have to change the order of the 3 samples RGB
-<=> BGR
-        for (row = 0; row < imageLength; row += RowsPerStrip) 
-          {     
-            nrow = (row + RowsPerStrip > imageLength ? imageLength - row :
-RowsPerStrip);
-            if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0),
-                buf, nrow*LineSize)==-1)
-                  {
-                     goto TiffReadError;
-                  } 
-            else
-                  {  
-                    for (l = 0; l < nrow; l++) 
-                      {
-                         if (SamplePerPixel  == 3)
-                           for (i=0;i< (int) (imageWidth);i++)
-                              {
-                               lpBits[i*SamplePerPixel+0]=buf[l*LineSize+i*Sample
-PerPixel+2]; 
-                               lpBits[i*SamplePerPixel+1]=buf[l*LineSize+i*Sample
-PerPixel+1];
-                               lpBits[i*SamplePerPixel+2]=buf[l*LineSize+i*Sample
-PerPixel+0];
-                              }
-                         else
-                           memcpy(lpBits, &buf[(int) (l*LineSize)], (int)
-imageWidth*SamplePerPixel); 
-                          
-                         lpBits-=imageWidth*SamplePerPixel+Align;
-
-                      }
-                 }
-          }
-        GlobalUnlock(hStrip);
-        GlobalFree(hStrip);
-        GlobalUnlock(hDIB); 
-        TIFFClose(tif);
-      }
-      
-    return hDIB;
-    
-    OutOfBufMemory:
-       
-    TiffReadError:
-       GlobalUnlock(hDIB); 
-       GlobalFree(hStrip);
-    OutOfDIBMemory:
-       TIFFClose(tif);
-    TiffOpenError:
-       return (HANDLE) 0;
-       
-         
-}
-
-
-static int checkcmap(int n, uint16* r, uint16* g, uint16* b)
-{
-    while (n-- > 0)
-        if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-        return (16);
-    
-    return (8);
-}
-
-
-
-/*************************************************************************
- * All the following functions were created by microsoft, they are
- * parts of the sample project "wincap" given with the SDK Win32.
- *
- * Microsoft says that :
- *
- *  You have a royalty-free right to use, modify, reproduce and
- *  distribute the Sample Files (and/or any modified version) in
- *  any way you find useful, provided that you agree that
- *  Microsoft has no warranty obligations or liability for any
- *  Sample Application Files which are modified.
- *
- ************************************************************************/
-
-HDIB CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount)
-{
-   BITMAPINFOHEADER bi;         // bitmap header
-   LPBITMAPINFOHEADER lpbi;     // pointer to BITMAPINFOHEADER
-   DWORD dwLen;                 // size of memory block
-   HDIB hDIB;
-   DWORD dwBytesPerLine;        // Number of bytes per scanline
-
-
-   // Make sure bits per pixel is valid
-   if (wBitCount <= 1)
-      wBitCount = 1;
-   else if (wBitCount <= 4)
-      wBitCount = 4;
-   else if (wBitCount <= 8)
-      wBitCount = 8;
-   else if (wBitCount <= 24)
-      wBitCount = 24;
-   else
-      wBitCount = 4;  // set default value to 4 if parameter is bogus
-
-   // initialize BITMAPINFOHEADER
-   bi.biSize = sizeof(BITMAPINFOHEADER);
-   bi.biWidth = dwWidth;         // fill in width from parameter
-   bi.biHeight = dwHeight;       // fill in height from parameter
-   bi.biPlanes = 1;              // must be 1
-   bi.biBitCount = wBitCount;    // from parameter
-   bi.biCompression = BI_RGB;    
-   bi.biSizeImage = (dwWidth*dwHeight*wBitCount)/8; //0;           // 0's here
-mean "default"
-   bi.biXPelsPerMeter = 2834; //0;
-   bi.biYPelsPerMeter = 2834; //0;
-   bi.biClrUsed = 0;
-   bi.biClrImportant = 0;
-
-   // calculate size of memory block required to store the DIB.  This
-   // block should be big enough to hold the BITMAPINFOHEADER, the color
-   // table, and the bits
-
-   dwBytesPerLine =   (((wBitCount * dwWidth) + 31) / 32 * 4);
-   dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + (dwBytesPerLine * dwHeight);
-
-   // alloc memory block to store our bitmap
-   hDIB = GlobalAlloc(GHND, dwLen);
-
-   // major bummer if we couldn't get memory block
-   if (!hDIB)
-   {
-      return NULL;
-   }
-
-   // lock memory and get pointer to it
-   lpbi = (VOID FAR *)GlobalLock(hDIB);
-
-   // use our bitmap info structure to fill in first part of
-   // our DIB with the BITMAPINFOHEADER
-   *lpbi = bi;
-
-   // Since we don't know what the colortable and bits should contain,
-   // just leave these blank.  Unlock the DIB and return the HDIB.
-
-   GlobalUnlock(hDIB);
-
-   /* return handle to the DIB */
-   return hDIB;
-}
-
-
-LPSTR FAR FindDIBBits(LPSTR lpDIB)
-{
-   return (lpDIB + *(LPDWORD)lpDIB + PaletteSize(lpDIB));
-}
-
-
-WORD FAR PaletteSize(LPSTR lpDIB)
-{
-   /* calculate the size required by the palette */
-   if (IS_WIN30_DIB (lpDIB))
-      return (DIBNumColors(lpDIB) * sizeof(RGBQUAD));
-   else
-      return (DIBNumColors(lpDIB) * sizeof(RGBTRIPLE));
-}
-
-
-WORD DIBNumColors(LPSTR lpDIB)
-{
-   WORD wBitCount;  // DIB bit count
-
-   /*  If this is a Windows-style DIB, the number of colors in the
-    *  color table can be less than the number of bits per pixel
-    *  allows for (i.e. lpbi->biClrUsed can be set to some value).
-    *  If this is the case, return the appropriate value.
-    */
-
-   if (IS_WIN30_DIB(lpDIB))
-   {
-      DWORD dwClrUsed;
-
-      dwClrUsed = ((LPBITMAPINFOHEADER)lpDIB)->biClrUsed;
-      if (dwClrUsed)
-     return (WORD)dwClrUsed;
-   }
-
-   /*  Calculate the number of colors in the color table based on
-    *  the number of bits per pixel for the DIB.
-    */
-   if (IS_WIN30_DIB(lpDIB))
-      wBitCount = ((LPBITMAPINFOHEADER)lpDIB)->biBitCount;
-   else
-      wBitCount = ((LPBITMAPCOREHEADER)lpDIB)->bcBitCount;
-
-   /* return number of colors based on bits per pixel */
-   switch (wBitCount)
-      {
-   case 1:
-      return 2;
-
-   case 4:
-      return 16;
-
-   case 8:
-      return 256;
-
-   default:
-      return 0;
-      }
-}
diff --git a/tkimg1.3/libtiff/contrib/winnt/README b/tkimg1.3/libtiff/contrib/winnt/README
deleted file mode 100644
index 68c6441..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/README
+++ /dev/null
@@ -1,26 +0,0 @@
-Date: Fri, 10 Nov 1995 13:02:33 -0800
-Message-Id: <199511102102.NAA07993 at lido>
-To: tiff at sgi.engr.sgi.com
-Subject: Contribution: libtiff for Windows-nt
-Reply-To: Dave Dyer <ddyer at triple-i.com>
-Sender: owner-tiff at sgi.engr.sgi.com
-Precedence: bulk
-
-
-Since I needed it, and the support for windows-nt versions of libtiff
-is sketchy at best, I packaged up my port of libtiff v3.4beta024 
-to windows-nt.
-
-	ftp://torii.triple-i.com/pub/ddyer/libtiff.tar.gz
-
-this contains "libtiff.mak", a makefile for microsoft visual c++,
-a couple of hand-built .h and .c files (corresponding to those which
-are automatically constructed by unix makefiles) and static libraries
-compiled for intel and dec alpha.
-
-As customary, I make no claims regarding the completeness or
-correctness of these libraries, and accept no responsibily for any
-mishaps you may have as a result of using them.  They work for me.
-
-I hope Sam will copy and incorporate this into the "contrib" section
-of the next libtiff release.
diff --git a/tkimg1.3/libtiff/contrib/winnt/README.console b/tkimg1.3/libtiff/contrib/winnt/README.console
deleted file mode 100644
index 05d7dd5..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/README.console
+++ /dev/null
@@ -1,182 +0,0 @@
-Date:    Fri, 18 Apr 1997 09:25:09 EDT
-To:      "'sam at cthulhu.engr.sgi.com'" <sam at cthulhu.engr.sgi.com>
-cc:      "'tiff at sgi.engr.sgi.com'" <tiff at sgi.engr.sgi.com>
-
-From:    xingong chang <xingong at feith1.FEITH.COM>
-Subject: Contribution: libtiff for Windows-nt console applications
-
-Return-Path: xingong at feith1.FEITH.COM 
-Delivery-Date: Fri, 18 Apr 1997 06:37:38 -0700
-Return-Path: xingong at feith1.FEITH.COM
-MIME-Version: 1.0
-
-Hi, 
-I built the libtiff under WINNT 4.0 as a 32-bit library for pure
-console applications. I made the makefile.nt based on Philippe
-Tenenhaus' makefile.w95 file.  Since I want my stuff to be a pure
-console application running on WinNT, Dave Dyer's makefile for WINNT is
-not good for me since it is for Windows applications.
-
-I used the tif_msdos.c file instead of the tif_win32.c in the $(OBJS)
-list because tif_win32.c is not a pure console program, it includes
-some function calls such as MessageBox etc which requires windows
-application library ($winslib as defined in <ntwin32.mak>).
-
-unlike Philippe Tenenhaus' makefile.w95 file, this makefile.nt does
-support fax3 stuff. And to make the mkg3states.exe,the getopt.obj is
-needed. "getopt" package is ATT public domain source for getopt(3).
-Also you need to inlcude the g3states.h in tif_fax.c fileand modify the
-tif_fax3.h to delete the external declaration of FFFaxMainTable,
-TIFFFaxWhileTable and TIFFFaxBlackTable
-
-
-libtiff version: TIFFLIB_VERSION 19960307
-
-Hardware you are using:  i386
-
-Operating system you are using: Windows NT 4.0
-
-C compiler :  Microsoft Visual C++ 4.1
-
-NMAKE      :  Microsoft nmake 1.61
-
-
-Here is the makefile.nt I used:
----------------------------------------------------------
-
-# makefile.nt  for the tiff library 
-# Tag Image File Format Library
-#
-# Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler
-# Copyright (c) 1991, 1992 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-# This Makefile is for use with microsoft nmake version 1.61
-#
-
-!include <ntwin32.mak>
-
-DEFS   =  -DBSDTYPES -DO_RDONLY=S_IREAD  -DO_RDWR=S_IWRITE
-
-INCS=   tiff.h tiffio.h
-SRCS=   tif_aux.c \
-	tif_close.c \
-	tif_codec.c \
-	tif_compress.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_flush.c \
-	tif_lzw.c \
-	tif_next.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_predict \
-	tif_print.c \
-	tif_read.c \
-	tif_swab.c \
-	tif_strip.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	tif_msdos.c \
-        tif_fax3.c
-		
-	
-OBJS=   tif_aux.obj \
-	tif_close.obj \
-	tif_codec.obj \
-	tif_compress.obj \
-	tif_dir.obj \
-	tif_dirinfo.obj \
-	tif_dirread.obj \
-	tif_dirwrite.obj \
-	tif_dumpmode.obj \
-	tif_error.obj \
-	tif_getimage.obj \
-	tif_jpeg.obj \
-	tif_flush.obj \
-	tif_lzw.obj \
-	tif_next.obj \
-	tif_open.obj \
-	tif_packbits.obj \
-	tif_predict.obj \
-	tif_print.obj \
-	tif_read.obj \
-	tif_swab.obj \
-	tif_strip.obj \
-	tif_thunder.obj \
-	tif_tile.obj \
-	tif_version.obj \
-	tif_warning.obj \
-	tif_write.obj  \
-        tif_msdos.obj  \
-        tif_fax3.obj     
-
-#To make the mkg3states.exe,the getopt.obj is needed. getopt package is
-# ATT public domain source for getopt(3).
-EXTRA_OBJS   =  getopt.obj
-	
-all:    libtiff.lib 
-
-libtiff.lib: $(OBJS)
-	 del libtiff.lib
-	 lib -out:libtiff.lib $(OBJS) 
-
-.c.obj: 
-	$(cc) $(DEFS) $(cdebug) $(cflags) $(cvarsmt) $*.c
-
-
-#To include fax3 support, we did this modification
-#add to the build script : tif_fax3.c and tif_fax3.obj
-#define CCITT_SUPPORT in the file tifconf.h
-#inlcude the g3states.h in tif_fax.c file
-#modify the tif_fax3.h to delete the TIFFFaxMainTable,TIFFFaxWhileTable
-# TIFFFaxBlackTable etc external declaration
-#mkg3states.exe without any command line options will produce the g3states.h 
-
-$(OBJS): tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
-tif_fax3.obj: tif_fax3.c g3states.h t4.h tif_fax3.h
-
-g3states.h: mkg3states.obj t4.h
-	$(link) $(ldebug) $(conslflags) -out:mkg3states.exe mkg3states.obj \
-				$(EXTRA_OBJS)
-        mkg3states.exe 
-
-clean:
-	del *.obj
-        del g3states.h
-
-clobber: 
-	del libtiff.lib
-	del *.obj
-	del g3states.h
-
-
-
-
diff --git a/tkimg1.3/libtiff/contrib/winnt/fax3sm.c b/tkimg1.3/libtiff/contrib/winnt/fax3sm.c
deleted file mode 100644
index 1d0f34a..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/fax3sm.c
+++ /dev/null
@@ -1,1046 +0,0 @@
-/* WARNING, this file was automatically generated by the
-    mkg3states program */
-#include "tiff.h"
-#include "tif_fax3.h"
- const  TIFFFaxTabEnt TIFFFaxMainTable[128] = {
-12,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,7,3,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,6,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,7,3,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0
-};
-const TIFFFaxTabEnt TIFFFaxWhiteTable[4096] = {
-12,11,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1856,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2112,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2368,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,1984,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2240,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2496,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,12,11,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1856,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2176,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2432,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2048,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2304,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2560,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7
-};
-const  TIFFFaxTabEnt TIFFFaxBlackTable[8192] = {
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,56,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,57,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,48,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,384,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2368,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,50,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1664,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,26,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1408,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,32,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1024,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,768,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2240,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,38,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,512,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1280,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,896,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,640,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,45,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,29,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1536,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,41,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2048,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,35,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,59,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,256,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1152,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,63,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,53,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2560,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,56,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,57,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,48,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,384,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2368,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,50,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1728,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,26,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1472,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,32,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1088,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,832,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2240,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,38,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,576,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1344,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,960,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,704,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,45,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,29,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1600,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,41,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2048,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,35,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,59,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,256,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1216,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,63,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,53,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2560,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2
-};
diff --git a/tkimg1.3/libtiff/contrib/winnt/libtiff.def b/tkimg1.3/libtiff/contrib/winnt/libtiff.def
deleted file mode 100644
index 7ed4e7b..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/libtiff.def
+++ /dev/null
@@ -1,72 +0,0 @@
-LIBRARY libtiff
-EXPORTS TIFFOpen
-	TIFFGetVersion
-	TIFFClose
-	TIFFFlush
-	TIFFFlushData
-	TIFFFlushdata1
-	TIFFGetField
-	TIFFVGetField
-	TIFFGetFieldDefaulted
-	TIFFVGetFieldDefaulted
-	TIFFReadDirectory
-	TIFFScanlineSize
-	TIFFStripSize
-	TIFFVStripSize
-	TIFFTileRowSize
-	TIFFTileSize
-	TIFFVTileSize
-	TIFFFileno
-	TIFFGetMode
-	TIFFIsTiled
-	TIFFIsByteSwapped
-	TIFFCurrentRow
-	TIFFCurrentDirectory
-	TIFFCurrentStrip
-	TIFFCurrentTile
-	TIFFReadBufferSetup
-	TIFFLastDirectory
-	TIFFSetDirectory
-	TIFFSetSubDirectory
-	TIFFUnlinkDirectory
-	TIFFSetField
-	TIFFVSetField
-	TIFFWriteDirectory
-	TIFFPrintDirectory
-	TIFFReadScanline
-	TIFFWriteScanline
-	TIFFReadRGBAImage
-	TIFFPrintDirectory
-	TIFFReadScanline
-	TIFFWriteScanline
-	TIFFReadRGBAImage
-	TIFFFdOpen
-	TIFFClientOpen
-	TIFFFileName
-	TIFFError
-	TIFFWarning
-	TIFFSetErrorHandler
-	TIFFSetWarningHandler
-	TIFFComputeTile
-	TIFFCheckTile
-	TIFFNumberOfTiles
-	TIFFReadTile
-	TIFFWriteTile
-	TIFFComputeStrip
-	TIFFNumberOfStrips
-	TIFFReadEncodedStrip
-	TIFFReadRawStrip
-	TIFFReadEncodedTile
-	TIFFReadRawTile
-	TIFFWriteEncodedStrip
-	TIFFWriteRawStrip
-	TIFFWriteEncodedTile
-	TIFFWriteRawTile
-	TIFFSetWriteOffset
-	TIFFSwabShort
-	TIFFSwabLong
-	TIFFSwabArrayOfShort
-	TIFFSwabArrayOfLong
-	TIFFReverseBits
-	TIFFGetBitRevTable
-	TIFFModeCCITTFax3
diff --git a/tkimg1.3/libtiff/contrib/winnt/libtiff.mak b/tkimg1.3/libtiff/contrib/winnt/libtiff.mak
deleted file mode 100644
index c5a351e..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/libtiff.mak
+++ /dev/null
@@ -1,1947 +0,0 @@
-# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (ALPHA) Static Library" 0x0604
-# TARGTYPE "Macintosh Static Library" 0x0304
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-!IF "$(CFG)" == ""
-CFG=Win32 Debug
-!MESSAGE No configuration specified.  Defaulting to Win32 Debug.
-!ENDIF 
-
-!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" && "$(CFG)" !=\
- "Macintosh Release" && "$(CFG)" != "Macintosh Debug" && "$(CFG)" != "APXrel" &&\
- "$(CFG)" != "APXdeb"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line.  For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "libtiff.mak" CFG="Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "Macintosh Release" (based on "Macintosh Static Library")
-!MESSAGE "Macintosh Debug" (based on "Macintosh Static Library")
-!MESSAGE "APXrel" (based on "Win32 (ALPHA) Static Library")
-!MESSAGE "APXdeb" (based on "Win32 (ALPHA) Static Library")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "Win32 Release"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WinRel"
-# PROP BASE Intermediate_Dir "WinRel"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WinRel"
-# PROP Intermediate_Dir "WinRel"
-OUTDIR=.\WinRel
-INTDIR=.\WinRel
-
-ALL : $(OUTDIR)/""libtiff.lib"" $(OUTDIR)/""libtiff.bsc""
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
-# ADD CPP /nologo /MT /W3 /GX /YX /O2 /I "." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
-CPP_PROJ=/nologo /MT /W3 /GX /YX /O2 /I "." /I ".." /D "WIN32" /D "NDEBUG" /D\
- "_WINDOWS" /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch" /Fo$(INTDIR)/ /c 
-CPP_OBJS=.\WinRel/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO
-LIB32_FLAGS=/NOLOGO /OUT:$(OUTDIR)\"libtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"libtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WinDebug"
-# PROP BASE Intermediate_Dir "WinDebug"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WinDebug"
-# PROP Intermediate_Dir "WinDebug"
-OUTDIR=.\WinDebug
-INTDIR=.\WinDebug
-
-ALL : $(OUTDIR)/""dlibtiff.lib"" $(OUTDIR)/""libtiff.bsc""
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /Z7 /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c
-# ADD CPP /nologo /MT /W3 /GX /Z7 /YX /Od /I "." /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FAs /FR /c
-CPP_PROJ=/nologo /MT /W3 /GX /Z7 /YX /Od /I "." /I ".." /D "WIN32" /D "_DEBUG"\
- /D "_WINDOWS" /FAs /Fa$(INTDIR)/ /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch"\
- /Fo$(INTDIR)/ /c 
-CPP_OBJS=.\WinDebug/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO /OUT:"WinDebug\dlibtiff.lib"
-LIB32_FLAGS=/NOLOGO /OUT:"WinDebug\dlibtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"dlibtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "MacRel"
-# PROP BASE Intermediate_Dir "MacRel"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "MacRel"
-# PROP Intermediate_Dir "MacRel"
-OUTDIR=.\MacRel
-INTDIR=.\MacRel
-
-ALL : $(OUTDIR)/""libtiff.lib"" $(OUTDIR)/""libtiff.bsc""
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /AL /W3 /GX /YX /O2 /D "_WINDOWS" /D "_MAC" /D "_68K_" /D "NDEBUG" /FR /c
-# ADD CPP /nologo /AL /W3 /GX /YX /O2 /D "_WINDOWS" /D "_MAC" /D "_68K_" /D "NDEBUG" /FR /c
-CPP_PROJ=/nologo /AL /W3 /GX /YX /O2 /D "_WINDOWS" /D "_MAC" /D "_68K_" /D\
- "NDEBUG" /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch" /Fo$(INTDIR)/ /c 
-CPP_OBJS=.\MacRel/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO
-LIB32_FLAGS=/NOLOGO /OUT:$(OUTDIR)\"libtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"libtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "MacDebug"
-# PROP BASE Intermediate_Dir "MacDebug"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "MacDebug"
-# PROP Intermediate_Dir "MacDebug"
-OUTDIR=.\MacDebug
-INTDIR=.\MacDebug
-
-ALL : $(OUTDIR)/""libtiff.lib"" $(OUTDIR)/""libtiff.bsc""
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /AL /Q68m /W3 /GX /Z7 /YX /Od /D "_WINDOWS" /D "_MAC" /D "_68K_" /D "_DEBUG" /FR /c
-# ADD CPP /nologo /AL /Q68m /W3 /GX /Z7 /YX /Od /D "_WINDOWS" /D "_MAC" /D "_68K_" /D "_DEBUG" /FR /c
-CPP_PROJ=/nologo /AL /Q68m /W3 /GX /Z7 /YX /Od /D "_WINDOWS" /D "_MAC" /D\
- "_68K_" /D "_DEBUG" /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch" /Fo$(INTDIR)/ /c 
-CPP_OBJS=.\MacDebug/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO
-LIB32_FLAGS=/NOLOGO /OUT:$(OUTDIR)\"libtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"libtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "APXrel"
-# PROP BASE Intermediate_Dir "APXrel"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "APXrel"
-# PROP Intermediate_Dir "APXrel"
-OUTDIR=.\APXrel
-INTDIR=.\APXrel
-
-ALL : $(OUTDIR)/"libtiff.lib" $(OUTDIR)/"libtiff.bsc"
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /Gt0 /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
-# ADD CPP /nologo /MT /Gt0 /W3 /GX /YX /O2 /I ".." /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
-CPP_PROJ=/nologo /MT /Gt0 /W3 /GX /YX /O2 /I ".." /I "." /D "WIN32" /D "NDEBUG"\
- /D "_WINDOWS" /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch" /Fo$(INTDIR)/ /c 
-CPP_OBJS=.\APXrel/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO
-LIB32_FLAGS=/NOLOGO /OUT:$(OUTDIR)\"libtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"libtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "APXdeb"
-# PROP BASE Intermediate_Dir "APXdeb"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "APXdeb"
-# PROP Intermediate_Dir "APXdeb"
-OUTDIR=.\APXdeb
-INTDIR=.\APXdeb
-
-ALL : $(OUTDIR)/"dlibtiff.lib" $(OUTDIR)/"libtiff.bsc"
-
-$(OUTDIR) : 
-    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /Gt0 /W3 /GX /Z7 /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c
-# ADD CPP /nologo /MT /Gt0 /W3 /GX /Z7 /YX /Od /I ".." /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c
-CPP_PROJ=/nologo /MT /Gt0 /W3 /GX /Z7 /YX /Od /I ".." /I "." /D "WIN32" /D\
- "_DEBUG" /D "_WINDOWS" /FR$(INTDIR)/ /Fp$(OUTDIR)/"libtiff.pch" /Fo$(INTDIR)/\
- /c 
-CPP_OBJS=.\APXdeb/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o$(OUTDIR)/"libtiff.bsc" 
-BSC32_SBRS= \
-	$(INTDIR)/"tif_jpeg.sbr" \
-	$(INTDIR)/"tif_dirinfo.sbr" \
-	$(INTDIR)/"tif_win32.sbr" \
-	$(INTDIR)/"tif_flush.sbr" \
-	$(INTDIR)/"tif_thunder.sbr" \
-	$(INTDIR)/"tif_compress.sbr" \
-	$(INTDIR)/"tif_print.sbr" \
-	$(INTDIR)/"tif_dirread.sbr" \
-	$(INTDIR)/"tif_getimage.sbr" \
-	$(INTDIR)/"tif_fax3.sbr" \
-	$(INTDIR)/"tif_version.sbr" \
-	$(INTDIR)/"tif_codec.sbr" \
-	$(INTDIR)/"tif_dir.sbr" \
-	$(INTDIR)/"tif_predict.sbr" \
-	$(INTDIR)/"tif_close.sbr" \
-	$(INTDIR)/"tif_dumpmode.sbr" \
-	$(INTDIR)/"tif_aux.sbr" \
-	$(INTDIR)/"tif_error.sbr" \
-	$(INTDIR)/"tif_lzw.sbr" \
-	$(INTDIR)/"tif_zip.sbr" \
-	$(INTDIR)/"tif_read.sbr" \
-	$(INTDIR)/"tif_packbits.sbr" \
-	$(INTDIR)/"tif_swab.sbr" \
-	$(INTDIR)/"tif_dirwrite.sbr" \
-	$(INTDIR)/"tif_open.sbr" \
-	$(INTDIR)/"tif_warning.sbr" \
-	$(INTDIR)/"tif_tile.sbr" \
-	$(INTDIR)/"tif_strip.sbr" \
-	$(INTDIR)/"tif_next.sbr" \
-	$(INTDIR)/"tif_write.sbr" \
-	$(INTDIR)/"fax3sm.sbr"
-
-$(OUTDIR)/"libtiff.bsc" : $(OUTDIR)  $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LIB32=lib.exe
-# ADD BASE LIB32 /NOLOGO
-# ADD LIB32 /NOLOGO /OUT:"APXdeb\dlibtiff.lib"
-LIB32_FLAGS=/NOLOGO /OUT:"APXdeb\dlibtiff.lib" 
-DEF_FLAGS=
-DEF_FILE=
-LIB32_OBJS= \
-	$(INTDIR)/"tif_jpeg.obj" \
-	$(INTDIR)/"tif_dirinfo.obj" \
-	$(INTDIR)/"tif_win32.obj" \
-	$(INTDIR)/"tif_flush.obj" \
-	$(INTDIR)/"tif_thunder.obj" \
-	$(INTDIR)/"tif_compress.obj" \
-	$(INTDIR)/"tif_print.obj" \
-	$(INTDIR)/"tif_dirread.obj" \
-	$(INTDIR)/"tif_getimage.obj" \
-	$(INTDIR)/"tif_fax3.obj" \
-	$(INTDIR)/"tif_version.obj" \
-	$(INTDIR)/"tif_codec.obj" \
-	$(INTDIR)/"tif_dir.obj" \
-	$(INTDIR)/"tif_predict.obj" \
-	$(INTDIR)/"tif_close.obj" \
-	$(INTDIR)/"tif_dumpmode.obj" \
-	$(INTDIR)/"tif_aux.obj" \
-	$(INTDIR)/"tif_error.obj" \
-	$(INTDIR)/"tif_lzw.obj" \
-	$(INTDIR)/"tif_zip.obj" \
-	$(INTDIR)/"tif_read.obj" \
-	$(INTDIR)/"tif_packbits.obj" \
-	$(INTDIR)/"tif_swab.obj" \
-	$(INTDIR)/"tif_dirwrite.obj" \
-	$(INTDIR)/"tif_open.obj" \
-	$(INTDIR)/"tif_warning.obj" \
-	$(INTDIR)/"tif_tile.obj" \
-	$(INTDIR)/"tif_strip.obj" \
-	$(INTDIR)/"tif_next.obj" \
-	$(INTDIR)/"tif_write.obj" \
-	$(INTDIR)/"fax3sm.obj"
-
-$(OUTDIR)/"dlibtiff.lib" : $(OUTDIR)  $(DEF_FILE) $(LIB32_OBJS)
-    $(LIB32) @<<
-  $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ENDIF 
-
-################################################################################
-# Begin Group "Source Files"
-
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_jpeg.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_jpeg.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_dirinfo.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_dirinfo.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_win32.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_win32.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_flush.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_flush.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_thunder.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_thunder.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_compress.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_compress.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_print.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_print.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_dirread.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_dirread.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_getimage.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_getimage.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_fax3.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_fax3.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_version.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_version.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_codec.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_codec.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_dir.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_dir.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_predict.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_predict.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_close.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_close.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_dumpmode.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_dumpmode.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_aux.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_aux.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_error.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_error.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_lzw.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_lzw.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_zip.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_zip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_read.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_read.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_packbits.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_packbits.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_swab.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_swab.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_dirwrite.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_dirwrite.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_open.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_open.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_warning.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_warning.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\libtiff.def
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_tile.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_tile.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_strip.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_strip.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_next.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_next.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="\tiff\tiff-v3.4beta024\libtiff\tif_write.c"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"tif_write.obj" :  $(SOURCE)  $(INTDIR)
-   $(CPP) $(CPP_PROJ)  $(SOURCE) 
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\fax3sm.c
-DEP_FAX3S=\
-	"\tiff\tiff-v3.4beta024\libtiff\tiff.h"\
-	"\tiff\tiff-v3.4beta024\libtiff\tif_fax3.h"
-
-!IF  "$(CFG)" == "Win32 Release"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ELSEIF  "$(CFG)" == "Win32 Debug"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ELSEIF  "$(CFG)" == "Macintosh Release"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ELSEIF  "$(CFG)" == "Macintosh Debug"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ELSEIF  "$(CFG)" == "APXrel"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ELSEIF  "$(CFG)" == "APXdeb"
-
-$(INTDIR)/"fax3sm.obj" :  $(SOURCE)  $(DEP_FAX3S) $(INTDIR)
-
-!ENDIF 
-
-# End Source File
-# End Group
-# End Project
-################################################################################
diff --git a/tkimg1.3/libtiff/contrib/winnt/libtiff.vcp b/tkimg1.3/libtiff/contrib/winnt/libtiff.vcp
deleted file mode 100644
index 4c63936..0000000
Binary files a/tkimg1.3/libtiff/contrib/winnt/libtiff.vcp and /dev/null differ
diff --git a/tkimg1.3/libtiff/contrib/winnt/version.h b/tkimg1.3/libtiff/contrib/winnt/version.h
deleted file mode 100644
index 11b9435..0000000
--- a/tkimg1.3/libtiff/contrib/winnt/version.h
+++ /dev/null
@@ -1 +0,0 @@
-#define VERSION "LIBTIFF, Version 3.4beta024\nCopyright (c) 1988-1995 Sam Leffler\nCopyright (c) 1991-1995 Silicon Graphics, Inc."
diff --git a/tkimg1.3/libtiff/dist/newversion b/tkimg1.3/libtiff/dist/newversion
deleted file mode 100644
index 92926ea..0000000
--- a/tkimg1.3/libtiff/dist/newversion
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/dist/newversion,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# TIFF Software
-#
-# Copyright (c) 1994-1996 Sam Leffler
-# Copyright (c) 1994-1996 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-rm -f tiff.version
-awk '
-{ print "define TIFF_VNUM \"" $1 " (" $2 ")\"" }
-' ../VERSION > tiff.version
diff --git a/tkimg1.3/libtiff/dist/tiff.spec b/tkimg1.3/libtiff/dist/tiff.spec
deleted file mode 100644
index 32ed933..0000000
--- a/tkimg1.3/libtiff/dist/tiff.spec
+++ /dev/null
@@ -1,68 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/dist/tiff.spec,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# TIFF Software
-#
-# Copyright (c) 1994-1997 Sam Leffler
-# Copyright (c) 1994-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-define CUR_MAJ_VERS	1006		# Major Version number
-define CUR_MIN_VERS	001		# Minor Version number
-define CUR_VERS		${CUR_MAJ_VERS}${CUR_MIN_VERS}${ALPHA}
-define TIFF_NAME	"TIFF"
-
-include tiff.version
-include tiff.alpha
-
-product tiff
-    id	"${TIFF_NAME} Tools, Version ${TIFF_VNUM}"
-    inplace
-
-    image sw
-	id	"${TIFF_NAME} Software"
-	version	"${CUR_VERS}"
-	subsys tools default
-	    id	"${TIFF_NAME} Tools & Library DSO"
-	    exp	"tiff.sw.tools"
-	endsubsys
-	subsys dev
-	    id	"${TIFF_NAME} Developement Software"
-	    exp	"tiff.sw.dev"
-	endsubsys
-    endimage
-
-    image man
-	id	"${TIFF_NAME} Documentation"
-	version	"${CUR_VERS}"
-	subsys tools default
-	    id	"${TIFF_NAME} Tools Manual Pages"
-	    exp	"tiff.man.tools"
-	endsubsys
-	subsys dev
-	    id	"${TIFF_NAME} Library Manual Pages"
-	    exp	"tiff.man.dev"
-	endsubsys
-	subsys html
-	    id	"${TIFF_NAME} HTML Materials"
-	    exp	"tiff.man.html"
-	endsubsys
-    endimage
-endproduct
diff --git a/tkimg1.3/libtiff/dist/tiff.version b/tkimg1.3/libtiff/dist/tiff.version
deleted file mode 100644
index 109001f..0000000
--- a/tkimg1.3/libtiff/dist/tiff.version
+++ /dev/null
@@ -1 +0,0 @@
-define TIFF_VNUM "3.6.1 ()"
diff --git a/tkimg1.3/libtiff/html/Makefile.in b/tkimg1.3/libtiff/html/Makefile.in
deleted file mode 100644
index 92eeb3a..0000000
--- a/tkimg1.3/libtiff/html/Makefile.in
+++ /dev/null
@@ -1,157 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/html/Makefile.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# @WARNING@
-#
-# Tag Image File Format Library Manual Pages
-#
-# Copyright (c) 1991-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-DEPTH		= ..
-
-SRCDIR		= ${DEPTH}/@SRCDIR@/html
-VPATH		= ../@SRCDIR@/html
-
-PORT		= ${DEPTH}/port
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
-SHELL		= @SCRIPT_SH@
-SCRIPT_SH 	= @SCRIPT_SH@
-NULL		=
-ECHO		= echo
-MV		= mv
-RM		= rm -f
-INSTALL		= @INSTALL@
-GROFF		= groff  -Thtml -mandoc
-NROFF		= nroff  -Tlatin1 -mandoc
-MAN2HTML	= man2html -cgiurl ./\$$title.\$$section\$$subsection.html
-
-MANSRCDIR	= @RELSRCDIR@/man
-HTML		= @DIR_HTML@
-
-HTMLFILES=\
-	TIFFTechNote2.html	\
-	bugs.html		\
-	build.html		\
-	contrib.html		\
-	document.html		\
-	images.html		\
-	index.html		\
-	internals.html		\
-	intro.html		\
-	libtiff.html		\
-	misc.html		\
-	support.html		\
-	tools.html		\
-	v3.4beta007.html	\
-	v3.4beta016.html	\
-	v3.4beta018.html	\
-	v3.4beta024.html	\
-	v3.4beta028.html	\
-	v3.4beta029.html	\
-	v3.4beta031.html	\
-	v3.4beta032.html	\
-	v3.4beta033.html	\
-	v3.4beta034.html	\
-	v3.4beta035.html	\
-	v3.4beta036.html	\
-	v3.5.1.html		\
-	v3.5.2.html		\
-	v3.5.3.html		\
-	v3.5.4.html		\
-	v3.5.5.html		\
-	v3.5.6-beta.html	\
-	v3.5.7.html		\
-	${NULL}
-IMAGES=\
-	images/back.gif		\
-	images/bali.jpg		\
-	images/cat.gif		\
-	images/cover.jpg	\
-	images/cramps.gif	\
-	images/dave.gif	\
-	images/info.gif	\
-	images/jello.jpg	\
-	images/jim.gif		\
-	images/note.gif		\
-	images/oxford.gif	\
-	images/quad.jpg		\
-	images/ring.gif		\
-	images/smallliz.jpg	\
-	images/strike.gif	\
-	images/warning.gif	\
-	${NULL}
-TARGETS=
-
-all:	${TARGETS}
-
-install: all
-	${INSTALL} -m 755 -dir -idb tiff.man.html ${DESTDIR}${HTML} ${DESTDIR}${HTML}/images
-	for i in ${HTMLFILES} ${IMAGES}; do \
-	    ${INSTALL} -idb tiff.man.html -m 444 -F ${DESTDIR}${HTML} \
-		-src ${SRCDIR}/$$i -O $$i; \
-	done
-
-clean:;
-
-INDEXSTART	= '<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>'
-INDEXEND	= '</ul></BODY></HTML>'
-
-# Rebuild HTML representation of the manual pages using groff
-groffhtml:
-	test -d man || mkdir man
-	${ECHO} ${INDEXSTART} > ${SRCDIR}/man/index.html
-	# build function pages
-	for i in ${MANSRCDIR}/*.3t; do					\
-		${GROFF} $$i > ${SRCDIR}/man/`basename $$i`.html;	\
-		${ECHO} '<li><A HREF='`basename $$i`'.html>'`basename $$i`'</a>' >> ${SRCDIR}/man/index.html;	\
-	done
-	# build tools pages
-	for i in ${MANSRCDIR}/*.1; do					\
-		${GROFF} $$i > ${SRCDIR}/man/`basename $$i`.html;	\
-		${ECHO} '<li><A HREF='`basename $$i`'.html>'`basename $$i`'</a>' >> ${SRCDIR}/man/index.html;	\
-	done
-	${ECHO} ${INDEXEND} >> ${SRCDIR}/man/index.html
-
-# The same but using man2html
-# This approach has advantage of the crossreference links
-html:
-	test -d man || mkdir man
-	${ECHO} ${INDEXSTART} > ${SRCDIR}/man/index.html
-	# build function pages
-	for i in ${MANSRCDIR}/*.3t; do					\
-		${NROFF} $$i | ${MAN2HTML} > ${SRCDIR}/man/`basename $$i`.html;	\
-		${ECHO} '<li><A HREF='`basename $$i`'.html>'`basename $$i`'</a>' >> ${SRCDIR}/man/index.html;	\
-	done
-	# build tools pages
-	for i in ${MANSRCDIR}/*.1; do					\
-		${NROFF} $$i | ${MAN2HTML} > ${SRCDIR}/man/`basename $$i`.html;	\
-		${ECHO} '<li><A HREF='`basename $$i`'.html>'`basename $$i`'</a>' >> ${SRCDIR}/man/index.html;	\
-	done
-	${ECHO} ${INDEXEND} >> ${SRCDIR}/man/index.html
-
-
diff --git a/tkimg1.3/libtiff/html/bugs.html b/tkimg1.3/libtiff/html/bugs.html
deleted file mode 100644
index bd03305..0000000
--- a/tkimg1.3/libtiff/html/bugs.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Bugs and the TIFF Mailing List
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/cover.jpg WIDTH=110 HEIGHT=110 ALIGN=left BORDER=1 HSPACE=6>
-Bugs, Bugzilla, and the TIFF Mailing List
-</H1>
-
-<P>
-This software is free.  Please let us know when you find a problem or
-fix a bug.
-
-<P>
-Thanks to <A HREF=http://www.remotesensing.org/>remotesensing.org</a>, libtiff now uses bugzilla to track bugs. 
-<P>
-If you think you've discovered a bug, please first check to see if it is 
-already known by looking at the list of already reported bugs.  You can do so 
-by visiting the buglist at 
-<A HREF=http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff>http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff</A>.  Also verify that 
-the problem is still reproducable with the current development software 
-from CVS. 
-<p>
-If you'd like to enter a new bug, you can do so at <A HREF=http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff>http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff</A>.  
-<P>
-
-Of course, reporting bugs is no substitute for discussion.  The 
-<a href="mailto:tiff at remotesensing.org">tiff at remotesensing.org</a> mailing
-list is for users of this software, and discussion TIFF issues in general. 
-It is managed with the Mailman software, and the web interface for subscribing
-and managing your access to the list is at:<p>
-
-  <a href="http://remotesensing.org/mailman/listinfo/tiff">http://remotesensing.org/mailman/listinfo/tiff</a><P>
-
-Posts to the list are only accepted from members of the list in order
-to limit the amount of spam propagated.  The 
-<A href="http://remotesensing.org/pipermail/tiff/">Recent Archives</a> since
-the list was migrated to mailman and older 
-<A HREF="http://www.remotesensing.org/lists/libtiff_archive/maillist.html">Pre-July 2003 Archives</A> are available for web viewing.<p>
-
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/build.html b/tkimg1.3/libtiff/html/build.html
deleted file mode 100644
index b4e38dc..0000000
--- a/tkimg1.3/libtiff/html/build.html
+++ /dev/null
@@ -1,1174 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Building the TIFF Software Distribution
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/cramps.gif WIDTH=159 HEIGHT=203 ALIGN=left BORDER=1 HSPACE=6>
-Building the Software Distribution
-</H1>
-
-<UL>
-<LI><A HREF=#UNIX>Building on a UNIX system</A>.
-<LI><A HREf=#MacMPW>Building on a Macintosh system with MPW</A>.
-<LI><A HREf=#MacCW>Building on a Macintosh system with CodeWarrior</A>.
-<LI><A HREF=#PC>Building on an MS-DOS or Windows system</A>.
-<LI><A HREF=#DJGPP>Building on MS-DOS with the DJGPP v2 compiler</A>.
-<LI><A HREF=#VMS>Building on a VMS system</A>.
-<LI><A HREF=#Acorn>Building on an Acorn RISC OS system</A>.
-<LI><A HREF=#Other>Building the Software on Other Systems</A>
-</UL>
-
-<BR CLEAR=left>
-
-This chapter contains step-by-step instructions on how to configure
-and build the TIFF software distribution.
-The software is most easily built on a UNIX system, but with a little
-bit of work it can easily be built and used on other non-UNIX platforms.
-
-<A NAME=UNIX><HR><H2>Building on a UNIX System</H2></A>
-
-To build the software on a UNIX system you need to first run the configure
-shell script that is located in the top level of the source directory. This
-script probes the target system for necessary tools and functions and
-constructs a build environment in which the software may be compiled.
-
-Once configuration is done, you simply run <TT>make</TT> (or <TT>gmake</TT>)
-to build the software and then <TT>make install</TT> to do the installation;
-for example:
-
-<UL><PRE>
-hyla% <B>cd tiff-v3.4beta099</B>
-hyla% <B>./configure</B>
-    <I>...lots of messages...</I>
-hyla% <B>make</B>
-    <I>...lots of messages...</I>
-hyla# <B>make install</B>
-</PRE></UL>
-
-Supplied makefiles are depend on GNU <TT>make</TT> utility, so you will need
-the one. Depending on your installation <B>make</B> command may invoke
-standard system <TT>make</TT> and <B>gmake</B> invoke GNU make. In this case
-you should use former. If you don't have <TT>make</TT> at all, but only
-<TT>gmake</TT>, you should export environment variable <TT>MAKE=gmake</TT>
-before <B>./configure</B>.
-
-<P>
-
-In general, the software is designed such that the following should
-be ``<I>make-able</I>'' in each directory:
-
-<UL><PRE>
-make [all]	build stuff
-make install	build&install stuff
-make clean	remove .o files and cruft, but not executables
-make clobber	remove everything that can be recreated
-make distclean	remove <EM>absolutely everything</EM> that can be recreated
-</PRE></UL>
-
-Note that after running "<TT>make clobber</TT>" or
-"<TT>make distclean</TT>" the <TT>configure</TT> script must
-be run again to create the Makefiles and other make-related files. 
-
-<A NAME="BuildTrees"><P><HR WIDTH=65% ALIGN=right><H3>Build Trees</H3></A>
-
-There are two schemes for configuring and building the software.
-If you intend to build the software for only one target system, you
-can configure the software so that it is built in the same directories
-as the source code. 
-
-<UL><PRE>
-hyla% <B>cd tiff-v3.4beta099</B>
-hyla% <B>ls</B>
-COPYRIGHT       VERSION         config.sub      dist            man
-Makefile.in     config.guess    configure       html            port
-README          config.site     contrib         libtiff         tools
-hyla% <B>./configure</B>
-</PRE></UL>
-
-<P>
-Otherwise, you can configure a build tree that 
-is parallel to the source tree hierarchy but which contains only
-configured files and files created during the build procedure.
-
-<UL><PRE>
-hyla% <B>cd tiff-v3.4beta099</B>
-hyla% <B>mkdir obj obj/mycpu</B>
-hyla% <B>cd obj/mycpu</B>
-hyla% <B>../../configure</B>
-</PRE></UL>
-
-This second scheme is useful for:
-
-<UL>
-<LI>building multiple targets from a single source tree
-<LI>building from a read-only source tree (e.g. if you receive
-  the distribution on CD-ROM)
-</UL>
-
-<A NAME="ConfigFiles"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Files</H3></A>
-
-The configuration process is critical to the proper compilation,
-installation, and operation of the software.
-The configure script runs a series of tests to
-decide whether or not the target system
-supports required functionality and, if it does not, whether it
-can emulate or workaround the missing functions.
-This procedure is fairly complicated and, due to the nonstandard
-nature of most UNIX systems, prone to error.
-The first time that you configure the software for use you should
-check the output from the configure script and look for anything
-that does not make sense for your system.
-A sample configure run is shown below together with an explanation
-of some of the work that is done.
-
-<P>
-A second function of the configure script is to set the default
-configuration parameters for the software.
-Of particular note are the directories where the software is to be
-installed.
-By default the software is installed in the <B>/usr/local</B> hierarchy.
-To change this behaviour the appropriate parameters can be
-specified either:
-<UL>
-<LI>on the command line to configure,
-<LI>in a site-wide configuration file, or
-<LI>in a target-specific configuration file.
-</UL>
-configure reads any site-wide configure file first, and
-then any target-specific configuration file.
-This permits target-specific definitions to override
-site-wide definitions.
-
-<P>
-Site-wide configuration files are named
-<B>config.site</B> and are automatically searched for first
-in any directory specified on the command line to configure
-(using the <TT>-site</TT> option), or if that fails, in
-the directory in in which the configure script is located.
-
-<P>
-Target-specific configuration files are named <B>config.local</B>
-and are looked for first in the top-level configuration directory,
-or, if that fails, in the directory in which the configure script
-is located.
-
-<P>
-Configuration files are just shell scripts that define
-shell variables that control the configuration process.
-For example, the following file might be used on a BSDI system to
-configure the software for installation in the <B>/usr/contrib</B> area.
-
-<PRE>
-#
-# Parameters suitable for BSDI 1.1
-#
-DIR_BIN="/usr/contrib/bin"		# directory for client apps
-DIR_LIB="/usr/contrib/lib"		# directory for libraries
-DIR_MAN="/usr/contrib/man"		# directory for manual pages
-</PRE>
-
-<P>
-For a complete list of the possible configuration parameters look
-at the sample <B>config.site</B> file provided in the distribution; the
-section below describes some of the more important parameters.
-
-<A NAME="Packages"><P><HR WIDTH=65% ALIGN=right><H3>Configuring Optional Packages/Support</H3></A>
-
-The TIFF software comes with several packages that are installed only
-as needed, or only if specifically configured at the time
-the configure script is run.  Packages can be configured in a
-<B>config.site</B> or <B>config.local</B> file, or by using a
-<TT>-with-<PACKAGE></TT> option when invoking configure;
-e.g. <TT>configure -with-AFM</TT>.
-
-<DL>
-<DT><I>DSO Support</I>
-<DD>The <TT>DSO</TT> support controls whether or not to
-configure the software
-to build a Dynamic Shared Object for the TIFF library.
-Use of DSOs can significantly reduce the disk space needed for
-users of the TIFF software.
-If DSOs are not used then the code is statically linked into
-each application that uses it.
-By default this support is configured only if the system appears
-to suport DSOs in a way that fits into the normal build scheme
-(<TT>auto</TT>).
-If DSO support is <EM>explicitly enabled</EM> and there is no
-support for using DSOs in the expected way then DSOs are not used.
-
-<P>
-<DT><I>JPEG Support</I>
-<DD>The <TT>JPEG</TT> package enables support for the handling
-of TIFF images with JPEG-encoded data.
-Support for JPEG-encoded data requires the Independent JPEG Group (IJG)
-<TT>libjpeg</TT> distribution; this software is available at
-<A HREF=ftp://ftp.uu.net/graphics/jpeg/>ftp.uu.net:/graphics/jpeg/</A>.
-If JPEG support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_JPEGLIB</TT>
-parameters should also be set (see below).
-By default JPEG support is not configured.
-
-<P>
-<DT><I>ZIP Support</I>
-<DD>The <TT>ZIP</TT> support enables support for the handling
-of TIFF images with deflate-encoded data.
-Support for deflate-encoded data requires the freely available
-<TT>zlib</TT> distribution written by Jean-loup Gailly and Mark Adler;
-this software is available at
-<A HREF=ftp://ftp.uu.net/pub/archiving/zip/zlib/>ftp.uu.net:/pub/archiving/zip/zlib/</A>
-(or try <A HREF=ftp://quest.jpl.nasa.gov/beta/zlib/>quest.jpl.nasa.gov:/beta/zlib/</A>).
-If ZIP support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_GZLIB</TT>
-parameters should also be set (see below).
-By default this package is not configured.
-
-</DL>
-
-<A NAME="Sample"><P><HR WIDTH=65% ALIGN=right><H3>A Sample Configuration Session</H3></A>
-
-This section shows a sample configuration session and describes
-the work done.  The session is shown indented in a <TT>fixed width
-font</TT> with user-supplied input in a <TT><B>bold font</B></TT>.
-Comments are shown in a normal or <I>italic</I> font.
-This session was collected on a 486 machine running BSDI 1.1.
-
-<UL><PRE><TT>
-wullbrandt% <B>mkdir tiff</B>
-wullbrandt% <B>cd tiff</B>
-wullbrandt% <B>ln -s /hosts/oxford/usr/people/sam/tiff src</B>
-</TT></PRE></UL>
-
-A build tree separate from the source tree is used here.
-In fact, in this case the distribution is accessed from
-a read-only NFS-mounted filesystem.
-
-<UL><PRE><TT>
-wullbrandt% <B>src/configure</B>
-Configuring TIFF Software v3.4beta015.
-
-Reading site-wide parameters from ../tiff-v3.4beta015/config.site.
-Reading local parameters from config.local.
-Gosh, aren't you lucky to have a i386-unknown-bsdi1.1 system!
-</TT></PRE></UL>
-
-Note that configure announces the distribution version and the
-deduced target configuration (<TT>i386-unknown-bsdi1.1</TT> here).
-
-<UL><PRE><TT>
-Using /usr/local/bin/gcc for a C compiler (set CC to override).
-Looks like /usr/local/bin/gcc supports the -g option.
-Using " -g" for C compiler options.
-</TT></PRE></UL>
-
-configure checked the normal shell search path for potential
-ANSI C compilers.  The compiler is selected according to it properly
-compiling a small ANSI C test program.  A specific compiler may be requested
-by setting the <TT>CC</TT> environment variable to the appropriate
-pathname, by supplying the parameter on the command line, e.g.
-<TT>-with-CC=gcc</TT>, or by setting <TT>CC</TT> in a configuration
-file.
-
-<P>
-<IMG SRC="images/info.gif" ALIGN=left HSPACE=10>
-<EM>Note that an ANSI C compiler is required to build the software.
-If a C compiler requires options to enable ANSI C compilation, they
-can be specified with the <TT>ENVOPTS</TT> parameter.</EM>
-
-<P>
-Once a compiler is selected configure checks to see
-if the compiler accepts a -g option to enable the generation
-    of debugging symbols, and
-if the compiler includes an ANSI C preprocessor.
-
-<UL><PRE><TT>
-Using /usr/ucb/make to configure the software.
-</TT></PRE></UL>
-
-Next various system-specific libraries that may or may not be needed
-are checked for (none are needed in this case). 
-If your system requires a library that is not
-automatically included it can be specified by setting the
-<TT>MACHDEPLIBS</TT> parameter.
-
-<P><I>Creating port.h.</I>
-The <B>port.h</B> file is included by all the C code
-in the library (but not the tools).  
-It includes definitions for functions and type
-definitions that are missing from system include files, <TT>#defines</TT>
-to enable or disable system-specific functionality, and other
-odds and ends.
-
-<UL><PRE><TT>
-Creating libtiff/port.h with necessary definitions.
-... using LSB2MSB bit order for your i386 cpu
-... using big-endian byte order for your i386 cpu
-... configure use of mmap for memory-mapped files
-... O_RDONLY is in <fcntl.h>
-... using double for promoted floating point parameters
-... enabling use of inline functions
-Done creating libtiff/port.h.
-</TT></PRE></UL>
-
-This file can take a long time to create so configure
-generates the file only when it is needed, either because the
-file does not exist or because a different target or compiler
-is to be used.
-Note that running "<TT>make distclean</TT>" in the top-level directory
-of the build tree will remove the <B>port.h</B> file (along
-with all the other files generated by configure).
-
-<P><I>Selecting emulated library functions.</I>
-Certain library functions used by the tools are not present on all systems
-and can be emulated using other system functionality.
-configure checks for the presence of such functions and if they are
-missing, will configure emulation code from the <B>port</B> directory
-to use instead.  Building the TIFF
-software on unsupported systems may require
-adding to the code to the <B>port</B> directory.
-
-<UL><PRE><TT>
-Checking system libraries for functionality to emulate.
-Done checking system libraries.
-</TT></PRE></UL>
-
-If a routine must be emulated and configure does not automatically
-check for it, the routine name can be specified using the <TT>PORTFUNCS</TT>
-parameter.  To add emulation support for a new function <TT>foo</TT>,
-create a file <B>port/foo.c</B> that contains the emulation code
-and then set <TT>PORTFUNCS=foo</TT> in a configuration file or modify
-the configure script to automatically check for the missing function.
-
-<UL><PRE><TT>
-Checking for Dynamic Shared Object (DSO) support.
-Done checking for DSO support.
-</TT></PRE></UL>
-
-If the <TT>DSO</TT> package is enabled (<TT>DSO=auto</TT> or
-<TT>DSO=yes</TT>), then
-configure will verify the system and compiler are capable of
-constructing SVR4-style DSO's in the expected way.  Note that
-while a system may support DSO's the compiler may not be
-capable of generating the required position-independent
-code and/or the compiler may not pass the needed options
-through to the loader.
-
-<P><I>Selecting utility programs.</I>
-configure locates various system utility programs that are
-used during installation of the software.
-
-<UL><PRE><TT>
-Selecting programs used during installation.
-Looks like mv supports the -f option to force a move.
-Looks like /bin/ln supports the -s option to create a symbolic link.
-Done selecting programs.
-</TT></PRE></UL>
-
-<P><I>Selecting default configuration parameters.</I>
-The remainder of the work done by configure involves setting up
-configuration parameters that control the placement and
-setup of files during the installation procedure.
-
-<UL><PRE><TT>
-Selecting default TIFF configuration parameters.
-
-Looks like manual pages go in /usr/contrib/man.
-Looks like manual pages should be installed with bsd-nroff-gzip-0.gz.
-
-TIFF configuration parameters are:
-
-[ 1] Directory for tools:               /usr/contrib/bin
-[ 2] Directory for libraries:           /usr/contrib/lib
-[ 3] Directory for include files:       /usr/contrib/include
-[ 4] Directory for manual pages:        /usr/contrib/man
-[ 5] Manual page installation scheme:   bsd-nroff-gzip-0.gz
-
-Are these ok [yes]? 
-</TT></PRE></UL>
-
-
-
-At this point you can interactively modify any of the 
-displayed parameters.  Hitting a carriage return or typing
-<TT>yes</TT> will accept the current parameters.  Typing one
-of the number displayed along the left hand side causes
-configure to prompt for a new value of the specified parameter.
-Typing anything else causes configure to prompt for a new
-value <EM>for each parameter</EM>.
-In general hitting carriage return will accept the current
-value and typing anything that is unacceptable will cause a
-help message to be displayed.
-A description of each of the configuration parameters is given below.
-
-<P>
-Once acceptable parameters are setup configure will generate
-all the files that depend on these parameters.  Note that certain
-files may or may not be created based on the configuration of
-optional packages and/or the functions supported by target system.
-
-<UL><PRE><TT>
-Creating Makefile from ../tiff-v3.4beta015/Makefile.in
-Creating libtiff/Makefile from ../tiff-v3.4beta015/libtiff/Makefile.in
-Creating man/Makefile from ../tiff-v3.4beta015/man/Makefile.in
-Creating tools/Makefile from ../tiff-v3.4beta015/tools/Makefile.in
-Creating port/install.sh from ../tiff-v3.4beta015/port/install.sh.in
-Done.
-</TT></PRE></UL>
-
-<A NAME=DSOSupport><P><HR><H3>Shared Library Support</H3></A>
-
-It is desirable to make the TIFF library be a shared object
-on systems that have support for shared libraries.
-Unfortunately the rules to use to build a shared library
-vary between operating systems and even compilers.
-The distributed software includes support for building a shared
-version of the library on a number of different systems.
-This support is split between rules in the file
-<B>libtiff/Makefile.in</B> that construct the shared library
-and checks done by the <TT>configure</TT> script to verify that
-the expected rules are supported by compilation tools for 
-the target system.
-
-<P>
-To add new support for building a shared library both these files
-must be updated.
-In the configure script search for the section where the autoconfiguration
-setting of the <TT>DSO</TT> parameter is handled and
-add a new case for the target system that sets the
-<TT>DSOSUF</TT>,
-<TT>DSOLD</TT>,
-<TT>DSOOPTS</TT>,
-and
-<TT>LIBCOPTS</TT>
-options as appropriate for the system.
-<TT>DSOSUF</TT> specifies the filename suffix used for the shared
-library (e.g. ``.so'' for Dynamic Shared Objects on most SVR4-based
-systems).
-<TT>DSOLD</TT> specifies the program to use to build the shared library
-from a compiled object file; typically ``${LD}'' though on some systems
-it is better to use the C compiler directly so system-dependent options and
-libraries are automatically supplied.
-<TT>DSOOPTS</TT> are options that must be specified to <TT>DSOLD</TT>
-when building the shared library.
-<TT>LIBCOPTS</TT> are options to pass to the C compiler when constructing
-a relocatable object file to include in a shared library; e.g. ``-K PIC''
-on a Sun system.
-The <TT>DSO</TT> parameter must also be set to a unique label that identifies
-the target system and compilation tools.
-This label is used to select
-a target in <B>libtiff/Makefile.in</B> to do the actual work in building
-the shared library.
-Finally, to complete support for the shared library added the appropriate
-rules to <B>libtiff/Makefile.in</B> under the target specified in the
-<TT>configure</TT> script.
-
-
-
-
-<A NAME="Parameters"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Parameters</H3></A>
-
-This section gives a brief description of the less obvious
-configuration parameters.  Consult the distributed <B>config.site</B>
-for a <EM>complete list of parameters</EM>.
-The list here is sorted alphabetically.
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR>
-<TD VALIGN=top><TT>AROPTS</TT></TD>
-<TD>The options passed to ar when creating an archive.
-Note that configure will automatically check to see if ar
-supports an <TT>s</TT> to create a symbol table instead of
-using ranlib.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIR_BIN</TT></TD>
-<TD>The directory where client applications should be installed; by
-default this is <B>/usr/local/bin</B>.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIR_GZLIB</TT></TD>
-<TD>The pathname of the directory containing the zlib library
-(when ZIP or PixarLog compression support is enabled);
-e.g. ``<TT>../src/zlib</TT>''.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIR_JPEGLIB</TT></TD>
-<TD>The pathname of the directory containing the JPEG library
-(when JPEG support is enabled); e.g. ``<TT>/usr/local/lib</TT>''.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIR_LIB</TT></TD>
-<TD>The directory to install libraries and DSO's; by default
-this is <B>/usr/local/lib</B>.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIR_MAN</TT></TD>
-<TD>The top-most directory of the manual area where manual
-pages should be installed.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIRS_LIBINC</TT></TD>
-<TD>A space-separated list of directories in which to search for
-include files when building the library and tools.
-If JPEG or ZIP support is configured this parameter should include
-the directories where the associated include files are located.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIST_POINT</TT></TD>
-<TD>The most point release number for the distribution; e.g. if this
-is version 3.5.4 then the the point release number is 4.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIST_MAJOR</TT></TD>
-<TD>The major version number for the distribution; e.g. if this
-is version 3.5.4 then the the major number is 3.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DIST_MINOR</TT></TD>
-<TD>The minor version number for the distribution; e.g. if this
-is version 3.5.4 then the the major number is 5.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DSOSUF</TT></TD>
-<TD>When DSO's are built, the filename suffix for a DSO.
-If this is set to <TT>"a"</TT> then  statically linked archives are used.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>DSOSUF_VERSION</TT></TD>
-<TD>When DSO's are built, a version-specific filename suffix for a DSO.
-If this is set to something other than the value of <TT>DSO</TT> then
-the file <B>libtiff.<TT>DSOSUF_VERSION</TT></B> will be installed and
-a link to it named <B>libtiff.<TT>DSOSUF</TT></B> will automatically
-be created.  (Note that this means that rule for building the target
-DSO must generate a file named <B>libtiff.<TT>DSOSUF_VERSION</TT></B>.)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>ENVOPTS</TT></TD>
-<TD>Options to pass to <TT>CC</TT> to force ANSI C compilation.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>FILLORDER</TT></TD>
-<TD>The order of bits in a byte on the server machine;
-either LSB2MSB or MSB2LSB.
-This is normally selected according to the target system.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>GCOPTS</TT></TD>
-<TD>Special options to pass the C compiler.  If this parameter
-is set, then configure may append other options to this list.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>INSTALL</TT></TD>
-<TD>The pathname of the install program to use.  Note that this program
-must emulate the command line interface used by the IRIX install program.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>LIBPORT</TT></TD>
-<TD>The pathname of the library that holds code to emulate missing
-system functionality.
-Normally this parameter is set by configure based on whether or
-not emulation code is required for the target.
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>LLDOPTS</TT>
-<TD>Extra command line options passed to <TT>CC</TT>
-when linking an executable.
-This option is usually set only when DSO support is enabled
-(to force the executable to search for the TIFF DSO
-in non-standard locations in the filesystem.)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>MACHDEPLIBS</TT></TD>
-<TD>Target-dependent libraries that should be used when linking
-tools.
-Note that if this parameter is specified configure will append to
-the list of libraries.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>MANSCHEME</TT></TD>
-<TD>The scheme to use when preparing and installing manual pages.
-Schemes are constructed according to:
-<UL>
-<<I>organization</I>>-<<I>formatting</I>>-<<I>compression</I>>[-<<I>suffix</I>>]
-</UL>
-where:
-<<I>organization</I>> is either <TT>bsd</TT>
-for BSD-style section organization (e.g.  file formats in
-section 5) or <TT>sysv</TT> for System V-style
-organization (e.g. file formats in section 4).
-<<I>formatting</I>> is either <TT>nroff</TT> to force
-installation of formatted materials (using nroff) or
-<TT>source</TT> to get the nroff source installed.
-<<I>compression</I>> is either the name of a program
-to compress the manual pages (gipz, compress, pack) or
-<TT>cat</TT> for uncompressed data.
-<<I>suffix</I>> is either the file suffix to convert
-installed pages to (e.g. 0.gz for gzip-compressed pages under BSD)
-or <TT>strip</TT> to force the normal ".4f" suffix to be converted to ".4"
-(or ".5" if using the BSD organization).  If no -<suffix>
-is specified then filenames are not converted when they are installed.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>PORTFUNCS</TT></TD>
-<TD>A list of non-standard functions that should be emulated.
-Normally this list is constructed by configure based on checks it does.
-If this parameter is set, configure will append to the specified list.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>SETMAKE</TT></TD>
-<TD>If make does not automatically set <TT>$MAKE</TT> to
-the name of the make program to invoke for subdirectories, then
-configure will create an explicit definition.
-If this parameter is set, then it will be used instead.
-by default <TT>bin</TT> is used.</TD>
-</TR>
-
-</TABLE>
-
-
-<A NAME=PC><P><HR><H2>Building the Software under Windows 95/98/NT/2000 with MS VC++</H2></A>
-
-With Microsoft Visual C++ installed, and properly configured for commandline
-use (you will likely need to source VCVARS32.BAT in AUTOEXEC.bAT or somewhere
-similar) you should be able to use the provided <tt>makefile.vc</tt>.<p>
-
-<pre>
-C:\LIBTIFF\LIBTIFF> nmake /f makefile.vc
-C:\LIBTIFF\LIBTIFF> cd ..\tools
-C:\LIBTIFF\TOOLS> nmake /f makefile.vc
-</pre>
-
-This will build the library file <tt>LIBTIFF\LIBTIFF\LIBTIFF.LIB</tt>.  This
-can be used in Win32 programs.  If used in a project using the /MD compiler
-switch (using the runtime C library), it may be necessary to modify the 
-CFLAGS macro in makefile.vc to correspond.<p>
-
-The makefile also builds a DLL (libtiff.dll) with an associated import
-library (libtiff_i.lib).  Any builds using libtiff will need to include
-the LIBTIFF\LIBTIFF directory in the include path.<p>
-
-The <tt>libtiff\tools\makefile.vc</tt> should build .exe's for all the
-standard TIFF tool programs.<p>
-
-NOTE: The contents of the contrib/win32 directory should no longer be
-needed, and are kept in the distribution temporarily.<p>
-
-<A NAME=DJGPP><P><HR><H2>Building the Software under MS/DOS with the DJGPP v2 compiler</H2></A>
-
-[<I>From the file <B>contrib/dosdjgpp/README</B>.</I>]
-
-<P>
-The directory <B>contrib/dosdjgpp</B>
-contains the files necessary to build the library and tools
-with the DJGPP v2 compiler under MSDOS.
-
-<P>
-All you have to do is copy the files in the directory
-into the respective directories and run
-make. If you want, you can use the <B>conf.bat</B> script
-to do that for you, make sure that
-the file is stored with MSDOS text EOL-convention (CR/LF), otherwise the
-<B>command.com</B> will not do anything.
-
-<P>
-Note that you probably will not be able to build the library with the v1.x
-versions of djgpp, due to two problems. First, the top makefile calls a
-sub-make for each directory and you are likely to run out of memory, since
-each recursive invocation of a djgpp v1.x program requires about 130k, to
-avoid that, you can enter the directories manually and call make (well, there
-are only two dirs). The 2nd problem is that djgpp 1.x doesn't call the
-coff2exe (stubify) program when creating an executable. This means that all
-programs compiled are not converted to exe and consequently are not available
-for calling directly. For the tools directory, you can just call coff2exe for
-each program after make finishes, but in the libtiff directory, a few programs
-are created during the make process that have to be called for make to
-continue (e.g. mkg3states). Make will probably report an error at each
-such stage. To fix that, either add a coff2exe call before each program is
-called or call coff2exe manually and rerun make (there 2-3 such programs).
-
-
-<A NAME=MacMPW><P><HR><H2>Building the Software on a Macintosh with MPW</H2></A>
-
-The directory <B>contrib/mac-mpw</B> contains support for
-compiling the library and tools under the MPW Shell on a
-Macintosh system.
-This support was contributed by Niles Ritter
-(<A HREF=mailto:ndr at tazboy.jpl.nasa.gov>ndr at tazboy.jpl.nasa.gov</A>).
-
-<P>
-[<I>From the file <B>contrib/mac-mpw/README</B>.</I>]
-
-<P>
-This directory contains all of the utilities and makefile source
-to build the LIBTIFF library and tools from the MPW Shell. The
-file BUILD.mpw in this directory is an executable script
-which uses all of these files to create the MPW makefiles and 
-run them. 
-
-<P>
-The <file>.make files are not MPW makefiles as such,
-but are when run through the "mactrans" program, which turns
-the ascii "%nn" metacharacters into the standard weird MPW
-make characters.
-
-<P>
-This translation trick is necessary to protect the files when
-they are put into unix tarfiles, which tend to mangle the
-special characters.
-
-
-
-<A NAME=MacCW><P><HR><H2>Building the Software on a Macintosh with CodeWarrior</H2></A>
-
-The directory <B>contrib/mac-cw</B> contains support for
-compiling the library and tools with MetroWerks CodeWarrior 6.1
-on a Macintosh system.
-This support was contributed by Niles Ritter
-(<A HREF=mailto:ndr at tazboy.jpl.nasa.gov>ndr at tazboy.jpl.nasa.gov</A>).
-
-<P>
-[<I>From the file <B>contrib/mac-cw/README</B>.</I>]
-
-In this directory you will find a Makefile.script Applescript
-file, which should be run in order to build the libtiff code
-using MetroWerks CodeWarrior.
-
-Refer to the "metrowerks.note" instructions on building the
-library for 68k and PowerPC native code, as well as building
-some of the libtiff tools, which are rather unix-like, but
-at least give an example of how to link everything together.
-
-
-
-<A NAME=VMS><P><HR><H2>Building the Software on a VMS System</H2></A>
-
-The VMS port was done by Karsten Spang
-(<A HREF="mailto:krs at kampsax.dk">krs at kampsax.dk</a>), who also
-"sort of" maintains it.
-The VMS specific files are not in the main directories. Instead they
-are placed under <TT>[.CONTRIB.VMS...]</TT> in the distribution tree.
-
-Installation:
-
-It is assumed that you have unpacked the tar file into a VMS directory
-tree, in this text called DISK:[TIFF].
-
-<OL>
-<LI>Move the VMS specific files to their proper directories.
-<PRE>
-$ SET DEFAULT DISK:[TIFF.CONTRIB.VMS]
-$ RENAME [.LIBTIFF]*.* [-.-.LIBTIFF]
-$ RENAME [.TOOLS]*.* [-.-.TOOLS]
-</PRE>
-<LI>Compile the library.
-<PRE>
-$ SET DEFAULT DISK:[TIFF.LIBTIFF]
-$ @MAKEVMS
-</PRE>
-<LI>Compile the tools.
-<PRE>
-$ SET DEFAULT DISK:[TIFF.TOOLS]
-$ @MAKEVMS
-</PRE>
-<LI>Define the programs.
-<PRE>
-$ DEFINE TIFFSHR DISK:[TIFF.LIBTIFF]TIFFSHR
-$ FAX2PS    :==$DISK:[TIFF.TOOLS]FAX2PS
-$ FAX2TIFF  :==$DISK:[TIFF.TOOLS]FAX2TIFF
-$ GIF2TIFF  :==$DISK:[TIFF.TOOLS]GIF2TIFF
-$ PAL2RGB   :==$DISK:[TIFF.TOOLS]PAL2RGB
-$ PPM2TIFF  :==$DISK:[TIFF.TOOLS]PPM2TIFF
-$ RAS2TIFF  :==$DISK:[TIFF.TOOLS]RAS2TIFF
-$ RGB2YCBCR :==$DISK:[TIFF.TOOLS]RGB2YCBCR
-$ THUMBNAIL :==$DISK:[TIFF.TOOLS]THUMBNAIL
-$ TIFF2BW   :==$DISK:[TIFF.TOOLS]TIFF2BW
-$ TIFF2PS   :==$DISK:[TIFF.TOOLS]TIFF2PS
-$ TIFFCMP   :==$DISK:[TIFF.TOOLS]TIFFCMP
-$ TIFFCP    :==$DISK:[TIFF.TOOLS]TIFFCP
-$ TIFFDITHER:==$DISK:[TIFF.TOOLS]TIFFDITHER
-$ TIFFDUMP  :==$DISK:[TIFF.TOOLS]TIFFDUMP
-$ TIFFINFO  :==$DISK:[TIFF.TOOLS]TIFFINFO
-$ TIFFMEDIAN:==$DISK:[TIFF.TOOLS]TIFFMEDIAN
-$ TIFFSPLIT :==$DISK:[TIFF.TOOLS]TIFFSPLIT
-$ YCBCR     :==$DISK:[TIFF.TOOLS]YCBCR
-</PRE>
-</OL>
-
-You will want to add these lines  to your <TT>LOGIN.COM</TT> file, after
-changing the name of the directory that you have used on your machine.
-
-<P>
-This release has been tested on OpenVMS/VAX 5.5-2, using VAX C 3.2.
-A previous release was tested under OpenVMS/AXP ?.? using DEC C ?.?, it is
-believed that this release as well works on AXP.
-The code contains some GNU C specific things. This does *not* imply,
-however, that the VAX/GCC configuration has been tested, *it has not*.
-
-<P>
-The command procedures (<TT>MAKEVMS.COM</TT>) for building the
-library and tools, 
-is believed to choose the correct options for the VAX and AXP cases 
-automatically.
-
-<P>
-On the AXP, IEEE floating point is used by default. If you want VAX
-floating point, remove the <TT>/FLOAT=IEEE_FLOAT</TT> qualifier, and change
-<TT>HAVE_IEEEFP=1</TT> to <TT>HAVE_IEEEFP=0</TT> in the <TT>MAKEVMS.COM</TT>
-files in both the <B>libtiff</B> and <B>tools</B> directories.
-
-
-<H3>Compiling your own program on a VMS system:</H3>
-
-When compiling a source file in which you
-<TT>"#include <tiffio.h>"</TT>, use the
-following command
-<PRE>
-    $ CC/INCLUDE=DISK:[TIFF.LIBTIFF]
-</PRE>
-This  ensures  that the  header  file is  found.
-On the AXP, also add <TT>/FLOAT=IEEE_FLOAT</TT>
-(if used when building the library).
-
-
-<H3>Linking your own program to the TIFF library on a VMS system:</H3>
-
-You can link to the library in two ways: Either using the shareable
-library, or using the object  library.
-On the VAX these possibilities are:
-
-<OL>
-<LI>Using the shareable TIFF library.
-<PRE>
-$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/OPTIONS,SYS$INPUT:/OPTIONS
-    SYS$SHARE:VAXCRTL/SHAREABLE
-</PRE>
-<LI>Using the TIFF object library.
-<PRE>
-$ LINK MY_PROGRAM, -
-    DISK:[TIFF.LIBTIFF]TIFF/LIBRARY/INCLUDE=(TIF_FAX3SM,TIF_CODEC), -
-    SYS$INPUT:/OPTIONS
-    SYS$SHARE:VAXCRTL/SHAREABLE
-</PRE>
-</OL>
-
-On AXP (and possibly also using DEC C on VAX) the corresponding commands are
-<OL>
-<LI>Using the shareable TIFF library.
-<PRE>
-$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/OPTIONS
-</PRE>
-<LI>Using the TIFF object library.
-<PRE>
-$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/LIBRARY
-</PRE>
-</OL>
-
-Method 1 uses the shortest link time and smallest <TT>.EXE</TT>
-files, but it
-requires that <TT>TIFFSHR</TT> is defined as above at link time and
-<STRONG>at run time</STRONG>. 
-Using the compilation procedure above, the tools are linked in this way.
-
-<P>
-Method 2 gives somewhat longer link time and larger <TT>.EXE</TT>
-files, but does
-not require <TT>TIFFSHR</TT> to be defined. This method is recommended if you
-want to run your program on another machine, and for some reason don't
-want to have the library on that machine. If you plan to have more than
-one program (including the tools) on the machine, it is recommended that
-you copy the library to the other machine and use method 1.
-
-
-
-<A NAME=Acorn><P><HR><H2>Building the Software on an Acorn RISC OS system</H2></A>
-
-The directory <B>contrib/acorn</B> contains support for compiling the library
-under Acorn C/C++ under Acorn's RISC OS 3.10 or above. Subsequent pathnames
-will use the Acorn format: The full-stop or period character is a pathname
-delimeter, and the slash character is not interpreted; the reverse position
-from Unix. Thus "libtiff/tif_acorn.c" becomes "libtiff.tif_acorn/c".
-
-<P>
-This support was contributed by Peter Greenham. (<A HREF=mailto:peter at enlarion.demon.co.uk>peter at enlarion.demon.co.uk</A>).
-
-<P>
-<H3>Installing LibTIFF:</H3>
-
-<P>
-LIBTIFF uses several files which have names longer than the normal RISC OS
-maximum of ten characters. This complicates matters. Maybe one day Acorn will
-address the problem and implement long filenames properly. Until then this
-gets messy, especially as I'm trying to do this with obeyfiles and not have
-to include binaries in this distribution.
-
-<P>
-First of all, ensure you have Truncate configured on (type <TT>*Configure
-Truncate On</TT>)
-
-<P>
-Although it is, of course, preferable to have long filenames, LIBTIFF can be
-installed with short filenames, and it will compile and link without
-problems. However, <I>getting</I> it there is more problematic.
-<B>contrib.acorn.install</B> is an installation obeyfile which will create a normal
-Acorn-style library from the source (ie: with c, h and o folders etc.), but
-needs the distribution library to have been unpacked into a location which is
-capable of supporting long filenames, even if only temporarily.
-
-<P>
-My recommendation, until Acorn address this problem properly, is to use Jason
-Tribbeck's <A
-HREF=ftp://ftp.demon.co.uk/pub/mirrors/hensa/micros/arch/riscos/c/c020/longfiles.arc>LongFilenames</A>, or any other
-working system that gives you long filenames, like a nearby NFS server for
-instance.
-
-<P>
-If you are using Longfilenames, even if only temporarily to install LIBTIFF,
-unpack the TAR into a RAMDisc which has been longfilenamed (ie: <TT>*addlongfs
-ram</TT>) and then install from there to the hard disk. Unfortunately
-Longfilenames seems a bit unhappy about copying a bunch of long-named files
-across the same filing system, but is happy going between systems. You'll
-need to create a ramdisk of about 2Mb.
-
-<P>
-Now you can run the installation script I've supplied (in contrib.acorn),
-which will automate the process of installing LIBTIFF as an Acorn-style
-library. The syntax is as follows:
-
-<P><TT>
-install <source_dir> <dest_dir>
-
-</TT><P>
-Install will then create <dest_dir> and put the library in there. For
-example, having used LongFilenames on the RAMDisk and unpacked the library
-into there, you can then type:
-
-<P><TT>
-Obey RAM::RamDisc0.$.contrib.acorn.install RAM::RamDisc0.$ ADFS::4.$.LIBTIFF
-</TT><P>
-
-It doesn't matter if the destination location can cope with long filenames or
-not. The filenames will be truncated if necessary (*Configure Truncate On if
-you get errors) and all will be well.
-
-<P>
-<H3>Compiling LibTIFF:</H3>
-
-<P>
-Once the LibTIFF folder has been created and the files put inside, making the
-library should be just a matter of running '<B>SetVars</B>' to set the
-appropriate system variables, then running '<B>Makefile</B>'.
-
-<P>
-<B>OSLib</B>
-
-<P>
-<A HREF=ftp://ftp.acorn.co.uk/pub/riscos/releases/oslib/oslib.arc>OSLib</A>
-is a comprehensive API for RISC OS machines, written by Jonathan Coxhead of
-Acorn Computers (although OSLib is not an official Acorn product). Using the
-OSLib SWI veneers produces code which is more compact and more efficient than
-code written using _kernel_swi or _swi. The Acorn port of LibTIFF can take
-advantage of this if present. Edit the Makefile and go to the Static
-dependencies section. The first entry is:
-
-<PRE>
-# Static dependencies:
- at .o.tif_acorn:   @.c.tif_acorn
-	cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn 
-</PRE>
-<P>
-Change the cc line to:
-<PRE>
-	cc $(ccflags) -DINCLUDE_OSLIB -o @.o.tif_acorn @.c.tif_acorn 
-</PRE>
-<P>
-Remember, however, that OSLib is only <I>recommended</I> for efficiency's
-sake. It is not required.
-
-
-
-<A NAME=Other><P><HR><H2>Building the Software on Other Systems</H2></A>
-
-This section contains information that might be useful
-if you are working on a non-UNIX system that is not directly supported.
-All library-related files described below are located in the <B>libtiff</B>
-directory.
-
-<P>
-The library requires two files that are generated <I>on-the-fly</I>.
-The file <B>tif_fax3sm.c</B> has the state tables for the
-Group 3 and Group 4 decoders.
-This file is generated by the <TT>mkg3states</TT> program
-on a UNIX system; for example,
-
-<UL><PRE><TT>
-cd libtiff
-cc -o mkg3states mkg3states.c
-rm -f tif_fax3sm.c
-./mkg3states -c const tif_fax3sm.c
-</TT></PRE></UL>
-
-The <TT>-c</TT> option can be used to control whether or not the
-resutling tables are generated with a <TT>const</TT> declaration.
-The <TT>-s</TT> option can be used to specify a C storage class
-for the table declarations.
-The <TT>-b</TT> option can be used to force data values to be
-explicitly bracketed with ``{}'' (apparently needed for some
-MS-Windows compilers); otherwise the structures are emitted in
-as compact a format as possible.
-Consult the source code for this program if you have questions.
-
-<P>
-The second file required to build the library, <B>version.h</B>,
-contains the version
-information returned by the <TT>TIFFGetVersion</TT> routine.
-This file is built on most systems using the
-<TT>mkversion</TT> program and the contents of the
-<TT>VERSION</TT> and <TT>tiff.alpha</TT> files; for example,
-
-<UL><PRE>
-cd libtiff
-cc -o mkversion mkversion.c
-rm -f version.h
-./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h
-</PRE></UL>
-
-<P>
-Otherwise, when building the library on a non-UNIX system be sure to
-consult the files <B>tiffcomp.h</B> and <B>tiffconf.h</B>.
-The former contains system compatibility definitions while the latter
-is provided so that the software configuration can be controlled
-on systems that do not support the make facility for building
-the software.
-
-<P>
-Systems without a 32-bit compiler may not be able to handle some
-of the codecs in the library; especially the Group 3 and 4 decoder.
-If you encounter problems try disabling support for a particular
-codec; consult the <A HREF=internals.html#Config>documentation</A>.
-
-<P>
-Programs in the tools directory are written to assume an ANSI C
-compilation environment.
-There may be a few POSIX'isms as well.
-The code in the <B>port</B> directory is provided to emulate routines
-that may be missing on some systems.
-On UNIX systems the <TT>configure</TT> script automatically figures
-out which routines are not present on a system and enables the use
-of the equivalent emulation routines from the <B>port</B> directory.
-It may be necessary to manually do this work on a non-UNIX system.
-
-
-<A NAME=Testing><P><HR><H2>Checking out the Software</H2></A>
-
-<P>
-Assuming you have working versions of <TT>tiffgt</TT> and <TT>tiffsv</TT>,
-you can just
-use them to view any of the sample images available for testing
-(see the <A HREF=images.html>section on obtaining the test images</A>).
-Otherwise, you can do a cursory check of the library with
-the <TT>tiffcp</TT> and <TT>tiffcmp</TT> programs. For example,
-
-<UL><PRE>
-tiffcp -lzw cramps.tif x.tif
-tiffcmp cramps.tif x.tif
-</PRE></UL>
-
-<P>
-(<TT>tiffcmp</TT> should be silent if the files compare correctly).
-
-
-
-<A NAME=TOC><P><HR><H2>Table of Contents</H2></A>
-
-The following files makup the core library:
-
-<PRE>
-libtiff/tiff.h			TIFF spec definitions
-libtiff/tiffcomp.h		non-UNIX OS-compatibility definitions
-libtiff/tiffconf.h		non-UNIX configuration definitions
-libtiff/tiffio.h		public TIFF library definitions
-libtiff/tiffiop.h		private TIFF library definitions
-libtiff/t4.h			CCITT Group 3/4 code tables+definitions
-libtiff/tif_dir.h		private defs for TIFF directory handling
-libtiff/tif_fax3.h		CCITT Group 3/4-related definitions
-libtiff/tif_predict.h		private defs for Predictor tag support
-libtiff/uvcode.h		LogL/LogLuv codec-specific definitions
-libtiff/version.h		version string (generated by Makefile)
-
-libtiff/tif_acorn.c		Acorn-related OS support
-libtiff/tif_apple.c		Apple-related OS support
-libtiff/tif_atari.c		Atari-related OS support
-libtiff/tif_aux.c		auxilary directory-related functions
-libtiff/tif_close.c		close an open TIFF file
-libtiff/tif_codec.c		configuration table of builtin codecs
-libtiff/tif_compress.c		compression scheme support
-libtiff/tif_dir.c		directory tag interface code
-libtiff/tif_dirinfo.c		directory known tag support code
-libtiff/tif_dirread.c		directory reading code
-libtiff/tif_dirwrite.c		directory writing code
-libtiff/tif_dumpmode.c		"no" compression codec
-libtiff/tif_error.c		library error handler
-libtiff/tif_fax3.c		CCITT Group 3 and 4 codec
-libtiff/tif_fax3sm.c		G3/G4 state tables (generated by mkg3states)
-libtiff/tif_flush.c		i/o and directory state flushing
-libtiff/tif_getimage.c		TIFFRGBAImage support
-libtiff/tif_jpeg.c		JPEG codec (interface to the IJG distribution)
-libtiff/tif_luv.c		SGI LogL/LogLuv codec
-libtiff/tif_lzw.c		LZW codec
-libtiff/tif_msdos.c		MSDOS-related OS support
-libtiff/tif_next.c		NeXT 2-bit scheme codec (decoding only)
-libtiff/tif_open.c		open and simply query code
-libtiff/tif_packbits.c		Packbits codec
-libtiff/tif_pixarlog.c		Pixar codec
-libtiff/tif_predict.c		Predictor tag support
-libtiff/tif_print.c		directory printing support
-libtiff/tif_read.c		image data reading support
-libtiff/tif_strip.c		some strip-related code
-libtiff/tif_swab.c		byte and bit swapping support
-libtiff/tif_thunder.c		Thunderscan codec (decoding only)
-libtiff/tif_tile.c		some tile-related code
-libtiff/tif_unix.c		UNIX-related OS support
-libtiff/tif_version.c		library version support
-libtiff/tif_vms.c		VMS-related OS support
-libtiff/tif_warning.c		library warning handler
-libtiff/tif_win3.c		Windows-3.1-related OS support
-libtiff/tif_win32.c		Win32 (95/98/NT) related OS support
-libtiff/tif_write.c		image data writing support
-libtiff/tif_zip.c		Deflate codec
-
-libtiff/mkg3states.c		program to generate G3/G4 decoder state tables
-libtiff/mkspans.c		program to generate black-white span tables
-libtiff/mkversion.c		program to generate libtiff/version.h.
-</PRE>
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/contrib.html b/tkimg1.3/libtiff/html/contrib.html
deleted file mode 100644
index 9fa12d6..0000000
--- a/tkimg1.3/libtiff/html/contrib.html
+++ /dev/null
@@ -1,209 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Contributed TIFF Software
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/smallliz.jpg WIDTH=144 HEIGHT=108 ALIGN=left BORDER=1 HSPACE=6>
-Contributed TIFF Software
-</H1>
-
-
-<P>
-The <B>contrib</B> directory has contributed software that
-uses the TIFF library or which is associated with the library
-(typically glue and guidance for ports to non-UNIX platforms, or tools that
-aren't directly TIFF related).
-
-<BR CLEAR=left>
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/vms</B>
-</TD>
-<TD>
-scripts and files from Karsten Spang for building
-		the library and tools under VMS
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/dbs</B>
-</TD>
-<TD>
-various tools from Dan & Chris Sears, including a simple X-based viewer
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/ras</B>
-</TD>
-<TD>
-two programs by Patrick Naughton for converting
-		between Sun rasterfile format and TIFF (these
-		require <TT>libpixrect.a</TT>, as opposed to the one in
-		tools that doesn't)
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/mac-mpw</B><br>
-<B>contrib/mac-cw</B>
-</TD>
-<TD>
-scripts and files from Niles Ritter for building
-the library and tools under Macintosh/MPW C and
-code warrior.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/acorn</B>
-</TD>
-<TD>
-scripts and files from Peter Greenham for building
-		the library and tools on an Acorn RISC OS system.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/win32</B>
-</TD>
-<TD>
-scripts and files from Scott Wagner for building
-the library under Windows NT and Windows 95. (The makefile.vc in the
-libtiff/libtiff directory may be sufficient for most users.)
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/win_dib</B>
-</TD>
-<TD>
-two separate implementations of TIFF to DIB code suitable for any Win32 
-platform.  Contributed by Mark James, and Philippe Tenenhaus.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/ojpeg</B>
-</TD>
-<TD>
-Patch for IJG JPEG library related to support for some Old JPEG in TIFF files.
-Contributed by Scott Marovich.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/dosdjgpp</B>
-</TD>
-<TD>
-scripts and files from Alexander Lehmann for building
-		the library under MSDOS with the DJGPP v2 compiler.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/tags</B>
-</TD>
-<TD>
-scripts and files from Niles Ritter for adding private
-         tag support at runtime, without changing libtiff.
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/mfs</B>
-</TD>
-<TD>
-code from Mike Johnson to read+write images in memory
-without modifying the library
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/pds</B>
-</TD>
-<TD>
-various routines from Conrad Poelman; a TIFF image iterator and
-   code to support ``private sub-directories''
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/iptcutil</B>
-</TD>
-
-<TD>
-
-A utility by <A HREF=mailto:billr at corbis.com>Bill Radcliffe</a> to
-convert an extracted IPTC Newsphoto caption from a binary blob to
-ASCII text, and vice versa. IPTC binary blobs can be extracted from
-images via the <A
-HREF=http://www.wizards.dupont.com/magick>ImageMagick</a> convert(1)
-utility.
-
-
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/addtiffo</B>
-</TD>
-
-<TD>
-
-A utility (and supporting subroutine) for building
-one or more reduce resolution
-overviews to an existing TIFF file.  Supplied by 
-<a href="http://pobox.com/~warmerdam">Frank Warmerdam</a>.
-
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top>
-<B>contrib/stream</B>
-</TD>
-
-<TD>
-
-A class (TiffStream) for accessing TIFF files through a C++ stream 
-interface.   Supplied by <a href="mailto:avi at shutterfly.com">Avi Bleiweiss</a>.
-
-</TD>
-</TR>
-
-</TABLE>
-
-<P>
-Questions regarding these packages are usually best directed toward
-their authors. 
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/document.html b/tkimg1.3/libtiff/html/document.html
deleted file mode 100644
index 417e1b5..0000000
--- a/tkimg1.3/libtiff/html/document.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-TIFF Documentation
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/jim.gif WIDTH=139 HEIGHT=170 ALIGN=left BORDER=1 HSPACE=6>
-TIFF Documentation
-</H1>
-
-<P>
-A copy of the 6.0 specification is available from Adobe at
-<A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf">http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf</A>, or from the libtiff
-ftp site at <a href="ftp://ftp.remotesensing.org/pub/libtiff/TIFF6.pdf">
-ftp://ftp.remotesensing.org/pub/libtiff/TIFF6.pdf</a>.<p>
-
-<P>
-Draft <a href="TIFFTechNote2.html">TIFF Technical Note #2</a> covers problems 
-with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and 
-describes an alternative. <p>
-
-TIFF Technical Notes can be retrieved from:
-
-<UL>
-<A HREF="http://partners.adobe.com/asn/developer/technotes.html">http://partners.adobe.com/asn/developer/technotes.html</a>
-</UL>
-
-<P>
-<HR>
-
-<ADDRESS>
-Last updated: $Date: 2007/01/03 20:47:10 $
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/images.html b/tkimg1.3/libtiff/html/images.html
deleted file mode 100644
index bec2d08..0000000
--- a/tkimg1.3/libtiff/html/images.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-TIFF Test Images
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/bali.jpg WIDTH=158 HEIGHT=107 ALIGN=left BORDER=1 HSPACE=6>
-TIFF Test Images
-</H1>
-
-<P>
-Test images are available for most formats supported by the library.
-Most of the images included in the test kit are also part of this
-documentation (albeit in TIFF rather than GIF or JFIF).
-The images are kept in a separate archive that should be located in
-the same directory as this software.
-
-<BR CLEAR=left>
-
-<P>
-The latest archive of test images is located at
-<A HREF="ftp://ftp.remotesensing.org/pub/libtiff/pics-3.6.1.tar.gz">
-ftp://ftp.remotesensing.org/pub/libtiff/pics-3.6.1.tar.gz</A>
-
-<P>
-There are two other good sources for TIFF test images:
-the contributed software <B>contrib/dbs</B> includes several
-programs that generate test images suitable for debugging, and
-the <TT>tiffcp</TT> program can be used to generate a variety
-of images with different storage characteristics.
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/images/back.gif b/tkimg1.3/libtiff/html/images/back.gif
deleted file mode 100644
index 11d0c35..0000000
Binary files a/tkimg1.3/libtiff/html/images/back.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/bali.jpg b/tkimg1.3/libtiff/html/images/bali.jpg
deleted file mode 100644
index 1f5c146..0000000
Binary files a/tkimg1.3/libtiff/html/images/bali.jpg and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/cat.gif b/tkimg1.3/libtiff/html/images/cat.gif
deleted file mode 100644
index 5bd3fac..0000000
Binary files a/tkimg1.3/libtiff/html/images/cat.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/cover.jpg b/tkimg1.3/libtiff/html/images/cover.jpg
deleted file mode 100644
index 8698cfb..0000000
Binary files a/tkimg1.3/libtiff/html/images/cover.jpg and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/cramps.gif b/tkimg1.3/libtiff/html/images/cramps.gif
deleted file mode 100644
index 9153f9a..0000000
Binary files a/tkimg1.3/libtiff/html/images/cramps.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/dave.gif b/tkimg1.3/libtiff/html/images/dave.gif
deleted file mode 100644
index c36d447..0000000
Binary files a/tkimg1.3/libtiff/html/images/dave.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/info.gif b/tkimg1.3/libtiff/html/images/info.gif
deleted file mode 100644
index 783d631..0000000
Binary files a/tkimg1.3/libtiff/html/images/info.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/jello.jpg b/tkimg1.3/libtiff/html/images/jello.jpg
deleted file mode 100644
index df99e66..0000000
Binary files a/tkimg1.3/libtiff/html/images/jello.jpg and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/jim.gif b/tkimg1.3/libtiff/html/images/jim.gif
deleted file mode 100644
index 9a18a03..0000000
Binary files a/tkimg1.3/libtiff/html/images/jim.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/note.gif b/tkimg1.3/libtiff/html/images/note.gif
deleted file mode 100644
index 7177d68..0000000
Binary files a/tkimg1.3/libtiff/html/images/note.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/oxford.gif b/tkimg1.3/libtiff/html/images/oxford.gif
deleted file mode 100644
index dd4b86e..0000000
Binary files a/tkimg1.3/libtiff/html/images/oxford.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/quad.jpg b/tkimg1.3/libtiff/html/images/quad.jpg
deleted file mode 100644
index 4b7df17..0000000
Binary files a/tkimg1.3/libtiff/html/images/quad.jpg and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/ring.gif b/tkimg1.3/libtiff/html/images/ring.gif
deleted file mode 100644
index 2a614f4..0000000
Binary files a/tkimg1.3/libtiff/html/images/ring.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/smallliz.jpg b/tkimg1.3/libtiff/html/images/smallliz.jpg
deleted file mode 100644
index 8eb827f..0000000
Binary files a/tkimg1.3/libtiff/html/images/smallliz.jpg and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/strike.gif b/tkimg1.3/libtiff/html/images/strike.gif
deleted file mode 100644
index 0709d19..0000000
Binary files a/tkimg1.3/libtiff/html/images/strike.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/images/warning.gif b/tkimg1.3/libtiff/html/images/warning.gif
deleted file mode 100644
index f51eb4b..0000000
Binary files a/tkimg1.3/libtiff/html/images/warning.gif and /dev/null differ
diff --git a/tkimg1.3/libtiff/html/index.html b/tkimg1.3/libtiff/html/index.html
deleted file mode 100644
index d186a0e..0000000
--- a/tkimg1.3/libtiff/html/index.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-TIFF Software
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Helvetica, Sans, Arial">
-<H1>
-LibTIFF Software
-<HR SIZE=4 WIDTH=55% ALIGN=left>
-</H1>
-
-<B>Home Page</B>: <A HREF="http://www.remotesensing.org/libtiff/">
-  http://www.remotesensing.org/libtiff/</A> <BR>
-<B>Home Page Mirror</B>: <A HREF="http://libtiff.maptools.org/">
-http://libtiff.maptools.org/</A> <BR>
-
-<B>Latest Release</B>: <A HREF="v3.6.1.html">v3.6.1</A><BR>
-
-<B>Latest Software</B>: <A HREF="v3.6.1.html">v3.6.1</A><BR>
-
-<B>Master Download Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">ftp.remotesensing.org</A> , directory pub/libtiff<BR>
-
-<B>Mirror Download Site</B>: <A HREF="http://libtiff.maptools.org/dl/">http://libtiff.maptools.org/dl/</A><BR>
-
-<B>Windows Binaries</B>: <A href="http://gnuwin32.sourceforge.net/packages/libtiff.htm">GnuWin32 Project</a><BR>
-
-<B>LZW Compression Kit:</B> <A
-HREF="ftp://ftp.remotesensing.org/libtiff/libtiff-lzw-compression-kit-1.5.tar.gz">libtiff-lzw-compression-kit-1.5.tar.gz</A><BR>
-
-<B>Mailing List</B>: <a href="mailto:tiff at remotesensing.org">tiff at remotesensing.org</a>, <a href="http://remotesensing.org/mailman/listinfo/tiff/">Subscription</a>, <A href="http://remotesensing.org/pipermail/tiff/">Recent Archives</a>, 
-<A HREF="http://www.remotesensing.org/lists/libtiff_archive/maillist.html">Pre-July 2003 Archives</A>  <BR>
-
-<B>Anonymous CVS</B>:<pre>
-        export CVSROOT=:pserver:anonymous at remotesensing.org:/cvsroot
-        cvs login # use password "anonymous" 
-        cvs checkout libtiff
-        cvs checkout libtiff-lzw-compression-kit
-</pre>
-<P>
-This software provides support for the <I>Tag Image File Format</I> (TIFF),
-a widely used format for storing image data.  The latest version of
-the TIFF specification is <A HREF=document.html>available on-line</A>
-in several different formats,
-as are a number of <A HREF= http://partners.adobe.com/asn/developer/technotes.html>Technical Notes (TTN's)</A>.
-
-<P>
-Included in this software distribution is a library, libtiff, for
-reading and writing TIFF, a small collection of tools for doing simple
-manipulations of TIFF images on UNIX systems,
-and documentation on the library and
-tools.  A small assortment of TIFF-related software for UNIX
-that has been contributed by others is also included.
-
-<P>
-The library, along with associated tool programs, should handle most of
-your needs for reading and writing TIFF images on 32- and 64-bit
-machines.  This software can also be used on older 16-bit systems
-though it may require some effort and you may need to leave out some of
-the compression support.
-
-<p> The software was orginally authored and maintained by Sam Leffler.
-While he keeps a fatherly eye on the mailing list, he is no longer
-responsible for day to day maintenance. 
-
-<p> Questions should be sent to the TIFF mailing list: <A
-HREF="mailto:tiff at remotesensing.org">tiff at remotesensing.org</A>, with
-a subscription interface at <a href="http://remotesensing.org/mailman/listinfo/tiff">http://remotesensing.org/mailman/listinfo/tiff</a>.<p>
-
-
-<p> The persons responsible for putting up this site and putting together 
-versions >= 3.5.1 are 
-<A HREF="http://pobox.com/~warmerdam">Frank Warmerdam</A>, <a href="mailto:dron at remotesensing.org">Andrey Kiselev</a>, Mike Welles and Dwight Kelly.<p> 
-
-The following sections are included in this documentation:
-
-<UL>
-<LI><A HREF="support.html">TIFF 6.0 specification coverage</A>
-<LI><A HREF="libtiff.html">Using the TIFF Library</A>
-<LI><A HREF="internals.html">Modifying the TIFF Library</A>
-<LI><A HREF="tools.html">TIFF tools overview</A>
-<LI><A HREF="contrib.html">Contributed software</A>
-<LI><A HREF="document.html">TIFF documentation</A>
-<LI><A HREF="build.html">Building the software distribution</A>
-<LI><A HREF="bugs.html">Bugs, Bugzilla, and the TIFF mailing list</A>
-<LI><A HREF="images.html">Test images</A>
-<LI><A HREF="misc.html">Acknowledgements and copyright issues</A>
-<LI><A HREF="man/index.html">Man Pages</A> 
-</UL>
-
-<P>
-<HR>
-<em> 
-$Id: index.html,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-</em> 
-
-</BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-</HTML>
diff --git a/tkimg1.3/libtiff/html/internals.html b/tkimg1.3/libtiff/html/internals.html
deleted file mode 100644
index 3d0c542..0000000
--- a/tkimg1.3/libtiff/html/internals.html
+++ /dev/null
@@ -1,660 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Modifying The TIFF Library
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/dave.gif WIDTH=107 HEIGHT=148 BORDER=2 ALIGN=left HSPACE=6>
-Modifying The TIFF Library
-</H1>
-
-
-<P>
-This chapter provides information about the internal structure of
-the library, how to control the configuration when building it, and
-how to add new support to the library.
-The following sections are found in this chapter:
-
-<UL>
-<LI><A HREF=#Config>Library Configuration</A>
-<LI><A HREF=#Portability>General Portability Comments</A>
-<LI><A HREF="#Types">Types and Portability</A>
-<LI><A HREF=#AddingTags>Adding New Tags</A>
-<LI><A HREF=#AddingCODECS>Adding New Builtin Codecs</A>
-<LI><A HREF=#AddingCODECTags>Adding New Codec-private Tags</A>
-<LI><A HREF=#Other>Other Comments</A>
-</UL>
-
-
-<A NAME="Config"><P><HR WIDTH=65% ALIGN=right><H3>Library Configuration</H3></A>
-
-Information on compiling the library is given
-<A HREF=build.html>elsewhere in this documentation</A>.
-This section describes the low-level mechanisms used to control
-the optional parts of the library that are configured at build
-time.   Control is based on
-a collection of C defines that are specified either on the compiler
-command line or in a configuration file such as <TT>port.h</TT>
-(as generated by the <TT>configure</TT> script for UNIX systems)
-or <B>tiffconf.h</B>.
-
-<P>
-Configuration defines are split into three areas:
-<UL>
-<LI>those that control which compression schemes are
-    configured as part of the builtin codecs,
-<LI>those that control support for groups of tags that
-    are considered optional, and
-<LI>those that control operating system or machine-specific support.
-</UL>
-
-<P>
-If the define <TT>COMPRESSION_SUPPORT</TT> is <STRONG>not defined</STRONG>
-then a default set of compression schemes is automatically
-configured:
-<UL>
-<LI>CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771),
-<LI>the Macintosh PackBits algorithm (compression 32773),
-<LI>a 4-bit run-length encoding scheme from ThunderScan (compression 32809),
-<LI>a 2-bit encoding scheme used by NeXT (compression 32766), and
-<LI>two experimental schemes intended for images with high dynamic range
-(compression 34676 and 34677).
-</UL>
-
-<P>
-
-Lempel-Ziv & Welch (LZW) algorithm (compression 5), is <b>no longer</b> supported by default, due to Unisys patent enforcement (c.f <A HREF=http://zgp.org/~dmarti/burnallgifs/>Burn All GIFs</A>).  To enable lzw compression, you must obtain the libtiff-lzw-compression-kit from <A HREF=http://www.libtiff.org>libtiff.org</A>.  N.B. to use this kit legally, you must live in a country where the patent doesn't apply or you must obtain a license from Unisys. 
-
-<P> 
-
-To override the default compression behaviour define
-<TT>COMPRESSION_SUPPORT</TT> and then one or more additional defines
-to enable configuration of the appropriate codecs (see the table
-below); e.g.
-
-<UL><PRE>
-#define	COMPRESSION_SUPPORT
-#define	CCITT_SUPPORT
-#define	PACKBITS_SUPPORT
-</PRE></UL>
-
-Several other compression schemes are configured separately from
-the default set because they depend on ancillary software
-packages that are not distributed with <TT>libtiff</TT>.
-
-<P>
-Support for JPEG compression is controlled by <TT>JPEG_SUPPORT</TT>.
-The JPEG codec that comes with <TT>libtiff</TT> is designed for
-use with release 5 or later of the Independent JPEG Group's freely
-available software distribution.
-This software can be retrieved from the directory
-<A HREF=ftp://ftp.uu.net/graphics/jpeg>ftp.uu.net:/graphics/jpeg/</A>.
-
-
-<P>
-<IMG SRC="images/info.gif" ALT="NOTE: " ALIGN=left HSPACE=8>
-<EM>Enabling JPEG support automatically enables support for
-the TIFF 6.0 colorimetry and YCbCr-related tags.</EM>
-
-<P>
-Experimental support for the deflate algorithm is controlled by
-<TT>DEFLATE_SUPPORT</TT>.
-The deflate codec that comes with <TT>libtiff</TT> is designed
-for use with version 0.99 or later of the freely available
-<TT>libz</TT> library written by Jean-loup Gailly and Mark Adler.
-The data format used by this library is described
-in the files
-<A HREF=ftp://ftp.uu.net/pub/archiving/zip/doc/zlib-3.1.doc>zlib-3.1.doc</A>,
-and
-<A HREF=ftp://ftp.uu.net/pub/archiving/zip/doc/deflate-1.1.doc>deflate-1.1.doc</A>,
-available in the directory
-<A HREF=ftp://ftp.uu.net/pub/archiving/zip/doc>ftp.uu.net:/pub/archiving/zip/doc</A>.</EM>
-The library can be retried from the directory
-<A HREF=ftp://ftp.uu.net/pub/archiving/zip/zlib/>ftp.uu.net:/pub/archiving/zip/zlib/</A>
-(or try <A HREF=ftp://quest.jpl.nasa.gov/beta/zlib/>quest.jpl.nasa.gov:/beta/zlib/</A>).
-
-<P>
-<IMG SRC="images/warning.gif" ALT="NOTE: " ALIGN=left HSPACE=8 VSPACE=6>
-<EM>The deflate algorithm is experimental.  Do not expect
-to exchange files using this compression scheme;
-it is included only because the similar, and more common,
-LZW algorithm is claimed to be governed by licensing restrictions.</EM>
-
-
-<P>
-By default <B>tiffconf.h</B> defines
-<TT>COLORIMETRY_SUPPORT</TT>, 
-<TT>YCBCR_SUPPORT</TT>,
-and 
-<TT>CMYK_SUPPORT</TT>.
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR><TH ALIGN=left>Define</TH><TH ALIGN=left>Description</TH></TR>
-
-<TR>
-<TD VALIGN=top><TT>CCITT_SUPPORT</TT></TD>
-<TD>CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4,
-    and 32771)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>PACKBITS_SUPPORT</TT></TD>
-<TD>Macintosh PackBits algorithm (compression 32773)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>LZW_SUPPORT</TT></TD>
-<TD>Lempel-Ziv & Welch (LZW) algorithm (compression 5)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>THUNDER_SUPPORT</TT></TD>
-<TD>4-bit
-run-length encoding scheme from ThunderScan (compression 32809)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>NEXT_SUPPORT</TT></TD>
-<TD>2-bit encoding scheme used by NeXT (compression 32766)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>OJPEG_SUPPORT</TT></TD>
-<TD>obsolete JPEG scheme defined in the 6.0 spec (compression 6)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>JPEG_SUPPORT</TT></TD>
-<TD>current JPEG scheme defined in TTN2 (compression 7)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>ZIP_SUPPORT</TT></TD>
-<TD>experimental Deflate scheme (compression 32946)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>PIXARLOG_SUPPORT</TT></TD>
-<TD>Pixar's compression scheme for high-resolution color images (compression 32909)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>SGILOG_SUPPORT</TT></TD>
-<TD>SGI's compression scheme for high-resolution color images (compression 34676 and 34677)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>COLORIMETRY_SUPPORT</TT></TD>
-<TD>support for the TIFF 6.0 colorimetry tags</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>YCBCR_SUPPORT</TT></TD>
-<TD>support for the TIFF 6.0 YCbCr-related tags</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>CMYK_SUPPORT</TT></TD>
-<TD>support for the TIFF 6.0 CMYK-related tags</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>ICC_SUPPORT</TT></TD>
-<TD>support for the ICC Profile tag; see
-<I>The ICC Profile Format Specification</I>,
-Annex B.3 "Embedding ICC Profiles in TIFF Files";
-available at
-<A HREF=http://www.color.org>http://www.color.org</A>
-</TD>
-</TR>
-
-</TABLE>
-
-
-<A NAME="Portability"><P><HR WIDTH=65% ALIGN=right><H3>General Portability Comments</H3></A>
-
-This software is developed on Silicon Graphics UNIX
-systems (big-endian, MIPS CPU, 32-bit ints,
-IEEE floating point). 
-The <TT>configure</TT> shell script generates the appropriate
-include files and make files for UNIX systems.
-Makefiles exist for non-UNIX platforms that the
-code runs on -- this work has mostly been done by other people.
-
-<P>
-In general, the code is guaranteed to work only on SGI machines.
-In practice it is highly portable to any 32-bit or 64-bit system and much
-work has been done to insure portability to 16-bit systems.
-If you encounter portability problems please return fixes so
-that future distributions can be improved.
-
-<P>
-The software is written to assume an ANSI C compilation environment.
-If your compiler does not support ANSI function prototypes, <TT>const</TT>,
-and <TT><stdarg.h></TT> then you will have to make modifications to the
-software.  In the past I have tried to support compilers without <TT>const</TT>
-and systems without <TT><stdarg.h></TT>, but I am
-<EM>no longer interested in these
-antiquated environments</EM>.  With the general availability of
-the freely available GCC compiler, I
-see no reason to incorporate modifications to the software for these
-purposes.
-
-<P>
-An effort has been made to isolate as many of the
-operating system-dependencies
-as possible in two files: <B>tiffcomp.h</B> and
-<B>libtiff/tif_<os>.c</B>.  The latter file contains
-operating system-specific routines to do I/O and I/O-related operations.
-The UNIX (<B>tif_unix.c</B>),
-Macintosh (<B>tif_apple.c</B>),
-and VMS (<B>tif_vms.c</B>)
-code has had the most use;
-the MS/DOS support (<B>tif_msdos.c</B>) assumes
-some level of UNIX system call emulation (i.e.
-<TT>open</TT>,
-<TT>read</TT>,
-<TT>write</TT>,
-<TT>fstat</TT>,
-<TT>malloc</TT>,
-<TT>free</TT>).
-
-<P>
-Native CPU byte order is determined on the fly by
-the library and does not need to be specified.
-The <TT>HOST_FILLORDER</TT> and <TT>HOST_BIGENDIAN</TT>
-definitions are not currently used, but may be employed by
-codecs for optimization purposes.
-
-<P>
-The following defines control general portability:
-
-<P>
-<TABLE BORDER CELLPADDING=3 WIDTH=100%>
-
-<TR>
-<TD VALIGN=top><TT>BSDTYPES</TT></TD>
-<TD>Define this if your system does NOT define the
-		usual BSD typedefs: <TT>u_char</TT>,
-		<TT>u_short</TT>, <TT>u_int</TT>, <TT>u_long</TT>.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>HAVE_IEEEFP</TT></TD>
-<TD>Define this as 0 or 1 according to the floating point
-		format suported by the machine.  If your machine does
-		not support IEEE floating point then you will need to
-		add support to tif_machdep.c to convert between the
-		native format and IEEE format.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>HAVE_MMAP</TT></TD>
-<TD>Define this if there is <I>mmap-style</I> support for
-mapping files into memory (used only to read data).</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>HOST_FILLORDER</TT></TD>
-<TD>Define the native CPU bit order: one of <TT>FILLORDER_MSB2LSB</TT>
- or <TT>FILLORDER_LSB2MSB</TT></TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><TT>HOST_BIGENDIAN</TT></TD>
-<TD>Define the native CPU byte order: 1 if big-endian (Motorola)
- or 0 if little-endian (Intel); this may be used
- in codecs to optimize code</TD>
-</TR>
-</TABLE>
-
-<P>
-On UNIX systems <TT>HAVE_MMAP</TT> is defined through the running of
-the <TT>configure</TT> script; otherwise support for memory-mapped
-files is disabled.
-Note that <B>tiffcomp.h</B> defines <TT>HAVE_IEEEFP</TT> to be
-1 (<TT>BSDTYPES</TT> is not defined).
-
-
-<A NAME="Types"><P><HR WIDTH=65% ALIGN=right><H3>Types and Portability</H3></A>
-
-The software makes extensive use of C typedefs to promote portability.
-Two sets of typedefs are used, one for communication with clients
-of the library and one for internal data structures and parsing of the
-TIFF format.  There are interactions between these two to be careful
-of, but for the most part you should be able to deal with portability
-purely by fiddling with the following machine-dependent typedefs:
-
-
-<P>
-<TABLE BORDER CELLPADDING=3 WIDTH=100%>
-
-<TR>
-<TD>uint8</TD>
-<TD>8-bit unsigned integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>int8</TD>
-<TD>8-bit signed integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>uint16</TD>
-<TD>16-bit unsigned integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>int16</TD>
-<TD>16-bit signed integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>uint32</TD>
-<TD>32-bit unsigned integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>int32</TD>
-<TD>32-bit signed integer</TD>
-<TD>tiff.h</TD>
-</TR>
-
-<TR>
-<TD>dblparam_t</TD>
-<TD>promoted type for floats</TD>
-<TD>tiffcomp.h</TD>
-</TR>
-
-</TABLE>
-
-<P>
-(to clarify <TT>dblparam_t</TT>, it is the type that float parameters are
-promoted to when passed by value in a function call.)
-
-<P>
-The following typedefs are used throughout the library and interfaces
-to refer to certain objects whose size is dependent on the TIFF image
-structure:
-
-
-<P>
-<TABLE BORDER CELLPADDING=3 WIDTH=100%>
-
-<TR>
-<TD WIDTH=25%>typedef unsigned int ttag_t;</TD>	<TD>directory tag</TD>
-</TR>
-
-<TR>
-<TD>typedef uint16 tdir_t;</TD>		<TD>directory index</TD>
-</TR>
-
-<TR>
-<TD>typedef uint16 tsample_t;</TD>	<TD>sample number</TD>
-</TR>
-
-<TR>
-<TD>typedef uint32 tstrip_t;</TD>	<TD>strip number</TD>
-</TR>
-
-<TR>
-<TD>typedef uint32 ttile_t;</TD>		<TD>tile number</TD>
-</TR>
-
-<TR>
-<TD>typedef int32 tsize_t;</TD>		<TD>i/o size in bytes</TD>
-</TR>
-
-<TR>
-<TD>typedef void* tdata_t;</TD>		<TD>image data ref</TD>
-</TR>
-
-<TR>
-<TD>typedef void* thandle_t;</TD>	<TD>client data handle</TD>
-</TR>
-
-<TR>
-<TD>typedef int32 toff_t;</TD>		<TD>file offset (should be off_t)</TD>
-</TR>
-
-<TR>
-<TD>typedef unsigned char* tidata_t;</TD> <TD>internal image data</TD>
-</TR>
-
-</TABLE>
-
-<P>
-Note that <TT>tstrip_t</TT>, <TT>ttile_t</TT>, and <TT>tsize_t</TT>
-are constrained to be
-no more than 32-bit quantities by 32-bit fields they are stored
-in in the TIFF image.  Likewise <TT>tsample_t</TT> is limited by the 16-bit
-field used to store the <TT>SamplesPerPixel</TT> tag.  <TT>tdir_t</TT>
-constrains
-the maximum number of IFDs that may appear in an image and may
-be an arbitrary size (without penalty).  <TT>ttag_t</TT> must be either
-<TT>int</TT>, <TT>unsigned int</TT>, pointer, or <TT>double</TT>
-because the library uses a varargs
-interface and ANSI C restricts the type of the parameter before an
-ellipsis to be a promoted type.  <TT>toff_t</TT> is defined as
-<TT>int32</TT> because
-TIFF file offsets are (unsigned) 32-bit quantities.  A signed
-value is used because some interfaces return -1 on error (sigh).
-Finally, note that <TT>tidata_t</TT> is used internally to the library to
-manipulate internal data.  User-specified data references are
-passed as opaque handles and only cast at the lowest layers where
-their type is presumed.
-
-
-<P><HR WIDTH=65% ALIGN=right><H3>General Comments</H3></A>
-
-The library is designed to hide as much of the details of TIFF from
-applications as
-possible.  In particular, TIFF directories are read in their entirety
-into an internal format.  Only the tags known by the library are
-available to a user and certain tag data may be maintained that a user
-does not care about (e.g. transfer function tables).
-
-<A NAME=AddingTags><P><HR WIDTH=65% ALIGN=right><H3>Adding New Tags</H3></A>
-
-To add support for a new directory tag you have three options.  If your
-tag is specific to a compression algorithm, see below. If you have a lot
-of tags you may want to try using Niles Ritter's runtime tag-extension
-scheme in the "contrib/tags" directory, which makes the changes 
-orthogonal to the main libtiff code. Otherwise use
-the following guidelines to add support to the ``core library''.
-
-<OL>
-<LI>Define the tag in <B>tiff.h</B>.
-<LI>Add a field to the directory structure in <B>tif_dir.h</B>
-   and define a <TT>FIELD_*</TT> bit (also update the definition of
-   <TT>FIELD_CODEC</TT> to reflect your addition).
-<LI>Add an entry in the <TT>TIFFFieldInfo</TT> array defined at the top of
-   <B>tif_dirinfo.c</B>. 
-   Note that you must keep this array sorted by tag
-   number and that the widest variant entry for a tag should come
-   first (e.g. <TT>LONG</TT> before <TT>SHORT</TT>).
-<LI>Add entries in <TT>_TIFFVSetField()</TT> and <TT>_TIFFVGetField()</TT>
-   for the new tag.
-<LI>(<I>optional</I>) If the value associated with the tag is not a scalar value
-   (e.g. the array for <TT>TransferFunction</TT>) and requires
-   special processing,
-   then add the appropriate code to <TT>TIFFReadDirectory()</TT> and
-   <TT>TIFFWriteDirectory()</TT>.  You're best off finding a similar tag and
-   cribbing code.
-<LI>Add support to <TT>TIFFPrintDirectory()</TT> in <B>tif_print.c</B>
-    to print the tag's value.
-</OL>
-
-<P>
-If you want to maintain portability, beware of making assumptions
-about data types.  Use the typedefs (<TT>uint16</TT>, etc. when dealing with
-data on disk and <TT>t*_t</TT> when stuff is in memory) and be careful about
-passing items through printf or similar vararg interfaces.
-
-<A NAME=AddingCODECS><P><HR WIDTH=65% ALIGN=right><H3>Adding New Builtin Codecs</H3></A>
-
-To add builtin support for a new compression algorithm, you can either
-use the "tag-extension" trick to override the handling of the
-TIFF Compression tag (see <A HREF=#AddingTags>Adding New Tags</A>, above), 
-or do the following to add support directly to the core library:
-
-<OL>
-<LI>Define the tag value in <B>tiff.h</B>.
-<LI>Edit the file <B>tif_codec.c</B> to add an entry to the
-   _TIFFBuiltinCODECS array (see how other algorithms are handled).
-<LI>Add the appropriate function prototype declaration to
-   <B>tiffiop.h</B> (close to the bottom).
-<LI>Create a file with the compression scheme code, by convention files
-   are named <B>tif_*.c</B> (except perhaps on some systems where the
-   tif_ prefix pushes some filenames over 14 chars.
-<LI>Edit <B>Makefile.in</B> (and any other Makefiles)
-   to include the new source file.
-</OL>
-
-<P>
-A codec, say <TT>foo</TT>, can have many different entry points:
-
-<PRE>
-TIFFInitfoo(tif, scheme)/* initialize scheme and setup entry points in tif */
-fooSetupDecode(tif)	/* called once per IFD after tags has been frozen */
-fooPreDecode(tif, sample)/* called once per strip/tile, after data is read,
-			    but before the first row is decoded */
-fooDecode*(tif, bp, cc, sample)/* decode cc bytes of data into the buffer */
-    fooDecodeRow(...)	/* called to decode a single scanline */
-    fooDecodeStrip(...)	/* called to decode an entire strip */
-    fooDecodeTile(...)	/* called to decode an entire tile */
-fooSetupEncode(tif)	/* called once per IFD after tags has been frozen */
-fooPreEncode(tif, sample)/* called once per strip/tile, before the first row in
-			    a strip/tile is encoded */
-fooEncode*(tif, bp, cc, sample)/* encode cc bytes of user data (bp) */
-    fooEncodeRow(...)	/* called to decode a single scanline */
-    fooEncodeStrip(...)	/* called to decode an entire strip */
-    fooEncodeTile(...)	/* called to decode an entire tile */
-fooPostEncode(tif)	/* called once per strip/tile, just before data is written */
-fooSeek(tif, row)	/* seek forwards row scanlines from the beginning
-			   of a strip (row will always be >0 and <rows/strip */
-fooCleanup(tif)		/* called when compression scheme is replaced by user */
-</PRE>
-
-<P>
-Note that the encoding and decoding variants are only needed when
-a compression algorithm is dependent on the structure of the data.
-For example, Group 3 2D encoding and decoding maintains a reference
-scanline.  The sample parameter identifies which sample is to be
-encoded or decoded if the image is organized with <TT>PlanarConfig</TT>=2
-(separate planes).  This is important for algorithms such as JPEG.
-If <TT>PlanarConfig</TT>=1 (interleaved), then sample will always be 0.
-
-
-<A NAME=AddingCODECTags><P><HR WIDTH=65% ALIGN=right><H3>Adding New Codec-private Tags</H3></A>
-
-To add tags that are meaningful <EM>only when a particular compression
-algorithm is used</EM> follow these steps:
-
-<OL>
-<LI>Define the tag in <B>tiff.h</B>.
-<LI>Allocate storage for the tag values in the private state block of
-   the codec.
-<LI>Insure the state block is created when the codec is initialized.
-<LI>At <TT>TIFFInitfoo</TT> time override the method pointers in the
-    TIFF structure
-   for getting, setting and printing tag values.  For example,
-<PRE>
-    sp->vgetparent = tif->tif_vgetfield;
-    tif->tif_vgetfield = fooVGetField;	/* hook for codec tags */
-    sp->vsetparent = tif->tif_vsetfield;
-    tif->tif_vsetfield = fooVSetField;	/* hook for codec tags */
-    tif->tif_printdir = fooPrintDir;	/* hook for codec tags */
-</PRE>
-   (Actually you may decide not to override the
-   <TT>tif_printdir</TT> method, but rather just specify it).
-<LI>Create a private <TT>TIFFFieldInfo</TT> array for your tags and
-    merge them into the core tags at initialization time using
-    <TT>_TIFFMergeFieldInfo</TT>; e.g.
-<PRE>
-    _TIFFMergeFieldInfo(tif, fooFieldInfo, N(fooFieldInfo));
-</PRE>
-   (where <TT>N</TT> is a macro used liberaly throughout the distributed code).
-<LI>Fill in the get and set routines.  Be sure to call the parent method
-   for tags that you are not handled directly.  Also be sure to set the
-   <TT>FIELD_*</TT> bits for tags that are to be written to the file.  Note that
-   you can create ``pseudo-tags'' by defining tags that are processed
-   exclusively in the get/set routines and never written to file (see
-   the handling of <TT>TIFFTAG_FAXMODE</TT> in <B>tif_fax3.c</B>
-   for an example of this).
-<LI>Fill in the print routine, if appropriate.
-</OL>
-
-Note that space has been allocated in the <TT>FIELD_*</TT> bit space for
-codec-private tags.  Define your bits as <TT>FIELD_CODEC+<offset></TT> to
-keep them away from the core tags.  If you need more tags than there
-is room for, just increase <TT>FIELD_SETLONGS</TT> at the top of
-<B>tiffiop.h</B>.
-
-
-<A NAME=Other><P><HR WIDTH=65% ALIGN=right><H3>Other Comments</H3></A>
-
-The library handles most I/O buffering.  There are two data buffers
-when decoding data: a raw data buffer that holds all the data in a
-strip, and a user-supplied scanline buffer that compression schemes
-place decoded data into.  When encoding data the data in the
-user-supplied scanline buffer is encoded into the raw data buffer (from
-where it is written).  Decoding routines should never have to explicitly
-read data -- a full strip/tile's worth of raw data is read and scanlines
-never cross strip boundaries.  Encoding routines must be cognizant of
-the raw data buffer size and call <TT>TIFFFlushData1()</TT> when necessary.
-Note that any pending data is automatically flushed when a new strip/tile is
-started, so there's no need do that in the tif_postencode routine (if
-one exists).  Bit order is automatically handled by the library when
-a raw strip or tile is filled.  If the decoded samples are interpreted
-by the decoding routine before they are passed back to the user, then
-the decoding logic must handle byte-swapping by overriding the
-<TT>tif_postdecode</TT>
-routine (set it to <TT>TIFFNoPostDecode</TT>) and doing the required work
-internally.  For an example of doing this look at the horizontal
-differencing code in the routines in <B>tif_predict.c</TT>.
-
-<P>
-The variables <TT>tif_rawcc</TT>, <TT>tif_rawdata</TT>, and
-<TT>tif_rawcp</TT> in a <TT>TIFF</TT> structure
-are associated with the raw data buffer.  <TT>tif_rawcc</TT> must be non-zero
-for the library to automatically flush data.  The variable
-<TT>tif_scanlinesize</TT> is the size a user's scanline buffer should be.  The
-variable <TT>tif_tilesize</TT> is the size of a tile for tiled images.  This
-should not normally be used by compression routines, except where it
-relates to the compression algorithm.  That is, the <TT>cc</TT> parameter to the
-<TT>tif_decode*</TT> and <TT>tif_encode*</TT>
-routines should be used in terminating
-decompression/compression.  This ensures these routines can be used,
-for example, to decode/encode entire strips of data.
-
-<P>
-In general, if you have a new compression algorithm to add, work from
-the code for an existing routine.  In particular,
-<B>tif_dumpmode.c</B>
-has the trivial code for the "nil" compression scheme,
-<B>tif_packbits.c</B> is a
-simple byte-oriented scheme that has to watch out for buffer
-boundaries, and <B>tif_lzw.c</B> has the LZW scheme that has the most
-complexity -- it tracks the buffer boundary at a bit level.
-Of course, using a private compression scheme (or private tags) limits
-the portability of your TIFF files.
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-
-</HTML>
diff --git a/tkimg1.3/libtiff/html/intro.html b/tkimg1.3/libtiff/html/intro.html
deleted file mode 100644
index b5b595b..0000000
--- a/tkimg1.3/libtiff/html/intro.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Introduction to the TIFF Documentation
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/strike.gif WIDTH=128 HEIGHT=100 ALIGN=left HSPACE=6>
-Introduction to the TIFF Documentation
-</H1>
-
-
-<P>
-The following definitions are used throughout this documentation.
-They are consistent with the terminology used in the TIFF 6.0 specification.
-
-<DL>
-<DT><I>Sample</I>
-<DD>The unit of information stored in an image; often called a
-  channel elsewhere.  Sample values are numbers, usually unsigned
-  integers, but possibly in some other format if the SampleFormat
-  tag is specified in a TIFF
-<DT><I>Pixel</I>
-<DD>A collection of one or more samples that go together.
-<DT><I>Row</I>
-<DD>An Nx1 rectangular collection of pixels.
-<DT><I>Tile</I>
-<DD>An NxM rectangular organization of data (or pixels).
-<DT><I>Strip</I>
-<DD>A tile whose width is the full image width.
-<DT><I>Compression</I>
-<DD>A scheme by which pixel or sample data are stored in
-  an encoded form, specifically with the intent of reducing the
-  storage cost.
-<DT><I>Codec</I>
-<DD>Software that implements the decoding and encoding algorithms
-  of a compression scheme.
-</UL>
-
-<P>
-In order to better understand how TIFF works (and consequently this
-software) it is important to recognize the distinction between the
-physical organization of image data as it is stored in a TIFF and how
-the data is interpreted and manipulated as pixels in an image.  TIFF
-supports a wide variety of storage and data compression schemes that
-can be used to optimize retrieval time and/or minimize storage space.
-These on-disk formats are independent of the image characteristics; it
-is the responsibility of the TIFF reader to process the on-disk storage
-into an in-memory format suitable for an application.  Furthermore, it
-is the responsibility of the application to properly interpret the
-visual characteristics of the image data.  TIFF defines a framework for
-specifying the on-disk storage format and image characteristics with
-few restrictions.  This permits significant complexity that can be
-daunting.  Good applications that handle TIFF work by handling as wide
-a range of storage formats as possible, while constraining the
-acceptable image characteristics to those that make sense for the
-application.
-
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/libtiff.html b/tkimg1.3/libtiff/html/libtiff.html
deleted file mode 100644
index a69d204..0000000
--- a/tkimg1.3/libtiff/html/libtiff.html
+++ /dev/null
@@ -1,733 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Using The TIFF Library
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=WHITE> 
-<FONT FACE="Arial, Helvetica, Sans">
-<H1>
-<IMG SRC=images/cat.gif WIDTH=113 HEIGHT=146 BORDER=2 ALIGN=left HSPACE=6>
-Using The TIFF Library
-</H1>
-
-<P>
-<TT>libtiff</TT> is a set of C functions (a library) that support
-the manipulation of TIFF image files.
-The library requires an ANSI C compilation environment for building
-and presumes an ANSI C environment for use.
-
-<P>
-<TT>libtiff</TT>
-provides interfaces to image data at several layers of abstraction (and cost).
-At the highest level image data can be read into an 8-bit/sample,
-ABGR pixel raster format without regard for the underlying data organization,
-colorspace, or compression scheme.  Below this high-level interface
-the library provides scanline-, strip-, and tile-oriented interfaces that
-return data decompressed but otherwise untransformed.  These interfaces
-require that the application first identify the organization of stored
-data and select either a strip-based or tile-based API for manipulating
-data.  At the lowest level the library
-provides access to the raw uncompressed strips or tiles,
-returning the data exactly as it appears in the file.
-
-<P>
-The material presented in this chapter is a basic introduction
-to the capabilities of the library; it is not an attempt to describe
-everything a developer needs to know about the library or about TIFF.
-Detailed information on the interfaces to the library are given in
-the <A HREF="http://www.libtiff.org/man/index.html">
-UNIX manual pages</A> that accompany this software. 
-
-<P>Michael Still has also written a useful introduction to libtiff for the
-IBM DeveloperWorks site available at 
-<a href="http://www.ibm.com/developerworks/linux/library/l-libtiff">
-http://www.ibm.com/developerworks/linux/library/l-libtiff</a>.
-
-<P>
-The following sections are found in this chapter:
-
-<UL>
-<LI><A HREF=#Version>How to tell which version you have</A>
-<LI><A HREF=#Typedefs>Library Datatypes</A>
-<LI><A HREF=#Mman>Memory Management</A>
-<LI><A HREF=#Errors>Error Handling</A>
-<LI><A HREF=#FIO>Basic File Handling</A>
-<LI><A HREF=#Dirs>TIFF Directories</A>
-<LI><A HREF=#Tags>TIFF Tags</A>
-<LI><A HREF=#Compression>TIFF Compression Schemes</A>
-<LI><A HREF=#ByteOrder>Byte Order</A>
-<LI><A HREF=#DataPlacement>Data Placement</A>
-<LI><A HREF=#TIFFRGBAImage>TIFFRGBAImage Support</A>
-<LI><A HREF=#Scanlines>Scanline-based Image I/O</A>
-<LI><A HREF=#Strips>Strip-oriented Image I/O</A>
-<LI><A HREF=#Tiles>Tile-oriented Image I/O</A>
-<LI><A HREF=#Other>Other Stuff</A>
-</UL>
-
-
-<A NAME="Version"><P><HR WIDTH=65% ALIGN=right><H3>How to tell which version you have</H3></A>
-
-The software version can be found by looking at the file named
-<TT>VERSION</TT>
-that is located at the top of the source tree; the precise alpha number
-is given in the file <TT>dist/tiff.alpha</TT>.
-If you have need to refer to this
-specific software, you should identify it as:
-
-<PRE>
-    TIFF <<I>version</I>> <<I>alpha</I>>
-</PRE>
-
-where <<I>version</I>> is whatever you get from
-<KBD>"cat VERSION"</KBD> and <<I>alpha</I>> is
-what you get from <KBD>"cat dist/tiff.alpha"</KBD>.
-
-<P>
-Within an application that uses <TT>libtiff</TT> the <TT>TIFFGetVersion</TT>
-routine will return a pointer to a string that contains software version
-information.
-The library include file <TT><tiffio.h></TT> contains a C pre-processor
-define <TT>TIFFLIB_VERSION</TT> that can be used to check library
-version compatiblity at compile time.
-
-<A NAME="Typedefs"><P><HR WIDTH=65% ALIGN=right><H3>Library Datatypes</H3></A>
-
-<TT>libtiff</TT> defines a portable programming interface through the
-use of a set of C type definitions.
-These definitions, defined in in the files <B>tiff.h</B> and
-<B>tiffio.h</B>,
-isolate the <TT>libtiff</TT> API from the characteristics
-of the underlying machine.
-To insure portable code and correct operation, applications that use
-<TT>libtiff</TT> should use the typedefs and follow the function
-prototypes for the library API.
-
-<A NAME="Mman"><P><HR WIDTH=65% ALIGN=right><H3>Memory Management</H3></A>
-
-<TT>libtiff</TT> uses a machine-specific set of routines for managing
-dynamically allocated memory.
-<TT>_TIFFmalloc</TT>, <TT>_TIFFrealloc</TT>, and <TT>_TIFFfree</TT>
-mimic the normal ANSI C routines.
-Any dynamically allocated memory that is to be passed into the library
-should be allocated using these interfaces in order to insure pointer
-compatibility on machines with a segmented architecture.
-(On 32-bit UNIX systems these routines just call the normal <TT>malloc</TT>,
-<TT>realloc</TT>, and <TT>free</TT> routines in the C library.)
-
-<P>
-To deal with segmented pointer issues <TT>libtiff</TT> also provides
-<TT>_TIFFmemcpy</TT>, <TT>_TIFFmemset</TT>, and <TT>_TIFFmemmove</TT>
-routines that mimic the equivalent ANSI C routines, but that are
-intended for use with memory allocated through <TT>_TIFFmalloc</TT>
-and <TT>_TIFFrealloc</TT>.
-
-<A NAME="Errors"><P><HR WIDTH=65% ALIGN=right><H3>Error Handling</H3></A>
-
-<TT>libtiff</TT> handles most errors by returning an invalid/erroneous
-value when returning from a function call.
-Various diagnostic messages may also be generated by the library.
-All error messages are directed to a single global error handler
-routine that can be specified with a call to <TT>TIFFSetErrorHandler</TT>.
-Likewise warning messages are directed to a single handler routine
-that can be specified with a call to <TT>TIFFSetWarningHandler</TT>
-
-<A NAME="FIO"><P><HR WIDTH=65% ALIGN=right><H3>Basic File Handling</H3></A>
-
-The library is modeled after the normal UNIX stdio library.
-For example, to read from an existing TIFF image the
-file must first be opened:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("foo.tif", "r");
-    ... do stuff ...
-    TIFFClose(tif);
-}
-</LISTING></UL>
-
-The handle returned by <TT>TIFFOpen</TT> is <I>opaque</I>, that is
-the application is not permitted to know about its contents.
-All subsequent library calls for this file must pass the handle
-as an argument.
-
-<P>
-To create or overwrite a TIFF image the file is also opened, but with
-a <TT>"w"</TT> argument:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("foo.tif", "w");
-    ... do stuff ...
-    TIFFClose(tif);
-}
-</LISTING></UL>
-
-If the file already exists it is first truncated to zero length.
-
-<P>
-<IMG SRC=images/warning.gif ALIGN=left HSPACE=6>
-<EM>Note that unlike the stdio library TIFF image files may not be
-opened for both reading and writing;
-there is no support for altering the contents of a TIFF file.
-</EM>
-
-<P>
-<TT>libtiff</TT> buffers much information associated with writing a
-valid TIFF image.  Consequently, when writing a TIFF image it is necessary
-to always call <TT>TIFFClose</TT> or <TT>TIFFFlush</TT> to flush any
-buffered information to a file.  Note that if you call <TT>TIFFClose</TT>
-you do not need to call <TT>TIFFFlush</TT>.
-
-<A NAME="Dirs"><P><HR WIDTH=65% ALIGN=right><H3>TIFF Directories</H3></A>
-
-TIFF supports the storage of multiple images in a single file.
-Each image has an associated data structure termed a <I>directory</I>
-that houses all the information about the format and content of the
-image data.
-Images in a file are usually related but they do not need to be; it
-is perfectly alright to store a color image together with a black and
-white image.
-Note however that while images may be related their directories are
-not.
-That is, each directory stands on its own; their is no need to read
-an unrelated directory in order to properly interpret the contents
-of an image.
-
-<P>
-<TT>libtiff</TT> provides several routines for reading and writing
-directories.  In normal use there is no need to explicitly
-read or write a directory: the library automatically reads the first
-directory in a file when opened for reading, and directory information
-to be written is automatically accumulated and written when writing
-(assuming <TT>TIFFClose</TT> or <TT>TIFFFlush</TT> are called).
-
-<P>
-For a file open for reading the <TT>TIFFSetDirectory</TT> routine can
-be used to select an arbitrary directory; directories are referenced by
-number with the numbering starting at 0.  Otherwise the
-<TT>TIFFReadDirectory</TT> and <TT>TIFFWriteDirectory</TT> routines can
-be used for sequential access to directories.
-For example, to count the number of directories in a file the following
-code might be used:
-
-<UL><LISTING>
-#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-	int dircount = 0;
-	do {
-	    dircount++;
-	} while (TIFFReadDirectory(tif));
-	printf("%d directories in %s\n", dircount, argv[1]);
-	TIFFClose(tif);
-    }
-    exit(0);
-}
-</LISTING></UL>
-
-<P>
-Finally, note that there are several routines for querying the
-directory status of an open file:
-<TT>TIFFCurrentDirectory</TT> returns the index of the current
-directory and
-<TT>TIFFLastDirectory</TT> returns an indication of whether the
-current directory is the last directory in a file.
-There is also a routine, <TT>TIFFPrintDirectory</TT>, that can
-be called to print a formatted description of the contents of
-the current directory; consult the manual page for complete details.
-
-<A NAME="Tags"><P><HR WIDTH=65% ALIGN=right><H3>TIFF Tags</H3></A>
-
-Image-related information such as the image width and height, number
-of samples, orientation, colorimetric information, etc.
-are stored in each image
-directory in <I>fields</I> or <I>tags</I>.
-Tags are identified by a number that is usually a value registered
-with the Aldus (now Adobe) Corporation.
-Beware however that some vendors write
-TIFF images with tags that are unregistered; in this case interpreting
-their contents is usually a waste of time.
-
-<P>
-<TT>libtiff</TT> reads the contents of a directory all at once
-and converts the on-disk information to an appropriate in-memory
-form.  While the TIFF specification permits an arbitrary set of
-tags to be defined and used in a file, the library only understands
-a limited set of tags.
-Any unknown tags that are encountered in a file are ignored.
-There is a mechanism to extend the set of tags the library handles
-without modifying the library itself;
-this is described <A HREF=../contrib/tags/README>elsewhere</A>.
-
-<P>
-<TT>libtiff</TT> provides two interfaces for getting and setting tag
-values: <TT>TIFFGetField</TT> and <TT>TIFFSetField</TT>.
-These routines use a variable argument list-style interface to pass
-parameters of different type through a single function interface.
-The <I>get interface</I> takes one or more pointers to memory locations
-where the tag values are to be returned and also returns one or
-zero according to whether the requested tag is defined in the directory.
-The <I>set interface</I> takes the tag values either by-reference or
-by-value.
-The TIFF specification defines
-<I>default values</I> for some tags.
-To get the value of a tag, or its default value if it is undefined,
-the <TT>TIFFGetFieldDefaulted</TT> interface may be used.
-
-<P>
-The manual pages for the tag get and set routines specifiy the exact data types
-and calling conventions required for each tag supported by the library.
-
-<A NAME="Compression"><P><HR WIDTH=65% ALIGN=right><H3>TIFF Compression Schemes</H3></A>
-
-<TT>libtiff</TT> includes support for a wide variety of
-data compression schemes.
-In normal operation a compression scheme is automatically used when
-the TIFF <TT>Compression</TT> tag is set, either by opening a file
-for reading, or by setting the tag when writing.
-
-<P>
-Compression schemes are implemented by software modules termed <I>codecs</I>
-that implement decoder and encoder routines that hook into the
-core library i/o support.
-Codecs other than those bundled with the library can be registered
-for use with the <TT>TIFFRegisterCODEC</TT> routine.
-This interface can also be used to override the core-library
-implementation for a compression scheme.
-
-<A NAME="ByteOrder"><P><HR WIDTH=65% ALIGN=right><H3>Byte Order</H3></A>
-
-The TIFF specification says, and has always said, that
-<EM>a correct TIFF
-reader must handle images in big-endian and little-endian byte order</EM>.
-<TT>libtiff</TT> conforms in this respect.
-Consequently there is no means to force a specific
-byte order for the data written to a TIFF image file (data is
-written in the native order of the host CPU unless appending to
-an existing file, in which case it is written in the byte order
-specified in the file).
-
-
-<A NAME="DataPlacement"><P><HR WIDTH=65% ALIGN=right><H3>Data Placement</H3></A>
-
-The TIFF specification requires that all information except an
-8-byte header can be placed anywhere in a file.
-In particular, it is perfectly legitimate for directory information
-to be written after the image data itself.
-Consequently TIFF is inherently not suitable for passing through a
-stream-oriented mechanism such as UNIX pipes.
-Software that require that data be organized in a file in a particular
-order (e.g. directory information before image data) does not
-correctly support TIFF.
-<TT>libtiff</TT> provides no mechanism for controlling the placement
-of data in a file; image data is typically written before directory
-information.
-
-<A NAME="TIFFRGBAImage"><P><HR WIDTH=65% ALIGN=right><H3>TIFFRGBAImage Support</H3></A>
-
-<TT>libtiff</TT> provides a high-level interface for reading image
-data from a TIFF file.  This interface handles the details of
-data organization and format for a wide variety of TIFF files;
-at least the large majority of those files that one would normally
-encounter.  Image data is, by default, returned as ABGR
-pixels packed into 32-bit words (8 bits per sample).  Rectangular
-rasters can be read or data can be intercepted at an intermediate
-level and packed into memory in a format more suitable to the
-application.
-The library handles all the details of the format of data stored on
-disk and, in most cases, if any colorspace conversions are required:
-bilevel to RGB, greyscale to RGB, CMYK to RGB, YCbCr to RGB, 16-bit
-samples to 8-bit samples, associated/unassociated alpha, etc.
-
-<P>
-There are two ways to read image data using this interface.  If
-all the data is to be stored in memory and manipulated at once,
-then the routine <TT>TIFFReadRGBAImage</TT> can be used:
-
-<UL><LISTING>
-#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-	uint32 w, h;
-	size_t npixels;
-	uint32* raster;
-
-	TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-	npixels = w * h;
-	raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32));
-	if (raster != NULL) {
-	    if (TIFFReadRGBAImage(tif, w, h, raster, 0)) {
-		...process raster data...
-	    }
-	    _TIFFfree(raster);
-	}
-	TIFFClose(tif);
-    }
-    exit(0);
-}
-</LISTING></UL>
-
-Note above that <TT>_TIFFmalloc</TT> is used to allocate memory for
-the raster passed to <TT>TIFFReadRGBAImage</TT>; this is important
-to insure the ``appropriate type of memory'' is passed on machines
-with segmented architectures.
-
-<P>
-Alternatively, <TT>TIFFReadRGBAImage</TT> can be replaced with a
-more low-level interface that permits an application to have more
-control over this reading procedure.  The equivalent to the above
-is:
-
-<UL><LISTING>
-#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-	TIFFRGBAImage img;
-	char emsg[1024];
-
-	if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-	    size_t npixels;
-	    uint32* raster;
-
-	    npixels = img.width * img.height;
-	    raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32));
-	    if (raster != NULL) {
-		if (TIFFRGBAImageGet(&img, raster, img.width, img.height)) {
-		    ...process raster data...
-		}
-		_TIFFfree(raster);
-	    }
-	    TIFFRGBAImageEnd(&img);
-	} else
-	    TIFFError(argv[1], emsg);
-	TIFFClose(tif);
-    }
-    exit(0);
-}
-</LISTING></UL>
-
-However this usage does not take advantage of the more fine-grained
-control that's possible.  That is, by using this interface it is
-possible to:
-
-<UL>
-<LI>repeatedly fetch (and manipulate) an image without opening
-   and closing the file
-<LI>interpose a method for packing raster pixel data according to
-   application-specific needs (or write the data at all)
-<LI>interpose methods that handle TIFF formats that are not already
-   handled by the core library
-</UL>
-
-The first item means that, for example, image viewers that want to
-handle multiple files can cache decoding information in order to
-speedup the work required to display a TIFF image.
-
-<P>
-The second item is the main reason for this interface.  By interposing
-a ``put method'' (the routine that is called to pack pixel data in
-the raster) it is possible share the core logic that understands how
-to deal with TIFF while packing the resultant pixels in a format that
-is optimized for the application.  This alternate format might be very
-different than the 8-bit per sample ABGR format the library writes by
-default.  For example, if the application is going to display the image
-on an 8-bit colormap display the put routine might take the data and
-convert it on-the-fly to the best colormap indices for display.
-
-<P>
-The last item permits an application to extend the library
-without modifying the core code.
-By overriding the code provided an application might add support
-for some esoteric flavor of TIFF that it needs, or it might
-substitute a packing routine that is able to do optimizations
-using application/environment-specific information.
-
-<P>
-The TIFF image viewer found in <B>tools/sgigt.c</B> is an example
-of an application that makes use of the <TT>TIFFRGBAImage</TT>
-support.
-
-<A NAME="Scanlines"><P><HR WIDTH=65% ALIGN=right><H3>Scanline-based Image I/O</H3></A>
-
-The simplest interface provided by <TT>libtiff</TT> is a
-scanline-oriented interface that can be used to read TIFF
-images that have their image data organized in strips
-(trying to use this interface to read data written in tiles 
-will produce errors.)
-A scanline is a one pixel high row of image data whose width
-is the width of the image.
-Data is returned packed if the image data is stored with samples
-packed together, or as arrays of separate samples if the data
-is stored with samples separated.
-The major limitation of the scanline-oriented interface, other
-than the need to first identify an existing file as having a
-suitable organization, is that random access to individual
-scanlines can only be provided when data is not stored in a
-compressed format, or when the number of rows in a strip
-of image data is set to one (<TT>RowsPerStrip</TT> is one).
-
-<P>
-Two routines are provided for scanline-based i/o:
-<TT>TIFFReadScanline</TT>
-and
-<TT>TIFFWriteScanline</TT>.
-For example, to read the contents of a file that
-is assumed to be organized in strips, the following might be used:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	uint32 imagelength;
-	tdata_t buf;
-	uint32 row;
-
-	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
-	buf = _TIFFmalloc(TIFFScanlineSize(tif));
-	for (row = 0; row < imagelength; row++)
-	    TIFFReadScanline(tif, buf, row);
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-<TT>TIFFScanlineSize</TT> returns the number of bytes in
-a decoded scanline, as returned by <TT>TIFFReadScanline</TT>.
-Note however that if the file had been create with samples
-written in separate planes, then the above code would only
-read data that contained the first sample of each pixel;
-to handle either case one might use the following instead:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	uint32 imagelength;
-	tdata_t buf;
-	uint32 row;
-
-	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
-	TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config);
-	buf = _TIFFmalloc(TIFFScanlineSize(tif));
-	if (config == PLANARCONFIG_CONTIG) {
-	    for (row = 0; row < imagelength; row++)
-		TIFFReadScanline(tif, buf, row);
-	} else if (config == PLANARCONFIG_SEPARATE) {
-	    uint16 s, nsamples;
-
-	    TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples);
-	    for (s = 0; s < nsamples; s++)
-		for (row = 0; row < imagelength; row++)
-		    TIFFReadScanline(tif, buf, row, s);
-	}
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-Beware however that if the following code were used instead to
-read data in the case <TT>PLANARCONFIG_SEPARATE</TT>,
-
-<UL><LISTING>
-	    for (row = 0; row < imagelength; row++)
-		for (s = 0; s < nsamples; s++)
-		    TIFFReadScanline(tif, buf, row, s);
-</LISTING></UL>
-
-then problems would arise if <TT>RowsPerStrip</TT> was not one
-because the order in which scanlines are requested would require
-random access to data within strips (something that is not supported
-by the library when strips are compressed).
-
-<A NAME="Strips"><P><HR WIDTH=65% ALIGN=right><H3>Strip-oriented Image I/O</H3></A>
-
-The strip-oriented interfaces provided by the library provide
-access to entire strips of data.  Unlike the scanline-oriented
-calls, data can be read or written compressed or uncompressed.
-Accessing data at a strip (or tile) level is often desirable
-because there are no complications with regard to random access
-to data within strips.
-
-<P>
-A simple example of reading an image by strips is:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	tdata_t buf;
-	tstrip_t strip;
-
-	buf = _TIFFmalloc(TIFFStripSize(tif));
-	for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++)
-		TIFFReadEncodedStrip(tif, strip, buf, (tsize_t) -1);
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-Notice how a strip size of <TT>-1</TT> is used; <TT>TIFFReadEncodedStrip</TT>
-will calculate the appropriate size in this case.
-
-<P>
-The above code reads strips in the order in which the
-data is physically stored in the file.  If multiple samples
-are present and data is stored with <TT>PLANARCONFIG_SEPARATE</TT>
-then all the strips of data holding the first sample will be
-read, followed by strips for the second sample, etc.
-
-<P>
-Finally, note that the last strip of data in an image may have fewer
-rows in it than specified by the <TT>RowsPerStrip</TT> tag.  A
-reader should not assume that each decoded strip contains a full
-set of rows in it.
-
-<P>
-The following is an example of how to read raw strips of data from
-a file:
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	tdata_t buf;
-	tstrip_t strip;
-	uint32* bc;
-	uint32 stripsize;
-
-	TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc);
-	stripsize = bc[0];
-	buf = _TIFFmalloc(stripsize);
-	for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) {
-		if (bc[strip] > stripsize) {
-			buf = _TIFFrealloc(buf, bc[strip]);
-			stripsize = bc[strip];
-		}
-		TIFFReadRawStrip(tif, strip, buf, bc[strip]);
-	}
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-As above the strips are read in the order in which they are
-physically stored in the file; this may be different from the
-logical ordering expected by an application.
-
-<A NAME="Tiles"><P><HR WIDTH=65% ALIGN=right><H3>Tile-oriented Image I/O</H3></A>
-
-Tiles of data may be read and written in a manner similar to strips.
-With this interface, an image is
-broken up into a set of rectangular areas that may have dimensions
-less than the image width and height.  All the tiles
-in an image have the same size, and the tile width and length must each
-be a multiple of 16 pixels.  Tiles are ordered left-to-right and
-top-to-bottom in an image.  As for scanlines, samples can be packed
-contiguously or separately.  When separated, all the tiles for a sample
-are colocated in the file.  That is, all the tiles for sample 0 appear
-before the tiles for sample 1, etc.
-
-<P>
-Tiles and strips may also be extended in a z dimension to form
-volumes.  Data volumes are organized as "slices".  That is, all the
-data for a slice is colocated.  Volumes whose data is organized in
-tiles can also have a tile depth so that data can be organized in
-cubes.
-
-<P>
-There are actually two interfaces for tiles.
-One interface is similar to scanlines,  to read a tiled image,
-code of the following sort might be used:
-
-<UL><LISTING>
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	uint32 imageWidth, imageLength;
-	uint32 tileWidth, tileLength;
-	uint32 x, y;
-	tdata_t buf;
-
-	TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
-	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);
-	TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tileWidth);
-	TIFFGetField(tif, TIFFTAG_TILELENGTH, &tileLength);
-	buf = _TIFFmalloc(TIFFTileSize(tif));
-	for (y = 0; y < imageLength; y += tileLength)
-	    for (x = 0; x < imageWidth; x += tileWidth)
-		TIFFReadTile(tif, buf, x, y, 0);
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-(once again, we assume samples are packed contiguously.)
-
-<P>
-Alternatively a direct interface to the low-level data is provided
-a la strips.  Tiles can be read with 
-<TT>TIFFReadEncodedTile</TT> or
-<TT>TIFFReadRawTile</TT>,
-and written with 
-<TT>TIFFWriteEncodedTile</TT> or
-<TT>TIFFWriteRawTile</TT>.
-For example, to read all the tiles in an image: 
-
-<UL><LISTING>
-#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-	tdata_t buf;
-	ttile_t tile;
-
-	buf = _TIFFmalloc(TIFFTileSize(tif));
-	for (tile = 0; tile < TIFFNumberOfTiles(tif); tile++)
-		TIFFReadEncodedTile(tif, tile, buf, (tsize_t) -1);
-	_TIFFfree(buf);
-	TIFFClose(tif);
-    }
-}
-</LISTING></UL>
-
-
-
-<A NAME="Other"><P><HR WIDTH=65% ALIGN=right><H3>Other Stuff</H3></A>
-
-<P>
-<I>Some other stuff will almost certainly go here...</I>
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/man/TIFFClose.3t.html b/tkimg1.3/libtiff/html/man/TIFFClose.3t.html
deleted file mode 100644
index 84f13dd..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFClose.3t.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFClose</title>
-</head>
-<body>
-
-<h1 align=center>TIFFClose</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:20 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFClose - close a previously opened <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-void TIFFClose(TIFF* tif)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFClose</i> closes a file that was previously opened
-with <i>TIFFOpen</i>(3T). Any buffered data are flushed to
-the file, including the contents of the current directory
-(if modified); and all resources are reclaimed.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine. Likewise, warning messages are directed to the
-<i>TIFFWarning</i>(3T) routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFDataWidth.3t.html b/tkimg1.3/libtiff/html/man/TIFFDataWidth.3t.html
deleted file mode 100644
index 88d8de9..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFDataWidth.3t.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFDataWidth</title>
-</head>
-<body>
-
-<h1 align=center>TIFFDataWidth</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:21 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFDataWidth - Get the size of TIFF data types</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFDataWidth(TIFFDataType type)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFDataWidth</i> returns a size of <i>type</i> in bytes.
-Currently following data types are supported:<i><br>
-TIFF_BYTE<br>
-TIFF_ASCII<br>
-TIFF_SBYTE<br>
-TIFF_UNDEFINED<br>
-TIFF_SHORT<br>
-TIFF_SSHORT<br>
-TIFF_LONG<br>
-TIFF_SLONG<br>
-TIFF_FLOAT<br>
-TIFF_RATIONAL<br>
-TIFF_SRATIONAL<br>
-TIFF_DOUBLE</i></td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFDataWidth</i> returns a number of bytes occupied by
-the item of given type. 0 returned when uknown data type
-supplied.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T),</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFError.3t.html b/tkimg1.3/libtiff/html/man/TIFFError.3t.html
deleted file mode 100644
index c3fdd8a..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFError.3t.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFError</title>
-</head>
-<body>
-
-<h1 align=center>TIFFError</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:21 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFError, TIFFSetErrorHandler - library error handling interface</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-void TIFFError(const char* module, const char* fmt,
-...)</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <stdarg.h><br>
-typedef void (*TIFFErrorHandler)(const char* module, const
-char* fmt, va_list ap);<br>
-TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler
-handler);</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFError</i> invokes the library-wide error handling
-function to (normally) write an error message to the
-<b>stderr</b>. The <i>fmt</i> parameter is a
-<i>printf</i>(3S) format string, and any number arguments
-can be supplied. The <i>module</i> parameter, if non-zero,
-is printed before the message; it typically is used to
-identify the software module in which an error is
-detected.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Applications that desire to capture control in the event of
-an error should use <i>TIFFSetErrorHandler</i> to override
-the default error handler. A <small>NULL</small> (0) error
-handling function may be installed to suppress error
-messages.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSetErrorHandler</i> returns a reference to the
-previous error handling function.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFWarning</i>(3T),
-<i>printf</i>(3S)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFFlush.3t.html b/tkimg1.3/libtiff/html/man/TIFFFlush.3t.html
deleted file mode 100644
index 30411e2..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFFlush.3t.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFFlush</title>
-</head>
-<body>
-
-<h1 align=center>TIFFFlush</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:21 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFFlush, TIFFFlushData - flush pending writes to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFFlush(TIFF* tif)<br>
-int TIFFFlushData(TIFF* tif)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFFlush</i> causes any pending writes for the specified
-file (including writes for the current directory) to be
-done. In normal operation this call is never needed- the
-library automatically does any flushing
-required.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFFlushData</i> flushes any pending image data for the
-specified file to be written out; directory-related data are
-not flushed. In normal operation this call is never needed-
-the library automatically does any flushing
-required.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-0 is returned if an error is encountered, otherwise 1 is
-returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteEncodedStrip</i>(3T),
-<i>TIFFWriteEncodedTile</i>(3T),
-<i>TIFFWriteRawStrip</i>(3T), <i>TIFFWriteRawTile</i>(3T),
-<i>TIFFWriteScanline</i>(3T),
-<i>TIFFWriteTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFGetField.3t.html b/tkimg1.3/libtiff/html/man/TIFFGetField.3t.html
deleted file mode 100644
index d7b564b..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFGetField.3t.html
+++ /dev/null
@@ -1,229 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFGetField</title>
-</head>
-<body>
-
-<h1 align=center>TIFFGetField</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:21 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFGetField, TIFFVGetField - get the value(s) of a tag in an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFGetField(TIFF* tif, ttag_t tag,
-...)</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <stdarg.h><br>
-int TIFFVGetField(TIFF* tif, ttag_t tag, va_list
-ap)</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>int TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...)<br>
-int TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list
-ap)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFGetField</i> returns the value of a tag or pseudo-tag
-associated with the the current directory of the open
-<small>TIFF</small> file <i>tif</i>. (A <i>pseudo-tag</i> is
-a parameter that is used to control the operation of the
-<small>TIFF</small> library but whose value is not read or
-written to the underlying file.) The file must have been
-previously opened with <i>TIFFOpen</i>(3T). The tag is
-identified by <i>tag</i>, one of the values defined in the
-include file <b>tiff.h</b> (see also the table below). The
-type and number of values returned is dependent on the tag
-being requested. The programming interface uses a variable
-argument list as prescribed by the <i>stdarg</i>(3)
-interface. The returned values should only be interpreted if
-<i>TIFFGetField</i> returns 1.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFVGetField</i> is functionally equivalent to
-<i>TIFFGetField</i> except that it takes a pointer to a
-variable argument list. <i>TIFFVGetField</i> is useful for
-layering interfaces on top of the functionality provided by
-<i>TIFFGetField</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFGetFieldDefaulted</i> and
-<i>TIFFVGetFieldDefaulted</i> are identical to
-<i>TIFFGetField</i> and <i>TIFFVGetField</i>, except that if
-a tag is not defined in the current directory and it has a
-default value, then the default value is
-returned.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The tags understood by <i>libtiff</i>, the number of
-parameter values, and the types for the returned values are
-shown below. The data types are specified as in C and
-correspond to the types used to specify tag values to
-<i>TIFFSetField</i>(3T). Remember that <i>TIFFGetField</i>
-returns parameter values, so all the listed data types are
-pointers to storage where values should be returned. Consult
-the <small>TIFF</small> specification for information on the
-meaning of each tag and their possible values.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-<i>Tag Name                        Count  Types             Notes
-
-</i>TIFFTAG_ARTIST                  1      char**
-TIFFTAG_BADFAXLINES             1      uint32*
-TIFFTAG_BITSPERSAMPLE           1      uint16*
-TIFFTAG_CLEANFAXDATA            1      uint16*
-TIFFTAG_COLORMAP                3      uint16**          1<<BitsPerSample arrays
-TIFFTAG_COMPRESSION             1      uint16*
-TIFFTAG_CONSECUTIVEBADFAXLINES  1      uint32*
-TIFFTAG_COPYRIGHT               1      char**
-TIFFTAG_DATATYPE                1      uint16*
-TIFFTAG_DATETIME                1      char**
-TIFFTAG_DOCUMENTNAME            1      char**
-TIFFTAG_DOTRANGE                2      uint16*
-TIFFTAG_EXTRASAMPLES            2      uint16*,uint16**  count & types array
-TIFFTAG_FAXMODE                 1      int*              G3/G4 compression pseudo-tag
-TIFFTAG_FAXFILLFUNC             1      TIFFFaxFillFunc*  G3/G4 compression pseudo-tag
-TIFFTAG_FILLORDER               1      uint16*
-TIFFTAG_GROUP3OPTIONS           1      uint32*
-TIFFTAG_GROUP4OPTIONS           1      uint32*
-TIFFTAG_HALFTONEHINTS           2      uint16*
-TIFFTAG_HOSTCOMPUTER            1      char**
-TIFFTAG_IMAGEDEPTH              1      uint32*
-TIFFTAG_IMAGEDESCRIPTION        1      char**
-TIFFTAG_IMAGELENGTH             1      uint32*
-TIFFTAG_IMAGEWIDTH              1      uint32*
-TIFFTAG_INKNAMES                1      char**
-TIFFTAG_INKSET                  1      uint16*
-TIFFTAG_JPEGTABLES              2      u_short*,void**   count & tables
-TIFFTAG_JPEGQUALITY             1      int*              JPEG pseudo-tag
-TIFFTAG_JPEGCOLORMODE           1      int*              JPEG pseudo-tag
-TIFFTAG_JPEGTABLESMODE          1      int*              JPEG pseudo-tag
-TIFFTAG_MAKE                    1      char**
-TIFFTAG_MATTEING                1      uint16*
-TIFFTAG_MAXSAMPLEVALUE          1      uint16*
-TIFFTAG_MINSAMPLEVALUE          1      uint16*
-TIFFTAG_MODEL                   1      char**
-TIFFTAG_ORIENTATION             1      uint16*
-TIFFTAG_PAGENAME                1      char**
-TIFFTAG_PAGENUMBER              2      uint16*
-TIFFTAG_PHOTOMETRIC             1      uint16*
-TIFFTAG_PLANARCONFIG            1      uint16*
-TIFFTAG_PREDICTOR               1      uint16*
-TIFFTAG_PRIMARYCHROMATICITIES   1      float**           6-entry array
-TIFFTAG_REFERENCEBLACKWHITE     1      float**           2*SamplesPerPixel array
-TIFFTAG_RESOLUTIONUNIT          1      uint16*
-TIFFTAG_ROWSPERSTRIP            1      uint32*
-TIFFTAG_SAMPLEFORMAT            1      uint16*
-TIFFTAG_SAMPLESPERPIXEL         1      uint16*
-TIFFTAG_SMAXSAMPLEVALUE         1      double*
-TIFFTAG_SMINSAMPLEVALUE         1      double*
-TIFFTAG_SOFTWARE                1      char**
-TIFFTAG_STONITS                 1      double**
-TIFFTAG_STRIPBYTECOUNTS         1      uint32**
-TIFFTAG_STRIPOFFSETS            1      uint32**
-TIFFTAG_SUBFILETYPE             1      uint32*
-TIFFTAG_SUBIFD                  2      uint16*,uint32**  count & offsets array
-TIFFTAG_TARGETPRINTER           1      char**
-TIFFTAG_THRESHHOLDING           1      uint16*
-TIFFTAG_TILEBYTECOUNTS          1      uint32**
-TIFFTAG_TILEDEPTH               1      uint32*
-TIFFTAG_TILELENGTH              1      uint32*
-TIFFTAG_TILEOFFSETS             1      uint32**
-TIFFTAG_TILEWIDTH               1      uint32*
-TIFFTAG_TRANSFERFUNCTION        1 or 3 uint16**          1<<BitsPerSample entry arrays
-TIFFTAG_WHITEPOINT              1      float**           2-entry array
-TIFFTAG_XPOSITION               1      float*
-TIFFTAG_XRESOLUTION             1      float*
-TIFFTAG_YCBCRCOEFFICIENTS       1      float**           3-entry array
-TIFFTAG_YCBCRPOSITIONING        1      uint16*
-TIFFTAG_YCBCRSUBSAMPLING        2      uint16*
-TIFFTAG_YPOSITION               1      float*
-TIFFTAG_YRESOLUTION             1      float*
-TIFFTAG_ICCPROFILE              2      uint32*,void**    count, profile data
-</pre>If <i>SamplesPerPixel</i> is one, then a single array is returned; otherwise three arrays are returned.<br>
-The contents of this field are quite complex. See <i>The ICC Profile Format Specification</i>, Annex B.3 "Embedding ICC Profiles in TIFF Files" (available at http://www.color.org) for an explanation.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the tag is defined in the current
-directory; otherwise a 0 is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Unknown field, tag 0x%x</b>. An unknown tag was
-supplied.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFSetField</i>(3T), <i>TIFFSetDirectory</i>(3T),
-<i>TIFFReadDirectory</i>(3T),
-<i>TIFFWriteDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFOpen.3t.html b/tkimg1.3/libtiff/html/man/TIFFOpen.3t.html
deleted file mode 100644
index 200c258..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFOpen.3t.html
+++ /dev/null
@@ -1,389 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFOpen</title>
-</head>
-<body>
-
-<h1 align=center>TIFFOpen</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BYTE ORDER">BYTE ORDER</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:22 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFOpen, TIFFFdOpen, TIFFClientOpen - open a <small>TIFF</small> file for reading or writing</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-TIFF* TIFFOpen(const char* filename, const char* mode)
-
-TIFF* TIFFFdOpen(const int fd, const char* filename, const char* mode)
-
-typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
-typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
-typedef int (*TIFFCloseProc)(thandle_t);
-typedef toff_t (*TIFFSizeProc)(thandle_t);
-typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
-typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
-
-TIFF* TIFFClientOpen(const char* filename, const char* mode, thandle_t clientdata,
-    TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc,
-    TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc,
-    TIFFUnmapFileProc unmapproc)
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFOpen</i> opens a <small>TIFF</small> file whose name
-is <i>filename</i> and returns a handle to be used in
-subsequent calls to routines in <i>libtiff</i>. If the open
-operation fails, then zero is returned. The <i>mode</i>
-parameter specifies if the file is to be opened for reading
-(``r''), writing (``w''), or appending (``a'') and,
-optionally, whether to override certain default aspects of
-library operation (see below). When a file is opened for
-appending, existing data will not be touched; instead new
-data will be written as additional subfiles. If an existing
-file is opened for writing, all previous data is
-overwritten.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If a file is opened for reading, the first
-<small>TIFF</small> directory in the file is automatically
-read (also see <i>TIFFSetDirectory</i>(3T) for reading
-directories other than the first). If a file is opened for
-writing or appending, a default directory is automatically
-created for writing subsequent data. This directory has all
-the default values specified in <small>TIFF</small> Revision
-6.0: <i>BitsPerSample</i>=1, <i>ThreshHolding</i>=bilevel
-art scan, <i>FillOrder</i>=1 (most significant bit of each
-data byte is filled first), <i>Orientation</i>=1 (the 0th
-row represents the visual top of the image, and the 0th
-column represents the visual left hand side),
-<i>SamplesPerPixel</i>=1, <i>RowsPerStrip</i>=infinity,
-<i>ResolutionUnit</i>=2 (inches), and <i>Compression</i>=1
-(no compression). To alter these values, or to define values
-for additional fields, <i>TIFFSetField</i>(3T) must be
-used.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFFdOpen</i> is like <i>TIFFOpen</i> except that it
-opens a <small>TIFF</small> file given an open file
-descriptor <i>fd</i>. The file's name and mode must reflect
-that of the open descriptor. The object associated with the
-file descriptor <b>must support random
-access</b>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFClientOpen</i> is like <i>TIFFOpen</i> except that
-the caller supplies a collection of functions that the
-library will use to do <small>UNIX</small> -like I/O
-operations. The <i>readproc</i> and <i>writeproc</i> are
-called to read and write data at the current file position.
-<i>seekproc</i> is called to change the current file
-position a la <i>lseek</i>(2). <i>closeproc</i> is invoked
-to release any resources associated with an open file.
-<i>sizeproc</i> is invoked to obtain the size in bytes of a
-file. <i>mapproc</i> and <i>unmapproc</i> are called to map
-and unmap a file's contents in memory; c.f. <i>mmap</i>(2)
-and <i>munmap</i>(2). The <i>clientdata</i> parameter is an
-opaque ``handle'' passed to the client-specified routines
-passed as parameters to <i>TIFFClientOpen</i>.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The open mode parameter can include the following flags in
-addition to the ``r'', ``w'', and ``a'' flags. Note however
-that option flags must follow the read-write-append
-specification.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-When creating a new file force information be written with
-Little-Endian byte order (but see below). By default the
-library will create new files using the native
-<small>CPU</small> byte order.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>b</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-When creating a new file force information be written with
-Big-Endian byte order (but see below). By default the
-library will create new files using the native
-<small>CPU</small> byte order.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>L</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force image data that is read or written to be treated with
-bits filled from Least Significant Bit ( <small>LSB</small>
-) to Most Significant Bit ( <small>MSB</small> ). Note that
-this is the opposite to the way the library has worked from
-its inception.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>B</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force image data that is read or written to be treated with
-bits filled from Most Significant Bit ( <small>MSB</small> )
-to Least Significant Bit ( <small>LSB</small> ); this is the
-default.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>H</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force image data that is read or written to be treated with
-bits filled in the same order as the native
-<small>CPU.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>M</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable the use of memory-mapped files for images opened
-read-only. If the underlying system does not support
-memory-mapped files or if the specific image being opened
-cannot be memory-mapped then the library will fallback to
-using the normal system interface for reading information.
-By default the library will attempt to use memory-mapped
-files.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>m</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Disable the use of memory-mapped files.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>C</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable the use of ``strip chopping'' when reading images
-that are comprised of a single strip or tile of uncompressed
-data. Strip chopping is a mechanism by which the library
-will automatically convert the single-strip image to
-multiple strips, each of which has about 8 Kilobytes of
-data. This facility can be useful in reducing the amount of
-memory used to read an image because the library normally
-reads each strip in its entirety. Strip chopping does
-however alter the apparent contents of the image because
-when an image is divided into multiple strips it looks as
-though the underlying file contains multiple separate
-strips. Finally, note that default handling of strip
-chopping is a compile-time configuration parameter. The
-default behaviour, for backwards compatibility, is to enable
-strip chopping.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Disable the use of strip chopping when reading
-images.</td></table>
-<a name="BYTE ORDER"></a>
-<h2>BYTE ORDER</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <small>TIFF</small> specification (<b>all versions</b>)
-states that compliant readers <i>must be capable of reading
-images written in either byte order</i>. Nonetheless some
-software that claims to support the reading of
-<small>TIFF</small> images is incapable of reading images in
-anything but the native <small>CPU</small> byte order on
-which the software was written. (Especially notorious are
-applications written to run on Intel-based machines.) By
-default the library will create new files with the native
-byte-order of the <small>CPU</small> on which the
-application is run. This ensures optimal performance and is
-portable to any application that conforms to the TIFF
-specification. To force the library to use a specific
-byte-order when creating a new file the ``b'' and ``l''
-option flags may be included in the call to open a file; for
-example, ``wb'' or ``wl''.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Upon successful completion <i>TIFFOpen</i>,
-<i>TIFFFdOpen</i>, and <i>TIFFClientOpen</i> return a
-<small>TIFF</small> pointer. Otherwise, NULL is
-returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine. Likewise, warning messages are directed to the
-<i>TIFFWarning</i>(3T) routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>"%s": Bad mode</b>. The specified <i>mode</i>
-parameter was not one of ``r'' (read), ``w'' (write), or
-``a'' (append).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Cannot open</b>. <i>TIFFOpen</i>() was unable to open
-the specified filename for read/writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Cannot read TIFF header</b>. An error occurred while
-attempting to read the header information.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing TIFF header</b>. An error occurred while
-writing the default header information for a new
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Not a TIFF file, bad magic number %d (0x%x)</b>. The
-magic number in the header was not (hex) 0x4d4d or (hex)
-0x4949.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Not a TIFF file, bad version number %d (0x%x)</b>. The
-version field in the header was not 42
-(decimal).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Cannot append to file that has opposite byte
-ordering</b>. A file with a byte ordering opposite to the
-native byte ordering of the current machine was opened for
-appending (``a''). This is a limitation of the
-library.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFClose</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFPrintDirectory.3t.html b/tkimg1.3/libtiff/html/man/TIFFPrintDirectory.3t.html
deleted file mode 100644
index 49f3481..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFPrintDirectory.3t.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFPrintDirectory</title>
-</head>
-<body>
-
-<h1 align=center>TIFFPrintDirectory</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:22 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFPrintDirectory - print a description of a <small>TIFF</small> directory</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-void TIFFPrintDirectory(TIFF* tif, FILE* fd, long
-flags)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFPrintDirectory</i> prints a description of the
-current directory in the specified <small>TIFF</small> file
-to the standard I/O output stream <i>fd</i>. The
-<i>flags</i> parameter is used to control the <i>level of
-detail</i> of the printed information; it is a bit-or of the
-flags defined in <b>tiffio.h</b>:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-#define TIFFPRINT_NONE          0x0     /* no extra info */
-#define TIFFPRINT_STRIPS        0x1     /* strips/tiles info */
-#define TIFFPRINT_CURVES        0x2     /* color/gray response curves */
-#define TIFFPRINT_COLORMAP      0x4     /* colormap */
-#define TIFFPRINT_JPEGQTABLES   0x100   /* JPEG Q matrices */
-#define TIFFPRINT_JPEGACTABLES  0x200   /* JPEG AC tables */
-#define TIFFPRINT_JPEGDCTABLES  0x200   /* JPEG DC tables */
-</pre></td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-In C++ the <i>flags</i> parameter defaults to
-0.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadDirectory</i>(3T),
-<i>TIFFSetDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFRGBAImage.3t.html b/tkimg1.3/libtiff/html/man/TIFFRGBAImage.3t.html
deleted file mode 100644
index 125f5a0..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFRGBAImage.3t.html
+++ /dev/null
@@ -1,357 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFRGBAImage</title>
-</head>
-<body>
-
-<h1 align=center>TIFFRGBAImage</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#ALTERNATE RASTER FORMATS">ALTERNATE RASTER FORMATS</a><br>
-<a href="#SIMULTANEOUS RASTER STORE AND DISPLAY">SIMULTANEOUS RASTER STORE AND DISPLAY</a><br>
-<a href="#SUPPORTING ADDITIONAL TIFF FORMATS">SUPPORTING ADDITIONAL TIFF FORMATS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:26 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFRGBAImage - read and decode an image into a raster</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-typedef unsigned char TIFFRGBValue;
-typedef struct _TIFFRGBAImage TIFFRGBAImage;
-int TIFFRGBAImageOK(TIFF* tif, char emsg[1024]);
-int TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stopOnError, char emsg[1024]);
-int TIFFRGBAImageGet(TIFFRGBAImage* img, uint32* raster, uint32 width, uint32 height);
-void TIFFRGBAImageEnd(TIFFRGBAImage* img);
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The routines described here provide a high-level interface
-through which <small>TIFF</small> images may be read into
-memory. Images may be strip- or tile-based and have a
-variety of different characteristics: bits/sample,
-samples/pixel, photometric, etc. Decoding state is
-encapsulated in a <i>TIFFRGBAImage</i> structure making it
-possible to capture state for multiple images and quickly
-switch between them. The target raster format can be
-customized to a particular application's needs by installing
-custom routines that manipulate image data according to
-application requirements.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The default usage for these routines is: check if an image
-can be processed using <i>TIFFRGBAImageOK</i>, construct a
-decoder state block using <i>TIFFRGBAImageBegin</i>, read
-and decode an image into a target raster using
-<i>TIFFRGBAImageGet</i>, and then release resources using
-<i>TIFFRGBAImageEnd</i>. <i>TIFFRGBAImageGet</i> can be
-called multiple times to decode an image using different
-state parameters. If multiple images are to be displayed and
-there is not enough space for each of the decoded rasters,
-multiple state blocks can be managed and then calls can be
-made to <i>TIFFRGBAImageGet</i> as needed to display an
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The generated raster is assumed to be an array of
-<i>width</i> times <i>height</i> 32-bit entries, where
-<i>width</i> must be less than or equal to the width of the
-image (<i>height</i> may be any non-zero size). If the
-raster dimensions are smaller than the image, the image data
-is cropped to the raster bounds. If the raster height is
-greater than that of the image, then the image data are
-placed in the lower part of the raster. (Note that the
-raster is assume to be organized such that the pixel at
-location (<i>x</i>,<i>y</i>) is
-<i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the
-raster origin in the <b>lower-left</b> hand
-corner.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Raster pixels are 8-bit packed red, green, blue, alpha
-samples. The macros <i>TIFFGetR</i>, <i>TIFFGetG</i>,
-<i>TIFFGetB</i>, and <i>TIFFGetA</i> should be used to
-access individual samples. Images without Associated Alpha
-matting information have a constant Alpha of 1.0
-(255).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFRGBAImageGet</i> converts non-8-bit images by scaling
-sample values. Palette, grayscale, bilevel,
-<small>CMYK</small> , and YCbCr images are converted to
-<small>RGB</small> transparently. Raster pixels are returned
-uncorrected by any colorimetry information present in the
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The paramater <i>stopOnError</i> specifies how to act if an
-error is encountered while reading the image. If
-<i>stopOnError</i> is non-zero, then an error will terminate
-the operation; otherwise <i>TIFFRGBAImageGet</i> will
-continue processing data until all the possible data in the
-image have been requested.</td></table>
-<a name="ALTERNATE RASTER FORMATS"></a>
-<h2>ALTERNATE RASTER FORMATS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-To use the core support for reading and processing
-<small>TIFF</small> images, but write the resulting raster
-data in a different format one need only override the
-``<i>put methods</i>'' used to store raster data. These
-methods are are defined in the <i>TIFFRGBAImage</i>
-structure and initially setup by <i>TIFFRGBAImageBegin</i>
-to point to routines that pack raster data in the default
-<small>ABGR</small> pixel format. Two different routines are
-used according to the physical organization of the image
-data in the file: <i>PlanarConfiguration</i>=1 (packed
-samples), and <i>PlanarConfiguration</i>=2 (separated
-samples). Note that this mechanism can be used to transform
-the data before storing it in the raster. For example one
-can convert data to colormap indices for display on a
-colormap display.</td></table>
-<a name="SIMULTANEOUS RASTER STORE AND DISPLAY"></a>
-<h2>SIMULTANEOUS RASTER STORE AND DISPLAY</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-It is simple to display an image as it is being read into
-memory by overriding the put methods as described above for
-supporting alternate raster formats. Simply keep a reference
-to the default put methods setup by
-<i>TIFFRGBAImageBegin</i> and then invoke them before or
-after each display operation. For example, the
-<i>tiffgt</i>(1) utility uses the following put method to
-update the display as the raster is being
-filled:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-static void
-putContigAndDraw(TIFFRGBAImage* img, uint32* raster,
-    uint32 x, uint32 y, uint32 w, uint32 h,
-    int32 fromskew, int32 toskew,
-    unsigned char* cp)
-{
-    (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp);
-    if (x+w == width) {
-     w = width;
-     if (img->orientation == ORIENTATION_TOPLEFT)
-         lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w);
-     else
-         lrectwrite(0, y, w-1, y+h-1, raster);
-    }
-}
-</pre>(the original routine provided by the library is saved in the variable <i>putContig</i>.)</td></table>
-<a name="SUPPORTING ADDITIONAL TIFF FORMATS"></a>
-<h2>SUPPORTING ADDITIONAL TIFF FORMATS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>TIFFRGBAImage</i> routines support the most commonly
-encountered flavors of <small>TIFF.</small> It is possible
-to extend this support by overriding the ``<i>get
-method</i>'' invoked by <i>TIFFRGBAImageGet</i> to read
-<small>TIFF</small> image data. Details of doing this are a
-bit involved, it is best to make a copy of an existing get
-method and modify it to suit the needs of an
-application.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric
-samples/pixel must be either 1, 3, or 4 (i.e.
-<i>SamplesPerPixel</i> minus
-<i>ExtraSamples</i>).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Palettte image colormaps that appear to be incorrectly
-written as 8-bit values are automatically scaled to
-16-bits.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All routines return 1 if the operation was successful.
-Otherwise, 0 is returned if an error was encountered and
-<i>stopOnError</i> is zero.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-bit pictures</b>. The image had
-<i>BitsPerSample</i> other than 1, 2, 4, 8, or
-16.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-channel images</b>. The image
-had <i>SamplesPerPixel</i> other than 1, 3, or
-4.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing needed "PhotometricInterpretation"
-tag</b>. The image did not have a tag that describes how to
-display the data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-RGB</b>. The image was missing a tag that describes how to
-display it, but because it has 3 or 4 samples/pixel, it is
-assumed to be <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-min-is-black</b>. The image was missing a tag that describes
-how to display it, but because it has 1 sample/pixel, it is
-assumed to be a grayscale or bilevel image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for photometric conversion table</b>. There was
-insufficient memory for a table used to convert image
-samples to 8-bit <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing required "Colormap" tag</b>. A Palette
-image did not have a required <i>Colormap</i>
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for tile buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for strip buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not handle format</b>. The image has a format
-(combination of <i>BitsPerSample</i>,
-<i>SamplesPerPixel</i>, and
-<i>PhotometricInterpretation</i>) that can not be
-handled.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for B&W mapping table</b>. There was
-insufficient memory to allocate a table used to map
-grayscale data to <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for Palette mapping table</b>. There was
-insufficient memory to allocate a table used to map data to
-8-bit <small>RGB.</small></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadRGBAImage</i>(3T),
-<i>TIFFReadRGBAImageOriented</i>(3T),
-<i>TIFFReadRGBAStrip</i>(3T),
-<i>TIFFReadRGBATile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadDirectory.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadDirectory.3t.html
deleted file mode 100644
index 5d71808..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadDirectory.3t.html
+++ /dev/null
@@ -1,251 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadDirectory</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadDirectory</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:23 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadDirectory - get the contents of the next directory in an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFReadDirectory(TIFF* tif)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the next directory in the specified file and make it
-the current directory. Applications only need to call
-<i>TIFFReadDirectory</i> to read multiple subfiles in a
-single <small>TIFF</small> file-- the first directory in a
-file is automatically read when <i>TIFFOpen</i> is
-called.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the library is compiled with
-<small>STRIPCHOP_SUPPORT</small> enabled, then images that
-have a single uncompressed strip or tile of data are
-automatically treated as if they were made up of multiple
-strips or tiles of approximately 8 kilobytes each. This
-operation is done only in-memory; it does not alter the
-contents of the file. However, the construction of the
-``chopped strips'' is visible to the application through the
-number of strips [tiles] returned by
-<i>TIFFNumberOfStrips</i>
-[<i>TIFFNumberOfTiles</i>].</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the next directory was successfully read, 1 is returned.
-Otherwise, 0 is returned if an error was encountered, or if
-there are no more directories to be read.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine. All warning messages are directed to the
-<i>TIFFWarning</i>(3T) routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Seek error accessing TIFF directory</b>. An error
-occurred while positioning to the location of the
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Wrong data type %d for field "%s"</b>. The tag
-entry in the directory had an incorrect data type. For
-example, an <i>ImageDescription</i> tag with a
-<small>SHORT</small> data type.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing required "%s"
-field</b>. The specified tag is required to be present by
-the <small>TIFF</small> 5.0 specification, but is missing.
-The directory is (usually) unusable.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Rational with zero denominator</b>. A directory tag
-has a <small>RATIONAL</small> value whose denominator is
-zero.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Incorrect count %d for field "%s" (%lu,
-expecting %lu); tag ignored</b>. The specified tag's count
-field is bad. For example, a count other than 1 for a
-<i>SubFileType</i> tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Cannot handle different per-sample values for field
-"%s"</b>. The tag has <i>SamplesPerPixel</i>
-values and they are not all the same; e.g.
-<i>BitsPerSample</i>. The library is unable to handle images
-of this sort.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Count mismatch for field "%s"; expecting %d,
-got %d</b>. The count field in a tag does not agree with the
-number expected by the library. This should never happen, so
-if it does, the library refuses to read the
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Invalid TIFF directory; tags are not sorted in ascending
-order</b>. The directory tags are not properly sorted as
-specified in the <small>TIFF</small> 5.0 specification. This
-error is not fatal.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Ignoring unknown field with tag %d (0x%x)</b>. An unknown
-tag was encountered in the directory; the library ignores
-all such tags.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing requred "ImageLength"
-field</b>. The image violates the specification by not
-having a necessary field. There is no way for the library to
-recover from this error.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing requred
-"PlanarConfig" field</b>. The image violates the
-specification by not having a necessary field. There is no
-way for the library to recover from this error.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing requred
-"StripOffsets" field</b>. The image has multiple
-strips, but is missing the tag that specifies the file
-offset to each strip of data. There is no way for the
-library to recover from this error.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing requred "TileOffsets"
-field</b>. The image has multiple tiles, but is missing the
-tag that specifies the file offset to each tile of data.
-There is no way for the library to recover from this
-error.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing required
-"StripByteCounts" field</b>. The image has
-multiple strips, but is missing the tag that specifies the
-size of each strip of data. There is no way for the library
-to recover from this error.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFF directory is missing required
-"StripByteCounts" field, calculating from
-imagelength</b>. The image violates the specification by not
-having a necessary field. However, when the image is
-comprised of only one strip or tile, the library will
-estimate the missing value based on the file
-size.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Bogus "StripByteCounts" field, ignoring and
-calculating from imagelength</b>. Certain vendors violate
-the specification by writing zero for the StripByteCounts
-tag when they want to leave the value unspecified. If the
-image has a single strip, the library will estimate the
-missing value based on the file size.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteDirectory</i>(3T), <i>TIFFSetDirectory</i>(3T),
-<i>TIFFSetSubDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadEncodedStrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadEncodedStrip.3t.html
deleted file mode 100644
index f247115..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadEncodedStrip.3t.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadEncodedStrip</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadEncodedStrip</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:23 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadEncodedStrip - read and decode a strip of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip,
-tdata_t buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the specified strip of data and place up to <i>size</i>
-bytes of decompressed information in the (user supplied)
-data buffer.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The value of <i>strip</i> is a ``raw strip number.'' That
-is, the caller must take into account whether or not the
-data are organized in separate planes
-(<i>PlanarConfiguration</i>=2). To read a full strip of data
-the data buffer should typically be at least as large as the
-number returned by <i>TIFFStripSize</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library attempts to hide bit- and byte-ordering
-differences between the image and the native machine by
-converting data to the native machine order. Bit reversal is
-done if the <i>FillOrder</i> tag is opposite to the native
-machine bit order. 16- and 32-bit samples are automatically
-byte-swapped if the file was written with a byte order
-opposite to the native machine byte order,</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The actual number of bytes of data that were placed in
-<i>buf</i> is returned; <i>TIFFReadEncodedStrip</i> returns
--1 if an error was encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadRawStrip</i>(3T),
-<i>TIFFReadScanline</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadEncodedTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadEncodedTile.3t.html
deleted file mode 100644
index c05279b..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadEncodedTile.3t.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadEncodedTile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadEncodedTile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:23 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadEncodedTile - read and decode a tile of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFReadEncodedTile(TIFF* tif, u_long tile, u_char* buf,
-u_long size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the specified tile of data and place up to <i>size</i>
-bytes of decompressed information in the (user supplied)
-data buffer.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The value of <i>tile</i> is a ``raw tile number.'' That is,
-the caller must take into account whether or not the data
-are organized in separate planes
-(<i>PlanarConfiguration</i>=2). <i>TIFFComputeTile</i>
-automatically does this when converting an (x,y,z,sample)
-coordinate quadruple to a tile number. To read a full tile
-of data the data buffer should be at least as large as the
-value returned by <i>TIFFTileSize</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library attempts to hide bit- and byte-ordering
-differences between the image and the native machine by
-converting data to the native machine order. Bit reversal is
-done if the <i>FillOrder</i> tag is opposite to the native
-machine bit order. 16- and 32-bit samples are automatically
-byte-swapped if the file was written with a byte order
-opposite to the native machine byte order,</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The actual number of bytes of data that were placed in
-<i>buf</i> is returned; <i>TIFFReadEncodedTile</i> returns
--1 if an error was encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadRawTile</i>(3T),
-<i>TIFFReadTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadRGBAImage.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadRGBAImage.3t.html
deleted file mode 100644
index 6ec1491..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadRGBAImage.3t.html
+++ /dev/null
@@ -1,340 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadRGBAImage</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadRGBAImage</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:24 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadRGBAImage - read and decode an image into a fixed-format raster</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#define TIFFGetR(abgr) ((abgr) & 0xff)<br>
-#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)<br>
-#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)<br>
-#define TIFFGetA(abgr) (((abgr) >> 24) &
-0xff)</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>int TIFFReadRGBAImage(TIFF *</b><i>tif</i><b>, u_long</b>
-<i>width</i><b>, u_long</b> <i>height</i><b>, u_long
-*</b><i>raster</i><b>, int</b> <i>stopOnError</i><b>)<br>
-int TIFFReadRGBAImageOriented(TIFF *</b><i>tif</i><b>,
-u_long</b> <i>width</i><b>, u_long</b> <i>height</i><b>,
-u_long *</b><i>raster</i><b>, int</b> <i>orientation</i><b>,
-int</b> <i>stopOnError</i><b>)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAImage</i> reads a strip- or tile-based image
-into memory, storing the result in the user supplied
-<i>raster</i>. The raster is assumed to be an array of
-<i>width</i> times <i>height</i> 32-bit entries, where
-<i>width</i> must be less than or equal to the width of the
-image (<i>height</i> may be any non-zero size). If the
-raster dimensions are smaller than the image, the image data
-is cropped to the raster bounds. If the raster height is
-greater than that of the image, then the image data are
-placed in the lower part of the raster. (Note that the
-raster is assume to be organized such that the pixel at
-location (<i>x</i>,<i>y</i>) is
-<i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the
-raster origin in the lower-left hand corner.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAImageOriented</i> works like
-<i>TIFFReadRGBAImage</i> with except of that user can
-specify the raster origin position with the
-<i>orientation</i> parameter. Four orientations
-supported:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ORIENTATION_TOPLEFT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-origin in top-left corner,</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ORIENTATION_TOPRIGHT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-origin in top-right corner,</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ORIENTATION_BOTLEFT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-origin in bottom-left corner and</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ORIENTATION_BOTRIGHT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-origin in bottom-right corner.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If you choose <b>ORIENTATION_BOTLEFT</b> result will be the
-same as returned by the
-<i>TIFFReadRGBAImage.</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Raster pixels are 8-bit packed red, green, blue, alpha
-samples. The macros <i>TIFFGetR</i>, <i>TIFFGetG</i>,
-<i>TIFFGetB</i>, and <i>TIFFGetA</i> should be used to
-access individual samples. Images without Associated Alpha
-matting information have a constant Alpha of 1.0
-(255).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAImage</i> converts non-8-bit images by
-scaling sample values. Palette, grayscale, bilevel,
-<small>CMYK</small> , and YCbCr images are converted to
-<small>RGB</small> transparently. Raster pixels are returned
-uncorrected by any colorimetry information present in the
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The paramater <i>stopOnError</i> specifies how to act if an
-error is encountered while reading the image. If
-<i>stopOnError</i> is non-zero, then an error will terminate
-the operation; otherwise <i>TIFFReadRGBAImage</i> will
-continue processing data until all the possible data in the
-image have been requested.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-In C++ the <i>stopOnError</i> parameter defaults to
-0.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric
-samples/pixel must be either 1, 3, or 4 (i.e.
-<i>SamplesPerPixel</i> minus
-<i>ExtraSamples</i>).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Palettte image colormaps that appear to be incorrectly
-written as 8-bit values are automatically scaled to
-16-bits.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAImage</i> is just a wrapper around the more
-general <i>TIFFRGBAImage</i>(3T) facilities.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the image was successfully read and
-converted. Otherwise, 0 is returned if an error was
-encountered and <i>stopOnError</i> is zero.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-bit pictures</b>. The image had
-<i>BitsPerSample</i> other than 1, 2, 4, 8, or
-16.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-channel images</b>. The image
-had <i>SamplesPerPixel</i> other than 1, 3, or
-4.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing needed "PhotometricInterpretation"
-tag</b>. The image did not have a tag that describes how to
-display the data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-RGB</b>. The image was missing a tag that describes how to
-display it, but because it has 3 or 4 samples/pixel, it is
-assumed to be <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-min-is-black</b>. The image was missing a tag that describes
-how to display it, but because it has 1 sample/pixel, it is
-assumed to be a grayscale or bilevel image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for photometric conversion table</b>. There was
-insufficient memory for a table used to convert image
-samples to 8-bit <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing required "Colormap" tag</b>. A Palette
-image did not have a required <i>Colormap</i>
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for tile buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for strip buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not handle format</b>. The image has a format
-(combination of <i>BitsPerSample</i>,
-<i>SamplesPerPixel</i>, and
-<i>PhotometricInterpretation</i>) that
-<i>TIFFReadRGBAImage</i> can not handle.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for B&W mapping table</b>. There was
-insufficient memory to allocate a table used to map
-grayscale data to <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for Palette mapping table</b>. There was
-insufficient memory to allocate a table used to map data to
-8-bit <small>RGB.</small></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFRGBAImage</i>(3T), <i>TIFFReadRGBAStrip</i>(3T),
-<i>TIFFReadRGBATile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadRGBAStrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadRGBAStrip.3t.html
deleted file mode 100644
index 0bda6e7..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadRGBAStrip.3t.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadRGBAStrip</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadRGBAStrip</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:24 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadRGBAStrip - read and decode an image strip into a fixed-format raster</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-
-#define TIFFGetR(abgr)   ((abgr) & 0xff)
-#define TIFFGetG(abgr)   (((abgr) >> 8) & 0xff)
-#define TIFFGetB(abgr)   (((abgr) >> 16) & 0xff)
-#define TIFFGetA(abgr)   (((abgr) >> 24) & 0xff)
-
-int TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAStrip</i> reads a single strip of a
-strip-based image into memory, storing the result in the
-user supplied RGBA <i>raster</i>. The raster is assumed to
-be an array of width times rowsperstrip 32-bit entries,
-where width is the width of the image (TIFFTAG_IMAGEWIDTH)
-and rowsperstrip is the maximum lines in a strip
-(TIFFTAG_ROWSPERSTRIP).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>row</i> value should be the row of the first row in
-the strip (strip * rowsperstrip, zero based).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Note that the raster is assume to be organized such that the
-pixel at location (<i>x</i>,<i>y</i>) is
-<i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the
-raster origin in the <i>lower-left hand corner</i> of the
-strip. That is bottom to top organization. When reading a
-partial last strip in the file the last line of the image
-will begin at the beginning of the buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Raster pixels are 8-bit packed red, green, blue, alpha
-samples. The macros <i>TIFFGetR</i>, <i>TIFFGetG</i>,
-<i>TIFFGetB</i>, and <i>TIFFGetA</i> should be used to
-access individual samples. Images without Associated Alpha
-matting information have a constant Alpha of 1.0
-(255).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-See the <i>TIFFRGBAImage</i>(3T) page for more details on
-how various image types are converted to RGBA
-values.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric
-samples/pixel must be either 1, 3, or 4 (i.e.
-<i>SamplesPerPixel</i> minus
-<i>ExtraSamples</i>).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Palette image colormaps that appear to be incorrectly
-written as 8-bit values are automatically scaled to
-16-bits.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBAStrip</i> is just a wrapper around the more
-general <i>TIFFRGBAImage</i>(3T) facilities. It's main
-advantage over the similar <i>TIFFReadRGBAImage()</i>
-function is that for large images a single buffer capable of
-holding the whole image doesn't need to be allocated, only
-enough for one strip. The <i>TIFFReadRGBATile()</i> function
-does a similar operation for tiled images.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the image was successfully read and
-converted. Otherwise, 0 is returned if an error was
-encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-bit pictures</b>. The image had
-<i>BitsPerSample</i> other than 1, 2, 4, 8, or
-16.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-channel images</b>. The image
-had <i>SamplesPerPixel</i> other than 1, 3, or
-4.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing needed "PhotometricInterpretation"
-tag</b>. The image did not have a tag that describes how to
-display the data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-RGB</b>. The image was missing a tag that describes how to
-display it, but because it has 3 or 4 samples/pixel, it is
-assumed to be <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-min-is-black</b>. The image was missing a tag that describes
-how to display it, but because it has 1 sample/pixel, it is
-assumed to be a grayscale or bilevel image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for photometric conversion table</b>. There was
-insufficient memory for a table used to convert image
-samples to 8-bit <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing required "Colormap" tag</b>. A Palette
-image did not have a required <i>Colormap</i>
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for tile buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for strip buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not handle format</b>. The image has a format
-(combination of <i>BitsPerSample</i>,
-<i>SamplesPerPixel</i>, and
-<i>PhotometricInterpretation</i>) that
-<i>TIFFReadRGBAImage</i> can not handle.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for B&W mapping table</b>. There was
-insufficient memory to allocate a table used to map
-grayscale data to <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for Palette mapping table</b>. There was
-insufficient memory to allocate a table used to map data to
-8-bit <small>RGB.</small></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFRGBAImage</i>(3T), <i>TIFFReadRGBAImage</i>(3T),
-<i>TIFFReadRGBATile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadRGBATile.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadRGBATile.3t.html
deleted file mode 100644
index 2f6b54e..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadRGBATile.3t.html
+++ /dev/null
@@ -1,257 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadRGBATile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadRGBATile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:25 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadRGBATile - read and decode an image tile into a fixed-format raster</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-
-#define TIFFGetR(abgr)   ((abgr) & 0xff)
-#define TIFFGetG(abgr)   (((abgr) >> 8) & 0xff)
-#define TIFFGetB(abgr)   (((abgr) >> 16) & 0xff)
-#define TIFFGetA(abgr)   (((abgr) >> 24) & 0xff)
-
-int TIFFReadRGBATile(TIFF* tif, uint32 x, uint32 y, uint32 * raster )
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBATile</i> reads a single tile of a tile-based
-image into memory, storing the result in the user supplied
-RGBA <i>raster</i>. The raster is assumed to be an array of
-width times length 32-bit entries, where width is the width
-of a tile (TIFFTAG_TILEWIDTH) and length is the height of a
-tile (TIFFTAG_TILELENGTH).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>x</i> and <i>y</i> values are the offsets from the
-top left corner to the top left corner of the tile to be
-read. They must be an exact multiple of the tile width and
-length.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Note that the raster is assume to be organized such that the
-pixel at location (<i>x</i>,<i>y</i>) is
-<i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the
-raster origin in the <i>lower-left hand corner</i> of the
-tile. That is bottom to top organization. Edge tiles which
-partly fall off the image will be filled out with
-appropriate zeroed areas.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Raster pixels are 8-bit packed red, green, blue, alpha
-samples. The macros <i>TIFFGetR</i>, <i>TIFFGetG</i>,
-<i>TIFFGetB</i>, and <i>TIFFGetA</i> should be used to
-access individual samples. Images without Associated Alpha
-matting information have a constant Alpha of 1.0
-(255).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-See the <i>TIFFRGBAImage</i>(3T) page for more details on
-how various image types are converted to RGBA
-values.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric
-samples/pixel must be either 1, 3, or 4 (i.e.
-<i>SamplesPerPixel</i> minus
-<i>ExtraSamples</i>).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Palette image colormaps that appear to be incorrectly
-written as 8-bit values are automatically scaled to
-16-bits.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadRGBATile</i> is just a wrapper around the more
-general <i>TIFFRGBAImage</i>(3T) facilities. It's main
-advantage over the similar <i>TIFFReadRGBAImage()</i>
-function is that for large images a single buffer capable of
-holding the whole image doesn't need to be allocated, only
-enough for one tile. The <i>TIFFReadRGBAStrip()</i> function
-does a similar operation for stripped images.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the image was successfully read and
-converted. Otherwise, 0 is returned if an error was
-encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-bit pictures</b>. The image had
-<i>BitsPerSample</i> other than 1, 2, 4, 8, or
-16.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Sorry, can not handle %d-channel images</b>. The image
-had <i>SamplesPerPixel</i> other than 1, 3, or
-4.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing needed "PhotometricInterpretation"
-tag</b>. The image did not have a tag that describes how to
-display the data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-RGB</b>. The image was missing a tag that describes how to
-display it, but because it has 3 or 4 samples/pixel, it is
-assumed to be <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No "PhotometricInterpretation" tag, assuming
-min-is-black</b>. The image was missing a tag that describes
-how to display it, but because it has 1 sample/pixel, it is
-assumed to be a grayscale or bilevel image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for photometric conversion table</b>. There was
-insufficient memory for a table used to convert image
-samples to 8-bit <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Missing required "Colormap" tag</b>. A Palette
-image did not have a required <i>Colormap</i>
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for tile buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for strip buffer</b>. There was insufficient
-memory to allocate an i/o buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not handle format</b>. The image has a format
-(combination of <i>BitsPerSample</i>,
-<i>SamplesPerPixel</i>, and
-<i>PhotometricInterpretation</i>) that
-<i>TIFFReadRGBAImage</i> can not handle.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for B&W mapping table</b>. There was
-insufficient memory to allocate a table used to map
-grayscale data to <small>RGB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space for Palette mapping table</b>. There was
-insufficient memory to allocate a table used to map data to
-8-bit <small>RGB.</small></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFRGBAImage</i>(3T), <i>TIFFReadRGBAImage</i>(3T),
-<i>TIFFReadRGBAStrip</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadRawStrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadRawStrip.3t.html
deleted file mode 100644
index cd3b08b..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadRawStrip.3t.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadRawStrip</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadRawStrip</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:24 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadRawStrip - return the undecoded contents of a strip of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t
-buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the contents of the specified strip into the (user
-supplied) data buffer. Note that the value of <i>strip</i>
-is a ``raw strip number.'' That is, the caller must take
-into account whether or not the data is organized in
-separate planes (<i>PlanarConfiguration</i>=2). To read a
-full strip of data the data buffer should typically be at
-least as large as the number returned by
-<i>TIFFStripSize</i>.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The actual number of bytes of data that were placed in
-<i>buf</i> is returned; <i>TIFFReadEncodedStrip</i> returns
--1 if an error was encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadEncodedStrip</i>(3T),
-<i>TIFFReadScanline</i>(3T),
-<i>TIFFStripSize</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadRawTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadRawTile.3t.html
deleted file mode 100644
index e47baaf..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadRawTile.3t.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadRawTile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadRawTile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:24 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadRawTile - return an undecoded tile of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t
-buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the contents of the specified tile into the (user
-supplied) data buffer. Note that the value of <i>tile</i> is
-a ``raw tile number.'' That is, the caller must take into
-account whether or not the data is organized in separate
-planes (<i>PlanarConfiguration</i>=2).
-<i>TIFFComputeTile</i> automatically does this when
-converting an (x,y,z,sample) coordinate quadruple to a tile
-number. To read a full tile of data the data buffer should
-typically be at least as large as the value returned by
-<i>TIFFTileSize</i>.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The actual number of bytes of data that were placed in
-<i>buf</i> is returned; <i>TIFFReadEncodedTile</i> returns
--1 if an error was encountered.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadEncodedTile</i>(3T), <i>TIFFReadTile</i>(3T),
-<i>TIFFTileSize</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadScanline.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadScanline.3t.html
deleted file mode 100644
index 3b1c8b6..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadScanline.3t.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadScanline</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadScanline</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:25 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadScanline - read and decode a scanline of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row,
-tsample_t sample)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Read the data for the specified row into the (user supplied)
-data buffer <i>buf</i>. The data are returned decompressed
-and, in the native byte- and bit-ordering, but are otherwise
-packed (see further below). The buffer must be large enough
-to hold an entire scanline of data. Applications should call
-the routine <i>TIFFScanlineSize</i> to find out the size (in
-bytes) of a scanline buffer. The <i>row</i> parameter is
-always used by <i>TIFFReadScanline</i>; the <i>sample</i>
-parameter is used only if data are organized in separate
-planes (<i>PlanarConfiguration</i>=2).</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library attempts to hide bit- and byte-ordering
-differences between the image and the native machine by
-converting data to the native machine order. Bit reversal is
-done if the <i>FillOrder</i> tag is opposite to the native
-machine bit order. 16- and 32-bit samples are automatically
-byte-swapped if the file was written with a byte order
-opposite to the native machine byte order,</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-In C++ the <i>sample</i> parameter defaults to
-0.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadScanline</i> returns -1 if it detects an error;
-otherwise 1 is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Compression algorithm does not support random access</b>.
-Data was requested in a non-sequential order from a file
-that uses a compression algorithm and that has
-<i>RowsPerStrip</i> greater than one. That is, data in the
-image is stored in a compressed form, and with multiple rows
-packed into a strip. In this case, the library does not
-support random access to the data. The data should either be
-accessed sequentially, or the file should be converted so
-that each strip is made up of one row of data.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Reading subsampled YCbCR data does not work correctly
-because, for <i>PlanarConfiguration</i>=2 the size of a
-scanline is not calculated on a per-sample basis, and for
-<i>PlanarConfiguration</i>=1 the library does not unpack the
-block-interleaved samples; use the strip- and tile-based
-interfaces to read these formats.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadEncodedStrip</i>(3T),
-<i>TIFFReadRawStrip</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFReadTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFReadTile.3t.html
deleted file mode 100644
index 7c3e388..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFReadTile.3t.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFReadTile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFReadTile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:25 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadTile - read and decode a tile of data from an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFReadTile(TIFF* tif, tdata_t buf, uint32 x,
-uint32 y, uint32 z, tsample_t sample)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Return the data for the tile <i>containing</i> the specified
-coordinates. The data placed in <i>buf</i> are returned
-decompressed and, typically, in the native byte- and
-bit-ordering, but are otherwise packed (see further below).
-The buffer must be large enough to hold an entire tile of
-data. Applications should call the routine
-<i>TIFFTileSize</i> to find out the size (in bytes) of a
-tile buffer. The <i>x</i> and <i>y</i> parameters are always
-used by <i>TIFFReadTile</i>. The <i>z</i> parameter is used
-if the image is deeper than 1 slice
-(<i>ImageDepth</i>>1). The <i>sample</i> parameter is
-used only if data are organized in separate planes
-(<i>PlanarConfiguration</i>=2).</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library attempts to hide bit- and byte-ordering
-differences between the image and the native machine by
-converting data to the native machine order. Bit reversal is
-done if the <i>FillOrder</i> tag is opposite to the native
-machine bit order. 16- and 32-bit samples are automatically
-byte-swapped if the file was written with a byte order
-opposite to the native machine byte order,</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadTile</i> returns -1 if it detects an error;
-otherwise the number of bytes in the decoded tile is
-returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFCheckTile</i>(3T),
-<i>TIFFComputeTile</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadEncodedTile</i>(3T),
-<i>TIFFReadRawTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFSetDirectory.3t.html b/tkimg1.3/libtiff/html/man/TIFFSetDirectory.3t.html
deleted file mode 100644
index 22c009e..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFSetDirectory.3t.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSetDirectory</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSetDirectory</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:26 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFSetDirectory, TIFFSetSubDirectory - set the current directory for an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFSetDirectory(TIFF* tif, tdir_t dirnum)<br>
-int TIFFSetSubDirectory(TIFF* tif, uint32
-diroff)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSetDirectory</i> changes the current directory and
-reads its contents with <i>TIFFReadDirectory</i>. The
-parameter <i>dirnum</i> specifies the subfile/directory as
-an integer number, with the first directory numbered
-zero.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSetSubDirectory</i> acts like
-<i>TIFFSetDirectory</i>, except the directory is specified
-as a file offset instead of an index; this is required for
-accessing subdirectories linked through a <i>SubIFD</i>
-tag.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-On successful return 1 is returned. Otherwise, 0 is returned
-if <i>dirnum</i> or <i>diroff</i> specifies a non-existent
-directory, or if an error was encountered while reading the
-directory's contents.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Error fetching directory count</b>. An error was
-encountered while reading the ``directory count''
-field.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Error fetching directory link</b>. An error was
-encountered while reading the ``link value'' that points to
-the next directory in a file.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFCurrentDirectory</i>(3T),
-<i>TIFFOpen</i>(3T), <i>TIFFReadDirectory</i>(3T),
-<i>TIFFWriteDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFSetField.3t.html b/tkimg1.3/libtiff/html/man/TIFFSetField.3t.html
deleted file mode 100644
index ceb943d..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFSetField.3t.html
+++ /dev/null
@@ -1,227 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSetField</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSetField</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:26 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFSetField - set the value(s) of a tag in a <small>TIFF</small> file open for writing</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFSetField(TIFF* tif, ttag_t tag, ...)<br>
-#include <stdarg.h><br>
-int TIFFVSetField(TIFF* tif, ttag_t tag, va_list
-ap)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSetField</i> sets the value of a field or pseudo-tag
-in the current directory associated with the open
-<small>TIFF</small> file <i>tif</i>. (A <i>pseudo-tag</i> is
-a parameter that is used to control the operation of the
-<small>TIFF</small> library but whose value is not read or
-written to the underlying file.) To set the value of a field
-the file must have been previously opened for writing with
-<i>TIFFOpen</i>(3T); pseudo-tags can be set whether the file
-was opened for reading or writing. The field is identified
-by <i>tag</i>, one of the values defined in the include file
-<b>tiff.h</b> (see also the table below). The actual value
-is specified using a variable argument list, as prescribed
-by the <i>stdarg</i>(3) interface (or, on some machines, the
-<i>varargs</i>(3) interface.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFVSetField</i> is functionally equivalent to
-<i>TIFFSetField</i> except that it takes a pointer to a
-variable argument list. <i>TIFFVSetField</i> is useful for
-writing routines that are layered on top of the
-functionality provided by <i>TIFFSetField</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The tags understood by <i>libtiff</i>, the number of
-parameter values, and the expected types for the parameter
-values are shown below. The data types are: <i>char*</i> is
-null-terminated string and corresponds to the
-<small>ASCII</small> data type; <i>uint16</i> is an unsigned
-16-bit value; <i>uint32</i> is an unsigned 32-bit value;
-<i>uint16*</i> is an array of unsigned 16-bit values.
-<i>void*</i> is an array of data values of unspecified
-type.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Consult the <small>TIFF</small> specification for
-information on the meaning of each tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-<i>Tag Name                        Count  Types             Notes
-
-</i>TIFFTAG_ARTIST                  1      char*
-TIFFTAG_BADFAXLINES             1      uint32
-TIFFTAG_BITSPERSAMPLE           1      uint16
-TIFFTAG_CLEANFAXDATA            1      uint16
-TIFFTAG_COLORMAP                3      uint16*           1<<BitsPerSample arrays
-TIFFTAG_COMPRESSION             1      uint16
-TIFFTAG_CONSECUTIVEBADFAXLINES  1      uint32
-TIFFTAG_COPYRIGHT               1      char*
-TIFFTAG_DATETIME                1      char*
-TIFFTAG_DOCUMENTNAME            1      char*
-TIFFTAG_DOTRANGE                2      uint16
-TIFFTAG_EXTRASAMPLES            2      uint16,uint16*     count & types array
-TIFFTAG_FAXMODE                 1      int                G3/G4 compression pseudo-tag
-TIFFTAG_FAXFILLFUNC             1      TIFFFaxFillFunc   G3/G4 compression pseudo-tag
-TIFFTAG_FILLORDER               1      uint16
-TIFFTAG_GROUP3OPTIONS           1      uint32
-TIFFTAG_GROUP4OPTIONS           1      uint32
-TIFFTAG_HALFTONEHINTS           2      uint16
-TIFFTAG_HOSTCOMPUTER            1      char*
-TIFFTAG_IMAGEDESCRIPTION        1      char*
-TIFFTAG_IMAGEDEPTH              1      uint32
-TIFFTAG_IMAGELENGTH             1      uint32
-TIFFTAG_IMAGEWIDTH              1      uint32
-TIFFTAG_INKNAMES                1      char*
-TIFFTAG_INKSET                  1      uint16
-TIFFTAG_JPEGTABLES              2      uint32*,void*      count & tables
-TIFFTAG_JPEGQUALITY             1      int               JPEG pseudo-tag
-TIFFTAG_JPEGCOLORMODE           1      int                JPEG pseudo-tag
-TIFFTAG_JPEGTABLESMODE          1      int                JPEG pseudo-tag
-TIFFTAG_MAKE                    1      char*
-TIFFTAG_MATTEING                1      uint16
-TIFFTAG_MAXSAMPLEVALUE          1      uint16
-TIFFTAG_MINSAMPLEVALUE          1      uint16
-TIFFTAG_MODEL                   1      char*
-TIFFTAG_ORIENTATION             1      uint16
-TIFFTAG_PAGENAME                1      char*
-TIFFTAG_PAGENUMBER              2      uint16
-TIFFTAG_PHOTOMETRIC             1      uint16
-TIFFTAG_PLANARCONFIG            1      uint16
-TIFFTAG_PREDICTOR               1      uint16
-TIFFTAG_PRIMARYCHROMATICITIES   1      float*            6-entry array
-TIFFTAG_REFERENCEBLACKWHITE     1      float*             2*SamplesPerPixel array
-TIFFTAG_RESOLUTIONUNIT          1      uint16
-TIFFTAG_ROWSPERSTRIP            1      uint32             must be > 0
-TIFFTAG_SAMPLEFORMAT            1      uint16
-TIFFTAG_SAMPLESPERPIXEL         1      uint16             value must be <= 4
-TIFFTAG_SMAXSAMPLEVALUE         1      double
-TIFFTAG_SMINSAMPLEVALUE         1      double
-TIFFTAG_SOFTWARE                1      char*
-TIFFTAG_STONITS                 1      double
-TIFFTAG_SUBFILETYPE             1      uint32
-TIFFTAG_SUBIFD                  2      uint16,uint32*    count & offsets array
-TIFFTAG_TARGETPRINTER           1      char*
-TIFFTAG_THRESHHOLDING           1      uint16
-TIFFTAG_TILEDEPTH               1      uint32
-TIFFTAG_TILELENGTH              1      uint32             must be a multiple of 8
-TIFFTAG_TILEWIDTH               1      uint32             must be a multiple of 8
-TIFFTAG_TRANSFERFUNCTION        1 or 3 uint16*           1<<BitsPerSample entry arrays
-TIFFTAG_XPOSITION               1      float
-TIFFTAG_XRESOLUTION             1      float
-TIFFTAG_WHITEPOINT              1      float*            2-entry array
-TIFFTAG_YCBCRCOEFFICIENTS       1      float*             3-entry array
-TIFFTAG_YCBCRPOSITIONING        1      uint16
-TIFFTAG_YCBCRSAMPLING           2      uint16
-TIFFTAG_YPOSITION               1      float
-TIFFTAG_YRESOLUTION             1      float
-TIFFTAG_ICCPROFILE              2      uint32,void*      count, profile data*
-</pre>Tag may not have its values changed once data is written.<br>
-If <i>SamplesPerPixel</i> is one, then a single array is passed; otherwise three arrays should be passed.<br>
-* The contents of this field are quite complex. See <i>The ICC Profile Format Specification</i>, Annex B.3 "Embedding ICC Profiles in TIFF Files" (available at http://www.color.org) for an explanation.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the tag is defined in the current
-directory; otherwise a 0 is returned.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned if the operation was successful. Otherwise, 0
-is returned if an error was detected.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Cannot modify tag "%s" while writing</b>.
-Data has already been written to the file, so the specified
-tag's value can not be changed. This restriction is applied
-to all tags that affect the format of written
-data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%d: Bad value for "%s"</b>. An invalid value
-was supplied for the named tag.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFGetField</i>(3T), <i>TIFFSetDirectory</i>(3T),
-<i>TIFFWriteDirectory</i>(3T),
-<i>TIFFReadDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWarning.3t.html b/tkimg1.3/libtiff/html/man/TIFFWarning.3t.html
deleted file mode 100644
index ab0151e..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWarning.3t.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWarning</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWarning</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:28 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWarning, TIFFSetWarningHandler - library warning interface</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-void TIFFWarning(const char* module, const char* fmt,
-...)</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <stdargh.h><br>
-typedef void (*TIFFWarningHandler)(const char* module, const
-char* fmt, va_list ap);<br>
-TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler
-handler);</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFWarning</i> invokes the library-wide warning handler
-function to (normally) write a warning message to the
-<b>stderr</b>. The <i>fmt</i> parameter is a
-<i>printf</i>(3S) format string, and any number arguments
-can be supplied. The <i>module</i> parameter is interpreted
-as a string that, if non-zero, should be printed before the
-message; it typically is used to identify the software
-module in which a warning is detected.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Applications that desire to capture control in the event of
-a warning should use <i>TIFFSetWarningHandler</i> to
-override the default warning handler. A <small>NULL</small>
-(0) warning handler function may be installed to suppress
-error messages.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSetWarningHandler</i> returns a reference to the
-previous error handling function.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFError</i>(3T),
-<i>printf</i>(3S)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteDirectory.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteDirectory.3t.html
deleted file mode 100644
index 1a169d3..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteDirectory.3t.html
+++ /dev/null
@@ -1,200 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteDirectory</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteDirectory</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:28 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWriteDirectory, TIFFRewriteDirectory, TIFFCheckpointDirectory - write the current directory in an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFWriteDirectory(TIFF* tif)<br>
-int TIFFRewriteDirectory(TIFF* tif)<br>
-int TIFFCheckpointDirectory(TIFF* tif)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFWriteDirectory</i> will write the contents of the
-current directory to the file and setup to create a new
-subfile in the same file. Applications only need to call
-<i>TIFFWriteDirectory</i> when writing multiple subfiles to
-a single <small>TIFF</small> file. <i>TIFFWriteDirectory</i>
-is automatically called by <i>TIFFClose</i> and
-<i>TIFFFlush</i> to write a modified directory if the file
-is open for writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>TIFFRewriteDirectory</i> function operates similarly
-to <i>TIFFWriteDirectory,</i> but can be called with
-directories previously read or written that already have an
-established location in the file. It will rewrite the
-directory, but instead of place it at it's old location (as
-<i>TIFFWriteDirectory</i> would) it will place them at the
-end of the file, correcting the pointer from the preceeding
-directory or file header to point to it's new location. This
-is particularly important in cases where the size of the
-directory and pointed to data has grown, so it won't fit in
-the space available at the old location.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>TIFFCheckpointDirectory</i> writes the current state
-of the tiff directory into the file to make what is
-currently in the file readable. Unlike
-<i>TIFFWriteDirectory, TIFFCheckpointDirectory</i> does not
-free up the directory data structures in memory, so they can
-be updated (as strips/tiles are written) and written again.
-Reading such a partial file you will at worst get a tiff
-read error for the first strip/tile encountered that is
-incomplete, but you will at least get all the valid data in
-the file before that. When the file is complete, just use
-<i>TIFFWriteDirectory</i> as usual to finish it off
-cleanly.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-1 is returned when the contents are successfully written to
-the file. Otherwise, 0 is returned if an error was
-encountered when writing the directory
-contents.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error post-encoding before directory write</b>. Before
-writing the contents of the current directory, any pending
-data are flushed. This message indicates that an error
-occurred while doing this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error flushing data before directory write</b>. Before
-writing the contents of the current directory, any pending
-data are flushed. This message indicates that an error
-occurred while doing this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Cannot write directory, out of space</b>. There was not
-enough space to allocate a temporary area for the directory
-that was to be written.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing directory count</b>. A write error occurred
-when writing the count of fields in the
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing directory contents</b>. A write error
-occurred when writing the directory fields.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing directory link</b>. A write error occurred
-when writing the link to the next directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing data for field "%s"</b>. A write
-error occurred when writing indirect data for the specified
-field.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error writing TIFF header</b>. A write error occurred
-when re-writing header at the front of the
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error fetching directory count</b>. A read error occurred
-when fetching the directory count field for a previous
-directory. This can occur when setting up a link to the
-directory that is being written.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Error fetching directory link</b>. A read error occurred
-when fetching the directory link field for a previous
-directory. This can occur when setting up a link to the
-directory that is being written.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFError</i>(3T), <i>TIFFReadDirectory</i>(3T),
-<i>TIFFSetDirectory</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteEncodedStrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteEncodedStrip.3t.html
deleted file mode 100644
index 33285fa..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteEncodedStrip.3t.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteEncodedStrip</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteEncodedStrip</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:28 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWritedEncodedStrip - compress and write a strip of data to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip,
-tdata_t buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Compress <i>size</i> bytes of raw data from <i>buf</i> and
-write the result to the specified strip; replacing any
-previously written data. Note that the value of <i>strip</i>
-is a ``raw strip number.'' That is, the caller must take
-into account whether or not the data are organized in
-separate places (<i>PlanarConfiguration</i>=2).</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library writes encoded data using the native machine
-byte order. Correctly implemented <small>TIFF</small>
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than
-8.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The strip number must be valid according to the current
-settings of the <i>ImageLength</i> and <i>RowsPerStrip</i>
-tags. An image may be dynamically grown by increasing the
-value of <i>ImageLength</i> prior to each call to
-<i>TIFFWriteEncodedStrip</i>.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
--1 is returned if an error was encountered. Otherwise, the
-value of <i>size</i> is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: File not open for writing</b>. The file was opened
-for reading, not writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not write scanlines to a tiled image</b>. The image
-is assumed to be organized in tiles because the
-<i>TileWidth</i> and <i>TileLength</i> tags have been set
-with <i>TIFFSetField</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "ImageWidth" before writing
-data</b>. The image's width has not be set before the first
-write. See <i>TIFFSetField</i>(3T) for information on how to
-do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "PlanarConfiguration" before
-writing data</b>. The organization of data has not be
-defined before the first write. See <i>TIFFSetField</i>(3T)
-for information on how to do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for strip arrays"</b>. There was not
-enough space for the arrays that hold strip offsets and byte
-counts.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteScanline</i>(3T),
-<i>TIFFWriteRawStrip</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteEncodedTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteEncodedTile.3t.html
deleted file mode 100644
index b58eb77..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteEncodedTile.3t.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteEncodedTile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteEncodedTile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:29 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWritedEncodedTile - compress and write a tile of data to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFWriteEncodedTile(TIFF* tif, ttile_t tile,
-tdata_t buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Compress <i>size</i> bytes of raw data from <i>buf</i> and
-<b>append</b> the result to the end of the specified tile.
-Note that the value of <i>tile</i> is a ``raw tile number.''
-That is, the caller must take into account whether or not
-the data are organized in separate places
-(<i>PlanarConfiguration</i>=2). <i>TIFFComputeTile</i>
-automatically does this when converting an (x,y,z,sample)
-coordinate quadruple to a tile number.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library writes encoded data using the native machine
-byte order. Correctly implemented <small>TIFF</small>
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than
-8.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
--1 is returned if an error was encountered. Otherwise, the
-value of <i>size</i> is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: File not open for writing</b>. The file was opened
-for reading, not writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not write tiles to a stripped image</b>. The image is
-assumed to be organized in strips because neither of the
-<i>TileWidth</i> or <i>TileLength</i> tags have been set
-with <i>TIFFSetField</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "ImageWidth" before writing
-data</b>. The image's width has not be set before the first
-write. See <i>TIFFSetField</i>(3T) for information on how to
-do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "PlanarConfiguration" before
-writing data</b>. The organization of data has not be
-defined before the first write. See <i>TIFFSetField</i>(3T)
-for information on how to do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for tile arrays"</b>. There was not
-enough space for the arrays that hold tile offsets and byte
-counts.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteTile</i>(3T),
-<i>TIFFWriteRawTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteRawStrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteRawStrip.3t.html
deleted file mode 100644
index e227fe5..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteRawStrip.3t.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteRawstrip</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteRawstrip</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:29 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWriteRawStrip - write a strip of raw data to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t
-buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Append <i>size</i> bytes of raw data to the specified
-strip.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The strip number must be valid according to the current
-settings of the <i>ImageLength</i> and <i>RowsPerStrip</i>
-tags. An image may be dynamically grown by increasing the
-value of <i>ImageLength</i> prior to each call to
-<i>TIFFWriteRawStrip</i>.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
--1 is returned if an error occurred. Otherwise, the value of
-<i>size</i> is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: File not open for writing</b>. The file was opened
-for reading, not writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not write scanlines to a tiled image</b>. The image
-is assumed to be organized in tiles because the
-<i>TileWidth</i> and <i>TileLength</i> tags have been set
-with <i>TIFFSetField</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "ImageWidth" before writing
-data</b>. The image's width has not be set before the first
-write. See <i>TIFFSetField</i>(3T) for information on how to
-do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "PlanarConfiguration" before
-writing data</b>. The organization of data has not be
-defined before the first write. See <i>TIFFSetField</i>(3T)
-for information on how to do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for strip arrays"</b>. There was not
-enough space for the arrays that hold strip offsets and byte
-counts.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Strip %d out of range, max %d</b>. The specified
-strip is not a valid strip according to the currently
-specified image dimensions.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteEncodedStrip</i>(3T),
-<i>TIFFWriteScanline</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteRawTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteRawTile.3t.html
deleted file mode 100644
index c13d089..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteRawTile.3t.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteRawtile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteRawtile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:29 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWriteRawTile - write a tile of raw data to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t
-buf, tsize_t size)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Append <i>size</i> bytes of raw data to the specified
-tile.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
--1 is returned if an error occurred. Otherwise, the value of
-<i>size</i> is returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: File not open for writing</b>. The file was opened
-for reading, not writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not write tiles to a stripped image</b>. The image is
-assumed to be organized in strips because neither of the
-<i>TileWidth</i> or <i>TileLength</i> tags have been set
-with <i>TIFFSetField</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "ImageWidth" before writing
-data</b>. The image's width has not be set before the first
-write. See <i>TIFFSetField</i>(3T) for information on how to
-do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "PlanarConfiguration" before
-writing data</b>. The organization of data has not be
-defined before the first write. See <i>TIFFSetField</i>(3T)
-for information on how to do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for tile arrays"</b>. There was not
-enough space for the arrays that hold tile offsets and byte
-counts.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Specified tile %d out of range, max %d</b>. The
-specified tile is not valid according to the currently
-specified image dimensions.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteEncodedTile</i>(3T),
-<i>TIFFWriteScanline</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteScanline.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteScanline.3t.html
deleted file mode 100644
index bf5889d..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteScanline.3t.html
+++ /dev/null
@@ -1,220 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteScanline</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteScanline</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:29 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWriteScanline - write a scanline to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-int TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row,
-tsample_t sample)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Write data to a file at the specified row. The <i>sample</i>
-parameter is used only if data are organized in separate
-planes (<i>PlanarConfiguration</i>=2). The data are assumed
-to be uncompressed and in the native bit- and byte-order of
-the host machine. The data written to the file is compressed
-according to the compression scheme of the current
-<small>TIFF</small> directory (see further below). If the
-current scanline is past the end of the current subfile, the
-<i>ImageLength</i> field is automatically increased to
-include the scanline (except for
-<i>PlanarConfiguration</i>=2, where the <i>ImageLength</i>
-cannot be changed once the first data are written). If the
-<i>ImageLength</i> is increased, the <i>StripOffsets</i> and
-<i>StripByteCounts</i> fields are similarly enlarged to
-reflect data written past the previous end of
-image.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library writes encoded data using the native machine
-byte order. Correctly implemented <small>TIFF</small>
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than
-8. The library attempts to hide bit-ordering differences
-between the image and the native machine by converting data
-from the native machine order.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-In C++ the <i>sample</i> parameter defaults to
-0.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Once data are written to a file for the current directory,
-the values of certain tags may not be altered; see
-<i>TIFFSetField</i>(3T) for more information.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-It is not possible to write scanlines to a file that uses a
-tiled organization. The routine <i>TIFFIsTiled</i> can be
-used to determine if the file is organized as tiles or
-strips.</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFWriteScanline</i> returns -1 if it immediately
-detects an error and 1 for a successful write.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: File not open for writing .</b> The file was opened
-for reading, not writing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not write scanlines to a tiled image</b>. An attempt
-was made to write a scanline to a tiled image. The image is
-assumed to be organized in tiles because the
-<i>TileWidth</i> and <i>TileLength</i> tags have been set
-with <i>TIFFSetField</i>(3T).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Compression algorithm does not support random access</b>.
-Data was written in a non-sequential order to a file that
-uses a compression algorithm and that has
-<i>RowsPerStrip</i> greater than one. That is, data in the
-image is to be stored in a compressed form, and with
-multiple rows packed into a strip. In this case, the library
-does not support random access to the data. The data should
-either be written as entire strips, sequentially by rows, or
-the value of <i>RowsPerStrip</i> should be set to
-one.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "ImageWidth" before writing
-data</b>. The image's width has not be set before the first
-write. See <i>TIFFSetField</i>(3T) for information on how to
-do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Must set "PlanarConfiguration" before
-writing data</b>. The organization of data has not be
-defined before the first write. See <i>TIFFSetField</i>(3T)
-for information on how to do this.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Can not change "ImageLength" when using
-separate planes</b>. Separate image planes are being used
-(<i>PlanarConfiguration</i>=2), but the number of rows has
-not been specified before the first write. The library
-supports the dynamic growth of an image only when data are
-organized in a contiguous manner
-(<i>PlanarConfiguration</i>=1).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%d: Sample out of range, max %d</b>. The <i>sample</i>
-parameter was greater than the value of the SamplesPerPixel
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for strip arrays .</b> There was not enough
-space for the arrays that hold strip offsets and byte
-counts.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Writing subsampled YCbCR data does not work correctly
-because, for <i>PlanarConfiguration</i>=2 the size of a
-scanline is not calculated on a per-sample basis, and for
-<i>PlanarConfiguration</i>=1 the library does not pack the
-block-interleaved samples.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFWriteEncodedStrip</i>(3T),
-<i>TIFFWriteRawStrip</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFWriteTile.3t.html b/tkimg1.3/libtiff/html/man/TIFFWriteTile.3t.html
deleted file mode 100644
index c238229..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFWriteTile.3t.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFWriteTile</title>
-</head>
-<body>
-
-<h1 align=center>TIFFWriteTile</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#RETURN VALUES">RETURN VALUES</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:30 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFWriteTile - encode and write a tile of data to an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-tsize_t TIFFWriteTile(TIFF* tif, tdata_t buf, uint32 x,
-uint32 y, uint32 z, tsample_t sample)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Write the data for the tile <i>containing</i> the specified
-coordinates. The data in <i>buf</i> are is (potentially)
-compressed, and written to the indicated file, normally
-being appended to the end of the file. The buffer must be
-contain an entire tile of data. Applications should call the
-routine <i>TIFFTileSize</i> to find out the size (in bytes)
-of a tile buffer. The <i>x</i> and <i>y</i> parameters are
-always used by <i>TIFFWriteTile</i>. The <i>z</i> parameter
-is used if the image is deeper than 1 slice
-(<i>ImageDepth</i>>1). The <i>sample</i> parameter is
-used only if data are organized in separate planes
-(<i>PlanarConfiguration</i>=2).</td></table>
-<a name="RETURN VALUES"></a>
-<h2>RETURN VALUES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFWriteTile</i> returns -1 if it detects an error;
-otherwise the number of bytes in the tile is
-returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed to the <i>TIFFError</i>(3T)
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFCheckTile</i>(3T),
-<i>TIFFComputeTile</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadTile</i>(3T), <i>TIFFWriteScanline</i>(3T),
-<i>TIFFWriteEncodedTile</i>(3T),
-<i>TIFFWriteRawTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFbuffer.3t.html b/tkimg1.3/libtiff/html/man/TIFFbuffer.3t.html
deleted file mode 100644
index e2fb7e3..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFbuffer.3t.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFBUFFER</title>
-</head>
-<body>
-
-<h1 align=center>TIFFBUFFER</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:19 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReadBufferSetup, TIFFWriteBufferSetup - I/O buffering control routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-int TIFFReadBufferSetup(TIFF*, tdata_t buffer, tsize_t size);
-int TIFFWriteBufferSetup(TIFF*, tdata_t buffer, tsize_t size);
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following routines are provided for client-control of
-the I/O buffers used by the library. Applications need never
-use these routines; they are provided only for ``intelligent
-clients'' that wish to optimize memory usage and/or
-eliminate potential copy operations that can occur when
-working with images that have data stored without
-compression.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReadBufferSetup</i> sets up the data buffer used to
-read raw (encoded) data from a file. If the specified
-pointer is <small>NULL</small> (zero), then a buffer of the
-appropriate size is allocated. Otherwise the caller must
-guarantee that the buffer is large enough to hold any
-individual strip of raw data. <i>TIFFReadBufferSetup</i>
-returns a non-zero value if the setup was successful and
-zero otherwise.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFWriteBufferSetup</i> sets up the data buffer used to
-write raw (encoded) data to a file. If the specified
-<i>size</i> is -1 then the buffer size is selected to hold a
-complete tile or strip, or at least 8 kilobytes, whichever
-is greater. If the specified <i>buffer</i> is
-<small>NULL</small> (zero), then a buffer of the appropriate
-size is dynamically allocated. <i>TIFFWriteBufferSetup</i>
-returns a non-zero value if the setup was successful and
-zero otherwise.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for data buffer at scanline %ld</b>.
-<i>TIFFReadBufferSetup</i> was unable to dynamically
-allocate space for a data buffer.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: No space for output buffer</b>.
-<i>TIFFWriteBufferSetup</i> was unable to dynamically
-allocate space for a data buffer.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFcodec.3t.html b/tkimg1.3/libtiff/html/man/TIFFcodec.3t.html
deleted file mode 100644
index 07f62bf..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFcodec.3t.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>CODEC</title>
-</head>
-<body>
-
-<h1 align=center>CODEC</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:20 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFFindCODEC, TIFFRegisterCODEC, TIFFUnRegisterCODEC - codec-related utility routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-const TIFFCodec* TIFFFindCODEC(uint16 scheme);<br>
-TIFFCodec* TIFFRegisterCODEC(uint16 scheme, const char*
-method, TIFFInitMethod init);<br>
-void TIFFUnRegisterCODEC(TIFFCodec* codec);<br>
-int TIFFIsCODECConfigured(uint16 scheme);</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i> supports a variety of compression schemes
-implemented by software <i>codecs</i>. Each codec adheres to
-a modular interface that provides for the decoding and
-encoding of image data; as well as some other methods for
-initialization, setup, cleanup, and the control of default
-strip and tile sizes. Codecs are identified by the
-associated value of the <small>TIFF</small>
-<i>Compression</i> tag; e.g. 5 for <small>LZW</small>
-compression.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The <i>TIFFRegisterCODEC</i> routine can be used to augment
-or override the set of codecs available to an application.
-If the specified <i>scheme</i> already has a registered
-codec then it is <i>overridden</i> and any images with data
-encoded with this compression scheme will be decoded using
-the supplied coded.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFIsCODECConfigured</i> returns 1 if the codec is
-configured and working. Otherwise 0 will be
-returned.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>No space to register compression scheme %s</b>.
-<i>TIFFRegisterCODEC</i> was unable to allocate memory for
-the data structures needed to register a codec.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Cannot remove compression scheme %s; not registered</b>.
-<i>TIFFUnRegisterCODEC</i> did not locate the specified
-codec in the table of registered compression
-schemes.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFcolor.3t.html b/tkimg1.3/libtiff/html/man/TIFFcolor.3t.html
deleted file mode 100644
index 2c7439a..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFcolor.3t.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>COLOR</title>
-</head>
-<body>
-
-<h1 align=center>COLOR</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:20 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFYCbCrToRGBInit, TIFFYCbCrtoRGB, TIFFCIELabToRGBInit, TIFFCIELabToXYZ, TIFFXYZToRGB - color conversion routines.</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB
-*</b><i>ycbcr</i><b>, float *</b><i>luma</i><b>, float
-*</b><i>refBlackWhite"</i><b>);"<br>
-void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *</b><i>ycbcr</i><b>,
-uint32</b> <i>Y</i><b>, int32</b> <i>Cb</i><b>, int32</b>
-<i>Cr</i><b>, uint32 *</b><i>R</i><b>, uint32
-*</b><i>G</i><b>, uint32 *</b><i>B</i>
-<b>);</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>int TIFFCIELabToRGBInit(TIFFCIELabToRGB
-*</b><i>cielab</i><b>, TIFFDisplay *</b><i>display</i><b>,
-float *</b><i>refWhite</i><b>);<br>
-void TIFFCIELabToXYZ(TIFFCIELabToRGB *</b><i>cielab</i><b>,
-uint32</b> <i>L</i><b>, int32</b> <i>a</i><b>, int32</b>
-<i>b</i><b>, float *</b><i>X</i><b>, float *</b><i>Y</i><b>,
-float *</b><i>Z</i><b>);<br>
-void TIFFXYZToRGB(TIFFCIELabToRGB *</b><i>cielab</i><b>,
-float</b> <i>X</i><b>, float</b> <i>Y</i><b>, float</b>
-<i>Z"</i><b>,</b><i>uint32</i><b>*"</b><i>R</i><b>,
-uint32 *</b><i>G</i><b>, uint32
-*</b><i>B</i><b>);</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFF supports several color spaces for images stored in that
-format. There is usually a problem of application to handle
-the data properly and convert between different colorspaces
-for displaying and printing purposes. To simplify this task
-libtiff implements several color conversion routines itself.
-In particular, these routines used in
-<b>TIFFRGBAImage(3T)</b> interface.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFYCbCrToRGBInit()</b> used to initialize <i>YCbCr</i>
-to <i>RGB</i> conversion state. Allocating and freeing of
-the <i>ycbcr</i> structure belongs to programmer.
-<i>TIFFYCbCrToRGB</i> defined in <b>tiffio.h</b>
-as</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>typedef struct {                /* YCbCr->RGB support */
-        TIFFRGBValue* clamptab; /* range clamping table */
-        int*         Cr_r_tab;
-        int*         Cb_b_tab;
-        int32*       Cr_g_tab;
-        int32*       Cb_g_tab;
-        int32*        Y_tab;
-} TIFFYCbCrToRGB;
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>luma</i> is a float array of three values representing
-proportions of the red, green and blue in luminance, Y (see
-section 21 of the TIFF 6.0 specification, where the YCbCr
-images discussed). <i>TIFFTAG_YCBCRCOEFFICIENTS</i> holds
-that values in TIFF file. <i>refBlackWhite</i> is a float
-array of 6 values which specifies a pair of headroom and
-footroom image data values (codes) for each image component
-(see section 20 of the TIFF 6.0 specification where the
-colorinmetry fields discussed).
-<i>TIFFTAG_REFERENCEBLACKWHITE</i> is responsible for
-storing these values in TIFF file. Following code snippet
-should helps to understand the the technique:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>float *luma, *refBlackWhite;
-uint16 hs, vs;
-
-/* Initialize structures */
-ycbcr = (TIFFYCbCrToRGB*)
-     _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))
-          + 4*256*sizeof(TIFFRGBValue)
-          + 2*256*sizeof(int)
-          + 3*256*sizeof(int32));
-if (ycbcr == NULL) {
-        TIFFError("YCbCr->RGB",
-          "No space for YCbCr->RGB conversion state");
-        exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
-TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite);
-if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0)
-     exit(0);
-
-/* Start conversion */
-uint32 r, g, b;
-uint32 Y;
-int32 Cb, Cr;
-
-for each pixel in image
-     TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b);
-
-/* Free state structure */
-_TIFFfree(ycbcr);
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFCIELabToRGBInit()</b> initializes the <i>CIE L*a*b*
-1976</i> to <i>RGB</i> conversion state.
-<b>TIFFCIELabToRGB</b> defined as</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>#define CIELABTORGB_TABLE_RANGE 1500
-
-typedef struct {              /* CIE Lab 1976->RGB support */
-     int  range;              /* Size of conversion table */
-     float     rstep, gstep, bstep;
-     float     X0, Y0, Z0;         /* Reference white point */
-     TIFFDisplay display;
-     float     Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */
-     float     Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */
-     float     Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */
-} TIFFCIELabToRGB;
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>display</i> is a display device description, declared
-as</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>typedef struct {
-     float d_mat[3][3]; /* XYZ -> luminance matrix */
-     float d_YCR;       /* Light o/p for reference white */
-     float d_YCG;
-     float d_YCB;
-     int d_Vrwr;        /* Pixel values for ref. white */
-     int d_Vrwg;
-     int d_Vrwb;
-     float d_Y0R;       /* Residual light for black pixel */
-     float d_Y0G;
-     float d_Y0B;
-     float d_gammaR;    /* Gamma values for the three guns */
-     float d_gammaG;
-     float d_gammaB;
-} TIFFDisplay;
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-For example, the one can use sRGB device, which has the
-following parameters:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>TIFFDisplay display_sRGB = {
-     {       /* XYZ -> luminance matrix */
-          {  3.2410F, -1.5374F, -0.4986F },
-          {  -0.9692F, 1.8760F, 0.0416F },
-          {  0.0556F, -0.2040F, 1.0570F }
-     },
-     100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
-     255, 255, 255,      /* Pixel values for ref. white */
-     1.0F, 1.0F, 1.0F,   /* Residual light o/p for black pixel */
-     2.4F, 2.4F, 2.4F,   /* Gamma values for the three guns */
-};
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>refWhite</i> is a color temperature of the reference
-white. The <i>TIFFTAG_WHITEPOINT</i> contains the
-chromaticity of the white point of the image from where the
-reference white can be calculated using following
-formulae:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-refWhite_Y = 100.0<br>
-refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y<br>
-refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) /
-whitePoint_y * refWhite_X</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The conversion itself performed in two steps: at the first
-one we will convert <i>CIE L*a*b* 1976</i> to <i>CIE XYZ</i>
-using <b>TIFFCIELabToXYZ()</b> routine, and at the second
-step we will convert <i>CIE XYZ</i> to <i>RGB</i> using
-<b>TIFFXYZToRGB().</b> Look at the code sample
-below:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>float   *whitePoint;
-float   refWhite[3];
-
-/* Initialize structures */
-img->cielab = (TIFFCIELabToRGB *)
-     _TIFFmalloc(sizeof(TIFFCIELabToRGB));
-if (!cielab) {
-     TIFFError("CIE L*a*b*->RGB",
-          "No space for CIE L*a*b*->RGB conversion state.");
-     exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint);
-refWhite[1] = 100.0F;
-refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
-refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
-           / whitePoint[1] * refWhite[1];
-if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) {
-     TIFFError("CIE L*a*b*->RGB",
-          "Failed to initialize CIE L*a*b*->RGB conversion state.");
-     _TIFFfree(cielab);
-     exit(0);
-}
-
-/* Now we can start to convert */
-uint32 r, g, b;
-uint32 L;
-int32 a, b;
-float X, Y, Z;
-
-for each pixel in image
-     TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z);
-     TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b);
-
-/* Don't forget to free the state structure */
-_TIFFfree(cielab);
-</pre></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T),<i>TIFFRGBAImage(3T)</i></td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFmemory.3t.html b/tkimg1.3/libtiff/html/man/TIFFmemory.3t.html
deleted file mode 100644
index c44a66b..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFmemory.3t.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>MEMORY</title>
-</head>
-<body>
-
-<h1 align=center>MEMORY</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:22 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-_TIFFmalloc, _TIFFrealloc, _TIFFfree, _TIFFmemset, _TIFFmemcpy, _TIFFmemcmp, - memory management-related functions for use with <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-tdata_t _TIFFmalloc(tsize_t);
-tdata_t _TIFFrealloc(tdata_t, tsize_t);
-void _TIFFfree(tdata_t);
-void _TIFFmemset(tdata_t, int, tsize_t);
-void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
-int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-These routines are provided for writing portable software
-that uses <i>libtiff</i>; they hide any memory-management
-related issues, such as dealing with segmented architectures
-found on 16-bit machines.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>_TIFFmalloc</i> and <i>_TIFFrealloc</i> are used to
-dynamically allocate and reallocate memory used by
-<i>libtiff</i>; such as memory passed into the I/O routines.
-Memory allocated through these interfaces is released back
-to the system using the <i>_TIFFfree</i>
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Memory allocated through one of the above interfaces can be
-set to a known value using <i>_TIFFmemset</i>, copied to
-another memory location using <i>_TIFFmemcpy</i>, or
-compared for equality using <i>_TIFFmemcmp</i>. These
-routines conform to the equivalent <small>ANSI</small> C
-routines: <i>memset</i>, <i>memcpy</i>, and <i>memcmp</i>,
-repsectively.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>malloc</i>(3C),
-<i>memory</i>(3C)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFquery.3t.html b/tkimg1.3/libtiff/html/man/TIFFquery.3t.html
deleted file mode 100644
index 2457c48..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFquery.3t.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>QUERY</title>
-</head>
-<body>
-
-<h1 align=center>QUERY</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:23 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFCurrentRow, TIFFCurrentStrip, TIFFCurrentTile, TIFFCurrentDirectory, TIFFLastDirectory, TIFFFileno, TIFFFileName, TIFFGetMode, TIFFIsTiled, TIFFIsByteSwapped, TIFFIsUpSampled, TIFFIsMSB2LSB - query routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-uint32 TIFFCurrentRow(TIFF* tif)
-tstrip_t TIFFCurrentStrip(TIFF* tif)
-ttile_t TIFFCurrentTile(TIFF* tif)
-tdir_t TIFFCurrentDirectory(TIFF* tif)
-int TIFFLastDirectory(TIFF* tif)
-int TIFFFileno(TIFF* tif)
-char* TIFFFileName(TIFF* tif)
-int TIFFGetMode(TIFF* tif)
-int TIFFIsTiled(TIFF* tif)
-int TIFFIsByteSwapped(TIFF* tif)
-int TIFFIsUpSampled(TIFF* tif)
-int TIFFIsMSB2LSB(TIFF* tif)
-const char* TIFFGetVersion(void)
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following routines return status information about an
-open <small>TIFF</small> file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFCurrentDirectory</i> returns the index of the current
-directory (directories are numbered starting at 0). This
-number is suitable for use with the <i>TIFFSetDirectory</i>
-routine.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFLastDirectory</i> returns a non-zero value if the
-current directory is the last directory in the file;
-otherwise zero is returned.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFCurrentRow</i>, <i>TIFFCurrentStrip</i>, and
-<i>TIFFCurrentTile</i>, return the current row, strip, and
-tile, respectively, that is being read or written. These
-values are updated each time a read or write is
-done.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFFileno</i> returns the underlying file descriptor
-used to access the <small>TIFF</small> image in the
-filesystem.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFFileName</i> returns the pathname argument passed to
-<i>TIFFOpen</i> or <i>TIFFFdOpen</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFGetMode</i> returns the mode with which the
-underlying file was opened. On <small>UNIX</small> systems,
-this is the value passed to the <i>open</i>(2) system
-call.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFIsTiled</i> returns a non-zero value if the image
-data has a tiled organization. Zero is returned if the image
-data is organized in strips.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFIsByteSwapped</i> returns a non-zero value if the
-image data was in a different byte-order than the host
-machine. Zero is returned if the TIFF file and local host
-byte-orders are the same. Note that TIFFReadTile(),
-TIFFReadStrip() and TIFFReadScanline() functions already
-normally perform byte swapping to local host order if
-needed.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFIsUpSampled</i> returns a non-zero value if image
-data returned through the read interface routines is being
-up-sampled. This can be useful to applications that want to
-calculate I/O buffer sizes to reflect this usage (though the
-usual strip and tile size routines already do
-this).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFIsMSB2LSB</i> returns a non-zero value if the image
-data is being returned with bit 0 as the most significant
-bit.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFGetVersion</i> returns an <small>ASCII</small> string
-that has a version stamp for the <small>TIFF</small> library
-software.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFFdOpen</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFsize.3t.html b/tkimg1.3/libtiff/html/man/TIFFsize.3t.html
deleted file mode 100644
index 95f1e90..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFsize.3t.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSIZE</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSIZE</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:26 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFScanlineSize, TIFFRasterScanlineSize, - return the size of various items associated with an open <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-tsize_t TIFFRasterScanlineSize(TIFF* tif)
-tsize_t TIFFScanlineSize(TIFF* tif)
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFScanlineSize</i> returns the size in bytes of a row
-of data as it would be returned in a call to
-<i>TIFFReadScanline</i>, or as it would be expected in a
-call to <i>TIFFWriteScanline</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFRasterScanlineSize</i> returns the size in bytes of a
-complete decoded and packed raster scanline. Note that this
-value may be different from the value returned by
-<i>TIFFScanlineSize</i> if data is stored as separate
-planes.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
-<i>TIFFReadScanline</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFstrip.3t.html b/tkimg1.3/libtiff/html/man/TIFFstrip.3t.html
deleted file mode 100644
index 589b77f..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFstrip.3t.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSTRIP</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSTRIP</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:27 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFDefaultStripSize, TIFFStripSize, TIFFVStripSize, TIFFRawStripSize, TIFFComputeStrip, TIFFNumberOfStrips - strip-related utility routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-uint32 TIFFDefaultStripSize(TIFF* tif, uint32 estimate)
-tsize_t TIFFStripSize(TIFF* tif)
-tsize_t TIFFVStripSize(TIFF* tif, uint32 nrows)
-tsize_t TIFFRawStripSize(TIFF* tif, tstrip_t strip)
-tstrip_t TIFFComputeStrip(TIFF* tif, uint32 row, tsample_t sample)
-tstrip_t TIFFNumberOfStrips(TIFF* tif)
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFDefaultStripSize</i> returns the number of rows for a
-reasonable-sized strip according to the current settings of
-the <i>ImageWidth</i>, <i>BitsPerSample</i>,
-<i>SamplesPerPixel</i>, tags and any compression-specific
-requirements. If the <i>estimate</i> parameter, if non-zero,
-then it is taken as an estimate of the desired strip size
-and adjusted according to any compression-specific
-requirements. The value returned by this function is
-typically used to define the <i>RowsPerStrip</i> tag. In
-lieu of any unusual requirements <i>TIFFDefaultStripSize</i>
-tries to create strips that have approximately 8 kilobytes
-of uncompressed data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFStripSize</i> returns the equivalent size for a strip
-of data as it would be returned in a call to
-<i>TIFFReadEncodedStrip</i> or as it would be expected in a
-call to <i>TIFFWriteEncodedStrip</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFVStripSize</i> returns the number of bytes in a strip
-with <i>nrows</i> rows of data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFRawStripSize</i> returns the number of bytes in a raw
-strip (i.e. not decoded).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFComputeStrip</i> returns the strip that contains the
-specified coordinates. A valid strip is always returned;
-out-of-range coordinate values are clamped to the bounds of
-the image. The <i>row</i> parameter is always used in
-calculating a strip. The <i>sample</i> parameter is used
-only if data are organized in separate planes
-(<i>PlanarConfiguration</i>=2).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFNumberOfStrips</i> returns the number of strips in
-the image.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFReadEncodedStrip</i>(3T),
-<i>TIFFReadRawStrip</i>(3T),
-<i>TIFFWriteEncodedStrip</i>(3T),
-<i>TIFFWriteRawStrip</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFswab.3t.html b/tkimg1.3/libtiff/html/man/TIFFswab.3t.html
deleted file mode 100644
index 170f96c..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFswab.3t.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>SWAB</title>
-</head>
-<body>
-
-<h1 align=center>SWAB</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:27 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong - byte- and bit-swapping routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h><br>
-const unsigned char* TIFFGetBitRevTable(int reversed);<br>
-void TIFFReverseBits(u_char* data, unsigned long nbytes)<br>
-void TIFFSwabShort(uint16* data)<br>
-void TIFFSwabLong(uint32* data)<br>
-void TIFFSwabArrayOfShort(uint16* data, unsigned long
-nshorts)<br>
-void TIFFSwabArrayOfLong(uint32* data, unsigned long
-nlongs)</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following routines are used by the library to swap 16-
-and 32-bit data and to reverse the order of bits in
-bytes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFSwabShort</i> and <i>TIFFSwabLong</i> swap the bytes
-in a single 16-bit and 32-bit item, respectively.
-<i>TIFFSwabArrayOfShort</i> and <i>TIFFSwabArrayOfLong</i>
-swap the bytes in an array of 16-bit and 32-bit items,
-respectively.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFReverseBits</i> replaces each byte in <i>data</i>
-with the equivalent bit-reversed value. This operation is
-done with a lookup table, <i>TIFFBitRevTable</i> which is
-declared public. A second table, <i>TIFFNoBitRevTable</i> is
-also declared public; it is a lookup table that can be used
-as an <i>identity function</i>; i.e. <i>TIFFNoBitRevTable[n]
-== n</i>.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T),</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/TIFFtile.3t.html b/tkimg1.3/libtiff/html/man/TIFFtile.3t.html
deleted file mode 100644
index a080686..0000000
--- a/tkimg1.3/libtiff/html/man/TIFFtile.3t.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFTILE</title>
-</head>
-<body>
-
-<h1 align=center>TIFFTILE</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:27 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-TIFFTileSize, TIFFTileRowSize, TIFFVTileSize, TIFFDefaultTileSize, TIFFComputeTile, TIFFCheckTile, TIFFNumberOfTiles - tile-related utility routines</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre><b>#include <tiffio.h>
-void TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-tsize_t TIFFTileSize(TIFF* tif)
-tsize_t TIFFTileRowSize(TIFF* tif)
-tsize_t TIFFVTileSize(TIFF* tif, uint32 nrows)
-ttile_t TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t sample)
-int TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t sample)
-ttile_t TIFFNumberOfTiles(TIFF* tif)
-</b></pre></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFDefaultTileSize</i> returns the pixel width and
-height of a reasonable-sized tile; suitable for setting up
-the <i>TileWidth</i> and <i>TileLength</i> tags. If the
-<i>tw</i> and <i>th</i> values passed in are non-zero, then
-they are adjusted to reflect any compression-specific
-requirements. The returned width and height are constrained
-to be a multiple of 16 pixels to conform with the
-<small>TIFF</small> specification.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFTileSize</i> returns the equivalent size for a tile
-of data as it would be returned in a call to
-<i>TIFFReadTile</i> or as it would be expected in a call to
-<i>TIFFWriteTile</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFVTileSize</i> returns the number of bytes in a
-row-aligned tile with <i>nrows</i> of data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFTileRowSize</i> returns the number of bytes of a row
-of data in a tile.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFComputeTile</i> returns the tile that contains the
-specified coordinates. A valid tile is always returned;
-out-of-range coordinate values are clamped to the bounds of
-the image. The <i>x</i> and <i>y</i> parameters are always
-used in calculating a tile. The <i>z</i> parameter is used
-if the image is deeper than 1 slice
-(<i>ImageDepth</i>>1). The <i>sample</i> parameter is
-used only if data are organized in separate planes
-(<i>PlanarConfiguration</i>=2).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFCheckTile</i> returns a non-zero value if the
-supplied coordinates are within the bounds of the image and
-zero otherwise. The <i>x</i> parameter is checked against
-the value of the <i>ImageWidth</i> tag. The <i>y</i>
-parameter is checked against the value of the
-<i>ImageLength</i> tag. The <i>z</i> parameter is checked
-against the value of the <i>ImageDepth</i> tag (if defined).
-The <i>sample</i> parameter is checked against the value of
-the <i>SamplesPerPixel</i> parameter if the data are
-organized in separate planes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>TIFFNumberOfTiles</i> returns the number of tiles in the
-image.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i>(3T), <i>TIFFReadEncodedTile</i>(3T),
-<i>TIFFReadRawTile</i>(3T), <i>TIFFReadTile</i>(3T),
-<i>TIFFWriteEncodedTile</i>(3T),
-<i>TIFFWriteRawTile</i>(3T),
-<i>TIFFWriteTile</i>(3T)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/fax2ps.1.html b/tkimg1.3/libtiff/html/man/fax2ps.1.html
deleted file mode 100644
index fa1ad82..0000000
--- a/tkimg1.3/libtiff/html/man/fax2ps.1.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>FAX2PS</title>
-</head>
-<body>
-
-<h1 align=center>FAX2PS</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:30 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-fax2ps - convert a <small>TIFF</small> facsimile to compressed P <small>OST</small> S <small>CRIPT</small></td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>fax2ps</b> [ <i>options</i> ] [ <i>file</i>...
-]</td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>fax2ps</i> reads one or more <small>TIFF</small>
-facsimile image files and prints a compressed form of P
-<small>OST</small> S <small>CRIPT</small> on the standard
-output that is suitable for printing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default, each page is scaled to reflect the image
-dimensions and resolutions stored in the file. The <b>-x</b>
-and <b>-y</b> options can be used to specify the horizontal
-and vertical image resolutions (lines/inch), respectively.
-If the <b>-S</b> option is specified, each page is scaled to
-fill an output page. The default output page is 8.5 by 11
-inches. Alternate page dimensions can be specified in inches
-with the <b>-W</b> and <b>-H</b> options.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default <i>fax2ps</i> generates P <small>OST</small> S
-<small>CRIPT</small> for all pages in the file. The
-<b>-p</b> option can be used to select one or more pages
-from a multi-page document.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>fax2ps</i> generates a compressed form of P
-<small>OST</small> S <small>CRIPT</small> that is optimized
-for sending pages of text to a P <small>OST</small> S
-<small>CRIPT</small> printer attached to a host through a
-low-speed link (such as a serial line). Each output page is
-filled with white and then only the black areas are drawn.
-The P <small>OST</small> S <small>CRIPT</small>
-specification of the black drawing operations is optimized
-by using a special font that encodes the move-draw
-operations required to fill the black regions on the page.
-This compression scheme typically results in a substantially
-reduced P <small>OST</small> S <small>CRIPT</small>
-description, relative to the straightforward imaging of the
-page with a P <small>OST</small> S <small>CRIPT</small>
-<i>image</i> operator. This algorithm can, however, be
-ineffective for continuous-tone and white-on-black images.
-For these images, it sometimes is more efficient to send the
-raster bitmap image directly; see
-<i>tiff2ps</i>(1).</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b> <i>number</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="26%"></td><td width="74%">
-Print only the indicated page. Multiple pages may be printed
-by specifying this option more than once.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-x</b> <i>resolution</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="26%"></td><td width="74%">
-Use <i>resolution</i> as the horizontal resolution, in
-dots/inch, of the image data. By default this value is taken
-from the file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-y</b> <i>resolution</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="26%"></td><td width="74%">
-Use <i>resolution</i> as the vertical resolution, in
-lines/inch, of the image data. By default this value is
-taken from the file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-S</b> Scale each page of image data to fill the output
-page dimensions. By default images are presented according
-to the dimension information recorded in the
-<small>TIFF</small> file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-W</b> <i>width</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="26%"></td><td width="74%">
-Use <i>width</i> as the width, in inches, of the output
-page.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-H</b> <i>height</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="26%"></td><td width="74%">
-Use <i>height</i> as the height, in inches, of the output
-page.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Some messages about malformed <small>TIFF</small> images
-come from the <small>TIFF</small> library.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Various messages about badly formatted facsimile images may
-be generated due to transmission errors in received
-facsimile. <i>fax2ps</i> attempts to recover from such data
-errors by resynchronizing decoding at the end of the current
-scanline. This can result in long horizontal black lines in
-the resultant P <small>OST</small> S <small>CRIPT</small>
-image.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the destination printer supports P <small>OST</small> S
-<small>CRIPT</small> Level II then it is always faster to
-just send the encoded bitmap generated by the
-<i>tiff2ps</i>(1) program.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>fax2ps</i> should probably figure out when it is doing a
-poor job of compressing the output and just generate P
-<small>OST</small> S <small>CRIPT</small> to image the
-bitmap raster instead.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiff2ps</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/fax2tiff.1.html b/tkimg1.3/libtiff/html/man/fax2tiff.1.html
deleted file mode 100644
index 46737c6..0000000
--- a/tkimg1.3/libtiff/html/man/fax2tiff.1.html
+++ /dev/null
@@ -1,539 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>FAX2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>FAX2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:30 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-fax2tiff - create a <small>TIFF</small> Class F fax file from raw fax data</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>fax2tiff</b> [ <i>options</i> ] [ <b>-o</b>
-<i>output.tif</i> ] <i>input.raw</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Fax2tiff</i> creates a <small>TIFF</small> file
-containing <small>CCITT</small> Group 3 or Group 4 encoded
-data from one or more files containing ``raw'' Group 3 or
-Group 4 encoded data (typically obtained directly from a fax
-modem). By default, each row of data in the resultant
-<small>TIFF</small> file is 1-dimensionally encoded and
-padded or truncated to 1728 pixels, as needed. The resultant
-image is a set of low resolution (98 lines/inch) or medium
-resolution (196 lines/inch) pages, each of which is a single
-strip of data. The generated file conforms to the
-<small>TIFF</small> Class F ( <small>FAX</small> )
-specification for storing facsimile data. This means, in
-particular, that each page of the data does <b>not</b>
-include the trailing <i>return to control</i> (
-<small>RTC</small> ) code; as required for transmission by
-the <small>CCITT</small> Group 3 specifications. The old,
-``classic'', format is created if the <b>-c</b> option is
-used. (The Class F format can also be requested with the
-<b>-f</b> option.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The default name of the output image is <i>fax.tif</i>; this
-can be changed with the <b>-o</b> option. Each input file is
-assumed to be a separate page of facsimile data from the
-same document. The order in which input files are specified
-on the command line is the order in which the resultant
-pages appear in the output file.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Options that affect the interpretation of input data
-are:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-3</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is <small>CCITT</small> Group 3 encoded
-(default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-4</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is <small>CCITT</small> Group 4
-encoded.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-U</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is uncompressed (Group 3 or Group
-4).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-1</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is encoded with the 1-dimensional version
-of the <small>CCITT</small> Group 3 Huffman encoding
-algorithm (default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-2</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is 2-dimensional version of the
-<small>CCITT</small> Group 3 Huffman encoding
-algorithm.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-P</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is <b>not</b> EOL-aligned (default). This
-option has effect with Group 3 encoded input
-only.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-A</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data is EOL-aligned. This option has effect
-with Group 3 encoded input only.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-M</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Treat input data as having bits filled from most significant
-bit ( <small>MSB</small> ) to most least bit (
-<small>LSB</small> ).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-L</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Treat input data as having bits filled from least
-significant bit ( <small>LSB</small> ) to most significant
-bit ( <small>MSB</small> ) (default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-B</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data was encoded with black as 0 and white as
-1.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-W</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Assume input data was encoded with black as 1 and white as 0
-(default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-R</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the vertical resolution, in lines/inch, of the input
-images. By default input are assumed to have a vertical
-resolution of 196 lines/inch. If images are low resolution
-facsimile, a value of 98 lines/inch should be
-specified.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-X</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the width, in pixels, of the input images. By
-default input are assumed to have a width of 1728
-pixels.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Options that affect the output file format are:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the name of the output file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-7</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be compressed with the <small>CCITT</small>
-Group 3 Huffman encoding algorithm (default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-8</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be compressed with the <small>CCITT</small>
-Group 4 Huffman encoding.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-u</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be uncompressed (Group 3 or Group
-4).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-5</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be encoded with the 1-dimensional version of
-the <small>CCITT</small> Group 3 Huffman encoding
-algorithm.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-6</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be encoded with the 2-dimensional version of
-the <small>CCITT</small> Group 3 Huffman encoding algorithm
-(default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-a</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the last bit of each <i>End Of Line</i> (
-<small>EOL</small> ) code to land on a byte boundary
-(default). This ``zero padding'' will be reflected in the
-contents of the <i>Group3Options</i> tag of the resultant
-<small>TIFF</small> file. This option has effect with Group
-3 encoded output only.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Do not EOL-align output. This option has effect with Group 3
-encoded output only.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate "classic" Group 3 TIFF
-format.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate TIFF Class F (TIFF/F) format
-(default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-m</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output data to have bits filled from most significant
-bit ( <small>MSB</small> ) to most least bit (
-<small>LSB</small> ).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output data to have bits filled from least significant
-bit ( <small>LSB</small> ) to most significant bit (
-<small>MSB</small> ) (default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Stretch the input image vertically by writing each input row
-of data twice to the output file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-v</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force <i>fax2tiff</i> to print the number of rows of data it
-retrieved from the input file.</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following warnings and errors come from the decoding
-routines in the library.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Warning, %s: Premature EOL at scanline %d (x %d).n</b>.
-The input data had a row that was shorter than the expected
-width. The row is padded with white.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Premature EOF at scanline %d (x %d).n</b>. The
-decoder ran out of data in the middle of a scanline. The
-resultant row is padded with white.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Bad code word at row %d, x %dn</b>. An invalid Group
-3 <i>code</i> was encountered while decoding the input file.
-The row number and horizontal position is given. The
-remainder of the input row is discarded, while the
-corresponding output row is padded with white.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>%s: Bad 2D code word at scanline %d.n</b>. An invalid
-Group 4 or 2D Group 3 <i>code</i> was encountered while
-decoding the input file. The row number and horizontal
-position is given. The remainder of the input row is
-discarded, while the corresponding output row is padded with
-white.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Input data are assumed to have a a ``top left'' orientation;
-it should be possible to override this assumption from the
-command line.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i><small>CCITT</small> Recommendation T.4</i>
-(Standardization of Group 3 Facsimile Apparatus for Document
-Transmission).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>The Spirit of TIFF Class F</i>, an appendix to the TIFF
-5.0 specification prepared by Cygnet
-Technologies.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>tiffdither</i>(1), <i>tiffgt</i>(1),
-<i>libtiff</i>(3).</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/gif2tiff.1.html b/tkimg1.3/libtiff/html/man/gif2tiff.1.html
deleted file mode 100644
index 72f1c6e..0000000
--- a/tkimg1.3/libtiff/html/man/gif2tiff.1.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>GIF2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>GIF2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:31 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-gif2tiff - create a <small>TIFF</small> file from a GIF87 format image file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>gif2tiff</b> [ <i>options</i> ] <i>input.gif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Gif2tiff</i> converts a file in the GIF87 format to
-<small>TIFF.</small> The <small>TIFF</small> image is
-created as a palette image, with samples compressed with the
-Lempel-Ziv & Welch algorithm (<i>Compression</i>=5).
-These characteristics can overriden, or explicitly specified
-with the options described below.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm, <b>-c zip</b> for the
-Deflate compression algorithm, and <b>-c lzw</b> for
-Lempel-Ziv & Welch (the default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The program is based on Paul Haeberli's <i>fromgif</i>
-program which, in turn, is based on Marcel J.E. Mol's GIF
-reader.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Should have more options to control output
-format.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/index.html b/tkimg1.3/libtiff/html/man/index.html
deleted file mode 100644
index 80f12e9..0000000
--- a/tkimg1.3/libtiff/html/man/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>
-<li><A HREF=libtiff.3t.html>libtiff.3t</a>
-<li><A HREF=TIFFbuffer.3t.html>TIFFbuffer.3t</a>
-<li><A HREF=TIFFClose.3t.html>TIFFClose.3t</a>
-<li><A HREF=TIFFcodec.3t.html>TIFFcodec.3t</a>
-<li><A HREF=TIFFcolor.3t.html>TIFFcolor.3t</a>
-<li><A HREF=TIFFDataWidth.3t.html>TIFFDataWidth.3t</a>
-<li><A HREF=TIFFError.3t.html>TIFFError.3t</a>
-<li><A HREF=TIFFFlush.3t.html>TIFFFlush.3t</a>
-<li><A HREF=TIFFGetField.3t.html>TIFFGetField.3t</a>
-<li><A HREF=TIFFmemory.3t.html>TIFFmemory.3t</a>
-<li><A HREF=TIFFOpen.3t.html>TIFFOpen.3t</a>
-<li><A HREF=TIFFPrintDirectory.3t.html>TIFFPrintDirectory.3t</a>
-<li><A HREF=TIFFquery.3t.html>TIFFquery.3t</a>
-<li><A HREF=TIFFReadDirectory.3t.html>TIFFReadDirectory.3t</a>
-<li><A HREF=TIFFReadEncodedStrip.3t.html>TIFFReadEncodedStrip.3t</a>
-<li><A HREF=TIFFReadEncodedTile.3t.html>TIFFReadEncodedTile.3t</a>
-<li><A HREF=TIFFReadRawStrip.3t.html>TIFFReadRawStrip.3t</a>
-<li><A HREF=TIFFReadRawTile.3t.html>TIFFReadRawTile.3t</a>
-<li><A HREF=TIFFReadRGBAImage.3t.html>TIFFReadRGBAImage.3t</a>
-<li><A HREF=TIFFReadRGBAStrip.3t.html>TIFFReadRGBAStrip.3t</a>
-<li><A HREF=TIFFReadRGBATile.3t.html>TIFFReadRGBATile.3t</a>
-<li><A HREF=TIFFReadScanline.3t.html>TIFFReadScanline.3t</a>
-<li><A HREF=TIFFReadTile.3t.html>TIFFReadTile.3t</a>
-<li><A HREF=TIFFRGBAImage.3t.html>TIFFRGBAImage.3t</a>
-<li><A HREF=TIFFSetDirectory.3t.html>TIFFSetDirectory.3t</a>
-<li><A HREF=TIFFSetField.3t.html>TIFFSetField.3t</a>
-<li><A HREF=TIFFsize.3t.html>TIFFsize.3t</a>
-<li><A HREF=TIFFstrip.3t.html>TIFFstrip.3t</a>
-<li><A HREF=TIFFswab.3t.html>TIFFswab.3t</a>
-<li><A HREF=TIFFtile.3t.html>TIFFtile.3t</a>
-<li><A HREF=TIFFWarning.3t.html>TIFFWarning.3t</a>
-<li><A HREF=TIFFWriteDirectory.3t.html>TIFFWriteDirectory.3t</a>
-<li><A HREF=TIFFWriteEncodedStrip.3t.html>TIFFWriteEncodedStrip.3t</a>
-<li><A HREF=TIFFWriteEncodedTile.3t.html>TIFFWriteEncodedTile.3t</a>
-<li><A HREF=TIFFWriteRawStrip.3t.html>TIFFWriteRawStrip.3t</a>
-<li><A HREF=TIFFWriteRawTile.3t.html>TIFFWriteRawTile.3t</a>
-<li><A HREF=TIFFWriteScanline.3t.html>TIFFWriteScanline.3t</a>
-<li><A HREF=TIFFWriteTile.3t.html>TIFFWriteTile.3t</a>
-<li><A HREF=fax2ps.1.html>fax2ps.1</a>
-<li><A HREF=fax2tiff.1.html>fax2tiff.1</a>
-<li><A HREF=gif2tiff.1.html>gif2tiff.1</a>
-<li><A HREF=pal2rgb.1.html>pal2rgb.1</a>
-<li><A HREF=ppm2tiff.1.html>ppm2tiff.1</a>
-<li><A HREF=ras2tiff.1.html>ras2tiff.1</a>
-<li><A HREF=raw2tiff.1.html>raw2tiff.1</a>
-<li><A HREF=rgb2ycbcr.1.html>rgb2ycbcr.1</a>
-<li><A HREF=sgi2tiff.1.html>sgi2tiff.1</a>
-<li><A HREF=thumbnail.1.html>thumbnail.1</a>
-<li><A HREF=tiff2bw.1.html>tiff2bw.1</a>
-<li><A HREF=tiff2pdf.1.html>tiff2pdf.1</a>
-<li><A HREF=tiff2ps.1.html>tiff2ps.1</a>
-<li><A HREF=tiff2rgba.1.html>tiff2rgba.1</a>
-<li><A HREF=tiffcmp.1.html>tiffcmp.1</a>
-<li><A HREF=tiffcp.1.html>tiffcp.1</a>
-<li><A HREF=tiffdither.1.html>tiffdither.1</a>
-<li><A HREF=tiffdump.1.html>tiffdump.1</a>
-<li><A HREF=tiffgt.1.html>tiffgt.1</a>
-<li><A HREF=tiffinfo.1.html>tiffinfo.1</a>
-<li><A HREF=tiffmedian.1.html>tiffmedian.1</a>
-<li><A HREF=tiffsplit.1.html>tiffsplit.1</a>
-<li><A HREF=tiffsv.1.html>tiffsv.1</a>
-</ul></BODY></HTML>
diff --git a/tkimg1.3/libtiff/html/man/libtiff.3t.html b/tkimg1.3/libtiff/html/man/libtiff.3t.html
deleted file mode 100644
index 5e80d28..0000000
--- a/tkimg1.3/libtiff/html/man/libtiff.3t.html
+++ /dev/null
@@ -1,618 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>INTRO</title>
-</head>
-<body>
-
-<h1 align=center>INTRO</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#DATA TYPES">DATA TYPES</a><br>
-<a href="#LIST OF ROUTINES">LIST OF ROUTINES</a><br>
-<a href="#TAG USAGE">TAG USAGE</a><br>
-<a href="#PSEUDO TAGS">PSEUDO TAGS</a><br>
-<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-<a href="#BUGS">BUGS</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:19 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-libtiff - introduction to <i>libtiff</i>, a library for reading and writing <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>#include <tiffio.h></b><br>
-cc file.c <b>-ltiff</b></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>libtiff</i> is a library for reading and writing data
-files encoded with the <i>Tag Image File</i> format,
-Revision 6.0 (or revision 5.0 or revision 4.0). This file
-format is suitable for archiving multi-color and
-monochromatic image data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library supports several compression algorithms, as
-indicated by the <i>Compression</i> field, including: no
-compression (1), <small>CCITT</small> 1D Huffman compression
-(2), <small>CCITT</small> Group 3 Facsimile compression (3),
-<small>CCITT</small> Group 4 Facsimile compression (4),
-Lempel-Ziv & Welch compression (5), baseline JPEG
-compression (7), word-aligned 1D Huffman compression
-(32771), and PackBits compression (32773). In addition,
-several nonstandard compression algorithms are supported:
-the 4-bit compression algorithm used by the
-<i>ThunderScan</i> program (32809) (decompression only),
-NeXT's 2-bit compression algorithm (32766) (decompression
-only), an experimental LZ-style algorithm known as Deflate
-(32946), and an experimental CIE LogLuv compression scheme
-designed for images with high dynamic range (32845 for LogL
-and 32845 for LogLuv). Directory information may be in
-either little- or big-endian byte order-byte swapping is
-automatically done by the library. Data bit ordering may be
-either Most Significant Bit ( <small>MSB</small> ) to Least
-Significant Bit ( <small>LSB</small> ) or <small>LSB</small>
-to <small>MSB.</small> Finally, the library does not support
-files in which the <i>BitsPerSample</i>, <i>Compression</i>,
-<i>MinSampleValue</i>, or <i>MaxSampleValue</i> fields are
-defined differently on a per-sample basis (in Rev. 6.0 the
-<i>Compression</i> tag is not defined on a per-sample basis,
-so this is immaterial).</td></table>
-<a name="DATA TYPES"></a>
-<h2>DATA TYPES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library makes extensive use of C typedefs to promote
-portability. Two sets of typedefs are used, one for
-communication with clients of the library and one for
-internal data structures and parsing of the
-<small>TIFF</small> format. The following typedefs are
-exposed to users either through function definitions or
-through parameters passed through the varargs
-interfaces.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="18%"></td><td width="82%">
-<pre>typedef unsigned short uint16;      16-bit unsigned integer
-typedef unsigned <<i>thing</i>> uint32;    32-bit unsigned integer
-
-typedef unsigned int ttag_t;        directory tag
-typedef uint16 tdir_t;              directory index
-typedef uint16 tsample_t;           sample number
-typedef uint32 tstrip_t;            strip number
-typedef uint32 ttile_t;             tile number
-typedef int32 tsize_t;              i/o size in bytes
-typedef void* tdata_t;              image data ref
-typedef void* thandle_t;            client data handle
-typedef int32 toff_t;               file offset
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Note that <i>tstrip_t</i>, <i>ttile_t</i>, and
-<i>tsize_t</i> are constrained to be no more than 32-bit
-quantities by 32-bit fields they are stored in in the
-<small>TIFF</small> image. Likewise <i>tsample_t</i> is
-limited by the 16-bit field used to store the
-<i>SamplesPerPixel</i> tag. <i>tdir_t</i> constrains the
-maximum number of <small>IFDs</small> that may appear in an
-image and may be an arbitrary size (w/o penalty).
-<i>ttag_t</i> must be either int, unsigned int, pointer, or
-double because the library uses a varargs interface and
-<small>ANSI C</small> restricts the type of the parameter
-before an ellipsis to be a promoted type. <i>toff_t</i> is
-defined as int32 because TIFF file offsets are (unsigned)
-32-bit quantities. A signed value is used because some
-interfaces return -1 on error. Finally, note that
-user-specified data references are passed as opaque handles
-and only cast at the lowest layers where their type is
-presumed.</td></table>
-<a name="LIST OF ROUTINES"></a>
-<h2>LIST OF ROUTINES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following routines are part of the library. Consult
-specific manual pages for details on their operation. The
-manual page names listed below are for systems where the
-full function names can not be encoded in the filesystem; on
-most systems doing ``man function-name'' will
-work.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-<i>Name                   Appears on Page  Description
-
-</i>TIFFCheckpointDirectory writedir.3t     writes the current state of the directory
-TIFFCheckTile          tile.3t          very x,y,z,sample is within image
-TIFFCIELabToRGBInit    color.3t         initialize CIE L*a*b* 1976 to RGB conversion state
-TIFFCIELabToXYZ        color.3t         perform CIE L*a*b* 1976 to CIE XYZ conversion
-TIFFClientOpen         open.3t          open a file for reading or writing
-TIFFClose              close.3t         close an open file
-TIFFComputeStrip       strip.3t         return strip containing y,sample
-TIFFComputeTile        tile.3t          return tile containing x,y,z,sample
-TIFFCurrentDirectory   query.3t         return index of current directory
-TIFFCurrentRow         query.3t         return index of current scanline
-TIFFCurrentStrip       query.3t         return index of current strip
-TIFFCurrentTile        query.3t         return index of current tile
-TIFFDataWidth          width.3t         return the size of TIFF data types
-TIFFError              error.3t         library error handler
-TIFFFdOpen             open.3t          open a file for reading or writing
-TIFFFileName           query.3t         return name of open file
-TIFFFileno             query.3t         return open file descriptor
-TIFFFindCODEC          codec.3t         find standard codec for the specific scheme
-TIFFFlush              flush.3t         flush all pending writes
-TIFFFlushData          flush.3t         flush pending data writes
-TIFFGetBitRevTable     swab.3t          return bit reversal table
-TIFFGetField           getfield.3t      return tag value in current directory
-TIFFGetFieldDefaulted  getfield.3t      return tag value in current directory
-TIFFGetMode            query.3t         return open file mode
-TIFFGetVersion         query.3t         return library version string
-TIFFIsCODECConfigured  codec.3t         check, whether we have working codec
-TIFFIsTiled            query.3t         return true if image data is tiled
-TIFFIsByteSwapped      query.3t         return true if image data is byte-swapped
-TIFFNumberOfStrips     strip.3t         return number of strips in an image
-TIFFNumberOfTiles      tile.3t          return number of tiles in an image
-TIFFOpen               open.3t          open a file for reading or writing
-TIFFPrintDirectory     print.3t         print description of the current directory
-TIFFReadBufferSetup    rdbuf.3t         specify i/o buffer for reading
-TIFFReadDirectory      readdir.3t       read the next directory
-TIFFReadEncodedStrip   rdestrip.3t      read and decode a strip of data
-TIFFReadEncodedTile    rdetile.3t       read and decode a tile of data
-TIFFReadRawStrip       rdrstrip.3t      read a raw strip of data
-TIFFReadRawTile        rdrtile.3t       read a raw tile of data
-TIFFReadRGBAImage      rdimage.3t       read an image into a fixed format raster
-TIFFReadScanline       readline.3t      read and decode a row of data
-TIFFReadTile           readtile.3t      read and decode a tile of data
-TIFFRegisterCODEC      codec.3t         override standard codec for the specific scheme
-TIFFReverseBits        swab.3t          reverse bits in an array of bytes
-TIFFRGBAImageBegin     rgbaimage.3t     setup decoder state for TIFFRGBAImageGet
-TIFFRGBAImageEnd       rgbaimage.3t     release TIFFRGBAImage decoder state
-TIFFRGBAImageGet       rgbaimage.3t     read and decode an image
-TIFFRGBAImageOK        rgbaimage.3t     is image readable by TIFFRGBAImageGet
-TIFFScanlineSize       size.3t          return size of a scanline
-TIFFSetDirectory       setdir.3t        set the current directory
-TIFFSetSubDirectory    setdir.3t        set the current directory
-TIFFSetErrorHandler    error.3t         set error handler function
-TIFFSetField           setfield.3t      set a tag's value in the current directory
-TIFFSetWarningHandler  error.3t         set warning handler function
-TIFFStripSize          strip.3t         returns size of a strip
-TIFFRawStripSize       strip.3t         returns the number of bytes in a raw strip
-TIFFSwabShort          swab.3t          swap bytes of short
-TIFFSwabLong           swab.3t          swap bytes of long
-TIFFSwabArrayOfShort   swab.3t          swap bytes of an array of shorts
-TIFFSwabArrayOfLong    swab.3t          swap bytes of an array of longs
-TIFFTileRowSize        size.3t          return size of a row in a tile
-TIFFTileSize           size.3t          return size of a tile
-TIFFUnRegisterCODEC    codec.3t         unregisters the codec
-TIFFVGetField          getfield.3t      return tag value in current directory
-TIFFVGetFieldDefaulted getfield.3t      return tag value in current directory
-TIFFVSetField          setfield.3t      set a tag's value in the current directory
-TIFFVStripSize         strip.3t         returns the number of bytes in a strip
-TIFFWarning            warning.3t       library warning handler
-TIFFWriteDirectory     writedir.3t      write the current directory
-TIFFWriteEncodedStrip  wrestrip.3t      compress and write a strip of data
-TIFFWriteEncodedTile   wretile.3t       compress and write a tile of data
-TIFFWriteRawStrip      wrrstrip.3t      write a raw strip of data
-TIFFWriteRawTile       wrrtile.3t       write a raw tile of data
-TIFFWriteScanline      writeline.3t     write a scanline of data
-TIFFWriteTile          wrrtile.3t       compress and write a tile of data
-TIFFXYZToRGB           color.3t         perform CIE XYZ to RGB conversion
-TIFFYCbCrToRGBInit     color.3t         initialize YCbCr to RGB conversion state
-TIFFYCbCrtoRGB         color.3t         perform YCbCr to RGB conversion
-</pre></td></table>
-<a name="TAG USAGE"></a>
-<h2>TAG USAGE</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The table below lists the <small>TIFF</small> tags that are
-recognized and handled by the library. If no use is
-indicated in the table, then the library reads and writes
-the tag, but does not use it internally. Note that some tags
-are meaningful only when a particular compression scheme is
-being used; e.g. <i>Group3Options</i> is only useful if
-<i>Compression</i> is set to <small>CCITT</small> Group 3
-encoding. Tags of this sort are considered
-<i>codec-specific</i> tags and the library does not
-recognize them except when the <i>Compression</i> tag has
-been previously set to the relevant compression
-scheme.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-<i>Tag Name                Value  R/W  Library Use/Notes
-
-</i>Artist                  315    R/W
-BadFaxLines             326    R/W
-BitsPerSample           258    R/W  lots
-CellLength              265         parsed but ignored
-CellWidth               264         parsed but ignored
-CleanFaxData            327    R/W
-ColorMap                320    R/W
-ColorResponseUnit       300         parsed but ignored
-Compression             259    R/W  choosing codec
-ConsecutiveBadFaxLines  328    R/W
-Copyright       33432   R/W
-DataType                32996  R    obsoleted by SampleFormat tag
-DateTime                306    R/W
-DocumentName            269    R/W
-DotRange                336    R/W
-ExtraSamples            338    R/W  lots
-FaxRecvParams           34908  R/W
-FaxSubAddress           34909  R/W
-FaxRecvTime             34910  R/W
-FillOrder               266    R/W  control bit order
-FreeByteCounts          289         parsed but ignored
-FreeOffsets             288         parsed but ignored
-GrayResponseCurve       291         parsed but ignored
-GrayResponseUnit        290         parsed but ignored
-Group3Options           292    R/W  used by Group 3 codec
-Group4Options           293    R/W
-HostComputer            316    R/W
-ImageDepth              32997  R/W  tile/strip calculations
-ImageDescription        270    R/W
-ImageLength             257    R/W  lots
-ImageWidth              256    R/W  lots
-InkNames                333    R/W
-InkSet                  332    R/W
-JPEGTables              347    R/W  used by JPEG codec
-Make                    271    R/W
-Matteing                32995  R    obsoleted by ExtraSamples tag
-MaxSampleValue          281    R/W
-MinSampleValue          280    R/W
-Model                   272    R/W
-NewSubFileType          254    R/W  called SubFileType in spec
-NumberOfInks            334    R/W
-Orientation             274    R/W
-PageName                285    R/W
-PageNumber              297    R/W
-PhotometricInterpretation      262  R/Wused by Group 3 and JPEG codecs
-PlanarConfiguration     284    R/W  data i/o
-Predictor               317    R/W  used by LZW and Deflate codecs
-PrimaryChromacities     319    R/W
-ReferenceBlackWhite     532    R/W
-ResolutionUnit          296    R/W  used by Group 3 codec
-RowsPerStrip            278    R/W  data i/o
-SampleFormat            339    R/W
-SamplesPerPixel         277    R/W  lots
-SMinSampleValue         340    R/W
-SMaxSampleValue         341    R/W
-Software                305    R/W
-StoNits                 37439  R/W
-StripByteCounts         279    R/W  data i/o
-StripOffsets            273    R/W  data i/o
-SubFileType             255    R/W  called OSubFileType in spec
-TargetPrinter           337    R/W
-Thresholding            263    R/W
-TileByteCounts          324    R/W  data i/o
-TileDepth               32998  R/W  tile/strip calculations
-TileLength              323    R/W  data i/o
-TileOffsets             324    R/W  data i/o
-TileWidth               322    R/W  data i/o
-TransferFunction        301    R/W
-WhitePoint              318    R/W
-XPosition               286    R/W
-XResolution             282    R/W
-YCbCrCoefficients       529    R/W  used by TIFFRGBAImage support
-YCbCrPositioning        531    R/W  tile/strip size calulcations
-YCbCrSubsampling        530    R/W
-YPosition               286    R/W
-YResolution             283    R/W  used by Group 3 codec
-</pre></td></table>
-<a name="PSEUDO TAGS"></a>
-<h2>PSEUDO TAGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-In addition to the normal <small>TIFF</small> tags the
-library supports a collection of tags whose values lie in a
-range outside the valid range of <small>TIFF</small> tags.
-These tags are termed <i>pseud-tags</i> and are used to
-control various codec-specific functions within the library.
-The table below summarizes the defined
-pseudo-tags.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<pre>
-<i>Tag Name                Codec  R/W  Library Use/Notes
-
-</i>TIFFTAG_FAXMODE         G3     R/W  general codec operation
-TIFFTAG_FAXFILLFUNC     G3/G4  R/W  bitmap fill function
-TIFFTAG_JPEGQUALITY     JPEG   R/W  compression quality control
-TIFFTAG_JPEGCOLORMODE   JPEG   R/W  control colorspace conversions
-TIFFTAG_JPEGTABLESMODE  JPEG   R/W  control contents of <i>JPEGTables</i> tag
-TIFFTAG_ZIPQUALITY      Deflate     R/Wcompression quality level
-TIFFTAG_PIXARLOGDATAFMT PixarLog    R/Wuser data format
-TIFFTAG_PIXARLOGQUALITY PixarLog    R/Wcompression quality level
-TIFFTAG_SGILOGDATAFMT   SGILog R/W  user data format
-</pre><b>TIFFTAG_FAXMODE</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the operation of the Group 3 codec. Possible values
-(independent bits that can be combined by or'ing them
-together) are: FAXMODE_CLASSIC (enable old-style format in
-which the <small>RTC</small> is written at the end of the
-last strip), FAXMODE_NORTC (opposite of FAXMODE_CLASSIC;
-also called FAXMODE_CLASSF), FAXMODE_NOEOL (do not write
-<small>EOL</small> codes at the start of each row of data),
-FAXMODE_BYTEALIGN (align each encoded row to an 8-bit
-boundary), FAXMODE_WORDALIGN (align each encoded row to an
-16-bit boundary), The default value is dependent on the
-compression scheme; this pseudo-tag is used by the various
-G3 and G4 codecs to share code.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_FAXFILLFUNC</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the function used to convert arrays of black and
-white runs to packed bit arrays. This hook can be used to
-image decoded scanlines in multi-bit depth rasters (e.g. for
-display in colormap mode) or for other purposes. The default
-value is a pointer to a builtin function that images packed
-bilevel data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_IPTCNEWSPHOTO</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Tag contaings image metadata per the IPTC newsphoto spec:
-Headline, captioning, credit, etc... Used by most wire
-services.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_PHOTOSHOP</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Tag contains Photoshop captioning information and metadata.
-Photoshop uses in parallel and redundantly alongside
-IPTCNEWSPHOTO information.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_JPEGQUALITY</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the compression quality level used in the baseline
-algorithm. Note that quality levels are in the range 0-100
-with a default value of 75.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_JPEGCOLORMODE</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control whether or not conversion is done between RGB and
-YCbCr colorspaces. Possible values are: JPEGCOLORMODE_RAW
-(do not convert), and JPEGCOLORMODE_RGB (convert to/from
-RGB) The default value is JPEGCOLORMODE_RAW.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_JPEGTABLESMODE</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the information written in the <i>JPEGTables</i>
-tag. Possible values (independent bits that can be combined
-by or'ing them together) are: JPEGTABLESMODE_QUANT (include
-quantization tables), and JPEGTABLESMODE_HUFF (include
-Huffman encoding tables). The default value is
-JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_ZIPQUALITY</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the compression technique used by the Deflate codec.
-Quality levels are in the range 1-9 with larger numbers
-yielding better compression at the cost of more computation.
-The default quality level is 6 which yields a good
-time-space tradeoff.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_PIXARLOGDATAFMT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the format of user data passed <i>in</i> to the
-PixarLog codec when encoding and passed <i>out</i> from when
-decoding. Possible values are: PIXARLOGDATAFMT_8BIT for
-8-bit unsigned pixels, PIXARLOGDATAFMT_8BITABGR for 8-bit
-unsigned ABGR-ordered pixels, PIXARLOGDATAFMT_11BITLOG for
-11-bit log-encoded raw data, PIXARLOGDATAFMT_12BITPICIO for
-12-bit PICIO-compatible data, PIXARLOGDATAFMT_16BIT for
-16-bit signed samples, and PIXARLOGDATAFMT_FLOAT for 32-bit
-IEEE floating point samples.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_PIXARLOGQUALITY</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the compression technique used by the PixarLog
-codec. This value is treated identically to
-TIFFTAG_ZIPQUALITY; see the above description.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>TIFFTAG_SGILOGDATAFMT</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Control the format of client data passed <i>in</i> to the
-SGILog codec when encoding and passed <i>out</i> from when
-decoding. Possible values are: SGILOGDATAFMT_FLTXYZ for
-converting between LogLuv and 32-bit IEEE floating valued
-XYZ pixels, SGILOGDATAFMT_16BITLUV for 16-bit encoded Luv
-pixels, SGILOGDATAFMT_32BITRAW and SGILOGDATAFMT_24BITRAW
-for no conversion of data, SGILOGDATAFMT_8BITRGB for
-returning 8-bit RGB data (valid only when decoding
-LogLuv-encoded data), SGILOGDATAFMT_FLTY for converting
-between LogL and 32-bit IEEE floating valued Y pixels,
-SGILOGDATAFMT_16BITL for 16-bit encoded L pixels, and
-SGILOGDATAFMT_8BITGRY for returning 8-bit greyscale data
-(valid only when decoding LogL-encoded data).</td></table>
-<a name="DIAGNOSTICS"></a>
-<h2>DIAGNOSTICS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All error messages are directed through the <i>TIFFError</i>
-routine. By default messages are directed to <b>stderr</b>
-in the form: <i>module: messagen.</i> Warning messages are
-likewise directed through the <i>TIFFWarning</i>
-routine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>fax2tiff</i>(1), <i>gif2tiff</i>(1), <i>pal2rgb</i>(1),
-<i>ppm2tiff</i>(1), <i>rgb2ycbcr</i>(1), <i>ras2tiff</i>(1),
-<i>raw2tiff</i>(1), <i>sgi2tiff</i>(1), <i>tiff2bw</i>(1),
-<i>tiffdither</i>(1), <i>tiffdump</i>(1), <i>tiffcp</i>(1),
-<i>tiffcmp</i>(1), <i>tiffgt</i>(1), <i>tiffinfo</i>(1),
-<i>tiffmedian</i>(1), <i>tiffsplit</i>(1),
-<i>tiffsv</i>(1),</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Tag Image File Format Specification -- Revision 6.0</i>,
-an Aldus Technical Memorandum.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>The Spirit of TIFF Class F</i>, an appendix to the TIFF
-5.0 specification prepared by Cygnet
-Technologies.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library does not support multi-sample images where some
-samples have different bits/sample.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The library does not support random access to compressed
-data that is organized with more than one row per tile or
-strip. The library discards unknown tags. The library should
-do more validity checking of a directory's
-contents.</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/pal2rgb.1.html b/tkimg1.3/libtiff/html/man/pal2rgb.1.html
deleted file mode 100644
index 0b1a2f7..0000000
--- a/tkimg1.3/libtiff/html/man/pal2rgb.1.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>PAL2RGB</title>
-</head>
-<body>
-
-<h1 align=center>PAL2RGB</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:31 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-pal2rgb - convert a palette color <small>TIFF</small> image to a full color image</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>pal2rgb</b> [ <i>options</i> ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Pal2rgb</i> converts a palette color <small>TIFF</small>
-image to a full color image by applying the colormap of the
-palette image to each sample to generate a full color
-<small>RGB</small> image.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Options that affect the interpretation of input data
-are:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-C</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-This option overrides the default behaviour of
-<i>pal2rgb</i> in determining whether or not colormap
-entries contain 16-bit or 8-bit values. By default the
-colormap is inspected and if no colormap entry greater than
-255 is found, the colormap is assumed to have only 8-bit
-values; otherwise 16-bit values (as required by the
-<small>TIFF</small> specification) are assumed. The
-<b>-C</b> option can be used to explicitly specify the
-number of bits for colormap entries: <b>-C 8</b> for 8-bit
-values, <b>-C 16</b> for 16-bit values.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Options that affect the output file format are:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Explicitly select the planar configuration used in
-organizing data samples in the output image: <b>-p
-contig</b> for samples packed contiguously, and <b>-p
-separate</b> for samples stored separately. By default
-samples are packed.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use the specific compression algorithm to encoded image data
-in the output file: <b>-c packbits</b> for Macintosh
-Packbits, <b>-c lzw</b> for Lempel-Ziv & Welch, <b>-c
-zip</b> for Deflate, <b>-c none</b> for no compression. If
-no compression-related option is specified, the input file's
-compression algorithm is used.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Explicitly specify the number of rows in each strip of the
-output file. If the <b>-r</b> option is not specified, a
-number is selected such that each output strip has
-approximately 8 kilobytes of data in it.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Only 8-bit images are handled.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>tiffcp</i>(1), <i>tiffmedian</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/ppm2tiff.1.html b/tkimg1.3/libtiff/html/man/ppm2tiff.1.html
deleted file mode 100644
index a0bf1db..0000000
--- a/tkimg1.3/libtiff/html/man/ppm2tiff.1.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>PPM2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>PPM2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:31 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-ppm2tiff - create a <small>TIFF</small> file from a <small>PPM</small> image file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ppm2tiff</b> [ <i>options</i> ] [ <i>input.ppm</i> ]
-<i>output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>ppm2tiff</i> converts a file in the <small>PPM</small>
-image format to <small>TIFF.</small> By default, the
-<small>TIFF</small> image is created with data samples
-packed (<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv & Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can be overriden, or explicitly specified
-with the options described below</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the <small>PPM</small> file contains greyscale data, then
-the <i>PhotometricInterpretation</i> tag is set to 1
-(min-is-black), otherwise it is set to 2 (RGB).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If no <small>PPM</small> file is specified on the command
-line, <i>ppm2tiff</i> will read from the standard
-input.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm (the default), <b>-c
-jpeg</b> for the baseline JPEG compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, and <b>-c
-lzw</b> for Lempel-Ziv & Welch compression.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-R</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Mark the resultant image to have the specified X and Y
-resolution (in dots/inch).</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>tiffcp</i>(1), <i>tiffmedian</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/ras2tiff.1.html b/tkimg1.3/libtiff/html/man/ras2tiff.1.html
deleted file mode 100644
index 139e786..0000000
--- a/tkimg1.3/libtiff/html/man/ras2tiff.1.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>RAS2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>RAS2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:31 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-ras2tiff - create a <small>TIFF</small> file from a Sun rasterfile</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>ras2tiff</b> [ <i>options</i> ] <i>input.ras
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>ras2tiff</i> converts a file in the Sun rasterfile format
-to <small>TIFF.</small> By default, the <small>TIFF</small>
-image is created with data samples packed
-(<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv & Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can overriden, or explicitly specified with
-the options described below.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Any colormap information in the rasterfile is carried over
-to the <small>TIFF</small> file by including a
-<i>Colormap</i> tag in the output file. If the rasterfile
-has a colormap, the <i>PhotometricInterpretation</i> tag is
-set to 3 (palette); otherwise it is set to 2 (RGB) if the
-depth is 24 or 1 (min-is-black) if the depth is not
-24.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm, <b>-c jpeg</b> for the
-baseline JPEG compression algorithm, <b>-c zip</b> for the
-Deflate compression algorithm, and <b>-c lzw</b> for
-Lempel-Ziv & Welch (the default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Does not handle all possible rasterfiles. In particular,
-<i>ras2tiff</i> does not handle run-length encoded
-images.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/raw2tiff.1.html b/tkimg1.3/libtiff/html/man/raw2tiff.1.html
deleted file mode 100644
index 204bafa..0000000
--- a/tkimg1.3/libtiff/html/man/raw2tiff.1.html
+++ /dev/null
@@ -1,275 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>RAW2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>RAW2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#GUESSING THE IMAGE GEOMETRY">GUESSING THE IMAGE GEOMETRY</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:32 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-raw2tiff - create a <small>TIFF</small> file from a raw data</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>raw2tiff</b> [ <i>options</i> ] <i>input.raw
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>raw2tiff</i> converts a raw byte sequence into
-<small>TIFF.</small> By default, the <small>TIFF</small>
-image is created with data samples packed
-(<i>PlanarConfiguration</i>=1), compressed with the PackBits
-algorithm (<i>Compression</i>=<i>32773),</i> and with each
-strip no more than 8 kilobytes. These characteristics can
-overridden, or explicitly specified with the options
-described below.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-H <number></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-size of input image file header in bytes (0 by default).
-This amount of data just will be skipped from the start of
-file while reading.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w <number></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-width of input image in pixels (can be guessed, see
-<b><small>GUESSING THE IMAGE GEOMETRY</small></b>
-below).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l <number></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-length of input image in lines(can be guessed, see
-<b><small>GUESSING THE IMAGE GEOMETRY</small></b>
-below).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-b <number></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-number of bands in input image (1 by default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-d data_type</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-type of samples in input image, where <b>data_type</b> may
-be:<i><br>
-byte</i> 8-bit unsigned integer (default),<i><br>
-short</i> 16-bit unsigned integer,<i><br>
-long</i> 32-bit unsigned integer,<i><br>
-sbyte</i> 8-bit signed integer,<i><br>
-sshort</i> 16-bit signed integer,<i><br>
-slong</i> 32-bit signed integer,<i><br>
-float</i> 32-bit IEEE floating point,<i><br>
-double</i> 64-bit IEEE floating point,</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-i config</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-type of samples interleaving in input image, where
-<b>config</b> may be:<i><br>
-pixel</i> pixel interleaved data (default),<i><br>
-band</i> band interleaved data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p photo</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-photometric interpretation (color space) of the input image,
-where <b>photo</b> may be:<i><br>
-miniswhite</i> white color represented with 0 value,<i><br>
-minisblack</i> black color represented with 0 value
-(default),<i><br>
-rgb</i> image has RGB color model,<i><br>
-cmyk</i> image has CMYK (separated) color model,<i><br>
-ycbcr</i> image has YCbCr color model,<i><br>
-cielab</i> image has CIE L*a*b color model,<i><br>
-icclab</i> image has ICC L*a*b color model,<i><br>
-itulab</i> image has ITU L*a*b color model,</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-swap bytes fetched from the input file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-L</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-input data has LSB2MSB bit order (default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-M</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-input data has MSB2LSB bit order.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm (the default), <b>-c
-jpeg</b> for the baseline JPEG compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, and <b>-c
-lzw</b> for Lempel-Ziv & Welch.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r <number></b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-<a name="GUESSING THE IMAGE GEOMETRY"></a>
-<h2>GUESSING THE IMAGE GEOMETRY</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>raw2tiff</i> can guess image width and height in case one
-or both of these parameters are not specified. If you omit
-one of those parameters, the complementary one will be
-calculated based on the file size (taking into account
-header size, number of bands and data type). If you omit
-both parameters, the statistical approach will be used.
-Utility will compute correlation coefficient between two
-lines at the image center using several appropriate line
-sizes and the highest absolute value of the coefficient will
-indicate the right line size. That is why you should be
-cautious with the very large images, because guessing
-process may take a while (depending on your system
-perfomance). Of course, the utility can't guess the header
-size, number of bands and data type, so it should be
-specified manually. If you don't know anything about your
-image, just try with the several combinations of those
-options.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-There is no magic, it is just a mathematical statistics, so
-it can be wrong in some cases. But for most ordinary images
-guessing method will work fine.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/rgb2ycbcr.1.html b/tkimg1.3/libtiff/html/man/rgb2ycbcr.1.html
deleted file mode 100644
index 1a34759..0000000
--- a/tkimg1.3/libtiff/html/man/rgb2ycbcr.1.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>RGB2YCBCR</title>
-</head>
-<body>
-
-<h1 align=center>RGB2YCBCR</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:32 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-rgb2ycbcr - convert non-YCbCr <small>TIFF</small> images to a YCbCr <small>TIFF</small> image</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>rgb2ycbcr</b> [ <i>options</i> ] <i>src1.tif src2.tif ...
-dst.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>rgb2ycbcr</i> converts <small>RGB</small> color,
-greyscale, or bi-level <small>TIFF</small> images to YCbCr
-images by transforming and sampling pixel data. If multiple
-files are specified on the command line each source file is
-converted to a separate directory in the destination
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default, chrominance samples are created by sampling 2 by
-2 blocks of luminance values; this can be changed with the
-<b>-h</b> and <b>-v</b> options. Output data are compressed
-with the <small>PackBits</small> compression scheme, by
-default; an alternate scheme can be selected with the
-<b>-c</b> option. By default, output data are compressed in
-strips with the number of rows in each strip selected so
-that the size of a strip is never more than 8 kilobytes; the
-<b>-r</b> option can be used to explicitly set the number of
-rows per strip.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm (the default), <b>-c
-jpeg</b> for the JPEG compression algorithm, <b>-c zip</b>
-for the deflate compression algorithm, and <b>-c lzw</b> for
-Lempel-Ziv & Welch.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-h</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the horizontal sampling dimension to one of: 1, 2
-(default), or 4.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-v</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the vertical sampling dimension to one of: 1, 2
-(default), or 4.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/sgi2tiff.1.html b/tkimg1.3/libtiff/html/man/sgi2tiff.1.html
deleted file mode 100644
index 71fd78f..0000000
--- a/tkimg1.3/libtiff/html/man/sgi2tiff.1.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>SGI2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>SGI2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:32 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-sgi2tiff - create a <small>TIFF</small> file from an <small>SGI</small> image file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>sgi2tiff</b> [ <i>options</i> ] <i>input.rgb
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>sgi2tiff</i> converts a file in the <small>SGI</small>
-image format to <small>TIFF.</small> By default, the
-<small>TIFF</small> image is created with data samples
-packed (<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv & Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can overriden, or explicitly specified with
-the options described below.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm), <b>-c jpeg</b> for the
-baseline JPEG compression algorithm, <b>-c zip</b> for the
-Deflate compression algorithm, and <b>-c lzw</b> for
-Lempel-Ziv & Welch (the default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Explicitly select the planar configuration used in
-organizing data samples in the output image: <b>-p
-contig</b> for samples packed contiguously, and <b>-p
-separate</b> for samples stored separately. By default
-samples are packed.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Does not record colormap information.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>tiffcp</i>(1), <i>tiffmedian</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/thumbnail.1.html b/tkimg1.3/libtiff/html/man/thumbnail.1.html
deleted file mode 100644
index 3df1a1a..0000000
--- a/tkimg1.3/libtiff/html/man/thumbnail.1.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>THUMBNAIL</title>
-</head>
-<body>
-
-<h1 align=center>THUMBNAIL</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:32 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-thumbnail - create a <small>TIFF</small> file with thumbnail images</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>thumbnail</b> [ <i>options</i> ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>thumbnail</i> is a program written to show how one might
-use the SubIFD tag (#330) to store thumbnail images.
-<i>thumbnail</i> copies a <small>TIFF</small> Class F
-facsimile file to the output file and for each image an
-8-bit greyscale <i>thumbnail sketch</i>. The output file
-contains the thumbnail image with the associated
-full-resolution page linked below with the SubIFD
-tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default, thumbnail images are 216 pixels wide by 274
-pixels high. Pixels are calculated by sampling and filtering
-the input image with each pixel value passed through a
-contrast curve.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the width of thumbnail images in
-pixels.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-h</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the height of thumbnail images in
-pixels.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a contrast curve to apply in generating the
-thumbnail images. By default pixels values are passed
-through a linear contrast curve that simply maps the pixel
-value ranges. Alternative curves are: <b>exp50</b> for a 50%
-exponential curve, <b>exp60</b> for a 60% exponential curve,
-<b>exp70</b> for a 70% exponential curve, <b>exp80</b> for a
-80% exponential curve, <b>exp90</b> for a 90% exponential
-curve, <b>exp</b> for a pure exponential curve,
-<b>linear</b> for a linear curve.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-There are no options to control the format of the saved
-thumbnail images.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffdump</i>(1), <i>tiffgt</i>(1), <i>tiffinfo</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiff2bw.1.html b/tkimg1.3/libtiff/html/man/tiff2bw.1.html
deleted file mode 100644
index 6f9c758..0000000
--- a/tkimg1.3/libtiff/html/man/tiff2bw.1.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFF2BW</title>
-</head>
-<body>
-
-<h1 align=center>TIFF2BW</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:33 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiff2bw - convert a color <small>TIFF</small> image to greyscale</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiff2bw</b> [ options ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Tiff2bw</i> converts an <small>RGB</small> or Palette
-color <small>TIFF</small> image to a greyscale image by
-combining percentages of the red, green, and blue channels.
-By default, output samples are created by taking 28% of the
-red channel, 59% of the green channel, and 11% of the blue
-channel. To alter these percentages, the <b>-R</b>,
-<b>-G</b>, and <b>-B</b> options may be used.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression, <b>-c packbits</b> for
-the PackBits compression algorithm, <b>-c zip</b> for the
-Deflate compression algorithm, <b>-c g3</b> for the CCITT
-Group 3 compression algorithm, <b>-c g4</b> for the CCITT
-Group 4 compression algorithm, and <b>-c lzw</b> for
-Lempel-Ziv & Welch (the default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-R</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the percentage of the red channel to use (default
-28).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-G</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the percentage of the green channel to use (default
-59).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-B</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the percentage of the blue channel to use (default
-11).</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiff2pdf.1.html b/tkimg1.3/libtiff/html/man/tiff2pdf.1.html
deleted file mode 100644
index 8878da2..0000000
--- a/tkimg1.3/libtiff/html/man/tiff2pdf.1.html
+++ /dev/null
@@ -1,503 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFF2PDF</title>
-</head>
-<body>
-
-<h1 align=center>TIFF2PDF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#EXAMPLES">EXAMPLES</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:33 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiff2pdf - convert a TIFF image to a PDF document</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiff2pdf [</b> <i>options</i> <b>]</b>
-<i>input.tiff</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiff2pdf</b> opens a TIFF image and writes a PDF document
-to standard output.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The program converts one TIFF file to one PDF file,
-including multiple page TIFF files, tiled TIFF files, black
-and white. grayscale, and color TIFF files that contain data
-of TIFF photometric interpretations of bilevel, grayscale,
-RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by
-<i>libtiff</i> and PDF.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If you have multiple TIFF files to convert into one PDF file
-then use <i>tiffcp</i> or other program to concatenate the
-files into a multiple page TIFF file. If the input TIFF file
-is of huge dimensions (greater than 10000 pixels height or
-width) convert the input image to a tiled TIFF if it is not
-already.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The standard output is standard output. Set the output file
-name with the <b>-o</b><i>output.pdf</i>
-option.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-All black and white files are compressed into a single strip
-CCITT G4 Fax compressed PDF, unless tiled, where tiled black
-and white images are compressed into tiled CCITT G4 Fax
-compressed PDF, <i>libtiff</i> CCITT support is
-assumed.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Color and grayscale data can be compressed using either JPEG
-compression, ITU-T T.81, or Zip/Deflate LZ77 compression.
-Set the compression type using the <b>-j</b> or <b>-z</b>
-options. JPEG compression support requires that
-<i>libtiff</i> be configured with JPEG support, and
-Zip/Deflate compression support requires that <i>libtiff</i>
-be configured with Zip support, in tiffconf.h. Use only one
-or the other of <b>-j</b> and <b>-z.</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the input TIFF contains single strip CCITT G4 Fax
-compressed information, then that is written to the PDF file
-without transcoding, unless the options of no compression
-and no passthrough are set, <b>-d</b> and
-<b>-n.</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the input TIFF contains JPEG or single strip Zip/Deflate
-compressed information, and they are configured, then that
-is written to the PDF file without transcoding, unless the
-options of no compression and no passthrough are
-set.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The default page size upon which the TIFF image is placed is
-determined by the resolution and extent of the image data.
-Default values for the TIFF image resolution can be set
-using the <b>-x</b> and <b>-y</b> options. The page size can
-be set using the <b>-p</b> option for paper size, or
-<b>-w</b> and <b>-l</b> for paper width and length, then
-each page of the TIFF image is centered on its page. The
-distance unit for default resolution and page width and
-length can be set by the <b>-u</b> option, the default unit
-is inch.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Various items of the output document information can be set
-with the <b>-e, -c, -a, -t, -s,</b> and <b>-k</b> options.
-Setting the argument of the option to "" for these
-tags causes the relevant document information field to be
-not written. Some of the document information values
-otherwise get their information from the input TIFF image,
-the software, author, document name, and image
-description.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The Portable Document Format (PDF) specification is
-copyrighted by Adobe Systems, Incorporated.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b><i>output-file</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the output to go to file <i>output-file</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-j</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Compress with JPEG (requires libjpeg configured with
-libtiff).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-z</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Compress with Zip/Deflate (requires zlib configured with
-libtiff).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-q</b><i>quality</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the compression quality, 1-100 for JPEG.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-n</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Do not allow data to be converted without uncompressing, no
-compressed data passthrough.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-d</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Do not compress (decompress).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-i</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Invert colors.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b><i>paper-size</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set paper size, eg "letter", "legal",
-"A4".</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-u</b><i>[i|m]</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set distance unit, <i>i</i> for inch, <i>m</i> for
-centimeter.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w</b><i>width</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set width in units.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b><i>length</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set length in units.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-x</b><i>xres</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set x/width resolution default.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-y</b><i>yres</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set y/length resolution default.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b><i>[d|o]</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set <i>d</i> for resolution default for images without
-resolution, <i>o for resolution override for all
-images.</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set PDF "Fit Window" user preference</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-e</b><i>YYYYMMDDHHMMSS</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information date, overrides image or current
-date/time default, <i>YYYYMMDDHHMMSS.</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b><i>creator</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information creator, overrides image software
-default.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-a</b><i>author</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information author, overrides image artist
-default</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-t</b><i>title</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information title, overrides image document
-name default</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b><i>subject</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information subject, overrides image image
-description default</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-k</b><i>keywords</i></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set document information keywords.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-h</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-List usage reminder to stderr and exit.</td></table>
-<a name="EXAMPLES"></a>
-<h2>EXAMPLES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following example would generate the file output.pdf
-from input.tiff.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-tiff2pdf -o output.pdf input.tiff</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following example would generate PDF output from
-input.tiff and write it to standard output.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-tiff2pdf input.tiff</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following example would generate the file output.pdf
-from input.tiff, putting the image pages on a letter sized
-page, compressing the output with JPEG, with JPEG quality
-75, setting the title to "Document", and setting
-the "Fit Window" option.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-tiff2pdf -p letter -j -q 75 -t "Document" -f -o
-output.pdf input.tiff</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Please report bugs via the web interface at</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-
-http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>libtiff</b>(3)<b>, tiffcp</b>(1)<b>,
-tiff2ps</b>(1)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiff2ps.1.html b/tkimg1.3/libtiff/html/man/tiff2ps.1.html
deleted file mode 100644
index 2fbece4..0000000
--- a/tkimg1.3/libtiff/html/man/tiff2ps.1.html
+++ /dev/null
@@ -1,506 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFF2PS</title>
-</head>
-<body>
-
-<h1 align=center>TIFF2PS</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#EXAMPLES">EXAMPLES</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:33 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiff2ps - convert a <small>TIFF</small> image to P <small>OST</small> S <small>CRIPT</small></td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiff2ps</b> [ <i>options</i> ] <i>input.tif
-...</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiff2ps</i> reads <small>TIFF</small> images and writes P
-<small>OST</small> S <small>CRIPT</small> or Encapsulated P
-<small>OST</small> S <small>CRIPT</small> (EPS) on the
-standard output. By default, <i>tiff2ps</i> writes
-Encapsulated P <small>OST</small> S <small>CRIPT</small> for
-the first image in the specified <small>TIFF</small> image
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default, <i>tiff2ps</i> will generate P
-<small>OST</small> S <small>CRIPT</small> that fills a
-printed area specified by the <small>TIFF</small> tags in
-the input file. If the file does not contain
-<i>XResolution</i> or <i>YResolution</i> tags, then the
-printed area is set according to the image dimensions. The
-<b>-w</b> and <b>-h</b> options (see below) can be used to
-set the dimensions of the printed area in inches; overriding
-any relevant <small>TIFF</small> tags.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The P <small>OST</small> S <small>CRIPT</small> generated
-for <small>RGB,</small> palette, and <small>CMYK</small>
-images uses the <i>colorimage</i> operator. The P
-<small>OST</small> S <small>CRIPT</small> generated for
-greyscale and bilevel images uses the <i>image</i> operator.
-When the <i>colorimage</i> operator is used, P
-<small>OST</small> S <small>CRIPT</small> code to emulate
-this operator on older P <small>OST</small> S
-<small>CRIPT</small> printers is also generated. Note that
-this emulation code can be very slow.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Color images with associated alpha data are composited over
-a white background.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-1</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate P <small>OST</small> S <small>CRIPT</small> Level 1
-(the default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-2</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate P <small>OST</small> S <small>CRIPT</small> Level
-2.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-3</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate P <small>OST</small> S <small>CRIPT</small> Level
-3. It basically allows one to use the /flateDecode filter
-for ZIP compressed TIFF images.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-a</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate output for all IFDs (pages) in the input
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-b</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the bottom margin for the output (in inches). This
-does not affect the height of the printed
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Center the image in the output. This option only shows an
-effect if both the -w and the -h option are
-given.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-d</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the initial <small>TIFF</small> directory to the
-specified directory number. (NB: directories are numbered
-starting at zero.) This option is useful for selecting
-individual pages in a multi-page (e.g. facsimile)
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-e</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the generation of Encapsulated P <small>OST</small> S
-<small>CRIPT</small> (implies -z).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-h</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the vertical size of the printed area (in
-inches).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-H</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the maximum height of image (in inches). Images with
-larger sizes will be splitted in several pages. Option
-<b>-L</b> may be used for specifying size of splitted images
-overlapping.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-i</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable/disable pixel interpolation. This option requires a
-single numeric value: zero to disable pixel interpolation
-and non-zero to enable. The default is enabled.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-L</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the size of overlapping for splitted images (in
-inches). Used in conjuction with <b>-H</b>
-option.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the left margin for the output (in inches). This
-does not affect the width of the printed image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-m</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Where possible render using the <b>imagemask</b> P
-<small>OST</small> S <small>CRIPT</small> operator instead
-of the image operator. When this option is specified
-<i>tiff2ps</i> will use <b>imagemask</b> for rendering 1 bit
-deep images. If this option is not specified or if the image
-depth is greater than 1 then the image operator is
-used.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the initial <small>TIFF</small> directory to the
-<small>IFD</small> at the specified file offset. This option
-is useful for selecting thumbnail images and the like which
-are hidden using the SubIFD tag.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the generation of (non-Encapsulated) P
-<small>OST</small> S <small>CRIPT</small> .</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Rotate image by 180 degrees.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Generate output for a single IFD (page) in the input
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the horizontal size of the printed area (in
-inches).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-x</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Override resolution units specified in the TIFF as
-centimeters.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-y</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Override resolution units specified in the TIFF as
-inches.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-z</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-When generating P <small>OST</small> S <small>CRIPT</small>
-Level 2, data is scaled so that it does not image into the
-<i>deadzone</i> on a page (the outer margin that the
-printing device is unable to mark). This option suppresses
-this behaviour. When P <small>OST</small> S
-<small>CRIPT</small> Level 1 is generated, data is imaged to
-the entire printed page and this option has no
-affect.</td></table>
-<a name="EXAMPLES"></a>
-<h2>EXAMPLES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following generates P <small>OST</small> S
-<small>CRIPT</small> Level 2 for all pages of a
-facsimile:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiff2ps -a2 fax.tif | lpr
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Note also that if you have version 2.6.1 or newer of
-Ghostscript then you can efficiently preview facsimile
-generated with the above command.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-To generate Encapsulated P <small>OST</small> S
-<small>CRIPT</small> for a the image at directory 2 of an
-image use:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiff2ps -d 1 foo.tif
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-(notice that directories are numbered starting at
-zero.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If you have a long image, it may be splitted in several
-pages:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiff2ps -h11 -w8.5 -H14 -L.5 foo.tif > foo.ps
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The page size is set to 8.5x11 by <b>-w</b> and <b>-h</b>
-options. We will accept a small amount of vertical
-compression, so <b>-H</b> set to 14. Any pages between 11
-and 14 inches will be fit onto one page. Pages longer than
-14 inches are cut off at 11 and continued on the next page.
-The <b>-L.5</b> option says to repeat a half inch on the
-next page (to improve readability).</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Because P <small>OST</small> S <small>CRIPT</small> does not
-support the notion of a colormap, 8-bit palette images
-produce 24-bit P <small>OST</small> S <small>CRIPT</small>
-images. This conversion results in output that is six times
-bigger than the original image and which takes a long time
-to send to a printer over a serial line. Matters are even
-worse for 4-, 2-, and 1-bit palette images.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Does not handle tiled images when generating PS Level I
-output.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffgt</i>(1), <i>tiffmedian</i>(1), <i>tiff2bw</i>(1),
-<i>tiffsv</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiff2rgba.1.html b/tkimg1.3/libtiff/html/man/tiff2rgba.1.html
deleted file mode 100644
index de31dfb..0000000
--- a/tkimg1.3/libtiff/html/man/tiff2rgba.1.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFF2RGBA</title>
-</head>
-<body>
-
-<h1 align=center>TIFF2RGBA</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:34 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiff2rgba - convert a <small>TIFF</small> image to RGBA color space</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiff2rgba</b> [ options ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Tiff2rgba</i> converts a wide variety of TIFF images into
-an RGBA TIFF image. This includes the ability to translate
-different color spaces and photometric interpretation into
-RGBA, support for alpha blending, and translation of many
-different bit depths into a 32bit RGBA image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Internally this program is implemented using the
-<i>TIFFReadRGBAImage()</i> function, and it suffers any
-limitations of that image. This includes limited support for
-> 8 BitsPerSample images, and flaws with some esoteric
-combinations of BitsPerSample, photometric interpretation,
-block organization and planar configuration.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The generated images are stripped images with four samples
-per pixel (red, green, blue and alpha) or if the -n flag is
-used, three samples per pixel (red, green, and blue). The
-resulting images are always planar configuration contiguous.
-For this reason, this program is a useful utility for
-transform exotic TIFF files into a form ingestable by almost
-any TIFF supporting software.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify a compression scheme to use when writing image data:
-<b>-c none</b> for no compression (the default), <b>-c
-packbits</b> for the PackBits compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, <b>-c
-jpeg</b> for the JPEG compression algorithm, and <b>-c
-lzw</b> for Lempel-Ziv & Welch.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-b</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Process the image one block (strip/tile) at a time instead
-of by reading the whole image into memory at once. This may
-be necessary for very large images on systems with limited
-RAM.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-n</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Drop the alpha component from the output file, producing a
-pure RGB file. Currently this does not work if the -b flag
-is also in effect.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiff2bw</i>(1), <i>TIFFReadRGBAImage</i>(3t),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffcmp.1.html b/tkimg1.3/libtiff/html/man/tiffcmp.1.html
deleted file mode 100644
index 608f03b..0000000
--- a/tkimg1.3/libtiff/html/man/tiffcmp.1.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFCMP</title>
-</head>
-<body>
-
-<h1 align=center>TIFFCMP</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:34 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffcmp - compare two <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffcmp</b> [ <i>options</i> ] <i>file1.tif
-file2.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Tiffcmp</i> compares the tags and data in two files
-created according to the Tagged Image File Format, Revision
-6.0. The schemes used for compressing data in each file are
-immaterial when data are compared-data are compared on a
-scanline-by-scanline basis after decompression. Most
-directory tags are checked; notable exceptions are:
-<i>GrayResponseCurve</i>, <i>ColorResponseCurve</i>, and
-<i>ColorMap</i> tags. Data will not be compared if any of
-the <i>BitsPerSample</i>, <i>SamplesPerPixel</i>, or
-<i>ImageWidth</i> values are not equal. By default,
-<i>tiffcmp</i> will terminate if it encounters any
-difference.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-List each byte of image data that differs between the
-files.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-z number</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-List specified number of image data bytes that differs
-between the files.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-t</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Ignore any differences in directory tags.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Tags that are not recognized by the library are not
-compared; they may also generate spurious
-diagnostics.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The image data of tiled files is not compared, since the
-TIFFReadScanline() function is used. A error will be
-reported for tiled files.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The pixel and/or sample number reported in differences may
-be off in some exotic cases.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffcp.1.html b/tkimg1.3/libtiff/html/man/tiffcp.1.html
deleted file mode 100644
index b17d1a6..0000000
--- a/tkimg1.3/libtiff/html/man/tiffcp.1.html
+++ /dev/null
@@ -1,422 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFCP</title>
-</head>
-<body>
-
-<h1 align=center>TIFFCP</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#EXAMPLES">EXAMPLES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:34 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffcp - copy (and possibly convert) a <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffcp</b> [ <i>options</i> ] <i>src1.tif ... srcN.tif
-dst.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffcp</i> combines one or more files created according
-to the Tag Image File Format, Revision 6.0 into a single
-<small>TIFF</small> file. Because the output file may be
-compressed using a different algorithm than the input files,
-<i>tiffcp</i> is most often used to convert between
-different compression schemes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-By default, <i>tiffcp</i> will copy all the understood tags
-in a <small>TIFF</small> directory of an input file to the
-associated directory in the output file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffcp</i> can be used to reorganize the storage
-characteristics of data in a file, but it is explicitly
-intended to not alter or convert the image data content in
-any way.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-b image</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-subtract the following monochrome image from all others
-processed. This can be used to remove a noise bias from a
-set of images. This bias image is typlically an image of
-noise the camera saw with its shutter closed.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-B</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be written with Big-Endian byte order. This
-option only has an effect when the output file is created or
-overwritten and not when it is appended to.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-C</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Suppress the use of ``strip chopping'' when reading images
-that have a single strip/tile of uncompressed
-data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the compression to use for data written to the
-output file: <b>none</b> for no compression, <b>packbits</b>
-for PackBits compression, <b>lzw</b> for Lempel-Ziv &
-Welch compression, <b>jpeg</b> for baseline JPEG
-compression, <b>zip</b> for Deflate compression, <b>g3</b>
-for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
-Group 4 (T.6) compression. By default <i>tiffcp</i> will
-compress data according to the value of the
-<i>Compression</i> tag found in the source
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-The <small>CCITT</small> Group 3 and Group 4 compression
-algorithms can only be used with bilevel data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Group 3 compression can be specified together with several
-T.4-specific options: <b>1d</b> for 1-dimensional encoding,
-<b>2d</b> for 2-dimensional encoding, and <b>fill</b> to
-force each encoded scanline to be zero-filled so that the
-terminating EOL code lies on a byte boundary. Group
-3-specific options are specified by appending a
-``:''-separated list to the ``g3'' option; e.g. <b>-c
-g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
-codes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<small>LZW</small> compression can be specified together
-with a <i>predictor</i> value. A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value of 1 forces each
-scanline to be encoded without differencing. LZW-specific
-options are specified by appending a ``:''-separated list to
-the ``lzw'' option; e.g. <b>-c lzw:2</b> for
-<small>LZW</small> compression with horizontal
-differencing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the bit fill order to use in writing output data. By
-default, <i>tiffcp</i> will create a new file with the same
-fill order as the original. Specifying <b>-f lsb2msb</b>
-will force data to be written with the FillOrder tag set to
-<small>LSB2MSB,</small> while <b>-f msb2lsb</b> will force
-data to be written with the FillOrder tag set to
-<small>MSB2LSB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the length of a tile (in pixels). <i>tiffcp</i>
-attempts to set the tile dimensions so that no more than 8
-kilobytes of data appear in a tile.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-L</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force output to be written with Little-Endian byte order.
-This option only has an effect when the output file is
-created or overwritten and not when it is appended
-to.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-M</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Suppress the use of memory-mapped files when reading
-images.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the planar configuration to use in writing image
-data that has one 8-bit sample per pixel. By default,
-<i>tiffcp</i> will create a new file with the same planar
-configuration as the original. Specifying <b>-p contig</b>
-will force data to be written with multi-sample data packed
-together, while <b>-p separate</b> will force samples to be
-written in separate planes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the number of rows (scanlines) in each strip of data
-written to the output file. By default (or when value
-<b>0</b> is specified), <i>tiffcp</i> attempts to set the
-rows/strip that no more than 8 kilobytes of data appear in a
-strip. If you specify special value <b>-1</b> it will
-results in infinite number of the rows per strip. The entire
-image will be the one strip in that case.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the output file to be written with data organized in
-strips (rather than tiles).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-t</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the output file to be written wtih data organized in
-tiles (rather than strips). options can be used to force the
-resultant image to be written as strips or tiles of data,
-respectively.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the width of a tile (in pixels). <i>tiffcp</i>
-attempts to set the tile dimensions so that no more than 8
-kilobytes of data appear in a tile. <i>tiffcp</i> attempts
-to set the tile dimensions so that no more than 8 kilobytes
-of data appear in a tile.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-,={character}</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-substitute {character} for ',' in parsing image directory
-indices in files. This is necessary if filenames contain
-commas. Note that ',=' with whitespace immediately following
-will disable the special meaning of the ',' entirely. See
-examples.</td></table>
-<a name="EXAMPLES"></a>
-<h2>EXAMPLES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The following concatenates two files and writes the result
-using <small>LZW</small> encoding:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiffcp -c lzw a.tif b.tif result.tif
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-To convert a G3 1d-encoded <small>TIFF</small> to a single
-strip of G4-encoded data the following might be
-used:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiffcp -c g4 -r 10000 g3.tif g4.tif
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-(1000 is just a number that is larger than the number of
-rows in the source file.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-To extract a selected set of images from a multi-image TIFF
-file, the file name may be immediately followed by a ','
-separated list of image directory indices. The first image
-is always in directory 0. Thus, to copy the 1st and 3rd
-images of image file "album.tif" to
-"result.tif":</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiffcp album.tif,0,2 result.tif
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Given file "CCD.tif" whose first image is a noise
-bias followed by images which include that bias, subtract
-the noise from all those images following it (while
-decompressing) with the command:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If the file above were named "CCD,X.tif", the
-"-,=" option would be required to correctly parse
-this filename with image numbers, as follows:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<pre>tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
-</pre></td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcmp</i>(1),
-<i>tiffmedian</i>(1), <i>tiffsplit</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffdither.1.html b/tkimg1.3/libtiff/html/man/tiffdither.1.html
deleted file mode 100644
index d27e0b7..0000000
--- a/tkimg1.3/libtiff/html/man/tiffdither.1.html
+++ /dev/null
@@ -1,155 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFDITHER</title>
-</head>
-<body>
-
-<h1 align=center>TIFFDITHER</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:34 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffdither - convert a greyscale image to bilevel using dithering</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffdither</b> [ <i>options</i> ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffdither</i> converts a single channel 8-bit greyscale
-image to a bilevel image using Floyd-Steinberg error
-propagation with threholding.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the compression to use for data written to the
-output file: <b>none</b> for no compression, <b>packbits</b>
-for PackBits compression, <b>lzw</b> for Lempel-Ziv &
-Welch compression, <b>zip</b> for Deflate compression,
-<b>g3</b> for CCITT Group 3 (T.4) compression, and <b>g4</b>
-for CCITT Group 4 (T.6) compression. By default
-<i>tiffdither</i> will compress data according to the value
-of the <i>Compression</i> tag found in the source
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-The <small>CCITT</small> Group 3 and Group 4 compression
-algorithms can only be used with bilevel data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Group 3 compression can be specified together with several
-T.4-specific options: <b>1d</b> for 1-dimensional encoding,
-<b>2d</b> for 2-dimensional encoding, and <b>fill</b> to
-force each encoded scanline to be zero-filled so that the
-terminating EOL code lies on a byte boundary. Group
-3-specific options are specified by appending a
-``:''-separated list to the ``g3'' option; e.g. <b>-c
-g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
-codes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<small>LZW</small> compression can be specified together
-with a <i>predictor</i> value. A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value of 1 forces each
-scanline to be encoded without differencing. LZW-specific
-options are specified by appending a ``:''-separated list to
-the ``lzw'' option; e.g. <b>-c lzw:2</b> for
-<small>LZW</small> compression with horizontal
-differencing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the bit fill order to use in writing output data. By
-default, <i>tiffdither</i> will create a new file with the
-same fill order as the original. Specifying <b>-f
-lsb2msb</b> will force data to be written with the FillOrder
-tag set to <small>LSB2MSB ,</small> while <b>-f msb2lsb</b>
-will force data to be written with the FillOrder tag set to
-<small>MSB2LSB .</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-t</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the threshold value for dithering. By default the
-threshold value is 128.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-The dither algorithm is taken from the <i>tiffmedian</i>(1)
-program (written by Paul Heckbert).</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>fax2tiff</i>(1), <i>tiffinfo</i>(1),
-<i>tiffcp</i>(1), <i>tiff2bw</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffdump.1.html b/tkimg1.3/libtiff/html/man/tiffdump.1.html
deleted file mode 100644
index 8addb93..0000000
--- a/tkimg1.3/libtiff/html/man/tiffdump.1.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFDUMP</title>
-</head>
-<body>
-
-<h1 align=center>TIFFDUMP</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:35 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffdump - print verbatim information about <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffdump</b> [ <i>options</i> ] <i>name
-...</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffdump</i> displays directory information from files
-created according to the Tag Image File Format, Revision
-6.0. The header of each <small>TIFF</small> file (magic
-number, version, and first directory offset) is displayed,
-followed by the tag contents of each directory in the file.
-For each tag, the name, datatype, count, and value(s) is
-displayed. When the symbolic name for a tag or datatype is
-known, the symbolic name is displayed followed by it's
-numeric (decimal) value. Tag values are displayed enclosed
-in ``<>'' characters immediately preceded by the value
-of the count field. For example, an <i>ImageWidth</i> tag
-might be displayed as ``ImageWidth (256) SHORT (3)
-1<800>''.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffdump</i> is particularly useful for investigating the
-contents of <small>TIFF</small> files that <i>libtiff</i>
-does not understand.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-h</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force numeric data to be printed in hexadecimal rather than
-the default decimal.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Dump the contents of the <small>IFD</small> at the a
-particular file offset. The file offset may be specified
-using the usual C-style syntax; i.e. a leading ``0x'' for
-hexadecimal and a leading ``0'' for octal.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffinfo</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffgt.1.html b/tkimg1.3/libtiff/html/man/tiffgt.1.html
deleted file mode 100644
index 0da02e0..0000000
--- a/tkimg1.3/libtiff/html/man/tiffgt.1.html
+++ /dev/null
@@ -1,469 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFGT</title>
-</head>
-<body>
-
-<h1 align=center>TIFFGT</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:35 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffgt - display an image stored in a <small>TIFF</small> file (Silicon Graphics version)</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffgt</b> [ <i>options</i> ] <i>input.tif
-...</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffgt</i> displays one or more images stored using the
-Tag Image File Format, Revision 6.0. Each image is placed in
-a fixed size window that the user must position on the
-display (unless configured otherwise through X defaults). If
-the display has fewer than 24 bitplanes, or if the image
-does not warrant full color, then <small>RGB</small> color
-values are mapped to the closest values that exist in the
-colormap (this is done using the <i>rgbi</i> routine found
-in the graphics utility library
-<b>-lgutil</b>.)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffgt</i> correctly handles files with any of the
-following characteristics:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="18%"></td><td width="82%">
-<pre>BitsPerSample              1, 2, 4, 8, 16
-SamplesPerPixel            1, 3, 4 (the 4th sample is ignored)
-PhotometricInterpretation  0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr)
-PlanarConfiguration        1 (contiguous), 2 (separate)
-Orientation                1 (top-left), 4 (bottom-left)
-</pre></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Data may be organized as strips or tiles and may be
-compressed with any of the compression algorithms supported
-by the <i>libtiff</i>(3) library.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-For palette images (<i>PhotomatricInterpretation</i>=3),
-<i>tiffgt</i> inspects the colormap values and assumes
-either 16-bit or 8-bit values according to the maximum
-value. That is, if no colormap entry greater than 255 is
-found, <i>tiffgt</i> assumes the colormap has only 8-bit
-values; otherwise it assumes 16-bit values. This inspection
-is done to handle old images written by previous (incorrect)
-versions of <i>libtiff</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffgt</i> can be used to display multiple images
-one-at-a-time. The left mouse button switches the display to
-the first image in the <i>next</i> file in the list of files
-specified on the command line. The right mouse button
-switches to the first image in the <i>previous</i> file in
-the list. The middle mouse button causes the first image in
-the first file specified on the command line to be
-displayed. In addition the following keyboard commands are
-recognized:</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>b</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a <i>PhotometricIntepretation</i> of MinIsBlack in
-displaying the current image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a <i>FillOrder</i> of lsb-to-msb in decoding the current
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>m</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a <i>FillOrder</i> of msb-tolmsb in decoding the current
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a colormap visual to display the current
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a true color (24-bit RGB) visual to display the current
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>w</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Use a <i>PhotometricIntepretation</i> of MinIsWhite in
-displaying the current image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>W</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Toggle (enable/disable) display of warning messages from the
-<small>TIFF</small> library when decoding
-images.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>E</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Toggle (enable/disable) display of error messages from the
-<small>TIFF</small> library when decoding
-images.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>z</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Reset all parameters to their default settings
-(<i>FillOrder</i>, <i>PhotometricInterpretation</i>,
-handling of warnings and errors).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>PageUp</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the previous image in the current file or the last
-image in the previous file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>PageDown</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the next image in the current file or the first
-image in the next file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>Home</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the first image in the current file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>End</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the last image in the current file
-(unimplemented).</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force image display in a colormap window.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-d</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify an image to display by directory number. By default
-the first image in the file is displayed. Directories are
-numbered starting at zero.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-e</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable reporting of error messages from the
-<small>TIFF</small> library. By default <i>tiffgt</i>
-silently ignores images that cannot be read.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force <i>tiffgt</i> to run as a foreground process. By
-default <i>tiffgt</i> will place itself in the background
-once it has opened the requested image file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-l</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the presumed bit ordering to be <small>LSB</small> to
-<small>MSB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-m</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force the presumed bit ordering to be <small>MSB</small> to
-<small>LSB.</small></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify an image to display by directory offset. By default
-the first image in the file is displayed. Directories
-offsets may be specified using C-style syntax; i.e. a
-leading ``0x'' for hexadecimal and a leading ``0'' for
-octal.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Override the value of the <i>PhotometricInterpretation</i>
-tag; the parameter may be one of: <i>miniswhite</i>,
-<i>minisblack</i>, <i>rgb</i>, <i>palette</i>, <i>mask</i>,
-<i>separated</i>, <i>ycbcr</i>, and
-<i>cielab</i>.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Force image display in a full color window.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Stop on the first read error. By default all errors in the
-input data are ignored and <i>tiffgt</i> does it's best to
-display as much of an image as possible.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-w</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable reporting of warning messages from the
-<small>TIFF</small> library. By default <i>tiffgt</i>
-ignores warning messages generated when reading an
-image.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-v</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Place information in the title bar describing what type of
-window (full color or colormap) is being used, the name of
-the input file, and the directory index of the image (if
-non-zero). By default, the window type is not shown in the
-title bar.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Images wider and taller than the display are silently
-truncated to avoid crashing old versions of the window
-manager.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffdump</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffinfo.1.html b/tkimg1.3/libtiff/html/man/tiffinfo.1.html
deleted file mode 100644
index 52db59d..0000000
--- a/tkimg1.3/libtiff/html/man/tiffinfo.1.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFINFO</title>
-</head>
-<body>
-
-<h1 align=center>TIFFINFO</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:35 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffinfo - print information about <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffinfo</b> [ <i>options</i> ] <i>input.tif
-...</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>Tiffinfo</i> displays information about files created
-according to the Tag Image File Format, Revision 6.0. By
-default, the contents of each <small>TIFF</small> directory
-in each file is displayed, with the value of each tag shown
-symbolically (where sensible).</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the colormap and color/gray response curves, if
-present.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-D</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-In addition to displaying the directory tags, read and
-decompress all the data in each image (but not display
-it).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-d</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-In addition to displaying the directory tags, print each
-byte of decompressed data in hexadecimal.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-j</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display any <small>JPEG</small> -related tags that are
-present.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-o</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the initial <small>TIFF</small> directory according to
-the specified file offset. The file offset may be specified
-using the usual C-style syntax; i.e. a leading ``0x'' for
-hexadecimal and a leading ``0'' for octal.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-s</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Display the offsets and byte counts for each data strip in a
-directory.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-z</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Enable strip chopping when reading image data.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-#</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Set the initial <small>TIFF</small> directory to
-<i>#</i>.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffcp</i>(1), <i>tiffcmp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffmedian.1.html b/tkimg1.3/libtiff/html/man/tiffmedian.1.html
deleted file mode 100644
index 41ddfc7..0000000
--- a/tkimg1.3/libtiff/html/man/tiffmedian.1.html
+++ /dev/null
@@ -1,153 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFMEDIAN</title>
-</head>
-<body>
-
-<h1 align=center>TIFFMEDIAN</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:35 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffmedian - apply the median cut algorithm to data in a <small>TIFF</small> file</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffmedian</b> [ <i>options</i> ] <i>input.tif
-output.tif</i></td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffmedian</i> applies the median cut algorithm to an
-<small>RGB</small> image in <i>input.tif</i> to generate a
-palette image that is written to <i>output.tif</i>. The
-generated colormap has, by default, 256 entries. The image
-data is quantized by mapping each pixel to the closest color
-values in the colormap.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the compression to use for data written to the
-output file: <b>none</b> for no compression, <b>packbits</b>
-for PackBits compression, <b>lzw</b> for Lempel-Ziv &
-Welch compression, and <b>zip</b> for Deflate compression.
-By default <i>tiffmedian</i> will compress data according to
-the value of the <i>Compression</i> tag found in the source
-file.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<small>LZW</small> compression can be specified together
-with a <i>predictor</i> value. A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value of 1 forces each
-scanline to be encoded without differencing. LZW-specific
-options are specified by appending a ``:''-separated list to
-the ``lzw'' option; e.g. <b>-c lzw:2</b> for
-<small>LZW</small> compression with horizontal
-differencing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-C</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the number of entries to use in the generated
-colormap. By default all 256 entries/colors are
-used.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-f</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Apply Floyd-Steinberg dithering before selecting a colormap
-entry.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the number of rows (scanlines) in each strip of data
-written to the output file. By default, <i>tiffmedian</i>
-attempts to set the rows/strip that no more than 8 kilobytes
-of data appear in a strip.</td></table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-This program is derived from Paul Heckbert's <i>median</i>
-program.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>pal2rgb</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffcmp</i>(1), <i>libtiff</i>(3)</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-"Color Image Quantization for Frame Buffer
-Display", Paul Heckbert, SIGGRAPH proceedings, 1982,
-pp. 297-307.</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffsplit.1.html b/tkimg1.3/libtiff/html/man/tiffsplit.1.html
deleted file mode 100644
index 00d608f..0000000
--- a/tkimg1.3/libtiff/html/man/tiffsplit.1.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFCP</title>
-</head>
-<body>
-
-<h1 align=center>TIFFCP</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:36 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffsplit - split a multi-image <small>TIFF</small> into single-image <small>TIFF</small> files</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffsplit</b> <i>src.tif</i> [ <i>prefix</i>
-]</td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffsplit</i> takes a multi-directory (page)
-<small>TIFF</small> file and creates one or more
-single-directory (page) <small>TIFF</small> files from it.
-The output files are given names created by concatenating a
-prefix, a lexically ordered suffix in the range
-[<i>aa</i>-<i>zz</i>], the suffix <i>.tif</i> (e.g.
-<i>xaa.tif</i>, <i>xab.tif</i>, <i>xzz.tif</i>). If a prefix
-is not specified on the command line, the default prefix of
-<i>x</i> is used.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-None.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Only a select set of ``known tags'' is copied when
-spliting.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffcp</i>(1), <i>tiffinfo</i>(1),
-<i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/man/tiffsv.1.html b/tkimg1.3/libtiff/html/man/tiffsv.1.html
deleted file mode 100644
index 74ef2fa..0000000
--- a/tkimg1.3/libtiff/html/man/tiffsv.1.html
+++ /dev/null
@@ -1,168 +0,0 @@
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSV</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSV</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTE">NOTE</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<!-- Creator     : groff version 1.17.2 -->
-<!-- CreationDate: Mon Dec 22 00:39:36 2003 -->
-<a name="NAME"></a>
-<h2>NAME</h2>
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-tiffsv - save an image from the framebuffer in a <small>TIFF</small> file (Silicon Graphics version)</td></table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>tiffsv</b> [ <i>options</i> ] <i>output.tif</i> [ <i>x1
-x2 y1 y2</i> ]</td></table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>tiffsv</i> saves all or part of the framebuffer in a file
-using the Tag Image File Format, Revision 6.0. By default,
-the image is saved with data samples packed
-(<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv & Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can be overriden, or explicitly specified
-with the options described below.</td></table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-b</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Save the image as a greyscale image as if it were processed
-by <i>tiff2bw</i>(1). This option is included for
-compatibility with the standard <i>scrsave</i>(6D)
-program.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-c</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the compression to use for data written to the
-output file: <b>none</b> for no compression, <b>packbits</b>
-for PackBits compression, <b>jpeg</b> for baseline JPEG
-compression, <b>zip</b> for Deflate compression, and
-<b>lzw</b> for Lempel-Ziv & Welch compression
-(default).</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-<small>LZW</small> compression can be specified together
-with a <i>predictor</i> value. A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value of 1 forces each
-scanline to be encoded without differencing. LZW-specific
-options are specified by appending a ``:''-separated list to
-the ``lzw'' option; e.g. <b>-c lzw:2</b> for
-<small>LZW</small> compression with horizontal
-differencing.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-p</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the planar configuration to use in writing image
-data. By default, <i>tiffsv</i> will create a new file with
-the data samples packed contiguously. Specifying <b>-p
-contig</b> will force data to be written with multi-sample
-data packed together, while <b>-p separate</b> will force
-samples to be written in separate planes.</td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<b>-r</b></td></table>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="21%"></td><td width="79%">
-Specify the number of rows (scanlines) in each strip of data
-written to the output file. By default, <i>tiffsv</i>
-attempts to set the rows/strip that no more than 8 kilobytes
-of data appear in a strip.</td></table>
-<a name="NOTE"></a>
-<h2>NOTE</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-Except for the use of <small>TIFF,</small> this program is
-equivalent to the standard <i>scrsave</i> program. This
-means, for example, that you can use it in conjunction with
-the standard <i>icut</i> program simply by creating a link
-called <i>scrsave</i>, or by creating a shell script called
-<i>scrsave</i> that invokes <i>tiffgt</i> with the
-appropriate options.</td></table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-If data are saved compressed and in separate planes, then
-the rows in each strip is silently set to one to avoid
-limitations in the <i>libtiff</i>(3) library.</td></table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-
-<table width="100%" border=0 rules="none" frame="void"
-       cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td><td width="90%">
-<i>scrsave</i>(6D) <i>pal2rgb</i>(1), <i>tiffdump</i>(1),
-<i>tiffgt</i>(1), <i>tiffinfo</i>(1), <i>tiffcp</i>(1),
-<i>tiffmedian</i>(1), <i>libtiff</i>(3)</td></table>
-<hr>
-</body>
-</html>
diff --git a/tkimg1.3/libtiff/html/misc.html b/tkimg1.3/libtiff/html/misc.html
deleted file mode 100644
index 202ef26..0000000
--- a/tkimg1.3/libtiff/html/misc.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Acknowledgments and Other Issues
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Helvetica, Sans"> 
-<H1>
-<IMG SRC=images/ring.gif WIDTH=124 HEIGHT=124 ALIGN=left BORDER=1 HSPACE=6>
-Acknowledgments and Other Issues
-</H1>
-
-<P>
-Silicon Graphics has seen fit to allow us to give this work away.  It
-is free.  There is no support or guarantee of any sort as to its
-operations, correctness, or whatever.  If you do anything useful with
-all or parts of it you need to honor the copyright notices.  It would
-also be nice to be acknowledged.<p>
-
-<BR CLEAR=left>
-
-<H2>Acknowledgements</H2>
-
-The libtiff software was written by Sam Leffler while working for
-Silicon Graphics.<p>
-
-The LZW algorithm is derived from the compress program (the proper
-attribution is included in the source code).  The Group 3 fax stuff
-originated as code from Jef Poskanzer, but has since been rewritten
-several times.  The latest version uses an algorithm from Frank
-Cringle -- consult <TT>libtiff/mkg3states.c</TT> and
-<TT>libtiff/tif_fax3.h</TT> for further information.
-The JPEG support was written by Tom Lane and is dependent on the
-excellent work of Tom Lane and the Independent JPEG Group (IJG)
-who distribute their work under friendly licensing similar to this
-software.
-Many other people have by now helped with bug fixes and code; a
-few of the more persistent contributors have been:
-
-<PRE>
-    Bjorn P. Brox
-    Dan McCoy
-    J.T. Conklin                
-    Richard Minner
-    Frank D. Cringle        
-    Richard Mlynarik
-    Soren Pingel Dalsgaard  
-    Niles Ritter
-    Steve Johnson           
-    Karsten Spang
-    Tom Lane               
-    Peter Smith
-    Brent Roman            
-    Mike Welles
-    Frank Warmerdam
-    Greg Ward
-    Stanislav Brabec        
-    Roman Shpount
-    Peter Skarpetis        
-    Arvan Pritchard
-    Bernt Herd             
-    Joseph Orost
-    Phil Beffery           
-    Ivo Penzar
-    Francois Dagand        
-    Albert Chin-A-Young
-    Bruce A. Mallett
-    Dwight Kelly
-    Andrey Kiselev
-    Ross Finlayson
-</PRE>
-
-(my apology to anyone that was inadvertently not listed.)
-
-<H2>Warning</H2>
-
-It appears that Unisys is actively pursuing copyright control on the
-LZW compression algorithm.  In particular, users of the LZW compression
-within the TIFF framework.  For this reason the TIFF 6.0 spec states
-that LZW compression is not recommended.  It is unclear at this time
-what compression algorithm will be used in place of it.  I have no idea
-what this means to you or to this library.  I make no warranty or
-guarantees with regard to the LZW support in this library.
-
-<H2>Use and Copyright</H2>
-
-<P><H5><PRE>
-Copyright (c) 1988-1997 Sam Leffler
-Copyright (c) 1991-1997 Silicon Graphics, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software and 
-its documentation for any purpose is hereby granted without fee, provided
-that (i) the above copyright notices and this permission notice appear in
-all copies of the software and related documentation, and (ii) the names of
-Sam Leffler and Silicon Graphics may not be used in any advertising or
-publicity relating to the software without the specific, prior written
-permission of Sam Leffler and Silicon Graphics.
-
-THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-
-IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-OF THIS SOFTWARE.
-</PRE></H5>
-
-<P>
-<HR>
-
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/support.html b/tkimg1.3/libtiff/html/support.html
deleted file mode 100644
index 822adb2..0000000
--- a/tkimg1.3/libtiff/html/support.html
+++ /dev/null
@@ -1,682 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-TIFF 6.0 Specification Coverage
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=white> 
-<FONT FACE="Arial, Sans, Helvetica"> 
-<H1>
-<IMG SRC=images/strike.gif WIDTH=128 HEIGHT=100 ALIGN=left HSPACE=6>
-TIFF 6.0 Specification Coverage
-</H1>
-
-
-<P>
-The library is capable of dealing with images that are written to
-follow the 5.0 or 6.0 TIFF spec.  There is also considerable support
-for some of the more esoteric portions of the 6.0 TIFF spec. 
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR>
-<TD VALIGN=top>
-<I>Core requirements</I>
-</TD>
-<TD>
-Both <TT>"MM"</TT> and <TT>"II"</TT> byte orders are handled.
-Both packed and separated planar configuration of samples.
-Any number of samples per pixel (memory permitting).
-Any image width and height (memory permitting).
-Multiple subfiles can be read and written.
-Editing is <B>not</B> supported in that related subfiles (e.g.
-a reduced resolution version of an image) are not automatically
-updated.
-<P>
-Tags handled:
-<TT>ExtraSamples</TT>,
-<TT>ImageWidth</TT>,
-<TT>ImageLength</TT>,
-<TT>NewSubfileType</TT>,
-<TT>ResolutionUnit</TT>.
-<TT>Rowsperstrip</TT>,
-<TT>StripOffsets</TT>,
-<TT>StripByteCounts</TT>,
-<TT>XResolution</TT>,
-<TT>YResolution</TT>,
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Tiled Images</I></TD>
-<TD><TT>TileWidth</TT>,
-    <TT>TileLength</TT>,
-    <TT>TileOffsets</TT>,
-    <TT>TileByteCounts</TT>
-</TD>
-</TR>
-
-<TD VALIGN=top><I>Image Colorimetry Information</I></TD>
-<TD><TT>WhitePoint</TT>,
-    <TT>PrimaryChromaticities</TT>,
-    <TT>TransferFunction</TT>,
-    <TT>ReferenceBlackWhite</TT>
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Class B for bilevel images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 1<BR>
-    <TT>BitsPerSample</TT> = 1<BR>
-    <TT>Compression</TT> = 1 (none), 2 (CCITT 1D), or 32773 (PackBits)<BR>
-    <TT>PhotometricInterpretation</TT> = 0 (Min-is-White), 1 (Min-is-Black)<BR>
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Class G for grayscale images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 1<BR>
-    <TT>BitsPerSample</TT> = 4, 8<BR>
-    <TT>Compression</TT> = 1 (none) 5 (LZW)<BR>
-    <TT>PhotometricInterpretation</TT> = 0 (Min-is-White), 1 (Min-is-Black)<BR>
-</TD>
-
-</TR>
-<TR>
-<TD VALIGN=top><I>Class P for palette color images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 1<BR>
-    <TT>BitsPerSample</TT> = 1-8<BR>
-    <TT>Compression</TT> = 1 (none) 5 (LZW)<BR>
-    <TT>PhotometricInterpretation</TT> = 3 (Palette RGB)<BR>
-    <TT>ColorMap</TT>
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Class R for RGB full color images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 3<BR>
-    <TT>BitsPerSample</TT> = <8,8,8><BR>
-    <TT>PlanarConfiguration</TT> = 1, 2<BR>
-    <TT>Compression</TT> = 1 (none) 5 (LZW)<BR>
-    <TT>PhotometricInterpretation</TT> = 2 (RGB)<BR>
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Class F for facsimile</I></TD>
-<TD>(<I>Class B tags plus...</I>)<BR>
-    <TT>Compression</TT> = 3 (CCITT Group 3), 4 (CCITT Group 4)<BR>
-    <TT>FillOrder</TT> = 1 (MSB), 2 (LSB)<BR>
-    <TT>Group3Options</TT> = 1 (2d encoding), 4 (zero fill), 5 (2d+fill)<BR>
-    <TT>ImageWidth</TT> = 1728, 2048, 2482<BR>
-    <TT>NewSubFileType</TT> = 2<BR>
-    <TT>ResolutionUnit</TT> = 2 (Inch), 3 (Centimeter)<BR>
-    <TT>PageNumber</TT>,
-    <TT>XResolution</TT>,
-    <TT>YResolution</TT>,
-    <TT>Software</TT>,
-    <TT>BadFaxLines</TT>,
-    <TT>CleanFaxData</TT>,
-    <TT>ConsecutiveBadFaxLines</TT>,
-    <TT>DateTime</TT>,
-    <TT>DocumentName</TT>,
-    <TT>ImageDescription</TT>,
-    <TT>Orientation</TT>
-</TD>
-</TR>
-
-<TD VALIGN=top><I>Class S for separated images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 4<BR>
-    <TT>PlanarConfiguration</TT> = 1, 2<BR>
-    <TT>Compression</TT> = 1 (none), 5 (LZW)<BR>
-    <TT>PhotometricInterpretation</TT> = 5 (Separated)<BR>
-    <TT>InkSet</TT> = 1 (CMYK)<BR>
-    <TT>DotRange</TT>,
-    <TT>InkNames</TT>,
-    <TT>DotRange</TT>,
-    <TT>TargetPrinter</TT>
-</TD>
-</TR>
-
-<TD VALIGN=top><I>Class Y for YCbCr images</I></TD>
-<TD><TT>SamplesPerPixel</TT> = 3<BR>
-    <TT>BitsPerSample</TT> = <8,8,8><BR>
-    <TT>PlanarConfiguration</TT> = 1, 2<BR>
-    <TT>Compression</TT> = 1 (none),  5 (LZW), 7 (JPEG)<BR>
-    <TT>PhotometricInterpretation</TT> = 6 (YCbCr)<BR>
-    <TT>YCbCrCoefficients</TT>,
-    <TT>YCbCrSubsampling</TT>,
-    <TT>YCbCrPositioning</TT><BR>
-    (<I>colorimetry info from Appendix H; see above</I>)
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top><I>Class "JPEG" for JPEG images (per TTN2)</I></TD>
-<TD><TT>PhotometricInterpretation</TT> = 1 (grayscale), 2 (RGB), 5 (CMYK), 6 (YCbCr)<BR>
-    (<I>Class Y tags if YCbCr</I>)<BR>
-    (<I>Class S tags if CMYK</I>)<BR>
-    <TT>Compression</TT> = 7 (JPEG)<BR>
-</TD>
-</TR>
-</TABLE>
-
-<P>
-In addition, the library supports some optional compression algorithms
-that are, in some cases, of dubious value.
-
-<PRE>
-    Compression = 32766	NeXT 2-bit encoding
-    Compression = 32809	ThunderScan 4-bit encoding
-    Compression = 32909	Pixar companded 11-bit ZIP encoding
-    Compression = 32946	PKZIP-style Deflate encoding (experimental)
-    Compression = 34676	SGI 32-bit Log Luminance encoding (experimental)
-    Compression = 34677	SGI 24-bit Log Luminance encoding (experimental)
-</PRE>
-
-Note that there is no support for the JPEG-related tags defined
-in the 6.0 specification; the JPEG support is based on the post-6.0
-proposal given in TIFF Technical Note #2.
-
-<P>
-<TABLE>
-<TR>
-<TD VALIGN=top><IMG SRC="images/info.gif"></TD>
-<TD>
-<EM>
-For more information on the experimental Log Luminance encoding
-consult the materials available at
-<A HREF=http://www.sgi.com/Technology/pixformat>http://www.sgi.com/Technology/pixformat</A>.
-</EM>
-</TD>
-</TR>
-</TABLE>
-
-<P>
-The following table shows the tags that are recognized
-and how they are used by the library.  If no use is indicated,
-then the library
-reads and writes the tag, but does not use it internally.
-
-<P>
-<TABLE BORDER WIDTH=100% CELLPADDING=2>
-<TR>
-<TH ALIGN=left>Tag Name</TH> <TH>Value</TH> <TH ALIGN=center>R/W</TH> <TH ALIGN=left>Library's Use (Comments)</TH>
-</TR>
-<TR>
-<TD><TT>NewSubFileType</TT></TD>
-<TD ALIGN=center>254</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>none (called <TT>SubFileType</TT> in <tiff.h>)</TD>
-</TR>
-<TR>
-<TD><TT>SubFileType</TT></TD>
-<TD ALIGN=center>255</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>none (called <TT>OSubFileType</TT> in <tiff.h>)</TD>
-</TR>
-<TR>
-<TD><TT>ImageWidth</TT></TD>
-<TD ALIGN=center>256</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>ImageLength</TT></TD>
-<TD ALIGN=center>257</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>BitsPerSample</TT></TD>
-<TD ALIGN=center>258</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>Compression</TT></TD>
-<TD ALIGN=center>259</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>to select appropriate codec</TD>
-</TR>
-<TR>
-<TD><TT>PhotometricInterpretation</TT></TD>
-<TD ALIGN=center>262</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>Thresholding</TT></TD>
-<TD ALIGN=center>263</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>CellWidth</TT></TD>
-<TD ALIGN=center>264</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>CellLength</TT></TD>
-<TD ALIGN=center>265</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>FillOrder</TT></TD>
-<TD ALIGN=center>266</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>control bit order</TD>
-</TR>
-<TR>
-<TD><TT>DocumentName</TT></TD>
-<TD ALIGN=center>269</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ImageDescription</TT></TD>
-<TD ALIGN=center>270</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Make</TT></TD>
-<TD ALIGN=center>271</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Model</TT></TD>
-<TD ALIGN=center>272</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>StripOffsets</TT></TD>
-<TD ALIGN=center>273</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>Orientation</TT></TD>
-<TD ALIGN=center>274</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>SamplesPerPixel</TT></TD>
-<TD ALIGN=center>277</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>RowsPerStrip</TT></TD>
-<TD ALIGN=center>278</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>StripByteCounts</TT></TD>
-<TD ALIGN=center>279</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>MinSampleValue</TT></TD>
-<TD ALIGN=center>280</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>MaxSampleValue</TT></TD>
-<TD ALIGN=center>281</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>XResolution</TT></TD>
-<TD ALIGN=center>282</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>YResolution</TT></TD>
-<TD ALIGN=center>283</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by Group 3 2d encoder</TD>
-</TR>
-<TR>
-<TD><TT>PlanarConfiguration</TT></TD>
-<TD ALIGN=center>284</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>PageName</TT></TD>
-<TD ALIGN=center>285</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>XPosition</TT></TD>
-<TD ALIGN=center>286</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>YPosition</TT></TD>
-<TD ALIGN=center>286</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>FreeOffsets</TT></TD>
-<TD ALIGN=center>288</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>FreeByteCounts</TT></TD>
-<TD ALIGN=center>289</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>GrayResponseUnit</TT></TD>
-<TD ALIGN=center>290</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>GrayResponseCurve</TT></TD>
-<TD ALIGN=center>291</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>Group3Options</TT></TD>
-<TD ALIGN=center>292</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by Group 3 codec</TD>
-</TR>
-<TR>
-<TD><TT>Group4Options</TT></TD>
-<TD ALIGN=center>293</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ResolutionUnit</TT></TD>
-<TD ALIGN=center>296</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by Group 3 2d encoder</TD>
-</TR>
-<TR>
-<TD><TT>PageNumber</TT></TD>
-<TD ALIGN=center>297</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ColorResponseUnit</TT></TD>
-<TD ALIGN=center>300</TD>
-<TD> </TD>
-<TD>parsed but ignored</TD>
-</TR>
-<TR>
-<TD><TT>TransferFunction</TT></TD>
-<TD ALIGN=center>301</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Software</TT></TD>
-<TD ALIGN=center>305</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>DateTime</TT></TD>
-<TD ALIGN=center>306</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Artist</TT></TD>
-<TD ALIGN=center>315</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>HostComputer</TT></TD>
-<TD ALIGN=center>316</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Predictor</TT></TD>
-<TD ALIGN=center>317</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by LZW codec</TD>
-</TR>
-<TR>
-<TD><TT>WhitePoint</TT></TD>
-<TD ALIGN=center>318</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>PrimaryChromacities</TT></TD>
-<TD ALIGN=center>319</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ColorMap</TT></TD>
-<TD ALIGN=center>320</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>TileWidth</TT></TD>
-<TD ALIGN=center>322</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>TileLength</TT></TD>
-<TD ALIGN=center>323</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>TileOffsets</TT></TD>
-<TD ALIGN=center>324</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>TileByteCounts</TT></TD>
-<TD ALIGN=center>324</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>data i/o</TD>
-</TR>
-<TR>
-<TD><TT>BadFaxLines</TT></TD>
-<TD ALIGN=center>326</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>CleanFaxData</TT></TD>
-<TD ALIGN=center>327</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ConsecutiveBadFaxLines</TT></TD>
-<TD ALIGN=center>328</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>SubIFD</TT></TD>
-<TD ALIGN=center>330</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>subimage descriptor support</TD>
-</TR>
-<TR>
-<TD><TT>InkSet</TT></TD>
-<TD ALIGN=center>332</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>InkNames</TT></TD>
-<TD ALIGN=center>333</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>DotRange</TT></TD>
-<TD ALIGN=center>336</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>TargetPrinter</TT></TD>
-<TD ALIGN=center>337</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ExtraSamples</TT></TD>
-<TD ALIGN=center>338</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>lots</TD>
-</TR>
-<TR>
-<TD><TT>SampleFormat</TT></TD>
-<TD ALIGN=center>339</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>SMinSampleValue</TT></TD>
-<TD ALIGN=center>340</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>SMaxSampleValue</TT></TD>
-<TD ALIGN=center>341</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>JPEGTables</TT></TD>
-<TD ALIGN=center>347</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by JPEG codec</TD>
-</TR>
-<TR>
-<TD><TT>YCbCrCoefficients</TT></TD>
-<TD ALIGN=center>529</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>used by <TT>TIFFReadRGBAImage</TT> support</TD>
-</TR>
-<TR>
-<TD><TT>YCbCrSubsampling</TT></TD>
-<TD ALIGN=center>530</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>tile/strip size calculations</TD>
-</TR>
-<TR>
-<TD><TT>YCbCrPositioning</TT></TD>
-<TD ALIGN=center>531</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>ReferenceBlackWhite</TT></TD>
-<TD ALIGN=center>532</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-<TR>
-<TD><TT>Matteing</TT></TD>
-<TD ALIGN=center>32995</TD>
-<TD ALIGN=center>R</TD>
-<TD>none (obsoleted by <TT>ExtraSamples</TT> tag)</TD>
-</TR>
-<TR>
-<TD><TT>DataType</TT></TD>
-<TD ALIGN=center>32996</TD>
-<TD ALIGN=center>R</TD>
-<TD>none (obsoleted by <TT>SampleFormat</TT> tag)</TD>
-</TR>
-<TR>
-<TD><TT>ImageDepth</TT></TD>
-<TD ALIGN=center>32997</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>tile/strip calculations</TD>
-</TR>
-<TR>
-<TD><TT>TileDepth</TT></TD>
-<TD ALIGN=center>32998</TD>
-<TD ALIGN=center>R/W</TD>
-<TD>tile/strip calculations</TD>
-</TR>
-<TR>
-<TD><TT>StoNits</TT></TD>
-<TD ALIGN=center>37439</TD>
-<TD ALIGN=center>R/W</TD>
-<TD> </TD>
-</TR>
-</TABLE>
-
-<P>
-The <TT>Matteing</TT> and <TT>DataType</TT>
-tags have been obsoleted by the 6.0
-<TT>ExtraSamples</TT> and <TT>SampleFormat</TT> tags.
-Consult the documentation on the
-<TT>ExtraSamples</TT> tag and Associated Alpha for elaboration.  Note however
-that if you use Associated Alpha, you are expected to save data that is
-pre-multipled by Alpha.  If this means nothing to you, check out
-Porter & Duff's paper in the '84 SIGGRAPH proceedings: "Compositing Digital
-Images".
-
-<P>
-The <TT>ImageDepth</TT>
-tag is a non-standard, but registered tag that specifies
-the Z-dimension of volumetric data.  The combination of <TT>ImageWidth</TT>,
-<TT>ImageLength</TT>, and <TT>ImageDepth</TT>,
-defines a 3D volume of pixels that are
-further specified by <TT>BitsPerSample</TT> and
-<TT>SamplesPerPixel</TT>.  The <TT>TileDepth</TT>
-tag (also non-standard, but registered) can be used to specified a
-subvolume "tiling" of a volume of data.
-
-<P>
-The Colorimetry, and CMYK tags are additions that appear in TIFF 6.0.
-Consult the TIFF 6.0 specification included in the <B>doc</B> directory
-and <A HREF=document.html>online</A>.
-
-<P>
-The JPEG-related tag is specified in
-<A HREF="TIFFTechNote2.html">TIFF Technical Note #2</A> which defines
-a revised JPEG-in-TIFF scheme (revised over that appendix that was
-part of the TIFF 6.0 specification).
-
-
-
-<P>
-<HR>
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/tools.html b/tkimg1.3/libtiff/html/tools.html
deleted file mode 100644
index 652f1f1..0000000
--- a/tkimg1.3/libtiff/html/tools.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-TIFF Tools Overview
-</TITLE>
-</HEAD>
-<BODY BGCOLOR=WHITE> 
-<FONT FACE="Arial, Helvetica, Sans"> 
-<H1>
-<IMG SRC=images/quad.jpg WIDTH=144 HEIGHT=108 ALIGN=left BORDER=1 HSPACE=6>
-TIFF Tools Overview
-</H1>
-
-<P>
-This software distribution comes with a small collection of programs
-for converting non-TIFF format images to TIFF and for manipulating
-and interogating the contents of TIFF images.
-Several of these tools are useful in their own right.
-Many of them however are more intended to serve as programming
-examples for using the TIFF library.
-
-<H3>Device-dependent Programs</H3>
-
-There are two device-dependent programs that serve as simple examples
-for writing programs to display and save TIFF images.
-
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR>
-<TD valign=top WIDTH=10%><TT>tiffgt    </TT></TD>
-<TD>Display the contents of one or
-more TIFF images on a Silicon Graphics system using 
-the Silicon Graphics IRIS GL.
-The software makes extensive use of the <TT>TIFFRGBAImage</TT>
-facilities described elsewhere.</TD>
-</TR>
-
-<TR>
-<TD valign=top WIDTH=10%><TT>tiffsv</TT></TD>
-<TD>A program to save all or part of a screen dump on a Silicon
-Graphics system.
-As for <TT>tiffgt</TT> this code, while written to use the IRIS GL,
-can be easily tailored to other devices.</TD>
-</TR>
-
-</TABLE>
-
-<H3>Device-independent Programs</H3>
-
-The remaining programs should be device-independent:
-
-<P>
-<TABLE BORDER CELLPADDING=3>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffinfo</TT></TD>
-<TD>Display information about one or more TIFF files.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffdump</TT></TD>
-<TD>Display the verbatim contents of the TIFF directory in a
-  file (it's very useful for debugging bogus files that you may get from
-  someone that claims they support TIFF)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffcp</TT></TD>
-<TD>Copy, concatenate, and convert TIFF images (e.g.
-  switching from Compression=5 to Compression=1)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiff2ps</TT></TD>
-<TD>Convert TIFF images to PostScript</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffcmp</TT></TD>
-<TD>Compare the contents of two TIFF files (it does
-  not check all the directory information, but does check all the data)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiff2bw</TT></TD>
-<TD>A simple program to convert a color image to grayscale</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>ras2tiff</TT></TD>
-<TD>A quick hack that converts Sun rasterfile format images to
-  TIFF -- it's less than complete</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>rgb2ycbcr</TT></TD>
-<TD>Convert an RGB, grayscale, or bilevel TIFF image to a
-  YCbCr TIFF image; it's mainly provided for testing</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>gif2tiff</TT></TD>
-<TD>A quick hack that converts GIF 87a format images to TIFF</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>ppm2tiff</TT></TD>
-<TD>A quick hack that converts PPM format images to TIFF</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>fax2tiff</TT></TD>
-<TD>Convert raw Group 3 or Group 4 facsimile data to TIFF</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>pal2rgb</TT></TD>
-<TD>Convert a Palette-style image to a full color RGB image by
-  applying the colormap</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffdither</TT></TD>
-<TD>Dither a b&w image into a bilevel image (suitable for
-  use in creating fax files)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffsplit</TT></TD>
-<TD>Create one or more single-image files from a (possibly)
-  multi-image file</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>fax2ps</TT></TD>
-<TD>Convert a Group 3- or Group 4- compressed TIFF to PostScript
-  that is significantly more compressed than is generated by <TT>tiff2ps</TT>
-  (unless <TT>tiff2ps</TT> writes PS Level II)</TD>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>thumbnail</TT></TD>
-<TD>Copy a bilevel TIFF to one that includes 8-bit greyscale
-  "thumbnail images" for each page; it is provided as an example of
-  how one might use the <TT>SubIFD</TT> tag
-  (and the library support for it)</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>tiffmedian</TT></TD>
-<TD>A version of Paul Heckbert's median cut program
-  that reads an RGB TIFF image, and creates a TIFF palette file as a
-  result; it's useful for converting full-color RGB images to 8-bit
-  color for your friends that have cheapo 8-bit framebuffers.</TD>
-</TR>
-
-<TR>
-<TD VALIGN=top WIDTH=10%><TT>sgi2tiff</TT></TD>
-<TD>A program to convert SGI image files to TIFF.  This
-  program is only useful on SGI machines as it uses <TT>-limage</TT>.</TD>
-</TR>
-
-</TABLE>
-
-<P>
-Check out the manual pages for details about the above programs.
-
-
-<P>
-<HR>
-
-
-Last updated: $Date: 2007/01/03 20:47:10 $
-
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta007.html b/tkimg1.3/libtiff/html/v3.4beta007.html
deleted file mode 100644
index fab0532..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta007.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta007
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta007<BR>
-<B>Previous Version</B>: v3.4beta004<BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#port">Changes in the portability support</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>bit order was corrected for Pentium systems
-<LI>a new define, <TT>HOST_BIGENDIAN</TT>, was added for code that
-   wants to statically use information about native cpu byte order
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>the G3/G4 decoder was replaced by a new one that is faster and
-   has smaller state tables
-<LI>Niles Ritter's client tag extension hooks were added
-<LI>a new routine <TT>TIFFCurrentDirOffset</TT> was added for
-   applications that want to find out the file offset of a TIFF directory
-<LI>the calculation of the number of strips in an image was corected
-   for images with certain esoteric configurations
-<LI>a potential memory leak (very unlikely) was plugged
-<LI>the <TT>TIFFReadRGBAImage</TT> support was completely rewritten
-   and new, more flexible support was added for reading images into
-   a fixed-format raster
-<LI>YCbCr to RGB conversion done in the <TT>TIFFReadRGBAImage</TT> support
-   was optimized
-<LI>a bug in JPEG support calculation of strip size was corrected
-<LI>the LZW decoder was changed to initialize the code table to zero
-   to lessen potential problems that arise when invalid data is decoded
-<LI><B>tiffcomp.h</B> is now aware of OS/2
-<LI>some function prototypes in <B>tiffio.h</B> and <B>tiffiop.h</B>
-   that contained parameter
-   names have been changed to avoid complaints from certain compilers
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="port"><B><FONT SIZE=+3>C</FONT>HANGES IN THE PORTABILITY SUPPORT:</B></A>
-
-<UL>
-<LI><B>Makefile.in</B> has been corrected to use the parameters
-   chosen by the configure script
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI><TT>fax2ps</TT> has been rewritten and moved over from the user
-   contributed software
-<LI>an uninitialized variable in <TT>pal2rgb</TT> has been fixed
-<LI><TT>ras2tiff</TT> now converts 24-bit RGB raster data so that
-   samples are written in the proper order
-<LI><TT>tiff2ps</TT> has been updated to include fixes
-    and enhancements from Alberto Accomazzi
-<LI><TT>tiffcp</TT> now has a <TT>-o</TT> option to select a directory
-    by file offset
-<LI><TT>tiffinfo</TT> is now capable of displaying the raw undecoded
-    image data in a file
-<LI><TT>tiffgt</TT> has been rewritten to use the new <TT>TIFFRGBAImage</TT>
-   support and to handle multiple files
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta016.html b/tkimg1.3/libtiff/html/v3.4beta016.html
deleted file mode 100644
index 565a26f..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta016.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta016
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta016<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta007.html>v3.4beta007</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#man">Changes in the manual pages</A>
-<LI><A HREF="#html">Changes in the documentation</A>
-<LI><A HREF="#contrib">Changes in contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>support was added for configuring the Deflate codec
-<LI>support was added for the HTML documentation
-<LI>codecs that are not configured for inclusion in the library
-   are no longer compiled
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>support was added for registering new codecs external to the library
-   and for overriding the codecs that are builtin to the library
-<LI>emulation support for the old <TT>DataType</TT> tag was improved
-<LI>suppport was added for the <TT>SMinSampleValue</TT>
-    and <TT>SMaxSampleValue</TT> tags
-<LI>the library no longer ignores <TT>TileWidth</TT> and <TT>TileLength</TT>
-    tags whose values are not a multiple of 16 (per the spec); this
-    permits old, improperly written, images to be read
-<LI>the support for the <TT>Predictor</TT> tag was placed in a reusable
-    module so that it can be shared by multiple codecs
-<LI>experimental compression support was added for the Deflate algorithm
-   (using the freely available zlib package)
-<LI>a new routine, <TT>TIFFWriteBufferSetup</TT> was added a la the
-   routine <TT>TIFFReadBufferSetup</TT>
-<LI>the DSO version of the library is now statically linked with the
-   JPEG and Deflate libraries; this means applications that link against
-   the DSO do not also need to link against these ancillary libraries
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI>all the tools now use common code to process compress-oriented arguments
-<LI><TT>tiffdump</TT> should now compile on a Macintosh with MPW
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A>
-
-<UL>
-<LI>everything was updated
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="html"><B><FONT SIZE=+3>C</FONT>HANGES IN THE DOCUMENTATION:</B></A>
-
-<UL>
-<LI>everything was updated
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI><B>contrib/dbs/xtiff</B> was made to compile
-<LI><B>contrib/mac-mpw</B> is new support for compiling the software on
-   a Macintosh under MPW; consult <A HREF=build.html#Mac>the documentation</A>
-   for details
-<LI><B>contrib/tags</B> is information on how to use the tag extenion
-   facilities; consult
-   <A HREF=../contrib/tags/README>contrib/tags/README</A> for details
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta018.html b/tkimg1.3/libtiff/html/v3.4beta018.html
deleted file mode 100644
index 6db7059..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta018.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta018
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta018<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta016.html>v3.4beta016</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>configure now recognizes IRIX 6.x systems
-<LI>configure now uses <TT>ENVOPTS</TT> when searching for an ANSI
-   C compiler; this fixes a problem configuring the software under
-   HP/UX with the native C compiler
-<LI>configure now correctly recognizes memory-mapped files are supported
-   under AIX
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI><TT>make install</TT> now properly installs the include files
-<LI>some portability fixes from Bjorn Brox
-<LI>the G3/G4 codec now warns about decoded rows that are longer than
-    the image/tile width
-<LI>changes from Frank Cringle to make the library work with the
-    gcc-specific bounds checking software
-<LI>miscellaneous fixes to <TT>TIFFPrintDirectory</TT>
-<LI>bug fix to correct a problem where <TT>TIFFWriteRawStrip</TT>
-    could not be used to automatically grow an image's length
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI>fixes from Frank Cringle to update <TT>fax2tiff</TT>
-<LI>portability fixes to <TT>tiff2bw</TT> and <TT>tiffcmp</TT>
-<LI><TT>tiffdump</TT> now uses the byte swapping routines in the library
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta024.html b/tkimg1.3/libtiff/html/v3.4beta024.html
deleted file mode 100644
index f00aeab..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta024.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta024
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta024<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta018.html>v3.4beta018</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#man">Changes in the manual pages</A>
-<LI><A HREF="#contrib">Changes in the contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>It is now possible to setup the software to build only the
-   library; configure reconizes this is the intent when the
-   <B>VERSION</B>, <B>tiff.alpha</B>, and <B>tif_version.c</B>
-   files are in the local directory (i.e. ``.'')
-<LI>configure no longer tries to setup HTML materials
-<LI>include file directories needed in building the library are now
-   specified with a <TT>DIRS_LIBINC</TT> config parameter
-<LI>configure no longer checks for alternate compilers if <TT>CC</TT>
-   is set; if the specified compiler is not found or is not appropriate
-   the configuration procedure aborts
-<LI>the <B>port.h</B> file generated by configure is now used only by
-   the library and as such as have been moved to the <B>libtiff</B>
-   directory
-<LI>there is beginning support for building DSO's on systems other than IRIX
-<LI>configure now verifies the JPEG and zlib directory pathnames by
-   checking for well-known include files in these directories
-<LI>configure no longer creates the <B>dist</B> directory needed only
-   on SGI machines (for building SGI binary distributions)
-<LI>a bug was fixed whereby configure would incorrectly set
-    <TT>ENVOPTS</TT> when building the software with gcc under AIX
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>two new typedefs were added to <B>tiff.h</TT>: <TT>int8</TT>
-    and <TT>uint8</TT> for signed and unsigned 8-bit quantities,
-    respectively; these are currently used only by
-    programs in the <B>tools</B> directory
-<LI>the <TT>BadFaxLines</TT>, <TT>CleanFaxData</TT>, and
-    <TT>ConsecutiveBadFaxLines</B> tags are now supported with
-    Group 4 compression
-<LI>byte order is now correctly identified on 64-bit machines
-<LI>a bug was fixed in the PackBits decoder where input data would
-    appear short when a no-op run was present
-<LI>a bug was fixed in calculations with very wide strips
-<LI><TT>TIFFWriteEncodedStrip</TT> and <TT>TIFFWriteRawStrip</TT>
-    were extended to support dynamically growing the number of
-    strips in an image (must set <TT>ImageLength</TT> prior to
-    making calls though)
-<LI><TT>TIFFDefaultTileSize</TT> now rounds tile width and height
-    up to a multiple of 16 pixels, as required by the TIFF 6.0 specification
-<LI>the file <B>version.h</B> is now built by a new <B>mkversion</B>
-    program; this was done for portability to non-UNIX systems
-<LI>support was added for the Acorn RISC OS (from Peter Greenham)
-<LI>the builtin codec table is now made <TT>const</TT> when compiling
-    under VMS so that <B>libtiff</B> can be built as a shared library
-<LI>support for the PowerPC Mac (from Ruedi Boesch)
-<LI>support for Window NT/Window 95 (from Scott Wagner)
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI>the tools no longer include <B>port.h</B>
-<LI>various portability fixes; mostly to eliminate implicit assumptions
-    about how long <TT>int32</TT> data types are
-<LI>PostScript Level II additions to <TT>tiff2ps</TT> from Bjorn Brox
-<LI><TT>sgi2tiff</TT> now handles RGBA images
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A>
-
-<UL>
-<LI>the documentation has been updated to reflect the current state of
-    the software
-<LI>some routines have been moved to different manual pages
-    to group like-routines together
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI>support was added for the Acorn RISC OS (from Peter Greenham)
-<LI>support for Windows NT/Windows 95 contributed for a previous
-    version of this software was sort of incorporated (it's broken
-    right now) (from Scott Wagner)
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta028.html b/tkimg1.3/libtiff/html/v3.4beta028.html
deleted file mode 100644
index 6d98113..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta028.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta028
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta028<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta024.html>v3.4beta024</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#man">Changes in the manual pages</A>
-<LI><A HREF="#contrib">Changes in the contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>a <TT>-noninteractive</TT> flag was added to configure to
-   control whether or not it prints and prompts for configuration information
-<LI>various typos and fixes were made in configure for the the
-   library-only build support (this and other configure fixes from
-   Richard Mlynarik <A HREF=mailto:mly at adoc.xerox.com><mly at adoc.xerox.com></A>)
-<LI>bugs were fixed in the handling of pathnames supplied for external
-   packages; e.g. <TT>DIR_JPEG</TT>
-<LI>the handling of <TT>SETMAKE</TT> is now done properly
-<LI>the default prototype function declaration for <TT>pow</TT> was corrected
-<LI>a bug was fixed in <B>libtiff/Makefile.in</B> that caused installation
-   to fail on systems without DSO support
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>Acorn RISC O/S support that was accidentally left out of the
-   left out of the previous distribution is present (from Peter Greenham)
-<LI>complaints about unknown and/or unsupported codecs have been
-   delayed until they are invoked; this permits applications to open
-   images and look at tags even if the image data is compressed with
-   an unknown/unsupported compression scheme
-<LI>bugs in handling unknown tags have been corrected; applications
-   that use multiple codecs, each with codec-specific tags, no longer
-   generate confusing error messages
-<LI>a missing pseudo-tag definition in the CCITT G3 codec was fixed
-   (this problem caused core dumps in the <TT>tiffcp</TT> program)
-<LI>pseudo-tags are now treated specially; they are always considered
-   to be set (i.e. they do not use bits in the <TT>FIELD_*</TT> bit-vectors).
-<LI>the use of strip chopping can now be controlled on a per-file basis
-   through a mode parameter supplied when opening a file (``C'' to
-   enable strip chopping and ``c'' to disable)
-<LI>two bugs were fixed in the writing of opposite-endian byte-order
-   files
-<LI>support was added for three new fax-related tags registered to
-   SGI: FaxRecvParams, FaxRecvTime, and FaxSubAddress
-<LI>the bit order of image data read and written can now be controlled
-   on a per-file basis through a mode parameter supplied when opening
-   a file (``B'' to force MSB2LSB bit order, ``L'' for LSB2MSB bit
-   order, and ``H'' for the bit order of the native CPU)
-<LI>the byte order of image and tag data written to newly-created files
-   can now be controlled on a per-file basis through a mode parameter
-   supplied when openening a file (``b'' to force Big-Endian byte order
-   and ``l'' to force Little-Endian byte order)
-<LI>the use memory-mapped files for images opened read-only can now
-   be controlled on a per-file basis through a mode parameter supplied
-   when opening a file (``M'' to enable use of memory-mapped files
-   and ``m'' to disable use)
-<LI>the use of the <TT>WIN32</TT> define in <B>tiffiop.h</B> has
-   been replaced by <TT>__WIN32__</TT>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI><TT>fax2ps</TT> now does a <TT>save</TT> and <TT>restore</TT>
-    around each page of PostScript; this fixes a problem with VM
-    overflow when printing a many-page document on some printers
-<LI>a bug in the handling of 3-channel images by <TT>ras2tiff</TT> 
-    was fixed
-<LI><TT>tiffcp</TT> has new options to control the byte order of
-    newly created files: <B>-B</B> for Big-Endian byte order, <B>-L</B>
-    for Little-Endian byte order; a <B>-M</B> option to disable the
-    use of memory-mapped files, and a <B>-C</B> option to disable the
-    use of strip chopping
-<LI>bugs were fixed in <TT>tiffcp</TT>'s handling of codec-specific tags
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A>
-
-<UL>
-<LI>the <TT>TIFFOpen</TT> page has been updated to reflect the new
-    optional open mode parameters
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI><B>contrib/win95</B> contains information and code from Philippe Tenenhaus
-    <A HREF=mailto:100423.3705 at compuserve.com><100423.3705 at compuserve.com></A>
-    about using the software under Windows 95
-<LI><B>contrib/winnt</B> contains information and code from Dave Dyer
-    <A HREF=mailto:ddyer at triple-i.com><ddyer at triple-i.com></A>
-    about using the software under Windows NT
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta029.html b/tkimg1.3/libtiff/html/v3.4beta029.html
deleted file mode 100644
index 0c8122a..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta029.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta029
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta029<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta028.html>v3.4beta028</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#contrib">Changes in the contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI><B>configure</B> now relativizes pathname references given in
-   <TT>-L</TT> options (as frequently specified when configuring
-   ancillary packages)
-<LI>problems related to configuring the software on Ultrix 4.4 have
-   been corrected
-<LI>the shell to use in Makefiles and scripts can now be set with the
-   <TT>SCRIPT_SH</TT> configuration parameter
-<LI>comments in <B>config.site</B> now correctly indicate how to setup the
-   use of ancillary packages
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>mods for building the software on a Mac using the
-   MetroWerks CodeWarrior compilers
-<LI>a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in
-   a strip/tile might not be decoded; this was seen only when decoding
-   multi-strip images
-<LI>a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not
-   being properly registered
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI><B>contrib/mac-cw</B> contains information and code from Niles Ritter
-    <A HREF=mailto:ndr at tazboy.jpl.nasa.gov><ndr at tazboy.jpl.nasa.gov></A>
-    about building the software with the MetroWerks CodeWarrior compilers
-    on Macintosh systems
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta031.html b/tkimg1.3/libtiff/html/v3.4beta031.html
deleted file mode 100644
index 76f7dd6..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta031.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta031
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta031<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta029.html>v3.4beta029</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#man">Changes in the manual pages</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI><B>configure</B> now captures significantly more information
-   in the <B>config.log</B> file and provides more information when
-   it is unable to setup a configuration
-<LI>support was added for building shared libraries on more systems:
-   AIX, HPUX, Solaris, and Linux.
-<LI>a new configuration parameter <TT>LIBCOPTS</TT> was added for
-   passing arguments to the C compiler to use when building only
-   the library; this is part of the enhanced support for building
-   shared libraries
-<LI>include files for optional packages that reside in <B>/usr/include</B>
-   are now handled correctly
-<LI>build trees may now be configured using either relative or absolute
-   pathnames to the source distribution
-<LI>several new configuration parameters were added, mainly for building
-   shared libraries: <TT>DIST_MAJOR</TT>, <TT>DIST_MINOR</TT>, 
-   <TT>DIST_ALPHA</TT>, and <TT>DSOSUF_VERSION</TT>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>the Deflate support has been revised: it requires version 0.99 of
-   the zlib software distribution, <B>the output format has changed and
-   is incompatible with previous versions of this library</B> (each
-   strip now includes a header read and written by the zlib library)
-<LI>the codec name printed by the TIFFPrintDirectory routine is now
-   taken from the codec table instead of from a builtin table; this means
-   that application-defined codecs are handled correctly
-<LI>a new symbol was added that contains the library version number;
-   this can be used to do a compile-time compatibility check of the
-   library version
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A>
-
-<UL>
-<LI>the creation and installation of manual pages was redone; it now
-    implements the documented ``configuration scheme''
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta032.html b/tkimg1.3/libtiff/html/v3.4beta032.html
deleted file mode 100644
index c1cd45c..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta032.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta032
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta032<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta031.html>v3.4beta031</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#contrib">Changes in the contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>various fixups and subtle improvements to <B>configure</B>
-    from Richard Mlynarik
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>a new codec from Pixar designed for high-resolution color images;
-    note that this codec is not configured by default
-<LI>a bug fix for reading tags with a single <TT>FLOAT</TT> value
-<LI>change to the <TT>TIFFGetField</TT> calling convention:
-    a tag that has a single value of
-    type <TT>DOUBLE</TT> is now retrieved by passing a
-    ``<TT>double*</TT>'' instead of a
-    ``<TT>double**</TT>'' (this change makes the handling of tags with
-    <TT>DOUBLE</TT> values identical to the handling of tags with
-    <TT>FLOAT</TT> values)
-<LI>fix to VMS support for the handling of floating point values
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI><B>tiffdump</B> now handles tags with <TT>FLOAT</TT> and <TT>DOUBLE</TT>
-    values
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI>updates to the Acorn OS support from Peter Greenham
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta033.html b/tkimg1.3/libtiff/html/v3.4beta033.html
deleted file mode 100644
index 816f77a..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta033.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta033
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta033 (aka the v3.4 release)<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta032.html>v3.4beta032</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#contrib">Changes in the contributed software</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>support was added for building the library as a DSO under OSF/1
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>fixes to the Pixar codec
-<LI>portability mods for VMS
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI>fixes to <B>gif2tiff</B> and <B>ppm2tiff</B> for building under MS/DOS
-<LI>portability mods to <B>fax2ps</B> and <B>ycbcr</B> for VMS
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
-
-<UL>
-<LI>a new package from Alexander Lehmann
-   for building the library and tools under MS/DOS with DJGPP v2
-<LI>updated VMS support from Karsten Spang
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta034.html b/tkimg1.3/libtiff/html/v3.4beta034.html
deleted file mode 100644
index 94c4af7..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta034.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta034
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta034<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta033.html>v3.4beta033</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>support was added for building the library as a DSO under NetBSD
-<LI>a bug was fixed in the DSO support for Linux
-<LI>the handling of version strings has changed slightly to simplify parsing
-<LI>a new parameter, <TT>TIFFLIBREF</TT>, was added to control how the
-    library is referenced when linking programs in the <B>tools</B> directory
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>DSO creation under Solaris now forces the DSO name with a <TT>-h</TT> option
-<LI>the interface to the <B>mkversion</B> program was changed
-    to eliminate the need to parse files
-<LI>a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder
-<LI>ANSI IT8 TIFF/IT tag definitions were added to <B>tiff.h</B>
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta035.html b/tkimg1.3/libtiff/html/v3.4beta035.html
deleted file mode 100644
index 93dd765..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta035.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta035
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta035<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta034.html>v3.4beta034</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>support was added installing the HTML documentation
-<LI>support was added for building the library as a DSO under FreeBSD
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>the interface to the <B>mkversion</B> program was restored to
-    the form used prior to v3.4beta034
-<LI>several portability problems for 16-bit systems were fixed
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.4beta036.html b/tkimg1.3/libtiff/html/v3.4beta036.html
deleted file mode 100644
index 6685116..0000000
--- a/tkimg1.3/libtiff/html/v3.4beta036.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.4beta036
-</TITLE>
-</HEAD>
-
-<BODY>
-<FONT FACE="Arial, Helvetica, Sans">
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.4beta036<BR>
-<B>Previous Version</B>: <A HREF=v3.4beta035.html>v3.4beta035</A><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<LI>support was added for building the library as a DSO under HP-UX with 
-    the native C compiler
-<LI>tools are now built with explicit pathnames for the DSO under IRIX,
-    Solaris, and Linux
-<LI>DSO configuration support for Linux was changed to require that
-    <B>libc.so</B> only be readable (not executable)
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-<LI>support was add for ICC: <TT>NumberOfInks</TT>, and <TT>ICCProfile</TT>
-<LI>a memory leak caused by doing <TT>TIFFSetDirectory(0)</TT> was fixed
-<LI>a bug was fixed whereby certain multi-directory files were not
-    properly handled when accessed by mapping the data into memory 
-<LI>the strip chopping support is now always compiled
-    into the library with the default usage controlled by a
-    <TT>STRIPCHOP_DEFAULT</TT> configuration parameter
-<LI>the strip chopping support no longer chops tiled images
-<LI>all static strings are now const--for shared libraries
-<LI>the logic for estimating the strip size of images without
-    a <TT>StripByteCounts</TT> tag was improved by handling
-    <TT>PlanarContig</TT> images differently from <TT>PlanarSeparate</TT>
-<LI>a bug was fixed in the G3 codec when converting the Y resolution
-    of data specified in metric units
-<LI>a bug was fixed in the G3/G4 decoder for data where lines terminate
-    with a v0 code
-<LI>the <TT>TIFFRGBAImage</TT> support was changed to scale 16-bit colormap
-    entries more conservatively to avoid problems with applications
-    that do not generate fully saturated pixel values
-<LI>the LZW decoder was changed to use a more conservative scheme when
-    bounds checking the hash table array; this avoids pitfalls with
-    systems that load objects into memory in unusual locations
-<LI>a bug was fixed in <TT>TIFFPrintDirectory</TT>'s handling of the
-    <TT>InkNames</TT> tag
-<LI><TT>TIFFPrintDirectory</TT> now understands <TT>NumberOfInks</TT>
-    and ICC-related tags
-<LI>the routines for reading image data now provide more useful information
-    when a read error is encountered
-<LI>support was added for compiling with Microsoft Visual C++ 4.0
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI>a bug was fixed in <B>pal2rgb</B>'s colormap handling
-<LI><B>tiff2ps</B> now includes John Wehle's changes for maintaining 
-    the aspect ratio
-    of images when scaling and for honoring the deadzone on a page when
-    generating PostScript Level II
-<LI><B>tiff2ps</B> does a better job guarding against the mishandling
-    of greyscale images
-<LI><B>tiff2ps</B> now correctly converts X- and Y-resolution values
-    specified in metric units
-<LI><B>tiffdump</B> has a new <TT>-m</TT> option to control the maximum
-    number of indirect
-    data values printed for a tag (by default 24)
-<LI><B>tiffdump</B> understands several new tags
-<LI><B>tiffdump</B> now shows any terminating null in ASCII strings
-<LI><B>tiffinfo</B> now suppresses strip chopping when interpreting an image;
-    a new <TT>-z</TT> option has been added to enable strip chopping
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-<ADDRESS>
-<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam at engr.sgi.com">sam at engr.sgi.com</A>
-Last updated $Date: 2007/01/03 20:47:10 $.
-</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.1.html b/tkimg1.3/libtiff/html/v3.5.1.html
deleted file mode 100644
index 040faf2..0000000
--- a/tkimg1.3/libtiff/html/v3.5.1.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.1
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Arial, Helvetica, Sans">
-<FONT FACE="Arial, Helvetica, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.1<BR>
-<B>Previous Version</B>: v3.4beta037<BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/>http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-		  <LI> <em> None of consequence </em> 
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL>
-<LI> Support was added for IPTC Newsphoto metadata (TIFFTAGE_IPTCNEWSPHOTO)
-<LI> Support was added for photoshop caption handling (TIFFTAG_PHOTOSHOP)
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<LI> <A HREF=mailto:billr at corbis.com>Bill Radcliffe's</a> iptcutil was
-added to the "contrib" subdirectory .  It can convert an IPTC binary
-blob to ASCII text and vice-versa.  The blob itself can be extracted
-from or added to an image with the <A
-href=http://www.wizards.dupont.com/magick>ImageMagick</a> convert(1)
-utility.
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.2.html b/tkimg1.3/libtiff/html/v3.5.2.html
deleted file mode 100644
index ad87e71..0000000
--- a/tkimg1.3/libtiff/html/v3.5.2.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.2
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Arial, Helvetica, Sans">
-<FONT FACE="Arial, Helvetica, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.2<BR>
-<B>Previous Version</B>: <A HREF=v3.5.1.html>v3.5.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-	<LI> Corrected alpha versioning.  
-
-	<LI> Removed distinction between  alpha and release targets in Makefile.in. 
-
-	<LI> Added release.stamp target, which tags cvs tree, and updates 
-	  "RELEASE-DATE"
-
-	<LI> Added releasediff target, which diffs tree with source as of 
-	  date in "RELEASE-DATE"
-	  
-	<LI>Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving 
-	  away from alpha/non-alpha distinctions). 
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-        <LI> Added IRIX/gcc, and OSF/1 4.x support on behalf of 
-	Albert Chin-A-Young <china at thewrittenword.com>
-
-        <LI> Added TIFFReassignTagToIgnore() API on behalf of 
-        Bruce Cameron <cameron at petris.com>.  Man page still pending.
-
-        <LI> pre-remove so link before softlink in LINUXdso action in 
-	libtiff/Makefile.in to avoid failure on LINUXdso builds other than
-	the first.
-
-        <LI> Fixed problem with cvtcmap() in tif_getimage.c modifying the
-	colormaps owned by the TIFF handle itself when trying to fixup wrong
-	(eight bit) colormaps.  Corrected by maintaining a private copy of
-	the colormap. 
-
-	<LI> Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in 
-	tif_getimage.c.
-
-	<LI> Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested 
-	by Christopher Lawton <clawton at mathworks.com>
-
-	<LI> Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.
-
-	<LI> Added CYGWIN case in configure.
-
-	<LI> Applied Francois Dagand's patch to handle fax decompression bug. 
-	(sizes >= 65536 were failing) 
-</UL>
-
-<P><HR WIDTH=65% ALIGN=right>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-        <LI> Added addtiffo (add overviews to a TIFF file) in contrib.  Didn't
-	    put it in tools since part of it is in C++.
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.3.html b/tkimg1.3/libtiff/html/v3.5.3.html
deleted file mode 100644
index 91d2e2a..0000000
--- a/tkimg1.3/libtiff/html/v3.5.3.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.3
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Arial, Helvetica, Sans">
-<FONT FACE="Arial, Helvetica, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.3<BR>
-<B>Previous Version</B>: <A HREF=v3.5.2.html>v3.5.2</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-<p> 
-The ChangeLog will follow, but please note the most important change: 
-LZW compression has been removed. 
-<p>
-Unisys has the patent on LZW compression and have been very active in
-their enforcement of late, demanding payments of $5000 or more from
-websites using unlicensed software to create GIF's.  They could well
-do the same do persons using libtiff to create LZW compressed TIFF
-images.
-<p> 
-From <A HREF=http://burnallgifs.org>Burn All GIF's Day</a>:
-<br> 
-<em>The catch is that it appears to be difficult or impossible to get a
-Unisys license to use LZW in free software that complies with the Open
-Source Definition</em>
-<P>
-Unfortunatly, the removal of LZW compression means that saved image size has
-grown dramatically.  Without a change in the TIFF spec to support
-another lossless compression format, this is unavoidable.
-<P>
-The library can use zip for lossless compression, but as this is not
-part of the spec, TIFFs using zip compression may not work with other
-software
-<P> 
-We will be making a patch available that will contain the LZW
-compression code for users who have either obtained a license from
-Unisys or are willing to risk it. 
-<p> 
-LZW decompression is unchanged. 
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-	<LI> Added zip creation to release makefile target 
-
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-
-	<LI> Added html for TIFFWriteTile.3t man page. 
-	
-	<LI> Added some changes to tif_write.c to support rewriting existing
-	fixed sized tiles and strips.  Code mods disabled by default, only
-	enabled if REWRITE_HACK is defined for now.
-
-	<LI> Added TIFFWriteTile.3t man page.
-
-	<LI> Added notes on use of makefile.vc in build.html, and fixed 
-	email subscription address.
-
-	<LI>  Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c 
-
-	<LI>  Did some casts cleaning up to reduce compiler warnings in tif_fax3.c,
-	   from Bruce Carmeron <cameron at petris.com> -- modifications of 
-	   changes made by Frank (sun cc still complained on cast). 
-
-	<LI> fixed various VC++ warnings as suggested by Gilles Vollant
-	<info at winimage.com>.  
-
-	<LI> Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to
-	not imply applications are responsible for image data swapping.
-
-	<LI>  HTML-ized the man pages, added to html/man
-	
-	<LI>  Removed LZW Compression to comply with Unisys patent extortion. 
-
-	<LI>  Corrected one remaining 16 -> 32 bit value in tif_fax3.c, 
-	   From Ivo Penzar <ivo.penzar at infolink-software.com. 
-
-	<LI>  Added patch from Ivo Penzar to have TiffAdvanceDirectory handle
-	   memory mapped files. <ivo.penzar at infolink-software.com>
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-	<LI> Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c 
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.4.html b/tkimg1.3/libtiff/html/v3.5.4.html
deleted file mode 100644
index 2643fba..0000000
--- a/tkimg1.3/libtiff/html/v3.5.4.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.4
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.4<BR>
-<B>Previous Version</B>: <A HREF=v3.5.3.html>v3.5.3</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-	<LI> None
-
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-
-	<li> Aadded Pixar tag support.  Contributed by Phil Beffery <phil at pixar.com> 
-
-	<li>  Made one more change to tif_dir.c for removal of LZW compression. Also added notice 
-	  when LZW compression invoked. 
-
-        <li> Fixed bug that caused LZW (non) compression to segfault. Added 
-	  warning about LZW compression removed being removed, and why. 
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-	<li> Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions
-	  in tools to reflect removal of LZW compression
-	
-	<li> Added nostrip to install in tools/Makefile.in so that debugging 
-	  symbols are kept. 
-	
- 	<li> Made Packbits the default compression in tools/tiff2rgba.c instead
-	of LZW.
-
-
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.5.html b/tkimg1.3/libtiff/html/v3.5.5.html
deleted file mode 100644
index 2ea3b51..0000000
--- a/tkimg1.3/libtiff/html/v3.5.5.html
+++ /dev/null
@@ -1,155 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.5
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.5<BR>
-<B>Previous Version</B>: <A HREF=v3.5.4.html>v3.5.4</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-
-        <LI> configure: added test for libc6 for linux targets.  Bug reported by 
-        Stanislav Brabec <utx at k332.feld.cvut.cz>
-
-         <LI>	configure: fixed bugs in sed scripts 
-	(applied sed script s:/@:s;@:;s:/s;;:;: to configure). 
-	fix submitted by Stanislav Brabec <utx at k332.feld.cvut.cz>
-
-	<LI> tools/iptcutil was not in files list, and wasn't being 
-	added to tar archive.  Updated Makefile.in.
-
-        <LI>  Added 3.5 docs to html/Makefile.in.  
-	Thanks to  Stanislav Brabec <utx at k332.feld.cvut.cz>
-
-        <LI> Fixed tools/tiffcmp so that stopondiff testing works.
-	     Patch care of Joseph Orost <joe at sanskrit.lz.att.com>.
-
-        <LI> Added fax3sm_winnt.c to distribution list in Makefile.in. 
-
-         <LI> Added libtiff/libtiff.def to TIFFILES distribution list.
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-        <LI>tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 
-        conversion for the run arrays.  
-
-	<LI> Set td_sampleformat default to SAMPLEFORMAT_UINT instead of 
-	SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c.
-
-        <LI> Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c.
-
-	<LI> Patched tif_fax3.c so that dsp->runs is allocated a bit bigger
-	to avoid overruns encountered with frle_bug.tif.
-
-        
-	<LI> Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is
-	  set to 1, and added default (off) setting in tiffconf.h.  This
-	  should eventually be set by the configure script somehow.
-
-	  The original work on all these 2-4GB changes was done by 
-	  Peter Smith (psmith at creo.com).
-
-	<LI> Modified tif_win32.c to support 2-4GB seeks.
-
-	<LI> tentatively changed toff_t to be unsigned instead of signed to
-	  facilitate support for 2-4GB files. 
-
-	<LI>  Updated a variety of files to use toff_t.  Fixed some mixups
-	      between toff_t and tsize_t.
-
-	<LI> Set tif_rawdatasize to zero when freeing raw data buffer in
-	     TIFFWriteDirectory().
-
-         <LI> Enabled "REWRITE_HACK" in tif_write.c by default.
-        
-         <LI> Fix bug in tif_write.c when switching between reading one directory
-	      and writing to another. 
-
-         <LI> Made TIFFWriteCheck() public, and added TIFFCreateDirectory()
-
-         <LI> Added TIFFmemory(3t) functions to libtiff.def.
-
-         <LI> Added libtiff/libtiff.def to TIFFILES distribution list.
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-	<LI> fax2ps: Fixed mixup of width and height in bounding box statement
-	as per submission by Nalin Dahyabhai <nalin at redhat.com>.
-
-	<LI> fax2ps:  Modified printruns to take uint32 instead of uint16.  
-	Patch courtesy of Bernt Herd <herd at herdsoft.com> 
-
-
-	<LI> Largely reimplemented contrib/addtiffo to avoid temp files, 
- 	    updating the TIFF file in place.  Fixed a few other bugs to.
-
-       <LI> Altered descriptions in tools to reflect "by default" lzw not supported
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION KIT</B></A>
-<UL> 
-	<LI>created mangle-src.sh -- sed scripts to munge src into LZW enabled format. Thanks to Stanislav Brabec <utx at k332.feld.cvut.cz>
-	
-	<LI>created Makefile
-	
-	<LI>merged  tif_dir.c with current source. 
-
-
-	<LI>  Created lzw compression kit, as a new CVS module (libtiff-lzw-compression-kit). 
-
-	<LI>  Updated index.html to note lzw compression kit. 
-
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.6-beta.html b/tkimg1.3/libtiff/html/v3.5.6-beta.html
deleted file mode 100644
index a80b90d..0000000
--- a/tkimg1.3/libtiff/html/v3.5.6-beta.html
+++ /dev/null
@@ -1,185 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.6
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.6<BR>
-<B>Previous Version</B>: <A HREF=v3.5.5.html>v3.5.5</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#contrib">Changes in contrib</A>
-<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-
-	<LI> Added GNULDdso target and switched linux and freebsd to use it. 
-	<LI> tools/Makefile.in: Modified to install properly on SGI.
-	<LI> configure: Fixed DSO test for Linux as per patch from
-	  Jan Van Buggenhout <chipzz at Ace.ULYSSIS.Student.KULeuven.Ac.Be>.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-
-	<LI> tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory
-	as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18
-	from vandrove at vc.cvut.cz.
-
-	<LI> Modified tif_packbits.c decoding to avoid overrunning the
-	output buffer, and to issue a warning if data needs to be
-	discarded.  See http://bugzilla.remotesensing.org/show_bug.cgi?id=18
-
-	<LI> Modified TIFFClientOpen() to emit an error on an attempt to
-	open a comperessed file for update (O_RDWR/r+) access.  This is
-	because the compressor/decompressor code gets very confused when
-	the mode is O_RDWR, assuming this means writing only.  See
-	bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13
-
-	<LI> Applied patch for 0x0000 sequences in tif_fax3.h's definition
-	of EXPAND1D() as per bug 11 (from Roman). 
-
-	<LI> Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve
-	cygwin compatibility.
-
-	<LI> Applied patch from Roman Shpount to tif_fax3.c.  This seems to
-	be a proper fix to the buffer sizing problem.  See 
-	http://bugzilla.remotesensing.org/show_bug.cgi?id=11
-
-	<LI> Fixed tif_getimage.c to fix overrun bug with YCbCr images without
-	downsampling.  http://bugzilla.remotesensing.org/show_bug.cgi?id=10
-	Thanks to Nick Lamb <njl98r at ecs.soton.ac.uk> for reporting the
-	bug and proving the patch.
-	
-	<LI> Fixed tif_jpeg.c so avoid destroying the decompressor before
-	we are done access data thanks to bug report from:
-	Michael Eckstein <eckstein at gepro.cz>.
-
-	<LI> tif_open.c: Don't set MMAP for O_RDWR files.
-
-	<LI> tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY
-	so that files opened for update can be strip chopped too.
-
-	<LI> tif_read.c: fixed up bug with files missing rowsperstrip and
-	the strips per separation fix done a few weeks ago.
-
-	<LI> Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and
-	SAMPLEFORMAT_COMPLEXINT.
-
-	<LI> index.html, bugs.html: added bugzilla info. 
-
-	<LI> tif_read.c: fix subtle bug with determining the number of
-	rows for strips that are the last strip in a separation but
-	not the last strip of all in TIFFReadEncodedStrip().  
-
-	<LI> Applied 16/32 bit fix to tif_fax3.c.  Fix supplied by
-	Peter Skarpetis <peters at serendipity-software.com.au>
-
-	<LI> Modified tiffio.h logic with regard to including windows.h.  It
-	won't include it when building with __CYGWIN__.
-
-	<LI> README: update to mention www.libtiff.org, don't list Sam's old
-	email address.
-
-	<LI> libtiff/tif_dirread.c: Don't use estimate strip byte count for
-	one tile/strip images with an offset, and byte count of zero. These
-	could be "unpopulated" images. 
-
-	<LI> tif_win32.c:  Applied patch to fix overreads and ovverwrites
-	  caught by BoundsChecker.  From Arvan Pritchard 
-	  <arvan.pritchard at infomatix.co.uk>  (untested). 
-	
-        <LI> tif_getimage.c:  Applied patch to silence VC6 warnings.  From 
-	  Arvan Pritchard <arvan.pritchard at informatix.co.uk>
-	
-	<LI> tif_lzw.c:  Applied patch to silence VC6 warnings.  From 
-	  Arvan Pritchard <arvan.pritchard at informatix.co.uk>
-
-	<LI> libtiff/tif_apple.c: Applied "Carbon" support patches supplied by
-	Leonard Rosenthol <leonardr at lazerware.com>.  May interfere
-	with correct building on older systems.  If so, please let me know.
-
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-
-	<LI> tools/rgb2ycbcr.c: fixed output strip size to account for vertical 
-	roundup if rows_per_strip not a multiple of vertical sample size.
-
-	<LI> tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT.
-
-	<LI>  Modified tiff2bw to ensure portions add to 100%, and that
-	 white is properly recovered.  See bug
-	 http://bugzilla.remotesensing.org/show_bug.cgi?id=15 Patch
-	 c/o Stanislav Brabec <utx at penguin.cz>
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN CONTRIB:</B></A>
-
-<UL>
-
-	<LI> contrib/addtiffo: Added "averaging" resampling option.
-
-	<LI> Added contrib/stream (stream io) code submitted by Avi Bleiweiss.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION KIT</B></A>
-<UL> 
-
-    <LI> updated tif_dir.c to reflect changes to no-lzw tif_dir.c
-
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.5.7.html b/tkimg1.3/libtiff/html/v3.5.7.html
deleted file mode 100644
index 4767014..0000000
--- a/tkimg1.3/libtiff/html/v3.5.7.html
+++ /dev/null
@@ -1,259 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.5.7
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.5.7<BR>
-<B>Previous Version</B>: <A HREF=v3.5.6-beta.html>v3.5.6 Beta</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.libtiff.org/">http://www.libtiff.org</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<li> libtiff/libtiff.def: Brent Roman submitted new version adding
-serveral missing entry points.  Also add a few other entry points 
-later.
-
-<li> configure, Makefile.in, etc: added support for OPTIMIZER being
-	set from config.site. 
-<li> config.guess: updated wholesale to an FSF version apparently 
-	from 1998 (as opposed to 1994).  This is mainly inspired by 
-	providing for MacOS X support.
-
-<li> configure/config.site: modified to check if -lm is needed for
-	MACHDEPLIBS if not supplied by config.site.  Needed for Darwin.
-<li> libtiff/tiff.h: Applied hac to try and resolve the problem
-	with the inttypes.h include file on AIX. (Bug 39)
-
-<li> configure, *Makefile.in: Various changes to improve configuration
-	for HP/UX specifically, and also in general.  (Bug 40) They include:
-<ul>
- <li> Try to handle /usr/bin/sh instead of /bin/sh where necessary.
- <li> Upgrade to HP/UX 10.x+ compiler, linker and dso options.
- <li> Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP
- <li> Use -${MAKEFLAGS} in sub makes from makefiles.
- <li> Fixed SCRIPT_SH/SHELL handling.
-</ul>
-<li> configure: Changes for DSO generation on AIX provided by
-	John Marquart <jomarqua at indiana.edu>.
-
-<li> configure, libtiff/Makefile.in: Modified to build DSOs properly
-	on Darwin thanks to Robert Krajewski (rpk at alum.mit.edu) and
-	Keisuke Fujii (fujiik at jlcuxf.kek.jp).
-
-<li> configure, libtiff/Makefile.in: applied OpenBSD patches as per bug 61.
-
-<li> Makefile.in: added DESTDIR support as per bug 60.
-
-<li> libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H 
-	has been included.
-<li> man/Makefile.in: add TIFFClientOpen link as per debian submitted
-	bug 66.
-<li> libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@
-	in two places.
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-
-<UL> 
-<li> tif_fax3.c: keep rw_mode flag internal to fax3 state to remember
-	whether we are encoding or decoding.  This is to ensure graceful 
-	recovery if TIFFClientOpen() discovers an attempt to open a compressed
-	file for "r+" access, and subsequently close it, as it resets the 
-	tif_mode flag to O_RDONLY in this case to avoid writes, confusing the
-	compressor's concept of whether it is in encode or decode mode.
-<li> tif_luv.c/tiff.h/tiffio.h: 
-	New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward 
-	(greg at shutterfly.com).  He writes:
-
-<ol>
-	<li> I improved the gamut-mapping function in tif_luv.c for imaginary
-	colors, because some images were being super-saturated on the input 
-	side and this resulted in some strange color shifts in the output.
-
-	<li> I added a psuedotag in tiff.h to control random dithering during
-	LogLuv encoding.  This is turned off by default for 32-bit LogLuv and 
-	on for 24-bit LogLuv output.  Dithering improves the average color 
-	accuracy over the image.
-
-	<li> I added a #define for LOG_LUV_PUBLIC, which is enabled by default in
-	tiffio.h, to expose internal routines for converting between LogLuv and
-	XYZ coordinates.  This is helpful for writing more efficient,
-	specialized conversion routines, especially for reading LogLuv files.
-</ol>
-
-<li> libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS.
-
-<li> Added TIFFTAG_COPYRIGHT support.
-<li> tif_getimage.c: Added support for 16bit minisblack/miniswhite 
-	images in RGBA interface.
-<li> libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per
-	bug 44.
-<li> libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the
-	case of writing TIFF_BYTE/TIFF_SBYTE fields as per bug 43.
-
-<li> libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for
-	TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to
-	force use of uint32 counts instead of short counts. 
-
-<li> libtiff/tif_dirinfo.c: moved pixar and copyright flags to 
-	ensure everything is in order.
-
-<li> Integrated experimental OJPEG support from Scott Marovich of HP.  
-
-<li> libtiff/tif_open.c: Seek back to zero after failed read,
-	before writing header.
-
-<li> libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ 
-	when checking for 64 bit architectures as per bugzilla bug 67.
-<li> libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy()
-	in TIFFReadRGBATile() to avoid issues in cases of overlapping
-	buffers.  See Bug 69 in Bugzilla. 
-<li> libtiff/tif_getimage.c: Don't complain for CMYK (separated)
-	images with more than four samples per pixel as per bug 73.
-
-<li> libtiff/tif_getimage.c: relax handling of contig case where
-there are extra samples that are supposed to be ignored as per bug 75.  This
-should now work for 8bit greyscale or palletted images.  
-
-<li> libtiff/tif_packbits.c: fixed memory overrun error as per bug 77.
-
-<li> libtiff/tif_getimage.c: Fixed problem with reading strips or
-tiles that don't start on a tile boundary.  Fix contributed by
-Josep Vallverdu (from HP), and further described in bug 47.
-
-<li> libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to
-	always use the "safe" version, even if there is a very slight
-	cost in performance as per bug 54.
-<li> libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an
-	error about LZW not being available.
-
-<li> libtiff/tif_dir.c: propagate failure to initialize compression
-	back from TIFFSetField() as an error status, so applications can 
-	detect failure.
-
-<li> libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug as per bug 78.
-
-<li> libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function.
-Updated TIFFWriteDirectory man page to include TIFFRewriteDirectory.
-
-<li> libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, 
-	COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases 
-	in keeping with TIFF 6.0 standard in tiff.h as per bug 83.
-
-<li> Added PHOTOMETRIC_ITULAB as per bug 90.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!-------------------------------------------------------------------------->
-
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-<li> Brent Roman contributed updated tiffcp utility (and tiffcp.1)
-	with support for extracting subimages with the ,n syntax, and also
-	adding the -b bias removal flag. 
-<li> tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by
-	Bruce A. Mallett, including a faster encoder, fixes for level
-	2 PostScript, and support for the imagemask operator.
-<li> fax2ps.c: Helge (libtiff at oldach.net) submitted fix
-that corrects behaviour for non-Letter paper
-sizes. (Bug 35) It fixes two problems:
-<br>
-	Without	scaling (-S) the fax is now centered on the page size specified
-	with -H	and/or -W. Before, fax2ps was using an obscure and practially
-	useless algorithm to allocate the image relative to Letter sized paper
-	which sometime sled to useless whitespace on the paper, while at the
-	same time cutting of the faxes printable area at the opposite border.
-<br>
-
-	Second, scaling now preserves aspect ratio, which makes unusual faxes
-	(in particular short ones) print properly.
-
-<li> thumbnail.c: changed default output compression
-	to packbits from LZW since LZW isn't generally available.
-<li> tiff2rgba.c: added -n flag to avoid emitting alpha component. Also added
-a man page for tiff2rgba.
-
-<li> tiffcmp.c: Fixed multi samples per pixel support for ContigCompare
-as per bug 53.
-Updated bug section of tiffcmp.1 to note tiled file issues.
-
-<li> libtiff/tif_getimage.c: Fixed so that failure is properly
-	reported by gtTileContig, gtStripContig, gtTileSeparate and 
-	gtStripSeparate as per bug 51.
-
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION KIT:</B></A>
-<UL> 
-	<LI> Rewrote lzw patching process so that is required to enable full
-	LZW support is to drop the tif_lzw.c from the 
-	libtiff-lzw-compression-kit over the one in the libtiff directory. 
-
-	<LI> Some changes were made to make recovery from failure to
-	initialize the LZW compressor more graceful.
-
-	<LI> Note that as distributed libtiff support LZW decompression, but
-        not LZW compression. 
-</UL>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
-<UL> 
-<li> Fixed distribution to include contrib/addtiffo/tif_ovrcache.{c,h}.
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.6.0.html b/tkimg1.3/libtiff/html/v3.6.0.html
deleted file mode 100644
index f4a30e5..0000000
--- a/tkimg1.3/libtiff/html/v3.6.0.html
+++ /dev/null
@@ -1,434 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.6.0
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.6.0<BR>
-<B>Previous Version</B>: <A HREF=v3.5.7.html>v3.5.7</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#hightlights">Major Changes</A>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#contrib">Changes in the contrib area</A>
-<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
-
-<ul>
-	<li> New utility <a href=./man/raw2tiff.1.html>raw2tiff</a>
-for converting raw rasters into TIFF files.
-	<li> Lots of new <a href=./man/tiff2ps.1.html>tiff2ps</a> options.
-	<li> Lots of new <a href=./man/fax2tiff.1.html>fax2tiff</a> options.
-	<li> Lots of bug fixes for LZW, JPEG and OJPEG compression. 
-</ul>
-
-<h3>Custom Tag Support</h3>
-
-The approach to extending libtiff with custom tags has changed radically.
-Previously, all internally supported TIFF tags had a place in the 
-private TIFFDirectory structure within libtiff to hold the values (if read),
-and a "field number" (ie. FIELD_SUBFILETYPE) used to identify that tag. 
-However, every time a new tag was added to the core, the size of the
-TIFFDirectory structure would changing, breaking any dynamically linked
-software that used the private data structures.<p>
-
-Also, any tag not recognised
-by libtiff would not be read and accessable to applications without some
-fairly complicated work on the applications part to pre-register the tags
-as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on
-libtiff.  <p>
-
-Amoung other things this approach required the extension code
-to access the private libtiff structures ... which made the higher level
-non-libtiff code be locked into a specific version of libtiff at compile time.
-This caused no end of bug reports!<p>
-
-The new approach is for libtiff to read all tags from TIFF files.  Those that
-aren't recognised as "core tags" (those having an associated FIELD_ value, 
-and place for storage in the TIFFDirectory structure) are now read into a 
-dynamic list of extra tags (td_customValues in TIFFDirectory).  When a new
-tag code is encountered for the first time in a given TIFF file, a new 
-anonymous tag definition is created for the tag in the tag definition list. 
-The type, and some other metadata is worked out from the instance encountered.
-These fields are known as "custom tags".  <p>
-
-Custom tags can be set and fetched normally using TIFFSetField() and 
-TIFFGetField(), and appear pretty much like normal tags to application code.
-However, they have no impact on internal libtiff processing (such as
-compression).  Some utilities, such as tiffcp will now copy these custom
-tags to the new output files. <p>
-
-As well as the internal work with custom tags, new C API entry points
-were added so that extension libraries, such as libgeotiff, could 
-define new tags more easily without accessing internal data structures.  
-Because tag handling of extension tags is done via the "custom fields" 
-mechanism as well, the definition provided externally mostly serves to provide
-a meaningful name for the tag.
-
-The addition of "custom tags" and the altered approach to extending libtiff
-with externally defined tags is the primary reason for the shift to the 
-3.6.x version number from 3.5.x.<p>
-
-<P><HR WIDTH=65% ALIGN=left>
-<!--------------------------------------------------------------------------->
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-<li> configure, config.site: Fix for large files (>2GiB) support. New
-option in the config.site: LARGEFILE="yes". Should be enougth for the large
-files I/O.
-
-<li> configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT.
-
-<li> html/Makefile.in: Updated to use groffhtml for generating html pages
-from man pages.
-
-<li> configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support
-from John H. DuBois III.  
-
-<li> libtiff/{Makefile.vc, libtiff.def}: Missed declarations added.
-
-<li> libtiff/Makefile.in, tools/Makefile.in: Shared library will not be
-stripped when installing, utility binaries will do be stripped. As per bug 93.
-
-<li> man/Makefile.in: Patch DESTDIR handling as per bug 95.
-
-<li> configure: OpenBSD changes for Sparc64 and DSO version as per bug 96.
-
-<li> config.site/configure: added support for OJPEG=yes option to enable
-OJPEG support from config.site.
-
-<li> config.guess, config.sub: Updated from ftp.gnu.org/pub/config.
-
-<li> configure: Modify CheckForBigEndian so it can work in a cross
-compiled situation.
-
-<li> configure, libtiff/Makefile.in: Changes for building on MacOS 10.1
-as per bug 94.
-
-<li> html/Makefile.in: added missing images per bug 92.
-
-<li> port/Makefile.in: fixed clean target per bug 92.
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-
-<li> libtiff/tif_getimage.c: New function <A
-HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
-implemented to retrieve raster array with user-specified origin position.
-
-<li> libtiff/tif_fax3.c: Fix wrong line numbering.
-
-<li> libtiff/tif_dirread.c: Check field counter against number of fields.
-
-<li> Store a list of opened IFD to prevent directory looping.
-
-<li> libtiff/tif_jpeg.c: modified segment_height calculation to always
-be a full height tile for tiled images.  Also changed error to just
-be a warning.
-
-<li> libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till
-LZWSetupDecode().  Needed to read LZW files in "r+" mode.
-	
-<li> libtiff/tif_dir.c: fixed up the tif_postdecode settings responsible
-for byte swapping complex image data.
-	
-<li> libtiff/tif_open.c: Removed error if opening a compressed file
-in update mode bug (198).
-
-<li> libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is
-a pre-existing compressed image.  That is, image writing to pre-existing
-compressed images is not allowed.
-
-<li> html/man/*.html: Web pages regenerated from man pages.
-
-<li> libtiff/tif_jpeg.c: Hack to ensure that "boolean" is defined properly
-on Windows so as to avoid the structure size mismatch error from libjpeg
-(bug 188).
-
-<li> libtiff/tiff.h: #ifdef USING_VISUALAGE around previous Visual Age
-AIX porting hack as it screwed up gcc. (bug 39)
-
-<li> libtiff/tiff.h: added COMPRESSION_JP2000 (34712) for LEAD tools
-custom compression.
-
-<li> libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays
-by the TIFFFetchByteArray() function. (bug 52)
-
-<li> libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair()
-as per bug 196.
-
-<li> libtiff/tif_lzw.c: Additional consistency checking added in
-LZWDecode() and LZWDecodeCompat() fixing bugs 190 and 100.
-
-<li> libtiff/tif_lzw.c: Added check for valid code lengths in LZWDecode()
-and LZWDecodeCompat(). Fixes bug 115.
-
-<li> tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the
-return code from the underlying pick function as per bug 177.
-
-<li> libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to
-fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't
-present in the tiff tags as per bug 168.
-
-<li> libtiff/tif_jpeg.c: Fixed problem with setting of nrows in 
-JPEGDecode() as per bug 129. 
-
-<li> libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and
-TIFFWriteScanline() now set tif_row explicitly in case the codec has
-fooled with the value as per bug 129.
-
-<li> libtiff/tif_ojpeg.c: Major upgrade from Scott.  Details in bug 156.
-
-<li>  libtiff/tif_open.c: Pointers to custom procedures
-in TIFFClientOpen() are checked to be not NULL-pointers.
-
-<li> libtiff/tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat
-replaced by warnings. Now libtiff should read corrupted LZW-compressed
-files by skipping bad strips as per bug 100.
-	
-<li> libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h:
-<a href=./man/TIFFWriteDirectory.3t.html>TIFFCheckpointDirectory()</a>
-routine added as per bug 124.  The
-<a href=./man/TIFFWriteDirectory.3t.html>TIFFWriteDirectory</a>
-man page discusses this new function as well as the related 
-<a href=./man/TIFFWriteDirectory.3t.html>TIFFRewriteDirectory()</a>.
-
-<li> libtiff/: tif_codec.c, tif_compress.c, tiffiop.h, tif_getimage.c: 
-Introduced
-additional members tif->tif_decodestatus and tif->tif_encodestatus
-for correct handling of unconfigured codecs (we should not try to read
-data or to define data size without correct codecs). See bug 119.
-
-<li> tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func as
-per bug 111.
-
-<li> libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
-tif_dirwrite.c: Dwight Kelly added get/put code for new tag XMLPACKET as 
-defined in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 
-spec INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: 
-CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and
-INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9).
-
-<li> libtiff/tif_getimage.c: Additional check for supported codecs added in 
-TIFFRGBAImageOK, TIFFReadRGBAImage, TIFFReadRGBAStrip and TIFFReadRGBATile now
-use TIFFRGBAImageOK before reading a per bug 110.
-
-<li> libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
-tif_dirwrite.c: Added routine
-<a href=./man/TIFFDataWidth.3t.html>TIFFDataWidth</a> for determining
-TIFFDataType sizes instead of working with tiffDataWidth array
-directly as per bug 109.
-
-<li>libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to
-read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION,
-TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC as per bug 99.
-
-<li> libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__ as per bug 94.
-
-<li> libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the
-decodestrip function returns anything not greater than zero as per bug 97.
-
-<li> libtiff/tif_jpeg.c: fixed computation of segment_width for 
-tiles files to avoid error about it not matching the 
-cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile 
-size.") for ITIFF files.  Apparently the problem was incorporated since
-3.5.5, presumably during the OJPEG/JPEG work recently.
-
-<li> libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 
-(defined in tiffconf.h - 1 by default) then the RGBA interface
-will assume that a fourth extra sample is ASSOCALPHA if the
-EXTRASAMPLE value isn't set for it.  This changes the behaviour of
-the library, but makes it work better with RGBA files produced by
-lots of applications that don't mark the alpha values properly.
-As per bugs 93 and 65.
-
-<li> libtiff/tif_jpeg.c: allow jpeg data stream sampling values to 
-override those from tiff directory.  This makes this work with 
-ImageGear generated files. 
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!-------------------------------------------------------------------------->
-	
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-	
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added page size setting
-when creating PS Level 2.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Fixed PS comment emitted when
-FlateDecode is being used.
-
-<li> <a href=./man/tiffsplit.1.html>tiffsplit</a>: increased the maximum
-number of pages that can be split.
-
-<li> <a href=./man/raw2tiff.1.html>raw2tiff</a>: Added option `-p' to
-explicitly select color	space of input image data.
-
-<li> <a href=./man/tiffmedian.1.html>tiffmedian</a>: Suppiort for large
-(> 2GB) images.
-
-<li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: Fixed possible endless loop.
-
-<li> <a href=./man/tiff2rgba.1.html>tiff2rgba</a>: Switched to use
-<A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImageOriented()</A>
-instead of <A HREF="./man/TIFFReadRGBAImage.3t.html">TIFFReadRGBAImage()</A>.
-
-<li> <a href=./man/tiffcmp.1.html>tiffcmp</a>: Fixed problem with unused data
-comparing (bug 349). `-z' option now can be used to set the number of reported
-different bytes.
-
-<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Added possibility to specify
-value -1 to -r option to get the entire image as one strip (bug 343).
-
-<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Set the correct RowsPerStrip
-and PageNumber values (bug 343).
-	
-<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Page numbering fixed (bug
-341).
-
-<li> <a href=./man/ppm2tiff.1.html>ppm2tiff</a>: PPM header parser improved:
-now able to skip comments.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Force deadzone printing when
-EPS output specified (bug 325).
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Add ability to generate
-PS Level 3. It basically allows one to use the /flateDecode filter for ZIP
-compressed TIFF images. Patch supplied by Tom Kacvinsky (bug 328).
-	
-<li> <a href=./man/tiffcp.1.html>tiffcp</a>: Fixed problem with colorspace
-conversion for JPEG encoded images (bugs 23 and 275)
-
-<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Applied patch from
-Julien Gaulmin. More switches for fax2tiff tool for better control
-of input and output (bugs 272 and 293).
-
-<li> <a href=./man/raw2tiff.1.html>raw2tiff</a>:
-New utility for turning raw raster images into TIFF files
-written by Andrey Kiselev.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>:
-Sebastian Eken provided patches (bug 200) to add new these new 
-switches:
-  <ul>
-    <li> <b>-b #</b>: for a bottom margin of # inches
-    <li> <b>-c</b>: center image
-    <li> <b>-l #</b>: for a left margin of # inches
-    <li> <b>-r</b>: rotate the image by 180 degrees
-  </ul>
-
-Also, new features merged with code for shrinking/overlapping.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Don't emit BeginData/EndData
-DSC comments since we are unable to properly include the amount to skip
-as per bug 80.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Added workaround for some
-software that may crash when last strip of image contains fewer number
-of scanlines than specified by the `/Height' variable as per bug 164.
-
-<li> <a href=./man/tiff2ps.1.html>tiff2ps</a>: Patch from John Williams to add new 
-functionality for tiff2ps utility splitting long images in several pages as
-per bug 142. New switches:
-	<ul>
-		<li> <b>-H #</b>: split image if height is more than # inches
-		<li> <b>-L #</b>: overLap split images by # inches
-	</ul>
-
-<li>  <a href=./man/tiff2ps.1.html>tiff2ps</a>: New commandline
-switches to override resolution units obtained from the input file per bug 131:
-	<ul>
-		<li> <b>-x</b>: override resolution units as centimeters
-		<li> <b>-y</b>: override resolution units as inches
-	</ul>
-
-<li> <a href=./man/fax2tiff.1.html>fax2tiff</a>: Updated to reflect
-latest changes in libtiff per bug 125.
-
-<li> tiff2ps: Division by zero fixed as per bug 88.
-
-<li> <a href=./man/tiffcp.1.html>tiffcp<a>:
-Added support for 'Orientation' tag.
-
-<li> <a href=./man/tiffdump.1.html>tiffdump</a>:
-include TIFFTAG_JPEGTABLES in tag list.
-
-<li> tiffset: fix bug in error reporting.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
-<UL> 
-
-<li> Fixed distribution to include contrib/addtiffo/tif_ovrcache.{c,h}.
-<li> libtiff/contrib/win95: renamed to contrib/win_dib.  Added new 
-Tiffile.cpp example of converting TIFF files into a DIB on Win32 as per 
-bug 143.
-
-</UL>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION
-KIT:</B></A>
-<UL> 
-
-<li> LZW compression kit synchronized with actual libtiff version.
-
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/html/v3.6.1.html b/tkimg1.3/libtiff/html/v3.6.1.html
deleted file mode 100644
index 657c938..0000000
--- a/tkimg1.3/libtiff/html/v3.6.1.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>
-Changes in TIFF v3.6.1
-</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=white>
-<FONT FACE="Helvetica, Arial, Sans">
-<FONT FACE="Helvetica, Arial, Sans"> 
-
-<BASEFONT SIZE=4>
-<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
-<BASEFONT SIZE=3>
-
-<UL>
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-<B>Current Version</B>: v3.6.1<BR>
-<B>Previous Version</B>: <A HREF=v3.6.0.html>v3.6.0</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a> 
-<HR SIZE=4 WIDTH=65% ALIGN=left>
-</UL>
-
-<P>
-This document describes the changes made to the software between the
-<I>previous</I> and <I>current</I> versions (see above).
-If you don't find something listed here, then it was not done in this
-timeframe, or it was not considered important enough to be mentioned.
-The following information is located here:
-<UL>
-<LI><A HREF="#hightlights">Major Changes</A>
-<LI><A HREF="#configure">Changes in the software configuration</A>
-<LI><A HREF="#libtiff">Changes in libtiff</A>
-<LI><A HREF="#tools">Changes in the tools</A>
-<LI><A HREF="#contrib">Changes in the contrib area</A>
-<LI><A HREF="#lzwkit">Changes in the LZW compression kit</A>
-</UL>
-<p> 
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
-
-<ul>
-	<li> New utility <a href="./man/tiff2pdf.1.html">tiff2pdf</a>
-	for converting TIFF images directly into PDF.
-	<li> New <a href="./man/TIFFcolor.3t.html">color conversion module</a>.
-	<li> Full support for Orientation tag in
-	<a href="./man/TIFFReadRGBAImage.3t.html">TIFFRGBAImage</a> interface.
-	<li> Many bugs fixed.
-</ul>
-
-
-<P><HR WIDTH=65% ALIGN=left>
-<!--------------------------------------------------------------------------->
-
-<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
-
-<UL>
-
-<li> libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG library.
-
-<li> Makefile.in: Add an absolute path to the test_pics.sh call.
-
-<li> Makefile.in: Add an absolute path to the test_pics.sh call.
-
-<li> libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD typedefs.
-
-<li> configure, libtiff/{Makefile.in, mkversion.c}: Relative buildings fixed.
-
-<li> Makefile.in: Add an absolute path to the test_pics.sh call.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
-
-<UL>
-
-<li> libtiff/{tif_color.c, tif_getimage.c, tiffio.h}: Added support
-for ReferenceBlackWhite tag handling when converted from YCbCr color space as
-per bug 120.
-
-<li> libtiff/{tif_getimage.c, tif_aux.c}: Read WhitePoint tag from the
-file and properly use it for CIE Lab 1976 to RGB transform.
-
-<li> libtiff/{tif_getimage.c, tiffio.h}: Finally resolved problems with
-orientation handling. TIFFRGBAImage interface now properly supports all
-possible orientations, i.e. images will be flipped both in horizontal and
-vertical directions if required. 'Known bugs' section now removed from the
-appropriate manual pages.
-
-<li> libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine,
-reported by Antonio Scuri.
-
-<li> libtiff/{tiffio.h, tif_codec.c}: Added new function
-TIFFIsCODECConfigured(), suggested by Ross Finlayson.
-
-<li> libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly extract
-the fields from the OJPEG files. Patch supplied by Ross	Finlayson.
-
-<li> libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo declaration replaced
-with _TIFFFindOrRegisterFieldInfo as reported by Ross Finlayson.
-
-<li> libtiff/tif_dirinfo.c: Implemented binary search in _TIFFMergeFieldInfo().
-Patch supplied by Ross Finlayson.
-
-<li> tif_dirread.c: do not mark all anonymously defined tags to be IGNOREd (as
-it was done in 3.6.0).
-
-<li> libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) datatype,
-intruduced in "Adobe PageMaker TIFF Technical Notes".
-
-<li> libtiff/{tif_color.c, tif_getimage.c, tiffio.h}: New color space
-conversion code: CIE L*a*b* 1976 images now supported by the TIFFRGBAImage
-interface. YCbCr to RGB conversion code also moved there and now has
-<a href="./man/TIFFcolor.3t.html">publicly available interface</a>. These
-routines currently used in TIFFRGBAImage interface only and not supported in
-other libtiff tools yet. So if you want, for example, to convert CIE Lab image
-into PostScript file you should do it in two steps: chnge colorspace to RGB
-using <a href="./man/tiff2rgba.1.html">tiff2rgba</a> utility abd then process
-it with the <a href="./man/tiff2ps.1.html">tiff2ps</a>.
-
-<li> libtiff/tif_tile.c: Remove spurious use of "s" (sample) in the
-planarconfig_contig case in TIFFComputeTile() as per bug 387
-
-<li> libtiff/tiffiop.h: New macros: TIFFmax and TIFFmin.
-
-<li> libtiff/{tiffio.h, tif_strip.c}: Added TIFFRawStripSize() function
-as suggested by Chris Hanson.
-
-<li> libtiff/{tif_lzw.c, tif_fax3.c}: Proper support for update mode
-as per bug 424.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!-------------------------------------------------------------------------->
-	
-<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
-
-<UL>
-
-<li> <a href=./man/tiff2pdf.1.html>tiff2pdf</a>: New tool, written by
-Ross Finlayson, to directly convert TIFF files to PDF.
-
-<li> <a href=./man/tiffgt.1.html>tiffgt</a>: Unmaintained and platform
-dependent sgigt utility removed and replaced with the completely rewritten
-portable <a href=./man/tiffgt.1.html>tiffgt</a> tool (depend on OpenGL and
-GLUT). This tool will not build by default.
-
-<li> <a href=./man/ras2tiff.1.html>ras2tiff</a>: Properly determine
-SUN Rasterfiles with the reverse byte order (it is reported by the magic
-header field). Problem reported by Andreas Wiesmann.
-
-<li> <a href=./man/raw2tiff.1.html>raw2tiff</a>: Implemented image size
-guessing using correlation coefficient calculation between two neighbour
-lines.
-
-</UL>
-
-<P><HR WIDTH=65% ALIGN=left>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
-<UL> 
-
-<li> contrib/pds/{tif_pdsdirread.c, tif_pdsdirwrite.c}: Use TIFFDataWidth()
-function insted of tiffDataWidth array.
-
-</UL>
-
-<!--------------------------------------------------------------------------->
-
-<A NAME="lzwkit"><B><FONT SIZE=+3>C</FONT>HANGES IN THE LZW COMPRESSION
-KIT:</B></A>
-<UL> 
-
-<li> Proper support for update mode as per bug 424.
-
-</UL>
-
-<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
-
-<HR>
-
-Last updated $Date: 2007/01/03 20:47:10 $.
-
-</BODY>
-</HTML>
diff --git a/tkimg1.3/libtiff/libtiff/Makefile.in b/tkimg1.3/libtiff/libtiff/Makefile.in
deleted file mode 100644
index 48599d6..0000000
--- a/tkimg1.3/libtiff/libtiff/Makefile.in
+++ /dev/null
@@ -1,414 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/Makefile.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-SRCDIR	= @LIBSRCDIR@
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
-SHELL	= @SCRIPT_SH@
-SCRIPT_SH = @SCRIPT_SH@
-NULL	=
-CC	= @CCOMPILER@
-AR	= @AR@
-AROPTS	= @AROPTS@
-RANLIB	= @RANLIB@
-INSTALL	= @INSTALL@
-
-#
-# If JPEG support is to be included and the Independent JPEG
-# Software distribution is not installed then DIR_JPEG must
-# refer to the directory where the include files reside.
-#
-# Similarly, if the libgz distribution is not installed, then
-# DIR_LIBGZ must refer to the directory where the include files
-# are located.  Note that recent versions 
-#
-IPATH	= -I. -I${SRCDIR} @COPT_LIBINC@
-#
-# To enable JPEG support include -DJPEG_SUPPORT here.
-# To enable Deflate support add a -DZIP_SUPPORT here.
-# Note that where the configure script is used these defines
-# are automatically setup when JPEG/ZIP is set to "yes".
-#
-# Otherwise, consult tiffconf.h for information on controlling
-# the configuration of optional library support.
-#
-CONF_LIBRARY=@CONF_JPEG@ @CONF_ZIP@
-COPTS	= @GCOPTS@
-OPTIMIZER=@OPTIMIZER@
-LFSOPTS=@LFSOPTS@
-CFLAGS	= @ENVOPTS@ @LIBCOPTS@ ${COPTS} ${OPTIMIZER} ${LFSOPTS} ${IPATH} ${CONF_LIBRARY}
-#
-SRCS	= \
-	tif_aux.c \
-	tif_close.c \
-	tif_codec.c \
-	tif_compress.c \
-	tif_color.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_extension.c \
-	tif_fax3.c \
-	tif_fax3sm.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_flush.c \
-	tif_luv.c \
-	tif_lzw.c \
-	tif_next.c \
-	nnnntif_ojpeg.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_pixarlog.c \
-	tif_predict.c \
-	tif_print.c \
-	tif_read.c \
-	tif_swab.c \
-	tif_strip.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_unix.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	tif_zip.c \
-	${NULL}
-OBJS	= \
-	tif_aux.o \
-	tif_close.o \
-	tif_codec.o \
-	tif_compress.o \
-	tif_color.o\
-	tif_dir.o \
-	tif_dirinfo.o \
-	tif_dirread.o \
-	tif_dirwrite.o \
-	tif_dumpmode.o \
-	tif_error.o \
-	tif_extension.o \
-	tif_fax3.o \
-	tif_fax3sm.o \
-	tif_getimage.o \
-	tif_jpeg.o \
-	tif_flush.o \
-	tif_luv.o \
-	tif_lzw.o \
-	tif_next.o \
-	tif_ojpeg.o \
-	tif_open.o \
-	tif_packbits.o \
-	tif_pixarlog.o \
-	tif_predict.o \
-	tif_print.o \
-	tif_read.o \
-	tif_swab.o \
-	tif_strip.o \
-	tif_thunder.o \
-	tif_tile.o \
-	tif_unix.o \
-	tif_version.o \
-	tif_warning.o \
-	tif_write.o \
-	tif_zip.o \
-	${NULL}
-TARGETS	= libtiff.a
-
-all:	${TARGETS}
-	if [ @DSO at dso != nodso ]; then \
-	    ${MAKE} -${MAKEFLAGS} @DSO at dso; \
-	else \
-	    true; \
-	fi
-
-libtiff.a: ${OBJS}
-	${AR} ${AROPTS} libtiff.a $?
-	${RANLIB} libtiff.a
-
-#
-# NB: The configure script verifies that the configured
-# tools are capable of producing a DSO before enabling
-# their creation/use.  The following rules are effectively
-# duplicated in the configure script to do this verification.
-# This means that if you want to add support for building a
-# DSO on another system you'll need to modify this file *and*
-# configure if you want the right thing to happen automatically
-# (should probably be fixed up).
-#
-
-# default IRIX DSO building rule
-IRIXdso: ${OBJS}
-	@if [ "`basename ${CC}`" = "gcc" ]; then \
-	   ${LD} -n32 @ENVOPTS@ -o libtiff. at DSOSUF@ -shared -rdata_shared \
-	   ${OBJS}; \
-	else \
-	    ${CC} @ENVOPTS@ -o libtiff. at DSOSUF@ -shared -rdata_shared \
-	        -check_registry ${SRCDIR}/../port/irix/so_locations \
-	        -quickstart_info \
-	        ${OBJS} @LIBJPEG@ @LIBGZ@; \
-	fi
-	touch $@
-# special rule for IRIX 5.2
-IRIX52dso: ${OBJS}
-	${LD} -elf -o libtiff. at DSOSUF@ -shared -no_unresolved -all ${OBJS} \
-	    @LIBJPEG@ @LIBGZ@ -lc -lm
-	touch $@
-# Solaris 2.x
-SOLARISdso: ${OBJS}
-	${LD} -L at DIR_LIB@ -G -h libtiff. at DSOSUF@ -o libtiff. at DSOSUF@ ${OBJS}
-	touch $@
-# HP-UX 10.x+
-HPUXdso: ${OBJS}
-	${LD} -b -o libtiff. at DSOSUF_VERSION@ +h libtiff. at DSOSUF_VERSION@ ${OBJS}
-	touch $@
-# AIX 2.3.5 and 4.1.1
-AIXdso: ${OBJS}
-	rm -f libtiff.syms shr.o
-	echo "#!" > libtiff.syms
-	/bin/dump -g libtiff.a | sed -n -e \
-	      's/^[ 	]*[0-9][0-9]*[	 ]*\([^	 .][^ 	]*\)$$/\1/p' \
-	      >> libtiff.syms
-	${LD} -o shr.o libtiff.a -H512 -T512 -bM\:SRE \
-	    -bE\:libtiff.syms @LIBJPEG@ @LIBGZ@ -lc -lm -L at DIR_LIB@
-	rm -f libtiff.syms libtiff. at DSOSUF@
-	${AR} ${AROPTS} libtiff. at DSOSUF@ shr.o
-	rm -f shr.o
-	touch $@
-# GNU linker shared libraries
-GNULDdso: ${OBJS}
-	${CC} -shared -Wl,-soname,libtiff. at DSOSUF@ \
-	    -o libtiff. at DSOSUF_VERSION@  ${OBJS} \
-		@LIBJPEG@ @LIBGZ@ @MACHDEPLIBS@
-	rm -f libtiff. at DSOSUF@
-	if [ @DSOSUF_VERSION@ != @DSOSUF@ ] ; then \
-	  @LN@ @LN_S@ libtiff. at DSOSUF_VERSION@ libtiff. at DSOSUF@; \
-	fi
-	touch $@
-DARWINdso: ${OBJS}
-	${CC} -dynamiclib -undefined error \
-	  -install_name libtiff. at DSOSUF@ \
-	  -o libtiff. at DSOSUF_VERSION@  ${OBJS} \
-	  @LIBJPEG@ @LIBGZ@ @MACHDEPLIBS@
-	rm -f libtiff. at DSOSUF@
-	if [ @DSOSUF_VERSION@ != @DSOSUF@ ] ; then \
-	  @LN@ @LN_S@ libtiff. at DSOSUF_VERSION@ libtiff. at DSOSUF@; \
-	fi
-	touch $@
-# NetBSD 1.1 or FreeBSD (old style)
-NETBSDdso FREEBSDdso oldOPENBSDdso: ${OBJS}
-	@rm -f libtiff_pic.a
-	@${AR} cq libtiff_pic.a `lorder ${OBJS} | tsort -q`
-	${RANLIB} libtiff_pic.a
-	${LD} -x -Bshareable -Bforcearchive -o libtiff. at DSOSUF@ libtiff_pic.a
-	rm -f libtiff_pic.a
-	touch $@
-# linux ELF shared lib rule
-LINUXdso:  ${OBJS}
-	${CC} -shared -Wl,-soname,libtiff. at DSOSUF@ \
-	    -o libtiff. at DSOSUF_VERSION@  ${OBJS} \
-		@LIBJPEG@ @LIBGZ@ @MACHLIBDEPS@
-	rm -f libtiff. at DSOSUF@
-	@LN@ @LN_S@ libtiff. at DSOSUF_VERSION@ libtiff. at DSOSUF@
-	touch $@
-# OSF/1 3.2 shared lib rule
-OSFdso: ${OBJS}
-	${LD} -o libtiff. at DSOSUF@ -shared -error_unresolved ${OBJS} @LIBJPEG@ @LIBGZ@ -lc -lm
-
-OPENBSDdso: ${OBJS}
-	${CC} -shared @LIBCOPTS@ -o libtiff. at DSOSUF_VERSION@ ${OBJS} @LIBJPEG@ @LIBGZ@ -lm
-	touch $@
-
-OPENSERVERdso:  ${OBJS}
-	${CC} -shared -fPIC \
-	  -o libtiff. at DSOSUF_VERSION@  ${OBJS} \
-		@LIBJPEG@ @LIBGZ@
-	rm -f libtiff. at DSOSUF@
-	@LN@ @LN_S@ libtiff. at DSOSUF_VERSION@ libtiff. at DSOSUF@
-	touch $@
-
-${OBJS}: ${SRCDIR}/tiffio.h ${SRCDIR}/tiff.h ${SRCDIR}/tif_dir.h
-${OBJS}: ${SRCDIR}/tiffcomp.h ${SRCDIR}/tiffiop.h ${SRCDIR}/tiffconf.h
-${OBJS}: ${SRCDIR}/tiffvers.h
-
-VERSION	= @VERSIONFILE@
-RELEASE_DATE = @RELEASE_DATE_FILE@
-
-${SRCDIR}/tiffvers.h: ${VERSION} ${SRCDIR}/mkversion.c
-	${CC} -o mkversion ${CFLAGS} ${SRCDIR}/mkversion.c
-	rm -f ${SRCDIR}/tiffvers.h
-	./mkversion -v ${VERSION} -r ${RELEASE_DATE} ${SRCDIR}/tiffvers.h
-
-tiffvers.h:	${SRCDIR}/tiffvers.h
-
-#
-# The finite state machine tables used by the G3/G4 decoders
-# are generated by the mkg3states program.  On systems without
-# make these rules have to be manually carried out.
-#
-tif_fax3sm.c: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h
-	${CC} -o mkg3states ${CFLAGS} ${SRCDIR}/mkg3states.c
-	rm -f tif_fax3sm.c; ./mkg3states -c const tif_fax3sm.c
-
-tif_aux.o: ${SRCDIR}/tif_aux.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_aux.c
-tif_close.o: ${SRCDIR}/tif_close.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_close.c
-tif_codec.o: ${SRCDIR}/tif_codec.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_codec.c
-tif_compress.o: ${SRCDIR}/tif_compress.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_compress.c
-tif_color.o: ${SRCDIR}/tif_color.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_color.c
-tif_dir.o: ${SRCDIR}/tif_dir.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dir.c
-tif_dirinfo.o: ${SRCDIR}/tif_dirinfo.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirinfo.c
-tif_dirread.o: ${SRCDIR}/tif_dirread.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirread.c
-tif_dirwrite.o: ${SRCDIR}/tif_dirwrite.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirwrite.c
-tif_dumpmode.o: ${SRCDIR}/tif_dumpmode.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dumpmode.c
-tif_error.o: ${SRCDIR}/tif_error.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_error.c
-tif_extension.o: ${SRCDIR}/tif_extension.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_extension.c
-tif_fax3.o: ${SRCDIR}/tif_fax3.c ${SRCDIR}/t4.h ${SRCDIR}/tif_fax3.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_fax3.c
-tif_getimage.o: ${SRCDIR}/tif_getimage.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_getimage.c
-tif_jpeg.o: ${SRCDIR}/tif_jpeg.c @DEPEND_JPEGLIB@
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_jpeg.c
-tif_flush.o: ${SRCDIR}/tif_flush.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_flush.c
-tif_luv.o: ${SRCDIR}/tif_luv.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_luv.c
-tif_lzw.o: ${SRCDIR}/tif_lzw.c ${SRCDIR}/tif_predict.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_lzw.c
-tif_next.o: ${SRCDIR}/tif_next.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_next.c
-tif_ojpeg.o: ${SRCDIR}/tif_ojpeg.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_ojpeg.c
-tif_open.o: ${SRCDIR}/tif_open.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_open.c
-tif_packbits.o: ${SRCDIR}/tif_packbits.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_packbits.c
-tif_pixarlog.o: ${SRCDIR}/tif_pixarlog.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_pixarlog.c
-tif_predict.o: ${SRCDIR}/tif_predict.c ${SRCDIR}/tif_predict.h
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_predict.c
-tif_print.o: ${SRCDIR}/tif_print.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_print.c
-tif_read.o: ${SRCDIR}/tif_read.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_read.c
-tif_swab.o: ${SRCDIR}/tif_swab.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_swab.c
-tif_strip.o: ${SRCDIR}/tif_strip.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_strip.c
-tif_thunder.o: ${SRCDIR}/tif_thunder.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_thunder.c
-tif_tile.o: ${SRCDIR}/tif_tile.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_tile.c
-tif_unix.o: ${SRCDIR}/tif_unix.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_unix.c
-tif_version.o: ${SRCDIR}/tif_version.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_version.c
-tif_warning.o: ${SRCDIR}/tif_warning.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_warning.c
-tif_write.o: ${SRCDIR}/tif_write.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_write.c
-tif_zip.o: ${SRCDIR}/tif_zip.c ${SRCDIR}/tif_predict.h @DEPEND_ZLIB@
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_zip.c
-
-tif_apple.o: ${SRCDIR}/tif_apple.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_apple.c
-tif_atari.o: ${SRCDIR}/tif_atari.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_atari.c
-tif_msdos.o: ${SRCDIR}/tif_msdos.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_msdos.c
-tif_vms.o: ${SRCDIR}/tif_vms.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_vms.c
-tif_win3.o: ${SRCDIR}/tif_win3.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tif_win3.c
-
-INCS	= ${SRCDIR}/tiff.h ${SRCDIR}/tiffio.h ${SRCDIR}/tiffconf.h \
-	${SRCDIR}/tiffvers.h
-
-INCS_PRIVATE = ${SRCDIR}/tiffiop.h ${SRCDIR}/tif_dir.h ${SRCDIR}/port.h
-
-installHdrs: ${INCS}
-	${INSTALL} -idb tiff.sw.dev -m 755 -dir ${DESTDIR}@DIR_INC@
-	for i in ${INCS}; do						\
-	    f=`basename $$i`;						\
-	    ${INSTALL} -idb tiff.sw.dev -m 444 -F ${DESTDIR}@DIR_INC@	\
-		-src $$i -O $$f;					\
-	done
-
-installPrivateHdrs: ${INCS_PRIVATE}
-	${INSTALL} -idb tiff.sw.dev -m 755 -dir ${DESTDIR}@DIR_INC@
-	for i in ${INCS_PRIVATE}; do					\
-	    f=`basename $$i`;						\
-	    ${INSTALL} -idb tiff.sw.dev -m 444 -F ${DESTDIR}@DIR_INC@	\
-		-src $$i -O $$f;					\
-	done
-
-installDSO: @DSO at dso
-	if [ @DSOSUF_VERSION@ != @DSOSUF@ ]; then			\
-	    ${INSTALL} -idb tiff.sw.tools.nostrip -m 555		\
-		-F ${DESTDIR}@DIR_LIB@ -O libtiff. at DSOSUF_VERSION@;	\
-	    ${INSTALL} -idb tiff.sw.tools -F ${DESTDIR}@DIR_LIB@	\
-		-lns libtiff. at DSOSUF_VERSION@ -O libtiff. at DSOSUF@;	\
-	    ${INSTALL} -idb tiff.sw.tools -F ${DESTDIR}@DIR_LIB@	\
-		-lns libtiff. at DSOSUF@ -O libtiff.so;			\
-	else								\
-	    ${INSTALL} -idb tiff.sw.tools.nostrip -m 555		\
-		-F ${DESTDIR}@DIR_LIB@ -O libtiff. at DSOSUF@;		\
-	fi
-
-install: all installHdrs
-	${INSTALL} -idb tiff.sw.dev -m 755 -dir ${DESTDIR}@DIR_LIB@
-	${INSTALL} -idb tiff.sw.dev -m 444 -F ${DESTDIR}@DIR_LIB@ -O libtiff.a
-	if [ @DSO at dso != nodso ]; then					\
-	    ${MAKE} -${MAKEFLAGS} installDSO;				\
-	else								\
-	    true;							\
-	fi
-
-install-private: install installPrivateHdrs
-
-clean:
-	rm -f ${TARGETS} ${OBJS} core a.out \
-	    mkg3states tif_fax3sm.c \
-	    mkversion ${SRCDIR}/tiffvers.h \
-	    libtiff.a libtiff. at DSOSUF@ libtiff. at DSOSUF_VERSION@ *dso
diff --git a/tkimg1.3/libtiff/libtiff/Makefile.lcc b/tkimg1.3/libtiff/libtiff/Makefile.lcc
deleted file mode 100644
index bc7d42a..0000000
--- a/tkimg1.3/libtiff/libtiff/Makefile.lcc
+++ /dev/null
@@ -1,129 +0,0 @@
-# $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/Makefile.lcc,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-DESTDIR=.
-#
-INSTALL=install
-NULL=
-
-IPATH=	-I. -I../jpeg
-CONF_LIBRARY=\
-	${NULL}
-COPTS=	-Oloop -cwagshf -d1 -b0 -v -DNDEBUG -rr -j135i
-CFLAGS=	${COPTS} ${IPATH} ${CONF_LIBRARY}
-#
-INCS=	tiff.h tiffio.h
-SRCS=	tif_fax3.c \
-	tif_fax4.c \
-	tif_aux.c \
-	tif_atari.c \
-	tif_ccittrle.c \
-	tif_close.c \
-	tif_compress.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_flush.c \
-	tif_lzw.c \
-	tif_next.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_print.c \
-	tif_read.c \
-	tif_swab.c \
-	tif_strip.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	${NULL}
-OBJS=	tif_fax3.o \
-	tif_fax4.o \
-	tif_aux.o \
-	tif_atari.o \
-	tif_ccittrle.o \
-	tif_close.o \
-	tif_compress.o \
-	tif_dir.o \
-	tif_dirinfo.o \
-	tif_dirread.o \
-	tif_dirwrite.o \
-	tif_dumpmode.o \
-	tif_error.o \
-	tif_getimage.o \
-	tif_jpeg.o \
-	tif_flush.o \
-	tif_lzw.o \
-	tif_next.o \
-	tif_open.o \
-	tif_packbits.o \
-	tif_print.o \
-	tif_read.o \
-	tif_swab.o \
-	tif_strip.o \
-	tif_thunder.o \
-	tif_tile.o \
-	tif_version.o \
-	tif_warning.o \
-	tif_write.o \
-	${NULL}
-ALL=	tiffrnb.lib
-
-all:	${ALL}
-
-${ALL}:	${OBJS}
-	${AR} ${ARFLAGS} $@ r $<
-
-${OBJS}: tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
-tif_fax3.o: tif_fax3.c g3states.h t4.h tif_fax3.h
-
-g3states.h: mkg3states.c t4.h
-	${CC} -o mkg3states.ttp ${CFLAGS} mkg3states.c
-	./mkg3states -c > g3states.h
-
-install: all installh
-	-for i in ${ALL}; do \
-	${INSTALL} -c -m 644 $$i ${DESTDIR}/lib/$$i; \
-	done
-
-installh: ${INCS}
-	-for i in ${INCS}; do \
-		h=`basename $$i`; \
-		cmp -s $$i ${DESTDIR}/include/$$h || \
-		  ${INSTALL} -c -m 444 $$i ${DESTDIR}/include/$$h; \
-	done
-
-clean:
-	rm -f ${ALL} ${OBJS} mkg3states.ttp mkg3states.o g3states.h
-
-tags:	${SRCS}
-	${CTAGS} ${SRCS}
diff --git a/tkimg1.3/libtiff/libtiff/fax3sm_winnt.c b/tkimg1.3/libtiff/libtiff/fax3sm_winnt.c
deleted file mode 100644
index 1d0f34a..0000000
--- a/tkimg1.3/libtiff/libtiff/fax3sm_winnt.c
+++ /dev/null
@@ -1,1046 +0,0 @@
-/* WARNING, this file was automatically generated by the
-    mkg3states program */
-#include "tiff.h"
-#include "tif_fax3.h"
- const  TIFFFaxTabEnt TIFFFaxMainTable[128] = {
-12,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,7,3,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,6,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,7,3,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0
-};
-const TIFFFaxTabEnt TIFFFaxWhiteTable[4096] = {
-12,11,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1856,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2112,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2368,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,1984,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2240,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2496,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,12,11,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1856,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2176,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2432,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2048,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2304,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2560,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7
-};
-const  TIFFFaxTabEnt TIFFFaxBlackTable[8192] = {
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,56,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,57,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,48,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,384,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2368,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,50,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1664,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,26,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1408,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,32,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1024,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,768,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2240,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,38,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,512,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1280,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,896,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,640,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,45,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,29,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1536,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,41,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2048,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,35,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,59,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,256,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1152,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,63,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,53,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2560,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,56,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,57,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,48,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,384,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2368,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,50,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1728,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,26,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1472,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,32,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1088,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,832,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2240,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,38,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,576,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1344,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,960,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,704,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,45,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,29,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1600,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,41,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2048,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,35,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,59,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,256,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1216,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,63,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,53,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2560,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2
-};
diff --git a/tkimg1.3/libtiff/libtiff/libtiff.def b/tkimg1.3/libtiff/libtiff/libtiff.def
deleted file mode 100644
index 4aa8165..0000000
--- a/tkimg1.3/libtiff/libtiff/libtiff.def
+++ /dev/null
@@ -1,102 +0,0 @@
-LIBRARY libtiff
-EXPORTS TIFFOpen
-	TIFFGetVersion
-	TIFFClose
-	TIFFFlush
-	TIFFFlushData
-	TIFFGetField
-	TIFFVGetField
-	TIFFGetFieldDefaulted
-	TIFFVGetFieldDefaulted
-	TIFFGetTagListEntry
-	TIFFGetTagListCount
-	TIFFReadDirectory
-	TIFFScanlineSize
-	TIFFStripSize
-	TIFFVStripSize
-	TIFFRawStripSize
-	TIFFTileRowSize
-	TIFFTileSize
-	TIFFVTileSize
-	TIFFFileno
-	TIFFGetMode
-	TIFFIsTiled
-	TIFFIsByteSwapped
-	TIFFCIELabToRGBInit
-	TIFFCIELabToXYZ
-	TIFFXYZToRGB
-	TIFFYCbCrToRGBInit
-	TIFFYCbCrtoRGB
-	TIFFCurrentRow
-	TIFFCurrentDirectory
-	TIFFCurrentStrip
-	TIFFCurrentTile
-	TIFFDataWidth
-	TIFFReadBufferSetup
-	TIFFLastDirectory
-	TIFFSetDirectory
-	TIFFSetSubDirectory
-	TIFFUnlinkDirectory
-	TIFFSetField
-	TIFFVSetField
-	TIFFCheckpointDirectory
-	TIFFWriteDirectory
-	TIFFRewriteDirectory
-	TIFFPrintDirectory
-	TIFFReadScanline
-	TIFFWriteScanline
-	TIFFReadRGBAImage
-	TIFFReadRGBAImageOriented
-	TIFFPrintDirectory
-	TIFFReadScanline
-	TIFFWriteScanline
-	TIFFReadRGBAImage
-	TIFFFdOpen
-	TIFFClientOpen
-	TIFFFileName
-	TIFFError
-	TIFFWarning
-	TIFFSetErrorHandler
-	TIFFSetWarningHandler
-	TIFFComputeTile
-	TIFFCheckTile
-	TIFFNumberOfTiles
-	TIFFReadTile
-	TIFFWriteTile
-	TIFFComputeStrip
-	TIFFNumberOfStrips
-	TIFFRGBAImageBegin
-	TIFFRGBAImageEnd
-	TIFFReadEncodedStrip
-	TIFFReadRawStrip
-	TIFFReadEncodedTile
-	TIFFReadRawTile
-	TIFFReadRGBATile
-	TIFFReadRGBAStrip
-	TIFFWriteEncodedStrip
-	TIFFWriteRawStrip
-	TIFFWriteEncodedTile
-	TIFFWriteRawTile
-	TIFFSetWriteOffset
-	TIFFSwabDouble
-	TIFFSwabShort
-	TIFFSwabLong
-	TIFFSwabArrayOfShort
-	TIFFSwabArrayOfLong
-	TIFFSwabArrayOfDouble
-	TIFFReverseBits
-	TIFFGetBitRevTable
-	TIFFDefaultStripSize
-	TIFFDefaultTileSize
-	TIFFRasterScanlineSize
-	_TIFFmalloc
-	_TIFFrealloc
-	_TIFFfree
-	_TIFFmemset
-	_TIFFmemcpy
-	_TIFFmemcmp
-	TIFFCreateDirectory
-	TIFFDefaultStripSize
-
-
-
diff --git a/tkimg1.3/libtiff/libtiff/makefile.vc b/tkimg1.3/libtiff/libtiff/makefile.vc
deleted file mode 100644
index 00ef34d..0000000
--- a/tkimg1.3/libtiff/libtiff/makefile.vc
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-#	Simple MS VC++ Makefile
-#
-#	To build:
-#       C:\libtiff\libtiff> nmake /f makefile.vc all
-#
-
-# 
-# Select _CONSOLE to build a library which reports errors to stderr, or
-# _WINDOWED to build such that errors are reported via MessageBox().
-#
-WINMODE = -DTIF_PLATFORM_CONSOLE
-#WINMODE = -DTIF_PLATFORM_WINDOWED
-
-# Uncomment and edit following lines to enable JPEG support
-#JPEG_SUPPORT	= 1
-#JPEGDIR 	= d:/projects/jpeg-6b
-
-CC      	= cl
-INCL		= -I.
-LIBS    	=
-EXTRAFLAGS	=
-
-!IFDEF JPEG_SUPPORT
-INCL		= $(INCL) -I$(JPEGDIR)
-EXTRAFLAGS	= $(EXTRAFLAGS) -DJPEG_SUPPORT
-!ENDIF
-
-CFLAGS  = /nologo /W3 $(INCL) $(WINMODE) $(EXTRAFLAGS)
-
-OBJ	= \
-	tif_aux.obj \
-	tif_close.obj \
-	tif_codec.obj \
-	tif_color.obj \
-	tif_compress.obj \
-	tif_dir.obj \
-	tif_dirinfo.obj \
-	tif_dirread.obj \
-	tif_dirwrite.obj \
-	tif_dumpmode.obj \
-	tif_error.obj \
-	tif_extension.obj \
-	tif_fax3.obj \
-	fax3sm_winnt.obj \
-	tif_getimage.obj \
-	tif_jpeg.obj \
-	tif_ojpeg.obj \
-	tif_flush.obj \
-	tif_luv.obj \
-	tif_lzw.obj \
-	tif_next.obj \
-	tif_open.obj \
-	tif_packbits.obj \
-	tif_pixarlog.obj \
-	tif_predict.obj \
-	tif_print.obj \
-	tif_read.obj \
-	tif_swab.obj \
-	tif_strip.obj \
-	tif_thunder.obj \
-	tif_tile.obj \
-	tif_win32.obj \
-	tif_version.obj \
-	tif_warning.obj \
-	tif_write.obj \
-	tif_zip.obj
-
-VERSION	= ..\VERSION
-ALPHA = ..\dist\tiff.alpha
-
-default:	libtiff.lib
-
-all:	libtiff.lib libtiff.dll
-
-libtiff.lib:	tiffvers.h $(OBJ)
-	lib /out:libtiff.lib $(OBJ)
-
-libtiff.dll:	$(OBJ)
-	link /dll /def:libtiff.def /out:libtiff.dll /implib:libtiff_i.lib \
-		$(OBJ) $(LIBS)
-	
-tiffvers.h:	$(VERSION) mkversion.c
-	$(CC) mkversion.c 
-	if exist tiffvers.h del tiffvers.h
-	.\mkversion.exe -v $(VERSION) tiffvers.h
-
-clean:
-	del *.obj *.lib libtiff.dll
-
-tif_version.obj:	tiffvers.h
-
-
diff --git a/tkimg1.3/libtiff/libtiff/mkg3states.c b/tkimg1.3/libtiff/libtiff/mkg3states.c
deleted file mode 100644
index 1bbcd12..0000000
--- a/tkimg1.3/libtiff/libtiff/mkg3states.c
+++ /dev/null
@@ -1,441 +0,0 @@
-/* "$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/mkg3states.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/* Initialise fax decoder tables
- * Decoder support is derived, with permission, from the code
- * in Frank Cringle's viewfax program;
- *      Copyright (C) 1990, 1995  Frank D. Cringle.
- */
-#if defined(unix) || defined(__unix)
-#include "port.h"
-#else
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-#include "tif_fax3.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-
-/* NB: can't use names in tif_fax3.h 'cuz they are declared const */
-TIFFFaxTabEnt MainTable[128];
-TIFFFaxTabEnt WhiteTable[4096];
-TIFFFaxTabEnt BlackTable[8192];
-
-struct proto {
-    uint16 code;		/* right justified, lsb-first, zero filled */
-    uint16 val;		/* (pixel count)<<4 + code width  */
-};
-
-static struct proto Pass[] = {
-{ 0x0008, 4 },
-{ 0, 0 }
-};
-
-static struct proto Horiz[]  = {
-{ 0x0004, 3 },
-{ 0, 0 }
-};
-
-static struct proto V0[]  = {
-{ 0x0001, 1 },
-{ 0, 0 }
-};
-
-static struct proto VR[]  = {
-{ 0x0006, (1<<4)+3 },
-{ 0x0030, (2<<4)+6 },
-{ 0x0060, (3<<4)+7 },
-{ 0, 0 }
-};
-
-static struct proto VL[]  = {
-{ 0x0002, (1<<4)+3 },
-{ 0x0010, (2<<4)+6 },
-{ 0x0020, (3<<4)+7 },
-{ 0, 0 }
-};
-
-static struct proto Ext[]  = {
-{ 0x0040, 7 },
-{ 0, 0 }
-};
-
-static struct proto EOLV[]  = {
-{ 0x0000, 7 },
-{ 0, 0 }
-};
-
-static struct proto MakeUpW[] = {
-{ 0x001b, 1029 },
-{ 0x0009, 2053 },
-{ 0x003a, 3078 },
-{ 0x0076, 4103 },
-{ 0x006c, 5128 },
-{ 0x00ec, 6152 },
-{ 0x0026, 7176 },
-{ 0x00a6, 8200 },
-{ 0x0016, 9224 },
-{ 0x00e6, 10248 },
-{ 0x0066, 11273 },
-{ 0x0166, 12297 },
-{ 0x0096, 13321 },
-{ 0x0196, 14345 },
-{ 0x0056, 15369 },
-{ 0x0156, 16393 },
-{ 0x00d6, 17417 },
-{ 0x01d6, 18441 },
-{ 0x0036, 19465 },
-{ 0x0136, 20489 },
-{ 0x00b6, 21513 },
-{ 0x01b6, 22537 },
-{ 0x0032, 23561 },
-{ 0x0132, 24585 },
-{ 0x00b2, 25609 },
-{ 0x0006, 26630 },
-{ 0x01b2, 27657 },
-{ 0, 0 }
-};
-
-static struct proto MakeUpB[] = {
-{ 0x03c0, 1034 },
-{ 0x0130, 2060 },
-{ 0x0930, 3084 },
-{ 0x0da0, 4108 },
-{ 0x0cc0, 5132 },
-{ 0x02c0, 6156 },
-{ 0x0ac0, 7180 },
-{ 0x06c0, 8205 },
-{ 0x16c0, 9229 },
-{ 0x0a40, 10253 },
-{ 0x1a40, 11277 },
-{ 0x0640, 12301 },
-{ 0x1640, 13325 },
-{ 0x09c0, 14349 },
-{ 0x19c0, 15373 },
-{ 0x05c0, 16397 },
-{ 0x15c0, 17421 },
-{ 0x0dc0, 18445 },
-{ 0x1dc0, 19469 },
-{ 0x0940, 20493 },
-{ 0x1940, 21517 },
-{ 0x0540, 22541 },
-{ 0x1540, 23565 },
-{ 0x0b40, 24589 },
-{ 0x1b40, 25613 },
-{ 0x04c0, 26637 },
-{ 0x14c0, 27661 },
-{ 0, 0 }
-};
-
-static struct proto MakeUp[] = {
-{ 0x0080, 28683 },
-{ 0x0180, 29707 },
-{ 0x0580, 30731 },
-{ 0x0480, 31756 },
-{ 0x0c80, 32780 },
-{ 0x0280, 33804 },
-{ 0x0a80, 34828 },
-{ 0x0680, 35852 },
-{ 0x0e80, 36876 },
-{ 0x0380, 37900 },
-{ 0x0b80, 38924 },
-{ 0x0780, 39948 },
-{ 0x0f80, 40972 },
-{ 0, 0 }
-};
-
-static struct proto TermW[] = {
-{ 0x00ac, 8 },
-{ 0x0038, 22 },
-{ 0x000e, 36 },
-{ 0x0001, 52 },
-{ 0x000d, 68 },
-{ 0x0003, 84 },
-{ 0x0007, 100 },
-{ 0x000f, 116 },
-{ 0x0019, 133 },
-{ 0x0005, 149 },
-{ 0x001c, 165 },
-{ 0x0002, 181 },
-{ 0x0004, 198 },
-{ 0x0030, 214 },
-{ 0x000b, 230 },
-{ 0x002b, 246 },
-{ 0x0015, 262 },
-{ 0x0035, 278 },
-{ 0x0072, 295 },
-{ 0x0018, 311 },
-{ 0x0008, 327 },
-{ 0x0074, 343 },
-{ 0x0060, 359 },
-{ 0x0010, 375 },
-{ 0x000a, 391 },
-{ 0x006a, 407 },
-{ 0x0064, 423 },
-{ 0x0012, 439 },
-{ 0x000c, 455 },
-{ 0x0040, 472 },
-{ 0x00c0, 488 },
-{ 0x0058, 504 },
-{ 0x00d8, 520 },
-{ 0x0048, 536 },
-{ 0x00c8, 552 },
-{ 0x0028, 568 },
-{ 0x00a8, 584 },
-{ 0x0068, 600 },
-{ 0x00e8, 616 },
-{ 0x0014, 632 },
-{ 0x0094, 648 },
-{ 0x0054, 664 },
-{ 0x00d4, 680 },
-{ 0x0034, 696 },
-{ 0x00b4, 712 },
-{ 0x0020, 728 },
-{ 0x00a0, 744 },
-{ 0x0050, 760 },
-{ 0x00d0, 776 },
-{ 0x004a, 792 },
-{ 0x00ca, 808 },
-{ 0x002a, 824 },
-{ 0x00aa, 840 },
-{ 0x0024, 856 },
-{ 0x00a4, 872 },
-{ 0x001a, 888 },
-{ 0x009a, 904 },
-{ 0x005a, 920 },
-{ 0x00da, 936 },
-{ 0x0052, 952 },
-{ 0x00d2, 968 },
-{ 0x004c, 984 },
-{ 0x00cc, 1000 },
-{ 0x002c, 1016 },
-{ 0, 0 }
-};
-
-static struct proto TermB[] = {
-{ 0x03b0, 10 },
-{ 0x0002, 19 },
-{ 0x0003, 34 },
-{ 0x0001, 50 },
-{ 0x0006, 67 },
-{ 0x000c, 84 },
-{ 0x0004, 100 },
-{ 0x0018, 117 },
-{ 0x0028, 134 },
-{ 0x0008, 150 },
-{ 0x0010, 167 },
-{ 0x0050, 183 },
-{ 0x0070, 199 },
-{ 0x0020, 216 },
-{ 0x00e0, 232 },
-{ 0x0030, 249 },
-{ 0x03a0, 266 },
-{ 0x0060, 282 },
-{ 0x0040, 298 },
-{ 0x0730, 315 },
-{ 0x00b0, 331 },
-{ 0x01b0, 347 },
-{ 0x0760, 363 },
-{ 0x00a0, 379 },
-{ 0x0740, 395 },
-{ 0x00c0, 411 },
-{ 0x0530, 428 },
-{ 0x0d30, 444 },
-{ 0x0330, 460 },
-{ 0x0b30, 476 },
-{ 0x0160, 492 },
-{ 0x0960, 508 },
-{ 0x0560, 524 },
-{ 0x0d60, 540 },
-{ 0x04b0, 556 },
-{ 0x0cb0, 572 },
-{ 0x02b0, 588 },
-{ 0x0ab0, 604 },
-{ 0x06b0, 620 },
-{ 0x0eb0, 636 },
-{ 0x0360, 652 },
-{ 0x0b60, 668 },
-{ 0x05b0, 684 },
-{ 0x0db0, 700 },
-{ 0x02a0, 716 },
-{ 0x0aa0, 732 },
-{ 0x06a0, 748 },
-{ 0x0ea0, 764 },
-{ 0x0260, 780 },
-{ 0x0a60, 796 },
-{ 0x04a0, 812 },
-{ 0x0ca0, 828 },
-{ 0x0240, 844 },
-{ 0x0ec0, 860 },
-{ 0x01c0, 876 },
-{ 0x0e40, 892 },
-{ 0x0140, 908 },
-{ 0x01a0, 924 },
-{ 0x09a0, 940 },
-{ 0x0d40, 956 },
-{ 0x0340, 972 },
-{ 0x05a0, 988 },
-{ 0x0660, 1004 },
-{ 0x0e60, 1020 },
-{ 0, 0 }
-};
-
-static struct proto EOLH[] = {
-{ 0x0000, 11 },
-{ 0, 0 }
-};
-
-static void
-FillTable(TIFFFaxTabEnt *T, int Size, struct proto *P, int State)
-{
-    int limit = 1 << Size;
-
-    while (P->val) {
-	int width = P->val & 15;
-	int param = P->val >> 4;
-	int incr = 1 << width;
-	int code;
-	for (code = P->code; code < limit; code += incr) {
-	    TIFFFaxTabEnt *E = T+code;
-	    E->State = State;
-	    E->Width = width;
-	    E->Param = param;
-	}
-	P++;
-    }
-}
-
-static	char* storage_class = "";
-static	char* const_class = "";
-static	int packoutput = 1;
-static	char* prebrace = "";
-static	char* postbrace = "";
-
-void
-WriteTable(FILE* fd, const TIFFFaxTabEnt* T, int Size, const char* name)
-{
-    int i;
-    char* sep;
-
-    fprintf(fd, "%s %s TIFFFaxTabEnt %s[%d] = {",
-	storage_class, const_class, name, Size);
-    if (packoutput) {
-	sep = "\n";
-	for (i = 0; i < Size; i++) {
-	    fprintf(fd, "%s%s%d,%d,%d%s",
-		sep, prebrace, T->State, T->Width, (int) T->Param, postbrace);
-	    if (((i+1) % 12) == 0)
-		    sep = ",\n";
-	    else
-		    sep = ",";
-	    T++;
-	}
-    } else {
-	sep = "\n ";
-	for (i = 0; i < Size; i++) {
-	    fprintf(fd, "%s%s%3d,%3d,%4d%s",
-		sep, prebrace, T->State, T->Width, (int) T->Param, postbrace);
-	    if (((i+1) % 6) == 0)
-		    sep = ",\n ";
-	    else
-		    sep = ",";
-	    T++;
-	}
-    }
-    fprintf(fd, "\n};\n");
-}
-
-/* initialise the huffman code tables */
-int
-main(int argc, char* argv[])
-{
-    FILE* fd;
-    char* outputfile;
-    int c;
-#ifdef _WIN32
-    const_class = "const";
-    outputfile  = argv[argc-1];
-#else
-    extern int optind;
-    extern char* optarg;
-
-    while ((c = getopt(argc, argv, "c:s:bp")) != -1)
-	switch (c) {
-	case 'c':
-	    const_class = optarg;
-	    break;
-	case 's':
-	    storage_class = optarg;
-	    break;
-	case 'p':
-	    packoutput = 0;
-	    break;
-	case 'b':
-	    prebrace = "{";
-	    postbrace = "}";
-	    break;
-	case '?':
-	    fprintf(stderr,
-		"usage: %s [-c const] [-s storage] [-p] [-b] file\n",
-		argv[0]);
-	    return (-1);
-	}
-    outputfile = optind < argc ? argv[optind] : "g3states.h";
-#endif
-    fd = fopen(outputfile, "w");
-    if (fd == NULL) {
-	fprintf(stderr, "%s: %s: Cannot create output file.\n",
-	    argv[0], outputfile);
-	return (-2);
-    }
-    FillTable(MainTable, 7, Pass, S_Pass);
-    FillTable(MainTable, 7, Horiz, S_Horiz);
-    FillTable(MainTable, 7, V0, S_V0);
-    FillTable(MainTable, 7, VR, S_VR);
-    FillTable(MainTable, 7, VL, S_VL);
-    FillTable(MainTable, 7, Ext, S_Ext);
-    FillTable(MainTable, 7, EOLV, S_EOL);
-    FillTable(WhiteTable, 12, MakeUpW, S_MakeUpW);
-    FillTable(WhiteTable, 12, MakeUp, S_MakeUp);
-    FillTable(WhiteTable, 12, TermW, S_TermW);
-    FillTable(WhiteTable, 12, EOLH, S_EOL);
-    FillTable(BlackTable, 13, MakeUpB, S_MakeUpB);
-    FillTable(BlackTable, 13, MakeUp, S_MakeUp);
-    FillTable(BlackTable, 13, TermB, S_TermB);
-    FillTable(BlackTable, 13, EOLH, S_EOL);
-
-    fprintf(fd, "/* WARNING, this file was automatically generated by the\n");
-    fprintf(fd, "    mkg3states program */\n");
-    fprintf(fd, "#include \"tiff.h\"\n");
-    fprintf(fd, "#include \"tif_fax3.h\"\n");
-    WriteTable(fd, MainTable, 128, "TIFFFaxMainTable");
-    WriteTable(fd, WhiteTable, 4096, "TIFFFaxWhiteTable");
-    WriteTable(fd, BlackTable, 8192, "TIFFFaxBlackTable");
-    fclose(fd);
-    return (0);
-}
diff --git a/tkimg1.3/libtiff/libtiff/mkspans.c b/tkimg1.3/libtiff/libtiff/mkspans.c
deleted file mode 100644
index 2e89d56..0000000
--- a/tkimg1.3/libtiff/libtiff/mkspans.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/mkspans.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffcomp.h"
-
-/*
- * Hack program to construct tables used to find
- * runs of zeros and ones in Group 3 Fax encoding.
- */
-
-dumparray(name, runs)
-	char *name;
-	unsigned char runs[256];
-{
-	register int i;
-	register char *sep;
-	printf("static u_char %s[256] = {\n", name);
-	sep = "    ";
-	for (i = 0; i < 256; i++) {
-		printf("%s%d", sep, runs[i]);
-		if (((i + 1) % 16) == 0) {
-			printf(",	/* 0x%02x - 0x%02x */\n", i-15, i);
-			sep = "    ";
-		} else
-			sep = ", ";
-	}
-	printf("\n};\n");
-}
-
-main()
-{
-	unsigned char runs[2][256];
-
-	memset(runs[0], 0, 256*sizeof (char));
-	memset(runs[1], 0, 256*sizeof (char));
-	{ register int run, runlen, i;
-	  runlen = 1;
-	  for (run = 0x80; run != 0xff; run = (run>>1)|0x80) {
-		for (i = run-1; i >= 0; i--) {
-			runs[1][run|i] = runlen;
-			runs[0][(~(run|i)) & 0xff] = runlen;
-		}
-		runlen++;
-	  }
-	  runs[1][0xff] = runs[0][0] = 8;
-	}
-	dumparray("bruns", runs[0]);
-	dumparray("wruns", runs[1]);
-}
diff --git a/tkimg1.3/libtiff/libtiff/mkversion.c b/tkimg1.3/libtiff/libtiff/mkversion.c
deleted file mode 100644
index 3f0e756..0000000
--- a/tkimg1.3/libtiff/libtiff/mkversion.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* "$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/mkversion.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1995-1997 Sam Leffler
- * Copyright (c) 1995-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * Generate a library version string for systems that
- * do not have a shell (by default this is done with
- * awk and echo from the Makefile).
- *
- * This was written by Peter Greenham for Acorn systems.
- *
- * Syntax: mkversion [-v version-file] [<outfile>]
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static void
-usage(void)
-{
-    fprintf(stderr,
-            "usage: mkversion [-v version-file]\n"
-            "                 [-r releasedate-file] [outfile]\n");
-    exit(-1);
-}
-
-static FILE*
-openFile(char* filename)
-{
-    FILE* fd = fopen(filename, "r");
-    if (fd == NULL) {
-	fprintf(stderr, "mkversion: %s: Could not open for reading.\n",
-	    filename);
-	exit(-1);
-    }
-    return (fd);
-}
-
-int
-main(int argc, char* argv[])
-{
-    char* versionFile = "../VERSION";
-    char* releaseDateFile = "../RELEASE-DATE";
-    char version[128];
-    char rawReleaseDate[128];
-    char tiffLibVersion[128];
-    FILE* fd;
-    char* cp;
-
-    argc--, argv++;
-    while (argc > 0 && argv[0][0] == '-') {
-	if (strcmp(argv[0], "-v") == 0) {
-	    if (argc < 1)
-		usage();
-	    argc--, argv++;
-	    versionFile = argv[0];
-	} else if (strcmp(argv[0], "-r") == 0) {
-	    if (argc < 1)
-		usage();
-	    argc--, argv++;
-	    releaseDateFile = argv[0];
-	} else
-	    usage();
-	argc--, argv++;
-    }
-
-    /*
-     * Read the VERSION file.
-     */
-    fd = openFile(versionFile);
-    if (fgets(version, sizeof (version)-1, fd) == NULL) {
-	fprintf(stderr, "mkversion: No version information in %s.\n",
-	    versionFile);
-	exit(-1);
-    }
-    cp = strchr(version, '\n');
-    if (cp)
-	*cp = '\0';
-    fclose(fd);
-
-    /*
-     * Read the RELEASE-DATE, and translate format to emit TIFFLIB_VERSION.
-     */
-    fd = openFile(releaseDateFile);
-    if (fgets(rawReleaseDate, sizeof (rawReleaseDate)-1, fd) == NULL) {
-	fprintf(stderr, "mkversion: No release date information in %s.\n",
-                releaseDateFile);
-	exit(-1);
-    }
-    fclose(fd);
-
-    sprintf( tiffLibVersion, "#define TIFFLIB_VERSION %4.4s%2.2s%2.2s",
-             rawReleaseDate+6, 
-             rawReleaseDate+0,
-             rawReleaseDate+3 );
-    
-    /*
-     * Emit the tiffvers.h file.
-     */
-    if (argc > 0) {
-	fd = fopen(argv[0], "w");
-	if (fd == NULL) {
-	    fprintf(stderr, "mkversion: %s: Could not open for writing.\n",
-		argv[0]);
-	    exit(-1);
-	}
-    } else
-	fd = stdout;
-    fprintf(fd, "#define TIFFLIB_VERSION_STR \"LIBTIFF, Version %s\\n", version);
-    fprintf(fd, "Copyright (c) 1988-1996 Sam Leffler\\n");
-    fprintf(fd, "Copyright (c) 1991-1996 Silicon Graphics, Inc.\"\n");
-
-    fprintf( fd, 
-             "/*\n"
-             " * This define can be used in code that requires\n"
-             " * compilation-related definitions specific to a\n"
-             " * version or versions of the library.  Runtime\n"
-             " * version checking should be done based on the\n"
-             " * string returned by TIFFGetVersion.\n" 
-             " */\n" );
-    fprintf(fd, "%s\n", tiffLibVersion );
-
-    if (fd != stdout)
-	fclose(fd);
-    return (0);
-}
diff --git a/tkimg1.3/libtiff/libtiff/t4.h b/tkimg1.3/libtiff/libtiff/t4.h
deleted file mode 100644
index b2f40a0..0000000
--- a/tkimg1.3/libtiff/libtiff/t4.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* $Id: t4.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _T4_
-#define	_T4_
-/*
- * CCITT T.4 1D Huffman runlength codes and
- * related definitions.  Given the small sizes
- * of these tables it does not seem
- * worthwhile to make code & length 8 bits.
- */
-typedef struct tableentry {
-    unsigned short length;	/* bit length of g3 code */
-    unsigned short code;	/* g3 code */
-    short	runlen;		/* run length in bits */
-} tableentry;
-
-#define	EOL	0x001	/* EOL code value - 0000 0000 0000 1 */
-
-/* status values returned instead of a run length */
-#define	G3CODE_EOL	-1	/* NB: ACT_EOL - ACT_WRUNT */
-#define	G3CODE_INVALID	-2	/* NB: ACT_INVALID - ACT_WRUNT */
-#define	G3CODE_EOF	-3	/* end of input data */
-#define	G3CODE_INCOMP	-4	/* incomplete run code */
-
-/*
- * Note that these tables are ordered such that the
- * index into the table is known to be either the
- * run length, or (run length / 64) + a fixed offset.
- *
- * NB: The G3CODE_INVALID entries are only used
- *     during state generation (see mkg3states.c).
- */
-#ifdef G3CODES
-const tableentry TIFFFaxWhiteCodes[] = {
-    { 8, 0x35, 0 },	/* 0011 0101 */
-    { 6, 0x7, 1 },	/* 0001 11 */
-    { 4, 0x7, 2 },	/* 0111 */
-    { 4, 0x8, 3 },	/* 1000 */
-    { 4, 0xB, 4 },	/* 1011 */
-    { 4, 0xC, 5 },	/* 1100 */
-    { 4, 0xE, 6 },	/* 1110 */
-    { 4, 0xF, 7 },	/* 1111 */
-    { 5, 0x13, 8 },	/* 1001 1 */
-    { 5, 0x14, 9 },	/* 1010 0 */
-    { 5, 0x7, 10 },	/* 0011 1 */
-    { 5, 0x8, 11 },	/* 0100 0 */
-    { 6, 0x8, 12 },	/* 0010 00 */
-    { 6, 0x3, 13 },	/* 0000 11 */
-    { 6, 0x34, 14 },	/* 1101 00 */
-    { 6, 0x35, 15 },	/* 1101 01 */
-    { 6, 0x2A, 16 },	/* 1010 10 */
-    { 6, 0x2B, 17 },	/* 1010 11 */
-    { 7, 0x27, 18 },	/* 0100 111 */
-    { 7, 0xC, 19 },	/* 0001 100 */
-    { 7, 0x8, 20 },	/* 0001 000 */
-    { 7, 0x17, 21 },	/* 0010 111 */
-    { 7, 0x3, 22 },	/* 0000 011 */
-    { 7, 0x4, 23 },	/* 0000 100 */
-    { 7, 0x28, 24 },	/* 0101 000 */
-    { 7, 0x2B, 25 },	/* 0101 011 */
-    { 7, 0x13, 26 },	/* 0010 011 */
-    { 7, 0x24, 27 },	/* 0100 100 */
-    { 7, 0x18, 28 },	/* 0011 000 */
-    { 8, 0x2, 29 },	/* 0000 0010 */
-    { 8, 0x3, 30 },	/* 0000 0011 */
-    { 8, 0x1A, 31 },	/* 0001 1010 */
-    { 8, 0x1B, 32 },	/* 0001 1011 */
-    { 8, 0x12, 33 },	/* 0001 0010 */
-    { 8, 0x13, 34 },	/* 0001 0011 */
-    { 8, 0x14, 35 },	/* 0001 0100 */
-    { 8, 0x15, 36 },	/* 0001 0101 */
-    { 8, 0x16, 37 },	/* 0001 0110 */
-    { 8, 0x17, 38 },	/* 0001 0111 */
-    { 8, 0x28, 39 },	/* 0010 1000 */
-    { 8, 0x29, 40 },	/* 0010 1001 */
-    { 8, 0x2A, 41 },	/* 0010 1010 */
-    { 8, 0x2B, 42 },	/* 0010 1011 */
-    { 8, 0x2C, 43 },	/* 0010 1100 */
-    { 8, 0x2D, 44 },	/* 0010 1101 */
-    { 8, 0x4, 45 },	/* 0000 0100 */
-    { 8, 0x5, 46 },	/* 0000 0101 */
-    { 8, 0xA, 47 },	/* 0000 1010 */
-    { 8, 0xB, 48 },	/* 0000 1011 */
-    { 8, 0x52, 49 },	/* 0101 0010 */
-    { 8, 0x53, 50 },	/* 0101 0011 */
-    { 8, 0x54, 51 },	/* 0101 0100 */
-    { 8, 0x55, 52 },	/* 0101 0101 */
-    { 8, 0x24, 53 },	/* 0010 0100 */
-    { 8, 0x25, 54 },	/* 0010 0101 */
-    { 8, 0x58, 55 },	/* 0101 1000 */
-    { 8, 0x59, 56 },	/* 0101 1001 */
-    { 8, 0x5A, 57 },	/* 0101 1010 */
-    { 8, 0x5B, 58 },	/* 0101 1011 */
-    { 8, 0x4A, 59 },	/* 0100 1010 */
-    { 8, 0x4B, 60 },	/* 0100 1011 */
-    { 8, 0x32, 61 },	/* 0011 0010 */
-    { 8, 0x33, 62 },	/* 0011 0011 */
-    { 8, 0x34, 63 },	/* 0011 0100 */
-    { 5, 0x1B, 64 },	/* 1101 1 */
-    { 5, 0x12, 128 },	/* 1001 0 */
-    { 6, 0x17, 192 },	/* 0101 11 */
-    { 7, 0x37, 256 },	/* 0110 111 */
-    { 8, 0x36, 320 },	/* 0011 0110 */
-    { 8, 0x37, 384 },	/* 0011 0111 */
-    { 8, 0x64, 448 },	/* 0110 0100 */
-    { 8, 0x65, 512 },	/* 0110 0101 */
-    { 8, 0x68, 576 },	/* 0110 1000 */
-    { 8, 0x67, 640 },	/* 0110 0111 */
-    { 9, 0xCC, 704 },	/* 0110 0110 0 */
-    { 9, 0xCD, 768 },	/* 0110 0110 1 */
-    { 9, 0xD2, 832 },	/* 0110 1001 0 */
-    { 9, 0xD3, 896 },	/* 0110 1001 1 */
-    { 9, 0xD4, 960 },	/* 0110 1010 0 */
-    { 9, 0xD5, 1024 },	/* 0110 1010 1 */
-    { 9, 0xD6, 1088 },	/* 0110 1011 0 */
-    { 9, 0xD7, 1152 },	/* 0110 1011 1 */
-    { 9, 0xD8, 1216 },	/* 0110 1100 0 */
-    { 9, 0xD9, 1280 },	/* 0110 1100 1 */
-    { 9, 0xDA, 1344 },	/* 0110 1101 0 */
-    { 9, 0xDB, 1408 },	/* 0110 1101 1 */
-    { 9, 0x98, 1472 },	/* 0100 1100 0 */
-    { 9, 0x99, 1536 },	/* 0100 1100 1 */
-    { 9, 0x9A, 1600 },	/* 0100 1101 0 */
-    { 6, 0x18, 1664 },	/* 0110 00 */
-    { 9, 0x9B, 1728 },	/* 0100 1101 1 */
-    { 11, 0x8, 1792 },	/* 0000 0001 000 */
-    { 11, 0xC, 1856 },	/* 0000 0001 100 */
-    { 11, 0xD, 1920 },	/* 0000 0001 101 */
-    { 12, 0x12, 1984 },	/* 0000 0001 0010 */
-    { 12, 0x13, 2048 },	/* 0000 0001 0011 */
-    { 12, 0x14, 2112 },	/* 0000 0001 0100 */
-    { 12, 0x15, 2176 },	/* 0000 0001 0101 */
-    { 12, 0x16, 2240 },	/* 0000 0001 0110 */
-    { 12, 0x17, 2304 },	/* 0000 0001 0111 */
-    { 12, 0x1C, 2368 },	/* 0000 0001 1100 */
-    { 12, 0x1D, 2432 },	/* 0000 0001 1101 */
-    { 12, 0x1E, 2496 },	/* 0000 0001 1110 */
-    { 12, 0x1F, 2560 },	/* 0000 0001 1111 */
-    { 12, 0x1, G3CODE_EOL },	/* 0000 0000 0001 */
-    { 9, 0x1, G3CODE_INVALID },	/* 0000 0000 1 */
-    { 10, 0x1, G3CODE_INVALID },	/* 0000 0000 01 */
-    { 11, 0x1, G3CODE_INVALID },	/* 0000 0000 001 */
-    { 12, 0x0, G3CODE_INVALID },	/* 0000 0000 0000 */
-};
-
-const tableentry TIFFFaxBlackCodes[] = {
-    { 10, 0x37, 0 },	/* 0000 1101 11 */
-    { 3, 0x2, 1 },	/* 010 */
-    { 2, 0x3, 2 },	/* 11 */
-    { 2, 0x2, 3 },	/* 10 */
-    { 3, 0x3, 4 },	/* 011 */
-    { 4, 0x3, 5 },	/* 0011 */
-    { 4, 0x2, 6 },	/* 0010 */
-    { 5, 0x3, 7 },	/* 0001 1 */
-    { 6, 0x5, 8 },	/* 0001 01 */
-    { 6, 0x4, 9 },	/* 0001 00 */
-    { 7, 0x4, 10 },	/* 0000 100 */
-    { 7, 0x5, 11 },	/* 0000 101 */
-    { 7, 0x7, 12 },	/* 0000 111 */
-    { 8, 0x4, 13 },	/* 0000 0100 */
-    { 8, 0x7, 14 },	/* 0000 0111 */
-    { 9, 0x18, 15 },	/* 0000 1100 0 */
-    { 10, 0x17, 16 },	/* 0000 0101 11 */
-    { 10, 0x18, 17 },	/* 0000 0110 00 */
-    { 10, 0x8, 18 },	/* 0000 0010 00 */
-    { 11, 0x67, 19 },	/* 0000 1100 111 */
-    { 11, 0x68, 20 },	/* 0000 1101 000 */
-    { 11, 0x6C, 21 },	/* 0000 1101 100 */
-    { 11, 0x37, 22 },	/* 0000 0110 111 */
-    { 11, 0x28, 23 },	/* 0000 0101 000 */
-    { 11, 0x17, 24 },	/* 0000 0010 111 */
-    { 11, 0x18, 25 },	/* 0000 0011 000 */
-    { 12, 0xCA, 26 },	/* 0000 1100 1010 */
-    { 12, 0xCB, 27 },	/* 0000 1100 1011 */
-    { 12, 0xCC, 28 },	/* 0000 1100 1100 */
-    { 12, 0xCD, 29 },	/* 0000 1100 1101 */
-    { 12, 0x68, 30 },	/* 0000 0110 1000 */
-    { 12, 0x69, 31 },	/* 0000 0110 1001 */
-    { 12, 0x6A, 32 },	/* 0000 0110 1010 */
-    { 12, 0x6B, 33 },	/* 0000 0110 1011 */
-    { 12, 0xD2, 34 },	/* 0000 1101 0010 */
-    { 12, 0xD3, 35 },	/* 0000 1101 0011 */
-    { 12, 0xD4, 36 },	/* 0000 1101 0100 */
-    { 12, 0xD5, 37 },	/* 0000 1101 0101 */
-    { 12, 0xD6, 38 },	/* 0000 1101 0110 */
-    { 12, 0xD7, 39 },	/* 0000 1101 0111 */
-    { 12, 0x6C, 40 },	/* 0000 0110 1100 */
-    { 12, 0x6D, 41 },	/* 0000 0110 1101 */
-    { 12, 0xDA, 42 },	/* 0000 1101 1010 */
-    { 12, 0xDB, 43 },	/* 0000 1101 1011 */
-    { 12, 0x54, 44 },	/* 0000 0101 0100 */
-    { 12, 0x55, 45 },	/* 0000 0101 0101 */
-    { 12, 0x56, 46 },	/* 0000 0101 0110 */
-    { 12, 0x57, 47 },	/* 0000 0101 0111 */
-    { 12, 0x64, 48 },	/* 0000 0110 0100 */
-    { 12, 0x65, 49 },	/* 0000 0110 0101 */
-    { 12, 0x52, 50 },	/* 0000 0101 0010 */
-    { 12, 0x53, 51 },	/* 0000 0101 0011 */
-    { 12, 0x24, 52 },	/* 0000 0010 0100 */
-    { 12, 0x37, 53 },	/* 0000 0011 0111 */
-    { 12, 0x38, 54 },	/* 0000 0011 1000 */
-    { 12, 0x27, 55 },	/* 0000 0010 0111 */
-    { 12, 0x28, 56 },	/* 0000 0010 1000 */
-    { 12, 0x58, 57 },	/* 0000 0101 1000 */
-    { 12, 0x59, 58 },	/* 0000 0101 1001 */
-    { 12, 0x2B, 59 },	/* 0000 0010 1011 */
-    { 12, 0x2C, 60 },	/* 0000 0010 1100 */
-    { 12, 0x5A, 61 },	/* 0000 0101 1010 */
-    { 12, 0x66, 62 },	/* 0000 0110 0110 */
-    { 12, 0x67, 63 },	/* 0000 0110 0111 */
-    { 10, 0xF, 64 },	/* 0000 0011 11 */
-    { 12, 0xC8, 128 },	/* 0000 1100 1000 */
-    { 12, 0xC9, 192 },	/* 0000 1100 1001 */
-    { 12, 0x5B, 256 },	/* 0000 0101 1011 */
-    { 12, 0x33, 320 },	/* 0000 0011 0011 */
-    { 12, 0x34, 384 },	/* 0000 0011 0100 */
-    { 12, 0x35, 448 },	/* 0000 0011 0101 */
-    { 13, 0x6C, 512 },	/* 0000 0011 0110 0 */
-    { 13, 0x6D, 576 },	/* 0000 0011 0110 1 */
-    { 13, 0x4A, 640 },	/* 0000 0010 0101 0 */
-    { 13, 0x4B, 704 },	/* 0000 0010 0101 1 */
-    { 13, 0x4C, 768 },	/* 0000 0010 0110 0 */
-    { 13, 0x4D, 832 },	/* 0000 0010 0110 1 */
-    { 13, 0x72, 896 },	/* 0000 0011 1001 0 */
-    { 13, 0x73, 960 },	/* 0000 0011 1001 1 */
-    { 13, 0x74, 1024 },	/* 0000 0011 1010 0 */
-    { 13, 0x75, 1088 },	/* 0000 0011 1010 1 */
-    { 13, 0x76, 1152 },	/* 0000 0011 1011 0 */
-    { 13, 0x77, 1216 },	/* 0000 0011 1011 1 */
-    { 13, 0x52, 1280 },	/* 0000 0010 1001 0 */
-    { 13, 0x53, 1344 },	/* 0000 0010 1001 1 */
-    { 13, 0x54, 1408 },	/* 0000 0010 1010 0 */
-    { 13, 0x55, 1472 },	/* 0000 0010 1010 1 */
-    { 13, 0x5A, 1536 },	/* 0000 0010 1101 0 */
-    { 13, 0x5B, 1600 },	/* 0000 0010 1101 1 */
-    { 13, 0x64, 1664 },	/* 0000 0011 0010 0 */
-    { 13, 0x65, 1728 },	/* 0000 0011 0010 1 */
-    { 11, 0x8, 1792 },	/* 0000 0001 000 */
-    { 11, 0xC, 1856 },	/* 0000 0001 100 */
-    { 11, 0xD, 1920 },	/* 0000 0001 101 */
-    { 12, 0x12, 1984 },	/* 0000 0001 0010 */
-    { 12, 0x13, 2048 },	/* 0000 0001 0011 */
-    { 12, 0x14, 2112 },	/* 0000 0001 0100 */
-    { 12, 0x15, 2176 },	/* 0000 0001 0101 */
-    { 12, 0x16, 2240 },	/* 0000 0001 0110 */
-    { 12, 0x17, 2304 },	/* 0000 0001 0111 */
-    { 12, 0x1C, 2368 },	/* 0000 0001 1100 */
-    { 12, 0x1D, 2432 },	/* 0000 0001 1101 */
-    { 12, 0x1E, 2496 },	/* 0000 0001 1110 */
-    { 12, 0x1F, 2560 },	/* 0000 0001 1111 */
-    { 12, 0x1, G3CODE_EOL },	/* 0000 0000 0001 */
-    { 9, 0x1, G3CODE_INVALID },	/* 0000 0000 1 */
-    { 10, 0x1, G3CODE_INVALID },	/* 0000 0000 01 */
-    { 11, 0x1, G3CODE_INVALID },	/* 0000 0000 001 */
-    { 12, 0x0, G3CODE_INVALID },	/* 0000 0000 0000 */
-};
-#else
-extern	const tableentry TIFFFaxWhiteCodes[];
-extern	const tableentry TIFFFaxBlackCodes[];
-#endif
-#endif /* _T4_ */
diff --git a/tkimg1.3/libtiff/libtiff/tif_acorn.c b/tkimg1.3/libtiff/libtiff/tif_acorn.c
deleted file mode 100644
index 99fd5a4..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_acorn.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_acorn.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library RISC OS specific Routines.
- * Developed out of the Unix version.
- * Peter Greenham, May 1995
- */
-#include "tiffiop.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-/*
-Low-level file handling
-~~~~~~~~~~~~~~~~~~~~~~~
-The functions in osfcn.h are unavailable when compiling under C, as it's a
-C++ header. Therefore they have been implemented here.
-
-Now, why have I done it this way?
-
-The definitive API library for RISC OS is Jonathan Coxhead's OSLib, which
-uses heavily optimised ARM assembler or even plain inline SWI calls for
-maximum performance and minimum runtime size. However, I don't want to make
-LIBTIFF need that to survive. Therefore I have also emulated the functions
-using macros to _swi() and _swix() defined in the swis.h header, and
-borrowing types from kernel.h, which is less efficient but doesn't need any
-third-party libraries.
- */
-
-#ifdef INCLUDE_OSLIB
-
-#include "osfile.h"
-#include "osgbpb.h"
-#include "osargs.h"
-#include "osfind.h"
-
-#else
-
-/* OSLIB EMULATION STARTS */
-
-#include "kernel.h"
-#include "swis.h"
-
-/* From oslib:types.h */
-typedef unsigned int                            bits;
-typedef unsigned char                           byte;
-#ifndef TRUE
-#define TRUE                                    1
-#endif
-#ifndef FALSE
-#define FALSE                                   0
-#endif
-#ifndef NULL
-#define NULL                                    0
-#endif
-#ifndef SKIP
-#define SKIP                                    0
-#endif
-
-/* From oslib:os.h */
-typedef _kernel_oserror os_error;
-typedef byte os_f;
-
-/* From oslib:osfile.h */
-#undef  OS_File
-#define OS_File                                 0x8
-
-/* From oslib:osgbpb.h */
-#undef  OS_GBPB
-#define OS_GBPB                                 0xC
-#undef  OSGBPB_Write
-#define OSGBPB_Write                            0x2
-#undef  OSGBPB_Read
-#define OSGBPB_Read                             0x4
-
-extern os_error *xosgbpb_write (os_f file,
-      byte *data,
-      int size,
-      int *unwritten);
-extern int osgbpb_write (os_f file,
-      byte *data,
-      int size);
-
-#define	xosgbpb_write(file, data, size, unwritten) \
-	(os_error*) _swix(OS_GBPB, _IN(0)|_IN(1)|_IN(2)|_IN(3)|_IN(4)|_OUT(3), \
-		OSGBPB_WriteAt, \
-		file, \
-		data, \
-		size, \
-		unwritten)
-
-#define	osgbpb_write(file, data, size) \
-	_swi(OS_GBPB, _IN(0)|_IN(1)|_IN(2)|_IN(3)|_RETURN(3), \
-		OSGBPB_Write, \
-		file, \
-		data, \
-		size)
-
-extern os_error *xosgbpb_read (os_f file,
-      byte *buffer,
-      int size,
-      int *unread);
-extern int osgbpb_read (os_f file,
-      byte *buffer,
-      int size);
-
-#define	xosgbpb_read(file, buffer, size, unread) \
-	(os_error*) _swix(OS_GBPB, _IN(0)|_IN(1)|_IN(2)|_IN(3)|_OUT(3), \
-		OSGBPB_Read, \
-		file, \
-		buffer, \
-		size, \
-		unread)
-
-#define	osgbpb_read(file, buffer, size) \
-	_swi(OS_GBPB, _IN(0)|_IN(1)|_IN(2)|_IN(3)|_RETURN(3), \
-		OSGBPB_Read, \
-		file, \
-		buffer, \
-		size)
-
-/* From oslib:osfind.h */
-#undef  OS_Find
-#define OS_Find                                 0xD
-#undef  OSFind_Openin
-#define OSFind_Openin                           0x40
-#undef  OSFind_Openout
-#define OSFind_Openout                          0x80
-#undef  OSFind_Openup
-#define OSFind_Openup                           0xC0
-#undef  OSFind_Close
-#define OSFind_Close                            0x0
-
-#define	xosfind_open(reason, file_name, path, file) \
-	(os_error*) _swix(OS_Find, _IN(0)|_IN(1)|_IN(2)|_OUT(0), \
-		reason, file_name, path, file)
-
-#define	osfind_open(reason, file_name, path) \
-	(os_f) _swi(OS_Find, _IN(0)|_IN(1)|_IN(2)|_RETURN(0), \
-		reason, file_name, path)
-
-extern os_error *xosfind_openin (bits flags,
-      char *file_name,
-      char *path,
-      os_f *file);
-extern os_f osfind_openin (bits flags,
-      char *file_name,
-      char *path);
-
-#define	xosfind_openin(flags, file_name, path, file) \
-	xosfind_open(flags | OSFind_Openin, file_name, path, file)
-
-#define	osfind_openin(flags, file_name, path) \
-	osfind_open(flags | OSFind_Openin, file_name, path)
-
-extern os_error *xosfind_openout (bits flags,
-      char *file_name,
-      char *path,
-      os_f *file);
-extern os_f osfind_openout (bits flags,
-      char *file_name,
-      char *path);
-
-#define	xosfind_openout(flags, file_name, path, file) \
-	xosfind_open(flags | OSFind_Openout, file_name, path, file)
-
-#define	osfind_openout(flags, file_name, path) \
-	osfind_open(flags | OSFind_Openout, file_name, path)
-
-extern os_error *xosfind_openup (bits flags,
-      char *file_name,
-      char *path,
-      os_f *file);
-extern os_f osfind_openup (bits flags,
-      char *file_name,
-      char *path);
-
-#define	xosfind_openup(flags, file_name, path, file) \
-	xosfind_open(flags | OSFind_Openup, file_name, path, file)
-
-#define	osfind_openup(flags, file_name, path) \
-	osfind_open(flags | OSFind_Openup, file_name, path)
-
-extern os_error *xosfind_close (os_f file);
-extern void osfind_close (os_f file);
-
-#define	xosfind_close(file) \
-	(os_error*) _swix(OS_Find, _IN(0)|_IN(1), \
-		OSFind_Close, \
-		file)
-
-#define	osfind_close(file) \
-	(void) _swi(OS_Find, _IN(0)|_IN(1), \
-		OSFind_Close, \
-		file)
-
-/* From oslib:osargs.h */
-#undef  OS_Args
-#define OS_Args                                 0x9
-#undef  OSArgs_ReadPtr
-#define OSArgs_ReadPtr                          0x0
-#undef  OSArgs_SetPtr
-#define OSArgs_SetPtr                           0x1
-#undef  OSArgs_ReadExt
-#define OSArgs_ReadExt                          0x2
-
-extern os_error *xosargs_read_ptr (os_f file,
-      int *ptr);
-extern int osargs_read_ptr (os_f file);
-
-#define	xosargs_read_ptr(file, ptr) \
-	(os_error*) _swix(OS_Args, _IN(0)|_IN(1)|_OUT(2), \
-		OSArgs_ReadPtr, \
-		file, \
-		ptr)
-
-#define	osargs_read_ptr(file) \
-	_swi(OS_Args, _IN(0)|_IN(1)|_RETURN(2), \
-		OSArgs_ReadPtr, \
-		file)
-
-extern os_error *xosargs_set_ptr (os_f file,
-      int ptr);
-extern void osargs_set_ptr (os_f file,
-      int ptr);
-
-#define	xosargs_set_ptr(file, ptr) \
-	(os_error*) _swix(OS_Args, _IN(0)|_IN(1)|_IN(2), \
-		OSArgs_SetPtr, \
-		file, \
-		ptr)
-
-#define	osargs_set_ptr(file, ptr) \
-	(void) _swi(OS_Args, _IN(0)|_IN(1)|_IN(2), \
-		OSArgs_SetPtr, \
-		file, \
-		ptr)
-
-extern os_error *xosargs_read_ext (os_f file,
-      int *ext);
-extern int osargs_read_ext (os_f file);
-
-#define	xosargs_read_ext(file, ext) \
-	(os_error*) _swix(OS_Args, _IN(0)|_IN(1)|_OUT(2), \
-		OSArgs_ReadExt, \
-		file, \
-		ext)
-
-#define	osargs_read_ext(file) \
-	_swi(OS_Args, _IN(0)|_IN(1)|_RETURN(2), \
-		OSArgs_ReadExt, \
-		file)
-
-/* OSLIB EMULATION ENDS */
-
-#endif
-
-#ifndef __osfcn_h
-/* Will be set or not during tiffcomp.h */
-/* You get this to compile under C++? Please say how! */
-
-extern int open(const char* name, int flags, int mode)
-{
-	/* From what I can tell, should return <0 for failure */
-	os_error* e = (os_error*) 1; /* Cheeky way to use a pointer eh? :-) */
-	os_f file = (os_f) -1;
-
-	flags = flags;
-
-	switch(mode)
-	{
-		case O_RDONLY:
-		{
-			e = xosfind_openin(SKIP, name, SKIP, &file);
-			break;
-		}
-		case O_WRONLY:
-		case O_RDWR|O_CREAT:
-		case O_RDWR|O_CREAT|O_TRUNC:
-		{
-			e = xosfind_openout(SKIP, name, SKIP, &file);
-			break;
-		}
-		case O_RDWR:
-		{
-			e = xosfind_openup(SKIP, name, SKIP, &file);
-			break;
-		}
-	}
-	if (e)
-	{
-		file = (os_f) -1;
-	}
-	return (file);
-}
-
-extern int close(int fd)
-{
-	return ((int) xosfind_close((os_f) fd));
-}
-
-extern int write(int fd, const char *buf, int nbytes)
-{
-	/* Returns number of bytes written */
-	return (nbytes - osgbpb_write((os_f) fd, (const byte*) buf, nbytes));
-}
-
-extern int read(int fd, char *buf, int nbytes)
-{
-	/* Returns number of bytes read */
-	return (nbytes - osgbpb_read((os_f) fd, (byte*) buf, nbytes));
-}
-
-extern off_t lseek(int fd, off_t offset, int whence)
-{
-	int absolute = 0;
-
-	switch (whence)
-	{
-		case SEEK_SET:
-		{
-			absolute = (int) offset;
-			break;
-		}
-		case SEEK_CUR:
-		{
-			absolute = osargs_read_ptr((os_f) fd) + (int) offset;
-			break;
-		}
-		case SEEK_END:
-		{
-			absolute = osargs_read_ext((os_f) fd) + (int) offset;
-			break;
-		}
-	}
-
-	osargs_set_ptr((os_f) fd, absolute);
-
-	return ((off_t) osargs_read_ptr((os_f) fd));
-}
-#endif
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) read((int) fd, buf, (size_t) size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) write((int) fd, buf, (size_t) size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	return ((toff_t) lseek((int) fd, (off_t) off, whence));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (close((int) fd));
-}
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	return (lseek((int) fd, SEEK_END, SEEK_SET));
-}
-
-#ifdef HAVE_MMAP
-#error "I didn't know Acorn had that!"
-#endif
-
-/* !HAVE_MMAP */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	(void) fd; (void) pbase; (void) psize;
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	(void) fd; (void) base; (void) size;
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-		(thandle_t) fd,
-		_tiffReadProc, _tiffWriteProc,
-		_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
-		_tiffMapProc, _tiffUnmapProc);
-	if (tif)
-	{
-		tif->tif_fd = fd;
-	}
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-
-	m = _TIFFgetMode(mode, module);
-
-	if (m == -1)
-	{
-		return ((TIFF*) 0);
-	}
-
-	fd = open(name, 0, m);
-
-	if (fd < 0)
-	{
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF *)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-void*
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-void*
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-static void
-acornWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-	{
-		fprintf(stderr, "%s: ", module);
-	}
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = acornWarningHandler;
-
-static void
-acornErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-	{
-		fprintf(stderr, "%s: ", module);
-	}
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = acornErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_apple.c b/tkimg1.3/libtiff/libtiff/tif_apple.c
deleted file mode 100644
index 99aad3e..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_apple.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_apple.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Macintosh-specific routines.
- *
- * These routines use only Toolbox and high-level File Manager traps.
- * They make no calls to the THINK C "unix" compatibility library.  Also,
- * malloc is not used directly but it is still referenced internally by
- * the ANSI library in rare cases.  Heap fragmentation by the malloc ring
- * buffer is therefore minimized.
- *
- * O_RDONLY and O_RDWR are treated identically here.  The tif_mode flag is
- * checked in TIFFWriteCheck().
- *
- * Create below fills in a blank creator signature and sets the file type
- * to 'TIFF'.  It is much better for the application to do this by Create'ing
- * the file first and TIFFOpen'ing it later.
- * ---------
- * This code has been "Carbonized", and may not work with older MacOS versions.
- * If so, grab the tif_apple.c out of an older libtiff distribution, like
- * 3.5.5 from www.libtiff.org.
- */
-
-#include "tiffiop.h"
-#include <Errors.h>
-#include <Files.h>
-#include <Memory.h>
-#include <Script.h>
-
-#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__) || defined(applec)
-#define	CtoPstr	c2pstr
-#endif
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (FSRead((short) fd, (long*) &size, (char*) buf) == noErr ?
-	    size : (tsize_t) -1);
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (FSWrite((short) fd, (long*) &size, (char*) buf) == noErr ?
-	    size : (tsize_t) -1);
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	long fpos, size;
-
-	if (GetEOF((short) fd, &size) != noErr)
-		return EOF;
-	(void) GetFPos((short) fd, &fpos);
-
-	switch (whence) {
-	case SEEK_CUR:
-		if (off + fpos > size)
-			SetEOF((short) fd, off + fpos);
-		if (SetFPos((short) fd, fsFromMark, off) != noErr)
-			return EOF;
-		break;
-	case SEEK_END:
-		if (off > 0)
-			SetEOF((short) fd, off + size);
-		if (SetFPos((short) fd, fsFromStart, off + size) != noErr)
-			return EOF;
-		break;
-	case SEEK_SET:
-		if (off > size)
-			SetEOF((short) fd, off);
-		if (SetFPos((short) fd, fsFromStart, off) != noErr)
-			return EOF;
-		break;
-	}
-
-	return (toff_t)(GetFPos((short) fd, &fpos) == noErr ? fpos : EOF);
-}
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (FSClose((short) fd));
-}
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	long size;
-
-	if (GetEOF((short) fd, &size) != noErr) {
-		TIFFError("_tiffSizeProc", "%s: Cannot get file size");
-		return (-1L);
-	}
-	return ((toff_t) size);
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode, (thandle_t) fd,
-	    _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
-	    _tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-static void ourc2pstr( char* inString )
-{
-	int	sLen = strlen( inString );
-	BlockMoveData( inString, &inString[1], sLen );
-	inString[0] = sLen;
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	Str255 pname;
-	FInfo finfo;
-	short fref;
-	OSErr err;
-	FSSpec	fSpec;
-
-	strcpy((char*) pname, name);
-	ourc2pstr((char*) pname);
-	
-	err = FSMakeFSSpec( 0, 0, pname, &fSpec );
-
-	switch (_TIFFgetMode(mode, module)) {
-	default:
-		return ((TIFF*) 0);
-	case O_RDWR | O_CREAT | O_TRUNC:
-		if (FSpGetFInfo(&fSpec, &finfo) == noErr)
-			FSpDelete(&fSpec);
-		/* fall through */
-	case O_RDWR | O_CREAT:
-		if ((err = FSpGetFInfo(&fSpec, &finfo)) == fnfErr) {
-			if (FSpCreate(&fSpec, '    ', 'TIFF', smSystemScript) != noErr)
-				goto badCreate;
-			if (FSpOpenDF(&fSpec, fsRdWrPerm, &fref) != noErr)
-				goto badOpen;
-		} else if (err == noErr) {
-			if (FSpOpenDF(&fSpec, fsRdWrPerm, &fref) != noErr)
-				goto badOpen;
-		} else
-			goto badOpen;
-		break;
-	case O_RDONLY:
-		if (FSpOpenDF(&fSpec, fsRdPerm, &fref) != noErr)
-			goto badOpen;
-		break;
-	case O_RDWR:
-		if (FSpOpenDF(&fSpec, fsRdWrPerm, &fref) != noErr)
-			goto badOpen;
-		break;
-	}
-	return (TIFFFdOpen((int) fref, name, mode));
-badCreate:
-	TIFFError(module, "%s: Cannot create", name);
-	return ((TIFF*) 0);
-badOpen:
-	TIFFError(module, "%s: Cannot open", name);
-	return ((TIFF*) 0);
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return (NewPtr((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	DisposePtr(p);
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	Ptr n = p;
-
-	SetPtrSize(p, (size_t) s);
-	if (MemError() && (n = NewPtr((size_t) s)) != NULL) {
-		BlockMove(p, n, GetPtrSize(p));
-		DisposePtr(p);
-	}
-	return ((tdata_t) n);
-}
-
-static void
-appleWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = appleWarningHandler;
-
-static void
-appleErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = appleErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_atari.c b/tkimg1.3/libtiff/libtiff/tif_atari.c
deleted file mode 100644
index c6d1883..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_atari.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* "$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_atari.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $" */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library ATARI-specific Routines.
- */
-#include "tiffiop.h"
-#if defined(__TURBOC__)
-#include <tos.h>
-#include <stdio.h>
-#else
-#include <osbind.h>
-#include <fcntl.h>
-#endif
-
-#ifndef O_ACCMODE
-#define O_ACCMODE 3
-#endif
-
-#include <errno.h>
-
-#define AEFILNF   -33
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	long r;
-
-	r = Fread((int) fd, size, buf);
-	if (r < 0) {
-		errno = (int)-r;
-		r = -1;
-	}
-	return r;
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	long r;
-
-	r = Fwrite((int) fd, size, buf);
-	if (r < 0) {
-		errno = (int)-r;
-		r = -1;
-	}
-	return r;
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, off_t off, int whence)
-{
-	char buf[256];
-	long current_off, expected_off, new_off;
-
-	if (whence == SEEK_END || off <= 0)
-		return Fseek(off, (int) fd, whence);
-	current_off = Fseek(0, (int) fd, SEEK_CUR); /* find out where we are */
-	if (whence == SEEK_SET)
-		expected_off = off;
-	else
-		expected_off = off + current_off;
-	new_off = Fseek(off, (int) fd, whence);
-	if (new_off == expected_off)
-		return new_off;
-	/* otherwise extend file -- zero filling the hole */
-	if (new_off < 0)            /* error? */
-		new_off = Fseek(0, (int) fd, SEEK_END); /* go to eof */
-	_TIFFmemset(buf, 0, sizeof(buf));
-	while (expected_off > new_off) {
-		off = expected_off - new_off;
-		if (off > sizeof(buf))
-			off = sizeof(buf);
-		if ((current_off = Fwrite((int) fd, off, buf)) != off)
-			return (current_off > 0) ?
-			    new_off + current_off : new_off;
-		new_off += off;
-	}
-	return new_off;
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	long r;
-
-	r = Fclose((int) fd);
-	if (r < 0) {
-		errno = (int)-r;
-		r = -1;
-	}
-	return (int)r;
-}
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	long pos, eof;
-
-	pos = Fseek(0, (int) fd, SEEK_CUR);
-	eof = Fseek(0, (int) fd, SEEK_END);
-	Fseek(pos, (int) fd, SEEK_SET);
-	return eof;
-}
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-/*
-* Open a TIFF file descriptor for read/writing.
-*/
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-		(thandle_t) fd,
-		_tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
-		_tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
-* Open a TIFF file for read/writing.
-*/
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m;
-	long fd;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-	if (m & O_TRUNC) {
-		fd = Fcreate(name, 0);
-	} else {
-		fd = Fopen(name, m & O_ACCMODE);
-		if (fd == AEFILNF && m & O_CREAT)
-			fd = Fcreate(name, 0);
-	}
-	if (fd < 0)
-		errno = (int)fd;
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF*)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-#include <stdlib.h>
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, size_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, size_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-static void
-atariWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = atariWarningHandler;
-
-static void
-atariErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = atariErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_aux.c b/tkimg1.3/libtiff/libtiff/tif_aux.c
deleted file mode 100644
index 5a6a1ea..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_aux.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_aux.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Auxiliary Support Routines.
- */
-#include "tiffiop.h"
-#include "tif_predict.h"
-#include <math.h>
-
-static void
-TIFFDefaultTransferFunction(TIFFDirectory* td)
-{
-	uint16 **tf = td->td_transferfunction;
-	long i, n = 1<<td->td_bitspersample;
-
-	tf[0] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-	tf[0][0] = 0;
-	for (i = 1; i < n; i++) {
-		double t = (double)i/((double) n-1.);
-		tf[0][i] = (uint16)floor(65535.*pow(t, 2.2) + .5);
-	}
-	if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-		tf[1] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-		_TIFFmemcpy(tf[1], tf[0], n * sizeof (uint16));
-		tf[2] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-		_TIFFmemcpy(tf[2], tf[0], n * sizeof (uint16));
-	}
-}
-
-static void
-TIFFDefaultRefBlackWhite(TIFFDirectory* td)
-{
-	int i;
-
-	td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float));
-	for (i = 0; i < 3; i++) {
-	    td->td_refblackwhite[2*i+0] = 0;
-	    td->td_refblackwhite[2*i+1] = (float)((1L<<td->td_bitspersample)-1L);
-	}
-}
-
-/*
- * Like TIFFGetField, but return any default
- * value if the tag is not present in the directory.
- *
- * NB:	We use the value in the directory, rather than
- *	explcit values so that defaults exist only one
- *	place in the library -- in TIFFDefaultDirectory.
- */
-int
-TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (TIFFVGetField(tif, tag, ap))
-		return (1);
-	switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-		*va_arg(ap, uint32 *) = td->td_subfiletype;
-		return (1);
-	case TIFFTAG_BITSPERSAMPLE:
-		*va_arg(ap, uint16 *) = td->td_bitspersample;
-		return (1);
-	case TIFFTAG_THRESHHOLDING:
-		*va_arg(ap, uint16 *) = td->td_threshholding;
-		return (1);
-	case TIFFTAG_FILLORDER:
-		*va_arg(ap, uint16 *) = td->td_fillorder;
-		return (1);
-	case TIFFTAG_ORIENTATION:
-		*va_arg(ap, uint16 *) = td->td_orientation;
-		return (1);
-	case TIFFTAG_SAMPLESPERPIXEL:
-		*va_arg(ap, uint16 *) = td->td_samplesperpixel;
-		return (1);
-	case TIFFTAG_ROWSPERSTRIP:
-		*va_arg(ap, uint32 *) = td->td_rowsperstrip;
-		return (1);
-	case TIFFTAG_MINSAMPLEVALUE:
-		*va_arg(ap, uint16 *) = td->td_minsamplevalue;
-		return (1);
-	case TIFFTAG_MAXSAMPLEVALUE:
-		*va_arg(ap, uint16 *) = td->td_maxsamplevalue;
-		return (1);
-	case TIFFTAG_PLANARCONFIG:
-		*va_arg(ap, uint16 *) = td->td_planarconfig;
-		return (1);
-	case TIFFTAG_RESOLUTIONUNIT:
-		*va_arg(ap, uint16 *) = td->td_resolutionunit;
-		return (1);
-	case TIFFTAG_PREDICTOR:
-                {
-			TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data;
-			*va_arg(ap, uint16*) = (uint16) sp->predictor;
-			return (1);
-                }
-	case TIFFTAG_DOTRANGE:
-		*va_arg(ap, uint16 *) = 0;
-		*va_arg(ap, uint16 *) = (1<<td->td_bitspersample)-1;
-		return (1);
-	case TIFFTAG_INKSET:
-		*va_arg(ap, uint16 *) = td->td_inkset;
-		return (1);
-	case TIFFTAG_NUMBEROFINKS:
-		*va_arg(ap, uint16 *) = td->td_ninks;
-		return (1);
-	case TIFFTAG_EXTRASAMPLES:
-		*va_arg(ap, uint16 *) = td->td_extrasamples;
-		*va_arg(ap, uint16 **) = td->td_sampleinfo;
-		return (1);
-	case TIFFTAG_MATTEING:
-		*va_arg(ap, uint16 *) =
-		    (td->td_extrasamples == 1 &&
-		     td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA);
-		return (1);
-	case TIFFTAG_TILEDEPTH:
-		*va_arg(ap, uint32 *) = td->td_tiledepth;
-		return (1);
-	case TIFFTAG_DATATYPE:
-		*va_arg(ap, uint16 *) = td->td_sampleformat-1;
-		return (1);
-	case TIFFTAG_SAMPLEFORMAT:
-		*va_arg(ap, uint16 *) = td->td_sampleformat;
-                return(1);
-	case TIFFTAG_IMAGEDEPTH:
-		*va_arg(ap, uint32 *) = td->td_imagedepth;
-		return (1);
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-		if (!td->td_ycbcrcoeffs) {
-			td->td_ycbcrcoeffs = (float *)
-			    _TIFFmalloc(3*sizeof (float));
-			/* defaults are from CCIR Recommendation 601-1 */
-			td->td_ycbcrcoeffs[0] = 0.299f;
-			td->td_ycbcrcoeffs[1] = 0.587f;
-			td->td_ycbcrcoeffs[2] = 0.114f;
-		}
-		*va_arg(ap, float **) = td->td_ycbcrcoeffs;
-		return (1);
-	case TIFFTAG_YCBCRSUBSAMPLING:
-		*va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[0];
-		*va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[1];
-		return (1);
-	case TIFFTAG_YCBCRPOSITIONING:
-		*va_arg(ap, uint16 *) = td->td_ycbcrpositioning;
-		return (1);
-	case TIFFTAG_WHITEPOINT:
-		if (!td->td_whitepoint) {
-			td->td_whitepoint = (float *)
-				_TIFFmalloc(2 * sizeof (float));
-			/* TIFF 6.0 specification says that it is no default
-			   value for the WhitePoint, but AdobePhotoshop TIFF
-			   Technical Note tells that it should be CIE D50. */
-			td->td_whitepoint[0] =
-				D50_X0 / (D50_X0 + D50_Y0 + D50_Z0);
-			td->td_whitepoint[1] =
-				D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0);
-		}
-		*va_arg(ap, float **) = td->td_whitepoint;
-		return (1);
-	case TIFFTAG_TRANSFERFUNCTION:
-		if (!td->td_transferfunction[0])
-			TIFFDefaultTransferFunction(td);
-		*va_arg(ap, uint16 **) = td->td_transferfunction[0];
-		if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-			*va_arg(ap, uint16 **) = td->td_transferfunction[1];
-			*va_arg(ap, uint16 **) = td->td_transferfunction[2];
-		}
-		return (1);
-	case TIFFTAG_REFERENCEBLACKWHITE:
-		if (!td->td_refblackwhite)
-			TIFFDefaultRefBlackWhite(td);
-		*va_arg(ap, float **) = td->td_refblackwhite;
-		return (1);
-	}
-	return (0);
-}
-
-/*
- * Like TIFFGetField, but return any default
- * value if the tag is not present in the directory.
- */
-int
-TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...)
-{
-	int ok;
-	va_list ap;
-
-	va_start(ap, tag);
-	ok =  TIFFVGetFieldDefaulted(tif, tag, ap);
-	va_end(ap);
-	return (ok);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_close.c b/tkimg1.3/libtiff/libtiff/tif_close.c
deleted file mode 100644
index 9f4093a..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_close.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_close.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-void
-TIFFClose(TIFF* tif)
-{
-    if (tif->tif_mode != O_RDONLY)
-        /*
-         * Flush buffered data and directory (if dirty).
-         */
-        TIFFFlush(tif);
-    (*tif->tif_cleanup)(tif);
-    TIFFFreeDirectory(tif);
-
-    if (tif->tif_dirlist)
-        _TIFFfree(tif->tif_dirlist);
-        
-    /* Clean up client info links */
-    while( tif->tif_clientinfo )
-    {
-        TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-        tif->tif_clientinfo = link->next;
-        _TIFFfree( link->name );
-        _TIFFfree( link );
-    }
-
-    if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER))
-        _TIFFfree(tif->tif_rawdata);
-    if (isMapped(tif))
-        TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
-    (void) TIFFCloseFile(tif);
-    if (tif->tif_nfields > 0) 
-    {
-        int  i;
-
-        for (i = 0; i < tif->tif_nfields; i++) 
-	{
-	    TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
- 	    if (fld->field_bit == FIELD_CUSTOM && 
-		strncmp("Tag ", fld->field_name, 4) == 0) 
-	    {
-                _TIFFfree(fld->field_name);
-                _TIFFfree(fld);
-	    }
-        }   
-      
-        _TIFFfree(tif->tif_fieldinfo);
-    }
-
-    _TIFFfree(tif);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_codec.c b/tkimg1.3/libtiff/libtiff/tif_codec.c
deleted file mode 100644
index 83e51cb..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_codec.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_codec.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Builtin Compression Scheme Configuration Support.
- */
-#include "tiffiop.h"
-
-static	int NotConfigured(TIFF*, int);
-
-#ifndef	LZW_SUPPORT
-#define	TIFFInitLZW		NotConfigured
-#endif
-#ifndef	PACKBITS_SUPPORT
-#define	TIFFInitPackbits	NotConfigured
-#endif
-#ifndef	THUNDER_SUPPORT
-#define	TIFFInitThunderScan	NotConfigured
-#endif
-#ifndef	NEXT_SUPPORT
-#define	TIFFInitNeXT		NotConfigured
-#endif
-#ifndef	JPEG_SUPPORT
-#define	TIFFInitJPEG		NotConfigured
-#endif
-#ifndef	OJPEG_SUPPORT
-#define	TIFFInitOJPEG		NotConfigured
-#endif
-#ifndef	CCITT_SUPPORT
-#define	TIFFInitCCITTRLE	NotConfigured
-#define	TIFFInitCCITTRLEW	NotConfigured
-#define	TIFFInitCCITTFax3	NotConfigured
-#define	TIFFInitCCITTFax4	NotConfigured
-#endif
-#ifndef JBIG_SUPPORT
-#define	TIFFInitJBIG		NotConfigured
-#endif
-#ifndef	ZIP_SUPPORT
-#define	TIFFInitZIP		NotConfigured
-#endif
-#ifndef	PIXARLOG_SUPPORT
-#define	TIFFInitPixarLog	NotConfigured
-#endif
-#ifndef LOGLUV_SUPPORT
-#define TIFFInitSGILog		NotConfigured
-#endif
-
-/*
- * Compression schemes statically built into the library.
- */
-#ifdef VMS
-const TIFFCodec _TIFFBuiltinCODECS[] = {
-#else
-TIFFCodec _TIFFBuiltinCODECS[] = {
-#endif
-    { "None",		COMPRESSION_NONE,	TIFFInitDumpMode },
-    { "LZW",		COMPRESSION_LZW,	TIFFInitLZW },
-    { "PackBits",	COMPRESSION_PACKBITS,	TIFFInitPackBits },
-    { "ThunderScan",	COMPRESSION_THUNDERSCAN,TIFFInitThunderScan },
-    { "NeXT",		COMPRESSION_NEXT,	TIFFInitNeXT },
-    { "JPEG",		COMPRESSION_JPEG,	TIFFInitJPEG },
-    { "Old-style JPEG",	COMPRESSION_OJPEG,	TIFFInitOJPEG },
-    { "CCITT RLE",	COMPRESSION_CCITTRLE,	TIFFInitCCITTRLE },
-    { "CCITT RLE/W",	COMPRESSION_CCITTRLEW,	TIFFInitCCITTRLEW },
-    { "CCITT Group 3",	COMPRESSION_CCITTFAX3,	TIFFInitCCITTFax3 },
-    { "CCITT Group 4",	COMPRESSION_CCITTFAX4,	TIFFInitCCITTFax4 },
-    { "ISO JBIG",	COMPRESSION_JBIG,	TIFFInitJBIG },
-    { "Deflate",	COMPRESSION_DEFLATE,	TIFFInitZIP },
-    { "AdobeDeflate",   COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP }, 
-    { "PixarLog",	COMPRESSION_PIXARLOG,	TIFFInitPixarLog },
-    { "SGILog",		COMPRESSION_SGILOG,	TIFFInitSGILog },
-    { "SGILog24",	COMPRESSION_SGILOG24,	TIFFInitSGILog },
-    { NULL }
-};
-
-static int
-_notConfigured(TIFF* tif)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	TIFFError(tif->tif_name,
-	    "%s compression support is not configured", c->name);
-	return (0);
-}
-
-static int
-NotConfigured(TIFF* tif, int scheme)
-{
-    (void) scheme;
-    
-    tif->tif_decodestatus = FALSE;
-    tif->tif_setupdecode = _notConfigured;
-    tif->tif_encodestatus = FALSE;
-    tif->tif_setupencode = _notConfigured;
-    return (1);
-}
-
-/************************************************************************/
-/*                       TIFFIsCODECConfigured()                        */
-/************************************************************************/
-
-/**
- * Check whether we have working codec for the specific coding scheme.
- * 
- * @return returns 1 if the codec is configured and working. Otherwise
- * 0 will be returned.
- */
-
-int
-TIFFIsCODECConfigured(uint16 scheme)
-{
-	const TIFFCodec* codec = TIFFFindCODEC(scheme);
-
-	if(codec == NULL) {
-            return 0;
-        }
-        if(codec->init == NULL) {
-            return 0;
-        }
-	if(codec->init != NotConfigured){
-            return 1;
-        }
-	return 0;
-}
-
diff --git a/tkimg1.3/libtiff/libtiff/tif_color.c b/tkimg1.3/libtiff/libtiff/tif_color.c
deleted file mode 100644
index 7e8cc42..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_color.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_color.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * CIE L*a*b* to CIE XYZ and CIE XYZ to RGB conversion routines are taken
- * from the VIPS library (http://www.vips.ecs.soton.ac.uk) with
- * the permission of John Cupitt, the VIPS author.
- */
-
-/*
- * TIFF Library.
- *
- * Color space conversion routines.
- */
-
-#include "tiffiop.h"
-#include <math.h>
-
-/*
- * Convert color value from the CIE L*a*b* 1976 space to CIE XYZ.
- */
-void
-TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b,
-		float *X, float *Y, float *Z)
-{
-	float L = (float)l * 100.0F / 255.0F;
-	float cby, tmp;
-
-	if( L < 8.856F ) {
-		*Y = (L * cielab->Y0) / 903.292F;
-		cby = 7.787F * (*Y / cielab->Y0) + 16.0F / 116.0F;
-	} else {
-		cby = (L + 16.0F) / 116.0F;
-		*Y = cielab->Y0 * cby * cby * cby;
-	}
-
-	tmp = (float)a / 500.0F + cby;
-	if( tmp < 0.2069F )
-		*X = cielab->X0 * (tmp - 0.13793F) / 7.787F;
-	else    
-		*X = cielab->X0 * tmp * tmp * tmp;
-
-	tmp = cby - (float)b / 200.0F;
-	if( tmp < 0.2069F )
-		*Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F;
-	else    
-		*Z = cielab->Z0 * tmp * tmp * tmp;
-}
-
-#define RINT(R) ((uint32)((R)>0?((R)+0.5):((R)-0.5)))
-/*
- * Convert color value from the XYZ space to RGB.
- */
-void
-TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z,
-	     uint32 *r, uint32 *g, uint32 *b)
-{
-	int i;
-	float Yr, Yg, Yb;
-	float *matrix = &cielab->display.d_mat[0][0];
-
-	/* Multiply through the matrix to get luminosity values. */
-	Yr =  matrix[0] * X + matrix[1] * Y + matrix[2] * Z;
-	Yg =  matrix[3] * X + matrix[4] * Y + matrix[5] * Z;
-	Yb =  matrix[6] * X + matrix[7] * Y + matrix[8] * Z;
-
-	/* Clip input */
-	Yr = TIFFmax( Yr, cielab->display.d_Y0R );
-	Yg = TIFFmax( Yg, cielab->display.d_Y0G );
-	Yb = TIFFmax( Yb, cielab->display.d_Y0B );
-
-	/* Turn luminosity to colour value. */
-	i = TIFFmin(cielab->range,
-		    (int)((Yr - cielab->display.d_Y0R) / cielab->rstep));
-	*r = RINT(cielab->Yr2r[i]);
-
-	i = TIFFmin(cielab->range,
-		    (int)((Yg - cielab->display.d_Y0G) / cielab->gstep));
-	*g = RINT(cielab->Yg2g[i]);
-
-	i = TIFFmin(cielab->range,
-		    (int)((Yb - cielab->display.d_Y0B) / cielab->bstep));
-	*b = RINT(cielab->Yb2b[i]);
-
-	/* Clip output. */
-	*r = TIFFmin( *r, cielab->display.d_Vrwr );
-	*g = TIFFmin( *g, cielab->display.d_Vrwg );
-	*b = TIFFmin( *b, cielab->display.d_Vrwb );
-}
-#undef RINT
-
-/* 
- * Allocate conversion state structures and make look_up tables for
- * the Yr,Yb,Yg <=> r,g,b conversions.
- */
-int
-TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab,
-		    TIFFDisplay *display, float *refWhite)
-{
-	int i;
-	float gamma;
-
-	cielab->range = CIELABTORGB_TABLE_RANGE;
-
-	_TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay));
-
-	/* Red */
-	gamma = 1.0F / cielab->display.d_gammaR ;
-	cielab->rstep =
-		(cielab->display.d_YCR - cielab->display.d_Y0R)	/ cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yr2r[i] = cielab->display.d_Vrwr
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Green */
-	gamma = 1.0F / cielab->display.d_gammaG ;
-	cielab->gstep =
-	    (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yg2g[i] = cielab->display.d_Vrwg
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Blue */
-	gamma = 1.0F / cielab->display.d_gammaB ;
-	cielab->bstep =
-	    (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yb2b[i] = cielab->display.d_Vrwb
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Init reference white point */
-	cielab->X0 = refWhite[0];
-	cielab->Y0 = refWhite[1];
-	cielab->Z0 = refWhite[2];
-
-	return 0;
-}
-
-/* 
- * Convert color value from the YCbCr space to CIE XYZ.
- * The colorspace conversion algorithm comes from the IJG v5a code;
- * see below for more information on how it works.
- */
-#define	SHIFT			16
-#define	FIX(x)			((int32)((x) * (1L<<SHIFT) + 0.5))
-#define	ONE_HALF		((int32)(1<<(SHIFT-1)))
-#define	Code2V(c, RB, RW, CR)	((((c)-(int32)(RB))*(float)(CR))/(float)((RW)-(RB)))
-#define	CLAMP(f,min,max)	((f)<(min)?(min):(f)>(max)?(max):(f))
-
-void
-TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr,
-	       uint32 *r, uint32 *g, uint32 *b)
-{
-	/* XXX: Only 8-bit YCbCr input supported for now */
-	Y = CLAMP(Y, 0, 255), Cb = CLAMP(Cb, 0, 255), Cr = CLAMP(Cr, 0, 255);
-
-	*r = ycbcr->clamptab[ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr]];
-	*g = ycbcr->clamptab[ycbcr->Y_tab[Y]
-	    + (int)((ycbcr->Cb_g_tab[Cb] + ycbcr->Cr_g_tab[Cr]) >> SHIFT)];
-	*b = ycbcr->clamptab[ycbcr->Y_tab[Y] + ycbcr->Cb_b_tab[Cb]];
-}
-
-/*
- * Initialize the YCbCr->RGB conversion tables.  The conversion
- * is done according to the 6.0 spec:
- *
- *    R = Y + Cr*(2 - 2*LumaRed)
- *    B = Y + Cb*(2 - 2*LumaBlue)
- *    G =   Y
- *        - LumaBlue*Cb*(2-2*LumaBlue)/LumaGreen
- *        - LumaRed*Cr*(2-2*LumaRed)/LumaGreen
- *
- * To avoid floating point arithmetic the fractional constants that
- * come out of the equations are represented as fixed point values
- * in the range 0...2^16.  We also eliminate multiplications by
- * pre-calculating possible values indexed by Cb and Cr (this code
- * assumes conversion is being done for 8-bit samples).
- */
-int
-TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite)
-{
-    TIFFRGBValue* clamptab;
-    int i;
-    
-#define LumaRed	    luma[0]
-#define LumaGreen   luma[1]
-#define LumaBlue    luma[2]
-
-    clamptab = (TIFFRGBValue*)(
-	(tidata_t) ycbcr+TIFFroundup(sizeof (TIFFYCbCrToRGB), sizeof (long)));
-    _TIFFmemset(clamptab, 0, 256);		/* v < 0 => 0 */
-    ycbcr->clamptab = (clamptab += 256);
-    for (i = 0; i < 256; i++)
-	clamptab[i] = (TIFFRGBValue) i;
-    _TIFFmemset(clamptab+256, 255, 2*256);	/* v > 255 => 255 */
-    ycbcr->Cr_r_tab = (int*) (clamptab + 3*256);
-    ycbcr->Cb_b_tab = ycbcr->Cr_r_tab + 256;
-    ycbcr->Cr_g_tab = (int32*) (ycbcr->Cb_b_tab + 256);
-    ycbcr->Cb_g_tab = ycbcr->Cr_g_tab + 256;
-    ycbcr->Y_tab = ycbcr->Cb_g_tab + 256;
-
-    { float f1 = 2-2*LumaRed;		int32 D1 = FIX(f1);
-      float f2 = LumaRed*f1/LumaGreen;	int32 D2 = -FIX(f2);
-      float f3 = 2-2*LumaBlue;		int32 D3 = FIX(f3);
-      float f4 = LumaBlue*f3/LumaGreen;	int32 D4 = -FIX(f4);
-      int x;
-
-#undef LumaBlue
-#undef LumaGreen
-#undef LumaRed
-      
-      /*
-       * i is the actual input pixel value in the range 0..255
-       * Cb and Cr values are in the range -128..127 (actually
-       * they are in a range defined by the ReferenceBlackWhite
-       * tag) so there is some range shifting to do here when
-       * constructing tables indexed by the raw pixel data.
-       */
-      for (i = 0, x = -128; i < 256; i++, x++) {
-	    int32 Cr = (int32)Code2V(x, refBlackWhite[4] - 128.0F,
-			    refBlackWhite[5] - 128.0F, 127);
-	    int32 Cb = (int32)Code2V(x, refBlackWhite[2] - 128.0F,
-			    refBlackWhite[3] - 128.0F, 127);
-
-	    ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT);
-	    ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT);
-	    ycbcr->Cr_g_tab[i] = D2*Cr;
-	    ycbcr->Cb_g_tab[i] = D4*Cb + ONE_HALF;
-	    ycbcr->Y_tab[i] =
-		    (int32)Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255);
-      }
-    }
-
-    return 0;
-}
-#undef	CLAMP
-#undef	Code2V
-#undef	SHIFT
-#undef	ONE_HALF
-#undef	FIX
-
-
diff --git a/tkimg1.3/libtiff/libtiff/tif_compress.c b/tkimg1.3/libtiff/libtiff/tif_compress.c
deleted file mode 100644
index e4d1b0d..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_compress.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_compress.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Compression Scheme Configuration Support.
- */
-#include "tiffiop.h"
-
-static int
-TIFFNoEncode(TIFF* tif, char* method)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	if (c) { 
-	  if (! strncmp(c->name, "LZW", 3) ){ 
-	    TIFFError(tif->tif_name, 
-		      "%s %s encoding is no longer implemented due to Unisys patent enforcement", 
-		      c->name, method); 
-	  } else { 
-	    TIFFError(tif->tif_name, "%s %s encoding is not implemented",
-		      c->name, method);
-	  }
-	}
-	else { 
-		TIFFError(tif->tif_name,
-			  "Compression scheme %u %s encoding is not implemented",
-		    tif->tif_dir.td_compression, method);
-	}
-	return (-1);
-}
-
-int
-_TIFFNoRowEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "scanline"));
-}
-
-int
-_TIFFNoStripEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "strip"));
-}
-
-int
-_TIFFNoTileEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "tile"));
-}
-
-static int
-TIFFNoDecode(TIFF* tif, char* method)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	if (c)
-		TIFFError(tif->tif_name, "%s %s decoding is not implemented",
-		    c->name, method);
-	else
-		TIFFError(tif->tif_name,
-		    "Compression scheme %u %s decoding is not implemented",
-		    tif->tif_dir.td_compression, method);
-	return (-1);
-}
-
-int
-_TIFFNoRowDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "scanline"));
-}
-
-int
-_TIFFNoStripDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "strip"));
-}
-
-int
-_TIFFNoTileDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "tile"));
-}
-
-int
-_TIFFNoSeek(TIFF* tif, uint32 off)
-{
-	(void) off;
-	TIFFError(tif->tif_name,
-	    "Compression algorithm does not support random access");
-	return (0);
-}
-
-int
-_TIFFNoPreCode(TIFF* tif, tsample_t s)
-{
-	(void) tif; (void) s;
-	return (1);
-}
-
-static int _TIFFtrue(TIFF* tif) { (void) tif; return (1); }
-static void _TIFFvoid(TIFF* tif) { (void) tif; }
-
-void
-_TIFFSetDefaultCompressionState(TIFF* tif)
-{
-	tif->tif_decodestatus = TRUE;
-	tif->tif_setupdecode = _TIFFtrue;
-	tif->tif_predecode = _TIFFNoPreCode;
-	tif->tif_decoderow = _TIFFNoRowDecode;
-	tif->tif_decodestrip = _TIFFNoStripDecode;
-	tif->tif_decodetile = _TIFFNoTileDecode;
-	tif->tif_encodestatus = TRUE;
-	tif->tif_setupencode = _TIFFtrue;
-	tif->tif_preencode = _TIFFNoPreCode;
-	tif->tif_postencode = _TIFFtrue;
-	tif->tif_encoderow = _TIFFNoRowEncode;
-	tif->tif_encodestrip = _TIFFNoStripEncode;
-	tif->tif_encodetile = _TIFFNoTileEncode;
-	tif->tif_close = _TIFFvoid;
-	tif->tif_seek = _TIFFNoSeek;
-	tif->tif_cleanup = _TIFFvoid;
-	tif->tif_defstripsize = _TIFFDefaultStripSize;
-	tif->tif_deftilesize = _TIFFDefaultTileSize;
-	tif->tif_flags &= ~TIFF_NOBITREV;
-}
-
-int
-TIFFSetCompressionScheme(TIFF* tif, int scheme)
-{
-	const TIFFCodec *c = TIFFFindCODEC((uint16) scheme);
-
-	_TIFFSetDefaultCompressionState(tif);
-	/*
-	 * Don't treat an unknown compression scheme as an error.
-	 * This permits applications to open files with data that
-	 * the library does not have builtin support for, but which
-	 * may still be meaningful.
-	 */
-	return (c ? (*c->init)(tif, scheme) : 1);
-}
-
-/*
- * Other compression schemes may be registered.  Registered
- * schemes can also override the builtin versions provided
- * by this library.
- */
-typedef struct _codec {
-	struct _codec*	next;
-	TIFFCodec*	info;
-} codec_t;
-static	codec_t* registeredCODECS = NULL;
-
-const TIFFCodec*
-TIFFFindCODEC(uint16 scheme)
-{
-	const TIFFCodec* c;
-	codec_t* cd;
-
-	for (cd = registeredCODECS; cd; cd = cd->next)
-		if (cd->info->scheme == scheme)
-			return ((const TIFFCodec*) cd->info);
-	for (c = _TIFFBuiltinCODECS; c->name; c++)
-		if (c->scheme == scheme)
-			return (c);
-	return ((const TIFFCodec*) 0);
-}
-
-TIFFCodec*
-TIFFRegisterCODEC(uint16 scheme, const char* name, TIFFInitMethod init)
-{
-	codec_t* cd = (codec_t*)
-	    _TIFFmalloc(sizeof (codec_t) + sizeof (TIFFCodec) + strlen(name)+1);
-
-	if (cd != NULL) {
-		cd->info = (TIFFCodec*) ((tidata_t) cd + sizeof (codec_t));
-		cd->info->name = (char*)
-		    ((tidata_t) cd->info + sizeof (TIFFCodec));
-		strcpy(cd->info->name, name);
-		cd->info->scheme = scheme;
-		cd->info->init = init;
-		cd->next = registeredCODECS;
-		registeredCODECS = cd;
-	} else
-		TIFFError("TIFFRegisterCODEC",
-		    "No space to register compression scheme %s", name);
-	return (cd->info);
-}
-
-void
-TIFFUnRegisterCODEC(TIFFCodec* c)
-{
-	codec_t* cd;
-	codec_t** pcd;
-
-	for (pcd = ®isteredCODECS; (cd = *pcd); pcd = &cd->next)
-		if (cd->info == c) {
-			*pcd = cd->next;
-			_TIFFfree(cd);
-			return;
-		}
-	TIFFError("TIFFUnRegisterCODEC",
-	    "Cannot remove compression scheme %s; not registered", c->name);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_dir.c b/tkimg1.3/libtiff/libtiff/tif_dir.c
deleted file mode 100644
index 9bedfb5..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dir.c
+++ /dev/null
@@ -1,1419 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dir.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Tag Get & Set Routines.
- * (and also some miscellaneous stuff)
- */
-#include "tiffiop.h"
-
-/*
- * These are used in the backwards compatibility code...
- */
-#define DATATYPE_VOID		0       /* !untyped data */
-#define DATATYPE_INT		1       /* !signed integer data */
-#define DATATYPE_UINT		2       /* !unsigned integer data */
-#define DATATYPE_IEEEFP		3       /* !IEEE floating point data */
-
-void
-_TIFFsetByteArray(void** vpp, void* vp, long n)
-{
-	if (*vpp)
-		_TIFFfree(*vpp), *vpp = 0;
-	if (vp && (*vpp = (void*) _TIFFmalloc(n)))
-		_TIFFmemcpy(*vpp, vp, n);
-}
-void _TIFFsetString(char** cpp, char* cp)
-    { _TIFFsetByteArray((void**) cpp, (void*) cp, (long) (strlen(cp)+1)); }
-void _TIFFsetNString(char** cpp, char* cp, long n)
-    { _TIFFsetByteArray((void**) cpp, (void*) cp, n); }
-void _TIFFsetShortArray(uint16** wpp, uint16* wp, long n)
-    { _TIFFsetByteArray((void**) wpp, (void*) wp, n*sizeof (uint16)); }
-void _TIFFsetLongArray(uint32** lpp, uint32* lp, long n)
-    { _TIFFsetByteArray((void**) lpp, (void*) lp, n*sizeof (uint32)); }
-void _TIFFsetFloatArray(float** fpp, float* fp, long n)
-    { _TIFFsetByteArray((void**) fpp, (void*) fp, n*sizeof (float)); }
-void _TIFFsetDoubleArray(double** dpp, double* dp, long n)
-    { _TIFFsetByteArray((void**) dpp, (void*) dp, n*sizeof (double)); }
-
-/*
- * Install extra samples information.
- */
-static int
-setExtraSamples(TIFFDirectory* td, va_list ap, int* v)
-{
-	uint16* va;
-	int i;
-
-	*v = va_arg(ap, int);
-	if ((uint16) *v > td->td_samplesperpixel)
-		return (0);
-	va = va_arg(ap, uint16*);
-	if (*v > 0 && va == NULL)		/* typically missing param */
-		return (0);
-	for (i = 0; i < *v; i++)
-		if (va[i] > EXTRASAMPLE_UNASSALPHA)
-			return (0);
-	td->td_extrasamples = (uint16) *v;
-	_TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples);
-	return (1);
-}
-
-static int
-checkInkNamesString(TIFF* tif, int slen, const char* s)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	int i = td->td_samplesperpixel;
-
-	if (slen > 0) {
-		const char* ep = s+slen;
-		const char* cp = s;
-		for (; i > 0; i--) {
-			for (; *cp != '\0'; cp++)
-				if (cp >= ep)
-					goto bad;
-			cp++;				/* skip \0 */
-		}
-		return (cp-s);
-	}
-bad:
-	TIFFError("TIFFSetField",
-	    "%s: Invalid InkNames value; expecting %d names, found %d",
-	    tif->tif_name,
-	    td->td_samplesperpixel,
-	    td->td_samplesperpixel-i);
-	return (0);
-}
-
-static int
-_TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	static const char module[] = "_TIFFVSetField";
-	
-	TIFFDirectory* td = &tif->tif_dir;
-	int status = 1;
-	uint32 v32;
-	int i, v;
-	double d;
-	char* s;
-
-	switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-		td->td_subfiletype = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_IMAGEWIDTH:
-		td->td_imagewidth = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_IMAGELENGTH:
-		td->td_imagelength = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_BITSPERSAMPLE:
-		td->td_bitspersample = (uint16) va_arg(ap, int);
-		/*
-		 * If the data require post-decoding processing
-		 * to byte-swap samples, set it up here.  Note
-		 * that since tags are required to be ordered,
-		 * compression code can override this behaviour
-		 * in the setup method if it wants to roll the
-		 * post decoding work in with its normal work.
-		 */
-		if (tif->tif_flags & TIFF_SWAB) {
-			if (td->td_bitspersample == 16)
-				tif->tif_postdecode = _TIFFSwab16BitData;
-			else if (td->td_bitspersample == 32)
-				tif->tif_postdecode = _TIFFSwab32BitData;
-			else if (td->td_bitspersample == 64)
-				tif->tif_postdecode = _TIFFSwab64BitData;
-		}
-		break;
-	case TIFFTAG_COMPRESSION:
-		v = va_arg(ap, int) & 0xffff;
-		/*
-		 * If we're changing the compression scheme,
-		 * the notify the previous module so that it
-		 * can cleanup any state it's setup.
-		 */
-		if (TIFFFieldSet(tif, FIELD_COMPRESSION)) {
-			if (td->td_compression == v)
-				break;
-			(*tif->tif_cleanup)(tif);
-			tif->tif_flags &= ~TIFF_CODERSETUP;
-		}
-		/*
-		 * Setup new compression routine state.
-		 */
-		if( (status = TIFFSetCompressionScheme(tif, v)) != 0 )
-                    td->td_compression = (uint16) v;
-                else
-                    status = 0;
-		break;
-	case TIFFTAG_PHOTOMETRIC:
-		td->td_photometric = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_THRESHHOLDING:
-		td->td_threshholding = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_FILLORDER:
-		v = va_arg(ap, int);
-		if (v != FILLORDER_LSB2MSB && v != FILLORDER_MSB2LSB)
-			goto badvalue;
-		td->td_fillorder = (uint16) v;
-		break;
-	case TIFFTAG_DOCUMENTNAME:
-		_TIFFsetString(&td->td_documentname, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ARTIST:
-		_TIFFsetString(&td->td_artist, va_arg(ap, char*));
-		break;
-	case TIFFTAG_DATETIME:
-		_TIFFsetString(&td->td_datetime, va_arg(ap, char*));
-		break;
-	case TIFFTAG_HOSTCOMPUTER:
-		_TIFFsetString(&td->td_hostcomputer, va_arg(ap, char*));
-		break;
-	case TIFFTAG_IMAGEDESCRIPTION:
-		_TIFFsetString(&td->td_imagedescription, va_arg(ap, char*));
-		break;
-	case TIFFTAG_MAKE:
-		_TIFFsetString(&td->td_make, va_arg(ap, char*));
-		break;
-	case TIFFTAG_MODEL:
-		_TIFFsetString(&td->td_model, va_arg(ap, char*));
-		break;
-	case TIFFTAG_COPYRIGHT:
-		_TIFFsetString(&td->td_copyright, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ORIENTATION:
-		v = va_arg(ap, int);
-		if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) {
-			TIFFWarning(tif->tif_name,
-			    "Bad value %ld for \"%s\" tag ignored",
-			    v, _TIFFFieldWithTag(tif, tag)->field_name);
-		} else
-			td->td_orientation = (uint16) v;
-		break;
-	case TIFFTAG_SAMPLESPERPIXEL:
-		/* XXX should cross check -- e.g. if pallette, then 1 */
-		v = va_arg(ap, int);
-		if (v == 0)
-			goto badvalue;
-		td->td_samplesperpixel = (uint16) v;
-		break;
-	case TIFFTAG_ROWSPERSTRIP:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0)
-			goto badvalue32;
-		td->td_rowsperstrip = v32;
-		if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
-			td->td_tilelength = v32;
-			td->td_tilewidth = td->td_imagewidth;
-		}
-		break;
-	case TIFFTAG_MINSAMPLEVALUE:
-		td->td_minsamplevalue = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_MAXSAMPLEVALUE:
-		td->td_maxsamplevalue = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_SMINSAMPLEVALUE:
-		td->td_sminsamplevalue = (double) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_SMAXSAMPLEVALUE:
-		td->td_smaxsamplevalue = (double) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_XRESOLUTION:
-		td->td_xresolution = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_YRESOLUTION:
-		td->td_yresolution = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_PLANARCONFIG:
-		v = va_arg(ap, int);
-		if (v != PLANARCONFIG_CONTIG && v != PLANARCONFIG_SEPARATE)
-			goto badvalue;
-		td->td_planarconfig = (uint16) v;
-		break;
-	case TIFFTAG_PAGENAME:
-		_TIFFsetString(&td->td_pagename, va_arg(ap, char*));
-		break;
-	case TIFFTAG_XPOSITION:
-		td->td_xposition = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_YPOSITION:
-		td->td_yposition = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_RESOLUTIONUNIT:
-		v = va_arg(ap, int);
-		if (v < RESUNIT_NONE || RESUNIT_CENTIMETER < v)
-			goto badvalue;
-		td->td_resolutionunit = (uint16) v;
-		break;
-	case TIFFTAG_PAGENUMBER:
-		td->td_pagenumber[0] = (uint16) va_arg(ap, int);
-		td->td_pagenumber[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_HALFTONEHINTS:
-		td->td_halftonehints[0] = (uint16) va_arg(ap, int);
-		td->td_halftonehints[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_COLORMAP:
-		v32 = (uint32)(1L<<td->td_bitspersample);
-		_TIFFsetShortArray(&td->td_colormap[0], va_arg(ap, uint16*), v32);
-		_TIFFsetShortArray(&td->td_colormap[1], va_arg(ap, uint16*), v32);
-		_TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32);
-		break;
-	case TIFFTAG_EXTRASAMPLES:
-		if (!setExtraSamples(td, ap, &v))
-			goto badvalue;
-		break;
-	case TIFFTAG_MATTEING:
-		td->td_extrasamples = (uint16) (va_arg(ap, int) != 0);
-		if (td->td_extrasamples) {
-			uint16 sv = EXTRASAMPLE_ASSOCALPHA;
-			_TIFFsetShortArray(&td->td_sampleinfo, &sv, 1);
-		}
-		break;
-	case TIFFTAG_TILEWIDTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 % 16) {
-			if (tif->tif_mode != O_RDONLY)
-				goto badvalue32;
-			TIFFWarning(tif->tif_name,
-			    "Nonstandard tile width %d, convert file", v32);
-		}
-		td->td_tilewidth = v32;
-		tif->tif_flags |= TIFF_ISTILED;
-		break;
-	case TIFFTAG_TILELENGTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 % 16) {
-			if (tif->tif_mode != O_RDONLY)
-				goto badvalue32;
-			TIFFWarning(tif->tif_name,
-			    "Nonstandard tile length %d, convert file", v32);
-		}
-		td->td_tilelength = v32;
-		tif->tif_flags |= TIFF_ISTILED;
-		break;
-	case TIFFTAG_TILEDEPTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0)
-			goto badvalue32;
-		td->td_tiledepth = v32;
-		break;
-	case TIFFTAG_DATATYPE:
-		v = va_arg(ap, int);
-		switch (v) {
-		case DATATYPE_VOID:	v = SAMPLEFORMAT_VOID;	break;
-		case DATATYPE_INT:	v = SAMPLEFORMAT_INT;	break;
-		case DATATYPE_UINT:	v = SAMPLEFORMAT_UINT;	break;
-		case DATATYPE_IEEEFP:	v = SAMPLEFORMAT_IEEEFP;break;
-		default:		goto badvalue;
-		}
-		td->td_sampleformat = (uint16) v;
-		break;
-	case TIFFTAG_SAMPLEFORMAT:
-		v = va_arg(ap, int);
-		if (v < SAMPLEFORMAT_UINT || SAMPLEFORMAT_COMPLEXIEEEFP < v)
-			goto badvalue;
-		td->td_sampleformat = (uint16) v;
-
-                /*  Try to fix up the SWAB function for complex data. */
-                if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT 
-                    && td->td_bitspersample == 32
-                    && tif->tif_postdecode == _TIFFSwab32BitData )
-                    tif->tif_postdecode = _TIFFSwab16BitData;
-                else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT 
-                          || td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP)
-                         && td->td_bitspersample == 64
-                         && tif->tif_postdecode == _TIFFSwab64BitData )
-                    tif->tif_postdecode = _TIFFSwab32BitData;
-                else if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP
-                         && td->td_bitspersample == 128
-                         && tif->tif_postdecode == NULL )
-                    tif->tif_postdecode = _TIFFSwab64BitData;
-		break;
-	case TIFFTAG_IMAGEDEPTH:
-		td->td_imagedepth = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_STONITS:
-		d = va_arg(ap, dblparam_t);
-		if (d <= 0.)
-			goto badvaluedbl;
-		td->td_stonits = d;
-		break;
-	/* Begin Pixar Tags */
- 	case TIFFTAG_PIXAR_IMAGEFULLWIDTH:
- 		td->td_imagefullwidth = va_arg(ap, uint32);
- 		break;
- 	case TIFFTAG_PIXAR_IMAGEFULLLENGTH:
- 		td->td_imagefulllength = va_arg(ap, uint32);
- 		break;
- 	case TIFFTAG_PIXAR_TEXTUREFORMAT:
- 		_TIFFsetString(&td->td_textureformat, va_arg(ap, char*));
- 		break;
- 	case TIFFTAG_PIXAR_WRAPMODES:
- 		_TIFFsetString(&td->td_wrapmodes, va_arg(ap, char*));
- 		break;
- 	case TIFFTAG_PIXAR_FOVCOT:
- 		td->td_fovcot = (float) va_arg(ap, dblparam_t);
- 		break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN:
- 		_TIFFsetFloatArray(&td->td_matrixWorldToScreen,
- 			va_arg(ap, float*), 16);
- 		break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA:
- 		_TIFFsetFloatArray(&td->td_matrixWorldToCamera,
- 			va_arg(ap, float*), 16);
- 		break;
- 	/* End Pixar Tags */	       
-
-	case TIFFTAG_SUBIFD:
-		if ((tif->tif_flags & TIFF_INSUBIFD) == 0) {
-			td->td_nsubifd = (uint16) va_arg(ap, int);
-			_TIFFsetLongArray(&td->td_subifd, va_arg(ap, uint32*),
-			    (long) td->td_nsubifd);
-		} else {
-			TIFFError(module, "%s: Sorry, cannot nest SubIFDs",
-				  tif->tif_name);
-			status = 0;
-		}
-		break;
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-		_TIFFsetFloatArray(&td->td_ycbcrcoeffs, va_arg(ap, float*), 3);
-		break;
-	case TIFFTAG_YCBCRPOSITIONING:
-		td->td_ycbcrpositioning = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-		td->td_ycbcrsubsampling[0] = (uint16) va_arg(ap, int);
-		td->td_ycbcrsubsampling[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_WHITEPOINT:
-		_TIFFsetFloatArray(&td->td_whitepoint, va_arg(ap, float*), 2);
-		break;
-	case TIFFTAG_PRIMARYCHROMATICITIES:
-		_TIFFsetFloatArray(&td->td_primarychromas, va_arg(ap, float*), 6);
-		break;
-	case TIFFTAG_TRANSFERFUNCTION:
-		v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1;
-		for (i = 0; i < v; i++)
-			_TIFFsetShortArray(&td->td_transferfunction[i],
-			    va_arg(ap, uint16*), 1L<<td->td_bitspersample);
-		break;
-	case TIFFTAG_REFERENCEBLACKWHITE:
-		/* XXX should check for null range */
-		_TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6);
-		break;
-	case TIFFTAG_INKSET:
-		td->td_inkset = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_DOTRANGE:
-		/* XXX should check for null range */
-		td->td_dotrange[0] = (uint16) va_arg(ap, int);
-		td->td_dotrange[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_INKNAMES:
-		i = va_arg(ap, int);
-		s = va_arg(ap, char*);
-		i = checkInkNamesString(tif, i, s);
-                status = i > 0;
-		if( i > 0 ) {
-			_TIFFsetNString(&td->td_inknames, s, i);
-			td->td_inknameslen = i;
-		}
-		break;
-	case TIFFTAG_NUMBEROFINKS:
-		td->td_ninks = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_TARGETPRINTER:
-		_TIFFsetString(&td->td_targetprinter, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ICCPROFILE:
-		td->td_profileLength = (uint32) va_arg(ap, uint32);
-		_TIFFsetByteArray(&td->td_profileData, va_arg(ap, void*),
-		    td->td_profileLength);
-		break;
- 	case TIFFTAG_PHOTOSHOP:
-  		td->td_photoshopLength = (uint32) va_arg(ap, uint32);
-  		_TIFFsetByteArray (&td->td_photoshopData, va_arg(ap, void*),
- 			td->td_photoshopLength);
- 		break;
-	case TIFFTAG_RICHTIFFIPTC: 
-  		td->td_richtiffiptcLength = (uint32) va_arg(ap, uint32);
-  		_TIFFsetLongArray ((uint32**)&td->td_richtiffiptcData,
-				   va_arg(ap, uint32*),
-				   td->td_richtiffiptcLength);
- 		break;
-	case TIFFTAG_XMLPACKET:
-		td->td_xmlpacketLength = (uint32) va_arg(ap, uint32);
-		_TIFFsetByteArray(&td->td_xmlpacketData, va_arg(ap, void*),
-		    td->td_xmlpacketLength);
-		break;
-        default: {
-            const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-            TIFFTagValue *tv;
-            int           tv_size, iCustom;
-
-            /*
-             * This can happen if multiple images are open with
-             * different codecs which have private tags.  The
-             * global tag information table may then have tags
-             * that are valid for one file but not the other. 
-             * If the client tries to set a tag that is not valid
-             * for the image's codec then we'll arrive here.  This
-             * happens, for example, when tiffcp is used to convert
-             * between compression schemes and codec-specific tags
-             * are blindly copied.
-             */
-            if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
-            {
-		TIFFError(module,
-		    "%s: Invalid %stag \"%s\" (not supported by codec)",
-		    tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
-		    _TIFFFieldWithTag(tif, tag)->field_name);
-		status = 0;
-		break;
-            }
-
-            /*
-             * Find the existing entry for this custom value.
-             */
-            tv = NULL;
-            for( iCustom = 0; iCustom < td->td_customValueCount; iCustom++ )
-            {
-                if( td->td_customValues[iCustom].info == fip )
-                {
-                    tv = td->td_customValues + iCustom;
-                    if( tv->value != NULL )
-                        _TIFFfree( tv->value );
-                    break;
-                }
-            }
-
-            /*
-             * Grow the custom list if the entry was not found.
-             */
-            if( tv == NULL )
-            {
-                td->td_customValueCount++;
-                if( td->td_customValueCount > 1 )
-                    td->td_customValues = (TIFFTagValue *)
-                        _TIFFrealloc(td->td_customValues,
-                                     sizeof(TIFFTagValue) * td->td_customValueCount);
-                else
-                    td->td_customValues = (TIFFTagValue *)
-                        _TIFFmalloc(sizeof(TIFFTagValue));
-
-                tv = td->td_customValues + (td->td_customValueCount-1);
-                tv->info = fip;
-                tv->value = NULL;
-                tv->count = 0;
-            }
-
-            /*
-             * Set custom value ... save a copy of the custom tag value.
-             */
-            tv_size = TIFFDataWidth(fip->field_type);
-            if( fip->field_passcount )
-                tv->count = (int) va_arg(ap, int);
-            else
-                tv->count = 1;
-            if( fip->field_passcount )
-            {
-                tv->value = _TIFFmalloc(tv_size * tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                _TIFFmemcpy( tv->value, (void *) va_arg(ap,void*),
-                             tv->count * tv_size );
-            }
-            else if( fip->field_type == TIFF_ASCII )
-            {
-                const char *value = (const char *) va_arg(ap,const char *);
-                tv->count = strlen(value)+1;
-                tv->value = _TIFFmalloc(tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                strcpy( tv->value, value );
-            }
-            else
-            {
-                /* not supporting "pass by value" types yet */
-		TIFFWarning(module, " ... pass by value not implemented.");
-
-                tv->value = _TIFFmalloc(tv_size * tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                _TIFFmemset( tv->value, 0, tv->count * tv_size );
-                status = 0;
-            }
-          }
-	}
-	if (status) {
-            TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
-            tif->tif_flags |= TIFF_DIRTYDIRECT;
-	}
-	va_end(ap);
-	return (status);
-badvalue:
-	TIFFError(module, "%.1000s: Bad value %d for \"%s\"",
-		  tif->tif_name, v, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-badvalue32:
-	TIFFError(module, "%.1000s: Bad value %ld for \"%s\"",
-		   tif->tif_name, v32, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-badvaluedbl:
-	TIFFError(module, "%.1000s: Bad value %f for \"%s\"",
-		  tif->tif_name, d, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-}
-
-/*
- * Return 1/0 according to whether or not
- * it is permissible to set the tag's value.
- * Note that we allow ImageLength to be changed
- * so that we can append and extend to images.
- * Any other tag may not be altered once writing
- * has commenced, unless its value has no effect
- * on the format of the data that is written.
- */
-static int
-OkToChangeTag(TIFF* tif, ttag_t tag)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	if (!fip) {			/* unknown tag */
-		TIFFError("TIFFSetField", "%s: Unknown %stag %u",
-		    tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag);
-		return (0);
-	}
-	if (tag != TIFFTAG_IMAGELENGTH && (tif->tif_flags & TIFF_BEENWRITING) &&
-	    !fip->field_oktochange) {
-		/*
-		 * Consult info table to see if tag can be changed
-		 * after we've started writing.  We only allow changes
-		 * to those tags that don't/shouldn't affect the
-		 * compression and/or format of the data.
-		 */
-		TIFFError("TIFFSetField",
-		    "%s: Cannot modify tag \"%s\" while writing",
-		    tif->tif_name, fip->field_name);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Record the value of a field in the
- * internal directory structure.  The
- * field will be written to the file
- * when/if the directory structure is
- * updated.
- */
-int
-TIFFSetField(TIFF* tif, ttag_t tag, ...)
-{
-	va_list ap;
-	int status;
-
-	va_start(ap, tag);
-	status = TIFFVSetField(tif, tag, ap);
-	va_end(ap);
-	return (status);
-}
-
-/*
- * Like TIFFSetField, but taking a varargs
- * parameter list.  This routine is useful
- * for building higher-level interfaces on
- * top of the library.
- */
-int
-TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	return OkToChangeTag(tif, tag) ?
-	    (*tif->tif_tagmethods.vsetfield)(tif, tag, ap) : 0;
-}
-
-static int
-_TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    int            ret_val = 1;
-
-    switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-            *va_arg(ap, uint32*) = td->td_subfiletype;
-            break;
-	case TIFFTAG_IMAGEWIDTH:
-            *va_arg(ap, uint32*) = td->td_imagewidth;
-            break;
-	case TIFFTAG_IMAGELENGTH:
-            *va_arg(ap, uint32*) = td->td_imagelength;
-            break;
-	case TIFFTAG_BITSPERSAMPLE:
-            *va_arg(ap, uint16*) = td->td_bitspersample;
-            break;
-	case TIFFTAG_COMPRESSION:
-            *va_arg(ap, uint16*) = td->td_compression;
-            break;
-	case TIFFTAG_PHOTOMETRIC:
-            *va_arg(ap, uint16*) = td->td_photometric;
-            break;
-	case TIFFTAG_THRESHHOLDING:
-            *va_arg(ap, uint16*) = td->td_threshholding;
-            break;
-	case TIFFTAG_FILLORDER:
-            *va_arg(ap, uint16*) = td->td_fillorder;
-            break;
-	case TIFFTAG_DOCUMENTNAME:
-            *va_arg(ap, char**) = td->td_documentname;
-            break;
-	case TIFFTAG_ARTIST:
-            *va_arg(ap, char**) = td->td_artist;
-            break;
-	case TIFFTAG_DATETIME:
-            *va_arg(ap, char**) = td->td_datetime;
-            break;
-	case TIFFTAG_HOSTCOMPUTER:
-            *va_arg(ap, char**) = td->td_hostcomputer;
-            break;
-	case TIFFTAG_IMAGEDESCRIPTION:
-            *va_arg(ap, char**) = td->td_imagedescription;
-            break;
-	case TIFFTAG_MAKE:
-            *va_arg(ap, char**) = td->td_make;
-            break;
-	case TIFFTAG_MODEL:
-            *va_arg(ap, char**) = td->td_model;
-            break;
-	case TIFFTAG_COPYRIGHT:
-            *va_arg(ap, char**) = td->td_copyright;
-            break;
-	case TIFFTAG_ORIENTATION:
-            *va_arg(ap, uint16*) = td->td_orientation;
-            break;
-	case TIFFTAG_SAMPLESPERPIXEL:
-            *va_arg(ap, uint16*) = td->td_samplesperpixel;
-            break;
-	case TIFFTAG_ROWSPERSTRIP:
-            *va_arg(ap, uint32*) = td->td_rowsperstrip;
-            break;
-	case TIFFTAG_MINSAMPLEVALUE:
-            *va_arg(ap, uint16*) = td->td_minsamplevalue;
-            break;
-	case TIFFTAG_MAXSAMPLEVALUE:
-            *va_arg(ap, uint16*) = td->td_maxsamplevalue;
-            break;
-	case TIFFTAG_SMINSAMPLEVALUE:
-            *va_arg(ap, double*) = td->td_sminsamplevalue;
-            break;
-	case TIFFTAG_SMAXSAMPLEVALUE:
-            *va_arg(ap, double*) = td->td_smaxsamplevalue;
-            break;
-	case TIFFTAG_XRESOLUTION:
-            *va_arg(ap, float*) = td->td_xresolution;
-            break;
-	case TIFFTAG_YRESOLUTION:
-            *va_arg(ap, float*) = td->td_yresolution;
-            break;
-	case TIFFTAG_PLANARCONFIG:
-            *va_arg(ap, uint16*) = td->td_planarconfig;
-            break;
-	case TIFFTAG_XPOSITION:
-            *va_arg(ap, float*) = td->td_xposition;
-            break;
-	case TIFFTAG_YPOSITION:
-            *va_arg(ap, float*) = td->td_yposition;
-            break;
-	case TIFFTAG_PAGENAME:
-            *va_arg(ap, char**) = td->td_pagename;
-            break;
-	case TIFFTAG_RESOLUTIONUNIT:
-            *va_arg(ap, uint16*) = td->td_resolutionunit;
-            break;
-	case TIFFTAG_PAGENUMBER:
-            *va_arg(ap, uint16*) = td->td_pagenumber[0];
-            *va_arg(ap, uint16*) = td->td_pagenumber[1];
-            break;
-	case TIFFTAG_HALFTONEHINTS:
-            *va_arg(ap, uint16*) = td->td_halftonehints[0];
-            *va_arg(ap, uint16*) = td->td_halftonehints[1];
-            break;
-	case TIFFTAG_COLORMAP:
-            *va_arg(ap, uint16**) = td->td_colormap[0];
-            *va_arg(ap, uint16**) = td->td_colormap[1];
-            *va_arg(ap, uint16**) = td->td_colormap[2];
-            break;
-	case TIFFTAG_STRIPOFFSETS:
-	case TIFFTAG_TILEOFFSETS:
-            *va_arg(ap, uint32**) = td->td_stripoffset;
-            break;
-	case TIFFTAG_STRIPBYTECOUNTS:
-	case TIFFTAG_TILEBYTECOUNTS:
-            *va_arg(ap, uint32**) = td->td_stripbytecount;
-            break;
-	case TIFFTAG_MATTEING:
-            *va_arg(ap, uint16*) =
-                (td->td_extrasamples == 1 &&
-                 td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA);
-            break;
-	case TIFFTAG_EXTRASAMPLES:
-            *va_arg(ap, uint16*) = td->td_extrasamples;
-            *va_arg(ap, uint16**) = td->td_sampleinfo;
-            break;
-	case TIFFTAG_TILEWIDTH:
-            *va_arg(ap, uint32*) = td->td_tilewidth;
-            break;
-	case TIFFTAG_TILELENGTH:
-            *va_arg(ap, uint32*) = td->td_tilelength;
-            break;
-	case TIFFTAG_TILEDEPTH:
-            *va_arg(ap, uint32*) = td->td_tiledepth;
-            break;
-	case TIFFTAG_DATATYPE:
-            switch (td->td_sampleformat) {
-		case SAMPLEFORMAT_UINT:
-                    *va_arg(ap, uint16*) = DATATYPE_UINT;
-                    break;
-		case SAMPLEFORMAT_INT:
-                    *va_arg(ap, uint16*) = DATATYPE_INT;
-                    break;
-		case SAMPLEFORMAT_IEEEFP:
-                    *va_arg(ap, uint16*) = DATATYPE_IEEEFP;
-                    break;
-		case SAMPLEFORMAT_VOID:
-                    *va_arg(ap, uint16*) = DATATYPE_VOID;
-                    break;
-            }
-            break;
-	case TIFFTAG_SAMPLEFORMAT:
-            *va_arg(ap, uint16*) = td->td_sampleformat;
-            break;
-	case TIFFTAG_IMAGEDEPTH:
-            *va_arg(ap, uint32*) = td->td_imagedepth;
-            break;
-	case TIFFTAG_STONITS:
-            *va_arg(ap, double*) = td->td_stonits;
-            break;
-	case TIFFTAG_SUBIFD:
-            *va_arg(ap, uint16*) = td->td_nsubifd;
-            *va_arg(ap, uint32**) = td->td_subifd;
-            break;
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-            *va_arg(ap, float**) = td->td_ycbcrcoeffs;
-            break;
-	case TIFFTAG_YCBCRPOSITIONING:
-            *va_arg(ap, uint16*) = td->td_ycbcrpositioning;
-            break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-            *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[0];
-            *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1];
-            break;
-	case TIFFTAG_WHITEPOINT:
-            *va_arg(ap, float**) = td->td_whitepoint;
-            break;
-	case TIFFTAG_PRIMARYCHROMATICITIES:
-            *va_arg(ap, float**) = td->td_primarychromas;
-            break;
-	case TIFFTAG_TRANSFERFUNCTION:
-            *va_arg(ap, uint16**) = td->td_transferfunction[0];
-            if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-                *va_arg(ap, uint16**) = td->td_transferfunction[1];
-                *va_arg(ap, uint16**) = td->td_transferfunction[2];
-            }
-            break;
-	case TIFFTAG_REFERENCEBLACKWHITE:
-            *va_arg(ap, float**) = td->td_refblackwhite;
-            break;
-	case TIFFTAG_INKSET:
-            *va_arg(ap, uint16*) = td->td_inkset;
-            break;
-	case TIFFTAG_DOTRANGE:
-            *va_arg(ap, uint16*) = td->td_dotrange[0];
-            *va_arg(ap, uint16*) = td->td_dotrange[1];
-            break;
-	case TIFFTAG_INKNAMES:
-            *va_arg(ap, char**) = td->td_inknames;
-            break;
-	case TIFFTAG_NUMBEROFINKS:
-            *va_arg(ap, uint16*) = td->td_ninks;
-            break;
-	case TIFFTAG_TARGETPRINTER:
-            *va_arg(ap, char**) = td->td_targetprinter;
-            break;
-	case TIFFTAG_ICCPROFILE:
-            *va_arg(ap, uint32*) = td->td_profileLength;
-            *va_arg(ap, void**) = td->td_profileData;
-            break;
- 	case TIFFTAG_PHOTOSHOP:
-            *va_arg(ap, uint32*) = td->td_photoshopLength;
-            *va_arg(ap, void**) = td->td_photoshopData;
-            break;
- 	case TIFFTAG_RICHTIFFIPTC:
-            *va_arg(ap, uint32*) = td->td_richtiffiptcLength;
-            *va_arg(ap, void**) = td->td_richtiffiptcData;
-            break;
-	case TIFFTAG_XMLPACKET:
-            *va_arg(ap, uint32*) = td->td_xmlpacketLength;
-            *va_arg(ap, void**) = td->td_xmlpacketData;
-            break;
-            /* Begin Pixar Tags */
- 	case TIFFTAG_PIXAR_IMAGEFULLWIDTH:
-            *va_arg(ap, uint32*) = td->td_imagefullwidth;
-            break;
- 	case TIFFTAG_PIXAR_IMAGEFULLLENGTH:
-            *va_arg(ap, uint32*) = td->td_imagefulllength;
-            break;
- 	case TIFFTAG_PIXAR_TEXTUREFORMAT:
-            *va_arg(ap, char**) = td->td_textureformat;
-            break;
- 	case TIFFTAG_PIXAR_WRAPMODES:
-            *va_arg(ap, char**) = td->td_wrapmodes;
-            break;
- 	case TIFFTAG_PIXAR_FOVCOT:
-            *va_arg(ap, float*) = td->td_fovcot;
-            break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN:
-            *va_arg(ap, float**) = td->td_matrixWorldToScreen;
-            break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA:
-            *va_arg(ap, float**) = td->td_matrixWorldToCamera;
-            break;
-            /* End Pixar Tags */
-
-        default:
-        {
-            const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-            int           i;
-            
-            /*
-             * This can happen if multiple images are open with
-             * different codecs which have private tags.  The
-             * global tag information table may then have tags
-             * that are valid for one file but not the other. 
-             * If the client tries to get a tag that is not valid
-             * for the image's codec then we'll arrive here.
-             */
-            if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
-            {
-                TIFFError("_TIFFVGetField",
-                          "%s: Invalid %stag \"%s\" (not supported by codec)",
-                          tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
-                          _TIFFFieldWithTag(tif, tag)->field_name);
-                ret_val = 0;
-                break;
-            }
-
-            /*
-            ** Do we have a custom value?
-            */
-            ret_val = 0;
-            for( i = 0; i < td->td_customValueCount; i++ )
-            {
-                TIFFTagValue *tv = td->td_customValues + i;
-
-                if( tv->info->field_tag != tag )
-                    continue;
-                
-                if( fip->field_passcount )
-                {
-                    *va_arg(ap, u_short *) = (u_short) tv->count;
-                    *va_arg(ap, void **) = tv->value;
-                    ret_val = 1;
-                    break;
-                }
-                else if( fip->field_type == TIFF_ASCII )
-                {
-                    *va_arg(ap, void **) = tv->value;
-                    ret_val = 1;
-                    break;
-                }
-                else
-                {
-                    printf( "TIFFVGetField ... pass by value not imp.\n" );
-                    break;
-                }
-            }
-        }
-    }
-    return( ret_val );
-}
-
-/*
- * Return the value of a field in the
- * internal directory structure.
- */
-int
-TIFFGetField(TIFF* tif, ttag_t tag, ...)
-{
-	int status;
-	va_list ap;
-
-	va_start(ap, tag);
-	status = TIFFVGetField(tif, tag, ap);
-	va_end(ap);
-	return (status);
-}
-
-/*
- * Like TIFFGetField, but taking a varargs
- * parameter list.  This routine is useful
- * for building higher-level interfaces on
- * top of the library.
- */
-int
-TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit)) ?
-	    (*tif->tif_tagmethods.vgetfield)(tif, tag, ap) : 0);
-}
-
-#define	CleanupField(member) {		\
-    if (td->member) {			\
-	_TIFFfree(td->member);		\
-	td->member = 0;			\
-    }					\
-}
-
-/*
- * Release storage associated with a directory.
- */
-void
-TIFFFreeDirectory(TIFF* tif)
-{
-    TIFFDirectory *td = &tif->tif_dir;
-    int            i;
-
-    CleanupField(td_colormap[0]);
-    CleanupField(td_colormap[1]);
-    CleanupField(td_colormap[2]);
-    CleanupField(td_documentname);
-    CleanupField(td_artist);
-    CleanupField(td_datetime);
-    CleanupField(td_hostcomputer);
-    CleanupField(td_imagedescription);
-    CleanupField(td_make);
-    CleanupField(td_model);
-    CleanupField(td_copyright);
-    CleanupField(td_pagename);
-    CleanupField(td_sampleinfo);
-    CleanupField(td_subifd);
-    CleanupField(td_ycbcrcoeffs);
-    CleanupField(td_inknames);
-    CleanupField(td_targetprinter);
-    CleanupField(td_whitepoint);
-    CleanupField(td_primarychromas);
-    CleanupField(td_refblackwhite);
-    CleanupField(td_transferfunction[0]);
-    CleanupField(td_transferfunction[1]);
-    CleanupField(td_transferfunction[2]);
-    CleanupField(td_profileData);
-    CleanupField(td_photoshopData);
-    CleanupField(td_richtiffiptcData);
-    CleanupField(td_xmlpacketData);
-    CleanupField(td_stripoffset);
-    CleanupField(td_stripbytecount);
-    /* Begin Pixar Tags */
-    CleanupField(td_textureformat);
-    CleanupField(td_wrapmodes);
-    CleanupField(td_matrixWorldToScreen);
-    CleanupField(td_matrixWorldToCamera);
-    /* End Pixar Tags */
-
-    /* Cleanup custom tag values */
-    for( i = 0; i < td->td_customValueCount; i++ )
-        _TIFFfree( td->td_customValues[i].value );
-
-    if( td->td_customValues != NULL )
-        _TIFFfree( td->td_customValues );
-          
-}
-#undef CleanupField
-
-/*
- * Client Tag extension support (from Niles Ritter).
- */
-static TIFFExtendProc _TIFFextender = (TIFFExtendProc) NULL;
-
-TIFFExtendProc
-TIFFSetTagExtender(TIFFExtendProc extender)
-{
-	TIFFExtendProc prev = _TIFFextender;
-	_TIFFextender = extender;
-	return (prev);
-}
-
-/*
- * Setup for a new directory.  Should we automatically call
- * TIFFWriteDirectory() if the current one is dirty?
- *
- * The newly created directory will not exist on the file till
- * TIFFWriteDirectory(), TIFFFlush() or TIFFClose() is called.
- */
-int
-TIFFCreateDirectory(TIFF* tif)
-{
-    TIFFDefaultDirectory(tif);
-    tif->tif_diroff = 0;
-    tif->tif_nextdiroff = 0;
-    tif->tif_curoff = 0;
-    tif->tif_row = (uint32) -1;
-    tif->tif_curstrip = (tstrip_t) -1;
-
-    return 0;
-}
-
-/*
- * Setup a default directory structure.
- */
-int
-TIFFDefaultDirectory(TIFF* tif)
-{
-	register TIFFDirectory* td = &tif->tif_dir;
-
-	_TIFFSetupFieldInfo(tif);
-	_TIFFmemset(td, 0, sizeof (*td));
-	td->td_fillorder = FILLORDER_MSB2LSB;
-	td->td_bitspersample = 1;
-	td->td_threshholding = THRESHHOLD_BILEVEL;
-	td->td_orientation = ORIENTATION_TOPLEFT;
-	td->td_samplesperpixel = 1;
-	td->td_rowsperstrip = (uint32) -1;
-	td->td_tilewidth = (uint32) -1;
-	td->td_tilelength = (uint32) -1;
-	td->td_tiledepth = 1;
-	td->td_resolutionunit = RESUNIT_INCH;
-	td->td_sampleformat = SAMPLEFORMAT_UINT;
-	td->td_imagedepth = 1;
-	td->td_ycbcrsubsampling[0] = 2;
-	td->td_ycbcrsubsampling[1] = 2;
-	td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED;
-	td->td_inkset = INKSET_CMYK;
-	td->td_ninks = 4;
-	tif->tif_postdecode = _TIFFNoPostDecode;
-	tif->tif_tagmethods.vsetfield = _TIFFVSetField;
-	tif->tif_tagmethods.vgetfield = _TIFFVGetField;
-	tif->tif_tagmethods.printdir = NULL;
-	/*
-	 *  Give client code a chance to install their own
-	 *  tag extensions & methods, prior to compression overloads.
-	 */
-	if (_TIFFextender)
-		(*_TIFFextender)(tif);
-	(void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-	/*
-	 * NB: The directory is marked dirty as a result of setting
-	 * up the default compression scheme.  However, this really
-	 * isn't correct -- we want TIFF_DIRTYDIRECT to be set only
-	 * if the user does something.  We could just do the setup
-	 * by hand, but it seems better to use the normal mechanism
-	 * (i.e. TIFFSetField).
-	 */
-	tif->tif_flags &= ~TIFF_DIRTYDIRECT;
-
-        /*
-         * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19
-         * we clear the ISTILED flag when setting up a new directory.
-         * Should we also be clearing stuff like INSUBIFD?
-         */
-        tif->tif_flags &= ~TIFF_ISTILED;
-
-	return (1);
-}
-
-static int
-TIFFAdvanceDirectory(TIFF* tif, uint32* nextdir, toff_t* off)
-{
-    static const char module[] = "TIFFAdvanceDirectory";
-    uint16 dircount;
-    if (isMapped(tif))
-    {
-        toff_t poff=*nextdir;
-        if (poff+sizeof(uint16) > tif->tif_size)
-        {
-            TIFFError(module, "%s: Error fetching directory count",
-                      tif->tif_name);
-            return (0);
-        }
-        _TIFFmemcpy(&dircount, tif->tif_base+poff, sizeof (uint16));
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabShort(&dircount);
-        poff+=sizeof (uint16)+dircount*sizeof (TIFFDirEntry);
-        if (off != NULL)
-            *off = poff;
-        if (((toff_t) (poff+sizeof (uint32))) > tif->tif_size)
-        {
-            TIFFError(module, "%s: Error fetching directory link",
-                      tif->tif_name);
-            return (0);
-        }
-        _TIFFmemcpy(nextdir, tif->tif_base+poff, sizeof (uint32));
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabLong(nextdir);
-        return (1);
-    }
-    else
-    {
-        if (!SeekOK(tif, *nextdir) ||
-            !ReadOK(tif, &dircount, sizeof (uint16))) {
-            TIFFError(module, "%s: Error fetching directory count",
-                      tif->tif_name);
-            return (0);
-        }
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabShort(&dircount);
-        if (off != NULL)
-            *off = TIFFSeekFile(tif,
-                                dircount*sizeof (TIFFDirEntry), SEEK_CUR);
-        else
-            (void) TIFFSeekFile(tif,
-                                dircount*sizeof (TIFFDirEntry), SEEK_CUR);
-        if (!ReadOK(tif, nextdir, sizeof (uint32))) {
-            TIFFError(module, "%s: Error fetching directory link",
-                      tif->tif_name);
-            return (0);
-        }
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabLong(nextdir);
-        return (1);
-    }
-}
-
-/*
- * Count the number of directories in a file.
- */
-tdir_t
-TIFFNumberOfDirectories(TIFF* tif)
-{
-    toff_t nextdir = tif->tif_header.tiff_diroff;
-    tdir_t n = 0;
-    
-    while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
-        n++;
-    return (n);
-}
-
-/*
- * Set the n-th directory as the current directory.
- * NB: Directories are numbered starting at 0.
- */
-int
-TIFFSetDirectory(TIFF* tif, tdir_t dirn)
-{
-	toff_t nextdir;
-	tdir_t n;
-
-	nextdir = tif->tif_header.tiff_diroff;
-	for (n = dirn; n > 0 && nextdir != 0; n--)
-		if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
-			return (0);
-	tif->tif_nextdiroff = nextdir;
-	/*
-	 * Set curdir to the actual directory index.  The
-	 * -1 is because TIFFReadDirectory will increment
-	 * tif_curdir after successfully reading the directory.
-	 */
-	tif->tif_curdir = (dirn - n) - 1;
-	/*
-	 * Reset tif_dirnumber counter nad start new list of seen directories.
-	 * We need this in order to prevent IFD loops.
-	 */
-	tif->tif_dirnumber = 0;
-	return (TIFFReadDirectory(tif));
-}
-
-/*
- * Set the current directory to be the directory
- * located at the specified file offset.  This interface
- * is used mainly to access directories linked with
- * the SubIFD tag (e.g. thumbnail images).
- */
-int
-TIFFSetSubDirectory(TIFF* tif, uint32 diroff)
-{
-	tif->tif_nextdiroff = diroff;
-	/*
-	 * Reset tif_dirnumber counter nad start new list of seen directories.
-	 * We need this in order to prevent IFD loops.
-	 */
-	tif->tif_dirnumber = 0;
-	return (TIFFReadDirectory(tif));
-}
-
-/*
- * Return file offset of the current directory.
- */
-uint32
-TIFFCurrentDirOffset(TIFF* tif)
-{
-	return (tif->tif_diroff);
-}
-
-/*
- * Return an indication of whether or not we are
- * at the last directory in the file.
- */
-int
-TIFFLastDirectory(TIFF* tif)
-{
-	return (tif->tif_nextdiroff == 0);
-}
-
-/*
- * Unlink the specified directory from the directory chain.
- */
-int
-TIFFUnlinkDirectory(TIFF* tif, tdir_t dirn)
-{
-	static const char module[] = "TIFFUnlinkDirectory";
-	toff_t nextdir;
-	toff_t off;
-	tdir_t n;
-
-	if (tif->tif_mode == O_RDONLY) {
-		TIFFError(module, "Can not unlink directory in read-only file");
-		return (0);
-	}
-	/*
-	 * Go to the directory before the one we want
-	 * to unlink and nab the offset of the link
-	 * field we'll need to patch.
-	 */
-	nextdir = tif->tif_header.tiff_diroff;
-	off = sizeof (uint16) + sizeof (uint16);
-	for (n = dirn-1; n > 0; n--) {
-		if (nextdir == 0) {
-			TIFFError(module, "Directory %d does not exist", dirn);
-			return (0);
-		}
-		if (!TIFFAdvanceDirectory(tif, &nextdir, &off))
-			return (0);
-	}
-	/*
-	 * Advance to the directory to be unlinked and fetch
-	 * the offset of the directory that follows.
-	 */
-	if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
-		return (0);
-	/*
-	 * Go back and patch the link field of the preceding
-	 * directory to point to the offset of the directory
-	 * that follows.
-	 */
-	(void) TIFFSeekFile(tif, off, SEEK_SET);
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&nextdir);
-	if (!WriteOK(tif, &nextdir, sizeof (uint32))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-	/*
-	 * Leave directory state setup safely.  We don't have
-	 * facilities for doing inserting and removing directories,
-	 * so it's safest to just invalidate everything.  This
-	 * means that the caller can only append to the directory
-	 * chain.
-	 */
-	(*tif->tif_cleanup)(tif);
-	if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
-		_TIFFfree(tif->tif_rawdata);
-		tif->tif_rawdata = NULL;
-		tif->tif_rawcc = 0;
-	}
-	tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP|TIFF_POSTENCODE);
-	TIFFFreeDirectory(tif);
-	TIFFDefaultDirectory(tif);
-	tif->tif_diroff = 0;			/* force link on next write */
-	tif->tif_nextdiroff = 0;		/* next write must be at end */
-	tif->tif_curoff = 0;
-	tif->tif_row = (uint32) -1;
-	tif->tif_curstrip = (tstrip_t) -1;
-	return (1);
-}
-
-/*			[BFC]
- *
- * Author: Bruce Cameron <cameron at petris.com>
- *
- * Set a table of tags that are to be replaced during directory process by the
- * 'IGNORE' state - or return TRUE/FALSE for the requested tag such that
- * 'ReadDirectory' can use the stored information.
- */
-int
-TIFFReassignTagToIgnore (enum TIFFIgnoreSense task, int TIFFtagID)
-{
-    static int TIFFignoretags [FIELD_LAST];
-    static int tagcount = 0 ;
-    int		i;					/* Loop index */
-    int		j;					/* Loop index */
-
-    switch (task)
-    {
-      case TIS_STORE:
-        if ( tagcount < (FIELD_LAST - 1) )
-        {
-            for ( j = 0 ; j < tagcount ; ++j )
-            {					/* Do not add duplicate tag */
-                if ( TIFFignoretags [j] == TIFFtagID )
-                    return (TRUE) ;
-            }
-            TIFFignoretags [tagcount++] = TIFFtagID ;
-            return (TRUE) ;
-        }
-        break ;
-        
-      case TIS_EXTRACT:
-        for ( i = 0 ; i < tagcount ; ++i )
-        {
-            if ( TIFFignoretags [i] == TIFFtagID )
-                return (TRUE) ;
-        }
-        break;
-        
-      case TIS_EMPTY:
-        tagcount = 0 ;			/* Clear the list */
-        return (TRUE) ;
-        
-      default:
-        break;
-    }
-    
-    return (FALSE);
-}
-
diff --git a/tkimg1.3/libtiff/libtiff/tif_dir.h b/tkimg1.3/libtiff/libtiff/tif_dir.h
deleted file mode 100644
index d2a5ae1..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dir.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dir.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFDIR_
-#define	_TIFFDIR_
-/*
- * ``Library-private'' Directory-related Definitions.
- */
-
-/*
- * Internal format of a TIFF directory entry.
- */
-typedef	struct {
-#define	FIELD_SETLONGS	4
-	/* bit vector of fields that are set */
-	u_long	td_fieldsset[FIELD_SETLONGS];
-
-	uint32	td_imagewidth, td_imagelength, td_imagedepth;
-	uint32	td_tilewidth, td_tilelength, td_tiledepth;
-	uint32	td_subfiletype;
-	uint16	td_bitspersample;
-	uint16	td_sampleformat;
-	uint16	td_compression;
-	uint16	td_photometric;
-	uint16	td_threshholding;
-	uint16	td_fillorder;
-	uint16	td_orientation;
-	uint16	td_samplesperpixel;
-	uint32	td_rowsperstrip;
-	uint16	td_minsamplevalue, td_maxsamplevalue;
-	double	td_sminsamplevalue, td_smaxsamplevalue;
-	float	td_xresolution, td_yresolution;
-	uint16	td_resolutionunit;
-	uint16	td_planarconfig;
-	float	td_xposition, td_yposition;
-	uint16	td_pagenumber[2];
-	uint16*	td_colormap[3];
-	uint16	td_halftonehints[2];
-	uint16	td_extrasamples;
-	uint16*	td_sampleinfo;
-	double	td_stonits;
-	char*	td_documentname;
-	char*	td_artist;
-	char*	td_datetime;
-	char*	td_hostcomputer;
-	char*	td_imagedescription;
-	char*	td_make;
-	char*	td_model;
-        char*   td_copyright;
-	char*	td_pagename;
-	tstrip_t td_stripsperimage;
-	tstrip_t td_nstrips;		/* size of offset & bytecount arrays */
-	uint32*	td_stripoffset;
-	uint32*	td_stripbytecount;
-#if SUBIFD_SUPPORT
-	uint16	td_nsubifd;
-	uint32*	td_subifd;
-#endif
-#ifdef YCBCR_SUPPORT
-	float*	td_ycbcrcoeffs;
-	uint16	td_ycbcrsubsampling[2];
-	uint16	td_ycbcrpositioning;
-#endif
-#ifdef COLORIMETRY_SUPPORT
-	float*	td_whitepoint;
-	float*	td_primarychromas;
-	float*	td_refblackwhite;
-	uint16*	td_transferfunction[3];
-#endif
-#ifdef CMYK_SUPPORT
-	uint16	td_inkset;
-	uint16	td_ninks;
-	uint16	td_dotrange[2];
-	int	td_inknameslen;
-	char*	td_inknames;
-	char*	td_targetprinter;
-#endif
-#ifdef ICC_SUPPORT
-	uint32	td_profileLength;
-	void	*td_profileData;
-#endif
-#ifdef PHOTOSHOP_SUPPORT
-	uint32	td_photoshopLength;
-	void	*td_photoshopData;
-#endif
-#ifdef IPTC_SUPPORT
-	uint32	td_richtiffiptcLength;
-	void	*td_richtiffiptcData;
-#endif
-        /* Begin Pixar Tag values. */
-        uint32	td_imagefullwidth, td_imagefulllength;
- 	char*	td_textureformat;
- 	char*	td_wrapmodes;
- 	float	td_fovcot;
- 	float*	td_matrixWorldToScreen;
- 	float*	td_matrixWorldToCamera;
- 	/* End Pixar Tag Values. */
-	uint32	td_xmlpacketLength;
-	void	*td_xmlpacketData;
-		int     td_customValueCount;
-        TIFFTagValue *td_customValues;
-} TIFFDirectory;
-
-/*
- * Field flags used to indicate fields that have
- * been set in a directory, and to reference fields
- * when manipulating a directory.
- */
-
-/*
- * FIELD_IGNORE is used to signify tags that are to
- * be processed but otherwise ignored.  This permits
- * antiquated tags to be quietly read and discarded.
- * Note that a bit *is* allocated for ignored tags;
- * this is understood by the directory reading logic
- * which uses this fact to avoid special-case handling
- */ 
-#define	FIELD_IGNORE			0
-
-/* multi-item fields */
-#define	FIELD_IMAGEDIMENSIONS		1
-#define FIELD_TILEDIMENSIONS		2
-#define	FIELD_RESOLUTION		3
-#define	FIELD_POSITION			4
-
-/* single-item fields */
-#define	FIELD_SUBFILETYPE		5
-#define	FIELD_BITSPERSAMPLE		6
-#define	FIELD_COMPRESSION		7
-#define	FIELD_PHOTOMETRIC		8
-#define	FIELD_THRESHHOLDING		9
-#define	FIELD_FILLORDER			10
-#define	FIELD_DOCUMENTNAME		11
-#define	FIELD_IMAGEDESCRIPTION		12
-#define	FIELD_MAKE			13
-#define	FIELD_MODEL			14
-#define	FIELD_ORIENTATION		15
-#define	FIELD_SAMPLESPERPIXEL		16
-#define	FIELD_ROWSPERSTRIP		17
-#define	FIELD_MINSAMPLEVALUE		18
-#define	FIELD_MAXSAMPLEVALUE		19
-#define	FIELD_PLANARCONFIG		20
-#define	FIELD_PAGENAME			21
-#define	FIELD_RESOLUTIONUNIT		22
-#define	FIELD_PAGENUMBER		23
-#define	FIELD_STRIPBYTECOUNTS		24
-#define	FIELD_STRIPOFFSETS		25
-#define	FIELD_COLORMAP			26
-#define FIELD_ARTIST			27
-#define FIELD_DATETIME			28
-#define FIELD_HOSTCOMPUTER		29
-/* unused - was FIELD_SOFTWARE          30 */
-#define	FIELD_EXTRASAMPLES		31
-#define FIELD_SAMPLEFORMAT		32
-#define	FIELD_SMINSAMPLEVALUE		33
-#define	FIELD_SMAXSAMPLEVALUE		34
-#define FIELD_IMAGEDEPTH		35
-#define FIELD_TILEDEPTH			36
-#define	FIELD_HALFTONEHINTS		37
-#define FIELD_YCBCRCOEFFICIENTS		38
-#define FIELD_YCBCRSUBSAMPLING		39
-#define FIELD_YCBCRPOSITIONING		40
-#define	FIELD_REFBLACKWHITE		41
-#define	FIELD_WHITEPOINT		42
-#define	FIELD_PRIMARYCHROMAS		43
-#define	FIELD_TRANSFERFUNCTION		44
-#define	FIELD_INKSET			45
-#define	FIELD_INKNAMES			46
-#define	FIELD_DOTRANGE			47
-#define	FIELD_TARGETPRINTER		48
-#define	FIELD_SUBIFD			49
-#define	FIELD_NUMBEROFINKS		50
-#define FIELD_ICCPROFILE		51
-#define FIELD_PHOTOSHOP			52
-#define FIELD_RICHTIFFIPTC		53
-#define FIELD_STONITS			54
-/* Begin PIXAR */
-#define	FIELD_IMAGEFULLWIDTH		55
-#define	FIELD_IMAGEFULLLENGTH		56
-#define FIELD_TEXTUREFORMAT		57
-#define FIELD_WRAPMODES			58
-#define FIELD_FOVCOT			59
-#define FIELD_MATRIX_WORLDTOSCREEN	60
-#define FIELD_MATRIX_WORLDTOCAMERA	61
-#define FIELD_COPYRIGHT			62
-#define FIELD_XMLPACKET			63
-/*      FIELD_CUSTOM (see tiffio.h)     65 */
-/* end of support for well-known tags; codec-private tags follow */
-#define	FIELD_CODEC			66	/* base of codec-private tags */
-
-
-/*
- * Pseudo-tags don't normally need field bits since they
- * are not written to an output file (by definition).
- * The library also has express logic to always query a
- * codec for a pseudo-tag so allocating a field bit for
- * one is a waste.   If codec wants to promote the notion
- * of a pseudo-tag being ``set'' or ``unset'' then it can
- * do using internal state flags without polluting the
- * field bit space defined for real tags.
- */
-#define	FIELD_PSEUDO			0
-
-#define	FIELD_LAST			(32*FIELD_SETLONGS-1)
-
-#define	TIFFExtractData(tif, type, v) \
-    ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \
-        ((v) >> (tif)->tif_typeshift[type]) & (tif)->tif_typemask[type] : \
-	(v) & (tif)->tif_typemask[type]))
-#define	TIFFInsertData(tif, type, v) \
-    ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \
-        ((v) & (tif)->tif_typemask[type]) << (tif)->tif_typeshift[type] : \
-	(v) & (tif)->tif_typemask[type]))
-
-
-#define BITn(n)				(((u_long)1L)<<((n)&0x1f)) 
-#define BITFIELDn(tif, n)		((tif)->tif_dir.td_fieldsset[(n)/32]) 
-#define TIFFFieldSet(tif, field)	(BITFIELDn(tif, field) & BITn(field)) 
-#define TIFFSetFieldBit(tif, field)	(BITFIELDn(tif, field) |= BITn(field))
-#define TIFFClrFieldBit(tif, field)	(BITFIELDn(tif, field) &= ~BITn(field))
-
-#define	FieldSet(fields, f)		(fields[(f)/32] & BITn(f))
-#define	ResetFieldBit(fields, f)	(fields[(f)/32] &= ~BITn(f))
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	void _TIFFSetupFieldInfo(TIFF*);
-extern	void _TIFFPrintFieldInfo(TIFF*, FILE*);
-extern	TIFFDataType _TIFFSampleToTagType(TIFF*);
-extern  const TIFFFieldInfo* _TIFFFindOrRegisterFieldInfo( TIFF *tif,
-							   ttag_t tag,
-							   TIFFDataType dt );
-extern  TIFFFieldInfo* _TIFFCreateAnonFieldInfo( TIFF *tif, ttag_t tag,
-                                                 TIFFDataType dt );
-
-#define _TIFFMergeFieldInfo TIFFMergeFieldInfo
-#define _TIFFFindFieldInfo  TIFFFindFieldInfo
-#define _TIFFFieldWithTag   TIFFFieldWithTag
-    
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFDIR_ */
diff --git a/tkimg1.3/libtiff/libtiff/tif_dirinfo.c b/tkimg1.3/libtiff/libtiff/tif_dirinfo.c
deleted file mode 100644
index 532ac0e..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dirinfo.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dirinfo.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Core Directory Tag Support.
- */
-#include "tiffiop.h"
-#include <stdlib.h>
-
-/*
- * NB: NB: THIS ARRAY IS ASSUMED TO BE SORTED BY TAG.
- *     If a tag can have both LONG and SHORT types
- *     then the LONG must be placed before the SHORT for
- *     writing to work properly.
- *
- * NOTE: The second field (field_readcount) and third field (field_writecount)
- *       sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3)
- *       and TIFFTAG_SPP (-2). The macros should be used but would throw off 
- *       the formatting of the code, so please interprete the -1, -2 and -3 
- *       values accordingly.
- */
-#ifndef VMS
-static 
-#endif
-const TIFFFieldInfo tiffFieldInfo[] = {
-    { TIFFTAG_SUBFILETYPE,	 1, 1, TIFF_LONG,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"SubfileType" },
-/* XXX SHORT for compatibility w/ old versions of the library */
-    { TIFFTAG_SUBFILETYPE,	 1, 1, TIFF_SHORT,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"SubfileType" },
-    { TIFFTAG_OSUBFILETYPE,	 1, 1, TIFF_SHORT,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"OldSubfileType" },
-    { TIFFTAG_IMAGEWIDTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDIMENSIONS,
-      FALSE,	FALSE,	"ImageWidth" },
-    { TIFFTAG_IMAGEWIDTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDIMENSIONS,
-      FALSE,	FALSE,	"ImageWidth" },
-    { TIFFTAG_IMAGELENGTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDIMENSIONS,
-      TRUE,	FALSE,	"ImageLength" },
-    { TIFFTAG_IMAGELENGTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDIMENSIONS,
-      TRUE,	FALSE,	"ImageLength" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_BITSPERSAMPLE,	-1,-1, TIFF_LONG,	FIELD_BITSPERSAMPLE,
-      FALSE,	FALSE,	"BitsPerSample" },
-    { TIFFTAG_BITSPERSAMPLE,	-1,-1, TIFF_SHORT,	FIELD_BITSPERSAMPLE,
-      FALSE,	FALSE,	"BitsPerSample" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_COMPRESSION,	-1, 1, TIFF_LONG,	FIELD_COMPRESSION,
-      FALSE,	FALSE,	"Compression" },
-    { TIFFTAG_COMPRESSION,	-1, 1, TIFF_SHORT,	FIELD_COMPRESSION,
-      FALSE,	FALSE,	"Compression" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_PHOTOMETRIC,	 1, 1, TIFF_LONG,	FIELD_PHOTOMETRIC,
-      FALSE,	FALSE,	"PhotometricInterpretation" },
-    { TIFFTAG_PHOTOMETRIC,	 1, 1, TIFF_SHORT,	FIELD_PHOTOMETRIC,
-      FALSE,	FALSE,	"PhotometricInterpretation" },
-    { TIFFTAG_THRESHHOLDING,	 1, 1, TIFF_SHORT,	FIELD_THRESHHOLDING,
-      TRUE,	FALSE,	"Threshholding" },
-    { TIFFTAG_CELLWIDTH,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"CellWidth" },
-    { TIFFTAG_CELLLENGTH,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"CellLength" },
-    { TIFFTAG_FILLORDER,	 1, 1, TIFF_SHORT,	FIELD_FILLORDER,
-      FALSE,	FALSE,	"FillOrder" },
-    { TIFFTAG_DOCUMENTNAME,	-1,-1, TIFF_ASCII,	FIELD_DOCUMENTNAME,
-      TRUE,	FALSE,	"DocumentName" },
-    { TIFFTAG_IMAGEDESCRIPTION,	-1,-1, TIFF_ASCII,	FIELD_IMAGEDESCRIPTION,
-      TRUE,	FALSE,	"ImageDescription" },
-    { TIFFTAG_MAKE,		-1,-1, TIFF_ASCII,	FIELD_MAKE,
-      TRUE,	FALSE,	"Make" },
-    { TIFFTAG_MODEL,		-1,-1, TIFF_ASCII,	FIELD_MODEL,
-      TRUE,	FALSE,	"Model" },
-    { TIFFTAG_STRIPOFFSETS,	-1,-1, TIFF_LONG,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"StripOffsets" },
-    { TIFFTAG_STRIPOFFSETS,	-1,-1, TIFF_SHORT,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"StripOffsets" },
-    { TIFFTAG_ORIENTATION,	 1, 1, TIFF_SHORT,	FIELD_ORIENTATION,
-      FALSE,	FALSE,	"Orientation" },
-    { TIFFTAG_SAMPLESPERPIXEL,	 1, 1, TIFF_SHORT,	FIELD_SAMPLESPERPIXEL,
-      FALSE,	FALSE,	"SamplesPerPixel" },
-    { TIFFTAG_ROWSPERSTRIP,	 1, 1, TIFF_LONG,	FIELD_ROWSPERSTRIP,
-      FALSE,	FALSE,	"RowsPerStrip" },
-    { TIFFTAG_ROWSPERSTRIP,	 1, 1, TIFF_SHORT,	FIELD_ROWSPERSTRIP,
-      FALSE,	FALSE,	"RowsPerStrip" },
-    { TIFFTAG_STRIPBYTECOUNTS,	-1,-1, TIFF_LONG,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"StripByteCounts" },
-    { TIFFTAG_STRIPBYTECOUNTS,	-1,-1, TIFF_SHORT,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"StripByteCounts" },
-    { TIFFTAG_MINSAMPLEVALUE,	-2,-1, TIFF_SHORT,	FIELD_MINSAMPLEVALUE,
-      TRUE,	FALSE,	"MinSampleValue" },
-    { TIFFTAG_MAXSAMPLEVALUE,	-2,-1, TIFF_SHORT,	FIELD_MAXSAMPLEVALUE,
-      TRUE,	FALSE,	"MaxSampleValue" },
-    { TIFFTAG_XRESOLUTION,	 1, 1, TIFF_RATIONAL,	FIELD_RESOLUTION,
-      FALSE,	FALSE,	"XResolution" },
-    { TIFFTAG_YRESOLUTION,	 1, 1, TIFF_RATIONAL,	FIELD_RESOLUTION,
-      FALSE,	FALSE,	"YResolution" },
-    { TIFFTAG_PLANARCONFIG,	 1, 1, TIFF_SHORT,	FIELD_PLANARCONFIG,
-      FALSE,	FALSE,	"PlanarConfiguration" },
-    { TIFFTAG_PAGENAME,		-1,-1, TIFF_ASCII,	FIELD_PAGENAME,
-      TRUE,	FALSE,	"PageName" },
-    { TIFFTAG_XPOSITION,	 1, 1, TIFF_RATIONAL,	FIELD_POSITION,
-      TRUE,	FALSE,	"XPosition" },
-    { TIFFTAG_YPOSITION,	 1, 1, TIFF_RATIONAL,	FIELD_POSITION,
-      TRUE,	FALSE,	"YPosition" },
-    { TIFFTAG_FREEOFFSETS,	-1,-1, TIFF_LONG,	FIELD_IGNORE,
-      FALSE,	FALSE,	"FreeOffsets" },
-    { TIFFTAG_FREEBYTECOUNTS,	-1,-1, TIFF_LONG,	FIELD_IGNORE,
-      FALSE,	FALSE,	"FreeByteCounts" },
-    { TIFFTAG_GRAYRESPONSEUNIT,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"GrayResponseUnit" },
-    { TIFFTAG_GRAYRESPONSECURVE,-1,-1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"GrayResponseCurve" },
-    { TIFFTAG_RESOLUTIONUNIT,	 1, 1, TIFF_SHORT,	FIELD_RESOLUTIONUNIT,
-      FALSE,	FALSE,	"ResolutionUnit" },
-    { TIFFTAG_PAGENUMBER,	 2, 2, TIFF_SHORT,	FIELD_PAGENUMBER,
-      TRUE,	FALSE,	"PageNumber" },
-    { TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"ColorResponseUnit" },
-    { TIFFTAG_TRANSFERFUNCTION,	-1,-1, TIFF_SHORT,	FIELD_TRANSFERFUNCTION,
-      TRUE,	FALSE,	"TransferFunction" },
-    { TIFFTAG_SOFTWARE,		-1,-1, TIFF_ASCII,	FIELD_CUSTOM,
-      TRUE,	FALSE,	"Software" },
-    { TIFFTAG_DATETIME,		20,20, TIFF_ASCII,	FIELD_DATETIME,
-      TRUE,	FALSE,	"DateTime" },
-    { TIFFTAG_ARTIST,		-1,-1, TIFF_ASCII,	FIELD_ARTIST,
-      TRUE,	FALSE,	"Artist" },
-    { TIFFTAG_HOSTCOMPUTER,	-1,-1, TIFF_ASCII,	FIELD_HOSTCOMPUTER,
-      TRUE,	FALSE,	"HostComputer" },
-    { TIFFTAG_WHITEPOINT,	 2, 2, TIFF_RATIONAL,FIELD_WHITEPOINT,
-      TRUE,	FALSE,	"WhitePoint" },
-    { TIFFTAG_PRIMARYCHROMATICITIES,6,6,TIFF_RATIONAL,FIELD_PRIMARYCHROMAS,
-      TRUE,	FALSE,	"PrimaryChromaticities" },
-    { TIFFTAG_COLORMAP,		-1,-1, TIFF_SHORT,	FIELD_COLORMAP,
-      TRUE,	FALSE,	"ColorMap" },
-    { TIFFTAG_HALFTONEHINTS,	 2, 2, TIFF_SHORT,	FIELD_HALFTONEHINTS,
-      TRUE,	FALSE,	"HalftoneHints" },
-    { TIFFTAG_TILEWIDTH,	 1, 1, TIFF_LONG,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileWidth" },
-    { TIFFTAG_TILEWIDTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileWidth" },
-    { TIFFTAG_TILELENGTH,	 1, 1, TIFF_LONG,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileLength" },
-    { TIFFTAG_TILELENGTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileLength" },
-    { TIFFTAG_TILEOFFSETS,	-1, 1, TIFF_LONG,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"TileOffsets" },
-    { TIFFTAG_TILEBYTECOUNTS,	-1, 1, TIFF_LONG,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"TileByteCounts" },
-    { TIFFTAG_TILEBYTECOUNTS,	-1, 1, TIFF_SHORT,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"TileByteCounts" },
-    { TIFFTAG_SUBIFD,		-1,-1, TIFF_LONG,	FIELD_SUBIFD,
-      TRUE,	TRUE,	"SubIFD" },
-    { TIFFTAG_INKSET,		 1, 1, TIFF_SHORT,	FIELD_INKSET,
-      FALSE,	FALSE,	"InkSet" },
-    { TIFFTAG_INKNAMES,		-1,-1, TIFF_ASCII,	FIELD_INKNAMES,
-      TRUE,	TRUE,	"InkNames" },
-    { TIFFTAG_NUMBEROFINKS,	 1, 1, TIFF_SHORT,	FIELD_NUMBEROFINKS,
-      TRUE,	FALSE,	"NumberOfInks" },
-    { TIFFTAG_DOTRANGE,		 2, 2, TIFF_SHORT,	FIELD_DOTRANGE,
-      FALSE,	FALSE,	"DotRange" },
-    { TIFFTAG_DOTRANGE,		 2, 2, TIFF_BYTE,	FIELD_DOTRANGE,
-      FALSE,	FALSE,	"DotRange" },
-    { TIFFTAG_TARGETPRINTER,	-1,-1, TIFF_ASCII,	FIELD_TARGETPRINTER,
-      TRUE,	FALSE,	"TargetPrinter" },
-    { TIFFTAG_EXTRASAMPLES,	-1,-1, TIFF_SHORT,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"ExtraSamples" },
-/* XXX for bogus Adobe Photoshop v2.5 files */
-    { TIFFTAG_EXTRASAMPLES,	-1,-1, TIFF_BYTE,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"ExtraSamples" },
-    { TIFFTAG_SAMPLEFORMAT,	-1,-1, TIFF_SHORT,	FIELD_SAMPLEFORMAT,
-      FALSE,	FALSE,	"SampleFormat" },
-    { TIFFTAG_SMINSAMPLEVALUE,	-2,-1, TIFF_ANY,	FIELD_SMINSAMPLEVALUE,
-      TRUE,	FALSE,	"SMinSampleValue" },
-    { TIFFTAG_SMAXSAMPLEVALUE,	-2,-1, TIFF_ANY,	FIELD_SMAXSAMPLEVALUE,
-      TRUE,	FALSE,	"SMaxSampleValue" },
-    { TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL,	FIELD_YCBCRCOEFFICIENTS,
-      FALSE,	FALSE,	"YCbCrCoefficients" },
-    { TIFFTAG_YCBCRSUBSAMPLING,	 2, 2, TIFF_SHORT,	FIELD_YCBCRSUBSAMPLING,
-      FALSE,	FALSE,	"YCbCrSubsampling" },
-    { TIFFTAG_YCBCRPOSITIONING,	 1, 1, TIFF_SHORT,	FIELD_YCBCRPOSITIONING,
-      FALSE,	FALSE,	"YCbCrPositioning" },
-    { TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_RATIONAL,	FIELD_REFBLACKWHITE,
-      TRUE,	FALSE,	"ReferenceBlackWhite" },
-/* XXX temporarily accept LONG for backwards compatibility */
-    { TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG,	FIELD_REFBLACKWHITE,
-      TRUE,	FALSE,	"ReferenceBlackWhite" },
-    { TIFFTAG_XMLPACKET,	-1,-3, TIFF_UNDEFINED,	FIELD_XMLPACKET,
-      FALSE,	TRUE,	"XMLPacket" },
-/* begin SGI tags */
-    { TIFFTAG_MATTEING,		 1, 1, TIFF_SHORT,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"Matteing" },
-    { TIFFTAG_DATATYPE,		-2,-1, TIFF_SHORT,	FIELD_SAMPLEFORMAT,
-      FALSE,	FALSE,	"DataType" },
-    { TIFFTAG_IMAGEDEPTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDEPTH,
-      FALSE,	FALSE,	"ImageDepth" },
-    { TIFFTAG_IMAGEDEPTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDEPTH,
-      FALSE,	FALSE,	"ImageDepth" },
-    { TIFFTAG_TILEDEPTH,	 1, 1, TIFF_LONG,	FIELD_TILEDEPTH,
-      FALSE,	FALSE,	"TileDepth" },
-    { TIFFTAG_TILEDEPTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDEPTH,
-      FALSE,	FALSE,	"TileDepth" },
-/* end SGI tags */
-/* begin Pixar tags */
-    { TIFFTAG_PIXAR_IMAGEFULLWIDTH,  1, 1, TIFF_LONG,	FIELD_IMAGEFULLWIDTH,
-      TRUE,	FALSE,	"ImageFullWidth" },
-    { TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG,	FIELD_IMAGEFULLLENGTH,
-      TRUE,	FALSE,	"ImageFullLength" },
-    { TIFFTAG_PIXAR_TEXTUREFORMAT,  -1,-1, TIFF_ASCII,	FIELD_TEXTUREFORMAT,
-      TRUE,	FALSE,	"TextureFormat" },
-    { TIFFTAG_PIXAR_WRAPMODES,	    -1,-1, TIFF_ASCII,	FIELD_WRAPMODES,
-      TRUE,	FALSE,	"TextureWrapModes" },
-    { TIFFTAG_PIXAR_FOVCOT,	     1, 1, TIFF_FLOAT,	FIELD_FOVCOT,
-      TRUE,	FALSE,	"FieldOfViewCotan" },
-    { TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN,	16,16,	TIFF_FLOAT,
-      FIELD_MATRIX_WORLDTOSCREEN,	TRUE,	FALSE,	"MatrixWorldToScreen" },
-    { TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA,	16,16,	TIFF_FLOAT,
-       FIELD_MATRIX_WORLDTOCAMERA,	TRUE,	FALSE,	"MatrixWorldToCamera" },
-    { TIFFTAG_COPYRIGHT,	-1,-1, TIFF_ASCII,	FIELD_COPYRIGHT,
-      TRUE,	FALSE,	"Copyright" },
-/* end Pixar tags */
-#ifdef IPTC_SUPPORT
-#ifdef PHOTOSHOP_SUPPORT
-    { TIFFTAG_RICHTIFFIPTC, -1,-1, TIFF_LONG,   FIELD_RICHTIFFIPTC, 
-      FALSE,    TRUE,   "RichTIFFIPTC" },
-#else
-    { TIFFTAG_RICHTIFFIPTC, -1,-3, TIFF_UNDEFINED, FIELD_RICHTIFFIPTC, 
-      FALSE,    TRUE,   "RichTIFFIPTC" },
-#endif
-#endif
-    { TIFFTAG_PHOTOSHOP,    -1,-3, TIFF_BYTE,   FIELD_PHOTOSHOP, 
-      FALSE,    TRUE,   "Photoshop" },
-    { TIFFTAG_ICCPROFILE,	-1,-3, TIFF_UNDEFINED,	FIELD_ICCPROFILE,
-      FALSE,	TRUE,	"ICC Profile" },
-    { TIFFTAG_STONITS,		 1, 1, TIFF_DOUBLE,	FIELD_STONITS,
-      FALSE,	FALSE,	"StoNits" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-void
-_TIFFSetupFieldInfo(TIFF* tif)
-{
-	if (tif->tif_fieldinfo) {
-		int  i;
-
-		for (i = 0; i < tif->tif_nfields; i++) 
-		{
-			TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
-			if (fld->field_bit == FIELD_CUSTOM && 
-				strncmp("Tag ", fld->field_name, 4) == 0) 
-				{
-				_TIFFfree(fld->field_name);
-				_TIFFfree(fld);
-				}
-		}   
-      
-		_TIFFfree(tif->tif_fieldinfo);
-		tif->tif_nfields = 0;
-	}
-	_TIFFMergeFieldInfo(tif, tiffFieldInfo, N(tiffFieldInfo));
-}
-
-static int
-tagCompare(const void* a, const void* b)
-{
-	const TIFFFieldInfo* ta = *(const TIFFFieldInfo**) a;
-	const TIFFFieldInfo* tb = *(const TIFFFieldInfo**) b;
-	/* NB: be careful of return values for 16-bit platforms */
-	if (ta->field_tag != tb->field_tag)
-		return (ta->field_tag < tb->field_tag ? -1 : 1);
-	else
-		return ((int)tb->field_type - (int)ta->field_type);
-}
-
-void
-_TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
-{
-	TIFFFieldInfo** tp;
-	int i;
-
-	if (tif->tif_nfields > 0) {
-		tif->tif_fieldinfo = (TIFFFieldInfo**)
-		    _TIFFrealloc(tif->tif_fieldinfo,
-			(tif->tif_nfields+n) * sizeof (TIFFFieldInfo*));
-	} else {
-		tif->tif_fieldinfo = (TIFFFieldInfo**)
-		    _TIFFmalloc(n * sizeof (TIFFFieldInfo*));
-	}
-	tp = &tif->tif_fieldinfo[tif->tif_nfields];
-	for (i = 0; i < n; i++)
-		tp[i] = (TIFFFieldInfo*) &info[i];	/* XXX */
-
-        /* Sort the field info by tag number */
-        qsort(tif->tif_fieldinfo, (size_t) (tif->tif_nfields += n),
-              sizeof (TIFFFieldInfo*), tagCompare);
-}
-
-void
-_TIFFPrintFieldInfo(TIFF* tif, FILE* fd)
-{
-	int i;
-
-	fprintf(fd, "%s: \n", tif->tif_name);
-	for (i = 0; i < tif->tif_nfields; i++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
-		fprintf(fd, "field[%2d] %5lu, %2d, %2d, %d, %2d, %5s, %5s, %s\n"
-			, i
-			, (unsigned long) fip->field_tag
-			, fip->field_readcount, fip->field_writecount
-			, fip->field_type
-			, fip->field_bit
-			, fip->field_oktochange ? "TRUE" : "FALSE"
-			, fip->field_passcount ? "TRUE" : "FALSE"
-			, fip->field_name
-		);
-	}
-}
-
-/*
- * Return size of TIFFDataType in bytes
- */
-int
-TIFFDataWidth(TIFFDataType type)
-{
-	switch(type)
-	{
-	case 0:  /* nothing */
-	case 1:  /* TIFF_BYTE */
-	case 2:  /* TIFF_ASCII */
-	case 6:  /* TIFF_SBYTE */
-	case 7:  /* TIFF_UNDEFINED */
-		return 1;
-	case 3:  /* TIFF_SHORT */
-	case 8:  /* TIFF_SSHORT */
-		return 2;
-	case 4:  /* TIFF_LONG */
-	case 9:  /* TIFF_SLONG */
-	case 11: /* TIFF_FLOAT */
-        case 13: /* TIFF_IFD */
-		return 4;
-	case 5:  /* TIFF_RATIONAL */
-	case 10: /* TIFF_SRATIONAL */
-	case 12: /* TIFF_DOUBLE */
-		return 8;
-	default:
-		return 0; /* will return 0 for unknown types */
-	}
-}
-
-/*
- * Return nearest TIFFDataType to the sample type of an image.
- */
-TIFFDataType
-_TIFFSampleToTagType(TIFF* tif)
-{
-	int bps = (int) TIFFhowmany(tif->tif_dir.td_bitspersample, 8);
-
-	switch (tif->tif_dir.td_sampleformat) {
-	case SAMPLEFORMAT_IEEEFP:
-		return (bps == 4 ? TIFF_FLOAT : TIFF_DOUBLE);
-	case SAMPLEFORMAT_INT:
-		return (bps <= 1 ? TIFF_SBYTE :
-		    bps <= 2 ? TIFF_SSHORT : TIFF_SLONG);
-	case SAMPLEFORMAT_UINT:
-		return (bps <= 1 ? TIFF_BYTE :
-		    bps <= 2 ? TIFF_SHORT : TIFF_LONG);
-	case SAMPLEFORMAT_VOID:
-		return (TIFF_UNDEFINED);
-	}
-	/*NOTREACHED*/
-	return (TIFF_UNDEFINED);
-}
-
-const TIFFFieldInfo*
-_TIFFFindFieldInfo(TIFF* tif, ttag_t tag, TIFFDataType dt)
-{
-	static const TIFFFieldInfo *last = NULL;
-	int i, n;
-
-	if (last && last->field_tag == tag &&
-	    (dt == TIFF_ANY || dt == last->field_type))
-		return (last);
-	/* NB: if table gets big, use sorted search (e.g. binary search) */
-	if(dt != TIFF_ANY) {
-            TIFFFieldInfo key = {0, 0, 0, 0, 0, 0, 0, 0};
-            key.field_tag = tag;
-            key.field_type = dt;
-            return((const TIFFFieldInfo *) bsearch(&key, 
-						   tif->tif_fieldinfo, 
-						   tif->tif_nfields,
-						   sizeof(TIFFFieldInfo), 
-						   tagCompare));
-        } else for (i = 0, n = tif->tif_nfields; i < n; i++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
-		if (fip->field_tag == tag &&
-		    (dt == TIFF_ANY || fip->field_type == dt))
-			return (last = fip);
-	}
-	return ((const TIFFFieldInfo *)0);
-}
-
-#include <assert.h>
-#include <stdio.h>
-
-const TIFFFieldInfo*
-_TIFFFieldWithTag(TIFF* tif, ttag_t tag)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	if (!fip) {
-		TIFFError("TIFFFieldWithTag",
-		    "Internal error, unknown tag 0x%x", (u_int) tag);
-		assert(fip != NULL);
-		/*NOTREACHED*/
-	}
-	return (fip);
-}
-
-const TIFFFieldInfo*
-_TIFFFindOrRegisterFieldInfo( TIFF *tif, ttag_t tag, TIFFDataType dt )
-
-{
-    const TIFFFieldInfo *fld;
-
-    fld = _TIFFFindFieldInfo( tif, tag, dt );
-    if( fld == NULL )
-    {
-        fld = _TIFFCreateAnonFieldInfo( tif, tag, dt );
-        _TIFFMergeFieldInfo( tif, fld, 1 );
-    }
-
-    return fld;
-}
-
-TIFFFieldInfo*
-_TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
-{
-    TIFFFieldInfo *fld;
-
-    fld = (TIFFFieldInfo *) _TIFFmalloc(sizeof (TIFFFieldInfo));
-    _TIFFmemset( fld, 0, sizeof(TIFFFieldInfo) );
-
-    fld->field_tag = tag;
-    fld->field_readcount = TIFF_VARIABLE;
-    fld->field_writecount = TIFF_VARIABLE;
-    fld->field_type = field_type;
-    fld->field_bit = FIELD_CUSTOM;
-    fld->field_oktochange = TRUE;
-    fld->field_passcount = TRUE;
-    fld->field_name = (char *) _TIFFmalloc(32);
-
-    /* note that this name is a special sign to TIFFClose() and
-     * _TIFFSetupFieldInfo() to free the field
-     */
-    sprintf(fld->field_name, "Tag %d", (int) tag);
-
-    return fld;    
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_dirread.c b/tkimg1.3/libtiff/libtiff/tif_dirread.c
deleted file mode 100644
index ae008ab..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dirread.c
+++ /dev/null
@@ -1,1485 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dirread.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Read Support Routines.
- */
-#include "tiffiop.h"
-
-#define	IGNORE	0		/* tag placeholder used below */
-
-#if HAVE_IEEEFP
-#define	TIFFCvtIEEEFloatToNative(tif, n, fp)
-#define	TIFFCvtIEEEDoubleToNative(tif, n, dp)
-#else
-extern	void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*);
-extern	void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*);
-#endif
-
-static	int EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16);
-static	void MissingRequired(TIFF*, const char*);
-static	int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
-static	tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*);
-static	tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*);
-static	float TIFFFetchRational(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchNormalTag(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchPerSampleShorts(TIFF*, TIFFDirEntry*, int*);
-static	int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*);
-static	int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**);
-static	int TIFFFetchExtraSamples(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*);
-static	float TIFFFetchFloat(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*);
-static	int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchAnyArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortPair(TIFF*, TIFFDirEntry*);
-static	void ChopUpSingleUncompressedStrip(TIFF*);
-
-static char *
-CheckMalloc(TIFF* tif, tsize_t n, const char* what)
-{
-	char *cp = (char*)_TIFFmalloc(n);
-	if (cp == NULL)
-		TIFFError(tif->tif_name, "No space %s", what);
-	return (cp);
-}
-
-/*
- * Read the next TIFF directory from a file
- * and convert it to the internal format.
- * We read directories sequentially.
- */
-int
-TIFFReadDirectory(TIFF* tif)
-{
-	static const char module[] = "TIFFReadDirectory";
-
-	register TIFFDirEntry* dp;
-	register int n;
-	register TIFFDirectory* td;
-	TIFFDirEntry* dir;
-	int iv;
-	long v;
-	double dv;
-	const TIFFFieldInfo* fip;
-	int fix;
-	uint16 dircount;
-	toff_t nextdiroff;
-	char* cp;
-	int diroutoforderwarning = 0;
-
-	tif->tif_diroff = tif->tif_nextdiroff;
-	if (tif->tif_diroff == 0)		/* no more directories */
-		return (0);
-
-	/*
-	 * XXX: Trick to prevent IFD looping. The one can create TIFF file
-	 * with looped directory pointers. We will maintain a list of already
-	 * seen directories and check every IFD offset against this list.
-	 */
-	for (n = 0; n < tif->tif_dirnumber; n++) {
-		if (tif->tif_dirlist[n] == tif->tif_diroff)
-			return (0);
-	}
-	tif->tif_dirnumber++;
-	tif->tif_dirlist = _TIFFrealloc(tif->tif_dirlist,
-					tif->tif_dirnumber * sizeof(toff_t));
-	if (!tif->tif_dirlist) {
-		TIFFError(module,
-			  "%.1000s: Failed to allocate space for IFD list",
-			  tif->tif_name);
-		return (0);
-	}
-	tif->tif_dirlist[tif->tif_dirnumber - 1] = tif->tif_diroff;
-
-	/*
-	 * Cleanup any previous compression state.
-	 */
-	(*tif->tif_cleanup)(tif);
-	tif->tif_curdir++;
-	nextdiroff = 0;
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, tif->tif_diroff)) {
-			TIFFError(module,
-			    "%.1000s: Seek error accessing TIFF directory",
-                            tif->tif_name);
-			return (0);
-		}
-		if (!ReadOK(tif, &dircount, sizeof (uint16))) {
-			TIFFError(module,
-			    "%.1000s: Can not read TIFF directory count",
-                            tif->tif_name);
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF directory");
-		if (dir == NULL)
-			return (0);
-		if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
-			TIFFError(module,
-                                  "%.100s: Can not read TIFF directory",
-                                  tif->tif_name);
-			goto bad;
-		}
-		/*
-		 * Read offset to next directory for sequential scans.
-		 */
-		(void) ReadOK(tif, &nextdiroff, sizeof (uint32));
-	} else {
-		toff_t off = tif->tif_diroff;
-
-		if (off + sizeof (uint16) > tif->tif_size) {
-			TIFFError(module,
-			    "%.1000s: Can not read TIFF directory count",
-                            tif->tif_name);
-			return (0);
-		} else
-			_TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
-		off += sizeof (uint16);
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF directory");
-		if (dir == NULL)
-			return (0);
-		if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) {
-			TIFFError(module,
-                                  "%.1000s: Can not read TIFF directory",
-                                  tif->tif_name);
-			goto bad;
-		} else
-			_TIFFmemcpy(dir, tif->tif_base + off,
-			    dircount*sizeof (TIFFDirEntry));
-		off += dircount* sizeof (TIFFDirEntry);
-		if (off + sizeof (uint32) <= tif->tif_size)
-			_TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32));
-	}
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&nextdiroff);
-	tif->tif_nextdiroff = nextdiroff;
-
-	tif->tif_flags &= ~TIFF_BEENWRITING;	/* reset before new dir */
-	/*
-	 * Setup default value and then make a pass over
-	 * the fields to check type and tag information,
-	 * and to extract info required to size data
-	 * structures.  A second pass is made afterwards
-	 * to read in everthing not taken in the first pass.
-	 */
-	td = &tif->tif_dir;
-	/* free any old stuff and reinit */
-	TIFFFreeDirectory(tif);
-	TIFFDefaultDirectory(tif);
-	/*
-	 * Electronic Arts writes gray-scale TIFF files
-	 * without a PlanarConfiguration directory entry.
-	 * Thus we setup a default value here, even though
-	 * the TIFF spec says there is no default value.
-	 */
-	TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-
-	/*
-	 * Sigh, we must make a separate pass through the
-	 * directory for the following reason:
-	 *
-	 * We must process the Compression tag in the first pass
-	 * in order to merge in codec-private tag definitions (otherwise
-	 * we may get complaints about unknown tags).  However, the
-	 * Compression tag may be dependent on the SamplesPerPixel
-	 * tag value because older TIFF specs permited Compression
-	 * to be written as a SamplesPerPixel-count tag entry.
-	 * Thus if we don't first figure out the correct SamplesPerPixel
-	 * tag value then we may end up ignoring the Compression tag
-	 * value because it has an incorrect count value (if the
-	 * true value of SamplesPerPixel is not 1).
-	 *
-	 * It sure would have been nice if Aldus had really thought
-	 * this stuff through carefully.
-	 */ 
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-		if (tif->tif_flags & TIFF_SWAB) {
-			TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dp->tdir_count, 2);
-		}
-		if (dp->tdir_tag == TIFFTAG_SAMPLESPERPIXEL) {
-			if (!TIFFFetchNormalTag(tif, dp))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-		}
-	}
-	/*
-	 * First real pass over the directory.
-	 */
-	fix = 0;
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-
-                /*
-                 * Find the field information entry for this tag.
-		 * Added check for tags to ignore ... [BFC]
-                 */
-		if( TIFFReassignTagToIgnore(TIS_EXTRACT, dp->tdir_tag) )
-                    dp->tdir_tag = IGNORE;
-
-		if (fix >= tif->tif_nfields || dp->tdir_tag == IGNORE)
-			continue;
-               
-		/*
-		 * Silicon Beach (at least) writes unordered
-		 * directory tags (violating the spec).  Handle
-		 * it here, but be obnoxious (maybe they'll fix it?).
-		 */
-		if (dp->tdir_tag < tif->tif_fieldinfo[fix]->field_tag) {
-			if (!diroutoforderwarning) {
-				TIFFWarning(module,
-"%.1000s: invalid TIFF directory; tags are not sorted in ascending order",
-                                            tif->tif_name);
-				diroutoforderwarning = 1;
-			}
-			fix = 0;			/* O(n^2) */
-		}
-		while (fix < tif->tif_nfields &&
-		       tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
-			fix++;
-		if (fix >= tif->tif_nfields ||
-		    tif->tif_fieldinfo[fix]->field_tag != dp->tdir_tag) {
-
-                    TIFFWarning(module,
-			"%.1000s: unknown field with tag %d (0x%x) encountered",
-                                tif->tif_name, dp->tdir_tag,  dp->tdir_tag);
-
-                    TIFFMergeFieldInfo( tif,
-                                        _TIFFCreateAnonFieldInfo( tif,
-                                              dp->tdir_tag,
-					      (TIFFDataType) dp->tdir_type ),
-                                        1 );
-                    fix = 0;
-                    while (fix < tif->tif_nfields &&
-                           tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
-			fix++;
-		}
-		/*
-		 * Null out old tags that we ignore.
-		 */
-		if (tif->tif_fieldinfo[fix]->field_bit == FIELD_IGNORE) {
-	ignore:
-			dp->tdir_tag = IGNORE;
-			continue;
-		}
-		/*
-		 * Check data type.
-		 */
-		fip = tif->tif_fieldinfo[fix];
-		while (dp->tdir_type != (u_short) fip->field_type) {
-			if (fip->field_type == TIFF_ANY)	/* wildcard */
-				break;
-			fip++, fix++;
-			if (fix == tif->tif_nfields ||
-			    fip->field_tag != dp->tdir_tag) {
-				TIFFWarning(module,
-			"%.1000s: wrong data type %d for \"%s\"; tag ignored",
-					    tif->tif_name, dp->tdir_type,
-					    fip[-1].field_name);
-				goto ignore;
-			}
-		}
-		/*
-		 * Check count if known in advance.
-		 */
-		if (fip->field_readcount != TIFF_VARIABLE) {
-			uint32 expected = (fip->field_readcount == TIFF_SPP) ?
-			    (uint32) td->td_samplesperpixel :
-			    (uint32) fip->field_readcount;
-			if (!CheckDirCount(tif, dp, expected))
-				goto ignore;
-		}
-
-		switch (dp->tdir_tag) {
-		case TIFFTAG_COMPRESSION:
-			/*
-			 * The 5.0 spec says the Compression tag has
-			 * one value, while earlier specs say it has
-			 * one value per sample.  Because of this, we
-			 * accept the tag if one value is supplied.
-			 */
-			if (dp->tdir_count == 1) {
-				v = TIFFExtractData(tif,
-				    dp->tdir_type, dp->tdir_offset);
-				if (!TIFFSetField(tif, dp->tdir_tag, (int)v))
-					goto bad;
-				break;
-			}
-			if (!TIFFFetchPerSampleShorts(tif, dp, &iv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, iv))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-			break;
-		case TIFFTAG_STRIPOFFSETS:
-		case TIFFTAG_STRIPBYTECOUNTS:
-		case TIFFTAG_TILEOFFSETS:
-		case TIFFTAG_TILEBYTECOUNTS:
-			TIFFSetFieldBit(tif, fip->field_bit);
-			break;
-		case TIFFTAG_IMAGEWIDTH:
-		case TIFFTAG_IMAGELENGTH:
-		case TIFFTAG_IMAGEDEPTH:
-		case TIFFTAG_TILELENGTH:
-		case TIFFTAG_TILEWIDTH:
-		case TIFFTAG_TILEDEPTH:
-		case TIFFTAG_PLANARCONFIG:
-		case TIFFTAG_ROWSPERSTRIP:
-			if (!TIFFFetchNormalTag(tif, dp))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-			break;
-		case TIFFTAG_EXTRASAMPLES:
-			(void) TIFFFetchExtraSamples(tif, dp);
-			dp->tdir_tag = IGNORE;
-			break;
-		}
-	}
-
-	/*
-	 * Allocate directory structure and setup defaults.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
-		MissingRequired(tif, "ImageLength");
-		goto bad;
-	}
-	if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) {
-		MissingRequired(tif, "PlanarConfiguration");
-		goto bad;
-	}
-	/* 
- 	 * Setup appropriate structures (by strip or by tile)
-	 */
-	if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
-		td->td_nstrips = TIFFNumberOfStrips(tif);
-		td->td_tilewidth = td->td_imagewidth;
-		td->td_tilelength = td->td_rowsperstrip;
-		td->td_tiledepth = td->td_imagedepth;
-		tif->tif_flags &= ~TIFF_ISTILED;
-	} else {
-		td->td_nstrips = TIFFNumberOfTiles(tif);
-		tif->tif_flags |= TIFF_ISTILED;
-	}
-	td->td_stripsperimage = td->td_nstrips;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		td->td_stripsperimage /= td->td_samplesperpixel;
-	if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) {
-		MissingRequired(tif,
-		    isTiled(tif) ? "TileOffsets" : "StripOffsets");
-		goto bad;
-	}
-
-	/*
-	 * Second pass: extract other information.
-	 */
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-		if (dp->tdir_tag == IGNORE)
-			continue;
-		switch (dp->tdir_tag) {
-		case TIFFTAG_MINSAMPLEVALUE:
-		case TIFFTAG_MAXSAMPLEVALUE:
-		case TIFFTAG_BITSPERSAMPLE:
-			/*
-			 * The 5.0 spec says the Compression tag has
-			 * one value, while earlier specs say it has
-			 * one value per sample.  Because of this, we
-			 * accept the tag if one value is supplied.
-			 *
-			 * The MinSampleValue, MaxSampleValue and
-			 * BitsPerSample tags are supposed to be written
-			 * as one value/sample, but some vendors incorrectly
-			 * write one value only -- so we accept that
-			 * as well (yech).
-			 */
-			if (dp->tdir_count == 1) {
-				v = TIFFExtractData(tif,
-				    dp->tdir_type, dp->tdir_offset);
-				if (!TIFFSetField(tif, dp->tdir_tag, (int)v))
-					goto bad;
-				break;
-			}
-			/* fall thru... */
-		case TIFFTAG_DATATYPE:
-		case TIFFTAG_SAMPLEFORMAT:
-			if (!TIFFFetchPerSampleShorts(tif, dp, &iv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, iv))
-				goto bad;
-			break;
-		case TIFFTAG_SMINSAMPLEVALUE:
-		case TIFFTAG_SMAXSAMPLEVALUE:
-			if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, dv))
-				goto bad;
-			break;
-		case TIFFTAG_STRIPOFFSETS:
-		case TIFFTAG_TILEOFFSETS:
-			if (!TIFFFetchStripThing(tif, dp,
-			    td->td_nstrips, &td->td_stripoffset))
-				goto bad;
-			break;
-		case TIFFTAG_STRIPBYTECOUNTS:
-		case TIFFTAG_TILEBYTECOUNTS:
-			if (!TIFFFetchStripThing(tif, dp,
-			    td->td_nstrips, &td->td_stripbytecount))
-				goto bad;
-			break;
-		case TIFFTAG_COLORMAP:
-		case TIFFTAG_TRANSFERFUNCTION:
-			/*
-			 * TransferFunction can have either 1x or 3x data
-			 * values; Colormap can have only 3x items.
-			 */
-			v = 1L<<td->td_bitspersample;
-			if (dp->tdir_tag == TIFFTAG_COLORMAP ||
-			    dp->tdir_count != (uint32) v) {
-				if (!CheckDirCount(tif, dp, (uint32)(3*v)))
-					break;
-			}
-			v *= sizeof (uint16);
-			cp = CheckMalloc(tif, dp->tdir_count * sizeof (uint16),
-			    "to read \"TransferFunction\" tag");
-			if (cp != NULL) {
-				if (TIFFFetchData(tif, dp, cp)) {
-					/*
-					 * This deals with there being only
-					 * one array to apply to all samples.
-					 */
-					uint32 c =
-					    (uint32)1 << td->td_bitspersample;
-					if (dp->tdir_count == c)
-						v = 0;
-					TIFFSetField(tif, dp->tdir_tag,
-					    cp, cp+v, cp+2*v);
-				}
-				_TIFFfree(cp);
-			}
-			break;
-		case TIFFTAG_PAGENUMBER:
-		case TIFFTAG_HALFTONEHINTS:
-		case TIFFTAG_YCBCRSUBSAMPLING:
-		case TIFFTAG_DOTRANGE:
-			(void) TIFFFetchShortPair(tif, dp);
-			break;
-#ifdef COLORIMETRY_SUPPORT
-		case TIFFTAG_REFERENCEBLACKWHITE:
-			(void) TIFFFetchRefBlackWhite(tif, dp);
-			break;
-#endif
-/* BEGIN REV 4.0 COMPATIBILITY */
-		case TIFFTAG_OSUBFILETYPE:
-			v = 0;
-			switch (TIFFExtractData(tif, dp->tdir_type,
-			    dp->tdir_offset)) {
-			case OFILETYPE_REDUCEDIMAGE:
-				v = FILETYPE_REDUCEDIMAGE;
-				break;
-			case OFILETYPE_PAGE:
-				v = FILETYPE_PAGE;
-				break;
-			}
-			if (v)
-				(void) TIFFSetField(tif,
-				    TIFFTAG_SUBFILETYPE, (int)v);
-			break;
-/* END REV 4.0 COMPATIBILITY */
-		default:
-			(void) TIFFFetchNormalTag(tif, dp);
-			break;
-		}
-	}
-	/*
-	 * Verify Palette image has a Colormap.
-	 */
-	if (td->td_photometric == PHOTOMETRIC_PALETTE &&
-	    !TIFFFieldSet(tif, FIELD_COLORMAP)) {
-		MissingRequired(tif, "Colormap");
-		goto bad;
-	}
-	/*
-	 * Attempt to deal with a missing StripByteCounts tag.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
-		/*
-		 * Some manufacturers violate the spec by not giving
-		 * the size of the strips.  In this case, assume there
-		 * is one uncompressed strip of data.
-		 */
-		if ((td->td_planarconfig == PLANARCONFIG_CONTIG &&
-		    td->td_nstrips > 1) ||
-		    (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
-		     td->td_nstrips != td->td_samplesperpixel)) {
-		    MissingRequired(tif, "StripByteCounts");
-		    goto bad;
-		}
-		TIFFWarning(module,
-			"%.1000s: TIFF directory is missing required "
-			"\"%s\" field, calculating from imagelength",
-			tif->tif_name,
-		        _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-		if (EstimateStripByteCounts(tif, dir, dircount) < 0)
-		    goto bad;
-/* 
- * Assume we have wrong StripByteCount value (in case of single strip) in
- * following cases:
- *   - it is equal to zero along with StripOffset;
- *   - it is larger than file itself (in case of uncompressed image).
- */
-#define	BYTECOUNTLOOKSBAD \
-    ( (td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \
-      (td->td_compression == COMPRESSION_NONE && \
-       td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]) )
-	} else if (td->td_nstrips == 1 && BYTECOUNTLOOKSBAD) {
-		/*
-		 * Plexus (and others) sometimes give a value
-		 * of zero for a tag when they don't know what
-		 * the correct value is!  Try and handle the
-		 * simple case of estimating the size of a one
-		 * strip image.
-		 */
-		TIFFWarning(module,
-	"%.1000s: Bogus \"%s\" field, ignoring and calculating from imagelength",
-                            tif->tif_name,
-		            _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-		if(EstimateStripByteCounts(tif, dir, dircount) < 0)
-		    goto bad;
-	}
-	if (dir)
-		_TIFFfree((char *)dir);
-	if (!TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE))
-		td->td_maxsamplevalue = (uint16)((1L<<td->td_bitspersample)-1);
-	/*
-	 * Setup default compression scheme.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_COMPRESSION))
-		TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-        /*
-         * Some manufacturers make life difficult by writing
-	 * large amounts of uncompressed data as a single strip.
-	 * This is contrary to the recommendations of the spec.
-         * The following makes an attempt at breaking such images
-	 * into strips closer to the recommended 8k bytes.  A
-	 * side effect, however, is that the RowsPerStrip tag
-	 * value may be changed.
-         */
-	if (td->td_nstrips == 1 && td->td_compression == COMPRESSION_NONE &&
-	    (tif->tif_flags & (TIFF_STRIPCHOP|TIFF_ISTILED)) == TIFF_STRIPCHOP)
-		ChopUpSingleUncompressedStrip(tif);
-	/*
-	 * Reinitialize i/o since we are starting on a new directory.
-	 */
-	tif->tif_row = (uint32) -1;
-	tif->tif_curstrip = (tstrip_t) -1;
-	tif->tif_col = (uint32) -1;
-	tif->tif_curtile = (ttile_t) -1;
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	return (1);
-bad:
-	if (dir)
-		_TIFFfree(dir);
-	return (0);
-}
-
-static int
-EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
-{
-	static const char module[] = "EstimateStripByteCounts";
-
-	register TIFFDirEntry *dp;
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint16 i;
-
-	if (td->td_stripbytecount)
-		_TIFFfree(td->td_stripbytecount);
-	td->td_stripbytecount = (uint32*)
-	    CheckMalloc(tif, td->td_nstrips * sizeof (uint32),
-		"for \"StripByteCounts\" array");
-	if (td->td_compression != COMPRESSION_NONE) {
-		uint32 space = (uint32)(sizeof (TIFFHeader)
-		    + sizeof (uint16)
-		    + (dircount * sizeof (TIFFDirEntry))
-		    + sizeof (uint32));
-		toff_t filesize = TIFFGetFileSize(tif);
-		uint16 n;
-
-		/* calculate amount of space used by indirect values */
-		for (dp = dir, n = dircount; n > 0; n--, dp++)
-		{
-			uint32 cc = TIFFDataWidth((TIFFDataType) dp->tdir_type);
-			if (cc == 0) {
-				TIFFError(module,
-			"%.1000s: Cannot determine size of unknown tag type %d",
-					  tif->tif_name, dp->tdir_type);
-				return -1;
-			}
-			cc = cc * dp->tdir_count;
-			if (cc > sizeof (uint32))
-				space += cc;
-		}
-		space = filesize - space;
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-			space /= td->td_samplesperpixel;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = space;
-		/*
-		 * This gross hack handles the case were the offset to
-		 * the last strip is past the place where we think the strip
-		 * should begin.  Since a strip of data must be contiguous,
-		 * it's safe to assume that we've overestimated the amount
-		 * of data in the strip and trim this number back accordingly.
-		 */ 
-		i--;
-		if (((toff_t)(td->td_stripoffset[i]+td->td_stripbytecount[i]))
-                                                               > filesize)
-			td->td_stripbytecount[i] =
-			    filesize - td->td_stripoffset[i];
-	} else {
-		uint32 rowbytes = TIFFScanlineSize(tif);
-		uint32 rowsperstrip = td->td_imagelength/td->td_stripsperimage;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = rowbytes*rowsperstrip;
-	}
-	TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
-	if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP))
-		td->td_rowsperstrip = td->td_imagelength;
-	return 1;
-}
-
-static void
-MissingRequired(TIFF* tif, const char* tagname)
-{
-	static const char module[] = "MissingRequired";
-
-	TIFFError(module,
-		  "%.1000s: TIFF directory is missing required \"%s\" field",
-		  tif->tif_name, tagname);
-}
-
-/*
- * Check the count field of a directory
- * entry against a known value.  The caller
- * is expected to skip/ignore the tag if
- * there is a mismatch.
- */
-static int
-CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
-{
-	if (count != dir->tdir_count) {
-		TIFFWarning(tif->tif_name,
-	"incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-		    dir->tdir_count, count);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Fetch a contiguous directory item.
- */
-static tsize_t
-TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	int w = TIFFDataWidth((TIFFDataType) dir->tdir_type);
-	tsize_t cc = dir->tdir_count * w;
-
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, dir->tdir_offset))
-			goto bad;
-		if (!ReadOK(tif, cp, cc))
-			goto bad;
-	} else {
-		if (dir->tdir_offset + cc > tif->tif_size)
-			goto bad;
-		_TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc);
-	}
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	return (cc);
-bad:
-	TIFFError(tif->tif_name, "Error fetching data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return ((tsize_t) 0);
-}
-
-/*
- * Fetch an ASCII item from the file.
- */
-static tsize_t
-TIFFFetchString(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count <= 4) {
-		uint32 l = dir->tdir_offset;
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&l);
-		_TIFFmemcpy(cp, &l, dir->tdir_count);
-		return (1);
-	}
-	return (TIFFFetchData(tif, dir, cp));
-}
-
-/*
- * Convert numerator+denominator to float.
- */
-static int
-cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
-{
-	if (denom == 0) {
-		TIFFError(tif->tif_name,
-		    "%s: Rational with zero denominator (num = %lu)",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
-		return (0);
-	} else {
-		if (dir->tdir_type == TIFF_RATIONAL)
-			*rv = ((float)num / (float)denom);
-		else
-			*rv = ((float)(int32)num / (float)(int32)denom);
-		return (1);
-	}
-}
-
-/*
- * Fetch a rational item from the file
- * at offset off and return the value
- * as a floating point number.
- */
-static float
-TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint32 l[2];
-	float v;
-
-	return (!TIFFFetchData(tif, dir, (char *)l) ||
-	    !cvtRational(tif, dir, l[0], l[1], &v) ? 1.0f : v);
-}
-
-/*
- * Fetch a single floating point value
- * from the offset field and return it
- * as a native float.
- */
-static float
-TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir)
-{
-	long l = TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
-	float v = *(float*) &l;
-	TIFFCvtIEEEFloatToNative(tif, 1, &v);
-	return (v);
-}
-
-/*
- * Fetch an array of BYTE or SBYTE values.
- */
-static int
-TIFFFetchByteArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-    if (dir->tdir_count <= 4) {
-        /*
-         * Extract data from offset field.
-         */
-        if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-	    if (dir->tdir_type == TIFF_SBYTE)
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (signed char)(dir->tdir_offset & 0xff);
-                    case 3: v[2] = (signed char)((dir->tdir_offset >> 8) & 0xff);
-                    case 2: v[1] = (signed char)((dir->tdir_offset >> 16) & 0xff);
-		    case 1: v[0] = (signed char)(dir->tdir_offset >> 24);	
-                }
-	    else
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (uint16)(dir->tdir_offset & 0xff);
-                    case 3: v[2] = (uint16)((dir->tdir_offset >> 8) & 0xff);
-                    case 2: v[1] = (uint16)((dir->tdir_offset >> 16) & 0xff);
-		    case 1: v[0] = (uint16)(dir->tdir_offset >> 24);	
-                }
-	} else {
-	    if (dir->tdir_type == TIFF_SBYTE)
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (signed char)(dir->tdir_offset >> 24);
-                    case 3: v[2] = (signed char)((dir->tdir_offset >> 16) & 0xff);
-                    case 2: v[1] = (signed char)((dir->tdir_offset >> 8) & 0xff);
-                    case 1: v[0] = (signed char)(dir->tdir_offset & 0xff);
-		}
-	    else
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (uint16)(dir->tdir_offset >> 24);
-                    case 3: v[2] = (uint16)((dir->tdir_offset >> 16) & 0xff);
-                    case 2: v[1] = (uint16)((dir->tdir_offset >> 8) & 0xff);
-                    case 1: v[0] = (uint16)(dir->tdir_offset & 0xff);
-		}
-	}
-        return (1);
-    } else
-        return (TIFFFetchData(tif, dir, (char*) v) != 0);	/* XXX */
-}
-
-/*
- * Fetch an array of SHORT or SSHORT values.
- */
-static int
-TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-	if (dir->tdir_count <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			switch (dir->tdir_count) {
-			case 2: v[1] = (uint16) (dir->tdir_offset & 0xffff);
-			case 1: v[0] = (uint16) (dir->tdir_offset >> 16);
-			}
-		} else {
-			switch (dir->tdir_count) {
-			case 2: v[1] = (uint16) (dir->tdir_offset >> 16);
-			case 1: v[0] = (uint16) (dir->tdir_offset & 0xffff);
-			}
-		}
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char *)v) != 0);
-}
-
-/*
- * Fetch a pair of SHORT or BYTE values.
- */
-static int
-TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 v[4];
-	int ok = 0;
-
-	switch (dir->tdir_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		ok = TIFFFetchShortArray(tif, dir, v);
-		break;
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		ok  = TIFFFetchByteArray(tif, dir, v);
-		break;
-	}
-	if (ok)
-		TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
-	return (ok);
-}
-
-/*
- * Fetch an array of LONG or SLONG values.
- */
-static int
-TIFFFetchLongArray(TIFF* tif, TIFFDirEntry* dir, uint32* v)
-{
-	if (dir->tdir_count == 1) {
-		v[0] = dir->tdir_offset;
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char*) v) != 0);
-}
-
-/*
- * Fetch an array of RATIONAL or SRATIONAL values.
- */
-static int
-TIFFFetchRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-	int ok = 0;
-	uint32* l;
-
-	l = (uint32*)CheckMalloc(tif,
-	    dir->tdir_count*TIFFDataWidth((TIFFDataType) dir->tdir_type),
-	    "to fetch array of rationals");
-	if (l) {
-		if (TIFFFetchData(tif, dir, (char *)l)) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++) {
-				ok = cvtRational(tif, dir,
-				    l[2*i+0], l[2*i+1], &v[i]);
-				if (!ok)
-					break;
-			}
-		}
-		_TIFFfree((char *)l);
-	}
-	return (ok);
-}
-
-/*
- * Fetch an array of FLOAT values.
- */
-static int
-TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-
-	if (dir->tdir_count == 1) {
-		v[0] = *(float*) &dir->tdir_offset;
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of DOUBLE values.
- */
-static int
-TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of ANY values.  The actual values are
- * returned as doubles which should be able hold all the
- * types.  Yes, there really should be an tany_t to avoid
- * this potential non-portability ...  Note in particular
- * that we assume that the double return value vector is
- * large enough to read in any fundamental type.  We use
- * that vector as a buffer to read in the base type vector
- * and then convert it in place to double (from end
- * to front of course).
- */
-static int
-TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	int i;
-
-	switch (dir->tdir_type) {
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		if (!TIFFFetchByteArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_BYTE) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (!TIFFFetchShortArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_SHORT) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-		if (!TIFFFetchLongArray(tif, dir, (uint32*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_LONG) {
-			uint32* vp = (uint32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int32* vp = (int32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (!TIFFFetchRationalArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_FLOAT:
-		if (!TIFFFetchFloatArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFFetchDoubleArray(tif, dir, (double*) v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		TIFFError(tif->tif_name,
-		    "cannot read TIFF_ANY type %d for field \"%s\"",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Fetch a tag that is not handled by special case code.
- */
-static int
-TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp)
-{
-	static const char mesg[] = "to fetch tag value";
-	int ok = 0;
-	const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dp->tdir_tag);
-
-	if (dp->tdir_count > 1) {		/* array of values */
-		char* cp = NULL;
-
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-			/* NB: always expand BYTE values to shorts */
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint32), mesg);
-			ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_FLOAT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_DOUBLE:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (double), mesg);
-			ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp);
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			/*
-			 * Some vendors write strings w/o the trailing
-			 * NULL byte, so always append one just in case.
-			 */
-			cp = CheckMalloc(tif, dp->tdir_count+1, mesg);
-			if( (ok = (cp && TIFFFetchString(tif, dp, cp))) != 0 )
-				cp[dp->tdir_count] = '\0';	/* XXX */
-			break;
-		}
-		if (ok) {
-			ok = (fip->field_passcount ?
-			    TIFFSetField(tif, dp->tdir_tag, dp->tdir_count, cp)
-			  : TIFFSetField(tif, dp->tdir_tag, cp));
-		}
-		if (cp != NULL)
-			_TIFFfree(cp);
-	} else if (CheckDirCount(tif, dp, 1)) {	/* singleton value */
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			/*
-			 * If the tag is also acceptable as a LONG or SLONG
-			 * then TIFFSetField will expect an uint32 parameter
-			 * passed to it (through varargs).  Thus, for machines
-			 * where sizeof (int) != sizeof (uint32) we must do
-			 * a careful check here.  It's hard to say if this
-			 * is worth optimizing.
-			 *
-			 * NB: We use TIFFFieldWithTag here knowing that
-			 *     it returns us the first entry in the table
-			 *     for the tag and that that entry is for the
-			 *     widest potential data type the tag may have.
-			 */
-			{ TIFFDataType type = fip->field_type;
-			  if (type != TIFF_LONG && type != TIFF_SLONG) {
-				uint16 v = (uint16)
-			   TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-				ok = (fip->field_passcount ?
-				    TIFFSetField(tif, dp->tdir_tag, 1, &v)
-				  : TIFFSetField(tif, dp->tdir_tag, v));
-				break;
-			  }
-			}
-			/* fall thru... */
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			{ uint32 v32 =
-		    TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-			  ok = (fip->field_passcount ? 
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v32)
-			    : TIFFSetField(tif, dp->tdir_tag, v32));
-			}
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-		case TIFF_FLOAT:
-			{ float v = (dp->tdir_type == TIFF_FLOAT ? 
-			      TIFFFetchFloat(tif, dp)
-			    : TIFFFetchRational(tif, dp));
-			  ok = (fip->field_passcount ?
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v)
-			    : TIFFSetField(tif, dp->tdir_tag, v));
-			}
-			break;
-		case TIFF_DOUBLE:
-			{ double v;
-			  ok = (TIFFFetchDoubleArray(tif, dp, &v) &&
-			    (fip->field_passcount ?
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v)
-			    : TIFFSetField(tif, dp->tdir_tag, v))
-			  );
-			}
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			{ char c[2];
-			  if( (ok = (TIFFFetchString(tif, dp, c) != 0)) != 0 ){
-				c[1] = '\0';		/* XXX paranoid */
-				ok = TIFFSetField(tif, dp->tdir_tag, c);
-			  }
-			}
-			break;
-		}
-	}
-	return (ok);
-}
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch samples/pixel short values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl)
-{
-	int samples = tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		uint16 buf[10];
-		uint16* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-		if (TIFFFetchShortArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree((char*) v);
-	}
-	return (status);
-}
-
-/*
- * Fetch samples/pixel ANY values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
-{
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		double buf[10];
-		double* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (double*) _TIFFmalloc(samples * sizeof (double));
-		if (TIFFFetchAnyArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree(v);
-	}
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Fetch a set of offsets or lengths.
- * While this routine says "strips",
- * in fact it's also used for tiles.
- */
-static int
-TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
-{
-	register uint32* lp;
-	int status;
-
-        CheckDirCount(tif, dir, (uint32) nstrips);
-
-	/*
-	 * Allocate space for strip information.
-	 */
-	if (*lpp == NULL &&
-	    (*lpp = (uint32 *)CheckMalloc(tif,
-	      nstrips * sizeof (uint32), "for strip array")) == NULL)
-		return (0);
-	lp = *lpp;
-        memset( lp, 0, sizeof(uint32) * nstrips );
-
-	if (dir->tdir_type == (int)TIFF_SHORT) {
-		/*
-		 * Handle uint16->uint32 expansion.
-		 */
-		uint16* dp = (uint16*) CheckMalloc(tif,
-		    dir->tdir_count* sizeof (uint16), "to fetch strip tag");
-		if (dp == NULL)
-			return (0);
-		if( (status = TIFFFetchShortArray(tif, dir, dp)) != 0 ) {
-                    int i;
-                    
-                    for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
-                    {
-                        lp[i] = dp[i];
-                    }
-		}
-		_TIFFfree((char*) dp);
-
-        } else if( nstrips != (int) dir->tdir_count ) {
-            /* Special case to correct length */
-
-            uint32* dp = (uint32*) CheckMalloc(tif,
-		    dir->tdir_count* sizeof (uint32), "to fetch strip tag");
-            if (dp == NULL)
-                return (0);
-
-            status = TIFFFetchLongArray(tif, dir, dp);
-            if( status != 0 ) {
-                int i;
-
-                for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
-                {
-                    lp[i] = dp[i];
-                }
-            }
-
-            _TIFFfree( (char *) dp );
-	} else
-            status = TIFFFetchLongArray(tif, dir, lp);
-        
-	return (status);
-}
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch and set the ExtraSamples tag.
- */
-static int
-TIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 buf[10];
-	uint16* v = buf;
-	int status;
-
-	if (dir->tdir_count > NITEMS(buf))
-		v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16));
-	if (dir->tdir_type == TIFF_BYTE)
-		status = TIFFFetchByteArray(tif, dir, v);
-	else
-		status = TIFFFetchShortArray(tif, dir, v);
-	if (status)
-		status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v);
-	if (v != buf)
-		_TIFFfree((char*) v);
-	return (status);
-}
-#undef NITEMS
-
-#ifdef COLORIMETRY_SUPPORT
-/*
- * Fetch and set the RefBlackWhite tag.
- */
-static int
-TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir)
-{
-	static const char mesg[] = "for \"ReferenceBlackWhite\" array";
-	char* cp;
-	int ok;
-
-	if (dir->tdir_type == TIFF_RATIONAL)
-		return (TIFFFetchNormalTag(tif, dir));
-	/*
-	 * Handle LONG's for backward compatibility.
-	 */
-	cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg);
-	if( (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) != 0) {
-		float* fp = (float*)
-		    CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg);
-		if( (ok = (fp != NULL)) != 0 ) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++)
-				fp[i] = (float)((uint32*) cp)[i];
-			ok = TIFFSetField(tif, dir->tdir_tag, fp);
-			_TIFFfree((char*) fp);
-		}
-	}
-	if (cp)
-		_TIFFfree(cp);
-	return (ok);
-}
-#endif
-
-/*
- * Replace a single strip (tile) of uncompressed data by
- * multiple strips (tiles), each approximately 8Kbytes.
- * This is useful for dealing with large images or
- * for dealing with machines with a limited amount
- * memory.
- */
-static void
-ChopUpSingleUncompressedStrip(TIFF* tif)
-{
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint32 bytecount = td->td_stripbytecount[0];
-	uint32 offset = td->td_stripoffset[0];
-	tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes;
-	tstrip_t strip, nstrips, rowsperstrip;
-	uint32* newcounts;
-	uint32* newoffsets;
-
-	/*
-	 * Make the rows hold at least one
-	 * scanline, but fill 8k if possible.
-	 */
-	if (rowbytes > 8192) {
-		stripbytes = rowbytes;
-		rowsperstrip = 1;
-	} else if (rowbytes > 0 ) {
-		rowsperstrip = 8192 / rowbytes;
-		stripbytes = rowbytes * rowsperstrip;
-	}
-        else
-            return;
-
-	/* never increase the number of strips in an image */
-	if (rowsperstrip >= td->td_rowsperstrip)
-		return;
-	nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes);
-	newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripByteCounts\" array");
-	newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripOffsets\" array");
-	if (newcounts == NULL || newoffsets == NULL) {
-	        /*
-		 * Unable to allocate new strip information, give
-		 * up and use the original one strip information.
-		 */
-		if (newcounts != NULL)
-			_TIFFfree(newcounts);
-		if (newoffsets != NULL)
-			_TIFFfree(newoffsets);
-		return;
-	}
-	/*
-	 * Fill the strip information arrays with
-	 * new bytecounts and offsets that reflect
-	 * the broken-up format.
-	 */
-	for (strip = 0; strip < nstrips; strip++) {
-		if (stripbytes > (tsize_t) bytecount)
-			stripbytes = bytecount;
-		newcounts[strip] = stripbytes;
-		newoffsets[strip] = offset;
-		offset += stripbytes;
-		bytecount -= stripbytes;
-	}
-	/*
-	 * Replace old single strip info with multi-strip info.
-	 */
-	td->td_stripsperimage = td->td_nstrips = nstrips;
-	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-	_TIFFfree(td->td_stripbytecount);
-	_TIFFfree(td->td_stripoffset);
-	td->td_stripbytecount = newcounts;
-	td->td_stripoffset = newoffsets;
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_dirwrite.c b/tkimg1.3/libtiff/libtiff/tif_dirwrite.c
deleted file mode 100644
index 3b90b45..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dirwrite.c
+++ /dev/null
@@ -1,1233 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dirwrite.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Write Support Routines.
- */
-#include "tiffiop.h"
-
-#if HAVE_IEEEFP
-#define	TIFFCvtNativeToIEEEFloat(tif, n, fp)
-#define	TIFFCvtNativeToIEEEDouble(tif, n, dp)
-#else
-extern	void TIFFCvtNativeToIEEEFloat(TIFF*, uint32, float*);
-extern	void TIFFCvtNativeToIEEEDouble(TIFF*, uint32, double*);
-#endif
-
-static	int TIFFWriteNormalTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*);
-static	void TIFFSetupShortLong(TIFF*, ttag_t, TIFFDirEntry*, uint32);
-static	void TIFFSetupShort(TIFF*, ttag_t, TIFFDirEntry*, uint16);
-static	int TIFFSetupShortPair(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleShorts(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleAnys(TIFF*, TIFFDataType, ttag_t, TIFFDirEntry*);
-static	int TIFFWriteShortTable(TIFF*, ttag_t, TIFFDirEntry*, uint32, uint16**);
-static	int TIFFWriteShortArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint16*);
-static	int TIFFWriteLongArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint32*);
-static	int TIFFWriteRationalArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteFloatArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteDoubleArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-static	int TIFFWriteByteArray(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFWriteAnyArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-#ifdef COLORIMETRY_SUPPORT
-static	int TIFFWriteTransferFunction(TIFF*, TIFFDirEntry*);
-#endif
-#ifdef CMYK_SUPPORT
-static	int TIFFWriteInkNames(TIFF*, TIFFDirEntry*);
-#endif
-static	int TIFFWriteData(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFLinkDirectory(TIFF*);
-
-#define	WriteRationalPair(type, tag1, v1, tag2, v2) {		\
-	if (!TIFFWriteRational(tif, type, tag1, dir, v1))	\
-		goto bad;					\
-	if (!TIFFWriteRational(tif, type, tag2, dir+1, v2))	\
-		goto bad;					\
-	dir++;							\
-}
-#define	TIFFWriteRational(tif, type, tag, dir, v) \
-	TIFFWriteRationalArray((tif), (type), (tag), (dir), 1, &(v))
-#ifndef TIFFWriteRational
-static	int TIFFWriteRational(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, float);
-#endif
-
-/*
- * Write the contents of the current directory
- * to the specified file.  This routine doesn't
- * handle overwriting a directory with auxiliary
- * storage that's been changed.
- */
-static int
-_TIFFWriteDirectory(TIFF* tif, int done)
-{
-	uint16 dircount;
-	toff_t diroff;
-	ttag_t tag;
-	uint32 nfields;
-	tsize_t dirsize;
-	char* data;
-	TIFFDirEntry* dir;
-	TIFFDirectory* td;
-	u_long b, fields[FIELD_SETLONGS];
-	int fi, nfi;
-
-	if (tif->tif_mode == O_RDONLY)
-		return (1);
-	/*
-	 * Clear write state so that subsequent images with
-	 * different characteristics get the right buffers
-	 * setup for them.
-	 */
-	if (done)
-	{
-	    if (tif->tif_flags & TIFF_POSTENCODE) {
-		    tif->tif_flags &= ~TIFF_POSTENCODE;
-		    if (!(*tif->tif_postencode)(tif)) {
-			    TIFFError(tif->tif_name,
-				"Error post-encoding before directory write");
-			    return (0);
-		    }
-	    }
-	    (*tif->tif_close)(tif);		/* shutdown encoder */
-	    /*
-	     * Flush any data that might have been written
-	     * by the compression close+cleanup routines.
-	     */
-	    if (tif->tif_rawcc > 0 && !TIFFFlushData1(tif)) {
-		    TIFFError(tif->tif_name,
-			"Error flushing data before directory write");
-		    return (0);
-	    }
-	    if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
-		    _TIFFfree(tif->tif_rawdata);
-		    tif->tif_rawdata = NULL;
-		    tif->tif_rawcc = 0;
-		    tif->tif_rawdatasize = 0;
-	    }
-	    tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
-	}
-
-	td = &tif->tif_dir;
-	/*
-	 * Size the directory so that we can calculate
-	 * offsets for the data items that aren't kept
-	 * in-place in each field.
-	 */
-	nfields = 0;
-	for (b = 0; b <= FIELD_LAST; b++)
-		if (TIFFFieldSet(tif, b) && b != FIELD_CUSTOM)
-			nfields += (b < FIELD_SUBFILETYPE ? 2 : 1);
-        nfields += td->td_customValueCount;
-	dirsize = nfields * sizeof (TIFFDirEntry);
-	data = (char*) _TIFFmalloc(dirsize);
-	if (data == NULL) {
-		TIFFError(tif->tif_name,
-		    "Cannot write directory, out of space");
-		return (0);
-	}
-	/*
-	 * Directory hasn't been placed yet, put
-	 * it at the end of the file and link it
-	 * into the existing directory structure.
-	 */
-	if (tif->tif_diroff == 0 && !TIFFLinkDirectory(tif))
-		goto bad;
-	tif->tif_dataoff = (toff_t)(
-	    tif->tif_diroff + sizeof (uint16) + dirsize + sizeof (toff_t));
-	if (tif->tif_dataoff & 1)
-		tif->tif_dataoff++;
-	(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
-	tif->tif_curdir++;
-	dir = (TIFFDirEntry*) data;
-	/*
-	 * Setup external form of directory
-	 * entries and write data items.
-	 */
-	_TIFFmemcpy(fields, td->td_fieldsset, sizeof (fields));
-	/*
-	 * Write out ExtraSamples tag only if
-	 * extra samples are present in the data.
-	 */
-	if (FieldSet(fields, FIELD_EXTRASAMPLES) && !td->td_extrasamples) {
-		ResetFieldBit(fields, FIELD_EXTRASAMPLES);
-		nfields--;
-		dirsize -= sizeof (TIFFDirEntry);
-	}								/*XXX*/
-	for (fi = 0, nfi = tif->tif_nfields; nfi > 0; nfi--, fi++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[fi];
-
-                /*
-                ** For custom fields, we test to see if the custom field
-                ** is set or not.  For normal fields, we just use the
-                ** FieldSet test. 
-                */
-                if( fip->field_bit == FIELD_CUSTOM )
-                {
-                    int ci, is_set = FALSE;
-
-                    for( ci = 0; ci < td->td_customValueCount; ci++ )
-                        is_set |= (td->td_customValues[ci].info == fip);
-
-                    if( !is_set )
-                        continue;
-                }
-		else if (!FieldSet(fields, fip->field_bit))
-                    continue;
-
-
-                /*
-                ** Handle other fields.
-                */
-		switch (fip->field_bit)
-                {
-		case FIELD_STRIPOFFSETS:
-			/*
-			 * We use one field bit for both strip and tile
-
-			 * offsets, and so must be careful in selecting
-			 * the appropriate field descriptor (so that tags
-			 * are written in sorted order).
-			 */
-			tag = isTiled(tif) ?
-			    TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS;
-			if (tag != fip->field_tag)
-				continue;
-			if (!TIFFWriteLongArray(tif, TIFF_LONG, tag, dir,
-			    (uint32) td->td_nstrips, td->td_stripoffset))
-				goto bad;
-			break;
-		case FIELD_STRIPBYTECOUNTS:
-			/*
-			 * We use one field bit for both strip and tile
-			 * byte counts, and so must be careful in selecting
-			 * the appropriate field descriptor (so that tags
-			 * are written in sorted order).
-			 */
-			tag = isTiled(tif) ?
-			    TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS;
-			if (tag != fip->field_tag)
-				continue;
-			if (!TIFFWriteLongArray(tif, TIFF_LONG, tag, dir,
-			    (uint32) td->td_nstrips, td->td_stripbytecount))
-				goto bad;
-			break;
-		case FIELD_ROWSPERSTRIP:
-			TIFFSetupShortLong(tif, TIFFTAG_ROWSPERSTRIP,
-			    dir, td->td_rowsperstrip);
-			break;
-		case FIELD_COLORMAP:
-			if (!TIFFWriteShortTable(tif, TIFFTAG_COLORMAP, dir,
-			    3, td->td_colormap))
-				goto bad;
-			break;
-		case FIELD_IMAGEDIMENSIONS:
-			TIFFSetupShortLong(tif, TIFFTAG_IMAGEWIDTH,
-			    dir++, td->td_imagewidth);
-			TIFFSetupShortLong(tif, TIFFTAG_IMAGELENGTH,
-			    dir, td->td_imagelength);
-			break;
-		case FIELD_TILEDIMENSIONS:
-			TIFFSetupShortLong(tif, TIFFTAG_TILEWIDTH,
-			    dir++, td->td_tilewidth);
-			TIFFSetupShortLong(tif, TIFFTAG_TILELENGTH,
-			    dir, td->td_tilelength);
-			break;
-		case FIELD_COMPRESSION:
-			TIFFSetupShort(tif, TIFFTAG_COMPRESSION,
-			    dir, td->td_compression);
-			break;
-		case FIELD_PHOTOMETRIC:
-			TIFFSetupShort(tif, TIFFTAG_PHOTOMETRIC,
-			    dir, td->td_photometric);
-			break;
-		case FIELD_POSITION:
-			WriteRationalPair(TIFF_RATIONAL,
-			    TIFFTAG_XPOSITION, td->td_xposition,
-			    TIFFTAG_YPOSITION, td->td_yposition);
-			break;
-		case FIELD_RESOLUTION:
-			WriteRationalPair(TIFF_RATIONAL,
-			    TIFFTAG_XRESOLUTION, td->td_xresolution,
-			    TIFFTAG_YRESOLUTION, td->td_yresolution);
-			break;
-		case FIELD_BITSPERSAMPLE:
-		case FIELD_MINSAMPLEVALUE:
-		case FIELD_MAXSAMPLEVALUE:
-		case FIELD_SAMPLEFORMAT:
-			if (!TIFFWritePerSampleShorts(tif, fip->field_tag, dir))
-				goto bad;
-			break;
-		case FIELD_SMINSAMPLEVALUE:
-		case FIELD_SMAXSAMPLEVALUE:
-			if (!TIFFWritePerSampleAnys(tif,
-			    _TIFFSampleToTagType(tif), fip->field_tag, dir))
-				goto bad;
-			break;
-		case FIELD_PAGENUMBER:
-		case FIELD_HALFTONEHINTS:
-#ifdef YCBCR_SUPPORT
-		case FIELD_YCBCRSUBSAMPLING:
-#endif
-#ifdef CMYK_SUPPORT
-		case FIELD_DOTRANGE:
-#endif
-			if (!TIFFSetupShortPair(tif, fip->field_tag, dir))
-				goto bad;
-			break;
-#ifdef CMYK_SUPPORT
-		case FIELD_INKNAMES:
-			if (!TIFFWriteInkNames(tif, dir))
-				goto bad;
-			break;
-#endif
-#ifdef COLORIMETRY_SUPPORT
-		case FIELD_TRANSFERFUNCTION:
-			if (!TIFFWriteTransferFunction(tif, dir))
-				goto bad;
-			break;
-#endif
-#if SUBIFD_SUPPORT
-		case FIELD_SUBIFD:
-			if (!TIFFWriteNormalTag(tif, dir, fip))
-				goto bad;
-			/*
-			 * Total hack: if this directory includes a SubIFD
-			 * tag then force the next <n> directories to be
-			 * written as ``sub directories'' of this one.  This
-			 * is used to write things like thumbnails and
-			 * image masks that one wants to keep out of the
-			 * normal directory linkage access mechanism.
-			 */
-			if (dir->tdir_count > 0) {
-				tif->tif_flags |= TIFF_INSUBIFD;
-				tif->tif_nsubifd = (uint16) dir->tdir_count;
-				if (dir->tdir_count > 1)
-					tif->tif_subifdoff = dir->tdir_offset;
-				else
-					tif->tif_subifdoff = (uint32)(
-					      tif->tif_diroff
-					    + sizeof (uint16)
-					    + ((char*)&dir->tdir_offset-data));
-			}
-			break;
-#endif
-		default:
-			if (!TIFFWriteNormalTag(tif, dir, fip))
-				goto bad;
-			break;
-		}
-		dir++;
-                
-                if( fip->field_bit != FIELD_CUSTOM )
-                    ResetFieldBit(fields, fip->field_bit);
-	}
-
-	/*
-	 * Write directory.
-	 */
-	dircount = (uint16) nfields;
-	diroff = (uint32) tif->tif_nextdiroff;
-	if (tif->tif_flags & TIFF_SWAB) {
-		/*
-		 * The file's byte order is opposite to the
-		 * native machine architecture.  We overwrite
-		 * the directory information with impunity
-		 * because it'll be released below after we
-		 * write it to the file.  Note that all the
-		 * other tag construction routines assume that
-		 * we do this byte-swapping; i.e. they only
-		 * byte-swap indirect data.
-		 */
-		for (dir = (TIFFDirEntry*) data; dircount; dir++, dircount--) {
-			TIFFSwabArrayOfShort(&dir->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dir->tdir_count, 2);
-		}
-		dircount = (uint16) nfields;
-		TIFFSwabShort(&dircount);
-		TIFFSwabLong(&diroff);
-	}
-	(void) TIFFSeekFile(tif, tif->tif_diroff, SEEK_SET);
-	if (!WriteOK(tif, &dircount, sizeof (dircount))) {
-		TIFFError(tif->tif_name, "Error writing directory count");
-		goto bad;
-	}
-	if (!WriteOK(tif, data, dirsize)) {
-		TIFFError(tif->tif_name, "Error writing directory contents");
-		goto bad;
-	}
-	if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-		TIFFError(tif->tif_name, "Error writing directory link");
-		goto bad;
-	}
-	if (done) {
-		TIFFFreeDirectory(tif);
-		tif->tif_flags &= ~TIFF_DIRTYDIRECT;
-		(*tif->tif_cleanup)(tif);
-
-		/*
-		* Reset directory-related state for subsequent
-		* directories.
-		*/
-		TIFFCreateDirectory(tif);
-	}
-	_TIFFfree(data);
-	return (1);
-bad:
-	_TIFFfree(data);
-	return (0);
-}
-#undef WriteRationalPair
-
-int
-TIFFWriteDirectory(TIFF* tif)
-{
-	return _TIFFWriteDirectory(tif, TRUE);
-}
-
-/*
- * Similar to TIFFWriteDirectory(), writes the directory out
- * but leaves all data structures in memory so that it can be
- * written again.  This will make a partially written TIFF file
- * readable before it is successfully completed/closed.
- */ 
-int
-TIFFCheckpointDirectory(TIFF* tif)
-{
-	int rc;
-	/* Setup the strips arrays, if they haven't already been. */
-	if (tif->tif_dir.td_stripoffset == NULL)
-	    (void) TIFFSetupStrips(tif);
-	rc = _TIFFWriteDirectory(tif, FALSE);
-	(void) TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END));
-	return rc;
-}
-
-/*
- * Process tags that are not special cased.
- */
-static int
-TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
-{
-	u_short wc = (u_short) fip->field_writecount;
-	uint32 wc2;
-
-	dir->tdir_tag = (uint16) fip->field_tag;
-	dir->tdir_type = (u_short) fip->field_type;
-	dir->tdir_count = wc;
-#define	WRITEF(x,y)	x(tif, fip->field_type, fip->field_tag, dir, wc, y)
-	switch (fip->field_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (wc > 1) {
-			uint16* wp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &wp);
-			else
-				TIFFGetField(tif, fip->field_tag, &wp);
-			if (!WRITEF(TIFFWriteShortArray, wp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				uint16* wp;
-				TIFFGetField(tif, fip->field_tag, &wc, &wp);
-				if (!WRITEF(TIFFWriteShortArray, wp))
-					return 0;
-			} else {
-				uint16 sv;
-				TIFFGetField(tif, fip->field_tag, &sv);
-				dir->tdir_offset =
-					TIFFInsertData(tif, dir->tdir_type, sv);
-			}
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-	case TIFF_IFD:
-		if (wc > 1) {
-			uint32* lp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &lp);
-			else
-				TIFFGetField(tif, fip->field_tag, &lp);
-			if (!WRITEF(TIFFWriteLongArray, lp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				uint32* lp;
-				TIFFGetField(tif, fip->field_tag, &wc, &lp);
-				if (!WRITEF(TIFFWriteLongArray, lp))
-					return 0;
-			} else {
-				/* XXX handle LONG->SHORT conversion */
-				TIFFGetField(tif, fip->field_tag,
-					     &dir->tdir_offset);
-			}
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-			else
-				TIFFGetField(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteRationalArray, fp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				float* fp;
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-				if (!WRITEF(TIFFWriteRationalArray, fp))
-					return 0;
-			} else {
-				float fv;
-				TIFFGetField(tif, fip->field_tag, &fv);
-				if (!WRITEF(TIFFWriteRationalArray, &fv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_FLOAT:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-			else
-				TIFFGetField(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteFloatArray, fp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				float* fp;
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-				if (!WRITEF(TIFFWriteFloatArray, fp))
-					return 0;
-			} else {
-				float fv;
-				TIFFGetField(tif, fip->field_tag, &fv);
-				if (!WRITEF(TIFFWriteFloatArray, &fv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_DOUBLE:
-		if (wc > 1) {
-			double* dp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &dp);
-			else
-				TIFFGetField(tif, fip->field_tag, &dp);
-			if (!WRITEF(TIFFWriteDoubleArray, dp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				double* dp;
-				TIFFGetField(tif, fip->field_tag, &wc, &dp);
-				if (!WRITEF(TIFFWriteDoubleArray, dp))
-					return 0;
-			} else {
-				double dv;
-				TIFFGetField(tif, fip->field_tag, &dv);
-				if (!WRITEF(TIFFWriteDoubleArray, &dv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_ASCII:
-		{ char* cp;
-		  TIFFGetField(tif, fip->field_tag, &cp);
-		  dir->tdir_count = (uint32) (strlen(cp) + 1);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-
-        /* added based on patch request from MARTIN.MCBRIDE.MM at agfa.co.uk,
-           correctness not verified (FW, 99/08) */
-        case TIFF_BYTE:
-        case TIFF_SBYTE:          
-		if (wc > 1) {
-			char* cp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount) {
-				TIFFGetField(tif, fip->field_tag, &wc, &cp);
-				dir->tdir_count = wc;
-			} else if (wc == (u_short) TIFF_VARIABLE2) {
-				TIFFGetField(tif, fip->field_tag, &wc2, &cp);
-				dir->tdir_count = wc2;
-			} else
-				TIFFGetField(tif, fip->field_tag, &cp);
-			if (!TIFFWriteByteArray(tif, dir, cp))
-				return (0);
-                } else {
-			if (fip->field_passcount) {
-				char* cp;
-				TIFFGetField(tif, fip->field_tag, &wc, &cp);
-				dir->tdir_count = wc;
-				if (!TIFFWriteByteArray(tif, dir, cp))
-					return 0;
-			} else {
-				char cv;
-				TIFFGetField(tif, fip->field_tag, &cv);
-				if (!TIFFWriteByteArray(tif, dir, &cv))
-					return (0);
-			}
-                }
-                break;
-
-	case TIFF_UNDEFINED:
-		{ char* cp;
-		  if (wc == (u_short) TIFF_VARIABLE) {
-			TIFFGetField(tif, fip->field_tag, &wc, &cp);
-			dir->tdir_count = wc;
-		  } else if (wc == (u_short) TIFF_VARIABLE2) {
-			TIFFGetField(tif, fip->field_tag, &wc2, &cp);
-			dir->tdir_count = wc2;
-		  } else 
-			TIFFGetField(tif, fip->field_tag, &cp);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-
-        case TIFF_NOTYPE:
-                break;
-	}
-	return (1);
-}
-#undef WRITEF
-
-/*
- * Setup a directory entry with either a SHORT
- * or LONG type according to the value.
- */
-static void
-TIFFSetupShortLong(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint32 v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_count = 1;
-	if (v > 0xffffL) {
-		dir->tdir_type = (short) TIFF_LONG;
-		dir->tdir_offset = v;
-	} else {
-		dir->tdir_type = (short) TIFF_SHORT;
-		dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
-	}
-}
-
-/*
- * Setup a SHORT directory entry
- */
-static void
-TIFFSetupShort(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint16 v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_count = 1;
-	dir->tdir_type = (short) TIFF_SHORT;
-	dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
-}
-#undef MakeShortDirent
-
-#ifndef TIFFWriteRational
-/*
- * Setup a RATIONAL directory entry and
- * write the associated indirect value.
- */
-static int
-TIFFWriteRational(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, float v)
-{
-	return (TIFFWriteRationalArray(tif, type, tag, dir, 1, &v));
-}
-#endif
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Setup a directory entry that references a
- * samples/pixel array of SHORT values and
- * (potentially) write the associated indirect
- * values.
- */
-static int
-TIFFWritePerSampleShorts(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 buf[10], v;
-	uint16* w = buf;
-	int i, status, samples = tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree((char*) w);
-	return (status);
-}
-
-/*
- * Setup a directory entry that references a samples/pixel array of ``type''
- * values and (potentially) write the associated indirect values.  The source
- * data from TIFFGetField() for the specified tag must be returned as double.
- */
-static int
-TIFFWritePerSampleAnys(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir)
-{
-	double buf[10], v;
-	double* w = buf;
-	int i, status;
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (double*) _TIFFmalloc(samples * sizeof (double));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteAnyArray(tif, type, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Setup a pair of shorts that are returned by
- * value, rather than as a reference to an array.
- */
-static int
-TIFFSetupShortPair(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 v[2];
-
-	TIFFGetField(tif, tag, &v[0], &v[1]);
-	return (TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, 2, v));
-}
-
-/*
- * Setup a directory entry for an NxM table of shorts,
- * where M is known to be 2**bitspersample, and write
- * the associated indirect data.
- */
-static int
-TIFFWriteShortTable(TIFF* tif,
-    ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16** table)
-{
-	uint32 i, off;
-
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) TIFF_SHORT;
-	/* XXX -- yech, fool TIFFWriteData */
-	dir->tdir_count = (uint32) (1L<<tif->tif_dir.td_bitspersample);
-	off = tif->tif_dataoff;
-	for (i = 0; i < n; i++)
-		if (!TIFFWriteData(tif, dir, (char *)table[i]))
-			return (0);
-	dir->tdir_count *= n;
-	dir->tdir_offset = off;
-	return (1);
-}
-
-/*
- * Write/copy data associated with an ASCII or opaque tag value.
- */
-static int
-TIFFWriteByteArray(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count > 4) {
-		if (!TIFFWriteData(tif, dir, cp))
-			return (0);
-	} else
-		_TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count);
-	return (1);
-}
-
-/*
- * Setup a directory entry of an array of SHORT
- * or SSHORT and write the associated indirect values.
- */
-static int
-TIFFWriteShortArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			dir->tdir_offset = (uint32) ((long) v[0] << 16);
-			if (n == 2)
-				dir->tdir_offset |= v[1] & 0xffff;
-		} else {
-			dir->tdir_offset = v[0] & 0xffff;
-			if (n == 2)
-				dir->tdir_offset |= (long) v[1] << 16;
-		}
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of LONG
- * or SLONG and write the associated indirect values.
- */
-static int
-TIFFWriteLongArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint32* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n == 1) {
-		dir->tdir_offset = v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of RATIONAL
- * or SRATIONAL and write the associated indirect values.
- */
-static int
-TIFFWriteRationalArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	uint32 i;
-	uint32* t;
-	int status;
-
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	t = (uint32*) _TIFFmalloc(2*n * sizeof (uint32));
-	for (i = 0; i < n; i++) {
-		float fv = v[i];
-		int sign = 1;
-		uint32 den;
-
-		if (fv < 0) {
-			if (type == TIFF_RATIONAL) {
-				TIFFWarning(tif->tif_name,
-	"\"%s\": Information lost writing value (%g) as (unsigned) RATIONAL",
-				_TIFFFieldWithTag(tif,tag)->field_name, fv);
-				fv = 0;
-			} else
-				fv = -fv, sign = -1;
-		}
-		den = 1L;
-		if (fv > 0) {
-			while (fv < 1L<<(31-3) && den < 1L<<(31-3))
-				fv *= 1<<3, den *= 1L<<3;
-		}
-		t[2*i+0] = (uint32) (sign * (fv + 0.5));
-		t[2*i+1] = den;
-	}
-	status = TIFFWriteData(tif, dir, (char *)t);
-	_TIFFfree((char*) t);
-	return (status);
-}
-
-static int
-TIFFWriteFloatArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEFloat(tif, n, v);
-	if (n == 1) {
-		dir->tdir_offset = *(uint32*) &v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-static int
-TIFFWriteDoubleArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEDouble(tif, n, v);
-	return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Write an array of ``type'' values for a specified tag (i.e. this is a tag
- * which is allowed to have different types, e.g. SMaxSampleType).
- * Internally the data values are represented as double since a double can
- * hold any of the TIFF tag types (yes, this should really be an abstract
- * type tany_t for portability).  The data is converted into the specified
- * type in a temporary buffer and then handed off to the appropriate array
- * writer.
- */
-static int
-TIFFWriteAnyArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	char buf[10 * sizeof(double)];
-	char* w = buf;
-	int i, status = 0;
-
-	if (n * TIFFDataWidth(type) > sizeof buf)
-		w = (char*) _TIFFmalloc(n * TIFFDataWidth(type));
-	switch (type) {
-	case TIFF_BYTE:
-		{ uint8* bp = (uint8*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint8) v[i];
-		  dir->tdir_tag = (uint16) tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SBYTE:
-		{ int8* bp = (int8*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int8) v[i];
-		  dir->tdir_tag = (uint16) tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SHORT:
-		{ uint16* bp = (uint16*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-				goto out;
-		}
-		break;
-	case TIFF_SSHORT:
-		{ int16* bp = (int16*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-			goto out;
-		}
-		break;
-	case TIFF_LONG:
-		{ uint32* bp = (uint32*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_SLONG:
-		{ int32* bp = (int32*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, (uint32*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_FLOAT:
-		{ float* bp = (float*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (float) v[i];
-		  if (!TIFFWriteFloatArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFWriteDoubleArray(tif, type, tag, dir, n, v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		/* TIFF_RATIONAL */
-		/* TIFF_SRATIONAL */
-		goto out;
-	}
-	status = 1;
- out:
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-
-#ifdef COLORIMETRY_SUPPORT
-static int
-TIFFWriteTransferFunction(TIFF* tif, TIFFDirEntry* dir)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	tsize_t n = (1L<<td->td_bitspersample) * sizeof (uint16);
-	uint16** tf = td->td_transferfunction;
-	int ncols;
-
-	/*
-	 * Check if the table can be written as a single column,
-	 * or if it must be written as 3 columns.  Note that we
-	 * write a 3-column tag if there are 2 samples/pixel and
-	 * a single column of data won't suffice--hmm.
-	 */
-	switch (td->td_samplesperpixel - td->td_extrasamples) {
-	default:	if (_TIFFmemcmp(tf[0], tf[2], n)) { ncols = 3; break; }
-	case 2:		if (_TIFFmemcmp(tf[0], tf[1], n)) { ncols = 3; break; }
-	case 1: case 0:	ncols = 1;
-	}
-	return (TIFFWriteShortTable(tif,
-	    TIFFTAG_TRANSFERFUNCTION, dir, ncols, tf));
-}
-#endif
-
-#ifdef CMYK_SUPPORT
-static int
-TIFFWriteInkNames(TIFF* tif, TIFFDirEntry* dir)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-
-	dir->tdir_tag = TIFFTAG_INKNAMES;
-	dir->tdir_type = (short) TIFF_ASCII;
-	dir->tdir_count = td->td_inknameslen;
-	return (TIFFWriteByteArray(tif, dir, td->td_inknames));
-}
-#endif
-
-/*
- * Write a contiguous directory item.
- */
-static int
-TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	tsize_t cc;
-
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	dir->tdir_offset = tif->tif_dataoff;
-	cc = dir->tdir_count * TIFFDataWidth((TIFFDataType) dir->tdir_type);
-	if (SeekOK(tif, dir->tdir_offset) &&
-	    WriteOK(tif, cp, cc)) {
-		tif->tif_dataoff += (cc + 1) & ~1;
-		return (1);
-	}
-	TIFFError(tif->tif_name, "Error writing data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return (0);
-}
-
-/*
- * Similar to TIFFWriteDirectory(), but if the directory has already
- * been written once, it is relocated to the end of the file, in case it
- * has changed in size.  Note that this will result in the loss of the 
- * previously used directory space. 
- */ 
-
-int 
-TIFFRewriteDirectory( TIFF *tif )
-{
-    static const char module[] = "TIFFRewriteDirectory";
-
-    /* We don't need to do anything special if it hasn't been written. */
-    if( tif->tif_diroff == 0 )
-        return TIFFWriteDirectory( tif );
-
-    /*
-    ** Find and zero the pointer to this directory, so that TIFFLinkDirectory
-    ** will cause it to be added after this directories current pre-link.
-    */
-    
-    /* Is it the first directory in the file? */
-    if (tif->tif_header.tiff_diroff == tif->tif_diroff) 
-    {
-        tif->tif_header.tiff_diroff = 0;
-        tif->tif_diroff = 0;
-
-#if defined(__hpux) && defined(__LP64__)
-#define HDROFF(f) ((toff_t)(unsigned long) &(((TIFFHeader*) 0)->f))
-#else
-#define	HDROFF(f)	((toff_t) &(((TIFFHeader*) 0)->f))
-#endif
-        TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
-        if (!WriteOK(tif, &(tif->tif_header.tiff_diroff), 
-                     sizeof (tif->tif_diroff))) 
-        {
-            TIFFError(tif->tif_name, "Error updating TIFF header");
-            return (0);
-        }
-    }
-    else
-    {
-        toff_t  nextdir, off;
-
-	nextdir = tif->tif_header.tiff_diroff;
-	do {
-		uint16 dircount;
-
-		if (!SeekOK(tif, nextdir) ||
-		    !ReadOK(tif, &dircount, sizeof (dircount))) {
-			TIFFError(module, "Error fetching directory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		(void) TIFFSeekFile(tif,
-		    dircount * sizeof (TIFFDirEntry), SEEK_CUR);
-		if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
-			TIFFError(module, "Error fetching directory link");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&nextdir);
-	} while (nextdir != tif->tif_diroff && nextdir != 0);
-        off = TIFFSeekFile(tif, 0, SEEK_CUR); /* get current offset */
-        (void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
-        tif->tif_diroff = 0;
-	if (!WriteOK(tif, &(tif->tif_diroff), sizeof (nextdir))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-    }
-
-    /*
-    ** Now use TIFFWriteDirectory() normally.
-    */
-
-    return TIFFWriteDirectory( tif );
-}
-
-
-/*
- * Link the current directory into the
- * directory chain for the file.
- */
-static int
-TIFFLinkDirectory(TIFF* tif)
-{
-	static const char module[] = "TIFFLinkDirectory";
-	toff_t nextdir;
-	toff_t diroff, off;
-
-	tif->tif_diroff = (TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
-	diroff = tif->tif_diroff;
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&diroff);
-#if SUBIFD_SUPPORT
-	if (tif->tif_flags & TIFF_INSUBIFD) {
-		(void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(module,
-			    "%s: Error writing SubIFD directory link",
-			    tif->tif_name);
-			return (0);
-		}
-		/*
-		 * Advance to the next SubIFD or, if this is
-		 * the last one configured, revert back to the
-		 * normal directory linkage.
-		 */
-		if (--tif->tif_nsubifd)
-			tif->tif_subifdoff += sizeof (diroff);
-		else
-			tif->tif_flags &= ~TIFF_INSUBIFD;
-		return (1);
-	}
-#endif
-	if (tif->tif_header.tiff_diroff == 0) {
-		/*
-		 * First directory, overwrite offset in header.
-		 */
-		tif->tif_header.tiff_diroff = tif->tif_diroff;
-#define	HDROFF(f)	((toff_t) &(((TIFFHeader*) 0)->f))
-		(void) TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(tif->tif_name, "Error writing TIFF header");
-			return (0);
-		}
-		return (1);
-	}
-	/*
-	 * Not the first directory, search to the last and append.
-	 */
-	nextdir = tif->tif_header.tiff_diroff;
-	do {
-		uint16 dircount;
-
-		if (!SeekOK(tif, nextdir) ||
-		    !ReadOK(tif, &dircount, sizeof (dircount))) {
-			TIFFError(module, "Error fetching directory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		(void) TIFFSeekFile(tif,
-		    dircount * sizeof (TIFFDirEntry), SEEK_CUR);
-		if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
-			TIFFError(module, "Error fetching directory link");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&nextdir);
-	} while (nextdir != 0);
-        off = TIFFSeekFile(tif, 0, SEEK_CUR); /* get current offset */
-        (void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
-	if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-	return (1);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_dumpmode.c b/tkimg1.3/libtiff/libtiff/tif_dumpmode.c
deleted file mode 100644
index ce4da04..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_dumpmode.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_dumpmode.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * "Null" Compression Algorithm Support.
- */
-#include "tiffiop.h"
-#include <assert.h>
-
-/*
- * Encode a hunk of pixels.
- */
-static int
-DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) s;
-	while (cc > 0) {
-		tsize_t n;
-
-		n = cc;
-		if (tif->tif_rawcc + n > tif->tif_rawdatasize)
-			n = tif->tif_rawdatasize - tif->tif_rawcc;
-
-                assert( n > 0 );
-                
-		/*
-		 * Avoid copy if client has setup raw
-		 * data buffer to avoid extra copy.
-		 */
-		if (tif->tif_rawcp != pp)
-			_TIFFmemcpy(tif->tif_rawcp, pp, n);
-		tif->tif_rawcp += n;
-		tif->tif_rawcc += n;
-		pp += n;
-		cc -= n;
-		if (tif->tif_rawcc >= tif->tif_rawdatasize &&
-		    !TIFFFlushData1(tif))
-			return (-1);
-	}
-	return (1);
-}
-
-/*
- * Decode a hunk of pixels.
- */
-static int
-DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	(void) s;
-	if (tif->tif_rawcc < cc) {
-		TIFFError(tif->tif_name,
-		    "DumpModeDecode: Not enough data for scanline %d",
-		    tif->tif_row);
-		return (0);
-	}
-	/*
-	 * Avoid copy if client has setup raw
-	 * data buffer to avoid extra copy.
-	 */
-	if (tif->tif_rawcp != buf)
-		_TIFFmemcpy(buf, tif->tif_rawcp, cc);
-	tif->tif_rawcp += cc;
-	tif->tif_rawcc -= cc;
-	return (1);
-}
-
-/*
- * Seek forwards nrows in the current strip.
- */
-static int
-DumpModeSeek(TIFF* tif, uint32 nrows)
-{
-	tif->tif_rawcp += nrows * tif->tif_scanlinesize;
-	tif->tif_rawcc -= nrows * tif->tif_scanlinesize;
-	return (1);
-}
-
-/*
- * Initialize dump mode.
- */
-int
-TIFFInitDumpMode(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = DumpModeDecode;
-	tif->tif_decodestrip = DumpModeDecode;
-	tif->tif_decodetile = DumpModeDecode;
-	tif->tif_encoderow = DumpModeEncode;
-	tif->tif_encodestrip = DumpModeEncode;
-	tif->tif_encodetile = DumpModeEncode;
-	tif->tif_seek = DumpModeSeek;
-	return (1);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_error.c b/tkimg1.3/libtiff/libtiff/tif_error.c
deleted file mode 100644
index 0714e83..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_error.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_error.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-TIFFErrorHandler
-TIFFSetErrorHandler(TIFFErrorHandler handler)
-{
-	TIFFErrorHandler prev = _TIFFerrorHandler;
-	_TIFFerrorHandler = handler;
-	return (prev);
-}
-
-void
-TIFFError(const char* module, const char* fmt, ...)
-{
-	if (_TIFFerrorHandler) {
-		va_list ap;
-		va_start(ap, fmt);
-		(*_TIFFerrorHandler)(module, fmt, ap);
-		va_end(ap);
-	}
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_extension.c b/tkimg1.3/libtiff/libtiff/tif_extension.c
deleted file mode 100644
index 40f3670..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_extension.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_extension.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Various routines support external extension of the tag set, and other
- * application extension capabilities. 
- */
-
-#include "tiffiop.h"
-
-int TIFFGetTagListCount( TIFF *tif )
-
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    
-    return td->td_customValueCount;
-}
-
-ttag_t TIFFGetTagListEntry( TIFF *tif, int tag_index )
-
-{
-    TIFFDirectory* td = &tif->tif_dir;
-
-    if( tag_index < 0 || tag_index >= td->td_customValueCount )
-        return (ttag_t) -1;
-    else
-        return td->td_customValues[tag_index].info->field_tag;
-}
-
-/*
-** This provides read/write access to the TIFFTagMethods within the TIFF
-** structure to application code without giving access to the private
-** TIFF structure.
-*/
-TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif )
-
-{
-    return &(tif->tif_tagmethods);
-}
-
-void *TIFFGetClientInfo( TIFF *tif, const char *name )
-
-{
-    TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-    while( link != NULL && strcmp(link->name,name) != 0 )
-        link = link->next;
-
-    if( link != NULL )
-        return link->data;
-    else
-        return NULL;
-}
-
-void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
-
-{
-    TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-    /*
-    ** Do we have an existing link with this name?  If so, just
-    ** set it.
-    */
-    while( link != NULL && strcmp(link->name,name) != 0 )
-        link = link->next;
-
-    if( link != NULL )
-    {
-        link->data = data;
-        return;
-    }
-
-    /*
-    ** Create a new link.
-    */
-
-    link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
-    link->next = tif->tif_clientinfo;
-    link->name = (char *) _TIFFmalloc(strlen(name)+1);
-    strcpy(link->name, name);
-    link->data = data;
-
-    tif->tif_clientinfo = link;
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_fax3.c b/tkimg1.3/libtiff/libtiff/tif_fax3.c
deleted file mode 100644
index 3e73d79..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_fax3.c
+++ /dev/null
@@ -1,1515 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_fax3.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef CCITT_SUPPORT
-/*
- * TIFF Library.
- *
- * CCITT Group 3 (T.4) and Group 4 (T.6) Compression Support.
- *
- * This file contains support for decoding and encoding TIFF
- * compression algorithms 2, 3, 4, and 32771.
- *
- * Decoder support is derived, with permission, from the code
- * in Frank Cringle's viewfax program;
- *      Copyright (C) 1990, 1995  Frank D. Cringle.
- */
-#include "tif_fax3.h"
-#define	G3CODES
-#include "t4.h"
-#include <assert.h>
-#include <stdio.h>
-
-/*
- * Compression+decompression state blocks are
- * derived from this ``base state'' block.
- */
-typedef struct {
-        int     rw_mode;                /* O_RDONLY for decode, else encode */
-	int	mode;			/* operating mode */
-	uint32	rowbytes;		/* bytes in a decoded scanline */
-	uint32	rowpixels;		/* pixels in a scanline */
-
-	uint16	cleanfaxdata;		/* CleanFaxData tag */
-	uint32	badfaxrun;		/* BadFaxRun tag */
-	uint32	badfaxlines;		/* BadFaxLines tag */
-	uint32	groupoptions;		/* Group 3/4 options tag */
-	uint32	recvparams;		/* encoded Class 2 session params */
-	char*	subaddress;		/* subaddress string */
-	uint32	recvtime;		/* time spent receiving (secs) */
-	TIFFVGetMethod vgetparent;	/* super-class method */
-	TIFFVSetMethod vsetparent;	/* super-class method */
-} Fax3BaseState;
-#define	Fax3State(tif)		((Fax3BaseState*) (tif)->tif_data)
-
-typedef enum { G3_1D, G3_2D } Ttag;
-typedef struct {
-	Fax3BaseState b;
-
-	/* Decoder state info */
-	const u_char* bitmap;		/* bit reversal table */
-	uint32	data;			/* current i/o byte/word */
-	int	bit;			/* current i/o bit in byte */
-	int	EOLcnt;			/* count of EOL codes recognized */
-	TIFFFaxFillFunc fill;		/* fill routine */
-	uint32*	runs;			/* b&w runs for current/previous row */
-	uint32*	refruns;		/* runs for reference line */
-	uint32*	curruns;		/* runs for current line */
-
-	/* Encoder state info */
-	Ttag    tag;	                /* encoding state */
-	u_char*	refline;		/* reference line for 2d decoding */
-	int	k;			/* #rows left that can be 2d encoded */
-	int	maxk;			/* max #rows that can be 2d encoded */
-} Fax3CodecState;
-#define	DecoderState(tif)	((Fax3CodecState*) Fax3State(tif))
-#define	EncoderState(tif)	((Fax3CodecState*) Fax3State(tif))
-
-#define	is2DEncoding(sp) \
-	(sp->b.groupoptions & GROUP3OPT_2DENCODING)
-#define	isAligned(p,t)	((((u_long)(p)) & (sizeof (t)-1)) == 0)
-
-/*
- * Group 3 and Group 4 Decoding.
- */
-
-/*
- * These macros glue the TIFF library state to
- * the state expected by Frank's decoder.
- */
-#define	DECLARE_STATE(tif, sp, mod)					\
-    static const char module[] = mod;					\
-    Fax3CodecState* sp = DecoderState(tif);				\
-    int a0;				/* reference element */		\
-    int lastx = sp->b.rowpixels;	/* last element in row */	\
-    uint32 BitAcc;			/* bit accumulator */		\
-    int BitsAvail;			/* # valid bits in BitAcc */	\
-    int RunLength;			/* length of current run */	\
-    u_char* cp;				/* next byte of input data */	\
-    u_char* ep;				/* end of input data */		\
-    uint32* pa;				/* place to stuff next run */	\
-    uint32* thisrun;			/* current row's run array */	\
-    int EOLcnt;				/* # EOL codes recognized */	\
-    const u_char* bitmap = sp->bitmap;	/* input data bit reverser */	\
-    const TIFFFaxTabEnt* TabEnt
-#define	DECLARE_STATE_2D(tif, sp, mod)					\
-    DECLARE_STATE(tif, sp, mod);					\
-    int b1;				/* next change on prev line */	\
-    uint32* pb				/* next run in reference line */\
-/*
- * Load any state that may be changed during decoding.
- */
-#define	CACHE_STATE(tif, sp) do {					\
-    BitAcc = sp->data;							\
-    BitsAvail = sp->bit;						\
-    EOLcnt = sp->EOLcnt;						\
-    cp = (unsigned char*) tif->tif_rawcp;				\
-    ep = cp + tif->tif_rawcc;						\
-} while (0)
-/*
- * Save state possibly changed during decoding.
- */
-#define	UNCACHE_STATE(tif, sp) do {					\
-    sp->bit = BitsAvail;						\
-    sp->data = BitAcc;							\
-    sp->EOLcnt = EOLcnt;						\
-    tif->tif_rawcc -= (tidata_t) cp - tif->tif_rawcp;			\
-    tif->tif_rawcp = (tidata_t) cp;					\
-} while (0)
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-Fax3PreDecode(TIFF* tif, tsample_t s)
-{
-	Fax3CodecState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->bit = 0;			/* force initial read */
-	sp->data = 0;
-	sp->EOLcnt = 0;			/* force initial scan for EOL */
-	/*
-	 * Decoder assumes lsb-to-msb bit order.  Note that we select
-	 * this here rather than in Fax3SetupState so that viewers can
-	 * hold the image open, fiddle with the FillOrder tag value,
-	 * and then re-decode the image.  Otherwise they'd need to close
-	 * and open the image to get the state reset.
-	 */
-	sp->bitmap =
-	    TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB);
-	if (sp->refruns) {		/* init reference line to white */
-		sp->refruns[0] = (uint32) sp->b.rowpixels;
-		sp->refruns[1] = 0;
-	}
-	return (1);
-}
-
-/*
- * Routine for handling various errors/conditions.
- * Note how they are "glued into the decoder" by
- * overriding the definitions used by the decoder.
- */
-
-static void
-Fax3Unexpected(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFError(module, "%s: Bad code word at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	unexpected(table, a0)	Fax3Unexpected(module, tif, a0)
-
-static void
-Fax3Extension(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFError(module,
-	    "%s: Uncompressed data (not supported) at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	extension(a0)	Fax3Extension(module, tif, a0)
-
-static void
-Fax3BadLength(const char* module, TIFF* tif, uint32 a0, uint32 lastx)
-{
-	TIFFWarning(module, "%s: %s at scanline %d (got %lu, expected %lu)",
-	    tif->tif_name,
-	    a0 < lastx ? "Premature EOL" : "Line length mismatch",
-	    tif->tif_row, (u_long) a0, (u_long) lastx);
-}
-#define	badlength(a0,lastx)	Fax3BadLength(module, tif, a0, lastx)
-
-static void
-Fax3PrematureEOF(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFWarning(module, "%s: Premature EOF at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	prematureEOF(a0)	Fax3PrematureEOF(module, tif, a0)
-
-#define	Nop
-
-/*
- * Decode the requested amount of G3 1D-encoded data.
- */
-static int
-Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE(tif, sp, "Fax3Decode1D");
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	thisrun = sp->curruns;
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		SYNC_EOL(EOF1D);
-		EXPAND1D(EOF1Da);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOF1D:				/* premature EOF */
-		CLEANUP_RUNS();
-	EOF1Da:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-
-#define	SWAP(t,a,b)	{ t x; x = (a); (a) = (b); (b) = x; }
-/*
- * Decode the requested amount of G3 2D-encoded data.
- */
-static int
-Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE_2D(tif, sp, "Fax3Decode2D");
-	int is1D;			/* current line is 1d/2d-encoded */
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun = sp->curruns;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d EOLcnt = %d",
-		    BitAcc, BitsAvail, EOLcnt);
-#endif
-		SYNC_EOL(EOF2D);
-		NeedBits8(1, EOF2D);
-		is1D = GetBits(1);	/* 1D/2D-encoding tag bit */
-		ClrBits(1);
-#ifdef FAX3_DEBUG
-		printf(" %s\n-------------------- %d\n",
-		    is1D ? "1D" : "2D", tif->tif_row);
-		fflush(stdout);
-#endif
-		pb = sp->refruns;
-		b1 = *pb++;
-		if (is1D)
-			EXPAND1D(EOF2Da);
-		else
-			EXPAND2D(EOF2Da);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		SETVAL(0);		/* imaginary change for reference */
-		SWAP(uint32*, sp->curruns, sp->refruns);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOF2D:				/* premature EOF */
-		CLEANUP_RUNS();
-	EOF2Da:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-#undef SWAP
-
-/*
- * The ZERO & FILL macros must handle spans < 2*sizeof(long) bytes.
- * For machines with 64-bit longs this is <16 bytes; otherwise
- * this is <8 bytes.  We optimize the code here to reflect the
- * machine characteristics.
- */
-#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__)
-#define FILL(n, cp)							    \
-    switch (n) {							    \
-    case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\
-    case 12:(cp)[11] = 0xff; case 11:(cp)[10] = 0xff; case 10: (cp)[9] = 0xff;\
-    case  9: (cp)[8] = 0xff; case  8: (cp)[7] = 0xff; case  7: (cp)[6] = 0xff;\
-    case  6: (cp)[5] = 0xff; case  5: (cp)[4] = 0xff; case  4: (cp)[3] = 0xff;\
-    case  3: (cp)[2] = 0xff; case  2: (cp)[1] = 0xff;			      \
-    case  1: (cp)[0] = 0xff; (cp) += (n); case 0:  ;			      \
-    }
-#define ZERO(n, cp)							\
-    switch (n) {							\
-    case 15:(cp)[14] = 0; case 14:(cp)[13] = 0; case 13: (cp)[12] = 0;	\
-    case 12:(cp)[11] = 0; case 11:(cp)[10] = 0; case 10: (cp)[9] = 0;	\
-    case  9: (cp)[8] = 0; case  8: (cp)[7] = 0; case  7: (cp)[6] = 0;	\
-    case  6: (cp)[5] = 0; case  5: (cp)[4] = 0; case  4: (cp)[3] = 0;	\
-    case  3: (cp)[2] = 0; case  2: (cp)[1] = 0;			      	\
-    case  1: (cp)[0] = 0; (cp) += (n); case 0:  ;			\
-    }
-#else
-#define FILL(n, cp)							    \
-    switch (n) {							    \
-    case 7: (cp)[6] = 0xff; case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; \
-    case 4: (cp)[3] = 0xff; case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \
-    case 1: (cp)[0] = 0xff; (cp) += (n); case 0:  ;			    \
-    }
-#define ZERO(n, cp)							\
-    switch (n) {							\
-    case 7: (cp)[6] = 0; case 6: (cp)[5] = 0; case 5: (cp)[4] = 0;	\
-    case 4: (cp)[3] = 0; case 3: (cp)[2] = 0; case 2: (cp)[1] = 0;	\
-    case 1: (cp)[0] = 0; (cp) += (n); case 0:  ;			\
-    }
-#endif
-
-/*
- * Bit-fill a row according to the white/black
- * runs generated during G3/G4 decoding.
- */
-void
-_TIFFFax3fillruns(u_char* buf, uint32* runs, uint32* erun, uint32 lastx)
-{
-	static const unsigned char _fillmasks[] =
-	    { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
-	u_char* cp;
-	uint32 x, bx, run;
-	int32 n, nw;
-	long* lp;
-
-	if ((erun-runs)&1)
-	    *erun++ = 0;
-	x = 0;
-	for (; runs < erun; runs += 2) {
-	    run = runs[0];
-	    if (x+run > lastx || run > lastx )
-		run = runs[0] = (uint32) (lastx - x);
-	    if (run) {
-		cp = buf + (x>>3);
-		bx = x&7;
-		if (run > 8-bx) {
-		    if (bx) {			/* align to byte boundary */
-			*cp++ &= 0xff << (8-bx);
-			run -= 8-bx;
-		    }
-		    if( (n = run >> 3) != 0 ) {	/* multiple bytes to fill */
-			if ((n/sizeof (long)) > 1) {
-			    /*
-			     * Align to longword boundary and fill.
-			     */
-			    for (; n && !isAligned(cp, long); n--)
-				    *cp++ = 0x00;
-			    lp = (long*) cp;
-			    nw = (int32)(n / sizeof (long));
-			    n -= nw * sizeof (long);
-			    do {
-				    *lp++ = 0L;
-			    } while (--nw);
-			    cp = (u_char*) lp;
-			}
-			ZERO(n, cp);
-			run &= 7;
-		    }
-		    if (run)
-			cp[0] &= 0xff >> run;
-		} else
-		    cp[0] &= ~(_fillmasks[run]>>bx);
-		x += runs[0];
-	    }
-	    run = runs[1];
-	    if (x+run > lastx || run > lastx )
-		run = runs[1] = lastx - x;
-	    if (run) {
-		cp = buf + (x>>3);
-		bx = x&7;
-		if (run > 8-bx) {
-		    if (bx) {			/* align to byte boundary */
-			*cp++ |= 0xff >> bx;
-			run -= 8-bx;
-		    }
-		    if( (n = run>>3) != 0 ) {	/* multiple bytes to fill */
-			if ((n/sizeof (long)) > 1) {
-			    /*
-			     * Align to longword boundary and fill.
-			     */
-			    for (; n && !isAligned(cp, long); n--)
-				*cp++ = 0xff;
-			    lp = (long*) cp;
-			    nw = (int32)(n / sizeof (long));
-			    n -= nw * sizeof (long);
-			    do {
-				*lp++ = -1L;
-			    } while (--nw);
-			    cp = (u_char*) lp;
-			}
-			FILL(n, cp);
-			run &= 7;
-		    }
-		    if (run)
-			cp[0] |= 0xff00 >> run;
-		} else
-		    cp[0] |= _fillmasks[run]>>bx;
-		x += runs[1];
-	    }
-	}
-	assert(x == lastx);
-}
-#undef	ZERO
-#undef	FILL
-
-/*
- * Setup G3/G4-related compression/decompression state
- * before data is processed.  This routine is called once
- * per image -- it sets up different state based on whether
- * or not decoding or encoding is being done and whether
- * 1D- or 2D-encoded data is involved.
- */
-static int
-Fax3SetupState(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	Fax3BaseState* sp = Fax3State(tif);
-	long rowbytes, rowpixels;
-	int needsRefLine;
-	Fax3CodecState* dsp = DecoderState(tif);
-	uint32 nruns;
-
-	if (td->td_bitspersample != 1) {
-		TIFFError(tif->tif_name,
-		    "Bits/sample must be 1 for Group 3/4 encoding/decoding");
-		return (0);
-	}
-	/*
-	 * Calculate the scanline/tile widths.
-	 */
-	if (isTiled(tif)) {
-		rowbytes = TIFFTileRowSize(tif);
-		rowpixels = td->td_tilewidth;
-	} else {
-		rowbytes = TIFFScanlineSize(tif);
-		rowpixels = td->td_imagewidth;
-	}
-	sp->rowbytes = (uint32) rowbytes;
-	sp->rowpixels = (uint32) rowpixels;
-	/*
-	 * Allocate any additional space required for decoding/encoding.
-	 */
-	needsRefLine = (
-	    (sp->groupoptions & GROUP3OPT_2DENCODING) ||
-	    td->td_compression == COMPRESSION_CCITTFAX4
-	);
-
-	nruns = needsRefLine ? 2*TIFFroundup(rowpixels,32) : rowpixels;
-
-	dsp->runs = (uint32*) _TIFFmalloc((2*nruns+3)*sizeof (uint32));
-	if (dsp->runs == NULL) {
-		TIFFError("Fax3SetupState",
-		    "%s: No space for Group 3/4 run arrays",
-		    tif->tif_name);
-		return (0);
-	}
-	dsp->curruns = dsp->runs;
-	if (needsRefLine)
-		dsp->refruns = dsp->runs + (nruns>>1);
-	else
-		dsp->refruns = NULL;
-	if (is2DEncoding(dsp)) {	/* NB: default is 1D routine */
-		tif->tif_decoderow = Fax3Decode2D;
-		tif->tif_decodestrip = Fax3Decode2D;
-		tif->tif_decodetile = Fax3Decode2D;
-	}
-
-	if (needsRefLine) {		/* 2d encoding */
-		Fax3CodecState* esp = EncoderState(tif);
-		/*
-		 * 2d encoding requires a scanline
-		 * buffer for the ``reference line''; the
-		 * scanline against which delta encoding
-		 * is referenced.  The reference line must
-		 * be initialized to be ``white'' (done elsewhere).
-		 */
-		esp->refline = (u_char*) _TIFFmalloc(rowbytes);
-		if (esp->refline == NULL) {
-			TIFFError("Fax3SetupState",
-			    "%s: No space for Group 3/4 reference line",
-			    tif->tif_name);
-			return (0);
-		}
-	} else					/* 1d encoding */
-		EncoderState(tif)->refline = NULL;
-	return (1);
-}
-
-/*
- * CCITT Group 3 FAX Encoding.
- */
-
-#define	Fax3FlushBits(tif, sp) {				\
-	if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize)		\
-		(void) TIFFFlushData1(tif);			\
-	*(tif)->tif_rawcp++ = (tidataval_t) (sp)->data;		\
-	(tif)->tif_rawcc++;					\
-	(sp)->data = 0, (sp)->bit = 8;				\
-}
-#define	_FlushBits(tif) {					\
-	if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize)		\
-		(void) TIFFFlushData1(tif);			\
-	*(tif)->tif_rawcp++ = (tidataval_t) data;		\
-	(tif)->tif_rawcc++;					\
-	data = 0, bit = 8;					\
-}
-static const int _msbmask[9] =
-    { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
-#define	_PutBits(tif, bits, length) {				\
-	while (length > bit) {					\
-		data |= bits >> (length - bit);			\
-		length -= bit;					\
-		_FlushBits(tif);				\
-	}							\
-	data |= (bits & _msbmask[length]) << (bit - length);	\
-	bit -= length;						\
-	if (bit == 0)						\
-		_FlushBits(tif);				\
-}
-	
-/*
- * Write a variable-length bit-value to
- * the output stream.  Values are
- * assumed to be at most 16 bits.
- */
-static void
-Fax3PutBits(TIFF* tif, u_int bits, u_int length)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-
-	_PutBits(tif, bits, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Write a code to the output stream.
- */
-#define putcode(tif, te)	Fax3PutBits(tif, (te)->code, (te)->length)
-
-#ifdef FAX3_DEBUG
-#define	DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B")
-#define	DEBUG_PRINT(what,len) {						\
-    int t;								\
-    printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len);	\
-    for (t = length-1; t >= 0; t--)					\
-	putchar(code & (1<<t) ? '1' : '0');				\
-    putchar('\n');							\
-}
-#endif
-
-/*
- * Write the sequence of codes that describes
- * the specified span of zero's or one's.  The
- * appropriate table that holds the make-up and
- * terminating codes is supplied.
- */
-static void
-putspan(TIFF* tif, int32 span, const tableentry* tab)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-	u_int code, length;
-
-	while (span >= 2624) {
-		const tableentry* te = &tab[63 + (2560>>6)];
-		code = te->code, length = te->length;
-#ifdef FAX3_DEBUG
-		DEBUG_PRINT("MakeUp", te->runlen);
-#endif
-		_PutBits(tif, code, length);
-		span -= te->runlen;
-	}
-	if (span >= 64) {
-		const tableentry* te = &tab[63 + (span>>6)];
-		assert(te->runlen == 64*(span>>6));
-		code = te->code, length = te->length;
-#ifdef FAX3_DEBUG
-		DEBUG_PRINT("MakeUp", te->runlen);
-#endif
-		_PutBits(tif, code, length);
-		span -= te->runlen;
-	}
-	code = tab[span].code, length = tab[span].length;
-#ifdef FAX3_DEBUG
-	DEBUG_PRINT("  Term", tab[span].runlen);
-#endif
-	_PutBits(tif, code, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Write an EOL code to the output stream.  The zero-fill
- * logic for byte-aligning encoded scanlines is handled
- * here.  We also handle writing the tag bit for the next
- * scanline when doing 2d encoding.
- */
-static void
-Fax3PutEOL(TIFF* tif)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-	u_int code, length, tparm;
-
-	if (sp->b.groupoptions & GROUP3OPT_FILLBITS) {
-		/*
-		 * Force bit alignment so EOL will terminate on
-		 * a byte boundary.  That is, force the bit alignment
-		 * to 16-12 = 4 before putting out the EOL code.
-		 */
-		int align = 8 - 4;
-		if (align != sp->bit) {
-			if (align > sp->bit)
-				align = sp->bit + (8 - align);
-			else
-				align = sp->bit - align;
-			code = 0;
-			tparm=align; 
-			_PutBits(tif, 0, tparm);
-		}
-	}
-	code = EOL, length = 12;
-	if (is2DEncoding(sp))
-		code = (code<<1) | (sp->tag == G3_1D), length++;
-	_PutBits(tif, code, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-Fax3PreEncode(TIFF* tif, tsample_t s)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->bit = 8;
-	sp->data = 0;
-	sp->tag = G3_1D;
-	/*
-	 * This is necessary for Group 4; otherwise it isn't
-	 * needed because the first scanline of each strip ends
-	 * up being copied into the refline.
-	 */
-	if (sp->refline)
-		_TIFFmemset(sp->refline, 0x00, sp->b.rowbytes);
-	if (is2DEncoding(sp)) {
-		float res = tif->tif_dir.td_yresolution;
-		/*
-		 * The CCITT spec says that when doing 2d encoding, you
-		 * should only do it on K consecutive scanlines, where K
-		 * depends on the resolution of the image being encoded
-		 * (2 for <= 200 lpi, 4 for > 200 lpi).  Since the directory
-		 * code initializes td_yresolution to 0, this code will
-		 * select a K of 2 unless the YResolution tag is set
-		 * appropriately.  (Note also that we fudge a little here
-		 * and use 150 lpi to avoid problems with units conversion.)
-		 */
-		if (tif->tif_dir.td_resolutionunit == RESUNIT_CENTIMETER)
-			res *= 2.54f;		/* convert to inches */
-		sp->maxk = (res > 150 ? 4 : 2);
-		sp->k = sp->maxk-1;
-	} else
-		sp->k = sp->maxk = 0;
-	return (1);
-}
-
-static const u_char zeroruns[256] = {
-    8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,	/* 0x00 - 0x0f */
-    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,	/* 0x10 - 0x1f */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0x20 - 0x2f */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0x30 - 0x3f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x40 - 0x4f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x50 - 0x5f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x60 - 0x6f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x70 - 0x7f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x80 - 0x8f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x90 - 0x9f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xa0 - 0xaf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xb0 - 0xbf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xc0 - 0xcf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xd0 - 0xdf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xe0 - 0xef */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xf0 - 0xff */
-};
-static const u_char oneruns[256] = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x00 - 0x0f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x10 - 0x1f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x20 - 0x2f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x30 - 0x3f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x40 - 0x4f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x50 - 0x5f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x60 - 0x6f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x70 - 0x7f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x80 - 0x8f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x90 - 0x9f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0xa0 - 0xaf */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0xb0 - 0xbf */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0xc0 - 0xcf */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0xd0 - 0xdf */
-    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,	/* 0xe0 - 0xef */
-    4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8,	/* 0xf0 - 0xff */
-};
-
-/*
- * On certain systems it pays to inline
- * the routines that find pixel spans.
- */
-#ifdef VAXC
-static	int32 find0span(u_char*, int32, int32);
-static	int32 find1span(u_char*, int32, int32);
-#pragma inline(find0span,find1span)
-#endif
-
-/*
- * Find a span of ones or zeros using the supplied
- * table.  The ``base'' of the bit string is supplied
- * along with the start+end bit indices.
- */
-INLINE static int32
-find0span(u_char* bp, int32 bs, int32 be)
-{
-	int32 bits = be - bs;
-	int32 n, span;
-
-	bp += bs>>3;
-	/*
-	 * Check partial byte on lhs.
-	 */
-	if (bits > 0 && (n = (bs & 7))) {
-		span = zeroruns[(*bp << n) & 0xff];
-		if (span > 8-n)		/* table value too generous */
-			span = 8-n;
-		if (span > bits)	/* constrain span to bit range */
-			span = bits;
-		if (n+span < 8)		/* doesn't extend to edge of byte */
-			return (span);
-		bits -= span;
-		bp++;
-	} else
-		span = 0;
-	if (bits >= 2*8*sizeof (long)) {
-		long* lp;
-		/*
-		 * Align to longword boundary and check longwords.
-		 */
-		while (!isAligned(bp, long)) {
-			if (*bp != 0x00)
-				return (span + zeroruns[*bp]);
-			span += 8, bits -= 8;
-			bp++;
-		}
-		lp = (long*) bp;
-		while (bits >= 8*sizeof (long) && *lp == 0) {
-			span += 8*sizeof (long), bits -= 8*sizeof (long);
-			lp++;
-		}
-		bp = (u_char*) lp;
-	}
-	/*
-	 * Scan full bytes for all 0's.
-	 */
-	while (bits >= 8) {
-		if (*bp != 0x00)	/* end of run */
-			return (span + zeroruns[*bp]);
-		span += 8, bits -= 8;
-		bp++;
-	}
-	/*
-	 * Check partial byte on rhs.
-	 */
-	if (bits > 0) {
-		n = zeroruns[*bp];
-		span += (n > bits ? bits : n);
-	}
-	return (span);
-}
-
-INLINE static int32
-find1span(u_char* bp, int32 bs, int32 be)
-{
-	int32 bits = be - bs;
-	int32 n, span;
-
-	bp += bs>>3;
-	/*
-	 * Check partial byte on lhs.
-	 */
-	if (bits > 0 && (n = (bs & 7))) {
-		span = oneruns[(*bp << n) & 0xff];
-		if (span > 8-n)		/* table value too generous */
-			span = 8-n;
-		if (span > bits)	/* constrain span to bit range */
-			span = bits;
-		if (n+span < 8)		/* doesn't extend to edge of byte */
-			return (span);
-		bits -= span;
-		bp++;
-	} else
-		span = 0;
-	if (bits >= 2*8*sizeof (long)) {
-		long* lp;
-		/*
-		 * Align to longword boundary and check longwords.
-		 */
-		while (!isAligned(bp, long)) {
-			if (*bp != 0xff)
-				return (span + oneruns[*bp]);
-			span += 8, bits -= 8;
-			bp++;
-		}
-		lp = (long*) bp;
-		while (bits >= 8*sizeof (long) && *lp == ~0) {
-			span += 8*sizeof (long), bits -= 8*sizeof (long);
-			lp++;
-		}
-		bp = (u_char*) lp;
-	}
-	/*
-	 * Scan full bytes for all 1's.
-	 */
-	while (bits >= 8) {
-		if (*bp != 0xff)	/* end of run */
-			return (span + oneruns[*bp]);
-		span += 8, bits -= 8;
-		bp++;
-	}
-	/*
-	 * Check partial byte on rhs.
-	 */
-	if (bits > 0) {
-		n = oneruns[*bp];
-		span += (n > bits ? bits : n);
-	}
-	return (span);
-}
-
-/*
- * Return the offset of the next bit in the range
- * [bs..be] that is different from the specified
- * color.  The end, be, is returned if no such bit
- * exists.
- */
-#define	finddiff(_cp, _bs, _be, _color)	\
-	(_bs + (_color ? find1span(_cp,_bs,_be) : find0span(_cp,_bs,_be)))
-/*
- * Like finddiff, but also check the starting bit
- * against the end in case start > end.
- */
-#define	finddiff2(_cp, _bs, _be, _color) \
-	(_bs < _be ? finddiff(_cp,_bs,_be,_color) : _be)
-
-/*
- * 1d-encode a row of pixels.  The encoding is
- * a sequence of all-white or all-black spans
- * of pixels encoded with Huffman codes.
- */
-static int
-Fax3Encode1DRow(TIFF* tif, u_char* bp, uint32 bits)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	int32 span;
-        uint32 bs = 0;
-
-	for (;;) {
-		span = find0span(bp, bs, bits);		/* white span */
-		putspan(tif, span, TIFFFaxWhiteCodes);
-		bs += span;
-		if (bs >= bits)
-			break;
-		span = find1span(bp, bs, bits);		/* black span */
-		putspan(tif, span, TIFFFaxBlackCodes);
-		bs += span;
-		if (bs >= bits)
-			break;
-	}
-	if (sp->b.mode & (FAXMODE_BYTEALIGN|FAXMODE_WORDALIGN)) {
-		if (sp->bit != 8)			/* byte-align */
-			Fax3FlushBits(tif, sp);
-		if ((sp->b.mode&FAXMODE_WORDALIGN) &&
-		    !isAligned(tif->tif_rawcp, uint16))
-			Fax3FlushBits(tif, sp);
-	}
-	return (1);
-}
-
-static const tableentry horizcode =
-    { 3, 0x1 };		/* 001 */
-static const tableentry passcode =
-    { 4, 0x1 };		/* 0001 */
-static const tableentry vcodes[7] = {
-    { 7, 0x03 },	/* 0000 011 */
-    { 6, 0x03 },	/* 0000 11 */
-    { 3, 0x03 },	/* 011 */
-    { 1, 0x1 },		/* 1 */
-    { 3, 0x2 },		/* 010 */
-    { 6, 0x02 },	/* 0000 10 */
-    { 7, 0x02 }		/* 0000 010 */
-};
-
-/*
- * 2d-encode a row of pixels.  Consult the CCITT
- * documentation for the algorithm.
- */
-static int
-Fax3Encode2DRow(TIFF* tif, u_char* bp, u_char* rp, uint32 bits)
-{
-#define	PIXEL(buf,ix)	((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1)
-        uint32 a0 = 0;
-	uint32 a1 = (PIXEL(bp, 0) != 0 ? 0 : finddiff(bp, 0, bits, 0));
-	uint32 b1 = (PIXEL(rp, 0) != 0 ? 0 : finddiff(rp, 0, bits, 0));
-	uint32 a2, b2;
-
-	for (;;) {
-		b2 = finddiff2(rp, b1, bits, PIXEL(rp,b1));
-		if (b2 >= a1) {
-			int32 d = b1 - a1;
-			if (!(-3 <= d && d <= 3)) {	/* horizontal mode */
-				a2 = finddiff2(bp, a1, bits, PIXEL(bp,a1));
-				putcode(tif, &horizcode);
-				if (a0+a1 == 0 || PIXEL(bp, a0) == 0) {
-					putspan(tif, a1-a0, TIFFFaxWhiteCodes);
-					putspan(tif, a2-a1, TIFFFaxBlackCodes);
-				} else {
-					putspan(tif, a1-a0, TIFFFaxBlackCodes);
-					putspan(tif, a2-a1, TIFFFaxWhiteCodes);
-				}
-				a0 = a2;
-			} else {			/* vertical mode */
-				putcode(tif, &vcodes[d+3]);
-				a0 = a1;
-			}
-		} else {				/* pass mode */
-			putcode(tif, &passcode);
-			a0 = b2;
-		}
-		if (a0 >= bits)
-			break;
-		a1 = finddiff(bp, a0, bits, PIXEL(bp,a0));
-		b1 = finddiff(rp, a0, bits, !PIXEL(bp,a0));
-		b1 = finddiff(rp, b1, bits, PIXEL(bp,a0));
-	}
-	return (1);
-#undef PIXEL
-}
-
-/*
- * Encode a buffer of pixels.
- */
-static int
-Fax3Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	(void) s;
-	while ((long)cc > 0) {
-		if ((sp->b.mode & FAXMODE_NOEOL) == 0)
-			Fax3PutEOL(tif);
-		if (is2DEncoding(sp)) {
-			if (sp->tag == G3_1D) {
-				if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
-					return (0);
-				sp->tag = G3_2D;
-			} else {
-				if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
-					return (0);
-				sp->k--;
-			}
-			if (sp->k == 0) {
-				sp->tag = G3_1D;
-				sp->k = sp->maxk-1;
-			} else
-				_TIFFmemcpy(sp->refline, bp, sp->b.rowbytes);
-		} else {
-			if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
-				return (0);
-		}
-		bp += sp->b.rowbytes;
-		cc -= sp->b.rowbytes;
-	}
-	return (1);
-}
-
-static int
-Fax3PostEncode(TIFF* tif)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	if (sp->bit != 8)
-		Fax3FlushBits(tif, sp);
-	return (1);
-}
-
-static void
-Fax3Close(TIFF* tif)
-{
-	if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0) {
-		Fax3CodecState* sp = EncoderState(tif);
-		u_int code = EOL;
-		u_int length = 12;
-		int i;
-
-		if (is2DEncoding(sp))
-			code = (code<<1) | (sp->tag == G3_1D), length++;
-		for (i = 0; i < 6; i++)
-			Fax3PutBits(tif, code, length);
-		Fax3FlushBits(tif, sp);
-	}
-}
-
-static void
-Fax3Cleanup(TIFF* tif)
-{
-	if (tif->tif_data) {
-		Fax3CodecState* sp = DecoderState(tif);
-
-		if (sp->runs)
-			_TIFFfree(sp->runs);
-		if (sp->refline)
-			_TIFFfree(sp->refline);
-
-		if (Fax3State(tif)->subaddress)
-			_TIFFfree(Fax3State(tif)->subaddress);
-		_TIFFfree(tif->tif_data);
-		tif->tif_data = NULL;
-	}
-}
-
-#define	FIELD_BADFAXLINES	(FIELD_CODEC+0)
-#define	FIELD_CLEANFAXDATA	(FIELD_CODEC+1)
-#define	FIELD_BADFAXRUN		(FIELD_CODEC+2)
-#define	FIELD_RECVPARAMS	(FIELD_CODEC+3)
-#define	FIELD_SUBADDRESS	(FIELD_CODEC+4)
-#define	FIELD_RECVTIME		(FIELD_CODEC+5)
-
-#define	FIELD_OPTIONS		(FIELD_CODEC+6)
-
-static const TIFFFieldInfo faxFieldInfo[] = {
-    { TIFFTAG_FAXMODE,		 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"FaxMode" },
-    { TIFFTAG_FAXFILLFUNC,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"FaxFillFunc" },
-    { TIFFTAG_BADFAXLINES,	 1, 1,	TIFF_LONG,	FIELD_BADFAXLINES,
-      TRUE,	FALSE,	"BadFaxLines" },
-    { TIFFTAG_BADFAXLINES,	 1, 1,	TIFF_SHORT,	FIELD_BADFAXLINES,
-      TRUE,	FALSE,	"BadFaxLines" },
-    { TIFFTAG_CLEANFAXDATA,	 1, 1,	TIFF_SHORT,	FIELD_CLEANFAXDATA,
-      TRUE,	FALSE,	"CleanFaxData" },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_LONG,	FIELD_BADFAXRUN,
-      TRUE,	FALSE,	"ConsecutiveBadFaxLines" },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_SHORT,	FIELD_BADFAXRUN,
-      TRUE,	FALSE,	"ConsecutiveBadFaxLines" },
-    { TIFFTAG_FAXRECVPARAMS,	 1, 1, TIFF_LONG,	FIELD_RECVPARAMS,
-      TRUE,	FALSE,	"FaxRecvParams" },
-    { TIFFTAG_FAXSUBADDRESS,	-1,-1, TIFF_ASCII,	FIELD_SUBADDRESS,
-      TRUE,	FALSE,	"FaxSubAddress" },
-    { TIFFTAG_FAXRECVTIME,	 1, 1, TIFF_LONG,	FIELD_RECVTIME,
-      TRUE,	FALSE,	"FaxRecvTime" },
-};
-static const TIFFFieldInfo fax3FieldInfo[] = {
-    { TIFFTAG_GROUP3OPTIONS,	 1, 1,	TIFF_LONG,	FIELD_OPTIONS,
-      FALSE,	FALSE,	"Group3Options" },
-};
-static const TIFFFieldInfo fax4FieldInfo[] = {
-    { TIFFTAG_GROUP4OPTIONS,	 1, 1,	TIFF_LONG,	FIELD_OPTIONS,
-      FALSE,	FALSE,	"Group4Options" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-static int
-Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	switch (tag) {
-	case TIFFTAG_FAXMODE:
-		sp->mode = va_arg(ap, int);
-		return (1);			/* NB: pseudo tag */
-	case TIFFTAG_FAXFILLFUNC:
-		DecoderState(tif)->fill = va_arg(ap, TIFFFaxFillFunc);
-		return (1);			/* NB: pseudo tag */
-	case TIFFTAG_GROUP3OPTIONS:
-	case TIFFTAG_GROUP4OPTIONS:
-		sp->groupoptions = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_BADFAXLINES:
-		sp->badfaxlines = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_CLEANFAXDATA:
-		sp->cleanfaxdata = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_CONSECUTIVEBADFAXLINES:
-		sp->badfaxrun = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_FAXRECVPARAMS:
-		sp->recvparams = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_FAXSUBADDRESS:
-		_TIFFsetString(&sp->subaddress, va_arg(ap, char*));
-		break;
-	case TIFFTAG_FAXRECVTIME:
-		sp->recvtime = va_arg(ap, uint32);
-		break;
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-static int
-Fax3VGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	switch (tag) {
-	case TIFFTAG_FAXMODE:
-		*va_arg(ap, int*) = sp->mode;
-		break;
-	case TIFFTAG_FAXFILLFUNC:
-		*va_arg(ap, TIFFFaxFillFunc*) = DecoderState(tif)->fill;
-		break;
-	case TIFFTAG_GROUP3OPTIONS:
-	case TIFFTAG_GROUP4OPTIONS:
-		*va_arg(ap, uint32*) = sp->groupoptions;
-		break;
-	case TIFFTAG_BADFAXLINES:
-		*va_arg(ap, uint32*) = sp->badfaxlines;
-		break;
-	case TIFFTAG_CLEANFAXDATA:
-		*va_arg(ap, uint16*) = sp->cleanfaxdata;
-		break;
-	case TIFFTAG_CONSECUTIVEBADFAXLINES:
-		*va_arg(ap, uint32*) = sp->badfaxrun;
-		break;
-	case TIFFTAG_FAXRECVPARAMS:
-		*va_arg(ap, uint32*) = sp->recvparams;
-		break;
-	case TIFFTAG_FAXSUBADDRESS:
-		*va_arg(ap, char**) = sp->subaddress;
-		break;
-	case TIFFTAG_FAXRECVTIME:
-		*va_arg(ap, uint32*) = sp->recvtime;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_OPTIONS)) {
-		const char* sep = " ";
-		if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) {
-			fprintf(fd, "  Group 4 Options:");
-			if (sp->groupoptions & GROUP4OPT_UNCOMPRESSED)
-				fprintf(fd, "%suncompressed data", sep);
-		} else {
-
-			fprintf(fd, "  Group 3 Options:");
-			if (sp->groupoptions & GROUP3OPT_2DENCODING)
-				fprintf(fd, "%s2-d encoding", sep), sep = "+";
-			if (sp->groupoptions & GROUP3OPT_FILLBITS)
-				fprintf(fd, "%sEOL padding", sep), sep = "+";
-			if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED)
-				fprintf(fd, "%suncompressed data", sep);
-		}
-		fprintf(fd, " (%lu = 0x%lx)\n",
-		    (u_long) sp->groupoptions, (u_long) sp->groupoptions);
-	}
-	if (TIFFFieldSet(tif,FIELD_CLEANFAXDATA)) {
-		fprintf(fd, "  Fax Data:");
-		switch (sp->cleanfaxdata) {
-		case CLEANFAXDATA_CLEAN:
-			fprintf(fd, " clean");
-			break;
-		case CLEANFAXDATA_REGENERATED:
-			fprintf(fd, " receiver regenerated");
-			break;
-		case CLEANFAXDATA_UNCLEAN:
-			fprintf(fd, " uncorrected errors");
-			break;
-		}
-		fprintf(fd, " (%u = 0x%x)\n",
-		    sp->cleanfaxdata, sp->cleanfaxdata);
-	}
-	if (TIFFFieldSet(tif,FIELD_BADFAXLINES))
-		fprintf(fd, "  Bad Fax Lines: %lu\n", (u_long) sp->badfaxlines);
-	if (TIFFFieldSet(tif,FIELD_BADFAXRUN))
-		fprintf(fd, "  Consecutive Bad Fax Lines: %lu\n",
-		    (u_long) sp->badfaxrun);
-	if (TIFFFieldSet(tif,FIELD_RECVPARAMS))
-		fprintf(fd, "  Fax Receive Parameters: %08lx\n",
-		   (u_long) sp->recvparams);
-	if (TIFFFieldSet(tif,FIELD_SUBADDRESS))
-		fprintf(fd, "  Fax SubAddress: %s\n", sp->subaddress);
-	if (TIFFFieldSet(tif,FIELD_RECVTIME))
-		fprintf(fd, "  Fax Receive Time: %lu secs\n",
-		    (u_long) sp->recvtime);
-}
-
-static int
-InitCCITTFax3(TIFF* tif)
-{
-	Fax3BaseState* sp;
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t)
-		_TIFFmalloc(sizeof (Fax3CodecState));
-
-	if (tif->tif_data == NULL) {
-		TIFFError("TIFFInitCCITTFax3",
-		    "%s: No space for state block", tif->tif_name);
-		return (0);
-	}
-
-	sp = Fax3State(tif);
-        sp->rw_mode = tif->tif_mode;
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, faxFieldInfo, N(faxFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = Fax3VGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = Fax3VSetField;	/* hook for codec tags */
-	tif->tif_tagmethods.printdir = Fax3PrintDir;	/* hook for codec tags */
-	sp->groupoptions = 0;	
-	sp->recvparams = 0;
-	sp->subaddress = NULL;
-
-	tif->tif_flags |= TIFF_NOBITREV;	/* decoder does bit reversal */
-	DecoderState(tif)->runs = NULL;
-	TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns);
-	EncoderState(tif)->refline = NULL;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = Fax3SetupState;
-	tif->tif_predecode = Fax3PreDecode;
-	tif->tif_decoderow = Fax3Decode1D;
-	tif->tif_decodestrip = Fax3Decode1D;
-	tif->tif_decodetile = Fax3Decode1D;
-	tif->tif_setupencode = Fax3SetupState;
-	tif->tif_preencode = Fax3PreEncode;
-	tif->tif_postencode = Fax3PostEncode;
-	tif->tif_encoderow = Fax3Encode;
-	tif->tif_encodestrip = Fax3Encode;
-	tif->tif_encodetile = Fax3Encode;
-	tif->tif_close = Fax3Close;
-	tif->tif_cleanup = Fax3Cleanup;
-
-	return (1);
-}
-
-int
-TIFFInitCCITTFax3(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {
-		_TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo));
-
-		/*
-		 * The default format is Class/F-style w/o RTC.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
-	} else
-		return (0);
-}
-
-/*
- * CCITT Group 4 (T.6) Facsimile-compatible
- * Compression Scheme Support.
- */
-
-#define	SWAP(t,a,b)	{ t x; x = (a); (a) = (b); (b) = x; }
-/*
- * Decode the requested amount of G4-encoded data.
- */
-static int
-Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE_2D(tif, sp, "Fax4Decode");
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun = sp->curruns;
-		pb = sp->refruns;
-		b1 = *pb++;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		EXPAND2D(EOFG4);
-                if (EOLcnt)
-                    goto EOFG4;
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		SETVAL(0);		/* imaginary change for reference */
-		SWAP(uint32*, sp->curruns, sp->refruns);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOFG4:
-                NeedBits16( 13, BADG4 );
-        BADG4:
-#ifdef FAX3_DEBUG
-                if( GetBits(13) != 0x1001 )
-                    fputs( "Bad RTC\n", stderr );
-#endif                
-                ClrBits( 13 );
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-#undef	SWAP
-
-/*
- * Encode the requested amount of data.
- */
-static int
-Fax4Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	Fax3CodecState *sp = EncoderState(tif);
-
-	(void) s;
-	while ((long)cc > 0) {
-		if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
-			return (0);
-		_TIFFmemcpy(sp->refline, bp, sp->b.rowbytes);
-		bp += sp->b.rowbytes;
-		cc -= sp->b.rowbytes;
-	}
-	return (1);
-}
-
-static int
-Fax4PostEncode(TIFF* tif)
-{
-	Fax3CodecState *sp = EncoderState(tif);
-
-	/* terminate strip w/ EOFB */
-	Fax3PutBits(tif, EOL, 12);
-	Fax3PutBits(tif, EOL, 12);
-	if (sp->bit != 8)
-		Fax3FlushBits(tif, sp);
-	return (1);
-}
-
-int
-TIFFInitCCITTFax4(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		_TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo));
-
-		tif->tif_decoderow = Fax4Decode;
-		tif->tif_decodestrip = Fax4Decode;
-		tif->tif_decodetile = Fax4Decode;
-		tif->tif_encoderow = Fax4Encode;
-		tif->tif_encodestrip = Fax4Encode;
-		tif->tif_encodetile = Fax4Encode;
-		tif->tif_postencode = Fax4PostEncode;
-		/*
-		 * Suppress RTC at the end of each strip.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_NORTC);
-	} else
-		return (0);
-}
-
-/*
- * CCITT Group 3 1-D Modified Huffman RLE Compression Support.
- * (Compression algorithms 2 and 32771)
- */
-
-/*
- * Decode the requested amount of RLE-encoded data.
- */
-static int
-Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE(tif, sp, "Fax3DecodeRLE");
-	int mode = sp->b.mode;
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	thisrun = sp->curruns;
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		EXPAND1D(EOFRLE);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		/*
-		 * Cleanup at the end of the row.
-		 */
-		if (mode & FAXMODE_BYTEALIGN) {
-			int n = BitsAvail - (BitsAvail &~ 7);
-			ClrBits(n);
-		} else if (mode & FAXMODE_WORDALIGN) {
-			int n = BitsAvail - (BitsAvail &~ 15);
-			ClrBits(n);
-			if (BitsAvail == 0 && !isAligned(cp, uint16))
-			    cp++;
-		}
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOFRLE:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-
-int
-TIFFInitCCITTRLE(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		tif->tif_decoderow = Fax3DecodeRLE;
-		tif->tif_decodestrip = Fax3DecodeRLE;
-		tif->tif_decodetile = Fax3DecodeRLE;
-		/*
-		 * Suppress RTC+EOLs when encoding and byte-align data.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE,
-		    FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_BYTEALIGN);
-	} else
-		return (0);
-}
-
-int
-TIFFInitCCITTRLEW(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		tif->tif_decoderow = Fax3DecodeRLE;
-		tif->tif_decodestrip = Fax3DecodeRLE;
-		tif->tif_decodetile = Fax3DecodeRLE;
-		/*
-		 * Suppress RTC+EOLs when encoding and word-align data.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE,
-		    FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_WORDALIGN);
-	} else
-		return (0);
-}
-#endif /* CCITT_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_fax3.h b/tkimg1.3/libtiff/libtiff/tif_fax3.h
deleted file mode 100644
index 9269bd1..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_fax3.h
+++ /dev/null
@@ -1,525 +0,0 @@
-/* $Id: tif_fax3.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _FAX3_
-#define	_FAX3_
-/*
- * TIFF Library.
- *
- * CCITT Group 3 (T.4) and Group 4 (T.6) Decompression Support.
- *
- * Decoder support is derived, with permission, from the code
- * in Frank Cringle's viewfax program;
- *      Copyright (C) 1990, 1995  Frank D. Cringle.
- */
-#include "tiff.h"
-
-/*
- * To override the default routine used to image decoded
- * spans one can use the pseduo tag TIFFTAG_FAXFILLFUNC.
- * The routine must have the type signature given below;
- * for example:
- *
- * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
- *
- * where buf is place to set the bits, runs is the array of b&w run
- * lengths (white then black), erun is the last run in the array, and
- * lastx is the width of the row in pixels.  Fill routines can assume
- * the run array has room for at least lastx runs and can overwrite
- * data in the run array as needed (e.g. to append zero runs to bring
- * the count up to a nice multiple).
- */
-typedef	void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*, uint32);
-
-/*
- * The default run filler; made external for other decoders.
- */
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32);
-#if defined(__cplusplus)
-}
-#endif
-
-
-/* finite state machine codes */
-#define S_Null		0
-#define S_Pass		1
-#define S_Horiz		2
-#define S_V0		3
-#define S_VR		4
-#define S_VL		5
-#define S_Ext		6
-#define S_TermW		7
-#define S_TermB		8
-#define S_MakeUpW	9
-#define S_MakeUpB	10
-#define S_MakeUp	11
-#define S_EOL		12
-
-typedef struct {		/* state table entry */
-	unsigned char State;	/* see above */
-	unsigned char Width;	/* width of code in bits */
-	uint32	Param;		/* unsigned 32-bit run length in bits */
-} TIFFFaxTabEnt;
-
-extern	const TIFFFaxTabEnt TIFFFaxMainTable[];
-extern	const TIFFFaxTabEnt TIFFFaxWhiteTable[];
-extern	const TIFFFaxTabEnt TIFFFaxBlackTable[];
-
-/*
- * The following macros define the majority of the G3/G4 decoder
- * algorithm using the state tables defined elsewhere.  To build
- * a decoder you need some setup code and some glue code. Note
- * that you may also need/want to change the way the NeedBits*
- * macros get input data if, for example, you know the data to be
- * decoded is properly aligned and oriented (doing so before running
- * the decoder can be a big performance win).
- *
- * Consult the decoder in the TIFF library for an idea of what you
- * need to define and setup to make use of these definitions.
- *
- * NB: to enable a debugging version of these macros define FAX3_DEBUG
- *     before including this file.  Trace output goes to stdout.
- */
-
-#ifndef EndOfData
-#define EndOfData()	(cp >= ep)
-#endif
-/*
- * Need <=8 or <=16 bits of input data.  Unlike viewfax we
- * cannot use/assume a word-aligned, properly bit swizzled
- * input data set because data may come from an arbitrarily
- * aligned, read-only source such as a memory-mapped file.
- * Note also that the viewfax decoder does not check for
- * running off the end of the input data buffer.  This is
- * possible for G3-encoded data because it prescans the input
- * data to count EOL markers, but can cause problems for G4
- * data.  In any event, we don't prescan and must watch for
- * running out of data since we can't permit the library to
- * scan past the end of the input data buffer.
- *
- * Finally, note that we must handle remaindered data at the end
- * of a strip specially.  The coder asks for a fixed number of
- * bits when scanning for the next code.  This may be more bits
- * than are actually present in the data stream.  If we appear
- * to run out of data but still have some number of valid bits
- * remaining then we makeup the requested amount with zeros and
- * return successfully.  If the returned data is incorrect then
- * we should be called again and get a premature EOF error;
- * otherwise we should get the right answer.
- */
-#ifndef NeedBits8
-#define NeedBits8(n,eoflab) do {					\
-    if (BitsAvail < (n)) {						\
-	if (EndOfData()) {						\
-	    if (BitsAvail == 0)			/* no valid bits */	\
-		goto eoflab;						\
-	    BitsAvail = (n);			/* pad with zeros */	\
-	} else {							\
-	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
-	    BitsAvail += 8;						\
-	}								\
-    }									\
-} while (0)
-#endif
-#ifndef NeedBits16
-#define NeedBits16(n,eoflab) do {					\
-    if (BitsAvail < (n)) {						\
-	if (EndOfData()) {						\
-	    if (BitsAvail == 0)			/* no valid bits */	\
-		goto eoflab;						\
-	    BitsAvail = (n);			/* pad with zeros */	\
-	} else {							\
-	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
-	    if ((BitsAvail += 8) < (n)) {				\
-		if (EndOfData()) {					\
-		    /* NB: we know BitsAvail is non-zero here */	\
-		    BitsAvail = (n);		/* pad with zeros */	\
-		} else {						\
-		    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;	\
-		    BitsAvail += 8;					\
-		}							\
-	    }								\
-	}								\
-    }									\
-} while (0)
-#endif
-#define GetBits(n)	(BitAcc & ((1<<(n))-1))
-#define ClrBits(n) do {							\
-    BitsAvail -= (n);							\
-    BitAcc >>= (n);							\
-} while (0)
-
-#ifdef FAX3_DEBUG
-static const char* StateNames[] = {
-    "Null   ",
-    "Pass   ",
-    "Horiz  ",
-    "V0     ",
-    "VR     ",
-    "VL     ",
-    "Ext    ",
-    "TermW  ",
-    "TermB  ",
-    "MakeUpW",
-    "MakeUpB",
-    "MakeUp ",
-    "EOL    ",
-};
-#define DEBUG_SHOW putchar(BitAcc & (1 << t) ? '1' : '0')
-#define LOOKUP8(wid,tab,eoflab) do {					\
-    int t;								\
-    NeedBits8(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
-	   StateNames[TabEnt->State], TabEnt->Param);			\
-    for (t = 0; t < TabEnt->Width; t++)					\
-	DEBUG_SHOW;							\
-    putchar('\n');							\
-    fflush(stdout);							\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-#define LOOKUP16(wid,tab,eoflab) do {					\
-    int t;								\
-    NeedBits16(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
-	   StateNames[TabEnt->State], TabEnt->Param);			\
-    for (t = 0; t < TabEnt->Width; t++)					\
-	DEBUG_SHOW;							\
-    putchar('\n');							\
-    fflush(stdout);							\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-
-#define SETVAL(x) do {							\
-    *pa++ = RunLength + (x);						\
-    printf("SETVAL: %d\t%d\n", RunLength + (x), a0);			\
-    a0 += x;								\
-    RunLength = 0;							\
-} while (0)
-#else
-#define LOOKUP8(wid,tab,eoflab) do {					\
-    NeedBits8(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-#define LOOKUP16(wid,tab,eoflab) do {					\
-    NeedBits16(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-
-/*
- * Append a run to the run length array for the
- * current row and reset decoding state.
- */
-#define SETVAL(x) do {							\
-    *pa++ = RunLength + (x);						\
-    a0 += (x);								\
-    RunLength = 0;							\
-} while (0)
-#endif
-
-/*
- * Synchronize input decoding at the start of each
- * row by scanning for an EOL (if appropriate) and
- * skipping any trash data that might be present
- * after a decoding error.  Note that the decoding
- * done elsewhere that recognizes an EOL only consumes
- * 11 consecutive zero bits.  This means that if EOLcnt
- * is non-zero then we still need to scan for the final flag
- * bit that is part of the EOL code.
- */
-#define	SYNC_EOL(eoflab) do {						\
-    if (EOLcnt == 0) {							\
-	for (;;) {							\
-	    NeedBits16(11,eoflab);					\
-	    if (GetBits(11) == 0)					\
-		break;							\
-	    ClrBits(1);							\
-	}								\
-    }									\
-    for (;;) {								\
-	NeedBits8(8,eoflab);						\
-	if (GetBits(8))							\
-	    break;							\
-	ClrBits(8);							\
-    }									\
-    while (GetBits(1) == 0)						\
-	ClrBits(1);							\
-    ClrBits(1);				/* EOL bit */			\
-    EOLcnt = 0;				/* reset EOL counter/flag */	\
-} while (0)
-
-/*
- * Cleanup the array of runs after decoding a row.
- * We adjust final runs to insure the user buffer is not
- * overwritten and/or undecoded area is white filled.
- */
-#define	CLEANUP_RUNS() do {						\
-    if (RunLength)							\
-	SETVAL(0);							\
-    if (a0 != lastx) {							\
-	badlength(a0, lastx);						\
-	while (a0 > lastx && pa > thisrun)				\
-	    a0 -= *--pa;						\
-	if (a0 < lastx) {						\
-	    if (a0 < 0)							\
-		a0 = 0;							\
-	    if ((pa-thisrun)&1)						\
-		SETVAL(0);						\
-	    SETVAL(lastx - a0);						\
-	} else if (a0 > lastx) {					\
-	    SETVAL(lastx);						\
-	    SETVAL(0);							\
-	}								\
-    }									\
-} while (0)
-
-/*
- * Decode a line of 1D-encoded data.
- *
- * The line expanders are written as macros so that they can be reused
- * but still have direct access to the local variables of the "calling"
- * function.
- *
- * Note that unlike the original version we have to explicitly test for
- * a0 >= lastx after each black/white run is decoded.  This is because
- * the original code depended on the input data being zero-padded to
- * insure the decoder recognized an EOL before running out of data.
- */
-#define EXPAND1D(eoflab) do {						\
-    for (;;) {								\
-	for (;;) {							\
-	    LOOKUP16(12, TIFFFaxWhiteTable, eof1d);			\
-	    switch (TabEnt->State) {					\
-	    case S_EOL:							\
-		EOLcnt = 1;						\
-		goto done1d;						\
-	    case S_TermW:						\
-		SETVAL(TabEnt->Param);					\
-		goto doneWhite1d;					\
-	    case S_MakeUpW:						\
-	    case S_MakeUp:						\
-		a0 += TabEnt->Param;					\
-		RunLength += TabEnt->Param;				\
-		break;							\
-	    default:							\
-		unexpected("WhiteTable", a0);				\
-		goto done1d;						\
-	    }								\
-	}								\
-    doneWhite1d:							\
-	if (a0 >= lastx)						\
-	    goto done1d;						\
-	for (;;) {							\
-	    LOOKUP16(13, TIFFFaxBlackTable, eof1d);			\
-	    switch (TabEnt->State) {					\
-	    case S_EOL:							\
-		EOLcnt = 1;						\
-		goto done1d;						\
-	    case S_TermB:						\
-		SETVAL(TabEnt->Param);					\
-		goto doneBlack1d;					\
-	    case S_MakeUpB:						\
-	    case S_MakeUp:						\
-		a0 += TabEnt->Param;					\
-		RunLength += TabEnt->Param;				\
-		break;							\
-	    default:							\
-		unexpected("BlackTable", a0);				\
-		goto done1d;						\
-	    }								\
-	}								\
-    doneBlack1d:							\
-	if (a0 >= lastx)						\
-	    goto done1d;						\
-        if( *(pa-1) == 0 && *(pa-2) == 0 )				\
-            pa -= 2;                                                    \
-    }									\
-eof1d:									\
-    prematureEOF(a0);							\
-    CLEANUP_RUNS();							\
-    goto eoflab;							\
-done1d:									\
-    CLEANUP_RUNS();							\
-} while (0)
-
-/*
- * Update the value of b1 using the array
- * of runs for the reference line.
- */
-#define CHECK_b1 do {							\
-    if (pa != thisrun) while (b1 <= a0 && b1 < lastx) {			\
-	b1 += pb[0] + pb[1];						\
-	pb += 2;							\
-    }									\
-} while (0)
-
-/*
- * Expand a row of 2D-encoded data.
- */
-#define EXPAND2D(eoflab) do {						\
-    while (a0 < lastx) {						\
-	LOOKUP8(7, TIFFFaxMainTable, eof2d);				\
-	switch (TabEnt->State) {					\
-	case S_Pass:							\
-	    CHECK_b1;							\
-	    b1 += *pb++;						\
-	    RunLength += b1 - a0;					\
-	    a0 = b1;							\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_Horiz:							\
-	    if ((pa-thisrun)&1) {					\
-		for (;;) {	/* black first */			\
-		    LOOKUP16(13, TIFFFaxBlackTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermB:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneWhite2da;				\
-		    case S_MakeUpB:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badBlack2d;				\
-		    }							\
-		}							\
-	    doneWhite2da:;						\
-		for (;;) {	/* then white */			\
-		    LOOKUP16(12, TIFFFaxWhiteTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermW:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneBlack2da;				\
-		    case S_MakeUpW:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badWhite2d;				\
-		    }							\
-		}							\
-	    doneBlack2da:;						\
-	    } else {							\
-		for (;;) {	/* white first */			\
-		    LOOKUP16(12, TIFFFaxWhiteTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermW:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneWhite2db;				\
-		    case S_MakeUpW:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badWhite2d;				\
-		    }							\
-		}							\
-	    doneWhite2db:;						\
-		for (;;) {	/* then black */			\
-		    LOOKUP16(13, TIFFFaxBlackTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermB:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneBlack2db;				\
-		    case S_MakeUpB:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badBlack2d;				\
-		    }							\
-		}							\
-	    doneBlack2db:;						\
-	    }								\
-	    CHECK_b1;							\
-	    break;							\
-	case S_V0:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0);						\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_VR:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0 + TabEnt->Param);				\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_VL:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0 - TabEnt->Param);				\
-	    b1 -= *--pb;						\
-	    break;							\
-	case S_Ext:							\
-	    *pa++ = lastx - a0;						\
-	    extension(a0);						\
-	    goto eol2d;							\
-	case S_EOL:							\
-	    *pa++ = lastx - a0;						\
-	    NeedBits8(4,eof2d);						\
-	    if (GetBits(4))						\
-		unexpected("EOL", a0);					\
-            ClrBits(4);                                                 \
-	    EOLcnt = 1;							\
-	    goto eol2d;							\
-	default:							\
-	badMain2d:							\
-	    unexpected("MainTable", a0);				\
-	    goto eol2d;							\
-	badBlack2d:							\
-	    unexpected("BlackTable", a0);				\
-	    goto eol2d;							\
-	badWhite2d:							\
-	    unexpected("WhiteTable", a0);				\
-	    goto eol2d;							\
-	eof2d:								\
-	    prematureEOF(a0);						\
-	    CLEANUP_RUNS();						\
-	    goto eoflab;						\
-	}								\
-    }									\
-    if (RunLength) {							\
-	if (RunLength + a0 < lastx) {					\
-	    /* expect a final V0 */					\
-	    NeedBits8(1,eof2d);						\
-	    if (!GetBits(1))						\
-		goto badMain2d;						\
-	    ClrBits(1);							\
-	}								\
-	SETVAL(0);							\
-    }									\
-eol2d:									\
-    CLEANUP_RUNS();							\
-} while (0)
-#endif /* _FAX3_ */
diff --git a/tkimg1.3/libtiff/libtiff/tif_flush.c b/tkimg1.3/libtiff/libtiff/tif_flush.c
deleted file mode 100644
index b1e86d8..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_flush.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_flush.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-int
-TIFFFlush(TIFF* tif)
-{
-
-	if (tif->tif_mode != O_RDONLY) {
-		if (!TIFFFlushData(tif))
-			return (0);
-		if ((tif->tif_flags & TIFF_DIRTYDIRECT) &&
-		    !TIFFWriteDirectory(tif))
-			return (0);
-	}
-	return (1);
-}
-
-/*
- * Flush buffered data to the file.
- *
- * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
- * is not set, so that TIFFFlush() will proceed to write out the directory.
- * The documentation says returning 1 is an error indicator, but not having
- * been writing isn't exactly a an error.  Hopefully this doesn't cause
- * problems for other people. 
- */
-int
-TIFFFlushData(TIFF* tif)
-{
-	if ((tif->tif_flags & TIFF_BEENWRITING) == 0)
-		return (0);
-	if (tif->tif_flags & TIFF_POSTENCODE) {
-		tif->tif_flags &= ~TIFF_POSTENCODE;
-		if (!(*tif->tif_postencode)(tif))
-			return (0);
-	}
-	return (TIFFFlushData1(tif));
-}
-
diff --git a/tkimg1.3/libtiff/libtiff/tif_getimage.c b/tkimg1.3/libtiff/libtiff/tif_getimage.c
deleted file mode 100644
index f466ddd..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_getimage.c
+++ /dev/null
@@ -1,2584 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_getimage.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Read and return a packed RGBA image.
- */
-#include "tiffiop.h"
-#include <assert.h>
-#include <stdio.h>
-
-static	int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtStripContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtStripSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int pickTileContigCase(TIFFRGBAImage*);
-static	int pickTileSeparateCase(TIFFRGBAImage*);
-
-static	const char photoTag[] = "PhotometricInterpretation";
-
-/* 
- * Helper constants used in Orientation tag handling
- */
-#define FLIP_VERTICALLY 0x01
-#define FLIP_HORIZONTALLY 0x02
-
-/*
- * Color conversion constants. We will define display types here.
- */
-
-TIFFDisplay display_sRGB = {
-	{			/* XYZ -> luminance matrix */
-		{  3.2410F, -1.5374F, -0.4986F },
-		{  -0.9692F, 1.8760F, 0.0416F },
-		{  0.0556F, -0.2040F, 1.0570F }
-	},	
-	100.0F, 100.0F, 100.0F,	/* Light o/p for reference white */
-	255, 255, 255,		/* Pixel values for ref. white */
-	1.0F, 1.0F, 1.0F,	/* Residual light o/p for black pixel */
-	2.4F, 2.4F, 2.4F,	/* Gamma values for the three guns */
-};
-
-/*
- * Check the image to see if TIFFReadRGBAImage can deal with it.
- * 1/0 is returned according to whether or not the image can
- * be handled.  If 0 is returned, emsg contains the reason
- * why it is being rejected.
- */
-int
-TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    uint16 photometric;
-    int colorchannels;
-
-    if (!tif->tif_decodestatus) {
-	sprintf(emsg, "Sorry, requested compression method is not configured");
-	return (0);
-    }
-    switch (td->td_bitspersample) {
-    case 1: case 2: case 4:
-    case 8: case 16:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
-	    td->td_bitspersample);
-	return (0);
-    }
-    colorchannels = td->td_samplesperpixel - td->td_extrasamples;
-    if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
-	switch (colorchannels) {
-	case 1:
-	    photometric = PHOTOMETRIC_MINISBLACK;
-	    break;
-	case 3:
-	    photometric = PHOTOMETRIC_RGB;
-	    break;
-	default:
-	    sprintf(emsg, "Missing needed %s tag", photoTag);
-	    return (0);
-	}
-    }
-    switch (photometric) {
-    case PHOTOMETRIC_MINISWHITE:
-    case PHOTOMETRIC_MINISBLACK:
-    case PHOTOMETRIC_PALETTE:
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG 
-            && td->td_samplesperpixel != 1
-            && td->td_bitspersample < 8 ) {
-	    sprintf(emsg,
-                    "Sorry, can not handle contiguous data with %s=%d, "
-                    "and %s=%d and Bits/Sample=%d",
-                    photoTag, photometric,
-                    "Samples/pixel", td->td_samplesperpixel,
-                    td->td_bitspersample);
-	    return (0);
-	}
-        /*
-        ** We should likely validate that any extra samples are either
-        ** to be ignored, or are alpha, and if alpha we should try to use
-        ** them.  But for now we won't bother with this. 
-        */
-	break;
-    case PHOTOMETRIC_YCBCR:
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
-		"Planarconfiguration", td->td_planarconfig);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_RGB: 
-	if (colorchannels < 3) {
-	    sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
-		"Color channels", colorchannels);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_SEPARATED:
-	if (td->td_inkset != INKSET_CMYK) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"InkSet", td->td_inkset);
-	    return (0);
-	}
-	if (td->td_samplesperpixel < 4) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"Samples/pixel", td->td_samplesperpixel);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_LOGL:
-	if (td->td_compression != COMPRESSION_SGILOG) {
-	    sprintf(emsg, "Sorry, LogL data must have %s=%d",
-		"Compression", COMPRESSION_SGILOG);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_LOGLUV:
-	if (td->td_compression != COMPRESSION_SGILOG &&
-		td->td_compression != COMPRESSION_SGILOG24) {
-	    sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
-		"Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
-	    return (0);
-	}
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
-		"Planarconfiguration", td->td_planarconfig);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_CIELAB:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle image with %s=%d",
-	    photoTag, photometric);
-	return (0);
-    }
-    return (1);
-}
-
-void
-TIFFRGBAImageEnd(TIFFRGBAImage* img)
-{
-	if (img->Map)
-		_TIFFfree(img->Map), img->Map = NULL;
-	if (img->BWmap)
-		_TIFFfree(img->BWmap), img->BWmap = NULL;
-	if (img->PALmap)
-		_TIFFfree(img->PALmap), img->PALmap = NULL;
-	if (img->ycbcr)
-		_TIFFfree(img->ycbcr), img->ycbcr = NULL;
-	if (img->cielab)
-		_TIFFfree(img->cielab), img->cielab = NULL;
-
-	if( img->redcmap ) {
-		_TIFFfree( img->redcmap );
-		_TIFFfree( img->greencmap );
-		_TIFFfree( img->bluecmap );
-	}
-}
-
-static int
-isCCITTCompression(TIFF* tif)
-{
-    uint16 compress;
-    TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
-    return (compress == COMPRESSION_CCITTFAX3 ||
-	    compress == COMPRESSION_CCITTFAX4 ||
-	    compress == COMPRESSION_CCITTRLE ||
-	    compress == COMPRESSION_CCITTRLEW);
-}
-
-int
-TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
-{
-    uint16* sampleinfo;
-    uint16 extrasamples;
-    uint16 planarconfig;
-    uint16 compress;
-    int colorchannels;
-    uint16	*red_orig, *green_orig, *blue_orig;
-    int		n_color;
-
-    /* Initialize to normal values */
-    img->row_offset = 0;
-    img->col_offset = 0;
-    img->redcmap = NULL;
-    img->greencmap = NULL;
-    img->bluecmap = NULL;
-    img->req_orientation = ORIENTATION_BOTLEFT;	    /* It is the default */
-    
-    img->tif = tif;
-    img->stoponerr = stop;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
-    switch (img->bitspersample) {
-    case 1: case 2: case 4:
-    case 8: case 16:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
-	    img->bitspersample);
-	return (0);
-    }
-    img->alpha = 0;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
-	&extrasamples, &sampleinfo);
-    if (extrasamples == 1)
-    {
-	switch (sampleinfo[0]) {
-	case EXTRASAMPLE_UNSPECIFIED:	/* Workaround for some images without */
-		if (img->samplesperpixel == 4)	/* correct info about alpha channel */
-			img->alpha = EXTRASAMPLE_ASSOCALPHA;
-		break;
-	case EXTRASAMPLE_ASSOCALPHA:	/* data is pre-multiplied */
-	case EXTRASAMPLE_UNASSALPHA:	/* data is not pre-multiplied */
-		img->alpha = sampleinfo[0];
-		break;
-	}
-    }
-
-#if DEFAULT_EXTRASAMPLE_AS_ALPHA == 1
-    if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
-        img->photometric = PHOTOMETRIC_MINISWHITE;
-
-    if( extrasamples == 0 
-        && img->samplesperpixel == 4 
-        && img->photometric == PHOTOMETRIC_RGB )
-    {
-        img->alpha = EXTRASAMPLE_ASSOCALPHA;
-        extrasamples = 1;
-    }
-#endif
-
-    colorchannels = img->samplesperpixel - extrasamples;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
-    if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
-	switch (colorchannels) {
-	case 1:
-	    if (isCCITTCompression(tif))
-		img->photometric = PHOTOMETRIC_MINISWHITE;
-	    else
-		img->photometric = PHOTOMETRIC_MINISBLACK;
-	    break;
-	case 3:
-	    img->photometric = PHOTOMETRIC_RGB;
-	    break;
-	default:
-	    sprintf(emsg, "Missing needed %s tag", photoTag);
-	    return (0);
-	}
-    }
-    switch (img->photometric) {
-    case PHOTOMETRIC_PALETTE:
-	if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
-	    &red_orig, &green_orig, &blue_orig)) {
-	    TIFFError(TIFFFileName(tif), "Missing required \"Colormap\" tag");
-	    return (0);
-	}
-
-        /* copy the colormaps so we can modify them */
-        n_color = (1L << img->bitspersample);
-        img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        if( !img->redcmap || !img->greencmap || !img->bluecmap ) {
-	    TIFFError(TIFFFileName(tif), "Out of memory for colormap copy");
-	    return (0);
-        }
-
-        memcpy( img->redcmap, red_orig, n_color * 2 );
-        memcpy( img->greencmap, green_orig, n_color * 2 );
-        memcpy( img->bluecmap, blue_orig, n_color * 2 );
-        
-	/* fall thru... */
-    case PHOTOMETRIC_MINISWHITE:
-    case PHOTOMETRIC_MINISBLACK:
-	if (planarconfig == PLANARCONFIG_CONTIG 
-            && img->samplesperpixel != 1
-            && img->bitspersample < 8 ) {
-	    sprintf(emsg,
-                    "Sorry, can not handle contiguous data with %s=%d, "
-                    "and %s=%d and Bits/Sample=%d",
-                    photoTag, img->photometric,
-                    "Samples/pixel", img->samplesperpixel,
-                    img->bitspersample);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_YCBCR:
-	if (planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
-		"Planarconfiguration", planarconfig);
-	    return (0);
-	}
-	/* It would probably be nice to have a reality check here. */
-	if (planarconfig == PLANARCONFIG_CONTIG)
-	    /* can rely on libjpeg to convert to RGB */
-	    /* XXX should restore current state on exit */
-	    switch (compress) {
-		case COMPRESSION_OJPEG:
-		case COMPRESSION_JPEG:
-		    TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-		    img->photometric = PHOTOMETRIC_RGB;
-                    break;
-
-                default:
-                    /* do nothing */;
-                    break;
-	    }
-	break;
-    case PHOTOMETRIC_RGB: 
-	if (colorchannels < 3) {
-	    sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
-		"Color channels", colorchannels);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_SEPARATED: {
-	uint16 inkset;
-	TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
-	if (inkset != INKSET_CMYK) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"InkSet", inkset);
-	    return (0);
-	}
-	if (img->samplesperpixel < 4) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"Samples/pixel", img->samplesperpixel);
-	    return (0);
-	}
-	break;
-    }
-    case PHOTOMETRIC_LOGL:
-	if (compress != COMPRESSION_SGILOG) {
-	    sprintf(emsg, "Sorry, LogL data must have %s=%d",
-		"Compression", COMPRESSION_SGILOG);
-	    return (0);
-	}
-	TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
-	img->photometric = PHOTOMETRIC_MINISBLACK;	/* little white lie */
-	img->bitspersample = 8;
-	break;
-    case PHOTOMETRIC_LOGLUV:
-	if (compress != COMPRESSION_SGILOG && compress != COMPRESSION_SGILOG24) {
-	    sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
-		"Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
-	    return (0);
-	}
-	if (planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
-		"Planarconfiguration", planarconfig);
-	    return (0);
-	}
-	TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
-	img->photometric = PHOTOMETRIC_RGB;		/* little white lie */
-	img->bitspersample = 8;
-	break;
-    case PHOTOMETRIC_CIELAB:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle image with %s=%d",
-	    photoTag, img->photometric);
-	return (0);
-    }
-    img->Map = NULL;
-    img->BWmap = NULL;
-    img->PALmap = NULL;
-    img->ycbcr = NULL;
-    img->cielab = NULL;
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
-    img->isContig =
-	!(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
-    if (img->isContig) {
-	img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig;
-	return pickTileContigCase(img);
-    } else {
-	img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate;
-	return pickTileSeparateCase(img);
-    }
-}
-
-int
-TIFFRGBAImageGet(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    if (img->get == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No \"get\" routine setup");
-	return (0);
-    }
-    if (img->put.any == NULL) {
-	TIFFError(TIFFFileName(img->tif),
-	    "No \"put\" routine setupl; probably can not handle image format");
-	return (0);
-    }
-    return (*img->get)(img, raster, w, h);
-}
-
-/*
- * Read the specified image into an ABGR-format rastertaking in account
- * specified orientation.
- */
-int
-TIFFReadRGBAImageOriented(TIFF* tif,
-			  uint32 rwidth, uint32 rheight, uint32* raster,
-			  int orientation, int stop)
-{
-    char emsg[1024];
-    TIFFRGBAImage img;
-    int ok;
-
-    if (TIFFRGBAImageOK(tif, emsg) &&
-	TIFFRGBAImageBegin(&img, tif, stop, emsg)) {
-	img.req_orientation = orientation;
-	/* XXX verify rwidth and rheight against width and height */
-	ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth,
-	    rwidth, img.height);
-	TIFFRGBAImageEnd(&img);
-    } else {
-	TIFFError(TIFFFileName(tif), emsg);
-	ok = 0;
-    }
-    return (ok);
-}
-
-/*
- * Read the specified image into an ABGR-format raster. Use bottom left
- * origin for raster by default.
- */
-int
-TIFFReadRGBAImage(TIFF* tif,
-		  uint32 rwidth, uint32 rheight, uint32* raster, int stop)
-{
-	return TIFFReadRGBAImageOriented(tif, rwidth, rheight, raster,
-					 ORIENTATION_BOTLEFT, stop);
-}
-
-static int 
-setorientation(TIFFRGBAImage* img)
-{
-	switch (img->orientation) {
-		case ORIENTATION_TOPLEFT:
-		case ORIENTATION_LEFTTOP:
-			if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_HORIZONTALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_VERTICALLY;
-			else
-				return 0;
-		case ORIENTATION_TOPRIGHT:
-		case ORIENTATION_RIGHTTOP:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_HORIZONTALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else
-				return 0;
-		case ORIENTATION_BOTRIGHT:
-		case ORIENTATION_RIGHTBOT:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_HORIZONTALLY;
-			else
-				return 0;
-		case ORIENTATION_BOTLEFT:
-		case ORIENTATION_LEFTBOT:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_HORIZONTALLY;
-			else
-				return 0;
-		default:	/* NOTREACHED */
-			return 0;
-	}
-}
-
-/*
- * Get an tile-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileContigRoutine put = img->put.contig;
-    uint32 col, row, y, rowstoread;
-    uint32 pos;
-    uint32 tw, th;
-    u_char* buf;
-    int32 fromskew, toskew;
-    uint32 nrow;
-    int ret = 1, flip;
-
-    buf = (u_char*) _TIFFmalloc(TIFFTileSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(tw + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(tw - w);
-    }
-     
-    for (row = 0; row < h; row += nrow)
-    {
-        rowstoread = th - (row + img->row_offset) % th;
-    	nrow = (row + rowstoread > h ? h - row : rowstoread);
-	for (col = 0; col < w; col += tw) 
-        {
-            if (TIFFReadTile(tif, buf, col+img->col_offset,
-                             row+img->row_offset, 0, 0) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-	    
-            pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
-    	    if (col + tw > w) 
-            {
-                /*
-                 * Tile is clipped horizontally.  Calculate
-                 * visible portion and skewing factors.
-                 */
-                uint32 npix = w - col;
-                fromskew = tw - npix;
-                (*put)(img, raster+y*w+col, col, y,
-                       npix, nrow, fromskew, toskew + fromskew, buf + pos);
-            }
-            else 
-            {
-                (*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos);
-            }
-        }
-
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-    _TIFFfree(buf);
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    return (ret);
-}
-
-/*
- * Get an tile-organized image that has
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */	
-static int
-gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileSeparateRoutine put = img->put.separate;
-    uint32 col, row, y, rowstoread;
-    uint32 pos;
-    uint32 tw, th;
-    u_char* buf;
-    u_char* r;
-    u_char* g;
-    u_char* b;
-    u_char* a;
-    tsize_t tilesize;
-    int32 fromskew, toskew;
-    int alpha = img->alpha;
-    uint32 nrow;
-    int ret = 1, flip;
-
-    tilesize = TIFFTileSize(tif);
-    buf = (u_char*) _TIFFmalloc(4*tilesize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    r = buf;
-    g = r + tilesize;
-    b = g + tilesize;
-    a = b + tilesize;
-    if (!alpha)
-	memset(a, 0xff, tilesize);
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(tw + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(tw - w);
-    }
-
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = th - (row + img->row_offset) % th;
-    	nrow = (row + rowstoread > h ? h - row : rowstoread);
-        for (col = 0; col < w; col += tw) 
-        {
-            if (TIFFReadTile(tif, r, col+img->col_offset,
-                             row+img->row_offset,0,0) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (TIFFReadTile(tif, g, col+img->col_offset,
-                             row+img->row_offset,0,1) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (TIFFReadTile(tif, b, col+img->col_offset,
-                             row+img->row_offset,0,2) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (alpha && TIFFReadTile(tif,a,col+img->col_offset,
-                                      row+img->row_offset,0,3) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-
-            pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
-            if (col + tw > w) 
-            {
-                /*
-                 * Tile is clipped horizontally.  Calculate
-                 * visible portion and skewing factors.
-                 */
-                uint32 npix = w - col;
-                fromskew = tw - npix;
-                (*put)(img, raster+y*w+col, col, y,
-                       npix, nrow, fromskew, toskew + fromskew, 
-                       r + pos, g + pos, b + pos, a + pos);
-            } 
-            else 
-            {
-                (*put)(img, raster+y*w+col, col, y,
-                       tw, nrow, 0, toskew, r + pos, g + pos, b + pos, a + pos);
-            }
-        }
-
-        y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * Get a strip-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileContigRoutine put = img->put.contig;
-    uint32 row, y, nrow, rowstoread;
-    uint32 pos;
-    u_char* buf;
-    uint32 rowsperstrip;
-    uint32 imagewidth = img->width;
-    tsize_t scanline;
-    int32 fromskew, toskew;
-    int ret = 1, flip;
-
-    buf = (u_char*) _TIFFmalloc(TIFFStripSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for strip buffer");
-	return (0);
-    }
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(w + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(w - w);
-    }
-
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
-        nrow = (row + rowstoread > h ? h - row : rowstoread);
-        if (TIFFReadEncodedStrip(tif,
-                                 TIFFComputeStrip(tif,row+img->row_offset, 0),
-                                 buf, 
-                                 ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-
-        pos = ((row + img->row_offset) % rowsperstrip) * scanline;
-        (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos);
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * Get a strip-organized image with
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */
-static int
-gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileSeparateRoutine put = img->put.separate;
-    u_char *buf;
-    u_char *r, *g, *b, *a;
-    uint32 row, y, nrow, rowstoread;
-    uint32 pos;
-    tsize_t scanline;
-    uint32 rowsperstrip, offset_row;
-    uint32 imagewidth = img->width;
-    tsize_t stripsize;
-    int32 fromskew, toskew;
-    int alpha = img->alpha;
-    int	ret = 1, flip;
-
-    stripsize = TIFFStripSize(tif);
-    r = buf = (u_char *)_TIFFmalloc(4*stripsize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    g = r + stripsize;
-    b = g + stripsize;
-    a = b + stripsize;
-    if (!alpha)
-	memset(a, 0xff, stripsize);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(w + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(w - w);
-    }
-
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;    	
-        nrow = (row + rowstoread > h ? h - row : rowstoread);
-        offset_row = row + img->row_offset;
-    	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
-                                 r, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
-                                 g, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
-                                 b, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (alpha &&
-            (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
-                                  a, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-             && img->stoponerr))
-        {
-            ret = 0;
-            break;
-        }
-
-        pos = ((row + img->row_offset) % rowsperstrip) * scanline;
-        (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, r + pos, g + pos, 
-               b + pos, a + pos);
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * The following routines move decoded data returned
- * from the TIFF library into rasters filled with packed
- * ABGR pixels (i.e. suitable for passing to lrecwrite.)
- *
- * The routines have been created according to the most
- * important cases and optimized.  pickTileContigCase and
- * pickTileSeparateCase analyze the parameters and select
- * the appropriate "put" routine to use.
- */
-#define	REPEAT8(op)	REPEAT4(op); REPEAT4(op)
-#define	REPEAT4(op)	REPEAT2(op); REPEAT2(op)
-#define	REPEAT2(op)	op; op
-#define	CASE8(x,op)			\
-    switch (x) {			\
-    case 7: op; case 6: op; case 5: op;	\
-    case 4: op; case 3: op; case 2: op;	\
-    case 1: op;				\
-    }
-#define	CASE4(x,op)	switch (x) { case 3: op; case 2: op; case 1: op; }
-#define	NOP
-
-#define	UNROLL8(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 8; _x -= 8) {	\
-	op1;				\
-	REPEAT8(op2);			\
-    }					\
-    if (_x > 0) {			\
-	op1;				\
-	CASE8(_x,op2);			\
-    }					\
-}
-#define	UNROLL4(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 4; _x -= 4) {	\
-	op1;				\
-	REPEAT4(op2);			\
-    }					\
-    if (_x > 0) {			\
-	op1;				\
-	CASE4(_x,op2);			\
-    }					\
-}
-#define	UNROLL2(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 2; _x -= 2) {	\
-	op1;				\
-	REPEAT2(op2);			\
-    }					\
-    if (_x) {				\
-	op1;				\
-	op2;				\
-    }					\
-}
-    
-#define	SKEW(r,g,b,skew)	{ r += skew; g += skew; b += skew; }
-#define	SKEW4(r,g,b,a,skew)	{ r += skew; g += skew; b += skew; a+= skew; }
-
-#define A1 ((uint32)(0xffL<<24))
-#define	PACK(r,g,b)	\
-	((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1)
-#define	PACK4(r,g,b,a)	\
-	((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24))
-#define W2B(v) (((v)>>8)&0xff)
-#define	PACKW(r,g,b)	\
-	((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1)
-#define	PACKW4(r,g,b,a)	\
-	((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24))
-
-#define	DECLAREContigPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img, \
-    uint32* cp, \
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h, \
-    int32 fromskew, int32 toskew, \
-    u_char* pp \
-)
-
-/*
- * 8-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put8bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;)
-        {
-	    *cp++ = PALmap[*pp][0];
-            pp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 4-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put4bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 2;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 2-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put2bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 4;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL4(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 1-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put1bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 8;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL8(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(putgreytile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint32** BWmap = img->BWmap;
-
-    (void) y;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;)
-        {
-	    *cp++ = BWmap[*pp][0];
-            pp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 16-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put16bitbwtile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint32** BWmap = img->BWmap;
-
-    (void) y;
-    while (h-- > 0) {
-        uint16 *wp = (uint16 *) pp;
-
-	for (x = w; x-- > 0;)
-        {
-            /* use high order byte of 16bit value */
-
-	    *cp++ = BWmap[*wp >> 8][0];
-            pp += 2 * samplesperpixel;
-            wp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 1-bit bilevel => colormap/RGB
- */
-DECLAREContigPutFunc(put1bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 8;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 2-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put2bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 4;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 4-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put4bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 2;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples, no Map => RGB
- */
-DECLAREContigPutFunc(putRGBcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    *cp++ = PACK(pp[0], pp[1], pp[2]);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples, w/ Map => RGB
- */
-DECLAREContigPutFunc(putRGBcontig8bitMaptile)
-{
-    TIFFRGBValue* Map = img->Map;
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACK(Map[pp[0]], Map[pp[1]], Map[pp[2]]);
-	    pp += samplesperpixel;
-	}
-	pp += fromskew;
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit packed samples => RGBA w/ associated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBAAcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    *cp++ = PACK4(pp[0], pp[1], pp[2], pp[3]);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples => RGBA w/ unassociated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBUAcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	uint32 r, g, b, a;
-	for (x = w; x-- > 0;) {
-	    a = pp[3];
-	    r = (pp[0] * a) / 255;
-	    g = (pp[1] * a) / 255;
-	    b = (pp[2] * a) / 255;
-	    *cp++ = PACK4(r,g,b,a);
-	    pp += samplesperpixel;
-	}
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGB
- */
-DECLAREContigPutFunc(putRGBcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACKW(wp[0], wp[1], wp[2]);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGBA w/ associated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBAAcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACKW4(wp[0], wp[1], wp[2], wp[3]);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGBA w/ unassociated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBUAcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	uint32 r,g,b,a;
-	/*
-	 * We shift alpha down four bits just in case unsigned
-	 * arithmetic doesn't handle the full range.
-	 * We still have plenty of accuracy, since the output is 8 bits.
-	 * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
-	 * Since we want r*a * 0xff for eight bit output,
-	 * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
-	 */
-	for (x = w; x-- > 0;) {
-	    a = wp[3] >> 4; 
-	    r = (wp[0] * a) / 0x10eff;
-	    g = (wp[1] * a) / 0x10eff;
-	    b = (wp[2] * a) / 0x10eff;
-	    *cp++ = PACK4(r,g,b,a);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed CMYK samples w/o Map => RGB
- *
- * NB: The conversion of CMYK->RGB is *very* crude.
- */
-DECLAREContigPutFunc(putRGBcontig8bitCMYKtile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 r, g, b, k;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    k = 255 - pp[3];
-	    r = (k*(255-pp[0]))/255;
-	    g = (k*(255-pp[1]))/255;
-	    b = (k*(255-pp[2]))/255;
-	    *cp++ = PACK(r, g, b);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed CMYK samples w/Map => RGB
- *
- * NB: The conversion of CMYK->RGB is *very* crude.
- */
-DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    TIFFRGBValue* Map = img->Map;
-    uint16 r, g, b, k;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    k = 255 - pp[3];
-	    r = (k*(255-pp[0]))/255;
-	    g = (k*(255-pp[1]))/255;
-	    b = (k*(255-pp[2]))/255;
-	    *cp++ = PACK(Map[r], Map[g], Map[b]);
-	    pp += samplesperpixel;
-	}
-	pp += fromskew;
-	cp += toskew;
-    }
-}
-
-#define	DECLARESepPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img,\
-    uint32* cp,\
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h,\
-    int32 fromskew, int32 toskew,\
-    u_char* r, u_char* g, u_char* b, u_char* a\
-)
-
-/*
- * 8-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate8bittile)
-{
-    (void) img; (void) x; (void) y; (void) a;
-    while (h-- > 0) {
-	UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++));
-	SKEW(r, g, b, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate8bitMaptile)
-{
-    TIFFRGBValue* Map = img->Map;
-
-    (void) y; (void) a;
-    while (h-- > 0) {
-	for (x = w; x > 0; x--)
-	    *cp++ = PACK(Map[*r++], Map[*g++], Map[*b++]);
-	SKEW(r, g, b, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGBA w/ associated alpha
- */
-DECLARESepPutFunc(putRGBAAseparate8bittile)
-{
-    (void) img; (void) x; (void) y;
-    while (h-- > 0) {
-	UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++));
-	SKEW4(r, g, b, a, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGBA w/ unassociated alpha
- */
-DECLARESepPutFunc(putRGBUAseparate8bittile)
-{
-    (void) img; (void) y;
-    while (h-- > 0) {
-	uint32 rv, gv, bv, av;
-	for (x = w; x-- > 0;) {
-	    av = *a++;
-	    rv = (*r++ * av) / 255;
-	    gv = (*g++ * av) / 255;
-	    bv = (*b++ * av) / 255;
-	    *cp++ = PACK4(rv,gv,bv,av);
-	}
-	SKEW4(r, g, b, a, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-
-    (void) img; (void) y; (void) a;
-    while (h-- > 0) {
-	for (x = 0; x < w; x++)
-	    *cp++ = PACKW(*wr++, *wg++, *wb++);
-	SKEW(wr, wg, wb, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGBA w/ associated alpha
- */
-DECLARESepPutFunc(putRGBAAseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-    uint16 *wa = (uint16*) a;
-
-    (void) img; (void) y;
-    while (h-- > 0) {
-	for (x = 0; x < w; x++)
-	    *cp++ = PACKW4(*wr++, *wg++, *wb++, *wa++);
-	SKEW4(wr, wg, wb, wa, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGBA w/ unassociated alpha
- */
-DECLARESepPutFunc(putRGBUAseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-    uint16 *wa = (uint16*) a;
-
-    (void) img; (void) y;
-    while (h-- > 0) {
-	uint32 r,g,b,a;
-	/*
-	 * We shift alpha down four bits just in case unsigned
-	 * arithmetic doesn't handle the full range.
-	 * We still have plenty of accuracy, since the output is 8 bits.
-	 * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
-	 * Since we want r*a * 0xff for eight bit output,
-	 * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
-	 */
-	for (x = w; x-- > 0;) {
-	    a = *wa++ >> 4; 
-	    r = (*wr++ * a) / 0x10eff;
-	    g = (*wg++ * a) / 0x10eff;
-	    b = (*wb++ * a) / 0x10eff;
-	    *cp++ = PACK4(r,g,b,a);
-	}
-	SKEW4(wr, wg, wb, wa, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit packed CIE L*a*b 1976 samples => RGB
- */
-DECLAREContigPutFunc(putcontig8bitCIELab)
-{
-	float X, Y, Z;
-	uint32 r, g, b;
-	(void) y;
-	fromskew *= 3;
-	while (h-- > 0) {
-		for (x = w; x-- > 0;) {
-			TIFFCIELabToXYZ(img->cielab,
-					(u_char)pp[0],
-					(signed char)pp[1],
-					(signed char)pp[2],
-					&X, &Y, &Z);
-			TIFFXYZToRGB(img->cielab, X, Y, Z, &r, &g, &b);
-			*cp++ = PACK(r, g, b);
-			pp += 3;
-		}
-		cp += toskew;
-		pp += fromskew;
-	}
-}
-
-/*
- * YCbCr -> RGB conversion and packing routines.
- */
-
-#define	YCbCrtoRGB(dst, Y) {						\
-	uint32 r, g, b;							\
-	TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b);		\
-	dst = PACK(r, g, b);						\
-}
-
-/*
- * 8-bit packed YCbCr samples => RGB 
- * This function is generic for different sampling sizes, 
- * and can handle blocks sizes that aren't multiples of the
- * sampling size.  However, it is substantially less optimized
- * than the specific sampling cases.  It is used as a fallback
- * for difficult blocks.
- */
-#ifdef notdef
-static void putcontig8bitYCbCrGenericTile( 
-    TIFFRGBAImage* img, 
-    uint32* cp, 
-    uint32 x, uint32 y, 
-    uint32 w, uint32 h, 
-    int32 fromskew, int32 toskew, 
-    u_char* pp,
-    int h_group, 
-    int v_group )
-
-{
-    uint32* cp1 = cp+w+toskew;
-    uint32* cp2 = cp1+w+toskew;
-    uint32* cp3 = cp2+w+toskew;
-    int32 incr = 3*w+4*toskew;
-    int32   Cb, Cr;
-    int     group_size = v_group * h_group + 2;
-
-    (void) y;
-    fromskew = (fromskew * group_size) / h_group;
-
-    for( yy = 0; yy < h; yy++ )
-    {
-        u_char *pp_line;
-        int     y_line_group = yy / v_group;
-        int     y_remainder = yy - y_line_group * v_group;
-
-        pp_line = pp + v_line_group * 
-
-        
-        for( xx = 0; xx < w; xx++ )
-        {
-            Cb = pp
-        }
-    }
-    for (; h >= 4; h -= 4) {
-	x = w>>2;
-	do {
-	    Cb = pp[16];
-	    Cr = pp[17];
-
-	    YCbCrtoRGB(cp [0], pp[ 0]);
-	    YCbCrtoRGB(cp [1], pp[ 1]);
-	    YCbCrtoRGB(cp [2], pp[ 2]);
-	    YCbCrtoRGB(cp [3], pp[ 3]);
-	    YCbCrtoRGB(cp1[0], pp[ 4]);
-	    YCbCrtoRGB(cp1[1], pp[ 5]);
-	    YCbCrtoRGB(cp1[2], pp[ 6]);
-	    YCbCrtoRGB(cp1[3], pp[ 7]);
-	    YCbCrtoRGB(cp2[0], pp[ 8]);
-	    YCbCrtoRGB(cp2[1], pp[ 9]);
-	    YCbCrtoRGB(cp2[2], pp[10]);
-	    YCbCrtoRGB(cp2[3], pp[11]);
-	    YCbCrtoRGB(cp3[0], pp[12]);
-	    YCbCrtoRGB(cp3[1], pp[13]);
-	    YCbCrtoRGB(cp3[2], pp[14]);
-	    YCbCrtoRGB(cp3[3], pp[15]);
-
-	    cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
-	    pp += 18;
-	} while (--x);
-	cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-	pp += fromskew;
-    }
-}
-#endif
-
-/*
- * 8-bit packed YCbCr samples w/ 4,4 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    uint32* cp2 = cp1+w+toskew;
-    uint32* cp3 = cp2+w+toskew;
-    int32 incr = 3*w+4*toskew;
-
-    (void) y;
-    /* adjust fromskew */
-    fromskew = (fromskew * 18) / 4;
-    if ((h & 3) == 0 && (w & 3) == 0) {				        
-        for (; h >= 4; h -= 4) {
-            x = w>>2;
-            do {
-                int32 Cb = pp[16];
-                int32 Cr = pp[17];
-
-                YCbCrtoRGB(cp [0], pp[ 0]);
-                YCbCrtoRGB(cp [1], pp[ 1]);
-                YCbCrtoRGB(cp [2], pp[ 2]);
-                YCbCrtoRGB(cp [3], pp[ 3]);
-                YCbCrtoRGB(cp1[0], pp[ 4]);
-                YCbCrtoRGB(cp1[1], pp[ 5]);
-                YCbCrtoRGB(cp1[2], pp[ 6]);
-                YCbCrtoRGB(cp1[3], pp[ 7]);
-                YCbCrtoRGB(cp2[0], pp[ 8]);
-                YCbCrtoRGB(cp2[1], pp[ 9]);
-                YCbCrtoRGB(cp2[2], pp[10]);
-                YCbCrtoRGB(cp2[3], pp[11]);
-                YCbCrtoRGB(cp3[0], pp[12]);
-                YCbCrtoRGB(cp3[1], pp[13]);
-                YCbCrtoRGB(cp3[2], pp[14]);
-                YCbCrtoRGB(cp3[3], pp[15]);
-
-                cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
-                pp += 18;
-            } while (--x);
-            cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[16];
-                int32 Cr = pp[17];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[3], pp[15]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[3], pp[11]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 3:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[2], pp[14]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[2], pp[10]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 2:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[1], pp[13]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[1], pp[ 9]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[0], pp[12]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[0], pp[ 8]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 4) {
-                    cp += x; cp1 += x; cp2 += x; cp3 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 4; cp1 += 4; cp2 += 4; cp3 += 4;
-                    x -= 4;
-                }
-                pp += 18;
-            }
-            if (h <= 4)
-                break;
-            h -= 4;
-            cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 4,2 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    int32 incr = 2*toskew+w;
-
-    (void) y;
-    fromskew = (fromskew * 10) / 4;
-    if ((h & 3) == 0 && (w & 1) == 0) {
-        for (; h >= 2; h -= 2) {
-            x = w>>2;
-            do {
-                int32 Cb = pp[8];
-                int32 Cr = pp[9];
-                
-                YCbCrtoRGB(cp [0], pp[0]);
-                YCbCrtoRGB(cp [1], pp[1]);
-                YCbCrtoRGB(cp [2], pp[2]);
-                YCbCrtoRGB(cp [3], pp[3]);
-                YCbCrtoRGB(cp1[0], pp[4]);
-                YCbCrtoRGB(cp1[1], pp[5]);
-                YCbCrtoRGB(cp1[2], pp[6]);
-                YCbCrtoRGB(cp1[3], pp[7]);
-                
-                cp += 4, cp1 += 4;
-                pp += 10;
-            } while (--x);
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[8];
-                int32 Cr = pp[9];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 3:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 2:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 4) {
-                    cp += x; cp1 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 4; cp1 += 4;
-                    x -= 4;
-                }
-                pp += 10;
-            }
-            if (h <= 2)
-                break;
-            h -= 2;
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 4,1 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
-{
-    (void) y;
-    /* XXX adjust fromskew */
-    do {
-	x = w>>2;
-	do {
-	    int32 Cb = pp[4];
-	    int32 Cr = pp[5];
-
-	    YCbCrtoRGB(cp [0], pp[0]);
-	    YCbCrtoRGB(cp [1], pp[1]);
-	    YCbCrtoRGB(cp [2], pp[2]);
-	    YCbCrtoRGB(cp [3], pp[3]);
-
-	    cp += 4;
-	    pp += 6;
-	} while (--x);
-
-        if( (w&3) != 0 )
-        {
-	    int32 Cb = pp[4];
-	    int32 Cr = pp[5];
-
-            switch( (w&3) ) {
-              case 3: YCbCrtoRGB(cp [2], pp[2]);
-              case 2: YCbCrtoRGB(cp [1], pp[1]);
-              case 1: YCbCrtoRGB(cp [0], pp[0]);
-              case 0: break;
-            }
-
-            cp += (w&3);
-            pp += 6;
-        }
-
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    int32 incr = 2*toskew+w;
-
-    (void) y;
-    fromskew = (fromskew * 6) / 2;
-    if ((h & 1) == 0 && (w & 1) == 0) {
-        for (; h >= 2; h -= 2) {
-            x = w>>1;
-            do {
-                int32 Cb = pp[4];
-                int32 Cr = pp[5];
-
-                YCbCrtoRGB(cp [0], pp[0]);
-                YCbCrtoRGB(cp [1], pp[1]);
-                YCbCrtoRGB(cp1[0], pp[2]);
-                YCbCrtoRGB(cp1[1], pp[3]);
-
-                cp += 2, cp1 += 2;
-                pp += 6;
-            } while (--x);
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[4];
-                int32 Cr = pp[5];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[1], pp[ 3]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[0], pp[ 2]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 2) {
-                    cp += x; cp1 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 2; cp1 += 2;
-                    x -= 2;
-                }
-                pp += 6;
-            }
-            if (h <= 2)
-                break;
-            h -= 2;
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 2,1 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
-{
-    (void) y;
-    fromskew = (fromskew * 4) / 2;
-    do {
-	x = w>>1;
-	do {
-	    int32 Cb = pp[2];
-	    int32 Cr = pp[3];
-
-	    YCbCrtoRGB(cp[0], pp[0]); 
-	    YCbCrtoRGB(cp[1], pp[1]);
-
-	    cp += 2;
-	    pp += 4;
-	} while (--x);
-
-        if( (w&1) != 0 )
-        {
-	    int32 Cb = pp[2];
-	    int32 Cr = pp[3];
-            
-            YCbCrtoRGB(cp [0], pp[0]);
-
-	    cp += 1;
-	    pp += 4;
-        }
-
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-}
-
-/*
- * 8-bit packed YCbCr samples w/ no subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
-{
-    (void) y;
-    fromskew *= 3;
-    do {
-        x = w; /* was x = w>>1; patched 2000/09/25 warmerda at home.com */ 
-	do {
-	    int32 Cb = pp[1];
-	    int32 Cr = pp[2];
-
-	    YCbCrtoRGB(*cp++, pp[0]);
-
-	    pp += 3;
-	} while (--x);
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-}
-#undef	YCbCrtoRGB
-
-static tileContigRoutine
-initYCbCrConversion(TIFFRGBAImage* img)
-{
-	static char module[] = "initCIELabConversion";
-
-	float *luma, *refBlackWhite;
-	uint16 hs, vs;
-
-	if (img->ycbcr == NULL) {
-	    img->ycbcr = (TIFFYCbCrToRGB*) _TIFFmalloc(
-		    TIFFroundup(sizeof (TIFFYCbCrToRGB), sizeof (long))
-		    + 4*256*sizeof (TIFFRGBValue)
-		    + 2*256*sizeof (int)
-		    + 3*256*sizeof (int32)
-	    );
-	    if (img->ycbcr == NULL) {
-		    TIFFError(module,
-			      "No space for YCbCr->RGB conversion state");
-		    return (NULL);
-	    }
-	}
-
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE,
-			      &refBlackWhite);
-	if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0)
-		return NULL;
-
-	/*
-	 * The 6.0 spec says that subsampling must be
-	 * one of 1, 2, or 4, and that vertical subsampling
-	 * must always be <= horizontal subsampling; so
-	 * there are only a few possibilities and we just
-	 * enumerate the cases.
-	 */
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
-	switch ((hs<<4)|vs) {
-		case 0x44: return (putcontig8bitYCbCr44tile);
-		case 0x42: return (putcontig8bitYCbCr42tile);
-		case 0x41: return (putcontig8bitYCbCr41tile);
-		case 0x22: return (putcontig8bitYCbCr22tile);
-		case 0x21: return (putcontig8bitYCbCr21tile);
-		case 0x11: return (putcontig8bitYCbCr11tile);
-	}
-
-	return (NULL);
-}
-
-static tileContigRoutine
-initCIELabConversion(TIFFRGBAImage* img)
-{
-	static char module[] = "initCIELabConversion";
-
-	float   *whitePoint;
-	float   refWhite[3];
-
-	if (!img->cielab) {
-		img->cielab = (TIFFCIELabToRGB *)
-			_TIFFmalloc(sizeof(TIFFCIELabToRGB));
-		if (!img->cielab) {
-			TIFFError(module,
-			    "No space for CIE L*a*b*->RGB conversion state.");
-			return NULL;
-		}
-	}
-
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint);
-	refWhite[1] = 100.0F;
-	refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
-	refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
-		      / whitePoint[1] * refWhite[1];
-	if (TIFFCIELabToRGBInit(img->cielab, &display_sRGB, refWhite) < 0) {
-		TIFFError(module,
-		    "Failed to initialize CIE L*a*b*->RGB conversion state.");
-		_TIFFfree(img->cielab);
-		return NULL;
-	}
-
-	return putcontig8bitCIELab;
-}
-
-/*
- * Greyscale images with less than 8 bits/sample are handled
- * with a table to avoid lots of shifts and masks.  The table
- * is setup so that put*bwtile (below) can retrieve 8/bitspersample
- * pixel values simply by indexing into the table with one
- * number.
- */
-static int
-makebwmap(TIFFRGBAImage* img)
-{
-    TIFFRGBValue* Map = img->Map;
-    int bitspersample = img->bitspersample;
-    int nsamples = 8 / bitspersample;
-    int i;
-    uint32* p;
-
-    if( nsamples == 0 )
-        nsamples = 1;
-
-    img->BWmap = (uint32**) _TIFFmalloc(
-	256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32)));
-    if (img->BWmap == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No space for B&W mapping table");
-	return (0);
-    }
-    p = (uint32*)(img->BWmap + 256);
-    for (i = 0; i < 256; i++) {
-	TIFFRGBValue c;
-	img->BWmap[i] = p;
-	switch (bitspersample) {
-#define	GREY(x)	c = Map[x]; *p++ = PACK(c,c,c);
-	case 1:
-	    GREY(i>>7);
-	    GREY((i>>6)&1);
-	    GREY((i>>5)&1);
-	    GREY((i>>4)&1);
-	    GREY((i>>3)&1);
-	    GREY((i>>2)&1);
-	    GREY((i>>1)&1);
-	    GREY(i&1);
-	    break;
-	case 2:
-	    GREY(i>>6);
-	    GREY((i>>4)&3);
-	    GREY((i>>2)&3);
-	    GREY(i&3);
-	    break;
-	case 4:
-	    GREY(i>>4);
-	    GREY(i&0xf);
-	    break;
-	case 8:
-        case 16:
-	    GREY(i);
-	    break;
-	}
-#undef	GREY
-    }
-    return (1);
-}
-
-/*
- * Construct a mapping table to convert from the range
- * of the data samples to [0,255] --for display.  This
- * process also handles inverting B&W images when needed.
- */ 
-static int
-setupMap(TIFFRGBAImage* img)
-{
-    int32 x, range;
-
-    range = (int32)((1L<<img->bitspersample)-1);
-    
-    /* treat 16 bit the same as eight bit */
-    if( img->bitspersample == 16 )
-        range = (int32) 255;
-
-    img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue));
-    if (img->Map == NULL) {
-	TIFFError(TIFFFileName(img->tif),
-	    "No space for photometric conversion table");
-	return (0);
-    }
-    if (img->photometric == PHOTOMETRIC_MINISWHITE) {
-	for (x = 0; x <= range; x++)
-	    img->Map[x] = (TIFFRGBValue) (((range - x) * 255) / range);
-    } else {
-	for (x = 0; x <= range; x++)
-	    img->Map[x] = (TIFFRGBValue) ((x * 255) / range);
-    }
-    if (img->bitspersample <= 16 &&
-	(img->photometric == PHOTOMETRIC_MINISBLACK ||
-	 img->photometric == PHOTOMETRIC_MINISWHITE)) {
-	/*
-	 * Use photometric mapping table to construct
-	 * unpacking tables for samples <= 8 bits.
-	 */
-	if (!makebwmap(img))
-	    return (0);
-	/* no longer need Map, free it */
-	_TIFFfree(img->Map), img->Map = NULL;
-    }
-    return (1);
-}
-
-static int
-checkcmap(TIFFRGBAImage* img)
-{
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    long n = 1L<<img->bitspersample;
-
-    while (n-- > 0)
-	if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-	    return (16);
-    return (8);
-}
-
-static void
-cvtcmap(TIFFRGBAImage* img)
-{
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    long i;
-
-    for (i = (1L<<img->bitspersample)-1; i >= 0; i--) {
-#define	CVT(x)		((uint16)((x)>>8))
-	r[i] = CVT(r[i]);
-	g[i] = CVT(g[i]);
-	b[i] = CVT(b[i]);
-#undef	CVT
-    }
-}
-
-/*
- * Palette images with <= 8 bits/sample are handled
- * with a table to avoid lots of shifts and masks.  The table
- * is setup so that put*cmaptile (below) can retrieve 8/bitspersample
- * pixel values simply by indexing into the table with one
- * number.
- */
-static int
-makecmap(TIFFRGBAImage* img)
-{
-    int bitspersample = img->bitspersample;
-    int nsamples = 8 / bitspersample;
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    uint32 *p;
-    int i;
-
-    img->PALmap = (uint32**) _TIFFmalloc(
-	256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32)));
-    if (img->PALmap == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No space for Palette mapping table");
-	return (0);
-    }
-    p = (uint32*)(img->PALmap + 256);
-    for (i = 0; i < 256; i++) {
-	TIFFRGBValue c;
-	img->PALmap[i] = p;
-#define	CMAP(x)	c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff);
-	switch (bitspersample) {
-	case 1:
-	    CMAP(i>>7);
-	    CMAP((i>>6)&1);
-	    CMAP((i>>5)&1);
-	    CMAP((i>>4)&1);
-	    CMAP((i>>3)&1);
-	    CMAP((i>>2)&1);
-	    CMAP((i>>1)&1);
-	    CMAP(i&1);
-	    break;
-	case 2:
-	    CMAP(i>>6);
-	    CMAP((i>>4)&3);
-	    CMAP((i>>2)&3);
-	    CMAP(i&3);
-	    break;
-	case 4:
-	    CMAP(i>>4);
-	    CMAP(i&0xf);
-	    break;
-	case 8:
-	    CMAP(i);
-	    break;
-	}
-#undef CMAP
-    }
-    return (1);
-}
-
-/* 
- * Construct any mapping table used
- * by the associated put routine.
- */
-static int
-buildMap(TIFFRGBAImage* img)
-{
-    switch (img->photometric) {
-    case PHOTOMETRIC_RGB:
-    case PHOTOMETRIC_YCBCR:
-    case PHOTOMETRIC_SEPARATED:
-	if (img->bitspersample == 8)
-	    break;
-	/* fall thru... */
-    case PHOTOMETRIC_MINISBLACK:
-    case PHOTOMETRIC_MINISWHITE:
-	if (!setupMap(img))
-	    return (0);
-	break;
-    case PHOTOMETRIC_PALETTE:
-	/*
-	 * Convert 16-bit colormap to 8-bit (unless it looks
-	 * like an old-style 8-bit colormap).
-	 */
-	if (checkcmap(img) == 16)
-	    cvtcmap(img);
-	else
-	    TIFFWarning(TIFFFileName(img->tif), "Assuming 8-bit colormap");
-	/*
-	 * Use mapping table and colormap to construct
-	 * unpacking tables for samples < 8 bits.
-	 */
-	if (img->bitspersample <= 8 && !makecmap(img))
-	    return (0);
-	break;
-    }
-    return (1);
-}
-
-/*
- * Select the appropriate conversion routine for packed data.
- */
-static int
-pickTileContigCase(TIFFRGBAImage* img)
-{
-    tileContigRoutine put = 0;
-
-    if (buildMap(img)) {
-	switch (img->photometric) {
-	case PHOTOMETRIC_RGB:
-	    switch (img->bitspersample) {
-	    case 8:
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAcontig8bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAcontig8bittile;
-		    else
-			put = putRGBcontig8bittile;
-		} else
-		    put = putRGBcontig8bitMaptile;
-		break;
-	    case 16:
-		put = putRGBcontig16bittile;
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAcontig16bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAcontig16bittile;
-		}
-		break;
-	    }
-	    break;
-	case PHOTOMETRIC_SEPARATED:
-	    if (img->bitspersample == 8) {
-		if (!img->Map)
-		    put = putRGBcontig8bitCMYKtile;
-		else
-		    put = putRGBcontig8bitCMYKMaptile;
-	    }
-	    break;
-	case PHOTOMETRIC_PALETTE:
-	    switch (img->bitspersample) {
-	    case 8:	put = put8bitcmaptile; break;
-	    case 4: put = put4bitcmaptile; break;
-	    case 2: put = put2bitcmaptile; break;
-	    case 1: put = put1bitcmaptile; break;
-	    }
-	    break;
-	case PHOTOMETRIC_MINISWHITE:
-	case PHOTOMETRIC_MINISBLACK:
-	    switch (img->bitspersample) {
-            case 16: put = put16bitbwtile; break;
-	    case 8:  put = putgreytile; break;
-	    case 4:  put = put4bitbwtile; break;
-	    case 2:  put = put2bitbwtile; break;
-	    case 1:  put = put1bitbwtile; break;
-	    }
-	    break;
-	case PHOTOMETRIC_YCBCR:
-	    if (img->bitspersample == 8)
-		put = initYCbCrConversion(img);
-	    break;
-	case PHOTOMETRIC_CIELAB:
-	    if (img->bitspersample == 8)
-		put = initCIELabConversion(img);
-	    break;
-	}
-    }
-    return ((img->put.contig = put) != 0);
-}
-
-/*
- * Select the appropriate conversion routine for unpacked data.
- *
- * NB: we assume that unpacked single channel data is directed
- *	 to the "packed routines.
- */
-static int
-pickTileSeparateCase(TIFFRGBAImage* img)
-{
-    tileSeparateRoutine put = 0;
-
-    if (buildMap(img)) {
-	switch (img->photometric) {
-	case PHOTOMETRIC_RGB:
-	    switch (img->bitspersample) {
-	    case 8:
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAseparate8bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAseparate8bittile;
-		    else
-			put = putRGBseparate8bittile;
-		} else
-		    put = putRGBseparate8bitMaptile;
-		break;
-	    case 16:
-		put = putRGBseparate16bittile;
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAseparate16bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAseparate16bittile;
-		}
-		break;
-	    }
-	    break;
-	}
-    }
-    return ((img->put.separate = put) != 0);
-}
-
-/*
- * Read a whole strip off data from the file, and convert to RGBA form.
- * If this is the last strip, then it will only contain the portion of
- * the strip that is actually within the image space.  The result is
- * organized in bottom to top form.
- */
-
-
-int
-TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
-
-{
-    char 	emsg[1024];
-    TIFFRGBAImage img;
-    int 	ok;
-    uint32	rowsperstrip, rows_to_read;
-
-    if( TIFFIsTiled( tif ) )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Can't use TIFFReadRGBAStrip() with tiled file.");
-	return (0);
-    }
-    
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    if( (row % rowsperstrip) != 0 )
-    {
-        TIFFError(TIFFFileName(tif),
-                "Row passed to TIFFReadRGBAStrip() must be first in a strip.");
-	return (0);
-    }
-
-    if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-
-        img.row_offset = row;
-        img.col_offset = 0;
-
-        if( row + rowsperstrip > img.height )
-            rows_to_read = img.height - row;
-        else
-            rows_to_read = rowsperstrip;
-        
-	ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read );
-        
-	TIFFRGBAImageEnd(&img);
-    } else {
-	TIFFError(TIFFFileName(tif), emsg);
-	ok = 0;
-    }
-    
-    return (ok);
-}
-
-/*
- * Read a whole tile off data from the file, and convert to RGBA form.
- * The returned RGBA data is organized from bottom to top of tile,
- * and may include zeroed areas if the tile extends off the image.
- */
-
-int
-TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
-
-{
-    char 	emsg[1024];
-    TIFFRGBAImage img;
-    int 	ok;
-    uint32	tile_xsize, tile_ysize;
-    uint32	read_xsize, read_ysize;
-    uint32	i_row;
-
-    /*
-     * Verify that our request is legal - on a tile file, and on a
-     * tile boundary.
-     */
-    
-    if( !TIFFIsTiled( tif ) )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Can't use TIFFReadRGBATile() with stripped file.");
-	return (0);
-    }
-    
-    TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize);
-    if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Row/col passed to TIFFReadRGBATile() must be top"
-                  "left corner of a tile.");
-	return (0);
-    }
-
-    /*
-     * Setup the RGBA reader.
-     */
-    
-    if (!TIFFRGBAImageOK(tif, emsg) 
-	|| !TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-	    TIFFError(TIFFFileName(tif), emsg);
-	    return( 0 );
-    }
-
-    /*
-     * The TIFFRGBAImageGet() function doesn't allow us to get off the
-     * edge of the image, even to fill an otherwise valid tile.  So we
-     * figure out how much we can read, and fix up the tile buffer to
-     * a full tile configuration afterwards.
-     */
-
-    if( row + tile_ysize > img.height )
-        read_ysize = img.height - row;
-    else
-        read_ysize = tile_ysize;
-    
-    if( col + tile_xsize > img.width )
-        read_xsize = img.width - col;
-    else
-        read_xsize = tile_xsize;
-
-    /*
-     * Read the chunk of imagery.
-     */
-    
-    img.row_offset = row;
-    img.col_offset = col;
-
-    ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize );
-        
-    TIFFRGBAImageEnd(&img);
-
-    /*
-     * If our read was incomplete we will need to fix up the tile by
-     * shifting the data around as if a full tile of data is being returned.
-     *
-     * This is all the more complicated because the image is organized in
-     * bottom to top format. 
-     */
-
-    if( read_xsize == tile_xsize && read_ysize == tile_ysize )
-        return( ok );
-
-    for( i_row = 0; i_row < read_ysize; i_row++ ) {
-        memmove( raster + (tile_ysize - i_row - 1) * tile_xsize,
-                 raster + (read_ysize - i_row - 1) * read_xsize,
-                 read_xsize * sizeof(uint32) );
-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize,
-                     0, sizeof(uint32) * (tile_xsize - read_xsize) );
-    }
-
-    for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) {
-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize,
-                     0, sizeof(uint32) * tile_xsize );
-    }
-
-    return (ok);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_jpeg.c b/tkimg1.3/libtiff/libtiff/tif_jpeg.c
deleted file mode 100644
index 45af29e..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_jpeg.c
+++ /dev/null
@@ -1,1667 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_jpeg.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1994-1997 Sam Leffler
- * Copyright (c) 1994-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef JPEG_SUPPORT
-/*
- * TIFF Library
- *
- * JPEG Compression support per TIFF Technical Note #2
- * (*not* per the original TIFF 6.0 spec).
- *
- * This file is simply an interface to the libjpeg library written by
- * the Independent JPEG Group.  You need release 5 or later of the IJG
- * code, which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
- *
- * Contributed by Tom Lane <tgl at sss.pgh.pa.us>.
- */
-#include <assert.h>
-#include <stdio.h>
-#include <setjmp.h>
-
-int TIFFFillStrip(TIFF*, tstrip_t);
-int TIFFFillTile(TIFF*, ttile_t);
-
-/* We undefine FAR to avoid conflict with JPEG definition */
-
-#ifdef FAR
-#undef FAR
-#endif
-
-/*
-   The windows RPCNDR.H file defines boolean, but defines it with the
-   wrong size.  So we declare HAVE_BOOLEAN so that the jpeg include file
-   won't try to typedef boolean, but #define it to override the rpcndr.h
-   definition.
-
-   http://bugzilla.remotesensing.org/show_bug.cgi?id=188
-*/
-#if defined(__RPCNDR_H__)
-#define HAVE_BOOLEAN
-#define boolean unsigned int
-#endif
-
-#include "jpeglib.h"
-#include "jerror.h"
-
-/*
- * On some machines it may be worthwhile to use _setjmp or sigsetjmp
- * in place of plain setjmp.  These macros will make it easier.
- */
-#define SETJMP(jbuf)		setjmp(jbuf)
-#define LONGJMP(jbuf,code)	longjmp(jbuf,code)
-#define JMP_BUF			jmp_buf
-
-typedef struct jpeg_destination_mgr jpeg_destination_mgr;
-typedef struct jpeg_source_mgr jpeg_source_mgr;
-typedef	struct jpeg_error_mgr jpeg_error_mgr;
-
-/*
- * State block for each open TIFF file using
- * libjpeg to do JPEG compression/decompression.
- *
- * libjpeg's visible state is either a jpeg_compress_struct
- * or jpeg_decompress_struct depending on which way we
- * are going.  comm can be used to refer to the fields
- * which are common to both.
- *
- * NB: cinfo is required to be the first member of JPEGState,
- *     so we can safely cast JPEGState* -> jpeg_xxx_struct*
- *     and vice versa!
- */
-typedef	struct {
-	union {
-		struct jpeg_compress_struct c;
-		struct jpeg_decompress_struct d;
-		struct jpeg_common_struct comm;
-	} cinfo;			/* NB: must be first */
-        int             cinfo_initialized;
-
-	jpeg_error_mgr	err;		/* libjpeg error manager */
-	JMP_BUF		exit_jmpbuf;	/* for catching libjpeg failures */
-	/*
-	 * The following two members could be a union, but
-	 * they're small enough that it's not worth the effort.
-	 */
-	jpeg_destination_mgr dest;	/* data dest for compression */
-	jpeg_source_mgr	src;		/* data source for decompression */
-					/* private state */
-	TIFF*		tif;		/* back link needed by some code */
-	uint16		photometric;	/* copy of PhotometricInterpretation */
-	uint16		h_sampling;	/* luminance sampling factors */
-	uint16		v_sampling;
-	tsize_t		bytesperline;	/* decompressed bytes per scanline */
-	/* pointers to intermediate buffers when processing downsampled data */
-	JSAMPARRAY	ds_buffer[MAX_COMPONENTS];
-	int		scancount;	/* number of "scanlines" accumulated */
-	int		samplesperclump;
-
-	TIFFVGetMethod	vgetparent;	/* super-class method */
-	TIFFVSetMethod	vsetparent;	/* super-class method */
-	TIFFStripMethod	defsparent;	/* super-class method */
-	TIFFTileMethod	deftparent;	/* super-class method */
-					/* pseudo-tag fields */
-	void*		jpegtables;	/* JPEGTables tag value, or NULL */
-	uint32		jpegtables_length; /* number of bytes in same */
-	int		jpegquality;	/* Compression quality level */
-	int		jpegcolormode;	/* Auto RGB<=>YCbCr convert? */
-	int		jpegtablesmode;	/* What to put in JPEGTables */
-
-        int             ycbcrsampling_fetched;
-} JPEGState;
-
-#define	JState(tif)	((JPEGState*)(tif)->tif_data)
-
-static	int JPEGDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGDecodeRaw(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGEncodeRaw(TIFF*, tidata_t, tsize_t, tsample_t);
-static  int JPEGInitializeLibJPEG( TIFF * tif );
-
-#define	FIELD_JPEGTABLES	(FIELD_CODEC+0)
-
-static const TIFFFieldInfo jpegFieldInfo[] = {
-    { TIFFTAG_JPEGTABLES,	 -1,-1,	TIFF_UNDEFINED,	FIELD_JPEGTABLES,
-      FALSE,	TRUE,	"JPEGTables" },
-    { TIFFTAG_JPEGQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-    { TIFFTAG_JPEGCOLORMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-    { TIFFTAG_JPEGTABLESMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-/*
- * libjpeg interface layer.
- *
- * We use setjmp/longjmp to return control to libtiff
- * when a fatal error is encountered within the JPEG
- * library.  We also direct libjpeg error and warning
- * messages through the appropriate libtiff handlers.
- */
-
-/*
- * Error handling routines (these replace corresponding
- * IJG routines from jerror.c).  These are used for both
- * compression and decompression.
- */
-static void
-TIFFjpeg_error_exit(j_common_ptr cinfo)
-{
-	JPEGState *sp = (JPEGState *) cinfo;	/* NB: cinfo assumed first */
-	char buffer[JMSG_LENGTH_MAX];
-
-	(*cinfo->err->format_message) (cinfo, buffer);
-	TIFFError("JPEGLib", buffer);		/* display the error message */
-	jpeg_abort(cinfo);			/* clean up libjpeg state */
-	LONGJMP(sp->exit_jmpbuf, 1);		/* return to libtiff caller */
-}
-
-/*
- * This routine is invoked only for warning messages,
- * since error_exit does its own thing and trace_level
- * is never set > 0.
- */
-static void
-TIFFjpeg_output_message(j_common_ptr cinfo)
-{
-	char buffer[JMSG_LENGTH_MAX];
-
-	(*cinfo->err->format_message) (cinfo, buffer);
-	TIFFWarning("JPEGLib", buffer);
-}
-
-/*
- * Interface routines.  This layer of routines exists
- * primarily to limit side-effects from using setjmp.
- * Also, normal/error returns are converted into return
- * values per libtiff practice.
- */
-#define	CALLJPEG(sp, fail, op)	(SETJMP((sp)->exit_jmpbuf) ? (fail) : (op))
-#define	CALLVJPEG(sp, op)	CALLJPEG(sp, 0, ((op),1))
-
-static int
-TIFFjpeg_create_compress(JPEGState* sp)
-{
-	/* initialize JPEG error handling */
-	sp->cinfo.c.err = jpeg_std_error(&sp->err);
-	sp->err.error_exit = TIFFjpeg_error_exit;
-	sp->err.output_message = TIFFjpeg_output_message;
-
-	return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_create_decompress(JPEGState* sp)
-{
-	/* initialize JPEG error handling */
-	sp->cinfo.d.err = jpeg_std_error(&sp->err);
-	sp->err.error_exit = TIFFjpeg_error_exit;
-	sp->err.output_message = TIFFjpeg_output_message;
-
-	return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_set_defaults(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_set_defaults(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_set_colorspace(JPEGState* sp, J_COLOR_SPACE colorspace)
-{
-	return CALLVJPEG(sp, jpeg_set_colorspace(&sp->cinfo.c, colorspace));
-}
-
-static int
-TIFFjpeg_set_quality(JPEGState* sp, int quality, boolean force_baseline)
-{
-	return CALLVJPEG(sp,
-	    jpeg_set_quality(&sp->cinfo.c, quality, force_baseline));
-}
-
-static int
-TIFFjpeg_suppress_tables(JPEGState* sp, boolean suppress)
-{
-	return CALLVJPEG(sp, jpeg_suppress_tables(&sp->cinfo.c, suppress));
-}
-
-static int
-TIFFjpeg_start_compress(JPEGState* sp, boolean write_all_tables)
-{
-	return CALLVJPEG(sp,
-	    jpeg_start_compress(&sp->cinfo.c, write_all_tables));
-}
-
-static int
-TIFFjpeg_write_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int num_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_write_scanlines(&sp->cinfo.c,
-	    scanlines, (JDIMENSION) num_lines));
-}
-
-static int
-TIFFjpeg_write_raw_data(JPEGState* sp, JSAMPIMAGE data, int num_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_write_raw_data(&sp->cinfo.c,
-	    data, (JDIMENSION) num_lines));
-}
-
-static int
-TIFFjpeg_finish_compress(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_finish_compress(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_write_tables(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_write_tables(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_read_header(JPEGState* sp, boolean require_image)
-{
-	return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image));
-}
-
-static int
-TIFFjpeg_start_decompress(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_read_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int max_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_read_scanlines(&sp->cinfo.d,
-	    scanlines, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_read_raw_data(JPEGState* sp, JSAMPIMAGE data, int max_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_read_raw_data(&sp->cinfo.d,
-	    data, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_finish_decompress(JPEGState* sp)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_finish_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_abort(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_abort(&sp->cinfo.comm));
-}
-
-static int
-TIFFjpeg_destroy(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_destroy(&sp->cinfo.comm));
-}
-
-static JSAMPARRAY
-TIFFjpeg_alloc_sarray(JPEGState* sp, int pool_id,
-		      JDIMENSION samplesperrow, JDIMENSION numrows)
-{
-	return CALLJPEG(sp, (JSAMPARRAY) NULL,
-	    (*sp->cinfo.comm.mem->alloc_sarray)
-		(&sp->cinfo.comm, pool_id, samplesperrow, numrows));
-}
-
-/*
- * JPEG library destination data manager.
- * These routines direct compressed data from libjpeg into the
- * libtiff output buffer.
- */
-
-static void
-std_init_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-	sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-}
-
-static boolean
-std_empty_output_buffer(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	/* the entire buffer has been filled */
-	tif->tif_rawcc = tif->tif_rawdatasize;
-	TIFFFlushData1(tif);
-	sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-	sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-
-	return (TRUE);
-}
-
-static void
-std_term_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	tif->tif_rawcp = (tidata_t) sp->dest.next_output_byte;
-	tif->tif_rawcc =
-	    tif->tif_rawdatasize - (tsize_t) sp->dest.free_in_buffer;
-	/* NB: libtiff does the final buffer flush */
-}
-
-static void
-TIFFjpeg_data_dest(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	sp->cinfo.c.dest = &sp->dest;
-	sp->dest.init_destination = std_init_destination;
-	sp->dest.empty_output_buffer = std_empty_output_buffer;
-	sp->dest.term_destination = std_term_destination;
-}
-
-/*
- * Alternate destination manager for outputting to JPEGTables field.
- */
-
-static void
-tables_init_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	/* while building, jpegtables_length is allocated buffer size */
-	sp->dest.next_output_byte = (JOCTET*) sp->jpegtables;
-	sp->dest.free_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static boolean
-tables_empty_output_buffer(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	void* newbuf;
-
-	/* the entire buffer has been filled; enlarge it by 1000 bytes */
-	newbuf = _TIFFrealloc((tdata_t) sp->jpegtables,
-			      (tsize_t) (sp->jpegtables_length + 1000));
-	if (newbuf == NULL)
-		ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 100);
-	sp->dest.next_output_byte = (JOCTET*) newbuf + sp->jpegtables_length;
-	sp->dest.free_in_buffer = (size_t) 1000;
-	sp->jpegtables = newbuf;
-	sp->jpegtables_length += 1000;
-	return (TRUE);
-}
-
-static void
-tables_term_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	/* set tables length to number of bytes actually emitted */
-	sp->jpegtables_length -= sp->dest.free_in_buffer;
-}
-
-static int
-TIFFjpeg_tables_dest(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	/*
-	 * Allocate a working buffer for building tables.
-	 * Initial size is 1000 bytes, which is usually adequate.
-	 */
-	if (sp->jpegtables)
-		_TIFFfree(sp->jpegtables);
-	sp->jpegtables_length = 1000;
-	sp->jpegtables = (void*) _TIFFmalloc((tsize_t) sp->jpegtables_length);
-	if (sp->jpegtables == NULL) {
-		sp->jpegtables_length = 0;
-		TIFFError("TIFFjpeg_tables_dest", "No space for JPEGTables");
-		return (0);
-	}
-	sp->cinfo.c.dest = &sp->dest;
-	sp->dest.init_destination = tables_init_destination;
-	sp->dest.empty_output_buffer = tables_empty_output_buffer;
-	sp->dest.term_destination = tables_term_destination;
-	return (1);
-}
-
-/*
- * JPEG library source data manager.
- * These routines supply compressed data to libjpeg.
- */
-
-static void
-std_init_source(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	sp->src.next_input_byte = (const JOCTET*) tif->tif_rawdata;
-	sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc;
-}
-
-static boolean
-std_fill_input_buffer(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState* ) cinfo;
-	static const JOCTET dummy_EOI[2] = { 0xFF, JPEG_EOI };
-
-	/*
-	 * Should never get here since entire strip/tile is
-	 * read into memory before the decompressor is called,
-	 * and thus was supplied by init_source.
-	 */
-	WARNMS(cinfo, JWRN_JPEG_EOF);
-	/* insert a fake EOI marker */
-	sp->src.next_input_byte = dummy_EOI;
-	sp->src.bytes_in_buffer = 2;
-	return (TRUE);
-}
-
-static void
-std_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	if (num_bytes > 0) {
-		if (num_bytes > (long) sp->src.bytes_in_buffer) {
-			/* oops, buffer overrun */
-			(void) std_fill_input_buffer(cinfo);
-		} else {
-			sp->src.next_input_byte += (size_t) num_bytes;
-			sp->src.bytes_in_buffer -= (size_t) num_bytes;
-		}
-	}
-}
-
-static void
-std_term_source(j_decompress_ptr cinfo)
-{
-	/* No work necessary here */
-	/* Or must we update tif->tif_rawcp, tif->tif_rawcc ??? */
-	/* (if so, need empty tables_term_source!) */
-	(void) cinfo;
-}
-
-static void
-TIFFjpeg_data_src(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	sp->cinfo.d.src = &sp->src;
-	sp->src.init_source = std_init_source;
-	sp->src.fill_input_buffer = std_fill_input_buffer;
-	sp->src.skip_input_data = std_skip_input_data;
-	sp->src.resync_to_restart = jpeg_resync_to_restart;
-	sp->src.term_source = std_term_source;
-	sp->src.bytes_in_buffer = 0;		/* for safety */
-	sp->src.next_input_byte = NULL;
-}
-
-/*
- * Alternate source manager for reading from JPEGTables.
- * We can share all the code except for the init routine.
- */
-
-static void
-tables_init_source(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	sp->src.next_input_byte = (const JOCTET*) sp->jpegtables;
-	sp->src.bytes_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static void
-TIFFjpeg_tables_src(JPEGState* sp, TIFF* tif)
-{
-	TIFFjpeg_data_src(sp, tif);
-	sp->src.init_source = tables_init_source;
-}
-
-/*
- * Allocate downsampled-data buffers needed for downsampled I/O.
- * We use values computed in jpeg_start_compress or jpeg_start_decompress.
- * We use libjpeg's allocator so that buffers will be released automatically
- * when done with strip/tile.
- * This is also a handy place to compute samplesperclump, bytesperline.
- */
-static int
-alloc_downsampled_buffers(TIFF* tif, jpeg_component_info* comp_info,
-			  int num_components)
-{
-	JPEGState* sp = JState(tif);
-	int ci;
-	jpeg_component_info* compptr;
-	JSAMPARRAY buf;
-	int samples_per_clump = 0;
-
-	for (ci = 0, compptr = comp_info; ci < num_components;
-	     ci++, compptr++) {
-		samples_per_clump += compptr->h_samp_factor *
-			compptr->v_samp_factor;
-		buf = TIFFjpeg_alloc_sarray(sp, JPOOL_IMAGE,
-				compptr->width_in_blocks * DCTSIZE,
-				(JDIMENSION) (compptr->v_samp_factor*DCTSIZE));
-		if (buf == NULL)
-			return (0);
-		sp->ds_buffer[ci] = buf;
-	}
-	sp->samplesperclump = samples_per_clump;
-	return (1);
-}
-
-
-/*
- * JPEG Decoding.
- */
-
-static int
-JPEGSetupDecode(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-        JPEGInitializeLibJPEG( tif );
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-
-	/* Read JPEGTables if it is present */
-	if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) {
-		TIFFjpeg_tables_src(sp, tif);
-		if(TIFFjpeg_read_header(sp,FALSE) != JPEG_HEADER_TABLES_ONLY) {
-			TIFFError("JPEGSetupDecode", "Bogus JPEGTables field");
-			return (0);
-		}
-	}
-
-	/* Grab parameters that are same for all strips/tiles */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		break;
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-
-	/* Set up for reading normal data */
-	TIFFjpeg_data_src(sp, tif);
-	tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */
-	return (1);
-}
-
-/*
- * Set up for decoding a strip or tile.
- */
-static int
-JPEGPreDecode(TIFF* tif, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGPreDecode";
-	uint32 segment_width, segment_height;
-	int downsampled_output;
-	int ci;
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-	/*
-	 * Reset decoder state from any previous strip/tile,
-	 * in case application didn't read the whole strip.
-	 */
-	if (!TIFFjpeg_abort(sp))
-		return (0);
-	/*
-	 * Read the header for this strip/tile.
-	 */
-	if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK)
-		return (0);
-	/*
-	 * Check image parameters and set decompression parameters.
-	 */
-	segment_width = td->td_imagewidth;
-	segment_height = td->td_imagelength - tif->tif_row;
-	if (isTiled(tif)) {
-                segment_width = td->td_tilewidth;
-                segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/*
-		 * For PC 2, scale down the expected strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (sp->cinfo.d.image_width != segment_width ||
-	    sp->cinfo.d.image_height != segment_height) {
-		TIFFWarning(module, 
-                 "Improper JPEG strip/tile size, expected %dx%d, got %dx%d",
-                          segment_width, 
-                          segment_height,
-                          sp->cinfo.d.image_width, 
-                          sp->cinfo.d.image_height);
-	}
-	if (sp->cinfo.d.num_components !=
-	    (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	     td->td_samplesperpixel : 1)) {
-		TIFFError(module, "Improper JPEG component count");
-		return (0);
-	}
-	if (sp->cinfo.d.data_precision != td->td_bitspersample) {
-		TIFFError(module, "Improper JPEG data precision");
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		/* Component 0 should have expected sampling factors */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
-			TIFFWarning(module, 
-                                    "Improper JPEG sampling factors %d,%d\n"
-                                    "Apparently should be %d,%d, "
-                                    "decompressor will try reading with "
-                                    "sampling %d,%d",
-                                    sp->cinfo.d.comp_info[0].h_samp_factor,
-                                    sp->cinfo.d.comp_info[0].v_samp_factor,
-                                    sp->h_sampling, 
-                                    sp->v_sampling,
-                                    sp->cinfo.d.comp_info[0].h_samp_factor,
-                                    sp->cinfo.d.comp_info[0].v_samp_factor );
-
-                        sp->h_sampling = (uint16)
-                            sp->cinfo.d.comp_info[0].h_samp_factor;
-                        sp->v_sampling = (uint16)
-                            sp->cinfo.d.comp_info[0].v_samp_factor;
-		}
-		/* Rest should have sampling factors 1,1 */
-		for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
-			if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 ||
-			    sp->cinfo.d.comp_info[ci].v_samp_factor != 1) {
-				TIFFError(module, "Improper JPEG sampling factors");
-				return (0);
-			}
-		}
-	} else {
-		/* PC 2's single component should have sampling factors 1,1 */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != 1 ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != 1) {
-			TIFFError(module, "Improper JPEG sampling factors");
-			return (0);
-		}
-	}
-	downsampled_output = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    sp->photometric == PHOTOMETRIC_YCBCR &&
-	    sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-    	/* Convert YCbCr to RGB */
-		sp->cinfo.d.jpeg_color_space = JCS_YCbCr;
-		sp->cinfo.d.out_color_space = JCS_RGB;
-	} else {
-			/* Suppress colorspace handling */
-		sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN;
-		sp->cinfo.d.out_color_space = JCS_UNKNOWN;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-		    (sp->h_sampling != 1 || sp->v_sampling != 1))
-			downsampled_output = TRUE;
-		/* XXX what about up-sampling? */
-	}
-	if (downsampled_output) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.d.raw_data_out = TRUE;
-		tif->tif_decoderow = JPEGDecodeRaw;
-		tif->tif_decodestrip = JPEGDecodeRaw;
-		tif->tif_decodetile = JPEGDecodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.d.raw_data_out = FALSE;
-		tif->tif_decoderow = JPEGDecode;
-		tif->tif_decodestrip = JPEGDecode;
-		tif->tif_decodetile = JPEGDecode;
-	}
-	/* Start JPEG decompressor */
-	if (!TIFFjpeg_start_decompress(sp))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_output) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.d.comp_info,
-					       sp->cinfo.d.num_components))
-			return (0);
-		sp->scancount = DCTSIZE;	/* mark buffer empty */
-	}
-	return (1);
-}
-
-/*
- * Decode a chunk of pixels.
- * "Standard" case: returned data is not downsampled.
- */
-/*ARGSUSED*/ static int
-JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-    JPEGState *sp = JState(tif);
-    tsize_t nrows;
-
-    nrows = cc / sp->bytesperline;
-    if (cc % sp->bytesperline)
-        TIFFWarning(tif->tif_name, "fractional scanline not read");
-
-    if( nrows > (int) sp->cinfo.d.image_height )
-        nrows = sp->cinfo.d.image_height;
-
-    /* data is expected to be read in multiples of a scanline */
-    if (nrows)
-    {
-        do {
-            JSAMPROW bufptr = (JSAMPROW)buf;
-
-            if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
-                return (0);
-            ++tif->tif_row;
-            buf += sp->bytesperline;
-            cc -= sp->bytesperline;
-        } while (--nrows > 0);
-    }
-    /* Close down the decompressor if we've finished the strip or tile. */
-    return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
-        || TIFFjpeg_finish_decompress(sp);
-}
-
-/*
- * Decode a chunk of pixels.
- * Returned data is downsampled per sampling factors.
- */
-/*ARGSUSED*/ static int
-JPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-
-	/* data is expected to be read in multiples of a scanline */
-	if ( (nrows = sp->cinfo.d.image_height) ) {
-		/* Cb,Cr both have sampling factors 1, so this is correct */
-		JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
-		int samples_per_clump = sp->samplesperclump;
-	
-		do {
-			jpeg_component_info *compptr;
-			int ci, clumpoffset;
-
-			/* Reload downsampled-data buffer if needed */
-			if (sp->scancount >= DCTSIZE) {
-				int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE;
-
-				if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n)
-					!= n)
-					return (0);
-				sp->scancount = 0;
-			}
-			/*
-			 * Fastest way to unseparate data is to make one pass
-			 * over the scanline for each row of each component.
-			 */
-			clumpoffset = 0;	/* first sample in clump */
-			for (ci = 0, compptr = sp->cinfo.d.comp_info;
-			     ci < sp->cinfo.d.num_components;
-			     ci++, compptr++) {
-			    int hsamp = compptr->h_samp_factor;
-			    int vsamp = compptr->v_samp_factor;
-			    int ypos;
-
-			    for (ypos = 0; ypos < vsamp; ypos++) {
-				JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-				JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
-				JDIMENSION nclump;
-
-				if (hsamp == 1) {
-				    /* fast path for at least Cb and Cr */
-				    for (nclump = clumps_per_line; nclump-- > 0; ) {
-					outptr[0] = *inptr++;
-					outptr += samples_per_clump;
-				    }
-				} else {
-					int xpos;
-
-				    /* general case */
-				    for (nclump = clumps_per_line; nclump-- > 0; ) {
-					for (xpos = 0; xpos < hsamp; xpos++)
-					    outptr[xpos] = *inptr++;
-					outptr += samples_per_clump;
-				    }
-				}
-				clumpoffset += hsamp;
-			    }
-			}
-			++sp->scancount;
-			++tif->tif_row;
-			buf += sp->bytesperline;
-			cc -= sp->bytesperline;
-		} while (--nrows > 0);
-	}
-
-        /* Close down the decompressor if done. */
-        return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
-       	    || TIFFjpeg_finish_decompress(sp);
-}
-
-
-/*
- * JPEG Encoding.
- */
-
-static void
-unsuppress_quant_table (JPEGState* sp, int tblno)
-{
-	JQUANT_TBL* qtbl;
-
-	if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL)
-		qtbl->sent_table = FALSE;
-}
-
-static void
-unsuppress_huff_table (JPEGState* sp, int tblno)
-{
-	JHUFF_TBL* htbl;
-
-	if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-	if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-}
-
-static int
-prepare_JPEGTables(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-
-        JPEGInitializeLibJPEG( tif );
-
-	/* Initialize quant tables for current quality setting */
-	if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-		return (0);
-	/* Mark only the tables we want for output */
-	/* NB: chrominance tables are currently used only with YCbCr */
-	if (!TIFFjpeg_suppress_tables(sp, TRUE))
-		return (0);
-	if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) {
-		unsuppress_quant_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) {
-		unsuppress_huff_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_huff_table(sp, 1);
-	}
-	/* Direct libjpeg output into jpegtables */
-	if (!TIFFjpeg_tables_dest(sp, tif))
-		return (0);
-	/* Emit tables-only datastream */
-	if (!TIFFjpeg_write_tables(sp))
-		return (0);
-
-	return (1);
-}
-
-static int
-JPEGSetupEncode(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGSetupEncode";
-
-        JPEGInitializeLibJPEG( tif );
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-
-	/*
-	 * Initialize all JPEG parameters to default values.
-	 * Note that jpeg_set_defaults needs legal values for
-	 * in_color_space and input_components.
-	 */
-	sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-	sp->cinfo.c.input_components = 1;
-	if (!TIFFjpeg_set_defaults(sp))
-		return (0);
-	/* Set per-file parameters */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		/*
-		 * A ReferenceBlackWhite field *must* be present since the
-		 * default value is inappropriate for YCbCr.  Fill in the
-		 * proper value if application didn't set it.
-		 */
-		if (!TIFFFieldSet(tif, FIELD_REFBLACKWHITE)) {
-			float refbw[6];
-			long top = 1L << td->td_bitspersample;
-			refbw[0] = 0;
-			refbw[1] = (float)(top-1L);
-			refbw[2] = (float)(top>>1);
-			refbw[3] = refbw[1];
-			refbw[4] = refbw[2];
-			refbw[5] = refbw[1];
-			TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refbw);
-		}
-		break;
-	case PHOTOMETRIC_PALETTE:		/* disallowed by Tech Note */
-	case PHOTOMETRIC_MASK:
-		TIFFError(module,
-			  "PhotometricInterpretation %d not allowed for JPEG",
-			  (int) sp->photometric);
-		return (0);
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-	
-	/* Verify miscellaneous parameters */
-
-	/*
-	 * This would need work if libtiff ever supports different
-	 * depths for different components, or if libjpeg ever supports
-	 * run-time selection of depth.  Neither is imminent.
-	 */
-	if (td->td_bitspersample != BITS_IN_JSAMPLE) {
-		TIFFError(module, "BitsPerSample %d not allowed for JPEG",
-			  (int) td->td_bitspersample);
-		return (0);
-	}
-	sp->cinfo.c.data_precision = td->td_bitspersample;
-	if (isTiled(tif)) {
-		if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile height must be multiple of %d",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-		if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile width must be multiple of %d",
-				  sp->h_sampling * DCTSIZE);
-			return (0);
-		}
-	} else {
-		if (td->td_rowsperstrip < td->td_imagelength &&
-		    (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "RowsPerStrip must be multiple of %d for JPEG",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-	}
-
-	/* Create a JPEGTables field if appropriate */
-	if (sp->jpegtablesmode & (JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF)) {
-		if (!prepare_JPEGTables(tif))
-			return (0);
-		/* Mark the field present */
-		/* Can't use TIFFSetField since BEENWRITING is already set! */
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		tif->tif_flags |= TIFF_DIRTYDIRECT;
-	} else {
-		/* We do not support application-supplied JPEGTables, */
-		/* so mark the field not present */
-		TIFFClrFieldBit(tif, FIELD_JPEGTABLES);
-	}
-
-	/* Direct libjpeg output to libtiff's output buffer */
-	TIFFjpeg_data_dest(sp, tif);
-
-	return (1);
-}
-
-/*
- * Set encoding state at the start of a strip or tile.
- */
-static int
-JPEGPreEncode(TIFF* tif, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGPreEncode";
-	uint32 segment_width, segment_height;
-	int downsampled_input;
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-	/*
-	 * Set encoding parameters for this strip/tile.
-	 */
-	if (isTiled(tif)) {
-		segment_width = td->td_tilewidth;
-		segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		segment_width = td->td_imagewidth;
-		segment_height = td->td_imagelength - tif->tif_row;
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/* for PC 2, scale down the strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (segment_width > 65535 || segment_height > 65535) {
-		TIFFError(module, "Strip/tile too large for JPEG");
-		return (0);
-	}
-	sp->cinfo.c.image_width = segment_width;
-	sp->cinfo.c.image_height = segment_height;
-	downsampled_input = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		sp->cinfo.c.input_components = td->td_samplesperpixel;
-		if (sp->photometric == PHOTOMETRIC_YCBCR) {
-			if (sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-				sp->cinfo.c.in_color_space = JCS_RGB;
-			} else {
-				sp->cinfo.c.in_color_space = JCS_YCbCr;
-				if (sp->h_sampling != 1 || sp->v_sampling != 1)
-					downsampled_input = TRUE;
-			}
-			if (!TIFFjpeg_set_colorspace(sp, JCS_YCbCr))
-				return (0);
-			/*
-			 * Set Y sampling factors;
-			 * we assume jpeg_set_colorspace() set the rest to 1
-			 */
-			sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
-			sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
-		} else {
-			sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-			if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-				return (0);
-			/* jpeg_set_colorspace set all sampling factors to 1 */
-		}
-	} else {
-		sp->cinfo.c.input_components = 1;
-		sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-		if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-			return (0);
-		sp->cinfo.c.comp_info[0].component_id = s;
-		/* jpeg_set_colorspace() set sampling factors to 1 */
-		if (sp->photometric == PHOTOMETRIC_YCBCR && s > 0) {
-			sp->cinfo.c.comp_info[0].quant_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].dc_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
-		}
-	}
-	/* ensure libjpeg won't write any extraneous markers */
-	sp->cinfo.c.write_JFIF_header = FALSE;
-	sp->cinfo.c.write_Adobe_marker = FALSE;
-	/* set up table handling correctly */
-	if (! (sp->jpegtablesmode & JPEGTABLESMODE_QUANT)) {
-		if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-			return (0);
-		unsuppress_quant_table(sp, 0);
-		unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF)
-		sp->cinfo.c.optimize_coding = FALSE;
-	else
-		sp->cinfo.c.optimize_coding = TRUE;
-	if (downsampled_input) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.c.raw_data_in = TRUE;
-		tif->tif_encoderow = JPEGEncodeRaw;
-		tif->tif_encodestrip = JPEGEncodeRaw;
-		tif->tif_encodetile = JPEGEncodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.c.raw_data_in = FALSE;
-		tif->tif_encoderow = JPEGEncode;
-		tif->tif_encodestrip = JPEGEncode;
-		tif->tif_encodetile = JPEGEncode;
-	}
-	/* Start JPEG compressor */
-	if (!TIFFjpeg_start_compress(sp, FALSE))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_input) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.c.comp_info,
-					       sp->cinfo.c.num_components))
-			return (0);
-	}
-	sp->scancount = 0;
-
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * "Standard" case: incoming data is not downsampled.
- */
-static int
-JPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-	JSAMPROW bufptr[1];
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-	if (cc % sp->bytesperline)
-		TIFFWarning(tif->tif_name, "fractional scanline discarded");
-
-	while (nrows-- > 0) {
-		bufptr[0] = (JSAMPROW) buf;
-		if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)
-			return (0);
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * Incoming data is expected to be downsampled per sampling factors.
- */
-static int
-JPEGEncodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	JSAMPLE* inptr;
-	JSAMPLE* outptr;
-	tsize_t nrows;
-	JDIMENSION clumps_per_line, nclump;
-	int clumpoffset, ci, xpos, ypos;
-	jpeg_component_info* compptr;
-	int samples_per_clump = sp->samplesperclump;
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-	if (cc % sp->bytesperline)
-		TIFFWarning(tif->tif_name, "fractional scanline discarded");
-
-	/* Cb,Cr both have sampling factors 1, so this is correct */
-	clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width;
-
-	while (nrows-- > 0) {
-		/*
-		 * Fastest way to separate the data is to make one pass
-		 * over the scanline for each row of each component.
-		 */
-		clumpoffset = 0;		/* first sample in clump */
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-		    int hsamp = compptr->h_samp_factor;
-		    int vsamp = compptr->v_samp_factor;
-		    int padding = (int) (compptr->width_in_blocks * DCTSIZE -
-					 clumps_per_line * hsamp);
-		    for (ypos = 0; ypos < vsamp; ypos++) {
-			inptr = ((JSAMPLE*) buf) + clumpoffset;
-			outptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-			if (hsamp == 1) {
-			    /* fast path for at least Cb and Cr */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				*outptr++ = inptr[0];
-				inptr += samples_per_clump;
-			    }
-			} else {
-			    /* general case */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				for (xpos = 0; xpos < hsamp; xpos++)
-				    *outptr++ = inptr[xpos];
-				inptr += samples_per_clump;
-			    }
-			}
-			/* pad each scanline as needed */
-			for (xpos = 0; xpos < padding; xpos++) {
-			    *outptr = outptr[-1];
-			    outptr++;
-			}
-			clumpoffset += hsamp;
-		    }
-		}
-		sp->scancount++;
-		if (sp->scancount >= DCTSIZE) {
-			int n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-			if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-				return (0);
-			sp->scancount = 0;
-		}
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Finish up at the end of a strip or tile.
- */
-static int
-JPEGPostEncode(TIFF* tif)
-{
-	JPEGState *sp = JState(tif);
-
-	if (sp->scancount > 0) {
-		/*
-		 * Need to emit a partial bufferload of downsampled data.
-		 * Pad the data vertically.
-		 */
-		int ci, ypos, n;
-		jpeg_component_info* compptr;
-
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-			int vsamp = compptr->v_samp_factor;
-			tsize_t row_width = compptr->width_in_blocks * DCTSIZE
-				* sizeof(JSAMPLE);
-			for (ypos = sp->scancount * vsamp;
-			     ypos < DCTSIZE * vsamp; ypos++) {
-				_TIFFmemcpy((tdata_t)sp->ds_buffer[ci][ypos],
-					    (tdata_t)sp->ds_buffer[ci][ypos-1],
-					    row_width);
-
-			}
-		}
-		n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-		if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-			return (0);
-	}
-
-	return (TIFFjpeg_finish_compress(JState(tif)));
-}
-
-static void
-JPEGCleanup(TIFF* tif)
-{
-	if (tif->tif_data) {
-		JPEGState *sp = JState(tif);
-                if( sp->cinfo_initialized )
-                    TIFFjpeg_destroy(sp);	/* release libjpeg resources */
-		if (sp->jpegtables)		/* tag value */
-			_TIFFfree(sp->jpegtables);
-		_TIFFfree(tif->tif_data);	/* release local state */
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-	uint32 v32;
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0) {
-			/* XXX */
-			return (0);
-		}
-		_TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*),
-		    (long) v32);
-		sp->jpegtables_length = v32;
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		sp->jpegquality = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGCOLORMODE:
-		sp->jpegcolormode = va_arg(ap, int);
-		/*
-		 * Mark whether returned data is up-sampled or not
-		 * so TIFFStripSize and TIFFTileSize return values
-		 * that reflect the true amount of data.
-		 */
-		tif->tif_flags &= ~TIFF_UPSAMPLED;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		    if (td->td_photometric == PHOTOMETRIC_YCBCR &&
-		      sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-			tif->tif_flags |= TIFF_UPSAMPLED;
-		    } else {
-			if (td->td_ycbcrsubsampling[0] != 1 ||
-			    td->td_ycbcrsubsampling[1] != 1)
-			    ; /* XXX what about up-sampling? */
-		    }
-		}
-		/*
-		 * Must recalculate cached tile size
-		 * in case sampling state changed.
-		 */
-		tif->tif_tilesize = TIFFTileSize(tif);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGTABLESMODE:
-		sp->jpegtablesmode = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_YCBCRSUBSAMPLING:
-                /* mark the fact that we have a real ycbcrsubsampling! */
-		sp->ycbcrsampling_fetched = 1;
-		return (*sp->vsetparent)(tif, tag, ap);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-/*
- * Some JPEG-in-TIFF produces do not emit the YCBCRSUBSAMPLING values in
- * the TIFF tags, but still use non-default (2,2) values within the jpeg
- * data stream itself.  In order for TIFF applications to work properly
- * - for instance to get the strip buffer size right - it is imperative
- * that the subsampling be available before we start reading the image
- * data normally.  This function will attempt to load the first strip in
- * order to get the sampling values from the jpeg data stream.  Various
- * hacks are various places are done to ensure this function gets called
- * before the td_ycbcrsubsampling values are used from the directory structure,
- * including calling TIFFGetField() for the YCBCRSUBSAMPLING field from 
- * TIFFStripSize(), and the printing code in tif_print.c. 
- *
- * Note that JPEGPreDeocode() will produce a fairly loud warning when the
- * discovered sampling does not match the default sampling (2,2) or whatever
- * was actually in the tiff tags. 
- *
- * Problems:
- *  o This code will cause one whole strip/tile of compressed data to be
- *    loaded just to get the tags right, even if the imagery is never read.
- *    It would be more efficient to just load a bit of the header, and
- *    initialize things from that. 
- *
- * See the bug in bugzilla for details:
- *
- * http://bugzilla.remotesensing.org/show_bug.cgi?id=168
- *
- * Frank Warmerdam, July 2002
- */
-
-static void 
-JPEGFixupTestSubsampling( TIFF * tif )
-{
-#if CHECK_JPEG_YCBCR_SUBSAMPLING == 1
-    JPEGState *sp = JState(tif);
-    TIFFDirectory *td = &tif->tif_dir;
-
-    JPEGInitializeLibJPEG( tif );
-
-    /*
-     * Some JPEG-in-TIFF files don't provide the ycbcrsampling tags, 
-     * and use a sampling schema other than the default 2,2.  To handle
-     * this we actually have to scan the header of a strip or tile of
-     * jpeg data to get the sampling.  
-     */
-    if( !sp->cinfo.comm.is_decompressor 
-        || sp->ycbcrsampling_fetched  
-        || td->td_photometric != PHOTOMETRIC_YCBCR )
-        return;
-
-    sp->ycbcrsampling_fetched = 1;
-    if( TIFFIsTiled( tif ) )
-    {
-        if( !TIFFFillTile( tif, 0 ) )
-            return;
-    }
-    else
-    {
-        if( !TIFFFillStrip( tif, 0 ) )
-            return;
-    }
-
-    TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                  (uint16) sp->h_sampling, (uint16) sp->v_sampling );
-#endif /* CHECK_JPEG_YCBCR_SUBSAMPLING == 1 */
-}
-
-static int
-JPEGVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	JPEGState* sp = JState(tif);
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		/* u_short is bogus --- should be uint32 ??? */
-		/* TIFFWriteNormalTag needs fixed  XXX */
-		*va_arg(ap, u_short*) = (u_short) sp->jpegtables_length;
-		*va_arg(ap, void**) = sp->jpegtables;
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		*va_arg(ap, int*) = sp->jpegquality;
-		break;
-	case TIFFTAG_JPEGCOLORMODE:
-		*va_arg(ap, int*) = sp->jpegcolormode;
-		break;
-	case TIFFTAG_JPEGTABLESMODE:
-		*va_arg(ap, int*) = sp->jpegtablesmode;
-		break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-                JPEGFixupTestSubsampling( tif );
-		return (*sp->vgetparent)(tif, tag, ap);
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-JPEGPrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	JPEGState* sp = JState(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_JPEGTABLES))
-		fprintf(fd, "  JPEG Tables: (%lu bytes)\n",
-			(u_long) sp->jpegtables_length);
-}
-
-static uint32
-JPEGDefaultStripSize(TIFF* tif, uint32 s)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	s = (*sp->defsparent)(tif, s);
-	if (s < td->td_imagelength)
-		s = TIFFroundup(s, td->td_ycbcrsubsampling[1] * DCTSIZE);
-	return (s);
-}
-
-static void
-JPEGDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	(*sp->deftparent)(tif, tw, th);
-	*tw = TIFFroundup(*tw, td->td_ycbcrsubsampling[0] * DCTSIZE);
-	*th = TIFFroundup(*th, td->td_ycbcrsubsampling[1] * DCTSIZE);
-}
-
-/*
- * The JPEG library initialized used to be done in TIFFInitJPEG(), but
- * now that we allow a TIFF file to be opened in update mode it is necessary
- * to have some way of deciding whether compression or decompression is
- * desired other than looking at tif->tif_mode.  We accomplish this by 
- * examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry.
- * If so, we assume decompression is desired. 
- *
- * This is tricky, because TIFFInitJPEG() is called while the directory is
- * being read, and generally speaking the BYTECOUNTS tag won't have been read
- * at that point.  So we try to defer jpeg library initialization till we
- * do have that tag ... basically any access that might require the compressor
- * or decompressor that occurs after the reading of the directory. 
- *
- * In an ideal world compressors or decompressors would be setup
- * at the point where a single tile or strip was accessed (for read or write)
- * so that stuff like update of missing tiles, or replacement of tiles could
- * be done. However, we aren't trying to crack that nut just yet ...
- *
- * NFW, Feb 3rd, 2003.
- */
-
-static int JPEGInitializeLibJPEG( TIFF * tif )
-{
-    JPEGState* sp = JState(tif);
-    uint32 *byte_counts = NULL;
-    int     data_is_empty = TRUE;
-
-    if( sp->cinfo_initialized )
-        return 1;
-
-    /*
-     * Do we have tile data already?  Make sure we initialize the
-     * the state in decompressor mode if we have tile data, even if we
-     * are not in read-only file access mode. 
-     */
-    if( TIFFIsTiled( tif ) 
-        && TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &byte_counts ) 
-        && byte_counts != NULL )
-    {
-        data_is_empty = byte_counts[0] == 0;
-    }
-    if( !TIFFIsTiled( tif ) 
-        && TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &byte_counts) 
-        && byte_counts != NULL )
-    {
-        data_is_empty = byte_counts[0] == 0;
-    }
-
-    /*
-     * Initialize libjpeg.
-     */
-    if (tif->tif_mode == O_RDONLY || !data_is_empty ) {
-        if (!TIFFjpeg_create_decompress(sp))
-            return (0);
-
-    } else {
-        if (!TIFFjpeg_create_compress(sp))
-            return (0);
-    }
-
-    sp->cinfo_initialized = TRUE;
-
-    return 1;
-}
-
-int
-TIFFInitJPEG(TIFF* tif, int scheme)
-{
-	JPEGState* sp;
-
-	assert(scheme == COMPRESSION_JPEG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (JPEGState));
-
-	if (tif->tif_data == NULL) {
-		TIFFError("TIFFInitJPEG", "No space for JPEG state block");
-		return (0);
-	}
-        memset( tif->tif_data, 0, sizeof(JPEGState));
-
-	sp = JState(tif);
-	sp->tif = tif;				/* back link */
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, jpegFieldInfo, N(jpegFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = JPEGVGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = JPEGVSetField;	/* hook for codec tags */
-	tif->tif_tagmethods.printdir = JPEGPrintDir;	/* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->jpegtables = NULL;
-	sp->jpegtables_length = 0;
-	sp->jpegquality = 75;			/* Default IJG quality */
-	sp->jpegcolormode = JPEGCOLORMODE_RAW;
-	sp->jpegtablesmode = JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF;
-
-        sp->ycbcrsampling_fetched = 0;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = JPEGSetupDecode;
-	tif->tif_predecode = JPEGPreDecode;
-	tif->tif_decoderow = JPEGDecode;
-	tif->tif_decodestrip = JPEGDecode;
-	tif->tif_decodetile = JPEGDecode;
-	tif->tif_setupencode = JPEGSetupEncode;
-	tif->tif_preencode = JPEGPreEncode;
-	tif->tif_postencode = JPEGPostEncode;
-	tif->tif_encoderow = JPEGEncode;
-	tif->tif_encodestrip = JPEGEncode;
-	tif->tif_encodetile = JPEGEncode;
-	tif->tif_cleanup = JPEGCleanup;
-	sp->defsparent = tif->tif_defstripsize;
-	tif->tif_defstripsize = JPEGDefaultStripSize;
-	sp->deftparent = tif->tif_deftilesize;
-	tif->tif_deftilesize = JPEGDefaultTileSize;
-	tif->tif_flags |= TIFF_NOBITREV;	/* no bit reversal, please */
-
-        sp->cinfo_initialized = FALSE;
-
-        /*
-         * Mark the TIFFTAG_YCBCRSAMPLES as present even if it is not
-         * see: JPEGFixupTestSubsampling().
-         */
-        TIFFSetFieldBit( tif, FIELD_YCBCRSUBSAMPLING );
-
-	return (1);
-}
-#endif /* JPEG_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_luv.c b/tkimg1.3/libtiff/libtiff/tif_luv.c
deleted file mode 100644
index b6011f3..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_luv.c
+++ /dev/null
@@ -1,1586 +0,0 @@
-/*
- * Copyright (c) 1997 Greg Ward Larson
- * Copyright (c) 1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler, Greg Larson and Silicon Graphics may not be used in any
- * advertising or publicity relating to the software without the specific,
- * prior written permission of Sam Leffler, Greg Larson and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE
- * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef LOGLUV_SUPPORT
-
-/*
- * TIFF Library.
- * LogLuv compression support for high dynamic range images.
- *
- * Contributed by Greg Larson.
- *
- * LogLuv image support uses the TIFF library to store 16 or 10-bit
- * log luminance values with 8 bits each of u and v or a 14-bit index.
- *
- * The codec can take as input and produce as output 32-bit IEEE float values 
- * as well as 16-bit integer values.  A 16-bit luminance is interpreted
- * as a sign bit followed by a 15-bit integer that is converted
- * to and from a linear magnitude using the transformation:
- *
- *	L = 2^( (Le+.5)/256 - 64 )		# real from 15-bit
- *
- *	Le = floor( 256*(log2(L) + 64) )	# 15-bit from real
- *
- * The actual conversion to world luminance units in candelas per sq. meter
- * requires an additional multiplier, which is stored in the TIFFTAG_STONITS.
- * This value is usually set such that a reasonable exposure comes from
- * clamping decoded luminances above 1 to 1 in the displayed image.
- *
- * The 16-bit values for u and v may be converted to real values by dividing
- * each by 32768.  (This allows for negative values, which aren't useful as
- * far as we know, but are left in case of future improvements in human
- * color vision.)
- *
- * Conversion from (u,v), which is actually the CIE (u',v') system for
- * you color scientists, is accomplished by the following transformation:
- *
- *	u = 4*x / (-2*x + 12*y + 3)
- *	v = 9*y / (-2*x + 12*y + 3)
- *
- *	x = 9*u / (6*u - 16*v + 12)
- *	y = 4*v / (6*u - 16*v + 12)
- *
- * This process is greatly simplified by passing 32-bit IEEE floats
- * for each of three CIE XYZ coordinates.  The codec then takes care
- * of conversion to and from LogLuv, though the application is still
- * responsible for interpreting the TIFFTAG_STONITS calibration factor.
- *
- * By definition, a CIE XYZ vector of [1 1 1] corresponds to a neutral white
- * point of (x,y)=(1/3,1/3).  However, most color systems assume some other
- * white point, such as D65, and an absolute color conversion to XYZ then
- * to another color space with a different white point may introduce an
- * unwanted color cast to the image.  It is often desirable, therefore, to
- * perform a white point conversion that maps the input white to [1 1 1]
- * in XYZ, then record the original white point using the TIFFTAG_WHITEPOINT
- * tag value.  A decoder that demands absolute color calibration may use
- * this white point tag to get back the original colors, but usually it
- * will be ignored and the new white point will be used instead that
- * matches the output color space.
- *
- * Pixel information is compressed into one of two basic encodings, depending
- * on the setting of the compression tag, which is one of COMPRESSION_SGILOG
- * or COMPRESSION_SGILOG24.  For COMPRESSION_SGILOG, greyscale data is
- * stored as:
- *
- *	 1       15
- *	|-+---------------|
- *
- * COMPRESSION_SGILOG color data is stored as:
- *
- *	 1       15           8        8
- *	|-+---------------|--------+--------|
- *	 S       Le           ue       ve
- *
- * For the 24-bit COMPRESSION_SGILOG24 color format, the data is stored as:
- *
- *	     10           14
- *	|----------|--------------|
- *	     Le'          Ce
- *
- * There is no sign bit in the 24-bit case, and the (u,v) chromaticity is
- * encoded as an index for optimal color resolution.  The 10 log bits are
- * defined by the following conversions:
- *
- *	L = 2^((Le'+.5)/64 - 12)		# real from 10-bit
- *
- *	Le' = floor( 64*(log2(L) + 12) )	# 10-bit from real
- *
- * The 10 bits of the smaller format may be converted into the 15 bits of
- * the larger format by multiplying by 4 and adding 13314.  Obviously,
- * a smaller range of magnitudes is covered (about 5 orders of magnitude
- * instead of 38), and the lack of a sign bit means that negative luminances
- * are not allowed.  (Well, they aren't allowed in the real world, either,
- * but they are useful for certain types of image processing.)
- *
- * The desired user format is controlled by the setting the internal
- * pseudo tag TIFFTAG_SGILOGDATAFMT to one of:
- *  SGILOGDATAFMT_FLOAT       = IEEE 32-bit float XYZ values
- *  SGILOGDATAFMT_16BIT	      = 16-bit integer encodings of logL, u and v
- * Raw data i/o is also possible using:
- *  SGILOGDATAFMT_RAW         = 32-bit unsigned integer with encoded pixel
- * In addition, the following decoding is provided for ease of display:
- *  SGILOGDATAFMT_8BIT        = 8-bit default RGB gamma-corrected values
- *
- * For grayscale images, we provide the following data formats:
- *  SGILOGDATAFMT_FLOAT       = IEEE 32-bit float Y values
- *  SGILOGDATAFMT_16BIT       = 16-bit integer w/ encoded luminance
- *  SGILOGDATAFMT_8BIT        = 8-bit gray monitor values
- *
- * Note that the COMPRESSION_SGILOG applies a simple run-length encoding
- * scheme by separating the logL, u and v bytes for each row and applying
- * a PackBits type of compression.  Since the 24-bit encoding is not
- * adaptive, the 32-bit color format takes less space in many cases.
- *
- * Further control is provided over the conversion from higher-resolution
- * formats to final encoded values through the pseudo tag
- * TIFFTAG_SGILOGENCODE:
- *  SGILOGENCODE_NODITHER     = do not dither encoded values
- *  SGILOGENCODE_RANDITHER    = apply random dithering during encoding
- *
- * The default value of this tag is SGILOGENCODE_NODITHER for
- * COMPRESSION_SGILOG to maximize run-length encoding and
- * SGILOGENCODE_RANDITHER for COMPRESSION_SGILOG24 to turn
- * quantization errors into noise.
- */
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <math.h>
-
-/*
- * State block for each open TIFF
- * file using LogLuv compression/decompression.
- */
-typedef	struct logLuvState LogLuvState;
-
-struct logLuvState {
-	int			user_datafmt;	/* user data format */
-	int			encode_meth;	/* encoding method */
-	int			pixel_size;	/* bytes per pixel */
-
-	tidata_t*		tbuf;		/* translation buffer */
-	int			tbuflen;	/* buffer length */
-	void (*tfunc)(LogLuvState*, tidata_t, int);
-
-	TIFFVSetMethod		vgetparent;	/* super-class method */
-	TIFFVSetMethod		vsetparent;	/* super-class method */
-};
-
-#define	DecoderState(tif)	((LogLuvState*) (tif)->tif_data)
-#define	EncoderState(tif)	((LogLuvState*) (tif)->tif_data)
-
-#define N(a)   (sizeof(a)/sizeof(a[0]))
-#define SGILOGDATAFMT_UNKNOWN	-1
-
-#define MINRUN		4	/* minimum run length */
-
-/*
- * Decode a string of 16-bit gray pixels.
- */
-static int
-LogL16Decode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int shft, i, npixels;
-	u_char* bp;
-	int16* tp;
-	int16 b;
-	int cc, rc;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
-		tp = (int16*) op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (int16*) sp->tbuf;
-	}
-	_TIFFmemset((tdata_t) tp, 0, npixels*sizeof (tp[0]));
-
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-					/* get each byte string */
-	for (shft = 2*8; (shft -= 8) >= 0; ) {
-		for (i = 0; i < npixels && cc > 0; )
-			if (*bp >= 128) {		/* run */
-				rc = *bp++ + (2-128);
-				b = (int16)(*bp++ << shft);
-				cc -= 2;
-				while (rc--)
-					tp[i++] |= b;
-			} else {			/* non-run */
-				rc = *bp++;		/* nul is noop */
-				while (--cc && rc--)
-					tp[i++] |= (int16)*bp++ << shft;
-			}
-		if (i != npixels) {
-			TIFFError(tif->tif_name,
-		"LogL16Decode: Not enough data at row %d (short %d pixels)",
-			    tif->tif_row, npixels - i);
-			tif->tif_rawcp = (tidata_t) bp;
-			tif->tif_rawcc = cc;
-			return (0);
-		}
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-}
-
-/*
- * Decode a string of 24-bit pixels.
- */
-static int
-LogLuvDecode24(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int cc, i, npixels;
-	u_char* bp;
-	uint32* tp;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32 *)op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (uint32 *) sp->tbuf;
-	}
-					/* copy to array of uint32 */
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	for (i = 0; i < npixels && cc > 0; i++) {
-		tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
-		bp += 3;
-		cc -= 3;
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (i != npixels) {
-		TIFFError(tif->tif_name,
-	    "LogLuvDecode24: Not enough data at row %d (short %d pixels)",
-		    tif->tif_row, npixels - i);
-		return (0);
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	return (1);
-}
-
-/*
- * Decode a string of 32-bit pixels.
- */
-static int
-LogLuvDecode32(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp;
-	int shft, i, npixels;
-	u_char* bp;
-	uint32* tp;
-	uint32 b;
-	int cc, rc;
-
-	assert(s == 0);
-	sp = DecoderState(tif);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (uint32*) sp->tbuf;
-	}
-	_TIFFmemset((tdata_t) tp, 0, npixels*sizeof (tp[0]));
-
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-					/* get each byte string */
-	for (shft = 4*8; (shft -= 8) >= 0; ) {
-		for (i = 0; i < npixels && cc > 0; )
-			if (*bp >= 128) {		/* run */
-				rc = *bp++ + (2-128);
-				b = (uint32)*bp++ << shft;
-				cc -= 2;
-				while (rc--)
-					tp[i++] |= b;
-			} else {			/* non-run */
-				rc = *bp++;		/* nul is noop */
-				while (--cc && rc--)
-					tp[i++] |= (uint32)*bp++ << shft;
-			}
-		if (i != npixels) {
-			TIFFError(tif->tif_name,
-		"LogLuvDecode32: Not enough data at row %d (short %d pixels)",
-			    tif->tif_row, npixels - i);
-			tif->tif_rawcp = (tidata_t) bp;
-			tif->tif_rawcc = cc;
-			return (0);
-		}
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-}
-
-/*
- * Decode a strip of pixels.  We break it into rows to
- * maintain synchrony with the encode algorithm, which
- * is row by row.
- */
-static int
-LogLuvDecodeStrip(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFScanlineSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Decode a tile of pixels.  We break it into rows to
- * maintain synchrony with the encode algorithm, which
- * is row by row.
- */
-static int
-LogLuvDecodeTile(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFTileRowSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode a row of 16-bit pixels.
- */
-static int
-LogL16Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int shft, i, j, npixels;
-	tidata_t op;
-	int16* tp;
-	int16 b;
-	int occ, rc=0, mask, beg;
-
-	assert(s == 0);
-	assert(sp != NULL);
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
-		tp = (int16*) bp;
-	else {
-		tp = (int16*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* compress each byte string */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (shft = 2*8; (shft -= 8) >= 0; )
-		for (i = 0; i < npixels; i += rc) {
-			if (occ < 4) {
-				tif->tif_rawcp = op;
-				tif->tif_rawcc = tif->tif_rawdatasize - occ;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				occ = tif->tif_rawdatasize - tif->tif_rawcc;
-			}
-			mask = 0xff << shft;		/* find next run */
-			for (beg = i; beg < npixels; beg += rc) {
-				b = (int16) (tp[beg] & mask);
-				rc = 1;
-				while (rc < 127+2 && beg+rc < npixels &&
-						(tp[beg+rc] & mask) == b)
-					rc++;
-				if (rc >= MINRUN)
-					break;		/* long enough */
-			}
-			if (beg-i > 1 && beg-i < MINRUN) {
-				b = (int16) (tp[i] & mask);/*check short run */
-				j = i+1;
-				while ((tp[j++] & mask) == b)
-                                    if (j == beg) {
-                                        *op++ = (tidataval_t)(128-2+j-i);
-                                        *op++ = (tidataval_t) (b >> shft);
-                                        occ -= 2;
-                                        i = beg;
-                                        break;
-                                    }
-			}
-			while (i < beg) {		/* write out non-run */
-				if ((j = beg-i) > 127) j = 127;
-				if (occ < j+3) {
-                                    tif->tif_rawcp = op;
-                                    tif->tif_rawcc = tif->tif_rawdatasize - occ;
-                                    if (!TIFFFlushData1(tif))
-                                        return (-1);
-                                    op = tif->tif_rawcp;
-                                    occ = tif->tif_rawdatasize - tif->tif_rawcc;
-				}
-				*op++ = (tidataval_t) j; occ--;
-				while (j--) {
-					*op++ = (tidataval_t) (tp[i++] >> shft & 0xff);
-					occ--;
-				}
-			}
-			if (rc >= MINRUN) {		/* write out run */
-				*op++ = (tidataval_t) (128-2+rc);
-				*op++ = (tidataval_t) (tp[beg] >> shft & 0xff);
-				occ -= 2;
-			} else
-				rc = 0;
-		}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a row of 24-bit pixels.
- */
-static int
-LogLuvEncode24(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int i, npixels, occ;
-	tidata_t op;
-	uint32* tp;
-
-	assert(s == 0);
-	assert(sp != NULL);
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) bp;
-	else {
-		tp = (uint32*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* write out encoded pixels */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (i = npixels; i--; ) {
-		if (occ < 3) {
-			tif->tif_rawcp = op;
-			tif->tif_rawcc = tif->tif_rawdatasize - occ;
-			if (!TIFFFlushData1(tif))
-				return (-1);
-			op = tif->tif_rawcp;
-			occ = tif->tif_rawdatasize - tif->tif_rawcc;
-		}
-		*op++ = (tidataval_t)(*tp >> 16);
-		*op++ = (tidataval_t)(*tp >> 8 & 0xff);
-		*op++ = (tidataval_t)(*tp++ & 0xff);
-		occ -= 3;
-	}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a row of 32-bit pixels.
- */
-static int
-LogLuvEncode32(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int shft, i, j, npixels;
-	tidata_t op;
-	uint32* tp;
-	uint32 b;
-	int occ, rc=0, mask, beg;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) bp;
-	else {
-		tp = (uint32*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* compress each byte string */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (shft = 4*8; (shft -= 8) >= 0; )
-		for (i = 0; i < npixels; i += rc) {
-			if (occ < 4) {
-				tif->tif_rawcp = op;
-				tif->tif_rawcc = tif->tif_rawdatasize - occ;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				occ = tif->tif_rawdatasize - tif->tif_rawcc;
-			}
-			mask = 0xff << shft;		/* find next run */
-			for (beg = i; beg < npixels; beg += rc) {
-				b = tp[beg] & mask;
-				rc = 1;
-				while (rc < 127+2 && beg+rc < npixels &&
-						(tp[beg+rc] & mask) == b)
-					rc++;
-				if (rc >= MINRUN)
-					break;		/* long enough */
-			}
-			if (beg-i > 1 && beg-i < MINRUN) {
-				b = tp[i] & mask;	/* check short run */
-				j = i+1;
-				while ((tp[j++] & mask) == b)
-					if (j == beg) {
-						*op++ = (tidataval_t)(128-2+j-i);
-						*op++ = (tidataval_t)(b >> shft);
-						occ -= 2;
-						i = beg;
-						break;
-					}
-			}
-			while (i < beg) {		/* write out non-run */
-				if ((j = beg-i) > 127) j = 127;
-				if (occ < j+3) {
-					tif->tif_rawcp = op;
-					tif->tif_rawcc = tif->tif_rawdatasize - occ;
-					if (!TIFFFlushData1(tif))
-						return (-1);
-					op = tif->tif_rawcp;
-					occ = tif->tif_rawdatasize - tif->tif_rawcc;
-				}
-				*op++ = (tidataval_t) j; occ--;
-				while (j--) {
-					*op++ = (tidataval_t)(tp[i++] >> shft & 0xff);
-					occ--;
-				}
-			}
-			if (rc >= MINRUN) {		/* write out run */
-				*op++ = (tidataval_t) (128-2+rc);
-				*op++ = (tidataval_t)(tp[beg] >> shft & 0xff);
-				occ -= 2;
-			} else
-				rc = 0;
-		}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a strip of pixels.  We break it into rows to
- * avoid encoding runs across row boundaries.
- */
-static int
-LogLuvEncodeStrip(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFScanlineSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode a tile of pixels.  We break it into rows to
- * avoid encoding runs across row boundaries.
- */
-static int
-LogLuvEncodeTile(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFTileRowSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode/Decode functions for converting to and from user formats.
- */
-
-#include "uvcode.h"
-
-#ifndef UVSCALE
-#define U_NEU		0.210526316
-#define V_NEU		0.473684211
-#define UVSCALE		410.
-#endif
-
-#ifndef	M_LN2
-#define M_LN2		0.69314718055994530942
-#endif
-#ifndef M_PI
-#define M_PI		3.14159265358979323846
-#endif
-#define log2(x)		((1./M_LN2)*log(x))
-#define exp2(x)		exp(M_LN2*(x))
-
-#define itrunc(x,m)	((m)==SGILOGENCODE_NODITHER ? \
-				(int)(x) : \
-				(int)((x) + rand()*(1./RAND_MAX) - .5))
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-double
-LogL16toY(int p16)		/* compute luminance from 16-bit LogL */
-{
-	int	Le = p16 & 0x7fff;
-	double	Y;
-
-	if (!Le)
-		return (0.);
-	Y = exp(M_LN2/256.*(Le+.5) - M_LN2*64.);
-	return (!(p16 & 0x8000) ? Y : -Y);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-LogL16fromY(double Y, int em)	/* get 16-bit LogL from Y */
-{
-	if (Y >= 1.8371976e19)
-		return (0x7fff);
-	if (Y <= -1.8371976e19)
-		return (0xffff);
-	if (Y > 5.4136769e-20)
-		return itrunc(256.*(log2(Y) + 64.), em);
-	if (Y < -5.4136769e-20)
-		return (~0x7fff | itrunc(256.*(log2(-Y) + 64.), em));
-	return (0);
-}
-
-static void
-L16toY(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	float* yp = (float*) op;
-
-	while (n-- > 0)
-		*yp++ = (float)LogL16toY(*l16++);
-}
-
-static void
-L16toGry(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	uint8* gp = (uint8*) op;
-
-	while (n-- > 0) {
-		double Y = LogL16toY(*l16++);
-		*gp++ = (uint8) ((Y <= 0.) ? 0 : (Y >= 1.) ? 255 : (int)(256.*sqrt(Y)));
-	}
-}
-
-static void
-L16fromY(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	float* yp = (float*) op;
-
-	while (n-- > 0)
-		*l16++ = (int16) (LogL16fromY(*yp++, sp->encode_meth));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-XYZtoRGB24(float xyz[3], uint8 rgb[3])
-{
-	double	r, g, b;
-					/* assume CCIR-709 primaries */
-	r =  2.690*xyz[0] + -1.276*xyz[1] + -0.414*xyz[2];
-	g = -1.022*xyz[0] +  1.978*xyz[1] +  0.044*xyz[2];
-	b =  0.061*xyz[0] + -0.224*xyz[1] +  1.163*xyz[2];
-					/* assume 2.0 gamma for speed */
-	/* could use integer sqrt approx., but this is probably faster */
-	rgb[0] = (uint8)((r<=0.) ? 0 : (r >= 1.) ? 255 : (int)(256.*sqrt(r)));
-	rgb[1] = (uint8)((g<=0.) ? 0 : (g >= 1.) ? 255 : (int)(256.*sqrt(g)));
-	rgb[2] = (uint8)((b<=0.) ? 0 : (b >= 1.) ? 255 : (int)(256.*sqrt(b)));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-double
-LogL10toY(int p10)		/* compute luminance from 10-bit LogL */
-{
-	if (p10 == 0)
-		return (0.);
-	return (exp(M_LN2/64.*(p10+.5) - M_LN2*12.));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-LogL10fromY(double Y, int em)	/* get 10-bit LogL from Y */
-{
-	if (Y >= 15.742)
-		return (0x3ff);
-	else if (Y <= .00024283)
-		return (0);
-	else
-		return itrunc(64.*(log2(Y) + 12.), em);
-}
-
-#define NANGLES		100
-#define uv2ang(u, v)	( (NANGLES*.499999999/M_PI) \
-				* atan2((v)-V_NEU,(u)-U_NEU) + .5*NANGLES )
-
-static int
-oog_encode(double u, double v)		/* encode out-of-gamut chroma */
-{
-	static int	oog_table[NANGLES];
-	static int	initialized = 0;
-	register int	i;
-	
-	if (!initialized) {		/* set up perimeter table */
-		double	eps[NANGLES], ua, va, ang, epsa;
-		int	ui, vi, ustep;
-		for (i = NANGLES; i--; )
-			eps[i] = 2.;
-		for (vi = UV_NVS; vi--; ) {
-			va = UV_VSTART + (vi+.5)*UV_SQSIZ;
-			ustep = uv_row[vi].nus-1;
-			if (vi == UV_NVS-1 || vi == 0 || ustep <= 0)
-				ustep = 1;
-			for (ui = uv_row[vi].nus-1; ui >= 0; ui -= ustep) {
-				ua = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ;
-				ang = uv2ang(ua, va);
-                                i = (int) ang;
-				epsa = fabs(ang - (i+.5));
-				if (epsa < eps[i]) {
-					oog_table[i] = uv_row[vi].ncum + ui;
-					eps[i] = epsa;
-				}
-			}
-		}
-		for (i = NANGLES; i--; )	/* fill any holes */
-			if (eps[i] > 1.5) {
-				int	i1, i2;
-				for (i1 = 1; i1 < NANGLES/2; i1++)
-					if (eps[(i+i1)%NANGLES] < 1.5)
-						break;
-				for (i2 = 1; i2 < NANGLES/2; i2++)
-					if (eps[(i+NANGLES-i2)%NANGLES] < 1.5)
-						break;
-				if (i1 < i2)
-					oog_table[i] =
-						oog_table[(i+i1)%NANGLES];
-				else
-					oog_table[i] =
-						oog_table[(i+NANGLES-i2)%NANGLES];
-			}
-		initialized = 1;
-	}
-	i = (int) uv2ang(u, v);		/* look up hue angle */
-	return (oog_table[i]);
-}
-
-#undef uv2ang
-#undef NANGLES
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-uv_encode(double u, double v, int em)	/* encode (u',v') coordinates */
-{
-	register int	vi, ui;
-
-	if (v < UV_VSTART)
-		return oog_encode(u, v);
-	vi = itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em);
-	if (vi >= UV_NVS)
-		return oog_encode(u, v);
-	if (u < uv_row[vi].ustart)
-		return oog_encode(u, v);
-	ui = itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em);
-	if (ui >= uv_row[vi].nus)
-		return oog_encode(u, v);
-
-	return (uv_row[vi].ncum + ui);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-uv_decode(double *up, double *vp, int c)	/* decode (u',v') index */
-{
-	int	upper, lower;
-	register int	ui, vi;
-
-	if (c < 0 || c >= UV_NDIVS)
-		return (-1);
-	lower = 0;				/* binary search */
-	upper = UV_NVS;
-	while (upper - lower > 1) {
-		vi = (lower + upper) >> 1;
-		ui = c - uv_row[vi].ncum;
-		if (ui > 0)
-			lower = vi;
-		else if (ui < 0)
-			upper = vi;
-		else {
-			lower = vi;
-			break;
-		}
-	}
-	vi = lower;
-	ui = c - uv_row[vi].ncum;
-	*up = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ;
-	*vp = UV_VSTART + (vi+.5)*UV_SQSIZ;
-	return (0);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-LogLuv24toXYZ(uint32 p, float XYZ[3])
-{
-	int	Ce;
-	double	L, u, v, s, x, y;
-					/* decode luminance */
-	L = LogL10toY(p>>14 & 0x3ff);
-	if (L <= 0.) {
-		XYZ[0] = XYZ[1] = XYZ[2] = 0.;
-		return;
-	}
-					/* decode color */
-	Ce = p & 0x3fff;
-	if (uv_decode(&u, &v, Ce) < 0) {
-		u = U_NEU; v = V_NEU;
-	}
-	s = 1./(6.*u - 16.*v + 12.);
-	x = 9.*u * s;
-	y = 4.*v * s;
-					/* convert to XYZ */
-	XYZ[0] = (float)(x/y * L);
-	XYZ[1] = (float)L;
-	XYZ[2] = (float)((1.-x-y)/y * L);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-uint32
-LogLuv24fromXYZ(float XYZ[3], int em)
-{
-	int	Le, Ce;
-	double	u, v, s;
-					/* encode luminance */
-	Le = LogL10fromY(XYZ[1], em);
-					/* encode color */
-	s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2];
-	if (!Le || s <= 0.) {
-		u = U_NEU;
-		v = V_NEU;
-	} else {
-		u = 4.*XYZ[0] / s;
-		v = 9.*XYZ[1] / s;
-	}
-	Ce = uv_encode(u, v, em);
-	if (Ce < 0)			/* never happens */
-		Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER);
-					/* combine encodings */
-	return (Le << 14 | Ce);
-}
-
-static void
-Luv24toXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		LogLuv24toXYZ(*luv, xyz);
-		xyz += 3;
-		luv++;
-	}
-}
-
-static void
-Luv24toLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		double u, v;
-
-		*luv3++ = (int16)((*luv >> 12 & 0xffd) + 13314);
-		if (uv_decode(&u, &v, *luv&0x3fff) < 0) {
-			u = U_NEU;
-			v = V_NEU;
-		}
-		*luv3++ = (int16)(u * (1L<<15));
-		*luv3++ = (int16)(v * (1L<<15));
-		luv++;
-	}
-}
-
-static void
-Luv24toRGB(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	uint8* rgb = (uint8*) op;
-
-	while (n-- > 0) {
-		float xyz[3];
-
-		LogLuv24toXYZ(*luv++, xyz);
-		XYZtoRGB24(xyz, rgb);
-		rgb += 3;
-	}
-}
-
-static void
-Luv24fromXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		*luv++ = LogLuv24fromXYZ(xyz, sp->encode_meth);
-		xyz += 3;
-	}
-}
-
-static void
-Luv24fromLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		int Le, Ce;
-
-		if (luv3[0] <= 0)
-			Le = 0;
-		else if (luv3[0] >= (1<<12)+3314)
-			Le = (1<<10) - 1;
-		else if (sp->encode_meth == SGILOGENCODE_NODITHER)
-			Le = (luv3[0]-3314) >> 2;
-		else
-			Le = itrunc(.25*(luv3[0]-3314.), sp->encode_meth);
-
-		Ce = uv_encode((luv3[1]+.5)/(1<<15), (luv3[2]+.5)/(1<<15),
-					sp->encode_meth);
-		if (Ce < 0)	/* never happens */
-			Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER);
-		*luv++ = (uint32)Le << 14 | Ce;
-		luv3 += 3;
-	}
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-LogLuv32toXYZ(uint32 p, float XYZ[3])
-{
-	double	L, u, v, s, x, y;
-					/* decode luminance */
-	L = LogL16toY((int)p >> 16);
-	if (L <= 0.) {
-		XYZ[0] = XYZ[1] = XYZ[2] = 0.;
-		return;
-	}
-					/* decode color */
-	u = 1./UVSCALE * ((p>>8 & 0xff) + .5);
-	v = 1./UVSCALE * ((p & 0xff) + .5);
-	s = 1./(6.*u - 16.*v + 12.);
-	x = 9.*u * s;
-	y = 4.*v * s;
-					/* convert to XYZ */
-	XYZ[0] = (float)(x/y * L);
-	XYZ[1] = (float)L;
-	XYZ[2] = (float)((1.-x-y)/y * L);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-uint32
-LogLuv32fromXYZ(float XYZ[3], int em)
-{
-	unsigned int	Le, ue, ve;
-	double	u, v, s;
-					/* encode luminance */
-	Le = (unsigned int)LogL16fromY(XYZ[1], em);
-					/* encode color */
-	s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2];
-	if (!Le || s <= 0.) {
-		u = U_NEU;
-		v = V_NEU;
-	} else {
-		u = 4.*XYZ[0] / s;
-		v = 9.*XYZ[1] / s;
-	}
-	if (u <= 0.) ue = 0;
-	else ue = itrunc(UVSCALE*u, em);
-	if (ue > 255) ue = 255;
-	if (v <= 0.) ve = 0;
-	else ve = itrunc(UVSCALE*v, em);
-	if (ve > 255) ve = 255;
-					/* combine encodings */
-	return (Le << 16 | ue << 8 | ve);
-}
-
-static void
-Luv32toXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		LogLuv32toXYZ(*luv++, xyz);
-		xyz += 3;
-	}
-}
-
-static void
-Luv32toLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		double u, v;
-
-		*luv3++ = (int16)(*luv >> 16);
-		u = 1./UVSCALE * ((*luv>>8 & 0xff) + .5);
-		v = 1./UVSCALE * ((*luv & 0xff) + .5);
-		*luv3++ = (int16)(u * (1L<<15));
-		*luv3++ = (int16)(v * (1L<<15));
-		luv++;
-	}
-}
-
-static void
-Luv32toRGB(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	uint8* rgb = (uint8*) op;
-
-	while (n-- > 0) {
-		float xyz[3];
-
-		LogLuv32toXYZ(*luv++, xyz);
-		XYZtoRGB24(xyz, rgb);
-		rgb += 3;
-	}
-}
-
-static void
-Luv32fromXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		*luv++ = LogLuv32fromXYZ(xyz, sp->encode_meth);
-		xyz += 3;
-	}
-}
-
-static void
-Luv32fromLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	if (sp->encode_meth == SGILOGENCODE_NODITHER) {
-		while (n-- > 0) {
-			*luv++ = (uint32)luv3[0] << 16 |
-				(luv3[1]*(uint32)(UVSCALE+.5) >> 7 & 0xff00) |
-				(luv3[2]*(uint32)(UVSCALE+.5) >> 15 & 0xff);
-			luv3 += 3;
-		}
-		return;
-	}
-	while (n-- > 0) {
-		*luv++ = (uint32)luv3[0] << 16 |
-	(itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) |
-		(itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff);
-		luv3 += 3;
-	}
-}
-
-static void
-_logLuvNop(LogLuvState* sp, tidata_t op, int n)
-{
-	(void) sp; (void) op; (void) n;
-}
-
-static int
-LogL16GuessDataFmt(TIFFDirectory *td)
-{
-#define	PACK(s,b,f)	(((b)<<6)|((s)<<3)|(f))
-	switch (PACK(td->td_samplesperpixel, td->td_bitspersample, td->td_sampleformat)) {
-	case PACK(1, 32, SAMPLEFORMAT_IEEEFP):
-		return (SGILOGDATAFMT_FLOAT);
-	case PACK(1, 16, SAMPLEFORMAT_VOID):
-	case PACK(1, 16, SAMPLEFORMAT_INT):
-	case PACK(1, 16, SAMPLEFORMAT_UINT):
-		return (SGILOGDATAFMT_16BIT);
-	case PACK(1,  8, SAMPLEFORMAT_VOID):
-	case PACK(1,  8, SAMPLEFORMAT_UINT):
-		return (SGILOGDATAFMT_8BIT);
-	}
-#undef PACK
-	return (SGILOGDATAFMT_UNKNOWN);
-}
-
-static int
-LogL16InitState(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	LogLuvState* sp = DecoderState(tif);
-	static const char module[] = "LogL16InitState";
-
-	assert(sp != NULL);
-	assert(td->td_photometric == PHOTOMETRIC_LOGL);
-
-	/* for some reason, we can't do this in TIFFInitLogL16 */
-	if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = LogL16GuessDataFmt(td);
-	switch (sp->user_datafmt) {
-	case SGILOGDATAFMT_FLOAT:
-		sp->pixel_size = sizeof (float);
-		break;
-	case SGILOGDATAFMT_16BIT:
-		sp->pixel_size = sizeof (int16);
-		break;
-	case SGILOGDATAFMT_8BIT:
-		sp->pixel_size = sizeof (uint8);
-		break;
-	default:
-		TIFFError(tif->tif_name,
-		    "No support for converting user data format to LogL");
-		return (0);
-	}
-	sp->tbuflen = td->td_imagewidth * td->td_rowsperstrip;
-	sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (int16));
-	if (sp->tbuf == NULL) {
-		TIFFError(module, "%s: No space for SGILog translation buffer",
-		    tif->tif_name);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-LogLuvGuessDataFmt(TIFFDirectory *td)
-{
-	int guess;
-
-	/*
-	 * If the user didn't tell us their datafmt,
-	 * take our best guess from the bitspersample.
-	 */
-#define	PACK(a,b)	(((a)<<3)|(b))
-	switch (PACK(td->td_bitspersample, td->td_sampleformat)) {
-	case PACK(32, SAMPLEFORMAT_IEEEFP):
-		guess = SGILOGDATAFMT_FLOAT;
-		break;
-	case PACK(32, SAMPLEFORMAT_VOID):
-	case PACK(32, SAMPLEFORMAT_UINT):
-	case PACK(32, SAMPLEFORMAT_INT):
-		guess = SGILOGDATAFMT_RAW;
-		break;
-	case PACK(16, SAMPLEFORMAT_VOID):
-	case PACK(16, SAMPLEFORMAT_INT):
-	case PACK(16, SAMPLEFORMAT_UINT):
-		guess = SGILOGDATAFMT_16BIT;
-		break;
-	case PACK( 8, SAMPLEFORMAT_VOID):
-	case PACK( 8, SAMPLEFORMAT_UINT):
-		guess = SGILOGDATAFMT_8BIT;
-		break;
-	default:
-		guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-#undef PACK
-	}
-	/*
-	 * Double-check samples per pixel.
-	 */
-	switch (td->td_samplesperpixel) {
-	case 1:
-		if (guess != SGILOGDATAFMT_RAW)
-			guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	case 3:
-		if (guess == SGILOGDATAFMT_RAW)
-			guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	default:
-		guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	}
-	return (guess);
-}
-
-static int
-LogLuvInitState(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	LogLuvState* sp = DecoderState(tif);
-	static const char module[] = "LogLuvInitState";
-
-	assert(sp != NULL);
-	assert(td->td_photometric == PHOTOMETRIC_LOGLUV);
-
-	/* for some reason, we can't do this in TIFFInitLogLuv */
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-		TIFFError(module,
-		    "SGILog compression cannot handle non-contiguous data");
-		return (0);
-	}
-	if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = LogLuvGuessDataFmt(td);
-	switch (sp->user_datafmt) {
-	case SGILOGDATAFMT_FLOAT:
-		sp->pixel_size = 3*sizeof (float);
-		break;
-	case SGILOGDATAFMT_16BIT:
-		sp->pixel_size = 3*sizeof (int16);
-		break;
-	case SGILOGDATAFMT_RAW:
-		sp->pixel_size = sizeof (uint32);
-		break;
-	case SGILOGDATAFMT_8BIT:
-		sp->pixel_size = 3*sizeof (uint8);
-		break;
-	default:
-		TIFFError(tif->tif_name,
-		    "No support for converting user data format to LogLuv");
-		return (0);
-	}
-	sp->tbuflen = td->td_imagewidth * td->td_rowsperstrip;
-	sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (uint32));
-	if (sp->tbuf == NULL) {
-		TIFFError(module, "%s: No space for SGILog translation buffer",
-		    tif->tif_name);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-LogLuvSetupDecode(TIFF* tif)
-{
-	LogLuvState* sp = DecoderState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	tif->tif_postdecode = _TIFFNoPostDecode;
-	switch (td->td_photometric) {
-	case PHOTOMETRIC_LOGLUV:
-		if (!LogLuvInitState(tif))
-			break;
-		if (td->td_compression == COMPRESSION_SGILOG24) {
-			tif->tif_decoderow = LogLuvDecode24;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv24toXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv24toLuv48;
-				break;
-			case SGILOGDATAFMT_8BIT:
-				sp->tfunc = Luv24toRGB;
-				break;
-			}
-		} else {
-			tif->tif_decoderow = LogLuvDecode32;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv32toXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv32toLuv48;
-				break;
-			case SGILOGDATAFMT_8BIT:
-				sp->tfunc = Luv32toRGB;
-				break;
-			}
-		}
-		return (1);
-	case PHOTOMETRIC_LOGL:
-		if (!LogL16InitState(tif))
-			break;
-		tif->tif_decoderow = LogL16Decode;
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			sp->tfunc = L16toY;
-			break;
-		case SGILOGDATAFMT_8BIT:
-			sp->tfunc = L16toGry;
-			break;
-		}
-		return (1);
-	default:
-		TIFFError(tif->tif_name,
-    "Inappropriate photometric interpretation %d for SGILog compression; %s",
-		    td->td_photometric, "must be either LogLUV or LogL");
-		break;
-	}
-	return (0);
-}
-
-static int
-LogLuvSetupEncode(TIFF* tif)
-{
-	LogLuvState* sp = EncoderState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	switch (td->td_photometric) {
-	case PHOTOMETRIC_LOGLUV:
-		if (!LogLuvInitState(tif))
-			break;
-		if (td->td_compression == COMPRESSION_SGILOG24) {
-			tif->tif_encoderow = LogLuvEncode24;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv24fromXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv24fromLuv48;
-				break;
-			case SGILOGDATAFMT_RAW:
-				break;
-			default:
-				goto notsupported;
-			}
-		} else {
-			tif->tif_encoderow = LogLuvEncode32;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv32fromXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv32fromLuv48;
-				break;
-			case SGILOGDATAFMT_RAW:
-				break;
-			default:
-				goto notsupported;
-			}
-		}
-		break;
-	case PHOTOMETRIC_LOGL:
-		if (!LogL16InitState(tif))
-			break;
-		tif->tif_encoderow = LogL16Encode;
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			sp->tfunc = L16fromY;
-			break;
-		case SGILOGDATAFMT_16BIT:
-			break;
-		default:
-			goto notsupported;
-		}
-		break;
-	default:
-		TIFFError(tif->tif_name,
-    "Inappropriate photometric interpretation %d for SGILog compression; %s",
-    		    td->td_photometric, "must be either LogLUV or LogL");
-		break;
-	}
-	return (1);
-notsupported:
-	TIFFError(tif->tif_name,
-	    "SGILog compression supported only for %s, or raw data",
-	    td->td_photometric == PHOTOMETRIC_LOGL ? "Y, L" : "XYZ, Luv");
-	return (0);
-}
-
-static void
-LogLuvClose(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	/*
-	 * For consistency, we always want to write out the same
-	 * bitspersample and sampleformat for our TIFF file,
-	 * regardless of the data format being used by the application.
-	 * Since this routine is called after tags have been set but
-	 * before they have been recorded in the file, we reset them here.
-	 */
-	td->td_samplesperpixel =
-	    (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3;
-	td->td_bitspersample = 16;
-	td->td_sampleformat = SAMPLEFORMAT_INT;
-}
-
-static void
-LogLuvCleanup(TIFF* tif)
-{
-	LogLuvState* sp = (LogLuvState *)tif->tif_data;
-
-	if (sp) {
-		if (sp->tbuf)
-			_TIFFfree(sp->tbuf);
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-LogLuvVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int bps, fmt;
-
-	switch (tag) {
-	case TIFFTAG_SGILOGDATAFMT:
-		sp->user_datafmt = va_arg(ap, int);
-		/*
-		 * Tweak the TIFF header so that the rest of libtiff knows what
-		 * size of data will be passed between app and library, and
-		 * assume that the app knows what it is doing and is not
-		 * confused by these header manipulations...
-		 */
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			bps = 32, fmt = SAMPLEFORMAT_IEEEFP;
-			break;
-		case SGILOGDATAFMT_16BIT:
-			bps = 16, fmt = SAMPLEFORMAT_INT;
-			break;
-		case SGILOGDATAFMT_RAW:
-			bps = 32, fmt = SAMPLEFORMAT_UINT;
-			TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-			break;
-		case SGILOGDATAFMT_8BIT:
-			bps = 8, fmt = SAMPLEFORMAT_UINT;
-			break;
-		default:
-			TIFFError(tif->tif_name,
-			    "Unknown data format %d for LogLuv compression",
-			    sp->user_datafmt);
-			return (0);
-		}
-		TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps);
-		TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, fmt);
-		/*
-		 * Must recalculate sizes should bits/sample change.
-		 */
-		tif->tif_tilesize = TIFFTileSize(tif);
-		tif->tif_scanlinesize = TIFFScanlineSize(tif);
-		return (1);
-	case TIFFTAG_SGILOGENCODE:
-		sp->encode_meth = va_arg(ap, int);
-		if (sp->encode_meth != SGILOGENCODE_NODITHER &&
-				sp->encode_meth != SGILOGENCODE_RANDITHER) {
-			TIFFError(tif->tif_name,
-				"Unknown encoding %d for LogLuv compression",
-				sp->encode_meth);
-			return (0);
-		}
-		return (1);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-}
-
-static int
-LogLuvVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	LogLuvState *sp = (LogLuvState *)tif->tif_data;
-
-	switch (tag) {
-	case TIFFTAG_SGILOGDATAFMT:
-		*va_arg(ap, int*) = sp->user_datafmt;
-		return (1);
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-}
-
-static const TIFFFieldInfo LogLuvFieldInfo[] = {
-    { TIFFTAG_SGILOGDATAFMT,	  0, 0,	TIFF_SHORT,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"SGILogDataFmt"},
-    { TIFFTAG_SGILOGENCODE,	  0, 0, TIFF_SHORT,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"SGILogEncode"}
-};
-
-int
-TIFFInitSGILog(TIFF* tif, int scheme)
-{
-	static const char module[] = "TIFFInitSGILog";
-	LogLuvState* sp;
-
-	assert(scheme == COMPRESSION_SGILOG24 || scheme == COMPRESSION_SGILOG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LogLuvState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = (LogLuvState*) tif->tif_data;
-	_TIFFmemset((tdata_t)sp, 0, sizeof (*sp));
-	sp->user_datafmt = SGILOGDATAFMT_UNKNOWN;
-	sp->encode_meth = (scheme == COMPRESSION_SGILOG24) ?
-				SGILOGENCODE_RANDITHER : SGILOGENCODE_NODITHER;
-	sp->tfunc = _logLuvNop;
-
-	/*
-	 * Install codec methods.
-	 * NB: tif_decoderow & tif_encoderow are filled
-	 *     in at setup time.
-	 */
-	tif->tif_setupdecode = LogLuvSetupDecode;
-	tif->tif_decodestrip = LogLuvDecodeStrip;
-	tif->tif_decodetile = LogLuvDecodeTile;
-	tif->tif_setupencode = LogLuvSetupEncode;
-	tif->tif_encodestrip = LogLuvEncodeStrip;
-	tif->tif_encodetile = LogLuvEncodeTile;
-	tif->tif_close = LogLuvClose;
-	tif->tif_cleanup = LogLuvCleanup;
-
-	/* override SetField so we can handle our private pseudo-tag */
-	_TIFFMergeFieldInfo(tif, LogLuvFieldInfo, N(LogLuvFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = LogLuvVGetField;   /* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = LogLuvVSetField;   /* hook for codec tags */
-
-	return (1);
-bad:
-	TIFFError(module, "%s: No space for LogLuv state block", tif->tif_name);
-	return (0);
-}
-#endif /* LOGLUV_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_lzw.c b/tkimg1.3/libtiff/libtiff/tif_lzw.c
deleted file mode 100644
index a8ea15d..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_lzw.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_lzw.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef LZW_SUPPORT
-/*
- * TIFF Library.
- * Rev 5.0 Lempel-Ziv & Welch Compression Support
- *
- * This code is derived from the compress program whose code is
- * derived from software contributed to Berkeley by James A. Woods,
- * derived from original work by Spencer Thomas and Joseph Orost.
- *
- * The original Berkeley copyright notice appears below in its entirety.
- */
-#include "tif_predict.h"
-
-#include <assert.h>
-#include <stdio.h>
-
-/*
- * NB: The 5.0 spec describes a different algorithm than Aldus
- *     implements.  Specifically, Aldus does code length transitions
- *     one code earlier than should be done (for real LZW).
- *     Earlier versions of this library implemented the correct
- *     LZW algorithm, but emitted codes in a bit order opposite
- *     to the TIFF spec.  Thus, to maintain compatibility w/ Aldus
- *     we interpret MSB-LSB ordered codes to be images written w/
- *     old versions of this library, but otherwise adhere to the
- *     Aldus "off by one" algorithm.
- *
- * Future revisions to the TIFF spec are expected to "clarify this issue".
- */
-#define	LZW_COMPAT		/* include backwards compatibility code */
-/*
- * Each strip of data is supposed to be terminated by a CODE_EOI.
- * If the following #define is included, the decoder will also
- * check for end-of-strip w/o seeing this code.  This makes the
- * library more robust, but also slower.
- */
-#define	LZW_CHECKEOS		/* include checks for strips w/o EOI code */
-
-#define MAXCODE(n)	((1L<<(n))-1)
-/*
- * The TIFF spec specifies that encoded bit
- * strings range from 9 to 12 bits.
- */
-#define	BITS_MIN	9		/* start with 9 bits */
-#define	BITS_MAX	12		/* max of 12 bit strings */
-/* predefined codes */
-#define	CODE_CLEAR	256		/* code to clear string table */
-#define	CODE_EOI	257		/* end-of-information code */
-#define CODE_FIRST	258		/* first free code entry */
-#define	CODE_MAX	MAXCODE(BITS_MAX)
-#define	HSIZE		9001L		/* 91% occupancy */
-#define	HSHIFT		(13-8)
-#ifdef LZW_COMPAT
-/* NB: +1024 is for compatibility with old files */
-#define	CSIZE		(MAXCODE(BITS_MAX)+1024L)
-#else
-#define	CSIZE		(MAXCODE(BITS_MAX)+1L)
-#endif
-
-/*
- * State block for each open TIFF file using LZW
- * compression/decompression.  Note that the predictor
- * state block must be first in this data structure.
- */
-typedef	struct {
-	TIFFPredictorState predict;	/* predictor super class */
-
-	u_short		nbits;		/* # of bits/code */
-	u_short		maxcode;	/* maximum code for lzw_nbits */
-	u_short		free_ent;	/* next free entry in hash table */
-	long		nextdata;	/* next bits of i/o */
-	long		nextbits;	/* # of valid bits in lzw_nextdata */
-} LZWBaseState;
-
-#define	lzw_nbits	base.nbits
-#define	lzw_maxcode	base.maxcode
-#define	lzw_free_ent	base.free_ent
-#define	lzw_nextdata	base.nextdata
-#define	lzw_nextbits	base.nextbits
-
-/*
- * Encoding-specific state.
- */
-typedef uint16 hcode_t;			/* codes fit in 16 bits */
-
-/*
- * Decoding-specific state.
- */
-typedef struct code_ent {
-	struct code_ent *next;
-	u_short	length;			/* string len, including this token */
-	u_char	value;			/* data value */
-	u_char	firstchar;		/* first token of string */
-} code_t;
-
-typedef	int (*decodeFunc)(TIFF*, tidata_t, tsize_t, tsample_t);
-
-typedef struct {
-	LZWBaseState base;
-
-        /* Decoding specific data */
-	long	dec_nbitsmask;		/* lzw_nbits 1 bits, right adjusted */
-	long	dec_restart;		/* restart count */
-#ifdef LZW_CHECKEOS
-	long	dec_bitsleft;		/* available bits in raw data */
-#endif
-	decodeFunc dec_decode;		/* regular or backwards compatible */
-	code_t*	dec_codep;		/* current recognized code */
-	code_t*	dec_oldcodep;		/* previously recognized code */
-	code_t*	dec_free_entp;		/* next free entry */
-	code_t*	dec_maxcodep;		/* max available entry */
-	code_t*	dec_codetab;		/* kept separate for small machines */
-} LZWCodecState;
-
-#define	LZWState(tif)		((LZWBaseState*) (tif)->tif_data)
-#define	DecoderState(tif)	((LZWCodecState*) LZWState(tif))
-
-static	int LZWDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-#ifdef LZW_COMPAT
-static	int LZWDecodeCompat(TIFF*, tidata_t, tsize_t, tsample_t);
-#endif
-
-/*
- * LZW Decoder.
- */
-
-#ifdef LZW_CHECKEOS
-/*
- * This check shouldn't be necessary because each
- * strip is suppose to be terminated with CODE_EOI.
- */
-#define	NextCode(_tif, _sp, _bp, _code, _get) {				\
-	if ((_sp)->dec_bitsleft < nbits) {				\
-		TIFFWarning(_tif->tif_name,				\
-		    "LZWDecode: Strip %d not terminated with EOI code", \
-		    _tif->tif_curstrip);				\
-		_code = CODE_EOI;					\
-	} else {							\
-		_get(_sp,_bp,_code);					\
-		(_sp)->dec_bitsleft -= nbits;				\
-	}								\
-}
-#else
-#define	NextCode(tif, sp, bp, code, get) get(sp, bp, code)
-#endif
-
-static int
-LZWSetupDecode(TIFF* tif)
-{
-	LZWCodecState* sp = DecoderState(tif);
-	static const char module[] = "LZWSetupDecode";
-	int code;
-
-	assert(sp != NULL);
-
-	if (sp->dec_codetab == NULL) {
-		sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
-		if (sp->dec_codetab == NULL) {
-			TIFFError(module, "No space for LZW code table");
-			return (0);
-		}
-		/*
-		 * Pre-load the table.
-		 */
-                code = 255;
-                do {
-                    sp->dec_codetab[code].value = (u_char) code;
-                    sp->dec_codetab[code].firstchar = (u_char) code;
-                    sp->dec_codetab[code].length = 1;
-                    sp->dec_codetab[code].next = NULL;
-                } while (code--);
-	}
-	return (1);
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-LZWPreDecode(TIFF* tif, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Check for old bit-reversed codes.
-	 */
-	if (tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) {
-#ifdef LZW_COMPAT
-		if (!sp->dec_decode) {
-			TIFFWarning(tif->tif_name,
-			    "Old-style LZW codes, convert file");
-			/*
-			 * Override default decoding methods with
-			 * ones that deal with the old coding.
-			 * Otherwise the predictor versions set
-			 * above will call the compatibility routines
-			 * through the dec_decode method.
-			 */
-			tif->tif_decoderow = LZWDecodeCompat;
-			tif->tif_decodestrip = LZWDecodeCompat;
-			tif->tif_decodetile = LZWDecodeCompat;
-			/*
-			 * If doing horizontal differencing, must
-			 * re-setup the predictor logic since we
-			 * switched the basic decoder methods...
-			 */
-			(*tif->tif_setupdecode)(tif);
-			sp->dec_decode = LZWDecodeCompat;
-		}
-		sp->lzw_maxcode = MAXCODE(BITS_MIN);
-#else /* !LZW_COMPAT */
-		if (!sp->dec_decode) {
-			TIFFError(tif->tif_name,
-			    "Old-style LZW codes not supported");
-			sp->dec_decode = LZWDecode;
-		}
-		return (0);
-#endif/* !LZW_COMPAT */
-	} else {
-		sp->lzw_maxcode = MAXCODE(BITS_MIN)-1;
-		sp->dec_decode = LZWDecode;
-	}
-	sp->lzw_nbits = BITS_MIN;
-	sp->lzw_nextbits = 0;
-	sp->lzw_nextdata = 0;
-
-	sp->dec_restart = 0;
-	sp->dec_nbitsmask = MAXCODE(BITS_MIN);
-#ifdef LZW_CHECKEOS
-	sp->dec_bitsleft = tif->tif_rawcc << 3;
-#endif
-	sp->dec_free_entp = sp->dec_codetab + CODE_FIRST;
-	/*
-	 * Zero entries that are not yet filled in.  We do
-	 * this to guard against bogus input data that causes
-	 * us to index into undefined entries.  If you can
-	 * come up with a way to safely bounds-check input codes
-	 * while decoding then you can remove this operation.
-	 */
-	_TIFFmemset(sp->dec_free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
-	sp->dec_oldcodep = &sp->dec_codetab[-1];
-	sp->dec_maxcodep = &sp->dec_codetab[sp->dec_nbitsmask-1];
-	return (1);
-}
-
-/*
- * Decode a "hunk of data".
- */
-#define	GetNextCode(sp, bp, code) {				\
-	nextdata = (nextdata<<8) | *(bp)++;			\
-	nextbits += 8;						\
-	if (nextbits < nbits) {					\
-		nextdata = (nextdata<<8) | *(bp)++;		\
-		nextbits += 8;					\
-	}							\
-	code = (hcode_t)((nextdata >> (nextbits-nbits)) & nbitsmask);	\
-	nextbits -= nbits;					\
-}
-
-static void
-codeLoop(TIFF* tif)
-{
-	TIFFError(tif->tif_name,
-	    "LZWDecode: Bogus encoding, loop in the code table; scanline %d",
-	    tif->tif_row);
-}
-
-static int
-LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-	char *op = (char*) op0;
-	long occ = (long) occ0;
-	char *tp;
-	u_char *bp;
-	hcode_t code;
-	int len;
-	long nbits, nextbits, nextdata, nbitsmask;
-	code_t *codep, *free_entp, *maxcodep, *oldcodep;
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Restart interrupted output operation.
-	 */
-	if (sp->dec_restart) {
-		long residue;
-
-		codep = sp->dec_codep;
-		residue = codep->length - sp->dec_restart;
-		if (residue > occ) {
-			/*
-			 * Residue from previous decode is sufficient
-			 * to satisfy decode request.  Skip to the
-			 * start of the decoded string, place decoded
-			 * values in the output buffer, and return.
-			 */
-			sp->dec_restart += occ;
-			do {
-				codep = codep->next;
-			} while (--residue > occ && codep);
-			if (codep) {
-				tp = op + occ;
-				do {
-					*--tp = codep->value;
-					codep = codep->next;
-				} while (--occ && codep);
-			}
-			return (1);
-		}
-		/*
-		 * Residue satisfies only part of the decode request.
-		 */
-		op += residue, occ -= residue;
-		tp = op;
-		do {
-			int t;
-			--tp;
-			t = codep->value;
-			codep = codep->next;
-			*tp = (char) t;
-		} while (--residue && codep);
-		sp->dec_restart = 0;
-	}
-
-	bp = (u_char *)tif->tif_rawcp;
-	nbits = sp->lzw_nbits;
-	nextdata = sp->lzw_nextdata;
-	nextbits = sp->lzw_nextbits;
-	nbitsmask = sp->dec_nbitsmask;
-	oldcodep = sp->dec_oldcodep;
-	free_entp = sp->dec_free_entp;
-	maxcodep = sp->dec_maxcodep;
-
-	while (occ > 0) {
-		NextCode(tif, sp, bp, code, GetNextCode);
-		if (code == CODE_EOI)
-			break;
-		if (code == CODE_CLEAR) {
-			free_entp = sp->dec_codetab + CODE_FIRST;
-			nbits = BITS_MIN;
-			nbitsmask = MAXCODE(BITS_MIN);
-			maxcodep = sp->dec_codetab + nbitsmask-1;
-			NextCode(tif, sp, bp, code, GetNextCode);
-			if (code == CODE_EOI)
-				break;
-			*op++ = (char)code, occ--;
-			oldcodep = sp->dec_codetab + code;
-			continue;
-		}
-		codep = sp->dec_codetab + code;
-
-		/*
-	 	 * Add the new entry to the code table.
-	 	 */
-		if (free_entp < &sp->dec_codetab[0] ||
-			free_entp >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecode: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-
-		free_entp->next = oldcodep;
-		if (free_entp->next < &sp->dec_codetab[0] ||
-			free_entp->next >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecode: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-		free_entp->firstchar = free_entp->next->firstchar;
-		free_entp->length = free_entp->next->length+1;
-		free_entp->value = (codep < free_entp) ?
-		    codep->firstchar : free_entp->firstchar;
-		if (++free_entp > maxcodep) {
-			if (++nbits > BITS_MAX)		/* should not happen */
-				nbits = BITS_MAX;
-			nbitsmask = MAXCODE(nbits);
-			maxcodep = sp->dec_codetab + nbitsmask-1;
-		}
-		oldcodep = codep;
-		if (code >= 256) {
-			/*
-		 	 * Code maps to a string, copy string
-			 * value to output (written in reverse).
-		 	 */
-			if(codep->length == 0) {
-			    TIFFError(tif->tif_name,
-	    		    "LZWDecode: Wrong length of decoded string: "
-			    "data probably corrupted at scanline %d",
-			    tif->tif_row);	
-			    return (0);
-			}
-			if (codep->length > occ) {
-				/*
-				 * String is too long for decode buffer,
-				 * locate portion that will fit, copy to
-				 * the decode buffer, and setup restart
-				 * logic for the next decoding call.
-				 */
-				sp->dec_codep = codep;
-				do {
-					codep = codep->next;
-				} while (codep && codep->length > occ);
-				if (codep) {
-					sp->dec_restart = occ;
-					tp = op + occ;
-					do  {
-						*--tp = codep->value;
-						codep = codep->next;
-					}  while (--occ && codep);
-					if (codep)
-						codeLoop(tif);
-				}
-				break;
-			}
-			len = codep->length;
-			tp = op + len;
-			do {
-				int t;
-				--tp;
-				t = codep->value;
-				codep = codep->next;
-				*tp = (char) t;
-			} while (codep && tp > op);
-			if (codep) {
-			    codeLoop(tif);
-			    break;
-			}
-			op += len, occ -= len;
-		} else
-			*op++ = (char)code, occ--;
-	}
-
-	tif->tif_rawcp = (tidata_t) bp;
-	sp->lzw_nbits = (u_short) nbits;
-	sp->lzw_nextdata = nextdata;
-	sp->lzw_nextbits = nextbits;
-	sp->dec_nbitsmask = nbitsmask;
-	sp->dec_oldcodep = oldcodep;
-	sp->dec_free_entp = free_entp;
-	sp->dec_maxcodep = maxcodep;
-
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-		"LZWDecode: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_row, occ);
-		return (0);
-	}
-	return (1);
-}
-
-#ifdef LZW_COMPAT
-/*
- * Decode a "hunk of data" for old images.
- */
-#define	GetNextCodeCompat(sp, bp, code) {			\
-	nextdata |= (u_long) *(bp)++ << nextbits;		\
-	nextbits += 8;						\
-	if (nextbits < nbits) {					\
-		nextdata |= (u_long) *(bp)++ << nextbits;	\
-		nextbits += 8;					\
-	}							\
-	code = (hcode_t)(nextdata & nbitsmask);			\
-	nextdata >>= nbits;					\
-	nextbits -= nbits;					\
-}
-
-static int
-LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-	char *op = (char*) op0;
-	long occ = (long) occ0;
-	char *tp;
-	u_char *bp;
-	int code, nbits;
-	long nextbits, nextdata, nbitsmask;
-	code_t *codep, *free_entp, *maxcodep, *oldcodep;
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Restart interrupted output operation.
-	 */
-	if (sp->dec_restart) {
-		long residue;
-
-		codep = sp->dec_codep;
-		residue = codep->length - sp->dec_restart;
-		if (residue > occ) {
-			/*
-			 * Residue from previous decode is sufficient
-			 * to satisfy decode request.  Skip to the
-			 * start of the decoded string, place decoded
-			 * values in the output buffer, and return.
-			 */
-			sp->dec_restart += occ;
-			do {
-				codep = codep->next;
-			} while (--residue > occ);
-			tp = op + occ;
-			do {
-				*--tp = codep->value;
-				codep = codep->next;
-			} while (--occ);
-			return (1);
-		}
-		/*
-		 * Residue satisfies only part of the decode request.
-		 */
-		op += residue, occ -= residue;
-		tp = op;
-		do {
-			*--tp = codep->value;
-			codep = codep->next;
-		} while (--residue);
-		sp->dec_restart = 0;
-	}
-
-	bp = (u_char *)tif->tif_rawcp;
-	nbits = sp->lzw_nbits;
-	nextdata = sp->lzw_nextdata;
-	nextbits = sp->lzw_nextbits;
-	nbitsmask = sp->dec_nbitsmask;
-	oldcodep = sp->dec_oldcodep;
-	free_entp = sp->dec_free_entp;
-	maxcodep = sp->dec_maxcodep;
-
-	while (occ > 0) {
-		NextCode(tif, sp, bp, code, GetNextCodeCompat);
-		if (code == CODE_EOI)
-			break;
-		if (code == CODE_CLEAR) {
-			free_entp = sp->dec_codetab + CODE_FIRST;
-			nbits = BITS_MIN;
-			nbitsmask = MAXCODE(BITS_MIN);
-			maxcodep = sp->dec_codetab + nbitsmask;
-			NextCode(tif, sp, bp, code, GetNextCodeCompat);
-			if (code == CODE_EOI)
-				break;
-			*op++ = (char) code, occ--;
-			oldcodep = sp->dec_codetab + code;
-			continue;
-		}
-		codep = sp->dec_codetab + code;
-
-		/*
-	 	 * Add the new entry to the code table.
-	 	 */
-		if (free_entp < &sp->dec_codetab[0] ||
-			free_entp >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecodeCompat: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-
-		free_entp->next = oldcodep;
-		if (free_entp->next < &sp->dec_codetab[0] ||
-			free_entp->next >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecodeCompat: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-		free_entp->firstchar = free_entp->next->firstchar;
-		free_entp->length = free_entp->next->length+1;
-		free_entp->value = (codep < free_entp) ?
-		    codep->firstchar : free_entp->firstchar;
-		if (++free_entp > maxcodep) {
-			if (++nbits > BITS_MAX)		/* should not happen */
-				nbits = BITS_MAX;
-			nbitsmask = MAXCODE(nbits);
-			maxcodep = sp->dec_codetab + nbitsmask;
-		}
-		oldcodep = codep;
-		if (code >= 256) {
-			/*
-		 	 * Code maps to a string, copy string
-			 * value to output (written in reverse).
-		 	 */
-			if(codep->length == 0) {
-			    TIFFError(tif->tif_name,
-	    		    "LZWDecodeCompat: Wrong length of decoded "
-			    "string: data probably corrupted at scanline %d",
-			    tif->tif_row);	
-			    return (0);
-			}
-			if (codep->length > occ) {
-				/*
-				 * String is too long for decode buffer,
-				 * locate portion that will fit, copy to
-				 * the decode buffer, and setup restart
-				 * logic for the next decoding call.
-				 */
-				sp->dec_codep = codep;
-				do {
-					codep = codep->next;
-				} while (codep->length > occ);
-				sp->dec_restart = occ;
-				tp = op + occ;
-				do  {
-					*--tp = codep->value;
-					codep = codep->next;
-				}  while (--occ);
-				break;
-			}
-			op += codep->length, occ -= codep->length;
-			tp = op;
-			do {
-				*--tp = codep->value;
-			} while( (codep = codep->next) != NULL);
-		} else
-			*op++ = (char) code, occ--;
-	}
-
-	tif->tif_rawcp = (tidata_t) bp;
-	sp->lzw_nbits = (u_short) nbits;
-	sp->lzw_nextdata = nextdata;
-	sp->lzw_nextbits = nextbits;
-	sp->dec_nbitsmask = nbitsmask;
-	sp->dec_oldcodep = oldcodep;
-	sp->dec_free_entp = free_entp;
-	sp->dec_maxcodep = maxcodep;
-
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-	    "LZWDecodeCompat: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_row, occ);
-		return (0);
-	}
-	return (1);
-}
-#endif /* LZW_COMPAT */
-
-
-
-static void
-LZWCleanup(TIFF* tif)
-{
-    if (tif->tif_data) {
-        if (DecoderState(tif)->dec_codetab)
-            _TIFFfree(DecoderState(tif)->dec_codetab);
-        _TIFFfree(tif->tif_data);
-        tif->tif_data = NULL;
-    }
-}
-
-static int
-LZWSetupEncode(TIFF* tif)
-{
-    TIFFError(tif->tif_name,
-              "LZW compression is not available to due to Unisys patent enforcement");
-    return (0);
-}
-
-int
-TIFFInitLZW(TIFF* tif, int scheme)
-{
-	assert(scheme == COMPRESSION_LZW);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWCodecState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	DecoderState(tif)->dec_codetab = NULL;
-	DecoderState(tif)->dec_decode = NULL;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupencode = LZWSetupEncode;
-	tif->tif_setupdecode = LZWSetupDecode;
-	tif->tif_predecode = LZWPreDecode;
-	tif->tif_decoderow = LZWDecode;
-	tif->tif_decodestrip = LZWDecode;
-	tif->tif_decodetile = LZWDecode;
-	tif->tif_cleanup = LZWCleanup;
-
-	/*
-	 * Setup predictor setup.
-	 */
-	(void) TIFFPredictorInit(tif);
-
-	return (1);
-
-bad:
-	TIFFError("TIFFInitLZW", "No space for LZW state block");
-	return (0);
-}
-
-/*
- * Copyright (c) 1985, 1986 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * James A. Woods, derived from original work by Spencer Thomas
- * and Joseph Orost.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#endif /* LZW_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_msdos.c b/tkimg1.3/libtiff/libtiff/tif_msdos.c
deleted file mode 100644
index ced615a..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_msdos.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_msdos.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library MSDOS-specific Routines.
- */
-#if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(_MSC_VER)
-#include <io.h>		/* for open, close, etc. function prototypes */
-#include <stdio.h>
-#endif
-#include "tiffiop.h"
-
-static tsize_t 
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (read((int) fd, buf, size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (write((int) fd, buf, size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	return (lseek((int) fd, (off_t) off, whence));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (close((int) fd));
-}
-
-#include <sys/stat.h>
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	struct stat sb;
-	return (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
-}
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-	    (void*) fd,
-	    _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
-	    _tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-	fd = open(name, m|O_BINARY, 0666);
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF*)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-#ifdef __GNUC__
-extern	char* malloc();
-extern	char* realloc();
-#else
-#include <malloc.h>
-#endif
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-static void
-msdosWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler;
-
-static void
-msdosErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_next.c b/tkimg1.3/libtiff/libtiff/tif_next.c
deleted file mode 100644
index 1f19077..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_next.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_next.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef NEXT_SUPPORT
-/*
- * TIFF Library.
- *
- * NeXT 2-bit Grey Scale Compression Algorithm Support
- */
-
-#define SETPIXEL(op, v) {			\
-	switch (npixels++ & 3) {		\
-	case 0:	op[0]  = (u_char) ((v) << 6); break;	\
-	case 1:	op[0] |= (v) << 4; break;	\
-	case 2:	op[0] |= (v) << 2; break;	\
-	case 3:	*op++ |= (v);	   break;	\
-	}					\
-}
-
-#define LITERALROW	0x00
-#define LITERALSPAN	0x40
-#define WHITE   	((1<<2)-1)
-
-static int
-NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	register u_char *bp, *op;
-	register tsize_t cc;
-	register int n;
-	tidata_t row;
-	tsize_t scanline;
-
-	(void) s;
-	/*
-	 * Each scanline is assumed to start off as all
-	 * white (we assume a PhotometricInterpretation
-	 * of ``min-is-black'').
-	 */
-	for (op = buf, cc = occ; cc-- > 0;)
-		*op++ = 0xff;
-
-	bp = (u_char *)tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	scanline = tif->tif_scanlinesize;
-	for (row = buf; (long)occ > 0; occ -= scanline, row += scanline) {
-		n = *bp++, cc--;
-		switch (n) {
-		case LITERALROW:
-			/*
-			 * The entire scanline is given as literal values.
-			 */
-			if (cc < scanline)
-				goto bad;
-			_TIFFmemcpy(row, bp, scanline);
-			bp += scanline;
-			cc -= scanline;
-			break;
-		case LITERALSPAN: {
-			int off;
-			/*
-			 * The scanline has a literal span
-			 * that begins at some offset.
-			 */
-			off = (bp[0] * 256) + bp[1];
-			n = (bp[2] * 256) + bp[3];
-			if (cc < 4+n)
-				goto bad;
-			_TIFFmemcpy(row+off, bp+4, n);
-			bp += 4+n;
-			cc -= 4+n;
-			break;
-		}
-		default: {
-			register int npixels = 0, grey;
-			u_long imagewidth = tif->tif_dir.td_imagewidth;
-
-			/*
-			 * The scanline is composed of a sequence
-			 * of constant color ``runs''.  We shift
-			 * into ``run mode'' and interpret bytes
-			 * as codes of the form <color><npixels>
-			 * until we've filled the scanline.
-			 */
-			op = row;
-			for (;;) {
-				grey = (n>>6) & 0x3;
-				n &= 0x3f;
-				while (n-- > 0)
-					SETPIXEL(op, grey);
-				if (npixels >= (int) imagewidth)
-					break;
-				if (cc == 0)
-					goto bad;
-				n = *bp++, cc--;
-			}
-			break;
-		}
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-bad:
-	TIFFError(tif->tif_name, "NeXTDecode: Not enough data for scanline %ld",
-	    (long) tif->tif_row);
-	return (0);
-}
-
-int
-TIFFInitNeXT(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = NeXTDecode;
-	tif->tif_decodestrip = NeXTDecode;
-	tif->tif_decodetile = NeXTDecode;
-	return (1);
-}
-#endif /* NEXT_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_ojpeg.c b/tkimg1.3/libtiff/libtiff/tif_ojpeg.c
deleted file mode 100644
index a442647..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_ojpeg.c
+++ /dev/null
@@ -1,2630 +0,0 @@
-#include "tiffiop.h"
-#ifdef OJPEG_SUPPORT
-
-/* JPEG Compression support, as per the original TIFF 6.0 specification.
-
-   WARNING: KLUDGE ALERT!  The type of JPEG encapsulation defined by the TIFF
-                           Version 6.0 specification is now totally obsolete and
-   deprecated for new applications and images.  This file is an unsupported hack
-   that was created solely in order to read (but NOT write!) a few old,
-   unconverted images still present on some users' computer systems.  The code
-   isn't pretty or robust, and it won't read every "old format" JPEG-in-TIFF
-   file (see Samuel Leffler's draft "TIFF Technical Note No. 2" for a long and
-   incomplete list of known problems), but it seems to work well enough in the
-   few cases of practical interest to the author; so, "caveat emptor"!  This
-   file should NEVER be enhanced to write new images using anything other than
-   the latest approved JPEG-in-TIFF encapsulation method, implemented by the
-   "tif_jpeg.c" file elsewhere in this library.
-
-   This file interfaces with Release 6B of the JPEG Library written by theu
-   Independent JPEG Group, which you can find on the Internet at:
-   ftp://ftp.uu.net:/graphics/jpeg/.
-
-   The "C" Preprocessor macros, "[CD]_LOSSLESS_SUPPORTED", are defined by your
-   JPEG Library Version 6B only if you have applied a (massive!) patch by Ken
-   Murchison of Oceana Matrix Ltd. <ken at oceana.com> to support lossless Huffman
-   encoding (TIFF "JPEGProc" tag value = 14).  This patch can be found on the
-   Internet at: ftp://ftp.oceana.com/pub/ljpeg-6b.tar.gz.
-
-   Some old files produced by the Wang Imaging application for Microsoft Windows
-   apparently can be decoded only with a special patch to the JPEG Library,
-   which defines a subroutine named "jpeg_reset_huff_decode()" in its "jdhuff.c"
-   module (the "jdshuff.c" module, if Ken Murchison's patch has been applied).
-   Unfortunately the patch differs slightly in each case, and some TIFF Library
-   have reported problems finding the code, so both versions appear below; you
-   should carefully extract and apply only the version that applies to your JPEG
-   Library!
-
-   Contributed by Scott Marovich <marovich at hpl.hp.com> with considerable help
-   from Charles Auer <Bumble731 at msn.com> to unravel the mysteries of image files
-   created by the Wang Imaging application for Microsoft Windows.
-*/
-#if 0  /* Patch for JPEG Library WITHOUT lossless Huffman coding */
-*** jdhuff.c.orig	Mon Oct 20 17:51:10 1997
---- jdhuff.c	Sun Nov 11 17:33:58 2001
-***************
-*** 648,651 ****
---- 648,683 ----
-    for (i = 0; i < NUM_HUFF_TBLS; i++) {
-      entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
-    }
-  }
-+ 
-+ /*
-+  * BEWARE OF KLUDGE:  This subroutine is a hack for decoding illegal JPEG-in-
-+  *                    TIFF encapsulations produced by Microsoft's Wang Imaging
-+  * for Windows application with the public-domain TIFF Library.  Based upon an
-+  * examination of selected output files, this program apparently divides a JPEG
-+  * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
-+  * encoder's/decoder's DC coefficients for each image component are reset before
-+  * each "strip".  Moreover, a "strip" is not necessarily encoded in a multiple
-+  * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
-+  * for alignment to the next input-Byte storage boundary.  IJG JPEG Library
-+  * decoder state is not normally exposed to client applications, so this sub-
-+  * routine provides the TIFF Library with a "hook" to make these corrections.
-+  * It should be called after "jpeg_start_decompress()" and before
-+  * "jpeg_finish_decompress()", just before decoding each "strip" using
-+  * "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
-+  *
-+  * This kludge is not sanctioned or supported by the Independent JPEG Group, and
-+  * future changes to the IJG JPEG Library might invalidate it.  Do not send bug
-+  * reports about this code to IJG developers.  Instead, contact the author for
-+  * advice: Scott B. Marovich <marovich at hpl.hp.com>, Hewlett-Packard Labs, 6/01.
-+  */
-+ GLOBAL(void)
-+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
-+ { register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
-+   register int ci = 0;
-+ 
-+   /* Discard encoded input bits, up to the next Byte boundary */
-+   entropy->bitstate.bits_left &= ~7;
-+   /* Re-initialize DC predictions to 0 */
-+   do entropy->saved.last_dc_val[ci] = 0; while (++ci < cinfo->comps_in_scan);
-+ }
-#endif /* Patch for JPEG Library WITHOUT lossless Huffman coding */
-#if 0  /* Patch for JPEG Library WITH lossless Huffman coding */
-*** jdshuff.c.orig	Mon Mar 11 16:44:54 2002
---- jdshuff.c	Mon Mar 11 16:44:54 2002
-***************
-*** 357,360 ****
---- 357,393 ----
-    for (i = 0; i < NUM_HUFF_TBLS; i++) {
-      entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
-    }
-  }
-+ 
-+ /*
-+  * BEWARE OF KLUDGE:  This subroutine is a hack for decoding illegal JPEG-in-
-+  *                    TIFF encapsulations produced by Microsoft's Wang Imaging
-+  * for Windows application with the public-domain TIFF Library.  Based upon an
-+  * examination of selected output files, this program apparently divides a JPEG
-+  * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
-+  * encoder's/decoder's DC coefficients for each image component are reset before
-+  * each "strip".  Moreover, a "strip" is not necessarily encoded in a multiple
-+  * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
-+  * for alignment to the next input-Byte storage boundary.  IJG JPEG Library
-+  * decoder state is not normally exposed to client applications, so this sub-
-+  * routine provides the TIFF Library with a "hook" to make these corrections.
-+  * It should be called after "jpeg_start_decompress()" and before
-+  * "jpeg_finish_decompress()", just before decoding each "strip" using
-+  * "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
-+  *
-+  * This kludge is not sanctioned or supported by the Independent JPEG Group, and
-+  * future changes to the IJG JPEG Library might invalidate it.  Do not send bug
-+  * reports about this code to IJG developers.  Instead, contact the author for
-+  * advice: Scott B. Marovich <marovich at hpl.hp.com>, Hewlett-Packard Labs, 6/01.
-+  */
-+ GLOBAL(void)
-+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
-+ { register shuff_entropy_ptr entropy = (shuff_entropy_ptr)
-+                                        ((j_lossy_d_ptr)cinfo->codec)->entropy_private;
-+   register int ci = 0;
-+ 
-+   /* Discard encoded input bits, up to the next Byte boundary */
-+   entropy->bitstate.bits_left &= ~7;
-+   /* Re-initialize DC predictions to 0 */
-+   do entropy->saved.last_dc_val[ci] = 0; while (++ci < cinfo->comps_in_scan);
-+ }
-#endif /* Patch for JPEG Library WITH lossless Huffman coding */
-#include <setjmp.h>
-#include <stdio.h>
-#ifdef FAR
-#undef FAR /* Undefine FAR to avoid conflict with JPEG definition */
-#endif
-#define JPEG_INTERNALS /* Include "jpegint.h" for "DSTATE_*" symbols */
-#define JPEG_CJPEG_DJPEG /* Include all Version 6B+ "jconfig.h" options */
-#undef INLINE
-#include "jpeglib.h"
-#undef JPEG_CJPEG_DJPEG
-#undef JPEG_INTERNALS
-
-/* Hack for files produced by Wang Imaging application on Microsoft Windows */
-extern void jpeg_reset_huff_decode(j_decompress_ptr);
-
-/* On some machines, it may be worthwhile to use "_setjmp()" or "sigsetjmp()"
-   instead of "setjmp()".  These macros make it easier:
-*/
-#define SETJMP(jbuf)setjmp(jbuf)
-#define LONGJMP(jbuf,code)longjmp(jbuf,code)
-#define JMP_BUF jmp_buf
-
-#define TIFFTAG_WANG_PAGECONTROL 32934
-
-/* Bit-vector offsets for keeping track of TIFF records that we've parsed. */
-
-#define FIELD_JPEGPROC FIELD_CODEC
-#define FIELD_JPEGIFOFFSET (FIELD_CODEC+1)
-#define FIELD_JPEGIFBYTECOUNT (FIELD_CODEC+2)
-#define FIELD_JPEGRESTARTINTERVAL (FIELD_CODEC+3)
-#define FIELD_JPEGTABLES (FIELD_CODEC+4) /* New, post-6.0 JPEG-in-TIFF tag! */
-#define FIELD_JPEGLOSSLESSPREDICTORS (FIELD_CODEC+5)
-#define FIELD_JPEGPOINTTRANSFORM (FIELD_CODEC+6)
-#define FIELD_JPEGQTABLES (FIELD_CODEC+7)
-#define FIELD_JPEGDCTABLES (FIELD_CODEC+8)
-#define FIELD_JPEGACTABLES (FIELD_CODEC+9)
-#define FIELD_WANG_PAGECONTROL (FIELD_CODEC+10)
-#define FIELD_JPEGCOLORMODE (FIELD_CODEC+11)
-
-typedef struct jpeg_destination_mgr jpeg_destination_mgr;
-typedef struct jpeg_source_mgr jpeg_source_mgr;
-typedef struct jpeg_error_mgr jpeg_error_mgr;
-
-/* State variable for each open TIFF file that uses "libjpeg" for JPEG
-   decompression.  (Note:  This file should NEVER perform JPEG compression
-   except in the manner implemented by the "tif_jpeg.c" file, elsewhere in this
-   library; see comments above.)  JPEG Library internal state is recorded in a
-   "jpeg_{de}compress_struct", while a "jpeg_common_struct" records a few items
-   common to both compression and expansion.  The "cinfo" field containing JPEG
-   Library state MUST be the 1st member of our own state variable, so that we
-   can safely "cast" pointers back and forth.
-*/
-typedef struct             /* This module's private, per-image state variable */
-  {
-    union         /* JPEG Library state variable; this MUST be our 1st field! */
-      {
-        struct jpeg_compress_struct c;
-        struct jpeg_decompress_struct d;
-        struct jpeg_common_struct comm;
-      } cinfo;
-    jpeg_error_mgr err;                         /* JPEG Library error manager */
-    JMP_BUF exit_jmpbuf;             /* ...for catching JPEG Library failures */
-#   ifdef never
-
- /* (The following two fields could be a "union", but they're small enough that
-    it's not worth the effort.)
- */
-    jpeg_destination_mgr dest;             /* Destination for compressed data */
-#   endif
-    jpeg_source_mgr src;                           /* Source of expanded data */
-    JSAMPARRAY ds_buffer[MAX_COMPONENTS]; /* ->Temporary downsampling buffers */
-    TIFF *tif;                        /* Reverse pointer, needed by some code */
-    TIFFVGetMethod vgetparent;                    /* "Super class" methods... */
-    TIFFVSetMethod vsetparent;
-    TIFFStripMethod defsparent;
-    TIFFTileMethod deftparent;
-    void *jpegtables;           /* ->"New" JPEG tables, if we synthesized any */
-    uint32 is_WANG,    /* <=> Wang Imaging for Microsoft Windows output file? */
-           jpegtables_length;   /* Length of "new" JPEG tables, if they exist */
-    tsize_t bytesperline;          /* No. of decompressed Bytes per scan line */
-    int jpegquality,                             /* Compression quality level */
-        jpegtablesmode,                          /* What to put in JPEGTables */
-        samplesperclump,
-        scancount;                           /* No. of scan lines accumulated */
-    J_COLOR_SPACE photometric;          /* IJG JPEG Library's photometry code */
-    u_char h_sampling,                          /* Luminance sampling factors */
-           v_sampling,
-           jpegcolormode;           /* Who performs RGB <-> YCbCr conversion? */
-			/* JPEGCOLORMODE_RAW <=> TIFF Library or its client */
-			/* JPEGCOLORMODE_RGB <=> JPEG Library               */
-    /* These fields are added to support TIFFGetField */
-    uint16 jpegproc;
-    uint32 jpegifoffset;
-    uint32 jpegifbytecount;
-    uint32 jpegrestartinterval;
-    void* jpeglosslesspredictors;
-    uint16 jpeglosslesspredictors_length;
-    void* jpegpointtransform;
-    uint32 jpegpointtransform_length;
-    void* jpegqtables;
-    uint32 jpegqtables_length;
-    void* jpegdctables;
-    uint32 jpegdctables_length;
-    void* jpegactables;
-    uint32 jpegactables_length;
-
-  } OJPEGState;
-#define OJState(tif)((OJPEGState*)(tif)->tif_data)
-
-static const TIFFFieldInfo ojpegFieldInfo[]=/* JPEG-specific TIFF-record tags */
-  {
-
- /* This is the current JPEG-in-TIFF metadata-encapsulation tag, and its
-    treatment in this file is idiosyncratic.  It should never appear in a
-    "source" image conforming to the TIFF Version 6.0 specification, so we
-    arrange to report an error if it appears.  But in order to support possible
-    future conversion of "old" JPEG-in-TIFF encapsulations to "new" ones, we
-    might wish to synthesize an equivalent value to be returned by the TIFF
-    Library's "getfield" method.  So, this table tells the TIFF Library to pass
-    these records to us in order to filter them below.
- */
-    {
-      TIFFTAG_JPEGTABLES            ,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_UNDEFINED,FIELD_JPEGTABLES            ,FALSE,TRUE ,"JPEGTables"
-    },
-
- /* These tags are defined by the TIFF Version 6.0 specification and are now
-    obsolete.  This module reads them from an old "source" image, but it never
-    writes them to a new "destination" image.
- */
-    {
-      TIFFTAG_JPEGPROC              ,1            ,1            ,
-      TIFF_SHORT    ,FIELD_JPEGPROC              ,FALSE,FALSE,"JPEGProc"
-    },
-    {
-      TIFFTAG_JPEGIFOFFSET          ,1            ,1            ,
-      TIFF_LONG     ,FIELD_JPEGIFOFFSET          ,FALSE,FALSE,"JPEGInterchangeFormat"
-    },
-    {
-      TIFFTAG_JPEGIFBYTECOUNT       ,1            ,1            ,
-      TIFF_LONG     ,FIELD_JPEGIFBYTECOUNT       ,FALSE,FALSE,"JPEGInterchangeFormatLength"
-    },
-    {
-      TIFFTAG_JPEGRESTARTINTERVAL   ,1            ,1            ,
-      TIFF_SHORT    ,FIELD_JPEGRESTARTINTERVAL   ,FALSE,FALSE,"JPEGRestartInterval"
-    },
-    {
-      TIFFTAG_JPEGLOSSLESSPREDICTORS,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_SHORT    ,FIELD_JPEGLOSSLESSPREDICTORS,FALSE,TRUE ,"JPEGLosslessPredictors"
-    },
-    {
-      TIFFTAG_JPEGPOINTTRANSFORM    ,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_SHORT    ,FIELD_JPEGPOINTTRANSFORM    ,FALSE,TRUE ,"JPEGPointTransforms"
-    },
-    {
-      TIFFTAG_JPEGQTABLES           ,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_LONG     ,FIELD_JPEGQTABLES           ,FALSE,TRUE ,"JPEGQTables"
-    },
-    {
-      TIFFTAG_JPEGDCTABLES          ,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_LONG     ,FIELD_JPEGDCTABLES          ,FALSE,TRUE ,"JPEGDCTables"
-    },
-    {
-      TIFFTAG_JPEGACTABLES          ,TIFF_VARIABLE,TIFF_VARIABLE,
-      TIFF_LONG     ,FIELD_JPEGACTABLES          ,FALSE,TRUE ,"JPEGACTables"
-    },
-    {
-      TIFFTAG_WANG_PAGECONTROL      ,TIFF_VARIABLE,1            ,
-      TIFF_LONG     ,FIELD_WANG_PAGECONTROL      ,FALSE,FALSE,"WANG PageControl"
-    },
-
- /* This is a pseudo tag intended for internal use only by the TIFF Library and
-    its clients, which should never appear in an input/output image file.  It
-    specifies whether the TIFF Library (or its client) should do YCbCr <-> RGB
-    color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we should ask
-    the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
- */
-    {
-      TIFFTAG_JPEGCOLORMODE         ,0            ,0            ,
-      TIFF_ANY      ,FIELD_PSEUDO                ,FALSE,FALSE,"JPEGColorMode"
-    }
-  };
-static const char JPEGLib_name[]={"JPEG Library"},
-                  bad_bps[]={"%u BitsPerSample not allowed for JPEG"},
-                  bad_photometry[]={"PhotometricInterpretation %u not allowed for JPEG"},
-                  bad_subsampling[]={"invalid YCbCr subsampling factor(s)"},
-#                 ifdef never
-                  no_write_frac[]={"fractional scan line discarded"},
-#                 endif
-                  no_read_frac[]={"fractional scan line not read"},
-                  no_jtable_space[]={"No space for JPEGTables"};
-
-/* The following diagnostic subroutines interface with and replace default
-   subroutines in the JPEG Library.  Our basic strategy is to use "setjmp()"/
-   "longjmp()" in order to return control to the TIFF Library when the JPEG
-   library detects an error, and to use TIFF Library subroutines for displaying
-   diagnostic messages to a client application.
-*/
-static void
-TIFFojpeg_error_exit(register j_common_ptr cinfo)
-  { char buffer[JMSG_LENGTH_MAX];
-
-    (*cinfo->err->format_message)(cinfo,buffer);
-    TIFFError(JPEGLib_name,buffer); /* Display error message */
-    jpeg_abort(cinfo); /* Clean up JPEG Library state */
-    LONGJMP(((OJPEGState *)cinfo)->exit_jmpbuf,1); /* Return to TIFF client */
-  }
-
-static void
-TIFFojpeg_output_message(register j_common_ptr cinfo)
-  { char buffer[JMSG_LENGTH_MAX];
-
- /* This subroutine is invoked only for warning messages, since the JPEG
-    Library's "error_exit" method does its own thing and "trace_level" is never
-    set > 0.
- */
-    (*cinfo->err->format_message)(cinfo,buffer);
-    TIFFWarning(JPEGLib_name,buffer);
-  }
-
-/* The following subroutines, which also interface with the JPEG Library, exist
-   mainly in limit the side effects of "setjmp()" and convert JPEG normal/error
-   conditions into TIFF Library return codes.
-*/
-#define CALLJPEG(sp,fail,op)(SETJMP((sp)->exit_jmpbuf)?(fail):(op))
-#define CALLVJPEG(sp,op)CALLJPEG(sp,0,((op),1))
-#ifdef never
-
-static int
-TIFFojpeg_create_compress(register OJPEGState *sp)
-  {
-    sp->cinfo.c.err = jpeg_std_error(&sp->err); /* Initialize error handling */
-    sp->err.error_exit = TIFFojpeg_error_exit;
-    sp->err.output_message = TIFFojpeg_output_message;
-    return CALLVJPEG(sp,jpeg_create_compress(&sp->cinfo.c));
-  }
-
-/* The following subroutines comprise a JPEG Library "destination" data manager
-   by directing compressed data from the JPEG Library to a TIFF Library output
-   buffer.
-*/
-static void
-std_init_destination(register j_compress_ptr cinfo){} /* "Dummy" stub */
-
-static boolean
-std_empty_output_buffer(register j_compress_ptr cinfo)
-  {
-#   define sp ((OJPEGState *)cinfo)
-    register TIFF *tif = sp->tif;
-
-    tif->tif_rawcc = tif->tif_rawdatasize; /* Entire buffer has been filled */
-    TIFFFlushData1(tif);
-    sp->dest.next_output_byte = (JOCTET *)tif->tif_rawdata;
-    sp->dest.free_in_buffer = (size_t)tif->tif_rawdatasize;
-    return TRUE;
-#   undef sp
-  }
-
-static void
-std_term_destination(register j_compress_ptr cinfo)
-  {
-#   define sp ((OJPEGState *)cinfo)
-    register TIFF *tif = sp->tif;
-
- /* NB: The TIFF Library does the final buffer flush. */
-    tif->tif_rawcp = (tidata_t)sp->dest.next_output_byte;
-    tif->tif_rawcc = tif->tif_rawdatasize - (tsize_t)sp->dest.free_in_buffer;
-#   undef sp
-  }
-
-/* Alternate destination manager to output JPEGTables field: */
-
-static void
-tables_init_destination(register j_compress_ptr cinfo)
-  {
-#   define sp ((OJPEGState *)cinfo)
- /* The "jpegtables_length" field is the allocated buffer size while building */
-    sp->dest.next_output_byte = (JOCTET *)sp->jpegtables;
-    sp->dest.free_in_buffer = (size_t)sp->jpegtables_length;
-#   undef sp
-  }
-
-static boolean
-tables_empty_output_buffer(register j_compress_ptr cinfo)
-  { void *newbuf;
-#   define sp ((OJPEGState *)cinfo)
-
- /* The entire buffer has been filled, so enlarge it by 1000 bytes. */
-    if (!( newbuf = _TIFFrealloc( (tdata_t)sp->jpegtables
-                                , (tsize_t)(sp->jpegtables_length + 1000)
-                                )
-         )
-       ) ERREXIT1(cinfo,JERR_OUT_OF_MEMORY,100);
-    sp->dest.next_output_byte = (JOCTET *)newbuf + sp->jpegtables_length;
-    sp->dest.free_in_buffer = (size_t)1000;
-    sp->jpegtables = newbuf;
-    sp->jpegtables_length += 1000;
-    return TRUE;
-#   undef sp
-  }
-
-static void
-tables_term_destination(register j_compress_ptr cinfo)
-  {
-#   define sp ((OJPEGState *)cinfo)
- /* Set tables length to no. of Bytes actually emitted. */
-    sp->jpegtables_length -= sp->dest.free_in_buffer;
-#   undef sp
-  }
-
-/*ARGSUSED*/ static int
-TIFFojpeg_tables_dest(register OJPEGState *sp, TIFF *tif)
-  {
-
- /* Allocate a working buffer for building tables.  The initial size is 1000
-    Bytes, which is usually adequate.
- */
-    if (sp->jpegtables) _TIFFfree(sp->jpegtables);
-    if (!(sp->jpegtables = (void*)
-                           _TIFFmalloc((tsize_t)(sp->jpegtables_length = 1000))
-         )
-       )
-      {
-        sp->jpegtables_length = 0;
-        TIFFError("TIFFojpeg_tables_dest",no_jtable_space);
-        return 0;
-      };
-    sp->cinfo.c.dest = &sp->dest;
-    sp->dest.init_destination = tables_init_destination;
-    sp->dest.empty_output_buffer = tables_empty_output_buffer;
-    sp->dest.term_destination = tables_term_destination;
-    return 1;
-  }
-#else /* well, hardly ever */
-
-static int
-_notSupported(register TIFF *tif)
-  { const TIFFCodec *c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-    TIFFError(tif->tif_name,"%s compression not supported",c->name);
-    return 0;
-  }
-#endif /* never */
-
-/* The following subroutines comprise a JPEG Library "source" data manager by
-   by directing compressed data to the JPEG Library from a TIFF Library input
-   buffer.
-*/
-static void
-std_init_source(register j_decompress_ptr cinfo)
-  {
-#   define sp ((OJPEGState *)cinfo)
-    register TIFF *tif = sp->tif;
-
-    if (sp->src.bytes_in_buffer == 0)
-      {
-        sp->src.next_input_byte = (const JOCTET *)tif->tif_rawdata;
-        sp->src.bytes_in_buffer = (size_t)tif->tif_rawcc;
-      };
-#   undef sp
-  }
-
-static boolean
-std_fill_input_buffer(register j_decompress_ptr cinfo)
-  { static const JOCTET dummy_EOI[2]={0xFF,JPEG_EOI};
-#   define sp ((OJPEGState *)cinfo)
-
- /* Control should never get here, since an entire strip/tile is read into
-    memory before the decompressor is called; thus, data should have been
-    supplied by the "init_source" method.  ...But, sometimes things fail.
- */
-    WARNMS(cinfo,JWRN_JPEG_EOF);
-    sp->src.next_input_byte = dummy_EOI; /* Insert a fake EOI marker */
-    sp->src.bytes_in_buffer = sizeof dummy_EOI;
-    return TRUE;
-#   undef sp
-  }
-
-static void
-std_skip_input_data(register j_decompress_ptr cinfo, long num_bytes)
-  {
-#   define sp ((OJPEGState *)cinfo)
-
-    if (num_bytes > 0)
-    {
-      if (num_bytes > (long)sp->src.bytes_in_buffer) /* oops: buffer overrun */
-        (void)std_fill_input_buffer(cinfo);
-      else
-        {
-          sp->src.next_input_byte += (size_t)num_bytes;
-          sp->src.bytes_in_buffer -= (size_t)num_bytes;
-        }
-    }
-#   undef sp
-  }
-
-/*ARGSUSED*/ static void
-std_term_source(register j_decompress_ptr cinfo){} /* "Dummy" stub */
-
-/* Allocate temporary I/O buffers for downsampled data, using values computed in
-   "jpeg_start_{de}compress()".  We use the JPEG Library's allocator so that
-   buffers will be released automatically when done with a strip/tile.  This is
-   also a handy place to compute samplesperclump, bytesperline, etc.
-*/
-static int
-alloc_downsampled_buffers(TIFF *tif,jpeg_component_info *comp_info,
-                          int num_components)
-  { register OJPEGState *sp = OJState(tif);
-
-    sp->samplesperclump = 0;
-    if (num_components > 0)
-      { tsize_t size = sp->cinfo.comm.is_decompressor
-#                    ifdef D_LOSSLESS_SUPPORTED
-                     ? sp->cinfo.d.min_codec_data_unit
-#                    else
-                     ? DCTSIZE
-#                    endif
-#                    ifdef C_LOSSLESS_SUPPORTED
-                     : sp->cinfo.c.data_unit;
-#                    else
-                     : DCTSIZE;
-#                    endif
-        int ci = 0;
-        register jpeg_component_info *compptr = comp_info;
-
-        do
-          { JSAMPARRAY buf;
-
-            sp->samplesperclump +=
-              compptr->h_samp_factor * compptr->v_samp_factor;
-#           if defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED)
-            if (!(buf = CALLJPEG(sp,0,(*sp->cinfo.comm.mem->alloc_sarray)(&sp->cinfo.comm,JPOOL_IMAGE,compptr->width_in_data_units*size,compptr->v_samp_factor*size))))
-#           else
-            if (!(buf = CALLJPEG(sp,0,(*sp->cinfo.comm.mem->alloc_sarray)(&sp->cinfo.comm,JPOOL_IMAGE,compptr->width_in_blocks*size,compptr->v_samp_factor*size))))
-#           endif
-              return 0;
-            sp->ds_buffer[ci] = buf;
-          }
-        while (++compptr,++ci < num_components);
-      };
-    return 1;
-  }
-#ifdef never
-
-/* JPEG Encoding begins here. */
-
-/*ARGSUSED*/ static int
-OJPEGEncode(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
-  { tsize_t rows;                          /* No. of unprocessed rows in file */
-    register OJPEGState *sp = OJState(tif);
-
- /* Encode a chunk of pixels, where returned data is NOT down-sampled (the
-    standard case).  The data is expected to be written in scan-line multiples.
- */
-    if (cc % sp->bytesperline) TIFFWarning(tif->tif_name,no_write_frac);
-    if ( (cc /= bytesperline)      /* No. of complete rows in caller's buffer */
-       > (rows = sp->cinfo.c.image_height - sp->cinfo.c.next_scanline)
-       ) cc = rows;
-    while (--cc >= 0)
-      {
-        if (   CALLJPEG(sp,-1,jpeg_write_scanlines(&sp->cinfo.c,(JSAMPARRAY)&buf,1))
-            != 1
-           ) return 0;
-        ++tif->tif_row;
-        buf += sp->bytesperline;
-      };
-    return 1;
-  }
-
-/*ARGSUSED*/ static int
-OJPEGEncodeRaw(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
-  { tsize_t rows;                          /* No. of unprocessed rows in file */
-    JDIMENSION lines_per_MCU, size;
-    register OJPEGState *sp = OJState(tif);
-
- /* Encode a chunk of pixels, where returned data is down-sampled as per the
-    sampling factors.  The data is expected to be written in scan-line
-    multiples.
- */
-    cc /= sp->bytesperline;
-    if (cc % sp->bytesperline) TIFFWarning(tif->tif_name,no_write_frac);
-    if ( (cc /= bytesperline)      /* No. of complete rows in caller's buffer */
-       > (rows = sp->cinfo.c.image_height - sp->cinfo.c.next_scanline)
-       ) cc = rows;
-#   ifdef C_LOSSLESS_SUPPORTED
-    lines_per_MCU = sp->cinfo.c.max_samp_factor*(size = sp->cinfo.d.data_unit);
-#   else
-    lines_per_MCU = sp->cinfo.c.max_samp_factor*(size = DCTSIZE);
-#   endif
-    while (--cc >= 0)
-      { int ci = 0, clumpoffset = 0;
-        register jpeg_component_info *compptr = sp->cinfo.c.comp_info;
-
-     /* The fastest way to separate the data is to make 1 pass over the scan
-        line for each row of each component.
-     */
-        do
-          { int ypos = 0;
-
-            do
-              { int padding;
-                register JSAMPLE *inptr = (JSAMPLE*)buf + clumpoffset,
-                                 *outptr =
-                  sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos];
-             /* Cb,Cr both have sampling factors 1, so this is correct */
-                register int clumps_per_line =
-                  sp->cinfo.c.comp_info[1].downsampled_width,
-                             xpos;
-
-                padding = (int)
-#                         ifdef C_LOSSLESS_SUPPORTED
-                          ( compptr->width_in_data_units * size
-#                         else
-                          ( compptr->width_in_blocks * size
-#                         endif
-                          - clumps_per_line * compptr->h_samp_factor
-                          );
-                if (compptr->h_samp_factor == 1) /* Cb & Cr fast path */
-                  do *outptr++ = *inptr;
-                  while ((inptr += sp->samplesperclump),--clumps_per_line > 0);
-                else /* general case */
-                  do
-                    {
-                      xpos = 0;
-                      do *outptr++ = inptr[xpos];
-                      while (++xpos < compptr->h_samp_factor);
-                    }
-                  while ((inptr += sp->samplesperclump),--clumps_per_line > 0);
-                xpos = 0; /* Pad each scan line as needed */
-                do outptr[0] = outptr[-1]; while (++outptr,++xpos < padding);
-                clumpoffset += compptr->h_samp_factor;
-              }
-            while (++ypos < compptr->v_samp_factor);
-          }
-        while (++compptr,++ci < sp->cinfo.c.num_components);
-        if (++sp->scancount >= size)
-          {
-            if (   CALLJPEG(sp,-1,jpeg_write_raw_data(&sp->cinfo.c,sp->ds_buffer,lines_per_MCU))
-                != lines_per_MCU
-               ) return 0;
-            sp->scancount = 0;
-          };
-        ++tif->tif_row++
-        buf += sp->bytesperline;
-      };
-    return 1;
-  }
-
-static int
-OJPEGSetupEncode(register TIFF *tif)
-  { static const char module[]={"OJPEGSetupEncode"};
-    uint32 segment_height, segment_width;
-    int status = 1;                              /* Assume success by default */
-    register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
- /* Verify miscellaneous parameters.  This will need work if the TIFF Library
-    ever supports different depths for different components, or if the JPEG
-    Library ever supports run-time depth selection.  Neither seems imminent.
- */
-    if (td->td_bitspersample != 8)
-      {
-        TIFFError(module,bad_bps,td->td_bitspersample);
-        status = 0;
-      };
-
- /* The TIFF Version 6.0 specification and IJG JPEG Library accept different
-    sets of color spaces, so verify that our image belongs to the common subset
-    and map its photometry code, then initialize to handle subsampling and
-    optional JPEG Library YCbCr <-> RGB color-space conversion.
- */
-    switch (td->td_photometric)
-      {
-        case PHOTOMETRIC_YCBCR     :
-
-       /* ISO IS 10918-1 requires that JPEG subsampling factors be 1-4, but
-          TIFF Version 6.0 is more restrictive: only 1, 2, and 4 are allowed.
-       */
-          if (   (   td->td_ycbcrsubsampling[0] == 1
-                  || td->td_ycbcrsubsampling[0] == 2
-                  || td->td_ycbcrsubsampling[0] == 4
-                 )
-              && (   td->td_ycbcrsubsampling[1] == 1
-                  || td->td_ycbcrsubsampling[1] == 2
-                  || td->td_ycbcrsubsampling[1] == 4
-                 )
-             )
-            sp->cinfo.c.raw_data_in =
-              ( (sp->h_sampling = td->td_ycbcrsubsampling[0]) << 3
-              | (sp->v_sampling = td->td_ycbcrsubsampling[1])
-              ) != 011;
-          else
-            {
-              TIFFError(module,bad_subsampling);
-              status = 0;
-            };
-
-       /* A ReferenceBlackWhite field MUST be present, since the default value
-          is inapproriate for YCbCr.  Fill in the proper value if the
-          application didn't set it.
-       */
-          if (!TIFFFieldSet(tif,FIELD_REFBLACKWHITE))
-            { float refbw[6];
-              long top = 1L << td->td_bitspersample;
- 
-              refbw[0] = 0;
-              refbw[1] = (float)(top-1L);
-              refbw[2] = (float)(top>>1);
-              refbw[3] = refbw[1];
-              refbw[4] = refbw[2];
-              refbw[5] = refbw[1];
-              TIFFSetField(tif,TIFFTAG_REFERENCEBLACKWHITE,refbw);
-            };
-          sp->cinfo.c.jpeg_color_space = JCS_YCbCr;
-          if (sp->jpegcolormode == JPEGCOLORMODE_RGB)
-            {
-              sp->cinfo.c.raw_data_in = FALSE;
-              sp->in_color_space = JCS_RGB;
-              break;
-            };
-          goto L2;
-        case PHOTOMETRIC_MINISBLACK:
-          sp->cinfo.c.jpeg_color_space = JCS_GRAYSCALE;
-          goto L1;
-        case PHOTOMETRIC_RGB       :
-          sp->cinfo.c.jpeg_color_space = JCS_RGB;
-          goto L1;
-        case PHOTOMETRIC_SEPARATED :
-          sp->cinfo.c.jpeg_color_space = JCS_CMYK;
-      L1: sp->jpegcolormode = JPEGCOLORMODE_RAW; /* No JPEG Lib. conversion */
-      L2: sp->cinfo.d.in_color_space = sp->cinfo.d.jpeg_color-space;
-          break;
-        default                    :
-          TIFFError(module,bad_photometry,td->td_photometric);
-          status = 0;
-      };
-    tif->tif_encoderow = tif->tif_encodestrip = tif->tif_encodetile =
-      sp->cinfo.c.raw_data_in ? OJPEGEncodeRaw : OJPEGEncode;
-    if (isTiled(tif))
-      { tsize_t size;
-
-#       ifdef C_LOSSLESS_SUPPORTED
-        if ((size = sp->v_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-#       else
-        if ((size = sp->v_sampling*DCTSIZE) < 16) size = 16;
-#       endif
-        if ((segment_height = td->td_tilelength) % size)
-          {
-            TIFFError(module,"JPEG tile height must be multiple of %d",size);
-            status = 0;
-          };
-#       ifdef C_LOSSLESS_SUPPORTED
-        if ((size = sp->h_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-#       else
-        if ((size = sp->h_sampling*DCTSIZE) < 16) size = 16;
-#       endif
-        if ((segment_width = td->td_tilewidth) % size)
-          {
-            TIFFError(module,"JPEG tile width must be multiple of %d",size);
-            status = 0;
-          };
-        sp->bytesperline = TIFFTileRowSize(tif);
-      }
-    else
-      { tsize_t size;
-
-#       ifdef C_LOSSLESS_SUPPORTED
-        if ((size = sp->v_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-#       else
-        if ((size = sp->v_sampling*DCTSIZE) < 16) size = 16;
-#       endif
-        if (td->td_rowsperstrip < (segment_height = td->td_imagelength))
-          {
-            if (td->td_rowsperstrip % size)
-              {
-                TIFFError(module,"JPEG RowsPerStrip must be multiple of %d",size);
-                status = 0;
-              };
-            segment_height = td->td_rowsperstrip;
-          };
-        segment_width = td->td_imagewidth;
-        sp->bytesperline = tif->tif_scanlinesize;
-      };
-    if (segment_width > 65535 || segment_height > 65535)
-      {
-        TIFFError(module,"Strip/tile too large for JPEG");
-        status = 0;
-      };
-
- /* Initialize all JPEG parameters to default values.  Note that the JPEG
-    Library's "jpeg_set_defaults()" method needs legal values for the
-    "in_color_space" and "input_components" fields.
- */
-    sp->cinfo.c.input_components = 1; /* Default for JCS_UNKNOWN */
-    if (!CALLVJPEG(sp,jpeg_set_defaults(&sp->cinfo.c))) status = 0;
-    switch (sp->jpegtablesmode & (JPEGTABLESMODE_HUFF|JPEGTABLESMODE_QUANT))
-      { register JHUFF_TBL *htbl;
-        register JQUANT_TBL *qtbl;
-
-        case 0                                       :
-          sp->cinfo.c.optimize_coding = TRUE;
-        case JPEGTABLESMODE_HUFF                     :
-          if (!CALLVJPEG(sp,jpeg_set_quality(&sp->cinfo.c,sp->jpegquality,FALSE)))
-            return 0;
-          if (qtbl = sp->cinfo.c.quant_tbl_ptrs[0]) qtbl->sent_table = FALSE;
-          if (qtbl = sp->cinfo.c.quant_tbl_ptrs[1]) qtbl->sent_table = FALSE;
-          goto L3;
-        case JPEGTABLESMODE_QUANT                    :
-          sp->cinfo.c.optimize_coding = TRUE;
-
-       /* We do not support application-supplied JPEG tables, so mark the field
-          "not present".
-       */
-      L3: TIFFClrFieldBit(tif,FIELD_JPEGTABLES);
-          break;
-        case JPEGTABLESMODE_HUFF|JPEGTABLESMODE_QUANT:
-          if (   !CALLVJPEG(sp,jpeg_set_quality(&sp->cinfo.c,sp->jpegquality,FALSE))
-              || !CALLVJPEG(sp,jpeg_suppress_tables(&sp->cinfo.c,TRUE))
-             )
-            {
-              status = 0;
-              break;
-            };
-          if (qtbl = sp->cinfo.c.quant_tbl_ptrs[0]) qtbl->sent_table = FALSE;
-          if (htbl = sp->cinfo.c.dc_huff_tbl_ptrs[0]) htbl->sent_table = FALSE;
-          if (htbl = sp->cinfo.c.ac_huff_tbl_ptrs[0]) htbl->sent_table = FALSE;
-          if (sp->cinfo.c.jpeg_color_space == JCS_YCbCr)
-            {
-              if (qtbl = sp->cinfo.c.quant_tbl_ptrs[1])
-                qtbl->sent_table = FALSE;
-              if (htbl = sp->cinfo.c.dc_huff_tbl_ptrs[1])
-                htbl->sent_table = FALSE;
-              if (htbl = sp->cinfo.c.ac_huff_tbl_ptrs[1])
-                htbl->sent_table = FALSE;
-            };
-          if (   TIFFojpeg_tables_dest(sp,tif)
-              && CALLVJPEG(sp,jpeg_write_tables(&sp->cinfo.c))
-             )
-            {
-    
-           /* Mark the field "present".  We can't use "TIFFSetField()" because
-              "BEENWRITING" is already set!
-           */
-              TIFFSetFieldBit(tif,FIELD_JPEGTABLES);
-              tif->tif_flags |= TIFF_DIRTYDIRECT;
-            }
-          else status = 0;
-      };
-    if (   sp->cinfo.c.raw_data_in
-        && !alloc_downsampled_buffers(tif,sp->cinfo.c.comp_info,
-                                      sp->cinfo.c.num_components)
-       ) status = 0;
-    if (status == 0) return 0; /* If TIFF errors, don't bother to continue */
- /* Grab parameters that are same for all strips/tiles. */
-
-    sp->dest.init_destination = std_init_destination;
-    sp->dest.empty_output_buffer = std_empty_output_buffer;
-    sp->dest.term_destination = std_term_destination;
-    sp->cinfo.c.dest = &sp->dest;
-    sp->cinfo.c.data_precision = td->td_bitspersample;
-    sp->cinfo.c.write_JFIF_header = /* Don't write extraneous markers */
-    sp->cinfo.c.write_Adobe_marker = FALSE;
-    sp->cinfo.c.image_width = segment_width;
-    sp->cinfo.c.image_height = segment_height;
-    sp->cinfo.c.comp_info[0].h_samp_factor =
-    sp->cinfo.c.comp_info[0].v_samp_factor = 1;
-    return CALLVJPEG(sp,jpeg_start_compress(&sp->cinfo.c,FALSE));
-#   undef td
-  }
-
-static int
-OJPEGPreEncode(register TIFF *tif,tsample_t s)
-  { register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
- /* If we are about to write the first row of an image plane, which should
-    coincide with a JPEG "scan", reset the JPEG Library's compressor.  Otherwise
-    let the compressor run "as is" and return a "success" status without further
-    ado.
- */
-    if (     (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
-           % td->td_stripsperimage
-        == 0
-       )
-      {
-        if (   (sp->cinfo.c.comp_info[0].component_id = s) == 1)
-            && sp->cinfo.c.jpeg_color_space == JCS_YCbCr
-           )
-          {
-            sp->cinfo.c.comp_info[0].quant_tbl_no =
-            sp->cinfo.c.comp_info[0].dc_tbl_no =
-            sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
-            sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
-            sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
-    
-         /* Scale expected strip/tile size to match a downsampled component. */
-    
-            sp->cinfo.c.image_width = TIFFhowmany(segment_width,sp->h_sampling);
-            sp->cinfo.c.image_height=TIFFhowmany(segment_height,sp->v_sampling);
-          };
-        sp->scancount = 0; /* Mark subsampling buffer(s) empty */
-      };
-    return 1;
-#   undef td
-  }
-
-static int
-OJPEGPostEncode(register TIFF *tif)
-  { register OJPEGState *sp = OJState(tif);
-
- /* Finish up at the end of a strip or tile. */
-
-    if (sp->scancount > 0) /* emit partial buffer of down-sampled data */
-      { JDIMENSION n;
-
-#       ifdef C_LOSSLESS_SUPPORTED
-        if (   sp->scancount < sp->cinfo.c.data_unit
-            && sp->cinfo.c.num_components > 0
-           )
-#       else
-        if (sp->scancount < DCTSIZE && sp->cinfo.c.num_components > 0)
-#       endif
-          { int ci = 0,                            /* Pad the data vertically */
-#           ifdef C_LOSSLESS_SUPPORTED
-                size = sp->cinfo.c.data_unit;
-#           else
-                size = DCTSIZE;
-#           endif
-            register jpeg_component_info *compptr = sp->cinfo.c.comp_info;
-
-            do
-#              ifdef C_LOSSLESS_SUPPORTED
-               { tsize_t row_width = compptr->width_in_data_units
-#              else
-                 tsize_t row_width = compptr->width_in_blocks
-#              endif
-                   *size*sizeof(JSAMPLE);
-                 int ypos = sp->scancount*compptr->v_samp_factor;
-
-                 do _TIFFmemcpy( (tdata_t)sp->ds_buffer[ci][ypos]
-                               , (tdata_t)sp->ds_buffer[ci][ypos-1]
-                               , row_width
-                               );
-                 while (++ypos < compptr->v_samp_factor*size);
-               }
-            while (++compptr,++ci < sp->cinfo.c.num_components);
-          };
-        n = sp->cinfo.c.max_v_samp_factor*size;
-        if (CALLJPEG(sp,-1,jpeg_write_raw_data(&sp->cinfo.c,sp->ds_buffer,n)) != n)
-          return 0;
-      };
-    return CALLVJPEG(sp,jpeg_finish_compress(&sp->cinfo.c));
-  }
-#endif /* never */
-
-/* JPEG Decoding begins here. */
-
-/*ARGSUSED*/ static int
-OJPEGDecode(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
-  { tsize_t bytesperline = isTiled(tif)
-                         ? TIFFTileRowSize(tif)
-                         : tif->tif_scanlinesize,
-            rows;                          /* No. of unprocessed rows in file */
-    register OJPEGState *sp = OJState(tif);
-
- /* Decode a chunk of pixels, where the input data has not NOT been down-
-    sampled, or else the TIFF Library's client has used the "JPEGColorMode" TIFF
-    pseudo-tag to request that the JPEG Library do color-space conversion; this
-    is the normal case.  The data is expected to be read in scan-line multiples,
-    and this subroutine is called for both pixel-interleaved and separate color
-    planes.
-
-    WARNING:  Unlike "OJPEGDecodeRawContig()", below, the no. of Bytes in each
-              decoded row is calculated here as "bytesperline" instead of
-    using "sp->bytesperline", which might be a little smaller.  This can
-    occur for an old tiled image whose width isn't a multiple of 8 pixels.
-    That's illegal according to the TIFF Version 6 specification, but some
-    test files, like "zackthecat.tif", were built that way.  In those cases,
-    we want to embed the image's true width in our caller's buffer (which is
-    presumably allocated according to the expected tile width) by
-    effectively "padding" it with unused Bytes at the end of each row.
- */
-    if ( (cc /= bytesperline)      /* No. of complete rows in caller's buffer */
-       > (rows = sp->cinfo.d.output_height - sp->cinfo.d.output_scanline)
-       ) cc = rows;
-    while (--cc >= 0)
-      {
-        if (   CALLJPEG(sp,-1,jpeg_read_scanlines(&sp->cinfo.d,(JSAMPARRAY)&buf,1))
-            != 1
-           ) return 0;
-        buf += bytesperline;
-        ++tif->tif_row;
-      };
-
- /* BEWARE OF KLUDGE:  If our input file was produced by Microsoft's Wang
-                       Imaging for Windows application, the DC coefficients of
-    each JPEG image component (Y,Cb,Cr) must be reset at the end of each TIFF
-    "strip", and any JPEG data bits remaining in the current Byte of the
-    decoder's input buffer must be discarded.  To do so, we create an "ad hoc"
-    interface in the "jdhuff.c" module of IJG JPEG Library Version 6 (module
-    "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
-    invoke that interface here after decoding each "strip".
- */
-    if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
-    return 1;
-  }
-
-/*ARGSUSED*/ static int
-OJPEGDecodeRawContig(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
-  { tsize_t rows;                          /* No. of unprocessed rows in file */
-    JDIMENSION lines_per_MCU, size;
-    register OJPEGState *sp = OJState(tif);
-
- /* Decode a chunk of pixels, where the input data has pixel-interleaved color
-    planes, some of which have been down-sampled, but the TIFF Library's client
-    has NOT used the "JPEGColorMode" TIFF pseudo-tag to request that the JPEG
-    Library do color-space conversion.  In other words, we must up-sample/
-    expand/duplicate image components according to the image's sampling factors,
-    without changing its color space.  The data is expected to be read in scan-
-    line multiples.
- */
-    if ( (cc /= sp->bytesperline)  /* No. of complete rows in caller's buffer */
-       > (rows = sp->cinfo.d.output_height - sp->cinfo.d.output_scanline)
-       ) cc = rows;
-    lines_per_MCU = sp->cinfo.d.max_v_samp_factor
-#   ifdef D_LOSSLESS_SUPPORTED
-                  * (size = sp->cinfo.d.min_codec_data_unit);
-#   else
-                  * (size = DCTSIZE);
-#   endif
-    while (--cc >= 0)
-      { int clumpoffset, ci;
-        register jpeg_component_info *compptr;
-
-        if (sp->scancount >= size) /* reload downsampled-data buffers */
-          {
-            if (   CALLJPEG(sp,-1,jpeg_read_raw_data(&sp->cinfo.d,sp->ds_buffer,lines_per_MCU))
-                != lines_per_MCU
-               ) return 0;
-            sp->scancount = 0;
-          };
-
-     /* The fastest way to separate the data is: make 1 pass over the scan
-        line for each row of each component.
-     */
-        clumpoffset = ci = 0;
-        compptr = sp->cinfo.d.comp_info;
-        do
-          { int ypos = 0;
-
-            if (compptr->h_samp_factor == 1) /* fast path */
-              do
-                { register JSAMPLE *inptr =
-                    sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos],
-                                   *outptr = (JSAMPLE *)buf + clumpoffset;
-                  register int clumps_per_line = compptr->downsampled_width;
-
-                  do *outptr = *inptr++;
-                  while ((outptr += sp->samplesperclump),--clumps_per_line > 0);
-                }
-              while ( (clumpoffset += compptr->h_samp_factor)
-                    , ++ypos < compptr->v_samp_factor
-                    );
-            else /* general case */
-              do
-                { register JSAMPLE *inptr =
-                    sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos],
-                                   *outptr = (JSAMPLE *)buf + clumpoffset;
-                  register int clumps_per_line = compptr->downsampled_width;
-
-                  do
-                    { register int xpos = 0;
-
-                      do outptr[xpos] = *inptr++;
-                      while (++xpos < compptr->h_samp_factor);
-                    }
-                  while ((outptr += sp->samplesperclump),--clumps_per_line > 0);
-                }
-              while ( (clumpoffset += compptr->h_samp_factor)
-                    , ++ypos < compptr->v_samp_factor
-                    );
-          }
-        while (++compptr,++ci < sp->cinfo.d.num_components);
-        ++sp->scancount;
-        buf += sp->bytesperline;
-        ++tif->tif_row;
-      };
-
- /* BEWARE OF KLUDGE:  If our input file was produced by Microsoft's Wang
-                       Imaging for Windows application, the DC coefficients of
-    each JPEG image component (Y,Cb,Cr) must be reset at the end of each TIFF
-    "strip", and any JPEG data bits remaining in the current Byte of the
-    decoder's input buffer must be discarded.  To do so, we create an "ad hoc"
-    interface in the "jdhuff.c" module of IJG JPEG Library Version 6 (module
-    "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
-    invoke that interface here after decoding each "strip".
- */
-    if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
-    return 1;
-  }
-
-/*ARGSUSED*/ static int
-OJPEGDecodeRawSeparate(TIFF *tif,register tidata_t buf,tsize_t cc,tsample_t s)
-  { tsize_t rows;                          /* No. of unprocessed rows in file */
-    JDIMENSION lines_per_MCU,
-               size,                                             /* ...of MCU */
-               v;                   /* Component's vertical up-sampling ratio */
-    register OJPEGState *sp = OJState(tif);
-    register jpeg_component_info *compptr = sp->cinfo.d.comp_info + s;
-
- /* Decode a chunk of pixels, where the input data has separate color planes,
-    some of which have been down-sampled, but the TIFF Library's client has NOT
-    used the "JPEGColorMode" TIFF pseudo-tag to request that the JPEG Library
-    do color-space conversion.  The data is expected to be read in scan-line
-    multiples.
- */
-    v = sp->cinfo.d.max_v_samp_factor/compptr->v_samp_factor;
-    if ( (cc /= compptr->downsampled_width) /* No. of rows in caller's buffer */
-       > (rows = (sp->cinfo.d.output_height-sp->cinfo.d.output_scanline+v-1)/v)
-       ) cc = rows; /* No. of rows of "clumps" to read */
-    lines_per_MCU = sp->cinfo.d.max_v_samp_factor
-#   ifdef D_LOSSLESS_SUPPORTED
-                  * (size = sp->cinfo.d.min_codec_data_unit);
-#   else
-                  * (size = DCTSIZE);
-#   endif
- L: if (sp->scancount >= size) /* reload downsampled-data buffers */
-      {
-        if (   CALLJPEG(sp,-1,jpeg_read_raw_data(&sp->cinfo.d,sp->ds_buffer,lines_per_MCU))
-            != lines_per_MCU
-           ) return 0;
-        sp->scancount = 0;
-      };
-    rows = 0;
-    do
-      { register JSAMPLE *inptr =
-          sp->ds_buffer[s][sp->scancount*compptr->v_samp_factor + rows];
-        register int clumps_per_line = compptr->downsampled_width;
-
-        do *buf++ = *inptr++; while (--clumps_per_line > 0); /* Copy scanline */
-        tif->tif_row += v;
-        if (--cc <= 0) return 1; /* End of caller's buffer? */
-      }
-    while (++rows < compptr->v_samp_factor);
-    ++sp->scancount;
-    goto L;
-  }
-
-/* "OJPEGSetupDecode()" temporarily forces the JPEG Library to use the following
-   subroutine as a "dummy" input reader in order to fool the library into
-   thinking that it has read the image's first "Start of Scan" (SOS) marker, so
-   that it initializes accordingly.
-*/
-/*ARGSUSED*/ METHODDEF(int)
-fake_SOS_marker(j_decompress_ptr cinfo){return JPEG_REACHED_SOS;}
-
-/*ARGSUSED*/ METHODDEF(int)
-suspend(j_decompress_ptr cinfo){return JPEG_SUSPENDED;}
-
-/* The JPEG Library's "null" color-space converter actually re-packs separate
-   color planes (it's native image representation) into a pixel-interleaved,
-   contiguous plane.  But if our TIFF Library client is tryng to process a
-   PLANARCONFIG_SEPARATE image, we don't want that; so here are modifications of
-   code in the JPEG Library's "jdcolor.c" file, which simply copy Bytes to a
-   color plane specified by the current JPEG "scan".
-*/
-METHODDEF(void)
-ycc_rgb_convert(register j_decompress_ptr cinfo,JSAMPIMAGE in,JDIMENSION row,
-                register JSAMPARRAY out,register int nrows)
-  { typedef struct                /* "jdcolor.c" color-space conversion state */
-      {
-
-     /* WARNING:  This declaration is ugly and dangerous!  It's supposed to be
-                  private to the JPEG Library's "jdcolor.c" module, but we also
-        need it here.  Since the library's copy might change without notice, be
-        sure to keep this one synchronized or the following code will break!
-     */
-        struct jpeg_color_deconverter pub; /* Public fields */
-     /* Private state for YCC->RGB conversion */
-        int *Cr_r_tab,   /* ->Cr to R conversion table */
-            *Cb_b_tab;   /* ->Cb to B conversion table */
-        INT32 *Cr_g_tab, /* ->Cr to G conversion table */
-              *Cb_g_tab; /* ->Cb to G conversion table */
-      } *my_cconvert_ptr;
-    my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
-    JSAMPARRAY irow0p = in[0] + row;
-    register JSAMPLE *range_limit = cinfo->sample_range_limit;
-    register JSAMPROW outp, Y;
-
-    switch (cinfo->output_scan_number - 1)
-      { JSAMPARRAY irow1p, irow2p;
-        register INT32 *table0, *table1;
-        SHIFT_TEMPS
-
-        case RGB_RED  : irow2p = in[2] + row;
-                        table0 = (INT32 *)cconvert->Cr_r_tab;
-                        while (--nrows >= 0)
-                          { register JSAMPROW Cr = *irow2p++;
-                             register int i = cinfo->output_width;
-
-                             Y = *irow0p++;
-                             outp = *out++;
-                             while (--i >= 0)
-                               *outp++ = range_limit[*Y++ + table0[*Cr++]];
-                          };
-                        return;
-        case RGB_GREEN: irow1p = in[1] + row;
-                        irow2p = in[2] + row;
-                        table0 = cconvert->Cb_g_tab;
-                        table1 = cconvert->Cr_g_tab;
-                        while (--nrows >= 0)
-                          { register JSAMPROW Cb = *irow1p++,
-                                              Cr = *irow2p++;
-                             register int i = cinfo->output_width;
-
-                             Y = *irow0p++;
-                             outp = *out++;
-                             while (--i >= 0)
-                               *outp++ =
-                                 range_limit[ *Y++
-                                            + RIGHT_SHIFT(table0[*Cb++]+table1[*Cr++],16)
-                                            ];
-                          };
-                        return;
-        case RGB_BLUE : irow1p = in[1] + row;
-                        table0 = (INT32 *)cconvert->Cb_b_tab;
-                        while (--nrows >= 0)
-                          { register JSAMPROW Cb = *irow1p++;
-                             register int i = cinfo->output_width;
-
-                             Y = *irow0p++;
-                             outp = *out++;
-                             while (--i >= 0)
-                               *outp++ = range_limit[*Y++ + table0[*Cb++]];
-                          }
-      }
-  }
-
-METHODDEF(void)
-null_convert(register j_decompress_ptr cinfo,JSAMPIMAGE in,JDIMENSION row,
-             register JSAMPARRAY out,register int nrows)
-  { register JSAMPARRAY irowp = in[cinfo->output_scan_number - 1] + row;
-
-    while (--nrows >= 0) _TIFFmemcpy(*out++,*irowp++,cinfo->output_width);
-  }
-
-static int
-OJPEGSetupDecode(register TIFF *tif)
-  { static char module[]={"OJPEGSetupDecode"};
-    J_COLOR_SPACE jpeg_color_space,   /* Color space of JPEG-compressed image */
-                  out_color_space;       /* Color space of decompressed image */
-    uint32 segment_width;
-    int status = 1;                              /* Assume success by default */
-    boolean downsampled_output=FALSE, /* <=> Want JPEG Library's "raw" image? */
-            is_JFIF;                                       /* <=> JFIF image? */
-    register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
- /* Verify miscellaneous parameters.  This will need work if the TIFF Library
-    ever supports different depths for different components, or if the JPEG
-    Library ever supports run-time depth selection.  Neither seems imminent.
- */
-    if (td->td_bitspersample != sp->cinfo.d.data_precision)
-      {
-        TIFFError(module,bad_bps,td->td_bitspersample);
-        status = 0;
-      };
-
- /* The TIFF Version 6.0 specification and IJG JPEG Library accept different
-    sets of color spaces, so verify that our image belongs to the common subset
-    and map its photometry code, then initialize to handle subsampling and
-    optional JPEG Library YCbCr <-> RGB color-space conversion.
- */
-    switch (td->td_photometric)
-      {
-        case PHOTOMETRIC_YCBCR     :
-
-       /* ISO IS 10918-1 requires that JPEG subsampling factors be 1-4, but
-          TIFF Version 6.0 is more restrictive: only 1, 2, and 4 are allowed.
-       */
-          if (   (   td->td_ycbcrsubsampling[0] == 1
-                  || td->td_ycbcrsubsampling[0] == 2
-                  || td->td_ycbcrsubsampling[0] == 4
-                 )
-              && (   td->td_ycbcrsubsampling[1] == 1
-                  || td->td_ycbcrsubsampling[1] == 2
-                  || td->td_ycbcrsubsampling[1] == 4
-                 )
-             )
-            downsampled_output =
-              (
-                (sp->h_sampling = td->td_ycbcrsubsampling[0]) << 3
-              | (sp->v_sampling = td->td_ycbcrsubsampling[1])
-              ) != 011;
-          else
-            {
-              TIFFError(module,bad_subsampling);
-              status = 0;
-            };
-          jpeg_color_space = JCS_YCbCr;
-          if (sp->jpegcolormode == JPEGCOLORMODE_RGB)
-            {
-              downsampled_output = FALSE;
-              out_color_space = JCS_RGB;
-              break;
-            };
-          goto L2;
-        case PHOTOMETRIC_MINISBLACK:
-          jpeg_color_space = JCS_GRAYSCALE;
-          goto L1;
-        case PHOTOMETRIC_RGB       :
-          jpeg_color_space = JCS_RGB;
-          goto L1;
-        case PHOTOMETRIC_SEPARATED :
-          jpeg_color_space = JCS_CMYK;
-      L1: sp->jpegcolormode = JPEGCOLORMODE_RAW; /* No JPEG Lib. conversion */
-      L2: out_color_space = jpeg_color_space;
-          break;
-        default                    :
-          TIFFError(module,bad_photometry,td->td_photometric);
-          status = 0;
-      };
-    if (status == 0) return 0; /* If TIFF errors, don't bother to continue */
-
- /* Set parameters that are same for all strips/tiles. */
-
-    sp->cinfo.d.src = &sp->src;
-    sp->src.init_source = std_init_source;
-    sp->src.fill_input_buffer = std_fill_input_buffer;
-    sp->src.skip_input_data = std_skip_input_data;
-    sp->src.resync_to_restart = jpeg_resync_to_restart;
-    sp->src.term_source = std_term_source;
-
- /* BOGOSITY ALERT!  The Wang Imaging application for Microsoft Windows produces
-                     images containing "JPEGInterchangeFormat[Length]" TIFF
-    records that resemble JFIF-in-TIFF encapsulations but, in fact, violate the
-    TIFF Version 6 specification in several ways; nevertheless, we try to handle
-    them gracefully because there are apparently a lot of them around.  The
-    purported "JFIF" data stream in one of these files vaguely resembles a JPEG
-    "tables only" data stream, except that there's no trailing EOI marker.  The
-    rest of the JPEG data stream lies in a discontiguous file region, identified
-    by the 0th Strip offset (which is *also* illegal!), where it begins with an
-    SOS marker and apparently continues to the end of the file.  There is no
-    trailing EOI marker here, either.
- */
-    is_JFIF = !sp->is_WANG && TIFFFieldSet(tif,FIELD_JPEGIFOFFSET);
-
- /* Initialize decompression parameters that won't be overridden by JPEG Library
-    defaults set during the "jpeg_read_header()" call, below.
- */
-    segment_width = td->td_imagewidth;
-    if (isTiled(tif))
-      {
-        if (sp->is_WANG) /* we don't know how to handle it */
-          {
-            TIFFError(module,"Tiled Wang image not supported");
-            return 0;
-          };
-
-     /* BOGOSITY ALERT!  "TIFFTileRowSize()" seems to work fine for modern JPEG-
-                         in-TIFF encapsulations where the image width--like the
-        tile width--is a multiple of 8 or 16 pixels.  But image widths and
-        heights are aren't restricted to 8- or 16-bit multiples, and we need
-        the exact Byte count of decompressed scan lines when we call the JPEG
-        Library.  At least one old file ("zackthecat.tif") in the TIFF Library
-        test suite has widths and heights slightly less than the tile sizes, and
-        it apparently used the bogus computation below to determine the number
-        of Bytes per scan line (was this due to an old, broken version of
-        "TIFFhowmany()"?).  Before we get here, "OJPEGSetupDecode()" verified
-        that our image uses 8-bit samples, so the following check appears to
-        return the correct answer in all known cases tested to date.
-     */
-        if (is_JFIF || (segment_width & 7) == 0)
-          sp->bytesperline = TIFFTileRowSize(tif); /* Normal case */
-        else
-          {
-            /* Was the file-encoder's segment-width calculation bogus? */
-            segment_width = (segment_width/sp->h_sampling + 1) * sp->h_sampling;
-            sp->bytesperline = segment_width * td->td_samplesperpixel;
-          }
-      }
-    else sp->bytesperline = TIFFVStripSize(tif,1);
-
- /* BEWARE OF KLUDGE:  If we have JPEG Interchange File Format (JFIF) image,
-                       then we want to read "metadata" in the bit-stream's
-    header and validate it against corresponding information in TIFF records.
-    But if we have a *really old* JPEG file that's not JFIF, then we simply
-    assign TIFF-record values to JPEG Library variables without checking.
- */
-    if (is_JFIF) /* JFIF image */
-      { unsigned char *end_of_data;
-        int subsampling_factors;
-        register unsigned char *p;
-        register int i;
-
-     /* WARNING:  Although the image file contains a JFIF bit stream, it might
-                  also contain some old TIFF records causing "OJPEGVSetField()"
-        to have allocated quantization or Huffman decoding tables.  But when the
-        JPEG Library reads and parses the JFIF header below, it reallocate these
-        tables anew without checking for "dangling" pointers, thereby causing a
-        memory "leak".  We have enough information to potentially deallocate the
-        old tables here, but unfortunately JPEG Library Version 6B uses a "pool"
-        allocator for small objects, with no deallocation procedure; instead, it
-        reclaims a whole pool when an image is closed/destroyed, so well-behaved
-        TIFF client applications (i.e., those which close their JPEG images as
-        soon as they're no longer needed) will waste memory for a short time but
-        recover it eventually.  But ill-behaved TIFF clients (i.e., those which
-        keep many JPEG images open gratuitously) can exhaust memory prematurely.
-        If the JPEG Library ever implements a deallocation procedure, insert
-        this clean-up code:
-     */
-#       ifdef someday
-        if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) /* free quant. tables */
-          { register int i = 0;
-
-            do
-              { register JQUANT_TBL *q;
-
-                if (q = sp->cinfo.d.quant_tbl_ptrs[i])
-                  {
-                    jpeg_free_small(&sp->cinfo.comm,q,sizeof *q);
-                    sp->cinfo.d.quant_tbl_ptrs[i] = 0;
-                  }
-              }
-            while (++i < NUM_QUANT_TBLS);
-          };
-        if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) /* free Huffman tables */
-          { register int i = 0;
-
-            do
-              { register JHUFF_TBL *h;
-
-                if (h = sp->cinfo.d.dc_huff_tbl_ptrs[i])
-                  {
-                    jpeg_free_small(&sp->cinfo.comm,h,sizeof *h);
-                    sp->cinfo.d.dc_huff_tbl_ptrs[i] = 0;
-                  };
-                if (h = sp->cinfo.d.ac_huff_tbl_ptrs[i])
-                  {
-                    jpeg_free_small(&sp->cinfo.comm,h,sizeof *h);
-                    sp->cinfo.d.ac_huff_tbl_ptrs[i] = 0;
-                  }
-              }
-            while (++i < NUM_HUFF_TBLS);
-          };
-#       endif /* someday */
-
-     /* Since we might someday wish to try rewriting "old format" JPEG-in-TIFF
-        encapsulations in "new format" files, try to synthesize the value of a
-        modern "JPEGTables" TIFF record by scanning the JPEG data from just past
-        the "Start of Information" (SOI) marker until something other than a
-        legitimate "table" marker is found, as defined in ISO IS 10918-1
-        Appending B.2.4; namely:
-
-        -- Define Quantization Table (DQT)
-        -- Define Huffman Table (DHT)
-        -- Define Arithmetic Coding table (DAC)
-        -- Define Restart Interval (DRI)
-        -- Comment (COM)
-        -- Application data (APPn)
-
-        For convenience, we also accept "Expansion" (EXP) markers, although they
-        are apparently not a part of normal "table" data.
-     */
-        sp->jpegtables = p = (unsigned char *)sp->src.next_input_byte;
-        end_of_data = p + sp->src.bytes_in_buffer;
-        p += 2;
-        while (p < end_of_data && p[0] == 0xFF)
-          switch (p[1])
-            {
-              default  : goto L;
-              case 0xC0: /* SOF0  */
-              case 0xC1: /* SOF1  */
-              case 0xC2: /* SOF2  */
-              case 0xC3: /* SOF3  */
-              case 0xC4: /* DHT   */
-              case 0xC5: /* SOF5  */
-              case 0xC6: /* SOF6  */
-              case 0xC7: /* SOF7  */
-              case 0xC9: /* SOF9  */
-              case 0xCA: /* SOF10 */
-              case 0xCB: /* SOF11 */
-              case 0xCC: /* DAC   */
-              case 0xCD: /* SOF13 */
-              case 0xCE: /* SOF14 */
-              case 0xCF: /* SOF15 */
-              case 0xDB: /* DQT   */
-              case 0xDD: /* DRI   */
-              case 0xDF: /* EXP   */
-              case 0xE0: /* APP0  */
-              case 0xE1: /* APP1  */
-              case 0xE2: /* APP2  */
-              case 0xE3: /* APP3  */
-              case 0xE4: /* APP4  */
-              case 0xE5: /* APP5  */
-              case 0xE6: /* APP6  */
-              case 0xE7: /* APP7  */
-              case 0xE8: /* APP8  */
-              case 0xE9: /* APP9  */
-              case 0xEA: /* APP10 */
-              case 0xEB: /* APP11 */
-              case 0xEC: /* APP12 */
-              case 0xED: /* APP13 */
-              case 0xEE: /* APP14 */
-              case 0xEF: /* APP15 */
-              case 0xFE: /* COM   */
-                         p += (p[2] << 8 | p[3]) + 2;
-            };
-     L: if (p - (unsigned char *)sp->jpegtables > 2) /* fake "JPEGTables" */
-          {
-
-         /* In case our client application asks, pretend that this image file
-            contains a modern "JPEGTables" TIFF record by copying to a buffer
-            the initial part of the JFIF bit-stream that we just scanned, from
-            the SOI marker through the "metadata" tables, then append an EOI
-            marker and flag the "JPEGTables" TIFF record as "present".
-         */
-            sp->jpegtables_length = p - (unsigned char*)sp->jpegtables + 2;
-            p = sp->jpegtables;
-            if (!(sp->jpegtables = _TIFFmalloc(sp->jpegtables_length)))
-              {
-                TIFFError(module,no_jtable_space);
-                return 0;
-              };
-            _TIFFmemcpy(sp->jpegtables,p,sp->jpegtables_length-2);
-            p = (unsigned char *)sp->jpegtables + sp->jpegtables_length;
-            p[-2] = 0xFF; p[-1] = JPEG_EOI; /* Append EOI marker */
-            TIFFSetFieldBit(tif,FIELD_JPEGTABLES);
-            tif->tif_flags |= TIFF_DIRTYDIRECT;
-          }
-        else sp->jpegtables = 0; /* Don't simulate "JPEGTables" */
-        if (   CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,TRUE))
-            != JPEG_HEADER_OK
-           ) return 0;
-        if (   sp->cinfo.d.image_width  != segment_width
-            || sp->cinfo.d.image_height != td->td_imagelength 
-           )
-          {
-            TIFFError(module,"Improper JPEG strip/tile size");
-            return 0;
-          };
-        if (sp->cinfo.d.num_components != td->td_samplesperpixel)
-          {
-            TIFFError(module,"Improper JPEG component count");
-            return 0;
-          };
-        if (sp->cinfo.d.data_precision != td->td_bitspersample)
-          {
-            TIFFError(module,"Improper JPEG data precision");
-            return 0;
-          };
-
-     /* Check that JPEG image components all have the same subsampling factors
-        declared (or defaulted) in the TIFF file, since TIFF Version 6.0 is more
-        restrictive than JPEG:  Only the 0th component may have horizontal and
-        vertical subsampling factors other than <1,1>.
-     */
-        subsampling_factors = sp->h_sampling << 3 | sp->v_sampling;
-        i = 0;
-        do
-          {
-            if (   ( sp->cinfo.d.comp_info[i].h_samp_factor << 3
-                   | sp->cinfo.d.comp_info[i].v_samp_factor
-                   )
-                != subsampling_factors
-               )
-              {
-                TIFFError(module,"Improper JPEG subsampling factors");
-                return 0;
-              };
-            subsampling_factors = 011; /* Required for image components > 0 */
-          }
-        while (++i < sp->cinfo.d.num_components);
-      }
-    else /* not JFIF image */
-      { int (*save)(j_decompress_ptr cinfo) = sp->cinfo.d.marker->read_markers;
-        register int i;
-
-     /* We're not assuming that this file's JPEG bit stream has any header
-        "metadata", so fool the JPEG Library into thinking that we read a
-        "Start of Input" (SOI) marker and a "Start of Frame" (SOFx) marker, then
-        force it to read a simulated "Start of Scan" (SOS) marker when we call
-        "jpeg_read_header()" below.  This should cause the JPEG Library to
-        establish reasonable defaults.
-     */
-        sp->cinfo.d.marker->saw_SOI =       /* Pretend we saw SOI marker */
-        sp->cinfo.d.marker->saw_SOF = TRUE; /* Pretend we saw SOF marker */
-        sp->cinfo.d.marker->read_markers =
-          sp->is_WANG ? suspend : fake_SOS_marker;
-        sp->cinfo.d.global_state = DSTATE_INHEADER;
-        sp->cinfo.d.Se = DCTSIZE2-1; /* Suppress JPEG Library warning */
-        sp->cinfo.d.image_width  = segment_width;
-        sp->cinfo.d.image_height = td->td_imagelength;
-
-     /* The following color-space initialization, including the complicated
-        "switch"-statement below, essentially duplicates the logic used by the
-        JPEG Library's "jpeg_init_colorspace()" subroutine during compression.
-     */
-        sp->cinfo.d.num_components = td->td_samplesperpixel;
-        sp->cinfo.d.comp_info = (jpeg_component_info *)
-          (*sp->cinfo.d.mem->alloc_small)
-            ( &sp->cinfo.comm
-            , JPOOL_IMAGE
-            , sp->cinfo.d.num_components * sizeof *sp->cinfo.d.comp_info
-            );
-        i = 0;
-        do
-          {
-            sp->cinfo.d.comp_info[i].component_index = i;
-            sp->cinfo.d.comp_info[i].component_needed = TRUE;
-            sp->cinfo.d.cur_comp_info[i] = &sp->cinfo.d.comp_info[i];
-          }
-        while (++i < sp->cinfo.d.num_components);
-        switch (jpeg_color_space)
-          {
-            case JCS_UNKNOWN  :
-              i = 0;
-              do
-                {
-                  sp->cinfo.d.comp_info[i].component_id = i;
-                  sp->cinfo.d.comp_info[i].h_samp_factor =
-                  sp->cinfo.d.comp_info[i].v_samp_factor = 1;
-                }
-              while (++i < sp->cinfo.d.num_components);
-              break;
-            case JCS_GRAYSCALE:
-              sp->cinfo.d.comp_info[0].component_id =
-              sp->cinfo.d.comp_info[0].h_samp_factor =
-              sp->cinfo.d.comp_info[0].v_samp_factor = 1;
-              break;
-            case JCS_RGB      :
-              sp->cinfo.d.comp_info[0].component_id = 'R';
-              sp->cinfo.d.comp_info[1].component_id = 'G';
-              sp->cinfo.d.comp_info[2].component_id = 'B';
-              i = 0;
-              do sp->cinfo.d.comp_info[i].h_samp_factor =
-                 sp->cinfo.d.comp_info[i].v_samp_factor = 1;
-              while (++i < sp->cinfo.d.num_components);
-              break;
-            case JCS_CMYK     :
-              sp->cinfo.d.comp_info[0].component_id = 'C';
-              sp->cinfo.d.comp_info[1].component_id = 'M';
-              sp->cinfo.d.comp_info[2].component_id = 'Y';
-              sp->cinfo.d.comp_info[3].component_id = 'K';
-              i = 0;
-              do sp->cinfo.d.comp_info[i].h_samp_factor =
-                 sp->cinfo.d.comp_info[i].v_samp_factor = 1;
-              while (++i < sp->cinfo.d.num_components);
-              break;
-            case JCS_YCbCr    :
-              i = 0;
-              do
-                {
-                  sp->cinfo.d.comp_info[i].component_id = i+1;
-                  sp->cinfo.d.comp_info[i].h_samp_factor =
-                  sp->cinfo.d.comp_info[i].v_samp_factor = 1;
-                  sp->cinfo.d.comp_info[i].quant_tbl_no =
-                  sp->cinfo.d.comp_info[i].dc_tbl_no =
-                  sp->cinfo.d.comp_info[i].ac_tbl_no = i > 0;
-                }
-              while (++i < sp->cinfo.d.num_components);
-              sp->cinfo.d.comp_info[0].h_samp_factor = sp->h_sampling;
-              sp->cinfo.d.comp_info[0].v_samp_factor = sp->v_sampling;
-          };
-        sp->cinfo.d.comps_in_scan = td->td_planarconfig == PLANARCONFIG_CONTIG
-                                  ? sp->cinfo.d.num_components
-                                  : 1;
-        i = CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,!sp->is_WANG));
-        sp->cinfo.d.marker->read_markers = save; /* Restore input method */
-        if (sp->is_WANG) /* produced by Wang Imaging on Microsoft Windows */
-          {
-            if (i != JPEG_SUSPENDED) return 0;
-
-         /* BOGOSITY ALERT!  Files prooduced by the Wang Imaging application for
-                             Microsoft Windows are a special--and, technically
-            illegal--case.  A JPEG SOS marker and rest of the data stream should
-            be located at the end of the file, in a position identified by the
-            0th Strip offset.
-         */
-            i = td->td_nstrips - 1;
-            sp->src.next_input_byte = tif->tif_base + td->td_stripoffset[0];
-            sp->src.bytes_in_buffer = td->td_stripoffset[i] -
-              td->td_stripoffset[0] + td->td_stripbytecount[i];
-            i = CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,TRUE));
-          };
-        if (i != JPEG_HEADER_OK) return 0;
-      };
-
- /* Some of our initialization must wait until the JPEG Library is initialized
-    above, in order to override its defaults.
- */
-    if (   (sp->cinfo.d.raw_data_out = downsampled_output)
-        && !alloc_downsampled_buffers(tif,sp->cinfo.d.comp_info,
-                                      sp->cinfo.d.num_components)
-       ) return 0;
-    sp->cinfo.d.jpeg_color_space = jpeg_color_space;
-    sp->cinfo.d.out_color_space = out_color_space;
-    sp->cinfo.d.dither_mode = JDITHER_NONE; /* Reduce image "noise" */
-    sp->cinfo.d.two_pass_quantize = FALSE;
-
- /* If the image consists of separate, discontiguous TIFF "samples" (= color
-    planes, hopefully = JPEG "scans"), then we must use the JPEG Library's
-    "buffered image" mode to decompress the entire image into temporary buffers,
-    because the JPEG Library must parse the entire JPEG bit-stream in order to
-    be satsified that it has a complete set of color components for each pixel,
-    but the TIFF Library must allow our client to extract 1 component at a time.
-    Initializing the JPEG Library's "buffered image" mode is tricky:  First, we
-    start its decompressor, then we tell the decompressor to "consume" (i.e.,
-    buffer) the entire bit-stream.
-
-    WARNING:  Disabling "fancy" up-sampling seems to slightly reduce "noise" for
-              certain old Wang Imaging files, but it absolutely *must* be
-    enabled if the image has separate color planes, since in that case, the JPEG
-    Library doesn't use an "sp->cinfo.d.cconvert" structure (so de-referencing
-    this pointer below will cause a fatal crash) but writing our own code to up-
-    sample separate color planes is too much work for right now.  Maybe someday?
- */
-    sp->cinfo.d.do_fancy_upsampling = /* Always let this default (to TRUE)? */
-    sp->cinfo.d.buffered_image = td->td_planarconfig == PLANARCONFIG_SEPARATE;
-    if (!CALLJPEG(sp,0,jpeg_start_decompress(&sp->cinfo.d))) return 0;
-    if (sp->cinfo.d.buffered_image) /* separate color planes */
-      {
-        if (sp->cinfo.d.raw_data_out)
-          tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
-            OJPEGDecodeRawSeparate;
-        else
-          {
-            tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
-              OJPEGDecode;
-
-         /* In JPEG Library Version 6B, color-space conversion isn't implemented
-            for separate color planes, so we must do it ourself if our TIFF
-            client doesn't want to:
-         */
-            sp->cinfo.d.cconvert->color_convert =
-              sp->cinfo.d.jpeg_color_space == sp->cinfo.d.out_color_space
-              ? null_convert : ycc_rgb_convert;
-          };
-    L3: switch (CALLJPEG(sp,0,jpeg_consume_input(&sp->cinfo.d)))
-          {
-            default              : goto L3;
-
-         /* If no JPEG "End of Information" (EOI) marker is found when bit-
-            stream parsing ends, check whether we have enough data to proceed
-            before reporting an error.
-         */
-            case JPEG_SUSPENDED  : if (  sp->cinfo.d.input_scan_number
-                                        *sp->cinfo.d.image_height
-                                       + sp->cinfo.d.input_iMCU_row
-                                        *sp->cinfo.d.max_v_samp_factor
-#                                       ifdef D_LOSSLESS_SUPPORTED
-                                        *sp->cinfo.d.data_units_in_MCU
-                                        *sp->cinfo.d.min_codec_data_unit
-#                                       else
-                                        *sp->cinfo.d.blocks_in_MCU
-                                        *DCTSIZE
-#                                       endif
-                                      < td->td_samplesperpixel
-                                       *sp->cinfo.d.image_height
-                                      )
-                                     {
-                                       TIFFError(tif->tif_name,
-                                         "Premature end of JPEG bit-stream");
-                                       return 0;
-                                     }
-            case JPEG_REACHED_EOI: ;
-          }
-      }
-    else /* pixel-interleaved color planes */
-      tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
-        downsampled_output ? OJPEGDecodeRawContig : OJPEGDecode;
-    return 1;
-#   undef td
-  }
-
-static int
-OJPEGPreDecode(register TIFF *tif,tsample_t s)
-  { register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
- /* If we are about to read the first row of an image plane (hopefully, these
-    are coincident with JPEG "scans"!), reset the JPEG Library's decompressor
-    appropriately.  Otherwise, let the decompressor run "as is" and return a
-    "success" status without further ado.
- */
-    if (     (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
-           % td->td_stripsperimage
-        == 0
-       )
-      {
-        if (   sp->cinfo.d.buffered_image
-            && !CALLJPEG(sp,0,jpeg_start_output(&sp->cinfo.d,s+1))
-           ) return 0;
-        sp->cinfo.d.output_scanline = 0;
-
-     /* Mark subsampling buffers "empty". */
-
-#       ifdef D_LOSSLESS_SUPPORTED
-        sp->scancount = sp->cinfo.d.min_codec_data_unit;
-#       else
-        sp->scancount = DCTSIZE;
-#       endif
-      };
-    return 1;
-#   undef td
-  }
-
-/*ARGSUSED*/ static void
-OJPEGPostDecode(register TIFF *tif,tidata_t buf,tsize_t cc)
-  { register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
- /* The JPEG Library decompressor has reached the end of a strip/tile.  If this
-    is the end of a TIFF image "sample" (= JPEG "scan") in a file with separate
-    components (color planes), then end the "scan".  If it ends the image's last
-    sample/scan, then also stop the JPEG Library's decompressor.
- */
-    if (sp->cinfo.d.output_scanline >= sp->cinfo.d.output_height)
-      {
-        if (sp->cinfo.d.buffered_image)
-          CALLJPEG(sp,-1,jpeg_finish_output(&sp->cinfo.d)); /* End JPEG scan */
-        if (   (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
-            >= td->td_nstrips-1
-           ) CALLJPEG(sp,0,jpeg_finish_decompress(&sp->cinfo.d));
-      }
-#   undef td
-  }
-
-static int
-OJPEGVSetField(register TIFF *tif,ttag_t tag,va_list ap)
-{
-    uint32 v32;
-    register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-    toff_t tiffoff=0;
-    uint32 bufoff=0;
-    uint32 code_count=0;
-    int i2=0;
-    int k2=0;
-
-    switch (tag)
-      {
-
-     /* If a "ReferenceBlackWhite" TIFF tag appears in the file explicitly, undo
-        any modified default definition that we might have installed below, then
-        install the real one.
-     */
-        case TIFFTAG_REFERENCEBLACKWHITE   : if (td->td_refblackwhite)
-                                               {
-                                                 _TIFFfree(td->td_refblackwhite);
-                                                 td->td_refblackwhite = 0;
-                                               };
-        default                            : return
-                                               (*sp->vsetparent)(tif,tag,ap);
-
-     /* BEWARE OF KLUDGE:  Some old-format JPEG-in-TIFF files, including those
-                           produced by the Wang Imaging application for Micro-
-        soft Windows, illegally omit a "ReferenceBlackWhite" TIFF tag, even
-        though the TIFF specification's default is intended for the RGB color
-        space and is inappropriate for the YCbCr color space ordinarily used for
-        JPEG images.  Since many TIFF client applications request the value of
-        this tag immediately after a TIFF image directory is parsed, and before
-        any other code in this module receives control, we are forced to fix
-        this problem very early in image-file processing.  Fortunately, legal
-        TIFF files are supposed to store their tags in numeric order, so a
-        mandatory "PhotometricInterpretation" tag should always appear before
-        an optional "ReferenceBlackWhite" tag.  Hence, we slyly peek ahead when
-        we discover the desired photometry, by installing modified black and
-        white reference levels.
-     */
-        case TIFFTAG_PHOTOMETRIC           :
-          if (   (v32 = (*sp->vsetparent)(tif,tag,ap))
-              && td->td_photometric == PHOTOMETRIC_YCBCR
-             )
-	  {
-            if ( (td->td_refblackwhite = _TIFFmalloc(6*sizeof(float))) )
-              { register long top = 1 << td->td_bitspersample;
-
-                td->td_refblackwhite[0] = 0;
-                td->td_refblackwhite[1] = td->td_refblackwhite[3] =
-                td->td_refblackwhite[5] = top - 1;
-                td->td_refblackwhite[2] = td->td_refblackwhite[4] = top >> 1;
-              }
-            else
-              {
-                TIFFError(tif->tif_name,
-                  "Cannot set default reference black and white levels");
-                v32 = 0;
-              };
-	  }
-          return v32;
-
-     /* BEWARE OF KLUDGE:  According to Charles Auer <Bumble731 at msn.com>, if our
-                           input is a multi-image (multi-directory) JPEG-in-TIFF
-        file is produced by the Wang Imaging application on Microsoft Windows,
-        for some reason the first directory excludes the vendor-specific "WANG
-        PageControl" tag (32934) that we check below, so the only other way to
-        identify these directories is apparently to look for a software-
-        identification tag with the substring, "Wang Labs".  Single-image files
-        can apparently pass both tests, which causes no harm here, but what a
-        mess this is!
-     */
-        case TIFFTAG_SOFTWARE              :
-        {
-            char *software;
-
-            v32 = (*sp->vsetparent)(tif,tag,ap);
-            if( TIFFGetField( tif, TIFFTAG_SOFTWARE, &software )
-                && strstr( software, "Wang Labs" ) )
-                sp->is_WANG = 1;
-            return v32;
-        }
-
-        case TIFFTAG_JPEGPROC              :
-        case TIFFTAG_JPEGIFOFFSET          :
-        case TIFFTAG_JPEGIFBYTECOUNT       :
-        case TIFFTAG_JPEGRESTARTINTERVAL   :
-        case TIFFTAG_JPEGLOSSLESSPREDICTORS:
-        case TIFFTAG_JPEGPOINTTRANSFORM    :
-        case TIFFTAG_JPEGQTABLES           :
-        case TIFFTAG_JPEGDCTABLES          :
-        case TIFFTAG_JPEGACTABLES          :
-        case TIFFTAG_WANG_PAGECONTROL      :
-        case TIFFTAG_JPEGCOLORMODE         : ;
-      };
-    v32 = va_arg(ap,uint32); /* No. of values in this TIFF record */
-
-    /* This switch statement is added for OJPEGVSetField */
-    if(v32 !=0){
-        switch(tag){
-            case TIFFTAG_JPEGPROC:
-                sp->jpegproc=v32;
-                break;
-            case TIFFTAG_JPEGIFOFFSET:
-                sp->jpegifoffset=v32;
-		break;
-            case TIFFTAG_JPEGIFBYTECOUNT:
-		sp->jpegifbytecount=v32;
-		break;
-            case TIFFTAG_JPEGRESTARTINTERVAL:
-		sp->jpegrestartinterval=v32;
-		break;
-            case TIFFTAG_JPEGLOSSLESSPREDICTORS:
-		sp->jpeglosslesspredictors_length=v32;
-		break;
-            case TIFFTAG_JPEGPOINTTRANSFORM:
-		sp->jpegpointtransform_length=v32;
-		break;
-            case TIFFTAG_JPEGQTABLES:
-		sp->jpegqtables_length=v32;
-		break;
-            case TIFFTAG_JPEGACTABLES:
-		sp->jpegactables_length=v32;
-		break;
-            case TIFFTAG_JPEGDCTABLES:
-		sp->jpegdctables_length=v32;
-		break;
-            default:
-		break;
-        }
-    }
-
- /* BEWARE:  The following actions apply only if we are reading a "source" TIFF
-             image to be decompressed for a client application program.  If we
-    ever enhance this file's CODEC to write "destination" JPEG-in-TIFF images,
-    we'll need an "if"- and another "switch"-statement below, because we'll
-    probably want to store these records' values in some different places.  Most
-    of these need not be parsed here in order to decode JPEG bit stream, so we
-    set boolean flags to note that they have been seen, but we otherwise ignore
-    them.
- */
-    switch (tag)
-      { JHUFF_TBL **h;
-
-     /* Validate the JPEG-process code. */
-
-        case TIFFTAG_JPEGPROC              :
-          switch (v32)
-            {
-              default               : TIFFError(tif->tif_name,
-                                        "Unknown JPEG process");
-                                      return 0;
-#             ifdef C_LOSSLESS_SUPPORTED
-
-           /* Image uses (lossy) baseline sequential coding. */
-
-              case JPEGPROC_BASELINE: sp->cinfo.d.process = JPROC_SEQUENTIAL;
-                                      sp->cinfo.d.data_unit = DCTSIZE;
-                                      break;
-
-           /* Image uses (lossless) Huffman coding. */
-
-              case JPEGPROC_LOSSLESS: sp->cinfo.d.process = JPROC_LOSSLESS;
-                                      sp->cinfo.d.data_unit = 1;
-#             else /* not C_LOSSLESS_SUPPORTED */
-              case JPEGPROC_LOSSLESS: TIFFError(JPEGLib_name,
-                                        "Does not support lossless Huffman coding");
-                                      return 0;
-              case JPEGPROC_BASELINE: ;
-#             endif /* C_LOSSLESS_SUPPORTED */
-            };
-          break;
-
-     /* The TIFF Version 6.0 specification says that if the value of a TIFF
-        "JPEGInterchangeFormat" record is 0, then we are to behave as if this
-        record were absent; i.e., the data does *not* represent a JPEG Inter-
-        change Format File (JFIF), so don't even set the boolean "I've been
-        here" flag below.  Otherwise, the field's value represents the file
-        offset of the JPEG SOI marker.
-     */
-        case TIFFTAG_JPEGIFOFFSET          :
-          if (v32)
-            {
-              sp->src.next_input_byte = tif->tif_base + v32;
-              break;
-            };
-          return 1;
-        case TIFFTAG_JPEGIFBYTECOUNT       :
-          sp->src.bytes_in_buffer = v32;
-          break;
-
-     /* The TIFF Version 6.0 specification says that if the JPEG "Restart"
-        marker interval is 0, then the data has no "Restart" markers; i.e., we
-        must behave as if this TIFF record were absent.  So, don't even set the
-        boolean "I've been here" flag below.
-     */
-     /*
-      * Instead, set the field bit so TIFFGetField can get whether or not
-      * it was set.
-      */
-        case TIFFTAG_JPEGRESTARTINTERVAL   :
-          if (v32)
-              sp->cinfo.d.restart_interval = v32;
-              break;
-     /* The TIFF Version 6.0 specification says that this tag is supposed to be
-        a vector containing a value for each image component, but for lossless
-        Huffman coding (the only JPEG process defined by the specification for
-        which this tag should be needed), ISO IS 10918-1 uses only a single
-        value, equivalent to the "Ss" field in a JPEG bit-stream's "Start of
-        Scan" (SOS) marker.  So, we extract the first vector element and ignore
-        the rest.  (I hope this is correct!)
-     */
-        case TIFFTAG_JPEGLOSSLESSPREDICTORS:
-           if (v32)
-             {
-               sp->cinfo.d.Ss = *va_arg(ap,uint16 *);
-               sp->jpeglosslesspredictors = 
-		    _TIFFmalloc(sp->jpeglosslesspredictors_length
-				* sizeof(uint16));
-               if(sp->jpeglosslesspredictors==NULL){return(0);}
-               for(i2=0;i2<sp->jpeglosslesspredictors_length;i2++){
-                ((uint16*)sp->jpeglosslesspredictors)[i2] =
-			((uint16*)sp->cinfo.d.Ss)[i2];
-               }
-               sp->jpeglosslesspredictors_length*=sizeof(uint16);
-               break;
-             };
-           return v32;
-
-     /* The TIFF Version 6.0 specification says that this tag is supposed to be
-        a vector containing a value for each image component, but for lossless
-        Huffman coding (the only JPEG process defined by the specification for
-        which this tag should be needed), ISO IS 10918-1 uses only a single
-        value, equivalent to the "Al" field in a JPEG bit-stream's "Start of
-        Scan" (SOS) marker.  So, we extract the first vector element and ignore
-        the rest.  (I hope this is correct!)
-     */
-        case TIFFTAG_JPEGPOINTTRANSFORM    :
-           if (v32)
-             {
-               sp->cinfo.d.Al = *va_arg(ap,uint16 *);
-               sp->jpegpointtransform =
-		    _TIFFmalloc(sp->jpegpointtransform_length*sizeof(uint16));
-               if(sp->jpegpointtransform==NULL){return(0);}
-               for(i2=0;i2<sp->jpegpointtransform_length;i2++) {
-                ((uint16*)sp->jpegpointtransform)[i2] =
-			((uint16*)sp->cinfo.d.Al)[i2];
-               }
-               sp->jpegpointtransform_length*=sizeof(uint16);
-               break;
-             }
-           return v32;
-
-     /* We have a vector of offsets to quantization tables, so load 'em! */
-
-        case TIFFTAG_JPEGQTABLES           :
-          if (v32)
-            { uint32 *v;
-              int i;
-              if (v32 > NUM_QUANT_TBLS)
-                {
-                  TIFFError(tif->tif_name,"Too many quantization tables");
-                  return 0;
-                };
-              i = 0;
-              v = va_arg(ap,uint32 *);
-                sp->jpegqtables=_TIFFmalloc(64*sp->jpegqtables_length);
-                if(sp->jpegqtables==NULL){return(0);}
-                tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
-                bufoff=0;
-                for(i2=0;i2<sp->jpegqtables_length;i2++){
-                    TIFFSeekFile(tif, v[i2], SEEK_SET);
-                    TIFFReadFile(tif, &(((u_char*)(sp->jpegqtables))[bufoff]),
-				 64);
-                    bufoff+=64;
-                }
-                sp->jpegqtables_length=bufoff;
-                TIFFSeekFile(tif, tiffoff, SEEK_SET);
-
-              do /* read quantization table */
-                { register UINT8 *from = tif->tif_base + *v++;
-                  register UINT16 *to;
-                  register int j = DCTSIZE2;
-
-                  if (!( sp->cinfo.d.quant_tbl_ptrs[i]
-                       = CALLJPEG(sp,0,jpeg_alloc_quant_table(&sp->cinfo.comm))
-                       )
-                     )
-                    {
-                      TIFFError(JPEGLib_name,"No space for quantization table");
-                      return 0;
-                    };
-                  to = sp->cinfo.d.quant_tbl_ptrs[i]->quantval;
-                  do *to++ = *from++; while (--j > 0);
-                }
-              while (++i < v32);
-              sp->jpegtablesmode |= JPEGTABLESMODE_QUANT;
-            };
-          break;
-
-     /* We have a vector of offsets to DC Huffman tables, so load 'em! */
-
-        case TIFFTAG_JPEGDCTABLES          :
-          h = sp->cinfo.d.dc_huff_tbl_ptrs;
-          goto L;
-
-     /* We have a vector of offsets to AC Huffman tables, so load 'em! */
-
-        case TIFFTAG_JPEGACTABLES          :
-          h = sp->cinfo.d.ac_huff_tbl_ptrs;
-       L: if (v32)
-            { uint32 *v;
-              int i;
-              if (v32 > NUM_HUFF_TBLS)
-                {
-                  TIFFError(tif->tif_name,"Too many Huffman tables");
-                  return 0;
-                };
-              v = va_arg(ap,uint32 *);
-                if(tag == TIFFTAG_JPEGDCTABLES) {
-                    sp->jpegdctables=_TIFFmalloc(272*sp->jpegdctables_length);
-                    if(sp->jpegdctables==NULL){return(0);}
-                    tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
-                    bufoff=0;
-                    code_count=0;                
-                    for(i2=0;i2<sp->jpegdctables_length;i2++){
-                        TIFFSeekFile(tif, v[i2], SEEK_SET);
-                        TIFFReadFile(tif,
-				     &(((u_char*)(sp->jpegdctables))[bufoff]),
-				     16);
-                        code_count=0;
-                        for(k2=0;k2<16;k2++){
-                            code_count+=((u_char*)(sp->jpegdctables))[k2+bufoff];
-                        }
-                        TIFFReadFile(tif,
-				     &(((u_char*)(sp->jpegdctables))[bufoff+16]),
-				     code_count);
-                        bufoff+=16;
-                        bufoff+=code_count;
-                    }
-                    sp->jpegdctables_length=bufoff;
-                    TIFFSeekFile(tif, tiffoff, SEEK_SET);
-                }
-                if(tag==TIFFTAG_JPEGACTABLES){
-                    sp->jpegactables=_TIFFmalloc(272*sp->jpegactables_length);
-                    if(sp->jpegactables==NULL){return(0);}
-                    tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
-                    bufoff=0;
-                    code_count=0;                
-                    for(i2=0;i2<sp->jpegactables_length;i2++){
-                        TIFFSeekFile(tif, v[i2], SEEK_SET);
-                        TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff]), 16);
-                        code_count=0;
-                        for(k2=0;k2<16;k2++){
-                            code_count+=((unsigned char*)(sp->jpegactables))[k2+bufoff];
-                        }
-                        TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff+16]), code_count);
-                        bufoff+=16;
-                        bufoff+=code_count;
-                    }
-                    sp->jpegactables_length=bufoff;
-                    TIFFSeekFile(tif, tiffoff, SEEK_SET);
-                }
-              i = 0;
-              do /* copy each Huffman table */
-                { int size = 0;
-                  register UINT8 *from = tif->tif_base + *v++, *to;
-                  register int j = sizeof (*h)->bits;
-
-               /* WARNING:  This code relies on the fact that an image file not
-                            "memory mapped" was read entirely into a single
-                  buffer by "TIFFInitOJPEG()", so we can do a fast memory-to-
-                  memory copy here.  Each table consists of 16 Bytes, which are
-                  suffixed to a 0 Byte when copied, followed by a variable
-                  number of Bytes whose length is the sum of the first 16.
-               */
-                  if (!( *h
-                       = CALLJPEG(sp,0,jpeg_alloc_huff_table(&sp->cinfo.comm))
-                       )
-                     )
-                    {
-                      TIFFError(JPEGLib_name,"No space for Huffman table");
-                      return 0;
-                    };
-                  to = (*h++)->bits;
-                  *to++ = 0;
-                  while (--j > 0) size += *to++ = *from++; /* Copy 16 Bytes */
-                  if (size > sizeof (*h)->huffval/sizeof *(*h)->huffval)
-                    {
-                      TIFFError(tif->tif_name,"Huffman table too big");
-                      return 0;
-                    };
-                  if ((j = size) > 0) do *to++ = *from++; while (--j > 0);
-                  while (++size <= sizeof (*h)->huffval/sizeof *(*h)->huffval)
-                    *to++ = 0; /* Zero the rest of the table for cleanliness */
-                }
-              while (++i < v32);
-              sp->jpegtablesmode |= JPEGTABLESMODE_HUFF;
-            };
-          break;
-
-     /* The following vendor-specific TIFF tag occurs in (highly illegal) files
-        produced by the Wang Imaging application for Microsoft Windows.  These
-        can apparently have several "pages", in which case this tag specifies
-        the offset of a "page control" structure, which we don't currently know
-        how to handle.  0 indicates a 1-page image with no "page control", which
-        we make a feeble effort to handle.
-     */
-        case TIFFTAG_WANG_PAGECONTROL      :
-          if (v32 == 0) v32 = -1;
-          sp->is_WANG = v32;
-          tag = TIFFTAG_JPEGPROC+FIELD_WANG_PAGECONTROL-FIELD_JPEGPROC;
-          break;
-
-     /* This pseudo tag indicates whether our caller is expected to do YCbCr <->
-        RGB color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we must
-        ask the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
-     */
-        case TIFFTAG_JPEGCOLORMODE         :
-          sp->jpegcolormode = v32;
-
-       /* Mark the image to indicate whether returned data is up-sampled, so
-          that "TIFF{Strip,Tile}Size()" reflect the true amount of data present.
-       */
-          v32 = tif->tif_flags; /* Save flags temporarily */
-          tif->tif_flags &= ~TIFF_UPSAMPLED;
-          if (   td->td_photometric == PHOTOMETRIC_YCBCR
-              &&    (td->td_ycbcrsubsampling[0]<<3 | td->td_ycbcrsubsampling[1])
-                 != 011
-              && sp->jpegcolormode == JPEGCOLORMODE_RGB
-             ) tif->tif_flags |= TIFF_UPSAMPLED;
-
-       /* If the up-sampling state changed, re-calculate tile size. */
-
-          if ((tif->tif_flags ^ v32) & TIFF_UPSAMPLED)
-            {
-              tif->tif_tilesize = TIFFTileSize(tif);
-              tif->tif_flags |= TIFF_DIRTYDIRECT;
-            };
-          return 1;
-      };
-    TIFFSetFieldBit(tif,tag-TIFFTAG_JPEGPROC+FIELD_JPEGPROC);
-    return 1;
-#   undef td
-  }
-
-static int
-OJPEGVGetField(register TIFF *tif,ttag_t tag,va_list ap)
-  { register OJPEGState *sp = OJState(tif);
-
-    switch (tag)
-      {
-
-     /* If this file has managed to synthesize a set of consolidated "metadata"
-        tables for the current (post-TIFF Version 6.0 specification) JPEG-in-
-        TIFF encapsulation strategy, then tell our caller about them; otherwise,
-        keep mum.
-     */
-        case TIFFTAG_JPEGTABLES            :
-          if (sp->jpegtables_length) /* we have "new"-style JPEG tables */
-            {
-              *va_arg(ap,uint32 *) = sp->jpegtables_length;
-              *va_arg(ap,char **) = sp->jpegtables;
-              return 1;
-            };
-
-     /* This pseudo tag indicates whether our caller is expected to do YCbCr <->
-        RGB color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we must
-        ask the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
-     */
-        case TIFFTAG_JPEGCOLORMODE         :
-          *va_arg(ap,uint32 *) = sp->jpegcolormode;
-          return 1;
-
-     /* The following tags are defined by the TIFF Version 6.0 specification
-        and are obsolete.  If our caller asks for information about them, do not
-        return anything, even if we parsed them in an old-format "source" image.
-     */
-        case TIFFTAG_JPEGPROC              :
-		*va_arg(ap, uint16*)=sp->jpegproc;
-		return(1);
-		break;
-        case TIFFTAG_JPEGIFOFFSET          :
-		*va_arg(ap, uint32*)=sp->jpegifoffset;
-		return(1);
-		break;
-        case TIFFTAG_JPEGIFBYTECOUNT       :
-		*va_arg(ap, uint32*)=sp->jpegifbytecount;
-		return(1);
-		break;
-        case TIFFTAG_JPEGRESTARTINTERVAL   :
-		*va_arg(ap, uint32*)=sp->jpegrestartinterval;
-		return(1);
-		break;
-        case TIFFTAG_JPEGLOSSLESSPREDICTORS:
-                *va_arg(ap, uint32*)=sp->jpeglosslesspredictors_length;
-                *va_arg(ap, void**)=sp->jpeglosslesspredictors;
-                return(1);
-                break;
-        case TIFFTAG_JPEGPOINTTRANSFORM    :
-                *va_arg(ap, uint32*)=sp->jpegpointtransform_length;
-                *va_arg(ap, void**)=sp->jpegpointtransform;
-                return(1);
-                break;
-        case TIFFTAG_JPEGQTABLES           :
-                *va_arg(ap, uint32*)=sp->jpegqtables_length;
-                *va_arg(ap, void**)=sp->jpegqtables;
-                return(1);
-                break;
-        case TIFFTAG_JPEGDCTABLES          :
-                *va_arg(ap, uint32*)=sp->jpegdctables_length;
-                *va_arg(ap, void**)=sp->jpegdctables;
-                return(1);
-                break;
-        case TIFFTAG_JPEGACTABLES          : 
-                *va_arg(ap, uint32*)=sp->jpegactables_length;
-                *va_arg(ap, void**)=sp->jpegactables;
-                return(1);
-                break;
-      };
-    return (*sp->vgetparent)(tif,tag,ap);
-  }
-
-static void
-OJPEGPrintDir(register TIFF *tif,FILE *fd,long flags)
-  { register OJPEGState *sp = OJState(tif);
-
-    if (   ( flags
-           & (TIFFPRINT_JPEGQTABLES|TIFFPRINT_JPEGDCTABLES|TIFFPRINT_JPEGACTABLES)
-           )
-        && sp->jpegtables_length
-       )
-      fprintf(fd,"  JPEG Table Data: <present>, %lu bytes\n",
-        sp->jpegtables_length);
-  }
-
-static uint32
-OJPEGDefaultStripSize(register TIFF *tif,register uint32 s)
-  { register OJPEGState *sp = OJState(tif);
-#   define td (&tif->tif_dir)
-
-    if ((s = (*sp->defsparent)(tif,s)) < td->td_imagelength)
-      { register tsize_t size = sp->cinfo.comm.is_decompressor
-#                             ifdef D_LOSSLESS_SUPPORTED
-                              ? sp->cinfo.d.min_codec_data_unit
-#                             else
-                              ? DCTSIZE
-#                             endif
-#                             ifdef C_LOSSLESS_SUPPORTED
-                              : sp->cinfo.c.data_unit;
-#                             else
-                              : DCTSIZE;
-#                             endif
-
-        size = TIFFroundup(size,16);
-        s = TIFFroundup(s,td->td_ycbcrsubsampling[1]*size);
-      };
-    return s;
-#   undef td
-  }
-
-static void
-OJPEGDefaultTileSize(register TIFF *tif,register uint32 *tw,register uint32 *th)
-  { register OJPEGState *sp = OJState(tif);
-    register tsize_t size;
-#   define td (&tif->tif_dir)
-
-    size = sp->cinfo.comm.is_decompressor
-#        ifdef D_LOSSLESS_SUPPORTED
-         ? sp->cinfo.d.min_codec_data_unit
-#        else
-         ? DCTSIZE
-#        endif
-#        ifdef C_LOSSLESS_SUPPORTED
-         : sp->cinfo.c.data_unit;
-#        else
-         : DCTSIZE;
-#        endif
-    size = TIFFroundup(size,16);
-    (*sp->deftparent)(tif,tw,th);
-    *tw = TIFFroundup(*tw,td->td_ycbcrsubsampling[0]*size);
-    *th = TIFFroundup(*th,td->td_ycbcrsubsampling[1]*size);
-#   undef td
-  }
-
-static void
-OJPEGCleanUp(register TIFF *tif)
-  { register OJPEGState *sp;
-
-    if ( (sp = OJState(tif)) )
-      {
-        CALLVJPEG(sp,jpeg_destroy(&sp->cinfo.comm)); /* Free JPEG Lib. vars. */
-        if (sp->jpegtables) {_TIFFfree(sp->jpegtables);sp->jpegtables=0;}
-        if (sp->jpeglosslesspredictors) {
-		_TIFFfree(sp->jpeglosslesspredictors);
-		sp->jpeglosslesspredictors = 0;
-	}
-        if (sp->jpegpointtransform) {
-		_TIFFfree(sp->jpegpointtransform);
-		sp->jpegpointtransform=0;
-	}
-        if (sp->jpegqtables) {_TIFFfree(sp->jpegqtables);sp->jpegqtables=0;}
-        if (sp->jpegactables) {_TIFFfree(sp->jpegactables);sp->jpegactables=0;}
-        if (sp->jpegdctables) {_TIFFfree(sp->jpegdctables);sp->jpegdctables=0;}
-     /* If the image file isn't "memory mapped" and we read it all into a
-        single, large memory buffer, free the buffer now.
-     */
-        if (!isMapped(tif) && tif->tif_base) /* free whole-file buffer */
-          {
-            _TIFFfree(tif->tif_base);
-            tif->tif_base = 0;
-            tif->tif_size = 0;
-          };
-        _TIFFfree(sp); /* Release local variables */
-        tif->tif_data = 0;
-      }
-  }
-
-int
-TIFFInitOJPEG(register TIFF *tif,int scheme)
-  { register OJPEGState *sp;
-#   define td (&tif->tif_dir)
-#   ifndef never
-
- /* This module supports a decompression-only CODEC, which is intended strictly
-    for viewing old image files using the obsolete JPEG-in-TIFF encapsulation
-    specified by the TIFF Version 6.0 specification.  It does not, and never
-    should, support compression for new images.  If a client application asks us
-    to, refuse and complain loudly!
- */
-    if (tif->tif_mode != O_RDONLY) return _notSupported(tif);
-#   endif /* never */
-    if (!isMapped(tif))
-      {
-
-     /* BEWARE OF KLUDGE:  If our host operating-system doesn't let an image
-                           file be "memory mapped", then we want to read the
-        entire file into a single (possibly large) memory buffer as if it had
-        been "memory mapped".  Although this is likely to waste space, because
-        analysis of the file's content might cause parts of it to be read into
-        smaller buffers duplicatively, it appears to be the lesser of several
-        evils.  Very old JPEG-in-TIFF encapsulations aren't guaranteed to be
-        JFIF bit streams, or to have a TIFF "JPEGTables" record or much other
-        "metadata" to help us locate the decoding tables and entropy-coded data,
-        so we're likely do a lot of random-access grokking around, and we must
-        ultimately tell the JPEG Library to sequentially scan much of the file
-        anyway.  This is all likely to be easier if we use "brute force" to
-        read the entire file, once, and don't use incremental disc I/O.  If our
-        client application tries to process a file so big that we can't buffer
-        it entirely, then tough shit: we'll give up and exit!
-     */
-        if (!(tif->tif_base = _TIFFmalloc(tif->tif_size=TIFFGetFileSize(tif))))
-          {
-            TIFFError(tif->tif_name,"Cannot allocate file buffer");
-            return 0;
-          };
-        if (!SeekOK(tif,0) || !ReadOK(tif,tif->tif_base,tif->tif_size))
-          {
-            TIFFError(tif->tif_name,"Cannot read file");
-            return 0;
-          }
-      };
-
- /* Allocate storage for this module's per-file variables. */
-
-    if (!(tif->tif_data = (tidata_t)_TIFFmalloc(sizeof *sp)))
-      {
-        TIFFError("TIFFInitOJPEG","No space for JPEG state block");
-        return 0;
-      };
-    (sp = OJState(tif))->tif = tif; /* Initialize reverse pointer */
-    sp->cinfo.d.err = jpeg_std_error(&sp->err); /* Initialize error handling */
-    sp->err.error_exit = TIFFojpeg_error_exit;
-    sp->err.output_message = TIFFojpeg_output_message;
-    if (!CALLVJPEG(sp,jpeg_create_decompress(&sp->cinfo.d))) return 0;
-
- /* Install CODEC-specific tag information and override default TIFF Library
-    "method" subroutines with our own, CODEC-specific methods.  Like all good
-    members of an object-class, we save some of these subroutine pointers for
-    "fall back" in case our own methods fail.
- */
-    _TIFFMergeFieldInfo(tif,ojpegFieldInfo,
-      sizeof ojpegFieldInfo/sizeof *ojpegFieldInfo);
-    sp->defsparent = tif->tif_defstripsize;
-    sp->deftparent = tif->tif_deftilesize;
-    sp->vgetparent = tif->tif_tagmethods.vgetfield;
-    sp->vsetparent = tif->tif_tagmethods.vsetfield;
-    tif->tif_defstripsize = OJPEGDefaultStripSize;
-    tif->tif_deftilesize = OJPEGDefaultTileSize;
-    tif->tif_tagmethods.vgetfield = OJPEGVGetField;
-    tif->tif_tagmethods.vsetfield = OJPEGVSetField;
-    tif->tif_tagmethods.printdir = OJPEGPrintDir;
-#   ifdef never
-    tif->tif_setupencode = OJPEGSetupEncode;
-    tif->tif_preencode = OJPEGPreEncode;
-    tif->tif_postencode = OJPEGPostEncode;
-#   else /* well, hardly ever */
-    tif->tif_setupencode = tif->tif_postencode = _notSupported;
-    tif->tif_preencode = (TIFFPreMethod)_notSupported;
-#   endif /* never */
-    tif->tif_setupdecode = OJPEGSetupDecode;
-    tif->tif_predecode = OJPEGPreDecode;
-    tif->tif_postdecode = OJPEGPostDecode;
-    tif->tif_cleanup = OJPEGCleanUp;
-
- /* If the image file doesn't have "JPEGInterchangeFormat[Length]" TIFF records
-    to guide us, we have few clues about where its encapsulated JPEG bit stream
-    is located, so establish intelligent defaults:  If the Image File Directory
-    doesn't immediately follow the TIFF header, assume that the JPEG data lies
-    in between; otherwise, assume that it follows the Image File Directory.
- */
-    if (tif->tif_header.tiff_diroff > sizeof tif->tif_header)
-      {
-        sp->src.next_input_byte = tif->tif_base + sizeof tif->tif_header;
-        sp->src.bytes_in_buffer = tif->tif_header.tiff_diroff
-                                - sizeof tif->tif_header;
-      }
-    else /* this case is ugly! */
-      { uint32 maxoffset = tif->tif_size;
-        uint16 dircount;
-
-     /* Calculate the offset to the next Image File Directory, if there is one,
-        or to the end of the file, if not.  Then arrange to read the file from
-        the end of the Image File Directory to that offset.
-     */
-        if (tif->tif_nextdiroff) maxoffset = tif->tif_nextdiroff; /* Not EOF */
-        _TIFFmemcpy(&dircount,(const tdata_t)
-          (sp->src.next_input_byte = tif->tif_base+tif->tif_header.tiff_diroff),
-          sizeof dircount);
-        if (tif->tif_flags & TIFF_SWAB) TIFFSwabShort(&dircount);
-        sp->src.next_input_byte += dircount*sizeof(TIFFDirEntry)
-                                + sizeof maxoffset + sizeof dircount;
-        sp->src.bytes_in_buffer = tif->tif_base - sp->src.next_input_byte
-                                + maxoffset;
-      };
-
- /* IJG JPEG Library Version 6B can be configured for either 8- or 12-bit sample
-    precision, but we assume that "old JPEG" TIFF clients only need 8 bits.
- */
-    sp->cinfo.d.data_precision = 8;
-#   ifdef C_LOSSLESS_SUPPORTED
-
- /* If the "JPEGProc" TIFF tag is missing from the Image File Dictionary, the
-    JPEG Library will use its (lossy) baseline sequential process by default.
- */
-    sp->cinfo.d.data_unit = DCTSIZE;
-#   endif /* C_LOSSLESS_SUPPORTED */
-
- /* Initialize other CODEC-specific variables requiring default values. */
-
-    tif->tif_flags |= TIFF_NOBITREV; /* No bit-reversal within data bytes */
-    sp->h_sampling = sp->v_sampling = 1; /* No subsampling by default */
-    sp->is_WANG = 0; /* Assume not a MS Windows Wang Imaging file by default */
-    sp->jpegtables = 0; /* No "new"-style JPEG tables synthesized yet */
-    sp->jpegtables_length = 0;
-    sp->jpegquality = 75; /* Default IJG quality */
-    sp->jpegcolormode = JPEGCOLORMODE_RAW;
-    sp->jpegtablesmode = 0; /* No tables found yet */
-    sp->jpeglosslesspredictors=0;
-    sp->jpeglosslesspredictors_length=0;
-    sp->jpegpointtransform=0;
-    sp->jpegpointtransform_length=0;
-    sp->jpegqtables=0;
-    sp->jpegqtables_length=0;
-    sp->jpegdctables=0;
-    sp->jpegdctables_length=0;
-    sp->jpegactables=0;
-    sp->jpegactables_length=0;
-    return 1;
-#   undef td
-  }
-#endif /* OJPEG_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_open.c b/tkimg1.3/libtiff/libtiff/tif_open.c
deleted file mode 100644
index e6f9ec1..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_open.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_open.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-void _TIFFSetDefaultCompressionState(TIFF* tif);
-
-static const long typemask[13] = {
-	(long)0L,		/* TIFF_NOTYPE */
-	(long)0x000000ffL,	/* TIFF_BYTE */
-	(long)0xffffffffL,	/* TIFF_ASCII */
-	(long)0x0000ffffL,	/* TIFF_SHORT */
-	(long)0xffffffffL,	/* TIFF_LONG */
-	(long)0xffffffffL,	/* TIFF_RATIONAL */
-	(long)0x000000ffL,	/* TIFF_SBYTE */
-	(long)0x000000ffL,	/* TIFF_UNDEFINED */
-	(long)0x0000ffffL,	/* TIFF_SSHORT */
-	(long)0xffffffffL,	/* TIFF_SLONG */
-	(long)0xffffffffL,	/* TIFF_SRATIONAL */
-	(long)0xffffffffL,	/* TIFF_FLOAT */
-	(long)0xffffffffL,	/* TIFF_DOUBLE */
-};
-static const int bigTypeshift[13] = {
-	0,		/* TIFF_NOTYPE */
-	24,		/* TIFF_BYTE */
-	0,		/* TIFF_ASCII */
-	16,		/* TIFF_SHORT */
-	0,		/* TIFF_LONG */
-	0,		/* TIFF_RATIONAL */
-	24,		/* TIFF_SBYTE */
-	24,		/* TIFF_UNDEFINED */
-	16,		/* TIFF_SSHORT */
-	0,		/* TIFF_SLONG */
-	0,		/* TIFF_SRATIONAL */
-	0,		/* TIFF_FLOAT */
-	0,		/* TIFF_DOUBLE */
-};
-static const int litTypeshift[13] = {
-	0,		/* TIFF_NOTYPE */
-	0,		/* TIFF_BYTE */
-	0,		/* TIFF_ASCII */
-	0,		/* TIFF_SHORT */
-	0,		/* TIFF_LONG */
-	0,		/* TIFF_RATIONAL */
-	0,		/* TIFF_SBYTE */
-	0,		/* TIFF_UNDEFINED */
-	0,		/* TIFF_SSHORT */
-	0,		/* TIFF_SLONG */
-	0,		/* TIFF_SRATIONAL */
-	0,		/* TIFF_FLOAT */
-	0,		/* TIFF_DOUBLE */
-};
-
-/*
- * Initialize the shift & mask tables, and the
- * byte swapping state according to the file
- * contents and the machine architecture.
- */
-static void
-TIFFInitOrder(TIFF* tif, int magic, int bigendian)
-{
-	tif->tif_typemask = typemask;
-	if (magic == TIFF_BIGENDIAN) {
-		tif->tif_typeshift = bigTypeshift;
-		if (!bigendian)
-			tif->tif_flags |= TIFF_SWAB;
-	} else {
-		tif->tif_typeshift = litTypeshift;
-		if (bigendian)
-			tif->tif_flags |= TIFF_SWAB;
-	}
-}
-
-int
-_TIFFgetMode(const char* mode, const char* module)
-{
-	int m = -1;
-
-	switch (mode[0]) {
-	case 'r':
-		m = O_RDONLY;
-		if (mode[1] == '+')
-			m = O_RDWR;
-		break;
-	case 'w':
-	case 'a':
-		m = O_RDWR|O_CREAT;
-		if (mode[0] == 'w')
-			m |= O_TRUNC;
-		break;
-	default:
-		TIFFError(module, "\"%s\": Bad mode", mode);
-		break;
-	}
-	return (m);
-}
-
-TIFF*
-TIFFClientOpen(
-	const char* name, const char* mode,
-	thandle_t clientdata,
-	TIFFReadWriteProc readproc,
-	TIFFReadWriteProc writeproc,
-	TIFFSeekProc seekproc,
-	TIFFCloseProc closeproc,
-	TIFFSizeProc sizeproc,
-	TIFFMapFileProc mapproc,
-	TIFFUnmapFileProc unmapproc
-)
-{
-	static const char module[] = "TIFFClientOpen";
-	TIFF *tif;
-	int m, bigendian;
-	const char* cp;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		goto bad2;
-	tif = (TIFF *)_TIFFmalloc(sizeof (TIFF) + strlen(name) + 1);
-	if (tif == NULL) {
-		TIFFError(module, "%s: Out of memory (TIFF structure)", name);
-		goto bad2;
-	}
-	_TIFFmemset(tif, 0, sizeof (*tif));
-	tif->tif_name = (char *)tif + sizeof (TIFF);
-	strcpy(tif->tif_name, name);
-	tif->tif_mode = m &~ (O_CREAT|O_TRUNC);
-	tif->tif_curdir = (tdir_t) -1;		/* non-existent directory */
-	tif->tif_curoff = 0;
-	tif->tif_curstrip = (tstrip_t) -1;	/* invalid strip */
-	tif->tif_row = (uint32) -1;		/* read/write pre-increment */
-	tif->tif_clientdata = clientdata;
-	if (!readproc || !writeproc || !seekproc || !closeproc
-			|| !sizeproc || !mapproc || !unmapproc) {
-		TIFFError(module, "One of the client procedures are NULL pointer");
-		goto bad3;
-	}
-	tif->tif_readproc = readproc;
-	tif->tif_writeproc = writeproc;
-	tif->tif_seekproc = seekproc;
-	tif->tif_closeproc = closeproc;
-	tif->tif_sizeproc = sizeproc;
-	tif->tif_mapproc = mapproc;
-	tif->tif_unmapproc = unmapproc;
-	_TIFFSetDefaultCompressionState(tif);	/* setup default state */
-	/*
-	 * Default is to return data MSB2LSB and enable the
-	 * use of memory-mapped files and strip chopping when
-	 * a file is opened read-only.
-	 */
-	tif->tif_flags = FILLORDER_MSB2LSB;
-	if (m == O_RDONLY )
-            tif->tif_flags |= TIFF_MAPPED;
-
-#ifdef STRIPCHOP_DEFAULT
-	if (m == O_RDONLY || m == O_RDWR)
-		tif->tif_flags |= STRIPCHOP_DEFAULT;
-#endif
-
-	{ union { int32 i; char c[4]; } u; u.i = 1; bigendian = u.c[0] == 0; }
-	/*
-	 * Process library-specific flags in the open mode string.
-	 * The following flags may be used to control intrinsic library
-	 * behaviour that may or may not be desirable (usually for
-	 * compatibility with some application that claims to support
-	 * TIFF but only supports some braindead idea of what the
-	 * vendor thinks TIFF is):
-	 *
-	 * 'l'		use little-endian byte order for creating a file
-	 * 'b'		use big-endian byte order for creating a file
-	 * 'L'		read/write information using LSB2MSB bit order
-	 * 'B'		read/write information using MSB2LSB bit order
-	 * 'H'		read/write information using host bit order
-	 * 'M'		enable use of memory-mapped files when supported
-	 * 'm'		disable use of memory-mapped files
-	 * 'C'		enable strip chopping support when reading
-	 * 'c'		disable strip chopping support
-	 *
-	 * The use of the 'l' and 'b' flags is strongly discouraged.
-	 * These flags are provided solely because numerous vendors,
-	 * typically on the PC, do not correctly support TIFF; they
-	 * only support the Intel little-endian byte order.  This
-	 * support is not configured by default because it supports
-	 * the violation of the TIFF spec that says that readers *MUST*
-	 * support both byte orders.  It is strongly recommended that
-	 * you not use this feature except to deal with busted apps
-	 * that write invalid TIFF.  And even in those cases you should
-	 * bang on the vendors to fix their software.
-	 *
-	 * The 'L', 'B', and 'H' flags are intended for applications
-	 * that can optimize operations on data by using a particular
-	 * bit order.  By default the library returns data in MSB2LSB
-	 * bit order for compatibiltiy with older versions of this
-	 * library.  Returning data in the bit order of the native cpu
-	 * makes the most sense but also requires applications to check
-	 * the value of the FillOrder tag; something they probabyl do
-	 * not do right now.
-	 *
-	 * The 'M' and 'm' flags are provided because some virtual memory
-	 * systems exhibit poor behaviour when large images are mapped.
-	 * These options permit clients to control the use of memory-mapped
-	 * files on a per-file basis.
-	 *
-	 * The 'C' and 'c' flags are provided because the library support
-	 * for chopping up large strips into multiple smaller strips is not
-	 * application-transparent and as such can cause problems.  The 'c'
-	 * option permits applications that only want to look at the tags,
-	 * for example, to get the unadulterated TIFF tag information.
-	 */
-	for (cp = mode; *cp; cp++)
-		switch (*cp) {
-		case 'b':
-			if ((m&O_CREAT) && !bigendian)
-				tif->tif_flags |= TIFF_SWAB;
-			break;
-		case 'l':
-			if ((m&O_CREAT) && bigendian)
-				tif->tif_flags |= TIFF_SWAB;
-			break;
-		case 'B':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    FILLORDER_MSB2LSB;
-			break;
-		case 'L':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    FILLORDER_LSB2MSB;
-			break;
-		case 'H':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    HOST_FILLORDER;
-			break;
-		case 'M':
-			if (m == O_RDONLY)
-				tif->tif_flags |= TIFF_MAPPED;
-			break;
-		case 'm':
-			if (m == O_RDONLY)
-				tif->tif_flags &= ~TIFF_MAPPED;
-			break;
-		case 'C':
-			if (m == O_RDONLY)
-				tif->tif_flags |= TIFF_STRIPCHOP;
-			break;
-		case 'c':
-			if (m == O_RDONLY)
-				tif->tif_flags &= ~TIFF_STRIPCHOP;
-			break;
-		}
-	/*
-	 * Read in TIFF header.
-	 */
-	if (!ReadOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
-		if (tif->tif_mode == O_RDONLY) {
-			TIFFError(name, "Cannot read TIFF header");
-			goto bad;
-		}
-		/*
-		 * Setup header and write.
-		 */
-		tif->tif_header.tiff_magic = tif->tif_flags & TIFF_SWAB
-		    ? (bigendian ? TIFF_LITTLEENDIAN : TIFF_BIGENDIAN)
-		    : (bigendian ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN);
-		tif->tif_header.tiff_version = TIFF_VERSION;
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&tif->tif_header.tiff_version);
-		tif->tif_header.tiff_diroff = 0;	/* filled in later */
-
-                /*
-                 * This seek shouldn't be necessary, but I have had some
-                 * crazy problems with a failed fseek() on Solaris leaving
-                 * the current file pointer out of whack when an fwrite()
-                 * is done. 
-                 */
-                TIFFSeekFile( tif, 0, SEEK_SET );
-
-		if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
-			TIFFError(name, "Error writing TIFF header");
-			goto bad;
-		}
-		/*
-		 * Setup the byte order handling.
-		 */
-		TIFFInitOrder(tif, tif->tif_header.tiff_magic, bigendian);
-		/*
-		 * Setup default directory.
-		 */
-		if (!TIFFDefaultDirectory(tif))
-			goto bad;
-		tif->tif_diroff = 0;
-		tif->tif_dirlist = NULL;
-		tif->tif_dirnumber = 0;
-		return (tif);
-	}
-	/*
-	 * Setup the byte order handling.
-	 */
-	if (tif->tif_header.tiff_magic != TIFF_BIGENDIAN &&
-	    tif->tif_header.tiff_magic != TIFF_LITTLEENDIAN) {
-		TIFFError(name,  "Not a TIFF file, bad magic number %d (0x%x)",
-		    tif->tif_header.tiff_magic,
-		    tif->tif_header.tiff_magic);
-		goto bad;
-	}
-	TIFFInitOrder(tif, tif->tif_header.tiff_magic, bigendian);
-	/*
-	 * Swap header if required.
-	 */
-	if (tif->tif_flags & TIFF_SWAB) {
-		TIFFSwabShort(&tif->tif_header.tiff_version);
-		TIFFSwabLong(&tif->tif_header.tiff_diroff);
-	}
-	/*
-	 * Now check version (if needed, it's been byte-swapped).
-	 * Note that this isn't actually a version number, it's a
-	 * magic number that doesn't change (stupid).
-	 */
-	if (tif->tif_header.tiff_version != TIFF_VERSION) {
-		TIFFError(name,
-		    "Not a TIFF file, bad version number %d (0x%x)",
-		    tif->tif_header.tiff_version,
-		    tif->tif_header.tiff_version); 
-		goto bad;
-	}
-	tif->tif_flags |= TIFF_MYBUFFER;
-	tif->tif_rawcp = tif->tif_rawdata = 0;
-	tif->tif_rawdatasize = 0;
-	/*
-	 * Setup initial directory.
-	 */
-	switch (mode[0]) {
-	case 'r':
-		tif->tif_nextdiroff = tif->tif_header.tiff_diroff;
-		/*
-		 * Try to use a memory-mapped file if the client
-		 * has not explicitly suppressed usage with the
-		 * 'm' flag in the open mode (see above).
-		 */
-		if ((tif->tif_flags & TIFF_MAPPED) &&
-	!TIFFMapFileContents(tif, (tdata_t*) &tif->tif_base, &tif->tif_size))
-			tif->tif_flags &= ~TIFF_MAPPED;
-		if (TIFFReadDirectory(tif)) {
-			tif->tif_rawcc = -1;
-			tif->tif_flags |= TIFF_BUFFERSETUP;
-			return (tif);
-		}
-		break;
-	case 'a':
-		/*
-		 * New directories are automatically append
-		 * to the end of the directory chain when they
-		 * are written out (see TIFFWriteDirectory).
-		 */
-		if (!TIFFDefaultDirectory(tif))
-			goto bad;
-		return (tif);
-	}
-bad:
-	tif->tif_mode = O_RDONLY;	/* XXX avoid flush */
-	TIFFClose(tif);
-	return ((TIFF*)0);
-bad2:
-	(void) (*closeproc)(clientdata);
-bad3:
-	return ((TIFF*)0);
-}
-
-/*
- * Query functions to access private data.
- */
-
-/*
- * Return open file's name.
- */
-const char *
-TIFFFileName(TIFF* tif)
-{
-	return (tif->tif_name);
-}
-
-/*
- * Return open file's I/O descriptor.
- */
-int
-TIFFFileno(TIFF* tif)
-{
-	return (tif->tif_fd);
-}
-
-/*
- * Return read/write mode.
- */
-int
-TIFFGetMode(TIFF* tif)
-{
-	return (tif->tif_mode);
-}
-
-/*
- * Return nonzero if file is organized in
- * tiles; zero if organized as strips.
- */
-int
-TIFFIsTiled(TIFF* tif)
-{
-	return (isTiled(tif));
-}
-
-/*
- * Return current row being read/written.
- */
-uint32
-TIFFCurrentRow(TIFF* tif)
-{
-	return (tif->tif_row);
-}
-
-/*
- * Return index of the current directory.
- */
-tdir_t
-TIFFCurrentDirectory(TIFF* tif)
-{
-	return (tif->tif_curdir);
-}
-
-/*
- * Return current strip.
- */
-tstrip_t
-TIFFCurrentStrip(TIFF* tif)
-{
-	return (tif->tif_curstrip);
-}
-
-/*
- * Return current tile.
- */
-ttile_t
-TIFFCurrentTile(TIFF* tif)
-{
-	return (tif->tif_curtile);
-}
-
-/*
- * Return nonzero if the file has byte-swapped data.
- */
-int
-TIFFIsByteSwapped(TIFF* tif)
-{
-	return ((tif->tif_flags & TIFF_SWAB) != 0);
-}
-
-/*
- * Return nonzero if the data is returned up-sampled.
- */
-int
-TIFFIsUpSampled(TIFF* tif)
-{
-	return (isUpSampled(tif));
-}
-
-/*
- * Return nonzero if the data is returned in MSB-to-LSB bit order.
- */
-int
-TIFFIsMSB2LSB(TIFF* tif)
-{
-	return (isFillOrder(tif, FILLORDER_MSB2LSB));
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_packbits.c b/tkimg1.3/libtiff/libtiff/tif_packbits.c
deleted file mode 100644
index 87dcf76..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_packbits.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_packbits.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef PACKBITS_SUPPORT
-/*
- * TIFF Library.
- *
- * PackBits Compression Algorithm Support
- */
-#include <assert.h>
-#include <stdio.h>
-
-static int
-PackBitsPreEncode(TIFF* tif, tsample_t s)
-{
-	(void) s;
-	/*
-	 * Calculate the scanline/tile-width size in bytes.
-	 */
-	if (isTiled(tif))
-		tif->tif_data = (tidata_t) TIFFTileRowSize(tif);
-	else
-		tif->tif_data = (tidata_t) TIFFScanlineSize(tif);
-	return (1);
-}
-
-/*
- * NB: tidata is the type representing *(tidata_t);
- *     if tidata_t is made signed then this type must
- *     be adjusted accordingly.
- */
-typedef unsigned char tidata;
-
-/*
- * Encode a run of pixels.
- */
-static int
-PackBitsEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	u_char* bp = (u_char*) buf;
-	tidata_t op, ep, lastliteral;
-	long n, slop;
-	int b;
-	enum { BASE, LITERAL, RUN, LITERAL_RUN } state;
-
-	(void) s;
-	op = tif->tif_rawcp;
-	ep = tif->tif_rawdata + tif->tif_rawdatasize;
-	state = BASE;
-	lastliteral = 0;
-	while (cc > 0) {
-		/*
-		 * Find the longest string of identical bytes.
-		 */
-		b = *bp++, cc--, n = 1;
-		for (; cc > 0 && b == *bp; cc--, bp++)
-			n++;
-	again:
-		if (op + 2 >= ep) {		/* insure space for new data */
-			/*
-			 * Be careful about writing the last
-			 * literal.  Must write up to that point
-			 * and then copy the remainder to the
-			 * front of the buffer.
-			 */
-			if (state == LITERAL || state == LITERAL_RUN) {
-				slop = op - lastliteral;
-				tif->tif_rawcc += lastliteral - tif->tif_rawcp;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				while (slop-- > 0)
-					*op++ = *lastliteral++;
-				lastliteral = tif->tif_rawcp;
-			} else {
-				tif->tif_rawcc += op - tif->tif_rawcp;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-			}
-		}
-		switch (state) {
-		case BASE:		/* initial state, set run/literal */
-			if (n > 1) {
-				state = RUN;
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));
-				*op++ = (tidataval_t) b;
-			} else {
-				lastliteral = op;
-				*op++ = 0;
-				*op++ = (tidataval_t) b;
-				state = LITERAL;
-			}
-			break;
-		case LITERAL:		/* last object was literal string */
-			if (n > 1) {
-				state = LITERAL_RUN;
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));	/* encode run */
-				*op++ = (tidataval_t) b;
-			} else {			/* extend literal */
-				if (++(*lastliteral) == 127)
-					state = BASE;
-				*op++ = (tidataval_t) b;
-			}
-			break;
-		case RUN:		/* last object was run */
-			if (n > 1) {
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));
-				*op++ = (tidataval_t) b;
-			} else {
-				lastliteral = op;
-				*op++ = 0;
-				*op++ = (tidataval_t) b;
-				state = LITERAL;
-			}
-			break;
-		case LITERAL_RUN:	/* literal followed by a run */
-			/*
-			 * Check to see if previous run should
-			 * be converted to a literal, in which
-			 * case we convert literal-run-literal
-			 * to a single literal.
-			 */
-			if (n == 1 && op[-2] == (tidata) -1 &&
-			    *lastliteral < 126) {
-				state = (((*lastliteral) += 2) == 127 ?
-				    BASE : LITERAL);
-				op[-2] = op[-1];	/* replicate */
-			} else
-				state = RUN;
-			goto again;
-		}
-	}
-	tif->tif_rawcc += op - tif->tif_rawcp;
-	tif->tif_rawcp = op;
-	return (1);
-}
-
-/*
- * Encode a rectangular chunk of pixels.  We break it up
- * into row-sized pieces to insure that encoded runs do
- * not span rows.  Otherwise, there can be problems with
- * the decoder if data is read, for example, by scanlines
- * when it was encoded by strips.
- */
-static int
-PackBitsEncodeChunk(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-#if defined(__hpux) && defined(__LP64__)
-	tsize_t rowsize = (tsize_t)(unsigned long) tif->tif_data;
-#else
-	tsize_t rowsize = (tsize_t) tif->tif_data;
-#endif
-
-	assert(rowsize > 0);
-    
-#ifdef YCBCR_SUPPORT
-	/* 
-	 * YCBCR data isn't really separable into rows, so we
-	 * might as well encode the whole tile/strip as one chunk.
-	 */
-	if( tif->tif_dir.td_photometric == PHOTOMETRIC_YCBCR ) {
-#if defined(__hpux) && defined(__LP64__)
-		rowsize = (tsize_t)(unsigned long) tif->tif_data;
-#else
-		rowsize = (tsize_t) tif->tif_data;
-#endif
-	}
-#endif
-
-	while ((long)cc > 0) {
-		int	chunk = rowsize;
-		
-		if( cc < chunk )
-		    chunk = cc;
-
-		if (PackBitsEncode(tif, bp, chunk, s) < 0)
-		    return (-1);
-		bp += chunk;
-		cc -= chunk;
-	}
-	return (1);
-}
-
-static int
-PackBitsDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	char *bp;
-	tsize_t cc;
-	long n;
-	int b;
-
-	(void) s;
-	bp = (char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	while (cc > 0 && (long)occ > 0) {
-		n = (long) *bp++, cc--;
-		/*
-		 * Watch out for compilers that
-		 * don't sign extend chars...
-		 */
-		if (n >= 128)
-			n -= 256;
-		if (n < 0) {		/* replicate next byte -n+1 times */
-			if (n == -128)	/* nop */
-				continue;
-                        n = -n + 1;
-                        if( occ < n )
-                        {
-                            TIFFWarning(tif->tif_name,
-                                        "PackBitsDecode: discarding %d bytes "
-                                        "to avoid buffer overrun",
-                                        n - occ);
-                            n = occ;
-                        }
-			occ -= n;
-			b = *bp++, cc--;
-			while (n-- > 0)
-				*op++ = (tidataval_t) b;
-		} else {		/* copy next n+1 bytes literally */
-			if (occ < n + 1)
-                        {
-                            TIFFWarning(tif->tif_name,
-                                        "PackBitsDecode: discarding %d bytes "
-                                        "to avoid buffer overrun",
-                                        n - occ + 1);
-                            n = occ - 1;
-                        }
-                        _TIFFmemcpy(op, bp, ++n);
-			op += n; occ -= n;
-			bp += n; cc -= n;
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-		    "PackBitsDecode: Not enough data for scanline %ld",
-		    (long) tif->tif_row);
-		return (0);
-	}
-	return (1);
-}
-
-int
-TIFFInitPackBits(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = PackBitsDecode;
-	tif->tif_decodestrip = PackBitsDecode;
-	tif->tif_decodetile = PackBitsDecode;
-	tif->tif_preencode = PackBitsPreEncode;
-	tif->tif_encoderow = PackBitsEncode;
-	tif->tif_encodestrip = PackBitsEncodeChunk;
-	tif->tif_encodetile = PackBitsEncodeChunk;
-	return (1);
-}
-#endif /* PACKBITS_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_pixarlog.c b/tkimg1.3/libtiff/libtiff/tif_pixarlog.c
deleted file mode 100644
index f1664bc..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_pixarlog.c
+++ /dev/null
@@ -1,1305 +0,0 @@
-/*
- * Copyright (c) 1996-1997 Sam Leffler
- * Copyright (c) 1996 Pixar
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Pixar, Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef PIXARLOG_SUPPORT
-
-/*
- * TIFF Library.
- * PixarLog Compression Support
- *
- * Contributed by Dan McCoy.
- *
- * PixarLog film support uses the TIFF library to store companded
- * 11 bit values into a tiff file, which are compressed using the 
- * zip compressor.  
- *
- * The codec can take as input and produce as output 32-bit IEEE float values 
- * as well as 16-bit or 8-bit unsigned integer values.
- *
- * On writing any of the above are converted into the internal
- * 11-bit log format.   In the case of  8 and 16 bit values, the
- * input is assumed to be unsigned linear color values that represent
- * the range 0-1.  In the case of IEEE values, the 0-1 range is assumed to
- * be the normal linear color range, in addition over 1 values are
- * accepted up to a value of about 25.0 to encode "hot" hightlights and such.
- * The encoding is lossless for 8-bit values, slightly lossy for the
- * other bit depths.  The actual color precision should be better
- * than the human eye can perceive with extra room to allow for
- * error introduced by further image computation.  As with any quantized
- * color format, it is possible to perform image calculations which
- * expose the quantization error. This format should certainly be less 
- * susceptable to such errors than standard 8-bit encodings, but more
- * susceptable than straight 16-bit or 32-bit encodings.
- *
- * On reading the internal format is converted to the desired output format.
- * The program can request which format it desires by setting the internal
- * pseudo tag TIFFTAG_PIXARLOGDATAFMT to one of these possible values:
- *  PIXARLOGDATAFMT_FLOAT     = provide IEEE float values.
- *  PIXARLOGDATAFMT_16BIT     = provide unsigned 16-bit integer values
- *  PIXARLOGDATAFMT_8BIT      = provide unsigned 8-bit integer values
- *
- * alternately PIXARLOGDATAFMT_8BITABGR provides unsigned 8-bit integer
- * values with the difference that if there are exactly three or four channels
- * (rgb or rgba) it swaps the channel order (bgr or abgr).
- *
- * PIXARLOGDATAFMT_11BITLOG provides the internal encoding directly
- * packed in 16-bit values.   However no tools are supplied for interpreting
- * these values.
- *
- * "hot" (over 1.0) areas written in floating point get clamped to
- * 1.0 in the integer data types.
- *
- * When the file is closed after writing, the bit depth and sample format
- * are set always to appear as if 8-bit data has been written into it.
- * That way a naive program unaware of the particulars of the encoding
- * gets the format it is most likely able to handle.
- *
- * The codec does it's own horizontal differencing step on the coded
- * values so the libraries predictor stuff should be turned off.
- * The codec also handle byte swapping the encoded values as necessary
- * since the library does not have the information necessary
- * to know the bit depth of the raw unencoded buffer.
- * 
- */
-
-#include "tif_predict.h"
-#include "zlib.h"
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <math.h>
-
-/* Tables for converting to/from 11 bit coded values */
-
-#define  TSIZE	 2048		/* decode table size (11-bit tokens) */
-#define  TSIZEP1 2049		/* Plus one for slop */
-#define  ONE	 1250		/* token value of 1.0 exactly */
-#define  RATIO	 1.004		/* nominal ratio for log part */
-
-#define CODE_MASK 0x7ff         /* 11 bits. */
-
-static float  Fltsize;
-static float  LogK1, LogK2;
-
-#define REPEAT(n, op)   { int i; i=n; do { i--; op; } while (i>0); }
-
-static void
-horizontalAccumulateF(uint16 *wp, int n, int stride, float *op, 
-	float *ToLinearF)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    t3 = ToLinearF[ca = wp[3]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		t3 = ToLinearF[(ca += wp[3]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinearF[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinearF[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
-	float *ToLinearF)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-#define SCALE12 2048.0
-#define CLAMP12(t) (((t) < 3071) ? (uint16) (t) : 3071)
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    t3 = ToLinearF[ca = wp[3]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    op[3] = CLAMP12(t3);
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		t3 = ToLinearF[(ca += wp[3]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-		op[3] = CLAMP12(t3);
-	    }
-	} else {
-	    REPEAT(stride, t0 = ToLinearF[*wp&mask] * SCALE12;
-                           *op = CLAMP12(t0); wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; t0 = ToLinearF[wp[stride]&mask]*SCALE12;
-		    *op = CLAMP12(t0);  wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
-	uint16 *ToLinear16)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    op[3] = ToLinear16[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-		op[3] = ToLinear16[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear16[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear16[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/* 
- * Returns the log encoded 11-bit values with the horizontal
- * differencing undone.
- */
-static void
-horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];  op[2] = cb = wp[2];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-	    }
-	} else if (stride == 4) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];
-	    op[2] = cb = wp[2];  op[3] = ca = wp[3];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-		op[3] = (ca += wp[3]) & mask;
-	    } 
-	} else {
-	    REPEAT(stride, *op = *wp&mask; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = *wp&mask; wp++; op++)
-	    	n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
-	unsigned char *ToLinear8)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 3;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    op[3] = ToLinear8[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-		op[3] = ToLinear8[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-
-static void
-horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
-	unsigned char *ToLinear8)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register unsigned char  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = 0;
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 4;
-		op[0] = 0;
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinear8[ca = wp[3]];
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		t0 = ToLinear8[(ca += wp[3]) & mask];
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/*
- * State block for each open TIFF
- * file using PixarLog compression/decompression.
- */
-typedef	struct {
-	TIFFPredictorState	predict;
-	z_stream		stream;
-	uint16			*tbuf; 
-	uint16			stride;
-	int			state;
-	int			user_datafmt;
-	int			quality;
-#define PLSTATE_INIT 1
-
-	TIFFVSetMethod		vgetparent;	/* super-class method */
-	TIFFVSetMethod		vsetparent;	/* super-class method */
-
-	float *ToLinearF;
-	uint16 *ToLinear16;
-	unsigned char *ToLinear8;
-	uint16  *FromLT2;
-	uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-	uint16  *From8;
-	
-} PixarLogState;
-
-static int
-PixarLogMakeTables(PixarLogState *sp)
-{
-
-/*
- *    We make several tables here to convert between various external
- *    representations (float, 16-bit, and 8-bit) and the internal
- *    11-bit companded representation.  The 11-bit representation has two
- *    distinct regions.  A linear bottom end up through .018316 in steps
- *    of about .000073, and a region of constant ratio up to about 25.
- *    These floating point numbers are stored in the main table ToLinearF. 
- *    All other tables are derived from this one.  The tables (and the
- *    ratios) are continuous at the internal seam.
- */
-
-    int  nlin, lt2size;
-    int  i, j;
-    double  b, c, linstep, v;
-    float *ToLinearF;
-    uint16 *ToLinear16;
-    unsigned char *ToLinear8;
-    uint16  *FromLT2;
-    uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-    uint16  *From8;
-
-    c = log(RATIO);	
-    nlin = (int)1./c;	/* nlin must be an integer */
-    c = 1./nlin;
-    b = exp(-c*ONE);	/* multiplicative scale factor [b*exp(c*ONE) = 1] */
-    linstep = b*c*exp(1.);
-
-    LogK1 = 1./c;	/* if (v >= 2)  token = k1*log(v*k2) */
-    LogK2 = 1./b;
-    lt2size = (int)(2./linstep) + 1;
-    FromLT2 = (uint16 *)_TIFFmalloc(lt2size*sizeof(uint16));
-    From14 = (uint16 *)_TIFFmalloc(16384*sizeof(uint16));
-    From8 = (uint16 *)_TIFFmalloc(256*sizeof(uint16));
-    ToLinearF = (float *)_TIFFmalloc(TSIZEP1 * sizeof(float));
-    ToLinear16 = (uint16 *)_TIFFmalloc(TSIZEP1 * sizeof(uint16));
-    ToLinear8 = (unsigned char *)_TIFFmalloc(TSIZEP1 * sizeof(unsigned char));
-    if (FromLT2 == NULL || From14  == NULL || From8   == NULL ||
-	 ToLinearF == NULL || ToLinear16 == NULL || ToLinear8 == NULL) {
-	if (FromLT2) _TIFFfree(FromLT2);
-	if (From14) _TIFFfree(From14);
-	if (From8) _TIFFfree(From8);
-	if (ToLinearF) _TIFFfree(ToLinearF);
-	if (ToLinear16) _TIFFfree(ToLinear16);
-	if (ToLinear8) _TIFFfree(ToLinear8);
-	sp->FromLT2 = NULL;
-	sp->From14 = NULL;
-	sp->From8 = NULL;
-	sp->ToLinearF = NULL;
-	sp->ToLinear16 = NULL;
-	sp->ToLinear8 = NULL;
-	return 0;
-    }
-
-    j = 0;
-
-    for (i = 0; i < nlin; i++)  {
-	v = i * linstep;
-	ToLinearF[j++] = v;
-    }
-
-    for (i = nlin; i < TSIZE; i++)
-	ToLinearF[j++] = b*exp(c*i);
-
-    ToLinearF[2048] = ToLinearF[2047];
-
-    for (i = 0; i < TSIZEP1; i++)  {
-	v = ToLinearF[i]*65535.0 + 0.5;
-	ToLinear16[i] = (v > 65535.0) ? 65535 : (uint16)v;
-	v = ToLinearF[i]*255.0  + 0.5;
-	ToLinear8[i]  = (v > 255.0) ? 255 : (unsigned char)v;
-    }
-
-    j = 0;
-    for (i = 0; i < lt2size; i++)  {
-	if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	FromLT2[i] = j;
-    }
-
-    /*
-     * Since we lose info anyway on 16-bit data, we set up a 14-bit
-     * table and shift 16-bit values down two bits on input.
-     * saves a little table space.
-     */
-    j = 0;
-    for (i = 0; i < 16384; i++)  {
-	while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From14[i] = j;
-    }
-
-    j = 0;
-    for (i = 0; i < 256; i++)  {
-	while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From8[i] = j;
-    }
-
-    Fltsize = lt2size/2;
-
-    sp->ToLinearF = ToLinearF;
-    sp->ToLinear16 = ToLinear16;
-    sp->ToLinear8 = ToLinear8;
-    sp->FromLT2 = FromLT2;
-    sp->From14 = From14;
-    sp->From8 = From8;
-
-    return 1;
-}
-
-#define	DecoderState(tif)	((PixarLogState*) (tif)->tif_data)
-#define	EncoderState(tif)	((PixarLogState*) (tif)->tif_data)
-
-static	int PixarLogEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PixarLogDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-
-#define N(a)   (sizeof(a)/sizeof(a[0]))
-#define PIXARLOGDATAFMT_UNKNOWN	-1
-
-static int
-PixarLogGuessDataFmt(TIFFDirectory *td)
-{
-	int guess = PIXARLOGDATAFMT_UNKNOWN;
-	int format = td->td_sampleformat;
-
-	/* If the user didn't tell us his datafmt,
-	 * take our best guess from the bitspersample.
-	 */
-	switch (td->td_bitspersample) {
-	 case 32:
-		if (format == SAMPLEFORMAT_IEEEFP)
-			guess = PIXARLOGDATAFMT_FLOAT;
-		break;
-	 case 16:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_16BIT;
-		break;
-	 case 12:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_INT)
-			guess = PIXARLOGDATAFMT_12BITPICIO;
-		break;
-	 case 11:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_11BITLOG;
-		break;
-	 case 8:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_8BIT;
-		break;
-	}
-
-	return guess;
-}
-
-static int
-PixarLogSetupDecode(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = DecoderState(tif);
-	static const char module[] = "PixarLogSetupDecode";
-
-	assert(sp != NULL);
-
-	/* Make sure no byte swapping happens on the data
-	 * after decompression. */
-	tif->tif_postdecode = _TIFFNoPostDecode;
-
-	/* for some reason, we can't do this in TIFFInitPixarLog */
-
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	sp->tbuf = (uint16 *) _TIFFmalloc(sp->stride * 
-		td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = PixarLogGuessDataFmt(td);
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-		TIFFError(module, 
-			"PixarLog compression can't handle bits depth/data format combination (depth: %d)", 
-			td->td_bitspersample);
-		return (0);
-	}
-
-	if (inflateInit(&sp->stream) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= PLSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-PixarLogPreDecode(TIFF* tif, tsample_t s)
-{
-	PixarLogState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_in = tif->tif_rawdata;
-	sp->stream.avail_in = tif->tif_rawcc;
-	return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-PixarLogDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = DecoderState(tif);
-	static const char module[] = "PixarLogDecode";
-	int i, nsamples, llen;
-	uint16 *up;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		nsamples = occ / sizeof(float);	/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		nsamples = occ / sizeof(uint16); /* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		nsamples = occ;
-		break;
-	default:
-		TIFFError(tif->tif_name,
-			"%d bit input not supported in PixarLog",
-			td->td_bitspersample);
-		return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = (unsigned char *) sp->tbuf;
-	sp->stream.avail_out = nsamples * sizeof(uint16);
-	do {
-		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-		if (state == Z_STREAM_END) {
-			break;			/* XXX */
-		}
-		if (state == Z_DATA_ERROR) {
-			TIFFError(module,
-			    "%s: Decoding error at scanline %d, %s",
-			    tif->tif_name, tif->tif_row, sp->stream.msg);
-			if (inflateSync(&sp->stream) != Z_OK)
-				return (0);
-			continue;
-		}
-		if (state != Z_OK) {
-			TIFFError(module, "%s: zlib error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-	} while (sp->stream.avail_out > 0);
-
-	/* hopefully, we got all the bytes we needed */
-	if (sp->stream.avail_out != 0) {
-		TIFFError(module,
-		    "%s: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_name, tif->tif_row, sp->stream.avail_out);
-		return (0);
-	}
-
-	up = sp->tbuf;
-	/* Swap bytes in the data if from a different endian machine. */
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabArrayOfShort(up, nsamples);
-
-	for (i = 0; i < nsamples; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalAccumulateF(up, llen, sp->stride,
-					(float *)op, sp->ToLinearF);
-			op += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalAccumulate16(up, llen, sp->stride,
-					(uint16 *)op, sp->ToLinear16);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_12BITPICIO:
-			horizontalAccumulate12(up, llen, sp->stride,
-					(int16 *)op, sp->ToLinearF);
-			op += llen * sizeof(int16);
-			break;
-		case PIXARLOGDATAFMT_11BITLOG:
-			horizontalAccumulate11(up, llen, sp->stride,
-					(uint16 *)op);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalAccumulate8(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		case PIXARLOGDATAFMT_8BITABGR:
-			horizontalAccumulate8abgr(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		default:
-			TIFFError(tif->tif_name,
-				  "PixarLogDecode: unsupported bits/sample: %d", 
-				  td->td_bitspersample);
-			return (0);
-		}
-	}
-
-	return (1);
-}
-
-static int
-PixarLogSetupEncode(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = EncoderState(tif);
-	static const char module[] = "PixarLogSetupEncode";
-
-	assert(sp != NULL);
-
-	/* for some reason, we can't do this in TIFFInitPixarLog */
-
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	sp->tbuf = (uint16 *) _TIFFmalloc(sp->stride * 
-		td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = PixarLogGuessDataFmt(td);
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-		TIFFError(module, "PixarLog compression can't handle %d bit linear encodings", td->td_bitspersample);
-		return (0);
-	}
-
-	if (deflateInit(&sp->stream, sp->quality) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= PLSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-PixarLogPreEncode(TIFF* tif, tsample_t s)
-{
-	PixarLogState *sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = tif->tif_rawdata;
-	sp->stream.avail_out = tif->tif_rawdatasize;
-	return (deflateReset(&sp->stream) == Z_OK);
-}
-
-static void
-horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2)
-{
-
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-    register float  fltsize = Fltsize;
-
-#define  CLAMP(v) ( (v<(float)0.)   ? 0				\
-		  : (v<(float)2.)   ? FromLT2[(int)(v*fltsize)]	\
-		  : (v>(float)24.2) ? 2047			\
-		  : LogK1*log(v*LogK2) + 0.5 )
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-static void
-horizontalDifference16(unsigned short *ip, int n, int stride, 
-	unsigned short *wp, uint16 *From14)
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-/* assumption is unsigned pixel values */
-#undef   CLAMP
-#define  CLAMP(v) From14[(v) >> 2]
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-
-static void
-horizontalDifference8(unsigned char *ip, int n, int stride, 
-	unsigned short *wp, uint16 *From8)
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-#undef	 CLAMP
-#define  CLAMP(v) (From8[(v)])
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		r1 = CLAMP(ip[3]); wp[3] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[4]); wp[4] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[5]); wp[5] = (b1-b2) & mask; b2 = b1;
-		wp += 3;
-		ip += 3;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		r1 = CLAMP(ip[4]); wp[4] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[5]); wp[5] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[6]); wp[6] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[7]); wp[7] = (a1-a2) & mask; a2 = a1;
-		wp += 4;
-		ip += 4;
-	    }
-	} else {
-	    wp += n + stride - 1;	/* point to last one */
-	    ip += n + stride - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-/*
- * Encode a chunk of pixels.
- */
-static int
-PixarLogEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogEncode";
-	int 	i, n, llen;
-	unsigned short * up;
-
-	(void) s;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		n = cc / sizeof(float);		/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		n = cc / sizeof(uint16);	/* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		n = cc;
-		break;
-	default:
-		TIFFError(tif->tif_name,
-			"%d bit input not supported in PixarLog",
-			td->td_bitspersample);
-		return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalDifferenceF((float *)bp, llen, 
-				sp->stride, up, sp->FromLT2);
-			bp += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalDifference16((uint16 *)bp, llen, 
-				sp->stride, up, sp->From14);
-			bp += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalDifference8((unsigned char *)bp, llen, 
-				sp->stride, up, sp->From8);
-			bp += llen * sizeof(unsigned char);
-			break;
-		default:
-			TIFFError(tif->tif_name,
-				"%d bit input not supported in PixarLog",
-				td->td_bitspersample);
-			return 0;
-		}
-	}
- 
-	sp->stream.next_in = (unsigned char *) sp->tbuf;
-	sp->stream.avail_in = n * sizeof(uint16);
-
-	do {
-		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-			TIFFError(module, "%s: Encoder error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-		if (sp->stream.avail_out == 0) {
-			tif->tif_rawcc = tif->tif_rawdatasize;
-			TIFFFlushData1(tif);
-			sp->stream.next_out = tif->tif_rawdata;
-			sp->stream.avail_out = tif->tif_rawdatasize;
-		}
-	} while (sp->stream.avail_in > 0);
-	return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-
-static int
-PixarLogPostEncode(TIFF* tif)
-{
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogPostEncode";
-	int state;
-
-	sp->stream.avail_in = 0;
-
-	do {
-		state = deflate(&sp->stream, Z_FINISH);
-		switch (state) {
-		case Z_STREAM_END:
-		case Z_OK:
-		    if (sp->stream.avail_out != tif->tif_rawdatasize) {
-			    tif->tif_rawcc =
-				tif->tif_rawdatasize - sp->stream.avail_out;
-			    TIFFFlushData1(tif);
-			    sp->stream.next_out = tif->tif_rawdata;
-			    sp->stream.avail_out = tif->tif_rawdatasize;
-		    }
-		    break;
-		default:
-		    TIFFError(module, "%s: zlib error: %s",
-			tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (state != Z_STREAM_END);
-	return (1);
-}
-
-static void
-PixarLogClose(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	/* In a really sneaky maneuver, on close, we covertly modify both
-	 * bitspersample and sampleformat in the directory to indicate
-	 * 8-bit linear.  This way, the decode "just works" even for
-	 * readers that don't know about PixarLog, or how to set
-	 * the PIXARLOGDATFMT pseudo-tag.
-	 */
-	td->td_bitspersample = 8;
-	td->td_sampleformat = SAMPLEFORMAT_UINT;
-}
-
-static void
-PixarLogCleanup(TIFF* tif)
-{
-	PixarLogState* sp = (PixarLogState*) tif->tif_data;
-
-	if (sp) {
-		if (sp->FromLT2) _TIFFfree(sp->FromLT2);
-		if (sp->From14) _TIFFfree(sp->From14);
-		if (sp->From8) _TIFFfree(sp->From8);
-		if (sp->ToLinearF) _TIFFfree(sp->ToLinearF);
-		if (sp->ToLinear16) _TIFFfree(sp->ToLinear16);
-		if (sp->ToLinear8) _TIFFfree(sp->ToLinear8);
-		if (sp->state&PLSTATE_INIT) {
-			if (tif->tif_mode == O_RDONLY)
-				inflateEnd(&sp->stream);
-			else
-				deflateEnd(&sp->stream);
-		}
-		if (sp->tbuf)
-			_TIFFfree(sp->tbuf);
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-PixarLogVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-    int result;
-    static const char module[] = "PixarLogVSetField";
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-		sp->quality = va_arg(ap, int);
-		if (tif->tif_mode != O_RDONLY && (sp->state&PLSTATE_INIT)) {
-			if (deflateParams(&sp->stream,
-			    sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) {
-				TIFFError(module, "%s: zlib error: %s",
-					tif->tif_name, sp->stream.msg);
-				return (0);
-			}
-		}
-		return (1);
-     case TIFFTAG_PIXARLOGDATAFMT:
-	sp->user_datafmt = va_arg(ap, int);
-	/* Tweak the TIFF header so that the rest of libtiff knows what
-	 * size of data will be passed between app and library, and
-	 * assume that the app knows what it is doing and is not
-	 * confused by these header manipulations...
-	 */
-	switch (sp->user_datafmt) {
-	 case PIXARLOGDATAFMT_8BIT:
-	 case PIXARLOGDATAFMT_8BITABGR:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_11BITLOG:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_12BITPICIO:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
-	    break;
-	 case PIXARLOGDATAFMT_16BIT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_FLOAT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 32);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
-	    break;
-	}
-	/*
-	 * Must recalculate sizes should bits/sample change.
-	 */
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	result = 1;		/* NB: pseudo tag */
-	break;
-     default:
-	result = (*sp->vsetparent)(tif, tag, ap);
-    }
-    return (result);
-}
-
-static int
-PixarLogVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-	*va_arg(ap, int*) = sp->quality;
-	break;
-     case TIFFTAG_PIXARLOGDATAFMT:
-	*va_arg(ap, int*) = sp->user_datafmt;
-	break;
-     default:
-	return (*sp->vgetparent)(tif, tag, ap);
-    }
-    return (1);
-}
-
-static const TIFFFieldInfo pixarlogFieldInfo[] = {
-    {TIFFTAG_PIXARLOGDATAFMT,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""},
-    {TIFFTAG_PIXARLOGQUALITY,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""}
-};
-
-int
-TIFFInitPixarLog(TIFF* tif, int scheme)
-{
-	PixarLogState* sp;
-
-	assert(scheme == COMPRESSION_PIXARLOG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (PixarLogState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = (PixarLogState*) tif->tif_data;
-	memset(sp, 0, sizeof (*sp));
-	sp->stream.data_type = Z_BINARY;
-	sp->user_datafmt = PIXARLOGDATAFMT_UNKNOWN;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = PixarLogSetupDecode;
-	tif->tif_predecode = PixarLogPreDecode;
-	tif->tif_decoderow = PixarLogDecode;
-	tif->tif_decodestrip = PixarLogDecode;
-	tif->tif_decodetile = PixarLogDecode;
-	tif->tif_setupencode = PixarLogSetupEncode;
-	tif->tif_preencode = PixarLogPreEncode;
-	tif->tif_postencode = PixarLogPostEncode;
-	tif->tif_encoderow = PixarLogEncode;
-	tif->tif_encodestrip = PixarLogEncode;
-	tif->tif_encodetile = PixarLogEncode;
-	tif->tif_close = PixarLogClose;
-	tif->tif_cleanup = PixarLogCleanup;
-
-	/* Override SetField so we can handle our private pseudo-tag */
-	_TIFFMergeFieldInfo(tif, pixarlogFieldInfo, N(pixarlogFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = PixarLogVGetField;   /* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = PixarLogVSetField;   /* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
-	sp->state = 0;
-
-	/* we don't wish to use the predictor, 
-	 * the default is none, which predictor value 1
-	 */
-	(void) TIFFPredictorInit(tif);
-
-	/*
-	 * build the companding tables 
-	 */
-	PixarLogMakeTables(sp);
-
-	return (1);
-bad:
-	TIFFError("TIFFInitPixarLog", "No space for PixarLog state block");
-	return (0);
-}
-#endif /* PIXARLOG_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_predict.c b/tkimg1.3/libtiff/libtiff/tif_predict.c
deleted file mode 100644
index f0a61b7..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_predict.c
+++ /dev/null
@@ -1,464 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_predict.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Predictor Tag Support (used by multiple codecs).
- */
-#include "tiffiop.h"
-#include "tif_predict.h"
-
-#include <assert.h>
-
-#define	PredictorState(tif)	((TIFFPredictorState*) (tif)->tif_data)
-
-static	void horAcc8(TIFF*, tidata_t, tsize_t);
-static	void horAcc16(TIFF*, tidata_t, tsize_t);
-static	void swabHorAcc16(TIFF*, tidata_t, tsize_t);
-static	void horDiff8(TIFF*, tidata_t, tsize_t);
-static	void horDiff16(TIFF*, tidata_t, tsize_t);
-static	int PredictorDecodeRow(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorDecodeTile(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorEncodeRow(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorEncodeTile(TIFF*, tidata_t, tsize_t, tsample_t);
-
-static int
-PredictorSetup(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (sp->predictor == 1)		/* no differencing */
-		return (1);
-	if (sp->predictor != 2) {
-		TIFFError(tif->tif_name, "\"Predictor\" value %d not supported",
-		    sp->predictor);
-		return (0);
-	}
-	if (td->td_bitspersample != 8 && td->td_bitspersample != 16) {
-		TIFFError(tif->tif_name,
-    "Horizontal differencing \"Predictor\" not supported with %d-bit samples",
-		    td->td_bitspersample);
-		return (0);
-	}
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	/*
-	 * Calculate the scanline/tile-width size in bytes.
-	 */
-	if (isTiled(tif))
-		sp->rowsize = TIFFTileRowSize(tif);
-	else
-		sp->rowsize = TIFFScanlineSize(tif);
-	return (1);
-}
-
-static int
-PredictorSetupDecode(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif))
-		return (0);
-	if (sp->predictor == 2) {
-		switch (td->td_bitspersample) {
-		case 8:  sp->pfunc = horAcc8; break;
-		case 16: sp->pfunc = horAcc16; break;
-		}
-		/*
-		 * Override default decoding method with
-		 * one that does the predictor stuff.
-		 */
-		sp->coderow = tif->tif_decoderow;
-		tif->tif_decoderow = PredictorDecodeRow;
-		sp->codestrip = tif->tif_decodestrip;
-		tif->tif_decodestrip = PredictorDecodeTile;
-		sp->codetile = tif->tif_decodetile;
-		tif->tif_decodetile = PredictorDecodeTile;
-		/*
-		 * If the data is horizontally differenced
-		 * 16-bit data that requires byte-swapping,
-		 * then it must be byte swapped before the
-		 * accumulation step.  We do this with a
-		 * special-purpose routine and override the
-		 * normal post decoding logic that the library
-		 * setup when the directory was read.
-		 */
-		if (tif->tif_flags&TIFF_SWAB) {
-			if (sp->pfunc == horAcc16) {
-				sp->pfunc = swabHorAcc16;
-				tif->tif_postdecode = _TIFFNoPostDecode;
-			} /* else handle 32-bit case... */
-		}
-	}
-	return (1);
-}
-
-static int
-PredictorSetupEncode(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (!(*sp->setupencode)(tif) || !PredictorSetup(tif))
-		return (0);
-	if (sp->predictor == 2) {
-		switch (td->td_bitspersample) {
-		case 8:  sp->pfunc = horDiff8; break;
-		case 16: sp->pfunc = horDiff16; break;
-		}
-		/*
-		 * Override default encoding method with
-		 * one that does the predictor stuff.
-		 */
-		sp->coderow = tif->tif_encoderow;
-		tif->tif_encoderow = PredictorEncodeRow;
-		sp->codestrip = tif->tif_encodestrip;
-		tif->tif_encodestrip = PredictorEncodeTile;
-		sp->codetile = tif->tif_encodetile;
-		tif->tif_encodetile = PredictorEncodeTile;
-	}
-	return (1);
-}
-
-#define REPEAT4(n, op)		\
-    switch (n) {		\
-    default: { int i; for (i = n-4; i > 0; i--) { op; } } \
-    case 4:  op;		\
-    case 3:  op;		\
-    case 2:  op;		\
-    case 1:  op;		\
-    case 0:  ;			\
-    }
-
-static void
-horAcc8(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-
-	char* cp = (char*) cp0;
-	if (cc > stride) {
-		cc -= stride;
-		/*
-		 * Pipeline the most common cases.
-		 */
-		if (stride == 3)  {
-			u_int cr = cp[0];
-			u_int cg = cp[1];
-			u_int cb = cp[2];
-			do {
-				cc -= 3, cp += 3;
-				cp[0] = (char) (cr += cp[0]);
-				cp[1] = (char) (cg += cp[1]);
-				cp[2] = (char) (cb += cp[2]);
-			} while ((int32) cc > 0);
-		} else if (stride == 4)  {
-			u_int cr = cp[0];
-			u_int cg = cp[1];
-			u_int cb = cp[2];
-			u_int ca = cp[3];
-			do {
-				cc -= 4, cp += 4;
-				cp[0] = (char) (cr += cp[0]);
-				cp[1] = (char) (cg += cp[1]);
-				cp[2] = (char) (cb += cp[2]);
-				cp[3] = (char) (ca += cp[3]);
-			} while ((int32) cc > 0);
-		} else  {
-			do {
-				REPEAT4(stride, cp[stride] = (char) (cp[stride] + *cp); cp++)
-				cc -= stride;
-			} while ((int32) cc > 0);
-		}
-	}
-}
-
-static void
-swabHorAcc16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	uint16* wp = (uint16*) cp0;
-	tsize_t wc = cc / 2;
-
-	if (wc > stride) {
-		TIFFSwabArrayOfShort(wp, wc);
-		wc -= stride;
-		do {
-			REPEAT4(stride, wp[stride] += wp[0]; wp++)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-static void
-horAcc16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	tsize_t stride = PredictorState(tif)->stride;
-	uint16* wp = (uint16*) cp0;
-	tsize_t wc = cc / 2;
-
-	if (wc > stride) {
-		wc -= stride;
-		do {
-			REPEAT4(stride, wp[stride] += wp[0]; wp++)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-/*
- * Decode a scanline and apply the predictor routine.
- */
-static int
-PredictorDecodeRow(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->coderow != NULL);
-	assert(sp->pfunc != NULL);
-	if ((*sp->coderow)(tif, op0, occ0, s)) {
-		(*sp->pfunc)(tif, op0, occ0);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Decode a tile/strip and apply the predictor routine.
- * Note that horizontal differencing must be done on a
- * row-by-row basis.  The width of a "row" has already
- * been calculated at pre-decode time according to the
- * strip/tile dimensions.
- */
-static int
-PredictorDecodeTile(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->codetile != NULL);
-	if ((*sp->codetile)(tif, op0, occ0, s)) {
-		tsize_t rowsize = sp->rowsize;
-		assert(rowsize > 0);
-		assert(sp->pfunc != NULL);
-		while ((long)occ0 > 0) {
-			(*sp->pfunc)(tif, op0, (tsize_t) rowsize);
-			occ0 -= rowsize;
-			op0 += rowsize;
-		}
-		return (1);
-	} else
-		return (0);
-}
-
-static void
-horDiff8(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	char* cp = (char*) cp0;
-
-	if (cc > stride) {
-		cc -= stride;
-		/*
-		 * Pipeline the most common cases.
-		 */
-		if (stride == 3) {
-			int r1, g1, b1;
-			int r2 = cp[0];
-			int g2 = cp[1];
-			int b2 = cp[2];
-			do {
-				r1 = cp[3]; cp[3] = r1-r2; r2 = r1;
-				g1 = cp[4]; cp[4] = g1-g2; g2 = g1;
-				b1 = cp[5]; cp[5] = b1-b2; b2 = b1;
-				cp += 3;
-			} while ((int32)(cc -= 3) > 0);
-		} else if (stride == 4) {
-			int r1, g1, b1, a1;
-			int r2 = cp[0];
-			int g2 = cp[1];
-			int b2 = cp[2];
-			int a2 = cp[3];
-			do {
-				r1 = cp[4]; cp[4] = r1-r2; r2 = r1;
-				g1 = cp[5]; cp[5] = g1-g2; g2 = g1;
-				b1 = cp[6]; cp[6] = b1-b2; b2 = b1;
-				a1 = cp[7]; cp[7] = a1-a2; a2 = a1;
-				cp += 4;
-			} while ((int32)(cc -= 4) > 0);
-		} else {
-			cp += cc - 1;
-			do {
-				REPEAT4(stride, cp[stride] -= cp[0]; cp--)
-			} while ((int32)(cc -= stride) > 0);
-		}
-	}
-}
-
-static void
-horDiff16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	int16 *wp = (int16*) cp0;
-	tsize_t wc = cc/2;
-
-	if (wc > stride) {
-		wc -= stride;
-		wp += wc - 1;
-		do {
-			REPEAT4(stride, wp[stride] -= wp[0]; wp--)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-static int
-PredictorEncodeRow(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->pfunc != NULL);
-	assert(sp->coderow != NULL);
-/* XXX horizontal differencing alters user's data XXX */
-	(*sp->pfunc)(tif, bp, cc);
-	return ((*sp->coderow)(tif, bp, cc, s));
-}
-
-static int
-PredictorEncodeTile(TIFF* tif, tidata_t bp0, tsize_t cc0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-	tsize_t cc = cc0, rowsize;
-	u_char* bp = bp0;
-
-	assert(sp != NULL);
-	assert(sp->pfunc != NULL);
-	assert(sp->codetile != NULL);
-	rowsize = sp->rowsize;
-	assert(rowsize > 0);
-	while ((long)cc > 0) {
-		(*sp->pfunc)(tif, bp, (tsize_t) rowsize);
-		cc -= rowsize;
-		bp += rowsize;
-	}
-	return ((*sp->codetile)(tif, bp0, cc0, s));
-}
-
-#define	FIELD_PREDICTOR	(FIELD_CODEC+0)		/* XXX */
-
-static const TIFFFieldInfo predictFieldInfo[] = {
-    { TIFFTAG_PREDICTOR,	 1, 1, TIFF_SHORT,	FIELD_PREDICTOR,
-      FALSE,	FALSE,	"Predictor" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-static int
-PredictorVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	switch (tag) {
-	case TIFFTAG_PREDICTOR:
-		sp->predictor = (uint16) va_arg(ap, int);
-		TIFFSetFieldBit(tif, FIELD_PREDICTOR);
-		break;
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-static int
-PredictorVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	switch (tag) {
-	case TIFFTAG_PREDICTOR:
-		*va_arg(ap, uint16*) = sp->predictor;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-PredictorPrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_PREDICTOR)) {
-		fprintf(fd, "  Predictor: ");
-		switch (sp->predictor) {
-		case 1: fprintf(fd, "none "); break;
-		case 2: fprintf(fd, "horizontal differencing "); break;
-		}
-		fprintf(fd, "%u (0x%x)\n", sp->predictor, sp->predictor);
-	}
-	if (sp->printdir)
-		(*sp->printdir)(tif, fd, flags);
-}
-
-int
-TIFFPredictorInit(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, predictFieldInfo, N(predictFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield =
-            PredictorVGetField;/* hook for predictor tag */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield =
-            PredictorVSetField;/* hook for predictor tag */
-	sp->printdir = tif->tif_tagmethods.printdir;
-	tif->tif_tagmethods.printdir =
-            PredictorPrintDir;	/* hook for predictor tag */
-
-	sp->setupdecode = tif->tif_setupdecode;
-	tif->tif_setupdecode = PredictorSetupDecode;
-	sp->setupencode = tif->tif_setupencode;
-	tif->tif_setupencode = PredictorSetupEncode;
-
-	sp->predictor = 1;			/* default value */
-	sp->pfunc = NULL;			/* no predictor routine */
-	return (1);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_predict.h b/tkimg1.3/libtiff/libtiff/tif_predict.h
deleted file mode 100644
index 7baff12..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_predict.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_predict.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1995-1997 Sam Leffler
- * Copyright (c) 1995-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFPREDICT_
-#define	_TIFFPREDICT_
-/*
- * ``Library-private'' Support for the Predictor Tag
- */
-
-/*
- * Codecs that want to support the Predictor tag must place
- * this structure first in their private state block so that
- * the predictor code can cast tif_data to find its state.
- */
-typedef struct {
-	int	predictor;		/* predictor tag value */
-	int	stride;			/* sample stride over data */
-	tsize_t	rowsize;		/* tile/strip row size */
-
-	TIFFPostMethod	pfunc;		/* horizontal differencer/accumulator */
-	TIFFCodeMethod	coderow;	/* parent codec encode/decode row */
-	TIFFCodeMethod	codestrip;	/* parent codec encode/decode strip */
-	TIFFCodeMethod	codetile;	/* parent codec encode/decode tile */
-	TIFFVGetMethod	vgetparent;	/* super-class method */
-	TIFFVSetMethod	vsetparent;	/* super-class method */
-	TIFFPrintMethod	printdir;	/* super-class method */
-	TIFFBoolMethod	setupdecode;	/* super-class method */
-	TIFFBoolMethod	setupencode;	/* super-class method */
-} TIFFPredictorState;
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	int TIFFPredictorInit(TIFF*);
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFPREDICT_ */
diff --git a/tkimg1.3/libtiff/libtiff/tif_print.c b/tkimg1.3/libtiff/libtiff/tif_print.c
deleted file mode 100644
index 3baf324..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_print.c
+++ /dev/null
@@ -1,613 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_print.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Printing Support
- */
-#include "tiffiop.h"
-#include <stdio.h>
-
-#include <ctype.h>
-
-static const char *photoNames[] = {
-    "min-is-white",				/* PHOTOMETRIC_MINISWHITE */
-    "min-is-black",				/* PHOTOMETRIC_MINISBLACK */
-    "RGB color",				/* PHOTOMETRIC_RGB */
-    "palette color (RGB from colormap)",	/* PHOTOMETRIC_PALETTE */
-    "transparency mask",			/* PHOTOMETRIC_MASK */
-    "separated",				/* PHOTOMETRIC_SEPARATED */
-    "YCbCr",					/* PHOTOMETRIC_YCBCR */
-    "7 (0x7)",
-    "CIE L*a*b*",				/* PHOTOMETRIC_CIELAB */
-};
-#define	NPHOTONAMES	(sizeof (photoNames) / sizeof (photoNames[0]))
-
-static const char *orientNames[] = {
-    "0 (0x0)",
-    "row 0 top, col 0 lhs",			/* ORIENTATION_TOPLEFT */
-    "row 0 top, col 0 rhs",			/* ORIENTATION_TOPRIGHT */
-    "row 0 bottom, col 0 rhs",			/* ORIENTATION_BOTRIGHT */
-    "row 0 bottom, col 0 lhs",			/* ORIENTATION_BOTLEFT */
-    "row 0 lhs, col 0 top",			/* ORIENTATION_LEFTTOP */
-    "row 0 rhs, col 0 top",			/* ORIENTATION_RIGHTTOP */
-    "row 0 rhs, col 0 bottom",			/* ORIENTATION_RIGHTBOT */
-    "row 0 lhs, col 0 bottom",			/* ORIENTATION_LEFTBOT */
-};
-#define	NORIENTNAMES	(sizeof (orientNames) / sizeof (orientNames[0]))
-
-/*
- * Print the contents of the current directory
- * to the specified stdio file stream.
- */
-void
-TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
-{
-	register TIFFDirectory *td;
-	char *sep;
-	uint16 i;
-	long l, n;
-
-	fprintf(fd, "TIFF Directory at offset 0x%lx\n", tif->tif_diroff);
-	td = &tif->tif_dir;
-	if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) {
-		fprintf(fd, "  Subfile Type:");
-		sep = " ";
-		if (td->td_subfiletype & FILETYPE_REDUCEDIMAGE) {
-			fprintf(fd, "%sreduced-resolution image", sep);
-			sep = "/";
-		}
-		if (td->td_subfiletype & FILETYPE_PAGE) {
-			fprintf(fd, "%smulti-page document", sep);
-			sep = "/";
-		}
-		if (td->td_subfiletype & FILETYPE_MASK)
-			fprintf(fd, "%stransparency mask", sep);
-		fprintf(fd, " (%lu = 0x%lx)\n",
-		    (long) td->td_subfiletype, (long) td->td_subfiletype);
-	}
-	if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) {
-		fprintf(fd, "  Image Width: %lu Image Length: %lu",
-		    (u_long) td->td_imagewidth, (u_long) td->td_imagelength);
-		if (TIFFFieldSet(tif,FIELD_IMAGEDEPTH))
-			fprintf(fd, " Image Depth: %lu",
-			    (u_long) td->td_imagedepth);
-		fprintf(fd, "\n");
-	}
-
- 	/* Begin Pixar */
- 	if (TIFFFieldSet(tif,FIELD_IMAGEFULLWIDTH) ||
- 	    TIFFFieldSet(tif,FIELD_IMAGEFULLLENGTH)) {
-	  fprintf(fd, "  Pixar Full Image Width: %lu Full Image Length: %lu\n",
-		  (u_long) td->td_imagefullwidth,
-		  (u_long) td->td_imagefulllength);
- 	}
- 	if (TIFFFieldSet(tif,FIELD_TEXTUREFORMAT))
-	  _TIFFprintAsciiTag(fd, "Texture Format", td->td_textureformat);
- 	if (TIFFFieldSet(tif,FIELD_WRAPMODES))
-	  _TIFFprintAsciiTag(fd, "Texture Wrap Modes", td->td_wrapmodes);
- 	if (TIFFFieldSet(tif,FIELD_FOVCOT))
-	  fprintf(fd, "  Field of View Cotangent: %g\n", td->td_fovcot);
-	if (TIFFFieldSet(tif,FIELD_MATRIX_WORLDTOSCREEN)) {
-	  typedef float	Matrix[4][4];
-	  Matrix*		m = (Matrix*)td->td_matrixWorldToScreen;
-	  
-	  fprintf(fd, "  Matrix NP:\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n",
-		  (*m)[0][0], (*m)[0][1], (*m)[0][2], (*m)[0][3],
-		  (*m)[1][0], (*m)[1][1], (*m)[1][2], (*m)[1][3],
-		  (*m)[2][0], (*m)[2][1], (*m)[2][2], (*m)[2][3],
-		  (*m)[3][0], (*m)[3][1], (*m)[3][2], (*m)[3][3]);
- 	}
- 	if (TIFFFieldSet(tif,FIELD_MATRIX_WORLDTOCAMERA)) {
-	  typedef float	Matrix[4][4];
-	  Matrix*		m = (Matrix*)td->td_matrixWorldToCamera;
-	  
-	  fprintf(fd, "  Matrix Nl:\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n",
-		  (*m)[0][0], (*m)[0][1], (*m)[0][2], (*m)[0][3],
-		  (*m)[1][0], (*m)[1][1], (*m)[1][2], (*m)[1][3],
-		  (*m)[2][0], (*m)[2][1], (*m)[2][2], (*m)[2][3],
-		  (*m)[3][0], (*m)[3][1], (*m)[3][2], (*m)[3][3]);
- 	}
- 	/* End Pixar */
-	
-	if (TIFFFieldSet(tif,FIELD_TILEDIMENSIONS)) {
-		fprintf(fd, "  Tile Width: %lu Tile Length: %lu",
-		    (u_long) td->td_tilewidth, (u_long) td->td_tilelength);
-		if (TIFFFieldSet(tif,FIELD_TILEDEPTH))
-			fprintf(fd, " Tile Depth: %lu",
-			    (u_long) td->td_tiledepth);
-		fprintf(fd, "\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_RESOLUTION)) {
-		fprintf(fd, "  Resolution: %g, %g",
-		    td->td_xresolution, td->td_yresolution);
-		if (TIFFFieldSet(tif,FIELD_RESOLUTIONUNIT)) {
-			switch (td->td_resolutionunit) {
-			case RESUNIT_NONE:
-				fprintf(fd, " (unitless)");
-				break;
-			case RESUNIT_INCH:
-				fprintf(fd, " pixels/inch");
-				break;
-			case RESUNIT_CENTIMETER:
-				fprintf(fd, " pixels/cm");
-				break;
-			default:
-				fprintf(fd, " (unit %u = 0x%x)",
-				    td->td_resolutionunit,
-				    td->td_resolutionunit);
-				break;
-			}
-		}
-		fprintf(fd, "\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_POSITION))
-		fprintf(fd, "  Position: %g, %g\n",
-		    td->td_xposition, td->td_yposition);
-	if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
-		fprintf(fd, "  Bits/Sample: %u\n", td->td_bitspersample);
-	if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) {
-		fprintf(fd, "  Sample Format: ");
-		switch (td->td_sampleformat) {
-		case SAMPLEFORMAT_VOID:
-			fprintf(fd, "void\n");
-			break;
-		case SAMPLEFORMAT_INT:
-			fprintf(fd, "signed integer\n");
-			break;
-		case SAMPLEFORMAT_UINT:
-			fprintf(fd, "unsigned integer\n");
-			break;
-		case SAMPLEFORMAT_IEEEFP:
-			fprintf(fd, "IEEE floating point\n");
-			break;
-		case SAMPLEFORMAT_COMPLEXINT:
-			fprintf(fd, "complex signed integer\n");
-			break;
-		case SAMPLEFORMAT_COMPLEXIEEEFP:
-			fprintf(fd, "complex IEEE floating point\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_sampleformat, td->td_sampleformat);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_COMPRESSION)) {
-		const TIFFCodec* c = TIFFFindCODEC(td->td_compression);
-		fprintf(fd, "  Compression Scheme: ");
-		if (c)
-			fprintf(fd, "%s\n", c->name);
-		else
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_compression, td->td_compression);
-	}
-	if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) {
-		fprintf(fd, "  Photometric Interpretation: ");
-		if (td->td_photometric < NPHOTONAMES)
-			fprintf(fd, "%s\n", photoNames[td->td_photometric]);
-		else {
-			switch (td->td_photometric) {
-			case PHOTOMETRIC_LOGL:
-				fprintf(fd, "CIE Log2(L)\n");
-				break;
-			case PHOTOMETRIC_LOGLUV:
-				fprintf(fd, "CIE Log2(L) (u',v')\n");
-				break;
-			default:
-				fprintf(fd, "%u (0x%x)\n",
-				    td->td_photometric, td->td_photometric);
-				break;
-			}
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
-		fprintf(fd, "  Extra Samples: %u<", td->td_extrasamples);
-		sep = "";
-		for (i = 0; i < td->td_extrasamples; i++) {
-			switch (td->td_sampleinfo[i]) {
-			case EXTRASAMPLE_UNSPECIFIED:
-				fprintf(fd, "%sunspecified", sep);
-				break;
-			case EXTRASAMPLE_ASSOCALPHA:
-				fprintf(fd, "%sassoc-alpha", sep);
-				break;
-			case EXTRASAMPLE_UNASSALPHA:
-				fprintf(fd, "%sunassoc-alpha", sep);
-				break;
-			default:
-				fprintf(fd, "%s%u (0x%x)", sep,
-				    td->td_sampleinfo[i], td->td_sampleinfo[i]);
-				break;
-			}
-			sep = ", ";
-		}
-		fprintf(fd, ">\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_STONITS)) {
-		fprintf(fd, "  Sample to Nits conversion factor: %.4e\n",
-				td->td_stonits);
-	}
-#ifdef CMYK_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_INKSET)) {
-		fprintf(fd, "  Ink Set: ");
-		switch (td->td_inkset) {
-		case INKSET_CMYK:
-			fprintf(fd, "CMYK\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_inkset, td->td_inkset);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_INKNAMES)) {
-		char* cp;
-		fprintf(fd, "  Ink Names: ");
-		i = td->td_samplesperpixel;
-		sep = "";
-		for (cp = td->td_inknames; i > 0; cp = strchr(cp,'\0')+1, i--) {
-			fprintf(fd, "%s", sep);
-			_TIFFprintAscii(fd, cp);
-			sep = ", ";
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_NUMBEROFINKS))
-		fprintf(fd, " Number of Inks: %u\n", td->td_ninks);
-	if (TIFFFieldSet(tif,FIELD_DOTRANGE))
-		fprintf(fd, "  Dot Range: %u-%u\n",
-		    td->td_dotrange[0], td->td_dotrange[1]);
-	if (TIFFFieldSet(tif,FIELD_TARGETPRINTER))
-		_TIFFprintAsciiTag(fd, "Target Printer", td->td_targetprinter);
-#endif
-	if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) {
-		fprintf(fd, "  Thresholding: ");
-		switch (td->td_threshholding) {
-		case THRESHHOLD_BILEVEL:
-			fprintf(fd, "bilevel art scan\n");
-			break;
-		case THRESHHOLD_HALFTONE:
-			fprintf(fd, "halftone or dithered scan\n");
-			break;
-		case THRESHHOLD_ERRORDIFFUSE:
-			fprintf(fd, "error diffused\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_threshholding, td->td_threshholding);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_FILLORDER)) {
-		fprintf(fd, "  FillOrder: ");
-		switch (td->td_fillorder) {
-		case FILLORDER_MSB2LSB:
-			fprintf(fd, "msb-to-lsb\n");
-			break;
-		case FILLORDER_LSB2MSB:
-			fprintf(fd, "lsb-to-msb\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_fillorder, td->td_fillorder);
-			break;
-		}
-	}
-#ifdef YCBCR_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_YCBCRSUBSAMPLING))
-        {
-            /*
-             * For hacky reasons (see tif_jpeg.c - JPEGFixupTestSubsampling),
-             * we need to fetch this rather than trust what is in our
-             * structures.
-             */
-            uint16 subsampling[2];
-
-            TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                          subsampling + 0, subsampling + 1 );
-		fprintf(fd, "  YCbCr Subsampling: %u, %u\n",
-                        subsampling[0], subsampling[1] );
-        }
-	if (TIFFFieldSet(tif,FIELD_YCBCRPOSITIONING)) {
-		fprintf(fd, "  YCbCr Positioning: ");
-		switch (td->td_ycbcrpositioning) {
-		case YCBCRPOSITION_CENTERED:
-			fprintf(fd, "centered\n");
-			break;
-		case YCBCRPOSITION_COSITED:
-			fprintf(fd, "cosited\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_ycbcrpositioning, td->td_ycbcrpositioning);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_YCBCRCOEFFICIENTS))
-		fprintf(fd, "  YCbCr Coefficients: %g, %g, %g\n",
-		    td->td_ycbcrcoeffs[0],
-		    td->td_ycbcrcoeffs[1],
-		    td->td_ycbcrcoeffs[2]);
-#endif
-	if (TIFFFieldSet(tif,FIELD_HALFTONEHINTS))
-		fprintf(fd, "  Halftone Hints: light %u dark %u\n",
-		    td->td_halftonehints[0], td->td_halftonehints[1]);
-	if (TIFFFieldSet(tif,FIELD_ARTIST))
-		_TIFFprintAsciiTag(fd, "Artist", td->td_artist);
-	if (TIFFFieldSet(tif,FIELD_DATETIME))
-		_TIFFprintAsciiTag(fd, "Date & Time", td->td_datetime);
-	if (TIFFFieldSet(tif,FIELD_HOSTCOMPUTER))
-		_TIFFprintAsciiTag(fd, "Host Computer", td->td_hostcomputer);
-	if (TIFFFieldSet(tif,FIELD_COPYRIGHT))
-		_TIFFprintAsciiTag(fd, "Copyright", td->td_copyright);
-	if (TIFFFieldSet(tif,FIELD_DOCUMENTNAME))
-		_TIFFprintAsciiTag(fd, "Document Name", td->td_documentname);
-	if (TIFFFieldSet(tif,FIELD_IMAGEDESCRIPTION))
-		_TIFFprintAsciiTag(fd, "Image Description", td->td_imagedescription);
-	if (TIFFFieldSet(tif,FIELD_MAKE))
-		_TIFFprintAsciiTag(fd, "Make", td->td_make);
-	if (TIFFFieldSet(tif,FIELD_MODEL))
-		_TIFFprintAsciiTag(fd, "Model", td->td_model);
-	if (TIFFFieldSet(tif,FIELD_ORIENTATION)) {
-		fprintf(fd, "  Orientation: ");
-		if (td->td_orientation < NORIENTNAMES)
-			fprintf(fd, "%s\n", orientNames[td->td_orientation]);
-		else
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_orientation, td->td_orientation);
-	}
-	if (TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL))
-		fprintf(fd, "  Samples/Pixel: %u\n", td->td_samplesperpixel);
-	if (TIFFFieldSet(tif,FIELD_ROWSPERSTRIP)) {
-		fprintf(fd, "  Rows/Strip: ");
-		if (td->td_rowsperstrip == (uint32) -1)
-			fprintf(fd, "(infinite)\n");
-		else
-			fprintf(fd, "%lu\n", (u_long) td->td_rowsperstrip);
-	}
-	if (TIFFFieldSet(tif,FIELD_MINSAMPLEVALUE))
-		fprintf(fd, "  Min Sample Value: %u\n", td->td_minsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE))
-		fprintf(fd, "  Max Sample Value: %u\n", td->td_maxsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE))
-		fprintf(fd, "  SMin Sample Value: %g\n",
-		    td->td_sminsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE))
-		fprintf(fd, "  SMax Sample Value: %g\n",
-		    td->td_smaxsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_PLANARCONFIG)) {
-		fprintf(fd, "  Planar Configuration: ");
-		switch (td->td_planarconfig) {
-		case PLANARCONFIG_CONTIG:
-			fprintf(fd, "single image plane\n");
-			break;
-		case PLANARCONFIG_SEPARATE:
-			fprintf(fd, "separate image planes\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_planarconfig, td->td_planarconfig);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_PAGENAME))
-		_TIFFprintAsciiTag(fd, "Page Name", td->td_pagename);
-	if (TIFFFieldSet(tif,FIELD_PAGENUMBER))
-		fprintf(fd, "  Page Number: %u-%u\n",
-		    td->td_pagenumber[0], td->td_pagenumber[1]);
-	if (TIFFFieldSet(tif,FIELD_COLORMAP)) {
-		fprintf(fd, "  Color Map: ");
-		if (flags & TIFFPRINT_COLORMAP) {
-			fprintf(fd, "\n");
-			n = 1L<<td->td_bitspersample;
-			for (l = 0; l < n; l++)
-				fprintf(fd, "   %5lu: %5u %5u %5u\n",
-				    l,
-				    td->td_colormap[0][l],
-				    td->td_colormap[1][l],
-				    td->td_colormap[2][l]);
-		} else
-			fprintf(fd, "(present)\n");
-	}
-#ifdef COLORIMETRY_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_WHITEPOINT))
-		fprintf(fd, "  White Point: %g-%g\n",
-		    td->td_whitepoint[0], td->td_whitepoint[1]);
-	if (TIFFFieldSet(tif,FIELD_PRIMARYCHROMAS))
-		fprintf(fd, "  Primary Chromaticities: %g,%g %g,%g %g,%g\n",
-		    td->td_primarychromas[0], td->td_primarychromas[1],
-		    td->td_primarychromas[2], td->td_primarychromas[3],
-		    td->td_primarychromas[4], td->td_primarychromas[5]);
-	if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) {
-		fprintf(fd, "  Reference Black/White:\n");
-		for (i = 0; i < td->td_samplesperpixel; i++)
-			fprintf(fd, "    %2d: %5g %5g\n",
-			    i,
-			    td->td_refblackwhite[2*i+0],
-			    td->td_refblackwhite[2*i+1]);
-	}
-	if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) {
-		fprintf(fd, "  Transfer Function: ");
-		if (flags & TIFFPRINT_CURVES) {
-			fprintf(fd, "\n");
-			n = 1L<<td->td_bitspersample;
-			for (l = 0; l < n; l++) {
-				fprintf(fd, "    %2lu: %5u",
-				    l, td->td_transferfunction[0][l]);
-				for (i = 1; i < td->td_samplesperpixel; i++)
-					fprintf(fd, " %5u",
-					    td->td_transferfunction[i][l]);
-				fputc('\n', fd);
-			}
-		} else
-			fprintf(fd, "(present)\n");
-	}
-#endif
-#ifdef ICC_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_ICCPROFILE))
-		fprintf(fd, "  ICC Profile: <present>, %lu bytes\n",
-		    (u_long) td->td_profileLength);
-#endif
-#ifdef PHOTOSHOP_SUPPORT
- 	if (TIFFFieldSet(tif,FIELD_PHOTOSHOP))
- 		fprintf(fd, "  Photoshop Data: <present>, %lu bytes\n",
- 		    (u_long) td->td_photoshopLength);
-#endif
-#ifdef IPTC_SUPPORT
- 	if (TIFFFieldSet(tif,FIELD_RICHTIFFIPTC))
- 		fprintf(fd, "  RichTIFFIPTC Data: <present>, %lu bytes\n",
- 		    (u_long) td->td_richtiffiptcLength);
-#endif
-#if SUBIFD_SUPPORT
-	if (TIFFFieldSet(tif, FIELD_SUBIFD)) {
-		fprintf(fd, "  SubIFD Offsets:");
-		for (i = 0; i < td->td_nsubifd; i++)
-			fprintf(fd, " %5lu", (long) td->td_subifd[i]);
-		fputc('\n', fd);
-	}
-#endif
-        /*
-        ** Custom tag support.
-        */
-        {
-            int  i;
-            short count;
-
-            count = (short) TIFFGetTagListCount( tif );
-            for( i = 0; i < count; i++ )
-            {
-                ttag_t  tag = TIFFGetTagListEntry( tif, i );
-                const TIFFFieldInfo *fld;
-
-                fld = TIFFFieldWithTag( tif, tag );
-                if( fld == NULL )
-                    continue;
-
-                if( fld->field_passcount )
-                {
-                    short value_count;
-                    int j;
-                    void *raw_data;
-                    
-                    if( TIFFGetField( tif, tag, &value_count, &raw_data ) != 1 )
-                        continue;
-
-                    fprintf(fd, "  %s: ", fld->field_name );
-
-                    for( j = 0; j < value_count; j++ )
-                    {
-			if( fld->field_type == TIFF_BYTE )
-                            fprintf( fd, "%d",
-                                     (int) ((char *) raw_data)[j] );
-			else if( fld->field_type == TIFF_SHORT )
-                            fprintf( fd, "%d",
-                                     (int) ((short *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_LONG )
-                            fprintf( fd, "%d",
-                                     (int) ((long *) raw_data)[j] );
-			else if( fld->field_type == TIFF_RATIONAL )
-			    fprintf( fd, "%f",
-				     ((float *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_ASCII )
-                        {
-                            fprintf( fd, "%s",
-                                     (char *) raw_data );
-                            break;
-                        }
-                        else if( fld->field_type == TIFF_DOUBLE )
-                            fprintf( fd, "%f",
-                                     ((double *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_FLOAT )
-                            fprintf( fd, "%f",
-                                     ((float *) raw_data)[j] );
-                        else
-                        {
-                            fprintf( fd,
-                                     "<unsupported data type in TIFFPrint>" );
-                            break;
-                        }
-
-                        if( j < value_count-1 )
-                            fprintf( fd, "," );
-                    }
-                    fprintf( fd, "\n" );
-                } 
-                else if( !fld->field_passcount
-                         && fld->field_type == TIFF_ASCII )
-                {
-                    char *data;
-                    
-                    if( TIFFGetField( tif, tag, &data ) )
-                        fprintf(fd, "  %s: %s\n", fld->field_name, data );
-                }
-            }
-        }
-        
-	if (tif->tif_tagmethods.printdir)
-		(*tif->tif_tagmethods.printdir)(tif, fd, flags);
-	if ((flags & TIFFPRINT_STRIPS) &&
-	    TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) {
-		tstrip_t s;
-
-		fprintf(fd, "  %lu %s:\n",
-		    (long) td->td_nstrips,
-		    isTiled(tif) ? "Tiles" : "Strips");
-		for (s = 0; s < td->td_nstrips; s++)
-			fprintf(fd, "    %3lu: [%8lu, %8lu]\n",
-			    (u_long) s,
-			    (u_long) td->td_stripoffset[s],
-			    (u_long) td->td_stripbytecount[s]);
-	}
-}
-
-void
-_TIFFprintAscii(FILE* fd, const char* cp)
-{
-	for (; *cp != '\0'; cp++) {
-		const char* tp;
-
-		if (isprint(*cp)) {
-			fputc(*cp, fd);
-			continue;
-		}
-		for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++)
-			if (*tp++ == *cp)
-				break;
-		if (*tp)
-			fprintf(fd, "\\%c", *tp);
-		else
-			fprintf(fd, "\\%03o", *cp & 0xff);
-	}
-}
-
-void
-_TIFFprintAsciiTag(FILE* fd, const char* name, const char* value)
-{
-	fprintf(fd, "  %s: \"", name);
-	_TIFFprintAscii(fd, value);
-	fprintf(fd, "\"\n");
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_read.c b/tkimg1.3/libtiff/libtiff/tif_read.c
deleted file mode 100644
index 3a724f0..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_read.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_read.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- * Scanline-oriented Read Support
- */
-#include "tiffiop.h"
-#include <stdio.h>
-#include <assert.h>
-
-	int TIFFFillStrip(TIFF*, tstrip_t);
-	int TIFFFillTile(TIFF*, ttile_t);
-static	int TIFFStartStrip(TIFF*, tstrip_t);
-static	int TIFFStartTile(TIFF*, ttile_t);
-static	int TIFFCheckRead(TIFF*, int);
-
-#define	NOSTRIP	((tstrip_t) -1)			/* undefined state */
-#define	NOTILE	((ttile_t) -1)			/* undefined state */
-
-/*
- * Seek to a random row+sample in a file.
- */
-static int
-TIFFSeek(TIFF* tif, uint32 row, tsample_t sample)
-{
-	register TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t strip;
-
-	if (row >= td->td_imagelength) {	/* out of range */
-		TIFFError(tif->tif_name, "%lu: Row out of range, max %lu",
-		    (u_long) row, (u_long) td->td_imagelength);
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%lu: Sample out of range, max %lu",
-			    (u_long) sample, (u_long) td->td_samplesperpixel);
-			return (0);
-		}
-		strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
-	} else
-		strip = row / td->td_rowsperstrip;
-	if (strip != tif->tif_curstrip) { 	/* different strip, refill */
-		if (!TIFFFillStrip(tif, strip))
-			return (0);
-	} else if (row < tif->tif_row) {
-		/*
-		 * Moving backwards within the same strip: backup
-		 * to the start and then decode forward (below).
-		 *
-		 * NB: If you're planning on lots of random access within a
-		 * strip, it's better to just read and decode the entire
-		 * strip, and then access the decoded data in a random fashion.
-		 */
-		if (!TIFFStartStrip(tif, strip))
-			return (0);
-	}
-	if (row != tif->tif_row) {
-		/*
-		 * Seek forward to the desired row.
-		 */
-		if (!(*tif->tif_seek)(tif, row - tif->tif_row))
-			return (0);
-		tif->tif_row = row;
-	}
-	return (1);
-}
-
-int
-TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
-{
-	int e;
-
-	if (!TIFFCheckRead(tif, 0))
-		return (-1);
-	if( (e = TIFFSeek(tif, row, sample)) != 0) {
-		/*
-		 * Decompress desired row into user buffer.
-		 */
-		e = (*tif->tif_decoderow)
-		    (tif, (tidata_t) buf, tif->tif_scanlinesize, sample);
-
-                /* we are now poised at the beginning of the next row */
-                tif->tif_row = row + 1;
-
-		if (e)
-			(*tif->tif_postdecode)(tif, (tidata_t) buf,
-			    tif->tif_scanlinesize);
-	}
-	return (e > 0 ? 1 : -1);
-}
-
-/*
- * Read a strip of data and decompress the specified
- * amount into the user-supplied buffer.
- */
-tsize_t
-TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 nrows;
-	tsize_t stripsize;
-        tstrip_t sep_strip, strips_per_sep;
-
-	if (!TIFFCheckRead(tif, 0))
-		return (-1);
-	if (strip >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%ld: Strip out of range, max %ld",
-		    (long) strip, (long) td->td_nstrips);
-		return (-1);
-	}
-	/*
-	 * Calculate the strip size according to the number of
-	 * rows in the strip (check for truncated last strip on any
-         * of the separations).
-	 */
-        if( td->td_rowsperstrip >= td->td_imagelength )
-            strips_per_sep = 1;
-        else
-            strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
-                / td->td_rowsperstrip;
-
-        sep_strip = strip % strips_per_sep;
-
-	if (sep_strip != strips_per_sep-1 ||
-	    (nrows = td->td_imagelength % td->td_rowsperstrip) == 0)
-		nrows = td->td_rowsperstrip;
-
-	stripsize = TIFFVStripSize(tif, nrows);
-	if (size == (tsize_t) -1)
-		size = stripsize;
-	else if (size > stripsize)
-		size = stripsize;
-	if (TIFFFillStrip(tif, strip) 
-            && (*tif->tif_decodestrip)(tif, (tidata_t) buf, size, 
-                         (tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
-		(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
-		return (size);
-	} else
-		return ((tsize_t) -1);
-}
-
-static tsize_t
-TIFFReadRawStrip1(TIFF* tif,
-    tstrip_t strip, tdata_t buf, tsize_t size, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!isMapped(tif)) {
-		tsize_t cc;
-
-		if (!SeekOK(tif, td->td_stripoffset[strip])) {
-			TIFFError(module,
-			    "%s: Seek error at scanline %lu, strip %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row, (u_long) strip);
-			return (-1);
-		}
-		cc = TIFFReadFile(tif, buf, size);
-		if (cc != size) {
-			TIFFError(module,
-		"%s: Read error at scanline %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row,
-			    (u_long) cc,
-			    (u_long) size);
-			return (-1);
-		}
-	} else {
-		if (td->td_stripoffset[strip] + size > tif->tif_size) {
-			TIFFError(module,
-    "%s: Read error at scanline %lu, strip %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row,
-			    (u_long) strip,
-			    (u_long) tif->tif_size - td->td_stripoffset[strip],
-			    (u_long) size);
-			return (-1);
-		}
-		_TIFFmemcpy(buf, tif->tif_base + td->td_stripoffset[strip], size);
-	}
-	return (size);
-}
-
-/*
- * Read a strip of data from the file.
- */
-tsize_t
-TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
-{
-	static const char module[] = "TIFFReadRawStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	if (!TIFFCheckRead(tif, 0))
-		return ((tsize_t) -1);
-	if (strip >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%lu: Strip out of range, max %lu",
-		    (u_long) strip, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	bytecount = td->td_stripbytecount[strip];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid strip byte count, strip %lu",
-		    (u_long) bytecount, (u_long) strip);
-		return ((tsize_t) -1);
-	}
-	if (size != (tsize_t)-1 && size < bytecount)
-		bytecount = size;
-	return (TIFFReadRawStrip1(tif, strip, buf, bytecount, module));
-}
-
-/*
- * Read the specified strip and setup for decoding. 
- * The data buffer is expanded, as necessary, to
- * hold the strip's data.
- */
-int
-TIFFFillStrip(TIFF* tif, tstrip_t strip)
-{
-	static const char module[] = "TIFFFillStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	bytecount = td->td_stripbytecount[strip];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid strip byte count, strip %lu",
-		    (u_long) bytecount, (u_long) strip);
-		return (0);
-	}
-	if (isMapped(tif) &&
-	    (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) {
-		/*
-		 * The image is mapped into memory and we either don't
-		 * need to flip bits or the compression routine is going
-		 * to handle this operation itself.  In this case, avoid
-		 * copying the raw data and instead just reference the
-		 * data from the memory mapped file image.  This assumes
-		 * that the decompression routines do not modify the
-		 * contents of the raw data buffer (if they try to,
-		 * the application will get a fault since the file is
-		 * mapped read-only).
-		 */
-		if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-		if ( td->td_stripoffset[strip] + bytecount > tif->tif_size) {
-			/*
-			 * This error message might seem strange, but it's
-			 * what would happen if a read were done instead.
-			 */
-			TIFFError(module,
-		    "%s: Read error on strip %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) strip,
-			    (u_long) tif->tif_size - td->td_stripoffset[strip],
-			    (u_long) bytecount);
-			tif->tif_curstrip = NOSTRIP;
-			return (0);
-		}
-		tif->tif_rawdatasize = bytecount;
-		tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];
-	} else {
-		/*
-		 * Expand raw data buffer, if needed, to
-		 * hold data strip coming from file
-		 * (perhaps should set upper bound on
-		 *  the size of a buffer we'll use?).
-		 */
-		if (bytecount > tif->tif_rawdatasize) {
-			tif->tif_curstrip = NOSTRIP;
-			if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
-				TIFFError(module,
-				"%s: Data buffer too small to hold strip %lu",
-				    tif->tif_name, (u_long) strip);
-				return (0);
-			}
-			if (!TIFFReadBufferSetup(tif, 0,
-			    TIFFroundup(bytecount, 1024)))
-				return (0);
-		}
-		if (TIFFReadRawStrip1(tif, strip, (u_char *)tif->tif_rawdata,
-		    bytecount, module) != bytecount)
-			return (0);
-		if (!isFillOrder(tif, td->td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits(tif->tif_rawdata, bytecount);
-	}
-	return (TIFFStartStrip(tif, strip));
-}
-
-/*
- * Tile-oriented Read Support
- * Contributed by Nancy Cam (Silicon Graphics).
- */
-
-/*
- * Read and decompress a tile of data.  The
- * tile is selected by the (x,y,z,s) coordinates.
- */
-tsize_t
-TIFFReadTile(TIFF* tif,
-    tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
-		return (-1);
-	return (TIFFReadEncodedTile(tif,
-	    TIFFComputeTile(tif, x, y, z, s), buf, (tsize_t) -1));
-}
-
-/*
- * Read a tile of data and decompress the specified
- * amount into the user-supplied buffer.
- */
-tsize_t
-TIFFReadEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t tilesize = tif->tif_tilesize;
-
-	if (!TIFFCheckRead(tif, 1))
-		return (-1);
-	if (tile >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%ld: Tile out of range, max %ld",
-		    (long) tile, (u_long) td->td_nstrips);
-		return (-1);
-	}
-	if (size == (tsize_t) -1)
-		size = tilesize;
-	else if (size > tilesize)
-		size = tilesize;
-	if (TIFFFillTile(tif, tile) && (*tif->tif_decodetile)(tif,
-	    (tidata_t) buf, size, (tsample_t)(tile/td->td_stripsperimage))) {
-		(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
-		return (size);
-	} else
-		return (-1);
-}
-
-static tsize_t
-TIFFReadRawTile1(TIFF* tif,
-    ttile_t tile, tdata_t buf, tsize_t size, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!isMapped(tif)) {
-		tsize_t cc;
-
-		if (!SeekOK(tif, td->td_stripoffset[tile])) {
-			TIFFError(module,
-			    "%s: Seek error at row %ld, col %ld, tile %ld",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (long) tile);
-			return ((tsize_t) -1);
-		}
-		cc = TIFFReadFile(tif, buf, size);
-		if (cc != size) {
-			TIFFError(module,
-	    "%s: Read error at row %ld, col %ld; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (u_long) cc,
-			    (u_long) size);
-			return ((tsize_t) -1);
-		}
-	} else {
-		if (td->td_stripoffset[tile] + size > tif->tif_size) {
-			TIFFError(module,
-    "%s: Read error at row %ld, col %ld, tile %ld; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (long) tile,
-			    (u_long) tif->tif_size - td->td_stripoffset[tile],
-			    (u_long) size);
-			return ((tsize_t) -1);
-		}
-		_TIFFmemcpy(buf, tif->tif_base + td->td_stripoffset[tile], size);
-	}
-	return (size);
-}
-
-/*
- * Read a tile of data from the file.
- */
-tsize_t
-TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
-{
-	static const char module[] = "TIFFReadRawTile";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	if (!TIFFCheckRead(tif, 1))
-		return ((tsize_t) -1);
-	if (tile >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%lu: Tile out of range, max %lu",
-		    (u_long) tile, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	bytecount = td->td_stripbytecount[tile];
-	if (size != (tsize_t) -1 && size < bytecount)
-		bytecount = size;
-	return (TIFFReadRawTile1(tif, tile, buf, bytecount, module));
-}
-
-/*
- * Read the specified tile and setup for decoding. 
- * The data buffer is expanded, as necessary, to
- * hold the tile's data.
- */
-int
-TIFFFillTile(TIFF* tif, ttile_t tile)
-{
-	static const char module[] = "TIFFFillTile";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	bytecount = td->td_stripbytecount[tile];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid tile byte count, tile %lu",
-		    (u_long) bytecount, (u_long) tile);
-		return (0);
-	}
-	if (isMapped(tif) &&
-	    (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) {
-		/*
-		 * The image is mapped into memory and we either don't
-		 * need to flip bits or the compression routine is going
-		 * to handle this operation itself.  In this case, avoid
-		 * copying the raw data and instead just reference the
-		 * data from the memory mapped file image.  This assumes
-		 * that the decompression routines do not modify the
-		 * contents of the raw data buffer (if they try to,
-		 * the application will get a fault since the file is
-		 * mapped read-only).
-		 */
-		if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-		if ( td->td_stripoffset[tile] + bytecount > tif->tif_size) {
-			tif->tif_curtile = NOTILE;
-			return (0);
-		}
-		tif->tif_rawdatasize = bytecount;
-		tif->tif_rawdata = tif->tif_base + td->td_stripoffset[tile];
-	} else {
-		/*
-		 * Expand raw data buffer, if needed, to
-		 * hold data tile coming from file
-		 * (perhaps should set upper bound on
-		 *  the size of a buffer we'll use?).
-		 */
-		if (bytecount > tif->tif_rawdatasize) {
-			tif->tif_curtile = NOTILE;
-			if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
-				TIFFError(module,
-				"%s: Data buffer too small to hold tile %ld",
-				    tif->tif_name, (long) tile);
-				return (0);
-			}
-			if (!TIFFReadBufferSetup(tif, 0,
-			    TIFFroundup(bytecount, 1024)))
-				return (0);
-		}
-		if (TIFFReadRawTile1(tif, tile, (u_char *)tif->tif_rawdata,
-		    bytecount, module) != bytecount)
-			return (0);
-		if (!isFillOrder(tif, td->td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits(tif->tif_rawdata, bytecount);
-	}
-	return (TIFFStartTile(tif, tile));
-}
-
-/*
- * Setup the raw data buffer in preparation for
- * reading a strip of raw data.  If the buffer
- * is specified as zero, then a buffer of appropriate
- * size is allocated by the library.  Otherwise,
- * the client must guarantee that the buffer is
- * large enough to hold any individual strip of
- * raw data.
- */
-int
-TIFFReadBufferSetup(TIFF* tif, tdata_t bp, tsize_t size)
-{
-	static const char module[] = "TIFFReadBufferSetup";
-
-	if (tif->tif_rawdata) {
-		if (tif->tif_flags & TIFF_MYBUFFER)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_rawdata = NULL;
-	}
-	if (bp) {
-		tif->tif_rawdatasize = size;
-		tif->tif_rawdata = (tidata_t) bp;
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-	} else {
-		tif->tif_rawdatasize = TIFFroundup(size, 1024);
-		tif->tif_rawdata = (tidata_t) _TIFFmalloc(tif->tif_rawdatasize);
-		tif->tif_flags |= TIFF_MYBUFFER;
-	}
-	if (tif->tif_rawdata == NULL) {
-		TIFFError(module,
-		    "%s: No space for data buffer at scanline %ld",
-		    tif->tif_name, (long) tif->tif_row);
-		tif->tif_rawdatasize = 0;
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Set state to appear as if a
- * strip has just been read in.
- */
-static int
-TIFFStartStrip(TIFF* tif, tstrip_t strip)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupdecode)(tif))
-			return (0);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_rawcc = td->td_stripbytecount[strip];
-	return ((*tif->tif_predecode)(tif,
-			(tsample_t)(strip / td->td_stripsperimage)));
-}
-
-/*
- * Set state to appear as if a
- * tile has just been read in.
- */
-static int
-TIFFStartTile(TIFF* tif, ttile_t tile)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupdecode)(tif))
-			return (0);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_curtile = tile;
-	tif->tif_row =
-	    (tile % TIFFhowmany(td->td_imagewidth, td->td_tilewidth)) *
-		td->td_tilelength;
-	tif->tif_col =
-	    (tile % TIFFhowmany(td->td_imagelength, td->td_tilelength)) *
-		td->td_tilewidth;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_rawcc = td->td_stripbytecount[tile];
-	return ((*tif->tif_predecode)(tif,
-			(tsample_t)(tile/td->td_stripsperimage)));
-}
-
-static int
-TIFFCheckRead(TIFF* tif, int tiles)
-{
-	if (tif->tif_mode == O_WRONLY) {
-		TIFFError(tif->tif_name, "File not open for reading");
-		return (0);
-	}
-	if (tiles ^ isTiled(tif)) {
-		TIFFError(tif->tif_name, tiles ?
-		    "Can not read tiles from a stripped image" :
-		    "Can not read scanlines from a tiled image");
-		return (0);
-	}
-	return (1);
-}
-
-void
-_TIFFNoPostDecode(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif; (void) buf; (void) cc;
-}
-
-void
-_TIFFSwab16BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 1) == 0);
-    TIFFSwabArrayOfShort((uint16*) buf, cc/2);
-}
-
-void
-_TIFFSwab32BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 3) == 0);
-    TIFFSwabArrayOfLong((uint32*) buf, cc/4);
-}
-
-void
-_TIFFSwab64BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 7) == 0);
-    TIFFSwabArrayOfDouble((double*) buf, cc/8);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_strip.c b/tkimg1.3/libtiff/libtiff/tif_strip.c
deleted file mode 100644
index 58357ef..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_strip.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_strip.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Strip-organized Image Support Routines.
- */
-#include "tiffiop.h"
-
-/*
- * Compute which strip a (row,sample) value is in.
- */
-tstrip_t
-TIFFComputeStrip(TIFF* tif, uint32 row, tsample_t sample)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t strip;
-
-	strip = row / td->td_rowsperstrip;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%u: Sample out of range, max %u",
-			    sample, td->td_samplesperpixel);
-			return ((tstrip_t) 0);
-		}
-		strip += sample*td->td_stripsperimage;
-	}
-	return (strip);
-}
-
-/*
- * Compute how many strips are in an image.
- */
-tstrip_t
-TIFFNumberOfStrips(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t nstrips;
-
-	nstrips = (td->td_rowsperstrip == (uint32) -1 ?
-	     (td->td_imagelength != 0 ? 1 : 0) :
-	     TIFFhowmany(td->td_imagelength, td->td_rowsperstrip));
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		nstrips *= td->td_samplesperpixel;
-	return (nstrips);
-}
-
-/*
- * Compute the # bytes in a variable height, row-aligned strip.
- */
-tsize_t
-TIFFVStripSize(TIFF* tif, uint32 nrows)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (nrows == (uint32) -1)
-		nrows = td->td_imagelength;
-#ifdef YCBCR_SUPPORT
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    td->td_photometric == PHOTOMETRIC_YCBCR &&
-	    !isUpSampled(tif)) {
-		/*
-		 * Packed YCbCr data contain one Cb+Cr for every
-		 * HorizontalSampling*VerticalSampling Y values.
-		 * Must also roundup width and height when calculating
-		 * since images that are not a multiple of the
-		 * horizontal/vertical subsampling area include
-		 * YCbCr data for the extended image.
-		 */
-                uint16 ycbcrsubsampling[2];
-                tsize_t w, scanline, samplingarea;
-
-                TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                              ycbcrsubsampling + 0, 
-                              ycbcrsubsampling + 1 );
-
-		w = TIFFroundup(td->td_imagewidth, ycbcrsubsampling[0]);
-		scanline = TIFFhowmany(w*td->td_bitspersample, 8);
-		samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1];
-		nrows = TIFFroundup(nrows, ycbcrsubsampling[1]);
-		/* NB: don't need TIFFhowmany here 'cuz everything is rounded */
-		return ((tsize_t)
-		    (nrows*scanline + 2*(nrows*scanline / samplingarea)));
-	} else
-#endif
-		return ((tsize_t)(nrows * TIFFScanlineSize(tif)));
-}
-
-
-/*
- * Compute the # bytes in a raw strip.
- */
-tsize_t
-TIFFRawStripSize(TIFF* tif, tstrip_t strip)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	tsize_t bytecount = td->td_stripbytecount[strip];
-
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-			  "%lu: Invalid strip byte count, strip %lu",
-			  (u_long) bytecount, (u_long) strip);
-		bytecount = (tsize_t) -1;
-	}
-
-	return bytecount;
-}
-
-/*
- * Compute the # bytes in a (row-aligned) strip.
- *
- * Note that if RowsPerStrip is larger than the
- * recorded ImageLength, then the strip size is
- * truncated to reflect the actual space required
- * to hold the strip.
- */
-tsize_t
-TIFFStripSize(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	uint32 rps = td->td_rowsperstrip;
-	if (rps > td->td_imagelength)
-		rps = td->td_imagelength;
-	return (TIFFVStripSize(tif, rps));
-}
-
-/*
- * Compute a default strip size based on the image
- * characteristics and a requested value.  If the
- * request is <1 then we choose a strip size according
- * to certain heuristics.
- */
-uint32
-TIFFDefaultStripSize(TIFF* tif, uint32 request)
-{
-	return (*tif->tif_defstripsize)(tif, request);
-}
-
-uint32
-_TIFFDefaultStripSize(TIFF* tif, uint32 s)
-{
-	if ((int32) s < 1) {
-		/*
-		 * If RowsPerStrip is unspecified, try to break the
-		 * image up into strips that are approximately 8Kbytes.
-		 */
-		tsize_t scanline = TIFFScanlineSize(tif);
-		s = (uint32)(8*1024) / (scanline == 0 ? 1 : scanline);
-		if (s == 0)		/* very wide images */
-			s = 1;
-	}
-	return (s);
-}
-
-/*
- * Return the number of bytes to read/write in a call to
- * one of the scanline-oriented i/o routines.  Note that
- * this number may be 1/samples-per-pixel if data is
- * stored as separate planes.
- */
-tsize_t
-TIFFScanlineSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t scanline;
-	
-	scanline = td->td_bitspersample * td->td_imagewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG)
-		scanline *= td->td_samplesperpixel;
-	return ((tsize_t) TIFFhowmany(scanline, 8));
-}
-
-/*
- * Return the number of bytes required to store a complete
- * decoded and packed raster scanline (as opposed to the
- * I/O size returned by TIFFScanlineSize which may be less
- * if data is store as separate planes).
- */
-tsize_t
-TIFFRasterScanlineSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t scanline;
-	
-	scanline = td->td_bitspersample * td->td_imagewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		scanline *= td->td_samplesperpixel;
-		return ((tsize_t) TIFFhowmany(scanline, 8));
-	} else
-		return ((tsize_t)
-		    TIFFhowmany(scanline, 8)*td->td_samplesperpixel);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_swab.c b/tkimg1.3/libtiff/libtiff/tif_swab.c
deleted file mode 100644
index 772751a..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_swab.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_swab.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Bit & Byte Swapping Support.
- *
- * XXX We assume short = 16-bits and long = 32-bits XXX
- */
-#include "tiffiop.h"
-
-#ifndef TIFFSwabShort
-void
-TIFFSwabShort(uint16* wp)
-{
-	register u_char* cp = (u_char*) wp;
-	u_char t;
-
-	t = cp[1]; cp[1] = cp[0]; cp[0] = t;
-}
-#endif
-
-#ifndef TIFFSwabLong
-void
-TIFFSwabLong(uint32* lp)
-{
-	register u_char* cp = (u_char*) lp;
-	u_char t;
-
-	t = cp[3]; cp[3] = cp[0]; cp[0] = t;
-	t = cp[2]; cp[2] = cp[1]; cp[1] = t;
-}
-#endif
-
-#ifndef TIFFSwabArrayOfShort
-void
-TIFFSwabArrayOfShort(uint16* wp, register u_long n)
-{
-	register u_char* cp;
-	register u_char t;
-
-	/* XXX unroll loop some */
-	while (n-- > 0) {
-		cp = (u_char*) wp;
-		t = cp[1]; cp[1] = cp[0]; cp[0] = t;
-		wp++;
-	}
-}
-#endif
-
-#ifndef TIFFSwabArrayOfLong
-void
-TIFFSwabArrayOfLong(register uint32* lp, register u_long n)
-{
-	register unsigned char *cp;
-	register unsigned char t;
-
-	/* XXX unroll loop some */
-	while (n-- > 0) {
-		cp = (unsigned char *)lp;
-		t = cp[3]; cp[3] = cp[0]; cp[0] = t;
-		t = cp[2]; cp[2] = cp[1]; cp[1] = t;
-		lp++;
-	}
-}
-#endif
-
-#ifndef TIFFSwabDouble
-void
-TIFFSwabDouble(double *dp)
-{
-        register uint32* lp = (uint32*) dp;
-        uint32 t;
-
-	TIFFSwabArrayOfLong(lp, 2);
-	t = lp[0]; lp[0] = lp[1]; lp[1] = t;
-}
-#endif
-
-#ifndef TIFFSwabArrayOfDouble
-void
-TIFFSwabArrayOfDouble(double* dp, register u_long n)
-{
-	register uint32* lp = (uint32*) dp;
-        register uint32 t;
-
-	TIFFSwabArrayOfLong(lp, n + n);
-        while (n-- > 0) {
-		t = lp[0]; lp[0] = lp[1]; lp[1] = t;
-                lp += 2;
-        }
-}
-#endif
-
-/*
- * Bit reversal tables.  TIFFBitRevTable[<byte>] gives
- * the bit reversed value of <byte>.  Used in various
- * places in the library when the FillOrder requires
- * bit reversal of byte values (e.g. CCITT Fax 3
- * encoding/decoding).  TIFFNoBitRevTable is provided
- * for algorithms that want an equivalent table that
- * do not reverse bit values.
- */
-static const unsigned char TIFFBitRevTable[256] = {
-    0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-    0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-    0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-    0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-    0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-    0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-    0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-    0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-    0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-    0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-    0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-    0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-    0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-    0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-    0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-    0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-    0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-    0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-    0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-    0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-    0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-    0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-    0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-    0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-    0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-    0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-    0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-    0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-    0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-    0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-    0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-    0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-static const unsigned char TIFFNoBitRevTable[256] = {
-    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
-    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 
-    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
-    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 
-    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 
-    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
-    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 
-    0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 
-    0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 
-    0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 
-    0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 
-    0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 
-    0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 
-    0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 
-    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 
-    0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 
-    0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 
-    0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 
-    0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 
-    0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 
-    0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 
-    0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 
-    0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 
-    0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 
-    0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 
-    0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 
-    0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 
-    0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 
-    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 
-    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 
-};
-
-const unsigned char*
-TIFFGetBitRevTable(int reversed)
-{
-	return (reversed ? TIFFBitRevTable : TIFFNoBitRevTable);
-}
-
-void
-TIFFReverseBits(register u_char* cp, register u_long n)
-{
-	for (; n > 8; n -= 8) {
-		cp[0] = TIFFBitRevTable[cp[0]];
-		cp[1] = TIFFBitRevTable[cp[1]];
-		cp[2] = TIFFBitRevTable[cp[2]];
-		cp[3] = TIFFBitRevTable[cp[3]];
-		cp[4] = TIFFBitRevTable[cp[4]];
-		cp[5] = TIFFBitRevTable[cp[5]];
-		cp[6] = TIFFBitRevTable[cp[6]];
-		cp[7] = TIFFBitRevTable[cp[7]];
-		cp += 8;
-	}
-	while (n-- > 0)
-		*cp = TIFFBitRevTable[*cp], cp++;
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_thunder.c b/tkimg1.3/libtiff/libtiff/tif_thunder.c
deleted file mode 100644
index 79fa555..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_thunder.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_thunder.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef THUNDER_SUPPORT
-/*
- * TIFF Library.
- *
- * ThunderScan 4-bit Compression Algorithm Support
- */
-
-/*
- * ThunderScan uses an encoding scheme designed for
- * 4-bit pixel values.  Data is encoded in bytes, with
- * each byte split into a 2-bit code word and a 6-bit
- * data value.  The encoding gives raw data, runs of
- * pixels, or pixel values encoded as a delta from the
- * previous pixel value.  For the latter, either 2-bit
- * or 3-bit delta values are used, with the deltas packed
- * into a single byte.
- */
-#define	THUNDER_DATA		0x3f	/* mask for 6-bit data */
-#define	THUNDER_CODE		0xc0	/* mask for 2-bit code word */
-/* code values */
-#define	THUNDER_RUN		0x00	/* run of pixels w/ encoded count */
-#define	THUNDER_2BITDELTAS	0x40	/* 3 pixels w/ encoded 2-bit deltas */
-#define	    DELTA2_SKIP		2	/* skip code for 2-bit deltas */
-#define	THUNDER_3BITDELTAS	0x80	/* 2 pixels w/ encoded 3-bit deltas */
-#define	    DELTA3_SKIP		4	/* skip code for 3-bit deltas */
-#define	THUNDER_RAW		0xc0	/* raw data encoded */
-
-static const int twobitdeltas[4] = { 0, 1, 0, -1 };
-static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 };
-
-#define	SETPIXEL(op, v) { \
-	lastpixel = (v) & 0xf; \
-	if (npixels++ & 1) \
-	    *op++ |= lastpixel; \
-	else \
-	    op[0] = (tidataval_t) (lastpixel << 4); \
-}
-
-static int
-ThunderDecode(TIFF* tif, tidata_t op, tsize_t maxpixels)
-{
-	register u_char *bp;
-	register tsize_t cc;
-	u_int lastpixel;
-	tsize_t npixels;
-
-	bp = (u_char *)tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	lastpixel = 0;
-	npixels = 0;
-	while (cc > 0 && npixels < maxpixels) {
-		int n, delta;
-
-		n = *bp++, cc--;
-		switch (n & THUNDER_CODE) {
-		case THUNDER_RUN:		/* pixel run */
-			/*
-			 * Replicate the last pixel n times,
-			 * where n is the lower-order 6 bits.
-			 */
-			if (npixels & 1) {
-				op[0] |= lastpixel;
-				lastpixel = *op++; npixels++; n--;
-			} else
-				lastpixel |= lastpixel << 4;
-			npixels += n;
-			for (; n > 0; n -= 2)
-				*op++ = (tidataval_t) lastpixel;
-			if (n == -1)
-				*--op &= 0xf0;
-			lastpixel &= 0xf;
-			break;
-		case THUNDER_2BITDELTAS:	/* 2-bit deltas */
-			if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			if ((delta = (n & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			break;
-		case THUNDER_3BITDELTAS:	/* 3-bit deltas */
-			if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP)
-				SETPIXEL(op, lastpixel + threebitdeltas[delta]);
-			if ((delta = (n & 7)) != DELTA3_SKIP)
-				SETPIXEL(op, lastpixel + threebitdeltas[delta]);
-			break;
-		case THUNDER_RAW:		/* raw data */
-			SETPIXEL(op, n);
-			break;
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (npixels != maxpixels) {
-		TIFFError(tif->tif_name,
-		    "ThunderDecode: %s data at scanline %ld (%lu != %lu)",
-		    npixels < maxpixels ? "Not enough" : "Too much",
-		    (long) tif->tif_row, (long) npixels, (long) maxpixels);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-ThunderDecodeRow(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	tidata_t row = buf;
-	
-	(void) s;
-	while ((long)occ > 0) {
-		if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth))
-			return (0);
-		occ -= tif->tif_scanlinesize;
-		row += tif->tif_scanlinesize;
-	}
-	return (1);
-}
-
-int
-TIFFInitThunderScan(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = ThunderDecodeRow;
-	tif->tif_decodestrip = ThunderDecodeRow;
-	return (1);
-}
-#endif /* THUNDER_SUPPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tif_tile.c b/tkimg1.3/libtiff/libtiff/tif_tile.c
deleted file mode 100644
index 8da595a..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_tile.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_tile.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Tiled Image Support Routines.
- */
-#include "tiffiop.h"
-
-/*
- * Compute which tile an (x,y,z,s) value is in.
- */
-ttile_t
-TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 dx = td->td_tilewidth;
-	uint32 dy = td->td_tilelength;
-	uint32 dz = td->td_tiledepth;
-	ttile_t tile = 1;
-
-	if (td->td_imagedepth == 1)
-		z = 0;
-	if (dx == (uint32) -1)
-		dx = td->td_imagewidth;
-	if (dy == (uint32) -1)
-		dy = td->td_imagelength;
-	if (dz == (uint32) -1)
-		dz = td->td_imagedepth;
-	if (dx != 0 && dy != 0 && dz != 0) {
-		uint32 xpt = TIFFhowmany(td->td_imagewidth, dx); 
-		uint32 ypt = TIFFhowmany(td->td_imagelength, dy); 
-		uint32 zpt = TIFFhowmany(td->td_imagedepth, dz); 
-
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) 
-			tile = (xpt*ypt*zpt)*s +
-			     (xpt*ypt)*(z/dz) +
-			     xpt*(y/dy) +
-			     x/dx;
-		else
-			tile = (xpt*ypt)*(z/dz) + xpt*(y/dy) + x/dx;
-	}
-	return (tile);
-}
-
-/*
- * Check an (x,y,z,s) coordinate
- * against the image bounds.
- */
-int
-TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (x >= td->td_imagewidth) {
-		TIFFError(tif->tif_name, "Col %ld out of range, max %lu",
-		    (long) x, (u_long) td->td_imagewidth);
-		return (0);
-	}
-	if (y >= td->td_imagelength) {
-		TIFFError(tif->tif_name, "Row %ld out of range, max %lu",
-		    (long) y, (u_long) td->td_imagelength);
-		return (0);
-	}
-	if (z >= td->td_imagedepth) {
-		TIFFError(tif->tif_name, "Depth %ld out of range, max %lu",
-		    (long) z, (u_long) td->td_imagedepth);
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
-	    s >= td->td_samplesperpixel) {
-		TIFFError(tif->tif_name, "Sample %d out of range, max %u",
-		    (int) s, td->td_samplesperpixel);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Compute how many tiles are in an image.
- */
-ttile_t
-TIFFNumberOfTiles(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 dx = td->td_tilewidth;
-	uint32 dy = td->td_tilelength;
-	uint32 dz = td->td_tiledepth;
-	ttile_t ntiles;
-
-	if (dx == (uint32) -1)
-		dx = td->td_imagewidth;
-	if (dy == (uint32) -1)
-		dy = td->td_imagelength;
-	if (dz == (uint32) -1)
-		dz = td->td_imagedepth;
-	ntiles = (dx == 0 || dy == 0 || dz == 0) ? 0 :
-	    (TIFFhowmany(td->td_imagewidth, dx) *
-	     TIFFhowmany(td->td_imagelength, dy) *
-	     TIFFhowmany(td->td_imagedepth, dz));
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		ntiles *= td->td_samplesperpixel;
-	return (ntiles);
-}
-
-/*
- * Compute the # bytes in each row of a tile.
- */
-tsize_t
-TIFFTileRowSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t rowsize;
-	
-	if (td->td_tilelength == 0 || td->td_tilewidth == 0)
-		return ((tsize_t) 0);
-	rowsize = td->td_bitspersample * td->td_tilewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG)
-		rowsize *= td->td_samplesperpixel;
-	return ((tsize_t) TIFFhowmany(rowsize, 8));
-}
-
-/*
- * Compute the # bytes in a variable length, row-aligned tile.
- */
-tsize_t
-TIFFVTileSize(TIFF* tif, uint32 nrows)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t tilesize;
-
-	if (td->td_tilelength == 0 || td->td_tilewidth == 0 ||
-	    td->td_tiledepth == 0)
-		return ((tsize_t) 0);
-#ifdef YCBCR_SUPPORT
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    td->td_photometric == PHOTOMETRIC_YCBCR &&
-	    !isUpSampled(tif)) {
-		/*
-		 * Packed YCbCr data contain one Cb+Cr for every
-		 * HorizontalSampling*VerticalSampling Y values.
-		 * Must also roundup width and height when calculating
-		 * since images that are not a multiple of the
-		 * horizontal/vertical subsampling area include
-		 * YCbCr data for the extended image.
-		 */
-		tsize_t w =
-		    TIFFroundup(td->td_tilewidth, td->td_ycbcrsubsampling[0]);
-		tsize_t rowsize = TIFFhowmany(w*td->td_bitspersample, 8);
-		tsize_t samplingarea =
-		    td->td_ycbcrsubsampling[0]*td->td_ycbcrsubsampling[1];
-		nrows = TIFFroundup(nrows, td->td_ycbcrsubsampling[1]);
-		/* NB: don't need TIFFhowmany here 'cuz everything is rounded */
-		tilesize = nrows*rowsize + 2*(nrows*rowsize / samplingarea);
-	} else
-#endif
-		tilesize = nrows * TIFFTileRowSize(tif);
-	return ((tsize_t)(tilesize * td->td_tiledepth));
-}
-
-/*
- * Compute the # bytes in a row-aligned tile.
- */
-tsize_t
-TIFFTileSize(TIFF* tif)
-{
-	return (TIFFVTileSize(tif, tif->tif_dir.td_tilelength));
-}
-
-/*
- * Compute a default tile size based on the image
- * characteristics and a requested value.  If a
- * request is <1 then we choose a size according
- * to certain heuristics.
- */
-void
-TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	(*tif->tif_deftilesize)(tif, tw, th);
-}
-
-void
-_TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	(void) tif;
-	if (*(int32*) tw < 1)
-		*tw = 256;
-	if (*(int32*) th < 1)
-		*th = 256;
-	/* roundup to a multiple of 16 per the spec */
-	if (*tw & 0xf)
-		*tw = TIFFroundup(*tw, 16);
-	if (*th & 0xf)
-		*th = TIFFroundup(*th, 16);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_unix.c b/tkimg1.3/libtiff/libtiff/tif_unix.c
deleted file mode 100644
index 75bdd09..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_unix.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_unix.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library UNIX-specific Routines.
- */
-#include "tiffiop.h"
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) read((int) fd, buf, (size_t) size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) write((int) fd, buf, (size_t) size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-#if USE_64BIT_API == 1
-	return ((toff_t) lseek64((int) fd, (off64_t) off, whence));
-#else
-	return ((toff_t) lseek((int) fd, (off_t) off, whence));
-#endif
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (close((int) fd));
-}
-
-#include <sys/stat.h>
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-#ifdef _AM29K
-	long fsize;
-	return ((fsize = lseek((int) fd, 0, SEEK_END)) < 0 ? 0 : fsize);
-#else
-#if USE_64BIT_API == 1
-	struct stat64 sb;
-	return (toff_t) (fstat64((int) fd, &sb) < 0 ? 0 : sb.st_size);
-#else
-	struct stat sb;
-	return (toff_t) (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
-#endif
-#endif
-}
-
-#ifdef HAVE_MMAP
-#include <sys/mman.h>
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	toff_t size = _tiffSizeProc(fd);
-	if (size != (toff_t) -1) {
-		*pbase = (tdata_t)
-		    mmap(0, size, PROT_READ, MAP_SHARED, (int) fd, 0);
-		if (*pbase != (tdata_t) -1) {
-			*psize = size;
-			return (1);
-		}
-	}
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	(void) fd;
-	(void) munmap(base, (off_t) size);
-}
-#else /* !HAVE_MMAP */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	(void) fd; (void) pbase; (void) psize;
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	(void) fd; (void) base; (void) size;
-}
-#endif /* !HAVE_MMAP */
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-	    (thandle_t) fd,
-	    _tiffReadProc, _tiffWriteProc,
-	    _tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
-	    _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-
-/* for cygwin */        
-#ifdef O_BINARY
-        m |= O_BINARY;
-#endif        
-        
-#ifdef _AM29K
-	fd = open(name, m);
-#else
-#if USE_64BIT_API == 1
-	fd = open(name, m | O_LARGEFILE, 0666);
-#else
-	fd = open(name, m, 0666);
-#endif
-#endif
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF *)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-void*
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-void*
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-static void
-unixWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = unixWarningHandler;
-
-static void
-unixErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = unixErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_version.c b/tkimg1.3/libtiff/libtiff/tif_version.c
deleted file mode 100644
index dbb0125..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_version.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_version.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-/*
- * Copyright (c) 1992-1997 Sam Leffler
- * Copyright (c) 1992-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-#include "tiffiop.h"
-
-static const char TIFFVersion[] = TIFFLIB_VERSION_STR;
-
-const char*
-TIFFGetVersion(void)
-{
-	return (TIFFVersion);
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_vms.c b/tkimg1.3/libtiff/libtiff/tif_vms.c
deleted file mode 100644
index 7b8ca98..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_vms.c
+++ /dev/null
@@ -1,588 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_vms.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library VMS-specific Routines.
- */
-
-#include <stdlib.h>
-#include <unixio.h>
-#include "tiffiop.h"
-#if !HAVE_IEEEFP
-#include <math.h>
-#endif
-
-#ifdef VAXC
-#define	NOSHARE	noshare
-#else
-#define	NOSHARE
-#endif
-
-#ifdef __alpha
-/* Dummy entry point for backwards compatibility */
-void TIFFModeCCITTFax3(void){}
-#endif
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (read((int) fd, buf, size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (write((int) fd, buf, size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	return ((toff_t) lseek((int) fd, (off_t) off, whence));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (close((int) fd));
-}
-
-#include <sys/stat.h>
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	struct stat sb;
-	return (toff_t) (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
-}
-
-#ifdef HAVE_MMAP
-#include <starlet.h>
-#include <fab.h>
-#include <secdef.h>
-
-/*
- * Table for storing information on current open sections. 
- * (Should really be a linked list)
- */
-#define MAX_MAPPED 100
-static int no_mapped = 0;
-static struct {
-	char *base;
-	char *top;
-	unsigned short channel;
-} map_table[MAX_MAPPED];
-
-/* 
- * This routine maps a file into a private section. Note that this 
- * method of accessing a file is by far the fastest under VMS.
- * The routine may fail (i.e. return 0) for several reasons, for
- * example:
- * - There is no more room for storing the info on sections.
- * - The process is out of open file quota, channels, ...
- * - fd does not describe an opened file.
- * - The file is already opened for write access by this process
- *   or another process
- * - There is no free "hole" in virtual memory that fits the
- *   size of the file
- */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	char name[256];
-	struct FAB fab;
-	unsigned short channel;
-	char *inadr[2], *retadr[2];
-	unsigned long status;
-	long size;
-	
-	if (no_mapped >= MAX_MAPPED)
-		return(0);
-	/*
-	 * We cannot use a file descriptor, we
-	 * must open the file once more.
-	 */
-	if (getname((int)fd, name, 1) == NULL)
-		return(0);
-	/* prepare the FAB for a user file open */
-	fab = cc$rms_fab;
-	fab.fab$l_fop |= FAB$V_UFO;
-	fab.fab$b_fac = FAB$M_GET;
-	fab.fab$b_shr = FAB$M_SHRGET;
-	fab.fab$l_fna = name;
-	fab.fab$b_fns = strlen(name);
-	status = sys$open(&fab);	/* open file & get channel number */
-	if ((status&1) == 0)
-		return(0);
-	channel = (unsigned short)fab.fab$l_stv;
-	inadr[0] = inadr[1] = (char *)0; /* just an address in P0 space */
-	/*
-	 * Map the blocks of the file up to
-	 * the EOF block into virtual memory.
-	 */
-	size = _tiffSizeProc(fd);
-	status = sys$crmpsc(inadr, retadr, 0, SEC$M_EXPREG, 0,0,0, channel,
-		TIFFhowmany(size,512), 0,0,0);
-	if ((status&1) == 0){
-		sys$dassgn(channel);
-		return(0);
-	}
-	*pbase = (tdata_t) retadr[0];	/* starting virtual address */
-	/*
-	 * Use the size of the file up to the
-	 * EOF mark for UNIX compatibility.
-	 */
-	*psize = (toff_t) size;
-	/* Record the section in the table */
-	map_table[no_mapped].base = retadr[0];
-	map_table[no_mapped].top = retadr[1];
-	map_table[no_mapped].channel = channel;
-	no_mapped++;
-
-        return(1);
-}
-
-/*
- * This routine unmaps a section from the virtual address space of 
- * the process, but only if the base was the one returned from a
- * call to TIFFMapFileContents.
- */
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	char *inadr[2];
-	int i, j;
-	
-	/* Find the section in the table */
-	for (i = 0;i < no_mapped; i++) {
-		if (map_table[i].base == (char *) base) {
-			/* Unmap the section */
-			inadr[0] = (char *) base;
-			inadr[1] = map_table[i].top;
-			sys$deltva(inadr, 0, 0);
-			sys$dassgn(map_table[i].channel);
-			/* Remove this section from the list */
-			for (j = i+1; j < no_mapped; j++)
-				map_table[j-1] = map_table[j];
-			no_mapped--;
-			return;
-		}
-	}
-}
-#else /* !HAVE_MMAP */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-#endif /* !HAVE_MMAP */
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-	    (thandle_t) fd,
-	    _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
-	    _tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-        if (m&O_TRUNC){
-                /*
-		 * There is a bug in open in VAXC. If you use
-		 * open w/ m=O_RDWR|O_CREAT|O_TRUNC the
-		 * wrong thing happens.  On the other hand
-		 * creat does the right thing.
-                 */
-                fd = creat((char *) /* bug in stdio.h */ name, 0666,
-		    "alq = 128", "deq = 64", "mbc = 32",
-		    "fop = tef");
-	} else if (m&O_RDWR) {
-		fd = open(name, m, 0666,
-		    "deq = 64", "mbc = 32", "fop = tef", "ctx = stm");
-	} else
-		fd = open(name, m, 0666, "mbc = 32", "ctx = stm");
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF*)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-/*
- * On the VAX, we need to make those global, writable pointers
- * non-shareable, otherwise they would be made shareable by default.
- * On the AXP, this brain damage has been corrected. 
- * 
- * I (Karsten Spang, krs at kampsax.dk) have dug around in the GCC
- * manual and the GAS code and have come up with the following
- * construct, but I don't have GCC on my VAX, so it is untested.
- * Please tell me if it does not work.
- */
-
-static void
-vmsWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-
-NOSHARE TIFFErrorHandler _TIFFwarningHandler = vmsWarningHandler
-#if defined(VAX) && defined(__GNUC__)
-asm("_$$PsectAttributes_NOSHR$$_TIFFwarningHandler")
-#endif
-;
-
-static void
-vmsErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-
-NOSHARE TIFFErrorHandler _TIFFerrorHandler = vmsErrorHandler
-#if defined(VAX) && defined(__GNUC__)
-asm("_$$PsectAttributes_NOSHR$$_TIFFerrorHandler")
-#endif
-;
-
-
-#if !HAVE_IEEEFP
-/* IEEE floting point handling */
-
-typedef	struct ieeedouble {
-	u_long	mant2;			/* fix NDR: full 8-byte swap */
-	u_long	mant	: 20,
-		exp	: 11,
-		sign	: 1;
-} ieeedouble;
-typedef	struct ieeefloat {
-	u_long	mant	: 23,
-		exp	: 8,
-		sign	: 1;
-} ieeefloat;
-
-/* 
- * NB: These are D_FLOAT's, not G_FLOAT's. A G_FLOAT is
- *  simply a reverse-IEEE float/double.
- */
-
-typedef	struct {
-	u_long	mant1	: 7,
-		exp	: 8,
-		sign	: 1,
-		mant2	: 16,
-		mant3   : 16,
-		mant4   : 16;
-} nativedouble;
-typedef	struct {
-	u_long	mant1	: 7,
-		exp	: 8,
-		sign	: 1,
-		mant2	: 16;
-} nativefloat;
-
-typedef	union {
-	ieeedouble	ieee;
-	nativedouble	native;
-	char		b[8];
-	uint32		l[2];
-	double		d;
-} double_t;
-
-typedef	union {
-	ieeefloat	ieee;
-	nativefloat	native;
-	char		b[4];
-	uint32		l;
-	float		f;
-} float_t;
-
-#if defined(VAXC) || defined(DECC)
-#pragma inline(ieeetod,dtoieee)
-#endif
-
-/*
- * Convert an IEEE double precision number to native double precision.
- * The source is contained in two longwords, the second holding the sign,
- * exponent and the higher order bits of the mantissa, and the first
- * holding the rest of the mantissa as follows:
- * (Note: It is assumed that the number has been eight-byte swapped to
- * LSB first.)
- * 
- * First longword:
- *	32 least significant bits of mantissa
- * Second longword:
- *	0-19:	20 most significant bits of mantissa
- *	20-30:	exponent
- *	31:	sign
- * The exponent is stored as excess 1023.
- * The most significant bit of the mantissa is implied 1, and not stored.
- * If the exponent and mantissa are zero, the number is zero.
- * If the exponent is 0 (i.e. -1023) and the mantissa is non-zero, it is an
- * unnormalized number with the most significant bit NOT implied.
- * If the exponent is 2047, the number is invalid, in case the mantissa is zero,
- * this means overflow (+/- depending of the sign bit), otherwise
- * it simply means invalid number.
- * 
- * If the number is too large for the machine or was specified as overflow, 
- * +/-HUGE_VAL is returned.
- */
-INLINE static void
-ieeetod(double *dp)
-{
-	double_t source;
-	long sign,exp,mant;
-	double dmant;
-
-	source.ieee = ((double_t*)dp)->ieee;
-	sign = source.ieee.sign;
-	exp = source.ieee.exp;
-	mant = source.ieee.mant;
-
-	if (exp == 2047) {
-		if (mant)			/* Not a Number (NAN) */
-			*dp = HUGE_VAL;
-		else				/* +/- infinity */
-			*dp = (sign ? -HUGE_VAL : HUGE_VAL);
-		return;
-	}
-	if (!exp) {
-		if (!(mant || source.ieee.mant2)) {	/* zero */
-			*dp=0;
-			return;
-		} else {			/* Unnormalized number */
-			/* NB: not -1023, the 1 bit is not implied */
-			exp= -1022;
-		}
-	} else {
-		mant |= 1<<20;
-		exp -= 1023;
-	}
-	dmant = (((double) mant) +
-		((double) source.ieee.mant2) / (((double) (1<<16)) *
-		((double) (1<<16)))) / (double) (1<<20);
-	dmant = ldexp(dmant, exp);
-	if (sign)
-		dmant= -dmant;
-	*dp = dmant;
-}
-
-INLINE static void
-dtoieee(double *dp)
-{
-	double_t num;
-	double x;
-	int exp;
-
-	num.d = *dp;
-	if (!num.d) {			/* Zero is just binary all zeros */
-		num.l[0] = num.l[1] = 0;
-		return;
-	}
-
-	if (num.d < 0) {		/* Sign is encoded separately */
-		num.d = -num.d;
-		num.ieee.sign = 1;
-	} else {
-		num.ieee.sign = 0;
-	}
-
-	/* Now separate the absolute value into mantissa and exponent */
-	x = frexp(num.d, &exp);
-
-	/*
-	 * Handle cases where the value is outside the
-	 * range for IEEE floating point numbers. 
-	 * (Overflow cannot happen on a VAX, but underflow
-	 * can happen for G float.)
-	 */
-	if (exp < -1022) {		/* Unnormalized number */
-		x = ldexp(x, -1023-exp);
-		exp = 0;
-	} else if (exp > 1023) {	/* +/- infinity */
-		x = 0;
-		exp = 2047;
-	} else {			/* Get rid of most significant bit */
-		x *= 2;
-		x -= 1;
-		exp += 1022; /* fix NDR: 1.0 -> x=0.5, exp=1 -> ieee.exp = 1023 */
-	}
-	num.ieee.exp = exp;
-
-	x *= (double) (1<<20);
-	num.ieee.mant = (long) x;
-	x -= (double) num.ieee.mant;
-	num.ieee.mant2 = (long) (x*((double) (1<<16)*(double) (1<<16)));
-
-	if (!(num.ieee.mant || num.ieee.exp || num.ieee.mant2)) {
-		/* Avoid negative zero */
-		num.ieee.sign = 0;
-	}
-	((double_t*)dp)->ieee = num.ieee;
-}
-
-/*
- * Beware, these do not handle over/under-flow
- * during conversion from ieee to native format.
- */
-#define	NATIVE2IEEEFLOAT(fp) { \
-    float_t t; \
-    if (t.ieee.exp = (fp)->native.exp) \
-	t.ieee.exp += -129 + 127; \
-    t.ieee.sign = (fp)->native.sign; \
-    t.ieee.mant = ((fp)->native.mant1<<16)|(fp)->native.mant2; \
-    *(fp) = t; \
-}
-#define	IEEEFLOAT2NATIVE(fp) { \
-    float_t t; int v = (fp)->ieee.exp; \
-    if (v) v += -127 + 129;		/* alter bias of exponent */\
-    t.native.exp = v;			/* implicit truncation of exponent */\
-    t.native.sign = (fp)->ieee.sign; \
-    v = (fp)->ieee.mant; \
-    t.native.mant1 = v >> 16; \
-    t.native.mant2 = v;\
-    *(fp) = t; \
-}
-
-#define IEEEDOUBLE2NATIVE(dp) ieeetod(dp)
-
-#define NATIVE2IEEEDOUBLE(dp) dtoieee(dp)
-
-
-/*
- * These unions are used during floating point
- * conversions.  The above macros define the
- * conversion operations.
- */
-void
-TIFFCvtIEEEFloatToNative(TIFF* tif, u_int n, float* f)
-{
-	float_t* fp = (float_t*) f;
-
-	while (n-- > 0) {
-		IEEEFLOAT2NATIVE(fp);
-		fp++;
-	}
-}
-
-void
-TIFFCvtNativeToIEEEFloat(TIFF* tif, u_int n, float* f)
-{
-	float_t* fp = (float_t*) f;
-
-	while (n-- > 0) {
-		NATIVE2IEEEFLOAT(fp);
-		fp++;
-	}
-}
-void
-TIFFCvtIEEEDoubleToNative(TIFF* tif, u_int n, double* f)
-{
-	double_t* fp = (double_t*) f;
-
-	while (n-- > 0) {
-		IEEEDOUBLE2NATIVE(fp);
-		fp++;
-	}
-}
-
-void
-TIFFCvtNativeToIEEEDouble(TIFF* tif, u_int n, double* f)
-{
-	double_t* fp = (double_t*) f;
-
-	while (n-- > 0) {
-		NATIVE2IEEEDOUBLE(fp);
-		fp++;
-	}
-}
-#endif
diff --git a/tkimg1.3/libtiff/libtiff/tif_warning.c b/tkimg1.3/libtiff/libtiff/tif_warning.c
deleted file mode 100644
index 1069881..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_warning.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_warning.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-TIFFErrorHandler
-TIFFSetWarningHandler(TIFFErrorHandler handler)
-{
-	TIFFErrorHandler prev = _TIFFwarningHandler;
-	_TIFFwarningHandler = handler;
-	return (prev);
-}
-
-void
-TIFFWarning(const char* module, const char* fmt, ...)
-{
-	if (_TIFFwarningHandler) {
-		va_list ap;
-		va_start(ap, fmt);
-		(*_TIFFwarningHandler)(module, fmt, ap);
-		va_end(ap);
-	}
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_win3.c b/tkimg1.3/libtiff/libtiff/tif_win3.c
deleted file mode 100644
index 72dffc6..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_win3.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_win3.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Windows 3.x-specific Routines.
- */
-#include "tiffiop.h"
-#if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(_MSC_VER)
-#include <io.h>		/* for open, close, etc. function prototypes */
-#endif
-
-#include <windows.h>
-#include <windowsx.h>
-#include <memory.h>
-
-static tsize_t 
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (_hread(fd, buf, size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return (_hwrite(fd, buf, size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	return (_llseek(fd, (off_t) off, whence));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (_lclose(fd));
-}
-
-#include <sys/stat.h>
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	struct stat sb;
-	return (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
-}
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-	    (thandle_t) fd,
-	    _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
-	    _tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-	OFSTRUCT of;
-	int mm = 0;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-	if (m & O_CREAT) {
-		if ((m & O_TRUNC) || OpenFile(name, &of, OF_EXIST) != HFILE_ERROR)
-			mm |= OF_CREATE;
-	}
-	if (m & O_WRONLY)
-		mm |= OF_WRITE;
-	if (m & O_RDWR)
-		mm |= OF_READWRITE;
-	fd = OpenFile(name, &of, mm);
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF*)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return (tdata_t) GlobalAllocPtr(GHND, (DWORD) s);
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	GlobalFreePtr(p);
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (tdata_t) GlobalReAllocPtr(p, (DWORD) s, GHND);
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	char* pp = (char*) p;
-
-	while (c > 0) {
-		tsize_t chunk = 0x10000 - ((uint32) pp & 0xffff);/* What's left in segment */
-		if (chunk > 0xff00)				/* No more than 0xff00 */
-			chunk = 0xff00;
-		if (chunk > c)					/* No more than needed */
-			chunk = c;
-		memset(pp, v, chunk);
-		pp = (char*) (chunk + (char huge*) pp);
-		c -= chunk;
-	}
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	if (c > 0xFFFF)
-		hmemcpy((void _huge*) d, (void _huge*) s, c);
-	else
-		(void) memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t d, const tdata_t s, tsize_t c)
-{
-	char* dd = (char*) d;
-	char* ss = (char*) s;
-	tsize_t chunks, chunkd, chunk;
-	int result;
-
-	while (c > 0) {
-		chunks = 0x10000 - ((uint32) ss & 0xffff);	/* What's left in segment */
-		chunkd = 0x10000 - ((uint32) dd & 0xffff);	/* What's left in segment */
-		chunk = c;					/* Get the largest of     */
-		if (chunk > chunks)				/*   c, chunks, chunkd,   */
-			chunk = chunks;				/*   0xff00               */
-		if (chunk > chunkd)
-			chunk = chunkd;
-		if (chunk > 0xff00)
-			chunk = 0xff00;
-		result = memcmp(dd, ss, chunk);
-		if (result != 0)
-			return (result);
-		dd = (char*) (chunk + (char huge*) dd);
-		ss = (char*) (chunk + (char huge*) ss);
-		c -= chunk;
-	}
-	return (0);
-}
-
-static void
-win3WarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	char e[512] = { '\0' };
-	if (module != NULL)
-		strcat(strcpy(e, module), ":");
-	vsprintf(e+strlen(e), fmt, ap);
-	strcat(e, ".");
-	MessageBox(GetActiveWindow(), e, "LibTIFF Warning",
-	    MB_OK|MB_ICONEXCLAMATION);
-}
-TIFFErrorHandler _TIFFwarningHandler = win3WarningHandler;
-
-static void
-win3ErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	char e[512] = { '\0' };
-	if (module != NULL)
-		strcat(strcpy(e, module), ":");
-	vsprintf(e+strlen(e), fmt, ap);
-	strcat(e, ".");
-	MessageBox(GetActiveWindow(), e, "LibTIFF Error", MB_OK|MB_ICONSTOP);
-}
-TIFFErrorHandler _TIFFerrorHandler = win3ErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_win32.c b/tkimg1.3/libtiff/libtiff/tif_win32.c
deleted file mode 100644
index 8ca539b..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_win32.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_win32.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Win32-specific Routines.  Adapted from tif_unix.c 4/5/95 by
- * Scott Wagner (wagner at itek.com), Itek Graphix, Rochester, NY USA
- */
-#include <windows.h>
-#include "tiffiop.h"
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	DWORD dwSizeRead;
-	if (!ReadFile(fd, buf, size, &dwSizeRead, NULL))
-		return(0);
-	return ((tsize_t) dwSizeRead);
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	DWORD dwSizeWritten;
-	if (!WriteFile(fd, buf, size, &dwSizeWritten, NULL))
-		return(0);
-	return ((tsize_t) dwSizeWritten);
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	DWORD dwMoveMethod, dwMoveHigh;
-
-        /* we use this as a special code, so avoid accepting it */
-        if( off == 0xFFFFFFFF )
-            return 0xFFFFFFFF;
-        
-	switch(whence)
-	{
-	case SEEK_SET:
-		dwMoveMethod = FILE_BEGIN;
-		break;
-	case SEEK_CUR:
-		dwMoveMethod = FILE_CURRENT;
-		break;
-	case SEEK_END:
-		dwMoveMethod = FILE_END;
-		break;
-	default:
-		dwMoveMethod = FILE_BEGIN;
-		break;
-	}
-        dwMoveHigh = 0;
-	return ((toff_t)SetFilePointer(fd, (LONG) off, (PLONG)&dwMoveHigh,
-                                       dwMoveMethod));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (CloseHandle(fd) ? 0 : -1);
-}
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	return ((toff_t)GetFileSize(fd, NULL));
-}
-
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
-static int
-_tiffDummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-/*
- * From "Hermann Josef Hill" <lhill at rhein-zeitung.de>:
- *
- * Windows uses both a handle and a pointer for file mapping,
- * but according to the SDK documentation and Richter's book
- * "Advanced Windows Programming" it is safe to free the handle
- * after obtaining the file mapping pointer
- *
- * This removes a nasty OS dependency and cures a problem
- * with Visual C++ 5.0
- */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	toff_t size;
-	HANDLE hMapFile;
-
-	if ((size = _tiffSizeProc(fd)) == 0xFFFFFFFF)
-		return (0);
-	hMapFile = CreateFileMapping(fd, NULL, PAGE_READONLY, 0, size, NULL);
-	if (hMapFile == NULL)
-		return (0);
-	*pbase = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0);
-	CloseHandle(hMapFile);
-	if (*pbase == NULL)
-		return (0);
-	*psize = size;
-	return(1);
-}
-
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
-static void
-_tiffDummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	UnmapViewOfFile(base);
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- * Note that TIFFFdOpen and TIFFOpen recognise the character 'u' in the mode
- * string, which forces the file to be opened unmapped.
- */
-TIFF*
-TIFFFdOpen(int ifd, const char* name, const char* mode)
-{
-	TIFF* tif;
-	BOOL fSuppressMap = (mode[1] == 'u' || (mode[1]!=0 && mode[2] == 'u'));
-
-	tif = TIFFClientOpen(name, mode,
-		 (thandle_t)ifd,
-	    _tiffReadProc, _tiffWriteProc,
-	    _tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
-		 fSuppressMap ? _tiffDummyMapProc : _tiffMapProc,
-		 fSuppressMap ? _tiffDummyUnmapProc : _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = ifd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	thandle_t fd;
-	int m;
-	DWORD dwMode;
-
-	m = _TIFFgetMode(mode, module);
-
-	switch(m)
-	{
-	case O_RDONLY:
-		dwMode = OPEN_EXISTING;
-		break;
-	case O_RDWR:
-		dwMode = OPEN_ALWAYS;
-		break;
-	case O_RDWR|O_CREAT:
-		dwMode = OPEN_ALWAYS;
-		break;
-	case O_RDWR|O_TRUNC:
-		dwMode = CREATE_ALWAYS;
-		break;
-	case O_RDWR|O_CREAT|O_TRUNC:
-		dwMode = CREATE_ALWAYS;
-		break;
-	default:
-		return ((TIFF*)0);
-	}
-	fd = (thandle_t)CreateFile(name, (m == O_RDONLY) ? GENERIC_READ :
-			(GENERIC_READ | GENERIC_WRITE), FILE_SHARE_READ, NULL, dwMode,
-			(m == O_RDONLY) ? FILE_ATTRIBUTE_READONLY : FILE_ATTRIBUTE_NORMAL, NULL);
-	if (fd == INVALID_HANDLE_VALUE) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF *)0);
-	}
-	return (TIFFFdOpen((int)fd, name, mode));
-}
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	GlobalFree(p);
-	return;
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-  void* pvTmp;
-  tsize_t old=GlobalSize(p);
-  if (old>=s)
-    {
-      if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
-	CopyMemory(pvTmp, p, s);
-	GlobalFree(p);
-      }
-    }
-  else
-    {
-      if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
-	CopyMemory(pvTmp, p, old);
-	GlobalFree(p);
-      }
-    }
-  return ((tdata_t)pvTmp);
-}
-
-void
-_TIFFmemset(void* p, int v, tsize_t c)
-{
-	FillMemory(p, c, (BYTE)v);
-}
-
-void
-_TIFFmemcpy(void* d, const tdata_t s, tsize_t c)
-{
-	CopyMemory(d, s, c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	register const BYTE *pb1 = (const BYTE *) p1;
-	register const BYTE *pb2 = (const BYTE *) p2;
-	register DWORD dwTmp = c;
-	register int iTmp;
-	for (iTmp = 0; dwTmp-- && !iTmp; iTmp = (int)*pb1++ - (int)*pb2++)
-		;
-	return (iTmp);
-}
-
-static void
-Win32WarningHandler(const char* module, const char* fmt, va_list ap)
-{
-#ifndef TIF_PLATFORM_CONSOLE
-	LPTSTR szTitle;
-	LPTSTR szTmp;
-	LPCTSTR szTitleText = "%s Warning";
-	LPCTSTR szDefaultModule = "TIFFLIB";
-	szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
-	if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
-			lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
-		return;
-	wsprintf(szTitle, szTitleText, szTmp);
-	szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
-	wvsprintf(szTmp, fmt, ap);
-	MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION);
-	LocalFree(szTitle);
-	return;
-#else
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-#endif        
-}
-TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
-
-static void
-Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-#ifndef TIF_PLATFORM_CONSOLE
-	LPTSTR szTitle;
-	LPTSTR szTmp;
-	LPCTSTR szTitleText = "%s Error";
-	LPCTSTR szDefaultModule = "TIFFLIB";
-	szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
-	if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
-			lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
-		return;
-	wsprintf(szTitle, szTitleText, szTmp);
-	szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
-	wvsprintf(szTmp, fmt, ap);
-	MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION);
-	LocalFree(szTitle);
-	return;
-#else
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-#endif        
-}
-TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
diff --git a/tkimg1.3/libtiff/libtiff/tif_write.c b/tkimg1.3/libtiff/libtiff/tif_write.c
deleted file mode 100644
index 34249eb..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_write.c
+++ /dev/null
@@ -1,690 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_write.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Scanline-oriented Write Support
- */
-#include "tiffiop.h"
-#include <assert.h>
-#include <stdio.h>
-
-#define REWRITE_HACK
-
-#define	STRIPINCR	20		/* expansion factor on strip array */
-
-#define	WRITECHECKSTRIPS(tif, module)				\
-	(((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),0,module))
-#define	WRITECHECKTILES(tif, module)				\
-	(((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),1,module))
-#define	BUFFERCHECK(tif)					\
-	((((tif)->tif_flags & TIFF_BUFFERSETUP) && tif->tif_rawdata) ||	\
-	    TIFFWriteBufferSetup((tif), NULL, (tsize_t) -1))
-
-static	int TIFFGrowStrips(TIFF*, int, const char*);
-static	int TIFFAppendToStrip(TIFF*, tstrip_t, tidata_t, tsize_t);
-
-int
-TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
-{
-	static const char module[] = "TIFFWriteScanline";
-	register TIFFDirectory *td;
-	int status, imagegrew = 0;
-	tstrip_t strip;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return (-1);
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized more intelligently (using
-	 * directory information).
-	 */
-	if (!BUFFERCHECK(tif))
-		return (-1);
-	td = &tif->tif_dir;
-	/*
-	 * Extend image length if needed
-	 * (but only for PlanarConfig=1).
-	 */
-	if (row >= td->td_imagelength) {	/* extend image */
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not change \"ImageLength\" when using separate planes");
-			return (-1);
-		}
-		td->td_imagelength = row+1;
-		imagegrew = 1;
-	}
-	/*
-	 * Calculate strip and check for crossings.
-	 */
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%d: Sample out of range, max %d",
-			    sample, td->td_samplesperpixel);
-			return (-1);
-		}
-		strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
-	} else
-		strip = row / td->td_rowsperstrip;
-	if (strip != tif->tif_curstrip) {
-		/*
-		 * Changing strips -- flush any data present.
-		 */
-		if (!TIFFFlushData(tif))
-			return (-1);
-		tif->tif_curstrip = strip;
-		/*
-		 * Watch out for a growing image.  The value of
-		 * strips/image will initially be 1 (since it
-		 * can't be deduced until the imagelength is known).
-		 */
-		if (strip >= td->td_stripsperimage && imagegrew)
-			td->td_stripsperimage =
-			    TIFFhowmany(td->td_imagelength,td->td_rowsperstrip);
-		tif->tif_row =
-		    (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-		if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-			if (!(*tif->tif_setupencode)(tif))
-				return (-1);
-			tif->tif_flags |= TIFF_CODERSETUP;
-		}
-		if (!(*tif->tif_preencode)(tif, sample))
-			return (-1);
-		tif->tif_flags |= TIFF_POSTENCODE;
-	}
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module))
-		return (-1);
-	/*
-	 * Ensure the write is either sequential or at the
-	 * beginning of a strip (or that we can randomly
-	 * access the data -- i.e. no encoding).
-	 */
-	if (row != tif->tif_row) {
-		if (row < tif->tif_row) {
-			/*
-			 * Moving backwards within the same strip:
-			 * backup to the start and then decode
-			 * forward (below).
-			 */
-			tif->tif_row = (strip % td->td_stripsperimage) *
-			    td->td_rowsperstrip;
-			tif->tif_rawcp = tif->tif_rawdata;
-		}
-		/*
-		 * Seek forward to the desired row.
-		 */
-		if (!(*tif->tif_seek)(tif, row - tif->tif_row))
-			return (-1);
-		tif->tif_row = row;
-	}
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) buf, tif->tif_scanlinesize );
-
-	status = (*tif->tif_encoderow)(tif, (tidata_t) buf,
-	    tif->tif_scanlinesize, sample);
-
-        /* we are now poised at the beginning of the next row */
-	tif->tif_row = row + 1;
-	return (status);
-}
-
-/*
- * Encode the supplied data and write it to the
- * specified strip.  There must be space for the
- * data; we don't check if strips overlap!
- *
- * NB: Image length must be setup before writing.
- */
-tsize_t
-TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteEncodedStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsample_t sample;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return ((tsize_t) -1);
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips) {
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not grow image by strips when using separate planes");
-			return ((tsize_t) -1);
-		}
-		if (!TIFFGrowStrips(tif, 1, module))
-			return ((tsize_t) -1);
-		td->td_stripsperimage =
-		    TIFFhowmany(td->td_imagelength, td->td_rowsperstrip);
-	}
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized according to the directory
-	 * info.
-	 */
-	if (!BUFFERCHECK(tif))
-		return ((tsize_t) -1);
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupencode)(tif))
-			return ((tsize_t) -1);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-        
-#ifdef REWRITE_HACK        
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-
-        if( td->td_stripbytecount[strip] > 0 )
-        {
-            /* if we are writing over existing tiles, zero length. */
-            td->td_stripbytecount[strip] = 0;
-
-            /* this forces TIFFAppendToStrip() to do a seek */
-            tif->tif_curoff = 0;
-        }
-#endif
-        
-	tif->tif_flags &= ~TIFF_POSTENCODE;
-	sample = (tsample_t)(strip / td->td_stripsperimage);
-	if (!(*tif->tif_preencode)(tif, sample))
-		return ((tsize_t) -1);
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) data, cc );
-
-	if (!(*tif->tif_encodestrip)(tif, (tidata_t) data, cc, sample))
-		return ((tsize_t) 0);
-	if (!(*tif->tif_postencode)(tif))
-		return ((tsize_t) -1);
-	if (!isFillOrder(tif, td->td_fillorder) &&
-	    (tif->tif_flags & TIFF_NOBITREV) == 0)
-		TIFFReverseBits(tif->tif_rawdata, tif->tif_rawcc);
-	if (tif->tif_rawcc > 0 &&
-	    !TIFFAppendToStrip(tif, strip, tif->tif_rawdata, tif->tif_rawcc))
-		return ((tsize_t) -1);
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	return (cc);
-}
-
-/*
- * Write the supplied data to the specified strip.
- * There must be space for the data; we don't check
- * if strips overlap!
- *
- * NB: Image length must be setup before writing.
- */
-tsize_t
-TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteRawStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return ((tsize_t) -1);
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips) {
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not grow image by strips when using separate planes");
-			return ((tsize_t) -1);
-		}
-		/*
-		 * Watch out for a growing image.  The value of
-		 * strips/image will initially be 1 (since it
-		 * can't be deduced until the imagelength is known).
-		 */
-		if (strip >= td->td_stripsperimage)
-			td->td_stripsperimage =
-			    TIFFhowmany(td->td_imagelength,td->td_rowsperstrip);
-		if (!TIFFGrowStrips(tif, 1, module))
-			return ((tsize_t) -1);
-	}
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	return (TIFFAppendToStrip(tif, strip, (tidata_t) data, cc) ?
-	    cc : (tsize_t) -1);
-}
-
-/*
- * Write and compress a tile of data.  The
- * tile is selected by the (x,y,z,s) coordinates.
- */
-tsize_t
-TIFFWriteTile(TIFF* tif,
-    tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	if (!TIFFCheckTile(tif, x, y, z, s))
-		return (-1);
-	/*
-	 * NB: A tile size of -1 is used instead of tif_tilesize knowing
-	 *     that TIFFWriteEncodedTile will clamp this to the tile size.
-	 *     This is done because the tile size may not be defined until
-	 *     after the output buffer is setup in TIFFWriteBufferSetup.
-	 */
-	return (TIFFWriteEncodedTile(tif,
-	    TIFFComputeTile(tif, x, y, z, s), buf, (tsize_t) -1));
-}
-
-/*
- * Encode the supplied data and write it to the
- * specified tile.  There must be space for the
- * data.  The function clamps individual writes
- * to a tile to the tile size, but does not (and
- * can not) check that multiple writes to the same
- * tile do not write more than tile size data.
- *
- * NB: Image length must be setup before writing; this
- *     interface does not support automatically growing
- *     the image on each write (as TIFFWriteScanline does).
- */
-tsize_t
-TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteEncodedTile";
-	TIFFDirectory *td;
-	tsample_t sample;
-
-	if (!WRITECHECKTILES(tif, module))
-		return ((tsize_t) -1);
-	td = &tif->tif_dir;
-	if (tile >= td->td_nstrips) {
-		TIFFError(module, "%s: Tile %lu out of range, max %lu",
-		    tif->tif_name, (u_long) tile, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized more intelligently (using
-	 * directory information).
-	 */
-	if (!BUFFERCHECK(tif))
-		return ((tsize_t) -1);
-	tif->tif_curtile = tile;
-
-#ifdef REWRITE_HACK        
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-
-        if( td->td_stripbytecount[tile] > 0 )
-        {
-            /* if we are writing over existing tiles, zero length. */
-            td->td_stripbytecount[tile] = 0;
-
-            /* this forces TIFFAppendToStrip() to do a seek */
-            tif->tif_curoff = 0;
-        }
-#endif
-        
-	/* 
-	 * Compute tiles per row & per column to compute
-	 * current row and column
-	 */
-	tif->tif_row = (tile % TIFFhowmany(td->td_imagelength, td->td_tilelength))
-		* td->td_tilelength;
-	tif->tif_col = (tile % TIFFhowmany(td->td_imagewidth, td->td_tilewidth))
-		* td->td_tilewidth;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupencode)(tif))
-			return ((tsize_t) -1);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_flags &= ~TIFF_POSTENCODE;
-	sample = (tsample_t)(tile/td->td_stripsperimage);
-	if (!(*tif->tif_preencode)(tif, sample))
-		return ((tsize_t) -1);
-	/*
-	 * Clamp write amount to the tile size.  This is mostly
-	 * done so that callers can pass in some large number
-	 * (e.g. -1) and have the tile size used instead.
-	 */
-	if ( cc < 1 || cc > tif->tif_tilesize)
-		cc = tif->tif_tilesize;
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) data, cc );
-
-	if (!(*tif->tif_encodetile)(tif, (tidata_t) data, cc, sample))
-		return ((tsize_t) 0);
-	if (!(*tif->tif_postencode)(tif))
-		return ((tsize_t) -1);
-	if (!isFillOrder(tif, td->td_fillorder) &&
-	    (tif->tif_flags & TIFF_NOBITREV) == 0)
-		TIFFReverseBits((u_char *)tif->tif_rawdata, tif->tif_rawcc);
-	if (tif->tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile,
-	    tif->tif_rawdata, tif->tif_rawcc))
-		return ((tsize_t) -1);
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	return (cc);
-}
-
-/*
- * Write the supplied data to the specified strip.
- * There must be space for the data; we don't check
- * if strips overlap!
- *
- * NB: Image length must be setup before writing; this
- *     interface does not support automatically growing
- *     the image on each write (as TIFFWriteScanline does).
- */
-tsize_t
-TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteRawTile";
-
-	if (!WRITECHECKTILES(tif, module))
-		return ((tsize_t) -1);
-	if (tile >= tif->tif_dir.td_nstrips) {
-		TIFFError(module, "%s: Tile %lu out of range, max %lu",
-		    tif->tif_name, (u_long) tile,
-		    (u_long) tif->tif_dir.td_nstrips);
-		return ((tsize_t) -1);
-	}
-	return (TIFFAppendToStrip(tif, tile, (tidata_t) data, cc) ?
-	    cc : (tsize_t) -1);
-}
-
-#define	isUnspecified(tif, f) \
-    (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0)
-
-int
-TIFFSetupStrips(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (isTiled(tif))
-		td->td_stripsperimage =
-		    isUnspecified(tif, FIELD_TILEDIMENSIONS) ?
-			td->td_samplesperpixel : TIFFNumberOfTiles(tif);
-	else
-		td->td_stripsperimage =
-		    isUnspecified(tif, FIELD_ROWSPERSTRIP) ?
-			td->td_samplesperpixel : TIFFNumberOfStrips(tif);
-	td->td_nstrips = td->td_stripsperimage;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		td->td_stripsperimage /= td->td_samplesperpixel;
-	td->td_stripoffset = (uint32 *)
-	    _TIFFmalloc(td->td_nstrips * sizeof (uint32));
-	td->td_stripbytecount = (uint32 *)
-	    _TIFFmalloc(td->td_nstrips * sizeof (uint32));
-	if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL)
-		return (0);
-	/*
-	 * Place data at the end-of-file
-	 * (by setting offsets to zero).
-	 */
-	_TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint32));
-	_TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint32));
-	TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS);
-	TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
-	return (1);
-}
-#undef isUnspecified
-
-/*
- * Verify file is writable and that the directory
- * information is setup properly.  In doing the latter
- * we also "freeze" the state of the directory so
- * that important information is not changed.
- */
-int
-TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
-{
-	if (tif->tif_mode == O_RDONLY) {
-		TIFFError(module, "%s: File not open for writing",
-		    tif->tif_name);
-		return (0);
-	}
-	if (tiles ^ isTiled(tif)) {
-		TIFFError(tif->tif_name, tiles ?
-		    "Can not write tiles to a stripped image" :
-		    "Can not write scanlines to a tiled image");
-		return (0);
-	}
-        
-        /*
-         * While we allow compressed TIFF files to be opened in update mode,
-         * we don't allow writing any image blocks in an existing compressed
-         * image.  Eventually we could do so, by moving blocks that grow
-         * to the end of the file, but we don't for now. 
-         */
-	if (tif->tif_dir.td_stripoffset != NULL 
-            && tif->tif_dir.td_compression != COMPRESSION_NONE )
-        {
-            TIFFError( module,
-                       "%s:\n"
-                       "In place update to compressed TIFF images not "
-                       "supported.",
-                       tif->tif_name );
-            return (0);
-        }
-
-	/*
-	 * On the first write verify all the required information
-	 * has been setup and initialize any data structures that
-	 * had to wait until directory information was set.
-	 * Note that a lot of our work is assumed to remain valid
-	 * because we disallow any of the important parameters
-	 * from changing after we start writing (i.e. once
-	 * TIFF_BEENWRITING is set, TIFFSetField will only allow
-	 * the image's length to be changed).
-	 */
-	if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
-		TIFFError(module,
-		    "%s: Must set \"ImageWidth\" before writing data",
-		    tif->tif_name);
-		return (0);
-	}
-	if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) {
-		TIFFError(module,
-	    "%s: Must set \"PlanarConfiguration\" before writing data",
-		    tif->tif_name);
-		return (0);
-	}
-	if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) {
-		tif->tif_dir.td_nstrips = 0;
-		TIFFError(module, "%s: No space for %s arrays",
-		    tif->tif_name, isTiled(tif) ? "tile" : "strip");
-		return (0);
-	}
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	tif->tif_flags |= TIFF_BEENWRITING;
-	return (1);
-}
-
-/*
- * Setup the raw data buffer used for encoding.
- */
-int
-TIFFWriteBufferSetup(TIFF* tif, tdata_t bp, tsize_t size)
-{
-	static const char module[] = "TIFFWriteBufferSetup";
-
-	if (tif->tif_rawdata) {
-		if (tif->tif_flags & TIFF_MYBUFFER) {
-			_TIFFfree(tif->tif_rawdata);
-			tif->tif_flags &= ~TIFF_MYBUFFER;
-		}
-		tif->tif_rawdata = NULL;
-	}
-	if (size == (tsize_t) -1) {
-		size = (isTiled(tif) ?
-		    tif->tif_tilesize : tif->tif_scanlinesize);
-		/*
-		 * Make raw data buffer at least 8K
-		 */
-		if (size < 8*1024)
-			size = 8*1024;
-		bp = NULL;			/* NB: force malloc */
-	}
-	if (bp == NULL) {
-		bp = _TIFFmalloc(size);
-		if (bp == NULL) {
-			TIFFError(module, "%s: No space for output buffer",
-			    tif->tif_name);
-			return (0);
-		}
-		tif->tif_flags |= TIFF_MYBUFFER;
-	} else
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-	tif->tif_rawdata = (tidata_t) bp;
-	tif->tif_rawdatasize = size;
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_flags |= TIFF_BUFFERSETUP;
-	return (1);
-}
-
-/*
- * Grow the strip data structures by delta strips.
- */
-static int
-TIFFGrowStrips(TIFF* tif, int delta, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	assert(td->td_planarconfig == PLANARCONFIG_CONTIG);
-	td->td_stripoffset = (uint32*)_TIFFrealloc(td->td_stripoffset,
-	    (td->td_nstrips + delta) * sizeof (uint32));
-	td->td_stripbytecount = (uint32*)_TIFFrealloc(td->td_stripbytecount,
-	    (td->td_nstrips + delta) * sizeof (uint32));
-	if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) {
-		td->td_nstrips = 0;
-		TIFFError(module, "%s: No space to expand strip arrays",
-		    tif->tif_name);
-		return (0);
-	}
-	_TIFFmemset(td->td_stripoffset+td->td_nstrips, 0, delta*sizeof (uint32));
-	_TIFFmemset(td->td_stripbytecount+td->td_nstrips, 0, delta*sizeof (uint32));
-	td->td_nstrips += delta;
-	return (1);
-}
-
-/*
- * Append the data to the specified strip.
- *
- * NB: We don't check that there's space in the
- *     file (i.e. that strips do not overlap).
- */
-static int
-TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "TIFFAppendToStrip";
-
-	if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
-		/*
-		 * No current offset, set the current strip.
-		 */
-		if (td->td_stripoffset[strip] != 0) {
-			if (!SeekOK(tif, td->td_stripoffset[strip])) {
-				TIFFError(module,
-				    "%s: Seek error at scanline %lu",
-				    tif->tif_name, (u_long) tif->tif_row);
-				return (0);
-			}
-		} else
-			td->td_stripoffset[strip] =
-			    TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
-		tif->tif_curoff = td->td_stripoffset[strip];
-	}
-	if (!WriteOK(tif, data, cc)) {
-		TIFFError(module, "%s: Write error at scanline %lu",
-		    tif->tif_name, (u_long) tif->tif_row);
-		return (0);
-	}
-	tif->tif_curoff += cc;
-	td->td_stripbytecount[strip] += cc;
-	return (1);
-}
-
-/*
- * Internal version of TIFFFlushData that can be
- * called by ``encodestrip routines'' w/o concern
- * for infinite recursion.
- */
-int
-TIFFFlushData1(TIFF* tif)
-{
-	if (tif->tif_rawcc > 0) {
-		if (!isFillOrder(tif, tif->tif_dir.td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits((u_char *)tif->tif_rawdata,
-			    tif->tif_rawcc);
-		if (!TIFFAppendToStrip(tif,
-		    isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip,
-		    tif->tif_rawdata, tif->tif_rawcc))
-			return (0);
-		tif->tif_rawcc = 0;
-		tif->tif_rawcp = tif->tif_rawdata;
-	}
-	return (1);
-}
-
-/*
- * Set the current write offset.  This should only be
- * used to set the offset to a known previous location
- * (very carefully), or to 0 so that the next write gets
- * appended to the end of the file.
- */
-void
-TIFFSetWriteOffset(TIFF* tif, toff_t off)
-{
-	tif->tif_curoff = off;
-}
diff --git a/tkimg1.3/libtiff/libtiff/tif_zip.c b/tkimg1.3/libtiff/libtiff/tif_zip.c
deleted file mode 100644
index 311d213..0000000
--- a/tkimg1.3/libtiff/libtiff/tif_zip.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tif_zip.c,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1995-1997 Sam Leffler
- * Copyright (c) 1995-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef ZIP_SUPPORT
-/*
- * TIFF Library.
- *
- * ZIP (aka Deflate) Compression Support
- *
- * This file is simply an interface to the zlib library written by
- * Jean-loup Gailly and Mark Adler.  You must use version 1.0 or later
- * of the library: this code assumes the 1.0 API and also depends on
- * the ability to write the zlib header multiple times (one per strip)
- * which was not possible with versions prior to 0.95.  Note also that
- * older versions of this codec avoided this bug by supressing the header
- * entirely.  This means that files written with the old library cannot
- * be read; they should be converted to a different compression scheme
- * and then reconverted.
- *
- * The data format used by the zlib library is described in the files
- * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the
- * directory ftp://ftp.uu.net/pub/archiving/zip/doc.  The library was
- * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
- */
-#include "tif_predict.h"
-#include "zlib.h"
-
-#include <stdio.h>
-#include <assert.h>
-
-/*
- * Sigh, ZLIB_VERSION is defined as a string so there's no
- * way to do a proper check here.  Instead we guess based
- * on the presence of #defines that were added between the
- * 0.95 and 1.0 distributions.
- */
-#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED)
-#error "Antiquated ZLIB software; you must use version 1.0 or later"
-#endif
-
-/*
- * State block for each open TIFF
- * file using ZIP compression/decompression.
- */
-typedef	struct {
-	TIFFPredictorState predict;
-	z_stream	stream;
-	int		zipquality;		/* compression level */
-	int		state;			/* state flags */
-#define	ZSTATE_INIT	0x1		/* zlib setup successfully */
-
-	TIFFVGetMethod	vgetparent;		/* super-class method */
-	TIFFVSetMethod	vsetparent;		/* super-class method */
-} ZIPState;
-
-#define	ZState(tif)		((ZIPState*) (tif)->tif_data)
-#define	DecoderState(tif)	ZState(tif)
-#define	EncoderState(tif)	ZState(tif)
-
-static	int ZIPEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int ZIPDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-
-static int
-ZIPSetupDecode(TIFF* tif)
-{
-	ZIPState* sp = DecoderState(tif);
-	static const char module[] = "ZIPSetupDecode";
-
-	assert(sp != NULL);
-	if (inflateInit(&sp->stream) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= ZSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-ZIPPreDecode(TIFF* tif, tsample_t s)
-{
-	ZIPState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_in = tif->tif_rawdata;
-	sp->stream.avail_in = tif->tif_rawcc;
-	return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-ZIPDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	ZIPState* sp = DecoderState(tif);
-	static const char module[] = "ZIPDecode";
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = op;
-	sp->stream.avail_out = occ;
-	do {
-		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-		if (state == Z_STREAM_END)
-			break;
-		if (state == Z_DATA_ERROR) {
-			TIFFError(module,
-			    "%s: Decoding error at scanline %d, %s",
-			    tif->tif_name, tif->tif_row, sp->stream.msg);
-			if (inflateSync(&sp->stream) != Z_OK)
-				return (0);
-			continue;
-		}
-		if (state != Z_OK) {
-			TIFFError(module, "%s: zlib error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-	} while (sp->stream.avail_out > 0);
-	if (sp->stream.avail_out != 0) {
-		TIFFError(module,
-		    "%s: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_name, tif->tif_row, sp->stream.avail_out);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-ZIPSetupEncode(TIFF* tif)
-{
-	ZIPState* sp = EncoderState(tif);
-	static const char module[] = "ZIPSetupEncode";
-
-	assert(sp != NULL);
-	if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= ZSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-ZIPPreEncode(TIFF* tif, tsample_t s)
-{
-	ZIPState *sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = tif->tif_rawdata;
-	sp->stream.avail_out = tif->tif_rawdatasize;
-	return (deflateReset(&sp->stream) == Z_OK);
-}
-
-/*
- * Encode a chunk of pixels.
- */
-static int
-ZIPEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	ZIPState *sp = EncoderState(tif);
-	static const char module[] = "ZIPEncode";
-
-	(void) s;
-	sp->stream.next_in = bp;
-	sp->stream.avail_in = cc;
-	do {
-		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-			TIFFError(module, "%s: Encoder error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-		if (sp->stream.avail_out == 0) {
-			tif->tif_rawcc = tif->tif_rawdatasize;
-			TIFFFlushData1(tif);
-			sp->stream.next_out = tif->tif_rawdata;
-			sp->stream.avail_out = tif->tif_rawdatasize;
-		}
-	} while (sp->stream.avail_in > 0);
-	return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-static int
-ZIPPostEncode(TIFF* tif)
-{
-	ZIPState *sp = EncoderState(tif);
-	static const char module[] = "ZIPPostEncode";
-	int state;
-
-	sp->stream.avail_in = 0;
-	do {
-		state = deflate(&sp->stream, Z_FINISH);
-		switch (state) {
-		case Z_STREAM_END:
-		case Z_OK:
-		    if ((int)sp->stream.avail_out != (int)tif->tif_rawdatasize)
-                    {
-			    tif->tif_rawcc =
-				tif->tif_rawdatasize - sp->stream.avail_out;
-			    TIFFFlushData1(tif);
-			    sp->stream.next_out = tif->tif_rawdata;
-			    sp->stream.avail_out = tif->tif_rawdatasize;
-		    }
-		    break;
-		default:
-		    TIFFError(module, "%s: zlib error: %s",
-			tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (state != Z_STREAM_END);
-	return (1);
-}
-
-static void
-ZIPCleanup(TIFF* tif)
-{
-	ZIPState* sp = ZState(tif);
-	if (sp) {
-		if (sp->state&ZSTATE_INIT) {
-			/* NB: avoid problems in the library */
-			if (tif->tif_mode == O_RDONLY)
-				inflateEnd(&sp->stream);
-			else
-				deflateEnd(&sp->stream);
-		}
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-ZIPVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	ZIPState* sp = ZState(tif);
-	static const char module[] = "ZIPVSetField";
-
-	switch (tag) {
-	case TIFFTAG_ZIPQUALITY:
-		sp->zipquality = va_arg(ap, int);
-		if (tif->tif_mode != O_RDONLY && (sp->state&ZSTATE_INIT)) {
-			if (deflateParams(&sp->stream,
-			    sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
-				TIFFError(module, "%s: zlib error: %s",
-				    tif->tif_name, sp->stream.msg);
-				return (0);
-			}
-		}
-		return (1);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	/*NOTREACHED*/
-}
-
-static int
-ZIPVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	ZIPState* sp = ZState(tif);
-
-	switch (tag) {
-	case TIFFTAG_ZIPQUALITY:
-		*va_arg(ap, int*) = sp->zipquality;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static const TIFFFieldInfo zipFieldInfo[] = {
-    { TIFFTAG_ZIPQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-int
-TIFFInitZIP(TIFF* tif, int scheme)
-{
-	ZIPState* sp;
-
-	assert( (scheme == COMPRESSION_DEFLATE) || (scheme == COMPRESSION_ADOBE_DEFLATE));
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (ZIPState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = ZState(tif);
-	sp->stream.zalloc = NULL;
-	sp->stream.zfree = NULL;
-	sp->stream.opaque = NULL;
-	sp->stream.data_type = Z_BINARY;
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, zipFieldInfo, N(zipFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = ZIPVGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = ZIPVSetField;	/* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->zipquality = Z_DEFAULT_COMPRESSION;	/* default comp. level */
-	sp->state = 0;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = ZIPSetupDecode;
-	tif->tif_predecode = ZIPPreDecode;
-	tif->tif_decoderow = ZIPDecode;
-	tif->tif_decodestrip = ZIPDecode;
-	tif->tif_decodetile = ZIPDecode;
-	tif->tif_setupencode = ZIPSetupEncode;
-	tif->tif_preencode = ZIPPreEncode;
-	tif->tif_postencode = ZIPPostEncode;
-	tif->tif_encoderow = ZIPEncode;
-	tif->tif_encodestrip = ZIPEncode;
-	tif->tif_encodetile = ZIPEncode;
-	tif->tif_cleanup = ZIPCleanup;
-	/*
-	 * Setup predictor setup.
-	 */
-	(void) TIFFPredictorInit(tif);
-	return (1);
-bad:
-	TIFFError("TIFFInitZIP", "No space for ZIP state block");
-	return (0);
-}
-#endif /* ZIP_SUPORT */
diff --git a/tkimg1.3/libtiff/libtiff/tiff.h b/tkimg1.3/libtiff/libtiff/tiff.h
deleted file mode 100644
index 51b0278..0000000
--- a/tkimg1.3/libtiff/libtiff/tiff.h
+++ /dev/null
@@ -1,484 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tiff.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFF_
-#define	_TIFF_
-/*
- * Tag Image File Format (TIFF)
- *
- * Based on Rev 6.0 from:
- *    Developer's Desk
- *    Aldus Corporation
- *    411 First Ave. South
- *    Suite 200
- *    Seattle, WA  98104
- *    206-622-5500
- */
-#define	TIFF_VERSION	42
-
-#define	TIFF_BIGENDIAN		0x4d4d
-#define	TIFF_LITTLEENDIAN	0x4949
-
-/*
- * The so called TIFF types conflict with definitions from inttypes.h 
- * included from sys/types.h on AIX (at least using VisualAge compiler). 
- * We try to work around this by detecting this case.  Defining 
- * _TIFF_DATA_TYPEDEFS_ short circuits the later definitions in tiff.h, and
- * we will in the holes not provided for by inttypes.h. 
- *
- * See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
- */
-#if defined(_H_INTTYPES) && defined(_ALL_SOURCE) && defined(USING_VISUALAGE)
-
-#define _TIFF_DATA_TYPEDEFS_
-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
-
-#endif
-
-/*
- * Intrinsic data types required by the file format:
- *
- * 8-bit quantities	int8/uint8
- * 16-bit quantities	int16/uint16
- * 32-bit quantities	int32/uint32
- * strings		unsigned char*
- */
-#ifndef _TIFF_DATA_TYPEDEFS_
-#define _TIFF_DATA_TYPEDEFS_
-
-#ifndef _AIX
-#ifdef __STDC__
-typedef	signed char int8;	/* NB: non-ANSI compilers may not grok */
-#else
-typedef	char int8;
-#endif
-#endif
-typedef	unsigned char uint8;
-typedef	short int16;
-typedef	unsigned short uint16;	/* sizeof (uint16) must == 2 */
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__)
-typedef	int int32;
-typedef	unsigned int uint32;	/* sizeof (uint32) must == 4 */
-#else
-typedef	long int32;
-typedef	unsigned long uint32;	/* sizeof (uint32) must == 4 */
-#endif
-#endif /* _TIFF_DATA_TYPEDEFS_ */
-
-/*	For TIFFReassignTagToIgnore */
-enum TIFFIgnoreSense /* IGNORE tag table */
-{
-	TIS_STORE,
-	TIS_EXTRACT,
-	TIS_EMPTY
-};
-
-typedef	struct {
-	uint16	tiff_magic;	/* magic number (defines byte order) */
-	uint16	tiff_version;	/* TIFF version number */
-	uint32	tiff_diroff;	/* byte offset to first directory */
-} TIFFHeader;
-
-/*
- * TIFF Image File Directories are comprised of
- * a table of field descriptors of the form shown
- * below.  The table is sorted in ascending order
- * by tag.  The values associated with each entry
- * are disjoint and may appear anywhere in the file
- * (so long as they are placed on a word boundary).
- *
- * If the value is 4 bytes or less, then it is placed
- * in the offset field to save space.  If the value
- * is less than 4 bytes, it is left-justified in the
- * offset field.
- */
-typedef	struct {
-	uint16		tdir_tag;	/* see below */
-	uint16		tdir_type;	/* data type; see below */
-	uint32		tdir_count;	/* number of items; length in spec */
-	uint32		tdir_offset;	/* byte offset to field data */
-} TIFFDirEntry;
-
-/*
- * NB: In the comments below,
- *  - items marked with a + are obsoleted by revision 5.0,
- *  - items marked with a ! are introduced in revision 6.0.
- *  - items marked with a % are introduced post revision 6.0.
- *  - items marked with a $ are obsoleted by revision 6.0.
- */
-
-/*
- * Tag data type information.
- *
- * Note: RATIONALs are the ratio of two 32-bit integer values.
- */
-typedef	enum {
-	TIFF_NOTYPE	= 0,	/* placeholder */
-	TIFF_BYTE	= 1,	/* 8-bit unsigned integer */
-	TIFF_ASCII	= 2,	/* 8-bit bytes w/ last byte null */
-	TIFF_SHORT	= 3,	/* 16-bit unsigned integer */
-	TIFF_LONG	= 4,	/* 32-bit unsigned integer */
-	TIFF_RATIONAL	= 5,	/* 64-bit unsigned fraction */
-	TIFF_SBYTE	= 6,	/* !8-bit signed integer */
-	TIFF_UNDEFINED	= 7,	/* !8-bit untyped data */
-	TIFF_SSHORT	= 8,	/* !16-bit signed integer */
-	TIFF_SLONG	= 9,	/* !32-bit signed integer */
-	TIFF_SRATIONAL	= 10,	/* !64-bit signed fraction */
-	TIFF_FLOAT	= 11,	/* !32-bit IEEE floating point */
-	TIFF_DOUBLE	= 12,	/* !64-bit IEEE floating point */
-	TIFF_IFD	= 13	/* %32-bit unsigned integer (offset) */
-} TIFFDataType;
-
-/*
- * TIFF Tag Definitions.
- */
-#define	TIFFTAG_SUBFILETYPE		254	/* subfile data descriptor */
-#define	    FILETYPE_REDUCEDIMAGE	0x1	/* reduced resolution version */
-#define	    FILETYPE_PAGE		0x2	/* one page of many */
-#define	    FILETYPE_MASK		0x4	/* transparency mask */
-#define	TIFFTAG_OSUBFILETYPE		255	/* +kind of data in subfile */
-#define	    OFILETYPE_IMAGE		1	/* full resolution image data */
-#define	    OFILETYPE_REDUCEDIMAGE	2	/* reduced size image data */
-#define	    OFILETYPE_PAGE		3	/* one page of many */
-#define	TIFFTAG_IMAGEWIDTH		256	/* image width in pixels */
-#define	TIFFTAG_IMAGELENGTH		257	/* image height in pixels */
-#define	TIFFTAG_BITSPERSAMPLE		258	/* bits per channel (sample) */
-#define	TIFFTAG_COMPRESSION		259	/* data compression technique */
-#define	    COMPRESSION_NONE		1	/* dump mode */
-#define	    COMPRESSION_CCITTRLE	2	/* CCITT modified Huffman RLE */
-#define	    COMPRESSION_CCITTFAX3	3	/* CCITT Group 3 fax encoding */
-#define     COMPRESSION_CCITT_T4        3       /* CCITT T.4 (TIFF 6 name) */
-#define	    COMPRESSION_CCITTFAX4	4	/* CCITT Group 4 fax encoding */
-#define     COMPRESSION_CCITT_T6        4       /* CCITT T.6 (TIFF 6 name) */
-#define	    COMPRESSION_LZW		5       /* Lempel-Ziv  & Welch */
-#define	    COMPRESSION_OJPEG		6	/* !6.0 JPEG */
-#define	    COMPRESSION_JPEG		7	/* %JPEG DCT compression */
-#define	    COMPRESSION_NEXT		32766	/* NeXT 2-bit RLE */
-#define	    COMPRESSION_CCITTRLEW	32771	/* #1 w/ word alignment */
-#define	    COMPRESSION_PACKBITS	32773	/* Macintosh RLE */
-#define	    COMPRESSION_THUNDERSCAN	32809	/* ThunderScan RLE */
-/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
-#define	    COMPRESSION_IT8CTPAD	32895   /* IT8 CT w/padding */
-#define	    COMPRESSION_IT8LW		32896   /* IT8 Linework RLE */
-#define	    COMPRESSION_IT8MP		32897   /* IT8 Monochrome picture */
-#define	    COMPRESSION_IT8BL		32898   /* IT8 Binary line art */
-/* compression codes 32908-32911 are reserved for Pixar */
-#define     COMPRESSION_PIXARFILM	32908   /* Pixar companded 10bit LZW */
-#define	    COMPRESSION_PIXARLOG	32909   /* Pixar companded 11bit ZIP */
-#define	    COMPRESSION_DEFLATE		32946	/* Deflate compression */
-#define     COMPRESSION_ADOBE_DEFLATE   8       /* Deflate compression, as recognized by Adobe */
-/* compression code 32947 is reserved for Oceana Matrix <dev at oceana.com> */
-#define     COMPRESSION_DCS             32947   /* Kodak DCS encoding */
-#define	    COMPRESSION_JBIG		34661	/* ISO JBIG */
-#define     COMPRESSION_SGILOG		34676	/* SGI Log Luminance RLE */
-#define     COMPRESSION_SGILOG24	34677	/* SGI Log 24-bit packed */
-#define     COMPRESSION_JP2000          34712   /* Leadtools JPEG2000 */
-#define	TIFFTAG_PHOTOMETRIC		262	/* photometric interpretation */
-#define	    PHOTOMETRIC_MINISWHITE	0	/* min value is white */
-#define	    PHOTOMETRIC_MINISBLACK	1	/* min value is black */
-#define	    PHOTOMETRIC_RGB		2	/* RGB color model */
-#define	    PHOTOMETRIC_PALETTE		3	/* color map indexed */
-#define	    PHOTOMETRIC_MASK		4	/* $holdout mask */
-#define	    PHOTOMETRIC_SEPARATED	5	/* !color separations */
-#define	    PHOTOMETRIC_YCBCR		6	/* !CCIR 601 */
-#define	    PHOTOMETRIC_CIELAB		8	/* !1976 CIE L*a*b* */
-#define	    PHOTOMETRIC_ICCLAB		9	/* ICC L*a*b* [Adobe TIFF Technote 4] */
-#define	    PHOTOMETRIC_ITULAB		10	/* ITU L*a*b* */
-#define     PHOTOMETRIC_LOGL		32844	/* CIE Log2(L) */
-#define     PHOTOMETRIC_LOGLUV		32845	/* CIE Log2(L) (u',v') */
-#define	TIFFTAG_THRESHHOLDING		263	/* +thresholding used on data */
-#define	    THRESHHOLD_BILEVEL		1	/* b&w art scan */
-#define	    THRESHHOLD_HALFTONE		2	/* or dithered scan */
-#define	    THRESHHOLD_ERRORDIFFUSE	3	/* usually floyd-steinberg */
-#define	TIFFTAG_CELLWIDTH		264	/* +dithering matrix width */
-#define	TIFFTAG_CELLLENGTH		265	/* +dithering matrix height */
-#define	TIFFTAG_FILLORDER		266	/* data order within a byte */
-#define	    FILLORDER_MSB2LSB		1	/* most significant -> least */
-#define	    FILLORDER_LSB2MSB		2	/* least significant -> most */
-#define	TIFFTAG_DOCUMENTNAME		269	/* name of doc. image is from */
-#define	TIFFTAG_IMAGEDESCRIPTION	270	/* info about image */
-#define	TIFFTAG_MAKE			271	/* scanner manufacturer name */
-#define	TIFFTAG_MODEL			272	/* scanner model name/number */
-#define	TIFFTAG_STRIPOFFSETS		273	/* offsets to data strips */
-#define	TIFFTAG_ORIENTATION		274	/* +image orientation */
-#define	    ORIENTATION_TOPLEFT		1	/* row 0 top, col 0 lhs */
-#define	    ORIENTATION_TOPRIGHT	2	/* row 0 top, col 0 rhs */
-#define	    ORIENTATION_BOTRIGHT	3	/* row 0 bottom, col 0 rhs */
-#define	    ORIENTATION_BOTLEFT		4	/* row 0 bottom, col 0 lhs */
-#define	    ORIENTATION_LEFTTOP		5	/* row 0 lhs, col 0 top */
-#define	    ORIENTATION_RIGHTTOP	6	/* row 0 rhs, col 0 top */
-#define	    ORIENTATION_RIGHTBOT	7	/* row 0 rhs, col 0 bottom */
-#define	    ORIENTATION_LEFTBOT		8	/* row 0 lhs, col 0 bottom */
-#define	TIFFTAG_SAMPLESPERPIXEL		277	/* samples per pixel */
-#define	TIFFTAG_ROWSPERSTRIP		278	/* rows per strip of data */
-#define	TIFFTAG_STRIPBYTECOUNTS		279	/* bytes counts for strips */
-#define	TIFFTAG_MINSAMPLEVALUE		280	/* +minimum sample value */
-#define	TIFFTAG_MAXSAMPLEVALUE		281	/* +maximum sample value */
-#define	TIFFTAG_XRESOLUTION		282	/* pixels/resolution in x */
-#define	TIFFTAG_YRESOLUTION		283	/* pixels/resolution in y */
-#define	TIFFTAG_PLANARCONFIG		284	/* storage organization */
-#define	    PLANARCONFIG_CONTIG		1	/* single image plane */
-#define	    PLANARCONFIG_SEPARATE	2	/* separate planes of data */
-#define	TIFFTAG_PAGENAME		285	/* page name image is from */
-#define	TIFFTAG_XPOSITION		286	/* x page offset of image lhs */
-#define	TIFFTAG_YPOSITION		287	/* y page offset of image lhs */
-#define	TIFFTAG_FREEOFFSETS		288	/* +byte offset to free block */
-#define	TIFFTAG_FREEBYTECOUNTS		289	/* +sizes of free blocks */
-#define	TIFFTAG_GRAYRESPONSEUNIT	290	/* $gray scale curve accuracy */
-#define	    GRAYRESPONSEUNIT_10S	1	/* tenths of a unit */
-#define	    GRAYRESPONSEUNIT_100S	2	/* hundredths of a unit */
-#define	    GRAYRESPONSEUNIT_1000S	3	/* thousandths of a unit */
-#define	    GRAYRESPONSEUNIT_10000S	4	/* ten-thousandths of a unit */
-#define	    GRAYRESPONSEUNIT_100000S	5	/* hundred-thousandths */
-#define	TIFFTAG_GRAYRESPONSECURVE	291	/* $gray scale response curve */
-#define	TIFFTAG_GROUP3OPTIONS		292	/* 32 flag bits */
-#define	TIFFTAG_T4OPTIONS		292	/* TIFF 6.0 proper name alias */
-#define	    GROUP3OPT_2DENCODING	0x1	/* 2-dimensional coding */
-#define	    GROUP3OPT_UNCOMPRESSED	0x2	/* data not compressed */
-#define	    GROUP3OPT_FILLBITS		0x4	/* fill to byte boundary */
-#define	TIFFTAG_GROUP4OPTIONS		293	/* 32 flag bits */
-#define TIFFTAG_T6OPTIONS               293     /* TIFF 6.0 proper name */
-#define	    GROUP4OPT_UNCOMPRESSED	0x2	/* data not compressed */
-#define	TIFFTAG_RESOLUTIONUNIT		296	/* units of resolutions */
-#define	    RESUNIT_NONE		1	/* no meaningful units */
-#define	    RESUNIT_INCH		2	/* english */
-#define	    RESUNIT_CENTIMETER		3	/* metric */
-#define	TIFFTAG_PAGENUMBER		297	/* page numbers of multi-page */
-#define	TIFFTAG_COLORRESPONSEUNIT	300	/* $color curve accuracy */
-#define	    COLORRESPONSEUNIT_10S	1	/* tenths of a unit */
-#define	    COLORRESPONSEUNIT_100S	2	/* hundredths of a unit */
-#define	    COLORRESPONSEUNIT_1000S	3	/* thousandths of a unit */
-#define	    COLORRESPONSEUNIT_10000S	4	/* ten-thousandths of a unit */
-#define	    COLORRESPONSEUNIT_100000S	5	/* hundred-thousandths */
-#define	TIFFTAG_TRANSFERFUNCTION	301	/* !colorimetry info */
-#define	TIFFTAG_SOFTWARE		305	/* name & release */
-#define	TIFFTAG_DATETIME		306	/* creation date and time */
-#define	TIFFTAG_ARTIST			315	/* creator of image */
-#define	TIFFTAG_HOSTCOMPUTER		316	/* machine where created */
-#define	TIFFTAG_PREDICTOR		317	/* prediction scheme w/ LZW */
-#define	TIFFTAG_WHITEPOINT		318	/* image white point */
-#define	TIFFTAG_PRIMARYCHROMATICITIES	319	/* !primary chromaticities */
-#define	TIFFTAG_COLORMAP		320	/* RGB map for pallette image */
-#define	TIFFTAG_HALFTONEHINTS		321	/* !highlight+shadow info */
-#define	TIFFTAG_TILEWIDTH		322	/* !rows/data tile */
-#define	TIFFTAG_TILELENGTH		323	/* !cols/data tile */
-#define TIFFTAG_TILEOFFSETS		324	/* !offsets to data tiles */
-#define TIFFTAG_TILEBYTECOUNTS		325	/* !byte counts for tiles */
-#define	TIFFTAG_BADFAXLINES		326	/* lines w/ wrong pixel count */
-#define	TIFFTAG_CLEANFAXDATA		327	/* regenerated line info */
-#define	    CLEANFAXDATA_CLEAN		0	/* no errors detected */
-#define	    CLEANFAXDATA_REGENERATED	1	/* receiver regenerated lines */
-#define	    CLEANFAXDATA_UNCLEAN	2	/* uncorrected errors exist */
-#define	TIFFTAG_CONSECUTIVEBADFAXLINES	328	/* max consecutive bad lines */
-#define	TIFFTAG_SUBIFD			330	/* subimage descriptors */
-#define	TIFFTAG_INKSET			332	/* !inks in separated image */
-#define	    INKSET_CMYK			1	/* !cyan-magenta-yellow-black color */
-#define	    INKSET_MULTIINK		2	/* !multi-ink or hi-fi color */
-#define	TIFFTAG_INKNAMES		333	/* !ascii names of inks */
-#define	TIFFTAG_NUMBEROFINKS		334	/* !number of inks */
-#define	TIFFTAG_DOTRANGE		336	/* !0% and 100% dot codes */
-#define	TIFFTAG_TARGETPRINTER		337	/* !separation target */
-#define	TIFFTAG_EXTRASAMPLES		338	/* !info about extra samples */
-#define	    EXTRASAMPLE_UNSPECIFIED	0	/* !unspecified data */
-#define	    EXTRASAMPLE_ASSOCALPHA	1	/* !associated alpha data */
-#define	    EXTRASAMPLE_UNASSALPHA	2	/* !unassociated alpha data */
-#define	TIFFTAG_SAMPLEFORMAT		339	/* !data sample format */
-#define	    SAMPLEFORMAT_UINT		1	/* !unsigned integer data */
-#define	    SAMPLEFORMAT_INT		2	/* !signed integer data */
-#define	    SAMPLEFORMAT_IEEEFP		3	/* !IEEE floating point data */
-#define	    SAMPLEFORMAT_VOID		4	/* !untyped data */
-#define	    SAMPLEFORMAT_COMPLEXINT	5	/* !complex signed int */
-#define	    SAMPLEFORMAT_COMPLEXIEEEFP	6	/* !complex ieee floating */
-#define	TIFFTAG_SMINSAMPLEVALUE		340	/* !variable MinSampleValue */
-#define	TIFFTAG_SMAXSAMPLEVALUE		341	/* !variable MaxSampleValue */
-#define	TIFFTAG_CLIPPATH		343	/* %ClipPath [Adobe TIFF technote 2] */
-#define	TIFFTAG_XCLIPPATHUNITS	344	/* %XClipPathUnits [Adobe TIFF technote 2] */
-#define	TIFFTAG_YCLIPPATHUNITS	344	/* %YClipPathUnits [Adobe TIFF technote 2] */
-#define	TIFFTAG_INDEXED			345	/* %Indexed [Adobe TIFF Technote 3] */
-#define	TIFFTAG_JPEGTABLES		347	/* %JPEG table stream */
-#define	TIFFTAG_OPIPROXY		351	/* %OPI Proxy [Adobe TIFF technote] */
-/*
- * Tags 512-521 are obsoleted by Technical Note #2
- * which specifies a revised JPEG-in-TIFF scheme.
- */
-#define	TIFFTAG_JPEGPROC		512	/* !JPEG processing algorithm */
-#define	    JPEGPROC_BASELINE		1	/* !baseline sequential */
-#define	    JPEGPROC_LOSSLESS		14	/* !Huffman coded lossless */
-#define	TIFFTAG_JPEGIFOFFSET		513	/* !pointer to SOI marker */
-#define	TIFFTAG_JPEGIFBYTECOUNT		514	/* !JFIF stream length */
-#define	TIFFTAG_JPEGRESTARTINTERVAL	515	/* !restart interval length */
-#define	TIFFTAG_JPEGLOSSLESSPREDICTORS	517	/* !lossless proc predictor */
-#define	TIFFTAG_JPEGPOINTTRANSFORM	518	/* !lossless point transform */
-#define	TIFFTAG_JPEGQTABLES		519	/* !Q matrice offsets */
-#define	TIFFTAG_JPEGDCTABLES		520	/* !DCT table offsets */
-#define	TIFFTAG_JPEGACTABLES		521	/* !AC coefficient offsets */
-#define	TIFFTAG_YCBCRCOEFFICIENTS	529	/* !RGB -> YCbCr transform */
-#define	TIFFTAG_YCBCRSUBSAMPLING	530	/* !YCbCr subsampling factors */
-#define	TIFFTAG_YCBCRPOSITIONING	531	/* !subsample positioning */
-#define	    YCBCRPOSITION_CENTERED	1	/* !as in PostScript Level 2 */
-#define	    YCBCRPOSITION_COSITED	2	/* !as in CCIR 601-1 */
-#define	TIFFTAG_REFERENCEBLACKWHITE	532	/* !colorimetry info */
-#define	TIFFTAG_XMLPACKET		700		/* %XML packet [Adobe XMP technote 9-14-02] (dkelly at apago.com) */
-#define TIFFTAG_OPIIMAGEID		32781	/* %OPI ImageID [Adobe TIFF technote] */
-/* tags 32952-32956 are private tags registered to Island Graphics */
-#define TIFFTAG_REFPTS			32953	/* image reference points */
-#define TIFFTAG_REGIONTACKPOINT		32954	/* region-xform tack point */
-#define TIFFTAG_REGIONWARPCORNERS	32955	/* warp quadrilateral */
-#define TIFFTAG_REGIONAFFINE		32956	/* affine transformation mat */
-/* tags 32995-32999 are private tags registered to SGI */
-#define	TIFFTAG_MATTEING		32995	/* $use ExtraSamples */
-#define	TIFFTAG_DATATYPE		32996	/* $use SampleFormat */
-#define	TIFFTAG_IMAGEDEPTH		32997	/* z depth of image */
-#define	TIFFTAG_TILEDEPTH		32998	/* z depth/data tile */
-/* tags 33300-33309 are private tags registered to Pixar */
-/*
- * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH
- * are set when an image has been cropped out of a larger image.  
- * They reflect the size of the original uncropped image.
- * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used
- * to determine the position of the smaller image in the larger one.
- */
-#define TIFFTAG_PIXAR_IMAGEFULLWIDTH    33300   /* full image size in x */
-#define TIFFTAG_PIXAR_IMAGEFULLLENGTH   33301   /* full image size in y */
- /* Tags 33302-33306 are used to identify special image modes and data
-  * used by Pixar's texture formats.
-  */
-#define TIFFTAG_PIXAR_TEXTUREFORMAT	33302	/* texture map format */
-#define TIFFTAG_PIXAR_WRAPMODES		33303	/* s & t wrap modes */
-#define TIFFTAG_PIXAR_FOVCOT		33304	/* cotan(fov) for env. maps */
-#define TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 33305
-#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306
-/* tag 33405 is a private tag registered to Eastman Kodak */
-#define TIFFTAG_WRITERSERIALNUMBER      33405   /* device serial number */
-/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */
-#define	TIFFTAG_COPYRIGHT		33432	/* copyright string */
-/* IPTC TAG from RichTIFF specifications */
-#define TIFFTAG_RICHTIFFIPTC    33723
-/* 34016-34029 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
-#define TIFFTAG_IT8SITE			34016	/* site name */
-#define TIFFTAG_IT8COLORSEQUENCE	34017	/* color seq. [RGB,CMYK,etc] */
-#define TIFFTAG_IT8HEADER		34018	/* DDES Header */
-#define TIFFTAG_IT8RASTERPADDING	34019	/* raster scanline padding */
-#define TIFFTAG_IT8BITSPERRUNLENGTH	34020	/* # of bits in short run */
-#define TIFFTAG_IT8BITSPEREXTENDEDRUNLENGTH 34021/* # of bits in long run */
-#define TIFFTAG_IT8COLORTABLE		34022	/* LW colortable */
-#define TIFFTAG_IT8IMAGECOLORINDICATOR	34023	/* BP/BL image color switch */
-#define TIFFTAG_IT8BKGCOLORINDICATOR	34024	/* BP/BL bg color switch */
-#define TIFFTAG_IT8IMAGECOLORVALUE	34025	/* BP/BL image color value */
-#define TIFFTAG_IT8BKGCOLORVALUE	34026	/* BP/BL bg color value */
-#define TIFFTAG_IT8PIXELINTENSITYRANGE	34027	/* MP pixel intensity value */
-#define TIFFTAG_IT8TRANSPARENCYINDICATOR 34028	/* HC transparency switch */
-#define TIFFTAG_IT8COLORCHARACTERIZATION 34029	/* color character. table */
-#define TIFFTAG_IT8HCUSAGE			34030	/* HC usage indicator */
-#define TIFFTAG_IT8TRAPINDICATOR	34031	/* Trapping indicator (untrapped=0, trapped=1) */
-#define TIFFTAG_IT8CMYKEQUIVALENT	34032	/* CMYK color equivalents */
-/* tags 34232-34236 are private tags registered to Texas Instruments */
-#define TIFFTAG_FRAMECOUNT              34232   /* Sequence Frame Count */
-/* tag 34750 is a private tag registered to Adobe? */
-#define TIFFTAG_ICCPROFILE		34675	/* ICC profile data */
-/* tag 34377 is private tag registered to Adobe for PhotoShop */
-#define TIFFTAG_PHOTOSHOP				34377 
-/* tag 34750 is a private tag registered to Pixel Magic */
-#define	TIFFTAG_JBIGOPTIONS		34750	/* JBIG options */
-/* tags 34908-34914 are private tags registered to SGI */
-#define	TIFFTAG_FAXRECVPARAMS		34908	/* encoded Class 2 ses. parms */
-#define	TIFFTAG_FAXSUBADDRESS		34909	/* received SubAddr string */
-#define	TIFFTAG_FAXRECVTIME		34910	/* receive time (secs) */
-/* tags 37439-37443 are registered to SGI <gregl at sgi.com> */
-#define TIFFTAG_STONITS			37439	/* Sample value to Nits */
-/* tag 34929 is a private tag registered to FedEx */
-#define	TIFFTAG_FEDEX_EDR		34929	/* unknown use */
-/* tag 65535 is an undefined tag used by Eastman Kodak */
-#define TIFFTAG_DCSHUESHIFTVALUES       65535   /* hue shift correction data */
-
-/*
- * The following are ``pseudo tags'' that can be
- * used to control codec-specific functionality.
- * These tags are not written to file.  Note that
- * these values start at 0xffff+1 so that they'll
- * never collide with Aldus-assigned tags.
- *
- * If you want your private pseudo tags ``registered''
- * (i.e. added to this file), send mail to sam at sgi.com
- * with the appropriate C definitions to add.
- */
-#define	TIFFTAG_FAXMODE			65536	/* Group 3/4 format control */
-#define	    FAXMODE_CLASSIC	0x0000		/* default, include RTC */
-#define	    FAXMODE_NORTC	0x0001		/* no RTC at end of data */
-#define	    FAXMODE_NOEOL	0x0002		/* no EOL code at end of row */
-#define	    FAXMODE_BYTEALIGN	0x0004		/* byte align row */
-#define	    FAXMODE_WORDALIGN	0x0008		/* word align row */
-#define	    FAXMODE_CLASSF	FAXMODE_NORTC	/* TIFF Class F */
-#define	TIFFTAG_JPEGQUALITY		65537	/* Compression quality level */
-/* Note: quality level is on the IJG 0-100 scale.  Default value is 75 */
-#define	TIFFTAG_JPEGCOLORMODE		65538	/* Auto RGB<=>YCbCr convert? */
-#define	    JPEGCOLORMODE_RAW	0x0000		/* no conversion (default) */
-#define	    JPEGCOLORMODE_RGB	0x0001		/* do auto conversion */
-#define	TIFFTAG_JPEGTABLESMODE		65539	/* What to put in JPEGTables */
-#define	    JPEGTABLESMODE_QUANT 0x0001		/* include quantization tbls */
-#define	    JPEGTABLESMODE_HUFF	0x0002		/* include Huffman tbls */
-/* Note: default is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF */
-#define	TIFFTAG_FAXFILLFUNC		65540	/* G3/G4 fill function */
-#define	TIFFTAG_PIXARLOGDATAFMT		65549	/* PixarLogCodec I/O data sz */
-#define	    PIXARLOGDATAFMT_8BIT	0	/* regular u_char samples */
-#define	    PIXARLOGDATAFMT_8BITABGR	1	/* ABGR-order u_chars */
-#define	    PIXARLOGDATAFMT_11BITLOG	2	/* 11-bit log-encoded (raw) */
-#define	    PIXARLOGDATAFMT_12BITPICIO	3	/* as per PICIO (1.0==2048) */
-#define	    PIXARLOGDATAFMT_16BIT	4	/* signed short samples */
-#define	    PIXARLOGDATAFMT_FLOAT	5	/* IEEE float samples */
-/* 65550-65556 are allocated to Oceana Matrix <dev at oceana.com> */
-#define TIFFTAG_DCSIMAGERTYPE           65550   /* imager model & filter */
-#define     DCSIMAGERMODEL_M3           0       /* M3 chip (1280 x 1024) */
-#define     DCSIMAGERMODEL_M5           1       /* M5 chip (1536 x 1024) */
-#define     DCSIMAGERMODEL_M6           2       /* M6 chip (3072 x 2048) */
-#define     DCSIMAGERFILTER_IR          0       /* infrared filter */
-#define     DCSIMAGERFILTER_MONO        1       /* monochrome filter */
-#define     DCSIMAGERFILTER_CFA         2       /* color filter array */
-#define     DCSIMAGERFILTER_OTHER       3       /* other filter */
-#define TIFFTAG_DCSINTERPMODE           65551   /* interpolation mode */
-#define     DCSINTERPMODE_NORMAL        0x0     /* whole image, default */
-#define     DCSINTERPMODE_PREVIEW       0x1     /* preview of image (384x256) */
-#define TIFFTAG_DCSBALANCEARRAY         65552   /* color balance values */
-#define TIFFTAG_DCSCORRECTMATRIX        65553   /* color correction values */
-#define TIFFTAG_DCSGAMMA                65554   /* gamma value */
-#define TIFFTAG_DCSTOESHOULDERPTS       65555   /* toe & shoulder points */
-#define TIFFTAG_DCSCALIBRATIONFD        65556   /* calibration file desc */
-/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */
-#define	TIFFTAG_ZIPQUALITY		65557	/* compression quality level */
-#define	TIFFTAG_PIXARLOGQUALITY		65558	/* PixarLog uses same scale */
-/* 65559 is allocated to Oceana Matrix <dev at oceana.com> */
-#define TIFFTAG_DCSCLIPRECTANGLE	65559	/* area of image to acquire */
-#define TIFFTAG_SGILOGDATAFMT		65560	/* SGILog user data format */
-#define     SGILOGDATAFMT_FLOAT		0	/* IEEE float samples */
-#define     SGILOGDATAFMT_16BIT		1	/* 16-bit samples */
-#define     SGILOGDATAFMT_RAW		2	/* uninterpreted data */
-#define     SGILOGDATAFMT_8BIT		3	/* 8-bit RGB monitor values */
-#define TIFFTAG_SGILOGENCODE		65561 /* SGILog data encoding control*/
-#define     SGILOGENCODE_NODITHER	0     /* do not dither encoded values*/
-#define     SGILOGENCODE_RANDITHER	1     /* randomly dither encd values */
-#endif /* _TIFF_ */
diff --git a/tkimg1.3/libtiff/libtiff/tiffcomp.h b/tkimg1.3/libtiff/libtiff/tiffcomp.h
deleted file mode 100644
index 878c74c..0000000
--- a/tkimg1.3/libtiff/libtiff/tiffcomp.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tiffcomp.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _COMPAT_
-#define	_COMPAT_
-/*
- * This file contains a hodgepodge of definitions and
- * declarations that are needed to provide compatibility
- * between the native system and the base implementation
- * that the library assumes.
- *
- * NB: This file is a mess.
- */
-
-/*
- * Setup basic type definitions and function declaratations.
- */
-
-/*
- * Simplify Acorn RISC OS identifier (to avoid confusion with Acorn RISC iX
- * and with defunct Unix Risc OS)
- * No need to specify __arm - hey, Acorn might port the OS, no problem here!
- */
-#ifdef __acornriscos
-#undef __acornriscos
-#endif
-#if defined(__acorn) && defined(__riscos)
-#define __acornriscos
-#endif
-
-#if defined(__MWERKS__) || defined(THINK_C)
-#include <unix.h>
-#include <math.h>
-#endif
-
-#include <stdio.h>
-
-#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
-#include <types.h>
-#elif !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acornriscos) && !defined(applec)
-#include <sys/types.h>
-#endif
-
-#if defined(VMS)
-#include <file.h>
-#include <unixio.h>
-#elif !defined(__acornriscos)
-#include <fcntl.h>
-#endif
-
-/*
- * This maze of checks controls defines or not the
- * target system has BSD-style typdedefs declared in
- * an include file and/or whether or not to include
- * <unistd.h> to get the SEEK_* definitions.  Some
- * additional includes are also done to pull in the
- * appropriate definitions we're looking for.
- */
-#if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
-#include <stdlib.h>
-#define	BSDTYPES
-#define	HAVE_UNISTD_H	0
-#elif (defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) || defined(_WIN32)) && !defined(unix)
-#define	BSDTYPES
-#elif defined(OS2_16) || defined(OS2_32)
-#define	BSDTYPES
-#elif defined(__acornriscos)
-#include <stdlib.h>
-#define	BSDTYPES
-#define	HAVE_UNISTD_H	0
-#elif defined(VMS)
-#define	HAVE_UNISTD_H	0
-#else
-#define	HAVE_UNISTD_H	1
-#endif
-
-/*
- * The library uses the ANSI C/POSIX SEEK_*
- * definitions that should be defined in unistd.h
- * (except on system where they are in stdio.h and
- * there is no unistd.h).
- */
-#if !defined(SEEK_SET) && HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/*
- * The library uses memset, memcpy, and memcmp.
- * ANSI C and System V define these in string.h.
- */
-#include <string.h>
-
-/*
- * The BSD typedefs are used throughout the library.
- * If your system doesn't have them in <sys/types.h>,
- * then define BSDTYPES in your Makefile.
- */
-#if defined(BSDTYPES)
-# ifndef _BSDTYPES_DEFINED
-#  ifndef __u_char_defined
-typedef	unsigned char u_char;
-typedef	unsigned short u_short;
-typedef	unsigned int u_int;
-typedef	unsigned long u_long;
-#   define __u_char_defined
-#  endif /* __u_char_defined */
-#  define _BSDTYPES_DEFINED
-# endif /* _BSDTYPES_DEFINED */
-#endif /* BSDTYPES */
-
-/*
- * dblparam_t is the type that a double precision
- * floating point value will have on the parameter
- * stack (when coerced by the compiler).
- */
-/* Note: on MacPowerPC "extended" is undefined. So only use it for 68K-Macs */
-#if defined(__SC__) || defined(THINK_C)
-typedef extended dblparam_t;
-#else
-typedef double dblparam_t;
-#endif
-
-/*
- * If your compiler supports inline functions, then
- * set INLINE appropriately to get the known hotspots
- * in the library expanded inline.
- */
-#if defined(__GNUC__)
-#if defined(__STRICT_ANSI__)
-#define	INLINE	__inline__
-#else
-#define	INLINE	inline
-#endif
-#else /* !__GNUC__ */
-#define	INLINE
-#endif
-
-/*
- * GLOBALDATA is a macro that is used to define global variables
- * private to the library.  We use this indirection to hide
- * brain-damage in VAXC (and GCC) under VAX/VMS.  In these
- * environments the macro places the variable in a non-shareable
- * program section, which ought to be done by default (sigh!)
- *
- * Apparently DEC are aware of the problem as this behaviour is the
- * default under VMS on AXP.
- *
- * The GNU C variant is untested.
- */
-#if defined(VAX) && defined(VMS)
-#if defined(VAXC)
-#define GLOBALDATA(TYPE,NAME)	extern noshare TYPE NAME
-#endif
-#if defined(__GNUC__)
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME \
-	asm("_$$PsectAttributes_NOSHR$$" #NAME)
-#endif
-#else	/* !VAX/VMS */
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME
-#endif
-
-#if defined(__acornriscos)
-/*
- * osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
- * on C alone. For that reason, the relevant functions are
- * implemented in tif_acorn.c, and the elements from the header
- * file are included here.
- */
-#if defined(__cplusplus)
-#include <osfcn.h>
-#else
-#define	O_RDONLY	0
-#define	O_WRONLY	1
-#define	O_RDWR		2
-#define	O_APPEND	8
-#define	O_CREAT		0x200
-#define	O_TRUNC		0x400
-typedef long off_t;
-extern int open(const char *name, int flags, int mode);
-extern int close(int fd);
-extern int write(int fd, const char *buf, int nbytes);
-extern int read(int fd, char *buf, int nbytes);
-extern off_t lseek(int fd, off_t offset, int whence);
-extern int creat(const char *path, int mode);
-#endif /* __cplusplus */
-#endif /* __acornriscos */
-
-/* Bit and byte order, the default is MSB to LSB */
-#ifdef VMS
-#undef HOST_FILLORDER
-#undef HOST_BIGENDIAN
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-#define HOST_BIGENDIAN	0
-#endif
-
-
-#endif /* _COMPAT_ */
diff --git a/tkimg1.3/libtiff/libtiff/tiffconf.h b/tkimg1.3/libtiff/libtiff/tiffconf.h
deleted file mode 100644
index 58ca223..0000000
--- a/tkimg1.3/libtiff/libtiff/tiffconf.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tiffconf.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFCONF_
-#define	_TIFFCONF_
-/*
- * Library Configuration Definitions.
- *
- * This file defines the default configuration for the library.
- * If the target system does not have make or a way to specify
- * #defines on the command line, this file can be edited to
- * configure the library.  Otherwise, one can override portability
- * and configuration-related definitions from a Makefile or command
- * line by defining COMPRESSION_SUPPORT (see below).
- */
-
-/*
- * General portability-related defines:
- *
- * HAVE_IEEEFP		define as 0 or 1 according to the floating point
- *			format suported by the machine
- * BSDTYPES		define this if your system does NOT define the
- *			usual 4BSD typedefs u_int et. al.
- * HAVE_MMAP		enable support for memory mapping read-only files;
- *			this is typically deduced by the configure script
- * HOST_FILLORDER	native cpu bit order: one of FILLORDER_MSB2LSB
- *			or FILLODER_LSB2MSB; this is typically set by the
- *			configure script
- * HOST_BIGENDIAN	native cpu byte order: 1 if big-endian (Motorola)
- *			or 0 if little-endian (Intel); this may be used
- *			in codecs to optimize code
- * USE_64BIT_API	set to 1 if tif_unix.c should use lseek64(),
- *                      fstat64() and stat64 allowing 2-4GB files.
- */
-#ifndef HAVE_IEEEFP
-#define	HAVE_IEEEFP	1
-#endif
-#ifndef HOST_FILLORDER
-#define	HOST_FILLORDER	FILLORDER_MSB2LSB
-#endif
-#ifndef	HOST_BIGENDIAN
-#define	HOST_BIGENDIAN	1
-#endif
-
-#ifndef USE_64BIT_API
-#  define USE_64BIT_API	0
-#endif
-
-#ifndef COMPRESSION_SUPPORT
-/*
- * Compression support defines:
- *
- *    CCITT_SUPPORT	enable support for CCITT Group 3 & 4 algorithms
- *    PACKBITS_SUPPORT	enable support for Macintosh PackBits algorithm
- *    LZW_SUPPORT	enable support for LZW algorithm
- *    THUNDER_SUPPORT	enable support for ThunderScan 4-bit RLE algorithm
- *    NEXT_SUPPORT	enable support for NeXT 2-bit RLE algorithm
- *    OJPEG_SUPPORT	enable support for 6.0-style JPEG DCT algorithms
- *			(requires IJG software)
- *    JPEG_SUPPORT	enable support for post-6.0-style JPEG DCT algorithms
- *			(requires freely available IJG software, see tif_jpeg.c)
- *    ZIP_SUPPORT	enable support for Deflate algorithm
- *			(requires freely available zlib software, see tif_zip.c)
- *    PIXARLOG_SUPPORT	enable support for Pixar log-format algorithm
- *    LOGLUV_SUPPORT	enable support for LogLuv high dynamic range encoding
- */
-#define	CCITT_SUPPORT
-#define	PACKBITS_SUPPORT
-#define	LZW_SUPPORT
-#define	THUNDER_SUPPORT
-#define	NEXT_SUPPORT
-#define LOGLUV_SUPPORT
-#endif /* COMPRESSION_SUPPORT */
-
-/*
- * If JPEG compression is enabled then we must also include
- * support for the colorimetry and YCbCr-related tags.
- */
-#ifdef JPEG_SUPPORT
-#ifndef YCBCR_SUPPORT
-#define	YCBCR_SUPPORT
-#endif
-#ifndef COLORIMETRY_SUPPORT
-#define	COLORIMETRY_SUPPORT
-#endif
-#endif /* JPEG_SUPPORT */
-
-/*
- * ``Orthogonal Features''
- *
- * STRIPCHOP_DEFAULT	default handling of strip chopping support (whether
- *			or not to convert single-strip uncompressed images
- *			to mutiple strips of ~8Kb--to reduce memory use)
- * SUBIFD_SUPPORT	enable support for SubIFD tag (thumbnails and such)
- * DEFAULT_EXTRASAMPLE_AS_ALPHA
- *                      The RGBA interface will treat a fourth sample with
- *                      no EXTRASAMPLE_ value as being ASSOCALPHA.  Many
- *                      packages produce RGBA files but don't mark the alpha
- *                      properly.
- * CHECK_JPEG_YCBCR_SUBSAMPLING
- *                      Enable picking up YCbCr subsampling info from the
- *                      JPEG data stream to support files lacking the tag.
- *                      See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling()
- *                      for details. 
- */
-#ifndef STRIPCHOP_DEFAULT
-#define	STRIPCHOP_DEFAULT	TIFF_STRIPCHOP	/* default is to enable */
-#endif
-#ifndef SUBIFD_SUPPORT
-#define	SUBIFD_SUPPORT		1	/* enable SubIFD tag (330) support */
-#endif
-#ifndef DEFAULT_EXTRASAMPLE_AS_ALPHA
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-#endif
-#ifndef CHECK_JPEG_YCBCR_SUBSAMPLING
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-#endif
-
-/*
- * Feature support definitions.
- * XXX: These macros are obsoleted. Don't use them in your apps!
- * Macros stays here for backward compatibility and should be always defined.
- */
-#define	COLORIMETRY_SUPPORT
-#define	YCBCR_SUPPORT
-#define	CMYK_SUPPORT
-#define	ICC_SUPPORT
-#define PHOTOSHOP_SUPPORT
-#define IPTC_SUPPORT
-
-#endif /* _TIFFCONF_ */
diff --git a/tkimg1.3/libtiff/libtiff/tiffio.h b/tkimg1.3/libtiff/libtiff/tiffio.h
deleted file mode 100644
index 115f6e7..0000000
--- a/tkimg1.3/libtiff/libtiff/tiffio.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tiffio.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFIO_
-#define	_TIFFIO_
-
-/*
- * TIFF I/O Library Definitions.
- */
-#include "tiff.h"
-#include "tiffvers.h"
-
-/*
- * TIFF is defined as an incomplete type to hide the
- * library's internal data structures from clients.
- */
-typedef	struct tiff TIFF;
-
-/*
- * The following typedefs define the intrinsic size of
- * data types used in the *exported* interfaces.  These
- * definitions depend on the proper definition of types
- * in tiff.h.  Note also that the varargs interface used
- * to pass tag types and values uses the types defined in
- * tiff.h directly.
- *
- * NB: ttag_t is unsigned int and not unsigned short because
- *     ANSI C requires that the type before the ellipsis be a
- *     promoted type (i.e. one of int, unsigned int, pointer,
- *     or double) and because we defined pseudo-tags that are
- *     outside the range of legal Aldus-assigned tags.
- * NB: tsize_t is int32 and not uint32 because some functions
- *     return -1.
- * NB: toff_t is not off_t for many reasons; TIFFs max out at
- *     32-bit file offsets being the most important, and to ensure
- *     that it is unsigned, rather than signed.
- */
-typedef	uint32 ttag_t;		/* directory tag */
-typedef	uint16 tdir_t;		/* directory index */
-typedef	uint16 tsample_t;	/* sample number */
-typedef	uint32 tstrip_t;	/* strip number */
-typedef uint32 ttile_t;		/* tile number */
-typedef	int32 tsize_t;		/* i/o size in bytes */
-typedef	void* tdata_t;		/* image data ref */
-typedef	uint32 toff_t;		/* file offset */
-
-#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
-#define __WIN32__
-#endif
-
-/*
- * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c
- * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c).
- *
- * By default tif_win32.c is assumed on windows if not using the cygwin
- * environment.
- */
-
-#if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
-#  if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && !defined(USE_WIN32_FILIO)
-#    define USE_WIN32_FILEIO
-#  endif
-#endif
-
-#if defined(USE_WIN32_FILEIO)
-#include <windows.h>
-#ifdef __WIN32__
-DECLARE_HANDLE(thandle_t);	/* Win32 file handle */
-#else
-typedef	HFILE thandle_t;	/* client data handle */
-#endif
-#else
-typedef	void* thandle_t;	/* client data handle */
-#endif
-
-#ifndef NULL
-#define	NULL	0
-#endif
-
-/*
- * Flags to pass to TIFFPrintDirectory to control
- * printing of data structures that are potentially
- * very large.   Bit-or these flags to enable printing
- * multiple items.
- */
-#define	TIFFPRINT_NONE		0x0		/* no extra info */
-#define	TIFFPRINT_STRIPS	0x1		/* strips/tiles info */
-#define	TIFFPRINT_CURVES	0x2		/* color/gray response curves */
-#define	TIFFPRINT_COLORMAP	0x4		/* colormap */
-#define	TIFFPRINT_JPEGQTABLES	0x100		/* JPEG Q matrices */
-#define	TIFFPRINT_JPEGACTABLES	0x200		/* JPEG AC tables */
-#define	TIFFPRINT_JPEGDCTABLES	0x200		/* JPEG DC tables */
-
-/* 
- * Colour conversion stuff
- */
-
-/* reference white */
-#define D65_X0 (95.0470F)
-#define D65_Y0 (100.0F)
-#define D65_Z0 (108.8827F)
-
-#define D50_X0 (96.4250F)
-#define D50_Y0 (100.0F)
-#define D50_Z0 (82.4680F)
-
-/* Structure for holding information about a display device. */
-
-typedef	unsigned char TIFFRGBValue;		/* 8-bit samples */
-
-typedef struct {
-	float d_mat[3][3]; 		/* XYZ -> luminance matrix */
-	float d_YCR;			/* Light o/p for reference white */
-	float d_YCG;
-	float d_YCB;
-	uint32 d_Vrwr;			/* Pixel values for ref. white */
-	uint32 d_Vrwg;
-	uint32 d_Vrwb;
-	float d_Y0R;			/* Residual light for black pixel */
-	float d_Y0G;
-	float d_Y0B;
-	float d_gammaR;			/* Gamma values for the three guns */
-	float d_gammaG;
-	float d_gammaB;
-} TIFFDisplay;
-
-typedef struct {				/* YCbCr->RGB support */
-	TIFFRGBValue* clamptab;			/* range clamping table */
-	int*	Cr_r_tab;
-	int*	Cb_b_tab;
-	int32*	Cr_g_tab;
-	int32*	Cb_g_tab;
-        int32*  Y_tab;
-} TIFFYCbCrToRGB;
-
-typedef struct {				/* CIE Lab 1976->RGB support */
-	int	range;				/* Size of conversion table */
-#define CIELABTORGB_TABLE_RANGE 1500
-	float	rstep, gstep, bstep;
-	float	X0, Y0, Z0;			/* Reference white point */
-	TIFFDisplay display;
-	float	Yr2r[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yr to r */
-	float	Yg2g[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yg to g */
-	float	Yb2b[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yb to b */
-} TIFFCIELabToRGB;
-
-extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
-extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
-			    float *, float *, float *);
-extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
-			 uint32 *, uint32 *, uint32 *);
-
-extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
-extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
-			   uint32 *, uint32 *, uint32 *);
-
-/*
- * RGBA-style image support.
- */
-typedef struct _TIFFRGBAImage TIFFRGBAImage;
-/*
- * The image reading and conversion routines invoke
- * ``put routines'' to copy/image/whatever tiles of
- * raw image data.  A default set of routines are 
- * provided to convert/copy raw image data to 8-bit
- * packed ABGR format rasters.  Applications can supply
- * alternate routines that unpack the data into a
- * different format or, for example, unpack the data
- * and draw the unpacked raster on the display.
- */
-typedef void (*tileContigRoutine)
-    (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
-	unsigned char*);
-typedef void (*tileSeparateRoutine)
-    (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
-	unsigned char*, unsigned char*, unsigned char*, unsigned char*);
-/*
- * RGBA-reader state.
- */
-struct _TIFFRGBAImage {
-	TIFF*	tif;				/* image handle */
-	int	stoponerr;			/* stop on read error */
-	int	isContig;			/* data is packed/separate */
-	int	alpha;				/* type of alpha data present */
-	uint32	width;				/* image width */
-	uint32	height;				/* image height */
-	uint16	bitspersample;			/* image bits/sample */
-	uint16	samplesperpixel;		/* image samples/pixel */
-	uint16	orientation;			/* image orientation */
-	uint16	req_orientation;		/* requested orientation */
-	uint16	photometric;			/* image photometric interp */
-	uint16*	redcmap;			/* colormap pallete */
-	uint16*	greencmap;
-	uint16*	bluecmap;
-						/* get image data routine */
-	int	(*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
-	union {
-	    void (*any)(TIFFRGBAImage*);
-	    tileContigRoutine	contig;
-	    tileSeparateRoutine	separate;
-	} put;					/* put decoded strip/tile */
-	TIFFRGBValue* Map;			/* sample mapping array */
-	uint32** BWmap;				/* black&white map */
-	uint32** PALmap;			/* palette image map */
-	TIFFYCbCrToRGB* ycbcr;			/* YCbCr conversion state */
-        TIFFCIELabToRGB* cielab;		/* CIE L*a*b conversion state */
-
-        int	row_offset;
-        int     col_offset;
-};
-
-/*
- * Macros for extracting components from the
- * packed ABGR form returned by TIFFReadRGBAImage.
- */
-#define	TIFFGetR(abgr)	((abgr) & 0xff)
-#define	TIFFGetG(abgr)	(((abgr) >> 8) & 0xff)
-#define	TIFFGetB(abgr)	(((abgr) >> 16) & 0xff)
-#define	TIFFGetA(abgr)	(((abgr) >> 24) & 0xff)
-
-/*
- * A CODEC is a software package that implements decoding,
- * encoding, or decoding+encoding of a compression algorithm.
- * The library provides a collection of builtin codecs.
- * More codecs may be registered through calls to the library
- * and/or the builtin implementations may be overridden.
- */
-typedef	int (*TIFFInitMethod)(TIFF*, int);
-typedef struct {
-	char*		name;
-	uint16		scheme;
-	TIFFInitMethod	init;
-} TIFFCodec;
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* share internal LogLuv conversion routines? */
-#ifndef LOGLUV_PUBLIC
-#define LOGLUV_PUBLIC		1	
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-typedef	void (*TIFFErrorHandler)(const char*, const char*, va_list);
-typedef	tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
-typedef	toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
-typedef	int (*TIFFCloseProc)(thandle_t);
-typedef	toff_t (*TIFFSizeProc)(thandle_t);
-typedef	int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
-typedef	void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
-typedef	void (*TIFFExtendProc)(TIFF*); 
-
-extern	const char* TIFFGetVersion(void);
-
-extern	const TIFFCodec* TIFFFindCODEC(uint16);
-extern	TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
-extern	void TIFFUnRegisterCODEC(TIFFCodec*);
-extern  int TIFFIsCODECConfigured(uint16);
-
-extern	tdata_t _TIFFmalloc(tsize_t);
-extern	tdata_t _TIFFrealloc(tdata_t, tsize_t);
-extern	void _TIFFmemset(tdata_t, int, tsize_t);
-extern	void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
-extern	int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
-extern	void _TIFFfree(tdata_t);
-
-extern	void TIFFClose(TIFF*);
-extern	int TIFFFlush(TIFF*);
-extern	int TIFFFlushData(TIFF*);
-extern	int TIFFGetField(TIFF*, ttag_t, ...);
-extern	int TIFFVGetField(TIFF*, ttag_t, va_list);
-extern	int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
-extern	int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list);
-extern	int TIFFReadDirectory(TIFF*);
-extern	tsize_t TIFFScanlineSize(TIFF*);
-extern	tsize_t TIFFRasterScanlineSize(TIFF*);
-extern	tsize_t TIFFStripSize(TIFF*);
-extern	tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
-extern	tsize_t TIFFVStripSize(TIFF*, uint32);
-extern	tsize_t TIFFTileRowSize(TIFF*);
-extern	tsize_t TIFFTileSize(TIFF*);
-extern	tsize_t TIFFVTileSize(TIFF*, uint32);
-extern	uint32 TIFFDefaultStripSize(TIFF*, uint32);
-extern	void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
-extern	int TIFFFileno(TIFF*);
-extern	int TIFFGetMode(TIFF*);
-extern	int TIFFIsTiled(TIFF*);
-extern	int TIFFIsByteSwapped(TIFF*);
-extern	int TIFFIsUpSampled(TIFF*);
-extern	int TIFFIsMSB2LSB(TIFF*);
-extern	uint32 TIFFCurrentRow(TIFF*);
-extern	tdir_t TIFFCurrentDirectory(TIFF*);
-extern	tdir_t TIFFNumberOfDirectories(TIFF*);
-extern	uint32 TIFFCurrentDirOffset(TIFF*);
-extern	tstrip_t TIFFCurrentStrip(TIFF*);
-extern	ttile_t TIFFCurrentTile(TIFF*);
-extern	int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
-extern	int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t);
-extern	int TIFFSetupStrips(TIFF *);
-extern  int TIFFWriteCheck(TIFF*, int, const char *);
-extern  int TIFFCreateDirectory(TIFF*);
-extern	int TIFFLastDirectory(TIFF*);
-extern	int TIFFSetDirectory(TIFF*, tdir_t);
-extern	int TIFFSetSubDirectory(TIFF*, uint32);
-extern	int TIFFUnlinkDirectory(TIFF*, tdir_t);
-extern	int TIFFSetField(TIFF*, ttag_t, ...);
-extern	int TIFFVSetField(TIFF*, ttag_t, va_list);
-extern	int TIFFWriteDirectory(TIFF *);
-extern	int TIFFCheckpointDirectory(TIFF *);
-extern	int TIFFRewriteDirectory(TIFF *);
-extern	int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
-
-#if defined(c_plusplus) || defined(__cplusplus)
-extern	void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
-extern	int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
-extern	int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
-extern	int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
-extern	int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
-				      int = ORIENTATION_BOTLEFT, int = 0);
-#else
-extern	void TIFFPrintDirectory(TIFF*, FILE*, long);
-extern	int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t);
-extern	int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t);
-extern	int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
-extern	int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
-#endif
-
-extern	int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
-extern	int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
-extern	int TIFFRGBAImageOK(TIFF*, char [1024]);
-extern	int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
-extern	int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
-extern	void TIFFRGBAImageEnd(TIFFRGBAImage*);
-extern	TIFF* TIFFOpen(const char*, const char*);
-extern	TIFF* TIFFFdOpen(int, const char*, const char*);
-extern	TIFF* TIFFClientOpen(const char*, const char*,
-	    thandle_t,
-	    TIFFReadWriteProc, TIFFReadWriteProc,
-	    TIFFSeekProc, TIFFCloseProc,
-	    TIFFSizeProc,
-	    TIFFMapFileProc, TIFFUnmapFileProc);
-extern	const char* TIFFFileName(TIFF*);
-extern	void TIFFError(const char*, const char*, ...);
-extern	void TIFFWarning(const char*, const char*, ...);
-extern	TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
-extern	TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
-extern	TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
-extern	ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t);
-extern	int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t);
-extern	ttile_t TIFFNumberOfTiles(TIFF*);
-extern	tsize_t TIFFReadTile(TIFF*,
-	    tdata_t, uint32, uint32, uint32, tsample_t);
-extern	tsize_t TIFFWriteTile(TIFF*,
-	    tdata_t, uint32, uint32, uint32, tsample_t);
-extern	tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t);
-extern	tstrip_t TIFFNumberOfStrips(TIFF*);
-extern	tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	int TIFFDataWidth(TIFFDataType);    /* table of tag datatype widths */
-extern	void TIFFSetWriteOffset(TIFF*, toff_t);
-extern	void TIFFSwabShort(uint16*);
-extern	void TIFFSwabLong(uint32*);
-extern	void TIFFSwabDouble(double*);
-extern	void TIFFSwabArrayOfShort(uint16*, unsigned long);
-extern	void TIFFSwabArrayOfLong(uint32*, unsigned long);
-extern	void TIFFSwabArrayOfDouble(double*, unsigned long);
-extern	void TIFFReverseBits(unsigned char *, unsigned long);
-extern	const unsigned char* TIFFGetBitRevTable(int);
-
-#ifdef LOGLUV_PUBLIC
-#define U_NEU		0.210526316
-#define V_NEU		0.473684211
-#define UVSCALE		410.
-extern	double LogL16toY(int);
-extern	double LogL10toY(int);
-extern	void XYZtoRGB24(float*, uint8*);
-extern	int uv_decode(double*, double*, int);
-extern	void LogLuv24toXYZ(uint32, float*);
-extern	void LogLuv32toXYZ(uint32, float*);
-#if defined(c_plusplus) || defined(__cplusplus)
-extern	int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
-extern	int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
-extern	int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
-extern	uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
-extern	uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
-#else
-extern	int LogL16fromY(double, int);
-extern	int LogL10fromY(double, int);
-extern	int uv_encode(double, double, int);
-extern	uint32 LogLuv24fromXYZ(float*, int);
-extern	uint32 LogLuv32fromXYZ(float*, int);
-#endif
-#endif /* LOGLUV_PUBLIC */
-
-/*
-** New stuff going public in 3.6.x.
-*/
-extern  int  TIFFGetTagListCount( TIFF * );
-extern  ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
-    
-#define	TIFF_ANY	TIFF_NOTYPE	/* for field descriptor searching */
-#define	TIFF_VARIABLE	-1		/* marker for variable length tags */
-#define	TIFF_SPP	-2		/* marker for SamplesPerPixel tags */
-#define	TIFF_VARIABLE2	-3		/* marker for uint32 var-length tags */
-
-#define FIELD_CUSTOM    65    
-
-typedef	struct {
-	ttag_t	field_tag;		/* field's tag */
-	short	field_readcount;	/* read count/TIFF_VARIABLE/TIFF_SPP */
-	short	field_writecount;	/* write count/TIFF_VARIABLE */
-	TIFFDataType field_type;	/* type of associated data */
-        unsigned short field_bit;	/* bit in fieldsset bit vector */
-	unsigned char field_oktochange;	/* if true, can change while writing */
-	unsigned char field_passcount;	/* if true, pass dir count on set */
-	char	*field_name;		/* ASCII name */
-} TIFFFieldInfo;
-
-typedef struct _TIFFTagValue {
-    const TIFFFieldInfo  *info;
-    int             count;
-    void           *value;
-} TIFFTagValue;
-
-extern	void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
-extern	const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType);
-extern	const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
-
-typedef	int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list);
-typedef	int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list);
-typedef	void (*TIFFPrintMethod)(TIFF*, FILE*, long);
-    
-typedef struct {
-    TIFFVSetMethod	vsetfield;	/* tag set routine */
-    TIFFVGetMethod	vgetfield;	/* tag get routine */
-    TIFFPrintMethod	printdir;	/* directory print routine */
-} TIFFTagMethods;
-        
-extern  TIFFTagMethods *TIFFAccessTagMethods( TIFF * );
-extern  void *TIFFGetClientInfo( TIFF *, const char * );
-extern  void TIFFSetClientInfo( TIFF *, void *, const char * );
-    
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFIO_ */
diff --git a/tkimg1.3/libtiff/libtiff/tiffiop.h b/tkimg1.3/libtiff/libtiff/tiffiop.h
deleted file mode 100644
index d55c307..0000000
--- a/tkimg1.3/libtiff/libtiff/tiffiop.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/libtiff/tiffiop.h,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFIOP_
-#define	_TIFFIOP_
-/*
- * ``Library-private'' definitions.
- */
-/*
- * UNIX systems should run the configure script to generate
- * a port.h file that reflects the system capabilities.
- * Doing this obviates all the dreck done in tiffcomp.h.
- */
-#if defined(unix) || defined(__unix)
-#include "port.h"
-#include "tiffconf.h"
-#else
-#include "tiffconf.h"
-#include "tiffcomp.h"
-#endif
-#include "tiffio.h"
-#include "tif_dir.h"
-
-#ifndef TRUE
-#define	TRUE	1
-#define	FALSE	0
-#endif
-
-typedef struct client_info {
-    struct client_info *next;
-    void      *data;
-    char      *name;
-} TIFFClientInfoLink;
-
-/*
- * Typedefs for ``method pointers'' used internally.
- */
-typedef	unsigned char tidataval_t;	/* internal image data value type */
-typedef	tidataval_t* tidata_t;		/* reference to internal image data */
-
-typedef	void (*TIFFVoidMethod)(TIFF*);
-typedef	int (*TIFFBoolMethod)(TIFF*);
-typedef	int (*TIFFPreMethod)(TIFF*, tsample_t);
-typedef	int (*TIFFCodeMethod)(TIFF*, tidata_t, tsize_t, tsample_t);
-typedef	int (*TIFFSeekMethod)(TIFF*, uint32);
-typedef	void (*TIFFPostMethod)(TIFF*, tidata_t, tsize_t);
-typedef	uint32 (*TIFFStripMethod)(TIFF*, uint32);
-typedef	void (*TIFFTileMethod)(TIFF*, uint32*, uint32*);
-
-struct tiff {
-	char*		tif_name;	/* name of open file */
-	int		tif_fd;		/* open file descriptor */
-	int		tif_mode;	/* open mode (O_*) */
-	uint32		tif_flags;
-#define	TIFF_FILLORDER		0x0003	/* natural bit fill order for machine */
-#define	TIFF_DIRTYHEADER	0x0004	/* header must be written on close */
-#define	TIFF_DIRTYDIRECT	0x0008	/* current directory must be written */
-#define	TIFF_BUFFERSETUP	0x0010	/* data buffers setup */
-#define	TIFF_CODERSETUP		0x0020	/* encoder/decoder setup done */
-#define	TIFF_BEENWRITING	0x0040	/* written 1+ scanlines to file */
-#define	TIFF_SWAB		0x0080	/* byte swap file information */
-#define	TIFF_NOBITREV		0x0100	/* inhibit bit reversal logic */
-#define	TIFF_MYBUFFER		0x0200	/* my raw data buffer; free on close */
-#define	TIFF_ISTILED		0x0400	/* file is tile, not strip- based */
-#define	TIFF_MAPPED		0x0800	/* file is mapped into memory */
-#define	TIFF_POSTENCODE		0x1000	/* need call to postencode routine */
-#define	TIFF_INSUBIFD		0x2000	/* currently writing a subifd */
-#define	TIFF_UPSAMPLED		0x4000	/* library is doing data up-sampling */ 
-#define	TIFF_STRIPCHOP		0x8000	/* enable strip chopping support */
-	toff_t		tif_diroff;	/* file offset of current directory */
-	toff_t		tif_nextdiroff;	/* file offset of following directory */
-	toff_t*		tif_dirlist;	/* list of offsets to already seen */
-					/* directories to prevent IFD looping */
-	uint16		tif_dirnumber;  /* number of already seen directories */
-	TIFFDirectory	tif_dir;	/* internal rep of current directory */
-	TIFFHeader	tif_header;	/* file's header block */
-	const int*	tif_typeshift;	/* data type shift counts */
-	const long*	tif_typemask;	/* data type masks */
-	uint32		tif_row;	/* current scanline */
-	tdir_t		tif_curdir;	/* current directory (index) */
-	tstrip_t	tif_curstrip;	/* current strip for read/write */
-	toff_t		tif_curoff;	/* current offset for read/write */
-	toff_t		tif_dataoff;	/* current offset for writing dir */
-#if SUBIFD_SUPPORT
-	uint16		tif_nsubifd;	/* remaining subifds to write */
-	toff_t		tif_subifdoff;	/* offset for patching SubIFD link */
-#endif
-/* tiling support */
-	uint32 		tif_col;	/* current column (offset by row too) */
-	ttile_t		tif_curtile;	/* current tile for read/write */
-	tsize_t		tif_tilesize;	/* # of bytes in a tile */
-/* compression scheme hooks */
-	int		tif_decodestatus;
-	TIFFBoolMethod	tif_setupdecode;/* called once before predecode */
-	TIFFPreMethod	tif_predecode;	/* pre- row/strip/tile decoding */
-	TIFFBoolMethod	tif_setupencode;/* called once before preencode */
-	int		tif_encodestatus;
-	TIFFPreMethod	tif_preencode;	/* pre- row/strip/tile encoding */
-	TIFFBoolMethod	tif_postencode;	/* post- row/strip/tile encoding */
-	TIFFCodeMethod	tif_decoderow;	/* scanline decoding routine */
-	TIFFCodeMethod	tif_encoderow;	/* scanline encoding routine */
-	TIFFCodeMethod	tif_decodestrip;/* strip decoding routine */
-	TIFFCodeMethod	tif_encodestrip;/* strip encoding routine */
-	TIFFCodeMethod	tif_decodetile;	/* tile decoding routine */
-	TIFFCodeMethod	tif_encodetile;	/* tile encoding routine */
-	TIFFVoidMethod	tif_close;	/* cleanup-on-close routine */
-	TIFFSeekMethod	tif_seek;	/* position within a strip routine */
-	TIFFVoidMethod	tif_cleanup;	/* cleanup state routine */
-	TIFFStripMethod	tif_defstripsize;/* calculate/constrain strip size */
-	TIFFTileMethod	tif_deftilesize;/* calculate/constrain tile size */
-	tidata_t	tif_data;	/* compression scheme private data */
-/* input/output buffering */
-	tsize_t		tif_scanlinesize;/* # of bytes in a scanline */
-	tsize_t		tif_scanlineskew;/* scanline skew for reading strips */
-	tidata_t	tif_rawdata;	/* raw data buffer */
-	tsize_t		tif_rawdatasize;/* # of bytes in raw data buffer */
-	tidata_t	tif_rawcp;	/* current spot in raw buffer */
-	tsize_t		tif_rawcc;	/* bytes unread from raw buffer */
-/* memory-mapped file support */
-	tidata_t	tif_base;	/* base of mapped file */
-	toff_t		tif_size;	/* size of mapped file region (bytes) */
-	TIFFMapFileProc	tif_mapproc;	/* map file method */
-	TIFFUnmapFileProc tif_unmapproc;/* unmap file method */
-/* input/output callback methods */
-	thandle_t	tif_clientdata;	/* callback parameter */
-	TIFFReadWriteProc tif_readproc;	/* read method */
-	TIFFReadWriteProc tif_writeproc;/* write method */
-	TIFFSeekProc	tif_seekproc;	/* lseek method */
-	TIFFCloseProc	tif_closeproc;	/* close method */
-	TIFFSizeProc	tif_sizeproc;	/* filesize method */
-/* post-decoding support */
-	TIFFPostMethod	tif_postdecode;	/* post decoding routine */
-/* tag support */
-	TIFFFieldInfo**	tif_fieldinfo;	/* sorted table of registered tags */
-	int		tif_nfields;	/* # entries in registered tag table */
-        TIFFTagMethods  tif_tagmethods; /* tag get/set/print routines */
-        TIFFClientInfoLink *tif_clientinfo; /* extra client information. */
-};
-
-#define	isPseudoTag(t)	(t > 0xffff)	/* is tag value normal or pseudo */
-
-#define	isTiled(tif)	(((tif)->tif_flags & TIFF_ISTILED) != 0)
-#define	isMapped(tif)	(((tif)->tif_flags & TIFF_MAPPED) != 0)
-#define	isFillOrder(tif, o)	(((tif)->tif_flags & (o)) != 0)
-#define	isUpSampled(tif)	(((tif)->tif_flags & TIFF_UPSAMPLED) != 0)
-#define	TIFFReadFile(tif, buf, size) \
-	((*(tif)->tif_readproc)((tif)->tif_clientdata,buf,size))
-#define	TIFFWriteFile(tif, buf, size) \
-	((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size))
-#define	TIFFSeekFile(tif, off, whence) \
-	((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence))
-#define	TIFFCloseFile(tif) \
-	((*(tif)->tif_closeproc)((tif)->tif_clientdata))
-#define	TIFFGetFileSize(tif) \
-	((*(tif)->tif_sizeproc)((tif)->tif_clientdata))
-#define	TIFFMapFileContents(tif, paddr, psize) \
-	((*(tif)->tif_mapproc)((tif)->tif_clientdata,paddr,psize))
-#define	TIFFUnmapFileContents(tif, addr, size) \
-	((*(tif)->tif_unmapproc)((tif)->tif_clientdata,addr,size))
-
-/*
- * Default Read/Seek/Write definitions.
- */
-#ifndef ReadOK
-#define	ReadOK(tif, buf, size) \
-	(TIFFReadFile(tif, (tdata_t) buf, (tsize_t)(size)) == (tsize_t)(size))
-#endif
-#ifndef SeekOK
-#define	SeekOK(tif, off) \
-	(TIFFSeekFile(tif, (toff_t) off, SEEK_SET) == (toff_t) off)
-#endif
-#ifndef WriteOK
-#define	WriteOK(tif, buf, size) \
-	(TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size)
-#endif
-
-/* NB: the uint32 casts are to silence certain ANSI-C compilers */
-#define	TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y)))
-#define	TIFFroundup(x, y) (TIFFhowmany(x,y)*((uint32)(y)))
-
-#define TIFFmax(A,B) ((A)>(B)?(A):(B))
-#define TIFFmin(A,B) ((A)<(B)?(A):(B))
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	int _TIFFgetMode(const char*, const char*);
-extern	int _TIFFNoRowEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoStripEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoTileEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoRowDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoStripDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoTileDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	void _TIFFNoPostDecode(TIFF*, tidata_t, tsize_t);
-extern  int  _TIFFNoPreCode (TIFF*, tsample_t); 
-extern	int _TIFFNoSeek(TIFF*, uint32);
-extern	void _TIFFSwab16BitData(TIFF*, tidata_t, tsize_t);
-extern	void _TIFFSwab32BitData(TIFF*, tidata_t, tsize_t);
-extern	void _TIFFSwab64BitData(TIFF*, tidata_t, tsize_t);
-extern	int TIFFFlushData1(TIFF*);
-extern	void TIFFFreeDirectory(TIFF*);
-extern	int TIFFDefaultDirectory(TIFF*);
-extern	int TIFFSetCompressionScheme(TIFF*, int);
-extern	int TIFFSetDefaultCompressionState(TIFF*);
-extern	uint32 _TIFFDefaultStripSize(TIFF*, uint32);
-extern	void _TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
-
-extern	void _TIFFsetByteArray(void**, void*, long);
-extern	void _TIFFsetString(char**, char*);
-extern	void _TIFFsetShortArray(uint16**, uint16*, long);
-extern	void _TIFFsetLongArray(uint32**, uint32*, long);
-extern	void _TIFFsetFloatArray(float**, float*, long);
-extern	void _TIFFsetDoubleArray(double**, double*, long);
-
-extern	void _TIFFprintAscii(FILE*, const char*);
-extern	void _TIFFprintAsciiTag(FILE*, const char*, const char*);
-
-GLOBALDATA(TIFFErrorHandler,_TIFFwarningHandler);
-GLOBALDATA(TIFFErrorHandler,_TIFFerrorHandler);
-
-extern	int TIFFInitDumpMode(TIFF*, int);
-#ifdef PACKBITS_SUPPORT
-extern	int TIFFInitPackBits(TIFF*, int);
-#endif
-#ifdef CCITT_SUPPORT
-extern	int TIFFInitCCITTRLE(TIFF*, int), TIFFInitCCITTRLEW(TIFF*, int);
-extern	int TIFFInitCCITTFax3(TIFF*, int), TIFFInitCCITTFax4(TIFF*, int);
-#endif
-#ifdef THUNDER_SUPPORT
-extern	int TIFFInitThunderScan(TIFF*, int);
-#endif
-#ifdef NEXT_SUPPORT
-extern	int TIFFInitNeXT(TIFF*, int);
-#endif
-#ifdef LZW_SUPPORT
-extern	int TIFFInitLZW(TIFF*, int);
-#endif
-#ifdef OJPEG_SUPPORT
-extern	int TIFFInitOJPEG(TIFF*, int);
-#endif
-#ifdef JPEG_SUPPORT
-extern	int TIFFInitJPEG(TIFF*, int);
-#endif
-#ifdef JBIG_SUPPORT
-extern	int TIFFInitJBIG(TIFF*, int);
-#endif
-#ifdef ZIP_SUPPORT
-extern	int TIFFInitZIP(TIFF*, int);
-#endif
-#ifdef PIXARLOG_SUPPORT
-extern	int TIFFInitPixarLog(TIFF*, int);
-#endif
-#ifdef LOGLUV_SUPPORT
-extern	int TIFFInitSGILog(TIFF*, int);
-#endif
-#ifdef VMS
-extern	const TIFFCodec _TIFFBuiltinCODECS[];
-#else
-extern	TIFFCodec _TIFFBuiltinCODECS[];
-#endif
-
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFIOP_ */
diff --git a/tkimg1.3/libtiff/libtiff/tiffvers.h b/tkimg1.3/libtiff/libtiff/tiffvers.h
deleted file mode 100644
index 3d24f9a..0000000
--- a/tkimg1.3/libtiff/libtiff/tiffvers.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#define TIFFLIB_VERSION_STR "LIBTIFF, Version 3.6.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
-/*
- * This define can be used in code that requires
- * compilation-related definitions specific to a
- * version or versions of the library.  Runtime
- * version checking should be done based on the
- * string returned by TIFFGetVersion.
- */
-#define TIFFLIB_VERSION 20031226
diff --git a/tkimg1.3/libtiff/libtiff/uvcode.h b/tkimg1.3/libtiff/libtiff/uvcode.h
deleted file mode 100644
index 8d96e44..0000000
--- a/tkimg1.3/libtiff/libtiff/uvcode.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Version 1.0 generated April 7, 1997 by Greg Ward Larson, SGI */
-#define UV_SQSIZ	(float)0.003500
-#define UV_NDIVS	16289
-#define UV_VSTART	(float)0.016940
-#define UV_NVS		163
-static struct {
-	float	ustart;
-	short	nus, ncum;
-}	uv_row[UV_NVS] = {
-	(float)0.247663,	4,	0,
-	(float)0.243779,	6,	4,
-	(float)0.241684,	7,	10,
-	(float)0.237874,	9,	17,
-	(float)0.235906,	10,	26,
-	(float)0.232153,	12,	36,
-	(float)0.228352,	14,	48,
-	(float)0.226259,	15,	62,
-	(float)0.222371,	17,	77,
-	(float)0.220410,	18,	94,
-	(float)0.214710,	21,	112,
-	(float)0.212714,	22,	133,
-	(float)0.210721,	23,	155,
-	(float)0.204976,	26,	178,
-	(float)0.202986,	27,	204,
-	(float)0.199245,	29,	231,
-	(float)0.195525,	31,	260,
-	(float)0.193560,	32,	291,
-	(float)0.189878,	34,	323,
-	(float)0.186216,	36,	357,
-	(float)0.186216,	36,	393,
-	(float)0.182592,	38,	429,
-	(float)0.179003,	40,	467,
-	(float)0.175466,	42,	507,
-	(float)0.172001,	44,	549,
-	(float)0.172001,	44,	593,
-	(float)0.168612,	46,	637,
-	(float)0.168612,	46,	683,
-	(float)0.163575,	49,	729,
-	(float)0.158642,	52,	778,
-	(float)0.158642,	52,	830,
-	(float)0.158642,	52,	882,
-	(float)0.153815,	55,	934,
-	(float)0.153815,	55,	989,
-	(float)0.149097,	58,	1044,
-	(float)0.149097,	58,	1102,
-	(float)0.142746,	62,	1160,
-	(float)0.142746,	62,	1222,
-	(float)0.142746,	62,	1284,
-	(float)0.138270,	65,	1346,
-	(float)0.138270,	65,	1411,
-	(float)0.138270,	65,	1476,
-	(float)0.132166,	69,	1541,
-	(float)0.132166,	69,	1610,
-	(float)0.126204,	73,	1679,
-	(float)0.126204,	73,	1752,
-	(float)0.126204,	73,	1825,
-	(float)0.120381,	77,	1898,
-	(float)0.120381,	77,	1975,
-	(float)0.120381,	77,	2052,
-	(float)0.120381,	77,	2129,
-	(float)0.112962,	82,	2206,
-	(float)0.112962,	82,	2288,
-	(float)0.112962,	82,	2370,
-	(float)0.107450,	86,	2452,
-	(float)0.107450,	86,	2538,
-	(float)0.107450,	86,	2624,
-	(float)0.107450,	86,	2710,
-	(float)0.100343,	91,	2796,
-	(float)0.100343,	91,	2887,
-	(float)0.100343,	91,	2978,
-	(float)0.095126,	95,	3069,
-	(float)0.095126,	95,	3164,
-	(float)0.095126,	95,	3259,
-	(float)0.095126,	95,	3354,
-	(float)0.088276,	100,	3449,
-	(float)0.088276,	100,	3549,
-	(float)0.088276,	100,	3649,
-	(float)0.088276,	100,	3749,
-	(float)0.081523,	105,	3849,
-	(float)0.081523,	105,	3954,
-	(float)0.081523,	105,	4059,
-	(float)0.081523,	105,	4164,
-	(float)0.074861,	110,	4269,
-	(float)0.074861,	110,	4379,
-	(float)0.074861,	110,	4489,
-	(float)0.074861,	110,	4599,
-	(float)0.068290,	115,	4709,
-	(float)0.068290,	115,	4824,
-	(float)0.068290,	115,	4939,
-	(float)0.068290,	115,	5054,
-	(float)0.063573,	119,	5169,
-	(float)0.063573,	119,	5288,
-	(float)0.063573,	119,	5407,
-	(float)0.063573,	119,	5526,
-	(float)0.057219,	124,	5645,
-	(float)0.057219,	124,	5769,
-	(float)0.057219,	124,	5893,
-	(float)0.057219,	124,	6017,
-	(float)0.050985,	129,	6141,
-	(float)0.050985,	129,	6270,
-	(float)0.050985,	129,	6399,
-	(float)0.050985,	129,	6528,
-	(float)0.050985,	129,	6657,
-	(float)0.044859,	134,	6786,
-	(float)0.044859,	134,	6920,
-	(float)0.044859,	134,	7054,
-	(float)0.044859,	134,	7188,
-	(float)0.040571,	138,	7322,
-	(float)0.040571,	138,	7460,
-	(float)0.040571,	138,	7598,
-	(float)0.040571,	138,	7736,
-	(float)0.036339,	142,	7874,
-	(float)0.036339,	142,	8016,
-	(float)0.036339,	142,	8158,
-	(float)0.036339,	142,	8300,
-	(float)0.032139,	146,	8442,
-	(float)0.032139,	146,	8588,
-	(float)0.032139,	146,	8734,
-	(float)0.032139,	146,	8880,
-	(float)0.027947,	150,	9026,
-	(float)0.027947,	150,	9176,
-	(float)0.027947,	150,	9326,
-	(float)0.023739,	154,	9476,
-	(float)0.023739,	154,	9630,
-	(float)0.023739,	154,	9784,
-	(float)0.023739,	154,	9938,
-	(float)0.019504,	158,	10092,
-	(float)0.019504,	158,	10250,
-	(float)0.019504,	158,	10408,
-	(float)0.016976,	161,	10566,
-	(float)0.016976,	161,	10727,
-	(float)0.016976,	161,	10888,
-	(float)0.016976,	161,	11049,
-	(float)0.012639,	165,	11210,
-	(float)0.012639,	165,	11375,
-	(float)0.012639,	165,	11540,
-	(float)0.009991,	168,	11705,
-	(float)0.009991,	168,	11873,
-	(float)0.009991,	168,	12041,
-	(float)0.009016,	170,	12209,
-	(float)0.009016,	170,	12379,
-	(float)0.009016,	170,	12549,
-	(float)0.006217,	173,	12719,
-	(float)0.006217,	173,	12892,
-	(float)0.005097,	175,	13065,
-	(float)0.005097,	175,	13240,
-	(float)0.005097,	175,	13415,
-	(float)0.003909,	177,	13590,
-	(float)0.003909,	177,	13767,
-	(float)0.002340,	177,	13944,
-	(float)0.002389,	170,	14121,
-	(float)0.001068,	164,	14291,
-	(float)0.001653,	157,	14455,
-	(float)0.000717,	150,	14612,
-	(float)0.001614,	143,	14762,
-	(float)0.000270,	136,	14905,
-	(float)0.000484,	129,	15041,
-	(float)0.001103,	123,	15170,
-	(float)0.001242,	115,	15293,
-	(float)0.001188,	109,	15408,
-	(float)0.001011,	103,	15517,
-	(float)0.000709,	97,	15620,
-	(float)0.000301,	89,	15717,
-	(float)0.002416,	82,	15806,
-	(float)0.003251,	76,	15888,
-	(float)0.003246,	69,	15964,
-	(float)0.004141,	62,	16033,
-	(float)0.005963,	55,	16095,
-	(float)0.008839,	47,	16150,
-	(float)0.010490,	40,	16197,
-	(float)0.016994,	31,	16237,
-	(float)0.023659,	21,	16268,
-};
diff --git a/tkimg1.3/libtiff/man/Makefile.in b/tkimg1.3/libtiff/man/Makefile.in
deleted file mode 100644
index 52f7580..0000000
--- a/tkimg1.3/libtiff/man/Makefile.in
+++ /dev/null
@@ -1,437 +0,0 @@
-#! smake
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/Makefile.in,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-#
-# @WARNING@
-#
-# Tag Image File Format Library Manual Pages
-#
-# Copyright (c) 1991-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-SRCDIR	= @RELSRCDIR@/man
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
-SHELL	= @SCRIPT_SH@
-SCRIPT_SH = @SCRIPT_SH@
-NULL	=
-ECHO	= echo
-SED	= sed
-MV	= mv
-RM	= rm -f
-INSTALL	= @INSTALL@
-
-#
-# Manual-related controls:
-#
-# MAN		head of manual tree
-# MANAPPS	subdirectory for application programs
-# MANLIB	subdirectory for library functions
-#
-MAN		= @DIR_MAN@
-MANAPPS		= @MANAPPS@
-MANLIB		= @MANLIB@
-#
-# MANSEDLOCAL	additional sed commands to use during source transformation
-#		(might want to transform section names here)
-# MANCVT	command to convert source to installable target (can use
-#		$? and $@, but not $<)
-MANSEDLOCAL	= @MANSEDLOCAL@
-MANCVT		= @MANCVT@
-#
-# The following macros are used during the install step to generate
-# the filenames of the target manual pages.  They appear inside a
-# shell for loop in a command of the form:
-#
-#	f=${MAN*NAME}
-#
-# where the variable ``i'' contains the filename of the formatted
-# manual page (formatted according to the MANCVT macro).
-#
-# MANAPPNAME	generate installed app man page filename
-# MANLIBNAME	generate installed library man page filename
-#
-#
-MANAPPNAME	= @MANAPPNAME@
-MANLIBNAME	= @MANLIBNAME@
-
-#
-# Set this up if your manual system requires a
-# pathname prefix in the .so commands when setting
-# up alternate files for multi-function manual pages.
-#
-#MANDIR	= man3/
-
-MANTOOLS=\
-	apps/fax2tiff.1 \
-	apps/fax2ps.1 \
-	apps/gif2tiff.1 \
-	apps/pal2rgb.1 \
-	apps/ppm2tiff.1 \
-	apps/ras2tiff.1 \
-	apps/raw2tiff.1 \
-	apps/rgb2ycbcr.1 \
-	apps/sgi2tiff.1 \
-	apps/thumbnail.1 \
-	apps/tiff2bw.1 \
-	apps/tiff2rgba.1 \
-	apps/tiff2pdf.1 \
-	apps/tiff2ps.1 \
-	apps/tiffcmp.1 \
-	apps/tiffcp.1 \
-	apps/tiffdither.1 \
-	apps/tiffdump.1 \
-	apps/tiffgt.1 \
-	apps/tiffinfo.1 \
-	apps/tiffmedian.1 \
-	apps/tiffsplit.1 \
-	apps/tiffsv.1 \
-	${NULL}
-MANDEV=\
-	lib/libtiff.3t \
-	\
-	lib/TIFFClose.3t \
-	lib/TIFFDataWidth.3t \
-	lib/TIFFError.3t \
-	lib/TIFFFlush.3t \
-	lib/TIFFGetField.3t \
-	lib/TIFFOpen.3t \
-	lib/TIFFPrintDirectory.3t \
-	lib/TIFFReadDirectory.3t \
-	lib/TIFFReadEncodedStrip.3t \
-	lib/TIFFReadEncodedTile.3t \
-	lib/TIFFReadRGBAImage.3t \
-	lib/TIFFReadRGBAStrip.3t \
-	lib/TIFFReadRGBATile.3t \
-	lib/TIFFReadRawStrip.3t \
-	lib/TIFFReadRawTile.3t \
-	lib/TIFFReadScanline.3t \
-	lib/TIFFReadTile.3t \
-	lib/TIFFRGBAImage.3t \
-	lib/TIFFSetDirectory.3t \
-	lib/TIFFSetField.3t \
-	lib/TIFFWarning.3t \
-	lib/TIFFWriteDirectory.3t \
-	lib/TIFFWriteEncodedStrip.3t \
-	lib/TIFFWriteEncodedTile.3t \
-	lib/TIFFWriteTile.3t \
-	lib/TIFFWriteRawStrip.3t \
-	lib/TIFFWriteRawTile.3t \
-	lib/TIFFWriteScanline.3t \
-	\
-	lib/TIFFbuffer.3t \
-	lib/TIFFcodec.3t \
-	lib/TIFFcolor.3t \
-	lib/TIFFmemory.3t \
-	lib/TIFFquery.3t \
-	lib/TIFFsize.3t \
-	lib/TIFFstrip.3t \
-	lib/TIFFswab.3t \
-	lib/TIFFtile.3t \
-	${NULL}
-MANDEVLINKS=\
-	lib/TIFFmalloc.3t \
-	lib/TIFFrealloc.3t \
-	lib/TIFFfree.3t \
-	lib/TIFFmemset.3t \
-	lib/TIFFmemcpy.3t \
-	lib/TIFFmemcmp.3t \
-	lib/TIFFComputeTile.3t \
-	lib/TIFFCheckTile.3t \
-	lib/TIFFNumberOfTiles.3t \
-	lib/TIFFComputeStrip.3t \
-	lib/TIFFNumberOfStrips.3t \
-	lib/TIFFCurrentDirectory.3t \
-	lib/TIFFCurrentRow.3t \
-	lib/TIFFCurrentStrip.3t \
-	lib/TIFFCurrentTile.3t \
-	lib/TIFFFdOpen.3t \
-	lib/TIFFClientOpen.3t \
-	lib/TIFFFileName.3t \
-	lib/TIFFFileno.3t \
-	lib/TIFFFindCODEC.3t \
-	lib/TIFFFlushData.3t \
-	lib/TIFFGetMode.3t \
-	lib/TIFFIsTiled.3t \
-	lib/TIFFIsByteSwapped.3t \
-	lib/TIFFIsUpSampled.3t \
-	lib/TIFFIsMSB2LSB.3t \
-	lib/TIFFLastDirectory.3t \
-	lib/TIFFRegisterCODEC.3t \
-	lib/TIFFReverseBits.3t \
-	lib/TIFFRewriteDirectory.3t \
-	lib/TIFFRGBAImageOK.3t \
-	lib/TIFFRGBAImageBegin.3t \
-	lib/TIFFRGBAImageGet.3t \
-	lib/TIFFRGBAImageEnd.3t \
-	lib/TIFFReadRGBAImageOriented.3t \
-	lib/TIFFSetErrorHandler.3t \
-	lib/TIFFSetSubDirectory.3t \
-	lib/TIFFSetWarningHandler.3t \
-	lib/TIFFSwabArrayOfLong.3t \
-	lib/TIFFSwabArrayOfShort.3t \
-	lib/TIFFSwabLong.3t \
-	lib/TIFFSwabShort.3t \
-	lib/TIFFScanlineSize.3t \
-	lib/TIFFDefaultStripSize.3t \
-	lib/TIFFVStripSize.3t \
-	lib/TIFFStripSize.3t \
-	lib/TIFFDefaultTileSize.3t \
-	lib/TIFFVTileSize.3t \
-	lib/TIFFTileSize.3t \
-	lib/TIFFTileRowSize.3t \
-	lib/TIFFUnRegisterCODEC.3t \
-	lib/TIFFVGetField.3t \
-	lib/TIFFGetFieldDefaulted.3t \
-	lib/TIFFVGetFieldDefaulted.3t \
-	lib/TIFFVSetField.3t \
-	lib/TIFFReadBufferSetup.3t \
-	lib/TIFFWriteBufferSetup.3t \
-	${NULL}
-TARGETS=apps/Makefile lib/Makefile
-
-#
-# System-specific manual page formatting commands should
-# apply this sed command to the manual page source before
-# handing it to the formatter.  This sets any pathnames
-# in the man pages to reflect local conventions.
-#
-MANSED=${SED}\
-	-e 's;\$${DIR_BIN};@DIR_BIN@;g' \
-	-e 's;\$${DIR_LIB};@DIR_LIB@;g' \
-	-e 's;\$${DIR_INC};@DIR_INC@;g' \
-	${MANSEDLOCAL}
-
-all:	${TARGETS}
-
-apps/fax2tiff.1::	${SRCDIR}/fax2tiff.1;	${MANCVT}
-apps/fax2ps.1::		${SRCDIR}/fax2ps.1;	${MANCVT}
-apps/gif2tiff.1::	${SRCDIR}/gif2tiff.1;	${MANCVT}
-apps/pal2rgb.1::	${SRCDIR}/pal2rgb.1;	${MANCVT}
-apps/ppm2tiff.1::	${SRCDIR}/ppm2tiff.1;	${MANCVT}
-apps/ras2tiff.1::	${SRCDIR}/ras2tiff.1;	${MANCVT}
-apps/raw2tiff.1::	${SRCDIR}/raw2tiff.1;	${MANCVT}
-apps/rgb2ycbcr.1::	${SRCDIR}/rgb2ycbcr.1;	${MANCVT}
-apps/sgi2tiff.1::	${SRCDIR}/sgi2tiff.1;	${MANCVT}
-apps/thumbnail.1::	${SRCDIR}/thumbnail.1;	${MANCVT}
-apps/tiff2bw.1::	${SRCDIR}/tiff2bw.1;	${MANCVT}
-apps/tiff2rgba.1::	${SRCDIR}/tiff2rgba.1;	${MANCVT}
-apps/tiff2pdf.1::	${SRCDIR}/tiff2pdf.1;	${MANCVT}
-apps/tiff2ps.1::	${SRCDIR}/tiff2ps.1;	${MANCVT}
-apps/tiffcmp.1::	${SRCDIR}/tiffcmp.1;	${MANCVT}
-apps/tiffcp.1::		${SRCDIR}/tiffcp.1;	${MANCVT}
-apps/tiffdither.1::	${SRCDIR}/tiffdither.1;	${MANCVT}
-apps/tiffdump.1::	${SRCDIR}/tiffdump.1;	${MANCVT}
-apps/tiffgt.1::		${SRCDIR}/tiffgt.1;	${MANCVT}
-apps/tiffinfo.1::	${SRCDIR}/tiffinfo.1;	${MANCVT}
-apps/tiffmedian.1::	${SRCDIR}/tiffmedian.1;	${MANCVT}
-apps/tiffsplit.1::	${SRCDIR}/tiffsplit.1;	${MANCVT}
-apps/tiffsv.1::		${SRCDIR}/tiffsv.1;	${MANCVT}
-
-lib/libtiff.3t::	${SRCDIR}/libtiff.3t;			${MANCVT}
-lib/TIFFClose.3t::	${SRCDIR}/TIFFClose.3t;			${MANCVT}
-lib/TIFFDataWidth.3t::	${SRCDIR}/TIFFDataWidth.3t;		${MANCVT}
-lib/TIFFError.3t::	${SRCDIR}/TIFFError.3t;			${MANCVT}
-lib/TIFFFlush.3t::	${SRCDIR}/TIFFFlush.3t;			${MANCVT}
-lib/TIFFGetField.3t::	${SRCDIR}/TIFFGetField.3t;		${MANCVT}
-lib/TIFFOpen.3t::	${SRCDIR}/TIFFOpen.3t;			${MANCVT}
-lib/TIFFPrintDirectory.3t:: ${SRCDIR}/TIFFPrintDirectory.3t;	${MANCVT}
-lib/TIFFReadDirectory.3t:: ${SRCDIR}/TIFFReadDirectory.3t;	${MANCVT}
-lib/TIFFReadEncodedStrip.3t:: ${SRCDIR}/TIFFReadEncodedStrip.3t;${MANCVT}
-lib/TIFFReadEncodedTile.3t:: ${SRCDIR}/TIFFReadEncodedTile.3t;	${MANCVT}
-lib/TIFFReadRGBAImage.3t:: ${SRCDIR}/TIFFReadRGBAImage.3t;	${MANCVT}
-lib/TIFFReadRGBATile.3t:: ${SRCDIR}/TIFFReadRGBATile.3t;	${MANCVT}
-lib/TIFFReadRGBAStrip.3t:: ${SRCDIR}/TIFFReadRGBAStrip.3t;	${MANCVT}
-lib/TIFFReadRawStrip.3t:: ${SRCDIR}/TIFFReadRawStrip.3t;	${MANCVT}
-lib/TIFFReadRawTile.3t:: ${SRCDIR}/TIFFReadRawTile.3t;		${MANCVT}
-lib/TIFFReadScanline.3t:: ${SRCDIR}/TIFFReadScanline.3t;	${MANCVT}
-lib/TIFFReadTile.3t::	${SRCDIR}/TIFFReadTile.3t;		${MANCVT}
-lib/TIFFRGBAImage.3t::	${SRCDIR}/TIFFRGBAImage.3t;		${MANCVT}
-lib/TIFFSetDirectory.3t:: ${SRCDIR}/TIFFSetDirectory.3t;	${MANCVT}
-lib/TIFFSetField.3t::	${SRCDIR}/TIFFSetField.3t;		${MANCVT}
-lib/TIFFWarning.3t::	${SRCDIR}/TIFFWarning.3t;		${MANCVT}
-lib/TIFFWriteDirectory.3t:: ${SRCDIR}/TIFFWriteDirectory.3t;	${MANCVT}
-lib/TIFFWriteEncodedStrip.3t:: ${SRCDIR}/TIFFWriteEncodedStrip.3t; ${MANCVT}
-lib/TIFFWriteEncodedTile.3t:: ${SRCDIR}/TIFFWriteEncodedTile.3t; ${MANCVT}
-lib/TIFFWriteTile.3t:: ${SRCDIR}/TIFFWriteTile.3t; ${MANCVT}
-lib/TIFFWriteRawStrip.3t:: ${SRCDIR}/TIFFWriteRawStrip.3t;	${MANCVT}
-lib/TIFFWriteRawTile.3t:: ${SRCDIR}/TIFFWriteRawTile.3t;	${MANCVT}
-lib/TIFFWriteScanline.3t:: ${SRCDIR}/TIFFWriteScanline.3t;	${MANCVT}
-lib/TIFFbuffer.3t::	${SRCDIR}/TIFFbuffer.3t;		${MANCVT}
-lib/TIFFcodec.3t::	${SRCDIR}/TIFFcodec.3t;			${MANCVT}
-lib/TIFFcolor.3t::	${SRCDIR}/TIFFcolor.3t;			${MANCVT}
-lib/TIFFmemory.3t::	${SRCDIR}/TIFFmemory.3t;		${MANCVT}
-lib/TIFFquery.3t::	${SRCDIR}/TIFFquery.3t;			${MANCVT}
-lib/TIFFsize.3t::	${SRCDIR}/TIFFsize.3t;			${MANCVT}
-lib/TIFFstrip.3t::	${SRCDIR}/TIFFstrip.3t;			${MANCVT}
-lib/TIFFswab.3t::	${SRCDIR}/TIFFswab.3t;			${MANCVT}
-lib/TIFFtile.3t::	${SRCDIR}/TIFFtile.3t;			${MANCVT}
-
-lib/TIFFComputeTile.3t:;	${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFCheckTile.3t:;		${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFNumberOfTiles.3t:;	${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFComputeStrip.3t:;	${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@
-lib/TIFFNumberOfStrips.3t:;	${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@
-lib/TIFFCurrentDirectory.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFCurrentRow.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFCurrentStrip.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFCurrentTile.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFFdOpen.3t:;		${ECHO} ".so ${MANDIR}TIFFOpen.3t" > $@
-lib/TIFFClientOpen.3t:;		${ECHO} ".so ${MANDIR}TIFFOpen.3t" > $@
-lib/TIFFFileName.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFFileno.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFFlushData.3t:;		${ECHO} ".so ${MANDIR}TIFFFlush.3t" > $@
-lib/TIFFGetMode.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFIsTiled.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFIsByteSwapped.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFIsUpSampled.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFIsMSB2LSB.3t:;		${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFLastDirectory.3t:;	${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@
-lib/TIFFReverseBits.3t:;	${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@
-lib/TIFFRewriteDirectory.3t:;	${ECHO} ".so ${MANDIR}TIFFWriteDirectory.3t" > $@
-lib/TIFFCheckpointDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFWriteDirectory.3t" > $@
-lib/TIFFRGBAImageOK.3t:;	${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@
-lib/TIFFRGBAImageBegin.3t:;	${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@
-lib/TIFFRGBAImageGet.3t:;	${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@
-lib/TIFFRGBAImageEnd.3t:;	${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@
-lib/TIFFReadRGBAImageOriented.3t:;	${ECHO} ".so ${MANDIR}TIFFReadRGBAImage.3t" > $@
-lib/TIFFSetErrorHandler.3t:;	${ECHO} ".so ${MANDIR}TIFFError.3t" > $@
-lib/TIFFSetSubDirectory.3t:;	${ECHO} ".so ${MANDIR}TIFFSetDirectory.3t" > $@
-lib/TIFFSetWarningHandler.3t:;	${ECHO} ".so ${MANDIR}TIFFWarning.3t" > $@
-lib/TIFFSwabArrayOfLong.3t:;	${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@
-lib/TIFFSwabArrayOfShort.3t:;	${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@
-lib/TIFFSwabLong.3t:;		${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@
-lib/TIFFSwabShort.3t:;		${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@
-lib/TIFFScanlineSize.3t:;	${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@
-lib/TIFFRasterScanlineSize.3t:;	${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@
-lib/TIFFDefaultStripSize.3t:;	${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@
-lib/TIFFStripSize.3t:;		${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@
-lib/TIFFVStripSize.3t:;		${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@
-lib/TIFFTileSize.3t:;		${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFVTileSize.3t:;		${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFDefaultTileSize.3t:;	${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFTileRowSize.3t:;	${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@
-lib/TIFFVGetField.3t:;		${ECHO} ".so ${MANDIR}TIFFGetField.3t" > $@
-lib/TIFFGetFieldDefaulted.3t:;	${ECHO} ".so ${MANDIR}TIFFGetField.3t" > $@
-lib/TIFFVGetFieldDefaulted.3t:;	${ECHO} ".so ${MANDIR}TIFFGetField.3t" > $@
-lib/TIFFVSetField.3t:;		${ECHO} ".so ${MANDIR}TIFFSetField.3t" > $@
-lib/TIFFFindCODEC.3t:;		${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@
-lib/TIFFRegisterCODEC.3t:;	${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@
-lib/TIFFUnRegisterCODEC.3t:;	${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@
-lib/TIFFYCbCrToRGBInit.3t:;	${ECHO} ".so ${MANDIR}TIFFcolor.3t" > $@
-lib/TIFFYCbCrtoRGB.3t:;		${ECHO} ".so ${MANDIR}TIFFcolor.3t" > $@
-lib/TIFFCIELabToRGBInit.3t:;	${ECHO} ".so ${MANDIR}TIFFcolor.3t" > $@
-lib/TIFFCIELabToXYZ.3t:;	${ECHO} ".so ${MANDIR}TIFFcolor.3t" > $@
-lib/TIFFXYZToRGB.3t:;		${ECHO} ".so ${MANDIR}TIFFcolor.3t" > $@
-lib/TIFFmalloc.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFrealloc.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFfree.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFmemset.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFmemcpy.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFmemcmp.3t:;		${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@
-lib/TIFFReadBufferSetup.3t:;	${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@
-lib/TIFFWriteBufferSetup.3t:;	${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@
-
-apps/Makefile:
-	test -d apps || mkdir apps
-	${MAKE} -${MAKEFLAGS} ${MANTOOLS}
-	${RM} apps/Makefile
-	(cd apps;							\
-	 ${ECHO} 'install:';						\
-	 for i in *.1; do						\
-	    f=${MANAPPNAME};						\
-	    ${ECHO} '	cd ..; ${INSTALL} -m 444 			\
-		-F $${DESTDIR}${MAN}/${MANAPPS}				\
-		-idb tiff.man.tools -src' apps/"$$i" '-O' "$$f";	\
-	 done								\
-	)>apps/Makefile
-lib/Makefile:
-	test -d lib || mkdir lib
-	${MAKE} -${MAKEFLAGS} ${MANDEV} ${MANDEVLINKS}
-	${RM} lib/Makefile
-	(cd lib;							\
-	 ${ECHO} 'install:';						\
-	 for i in *.3t; do						\
-	    f=${MANLIBNAME};						\
-	    ${ECHO} '	cd ..; ${INSTALL} -m 444 			\
-		-F $${DESTDIR}${MAN}/${MANLIB}				\
-		-idb tiff.man.dev -src' lib/"$$i" '-O' "$$f";		\
-	 done								\
-	)>lib/Makefile
-
-install: all
-	${INSTALL} -m 755 -dir -idb tiff.man.tools ${DESTDIR}${MAN}
-	${INSTALL} -m 755 -dir -idb tiff.man.tools ${DESTDIR}${MAN}/${MANAPPS}
-	cd apps; ${MAKE} -${MAKEFLAGS} install
-	${INSTALL} -m 755 -dir -idb tiff.man.dev ${DESTDIR}${MAN}/${MANLIB}
-	cd lib; ${MAKE} -${MAKEFLAGS} install
-
-clean:
-	rm -rf apps lib
-
-#
-# Miscellaneous junk left over...
-#
-
-links:	${MANDEVLINKS}
-
-short:
-	${MV} TIFFClose.3t close.3t
-	${MV} TIFFDataWidth.3t width.3t
-	${MV} TIFFError.3t error.3t
-	${MV} TIFFFlush.3t flush.3t
-	${MV} TIFFGetField.3t getfield.3t
-	${MV} TIFFOpen.3t open.3t
-	${MV} TIFFPrintDirectory.3t print.3t
-	${MV} TIFFReadEncodedStrip.3t rdestrip.3t
-	${MV} TIFFReadencodedTile.3t rdetile.3t
-	${MV} TIFFReadRawStrip.3t rdrstrip.3t
-	${MV} TIFFReadRawTile.3t rdrtile.3t
-	${MV} TIFFReadDirectory.3t readdir.3t
-	${MV} TIFFReadRGBAImage.3t rdimage.3t
-	${MV} TIFFReadRGBAStrip.3t rdsimage.3t
-	${MV} TIFFReadRGBATile.3t rdtimage.3t
-	${MV} TIFFReadScanline.3t readline.3t
-	${MV} TIFFReadTile.3t readtile.3t
-	${MV} TIFFRGBAImage.3t rgbaimage.3t
-	${MV} TIFFSetDirectory.3t setdir.3t
-	${MV} TIFFSetField.3t setfield.3t
-	${MV} TIFFWarning.3t warning.3t
-	${MV} TIFFWriteEncodedStrip.3t wrestrip.3t
-	${MV} TIFFWriteEncodedTile.3t wretile.3t
-	${MV} TIFFWriteTile.3t wrttile.3t
-	${MV} TIFFWriteDirectory.3t writedir.3t
-	${MV} TIFFWriteRawStrip.3t wrrstrip.3t
-	${MV} TIFFWriteRawTile.3t wrrtile.3t
-	${MV} TIFFWriteScanline.3t writeline.3t
-	${MV} TIFFtile.3t tile.3t
-	${MV} TIFFstrip.3t strip.3t
-	${MV} TIFFquery.3t query.3t
-	${MV} TIFFswab.3t swab.3t
-	${MV} TIFFsize.3t size.3t
-	${MV} TIFFcodec.3t codec.3t
-	${MV} TIFFmemory.3t memory.3t
-	${MV} TIFFbuffer.3t buffer.3t
diff --git a/tkimg1.3/libtiff/man/TIFFClose.3t b/tkimg1.3/libtiff/man/TIFFClose.3t
deleted file mode 100644
index 0266fea..0000000
--- a/tkimg1.3/libtiff/man/TIFFClose.3t
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFClose.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFClose 3T "May 2, 1990"
-.SH NAME
-TIFFClose \- close a previously opened
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "void TIFFClose(TIFF* tif)"
-.SH DESCRIPTION
-.IR TIFFClose
-closes a file that was previously opened with
-.IR TIFFOpen (3T).
-Any buffered data are flushed to the file, including the contents of
-the current directory (if modified); and all resources
-are reclaimed.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-Likewise, warning messages are directed to the
-.IR TIFFWarning (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFDataWidth.3t b/tkimg1.3/libtiff/man/TIFFDataWidth.3t
deleted file mode 100644
index fb60487..0000000
--- a/tkimg1.3/libtiff/man/TIFFDataWidth.3t
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFDataWidth.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFDataWidth 3T "September 12, 2002"
-.SH NAME
-TIFFDataWidth \- Get the size of TIFF data types
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFDataWidth(TIFFDataType type)"
-.SH DESCRIPTION
-.I TIFFDataWidth
-returns a size of
-.I type
-in bytes.
-Currently following data types are supported:
-.br
-.I TIFF_BYTE
-.br
-.I TIFF_ASCII
-.br
-.I TIFF_SBYTE
-.br
-.I TIFF_UNDEFINED
-.br
-.I TIFF_SHORT
-.br
-.I TIFF_SSHORT
-.br
-.I TIFF_LONG
-.br
-.I TIFF_SLONG
-.br
-.I TIFF_FLOAT
-.br
-.I TIFF_IFD
-.br
-.I TIFF_RATIONAL
-.br
-.I TIFF_SRATIONAL
-.br
-.I TIFF_DOUBLE
-.br
-.SH "RETURN VALUES"
-.br
-.IR TIFFDataWidth
-returns a number of bytes occupied by the item of given type. 0 returned when
-uknown data type supplied.
-.SH "SEE ALSO"
-.IR libtiff (3T),
diff --git a/tkimg1.3/libtiff/man/TIFFError.3t b/tkimg1.3/libtiff/man/TIFFError.3t
deleted file mode 100644
index ba620fc..0000000
--- a/tkimg1.3/libtiff/man/TIFFError.3t
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFError.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFError 3T "October 15, 1995"
-.SH NAME
-TIFFError, TIFFSetErrorHandler \- library error handling interface
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "void TIFFError(const char* module, const char* fmt, ...)"
-.sp .5
-.B "#include <stdarg.h>"
-.br
-.B "typedef void (*TIFFErrorHandler)(const char* module, const char* fmt, va_list ap);"
-.br
-.B "TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler);"
-.SH DESCRIPTION
-.I TIFFError
-invokes the library-wide error handling function
-to (normally) write an error message to the
-.BR stderr .
-The
-.I fmt
-parameter is a
-.IR printf (3S)
-format string, and any number arguments can be supplied.
-The
-.I module
-parameter, if non-zero, is printed before the message; it typically
-is used to identify the software module in which an error
-is detected.
-.PP
-Applications that desire to capture control in the event of an error
-should use
-.IR TIFFSetErrorHandler
-to override the default error handler.
-A
-.SM NULL
-(0) error handling function may be installed to
-suppress error messages.
-.SH "RETURN VALUES"
-.IR TIFFSetErrorHandler
-returns a reference to the previous error handling function.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFWarning (3T),
-.IR printf (3S)
diff --git a/tkimg1.3/libtiff/man/TIFFFlush.3t b/tkimg1.3/libtiff/man/TIFFFlush.3t
deleted file mode 100644
index c7b95e6..0000000
--- a/tkimg1.3/libtiff/man/TIFFFlush.3t
+++ /dev/null
@@ -1,64 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFFlush.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFFlush 3T "December 16, 1991"
-.SH NAME
-TIFFFlush, TIFFFlushData \- flush pending writes to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFFlush(TIFF* tif)"
-.br
-.B "int TIFFFlushData(TIFF* tif)"
-.SH DESCRIPTION
-.IR TIFFFlush
-causes any pending writes for the specified file (including writes
-for the current directory)
-to be done.
-In normal operation this call is never needed\- the library
-automatically does any flushing required.
-.PP
-.IR TIFFFlushData
-flushes any pending image data for the specified file to be written out;
-directory-related data are not flushed.
-In normal operation this call is never needed\- the library
-automatically does any flushing required.
-.SH "RETURN VALUES"
-0 is returned if an error is encountered, otherwise 1 is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteEncodedStrip (3T),
-.IR TIFFWriteEncodedTile (3T),
-.IR TIFFWriteRawStrip (3T),
-.IR TIFFWriteRawTile (3T),
-.IR TIFFWriteScanline (3T),
-.IR TIFFWriteTile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFGetField.3t b/tkimg1.3/libtiff/man/TIFFGetField.3t
deleted file mode 100644
index e187be6..0000000
--- a/tkimg1.3/libtiff/man/TIFFGetField.3t
+++ /dev/null
@@ -1,211 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFGetField.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFGetField 3T "August 22, 1997"
-.SH NAME
-TIFFGetField, TIFFVGetField \- get the value(s) of a tag in an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFGetField(TIFF* tif, ttag_t tag, ...)"
-.sp 5p
-.B "#include <stdarg.h>"
-.br
-.B "int TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)"
-.sp 5p
-.B "int TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...)"
-.br
-.B "int TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)"
-.SH DESCRIPTION
-.IR TIFFGetField
-returns the value of a tag or pseudo-tag associated with the
-the current directory of the open
-.SM TIFF
-file
-.IR tif .
-(A
-.I pseudo-tag 
-is a parameter that is used to control the operation of the
-.SM TIFF
-library but whose value is not read or written to the underlying file.)
-The file must have been previously opened with
-.IR TIFFOpen (3T).
-The tag is identified by
-.IR tag ,
-one of the values defined in the include file
-.B tiff.h
-(see also the table below).
-The type and number of values returned is dependent
-on the tag being requested.
-The programming interface uses a variable argument list
-as prescribed by the
-.IR stdarg (3)
-interface.
-The returned values should only be interpreted if
-.IR TIFFGetField
-returns 1.
-.PP
-.IR TIFFVGetField
-is functionally equivalent to
-.IR TIFFGetField
-except that it takes a pointer to a variable
-argument list.
-.I TIFFVGetField
-is useful for layering interfaces on top of
-the functionality provided by
-.IR TIFFGetField .
-.PP
-.IR TIFFGetFieldDefaulted
-and
-.IR TIFFVGetFieldDefaulted
-are identical to 
-.IR TIFFGetField
-and
-.IR TIFFVGetField ,
-except that if a tag is not defined in the current directory
-and it has a default value, then the default value is returned.
-.PP
-The tags understood by
-.IR libtiff ,
-the number of parameter values, and the
-types for the returned values are shown below.
-The data types are specified as in C and correspond
-to the types used to specify tag values to
-.IR TIFFSetField (3T).
-Remember that
-.IR TIFFGetField
-returns parameter values, so all the listed
-data types are pointers to storage where values
-should be returned.
-Consult the
-.SM TIFF
-specification for information on the meaning of
-each tag and their possible values.
-.PP
-.nf
-.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc*'u+2n
-\fITag Name\fP	\fICount\fP	\fITypes\fP	\fINotes\fP
-.sp 5p
-TIFFTAG_ARTIST	1	char**
-TIFFTAG_BADFAXLINES	1	uint32*
-TIFFTAG_BITSPERSAMPLE	1	uint16*
-TIFFTAG_CLEANFAXDATA	1	uint16*
-TIFFTAG_COLORMAP	3	uint16**	1<<BitsPerSample arrays
-TIFFTAG_COMPRESSION	1	uint16*
-TIFFTAG_CONSECUTIVEBADFAXLINES	1	uint32*
-TIFFTAG_COPYRIGHT	1	char**
-TIFFTAG_DATATYPE	1	uint16*
-TIFFTAG_DATETIME	1	char**
-TIFFTAG_DOCUMENTNAME	1	char**
-TIFFTAG_DOTRANGE	2	uint16*
-TIFFTAG_EXTRASAMPLES	2	uint16*,uint16**	count & types array
-TIFFTAG_FAXMODE	1	int*	G3/G4 compression pseudo-tag
-TIFFTAG_FAXFILLFUNC	1	TIFFFaxFillFunc*	G3/G4 compression pseudo-tag
-TIFFTAG_FILLORDER	1	uint16*
-TIFFTAG_GROUP3OPTIONS	1	uint32*
-TIFFTAG_GROUP4OPTIONS	1	uint32*
-TIFFTAG_HALFTONEHINTS	2	uint16*
-TIFFTAG_HOSTCOMPUTER	1	char**
-TIFFTAG_IMAGEDEPTH	1	uint32*
-TIFFTAG_IMAGEDESCRIPTION	1	char**
-TIFFTAG_IMAGELENGTH	1	uint32*
-TIFFTAG_IMAGEWIDTH	1	uint32*
-TIFFTAG_INKNAMES	1	char**
-TIFFTAG_INKSET	1	uint16*
-TIFFTAG_JPEGTABLES	2	u_short*,void**	count & tables
-TIFFTAG_JPEGQUALITY	1	int*	JPEG pseudo-tag
-TIFFTAG_JPEGCOLORMODE	1	int*	JPEG pseudo-tag
-TIFFTAG_JPEGTABLESMODE	1	int*	JPEG pseudo-tag
-TIFFTAG_MAKE	1	char**
-TIFFTAG_MATTEING	1	uint16*
-TIFFTAG_MAXSAMPLEVALUE	1	uint16*
-TIFFTAG_MINSAMPLEVALUE	1	uint16*
-TIFFTAG_MODEL	1	char**
-TIFFTAG_ORIENTATION	1	uint16*
-TIFFTAG_PAGENAME	1	char**
-TIFFTAG_PAGENUMBER	2	uint16*
-TIFFTAG_PHOTOMETRIC	1	uint16*
-TIFFTAG_PLANARCONFIG	1	uint16*
-TIFFTAG_PREDICTOR	1	uint16*
-TIFFTAG_PRIMARYCHROMATICITIES	1	float**	6-entry array
-TIFFTAG_REFERENCEBLACKWHITE	1	float**	2*SamplesPerPixel array
-TIFFTAG_RESOLUTIONUNIT	1	uint16*
-TIFFTAG_ROWSPERSTRIP	1	uint32*
-TIFFTAG_SAMPLEFORMAT	1	uint16*
-TIFFTAG_SAMPLESPERPIXEL	1	uint16*
-TIFFTAG_SMAXSAMPLEVALUE	1	double*
-TIFFTAG_SMINSAMPLEVALUE	1	double*
-TIFFTAG_SOFTWARE	1	char**
-TIFFTAG_STONITS	1	double**
-TIFFTAG_STRIPBYTECOUNTS	1	uint32**
-TIFFTAG_STRIPOFFSETS	1	uint32**
-TIFFTAG_SUBFILETYPE	1	uint32*
-TIFFTAG_SUBIFD	2	uint16*,uint32**	count & offsets array
-TIFFTAG_TARGETPRINTER	1	char**
-TIFFTAG_THRESHHOLDING	1	uint16*
-TIFFTAG_TILEBYTECOUNTS	1	uint32**
-TIFFTAG_TILEDEPTH	1	uint32*
-TIFFTAG_TILELENGTH	1	uint32*
-TIFFTAG_TILEOFFSETS	1	uint32**
-TIFFTAG_TILEWIDTH	1	uint32*
-TIFFTAG_TRANSFERFUNCTION	1 or 3\(dg	uint16**	1<<BitsPerSample entry arrays
-TIFFTAG_WHITEPOINT	1	float**	2-entry array
-TIFFTAG_XPOSITION	1	float*
-TIFFTAG_XRESOLUTION	1	float*
-TIFFTAG_YCBCRCOEFFICIENTS	1	float**	3-entry array
-TIFFTAG_YCBCRPOSITIONING	1	uint16*
-TIFFTAG_YCBCRSUBSAMPLING	2	uint16*
-TIFFTAG_YPOSITION	1	float*
-TIFFTAG_YRESOLUTION	1	float*
-TIFFTAG_ICCPROFILE	2	uint32*,void**	count, profile data\(dd
-.fi
-\(dg If
-.I SamplesPerPixel
-is one, then a single array is returned; otherwise three arrays are
-returned.
-.fi
-\(dd The contents of this field are quite complex.  See 
-.IR "The ICC Profile Format Specification" ,
-Annex B.3 "Embedding ICC Profiles in TIFF Files"
-(available at http://www.color.org) for an explanation.
-.SH "RETURN VALUES"
-1 is returned if the tag is defined in the current
-directory; otherwise a 0 is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Unknown field, tag 0x%x" .
-An unknown tag was supplied.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFSetField (3T),
-.IR TIFFSetDirectory (3T),
-.IR TIFFReadDirectory (3T),
-.IR TIFFWriteDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFOpen.3t b/tkimg1.3/libtiff/man/TIFFOpen.3t
deleted file mode 100644
index 17803e2..0000000
--- a/tkimg1.3/libtiff/man/TIFFOpen.3t
+++ /dev/null
@@ -1,273 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFOpen.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFOpen 3T "January 9, 1996"
-.SH NAME
-TIFFOpen, TIFFFdOpen, TIFFClientOpen \- open a
-.SM TIFF
-file for reading or writing
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "TIFF* TIFFOpen(const char* filename, const char* mode)"
-.sp 5p
-.B "TIFF* TIFFFdOpen(const int fd, const char* filename, const char* mode)"
-.sp 5p
-.B "typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);"
-.B "typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);"
-.B "typedef int (*TIFFCloseProc)(thandle_t);"
-.B "typedef toff_t (*TIFFSizeProc)(thandle_t);"
-.B "typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);"
-.B "typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);"
-.sp 5p
-.B "TIFF* TIFFClientOpen(const char* filename, const char* mode, thandle_t clientdata,"
-.B "    TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc,"
-.B "    TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc,"
-.B "    TIFFUnmapFileProc unmapproc)"
-.fi
-.SH DESCRIPTION
-.IR TIFFOpen
-opens a
-.SM TIFF
-file whose name is
-.I filename
-and returns a handle to be used in subsequent calls to routines in
-.IR libtiff .
-If the open operation fails, then zero is returned.
-The
-.I mode
-parameter specifies if the file is to be opened for reading (``r''),
-writing (``w''), or appending (``a'') and, optionally, whether
-to override certain default aspects of library operation (see below).
-When a file is opened for appending, existing data will not
-be touched; instead new data will be written as additional subfiles.
-If an existing file is opened for writing, all previous data is
-overwritten.
-.PP
-If a file is opened for reading, the first
-.SM TIFF
-directory in the file is automatically read
-(also see
-.IR TIFFSetDirectory (3T)
-for reading directories other than the first).
-If a file is opened for writing or appending, a default directory
-is automatically created for writing subsequent data.
-This directory has all the default values specified in
-.SM TIFF
-Revision 6.0:
-.IR BitsPerSample =1,
-.IR ThreshHolding "=bilevel art scan,"
-.IR FillOrder =1
-(most significant bit of each data byte is filled first),
-.IR Orientation =1
-(the 0th row represents the visual top of the image, and the 0th
-column represents the visual left hand side),
-.IR SamplesPerPixel =1,
-.IR RowsPerStrip =infinity,
-.IR ResolutionUnit =2
-(inches), and
-.IR Compression =1
-(no compression).
-To alter these values, or to define values for additional fields,
-.IR TIFFSetField (3T)
-must be used.
-.PP
-.IR TIFFFdOpen
-is like
-.IR TIFFOpen
-except that it opens a
-.SM TIFF
-file given an open file descriptor
-.IR fd .
-The file's name and mode must reflect that of the open descriptor.
-The object associated with the file descriptor
-.BR "must support random access" .
-.PP
-.IR TIFFClientOpen
-is like
-.IR TIFFOpen
-except that the caller supplies a collection of functions that the
-library will use to do \s-1UNIX\s+1-like I/O operations. 
-The
-.I readproc
-and
-.I writeproc
-are called to read and write data at the current file position.
-.I seekproc
-is called to change the current file position a la
-.IR lseek (2).
-.I closeproc
-is invoked to release any resources associated with an open file.
-.I sizeproc
-is invoked to obtain the size in bytes of a file.
-.I mapproc
-and
-.I unmapproc
-are called to map and unmap a file's contents in memory; c.f.
-.IR mmap (2)
-and
-.IR munmap (2).
-The
-.I clientdata
-parameter is an opaque ``handle'' passed to the client-specified
-routines passed as parameters to
-.IR TIFFClientOpen .
-.SH OPTIONS
-The open mode parameter can include the following flags in
-addition to the ``r'', ``w'', and ``a'' flags.
-Note however that option flags must follow the read-write-append
-specification.
-.TP
-.B l
-When creating a new file force information be written with
-Little-Endian byte order (but see below).
-By default the library will create new files using the native
-.SM CPU
-byte order.
-.TP
-.B b
-When creating a new file force information be written with
-Big-Endian byte order (but see below).
-By default the library will create new files using the native
-.SM CPU
-byte order.
-.TP
-.B L
-Force image data that is read or written to be treated with
-bits filled from Least Significant Bit (\s-1LSB\s+1) to
-Most Significant Bit (\s-1MSB\s+1).
-Note that this is the opposite to the way the library has
-worked from its inception.
-.TP
-.B B
-Force image data that is read or written to be treated with
-bits filled from Most Significant Bit (\s-1MSB\s+1) to
-Least Significant Bit (\s-1LSB\s+1); this is the default.
-.TP
-.B H
-Force image data that is read or written to be treated with
-bits filled in the same order as the native 
-.SM CPU.
-.TP
-.B M
-Enable the use of memory-mapped files for images opened read-only.
-If the underlying system does not support memory-mapped files
-or if the specific image being opened cannot be memory-mapped
-then the library will fallback to using the normal system interface
-for reading information.
-By default the library will attempt to use memory-mapped files.
-.TP
-.B m
-Disable the use of memory-mapped files.
-.TP
-.B C
-Enable the use of ``strip chopping'' when reading images
-that are comprised of a single strip or tile of uncompressed data.
-Strip chopping is a mechanism by which the library will automatically
-convert the single-strip image to multiple strips,
-each of which has about 8 Kilobytes of data.
-This facility can be useful in reducing the amount of memory used
-to read an image because the library normally reads each strip
-in its entirety.
-Strip chopping does however alter the apparent contents of the
-image because when an image is divided into multiple strips it
-looks as though the underlying file contains multiple separate
-strips.
-Finally, note that default handling of strip chopping is a compile-time
-configuration parameter.
-The default behaviour, for backwards compatibility, is to enable
-strip chopping.
-.TP
-.B c
-Disable the use of strip chopping when reading images.
-.SH "BYTE ORDER"
-The 
-.SM TIFF
-specification (\fBall versions\fP) states that compliant readers
-.IR "must be capable of reading images written in either byte order" .
-Nonetheless some software that claims to support the reading of
-.SM TIFF
-images is incapable of reading images in anything but the native
-.SM CPU
-byte order on which the software was written.
-(Especially notorious
-are applications written to run on Intel-based machines.)
-By default the library will create new files with the native
-byte-order of the 
-.SM CPU
-on which the application is run.
-This ensures optimal performance and is portable to any application
-that conforms to the TIFF specification.
-To force the library to use a specific byte-order when creating
-a new file the ``b'' and ``l'' option flags may be included in
-the call to open a file; for example, ``wb'' or ``wl''.
-.SH "RETURN VALUES"
-Upon successful completion 
-.IR TIFFOpen ,
-.IR TIFFFdOpen ,
-and
-.IR TIFFClientOpen
-return a 
-.SM TIFF
-pointer.
-Otherwise, NULL is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-Likewise, warning messages are directed to the
-.IR TIFFWarning (3T)
-routine.
-.PP
-\fB"%s": Bad mode\fP.
-The specified
-.I mode
-parameter was not one of ``r'' (read), ``w'' (write), or ``a'' (append).
-.PP
-.BR "%s: Cannot open" .
-.IR TIFFOpen ()
-was unable to open the specified filename for read/writing.
-.PP
-.BR "Cannot read TIFF header" .
-An error occurred while attempting to read the header information.
-.PP
-.BR "Error writing TIFF header" .
-An error occurred while writing the default header information
-for a new file.
-.PP
-.BR "Not a TIFF file, bad magic number %d (0x%x)" .
-The magic number in the header was not (hex)
-0x4d4d or (hex) 0x4949.
-.PP
-.BR "Not a TIFF file, bad version number %d (0x%x)" .
-The version field in the header was not 42 (decimal).
-.PP
-.BR "Cannot append to file that has opposite byte ordering" .
-A file with a byte ordering opposite to the native byte
-ordering of the current machine was opened for appending (``a'').
-This is a limitation of the library.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFClose (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFPrintDirectory.3t b/tkimg1.3/libtiff/man/TIFFPrintDirectory.3t
deleted file mode 100644
index b3060aa..0000000
--- a/tkimg1.3/libtiff/man/TIFFPrintDirectory.3t
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFPrintDirectory.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFPrintDirectory 3T "December 12, 1991"
-.SH NAME
-TIFFPrintDirectory \- print a description of a
-.SM TIFF
-directory
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "void TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)"
-.SH DESCRIPTION
-.I TIFFPrintDirectory
-prints a description of the current directory in the specified
-.SM TIFF
-file to the standard I/O output stream
-.IR fd .
-The
-.I flags
-parameter is used to control the
-.I "level of detail"
-of the printed information; it is a bit-or of the flags
-defined in
-.BR tiffio.h :
-.sp .5
-.nf
-.ta \w'#define 'u +\w'TIFFPRINT_JPEGDCTABLES  'u +\w'0x200   'u
-#define	TIFFPRINT_NONE	0x0	/* no extra info */
-#define	TIFFPRINT_STRIPS	0x1	/* strips/tiles info */
-#define	TIFFPRINT_CURVES	0x2	/* color/gray response curves */
-#define	TIFFPRINT_COLORMAP	0x4	/* colormap */
-#define	TIFFPRINT_JPEGQTABLES	0x100	/* JPEG Q matrices */
-#define	TIFFPRINT_JPEGACTABLES	0x200	/* JPEG AC tables */
-#define	TIFFPRINT_JPEGDCTABLES	0x200	/* JPEG DC tables */
-.fi
-.SH NOTES
-In C++ the
-.I flags
-parameter defaults to 0.
-.SH "RETURN VALUES"
-None.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadDirectory (3T),
-.IR TIFFSetDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFRGBAImage.3t b/tkimg1.3/libtiff/man/TIFFRGBAImage.3t
deleted file mode 100644
index 29e5d4b..0000000
--- a/tkimg1.3/libtiff/man/TIFFRGBAImage.3t
+++ /dev/null
@@ -1,277 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFRGBAImage.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFRGBAImage 3T "October 15, 1995"
-.SH NAME
-TIFFRGBAImage \- read and decode an image into a raster
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "typedef unsigned char TIFFRGBValue;"
-.B "typedef struct _TIFFRGBAImage TIFFRGBAImage;"
-.B "int TIFFRGBAImageOK(TIFF* tif, char emsg[1024]);"
-.B "int TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stopOnError, char emsg[1024]);"
-.B "int TIFFRGBAImageGet(TIFFRGBAImage* img, uint32* raster, uint32 width, uint32 height);"
-.B "void TIFFRGBAImageEnd(TIFFRGBAImage* img);"
-.SH DESCRIPTION
-The routines described here provide a high-level interface
-through which
-.SM TIFF
-images may be read into memory.
-Images may be strip- or tile-based and have a variety of different
-characteristics: bits/sample, samples/pixel, photometric, etc.
-Decoding state is encapsulated in a
-.I TIFFRGBAImage
-structure making it possible to capture state for multiple images
-and quickly switch between them.
-The target raster format can be customized to a particular application's
-needs by installing custom routines that manipulate image data
-according to application requirements.
-.PP
-The default usage for these routines is: check if an image can
-be processed using
-.IR TIFFRGBAImageOK ,
-construct a decoder state block using
-.IR TIFFRGBAImageBegin ,
-read and decode an image into a target raster using
-.IR TIFFRGBAImageGet ,
-and then
-release resources using
-.IR TIFFRGBAImageEnd .
-.I TIFFRGBAImageGet
-can be called multiple times to decode an image using different
-state parameters.
-If multiple images are to be displayed and there is not enough
-space for each of the decoded rasters, multiple state blocks can
-be managed and then calls can be made to
-.I TIFFRGBAImageGet
-as needed to display an image.
-.PP
-The generated raster is assumed to be an array of
-.I width
-times
-.I height
-32-bit entries, where
-.I width
-must be less than or equal to the width of the image (\c
-.I height
-may be any non-zero size).
-If the raster dimensions are smaller than the image, the image data
-is cropped to the raster bounds.
-If the raster height is greater than that of the image, then the
-image data are placed in the lower part of the raster.
-(Note that the raster is assume to be organized such that the pixel
-at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
-with the raster origin in the 
-.B lower-left
-hand corner.)
-.PP
-Raster pixels are 8-bit packed red, green, blue, alpha samples.
-The macros
-.IR TIFFGetR ,
-.IR TIFFGetG ,
-.IR TIFFGetB ,
-and
-.I TIFFGetA
-should be used to access individual samples.
-Images without Associated Alpha matting information have a constant
-Alpha of 1.0 (255).
-.PP
-.I TIFFRGBAImageGet
-converts non-8-bit images by scaling sample values.
-Palette, grayscale, bilevel, 
-.SM CMYK\c
-, and YCbCr images are converted to
-.SM RGB
-transparently.
-Raster pixels are returned uncorrected by any colorimetry information
-present in the directory.
-.PP
-The paramater
-.I stopOnError
-specifies how to act if an error is encountered while reading
-the image.
-If
-.I stopOnError
-is non-zero, then an error will terminate the operation; otherwise
-.I TIFFRGBAImageGet
-will continue processing data until all the possible data in the
-image have been requested.
-.SH "ALTERNATE RASTER FORMATS"
-To use the core support for reading and processing 
-.SM TIFF
-images, but write the resulting raster data in a different format
-one need only override the ``\fIput methods\fP'' used to store raster data.
-These methods are are defined in the
-.I TIFFRGBAImage
-structure and initially setup by
-.I TIFFRGBAImageBegin
-to point to routines that pack raster data in the default
-.SM ABGR
-pixel format.
-Two different routines are used according to the physical organization
-of the image data in the file: 
-.IR PlanarConfiguration =1
-(packed samples),
-and 
-.IR PlanarConfiguration =2
-(separated samples).
-Note that this mechanism can be used to transform the data before
-storing it in the raster.
-For example one can convert data
-to colormap indices for display on a colormap display.
-.SH "SIMULTANEOUS RASTER STORE AND DISPLAY"
-It is simple to display an image as it is being read into memory
-by overriding the put methods as described above for supporting
-alternate raster formats.
-Simply keep a reference to the default put methods setup by
-.I TIFFRGBAImageBegin
-and then invoke them before or after each display operation.
-For example, the
-.IR tiffgt (1)
-utility uses the following put method to update the display as
-the raster is being filled:
-.sp
-.nf
-.ft C
-static void
-putContigAndDraw(TIFFRGBAImage* img, uint32* raster,
-    uint32 x, uint32 y, uint32 w, uint32 h,
-    int32 fromskew, int32 toskew,
-    unsigned char* cp)
-{
-    (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp);
-    if (x+w == width) {
-	w = width;
-	if (img->orientation == ORIENTATION_TOPLEFT)
-	    lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w);
-	else
-	    lrectwrite(0, y, w-1, y+h-1, raster);
-    }
-}
-.ft R
-.fi
-.sp
-(the original routine provided by the library is saved in the
-variable 
-.IR putContig .)
-.SH "SUPPORTING ADDITIONAL TIFF FORMATS"
-The
-.I TIFFRGBAImage
-routines support the most commonly encountered flavors of
-.SM TIFF.
-It is possible to extend this support by overriding the ``\fIget method\fP''
-invoked by
-.I TIFFRGBAImageGet
-to read 
-.SM TIFF
-image data.
-Details of doing this are a bit involved, it is best to make a copy
-of an existing get method and modify it to suit the needs of an
-application.
-.SH NOTES
-Samples must be either 1, 2, 4, 8, or 16 bits.
-Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
-.I SamplesPerPixel
-minus
-.IR ExtraSamples ).
-.PP
-Palettte image colormaps that appear to be incorrectly written
-as 8-bit values are automatically scaled to 16-bits.
-.SH "RETURN VALUES"
-All routines return
-1 if the operation was successful.
-Otherwise, 0 is returned if an error was encountered and
-.I stopOnError
-is zero.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Sorry, can not handle %d-bit pictures" .
-The image had
-.I BitsPerSample
-other than 1, 2, 4, 8, or 16.
-.PP
-.BR "Sorry, can not handle %d-channel images" .
-The image had
-.I SamplesPerPixel
-other than 1, 3, or 4.
-.PP
-\fBMissing needed "PhotometricInterpretation" tag\fP.
-The image did not have a tag that describes how to display
-the data.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
-The image was missing a tag that describes how to display it,
-but because it has 3 or 4 samples/pixel, it is assumed to be
-.SM RGB.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
-The image was missing a tag that describes how to display it,
-but because it has 1 sample/pixel, it is assumed to be a grayscale
-or bilevel image.
-.PP
-.BR "No space for photometric conversion table" .
-There was insufficient memory for a table used to convert
-image samples to 8-bit
-.SM RGB.
-.PP
-\fBMissing required "Colormap" tag\fP.
-A Palette image did not have a required
-.I Colormap
-tag.
-.PP
-.BR "No space for tile buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "No space for strip buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "Can not handle format" .
-The image has a format (combination of
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-and
-.IR PhotometricInterpretation )
-that can not be handled.
-.PP
-.BR "No space for B&W mapping table" .
-There was insufficient memory to allocate a table used to map
-grayscale data to
-.SM RGB.
-.PP
-.BR "No space for Palette mapping table" .
-There was insufficient memory to allocate a table used to map
-data to 8-bit
-.SM RGB.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadRGBAImage (3T),
-.IR TIFFReadRGBAImageOriented (3T),
-.IR TIFFReadRGBAStrip (3T),
-.IR TIFFReadRGBATile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadDirectory.3t b/tkimg1.3/libtiff/man/TIFFReadDirectory.3t
deleted file mode 100644
index 2120bf3..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadDirectory.3t
+++ /dev/null
@@ -1,164 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadDirectory.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadDirectory 3T "October 15, 1995"
-.SH NAME
-TIFFReadDirectory \- get the contents of the next directory in an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFReadDirectory(TIFF* tif)"
-.SH DESCRIPTION
-Read the next directory in the specified file and make it the
-current directory.
-Applications only need to call
-.I TIFFReadDirectory
-to read multiple subfiles in a single
-.SM TIFF
-file\(em
-the first directory in a file is automatically read when
-.IR TIFFOpen
-is called.
-.SH NOTES
-If the library is compiled with 
-.SM STRIPCHOP_SUPPORT
-enabled, then images that have a single uncompressed strip or
-tile of data are automatically treated as if they were made
-up of multiple strips or tiles of approximately 8 kilobytes each.
-This operation is done only in-memory; it does not alter the
-contents of the file.
-However, the construction of the ``chopped strips'' is visible
-to the application through the number of strips [tiles]
-returned by 
-.I TIFFNumberOfStrips
-[\c
-.IR TIFFNumberOfTiles ].
-.SH "RETURN VALUES"
-If the next directory was successfully read, 1 is returned.
-Otherwise, 0 is returned if an error was encountered,
-or if there are no more directories to be read.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-All warning messages are directed to the
-.IR TIFFWarning (3T)
-routine.
-.PP
-\fBSeek error accessing TIFF directory\fP.
-An error occurred while positioning to the location of the
-directory.
-.PP
-\fBWrong data type %d for field "%s"\fP.
-The tag entry in the directory had an incorrect data type.
-For example, an
-.I ImageDescription
-tag with a
-.SM SHORT
-data type.
-.PP
-\fBTIFF directory is missing required "%s" field\fP.
-The specified tag is required to be present by the
-.SM TIFF
-5.0 specification, but is missing.
-The directory is (usually) unusable.
-.PP
-\fB%s: Rational with zero denominator\fP.
-A directory tag has a
-.SM RATIONAL
-value whose denominator is zero.
-.PP
-\fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\fP.
-The specified tag's count field is bad.
-For example, a count other than 1 for a
-.I SubFileType
-tag.
-.PP
-\fBCannot handle different per-sample values for field "%s"\fP.
-The tag has
-.I SamplesPerPixel
-values and they are not all the same; e.g.
-.IR BitsPerSample .
-The library is unable to handle images of this sort.
-.PP
-\fBCount mismatch for field "%s"; expecting %d, got %d\fP.
-The count field in a
-tag does not agree with the number expected by the library.
-This should never happen, so if it does, the library refuses to
-read the directory.
-.PP
-\fBInvalid TIFF directory; tags are not sorted in ascending order\fP.
-The directory tags are not properly sorted as specified
-in the
-.SM TIFF
-5.0 specification.
-This error is not fatal.
-.PP
-\fBIgnoring unknown field with tag %d (0x%x)\fP.
-An unknown tag was encountered in the directory;
-the library ignores all such tags.
-.PP
-\fBTIFF directory is missing requred "ImageLength" field\fP.
-The image violates the specification by not having a necessary field.
-There is no way for the library to recover from this error.
-.PP
-\fBTIFF directory is missing requred "PlanarConfig" field\fP.
-The image violates the specification by not having a necessary field.
-There is no way for the library to recover from this error.
-.PP
-\fBTIFF directory is missing requred "StripOffsets" field\fP.
-The image has multiple strips, but is missing the tag that
-specifies the file offset to each strip of data.
-There is no way for the library to recover from this error.
-.PP
-\fBTIFF directory is missing requred "TileOffsets" field\fP.
-The image has multiple tiles, but is missing the tag that
-specifies the file offset to each tile of data.
-There is no way for the library to recover from this error.
-.PP
-\fBTIFF directory is missing required "StripByteCounts" field\fP.
-The image has multiple strips, but is missing the tag that
-specifies the size of each strip of data.
-There is no way for the library to recover from this error.
-.PP
-\fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\fP.
-The image violates the specification by not having a necessary field.
-However, when the image is comprised of only one strip or tile, the
-library will estimate the missing value based on the file size.
-.PP
-\fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\fP.
-Certain vendors violate the specification by writing zero for
-the StripByteCounts tag when they want to leave the value
-unspecified.
-If the image has a single strip, the library will estimate
-the missing value based on the file size.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteDirectory (3T),
-.IR TIFFSetDirectory (3T),
-.IR TIFFSetSubDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadEncodedStrip.3t b/tkimg1.3/libtiff/man/TIFFReadEncodedStrip.3t
deleted file mode 100644
index 8867454..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadEncodedStrip.3t
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadEncodedStrip.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadEncodedStrip 3T "October 15, 1995"
-.SH NAME
-TIFFReadEncodedStrip \- read and decode a strip of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Read the specified strip of data and place up to
-.I size
-bytes of decompressed information in the (user supplied) data buffer.
-.SH NOTES
-The value of
-.I strip
-is a ``raw strip number.''
-That is, the caller must take into account whether or not the
-data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-To read a full strip of data the data buffer should typically be
-at least as large as the number returned by
-.IR TIFFStripSize (3T).
-.PP
-The library attempts to hide bit- and byte-ordering differences
-between the image and the native machine by converting data
-to the native machine order.
-Bit reversal is done if the
-.I FillOrder
-tag is opposite to the native machine bit order.
-16- and 32-bit samples are automatically byte-swapped if the
-file was written with a byte order opposite to the native
-machine byte order,
-.SH "RETURN VALUES"
-The actual number of bytes of data that were placed in
-.I buf
-is returned;
-.IR TIFFReadEncodedStrip
-returns \-1 if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadRawStrip (3T),
-.IR TIFFReadScanline (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadEncodedTile.3t b/tkimg1.3/libtiff/man/TIFFReadEncodedTile.3t
deleted file mode 100644
index f6c39b0..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadEncodedTile.3t
+++ /dev/null
@@ -1,76 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadEncodedTile.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadEncodedTile 3T "October 15, 1995"
-.SH NAME
-TIFFReadEncodedTile \- read and decode a tile of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFReadEncodedTile(TIFF* tif, u_long tile, u_char* buf, u_long size)"
-.SH DESCRIPTION
-Read the specified tile of data and place up to
-.I size
-bytes of decompressed information in the (user supplied) data buffer.
-.SH NOTES
-The value of
-.I tile
-is a ``raw tile number.''
-That is, the caller must take into account whether or not the
-data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.IR TIFFComputeTile
-automatically does this when converting an (x,y,z,sample)
-coordinate quadruple to a tile number.
-To read a full tile of data the data buffer should be
-at least as large as the value returned by
-.IR TIFFTileSize .
-.PP
-The library attempts to hide bit- and byte-ordering differences
-between the image and the native machine by converting data
-to the native machine order.
-Bit reversal is done if the
-.I FillOrder
-tag is opposite to the native machine bit order.
-16- and 32-bit samples are automatically byte-swapped if the
-file was written with a byte order opposite to the native
-machine byte order,
-.SH "RETURN VALUES"
-The actual number of bytes of data that were placed in
-.I buf
-is returned;
-.IR TIFFReadEncodedTile
-returns \-1 if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadRawTile (3T),
-.IR TIFFReadTile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadRGBAImage.3t b/tkimg1.3/libtiff/man/TIFFReadRGBAImage.3t
deleted file mode 100644
index 9e7376d..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadRGBAImage.3t
+++ /dev/null
@@ -1,216 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadRGBAImage.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadRGBAImage 3T "October 03, 2003"
-.SH NAME
-TIFFReadRGBAImage \- read and decode an image into a fixed-format raster
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.sp
-.ta \w'\fB#define \fP'u +\w'\fBTIFFGetR(abgr)   \fP'u
-.br
-.B "#define TIFFGetR(abgr)	((abgr) & 0xff)"
-.br
-.B "#define TIFFGetG(abgr)	(((abgr) >> 8) & 0xff)"
-.br
-.B "#define TIFFGetB(abgr)	(((abgr) >> 16) & 0xff)"
-.br
-.B "#define TIFFGetA(abgr)	(((abgr) >> 24) & 0xff)"
-.sp
-.BI "int TIFFReadRGBAImage(TIFF *" tif ", u_long " width ", u_long " height ", u_long *" raster ", int " stopOnError ")
-.br
-.BI "int TIFFReadRGBAImageOriented(TIFF *" tif ", u_long " width ", u_long " height ", u_long *" raster ", int " orientation ", int " stopOnError ")
-.br
-.SH DESCRIPTION
-.IR TIFFReadRGBAImage
-reads a strip- or tile-based image into memory, storing the
-result in the user supplied
-.IR raster .
-The raster is assumed to be an array of
-.I width
-times
-.I height
-32-bit entries, where
-.I width
-must be less than or equal to the width of the image (\c
-.I height
-may be any non-zero size).
-If the raster dimensions are smaller than the image, the image data
-is cropped to the raster bounds.
-If the raster height is greater than that of the image, then the
-image data are placed in the lower part of the raster.
-(Note that the raster is assume to be organized such that the pixel
-at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
-with the raster origin in the lower-left hand corner.)
-.PP
-.IR TIFFReadRGBAImageOriented
-works like
-.IR TIFFReadRGBAImage
-with except of that user can specify the raster origin position with the
-.I orientation
-parameter. Four orientations supported:
-.TP
-.B ORIENTATION_TOPLEFT
-origin in top-left corner,
-.TP
-.B ORIENTATION_TOPRIGHT
-origin in top-right corner,
-.TP
-.B ORIENTATION_BOTLEFT
-origin in bottom-left corner
-and
-.TP
-.B ORIENTATION_BOTRIGHT
-origin in bottom-right corner.
-.LP
-If you choose
-.B ORIENTATION_BOTLEFT
-result will be the same as returned by the
-.IR TIFFReadRGBAImage.
-.PP
-Raster pixels are 8-bit packed red, green, blue, alpha samples.
-The macros
-.IR TIFFGetR ,
-.IR TIFFGetG ,
-.IR TIFFGetB ,
-and
-.I TIFFGetA
-should be used to access individual samples.
-Images without Associated Alpha matting information have a constant
-Alpha of 1.0 (255).
-.PP
-.I TIFFReadRGBAImage
-converts non-8-bit images by scaling sample values.
-Palette, grayscale, bilevel, 
-.SM CMYK\c
-, and YCbCr images are converted to
-.SM RGB
-transparently.
-Raster pixels are returned uncorrected by any colorimetry information
-present in the directory.
-.PP
-The paramater
-.I stopOnError
-specifies how to act if an error is encountered while reading
-the image.
-If
-.I stopOnError
-is non-zero, then an error will terminate the operation; otherwise
-.I TIFFReadRGBAImage
-will continue processing data until all the possible data in the
-image have been requested.
-.SH NOTES
-In C++ the
-.I stopOnError
-parameter defaults to 0.
-.PP
-Samples must be either 1, 2, 4, 8, or 16 bits.
-Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
-.I SamplesPerPixel
-minus
-.IR ExtraSamples ).
-.PP
-Palettte image colormaps that appear to be incorrectly written
-as 8-bit values are automatically scaled to 16-bits.
-.PP
-.I TIFFReadRGBAImage
-is just a wrapper around the more general
-.IR TIFFRGBAImage (3T)
-facilities.
-.SH "RETURN VALUES"
-1 is returned if the image was successfully read and converted.
-Otherwise, 0 is returned if an error was encountered and
-.I stopOnError
-is zero.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Sorry, can not handle %d-bit pictures" .
-The image had
-.I BitsPerSample
-other than 1, 2, 4, 8, or 16.
-.PP
-.BR "Sorry, can not handle %d-channel images" .
-The image had
-.I SamplesPerPixel
-other than 1, 3, or 4.
-.PP
-\fBMissing needed "PhotometricInterpretation" tag\fP.
-The image did not have a tag that describes how to display
-the data.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
-The image was missing a tag that describes how to display it,
-but because it has 3 or 4 samples/pixel, it is assumed to be
-.SM RGB.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
-The image was missing a tag that describes how to display it,
-but because it has 1 sample/pixel, it is assumed to be a grayscale
-or bilevel image.
-.PP
-.BR "No space for photometric conversion table" .
-There was insufficient memory for a table used to convert
-image samples to 8-bit
-.SM RGB.
-.PP
-\fBMissing required "Colormap" tag\fP.
-A Palette image did not have a required
-.I Colormap
-tag.
-.PP
-.BR "No space for tile buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "No space for strip buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "Can not handle format" .
-The image has a format (combination of
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-and
-.IR PhotometricInterpretation )
-that
-.I TIFFReadRGBAImage
-can not handle.
-.PP
-.BR "No space for B&W mapping table" .
-There was insufficient memory to allocate a table used to map
-grayscale data to
-.SM RGB.
-.PP
-.BR "No space for Palette mapping table" .
-There was insufficient memory to allocate a table used to map
-data to 8-bit
-.SM RGB.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFRGBAImage (3T),
-.IR TIFFReadRGBAStrip (3T),
-.IR TIFFReadRGBATile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadRGBAStrip.3t b/tkimg1.3/libtiff/man/TIFFReadRGBAStrip.3t
deleted file mode 100644
index 3f0f41a..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadRGBAStrip.3t
+++ /dev/null
@@ -1,171 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadRGBAStrip.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadRGBAStrip 3T "December 10, 1998"
-.SH NAME
-TIFFReadRGBAStrip \- read and decode an image strip into a fixed-format raster
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.ta \w'\fB#define \fP'u +\w'\fBTIFFGetR(abgr)   \fP'u
-.B "#define TIFFGetR(abgr)	((abgr) & 0xff)"
-.B "#define TIFFGetG(abgr)	(((abgr) >> 8) & 0xff)"
-.B "#define TIFFGetB(abgr)	(((abgr) >> 16) & 0xff)"
-.B "#define TIFFGetA(abgr)	(((abgr) >> 24) & 0xff)"
-.sp 5p
-.B "int TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )"
-.SH DESCRIPTION
-.IR TIFFReadRGBAStrip
-reads a single strip of a strip-based image into memory, 
-storing the result in the user supplied RGBA
-.IR raster .
-The raster is assumed to be an array of
-width times rowsperstrip 32-bit entries, where width
-is the width of the image (TIFFTAG_IMAGEWIDTH) and
-rowsperstrip is the maximum lines in a strip (TIFFTAG_ROWSPERSTRIP). 
-
-.PP
-The 
-.IR row
-value should be the row of the first row in the strip (strip * rowsperstrip, zero based).
-
-.PP
-Note that the raster is assume to be organized such that the pixel
-at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
-with the raster origin in the 
-.I lower-left hand corner
-of the strip. That is bottom to top organization.  When reading a partial
-last strip in the file the last line of the image will begin at the
-beginning of the buffer.
-
-.PP
-Raster pixels are 8-bit packed red, green, blue, alpha samples.
-The macros
-.IR TIFFGetR ,
-.IR TIFFGetG ,
-.IR TIFFGetB ,
-and
-.I TIFFGetA
-should be used to access individual samples.
-Images without Associated Alpha matting information have a constant
-Alpha of 1.0 (255).
-.PP
-See the 
-.IR TIFFRGBAImage (3T) 
-page for more details on how various image types are converted to RGBA
-values.
-.SH NOTES
-Samples must be either 1, 2, 4, 8, or 16 bits.
-Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
-.I SamplesPerPixel
-minus
-.IR ExtraSamples ).
-.PP
-Palette image colormaps that appear to be incorrectly written
-as 8-bit values are automatically scaled to 16-bits.
-.PP
-.I TIFFReadRGBAStrip
-is just a wrapper around the more general
-.IR TIFFRGBAImage (3T)
-facilities.  It's main advantage over the similar 
-.IR TIFFReadRGBAImage() 
-function is that for large images a single
-buffer capable of holding the whole image doesn't need to be allocated, 
-only enough for one strip.  The 
-.IR TIFFReadRGBATile() 
-function does a similar operation for tiled images.
-.SH "RETURN VALUES"
-1 is returned if the image was successfully read and converted.
-Otherwise, 0 is returned if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Sorry, can not handle %d-bit pictures" .
-The image had
-.I BitsPerSample
-other than 1, 2, 4, 8, or 16.
-.PP
-.BR "Sorry, can not handle %d-channel images" .
-The image had
-.I SamplesPerPixel
-other than 1, 3, or 4.
-.PP
-\fBMissing needed "PhotometricInterpretation" tag\fP.
-The image did not have a tag that describes how to display
-the data.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
-The image was missing a tag that describes how to display it,
-but because it has 3 or 4 samples/pixel, it is assumed to be
-.SM RGB.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
-The image was missing a tag that describes how to display it,
-but because it has 1 sample/pixel, it is assumed to be a grayscale
-or bilevel image.
-.PP
-.BR "No space for photometric conversion table" .
-There was insufficient memory for a table used to convert
-image samples to 8-bit
-.SM RGB.
-.PP
-\fBMissing required "Colormap" tag\fP.
-A Palette image did not have a required
-.I Colormap
-tag.
-.PP
-.BR "No space for tile buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "No space for strip buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "Can not handle format" .
-The image has a format (combination of
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-and
-.IR PhotometricInterpretation )
-that
-.I TIFFReadRGBAImage
-can not handle.
-.PP
-.BR "No space for B&W mapping table" .
-There was insufficient memory to allocate a table used to map
-grayscale data to
-.SM RGB.
-.PP
-.BR "No space for Palette mapping table" .
-There was insufficient memory to allocate a table used to map
-data to 8-bit
-.SM RGB.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFRGBAImage (3T),
-.IR TIFFReadRGBAImage (3T),
-.IR TIFFReadRGBATile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadRGBATile.3t b/tkimg1.3/libtiff/man/TIFFReadRGBATile.3t
deleted file mode 100644
index df0b6c6..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadRGBATile.3t
+++ /dev/null
@@ -1,175 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadRGBATile.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadRGBATile 3T "December 10, 1998"
-.SH NAME
-TIFFReadRGBATile \- read and decode an image tile into a fixed-format raster
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.ta \w'\fB#define \fP'u +\w'\fBTIFFGetR(abgr)   \fP'u
-.B "#define TIFFGetR(abgr)	((abgr) & 0xff)"
-.B "#define TIFFGetG(abgr)	(((abgr) >> 8) & 0xff)"
-.B "#define TIFFGetB(abgr)	(((abgr) >> 16) & 0xff)"
-.B "#define TIFFGetA(abgr)	(((abgr) >> 24) & 0xff)"
-.sp 5p
-.B "int TIFFReadRGBATile(TIFF* tif, uint32 x, uint32 y, uint32 * raster )"
-.SH DESCRIPTION
-.IR TIFFReadRGBATile
-reads a single tile of a tile-based image into memory, 
-storing the result in the user supplied RGBA
-.IR raster .
-The raster is assumed to be an array of
-width times length 32-bit entries, where width
-is the width of a tile (TIFFTAG_TILEWIDTH) and
-length is the height of a tile (TIFFTAG_TILELENGTH). 
-
-.PP
-The 
-.IR x
-and 
-.IR y
-values are the offsets from the top left corner to the top left corner
-of the tile to be read.  They must be an exact multiple of the tile
-width and length. 
-
-.PP
-Note that the raster is assume to be organized such that the pixel
-at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
-with the raster origin in the 
-.I lower-left hand corner
-of the tile. That is bottom to top organization.  Edge tiles which
-partly fall off the image will be filled out with appropriate zeroed
-areas.
-
-.PP
-Raster pixels are 8-bit packed red, green, blue, alpha samples.
-The macros
-.IR TIFFGetR ,
-.IR TIFFGetG ,
-.IR TIFFGetB ,
-and
-.I TIFFGetA
-should be used to access individual samples.
-Images without Associated Alpha matting information have a constant
-Alpha of 1.0 (255).
-.PP
-See the 
-.IR TIFFRGBAImage (3T) 
-page for more details on how various image types are converted to RGBA
-values.
-.SH NOTES
-Samples must be either 1, 2, 4, 8, or 16 bits.
-Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
-.I SamplesPerPixel
-minus
-.IR ExtraSamples ).
-.PP
-Palette image colormaps that appear to be incorrectly written
-as 8-bit values are automatically scaled to 16-bits.
-.PP
-.I TIFFReadRGBATile
-is just a wrapper around the more general
-.IR TIFFRGBAImage (3T)
-facilities.  It's main advantage over the similar 
-.IR TIFFReadRGBAImage() 
-function is that for large images a single
-buffer capable of holding the whole image doesn't need to be allocated, 
-only enough for one tile.  The 
-.IR TIFFReadRGBAStrip() 
-function does a similar operation for stripped images.
-.SH "RETURN VALUES"
-1 is returned if the image was successfully read and converted.
-Otherwise, 0 is returned if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Sorry, can not handle %d-bit pictures" .
-The image had
-.I BitsPerSample
-other than 1, 2, 4, 8, or 16.
-.PP
-.BR "Sorry, can not handle %d-channel images" .
-The image had
-.I SamplesPerPixel
-other than 1, 3, or 4.
-.PP
-\fBMissing needed "PhotometricInterpretation" tag\fP.
-The image did not have a tag that describes how to display
-the data.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
-The image was missing a tag that describes how to display it,
-but because it has 3 or 4 samples/pixel, it is assumed to be
-.SM RGB.
-.PP
-\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
-The image was missing a tag that describes how to display it,
-but because it has 1 sample/pixel, it is assumed to be a grayscale
-or bilevel image.
-.PP
-.BR "No space for photometric conversion table" .
-There was insufficient memory for a table used to convert
-image samples to 8-bit
-.SM RGB.
-.PP
-\fBMissing required "Colormap" tag\fP.
-A Palette image did not have a required
-.I Colormap
-tag.
-.PP
-.BR "No space for tile buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "No space for strip buffer" .
-There was insufficient memory to allocate an i/o buffer.
-.PP
-.BR "Can not handle format" .
-The image has a format (combination of
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-and
-.IR PhotometricInterpretation )
-that
-.I TIFFReadRGBAImage
-can not handle.
-.PP
-.BR "No space for B&W mapping table" .
-There was insufficient memory to allocate a table used to map
-grayscale data to
-.SM RGB.
-.PP
-.BR "No space for Palette mapping table" .
-There was insufficient memory to allocate a table used to map
-data to 8-bit
-.SM RGB.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFRGBAImage (3T),
-.IR TIFFReadRGBAImage (3T),
-.IR TIFFReadRGBAStrip (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadRawStrip.3t b/tkimg1.3/libtiff/man/TIFFReadRawStrip.3t
deleted file mode 100644
index d9ce740..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadRawStrip.3t
+++ /dev/null
@@ -1,63 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadRawStrip.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadRawStrip 3T "October 15, 1995"
-.SH NAME
-TIFFReadRawStrip \- return the undecoded contents
-of a strip of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Read the contents of the specified strip into the
-(user supplied) data buffer.
-Note that the value of
-.I strip
-is a ``raw strip number.''
-That is, the caller must take into account whether or not the
-data is organized in separate planes (\c
-.IR PlanarConfiguration =2).
-To read a full strip of data the data buffer should typically be
-at least as large as the number returned by
-.IR TIFFStripSize .
-.SH "RETURN VALUES"
-The actual number of bytes of data that were placed in
-.I buf
-is returned;
-.IR TIFFReadEncodedStrip
-returns \-1 if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadEncodedStrip (3T),
-.IR TIFFReadScanline (3T),
-.IR TIFFStripSize (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadRawTile.3t b/tkimg1.3/libtiff/man/TIFFReadRawTile.3t
deleted file mode 100644
index aa14a9b..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadRawTile.3t
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadRawTile.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadRawTile 3T "October 15, 1995"
-.SH NAME
-TIFFReadRawTile \- return an undecoded tile of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Read the contents of the specified tile into the
-(user supplied) data buffer.
-Note that the value of
-.I tile
-is a ``raw tile number.''
-That is, the caller must take into account whether or not the
-data is organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.I TIFFComputeTile
-automatically does this when converting an (x,y,z,sample)
-coordinate quadruple to a tile number.
-To read a full tile of data the data buffer should typically be
-at least as large as the value returned by
-.IR TIFFTileSize .
-.SH "RETURN VALUES"
-The actual number of bytes of data that were placed in
-.I buf
-is returned;
-.IR TIFFReadEncodedTile
-returns \-1 if an error was encountered.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadEncodedTile (3T),
-.IR TIFFReadTile (3T),
-.IR TIFFTileSize (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadScanline.3t b/tkimg1.3/libtiff/man/TIFFReadScanline.3t
deleted file mode 100644
index 418b79a..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadScanline.3t
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadScanline.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadScanline 3T "October 15, 1995"
-.SH NAME
-TIFFReadScanline \- read and decode a scanline of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)"
-.SH DESCRIPTION
-Read the data for the specified row into the (user supplied)
-data buffer
-.IR buf .
-The data are returned decompressed and, in the native byte-
-and bit-ordering, but are otherwise packed (see further below).
-The buffer must be large enough to hold an entire scanline of data.
-Applications should call the routine
-.IR TIFFScanlineSize
-to find out the size (in bytes) of a scanline buffer.
-The
-.I row
-parameter is always used by
-.IR TIFFReadScanline ;
-the
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.SH NOTES
-The library attempts to hide bit- and byte-ordering differences
-between the image and the native machine by converting data
-to the native machine order.
-Bit reversal is done if the
-.I FillOrder
-tag is opposite to the native machine bit order.
-16- and 32-bit samples are automatically byte-swapped if the
-file was written with a byte order opposite to the native
-machine byte order,
-.PP
-In C++ the
-.I sample
-parameter defaults to 0.
-.SH "RETURN VALUES"
-.IR TIFFReadScanline
-returns \-1 if it detects an error; otherwise 1 is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Compression algorithm does not support random access" .
-Data was requested in a non-sequential order from a file that
-uses a compression algorithm and that has
-.I RowsPerStrip
-greater than one.
-That is, data in the image is stored in a compressed form,
-and with multiple rows packed into a strip.
-In this case, the library does not support random access to the data.
-The data should either be accessed sequentially, or the file
-should be converted so that each strip is made up of one row
-of data.
-.SH BUGS
-Reading subsampled YCbCR data does not work correctly
-because, for 
-.IR PlanarConfiguration =2
-the size of a scanline is not calculated on a per-sample basis,
-and for
-.IR PlanarConfiguration =1
-the library does not unpack the block-interleaved samples; use
-the strip- and tile-based interfaces to read these formats.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadEncodedStrip (3T),
-.IR TIFFReadRawStrip (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFReadTile.3t b/tkimg1.3/libtiff/man/TIFFReadTile.3t
deleted file mode 100644
index 08473dd..0000000
--- a/tkimg1.3/libtiff/man/TIFFReadTile.3t
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFReadTile.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFReadTile 3T "December 16, 1991"
-.SH NAME
-TIFFReadTile \- read and decode a tile of data from an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFReadTile(TIFF* tif, tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t sample)"
-.SH DESCRIPTION
-Return the data for the tile
-.I containing
-the specified coordinates.
-The data placed in
-.I buf
-are returned decompressed and, typically, in the native byte-
-and bit-ordering, but are otherwise packed (see further below).
-The buffer must be large enough to hold an entire tile of data.
-Applications should call the routine
-.IR TIFFTileSize
-to find out the size (in bytes) of a tile buffer.
-The
-.I x
-and
-.I y
-parameters are always used by
-.IR TIFFReadTile .
-The
-.I z
-parameter is used if the image is deeper than 1 slice (\c
-.IR ImageDepth >1).
-The
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.SH NOTES
-The library attempts to hide bit- and byte-ordering differences
-between the image and the native machine by converting data
-to the native machine order.
-Bit reversal is done if the
-.I FillOrder
-tag is opposite to the native machine bit order.
-16- and 32-bit samples are automatically byte-swapped if the
-file was written with a byte order opposite to the native
-machine byte order,
-.SH "RETURN VALUES"
-.IR TIFFReadTile
-returns \-1 if it detects an error; otherwise the number of
-bytes in the decoded tile is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFCheckTile (3T),
-.IR TIFFComputeTile (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadEncodedTile (3T),
-.IR TIFFReadRawTile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFSetDirectory.3t b/tkimg1.3/libtiff/man/TIFFSetDirectory.3t
deleted file mode 100644
index cd9872d..0000000
--- a/tkimg1.3/libtiff/man/TIFFSetDirectory.3t
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFSetDirectory.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFSetDirectory 3T "October 15, 1995"
-.SH NAME
-TIFFSetDirectory, TIFFSetSubDirectory \- set the current directory for an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFSetDirectory(TIFF* tif, tdir_t dirnum)"
-.br
-.B "int TIFFSetSubDirectory(TIFF* tif, uint32 diroff)"
-.SH DESCRIPTION
-.I TIFFSetDirectory
-changes the current directory and reads its contents with
-.IR TIFFReadDirectory .
-The parameter
-.I dirnum
-specifies the subfile/directory as an integer number, with
-the first directory numbered zero.
-.PP
-.I TIFFSetSubDirectory
-acts like 
-.IR TIFFSetDirectory ,
-except the directory is specified as a
-file offset instead of an index; this is required for accessing
-subdirectories linked through a
-.I SubIFD
-tag.
-.SH "RETURN VALUES"
-On successful return 1 is returned.
-Otherwise, 0 is returned if 
-.I dirnum
-or
-.I diroff
-specifies a non-existent directory, or if an error was
-encountered while reading the directory's contents.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "%s: Error fetching directory count" .
-An error was encountered while reading the ``directory count'' field.
-.PP
-.BR "%s: Error fetching directory link" .
-An error was encountered while reading the ``link value'' that
-points to the next directory in a file.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFCurrentDirectory (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadDirectory (3T),
-.IR TIFFWriteDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFSetField.3t b/tkimg1.3/libtiff/man/TIFFSetField.3t
deleted file mode 100644
index e3a0dc2..0000000
--- a/tkimg1.3/libtiff/man/TIFFSetField.3t
+++ /dev/null
@@ -1,214 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFSetField.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFSetField 3T "August 28, 1997"
-.SH NAME
-TIFFSetField \- set the value(s) of a tag in a
-.SM TIFF
-file open for writing
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFSetField(TIFF* tif, ttag_t tag, ...)"
-.br
-.B "#include <stdarg.h>"
-.br
-.B "int TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)"
-.SH DESCRIPTION
-.IR TIFFSetField
-sets the value of a field
-or pseudo-tag in the current directory associated with
-the open
-.SM TIFF
-file
-.IR tif .
-(A
-.I pseudo-tag 
-is a parameter that is used to control the operation of the
-.SM TIFF
-library but whose value is not read or written to the underlying file.)
-To set the value of a field
-the file must have been previously opened for writing with
-.IR TIFFOpen (3T);
-pseudo-tags can be set whether the file was opened for reading
-or writing.
-The field is identified by
-.IR tag ,
-one of the values defined in the include file
-.B tiff.h
-(see also the table below).
-The actual value is specified using a variable argument list,
-as prescribed by the
-.IR stdarg (3)
-interface (\c
-or, on some machines, the
-.IR varargs (3)
-interface.)
-.PP
-.IR TIFFVSetField
-is functionally equivalent to
-.IR TIFFSetField
-except that it takes a pointer to a variable
-argument list.
-.I TIFFVSetField
-is useful for writing routines that are layered
-on top of the functionality provided by
-.IR TIFFSetField .
-.PP
-The tags understood by
-.IR libtiff ,
-the number of parameter values, and the
-expected types for the parameter values are shown below.
-The data types are:
-.I char*
-is null-terminated string and corresponds to the
-.SM ASCII
-data type;
-.I uint16
-is an unsigned 16-bit value;
-.I uint32
-is an unsigned 32-bit value;
-.I uint16*
-is an array of unsigned 16-bit values.
-.I void*
-is an array of data values of unspecified type.
-
-Consult the
-.SM TIFF
-specification for information on the meaning of each tag.
-.PP
-.nf
-.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc \(dg'u+2n
-\fITag Name\fP	\fICount\fP	\fITypes\fP	\fINotes\fP
-.sp 5p
-TIFFTAG_ARTIST	1	char*
-TIFFTAG_BADFAXLINES	1	uint32
-TIFFTAG_BITSPERSAMPLE	1	uint16	\(dg
-TIFFTAG_CLEANFAXDATA	1	uint16
-TIFFTAG_COLORMAP	3	uint16*	1<<BitsPerSample arrays
-TIFFTAG_COMPRESSION	1	uint16	\(dg
-TIFFTAG_CONSECUTIVEBADFAXLINES	1	uint32
-TIFFTAG_COPYRIGHT	1	char*
-TIFFTAG_DATETIME	1	char*
-TIFFTAG_DOCUMENTNAME	1	char*
-TIFFTAG_DOTRANGE	2	uint16
-TIFFTAG_EXTRASAMPLES	2	uint16,uint16*	\(dg count & types array
-TIFFTAG_FAXMODE	1	int	\(dg G3/G4 compression pseudo-tag
-TIFFTAG_FAXFILLFUNC	1	TIFFFaxFillFunc	G3/G4 compression pseudo-tag
-TIFFTAG_FILLORDER	1	uint16	\(dg
-TIFFTAG_GROUP3OPTIONS	1	uint32	\(dg
-TIFFTAG_GROUP4OPTIONS	1	uint32	\(dg
-TIFFTAG_HALFTONEHINTS	2	uint16
-TIFFTAG_HOSTCOMPUTER	1	char*
-TIFFTAG_IMAGEDESCRIPTION	1	char*
-TIFFTAG_IMAGEDEPTH	1	uint32	\(dg
-TIFFTAG_IMAGELENGTH	1	uint32
-TIFFTAG_IMAGEWIDTH	1	uint32	\(dg
-TIFFTAG_INKNAMES	1	char*
-TIFFTAG_INKSET	1	uint16	\(dg
-TIFFTAG_JPEGTABLES	2	uint32*,void*	\(dg count & tables
-TIFFTAG_JPEGQUALITY	1	int	JPEG pseudo-tag
-TIFFTAG_JPEGCOLORMODE	1	int	\(dg JPEG pseudo-tag
-TIFFTAG_JPEGTABLESMODE	1	int	\(dg JPEG pseudo-tag
-TIFFTAG_MAKE	1	char*
-TIFFTAG_MATTEING	1	uint16	\(dg
-TIFFTAG_MAXSAMPLEVALUE	1	uint16
-TIFFTAG_MINSAMPLEVALUE	1	uint16
-TIFFTAG_MODEL	1	char*
-TIFFTAG_ORIENTATION	1	uint16
-TIFFTAG_PAGENAME	1	char*
-TIFFTAG_PAGENUMBER	2	uint16
-TIFFTAG_PHOTOMETRIC	1	uint16
-TIFFTAG_PLANARCONFIG	1	uint16	\(dg
-TIFFTAG_PREDICTOR	1	uint16	\(dg
-TIFFTAG_PRIMARYCHROMATICITIES	1	float*	6-entry array
-TIFFTAG_REFERENCEBLACKWHITE	1	float*	\(dg 2*SamplesPerPixel array
-TIFFTAG_RESOLUTIONUNIT	1	uint16
-TIFFTAG_ROWSPERSTRIP	1	uint32	\(dg must be > 0
-TIFFTAG_SAMPLEFORMAT	1	uint16	\(dg
-TIFFTAG_SAMPLESPERPIXEL	1	uint16	\(dg value must be <= 4
-TIFFTAG_SMAXSAMPLEVALUE	1	double
-TIFFTAG_SMINSAMPLEVALUE	1	double
-TIFFTAG_SOFTWARE	1	char*
-TIFFTAG_STONITS	1	double	\(dg
-TIFFTAG_SUBFILETYPE	1	uint32
-TIFFTAG_SUBIFD	2	uint16,uint32*	count & offsets array
-TIFFTAG_TARGETPRINTER	1	char*
-TIFFTAG_THRESHHOLDING	1	uint16
-TIFFTAG_TILEDEPTH	1	uint32	\(dg
-TIFFTAG_TILELENGTH	1	uint32	\(dg must be a multiple of 8
-TIFFTAG_TILEWIDTH	1	uint32	\(dg must be a multiple of 8
-TIFFTAG_TRANSFERFUNCTION	1 or 3\(dd uint16*	1<<BitsPerSample entry arrays
-TIFFTAG_XPOSITION	1	float
-TIFFTAG_XRESOLUTION	1	float
-TIFFTAG_WHITEPOINT	1	float*	2-entry array
-TIFFTAG_YCBCRCOEFFICIENTS	1	float*	\(dg 3-entry array
-TIFFTAG_YCBCRPOSITIONING	1	uint16	\(dg
-TIFFTAG_YCBCRSAMPLING	2	uint16	\(dg
-TIFFTAG_YPOSITION	1	float
-TIFFTAG_YRESOLUTION	1	float
-TIFFTAG_ICCPROFILE	2	uint32,void*	count, profile data*
-.fi
-.sp 5p
-\(dg Tag may not have its values changed once data is written.
-.br
-.fi
-\(dd
-If
-.I SamplesPerPixel
-is one, then a single array is passed; otherwise three arrays should be
-passed.
-.fi
-* The contents of this field are quite complex.  See 
-.IR "The ICC Profile Format Specification" ,
-Annex B.3 "Embedding ICC Profiles in TIFF Files"
-(available at http://www.color.org) for an explanation.
-.br
-.SH "RETURN VALUES"
-1 is returned if the tag is defined in the current
-directory; otherwise a 0 is returned.
-.SH "RETURN VALUES"
-1 is returned if the operation was successful.
-Otherwise, 0 is returned if an error was detected.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-\fB%s: Cannot modify tag "%s" while writing\fP.
-Data has already been written to the file, so the
-specified tag's value can not be changed.
-This restriction is applied to all tags that affect
-the format of written data.
-.PP
-\fB%d: Bad value for "%s"\fP.
-An invalid value was supplied for the named tag.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFGetField (3T),
-.IR TIFFSetDirectory (3T),
-.IR TIFFWriteDirectory (3T),
-.IR TIFFReadDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWarning.3t b/tkimg1.3/libtiff/man/TIFFWarning.3t
deleted file mode 100644
index d66e4cd..0000000
--- a/tkimg1.3/libtiff/man/TIFFWarning.3t
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWarning.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWarning 3T "October 15, 1995"
-.SH NAME
-TIFFWarning, TIFFSetWarningHandler \- library warning interface
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "void TIFFWarning(const char* module, const char* fmt, ...)"
-.sp .5
-.B "#include <stdargh.h>"
-.br
-.B "typedef void (*TIFFWarningHandler)(const char* module, const char* fmt, va_list ap);"
-.br
-.B "TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler);"
-.SH DESCRIPTION
-.I TIFFWarning
-invokes the library-wide warning handler function
-to (normally) write a warning message to the
-.BR stderr .
-The
-.I fmt
-parameter is a
-.IR printf (3S)
-format string, and any number arguments can be supplied.
-The
-.I module
-parameter is interpreted as a string that, if non-zero,
-should be printed before the message; it typically
-is used to identify the software module in which a warning
-is detected.
-.PP
-Applications that desire to capture control in the event of a warning
-should use
-.IR TIFFSetWarningHandler
-to override the default warning handler.
-A
-.SM NULL
-(0) warning handler function may be installed to
-suppress error messages.
-.SH "RETURN VALUES"
-.IR TIFFSetWarningHandler
-returns a reference to the previous error handling function.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFError (3T),
-.IR printf (3S)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteDirectory.3t b/tkimg1.3/libtiff/man/TIFFWriteDirectory.3t
deleted file mode 100644
index 227bc67..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteDirectory.3t
+++ /dev/null
@@ -1,139 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteDirectory.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteDirectory 3T "September 26, 2001"
-.SH NAME
-TIFFWriteDirectory, TIFFRewriteDirectory, TIFFCheckpointDirectory \- write
-the current directory in an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFWriteDirectory(TIFF* tif)"
-.br
-.B "int TIFFRewriteDirectory(TIFF* tif)"
-.br
-.B "int TIFFCheckpointDirectory(TIFF* tif)"
-.SH DESCRIPTION
-.IR TIFFWriteDirectory 
-will write the contents of the current directory to the file and setup
-to create a new subfile in the same file.
-Applications only need to call
-.IR TIFFWriteDirectory
-when writing multiple subfiles to a single
-.SM TIFF
-file.
-.IR TIFFWriteDirectory
-is automatically called by
-.IR TIFFClose
-and
-.IR TIFFFlush
-to write a modified directory if the file is open for writing.
-.PP
-The 
-.IR TIFFRewriteDirectory
-function operates similarly to 
-.IR TIFFWriteDirectory,
-but can be called with directories previously read or written that already
-have an established location in the file.  It will rewrite the directory,
-but instead of place it at it's old location (as 
-.IR TIFFWriteDirectory
-would) it will place them at the end of the file, correcting the pointer from
-the preceeding directory or file header to point to it's new location.  This
-is particularly important in cases where the size of the directory and
-pointed to data has grown, so it won't fit in the space available at the
-old location.
-.PP
-The
-.IR TIFFCheckpointDirectory
-writes the current state of the tiff directory into the file to make what
-is currently in the file readable.  Unlike
-.IR TIFFWriteDirectory,
-.IR TIFFCheckpointDirectory
-does not free up the directory data structures in memory, so they can be
-updated (as strips/tiles are written) and written again.  Reading such
-a partial file you will at worst get a tiff read error for the first
-strip/tile encountered that is incomplete, but you will at least get
-all the valid data in the file before that.  When the file is complete,
-just use
-.IR TIFFWriteDirectory
-as usual to finish it off cleanly.
-.SH "RETURN VALUES"
-1 is returned when the contents are successfully
-written to the file.
-Otherwise, 0 is returned if an error was encountered when writing
-the directory contents.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "Error post-encoding before directory write" .
-Before writing the contents of the current directory, any pending
-data are flushed.
-This message indicates that an error occurred while doing this.
-.PP
-.BR "Error flushing data before directory write" .
-Before writing the contents of the current directory, any pending
-data are flushed.
-This message indicates that an error occurred while doing this.
-.PP
-.BR "Cannot write directory, out of space" .
-There was not enough space to allocate a temporary area for
-the directory that was to be written.
-.PP
-.BR "Error writing directory count" .
-A write error occurred when writing the count of fields in the directory.
-.PP
-.BR "Error writing directory contents" .
-A write error occurred when writing the directory fields.
-.PP
-.BR "Error writing directory link" .
-A write error occurred when writing the link to the next directory.
-.PP
-\fBError writing data for field "%s"\fP.
-A write error occurred when writing indirect data for the specified field.
-.PP
-.BR "Error writing TIFF header" .
-A write error occurred when re-writing header at the front of the file.
-.PP
-.BR "Error fetching directory count" .
-A read error occurred when fetching the directory count field for
-a previous directory.
-This can occur when setting up a link to the directory that is being
-written.
-.PP
-.BR "Error fetching directory link" .
-A read error occurred when fetching the directory link field for
-a previous directory.
-This can occur when setting up a link to the directory that is being
-written.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFError (3T),
-.IR TIFFReadDirectory (3T),
-.IR TIFFSetDirectory (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteEncodedStrip.3t b/tkimg1.3/libtiff/man/TIFFWriteEncodedStrip.3t
deleted file mode 100644
index d068067..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteEncodedStrip.3t
+++ /dev/null
@@ -1,105 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteEncodedStrip.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteEncodedStrip 3T "October 15, 1995"
-.SH NAME
-TIFFWritedEncodedStrip \- compress and write a strip of data to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Compress
-.I size
-bytes of raw data from
-.I buf
-and write the result to the specified strip; replacing
-any previously written data.
-Note that the value of
-.I strip
-is a ``raw strip number.''
-That is, the caller must take into account whether or not the
-data are organized in separate places (\c
-.IR PlanarConfiguration =2).
-.SH NOTES
-The library writes encoded data using the native machine byte order.
-Correctly implemented
-.SM TIFF
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than 8.
-.PP
-The strip number must be valid according to the current settings
-of the
-.I ImageLength
-and
-.I RowsPerStrip
-tags.
-An image may be dynamically grown by increasing the value of
-.I ImageLength
-prior to each call to
-.IR TIFFWriteEncodedStrip .
-.SH "RETURN VALUES"
-\-1 is returned if an error was encountered.
-Otherwise, the value of
-.IR size
-is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-\fB%s: File not open for writing\fP.
-The file was opened for reading, not writing.
-.PP
-\fBCan not write scanlines to a tiled image\fP.
-The image is assumed to be organized in tiles because the
-.I TileWidth
-and
-.I TileLength
-tags have been set with
-.IR TIFFSetField (3T).
-.PP
-\fB%s: Must set "ImageWidth" before writing data\fP.
-The image's width has not be set before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: Must set "PlanarConfiguration" before writing data\fP.
-The organization of data has not be defined before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: No space for strip arrays"\fP.
-There was not enough space for the arrays that hold strip
-offsets and byte counts.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteScanline (3T),
-.IR TIFFWriteRawStrip (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteEncodedTile.3t b/tkimg1.3/libtiff/man/TIFFWriteEncodedTile.3t
deleted file mode 100644
index 5668725..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteEncodedTile.3t
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteEncodedTile.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteEncodedTile 3T "December 16, 1991"
-.SH NAME
-TIFFWritedEncodedTile \- compress and write a tile of data to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Compress
-.I size
-bytes of raw data from
-.I buf
-and
-.B append
-the result to the end of the specified tile.
-Note that the value of
-.I tile
-is a ``raw tile number.''
-That is, the caller must take into account whether or not the
-data are organized in separate places (\c
-.IR PlanarConfiguration =2).
-.IR TIFFComputeTile
-automatically does this when converting an (x,y,z,sample)
-coordinate quadruple to a tile number.
-.SH NOTES
-The library writes encoded data using the native machine byte order.
-Correctly implemented
-.SM TIFF
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than 8.
-.SH "RETURN VALUES"
-\-1 is returned if an error was encountered.
-Otherwise, the value of
-.IR size 
-is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-\fB%s: File not open for writing\fP.
-The file was opened for reading, not writing.
-.PP
-\fBCan not write tiles to a stripped image\fP.
-The image is assumed to be organized in strips because neither of the
-.I TileWidth
-or
-.I TileLength
-tags have been set with
-.IR TIFFSetField (3T).
-.PP
-\fB%s: Must set "ImageWidth" before writing data\fP.
-The image's width has not be set before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: Must set "PlanarConfiguration" before writing data\fP.
-The organization of data has not be defined before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: No space for tile arrays"\fP.
-There was not enough space for the arrays that hold tile
-offsets and byte counts.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteTile (3T),
-.IR TIFFWriteRawTile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteRawStrip.3t b/tkimg1.3/libtiff/man/TIFFWriteRawStrip.3t
deleted file mode 100644
index eb648a9..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteRawStrip.3t
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteRawStrip.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteRawstrip 3T "October 15, 1995"
-.SH NAME
-TIFFWriteRawStrip \- write a strip of raw data to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Append
-.I size
-bytes of raw data to the specified strip.
-.SH NOTES
-The strip number must be valid according to the current settings
-of the
-.I ImageLength
-and
-.I RowsPerStrip
-tags.
-An image may be dynamically grown by increasing the value of
-.I ImageLength
-prior to each call to
-.IR TIFFWriteRawStrip .
-.SH "RETURN VALUES"
-\-1 is returned if an error occurred.
-Otherwise, the value of
-.IR size 
-is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-\fB%s: File not open for writing\fP.
-The file was opened for reading, not writing.
-.PP
-\fBCan not write scanlines to a tiled image\fP.
-The image is assumed to be organized in tiles because the
-.I TileWidth
-and
-.I TileLength
-tags have been set with
-.IR TIFFSetField (3T).
-.PP
-\fB%s: Must set "ImageWidth" before writing data\fP.
-The image's width has not be set before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: Must set "PlanarConfiguration" before writing data\fP.
-The organization of data has not be defined before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: No space for strip arrays"\fP.
-There was not enough space for the arrays that hold strip
-offsets and byte counts.
-.PP
-\fB%s: Strip %d out of range, max %d\fP.
-The specified strip is not a valid strip according to the
-currently specified image dimensions.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteEncodedStrip (3T),
-.IR TIFFWriteScanline (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteRawTile.3t b/tkimg1.3/libtiff/man/TIFFWriteRawTile.3t
deleted file mode 100644
index 2e1ce30..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteRawTile.3t
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteRawTile.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteRawtile 3T "December 16, 1991"
-.SH NAME
-TIFFWriteRawTile \- write a tile of raw data to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)"
-.SH DESCRIPTION
-Append
-.I size
-bytes of raw data to the specified tile.
-.SH "RETURN VALUES"
-\-1 is returned if an error occurred.
-Otherwise, the value of
-.IR size 
-is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-\fB%s: File not open for writing\fP.
-The file was opened for reading, not writing.
-.PP
-\fBCan not write tiles to a stripped image\fP.
-The image is assumed to be organized in strips because neither of the
-.I TileWidth
-or
-.I TileLength
-tags have been set with
-.IR TIFFSetField (3T).
-.PP
-\fB%s: Must set "ImageWidth" before writing data\fP.
-The image's width has not be set before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: Must set "PlanarConfiguration" before writing data\fP.
-The organization of data has not be defined before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: No space for tile arrays"\fP.
-There was not enough space for the arrays that hold tile
-offsets and byte counts.
-.PP
-\fB%s: Specified tile %d out of range, max %d\fP.
-The specified tile is not valid according to the currently
-specified image dimensions.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteEncodedTile (3T),
-.IR TIFFWriteScanline (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteScanline.3t b/tkimg1.3/libtiff/man/TIFFWriteScanline.3t
deleted file mode 100644
index 74a4adf..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteScanline.3t
+++ /dev/null
@@ -1,162 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteScanline.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteScanline 3T "December 16, 1991"
-.SH NAME
-TIFFWriteScanline \- write a scanline to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "int TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)"
-.SH DESCRIPTION
-Write data to a file at the specified row.
-The
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-The data are assumed to be uncompressed and in the native
-bit- and byte-order of the host machine.
-The data written to the file is
-compressed according to the compression scheme
-of the current
-.SM TIFF
-directory (see further below).
-If the current scanline is past the end of the current subfile, the
-.I ImageLength
-field is automatically increased to include the scanline (except
-for
-.IR PlanarConfiguration =2,
-where the
-.I ImageLength
-cannot be changed once the first data are written).
-If the
-.I ImageLength
-is increased, the
-.I StripOffsets
-and
-.I StripByteCounts
-fields are similarly enlarged to reflect data written past the
-previous end of image.
-.SH NOTES
-The library writes encoded data using the native machine byte order.
-Correctly implemented
-.SM TIFF
-readers are expected to do any necessary byte-swapping to
-correctly process image data with BitsPerSample greater than 8.
-The library attempts to hide bit-ordering differences
-between the image and the native machine by converting data
-from the native machine order.
-.PP
-In C++ the
-.I sample
-parameter defaults to 0.
-.PP
-Once data are written to a file for the current directory,
-the values of certain tags may not be altered; see
-.IR TIFFSetField (3T)
-for more information.
-.PP
-It is not possible to write scanlines to a file that
-uses a tiled organization.  The routine
-.IR TIFFIsTiled
-can be used to determine if the file is organized
-as tiles or strips.
-.SH "RETURN VALUES"
-.IR TIFFWriteScanline
-returns \-1 if it immediately detects an error
-and 1 for a successful write.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.PP
-.BR "%s: File not open for writing .
-The file was opened for reading, not writing.
-.PP
-.BR "Can not write scanlines to a tiled image" .
-An attempt was made to write a scanline to a tiled image.
-The image is assumed to be organized in tiles because the
-.I TileWidth
-and
-.I TileLength
-tags have been set with
-.IR TIFFSetField (3T).
-.PP
-.BR "Compression algorithm does not support random access" .
-Data was written in a non-sequential order to a file that
-uses a compression algorithm and that has
-.I RowsPerStrip
-greater than one.
-That is, data in the image is to be stored in a compressed form,
-and with multiple rows packed into a strip.
-In this case, the library does not support random access to the data.
-The data should either be written as entire strips,
-sequentially by rows, or the value of
-.I RowsPerStrip
-should be set to one.
-.PP
-\fB%s: Must set "ImageWidth" before writing data\fP.
-The image's width has not be set before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fB%s: Must set "PlanarConfiguration" before writing data\fP.
-The organization of data has not be defined before the first write.
-See
-.IR TIFFSetField (3T)
-for information on how to do this.
-.PP
-\fBCan not change "ImageLength" when using separate planes\fP.
-Separate image planes are being used (\c
-.IR PlanarConfiguration =2),
-but the number of rows has not been specified before the first write.
-The library supports the dynamic growth of an image only when data
-are organized in a contiguous manner (\c
-.IR PlanarConfiguration =1).
-.PP
-.BR "%d: Sample out of range, max %d" .
-The
-.I sample
-parameter was greater than the value of the SamplesPerPixel tag.
-.PP
-.BR "%s: No space for strip arrays .
-There was not enough space for the arrays that hold strip
-offsets and byte counts.
-.SH BUGS
-Writing subsampled YCbCR data does not work correctly
-because, for 
-.IR PlanarConfiguration =2
-the size of a scanline is not calculated on a per-sample basis,
-and for
-.IR PlanarConfiguration =1
-the library does not pack the block-interleaved samples.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFWriteEncodedStrip (3T),
-.IR TIFFWriteRawStrip (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFWriteTile.3t b/tkimg1.3/libtiff/man/TIFFWriteTile.3t
deleted file mode 100644
index 7ae6f3f..0000000
--- a/tkimg1.3/libtiff/man/TIFFWriteTile.3t
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFWriteTile.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFWriteTile 3T "November 29, 1999"
-.SH NAME
-TIFFWriteTile \- encode and write a tile of data to an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "tsize_t TIFFWriteTile(TIFF* tif, tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t sample)"
-.SH DESCRIPTION
-Write the data for the tile
-.I containing
-the specified coordinates.
-The data in
-.I buf
-are is (potentially) compressed, and written to the indicated file, normally
-being appended to the end of the file.
-The buffer must be contain an entire tile of data.
-Applications should call the routine
-.IR TIFFTileSize
-to find out the size (in bytes) of a tile buffer.
-The
-.I x
-and
-.I y
-parameters are always used by
-.IR TIFFWriteTile .
-The
-.I z
-parameter is used if the image is deeper than 1 slice (\c
-.IR ImageDepth >1).
-The
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.SH "RETURN VALUES"
-.IR TIFFWriteTile
-returns \-1 if it detects an error; otherwise the number of
-bytes in the tile is returned.
-.SH DIAGNOSTICS
-All error messages are directed to the
-.IR TIFFError (3T)
-routine.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFCheckTile (3T),
-.IR TIFFComputeTile (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadTile (3T),
-.IR TIFFWriteScanline (3T),
-.IR TIFFWriteEncodedTile (3T),
-.IR TIFFWriteRawTile (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFbuffer.3t b/tkimg1.3/libtiff/man/TIFFbuffer.3t
deleted file mode 100644
index cec4b6e..0000000
--- a/tkimg1.3/libtiff/man/TIFFbuffer.3t
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFbuffer.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1995 Sam Leffler
-.\" Copyright (c) 1995 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFBUFFER 3T "October 15, 1995"
-.SH NAME
-TIFFReadBufferSetup,
-TIFFWriteBufferSetup
-\- I/O buffering control routines
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "int TIFFReadBufferSetup(TIFF*, tdata_t buffer, tsize_t size);"
-.B "int TIFFWriteBufferSetup(TIFF*, tdata_t buffer, tsize_t size);"
-.fi
-.SH DESCRIPTION
-The following routines are provided for client-control of the
-I/O buffers used by the library.
-Applications need never use these routines; they are provided only
-for ``intelligent clients'' that wish to optimize memory usage and/or
-eliminate potential copy operations that can occur when working with
-images that have data stored without compression.
-.PP
-.I TIFFReadBufferSetup
-sets up the data buffer used to read raw (encoded) data from a file.
-If the specified pointer is
-.SM NULL
-(zero), then a buffer of the appropriate size is allocated.
-Otherwise the caller must guarantee that the buffer is large
-enough to hold any individual strip of raw data.
-.I TIFFReadBufferSetup
-returns a non-zero value if the setup was successful and zero otherwise.
-.PP
-.I TIFFWriteBufferSetup
-sets up the data buffer used to write raw (encoded) data to a file.
-If the specified
-.I size
-is \-1 then the buffer size is selected to hold a complete
-tile or strip, or at least 8 kilobytes, whichever is greater.
-If the specified
-.I buffer
-is 
-.SM NULL
-(zero), then a buffer of the appropriate size is dynamically allocated.
-.I TIFFWriteBufferSetup
-returns a non-zero value if the setup was successful and zero otherwise.
-.SH DIAGNOSTICS
-.BR "%s: No space for data buffer at scanline %ld" .
-.I TIFFReadBufferSetup
-was unable to dynamically allocate space for a data buffer.
-.PP
-.BR "%s: No space for output buffer" .
-.I TIFFWriteBufferSetup
-was unable to dynamically allocate space for a data buffer.
-.SH "SEE ALSO"
-.IR libtiff (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFcodec.3t b/tkimg1.3/libtiff/man/TIFFcodec.3t
deleted file mode 100644
index 63cb6c4..0000000
--- a/tkimg1.3/libtiff/man/TIFFcodec.3t
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFcodec.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1995 Sam Leffler
-.\" Copyright (c) 1995 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH CODEC 3T "October 15, 1995"
-.SH NAME
-TIFFFindCODEC, TIFFRegisterCODEC, TIFFUnRegisterCODEC \- codec-related utility routines
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "const TIFFCodec* TIFFFindCODEC(uint16 scheme);"
-.br
-.B "TIFFCodec* TIFFRegisterCODEC(uint16 scheme, const char* method, TIFFInitMethod init);"
-.br
-.B "void TIFFUnRegisterCODEC(TIFFCodec* codec);"
-.br
-.B "int TIFFIsCODECConfigured(uint16 scheme);"
-.SH DESCRIPTION
-.I libtiff
-supports a variety of compression schemes implemented by software
-.IR codecs .
-Each codec adheres to a modular interface that provides for
-the decoding and encoding of image data; as well as some other
-methods for initialization, setup, cleanup, and the control
-of default strip and tile sizes.
-Codecs are identified by the associated value of the 
-.SM TIFF
-.I Compression
-tag; e.g. 5 for
-.SM LZW
-compression.
-.PP
-The
-.I TIFFRegisterCODEC
-routine can be used to
-augment or override the set of codecs available to an application.
-If the specified
-.I scheme
-already has a registered codec then it is
-.I overridden
-and any images with data encoded with this
-compression scheme will be decoded using the supplied coded.
-.PP
-.I TIFFIsCODECConfigured
-returns 1 if the codec is configured and working. Otherwise 0 will be returned.
-.SH DIAGNOSTICS
-.BR "No space to register compression scheme %s" .
-.I TIFFRegisterCODEC
-was unable to allocate memory for the data structures needed
-to register a codec.
-.PP
-.BR "Cannot remove compression scheme %s; not registered" .
-.I TIFFUnRegisterCODEC
-did not locate the specified codec in the table of registered 
-compression schemes.
-.SH "SEE ALSO"
-.IR libtiff (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFcolor.3t b/tkimg1.3/libtiff/man/TIFFcolor.3t
deleted file mode 100644
index 8150920..0000000
--- a/tkimg1.3/libtiff/man/TIFFcolor.3t
+++ /dev/null
@@ -1,265 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFcolor.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 2003, Andrey Kiselev <dron at remotesensing.org>
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH COLOR 3T "December 21, 2003"
-.SH NAME
-TIFFYCbCrToRGBInit, TIFFYCbCrtoRGB, TIFFCIELabToRGBInit, TIFFCIELabToXYZ,
-TIFFXYZToRGB \- color conversion routines.
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.sp
-.BI "int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *" ycbcr ", float *" luma ", float *"refBlackWhite" );"
-.br
-.BI "void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *" ycbcr ", uint32 " Y ", int32 " Cb ", int32 " Cr ", uint32 *" R ", uint32 *" G ", uint32 *" B " );"
-.sp
-.BI "int TIFFCIELabToRGBInit(TIFFCIELabToRGB *" cielab ", TIFFDisplay *" display ", float *" refWhite ");"
-.br
-.BI "void TIFFCIELabToXYZ(TIFFCIELabToRGB *" cielab ", uint32 " L ", int32 " a ", int32 " b ", float *" X ", float *" Y ", float *" Z ");"
-.br
-.BI "void TIFFXYZToRGB(TIFFCIELabToRGB *" cielab ", float " X ", float " Y ", float " Z" , uint32 *" R ", uint32 *" G ", uint32 *" B ");"
-.SH DESCRIPTION
-TIFF supports several color spaces for images stored in that format. There is
-usually a problem of application to handle the data properly and convert
-between different colorspaces for displaying and printing purposes. To
-simplify this task libtiff implements several color conversion routines
-itself. In particular, these routines used in
-.B TIFFRGBAImage(3T)
-interface.
-.PP
-.B TIFFYCbCrToRGBInit()
-used to initialize
-.I YCbCr
-to
-.I RGB
-conversion state. Allocating and freeing of the
-.I ycbcr
-structure belongs to programmer.
-.I TIFFYCbCrToRGB
-defined in
-.B tiffio.h
-as
-.PP
-.RS
-.nf
-typedef struct {                /* YCbCr->RGB support */
-        TIFFRGBValue* clamptab; /* range clamping table */
-        int*	      Cr_r_tab;
-        int*	      Cb_b_tab;
-        int32*	      Cr_g_tab;
-        int32*	      Cb_g_tab;
-        int32*        Y_tab;
-} TIFFYCbCrToRGB;
-.fi
-.RE
-.PP
-.I luma
-is a float array of three values representing proportions of the red, green
-and blue in luminance, Y (see section 21 of the TIFF 6.0 specification, where
-the YCbCr images discussed).
-.I TIFFTAG_YCBCRCOEFFICIENTS
-holds that values in TIFF file.
-.I refBlackWhite
-is a float array of 6 values which specifies a pair of headroom and footroom
-image data values (codes) for each image component (see section 20 of the
-TIFF 6.0 specification where the colorinmetry fields discussed).
-.I TIFFTAG_REFERENCEBLACKWHITE
-is responsible for storing these values in TIFF file. Following code snippet
-should helps to understand the the technique:
-.PP
-.RS
-.nf
-float *luma, *refBlackWhite;
-uint16 hs, vs;
-
-/* Initialize structures */
-ycbcr = (TIFFYCbCrToRGB*)
-	_TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))
-        	+ 4*256*sizeof(TIFFRGBValue)
-        	+ 2*256*sizeof(int)
-        	+ 3*256*sizeof(int32));
-if (ycbcr == NULL) {
-        TIFFError("YCbCr->RGB",
-		"No space for YCbCr->RGB conversion state");
-        exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
-TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite);
-if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0)
-	exit(0);
-
-/* Start conversion */
-uint32 r, g, b;
-uint32 Y;
-int32 Cb, Cr;
-
-for each pixel in image
-	TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b);
-
-/* Free state structure */
-_TIFFfree(ycbcr);
-.fi
-.RE
-.PP
-
-.PP
-.B TIFFCIELabToRGBInit()
-initializes the
-.I CIE L*a*b* 1976
-to
-.I RGB
-conversion state.
-.B TIFFCIELabToRGB
-defined as
-.PP
-.RS
-.nf
-#define CIELABTORGB_TABLE_RANGE 1500
-
-typedef struct {		     /* CIE Lab 1976->RGB support */
-	int	range;		     /* Size of conversion table */
-	float	rstep, gstep, bstep;
-	float	X0, Y0, Z0;	     /* Reference white point */
-	TIFFDisplay display;
-	float	Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */
-	float	Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */
-	float	Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */
-} TIFFCIELabToRGB;
-.fi
-.RE
-.PP
-.I display
-is a display device description, declared as
-.PP
-.RS
-.nf
-typedef struct {
-	float d_mat[3][3]; /* XYZ -> luminance matrix */
-	float d_YCR;       /* Light o/p for reference white */
-	float d_YCG;
-	float d_YCB;
-	uint32 d_Vrwr;     /* Pixel values for ref. white */
-	uint32 d_Vrwg;
-	uint32 d_Vrwb;
-	float d_Y0R;       /* Residual light for black pixel */
-	float d_Y0G;
-	float d_Y0B;
-	float d_gammaR;    /* Gamma values for the three guns */
-	float d_gammaG;
-	float d_gammaB;
-} TIFFDisplay;
-.fi
-.RE
-.PP
-For example, the one can use sRGB device, which has the following parameters:
-.PP
-.RS
-.nf
-TIFFDisplay display_sRGB = {
-	{       /* XYZ -> luminance matrix */
-		{  3.2410F, -1.5374F, -0.4986F },
-		{  -0.9692F, 1.8760F, 0.0416F },
-		{  0.0556F, -0.2040F, 1.0570F }
-	},	
-	100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
-	255, 255, 255,      /* Pixel values for ref. white */
-	1.0F, 1.0F, 1.0F,   /* Residual light o/p for black pixel */
-	2.4F, 2.4F, 2.4F,   /* Gamma values for the three guns */
-};
-.fi
-.RE
-.PP
-.I refWhite
-is a color temperature of the reference white. The
-.I TIFFTAG_WHITEPOINT
-contains the chromaticity of the white point of the image from where the
-reference white can be calculated using following formulae:
-.PP
-.RS
-refWhite_Y = 100.0
-.br
-refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y
-.br
-refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X
-.br
-.RE
-.PP
-The conversion itself performed in two steps: at the first one we will convert
-.I CIE L*a*b* 1976
-to
-.I CIE XYZ
-using
-.B TIFFCIELabToXYZ()
-routine, and at the second step we will convert
-.I CIE XYZ
-to
-.I RGB
-using
-.B TIFFXYZToRGB().
-Look at the code sample below:
-.PP
-.RS
-.nf
-float   *whitePoint;
-float   refWhite[3];
-
-/* Initialize structures */
-img->cielab = (TIFFCIELabToRGB *)
-	_TIFFmalloc(sizeof(TIFFCIELabToRGB));
-if (!cielab) {
-	TIFFError("CIE L*a*b*->RGB",
-		"No space for CIE L*a*b*->RGB conversion state.");
-	exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint);
-refWhite[1] = 100.0F;
-refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
-refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
-	      / whitePoint[1] * refWhite[1];
-if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) {
-	TIFFError("CIE L*a*b*->RGB",
-		"Failed to initialize CIE L*a*b*->RGB conversion state.");
-	_TIFFfree(cielab);
-	exit(0);
-}
-
-/* Now we can start to convert */
-uint32 r, g, b;
-uint32 L;
-int32 a, b;
-float X, Y, Z;
-
-for each pixel in image
-	TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z);
-	TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b);
-
-/* Don't forget to free the state structure */
-_TIFFfree(cielab);
-.fi
-.RE
-.PP
-
-.SH "SEE ALSO"
-.IR libtiff (3T), TIFFRGBAImage(3T)
diff --git a/tkimg1.3/libtiff/man/TIFFmemory.3t b/tkimg1.3/libtiff/man/TIFFmemory.3t
deleted file mode 100644
index 1099d6b..0000000
--- a/tkimg1.3/libtiff/man/TIFFmemory.3t
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFmemory.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1995 Sam Leffler
-.\" Copyright (c) 1995 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH MEMORY 3T "October 15, 1995"
-.SH NAME
-_TIFFmalloc, \c
-_TIFFrealloc, \c
-_TIFFfree, \c
-_TIFFmemset, \c
-_TIFFmemcpy, \c
-_TIFFmemcmp, \c
-\- memory management-related functions for use with
-.SM TIFF
-files
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "tdata_t _TIFFmalloc(tsize_t);"
-.B "tdata_t _TIFFrealloc(tdata_t, tsize_t);"
-.B "void _TIFFfree(tdata_t);"
-.B "void _TIFFmemset(tdata_t, int, tsize_t);"
-.B "void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);"
-.B "int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);"
-.fi
-.SH DESCRIPTION
-These routines are provided for writing portable software that uses 
-.IR libtiff ;
-they hide any memory-management related issues, such as dealing with
-segmented architectures found on 16-bit machines.
-.PP
-.I _TIFFmalloc
-and
-.I _TIFFrealloc
-are used to dynamically allocate and reallocate memory used by 
-.IR libtiff ;
-such as memory passed into the I/O routines.
-Memory allocated through these interfaces is released back to the
-system using the
-.I _TIFFfree
-routine.
-.PP
-Memory allocated through one of the above interfaces can be set to
-a known value using
-.IR _TIFFmemset ,
-copied to another memory location using
-.IR _TIFFmemcpy ,
-or compared for equality using 
-.IR _TIFFmemcmp .
-These routines conform to the equivalent
-.SM ANSI
-C routines: 
-.IR memset ,
-.IR memcpy ,
-and
-.IR memcmp ,
-repsectively.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR malloc (3C),
-.IR memory (3C)
diff --git a/tkimg1.3/libtiff/man/TIFFquery.3t b/tkimg1.3/libtiff/man/TIFFquery.3t
deleted file mode 100644
index b57a582..0000000
--- a/tkimg1.3/libtiff/man/TIFFquery.3t
+++ /dev/null
@@ -1,137 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFquery.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH QUERY 3T "October 15, 1995"
-.SH NAME
-TIFFCurrentRow,
-TIFFCurrentStrip,
-TIFFCurrentTile,
-TIFFCurrentDirectory,
-TIFFLastDirectory,
-TIFFFileno,
-TIFFFileName,
-TIFFGetMode,
-TIFFIsTiled,
-TIFFIsByteSwapped,
-TIFFIsUpSampled,
-TIFFIsMSB2LSB
-\- query routines
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "uint32 TIFFCurrentRow(TIFF* tif)"
-.B "tstrip_t TIFFCurrentStrip(TIFF* tif)"
-.B "ttile_t TIFFCurrentTile(TIFF* tif)"
-.B "tdir_t TIFFCurrentDirectory(TIFF* tif)"
-.B "int TIFFLastDirectory(TIFF* tif)"
-.B "int TIFFFileno(TIFF* tif)"
-.B "char* TIFFFileName(TIFF* tif)"
-.B "int TIFFGetMode(TIFF* tif)"
-.B "int TIFFIsTiled(TIFF* tif)"
-.B "int TIFFIsByteSwapped(TIFF* tif)"
-.B "int TIFFIsUpSampled(TIFF* tif)"
-.B "int TIFFIsMSB2LSB(TIFF* tif)"
-.B "const char* TIFFGetVersion(void)"
-.fi
-.SH DESCRIPTION
-The following routines return status information about an open
-.SM TIFF
-file.
-.PP
-.IR TIFFCurrentDirectory
-returns the index of the current directory (directories
-are numbered starting at 0).
-This number is suitable for use with the
-.IR TIFFSetDirectory
-routine.
-.PP
-.IR TIFFLastDirectory
-returns a non-zero value if the current directory is the
-last directory in the file;
-otherwise zero is returned.
-.PP
-.IR TIFFCurrentRow ,
-.IR TIFFCurrentStrip ,
-and
-.IR TIFFCurrentTile ,
-return the current row, strip, and tile, respectively,
-that is being read or written.
-These values are updated each time a read or write is done.
-.PP
-.IR TIFFFileno
-returns the underlying file descriptor used to access the 
-.SM TIFF
-image in the filesystem.
-.PP
-.IR TIFFFileName
-returns the pathname argument passed to
-.IR TIFFOpen
-or
-.IR TIFFFdOpen .
-.PP
-.IR TIFFGetMode
-returns the mode with which the underlying file was opened.
-On
-.SM UNIX
-systems, this is the value passed to the
-.IR open (2)
-system call.
-.PP
-.IR TIFFIsTiled
-returns a non-zero value if the image data has
-a tiled organization.
-Zero is returned if the image data is organized in strips.
-.PP
-.IR TIFFIsByteSwapped
-returns a non-zero value if the image data was in a different
-byte-order than the host machine.
-Zero is returned if the TIFF file and local host byte-orders
-are the same.  Note that TIFFReadTile(), TIFFReadStrip() and
-TIFFReadScanline() functions already normally perform byte
-swapping to local host order if needed.
-.PP
-.I TIFFIsUpSampled
-returns a non-zero value if image data returned through the
-read interface routines is being up-sampled.
-This can be useful to applications that want to calculate
-I/O buffer sizes to reflect this usage (though the usual
-strip and tile size routines already do this).
-.PP
-.I TIFFIsMSB2LSB
-returns a non-zero value if the image data is being returned with
-bit 0 as the most significant bit.
-.PP
-.IR TIFFGetVersion
-returns an
-.SM ASCII
-string that has a version stamp for the 
-.SM TIFF
-library software.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFFdOpen (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFsize.3t b/tkimg1.3/libtiff/man/TIFFsize.3t
deleted file mode 100644
index 6e7cd2e..0000000
--- a/tkimg1.3/libtiff/man/TIFFsize.3t
+++ /dev/null
@@ -1,57 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFsize.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFSIZE 3T "October 15, 1995"
-.SH NAME
-TIFFScanlineSize,
-TIFFRasterScanlineSize,
-\- return the size of various items associated with an open
-.SM TIFF
-file
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "tsize_t TIFFRasterScanlineSize(TIFF* tif)"
-.B "tsize_t TIFFScanlineSize(TIFF* tif)"
-.SH DESCRIPTION
-.I TIFFScanlineSize
-returns the size in bytes of a row of data as it would be
-returned in a call to
-.IR TIFFReadScanline ,
-or as it would be expected in a call to
-.IR TIFFWriteScanline .
-.PP
-.I TIFFRasterScanlineSize
-returns the size in bytes of a complete decoded and packed
-raster scanline.
-Note that this value may be different from the value returned by
-.I TIFFScanlineSize
-if data is stored as separate planes.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFOpen (3T),
-.IR TIFFReadScanline (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFstrip.3t b/tkimg1.3/libtiff/man/TIFFstrip.3t
deleted file mode 100644
index 51e416b..0000000
--- a/tkimg1.3/libtiff/man/TIFFstrip.3t
+++ /dev/null
@@ -1,101 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFstrip.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1992-1997 Sam Leffler
-.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFSTRIP 3T "October 15, 1995"
-.SH NAME
-TIFFDefaultStripSize,
-TIFFStripSize,
-TIFFVStripSize,
-TIFFRawStripSize,
-TIFFComputeStrip,
-TIFFNumberOfStrips
-\- strip-related utility routines
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "uint32 TIFFDefaultStripSize(TIFF* tif, uint32 estimate)"
-.B "tsize_t TIFFStripSize(TIFF* tif)"
-.B "tsize_t TIFFVStripSize(TIFF* tif, uint32 nrows)"
-.B "tsize_t TIFFRawStripSize(TIFF* tif, tstrip_t strip)"
-.B "tstrip_t TIFFComputeStrip(TIFF* tif, uint32 row, tsample_t sample)"
-.B "tstrip_t TIFFNumberOfStrips(TIFF* tif)"
-.fi
-.SH DESCRIPTION
-.I TIFFDefaultStripSize
-returns the number of rows for a reasonable-sized strip according
-to the current settings of the
-.IR ImageWidth ,
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-tags and any compression-specific requirements.
-If the
-.I estimate
-parameter, if non-zero, then it is taken as an estimate of the desired
-strip size and adjusted according to any compression-specific requirements.
-The value returned by this function is typically used to define the
-.I RowsPerStrip
-tag.
-In lieu of any unusual requirements
-.I TIFFDefaultStripSize
-tries to create strips that have approximately
-8 kilobytes of uncompressed data.
-.PP
-.IR TIFFStripSize
-returns the equivalent size for a strip of data as it would
-be returned in a call to
-.IR TIFFReadEncodedStrip
-or as it would be expected in a call to
-.IR TIFFWriteEncodedStrip .
-.PP
-.I TIFFVStripSize
-returns the number of bytes in a strip with
-.I nrows
-rows of data.
-.PP
-.I TIFFRawStripSize
-returns the number of bytes in a raw strip (i.e. not decoded).
-.PP
-.IR TIFFComputeStrip
-returns the strip that contains the specified coordinates.
-A valid strip is always returned;
-out-of-range coordinate values are clamped to the bounds of the image.
-The
-.I row
-parameter is always used in calculating a strip.
-The
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.PP
-.IR TIFFNumberOfStrips
-returns the number of strips in the image.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFReadEncodedStrip (3T),
-.IR TIFFReadRawStrip (3T),
-.IR TIFFWriteEncodedStrip (3T),
-.IR TIFFWriteRawStrip (3T)
diff --git a/tkimg1.3/libtiff/man/TIFFswab.3t b/tkimg1.3/libtiff/man/TIFFswab.3t
deleted file mode 100644
index b6ccbf7..0000000
--- a/tkimg1.3/libtiff/man/TIFFswab.3t
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFswab.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH SWAB 3T "December 16, 1991"
-.SH NAME
-TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong \- byte- and bit-swapping routines
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-.B "const unsigned char* TIFFGetBitRevTable(int reversed);"
-.br
-.B "void TIFFReverseBits(u_char* data, unsigned long nbytes)"
-.br
-.B "void TIFFSwabShort(uint16* data)"
-.br
-.B "void TIFFSwabLong(uint32* data)"
-.br
-.B "void TIFFSwabArrayOfShort(uint16* data, unsigned long nshorts)"
-.br
-.B "void TIFFSwabArrayOfLong(uint32* data, unsigned long nlongs)"
-.SH DESCRIPTION
-The following routines are used by the library to swap
-16- and 32-bit data and to reverse the order of bits in bytes.
-.PP
-.IR TIFFSwabShort
-and
-.IR TIFFSwabLong
-swap the bytes in a single 16-bit and 32-bit item, respectively.
-.IR TIFFSwabArrayOfShort
-and
-.IR TIFFSwabArrayOfLong
-swap the bytes in an array of 16-bit and 32-bit items, respectively.
-.PP
-.IR TIFFReverseBits
-replaces each byte in
-.I data
-with the equivalent bit-reversed value.
-This operation is done with a lookup table,
-.I TIFFBitRevTable
-which is declared public.
-A second table,
-.I TIFFNoBitRevTable
-is also declared public; it is a lookup table that
-can be used as an
-.IR "identity function" ;
-i.e.
-.IR "TIFFNoBitRevTable[n] == n" .
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
diff --git a/tkimg1.3/libtiff/man/TIFFtile.3t b/tkimg1.3/libtiff/man/TIFFtile.3t
deleted file mode 100644
index 217834d..0000000
--- a/tkimg1.3/libtiff/man/TIFFtile.3t
+++ /dev/null
@@ -1,134 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/TIFFtile.3t,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFTILE 3T "February 14, 1992"
-.SH NAME
-TIFFTileSize,
-TIFFTileRowSize,
-TIFFVTileSize,
-TIFFDefaultTileSize,
-TIFFComputeTile,
-TIFFCheckTile,
-TIFFNumberOfTiles
-\- tile-related utility routines
-.SH SYNOPSIS
-.nf
-.B "#include <tiffio.h>"
-.B "void TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)"
-.B "tsize_t TIFFTileSize(TIFF* tif)"
-.B "tsize_t TIFFTileRowSize(TIFF* tif)"
-.B "tsize_t TIFFVTileSize(TIFF* tif, uint32 nrows)"
-.B "ttile_t TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t sample)"
-.B "int TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t sample)"
-.B "ttile_t TIFFNumberOfTiles(TIFF* tif)"
-.fi
-.SH DESCRIPTION
-.I TIFFDefaultTileSize
-returns the pixel width and height of a reasonable-sized tile;
-suitable for setting up the
-.I TileWidth
-and
-.I TileLength
-tags.
-If the
-.I tw
-and
-.I th
-values passed in are non-zero, then they are adjusted to reflect
-any compression-specific requirements.
-The returned width and height are constrained to be a multiple
-of 16 pixels to conform with the 
-.SM TIFF
-specification.
-.PP
-.I TIFFTileSize
-returns the equivalent size for a tile of data as it would
-be returned in a call to
-.I TIFFReadTile
-or as it would be expected in a call to
-.IR TIFFWriteTile .
-.PP
-.I TIFFVTileSize
-returns the number of bytes in a row-aligned tile with
-.I nrows
-of data.
-.PP
-.I TIFFTileRowSize
-returns the number of bytes of a row of data in a tile.
-.PP
-.IR TIFFComputeTile
-returns the tile that contains the specified coordinates.
-A valid tile is always returned;
-out-of-range coordinate values are clamped to the bounds of the image.
-The
-.I x
-and
-.I y
-parameters are always used in calculating a tile.
-The
-.I z
-parameter is used if the image is deeper than 1 slice (\c
-.IR ImageDepth >1).
-The
-.I sample
-parameter is used only if data are organized in separate planes (\c
-.IR PlanarConfiguration =2).
-.PP
-.IR TIFFCheckTile
-returns a non-zero value if the supplied coordinates are
-within the bounds of the image and zero otherwise.
-The
-.I x
-parameter is checked against the value of the
-.I ImageWidth
-tag.
-The
-.I y
-parameter is checked against the value of the
-.I ImageLength
-tag.
-The
-.I z
-parameter is checked against the value of the
-.I ImageDepth
-tag (if defined).
-The
-.I sample
-parameter is checked against the value of the
-.I SamplesPerPixel
-parameter if the data are organized in separate planes.
-.PP
-.IR TIFFNumberOfTiles
-returns the number of tiles in the image.
-.SH DIAGNOSTICS
-None.
-.SH "SEE ALSO"
-.IR libtiff (3T),
-.IR TIFFReadEncodedTile (3T),
-.IR TIFFReadRawTile (3T),
-.IR TIFFReadTile (3T),
-.IR TIFFWriteEncodedTile (3T),
-.IR TIFFWriteRawTile (3T),
-.IR TIFFWriteTile (3T)
diff --git a/tkimg1.3/libtiff/man/fax2ps.1 b/tkimg1.3/libtiff/man/fax2ps.1
deleted file mode 100644
index 84a7fc1..0000000
--- a/tkimg1.3/libtiff/man/fax2ps.1
+++ /dev/null
@@ -1,156 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/fax2ps.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
-.TH FAX2PS 1 "March 16, 1995"
-.SH NAME
-fax2ps \- convert a
-.SM TIFF
-facsimile to compressed \*(Ps\(tm
-.SH SYNOPSIS
-.B fax2ps
-[
-.I options
-] [
-.IR file ...
-]
-.SH DESCRIPTION
-.I fax2ps
-reads one or more
-.SM TIFF
-facsimile image files and prints a compressed form of
-\*(Ps on the standard output that is suitable for printing.
-.PP
-By default, each page is scaled to reflect the
-image dimensions and resolutions stored in the file.
-The
-.B \-x
-and
-.B \-y
-options can be used to specify the horizontal and vertical
-image resolutions (lines/inch), respectively.
-If the
-.B \-S
-option is specified, each page is scaled to fill an output page.
-The default output page is 8.5 by 11 inches.
-Alternate page dimensions can be specified in inches with the
-.B \-W
-and
-.B \-H
-options.
-.PP
-By default
-.I fax2ps
-generates \*(Ps for all pages in the file.
-The
-.B \-p
-option can be used to select one or more pages from
-a multi-page document.
-.PP
-.I fax2ps
-generates a compressed form of \*(Ps that is
-optimized for sending pages of text to a \*(Ps
-printer attached to a host through a low-speed link (such
-as a serial line).
-Each output page is filled with white and then only
-the black areas are drawn.
-The \*(Ps specification of the black drawing operations
-is optimized by using a special font that encodes the
-move-draw operations required to fill
-the black regions on the page.
-This compression scheme typically results in a substantially
-reduced \*(Ps description, relative to the straightforward
-imaging of the page with a \*(Ps
-.I image
-operator.
-This algorithm can, however, be ineffective
-for continuous-tone and white-on-black images.
-For these images, it sometimes is more efficient to send
-the raster bitmap image directly; see
-.IR tiff2ps (1).
-.SH OPTIONS
-.TP 10
-.BI \-p " number"
-Print only the indicated page.
-Multiple pages may be printed by specifying
-this option more than once.
-.TP 10
-.BI \-x " resolution"
-Use
-.I resolution
-as the horizontal resolution, in dots/inch, of the image data.
-By default this value is taken from the file.
-.TP 10
-.BI \-y " resolution"
-Use
-.I resolution
-as the vertical resolution, in lines/inch, of the image data.
-By default this value is taken from the file.
-.TP 10
-.B \-S
-Scale each page of image data to fill the output page dimensions.
-By default images are presented according to the dimension
-information recorded in the 
-.SM TIFF
-file.
-.TP 10
-.BI \-W " width"
-Use
-.I width
-as the width, in inches, of the output page.
-.TP 10
-.BI \-H " height"
-Use
-.I height
-as the height, in inches, of the output page.
-.SH DIAGNOSTICS
-Some messages about malformed 
-.SM TIFF
-images come from the
-.SM TIFF
-library.
-.PP
-Various messages about badly formatted facsimile images
-may be generated due to transmission errors in received
-facsimile.
-.I fax2ps
-attempts to recover from such data errors by resynchronizing
-decoding at the end of the current scanline.
-This can result in long horizontal black lines in the resultant
-\*(Ps image.
-.SH NOTES
-If the destination printer supports \*(Ps Level II then
-it is always faster to just send the encoded bitmap generated
-by the
-.IR tiff2ps (1)
-program.
-.SH BUGS
-.I fax2ps
-should probably figure out when it is doing a poor
-job of compressing the output and just generate 
-\*(Ps to image the bitmap raster instead.
-.SH "SEE ALSO"
-.IR tiff2ps (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/fax2tiff.1 b/tkimg1.3/libtiff/man/fax2tiff.1
deleted file mode 100644
index ba1fe27..0000000
--- a/tkimg1.3/libtiff/man/fax2tiff.1
+++ /dev/null
@@ -1,265 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/fax2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH FAX2TIFF 1 "February 27, 2003"
-.SH NAME
-fax2tiff \- create a
-.SM TIFF
-Class F fax file from raw fax data
-.SH SYNOPSIS
-.B fax2tiff
-[
-.I options
-] [
-.B \-o
-.I output.tif
-]
-.I input.raw
-.SH DESCRIPTION
-.I Fax2tiff
-creates a
-.SM TIFF
-file containing 
-.SM CCITT
-Group 3 or Group 4 encoded data from one or more files containing ``raw''
-Group 3 or Group 4 encoded data (typically obtained directly from a fax modem).
-By default, each row of data in the resultant
-.SM TIFF
-file is 1-dimensionally encoded and
-padded or truncated to 1728 pixels, as needed.
-The resultant image is a set of low resolution (98 lines/inch)
-or medium resolution (196 lines/inch)
-pages, each of which is a single strip of data.
-The generated file conforms to the
-.SM TIFF
-Class F (\c
-.SM FAX\c
-) specification for storing facsimile data.
-This means, in particular, that each page of the data does
-.B not
-include the trailing 
-.I "return to control"
-(\c
-.SM RTC\c
-) code; as required
-for transmission by the
-.SM CCITT
-Group 3 specifications.
-The old, ``classic'', format is created if the
-.B \-c
-option is used.
-(The Class F format can also be requested with the
-.B \-f
-option.)
-.PP
-The default name of the output image is
-.IR fax.tif ;
-this can be changed with the
-.B \-o
-option.
-Each input file is assumed to be a separate page of facsimile data
-from the same document.
-The order in which input files are specified on the command
-line is the order in which the resultant pages appear in the
-output file.
-.SH OPTIONS
-Options that affect the interpretation of input data are:
-.TP
-.B \-3
-Assume input data is
-.SM CCITT
-Group 3 encoded (default).
-.TP
-.B \-4
-Assume input data is
-.SM CCITT
-Group 4 encoded.
-.TP
-.B \-U
-Assume input data is uncompressed (Group 3 or Group 4).
-.TP
-.B \-1
-Assume input data is encoded with the 1-dimensional version of the
-.SM CCITT
-Group 3 Huffman encoding algorithm (default).
-.TP
-.B \-2
-Assume input data is 2-dimensional version of the
-.SM CCITT
-Group 3 Huffman encoding algorithm.
-.TP
-.B \-P
-Assume input data is
-.B not
-EOL-aligned (default). This option has effect with Group 3 encoded input only.
-.TP
-.B \-A
-Assume input data is EOL-aligned. This option has effect with Group 3
-encoded input only.
-.TP
-.B \-M
-Treat input data as having bits filled from most significant bit (\c
-.SM MSB\c
-) to most least bit (\c
-.SM LSB\c
-).
-.TP
-.B \-L
-Treat input data as having bits filled from least significant bit (\c
-.SM LSB\c
-) to most significant bit (\c
-.SM MSB\c
-) (default).
-.TP
-.B \-B
-Assume input data was encoded with black as 0 and white as 1.
-.TP
-.B \-W
-Assume input data was encoded with black as 1 and white as 0 (default).
-.TP
-.B \-R
-Specify the vertical resolution, in lines/inch, of the input images.
-By default input are assumed to have a vertical resolution of 196 lines/inch.
-If images are low resolution facsimile, a value of 98 lines/inch should
-be specified.
-.TP
-.B \-X
-Specify the width, in pixels, of the input images.
-By default input are assumed to have a width of 1728 pixels.
-.PP
-Options that affect the output file format are:
-.TP
-.B \-o
-Specify the name of the output file.
-.TP
-.B \-7
-Force output to be compressed with the
-.SM CCITT
-Group 3 Huffman encoding algorithm (default).
-.TP
-.B \-8
-Force output to be compressed with the
-.SM CCITT
-Group 4 Huffman encoding.
-.TP
-.B \-u
-Force output to be uncompressed (Group 3 or Group 4).
-.TP
-.B \-5
-Force output to be encoded with the 1-dimensional version of the
-.SM CCITT
-Group 3 Huffman encoding algorithm.
-.TP
-.B \-6
-Force output to be encoded with the 2-dimensional version of the
-.SM CCITT
-Group 3 Huffman encoding algorithm (default).
-.TP
-.B \-a
-Force the last bit of each
-.I "End Of Line"
-(\c
-.SM EOL\c
-) code to land on a byte boundary (default). This ``zero padding'' will
-be reflected in the contents of the
-.I Group3Options
-tag of the resultant
-.SM TIFF
-file. This option has effect with Group 3 encoded output only.
-.TP
-.B \-p
-Do not EOL-align output. This option has effect with Group 3 encoded
-output only.
-.TP
-.B \-c
-Generate "classic" Group 3 TIFF format.
-.TP
-.B \-f
-Generate TIFF Class F (TIFF/F) format (default).
-.TP
-.B \-m
-Force output data to have bits filled from most significant bit (\c
-.SM MSB\c
-) to most least bit (\c
-.SM LSB\c
-).
-.TP
-.B \-l
-Force  output data to have bits filled from least significant bit (\c
-.SM LSB\c
-) to most significant bit (\c
-.SM MSB\c
-) (default).
-.TP
-.B \-s
-Stretch the input image vertically by writing each input row of
-data twice to the output file.
-.TP
-.B \-v
-Force
-.I fax2tiff
-to print the number of rows of data it retrieved from the input file.
-.SH DIAGNOSTICS
-The following warnings and errors come from the decoding
-routines in the library.
-.PP
-.BR "Warning, %s: Premature EOL at scanline %d (x %d).\en" .
-The input data had a row that was shorter than the expected width.
-The row is padded with white.
-.PP
-.BR "%s: Premature EOF at scanline %d (x %d).\en" .
-The decoder ran out of data in the middle of a scanline.
-The resultant row is padded with white.
-.PP
-.BR "%s: Bad code word at row %d, x %d\en" .
-An invalid Group 3 
-.I code
-was encountered while decoding the input file. 
-The row number and horizontal position is given.
-The remainder of the input row is discarded, while
-the corresponding output row is padded with white.
-.PP
-.BR "%s: Bad 2D code word at scanline %d.\en" .
-An invalid Group 4 or 2D Group 3
-.I code
-was encountered while decoding the input file. 
-The row number and horizontal position is given.
-The remainder of the input row is discarded, while
-the corresponding output row is padded with white.
-.SH BUGS
-Input data are assumed to have a a ``top left'' orientation;
-it should be possible to override this assumption
-from the command line.
-.SH "SEE ALSO"
-.I "\s-1CCITT\s+1 Recommendation T.4"
-(Standardization of Group 3 Facsimile Apparatus for Document Transmission).
-.PP
-.IR "The Spirit of TIFF Class F",
-an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
-.PP
-.IR tiffinfo (1),
-.IR tiffdither (1),
-.IR tiffgt (1),
-.IR libtiff (3).
diff --git a/tkimg1.3/libtiff/man/gif2tiff.1 b/tkimg1.3/libtiff/man/gif2tiff.1
deleted file mode 100644
index 26ebd8a..0000000
--- a/tkimg1.3/libtiff/man/gif2tiff.1
+++ /dev/null
@@ -1,78 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/gif2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH GIF2TIFF 1 "October 15, 1995"
-.SH NAME
-gif2tiff \- create a
-.SM TIFF
-file from a GIF87 format image file
-.SH SYNOPSIS
-.B gif2tiff
-[
-.I options
-]
-.I input.gif
-.I output.tif
-.SH DESCRIPTION
-.I Gif2tiff
-converts a file in the GIF87 format to
-.SM TIFF.
-The
-.SM TIFF
-image is created as a palette image, with samples
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5).
-These characteristics can overriden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm,
-.B "-c zip"
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH NOTES
-The program is based on Paul Haeberli's
-.I fromgif
-program which, in turn, is based on Marcel J.E. Mol's GIF reader.
-.SH BUGS
-Should have more options to control output format.
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/libtiff.3t b/tkimg1.3/libtiff/man/libtiff.3t
deleted file mode 100644
index d971c42..0000000
--- a/tkimg1.3/libtiff/man/libtiff.3t
+++ /dev/null
@@ -1,534 +0,0 @@
-.\" $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/libtiff.3t,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH INTRO 3T "August 21, 1997"
-.SH NAME
-libtiff \- introduction to
-.IR libtiff ,
-a library for reading and writing
-.SM TIFF
-files
-.SH SYNOPSIS
-.B "#include <tiffio.h>"
-.br
-cc file.c
-.B -ltiff
-.SH DESCRIPTION
-.I libtiff
-is a library for reading and writing data files encoded with the
-.I "Tag Image File"
-format, Revision 6.0 (or revision 5.0 or revision 4.0).
-This file format is suitable for archiving multi-color and
-monochromatic image data.
-.PP
-The library supports several compression algorithms, as indicated
-by the
-.I Compression
-field, including:
-no compression (1),
-.SM CCITT
-1D Huffman compression (2),
-.SM CCITT
-Group 3 Facsimile compression (3),
-.SM CCITT
-Group 4 Facsimile compression (4),
-Lempel-Ziv & Welch compression (5),
-baseline JPEG compression (7),
-word-aligned 1D Huffman compression (32771),
-and
-PackBits compression (32773).
-In addition, several nonstandard compression algorithms are supported:
-the 4-bit compression algorithm used
-by the
-.I ThunderScan
-program (32809) (decompression only),
-NeXT's 2-bit compression algorithm (32766) (decompression only),
-an experimental LZ-style algorithm known as Deflate (32946), and
-an experimental CIE LogLuv compression scheme designed for images
-with high dynamic range (32845 for LogL and 32845 for LogLuv).
-Directory information may be in either little- or big-endian byte
-order\-byte swapping is automatically done by the library.
-Data bit ordering may be either Most Significant Bit (\c
-.SM MSB\c
-) to Least Significant Bit (\c
-.SM LSB\c
-) or
-.SM LSB
-to
-.SM MSB.
-Finally, the library does not support files in which the
-.IR BitsPerSample ,
-.IR Compression ,
-.IR MinSampleValue ,
-or
-.IR MaxSampleValue
-fields are defined differently on a per-sample basis
-(in Rev. 6.0 the
-.I Compression
-tag is not defined on a per-sample basis, so this is immaterial).
-.SH "DATA TYPES"
-The library makes extensive use of C typedefs to promote portability.
-Two sets of typedefs are used, one for communication with clients
-of the library and one for internal data structures and parsing of the
-.SM TIFF
-format.
-The following typedefs are exposed to users either through
-function definitions or through parameters passed through the
-varargs interfaces.
-.in +.5i
-.sp 5p
-.ta +\w'typedef unsigned <\fIthing\fP> uint32;    'u
-.nf
-typedef unsigned short uint16;	16-bit unsigned integer
-typedef unsigned <\fIthing\fP> uint32;	32-bit unsigned integer
-.sp 5p
-typedef unsigned int ttag_t;	directory tag
-typedef uint16 tdir_t;	directory index
-typedef uint16 tsample_t;	sample number
-typedef uint32 tstrip_t;	strip number
-typedef uint32 ttile_t;	tile number
-typedef int32 tsize_t;	i/o size in bytes
-typedef void* tdata_t;	image data ref
-typedef void* thandle_t;	client data handle
-typedef int32 toff_t;	file offset
-.fi
-.sp 5p
-.in -.5i
-Note that
-.IR tstrip_t ,
-.IR ttile_t ,
-and
-.I tsize_t
-are constrained to be no more than 32-bit quantities by
-32-bit fields they are stored in in the
-.SM TIFF
-image.
-Likewise
-.I tsample_t
-is limited by the 16-bit field used to store the
-.I SamplesPerPixel
-tag.
-.I tdir_t
-constrains the maximum number of
-.SM IFDs
-that may appear in an image and may be an arbitrary size (w/o penalty). 
-.I ttag_t
-must be either int, unsigned int, pointer, or double because
-the library uses a varargs interface and
-.SM "ANSI C"
-restricts the type of the parameter before an ellipsis to be a
-promoted type.
-.I toff_t
-is defined as int32 because TIFF file offsets are (unsigned) 32-bit
-quantities.
-A signed value is used because some interfaces return \-1 on error.
-Finally, note that user-specified data references are
-passed as opaque handles and only cast at the lowest layers where
-their type is presumed.
-.SH "LIST OF ROUTINES"
-The following routines are part of the library.
-Consult specific manual pages for details on their operation.
-The manual page names listed below are for systems
-where the full function names can not be encoded in the filesystem;
-on most systems doing ``man function-name'' will work.
-.sp 5p
-.nf
-.ta \w'TIFFWriteEncodedStrip'u+2n +\w'Appears on Page'u+2n
-\fIName\fP	\fIAppears on Page\fP	\fIDescription\fP
-.sp 5p
-TIFFCheckpointDirectory writedir.3t	writes the current state of the directory
-TIFFCheckTile	tile.3t	very x,y,z,sample is within image
-TIFFCIELabToRGBInit	color.3t	initialize CIE L*a*b* 1976 to RGB conversion state
-TIFFCIELabToXYZ	color.3t	perform CIE L*a*b* 1976 to CIE XYZ conversion
-TIFFClientOpen	open.3t	open a file for reading or writing
-TIFFClose	close.3t	close an open file
-TIFFComputeStrip	strip.3t	return strip containing y,sample
-TIFFComputeTile	tile.3t	return tile containing x,y,z,sample
-TIFFCurrentDirectory	query.3t	return index of current directory
-TIFFCurrentRow	query.3t	return index of current scanline
-TIFFCurrentStrip	query.3t	return index of current strip
-TIFFCurrentTile	query.3t	return index of current tile
-TIFFDataWidth 	width.3t	return the size of TIFF data types
-TIFFError	error.3t	library error handler
-TIFFFdOpen	open.3t	open a file for reading or writing
-TIFFFileName	query.3t	return name of open file
-TIFFFileno	query.3t	return open file descriptor
-TIFFFindCODEC	codec.3t	find standard codec for the specific scheme
-TIFFFlush	flush.3t	flush all pending writes
-TIFFFlushData	flush.3t	flush pending data writes
-TIFFGetBitRevTable	swab.3t	return bit reversal table
-TIFFGetField	getfield.3t	return tag value in current directory
-TIFFGetFieldDefaulted	getfield.3t	return tag value in current directory
-TIFFGetMode	query.3t	return open file mode
-TIFFGetVersion	query.3t	return library version string
-TIFFIsCODECConfigured	codec.3t	check, whether we have working codec
-TIFFIsTiled	query.3t	return true if image data is tiled
-TIFFIsByteSwapped	query.3t	return true if image data is byte-swapped
-TIFFNumberOfStrips	strip.3t	return number of strips in an image
-TIFFNumberOfTiles	tile.3t	return number of tiles in an image
-TIFFOpen	open.3t	open a file for reading or writing
-TIFFPrintDirectory	print.3t	print description of the current directory
-TIFFReadBufferSetup	rdbuf.3t	specify i/o buffer for reading
-TIFFReadDirectory	readdir.3t	read the next directory
-TIFFReadEncodedStrip	rdestrip.3t	read and decode a strip of data
-TIFFReadEncodedTile	rdetile.3t	read and decode a tile of data
-TIFFReadRawStrip	rdrstrip.3t	read a raw strip of data
-TIFFReadRawTile	rdrtile.3t	read a raw tile of data
-TIFFReadRGBAImage	rdimage.3t	read an image into a fixed format raster
-TIFFReadScanline	readline.3t	read and decode a row of data
-TIFFReadTile	readtile.3t	read and decode a tile of data
-TIFFRegisterCODEC	codec.3t	override standard codec for the specific scheme
-TIFFReverseBits	swab.3t	reverse bits in an array of bytes
-TIFFRGBAImageBegin	rgbaimage.3t	setup decoder state for TIFFRGBAImageGet
-TIFFRGBAImageEnd	rgbaimage.3t	release TIFFRGBAImage decoder state
-TIFFRGBAImageGet	rgbaimage.3t	read and decode an image
-TIFFRGBAImageOK	rgbaimage.3t	is image readable by TIFFRGBAImageGet
-TIFFScanlineSize	size.3t	return size of a scanline
-TIFFSetDirectory	setdir.3t	set the current directory
-TIFFSetSubDirectory	setdir.3t	set the current directory
-TIFFSetErrorHandler	error.3t	set error handler function
-TIFFSetField	setfield.3t	set a tag's value in the current directory
-TIFFSetWarningHandler	error.3t	set warning handler function
-TIFFStripSize	strip.3t	returns size of a strip
-TIFFRawStripSize	strip.3t	returns the number of bytes in a raw strip
-TIFFSwabShort	swab.3t	swap bytes of short
-TIFFSwabLong	swab.3t	swap bytes of long
-TIFFSwabArrayOfShort	swab.3t	swap bytes of an array of shorts
-TIFFSwabArrayOfLong	swab.3t	swap bytes of an array of longs
-TIFFTileRowSize	size.3t	return size of a row in a tile
-TIFFTileSize	size.3t	return size of a tile
-TIFFUnRegisterCODEC	codec.3t	unregisters the codec
-TIFFVGetField	getfield.3t	return tag value in current directory
-TIFFVGetFieldDefaulted	getfield.3t	return tag value in current directory
-TIFFVSetField	setfield.3t	set a tag's value in the current directory
-TIFFVStripSize	strip.3t	returns the number of bytes in a strip
-TIFFWarning	warning.3t	library warning handler
-TIFFWriteDirectory	writedir.3t	write the current directory
-TIFFWriteEncodedStrip	wrestrip.3t	compress and write a strip of data
-TIFFWriteEncodedTile	wretile.3t	compress and write a tile of data
-TIFFWriteRawStrip	wrrstrip.3t	write a raw strip of data
-TIFFWriteRawTile	wrrtile.3t	write a raw tile of data
-TIFFWriteScanline	writeline.3t	write a scanline of data
-TIFFWriteTile	wrrtile.3t	compress and write a tile of data
-TIFFXYZToRGB	color.3t	perform CIE XYZ to RGB conversion
-TIFFYCbCrToRGBInit	color.3t	initialize YCbCr to RGB conversion state
-TIFFYCbCrtoRGB	color.3t	perform YCbCr to RGB conversion
-.fi
-.SH "TAG USAGE"
-The table below lists the
-.SM TIFF
-tags that are recognized and handled by the library.
-If no use is indicated in the table, then the library
-reads and writes the tag, but does not use it internally.
-Note that some tags are meaningful only when a particular
-compression scheme is being used; e.g.
-.I Group3Options
-is only useful if 
-.I Compression
-is set to
-.SM CCITT
-Group 3 encoding.
-Tags of this sort are considered
-.I codec-specific
-tags and the library does not recognize them except when the
-.I Compression
-tag has been previously set to the relevant compression scheme.
-.sp 5p
-.nf
-.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Value'u+2n +\w'R/W'u+2n
-\fITag Name\fP	\fIValue\fP	\fIR/W\fP	\fILibrary Use/Notes\fP
-.sp 5p
-.nf
-Artist	315	R/W
-BadFaxLines	326	R/W
-BitsPerSample	258	R/W	lots
-CellLength	265		parsed but ignored
-CellWidth	264		parsed but ignored
-CleanFaxData	327	R/W
-ColorMap	320	R/W
-ColorResponseUnit	300		parsed but ignored
-Compression	259	R/W	choosing codec
-ConsecutiveBadFaxLines	328	R/W
-Copyright       33432   R/W
-DataType	32996	R	obsoleted by SampleFormat tag
-DateTime	306	R/W
-DocumentName	269	R/W
-DotRange	336	R/W
-ExtraSamples	338	R/W	lots
-FaxRecvParams	34908	R/W
-FaxSubAddress	34909	R/W
-FaxRecvTime	34910	R/W
-FillOrder	266	R/W	control bit order
-FreeByteCounts	289		parsed but ignored
-FreeOffsets	288		parsed but ignored
-GrayResponseCurve	291		parsed but ignored
-GrayResponseUnit	290		parsed but ignored
-Group3Options	292	R/W	used by Group 3 codec
-Group4Options	293	R/W
-HostComputer	316	R/W
-ImageDepth	32997	R/W	tile/strip calculations
-ImageDescription 	270	R/W
-ImageLength	257	R/W	lots
-ImageWidth	256	R/W	lots
-InkNames	333	R/W
-InkSet	332	R/W
-JPEGTables	347	R/W	used by JPEG codec
-Make	271	R/W
-Matteing	32995	R	obsoleted by ExtraSamples tag
-MaxSampleValue	281	R/W
-MinSampleValue	280	R/W
-Model	272	R/W
-NewSubFileType	254	R/W	called SubFileType in spec
-NumberOfInks	334	R/W
-Orientation	274	R/W
-PageName	285	R/W
-PageNumber	297	R/W
-PhotometricInterpretation	262	R/W	used by Group 3 and JPEG codecs
-PlanarConfiguration	284	R/W	data i/o
-Predictor	317	R/W	used by LZW and Deflate codecs
-PrimaryChromacities	319	R/W
-ReferenceBlackWhite	532	R/W
-ResolutionUnit	296	R/W	used by Group 3 codec
-RowsPerStrip	278	R/W	data i/o
-SampleFormat	339	R/W
-SamplesPerPixel	277	R/W	lots
-SMinSampleValue	340	R/W
-SMaxSampleValue	341	R/W
-Software	305	R/W
-StoNits	37439	R/W
-StripByteCounts	279	R/W	data i/o
-StripOffsets	273	R/W	data i/o
-SubFileType	255	R/W	called OSubFileType in spec
-TargetPrinter	337	R/W
-Thresholding	263	R/W	
-TileByteCounts	324	R/W	data i/o
-TileDepth	32998	R/W	tile/strip calculations
-TileLength	323	R/W	data i/o
-TileOffsets	324	R/W	data i/o
-TileWidth	322	R/W	data i/o
-TransferFunction	301	R/W
-WhitePoint	318	R/W
-XPosition	286	R/W
-XResolution	282	R/W
-YCbCrCoefficients	529	R/W	used by TIFFRGBAImage support
-YCbCrPositioning	531	R/W	tile/strip size calulcations
-YCbCrSubsampling	530	R/W
-YPosition	286	R/W
-YResolution	283	R/W	used by Group 3 codec
-.SH "PSEUDO TAGS"
-In addition to the normal
-.SM TIFF
-tags the library supports a collection of 
-tags whose values lie in a range outside the valid range of 
-.SM TIFF
-tags.
-These tags are termed
-.I pseud-tags
-and are used to control various codec-specific functions within the library.
-The table below summarizes the defined pseudo-tags.
-.sp 5p
-.nf
-.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Codec'u+2n +\w'R/W'u+2n
-\fITag Name\fP	\fICodec\fP	\fIR/W\fP	\fILibrary Use/Notes\fP
-.sp 5p
-.nf
-TIFFTAG_FAXMODE	G3	R/W	general codec operation
-TIFFTAG_FAXFILLFUNC	G3/G4	R/W	bitmap fill function
-TIFFTAG_JPEGQUALITY	JPEG	R/W	compression quality control
-TIFFTAG_JPEGCOLORMODE	JPEG	R/W	control colorspace conversions
-TIFFTAG_JPEGTABLESMODE	JPEG	R/W	control contents of \fIJPEGTables\fP tag
-TIFFTAG_ZIPQUALITY	Deflate	R/W	compression quality level
-TIFFTAG_PIXARLOGDATAFMT	PixarLog	R/W	user data format
-TIFFTAG_PIXARLOGQUALITY	PixarLog	R/W	compression quality level
-TIFFTAG_SGILOGDATAFMT	SGILog	R/W	user data format
-.fi
-.TP
-.B TIFFTAG_FAXMODE
-Control the operation of the Group 3 codec.
-Possible values (independent bits that can be combined by
-or'ing them together) are:
-FAXMODE_CLASSIC
-(enable old-style format in which the
-.SM RTC
-is written at the end of the last strip),
-FAXMODE_NORTC
-(opposite of 
-FAXMODE_CLASSIC;
-also called
-FAXMODE_CLASSF),
-FAXMODE_NOEOL
-(do not write 
-.SM EOL
-codes at the start of each row of data),
-FAXMODE_BYTEALIGN
-(align each encoded row to an 8-bit boundary),
-FAXMODE_WORDALIGN
-(align each encoded row to an 16-bit boundary),
-The default value is dependent on the compression scheme; this
-pseudo-tag is used by the various G3 and G4 codecs to share code.
-.TP
-.B TIFFTAG_FAXFILLFUNC
-Control the function used to convert arrays of black and white
-runs to packed bit arrays.
-This hook can be used to image decoded scanlines in multi-bit
-depth rasters (e.g. for display in colormap mode)
-or for other purposes.
-The default value is a pointer to a builtin function that images
-packed bilevel data.
-.TP
-.B TIFFTAG_IPTCNEWSPHOTO
-Tag contaings image metadata per the IPTC newsphoto spec: Headline, 
-captioning, credit, etc... Used by most wire services. 
-.TP
-.B TIFFTAG_PHOTOSHOP
-Tag contains Photoshop captioning information and metadata. Photoshop 
-uses in parallel and redundantly alongside IPTCNEWSPHOTO information. 
-.TP
-.B TIFFTAG_JPEGQUALITY
-Control the compression quality level used in the baseline algorithm.
-Note that quality levels are in the range 0-100 with a default value of 75.
-.TP
-.B TIFFTAG_JPEGCOLORMODE
-Control whether or not conversion is done between
-RGB and YCbCr colorspaces.
-Possible values are:
-JPEGCOLORMODE_RAW
-(do not convert), and
-JPEGCOLORMODE_RGB
-(convert to/from RGB)
-The default value is JPEGCOLORMODE_RAW.
-.TP
-.B TIFFTAG_JPEGTABLESMODE
-Control the information written in the 
-.I JPEGTables
-tag.
-Possible values (independent bits that can be combined by
-or'ing them together) are:
-JPEGTABLESMODE_QUANT
-(include quantization tables),
-and
-JPEGTABLESMODE_HUFF
-(include Huffman encoding tables).
-The default value is JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF.
-.TP
-.B TIFFTAG_ZIPQUALITY
-Control the compression technique used by the Deflate codec.
-Quality levels are in the range 1-9 with larger numbers yielding better
-compression at the cost of more computation.
-The default quality level is 6 which yields a good time-space tradeoff.
-.TP
-.B TIFFTAG_PIXARLOGDATAFMT
-Control the format of user data passed
-.I in
-to the PixarLog codec when encoding and passed
-.I out
-from when decoding.
-Possible values are:
-PIXARLOGDATAFMT_8BIT
-for 8-bit unsigned pixels,
-PIXARLOGDATAFMT_8BITABGR
-for 8-bit unsigned ABGR-ordered pixels,
-PIXARLOGDATAFMT_11BITLOG
-for 11-bit log-encoded raw data,
-PIXARLOGDATAFMT_12BITPICIO
-for 12-bit PICIO-compatible data,
-PIXARLOGDATAFMT_16BIT
-for 16-bit signed samples,
-and
-PIXARLOGDATAFMT_FLOAT
-for 32-bit IEEE floating point samples.
-.TP
-.B TIFFTAG_PIXARLOGQUALITY
-Control the compression technique used by the PixarLog codec.
-This value is treated identically to TIFFTAG_ZIPQUALITY; see the
-above description.
-.TP
-.B TIFFTAG_SGILOGDATAFMT
-Control the format of client data passed 
-.I in
-to the SGILog codec when encoding and passed
-.I out
-from when decoding.
-Possible values are:
-SGILOGDATAFMT_FLTXYZ
-for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels,
-SGILOGDATAFMT_16BITLUV
-for 16-bit encoded Luv pixels,
-SGILOGDATAFMT_32BITRAW and SGILOGDATAFMT_24BITRAW
-for no conversion of data,
-SGILOGDATAFMT_8BITRGB
-for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data),
-SGILOGDATAFMT_FLTY
-for converting between LogL and 32-bit IEEE floating valued Y pixels,
-SGILOGDATAFMT_16BITL
-for 16-bit encoded L pixels,
-and
-SGILOGDATAFMT_8BITGRY
-for returning 8-bit greyscale data
-(valid only when decoding LogL-encoded data).
-.SH DIAGNOSTICS
-All error messages are directed through the
-.IR TIFFError
-routine.
-By default messages are directed to
-.B stderr
-in the form:
-.IR "module: message\en."
-Warning messages are likewise directed through the
-.IR TIFFWarning
-routine.
-.SH "SEE ALSO"
-.IR fax2tiff (1),
-.IR gif2tiff (1),
-.IR pal2rgb (1),
-.IR ppm2tiff (1),
-.IR rgb2ycbcr (1),
-.IR ras2tiff (1),
-.IR raw2tiff (1),
-.IR sgi2tiff (1),
-.IR tiff2bw (1),
-.IR tiffdither (1),
-.IR tiffdump (1),
-.IR tiffcp (1),
-.IR tiffcmp (1),
-.IR tiffgt (1),
-.IR tiffinfo (1),
-.IR tiffmedian (1),
-.IR tiffsplit (1),
-.IR tiffsv (1),
-.PP
-.IR "Tag Image File Format Specification \(em Revision 6.0" ,
-an Aldus Technical Memorandum.
-.PP
-.IR "The Spirit of TIFF Class F" ,
-an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
-.SH BUGS
-The library does not support multi-sample images
-where some samples have different bits/sample.
-.PP
-The library does not support random access to compressed data
-that is organized with more than one row per tile or strip.
-The library discards unknown tags.
-The library should do more validity checking of a directory's contents.
diff --git a/tkimg1.3/libtiff/man/pal2rgb.1 b/tkimg1.3/libtiff/man/pal2rgb.1
deleted file mode 100644
index 077aa18..0000000
--- a/tkimg1.3/libtiff/man/pal2rgb.1
+++ /dev/null
@@ -1,108 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/pal2rgb.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH PAL2RGB 1 "October 15, 1995"
-.SH NAME
-pal2rgb \- convert a palette color
-.SM TIFF
-image to a full color image
-.SH SYNOPSIS
-.B pal2rgb
-[
-.I options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I Pal2rgb
-converts a palette color
-.SM TIFF
-image to a full color image by
-applying the colormap of the palette image to each sample
-to generate a full color
-.SM RGB
-image.
-.SH OPTIONS
-Options that affect the interpretation of input data are:
-.TP
-.B \-C
-This option overrides the default behaviour of
-.I pal2rgb
-in determining whether or not
-colormap entries contain 16-bit or 8-bit values.
-By default the colormap is inspected and
-if no colormap entry greater than 255 is found,
-the colormap is assumed to have only 8-bit values; otherwise
-16-bit values (as required by the
-.SM TIFF
-specification) are assumed.
-The
-.B \-C
-option can be used to explicitly specify the number of
-bits for colormap entries:
-.B "\-C 8"
-for 8-bit values, 
-.B "\-C 16"
-for 16-bit values.
-.PP
-Options that affect the output file format are:
-.TP
-.B \-p
-Explicitly select the planar configuration used in organizing
-data samples in the output image:
-.B "\-p contig"
-for samples packed contiguously, and
-.B "\-p separate"
-for samples stored separately.
-By default samples are packed.
-.TP
-.B \-c
-Use the specific compression algorithm to encoded image data
-in the output file:
-.B "\-c packbits"
-for Macintosh Packbits,
-.B "\-c lzw"
-for Lempel-Ziv & Welch,
-.B "\-c zip"
-for Deflate,
-.B "\-c none"
-for no compression.
-If no compression-related option is specified, the input
-file's compression algorithm is used.
-.TP
-.B \-r
-Explicitly specify the number of rows in each strip of the
-output file.
-If the
-.B \-r
-option is not specified, a number is selected such that each
-output strip has approximately 8 kilobytes of data in it.
-.SH BUGS
-Only 8-bit images are handled.
-.SH "SEE ALSO"
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/ppm2tiff.1 b/tkimg1.3/libtiff/man/ppm2tiff.1
deleted file mode 100644
index a58332c..0000000
--- a/tkimg1.3/libtiff/man/ppm2tiff.1
+++ /dev/null
@@ -1,97 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/ppm2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH PPM2TIFF 1 "October 15, 1995"
-.SH NAME
-ppm2tiff \- create a
-.SM TIFF
-file from a 
-.SM PPM
-image file
-.SH SYNOPSIS
-.B ppm2tiff
-[
-.I options
-] [
-.I input.ppm
-]
-.I output.tif
-.SH DESCRIPTION
-.I ppm2tiff
-converts a file in the 
-.SM PPM
-image format to
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can be overriden, or explicitly specified
-with the options described below
-.PP
-If the
-.SM PPM
-file contains greyscale data, then the
-.I PhotometricInterpretation
-tag is set to 1 (min-is-black),
-otherwise it is set to 2 (RGB).
-.PP
-If no
-.SM PPM
-file is specified on the command line,
-.I ppm2tiff
-will read from the standard input.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm (the default),
-.B "-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch compression.
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.TP
-.B \-R
-Mark the resultant image to have the specified
-X and Y resolution (in dots/inch).
-.SH "SEE ALSO"
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/ras2tiff.1 b/tkimg1.3/libtiff/man/ras2tiff.1
deleted file mode 100644
index ffe431c..0000000
--- a/tkimg1.3/libtiff/man/ras2tiff.1
+++ /dev/null
@@ -1,92 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/ras2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH RAS2TIFF 1 "October 15, 1995"
-.SH NAME
-ras2tiff \- create a
-.SM TIFF
-file from a Sun rasterfile
-.SH SYNOPSIS
-.B ras2tiff
-[
-.I options
-]
-.I input.ras
-.I output.tif
-.SH DESCRIPTION
-.I ras2tiff
-converts a file in the Sun rasterfile format to
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can overriden, or explicitly specified
-with the options described below.
-.PP
-Any colormap information in the rasterfile is carried over to the
-.SM TIFF
-file by including a
-.I Colormap
-tag in the output file.
-If the rasterfile has a colormap, the
-.I PhotometricInterpretation
-tag is set to 3 (palette);
-otherwise it is set to 2 (RGB) if the depth
-is 24 or 1 (min-is-black) if the depth is not 24.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm,
-.B "-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH BUGS
-Does not handle all possible rasterfiles.
-In particular, 
-.I ras2tiff
-does not handle run-length encoded images.
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/raw2tiff.1 b/tkimg1.3/libtiff/man/raw2tiff.1
deleted file mode 100644
index 7cb8d93..0000000
--- a/tkimg1.3/libtiff/man/raw2tiff.1
+++ /dev/null
@@ -1,190 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/raw2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH RAW2TIFF 1 "15 September, 2002"
-.SH NAME
-raw2tiff \- create a
-.SM TIFF
-file from a raw data
-.SH SYNOPSIS
-.B raw2tiff
-[
-.I options
-]
-.I input.raw
-.I output.tif
-.SH DESCRIPTION
-.I raw2tiff
-converts a raw byte sequence into
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the PackBits algorithm (\c
-.IR Compression = 32773),
-and with each strip no more than 8 kilobytes.
-These characteristics can overridden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-H <number>
-size of input image file header in bytes (0 by default). This amount of data
-just will be skipped from the start of file while reading.
-.TP
-.B \-w <number>
-width of input image in pixels (can be guessed, see
-.SM
-.B "GUESSING THE IMAGE GEOMETRY"
-below).
-.TP
-.B \-l <number>
-length of input image in lines(can be guessed, see
-.SM
-.B "GUESSING THE IMAGE GEOMETRY"
-below).
-.TP
-.B \-b <number>
-number of bands in input image (1 by default).
-.TP
-.B \-d data_type
-type of samples in input image, where
-.B data_type
-may be:
-.br
-.I byte\t\t
-8-bit unsigned integer (default),
-.br
-.I short\t
-16-bit unsigned integer,
-.br
-.I long\t\t
-32-bit unsigned integer,
-.br
-.I sbyte\t
-8-bit signed integer,
-.br
-.I sshort\t
-16-bit signed integer,
-.br
-.I slong\t
-32-bit signed integer,
-.br
-.I float\t
-32-bit IEEE floating point,
-.br
-.I double\t
-64-bit IEEE floating point,
-.TP
-.B \-i config
-type of samples interleaving in input image, where
-.B config
-may be:
-.br
-.I pixel\t
-pixel interleaved data (default),
-.br
-.I band\t\t
-band interleaved data.
-.TP
-.B \-p photo
-photometric interpretation (color space) of the input image, where
-.B photo
-may be:
-.br
-.I miniswhite
-white color represented with 0 value,
-.br
-.I minisblack
-black color represented with 0 value (default),
-.br
-.I rgb\t\t
-image has RGB color model,
-.br
-.I cmyk\t\t
-image has CMYK (separated) color model,
-.br
-.I ycbcr\t\t
-image has YCbCr color model,
-.br
-.I cielab\t
-image has CIE L*a*b color model,
-.br
-.I icclab\t
-image has ICC L*a*b color model,
-.br
-.I itulab\t
-image has ITU L*a*b color model,
-.TP
-.B \-s
-swap bytes fetched from the input file.
-.TP
-.B \-L
-input data has LSB2MSB bit order (default).
-.TP
-.B \-M
-input data has MSB2LSB bit order.
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm (the default),
-.B "-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch.
-.TP
-.B \-r <number>
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH GUESSING THE IMAGE GEOMETRY
-.I raw2tiff
-can guess image width and height in case one or both of these parameters are
-not specified. If you omit one of those parameters, the complementary one will
-be calculated based on the file size (taking into account header size, number
-of bands and data type). If you omit both parameters, the statistical approach
-will be used. Utility will compute correlation coefficient between two lines
-at the image center using several appropriate line sizes and the highest
-absolute value of the coefficient will indicate the right line size. That is
-why you should be cautious with the very large images, because guessing
-process may take a while (depending on your system perfomance). Of course, the
-utility can't guess the header size, number of bands and data type, so it
-should be specified manually. If you don't know anything about your image,
-just try with the several combinations of those options.
-.P
-There is no magic, it is just a mathematical statistics, so it can be wrong
-in some cases. But for most ordinary images guessing method will work fine.
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/rgb2ycbcr.1 b/tkimg1.3/libtiff/man/rgb2ycbcr.1
deleted file mode 100644
index e67c1e5..0000000
--- a/tkimg1.3/libtiff/man/rgb2ycbcr.1
+++ /dev/null
@@ -1,100 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/rgb2ycbcr.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH RGB2YCBCR 1 "October 15, 1995"
-.SH NAME
-rgb2ycbcr \- convert non-YCbCr
-.SM TIFF
-images to a YCbCr
-.SM TIFF
-image
-.SH SYNOPSIS
-.B rgb2ycbcr
-[
-.I options
-]
-.I "src1.tif src2.tif ... dst.tif"
-.SH DESCRIPTION
-.I rgb2ycbcr
-converts
-.SM RGB
-color, greyscale, or bi-level
-.SM TIFF
-images to YCbCr images by
-transforming and sampling pixel data.
-If multiple files are specified on the command line
-each source file is converted to a separate directory
-in the destination file.
-.PP
-By default, chrominance samples are created by sampling
-2 by 2 blocks of luminance values; this can be changed with
-the
-.B \-h
-and
-.B \-v
-options.
-Output data are compressed with the
-.SM PackBits
-compression scheme, by default; an alternate scheme can be
-selected with the
-.B \-c
-option.
-By default, output data are compressed in strips with
-the number of rows in each strip selected so that the
-size of a strip is never more than 8 kilobytes;
-the
-.B \-r
-option can be used to explicitly set the number of
-rows per strip.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm (the default),
-.B "-c jpeg"
-for the JPEG compression algorithm,
-.B "-c zip"
-for the deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch.
-.TP
-.B \-h
-Set the horizontal sampling dimension to one of: 1, 2 (default), or 4.
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.TP
-.B \-v
-Set the vertical sampling dimension to one of: 1, 2 (default), or 4.
-.SH "SEE ALSO"
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/sgi2tiff.1 b/tkimg1.3/libtiff/man/sgi2tiff.1
deleted file mode 100644
index a25d602..0000000
--- a/tkimg1.3/libtiff/man/sgi2tiff.1
+++ /dev/null
@@ -1,90 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/sgi2tiff.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH SGI2TIFF 1 "October 15, 1995"
-.SH NAME
-sgi2tiff \- create a
-.SM TIFF
-file from an
-.SM SGI
-image file
-.SH SYNOPSIS
-.B sgi2tiff
-[
-.I options
-]
-.I input.rgb
-.I output.tif
-.SH DESCRIPTION
-.I sgi2tiff
-converts a file in the 
-.SM SGI
-image format to
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can overriden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm),
-.B "-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-p
-Explicitly select the planar configuration used in organizing
-data samples in the output image:
-.B "\-p contig"
-for samples packed contiguously, and
-.B "\-p separate"
-for samples stored separately.
-By default samples are packed.
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH BUGS
-Does not record colormap information.
-.SH "SEE ALSO"
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/thumbnail.1 b/tkimg1.3/libtiff/man/thumbnail.1
deleted file mode 100644
index c458bad..0000000
--- a/tkimg1.3/libtiff/man/thumbnail.1
+++ /dev/null
@@ -1,87 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/thumbnail.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1994-1997 Sam Leffler
-.\" Copyright (c) 1994-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH THUMBNAIL 1 "September 26, 1994"
-.SH NAME
-thumbnail \- create a
-.SM TIFF
-file with thumbnail images
-.SH SYNOPSIS
-.B thumbnail
-[
-.I options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I thumbnail
-is a program written to show how one might use the
-SubIFD tag (#330) to store thumbnail images.
-.I thumbnail
-copies a
-.SM TIFF
-Class F facsimile file to the output file
-and for each image an 8-bit greyscale 
-.IR "thumbnail sketch" .
-The output file contains the thumbnail image with the associated
-full-resolution page linked below with the SubIFD tag.
-.PP
-By default, thumbnail images are 216 pixels wide by 274 pixels high.
-Pixels are calculated by sampling and filtering the input image
-with each pixel value passed through a contrast curve.
-.SH OPTIONS
-.TP
-.B \-w
-Specify the width of thumbnail images in pixels.
-.TP
-.B \-h
-Specify the height of thumbnail images in pixels.
-.TP
-.B \-c
-Specify a contrast curve to apply in generating the thumbnail images.
-By default pixels values are passed through a linear contrast curve
-that simply maps the pixel value ranges.
-Alternative curves are:
-.B exp50
-for a 50% exponential curve,
-.B exp60
-for a 60% exponential curve,
-.B exp70
-for a 70% exponential curve,
-.B exp80
-for a 80% exponential curve,
-.B exp90
-for a 90% exponential curve,
-.B exp
-for a pure exponential curve,
-.B linear
-for a linear curve.
-.SH BUGS
-There are no options to control the format of the saved thumbnail images.
-.SH "SEE ALSO"
-.IR tiffdump (1),
-.IR tiffgt (1),
-.IR tiffinfo (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiff2bw.1 b/tkimg1.3/libtiff/man/tiff2bw.1
deleted file mode 100644
index 9eaf044..0000000
--- a/tkimg1.3/libtiff/man/tiff2bw.1
+++ /dev/null
@@ -1,91 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiff2bw.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFF2BW 1 "October 15, 1995"
-.SH NAME
-tiff2bw \- convert a color
-.SM TIFF
-image to greyscale
-.SH SYNOPSIS
-.B tiff2bw
-[
-options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I Tiff2bw
-converts an
-.SM RGB
-or Palette color
-.SM TIFF
-image to a greyscale image by
-combining percentages of the red, green, and blue channels.
-By default, output samples are created by taking
-28% of the red channel, 59% of the green channel, and 11% of
-the blue channel.
-To alter these percentages, the
-.BR \-R ,
-.BR \-G ,
-and
-.BR \-B
-options may be used.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "-c packbits"
-for the PackBits compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-.B "-c g3
-for the CCITT Group 3 compression algorithm,
-.B "-c g4
-for the CCITT Group 4 compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.TP
-.B \-R
-Specify the percentage of the red channel to use (default 28).
-.TP
-.B \-G
-Specify the percentage of the green channel to use (default 59).
-.TP
-.B \-B
-Specify the percentage of the blue channel to use (default 11).
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiff2pdf.1 b/tkimg1.3/libtiff/man/tiff2pdf.1
deleted file mode 100644
index 7010e5d..0000000
--- a/tkimg1.3/libtiff/man/tiff2pdf.1
+++ /dev/null
@@ -1,238 +0,0 @@
-.\" $Id: tiff2pdf.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\" 
-.\"  Copyright (c) 2003 Ross Finlayson
-.\" 
-.\"  Permission to use, copy, modify, distribute, and sell this software and 
-.\"  its documentation for any purpose is hereby granted without fee, provided
-.\"  that (i) the above copyright notices and this permission notice appear in
-.\"  all copies of the software and related documentation, and (ii) the name of
-.\"  Ross Finlayson may not be used in any advertising or
-.\"  publicity relating to the software without the specific, prior written
-.\"  permission of Ross Finlayson.
-.\"  
-.\"  THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\"  EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\"  WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\"  
-.\"  IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR
-.\"  ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\"  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\"  WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\"  LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\"  OF THIS SOFTWARE.
-.\" 
-.\" Process this file with
-.\" groff -man -Tascii tiff2pdf.1
-.\"
-.TH TIFF2PDF 1 "NOVEMBER 2003" "tiff2pdf"
-.SH NAME
-tiff2pdf - convert a TIFF image to a PDF document
-.SH SYNOPSIS
-.B tiff2pdf [
-.I options 
-.B ] 
-.I input.tiff
-.SH DESCRIPTION
-.B tiff2pdf
-opens a TIFF image and writes a PDF document to standard output.
-.PP
-The program converts one TIFF file to one PDF file, including multiple page 
-TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF 
-files that contain data of TIFF photometric interpretations of bilevel, 
-grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by 
-.I libtiff 
-and PDF.
-.PP
-If you have multiple TIFF files to convert into one PDF file then use 
-.I tiffcp 
-or other program to concatenate the files into a multiple page TIFF file.  
-If the input TIFF file is of huge dimensions (greater than 10000 pixels height
-or width) convert the input image to a tiled TIFF if it is not already.
-.PP
-The standard output is standard output.  Set the output file name with the 
-.BI -o output.pdf
-option.
-.PP
-All black and white files are compressed into a single strip CCITT G4 Fax
-compressed PDF, unless tiled, where tiled black and white images are
-compressed into tiled CCITT G4 Fax compressed PDF, 
-.I libtiff 
-CCITT support is assumed.
-.PP
-Color and grayscale data can be compressed using either JPEG compression,
-ITU-T T.81, or Zip/Deflate LZ77 compression.  Set the compression type using
-the 
-.B \-j
-or
-.B \-z
-options.  JPEG compression support 
-requires that 
-.I libtiff 
-be configured with JPEG support, and Zip/Deflate compression support requires
-that 
-.I libtiff 
-be configured with Zip support, in tiffconf.h.  Use only one or the other of 
-.B \-j
-and
-.B \-z.
-.PP
-If the input TIFF contains single strip CCITT G4 Fax compressed information, 
-then that is written to the PDF file without transcoding, unless the options 
-of no compression and no passthrough are set, 
-.B \-d
-and
-.B \-n.
-.PP
-If the input TIFF contains JPEG or single strip Zip/Deflate compressed 
-information, and they are configured, then that is written to the PDF file 
-without transcoding, unless the options of no compression and no passthrough 
-are set.
-.PP
-The default page size upon which the TIFF image is placed is determined by 
-the resolution and extent of the image data.  Default values for the TIFF 
-image resolution can be set using the
-.B \-x
-and
-.B \-y
-options.  The page size can be set using the
-.B \-p
-option for paper size, or
-.B \-w
-and
-.B \-l
-for paper width and length, then each page of the TIFF image is centered on
-its page.  The distance unit for default resolution and page width and
-length can be set by the
-.B \-u
-option, the default unit is inch.
-.PP
-Various items of the output document information can be set with the
-.B \-e,
-.B \-c, 
-.B \-a,
-.B \-t,
-.B \-s,
-and
-.B \-k
-options.  Setting the argument of the option to "" for these 
-tags causes the relevant document information field to be not written.  Some 
-of the document information values otherwise get their information from the 
-input TIFF image, the software, author, document name, and image description.
-.PP
-The Portable Document Format (PDF) specification is copyrighted by Adobe 
-Systems, Incorporated.
-.SH OPTIONS
-.TP
-.BI \-o output-file
-Set the output to go to file 
-.I output-file
-.TP
-.B \-j  
-Compress with JPEG (requires libjpeg configured with libtiff).
-.TP
-.B \-z  
-Compress with Zip/Deflate (requires zlib configured with libtiff).
-.TP
-.BI \-q quality
-Set the compression quality, 1-100 for JPEG.
-.TP
-.B \-n
-Do not allow data to be converted without uncompressing, no compressed
-data passthrough.
-.TP
-.B \-d  
-Do not compress (decompress).
-.TP
-.B \-i  
-Invert colors.
-.TP
-.BI \-p paper-size
-Set paper size, eg "letter", "legal", "A4".
-.TP
-.BI \-u [i|m]
-Set distance unit,
-.I i
-for inch, 
-.I m
-for centimeter.
-.TP
-.BI \-w width
-Set width in units.
-.TP
-.BI \-l length
-Set length in units.
-.TP
-.BI \-x xres
-Set x/width resolution default.
-.TP
-.BI \-y yres
-Set y/length resolution default.
-.TP
-.BI \-r [d|o]
-Set
-.I d
-for resolution default for images without resolution, 
-.I o for resolution override for all images.
-.TP
-.B \-f
-Set PDF "Fit Window" user preference
-.TP
-.BI \-e YYYYMMDDHHMMSS
-Set document information date, overrides image or current date/time default,
-.I YYYYMMDDHHMMSS.
-.TP
-.BI \-c creator
-Set document information creator, overrides image software default.
-.TP
-.BI \-a author
-Set document information author, overrides image artist default
-.TP
-.BI \-t title
-Set document information title, overrides image document name default
-.TP
-.BI \-s subject
-Set document information subject, overrides image image description default
-.TP
-.BI \-k keywords
-Set document information keywords.
-.TP
-.B \-h  
-List usage reminder to stderr and exit.
-.TP
-.SH EXAMPLES
-.TP
-The following example would generate the file output.pdf from input.tiff.
-.PP
-.RS
-.NF
-tiff2pdf -o output.pdf input.tiff
-.FI
-.RE
-.PP
-The following example would generate PDF output from input.tiff and write it 
-to standard output.
-.PP
-.RS
-.NF
-tiff2pdf input.tiff
-.FI
-.RE
-.PP
-The following example would generate the file output.pdf from input.tiff, 
-putting the image pages on a letter sized page, compressing the output 
-with JPEG, with JPEG quality 75, setting the title to "Document", and setting 
-the "Fit Window" option.
-.PP
-.RS
-.NF
-tiff2pdf -p letter -j -q 75 -t "Document" -f -o output.pdf input.tiff
-.FI
-.RE
-.SH BUGS
-Please report bugs via the web interface at 
-.IP
-\%http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff
-.SH "SEE ALSO"
-.BR libtiff (3) ,
-.BR tiffcp (1) , 
-.BR tiff2ps (1)
diff --git a/tkimg1.3/libtiff/man/tiff2ps.1 b/tkimg1.3/libtiff/man/tiff2ps.1
deleted file mode 100644
index 3e1286b..0000000
--- a/tkimg1.3/libtiff/man/tiff2ps.1
+++ /dev/null
@@ -1,248 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiff2ps.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
-.TH TIFF2PS 1 "January 27, 1997"
-.SH NAME
-tiff2ps \- convert a
-.SM TIFF
-image to \*(Ps\(tm
-.SH SYNOPSIS
-.B tiff2ps
-[
-.I options
-]
-.I "input.tif ..."
-.SH DESCRIPTION
-.I tiff2ps
-reads
-.SM TIFF
-images and writes \*(Ps or Encapsulated \*(Ps (EPS)
-on the standard output.
-By default,
-.I tiff2ps
-writes Encapsulated \*(Ps for the first image in the specified
-.SM TIFF
-image file.
-.PP
-By default,
-.I tiff2ps
-will generate \*(Ps that fills a printed area specified
-by the 
-.SM TIFF
-tags in the input file.
-If the file does not contain
-.I XResolution
-or
-.I YResolution
-tags, then the printed area is set according to the image dimensions.
-The
-.B \-w
-and
-.B \-h
-options (see below)
-can be used to set the dimensions of the printed area in inches;
-overriding any relevant
-.SM TIFF
-tags.
-.PP
-The \*(Ps generated for
-.SM RGB,
-palette, and
-.SM CMYK
-images uses the
-.I colorimage
-operator.
-The \*(Ps generated for
-greyscale and bilevel images
-uses the
-.I image
-operator.
-When the
-.I colorimage
-operator is used, \*(Ps code to emulate this operator
-on older \*(Ps printers is also generated.
-Note that this emulation code can be very slow.
-.PP
-Color images with associated alpha data are composited over
-a white background.
-.SH OPTIONS
-.TP
-.B \-1
-Generate \*(Ps Level 1 (the default).
-.TP
-.B \-2
-Generate \*(Ps Level 2.
-.TP
-.B \-3
-Generate \*(Ps Level 3. It basically allows one to use the /flateDecode
-filter for ZIP compressed TIFF images.
-.TP
-.B \-a
-Generate output for all IFDs (pages) in the input file.
-.TP
-.B \-b
-Specify the bottom margin for the output (in inches). This does not affect
-the height of the printed image.
-.TP
-.B \-c
-Center the image in the output. This option only shows an effect if both
-the -w and the -h option are given.
-.TP
-.B \-d
-Set the initial
-.SM TIFF
-directory to the specified directory number.
-(NB: directories are numbered starting at zero.)
-This option is useful for selecting individual pages in a
-multi-page (e.g. facsimile) file.
-.TP
-.B \-e
-Force the generation of Encapsulated \*(Ps (implies -z).
-.TP
-.B \-h
-Specify the vertical size of the printed area (in inches).
-.TP
-.B \-H
-Specify the maximum height of image (in inches). Images with larger sizes will
-be splitted in several pages. Option
-.B \-L
-may be used for specifying size of splitted images overlapping.
-.TP
-.B \-i
-Enable/disable pixel interpolation.  This option requires a
-single numeric value: zero to disable pixel interpolation and
-non-zero to enable.  The default is enabled.
-.TP
-.B \-L
-Specify the size of overlapping for splitted images (in inches). Used in
-conjuction with
-.B \-H
-option.
-.TP
-.B \-l
-Specify the left margin for the output (in inches). This does not affect
-the width of the printed image.
-.TP
-.B \-m
-Where possible render using the
-.B imagemask
-\*(Ps operator instead of the image operator.  When this option is specified
-.I tiff2ps
-will use
-.B imagemask
-for rendering 1 bit deep images.  If this option is not specified
-or if the image depth is greater than 1 then the image operator
-is used.
-.TP
-.B \-o
-Set the initial
-.SM TIFF
-directory to the
-.SM IFD
-at the specified file offset.
-This option is useful for selecting thumbnail images and the
-like which are hidden using the SubIFD tag.
-.TP
-.B \-p
-Force the generation of (non-Encapsulated) \*(Ps.
-.TP
-.B \-r
-Rotate image by 180 degrees.
-.TP
-.B \-s
-Generate output for a single IFD (page) in the input file.
-.TP
-.B \-w
-Specify the horizontal size of the printed area (in inches).
-.TP
-.B \-x
-Override resolution units specified in the TIFF as centimeters.
-.TP
-.B \-y
-Override resolution units specified in the TIFF as inches.
-.TP
-.B \-z
-When generating \*(Ps Level 2, data is scaled so that it does not
-image into the 
-.I deadzone
-on a page (the outer margin that the printing device is unable to mark).
-This option suppresses this behaviour.
-When \*(Ps Level 1 is generated, data is imaged to the entire printed
-page and this option has no affect.
-.SH EXAMPLES
-The following generates \*(Ps Level 2 for all pages of a facsimile:
-.RS
-.nf
-tiff2ps -a2 fax.tif | lpr
-.fi
-.RE
-Note also that if you have version 2.6.1 or newer of Ghostscript then you
-can efficiently preview facsimile generated with the above command.
-.PP
-To generate Encapsulated \*(Ps for a the image at directory 2
-of an image use:
-.RS
-.nf
-tiff2ps -d 1 foo.tif
-.fi
-.RE
-(notice that directories are numbered starting at zero.)
-.PP
-If you have a long image, it may be splitted in several pages:
-.RS
-.nf
-tiff2ps -h11 -w8.5 -H14 -L.5 foo.tif > foo.ps
-.fi
-.RE
-The page size is set to 8.5x11 by
-.B \-w
-and
-.B \-h
-options. We will accept a small amount of vertical compression, so
-.B \-H
-set to 14. Any pages between 11 and 14 inches will be fit onto one page.
-Pages longer than 14 inches are cut off at 11 and continued on the next
-page. The
-.B \-L.5
-option says to repeat a half inch on the next page (to improve readability).
-.SH BUGS
-Because \*(Ps does not support the notion of a colormap,
-8-bit palette images produce 24-bit \*(Ps images.
-This conversion results in output that is six times
-bigger than the original image and which takes a long time
-to send to a printer over a serial line.
-Matters are even worse for 4-, 2-, and 1-bit palette images.
-.SH BUGS
-Does not handle tiled images when generating PS Level I output.
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffgt (1),
-.IR tiffmedian (1),
-.IR tiff2bw (1),
-.IR tiffsv (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiff2rgba.1 b/tkimg1.3/libtiff/man/tiff2rgba.1
deleted file mode 100644
index aa68013..0000000
--- a/tkimg1.3/libtiff/man/tiff2rgba.1
+++ /dev/null
@@ -1,90 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiff2rgba.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFF2RGBA 1 "June 13, 2001"
-.SH NAME
-tiff2rgba \- convert a 
-.SM TIFF
-image to RGBA color space
-.SH SYNOPSIS
-.B tiff2rgba
-[
-options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I Tiff2rgba
-converts a wide variety of TIFF images into an RGBA TIFF image.  This 
-includes the ability to translate different color spaces and photometric
-interpretation into RGBA, support for alpha blending, and translation
-of many different bit depths into a 32bit RGBA image.
-.P
-Internally this program is implemented using the
-.I TIFFReadRGBAImage()
-function, and it suffers any limitations of that image.  This includes
-limited support for > 8 BitsPerSample images, and flaws with some
-esoteric combinations of BitsPerSample, photometric interpretation, 
-block organization and planar configuration.  
-.P
-The generated images are stripped images with four samples per pixel 
-(red, green, blue and alpha) or if the -n flag is used, three samples
-per pixel (red, green, and blue).  The resulting images are always planar
-configuration contiguous.  For this reason, this program is a useful utility
-for transform exotic TIFF files into a form ingestable by almost any TIFF
-supporting software. 
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression (the default),
-.B "-c packbits"
-for the PackBits compression algorithm,
-.B "-c zip
-for the Deflate compression algorithm,
-.B "-c jpeg
-for the JPEG compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch.
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.TP
-.B \-b
-Process the image one block (strip/tile) at a time instead of by reading
-the whole image into memory at once.  This may be necessary for very large
-images on systems with limited RAM.
-.TP
-.B \-n
-Drop the alpha component from the output file, producing a pure RGB file.
-Currently this does not work if the -b flag is also in effect.
-.SH "SEE ALSO"
-.IR tiff2bw (1),
-.IR TIFFReadRGBAImage (3t),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffcmp.1 b/tkimg1.3/libtiff/man/tiffcmp.1
deleted file mode 100644
index b54006c..0000000
--- a/tkimg1.3/libtiff/man/tiffcmp.1
+++ /dev/null
@@ -1,83 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffcmp.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFCMP 1 "September 26, 1994"
-.SH NAME
-tiffcmp \- compare two
-.SM TIFF
-files
-.SH SYNOPSIS
-.B tiffcmp
-[
-.I options
-]
-.I "file1.tif file2.tif"
-.SH DESCRIPTION
-.I Tiffcmp
-compares the tags and data in two files created according
-to the Tagged Image File Format, Revision 6.0.
-The schemes used for compressing data in each file
-are immaterial when data are compared\-data are compared on
-a scanline-by-scanline basis after decompression.
-Most directory tags are checked; notable exceptions are:
-.IR GrayResponseCurve ,
-.IR ColorResponseCurve ,
-and
-.IR ColorMap
-tags.
-Data will not be compared if any of the
-.IR BitsPerSample ,
-.IR SamplesPerPixel ,
-or
-.I ImageWidth
-values are not equal.
-By default,
-.I tiffcmp
-will terminate if it encounters any difference.
-.SH OPTIONS
-.TP
-.B \-l
-List each byte of image data that differs between the files.
-.TP
-.B \-z number
-List specified number of image data bytes that differs between the files.
-.TP
-.B \-t
-Ignore any differences in directory tags.
-.SH BUGS
-Tags that are not recognized by the library are not
-compared; they may also generate spurious diagnostics.
-.PP
-The image data of tiled files is not compared, since the TIFFReadScanline()
-function is used.  A error will be reported for tiled files.
-.PP
-The pixel and/or sample number reported in differences may be off
-in some exotic cases. 
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffcp.1 b/tkimg1.3/libtiff/man/tiffcp.1
deleted file mode 100644
index c3c7dd2..0000000
--- a/tkimg1.3/libtiff/man/tiffcp.1
+++ /dev/null
@@ -1,270 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffcp.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFCP 1 "February 18, 2001"
-.SH NAME
-tiffcp \- copy (and possibly convert) a
-.SM TIFF
-file
-.SH SYNOPSIS
-.B tiffcp
-[
-.I options
-]
-.I "src1.tif ... srcN.tif dst.tif"
-.SH DESCRIPTION
-.I tiffcp
-combines one or more files created according
-to the Tag Image File Format, Revision 6.0
-into a single
-.SM TIFF
-file.
-Because the output file may be compressed using a different
-algorithm than the input files,
-.I tiffcp
-is most often used to convert between different compression
-schemes.
-.PP
-By default, 
-.I tiffcp
-will copy all the understood tags in a
-.SM TIFF
-directory of an input
-file to the associated directory in the output file.
-.PP
-.I tiffcp
-can be used to reorganize the storage characteristics of data
-in a file, but it is explicitly intended to not alter or convert
-the image data content in any way.
-.SH OPTIONS
-.TP
-.B \-b image
-subtract the following monochrome image from all others
-processed.  This can be used to remove a noise bias
-from a set of images.  This bias image is typlically an
-image of noise the camera saw with its shutter closed.
-.TP
-.B \-B
-Force output to be written with Big-Endian byte order.
-This option only has an effect when the output file is created or
-overwritten and not when it is appended to.
-.TP
-.B \-C
-Suppress the use of ``strip chopping'' when reading images
-that have a single strip/tile of uncompressed data.
-.TP
-.B \-c
-Specify the compression to use for data written to the output file:
-.B none 
-for no compression,
-.B packbits
-for PackBits compression,
-.B lzw
-for Lempel-Ziv & Welch compression,
-.B jpeg
-for baseline JPEG compression,
-.B zip
-for Deflate compression,
-.B g3
-for CCITT Group 3 (T.4) compression,
-and
-.B g4
-for CCITT Group 4 (T.6) compression.
-By default
-.I tiffcp
-will compress data according to the value of the
-.I Compression
-tag found in the source file.
-.IP
-The
-.SM CCITT
-Group 3 and Group 4 compression algorithms can only
-be used with bilevel data.
-.IP
-Group 3 compression can be specified together with several
-T.4-specific options:
-.B 1d
-for 1-dimensional encoding,
-.B 2d
-for 2-dimensional encoding,
-and
-.B fill
-to force each encoded scanline to be zero-filled so that the
-terminating EOL code lies on a byte boundary.
-Group 3-specific options are specified by appending a ``:''-separated
-list to the ``g3'' option; e.g.
-.B "\-c g3:2d:fill"
-to get 2D-encoded data with byte-aligned EOL codes.
-.IP
-.SM LZW
-compression can be specified together with a 
-.I predictor
-value.
-A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value
-of 1 forces each scanline to be encoded without differencing.
-LZW-specific options are specified by appending a ``:''-separated
-list to the ``lzw'' option; e.g.
-.B "\-c lzw:2"
-for
-.SM LZW
-compression with horizontal differencing.
-.TP
-.B \-f
-Specify the bit fill order to use in writing output data.
-By default,
-.I tiffcp
-will create a new file with the same fill order as the original.
-Specifying
-.B "\-f lsb2msb"
-will force data to be written with the FillOrder tag set to
-.SM LSB2MSB,
-while
-.B "\-f msb2lsb"
-will force data to be written with the FillOrder tag set to
-.SM MSB2LSB.
-.TP
-.B \-l
-Specify the length of a tile (in pixels).
-.I tiffcp
-attempts to set the tile dimensions so
-that no more than 8 kilobytes of data appear in a tile.
-.TP
-.B \-L
-Force output to be written with Little-Endian byte order.
-This option only has an effect when the output file is created or
-overwritten and not when it is appended to.
-.TP
-.B \-M
-Suppress the use of memory-mapped files when reading images.
-.TP
-.B \-p
-Specify the planar configuration to use in writing image data
-that has one 8-bit sample per pixel.
-By default,
-.I tiffcp
-will create a new file with the same planar configuration as
-the original.
-Specifying
-.B "\-p contig"
-will force data to be written with multi-sample data packed
-together, while
-.B "\-p separate"
-will force samples to be written in separate planes.
-.TP
-.B \-r
-Specify the number of rows (scanlines) in each strip of data
-written to the output file.
-By default (or when value
-.B 0
-is specified),
-.I tiffcp
-attempts to set the rows/strip
-that no more than 8 kilobytes of data appear in a strip. If you specify
-special value
-.B -1
-it will results in infinite number of the rows per strip. The entire image
-will be the one strip in that case.
-.TP
-.B \-s
-Force the output file to be written with data organized in strips
-(rather than tiles).
-.TP
-.B \-t
-Force the output file to be written wtih data organized in tiles
-(rather than strips).
-options can be used to force the resultant image to be written
-as strips or tiles of data, respectively.
-.TP
-.B \-w
-Specify the width of a tile (in pixels).
-.I tiffcp
-attempts to set the tile dimensions so
-that no more than 8 kilobytes of data appear in a tile.
-.I tiffcp
-attempts to set the tile dimensions so
-that no more than 8 kilobytes of data appear in a tile.
-.TP
-.B \-,={character}
-substitute {character} for ',' in parsing image directory indices
-in files.  This is necessary if filenames contain commas.
-Note that ',=' with whitespace immediately following will disable
-the special meaning of the ',' entirely.  See examples.
-.SH EXAMPLES
-The following concatenates two files and writes the result using 
-.SM LZW
-encoding:
-.RS
-.nf
-tiffcp -c lzw a.tif b.tif result.tif
-.fi
-.RE
-.PP
-To convert a G3 1d-encoded 
-.SM TIFF
-to a single strip of G4-encoded data the following might be used:
-.RS
-.nf
-tiffcp -c g4 -r 10000 g3.tif g4.tif
-.fi
-.RE
-(1000 is just a number that is larger than the number of rows in
-the source file.)
-
-To extract a selected set of images from a multi-image
-TIFF file, the file name may be immediately followed by a ',' 
-separated list of image directory indices.  The first image
-is always in directory 0.  Thus, to copy the 1st and 3rd
-images of image file "album.tif" to "result.tif":
-.RS
-.nf
-tiffcp album.tif,0,2 result.tif
-.fi
-.RE
-
-Given file "CCD.tif" whose first image is a noise bias
-followed by images which include that bias,
-subtract the noise from all those images following it
-(while decompressing) with the command:
-.RS
-.nf
-tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
-.fi
-.RE
-
-If the file above were named "CCD,X.tif", the "-,=" option would
-be required to correctly parse this filename with image numbers,
-as follows:
-.RS
-.nf
-tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcmp (1),
-.IR tiffmedian (1),
-.IR tiffsplit (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffdither.1 b/tkimg1.3/libtiff/man/tiffdither.1
deleted file mode 100644
index c2c3424..0000000
--- a/tkimg1.3/libtiff/man/tiffdither.1
+++ /dev/null
@@ -1,125 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffdither.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFDITHER 1 "October 15, 1995"
-.SH NAME
-tiffdither \- convert a greyscale image to bilevel using dithering
-.SH SYNOPSIS
-.B tiffdither
-[
-.I options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I tiffdither
-converts a single channel 8-bit greyscale image to a bilevel image
-using Floyd-Steinberg error propagation with threholding.
-.SH OPTIONS
-.TP
-.B \-c
-Specify the compression to use for data written to the output file:
-.B none 
-for no compression,
-.B packbits
-for PackBits compression,
-.B lzw
-for Lempel-Ziv & Welch compression,
-.B zip
-for Deflate compression,
-.B g3
-for CCITT Group 3 (T.4) compression,
-and
-.B g4
-for CCITT Group 4 (T.6) compression.
-By default
-.I tiffdither
-will compress data according to the value of the
-.I Compression
-tag found in the source file.
-.IP
-The
-.SM CCITT
-Group 3 and Group 4 compression algorithms can only
-be used with bilevel data.
-.IP
-Group 3 compression can be specified together with several
-T.4-specific options:
-.B 1d
-for 1-dimensional encoding,
-.B 2d
-for 2-dimensional encoding,
-and
-.B fill
-to force each encoded scanline to be zero-filled so that the
-terminating EOL code lies on a byte boundary.
-Group 3-specific options are specified by appending a ``:''-separated
-list to the ``g3'' option; e.g.
-.B "\-c g3:2d:fill"
-to get 2D-encoded data with byte-aligned EOL codes.
-.IP
-.SM LZW
-compression can be specified together with a 
-.I predictor
-value.
-A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value
-of 1 forces each scanline to be encoded without differencing.
-LZW-specific options are specified by appending a ``:''-separated
-list to the ``lzw'' option; e.g.
-.B "\-c lzw:2"
-for
-.SM LZW
-compression with horizontal differencing.
-.TP
-.B \-f
-Specify the bit fill order to use in writing output data.
-By default,
-.I tiffdither
-will create a new file with the same fill order as the original.
-Specifying
-.B "\-f lsb2msb"
-will force data to be written with the FillOrder tag set to
-.SM LSB2MSB ,
-while
-.B "\-f msb2lsb"
-will force data to be written with the FillOrder tag set to
-.SM MSB2LSB .
-.TP
-.B \-t
-Set the threshold value for dithering.
-By default the threshold value is 128.
-.SH NOTES
-The dither algorithm is taken from the
-.IR tiffmedian (1)
-program (written by Paul Heckbert).
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR fax2tiff (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiff2bw (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffdump.1 b/tkimg1.3/libtiff/man/tiffdump.1
deleted file mode 100644
index 28cbb22..0000000
--- a/tkimg1.3/libtiff/man/tiffdump.1
+++ /dev/null
@@ -1,74 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffdump.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFDUMP 1 "October 15, 1995"
-.SH NAME
-tiffdump \- print verbatim information about
-.SM TIFF
-files
-.SH SYNOPSIS
-.B tiffdump
-[
-.I options
-]
-.I "name \&..."
-.SH DESCRIPTION
-.I tiffdump
-displays directory information from files created according
-to the Tag Image File Format, Revision 6.0.
-The header of each
-.SM TIFF
-file (magic number, version, and first directory offset)
-is displayed, followed by the tag contents of each directory in the file.
-For each tag, the name, datatype, count, and value(s) is displayed.
-When the symbolic name for a tag or datatype is known, the symbolic
-name is displayed followed by it's numeric (decimal) value.
-Tag values are displayed enclosed in ``<>'' characters immediately
-preceded by the value of the count field.
-For example, an
-.I ImageWidth
-tag might be displayed as ``ImageWidth (256) SHORT (3) 1<800>''.
-.PP
-.I tiffdump
-is particularly useful for investigating the contents of
-.SM TIFF
-files that
-.I libtiff
-does not understand.
-.SH OPTIONS
-.TP
-.B \-h
-Force numeric data to be printed in hexadecimal rather than the
-default decimal.
-.TP
-.B \-o
-Dump the contents of the 
-.SM IFD
-at the a particular file offset.
-The file offset may be specified using the usual C-style syntax;
-i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
-.SH "SEE ALSO"
-.IR tiffinfo (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffgt.1 b/tkimg1.3/libtiff/man/tiffgt.1
deleted file mode 100644
index 0274d7d..0000000
--- a/tkimg1.3/libtiff/man/tiffgt.1
+++ /dev/null
@@ -1,242 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffgt.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFGT 1 "October 15, 1995"
-.SH NAME
-tiffgt \- display an image stored in a
-.SM TIFF
-file (Silicon Graphics version)
-.SH SYNOPSIS
-.B tiffgt
-[
-.I options
-]
-.I "input.tif ..."
-.SH DESCRIPTION
-.I tiffgt
-displays one or more images stored using the
-Tag Image File Format, Revision 6.0.
-Each image is placed in a fixed size window that the
-user must position on the display (unless configured
-otherwise through X defaults).
-If the display has fewer than 24 bitplanes, or if the
-image does not warrant full color, then
-.SM RGB
-color values are mapped to the closest values that exist in
-the colormap (this is done using the
-.I rgbi
-routine found in the graphics utility library
-.BR \-lgutil .)
-.PP
-.I tiffgt
-correctly handles files with any of the following characteristics:
-.sp .5
-.in +0.5i
-.ta \w'\fIPhotometricInterpretation\fP  'u
-.nf
-BitsPerSample	1, 2, 4, 8, 16
-SamplesPerPixel	1, 3, 4 (the 4th sample is ignored)
-PhotometricInterpretation	0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr)
-PlanarConfiguration	1 (contiguous), 2 (separate)
-Orientation	1 (top-left), 4 (bottom-left)
-.fi
-.in -0.5i
-.sp .5
-Data may be organized as strips or tiles and may be
-compressed with any of the compression algorithms supported
-by the 
-.IR libtiff (3)
-library.
-.PP
-For palette images (\c
-.IR PhotomatricInterpretation =3),
-.I tiffgt
-inspects the colormap values and assumes either 16-bit
-or 8-bit values according to the maximum value.
-That is, if no colormap entry greater than 255 is found,
-.I tiffgt
-assumes the colormap has only 8-bit values; otherwise
-it assumes 16-bit values.
-This inspection is done to handle old images written by
-previous (incorrect) versions of
-.IR libtiff .
-.PP
-.I tiffgt
-can be used to display multiple images one-at-a-time.
-The left mouse button switches the display to the first image in the
-.I next
-file in the list of files specified on the command line.
-The right mouse button switches to the first image in the
-.I previous
-file in the list.
-The middle mouse button causes the first image in the first file
-specified on the command line to be displayed.
-In addition the following keyboard commands are recognized:
-.TP
-.B b
-Use a
-.I PhotometricIntepretation
-of MinIsBlack in displaying the current image.
-.TP
-.B l
-Use a
-.I FillOrder
-of lsb-to-msb in decoding the current image.
-.TP
-.B m
-Use a
-.I FillOrder
-of msb-tolmsb in decoding the current image.
-.TP
-.B c
-Use a colormap visual to display the current image.
-.TP
-.B r
-Use a true color (24-bit RGB) visual to display the current image.
-.TP
-.B w
-Use a
-.I PhotometricIntepretation
-of MinIsWhite in displaying the current image.
-.TP
-.B W
-Toggle (enable/disable) display of warning messages from the
-.SM TIFF
-library when decoding images.
-.TP
-.B E
-Toggle (enable/disable) display of error messages from the
-.SM TIFF
-library when decoding images.
-.TP
-.B z
-Reset all parameters to their default settings (\c
-.IR FillOrder ,
-.IR PhotometricInterpretation ,
-handling of warnings and errors).
-.TP
-.B PageUp
-Display the previous image in the current file or the last
-image in the previous file.
-.TP
-.B PageDown
-Display the next image in the current file or the first image
-in the next file.
-.TP
-.B Home
-Display the first image in the current file.
-.TP
-.B End
-Display the last image in the current file (unimplemented).
-.SH OPTIONS
-.TP
-.B \-c
-Force image display in a colormap window.
-.TP
-.B \-d
-Specify an image to display by directory number.
-By default the first image in the file is displayed.
-Directories are numbered starting at zero.
-.TP
-.B \-e
-Enable reporting of error messages from the 
-.SM TIFF
-library.
-By default
-.I tiffgt
-silently ignores images that cannot be read.
-.TP
-.B \-f
-Force 
-.I tiffgt
-to run as a foreground process.
-By default
-.I tiffgt
-will place itself in the background once it has opened the
-requested image file.
-.TP
-.B \-l
-Force the presumed bit ordering to be
-.SM LSB
-to
-.SM MSB.
-.TP
-.B \-m
-Force the presumed bit ordering to be
-.SM MSB
-to
-.SM LSB.
-.TP
-.B \-o
-Specify an image to display by directory offset.
-By default the first image in the file is displayed.
-Directories offsets may be specified using C-style syntax;
-i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
-.TP
-.B \-p
-Override the value of the
-.I PhotometricInterpretation
-tag; the parameter may be one of:
-.IR miniswhite ,
-.IR minisblack ,
-.IR rgb ,
-.IR palette ,
-.IR mask ,
-.IR separated ,
-.IR ycbcr ,
-and
-.IR cielab .
-.TP
-.B \-r
-Force image display in a full color window.
-.TP
-.B \-s
-Stop on the first read error.
-By default all errors in the input data are ignored and 
-.I tiffgt
-does it's best to display as much of an image as possible.
-.TP
-.B \-w
-Enable reporting of warning messages from the 
-.SM TIFF
-library.
-By default
-.I tiffgt
-ignores warning messages generated when reading an image.
-.TP
-.B \-v
-Place information in the title bar describing
-what type of window (full color or colormap) is being
-used, the name of the input file, and the directory
-index of the image (if non-zero).
-By default, the window type is not shown in the title bar.
-.SH BUGS
-Images wider and taller than the display are silently truncated to avoid
-crashing old versions of the window manager.
-.SH "SEE ALSO"
-.IR tiffdump (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffinfo.1 b/tkimg1.3/libtiff/man/tiffinfo.1
deleted file mode 100644
index 9a214eb..0000000
--- a/tkimg1.3/libtiff/man/tiffinfo.1
+++ /dev/null
@@ -1,85 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffinfo.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFINFO 1 "January 27, 1997"
-.SH NAME
-tiffinfo \- print information about
-.SM TIFF
-files
-.SH SYNOPSIS
-.B tiffinfo
-[
-.I options
-]
-.I "input.tif \&..."
-.SH DESCRIPTION
-.I Tiffinfo
-displays information about files created according
-to the Tag Image File Format, Revision 6.0.
-By default, the contents of each
-.SM TIFF
-directory in each file
-is displayed, with the value of each tag shown symbolically
-(where sensible).
-.SH OPTIONS
-.TP
-.B \-c
-Display the colormap and color/gray response curves, if present.
-.TP
-.B \-D
-In addition to displaying the directory tags,
-read and decompress all the data in each image (but not display it).
-.TP
-.B \-d
-In addition to displaying the directory tags,
-print each byte of decompressed data in hexadecimal.
-.TP
-.B \-j
-Display any \s-2JPEG\s0-related tags that are present.
-.TP
-.B \-o
-Set the initial
-.SM TIFF
-directory according to the specified file offset.
-The file offset may be specified using the usual C-style syntax;
-i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
-.TP
-.B \-s
-Display the offsets and byte counts for each data strip in a directory.
-.TP
-.B \-z
-Enable strip chopping when reading image data.
-.TP
-.B \-#
-Set the initial
-.SM TIFF
-directory to
-.IR # .
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffcp (1),
-.IR tiffcmp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffmedian.1 b/tkimg1.3/libtiff/man/tiffmedian.1
deleted file mode 100644
index c40a37f..0000000
--- a/tkimg1.3/libtiff/man/tiffmedian.1
+++ /dev/null
@@ -1,109 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffmedian.1,v 1.1.1.1 2007/01/03 20:47:10 joye Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFMEDIAN 1 "October 15, 1995"
-.SH NAME
-tiffmedian \- apply the median cut algorithm to data in a
-.SM TIFF
-file
-.SH SYNOPSIS
-.B tiffmedian
-[
-.I options
-]
-.I input.tif
-.I output.tif
-.SH DESCRIPTION
-.I tiffmedian
-applies the median cut algorithm to an
-.SM RGB
-image in
-.I input.tif
-to generate a palette image that is written to
-.IR output.tif .
-The generated colormap has, by default, 256 entries.
-The image data is quantized by mapping each
-pixel to the closest color values in the colormap.
-.SH OPTIONS
-.TP
-.B \-c
-Specify the compression to use for data written to the output file:
-.B none 
-for no compression,
-.B packbits
-for PackBits compression,
-.B lzw
-for Lempel-Ziv & Welch compression,
-and
-.B zip
-for Deflate compression.
-By default
-.I tiffmedian
-will compress data according to the value of the
-.I Compression
-tag found in the source file.
-.IP
-.SM LZW
-compression can be specified together with a 
-.I predictor
-value.
-A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value
-of 1 forces each scanline to be encoded without differencing.
-LZW-specific options are specified by appending a ``:''-separated
-list to the ``lzw'' option; e.g.
-.B "\-c lzw:2"
-for
-.SM LZW
-compression with horizontal differencing.
-.TP
-.B \-C
-Specify the number of entries to use in the generated colormap.
-By default all 256 entries/colors are used.
-.TP
-.B \-f
-Apply Floyd-Steinberg dithering before selecting a colormap entry.
-.TP
-.B \-r
-Specify the number of rows (scanlines) in each strip of data
-written to the output file.
-By default,
-.I tiffmedian
-attempts to set the rows/strip
-that no more than 8 kilobytes of data appear in a strip.
-.SH NOTES
-This program is derived from Paul Heckbert's
-.I median
-program.
-.SH "SEE ALSO"
-.IR pal2rgb (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffcmp (1),
-.IR libtiff (3)
-.PP
-"Color Image Quantization for Frame Buffer Display", Paul
-Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
diff --git a/tkimg1.3/libtiff/man/tiffsplit.1 b/tkimg1.3/libtiff/man/tiffsplit.1
deleted file mode 100644
index b871ca6..0000000
--- a/tkimg1.3/libtiff/man/tiffsplit.1
+++ /dev/null
@@ -1,66 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffsplit.1,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1992-1997 Sam Leffler
-.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFCP 1 "September 26, 1994"
-.SH NAME
-tiffsplit \- split a multi-image
-.SM TIFF
-into single-image
-.SM TIFF
-files
-.SH SYNOPSIS
-.B tiffsplit
-.I src.tif
-[
-.I prefix
-]
-.SH DESCRIPTION
-.I tiffsplit
-takes a multi-directory (page)
-.SM TIFF
-file and creates one or more single-directory (page)
-.SM TIFF
-files from it.
-The output files are given names created by concatenating
-a prefix, a lexically ordered
-suffix in the range [\fIaa\fP-\fIzz\fP], the suffix
-.I .tif 
-(e.g. 
-.IR xaa.tif ,
-.IR xab.tif ,
-\...
-.IR xzz.tif ).
-If a prefix is not specified on the command line,
-the default prefix of
-.I x
-is used.
-.SH OPTIONS
-None.
-.SH BUGS
-Only a select set of ``known tags'' is copied when spliting.
-.SH "SEE ALSO"
-.IR tiffcp (1),
-.IR tiffinfo (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/man/tiffsv.1 b/tkimg1.3/libtiff/man/tiffsv.1
deleted file mode 100644
index 291d0ce..0000000
--- a/tkimg1.3/libtiff/man/tiffsv.1
+++ /dev/null
@@ -1,139 +0,0 @@
-.\"	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/man/tiffsv.1,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
-.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and 
-.\" its documentation for any purpose is hereby granted without fee, provided
-.\" that (i) the above copyright notices and this permission notice appear in
-.\" all copies of the software and related documentation, and (ii) the names of
-.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
-.\" publicity relating to the software without the specific, prior written
-.\" permission of Sam Leffler and Silicon Graphics.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-.\" 
-.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-.\" OF THIS SOFTWARE.
-.\"
-.if n .po 0
-.TH TIFFSV 1 "October 15, 1995"
-.SH NAME
-tiffsv \- save an image from the framebuffer in a
-.SM TIFF
-file (Silicon Graphics version)
-.SH SYNOPSIS
-.B tiffsv
-[
-.I options
-]
-.I output.tif
-[
-.I "x1 x2 y1 y2"
-]
-.SH DESCRIPTION
-.I tiffsv
-saves all or part of the framebuffer in a file using the
-Tag Image File Format, Revision 6.0.
-By default, the image is saved with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can be overriden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-b
-Save the image as a greyscale image
-as if it were processed by 
-.IR tiff2bw (1).
-This option is included for compatibility with the standard
-.IR scrsave (6D)
-program.
-.TP
-.B \-c
-Specify the compression to use for data written to the output file:
-.B none 
-for no compression,
-.B packbits
-for PackBits compression,
-.B jpeg
-for baseline JPEG compression,
-.B zip
-for Deflate compression,
-and
-.B lzw
-for Lempel-Ziv & Welch compression (default).
-.IP
-.SM LZW
-compression can be specified together with a 
-.I predictor
-value.
-A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value
-of 1 forces each scanline to be encoded without differencing.
-LZW-specific options are specified by appending a ``:''-separated
-list to the ``lzw'' option; e.g.
-.B "\-c lzw:2"
-for
-.SM LZW
-compression with horizontal differencing.
-.TP
-.B \-p
-Specify the planar configuration to use in writing image data.
-By default,
-.I tiffsv
-will create a new file with the data samples packed contiguously.
-Specifying
-.B "\-p contig"
-will force data to be written with multi-sample data packed
-together, while
-.B "\-p separate"
-will force samples to be written in separate planes.
-.TP
-.B \-r
-Specify the number of rows (scanlines) in each strip of data
-written to the output file.
-By default,
-.I tiffsv
-attempts to set the rows/strip
-that no more than 8 kilobytes of data appear in a strip.
-.SH NOTE
-Except for the use of
-.SM TIFF,
-this program is equivalent to the standard
-.I scrsave
-program.
-This means, for example, that you can use it in conjunction with
-the standard
-.IR icut
-program simply by creating a link called
-.IR scrsave ,
-or by creating a shell script called
-.I scrsave
-that invokes
-.I tiffgt
-with the appropriate options.
-.SH BUGS
-If data are saved compressed and in separate planes, then the
-rows in each strip is silently set to one to avoid limitations
-in the
-.IR libtiff (3)
-library.
-.SH "SEE ALSO"
-.IR scrsave (6D)
-.IR pal2rgb (1),
-.IR tiffdump (1),
-.IR tiffgt (1),
-.IR tiffinfo (1),
-.IR tiffcp (1),
-.IR tiffmedian (1),
-.IR libtiff (3)
diff --git a/tkimg1.3/libtiff/port/Makefile.in b/tkimg1.3/libtiff/port/Makefile.in
deleted file mode 100644
index edbef4e..0000000
--- a/tkimg1.3/libtiff/port/Makefile.in
+++ /dev/null
@@ -1,68 +0,0 @@
-#! smake
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/port/Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-#
-# @WARNING@
-#
-# Tag Image File Format Library
-#
-# Copyright (c) 1995-1997 Sam Leffler
-# Copyright (c) 1995-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-SRCDIR	= @RELSRCDIR@/port
-VPATH	= @RELSRCDIR@/port
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
-
-SHELL	= @SCRIPT_SH@
-SCRIPT_SH = @SCRIPT_SH@
-NULL	=
-CC	= @CCOMPILER@
-AR	= @AR@
-AROPTS	= @AROPTS@
-RANLIB	= @RANLIB@
-
-IPATH	= -I. -I${SRCDIR}
-COPTS	= @GCOPTS@
-OPTIMIZER=@OPTIMIZER@
-CFLAGS	= @ENVOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH}
-
-CFILES	= @PORTFUNCS@
-OBJECTS	= ${CFILES:.c=.o}
-TARGETS	= libport.a
-
-default all: ${TARGETS}
-
-libport.a: ${OBJECTS}
-	@rm -f $@;
-	${AR} ${AROPTS} $@ ${OBJECTS}
-	${RANLIB} $@
-${PORT}/libport.a: libport.a
-
-install: default
-
-clean:
-	rm -f ${TARGETS} ${OBJECTS} core a.out
diff --git a/tkimg1.3/libtiff/port/getopt.c b/tkimg1.3/libtiff/port/getopt.c
deleted file mode 100644
index e25a74d..0000000
--- a/tkimg1.3/libtiff/port/getopt.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getopt.c	4.13 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-
-/*
- * get option letter from argument vector
- */
-int	opterr = 1,		/* if error message should be printed */
-	optind = 1,		/* index into parent argv vector */
-	optopt;			/* character checked for validity */
-char	*optarg;		/* argument associated with option */
-
-#define	BADCH	(int)'?'
-#define	EMSG	""
-
-int
-getopt(int nargc, char** nargv, char* ostr)
-{
-	static char *place = EMSG;		/* option letter processing */
-	register char *oli;			/* option letter list index */
-	char *p;
-
-	if (!*place) {				/* update scanning pointer */
-		if (optind >= nargc || *(place = nargv[optind]) != '-') {
-			place = EMSG;
-			return(EOF);
-		}
-		if (place[1] && *++place == '-') {	/* found "--" */
-			++optind;
-			place = EMSG;
-			return(EOF);
-		}
-	}					/* option letter okay? */
-	if ((optopt = (int)*place++) == (int)':' ||
-	    !(oli = strchr(ostr, optopt))) {
-		/*
-		 * if the user didn't specify '-' as an option,
-		 * assume it means EOF.
-		 */
-		if (optopt == (int)'-')
-			return(EOF);
-		if (!*place)
-			++optind;
-		if (opterr) {
-			if (!(p = strrchr(*nargv, '/')))
-				p = *nargv;
-			else
-				++p;
-			(void)fprintf(stderr, "%s: illegal option -- %c\n",
-			    p, optopt);
-		}
-		return(BADCH);
-	}
-	if (*++oli != ':') {			/* don't need argument */
-		optarg = NULL;
-		if (!*place)
-			++optind;
-	}
-	else {					/* need an argument */
-		if (*place)			/* no white space */
-			optarg = place;
-		else if (nargc <= ++optind) {	/* no arg */
-			place = EMSG;
-			if (!(p = strrchr(*nargv, '/')))
-				p = *nargv;
-			else
-				++p;
-			if (opterr)
-				(void)fprintf(stderr,
-				    "%s: option requires an argument -- %c\n",
-				    p, optopt);
-			return(BADCH);
-		}
-	 	else				/* white space */
-			optarg = nargv[optind];
-		place = EMSG;
-		++optind;
-	}
-	return(optopt);				/* dump back option letter */
-}
diff --git a/tkimg1.3/libtiff/port/install.sh.in b/tkimg1.3/libtiff/port/install.sh.in
deleted file mode 100644
index 40838af..0000000
--- a/tkimg1.3/libtiff/port/install.sh.in
+++ /dev/null
@@ -1,258 +0,0 @@
-#! @SCRIPT_SH@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/port/install.sh.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-#
-# @WARNING@
-#
-# HylaFAX Facsimile Software
-#
-# Copyright (c) 1990-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# HylaFAX is a trademark of Silicon Graphics
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# Warning, this file was automatically created by the HylaFAX configure script
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-#
-
-#
-# Shell script to emulate Silicon Graphics install program.
-# We emulate the non-standard interface used by install so
-# that we can build SGI inst packages on SGI systems.  Note
-# that we cannot emulate everything because we don't maintain
-# a history of installed software; thus we cannot tell when
-# configuration files have been modified and save old copies.
-#
-# NB: we don't do chown/chmod/chgrp by default; it must be
-#     explicitly set on the command line.
-#
-
-#
-# install [options] files ...
-# 
-# Options are:
-#
-# -o		save existing target foo as OLDfoo
-# -O		remove existing target foo, if it fails save as OLDfoo
-# -m mode	set mode of installed target
-# -u uid	set uid of installed target
-# -g gid	set gid of installed target
-# -root path	set ROOT directory for target pathnames
-# -dir		create directories
-# -fifo		create FIFO special files
-# -ln path	create hard link
-# -lns path	create symbolic link
-# -src path	source pathname different from target
-# -f dir	install files in the target directory ROOT/dir
-# -F dir	like -f, but create directories that do not exist
-# -v		echo actions
-# -idb stuff	specify package and, optionally, do special work
-#
-preopts=
-postopts=
-SaveFirst=no
-HasSource=yes
-RemoveFirst=no
-NoUpdate=no
-Suggested=no
-Updated=no
-
-CMD=cp
-SRC=
-FILES=
-DESTDIR=
-CHMOD=":"
-CHOWN=":"
-CHGRP=":"
-RM="rm -f"
-MV="mv @MV_F@"
-ECHO=echo
-VERBOSE=":"
-STRIP="@STRIP@"
-CMP=cmp
-
-TARGETS=
-while [ x"$1" != x ]
-do
-    arg=$1
-    case $arg in
-    -m)		shift; CHMOD="@CHMOD@ $1";;
-    -u)		shift; CHOWN="@CHOWN@ $1";;
-    -g)		shift; CHGRP="@CHGRP@ $1";;
-    -o)		SaveFirst=yes;;
-    -O)		RemoveFirst=yes; SaveFirst=yes;;
-    -root)	shift; ROOT=$1;;
-    -dir)	CMD="mkdir -p"; HasSource=no;
-		RM=":"; STRIP=":"
-		;;
-    -fifo)	CMD=@MKFIFO@; HasSource=no;
-		x=`echo $CMD | @SED@ 's;.*/;;'`;
-		test $x = mknod && postopts="p";
-		STRIP=":"
-		;;
-    -ln)	shift; CMD=@LN@; SRC="$1"
-		STRIP=":"
-		;;
-    -lns)	shift; CMD=@LN@; preopts="@LN_S@"; SRC="$1"
-		STRIP=":"
-		;;
-    -src)	shift; SRC="$1";;
-    -[fF])	shift; DESTDIR="$1";;
-    -idb)	shift; opt="$1"
-		case "$opt" in
-		*config\(update\)*)	Updated=yes;;
-		*config\(suggest\)*)	Suggested=yes;;
-		*config\(noupdate\)*)	NoUpdate=yes;;
-		*nostrip*)		STRIP=":";;
-		esac
-		;;
-    # these are skipped/not handled
-    -new|-rawidb|-blk|-chr) shift;;
-    -v)		VERBOSE=$ECHO;;
-    -*) 	;;
-    *)		TARGETS="$TARGETS $arg";;
-    esac
-    shift
-done
-
-
-if [ "$ROOT" != "" ] ; then
-  ROOT_PREFIX=${ROOT}/
-else
-  ROOT_PREFIX=
-fi
-if [ "$DESTDIR" != "" ] ; then
-  DESTDIR_PREFIX=${DESTDIR}/
-else
-  DESTDIR_PREFIX=
-fi
-
-#
-# Install the specified target.
-#
-install()
-{
-    src=$1 target=$2
-    if [ $RemoveFirst = yes -a -f $target ]; then
-	$VERBOSE "$RM $target"
-	$RM $target
-    fi
-    if [ $SaveFirst = yes -a -f $target ]; then
-	bf=`echo $src | @SED@ 's;.*/;;'`
-	$VERBOSE "$MV $target ${ROOT_PREFIX}${DESTDIR_PREFIX}OLD$bf"
-	$MV $target ${ROOT_PREFIX}${DESTDIR_PREFIX}OLD$bf
-    fi
-    if [ -z "$SRC" -a $HasSource = yes ]; then
-	$VERBOSE "$CMD $preopts $src $target $postopts"
-	$CMD $preopts $f $target $postopts
-    else
-	$VERBOSE "$CMD $preopts $SRC $target $postopts"
-	$CMD $preopts $SRC $target $postopts
-    fi
-    if [ $? -eq 0 ]; then
-	$VERBOSE "$CHOWN $target"
-	$CHOWN $target
-	$VERBOSE "$CHGRP $target"
-	$CHGRP $target
-	$VERBOSE "$CHMOD $target"
-	$CHMOD $target
-	if [ $STRIP != ":" -a -x ${ROOT_PREFIX}${DESTDIR_PREFIX}$f ]; then
-	    $STRIP $target >/dev/null 2>&1 || true
-	    $VERBOSE "$STRIP $target"
-	fi
-    fi
-}
-
-if [ $Suggested = yes ]; then
-    #
-    # A suggested file.  If an existing target does
-    # not exist, then install it.  Otherwise, install
-    # it as target.N if it's different from the current
-    # installed target.
-    #
-    # NB: cannot be used with a special file 'cuz we
-    #     use test -f to see if the file exists.
-    #
-    for f in $TARGETS; do
-	t=${ROOT_PREFIX}${DESTDIR_PREFIX}$f
-	if [ -f $t ]; then
-	    if [ -z "$SRC" -a $HasSource = yes ]; then
-		$CMP -s $f $t || {
-		    $ECHO "*** Warning, target has local changes, installing $f as $t.N"
-		    install $f $t.N;
-		}
-	    else
-		$CMP -s $SRC $t || {
-		    $ECHO "*** Warning, target has local changes, installing $f as $t.N"
-		    install $f $t.N
-		}
-	    fi
-	else
-	    install $f $t
-	fi
-    done
-elif [ $Updated = yes ]; then
-    #
-    # A file to be updated.  If an existing target does
-    # not exist, then install it.  Otherwise, install
-    # it as target and save the old version as target.O
-    # if the old version is different from the current
-    # installed target.
-    #
-    # NB: cannot be used with a special file 'cuz we
-    #     use test -f to see if the file exists.
-    #
-    for f in $TARGETS; do
-	t=${ROOT_PREFIX}${DESTDIR_PREFIX}$f
-	if [ -f $t ]; then
-	    if [ -z "$SRC" -a $HasSource = yes ]; then
-		$CMP -s $f $t || $MV $t $t.O
-	    else
-		$CMP -s $SRC $t || $MV $t $t.O
-	    fi
-	fi
-	install $f $t
-    done
-elif [ $NoUpdate = yes ]; then
-    #
-    # A file that is never to be updated; the target
-    # is created only if it does not exist.
-    #
-    # NB: cannot be used with a special file 'cuz we
-    #     use test -f to see if the file exists.
-    #
-    for f in $TARGETS; do
-	t=${ROOT_PREFIX}${DESTDIR_PREFIX}$f
-	test -f $t || install $f $t
-    done
-else
-    #
-    # Normal case, a target that should be installed
-    # with the existing copy, optionally, saved first.
-    #
-    for f in $TARGETS; do
-	install $f ${ROOT_PREFIX}${DESTDIR_PREFIX}$f
-    done
-fi
diff --git a/tkimg1.3/libtiff/port/irix/so_locations b/tkimg1.3/libtiff/port/irix/so_locations
deleted file mode 100644
index 9226d4f..0000000
--- a/tkimg1.3/libtiff/port/irix/so_locations
+++ /dev/null
@@ -1,4 +0,0 @@
-libtiff.so \
-		:st = .text 0x5ff70000, 0x00030000:\
-		:st = .data 0x5ffd0000, 0x00030000:\
-
diff --git a/tkimg1.3/libtiff/port/strcasecmp.c b/tkimg1.3/libtiff/port/strcasecmp.c
deleted file mode 100644
index 9678402..0000000
--- a/tkimg1.3/libtiff/port/strcasecmp.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#include <sys/types.h>
-#include <string.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)strcasecmp.c	5.9 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * This array is designed for mapping upper and lower case letter
- * together for a case independent comparison.  The mappings are
- * based upon ascii character sequences.
- */
-static const unsigned char charmap[] = {
-	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
-	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
-	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
-	'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
-	'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
-	'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
-	'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
-	'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
-	'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
-	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
-	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
-	'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
-	'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
-	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
-	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
-	'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
-	'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
-	'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
-	'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
-	'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
-	'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
-	'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
-	'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
-	'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
-	'\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
-	'\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
-	'\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
-	'\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
-	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
-	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
-	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
-	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
-};
-
-int
-strcasecmp(s1, s2)
-	const char *s1, *s2;
-{
-	register const unsigned char *cm = charmap,
-			*us1 = (const unsigned char *)s1,
-			*us2 = (const unsigned char *)s2;
-
-	while (cm[*us1] == cm[*us2++])
-		if (*us1++ == '\0')
-			return (0);
-	return (cm[*us1] - cm[*--us2]);
-}
-
-int
-strncasecmp(s1, s2, n)
-	const char *s1, *s2;
-	register size_t n;
-{
-	if (n != 0) {
-		register const unsigned char *cm = charmap,
-				*us1 = (const unsigned char *)s1,
-				*us2 = (const unsigned char *)s2;
-
-		do {
-			if (cm[*us1] != cm[*us2++])
-				return (cm[*us1] - cm[*--us2]);
-			if (*us1++ == '\0')
-				break;
-		} while (--n != 0);
-	}
-	return (0);
-}
diff --git a/tkimg1.3/libtiff/port/strtoul.c b/tkimg1.3/libtiff/port/strtoul.c
deleted file mode 100644
index ed8c108..0000000
--- a/tkimg1.3/libtiff/port/strtoul.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1990 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoul.c	5.3 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-strtoul(nptr, endptr, base)
-	const char *nptr;
-	char **endptr;
-	register int base;
-{
-	register const char *s = nptr;
-	register unsigned long acc;
-	register int c;
-	register unsigned long cutoff;
-	register int neg = 0, any, cutlim;
-
-	/*
-	 * See strtol for comments as to the logic used.
-	 */
-	do {
-		c = *s++;
-	} while (isspace(c));
-	if (c == '-') {
-		neg = 1;
-		c = *s++;
-	} else if (c == '+')
-		c = *s++;
-	if ((base == 0 || base == 16) &&
-	    c == '0' && (*s == 'x' || *s == 'X')) {
-		c = s[1];
-		s += 2;
-		base = 16;
-	}
-	if (base == 0)
-		base = c == '0' ? 8 : 10;
-	cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
-	cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
-	for (acc = 0, any = 0;; c = *s++) {
-		if (isdigit(c))
-			c -= '0';
-		else if (isalpha(c))
-			c -= isupper(c) ? 'A' - 10 : 'a' - 10;
-		else
-			break;
-		if (c >= base)
-			break;
-		if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
-			any = -1;
-		else {
-			any = 1;
-			acc *= base;
-			acc += c;
-		}
-	}
-	if (any < 0) {
-		acc = ULONG_MAX;
-		errno = ERANGE;
-	} else if (neg)
-		acc = -acc;
-	if (endptr != 0)
-		*endptr = any ? s - 1 : (char *)nptr;
-	return (acc);
-}
diff --git a/tkimg1.3/libtiff/tcl/ChangeLog b/tkimg1.3/libtiff/tcl/ChangeLog
deleted file mode 100644
index 35240ed..0000000
--- a/tkimg1.3/libtiff/tcl/ChangeLog
+++ /dev/null
@@ -1,47 +0,0 @@
-2004-08-17  Andreas Kupries  <andreask at activestate.com>
-
-	* Makefile.in (mkg3states$(EXEEXT)): Fixed smallish typo in make
-	  rules which prevented the complete compilation of the tiff
-	  wrapper on Windows.
-
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* tifftcl.h: Updated the hardwired version information in this
-	  header file.
-
-2004-08-13  Andreas Kupries  <andreask at activestate.com>
-
-	* libtiff/tcl: Changed version of wrapper to 3.6.1, synchronized to
-	  version of libtiff.
-
-	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
-	* libtiff/tcl: Updated to handle the new version of libtiff.
-
-2002-11-26  Andreas Kupries  <andreask at activestate.com>
-
-	* tifftclDeclsMask.h: 
-	* tifftclDeclsUnmask.h: Added the appropriate lines to handle the
-	  reactivated vararg functions, and the newly exported functions.
-
-	* tifftcl.decls: A number of vararg functions were commented
-	  out. Reactivated them now. Also added definitions found in
-	  'tif_predic.h', 'tif_dir.h', and 'tiffiop.h'. Regenerated the
-	  stub support files.
-
-	* tools/genStubs.tcl: Extended 'genStubs.tcl'. The application is
-	  now able to handle vararg declarations with more than one
-	  argument. When it encounters such declarations it emits code
-	  which is useable only if <stdarg.h> is present and used by the
-	  compiler. It also emits C preprocessor definitions checking this
-	  at compile time, using the NO_STDARG macro used 'tcl.h'.
-
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* Configure and build ok for all platforms available to me at AS.
-
-2002-11-14  Andreas Kupries  <andreask at activestate.com>
-
-	* Start of logging.
-
-	* libtiff/tcl/: New directory, packaging of support library for
-	  tcl.
diff --git a/tkimg1.3/libtiff/tcl/Makefile.in b/tkimg1.3/libtiff/tcl/Makefile.in
deleted file mode 100644
index 92428f0..0000000
--- a/tkimg1.3/libtiff/tcl/Makefile.in
+++ /dev/null
@@ -1,545 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tifftcl TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 1999 Scriptics Corporation.
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tifftcl_SOURCES	=		\
-		tifftcl.c		\
-		tifftclStubInit.c	\
-		tifftclStubLib.c	\
-		$(tiff_Sources)		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= tif_win32.c
-UNIX_SOURCES	= tif_unix.c
-
-tiff_Sources	=						\
-		tif_aux.c	tif_close.c	tif_codec.c	\
-		tif_compress.c	tif_dir.c	tif_dirinfo.c	\
-		tif_dirread.c	tif_dirwrite.c	tif_dumpmode.c	\
-		tif_error.c	tif_fax3.c	tif_fax3sm.c	\
-		tif_getimage.c	tif_flush.c	tif_luv.c	\
-		tif_lzw.c	tif_next.c	tif_open.c	\
-		tif_packbits.c	tif_predict.c	tif_print.c	\
-		tif_read.c	tif_swab.c	tif_strip.c	\
-		tif_thunder.c	tif_tile.c	tif_version.c	\
-		tif_warning.c	tif_write.c			\
-		\
-		tif_color.c	tif_extension.c
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tifftcl_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tifftcl_OBJECTS		= $(tifftcl_SOURCES:.c=. at OBJEXT@)
-tifftcl_LIB_FILE	= @tifftcl_LIB_FILE@
-
-tifftclstub_OBJECTS	= tifftclStubLib.$(OBJEXT)
-tifftclstub_LIB_FILE	= @tifftclstub_LIB_FILE@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	$(srcdir)/tifftcl.h		\
-			$(srcdir)/tifftclDecls.h	\
-			$(srcdir)/tifftclDeclsMask.h	\
-			$(srcdir)/tifftclDeclsUnmask.h
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-INCLUDES	= -I$(srcdir) -I. -I./libtiff -I$(srcdir)/../libtiff @TCL_INCLUDES@
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile tifftclConfig.sh pkgIndex.tcl port.h
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(PACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-	@mkdir -p $(DESTDIR)$(includedir)
-	@echo "Installing header files in $(DESTDIR)$(includedir)"
-	@for i in $(GENERIC_HDRS) ; do \
-	    echo "Installing $$i" ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(TCLSH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo The support package "'tifftcl'" cannot be tested separately.
-	@echo Test the package "'tkimg::tiff'" to exercise its functionality.
-
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-#	$(testshell)	\
-#		-load 'load ./$(tifftcl_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tifftcl_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(TCLSH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(TCLSH) $(SCRIPT)
-
-gdb:
-	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-	-rm -f $($(PACKAGE)stub_LIB_FILE)
-	${MAKE_STUB_LIB}
-	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tifftcl.$(OBJEXT): $(srcdir)/generic/tifftcl.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tifftcl.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/../libtiff
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-tif_fax3sm.c: mkg3states$(EXEEXT)
-	./mkg3states$(EXEEXT) -c const tif_fax3sm.c
-
-mkg3states$(EXEEXT): mkg3states.c
-	$(COMPILE) `@CYGPATH@ $<` -o $@
-	chmod u+x $@
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core mkg3states tif_fax3sm.c
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-	$(INSTALL_DATA) tifftclConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tifftcl.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tifftcl_DECLS = \
-	$(srcdir)/tifftcl.decls
-
-checkstubs:
-	- at for i in `nm -p $(tifftcl_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tifftcl_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/libtiff/tcl/README b/tkimg1.3/libtiff/tcl/README
deleted file mode 100644
index 530b304..0000000
--- a/tkimg1.3/libtiff/tcl/README
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Wrapping the tiff support library for tcl is a bit more complicated
-than libz, or libpng.
-
-(1)	libtiff comes with its own configure command, and there is no
-	configure.in. This means that it is not possible to lift the
-	relevant sections out of it for the configure of the
-	binding.
-
-	Also this configure is not exactly autoconf based (Seems so).
-	One of the things it has to be told is the target/build architecture,
-	as argument instead of via option. Because of this we cannot use
-	AC_CONFIG_SUBDIRS to run the sub-configure.
-
-	We do it directly, and are thus also able to avoid the symlink
-	we had to have in libjpeg/tcl.
-
-(2)	The tif sources have usage of tdarg.h hardwired into them.
-	This means that a compiler not using this header, but varargs.h
-	cannot be used. This is checked in configure.
diff --git a/tkimg1.3/libtiff/tcl/aclocal.m4 b/tkimg1.3/libtiff/tcl/aclocal.m4
deleted file mode 100644
index 0b05739..0000000
--- a/tkimg1.3/libtiff/tcl/aclocal.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/libtiff/tcl/configure b/tkimg1.3/libtiff/tcl/configure
deleted file mode 100755
index 9c9bd0d..0000000
--- a/tkimg1.3/libtiff/tcl/configure
+++ /dev/null
@@ -1,5777 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tifftcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./tifftcl.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tifftcl
-
-MAJOR_VERSION=3
-MINOR_VERSION=6
-PATCHLEVEL=1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-TIFFTCL_VERSION=${VERSION}
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TIFFTCL_VERSION "${TIFFTCL_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1436: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1448: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1517: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1591: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1683: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1688 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1716: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1721 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1745: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1794 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1864: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1915: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1958 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1994: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2022: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2061: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2097: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2155: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2189: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2222: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2248: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2285: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2292 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2307 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2342 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2395: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2401 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2420 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2451: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2486: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2492 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2521: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2560: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2562 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2609: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2614 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2646: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2683: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2688 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2720: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2725 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2757: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2839: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2844 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2872 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:2912: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2917 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2949: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2991: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3031: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3081: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3086 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3133: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3138 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 3163 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 3181 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3202 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-
-# Determine a full path for the chosen compiler to ensure that the
-# libtiff configure tool is using the same one as ourselves.
-
-TIFFCC=`echo "$CC" | sed -e 's/-pipe//g'`
-TIFFCC=`which $TIFFCC 2>/dev/null`
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3254: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tifftcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tifftcl 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3379: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3387 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3427: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3435 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3474: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3482 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3519: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3527 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3561: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3569 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3620: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3625 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3676: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3681 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3734: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:3772: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:3818: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:3832: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:3853: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3882: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3890 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3945: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4102: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4110 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4203: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4211 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4287: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4295 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4426: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4431 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4493: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4498 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4558: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4563 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4595: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4597 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:4932: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 4935 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:4988: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 4990 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5026: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5028 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5064: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5066 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5208: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:5355: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    #--------------------------------------------------------------------
-    # These are for tifftclConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/tifftcl${VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval tifftcl_LIB_FLAG="-ltifftcl${VERSION}${DBGX}"
-    else
-	eval tifftcl_LIB_FLAG="-ltifftcl`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    tifftcl_BUILD_LIB_SPEC="-L`pwd` ${tifftcl_LIB_FLAG}"
-    tifftcl_LIB_SPEC="-L${pkglibdir} ${tifftcl_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval tifftcl_STUB_LIB_FLAG="-ltifftclstub${VERSION}${DBGX}"
-    else
-	eval tifftcl_STUB_LIB_FLAG="-ltifftclstub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    tifftcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${tifftcl_STUB_LIB_FLAG}"
-    tifftcl_STUB_LIB_SPEC="-L${pkglibdir} ${tifftcl_STUB_LIB_FLAG}"
-    tifftcl_BUILD_STUB_LIB_PATH="`pwd`/${tifftclstub_LIB_FILE}"
-    tifftcl_STUB_LIB_PATH="${pkglibdir}/${tifftclstub_LIB_FILE}"
-
-    
-    
-    
-    
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Run the configuration of TIFF itself, and do some special checks
-# to if the configuration agress with the sources of tiff itself.
-# F.e. tiff is hardwired to use "stdarg.h". If the chosen compiler
-# does not support this we have to bail out.
-#--------------------------------------------------------------------
-
-if test `grep STDC_HEADERS confdefs.h | wc -l` -eq 0
-then
-    { echo "configure: error: Compiler does not use stdarg.h, required for TIFF" 1>&2; exit 1; }
-fi
-
-if test "X$host" = X -o "X$host" = XNONE
-then
-    ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC"
-else
-    ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC" $host
-fi
-
-# If the TIFF configure fails we use a predefined 'port.unix' to setup
-# the configuration.
-
-if test ! -r port.h
-then
-    cp ${srcdir}/libtiff/port.unix port.h
-fi
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl tifftclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@TIFFTCL_VERSION@%$TIFFTCL_VERSION%g
-s%@tifftcl_LIB_FILE@%$tifftcl_LIB_FILE%g
-s%@tifftclstub_LIB_FILE@%$tifftclstub_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@tifftcl_BUILD_LIB_SPEC@%$tifftcl_BUILD_LIB_SPEC%g
-s%@tifftcl_LIB_SPEC@%$tifftcl_LIB_SPEC%g
-s%@tifftcl_BUILD_STUB_LIB_SPEC@%$tifftcl_BUILD_STUB_LIB_SPEC%g
-s%@tifftcl_STUB_LIB_SPEC@%$tifftcl_STUB_LIB_SPEC%g
-s%@tifftcl_BUILD_STUB_LIB_PATH@%$tifftcl_BUILD_STUB_LIB_PATH%g
-s%@tifftcl_STUB_LIB_PATH@%$tifftcl_STUB_LIB_PATH%g
-s%@MAJOR_VERSION@%$MAJOR_VERSION%g
-s%@MINOR_VERSION@%$MINOR_VERSION%g
-s%@PATCHLEVEL@%$PATCHLEVEL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl tifftclConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libtiff/tcl/configure.in b/tkimg1.3/libtiff/tcl/configure.in
deleted file mode 100644
index 09704a8..0000000
--- a/tkimg1.3/libtiff/tcl/configure.in
+++ /dev/null
@@ -1,231 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tifftcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./tifftcl.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tifftcl
-
-MAJOR_VERSION=3
-MINOR_VERSION=6
-PATCHLEVEL=1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-TIFFTCL_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(TIFFTCL_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tifftcl_LIB_FILE)
-AC_SUBST(tifftclstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TIFFTCL_VERSION, "${TIFFTCL_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-AC_HEADER_STDC
-
-# Determine a full path for the chosen compiler to ensure that the
-# libtiff configure tool is using the same one as ourselves.
-
-TIFFCC=`echo "$CC" | sed -e 's/-pipe//'`
-TIFFCC=`which $TIFFCC 2>/dev/null`
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tifftcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tifftcl)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_EXPORT_CONFIG(tifftcl)
-
-#--------------------------------------------------------------------
-# Run the configuration of TIFF itself, and do some special checks
-# to if the configuration agress with the sources of tiff itself.
-# F.e. tiff is hardwired to use "stdarg.h". If the chosen compiler
-# does not support this we have to bail out.
-#--------------------------------------------------------------------
-
-if test `grep STDC_HEADERS confdefs.h | wc -l` -eq 0
-then
-    AC_MSG_ERROR([Compiler does not use stdarg.h, required for TIFF])
-fi
-
-if test "X$host" = X -o "X$host" = XNONE
-then
-    ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC"
-else
-    ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC" $host
-fi
-
-# If the TIFF configure fails we use a predefined 'port.unix' to setup
-# the configuration.
-
-if test ! -r port.h
-then
-    cp ${srcdir}/libtiff/port.unix port.h
-fi
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl tifftclConfig.sh])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libtiff/tcl/pkgIndex.tcl.in b/tkimg1.3/libtiff/tcl/pkgIndex.tcl.in
deleted file mode 100644
index 543c77b..0000000
--- a/tkimg1.3/libtiff/tcl/pkgIndex.tcl.in
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @tifftcl_LIB_FILE@]]
-
-# distinguish static and dyn variants, later.
-if {0} {
-package ifneeded @PACKAGE@ @VERSION@ [string map [list @dir@ $dir] \
-"if {[catch {load [file join @dir@ @tifftcl_LIB_FILE@]}]} {
-    load [file join @dir@ @tifftcl_LIB_FILE@]
-}"]
-}
diff --git a/tkimg1.3/libtiff/tcl/tclconfig/ChangeLog b/tkimg1.3/libtiff/tcl/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/libtiff/tcl/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/libtiff/tcl/tclconfig/README.txt b/tkimg1.3/libtiff/tcl/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/libtiff/tcl/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/libtiff/tcl/tclconfig/install-sh b/tkimg1.3/libtiff/tcl/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/libtiff/tcl/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/libtiff/tcl/tclconfig/tcl.m4 b/tkimg1.3/libtiff/tcl/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/libtiff/tcl/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/libtiff/tcl/tiffio.h b/tkimg1.3/libtiff/tcl/tiffio.h
deleted file mode 100644
index 4f9c342..0000000
--- a/tkimg1.3/libtiff/tcl/tiffio.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
- * Redirect the zlib definitions through the stub definitions of the
- * binding. A wrapper for a support library using zlib has to use this
- * header to ensure usage of the stub macros during the compilation of
- * the support library itself. In this way we avoid the need for
- * changing the original sources.
- *
- * This header has to be avoided when building the libz wrapper itself.
- */
-
-#include "tifftclDecls.h"
diff --git a/tkimg1.3/libtiff/tcl/tifftcl.c b/tkimg1.3/libtiff/tcl/tifftcl.c
deleted file mode 100644
index aab486a..0000000
--- a/tkimg1.3/libtiff/tcl/tifftcl.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * tifftcl.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: tifftcl.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- */
-
-#include "tcl.h"
-#include "tifftcl.h"
-
-#define TCL_DOES_STUBS \
-    (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
-    (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
-
-/*
- * Declarations for externally visible functions.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_tifftcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_TIFFTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-EXTERN int Tifftcl_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Tifftcl_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tifftcl_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tifftcl_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-#if TCL_DOES_STUBS
-  extern TifftclStubs tifftclStubs;
-#endif
-
-#ifdef USE_TCL_STUBS
-  if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-    return TCL_ERROR;
-  }
-#endif
-
-#if TCL_DOES_STUBS
-  if (Tcl_PkgProvideEx(interp, PACKAGE_NAME, TIFFTCL_VERSION,
-		       (ClientData) &tifftclStubs) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#else
-  if (Tcl_PkgProvide(interp, PACKAGE_NAME, TIFFTCL_VERSION) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#endif
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tifftcl_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tifftcl_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Tifftcl_Init(interp);
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tifftcl_XXX --
- *
- *  Wrappers around the zlib functionality.
- *
- * Results:
- *  Depends on function.
- *
- * Side effects:
- *  Depends on function.
- *
- *----------------------------------------------------------------------------
- */
-
-/*
- * No wrappers are required. Due to intelligent definition of the stub
- * table using the function names of the libz sources the stub table
- * contains jumps to the actual functionality.
- */
diff --git a/tkimg1.3/libtiff/tcl/tifftcl.decls b/tkimg1.3/libtiff/tcl/tifftcl.decls
deleted file mode 100644
index 7ea7478..0000000
--- a/tkimg1.3/libtiff/tcl/tifftcl.decls
+++ /dev/null
@@ -1,473 +0,0 @@
-# tifftcl.decls -- -*- tcl -*-
-#
-# This file contains the declarations for all supported public functions
-# that are exported by the TIFFTCL library via the stubs table. This file
-# is used to generate the tifftclDecls.h/tifftclStubsLib.c/tifftclStubsInit.c
-# files.
-#	
-
-# Declare each of the functions in the public BLT interface.  Note that
-# the an index should never be reused for a different function in order
-# to preserve backwards compatibility.
-
-library tifftcl
-
-# Define the TIFFTCL interface:
-
-interface tifftcl
-#hooks {}
-
-#########################################################################
-###  TIFF interface
-
-# Source: tiffio.h ...
-
-declare 0 generic {
-    const char* TIFFGetVersion(void)
-}
-declare 1 generic {
-    const TIFFCodec* TIFFFindCODEC(uint16 a)
-}
-declare 2 generic {
-    TIFFCodec* TIFFRegisterCODEC(uint16 a, const char* b, TIFFInitMethod c)
-}
-declare 3 generic {
-    void TIFFUnRegisterCODEC(TIFFCodec* a)
-}
-declare 4 generic {
-    tdata_t _TIFFmalloc(tsize_t a)
-}
-declare 5 generic {
-    tdata_t _TIFFrealloc(tdata_t a, tsize_t b)
-}
-declare 6 generic {
-    void _TIFFmemset(tdata_t a, int b, tsize_t c)
-}
-declare 7 generic {
-    void _TIFFmemcpy(tdata_t a, const tdata_t b, tsize_t c)
-}
-declare 8 generic {
-    int _TIFFmemcmp(const tdata_t a, const tdata_t b, tsize_t c)
-}
-declare 9 generic {
-    void _TIFFfree(tdata_t a)
-}
-declare 10 generic {
-    void TIFFClose(TIFF* tiffptr)
-}
-declare 11 generic {
-    int TIFFFlush(TIFF* tiffptr)
-}
-declare 12 generic {
-    int TIFFFlushData(TIFF* tiffptr)
-}
-declare 13 generic {
-    int TIFFGetField(TIFF* tiffptr, ttag_t a, ...)
-}
-declare 14 generic {
-    int TIFFVGetField(TIFF* tiffptr, ttag_t a, va_list b)
-}
-declare 15 generic {
-    int TIFFGetFieldDefaulted(TIFF* tiffptr, ttag_t a, ...)
-}
-declare 16 generic {
-    int TIFFVGetFieldDefaulted(TIFF* tiffptr, ttag_t a, va_list b)
-}
-declare 17 generic {
-    int TIFFReadDirectory(TIFF* tiffptr)
-}
-declare 18 generic {
-    tsize_t TIFFScanlineSize(TIFF* tiffptr)
-}
-declare 19 generic {
-    tsize_t TIFFRasterScanlineSize(TIFF* tiffptr)
-}
-declare 20 generic {
-    tsize_t TIFFStripSize(TIFF* tiffptr)
-}
-declare 21 generic {
-    tsize_t TIFFVStripSize(TIFF* tiffptr, uint32 a)
-}
-declare 22 generic {
-    tsize_t TIFFTileRowSize(TIFF* tiffptr)
-}
-declare 23 generic {
-    tsize_t TIFFTileSize(TIFF* tiffptr)
-}
-declare 24 generic {
-    tsize_t TIFFVTileSize(TIFF* tiffptr, uint32 a)
-}
-declare 25 generic {
-    uint32 TIFFDefaultStripSize(TIFF* tiffptr, uint32 a)
-}
-declare 26 generic {
-    void TIFFDefaultTileSize(TIFF* tiffptr, uint32* a, uint32* b)
-}
-declare 27 generic {
-    int TIFFFileno(TIFF* tiffptr)
-}
-declare 28 generic {
-    int TIFFGetMode(TIFF* tiffptr)
-}
-declare 29 generic {
-    int TIFFIsTiled(TIFF* tiffptr)
-}
-declare 30 generic {
-    int TIFFIsByteSwapped(TIFF* tiffptr)
-}
-declare 31 generic {
-    int TIFFIsUpSampled(TIFF* tiffptr)
-}
-declare 32 generic {
-    int TIFFIsMSB2LSB(TIFF* tiffptr)
-}
-declare 33 generic {
-    uint32 TIFFCurrentRow(TIFF* tiffptr)
-}
-declare 34 generic {
-    tdir_t TIFFCurrentDirectory(TIFF* tiffptr)
-}
-declare 35 generic {
-    tdir_t TIFFNumberOfDirectories(TIFF* tiffptr)
-}
-declare 36 generic {
-    uint32 TIFFCurrentDirOffset(TIFF* tiffptr)
-}
-declare 37 generic {
-    tstrip_t TIFFCurrentStrip(TIFF* tiffptr)
-}
-declare 38 generic {
-    ttile_t TIFFCurrentTile(TIFF* tiffptr)
-}
-declare 39 generic {
-    int TIFFReadBufferSetup(TIFF* tiffptr, tdata_t a, tsize_t b)
-}
-declare 40 generic {
-    int TIFFWriteBufferSetup(TIFF* tiffptr, tdata_t a, tsize_t b)
-}
-declare 41 generic {
-    int TIFFWriteCheck(TIFF* tiffptr, int a, const char *b)
-}
-declare 42 generic {
-    int TIFFCreateDirectory(TIFF* tiffptr)
-}
-declare 43 generic {
-    int TIFFLastDirectory(TIFF* tiffptr)
-}
-declare 44 generic {
-    int TIFFSetDirectory(TIFF* tiffptr, tdir_t a)
-}
-declare 45 generic {
-    int TIFFSetSubDirectory(TIFF* tiffptr, uint32 a)
-}
-declare 46 generic {
-    int TIFFUnlinkDirectory(TIFF* tiffptr, tdir_t a)
-}
-declare 47 generic {
-    int TIFFSetField(TIFF* tiffptr, ttag_t a, ...)
-}
-declare 48 generic {
-    int TIFFVSetField(TIFF* tiffptr, ttag_t a, va_list b)
-}
-declare 49 generic {
-    int TIFFWriteDirectory(TIFF * tiffptr)
-}
-declare 50 generic {
-    int TIFFReassignTagToIgnore(enum TIFFIgnoreSense a, int b)
-}
-declare 51 generic {
-    void TIFFPrintDirectory(TIFF* tiffptr, FILE* a, long b)
-}
-declare 52 generic {
-    int TIFFReadScanline(TIFF* tiffptr, tdata_t a, uint32 b, tsample_t c)
-}
-declare 53 generic {
-    int TIFFWriteScanline(TIFF* tiffptr, tdata_t a, uint32 b, tsample_t c)
-}
-declare 54 generic {
-    int TIFFReadRGBAImage(TIFF* tiffptr, uint32 a, uint32 b, uint32* c, int d)
-}
-declare 55 generic {
-    int TIFFReadRGBAStrip(TIFF* tiffptr, tstrip_t a, uint32 * b)
-}
-declare 56 generic {
-    int TIFFReadRGBATile(TIFF* tiffptr, uint32 a, uint32 b, uint32 * c)
-}
-declare 57 generic {
-    int TIFFRGBAImageOK(TIFF* tiffptr, char* a)
-}
-declare 58 generic {
-    int TIFFRGBAImageBegin(TIFFRGBAImage* a, TIFF* tiffptr, int b, char* c)
-}
-declare 59 generic {
-    int TIFFRGBAImageGet(TIFFRGBAImage* d, uint32* c, uint32 b, uint32 a)
-}
-declare 60 generic {
-    void TIFFRGBAImageEnd(TIFFRGBAImage* a)
-}
-declare 61 generic {
-    TIFF* TIFFOpen(const char* b, const char* a)
-}
-declare 62 generic {
-    TIFF* TIFFFdOpen(int a, const char* b, const char* c)
-}
-declare 63 generic {
-    TIFF* TIFFClientOpen(const char* a, const char* b,
-	    thandle_t c,
-	    TIFFReadWriteProc d, TIFFReadWriteProc e,
-	    TIFFSeekProc f, TIFFCloseProc g,
-	    TIFFSizeProc h,
-	    TIFFMapFileProc i, TIFFUnmapFileProc j)
-}
-declare 64 generic {
-    const char* TIFFFileName(TIFF* tiffptr)
-}
-declare 65 generic {
-    void TIFFError(const char* a, const char* b, ...)
-}
-declare 66 generic {
-    void TIFFWarning(const char* a, const char* b, ...)
-}
-declare 67 generic {
-    TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler a)
-}
-declare 68 generic {
-    TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler a)
-}
-declare 69 generic {
-    TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc a)
-}
-declare 70 generic {
-    ttile_t TIFFComputeTile(TIFF* tiffptr, uint32 a, uint32 b, uint32 c, tsample_t d)
-}
-declare 71 generic {
-    int TIFFCheckTile(TIFF* tiffptr, uint32 d, uint32 c, uint32 b, tsample_t a)
-}
-declare 72 generic {
-    ttile_t TIFFNumberOfTiles(TIFF* tiffptr)
-}
-declare 73 generic {
-    tsize_t TIFFReadTile(TIFF* tiffptr,
-	    tdata_t a, uint32 b, uint32 c, uint32 d, tsample_t e)
-}
-declare 74 generic {
-    tsize_t TIFFWriteTile(TIFF* tiffptr,
-	    tdata_t e, uint32 d, uint32 c, uint32 b, tsample_t a)
-}
-declare 75 generic {
-    tstrip_t TIFFComputeStrip(TIFF* tiffptr, uint32 a, tsample_t b)
-}
-declare 76 generic {
-    tstrip_t TIFFNumberOfStrips(TIFF* tiffptr)
-}
-declare 77 generic {
-    tsize_t TIFFReadEncodedStrip(TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)
-}
-declare 78 generic {
-    tsize_t TIFFReadRawStrip(TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)
-}
-declare 79 generic {
-    tsize_t TIFFReadEncodedTile(TIFF* tiffptr, ttile_t a, tdata_t b, tsize_t c)
-}
-declare 80 generic {
-    tsize_t TIFFReadRawTile(TIFF* tiffptr, ttile_t c, tdata_t b, tsize_t a)
-}
-declare 81 generic {
-    tsize_t TIFFWriteEncodedStrip(TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)
-}
-declare 82 generic {
-    tsize_t TIFFWriteRawStrip(TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)
-}
-declare 83 generic {
-    tsize_t TIFFWriteEncodedTile(TIFF* tiffptr, ttile_t a, tdata_t b, tsize_t c)
-}
-declare 84 generic {
-    tsize_t TIFFWriteRawTile(TIFF* tiffptr, ttile_t c, tdata_t b, tsize_t a)
-}
-declare 85 generic {
-    void TIFFSetWriteOffset(TIFF* tiffptr, toff_t a)
-}
-declare 86 generic {
-    void TIFFSwabShort(uint16* a)
-}
-declare 87 generic {
-    void TIFFSwabLong(uint32* a)
-}
-declare 88 generic {
-    void TIFFSwabDouble(double* a)
-}
-declare 89 generic {
-    void TIFFSwabArrayOfShort(uint16* a, unsigned long b)
-}
-declare 90 generic {
-    void TIFFSwabArrayOfLong(uint32* b, unsigned long a)
-}
-declare 91 generic {
-    void TIFFSwabArrayOfDouble(double* a, unsigned long b)
-}
-declare 92 generic {
-    void TIFFReverseBits(unsigned char* a, unsigned long b)
-}
-declare 93 generic {
-    const unsigned char* TIFFGetBitRevTable(int a)
-}
-
-# Source: tif_predict.h ...
-declare 100 generic {
-    int TIFFPredictorInit(TIFF* tiffptr)
-}
-
-# Source: tif_dir.h ...
-declare 110 generic {
-    void _TIFFSetupFieldInfo(TIFF* tiffptr)
-}
-declare 111 generic {
-    void TIFFMergeFieldInfo(TIFF* tiffptr, const TIFFFieldInfo* a, int b)
-}
-declare 112 generic {
-    void _TIFFPrintFieldInfo(TIFF* tiffptr, FILE* a)
-}
-declare 113 generic {
-    const TIFFFieldInfo* TIFFFindFieldInfo(TIFF* tiffptr, ttag_t a, TIFFDataType b)
-}
-declare 114 generic {
-    const TIFFFieldInfo* TIFFFieldWithTag(TIFF* tiffptr, ttag_t a)
-}
-declare 115 generic {
-    TIFFDataType _TIFFSampleToTagType(TIFF* tiffptr)
-}
-
-
-# Source: tiffiop.h ...
-
-declare 120 generic {
-    int _TIFFgetMode(const char* a, const char* b)
-}
-declare 121 generic {
-    int _TIFFNoRowEncode(TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)
-}
-declare 122 generic {
-    int _TIFFNoStripEncode(TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)
-}
-declare 123 generic {
-    int _TIFFNoTileEncode(TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)
-}
-declare 124 generic {
-    int _TIFFNoRowDecode(TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)
-}
-declare 125 generic {
-    int _TIFFNoStripDecode(TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)
-}
-declare 126 generic {
-    int _TIFFNoTileDecode(TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)
-}
-declare 127 generic {
-    void _TIFFNoPostDecode(TIFF* tiffptr, tidata_t a, tsize_t b)
-}
-declare 128 generic {
-    int  _TIFFNoPreCode (TIFF* tiffptr, tsample_t a)
-} 
-declare 129 generic {
-    int _TIFFNoSeek(TIFF* tiffptr, uint32 a)
-}
-declare 130 generic {
-    void _TIFFSwab16BitData(TIFF* tiffptr, tidata_t a, tsize_t b)
-}
-declare 131 generic {
-    void _TIFFSwab32BitData(TIFF* tiffptr, tidata_t b, tsize_t a)
-}
-declare 132 generic {
-    void _TIFFSwab64BitData(TIFF* tiffptr, tidata_t a, tsize_t b)
-}
-declare 133 generic {
-    int TIFFFlushData1(TIFF* tiffptr)
-}
-declare 134 generic {
-    void TIFFFreeDirectory(TIFF* tiffptr)
-}
-declare 135 generic {
-    int TIFFDefaultDirectory(TIFF* tiffptr)
-}
-declare 136 generic {
-    int TIFFSetCompressionScheme(TIFF* tiffptr, int a)
-}
-declare 137 generic {
-    int _TIFFSetDefaultCompressionState(TIFF* tiffptr)
-}
-declare 138 generic {
-    uint32 _TIFFDefaultStripSize(TIFF* tiffptr, uint32 a)
-}
-declare 139 generic {
-    void _TIFFDefaultTileSize(TIFF* tiffptr, uint32* a, uint32* b)
-}
-declare 140 generic {
-    void _TIFFsetByteArray(void** a, void* b, long c)
-}
-declare 141 generic {
-    void _TIFFsetString(char** a, char* b)
-}
-declare 142 generic {
-    void _TIFFsetShortArray(uint16** a, uint16* b, long c)
-}
-declare 143 generic {
-    void _TIFFsetLongArray(uint32** a, uint32* b, long c)
-}
-declare 144 generic {
-    void _TIFFsetFloatArray(float** a, float* b, long c)
-}
-declare 145 generic {
-    void _TIFFsetDoubleArray(double** a, double* b, long c)
-}
-declare 146 generic {
-    void _TIFFprintAscii(FILE* a, const char* b)
-}
-declare 147 generic {
-    void _TIFFprintAsciiTag(FILE* a, const char* b, const char* c)
-}
-declare 148 generic {
-    int TIFFInitDumpMode(TIFF* tiffptr, int a)
-}
-declare 149 generic {!PACKBITS_SUPPORT} {
-    int TIFFInitPackBits(TIFF* tiffptr, int a)
-}
-declare 150 generic {!CCITT_SUPPORT} {
-    int TIFFInitCCITTRLE(TIFF* tiffptr, int a)
-}
-declare 151 generic {!CCITT_SUPPORT} {
-    int TIFFInitCCITTRLEW(TIFF* tiffptr, int a)
-}
-declare 152 generic {!CCITT_SUPPORT} {
-    int TIFFInitCCITTFax3(TIFF* tiffptr, int a)
-}
-declare 153 generic {!CCITT_SUPPORT} {
-    int TIFFInitCCITTFax4(TIFF* tiffptr, int a)
-}
-declare 154 generic {!THUNDER_SUPPORT} {
-    int TIFFInitThunderScan(TIFF* tiffptr, int a)
-}
-declare 155 generic {!NEXT_SUPPORT} {
-    int TIFFInitNeXT(TIFF* tiffptr, int a)
-}
-declare 156 generic {!LZW_SUPPORT} {
-    int TIFFInitLZW(TIFF* tiffptr, int a)
-}
-declare 157 generic {!OJPEG_SUPPORT} {
-    int TIFFInitOJPEG(TIFF* tiffptr, int a)
-}
-declare 158 generic {!JPEG_SUPPORT} {
-    int TIFFInitJPEG(TIFF* tiffptr, int a)
-}
-declare 159 generic {!JBIG_SUPPORT} {
-    int TIFFInitJBIG(TIFF* tiffptr, int a)
-}
-declare 160 generic {!ZIP_SUPPORT} {
-    int TIFFInitZIP(TIFF* tiffptr, int a)
-}
-declare 161 generic {!PIXARLOG_SUPPORT} {
-    int TIFFInitPixarLog(TIFF* tiffptr, int a)
-}
-declare 162 generic {!LOGLUV_SUPPORT} {
-    int TIFFInitSGILog(TIFF* tiffptr, int a)
-}
-
-#########################################################################
diff --git a/tkimg1.3/libtiff/tcl/tifftcl.h b/tkimg1.3/libtiff/tcl/tifftcl.h
deleted file mode 100644
index e468b2e..0000000
--- a/tkimg1.3/libtiff/tcl/tifftcl.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * tifftcl.h --
- *
- *	Interface to libtiff.
- *
- * Copyright (c) 2002-2004 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: tifftcl.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- */
-
-#ifndef __TIFFTCL_H__
-#define __TIFFTCL_H__
-
-#include "tcl.h"
-
-#define TIFFTCL_MAJOR_VERSION	3
-#define TIFFTCL_MINOR_VERSION	6
-#define TIFFTCL_RELEASE_LEVEL	TCL_RELEASE
-#define TIFFTCL_RELEASE_SERIAL	1
-
-#define TIFFTCL_VERSION		"3.6.1"
-#define TIFFTCL_PATCH_LEVEL	"3.6.1"
-
-/*
- * Used to block the rest of this header file from resource compilers so
- * we can just get the version info.
- */
-#ifndef RC_INVOKED
-
-/* TIP 27 update. If CONST84 is not defined we are compiling against a
- * core before 8.4 and have to disable some CONST'ness.
- */
-
-#ifndef CONST84
-#   define CONST84
-#endif
-
-/*
- * Fix the Borland bug that's in the EXTERN macro from tcl.h.
- */
-#ifndef TCL_EXTERN
-#   undef DLLIMPORT
-#   undef DLLEXPORT
-#   if defined(STATIC_BUILD)
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
-#	define DLLIMPORT __declspec(dllimport)
-#	define DLLEXPORT __declspec(dllexport)
-#   elif defined(__BORLANDC__)
-#	define OLDBORLAND 1
-#	define DLLIMPORT __import
-#	define DLLEXPORT __export
-#   else
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   endif
-    /* Avoid name mangling from C++ compilers. */
-#   ifdef __cplusplus
-#	define TCL_EXTRNC extern "C"
-#   else
-#	define TCL_EXTRNC extern
-#   endif
-    /* Pre-5.5 Borland requires the attributes be placed after the */
-    /* return type. */
-#   ifdef OLDBORLAND
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
-#   else
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
-#   endif
-#endif
-
-
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_tifftcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_TIFFTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * C API for Tifftcl generic layer
- *----------------------------------------------------------------------------
- */
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for publically accessible routines
- *----------------------------------------------------------------------------
- */
-
-#include "tifftclDecls.h"
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for stub initialization.
- *----------------------------------------------------------------------------
- */
-
-#ifdef USE_TIFFTCL_STUBS
-EXTERN CONST char *
-Tifftcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
-#else
-
-/*
- * When not using stubs, make it a macro.
- */
-
-#define Tifftcl_InitStubs(interp, version, exact) \
-    Tcl_PkgRequire(interp, "tifftcl", version, exact)
-#endif
-
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* RC_INVOKED */
-#endif /* __TIFFTCL_H__ */
diff --git a/tkimg1.3/libtiff/tcl/tifftclConfig.sh.in b/tkimg1.3/libtiff/tcl/tifftclConfig.sh.in
deleted file mode 100644
index dbee5ab..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclConfig.sh.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# tifftclConfig.sh --
-# 
-# This shell script (for sh) is generated automatically by tifftcl's
-# configure script.  It will create shell variables for most of
-# the configuration options discovered by the configure script.
-# This script is intended to be included by the configure scripts
-# for tifftcl extensions so that they don't have to figure this all
-# out for themselves.  This file does not duplicate information
-# already provided by tclConfig.sh, so you may need to use that
-# file in addition to this one.
-#
-# The information in this file is specific to a single platform.
-
-# tifftcl's version number.
-tifftcl_VERSION='@VERSION@'
-tifftcl_MAJOR_VERSION='@MAJOR_VERSION@'
-tifftcl_MINOR_VERSION='@MINOR_VERSION@'
-tifftcl_RELEASE_LEVEL='@PATCHLEVEL@'
-
-# The name of the tifftcl library (may be either a .a file or a shared library):
-tifftcl_LIB_FILE=@tifftcl_LIB_FILE@
-
-# String to pass to linker to pick up the tifftcl library from its
-# build directory.
-tifftcl_BUILD_LIB_SPEC='@tifftcl_BUILD_LIB_SPEC@'
-
-# String to pass to linker to pick up the tifftcl library from its
-# installed directory.
-tifftcl_LIB_SPEC='@tifftcl_LIB_SPEC@'
-
-# The name of the tifftcl stub library (a .a file):
-tifftcl_STUB_LIB_FILE=@tifftclstub_LIB_FILE@
-
-# String to pass to linker to pick up the tifftcl stub library from its
-# build directory.
-tifftcl_BUILD_STUB_LIB_SPEC='@tifftcl_BUILD_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the tifftcl stub library from its
-# installed directory.
-tifftcl_STUB_LIB_SPEC='@tifftcl_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the tifftcl stub library from its
-# build directory.
-tifftcl_BUILD_STUB_LIB_PATH='@tifftcl_BUILD_STUB_LIB_PATH@'
-
-# String to pass to linker to pick up the tifftcl stub library from its
-# installed directory.
-tifftcl_STUB_LIB_PATH='@tifftcl_STUB_LIB_PATH@'
-
-# Location of the top-level source directories from which tifftcl
-# was built.  This is the directory that contains generic, unix, etc.
-# If tifftcl was compiled in a different place than the directory
-# containing the source files, this points to the location of the
-# sources, not the location where tifftcl was compiled. This can
-# be relative to the build directory.
-
-tifftcl_SRC_DIR='@srcdir@'
diff --git a/tkimg1.3/libtiff/tcl/tifftclDecls.h b/tkimg1.3/libtiff/tcl/tifftclDecls.h
deleted file mode 100644
index 17681b5..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclDecls.h
+++ /dev/null
@@ -1,1212 +0,0 @@
-/*
- * tifftclDecls.h --
- *
- *	Declarations of functions in the platform independent public TIFFTCL API.
- *
- */
-
-#ifndef _TIFFTCLDECLS
-#define _TIFFTCLDECLS
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the tifftcl.decls script.
- */
-
-#include <tcl.h>
-#include <tifftclDeclsMask.h>
-#include <../libtiff/tiffio.h>
-#include <../libtiff/tiffiop.h>
-#include <../libtiff/tif_predict.h>
-#include <tifftclDeclsUnmask.h>
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Ensure usage of <stdarg.h>
- */
-
-#if defined(NO_STDARG)
-#  error "This code requires <stdarg.h>"
-#else
-#  include <stdarg.h>
-#endif
-
-/*
- * Exported function declarations:
- */
-
-/* 0 */
-EXTERN const char*	TIFFGetVersion _ANSI_ARGS_((void));
-/* 1 */
-EXTERN const TIFFCodec*	 TIFFFindCODEC _ANSI_ARGS_((uint16 a));
-/* 2 */
-EXTERN TIFFCodec*	TIFFRegisterCODEC _ANSI_ARGS_((uint16 a, 
-				const char* b, TIFFInitMethod c));
-/* 3 */
-EXTERN void		TIFFUnRegisterCODEC _ANSI_ARGS_((TIFFCodec* a));
-/* 4 */
-EXTERN tdata_t		_TIFFmalloc _ANSI_ARGS_((tsize_t a));
-/* 5 */
-EXTERN tdata_t		_TIFFrealloc _ANSI_ARGS_((tdata_t a, tsize_t b));
-/* 6 */
-EXTERN void		_TIFFmemset _ANSI_ARGS_((tdata_t a, int b, tsize_t c));
-/* 7 */
-EXTERN void		_TIFFmemcpy _ANSI_ARGS_((tdata_t a, const tdata_t b, 
-				tsize_t c));
-/* 8 */
-EXTERN int		_TIFFmemcmp _ANSI_ARGS_((const tdata_t a, 
-				const tdata_t b, tsize_t c));
-/* 9 */
-EXTERN void		_TIFFfree _ANSI_ARGS_((tdata_t a));
-/* 10 */
-EXTERN void		TIFFClose _ANSI_ARGS_((TIFF* tiffptr));
-/* 11 */
-EXTERN int		TIFFFlush _ANSI_ARGS_((TIFF* tiffptr));
-/* 12 */
-EXTERN int		TIFFFlushData _ANSI_ARGS_((TIFF* tiffptr));
-/* 13 */
-EXTERN int		TIFFGetField _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, 
-				... ));
-/* 14 */
-EXTERN int		TIFFVGetField _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, 
-				va_list b));
-/* 15 */
-EXTERN int		TIFFGetFieldDefaulted _ANSI_ARGS_((TIFF* tiffptr, 
-				ttag_t a, ... ));
-/* 16 */
-EXTERN int		TIFFVGetFieldDefaulted _ANSI_ARGS_((TIFF* tiffptr, 
-				ttag_t a, va_list b));
-/* 17 */
-EXTERN int		TIFFReadDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 18 */
-EXTERN tsize_t		TIFFScanlineSize _ANSI_ARGS_((TIFF* tiffptr));
-/* 19 */
-EXTERN tsize_t		TIFFRasterScanlineSize _ANSI_ARGS_((TIFF* tiffptr));
-/* 20 */
-EXTERN tsize_t		TIFFStripSize _ANSI_ARGS_((TIFF* tiffptr));
-/* 21 */
-EXTERN tsize_t		TIFFVStripSize _ANSI_ARGS_((TIFF* tiffptr, uint32 a));
-/* 22 */
-EXTERN tsize_t		TIFFTileRowSize _ANSI_ARGS_((TIFF* tiffptr));
-/* 23 */
-EXTERN tsize_t		TIFFTileSize _ANSI_ARGS_((TIFF* tiffptr));
-/* 24 */
-EXTERN tsize_t		TIFFVTileSize _ANSI_ARGS_((TIFF* tiffptr, uint32 a));
-/* 25 */
-EXTERN uint32		TIFFDefaultStripSize _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a));
-/* 26 */
-EXTERN void		TIFFDefaultTileSize _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32* a, uint32* b));
-/* 27 */
-EXTERN int		TIFFFileno _ANSI_ARGS_((TIFF* tiffptr));
-/* 28 */
-EXTERN int		TIFFGetMode _ANSI_ARGS_((TIFF* tiffptr));
-/* 29 */
-EXTERN int		TIFFIsTiled _ANSI_ARGS_((TIFF* tiffptr));
-/* 30 */
-EXTERN int		TIFFIsByteSwapped _ANSI_ARGS_((TIFF* tiffptr));
-/* 31 */
-EXTERN int		TIFFIsUpSampled _ANSI_ARGS_((TIFF* tiffptr));
-/* 32 */
-EXTERN int		TIFFIsMSB2LSB _ANSI_ARGS_((TIFF* tiffptr));
-/* 33 */
-EXTERN uint32		TIFFCurrentRow _ANSI_ARGS_((TIFF* tiffptr));
-/* 34 */
-EXTERN tdir_t		TIFFCurrentDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 35 */
-EXTERN tdir_t		TIFFNumberOfDirectories _ANSI_ARGS_((TIFF* tiffptr));
-/* 36 */
-EXTERN uint32		TIFFCurrentDirOffset _ANSI_ARGS_((TIFF* tiffptr));
-/* 37 */
-EXTERN tstrip_t		TIFFCurrentStrip _ANSI_ARGS_((TIFF* tiffptr));
-/* 38 */
-EXTERN ttile_t		TIFFCurrentTile _ANSI_ARGS_((TIFF* tiffptr));
-/* 39 */
-EXTERN int		TIFFReadBufferSetup _ANSI_ARGS_((TIFF* tiffptr, 
-				tdata_t a, tsize_t b));
-/* 40 */
-EXTERN int		TIFFWriteBufferSetup _ANSI_ARGS_((TIFF* tiffptr, 
-				tdata_t a, tsize_t b));
-/* 41 */
-EXTERN int		TIFFWriteCheck _ANSI_ARGS_((TIFF* tiffptr, int a, 
-				const char * b));
-/* 42 */
-EXTERN int		TIFFCreateDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 43 */
-EXTERN int		TIFFLastDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 44 */
-EXTERN int		TIFFSetDirectory _ANSI_ARGS_((TIFF* tiffptr, 
-				tdir_t a));
-/* 45 */
-EXTERN int		TIFFSetSubDirectory _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a));
-/* 46 */
-EXTERN int		TIFFUnlinkDirectory _ANSI_ARGS_((TIFF* tiffptr, 
-				tdir_t a));
-/* 47 */
-EXTERN int		TIFFSetField _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, 
-				... ));
-/* 48 */
-EXTERN int		TIFFVSetField _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, 
-				va_list b));
-/* 49 */
-EXTERN int		TIFFWriteDirectory _ANSI_ARGS_((TIFF * tiffptr));
-/* 50 */
-EXTERN int		TIFFReassignTagToIgnore _ANSI_ARGS_((
-				enum TIFFIgnoreSense a, int b));
-/* 51 */
-EXTERN void		TIFFPrintDirectory _ANSI_ARGS_((TIFF* tiffptr, 
-				FILE* a, long b));
-/* 52 */
-EXTERN int		TIFFReadScanline _ANSI_ARGS_((TIFF* tiffptr, 
-				tdata_t a, uint32 b, tsample_t c));
-/* 53 */
-EXTERN int		TIFFWriteScanline _ANSI_ARGS_((TIFF* tiffptr, 
-				tdata_t a, uint32 b, tsample_t c));
-/* 54 */
-EXTERN int		TIFFReadRGBAImage _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a, uint32 b, uint32* c, int d));
-/* 55 */
-EXTERN int		TIFFReadRGBAStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				tstrip_t a, uint32 * b));
-/* 56 */
-EXTERN int		TIFFReadRGBATile _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a, uint32 b, uint32 * c));
-/* 57 */
-EXTERN int		TIFFRGBAImageOK _ANSI_ARGS_((TIFF* tiffptr, char* a));
-/* 58 */
-EXTERN int		TIFFRGBAImageBegin _ANSI_ARGS_((TIFFRGBAImage* a, 
-				TIFF* tiffptr, int b, char* c));
-/* 59 */
-EXTERN int		TIFFRGBAImageGet _ANSI_ARGS_((TIFFRGBAImage* d, 
-				uint32* c, uint32 b, uint32 a));
-/* 60 */
-EXTERN void		TIFFRGBAImageEnd _ANSI_ARGS_((TIFFRGBAImage* a));
-/* 61 */
-EXTERN TIFF*		TIFFOpen _ANSI_ARGS_((const char* b, const char* a));
-/* 62 */
-EXTERN TIFF*		TIFFFdOpen _ANSI_ARGS_((int a, const char* b, 
-				const char* c));
-/* 63 */
-EXTERN TIFF*		TIFFClientOpen _ANSI_ARGS_((const char* a, 
-				const char* b, thandle_t c, 
-				TIFFReadWriteProc d, TIFFReadWriteProc e, 
-				TIFFSeekProc f, TIFFCloseProc g, 
-				TIFFSizeProc h, TIFFMapFileProc i, 
-				TIFFUnmapFileProc j));
-/* 64 */
-EXTERN const char*	TIFFFileName _ANSI_ARGS_((TIFF* tiffptr));
-/* 65 */
-EXTERN void		TIFFError _ANSI_ARGS_((const char* a, const char* b, 
-				... ));
-/* 66 */
-EXTERN void		TIFFWarning _ANSI_ARGS_((const char* a, 
-				const char* b, ... ));
-/* 67 */
-EXTERN TIFFErrorHandler	 TIFFSetErrorHandler _ANSI_ARGS_((TIFFErrorHandler a));
-/* 68 */
-EXTERN TIFFErrorHandler	 TIFFSetWarningHandler _ANSI_ARGS_((
-				TIFFErrorHandler a));
-/* 69 */
-EXTERN TIFFExtendProc	TIFFSetTagExtender _ANSI_ARGS_((TIFFExtendProc a));
-/* 70 */
-EXTERN ttile_t		TIFFComputeTile _ANSI_ARGS_((TIFF* tiffptr, uint32 a, 
-				uint32 b, uint32 c, tsample_t d));
-/* 71 */
-EXTERN int		TIFFCheckTile _ANSI_ARGS_((TIFF* tiffptr, uint32 d, 
-				uint32 c, uint32 b, tsample_t a));
-/* 72 */
-EXTERN ttile_t		TIFFNumberOfTiles _ANSI_ARGS_((TIFF* tiffptr));
-/* 73 */
-EXTERN tsize_t		TIFFReadTile _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, 
-				uint32 b, uint32 c, uint32 d, tsample_t e));
-/* 74 */
-EXTERN tsize_t		TIFFWriteTile _ANSI_ARGS_((TIFF* tiffptr, tdata_t e, 
-				uint32 d, uint32 c, uint32 b, tsample_t a));
-/* 75 */
-EXTERN tstrip_t		TIFFComputeStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a, tsample_t b));
-/* 76 */
-EXTERN tstrip_t		TIFFNumberOfStrips _ANSI_ARGS_((TIFF* tiffptr));
-/* 77 */
-EXTERN tsize_t		TIFFReadEncodedStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				tstrip_t a, tdata_t b, tsize_t c));
-/* 78 */
-EXTERN tsize_t		TIFFReadRawStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				tstrip_t a, tdata_t b, tsize_t c));
-/* 79 */
-EXTERN tsize_t		TIFFReadEncodedTile _ANSI_ARGS_((TIFF* tiffptr, 
-				ttile_t a, tdata_t b, tsize_t c));
-/* 80 */
-EXTERN tsize_t		TIFFReadRawTile _ANSI_ARGS_((TIFF* tiffptr, 
-				ttile_t c, tdata_t b, tsize_t a));
-/* 81 */
-EXTERN tsize_t		TIFFWriteEncodedStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				tstrip_t a, tdata_t b, tsize_t c));
-/* 82 */
-EXTERN tsize_t		TIFFWriteRawStrip _ANSI_ARGS_((TIFF* tiffptr, 
-				tstrip_t a, tdata_t b, tsize_t c));
-/* 83 */
-EXTERN tsize_t		TIFFWriteEncodedTile _ANSI_ARGS_((TIFF* tiffptr, 
-				ttile_t a, tdata_t b, tsize_t c));
-/* 84 */
-EXTERN tsize_t		TIFFWriteRawTile _ANSI_ARGS_((TIFF* tiffptr, 
-				ttile_t c, tdata_t b, tsize_t a));
-/* 85 */
-EXTERN void		TIFFSetWriteOffset _ANSI_ARGS_((TIFF* tiffptr, 
-				toff_t a));
-/* 86 */
-EXTERN void		TIFFSwabShort _ANSI_ARGS_((uint16* a));
-/* 87 */
-EXTERN void		TIFFSwabLong _ANSI_ARGS_((uint32* a));
-/* 88 */
-EXTERN void		TIFFSwabDouble _ANSI_ARGS_((double* a));
-/* 89 */
-EXTERN void		TIFFSwabArrayOfShort _ANSI_ARGS_((uint16* a, 
-				unsigned long b));
-/* 90 */
-EXTERN void		TIFFSwabArrayOfLong _ANSI_ARGS_((uint32* b, 
-				unsigned long a));
-/* 91 */
-EXTERN void		TIFFSwabArrayOfDouble _ANSI_ARGS_((double* a, 
-				unsigned long b));
-/* 92 */
-EXTERN void		TIFFReverseBits _ANSI_ARGS_((unsigned char* a, 
-				unsigned long b));
-/* 93 */
-EXTERN const unsigned char* TIFFGetBitRevTable _ANSI_ARGS_((int a));
-/* Slot 94 is reserved */
-/* Slot 95 is reserved */
-/* Slot 96 is reserved */
-/* Slot 97 is reserved */
-/* Slot 98 is reserved */
-/* Slot 99 is reserved */
-/* 100 */
-EXTERN int		TIFFPredictorInit _ANSI_ARGS_((TIFF* tiffptr));
-/* Slot 101 is reserved */
-/* Slot 102 is reserved */
-/* Slot 103 is reserved */
-/* Slot 104 is reserved */
-/* Slot 105 is reserved */
-/* Slot 106 is reserved */
-/* Slot 107 is reserved */
-/* Slot 108 is reserved */
-/* Slot 109 is reserved */
-/* 110 */
-EXTERN void		_TIFFSetupFieldInfo _ANSI_ARGS_((TIFF* tiffptr));
-/* 111 */
-EXTERN void		TIFFMergeFieldInfo _ANSI_ARGS_((TIFF* tiffptr, 
-				const TIFFFieldInfo* a, int b));
-/* 112 */
-EXTERN void		_TIFFPrintFieldInfo _ANSI_ARGS_((TIFF* tiffptr, 
-				FILE* a));
-/* 113 */
-EXTERN const TIFFFieldInfo* TIFFFindFieldInfo _ANSI_ARGS_((TIFF* tiffptr, 
-				ttag_t a, TIFFDataType b));
-/* 114 */
-EXTERN const TIFFFieldInfo* TIFFFieldWithTag _ANSI_ARGS_((TIFF* tiffptr, 
-				ttag_t a));
-/* 115 */
-EXTERN TIFFDataType	_TIFFSampleToTagType _ANSI_ARGS_((TIFF* tiffptr));
-/* Slot 116 is reserved */
-/* Slot 117 is reserved */
-/* Slot 118 is reserved */
-/* Slot 119 is reserved */
-/* 120 */
-EXTERN int		_TIFFgetMode _ANSI_ARGS_((const char* a, 
-				const char* b));
-/* 121 */
-EXTERN int		_TIFFNoRowEncode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b, tsample_t c));
-/* 122 */
-EXTERN int		_TIFFNoStripEncode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t c, tsize_t b, tsample_t a));
-/* 123 */
-EXTERN int		_TIFFNoTileEncode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b, tsample_t c));
-/* 124 */
-EXTERN int		_TIFFNoRowDecode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t c, tsize_t b, tsample_t a));
-/* 125 */
-EXTERN int		_TIFFNoStripDecode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b, tsample_t c));
-/* 126 */
-EXTERN int		_TIFFNoTileDecode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t c, tsize_t b, tsample_t a));
-/* 127 */
-EXTERN void		_TIFFNoPostDecode _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b));
-/* 128 */
-EXTERN int		_TIFFNoPreCode _ANSI_ARGS_((TIFF* tiffptr, 
-				tsample_t a));
-/* 129 */
-EXTERN int		_TIFFNoSeek _ANSI_ARGS_((TIFF* tiffptr, uint32 a));
-/* 130 */
-EXTERN void		_TIFFSwab16BitData _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b));
-/* 131 */
-EXTERN void		_TIFFSwab32BitData _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t b, tsize_t a));
-/* 132 */
-EXTERN void		_TIFFSwab64BitData _ANSI_ARGS_((TIFF* tiffptr, 
-				tidata_t a, tsize_t b));
-/* 133 */
-EXTERN int		TIFFFlushData1 _ANSI_ARGS_((TIFF* tiffptr));
-/* 134 */
-EXTERN void		TIFFFreeDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 135 */
-EXTERN int		TIFFDefaultDirectory _ANSI_ARGS_((TIFF* tiffptr));
-/* 136 */
-EXTERN int		TIFFSetCompressionScheme _ANSI_ARGS_((TIFF* tiffptr, 
-				int a));
-/* 137 */
-EXTERN int		_TIFFSetDefaultCompressionState _ANSI_ARGS_((
-				TIFF* tiffptr));
-/* 138 */
-EXTERN uint32		_TIFFDefaultStripSize _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32 a));
-/* 139 */
-EXTERN void		_TIFFDefaultTileSize _ANSI_ARGS_((TIFF* tiffptr, 
-				uint32* a, uint32* b));
-/* 140 */
-EXTERN void		_TIFFsetByteArray _ANSI_ARGS_((void** a, void* b, 
-				long c));
-/* 141 */
-EXTERN void		_TIFFsetString _ANSI_ARGS_((char** a, char* b));
-/* 142 */
-EXTERN void		_TIFFsetShortArray _ANSI_ARGS_((uint16** a, 
-				uint16* b, long c));
-/* 143 */
-EXTERN void		_TIFFsetLongArray _ANSI_ARGS_((uint32** a, uint32* b, 
-				long c));
-/* 144 */
-EXTERN void		_TIFFsetFloatArray _ANSI_ARGS_((float** a, float* b, 
-				long c));
-/* 145 */
-EXTERN void		_TIFFsetDoubleArray _ANSI_ARGS_((double** a, 
-				double* b, long c));
-/* 146 */
-EXTERN void		_TIFFprintAscii _ANSI_ARGS_((FILE* a, const char* b));
-/* 147 */
-EXTERN void		_TIFFprintAsciiTag _ANSI_ARGS_((FILE* a, 
-				const char* b, const char* c));
-/* 148 */
-EXTERN int		TIFFInitDumpMode _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 149 */
-EXTERN int		TIFFInitPackBits _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 150 */
-EXTERN int		TIFFInitCCITTRLE _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 151 */
-EXTERN int		TIFFInitCCITTRLEW _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 152 */
-EXTERN int		TIFFInitCCITTFax3 _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 153 */
-EXTERN int		TIFFInitCCITTFax4 _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 154 */
-EXTERN int		TIFFInitThunderScan _ANSI_ARGS_((TIFF* tiffptr, 
-				int a));
-/* 155 */
-EXTERN int		TIFFInitNeXT _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 156 */
-EXTERN int		TIFFInitLZW _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 157 */
-EXTERN int		TIFFInitOJPEG _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 158 */
-EXTERN int		TIFFInitJPEG _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 159 */
-EXTERN int		TIFFInitJBIG _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 160 */
-EXTERN int		TIFFInitZIP _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 161 */
-EXTERN int		TIFFInitPixarLog _ANSI_ARGS_((TIFF* tiffptr, int a));
-/* 162 */
-EXTERN int		TIFFInitSGILog _ANSI_ARGS_((TIFF* tiffptr, int a));
-
-typedef struct TifftclStubs {
-    int magic;
-    struct TifftclStubHooks *hooks;
-
-    const char* (*tIFFGetVersion) _ANSI_ARGS_((void)); /* 0 */
-    const TIFFCodec* (*tIFFFindCODEC) _ANSI_ARGS_((uint16 a)); /* 1 */
-    TIFFCodec* (*tIFFRegisterCODEC) _ANSI_ARGS_((uint16 a, const char* b, TIFFInitMethod c)); /* 2 */
-    void (*tIFFUnRegisterCODEC) _ANSI_ARGS_((TIFFCodec* a)); /* 3 */
-    tdata_t (*_TIFFmalloc) _ANSI_ARGS_((tsize_t a)); /* 4 */
-    tdata_t (*_TIFFrealloc) _ANSI_ARGS_((tdata_t a, tsize_t b)); /* 5 */
-    void (*_TIFFmemset) _ANSI_ARGS_((tdata_t a, int b, tsize_t c)); /* 6 */
-    void (*_TIFFmemcpy) _ANSI_ARGS_((tdata_t a, const tdata_t b, tsize_t c)); /* 7 */
-    int (*_TIFFmemcmp) _ANSI_ARGS_((const tdata_t a, const tdata_t b, tsize_t c)); /* 8 */
-    void (*_TIFFfree) _ANSI_ARGS_((tdata_t a)); /* 9 */
-    void (*tIFFClose) _ANSI_ARGS_((TIFF* tiffptr)); /* 10 */
-    int (*tIFFFlush) _ANSI_ARGS_((TIFF* tiffptr)); /* 11 */
-    int (*tIFFFlushData) _ANSI_ARGS_((TIFF* tiffptr)); /* 12 */
-    int (*tIFFGetField) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, ... )); /* 13 */
-    int (*tIFFVGetField) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, va_list b)); /* 14 */
-    int (*tIFFGetFieldDefaulted) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, ... )); /* 15 */
-    int (*tIFFVGetFieldDefaulted) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, va_list b)); /* 16 */
-    int (*tIFFReadDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 17 */
-    tsize_t (*tIFFScanlineSize) _ANSI_ARGS_((TIFF* tiffptr)); /* 18 */
-    tsize_t (*tIFFRasterScanlineSize) _ANSI_ARGS_((TIFF* tiffptr)); /* 19 */
-    tsize_t (*tIFFStripSize) _ANSI_ARGS_((TIFF* tiffptr)); /* 20 */
-    tsize_t (*tIFFVStripSize) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 21 */
-    tsize_t (*tIFFTileRowSize) _ANSI_ARGS_((TIFF* tiffptr)); /* 22 */
-    tsize_t (*tIFFTileSize) _ANSI_ARGS_((TIFF* tiffptr)); /* 23 */
-    tsize_t (*tIFFVTileSize) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 24 */
-    uint32 (*tIFFDefaultStripSize) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 25 */
-    void (*tIFFDefaultTileSize) _ANSI_ARGS_((TIFF* tiffptr, uint32* a, uint32* b)); /* 26 */
-    int (*tIFFFileno) _ANSI_ARGS_((TIFF* tiffptr)); /* 27 */
-    int (*tIFFGetMode) _ANSI_ARGS_((TIFF* tiffptr)); /* 28 */
-    int (*tIFFIsTiled) _ANSI_ARGS_((TIFF* tiffptr)); /* 29 */
-    int (*tIFFIsByteSwapped) _ANSI_ARGS_((TIFF* tiffptr)); /* 30 */
-    int (*tIFFIsUpSampled) _ANSI_ARGS_((TIFF* tiffptr)); /* 31 */
-    int (*tIFFIsMSB2LSB) _ANSI_ARGS_((TIFF* tiffptr)); /* 32 */
-    uint32 (*tIFFCurrentRow) _ANSI_ARGS_((TIFF* tiffptr)); /* 33 */
-    tdir_t (*tIFFCurrentDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 34 */
-    tdir_t (*tIFFNumberOfDirectories) _ANSI_ARGS_((TIFF* tiffptr)); /* 35 */
-    uint32 (*tIFFCurrentDirOffset) _ANSI_ARGS_((TIFF* tiffptr)); /* 36 */
-    tstrip_t (*tIFFCurrentStrip) _ANSI_ARGS_((TIFF* tiffptr)); /* 37 */
-    ttile_t (*tIFFCurrentTile) _ANSI_ARGS_((TIFF* tiffptr)); /* 38 */
-    int (*tIFFReadBufferSetup) _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, tsize_t b)); /* 39 */
-    int (*tIFFWriteBufferSetup) _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, tsize_t b)); /* 40 */
-    int (*tIFFWriteCheck) _ANSI_ARGS_((TIFF* tiffptr, int a, const char * b)); /* 41 */
-    int (*tIFFCreateDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 42 */
-    int (*tIFFLastDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 43 */
-    int (*tIFFSetDirectory) _ANSI_ARGS_((TIFF* tiffptr, tdir_t a)); /* 44 */
-    int (*tIFFSetSubDirectory) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 45 */
-    int (*tIFFUnlinkDirectory) _ANSI_ARGS_((TIFF* tiffptr, tdir_t a)); /* 46 */
-    int (*tIFFSetField) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, ... )); /* 47 */
-    int (*tIFFVSetField) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, va_list b)); /* 48 */
-    int (*tIFFWriteDirectory) _ANSI_ARGS_((TIFF * tiffptr)); /* 49 */
-    int (*tIFFReassignTagToIgnore) _ANSI_ARGS_((enum TIFFIgnoreSense a, int b)); /* 50 */
-    void (*tIFFPrintDirectory) _ANSI_ARGS_((TIFF* tiffptr, FILE* a, long b)); /* 51 */
-    int (*tIFFReadScanline) _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, uint32 b, tsample_t c)); /* 52 */
-    int (*tIFFWriteScanline) _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, uint32 b, tsample_t c)); /* 53 */
-    int (*tIFFReadRGBAImage) _ANSI_ARGS_((TIFF* tiffptr, uint32 a, uint32 b, uint32* c, int d)); /* 54 */
-    int (*tIFFReadRGBAStrip) _ANSI_ARGS_((TIFF* tiffptr, tstrip_t a, uint32 * b)); /* 55 */
-    int (*tIFFReadRGBATile) _ANSI_ARGS_((TIFF* tiffptr, uint32 a, uint32 b, uint32 * c)); /* 56 */
-    int (*tIFFRGBAImageOK) _ANSI_ARGS_((TIFF* tiffptr, char* a)); /* 57 */
-    int (*tIFFRGBAImageBegin) _ANSI_ARGS_((TIFFRGBAImage* a, TIFF* tiffptr, int b, char* c)); /* 58 */
-    int (*tIFFRGBAImageGet) _ANSI_ARGS_((TIFFRGBAImage* d, uint32* c, uint32 b, uint32 a)); /* 59 */
-    void (*tIFFRGBAImageEnd) _ANSI_ARGS_((TIFFRGBAImage* a)); /* 60 */
-    TIFF* (*tIFFOpen) _ANSI_ARGS_((const char* b, const char* a)); /* 61 */
-    TIFF* (*tIFFFdOpen) _ANSI_ARGS_((int a, const char* b, const char* c)); /* 62 */
-    TIFF* (*tIFFClientOpen) _ANSI_ARGS_((const char* a, const char* b, thandle_t c, TIFFReadWriteProc d, TIFFReadWriteProc e, TIFFSeekProc f, TIFFCloseProc g, TIFFSizeProc h, TIFFMapFileProc i, TIFFUnmapFileProc j)); /* 63 */
-    const char* (*tIFFFileName) _ANSI_ARGS_((TIFF* tiffptr)); /* 64 */
-    void (*tIFFError) _ANSI_ARGS_((const char* a, const char* b, ... )); /* 65 */
-    void (*tIFFWarning) _ANSI_ARGS_((const char* a, const char* b, ... )); /* 66 */
-    TIFFErrorHandler (*tIFFSetErrorHandler) _ANSI_ARGS_((TIFFErrorHandler a)); /* 67 */
-    TIFFErrorHandler (*tIFFSetWarningHandler) _ANSI_ARGS_((TIFFErrorHandler a)); /* 68 */
-    TIFFExtendProc (*tIFFSetTagExtender) _ANSI_ARGS_((TIFFExtendProc a)); /* 69 */
-    ttile_t (*tIFFComputeTile) _ANSI_ARGS_((TIFF* tiffptr, uint32 a, uint32 b, uint32 c, tsample_t d)); /* 70 */
-    int (*tIFFCheckTile) _ANSI_ARGS_((TIFF* tiffptr, uint32 d, uint32 c, uint32 b, tsample_t a)); /* 71 */
-    ttile_t (*tIFFNumberOfTiles) _ANSI_ARGS_((TIFF* tiffptr)); /* 72 */
-    tsize_t (*tIFFReadTile) _ANSI_ARGS_((TIFF* tiffptr, tdata_t a, uint32 b, uint32 c, uint32 d, tsample_t e)); /* 73 */
-    tsize_t (*tIFFWriteTile) _ANSI_ARGS_((TIFF* tiffptr, tdata_t e, uint32 d, uint32 c, uint32 b, tsample_t a)); /* 74 */
-    tstrip_t (*tIFFComputeStrip) _ANSI_ARGS_((TIFF* tiffptr, uint32 a, tsample_t b)); /* 75 */
-    tstrip_t (*tIFFNumberOfStrips) _ANSI_ARGS_((TIFF* tiffptr)); /* 76 */
-    tsize_t (*tIFFReadEncodedStrip) _ANSI_ARGS_((TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)); /* 77 */
-    tsize_t (*tIFFReadRawStrip) _ANSI_ARGS_((TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)); /* 78 */
-    tsize_t (*tIFFReadEncodedTile) _ANSI_ARGS_((TIFF* tiffptr, ttile_t a, tdata_t b, tsize_t c)); /* 79 */
-    tsize_t (*tIFFReadRawTile) _ANSI_ARGS_((TIFF* tiffptr, ttile_t c, tdata_t b, tsize_t a)); /* 80 */
-    tsize_t (*tIFFWriteEncodedStrip) _ANSI_ARGS_((TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)); /* 81 */
-    tsize_t (*tIFFWriteRawStrip) _ANSI_ARGS_((TIFF* tiffptr, tstrip_t a, tdata_t b, tsize_t c)); /* 82 */
-    tsize_t (*tIFFWriteEncodedTile) _ANSI_ARGS_((TIFF* tiffptr, ttile_t a, tdata_t b, tsize_t c)); /* 83 */
-    tsize_t (*tIFFWriteRawTile) _ANSI_ARGS_((TIFF* tiffptr, ttile_t c, tdata_t b, tsize_t a)); /* 84 */
-    void (*tIFFSetWriteOffset) _ANSI_ARGS_((TIFF* tiffptr, toff_t a)); /* 85 */
-    void (*tIFFSwabShort) _ANSI_ARGS_((uint16* a)); /* 86 */
-    void (*tIFFSwabLong) _ANSI_ARGS_((uint32* a)); /* 87 */
-    void (*tIFFSwabDouble) _ANSI_ARGS_((double* a)); /* 88 */
-    void (*tIFFSwabArrayOfShort) _ANSI_ARGS_((uint16* a, unsigned long b)); /* 89 */
-    void (*tIFFSwabArrayOfLong) _ANSI_ARGS_((uint32* b, unsigned long a)); /* 90 */
-    void (*tIFFSwabArrayOfDouble) _ANSI_ARGS_((double* a, unsigned long b)); /* 91 */
-    void (*tIFFReverseBits) _ANSI_ARGS_((unsigned char* a, unsigned long b)); /* 92 */
-    const unsigned char* (*tIFFGetBitRevTable) _ANSI_ARGS_((int a)); /* 93 */
-    void *reserved94;
-    void *reserved95;
-    void *reserved96;
-    void *reserved97;
-    void *reserved98;
-    void *reserved99;
-    int (*tIFFPredictorInit) _ANSI_ARGS_((TIFF* tiffptr)); /* 100 */
-    void *reserved101;
-    void *reserved102;
-    void *reserved103;
-    void *reserved104;
-    void *reserved105;
-    void *reserved106;
-    void *reserved107;
-    void *reserved108;
-    void *reserved109;
-    void (*_TIFFSetupFieldInfo) _ANSI_ARGS_((TIFF* tiffptr)); /* 110 */
-    void (*tIFFMergeFieldInfo) _ANSI_ARGS_((TIFF* tiffptr, const TIFFFieldInfo* a, int b)); /* 111 */
-    void (*_TIFFPrintFieldInfo) _ANSI_ARGS_((TIFF* tiffptr, FILE* a)); /* 112 */
-    const TIFFFieldInfo* (*tIFFFindFieldInfo) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a, TIFFDataType b)); /* 113 */
-    const TIFFFieldInfo* (*tIFFFieldWithTag) _ANSI_ARGS_((TIFF* tiffptr, ttag_t a)); /* 114 */
-    TIFFDataType (*_TIFFSampleToTagType) _ANSI_ARGS_((TIFF* tiffptr)); /* 115 */
-    void *reserved116;
-    void *reserved117;
-    void *reserved118;
-    void *reserved119;
-    int (*_TIFFgetMode) _ANSI_ARGS_((const char* a, const char* b)); /* 120 */
-    int (*_TIFFNoRowEncode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)); /* 121 */
-    int (*_TIFFNoStripEncode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)); /* 122 */
-    int (*_TIFFNoTileEncode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)); /* 123 */
-    int (*_TIFFNoRowDecode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)); /* 124 */
-    int (*_TIFFNoStripDecode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b, tsample_t c)); /* 125 */
-    int (*_TIFFNoTileDecode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t c, tsize_t b, tsample_t a)); /* 126 */
-    void (*_TIFFNoPostDecode) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b)); /* 127 */
-    int (*_TIFFNoPreCode) _ANSI_ARGS_((TIFF* tiffptr, tsample_t a)); /* 128 */
-    int (*_TIFFNoSeek) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 129 */
-    void (*_TIFFSwab16BitData) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b)); /* 130 */
-    void (*_TIFFSwab32BitData) _ANSI_ARGS_((TIFF* tiffptr, tidata_t b, tsize_t a)); /* 131 */
-    void (*_TIFFSwab64BitData) _ANSI_ARGS_((TIFF* tiffptr, tidata_t a, tsize_t b)); /* 132 */
-    int (*tIFFFlushData1) _ANSI_ARGS_((TIFF* tiffptr)); /* 133 */
-    void (*tIFFFreeDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 134 */
-    int (*tIFFDefaultDirectory) _ANSI_ARGS_((TIFF* tiffptr)); /* 135 */
-    int (*tIFFSetCompressionScheme) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 136 */
-    int (*_TIFFSetDefaultCompressionState) _ANSI_ARGS_((TIFF* tiffptr)); /* 137 */
-    uint32 (*_TIFFDefaultStripSize) _ANSI_ARGS_((TIFF* tiffptr, uint32 a)); /* 138 */
-    void (*_TIFFDefaultTileSize) _ANSI_ARGS_((TIFF* tiffptr, uint32* a, uint32* b)); /* 139 */
-    void (*_TIFFsetByteArray) _ANSI_ARGS_((void** a, void* b, long c)); /* 140 */
-    void (*_TIFFsetString) _ANSI_ARGS_((char** a, char* b)); /* 141 */
-    void (*_TIFFsetShortArray) _ANSI_ARGS_((uint16** a, uint16* b, long c)); /* 142 */
-    void (*_TIFFsetLongArray) _ANSI_ARGS_((uint32** a, uint32* b, long c)); /* 143 */
-    void (*_TIFFsetFloatArray) _ANSI_ARGS_((float** a, float* b, long c)); /* 144 */
-    void (*_TIFFsetDoubleArray) _ANSI_ARGS_((double** a, double* b, long c)); /* 145 */
-    void (*_TIFFprintAscii) _ANSI_ARGS_((FILE* a, const char* b)); /* 146 */
-    void (*_TIFFprintAsciiTag) _ANSI_ARGS_((FILE* a, const char* b, const char* c)); /* 147 */
-    int (*tIFFInitDumpMode) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 148 */
-    int (*tIFFInitPackBits) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 149 */
-    int (*tIFFInitCCITTRLE) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 150 */
-    int (*tIFFInitCCITTRLEW) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 151 */
-    int (*tIFFInitCCITTFax3) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 152 */
-    int (*tIFFInitCCITTFax4) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 153 */
-    int (*tIFFInitThunderScan) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 154 */
-    int (*tIFFInitNeXT) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 155 */
-    int (*tIFFInitLZW) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 156 */
-    int (*tIFFInitOJPEG) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 157 */
-    int (*tIFFInitJPEG) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 158 */
-    int (*tIFFInitJBIG) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 159 */
-    int (*tIFFInitZIP) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 160 */
-    int (*tIFFInitPixarLog) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 161 */
-    int (*tIFFInitSGILog) _ANSI_ARGS_((TIFF* tiffptr, int a)); /* 162 */
-} TifftclStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern TifftclStubs *tifftclStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_TIFFTCL_STUBS) && !defined(USE_TIFFTCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef TIFFGetVersion
-#define TIFFGetVersion \
-	(tifftclStubsPtr->tIFFGetVersion) /* 0 */
-#endif
-#ifndef TIFFFindCODEC
-#define TIFFFindCODEC \
-	(tifftclStubsPtr->tIFFFindCODEC) /* 1 */
-#endif
-#ifndef TIFFRegisterCODEC
-#define TIFFRegisterCODEC \
-	(tifftclStubsPtr->tIFFRegisterCODEC) /* 2 */
-#endif
-#ifndef TIFFUnRegisterCODEC
-#define TIFFUnRegisterCODEC \
-	(tifftclStubsPtr->tIFFUnRegisterCODEC) /* 3 */
-#endif
-#ifndef _TIFFmalloc
-#define _TIFFmalloc \
-	(tifftclStubsPtr->_TIFFmalloc) /* 4 */
-#endif
-#ifndef _TIFFrealloc
-#define _TIFFrealloc \
-	(tifftclStubsPtr->_TIFFrealloc) /* 5 */
-#endif
-#ifndef _TIFFmemset
-#define _TIFFmemset \
-	(tifftclStubsPtr->_TIFFmemset) /* 6 */
-#endif
-#ifndef _TIFFmemcpy
-#define _TIFFmemcpy \
-	(tifftclStubsPtr->_TIFFmemcpy) /* 7 */
-#endif
-#ifndef _TIFFmemcmp
-#define _TIFFmemcmp \
-	(tifftclStubsPtr->_TIFFmemcmp) /* 8 */
-#endif
-#ifndef _TIFFfree
-#define _TIFFfree \
-	(tifftclStubsPtr->_TIFFfree) /* 9 */
-#endif
-#ifndef TIFFClose
-#define TIFFClose \
-	(tifftclStubsPtr->tIFFClose) /* 10 */
-#endif
-#ifndef TIFFFlush
-#define TIFFFlush \
-	(tifftclStubsPtr->tIFFFlush) /* 11 */
-#endif
-#ifndef TIFFFlushData
-#define TIFFFlushData \
-	(tifftclStubsPtr->tIFFFlushData) /* 12 */
-#endif
-#ifndef TIFFGetField
-#define TIFFGetField \
-	(tifftclStubsPtr->tIFFGetField) /* 13 */
-#endif
-#ifndef TIFFVGetField
-#define TIFFVGetField \
-	(tifftclStubsPtr->tIFFVGetField) /* 14 */
-#endif
-#ifndef TIFFGetFieldDefaulted
-#define TIFFGetFieldDefaulted \
-	(tifftclStubsPtr->tIFFGetFieldDefaulted) /* 15 */
-#endif
-#ifndef TIFFVGetFieldDefaulted
-#define TIFFVGetFieldDefaulted \
-	(tifftclStubsPtr->tIFFVGetFieldDefaulted) /* 16 */
-#endif
-#ifndef TIFFReadDirectory
-#define TIFFReadDirectory \
-	(tifftclStubsPtr->tIFFReadDirectory) /* 17 */
-#endif
-#ifndef TIFFScanlineSize
-#define TIFFScanlineSize \
-	(tifftclStubsPtr->tIFFScanlineSize) /* 18 */
-#endif
-#ifndef TIFFRasterScanlineSize
-#define TIFFRasterScanlineSize \
-	(tifftclStubsPtr->tIFFRasterScanlineSize) /* 19 */
-#endif
-#ifndef TIFFStripSize
-#define TIFFStripSize \
-	(tifftclStubsPtr->tIFFStripSize) /* 20 */
-#endif
-#ifndef TIFFVStripSize
-#define TIFFVStripSize \
-	(tifftclStubsPtr->tIFFVStripSize) /* 21 */
-#endif
-#ifndef TIFFTileRowSize
-#define TIFFTileRowSize \
-	(tifftclStubsPtr->tIFFTileRowSize) /* 22 */
-#endif
-#ifndef TIFFTileSize
-#define TIFFTileSize \
-	(tifftclStubsPtr->tIFFTileSize) /* 23 */
-#endif
-#ifndef TIFFVTileSize
-#define TIFFVTileSize \
-	(tifftclStubsPtr->tIFFVTileSize) /* 24 */
-#endif
-#ifndef TIFFDefaultStripSize
-#define TIFFDefaultStripSize \
-	(tifftclStubsPtr->tIFFDefaultStripSize) /* 25 */
-#endif
-#ifndef TIFFDefaultTileSize
-#define TIFFDefaultTileSize \
-	(tifftclStubsPtr->tIFFDefaultTileSize) /* 26 */
-#endif
-#ifndef TIFFFileno
-#define TIFFFileno \
-	(tifftclStubsPtr->tIFFFileno) /* 27 */
-#endif
-#ifndef TIFFGetMode
-#define TIFFGetMode \
-	(tifftclStubsPtr->tIFFGetMode) /* 28 */
-#endif
-#ifndef TIFFIsTiled
-#define TIFFIsTiled \
-	(tifftclStubsPtr->tIFFIsTiled) /* 29 */
-#endif
-#ifndef TIFFIsByteSwapped
-#define TIFFIsByteSwapped \
-	(tifftclStubsPtr->tIFFIsByteSwapped) /* 30 */
-#endif
-#ifndef TIFFIsUpSampled
-#define TIFFIsUpSampled \
-	(tifftclStubsPtr->tIFFIsUpSampled) /* 31 */
-#endif
-#ifndef TIFFIsMSB2LSB
-#define TIFFIsMSB2LSB \
-	(tifftclStubsPtr->tIFFIsMSB2LSB) /* 32 */
-#endif
-#ifndef TIFFCurrentRow
-#define TIFFCurrentRow \
-	(tifftclStubsPtr->tIFFCurrentRow) /* 33 */
-#endif
-#ifndef TIFFCurrentDirectory
-#define TIFFCurrentDirectory \
-	(tifftclStubsPtr->tIFFCurrentDirectory) /* 34 */
-#endif
-#ifndef TIFFNumberOfDirectories
-#define TIFFNumberOfDirectories \
-	(tifftclStubsPtr->tIFFNumberOfDirectories) /* 35 */
-#endif
-#ifndef TIFFCurrentDirOffset
-#define TIFFCurrentDirOffset \
-	(tifftclStubsPtr->tIFFCurrentDirOffset) /* 36 */
-#endif
-#ifndef TIFFCurrentStrip
-#define TIFFCurrentStrip \
-	(tifftclStubsPtr->tIFFCurrentStrip) /* 37 */
-#endif
-#ifndef TIFFCurrentTile
-#define TIFFCurrentTile \
-	(tifftclStubsPtr->tIFFCurrentTile) /* 38 */
-#endif
-#ifndef TIFFReadBufferSetup
-#define TIFFReadBufferSetup \
-	(tifftclStubsPtr->tIFFReadBufferSetup) /* 39 */
-#endif
-#ifndef TIFFWriteBufferSetup
-#define TIFFWriteBufferSetup \
-	(tifftclStubsPtr->tIFFWriteBufferSetup) /* 40 */
-#endif
-#ifndef TIFFWriteCheck
-#define TIFFWriteCheck \
-	(tifftclStubsPtr->tIFFWriteCheck) /* 41 */
-#endif
-#ifndef TIFFCreateDirectory
-#define TIFFCreateDirectory \
-	(tifftclStubsPtr->tIFFCreateDirectory) /* 42 */
-#endif
-#ifndef TIFFLastDirectory
-#define TIFFLastDirectory \
-	(tifftclStubsPtr->tIFFLastDirectory) /* 43 */
-#endif
-#ifndef TIFFSetDirectory
-#define TIFFSetDirectory \
-	(tifftclStubsPtr->tIFFSetDirectory) /* 44 */
-#endif
-#ifndef TIFFSetSubDirectory
-#define TIFFSetSubDirectory \
-	(tifftclStubsPtr->tIFFSetSubDirectory) /* 45 */
-#endif
-#ifndef TIFFUnlinkDirectory
-#define TIFFUnlinkDirectory \
-	(tifftclStubsPtr->tIFFUnlinkDirectory) /* 46 */
-#endif
-#ifndef TIFFSetField
-#define TIFFSetField \
-	(tifftclStubsPtr->tIFFSetField) /* 47 */
-#endif
-#ifndef TIFFVSetField
-#define TIFFVSetField \
-	(tifftclStubsPtr->tIFFVSetField) /* 48 */
-#endif
-#ifndef TIFFWriteDirectory
-#define TIFFWriteDirectory \
-	(tifftclStubsPtr->tIFFWriteDirectory) /* 49 */
-#endif
-#ifndef TIFFReassignTagToIgnore
-#define TIFFReassignTagToIgnore \
-	(tifftclStubsPtr->tIFFReassignTagToIgnore) /* 50 */
-#endif
-#ifndef TIFFPrintDirectory
-#define TIFFPrintDirectory \
-	(tifftclStubsPtr->tIFFPrintDirectory) /* 51 */
-#endif
-#ifndef TIFFReadScanline
-#define TIFFReadScanline \
-	(tifftclStubsPtr->tIFFReadScanline) /* 52 */
-#endif
-#ifndef TIFFWriteScanline
-#define TIFFWriteScanline \
-	(tifftclStubsPtr->tIFFWriteScanline) /* 53 */
-#endif
-#ifndef TIFFReadRGBAImage
-#define TIFFReadRGBAImage \
-	(tifftclStubsPtr->tIFFReadRGBAImage) /* 54 */
-#endif
-#ifndef TIFFReadRGBAStrip
-#define TIFFReadRGBAStrip \
-	(tifftclStubsPtr->tIFFReadRGBAStrip) /* 55 */
-#endif
-#ifndef TIFFReadRGBATile
-#define TIFFReadRGBATile \
-	(tifftclStubsPtr->tIFFReadRGBATile) /* 56 */
-#endif
-#ifndef TIFFRGBAImageOK
-#define TIFFRGBAImageOK \
-	(tifftclStubsPtr->tIFFRGBAImageOK) /* 57 */
-#endif
-#ifndef TIFFRGBAImageBegin
-#define TIFFRGBAImageBegin \
-	(tifftclStubsPtr->tIFFRGBAImageBegin) /* 58 */
-#endif
-#ifndef TIFFRGBAImageGet
-#define TIFFRGBAImageGet \
-	(tifftclStubsPtr->tIFFRGBAImageGet) /* 59 */
-#endif
-#ifndef TIFFRGBAImageEnd
-#define TIFFRGBAImageEnd \
-	(tifftclStubsPtr->tIFFRGBAImageEnd) /* 60 */
-#endif
-#ifndef TIFFOpen
-#define TIFFOpen \
-	(tifftclStubsPtr->tIFFOpen) /* 61 */
-#endif
-#ifndef TIFFFdOpen
-#define TIFFFdOpen \
-	(tifftclStubsPtr->tIFFFdOpen) /* 62 */
-#endif
-#ifndef TIFFClientOpen
-#define TIFFClientOpen \
-	(tifftclStubsPtr->tIFFClientOpen) /* 63 */
-#endif
-#ifndef TIFFFileName
-#define TIFFFileName \
-	(tifftclStubsPtr->tIFFFileName) /* 64 */
-#endif
-#ifndef TIFFError
-#define TIFFError \
-	(tifftclStubsPtr->tIFFError) /* 65 */
-#endif
-#ifndef TIFFWarning
-#define TIFFWarning \
-	(tifftclStubsPtr->tIFFWarning) /* 66 */
-#endif
-#ifndef TIFFSetErrorHandler
-#define TIFFSetErrorHandler \
-	(tifftclStubsPtr->tIFFSetErrorHandler) /* 67 */
-#endif
-#ifndef TIFFSetWarningHandler
-#define TIFFSetWarningHandler \
-	(tifftclStubsPtr->tIFFSetWarningHandler) /* 68 */
-#endif
-#ifndef TIFFSetTagExtender
-#define TIFFSetTagExtender \
-	(tifftclStubsPtr->tIFFSetTagExtender) /* 69 */
-#endif
-#ifndef TIFFComputeTile
-#define TIFFComputeTile \
-	(tifftclStubsPtr->tIFFComputeTile) /* 70 */
-#endif
-#ifndef TIFFCheckTile
-#define TIFFCheckTile \
-	(tifftclStubsPtr->tIFFCheckTile) /* 71 */
-#endif
-#ifndef TIFFNumberOfTiles
-#define TIFFNumberOfTiles \
-	(tifftclStubsPtr->tIFFNumberOfTiles) /* 72 */
-#endif
-#ifndef TIFFReadTile
-#define TIFFReadTile \
-	(tifftclStubsPtr->tIFFReadTile) /* 73 */
-#endif
-#ifndef TIFFWriteTile
-#define TIFFWriteTile \
-	(tifftclStubsPtr->tIFFWriteTile) /* 74 */
-#endif
-#ifndef TIFFComputeStrip
-#define TIFFComputeStrip \
-	(tifftclStubsPtr->tIFFComputeStrip) /* 75 */
-#endif
-#ifndef TIFFNumberOfStrips
-#define TIFFNumberOfStrips \
-	(tifftclStubsPtr->tIFFNumberOfStrips) /* 76 */
-#endif
-#ifndef TIFFReadEncodedStrip
-#define TIFFReadEncodedStrip \
-	(tifftclStubsPtr->tIFFReadEncodedStrip) /* 77 */
-#endif
-#ifndef TIFFReadRawStrip
-#define TIFFReadRawStrip \
-	(tifftclStubsPtr->tIFFReadRawStrip) /* 78 */
-#endif
-#ifndef TIFFReadEncodedTile
-#define TIFFReadEncodedTile \
-	(tifftclStubsPtr->tIFFReadEncodedTile) /* 79 */
-#endif
-#ifndef TIFFReadRawTile
-#define TIFFReadRawTile \
-	(tifftclStubsPtr->tIFFReadRawTile) /* 80 */
-#endif
-#ifndef TIFFWriteEncodedStrip
-#define TIFFWriteEncodedStrip \
-	(tifftclStubsPtr->tIFFWriteEncodedStrip) /* 81 */
-#endif
-#ifndef TIFFWriteRawStrip
-#define TIFFWriteRawStrip \
-	(tifftclStubsPtr->tIFFWriteRawStrip) /* 82 */
-#endif
-#ifndef TIFFWriteEncodedTile
-#define TIFFWriteEncodedTile \
-	(tifftclStubsPtr->tIFFWriteEncodedTile) /* 83 */
-#endif
-#ifndef TIFFWriteRawTile
-#define TIFFWriteRawTile \
-	(tifftclStubsPtr->tIFFWriteRawTile) /* 84 */
-#endif
-#ifndef TIFFSetWriteOffset
-#define TIFFSetWriteOffset \
-	(tifftclStubsPtr->tIFFSetWriteOffset) /* 85 */
-#endif
-#ifndef TIFFSwabShort
-#define TIFFSwabShort \
-	(tifftclStubsPtr->tIFFSwabShort) /* 86 */
-#endif
-#ifndef TIFFSwabLong
-#define TIFFSwabLong \
-	(tifftclStubsPtr->tIFFSwabLong) /* 87 */
-#endif
-#ifndef TIFFSwabDouble
-#define TIFFSwabDouble \
-	(tifftclStubsPtr->tIFFSwabDouble) /* 88 */
-#endif
-#ifndef TIFFSwabArrayOfShort
-#define TIFFSwabArrayOfShort \
-	(tifftclStubsPtr->tIFFSwabArrayOfShort) /* 89 */
-#endif
-#ifndef TIFFSwabArrayOfLong
-#define TIFFSwabArrayOfLong \
-	(tifftclStubsPtr->tIFFSwabArrayOfLong) /* 90 */
-#endif
-#ifndef TIFFSwabArrayOfDouble
-#define TIFFSwabArrayOfDouble \
-	(tifftclStubsPtr->tIFFSwabArrayOfDouble) /* 91 */
-#endif
-#ifndef TIFFReverseBits
-#define TIFFReverseBits \
-	(tifftclStubsPtr->tIFFReverseBits) /* 92 */
-#endif
-#ifndef TIFFGetBitRevTable
-#define TIFFGetBitRevTable \
-	(tifftclStubsPtr->tIFFGetBitRevTable) /* 93 */
-#endif
-/* Slot 94 is reserved */
-/* Slot 95 is reserved */
-/* Slot 96 is reserved */
-/* Slot 97 is reserved */
-/* Slot 98 is reserved */
-/* Slot 99 is reserved */
-#ifndef TIFFPredictorInit
-#define TIFFPredictorInit \
-	(tifftclStubsPtr->tIFFPredictorInit) /* 100 */
-#endif
-/* Slot 101 is reserved */
-/* Slot 102 is reserved */
-/* Slot 103 is reserved */
-/* Slot 104 is reserved */
-/* Slot 105 is reserved */
-/* Slot 106 is reserved */
-/* Slot 107 is reserved */
-/* Slot 108 is reserved */
-/* Slot 109 is reserved */
-#ifndef _TIFFSetupFieldInfo
-#define _TIFFSetupFieldInfo \
-	(tifftclStubsPtr->_TIFFSetupFieldInfo) /* 110 */
-#endif
-#ifndef TIFFMergeFieldInfo
-#define TIFFMergeFieldInfo \
-	(tifftclStubsPtr->tIFFMergeFieldInfo) /* 111 */
-#endif
-#ifndef _TIFFPrintFieldInfo
-#define _TIFFPrintFieldInfo \
-	(tifftclStubsPtr->_TIFFPrintFieldInfo) /* 112 */
-#endif
-#ifndef TIFFFindFieldInfo
-#define TIFFFindFieldInfo \
-	(tifftclStubsPtr->tIFFFindFieldInfo) /* 113 */
-#endif
-#ifndef TIFFFieldWithTag
-#define TIFFFieldWithTag \
-	(tifftclStubsPtr->tIFFFieldWithTag) /* 114 */
-#endif
-#ifndef _TIFFSampleToTagType
-#define _TIFFSampleToTagType \
-	(tifftclStubsPtr->_TIFFSampleToTagType) /* 115 */
-#endif
-/* Slot 116 is reserved */
-/* Slot 117 is reserved */
-/* Slot 118 is reserved */
-/* Slot 119 is reserved */
-#ifndef _TIFFgetMode
-#define _TIFFgetMode \
-	(tifftclStubsPtr->_TIFFgetMode) /* 120 */
-#endif
-#ifndef _TIFFNoRowEncode
-#define _TIFFNoRowEncode \
-	(tifftclStubsPtr->_TIFFNoRowEncode) /* 121 */
-#endif
-#ifndef _TIFFNoStripEncode
-#define _TIFFNoStripEncode \
-	(tifftclStubsPtr->_TIFFNoStripEncode) /* 122 */
-#endif
-#ifndef _TIFFNoTileEncode
-#define _TIFFNoTileEncode \
-	(tifftclStubsPtr->_TIFFNoTileEncode) /* 123 */
-#endif
-#ifndef _TIFFNoRowDecode
-#define _TIFFNoRowDecode \
-	(tifftclStubsPtr->_TIFFNoRowDecode) /* 124 */
-#endif
-#ifndef _TIFFNoStripDecode
-#define _TIFFNoStripDecode \
-	(tifftclStubsPtr->_TIFFNoStripDecode) /* 125 */
-#endif
-#ifndef _TIFFNoTileDecode
-#define _TIFFNoTileDecode \
-	(tifftclStubsPtr->_TIFFNoTileDecode) /* 126 */
-#endif
-#ifndef _TIFFNoPostDecode
-#define _TIFFNoPostDecode \
-	(tifftclStubsPtr->_TIFFNoPostDecode) /* 127 */
-#endif
-#ifndef _TIFFNoPreCode
-#define _TIFFNoPreCode \
-	(tifftclStubsPtr->_TIFFNoPreCode) /* 128 */
-#endif
-#ifndef _TIFFNoSeek
-#define _TIFFNoSeek \
-	(tifftclStubsPtr->_TIFFNoSeek) /* 129 */
-#endif
-#ifndef _TIFFSwab16BitData
-#define _TIFFSwab16BitData \
-	(tifftclStubsPtr->_TIFFSwab16BitData) /* 130 */
-#endif
-#ifndef _TIFFSwab32BitData
-#define _TIFFSwab32BitData \
-	(tifftclStubsPtr->_TIFFSwab32BitData) /* 131 */
-#endif
-#ifndef _TIFFSwab64BitData
-#define _TIFFSwab64BitData \
-	(tifftclStubsPtr->_TIFFSwab64BitData) /* 132 */
-#endif
-#ifndef TIFFFlushData1
-#define TIFFFlushData1 \
-	(tifftclStubsPtr->tIFFFlushData1) /* 133 */
-#endif
-#ifndef TIFFFreeDirectory
-#define TIFFFreeDirectory \
-	(tifftclStubsPtr->tIFFFreeDirectory) /* 134 */
-#endif
-#ifndef TIFFDefaultDirectory
-#define TIFFDefaultDirectory \
-	(tifftclStubsPtr->tIFFDefaultDirectory) /* 135 */
-#endif
-#ifndef TIFFSetCompressionScheme
-#define TIFFSetCompressionScheme \
-	(tifftclStubsPtr->tIFFSetCompressionScheme) /* 136 */
-#endif
-#ifndef _TIFFSetDefaultCompressionState
-#define _TIFFSetDefaultCompressionState \
-	(tifftclStubsPtr->_TIFFSetDefaultCompressionState) /* 137 */
-#endif
-#ifndef _TIFFDefaultStripSize
-#define _TIFFDefaultStripSize \
-	(tifftclStubsPtr->_TIFFDefaultStripSize) /* 138 */
-#endif
-#ifndef _TIFFDefaultTileSize
-#define _TIFFDefaultTileSize \
-	(tifftclStubsPtr->_TIFFDefaultTileSize) /* 139 */
-#endif
-#ifndef _TIFFsetByteArray
-#define _TIFFsetByteArray \
-	(tifftclStubsPtr->_TIFFsetByteArray) /* 140 */
-#endif
-#ifndef _TIFFsetString
-#define _TIFFsetString \
-	(tifftclStubsPtr->_TIFFsetString) /* 141 */
-#endif
-#ifndef _TIFFsetShortArray
-#define _TIFFsetShortArray \
-	(tifftclStubsPtr->_TIFFsetShortArray) /* 142 */
-#endif
-#ifndef _TIFFsetLongArray
-#define _TIFFsetLongArray \
-	(tifftclStubsPtr->_TIFFsetLongArray) /* 143 */
-#endif
-#ifndef _TIFFsetFloatArray
-#define _TIFFsetFloatArray \
-	(tifftclStubsPtr->_TIFFsetFloatArray) /* 144 */
-#endif
-#ifndef _TIFFsetDoubleArray
-#define _TIFFsetDoubleArray \
-	(tifftclStubsPtr->_TIFFsetDoubleArray) /* 145 */
-#endif
-#ifndef _TIFFprintAscii
-#define _TIFFprintAscii \
-	(tifftclStubsPtr->_TIFFprintAscii) /* 146 */
-#endif
-#ifndef _TIFFprintAsciiTag
-#define _TIFFprintAsciiTag \
-	(tifftclStubsPtr->_TIFFprintAsciiTag) /* 147 */
-#endif
-#ifndef TIFFInitDumpMode
-#define TIFFInitDumpMode \
-	(tifftclStubsPtr->tIFFInitDumpMode) /* 148 */
-#endif
-#ifndef TIFFInitPackBits
-#define TIFFInitPackBits \
-	(tifftclStubsPtr->tIFFInitPackBits) /* 149 */
-#endif
-#ifndef TIFFInitCCITTRLE
-#define TIFFInitCCITTRLE \
-	(tifftclStubsPtr->tIFFInitCCITTRLE) /* 150 */
-#endif
-#ifndef TIFFInitCCITTRLEW
-#define TIFFInitCCITTRLEW \
-	(tifftclStubsPtr->tIFFInitCCITTRLEW) /* 151 */
-#endif
-#ifndef TIFFInitCCITTFax3
-#define TIFFInitCCITTFax3 \
-	(tifftclStubsPtr->tIFFInitCCITTFax3) /* 152 */
-#endif
-#ifndef TIFFInitCCITTFax4
-#define TIFFInitCCITTFax4 \
-	(tifftclStubsPtr->tIFFInitCCITTFax4) /* 153 */
-#endif
-#ifndef TIFFInitThunderScan
-#define TIFFInitThunderScan \
-	(tifftclStubsPtr->tIFFInitThunderScan) /* 154 */
-#endif
-#ifndef TIFFInitNeXT
-#define TIFFInitNeXT \
-	(tifftclStubsPtr->tIFFInitNeXT) /* 155 */
-#endif
-#ifndef TIFFInitLZW
-#define TIFFInitLZW \
-	(tifftclStubsPtr->tIFFInitLZW) /* 156 */
-#endif
-#ifndef TIFFInitOJPEG
-#define TIFFInitOJPEG \
-	(tifftclStubsPtr->tIFFInitOJPEG) /* 157 */
-#endif
-#ifndef TIFFInitJPEG
-#define TIFFInitJPEG \
-	(tifftclStubsPtr->tIFFInitJPEG) /* 158 */
-#endif
-#ifndef TIFFInitJBIG
-#define TIFFInitJBIG \
-	(tifftclStubsPtr->tIFFInitJBIG) /* 159 */
-#endif
-#ifndef TIFFInitZIP
-#define TIFFInitZIP \
-	(tifftclStubsPtr->tIFFInitZIP) /* 160 */
-#endif
-#ifndef TIFFInitPixarLog
-#define TIFFInitPixarLog \
-	(tifftclStubsPtr->tIFFInitPixarLog) /* 161 */
-#endif
-#ifndef TIFFInitSGILog
-#define TIFFInitSGILog \
-	(tifftclStubsPtr->tIFFInitSGILog) /* 162 */
-#endif
-
-#endif /* defined(USE_TIFFTCL_STUBS) && !defined(USE_TIFFTCL_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _TIFFTCLDECLS */
-
diff --git a/tkimg1.3/libtiff/tcl/tifftclDeclsMask.h b/tkimg1.3/libtiff/tcl/tifftclDeclsMask.h
deleted file mode 100644
index 47d487e..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclDeclsMask.h
+++ /dev/null
@@ -1,154 +0,0 @@
-#ifdef WIN32
-/*
- * While the definitions in the original header are technically the
- * same as the definitions in 'zlibDecls.h' on Windows they are not,
- * in a small detail: DLLEXPORT vs. DLLIMPORT. As our artificial
- * definitions do the right thing we use the macro definitions below
- * to move the original definitionsd out of the way. We do retain the
- * inclusion of all the type definitions, etc.
- */
-#define TIFFGetVersion	__mask_TIFFGetVersion
-#define TIFFFindCODEC	__mask_TIFFFindCODEC
-#define TIFFRegisterCODEC	__mask_TIFFRegisterCODEC
-#define TIFFUnRegisterCODEC	__mask_TIFFUnRegisterCODEC
-#define _TIFFmalloc	__mask__TIFFmalloc
-#define _TIFFrealloc	__mask__TIFFrealloc
-#define _TIFFmemset	__mask__TIFFmemset
-#define _TIFFmemcpy	__mask__TIFFmemcpy
-#define _TIFFmemcmp	__mask__TIFFmemcmp
-#define _TIFFfree	__mask__TIFFfree
-#define TIFFClose	__mask_TIFFClose
-#define TIFFFlush	__mask_TIFFFlush
-#define TIFFFlushData	__mask_TIFFFlushData
-#define TIFFGetField	__mask_TIFFGetField
-#define TIFFVGetField	__mask_TIFFVGetField
-#define TIFFGetFieldDefaulted	__mask_TIFFGetFieldDefaulted
-#define TIFFVGetFieldDefaulted	__mask_TIFFVGetFieldDefaulted
-#define TIFFReadDirectory	__mask_TIFFReadDirectory
-#define TIFFScanlineSize	__mask_TIFFScanlineSize
-#define TIFFRasterScanlineSize	__mask_TIFFRasterScanlineSize
-#define TIFFStripSize	__mask_TIFFStripSize
-#define TIFFVStripSize	__mask_TIFFVStripSize
-#define TIFFTileRowSize	__mask_TIFFTileRowSize
-#define TIFFTileSize	__mask_TIFFTileSize
-#define TIFFVTileSize	__mask_TIFFVTileSize
-#define TIFFDefaultStripSize	__mask_TIFFDefaultStripSize
-#define TIFFDefaultTileSize	__mask_TIFFDefaultTileSize
-#define TIFFFileno	__mask_TIFFFileno
-#define TIFFGetMode	__mask_TIFFGetMode
-#define TIFFIsTiled	__mask_TIFFIsTiled
-#define TIFFIsByteSwapped	__mask_TIFFIsByteSwapped
-#define TIFFIsUpSampled	__mask_TIFFIsUpSampled
-#define TIFFIsMSB2LSB	__mask_TIFFIsMSB2LSB
-#define TIFFCurrentRow	__mask_TIFFCurrentRow
-#define TIFFCurrentDirectory	__mask_TIFFCurrentDirectory
-#define TIFFNumberOfDirectories	__mask_TIFFNumberOfDirectories
-#define TIFFCurrentDirOffset	__mask_TIFFCurrentDirOffset
-#define TIFFCurrentStrip	__mask_TIFFCurrentStrip
-#define TIFFCurrentTile	__mask_TIFFCurrentTile
-#define TIFFReadBufferSetup	__mask_TIFFReadBufferSetup
-#define TIFFWriteBufferSetup	__mask_TIFFWriteBufferSetup
-#define TIFFWriteCheck	__mask_TIFFWriteCheck
-#define TIFFCreateDirectory	__mask_TIFFCreateDirectory
-#define TIFFLastDirectory	__mask_TIFFLastDirectory
-#define TIFFSetDirectory	__mask_TIFFSetDirectory
-#define TIFFSetSubDirectory	__mask_TIFFSetSubDirectory
-#define TIFFUnlinkDirectory	__mask_TIFFUnlinkDirectory
-#define TIFFSetField	__mask_TIFFSetField
-#define TIFFVSetField	__mask_TIFFVSetField
-#define TIFFWriteDirectory	__mask_TIFFWriteDirectory
-#define TIFFReassignTagToIgnore	__mask_TIFFReassignTagToIgnore
-#define TIFFPrintDirectory	__mask_TIFFPrintDirectory
-#define TIFFReadScanline	__mask_TIFFReadScanline
-#define TIFFWriteScanline	__mask_TIFFWriteScanline
-#define TIFFReadRGBAImage	__mask_TIFFReadRGBAImage
-#define TIFFReadRGBAStrip	__mask_TIFFReadRGBAStrip
-#define TIFFReadRGBATile	__mask_TIFFReadRGBATile
-#define TIFFRGBAImageOK	__mask_TIFFRGBAImageOK
-#define TIFFRGBAImageBegin	__mask_TIFFRGBAImageBegin
-#define TIFFRGBAImageGet	__mask_TIFFRGBAImageGet
-#define TIFFRGBAImageEnd	__mask_TIFFRGBAImageEnd
-#define TIFFOpen	__mask_TIFFOpen
-#define TIFFFdOpen	__mask_TIFFFdOpen
-#define TIFFClientOpen	__mask_TIFFClientOpen
-#define TIFFFileName	__mask_TIFFFileName
-#define TIFFError	__mask_TIFFError
-#define TIFFWarning	__mask_TIFFWarning
-#define TIFFSetErrorHandler	__mask_TIFFSetErrorHandler
-#define TIFFSetWarningHandler	__mask_TIFFSetWarningHandler
-#define TIFFSetTagExtender	__mask_TIFFSetTagExtender
-#define TIFFComputeTile	__mask_TIFFComputeTile
-#define TIFFCheckTile	__mask_TIFFCheckTile
-#define TIFFNumberOfTiles	__mask_TIFFNumberOfTiles
-#define TIFFReadTile	__mask_TIFFReadTile
-#define TIFFWriteTile	__mask_TIFFWriteTile
-#define TIFFComputeStrip	__mask_TIFFComputeStrip
-#define TIFFNumberOfStrips	__mask_TIFFNumberOfStrips
-#define TIFFReadEncodedStrip	__mask_TIFFReadEncodedStrip
-#define TIFFReadRawStrip	__mask_TIFFReadRawStrip
-#define TIFFReadEncodedTile	__mask_TIFFReadEncodedTile
-#define TIFFReadRawTile	__mask_TIFFReadRawTile
-#define TIFFWriteEncodedStrip	__mask_TIFFWriteEncodedStrip
-#define TIFFWriteRawStrip	__mask_TIFFWriteRawStrip
-#define TIFFWriteEncodedTile	__mask_TIFFWriteEncodedTile
-#define TIFFWriteRawTile	__mask_TIFFWriteRawTile
-#define TIFFSetWriteOffset	__mask_TIFFSetWriteOffset
-#define TIFFSwabShort	__mask_TIFFSwabShort
-#define TIFFSwabLong	__mask_TIFFSwabLong
-#define TIFFSwabDouble	__mask_TIFFSwabDouble
-#define TIFFSwabArrayOfShort	__mask_TIFFSwabArrayOfShort
-#define TIFFSwabArrayOfLong	__mask_TIFFSwabArrayOfLong
-#define TIFFSwabArrayOfDouble	__mask_TIFFSwabArrayOfDouble
-#define TIFFReverseBits	__mask_TIFFReverseBits
-#define TIFFGetBitRevTable	__mask_TIFFGetBitRevTable
-#define TIFFPredictorInit	__mask_TIFFPredictorInit
-#define _TIFFSetupFieldInfo	__mask__TIFFSetupFieldInfo
-#define TIFFMergeFieldInfo	__mask__TIFFMergeFieldInfo
-#define _TIFFPrintFieldInfo	__mask__TIFFPrintFieldInfo
-#define TIFFFindFieldInfo	__mask__TIFFFindFieldInfo
-#define TIFFFieldWithTag	__mask__TIFFFieldWithTag
-#define _TIFFSampleToTagType	__mask__TIFFSampleToTagType
-#define _TIFFgetMode	__mask__TIFFgetMode
-#define _TIFFNoRowEncode	__mask__TIFFNoRowEncode
-#define _TIFFNoStripEncode	__mask__TIFFNoStripEncode
-#define _TIFFNoTileEncode	__mask__TIFFNoTileEncode
-#define _TIFFNoRowDecode	__mask__TIFFNoRowDecode
-#define _TIFFNoStripDecode	__mask__TIFFNoStripDecode
-#define _TIFFNoTileDecode	__mask__TIFFNoTileDecode
-#define _TIFFNoPostDecode	__mask__TIFFNoPostDecode
-#define _TIFFNoPreCode	__mask__TIFFNoPreCode
-#define _TIFFNoSeek	__mask__TIFFNoSeek
-#define _TIFFSwab16BitData	__mask__TIFFSwab16BitData
-#define _TIFFSwab32BitData	__mask__TIFFSwab32BitData
-#define _TIFFSwab64BitData	__mask__TIFFSwab64BitData
-#define TIFFFlushData1	__mask_TIFFFlushData1
-#define TIFFFreeDirectory	__mask_TIFFFreeDirectory
-#define TIFFDefaultDirectory	__mask_TIFFDefaultDirectory
-#define TIFFSetCompressionScheme	__mask_TIFFSetCompressionScheme
-#define TIFFSetDefaultCompressionState	__mask_TIFFSetDefaultCompressionState
-#define _TIFFDefaultStripSize	__mask__TIFFDefaultStripSize
-#define _TIFFDefaultTileSize	__mask__TIFFDefaultTileSize
-#define _TIFFsetByteArray	__mask__TIFFsetByteArray
-#define _TIFFsetString	__mask__TIFFsetString
-#define _TIFFsetShortArray	__mask__TIFFsetShortArray
-#define _TIFFsetLongArray	__mask__TIFFsetLongArray
-#define _TIFFsetFloatArray	__mask__TIFFsetFloatArray
-#define _TIFFsetDoubleArray	__mask__TIFFsetDoubleArray
-#define _TIFFprintAscii	__mask__TIFFprintAscii
-#define _TIFFprintAsciiTag	__mask__TIFFprintAsciiTag
-#define TIFFInitDumpMode	__mask_TIFFInitDumpMode
-#define TIFFInitPackBits	__mask_TIFFInitPackBits
-#define TIFFInitCCITTRLE	__mask_TIFFInitCCITTRLE
-#define TIFFInitCCITTRLEW	__mask_TIFFInitCCITTRLEW
-#define TIFFInitCCITTFax3	__mask_TIFFInitCCITTFax3
-#define TIFFInitCCITTFax4	__mask_TIFFInitCCITTFax4
-#define TIFFInitThunderScan	__mask_TIFFInitThunderScan
-#define TIFFInitNeXT	__mask_TIFFInitNeXT
-#define TIFFInitLZW	__mask_TIFFInitLZW
-#define TIFFInitOJPEG	__mask_TIFFInitOJPEG
-#define TIFFInitJPEG	__mask_TIFFInitJPEG
-#define TIFFInitJBIG	__mask_TIFFInitJBIG
-#define TIFFInitZIP	__mask_TIFFInitZIP
-#define TIFFInitPixarLog	__mask_TIFFInitPixarLog
-#define TIFFInitSGILog	__mask_TIFFInitSGILog
-#endif /* WIN32 */
diff --git a/tkimg1.3/libtiff/tcl/tifftclDeclsUnmask.h b/tkimg1.3/libtiff/tcl/tifftclDeclsUnmask.h
deleted file mode 100644
index 4dd05f9..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclDeclsUnmask.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#ifdef WIN32
-/* Restore the usage of the original names */
-#undef TIFFGetVersion
-#undef TIFFFindCODEC
-#undef TIFFRegisterCODEC
-#undef TIFFUnRegisterCODEC
-#undef _TIFFmalloc
-#undef _TIFFrealloc
-#undef _TIFFmemset
-#undef _TIFFmemcpy
-#undef _TIFFmemcmp
-#undef _TIFFfree
-#undef TIFFClose
-#undef TIFFFlush
-#undef TIFFFlushData
-#undef TIFFGetField
-#undef TIFFVGetField
-#undef TIFFGetFieldDefaulted
-#undef TIFFVGetFieldDefaulted
-#undef TIFFReadDirectory
-#undef TIFFScanlineSize
-#undef TIFFRasterScanlineSize
-#undef TIFFStripSize
-#undef TIFFVStripSize
-#undef TIFFTileRowSize
-#undef TIFFTileSize
-#undef TIFFVTileSize
-#undef TIFFDefaultStripSize
-#undef TIFFDefaultTileSize
-#undef TIFFFileno
-#undef TIFFGetMode
-#undef TIFFIsTiled
-#undef TIFFIsByteSwapped
-#undef TIFFIsUpSampled
-#undef TIFFIsMSB2LSB
-#undef TIFFCurrentRow
-#undef TIFFCurrentDirectory
-#undef TIFFNumberOfDirectories
-#undef TIFFCurrentDirOffset
-#undef TIFFCurrentStrip
-#undef TIFFCurrentTile
-#undef TIFFReadBufferSetup
-#undef TIFFWriteBufferSetup
-#undef TIFFWriteCheck
-#undef TIFFCreateDirectory
-#undef TIFFLastDirectory
-#undef TIFFSetDirectory
-#undef TIFFSetSubDirectory
-#undef TIFFUnlinkDirectory
-#undef TIFFSetField
-#undef TIFFVSetField
-#undef TIFFWriteDirectory
-#undef TIFFReassignTagToIgnore
-#undef TIFFPrintDirectory
-#undef TIFFReadScanline
-#undef TIFFWriteScanline
-#undef TIFFReadRGBAImage
-#undef TIFFReadRGBAStrip
-#undef TIFFReadRGBATile
-#undef TIFFRGBAImageOK
-#undef TIFFRGBAImageBegin
-#undef TIFFRGBAImageGet
-#undef TIFFRGBAImageEnd
-#undef TIFFOpen
-#undef TIFFFdOpen
-#undef TIFFClientOpen
-#undef TIFFFileName
-#undef TIFFError
-#undef TIFFWarning
-#undef TIFFSetErrorHandler
-#undef TIFFSetWarningHandler
-#undef TIFFSetTagExtender
-#undef TIFFComputeTile
-#undef TIFFCheckTile
-#undef TIFFNumberOfTiles
-#undef TIFFReadTile
-#undef TIFFWriteTile
-#undef TIFFComputeStrip
-#undef TIFFNumberOfStrips
-#undef TIFFReadEncodedStrip
-#undef TIFFReadRawStrip
-#undef TIFFReadEncodedTile
-#undef TIFFReadRawTile
-#undef TIFFWriteEncodedStrip
-#undef TIFFWriteRawStrip
-#undef TIFFWriteEncodedTile
-#undef TIFFWriteRawTile
-#undef TIFFSetWriteOffset
-#undef TIFFSwabShort
-#undef TIFFSwabLong
-#undef TIFFSwabDouble
-#undef TIFFSwabArrayOfShort
-#undef TIFFSwabArrayOfLong
-#undef TIFFSwabArrayOfDouble
-#undef TIFFReverseBits
-#undef TIFFGetBitRevTable
-#undef TIFFPredictorInit
-#undef _TIFFSetupFieldInfo
-#undef TIFFMergeFieldInfo
-#undef _TIFFPrintFieldInfo
-#undef TIFFFindFieldInfo
-#undef TIFFFieldWithTag
-#undef _TIFFSampleToTagType
-#undef _TIFFgetMode
-#undef _TIFFNoRowEncode
-#undef _TIFFNoStripEncode
-#undef _TIFFNoTileEncode
-#undef _TIFFNoRowDecode
-#undef _TIFFNoStripDecode
-#undef _TIFFNoTileDecode
-#undef _TIFFNoPostDecode
-#undef _TIFFNoPreCode
-#undef _TIFFNoSeek
-#undef _TIFFSwab16BitData
-#undef _TIFFSwab32BitData
-#undef _TIFFSwab64BitData
-#undef TIFFFlushData1
-#undef TIFFFreeDirectory
-#undef TIFFDefaultDirectory
-#undef TIFFSetCompressionScheme
-#undef TIFFSetDefaultCompressionState
-#undef _TIFFDefaultStripSize
-#undef _TIFFDefaultTileSize
-#undef _TIFFsetByteArray
-#undef _TIFFsetString
-#undef _TIFFsetShortArray
-#undef _TIFFsetLongArray
-#undef _TIFFsetFloatArray
-#undef _TIFFsetDoubleArray
-#undef _TIFFprintAscii
-#undef _TIFFprintAsciiTag
-#undef TIFFInitDumpMode
-#undef TIFFInitPackBits
-#undef TIFFInitCCITTRLE
-#undef TIFFInitCCITTRLEW
-#undef TIFFInitCCITTFax3
-#undef TIFFInitCCITTFax4
-#undef TIFFInitThunderScan
-#undef TIFFInitNeXT
-#undef TIFFInitLZW
-#undef TIFFInitOJPEG
-#undef TIFFInitJPEG
-#undef TIFFInitJBIG
-#undef TIFFInitZIP
-#undef TIFFInitPixarLog
-#undef TIFFInitSGILog
-#endif /* WIN32 */
diff --git a/tkimg1.3/libtiff/tcl/tifftclStubInit.c b/tkimg1.3/libtiff/tcl/tifftclStubInit.c
deleted file mode 100644
index 0e516f3..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclStubInit.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/* 
- * tifftclStubInit.c --
- */
-
-#include "tifftcl.h"
-
-/*
- * Remove macros that will interfere with the definitions below.
- */
-
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the tifftcl.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-TifftclStubs tifftclStubs = {
-    TCL_STUB_MAGIC,
-    NULL,
-    TIFFGetVersion, /* 0 */
-    TIFFFindCODEC, /* 1 */
-    TIFFRegisterCODEC, /* 2 */
-    TIFFUnRegisterCODEC, /* 3 */
-    _TIFFmalloc, /* 4 */
-    _TIFFrealloc, /* 5 */
-    _TIFFmemset, /* 6 */
-    _TIFFmemcpy, /* 7 */
-    _TIFFmemcmp, /* 8 */
-    _TIFFfree, /* 9 */
-    TIFFClose, /* 10 */
-    TIFFFlush, /* 11 */
-    TIFFFlushData, /* 12 */
-    TIFFGetField, /* 13 */
-    TIFFVGetField, /* 14 */
-    TIFFGetFieldDefaulted, /* 15 */
-    TIFFVGetFieldDefaulted, /* 16 */
-    TIFFReadDirectory, /* 17 */
-    TIFFScanlineSize, /* 18 */
-    TIFFRasterScanlineSize, /* 19 */
-    TIFFStripSize, /* 20 */
-    TIFFVStripSize, /* 21 */
-    TIFFTileRowSize, /* 22 */
-    TIFFTileSize, /* 23 */
-    TIFFVTileSize, /* 24 */
-    TIFFDefaultStripSize, /* 25 */
-    TIFFDefaultTileSize, /* 26 */
-    TIFFFileno, /* 27 */
-    TIFFGetMode, /* 28 */
-    TIFFIsTiled, /* 29 */
-    TIFFIsByteSwapped, /* 30 */
-    TIFFIsUpSampled, /* 31 */
-    TIFFIsMSB2LSB, /* 32 */
-    TIFFCurrentRow, /* 33 */
-    TIFFCurrentDirectory, /* 34 */
-    TIFFNumberOfDirectories, /* 35 */
-    TIFFCurrentDirOffset, /* 36 */
-    TIFFCurrentStrip, /* 37 */
-    TIFFCurrentTile, /* 38 */
-    TIFFReadBufferSetup, /* 39 */
-    TIFFWriteBufferSetup, /* 40 */
-    TIFFWriteCheck, /* 41 */
-    TIFFCreateDirectory, /* 42 */
-    TIFFLastDirectory, /* 43 */
-    TIFFSetDirectory, /* 44 */
-    TIFFSetSubDirectory, /* 45 */
-    TIFFUnlinkDirectory, /* 46 */
-    TIFFSetField, /* 47 */
-    TIFFVSetField, /* 48 */
-    TIFFWriteDirectory, /* 49 */
-    TIFFReassignTagToIgnore, /* 50 */
-    TIFFPrintDirectory, /* 51 */
-    TIFFReadScanline, /* 52 */
-    TIFFWriteScanline, /* 53 */
-    TIFFReadRGBAImage, /* 54 */
-    TIFFReadRGBAStrip, /* 55 */
-    TIFFReadRGBATile, /* 56 */
-    TIFFRGBAImageOK, /* 57 */
-    TIFFRGBAImageBegin, /* 58 */
-    TIFFRGBAImageGet, /* 59 */
-    TIFFRGBAImageEnd, /* 60 */
-    TIFFOpen, /* 61 */
-    TIFFFdOpen, /* 62 */
-    TIFFClientOpen, /* 63 */
-    TIFFFileName, /* 64 */
-    TIFFError, /* 65 */
-    TIFFWarning, /* 66 */
-    TIFFSetErrorHandler, /* 67 */
-    TIFFSetWarningHandler, /* 68 */
-    TIFFSetTagExtender, /* 69 */
-    TIFFComputeTile, /* 70 */
-    TIFFCheckTile, /* 71 */
-    TIFFNumberOfTiles, /* 72 */
-    TIFFReadTile, /* 73 */
-    TIFFWriteTile, /* 74 */
-    TIFFComputeStrip, /* 75 */
-    TIFFNumberOfStrips, /* 76 */
-    TIFFReadEncodedStrip, /* 77 */
-    TIFFReadRawStrip, /* 78 */
-    TIFFReadEncodedTile, /* 79 */
-    TIFFReadRawTile, /* 80 */
-    TIFFWriteEncodedStrip, /* 81 */
-    TIFFWriteRawStrip, /* 82 */
-    TIFFWriteEncodedTile, /* 83 */
-    TIFFWriteRawTile, /* 84 */
-    TIFFSetWriteOffset, /* 85 */
-    TIFFSwabShort, /* 86 */
-    TIFFSwabLong, /* 87 */
-    TIFFSwabDouble, /* 88 */
-    TIFFSwabArrayOfShort, /* 89 */
-    TIFFSwabArrayOfLong, /* 90 */
-    TIFFSwabArrayOfDouble, /* 91 */
-    TIFFReverseBits, /* 92 */
-    TIFFGetBitRevTable, /* 93 */
-    NULL, /* 94 */
-    NULL, /* 95 */
-    NULL, /* 96 */
-    NULL, /* 97 */
-    NULL, /* 98 */
-    NULL, /* 99 */
-    TIFFPredictorInit, /* 100 */
-    NULL, /* 101 */
-    NULL, /* 102 */
-    NULL, /* 103 */
-    NULL, /* 104 */
-    NULL, /* 105 */
-    NULL, /* 106 */
-    NULL, /* 107 */
-    NULL, /* 108 */
-    NULL, /* 109 */
-    _TIFFSetupFieldInfo, /* 110 */
-    TIFFMergeFieldInfo, /* 111 */
-    _TIFFPrintFieldInfo, /* 112 */
-    TIFFFindFieldInfo, /* 113 */
-    TIFFFieldWithTag, /* 114 */
-    _TIFFSampleToTagType, /* 115 */
-    NULL, /* 116 */
-    NULL, /* 117 */
-    NULL, /* 118 */
-    NULL, /* 119 */
-    _TIFFgetMode, /* 120 */
-    _TIFFNoRowEncode, /* 121 */
-    _TIFFNoStripEncode, /* 122 */
-    _TIFFNoTileEncode, /* 123 */
-    _TIFFNoRowDecode, /* 124 */
-    _TIFFNoStripDecode, /* 125 */
-    _TIFFNoTileDecode, /* 126 */
-    _TIFFNoPostDecode, /* 127 */
-    _TIFFNoPreCode, /* 128 */
-    _TIFFNoSeek, /* 129 */
-    _TIFFSwab16BitData, /* 130 */
-    _TIFFSwab32BitData, /* 131 */
-    _TIFFSwab64BitData, /* 132 */
-    TIFFFlushData1, /* 133 */
-    TIFFFreeDirectory, /* 134 */
-    TIFFDefaultDirectory, /* 135 */
-    TIFFSetCompressionScheme, /* 136 */
-    _TIFFSetDefaultCompressionState, /* 137 */
-    _TIFFDefaultStripSize, /* 138 */
-    _TIFFDefaultTileSize, /* 139 */
-    _TIFFsetByteArray, /* 140 */
-    _TIFFsetString, /* 141 */
-    _TIFFsetShortArray, /* 142 */
-    _TIFFsetLongArray, /* 143 */
-    _TIFFsetFloatArray, /* 144 */
-    _TIFFsetDoubleArray, /* 145 */
-    _TIFFprintAscii, /* 146 */
-    _TIFFprintAsciiTag, /* 147 */
-    TIFFInitDumpMode, /* 148 */
-#if !defined(PACKBITS_SUPPORT)
-    NULL, /* 149 */
-#else  /* !PACKBITS_SUPPORT */
-    TIFFInitPackBits, /* 149 */
-#endif /* !PACKBITS_SUPPORT */
-#if !defined(CCITT_SUPPORT)
-    NULL, /* 150 */
-#else  /* !CCITT_SUPPORT */
-    TIFFInitCCITTRLE, /* 150 */
-#endif /* !CCITT_SUPPORT */
-#if !defined(CCITT_SUPPORT)
-    NULL, /* 151 */
-#else  /* !CCITT_SUPPORT */
-    TIFFInitCCITTRLEW, /* 151 */
-#endif /* !CCITT_SUPPORT */
-#if !defined(CCITT_SUPPORT)
-    NULL, /* 152 */
-#else  /* !CCITT_SUPPORT */
-    TIFFInitCCITTFax3, /* 152 */
-#endif /* !CCITT_SUPPORT */
-#if !defined(CCITT_SUPPORT)
-    NULL, /* 153 */
-#else  /* !CCITT_SUPPORT */
-    TIFFInitCCITTFax4, /* 153 */
-#endif /* !CCITT_SUPPORT */
-#if !defined(THUNDER_SUPPORT)
-    NULL, /* 154 */
-#else  /* !THUNDER_SUPPORT */
-    TIFFInitThunderScan, /* 154 */
-#endif /* !THUNDER_SUPPORT */
-#if !defined(NEXT_SUPPORT)
-    NULL, /* 155 */
-#else  /* !NEXT_SUPPORT */
-    TIFFInitNeXT, /* 155 */
-#endif /* !NEXT_SUPPORT */
-#if !defined(LZW_SUPPORT)
-    NULL, /* 156 */
-#else  /* !LZW_SUPPORT */
-    TIFFInitLZW, /* 156 */
-#endif /* !LZW_SUPPORT */
-#if !defined(OJPEG_SUPPORT)
-    NULL, /* 157 */
-#else  /* !OJPEG_SUPPORT */
-    TIFFInitOJPEG, /* 157 */
-#endif /* !OJPEG_SUPPORT */
-#if !defined(JPEG_SUPPORT)
-    NULL, /* 158 */
-#else  /* !JPEG_SUPPORT */
-    TIFFInitJPEG, /* 158 */
-#endif /* !JPEG_SUPPORT */
-#if !defined(JBIG_SUPPORT)
-    NULL, /* 159 */
-#else  /* !JBIG_SUPPORT */
-    TIFFInitJBIG, /* 159 */
-#endif /* !JBIG_SUPPORT */
-#if !defined(ZIP_SUPPORT)
-    NULL, /* 160 */
-#else  /* !ZIP_SUPPORT */
-    TIFFInitZIP, /* 160 */
-#endif /* !ZIP_SUPPORT */
-#if !defined(PIXARLOG_SUPPORT)
-    NULL, /* 161 */
-#else  /* !PIXARLOG_SUPPORT */
-    TIFFInitPixarLog, /* 161 */
-#endif /* !PIXARLOG_SUPPORT */
-#if !defined(LOGLUV_SUPPORT)
-    NULL, /* 162 */
-#else  /* !LOGLUV_SUPPORT */
-    TIFFInitSGILog, /* 162 */
-#endif /* !LOGLUV_SUPPORT */
-};
-
-/* !END!: Do not edit above this line. */
diff --git a/tkimg1.3/libtiff/tcl/tifftclStubLib.c b/tkimg1.3/libtiff/tcl/tifftclStubLib.c
deleted file mode 100644
index 6180af1..0000000
--- a/tkimg1.3/libtiff/tcl/tifftclStubLib.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
- * tifftclStubLib.c --
- *
- *	Stub object that will be statically linked into extensions that wish
- *	to access the TIFFTCL API.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: tifftclStubLib.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- */
-
-#ifndef USE_TCL_STUBS
-#define USE_TCL_STUBS
-#endif
-
-#include "tifftcl.h"
-
-TifftclStubs *tifftclStubsPtr;
-
-/*
- *----------------------------------------------------------------------
- *
- * Tifftcl_InitStubs --
- *
- *	Checks that the correct version of Blt is loaded and that it
- *	supports stubs. It then initialises the stub table pointers.
- *
- * Results:
- *	The actual version of BLT that satisfies the request, or
- *	NULL to indicate that an error occurred.
- *
- * Side effects:
- *	Sets the stub table pointers.
- *
- *----------------------------------------------------------------------
- */
-
-#ifdef Tifftcl_InitStubs
-#undef Tifftcl_InitStubs
-#endif
-
-CONST char *
-Tifftcl_InitStubs(interp, version, exact)
-    Tcl_Interp *interp;
-    CONST char *version;
-    int exact;
-{
-    CONST char *result;
-
-    /* HACK: de-CONST 'version' if compiled against 8.3.
-     * The API has no CONST despite not modifying the argument
-     * And a debug build with high warning-level on windows
-     * will abort the compilation.
-     */
-
-#if ((TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)))
-#define UNCONST (char*)
-#else
-#define UNCONST 
-#endif
-
-    result = Tcl_PkgRequireEx(interp, PACKAGE_NAME, UNCONST version, exact,
-		(ClientData *) &tifftclStubsPtr);
-    if (!result || !tifftclStubsPtr) {
-        return (char *) NULL;
-    }
-
-    return result;
-}
-#undef UNCONST
diff --git a/tkimg1.3/libtiff/tcl/tools/genStubs.tcl b/tkimg1.3/libtiff/tcl/tools/genStubs.tcl
deleted file mode 100644
index aed52b9..0000000
--- a/tkimg1.3/libtiff/tcl/tools/genStubs.tcl
+++ /dev/null
@@ -1,976 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package require Tcl 8
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-
-    # stdarg --
-    #
-    # Boolean flag. Set to true if and only if the stub table depends
-    # on the usage of <stdarg.h>.
-
-    variable stdarg 0
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3 && [llength $args] != 4} {
-	puts stderr "wrong # args: declare $args"
-    }
-    if {[llength $args] == 3} {
-	lassign $args index platformList decl
-	set supressorList {}
-    } else {
-	lassign $args index platformList supressorList decl
-    }
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) [list $decl $supressorList]
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    variable stdarg
-
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "More than one argument in varargs form requires <stdarg.h>: $decl"
-	    set stdarg 1
-
-	    # Parsing all arguments as usual except for the last one (...).
-
-	    set args {}
-	    foreach arg [lrange $argList 0 end-1] {
-		set argInfo [parseArg $arg]
-		if {![string compare $argInfo "void"]} {
-		    lappend args "void"
-		    break
-		} elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		    lappend args $argInfo
-		} else {
-		    puts stderr "Bad argument: '$arg' in '$decl'"
-		    return
-		}
-	    }
-	    lappend args ...
-	} else {
-	    set arg [parseArg [lindex $argList 0]]
-	    if {$arg == "" || ([llength $arg] != 2)} {
-		puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-		return
-	    }
-	    set args [list TCL_VARARGS $arg]
-	}
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    set decl [lindex $decl 0] ; # ignore supressors here.
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    lassign $decl decl suppressors
-    if {[llength $suppressors] > 0} {
-	set sup [list]
-	foreach s $suppressors {
-	    if {[llength $s] > 1} {
-		# Note that elements in the sublist can be negated!
-		set and [list]
-		foreach i $s {
-		    if {[string match !* $i]} {
-			lappend and "!defined([string range $i 1 end])"
-		    } else {
-			lappend and "defined($i)"
-		    }
-		}
-		lappend sup "[join $and " && "]"
-	    } else {
-		if {[string match !* $s]} {
-		    lappend sup "!defined([string range $s 1 end])"
-		} else {
-		    lappend sup "defined($s)"
-		}
-	    }
-	}
-	append text "#if " [join $sup " || "] "\n"
-	append text "    NULL, /* " $index " */\n"
-	append text "#else  /* " [join $suppressors] " */\n"
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-	append text "#endif /* " [join $suppressors] " */\n"
-    } else {
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    }
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    variable stdarg
-    upvar $textVar text
-
-    if {$stdarg} {
-	# Write a check ensuring that we are using a compiler
-	# supporting <stdarg.h>.
-
-	append text "\n/*\n * Ensure usage of <stdarg.h>\n */\n\n"
-	append text "#if defined(NO_STDARG)\n"
-	append text "#  error \"This code requires <stdarg.h>\"\n"
-	append text "#else\n"
-	append text "#  include <stdarg.h>\n"
-	append text "#endif\n"
-    }
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/libtiff/test_pics.sh b/tkimg1.3/libtiff/test_pics.sh
deleted file mode 100755
index d9585c1..0000000
--- a/tkimg1.3/libtiff/test_pics.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-#	The -f force flag will force new logs to overwrite existing ones.
-#
-FORCE=0
-if test "$1" = "-f" ; then
-  FORCE=1
-  shift
-fi
-
-#
-#	Loop over all passed TIFF files
-#
-for a in $* ; do
-  BASE=`dirname $a`/`basename $a .tif`
-  tools/tiffdump $a > ${BASE}.rpt.new
-  
-  if test $FORCE = 1 ; then
-    mv ${BASE}.rpt.new ${BASE}.rpt
-    continue;
-  fi
-
-  if diff ${BASE}.rpt ${BASE}.rpt.new ; then
-    rm ${BASE}.rpt.new 
-  else
-    echo Differences between ${BASE}.rpt and ${BASE}.rpt.new
-  fi
-done
diff --git a/tkimg1.3/libtiff/tools/Makefile.in b/tkimg1.3/libtiff/tools/Makefile.in
deleted file mode 100644
index 03ab118..0000000
--- a/tkimg1.3/libtiff/tools/Makefile.in
+++ /dev/null
@@ -1,287 +0,0 @@
-#	$Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-#
-# @WARNING@
-#
-# TIFF Library Tools
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-DEPTH	= ..
-
-SRCDIR	= @RELSRCDIR@/tools
-LIBDIR	= @RELSRCDIR@/libtiff
-
-#
-# VERSION:	@VERSION@
-# DATE:		@DATE@
-# TARGET:	@TARGET@
-# CCOMPILER:	@CCOMPILER@
-#
-SHELL	= @SCRIPT_SH@
-SCRIPT_SH = @SCRIPT_SH@
-NULL	=
-CC	= @CCOMPILER@
-INSTALL	= @INSTALL@
-#
-COPTS	= @GCOPTS@
-OPTIMIZER=@OPTIMIZER@
-IPATH	= -I. -I${SRCDIR} -I${LIBDIR}
-CFLAGS	= @ENVOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH}
-#
-TIFFLIB	= ${DEPTH}/libtiff/libtiff. at DSOSUF@
-LIBJPEG	= @LIBJPEG@
-LIBGZ	= @LIBGZ@
-LIBTIFF	= @TIFFLIBREF@
-LIBPORT	= @LIBPORT@
-MACHLIBS= @MACHDEPLIBS@
-LIBS	= ${LIBTIFF} ${LIBJPEG} ${LIBGZ} ${LIBPORT} ${MACHLIBS}
-#
-OBJS=	\
-	fax2tiff.o \
-	fax2ps.o \
-	gif2tiff.o \
-	pal2rgb.o \
-	ppm2tiff.o \
-	rgb2ycbcr.o \
-	ras2tiff.o \
-	raw2tiff.o \
-	thumbnail.o \
-	tiff2bw.o \
-	tiff2rgba.o \
-	tiff2pdf.o \
-	tiff2ps.o \
-	tiffcmp.o \
-	tiffcp.o \
-	tiffdither.o \
-	tiffdump.o \
-	tiffinfo.o \
-	tiffmedian.o \
-	tiffsplit.o \
-	tiffset.o \
-	${NULL}
-TARGETS	=\
-	fax2tiff \
-	fax2ps \
-	gif2tiff \
-	pal2rgb \
-	ppm2tiff \
-	rgb2ycbcr \
-	thumbnail \
-	ras2tiff \
-	raw2tiff \
-	tiff2bw \
-	tiff2rgba \
-	tiff2pdf \
-	tiff2ps \
-	tiffcmp \
-	tiffcp \
-	tiffdither \
-	tiffdump \
-	tiffinfo \
-	tiffmedian \
-	tiffsplit \
-	tiffset \
-	${NULL}
-
-all:	${TARGETS}
-	@if [ "@LIBIMAGE@" = yes ]; then \
-	    ${MAKE} -${MAKEFLAGS} sgi2tiff; \
-	else \
-	    true; \
-	fi
-	@if [ "@LIBGL@" = yes ]; then \
-	    ${MAKE} -${MAKEFLAGS} tiffgt tiffsv; \
-	else \
-	    true; \
-	fi
-install: all
-	${INSTALL} -idb tiff.sw.tools -m 755 				\
-		-dir ${DESTDIR}@DIR_BIN@
-	${INSTALL} -idb tiff.sw.tools -m 755 				\
-		-F ${DESTDIR}@DIR_BIN@ -O ${TARGETS}
-	@if [ "@LIBIMAGE@" = yes ]; then 				\
-	    ${INSTALL} -idb tiff.sw.tools -m 755 			\
-		-F ${DESTDIR}@DIR_BIN@ -O sgi2tiff; 			\
-	else 								\
-	    true;							\
-	fi
-	@if [ "@LIBGL@" = yes ]; then 					\
-	    ${INSTALL} -idb tiff.sw.tools -m 755 -F ${DESTDIR}@DIR_BIN@ \
-		-O tiffgt tiffsv;					\
-	else 								\
-	    true; 							\
-	fi
-clean:
-	rm -f ${TARGETS} ${OBJS} tiffgt.o tiffgt sgisv.o tiffsv 	\
-	    sgi2tiff.o sgi2tiff core a.out ycbcr 
-
-#
-# System-independent tools
-#
-
-tiffinfo: tiffinfo.o ${TIFFLIB}
-	${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
-tiffinfo.o: ${SRCDIR}/tiffinfo.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
-
-tiffcmp:tiffcmp.o ${TIFFLIB}
-	${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
-tiffcmp.o: ${SRCDIR}/tiffcmp.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
-
-tiffcp:	tiffcp.o ${TIFFLIB}
-	${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
-tiffcp.o: ${SRCDIR}/tiffcp.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
-
-tiffdump: tiffdump.o
-	${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
-tiffdump.o: ${SRCDIR}/tiffdump.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
-
-tiffmedian: tiffmedian.o ${TIFFLIB}
-	${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
-tiffmedian.o: ${SRCDIR}/tiffmedian.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
-
-tiffsplit: tiffsplit.o ${TIFFLIB}
-	${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
-tiffsplit.o: ${SRCDIR}/tiffsplit.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
-
-tiff2pdf: tiff2pdf.o ${TIFFLIB}
-	${CC} -o tiff2pdf ${CFLAGS} tiff2pdf.o ${LIBS}
-tiff2pdf.o: ${SRCDIR}/tiff2pdf.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2pdf.c
-
-tiff2ps: tiff2ps.o ${TIFFLIB}
-	${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
-tiff2ps.o: ${SRCDIR}/tiff2ps.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
-
-tiffset: tiffset.o ${TIFFLIB}
-	${CC} -o tiffset ${CFLAGS} tiffset.o ${LIBS}
-tiffset.o: ${SRCDIR}/tiffset.c
-	${CC} -c ${CFLAGS} -I../libtiff ${SRCDIR}/tiffset.c
-
-#
-# Junky stuff... programs that are more examples of how
-# to use the library than full-blown useful tools.
-#
-
-# convert RGB image to B&W
-tiff2bw: tiff2bw.o ${TIFFLIB}
-	${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
-tiff2bw.o: ${SRCDIR}/tiff2bw.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
-
-# convert anything to RGBA.
-tiff2rgba: tiff2rgba.o ${TIFFLIB}
-	${CC} -o tiff2rgba ${CFLAGS} tiff2rgba.o ${LIBS}
-tiff2rgba.o: ${SRCDIR}/tiff2rgba.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2rgba.c
-
-# convert B&W image to bilevel w/ FS dithering
-tiffdither: tiffdither.o ${TIFFLIB}
-	${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
-tiffdither.o: ${SRCDIR}/tiffdither.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
-
-# simple Sun rasterfile converter
-ras2tiff: ras2tiff.o ${TIFFLIB}
-	${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
-ras2tiff.o: ${SRCDIR}/ras2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
-
-# convert raw images to TIFFs
-raw2tiff: raw2tiff.o ${TIFFLIB}
-	${CC} -o raw2tiff ${CFLAGS} raw2tiff.o ${LIBS}
-raw2tiff.o: ${SRCDIR}/raw2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/raw2tiff.c
-
-# simple GIF converter
-gif2tiff: gif2tiff.o ${TIFFLIB}
-	${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
-gif2tiff.o: ${SRCDIR}/gif2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
-
-# very limited PBM converter
-ppm2tiff: ppm2tiff.o ${TIFFLIB}
-	${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
-ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
-
-# Group 3/4 FAX file converter
-fax2tiff: fax2tiff.o ${TIFFLIB}
-	${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
-fax2tiff.o: ${SRCDIR}/fax2tiff.c
-	${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
-
-# Group 3/4 FAX to encoded PS converter
-fax2ps: fax2ps.o ${TIFFLIB}
-	${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
-fax2ps.o: ${SRCDIR}/fax2ps.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
-
-# convert Palette image to RGB
-pal2rgb: pal2rgb.o ${TIFFLIB}
-	${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
-pal2rgb.o: ${SRCDIR}/pal2rgb.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
-
-# convert RGB image to YCbCr
-rgb2ycbcr: rgb2ycbcr.o ${TIFFLIB}
-	${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
-rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
-
-# generate thumbnail images from fax (example of SubIFD usage)
-thumbnail: thumbnail.o ${TIFFLIB}
-	${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
-thumbnail.o: ${SRCDIR}/thumbnail.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
-
-#
-# System-specific tools.
-#
-
-#
-# sgi2tiff converts SGI RGB images to TIFF; it requires
-# the SGI image library -limage.
-#
-sgi2tiff: sgi2tiff.o ${TIFFLIB}
-	${CC} -o sgi2tiff ${CFLAGS} sgi2tiff.o -limage ${LIBS}
-sgi2tiff.o: ${SRCDIR}/sgi2tiff.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/sgi2tiff.c
-
-# SGI versions of tiffgt & tiffsv that require -lgl
-tiffgt:	tiffgt.o ${TIFFLIB}
-	${CC} -o tiffgt ${CFLAGS} tiffgt.o -lGL -lglut ${LIBS}
-tiffgt.o: ${SRCDIR}/tiffgt.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/tiffgt.c
-
-tiffsv:	sgisv.o ${TIFFLIB}
-	${CC} -o tiffsv ${CFLAGS} sgisv.o -lgutil -lgl ${LIBS}
-sgisv.o: ${SRCDIR}/sgisv.c
-	${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c
-
diff --git a/tkimg1.3/libtiff/tools/Makefile.lcc b/tkimg1.3/libtiff/tools/Makefile.lcc
deleted file mode 100644
index 4f465cb..0000000
--- a/tkimg1.3/libtiff/tools/Makefile.lcc
+++ /dev/null
@@ -1,142 +0,0 @@
-# $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/Makefile.lcc,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-#
-# TIFF Library Tools
-#
-# Copyright (c) 1988-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Stanford and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-NULL=
-IPATH=    -I..\libtiff
-#
-# If you don't want the public domain getopt code, then
-# simply null this out and you'll get whatever is in your
-# libc (or similar).
-#
-GETOPT=	getopt.o
-#
-# Library-wide configuration defines:
-# Note that if you change the library-wide configuration, you'll
-# need to manual force a full rebuild. 
-#
-CONF_LIBRARY=\
-	${NULL}
-COPTS=	-Oloop -cwagshf -d1 -b0 -v -DNDEBUG -rr -j135i
-CFLAGS=	${COPTS} ${IPATH} -DBINMODE='"b"'
-#
-LIBTIFF=..\libtiff\tiffrnb.lib
-LIBS=	-l${LIBTIFF} -lm
-MACHALL=ras2tiff.ttp
-OBJS=\
-	fax2tiff.o \
-	gif2tiff.o \
-	pal2rgb.o \
-	ppm2tiff.o \
-	rgb2ycbcr.o \
-	tiff2bw.o \
-	tiff2rgba.o \
-	tiff2ps.o \
-	tiffcmp.o \
-	tiffcp.o \
-	tiffdither.o \
-	tiffdump.o \
-	tiffinfo.o \
-	tiffmedian.o \
-	tiffsplit.o \
-	ras2tiff.o \
-	raw2tiff.o \
-	${GETOPT} \
-	${NULL}
-ALL=\
-	fax2tiff.ttp \
-	gif2tiff.ttp \
-	pal2rgb.ttp \
-	ppm2tiff.ttp \
-	rgb2ycbcr.ttp \
-	tiff2bw.ttp \
-	tiff2rgba.ttp \
-	tiff2ps.ttp \
-	tiffcmp.ttp \
-	tiffcp.ttp \
-	tiffdither.ttp \
-	tiffdump.ttp \
-	tiffinfo.ttp \
-	tiffmedian.ttp \
-	tiffsplit.ttp \
-	raw2tiff.ttp \
-	${MACHALL} \
-	${NULL}
-
-all:	${ALL}
-
-tiffinfo.ttp: tiffinfo.c ${GETOPT} ${LIBTIFF}
-	${CC} -o tiffinfo.ttp ${CFLAGS} tiffinfo.c ${GETOPT} ${LIBS}
-tiffcmp.ttp: tiffcmp.c ${GETOPT} ${LIBTIFF}
-	${CC} -o tiffcmp.ttp ${CFLAGS} tiffcmp.c ${GETOPT} ${LIBS}
-tiffcp.ttp:   tiffcp.c ${LIBTIFF}
-	${CC} -o tiffcp.ttp ${CFLAGS} tiffcp.c ${LIBS}
-tiffdump.ttp: tiffdump.c
-	${CC} -o tiffdump.ttp ${CFLAGS} tiffdump.c -lm ${LIBS}
-tiffmedian.ttp: tiffmedian.c ${LIBTIFF}
-	${CC} -o tiffmedian.ttp ${CFLAGS} tiffmedian.c ${LIBS}
-tiffsplit.ttp: tiffsplit.c ${LIBTIFF}
-	${CC} -o tiffsplit.ttp ${CFLAGS} tiffsplit.c ${LIBS}
-tiff2ps.ttp: tiff2ps.c ${LIBTIFF}
-	${CC} -o tiff2ps.ttp ${CFLAGS} tiff2ps.c ${LIBS}
-# junky stuff...
-# convert RGB image to B&W
-tiff2bw.ttp: tiff2bw.c ${GETOPT} ${LIBTIFF}
-	${CC} -o tiff2bw.ttp ${CFLAGS} tiff2bw.c ${GETOPT} ${LIBS}
-# convert anything to RGBA
-tiff2rgba.ttp: tiff2rgba.c ${GETOPT} ${LIBTIFF}
-	${CC} -o tiff2rgba.ttp ${CFLAGS} tiff2rgba.c ${GETOPT} ${LIBS}
-# convert B&W image to bilevel w/ FS dithering
-tiffdither.ttp: tiffdither.c ${LIBTIFF}
-	${CC} -o tiffdither.ttp ${CFLAGS} tiffdither.c ${LIBS}
-# Group 3 FAX file converter
-fax2tiff.ttp: fax2tiff.c ${GETOPT} ${LIBTIFF}
-	${CC} -o fax2tiff.ttp ${CFLAGS} ${CONF_LIBRARY} fax2tiff.c ${GETOPT} ${LIBS}
-# convert Palette image to RGB
-pal2rgb.ttp: pal2rgb.c ${LIBTIFF}
-	${CC} -o pal2rgb.ttp ${CFLAGS} pal2rgb.c ${LIBS}
-# convert RGB image to YCbCr
-rgb2ycbcr.ttp: rgb2ycbcr.c ${GETOPT} ${LIBTIFF}
-	${CC} -o rgb2ycbcr.ttp ${CFLAGS} rgb2ycbcr.c ${GETOPT} ${LIBS}
-# GIF converter
-gif2tiff.ttp: gif2tiff.c ${LIBTIFF}
-	${CC} -o gif2tiff.ttp ${CFLAGS} gif2tiff.c ${LIBS}
-# PBM converter
-ppm2tiff.ttp: ppm2tiff.c ${LIBTIFF}
-	${CC} -o ppm2tiff.ttp ${CFLAGS} ppm2tiff.c ${LIBS}
-# Sun rasterfile converter
-ras2tiff.ttp: ras2tiff.c ${LIBTIFF}
-	${CC} -o ras2tiff.ttp ${CFLAGS} ras2tiff.c ${LIBS}
-# convert raw images to TIFFs
-raw2tiff.ttp: raw2tiff.c ${LIBTIFF}
-	${CC} -o raw2tiff.ttp ${CFLAGS} raw2tiff.c ${LIBS}
-# generate thumbnail images from fax
-thumbnail: thumbnail.c ${LIBTIFF}
-	${CC} -o thumbnail ${CFLAGS} thumbnail.c ${LIBS} -lm
-
-install: all
-
-clean:
-	rm -f ${ALL} ${OBJS} ycbcr.ttp
diff --git a/tkimg1.3/libtiff/tools/Makefile.vc b/tkimg1.3/libtiff/tools/Makefile.vc
deleted file mode 100644
index 15b7379..0000000
--- a/tkimg1.3/libtiff/tools/Makefile.vc
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-#	Simple MS VC++ Makefile
-#
-#	To build:
-#       C:\libtiff\tools> nmake /f makefile.vc 
-#
-# Uncomment and edit following lines to enable JPEG support
-#JPEG_SUPPORT	= 1
-#JPEGDIR 	= d:/projects/jpeg-6b
-#JPEG_LIB 	= $(JPEGDIR)/Release/jpeg.lib
-
-TARGETS	=	tiffcp.exe tiffinfo.exe tiffdump.exe fax2tiff.exe \
-		fax2ps.exe gif2tiff.exe pal2rgb.exe ppm2tiff.exe \
-		rgb2ycbcr.exe thumbnail.exe ras2tiff.exe raw2tiff.exe \
-		tiff2bw.exe tiff2rgba.exe tiff2pdf.exe tiff2ps.exe \
-		tiffcmp.exe tiffdither.exe tiffmedian.exe tiffsplit.exe 
-
-EXTRA_OBJ 	= 	strcasecmp.obj getopt.obj
-
-LIBS		=	..\libtiff\libtiff.lib
-EXTRAFLAGS	=
-
-!IFDEF JPEG_SUPPORT
-LIBS		= $(LIBS) $(JPEG_LIB)
-EXTRAFLAGS	= $(EXTRAFLAGS) -DJPEG_SUPPORT
-!ENDIF
-
-CFLAGS 	=	/nologo -I..\libtiff /D_WINDOWS $(EXTRAFLAGS)
-
-default:	$(EXTRA_OBJ) $(TARGETS)
-
-.c.exe:
-	$(CC) $(CFLAGS) $*.c $(EXTRA_OBJ) $(LIBS)
-
-tiffgt.exe:
-	$(CC) $(CFLAGS) tiffgt.c $(EXTRA_OBJ) $(LIBS)
-
-getopt.obj:	..\port\getopt.c
-	$(CC) /c $(CFLAGS) ..\port\getopt.c
-
-strcasecmp.obj:	..\port\strcasecmp.c
-	$(CC) /c $(CFLAGS) ..\port\strcasecmp.c
-
-clean:
-	del *.obj *.exe
diff --git a/tkimg1.3/libtiff/tools/fax2ps.c b/tkimg1.3/libtiff/tools/fax2ps.c
deleted file mode 100644
index befb87a..0000000
--- a/tkimg1.3/libtiff/tools/fax2ps.c
+++ /dev/null
@@ -1,432 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/fax2ps.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $" */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#if defined(VMS)
-#include <unixio.h>
-#elif defined(_WINDOWS)
-#include <io.h>
-#define	off_t	toff_t
-#else
-#include <unistd.h>
-#endif
-
-#include "tiffio.h"
-
-float	defxres = 204.;		/* default x resolution (pixels/inch) */
-float	defyres = 98.;		/* default y resolution (lines/inch) */
-const float half = 0.5;
-const float points = 72.0;
-float	pageWidth = 0;		/* image page width (inches) */
-float	pageHeight = 0;		/* image page length (inches) */
-int	scaleToPage = 0;	/* if true, scale raster to page dimensions */
-int	totalPages = 0;		/* total # pages printed */
-int	row;			/* current output row */
-int	maxline = 512;		/* max output line of PostScript */
-
-/*
- * Turn a bit-mapped scanline into the appropriate sequence
- * of PostScript characters to be rendered.
- *  
- * Original version written by Bret D. Whissel,
- * Florida State University Meteorology Department
- * March 13-15, 1995.
- */
-static void
-printruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
-{
-    static struct {
-	char white, black;
-	short width;
-    } WBarr[] = {
-	{ 'd', 'n', 512 }, { 'e', 'o', 256 }, { 'f', 'p', 128 },
-	{ 'g', 'q',  64 }, { 'h', 'r',  32 }, { 'i', 's',  16 },
-	{ 'j', 't',   8 }, { 'k', 'u',   4 }, { 'l', 'v',   2 },
-	{ 'm', 'w',   1 }
-    };
-    static char* svalue =
-	" !\"#$&'*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abc";
-    int colormode = 1;		/* 0 for white, 1 for black */
-    int runlength = 0;
-    int n = maxline;
-    int x = 0;
-    int l;
-
-    (void) buf;
-    printf("%d m(", row++);
-    while (runs < erun) {
-	if (runlength <= 0) {
-	    colormode ^= 1;
-	    runlength = *runs++;
-	    if (x+runlength > lastx)
-		runlength = runs[-1] = lastx-x;
-	    x += runlength;
-	    if (!colormode && runs == erun)	
-		break;		/* don't bother printing the final white run */
-	}
-	/*
-	 * If a runlength is greater than 6 pixels, then spit out
-	 * black or white characters until the runlength drops to
-	 * 6 or less.  Once a runlength is <= 6, then combine black
-	 * and white runlengths until a 6-pixel pattern is obtained.
-	 * Then write out the special character.  Six-pixel patterns
-	 * were selected since 64 patterns is the largest power of
-	 * two less than the 92 "easily printable" PostScript
-	 * characters (i.e., no escape codes or octal chars).
-	 */
-	l = 0;
-	while (runlength > 6) {	/* Run is greater than six... */
-	    if (runlength >= WBarr[l].width) {
-		if (n == 0) {
-		    putchar('\n');
-		    n = maxline;
-		}
-		putchar(colormode ? WBarr[l].black : WBarr[l].white), n--;
-		runlength -= WBarr[l].width;
-	    } else
-		l++;
-	}
-	while (runlength > 0 && runlength <= 6) {
-	    int bitsleft = 6;
-	    int t = 0;
-	    while (bitsleft) {
-		if (runlength <= bitsleft) {
-		    if (colormode)
-			t |= ((1 << runlength)-1) << (bitsleft-runlength);
-		    bitsleft -= runlength;
-		    runlength = 0;
-		    if (bitsleft) {
-			if (runs >= erun)
-			    break;
-			colormode ^= 1;
-			runlength = *runs++;
-			if (x+runlength > lastx)
-			    runlength = runs[-1] = lastx-x;
-			x += runlength;
-		    }
-		} else {		/* runlength exceeds bits left */
-		    if (colormode)
-			t |= ((1 << bitsleft)-1);
-		    runlength -= bitsleft;
-		    bitsleft = 0;
-		}
-	    }
-	    if (n == 0) {
-		putchar('\n');
-		n = maxline;
-	    }
-	    putchar(svalue[t]), n--;
-	}
-    }
-    printf(")s\n");
-}
-
-/* 
- * Create a special PostScript font for printing FAX documents.  By taking
- * advantage of the font-cacheing mechanism, a substantial speed-up in 
- * rendering time is realized. 
- */
-static void
-emitFont(FILE* fd)
-{
-    static const char* fontPrologue[] = {
-	"/newfont 10 dict def newfont begin /FontType 3 def /FontMatrix [1",
-	"0 0 1 0 0] def /FontBBox [0 0 512 1] def /Encoding 256 array def",
-	"0 1 31{Encoding exch /255 put}for 120 1 255{Encoding exch /255",
-	"put}for Encoding 37 /255 put Encoding 40 /255 put Encoding 41 /255",
-	"put Encoding 92 /255 put /count 0 def /ls{Encoding exch count 3",
-	"string cvs cvn put /count count 1 add def}def 32 1 36{ls}for",
-	"38 1 39{ls}for 42 1 91{ls}for 93 1 99{ls}for /count 100",
-	"def 100 1 119{ls}for /CharDict 5 dict def CharDict begin /white",
-	"{dup 255 eq{pop}{1 dict begin 100 sub neg 512 exch bitshift",
-	"/cw exch def cw 0 0 0 cw 1 setcachedevice end}ifelse}def /black",
-	"{dup 255 eq{pop}{1 dict begin 110 sub neg 512 exch bitshift",
-	"/cw exch def cw 0 0 0 cw 1 setcachedevice 0 0 moveto cw 0 rlineto",
-	"0 1 rlineto cw neg 0 rlineto closepath fill end}ifelse}def /numbuild",
-	"{dup 255 eq{pop}{6 0 0 0 6 1 setcachedevice 0 1 5{0 moveto",
-	"dup 32 and 32 eq{1 0 rlineto 0 1 rlineto -1 0 rlineto closepath",
-	"fill newpath}if 1 bitshift}for pop}ifelse}def /.notdef {}",
-	"def /255 {}def end /BuildChar{exch begin dup 110 ge{Encoding",
-	"exch get 3 string cvs cvi CharDict /black get}{dup 100 ge {Encoding",
-	"exch get 3 string cvs cvi CharDict /white get}{Encoding exch get",
-	"3 string cvs cvi CharDict /numbuild get}ifelse}ifelse exec end",
-	"}def end /Bitfont newfont definefont 1 scalefont setfont",
-	NULL
-    };
-    int i;
-    for (i = 0; fontPrologue[i] != NULL; i++)
-	fprintf(fd, "%s\n", fontPrologue[i]);
-}
-
-void
-printTIF(TIFF* tif, int pageNumber)
-{
-    uint32 w, h;
-    uint16 unit;
-    float xres, yres, scale = 1.0;
-    tstrip_t s, ns;
-    time_t creation_time;
-
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-    if (!TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres) || !xres) {
-	TIFFWarning(TIFFFileName(tif),
-	    "No x-resolution, assuming %g dpi", defxres);
-	xres = defxres;
-    }
-    if (!TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres) || !yres) {
-	TIFFWarning(TIFFFileName(tif),
-	    "No y-resolution, assuming %g lpi", defyres);
-	yres = defyres;					/* XXX */
-    }
-    if (TIFFGetField(tif, TIFFTAG_RESOLUTIONUNIT, &unit) &&
-      unit == RESUNIT_CENTIMETER) {
-	xres *= 2.54;
-	yres *= 2.54;
-    }
-    if (pageWidth == 0)
-	pageWidth = w / xres;
-    if (pageHeight == 0)
-	pageHeight = h / yres;
-
-    printf("%%!PS-Adobe-3.0\n");
-    printf("%%%%Creator: fax2ps\n");
-#ifdef notdef
-    printf("%%%%Title: %s\n", file);
-#endif
-    creation_time = time(0);
-    printf("%%%%CreationDate: %s", ctime(&creation_time));
-    printf("%%%%Origin: 0 0\n");
-    printf("%%%%BoundingBox: 0 0 %u %u\n",
-	(int)(pageWidth * points), (int)(pageHeight * points));	/* XXX */
-    printf("%%%%Pages: (atend)\n");
-    printf("%%%%EndComments\n");
-    printf("%%%%BeginProlog\n");
-    emitFont(stdout);
-    printf("/d{bind def}def\n"); /* bind and def proc */
-    printf("/m{0 exch moveto}d\n");
-    printf("/s{show}d\n");
-    printf("/p{showpage}d \n");	/* end page */
-    printf("%%%%EndProlog\n");
-    printf("%%%%Page: \"%d\" %d\n", pageNumber, pageNumber);
-    printf("/$pageTop save def gsave\n");
-    if (scaleToPage)
-        scale = pageHeight / (h/yres) < pageWidth / (w/xres) ?
-            pageHeight / (h/yres) : pageWidth / (w/xres);
-    printf("%g %g translate\n",
-           points * (pageWidth - scale*w/xres) * half,
-           points * (scale*h/yres + (pageHeight - scale*h/yres) * half));
-    printf("%g %g scale\n", points/xres*scale, -points/yres*scale);
-    printf("0 setgray\n");
-    TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, printruns);
-    ns = TIFFNumberOfStrips(tif);
-    row = 0;
-    for (s = 0; s < ns; s++)
-	(void) TIFFReadEncodedStrip(tif, s, (tdata_t) NULL, (tsize_t) -1);
-    printf("p\n");
-    printf("grestore $pageTop restore\n");
-    totalPages++;
-}
-
-#define	GetPageNumber(tif) \
-TIFFGetField(tif, TIFFTAG_PAGENUMBER, &pn, &ptotal)
-
-int
-findPage(TIFF* tif, int pageNumber)
-{
-    uint16 pn = (uint16) -1;
-    uint16 ptotal = (uint16) -1;
-    if (GetPageNumber(tif)) {
-	while (pn != pageNumber && TIFFReadDirectory(tif) && GetPageNumber(tif))
-	    ;
-	return (pn == pageNumber);
-    } else
-	return (TIFFSetDirectory(tif, pageNumber-1));
-}
-
-void
-fax2ps(TIFF* tif, int npages, int* pages, char* filename)
-{
-    if (npages > 0) {
-	uint16 pn, ptotal;
-	int i;
-
-	if (!GetPageNumber(tif))
-	    fprintf(stderr, "%s: No page numbers, counting directories.\n",
-		filename);
-	for (i = 0; i < npages; i++) {
-	    if (findPage(tif, pages[i]))
-		printTIF(tif, pages[i]);
-	    else
-		fprintf(stderr, "%s: No page number %d\n", filename, pages[i]);
-	}
-    } else {
-	int pageNumber = 1;
-	do
-	    printTIF(tif, pageNumber++);
-	while (TIFFReadDirectory(tif));
-    }
-}
-
-#undef GetPageNumber
-
-static int
-pcompar(const void* va, const void* vb)
-{
-    const int* pa = (const int*) va;
-    const int* pb = (const int*) vb;
-    return (*pa - *pb);
-}
-
-static	void usage(int code);
-
-int
-main(int argc, char** argv)
-{
-    extern int optind;
-    extern char* optarg;
-    int c, pageNumber;
-    int* pages = 0, npages = 0;
-    int dowarnings = 0;		/* if 1, enable library warnings */
-    TIFF* tif;
-
-    while ((c = getopt(argc, argv, "l:p:x:y:W:H:wS")) != -1)
-	switch (c) {
-	case 'H':		/* page height */
-	    pageHeight = atof(optarg);
-	    break;
-	case 'S':		/* scale to page */
-	    scaleToPage = 1;
-	    break;
-	case 'W':		/* page width */
-	    pageWidth = atof(optarg);
-	    break;
-	case 'p':		/* print specific page */
-	    pageNumber = atoi(optarg);
-	    if (pageNumber < 1) {
-		fprintf(stderr, "%s: Invalid page number (must be > 0).\n",
-		    optarg);
-		usage(-1);
-	    }
-	    if (pages)
-		pages = (int*) realloc((char*) pages, (npages+1)*sizeof (int));
-	    else
-		pages = (int*) malloc(sizeof (int));
-	    pages[npages++] = pageNumber;
-	    break;
-	case 'w':
-	    dowarnings = 1;
-	    break;
-	case 'x':
-	    defxres = atof(optarg);
-	    break;
-	case 'y':
-	    defyres = atof(optarg);
-	    break;
-	case 'l':
-	    maxline = atoi(optarg);
-	    break;
-	case '?':
-	    usage(-1);
-	}
-    if (npages > 0)
-	qsort(pages, npages, sizeof (int), pcompar);
-    if (!dowarnings)
-	TIFFSetWarningHandler(0);
-    if (optind < argc) {
-	do {
-	    tif = TIFFOpen(argv[optind], "r");
-	    if (tif) {
-		fax2ps(tif, npages, pages, argv[optind]);
-		TIFFClose(tif);
-	    } else
-		fprintf(stderr, "%s: Can not open, or not a TIFF file.\n",
-		    argv[optind]);
-	} while (++optind < argc);
-    } else {
-	int n;
-	FILE* fd;
-	char temp[1024], buf[16*1024];
-
-	strcpy(temp, "/tmp/fax2psXXXXXX");
-	(void) mktemp(temp);
-	fd = fopen(temp, "w");
-	if (fd == NULL) {
-	    fprintf(stderr, "Could not create temp file \"%s\"\n", temp);
-	    exit(-2);
-	}
-	while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0)
-	    write(fileno(fd), buf, n);
-	tif = TIFFOpen(temp, "r");
-#ifndef VMS
-	unlink(temp);
-#else
-	remove(temp);
-#endif
-	if (tif) {
-	    fax2ps(tif, npages, pages, "<stdin>");
-	    TIFFClose(tif);
-	} else
-	    fprintf(stderr, "%s: Can not open, or not a TIFF file.\n", temp);
-	fclose(fd);
-    }
-    printf("%%%%Trailer\n");
-    printf("%%%%Pages: %u\n", totalPages);
-    printf("%%%%EOF\n");
-
-    return (0);
-}
-
-char* stuff[] = {
-"usage: fax2ps [options] [input.tif ...]",
-"where options are:",
-" -w            suppress warning messages",
-" -l chars      set maximum output line length for generated PostScript",
-" -p page#      select page to print (can use multiple times)",
-" -x xres       set default horizontal resolution of input data (dpi)",
-" -y yres       set default vertical resolution of input data (lpi)",
-" -S            scale output to page size",
-" -W width      set output page width (inches), default is 8.5",
-" -H height     set output page height (inchest), default is 11",
-NULL
-};
-
-static void
-usage(int code)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(code);
-}
diff --git a/tkimg1.3/libtiff/tools/fax2tiff.c b/tkimg1.3/libtiff/tools/fax2tiff.c
deleted file mode 100644
index 0184712..0000000
--- a/tkimg1.3/libtiff/tools/fax2tiff.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/fax2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/* 
- * Convert a CCITT Group 3 or 4 FAX file to TIFF Group 3 or 4 format.
- */
-#include <stdio.h>
-#include <stdlib.h>		/* should have atof & getopt */
-#include "tiffiop.h"
-
-#ifndef BINMODE
-#define	BINMODE
-#endif
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS	0
-#endif
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE	1
-#endif
-
-TIFF	*faxTIFF;
-char	*rowbuf;
-char	*refbuf;
-
-int	xsize = 1728;
-int	verbose;
-int	stretch;
-uint16	badfaxrun;
-uint32	badfaxlines;
-
-int	copyFaxFile(TIFF* tifin, TIFF* tifout);
-static	void usage(void);
-
-int
-main(int argc, char* argv[])
-{
-	FILE *in;
-	TIFF *out = NULL;
-	TIFFErrorHandler whandler;
-	int compression_in = COMPRESSION_CCITTFAX3;
-	int compression_out = COMPRESSION_CCITTFAX3;
-	int fillorder_in = FILLORDER_LSB2MSB;
-	int fillorder_out = FILLORDER_LSB2MSB;
-	uint32 group3options_in = 0;	/* 1d-encoded */
-	uint32 group3options_out = 0;	/* 1d-encoded */
-	uint32 group4options_in = 0;	/* compressed */
-	uint32 group4options_out = 0;	/* compressed */
-	int photometric_in = PHOTOMETRIC_MINISWHITE;
-	int photometric_out = PHOTOMETRIC_MINISWHITE;
-	int mode = FAXMODE_CLASSF;
-	int rows;
-	int c;
-	int pn, npages;
-	float resY = 196.0;
-	extern int optind;
-	extern char* optarg;
-
-
-	while ((c = getopt(argc, argv, "R:X:o:1234ABLMPUW5678abcflmpsuvwz?")) != -1)
-		switch (c) {
-			/* input-related options */
-		case '3':		/* input is g3-encoded */
-			compression_in = COMPRESSION_CCITTFAX3;
-			break;
-		case '4':		/* input is g4-encoded */
-			compression_in = COMPRESSION_CCITTFAX4;
-			break;
-		case 'U':		/* input is uncompressed (g3 and g4) */
-			group3options_in |= GROUP3OPT_UNCOMPRESSED;
-			group4options_in |= GROUP4OPT_UNCOMPRESSED;
-			break;
-		case '1':		/* input is 1d-encoded (g3 only) */
-			group3options_in &= ~GROUP3OPT_2DENCODING;
-			break;
-		case '2':		/* input is 2d-encoded (g3 only) */
-			group3options_in |= GROUP3OPT_2DENCODING;
-			break;
-		case 'P':	/* input has not-aligned EOL (g3 only) */
-			group3options_in &= ~GROUP3OPT_FILLBITS;
-			break;
-		case 'A':		/* input has aligned EOL (g3 only) */
-			group3options_in |= GROUP3OPT_FILLBITS;
-			break;
-		case 'W':		/* input has 0 mean white */
-			photometric_in = PHOTOMETRIC_MINISWHITE;
-			break;
-		case 'B':		/* input has 0 mean black */
-			photometric_in = PHOTOMETRIC_MINISBLACK;
-			break;
-		case 'L':		/* input has lsb-to-msb fillorder */
-			fillorder_in = FILLORDER_LSB2MSB;
-			break;
-		case 'M':		/* input has msb-to-lsb fillorder */
-			fillorder_in = FILLORDER_MSB2LSB;
-			break;
-		case 'R':		/* input resolution */
-			resY = atof(optarg);
-			break;
-		case 'X':		/* input width */
-			xsize = atof(optarg);
-			break;
-
-			/* output-related options */
-		case '7':		/* generate g3-encoded output */
-			compression_out = COMPRESSION_CCITTFAX3;
-			break;
-		case '8':		/* generate g4-encoded output */
-			compression_out = COMPRESSION_CCITTFAX4;
-			break;
-		case 'u':	/* generate uncompressed output (g3 and g4) */
-			group3options_out |= GROUP3OPT_UNCOMPRESSED;
-			group4options_out |= GROUP4OPT_UNCOMPRESSED;
-			break;
-		case '5':	/* generate 1d-encoded output (g3 only) */
-			group3options_out &= ~GROUP3OPT_2DENCODING;
-			break;
-		case '6':	/* generate 2d-encoded output (g3 only) */
-			group3options_out |= GROUP3OPT_2DENCODING;
-			break;
-		case 'c':		/* generate "classic" g3 format */
-			mode = FAXMODE_CLASSIC;
-			break;
-		case 'f':		/* generate Class F format */
-			mode = FAXMODE_CLASSF;
-			break;
-		case 'm':		/* output's fillorder is msb-to-lsb */
-			fillorder_out = FILLORDER_MSB2LSB;
-			break;
-		case 'l':		/* output's fillorder is lsb-to-msb */
-			fillorder_out = FILLORDER_LSB2MSB;
-			break;
-		case 'o':
-			out = TIFFOpen(optarg, "w");
-			if (out == NULL) {
-				fprintf(stderr,
-				    "%s: Can not create or open %s\n",
-				    argv[0], optarg);
-				return EXIT_FAILURE;
-			}
-			break;
-		case 'a':	/* generate EOL-aligned output (g3 only) */
-			group3options_out |= GROUP3OPT_FILLBITS;
-			break;
-		case 'p':	/* generate not EOL-aligned output (g3 only) */
-			group3options_out &= ~GROUP3OPT_FILLBITS;
-			break;
-		case 's':		/* stretch image by dup'ng scanlines */
-			stretch = 1;
-			break;
-		case 'w':		/* undocumented -- for testing */
-			photometric_out = PHOTOMETRIC_MINISWHITE;
-			break;
-		case 'b':		/* undocumented -- for testing */
-			photometric_out = PHOTOMETRIC_MINISBLACK;
-			break;
-		case 'z':		/* undocumented -- for testing */
-			compression_out = COMPRESSION_LZW;
-			break;
-		case 'v':		/* -v for info */
-			verbose++;
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	npages = argc - optind;
-	if (npages < 1)
-		usage();
-
-	rowbuf = _TIFFmalloc(TIFFhowmany(xsize,8));
-	refbuf = _TIFFmalloc(TIFFhowmany(xsize,8));
-	if (rowbuf == NULL || refbuf == NULL) {
-		fprintf(stderr, "%s: Not enough memory\n", argv[0]);
-		return (EXIT_FAILURE);
-	}
-
-	if (out == NULL) {
-		out = TIFFOpen("fax.tif", "w");
-		if (out == NULL) {
-			fprintf(stderr, "%s: Can not create fax.tif\n",
-			    argv[0]);
-			return (EXIT_FAILURE);
-		}
-	}
-		
-	faxTIFF = TIFFClientOpen("(FakeInput)", "w",
-	/* TIFFClientOpen() fails if we don't set existing value here */
-				 out->tif_clientdata,
-				 out->tif_readproc, out->tif_writeproc,
-				 out->tif_seekproc, out->tif_closeproc,
-				 out->tif_sizeproc,
-				 out->tif_mapproc, out->tif_unmapproc);
-	if (faxTIFF == NULL) {
-		fprintf(stderr, "%s: Can not create fake input file\n",
-		    argv[0]);
-		return (EXIT_FAILURE);
-	}
-	faxTIFF->tif_mode = O_RDONLY;
-	TIFFSetField(faxTIFF, TIFFTAG_IMAGEWIDTH,	xsize);
-	TIFFSetField(faxTIFF, TIFFTAG_SAMPLESPERPIXEL,	1);
-	TIFFSetField(faxTIFF, TIFFTAG_BITSPERSAMPLE,	1);
-	TIFFSetField(faxTIFF, TIFFTAG_FILLORDER,	fillorder_in);
-	TIFFSetField(faxTIFF, TIFFTAG_PLANARCONFIG,	PLANARCONFIG_CONTIG);
-	TIFFSetField(faxTIFF, TIFFTAG_PHOTOMETRIC,	photometric_in);
-	TIFFSetField(faxTIFF, TIFFTAG_YRESOLUTION,	resY);
-	TIFFSetField(faxTIFF, TIFFTAG_RESOLUTIONUNIT,	RESUNIT_INCH);
-	
-	/* NB: this must be done after directory info is setup */
-	TIFFSetField(faxTIFF, TIFFTAG_COMPRESSION, compression_in);
-	if (compression_in == COMPRESSION_CCITTFAX3)
-		TIFFSetField(faxTIFF, TIFFTAG_GROUP3OPTIONS, group3options_in);
-	else if (compression_in == COMPRESSION_CCITTFAX4)
-		TIFFSetField(faxTIFF, TIFFTAG_GROUP4OPTIONS, group4options_in);
-	for (pn = 0; optind < argc; pn++, optind++) {
-		in = fopen(argv[optind], "r" BINMODE);
-		if (in == NULL) {
-			fprintf(stderr,
-			    "%s: %s: Can not open\n", argv[0], argv[optind]);
-			continue;
-		}
-		faxTIFF->tif_fd = fileno(in);
-		faxTIFF->tif_clientdata = (thandle_t) faxTIFF->tif_fd;
-		faxTIFF->tif_name = argv[optind];
-		TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);
-		TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression_out);
-		TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric_out);
-		TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-		TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1);
-		switch (compression_out) {
-			/* g3 */
-			case COMPRESSION_CCITTFAX3:
-			TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, group3options_out);
-			TIFFSetField(out, TIFFTAG_FAXMODE, mode);
-			TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, -1L);
-			break;
-
-			/* g4 */
-			case COMPRESSION_CCITTFAX4:
-			TIFFSetField(out, TIFFTAG_GROUP4OPTIONS, group4options_out);
-			TIFFSetField(out, TIFFTAG_FAXMODE, mode);
-			TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, -1L);
-			break;
-
-			default:
-			TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-			    TIFFDefaultStripSize(out, 0));
-		}
-		TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-		TIFFSetField(out, TIFFTAG_FILLORDER, fillorder_out);
-		TIFFSetField(out, TIFFTAG_SOFTWARE, "fax2tiff");
-		TIFFSetField(out, TIFFTAG_XRESOLUTION, 204.0);
-		if (!stretch) {
-			TIFFGetField(faxTIFF, TIFFTAG_YRESOLUTION, &resY);
-			TIFFSetField(out, TIFFTAG_YRESOLUTION, resY);
-		} else
-			TIFFSetField(out, TIFFTAG_YRESOLUTION, 196.);
-		TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
-		TIFFSetField(out, TIFFTAG_PAGENUMBER, pn, npages);
-
-		if (!verbose)
-		    whandler = TIFFSetWarningHandler(NULL);
-		rows = copyFaxFile(faxTIFF, out);
-		fclose(in);
-		if (!verbose)
-		    (void) TIFFSetWarningHandler(whandler);
-
-		TIFFSetField(out, TIFFTAG_IMAGELENGTH, rows);
-
-		if (verbose) {
-			fprintf(stderr, "%s:\n", argv[optind]);
-			fprintf(stderr, "%d rows in input\n", rows);
-			fprintf(stderr, "%ld total bad rows\n",
-			    (long) badfaxlines);
-			fprintf(stderr, "%d max consecutive bad rows\n", badfaxrun);
-		}
-		if (compression_out == COMPRESSION_CCITTFAX3 &&
-		    mode == FAXMODE_CLASSF) {
-			TIFFSetField(out, TIFFTAG_BADFAXLINES, badfaxlines);
-			TIFFSetField(out, TIFFTAG_CLEANFAXDATA, badfaxlines ?
-			    CLEANFAXDATA_REGENERATED : CLEANFAXDATA_CLEAN);
-			TIFFSetField(out, TIFFTAG_CONSECUTIVEBADFAXLINES, badfaxrun);
-		}
-		TIFFWriteDirectory(out);
-	}
-	TIFFClose(out);
-	_TIFFfree(rowbuf);
-	_TIFFfree(refbuf);
-	return (EXIT_SUCCESS);
-}
-
-int
-copyFaxFile(TIFF* tifin, TIFF* tifout)
-{
-	uint32 row;
-	uint16 badrun;
-	int ok;
-
-	tifin->tif_rawdatasize = TIFFGetFileSize(tifin);
-	tifin->tif_rawdata = _TIFFmalloc(tifin->tif_rawdatasize);
-	if (tifin->tif_rawdata == NULL) {
-		TIFFError(tifin->tif_name, "%s: Not enough memory");
-		return (0);
-	}
-	if (!ReadOK(tifin, tifin->tif_rawdata, tifin->tif_rawdatasize)) {
-		TIFFError(tifin->tif_name, "%s: Read error at scanline 0");
-		return (0);
-	}
-	tifin->tif_rawcp = tifin->tif_rawdata;
-	tifin->tif_rawcc = tifin->tif_rawdatasize;
-
-	(*tifin->tif_setupdecode)(tifin);
-	(*tifin->tif_predecode)(tifin, (tsample_t) 0);
-	tifin->tif_row = 0;
-	badfaxlines = 0;
-	badfaxrun = 0;
-
-	_TIFFmemset(refbuf, 0, sizeof (refbuf));
-	row = 0;
-	badrun = 0;		/* current run of bad lines */
-	while (tifin->tif_rawcc > 0) {
-		ok = (*tifin->tif_decoderow)(tifin, (tdata_t) rowbuf, 
-					     sizeof (rowbuf), 0);
-		if (!ok) {
-			badfaxlines++;
-			badrun++;
-			/* regenerate line from previous good line */
-			_TIFFmemcpy(rowbuf, refbuf, sizeof (rowbuf));
-		} else {
-			if (badrun > badfaxrun)
-				badfaxrun = badrun;
-			badrun = 0;
-			_TIFFmemcpy(refbuf, rowbuf, sizeof (rowbuf));
-		}
-		tifin->tif_row++;
-
-		if (TIFFWriteScanline(tifout, rowbuf, row, 0) < 0) {
-			fprintf(stderr, "%s: Write error at row %ld.\n",
-			    tifout->tif_name, (long) row);
-			break;
-		}
-		row++;
-		if (stretch) {
-			if (TIFFWriteScanline(tifout, rowbuf, row, 0) < 0) {
-				fprintf(stderr, "%s: Write error at row %ld.\n",
-				    tifout->tif_name, (long) row);
-				break;
-			}
-			row++;
-		}
-	}
-	if (badrun > badfaxrun)
-		badfaxrun = badrun;
-	_TIFFfree(tifin->tif_rawdata);
-	return (row);
-}
-
-char* stuff[] = {
-"usage: fax2tiff [options] input.raw...",
-"where options are:",
-" -3		input data is G3-encoded		[default]",
-" -4		input data is G4-encoded",
-" -U		input data is uncompressed (G3 or G4)",
-" -1		input data is 1D-encoded (G3 only)	[default]",
-" -2		input data is 2D-encoded (G3 only)",
-" -P		input is not EOL-aligned (G3 only)	[default]",
-" -A		input is EOL-aligned (G3 only)",
-" -M		input data has MSB2LSB bit order",
-" -L		input data has LSB2MSB bit order	[default]",
-" -B		input data has min 0 means black",
-" -W		input data has min 0 means white	[default]",
-" -R #		input data has # resolution (lines/inch) [default is 196]",
-" -X #		input data has # width			[default is 1728]",
-"",
-" -o out.tif	write output to out.tif",
-" -7		generate G3-encoded output		[default]",
-" -8		generate G4-encoded output",
-" -u		generate uncompressed output (G3 or G4)",
-" -5		generate 1D-encoded output (G3 only)",
-" -6		generate 2D-encoded output (G3 only)	[default]",
-" -p		generate not EOL-aligned output (G3 only)",
-" -a		generate EOL-aligned output (G3 only)	[default]",
-" -c		generate \"classic\" TIFF format",
-" -f		generate TIFF Class F (TIFF/F) format	[default]",
-" -m		output fill order is MSB2LSB",
-" -l		output fill order is LSB2MSB		[default]",
-" -s		stretch image by duplicating scanlines",
-" -v		print information about conversion work",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(EXIT_FAILURE);
-}
diff --git a/tkimg1.3/libtiff/tools/gif2tiff.c b/tkimg1.3/libtiff/tools/gif2tiff.c
deleted file mode 100644
index 0ca041a..0000000
--- a/tkimg1.3/libtiff/tools/gif2tiff.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/gif2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- *	convert a GIF file into a TIFF file.
- *	based on Paul Haeberli's fromgif program which in turn is
- *	based on a GIF file reader by Marcel J.E. Mol March 23 1989 
- *
- *	if input is 320 by 200 pixel aspect is probably 1.2
- *	if input is 640 350 pixel aspect is probably 1.37
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "tiffio.h"
-
-#if defined(_WINDOWS) || defined(MSDOS)
-#define BINMODE "b"
-#else
-#define	BINMODE
-#endif
-
-#define	GIFGAMMA	(1.5)		/* smaller makes output img brighter */
-#define	IMAX		0xffff		/* max intensity value */
-#define EXTRAFUDGE	128		/* some people write BAD .gif files */
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-unsigned short gamtab[256];
-
-void
-makegamtab(float gam)
-{
-    int i;
-
-    for(i=0; i<256; i++) 
-	gamtab[i] = IMAX*pow(i/255.0,gam)+0.5;
-}
-
-char* stuff[] = {
-"usage: gif2tiff [options] input.gif output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-#define COLSIZE 256
-
-unsigned char *stackp;
-unsigned int prefix[4096];
-unsigned char suffix[4096];
-unsigned char stack[4096];
-int datasize,codesize,codemask;     /* Decoder working variables */
-int clear,eoi;                      /* Special code values */
-int avail, oldcode;
-
-FILE *infile;
-int global;                        /* Is there a global color map? */
-int globalbits;                     /* Number of bits of global colors */
-unsigned char globalmap[COLSIZE][3];/* RGB values for global color map */
-unsigned char *raster;              /* Decoded image data */
-unsigned long width, height;
-unsigned short red[COLSIZE];
-unsigned short green[COLSIZE];
-unsigned short blue[COLSIZE];
-char *filename, *imagename;
-
-static	uint16 compression = COMPRESSION_PACKBITS;
-static	uint16 predictor = 0;
-static	uint32 rowsperstrip = (uint32) -1;
-static	int processCompressOptions(char*);
-
-int	convert(void);
-int	checksignature(void);
-void	readscreen(void);
-int	readgifimage(char*);
-void	readextension(void);
-int	readraster(void);
-int	process(int, unsigned char**);
-void	initcolors(unsigned char [COLSIZE][3], int);
-void	rasterize(int, char*);
-
-int
-main(int argc, char* argv[])
-{
-    extern int optind;
-    extern char *optarg;
-    int c, status;
-
-    while ((c = getopt(argc, argv, "c:r:")) != -1)
-	    switch (c) {
-	    case 'c':		/* compression scheme */
-		    if (!processCompressOptions(optarg))
-			    usage();
-		    break;
-	    case 'r':		/* rows/strip */
-		    rowsperstrip = atoi(optarg);
-		    break;
-	    case '?':
-		    usage();
-		    /*NOTREACHED*/
-	    }
-    if (argc - optind != 2)
-	    usage();
-
-    makegamtab(GIFGAMMA);
-    filename = argv[optind];
-    imagename = argv[optind+1];
-    if ((infile = fopen(imagename, "r" BINMODE)) != NULL) {
-	int c;
-	fclose(infile);
-	printf("overwrite %s? ", imagename); fflush(stdout);
-	c = getc(stdin);
-	if (c != 'y' && c != 'Y')
-	    return (1);
-    }
-    if ((infile = fopen(filename, "r" BINMODE)) == NULL) {
-	perror(filename);
-	return (1);
-    }
-    status = convert();
-    fclose(infile);
-    return (status);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-int
-convert(void)
-{
-    int ch;
-    char* mode = "w";
-
-    if (!checksignature())
-        return (-1);
-    readscreen();
-    while ((ch = getc(infile)) != ';' && ch != EOF) {
-        switch (ch) {
-            case '\0':  break;  /* this kludge for non-standard files */
-            case ',':   if (!readgifimage(mode))
-                           return (-1);
-			mode = "a";		/* subsequent images append */
-                        break;
-            case '!':   readextension();
-                        break;
-            default:    fprintf(stderr, "illegal GIF block type\n");
-                        return (-1);
-        }
-    }
-    return (0);
-}
-
-int
-checksignature(void)
-{
-    char buf[6];
-
-    fread(buf,1,6,infile);
-    if (strncmp(buf,"GIF",3)) {
-        fprintf(stderr, "file is not a GIF file\n");
-        return 0;
-    }
-    if (strncmp(&buf[3],"87a",3)) {
-        fprintf(stderr, "unknown GIF version number\n");
-        return 0;
-    }
-    return 1;
-}
-
-/*
- * 	readscreen - 
- *		Get information which is global to all the images stored 
- *	in the file
- */
-void
-readscreen(void)
-{
-    unsigned char buf[7];
-
-    fread(buf,1,7,infile);
-    global = buf[4] & 0x80;
-    if (global) {
-        globalbits = (buf[4] & 0x07) + 1;
-        fread(globalmap,3,1<<globalbits,infile);
-    }
-}
-
-int
-readgifimage(char* mode)
-{
-    unsigned char buf[9];
-    int local, interleaved;
-    unsigned char localmap[256][3];
-    int localbits;
-    int status;
-
-    if (fread(buf, 1, 9, infile) == 0) {
-        perror(filename);
-	return (0);
-    }
-    width = buf[4] + (buf[5] << 8);
-    height = buf[6] + (buf[7] << 8);
-    local = buf[8] & 0x80;
-    interleaved = buf[8] & 0x40;
-
-    if (local == 0 && global == 0) {
-        fprintf(stderr, "no colormap present for image\n");
-        return (0);
-    }
-    if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
-        fprintf(stderr, "not enough memory for image\n");
-        return (0);
-    }
-    if (local) {
-        localbits = (buf[8] & 0x7) + 1;
-
-        fprintf(stderr, "   local colors: %d\n", 1<<localbits);
-
-        fread(localmap, 3, 1<<localbits, infile);
-        initcolors(localmap, 1<<localbits);
-    } else if (global) {
-        initcolors(globalmap, 1<<globalbits);
-    }
-    if (status = readraster())
-	rasterize(interleaved, mode);
-    _TIFFfree(raster);
-    return status;
-}
-
-/*
- * 	readextension -
- *		Read a GIF extension block (and do nothing with it).
- *
- */
-void
-readextension(void)
-{
-    int count;
-    char buf[255];
-
-    (void) getc(infile);
-    while (count = getc(infile))
-        fread(buf, 1, count, infile);
-}
-
-/*
- * 	readraster -
- *		Decode a raster image
- *
- */
-int
-readraster(void)
-{
-    unsigned char *fill = raster;
-    unsigned char buf[255];
-    register int bits=0;
-    register unsigned long datum=0;
-    register unsigned char *ch;
-    register int count, code;
-    int status = 1;
-
-    datasize = getc(infile);
-    clear = 1 << datasize;
-    eoi = clear + 1;
-    avail = clear + 2;
-    oldcode = -1;
-    codesize = datasize + 1;
-    codemask = (1 << codesize) - 1;
-    for (code = 0; code < clear; code++) {
-	prefix[code] = 0;
-	suffix[code] = code;
-    }
-    stackp = stack;
-    for (count = getc(infile); count > 0; count = getc(infile)) {
-	fread(buf,1,count,infile);
-	for (ch=buf; count-- > 0; ch++) {
-	    datum += (unsigned long) *ch << bits;
-	    bits += 8;
-	    while (bits >= codesize) {
-		code = datum & codemask;
-		datum >>= codesize;
-		bits -= codesize;
-		if (code == eoi) {               /* This kludge put in */
-		    goto exitloop;               /* because some GIF files*/
-		}                                /* aren't standard */
-		if (!process(code, &fill)) {
-		    status = 0;
-		    goto exitloop;
-		}
-	    }
-	}
-	if (fill >= raster + width*height) {
-	    fprintf(stderr, "raster full before eoi code\n");
-	    break;
-	}
-    }
-exitloop:
-    if (fill != raster + width*height)  {
-	fprintf(stderr, "warning: wrong rastersize: %ld bytes\n",
-						      (long) (fill-raster));
-	fprintf(stderr, "         instead of %ld bytes\n",
-						      (long) width*height);
-    }
-    return status;
-}
-
-/*
- * 	process - 
- *		Process a compression code.  "clear" resets the code table.  
- *	Otherwise make a new code table entry, and output the bytes 
- *	associated with the code.
- */
-int
-process(register int code, unsigned char** fill)
-{
-    int incode;
-    static unsigned char firstchar;
-
-    if (code == clear) {
-	codesize = datasize + 1;
-	codemask = (1 << codesize) - 1;
-	avail = clear + 2;
-	oldcode = -1;
-	return 1;
-    }
-
-    if (oldcode == -1) {
-	*(*fill)++ = suffix[code];
-	firstchar = oldcode = code;
-	return 1;
-    }
-    if (code > avail) {
-	fprintf(stderr, "code %d too large for %d\n", code, avail);
-	return 0; 
-    }
-
-    incode = code;
-    if (code == avail) {      /* the first code is always < avail */
-	*stackp++ = firstchar;
-	code = oldcode;
-    }
-    while (code > clear) {
-	*stackp++ = suffix[code];
-	code = prefix[code];
-    }
-
-    *stackp++ = firstchar = suffix[code];
-    prefix[avail] = oldcode;
-    suffix[avail] = firstchar;
-    avail++;
-
-    if (((avail & codemask) == 0) && (avail < 4096)) {
-	codesize++;
-	codemask += avail;
-    }
-    oldcode = incode;
-    do {
-	*(*fill)++ = *--stackp;
-    } while (stackp > stack);
-    return 1;
-}
-
-/*
- * 	initcolors -
- *		Convert a color map (local or global) to arrays with R, G and B
- * 	values. 
- *
- */
-void
-initcolors(unsigned char colormap[COLSIZE][3], int ncolors)
-{
-    register int i;
-
-    for (i = 0; i < ncolors; i++) {
-        red[i]   = gamtab[colormap[i][0]];
-        green[i] = gamtab[colormap[i][1]];
-        blue[i]  = gamtab[colormap[i][2]];
-    }
-}
-
-void
-rasterize(int interleaved, char* mode)
-{
-    register long row;
-    unsigned char *newras;
-    unsigned char *ras;
-    TIFF *tif;
-    tstrip_t strip;
-    tsize_t stripsize;
-
-    if ((newras = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
-        fprintf(stderr, "not enough memory for image\n");
-        return;
-    }
-#define DRAWSEGMENT(offset, step) {			\
-        for (row = offset; row < height; row += step) {	\
-            _TIFFmemcpy(newras + row*width, ras, width);\
-            ras += width;                            	\
-        }						\
-    }
-    ras = raster;
-    if (interleaved) {
-        DRAWSEGMENT(0, 8);
-        DRAWSEGMENT(4, 8);
-        DRAWSEGMENT(2, 4);
-        DRAWSEGMENT(1, 2);
-    } else 
-        DRAWSEGMENT(0, 1);
-#undef DRAWSEGMENT
-
-    tif = TIFFOpen(imagename, mode);
-    if (!tif) {
-	TIFFError(imagename,"Can not open output image");
-	exit(-1);
-    }
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) width);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) height);
-    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 
-	rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip));
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
-    switch (compression) {
-    case COMPRESSION_LZW:
-    case COMPRESSION_DEFLATE:
-	    if (predictor != 0)
-		    TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
-	    break;
-    }
-    TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
-    TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-    strip = 0;
-    stripsize = TIFFStripSize(tif);
-    for (row=0; row<height; row += rowsperstrip) {
-	if (TIFFWriteEncodedStrip(tif, strip, newras+row*width, stripsize) < 0)
-	    break;
-	strip++;
-    }
-    TIFFClose(tif);
-
-    _TIFFfree(newras);
-} 
diff --git a/tkimg1.3/libtiff/tools/pal2rgb.c b/tkimg1.3/libtiff/tools/pal2rgb.c
deleted file mode 100644
index 43173cf..0000000
--- a/tkimg1.3/libtiff/tools/pal2rgb.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/pal2rgb.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-static	void usage(void);
-static	void cpTags(TIFF* in, TIFF* out);
-
-static int
-checkcmap(int n, uint16* r, uint16* g, uint16* b)
-{
-	while (n-- > 0)
-	    if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-		return (16);
-	fprintf(stderr, "Warning, assuming 8-bit colormap.\n");
-	return (8);
-}
-
-#define	CopyField(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-
-static	uint16 compression = (uint16) -1;
-static	uint16 predictor = 0;
-static	int quality = 75;	/* JPEG quality */
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	int processCompressOptions(char*);
-
-int
-main(int argc, char* argv[])
-{
-	uint16 bitspersample, shortv;
-	uint32 imagewidth, imagelength;
-	uint16 config = PLANARCONFIG_CONTIG;
-	uint32 rowsperstrip = (uint32) -1;
-	uint16 photometric = PHOTOMETRIC_RGB;
-	uint16 *rmap, *gmap, *bmap;
-	uint32 row;
-	int cmap = -1;
-	TIFF *in, *out;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	while ((c = getopt(argc, argv, "C:c:p:r:")) != -1)
-		switch (c) {
-		case 'C':		/* force colormap interpretation */
-			cmap = atoi(optarg);
-			break;
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'p':		/* planar configuration */
-			if (streq(optarg, "separate"))
-				config = PLANARCONFIG_SEPARATE;
-			else if (streq(optarg, "contig"))
-				config = PLANARCONFIG_CONTIG;
-			else
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind != 2)
-		usage();
-	in = TIFFOpen(argv[optind], "r");
-	if (in == NULL)
-		return (-1);
-	if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &shortv) ||
-	    shortv != PHOTOMETRIC_PALETTE) {
-		fprintf(stderr, "%s: Expecting a palette image.\n",
-		    argv[optind]);
-		return (-1);
-	}
-	if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
-		fprintf(stderr,
-		    "%s: No colormap (not a valid palette image).\n",
-		    argv[optind]);
-		return (-1);
-	}
-	bitspersample = 0;
-	TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-	if (bitspersample != 8) {
-		fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n",
-		    argv[optind]);
-		return (-1);
-	}
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-2);
-	cpTags(in, out);
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
-	if (compression != (uint16)-1)
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	else
-		TIFFGetField(in, TIFFTAG_COMPRESSION, &compression);
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		if (jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		else
-			photometric = PHOTOMETRIC_RGB;
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != 0)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip));
-	(void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv);
-	if (cmap == -1)
-		cmap = checkcmap(1<<bitspersample, rmap, gmap, bmap);
-	if (cmap == 16) {
-		/*
-		 * Convert 16-bit colormap to 8-bit.
-		 */
-		int i;
-
-		for (i = (1<<bitspersample)-1; i >= 0; i--) {
-#define	CVT(x)		(((x) * 255) / ((1L<<16)-1))
-			rmap[i] = CVT(rmap[i]);
-			gmap[i] = CVT(gmap[i]);
-			bmap[i] = CVT(bmap[i]);
-		}
-	}
-	{ unsigned char *ibuf, *obuf;
-	  register unsigned char* pp;
-	  register uint32 x;
-	  ibuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(in));
-	  obuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(out));
-	  switch (config) {
-	  case PLANARCONFIG_CONTIG:
-		for (row = 0; row < imagelength; row++) {
-			if (!TIFFReadScanline(in, ibuf, row, 0))
-				goto done;
-			pp = obuf;
-			for (x = 0; x < imagewidth; x++) {
-				*pp++ = rmap[ibuf[x]];
-				*pp++ = gmap[ibuf[x]];
-				*pp++ = bmap[ibuf[x]];
-			}
-			if (!TIFFWriteScanline(out, obuf, row, 0))
-				goto done;
-		}
-		break;
-	  case PLANARCONFIG_SEPARATE:
-		for (row = 0; row < imagelength; row++) {
-			if (!TIFFReadScanline(in, ibuf, row, 0))
-				goto done;
-			for (pp = obuf, x = 0; x < imagewidth; x++)
-				*pp++ = rmap[ibuf[x]];
-			if (!TIFFWriteScanline(out, obuf, row, 0))
-				goto done;
-			for (pp = obuf, x = 0; x < imagewidth; x++)
-				*pp++ = gmap[ibuf[x]];
-			if (!TIFFWriteScanline(out, obuf, row, 0))
-				goto done;
-			for (pp = obuf, x = 0; x < imagewidth; x++)
-				*pp++ = bmap[ibuf[x]];
-			if (!TIFFWriteScanline(out, obuf, row, 0))
-				goto done;
-		}
-		break;
-	  }
-	  _TIFFfree(ibuf);
-	  _TIFFfree(obuf);
-	}
-done:
-	(void) TIFFClose(in);
-	(void) TIFFClose(out);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-#define	CopyField1(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField2(tag, v1, v2) \
-    if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-#define	CopyField4(tag, v1, v2, v3, v4) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) TIFFSetField(out, tag, v1, v2, v3, v4)
-
-static void
-cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type)
-{
-    uint16 shortv, shortv2, *shortav;
-    float floatv, *floatav;
-    char *stringv;
-    uint32 longv;
-
-    switch (type) {
-    case TIFF_SHORT:
-	if (count == 1) {
-	    CopyField1(tag, shortv);
-	} else if (count == 2) {
-	    CopyField2(tag, shortv, shortv2);
-	} else if (count == (uint16) -1) {
-	    CopyField2(tag, shortv, shortav);
-	}
-	break;
-    case TIFF_LONG:
-	CopyField1(tag, longv);
-	break;
-    case TIFF_RATIONAL:
-	if (count == 1) {
-	    CopyField1(tag, floatv);
-	} else if (count == (uint16) -1) {
-	    CopyField1(tag, floatav);
-	}
-	break;
-    case TIFF_ASCII:
-	CopyField1(tag, stringv);
-	break;
-    }
-}
-#undef CopyField4
-#undef CopyField3
-#undef CopyField2
-#undef CopyField1
-
-static struct cpTag {
-    uint16	tag;
-    uint16	count;
-    TIFFDataType type;
-} tags[] = {
-    { TIFFTAG_IMAGEWIDTH,		1, TIFF_LONG },
-    { TIFFTAG_IMAGELENGTH,		1, TIFF_LONG },
-    { TIFFTAG_BITSPERSAMPLE,		1, TIFF_SHORT },
-    { TIFFTAG_COMPRESSION,		1, TIFF_SHORT },
-    { TIFFTAG_FILLORDER,		1, TIFF_SHORT },
-    { TIFFTAG_ROWSPERSTRIP,		1, TIFF_LONG },
-    { TIFFTAG_GROUP3OPTIONS,		1, TIFF_LONG },
-    { TIFFTAG_SUBFILETYPE,		1, TIFF_LONG },
-    { TIFFTAG_THRESHHOLDING,		1, TIFF_SHORT },
-    { TIFFTAG_DOCUMENTNAME,		1, TIFF_ASCII },
-    { TIFFTAG_IMAGEDESCRIPTION,		1, TIFF_ASCII },
-    { TIFFTAG_MAKE,			1, TIFF_ASCII },
-    { TIFFTAG_MODEL,			1, TIFF_ASCII },
-    { TIFFTAG_ORIENTATION,		1, TIFF_SHORT },
-    { TIFFTAG_MINSAMPLEVALUE,		1, TIFF_SHORT },
-    { TIFFTAG_MAXSAMPLEVALUE,		1, TIFF_SHORT },
-    { TIFFTAG_XRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_PAGENAME,			1, TIFF_ASCII },
-    { TIFFTAG_XPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_GROUP4OPTIONS,		1, TIFF_LONG },
-    { TIFFTAG_RESOLUTIONUNIT,		1, TIFF_SHORT },
-    { TIFFTAG_PAGENUMBER,		2, TIFF_SHORT },
-    { TIFFTAG_SOFTWARE,			1, TIFF_ASCII },
-    { TIFFTAG_DATETIME,			1, TIFF_ASCII },
-    { TIFFTAG_ARTIST,			1, TIFF_ASCII },
-    { TIFFTAG_HOSTCOMPUTER,		1, TIFF_ASCII },
-    { TIFFTAG_WHITEPOINT,		1, TIFF_RATIONAL },
-    { TIFFTAG_PRIMARYCHROMATICITIES,	(uint16) -1,TIFF_RATIONAL },
-    { TIFFTAG_HALFTONEHINTS,		2, TIFF_SHORT },
-    { TIFFTAG_BADFAXLINES,		1, TIFF_LONG },
-    { TIFFTAG_CLEANFAXDATA,		1, TIFF_SHORT },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,	1, TIFF_LONG },
-    { TIFFTAG_INKSET,			1, TIFF_SHORT },
-    { TIFFTAG_INKNAMES,			1, TIFF_ASCII },
-    { TIFFTAG_DOTRANGE,			2, TIFF_SHORT },
-    { TIFFTAG_TARGETPRINTER,		1, TIFF_ASCII },
-    { TIFFTAG_SAMPLEFORMAT,		1, TIFF_SHORT },
-    { TIFFTAG_YCBCRCOEFFICIENTS,	(uint16) -1,TIFF_RATIONAL },
-    { TIFFTAG_YCBCRSUBSAMPLING,		2, TIFF_SHORT },
-    { TIFFTAG_YCBCRPOSITIONING,		1, TIFF_SHORT },
-    { TIFFTAG_REFERENCEBLACKWHITE,	(uint16) -1,TIFF_RATIONAL },
-};
-#define	NTAGS	(sizeof (tags) / sizeof (tags[0]))
-
-static void
-cpTags(TIFF* in, TIFF* out)
-{
-    struct cpTag *p;
-    for (p = tags; p < &tags[NTAGS]; p++)
-	cpTag(in, out, p->tag, p->count, p->type);
-}
-#undef NTAGS
-
-char* stuff[] = {
-"usage: pal2rgb [options] input.tif output.tif",
-"where options are:",
-" -p contig	pack samples contiguously (e.g. RGBRGB...)",
-" -p separate	store samples separately (e.g. RRR...GGG...BBB...)",
-" -r #		make each strip have no more than # rows",
-" -C 8		assume 8-bit colormap values (instead of 16-bit)",
-" -C 16		assume 16-bit colormap values",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)",
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/ppm2tiff.c b/tkimg1.3/libtiff/tools/ppm2tiff.c
deleted file mode 100644
index 6b6c8ef..0000000
--- a/tkimg1.3/libtiff/tools/ppm2tiff.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/ppm2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-#if defined(_WINDOWS) || defined(MSDOS)
-#define BINMODE "b"
-#else
-#define	BINMODE
-#endif
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-static	uint16 compression = COMPRESSION_PACKBITS;
-static	uint16 predictor = 0;
-static	int quality = 75;	/* JPEG quality */
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-
-static	void usage(void);
-static	int processCompressOptions(char*);
-
-static void
-BadPPM(char* file)
-{
-	fprintf(stderr, "%s: Not a PPM file.\n", file);
-	exit(-2);
-}
-
-int
-main(int argc, char* argv[])
-{
-	uint16 photometric;
-	uint32 rowsperstrip = (uint32) -1;
-	double resolution = -1;
-	unsigned char *buf = NULL;
-	uint32 row;
-	tsize_t linebytes;
-	uint16 spp;
-	TIFF *out;
-	FILE *in;
-	uint32 w, h;
-	int prec;
-	char *infile;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	if ( argc < 2 ) {
-	    fprintf(stderr, "%s: Too few arguments\n", argv[0]);
-	    usage();
-	}
-	while ((c = getopt(argc, argv, "c:r:R:")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case 'R':		/* resolution */
-			resolution = atof(optarg);
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-
-	if ( optind + 2 < argc ) {
-	    fprintf(stderr, "%s: Too many arguments\n", argv[0]);
-	    usage();
-	}
-
-	/*
-	 * If only one file is specified, read input from
-	 * stdin; otherwise usage is: ppm2tiff input output.
-	 */
-	if (argc - optind > 1) {
-		infile = argv[optind++];
-		in = fopen(infile, "r" BINMODE);
-		if (in == NULL) {
-			fprintf(stderr, "%s: Can not open.\n", infile);
-			return (-1);
-		}
-	} else {
-		infile = "<stdin>";
-		in = stdin;
-	}
-
-	if (fgetc(in) != 'P')
-		BadPPM(infile);
-	switch (fgetc(in)) {
-	case '5':			/* it's a PGM file */
-		spp = 1;
-		photometric = PHOTOMETRIC_MINISBLACK;
-		break;
-	case '6':			/* it's a PPM file */
-		spp = 3;
-		photometric = PHOTOMETRIC_RGB;
-		if (compression == COMPRESSION_JPEG &&
-		    jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		break;
-	default:
-		BadPPM(infile);
-	}
-
-	/* Parse header */
-	while(1) {
-		if (feof(in))
-			BadPPM(infile);
-		c = fgetc(in);
-		/* Skip whitespaces (blanks, TABs, CRs, LFs) */
-		if (strchr(" \t\r\n", c))
-			continue;
-
-		/* Check fo comment line */
-		if (c == '#') {
-			do {
-			    c = fgetc(in);
-			} while(!strchr("\r\n", c) || feof(in));
-			continue;
-		}
-
-		ungetc(c, in);
-		break;
-	}
-	if (fscanf(in, " %ld %ld %d", &w, &h, &prec) != 3)
-		BadPPM(infile);
-	if (fgetc(in) != '\n' || w <= 0 || h <= 0 || prec != 255)
-		BadPPM(infile);
-
-	out = TIFFOpen(argv[optind], "w");
-	if (out == NULL)
-		return (-4);
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH,  w);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, h);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != 0)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	linebytes = spp * w;
-	if (TIFFScanlineSize(out) > linebytes)
-		buf = (unsigned char *)_TIFFmalloc(linebytes);
-	else
-		buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    TIFFDefaultStripSize(out, rowsperstrip));
-	if (resolution > 0) {
-		TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
-		TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
-		TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
-	}
-	for (row = 0; row < h; row++) {
-		if (fread(buf, linebytes, 1, in) != 1) {
-			fprintf(stderr, "%s: scanline %lu: Read error.\n",
-			    infile, (unsigned long) row);
-			break;
-		}
-		if (TIFFWriteScanline(out, buf, row, 0) < 0)
-			break;
-	}
-	(void) TIFFClose(out);
-	if (buf)
-		_TIFFfree(buf);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-char* stuff[] = {
-"usage: ppm2tiff [options] input.ppm output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-" -R #		set x&y resolution (dpi)",
-"",
-" -c jpeg[:opts]  compress output with JPEG encoding",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding (the default)",
-" -c none	use no compression algorithm on output",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/ras2tiff.c b/tkimg1.3/libtiff/tools/ras2tiff.c
deleted file mode 100644
index f0de2cf..0000000
--- a/tkimg1.3/libtiff/tools/ras2tiff.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/ras2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "rasterfile.h"
-#include "tiffio.h"
-
-#ifndef howmany
-#define	howmany(x, y)	(((x)+((y)-1))/(y))
-#endif
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-#ifndef BINMODE
-#define	BINMODE
-#endif
-
-static	uint16 compression = (uint16) -1;
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	int quality = 75;		/* JPEG quality */
-static	uint16 predictor = 0;
-
-static void usage(void);
-static	int processCompressOptions(char*);
-
-int
-main(int argc, char* argv[])
-{
-	unsigned char* buf;
-	uint32 row;
-	tsize_t linebytes, scanline;
-	TIFF *out;
-	FILE *in;
-	struct rasterfile h;
-	uint16 photometric;
-	uint16 config = PLANARCONFIG_CONTIG;
-	uint32 rowsperstrip = (uint32) -1;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	while ((c = getopt(argc, argv, "c:r:h")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case 'h':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind != 2)
-		usage();
-	in = fopen(argv[optind], "r" BINMODE);
-	if (in == NULL) {
-		fprintf(stderr, "%s: Can not open.\n", argv[optind]);
-		return (-1);
-	}
-	if (fread(&h, sizeof (h), 1, in) != 1) {
-		fprintf(stderr, "%s: Can not read header.\n", argv[optind]);
-		return (-2);
-	}
-	if (strcmp(h.ras_magic, RAS_MAGIC) == 0) {
-#if (HOST_BIGENDIAN == 0)
-			TIFFSwabLong(&h.ras_width);
-			TIFFSwabLong(&h.ras_height);
-			TIFFSwabLong(&h.ras_depth);
-			TIFFSwabLong(&h.ras_length);
-			TIFFSwabLong(&h.ras_type);
-			TIFFSwabLong(&h.ras_maptype);
-			TIFFSwabLong(&h.ras_maplength);
-#endif
-	} else if (strcmp(h.ras_magic, RAS_MAGIC_INV) == 0) {
-#if (HOST_BIGENDIAN == 1)
-			TIFFSwabLong(&h.ras_width);
-			TIFFSwabLong(&h.ras_height);
-			TIFFSwabLong(&h.ras_depth);
-			TIFFSwabLong(&h.ras_length);
-			TIFFSwabLong(&h.ras_type);
-			TIFFSwabLong(&h.ras_maptype);
-			TIFFSwabLong(&h.ras_maplength);
-#endif
-	} else {
-		fprintf(stderr, "%s: Not a rasterfile.\n", argv[optind]);
-		return (-3);
-	}
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-4);
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) h.ras_width);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) h.ras_height);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, h.ras_depth > 8 ? 3 : 1);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, h.ras_depth > 1 ? 8 : 1);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
-	if (h.ras_maptype != RMT_NONE) {
-		uint16* red;
-		register uint16* map;
-		register int i, j;
-		int mapsize;
-
-		buf = (unsigned char *)_TIFFmalloc(h.ras_maplength);
-		if (buf == NULL) {
-			fprintf(stderr, "No space to read in colormap.\n");
-			return (-5);
-		}
-		if (fread(buf, h.ras_maplength, 1, in) != 1) {
-			fprintf(stderr, "%s: Read error on colormap.\n",
-			    argv[optind]);
-			return (-6);
-		}
-		mapsize = 1<<h.ras_depth; 
-		if (h.ras_maplength > mapsize*3) {
-			fprintf(stderr,
-			    "%s: Huh, %d colormap entries, should be %d?\n",
-			    argv[optind], h.ras_maplength, mapsize*3);
-			return (-7);
-		}
-		red = (uint16*)_TIFFmalloc(mapsize * 3 * sizeof (uint16));
-		if (red == NULL) {
-			fprintf(stderr, "No space for colormap.\n");
-			return (-8);
-		}
-		map = red;
-		for (j = 0; j < 3; j++) {
-#define	SCALE(x)	(((x)*((1L<<16)-1))/255)
-			for (i = h.ras_maplength/3; i-- > 0;)
-				*map++ = SCALE(*buf++);
-			if ((i = h.ras_maplength/3) < mapsize) {
-				i = mapsize - i;
-				_TIFFmemset(map, 0, i*sizeof (uint16));
-				map += i;
-			}
-		}
-		TIFFSetField(out, TIFFTAG_COLORMAP,
-		     red, red + mapsize, red + 2*mapsize);
-		photometric = PHOTOMETRIC_PALETTE;
-		if (compression == (uint16) -1)
-			compression = COMPRESSION_PACKBITS;
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	} else {
-		/* XXX this is bogus... */
-		photometric = h.ras_depth == 24 ?
-		    PHOTOMETRIC_RGB : PHOTOMETRIC_MINISBLACK;
-		if (compression == (uint16) -1)
-			compression = COMPRESSION_LZW;
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	}
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != 0)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
-	linebytes = ((h.ras_depth*h.ras_width+15) >> 3) &~ 1;
-	scanline = TIFFScanlineSize(out);
-	if (scanline > linebytes) {
-		buf = (unsigned char *)_TIFFmalloc(scanline);
-		_TIFFmemset(buf+linebytes, 0, scanline-linebytes);
-	} else
-		buf = (unsigned char *)_TIFFmalloc(linebytes);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    TIFFDefaultStripSize(out, rowsperstrip));
-	for (row = 0; row < h.ras_height; row++) {
-		if (fread(buf, linebytes, 1, in) != 1) {
-			fprintf(stderr, "%s: scanline %lu: Read error.\n",
-			    argv[optind], (unsigned long) row);
-			break;
-		}
-		if (h.ras_type == RT_STANDARD && h.ras_depth == 24) {
-			tsize_t cc = h.ras_width;
-			unsigned char* cp = buf;
-#define	SWAP(a,b)	{ unsigned char t = (a); (a) = (b); (b) = t; }
-			do {
-				SWAP(cp[0], cp[2]);
-				cp += 3;
-			} while (--cc);
-		}
-		if (TIFFWriteScanline(out, buf, row, 0) < 0)
-			break;
-	}
-	(void) TIFFClose(out);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-char* stuff[] = {
-"usage: ras2tiff [options] input.ras output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c jpeg[:opts]	compress output with JPEG encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-" -h		this help message",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/rasterfile.h b/tkimg1.3/libtiff/tools/rasterfile.h
deleted file mode 100644
index 16e2f6b..0000000
--- a/tkimg1.3/libtiff/tools/rasterfile.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/rasterfile.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Description of header for files containing raster images
- */
-struct rasterfile {
-	char	ras_magic[4];		/* magic number */
-	long	ras_width;		/* width (pixels) of image */
-	long	ras_height;		/* height (pixels) of image */
-	long	ras_depth;		/* depth (1, 8, or 24 bits) of pixel */
-	long	ras_length;		/* length (bytes) of image */
-	long	ras_type;		/* type of file; see RT_* below */
-	long	ras_maptype;		/* type of colormap; see RMT_* below */
-	long	ras_maplength;		/* length (bytes) of following map */
-	/* color map follows for ras_maplength bytes, followed by image */
-};
-#define	RAS_MAGIC	"\x59\xa6\x6a\x95"
-#define	RAS_MAGIC_INV	"\x95\x6a\xa6\x59"
-
-	/* Sun supported ras_type's */
-#define RT_OLD		0	/* Raw pixrect image in 68000 byte order */
-#define RT_STANDARD	1	/* Raw pixrect image in 68000 byte order */
-#define RT_BYTE_ENCODED	2	/* Run-length compression of bytes */
-#define RT_EXPERIMENTAL 0xffff	/* Reserved for testing */
-
-	/* Sun registered ras_maptype's */
-#define RMT_RAW		2
-	/* Sun supported ras_maptype's */
-#define RMT_NONE	0	/* ras_maplength is expected to be 0 */
-#define RMT_EQUAL_RGB	1	/* red[ras_maplength/3],green[],blue[] */
-
-/*
- * NOTES:
- * 	Each line of the image is rounded out to a multiple of 16 bits.
- *   This corresponds to the rounding convention used by the memory pixrect
- *   package (/usr/include/pixrect/memvar.h) of the SunWindows system.
- *	The ras_encoding field (always set to 0 by Sun's supported software)
- *   was renamed to ras_length in release 2.0.  As a result, rasterfiles
- *   of type 0 generated by the old software claim to have 0 length; for
- *   compatibility, code reading rasterfiles must be prepared to compute the
- *   true length from the width, height, and depth fields.
- */
diff --git a/tkimg1.3/libtiff/tools/raw2tiff.c b/tkimg1.3/libtiff/tools/raw2tiff.c
deleted file mode 100644
index 5c9c449..0000000
--- a/tkimg1.3/libtiff/tools/raw2tiff.c
+++ /dev/null
@@ -1,591 +0,0 @@
-/* $Id: raw2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- * Project:  libtiff tools
- * Purpose:  Convert raw byte sequences in TIFF images
- * Author:   Andrey Kiselev, dron at remotesensing.org
- *
- ******************************************************************************
- * Copyright (c) 2002, Andrey Kiselev <dron at remotesensing.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <math.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-typedef enum {
-	PIXEL,
-	BAND
-} InterleavingType;
-
-static	uint16 compression = (uint16) -1;
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	int quality = 75;		/* JPEG quality */
-static	uint16 predictor = 0;
-
-static void swapBytesInScanline(void *, uint32, TIFFDataType);
-static int guessSize(FILE *, TIFFDataType, uint32, int, int,
-		     uint32 *, uint32 *);
-static double correlation(void *, void *, uint32, TIFFDataType);
-static void usage(void);
-static	int processCompressOptions(char*);
-
-int
-main(int argc, char* argv[])
-{
-	uint32	width = 0, length = 0, hdr_size = 0, linebytes, bufsize;
-	int	nbands = 1;		    /* number of bands in input image*/
-	TIFFDataType dtype = TIFF_BYTE;
-	int	depth = 1;		    /* bytes per pixel in input image */
-	int	swab = 0;		    /* byte swapping flag */
-	InterleavingType interleaving = 0;  /* interleaving type flag */
-	uint32 rowsperstrip = (uint32) -1;
-	uint16	photometric = PHOTOMETRIC_MINISBLACK;
-	uint16	config = PLANARCONFIG_CONTIG;
-	uint16	fillorder = FILLORDER_LSB2MSB;
-	FILE	*in;
-	char	*outfilename = NULL;
-	TIFF	*out;
-	
-	uint32 row, col, band;
-	int	c;
-	unsigned char *buf = NULL, *buf1 = NULL;
-	extern int optind;
-	extern char* optarg;
-	
-
-	while ((c = getopt(argc, argv, "c:r:H:w:l:b:d:LMp:si:o:h")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case 'H':		/* size of input image file header */
-			hdr_size = atoi(optarg);
-			break;
-		case 'w':		/* input image width */
-			width = atoi(optarg);
-			break;
-		case 'l':		/* input image length */
-			length = atoi(optarg);
-			break;
-		case 'b':		/* number of bands in input image */
-			nbands = atoi(optarg);
-			break;
-		case 'd':		/* type of samples in input image */
-			if (strncmp(optarg, "byte", 4) == 0)
-				dtype = TIFF_BYTE;
-			else if (strncmp(optarg, "short", 5) == 0)
-				dtype = TIFF_SHORT;
-			else if  (strncmp(optarg, "long", 4) == 0)
-				dtype = TIFF_LONG;
-			else if  (strncmp(optarg, "sbyte", 5) == 0)
-				dtype = TIFF_SBYTE;
-			else if  (strncmp(optarg, "sshort", 6) == 0)
-				dtype = TIFF_SSHORT;
-			else if  (strncmp(optarg, "slong", 5) == 0)
-				dtype = TIFF_SLONG;
-			else if  (strncmp(optarg, "float", 5) == 0)
-				dtype = TIFF_FLOAT;
-			else if  (strncmp(optarg, "double", 6) == 0)
-				dtype = TIFF_DOUBLE;
-			else
-				dtype = TIFF_BYTE;
-			depth = TIFFDataWidth(dtype);
-			break;
-		case 'L':		/* input has lsb-to-msb fillorder */
-			fillorder = FILLORDER_LSB2MSB;
-			break;
-		case 'M':		/* input has msb-to-lsb fillorder */
-			fillorder = FILLORDER_MSB2LSB;
-			break;
-		case 'p':		/* photometric interpretation */
-			if (strncmp(optarg, "miniswhite", 10) == 0)
-				photometric = PHOTOMETRIC_MINISWHITE;
-			else if (strncmp(optarg, "minisblack", 10) == 0)
-				photometric = PHOTOMETRIC_MINISBLACK;
-			else if (strncmp(optarg, "rgb", 3) == 0)
-				photometric = PHOTOMETRIC_RGB;
-			else if (strncmp(optarg, "cmyk", 4) == 0)
-				photometric = PHOTOMETRIC_SEPARATED;
-			else if (strncmp(optarg, "ycbcr", 5) == 0)
-				photometric = PHOTOMETRIC_YCBCR;
-			else if (strncmp(optarg, "cielab", 6) == 0)
-				photometric = PHOTOMETRIC_CIELAB;
-			else if (strncmp(optarg, "icclab", 6) == 0)
-				photometric = PHOTOMETRIC_ICCLAB;
-			else if (strncmp(optarg, "itulab", 6) == 0)
-				photometric = PHOTOMETRIC_ITULAB;
-			else
-				photometric = PHOTOMETRIC_MINISBLACK;
-			break;
-		case 's':		/* do we need to swap bytes? */
-			swab = 1;
-			break;
-		case 'i':		/* type of interleaving */
-			if (strncmp(optarg, "pixel", 4) == 0)
-				interleaving = PIXEL;
-			else if  (strncmp(optarg, "band", 6) == 0)
-				interleaving = BAND;
-			else
-				interleaving = 0;
-			break;
-		case 'o':
-			outfilename = optarg;
-			break;
-		case 'h':
-			usage();
-		default:
-			break;
-		}
-	if (argc - optind < 2)
-		usage();
-	in = fopen(argv[optind], "rb");
-	if (in == NULL) {
-		fprintf(stderr, "%s: %s: Cannot open input file.\n",
-			argv[0], argv[optind]);
-		return (-1);
-	}
-
-	if (guessSize(in, dtype, hdr_size, nbands, swab, &width, &length) < 0)
-		return 1;
-
-	if (outfilename == NULL)
-		outfilename = argv[optind+1];
-	out = TIFFOpen(outfilename, "w");
-	if (out == NULL) {
-		fprintf(stderr, "%s: %s: Cannot open file for output.\n",
-			argv[0], outfilename);
-		return (-1);
-	}
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, length);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, nbands);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, depth * 8);
-	TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
-	switch (dtype) {
-	case TIFF_BYTE:
-	case TIFF_SHORT:
-	case TIFF_LONG:
-		TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-		break;
-	case TIFF_SBYTE:
-	case TIFF_SSHORT:
-	case TIFF_SLONG:
-		TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
-		break;
-	case TIFF_FLOAT:
-	case TIFF_DOUBLE:
-		TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
-		break;
-	default:
-		TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_VOID);
-		break;
-	}
-	if (compression == (uint16) -1)
-		compression = COMPRESSION_PACKBITS;
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		if (photometric == PHOTOMETRIC_RGB
-		    && jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != 0)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	switch(interleaving) {
-	case BAND:				/* band interleaved data */
-		linebytes = width * depth;
-		buf = (unsigned char *)_TIFFmalloc(linebytes);
-		break;
-	case PIXEL:				/* pixel interleaved data */
-	default:
-		linebytes = width * nbands * depth;
-		break;
-	}
-	bufsize = width * nbands * depth;
-	buf1 = (unsigned char *)_TIFFmalloc(bufsize);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    TIFFDefaultStripSize(out, rowsperstrip));
-	fseek(in, hdr_size, SEEK_SET);		/* Skip the file header */
-	for (row = 0; row < length; row++) {
-		switch(interleaving) {
-		case BAND:			/* band interleaved data */
-			for (band = 0; band < nbands; band++) {
-				fseek(in,
-				      hdr_size + (length*band+row)*linebytes,
-				      SEEK_SET);
-				if (fread(buf, linebytes, 1, in) != 1) {
-					fprintf(stderr,
-					"%s: %s: scanline %lu: Read error.\n",
-					argv[0], argv[optind],
-					(unsigned long) row);
-				break;
-				}
-				if (swab)	/* Swap bytes if needed */
-					swapBytesInScanline(buf, width, dtype);
-				for (col = 0; col < width; col++)
-					memcpy(buf1 + (col*nbands+band)*depth,
-					       buf + col * depth, depth);
-			}
-			break;
-		case PIXEL:			/* pixel interleaved data */
-		default:
-			if (fread(buf1, bufsize, 1, in) != 1) {
-				fprintf(stderr,
-					"%s: %s: scanline %lu: Read error.\n",
-					argv[0], argv[optind],
-					(unsigned long) row);
-				break;
-			}
-			if (swab)		/* Swap bytes if needed */
-				swapBytesInScanline(buf1, width, dtype);
-			break;
-		}
-				
-		if (TIFFWriteScanline(out, buf1, row, 0) < 0) {
-			fprintf(stderr,	"%s: %s: scanline %lu: Write error.\n",
-				argv[0], outfilename, (unsigned long) row);
-			break;
-		}
-	}
-	if (buf)
-		_TIFFfree(buf);
-	if (buf1)
-		_TIFFfree(buf1);
-	TIFFClose(out);
-	return (0);
-}
-
-static void
-swapBytesInScanline(void *buf, uint32 width, TIFFDataType dtype)
-{
-	switch (dtype) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*)buf, width);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			TIFFSwabArrayOfLong((uint32*)buf, width);
-			break;
-		/* case TIFF_FLOAT: */	/* FIXME */
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*)buf, width);
-			break;
-		default:
-			break;
-	}
-}
-
-static int
-guessSize(FILE *fp, TIFFDataType dtype, uint32 hdr_size, int nbands, int swab,
-	  uint32 *width, uint32 *length)
-{
-	const float longt = 40.0;    /* maximum possible height/width ratio */
-	char	    *buf1, *buf2;
-	struct stat filestat;
-	uint32	    w, h, scanlinesize, imagesize;
-	int	    depth = TIFFDataWidth(dtype);
-	float	    cor_coef = 0, tmp;
-
-	fstat(fileno(fp), &filestat);
-
-	if (filestat.st_size < hdr_size) {
-		fprintf(stderr, "Too large header size specified.\n");
-		return -1;
-	}
-
-	imagesize = (filestat.st_size - hdr_size) / nbands / depth;
-
-	if (*width != 0 && *length == 0) {
-		fprintf(stderr,	"Image height is not specified.\n");
-
-		*length = imagesize / *width;
-		
-		fprintf(stderr, "Height is guessed as %ld.\n", *length);
-
-		return 1;
-	} else if (*width == 0 && *length != 0) {
-		fprintf(stderr, "Image width is not specified.\n");
-
-		*width = imagesize / *length;
-		
-		fprintf(stderr,	"Width is guessed as %ld.\n", *width);
-
-		return 1;
-	} else if (*width == 0 && *length == 0) {
-		fprintf(stderr,	"Image width and height are not specified.\n");
-
-		for (w = sqrt(imagesize / longt);
-		     w < sqrt(imagesize * longt);
-		     w++) {
-			if (imagesize % w == 0) {
-				scanlinesize = w * depth;
-				buf1 = _TIFFmalloc(scanlinesize);
-				buf2 = _TIFFmalloc(scanlinesize);
-				h = imagesize / w;
-				fseek(fp, hdr_size + (int)(h/2)*scanlinesize,
-				      SEEK_SET);
-				fread(buf1, scanlinesize, 1, fp);
-				fread(buf2, scanlinesize, 1, fp);
-				if (swab) {
-					swapBytesInScanline(buf1, w, dtype);
-					swapBytesInScanline(buf2, w, dtype);
-				}
-				tmp = fabs(correlation(buf1, buf2, w, dtype));
-				if (tmp > cor_coef) {
-					cor_coef = tmp;
-					*width = w, *length = h;
-				}
-
-				_TIFFfree(buf1);
-				_TIFFfree(buf2);
-			}
-		}
-
-		fprintf(stderr,
-			"Width is guessed as %ld, height is guessed as %ld.\n",
-			*width, *length);
-
-		return 1;
-	} else {
-		if (filestat.st_size<hdr_size+(*width)*(*length)*nbands*depth) {
-			fprintf(stderr, "Input file too small.\n");
-		return -1;
-		}
-	}
-
-	return 1;
-}
-
-/* Calculate correlation coefficient between two numeric vectors */
-static double
-correlation(void *buf1, void *buf2, uint32 n_elem, TIFFDataType dtype)
-{
-	float	X, Y, M1 = 0.0, M2 = 0.0, D1 = 0.0, D2 = 0.0, K = 0.0;
-	int	i;
-
-	switch (dtype) {
-		case TIFF_BYTE:
-		default:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((u_char *)buf1)[i];
-				Y = ((u_char *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_SBYTE:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((signed char *)buf1)[i];
-				Y = ((signed char *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_SHORT:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((uint16 *)buf1)[i];
-				Y = ((uint16 *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_SSHORT:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((int16 *)buf1)[i];
-				Y = ((int16 *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_LONG:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((uint32 *)buf1)[i];
-				Y = ((uint32 *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_SLONG:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((int32 *)buf1)[i];
-				Y = ((int32 *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_FLOAT:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((float *)buf1)[i];
-				Y = ((float *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-		case TIFF_DOUBLE:
-                        for (i = 0; i < n_elem; i++) {
-				X = ((double *)buf1)[i];
-				Y = ((double *)buf2)[i];
-				M1 += X, M2 += Y;
-				D1 += X * X, D2 += Y * Y;
-				K += X * Y;
-                        }
-			break;
-	}
-
-	M1 /= n_elem;
-	M2 /= n_elem;
-	D1 -= M1 * M1 * n_elem;
-	D2 -= M2 * M2 * n_elem;
-	K = (K - M1 * M2 * n_elem) / sqrt(D1 * D2);
-
-	return K;
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (strcmp(opt, "none") == 0)
-		compression = COMPRESSION_NONE;
-	else if (strcmp(opt, "packbits") == 0)
-		compression = COMPRESSION_PACKBITS;
-	else if (strncmp(opt, "jpeg", 4) == 0) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strncmp(opt, "lzw", 3) == 0) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strncmp(opt, "zip", 3) == 0) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-char* stuff[] = {
-"raw2tiff --- tool to converting raw byte sequences in TIFF images",
-"usage: raw2tiff [options] input.raw output.tif",
-"where options are:",
-" -L		input data has LSB2MSB bit order (default)",
-" -M		input data has MSB2LSB bit order",
-" -r #		make each strip have no more than # rows",
-" -H #		size of input image file header in bytes (0 by default)",
-" -w #		width of input image in pixels",
-" -l #		length of input image in lines",
-" -b #		number of bands in input image (1 by default)",
-"",
-" -d data_type	type of samples in input image",
-"where data_type may be:",
-" byte		8-bit unsigned integer (default)",
-" short		16-bit unsigned integer",
-" long		32-bit unsigned integer",
-" sbyte		8-bit signed integer",
-" sshort		16-bit signed integer",
-" slong		32-bit signed integer",
-" float		32-bit IEEE floating point",
-" double		64-bit IEEE floating point",
-"",
-" -p photo	photometric interpretation (color space) of the input image",
-"where photo may be:",
-" miniswhite	white color represented with 0 value",
-" minisblack	black color represented with 0 value (default)",
-" rgb		image has RGB color model",
-" cmyk		image has CMYK (separated) color model",
-" ycbcr		image has YCbCr color model",
-" cielab		image has CIE L*a*b color model",
-" icclab		image has ICC L*a*b color model",
-" itulab		image has ITU L*a*b color model",
-"",
-" -s		swap bytes fetched from input file",
-"",
-" -i config	type of samples interleaving in input image",
-"where config may be:",
-" pixel		pixel interleaved data (default)",
-" band		band interleaved data",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-" -o out.tif	write output to out.tif",
-" -h		this help message",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
diff --git a/tkimg1.3/libtiff/tools/rgb2ycbcr.c b/tkimg1.3/libtiff/tools/rgb2ycbcr.c
deleted file mode 100644
index 3b10063..0000000
--- a/tkimg1.3/libtiff/tools/rgb2ycbcr.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/rgb2ycbcr.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	CopyField(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-
-#ifndef howmany
-#define	howmany(x, y)	(((x)+((y)-1))/(y))
-#endif
-#define	roundup(x, y)	(howmany(x,y)*((uint32)(y)))
-
-#define	LumaRed		ycbcrCoeffs[0]
-#define	LumaGreen	ycbcrCoeffs[1]
-#define	LumaBlue	ycbcrCoeffs[2]
-
-uint16	compression = COMPRESSION_PACKBITS;
-uint32	rowsperstrip = (uint32) -1;
-
-uint16	horizSubSampling = 2;		/* YCbCr horizontal subsampling */
-uint16	vertSubSampling = 2;		/* YCbCr vertical subsampling */
-float	ycbcrCoeffs[3] = { .299, .587, .114 };
-/* default coding range is CCIR Rec 601-1 with no headroom/footroom */
-float	refBlackWhite[6] = { 0., 255., 128., 255., 128., 255. };
-
-static	int tiffcvt(TIFF* in, TIFF* out);
-static	void usage(int code);
-static	void setupLumaTables(void);
-
-int
-main(int argc, char* argv[])
-{
-	TIFF *in, *out;
-	int c;
-	extern int optind;
-	extern char *optarg;
-
-	while ((c = getopt(argc, argv, "c:h:r:v:z")) != -1)
-		switch (c) {
-		case 'c':
-			if (streq(optarg, "none"))
-			    compression = COMPRESSION_NONE;
-			else if (streq(optarg, "packbits"))
-			    compression = COMPRESSION_PACKBITS;
-			else if (streq(optarg, "lzw"))
-			    compression = COMPRESSION_LZW;
-			else if (streq(optarg, "jpeg"))
-			    compression = COMPRESSION_JPEG;
-			else if (streq(optarg, "zip"))
-			    compression = COMPRESSION_ADOBE_DEFLATE;
-			else
-			    usage(-1);
-			break;
-		case 'h':
-			horizSubSampling = atoi(optarg);
-			break;
-		case 'v':
-			vertSubSampling = atoi(optarg);
-			break;
-		case 'r':
-			rowsperstrip = atoi(optarg);
-			break;
-		case 'z':	/* CCIR Rec 601-1 w/ headroom/footroom */
-			refBlackWhite[0] = 16.;
-			refBlackWhite[1] = 235.;
-			refBlackWhite[2] = 128.;
-			refBlackWhite[3] = 240.;
-			refBlackWhite[4] = 128.;
-			refBlackWhite[5] = 240.;
-			break;
-		case '?':
-			usage(0);
-			/*NOTREACHED*/
-		}
-	if (argc - optind < 2)
-		usage(-1);
-	out = TIFFOpen(argv[argc-1], "w");
-	if (out == NULL)
-		return (-2);
-	setupLumaTables();
-	for (; optind < argc-1; optind++) {
-		in = TIFFOpen(argv[optind], "r");
-		if (in != NULL) {
-			do {
-				if (!tiffcvt(in, out) ||
-				    !TIFFWriteDirectory(out)) {
-					(void) TIFFClose(out);
-					return (1);
-				}
-			} while (TIFFReadDirectory(in));
-			(void) TIFFClose(in);
-		}
-	}
-	(void) TIFFClose(out);
-	return (0);
-}
-
-float	*lumaRed;
-float	*lumaGreen;
-float	*lumaBlue;
-float	D1, D2;
-int	Yzero;
-
-static float*
-setupLuma(float c)
-{
-	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
-	int i;
-	for (i = 0; i < 256; i++)
-		v[i] = c * i;
-	return (v);
-}
-
-static unsigned
-V2Code(float f, float RB, float RW, int CR)
-{
-	unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5);
-	return (c > 255 ? 255 : c);
-}
-
-static void
-setupLumaTables(void)
-{
-	lumaRed = setupLuma(LumaRed);
-	lumaGreen = setupLuma(LumaGreen);
-	lumaBlue = setupLuma(LumaBlue);
-	D1 = 1./(2 - 2*LumaBlue);
-	D2 = 1./(2 - 2*LumaRed);
-	Yzero = V2Code(0, refBlackWhite[0], refBlackWhite[1], 255);
-}
-
-static void
-cvtClump(unsigned char* op, uint32* raster, uint32 ch, uint32 cw, uint32 w)
-{
-	float Y, Cb = 0, Cr = 0;
-	int j, k;
-	/*
-	 * Convert ch-by-cw block of RGB
-	 * to YCbCr and sample accordingly.
-	 */
-	for (k = 0; k < ch; k++) {
-		for (j = 0; j < cw; j++) {
-			uint32 RGB = (raster - k*w)[j];
-			Y = lumaRed[TIFFGetR(RGB)] +
-			    lumaGreen[TIFFGetG(RGB)] +
-			    lumaBlue[TIFFGetB(RGB)];
-			/* accumulate chrominance */
-			Cb += (TIFFGetB(RGB) - Y) * D1;
-			Cr += (TIFFGetR(RGB) - Y) * D2;
-			/* emit luminence */
-			*op++ = V2Code(Y,
-			    refBlackWhite[0], refBlackWhite[1], 255);
-		}
-		for (; j < horizSubSampling; j++)
-			*op++ = Yzero;
-	}
-	for (; k < vertSubSampling; k++) {
-		for (j = 0; j < horizSubSampling; j++)
-			*op++ = Yzero;
-	}
-	/* emit sampled chrominance values */
-	*op++ = V2Code(Cb / (ch*cw), refBlackWhite[2], refBlackWhite[3], 127);
-	*op++ = V2Code(Cr / (ch*cw), refBlackWhite[4], refBlackWhite[5], 127);
-}
-#undef LumaRed
-#undef LumaGreen
-#undef LumaBlue
-#undef V2Code
-
-/*
- * Convert a strip of RGB data to YCbCr and
- * sample to generate the output data.
- */
-static void
-cvtStrip(unsigned char* op, uint32* raster, uint32 nrows, uint32 width)
-{
-	uint32 x;
-	int clumpSize = vertSubSampling * horizSubSampling + 2;
-	uint32 *tp;
-
-	for (; nrows >= vertSubSampling; nrows -= vertSubSampling) {
-		tp = raster;
-		for (x = width; x >= horizSubSampling; x -= horizSubSampling) {
-			cvtClump(op, tp,
-			    vertSubSampling, horizSubSampling, width);
-			op += clumpSize;
-			tp += horizSubSampling;
-		}
-		if (x > 0) {
-			cvtClump(op, tp, vertSubSampling, x, width);
-			op += clumpSize;
-		}
-		raster -= vertSubSampling*width;
-	}
-	if (nrows > 0) {
-		tp = raster;
-		for (x = width; x >= horizSubSampling; x -= horizSubSampling) {
-			cvtClump(op, tp, nrows, horizSubSampling, width);
-			op += clumpSize;
-			tp += horizSubSampling;
-		}
-		if (x > 0)
-			cvtClump(op, tp, nrows, x, width);
-	}
-}
-
-static int
-cvtRaster(TIFF* tif, uint32* raster, uint32 width, uint32 height)
-{
-	uint32 y;
-	tstrip_t strip = 0;
-	tsize_t cc, acc;
-	unsigned char* buf;
-	uint32 rwidth = roundup(width, horizSubSampling);
-	uint32 rheight = roundup(height, vertSubSampling);
-	uint32 nrows = (rowsperstrip > rheight ? rheight : rowsperstrip);
-        uint32 rnrows = roundup(nrows,vertSubSampling);
-
-	cc = rnrows*rwidth +
-	    2*((rnrows*rwidth) / (horizSubSampling*vertSubSampling));
-	buf = (unsigned char*)_TIFFmalloc(cc);
-	for (y = height; (int32) y > 0; y -= nrows) {
-		uint32 nr = (y > nrows ? nrows : y);
-		cvtStrip(buf, raster + (y-1)*width, nr, width);
-		nr = roundup(nr, vertSubSampling);
-		acc = nr*rwidth +
-			2*((nr*rwidth)/(horizSubSampling*vertSubSampling));
-		if (!TIFFWriteEncodedStrip(tif, strip++, buf, acc)) {
-			_TIFFfree(buf);
-			return (0);
-		}
-	}
-	_TIFFfree(buf);
-	return (1);
-}
-
-static int
-tiffcvt(TIFF* in, TIFF* out)
-{
-	uint32 width, height;		/* image width & height */
-	uint32* raster;			/* retrieve RGBA image */
-	uint16 shortv;
-	float floatv;
-	char *stringv;
-	uint32 longv;
-
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
-	raster = (uint32*)_TIFFmalloc(width * height * sizeof (uint32));
-	if (raster == 0) {
-		TIFFError(TIFFFileName(in), "No space for raster buffer");
-		return (0);
-	}
-	if (!TIFFReadRGBAImage(in, width, height, raster, 0)) {
-		_TIFFfree(raster);
-		return (0);
-	}
-
-	CopyField(TIFFTAG_SUBFILETYPE, longv);
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, height);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR);
-	if (compression == COMPRESSION_JPEG)
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW);
-	CopyField(TIFFTAG_FILLORDER, shortv);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3);
-	CopyField(TIFFTAG_XRESOLUTION, floatv);
-	CopyField(TIFFTAG_YRESOLUTION, floatv);
-	CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	{ char buf[2048];
-	  char *cp = strrchr(TIFFFileName(in), '/');
-	  sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
-	  TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
-	}
-	TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
-	CopyField(TIFFTAG_DOCUMENTNAME, stringv);
-
-	TIFFSetField(out, TIFFTAG_REFERENCEBLACKWHITE, refBlackWhite);
-	TIFFSetField(out, TIFFTAG_YCBCRSUBSAMPLING,
-	    horizSubSampling, vertSubSampling);
-	TIFFSetField(out, TIFFTAG_YCBCRPOSITIONING, YCBCRPOSITION_CENTERED);
-	TIFFSetField(out, TIFFTAG_YCBCRCOEFFICIENTS, ycbcrCoeffs);
-	rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-	return (cvtRaster(out, raster, width, height));
-}
-
-char* stuff[] = {
-    "usage: rgb2ycbcr [-c comp] [-r rows] [-h N] [-v N] input... output\n",
-    "where comp is one of the following compression algorithms:\n",
-    " jpeg\t\tJPEG encoding\n",
-    " lzw\t\tLempel-Ziv & Welch encoding\n",
-    " (lzw no longer supported by default due to Unisys patent enforcement)\n", 
-    " zip\t\tdeflate encoding\n",
-    " packbits\tPackBits encoding (default)\n",
-    " none\t\tno compression\n",
-    "and the other options are:\n",
-    " -r\trows/strip\n",
-    " -h\thorizontal sampling factor (1,2,4)\n",
-    " -v\tvertical sampling factor (1,2,4)\n",
-    NULL
-};
-
-static void
-usage(int code)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-       
- fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(code);
-}
diff --git a/tkimg1.3/libtiff/tools/sgi2tiff.c b/tkimg1.3/libtiff/tools/sgi2tiff.c
deleted file mode 100644
index 133802c..0000000
--- a/tkimg1.3/libtiff/tools/sgi2tiff.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/sgi2tiff.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gl/image.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-static	short config = PLANARCONFIG_CONTIG;
-static	uint16 compression = COMPRESSION_PACKBITS;
-static	uint16 predictor = 0;
-static	uint16 fillorder = 0;
-static	uint32 rowsperstrip = (uint32) -1;
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	int quality = 75;		/* JPEG quality */
-static	uint16 photometric;
-
-static	void usage(void);
-static	int cpContig(IMAGE*, TIFF*);
-static	int cpSeparate(IMAGE*, TIFF*);
-static	int processCompressOptions(char*);
-
-/* XXX image library has no prototypes */
-extern	IMAGE* iopen(const char*, const char*);
-extern	void iclose(IMAGE*);
-extern	void getrow(IMAGE*, short*, int, int);
-
-int
-main(int argc, char* argv[])
-{
-	IMAGE *in;
-	TIFF *out;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	while ((c = getopt(argc, argv, "c:p:r:")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'f':		/* fill order */
-			if (streq(optarg, "lsb2msb"))
-				fillorder = FILLORDER_LSB2MSB;
-			else if (streq(optarg, "msb2lsb"))
-				fillorder = FILLORDER_MSB2LSB;
-			else
-				usage();
-			break;
-		case 'p':		/* planar configuration */
-			if (streq(optarg, "separate"))
-				config = PLANARCONFIG_SEPARATE;
-			else if (streq(optarg, "contig"))
-				config = PLANARCONFIG_CONTIG;
-			else
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind != 2)
-		usage();
-	in = iopen(argv[optind], "r");
-	if (in == NULL)
-		return (-1);
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-2);
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) in->xsize);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) in->ysize);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	if (in->zsize == 1)
-		photometric = PHOTOMETRIC_MINISBLACK;
-	else
-		photometric = PHOTOMETRIC_RGB;
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != 0)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
-	if (fillorder != 0)
-		TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, in->zsize);
-	if (in->zsize > 3) {
-	    uint16 v[1];
-	    v[0] = EXTRASAMPLE_UNASSALPHA;
-	    TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v);
-	}
-	TIFFSetField(out, TIFFTAG_MINSAMPLEVALUE, (uint16) in->min);
-	TIFFSetField(out, TIFFTAG_MAXSAMPLEVALUE, (uint16) in->max);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
-	if (config != PLANARCONFIG_SEPARATE)
-		TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-		    TIFFDefaultStripSize(out, rowsperstrip));
-	else			/* force 1 row/strip for library limitation */
-		TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, 1L);
-	if (in->name[0] != '\0')
-		TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, in->name);
-	if (config == PLANARCONFIG_CONTIG)
-		cpContig(in, out);
-	else
-		cpSeparate(in, out);
-	(void) iclose(in);
-	(void) TIFFClose(out);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-static int
-cpContig(IMAGE* in, TIFF* out)
-{
-	tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
-	short *r = NULL;
-	int x, y;
-
-	if (in->zsize == 3) {
-		short *g, *b;
-
-		r = (short *)_TIFFmalloc(3 * in->xsize * sizeof (short));
-		g = r + in->xsize;
-		b = g + in->xsize;
-		for (y = in->ysize-1; y >= 0; y--) {
-			uint8* pp = (uint8*) buf;
-
-			getrow(in, r, y, 0);
-			getrow(in, g, y, 1);
-			getrow(in, b, y, 2);
-			for (x = 0; x < in->xsize; x++) {
-				pp[0] = r[x];
-				pp[1] = g[x];
-				pp[2] = b[x];
-				pp += 3;
-			}
-			if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
-				goto bad;
-		}
-	} else if (in->zsize == 4) {
-		short *g, *b, *a;
-
-		r = (short *)_TIFFmalloc(4 * in->xsize * sizeof (short));
-		g = r + in->xsize;
-		b = g + in->xsize;
-		a = b + in->xsize;
-		for (y = in->ysize-1; y >= 0; y--) {
-			uint8* pp = (uint8*) buf;
-
-			getrow(in, r, y, 0);
-			getrow(in, g, y, 1);
-			getrow(in, b, y, 2);
-			getrow(in, a, y, 3);
-			for (x = 0; x < in->xsize; x++) {
-				pp[0] = r[x];
-				pp[1] = g[x];
-				pp[2] = b[x];
-				pp[3] = a[x];
-				pp += 4;
-			}
-			if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
-				goto bad;
-		}
-	} else {
-		uint8* pp = (uint8*) buf;
-
-		r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
-		for (y = in->ysize-1; y >= 0; y--) {
-			getrow(in, r, y, 0);
-			for (x = in->xsize-1; x >= 0; x--)
-				pp[x] = r[x];
-			if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
-				goto bad;
-		}
-	}
-	if (r)
-		_TIFFfree(r);
-	_TIFFfree(buf);
-	return (1);
-bad:
-	if (r)
-		_TIFFfree(r);
-	_TIFFfree(buf);
-	return (0);
-}
-
-static int
-cpSeparate(IMAGE* in, TIFF* out)
-{
-	tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
-	short *r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
-	uint8* pp = (uint8*) buf;
-	int x, y, z;
-
-	for (z = 0; z < in->zsize; z++) {
-		for (y = in->ysize-1; y >= 0; y--) {
-			getrow(in, r, y, z);
-			for (x = 0; x < in->xsize; x++)
-				pp[x] = r[x];
-			if (TIFFWriteScanline(out, buf, in->ysize-y-1, z) < 0)
-				goto bad;
-		}
-	}
-	_TIFFfree(r);
-	_TIFFfree(buf);
-	return (1);
-bad:
-	_TIFFfree(r);
-	_TIFFfree(buf);
-	return (0);
-}
-
-char* stuff[] = {
-"usage: sgi2tiff [options] input.rgb output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-"",
-" -p contig	pack samples contiguously (e.g. RGBRGB...)",
-" -p separate	store samples separately (e.g. RRR...GGG...BBB...)",
-"",
-" -f lsb2msb	force lsb-to-msb FillOrder for output",
-" -f msb2lsb	force msb-to-lsb FillOrder for output",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/sgisv.c b/tkimg1.3/libtiff/tools/sgisv.c
deleted file mode 100644
index fa24ebf..0000000
--- a/tkimg1.3/libtiff/tools/sgisv.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/sgisv.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gl.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-typedef unsigned char u_char;
-typedef unsigned long u_long;
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-uint32	rowsperstrip = (uint32) -1;
-uint16	compression = COMPRESSION_PACKBITS;
-uint16	config = PLANARCONFIG_CONTIG;
-uint16	predictor = 0;
-int	xmaxscreen;
-int	ymaxscreen;
-uint16	photometric = PHOTOMETRIC_RGB;
-int	jpegcolormode = JPEGCOLORMODE_RGB;
-int	quality = 75;		/* JPEG quality */
-
-static	void usage(void);
-static	void tiffsv(char*, int, int, int, int);
-
-int
-main(int argc, char* argv[])
-{
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	while ((c = getopt(argc, argv, "c:p:r:")) != -1)
-		switch (c) {
-		case 'b':		/* save as b&w */
-			photometric = PHOTOMETRIC_MINISBLACK;
-			break;
-		case 'c':		/* compression scheme */
-			if (streq(optarg, "none"))
-				compression = COMPRESSION_NONE;
-			else if (streq(optarg, "packbits"))
-				compression = COMPRESSION_PACKBITS;
-			else if (strneq(optarg, "jpeg", 4)) {
-				char* cp = strchr(optarg, ':');
-				if (cp && isdigit(cp[1]))
-					quality = atoi(cp+1);
-				if (cp && strchr(cp, 'r'))
-					jpegcolormode = JPEGCOLORMODE_RAW;
-				compression = COMPRESSION_JPEG;
-			} else if (strneq(optarg, "lzw", 3)) {
-				char* cp = strchr(optarg, ':');
-				if (cp)
-					predictor = atoi(cp+1);
-				compression = COMPRESSION_LZW;
-			} else
-				usage();
-			break;
-		case 'p':		/* planar configuration */
-			if (streq(optarg, "separate"))
-				config = PLANARCONFIG_SEPARATE;
-			else if (streq(optarg, "contig"))
-				config = PLANARCONFIG_CONTIG;
-			else
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind != 1 && argc - optind != 5)
-		usage();
-	xmaxscreen = getgdesc(GD_XPMAX)-1;
-	ymaxscreen = getgdesc(GD_YPMAX)-1;
-	foreground();
-	noport();
-	winopen("tiffsv");
-	if (argc - optind == 5)
-		tiffsv(argv[optind],
-		    atoi(argv[optind+1]), atoi(argv[optind+2]),
-		    atoi(argv[optind+3]), atoi(argv[optind+4]));
-	else
-		tiffsv(argv[optind], 0, xmaxscreen, 0, ymaxscreen);
-	return (0);
-}
-
-char* stuff[] = {
-"usage: tiffsv [options] outimage.tif [x1 x2 y1 y2] [-b]",
-"where options are:",
-" -p contig	pack samples contiguously (e.g. RGBRGB...)",
-" -p separate	store samples separately (e.g. RRR...GGG...BBB...)",
-"",
-" -r #		make each strip have no more than # rows",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"",
-"LZW options:",
-" #		set predictor value for Lempel-Ziv & Welch encoding",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-static void
-svRGBSeparate(TIFF* tif, u_long* ss, int xsize, int ysize)
-{
-	tsize_t stripsize = TIFFStripSize(tif);
-	u_char *rbuf = (u_char *)_TIFFmalloc(3*stripsize);
-	u_char *gbuf = rbuf + stripsize;
-	u_char *bbuf = gbuf + stripsize;
-	register int y;
-
-	for (y = 0; y <= ysize; y += rowsperstrip) {
-		u_char *rp, *gp, *bp;
-		register int x;
-		register uint32 n;
-
-		n = rowsperstrip;
-		if (n > ysize-y+1)
-			n = ysize-y+1;
-		rp = rbuf; gp = gbuf; bp = bbuf;
-		do {
-			for (x = 0; x <= xsize; x++) {
-				u_long v = ss[x];
-				rp[x] = v;
-				gp[x] = v >> 8;
-				bp[x] = v >> 16;
-			}
-			rp += xsize+1, gp += xsize+1, bp += xsize+1;
-			ss += xsize+1;
-		} while (--n);
-		if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
-		    rbuf, stripsize) < 0)
-			break;
-		if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,1),
-		    gbuf, stripsize) < 0)
-			break;
-		if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,2),
-		    bbuf, stripsize) < 0)
-			break;
-	}
-	_TIFFfree(rbuf);
-}
-
-static void
-svRGBContig(TIFF* tif, u_long* ss, int xsize, int ysize)
-{
-	register int x, y;
-	tsize_t stripsize = TIFFStripSize(tif);
-	u_char *strip = (u_char *)_TIFFmalloc(stripsize);
-
-	for (y = 0; y <= ysize; y += rowsperstrip) {
-		register u_char *pp = strip;
-		register uint32 n;
-
-		n = rowsperstrip;
-		if (n > ysize-y+1)
-			n = ysize-y+1;
-		do {
-			for (x = 0; x <= xsize; x++) {
-				u_long v = ss[x];
-				pp[0] = v;
-				pp[1] = v >> 8;
-				pp[2] = v >> 16;
-				pp += 3;
-			}
-			ss += xsize+1;
-		} while (--n);
-		if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
-		    strip, stripsize) < 0)
-			break;
-	}
-	_TIFFfree(strip);
-}
-
-#undef RED
-#undef GREEN
-#undef BLUE
-#define	CVT(x)	(((x)*255)/100)
-#define	RED	CVT(28)		/* 28% */
-#define	GREEN	CVT(59)		/* 59% */
-#define	BLUE	CVT(11)		/* 11% */
-
-static void
-svGrey(TIFF* tif, u_long* ss, int xsize, int ysize)
-{
-	register int x, y;
-	u_char *buf = (u_char *)_TIFFmalloc(TIFFScanlineSize(tif));
-
-	for (y = 0; y <= ysize; y++) {
-		for (x = 0; x <= xsize; x++) {
-			u_char *cp = (u_char *)&ss[x];
-			buf[x] = (RED*cp[3] + GREEN*cp[2] + BLUE*cp[1]) >> 8;
-		}
-		if (TIFFWriteScanline(tif, buf, (uint32) y, 0) < 0)
-			break;
-		ss += xsize+1;
-	}
-	_TIFFfree(buf);
-}
-
-#define	MIN(a,b)	((a)<(b)?(a):(b))
-#define	ABS(x)		((x)<0?-(x):(x))
-
-static void
-tiffsv(char* name, int x1, int x2, int y1, int y2)
-{
-	TIFF *tif;
-	int xsize, ysize;
-	int xorg, yorg;
-	u_long *scrbuf;
-
-	xorg = MIN(x1,x2);
-	yorg = MIN(y1,y2);
-	if (xorg<0)
-		xorg = 0;
-	if (yorg<0)
-		yorg = 0;
-	xsize = ABS(x2-x1);
-	ysize = ABS(y2-y1);
-	if (xorg+xsize > xmaxscreen)
-		xsize = xmaxscreen-xorg;
-	if (yorg+ysize > ymaxscreen)
-		ysize = ymaxscreen-yorg;
-	tif = TIFFOpen(name, "w");
-	TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) (xsize+1));
-	TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) (ysize+1));
-	TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL,
-	    photometric == PHOTOMETRIC_RGB ? 3 : 1);
-	TIFFSetField(tif, TIFFTAG_PLANARCONFIG, config);
-	TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
-			photometric = PHOTOMETRIC_YCBCR;
-		TIFFSetField(tif, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-		if (predictor != 0)
-			TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric);
-	TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT);
-	rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip);
-	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-	scrbuf = (u_long *)_TIFFmalloc((xsize+1)*(ysize+1)*sizeof (u_long));
-	readdisplay(xorg, yorg, xorg+xsize, yorg+ysize, scrbuf, RD_FREEZE);
-	if (photometric == PHOTOMETRIC_RGB) {
-		if (config == PLANARCONFIG_SEPARATE)
-			svRGBSeparate(tif, scrbuf, xsize, ysize);
-		else
-			svRGBContig(tif, scrbuf, xsize, ysize);
-	} else
-		svGrey(tif, scrbuf, xsize, ysize);
-	(void) TIFFClose(tif);
-	_TIFFfree((char *)scrbuf);
-}
diff --git a/tkimg1.3/libtiff/tools/thumbnail.c b/tkimg1.3/libtiff/tools/thumbnail.c
deleted file mode 100644
index 365a491..0000000
--- a/tkimg1.3/libtiff/tools/thumbnail.c
+++ /dev/null
@@ -1,574 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/thumbnail.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1994-1997 Sam Leffler
- * Copyright (c) 1994-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcasecmp(a,b) == 0)
-
-#ifndef howmany
-#define	howmany(x, y)	(((x)+((y)-1))/(y))
-#endif
-
-typedef enum {
-    EXP50,
-    EXP60,
-    EXP70,
-    EXP80,
-    EXP90,
-    EXP,
-    LINEAR
-} Contrast;
-
-static	uint32 tnw = 216;		/* thumbnail width */
-static	uint32 tnh = 274;		/* thumbnail height */
-static	Contrast contrast = LINEAR;	/* current contrast */
-static	uint8* thumbnail;
-
-static	int cpIFD(TIFF*, TIFF*);
-static	int generateThumbnail(TIFF*, TIFF*);
-static	void initScale();
-static	void usage(void);
-
-extern	char* optarg;
-extern	int optind;
-
-int
-main(int argc, char* argv[])
-{
-    TIFF* in;
-    TIFF* out;
-    int c;
-
-    while ((c = getopt(argc, argv, "w:h:c:")) != -1) {
-	switch (c) {
-	case 'w':	tnw = strtoul(optarg, NULL, 0); break;
-	case 'h':	tnh = strtoul(optarg, NULL, 0); break;
-	case 'c':	contrast = streq(optarg, "exp50") ? EXP50 :
-				   streq(optarg, "exp60") ? EXP60 :
-				   streq(optarg, "exp70") ? EXP70 :
-				   streq(optarg, "exp80") ? EXP80 :
-				   streq(optarg, "exp90") ? EXP90 :
-				   streq(optarg, "exp")   ? EXP :
-				   streq(optarg, "linear")? LINEAR :
-							    EXP;
-			break;
-	default:	usage();
-	}
-    }
-    if (argc-optind != 2)
-	usage();
-    thumbnail = (uint8*) _TIFFmalloc(tnw * tnh);
-    out = TIFFOpen(argv[optind+1], "w");
-    if (out == NULL)
-	return (-2);
-    in = TIFFOpen(argv[optind], "r");
-    if (in != NULL) {
-	initScale();
-	do {
-	    if (!generateThumbnail(in, out))
-		goto bad;
-	    if (!cpIFD(in, out) || !TIFFWriteDirectory(out))
-		goto bad;
-	} while (TIFFReadDirectory(in));
-	(void) TIFFClose(in);
-    }
-    (void) TIFFClose(out);
-    return (0);
-bad:
-    (void) TIFFClose(out);
-    return (1);
-}
-
-#define	CopyField1(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField2(tag, v1, v2) \
-    if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-#define	CopyField4(tag, v1, v2, v3, v4) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) TIFFSetField(out, tag, v1, v2, v3, v4)
-
-static void
-cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type)
-{
-    uint16 shortv, shortv2, *shortav;
-    float floatv, *floatav;
-    char *stringv;
-    uint32 longv;
-
-    switch (type) {
-    case TIFF_SHORT:
-	if (count == 1) {
-	    CopyField1(tag, shortv);
-	} else if (count == 2) {
-	    CopyField2(tag, shortv, shortv2);
-	} else if (count == (uint16) -1) {
-	    CopyField2(tag, shortv, shortav);
-	}
-	break;
-    case TIFF_LONG:
-	CopyField1(tag, longv);
-	break;
-    case TIFF_RATIONAL:
-	if (count == 1) {
-	    CopyField1(tag, floatv);
-	} else if (count == (uint16) -1) {
-	    CopyField1(tag, floatav);
-	}
-	break;
-    case TIFF_ASCII:
-	CopyField1(tag, stringv);
-	break;
-    }
-}
-#undef CopyField4
-#undef CopyField3
-#undef CopyField2
-#undef CopyField1
-
-static struct cpTag {
-    uint16	tag;
-    uint16	count;
-    TIFFDataType type;
-} tags[] = {
-    { TIFFTAG_IMAGEWIDTH,		1, TIFF_LONG },
-    { TIFFTAG_IMAGELENGTH,		1, TIFF_LONG },
-    { TIFFTAG_BITSPERSAMPLE,		1, TIFF_SHORT },
-    { TIFFTAG_COMPRESSION,		1, TIFF_SHORT },
-    { TIFFTAG_FILLORDER,		1, TIFF_SHORT },
-    { TIFFTAG_SAMPLESPERPIXEL,		1, TIFF_SHORT },
-    { TIFFTAG_ROWSPERSTRIP,		1, TIFF_LONG },
-    { TIFFTAG_PLANARCONFIG,		1, TIFF_SHORT },
-    { TIFFTAG_GROUP3OPTIONS,		1, TIFF_LONG },
-    { TIFFTAG_SUBFILETYPE,		1, TIFF_LONG },
-    { TIFFTAG_PHOTOMETRIC,		1, TIFF_SHORT },
-    { TIFFTAG_THRESHHOLDING,		1, TIFF_SHORT },
-    { TIFFTAG_DOCUMENTNAME,		1, TIFF_ASCII },
-    { TIFFTAG_IMAGEDESCRIPTION,		1, TIFF_ASCII },
-    { TIFFTAG_MAKE,			1, TIFF_ASCII },
-    { TIFFTAG_MODEL,			1, TIFF_ASCII },
-    { TIFFTAG_ORIENTATION,		1, TIFF_SHORT },
-    { TIFFTAG_MINSAMPLEVALUE,		1, TIFF_SHORT },
-    { TIFFTAG_MAXSAMPLEVALUE,		1, TIFF_SHORT },
-    { TIFFTAG_XRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_PAGENAME,			1, TIFF_ASCII },
-    { TIFFTAG_XPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_GROUP4OPTIONS,		1, TIFF_LONG },
-    { TIFFTAG_RESOLUTIONUNIT,		1, TIFF_SHORT },
-    { TIFFTAG_PAGENUMBER,		2, TIFF_SHORT },
-    { TIFFTAG_SOFTWARE,			1, TIFF_ASCII },
-    { TIFFTAG_DATETIME,			1, TIFF_ASCII },
-    { TIFFTAG_ARTIST,			1, TIFF_ASCII },
-    { TIFFTAG_HOSTCOMPUTER,		1, TIFF_ASCII },
-    { TIFFTAG_WHITEPOINT,		1, TIFF_RATIONAL },
-    { TIFFTAG_PRIMARYCHROMATICITIES,	(uint16) -1,TIFF_RATIONAL },
-    { TIFFTAG_HALFTONEHINTS,		2, TIFF_SHORT },
-    { TIFFTAG_BADFAXLINES,		1, TIFF_LONG },
-    { TIFFTAG_CLEANFAXDATA,		1, TIFF_SHORT },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,	1, TIFF_LONG },
-    { TIFFTAG_INKSET,			1, TIFF_SHORT },
-    { TIFFTAG_INKNAMES,			1, TIFF_ASCII },
-    { TIFFTAG_DOTRANGE,			2, TIFF_SHORT },
-    { TIFFTAG_TARGETPRINTER,		1, TIFF_ASCII },
-    { TIFFTAG_SAMPLEFORMAT,		1, TIFF_SHORT },
-    { TIFFTAG_YCBCRCOEFFICIENTS,	(uint16) -1,TIFF_RATIONAL },
-    { TIFFTAG_YCBCRSUBSAMPLING,		2, TIFF_SHORT },
-    { TIFFTAG_YCBCRPOSITIONING,		1, TIFF_SHORT },
-    { TIFFTAG_REFERENCEBLACKWHITE,	(uint16) -1,TIFF_RATIONAL },
-    { TIFFTAG_EXTRASAMPLES,		(uint16) -1, TIFF_SHORT },
-};
-#define	NTAGS	(sizeof (tags) / sizeof (tags[0]))
-
-static void
-cpTags(TIFF* in, TIFF* out)
-{
-    struct cpTag *p;
-    for (p = tags; p < &tags[NTAGS]; p++)
-	cpTag(in, out, p->tag, p->count, p->type);
-}
-#undef NTAGS
-
-static int
-cpStrips(TIFF* in, TIFF* out)
-{
-    tsize_t bufsize  = TIFFStripSize(in);
-    unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
-
-    if (buf) {
-	tstrip_t s, ns = TIFFNumberOfStrips(in);
-	uint32 *bytecounts;
-
-	TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts);
-	for (s = 0; s < ns; s++) {
-	    if (bytecounts[s] > bufsize) {
-		buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[s]);
-		if (!buf)
-		    return (0);
-		bufsize = bytecounts[s];
-	    }
-	    if (TIFFReadRawStrip(in, s, buf, bytecounts[s]) < 0 ||
-		TIFFWriteRawStrip(out, s, buf, bytecounts[s]) < 0) {
-		_TIFFfree(buf);
-		return (0);
-	    }
-	}
-	_TIFFfree(buf);
-	return (1);
-    }
-    return (0);
-}
-
-static int
-cpTiles(TIFF* in, TIFF* out)
-{
-    tsize_t bufsize = TIFFTileSize(in);
-    unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
-
-    if (buf) {
-	ttile_t t, nt = TIFFNumberOfTiles(in);
-	uint32 *bytecounts;
-
-	TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts);
-	for (t = 0; t < nt; t++) {
-	    if (bytecounts[t] > bufsize) {
-		buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[t]);
-		if (!buf)
-		    return (0);
-		bufsize = bytecounts[t];
-	    }
-	    if (TIFFReadRawTile(in, t, buf, bytecounts[t]) < 0 ||
-		TIFFWriteRawTile(out, t, buf, bytecounts[t]) < 0) {
-		_TIFFfree(buf);
-		return (0);
-	    }
-	}
-	_TIFFfree(buf);
-	return (1);
-    }
-    return (0);
-}
-
-static int
-cpIFD(TIFF* in, TIFF* out)
-{
-    cpTags(in, out);
-    if (TIFFIsTiled(in)) {
-	if (!cpTiles(in, out))
-	    return (0);
-    } else {
-	if (!cpStrips(in, out))
-	    return (0);
-    }
-    return (1);
-}
-
-static	uint16	photometric;		/* current photometric of raster */
-static	uint16	filterWidth;		/* filter width in pixels */
-static	uint16	stepSrcWidth;		/* src image stepping width */
-static	uint16	stepDstWidth;		/* dest stepping width */
-static	uint8* src0;			/* horizontal bit stepping (start) */
-static	uint8* src1;			/* horizontal bit stepping (middle) */
-static	uint8* src2;			/* horizontal bit stepping (end) */
-static	uint16* rowoff;			/* row offset for stepping */
-static	uint8 cmap[256];		/* colormap indexes */
-static	uint8 bits[256];		/* count of bits set */
-
-static void
-setupBitsTables()
-{
-    int i;
-    for (i = 0; i < 256; i++) {
-	int n = 0;
-	if (i&0x01) n++;
-	if (i&0x02) n++;
-	if (i&0x04) n++;
-	if (i&0x08) n++;
-	if (i&0x10) n++;
-	if (i&0x20) n++;
-	if (i&0x40) n++;
-	if (i&0x80) n++;
-	bits[i] = n;
-    }
-}
-
-static int clamp(float v, int low, int high)
-    { return (v < low ? low : v > high ? high : (int)v); }
-
-#ifndef M_E
-#define M_E		2.7182818284590452354
-#endif
-
-static void
-expFill(float pct[], uint32 p, uint32 n)
-{
-    uint32 i;
-    uint32 c = (p * n) / 100;
-    for (i = 1; i < c; i++)
-	pct[i] = 1-exp(i/((double)(n-1)))/ M_E;
-    for (; i < n; i++)
-	pct[i] = 0.;
-}
-
-static void
-setupCmap()
-{
-    float pct[256];			/* known to be large enough */
-    uint32 i;
-    pct[0] = 1;				/* force white */
-    switch (contrast) {
-    case EXP50: expFill(pct, 50, 256); break;
-    case EXP60:	expFill(pct, 60, 256); break;
-    case EXP70:	expFill(pct, 70, 256); break;
-    case EXP80:	expFill(pct, 80, 256); break;
-    case EXP90:	expFill(pct, 90, 256); break;
-    case EXP:	expFill(pct, 100, 256); break;
-    case LINEAR:
-	for (i = 1; i < 256; i++)
-	    pct[i] = 1-((float)i)/(256-1);
-	break;
-    }
-    switch (photometric) {
-    case PHOTOMETRIC_MINISWHITE:
-	for (i = 0; i < 256; i++)
-	    cmap[i] = clamp(255*pct[(256-1)-i], 0, 255);
-	break;
-    case PHOTOMETRIC_MINISBLACK:
-	for (i = 0; i < 256; i++)
-	    cmap[i] = clamp(255*pct[i], 0, 255);
-	break;
-    }
-}
-
-static void
-initScale()
-{
-    src0 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
-    src1 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
-    src2 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
-    rowoff = (uint16*) _TIFFmalloc(sizeof (uint16) * tnw);
-    filterWidth = 0;
-    stepDstWidth = stepSrcWidth = 0;
-    setupBitsTables();
-}
-
-/*
- * Calculate the horizontal accumulation parameteres
- * according to the widths of the src and dst images.
- */
-static void
-setupStepTables(uint16 sw)
-{
-    if (stepSrcWidth != sw || stepDstWidth != tnw) {
-	int step = sw;
-	int limit = tnw;
-	int err = 0;
-	uint32 sx = 0;
-	uint32 x;
-	int fw;
-	uint8 b;
-	for (x = 0; x < tnw; x++) {
-	    uint32 sx0 = sx;
-	    err += step;
-	    while (err >= limit) {
-		err -= limit;
-		sx++;
-	    }
-	    rowoff[x] = sx0 >> 3;
-	    fw = sx - sx0;		/* width */
-	    b = (fw < 8) ? 0xff<<(8-fw) : 0xff;
-	    src0[x] = b >> (sx0&7);
-	    fw -= 8 - (sx0&7);
-	    if (fw < 0)
-		fw = 0;
-	    src1[x] = fw >> 3;
-	    fw -= (fw>>3)<<3;
-	    src2[x] = 0xff << (8-fw);
-	}
-	stepSrcWidth = sw;
-	stepDstWidth = tnw;
-    }
-}
-
-static void
-setrow(uint8* row, int nrows, const uint8* rows[])
-{
-    uint32 x;
-    uint32 area = nrows * filterWidth;
-    for (x = 0; x < tnw; x++) {
-	uint32 mask0 = src0[x];
-	uint32 fw = src1[x];
-	uint32 mask1 = src1[x];
-	uint32 off = rowoff[x];
-	uint32 acc = 0;
-	uint32 y, i;
-	for (y = 0; y < nrows; y++) {
-	    const uint8* src = rows[y] + off;
-	    acc += bits[*src++ & mask0];
-	    switch (fw) {
-	    default:
-		for (i = fw; i > 8; i--)
-		    acc += bits[*src++];
-		/* fall thru... */
-	    case 8: acc += bits[*src++];
-	    case 7: acc += bits[*src++];
-	    case 6: acc += bits[*src++];
-	    case 5: acc += bits[*src++];
-	    case 4: acc += bits[*src++];
-	    case 3: acc += bits[*src++];
-	    case 2: acc += bits[*src++];
-	    case 1: acc += bits[*src++];
-	    case 0: break;
-	    }
-	    acc += bits[*src & mask1];
-	}
-	*row++ = cmap[(255*acc)/area];
-    }
-}
-
-/*
- * Install the specified image.  The
- * image is resized to fit the display page using
- * a box filter.  The resultant pixels are mapped
- * with a user-selectable contrast curve.
- */
-static void
-setImage1(const uint8* br, uint32 rw, uint32 rh)
-{
-    int step = rh;
-    int limit = tnh;
-    int err = 0;
-    int bpr = howmany(rw,8);
-    uint32 sy = 0;
-    uint8* row = thumbnail;
-    uint32 dy;
-    for (dy = 0; dy < tnh; dy++) {
-	const uint8* rows[256];
-	int nrows = 1;
-	rows[0] = br + bpr*sy;
-	err += step;
-	while (err >= limit) {
-	    err -= limit;
-	    sy++;
-	    if (err >= limit)
-		rows[nrows++] = br + bpr*sy;
-	}
-	setrow(row, nrows, rows);
-	row += tnw;
-    }
-}
-
-static void
-setImage(const uint8* br, uint32 rw, uint32 rh)
-{
-    filterWidth = (uint16) ceil((double) rw / (double) tnw);
-    setupStepTables(rw);
-    setImage1(br, rw, rh);
-}
-
-static int
-generateThumbnail(TIFF* in, TIFF* out)
-{
-    unsigned char* raster;
-    unsigned char* rp;
-    uint32 sw, sh, rps;
-    uint16 bps, spp;
-    tsize_t rowsize, rastersize;
-    tstrip_t s, ns = TIFFNumberOfStrips(in);
-    uint32 diroff[1];
-
-    TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &sw);
-    TIFFGetField(in, TIFFTAG_IMAGELENGTH, &sh);
-    TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps);
-    TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp);
-    TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps);
-    if (spp != 1 || bps != 1)
-	return (0);
-    rowsize = TIFFScanlineSize(in);
-    rastersize = sh * rowsize;
-    raster = (unsigned char*)_TIFFmalloc(rastersize);
-    rp = raster;
-    for (s = 0; s < ns; s++) {
-	(void) TIFFReadEncodedStrip(in, s, rp, -1);
-	rp += rps * rowsize;
-    }
-    TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric);
-    setupCmap();
-    setImage(raster, sw, sh);
-    _TIFFfree(raster);
-
-    TIFFSetField(out, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE);
-    TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) tnw);
-    TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) tnh);
-    TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, (uint16) 8);
-    TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, (uint16) 1);
-    TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS);
-    TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
-    TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-    cpTag(in, out, TIFFTAG_SOFTWARE,		(uint16) -1, TIFF_ASCII);
-    cpTag(in, out, TIFFTAG_IMAGEDESCRIPTION,	(uint16) -1, TIFF_ASCII);
-    cpTag(in, out, TIFFTAG_DATETIME,		(uint16) -1, TIFF_ASCII);
-    cpTag(in, out, TIFFTAG_HOSTCOMPUTER,	(uint16) -1, TIFF_ASCII);
-    diroff[0] = 0;
-    TIFFSetField(out, TIFFTAG_SUBIFD, 1, diroff);
-    return (TIFFWriteEncodedStrip(out, 0, thumbnail, tnw*tnh) != -1 &&
-            TIFFWriteDirectory(out) != -1);
-}
-
-char* stuff[] = {
-"usage: thumbnail [options] input.tif output.tif",
-"where options are:",
-" -h #		specify thumbnail image height (default is 274)",
-" -w #		specify thumbnail image width (default is 216)",
-"",
-" -c linear	use linear contrast curve",
-" -c exp50	use 50% exponential contrast curve",
-" -c exp60	use 60% exponential contrast curve",
-" -c exp70	use 70% exponential contrast curve",
-" -c exp80	use 80% exponential contrast curve",
-" -c exp90	use 90% exponential contrast curve",
-" -c exp		use pure exponential contrast curve",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/tiff2bw.c b/tkimg1.3/libtiff/tools/tiff2bw.c
deleted file mode 100644
index ce59501..0000000
--- a/tkimg1.3/libtiff/tools/tiff2bw.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiff2bw.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp((a),(b)) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-/* x% weighting -> fraction of full color */
-#define	PCT(x)	(((x)*255+127)/100)
-int	RED = PCT(30);		/* 30% */
-int	GREEN = PCT(59);	/* 59% */
-int	BLUE = PCT(11);		/* 11% */
-
-static	void usage(void);
-static	int processCompressOptions(char*);
-
-static void
-compresscontig(unsigned char* out, unsigned char* rgb, uint32 n)
-{
-	register int v, red = RED, green = GREEN, blue = BLUE;
-
-	while (n-- > 0) {
-		v = red*(*rgb++);
-		v += green*(*rgb++);
-		v += blue*(*rgb++);
-		*out++ = v>>8;
-	}
-}
-
-static void
-compresssep(unsigned char* out,
-    unsigned char* r, unsigned char* g, unsigned char* b, uint32 n)
-{
-	register uint32 red = RED, green = GREEN, blue = BLUE;
-
-	while (n-- > 0)
-		*out++ = (red*(*r++) + green*(*g++) + blue*(*b++)) >> 8;
-}
-
-static int
-checkcmap(TIFF* tif, int n, uint16* r, uint16* g, uint16* b)
-{
-	while (n-- > 0)
-		if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-			return (16);
-	TIFFWarning(TIFFFileName(tif), "Assuming 8-bit colormap");
-	return (8);
-}
-
-static void
-compresspalette(unsigned char* out, unsigned char* data, uint32 n, uint16* rmap, uint16* gmap, uint16* bmap)
-{
-	register int v, red = RED, green = GREEN, blue = BLUE;
-
-	while (n-- > 0) {
-		unsigned int ix = *data++;
-		v = red*rmap[ix];
-		v += green*gmap[ix];
-		v += blue*bmap[ix];
-		*out++ = v>>8;
-	}
-}
-
-static	uint16 compression = (uint16) -1;
-static	uint16 predictor = 0;
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	int quality = 75;		/* JPEG quality */
-
-static	void cpTags(TIFF* in, TIFF* out);
-
-int
-main(int argc, char* argv[])
-{
-	uint32 rowsperstrip = (uint32) -1;
-	TIFF *in, *out;
-	uint32 w, h;
-	uint16 samplesperpixel;
-	uint16 bitspersample;
-	uint16 config;
-	uint16 photometric;
-	uint16* red;
-	uint16* green;
-	uint16* blue;
-	tsize_t rowsize;
-	register uint32 row;
-	register tsample_t s;
-	unsigned char *inbuf, *outbuf;
-	char thing[1024];
-	int c;
-	extern int optind;
-	extern char *optarg;
-
-	while ((c = getopt(argc, argv, "c:r:R:G:B:")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case 'R':
-			RED = PCT(atoi(optarg));
-			break;
-		case 'G':
-			GREEN = PCT(atoi(optarg));
-			break;
-		case 'B':
-			BLUE = PCT(atoi(optarg));
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind < 2)
-		usage();
-	in = TIFFOpen(argv[optind], "r");
-	if (in == NULL)
-		return (-1);
-	photometric = 0;
-	TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric);
-	if (photometric != PHOTOMETRIC_RGB && photometric != PHOTOMETRIC_PALETTE ) {
-		fprintf(stderr,
-	    "%s: Bad photometric; can only handle RGB and Palette images.\n",
-		    argv[optind]);
-		return (-1);
-	}
-	TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-	if (samplesperpixel != 1 && samplesperpixel != 3) {
-		fprintf(stderr, "%s: Bad samples/pixel %u.\n",
-		    argv[optind], samplesperpixel);
-		return (-1);
-	}
-	TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-	if (bitspersample != 8) {
-		fprintf(stderr,
-		    " %s: Sorry, only handle 8-bit samples.\n", argv[optind]);
-		return (-1);
-	}
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &w);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &h);
-	TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config);
-
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-1);
-	cpTags(in, out);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	if (compression != (uint16) -1) {
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-		switch (compression) {
-		case COMPRESSION_JPEG:
-			TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-			TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-			break;
-		case COMPRESSION_LZW:
-		case COMPRESSION_DEFLATE:
-			if (predictor != 0)
-				TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-			break;
-		}
-	}
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-	sprintf(thing, "B&W version of %s", argv[optind]);
-	TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
-	TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
-	outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    TIFFDefaultStripSize(out, rowsperstrip));
-
-#define	pack(a,b)	((a)<<8 | (b))
-	switch (pack(photometric, config)) {
-	case pack(PHOTOMETRIC_PALETTE, PLANARCONFIG_CONTIG):
-	case pack(PHOTOMETRIC_PALETTE, PLANARCONFIG_SEPARATE):
-		TIFFGetField(in, TIFFTAG_COLORMAP, &red, &green, &blue);
-		/*
-		 * Convert 16-bit colormap to 8-bit (unless it looks
-		 * like an old-style 8-bit colormap).
-		 */
-		if (checkcmap(in, 1<<bitspersample, red, green, blue) == 16) {
-			int i;
-#define	CVT(x)		(((x) * 255L) / ((1L<<16)-1))
-			for (i = (1<<bitspersample)-1; i >= 0; i--) {
-				red[i] = CVT(red[i]);
-				green[i] = CVT(green[i]);
-				blue[i] = CVT(blue[i]);
-			}
-#undef CVT
-		}
-		inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-		for (row = 0; row < h; row++) {
-			if (TIFFReadScanline(in, inbuf, row, 0) < 0)
-				break;
-			compresspalette(outbuf, inbuf, w, red, green, blue);
-			if (TIFFWriteScanline(out, outbuf, row, 0) < 0)
-				break;
-		}
-		break;
-	case pack(PHOTOMETRIC_RGB, PLANARCONFIG_CONTIG):
-		inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-		for (row = 0; row < h; row++) {
-			if (TIFFReadScanline(in, inbuf, row, 0) < 0)
-				break;
-			compresscontig(outbuf, inbuf, w);
-			if (TIFFWriteScanline(out, outbuf, row, 0) < 0)
-				break;
-		}
-		break;
-	case pack(PHOTOMETRIC_RGB, PLANARCONFIG_SEPARATE):
-		rowsize = TIFFScanlineSize(in);
-		inbuf = (unsigned char *)_TIFFmalloc(3*rowsize);
-		for (row = 0; row < h; row++) {
-			for (s = 0; s < 3; s++)
-				if (TIFFReadScanline(in,
-				    inbuf+s*rowsize, row, s) < 0)
-					 return (-1);
-			compresssep(outbuf,
-			    inbuf, inbuf+rowsize, inbuf+2*rowsize, w);
-			if (TIFFWriteScanline(out, outbuf, row, 0) < 0)
-				break;
-		}
-		break;
-	}
-#undef pack
-	TIFFClose(out);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		compression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-#define	CopyField1(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField2(tag, v1, v2) \
-    if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-#define	CopyField4(tag, v1, v2, v3, v4) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) TIFFSetField(out, tag, v1, v2, v3, v4)
-
-static void
-cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type)
-{
-    uint16 shortv, shortv2, *shortav;
-    float floatv, *floatav;
-    char *stringv;
-    uint32 longv;
-
-    switch (type) {
-    case TIFF_SHORT:
-	if (count == 1) {
-	    CopyField1(tag, shortv);
-	} else if (count == 2) {
-	    CopyField2(tag, shortv, shortv2);
-	} else if (count == (uint16) -1) {
-	    CopyField2(tag, shortv, shortav);
-	}
-	break;
-    case TIFF_LONG:
-	CopyField1(tag, longv);
-	break;
-    case TIFF_RATIONAL:
-	if (count == 1) {
-	    CopyField1(tag, floatv);
-	} else if (count == (uint16) -1) {
-	    CopyField1(tag, floatav);
-	}
-	break;
-    case TIFF_ASCII:
-	CopyField1(tag, stringv);
-	break;
-    }
-}
-#undef CopyField4
-#undef CopyField3
-#undef CopyField2
-#undef CopyField1
-
-static struct cpTag {
-    uint16	tag;
-    uint16	count;
-    TIFFDataType type;
-} tags[] = {
-    { TIFFTAG_IMAGEWIDTH,		1, TIFF_LONG },
-    { TIFFTAG_IMAGELENGTH,		1, TIFF_LONG },
-    { TIFFTAG_FILLORDER,		1, TIFF_SHORT },
-    { TIFFTAG_DOCUMENTNAME,		1, TIFF_ASCII },
-    { TIFFTAG_MAKE,			1, TIFF_ASCII },
-    { TIFFTAG_MODEL,			1, TIFF_ASCII },
-    { TIFFTAG_ORIENTATION,		1, TIFF_SHORT },
-    { TIFFTAG_XRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YRESOLUTION,		1, TIFF_RATIONAL },
-    { TIFFTAG_PAGENAME,			1, TIFF_ASCII },
-    { TIFFTAG_XPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_YPOSITION,		1, TIFF_RATIONAL },
-    { TIFFTAG_RESOLUTIONUNIT,		1, TIFF_SHORT },
-    { TIFFTAG_PAGENUMBER,		2, TIFF_SHORT },
-    { TIFFTAG_ARTIST,			1, TIFF_ASCII },
-    { TIFFTAG_HOSTCOMPUTER,		1, TIFF_ASCII },
-};
-#define	NTAGS	(sizeof (tags) / sizeof (tags[0]))
-
-static void
-cpTags(TIFF* in, TIFF* out)
-{
-    struct cpTag *p;
-    for (p = tags; p < &tags[NTAGS]; p++)
-	cpTag(in, out, p->tag, p->count, p->type);
-}
-#undef NTAGS
-
-char* stuff[] = {
-"usage: tiff2bw [options] input.tif output.tif",
-"where options are:",
-" -R %		use #% from red channel",
-" -G %		use #% from green channel",
-" -B %		use #% from blue channel",
-"",
-" -r #		make each strip have no more than # rows",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding",
-" -c g3[:opts]	compress output with CCITT Group 3 encoding",
-" -c g4		compress output with CCITT Group 4 encoding",
-" -c none	use no compression algorithm on output",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/tiff2pdf.c b/tkimg1.3/libtiff/tools/tiff2pdf.c
deleted file mode 100644
index b44b290..0000000
--- a/tkimg1.3/libtiff/tools/tiff2pdf.c
+++ /dev/null
@@ -1,5327 +0,0 @@
-/* $Id: tiff2pdf.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- * tiff2pdf - converts a TIFF image to a PDF document
- *
- * $Log: tiff2pdf.c,v $
- * Revision 1.1.1.1  2007/01/03 20:47:11  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:20  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.4  2003/12/01 10:51:39  rossf
- * Some bugs fixed.
- *
- * Revision 1.3  2003/11/29 15:32:40  rossf
- * Some bugs fixed.
- *
- *
- * "d" - Improved colorimetry support
- * "c" - Added support for orientation, planar configuration
- * "b" - Improved JPEG handling
- * "a" - Written/ported for libtiff
- *
- * Copyright (c) 2003 Ross Finlayson
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Ross Finlayson may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Ross Finlayson.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <time.h>
-#ifdef __STDC__
-#include <unistd.h> /* getopt, unlink */
-#else
-#ifndef _WIN32
-#include <getopt.h> /* getopt in getopt.h, unlink in stdio.h */
-#endif
-#endif
-#include "tiffiop.h"
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-#if defined(VMS)
-#define unlink remove
-#endif
-#if defined(_WIN32)
-#include <windows.h>
-#include <tchar.h>
-#define unlink DeleteFileA
-#endif
-
-#define TIFF2PDF_MODULE "tiff2pdf"
-#define T2P_VERSION "d"
-
-/* This type is of PDF color spaces. */
-typedef enum{
-	T2P_CS_BILEVEL=0x01, /* Bilevel, black and white */
-	T2P_CS_GRAY=0x02, /* Single channel */
-	T2P_CS_RGB=0x04, /* Three channel tristimulus RGB */
-#ifdef CMYK_SUPPORT
-	T2P_CS_CMYK=0x08, /* Four channel CMYK print inkset */
-#endif
-	T2P_CS_LAB=0x10, /* Three channel L*a*b* color space */
-	T2P_CS_PALETTE=0x1000 /* One of the above with a color map */
-#ifdef COLORIMETRY_SUPPORT
-	, T2P_CS_CALGRAY=0x20 /* Calibrated single channel */
-	, T2P_CS_CALRGB=0x40 /* Calibrated three channel tristimulus RGB */
-#endif
-#ifdef ICC_SUPPORT
-	, T2P_CS_ICCBASED=0x80 /* ICC profile color specification */
-#endif
-} t2p_cs_t;
-
-/* This type is of PDF compression types.  */
-typedef enum{
-	T2P_COMPRESS_NONE=0x00
-#ifdef CCITT_SUPPORT
-	, T2P_COMPRESS_G4=0x01
-#endif
-#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
-	, T2P_COMPRESS_JPEG=0x02
-#endif
-#ifdef ZIP_SUPPORT
-	, T2P_COMPRESS_ZIP=0x04
-#endif
-} t2p_compress_t;
-
-/* This type is whether TIFF image data can be used in PDF without transcoding. */
-typedef enum{
-	T2P_TRANSCODE_RAW=0x01, /* The raw data from the input can be used without recompressing */
-	T2P_TRANSCODE_ENCODE=0x02 /* The data from the input is perhaps unencoded and reencoded */
-} t2p_transcode_t;
-
-/* This type is of information about the data samples of the input image. */
-typedef enum{
-	T2P_SAMPLE_NOTHING=0x0000, /* The unencoded samples are normal for the output colorspace */
-	T2P_SAMPLE_ABGR_TO_RGB=0x0001, /* The unencoded samples are the result of ReadRGBAImage */
-	T2P_SAMPLE_RGBA_TO_RGB=0x0002, /* The unencoded samples are contiguous RGBA */
-	T2P_SAMPLE_RGBAA_TO_RGB=0x0004, /* The unencoded samples are RGBA with premultiplied alpha */
-	T2P_SAMPLE_YCBCR_TO_RGB=0x0008, 
-	T2P_SAMPLE_YCBCR_TO_LAB=0x0010, 
-	T2P_SAMPLE_REALIZE_PALETTE=0x0020, /* The unencoded samples are indexes into the color map */
-	T2P_SAMPLE_SIGNED_TO_UNSIGNED=0x0040, /* The unencoded samples are signed instead of unsignd */
-	T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED=0x0040, /* The L*a*b* samples have a* and b* signed */
-	T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG=0x0100 /* The unencoded samples are separate instead of contiguous */
-} t2p_sample_t;
-
-/* This type is of error status of the T2P struct. */
-typedef enum{
-	T2P_ERR_OK = 0, /* This is the value of t2p->t2p_error when there is no error */
-	T2P_ERR_ERROR = 1 /* This is the value of t2p->t2p_error when there was an error */
-} t2p_err_t;
-
-/* This struct defines a logical page of a TIFF. */
-typedef struct {
-	tdir_t page_directory;
-	uint32 page_number;
-	ttile_t page_tilecount;
-	uint32 page_extra;
-} T2P_PAGE;
-
-/* This struct defines a PDF rectangle's coordinates. */
-typedef struct {
-	float x1;
-	float y1;
-	float x2;
-	float y2;
-	float mat[9];
-} T2P_BOX;
-
-/* This struct defines a tile of a PDF.  */
-typedef struct {
-	T2P_BOX tile_box;
-} T2P_TILE;
-
-/* This struct defines information about the tiles on a PDF page. */
-typedef struct {
-	ttile_t tiles_tilecount;
-	uint32 tiles_tilewidth;
-	uint32 tiles_tilelength;
-	uint32 tiles_tilecountx;
-	uint32 tiles_tilecounty;
-	uint32 tiles_edgetilewidth;
-	uint32 tiles_edgetilelength;
-	T2P_TILE* tiles_tiles;
-} T2P_TILES;
-
-/* This struct is the context of a function to generate PDF from a TIFF. */
-typedef struct {
-	t2p_err_t t2p_error;
-	T2P_PAGE* tiff_pages;
-	T2P_TILES* tiff_tiles;
-	tdir_t tiff_pagecount;
-	uint16 tiff_compression;
-	uint16 tiff_photometric;
-	uint16 tiff_fillorder;
-	uint16 tiff_bitspersample;
-	uint16 tiff_samplesperpixel;
-	uint16 tiff_planar;
-	uint32 tiff_width;
-	uint32 tiff_length;
-	float tiff_xres;
-	float tiff_yres;
-	uint16 tiff_orientation;
-	toff_t tiff_dataoffset;
-	tsize_t tiff_datasize;
-	TIFFReadWriteProc tiff_readproc;
-	TIFFReadWriteProc tiff_writeproc;
-	TIFFSeekProc tiff_seekproc;
-	uint16 tiff_resunit;
-	uint16 pdf_centimeters;
-	uint16 pdf_overrideres;
-	uint16 pdf_overridepagesize;
-	float pdf_defaultxres;
-	float pdf_defaultyres;
-	float pdf_xres;
-	float pdf_yres;
-	float pdf_defaultpagewidth;
-	float pdf_defaultpagelength;
-	float pdf_pagewidth;
-	float pdf_pagelength;
-	float pdf_imagewidth;
-	float pdf_imagelength;
-	T2P_BOX pdf_mediabox;
-	T2P_BOX pdf_imagebox;
-	uint16 pdf_majorversion;
-	uint16 pdf_minorversion;
-	uint32 pdf_catalog;
-	uint32 pdf_pages;
-	uint32 pdf_info;
-	uint32 pdf_palettecs;
-	uint16 pdf_fitwindow;
-	uint32 pdf_startxref;
-	char* pdf_fileid;
-	char* pdf_datetime;
-	char* pdf_creator;
-	char* pdf_author;
-	char* pdf_title;
-	char* pdf_subject;
-	char* pdf_keywords;
-	t2p_cs_t pdf_colorspace;
-	uint16 pdf_colorspace_invert;
-	uint16 pdf_switchdecode;
-	uint16 pdf_palettesize;
-	unsigned char* pdf_palette;
-	int pdf_labrange[4];
-	t2p_compress_t pdf_defaultcompression;
-	uint16 pdf_defaultcompressionquality;
-	t2p_compress_t pdf_compression;
-	uint16 pdf_compressionquality;
-	uint16 pdf_nopassthrough;
-	t2p_transcode_t pdf_transcode;
-	t2p_sample_t pdf_sample;
-	uint32* pdf_xrefoffsets;
-	uint32 pdf_xrefcount;
-	tdir_t pdf_page;
-#ifdef OJPEG_SUPPORT
-	tdata_t pdf_ojpegdata;
-	uint32 pdf_ojpegdatalength;
-	uint32 pdf_ojpegiflength;
-#endif
-#ifdef COLORIMETRY_SUPPORT
-	float tiff_whitechromaticities[2];
-	float tiff_primarychromaticities[6];
-	float tiff_referenceblackwhite[2];
-	float* tiff_transferfunction[3];
-	uint16 tiff_transferfunctioncount;
-#endif
-#ifdef ICC_SUPPORT
-	uint32 pdf_icccs;
-	uint32 tiff_iccprofilelength;
-	tdata_t tiff_iccprofile;
-#endif
-} T2P;
-
-/* These functions are called by main. */
-
-void tiff2pdf_usage(void);
-int tiff2pdf_match_paper_size(float*, float*, char*);
-
-/* These functions are used to generate a PDF from a TIFF. */ 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-T2P* t2p_init(void);
-void t2p_validate(T2P*);
-tsize_t t2p_write_pdf(T2P*, TIFF*, TIFF*);
-void t2p_free(T2P*);
-
-#ifdef __cplusplus
-}
-#endif
-
-tsize_t t2p_empty_readproc(thandle_t, tdata_t, tsize_t);
-tsize_t t2p_empty_writeproc(thandle_t, tdata_t, tsize_t);
-toff_t t2p_empty_seekproc(thandle_t, toff_t, int);
-int t2p_empty_closeproc(thandle_t);
-void t2p_read_tiff_init(T2P*, TIFF*);
-int t2p_cmp_t2p_page(const void*, const void*);
-void t2p_read_tiff_data(T2P*, TIFF*);
-void t2p_read_tiff_size(T2P*, TIFF*);
-void t2p_read_tiff_size_tile(T2P*, TIFF*, ttile_t);
-int t2p_tile_is_right_edge(T2P_TILES, ttile_t);
-int t2p_tile_is_bottom_edge(T2P_TILES, ttile_t);
-int t2p_tile_is_edge(T2P_TILES, ttile_t);
-int t2p_tile_is_corner_edge(T2P_TILES, ttile_t);
-tsize_t t2p_readwrite_pdf_image(T2P*, TIFF*, TIFF*);
-tsize_t t2p_readwrite_pdf_image_tile(T2P*, TIFF*, TIFF*, ttile_t);
-#ifdef OJPEG_SUPPORT
-int t2p_process_ojpeg_tables(T2P*, TIFF*);
-#endif
-#ifdef JPEG_SUPPORT
-int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t*, tstrip_t, uint32);
-#endif
-void t2p_tile_collapse_left(tdata_t, tsize_t, uint32, uint32, uint32);
-void t2p_write_advance_directory(T2P*, TIFF*);
-tsize_t t2p_sample_planar_separate_to_contig(T2P*, unsigned char*, unsigned char*, tsize_t);
-tsize_t t2p_sample_realize_palette(T2P*, unsigned char*);
-tsize_t t2p_sample_abgr_to_rgb(tdata_t, uint32);
-tsize_t t2p_sample_rgba_to_rgb(tdata_t, uint32);
-tsize_t t2p_sample_rgbaa_to_rgb(tdata_t, uint32);
-tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t, uint32);
-tsize_t t2p_write_pdf_header(T2P*, TIFF*);
-tsize_t t2p_write_pdf_obj_start(uint32, TIFF*);
-tsize_t t2p_write_pdf_obj_end(TIFF*);
-tsize_t t2p_write_pdf_name(char*, TIFF*);
-tsize_t t2p_write_pdf_string(char*, TIFF*);
-tsize_t t2p_write_pdf_stream(tdata_t, tsize_t, TIFF*);
-tsize_t t2p_write_pdf_stream_start(TIFF*);
-tsize_t t2p_write_pdf_stream_end(TIFF*);
-tsize_t t2p_write_pdf_stream_dict(tsize_t, uint32, TIFF*);
-tsize_t t2p_write_pdf_stream_dict_start(TIFF*);
-tsize_t t2p_write_pdf_stream_dict_end(TIFF*);
-tsize_t t2p_write_pdf_stream_length(tsize_t, TIFF*);
-tsize_t t2p_write_pdf_catalog(T2P*, TIFF*);
-tsize_t t2p_write_pdf_info(T2P*, TIFF*, TIFF*);
-void t2p_pdf_currenttime(T2P*);
-void t2p_pdf_tifftime(T2P*, TIFF*);
-tsize_t t2p_write_pdf_pages(T2P*, TIFF*);
-tsize_t t2p_write_pdf_page(uint32, T2P*, TIFF*);
-void t2p_compose_pdf_page(T2P*);
-void t2p_compose_pdf_page_orient(T2P_BOX*, uint16);
-void t2p_compose_pdf_page_orient_flip(T2P_BOX*, uint16);
-tsize_t t2p_write_pdf_page_content(T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t, T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_cs(T2P*, TIFF*);
-#ifdef COLORIMETRY_SUPPORT
-tsize_t t2p_write_pdf_transfer(T2P*, TIFF*);
-tsize_t t2p_write_pdf_transfer_dict(T2P*, TIFF*, uint16);
-tsize_t t2p_write_pdf_transfer_stream(T2P*, TIFF*, uint16);
-tsize_t t2p_write_pdf_xobject_calcs(T2P*, TIFF*);
-#endif
-#ifdef ICC_SUPPORT
-tsize_t t2p_write_pdf_xobject_icccs(T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_icccs_dict(T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_icccs_stream(T2P*, TIFF*);
-#endif
-tsize_t t2p_write_pdf_xobject_cs_stream(T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_decode(T2P*, TIFF*);
-tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t, T2P*, TIFF*);
-tsize_t t2p_write_pdf_xreftable(T2P*, TIFF*);
-tsize_t t2p_write_pdf_trailer(T2P*, TIFF*);
-
-/*
-
-  This is the main function.
-
-  The program converts one TIFF file to one PDF file, including multiple page 
-  TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF 
-  files that contain data of TIFF photometric interpretations of bilevel, 
-  grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by 
-  libtiff and PDF.
-
-  If you have multiple TIFF files to convert into one PDF file then use tiffcp 
-  or other program to concatenate the files into a multiple page TIFF file.  
-  If the input TIFF file is of huge dimensions (greater than 10000 pixels height
-  or width) convert the input image to a tiled TIFF if it is not already.
-
-  The standard output is standard output.  Set the output file name with the 
-  "-o output.pdf" option.
-
-  All black and white files are compressed into a single strip CCITT G4 Fax 
-  compressed PDF, unless tiled, where tiled black and white images are 
-  compressed into tiled CCITT G4 Fax compressed PDF, libtiff CCITT support 
-  is assumed.
-
-  Color and grayscale data can be compressed using either JPEG compression, 
-  ITU-T T.81, or Zip/Deflate LZ77 compression, per PNG 1.2 and RFC 1951.  Set 
-  the compression type using the -j or -z options.  JPEG compression support 
-  requires that libtiff be configured with JPEG support, and Zip/Deflate 
-  compression support requires that libtiff is configured with Zip support, 
-  in tiffconf.h.  Use only one or the other of -j and -z.  The -q option 
-  sets the image compression quality, that is 1-100 with libjpeg JPEG 
-  compression and one of 1, 10, 11, 12, 13, 14, or 15 for PNG group compression 
-  predictor methods, add 100, 200, ..., 900 to set zlib compression quality 1-9.
-  PNG Group differencing predictor methods are not currently implemented.
-
-  If the input TIFF contains single strip CCITT G4 Fax compressed information, 
-  then that is written to the PDF file without transcoding, unless the options 
-  of no compression and no passthrough are set, -d and -n.
-
-  If the input TIFF contains JPEG or single strip Zip/Deflate compressed 
-  information, and they are configured, then that is written to the PDF file 
-  without transcoding, unless the options of no compression and no passthrough 
-  are set.
-
-  The default page size upon which the TIFF image is placed is determined by 
-  the resolution and extent of the image data.  Default values for the TIFF 
-  image resolution can be set using the -x and -y options.  The page size can 
-  be set using the -p option for paper size, or -w and -l for paper width and 
-  length, then each page of the TIFF image is centered on its page.  The 
-  distance unit for default resolution and page width and length can be set 
-  by the -u option, the default unit is inch.
-
-  Various items of the output document information can be set with the -e, -c, 
-  -a, -t, -s, and -k tags.  Setting the argument of the option to "" for these 
-  tags causes the relevant document information field to be not written.  Some 
-  of the document information values otherwise get their information from the 
-  input TIFF image, the software, author, document name, and image description.
-
-  The output PDF file conforms to the PDF 1.1 specification or PDF 1.2 if using 
-  Zip/Deflate compression.  
-  
-  The Portable Document Format (PDF) specification is copyrighted by Adobe 
-  Systems, Incorporated.  Todos derechos reservados.
-
-  Here is a listing of the usage example and the options to the tiff2pdf 
-  program that is part of the libtiff distribution.  Options followed by 
-  a colon have a required argument.
-  
-    usage:  tiff2pdf [options] input.tif
-
-    options:
-    -o: output to file name
-
-    -j  compress with JPEG (requires libjpeg configured with libtiff)
-    -z  compress with Zip/Deflate (requires zlib configured with libtiff)
-    -q: compression quality
-    -n  no compressed data passthrough
-    -d  do not compress (decompress)
-
-	-i  invert colors
-	
-    -u: set distance unit, 'i' for inch, 'm' for centimeter
-    -x: set x resolution default
-    -y: set y resolution default
-    -w: width in units
-    -l: length in units
-    -r: 'd' for resolution default, 'o' for resolution override
-    -p: paper size, eg "letter", "legal", "A4"
-    -f  set PDF "Fit Window" user preference
-
-    -e: date, overrides image or current date/time default, YYYYMMDDHHMMSS
-    -c: creator, overrides image software default
-    -a: author, overrides image artist default
-    -t: title, overrides image document name default
-    -s: subject, overrides image image description default
-    -k: keywords
-
-    -h  usage
-
-    examples:
-
-        tiff2pdf -o output.pdf input.tiff
-
-    The above example would generate the file output.pdf from input.tiff.
-
-        tiff2pdf input.tiff
-
-    The above example would generate PDF output from input.tiff and write it 
-    to standard output.
-
-        tiff2pdf -j -p letter -o output.pdf input.tiff
-
-    The above example would generate the file output.pdf from input.tiff, 
-    putting the image pages on a letter sized page, compressing the output 
-    with JPEG.
-
-	Please report bugs through:
-	 
-	http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff
-
-    See also libtiff.3t, tiffcp.
-  */
-
-int main(int argc, char** argv){
-
-	extern int optind;
-	extern char* optarg;
-	T2P* t2p = NULL;
-	TIFF* input = NULL;
-	TIFF* output = NULL;
-	tsize_t written=0;
-	int c=0;
-	
-	t2p = t2p_init();
-
-	if (t2p == NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't initialize context");
-		goto failexit;
-	}
-
-	while ((c = getopt(argc, argv, "o:q:u:x:y:w:l:r:p:e:c:a:t:s:k:jzndifh")) != -1){
-		switch (c) {
-			case 'o': 
-				output=TIFFOpen(optarg, "w");
-				if(output==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't open output file %s for writing", 
-						optarg);
-					goto failfreet2p;
-				}
-				if(output->tif_seekproc != NULL){
-					TIFFSeekFile(output, (toff_t) 0, SEEK_SET);
-				}
-				break;
-#ifdef JPEG_SUPPORT
-			case 'j':  
-				t2p->pdf_defaultcompression=T2P_COMPRESS_JPEG;
-				break;
-#endif
-#ifndef JPEG_SUPPORT
-			case 'j':  
-				TIFFWarning(
-					TIFF2PDF_MODULE, 
-					"JPEG support in libtiff required for JPEG compression, ignoring option");
-				break;
-#endif
-#ifdef ZIP_SUPPORT
-			case 'z':  
-				t2p->pdf_defaultcompression=T2P_COMPRESS_ZIP;
-				break;
-#endif
-#ifndef ZIP_SUPPORT
-			case 'z':  
-				TIFFWarning(
-					TIFF2PDF_MODULE, 
-					"Zip support in libtiff required for Zip compression, ignoring option");
-				break;
-#endif
-			case 'q': 
-				t2p->pdf_defaultcompressionquality=atoi(optarg);
-				break;
-			case 'n': 
-				t2p->pdf_nopassthrough=1;
-				break;
-			case 'd': 
-				t2p->pdf_defaultcompression=T2P_COMPRESS_NONE;
-				break;
-			case 'u': 
-				if(optarg[0]=='m'){
-					t2p->pdf_centimeters=1;
-				}
-				break;
-			case 'x': 
-				t2p->pdf_defaultxres = 
-					atof(optarg) / (t2p->pdf_centimeters?2.54:1.0);
-				break;
-			case 'y': 
-				t2p->pdf_defaultyres = 
-					atof(optarg) / (t2p->pdf_centimeters?2.54:1.0);
-				break;
-			case 'w': 
-				t2p->pdf_overridepagesize=1;
-				t2p->pdf_defaultpagewidth = 
-					(atof(optarg) * 72) / (t2p->pdf_centimeters?2.54:1.0);
-				break;
-			case 'l': 
-				t2p->pdf_overridepagesize=1;
-				t2p->pdf_defaultpagelength = 
-					(atof(optarg) * 72) / (t2p->pdf_centimeters?2.54:1.0);
-				break;
-			case 'r': 
-				if(optarg[0]=='o'){
-					t2p->pdf_overrideres=1;
-				}
-				break;
-			case 'p': 
-				if(tiff2pdf_match_paper_size(
-					&(t2p->pdf_defaultpagewidth), 
-					&(t2p->pdf_defaultpagelength), 
-					optarg)){
-					t2p->pdf_overridepagesize=1;
-				} else {
-					TIFFWarning(
-						TIFF2PDF_MODULE, 
-						"Unknown paper size %s, ignoring option",
-						optarg);
-				}
-				break;
-			case 'i':
-				t2p->pdf_colorspace_invert=1;
-			case 'f': 
-				t2p->pdf_fitwindow=1;
-				break;
-			case 'e':
-				t2p->pdf_datetime= (char*)_TIFFmalloc(17);
-				if(t2p->pdf_datetime==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						17); 
-					goto failcloseoutput;
-				}
-				if(strlen(optarg)==0){
-					t2p->pdf_datetime[0]=0;
-				} else {
-					if(strlen(optarg)>14){optarg[14]=0;}
-					t2p->pdf_datetime[0]='D';
-					t2p->pdf_datetime[1]=':';
-					strcpy(&(t2p->pdf_datetime[2]), optarg);
-				}
-				break;
-			case 'c': 
-				t2p->pdf_creator= (char*)_TIFFmalloc(strlen(optarg)+1);
-				if(t2p->pdf_creator==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						strlen(optarg)+1); 
-					goto failcloseoutput;
-				}
-				strcpy(t2p->pdf_creator, optarg);
-				t2p->pdf_creator[strlen(optarg)]=0;
-				break;
-			case 'a': 
-				t2p->pdf_author= (char*)_TIFFmalloc(strlen(optarg)+1);
-				if(t2p->pdf_author==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						strlen(optarg)+1); 
-					goto failcloseoutput;
-				}
-				strcpy(t2p->pdf_author, optarg);
-				t2p->pdf_author[strlen(optarg)]=0;
-				break;
-			case 't': 
-				t2p->pdf_title= (char*)_TIFFmalloc(strlen(optarg)+1);
-				if(t2p->pdf_title==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						strlen(optarg)+1); 
-					goto failcloseoutput;
-				}
-				strcpy(t2p->pdf_title, optarg);
-				t2p->pdf_title[strlen(optarg)]=0;
-				break;
-			case 's': 
-				t2p->pdf_subject= (char*)_TIFFmalloc(strlen(optarg)+1);
-				if(t2p->pdf_subject==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						strlen(optarg)+1); 
-					goto failcloseoutput;
-				}
-				strcpy(t2p->pdf_subject, optarg);
-				t2p->pdf_subject[strlen(optarg)]=0;
-				break;
-			case 'k': 
-				t2p->pdf_keywords= (char*)_TIFFmalloc(strlen(optarg)+1);
-				if(t2p->pdf_keywords==NULL){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for main", 
-						strlen(optarg)+1); 
-					goto failcloseoutput;
-				}
-				strcpy(t2p->pdf_keywords, optarg);
-				t2p->pdf_keywords[strlen(optarg)]=0;
-				break;
-			case 'h': 
-			case '?': 
-				tiff2pdf_usage();
-				goto failcloseoutput;
-				break;
-		}
-	}
-
-	t2p_validate(t2p);
-
-	if(argc>optind){
-		input = TIFFOpen(argv[optind++], "r");
-		if(input==NULL){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"Can't open input file %s for reading", 
-				argv[optind-1]);
-			goto failcloseoutput;
-		}
-	} else {
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No input file specified"); 
-		tiff2pdf_usage();
-		goto failcloseoutput;
-	}
-
-	if(argc>optind){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No support for multiple input files"); 
-		tiff2pdf_usage();
-		goto failcloseinput;
-	}
-
-	if(output==NULL){
-#ifndef _WIN32
-		output = TIFFFdOpen( (int)fileno(tmpfile()), "-", "w");
-#endif
-#ifdef _WIN32
-		{
-			TCHAR temppath[MAX_PATH];
-			TCHAR tempfile[MAX_PATH];
-			GetTempPath((DWORD)MAX_PATH, (LPTSTR)temppath);
-			GetTempFileName((LPCTSTR)temppath, (LPTSTR) __T("t2p"), 0, (LPTSTR)tempfile);
-			output = TIFFFdOpen( (int)CreateFile(
-				(LPCTSTR)tempfile, 
-				GENERIC_WRITE, 
-				0, 
-				NULL, 
-				CREATE_ALWAYS, 
-				FILE_FLAG_DELETE_ON_CLOSE,  
-				NULL), 
-				"-", "w");
-		}
-#endif
-		if(output==NULL){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"Can't open temporary output file for writing to stdout", 
-				argv[optind-1]);
-			goto failcloseinput;
-		}
-		TIFFFlush(output);
-		output->tif_readproc=t2p_empty_readproc;
-		output->tif_seekproc=t2p_empty_seekproc;
-		output->tif_closeproc=t2p_empty_closeproc;
-#ifndef _WIN32		
-		close(output->tif_fd);
-		output->tif_fd=(int)fileno(stdout);
-#endif
-#ifdef _WIN32
-		CloseHandle((HANDLE) output->tif_fd);
-		output->tif_fd=(int)GetStdHandle(STD_OUTPUT_HANDLE);
-#endif
-		output->tif_clientdata=(thandle_t)output->tif_fd;
-	}
-
-	written = t2p_write_pdf(t2p, input, output);
-
-	if(t2p->t2p_error != 0){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"An error occurred in converting TIFF %s to PDF %s", 
-			TIFFFileName(input), 
-			TIFFFileName(output)
-			);
-		goto failcloseinput;
-	}
-
-	if(input != NULL){
-		TIFFClose(input);
-	}
-	if(output != NULL){
-		TIFFClose(output);
-	}
-	if(t2p != NULL){
-		t2p_free(t2p);
-	}
-
-	return(EXIT_SUCCESS);
-
-	failcloseinput:
-	if(input != NULL){
-		TIFFClose(input);
-	}
-	failcloseoutput:
-	if(output != NULL){
-		if(strcmp(TIFFFileName(output), "-") != 0){
-			unlink(TIFFFileName(output));
-		}
-		TIFFClose(output);
-	}
-	failfreet2p:
-	if(t2p != NULL){
-		t2p_free(t2p);
-	}
-	failexit:
-	return(EXIT_FAILURE);
-}
-
-void tiff2pdf_usage(){
-	char* lines[]={
-	"usage:  tiff2pdf [options] input.tiff",
-	"options:",
-	" -o: output to file name",
-#ifdef JPEG_SUPPORT
-	" -j  compress with JPEG", 
-#endif
-#ifdef ZIP_SUPPORT
-	" -z  compress with Zip/Deflate",
-#endif
-	" -q: compression quality",
-	" -n  no compressed data passthrough",
-	" -d  do not compress (decompress)",
-	" -u: set distance unit, 'i' for inch, 'm' for centimeter",
-	" -x: set x resolution default in dots per unit",
-	" -y: set y resolution default in dots per unit",
-	" -w: width in units",
-	" -l: length in units",
-	" -r: 'd' for resolution default, 'o' for resolution override",
-	" -p: paper size, eg \"letter\", \"legal\", \"A4\"",
-	" -f  set PDF \"Fit Window\" user preference",
-	" -e: date, overrides image or current date/time default, YYYYMMDDHHMMSS",
-	" -c: sets document creator, overrides image software default",
-	" -a: sets document author, overrides image artist default",
-	" -t: sets document title, overrides image document name default",
-	" -s: sets document subject, overrides image image description default",
-	" -k: sets document keywords",
-	" -h  usage",
-	NULL
-	};
-	int i=0;
-
-	fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i=0;lines[i]!=NULL;i++){
-		fprintf(stderr, "%s\n", lines[i]);
-	}
-
-	return;
-}
-
-int tiff2pdf_match_paper_size(float* width, float* length, char* papersize){
-
-	int i=0;
-	int len=0;
-	const char* sizes[]={
-		"LETTER", "A4", "LEGAL",
-		"EXECUTIVE", "LETTER", "LEGAL", "LEDGER", "TABLOID", 
-		"A", "B", "C", "D", "E", "F", "G", "H", "J", "K", 
-		"A10", "A9", "A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", 
-		"2A0", "4A0", "2A", "4A", 
-		"B10", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "B2", "B1", "B0", 
-		"JISB10", "JISB9", "JISB8", "JISB7", "JISB6", "JISB5", "JISB4", 
-		"JISB3", "JISB2", "JISB1", "JISB0", 
-		"C10", "C9", "C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", 
-		"RA2", "RA1", "RA0", "SRA4", "SRA3", "SRA2", "SRA1", "SRA0", 
-		"A3EXTRA", "A4EXTRA", 
-		"STATEMENT", "FOLIO", "QUARTO", 
-		NULL
-	} ;
-	const int widths[]={
-		612, 595, 612,
-		522, 612,612,792,792,
-		612,792,1224,1584,2448,2016,792,2016,2448,2880,
-		74,105,147,210,298,420,595,842,1191,1684,2384,3370,4768,3370,4768,
-		88,125,176,249,354,499,709,1001,1417,2004,2835,
-		91,128,181,258,363,516,729,1032,1460,2064,2920,
-		79,113,162,230,323,459,649,918,1298,1298,2599,
-		1219,1729,2438,638,907,1276,1814,2551,
-		914,667,
-		396, 612, 609, 
-		0
-	};
-	const int lengths[]={
-		792,842,1008,
-		756,792,1008,1224,1224,
-		792,1224,1584,2448,3168,2880,6480,10296,12672,10296,
-		105,147,210,298,420,595,842,1191,1684,2384,3370,4768,6741,4768,6741,
-		125,176,249,354,499,709,1001,1417,2004,2835,4008,
-		128,181,258,363,516,729,1032,1460,2064,2920,4127,
-		113,162,230,323,459,649,918,1298,1837,1837,3677,
-		1729,2438,3458,907,1276,1814,2551,3628,
-		1262,914,
-		612, 936, 780, 
-		0
-	};
-
-	len=strlen(papersize);
-	for(i=0;i<len;i++){
-		papersize[i]=toupper(papersize[i]);
-	}
-	for(i=0;sizes[i]!=NULL; i++){
-		if (strcmp( (const char*)papersize, sizes[i])==0){
-			*width=(float)widths[i];
-			*length=(float)lengths[i];
-			return(1);
-		}
-	}
-
-	return(0);
-}
-
-/*
-	This function allocates and initializes a T2P context struct pointer.
-*/
-
-T2P* t2p_init(){
-
-	T2P* t2p = (T2P*) _TIFFmalloc(sizeof(T2P));
-	_TIFFmemset(t2p, 0x00, sizeof(T2P));
-	if(t2p==NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_init", 
-			sizeof(T2P));
-		return( (T2P*) NULL );
-	}
-	t2p->pdf_majorversion=1;
-	t2p->pdf_minorversion=1;
-	t2p->pdf_defaultxres=300.0;
-	t2p->pdf_defaultyres=300.0;
-	t2p->pdf_defaultpagewidth=612.0;
-	t2p->pdf_defaultpagelength=792.0;
-	t2p->pdf_xrefcount=3; /* Catalog, Info, Pages */
-	
-	return(t2p);
-}
-
-/*
-	This function frees a T2P context struct pointer and any allocated data fields of it.
-*/
-
-void t2p_free(T2P* t2p){
-
-	int i=0;
-
-	if(t2p != NULL){
-		if(t2p->pdf_xrefoffsets != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_xrefoffsets);
-		}
-		if(t2p->tiff_pages != NULL){
-			_TIFFfree( (tdata_t) t2p->tiff_pages);
-		}
-		for(i=0;i<t2p->tiff_pagecount;i++){
-			if(t2p->tiff_tiles[i].tiles_tiles != NULL){
-				_TIFFfree( (tdata_t) t2p->tiff_tiles[i].tiles_tiles);
-			}
-		}
-		if(t2p->tiff_tiles != NULL){
-			_TIFFfree( (tdata_t) t2p->tiff_tiles);
-		}
-		if(t2p->pdf_palette != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_palette);
-		}
-		if(t2p->pdf_fileid != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_fileid);
-		}
-		if(t2p->pdf_datetime != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_datetime);
-		}
-		if(t2p->pdf_creator != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_creator);
-		}
-		if(t2p->pdf_author != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_author);
-		}
-		if(t2p->pdf_title != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_title);
-		}
-		if(t2p->pdf_subject != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_subject);
-		}
-		if(t2p->pdf_keywords != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_keywords);
-		}
-#ifdef OJPEG_SUPPORT
-		if(t2p->pdf_ojpegdata != NULL){
-			_TIFFfree( (tdata_t) t2p->pdf_ojpegdata);
-		}
-#endif
-		_TIFFfree( (tdata_t) t2p );
-	}
-
-	return;
-}
-
-/*
-	This function validates the values of a T2P context struct pointer before calling 
-	t2p_write_pdf with it.
-*/
-
-void t2p_validate(T2P* t2p){
-
-#ifdef JPEG_SUPPORT
-	if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){
-		if(t2p->pdf_defaultcompressionquality<100 ||
-			t2p->pdf_defaultcompressionquality<1){
-			t2p->pdf_defaultcompressionquality=0;
-		}
-	}
-#endif
-#ifdef ZIP_SUPPORT
-	if(t2p->pdf_defaultcompression==T2P_COMPRESS_ZIP){
-		switch (t2p->pdf_defaultcompressionquality){
-			case 1: case 10: case 11: case 12: case 13: case 14: case 15:
-			case 101: case 110: case 111: case 112: case 113: case 114: case 115:
-			case 201: case 210: case 211: case 212: case 213: case 214: case 215:
-			case 301: case 310: case 311: case 312: case 313: case 314: case 315:
-			case 401: case 410: case 411: case 412: case 413: case 414: case 415:
-			case 501: case 510: case 511: case 512: case 513: case 514: case 515:
-			case 601: case 610: case 611: case 612: case 613: case 614: case 615:
-			case 701: case 710: case 711: case 712: case 713: case 714: case 715:
-			case 801: case 810: case 811: case 812: case 813: case 814: case 815:
-			case 901: case 910: case 911: case 912: case 913: case 914: case 915:
-				break;
-			default:
-				t2p->pdf_defaultcompressionquality=0;
-		}
-		if(t2p->pdf_defaultcompressionquality%100 !=0){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"PNG Group predictor differencing not implemented, assuming compresion quality %u", 
-				t2p->pdf_defaultcompressionquality);
-		}
-		t2p->pdf_defaultcompressionquality%=100;
-		if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;}
-	}
-#endif
-	(void)0;
-
-	return;
-}
-
-
-/*
-	This function scans the input TIFF file for pages.  It attempts to determine which IFD's of 
-	the TIFF file contain image document pages.  For each, it gathers some information that has 
-	to do with the output of the PDF document as a whole.  
-*/
-
-void t2p_read_tiff_init(T2P* t2p, TIFF* input){
-
-	tdir_t directorycount=0;
-	tdir_t i=0;
-	uint16 pagen=0;
-	uint16 paged=0;
-	uint16 xuint16=0;
-
-	directorycount=TIFFNumberOfDirectories(input);
-	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
-	if(t2p->tiff_pages==NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_read_tiff_init, %s", 
-			directorycount * sizeof(T2P_PAGE), 
-			TIFFFileName(input));
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-	_TIFFmemset( t2p->tiff_pages, 0x00, directorycount * sizeof(T2P_PAGE));
-	t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(directorycount * sizeof(T2P_TILES));
-	if(t2p->tiff_pages==NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_read_tiff_init, %s", 
-			directorycount * sizeof(T2P_TILES), 
-			TIFFFileName(input));
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-	_TIFFmemset( t2p->tiff_tiles, 0x00, directorycount * sizeof(T2P_TILES));
-	for(i=0;i<directorycount;i++){
-		if(!TIFFSetDirectory(input, i)){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"Can't set directory %u of input file %s", 
-				i,
-				TIFFFileName(input));
-			return;
-		}
-		if(TIFFGetField(input, TIFFTAG_PAGENUMBER, &pagen, &paged)==2){
-			if((pagen>paged) && (paged != 0)){
-				t2p->tiff_pages[t2p->tiff_pagecount].page_number = 
-					paged;
-			} else {
-				t2p->tiff_pages[t2p->tiff_pagecount].page_number = 
-					pagen;
-			}
-			goto ispage2;
-		}
-		if(TIFFGetField(input, TIFFTAG_SUBFILETYPE, &xuint16)){
-			if ( ((xuint16 & FILETYPE_PAGE) != 0) || (xuint16 == 0)){
-				goto ispage;
-			} else {
-				goto isnotpage;
-			}
-		}
-		if(TIFFGetField(input, TIFFTAG_OSUBFILETYPE, &xuint16)){
-			if ((xuint16==OFILETYPE_IMAGE) 
-				|| (xuint16==OFILETYPE_PAGE)
-				|| (xuint16==0) ){
-				goto ispage;
-			} else {
-				goto isnotpage;
-			}
-		}
-		ispage:
-		t2p->tiff_pages[t2p->tiff_pagecount].page_number=t2p->tiff_pagecount;
-		ispage2:
-		t2p->tiff_pages[t2p->tiff_pagecount].page_directory=i;
-		if(TIFFIsTiled(input)){
-			t2p->tiff_pages[t2p->tiff_pagecount].page_tilecount = 
-				TIFFNumberOfTiles(input);
-		}
-		t2p->tiff_pagecount++;
-		isnotpage:
-		(void)0;
-	}
-	
-	qsort( (void*) t2p->tiff_pages, t2p->tiff_pagecount, sizeof(T2P_PAGE), t2p_cmp_t2p_page);
-
-	for(i=0;i<t2p->tiff_pagecount;i++){
-		t2p->pdf_xrefcount += 5;
-		TIFFSetDirectory(input, t2p->tiff_pages[i].page_directory );
-		if( (TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &xuint16) && (xuint16==PHOTOMETRIC_PALETTE))
-			|| TIFFGetField(input, TIFFTAG_INDEXED, &xuint16) ){
-			t2p->tiff_pages[i].page_extra++;
-			t2p->pdf_xrefcount++;
-		}
-#ifdef ZIP_SUPPORT
-		TIFFGetField(input, TIFFTAG_COMPRESSION, &xuint16);
-		if( (xuint16== COMPRESSION_DEFLATE ||
-			xuint16== COMPRESSION_ADOBE_DEFLATE) && 
-			((t2p->tiff_pages[t2p->tiff_pagecount].page_tilecount != 0) 
-			|| TIFFNumberOfStrips(input)==1) &&
-			(t2p->pdf_nopassthrough==0)	){
-			if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;}
-		}
-#endif
-#ifdef COLORIMETRY_SUPPORT
-		t2p->tiff_transferfunctioncount=TIFFGetField(
-			input, 
-			TIFFTAG_TRANSFERFUNCTION, 
-			&(t2p->tiff_transferfunction[0]), 
-			&(t2p->tiff_transferfunction[1]), 
-			&(t2p->tiff_transferfunction[2]));
-		if(t2p->tiff_transferfunctioncount==1){
-			t2p->tiff_pages[i].page_extra+=2;
-			t2p->pdf_xrefcount+=2;
-			if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;}
-		}
-		if(t2p->tiff_transferfunctioncount==3){
-			t2p->tiff_pages[i].page_extra+=4;
-			t2p->pdf_xrefcount+=4;
-			if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;}
-		}
-#endif
-#ifdef ICC_SUPPORT
-		if( TIFFGetField(
-			input, 
-			TIFFTAG_ICCPROFILE, 
-			&(t2p->tiff_iccprofilelength), 
-			&(t2p->tiff_iccprofile)) != 0){
-			t2p->tiff_pages[i].page_extra++;
-			t2p->pdf_xrefcount++;
-			if(t2p->pdf_minorversion<3){t2p->pdf_minorversion=3;}
-		}
-#endif
-		t2p->tiff_tiles[i].tiles_tilecount=
-			t2p->tiff_pages[i].page_tilecount;
-		if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0)
-			&& (xuint16 == PLANARCONFIG_SEPARATE ) ){
-				TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16);
-				t2p->tiff_tiles[i].tiles_tilecount/= xuint16;
-		}
-		if( t2p->tiff_tiles[i].tiles_tilecount > 0){
-			t2p->pdf_xrefcount += 
-				(t2p->tiff_tiles[i].tiles_tilecount -1)*2;
-			TIFFGetField(input, 
-				TIFFTAG_TILEWIDTH, 
-				&( t2p->tiff_tiles[i].tiles_tilewidth) );
-			TIFFGetField(input, 
-				TIFFTAG_TILELENGTH, 
-				&( t2p->tiff_tiles[i].tiles_tilelength) );
-			t2p->tiff_tiles[i].tiles_tiles = 
-			(T2P_TILE*) _TIFFmalloc(
-				t2p->tiff_tiles[i].tiles_tilecount 
-				* sizeof(T2P_TILE) );
-			if( t2p->tiff_tiles[i].tiles_tiles == NULL){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_read_tiff_init, %s", 
-					t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE), 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-		}
-	}
-
-	return;
-}
-
-/*
-	This function is used by qsort to sort a T2P_PAGE* array of page structures by page number.
-*/
-
-int t2p_cmp_t2p_page(const void* e1, const void* e2){
-
-	return( ((T2P_PAGE*)e1)->page_number - ((T2P_PAGE*)e2)->page_number );
-}
-
-/*
-	This function sets the input directory to the directory of a given page and determines 
-	information about the image.  
-	
-	It checks the image characteristics to determine if it is possible to convert the image 
-	data into a page of PDF output, setting values of the T2P struct for this page.
-	
-	It determines what color space is used in the output PDF to represent the image.
-	
-	It determines if the image can be converted as raw data without requiring transcoding of 
-	the image data.
-	
-*/
-
-void t2p_read_tiff_data(T2P* t2p, TIFF* input){
-
-	int i=0;
-	uint16* r;
-	uint16* g;
-	uint16* b;
-	uint16* a;
-	uint16 xuint16;
-	uint16* xuint16p;
-#ifdef COLORIMETRY_SUPPORT
-	float* xfloatp;
-#endif
-
-	t2p->pdf_transcode = T2P_TRANSCODE_ENCODE;
-	t2p->pdf_sample = T2P_SAMPLE_NOTHING;
-	
-	TIFFSetDirectory(input, t2p->tiff_pages[t2p->pdf_page].page_directory);
-
-	TIFFGetField(input, TIFFTAG_IMAGEWIDTH, &(t2p->tiff_width));
-	if(t2p->tiff_width == 0){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No support for %s with zero width", 
-			TIFFFileName(input)	);
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-
-	TIFFGetField(input, TIFFTAG_IMAGELENGTH, &(t2p->tiff_length));
-	if(t2p->tiff_length == 0){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No support for %s with zero length", 
-			TIFFFileName(input)	);
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-
-	TIFFGetField(input, TIFFTAG_COMPRESSION, &(t2p->tiff_compression));
-	if( TIFFIsCODECConfigured(t2p->tiff_compression) == 0){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No support for %s with compression type %u:  not configured", 
-			TIFFFileName(input), 
-			t2p->tiff_compression	
-			);
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	
-	}
-
-	TIFFGetFieldDefaulted(input, TIFFTAG_BITSPERSAMPLE, &(t2p->tiff_bitspersample));
-	switch(t2p->tiff_bitspersample){
-		case 1:
-		case 2:
-		case 4:
-		case 8:
-			break;
-		case 0:
-			TIFFWarning(
-				TIFF2PDF_MODULE, 
-				"Image %s has 0 bits per sample, assuming 1",
-				TIFFFileName(input));
-			t2p->tiff_bitspersample=1;
-			break;
-		default:
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"No support for %s with %u bits per sample",
-				TIFFFileName(input),
-				t2p->tiff_bitspersample);
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return;
-	}
-
-	TIFFGetFieldDefaulted(input, TIFFTAG_SAMPLESPERPIXEL, &(t2p->tiff_samplesperpixel));
-	if(t2p->tiff_samplesperpixel>4){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"No support for %s with %u samples per pixel",
-			TIFFFileName(input),
-			t2p->tiff_samplesperpixel);
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-	if(t2p->tiff_samplesperpixel==0){
-		TIFFWarning(
-			TIFF2PDF_MODULE, 
-			"Image %s has 0 samples per pixel, assuming 1",
-			TIFFFileName(input));
-		t2p->tiff_samplesperpixel=1;
-	}
-	
-	if(TIFFGetField(input, TIFFTAG_SAMPLEFORMAT, &xuint16) != 0 ){
-		switch(xuint16){
-			case 0:
-			case 1:
-			case 4:
-				break;
-			default:
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for %s with sample format %u",
-					TIFFFileName(input),
-					xuint16);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-				break;
-		}
-	}
-	
-	TIFFGetField(input, TIFFTAG_FILLORDER, &(t2p->tiff_fillorder));
-	
-	TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &(t2p->tiff_photometric));
-	switch(t2p->tiff_photometric){
-		case PHOTOMETRIC_MINISWHITE:
-		case PHOTOMETRIC_MINISBLACK: 
-			if (t2p->tiff_bitspersample==1){
-				t2p->pdf_colorspace=T2P_CS_BILEVEL;
-				if(t2p->tiff_photometric==PHOTOMETRIC_MINISWHITE){
-					t2p->pdf_switchdecode=1;
-				}
-			} else {
-				t2p->pdf_colorspace=T2P_CS_GRAY;
-				if(t2p->tiff_photometric==PHOTOMETRIC_MINISWHITE){
-					t2p->pdf_switchdecode=1;
-				} 
-			}
-			break;
-		case PHOTOMETRIC_RGB: 
-			t2p->pdf_colorspace=T2P_CS_RGB;
-			if(t2p->tiff_samplesperpixel==3){
-				break;
-			}
-			if(TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)){
-				if(xuint16==1){
-						goto photometric_palette;
-				}
-			}
-			if(t2p->tiff_samplesperpixel>3){
-				if(t2p->tiff_samplesperpixel==4){
-					t2p->pdf_colorspace=T2P_CS_RGB;
-					if(TIFFGetField(input, TIFFTAG_EXTRASAMPLES, &xuint16, &xuint16p)){
-						if(xuint16==EXTRASAMPLE_ASSOCALPHA){
-							t2p->pdf_sample=T2P_SAMPLE_RGBAA_TO_RGB;
-							break;
-						}
-						if(xuint16==EXTRASAMPLE_UNASSALPHA){
-							t2p->pdf_sample=T2P_SAMPLE_RGBA_TO_RGB;
-							break;
-						}
-						TIFFWarning(
-							TIFF2PDF_MODULE, 
-							"RGB image %s has 4 samples per pixel, assuming RGBA",
-							TIFFFileName(input));
-							break;
-					}
-					t2p->pdf_colorspace=T2P_CS_CMYK;
-					t2p->pdf_switchdecode=1;
-					TIFFWarning(
-						TIFF2PDF_MODULE, 
-						"RGB image %s has 4 samples per pixel, assuming inverse CMYK",
-					TIFFFileName(input));
-					break;
-				} else {
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"No support for RGB image %s with %u samples per pixel", 
-						TIFFFileName(input), 
-						t2p->tiff_samplesperpixel);
-					t2p->t2p_error = T2P_ERR_ERROR;
-					break;
-				}
-			} else {
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for RGB image %s with %u samples per pixel", 
-					TIFFFileName(input), 
-					t2p->tiff_samplesperpixel);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				break;
-			}
-		case PHOTOMETRIC_PALETTE: 
-			photometric_palette:
-			if(t2p->tiff_samplesperpixel!=1){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for palettized image %s with not one sample per pixel", 
-					TIFFFileName(input), 
-					t2p->tiff_samplesperpixel);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			t2p->pdf_colorspace=T2P_CS_RGB | T2P_CS_PALETTE;
-			t2p->pdf_palettesize=0x0001<<t2p->tiff_bitspersample;
-			if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b)){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"Palettized image %s has no color map", 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			} 
-			if(t2p->pdf_palette != NULL){
-				_TIFFfree(t2p->pdf_palette);
-				t2p->pdf_palette=NULL;
-			}
-			t2p->pdf_palette = (char*) _TIFFmalloc(t2p->pdf_palettesize*3);
-			if(t2p->pdf_palette==NULL){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_read_tiff_image, %s", 
-					t2p->pdf_palettesize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			for(i=0;i<t2p->pdf_palettesize;i++){
-				t2p->pdf_palette[(i*3)]  = (unsigned char) (r[i]>>8);
-				t2p->pdf_palette[(i*3)+1]= (unsigned char) (g[i]>>8);
-				t2p->pdf_palette[(i*3)+2]= (unsigned char) (b[i]>>8);
-			}
-			t2p->pdf_palettesize *= 3;
-			break;
-#ifdef CMYK_SUPPORT
-		case PHOTOMETRIC_SEPARATED:
-			if(TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)){
-				if(xuint16==1){
-						goto photometric_palette_cmyk;
-				}
-			}
-			if( TIFFGetField(input, TIFFTAG_INKSET, &xuint16) ){
-				if(xuint16 != INKSET_CMYK){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"No support for %s because its inkset is not CMYK",
-						TIFFFileName(input) );
-					t2p->t2p_error = T2P_ERR_ERROR;
-					return;
-				}
-			}
-			if(t2p->tiff_samplesperpixel==4){
-				t2p->pdf_colorspace=T2P_CS_CMYK;
-			} else {
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for %s because it has %u samples per pixel",
-					TIFFFileName(input), 
-					t2p->tiff_samplesperpixel);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			break;
-			photometric_palette_cmyk:
-			if(t2p->tiff_samplesperpixel!=1){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for palettized CMYK image %s with not one sample per pixel", 
-					TIFFFileName(input), 
-					t2p->tiff_samplesperpixel);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			t2p->pdf_colorspace=T2P_CS_CMYK | T2P_CS_PALETTE;
-			t2p->pdf_palettesize=0x0001<<t2p->tiff_bitspersample;
-			if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b, &a)){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"Palettized image %s has no color map", 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			} 
-			if(t2p->pdf_palette != NULL){
-				_TIFFfree(t2p->pdf_palette);
-				t2p->pdf_palette=NULL;
-			}
-			t2p->pdf_palette = (char*) _TIFFmalloc(t2p->pdf_palettesize*4);
-			if(t2p->pdf_palette==NULL){
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_read_tiff_image, %s", 
-					t2p->pdf_palettesize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			for(i=0;i<t2p->pdf_palettesize;i++){
-				t2p->pdf_palette[(i*4)]  = (unsigned char) (r[i]>>8);
-				t2p->pdf_palette[(i*4)+1]= (unsigned char) (g[i]>>8);
-				t2p->pdf_palette[(i*4)+2]= (unsigned char) (b[i]>>8);
-				t2p->pdf_palette[(i*4)+2]= (unsigned char) (a[i]>>8);
-			}
-			t2p->pdf_palettesize *= 4;
-			break;
-#endif
-#ifdef YCBCR_SUPPORT
-		case PHOTOMETRIC_YCBCR:
-			t2p->pdf_colorspace=T2P_CS_RGB;
-			if(t2p->tiff_samplesperpixel==1){
-				t2p->pdf_colorspace=T2P_CS_GRAY;
-				t2p->tiff_photometric=PHOTOMETRIC_MINISBLACK;
-				break;
-			}
-			t2p->pdf_sample=T2P_SAMPLE_YCBCR_TO_RGB;
-#ifdef JPEG_SUPPORT
-			if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){
-				t2p->pdf_sample=T2P_SAMPLE_NOTHING;
-			}
-#endif
-			break;
-#endif
-		case PHOTOMETRIC_CIELAB:
-			t2p->pdf_labrange[0]= -127;
-			t2p->pdf_labrange[1]= 127;
-			t2p->pdf_labrange[2]= -127;
-			t2p->pdf_labrange[3]= 127;
-			t2p->pdf_sample=T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED;
-			t2p->pdf_colorspace=T2P_CS_LAB;
-			break;
-		case PHOTOMETRIC_ICCLAB:
-			t2p->pdf_labrange[0]= 0;
-			t2p->pdf_labrange[1]= 255;
-			t2p->pdf_labrange[2]= 0;
-			t2p->pdf_labrange[3]= 255;
-			t2p->pdf_colorspace=T2P_CS_LAB;
-			break;
-		case PHOTOMETRIC_ITULAB:
-			t2p->pdf_labrange[0]=-85;
-			t2p->pdf_labrange[1]=85;
-			t2p->pdf_labrange[2]=-75;
-			t2p->pdf_labrange[3]=124;
-			t2p->pdf_sample=T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED;
-			t2p->pdf_colorspace=T2P_CS_LAB;
-			break;
-		case PHOTOMETRIC_LOGL:
-		case PHOTOMETRIC_LOGLUV:
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"No support for %s with photometric interpretation LogL/LogLuv", 
-				TIFFFileName(input),
-				t2p->tiff_photometric);
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return;
-		default:
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"No support for %s with photometric interpretation %u", 
-				TIFFFileName(input),
-				t2p->tiff_photometric);
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return;
-	}
-
-	if(TIFFGetField(input, TIFFTAG_PLANARCONFIG, &(t2p->tiff_planar))){
-		switch(t2p->tiff_planar){
-			case 0:
-				TIFFWarning(
-					TIFF2PDF_MODULE, 
-					"Image %s has planar configuration 0, assuming 1", 
-					TIFFFileName(input));
-				t2p->tiff_planar=PLANARCONFIG_CONTIG;
-			case PLANARCONFIG_CONTIG:
-				break;
-			case PLANARCONFIG_SEPARATE:
-				t2p->pdf_sample=T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG;
-				if(t2p->tiff_bitspersample!=8){
-					TIFFError(
-						TIFF2PDF_MODULE, 
-						"No support for %s with separated planar configuration and %u bits per sample", 
-						TIFFFileName(input),
-						t2p->tiff_bitspersample);
-					t2p->t2p_error = T2P_ERR_ERROR;
-					return;
-				}
-				break;
-			default:
-				TIFFError(
-					TIFF2PDF_MODULE, 
-					"No support for %s with planar configuration %u", 
-					TIFFFileName(input),
-					t2p->tiff_planar);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-		}
-	}
-
-	TIFFGetField(input, TIFFTAG_ORIENTATION, &(t2p->tiff_orientation) );
-	if(t2p->tiff_orientation>8){
-			TIFFWarning(
-				TIFF2PDF_MODULE, 
-				"Image %s has orientation %u, assuming 0", 
-				TIFFFileName(input),
-				t2p->tiff_orientation);
-			t2p->tiff_orientation=0;
-	}
-
-	TIFFGetField(input, TIFFTAG_XRESOLUTION, &(t2p->tiff_xres) );
-	TIFFGetField(input, TIFFTAG_YRESOLUTION, &(t2p->tiff_yres) );
-	TIFFGetField(input, TIFFTAG_RESOLUTIONUNIT, &(t2p->tiff_resunit) );
-	if(t2p->tiff_resunit==RESUNIT_CENTIMETER){
-		t2p->tiff_xres*=2.54;
-		t2p->tiff_yres*=2.54;
-	} else if (t2p->tiff_resunit!=RESUNIT_INCH && t2p->pdf_centimeters!=0){
-		t2p->tiff_xres*=2.54;
-		t2p->tiff_yres*=2.54;
-	}
-
-	t2p_compose_pdf_page(t2p);
-
-	t2p->pdf_transcode = T2P_TRANSCODE_ENCODE;
-	if(t2p->pdf_nopassthrough==0){
-#ifdef CCITT_SUPPORT
-		if(t2p->tiff_compression==COMPRESSION_CCITTFAX4  
-			){
-			if(TIFFIsTiled(input) || (TIFFNumberOfStrips(input)==1) ){
-				t2p->pdf_transcode = T2P_TRANSCODE_RAW;
-				t2p->pdf_compression=T2P_COMPRESS_G4;
-			}
-		}
-#endif
-#ifdef ZIP_SUPPORT
-		if(t2p->tiff_compression== COMPRESSION_ADOBE_DEFLATE 
-			|| t2p->tiff_compression==COMPRESSION_DEFLATE){
-			if(TIFFIsTiled(input) || (TIFFNumberOfStrips(input)==1) ){
-				t2p->pdf_transcode = T2P_TRANSCODE_RAW;
-				t2p->pdf_compression=T2P_COMPRESS_ZIP;
-			}
-		}
-#endif
-#ifdef OJPEG_SUPPORT
-		if(t2p->tiff_compression==COMPRESSION_OJPEG){
-			t2p->pdf_transcode = T2P_TRANSCODE_RAW;
-			t2p->pdf_compression=T2P_COMPRESS_JPEG;
-			t2p_process_ojpeg_tables(t2p, input);
-		}
-#endif
-#ifdef JPEG_SUPPORT
-		if(t2p->tiff_compression==COMPRESSION_JPEG){
-			t2p->pdf_transcode = T2P_TRANSCODE_RAW;
-			t2p->pdf_compression=T2P_COMPRESS_JPEG;
-		}
-#endif
-		(void)0;
-	}
-
-	if(t2p->pdf_transcode!=T2P_TRANSCODE_RAW){
-		t2p->pdf_compression = t2p->pdf_defaultcompression;
-	}
-
-#ifdef JPEG_SUPPORT
-	if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){
-		if(t2p->pdf_colorspace & T2P_CS_PALETTE){
-			t2p->pdf_sample|=T2P_SAMPLE_REALIZE_PALETTE;
-			t2p->pdf_colorspace ^= T2P_CS_PALETTE;
-			t2p->tiff_pages[t2p->pdf_page].page_extra--;
-		}
-	}
-	if(t2p->tiff_compression==COMPRESSION_JPEG){
-		if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"No support for %s with JPEG compression and separated planar configuration", 
-				TIFFFileName(input));
-				t2p->t2p_error=T2P_ERR_ERROR;
-			return;
-		}
-	}
-#endif
-#ifdef OJPEG_SUPPORT
-	if(t2p->tiff_compression==COMPRESSION_OJPEG){
-		if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
-			TIFFError(
-				TIFF2PDF_MODULE, 
-				"No support for %s with OJPEG compression and separated planar configuration", 
-				TIFFFileName(input));
-				t2p->t2p_error=T2P_ERR_ERROR;
-			return;
-		}
-	}
-#endif
-
-	if(t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE){
-#ifdef CMYK_SUPPORT	
-		if(t2p->pdf_colorspace & T2P_CS_CMYK){
-			t2p->tiff_samplesperpixel=4;
-			t2p->tiff_photometric=PHOTOMETRIC_SEPARATED;
-		} else {
-#endif
-			t2p->tiff_samplesperpixel=3;
-			t2p->tiff_photometric=PHOTOMETRIC_RGB;
-#ifdef CMYK_SUPPORT
-		}
-#endif
-	}
-
-#ifdef COLORIMETRY_SUPPORT
-	t2p->tiff_transferfunctioncount=TIFFGetField(input, 
-		TIFFTAG_TRANSFERFUNCTION, 
-		&(t2p->tiff_transferfunction[0]),
-		&(t2p->tiff_transferfunction[1]),
-		&(t2p->tiff_transferfunction[2]));
-	if(TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp)!=0){
-		t2p->tiff_whitechromaticities[0]=xfloatp[0];
-		t2p->tiff_whitechromaticities[1]=xfloatp[1];
-		if(t2p->pdf_colorspace & T2P_CS_GRAY){
-			t2p->pdf_colorspace |= T2P_CS_CALGRAY;
-		}
-		if(t2p->pdf_colorspace & T2P_CS_RGB){
-			t2p->pdf_colorspace |= T2P_CS_CALRGB;
-		}
-	}
-	if(TIFFGetField(input, TIFFTAG_PRIMARYCHROMATICITIES, &xfloatp)!=0){
-		t2p->tiff_primarychromaticities[0]=xfloatp[0];
-		t2p->tiff_primarychromaticities[1]=xfloatp[1];
-		t2p->tiff_primarychromaticities[2]=xfloatp[2];
-		t2p->tiff_primarychromaticities[3]=xfloatp[3];
-		t2p->tiff_primarychromaticities[4]=xfloatp[4];
-		t2p->tiff_primarychromaticities[5]=xfloatp[5];
-		if(t2p->pdf_colorspace & T2P_CS_RGB){
-			t2p->pdf_colorspace |= T2P_CS_CALRGB;
-		}
-	}
-	if(t2p->pdf_colorspace & T2P_CS_LAB){
-		if(TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp) != 0){
-			t2p->tiff_whitechromaticities[0]=xfloatp[0];
-			t2p->tiff_whitechromaticities[1]=xfloatp[1];
-		} else {
-			t2p->tiff_whitechromaticities[0]=0.3457; //0.3127;
-			t2p->tiff_whitechromaticities[1]=0.3585;//0.3290;
-		}
-	}
-#endif
-#ifdef ICC_SUPPORT
-	if(TIFFGetField(input, 
-		TIFFTAG_ICCPROFILE, 
-		&(t2p->tiff_iccprofilelength), 
-		&(t2p->tiff_iccprofile))!=0){
-		t2p->pdf_colorspace |= T2P_CS_ICCBASED;
-	} else {
-		t2p->tiff_iccprofilelength=0;
-		t2p->tiff_iccprofile=NULL;
-	}
-#endif
-	
-	if(t2p->pdf_colorspace_invert != 0){
-		(t2p->pdf_switchdecode==0) ? (t2p->pdf_switchdecode=1) : (t2p->pdf_switchdecode=0);
-	}
-
-#ifdef CCITT_SUPPORT
-	if( t2p->tiff_bitspersample==1 &&
-		t2p->tiff_samplesperpixel==1){
-		t2p->pdf_compression = T2P_COMPRESS_G4;
-	}
-#endif
-
-
-	return;
-}
-
-/*
-	This function returns the necessary size of a data buffer to contain the raw or 
-	uncompressed image data from the input TIFF for a page.
-*/
-
-void t2p_read_tiff_size(T2P* t2p, TIFF* input){
-
-	uint32* sbc=NULL;
-#if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
-	unsigned char* jpt=NULL;
-	uint16 xuint16=0;
-	tstrip_t i=0;
-	tstrip_t stripcount=0;
-	tsize_t k=0;
-#endif
-
-	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
-#ifdef CCITT_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){
-			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
-			t2p->tiff_datasize=sbc[0];
-			return;
-		}
-#endif
-#ifdef ZIP_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
-			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
-			t2p->tiff_datasize=sbc[0];
-			return;
-		}
-#endif
-#ifdef OJPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_OJPEG){
-			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			stripcount=TIFFNumberOfStrips(input);
-			for(i=0;i<stripcount;i++){
-				k += sbc[i];
-			}
-			if(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){
-				if(t2p->tiff_dataoffset != 0){
-					if(TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, &(t2p->tiff_datasize))!=0){
-						if(t2p->tiff_datasize < k) {
-							t2p->pdf_ojpegiflength=t2p->tiff_datasize;
-							t2p->tiff_datasize+=k;
-							t2p->tiff_datasize+=6;
-							t2p->tiff_datasize+=2*stripcount;
-							TIFFWarning(TIFF2PDF_MODULE, 
-								"Input file %s has short JPEG interchange file byte count", 
-								TIFFFileName(input));
-							return;
-						}
-						return;
-					}else {
-						TIFFError(TIFF2PDF_MODULE, 
-							"Input file %s missing field: TIFFTAG_JPEGIFBYTECOUNT",
-							TIFFFileName(input));
-							t2p->t2p_error = T2P_ERR_ERROR;
-							return;
-					}
-				}
-			}
-			t2p->tiff_datasize+=k;
-			t2p->tiff_datasize+=2*stripcount;
-			t2p->tiff_datasize+=2048;
-			return;
-		}
-#endif
-#ifdef JPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_JPEG){
-			if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint16, &jpt) != 0 ){
-				if(xuint16>4){
-					t2p->tiff_datasize+= xuint16;
-					t2p->tiff_datasize -=2; /* don't use EOI of header */
-				}
-			} else {
-				t2p->tiff_datasize=2; /* SOI for first strip */
-			}
-			stripcount=TIFFNumberOfStrips(input);
-			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return;
-			}
-			for(i=0;i<stripcount;i++){
-				t2p->tiff_datasize += sbc[i];
-				t2p->tiff_datasize -=4; /* don't use SOI or EOI of strip */
-			}
-			t2p->tiff_datasize +=2; /* use EOI of last strip */
-		}
-#endif
-		(void) 0;
-	}
-	t2p->tiff_datasize=TIFFScanlineSize(input) * t2p->tiff_length;
-	if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
-		t2p->tiff_datasize*= t2p->tiff_samplesperpixel;
-	}
-
-	return;
-}
-
-/*
-	This function returns the necessary size of a data buffer to contain the raw or 
-	uncompressed image data from the input TIFF for a tile of a page.
-*/
-
-void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
-
-	uint32* tbc = NULL;
-	uint16 edge=0;
-#ifdef JPEG_SUPPORT
-	uint16 xuint16=0;
-	unsigned char* jpt;
-#endif
-
-	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
-	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
-	
-	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
-		if(edge
-#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
-		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)
-#endif
-		){
-			t2p->tiff_datasize=TIFFTileSize(input);
-			return;
-		} else {
-			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
-			t2p->tiff_datasize=tbc[tile];
-#ifdef OJPEG_SUPPORT
-			if(t2p->tiff_compression==COMPRESSION_OJPEG){
-				t2p->tiff_datasize+=2048;
-				return;
-			}
-#endif
-#ifdef JPEG_SUPPORT
-			if(t2p->tiff_compression==COMPRESSION_JPEG){
-				if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint16, &jpt)!=0){
-					if(xuint16>4){
-						t2p->tiff_datasize+=xuint16;
-						t2p->tiff_datasize-=4; /* don't use EOI of header or SOI of tile */
-					}
-				}
-			}
-#endif
-			return;
-		}
-	}
-	t2p->tiff_datasize=TIFFTileSize(input);
-	if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
-		t2p->tiff_datasize*= t2p->tiff_samplesperpixel;
-	}
-
-	return;
-}
-
-/*
-	This functions returns a non-zero value when the tile is on the right edge 
-	and does not have full imaged tile width.
-*/
-
-int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
-
-	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
-		&& (tiles.tiles_edgetilewidth != 0) ){
-		return(1);
-	} else {
-		return(0);
-	}
-	
-	return(0);
-	
-}
-
-/*
-	This functions returns a non-zero value when the tile is on the bottom edge 
-	and does not have full imaged tile length.
-*/
-
-int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
-
-	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
-		&& (tiles.tiles_edgetilelength != 0) ){
-		return(1);
-	} else {
-		return(0);
-	}
-	
-	return(0);
-}
-
-/*
-	This function returns a non-zero value when the tile is a right edge tile or a bottom 
-	edge tile.
-*/
-
-int t2p_tile_is_edge(T2P_TILES tiles, ttile_t tile){
-
-	return(t2p_tile_is_right_edge(tiles, tile) | t2p_tile_is_bottom_edge(tiles, tile) );
-}
-
-/*
-	This function returns a non-zero value when the tile is a right edge tile and a bottom 
-	edge tile.
-*/
-
-int t2p_tile_is_corner_edge(T2P_TILES tiles, ttile_t tile){
-
-	return(t2p_tile_is_right_edge(tiles, tile) & t2p_tile_is_bottom_edge(tiles, tile) );
-}
-
-/*
-	This function is an empty (dummy) TIFFReadWriteProc that returns the amount 
-	requested to be read without reading anything.
-*/
-
-tsize_t t2p_empty_readproc(thandle_t fd, tdata_t buf, tsize_t size){
-
-	(void) fd; (void) buf; (void) size;
-
-	return (size);
-}
-
-/*
-	This function is an empty (dummy) TIFFReadWriteProc that returns the amount 
-	requested to be written without writing anything.
-*/
-
-tsize_t t2p_empty_writeproc(thandle_t fd, tdata_t buf, tsize_t size){
-
-	(void) fd; (void) buf; (void) size;
-
-	return (size);
-}
-
-/*
-	This function is an empty (dummy) TIFFSeekProc that returns off.
-*/
-
-toff_t t2p_empty_seekproc(thandle_t fd, toff_t off, int whence){
-	
-	(void) fd; (void) off; (void) whence;
-
-	return( off );
-}
-
-/*
-	This function is an empty (dummy) TIFFCloseProc that returns 0.
-*/
-
-int t2p_empty_closeproc(thandle_t fd){
-	
-	(void) fd;
-	
-	return(0);
-}
-
-
-/*
-	This function reads the raster image data from the input TIFF for an image and writes 
-	the data to the output PDF XObject image dictionary stream.  It returns the amount written 
-	or zero on error.
-*/
-
-tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
-
-	tsize_t written=0;
-	unsigned char* buffer=NULL;
-	unsigned char* samplebuffer=NULL;
-	tsize_t bufferoffset=0;
-	tsize_t samplebufferoffset=0;
-	tsize_t read=0;
-	tstrip_t i=0;
-	tstrip_t j=0;
-	tstrip_t stripcount=0;
-	tsize_t stripsize=0;
-	tsize_t sepstripcount=0;
-	tsize_t sepstripsize=0;
-#ifdef OJPEG_SUPPORT
-	toff_t inputoffset=0;
-	uint16 h_samp=1;
-	uint16 v_samp=1;
-	uint16 ri=1;
-	uint32 rows=0;
-#endif
-#ifdef JPEG_SUPPORT
-	unsigned char* jpt;
-	uint16 xuint16_1=0;
-	uint16 xuint16_2=0;
-	float* xfloatp;
-	uint32* sbc;
-	unsigned char* stripbuffer;
-	uint32 striplength=0;
-	uint32 max_striplength=0;
-#endif
-
-	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
-#ifdef CCITT_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_G4){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			TIFFReadRawStrip(input, 0, (tdata_t) buffer, t2p->tiff_datasize);
-			if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){
-					// make sure is lsb-to-msb bit-endianness fill order
-					TIFFReverseBits(buffer, t2p->tiff_datasize);
-			}
-			TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize);
-			_TIFFfree(buffer);
-			return(t2p->tiff_datasize);
-		}
-#endif
-#ifdef ZIP_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			TIFFReadRawStrip(input, 0, (tdata_t) buffer, t2p->tiff_datasize);
-			if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){
-					TIFFReverseBits(buffer, t2p->tiff_datasize);
-			}
-			TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize);
-			_TIFFfree(buffer);
-			return(t2p->tiff_datasize);
-		}
-#endif
-#ifdef OJPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_OJPEG){
-
-			if(t2p->tiff_dataoffset != 0){
-				buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-				if(buffer==NULL){
-					TIFFError(TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-						t2p->tiff_datasize, 
-						TIFFFileName(input));
-					t2p->t2p_error = T2P_ERR_ERROR;
-					return(0);
-				}
-				if(t2p->pdf_ojpegiflength==0){
-					inputoffset=TIFFSeekFile(input, 0, SEEK_CUR);
-					TIFFSeekFile(input, t2p->tiff_dataoffset, SEEK_SET);
-					TIFFReadFile(input, (tdata_t) buffer, t2p->tiff_datasize);
-					TIFFSeekFile(input, inputoffset, SEEK_SET);
-					TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize);
-					_TIFFfree(buffer);
-					return(t2p->tiff_datasize);
-				} else {
-					inputoffset=TIFFSeekFile(input, 0, SEEK_CUR);
-					TIFFSeekFile(input, t2p->tiff_dataoffset, SEEK_SET);
-					bufferoffset=TIFFReadFile(input, (tdata_t) buffer, t2p->pdf_ojpegiflength);
-					t2p->pdf_ojpegiflength=0;
-					TIFFSeekFile(input, inputoffset, SEEK_SET);
-					TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp);
-					buffer[bufferoffset++]= 0xff;
-					buffer[bufferoffset++]= 0xdd;
-					buffer[bufferoffset++]= 0x00;
-					buffer[bufferoffset++]= 0x04;
-					h_samp*=8;
-					v_samp*=8;
-					ri=(t2p->tiff_width+h_samp-1) / h_samp;
-					TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows);
-					ri*=(rows+v_samp-1)/v_samp;
-					buffer[bufferoffset++]= (ri>>8) & 0xff;
-					buffer[bufferoffset++]= ri & 0xff;
-					stripcount=TIFFNumberOfStrips(input);
-					for(i=0;i<stripcount;i++){
-						if(i != 0 ){ 
-							buffer[bufferoffset++]=0xff;
-							buffer[bufferoffset++]=(0xd0 | ((i-1)%8));
-						}
-						bufferoffset+=TIFFReadRawStrip(input, 
-							i, 
-							(tdata_t) &(((unsigned char*)buffer)[bufferoffset]), 
-							-1);
-					}
-					TIFFWriteFile(output, (tdata_t) buffer, bufferoffset);
-					_TIFFfree(buffer);
-					return(bufferoffset);
-				}
-			} else {
-				if(! t2p->pdf_ojpegdata){
-					TIFFError(TIFF2PDF_MODULE, 
-						"No support for OJPEG image %s with bad tables", 
-						TIFFFileName(input));
-					t2p->t2p_error = T2P_ERR_ERROR;
-					return(0);
-				}
-				buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-				if(buffer==NULL){
-					TIFFError(TIFF2PDF_MODULE, 
-						"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-						t2p->tiff_datasize, 
-						TIFFFileName(input));
-					t2p->t2p_error = T2P_ERR_ERROR;
-					return(0);
-				}
-				_TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength);
-				bufferoffset=t2p->pdf_ojpegdatalength;
-				stripcount=TIFFNumberOfStrips(input);
-				for(i=0;i<stripcount;i++){
-					if(i != 0){
-						buffer[bufferoffset++]=0xff;
-						buffer[bufferoffset++]=(0xd0 | ((i-1)%8));
-					}
-					bufferoffset+=TIFFReadRawStrip(input, 
-						i, 
-						(tdata_t) &(((unsigned char*)buffer)[bufferoffset]), 
-						-1);
-				}
-				if( ! ( (buffer[bufferoffset-1]==0xd9) && (buffer[bufferoffset-2]==0xff) ) ){
-						buffer[bufferoffset++]=0xff;
-						buffer[bufferoffset++]=0xd9;
-				}
-				TIFFWriteFile(output, (tdata_t) buffer, bufferoffset);
-				_TIFFfree(buffer);
-				return(bufferoffset);
-				TIFFError(TIFF2PDF_MODULE, 
-					"No support for OJPEG image %s with no JPEG File Interchange offset", 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			return(t2p->tiff_datasize);
-		}
-#endif
-#ifdef JPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_JPEG){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint16_1, &jpt) != 0){
-				if(xuint16_1>4){
-					_TIFFmemcpy(buffer, jpt, xuint16_1);
-					bufferoffset+=xuint16_1-2;
-				}
-			}
-			stripcount=TIFFNumberOfStrips(input);
-			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
-			for(i=0;i<stripcount;i++){
-				if(sbc[i]>max_striplength) max_striplength=sbc[i];
-			}
-			stripbuffer=(unsigned char*) _TIFFmalloc(max_striplength);
-			if(stripbuffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					max_striplength, 
-					TIFFFileName(input));
-				_TIFFfree(buffer);
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			for(i=0;i<stripcount;i++){
-				striplength=TIFFReadRawStrip(input, i, (tdata_t) stripbuffer, -1);
-				if(!t2p_process_jpeg_strip(
-					stripbuffer, 
-					&striplength, 
-					buffer, 
-					&bufferoffset, 
-					i, 
-					t2p->tiff_length)){
-						TIFFError(TIFF2PDF_MODULE, 
-							"Can't process JPEG data in input file %s", 
-							TIFFFileName(input));
-						_TIFFfree(samplebuffer);
-						_TIFFfree(buffer);
-						t2p->t2p_error = T2P_ERR_ERROR;
-						return(0);
-				}
-			}
-			buffer[bufferoffset++]=0xff; 
-			buffer[bufferoffset++]=0xd9;
-			TIFFWriteFile(output, (tdata_t) buffer, bufferoffset);
-			_TIFFfree(stripbuffer);
-			_TIFFfree(buffer);
-			return(bufferoffset);
-		}
-#endif
-		(void)0;
-	}
-
-	if(t2p->pdf_sample==T2P_SAMPLE_NOTHING){
-		buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-		if(buffer==NULL){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-				t2p->tiff_datasize, 
-				TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-		stripsize=TIFFStripSize(input);
-		stripcount=TIFFNumberOfStrips(input);
-		for(i=0;i<stripcount;i++){
-			read = 
-				TIFFReadEncodedStrip(input, 
-				i, 
-				(tdata_t) &buffer[bufferoffset], 
-				stripsize);
-			if(read==-1){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Error on decoding strip %u of %s", 
-					i, 
-					TIFFFileName(input));
-				_TIFFfree(buffer);
-				t2p->t2p_error=T2P_ERR_ERROR;
-				return(0);
-			}
-			bufferoffset+=read;
-		}
-	} else {
-		if(t2p->pdf_sample & T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){
-		
-			sepstripsize=TIFFStripSize(input);
-			sepstripcount=TIFFNumberOfStrips(input);
-		
-			stripsize=sepstripsize*t2p->tiff_samplesperpixel;
-			stripcount=sepstripcount/t2p->tiff_samplesperpixel;
-			
-			buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			samplebuffer = (unsigned char*) _TIFFmalloc(stripsize);
-			if(samplebuffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			for(i=0;i<stripcount;i++){
-				samplebufferoffset=0;
-				for(j=0;j<t2p->tiff_samplesperpixel;j++){
-					read = 
-						TIFFReadEncodedStrip(input, 
-							i + j*stripcount, 
-							(tdata_t) &(samplebuffer[samplebufferoffset]), 
-							sepstripsize);
-					if(read==-1){
-						TIFFError(TIFF2PDF_MODULE, 
-							"Error on decoding strip %u of %s", 
-							i + j*stripcount, 
-							TIFFFileName(input));
-							_TIFFfree(buffer);
-						t2p->t2p_error=T2P_ERR_ERROR;
-						return(0);
-					}
-					samplebufferoffset+=read;
-				}
-				t2p_sample_planar_separate_to_contig(
-					t2p,
-					&(buffer[bufferoffset]),
-					samplebuffer, 
-					samplebufferoffset); 
-				bufferoffset+=samplebufferoffset;
-			}
-			_TIFFfree(samplebuffer);
-			goto dataready;
-		}
-
-		buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-		if(buffer==NULL){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-				t2p->tiff_datasize, 
-				TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-		stripsize=TIFFStripSize(input);
-		stripcount=TIFFNumberOfStrips(input);
-		for(i=0;i<stripcount;i++){
-			read = 
-				TIFFReadEncodedStrip(input, 
-				i, 
-				(tdata_t) &buffer[bufferoffset], 
-				stripsize);
-			if(read==-1){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Error on decoding strip %u of %s", 
-					i, 
-					TIFFFileName(input));
-				_TIFFfree(samplebuffer);
-				_TIFFfree(buffer);
-				t2p->t2p_error=T2P_ERR_ERROR;
-				return(0);
-			}
-			bufferoffset+=read;
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE){
-			samplebuffer=(unsigned char*)_TIFFrealloc( 
-				(tdata_t) buffer, 
-				t2p->tiff_datasize * t2p->tiff_samplesperpixel);
-			if(samplebuffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-			  _TIFFfree(buffer);
-			} else {
-				buffer=samplebuffer;
-				t2p->tiff_datasize *= t2p->tiff_samplesperpixel;
-			}
-			t2p_sample_realize_palette(t2p, buffer);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB){
-			t2p->tiff_datasize=t2p_sample_rgba_to_rgb(
-				(tdata_t)buffer, 
-				t2p->tiff_width*t2p->tiff_length);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB){
-			t2p->tiff_datasize=t2p_sample_rgbaa_to_rgb(
-				(tdata_t)buffer, 
-				t2p->tiff_width*t2p->tiff_length);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB){
-			samplebuffer=(char*)_TIFFrealloc(
-				(tdata_t)buffer, 
-				t2p->tiff_width*t2p->tiff_length*4);
-			if(samplebuffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				_TIFFfree(buffer);
-				return(0);
-			} else {
-				buffer=samplebuffer;
-			}
-			if(!TIFFReadRGBAImageOriented(
-				input, 
-				t2p->tiff_width, 
-				t2p->tiff_length, 
-				(uint32*)buffer, 
-				ORIENTATION_TOPLEFT,
-				0)){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't use TIFFReadRGBAImageOriented to extract RGB image from %s", 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			t2p->tiff_datasize=t2p_sample_abgr_to_rgb(
-				(tdata_t) buffer, 
-				t2p->tiff_width*t2p->tiff_length);
-
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED){
-			t2p->tiff_datasize=t2p_sample_lab_signed_to_unsigned(
-				(tdata_t)buffer, 
-				t2p->tiff_width*t2p->tiff_length);
-		}
-	}
-
-	dataready:
-
-	t2p->tiff_writeproc=output->tif_writeproc;
-	output->tif_writeproc=t2p_empty_writeproc;
-
-	TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric);
-	TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample);
-	TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel);
-	TIFFSetField(output, TIFFTAG_IMAGEWIDTH, t2p->tiff_width);
-	TIFFSetField(output, TIFFTAG_IMAGELENGTH, t2p->tiff_length);
-	TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, t2p->tiff_length);
-	TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
-
-	switch(t2p->pdf_compression){
-	case T2P_COMPRESS_NONE:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-		break;
-#ifdef CCITT_SUPPORT
-	case T2P_COMPRESS_G4:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4);
-		break;
-#endif
-#ifdef JPEG_SUPPORT
-	case T2P_COMPRESS_JPEG:
-		if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR){
-			if(TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &xuint16_1, &xuint16_2)!=0){
-				if(xuint16_1 != 0 && xuint16_2 != 0){
-					TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, xuint16_1, xuint16_2);
-				}
-			}
-			if(TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, &xfloatp)!=0){
-				TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp);
-			}
-		}
-		if(TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG)==0){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Unable to use JPEG compression for input %s and output %s", 
-				TIFFFileName(input),
-				TIFFFileName(output));
-			_TIFFfree(buffer);
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-		TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, 0);
-
-		if(t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)){
-			TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR);
-			if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR){
-				TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-			} else {
-				TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW);
-			}
-		}
-		if(t2p->pdf_colorspace & T2P_CS_GRAY){
-			(void)0;
-		}
-#ifdef CMYK_SUPPORT
-		if(t2p->pdf_colorspace & T2P_CS_CMYK){
-			(void)0;
-		}
-#endif
-		if(t2p->pdf_defaultcompressionquality != 0){
-			TIFFSetField(output, 
-				TIFFTAG_JPEGQUALITY, 
-				t2p->pdf_defaultcompressionquality);
-		}
-	
-		break;
-#endif
-#ifdef ZIP_SUPPORT
-	case T2P_COMPRESS_ZIP:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
-		if(t2p->pdf_defaultcompressionquality%100 != 0){
-			TIFFSetField(output, 
-				TIFFTAG_PREDICTOR, 
-				t2p->pdf_defaultcompressionquality % 100);
-		}
-		if(t2p->pdf_defaultcompressionquality/100 != 0){
-			TIFFSetField(output, 
-				TIFFTAG_ZIPQUALITY, 
-				(t2p->pdf_defaultcompressionquality / 100));
-		}
-		break;
-#endif
-	default:
-		break;
-	}
-	
-	output->tif_writeproc=t2p->tiff_writeproc;
-#ifdef JPEG_SUPPORT
-	if(t2p->pdf_compression==T2P_COMPRESS_JPEG && t2p->tiff_photometric==PHOTOMETRIC_YCBCR){
-		bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer,stripsize*stripcount); 
-	} else
-#endif
-	bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer,t2p->tiff_datasize); 
-	if(buffer != NULL){
-		_TIFFfree(buffer);
-		buffer=NULL;
-	}
-
-	if(bufferoffset==(tsize_t)-1){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Error writing encoded strip to output PDF %s", 
-			TIFFFileName(output));
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	
-	written= output->tif_dir.td_stripbytecount[0];
-	
-	return(written);
-}
-
-/*
-	This function reads the raster image data from the input TIFF for an image tile and writes 
-	the data to the output PDF XObject image dictionary stream for the tile.  It returns the 
-	amount written or zero on error.
-*/
-
-tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){
-
-	uint16 edge=0;
-	tsize_t written=0;
-	unsigned char* buffer=NULL;
-	tsize_t bufferoffset=0;
-	unsigned char* samplebuffer=NULL;
-	tsize_t samplebufferoffset=0;
-	tsize_t read=0;
-	uint16 i=0;
-	ttile_t tilecount=0;
-	tsize_t tilesize=0;
-	ttile_t septilecount=0;
-	tsize_t septilesize=0;
-#ifdef JPEG_SUPPORT
-	unsigned char* jpt;
-	uint16 xuint16_1=0;
-	uint16 xuint16_2=0;
-	float* xfloatp;
-	unsigned char table_end[2];
-	uint32 xuint32=0;
-#endif
-
-	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
-	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
-
-	if( (t2p->pdf_transcode == T2P_TRANSCODE_RAW) && ((edge == 0)
-#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
-		|| (t2p->pdf_compression == T2P_COMPRESS_JPEG)
-#endif
-	)
-	){
-#ifdef CCITT_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_G4){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize);
-			if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){
-					TIFFReverseBits(buffer, t2p->tiff_datasize);
-			}
-			TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize);
-			_TIFFfree(buffer);
-			return(t2p->tiff_datasize);
-		}
-#endif
-#ifdef ZIP_SUPPORT
-		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize);
-			if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){
-					TIFFReverseBits(buffer, t2p->tiff_datasize);
-			}
-			TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize);
-			_TIFFfree(buffer);
-			return(t2p->tiff_datasize);
-		}
-#endif
-#ifdef OJPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_OJPEG){
-			if(! t2p->pdf_ojpegdata){
-				TIFFError(TIFF2PDF_MODULE, 
-					"No support for OJPEG image %s with bad tables", 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			_TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength);
-			if(edge!=0){
-				if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile)){
-					buffer[7]=
-						(t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength >> 8) & 0xff;
-					buffer[8]=
-						(t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength ) & 0xff;
-				}
-				if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile)){
-					buffer[9]=
-						(t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth >> 8) & 0xff;
-					buffer[10]=
-						(t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth ) & 0xff;
-				}
-			}
-			bufferoffset=t2p->pdf_ojpegdatalength;
-			bufferoffset+=TIFFReadRawTile(input, 
-					tile, 
-					(tdata_t) &(((unsigned char*)buffer)[bufferoffset]), 
-					-1);
-			((unsigned char*)buffer)[bufferoffset++]=0xff;
-			((unsigned char*)buffer)[bufferoffset++]=0xd9;
-			TIFFWriteFile(output, (tdata_t) buffer, bufferoffset);
-			_TIFFfree(buffer);
-			return(bufferoffset);
-		}
-#endif
-#ifdef JPEG_SUPPORT
-		if(t2p->tiff_compression == COMPRESSION_JPEG){
-			buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint16_1, &jpt) != 0){
-				if(xuint16_1>0){
-					_TIFFmemcpy(buffer, jpt, xuint16_1);
-					bufferoffset+=xuint16_1-2;
-					table_end[0]=buffer[bufferoffset-2];
-					table_end[1]=buffer[bufferoffset-1];
-				}
-			}
-			if(xuint16_1>0){
-			xuint32=bufferoffset;
-			bufferoffset+=TIFFReadRawTile(
-				input, 
-				tile, 
-				(tdata_t) &(((unsigned char*)buffer)[bufferoffset-2]), 
-				-1);
-				buffer[xuint32-2]=table_end[0];
-				buffer[xuint32-1]=table_end[1];
-			} else {
-				bufferoffset+=TIFFReadRawTile(
-					input, 
-					tile, 
-					(tdata_t) &(((unsigned char*)buffer)[bufferoffset]), 
-					-1);
-			}
-			TIFFWriteFile(output, (tdata_t) buffer, bufferoffset);
-			_TIFFfree(buffer);
-			return(bufferoffset);
-		}
-#endif
-		(void)0;
-	}
-
-	if(t2p->pdf_sample==T2P_SAMPLE_NOTHING){
-		buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-		if(buffer==NULL){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-				t2p->tiff_datasize, 
-				TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-
-		read = TIFFReadEncodedTile(
-			input, 
-			tile, 
-			(tdata_t) &buffer[bufferoffset], 
-			t2p->tiff_datasize);
-		if(read==-1){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Error on decoding tile %u of %s", 
-				tile, 
-				TIFFFileName(input));
-			_TIFFfree(buffer);
-			t2p->t2p_error=T2P_ERR_ERROR;
-			return(0);
-		}
-
-	} else {
-
-		if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){
-			septilesize=TIFFTileSize(input);
-			septilecount=TIFFNumberOfTiles(input);
-			tilesize=septilesize*t2p->tiff_samplesperpixel;
-			tilecount=septilecount/t2p->tiff_samplesperpixel;
-			buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			samplebuffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(samplebuffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			samplebufferoffset=0;
-			for(i=0;i<t2p->tiff_samplesperpixel;i++){
-				read = 
-					TIFFReadEncodedTile(input, 
-						tile + i*tilecount, 
-						(tdata_t) &(samplebuffer[samplebufferoffset]), 
-						septilesize);
-				if(read==-1){
-					TIFFError(TIFF2PDF_MODULE, 
-						"Error on decoding tile %u of %s", 
-						tile + i*tilecount, 
-						TIFFFileName(input));
-						_TIFFfree(samplebuffer);
-						_TIFFfree(buffer);
-					t2p->t2p_error=T2P_ERR_ERROR;
-					return(0);
-				}
-				samplebufferoffset+=read;
-			}
-			t2p_sample_planar_separate_to_contig(
-				t2p,
-				&(buffer[bufferoffset]),
-				samplebuffer, 
-				samplebufferoffset); 
-			bufferoffset+=samplebufferoffset;
-			_TIFFfree(samplebuffer);
-		}
-
-		if(buffer==NULL){
-			buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
-			if(buffer==NULL){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image_tile, %s", 
-					t2p->tiff_datasize, 
-					TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-			}
-			read = TIFFReadEncodedTile(
-				input, 
-				tile, 
-				(tdata_t) &buffer[bufferoffset], 
-				t2p->tiff_datasize);
-			if(read==-1){
-				TIFFError(TIFF2PDF_MODULE, 
-					"Error on decoding tile %u of %s", 
-					tile, 
-					TIFFFileName(input));
-				_TIFFfree(buffer);
-				t2p->t2p_error=T2P_ERR_ERROR;
-				return(0);
-			}
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB){
-			t2p->tiff_datasize=t2p_sample_rgba_to_rgb(
-				(tdata_t)buffer, 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth
-				*t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB){
-			t2p->tiff_datasize=t2p_sample_rgbaa_to_rgb(
-				(tdata_t)buffer, 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth
-				*t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB){
-			TIFFError(TIFF2PDF_MODULE, 
-				"No support for YCbCr to RGB in tile for %s", 
-				TIFFFileName(input));
-			_TIFFfree(buffer);
-			t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-
-		if(t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED){
-			t2p->tiff_datasize=t2p_sample_lab_signed_to_unsigned(
-				(tdata_t)buffer, 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth
-				*t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-		}
-	}
-
-	if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) != 0){
-		t2p_tile_collapse_left(
-			buffer, 
-			TIFFTileRowSize(input),
-			t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth,
-			t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-	}
-
-	t2p->tiff_writeproc=output->tif_writeproc;
-	output->tif_writeproc=t2p_empty_writeproc;
-
-	TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric);
-	TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample);
-	TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel);
-	if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0){
-		TIFFSetField(
-			output, 
-			TIFFTAG_IMAGEWIDTH, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
-	} else {
-		TIFFSetField(
-			output, 
-			TIFFTAG_IMAGEWIDTH, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
-	}
-	if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0){
-		TIFFSetField(
-			output, 
-			TIFFTAG_IMAGELENGTH, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-		TIFFSetField(
-			output, 
-			TIFFTAG_ROWSPERSTRIP, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-	} else {
-		TIFFSetField(
-			output, 
-			TIFFTAG_IMAGELENGTH, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-		TIFFSetField(
-			output, 
-			TIFFTAG_ROWSPERSTRIP, 
-			t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-	}
-	TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
-
-	switch(t2p->pdf_compression){
-	case T2P_COMPRESS_NONE:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-		break;
-#ifdef CCITT_SUPPORT
-	case T2P_COMPRESS_G4:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4);
-		break;
-#endif
-#ifdef JPEG_SUPPORT
-	case T2P_COMPRESS_JPEG:
-		if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR){
-			if(TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &xuint16_1, &xuint16_2)!=0){
-				if(xuint16_1 != 0 && xuint16_2 != 0){
-					TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, xuint16_1, xuint16_2);
-				}
-			}
-			if(TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, &xfloatp)!=0){
-				TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp);
-			}
-		}
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG);
-		TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, 0); /* JPEGTABLESMODE_NONE */
-		if(t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)){
-			TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR);
-			if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR){
-				TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-			} else {
-				TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW);
-			}
-		}
-		if(t2p->pdf_colorspace & T2P_CS_GRAY){
-			(void)0;
-		}
-#ifdef CMYK_SUPPORT
-		if(t2p->pdf_colorspace & T2P_CS_CMYK){
-			(void)0;
-		}
-#endif
-		if(t2p->pdf_defaultcompressionquality != 0){
-			TIFFSetField(output, 
-				TIFFTAG_JPEGQUALITY, 
-				t2p->pdf_defaultcompressionquality);
-		}
-		break;
-#endif
-#ifdef ZIP_SUPPORT
-	case T2P_COMPRESS_ZIP:
-		TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
-		if(t2p->pdf_defaultcompressionquality%100 != 0){
-			TIFFSetField(output, 
-				TIFFTAG_PREDICTOR, 
-				t2p->pdf_defaultcompressionquality % 100);
-		}
-		if(t2p->pdf_defaultcompressionquality/100 != 0){
-			TIFFSetField(output, 
-				TIFFTAG_ZIPQUALITY, 
-				(t2p->pdf_defaultcompressionquality / 100));
-		}
-		break;
-#endif
-	default:
-		break;
-	}
-	
-	output->tif_writeproc=t2p->tiff_writeproc;
-	bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t) 0, buffer, TIFFStripSize(output)); 
-	if(buffer != NULL){
-		_TIFFfree(buffer);
-		buffer=NULL;
-	}
-	if(bufferoffset==-1){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Error writing encoded tile to output PDF %s", 
-			TIFFFileName(output));
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	
-	written= output->tif_dir.td_stripbytecount[0];
-	
-	return(written);
-}
-
-#ifdef OJPEG_SUPPORT
-int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){
-	uint16 proc=0;
-	void* q;
-	uint32 q_length=0;
-	void* dc;
-	uint32 dc_length=0;
-	void* ac;
-	uint32 ac_length=0;
-	uint16* lp;
-	uint16* pt;
-	uint16 h_samp=1;
-	uint16 v_samp=1;
-	unsigned char* ojpegdata;
-	uint16 table_count;
-	uint32 offset_table;
-	uint32 offset_ms_l;
-	uint32 code_count;
-	uint32 i=0;
-	uint32 dest=0;
-	uint16 ri=0;
-	uint32 rows=0;
-	
-	if(!TIFFGetField(input, TIFFTAG_JPEGPROC, &proc)){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Missing JPEGProc field in OJPEG image %s", 
-			TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	if(proc!=JPEGPROC_BASELINE && proc!=JPEGPROC_LOSSLESS){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Bad JPEGProc field in OJPEG image %s", 
-			TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	if(!TIFFGetField(input, TIFFTAG_JPEGQTABLES, &q_length, &q)){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Missing JPEGQTables field in OJPEG image %s", 
-			TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	if(q_length < (64 * t2p->tiff_samplesperpixel)){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Bad JPEGQTables field in OJPEG image %s", 
-			TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	} 
-	if(!TIFFGetField(input, TIFFTAG_JPEGDCTABLES, &dc_length, &dc)){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Missing JPEGDCTables field in OJPEG image %s", 
-			TIFFFileName(input));
-			t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	if(proc==JPEGPROC_BASELINE){
-		if(!TIFFGetField(input, TIFFTAG_JPEGACTABLES, &ac_length, &ac)){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Missing JPEGACTables field in OJPEG image %s", 
-				TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-	} else {
-		if(!TIFFGetField(input, TIFFTAG_JPEGLOSSLESSPREDICTORS, &lp)){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Missing JPEGLosslessPredictors field in OJPEG image %s", 
-				TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-				return(0);
-		}
-		if(!TIFFGetField(input, TIFFTAG_JPEGPOINTTRANSFORM, &pt)){
-			TIFFError(TIFF2PDF_MODULE, 
-				"Missing JPEGPointTransform field in OJPEG image %s", 
-				TIFFFileName(input));
-				t2p->t2p_error = T2P_ERR_ERROR;
-			return(0);
-		}
-	}
-	if(!TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp)){
-		h_samp=1;
-		v_samp=1;
-	}
-	if(t2p->pdf_ojpegdata != NULL){
-		_TIFFfree(t2p->pdf_ojpegdata);
-		t2p->pdf_ojpegdata=NULL;
-	} 
-	t2p->pdf_ojpegdata = _TIFFmalloc(2048);
-	if(t2p->pdf_ojpegdata == NULL){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 
-			2048, 
-			TIFFFileName(input));
-		return(0);
-	}
-	_TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048);
-	t2p->pdf_ojpegdatalength = 0;
-	table_count=t2p->tiff_samplesperpixel;
-	if(proc==JPEGPROC_BASELINE){
-		if(table_count>2) table_count=2;
-	}
-	ojpegdata=(unsigned char*)t2p->pdf_ojpegdata;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0xd8;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-	if(proc==JPEGPROC_BASELINE){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xc0;
-	} else {
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xc3;
-	}
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0x00;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=(8 + 3*t2p->tiff_samplesperpixel);
-	ojpegdata[t2p->pdf_ojpegdatalength++]=(t2p->tiff_bitspersample & 0xff);
-	if(TIFFIsTiled(input)){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength >> 8) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength ) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth >> 8) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth ) & 0xff;
-	} else {
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_length >> 8) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_length ) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_width >> 8) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=
-			(t2p->tiff_width ) & 0xff;
-	}
-	ojpegdata[t2p->pdf_ojpegdatalength++]=(t2p->tiff_samplesperpixel & 0xff);
-	for(i=0;i<t2p->tiff_samplesperpixel;i++){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=i;
-		if(i==0){
-			ojpegdata[t2p->pdf_ojpegdatalength] |= h_samp<<4 & 0xf0;;
-			ojpegdata[t2p->pdf_ojpegdatalength++] |= v_samp & 0x0f;
-		} else {
-				ojpegdata[t2p->pdf_ojpegdatalength++]= 0x11;
-		}
-		ojpegdata[t2p->pdf_ojpegdatalength++]=i;
-	}
-	for(dest=0;dest<t2p->tiff_samplesperpixel;dest++){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xdb;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0x00;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0x43;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=dest;
-		_TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength++]), 
-			&(((unsigned char*)q)[64*dest]), 64);
-		t2p->pdf_ojpegdatalength+=64;
-	}
-	offset_table=0;
-	for(dest=0;dest<table_count;dest++){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xc4;
-		offset_ms_l=t2p->pdf_ojpegdatalength;
-		t2p->pdf_ojpegdatalength+=2;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=dest & 0x0f;
-		_TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), 
-			&(((unsigned char*)dc)[offset_table]), 16);
-		code_count=0;
-		offset_table+=16;
-		for(i=0;i<16;i++){
-			code_count+=ojpegdata[t2p->pdf_ojpegdatalength++];
-		}
-		ojpegdata[offset_ms_l]=((19+code_count)>>8) & 0xff;
-		ojpegdata[offset_ms_l+1]=(19+code_count) & 0xff;
-		_TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), 
-			&(((unsigned char*)dc)[offset_table]), code_count);
-		offset_table+=code_count;
-		t2p->pdf_ojpegdatalength+=code_count;
-	}
-	if(proc==JPEGPROC_BASELINE){
-	offset_table=0;
-		for(dest=0;dest<table_count;dest++){
-			ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-			ojpegdata[t2p->pdf_ojpegdatalength++]=0xc4;
-			offset_ms_l=t2p->pdf_ojpegdatalength;
-			t2p->pdf_ojpegdatalength+=2;
-			ojpegdata[t2p->pdf_ojpegdatalength] |= 0x10;
-			ojpegdata[t2p->pdf_ojpegdatalength++] |=dest & 0x0f;
-			_TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), 
-				&(((unsigned char*)ac)[offset_table]), 16);
-			code_count=0;
-			offset_table+=16;
-			for(i=0;i<16;i++){
-				code_count+=ojpegdata[t2p->pdf_ojpegdatalength++];
-			}	
-			ojpegdata[offset_ms_l]=((19+code_count)>>8) & 0xff;
-			ojpegdata[offset_ms_l+1]=(19+code_count) & 0xff;
-			_TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), 
-				&(((unsigned char*)ac)[offset_table]), code_count);
-			offset_table+=code_count;
-			t2p->pdf_ojpegdatalength+=code_count;
-		}
-	}
-	if(TIFFNumberOfStrips(input)>1){
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0xdd;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0x00;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0x04;
-		h_samp*=8;
-		v_samp*=8;
-		ri=(t2p->tiff_width+h_samp-1) / h_samp;
-		TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows);
-		ri*=(rows+v_samp-1)/v_samp;
-		ojpegdata[t2p->pdf_ojpegdatalength++]= (ri>>8) & 0xff;
-		ojpegdata[t2p->pdf_ojpegdatalength++]= ri & 0xff;
-	}
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0xff;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0xda;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=0x00;
-	ojpegdata[t2p->pdf_ojpegdatalength++]=(6 + 2*t2p->tiff_samplesperpixel);
-	ojpegdata[t2p->pdf_ojpegdatalength++]=t2p->tiff_samplesperpixel & 0xff;
-	for(i=0;i<t2p->tiff_samplesperpixel;i++){
-		ojpegdata[t2p->pdf_ojpegdatalength++]= i & 0xff;
-		if(proc==JPEGPROC_BASELINE){
-			ojpegdata[t2p->pdf_ojpegdatalength] |= 
-				( ( (i>(table_count-1)) ? (table_count-1) : i) << 4) & 0xf0;
-			ojpegdata[t2p->pdf_ojpegdatalength++] |= 
-				( (i>(table_count-1)) ? (table_count-1) : i) & 0x0f;
-		} else {
-			ojpegdata[t2p->pdf_ojpegdatalength++] =  (i << 4) & 0xf0;
-		}
-	}
-	if(proc==JPEGPROC_BASELINE){
-		t2p->pdf_ojpegdatalength++;
-		ojpegdata[t2p->pdf_ojpegdatalength++]=0x3f;
-		t2p->pdf_ojpegdatalength++;
-	} else {
-		ojpegdata[t2p->pdf_ojpegdatalength++]= (lp[0] & 0xff);
-		t2p->pdf_ojpegdatalength++;
-		ojpegdata[t2p->pdf_ojpegdatalength++]= (pt[0] & 0x0f);
-	}
-
-	return(1);
-}
-#endif
-
-#ifdef JPEG_SUPPORT
-int t2p_process_jpeg_strip(
-	unsigned char* strip, 
-	tsize_t* striplength, 
-	unsigned char* buffer, 
-	tsize_t* bufferoffset, 
-	tstrip_t no, 
-	uint32 height){
-
-	tsize_t i=0;
-	uint16 ri =0;
-	uint16 v_samp=1;
-	uint16 h_samp=1;
-	int j=0;
-	
-	i++;
-	
-	while(i<(*striplength)){
-		switch( strip[i] ){
-			case 0xd8:
-				i+=2;
-				break;
-			case 0xc0:
-			case 0xc1:
-			case 0xc3:
-			case 0xc9:
-			case 0xca:
-				if(no==0){
-					_TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-					for(j=0;j<buffer[*bufferoffset+9];j++){
-						if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp) 
-							h_samp = (buffer[*bufferoffset+11+(2*j)]>>4);
-						if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp) 
-							v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f);
-					}
-					v_samp*=8;
-					h_samp*=8;
-					ri=((( ((uint16)(buffer[*bufferoffset+5])<<8) | 
-					(uint16)(buffer[*bufferoffset+6]) )+v_samp-1)/ 
-					v_samp);
-					ri*=((( ((uint16)(buffer[*bufferoffset+7])<<8) | 
-					(uint16)(buffer[*bufferoffset+8]) )+h_samp-1)/ 
-					h_samp);
-					buffer[*bufferoffset+5]= (height>>8) & 0xff;
-					buffer[*bufferoffset+6]= height & 0xff;
-					*bufferoffset+=strip[i+2]+2;
-					i+=strip[i+2]+2;
-
-					buffer[(*bufferoffset)++]=0xff;
-					buffer[(*bufferoffset)++]=0xdd;
-					buffer[(*bufferoffset)++]=0x00;
-					buffer[(*bufferoffset)++]=0x04;
-					buffer[(*bufferoffset)++]=(ri >> 8) & 0xff;
-					buffer[(*bufferoffset)++]= ri & 0xff;
-				} else {
-					i+=strip[i+2]+2;
-				}
-				break;
-			case 0xc4:
-			case 0xdb:
-				_TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-				*bufferoffset+=strip[i+2]+2;
-				i+=strip[i+2]+2;
-				break;
-			case 0xda:
-				if(no==0){
-					_TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-					*bufferoffset+=strip[i+2]+2;
-					i+=strip[i+2]+2;
-				} else {
-					buffer[(*bufferoffset)++]=0xff;
-					buffer[(*bufferoffset)++]=0xd0 | ((no-1)%8);
-					i+=strip[i+2]+2;
-				}
-				_TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1);
-				*bufferoffset+=(*striplength)-i-1;
-				return(1);
-			default:
-				i+=strip[i+2]+2;
-		}
-	}
-	
-
-	return(0);
-}
-#endif
-
-/*
-	This functions converts a tilewidth x tilelength buffer of samples into an edgetilewidth x 
-	tilelength buffer of samples.
-*/
-void t2p_tile_collapse_left(
-	tdata_t buffer, 
-	tsize_t scanwidth, 
-	uint32 tilewidth, 
-	uint32 edgetilewidth, 
-	uint32 tilelength){
-	
-	uint32 i=0;
-	tsize_t edgescanwidth=0;
-	
-	edgescanwidth = scanwidth * edgetilewidth / tilewidth;
-	for(i=i;i<tilelength;i++){
-		_TIFFmemcpy( 
-			&(((char*)buffer)[edgescanwidth*i]), 
-			&(((char*)buffer)[scanwidth*i]), 
-			edgescanwidth);
-	}
-	
-	return;
-}
-
-
-/*
-	This function calls TIFFWriteDirectory on the output after blanking its output by replacing the 
-	read, write, and seek procedures with empty implementations, then it replaces the original 
-	implementations.
-*/
-
-void t2p_write_advance_directory(T2P* t2p, TIFF* output){
-
-	t2p->tiff_writeproc=output->tif_writeproc;
-	output->tif_writeproc=t2p_empty_writeproc;
-	t2p->tiff_readproc=output->tif_readproc;
-	output->tif_readproc=t2p_empty_readproc;
-	t2p->tiff_seekproc=output->tif_seekproc;
-	output->tif_seekproc=t2p_empty_seekproc;
-	output->tif_header.tiff_diroff=0;
-	if(!TIFFWriteDirectory(output)){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Error writing virtual directory to output PDF %s", 
-			TIFFFileName(output));
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-	output->tif_writeproc=t2p->tiff_writeproc;
-	output->tif_readproc=t2p->tiff_readproc;
-	output->tif_seekproc=t2p->tiff_seekproc;
-	
-	return;
-}
-
-tsize_t t2p_sample_planar_separate_to_contig(
-											T2P* t2p, 
-											unsigned char* buffer, 
-											unsigned char* samplebuffer, 
-											tsize_t samplebuffersize){
-
-	tsize_t stride=0;
-	tsize_t i=0;
-	tsize_t j=0;
-	
-	stride=samplebuffersize/t2p->tiff_samplesperpixel;
-	for(i=0;i<stride;i++){
-		for(j=0;j<t2p->tiff_samplesperpixel;j++){
-			buffer[i*t2p->tiff_samplesperpixel + j] = samplebuffer[i + j*stride];
-		}
-	}
-
-	return(samplebuffersize);
-}
-
-tsize_t t2p_sample_realize_palette(T2P* t2p, unsigned char* buffer){
-
-	uint32 sample_count=0;
-	uint16 component_count=0;
-	uint32 palette_offset=0;
-	uint32 sample_offset=0;
-	uint32 i=0;
-	uint32 j=0;
-	sample_count=t2p->tiff_width*t2p->tiff_length;
-	component_count=t2p->tiff_samplesperpixel;
-	
-	for(i=sample_count;i>0;i--){
-		palette_offset=buffer[i-1] * component_count;
-		sample_offset= (i-1) * component_count;
-		for(j=0;j<component_count;j++){
-			buffer[sample_offset+j]=t2p->pdf_palette[palette_offset+j];
-		}
-	}
-
-	return(0);
-}
-
-/*
-	This functions converts in place a buffer of ABGR interleaved data into RGB interleaved 
-	data, discarding A.
-*/
-
-tsize_t t2p_sample_abgr_to_rgb(tdata_t data, uint32 samplecount){
-
-	uint32 i=0;
-	uint32 itimes3=0;
-	uint32 sample=0;
-	
-	for(i=0;i<samplecount;i++){
-		sample=((uint32*)data)[i];
-		itimes3=i*3;
-		((char*)data)[i*3]= sample & 0xff;
-		((char*)data)[i*3+1]= (sample>>8) & 0xff;
-		((char*)data)[i*3+2]= (sample>>16) & 0xff;
-	}
-
-	return(i*3);
-}
-
-/*
-	This functions converts in place a buffer of RGBA interleaved data into RGB interleaved 
-	data, discarding A.
-*/
-
-tsize_t t2p_sample_rgba_to_rgb(tdata_t data, uint32 samplecount){
-
-	uint32 i=0;
-	uint32 itimes3=0;
-	uint32 sample=0;
-	
-	for(i=0;i<samplecount;i++){
-		sample=((uint32*)data)[i];
-		itimes3=i*3;
-		((char*)data)[i*3]= (sample>>24) & 0xff;
-		((char*)data)[i*3+1]= (sample>>16) & 0xff;
-		((char*)data)[i*3+2]= (sample>>8) & 0xff;
-	}
-
-	return(i*3);
-}
-
-/*
-	This functions converts in place a buffer of RGBA interleaved data into RGB interleaved 
-	data, adding 255-A to each component sample.
-*/
-
-tsize_t t2p_sample_rgbaa_to_rgb(tdata_t data, uint32 samplecount){
-
-	uint32 i=0;
-	uint32 itimes3=0;
-	uint32 sample=0;
-	unsigned char alpha=0;
-	
-	for(i=0;i<samplecount;i++){
-		sample=((uint32*)data)[i];
-		itimes3=i*3;
-		alpha=((255-(sample & 0xff)));
-		((unsigned char*)data)[i*3]= (sample>>24) & 0xff;
-		((unsigned char*)data)[i*3+1]= (sample>>16) & 0xff;
-		((unsigned char*)data)[i*3+2]= (sample>>8) & 0xff;
-		((unsigned char*)data)[i*3]+=alpha;
-		((unsigned char*)data)[i*3+1]+=alpha;
-		((unsigned char*)data)[i*3+2]+=alpha;
-		
-	}
-
-	return(i*3);
-}
-
-/*
-	This function converts the a and b samples of Lab data from signed to unsigned.
-*/
-
-tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t buffer, uint32 samplecount){
-
-	uint32 i=0;
-
-	for(i=0;i<samplecount;i++){
-		if( (((unsigned char*)buffer)[(i*3)+1] & 0x80) !=0){
-			((unsigned char*)buffer)[(i*3)+1] = (unsigned char)(0x80 + ((char*)buffer)[(i*3)+1]);
-		} else {
-			((unsigned char*)buffer)[(i*3)+1] |= 0x80;
-		}
-		if( (((unsigned char*)buffer)[(i*3)+2] & 0x80) !=0){
-			((unsigned char*)buffer)[(i*3)+2] = (unsigned char)(0x80 + ((char*)buffer)[(i*3)+2]);
-		} else {
-			((unsigned char*)buffer)[(i*3)+2] |= 0x80;
-		}
-	}
-
-	return(samplecount*3);
-}
-
-/* 
-	This function writes the PDF header to output.
-*/
-
-tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-	
-	buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t)"\r%\342\343\317\323\r\n", 8);
-
-	return(written);
-}
-
-/*
-	This function writes the beginning of a PDF object to output.
-*/
-
-tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	buflen=sprintf(buffer, "%lu", number);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen );
-	written += TIFFWriteFile(output, (tdata_t) " 0 obj\r", 7);
-
-	return(written);
-}
-
-/*
-	This function writes the end of a PDF object to output.
-*/
-
-tsize_t t2p_write_pdf_obj_end(TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "endobj\r", 7);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF name object to output.
-*/
-
-tsize_t t2p_write_pdf_name(char* name, TIFF* output){
-
-	tsize_t written=0;
-	uint32 i=0;
-	char buffer[4];
-	uint16 nextchar=0;
-	uint32 namelen=0;
-	
-	namelen=strlen(name);
-	if (namelen>126) {
-		namelen=126;
-	}
-	written += TIFFWriteFile(output, (tdata_t) "/", 1);
-	for (i=0;i<namelen;i++){
-		if ( ((unsigned char)name[i]) < 0x21){
-			sprintf(buffer, "#%.2X", name[i]);
-			written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-			nextchar=1;
-		}
-		if ( ((unsigned char)name[i]) > 0x7E){
-			sprintf(buffer, "#%.2X", name[i]); 
-			written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-			nextchar=1;
-		}
-		if (nextchar==0){
-			switch (name[i]){
-				case 0x23:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x25:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x28:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x29:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x2F:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x3C:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x3E:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x5B:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x5D:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x7B:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				case 0x7D:
-					sprintf(buffer, "#%.2X", name[i]); 
-					written += TIFFWriteFile(output, (tdata_t) buffer, 3);
-					break;
-				default:
-					written += TIFFWriteFile(output, (tdata_t) &name[i], 1);
-			}
-		}
-		nextchar=0;
-	}
-	written += TIFFWriteFile(output, (tdata_t) " ", 1);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF string object to output.
-*/
-	
-tsize_t t2p_write_pdf_string(char* pdfstr, TIFF* output){
-
-	tsize_t written=0;
-	uint32 i=0;
-	char buffer[5];
-	uint32 len=0;
-	
-	len=strlen(pdfstr);
-	written += TIFFWriteFile(output, (tdata_t) "(", 1);
-	for (i=0;i<len;i++){
-		if((pdfstr[i]&0x80) || (pdfstr[i]==127) || (pdfstr[i]<32)){
-			sprintf(buffer, "\\%.3o", pdfstr[i]);
-			written += TIFFWriteFile(output, (tdata_t) buffer, 4);
-		} else {
-			switch (pdfstr[i]){
-				case 0x08:
-					written += TIFFWriteFile(output, (tdata_t) "\\b", 2);
-					break;
-				case 0x09:
-					written += TIFFWriteFile(output, (tdata_t) "\\t", 2);
-					break;
-				case 0x0A:
-					written += TIFFWriteFile(output, (tdata_t) "\\n", 2);
-					break;
-				case 0x0C:
-					written += TIFFWriteFile(output, (tdata_t) "\\f", 2);
-					break;
-				case 0x0D:
-					written += TIFFWriteFile(output, (tdata_t) "\\r", 2);
-					break;
-				case 0x28:
-					written += TIFFWriteFile(output, (tdata_t) "\\(", 2);
-					break;
-				case 0x29:
-					written += TIFFWriteFile(output, (tdata_t) "\\)", 2);
-					break;
-				case 0x5C:
-					written += TIFFWriteFile(output, (tdata_t) "\\\\", 2);
-					break;
-				default:
-					written += TIFFWriteFile(output, (tdata_t) &pdfstr[i], 1);
-			}
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) ") ", 1);
-
-	return(written);
-}
-
-
-/*
-	This function writes a buffer of data to output.
-*/
-
-tsize_t t2p_write_pdf_stream(tdata_t buffer, tsize_t len, TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) buffer, len);
-
-	return(written);
-}
-
-/*
-	This functions writes the beginning of a PDF stream to output.
-*/
-
-tsize_t t2p_write_pdf_stream_start(TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "stream\r\n", 8);
-
-	return(written);
-}
-
-/*
-	This function writes the end of a PDF stream to output. 
-*/
-
-tsize_t t2p_write_pdf_stream_end(TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "\rendstream\r", 11);
-
-	return(written);
-}
-
-/*
-	This function writes a stream dictionary for a PDF stream to output.
-*/
-
-tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
-	
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-	
-	written += TIFFWriteFile(output, (tdata_t) "/Length ", 8);
-	if(len!=0){
-		written += t2p_write_pdf_stream_length(len, output);
-	} else {
-		buflen=sprintf(buffer, "%lu", number);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6);
-	}
-	
-	return(written);
-}
-
-/*
-	This functions writes the beginning of a PDF stream dictionary to output.
-*/
-
-tsize_t t2p_write_pdf_stream_dict_start(TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "<< \r", 4);
-
-	return(written);
-}
-
-/*
-	This function writes the end of a PDF stream dictionary to output. 
-*/
-
-tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){
-
-	tsize_t written=0;
-
-	written += TIFFWriteFile(output, (tdata_t) " >>\r", 4);
-
-	return(written);
-}
-
-/*
-	This function writes a number to output.
-*/
-
-tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	buflen=sprintf(buffer, "%lu", len);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-
-	return(written);
-}
-
-/*
-	This function writes the PDF Catalog structure to output.
-*/
-
-tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	written += TIFFWriteFile(output, 
-		(tdata_t)"<< \r/Type /Catalog \r/Pages ", 
-		27);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_pages);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen );
-	written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6);
-	if(t2p->pdf_fitwindow){
-		written += TIFFWriteFile(output, 
-			(tdata_t) "/ViewerPreferences <</FitWindow true>>\r", 
-			39);
-	}
-	written += TIFFWriteFile(output, (tdata_t)">>\r", 3);
-
-	return(written);
-}
-
-/*
-	This function writes the PDF Info structure to output.
-*/
-
-tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output){
-
-	tsize_t written=0;
-	char* info;
-	char buffer[512];
-	int buflen=0;
-	
-	if(t2p->pdf_datetime==NULL){
-		t2p_pdf_tifftime(t2p, input);
-	}
-	if(strlen(t2p->pdf_datetime) > 0){
-		written += TIFFWriteFile(output, (tdata_t) "<< \r/CreationDate ", 18);
-		written += t2p_write_pdf_string(t2p->pdf_datetime, output);
-		written += TIFFWriteFile(output, (tdata_t) "\r/ModDate ", 10);
-		written += t2p_write_pdf_string(t2p->pdf_datetime, output);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "\r/Producer ", 11);
-	_TIFFmemset((tdata_t)buffer, 0x00, 512);
-	buflen=sprintf(buffer, "libtiff / tiff2pdf - %d / %s", TIFFLIB_VERSION, T2P_VERSION);
-	written += t2p_write_pdf_string(buffer, output);
-	written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-	if(t2p->pdf_creator != NULL){ 
-		if(strlen(t2p->pdf_creator)>0){
-			if(strlen(t2p->pdf_creator)>511){t2p->pdf_creator[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Creator ", 9);
-			written += t2p_write_pdf_string(t2p->pdf_creator, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	} else{
-		if( TIFFGetField(input, TIFFTAG_SOFTWARE, &info) != 0){
-			if(strlen(info)>511){info[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Creator ", 9);
-			written += t2p_write_pdf_string(info, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	}
-	if(t2p->pdf_author != NULL){ 
-		if(strlen(t2p->pdf_author)>0){
-			if(strlen(t2p->pdf_author)>511){t2p->pdf_author[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Author ", 8);
-			written += t2p_write_pdf_string(t2p->pdf_author, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	} else{
-		if( TIFFGetField(input, TIFFTAG_ARTIST, &info) != 0){
-			if(strlen(info)>511){info[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Author ", 8);
-			written += t2p_write_pdf_string(info, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		} else if ( TIFFGetField(input, TIFFTAG_COPYRIGHT, &info) != 0){
-			if(strlen(info)>511){info[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Author ", 8);
-			written += t2p_write_pdf_string(info, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		} 
-	}
-	if(t2p->pdf_title != NULL){
-		if(strlen(t2p->pdf_title)>0){
-			if(strlen(t2p->pdf_title)>511){t2p->pdf_title[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Title ", 7);
-			written += t2p_write_pdf_string(t2p->pdf_title, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	} else{
-		if( TIFFGetField(input, TIFFTAG_DOCUMENTNAME, &info) != 0){
-			if(strlen(info)>511){info[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Title ", 7);
-			written += t2p_write_pdf_string(info, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	}
-	if(t2p->pdf_subject != NULL){
-		if(strlen(t2p->pdf_subject)>0){
-			if(strlen(t2p->pdf_subject)>511){t2p->pdf_subject[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Subject ", 9);
-			written += t2p_write_pdf_string(t2p->pdf_subject, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	} else{
-		if( TIFFGetField(input, TIFFTAG_IMAGEDESCRIPTION, &info) != 0){
-			if(strlen(info)>511){info[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Subject ", 9);
-			written += t2p_write_pdf_string(info, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	}
-	if(t2p->pdf_keywords != NULL){ 
-		if(strlen(t2p->pdf_keywords)>0){
-			if(strlen(t2p->pdf_keywords)>511){t2p->pdf_keywords[512]=(char)0;}
-			written += TIFFWriteFile(output, (tdata_t) "/Keywords ", 10);
-			written += t2p_write_pdf_string(t2p->pdf_keywords, output);
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) ">> \r", 4);	
-
-	return(written);
-}
-
-/*
-	This function fills a string of a T2P struct with the current time as a PDF date string, 
-	it is called by t2p_pdf_tifftime.
-*/
-
-void t2p_pdf_currenttime(T2P* t2p){
-
-	struct tm* currenttime;
-	time_t timenow;
-
-	timenow=time(0);
-	currenttime=localtime(&timenow);
-	sprintf(t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d",
-		(currenttime->tm_year+1900) % 65536, 
-		(currenttime->tm_mon+1) % 256, 
-		(currenttime->tm_mday) % 256, 
-		(currenttime->tm_hour) % 256, 
-		(currenttime->tm_min) % 256, 
-		(currenttime->tm_sec) % 256);
-
-	return;
-}
-
-/*
-	This function fills a string of a T2P struct with the date and time of a TIFF file if it 
-	exists or the current time as a PDF date string.
-*/
-
-void t2p_pdf_tifftime(T2P* t2p, TIFF* input){
-
-	char* datetime;
-
-	t2p->pdf_datetime= (char*) _TIFFmalloc(19);
-	if(t2p->pdf_datetime==NULL){
-		TIFFError(TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_pdf_tiff_time", 
-			17); 
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return;
-	}
-	t2p->pdf_datetime[16]=0;
-	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
-	&& (strlen(datetime) >= 19) ){
-		t2p->pdf_datetime[0]='D';
-		t2p->pdf_datetime[1]=':';
-		t2p->pdf_datetime[2]=datetime[0];
-		t2p->pdf_datetime[3]=datetime[1];
-		t2p->pdf_datetime[4]=datetime[2];
-		t2p->pdf_datetime[5]=datetime[3];
-		t2p->pdf_datetime[6]=datetime[5];
-		t2p->pdf_datetime[7]=datetime[6];
-		t2p->pdf_datetime[8]=datetime[8];
-		t2p->pdf_datetime[9]=datetime[9];
-		t2p->pdf_datetime[10]=datetime[11];
-		t2p->pdf_datetime[11]=datetime[12];
-		t2p->pdf_datetime[12]=datetime[14];
-		t2p->pdf_datetime[13]=datetime[15];
-		t2p->pdf_datetime[14]=datetime[17];
-		t2p->pdf_datetime[15]=datetime[18];
-	} else {
-		t2p_pdf_currenttime(t2p);
-	}
-
-	return;
-}
-
-/*
-	This function writes a PDF Pages Tree structure to output.
-*/
-
-tsize_t t2p_write_pdf_pages(T2P* t2p, 
-							TIFF* output){
-
-	tsize_t written=0;
-	tdir_t i=0;
-	char buffer[16];
-	int buflen=0;
-
-	int page=0;
-	written += TIFFWriteFile(output, 
-		(tdata_t) "<< \r/Type /Pages \r/Kids [ ", 
-		26);
-	page = t2p->pdf_pages+1;
-	for (i=0;i<t2p->tiff_pagecount;i++){
-		buflen=sprintf(buffer, "%d", page);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		if ( ((i+1)%8)==0 ) {
-			written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-		}
-		page +=3;
-		page += t2p->tiff_pages[i].page_extra;
-		if(t2p->tiff_pages[i].page_tilecount>0){
-			page += (2 * t2p->tiff_pages[i].page_tilecount);
-		} else {
-			page +=2;
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) "] \r/Count ", 10);
-	_TIFFmemset(buffer, 0x00, 16);
-	buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " \r>> \r", 6);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF Page structure to output.
-*/
-
-tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
-
-	int i=0;
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-	
-	written += TIFFWriteFile(output, (tdata_t) "<<\r/Type /Page \r/Parent ", 24);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_pages);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6);
-	written += TIFFWriteFile(output, (tdata_t) "/MediaBox [", 11); 
-	buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " ", 1); 
-	buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " ", 1); 
-	buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " ", 1); 
-	buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "] \r", 3); 
-	written += TIFFWriteFile(output, (tdata_t) "/Contents ", 10);
-	buflen=sprintf(buffer, "%lu", object+1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6);
-	written += TIFFWriteFile(output, (tdata_t) "/Resources << \r", 15);
-	if( t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount != 0 ){
-		written += TIFFWriteFile(output, (tdata_t) "/XObject <<\r", 12);
-		for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
-			written += TIFFWriteFile(output, (tdata_t) "/Im", 3);
-			buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) "_", 1);
-			buflen = sprintf(buffer, "%u", i+1);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) " ", 1);
-			buflen = sprintf(
-				buffer, 
-				"%lu", 
-				object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra); 
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-			if(i%4==3){
-				written += TIFFWriteFile(output, (tdata_t) "\r", 1);
-			}
-		}
-		written += TIFFWriteFile(output, (tdata_t) ">>\r", 3);
-	} else {
-			written += TIFFWriteFile(output, (tdata_t) "/XObject <<\r", 12);
-			written += TIFFWriteFile(output, (tdata_t) "/Im", 3);
-			buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) " ", 1);
-			buflen = sprintf(
-				buffer, 
-				"%lu", 
-				object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra); 
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		written += TIFFWriteFile(output, (tdata_t) ">>\r", 3);
-	}
-	if(t2p->tiff_transferfunctioncount !=0){
-		written += TIFFWriteFile(output, (tdata_t) "/ExtGState <<", 13);
-		TIFFWriteFile(output, (tdata_t) "/GS1 ", 5);
-		buflen = sprintf(
-			buffer, 
-			"%lu", 
-			object+3); 
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		written += TIFFWriteFile(output, (tdata_t) ">> \r", 4);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "/ProcSet [ ", 11);
-	if(t2p->pdf_colorspace == T2P_CS_BILEVEL 
-		|| t2p->pdf_colorspace == T2P_CS_GRAY
-		){
-		written += TIFFWriteFile(output, (tdata_t) "/ImageB ", 8);
-	} else {
-		written += TIFFWriteFile(output, (tdata_t) "/ImageC ", 8);
-		if(t2p->pdf_colorspace & T2P_CS_PALETTE){
-			written += TIFFWriteFile(output, (tdata_t) "/ImageI ", 8);
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) "]\r>>\r>>\r", 8);
-
-	return(written);
-}
-
-/*
-	This function composes the page size and image and tile locations on a page.
-*/
-
-void t2p_compose_pdf_page(T2P* t2p){
-
-	uint32 i=0;
-	uint32 i2=0;
-	T2P_TILE* tiles=NULL;
-	T2P_BOX* boxp=NULL;
-	uint32 tilecountx=0;
-	uint32 tilecounty=0;
-	uint32 tilewidth=0;
-	uint32 tilelength=0;
-	int istiled=0;
-	float f=0;
-	
-	t2p->pdf_xres = t2p->tiff_xres;
-	t2p->pdf_yres = t2p->tiff_yres;
-	if(t2p->pdf_overrideres){
-		t2p->pdf_xres = t2p->pdf_defaultxres;
-		t2p->pdf_yres = t2p->pdf_defaultyres;
-	}
-	if(t2p->pdf_xres==0.0){
-		t2p->pdf_xres = t2p->pdf_defaultxres;
-	}
-	if(t2p->pdf_yres==0.0){
-		t2p->pdf_yres = t2p->pdf_defaultyres;
-	}
-	t2p->pdf_imagewidth=((float)(t2p->tiff_width)) *72.0 / t2p->pdf_xres;
-	t2p->pdf_imagelength=((float)(t2p->tiff_length)) *72.0 / t2p->pdf_yres;
-	if(t2p->pdf_overridepagesize != 0){
-		t2p->pdf_pagewidth = t2p->pdf_defaultpagewidth;
-		t2p->pdf_pagelength = t2p->pdf_defaultpagelength;
-	} else {
-		t2p->pdf_pagewidth = t2p->pdf_imagewidth;
-		t2p->pdf_pagelength = t2p->pdf_imagelength;
-	}
-	t2p->pdf_mediabox.x1=0.0;
-	t2p->pdf_mediabox.y1=0.0;
-	t2p->pdf_mediabox.x2=t2p->pdf_pagewidth;
-	t2p->pdf_mediabox.y2=t2p->pdf_pagelength;
-	t2p->pdf_imagebox.x1=0.0;
-	t2p->pdf_imagebox.y1=0.0;
-	t2p->pdf_imagebox.x2=t2p->pdf_imagewidth;
-	t2p->pdf_imagebox.y2=t2p->pdf_imagelength;
-	if(t2p->pdf_overridepagesize!=0){
-		t2p->pdf_imagebox.x1+=((t2p->pdf_pagewidth-t2p->pdf_imagewidth)/2.0);
-		t2p->pdf_imagebox.y1+=((t2p->pdf_pagelength-t2p->pdf_imagelength)/2.0);
-		t2p->pdf_imagebox.x2+=((t2p->pdf_pagewidth-t2p->pdf_imagewidth)/2.0);
-		t2p->pdf_imagebox.y2+=((t2p->pdf_pagelength-t2p->pdf_imagelength)/2.0);
-	}
-	if(t2p->tiff_orientation > 4){
-		f=t2p->pdf_mediabox.x2;
-		t2p->pdf_mediabox.x2=t2p->pdf_mediabox.y2;
-		t2p->pdf_mediabox.y2=f;
-	}
-	istiled=((t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount==0) ? 0 : 1;
-	if(istiled==0){
-		t2p_compose_pdf_page_orient(&(t2p->pdf_imagebox), t2p->tiff_orientation);
-		return;
-	} else {
-		tilewidth=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilewidth;
-		tilelength=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilelength;
-		tilecountx=(t2p->tiff_width + 
-			tilewidth -1)/ 
-			tilewidth;
-		(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecountx=tilecountx;
-		tilecounty=(t2p->tiff_length + 
-			tilelength -1)/ 
-			tilelength;
-		(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecounty=tilecounty;
-		(t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilewidth=
-			t2p->tiff_width % tilewidth;
-		(t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilelength=
-			t2p->tiff_length % tilelength;
-		tiles=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tiles;
-		for(i2=0;i2<tilecounty-1;i2++){
-			for(i=0;i<tilecountx-1;i++){
-				boxp=&(tiles[i2*tilecountx+i].tile_box);
-				boxp->x1 = 
-					t2p->pdf_imagebox.x1 
-					+ ((float)(t2p->pdf_imagewidth * i * tilewidth)
-					/ (float)t2p->tiff_width);
-				boxp->x2 = 
-					t2p->pdf_imagebox.x1 
-					+ ((float)(t2p->pdf_imagewidth * (i+1) * tilewidth)
-					/ (float)t2p->tiff_width);
-				boxp->y1 = 
-					t2p->pdf_imagebox.y2 
-					- ((float)(t2p->pdf_imagelength * (i2+1) * tilelength)
-					/ (float)t2p->tiff_length);
-				boxp->y2 = 
-					t2p->pdf_imagebox.y2 
-					- ((float)(t2p->pdf_imagelength * i2 * tilelength)
-					/ (float)t2p->tiff_length);
-			}
-			boxp=&(tiles[i2*tilecountx+i].tile_box);
-			boxp->x1 = 
-				t2p->pdf_imagebox.x1 
-				+ ((float)(t2p->pdf_imagewidth * i * tilewidth)
-				/ (float)t2p->tiff_width);
-			boxp->x2 = t2p->pdf_imagebox.x2;
-			boxp->y1 = 
-				t2p->pdf_imagebox.y2 
-				- ((float)(t2p->pdf_imagelength * (i2+1) * tilelength)
-				/ (float)t2p->tiff_length);
-			boxp->y2 = 
-				t2p->pdf_imagebox.y2 
-				- ((float)(t2p->pdf_imagelength * i2 * tilelength)
-				/ (float)t2p->tiff_length);
-		}
-		for(i=0;i<tilecountx-1;i++){
-			boxp=&(tiles[i2*tilecountx+i].tile_box);
-			boxp->x1 = 
-				t2p->pdf_imagebox.x1 
-				+ ((float)(t2p->pdf_imagewidth * i * tilewidth)
-				/ (float)t2p->tiff_width);
-			boxp->x2 = 
-				t2p->pdf_imagebox.x1 
-				+ ((float)(t2p->pdf_imagewidth * (i+1) * tilewidth)
-				/ (float)t2p->tiff_width);
-			boxp->y1 = t2p->pdf_imagebox.y1;
-			boxp->y2 = 
-				t2p->pdf_imagebox.y2 
-				- ((float)(t2p->pdf_imagelength * i2 * tilelength)
-				/ (float)t2p->tiff_length);
-		}
-		boxp=&(tiles[i2*tilecountx+i].tile_box);
-		boxp->x1 = 
-			t2p->pdf_imagebox.x1 
-			+ ((float)(t2p->pdf_imagewidth * i * tilewidth)
-			/ (float)t2p->tiff_width);
-		boxp->x2 = t2p->pdf_imagebox.x2;
-		boxp->y1 = t2p->pdf_imagebox.y1;
-		boxp->y2 = 
-			t2p->pdf_imagebox.y2 
-			- ((float)(t2p->pdf_imagelength * i2 * tilelength)
-			/ (float)t2p->tiff_length);
-	}
-	if(t2p->tiff_orientation==0 || t2p->tiff_orientation==1){
-		for(i=0;i<(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount;i++){
-			t2p_compose_pdf_page_orient( &(tiles[i].tile_box) , 0);
-		}
-		return;
-	}
-	for(i=0;i<(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount;i++){
-		boxp=&(tiles[i].tile_box);
-		boxp->x1 -= t2p->pdf_imagebox.x1;
-		boxp->x2 -= t2p->pdf_imagebox.x1;
-		boxp->y1 -= t2p->pdf_imagebox.y1;
-		boxp->y2 -= t2p->pdf_imagebox.y1;
-		if(t2p->tiff_orientation==2 || t2p->tiff_orientation==3){
-			boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1;
-			boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2;
-		}
-		if(t2p->tiff_orientation==3 || t2p->tiff_orientation==4){
-			boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1;
-			boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2;
-		}
-		if(t2p->tiff_orientation==8 || t2p->tiff_orientation==5){
-			boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1;
-			boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2;
-		}
-		if(t2p->tiff_orientation==5 || t2p->tiff_orientation==6){
-			boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1;
-			boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2;
-		}
-		if(t2p->tiff_orientation > 4){
-			f=boxp->x1;
-			boxp->x1 = boxp->y1;
-			boxp->y1 = f;
-			f=boxp->x2;
-			boxp->x2 = boxp->y2;
-			boxp->y2 = f; 
-			t2p_compose_pdf_page_orient_flip(boxp, t2p->tiff_orientation);
-		} else {
-			t2p_compose_pdf_page_orient(boxp, t2p->tiff_orientation);
-		}
-		
-	}
-
-	return;
-}
-
-void t2p_compose_pdf_page_orient(T2P_BOX* boxp, uint16 orientation){
-
-	float m1[9];
-	float f=0.0;
-	
-	if( boxp->x1 > boxp->x2){
-		f=boxp->x1;
-		boxp->x1=boxp->x2;
-		boxp->x2 = f;
-	}
-	if( boxp->y1 > boxp->y2){
-		f=boxp->y1;
-		boxp->y1=boxp->y2;
-		boxp->y2 = f;
-	}
-	boxp->mat[0]=m1[0]=boxp->x2-boxp->x1;
-	boxp->mat[1]=m1[1]=0.0;
-	boxp->mat[2]=m1[2]=0.0;
-	boxp->mat[3]=m1[3]=0.0;
-	boxp->mat[4]=m1[4]=boxp->y2-boxp->y1;
-	boxp->mat[5]=m1[5]=0.0;
-	boxp->mat[6]=m1[6]=boxp->x1;
-	boxp->mat[7]=m1[7]=boxp->y1;
-	boxp->mat[8]=m1[8]=1.0;
-	switch(orientation){
-		case 0:
-		case 1:
-			break;
-		case 2:
-			boxp->mat[0]=0.0-m1[0];
-			boxp->mat[6]+=m1[0];
-			break;
-		case 3:
-			boxp->mat[0]=0.0-m1[0];
-			boxp->mat[4]=0.0-m1[4];
-			boxp->mat[6]+=m1[0];
-			boxp->mat[7]+=m1[4];
-			break;
-		case 4:
-			boxp->mat[4]=0.0-m1[4];
-			boxp->mat[7]+=m1[4];
-			break;
-		case 5:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=0.0-m1[0];
-			boxp->mat[3]=0.0-m1[4];
-			boxp->mat[4]=0.0;
-			boxp->mat[6]+=m1[4];
-			boxp->mat[7]+=m1[0];
-			break;
-		case 6:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=0.0-m1[0];
-			boxp->mat[3]=m1[4];
-			boxp->mat[4]=0.0;
-			boxp->mat[7]+=m1[0];
-			break;
-		case 7:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=m1[0];
-			boxp->mat[3]=m1[4];
-			boxp->mat[4]=0.0;
-			break;
-		case 8:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=m1[0];
-			boxp->mat[3]=0.0-m1[4];
-			boxp->mat[4]=0.0;
-			boxp->mat[6]+=m1[4];
-			break;
-	}
-
-	return;
-}
-
-void t2p_compose_pdf_page_orient_flip(T2P_BOX* boxp, uint16 orientation){
-
-	float m1[9];
-	float f=0.0;
-	
-	if( boxp->x1 > boxp->x2){
-		f=boxp->x1;
-		boxp->x1=boxp->x2;
-		boxp->x2 = f;
-	}
-	if( boxp->y1 > boxp->y2){
-		f=boxp->y1;
-		boxp->y1=boxp->y2;
-		boxp->y2 = f;
-	}
-	boxp->mat[0]=m1[0]=boxp->x2-boxp->x1;
-	boxp->mat[1]=m1[1]=0.0;
-	boxp->mat[2]=m1[2]=0.0;
-	boxp->mat[3]=m1[3]=0.0;
-	boxp->mat[4]=m1[4]=boxp->y2-boxp->y1;
-	boxp->mat[5]=m1[5]=0.0;
-	boxp->mat[6]=m1[6]=boxp->x1;
-	boxp->mat[7]=m1[7]=boxp->y1;
-	boxp->mat[8]=m1[8]=1.0;
-	switch(orientation){
-		case 5:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=0.0-m1[4];
-			boxp->mat[3]=0.0-m1[0];
-			boxp->mat[4]=0.0;
-			boxp->mat[6]+=m1[0];
-			boxp->mat[7]+=m1[4];
-			break;
-		case 6:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=0.0-m1[4];
-			boxp->mat[3]=m1[0];
-			boxp->mat[4]=0.0;
-			boxp->mat[7]+=m1[4];
-			break;
-		case 7:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=m1[4];
-			boxp->mat[3]=m1[0];
-			boxp->mat[4]=0.0;
-			break;
-		case 8:
-			boxp->mat[0]=0.0;
-			boxp->mat[1]=m1[4];
-			boxp->mat[3]=0.0-m1[0];
-			boxp->mat[4]=0.0;
-			boxp->mat[6]+=m1[0];
-			break;
-	}
-
-	return;
-}
-
-/*
-	This function writes a PDF Contents stream to output.
-*/
-
-tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	ttile_t i=0;
-	char buffer[512];
-	int buflen=0;
-	T2P_BOX box;
-	
-	if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ 
-		for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
-			box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
-			buflen=sprintf(buffer, 
-				"q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\r", 
-				t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
-				box.mat[0],
-				box.mat[1],
-				box.mat[3],
-				box.mat[4],
-				box.mat[6],
-				box.mat[7],
-				t2p->pdf_page+1, 
-				i+1);
-			written += t2p_write_pdf_stream(buffer, buflen, output);
-		}
-	} else {
-		box=t2p->pdf_imagebox;
-		buflen=sprintf(buffer, 
-			"q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\r", 
-			t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
-			box.mat[0],
-			box.mat[1],
-			box.mat[3],
-			box.mat[4],
-			box.mat[6],
-			box.mat[7],
-			t2p->pdf_page+1);
-		written += t2p_write_pdf_stream(buffer, buflen, output);
-	}
-
-	return(written);
-}
-
-/*
-	This function writes a PDF Image XObject stream dictionary to output. 
-*/
-
-tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, 
-												T2P* t2p, 
-												TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); 
-	written += TIFFWriteFile(output, 
-		(tdata_t) "/Type /XObject \r/Subtype /Image \r/Name /Im", 
-		42);
-	buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	if(tile != 0){
-		written += TIFFWriteFile(output, (tdata_t) "_", 1);
-		buflen=sprintf(buffer, "%lu", tile);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "\r/Width ", 8);
-	_TIFFmemset((tdata_t)buffer, 0x00, 16);
-	if(tile==0){
-		buflen=sprintf(buffer, "%lu", t2p->tiff_width);
-	} else {
-		if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
-			buflen=sprintf(
-				buffer, 
-				"%lu", 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
-		} else {
-			buflen=sprintf(
-				buffer, 
-				"%lu", 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "\r/Height ", 9);
-	_TIFFmemset((tdata_t)buffer, 0x00, 16);
-	if(tile==0){
-		buflen=sprintf(buffer, "%lu", t2p->tiff_length);
-	} else {
-		if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
-			buflen=sprintf(
-				buffer, 
-				"%lu", 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-		} else {
-			buflen=sprintf(
-				buffer, 
-				"%lu", 
-				t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-		}
-	}
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "\r/BitsPerComponent ", 19);
-	_TIFFmemset((tdata_t)buffer, 0x00, 16);
-	buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "\r/ColorSpace ", 13);
-	written += t2p_write_pdf_xobject_cs(t2p, output);
-	if( (t2p->pdf_switchdecode != 0)
-#ifdef CCITT_SUPPORT
-		&& ! (t2p->pdf_colorspace == T2P_CS_BILEVEL 
-		&& t2p->pdf_compression == T2P_COMPRESS_G4)
-#endif
-		){
-		written += t2p_write_pdf_xobject_decode(t2p, output);
-	}
-	written += t2p_write_pdf_xobject_stream_filter(tile, t2p, output);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF Image XObject Colorspace name to output.
-*/
-
-tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[128];
-	int buflen=0;
-
-	float X_W=1.0;
-	float Y_W=1.0;
-	float Z_W=1.0;
-	
-#ifdef ICC_SUPPORT
-	if( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){
-		written += t2p_write_pdf_xobject_icccs(t2p, output);
-		return(written);
-	}
-#endif
-	if( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){
-		written += TIFFWriteFile(output, (tdata_t) "[ /Indexed ", 11);
-		t2p->pdf_colorspace ^= T2P_CS_PALETTE;
-		written += t2p_write_pdf_xobject_cs(t2p, output);
-		t2p->pdf_colorspace |= T2P_CS_PALETTE;
-		buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " ", 1);
-		_TIFFmemset(buffer, 0x00, 16);
-		buflen=sprintf(buffer, "%lu", t2p->pdf_palettecs ); 
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ]\r", 7);
-		return(written);
-	}
-	if(t2p->pdf_colorspace & T2P_CS_BILEVEL){
-			written += TIFFWriteFile(output, (tdata_t) "/DeviceGray \r", 13);
-	}
-	if(t2p->pdf_colorspace & T2P_CS_GRAY){
-#ifdef COLORIMETRY_SUPPORT
-			if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
-				written += t2p_write_pdf_xobject_calcs(t2p, output);
-			} else {
-#endif
-				written += TIFFWriteFile(output, (tdata_t) "/DeviceGray \r", 13);
-#ifdef COLORIMETRY_SUPPORT
-			}
-#endif
-	}
-	if(t2p->pdf_colorspace & T2P_CS_RGB){
-#ifdef COLORIMETRY_SUPPORT	
-			if(t2p->pdf_colorspace & T2P_CS_CALRGB){
-				written += t2p_write_pdf_xobject_calcs(t2p, output);
-			} else {
-#endif
-				written += TIFFWriteFile(output, (tdata_t) "/DeviceRGB \r", 12);
-#ifdef COLORIMETRY_SUPPORT
-			}
-#endif
-	}
-#ifdef CMYK_SUPPORT
-	if(t2p->pdf_colorspace & T2P_CS_CMYK){
-			written += TIFFWriteFile(output, (tdata_t) "/DeviceCMYK \r", 13);
-	}
-#endif
-	if(t2p->pdf_colorspace & T2P_CS_LAB){
-			written += TIFFWriteFile(output, (tdata_t) "[/Lab << \r", 10);
-			written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12);
-#ifdef COLORIMETRY_SUPPORT
-			X_W = t2p->tiff_whitechromaticities[0];
-			Y_W = t2p->tiff_whitechromaticities[1];
-			Z_W = 1.0 - (X_W + Y_W);
-			X_W /= Y_W;
-			Z_W /= Y_W;
-			Y_W = 1.0;
-			buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-#endif
-#ifndef COLORIMETRY_SUPPORT
-			X_W = 0.3457;// 0.3127; // D50, commented D65
-			Y_W = 0.3585;//0.3290;
-			Z_W = 1.0 - (X_W + Y_W);
-			X_W /= Y_W;
-			Z_W /= Y_W;
-			Y_W = 1.0;
-			buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-#endif
-			written += TIFFWriteFile(output, (tdata_t) "/Range ", 7);
-			buflen=sprintf(buffer, "[%d %d %d %d] \r", 
-				t2p->pdf_labrange[0], 
-				t2p->pdf_labrange[1], 
-				t2p->pdf_labrange[2], 
-				t2p->pdf_labrange[3]);
-			written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			written += TIFFWriteFile(output, (tdata_t) ">>] \r", 5);
-			
-	}
-	
-	return(written);
-}
-
-#ifdef COLORIMETRY_SUPPORT
-
-tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "<< /Type /ExtGState \r/TR ", 25);
-	if(t2p->tiff_transferfunctioncount==1){
-		buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+1);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-	} else {
-		written += TIFFWriteFile(output, (tdata_t) "[ ", 2);
-		buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+1);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+2);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+3);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5);
-		written += TIFFWriteFile(output, (tdata_t) "/Identity ] ", 12);
-	}
-
-	written += TIFFWriteFile(output, (tdata_t) " >> \r", 5);
-
-	return(written);
-}
-
-tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){
-
-	tsize_t written=0;
-	char buffer[32];
-	int buflen=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "/FunctionType 0 \r", 17);
-	written += TIFFWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \r", 19);
-	written += TIFFWriteFile(output, (tdata_t) "/Range [0.0 1.0] \r", 18);
-	buflen=sprintf(buffer, "/Size [%u] \r", (1<<t2p->tiff_bitspersample));
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "/BitsPerSample 16 \r", 19);
-	written += t2p_write_pdf_stream_dict(1<<(t2p->tiff_bitspersample+1), 0, output);
-
-	return(written);
-}
-
-tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){
-
-	tsize_t written=0;
-
-	written += t2p_write_pdf_stream(
-		t2p->tiff_transferfunction[i], 
-		(1<<(t2p->tiff_bitspersample+1)), 
-		output);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF Image XObject Colorspace array to output.
-*/
-
-tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[128];
-	int buflen=0;
-	
-	float X_W=0.0;
-	float Y_W=0.0;
-	float Z_W=0.0;
-	float X_R=0.0;
-	float Y_R=0.0;
-	float Z_R=0.0;
-	float X_G=0.0;
-	float Y_G=0.0;
-	float Z_G=0.0;
-	float X_B=0.0;
-	float Y_B=0.0;
-	float Z_B=0.0;
-	float x_w=0.0;
-	float y_w=0.0;
-	float z_w=0.0;
-	float x_r=0.0;
-	float y_r=0.0;
-	float x_g=0.0;
-	float y_g=0.0;
-	float x_b=0.0;
-	float y_b=0.0;
-	float R=1.0;
-	float G=1.0;
-	float B=1.0;
-	
-	written += TIFFWriteFile(output, (tdata_t) "[", 1);
-	if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
-		written += TIFFWriteFile(output, (tdata_t) "/CalGray ", 9);
-		X_W = t2p->tiff_whitechromaticities[0];
-		Y_W = t2p->tiff_whitechromaticities[1];
-		Z_W = 1.0 - (X_W + Y_W);
-		X_W /= Y_W;
-		Z_W /= Y_W;
-		Y_W = 1.0;
-	}
-	if(t2p->pdf_colorspace & T2P_CS_CALRGB){
-		written += TIFFWriteFile(output, (tdata_t) "/CalRGB ", 8);
-		x_w = t2p->tiff_whitechromaticities[0];
-		y_w = t2p->tiff_whitechromaticities[1];
-		x_r = t2p->tiff_primarychromaticities[0];
-		y_r = t2p->tiff_primarychromaticities[1];
-		x_g = t2p->tiff_primarychromaticities[2];
-		y_g = t2p->tiff_primarychromaticities[3];
-		x_b = t2p->tiff_primarychromaticities[4];
-		y_b = t2p->tiff_primarychromaticities[5];
-		z_w = y_w * ((x_g - x_b)*y_r - (x_r-x_b)*y_g + (x_r-x_g)*y_b);
-		Y_R = (y_r/R) * ((x_g-x_b)*y_w - (x_w-x_b)*y_g + (x_w-x_g)*y_b) / z_w;
-		X_R = Y_R * x_r / y_r;
-		Z_R = Y_R * (((1-x_r)/y_r)-1);
-		Y_G = ((0.0-(y_g))/G) * ((x_r-x_b)*y_w - (x_w-x_b)*y_r + (x_w-x_r)*y_b) / z_w;
-		X_G = Y_G * x_g / y_g;
-		Z_G = Y_G * (((1-x_g)/y_g)-1);
-		Y_B = (y_b/B) * ((x_r-x_g)*y_w - (x_w-x_g)*y_r + (x_w-x_r)*y_g) / z_w;
-		X_B = Y_B * x_b / y_b;
-		Z_B = Y_B * (((1-x_b)/y_b)-1);
-		X_W = (X_R * R) + (X_G * G) + (X_B * B);
-		Y_W = (Y_R * R) + (Y_G * G) + (Y_B * B);
-		Z_W = (Z_R * R) + (Z_G * G) + (Z_B * B);
-		X_W /= Y_W;
-		Z_W /= Y_W;
-		Y_W = 1.0;
-	}
-	written += TIFFWriteFile(output, (tdata_t) "<< \r", 4);
-	if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
-		written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12);
-		buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) "/Gamma 2.2 \r", 12);
-	}
-	if(t2p->pdf_colorspace & T2P_CS_CALRGB){
-		written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12);
-		buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W);
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) "/Matrix ", 8);
-		buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \r", 
-			X_R, Y_R, Z_R, 
-			X_G, Y_G, Z_G, 
-			X_B, Y_B, Z_B); 
-		written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-		written += TIFFWriteFile(output, (tdata_t) "/Gamma [2.2 2.2 2.2] \r", 22);
-	}
-	written += TIFFWriteFile(output, (tdata_t) ">>] \r", 5);
-
-	return(written);
-}
-#endif
-
-#ifdef ICC_SUPPORT
-/*
-	This function writes a PDF Image XObject Colorspace array to output.
-*/
-
-tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-	
-	written += TIFFWriteFile(output, (tdata_t) "[/ICCBased ", 11);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_icccs);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " 0 R] \r", 7);
-
-	return(written);
-}
-
-tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-	
-	written += TIFFWriteFile(output, (tdata_t) "/N ", 3);
-	buflen=sprintf(buffer, "%u \r", t2p->tiff_samplesperpixel);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) "/Alternate ", 11);
-	t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
-	written += t2p_write_pdf_xobject_cs(t2p, output);
-	t2p->pdf_colorspace |= T2P_CS_ICCBASED;
-	written += t2p_write_pdf_stream_dict(t2p->tiff_iccprofilelength, 0, output);
-	
-	return(written);
-}
-
-tsize_t t2p_write_pdf_xobject_icccs_stream(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-
-	written += t2p_write_pdf_stream(
-				(tdata_t) t2p->tiff_iccprofile, 
-				(tsize_t) t2p->tiff_iccprofilelength, 
-				output);
-	
-	return(written);
-}
-#endif
-
-/*
-	This function writes a palette stream for an indexed color space to output.
-*/
-
-tsize_t t2p_write_pdf_xobject_palettecs_stream(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-
-	written += t2p_write_pdf_stream(
-				(tdata_t) t2p->pdf_palette, 
-				(tsize_t) t2p->pdf_palettesize, 
-				output);
-	
-	return(written);
-}
-
-/*
-	This function writes a PDF Image XObject Decode array to output.
-*/
-
-tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	int i=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "/Decode [ ", 10);
-	for (i=0;i<t2p->tiff_samplesperpixel;i++){
-		written += TIFFWriteFile(output, (tdata_t) "1 0 ", 4);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "]\r", 2);
-
-	return(written);
-}
-
-/*
-	This function writes a PDF Image XObject stream filter name and parameters to 
-	output.
-*/
-
-tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[16];
-	int buflen=0;
-
-	if(t2p->pdf_compression==T2P_COMPRESS_NONE){
-		return(written);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "/Filter ", 8);
-	switch(t2p->pdf_compression){
-#ifdef CCITT_SUPPORT
-		case T2P_COMPRESS_G4:
-			written += TIFFWriteFile(output, (tdata_t) "/CCITTFaxDecode ", 16);
-			written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13);
-			written += TIFFWriteFile(output, (tdata_t) "<< /K -1 ", 9);
-			if(tile==0){
-				written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9);
-				buflen=sprintf(buffer, "%lu", t2p->tiff_width);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7);
-				buflen=sprintf(buffer, "%lu", t2p->tiff_length);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-			} else {
-				if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
-					written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9);
-					buflen=sprintf(
-						buffer, 
-						"%lu", 
-						t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
-					written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				} else {
-					written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9);
-					buflen=sprintf(
-						buffer, 
-						"%lu", 
-						t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
-					written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				}
-				if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
-					written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7);
-					buflen=sprintf(
-						buffer, 
-						"%lu", 
-						t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
-					written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				} else {
-					written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7);
-					buflen=sprintf(
-						buffer, 
-						"%lu", 
-						t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
-					written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				}
-			}
-			if(t2p->pdf_switchdecode == 0){
-				written += TIFFWriteFile(output, (tdata_t) " /BlackIs1 true ", 16);
-			}
-			written += TIFFWriteFile(output, (tdata_t) ">>\r", 3);
-			break;
-#endif
-#ifdef JPEG_SUPPORT
-		case T2P_COMPRESS_JPEG:
-			written += TIFFWriteFile(output, (tdata_t) "/DCTDecode ", 11);
-			break;
-#endif
-#ifdef ZIP_SUPPORT
-		case T2P_COMPRESS_ZIP:
-			written += TIFFWriteFile(output, (tdata_t) "/FlateDecode ", 13);
-			if(t2p->pdf_compressionquality%100){
-				written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13);
-				written += TIFFWriteFile(output, (tdata_t) "<< /Predictor ", 14);
-				_TIFFmemset(buffer, 0x00, 16);
-				buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				written += TIFFWriteFile(output, (tdata_t) " /Columns ", 10);
-				_TIFFmemset(buffer, 0x00, 16);
-				buflen=sprintf(buffer, "%lu", t2p->tiff_width);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				written += TIFFWriteFile(output, (tdata_t) " /Colors ", 9);
-				_TIFFmemset(buffer, 0x00, 16);
-				buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				written += TIFFWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
-				_TIFFmemset(buffer, 0x00, 16);
-				buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-				written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-				written += TIFFWriteFile(output, (tdata_t) ">>\r", 3);
-			}
-			break;
-#endif
-		default:
-			break;
-	}
-
-	return(written);
-}
-
-/*
-	This function writes a PDF xref table to output.
-*/
-
-tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[21];
-	int buflen=0;
-	uint32 i=0;
-
-	written += TIFFWriteFile(output, (tdata_t) "xref\r0 ", 7);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	written += TIFFWriteFile(output, (tdata_t) " \r0000000000 65535 f\r\n", 22);
-	for (i=0;i<t2p->pdf_xrefcount;i++){
-		sprintf(buffer, "%.10lu 00000 n\r\n", t2p->pdf_xrefoffsets[i]);
-		written += TIFFWriteFile(output, (tdata_t) buffer, 20);
-	}
-
-	return(written);
-}
-
-/*
-	This function writes a PDF trailer to output.
-*/
-
-tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output){
-
-	tsize_t written=0;
-	char buffer[32];
-	int buflen=0;
-	char fileidbuf[16];
-	int i=0;
-
-	((int*)fileidbuf)[0] = rand();
-	((int*)fileidbuf)[1] = rand();
-	((int*)fileidbuf)[2] = rand();
-	((int*)fileidbuf)[3] = rand();
-	t2p->pdf_fileid=(char*)_TIFFmalloc(33);
-	if(t2p->pdf_fileid==NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't allocate %u bytes of memory for t2p_write_pdf_trailer", 
-			33 );
-		t2p->t2p_error = T2P_ERR_ERROR;
-		return(0);
-	}
-	_TIFFmemset(t2p->pdf_fileid, 0x00, 33);
-	for (i=0;i<16;i++){
-		sprintf(&(t2p->pdf_fileid[2*i]), "%.2X", fileidbuf[i]);
-	}
-	written += TIFFWriteFile(output, (tdata_t) "trailer\r<<\r/Size ", 17);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_xrefcount+1);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	_TIFFmemset(buffer, 0x00, 32);	
-	written += TIFFWriteFile(output, (tdata_t) "\r/Root ", 7);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_catalog);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	_TIFFmemset(buffer, 0x00, 32);	
-	written += TIFFWriteFile(output, (tdata_t) " 0 R \r/Info ", 12);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_info);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	_TIFFmemset(buffer, 0x00, 32);	
-	written += TIFFWriteFile(output, (tdata_t) " 0 R \r/ID[<", 11);
-	written += TIFFWriteFile(output, (tdata_t) t2p->pdf_fileid, 32);
-	written += TIFFWriteFile(output, (tdata_t) "><", 2);
-	written += TIFFWriteFile(output, (tdata_t) t2p->pdf_fileid, 32);
-	written += TIFFWriteFile(output, (tdata_t) ">]\r>>\rstartxref\r", 16);
-	buflen=sprintf(buffer, "%lu", t2p->pdf_startxref);
-	written += TIFFWriteFile(output, (tdata_t) buffer, buflen);
-	_TIFFmemset(buffer, 0x00, 32);	
-	written += TIFFWriteFile(output, (tdata_t) "\r%%EOF\r", 7);
-
-	return(written);
-}
- 
-/*
-
-  This function writes a PDF to a file given a pointer to a TIFF.
-
-  The idea with using a TIFF* as output for a PDF file is that the file 
-  can be created with TIFFClientOpen for memory-mapped use within the TIFF 
-  library, and TIFFWriteEncodedStrip can be used to write compressed data to 
-  the output.  The output is not actually a TIFF file, it is a PDF file.  
-
-  This function uses only TIFFWriteFile and TIFFWriteEncodedStrip to write to 
-  the output TIFF file.  When libtiff would otherwise be writing data to the 
-  output file, the write procedure of the TIFF structure is replaced with an 
-  empty implementation.
-
-  The first argument to the function is an initialized and validated T2P 
-  context struct pointer.
-
-  The second argument to the function is the TIFF* that is the input that has 
-  been opened for reading and no other functions have been called upon it.
-
-  The third argument to the function is the TIFF* that is the output that has 
-  been opened for writing.  It has to be opened so that it hasn't written any 
-  data to the output.  If the output is seekable then it's OK to seek to the 
-  beginning of the file.  The function only writes to the output PDF and does 
-  not seek.  See the example usage in the main() function.
-
-	TIFF* output = TIFFOpen("output.pdf", "w");
-	assert(output != NULL);
-
-	if(output->tif_seekproc != NULL){
-		TIFFSeekFile(output, (toff_t) 0, SEEK_SET);
-	}
-
-  This function returns the file size of the output PDF file.  On error it 
-  returns zero and the t2p->t2p_error variable is set to T2P_ERR_ERROR.
-
-  After this function completes, call t2p_free on t2p, TIFFClose on input, 
-  and TIFFClose on output.
-*/
-
-tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
-
-	tsize_t written=0;
-	ttile_t i2=0;
-	tsize_t streamlen=0;
-#ifdef COLORIMETRY_SUPPORT
-	uint16 i=0;
-#endif
-
-	t2p_read_tiff_init(t2p, input);
-	if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
-	t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
-	if(t2p->pdf_xrefoffsets==NULL){
-		TIFFError(
-			TIFF2PDF_MODULE, 
-			"Can't allocate %lu bytes of memory for t2p_write_pdf", 
-			t2p->pdf_xrefcount * sizeof(uint32) );
-		return(written);
-	}
-	t2p->pdf_xrefcount=0;
-	t2p->pdf_catalog=1;
-	t2p->pdf_info=2;
-	t2p->pdf_pages=3;
-	written += t2p_write_pdf_header(t2p, output);
-	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-	t2p->pdf_catalog=t2p->pdf_xrefcount;
-	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-	written += t2p_write_pdf_catalog(t2p, output);
-	written += t2p_write_pdf_obj_end(output);
-	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-	t2p->pdf_info=t2p->pdf_xrefcount;
-	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-	written += t2p_write_pdf_info(t2p, input, output);
-	written += t2p_write_pdf_obj_end(output);
-	t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-	t2p->pdf_pages=t2p->pdf_xrefcount;
-	written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-	written += t2p_write_pdf_pages(t2p, output);
-	written += t2p_write_pdf_obj_end(output);
-	for(t2p->pdf_page=0;t2p->pdf_page<t2p->tiff_pagecount;t2p->pdf_page++){
-		t2p_read_tiff_data(t2p, input);
-		if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
-		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-		written += t2p_write_pdf_page(t2p->pdf_xrefcount, t2p, output);
-		written += t2p_write_pdf_obj_end(output);
-		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-		written += t2p_write_pdf_stream_dict_start(output);
-		written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
-		written += t2p_write_pdf_stream_dict_end(output);
-		written += t2p_write_pdf_stream_start(output);
-		streamlen=written;
-		written += t2p_write_pdf_page_content_stream(t2p, output);
-		streamlen=written-streamlen;
-		written += t2p_write_pdf_stream_end(output);
-		written += t2p_write_pdf_obj_end(output);
-		t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-		written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-		written += t2p_write_pdf_stream_length(streamlen, output);
-		written += t2p_write_pdf_obj_end(output);
-#ifdef COLORIMETRY_SUPPORT
-		if(t2p->tiff_transferfunctioncount != 0){
-			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-			written += t2p_write_pdf_transfer(t2p, output);
-			written += t2p_write_pdf_obj_end(output);
-			for(i=0;i<t2p->tiff_transferfunctioncount;i++){
-				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-				written += t2p_write_pdf_stream_dict_start(output);
-				written += t2p_write_pdf_transfer_dict(t2p, output, i);
-				written += t2p_write_pdf_stream_dict_end(output);
-				written += t2p_write_pdf_stream_start(output);
-				streamlen=written;
-				written += t2p_write_pdf_transfer_stream(t2p, output, i);
-				streamlen=written-streamlen;
-				written += t2p_write_pdf_stream_end(output);
-				written += t2p_write_pdf_obj_end(output);
-			}
-		}
-#endif
-		if( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){
-			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-			t2p->pdf_palettecs=t2p->pdf_xrefcount;
-			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-			written += t2p_write_pdf_stream_dict_start(output);
-			written += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output);
-			written += t2p_write_pdf_stream_dict_end(output);
-			written += t2p_write_pdf_stream_start(output);
-			streamlen=written;
-			written += t2p_write_pdf_xobject_palettecs_stream(t2p, output);
-			streamlen=written-streamlen;
-			written += t2p_write_pdf_stream_end(output);
-			written += t2p_write_pdf_obj_end(output);
-		}
-#ifdef ICC_SUPPORT
-		if( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){
-			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-			t2p->pdf_icccs=t2p->pdf_xrefcount;
-			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-			written += t2p_write_pdf_stream_dict_start(output);
-			written += t2p_write_pdf_xobject_icccs_dict(t2p, output);
-			written += t2p_write_pdf_stream_dict_end(output);
-			written += t2p_write_pdf_stream_start(output);
-			streamlen=written;
-			written += t2p_write_pdf_xobject_icccs_stream(t2p, output);
-			streamlen=written-streamlen;
-			written += t2p_write_pdf_stream_end(output);
-			written += t2p_write_pdf_obj_end(output);
-		}
-#endif		
-		if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount !=0){
-			for(i2=0;i2<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i2++){
-				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-				written += t2p_write_pdf_stream_dict_start(output);
-				written += t2p_write_pdf_xobject_stream_dict(
-					i2+1, 
-					t2p, 
-					output);
-				written += t2p_write_pdf_stream_dict_end(output);
-				written += t2p_write_pdf_stream_start(output);
-				streamlen=written;
-				t2p_read_tiff_size_tile(t2p, input, i2);
-				written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2);
-				t2p_write_advance_directory(t2p, output);
-				if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
-				streamlen=written-streamlen;
-				written += t2p_write_pdf_stream_end(output);
-				written += t2p_write_pdf_obj_end(output);
-				t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-				written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-				written += t2p_write_pdf_stream_length(streamlen, output);
-				written += t2p_write_pdf_obj_end(output);
-			}
-		} else {
-			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-			written += t2p_write_pdf_stream_dict_start(output);
-			written += t2p_write_pdf_xobject_stream_dict(
-				0, 
-				t2p, 
-				output);
-			written += t2p_write_pdf_stream_dict_end(output);
-			written += t2p_write_pdf_stream_start(output);
-			streamlen=written;
-			t2p_read_tiff_size(t2p, input);
-			written += t2p_readwrite_pdf_image(t2p, input, output);
-			t2p_write_advance_directory(t2p, output);
-			if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
-			streamlen=written-streamlen;
-			written += t2p_write_pdf_stream_end(output);
-			written += t2p_write_pdf_obj_end(output);
-			t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written;
-			written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output);
-			written += t2p_write_pdf_stream_length(streamlen, output);
-			written += t2p_write_pdf_obj_end(output);
-		}
-	}
-	t2p->pdf_startxref=written;
-	written += t2p_write_pdf_xreftable(t2p, output);
-	written += t2p_write_pdf_trailer(t2p, output);
-	t2p->tiff_writeproc=output->tif_writeproc;
-	output->tif_writeproc=t2p_empty_writeproc;
-
-	return(written);
-}
\ No newline at end of file
diff --git a/tkimg1.3/libtiff/tools/tiff2ps.c b/tkimg1.3/libtiff/tools/tiff2ps.c
deleted file mode 100644
index 5018446..0000000
--- a/tkimg1.3/libtiff/tools/tiff2ps.c
+++ /dev/null
@@ -1,2068 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiff2ps.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>			/* for atof */
-#include <math.h>
-#include <time.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-/*
- * Revision history
- *
- * 2001-Mar-21
- *    I (Bruce A. Mallett) added this revision history comment ;)
- *
- *    Fixed PS_Lvl2page() code which outputs non-ASCII85 raw
- *    data.  Moved test for when to output a line break to
- *    *after* the output of a character.  This just serves
- *    to fix an eye-nuisance where the first line of raw
- *    data was one character shorter than subsequent lines.
- *
- *    Added an experimental ASCII85 encoder which can be used
- *    only when there is a single buffer of bytes to be encoded.
- *    This version is much faster at encoding a straight-line
- *    buffer of data because it can avoid alot of the loop
- *    overhead of the byte-by-bye version.  To use this version
- *    you need to define EXP_ASCII85ENCODER (experimental ...).
- *
- *    Added bug fix given by Michael Schmidt to PS_Lvl2page()
- *    in which an end-of-data marker ('>') was not being output
- *    when producing non-ASCII85 encoded PostScript Level 2
- *    data.
- *
- *    Fixed PS_Lvl2colorspace() so that it no longer assumes that
- *    a TIFF having more than 2 planes is a CMYK.  This routine
- *    no longer looks at the samples per pixel but instead looks
- *    at the "photometric" value.  This change allows support of
- *    CMYK TIFFs.
- *
- *    Modified the PostScript L2 imaging loop so as to test if
- *    the input stream is still open before attempting to do a
- *    flushfile on it.  This was done because some RIPs close
- *    the stream after doing the image operation.
- *
- *    Got rid of the realloc() being done inside a loop in the
- *    PSRawDataBW() routine.  The code now walks through the
- *    byte-size array outside the loop to determine the largest
- *    size memory block that will be needed.
- *
- *    Added "-m" switch to ask tiff2ps to, where possible, use the
- *    "imagemask" operator instead of the "image" operator.
- *
- *    Added the "-i #" switch to allow interpolation to be disabled.
- *
- *    Unrolled a loop or two to improve performance.
- */
-
-/*
- * Define EXP_ASCII85ENCODER if you want to use an experimental
- * version of the ASCII85 encoding routine.  The advantage of
- * using this routine is that tiff2ps will convert to ASCII85
- * encoding at between 3 and 4 times the speed as compared to
- * using the old (non-experimental) encoder.  The disadvantage
- * is that you will be using a new (and unproven) encoding
- * routine.  So user beware, you have been warned!
- */
-
-#define	EXP_ASCII85ENCODER
-
-/*
- * NB: this code assumes uint32 works with printf's %l[ud].
- */
-#ifndef TRUE
-#define	TRUE	1
-#define	FALSE	0
-#endif
-
-int	ascii85 = FALSE;		/* use ASCII85 encoding */
-int	interpolate = TRUE;		/* interpolate level2 image */
-int	level2 = FALSE;			/* generate PostScript level 2 */
-int	level3 = FALSE;			/* generate PostScript level 3 */
-int	printAll = FALSE;		/* print all images in file */
-int	generateEPSF = TRUE;		/* generate Encapsulated PostScript */
-int	PSduplex = FALSE;		/* enable duplex printing */
-int	PStumble = FALSE;		/* enable top edge binding */
-int	PSavoiddeadzone = TRUE;		/* enable avoiding printer deadzone */
-float	maxPageHeight = 0;		/* maximum size to fit on page */
-float	splitOverlap = 0;		/* amount for split pages to overlag */
-int	rotate = FALSE;			/* rotate image by 180 degrees */
-char	*filename;			/* input filename */
-int	useImagemask = FALSE;		/* Use imagemask instead of image operator */
-uint16	res_unit = 0;			/* Resolution units: 1 - inches, 2 - cm*/
-
-/*
- * ASCII85 Encoding Support.
- */
-unsigned char ascii85buf[10];
-int	ascii85count;
-int	ascii85breaklen;
-
-int	TIFF2PS(FILE*, TIFF*, float, float, double, double, int);
-void	PSpage(FILE*, TIFF*, uint32, uint32);
-void	PSColorContigPreamble(FILE*, uint32, uint32, int);
-void	PSColorSeparatePreamble(FILE*, uint32, uint32, int);
-void	PSDataColorContig(FILE*, TIFF*, uint32, uint32, int);
-void	PSDataColorSeparate(FILE*, TIFF*, uint32, uint32, int);
-void	PSDataPalette(FILE*, TIFF*, uint32, uint32);
-void	PSDataBW(FILE*, TIFF*, uint32, uint32);
-void	PSRawDataBW(FILE*, TIFF*, uint32, uint32);
-void	Ascii85Init(void);
-void	Ascii85Put(unsigned char code, FILE* fd);
-void	Ascii85Flush(FILE* fd);
-void    PSHead(FILE*, TIFF*, uint32, uint32, float, float, float, float);
-void	PSTail(FILE*, int);
-
-#if	defined( EXP_ASCII85ENCODER)
-int Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw_p, int raw_l );
-#endif
-
-static	void usage(int);
-
-int
-main(int argc, char* argv[])
-{
-	int dirnum = -1, c, np = 0;
-	int centered = 0;
-	float bottommargin = 0;
-	float leftmargin = 0;
-	float pageWidth = 0;
-	float pageHeight = 0;
-	uint32 diroff = 0;
-	extern char *optarg;
-	extern int optind;
-	FILE* output = stdout;
-
-	while ((c = getopt(argc, argv, "b:d:h:H:L:i:w:l:o:O:acelmrxyzps1238DT")) != -1)
-		switch (c) {
-		case 'b':
-			bottommargin = atof(optarg);
-			break;
-		case 'c':
-			centered = 1;
-			break;
-		case 'd':
-			dirnum = atoi(optarg);
-			break;
-		case 'D':
-			PSduplex = TRUE;
-			break;
-		case 'i':
-			interpolate = atoi(optarg) ? TRUE:FALSE;
-			break;
-		case 'T':
-			PStumble = TRUE;
-			break;
-		case 'e':
-			PSavoiddeadzone = FALSE;
-			generateEPSF = TRUE;
-			break;
-		case 'h':
-			pageHeight = atof(optarg);
-			break;
-		case 'H':
-			maxPageHeight = atof(optarg);
-			if (pageHeight==0) pageHeight = maxPageHeight;
-			break;
-		case 'L':
-			splitOverlap = atof(optarg);
-			break;
-		case 'm':
-			useImagemask = TRUE;
-			break;
-		case 'o':
-			diroff = (uint32) strtoul(optarg, NULL, 0);
-			break;
-		case 'O':		/* XXX too bad -o is already taken */
-			output = fopen(optarg, "w");
-			if (output == NULL) {
-				fprintf(stderr,
-				    "%s: %s: Cannot open output file.\n",
-				    argv[0], optarg);
-				exit(-2);
-			}
-			break;
-		case 'l':
-			leftmargin = atof(optarg);
-			break;
-		case 'a':
-			printAll = TRUE;
-			/* fall thru... */
-		case 'p':
-			generateEPSF = FALSE;
-			break;
-		case 'r':
-			rotate = TRUE;
-			break;
-		case 's':
-			printAll = FALSE;
-			break;
-		case 'w':
-			pageWidth = atof(optarg);
-			break;
-		case 'z':
-			PSavoiddeadzone = FALSE;
-			break;
-		case '1':
-			level2 = FALSE;
-			level3 = FALSE;
-			ascii85 = FALSE;
-			break;
-		case '2':
-			level2 = TRUE;
-			ascii85 = TRUE;			/* default to yes */
-			break;
-		case '3':
-			level3 = TRUE;
-			ascii85 = TRUE;			/* default to yes */
-			break;
-		case '8':
-			ascii85 = FALSE;
-			break;
-		case 'x':
-			res_unit = RESUNIT_CENTIMETER;
-			break;
-		case 'y':
-			res_unit = RESUNIT_INCH;
-			break;
-		case '?':
-			usage(-1);
-		}
-	for (; argc - optind > 0; optind++) {
-		TIFF* tif = TIFFOpen(filename = argv[optind], "r");
-		if (tif != NULL) {
-			if (dirnum != -1 && !TIFFSetDirectory(tif, dirnum))
-				return (-1);
-			else if (diroff != 0 &&
-			    !TIFFSetSubDirectory(tif, diroff))
-				return (-1);
-			np = TIFF2PS(output, tif, pageWidth, pageHeight,
-				leftmargin, bottommargin, centered);
-			TIFFClose(tif);
-		}
-	}
-	if (np)
-		PSTail(output, np);
-	else
-		usage(-1);
-	if (output != stdout)
-		fclose(output);
-	return (0);
-}
-
-static	uint16 samplesperpixel;
-static	uint16 bitspersample;
-static	uint16 planarconfiguration;
-static	uint16 photometric;
-static	uint16 compression;
-static	uint16 extrasamples;
-static	int alpha;
-
-static int
-checkImage(TIFF* tif)
-{
-	switch (photometric) {
-	case PHOTOMETRIC_YCBCR:
-		if ((compression == COMPRESSION_JPEG || compression == COMPRESSION_OJPEG)
-			&& planarconfiguration == PLANARCONFIG_CONTIG) {
-			/* can rely on libjpeg to convert to RGB */
-			TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE,
-				     JPEGCOLORMODE_RGB);
-			photometric = PHOTOMETRIC_RGB;
-		} else {
-			if (level2 || level3)
-				break;
-			TIFFError(filename, "Can not handle image with %s",
-			    "PhotometricInterpretation=YCbCr");
-			return (0);
-		}
-		/* fall thru... */
-	case PHOTOMETRIC_RGB:
-		if (alpha && bitspersample != 8) {
-			TIFFError(filename,
-			    "Can not handle %d-bit/sample RGB image with alpha",
-			    bitspersample);
-			return (0);
-		}
-		/* fall thru... */
-	case PHOTOMETRIC_SEPARATED:
-	case PHOTOMETRIC_PALETTE:
-	case PHOTOMETRIC_MINISBLACK:
-	case PHOTOMETRIC_MINISWHITE:
-		break;
-	case PHOTOMETRIC_LOGL:
-	case PHOTOMETRIC_LOGLUV:
-		if (compression != COMPRESSION_SGILOG &&
-		    compression != COMPRESSION_SGILOG24) {
-			TIFFError(filename,
-		    "Can not handle %s data with compression other than SGILog",
-			    (photometric == PHOTOMETRIC_LOGL) ?
-				"LogL" : "LogLuv"
-			);
-			return (0);
-		}
-		/* rely on library to convert to RGB/greyscale */
-		TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
-		photometric = (photometric == PHOTOMETRIC_LOGL) ?
-		    PHOTOMETRIC_MINISBLACK : PHOTOMETRIC_RGB;
-		bitspersample = 8;
-		break;
-	case PHOTOMETRIC_CIELAB:
-		/* fall thru... */
-	default:
-		TIFFError(filename,
-		    "Can not handle image with PhotometricInterpretation=%d",
-		    photometric);
-		return (0);
-	}
-	switch (bitspersample) {
-	case 1: case 2:
-	case 4: case 8:
-		break;
-	default:
-		TIFFError(filename, "Can not handle %d-bit/sample image",
-		    bitspersample);
-		return (0);
-	}
-	if (planarconfiguration == PLANARCONFIG_SEPARATE && extrasamples > 0)
-		TIFFWarning(filename, "Ignoring extra samples");
-	return (1);
-}
-
-#define PS_UNIT_SIZE	72.0
-#define	PSUNITS(npix,res)	((npix) * (PS_UNIT_SIZE / (res)))
-
-static	char RGBcolorimage[] = "\
-/bwproc {\n\
-    rgbproc\n\
-    dup length 3 idiv string 0 3 0\n\
-    5 -1 roll {\n\
-	add 2 1 roll 1 sub dup 0 eq {\n\
-	    pop 3 idiv\n\
-	    3 -1 roll\n\
-	    dup 4 -1 roll\n\
-	    dup 3 1 roll\n\
-	    5 -1 roll put\n\
-	    1 add 3 0\n\
-	} { 2 1 roll } ifelse\n\
-    } forall\n\
-    pop pop pop\n\
-} def\n\
-/colorimage where {pop} {\n\
-    /colorimage {pop pop /rgbproc exch def {bwproc} image} bind def\n\
-} ifelse\n\
-";
-
-/*
- * Adobe Photoshop requires a comment line of the form:
- *
- * %ImageData: <cols> <rows> <depth>  <main channels> <pad channels>
- *	<block size> <1 for binary|2 for hex> "data start"
- *
- * It is claimed to be part of some future revision of the EPS spec.
- */
-static void
-PhotoshopBanner(FILE* fd, uint32 w, uint32 h, int bs, int nc, char* startline)
-{
-	fprintf(fd, "%%ImageData: %ld %ld %d %d 0 %d 2 \"",
-	    (long) w, (long) h, bitspersample, nc, bs);
-	fprintf(fd, startline, nc);
-	fprintf(fd, "\"\n");
-}
-
-/*
- *   pw : image width in pixels
- *   ph : image height in pixels
- * pprw : image width in PS units (72 dpi)
- * pprh : image height in PS units (72 dpi)
- */
-static void
-setupPageState(TIFF* tif, uint32* pw, uint32* ph, float* pprw, float* pprh)
-{
-	float xres, yres;
-
-	TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, pw);
-	TIFFGetField(tif, TIFFTAG_IMAGELENGTH, ph);
-	if (res_unit == 0)
-		TIFFGetFieldDefaulted(tif, TIFFTAG_RESOLUTIONUNIT, &res_unit);
-	/*
-	 * Calculate printable area.
-	 */
-	if (!TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres) || !xres)
-		xres = PS_UNIT_SIZE;
-	if (!TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres) || !yres)
-		yres = PS_UNIT_SIZE;
-	switch (res_unit) {
-	case RESUNIT_CENTIMETER:
-		xres *= 2.54, yres *= 2.54;
-		break;
-	case RESUNIT_INCH:
-		break;
-	case RESUNIT_NONE:
-	default:
-		xres *= PS_UNIT_SIZE, yres *= PS_UNIT_SIZE;
-		break;
-	}
-	*pprh = PSUNITS(*ph, yres);
-	*pprw = PSUNITS(*pw, xres);
-}
-
-static int
-isCCITTCompression(TIFF* tif)
-{
-    uint16 compress;
-    TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
-    return (compress == COMPRESSION_CCITTFAX3 ||
-	    compress == COMPRESSION_CCITTFAX4 ||
-	    compress == COMPRESSION_CCITTRLE ||
-	    compress == COMPRESSION_CCITTRLEW);
-}
-
-static	tsize_t tf_bytesperrow;
-static	tsize_t ps_bytesperrow;
-static	tsize_t	tf_rowsperstrip;
-static	tsize_t	tf_numberstrips;
-static	char *hex = "0123456789abcdef";
-
-/*
- * imagewidth & imageheight are 1/72 inches
- * pagewidth & pageheight are inches
- */
-int
-PlaceImage(FILE *fp, float pagewidth, float pageheight,
-	   float imagewidth, float imageheight, int splitpage,
-	   double lm, double bm, int cnt)
-{
-	float xtran = 0;
-	float ytran = 0;
-	float xscale = 1;
-	float yscale = 1;
-	float left_offset = lm * PS_UNIT_SIZE;
-	float bottom_offset = bm * PS_UNIT_SIZE;
-	float subimageheight;
-	float splitheight;
-	float overlap;
-
-	pagewidth *= PS_UNIT_SIZE;
-	pageheight *= PS_UNIT_SIZE;
-
-	if (maxPageHeight==0)
-		splitheight = 0;
-	else
-		splitheight = maxPageHeight * PS_UNIT_SIZE;
-	overlap = splitOverlap * PS_UNIT_SIZE;
-
-	/*
-	 * WIDTH:
-	 *      if too wide, scrunch to fit
-	 *      else leave it alone
-	 */
-	if (imagewidth <= pagewidth) {
-		xscale = imagewidth;
-	} else {
-		xscale = pagewidth;
-	}
-
-	/* HEIGHT:
-	 *      if too long, scrunch to fit
-	 *      if too short, move to top of page
-	 */
-	if (imageheight <= pageheight) {
-		yscale = imageheight;
-		ytran = pageheight - imageheight;
-	} else if (imageheight > pageheight &&
-		(splitheight == 0 || imageheight <= splitheight)) {
-		yscale = pageheight;
-	} else /* imageheight > splitheight */ {
-		subimageheight = imageheight - (pageheight-overlap)*splitpage;
-		if (subimageheight <= pageheight) {
-			yscale = imageheight;
-			ytran = pageheight - subimageheight;
-			splitpage = 0;
-		} else if ( subimageheight > pageheight && subimageheight <= splitheight) {
-			yscale = imageheight * pageheight / subimageheight;
-			ytran = 0;
-			splitpage = 0;
-		} else /* sumimageheight > splitheight */ {
-			yscale = imageheight;
-			ytran = pageheight - subimageheight;
-			splitpage++;
-		}
-	}
-	
-	bottom_offset += ytran / (cnt?2:1);
-	if (cnt)
-	    left_offset += xtran / 2;
-	fprintf(fp, "%f %f translate\n", left_offset, bottom_offset);
-	fprintf(fp, "%f %f scale\n", xscale, yscale);
-	if (rotate)
-	    fputs ("1 1 translate 180 rotate\n", fp);
-
-	return splitpage;
-}
-
-
-/* returns the sequence number of the page processed */
-int
-TIFF2PS(FILE* fd, TIFF* tif, float pw, float ph, double lm, double bm, int cnt)
-{
-	uint32 w, h;
-	float ox, oy, prw, prh;
-	float scale = 1.0;
-	float left_offset = lm * PS_UNIT_SIZE;
-	float bottom_offset = bm * PS_UNIT_SIZE;
-	uint32 subfiletype;
-	uint16* sampleinfo;
-	static int npages = 0;
-	int split;
-
-	if (!TIFFGetField(tif, TIFFTAG_XPOSITION, &ox))
-		ox = 0;
-	if (!TIFFGetField(tif, TIFFTAG_YPOSITION, &oy))
-		oy = 0;
-	setupPageState(tif, &w, &h, &prw, &prh);
-
-	do {
-		tf_numberstrips = TIFFNumberOfStrips(tif);
-		TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP,
-		    &tf_rowsperstrip);
-		setupPageState(tif, &w, &h, &prw, &prh);
-		if (!npages)
-			PSHead(fd, tif, w, h, prw, prh, ox, oy);
-		TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE,
-		    &bitspersample);
-		TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL,
-		    &samplesperpixel);
-		TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG,
-		    &planarconfiguration);
-		TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression);
-		TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
-		    &extrasamples, &sampleinfo);
-		alpha = (extrasamples == 1 &&
-			 sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA);
-		if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
-			switch (samplesperpixel - extrasamples) {
-			case 1:
-				if (isCCITTCompression(tif))
-					photometric = PHOTOMETRIC_MINISWHITE;
-				else
-					photometric = PHOTOMETRIC_MINISBLACK;
-				break;
-			case 3:
-				photometric = PHOTOMETRIC_RGB;
-				break;
-			case 4:
-				photometric = PHOTOMETRIC_SEPARATED;
-				break;
-			}
-		}
-		if (checkImage(tif)) {
-			tf_bytesperrow = TIFFScanlineSize(tif);
-			npages++;
-			fprintf(fd, "%%%%Page: %d %d\n", npages, npages);
-			if (!generateEPSF && ( level2 || level3 )) {
-				float psw,psh;
-				if (pw!=0 && ph!=0) {
-					psw=pw;
-					psh=ph;
-			    
-				}
-				else {
-					psw=rotate ? prh:prw;
-				    psh=rotate ? prw:prh;		    
-				}
-				fprintf(fd,
-	"1 dict begin /PageSize [ %f %f ] def currentdict end setpagedevice\n",
-				        psw, psh);
-				fputs(
-	"<<\n  /Policies <<\n    /PageSize 3\n  >>\n>> setpagedevice\n",
-				      fd);
-			}
-			fprintf(fd, "gsave\n");
-			fprintf(fd, "100 dict begin\n");
-			if (pw != 0 && ph != 0) {
-				if (maxPageHeight) { /* used -H option */
-					split = PlaceImage(fd,pw,ph,prw,prh,0,lm,bm,cnt);
-					while( split ) {
-					    PSpage(fd, tif, w, h);
-					    fprintf(fd, "end\n");
-					    fprintf(fd, "grestore\n");
-					    fprintf(fd, "showpage\n");
-					    npages++;
-					    fprintf(fd, "%%%%Page: %d %d\n", npages, npages);
-					    fprintf(fd, "gsave\n");
-					    fprintf(fd, "100 dict begin\n");
-					    split = PlaceImage(fd,pw,ph,prw,prh,split,lm,bm,cnt);
-					}
-				} else {
-					/* NB: maintain image aspect ratio */
-					scale = (pw*PS_UNIT_SIZE/prw) < (ph*PS_UNIT_SIZE/prh) ?
-					    (pw*PS_UNIT_SIZE/prw) :
-					    (ph*PS_UNIT_SIZE/prh);
-					if (scale > 1.0)
-						scale = 1.0;
-					bottom_offset +=
-						(ph * PS_UNIT_SIZE - prh * scale) / (cnt?2:1);
-					if (cnt)
-						left_offset += (pw * PS_UNIT_SIZE - prw * scale) / 2;
-					fprintf(fd, "%f %f translate\n",
-						left_offset, bottom_offset);
-					fprintf(fd, "%f %f scale\n", prw * scale, prh * scale);
-					if (rotate)
-						fputs ("1 1 translate 180 rotate\n", fd);
-				}
-			} else {
-				fprintf(fd, "%f %f scale\n", prw, prh);
-				if (rotate)
-					fputs ("1 1 translate 180 rotate\n", fd);
-			}
-			PSpage(fd, tif, w, h);
-			fprintf(fd, "end\n");
-			fprintf(fd, "grestore\n");
-			fprintf(fd, "showpage\n");
-		}
-		if (generateEPSF)
-			break;
-		TIFFGetFieldDefaulted(tif, TIFFTAG_SUBFILETYPE, &subfiletype);
-	} while (((subfiletype & FILETYPE_PAGE) || printAll) &&
-	    TIFFReadDirectory(tif));
-
-	return(npages);
-}
-
-
-static char DuplexPreamble[] = "\
-%%BeginFeature: *Duplex True\n\
-systemdict begin\n\
-  /languagelevel where { pop languagelevel } { 1 } ifelse\n\
-  2 ge { 1 dict dup /Duplex true put setpagedevice }\n\
-  { statusdict /setduplex known { statusdict begin setduplex true end } if\n\
-  } ifelse\n\
-end\n\
-%%EndFeature\n\
-";
-
-static char TumblePreamble[] = "\
-%%BeginFeature: *Tumble True\n\
-systemdict begin\n\
-  /languagelevel where { pop languagelevel } { 1 } ifelse\n\
-  2 ge { 1 dict dup /Tumble true put setpagedevice }\n\
-  { statusdict /settumble known { statusdict begin true settumble end } if\n\
-  } ifelse\n\
-end\n\
-%%EndFeature\n\
-";
-
-static char AvoidDeadZonePreamble[] = "\
-gsave newpath clippath pathbbox grestore\n\
-  4 2 roll 2 copy translate\n\
-  exch 3 1 roll sub 3 1 roll sub exch\n\
-  currentpagedevice /PageSize get aload pop\n\
-  exch 3 1 roll div 3 1 roll div abs exch abs\n\
-  2 copy gt { exch } if pop\n\
-  dup 1 lt { dup scale } { pop } ifelse\n\
-";
-
-void
-PSHead(FILE *fd, TIFF *tif, uint32 w, uint32 h, float pw, float ph,
-	float ox, float oy)
-{
-	time_t t;
-
-	(void) tif; (void) w; (void) h;
-	t = time(0);
-	fprintf(fd, "%%!PS-Adobe-3.0%s\n", generateEPSF ? " EPSF-3.0" : "");
-	fprintf(fd, "%%%%Creator: tiff2ps\n");
-	fprintf(fd, "%%%%Title: %s\n", filename);
-	fprintf(fd, "%%%%CreationDate: %s", ctime(&t));
-	fprintf(fd, "%%%%DocumentData: Clean7Bit\n");
-	fprintf(fd, "%%%%Origin: %ld %ld\n", (long) ox, (long) oy);
-	/* NB: should use PageBoundingBox */
-	fprintf(fd, "%%%%BoundingBox: 0 0 %ld %ld\n",
-	    (long) ceil(pw), (long) ceil(ph));
-	fprintf(fd, "%%%%LanguageLevel: %d\n", (level3 ? 3 : (level2 ? 2 : 1)));
-	fprintf(fd, "%%%%Pages: (atend)\n");
-	fprintf(fd, "%%%%EndComments\n");
-	fprintf(fd, "%%%%BeginSetup\n");
-	if (PSduplex)
-		fprintf(fd, "%s", DuplexPreamble);
-	if (PStumble)
-		fprintf(fd, "%s", TumblePreamble);
-	if (PSavoiddeadzone && (level2 || level3))
-		fprintf(fd, "%s", AvoidDeadZonePreamble);
-	fprintf(fd, "%%%%EndSetup\n");
-}
-
-void
-PSTail(FILE *fd, int npages)
-{
-	fprintf(fd, "%%%%Trailer\n");
-	fprintf(fd, "%%%%Pages: %d\n", npages);
-	fprintf(fd, "%%%%EOF\n");
-}
-
-static int
-checkcmap(TIFF* tif, int n, uint16* r, uint16* g, uint16* b)
-{
-	(void) tif;
-	while (n-- > 0)
-		if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-			return (16);
-	TIFFWarning(filename, "Assuming 8-bit colormap");
-	return (8);
-}
-
-static void
-PS_Lvl2colorspace(FILE* fd, TIFF* tif)
-{
-	uint16 *rmap, *gmap, *bmap;
-	int i, num_colors;
-	const char * colorspace_p;
-
-	switch ( photometric )
-	{
-	case PHOTOMETRIC_SEPARATED:
-		colorspace_p = "CMYK";
-		break;
-
-	case PHOTOMETRIC_RGB:
-		colorspace_p = "RGB";
-		break;
-
-	default:
-		colorspace_p = "Gray";
-	}
-
-	/*
-	 * Set up PostScript Level 2 colorspace according to
-	 * section 4.8 in the PostScript refenence manual.
-	 */
-	fputs("% PostScript Level 2 only.\n", fd);
-	if (photometric != PHOTOMETRIC_PALETTE) {
-		if (photometric == PHOTOMETRIC_YCBCR) {
-		    /* MORE CODE HERE */
-		}
-		fprintf(fd, "/Device%s setcolorspace\n", colorspace_p );
-		return;
-	}
-
-	/*
-	 * Set up an indexed/palette colorspace
-	 */
-	num_colors = (1 << bitspersample);
-	if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
-		TIFFError(filename,
-			"Palette image w/o \"Colormap\" tag");
-		return;
-	}
-	if (checkcmap(tif, num_colors, rmap, gmap, bmap) == 16) {
-		/*
-		 * Convert colormap to 8-bits values.
-		 */
-#define	CVT(x)		(((x) * 255) / ((1L<<16)-1))
-		for (i = 0; i < num_colors; i++) {
-			rmap[i] = CVT(rmap[i]);
-			gmap[i] = CVT(gmap[i]);
-			bmap[i] = CVT(bmap[i]);
-		}
-#undef CVT
-	}
-	fprintf(fd, "[ /Indexed /DeviceRGB %d", num_colors - 1);
-	if (ascii85) {
-		Ascii85Init();
-		fputs("\n<~", fd);
-		ascii85breaklen -= 2;
-	} else
-		fputs(" <", fd);
-	for (i = 0; i < num_colors; i++) {
-		if (ascii85) {
-			Ascii85Put(rmap[i], fd);
-			Ascii85Put(gmap[i], fd);
-			Ascii85Put(bmap[i], fd);
-		} else {
-			fputs((i % 8) ? " " : "\n  ", fd);
-			fprintf(fd, "%02x%02x%02x",
-			    rmap[i], gmap[i], bmap[i]);
-		}
-	}
-	if (ascii85)
-		Ascii85Flush(fd);
-	else
-		fputs(">\n", fd);
-	fputs("] setcolorspace\n", fd);
-}
-
-static int
-PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	int use_rawdata;
-	uint32 tile_width, tile_height;
-	uint16 predictor, minsamplevalue, maxsamplevalue;
-	int repeat_count;
-	char im_h[64], im_x[64], im_y[64];
-	char * imageOp = "image";
-
-	if ( useImagemask && (bitspersample == 1) )
-		imageOp = "imagemask";
-
-	(void)strcpy(im_x, "0");
-	(void)sprintf(im_y, "%lu", (long) h);
-	(void)sprintf(im_h, "%lu", (long) h);
-	tile_width = w;
-	tile_height = h;
-	if (TIFFIsTiled(tif)) {
-		repeat_count = TIFFNumberOfTiles(tif);
-		TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tile_width);
-		TIFFGetField(tif, TIFFTAG_TILELENGTH, &tile_height);
-		if (tile_width > w || tile_height > h ||
-		    (w % tile_width) != 0 || (h % tile_height != 0)) {
-			/*
-			 * The tiles does not fit image width and height.
-			 * Set up a clip rectangle for the image unit square.
-			 */
-			fputs("0 0 1 1 rectclip\n", fd);
-		}
-		if (tile_width < w) {
-			fputs("/im_x 0 def\n", fd);
-			(void)strcpy(im_x, "im_x neg");
-		}
-		if (tile_height < h) {
-			fputs("/im_y 0 def\n", fd);
-			(void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-		}
-	} else {
-		repeat_count = tf_numberstrips;
-		tile_height = tf_rowsperstrip;
-		if (tile_height > h)
-			tile_height = h;
-		if (repeat_count > 1) {
-			fputs("/im_y 0 def\n", fd);
-			fprintf(fd, "/im_h %lu def\n",
-			    (unsigned long) tile_height);
-			(void)strcpy(im_h, "im_h");
-			(void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-		}
-	}
-
-	/*
-	 * Output start of exec block
-	 */
-	fputs("{ % exec\n", fd);
-
-	if (repeat_count > 1)
-		fprintf(fd, "%d { %% repeat\n", repeat_count);
-
-	/*
-	 * Output filter options and image dictionary.
-	 */
-	if (ascii85)
-		fputs(" /im_stream currentfile /ASCII85Decode filter def\n",
-		    fd);
-	fputs(" <<\n", fd);
-	fputs("  /ImageType 1\n", fd);
-	fprintf(fd, "  /Width %lu\n", (unsigned long) tile_width);
-	/*
-	 * Workaround for some software that may crash when last strip
-	 * of image contains fewer number of scanlines than specified
-	 * by the `/Height' variable. So for stripped images with multiple
-	 * strips we will set `/Height' as `im_h', because one is 
-	 * recalculated for each strip - including the (smaller) final strip.
-	 * For tiled images and images with only one strip `/Height' will
-	 * contain number of scanlines in tile (or image height in case of
-	 * one-stripped image).
-	 */
-	if (TIFFIsTiled(tif) || tf_numberstrips == 1)
-		fprintf(fd, "  /Height %lu\n", (unsigned long) tile_height);
-	else
-		fprintf(fd, "  /Height im_h\n");
-	
-	if (planarconfiguration == PLANARCONFIG_SEPARATE && samplesperpixel > 1)
-		fputs("  /MultipleDataSources true\n", fd);
-	fprintf(fd, "  /ImageMatrix [ %lu 0 0 %ld %s %s ]\n",
-	    (unsigned long) w, - (long)h, im_x, im_y);
-	fprintf(fd, "  /BitsPerComponent %d\n", bitspersample);
-	fprintf(fd, "  /Interpolate %s\n", interpolate ? "true" : "false");
-
-	switch (samplesperpixel - extrasamples) {
-	case 1:
-		switch (photometric) {
-		case PHOTOMETRIC_MINISBLACK:
-			fputs("  /Decode [0 1]\n", fd);
-			break;
-		case PHOTOMETRIC_MINISWHITE:
-			switch (compression) {
-			case COMPRESSION_CCITTRLE:
-			case COMPRESSION_CCITTRLEW:
-			case COMPRESSION_CCITTFAX3:
-			case COMPRESSION_CCITTFAX4:
-				/*
-				 * Manage inverting with /Blackis1 flag
-				 * since there migth be uncompressed parts
-				 */
-				fputs("  /Decode [0 1]\n", fd);
-				break;
-			default:
-				/*
-				 * ERROR...
-				 */
-				fputs("  /Decode [1 0]\n", fd);
-				break;
-			}
-			break;
-		case PHOTOMETRIC_PALETTE:
-			TIFFGetFieldDefaulted(tif, TIFFTAG_MINSAMPLEVALUE,
-			    &minsamplevalue);
-			TIFFGetFieldDefaulted(tif, TIFFTAG_MAXSAMPLEVALUE,
-			    &maxsamplevalue);
-			fprintf(fd, "  /Decode [%u %u]\n",
-				    minsamplevalue, maxsamplevalue);
-			break;
-		default:
-			/*
-			 * ERROR ?
-			 */
-			fputs("  /Decode [0 1]\n", fd);
-			break;
-		}
-		break;
-	case 3:
-		switch (photometric) {
-		case PHOTOMETRIC_RGB:
-			fputs("  /Decode [0 1 0 1 0 1]\n", fd);
-			break;
-		case PHOTOMETRIC_MINISWHITE:
-		case PHOTOMETRIC_MINISBLACK:
-		default:
-			/*
-			 * ERROR??
-			 */
-			fputs("  /Decode [0 1 0 1 0 1]\n", fd);
-			break;
-		}
-		break;
-	case 4:
-		/*
-		 * ERROR??
-		 */
-		fputs("  /Decode [0 1 0 1 0 1 0 1]\n", fd);
-		break;
-	}
-	fputs("  /DataSource", fd);
-	if (planarconfiguration == PLANARCONFIG_SEPARATE &&
-	    samplesperpixel > 1)
-		fputs(" [", fd);
-	if (ascii85)
-		fputs(" im_stream", fd);
-	else
-		fputs(" currentfile /ASCIIHexDecode filter", fd);
-
-	use_rawdata = TRUE;
-	switch (compression) {
-	case COMPRESSION_NONE:		/* 1: uncompressed */
-		break;
-	case COMPRESSION_CCITTRLE:	/* 2: CCITT modified Huffman RLE */
-	case COMPRESSION_CCITTRLEW:	/* 32771: #1 w/ word alignment */
-	case COMPRESSION_CCITTFAX3:	/* 3: CCITT Group 3 fax encoding */
-	case COMPRESSION_CCITTFAX4:	/* 4: CCITT Group 4 fax encoding */
-		fputs("\n\t<<\n", fd);
-		if (compression == COMPRESSION_CCITTFAX3) {
-			uint32 g3_options;
-
-			fputs("\t /EndOfLine true\n", fd);
-			fputs("\t /EndOfBlock false\n", fd);
-			if (!TIFFGetField(tif, TIFFTAG_GROUP3OPTIONS,
-					    &g3_options))
-				g3_options = 0;
-			if (g3_options & GROUP3OPT_2DENCODING)
-				fprintf(fd, "\t /K %s\n", im_h);
-			if (g3_options & GROUP3OPT_UNCOMPRESSED)
-				fputs("\t /Uncompressed true\n", fd);
-			if (g3_options & GROUP3OPT_FILLBITS)
-				fputs("\t /EncodedByteAlign true\n", fd);
-		}
-		if (compression == COMPRESSION_CCITTFAX4) {
-			uint32 g4_options;
-
-			fputs("\t /K -1\n", fd);
-			TIFFGetFieldDefaulted(tif, TIFFTAG_GROUP4OPTIONS,
-					       &g4_options);
-			if (g4_options & GROUP4OPT_UNCOMPRESSED)
-				fputs("\t /Uncompressed true\n", fd);
-		}
-		if (!(tile_width == w && w == 1728U))
-			fprintf(fd, "\t /Columns %lu\n",
-			    (unsigned long) tile_width);
-		fprintf(fd, "\t /Rows %s\n", im_h);
-		if (compression == COMPRESSION_CCITTRLE ||
-		    compression == COMPRESSION_CCITTRLEW) {
-			fputs("\t /EncodedByteAlign true\n", fd);
-			fputs("\t /EndOfBlock false\n", fd);
-		}
-		if (photometric == PHOTOMETRIC_MINISBLACK)
-			fputs("\t /BlackIs1 true\n", fd);
-		fprintf(fd, "\t>> /CCITTFaxDecode filter");
-		break;
-	case COMPRESSION_LZW:	/* 5: Lempel-Ziv & Welch */
-		TIFFGetFieldDefaulted(tif, TIFFTAG_PREDICTOR, &predictor);
-		if (predictor == 2) {
-			fputs("\n\t<<\n", fd);
-			fprintf(fd, "\t /Predictor %u\n", predictor);
-			fprintf(fd, "\t /Columns %lu\n",
-			    (unsigned long) tile_width);
-			fprintf(fd, "\t /Colors %u\n", samplesperpixel);
-			fprintf(fd, "\t /BitsPerComponent %u\n",
-			    bitspersample);
-			fputs("\t>>", fd);
-		}
-		fputs(" /LZWDecode filter", fd);
-		break;
-	case COMPRESSION_DEFLATE:	/* 5: ZIP */
-	case COMPRESSION_ADOBE_DEFLATE:
-		if ( level3 ) {
-			 TIFFGetFieldDefaulted(tif, TIFFTAG_PREDICTOR, &predictor);
-			 if (predictor > 1) {
-				fprintf(fd, "\t %% PostScript Level 3 only.");
-				fputs("\n\t<<\n", fd);
-				fprintf(fd, "\t /Predictor %u\n", predictor);
-				fprintf(fd, "\t /Columns %lu\n",
-					(unsigned long) tile_width);
-				fprintf(fd, "\t /Colors %u\n", samplesperpixel);
-					fprintf(fd, "\t /BitsPerComponent %u\n",
-					bitspersample);
-				fputs("\t>>", fd);
-			 }
-			 fputs(" /FlateDecode filter", fd);
-		} else {
-			use_rawdata = FALSE ;
-		}
-		break;
-	case COMPRESSION_PACKBITS:	/* 32773: Macintosh RLE */
-		fputs(" /RunLengthDecode filter", fd);
-		use_rawdata = TRUE;
-	    break;
-	case COMPRESSION_OJPEG:		/* 6: !6.0 JPEG */
-	case COMPRESSION_JPEG:		/* 7: %JPEG DCT compression */
-#ifdef notdef
-		/*
-		 * Code not tested yet
-		 */
-		fputs(" /DCTDecode filter", fd);
-		use_rawdata = TRUE;
-#else
-		use_rawdata = FALSE;
-#endif
-		break;
-	case COMPRESSION_NEXT:		/* 32766: NeXT 2-bit RLE */
-	case COMPRESSION_THUNDERSCAN:	/* 32809: ThunderScan RLE */
-	case COMPRESSION_PIXARFILM:	/* 32908: Pixar companded 10bit LZW */
-	case COMPRESSION_JBIG:		/* 34661: ISO JBIG */
-		use_rawdata = FALSE;
-		break;
-	case COMPRESSION_SGILOG:	/* 34676: SGI LogL or LogLuv */
-	case COMPRESSION_SGILOG24:	/* 34677: SGI 24-bit LogLuv */
-		use_rawdata = FALSE;
-		break;
-	default:
-		/*
-		 * ERROR...
-		 */
-		use_rawdata = FALSE;
-		break;
-	}
-	if (planarconfiguration == PLANARCONFIG_SEPARATE &&
-	    samplesperpixel > 1) {
-		uint16 i;
-
-		/*
-		 * NOTE: This code does not work yet...
-		 */
-		for (i = 1; i < samplesperpixel; i++)
-			fputs(" dup", fd);
-		fputs(" ]", fd);
-	}
-
-	fprintf( fd, "\n >> %s\n", imageOp );
-	if (ascii85)
-		fputs(" im_stream status { im_stream flushfile } if\n", fd);
-	if (repeat_count > 1) {
-		if (tile_width < w) {
-			fprintf(fd, " /im_x im_x %lu add def\n",
-			    (unsigned long) tile_width);
-			if (tile_height < h) {
-				fprintf(fd, " im_x %lu ge {\n",
-				    (unsigned long) w);
-				fputs("  /im_x 0 def\n", fd);
-				fprintf(fd, " /im_y im_y %lu add def\n",
-				    (unsigned long) tile_height);
-				fputs(" } if\n", fd);
-			}
-		}
-		if (tile_height < h) {
-			if (tile_width >= w) {
-				fprintf(fd, " /im_y im_y %lu add def\n",
-				    (unsigned long) tile_height);
-				if (!TIFFIsTiled(tif)) {
-					fprintf(fd, " /im_h %lu im_y sub",
-					    (unsigned long) h);
-					fprintf(fd, " dup %lu gt { pop",
-					    (unsigned long) tile_height);
-					fprintf(fd, " %lu } if def\n",
-					    (unsigned long) tile_height);
-				}
-			}
-		}
-		fputs("} repeat\n", fd);
-	}
-	/*
-	 * End of exec function
-	 */
-	fputs("}\n", fd);
-
-	return(use_rawdata);
-}
-
-int
-PS_Lvl2page(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	uint16 fillorder;
-	int use_rawdata, tiled_image, breaklen;
-	uint32 chunk_no, num_chunks, *bc;
-	unsigned char *buf_data, *cp;
-	tsize_t chunk_size, byte_count;
-
-#if defined( EXP_ASCII85ENCODER )
-	int			ascii85_l;	/* Length, in bytes, of ascii85_p[] data */
-	uint8		*	ascii85_p = 0;	/* Holds ASCII85 encoded data */
-#endif
-
-	PS_Lvl2colorspace(fd, tif);
-	use_rawdata = PS_Lvl2ImageDict(fd, tif, w, h);
-
-/* See http://bugzilla.remotesensing.org/show_bug.cgi?id=80 */
-#ifdef ENABLE_BROKEN_BEGINENDDATA
-	fputs("%%BeginData:\n", fd);
-#endif
-	fputs("exec\n", fd);
-
-	tiled_image = TIFFIsTiled(tif);
-	if (tiled_image) {
-		num_chunks = TIFFNumberOfTiles(tif);
-		TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &bc);
-	} else {
-		num_chunks = TIFFNumberOfStrips(tif);
-		TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc);
-	}
-
-	if (use_rawdata) {
-		chunk_size = bc[0];
-		for (chunk_no = 1; chunk_no < num_chunks; chunk_no++)
-			if (bc[chunk_no] > chunk_size)
-				chunk_size = bc[chunk_no];
-	} else {
-		if (tiled_image)
-			chunk_size = TIFFTileSize(tif);
-		else
-			chunk_size = TIFFStripSize(tif);
-	}
-	buf_data = (unsigned char *)_TIFFmalloc(chunk_size);
-	if (!buf_data) {
-		TIFFError(filename, "Can't alloc %u bytes for %s.",
-			chunk_size, tiled_image ? "tiles" : "strips");
-		return(FALSE);
-	}
-
-#if defined( EXP_ASCII85ENCODER )
-	if ( ascii85 ) {
-	    /*
-	     * Allocate a buffer to hold the ASCII85 encoded data.  Note
-	     * that it is allocated with sufficient room to hold the
-	     * encoded data (5*chunk_size/4) plus the EOD marker (+8)
-	     * and formatting line breaks.  The line breaks are more
-	     * than taken care of by using 6*chunk_size/4 rather than
-	     * 5*chunk_size/4.
-	     */
-
-	    ascii85_p = _TIFFmalloc( (chunk_size+(chunk_size/2)) + 8 );
-
-	    if ( !ascii85_p ) {
-		_TIFFfree( buf_data );
-
-		TIFFError( filename, "Cannot allocate ASCII85 encoding buffer." );
-		return ( FALSE );
-	    }
-	}
-#endif
-
-	TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder);
-	for (chunk_no = 0; chunk_no < num_chunks; chunk_no++) {
-		if (ascii85)
-			Ascii85Init();
-		else
-			breaklen = 36;
-		if (use_rawdata) {
-			if (tiled_image)
-				byte_count = TIFFReadRawTile(tif, chunk_no,
-						  buf_data, chunk_size);
-			else
-				byte_count = TIFFReadRawStrip(tif, chunk_no,
-						  buf_data, chunk_size);
-			if (fillorder == FILLORDER_LSB2MSB)
-			    TIFFReverseBits(buf_data, byte_count);
-		} else {
-			if (tiled_image)
-				byte_count = TIFFReadEncodedTile(tif,
-						chunk_no, buf_data,
-						chunk_size);
-			else
-				byte_count = TIFFReadEncodedStrip(tif,
-						chunk_no, buf_data,
-						chunk_size);
-		}
-		if (byte_count < 0) {
-			TIFFError(filename, "Can't read %s %d.",
-				tiled_image ? "tile" : "strip", chunk_no);
-			if (ascii85)
-				Ascii85Put('\0', fd);
-		}
-		/*
-		 * For images with alpha, matte against a white background;
-		 * i.e. Cback * (1 - Aimage) where Cback = 1. We will fill the
-		 * lower part of the buffer with the modified values.
-		 *
-		 * XXX: needs better solution
-		 */
-		if (alpha) {
-			int adjust, i, j = 0;
-			int ncomps = samplesperpixel - extrasamples;
-			for (i = 0; i < byte_count; i+=samplesperpixel) {
-				adjust = 255 - buf_data[i + ncomps];
-				switch (ncomps) {
-					case 1:
-						buf_data[j++] = buf_data[i] + adjust;
-						break;
-					case 2:
-						buf_data[j++] = buf_data[i] + adjust;
-						buf_data[j++] = buf_data[i+1] + adjust;
-						break;
-					case 3:
-						buf_data[j++] = buf_data[i] + adjust;
-						buf_data[j++] = buf_data[i+1] + adjust;
-						buf_data[j++] = buf_data[i+2] + adjust;
-						break;
-				}
-			}
-			byte_count -= j;
-		}
-
-		if (ascii85) {
-#if defined( EXP_ASCII85ENCODER )
-			ascii85_l = Ascii85EncodeBlock(ascii85_p, 1, buf_data, byte_count );
-
-			if ( ascii85_l > 0 )
-				fwrite( ascii85_p, ascii85_l, 1, fd );
-#else
-			for (cp = buf_data; byte_count > 0; byte_count--)
-				Ascii85Put(*cp++, fd);
-#endif
-		}
-		else
-		{
-			for (cp = buf_data; byte_count > 0; byte_count--) {
-				putc(hex[((*cp)>>4)&0xf], fd);
-				putc(hex[(*cp)&0xf], fd);
-				cp++;
-
-				if (--breaklen <= 0) {
-					putc('\n', fd);
-					breaklen = 36;
-				}
-			}
-		}
-
-		if ( !ascii85 ) {
-			if ( level2 || level3 )
-				putc( '>', fd );
-			putc('\n', fd);
-		}
-#if !defined( EXP_ASCII85ENCODER )
-		else
-			Ascii85Flush(fd);
-#endif
-	}
-
-#if defined( EXP_ASCII85ENCODER )
-	if ( ascii85_p )
-	    _TIFFfree( ascii85_p );
-#endif
-       
-	_TIFFfree(buf_data);
-#ifdef ENABLE_BROKEN_BEGINENDDATA
-	fputs("%%EndData\n", fd);
-#endif
-	return(TRUE);
-}
-
-void
-PSpage(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	char	*	imageOp = "image";
-
-	if ( useImagemask && (bitspersample == 1) )
-		imageOp = "imagemask";
-
-	if ((level2 || level3) && PS_Lvl2page(fd, tif, w, h))
-		return;
-	ps_bytesperrow = tf_bytesperrow - (extrasamples * bitspersample / 8)*w;
-	switch (photometric) {
-	case PHOTOMETRIC_RGB:
-		if (planarconfiguration == PLANARCONFIG_CONTIG) {
-			fprintf(fd, "%s", RGBcolorimage);
-			PSColorContigPreamble(fd, w, h, 3);
-			PSDataColorContig(fd, tif, w, h, 3);
-		} else {
-			PSColorSeparatePreamble(fd, w, h, 3);
-			PSDataColorSeparate(fd, tif, w, h, 3);
-		}
-		break;
-	case PHOTOMETRIC_SEPARATED:
-		/* XXX should emit CMYKcolorimage */
-		if (planarconfiguration == PLANARCONFIG_CONTIG) {
-			PSColorContigPreamble(fd, w, h, 4);
-			PSDataColorContig(fd, tif, w, h, 4);
-		} else {
-			PSColorSeparatePreamble(fd, w, h, 4);
-			PSDataColorSeparate(fd, tif, w, h, 4);
-		}
-		break;
-	case PHOTOMETRIC_PALETTE:
-		fprintf(fd, "%s", RGBcolorimage);
-		PhotoshopBanner(fd, w, h, 1, 3, "false 3 colorimage");
-		fprintf(fd, "/scanLine %ld string def\n",
-		    (long) ps_bytesperrow * 3L);
-		fprintf(fd, "%lu %lu 8\n",
-		    (unsigned long) w, (unsigned long) h);
-		fprintf(fd, "[%lu 0 0 -%lu 0 %lu]\n",
-		    (unsigned long) w, (unsigned long) h, (unsigned long) h);
-		fprintf(fd, "{currentfile scanLine readhexstring pop} bind\n");
-		fprintf(fd, "false 3 colorimage\n");
-		PSDataPalette(fd, tif, w, h);
-		break;
-	case PHOTOMETRIC_MINISBLACK:
-	case PHOTOMETRIC_MINISWHITE:
-		PhotoshopBanner(fd, w, h, 1, 1, imageOp);
-		fprintf(fd, "/scanLine %ld string def\n",
-		    (long) ps_bytesperrow);
-		fprintf(fd, "%lu %lu %d\n",
-		    (unsigned long) w, (unsigned long) h, bitspersample);
-		fprintf(fd, "[%lu 0 0 -%lu 0 %lu]\n",
-		    (unsigned long) w, (unsigned long) h, (unsigned long) h);
-		fprintf(fd,
-		    "{currentfile scanLine readhexstring pop} bind\n");
-		fprintf(fd, "%s\n", imageOp);
-		PSDataBW(fd, tif, w, h);
-		break;
-	}
-	putc('\n', fd);
-}
-
-void
-PSColorContigPreamble(FILE* fd, uint32 w, uint32 h, int nc)
-{
-	ps_bytesperrow = nc * (tf_bytesperrow / samplesperpixel);
-	PhotoshopBanner(fd, w, h, 1, nc, "false %d colorimage");
-	fprintf(fd, "/line %ld string def\n", (long) ps_bytesperrow);
-	fprintf(fd, "%lu %lu %d\n",
-	    (unsigned long) w, (unsigned long) h, bitspersample);
-	fprintf(fd, "[%lu 0 0 -%lu 0 %lu]\n",
-	    (unsigned long) w, (unsigned long) h, (unsigned long) h);
-	fprintf(fd, "{currentfile line readhexstring pop} bind\n");
-	fprintf(fd, "false %d colorimage\n", nc);
-}
-
-void
-PSColorSeparatePreamble(FILE* fd, uint32 w, uint32 h, int nc)
-{
-	int i;
-
-	PhotoshopBanner(fd, w, h, ps_bytesperrow, nc, "true %d colorimage");
-	for (i = 0; i < nc; i++)
-		fprintf(fd, "/line%d %ld string def\n",
-		    i, (long) ps_bytesperrow);
-	fprintf(fd, "%lu %lu %d\n",
-	    (unsigned long) w, (unsigned long) h, bitspersample);
-	fprintf(fd, "[%lu 0 0 -%lu 0 %lu] \n",
-	    (unsigned long) w, (unsigned long) h, (unsigned long) h);
-	for (i = 0; i < nc; i++)
-		fprintf(fd, "{currentfile line%d readhexstring pop}bind\n", i);
-	fprintf(fd, "true %d colorimage\n", nc);
-}
-
-#define MAXLINE		36
-#define	DOBREAK(len, howmany, fd) \
-	if (((len) -= (howmany)) <= 0) {	\
-		putc('\n', fd);			\
-		(len) = MAXLINE-(howmany);	\
-	}
-#define	PUTHEX(c,fd)	putc(hex[((c)>>4)&0xf],fd); putc(hex[(c)&0xf],fd)
-
-void
-PSDataColorContig(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc)
-{
-	uint32 row;
-	int breaklen = MAXLINE, cc, es = samplesperpixel - nc;
-	unsigned char *tf_buf;
-	unsigned char *cp, c;
-
-	(void) w;
-	tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow);
-	if (tf_buf == NULL) {
-		TIFFError(filename, "No space for scanline buffer");
-		return;
-	}
-	for (row = 0; row < h; row++) {
-		if (TIFFReadScanline(tif, tf_buf, row, 0) < 0)
-			break;
-		cp = tf_buf;
-		if (alpha) {
-			int adjust;
-			cc = 0;
-			for (; cc < tf_bytesperrow; cc += samplesperpixel) {
-				DOBREAK(breaklen, nc, fd);
-				/*
-				 * For images with alpha, matte against
-				 * a white background; i.e.
-				 *    Cback * (1 - Aimage)
-				 * where Cback = 1.
-				 */
-				adjust = 255 - cp[nc];
-				switch (nc) {
-				case 4: c = *cp++ + adjust; PUTHEX(c,fd);
-				case 3: c = *cp++ + adjust; PUTHEX(c,fd);
-				case 2: c = *cp++ + adjust; PUTHEX(c,fd);
-				case 1: c = *cp++ + adjust; PUTHEX(c,fd);
-				}
-				cp += es;
-			}
-		} else {
-			cc = 0;
-			for (; cc < tf_bytesperrow; cc += samplesperpixel) {
-				DOBREAK(breaklen, nc, fd);
-				switch (nc) {
-				case 4: c = *cp++; PUTHEX(c,fd);
-				case 3: c = *cp++; PUTHEX(c,fd);
-				case 2: c = *cp++; PUTHEX(c,fd);
-				case 1: c = *cp++; PUTHEX(c,fd);
-				}
-				cp += es;
-			}
-		}
-	}
-	_TIFFfree((char *) tf_buf);
-}
-
-void
-PSDataColorSeparate(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc)
-{
-	uint32 row;
-	int breaklen = MAXLINE, cc, s, maxs;
-	unsigned char *tf_buf;
-	unsigned char *cp, c;
-
-	(void) w;
-	tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow);
-	if (tf_buf == NULL) {
-		TIFFError(filename, "No space for scanline buffer");
-		return;
-	}
-	maxs = (samplesperpixel > nc ? nc : samplesperpixel);
-	for (row = 0; row < h; row++) {
-		for (s = 0; s < maxs; s++) {
-			if (TIFFReadScanline(tif, tf_buf, row, s) < 0)
-				break;
-			for (cp = tf_buf, cc = 0; cc < tf_bytesperrow; cc++) {
-				DOBREAK(breaklen, 1, fd);
-				c = *cp++;
-				PUTHEX(c,fd);
-			}
-		}
-	}
-	_TIFFfree((char *) tf_buf);
-}
-
-#define	PUTRGBHEX(c,fd) \
-	PUTHEX(rmap[c],fd); PUTHEX(gmap[c],fd); PUTHEX(bmap[c],fd)
-
-void
-PSDataPalette(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	uint16 *rmap, *gmap, *bmap;
-	uint32 row;
-	int breaklen = MAXLINE, cc, nc;
-	unsigned char *tf_buf;
-	unsigned char *cp, c;
-
-	(void) w;
-	if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
-		TIFFError(filename, "Palette image w/o \"Colormap\" tag");
-		return;
-	}
-	switch (bitspersample) {
-	case 8:	case 4: case 2: case 1:
-		break;
-	default:
-		TIFFError(filename, "Depth %d not supported", bitspersample);
-		return;
-	}
-	nc = 3 * (8 / bitspersample);
-	tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow);
-	if (tf_buf == NULL) {
-		TIFFError(filename, "No space for scanline buffer");
-		return;
-	}
-	if (checkcmap(tif, 1<<bitspersample, rmap, gmap, bmap) == 16) {
-		int i;
-#define	CVT(x)		(((x) * 255) / ((1U<<16)-1))
-		for (i = (1<<bitspersample)-1; i >= 0; i--) {
-			rmap[i] = CVT(rmap[i]);
-			gmap[i] = CVT(gmap[i]);
-			bmap[i] = CVT(bmap[i]);
-		}
-#undef CVT
-	}
-	for (row = 0; row < h; row++) {
-		if (TIFFReadScanline(tif, tf_buf, row, 0) < 0)
-			break;
-		for (cp = tf_buf, cc = 0; cc < tf_bytesperrow; cc++) {
-			DOBREAK(breaklen, nc, fd);
-			switch (bitspersample) {
-			case 8:
-				c = *cp++; PUTRGBHEX(c, fd);
-				break;
-			case 4:
-				c = *cp++; PUTRGBHEX(c&0xf, fd);
-				c >>= 4;   PUTRGBHEX(c, fd);
-				break;
-			case 2:
-				c = *cp++; PUTRGBHEX(c&0x3, fd);
-				c >>= 2;   PUTRGBHEX(c&0x3, fd);
-				c >>= 2;   PUTRGBHEX(c&0x3, fd);
-				c >>= 2;   PUTRGBHEX(c, fd);
-				break;
-			case 1:
-				c = *cp++; PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c&0x1, fd);
-				c >>= 1;   PUTRGBHEX(c, fd);
-				break;
-			}
-		}
-	}
-	_TIFFfree((char *) tf_buf);
-}
-
-void
-PSDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	int breaklen = MAXLINE;
-	unsigned char* tf_buf;
-	unsigned char* cp;
-	tsize_t stripsize = TIFFStripSize(tif);
-	tstrip_t s;
-
-#if defined( EXP_ASCII85ENCODER )
-	int	ascii85_l;		/* Length, in bytes, of ascii85_p[] data */
-	uint8	*ascii85_p = 0;		/* Holds ASCII85 encoded data */
-#endif
-
-	(void) w; (void) h;
-	tf_buf = (unsigned char *) _TIFFmalloc(stripsize);
-	if (tf_buf == NULL) {
-		TIFFError(filename, "No space for scanline buffer");
-		return;
-	}
-
-#if defined( EXP_ASCII85ENCODER )
-	if ( ascii85 ) {
-	    /*
-	     * Allocate a buffer to hold the ASCII85 encoded data.  Note
-	     * that it is allocated with sufficient room to hold the
-	     * encoded data (5*stripsize/4) plus the EOD marker (+8)
-	     * and formatting line breaks.  The line breaks are more
-	     * than taken care of by using 6*stripsize/4 rather than
-	     * 5*stripsize/4.
-	     */
-
-	    ascii85_p = _TIFFmalloc( (stripsize+(stripsize/2)) + 8 );
-
-	    if ( !ascii85_p ) {
-		_TIFFfree( tf_buf );
-
-		TIFFError( filename, "Cannot allocate ASCII85 encoding buffer." );
-		return;
-	    }
-	}
-#endif
-
-	if (ascii85)
-		Ascii85Init();
-
-	for (s = 0; s < TIFFNumberOfStrips(tif); s++) {
-		int cc = TIFFReadEncodedStrip(tif, s, tf_buf, stripsize);
-		if (cc < 0) {
-			TIFFError(filename, "Can't read strip");
-			break;
-		}
-		cp = tf_buf;
-		if (photometric == PHOTOMETRIC_MINISWHITE) {
-			for (cp += cc; --cp >= tf_buf;)
-				*cp = ~*cp;
-			cp++;
-		}
-		if (ascii85) {
-#if defined( EXP_ASCII85ENCODER )
-			if (alpha) {
-				int adjust, i;
-				for (i = 0; i < cc; i+=2) {
-					adjust = 255 - cp[i + 1];
-				    cp[i / 2] = cp[i] + adjust;
-				}
-				cc /= 2;
-			}
-
-			ascii85_l = Ascii85EncodeBlock( ascii85_p, 1, cp, cc );
-
-			if ( ascii85_l > 0 )
-			    fwrite( ascii85_p, ascii85_l, 1, fd );
-#else
-			while (cc-- > 0)
-				Ascii85Put(*cp++, fd);
-#endif /* EXP_ASCII85_ENCODER */
-		} else {
-			unsigned char c;
-
-			if (alpha) {
-				int adjust;
-				while (cc-- > 0) {
-					DOBREAK(breaklen, 1, fd);
-					/*
-					 * For images with alpha, matte against
-					 * a white background; i.e.
-					 *    Cback * (1 - Aimage)
-					 * where Cback = 1.
-					 */
-					adjust = 255 - cp[1];
-					c = *cp++ + adjust; PUTHEX(c,fd);
-					cp++, cc--;
-				}
-			} else {
-				while (cc-- > 0) {
-					c = *cp++;
-					DOBREAK(breaklen, 1, fd);
-					PUTHEX(c, fd);
-				}
-			}
-		}
-	}
-
-	if ( !ascii85 )
-	{
-	    if ( level2 || level3)
-		fputs(">\n", fd);
-	}
-#if !defined( EXP_ASCII85ENCODER )
-	else
-	    Ascii85Flush(fd);
-#else
-	if ( ascii85_p )
-	    _TIFFfree( ascii85_p );
-#endif
-
-	_TIFFfree(tf_buf);
-}
-
-void
-PSRawDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h)
-{
-	uint32 *bc;
-	uint32 bufsize;
-	int breaklen = MAXLINE, cc;
-	uint16 fillorder;
-	unsigned char *tf_buf;
-	unsigned char *cp, c;
-	tstrip_t s;
-
-#if defined( EXP_ASCII85ENCODER )
-	int			ascii85_l;		/* Length, in bytes, of ascii85_p[] data */
-	uint8		*	ascii85_p = 0;		/* Holds ASCII85 encoded data */
-#endif
-
-	(void) w; (void) h;
-	TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder);
-	TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc);
-
-	/*
-	 * Find largest strip:
-	 */
-
-	bufsize = bc[0];
-
-	for ( s = 0; ++s < tf_numberstrips; ) {
-		if ( bc[s] > bufsize )
-			bufsize = bc[s];
-	}
-
-	tf_buf = (unsigned char*) _TIFFmalloc(bufsize);
-	if (tf_buf == NULL) {
-		TIFFError(filename, "No space for strip buffer");
-		return;
-	}
-
-#if defined( EXP_ASCII85ENCODER )
-	if ( ascii85 ) {
-	    /*
-	     * Allocate a buffer to hold the ASCII85 encoded data.  Note
-	     * that it is allocated with sufficient room to hold the
-	     * encoded data (5*bufsize/4) plus the EOD marker (+8)
-	     * and formatting line breaks.  The line breaks are more
-	     * than taken care of by using 6*bufsize/4 rather than
-	     * 5*bufsize/4.
-	     */
-
-	    ascii85_p = _TIFFmalloc( (bufsize+(bufsize/2)) + 8 );
-
-	    if ( !ascii85_p ) {
-		_TIFFfree( tf_buf );
-
-		TIFFError( filename, "Cannot allocate ASCII85 encoding buffer." );
-		return;
-	    }
-	}
-#endif
-
-	for (s = 0; s < tf_numberstrips; s++) {
-		cc = TIFFReadRawStrip(tif, s, tf_buf, bc[s]);
-		if (cc < 0) {
-			TIFFError(filename, "Can't read strip");
-			break;
-		}
-		if (fillorder == FILLORDER_LSB2MSB)
-			TIFFReverseBits(tf_buf, cc);
-		if (!ascii85) {
-			for (cp = tf_buf; cc > 0; cc--) {
-				DOBREAK(breaklen, 1, fd);
-				c = *cp++;
-				PUTHEX(c, fd);
-			}
-			fputs(">\n", fd);
-			breaklen = MAXLINE;
-		} else {
-			Ascii85Init();
-#if defined( EXP_ASCII85ENCODER )
-			ascii85_l = Ascii85EncodeBlock( ascii85_p, 1, tf_buf, cc );
-
-			if ( ascii85_l > 0 )
-				fwrite( ascii85_p, ascii85_l, 1, fd );
-#else
-			for (cp = tf_buf; cc > 0; cc--)
-				Ascii85Put(*cp++, fd);
-			Ascii85Flush(fd);
-#endif	/* EXP_ASCII85ENCODER */
-		}
-	}
-	_TIFFfree((char *) tf_buf);
-
-#if defined( EXP_ASCII85ENCODER )
-	if ( ascii85_p )
-		_TIFFfree( ascii85_p );
-#endif
-}
-
-void
-Ascii85Init(void)
-{
-	ascii85breaklen = 2*MAXLINE;
-	ascii85count = 0;
-}
-
-static char*
-Ascii85Encode(unsigned char* raw)
-{
-	static char encoded[6];
-	uint32 word;
-
-	word = (((raw[0]<<8)+raw[1])<<16) + (raw[2]<<8) + raw[3];
-	if (word != 0L) {
-		uint32 q;
-		uint16 w1;
-
-		q = word / (85L*85*85*85);	/* actually only a byte */
-		encoded[0] = q + '!';
-
-		word -= q * (85L*85*85*85); q = word / (85L*85*85);
-		encoded[1] = q + '!';
-
-		word -= q * (85L*85*85); q = word / (85*85);
-		encoded[2] = q + '!';
-
-		w1 = (uint16) (word - q*(85L*85));
-		encoded[3] = (w1 / 85) + '!';
-		encoded[4] = (w1 % 85) + '!';
-		encoded[5] = '\0';
-	} else
-		encoded[0] = 'z', encoded[1] = '\0';
-	return (encoded);
-}
-
-void
-Ascii85Put(unsigned char code, FILE* fd)
-{
-	ascii85buf[ascii85count++] = code;
-	if (ascii85count >= 4) {
-		unsigned char* p;
-		int n;
-
-		for (n = ascii85count, p = ascii85buf; n >= 4; n -= 4, p += 4) {
-			char* cp;
-			for (cp = Ascii85Encode(p); *cp; cp++) {
-				putc(*cp, fd);
-				if (--ascii85breaklen == 0) {
-					putc('\n', fd);
-					ascii85breaklen = 2*MAXLINE;
-				}
-			}
-		}
-		_TIFFmemcpy(ascii85buf, p, n);
-		ascii85count = n;
-	}
-}
-
-void
-Ascii85Flush(FILE* fd)
-{
-	if (ascii85count > 0) {
-		char* res;
-		_TIFFmemset(&ascii85buf[ascii85count], 0, 3);
-		res = Ascii85Encode(ascii85buf);
-		fwrite(res[0] == 'z' ? "!!!!" : res, ascii85count + 1, 1, fd);
-	}
-	fputs("~>\n", fd);
-}
-#if	defined( EXP_ASCII85ENCODER)
-
-#define A85BREAKCNTR    ascii85breaklen
-#define A85BREAKLEN     (2*MAXLINE)
-
-/*****************************************************************************
-*
-* Name:         Ascii85EncodeBlock( ascii85_p, f_eod, raw_p, raw_l )
-*
-* Description:  This routine will encode the raw data in the buffer described
-*               by raw_p and raw_l into ASCII85 format and store the encoding
-*               in the buffer given by ascii85_p.
-*
-* Parameters:   ascii85_p   -   A buffer supplied by the caller which will
-*                               contain the encoded ASCII85 data.
-*               f_eod       -   Flag: Nz means to end the encoded buffer with
-*                               an End-Of-Data marker.
-*               raw_p       -   Pointer to the buffer of data to be encoded
-*               raw_l       -   Number of bytes in raw_p[] to be encoded
-*
-* Returns:      (int)   <   0   Error, see errno
-*                       >=  0   Number of bytes written to ascii85_p[].
-*
-* Notes:        An external variable given by A85BREAKCNTR is used to
-*               determine when to insert newline characters into the
-*               encoded data.  As each byte is placed into ascii85_p this
-*               external is decremented.  If the variable is decrement to
-*               or past zero then a newline is inserted into ascii85_p
-*               and the A85BREAKCNTR is then reset to A85BREAKLEN.
-*                   Note:  for efficiency reasons the A85BREAKCNTR variable
-*                          is not actually checked on *every* character
-*                          placed into ascii85_p but often only for every
-*                          5 characters.
-*
-*               THE CALLER IS RESPONSIBLE FOR ENSURING THAT ASCII85_P[] IS
-*               SUFFICIENTLY LARGE TO THE ENCODED DATA!
-*                   You will need at least 5 * (raw_l/4) bytes plus space for
-*                   newline characters and space for an EOD marker (if
-*                   requested).  A safe calculation is to use 6*(raw_l/4) + 8
-*                   to size ascii85_p.
-*
-*****************************************************************************/
-
-int Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw_p, int raw_l )
-
-{
-    char                        ascii85[5];     /* Encoded 5 tuple */
-    int                         ascii85_l;      /* Number of bytes written to ascii85_p[] */
-    int                         rc;             /* Return code */
-    uint32                      val32;          /* Unencoded 4 tuple */
-
-    ascii85_l = 0;                              /* Nothing written yet */
-
-    if ( raw_p )
-    {
-        --raw_p;                                /* Prepare for pre-increment fetches */
-
-        for ( ; raw_l > 3; raw_l -= 4 )
-        {
-            val32  = *(++raw_p) << 24;
-            val32 += *(++raw_p) << 16;
-            val32 += *(++raw_p) <<  8;
-            val32 += *(++raw_p);
-    
-            if ( val32 == 0 )                   /* Special case */
-            {
-                ascii85_p[ascii85_l] = 'z';
-                rc = 1;
-            }
-    
-            else
-            {
-                ascii85[4] = (val32 % 85) + 33;
-                val32 /= 85;
-    
-                ascii85[3] = (val32 % 85) + 33;
-                val32 /= 85;
-    
-                ascii85[2] = (val32 % 85) + 33;
-                val32 /= 85;
-    
-                ascii85[1] = (val32 % 85) + 33;
-                ascii85[0] = (val32 / 85) + 33;
-
-                _TIFFmemcpy( &ascii85_p[ascii85_l], ascii85, sizeof(ascii85) );
-                rc = sizeof(ascii85);
-            }
-    
-            ascii85_l += rc;
-    
-            if ( (A85BREAKCNTR -= rc) <= 0 )
-            {
-                ascii85_p[ascii85_l] = '\n';
-                ++ascii85_l;
-                A85BREAKCNTR = A85BREAKLEN;
-            }
-        }
-    
-        /*
-         * Output any straggler bytes:
-         */
-    
-        if ( raw_l > 0 )
-        {
-            int             len;                /* Output this many bytes */
-    
-            len = raw_l + 1;
-            val32 = *++raw_p << 24;             /* Prime the pump */
-    
-            if ( --raw_l > 0 )  val32 += *(++raw_p) << 16;
-            if ( --raw_l > 0 )  val32 += *(++raw_p) <<  8;
-    
-            val32 /= 85;
-    
-            ascii85[3] = (val32 % 85) + 33;;
-            val32 /= 85;
-    
-            ascii85[2] = (val32 % 85) + 33;;
-            val32 /= 85;
-    
-            ascii85[1] = (val32 % 85) + 33;;
-            ascii85[0] = (val32 / 85) + 33;;
-    
-            _TIFFmemcpy( &ascii85_p[ascii85_l], ascii85, len );
-            ascii85_l += len;
-        }
-    }
-
-    /*
-     * If requested add an ASCII85 End Of Data marker:
-     */
-
-    if ( f_eod )
-    {
-        ascii85_p[ascii85_l++] = '~';
-        ascii85_p[ascii85_l++] = '>';
-        ascii85_p[ascii85_l++] = '\n';
-    }
-
-    return ( ascii85_l );
-
-}   /* Ascii85EncodeBlock() */
-
-#endif	/* EXP_ASCII85ENCODER */
-
-
-char* stuff[] = {
-"usage: tiff2ps [options] input.tif ...",
-"where options are:",
-" -1            generate PostScript Level 1 (default)",
-" -2            generate PostScript Level 2",
-" -3            generate PostScript Level 3",
-" -8            disable use of ASCII85 encoding with PostScript Level 2/3",
-" -a            convert all directories in file (default is first)",
-" -b #          set the bottom margin to # inches",
-" -c            center image (-b and -l still add to this)",
-" -d #          convert directory number #",
-" -D            enable duplex printing (two pages per sheet of paper)",
-" -e            generate Encapsulated PostScript (EPS) (implies -z)",
-" -h #          assume printed page height is # inches (default 11)",
-" -w #          assume printed page width is # inches (default 8.5)",
-" -H #          split image if height is more than # inches",
-" -L #          overLap split images by # inches",
-" -i #          enable/disable (Nz/0) pixel interpolation (default: enable)",
-" -l #          set the left margin to # inches",
-" -m            use \"imagemask\" operator instead of \"image\"",
-" -o #          convert directory at file offset #",
-" -O file       write PostScript to file instead of standard output",
-" -p            generate regular PostScript",
-" -r            rotate by 180 degrees",
-" -s            generate PostScript for a single image",
-" -T            print pages for top edge binding",
-" -x            override resolution units as centimeters",
-" -y            override resolution units as inches",
-" -z            enable printing in the deadzone (only for PostScript Level 2/3)",
-NULL
-};
-
-static void
-usage(int code)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(code);
-}
diff --git a/tkimg1.3/libtiff/tools/tiff2rgba.c b/tkimg1.3/libtiff/tools/tiff2rgba.c
deleted file mode 100644
index 4742cd4..0000000
--- a/tkimg1.3/libtiff/tools/tiff2rgba.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiff2rgba.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	CopyField(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-
-#ifndef howmany
-#define	howmany(x, y)	(((x)+((y)-1))/(y))
-#endif
-#define	roundup(x, y)	(howmany(x,y)*((uint32)(y)))
-
-uint16	compression = COMPRESSION_PACKBITS;
-uint32	rowsperstrip = (uint32) -1;
-int	process_by_block = 0; /* default is whole image at once */
-int     no_alpha = 0;
-
-
-static	int tiffcvt(TIFF* in, TIFF* out);
-static	void usage(int code);
-
-int
-main(int argc, char* argv[])
-{
-    TIFF *in, *out;
-    int c;
-    extern int optind;
-    extern char *optarg;
-
-    while ((c = getopt(argc, argv, "c:r:t:bn")) != -1)
-        switch (c) {
-          case 'b':
-            process_by_block = 1;
-            break;
-            
-          case 'c':
-            if (streq(optarg, "none"))
-                compression = COMPRESSION_NONE;
-            else if (streq(optarg, "packbits"))
-                compression = COMPRESSION_PACKBITS;
-            else if (streq(optarg, "lzw"))
-                compression = COMPRESSION_LZW;
-            else if (streq(optarg, "jpeg"))
-                compression = COMPRESSION_JPEG;
-            else if (streq(optarg, "zip"))
-                compression = COMPRESSION_DEFLATE;
-            else
-                usage(-1);
-            break;
-
-          case 'r':
-            rowsperstrip = atoi(optarg);
-            break;
-
-          case 't':
-            rowsperstrip = atoi(optarg);
-            break;
-            
-          case 'n':
-            no_alpha = 1;
-            break;
-            
-          case '?':
-            usage(0);
-            /*NOTREACHED*/
-        }
-
-    if (argc - optind < 2)
-        usage(-1);
-
-    out = TIFFOpen(argv[argc-1], "w");
-    if (out == NULL)
-        return (-2);
-
-    for (; optind < argc-1; optind++) {
-        in = TIFFOpen(argv[optind], "r");
-        if (in != NULL) {
-            do {
-                if (!tiffcvt(in, out) ||
-                    !TIFFWriteDirectory(out)) {
-                    (void) TIFFClose(out);
-                    return (1);
-                }
-            } while (TIFFReadDirectory(in));
-            (void) TIFFClose(in);
-        }
-    }
-    (void) TIFFClose(out);
-    return (0);
-}
-
-static int
-cvt_by_tile( TIFF *in, TIFF *out )
-
-{
-    uint32* raster;			/* retrieve RGBA image */
-    uint32  width, height;		/* image width & height */
-    uint32  tile_width, tile_height;
-    uint32  row, col;
-    uint32  *wrk_line;
-    int	    ok = 1;
-
-    TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-    TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
-
-    if( !TIFFGetField(in, TIFFTAG_TILEWIDTH, &tile_width)
-        || !TIFFGetField(in, TIFFTAG_TILELENGTH, &tile_height) ) {
-        TIFFError(TIFFFileName(in), "Source image not tiled");
-        return (0);
-    }
-    
-    TIFFSetField(out, TIFFTAG_TILEWIDTH, tile_width );
-    TIFFSetField(out, TIFFTAG_TILELENGTH, tile_height );
-
-    /*
-     * Allocate tile buffer
-     */
-    raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32));
-    if (raster == 0) {
-        TIFFError(TIFFFileName(in), "No space for raster buffer");
-        return (0);
-    }
-
-    /*
-     * Allocate a scanline buffer for swapping during the vertical
-     * mirroring pass.
-     */
-    wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32));
-    if (wrk_line == 0) {
-        TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
-        ok = 0;
-    }
-    
-    /*
-     * Loop over the tiles.
-     */
-    for( row = 0; ok && row < height; row += tile_height )
-    {
-        for( col = 0; ok && col < width; col += tile_width )
-        {
-            int		i_row;
-
-            /* Read the tile into an RGBA array */
-            if (!TIFFReadRGBATile(in, col, row, raster)) {
-                ok = 0;
-                break;
-            }
-
-            /*
-             * For some reason the TIFFReadRGBATile() function chooses the
-             * lower left corner as the origin.  Vertically mirror scanlines.
-             */
-            for( i_row = 0; i_row < tile_height / 2; i_row++ )
-            {
-                uint32	*top_line, *bottom_line;
-
-                top_line = raster + tile_width * i_row;
-                bottom_line = raster + tile_width * (tile_height-i_row-1);
-
-                _TIFFmemcpy(wrk_line, top_line, 4*tile_width);
-                _TIFFmemcpy(top_line, bottom_line, 4*tile_width);
-                _TIFFmemcpy(bottom_line, wrk_line, 4*tile_width);
-            }
-
-            /*
-             * Write out the result in a tile.
-             */
-
-            if( TIFFWriteEncodedTile( out,
-                                      TIFFComputeTile( out, col, row, 0, 0),
-                                      raster,
-                                      4 * tile_width * tile_height ) == -1 )
-            {
-                ok = 0;
-                break;
-            }
-        }
-    }
-
-    _TIFFfree( raster );
-    _TIFFfree( wrk_line );
-
-    return ok;
-}
-
-static int
-cvt_by_strip( TIFF *in, TIFF *out )
-
-{
-    uint32* raster;			/* retrieve RGBA image */
-    uint32  width, height;		/* image width & height */
-    uint32  row;
-    uint32  *wrk_line;
-    int	    ok = 1;
-
-    TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-    TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
-
-    if( !TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip) ) {
-        TIFFError(TIFFFileName(in), "Source image not in strips");
-        return (0);
-    }
-    
-    TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-    /*
-     * Allocate strip buffer
-     */
-    raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32));
-    if (raster == 0) {
-        TIFFError(TIFFFileName(in), "No space for raster buffer");
-        return (0);
-    }
-
-    /*
-     * Allocate a scanline buffer for swapping during the vertical
-     * mirroring pass.
-     */
-    wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32));
-    if (wrk_line == 0) {
-        TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
-        ok = 0;
-    }
-    
-    /*
-     * Loop over the strips.
-     */
-    for( row = 0; ok && row < height; row += rowsperstrip )
-    {
-        int	rows_to_write, i_row;
-
-        /* Read the strip into an RGBA array */
-        if (!TIFFReadRGBAStrip(in, row, raster)) {
-            ok = 0;
-            break;
-        }
-
-        /*
-         * Figure out the number of scanlines actually in this strip.
-         */
-        if( row + rowsperstrip > height )
-            rows_to_write = height - row;
-        else
-            rows_to_write = rowsperstrip;
-
-        /*
-         * For some reason the TIFFReadRGBAStrip() function chooses the
-         * lower left corner as the origin.  Vertically mirror scanlines.
-         */
-
-        for( i_row = 0; i_row < rows_to_write / 2; i_row++ )
-        {
-            uint32	*top_line, *bottom_line;
-
-            top_line = raster + width * i_row;
-            bottom_line = raster + width * (rows_to_write-i_row-1);
-
-            _TIFFmemcpy(wrk_line, top_line, 4*width);
-            _TIFFmemcpy(top_line, bottom_line, 4*width);
-            _TIFFmemcpy(bottom_line, wrk_line, 4*width);
-        }
-
-        /*
-         * Write out the result in a strip
-         */
-
-        if( TIFFWriteEncodedStrip( out, row / rowsperstrip, raster,
-                                   4 * rows_to_write * width ) == -1 )
-        {
-            ok = 0;
-            break;
-        }
-    }
-
-    _TIFFfree( raster );
-    _TIFFfree( wrk_line );
-
-    return ok;
-}
-
-/*
- * cvt_whole_image()
- *
- * read the whole image into one big RGBA buffer and then write out
- * strips from that.  This is using the traditional TIFFReadRGBAImage()
- * API that we trust.
- */
-
-static int
-cvt_whole_image( TIFF *in, TIFF *out )
-
-{
-    uint32* raster;			/* retrieve RGBA image */
-    uint32  width, height;		/* image width & height */
-    uint32	row;
-    uint32  *wrk_line;
-        
-        
-    TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-    TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
-
-    rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
-    TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-    raster = (uint32*)_TIFFmalloc(width * height * sizeof (uint32));
-    if (raster == 0) {
-        TIFFError(TIFFFileName(in), "No space for raster buffer");
-        return (0);
-    }
-
-    /* Read the image in one chunk into an RGBA array */
-    if (!TIFFReadRGBAImageOriented(in, width, height, raster,
-                                   ORIENTATION_TOPLEFT, 0)) {
-        _TIFFfree(raster);
-        return (0);
-    }
-
-    /*
-    ** Do we want to strip away alpha components?
-    */
-    if( no_alpha )
-    {
-        int	pixel_count = width * height;
-        unsigned char *src, *dst;
-
-        src = (unsigned char *) raster;
-        dst = (unsigned char *) raster;
-        while( pixel_count > 0 )
-        {
-            *(dst++) = *(src++);
-            *(dst++) = *(src++);
-            *(dst++) = *(src++);
-            src++;
-            pixel_count--;
-        }
-    }
-
-    /* Write out the result in strips */
-
-    for( row = 0; row < height; row += rowsperstrip )
-    {
-        unsigned char * raster_strip;
-        int	rows_to_write;
-        int	bytes_per_pixel;
-
-        if( no_alpha )
-        {
-            raster_strip = ((unsigned char *) raster) + 3 * row * width;
-            bytes_per_pixel = 3;
-        }
-        else
-        {
-            raster_strip = (unsigned char *) (raster + row * width);
-            bytes_per_pixel = 4;
-        }
-
-        if( row + rowsperstrip > height )
-            rows_to_write = height - row;
-        else
-            rows_to_write = rowsperstrip;
-
-        if( TIFFWriteEncodedStrip( out, row / rowsperstrip, raster_strip,
-                             bytes_per_pixel * rows_to_write * width ) == -1 )
-        {
-            _TIFFfree( raster );
-            return 0;
-        }
-    }
-
-    _TIFFfree( raster );
-
-    return 1;
-}
-
-
-static int
-tiffcvt(TIFF* in, TIFF* out)
-{
-	uint32 width, height;		/* image width & height */
-	uint16 shortv;
-	float floatv;
-	char *stringv;
-	uint32 longv;
-        uint16 v[1];
-
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
-
-	CopyField(TIFFTAG_SUBFILETYPE, longv);
-	TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, height);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-
-	CopyField(TIFFTAG_FILLORDER, shortv);
-	TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-
-        if( no_alpha )
-            TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3);
-        else
-            TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 4);
-
-        if( !no_alpha )
-        {
-            v[0] = EXTRASAMPLE_ASSOCALPHA;
-            TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v);
-        }
-
-	CopyField(TIFFTAG_XRESOLUTION, floatv);
-	CopyField(TIFFTAG_YRESOLUTION, floatv);
-	CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
-	CopyField(TIFFTAG_DOCUMENTNAME, stringv);
-
-        if( process_by_block && TIFFIsTiled( in ) )
-            return( cvt_by_tile( in, out ) );
-        else if( process_by_block )
-            return( cvt_by_strip( in, out ) );
-        else
-            return( cvt_whole_image( in, out ) );
-}
-
-static char* stuff[] = {
-    "usage: tiff2rgba [-c comp] [-r rows] [-b] input... output\n",
-    "where comp is one of the following compression algorithms:\n",
-    " jpeg\t\tJPEG encoding\n",
-    " zip\t\tLempel-Ziv & Welch encoding\n",
-    " lzw\t\tLempel-Ziv & Welch encoding\n",
-    " (lzw compression unsupported by default due to Unisys patent enforcement)\n",
-    " packbits\tPackBits encoding\n",
-    " none\t\tno compression\n",
-    "and the other options are:\n",
-    " -r\trows/strip\n",
-    " -b (progress by block rather than as a whole image)\n",
-    " -n don't emit alpha component.\n",
-    NULL
-};
-
-static void
-usage(int code)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(code);
-}
diff --git a/tkimg1.3/libtiff/tools/tiffcmp.c b/tkimg1.3/libtiff/tools/tiffcmp.c
deleted file mode 100644
index 3d06a77..0000000
--- a/tkimg1.3/libtiff/tools/tiffcmp.c
+++ /dev/null
@@ -1,535 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffcmp.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-static	int stopondiff = 1;
-static	int stoponfirsttag = 1;
-static	uint16 bitspersample = 1;
-static	uint16 samplesperpixel = 1;
-static	uint32 imagewidth;
-static	uint32 imagelength;
-
-static	void usage(void);
-static	int tiffcmp(TIFF*, TIFF*);
-static	int cmptags(TIFF*, TIFF*);
-static	void ContigCompare(int, uint32, unsigned char*, unsigned char*, int);
-static	void PrintDiff(uint32, int, uint32, int, int);
-static	void SeparateCompare(int, int, uint32, unsigned char*, unsigned char*);
-static	void eof(const char*, uint32, int);
-
-int
-main(int argc, char* argv[])
-{
-	TIFF *tif1, *tif2;
-	int c, dirnum;
-	extern int optind;
-	extern char* optarg;
-
-	while ((c = getopt(argc, argv, "ltz:")) != -1)
-		switch (c) {
-		case 'l':
-			stopondiff = 0;
-			break;
-		case 'z':
-			stopondiff = atoi(optarg);
-			break;
-		case 't':
-			stoponfirsttag = 0;
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind < 2)
-		usage();
-	tif1 = TIFFOpen(argv[optind], "r");
-	if (tif1 == NULL)
-		return (-1);
-	tif2 = TIFFOpen(argv[optind+1], "r");
-	if (tif2 == NULL)
-		return (-2);
-	dirnum = 0;
-	while (tiffcmp(tif1, tif2)) {
-		if (!TIFFReadDirectory(tif1)) {
-			if (!TIFFReadDirectory(tif2))
-				break;
-			printf("No more directories for %s\n",
-			    TIFFFileName(tif1));
-			return (1);
-		} else if (!TIFFReadDirectory(tif2)) {
-			printf("No more directories for %s\n",
-			    TIFFFileName(tif2));
-			return (1);
-		}
-		printf("Directory %d:\n", ++dirnum);
-	}
-	return (0);
-}
-
-char* stuff[] = {
-"usage: tiffcmp [options] file1 file2",
-"where options are:",
-" -l		list each byte of image data that differs between the files",
-" -z #		list specified number of bytes that differs between the files",
-" -t		ignore any differences in directory tags",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-#define	checkEOF(tif, row, sample) { \
-	eof(TIFFFileName(tif), row, sample); \
-	goto bad; \
-}
-
-static	int CheckShortTag(TIFF*, TIFF*, int, char*);
-static	int CheckShort2Tag(TIFF*, TIFF*, int, char*);
-static	int CheckShortArrayTag(TIFF*, TIFF*, int, char*);
-static	int CheckLongTag(TIFF*, TIFF*, int, char*);
-static	int CheckFloatTag(TIFF*, TIFF*, int, char*);
-static	int CheckStringTag(TIFF*, TIFF*, int, char*);
-
-static int
-tiffcmp(TIFF* tif1, TIFF* tif2)
-{
-	uint16 config1, config2;
-	tsize_t size1;
-	uint32 s, row;
-	unsigned char *buf1, *buf2;
-
-	if (!CheckShortTag(tif1, tif2, TIFFTAG_BITSPERSAMPLE, "BitsPerSample"))
-		return (0);
-	if (!CheckShortTag(tif1, tif2, TIFFTAG_SAMPLESPERPIXEL, "SamplesPerPixel"))
-		return (0);
-	if (!CheckLongTag(tif1, tif2, TIFFTAG_IMAGEWIDTH, "ImageWidth"))
-		return (0);
-	if (!cmptags(tif1, tif2))
-		return (1);
-	(void) TIFFGetField(tif1, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-	(void) TIFFGetField(tif1, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-	(void) TIFFGetField(tif1, TIFFTAG_IMAGEWIDTH, &imagewidth);
-	(void) TIFFGetField(tif1, TIFFTAG_IMAGELENGTH, &imagelength);
-	(void) TIFFGetField(tif1, TIFFTAG_PLANARCONFIG, &config1);
-	(void) TIFFGetField(tif2, TIFFTAG_PLANARCONFIG, &config2);
-	buf1 = (unsigned char *)_TIFFmalloc(size1 = TIFFScanlineSize(tif1));
-	buf2 = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif2));
-	if (buf1 == NULL || buf2 == NULL) {
-		fprintf(stderr, "No space for scanline buffers\n");
-		exit(-1);
-	}
-	if (config1 != config2 && bitspersample != 8 && samplesperpixel > 1) {
-		fprintf(stderr,
-"Can't handle different planar configuration w/ different bits/sample\n");
-		goto bad;
-	}
-#define	pack(a,b)	((a)<<8)|(b)
-	switch (pack(config1, config2)) {
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG):
-		for (row = 0; row < imagelength; row++) {
-			if (TIFFReadScanline(tif2, buf2, row, 0) < 0)
-				checkEOF(tif2, row, -1)
-			for (s = 0; s < samplesperpixel; s++) {
-				if (TIFFReadScanline(tif1, buf1, row, s) < 0)
-					checkEOF(tif1, row, s)
-				SeparateCompare(1, s, row, buf2, buf1);
-			}
-		}
-		break;
-	case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE):
-		for (row = 0; row < imagelength; row++) {
-			if (TIFFReadScanline(tif1, buf1, row, 0) < 0)
-				checkEOF(tif1, row, -1)
-			for (s = 0; s < samplesperpixel; s++) {
-				if (TIFFReadScanline(tif2, buf2, row, s) < 0)
-					checkEOF(tif2, row, s)
-				SeparateCompare(0, s, row, buf1, buf2);
-			}
-		}
-		break;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE):
-		for (s = 0; s < samplesperpixel; s++)
-			for (row = 0; row < imagelength; row++) {
-				if (TIFFReadScanline(tif1, buf1, row, s) < 0)
-					checkEOF(tif1, row, s)
-				if (TIFFReadScanline(tif2, buf2, row, s) < 0)
-					checkEOF(tif2, row, s)
-				ContigCompare(s, row, buf1, buf2, size1);
-			}
-		break;
-	case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG):
-		for (row = 0; row < imagelength; row++) {
-			if (TIFFReadScanline(tif1, buf1, row, 0) < 0)
-				checkEOF(tif1, row, -1)
-			if (TIFFReadScanline(tif2, buf2, row, 0) < 0)
-				checkEOF(tif2, row, -1)
-			ContigCompare(-1, row, buf1, buf2, size1);
-		}
-		break;
-	}
-	if (buf1) _TIFFfree(buf1);
-	if (buf2) _TIFFfree(buf2);
-	return (1);
-bad:
-	if (stopondiff)
-		exit(1);
-	if (buf1) _TIFFfree(buf1);
-	if (buf2) _TIFFfree(buf2);
-	return (0);
-}
-
-#define	CmpShortField(tag, name) \
-	if (!CheckShortTag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-#define	CmpShortField2(tag, name) \
-	if (!CheckShort2Tag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-#define	CmpLongField(tag, name) \
-	if (!CheckLongTag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-#define	CmpFloatField(tag, name) \
-	if (!CheckFloatTag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-#define	CmpStringField(tag, name) \
-	if (!CheckStringTag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-#define	CmpShortArrayField(tag, name) \
-	if (!CheckShortArrayTag(tif1, tif2, tag, name) && stoponfirsttag) return (0)
-
-static int
-cmptags(TIFF* tif1, TIFF* tif2)
-{
-	CmpLongField(TIFFTAG_SUBFILETYPE,	"SubFileType");
-	CmpLongField(TIFFTAG_IMAGEWIDTH,	"ImageWidth");
-	CmpLongField(TIFFTAG_IMAGELENGTH,	"ImageLength");
-	CmpShortField(TIFFTAG_BITSPERSAMPLE,	"BitsPerSample");
-	CmpShortField(TIFFTAG_COMPRESSION,	"Compression");
-	CmpShortField(TIFFTAG_PREDICTOR,	"Predictor");
-	CmpShortField(TIFFTAG_PHOTOMETRIC,	"PhotometricInterpretation");
-	CmpShortField(TIFFTAG_THRESHHOLDING,	"Thresholding");
-	CmpShortField(TIFFTAG_FILLORDER,	"FillOrder");
-	CmpShortField(TIFFTAG_ORIENTATION,	"Orientation");
-	CmpShortField(TIFFTAG_SAMPLESPERPIXEL,	"SamplesPerPixel");
-	CmpShortField(TIFFTAG_MINSAMPLEVALUE,	"MinSampleValue");
-	CmpShortField(TIFFTAG_MAXSAMPLEVALUE,	"MaxSampleValue");
-	CmpFloatField(TIFFTAG_XRESOLUTION,	"XResolution");
-	CmpFloatField(TIFFTAG_YRESOLUTION,	"YResolution");
-	CmpLongField(TIFFTAG_GROUP3OPTIONS,	"Group3Options");
-	CmpLongField(TIFFTAG_GROUP4OPTIONS,	"Group4Options");
-	CmpShortField(TIFFTAG_RESOLUTIONUNIT,	"ResolutionUnit");
-	CmpShortField(TIFFTAG_PLANARCONFIG,	"PlanarConfiguration");
-	CmpLongField(TIFFTAG_ROWSPERSTRIP,	"RowsPerStrip");
-	CmpFloatField(TIFFTAG_XPOSITION,	"XPosition");
-	CmpFloatField(TIFFTAG_YPOSITION,	"YPosition");
-	CmpShortField(TIFFTAG_GRAYRESPONSEUNIT, "GrayResponseUnit");
-	CmpShortField(TIFFTAG_COLORRESPONSEUNIT, "ColorResponseUnit");
-#ifdef notdef
-	{ uint16 *graycurve;
-	  CmpField(TIFFTAG_GRAYRESPONSECURVE, graycurve);
-	}
-	{ uint16 *red, *green, *blue;
-	  CmpField3(TIFFTAG_COLORRESPONSECURVE, red, green, blue);
-	}
-	{ uint16 *red, *green, *blue;
-	  CmpField3(TIFFTAG_COLORMAP, red, green, blue);
-	}
-#endif
-	CmpShortField2(TIFFTAG_PAGENUMBER,	"PageNumber");
-	CmpStringField(TIFFTAG_ARTIST,		"Artist");
-	CmpStringField(TIFFTAG_IMAGEDESCRIPTION,"ImageDescription");
-	CmpStringField(TIFFTAG_MAKE,		"Make");
-	CmpStringField(TIFFTAG_MODEL,		"Model");
-	CmpStringField(TIFFTAG_SOFTWARE,	"Software");
-	CmpStringField(TIFFTAG_DATETIME,	"DateTime");
-	CmpStringField(TIFFTAG_HOSTCOMPUTER,	"HostComputer");
-	CmpStringField(TIFFTAG_PAGENAME,	"PageName");
-	CmpStringField(TIFFTAG_DOCUMENTNAME,	"DocumentName");
-	CmpShortField(TIFFTAG_MATTEING,		"Matteing");
-	CmpShortArrayField(TIFFTAG_EXTRASAMPLES,"ExtraSamples");
-	return (1);
-}
-
-static void
-ContigCompare(int sample, uint32 row, unsigned char* p1, unsigned char* p2, int size)
-{
-    register uint32 pix;
-    register int ppb = 8/bitspersample;
-    int	 samples_to_test;
-
-    if( sample == -1 )
-        samples_to_test = samplesperpixel;
-    else
-        samples_to_test = 1;
-
-    if (memcmp(p1, p2, size) == 0)
-        return;
-
-    switch (bitspersample) {
-      case 1: case 2: case 4: case 8: 
-      {
-          register unsigned char *pix1 = p1, *pix2 = p2;
-
-          for (pix = 0; pix < imagewidth; pix += ppb)
-          {
-              int		s;
-
-              for( s = 0; s < samples_to_test; s++ )
-              {
-                  if (*pix1 != *pix2)
-                  {
-                      if( sample == -1 )
-                          PrintDiff(row, s, pix,
-                                    *pix1, *pix2);
-                      else
-                          PrintDiff(row, sample, pix,
-                                    *pix1, *pix2);
-                  }
-
-                  pix1++;
-                  pix2++;
-              }
-          }
-          break;
-      }
-      case 16: 
-      {
-          register uint16 *pix1 = (uint16 *)p1, *pix2 = (uint16 *)p2;
-
-          for (pix = 0; pix < imagewidth; pix++)
-          {
-              int	s;
-
-              for( s = 0; s < samples_to_test; s++ )
-              {
-                  if (*pix1 != *pix2)
-                      PrintDiff(row, sample, pix,
-                                *pix1, *pix2);
-                        
-                  pix1++;
-                  pix2++;
-              }
-          }
-          break;
-      }
-    }
-}
-
-static void
-PrintDiff(uint32 row, int sample, uint32 pix, int w1, int w2)
-{
-	register int mask1, mask2, s, bps;
-
-	if (sample < 0)
-		sample = 0;
-	bps = bitspersample;
-	switch (bps) {
-	case 1:
-	case 2:
-	case 4:
-		mask1 =  ~((-1)<<bps);
-		s = (8-bps);
-		mask2 = mask1<<s;
-		for (; mask2 && pix < imagewidth; mask2 >>= bps, s -= bps, pix++) {
-			if ((w1 & mask2) ^ (w2 & mask2)) {
-				printf(
-			"Scanline %lu, pixel %lu, sample %d: %01x %01x\n",
-	    				(long) row, (long) pix,
-					sample, (w1 >> s) & mask1,
-					(w2 >> s) & mask1 );
-				if (--stopondiff == 0)
-					exit(1);
-			}
-		}
-		break;
-	case 8: 
-		printf("Scanline %lu, pixel %lu, sample %d: %02x %02x\n",
-		    (long) row, (long) pix, sample, w1, w2);
-		if (--stopondiff == 0)
-			exit(1);
-		break;
-	case 16:
-		printf("Scanline %lu, pixel %lu, sample %d: %04x %04x\n",
-		    (long) row, (long) pix, sample, w1, w2);
-		if (--stopondiff == 0)
-			exit(1);
-		break;
-	}
-}
-
-static void
-SeparateCompare(int reversed, int sample, uint32 row, unsigned char* cp1, unsigned char* p2)
-{
-	uint32 npixels = imagewidth;
-	register int pixel;
-
-	cp1 += sample;
-	for (pixel = 0; npixels-- > 0; pixel++, cp1 += samplesperpixel, p2++)
-		if (*cp1 != *p2) {
-			printf("Scanline %lu, pixel %lu, sample %ld: ",
-			    (long) row, (long) pixel, (long) sample);
-			if (reversed)
-				printf("%02x %02x\n", *p2, *cp1);
-			else
-				printf("%02x %02x\n", *cp1, *p2);
-			if (--stopondiff == 0)
-				exit(1);
-		}
-}
-
-static int
-checkTag(TIFF* tif1, TIFF* tif2, int tag, char* name, void* p1, void* p2)
-{
-
-	if (TIFFGetField(tif1, tag, p1)) {
-		if (!TIFFGetField(tif2, tag, p2)) {
-			printf("%s tag appears only in %s\n",
-			    name, TIFFFileName(tif1));
-			return (0);
-		}
-		return (1);
-	} else if (TIFFGetField(tif2, tag, p2)) {
-		printf("%s tag appears only in %s\n", name, TIFFFileName(tif2));
-		return (0);
-	}
-	return (-1);
-}
-
-#define	CHECK(cmp, fmt) {				\
-	switch (checkTag(tif1,tif2,tag,name,&v1,&v2)) {	\
-	case 1:	if (cmp)				\
-	case -1:	return (1);			\
-		printf(fmt, name, v1, v2);		\
-	}						\
-	return (0);					\
-}
-
-static int
-CheckShortTag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	uint16 v1, v2;
-	CHECK(v1 == v2, "%s: %u %u\n");
-}
-
-static int
-CheckShort2Tag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	uint16 v11, v12, v21, v22;
-
-	if (TIFFGetField(tif1, tag, &v11, &v12)) {
-		if (!TIFFGetField(tif2, tag, &v21, &v22)) {
-			printf("%s tag appears only in %s\n",
-			    name, TIFFFileName(tif1));
-			return (0);
-		}
-		if (v11 == v21 && v12 == v22)
-			return (1);
-		printf("%s: <%u,%u> <%u,%u>\n", name, v11, v12, v21, v22);
-	} else if (TIFFGetField(tif2, tag, &v21, &v22))
-		printf("%s tag appears only in %s\n", name, TIFFFileName(tif2));
-	else
-		return (1);
-	return (0);
-}
-
-static int
-CheckShortArrayTag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	uint16 n1, *a1;
-	uint16 n2, *a2;
-
-	if (TIFFGetField(tif1, tag, &n1, &a1)) {
-		if (!TIFFGetField(tif2, tag, &n2, &a2)) {
-			printf("%s tag appears only in %s\n",
-			    name, TIFFFileName(tif1));
-			return (0);
-		}
-		if (n1 == n2) {
-			char* sep;
-			uint16 i;
-
-			if (memcmp(a1, a2, n1) == 0)
-				return (1);
-			printf("%s: value mismatch, <%u:", name, n1);
-			sep = "";
-			for (i = 0; i < n1; i++)
-				printf("%s%u", sep, a1[i]), sep = ",";
-			printf("> and <%u: ", n2);
-			sep = "";
-			for (i = 0; i < n2; i++)
-				printf("%s%u", sep, a2[i]), sep = ",";
-			printf(">\n");
-		} else
-			printf("%s: %u items in %s, %u items in %s", name,
-			    n1, TIFFFileName(tif1),
-			    n2, TIFFFileName(tif2)
-			);
-	} else if (TIFFGetField(tif2, tag, &n2, &a2))
-		printf("%s tag appears only in %s\n", name, TIFFFileName(tif2));
-	else
-		return (1);
-	return (0);
-}
-
-static int
-CheckLongTag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	uint32 v1, v2;
-	CHECK(v1 == v2, "%s: %lu %lu\n");
-}
-
-static int
-CheckFloatTag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	float v1, v2;
-	CHECK(v1 == v2, "%s: %g %g\n");
-}
-
-static int
-CheckStringTag(TIFF* tif1, TIFF* tif2, int tag, char* name)
-{
-	char *v1, *v2;
-	CHECK(strcmp(v1, v2) == 0, "%s: \"%s\" \"%s\"\n");
-}
-
-static void
-eof(const char* name, uint32 row, int s)
-{
-
-	printf("%s: EOF at scanline %lu", name, row);
-	if (s >= 0)
-		printf(", sample %d", s);
-	printf("\n");
-}
diff --git a/tkimg1.3/libtiff/tools/tiffcp.c b/tkimg1.3/libtiff/tools/tiffcp.c
deleted file mode 100644
index 6b33e7d..0000000
--- a/tkimg1.3/libtiff/tools/tiffcp.c
+++ /dev/null
@@ -1,1541 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffcp.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- *  Revised:  2/18/01 BAR -- added syntax for extracting single images from
- *                          multi-image TIFF files.
- *
- *    New syntax is:  sourceFileName,image#
- *
- * image# ranges from 0..<n-1> where n is the # of images in the file.
- * There may be no white space between the comma and the filename or
- * image number.
- *
- *    Example:   tiffcp source.tif,1 destination.tif
- *
- * Copies the 2nd image in source.tif to the destination.
- *
- *****
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <ctype.h>
-#include <assert.h>
-
-#include "tiffio.h"
-
-#if defined(VMS)
-#define unlink delete
-#endif
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-#define	TRUE	1
-#define	FALSE	0
-
-static  int outtiled = -1;
-static  uint32 tilewidth;
-static  uint32 tilelength;
-
-static	uint16 config;
-static	uint16 compression;
-static	uint16 predictor;
-static	uint16 fillorder;
-static	uint16 orientation;
-static	uint32 rowsperstrip;
-static	uint32 g3opts;
-static	int ignore = FALSE;		/* if true, ignore read errors */
-static	uint32 defg3opts = (uint32) -1;
-static	int quality = 75;		/* JPEG quality */
-static	int jpegcolormode = JPEGCOLORMODE_RGB;
-static	uint16 defcompression = (uint16) -1;
-static	uint16 defpredictor = (uint16) -1;
-
-static	int tiffcp(TIFF*, TIFF*);
-static	int processCompressOptions(char*);
-static	void usage(void);
-
-static char comma = ',';  /* (default) comma separator character */
-static TIFF* bias = NULL;
-static int pageNum = 0;
-
-static int nextSrcImage (TIFF *tif, char **imageSpec)
-/*
-  seek to the next image specified in *imageSpec
-  returns 1 if success, 0 if no more images to process
-  *imageSpec=NULL if subsequent images should be processed in sequence
-*/
-{
-  if (**imageSpec == comma) {  /* if not @comma, we've done all images */
-    char *start = *imageSpec + 1;
-    unsigned long nextImage = strtol (start, imageSpec, 0);
-    if (start == *imageSpec) nextImage = TIFFCurrentDirectory (tif);
-    if (**imageSpec)
-    {
-      if (**imageSpec == comma) {  
-        /* a trailing comma denotes remaining images in sequence */
-        if ((*imageSpec)[1] == '\0') *imageSpec = NULL;
-      }else{
-        fprintf (stderr, 
-          "Expected a %c separated image # list after %s\n",
-          comma, TIFFFileName (tif));
-        exit (-4);   /* syntax error */
-      }
-    }
-    if (TIFFSetDirectory (tif, nextImage)) return 1;  
-    fprintf (stderr, "%s%c%d not found!\n", 
-             TIFFFileName(tif), comma, (int) nextImage); 
-  }
-  return 0;
-}
-
-  
-static TIFF* openSrcImage (char **imageSpec)
-/*
-  imageSpec points to a pointer to a filename followed by optional ,image#'s
-  Open the TIFF file and assign *imageSpec to either NULL if there are
-  no images specified, or a pointer to the next image number text
-*/
-{
-    TIFF *tif;
-    char *fn = *imageSpec;
-    *imageSpec = strchr (fn, comma);
-    if (*imageSpec) {  /* there is at least one image number specifier */
-        **imageSpec = '\0'; 
-        tif = TIFFOpen (fn, "r");
-        /* but, ignore any single trailing comma */
-        if (!(*imageSpec)[1]) {*imageSpec = NULL; return tif;}
-        if (tif) { 
-            **imageSpec = comma;  /* replace the comma */
-            if (!nextSrcImage(tif, imageSpec)) {
-              TIFFClose (tif);
-              tif = NULL;
-            }
-        }
-    }else
-        tif = TIFFOpen (fn, "r");
-    return tif;
-}
-
-
-int
-main(int argc, char* argv[])
-{
-	uint16 defconfig = (uint16) -1;
-	uint16 deffillorder = 0;
-	uint32 deftilewidth = (uint32) -1;
-	uint32 deftilelength = (uint32) -1;
-	uint32 defrowsperstrip = (uint32) 0;
-	uint32 diroff = 0;
-	TIFF* in;
-	TIFF* out;
-	char mode[10];
-	char* mp = mode;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	*mp++ = 'w';
-	*mp = '\0';
-	while ((c = getopt(argc, argv, ",:b:c:f:l:o:z:p:r:w:aistBLMC")) != -1)
-		switch (c) {
-                case ',':
-                        if (optarg[0] != '=') usage();
-                        comma = optarg[1];
-                        break;
-                case 'b':   /* this file is bias image subtracted from others */
-                        if (bias) {
-                          fputs ("Only 1 bias image may be specified\n", stderr);
-                          exit (-2);
-                        }
-                        {
-                          uint16    samples = (uint16) -1;
-                          char **biasFn = &optarg;
-                          bias = openSrcImage (biasFn);
-                          if (!bias) exit (-5);
-                          if (TIFFIsTiled (bias)) {
-                     fputs ("Bias image must be organized in strips\n", stderr);
-                            exit (-7);
-                          }
-		          TIFFGetField(bias, TIFFTAG_SAMPLESPERPIXEL, &samples);
-                          if (samples != 1) {
-                     fputs ("Bias image must be monochrome\n", stderr);
-                            exit (-7);
-                          }
-                        }
-                        break;
-		case 'a':		/* append to output */
-			mode[0] = 'a';
-			break;
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'f':		/* fill order */
-			if (streq(optarg, "lsb2msb"))
-				deffillorder = FILLORDER_LSB2MSB;
-			else if (streq(optarg, "msb2lsb"))
-				deffillorder = FILLORDER_MSB2LSB;
-			else
-				usage();
-			break;
-		case 'i':		/* ignore errors */
-			ignore = TRUE;
-			break;
-		case 'l':		/* tile length */
-			outtiled = TRUE;
-			deftilelength = atoi(optarg);
-			break;
-		case 'o':		/* initial directory offset */
-			diroff = strtoul(optarg, NULL, 0);
-			break;
-		case 'p':		/* planar configuration */
-			if (streq(optarg, "separate"))
-				defconfig = PLANARCONFIG_SEPARATE;
-			else if (streq(optarg, "contig"))
-				defconfig = PLANARCONFIG_CONTIG;
-			else
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			defrowsperstrip = atol(optarg);
-			break;
-		case 's':		/* generate stripped output */
-			outtiled = FALSE;
-			break;
-		case 't':		/* generate tiled output */
-			outtiled = TRUE;
-			break;
-		case 'w':		/* tile width */
-			outtiled = TRUE;
-			deftilewidth = atoi(optarg);
-			break;
-		case 'B':
-			*mp++ = 'b'; *mp = '\0';
-			break;
-		case 'L':
-			*mp++ = 'l'; *mp = '\0';
-			break;
-		case 'M':
-			*mp++ = 'm'; *mp = '\0';
-			break;
-		case 'C':
-			*mp++ = 'c'; *mp = '\0';
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind < 2)
-		usage();
-	out = TIFFOpen(argv[argc-1], mode);
-	if (out == NULL)
-		return (-2);
-	if ((argc - optind) == 2)
-	  pageNum = -1;
-	for (; optind < argc-1 ; optind++) {
-                char *imageCursor = argv[optind];
-		in = openSrcImage (&imageCursor);
-		if (in == NULL)
-			return (-3);
-		if (diroff != 0 && !TIFFSetSubDirectory(in, diroff)) {
-			TIFFError(TIFFFileName(in),
-			    "Error, setting subdirectory at %#x", diroff);
-			(void) TIFFClose(out);
-			return (1);
-		}
-                for (;;) {
-                   config = defconfig;
-                   compression = defcompression;
-                   predictor = defpredictor;
-                   fillorder = deffillorder;
-                   rowsperstrip = defrowsperstrip;
-                   tilewidth = deftilewidth;
-                   tilelength = deftilelength;
-                   g3opts = defg3opts;
-                   if (!tiffcp(in, out) || !TIFFWriteDirectory(out)) {
-                        TIFFClose(out);
-                        return (1);
-                   }
-                   if (imageCursor) { /* seek next image directory */
-                        if (!nextSrcImage(in, &imageCursor)) break;
-                   }else
-                        if (!TIFFReadDirectory(in)) break;
-		}
-		TIFFClose(in);
-	}
-
-        exit( 0 );
-}
-
-
-static void
-processG3Options(char* cp)
-{
-	if( (cp = strchr(cp, ':')) ) {
-		if (defg3opts == (uint32) -1)
-			defg3opts = 0;
-		do {
-			cp++;
-			if (strneq(cp, "1d", 2))
-				defg3opts &= ~GROUP3OPT_2DENCODING;
-			else if (strneq(cp, "2d", 2))
-				defg3opts |= GROUP3OPT_2DENCODING;
-			else if (strneq(cp, "fill", 4))
-				defg3opts |= GROUP3OPT_FILLBITS;
-			else
-				usage();
-		} while( (cp = strchr(cp, ':')) );
-	}
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none")) {
-		defcompression = COMPRESSION_NONE;
-	} else if (streq(opt, "packbits")) {
-		defcompression = COMPRESSION_PACKBITS;
-	} else if (strneq(opt, "jpeg", 4)) {
-		char* cp = strchr(opt, ':');
-		if (cp && isdigit(cp[1]))
-			quality = atoi(cp+1);
-		if (cp && strchr(cp, 'r'))
-			jpegcolormode = JPEGCOLORMODE_RAW;
-		defcompression = COMPRESSION_JPEG;
-	} else if (strneq(opt, "g3", 2)) {
-		processG3Options(opt);
-		defcompression = COMPRESSION_CCITTFAX3;
-	} else if (streq(opt, "g4")) {
-		defcompression = COMPRESSION_CCITTFAX4;
-	} else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			defpredictor = atoi(cp+1);
-		defcompression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			defpredictor = atoi(cp+1);
-		defcompression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-char* stuff[] = {
-"usage: tiffcp [options] input... output",
-"where options are:",
-" -a		append to output instead of overwriting",
-" -o offset	set initial directory offset",
-" -p contig	pack samples contiguously (e.g. RGBRGB...)",
-" -p separate	store samples separately (e.g. RRR...GGG...BBB...)",
-" -s		write output in strips",
-" -t		write output in tiles",
-" -i		ignore read errors",
-" -b file[,#]	bias (dark) monochrome image to be subtracted from all others",
-" -,=%	    	use % rather than , to separate image #'s (per Note below)",           
-"",
-" -r #		make each strip have no more than # rows",
-" -w #		set output tile width (pixels)",
-" -l #		set output tile length (pixels)",
-"",
-" -f lsb2msb	force lsb-to-msb FillOrder for output",
-" -f msb2lsb	force msb-to-lsb FillOrder for output",
-"",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c jpeg[:opts]	compress output with JPEG encoding",
-" -c packbits	compress output with packbits encoding",
-" -c g3[:opts]	compress output with CCITT Group 3 encoding",
-" -c g4		compress output with CCITT Group 4 encoding",
-" -c none	use no compression algorithm on output",
-"",
-"Group 3 options:",
-" 1d		use default CCITT Group 3 1D-encoding",
-" 2d		use optional CCITT Group 3 2D-encoding",
-" fill		byte-align EOL codes",
-"For example, -c g3:2d:fill to get G3-2D-encoded data with byte-aligned EOLs",
-"",
-"JPEG options:",
-" #		set compression quality level (0-100, default 75)",
-" r		output color image as RGB rather than YCbCr",
-"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-"",
-"Note that input filenames may be of the form filename,x,y,z",
-"where x, y, and z specify image numbers in the filename to copy.",
-"example:  tiffcp -c none -b esp.tif,1 esp.tif,0 test.tif",
-"  subtract 2nd image in esp.tif from 1st yielding uncompressed result test.tif",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-#define	CopyField(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField2(tag, v1, v2) \
-    if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-#define	CopyField4(tag, v1, v2, v3, v4) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) TIFFSetField(out, tag, v1, v2, v3, v4)
-
-static void
-cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type)
-{
-	switch (type) {
-	case TIFF_SHORT:
-		if (count == 1) {
-			uint16 shortv;
-			CopyField(tag, shortv);
-		} else if (count == 2) {
-			uint16 shortv1, shortv2;
-			CopyField2(tag, shortv1, shortv2);
-		} else if (count == 4) {
-			uint16 *tr, *tg, *tb, *ta;
-			CopyField4(tag, tr, tg, tb, ta);
-		} else if (count == (uint16) -1) {
-			uint16 shortv1;
-			uint16* shortav;
-			CopyField2(tag, shortv1, shortav);
-		}
-		break;
-	case TIFF_LONG:
-		{ uint32 longv;
-		  CopyField(tag, longv);
-		}
-		break;
-	case TIFF_RATIONAL:
-		if (count == 1) {
-			float floatv;
-			CopyField(tag, floatv);
-		} else if (count == (uint16) -1) {
-			float* floatav;
-			CopyField(tag, floatav);
-		}
-		break;
-	case TIFF_ASCII:
-		{ char* stringv;
-		  CopyField(tag, stringv);
-		}
-		break;
-	case TIFF_DOUBLE:
-		if (count == 1) {
-			double doublev;
-			CopyField(tag, doublev);
-		} else if (count == (uint16) -1) {
-			double* doubleav;
-			CopyField(tag, doubleav);
-		}
-		break;
-          default:
-            assert( FALSE );
-	}
-}
-
-static struct cpTag {
-	uint16	tag;
-	uint16	count;
-	TIFFDataType type;
-} tags[] = {
-	{ TIFFTAG_SUBFILETYPE,		1, TIFF_LONG },
-	{ TIFFTAG_THRESHHOLDING,	1, TIFF_SHORT },
-	{ TIFFTAG_DOCUMENTNAME,		1, TIFF_ASCII },
-	{ TIFFTAG_IMAGEDESCRIPTION,	1, TIFF_ASCII },
-	{ TIFFTAG_MAKE,			1, TIFF_ASCII },
-	{ TIFFTAG_MODEL,		1, TIFF_ASCII },
-	{ TIFFTAG_MINSAMPLEVALUE,	1, TIFF_SHORT },
-	{ TIFFTAG_MAXSAMPLEVALUE,	1, TIFF_SHORT },
-	{ TIFFTAG_XRESOLUTION,		1, TIFF_RATIONAL },
-	{ TIFFTAG_YRESOLUTION,		1, TIFF_RATIONAL },
-	{ TIFFTAG_PAGENAME,		1, TIFF_ASCII },
-	{ TIFFTAG_XPOSITION,		1, TIFF_RATIONAL },
-	{ TIFFTAG_YPOSITION,		1, TIFF_RATIONAL },
-	{ TIFFTAG_RESOLUTIONUNIT,	1, TIFF_SHORT },
-	{ TIFFTAG_SOFTWARE,		1, TIFF_ASCII },
-	{ TIFFTAG_DATETIME,		1, TIFF_ASCII },
-	{ TIFFTAG_ARTIST,		1, TIFF_ASCII },
-	{ TIFFTAG_HOSTCOMPUTER,		1, TIFF_ASCII },
-	{ TIFFTAG_WHITEPOINT,		1, TIFF_RATIONAL },
-	{ TIFFTAG_PRIMARYCHROMATICITIES,(uint16) -1,TIFF_RATIONAL },
-	{ TIFFTAG_HALFTONEHINTS,	2, TIFF_SHORT },
-	{ TIFFTAG_INKSET,		1, TIFF_SHORT },
-	{ TIFFTAG_INKNAMES,		1, TIFF_ASCII },
-	{ TIFFTAG_NUMBEROFINKS,		1, TIFF_SHORT },
-	{ TIFFTAG_DOTRANGE,		2, TIFF_SHORT },
-	{ TIFFTAG_TARGETPRINTER,	1, TIFF_ASCII },
-	{ TIFFTAG_SAMPLEFORMAT,		1, TIFF_SHORT },
-	{ TIFFTAG_YCBCRCOEFFICIENTS,	(uint16) -1,TIFF_RATIONAL },
-	{ TIFFTAG_YCBCRSUBSAMPLING,	2, TIFF_SHORT },
-	{ TIFFTAG_YCBCRPOSITIONING,	1, TIFF_SHORT },
-	{ TIFFTAG_REFERENCEBLACKWHITE,	(uint16) -1,TIFF_RATIONAL },
-	{ TIFFTAG_EXTRASAMPLES,		(uint16) -1, TIFF_SHORT },
-	{ TIFFTAG_SMINSAMPLEVALUE,	1, TIFF_DOUBLE },
-	{ TIFFTAG_SMAXSAMPLEVALUE,	1, TIFF_DOUBLE },
-	{ TIFFTAG_STONITS,		1, TIFF_DOUBLE },
-};
-#define	NTAGS	(sizeof (tags) / sizeof (tags[0]))
-
-#define	CopyTag(tag, count, type)	cpTag(in, out, tag, count, type)
-
-typedef int (*copyFunc)
-    (TIFF* in, TIFF* out, uint32 l, uint32 w, uint16 samplesperpixel);
-static	copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, uint16);
-
-static int
-tiffcp(TIFF* in, TIFF* out)
-{
-	uint16 bitspersample, samplesperpixel;
-        uint16 input_compression;
-	copyFunc cf;
-	uint32 width, length;
-	struct cpTag* p;
-
-	CopyField(TIFFTAG_IMAGEWIDTH, width);
-	CopyField(TIFFTAG_IMAGELENGTH, length);
-	CopyField(TIFFTAG_BITSPERSAMPLE, bitspersample);
-	CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel);
-	if (compression != (uint16)-1)
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	else
-		CopyField(TIFFTAG_COMPRESSION, compression);
-	if (compression == COMPRESSION_JPEG) {
-            if ( TIFFGetField( in, TIFFTAG_COMPRESSION, &input_compression )
-                 && input_compression == COMPRESSION_JPEG ) {
-                TIFFSetField(in, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-            }
-            if (jpegcolormode == JPEGCOLORMODE_RGB)
-		TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR);
-            else
-                TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-        }
-	else if (compression == COMPRESSION_SGILOG || compression == COMPRESSION_SGILOG24)
-		TIFFSetField(out, TIFFTAG_PHOTOMETRIC,
-		    samplesperpixel == 1 ?
-			PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV);
-	else
-		CopyTag(TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT);
-	if (fillorder != 0)
-		TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
-	else
-		CopyTag(TIFFTAG_FILLORDER, 1, TIFF_SHORT);
-	/*
-	 * Will copy `Orientation' tag from input image
-	 */
-	TIFFGetField(in, TIFFTAG_ORIENTATION, &orientation);
-	switch (orientation) {
-		case ORIENTATION_BOTRIGHT:
-		case ORIENTATION_RIGHTBOT:	/* XXX */
-		case ORIENTATION_LEFTBOT:	/* XXX */
-			TIFFWarning(TIFFFileName(in), "using bottom-left orientation");
-			orientation = ORIENTATION_BOTLEFT;
-		/* fall thru... */
-		case ORIENTATION_BOTLEFT:
-			break;
-		case ORIENTATION_TOPRIGHT:
-		case ORIENTATION_RIGHTTOP:	/* XXX */
-		case ORIENTATION_LEFTTOP:	/* XXX */
-		default:
-			TIFFWarning(TIFFFileName(in), "using top-left orientation");
-			orientation = ORIENTATION_TOPLEFT;
-		/* fall thru... */
-		case ORIENTATION_TOPLEFT:
-			break;
-	}
-	TIFFSetField(out, TIFFTAG_ORIENTATION, orientation);
-	/*
-	 * Choose tiles/strip for the output image according to
-	 * the command line arguments (-tiles, -strips) and the
-	 * structure of the input image.
-	 */
-	if (outtiled == -1)
-		outtiled = TIFFIsTiled(in);
-	if (outtiled) {
-		/*
-		 * Setup output file's tile width&height.  If either
-		 * is not specified, use either the value from the
-		 * input image or, if nothing is defined, use the
-		 * library default.
-		 */
-		if (tilewidth == (uint32) -1)
-			TIFFGetField(in, TIFFTAG_TILEWIDTH, &tilewidth);
-		if (tilelength == (uint32) -1)
-			TIFFGetField(in, TIFFTAG_TILELENGTH, &tilelength);
-		TIFFDefaultTileSize(out, &tilewidth, &tilelength);
-		TIFFSetField(out, TIFFTAG_TILEWIDTH, tilewidth);
-		TIFFSetField(out, TIFFTAG_TILELENGTH, tilelength);
-	} else {
-		/*
-		 * RowsPerStrip is left unspecified: use either the
-		 * value from the input image or, if nothing is defined,
-		 * use the library default.
-		 */
-		if (rowsperstrip == (uint32) 0) {
-			if (!TIFFGetField(in, TIFFTAG_ROWSPERSTRIP,&rowsperstrip))
-				rowsperstrip =
-					TIFFDefaultStripSize(out, rowsperstrip);
-		}
-		else if (rowsperstrip == (uint32) -1)
-			rowsperstrip = length;
-		TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-	}
-	if (config != (uint16) -1)
-		TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
-	else
-		CopyField(TIFFTAG_PLANARCONFIG, config);
-	if (samplesperpixel <= 4)
-		CopyTag(TIFFTAG_TRANSFERFUNCTION, 4, TIFF_SHORT);
-	CopyTag(TIFFTAG_COLORMAP, 4, TIFF_SHORT);
-/* SMinSampleValue & SMaxSampleValue */
-	switch (compression) {
-	case COMPRESSION_JPEG:
-		TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
-		TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor != (uint16)-1)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		else
-			CopyField(TIFFTAG_PREDICTOR, predictor);
-		break;
-	case COMPRESSION_CCITTFAX3:
-	case COMPRESSION_CCITTFAX4:
-		if (compression == COMPRESSION_CCITTFAX3) {
-			if (g3opts != (uint32) -1)
-				TIFFSetField(out, TIFFTAG_GROUP3OPTIONS,
-				    g3opts);
-			else
-				CopyField(TIFFTAG_GROUP3OPTIONS, g3opts);
-		} else
-			CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
-		CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
-		break;
-	}
-	{ uint32 len32;
-	  void** data;
-	  if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &len32, &data))
-		TIFFSetField(out, TIFFTAG_ICCPROFILE, len32, data);
-	}
-	{
-	  unsigned short pg0, pg1;
-	  if (TIFFGetField(in, TIFFTAG_PAGENUMBER, &pg0, &pg1))
-		if (pageNum < 0) // only one input file
-			TIFFSetField(out, TIFFTAG_PAGENUMBER, pg0, pg1);
-		else 
-			TIFFSetField(out, TIFFTAG_PAGENUMBER, pageNum++, 0);
-	}
-	for (p = tags; p < &tags[NTAGS]; p++)
-		CopyTag(p->tag, p->count, p->type);
-
-	cf = pickCopyFunc(in, out, bitspersample, samplesperpixel);
-	return (cf ? (*cf)(in, out, length, width, samplesperpixel) : FALSE);
-}
-
-/*
- * Copy Functions.
- */
-#define	DECLAREcpFunc(x) \
-static int x(TIFF* in, TIFF* out, \
-    uint32 imagelength, uint32 imagewidth, tsample_t spp)
-
-#define	DECLAREreadFunc(x) \
-static void x(TIFF* in, \
-    uint8* buf, uint32 imagelength, uint32 imagewidth, tsample_t spp)
-typedef void (*readFunc)(TIFF*, uint8*, uint32, uint32, tsample_t);
-
-#define	DECLAREwriteFunc(x) \
-static int x(TIFF* out, \
-    uint8* buf, uint32 imagelength, uint32 imagewidth, tsample_t spp)
-typedef int (*writeFunc)(TIFF*, uint8*, uint32, uint32, tsample_t);
-
-/*
- * Contig -> contig by scanline for rows/strip change.
- */
-DECLAREcpFunc(cpContig2ContigByRow)
-{
-	tdata_t buf = _TIFFmalloc(TIFFScanlineSize(in));
-	uint32 row;
-
-	(void) imagewidth; (void) spp;
-	for (row = 0; row < imagelength; row++) {
-		if (TIFFReadScanline(in, buf, row, 0) < 0 && !ignore)
-			goto done;
-		if (TIFFWriteScanline(out, buf, row, 0) < 0)
-			goto bad;
-	}
-done:
-	_TIFFfree(buf);
-	return (TRUE);
-bad:
-	_TIFFfree(buf);
-	return (FALSE);
-}
-
-
-typedef void biasFn (void *image, void *bias, uint32 pixels);
-
-#define subtract(bits) \
-static void subtract##bits (void *i, void *b, uint32 pixels)\
-{\
-   uint##bits *image = i;\
-   uint##bits *bias = b;\
-   while (pixels--) {\
-     *image = *image > *bias ? *image-*bias : 0;\
-     image++, bias++; \
-   } \
-}
-
-subtract(8)
-subtract(16)
-subtract(32)
-
-static biasFn *lineSubtractFn (unsigned bits)
-{
-    switch (bits) {
-      case  8:  return subtract8;
-      case 16:  return subtract16;
-      case 32:  return subtract32;
-    }
-    return NULL;
-}
-
-/*
- * Contig -> contig by scanline while subtracting a bias image.
- */
-DECLAREcpFunc(cpBiasedContig2Contig)
-{
-  if (spp == 1) {
-    tsize_t biasSize = TIFFScanlineSize(bias);
-    tsize_t bufSize = TIFFScanlineSize(in);
-    tdata_t buf, biasBuf;
-    uint32 biasWidth = 0, biasLength = 0;
-    TIFFGetField(bias, TIFFTAG_IMAGEWIDTH, &biasWidth);
-    TIFFGetField(bias, TIFFTAG_IMAGELENGTH, &biasLength);
-    if (biasSize == bufSize && 
-        imagelength == biasLength && imagewidth == biasWidth) {
-      uint16 sampleBits = 0;
-      biasFn *subtractLine;
-      TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &sampleBits);
-      subtractLine = lineSubtractFn (sampleBits);
-      if (subtractLine) {
-        uint32 row;
-        buf = _TIFFmalloc(bufSize);
-        biasBuf = _TIFFmalloc(bufSize);
-       	for (row = 0; row < imagelength; row++) {
-	  if (TIFFReadScanline(in, buf, row, 0) < 0 && !ignore)
-		break;
-	  if (TIFFReadScanline(bias, biasBuf, row, 0) < 0 && !ignore)
-		break;
-          subtractLine (buf, biasBuf, imagewidth);
-	  if (TIFFWriteScanline(out, buf, row, 0) < 0) {
-            _TIFFfree(buf); _TIFFfree(biasBuf);
-            return FALSE;
-	  }
-	}
-	_TIFFfree(buf); _TIFFfree(biasBuf);
-        TIFFSetDirectory (bias, TIFFCurrentDirectory(bias)); /* rewind */
-	return TRUE;
-        
-      }else{
-        fprintf (stderr, "No support for biasing %d bit pixels\n", sampleBits);
-        return FALSE;
-      }
-    }
-    fprintf (stderr,"Bias image %s,%d\nis not the same size as %s,%d\n",
-             TIFFFileName(bias), TIFFCurrentDirectory(bias),
-             TIFFFileName(in), TIFFCurrentDirectory(in));
-    return FALSE;
-  }else{
-    fprintf (stderr, "Can't bias %s,%d as it has >1 Sample/Pixel\n",
-             TIFFFileName(in), TIFFCurrentDirectory(in));
-    return FALSE;
-  }
-}
-
-
-/*
- * Strip -> strip for change in encoding.
- */
-DECLAREcpFunc(cpDecodedStrips)
-{
-	tsize_t stripsize  = TIFFStripSize(in);
-	tdata_t buf = _TIFFmalloc(stripsize);
-
-	(void) imagewidth; (void) spp;
-	if (buf) {
-		tstrip_t s, ns = TIFFNumberOfStrips(in);
-		uint32 row = 0;
-		for (s = 0; s < ns; s++) {
-			tsize_t cc = (row + rowsperstrip > imagelength) ?
-			    TIFFVStripSize(in, imagelength - row) : stripsize;
-			if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 && !ignore)
-				break;
-			if (TIFFWriteEncodedStrip(out, s, buf, cc) < 0) {
-				_TIFFfree(buf);
-				return (FALSE);
-			}
-			row += rowsperstrip;
-		}
-		_TIFFfree(buf);
-		return (TRUE);
-	}
-	return (FALSE);
-}
-
-/*
- * Separate -> separate by row for rows/strip change.
- */
-DECLAREcpFunc(cpSeparate2SeparateByRow)
-{
-	tdata_t buf = _TIFFmalloc(TIFFScanlineSize(in));
-	uint32 row;
-	tsample_t s;
-
-	(void) imagewidth;
-	for (s = 0; s < spp; s++) {
-		for (row = 0; row < imagelength; row++) {
-			if (TIFFReadScanline(in, buf, row, s) < 0 && !ignore)
-				goto done;
-			if (TIFFWriteScanline(out, buf, row, s) < 0)
-				goto bad;
-		}
-	}
-done:
-	_TIFFfree(buf);
-	return (TRUE);
-bad:
-	_TIFFfree(buf);
-	return (FALSE);
-}
-
-/*
- * Contig -> separate by row.
- */
-DECLAREcpFunc(cpContig2SeparateByRow)
-{
-	tdata_t inbuf = _TIFFmalloc(TIFFScanlineSize(in));
-	tdata_t outbuf = _TIFFmalloc(TIFFScanlineSize(out));
-	register uint8 *inp, *outp;
-	register uint32 n;
-	uint32 row;
-	tsample_t s;
-
-	/* unpack channels */
-	for (s = 0; s < spp; s++) {
-		for (row = 0; row < imagelength; row++) {
-			if (TIFFReadScanline(in, inbuf, row, 0) < 0 && !ignore)
-				goto done;
-			inp = ((uint8*)inbuf) + s;
-			outp = (uint8*)outbuf;
-			for (n = imagewidth; n-- > 0;) {
-				*outp++ = *inp;
-				inp += spp;
-			}
-			if (TIFFWriteScanline(out, outbuf, row, s) < 0)
-				goto bad;
-		}
-	}
-done:
-	if (inbuf) _TIFFfree(inbuf);
-	if (outbuf) _TIFFfree(outbuf);
-	return (TRUE);
-bad:
-	if (inbuf) _TIFFfree(inbuf);
-	if (outbuf) _TIFFfree(outbuf);
-	return (FALSE);
-}
-
-/*
- * Separate -> contig by row.
- */
-DECLAREcpFunc(cpSeparate2ContigByRow)
-{
-	tdata_t inbuf = _TIFFmalloc(TIFFScanlineSize(in));
-	tdata_t outbuf = _TIFFmalloc(TIFFScanlineSize(out));
-	register uint8 *inp, *outp;
-	register uint32 n;
-	uint32 row;
-	tsample_t s;
-
-	for (row = 0; row < imagelength; row++) {
-		/* merge channels */
-		for (s = 0; s < spp; s++) {
-			if (TIFFReadScanline(in, inbuf, row, s) < 0 && !ignore)
-				goto done;
-			inp = (uint8*)inbuf;
-			outp = ((uint8*)outbuf) + s;
-			for (n = imagewidth; n-- > 0;) {
-				*outp = *inp++;
-				outp += spp;
-			}
-		}
-		if (TIFFWriteScanline(out, outbuf, row, 0) < 0)
-			goto bad;
-	}
-done:
-	if (inbuf) _TIFFfree(inbuf);
-	if (outbuf) _TIFFfree(outbuf);
-	return (TRUE);
-bad:
-	if (inbuf) _TIFFfree(inbuf);
-	if (outbuf) _TIFFfree(outbuf);
-	return (FALSE);
-}
-
-static void
-cpStripToTile(uint8* out, uint8* in,
-	uint32 rows, uint32 cols, int outskew, int inskew)
-{
-	while (rows-- > 0) {
-		uint32 j = cols;
-		while (j-- > 0)
-			*out++ = *in++;
-		out += outskew;
-		in += inskew;
-	}
-}
-
-static void
-cpContigBufToSeparateBuf(uint8* out, uint8* in,
-           uint32 rows, uint32 cols, int outskew, int inskew, tsample_t spp,
-           int bytes_per_sample )
-{
-	while (rows-- > 0) {
-		uint32 j = cols;
-		while (j-- > 0)
-                {
-                        int n = bytes_per_sample;
-
-                        while( n-- ) {
-                            *out++ = *in++;
-                        }
-                        in += (spp-1) * bytes_per_sample;
-                }
-		out += outskew;
-		in += inskew;
-	}
-}
-
-static void
-cpSeparateBufToContigBuf(uint8* out, uint8* in,
-	uint32 rows, uint32 cols, int outskew, int inskew, tsample_t spp,
-                         int bytes_per_sample)
-{
-	while (rows-- > 0) {
-		uint32 j = cols;
-		while (j-- > 0) {
-                        int n = bytes_per_sample;
-
-                        while( n-- ) {
-                                *out++ = *in++;
-                        }
-                        out += (spp-1)*bytes_per_sample;
-                }
-		out += outskew;
-		in += inskew;
-	}
-}
-
-static int
-cpImage(TIFF* in, TIFF* out, readFunc fin, writeFunc fout,
-	uint32 imagelength, uint32 imagewidth, tsample_t spp)
-{
-	int status = FALSE;
-	tdata_t buf = _TIFFmalloc(TIFFRasterScanlineSize(in) * imagelength);
-        
-	if (buf) {
-		(*fin)(in, (uint8*)buf, imagelength, imagewidth, spp);
-		status = (fout)(out, (uint8*)buf, imagelength, imagewidth, spp);
-		_TIFFfree(buf);
-	}
-	return (status);
-}
-
-DECLAREreadFunc(readContigStripsIntoBuffer)
-{
-	tsize_t scanlinesize = TIFFScanlineSize(in);
-     	uint8* bufp = buf;
-	uint32 row;
-
-	(void) imagewidth; (void) spp;
-	for (row = 0; row < imagelength; row++) {
-		if (TIFFReadScanline(in, (tdata_t) bufp, row, 0) < 0 && !ignore)
-			break;
-		bufp += scanlinesize;
-	}
-}
-
-DECLAREreadFunc(readSeparateStripsIntoBuffer)
-{
-	tsize_t scanlinesize = TIFFScanlineSize(in);
-	tdata_t scanline = _TIFFmalloc(scanlinesize);
-
-	(void) imagewidth;
-	if (scanline) {
-		uint8* bufp = (uint8*) buf;
-		uint32 row;
-		tsample_t s;
-
-		for (row = 0; row < imagelength; row++) {
-			/* merge channels */
-			for (s = 0; s < spp; s++) {
-				uint8* bp = bufp + s;
-				tsize_t n = scanlinesize;
-                                uint8* sbuf = scanline;
-
-				if (TIFFReadScanline(in, scanline, row, s) < 0 && !ignore)
-					goto done;
-				while (n-- > 0)
-					*bp = *sbuf++, bp += spp;
-			}
-			bufp += scanlinesize * spp;
-		}
-
-done:
-		_TIFFfree(scanline);
-	}
-}
-
-DECLAREreadFunc(readContigTilesIntoBuffer)
-{
-	tdata_t tilebuf = _TIFFmalloc(TIFFTileSize(in));
-	uint32 imagew = TIFFScanlineSize(in);
-	uint32 tilew  = TIFFTileRowSize(in);
-	int iskew = imagew - tilew;
-	uint8* bufp = (uint8*) buf;
-	uint32 tw, tl;
-	uint32 row;
-
-	(void) spp;
-	if (tilebuf == 0)
-		return;
-	(void) TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw);
-	(void) TIFFGetField(in, TIFFTAG_TILELENGTH, &tl);
-        
-	for (row = 0; row < imagelength; row += tl) {
-		uint32 nrow = (row+tl > imagelength) ? imagelength-row : tl;
-		uint32 colb = 0;
-		uint32 col;
-
-		for (col = 0; col < imagewidth; col += tw) {
-			if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0 &&
-			    !ignore)
-				goto done;
-			if (colb + tilew > imagew) {
-				uint32 width = imagew - colb;
-				uint32 oskew = tilew - width;
-				cpStripToTile(bufp + colb,
-                                              tilebuf, nrow, width,
-                                              oskew + iskew, oskew );
-			} else
-				cpStripToTile(bufp + colb,
-                                              tilebuf, nrow, tilew,
-                                              iskew, 0);
-			colb += tilew;
-		}
-		bufp += imagew * nrow;
-	}
-done:
-	_TIFFfree(tilebuf);
-}
-
-DECLAREreadFunc(readSeparateTilesIntoBuffer)
-{
-	uint32 imagew = TIFFRasterScanlineSize(in);
-	uint32 tilew = TIFFTileRowSize(in);
-	int iskew  = imagew - tilew*spp;
-	tdata_t tilebuf = _TIFFmalloc(TIFFTileSize(in));
-	uint8* bufp = (uint8*) buf;
-	uint32 tw, tl;
-	uint32 row;
-        uint16 bps, bytes_per_sample;
-
-	if (tilebuf == 0)
-		return;
-	(void) TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw);
-	(void) TIFFGetField(in, TIFFTAG_TILELENGTH, &tl);
-	(void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps);
-        assert( bps % 8 == 0 );
-        bytes_per_sample = bps/8;
-
-	for (row = 0; row < imagelength; row += tl) {
-		uint32 nrow = (row+tl > imagelength) ? imagelength-row : tl;
-		uint32 colb = 0;
-		uint32 col;
-
-		for (col = 0; col < imagewidth; col += tw) {
-			tsample_t s;
-
-			for (s = 0; s < spp; s++) {
-				if (TIFFReadTile(in, tilebuf, col, row, 0, s) < 0 && !ignore)
-					goto done;
-				/*
-				 * Tile is clipped horizontally.  Calculate
-				 * visible portion and skewing factors.
-				 */
-				if (colb + tilew*spp > imagew) {
-					uint32 width = imagew - colb;
-					int oskew = tilew*spp - width;
-					cpSeparateBufToContigBuf(
-                                            bufp+colb+s*bytes_per_sample,
-					    tilebuf, nrow,
-                                            width/(spp*bytes_per_sample),
-					    oskew + iskew,
-                                            oskew/spp, spp,
-                                            bytes_per_sample);
-				} else
-					cpSeparateBufToContigBuf(
-                                            bufp+colb+s*bytes_per_sample,
-					    tilebuf, nrow, tw,
-					    iskew, 0, spp,
-                                            bytes_per_sample);
-			}
-			colb += tilew*spp;
-		}
-		bufp += imagew * nrow;
-	}
-done:
-	_TIFFfree(tilebuf);
-}
-
-DECLAREwriteFunc(writeBufferToContigStrips)
-{
-	uint32 row, rowsperstrip;
-	tstrip_t strip = 0;
-
-	(void) imagewidth; (void) spp;
-	(void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-	for (row = 0; row < imagelength; row += rowsperstrip) {
-		uint32 nrows = (row+rowsperstrip > imagelength) ?
-		    imagelength-row : rowsperstrip;
-		tsize_t stripsize = TIFFVStripSize(out, nrows);
-		if (TIFFWriteEncodedStrip(out, strip++, buf, stripsize) < 0)
-			return (FALSE);
-		buf += stripsize;
-	}
-	return (TRUE);
-}
-
-DECLAREwriteFunc(writeBufferToSeparateStrips)
-{
-	uint32 rowsize = imagewidth * spp;
-	uint32 rowsperstrip;
-	tdata_t obuf = _TIFFmalloc(TIFFStripSize(out));
-	tstrip_t strip = 0;
-	tsample_t s;
-
-	if (obuf == NULL)
-		return (0);
-	(void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-	for (s = 0; s < spp; s++) {
-		uint32 row;
-		for (row = 0; row < imagelength; row += rowsperstrip) {
-			uint32 nrows = (row+rowsperstrip > imagelength) ?
-			    imagelength-row : rowsperstrip;
-			tsize_t stripsize = TIFFVStripSize(out, nrows);
-
-			cpContigBufToSeparateBuf(
-			    obuf, (uint8*) buf + row*rowsize + s, 
-			    nrows, imagewidth, 0, 0, spp, 1);
-			if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) {
-				_TIFFfree(obuf);
-				return (FALSE);
-			}
-		}
-	}
-	_TIFFfree(obuf);
-	return (TRUE);
-
-}
-
-DECLAREwriteFunc(writeBufferToContigTiles)
-{
-	uint32 imagew = TIFFScanlineSize(out);
-	uint32 tilew  = TIFFTileRowSize(out);
-	int iskew = imagew - tilew;
-	tdata_t obuf = _TIFFmalloc(TIFFTileSize(out));
-	uint8* bufp = (uint8*) buf;
-	uint32 tl, tw;
-	uint32 row;
-
-	(void) spp;
-	if (obuf == NULL)
-		return (FALSE);
-	(void) TIFFGetField(out, TIFFTAG_TILELENGTH, &tl);
-	(void) TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw);
-	for (row = 0; row < imagelength; row += tilelength) {
-		uint32 nrow = (row+tl > imagelength) ? imagelength-row : tl;
-		uint32 colb = 0;
-		uint32 col;
-
-		for (col = 0; col < imagewidth; col += tw) {
-			/*
-			 * Tile is clipped horizontally.  Calculate
-			 * visible portion and skewing factors.
-			 */
-			if (colb + tilew > imagew) {
-				uint32 width = imagew - colb;
-				int oskew = tilew - width;
-				cpStripToTile(obuf, bufp + colb, nrow, width,
-				    oskew, oskew + iskew);
-			} else
-				cpStripToTile(obuf, bufp + colb, nrow, tilew,
-				    0, iskew);
-			if (TIFFWriteTile(out, obuf, col, row, 0, 0) < 0) {
-				_TIFFfree(obuf);
-				return (FALSE);
-			}
-			colb += tilew;
-		}
-		bufp += nrow * imagew;
-	}
-	_TIFFfree(obuf);
-	return (TRUE);
-}
-
-DECLAREwriteFunc(writeBufferToSeparateTiles)
-{
-	uint32 imagew = TIFFScanlineSize(out);
-	tsize_t tilew  = TIFFTileRowSize(out);
-	uint32 iimagew = TIFFRasterScanlineSize(out);
-	int iskew = iimagew - tilew*spp;
-	tdata_t obuf = _TIFFmalloc(TIFFTileSize(out));
-	uint8* bufp = (uint8*) buf;
-	uint32 tl, tw;
-	uint32 row;
-        uint16 bps, bytes_per_sample;
-
-	if (obuf == NULL)
-		return (FALSE);
-	(void) TIFFGetField(out, TIFFTAG_TILELENGTH, &tl);
-	(void) TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw);
-	(void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps);
-        assert( bps % 8 == 0 );
-        bytes_per_sample = bps/8;
-        
-	for (row = 0; row < imagelength; row += tl) {
-		uint32 nrow = (row+tl > imagelength) ? imagelength-row : tl;
-		uint32 colb = 0;
-		uint32 col;
-
-		for (col = 0; col < imagewidth; col += tw) {
-			tsample_t s;
-			for (s = 0; s < spp; s++) {
-				/*
-				 * Tile is clipped horizontally.  Calculate
-				 * visible portion and skewing factors.
-				 */
-				if (colb + tilew > imagew) {
-					uint32 width = (imagew - colb);
-					int oskew = tilew - width;
-
-					cpContigBufToSeparateBuf(obuf,
-					    bufp + (colb*spp) + s,
-					    nrow, width/bytes_per_sample,
-					    oskew, (oskew*spp)+iskew, spp,
-                                            bytes_per_sample);
-				} else
-					cpContigBufToSeparateBuf(obuf,
-					    bufp + (colb*spp) + s,
-					    nrow, tilewidth,
-					    0, iskew, spp,
-                                            bytes_per_sample);
-				if (TIFFWriteTile(out, obuf, col, row, 0, s) < 0) {
-					_TIFFfree(obuf);
-					return (FALSE);
-				}
-			}
-			colb += tilew;
-		}
-		bufp += nrow * iimagew;
-	}
-	_TIFFfree(obuf);
-	return (TRUE);
-}
-
-/*
- * Contig strips -> contig tiles.
- */
-DECLAREcpFunc(cpContigStrips2ContigTiles)
-{
-	return cpImage(in, out,
-	    readContigStripsIntoBuffer,
-	    writeBufferToContigTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Contig strips -> separate tiles.
- */
-DECLAREcpFunc(cpContigStrips2SeparateTiles)
-{
-	return cpImage(in, out,
-	    readContigStripsIntoBuffer,
-	    writeBufferToSeparateTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate strips -> contig tiles.
- */
-DECLAREcpFunc(cpSeparateStrips2ContigTiles)
-{
-	return cpImage(in, out,
-	    readSeparateStripsIntoBuffer,
-	    writeBufferToContigTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate strips -> separate tiles.
- */
-DECLAREcpFunc(cpSeparateStrips2SeparateTiles)
-{
-	return cpImage(in, out,
-	    readSeparateStripsIntoBuffer,
-	    writeBufferToSeparateTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Contig strips -> contig tiles.
- */
-DECLAREcpFunc(cpContigTiles2ContigTiles)
-{
-	return cpImage(in, out,
-	    readContigTilesIntoBuffer,
-	    writeBufferToContigTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Contig tiles -> separate tiles.
- */
-DECLAREcpFunc(cpContigTiles2SeparateTiles)
-{
-	return cpImage(in, out,
-	    readContigTilesIntoBuffer,
-	    writeBufferToSeparateTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate tiles -> contig tiles.
- */
-DECLAREcpFunc(cpSeparateTiles2ContigTiles)
-{
-	return cpImage(in, out,
-	    readSeparateTilesIntoBuffer,
-	    writeBufferToContigTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate tiles -> separate tiles (tile dimension change).
- */
-DECLAREcpFunc(cpSeparateTiles2SeparateTiles)
-{
-	return cpImage(in, out,
-	    readSeparateTilesIntoBuffer,
-	    writeBufferToSeparateTiles,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Contig tiles -> contig tiles (tile dimension change).
- */
-DECLAREcpFunc(cpContigTiles2ContigStrips)
-{
-	return cpImage(in, out,
-	    readContigTilesIntoBuffer,
-	    writeBufferToContigStrips,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Contig tiles -> separate strips.
- */
-DECLAREcpFunc(cpContigTiles2SeparateStrips)
-{
-	return cpImage(in, out,
-	    readContigTilesIntoBuffer,
-	    writeBufferToSeparateStrips,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate tiles -> contig strips.
- */
-DECLAREcpFunc(cpSeparateTiles2ContigStrips)
-{
-	return cpImage(in, out,
-	    readSeparateTilesIntoBuffer,
-	    writeBufferToContigStrips,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Separate tiles -> separate strips.
- */
-DECLAREcpFunc(cpSeparateTiles2SeparateStrips)
-{
-	return cpImage(in, out,
-	    readSeparateTilesIntoBuffer,
-	    writeBufferToSeparateStrips,
-	    imagelength, imagewidth, spp);
-}
-
-/*
- * Select the appropriate copy function to use.
- */
-static copyFunc
-pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel)
-{
-	uint16 shortv;
-	uint32 w, l, tw, tl;
-	int bychunk;
-
-	(void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv);
-	if (shortv != config && bitspersample != 8 && samplesperpixel > 1) {
-		fprintf(stderr,
-"%s: Cannot handle different planar configuration w/ bits/sample != 8\n",
-		    TIFFFileName(in));
-		return (NULL);
-	}
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &w);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &l);
-        if (!(TIFFIsTiled(out) || TIFFIsTiled(in))) {
-	    uint32 irps = (uint32) -1L;
-	    TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &irps);
-            /* if biased, force decoded copying to allow image subtraction */
- 	    bychunk = !bias && (rowsperstrip == irps);
-	}else{  /* either in or out is tiled */
-            if (bias) {
-                  fprintf(stderr,
-"%s: Cannot handle tiled configuration w/bias image\n",
-                  TIFFFileName(in));
-                  return (NULL);
-            }
-	    if (TIFFIsTiled(out)) {
-		if (!TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw))
-			tw = w;
-		if (!TIFFGetField(in, TIFFTAG_TILELENGTH, &tl))
-			tl = l;
-		bychunk = (tw == tilewidth && tl == tilelength);
-	    } else {  /* out's not, so in must be tiled */
-		TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw);
-		TIFFGetField(in, TIFFTAG_TILELENGTH, &tl);
-		bychunk = (tw == w && tl == rowsperstrip);
-            }
-	}
-#define	T 1
-#define	F 0
-#define pack(a,b,c,d,e)	((long)(((a)<<11)|((b)<<3)|((c)<<2)|((d)<<1)|(e)))
-	switch(pack(shortv,config,TIFFIsTiled(in),TIFFIsTiled(out),bychunk)) {
-/* Strips -> Tiles */
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   F,T,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   F,T,T):
-		return cpContigStrips2ContigTiles;
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, F,T,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, F,T,T):
-		return cpContigStrips2SeparateTiles;
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   F,T,F):
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   F,T,T):
-		return cpSeparateStrips2ContigTiles;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F,T,F):
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F,T,T):
-		return cpSeparateStrips2SeparateTiles;
-/* Tiles -> Tiles */
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   T,T,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   T,T,T):
-		return cpContigTiles2ContigTiles;
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, T,T,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, T,T,T):
-		return cpContigTiles2SeparateTiles;
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   T,T,F):
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   T,T,T):
-		return cpSeparateTiles2ContigTiles;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T,T,F):
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T,T,T):
-		return cpSeparateTiles2SeparateTiles;
-/* Tiles -> Strips */
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   T,F,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   T,F,T):
-		return cpContigTiles2ContigStrips;
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, T,F,F):
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_SEPARATE, T,F,T):
-		return cpContigTiles2SeparateStrips;
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   T,F,F):
-        case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   T,F,T):
-		return cpSeparateTiles2ContigStrips;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T,F,F):
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T,F,T):
-		return cpSeparateTiles2SeparateStrips;
-/* Strips -> Strips */
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   F,F,F):
-		return bias ? cpBiasedContig2Contig : cpContig2ContigByRow;
-	case pack(PLANARCONFIG_CONTIG,   PLANARCONFIG_CONTIG,   F,F,T):
-		return cpDecodedStrips;
-	case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE,   F,F,F):
-	case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE,   F,F,T):
-		return cpContig2SeparateByRow;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   F,F,F):
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG,   F,F,T):
-		return cpSeparate2ContigByRow;
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F,F,F):
-	case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F,F,T):
-		return cpSeparate2SeparateByRow;
-	}
-#undef pack
-#undef F
-#undef T
-	fprintf(stderr, "tiffcp: %s: Don't know how to copy/convert image.\n",
-	    TIFFFileName(in));
-	return (NULL);
-}
diff --git a/tkimg1.3/libtiff/tools/tiffdither.c b/tkimg1.3/libtiff/tools/tiffdither.c
deleted file mode 100644
index 36251ea..0000000
--- a/tkimg1.3/libtiff/tools/tiffdither.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffdither.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-#define	CopyField(tag, v) \
-	if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-
-uint32	imagewidth;
-uint32	imagelength;
-int	threshold = 128;
-
-static	void usage(void);
-
-/* 
- * Floyd-Steinberg error propragation with threshold.
- * This code is stolen from tiffmedian.
- */
-static void
-fsdither(TIFF* in, TIFF* out)
-{
-	unsigned char *outline, *inputline, *inptr;
-	short *thisline, *nextline, *tmpptr;
-	register unsigned char	*outptr;
-	register short *thisptr, *nextptr;
-	register uint32 i, j;
-	uint32 imax, jmax;
-	int lastline, lastpixel;
-	int bit;
-	tsize_t outlinesize;
-
-	imax = imagelength - 1;
-	jmax = imagewidth - 1;
-	inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-	thisline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
-	nextline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
-	outlinesize = TIFFScanlineSize(out);
-	outline = (unsigned char *) _TIFFmalloc(outlinesize);
-
-	/*
-	 * Get first line
-	 */
-	if (TIFFReadScanline(in, inputline, 0, 0) <= 0)
-		return;
-	inptr = inputline;
-	nextptr = nextline;
-	for (j = 0; j < imagewidth; ++j)
-		*nextptr++ = *inptr++;
-	for (i = 1; i < imagelength; ++i) {
-		tmpptr = thisline;
-		thisline = nextline;
-		nextline = tmpptr;
-		lastline = (i == imax);
-		if (TIFFReadScanline(in, inputline, i, 0) <= 0)
-			break;
-		inptr = inputline;
-		nextptr = nextline;
-		for (j = 0; j < imagewidth; ++j)
-			*nextptr++ = *inptr++;
-		thisptr = thisline;
-		nextptr = nextline;
-		_TIFFmemset(outptr = outline, 0, outlinesize);
-		bit = 0x80;
-		for (j = 0; j < imagewidth; ++j) {
-			register int v;
-
-			lastpixel = (j == jmax);
-			v = *thisptr++;
-			if (v < 0)
-				v = 0;
-			else if (v > 255)
-				v = 255;
-			if (v > threshold) {
-				*outptr |= bit;
-				v -= 255;
-			}
-			bit >>= 1;
-			if (bit == 0) {
-				outptr++;
-				bit = 0x80;
-			}
-			if (!lastpixel)
-				thisptr[0] += v * 7 / 16;
-			if (!lastline) {
-				if (j != 0)
-					nextptr[-1] += v * 3 / 16;
-				*nextptr++ += v * 5 / 16;
-				if (!lastpixel)
-					nextptr[0] += v / 16;
-			}
-		}
-		if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
-			break;
-	}
-	_TIFFfree(inputline);
-	_TIFFfree(thisline);
-	_TIFFfree(nextline);
-	_TIFFfree(outline);
-}
-
-static	uint16 compression = COMPRESSION_PACKBITS;
-static	uint16 predictor = 0;
-static	uint32 group3options = 0;
-
-static void
-processG3Options(char* cp)
-{
-	if (cp = strchr(cp, ':')) {
-		do {
-			cp++;
-			if (strneq(cp, "1d", 2))
-				group3options &= ~GROUP3OPT_2DENCODING;
-			else if (strneq(cp, "2d", 2))
-				group3options |= GROUP3OPT_2DENCODING;
-			else if (strneq(cp, "fill", 4))
-				group3options |= GROUP3OPT_FILLBITS;
-			else
-				usage();
-		} while (cp = strchr(cp, ':'));
-	}
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "g3", 2)) {
-		processG3Options(opt);
-		compression = COMPRESSION_CCITTFAX3;
-	} else if (streq(opt, "g4"))
-		compression = COMPRESSION_CCITTFAX4;
-	else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-int
-main(int argc, char* argv[])
-{
-	TIFF *in, *out;
-	uint16 samplesperpixel, bitspersample = 1, shortv;
-	float floatv;
-	char thing[1024];
-	uint32 rowsperstrip = (uint32) -1;
-	int onestrip = 0;
-	uint16 fillorder = 0;
-	int c;
-	extern int optind;
-	extern char *optarg;
-
-	while ((c = getopt(argc, argv, "c:f:r:t:")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'f':		/* fill order */
-			if (streq(optarg, "lsb2msb"))
-				fillorder = FILLORDER_LSB2MSB;
-			else if (streq(optarg, "msb2lsb"))
-				fillorder = FILLORDER_MSB2LSB;
-			else
-				usage();
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			onestrip = 0;
-			break;
-		case 't':
-			threshold = atoi(optarg);
-			if (threshold < 0)
-				threshold = 0;
-			else if (threshold > 255)
-				threshold = 255;
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind < 2)
-		usage();
-	in = TIFFOpen(argv[optind], "r");
-	if (in == NULL)
-		return (-1);
-	TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-	if (samplesperpixel != 1) {
-		fprintf(stderr, "%s: Not a b&w image.\n", argv[0]);
-		return (-1);
-	}
-	TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-	if (bitspersample != 8) {
-		fprintf(stderr,
-		    " %s: Sorry, only handle 8-bit samples.\n", argv[0]);
-		return (-1);
-	}
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-1);
-	CopyField(TIFFTAG_IMAGEWIDTH, imagewidth);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
-	TIFFSetField(out, TIFFTAG_IMAGELENGTH, imagelength-1);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1);
-	TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-	TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-	if (fillorder)
-		TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
-	else
-		CopyField(TIFFTAG_FILLORDER, shortv);
-	sprintf(thing, "Dithered B&W version of %s", argv[optind]);
-	TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
-	CopyField(TIFFTAG_ORIENTATION, shortv);
-	CopyField(TIFFTAG_XRESOLUTION, floatv);
-	CopyField(TIFFTAG_YRESOLUTION, floatv);
-	CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
-	if (onestrip)
-		rowsperstrip = imagelength-1;
-	else
-		rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-	switch (compression) {
-	case COMPRESSION_CCITTFAX3:
-		TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, group3options);
-		break;
-	case COMPRESSION_LZW:
-	case COMPRESSION_DEFLATE:
-		if (predictor)
-			TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-		break;
-	}
-	fsdither(in, out);
-	TIFFClose(in);
-	TIFFClose(out);
-	return (0);
-}
-
-char* stuff[] = {
-"usage: tiffdither [options] input.tif output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-" -f lsb2msb	force lsb-to-msb FillOrder for output",
-" -f msb2lsb	force msb-to-lsb FillOrder for output",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding",
-" -c g3[:opts]	compress output with CCITT Group 3 encoding",
-" -c g4		compress output with CCITT Group 4 encoding",
-" -c none	use no compression algorithm on output",
-"",
-"Group 3 options:",
-" 1d		use default CCITT Group 3 1D-encoding",
-" 2d		use optional CCITT Group 3 2D-encoding",
-" fill		byte-align EOL codes",
-"For example, -c g3:2d:fill to get G3-2D-encoded data with byte-aligned EOLs",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/tiffdump.c b/tkimg1.3/libtiff/tools/tiffdump.c
deleted file mode 100644
index 57b321c..0000000
--- a/tkimg1.3/libtiff/tools/tiffdump.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffdump.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(VMS)
-#include <unixio.h>
-#include <file.h>
-#elif defined(_WINDOWS)
-#include <io.h>
-#define	off_t	toff_t
-#include "tiffio.h"
-#include <fcntl.h>
-#elif defined(applec)
-#define open _open_ /* to avoid conflicts */
-#include <fcntl.h>
-#undef open
-int  open(const char*, int, int);
-typedef unsigned int off_t;
-#else /* !VMS && !_WINDOWS && !applec */
-#ifdef unix
-#include <sys/types.h>
-#endif
-#include <unistd.h>
-#include <fcntl.h>
-#endif
-
-#if defined(MSDOS)
-#include <malloc.h>
-#endif
-
-#ifndef O_BINARY
-#define	O_BINARY	0
-#endif
-
-#include "tiffio.h"
-
-char*	appname;
-char*	curfile;
-int	swabflag;
-int	bigendian;
-int	typeshift[13];		/* data type shift counts */
-long	typemask[13];		/* data type masks */
-int	maxitems = 24;		/* maximum indirect data items to print */
-
-char*	bytefmt = "%s%#02x";		/* BYTE */
-char*	sbytefmt = "%s%d";		/* SBYTE */
-char*	shortfmt = "%s%u";		/* SHORT */
-char*	sshortfmt = "%s%d";		/* SSHORT */
-char*	longfmt = "%s%lu";		/* LONG */
-char*	slongfmt = "%s%ld";		/* SLONG */
-char*	rationalfmt = "%s%g";		/* RATIONAL */
-char*	srationalfmt = "%s%g";		/* SRATIONAL */
-char*	floatfmt = "%s%g";		/* FLOAT */
-char*	doublefmt = "%s%g";		/* DOUBLE */
-
-static	void dump(int, uint32);
-extern	int optind;
-extern	char* optarg;
-
-void
-usage()
-{
-	fprintf(stderr, "usage: %s [-h] [-o offset] [-m maxitems] file.tif ...\n", appname);
-	exit(-1);
-}
-
-int
-main(int argc, char* argv[])
-{
-	int one = 1, fd;
-	int multiplefiles = (argc > 1);
-	int c;
-	uint32 diroff = (uint32) 0;
-	bigendian = (*(char *)&one == 0);
-
-	appname = argv[0];
-	while ((c = getopt(argc, argv, "m:o:h")) != -1) {
-		switch (c) {
-		case 'h':			/* print values in hex */
-			shortfmt = "%s%#x";
-			sshortfmt = "%s%#x";
-			longfmt = "%s%#lx";
-			slongfmt = "%s%#lx";
-			break;
-		case 'o':
-			diroff = (uint32) strtoul(optarg, NULL, 0);
-			break;
-		case 'm':
-			maxitems = strtoul(optarg, NULL, 0);
-			break;
-		default:
-			usage();
-		}
-	}
-	if (optind >= argc)
-		usage();
-	for (; optind < argc; optind++) {
-		fd = open(argv[optind], O_RDONLY|O_BINARY, 0);
-		if (fd < 0) {
-			perror(argv[0]);
-			return (-1);
-		}
-		if (multiplefiles)
-			printf("%s:\n", argv[optind]);
-		curfile = argv[optind];
-		swabflag = 0;
-		dump(fd, diroff);
-		close(fd);
-	}
-	return (0);
-}
-
-static	TIFFHeader hdr;
-
-#define	ord(e)	((int)e)
-
-/*
- * Initialize shift & mask tables and byte
- * swapping state according to the file
- * byte order.
- */
-static void
-InitByteOrder(int magic)
-{
-	typemask[0] = 0;
-	typemask[ord(TIFF_BYTE)] = 0xff;
-	typemask[ord(TIFF_SBYTE)] = 0xff;
-	typemask[ord(TIFF_UNDEFINED)] = 0xff;
-	typemask[ord(TIFF_SHORT)] = 0xffff;
-	typemask[ord(TIFF_SSHORT)] = 0xffff;
-	typemask[ord(TIFF_LONG)] = 0xffffffff;
-	typemask[ord(TIFF_SLONG)] = 0xffffffff;
-	typemask[ord(TIFF_RATIONAL)] = 0xffffffff;
-	typemask[ord(TIFF_SRATIONAL)] = 0xffffffff;
-	typemask[ord(TIFF_FLOAT)] = 0xffffffff;
-	typemask[ord(TIFF_DOUBLE)] = 0xffffffff;
-	typeshift[0] = 0;
-	typeshift[ord(TIFF_LONG)] = 0;
-	typeshift[ord(TIFF_SLONG)] = 0;
-	typeshift[ord(TIFF_RATIONAL)] = 0;
-	typeshift[ord(TIFF_SRATIONAL)] = 0;
-	typeshift[ord(TIFF_FLOAT)] = 0;
-	typeshift[ord(TIFF_DOUBLE)] = 0;
-	if (magic == TIFF_BIGENDIAN) {
-		typeshift[ord(TIFF_BYTE)] = 24;
-		typeshift[ord(TIFF_SBYTE)] = 24;
-		typeshift[ord(TIFF_SHORT)] = 16;
-		typeshift[ord(TIFF_SSHORT)] = 16;
-		swabflag = !bigendian;
-	} else {
-		typeshift[ord(TIFF_BYTE)] = 0;
-		typeshift[ord(TIFF_SBYTE)] = 0;
-		typeshift[ord(TIFF_SHORT)] = 0;
-		typeshift[ord(TIFF_SSHORT)] = 0;
-		swabflag = bigendian;
-	}
-}
-
-static	uint32 ReadDirectory(int, unsigned, uint32);
-static	void ReadError(char*);
-static	void Error(const char*, ...);
-static	void Fatal(const char*, ...);
-
-static void
-dump(int fd, uint32 diroff)
-{
-	unsigned i;
-
-	lseek(fd, (off_t) 0, 0);
-	if (read(fd, (char*) &hdr, sizeof (hdr)) != sizeof (hdr))
-		ReadError("TIFF header");
-	/*
-	 * Setup the byte order handling.
-	 */
-	if (hdr.tiff_magic != TIFF_BIGENDIAN && hdr.tiff_magic != TIFF_LITTLEENDIAN)
-		Fatal("Not a TIFF file, bad magic number %u (%#x)",
-		    hdr.tiff_magic, hdr.tiff_magic);
-	InitByteOrder(hdr.tiff_magic);
-	/*
-	 * Swap header if required.
-	 */
-	if (swabflag) {
-		TIFFSwabShort(&hdr.tiff_version);
-		TIFFSwabLong(&hdr.tiff_diroff);
-	}
-	/*
-	 * Now check version (if needed, it's been byte-swapped).
-	 * Note that this isn't actually a version number, it's a
-	 * magic number that doesn't change (stupid).
-	 */
-	if (hdr.tiff_version != TIFF_VERSION)
-		Fatal("Not a TIFF file, bad version number %u (%#x)",
-		    hdr.tiff_version, hdr.tiff_version); 
-	printf("Magic: %#x <%s-endian> Version: %#x\n",
-	    hdr.tiff_magic,
-	    hdr.tiff_magic == TIFF_BIGENDIAN ? "big" : "little",
-	    hdr.tiff_version);
-	if (diroff == 0)
-	    diroff = hdr.tiff_diroff;
-	for (i = 0; diroff != 0; i++) {
-		if (i > 0)
-			putchar('\n');
-		diroff = ReadDirectory(fd, i, diroff);
-	}
-}
-
-static int datawidth[] = {
-    0,	/* nothing */
-    1,	/* TIFF_BYTE */
-    1,	/* TIFF_ASCII */
-    2,	/* TIFF_SHORT */
-    4,	/* TIFF_LONG */
-    8,	/* TIFF_RATIONAL */
-    1,	/* TIFF_SBYTE */
-    1,	/* TIFF_UNDEFINED */
-    2,	/* TIFF_SSHORT */
-    4,	/* TIFF_SLONG */
-    8,	/* TIFF_SRATIONAL */
-    4,	/* TIFF_FLOAT */
-    8,	/* TIFF_DOUBLE */
-};
-#define	NWIDTHS	(sizeof (datawidth) / sizeof (datawidth[0]))
-static	int TIFFFetchData(int, TIFFDirEntry*, void*);
-static	void PrintTag(FILE*, uint16);
-static	void PrintType(FILE*, uint16);
-static	void PrintData(FILE*, uint16, uint32, unsigned char*);
-static	void PrintByte(FILE*, const char*, TIFFDirEntry*);
-static	void PrintShort(FILE*, const char*, TIFFDirEntry*);
-static	void PrintLong(FILE*, const char*, TIFFDirEntry*);
-
-/*
- * Read the next TIFF directory from a file
- * and convert it to the internal format.
- * We read directories sequentially.
- */
-static uint32
-ReadDirectory(int fd, unsigned ix, uint32 off)
-{
-	register TIFFDirEntry *dp;
-	register int n;
-	TIFFDirEntry *dir = 0;
-	uint16 dircount;
-	int space;
-	uint32 nextdiroff = 0;
-
-	if (off == 0)			/* no more directories */
-		goto done;
-	if (lseek(fd, (off_t) off, 0) != off) {
-		Fatal("Seek error accessing TIFF directory");
-		goto done;
-	}
-	if (read(fd, (char*) &dircount, sizeof (uint16)) != sizeof (uint16)) {
-		ReadError("directory count");
-		goto done;
-	}
-	if (swabflag)
-		TIFFSwabShort(&dircount);
-	dir = (TIFFDirEntry *)_TIFFmalloc(dircount * sizeof (TIFFDirEntry));
-	if (dir == NULL) {
-		Fatal("No space for TIFF directory");
-		goto done;
-	}
-	n = read(fd, (char*) dir, dircount*sizeof (*dp));
-	if (n != dircount*sizeof (*dp)) {
-		n /= sizeof (*dp);
-		Error(
-	    "Could only read %u of %u entries in directory at offset %#lx",
-		    n, dircount, (unsigned long) off);
-		dircount = n;
-	}
-	if (read(fd, (char*) &nextdiroff, sizeof (uint32)) != sizeof (uint32))
-		nextdiroff = 0;
-	if (swabflag)
-		TIFFSwabLong(&nextdiroff);
-	printf("Directory %u: offset %lu (%#lx) next %lu (%#lx)\n", ix,
-	    (unsigned long) off, (unsigned long) off,
-	    (unsigned long) nextdiroff, (unsigned long) nextdiroff);
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-		if (swabflag) {
-			TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dp->tdir_count, 2);
-		}
-		PrintTag(stdout, dp->tdir_tag);
-		putchar(' ');
-		PrintType(stdout, dp->tdir_type);
-		putchar(' ');
-		printf("%lu<", (unsigned long) dp->tdir_count);
-		if (dp->tdir_type >= NWIDTHS) {
-			printf(">\n");
-			continue;
-		}
-		space = dp->tdir_count * datawidth[dp->tdir_type];
-		if (space <= 4) {
-			switch (dp->tdir_type) {
-			case TIFF_FLOAT:
-			case TIFF_UNDEFINED:
-			case TIFF_ASCII: {
-				unsigned char data[4];
-				_TIFFmemcpy(data, &dp->tdir_offset, 4);
-				if (swabflag)
-					TIFFSwabLong((uint32*) data);
-				PrintData(stdout,
-				    dp->tdir_type, dp->tdir_count, data);
-				break;
-			}
-			case TIFF_BYTE:
-				PrintByte(stdout, bytefmt, dp);
-				break;
-			case TIFF_SBYTE:
-				PrintByte(stdout, sbytefmt, dp);
-				break;
-			case TIFF_SHORT:
-				PrintShort(stdout, shortfmt, dp);
-				break;
-			case TIFF_SSHORT:
-				PrintShort(stdout, sshortfmt, dp);
-				break;
-			case TIFF_LONG:
-				PrintLong(stdout, longfmt, dp);
-				break;
-			case TIFF_SLONG:
-				PrintLong(stdout, slongfmt, dp);
-				break;
-			}
-		} else {
-			unsigned char *data = (unsigned char *)_TIFFmalloc(space);
-			if (data) {
-				if (TIFFFetchData(fd, dp, data))
-					if (dp->tdir_count > maxitems) {
-						PrintData(stdout, dp->tdir_type,
-						    maxitems, data);
-						printf(" ...");
-					} else
-						PrintData(stdout, dp->tdir_type,
-						    dp->tdir_count, data);
-				_TIFFfree(data);
-			} else
-				Error("No space for data for tag %u",
-				    dp->tdir_tag);
-		}
-		printf(">\n");
-	}
-done:
-	if (dir)
-		_TIFFfree((char *)dir);
-	return (nextdiroff);
-}
-
-static	struct tagname {
-	uint16	tag;
-	char*	name;
-} tagnames[] = {
-    { TIFFTAG_SUBFILETYPE,	"SubFileType" },
-    { TIFFTAG_OSUBFILETYPE,	"OldSubFileType" },
-    { TIFFTAG_IMAGEWIDTH,	"ImageWidth" },
-    { TIFFTAG_IMAGELENGTH,	"ImageLength" },
-    { TIFFTAG_BITSPERSAMPLE,	"BitsPerSample" },
-    { TIFFTAG_COMPRESSION,	"Compression" },
-    { TIFFTAG_PHOTOMETRIC,	"Photometric" },
-    { TIFFTAG_THRESHHOLDING,	"Threshholding" },
-    { TIFFTAG_CELLWIDTH,	"CellWidth" },
-    { TIFFTAG_CELLLENGTH,	"CellLength" },
-    { TIFFTAG_FILLORDER,	"FillOrder" },
-    { TIFFTAG_DOCUMENTNAME,	"DocumentName" },
-    { TIFFTAG_IMAGEDESCRIPTION,	"ImageDescription" },
-    { TIFFTAG_MAKE,		"Make" },
-    { TIFFTAG_MODEL,		"Model" },
-    { TIFFTAG_STRIPOFFSETS,	"StripOffsets" },
-    { TIFFTAG_ORIENTATION,	"Orientation" },
-    { TIFFTAG_SAMPLESPERPIXEL,	"SamplesPerPixel" },
-    { TIFFTAG_ROWSPERSTRIP,	"RowsPerStrip" },
-    { TIFFTAG_STRIPBYTECOUNTS,	"StripByteCounts" },
-    { TIFFTAG_MINSAMPLEVALUE,	"MinSampleValue" },
-    { TIFFTAG_MAXSAMPLEVALUE,	"MaxSampleValue" },
-    { TIFFTAG_XRESOLUTION,	"XResolution" },
-    { TIFFTAG_YRESOLUTION,	"YResolution" },
-    { TIFFTAG_PLANARCONFIG,	"PlanarConfig" },
-    { TIFFTAG_PAGENAME,		"PageName" },
-    { TIFFTAG_XPOSITION,	"XPosition" },
-    { TIFFTAG_YPOSITION,	"YPosition" },
-    { TIFFTAG_FREEOFFSETS,	"FreeOffsets" },
-    { TIFFTAG_FREEBYTECOUNTS,	"FreeByteCounts" },
-    { TIFFTAG_GRAYRESPONSEUNIT,	"GrayResponseUnit" },
-    { TIFFTAG_GRAYRESPONSECURVE,"GrayResponseCurve" },
-    { TIFFTAG_GROUP3OPTIONS,	"Group3Options" },
-    { TIFFTAG_GROUP4OPTIONS,	"Group4Options" },
-    { TIFFTAG_RESOLUTIONUNIT,	"ResolutionUnit" },
-    { TIFFTAG_PAGENUMBER,	"PageNumber" },
-    { TIFFTAG_COLORRESPONSEUNIT,"ColorResponseUnit" },
-    { TIFFTAG_TRANSFERFUNCTION,	"TransferFunction" },
-    { TIFFTAG_SOFTWARE,		"Software" },
-    { TIFFTAG_DATETIME,		"DateTime" },
-    { TIFFTAG_ARTIST,		"Artist" },
-    { TIFFTAG_HOSTCOMPUTER,	"HostComputer" },
-    { TIFFTAG_PREDICTOR,	"Predictor" },
-    { TIFFTAG_WHITEPOINT,	"Whitepoint" },
-    { TIFFTAG_PRIMARYCHROMATICITIES,"PrimaryChromaticities" },
-    { TIFFTAG_COLORMAP,		"Colormap" },
-    { TIFFTAG_HALFTONEHINTS,	"HalftoneHints" },
-    { TIFFTAG_TILEWIDTH,	"TileWidth" },
-    { TIFFTAG_TILELENGTH,	"TileLength" },
-    { TIFFTAG_TILEOFFSETS,	"TileOffsets" },
-    { TIFFTAG_TILEBYTECOUNTS,	"TileByteCounts" },
-    { TIFFTAG_BADFAXLINES,	"BadFaxLines" },
-    { TIFFTAG_CLEANFAXDATA,	"CleanFaxData" },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES, "ConsecutiveBadFaxLines" },
-    { TIFFTAG_SUBIFD,		"SubIFD" },
-    { TIFFTAG_INKSET,		"InkSet" },
-    { TIFFTAG_INKNAMES,		"InkNames" },
-    { TIFFTAG_NUMBEROFINKS,	"NumberOfInks" },
-    { TIFFTAG_DOTRANGE,		"DotRange" },
-    { TIFFTAG_TARGETPRINTER,	"TargetPrinter" },
-    { TIFFTAG_EXTRASAMPLES,	"ExtraSamples" },
-    { TIFFTAG_SAMPLEFORMAT,	"SampleFormat" },
-    { TIFFTAG_SMINSAMPLEVALUE,	"SMinSampleValue" },
-    { TIFFTAG_SMAXSAMPLEVALUE,	"SMaxSampleValue" },
-    { TIFFTAG_JPEGPROC,		"JPEGProcessingMode" },
-    { TIFFTAG_JPEGIFOFFSET,	"JPEGInterchangeFormat" },
-    { TIFFTAG_JPEGIFBYTECOUNT,	"JPEGInterchangeFormatLength" },
-    { TIFFTAG_JPEGRESTARTINTERVAL,"JPEGRestartInterval" },
-    { TIFFTAG_JPEGLOSSLESSPREDICTORS,"JPEGLosslessPredictors" },
-    { TIFFTAG_JPEGPOINTTRANSFORM,"JPEGPointTransform" },
-    { TIFFTAG_JPEGTABLES,       "JPEGTables" },
-    { TIFFTAG_JPEGQTABLES,	"JPEGQTables" },
-    { TIFFTAG_JPEGDCTABLES,	"JPEGDCTables" },
-    { TIFFTAG_JPEGACTABLES,	"JPEGACTables" },
-    { TIFFTAG_YCBCRCOEFFICIENTS,"YCbCrCoefficients" },
-    { TIFFTAG_YCBCRSUBSAMPLING,	"YCbCrSubsampling" },
-    { TIFFTAG_YCBCRPOSITIONING,	"YCbCrPositioning" },
-    { TIFFTAG_REFERENCEBLACKWHITE, "ReferenceBlackWhite" },
-    { TIFFTAG_REFPTS,		"IgReferencePoints (Island Graphics)" },
-    { TIFFTAG_REGIONTACKPOINT,	"IgRegionTackPoint (Island Graphics)" },
-    { TIFFTAG_REGIONWARPCORNERS,"IgRegionWarpCorners (Island Graphics)" },
-    { TIFFTAG_REGIONAFFINE,	"IgRegionAffine (Island Graphics)" },
-    { TIFFTAG_MATTEING,		"OBSOLETE Matteing (Silicon Graphics)" },
-    { TIFFTAG_DATATYPE,		"OBSOLETE DataType (Silicon Graphics)" },
-    { TIFFTAG_IMAGEDEPTH,	"ImageDepth (Silicon Graphics)" },
-    { TIFFTAG_TILEDEPTH,	"TileDepth (Silicon Graphics)" },
-    { 32768,			"OLD BOGUS Matteing tag" },
-    { TIFFTAG_COPYRIGHT,	"Copyright" },
-    { TIFFTAG_ICCPROFILE,	"ICC Profile" },
-    { TIFFTAG_JBIGOPTIONS,	"JBIG Options" },
-    { TIFFTAG_STONITS,		"StoNits" },
-};
-#define	NTAGS	(sizeof (tagnames) / sizeof (tagnames[0]))
-
-static void
-PrintTag(FILE* fd, uint16 tag)
-{
-	register struct tagname *tp;
-
-	for (tp = tagnames; tp < &tagnames[NTAGS]; tp++)
-		if (tp->tag == tag) {
-			fprintf(fd, "%s (%u)", tp->name, tag);
-			return;
-		}
-	fprintf(fd, "%u (%#x)", tag, tag);
-}
-
-static void
-PrintType(FILE* fd, uint16 type)
-{
-	static char *typenames[] = {
-	    "0",
-	    "BYTE",
-	    "ASCII",
-	    "SHORT",
-	    "LONG",
-	    "RATIONAL",
-	    "SBYTE",
-	    "UNDEFINED",
-	    "SSHORT",
-	    "SLONG",
-	    "SRATIONAL",
-	    "FLOAT",
-	    "DOUBLE"
-	};
-#define	NTYPES	(sizeof (typenames) / sizeof (typenames[0]))
-
-	if (type < NTYPES)
-		fprintf(fd, "%s (%u)", typenames[type], type);
-	else
-		fprintf(fd, "%u (%#x)", type, type);
-}
-#undef	NTYPES
-
-static void
-PrintByte(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
-	char* sep = "";
-
-	if (hdr.tiff_magic != TIFF_LITTLEENDIAN) {
-		switch ((int)dp->tdir_count) {
-		case 4: fprintf(fd, fmt, sep, dp->tdir_offset&0xff);
-			sep = " ";
-		case 3: fprintf(fd, fmt, sep, (dp->tdir_offset>>8)&0xff);
-			sep = " ";
-		case 2: fprintf(fd, fmt, sep, (dp->tdir_offset>>16)&0xff);
-			sep = " ";
-		case 1: fprintf(fd, fmt, sep, dp->tdir_offset>>24);
-		}
-	} else {
-		switch ((int)dp->tdir_count) {
-		case 4: fprintf(fd, fmt, sep, dp->tdir_offset>>24);
-			sep = " ";
-		case 3: fprintf(fd, fmt, sep, (dp->tdir_offset>>16)&0xff);
-			sep = " ";
-		case 2: fprintf(fd, fmt, sep, (dp->tdir_offset>>8)&0xff);
-			sep = " ";
-		case 1: fprintf(fd, fmt, sep, dp->tdir_offset&0xff);
-		}
-	}
-}
-
-static void
-PrintShort(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
-	char *sep = "";
-
-	if (hdr.tiff_magic != TIFF_LITTLEENDIAN) {
-		switch (dp->tdir_count) {
-		case 2: fprintf(fd, fmt, sep, dp->tdir_offset&0xffff);
-			sep = " ";
-		case 1: fprintf(fd, fmt, sep, dp->tdir_offset>>16);
-		}
-	} else {
-		switch (dp->tdir_count) {
-		case 2: fprintf(fd, fmt, sep, dp->tdir_offset>>16);
-			sep = " ";
-		case 1: fprintf(fd, fmt, sep, dp->tdir_offset&0xffff);
-		}
-	}
-}
-
-static void
-PrintLong(FILE* fd, const char* fmt, TIFFDirEntry* dp)
-{
-	fprintf(fd, fmt, "", (long) dp->tdir_offset);
-}
-
-#include <ctype.h>
-
-static void
-PrintASCII(FILE* fd, uint32 cc, const unsigned char* cp)
-{
-	for (; cc > 0; cc--, cp++) {
-		const char* tp;
-
-		if (isprint(*cp)) {
-			fputc(*cp, fd);
-			continue;
-		}
-		for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++)
-			if (*tp++ == *cp)
-				break;
-		if (*tp)
-			fprintf(fd, "\\%c", *tp);
-		else if (*cp)
-			fprintf(fd, "\\%03o", *cp);
-		else
-			fprintf(fd, "\\0");
-	}
-}
-
-static void
-PrintData(FILE* fd, uint16 type, uint32 count, unsigned char* data)
-{
-	char* sep = "";
-
-	switch (type) {
-	case TIFF_BYTE:
-		while (count-- > 0)
-			fprintf(fd, bytefmt, sep, *data++), sep = " ";
-		break;
-	case TIFF_SBYTE:
-		while (count-- > 0)
-			fprintf(fd, sbytefmt, sep, *(char *)data++), sep = " ";
-		break;
-	case TIFF_UNDEFINED:
-		while (count-- > 0)
-			fprintf(fd, bytefmt, sep, *data++), sep = " ";
-		break;
-	case TIFF_ASCII:
-		PrintASCII(fd, count, data);
-		break;
-	case TIFF_SHORT: {
-		register uint16 *wp = (uint16*)data;
-		while (count-- > 0)
-			fprintf(fd, shortfmt, sep, *wp++), sep = " ";
-		break;
-	}
-	case TIFF_SSHORT: {
-		register int16 *wp = (int16*)data;
-		while (count-- > 0)
-			fprintf(fd, sshortfmt, sep, *wp++), sep = " ";
-		break;
-	}
-	case TIFF_LONG: {
-		register uint32 *lp = (uint32*)data;
-		while (count-- > 0) {
-			fprintf(fd, longfmt, sep, (unsigned long) *lp++);
-			sep = " ";
-		}
-		break;
-	}
-	case TIFF_SLONG: {
-		register int32 *lp = (int32*)data;
-		while (count-- > 0)
-			fprintf(fd, slongfmt, sep, (long) *lp++), sep = " ";
-		break;
-	}
-	case TIFF_RATIONAL: {
-		register uint32 *lp = (uint32*)data;
-		while (count-- > 0) {
-			if (lp[1] == 0)
-				fprintf(fd, "%sNan (%lu/%lu)", sep,
-				    (unsigned long) lp[0],
-				    (unsigned long) lp[1]);
-			else
-				fprintf(fd, rationalfmt, sep,
-				    (double)lp[0] / (double)lp[1]);
-			sep = " ";
-			lp += 2;
-		}
-		break;
-	}
-	case TIFF_SRATIONAL: {
-		register int32 *lp = (int32*)data;
-		while (count-- > 0) {
-			if (lp[1] == 0)
-				fprintf(fd, "%sNan (%ld/%ld)", sep,
-				    (long) lp[0], (long) lp[1]);
-			else
-				fprintf(fd, srationalfmt, sep,
-				    (double)lp[0] / (double)lp[1]);
-			sep = " ";
-			lp += 2;
-		}
-		break;
-	}
-	case TIFF_FLOAT: {
-		register float *fp = (float *)data;
-		while (count-- > 0)
-			fprintf(fd, floatfmt, sep, *fp++), sep = " ";
-		break;
-	}
-	case TIFF_DOUBLE: {
-		register double *dp = (double *)data;
-		while (count-- > 0)
-			fprintf(fd, doublefmt, sep, *dp++), sep = " ";
-		break;
-	}
-	}
-}
-
-/*
- * Fetch a contiguous directory item.
- */
-static int
-TIFFFetchData(int fd, TIFFDirEntry* dir, void* cp)
-{
-	int cc, w;
-
-	w = (dir->tdir_type < NWIDTHS ? datawidth[dir->tdir_type] : 0);
-	cc = dir->tdir_count * w;
-	if (lseek(fd, (off_t) dir->tdir_offset, 0) == dir->tdir_offset &&
-	    read(fd, cp, cc) == cc) {
-		if (swabflag) {
-			switch (dir->tdir_type) {
-			case TIFF_SHORT:
-			case TIFF_SSHORT:
-				TIFFSwabArrayOfShort((uint16*) cp,
-				    dir->tdir_count);
-				break;
-			case TIFF_LONG:
-			case TIFF_SLONG:
-			case TIFF_FLOAT:
-				TIFFSwabArrayOfLong((uint32*) cp,
-				    dir->tdir_count);
-				break;
-			case TIFF_RATIONAL:
-				TIFFSwabArrayOfLong((uint32*) cp,
-				    2*dir->tdir_count);
-				break;
-			case TIFF_DOUBLE:
-				TIFFSwabArrayOfDouble((double*) cp,
-				    dir->tdir_count);
-				break;
-			}
-		}
-		return (cc);
-	}
-	Error("Error while reading data for tag %u", dir->tdir_tag);
-	return (0);
-}
-
-static void
-ReadError(char* what)
-{
-	Fatal("Error while reading %s", what);
-}
-
-#include <stdarg.h>
-
-static void
-vError(FILE* fd, const char* fmt, va_list ap)
-{
-	fprintf(fd, "%s: ", curfile);
-	vfprintf(fd, fmt, ap);
-	fprintf(fd, ".\n");
-}
-
-static void
-Error(const char* fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vError(stderr, fmt, ap);
-	va_end(ap);
-}
-
-static void
-Fatal(const char* fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vError(stderr, fmt, ap);
-	va_end(ap);
-	exit(-1);
-}
diff --git a/tkimg1.3/libtiff/tools/tiffgt.c b/tkimg1.3/libtiff/tools/tiffgt.c
deleted file mode 100644
index ec88e92..0000000
--- a/tkimg1.3/libtiff/tools/tiffgt.c
+++ /dev/null
@@ -1,435 +0,0 @@
-/* $Id: tiffgt.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- * Copyright (c) 2003, Andrey Kiselev <dron at remotesensing.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <GL/gl.h>
-#include <GL/glut.h>
-
-#include "tiffio.h"
-
-static	uint32	width = 0, height = 0;		/* window width & height */
-static	uint32*	raster = NULL;			/* displayable image */
-static TIFFRGBAImage img;
-static int	order0 = 0, order;
-static uint16	photo0 = (uint16) -1, photo;
-static int	stoponerr = 0;			/* stop on read error */
-static int	verbose = 0;
-static char	title[1024];			/* window title line */
-static long	xmax, ymax;
-static char**	filelist = NULL;
-static int	fileindex;
-static int	filenum;
-static TIFFErrorHandler oerror;
-static TIFFErrorHandler owarning;
-
-static void cleanup_and_exit(void);
-static void initImage(void);
-static int  prevImage(void);
-static int  nextImage(void);
-static void setWindowSize(void);
-static void usage(void);
-static uint16 photoArg(const char*);
-static void raster_draw(void);
-static void raster_reshape(int, int);
-static void raster_keys(unsigned char, int, int);
-static void raster_special(int, int, int);
-
-extern	char* optarg;
-extern	int optind;
-static TIFF* tif = NULL;
-
-int
-main(int argc, char* argv[])
-{
-	int c;
-	int dirnum = -1;
-	uint32 diroff = 0;
-
-	oerror = TIFFSetErrorHandler(NULL);
-	owarning = TIFFSetWarningHandler(NULL);
-	while ((c = getopt(argc, argv, "d:o:p:eflmsvw?")) != -1)
-	    switch (c) {
-	    case 'd':
-		dirnum = atoi(optarg);
-		break;
-	    case 'e':
-		oerror = TIFFSetErrorHandler(oerror);
-		break;
-	    case 'l':
-		order0 = FILLORDER_LSB2MSB;
-		break;
-	    case 'm':
-		order0 = FILLORDER_MSB2LSB;
-		break;
-	    case 'o':
-		diroff = strtoul(optarg, NULL, 0);
-		break;
-	    case 'p':
-		photo0 = photoArg(optarg);
-		break;
-	    case 's':
-		stoponerr = 1;
-		break;
-	    case 'w':
-		owarning = TIFFSetWarningHandler(owarning);
-		break;
-	    case 'v':
-		verbose = 1;
-		break;
-	    case '?':
-		usage();
-		/*NOTREACHED*/
-	    }
-	filenum = argc - optind;
-	if ( filenum < 1)
-	        usage();
-
-	glutInit(&argc, argv);
-	glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
-
-	/*
-	 * Get the screen size
-	 */
-	xmax = glutGet(GLUT_SCREEN_WIDTH);
-	ymax = glutGet(GLUT_SCREEN_HEIGHT);
-
-	/*
-	 * Use 90% of the screen size
-	 */
-	xmax = xmax - xmax / 10.0;
-	ymax = ymax - ymax / 10.0;
-
-        filelist = (char **) _TIFFmalloc(filenum * sizeof(char*));
-        if (!filelist) {
-                TIFFError(argv[0], "Can not allocate space for the file list.");
-                return 1;
-        }
-        _TIFFmemcpy(filelist, argv + optind, filenum * sizeof(char*));
-	fileindex = -1;
-	if (nextImage() < 0) {
-		_TIFFfree(filelist);
-		return 2;
-	}
-	/*
-	 * Set initial directory if user-specified
-	 * file was opened successfully.
-	 */
-	if (dirnum != -1 && !TIFFSetDirectory(tif, dirnum))
-	    TIFFError(argv[0], "Error, seeking to directory %d", dirnum);
-	if (diroff != 0 && !TIFFSetSubDirectory(tif, diroff))
-	    TIFFError(argv[0], "Error, setting subdirectory at %#x", diroff);
-	order = order0;
-	photo = photo0;
-	initImage();
-	/*
-	 * Create a new window or reconfigure an existing
-	 * one to suit the image to be displayed.
-	 */
-	glutInitWindowSize(width, height);
-	snprintf(title, 1024, "%s [%u]", filelist[fileindex],
-		(unsigned int) TIFFCurrentDirectory(tif));
-	glutCreateWindow(title);
-	glutDisplayFunc(raster_draw);
-	glutReshapeFunc(raster_reshape);
-	glutKeyboardFunc(raster_keys);
-	glutSpecialFunc(raster_special);
-	glutMainLoop();
-
-	cleanup_and_exit();
-        return 0;
-}
-
-static void 
-cleanup_and_exit(void)
-{
-	TIFFRGBAImageEnd(&img);
-	if (filelist != NULL)
-		_TIFFfree(filelist);
-	if (raster != NULL)
-		_TIFFfree(raster);
-	if (tif != NULL)
-	        TIFFClose(tif);
-	exit(0);
-}
-
-static void
-initImage(void)
-{
-	uint32 w, h;
-
-	if (order)
-	    TIFFSetField(tif, TIFFTAG_FILLORDER, order);
-	if (photo != (uint16) -1)
-	    TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photo);
-	if (!TIFFRGBAImageBegin(&img, tif, stoponerr, title)) {
-	    TIFFError(filelist[fileindex], title);
-	    TIFFClose(tif), tif = NULL;
-	}
-
-	/*
-	 * Setup the image raster as required.
-	 */
-	h = img.height;
-	w = img.width;
-	if (h > ymax) {
-		w = (int)(w * ((float)ymax / h));
-		h = ymax;
-	}
-	if (w > xmax) {
-		h = (int)(h * ((float)xmax / w));
-		w = xmax;
-	}
-
-	if (w != width || h != height) {
-	    if (raster != NULL)
-		_TIFFfree(raster), raster = NULL;
-	    raster = (uint32*) _TIFFmalloc(img.width * img.height * sizeof (uint32));
-	    if (raster == NULL) {
-		width = height = 0;
-		TIFFError(filelist[fileindex], "No space for raster buffer");
-		cleanup_and_exit();
-	    }
-	    width = w;
-	    height = h;
-	}
-	TIFFRGBAImageGet(&img, raster, img.width, img.height);
-}
-
-static int
-prevImage(void)
-{
-	if (fileindex > 0)
-		fileindex--;
-	else if (tif)
-		return fileindex;
-	if (tif)
-		TIFFClose(tif);
-	tif = TIFFOpen(filelist[fileindex], "r");
-	if (tif == NULL)
-		return -1;
-	return fileindex;
-}
-
-static int
-nextImage(void)
-{
-	if (fileindex < filenum - 1)
-		fileindex++;
-	else if (tif)
-		return fileindex;
-	if (tif)
-		TIFFClose(tif);
-	tif = TIFFOpen(filelist[fileindex], "r");
-	if (tif == NULL)
-		return -1;
-	return fileindex;
-}
-
-static void
-setWindowSize(void)
-{
-	glutReshapeWindow(width, height);
-}
-
-static void
-raster_draw(void)
-{
-	glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, raster);
-}
-
-static void
-raster_reshape(int win_w, int win_h)
-{
-	GLfloat xratio = (GLfloat)win_w/img.width;
-	GLfloat yratio = (GLfloat)win_h/img.height;
-	int	ratio = (int)(((xratio > yratio)?xratio:yratio) * 100);
-
-	glPixelZoom(xratio, yratio);
-	glViewport(0, 0, win_w, win_h);
-	snprintf(title, 1024, "%s [%u] %d%%", filelist[fileindex],
-		(unsigned int) TIFFCurrentDirectory(tif), ratio);
-	glutSetWindowTitle(title);
-}
-
-static void
-raster_keys(unsigned char key, int x, int y)
-{
-	switch (key) {
-		case 'b':			/* photometric MinIsBlack */
-		    photo = PHOTOMETRIC_MINISBLACK;
-		    initImage();
-		    break;
-		case 'l':			/* lsb-to-msb FillOrder */
-		    order = FILLORDER_LSB2MSB;
-		    initImage();
-		    break;
-		case 'm':			/* msb-to-lsb FillOrder */
-		    order = FILLORDER_MSB2LSB;
-		    initImage();
-		    break;
-		case 'w':			/* photometric MinIsWhite */
-		    photo = PHOTOMETRIC_MINISWHITE;
-		    initImage();
-                    break;
-		case 'W':			/* toggle warnings */
-		    owarning = TIFFSetWarningHandler(owarning);
-		    initImage();
-		    break;
-		case 'E':			/* toggle errors */
-		    oerror = TIFFSetErrorHandler(oerror);
-		    initImage();
-		    break;
-		case 'z':			/* reset to defaults */
-		case 'Z':
-		    order = order0;
-		    photo = photo0;
-		    if (owarning == NULL)
-			owarning = TIFFSetWarningHandler(NULL);
-		    if (oerror == NULL)
-			oerror = TIFFSetErrorHandler(NULL);
-		    initImage();
-		    break;
-		case 'q':			/* exit */
-		case '\033':
-		    cleanup_and_exit();
-	}
-	glutPostRedisplay();
-}
-
-static void
-raster_special(int key, int x, int y)
-{
-	switch (key) {
-		case GLUT_KEY_PAGE_UP:		/* previous logical image */
-		    if (TIFFCurrentDirectory(tif) > 0) {
-			    if (TIFFSetDirectory(tif,
-						 TIFFCurrentDirectory(tif)-1)) {
-				    initImage();
-				    setWindowSize();
-			}
-		    } else {
-			    TIFFRGBAImageEnd(&img);
-			    prevImage();
-			    initImage();
-			    setWindowSize();
-		    }
-		break;
-		case GLUT_KEY_PAGE_DOWN:	/* next logical image */
-		    if (!TIFFLastDirectory(tif)) {
-			    if (TIFFReadDirectory(tif)) {
-				    initImage();
-				    setWindowSize();
-			    }
-		    } else {
-			    TIFFRGBAImageEnd(&img);
-			    nextImage();
-			    initImage();
-			    setWindowSize();
-		    }
-		break;
-		case GLUT_KEY_HOME:		/* 1st image in current file */
-			if (TIFFSetDirectory(tif, 0)) {
-				TIFFRGBAImageEnd(&img);
-				initImage();
-				setWindowSize();
-			}
-		break;
-		case GLUT_KEY_END:		/* last image in current file */
-			TIFFRGBAImageEnd(&img);
-			while (!TIFFLastDirectory(tif))
-				TIFFReadDirectory(tif);
-			initImage();
-			setWindowSize();
-		break;
-	}
-	glutPostRedisplay();
-}
-
-
-
-char* stuff[] = {
-"usage: tiffgt [options] file.tif",
-"where options are:",
-" -c		use colormap visual",
-" -d dirnum	set initial directory (default is 0)",
-" -e		enable display of TIFF error messages",
-" -l  		force lsb-to-msb FillOrder",
-" -m  		force msb-to-lsb FillOrder",
-" -o offset	set initial directory offset",
-" -p photo	override photometric interpretation",
-" -r		use fullcolor visual",
-" -s  		stop decoding on first error (default is ignore errors)",
-" -v		enable verbose mode",
-" -w		enable display of TIFF warning messages",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-        int i;
-
-	setbuf(stderr, buf);
-		fprintf(stderr, "%s\n\n", TIFFGetVersion());
-        for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-static uint16
-photoArg(const char* arg)
-{
-	if (strcmp(arg, "miniswhite") == 0)
-	    return (PHOTOMETRIC_MINISWHITE);
-	else if (strcmp(arg, "minisblack") == 0)
-	    return (PHOTOMETRIC_MINISBLACK);
-	else if (strcmp(arg, "rgb") == 0)
-	    return (PHOTOMETRIC_RGB);
-	else if (strcmp(arg, "palette") == 0)
-	    return (PHOTOMETRIC_PALETTE);
-	else if (strcmp(arg, "mask") == 0)
-	    return (PHOTOMETRIC_MASK);
-	else if (strcmp(arg, "separated") == 0)
-	    return (PHOTOMETRIC_SEPARATED);
-	else if (strcmp(arg, "ycbcr") == 0)
-	    return (PHOTOMETRIC_YCBCR);
-	else if (strcmp(arg, "cielab") == 0)
-	    return (PHOTOMETRIC_CIELAB);
-	else if (strcmp(arg, "logl") == 0)
-	    return (PHOTOMETRIC_LOGL);
-	else if (strcmp(arg, "logluv") == 0)
-	    return (PHOTOMETRIC_LOGLUV);
-	else
-	    return ((uint16) -1);
-}
-
-
diff --git a/tkimg1.3/libtiff/tools/tiffinfo.c b/tkimg1.3/libtiff/tools/tiffinfo.c
deleted file mode 100644
index ed84caf..0000000
--- a/tkimg1.3/libtiff/tools/tiffinfo.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffinfo.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-
-int	showdata = 0;			/* show data */
-int	rawdata = 0;			/* show raw/decoded data */
-int	showwords = 0;			/* show data as bytes/words */
-int	readdata = 0;			/* read data in file */
-int	stoponerr = 1;			/* stop on first read error */
-
-static	void usage(void);
-static	void tiffinfo(TIFF*, uint16, long);
-
-int
-main(int argc, char* argv[])
-{
-	int dirnum = -1, multiplefiles, c;
-	uint16 order = 0;
-	TIFF* tif;
-	extern int optind;
-	extern char* optarg;
-	long flags = 0;
-	uint32 diroff = 0;
-	int chopstrips = 0;		/* disable strip chopping */
-
-	while ((c = getopt(argc, argv, "f:o:cdDSjlmrsvwz0123456789")) != -1)
-		switch (c) {
-		case '0': case '1': case '2': case '3':
-		case '4': case '5': case '6': case '7':
-		case '8': case '9':
-			dirnum = atoi(&argv[optind-1][1]);
-			break;
-		case 'd':
-			showdata++;
-			/* fall thru... */
-		case 'D':
-			readdata++;
-			break;
-		case 'c':
-			flags |= TIFFPRINT_COLORMAP | TIFFPRINT_CURVES;
-			break;
-		case 'f':		/* fill order */
-			if (streq(optarg, "lsb2msb"))
-				order = FILLORDER_LSB2MSB;
-			else if (streq(optarg, "msb2lsb"))
-				order = FILLORDER_MSB2LSB;
-			else
-				usage();
-			break;
-		case 'i':
-			stoponerr = 0;
-			break;
-		case 'o':
-			diroff = strtoul(optarg, NULL, 0);
-			break;
-		case 'j':
-			flags |= TIFFPRINT_JPEGQTABLES |
-				 TIFFPRINT_JPEGACTABLES |
-				 TIFFPRINT_JPEGDCTABLES;
-			break;
-		case 'r':
-			rawdata = 1;
-			break;
-		case 's':
-			flags |= TIFFPRINT_STRIPS;
-			break;
-		case 'w':
-			showwords = 1;
-			break;
-		case 'z':
-			chopstrips = 1;
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (optind >= argc)
-		usage();
-	multiplefiles = (argc - optind > 1);
-	for (; optind < argc; optind++) {
-		if (multiplefiles)
-			printf("%s:\n", argv[optind]);
-		tif = TIFFOpen(argv[optind], chopstrips ? "rC" : "rc");
-		if (tif != NULL) {
-			if (dirnum != -1) {
-				if (TIFFSetDirectory(tif, dirnum))
-					tiffinfo(tif, order, flags);
-			} else if (diroff != 0) {
-				if (TIFFSetSubDirectory(tif, diroff))
-					tiffinfo(tif, order, flags);
-			} else {
-				do
-					tiffinfo(tif, order, flags);
-				while (TIFFReadDirectory(tif));
-			}
-			TIFFClose(tif);
-		}
-	}
-	return (0);
-}
-
-char* stuff[] = {
-"usage: tiffinfo [options] input...",
-"where options are:",
-" -D		read data",
-" -i		ignore read errors",
-" -c		display data for grey/color response curve or colormap",
-" -d		display raw/decoded image data",
-" -f lsb2msb	force lsb-to-msb FillOrder for input",
-" -f msb2lsb	force msb-to-lsb FillOrder for input",
-" -j		show JPEG tables",
-" -o offset	set initial directory offset",
-" -r		read/display raw image data instead of decoded data",
-" -s		display strip offsets and byte counts",
-" -w		display raw data in words rather than bytes",
-" -z		enable strip chopping",
-" -#		set initial directory (first directory is # 0)",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-static void
-ShowStrip(tstrip_t strip, unsigned char* pp, uint32 nrow, tsize_t scanline)
-{
-	register tsize_t cc;
-
-	printf("Strip %lu:\n", (unsigned long) strip);
-	while (nrow-- > 0) {
-		for (cc = 0; cc < scanline; cc++) {
-			printf(" %02x", *pp++);
-			if (((cc+1) % 24) == 0)
-				putchar('\n');
-		}
-		putchar('\n');
-	}
-}
-
-void
-TIFFReadContigStripData(TIFF* tif)
-{
-	unsigned char *buf;
-	tsize_t scanline = TIFFScanlineSize(tif);
-
-	buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
-	if (buf) {
-		uint32 row, h;
-		uint32 rowsperstrip = (uint32)-1;
-
-		TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-		TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-		for (row = 0; row < h; row += rowsperstrip) {
-			uint32 nrow = (row+rowsperstrip > h ?
-			    h-row : rowsperstrip);
-			tstrip_t strip = TIFFComputeStrip(tif, row, 0);
-			if (TIFFReadEncodedStrip(tif, strip, buf, nrow*scanline) < 0) {
-				if (stoponerr)
-					break;
-			} else if (showdata)
-				ShowStrip(strip, buf, nrow, scanline);
-		}
-		_TIFFfree(buf);
-	}
-}
-
-void
-TIFFReadSeparateStripData(TIFF* tif)
-{
-	unsigned char *buf;
-	tsize_t scanline = TIFFScanlineSize(tif);
-
-	buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
-	if (buf) {
-		uint32 row, h;
-		uint32 rowsperstrip = (uint32)-1;
-		tsample_t s, samplesperpixel;
-
-		TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-		TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-		TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-		for (row = 0; row < h; row += rowsperstrip) {
-			for (s = 0; s < samplesperpixel; s++) {
-				uint32 nrow = (row+rowsperstrip > h ?
-				    h-row : rowsperstrip);
-				tstrip_t strip = TIFFComputeStrip(tif, row, s);
-				if (TIFFReadEncodedStrip(tif, strip, buf, nrow*scanline) < 0) {
-					if (stoponerr)
-						break;
-				} else if (showdata)
-					ShowStrip(strip, buf, nrow, scanline);
-			}
-		}
-		_TIFFfree(buf);
-	}
-}
-
-static void
-ShowTile(uint32 row, uint32 col, tsample_t sample,
-    unsigned char* pp, uint32 nrow, uint32 rowsize)
-{
-	register tsize_t cc;
-
-	printf("Tile (%lu,%lu", (unsigned long) row, (unsigned long) col);
-	if (sample != (tsample_t) -1)
-		printf(",%u", sample);
-	printf("):\n");
-	while (nrow-- > 0) {
-		for (cc = 0; cc < rowsize; cc++) {
-			printf(" %02x", *pp++);
-			if (((cc+1) % 24) == 0)
-				putchar('\n');
-		}
-		putchar('\n');
-	}
-}
-
-void
-TIFFReadContigTileData(TIFF* tif)
-{
-	unsigned char *buf;
-	tsize_t rowsize = TIFFTileRowSize(tif);
-
-	buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
-	if (buf) {
-		uint32 tw, th, w, h;
-		uint32 row, col;
-
-		TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-		TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-		TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-		TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-		for (row = 0; row < h; row += th) {
-			for (col = 0; col < w; col += tw) {
-				if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0) {
-					if (stoponerr)
-						break;
-				} else if (showdata)
-					ShowTile(row, col, (tsample_t) -1, buf, th, rowsize);
-			}
-		}
-		_TIFFfree(buf);
-	}
-}
-
-void
-TIFFReadSeparateTileData(TIFF* tif)
-{
-	unsigned char *buf;
-	tsize_t rowsize = TIFFTileRowSize(tif);
-
-	buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
-	if (buf) {
-		uint32 tw, th, w, h;
-		uint32 row, col;
-		tsample_t s, samplesperpixel;
-
-		TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-		TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-		TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-		TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-		TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-		for (row = 0; row < h; row += th) {
-			for (col = 0; col < w; col += tw) {
-				for (s = 0; s < samplesperpixel; s++) {
-					if (TIFFReadTile(tif, buf, col, row, 0, s) < 0) {
-						if (stoponerr)
-							break;
-					} else if (showdata)
-						ShowTile(row, col, s, buf, th, rowsize);
-				}
-			}
-		}
-		_TIFFfree(buf);
-	}
-}
-
-void
-TIFFReadData(TIFF* tif)
-{
-	uint16 config;
-
-	TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config);
-	if (TIFFIsTiled(tif)) {
-		if (config == PLANARCONFIG_CONTIG)
-			TIFFReadContigTileData(tif);
-		else
-			TIFFReadSeparateTileData(tif);
-	} else {
-		if (config == PLANARCONFIG_CONTIG)
-			TIFFReadContigStripData(tif);
-		else
-			TIFFReadSeparateStripData(tif);
-	}
-}
-
-static void
-ShowRawBytes(unsigned char* pp, uint32 n)
-{
-	tsize_t i;
-
-	for (i = 0; i < n; i++) {
-		printf(" %02x", *pp++);
-		if (((i+1) % 24) == 0)
-			printf("\n ");
-	}
-	putchar('\n');
-}
-
-static void
-ShowRawWords(uint16* pp, uint32 n)
-{
-	tsize_t i;
-
-	for (i = 0; i < n; i++) {
-		printf(" %04x", *pp++);
-		if (((i+1) % 15) == 0)
-			printf("\n ");
-	}
-	putchar('\n');
-}
-
-void
-TIFFReadRawData(TIFF* tif, int bitrev)
-{
-	tstrip_t nstrips = TIFFNumberOfStrips(tif);
-	const char* what = TIFFIsTiled(tif) ? "Tile" : "Strip";
-	uint32* stripbc;
-
-	TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc);
-	if (nstrips > 0) {
-		tsize_t bufsize = stripbc[0];
-		tdata_t buf = _TIFFmalloc(bufsize);
-		tstrip_t s;
-
-		for (s = 0; s < nstrips; s++) {
-			if (stripbc[s] > bufsize) {
-				buf = _TIFFrealloc(buf, stripbc[s]);
-				bufsize = stripbc[s];
-			}
-			if (buf == NULL) {
-				fprintf(stderr,
-				   "Cannot allocate buffer to read strip %lu\n",
-				    (unsigned long) s);
-				break;
-			}
-			if (TIFFReadRawStrip(tif, s, buf, stripbc[s]) < 0) {
-				fprintf(stderr, "Error reading strip %lu\n",
-				    (unsigned long) s);
-				if (stoponerr)
-					break;
-			} else if (showdata) {
-				if (bitrev) {
-					TIFFReverseBits(buf, stripbc[s]);
-					printf("%s %lu: (bit reversed)\n ",
-					    what, (unsigned long) s);
-				} else
-					printf("%s %lu:\n ", what,
-					    (unsigned long) s);
-				if (showwords)
-					ShowRawWords((uint16*) buf, stripbc[s]>>1);
-				else
-					ShowRawBytes((unsigned char*) buf, stripbc[s]);
-			}
-		}
-		if (buf != NULL)
-			_TIFFfree(buf);
-	}
-}
-
-static void
-tiffinfo(TIFF* tif, uint16 order, long flags)
-{
-	TIFFPrintDirectory(tif, stdout, flags);
-	if (!readdata)
-		return;
-	if (rawdata) {
-		if (order) {
-			uint16 o;
-			TIFFGetFieldDefaulted(tif,
-			    TIFFTAG_FILLORDER, &o);
-			TIFFReadRawData(tif, o != order);
-		} else
-			TIFFReadRawData(tif, 0);
-	} else {
-		if (order)
-			TIFFSetField(tif, TIFFTAG_FILLORDER, order);
-		TIFFReadData(tif);
-	}
-}
diff --git a/tkimg1.3/libtiff/tools/tiffmedian.c b/tkimg1.3/libtiff/tools/tiffmedian.c
deleted file mode 100644
index 6ff85a1..0000000
--- a/tkimg1.3/libtiff/tools/tiffmedian.c
+++ /dev/null
@@ -1,891 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffmedian.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Apply median cut on an image.
- *
- * tiffmedian [-c n] [-f] input output
- *     -C n		- set colortable size.  Default is 256.
- *     -f		- use Floyd-Steinberg dithering.
- *     -c lzw		- compress output with LZW 
- *                        (no longer supported by default due to unisys patent enforcement) 
- *     -c none		- use no compression on output
- *     -c packbits	- use packbits compression on output
- *     -r n		- create output with n rows/strip of data
- * (by default the compression scheme and rows/strip are taken
- *  from the input file)
- *
- * Notes:
- *
- * [1] Floyd-Steinberg dither:
- *  I should point out that the actual fractions we used were, assuming
- *  you are at X, moving left to right:
- *
- *		    X     7/16
- *	     3/16   5/16  1/16    
- *
- *  Note that the error goes to four neighbors, not three.  I think this
- *  will probably do better (at least for black and white) than the
- *  3/8-3/8-1/4 distribution, at the cost of greater processing.  I have
- *  seen the 3/8-3/8-1/4 distribution described as "our" algorithm before,
- *  but I have no idea who the credit really belongs to.
-
- *  Also, I should add that if you do zig-zag scanning (see my immediately
- *  previous message), it is sufficient (but not quite as good) to send
- *  half the error one pixel ahead (e.g. to the right on lines you scan
- *  left to right), and half one pixel straight down.  Again, this is for
- *  black and white;  I've not tried it with color.
- *  -- 
- *					    Lou Steinberg
- *
- * [2] Color Image Quantization for Frame Buffer Display, Paul Heckbert,
- *	Siggraph '82 proceedings, pp. 297-307
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-#define	MAX_CMAP_SIZE	256
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	strneq(a,b,n)	(strncmp(a,b,n) == 0)
-
-#define	COLOR_DEPTH	8
-#define	MAX_COLOR	256
-
-#define	B_DEPTH		5		/* # bits/pixel to use */
-#define	B_LEN		(1L<<B_DEPTH)
-
-#define	C_DEPTH		2
-#define	C_LEN		(1L<<C_DEPTH)	/* # cells/color to use */
-
-#define	COLOR_SHIFT	(COLOR_DEPTH-B_DEPTH)
-
-typedef	struct colorbox {
-	struct	colorbox *next, *prev;
-	int	rmin, rmax;
-	int	gmin, gmax;
-	int	bmin, bmax;
-	uint32	total;
-} Colorbox;
-
-typedef struct {
-	int	num_ents;
-	int	entries[MAX_CMAP_SIZE][2];
-} C_cell;
-
-uint16	rm[MAX_CMAP_SIZE], gm[MAX_CMAP_SIZE], bm[MAX_CMAP_SIZE];
-int	num_colors;
-uint32	histogram[B_LEN][B_LEN][B_LEN];
-Colorbox *freeboxes;
-Colorbox *usedboxes;
-C_cell	**ColorCells;
-TIFF	*in, *out;
-uint32	rowsperstrip = (uint32) -1;
-uint16	compression = (uint16) -1;
-uint16	bitspersample = 1;
-uint16	samplesperpixel;
-uint32	imagewidth;
-uint32	imagelength;
-uint16	predictor = 0;
-
-static	void get_histogram(TIFF*, Colorbox*);
-static	void splitbox(Colorbox*);
-static	void shrinkbox(Colorbox*);
-static	void map_colortable(void);
-static	void quant(TIFF*, TIFF*);
-static	void quant_fsdither(TIFF*, TIFF*);
-static	Colorbox* largest_box(void);
-
-static	void usage(void);
-static	int processCompressOptions(char*);
-
-#define	CopyField(tag, v) \
-	if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-
-int
-main(int argc, char* argv[])
-{
-	int i, dither = 0;
-	uint16 shortv, config, photometric;
-	Colorbox *box_list, *ptr;
-	float floatv;
-	uint32 longv;
-	int c;
-	extern int optind;
-	extern char* optarg;
-
-	num_colors = MAX_CMAP_SIZE;
-	while ((c = getopt(argc, argv, "c:C:r:f")) != -1)
-		switch (c) {
-		case 'c':		/* compression scheme */
-			if (!processCompressOptions(optarg))
-				usage();
-			break;
-		case 'C':		/* set colormap size */
-			num_colors = atoi(optarg);
-			if (num_colors > MAX_CMAP_SIZE) {
-				fprintf(stderr,
-				   "-c: colormap too big, max %d\n",
-				   MAX_CMAP_SIZE);
-				usage();
-			}
-			break;
-		case 'f':		/* dither */
-			dither = 1;
-			break;
-		case 'r':		/* rows/strip */
-			rowsperstrip = atoi(optarg);
-			break;
-		case '?':
-			usage();
-			/*NOTREACHED*/
-		}
-	if (argc - optind != 2)
-		usage();
-	in = TIFFOpen(argv[optind], "r");
-	if (in == NULL)
-		return (-1);
-	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
-	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
-	TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
-	TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
-	if (bitspersample != 8 && bitspersample != 16) {
-		fprintf(stderr, "%s: Image must have at least 8-bits/sample\n",
-		    argv[optind]);
-		return (-3);
-	}
-	if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric) ||
-	    photometric != PHOTOMETRIC_RGB || samplesperpixel < 3) {
-		fprintf(stderr, "%s: Image must have RGB data\n", argv[optind]);
-		return (-4);
-	}
-	TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config);
-	if (config != PLANARCONFIG_CONTIG) {
-		fprintf(stderr, "%s: Can only handle contiguous data packing\n",
-		    argv[optind]);
-		return (-5);
-	}
-
-	/*
-	 * STEP 1:  create empty boxes
-	 */
-	usedboxes = NULL;
-	box_list = freeboxes = (Colorbox *)_TIFFmalloc(num_colors*sizeof (Colorbox));
-	freeboxes[0].next = &freeboxes[1];
-	freeboxes[0].prev = NULL;
-	for (i = 1; i < num_colors-1; ++i) {
-		freeboxes[i].next = &freeboxes[i+1];
-		freeboxes[i].prev = &freeboxes[i-1];
-	}
-	freeboxes[num_colors-1].next = NULL;
-	freeboxes[num_colors-1].prev = &freeboxes[num_colors-2];
-
-	/*
-	 * STEP 2: get histogram, initialize first box
-	 */
-	ptr = freeboxes;
-	freeboxes = ptr->next;
-	if (freeboxes)
-		freeboxes->prev = NULL;
-	ptr->next = usedboxes;
-	usedboxes = ptr;
-	if (ptr->next)
-		ptr->next->prev = ptr;
-	get_histogram(in, ptr);
-
-	/*
-	 * STEP 3: continually subdivide boxes until no more free
-	 * boxes remain or until all colors assigned.
-	 */
-	while (freeboxes != NULL) {
-		ptr = largest_box();
-		if (ptr != NULL)
-			splitbox(ptr);
-		else
-			freeboxes = NULL;
-	}
-
-	/*
-	 * STEP 4: assign colors to all boxes
-	 */
-	for (i = 0, ptr = usedboxes; ptr != NULL; ++i, ptr = ptr->next) {
-		rm[i] = ((ptr->rmin + ptr->rmax) << COLOR_SHIFT) / 2;
-		gm[i] = ((ptr->gmin + ptr->gmax) << COLOR_SHIFT) / 2;
-		bm[i] = ((ptr->bmin + ptr->bmax) << COLOR_SHIFT) / 2;
-	}
-
-	/* We're done with the boxes now */
-	_TIFFfree(box_list);
-	freeboxes = usedboxes = NULL;
-
-	/*
-	 * STEP 5: scan histogram and map all values to closest color
-	 */
-	/* 5a: create cell list as described in Heckbert[2] */
-	ColorCells = (C_cell **)_TIFFmalloc(C_LEN*C_LEN*C_LEN*sizeof (C_cell*));
-	_TIFFmemset(ColorCells, 0, C_LEN*C_LEN*C_LEN*sizeof (C_cell*));
-	/* 5b: create mapping from truncated pixel space to color
-	   table entries */
-	map_colortable();
-
-	/*
-	 * STEP 6: scan image, match input values to table entries
-	 */
-	out = TIFFOpen(argv[optind+1], "w");
-	if (out == NULL)
-		return (-2);
-
-	CopyField(TIFFTAG_SUBFILETYPE, longv);
-	CopyField(TIFFTAG_IMAGEWIDTH, longv);
-	TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, (short)COLOR_DEPTH);
-	if (compression != (uint16)-1) {
-		TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-		switch (compression) {
-		case COMPRESSION_LZW:
-		case COMPRESSION_DEFLATE:
-			if (predictor != 0)
-				TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
-			break;
-		}
-	} else
-		CopyField(TIFFTAG_COMPRESSION, compression);
-	TIFFSetField(out, TIFFTAG_PHOTOMETRIC, (short)PHOTOMETRIC_PALETTE);
-	CopyField(TIFFTAG_ORIENTATION, shortv);
-	TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, (short)1);
-	CopyField(TIFFTAG_PLANARCONFIG, shortv);
-	TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
-	    TIFFDefaultStripSize(out, rowsperstrip));
-	CopyField(TIFFTAG_MINSAMPLEVALUE, shortv);
-	CopyField(TIFFTAG_MAXSAMPLEVALUE, shortv);
-	CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
-	CopyField(TIFFTAG_XRESOLUTION, floatv);
-	CopyField(TIFFTAG_YRESOLUTION, floatv);
-	CopyField(TIFFTAG_XPOSITION, floatv);
-	CopyField(TIFFTAG_YPOSITION, floatv);
-
-	if (dither)
-		quant_fsdither(in, out);
-	else
-		quant(in, out);
-	/*
-	 * Scale colormap to TIFF-required 16-bit values.
-	 */
-#define	SCALE(x)	(((x)*((1L<<16)-1))/255)
-	for (i = 0; i < MAX_CMAP_SIZE; ++i) {
-		rm[i] = SCALE(rm[i]);
-		gm[i] = SCALE(gm[i]);
-		bm[i] = SCALE(bm[i]);
-	}
-	TIFFSetField(out, TIFFTAG_COLORMAP, rm, gm, bm);
-	(void) TIFFClose(out);
-	return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
-	if (streq(opt, "none"))
-		compression = COMPRESSION_NONE;
-	else if (streq(opt, "packbits"))
-		compression = COMPRESSION_PACKBITS;
-	else if (strneq(opt, "lzw", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_LZW;
-	} else if (strneq(opt, "zip", 3)) {
-		char* cp = strchr(opt, ':');
-		if (cp)
-			predictor = atoi(cp+1);
-		compression = COMPRESSION_DEFLATE;
-	} else
-		return (0);
-	return (1);
-}
-
-char* stuff[] = {
-"usage: tiffmedian [options] input.tif output.tif",
-"where options are:",
-" -r #		make each strip have no more than # rows",
-" -C #		create a colormap with # entries",
-" -f		use Floyd-Steinberg dithering",
-" -c lzw[:opts]	compress output with Lempel-Ziv & Welch encoding",
-"               (no longer supported by default due to Unisys patent enforcement)", 
-" -c zip[:opts]	compress output with deflate encoding",
-" -c packbits	compress output with packbits encoding",
-" -c none	use no compression algorithm on output",
-"",
-"LZW and deflate options:",
-" #		set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
-	char buf[BUFSIZ];
-	int i;
-
-	setbuf(stderr, buf);
-        fprintf(stderr, "%s\n\n", TIFFGetVersion());
-	for (i = 0; stuff[i] != NULL; i++)
-		fprintf(stderr, "%s\n", stuff[i]);
-	exit(-1);
-}
-
-static void
-get_histogram(TIFF* in, Colorbox* box)
-{
-	register unsigned char *inptr;
-	register int red, green, blue;
-	register uint32 j, i;
-	unsigned char *inputline;
-
-	inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-	if (inputline == NULL) {
-		fprintf(stderr, "No space for scanline buffer\n");
-		exit(-1);
-	}
-	box->rmin = box->gmin = box->bmin = 999;
-	box->rmax = box->gmax = box->bmax = -1;
-	box->total = imagewidth * imagelength;
-
-	{ register uint32 *ptr = &histogram[0][0][0];
-	  for (i = B_LEN*B_LEN*B_LEN; i-- > 0;)
-		*ptr++ = 0;
-	}
-	for (i = 0; i < imagelength; i++) {
-		if (TIFFReadScanline(in, inputline, i, 0) <= 0)
-			break;
-		inptr = inputline;
-		for (j = imagewidth; j-- > 0;) {
-			red = *inptr++ >> COLOR_SHIFT;
-			green = *inptr++ >> COLOR_SHIFT;
-			blue = *inptr++ >> COLOR_SHIFT;
-			if (red < box->rmin)
-				box->rmin = red;
-		        if (red > box->rmax)
-				box->rmax = red;
-		        if (green < box->gmin)
-				box->gmin = green;
-		        if (green > box->gmax)
-				box->gmax = green;
-		        if (blue < box->bmin)
-				box->bmin = blue;
-		        if (blue > box->bmax)
-				box->bmax = blue;
-		        histogram[red][green][blue]++;
-		}
-	}
-	_TIFFfree(inputline);
-}
-
-static Colorbox *
-largest_box(void)
-{
-	register Colorbox *p, *b;
-	register uint32 size;
-
-	b = NULL;
-	size = 0;
-	for (p = usedboxes; p != NULL; p = p->next)
-		if ((p->rmax > p->rmin || p->gmax > p->gmin ||
-		    p->bmax > p->bmin) &&  p->total > size)
-		        size = (b = p)->total;
-	return (b);
-}
-
-static void
-splitbox(Colorbox* ptr)
-{
-	uint32		hist2[B_LEN];
-	int		first, last;
-	register Colorbox	*new;
-	register uint32	*iptr, *histp;
-	register int	i, j;
-	register int	ir,ig,ib;
-	register uint32 sum, sum1, sum2;
-	enum { RED, GREEN, BLUE } axis;
-
-	/*
-	 * See which axis is the largest, do a histogram along that
-	 * axis.  Split at median point.  Contract both new boxes to
-	 * fit points and return
-	 */
-	i = ptr->rmax - ptr->rmin;
-	if (i >= ptr->gmax - ptr->gmin && i >= ptr->bmax - ptr->bmin)
-		axis = RED;
-	else if (ptr->gmax - ptr->gmin >= ptr->bmax - ptr->bmin)
-		axis = GREEN;
-	else
-		axis = BLUE;
-	/* get histogram along longest axis */
-	switch (axis) {
-	case RED:
-		histp = &hist2[ptr->rmin];
-	        for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) {
-			*histp = 0;
-			for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) {
-				iptr = &histogram[ir][ig][ptr->bmin];
-				for (ib = ptr->bmin; ib <= ptr->bmax; ++ib)
-					*histp += *iptr++;
-			}
-			histp++;
-	        }
-	        first = ptr->rmin;
-		last = ptr->rmax;
-	        break;
-	case GREEN:
-	        histp = &hist2[ptr->gmin];
-	        for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) {
-			*histp = 0;
-			for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) {
-				iptr = &histogram[ir][ig][ptr->bmin];
-				for (ib = ptr->bmin; ib <= ptr->bmax; ++ib)
-					*histp += *iptr++;
-			}
-			histp++;
-	        }
-	        first = ptr->gmin;
-		last = ptr->gmax;
-	        break;
-	case BLUE:
-	        histp = &hist2[ptr->bmin];
-	        for (ib = ptr->bmin; ib <= ptr->bmax; ++ib) {
-			*histp = 0;
-			for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) {
-				iptr = &histogram[ir][ptr->gmin][ib];
-				for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) {
-					*histp += *iptr;
-					iptr += B_LEN;
-				}
-			}
-			histp++;
-	        }
-	        first = ptr->bmin;
-		last = ptr->bmax;
-	        break;
-	}
-	/* find median point */
-	sum2 = ptr->total / 2;
-	histp = &hist2[first];
-	sum = 0;
-	for (i = first; i <= last && (sum += *histp++) < sum2; ++i)
-		;
-	if (i == first)
-		i++;
-
-	/* Create new box, re-allocate points */
-	new = freeboxes;
-	freeboxes = new->next;
-	if (freeboxes)
-		freeboxes->prev = NULL;
-	if (usedboxes)
-		usedboxes->prev = new;
-	new->next = usedboxes;
-	usedboxes = new;
-
-	histp = &hist2[first];
-	for (sum1 = 0, j = first; j < i; j++)
-		sum1 += *histp++;
-	for (sum2 = 0, j = i; j <= last; j++)
-	    sum2 += *histp++;
-	new->total = sum1;
-	ptr->total = sum2;
-
-	new->rmin = ptr->rmin;
-	new->rmax = ptr->rmax;
-	new->gmin = ptr->gmin;
-	new->gmax = ptr->gmax;
-	new->bmin = ptr->bmin;
-	new->bmax = ptr->bmax;
-	switch (axis) {
-	case RED:
-		new->rmax = i-1;
-	        ptr->rmin = i;
-	        break;
-	case GREEN:
-	        new->gmax = i-1;
-	        ptr->gmin = i;
-	        break;
-	case BLUE:
-	        new->bmax = i-1;
-	        ptr->bmin = i;
-	        break;
-	}
-	shrinkbox(new);
-	shrinkbox(ptr);
-}
-
-static void
-shrinkbox(Colorbox* box)
-{
-	register uint32 *histp;
-	register int	ir, ig, ib;
-
-	if (box->rmax > box->rmin) {
-		for (ir = box->rmin; ir <= box->rmax; ++ir)
-			for (ig = box->gmin; ig <= box->gmax; ++ig) {
-				histp = &histogram[ir][ig][box->bmin];
-			        for (ib = box->bmin; ib <= box->bmax; ++ib)
-					if (*histp++ != 0) {
-						box->rmin = ir;
-						goto have_rmin;
-					}
-			}
-	have_rmin:
-		if (box->rmax > box->rmin)
-			for (ir = box->rmax; ir >= box->rmin; --ir)
-				for (ig = box->gmin; ig <= box->gmax; ++ig) {
-					histp = &histogram[ir][ig][box->bmin];
-					ib = box->bmin;
-					for (; ib <= box->bmax; ++ib)
-						if (*histp++ != 0) {
-							box->rmax = ir;
-							goto have_rmax;
-						}
-			        }
-	}
-have_rmax:
-	if (box->gmax > box->gmin) {
-		for (ig = box->gmin; ig <= box->gmax; ++ig)
-			for (ir = box->rmin; ir <= box->rmax; ++ir) {
-				histp = &histogram[ir][ig][box->bmin];
-			        for (ib = box->bmin; ib <= box->bmax; ++ib)
-				if (*histp++ != 0) {
-					box->gmin = ig;
-					goto have_gmin;
-				}
-			}
-	have_gmin:
-		if (box->gmax > box->gmin)
-			for (ig = box->gmax; ig >= box->gmin; --ig)
-				for (ir = box->rmin; ir <= box->rmax; ++ir) {
-					histp = &histogram[ir][ig][box->bmin];
-					ib = box->bmin;
-					for (; ib <= box->bmax; ++ib)
-						if (*histp++ != 0) {
-							box->gmax = ig;
-							goto have_gmax;
-						}
-			        }
-	}
-have_gmax:
-	if (box->bmax > box->bmin) {
-		for (ib = box->bmin; ib <= box->bmax; ++ib)
-			for (ir = box->rmin; ir <= box->rmax; ++ir) {
-				histp = &histogram[ir][box->gmin][ib];
-			        for (ig = box->gmin; ig <= box->gmax; ++ig) {
-					if (*histp != 0) {
-						box->bmin = ib;
-						goto have_bmin;
-					}
-					histp += B_LEN;
-			        }
-		        }
-	have_bmin:
-		if (box->bmax > box->bmin)
-			for (ib = box->bmax; ib >= box->bmin; --ib)
-				for (ir = box->rmin; ir <= box->rmax; ++ir) {
-					histp = &histogram[ir][box->gmin][ib];
-					ig = box->gmin;
-					for (; ig <= box->gmax; ++ig) {
-						if (*histp != 0) {
-							box->bmax = ib;
-							goto have_bmax;
-						}
-						histp += B_LEN;
-					}
-			        }
-	}
-have_bmax:
-	;
-}
-
-static C_cell *
-create_colorcell(int red, int green, int blue)
-{
-	register int ir, ig, ib, i;
-	register C_cell *ptr;
-	int mindist, next_n;
-	register int tmp, dist, n;
-
-	ir = red >> (COLOR_DEPTH-C_DEPTH);
-	ig = green >> (COLOR_DEPTH-C_DEPTH);
-	ib = blue >> (COLOR_DEPTH-C_DEPTH);
-	ptr = (C_cell *)_TIFFmalloc(sizeof (C_cell));
-	*(ColorCells + ir*C_LEN*C_LEN + ig*C_LEN + ib) = ptr;
-	ptr->num_ents = 0;
-
-	/*
-	 * Step 1: find all colors inside this cell, while we're at
-	 *	   it, find distance of centermost point to furthest corner
-	 */
-	mindist = 99999999;
-	for (i = 0; i < num_colors; ++i) {
-		if (rm[i]>>(COLOR_DEPTH-C_DEPTH) != ir  ||
-		    gm[i]>>(COLOR_DEPTH-C_DEPTH) != ig  ||
-		    bm[i]>>(COLOR_DEPTH-C_DEPTH) != ib)
-			continue;
-		ptr->entries[ptr->num_ents][0] = i;
-		ptr->entries[ptr->num_ents][1] = 0;
-		++ptr->num_ents;
-	        tmp = rm[i] - red;
-	        if (tmp < (MAX_COLOR/C_LEN/2))
-			tmp = MAX_COLOR/C_LEN-1 - tmp;
-	        dist = tmp*tmp;
-	        tmp = gm[i] - green;
-	        if (tmp < (MAX_COLOR/C_LEN/2))
-			tmp = MAX_COLOR/C_LEN-1 - tmp;
-	        dist += tmp*tmp;
-	        tmp = bm[i] - blue;
-	        if (tmp < (MAX_COLOR/C_LEN/2))
-			tmp = MAX_COLOR/C_LEN-1 - tmp;
-	        dist += tmp*tmp;
-	        if (dist < mindist)
-			mindist = dist;
-	}
-
-	/*
-	 * Step 3: find all points within that distance to cell.
-	 */
-	for (i = 0; i < num_colors; ++i) {
-		if (rm[i] >> (COLOR_DEPTH-C_DEPTH) == ir  &&
-		    gm[i] >> (COLOR_DEPTH-C_DEPTH) == ig  &&
-		    bm[i] >> (COLOR_DEPTH-C_DEPTH) == ib)
-			continue;
-		dist = 0;
-	        if ((tmp = red - rm[i]) > 0 ||
-		    (tmp = rm[i] - (red + MAX_COLOR/C_LEN-1)) > 0 )
-			dist += tmp*tmp;
-	        if ((tmp = green - gm[i]) > 0 ||
-		    (tmp = gm[i] - (green + MAX_COLOR/C_LEN-1)) > 0 )
-			dist += tmp*tmp;
-	        if ((tmp = blue - bm[i]) > 0 ||
-		    (tmp = bm[i] - (blue + MAX_COLOR/C_LEN-1)) > 0 )
-			dist += tmp*tmp;
-	        if (dist < mindist) {
-			ptr->entries[ptr->num_ents][0] = i;
-			ptr->entries[ptr->num_ents][1] = dist;
-			++ptr->num_ents;
-	        }
-	}
-
-	/*
-	 * Sort color cells by distance, use cheap exchange sort
-	 */
-	for (n = ptr->num_ents - 1; n > 0; n = next_n) {
-		next_n = 0;
-		for (i = 0; i < n; ++i)
-			if (ptr->entries[i][1] > ptr->entries[i+1][1]) {
-				tmp = ptr->entries[i][0];
-				ptr->entries[i][0] = ptr->entries[i+1][0];
-				ptr->entries[i+1][0] = tmp;
-				tmp = ptr->entries[i][1];
-				ptr->entries[i][1] = ptr->entries[i+1][1];
-				ptr->entries[i+1][1] = tmp;
-				next_n = i;
-		        }
-	}
-	return (ptr);
-}
-
-static void
-map_colortable(void)
-{
-	register uint32 *histp = &histogram[0][0][0];
-	register C_cell *cell;
-	register int j, tmp, d2, dist;
-	int ir, ig, ib, i;
-
-	for (ir = 0; ir < B_LEN; ++ir)
-		for (ig = 0; ig < B_LEN; ++ig)
-			for (ib = 0; ib < B_LEN; ++ib, histp++) {
-				if (*histp == 0) {
-					*histp = -1;
-					continue;
-				}
-				cell = *(ColorCells +
-				    (((ir>>(B_DEPTH-C_DEPTH)) << C_DEPTH*2) +
-				    ((ig>>(B_DEPTH-C_DEPTH)) << C_DEPTH) +
-				    (ib>>(B_DEPTH-C_DEPTH))));
-				if (cell == NULL )
-					cell = create_colorcell(
-					    ir << COLOR_SHIFT,
-					    ig << COLOR_SHIFT,
-					    ib << COLOR_SHIFT);
-				dist = 9999999;
-				for (i = 0; i < cell->num_ents &&
-				    dist > cell->entries[i][1]; ++i) {
-					j = cell->entries[i][0];
-					d2 = rm[j] - (ir << COLOR_SHIFT);
-					d2 *= d2;
-					tmp = gm[j] - (ig << COLOR_SHIFT);
-					d2 += tmp*tmp;
-					tmp = bm[j] - (ib << COLOR_SHIFT);
-					d2 += tmp*tmp;
-					if (d2 < dist) {
-						dist = d2;
-						*histp = j;
-					}
-				}
-			}
-}
-
-/*
- * straight quantization.  Each pixel is mapped to the colors
- * closest to it.  Color values are rounded to the nearest color
- * table entry.
- */
-static void
-quant(TIFF* in, TIFF* out)
-{
-	unsigned char	*outline, *inputline;
-	register unsigned char	*outptr, *inptr;
-	register uint32 i, j;
-	register int red, green, blue;
-
-	inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-	outline = (unsigned char *)_TIFFmalloc(imagewidth);
-	for (i = 0; i < imagelength; i++) {
-		if (TIFFReadScanline(in, inputline, i, 0) <= 0)
-			break;
-		inptr = inputline;
-		outptr = outline;
-		for (j = 0; j < imagewidth; j++) {
-			red = *inptr++ >> COLOR_SHIFT;
-			green = *inptr++ >> COLOR_SHIFT;
-			blue = *inptr++ >> COLOR_SHIFT;
-			*outptr++ = histogram[red][green][blue];
-		}
-		if (TIFFWriteScanline(out, outline, i, 0) < 0)
-			break;
-	}
-	_TIFFfree(inputline);
-	_TIFFfree(outline);
-}
-
-#define	SWAP(type,a,b)	{ type p; p = a; a = b; b = p; }
-
-#define	GetInputLine(tif, row, bad)				\
-	if (TIFFReadScanline(tif, inputline, row, 0) <= 0)	\
-		bad;						\
-	inptr = inputline;					\
-	nextptr = nextline;					\
-	for (j = 0; j < imagewidth; ++j) {			\
-		*nextptr++ = *inptr++;				\
-		*nextptr++ = *inptr++;				\
-		*nextptr++ = *inptr++;				\
-	}
-#define	GetComponent(raw, cshift, c)				\
-	cshift = raw;						\
-	if (cshift < 0)						\
-		cshift = 0;					\
-	else if (cshift >= MAX_COLOR)				\
-		cshift = MAX_COLOR-1;				\
-	c = cshift;						\
-	cshift >>= COLOR_SHIFT;
-
-static void
-quant_fsdither(TIFF* in, TIFF* out)
-{
-	unsigned char *outline, *inputline, *inptr;
-	short *thisline, *nextline;
-	register unsigned char	*outptr;
-	register short *thisptr, *nextptr;
-	register uint32 i, j;
-	uint32 imax, jmax;
-	int lastline, lastpixel;
-
-	imax = imagelength - 1;
-	jmax = imagewidth - 1;
-	inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
-	thisline = (short *)_TIFFmalloc(imagewidth * 3 * sizeof (short));
-	nextline = (short *)_TIFFmalloc(imagewidth * 3 * sizeof (short));
-	outline = (unsigned char *) _TIFFmalloc(TIFFScanlineSize(out));
-
-	GetInputLine(in, 0, goto bad);		/* get first line */
-	for (i = 1; i <= imagelength; ++i) {
-		SWAP(short *, thisline, nextline);
-		lastline = (i >= imax);
-		if (i <= imax)
-			GetInputLine(in, i, break);
-		thisptr = thisline;
-		nextptr = nextline;
-		outptr = outline;
-		for (j = 0; j < imagewidth; ++j) {
-			int red, green, blue;
-			register int oval, r2, g2, b2;
-
-			lastpixel = (j == jmax);
-			GetComponent(*thisptr++, r2, red);
-			GetComponent(*thisptr++, g2, green);
-			GetComponent(*thisptr++, b2, blue);
-			oval = histogram[r2][g2][b2];
-			if (oval == -1) {
-				int ci;
-				register int cj, tmp, d2, dist;
-				register C_cell	*cell;
-
-				cell = *(ColorCells +
-				    (((r2>>(B_DEPTH-C_DEPTH)) << C_DEPTH*2) +
-				    ((g2>>(B_DEPTH-C_DEPTH)) << C_DEPTH ) +
-				    (b2>>(B_DEPTH-C_DEPTH))));
-				if (cell == NULL)
-					cell = create_colorcell(red,
-					    green, blue);
-				dist = 9999999;
-				for (ci = 0; ci < cell->num_ents && dist > cell->entries[ci][1]; ++ci) {
-					cj = cell->entries[ci][0];
-					d2 = (rm[cj] >> COLOR_SHIFT) - r2;
-					d2 *= d2;
-					tmp = (gm[cj] >> COLOR_SHIFT) - g2;
-					d2 += tmp*tmp;
-					tmp = (bm[cj] >> COLOR_SHIFT) - b2;
-					d2 += tmp*tmp;
-					if (d2 < dist) {
-						dist = d2;
-						oval = cj;
-					}
-				}
-				histogram[r2][g2][b2] = oval;
-			}
-			*outptr++ = oval;
-			red -= rm[oval];
-			green -= gm[oval];
-			blue -= bm[oval];
-			if (!lastpixel) {
-				thisptr[0] += blue * 7 / 16;
-				thisptr[1] += green * 7 / 16;
-				thisptr[2] += red * 7 / 16;
-			}
-			if (!lastline) {
-				if (j != 0) {
-					nextptr[-3] += blue * 3 / 16;
-					nextptr[-2] += green * 3 / 16;
-					nextptr[-1] += red * 3 / 16;
-				}
-				nextptr[0] += blue * 5 / 16;
-				nextptr[1] += green * 5 / 16;
-				nextptr[2] += red * 5 / 16;
-				if (!lastpixel) {
-					nextptr[3] += blue / 16;
-				        nextptr[4] += green / 16;
-				        nextptr[5] += red / 16;
-				}
-				nextptr += 3;
-			}
-		}
-		if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
-			break;
-	}
-bad:
-	_TIFFfree(inputline);
-	_TIFFfree(thisline);
-	_TIFFfree(nextline);
-	_TIFFfree(outline);
-}
diff --git a/tkimg1.3/libtiff/tools/tiffset.c b/tkimg1.3/libtiff/tools/tiffset.c
deleted file mode 100644
index e1a1275..0000000
--- a/tkimg1.3/libtiff/tools/tiffset.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/******************************************************************************
- * $Id: tiffset.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- * Project:  libtiff tools
- * Purpose:  Mainline for setting metadata in existing TIFF files.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 2000, Frank Warmerdam
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- ******************************************************************************
- *
- * $Log: tiffset.c,v $
- * Revision 1.1.1.1  2007/01/03 20:47:11  joye
- *
- *
- * Revision 1.1  2004/08/13 22:02:20  andreas_kupries
- *
- * 	* libtiff:     Updated libtiff from version 3.5.5 to 3.6.1.
- * 	* libtiff/tcl: Updated to handle the new version of libtiff.
- *
- * Revision 1.3  2002/01/16 17:50:05  warmerda
- * Fix bug in error output.
- *
- * Revision 1.2  2001/09/26 17:42:18  warmerda
- * added TIFFRewriteDirectory
- *
- * Revision 1.1  2001/03/02 04:58:53  warmerda
- * New
- *
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "tiffiop.h"
-
-static ttag_t field_name_to_id( const char * );
-
-static char* usageMsg[] = {
-    "usage: tiffset [-s name value] filename\n",
-    NULL
-};
-
-static void
-usage(void)
-{
-	int i;
-	for (i = 0; usageMsg[i]; i++)
-		fprintf(stderr, "%s", usageMsg[i]);
-	exit(-1);
-}
-
-int
-main(int argc, char* argv[])
-{
-    TIFF *tiff;
-    int  arg_index;
-
-    if (argc < 2)
-        usage();
-
-    tiff = TIFFOpen(argv[argc-1], "r+");
-    if (tiff == NULL)
-        return (-2);
-
-    for( arg_index = 1; arg_index < argc-1; arg_index++ )
-    {
-        if( strcmp(argv[arg_index],"-s") == 0 && arg_index < argc-3 )
-        {
-            ttag_t  id;
-
-            if( atoi(argv[arg_index+1]) > 0 )
-                id = atoi(argv[arg_index+1]);
-            else
-                id = field_name_to_id(argv[arg_index+1]);
-
-            if( id < 1 )
-            {
-                fprintf( stderr, "Field name %s not recognised.\n",
-                         argv[arg_index+1] );
-                exit( -3 );
-            }
-
-            if( TIFFSetField( tiff, id, argv[arg_index+2] ) != 1 )
-            {
-                fprintf( stderr, "Failed to set %s=%s\n", 
-                         argv[arg_index+1], 
-                         argv[arg_index+2] );
-            }
-            arg_index += 2;
-        }
-        else if( strcmp(argv[arg_index],"-sf") == 0 && arg_index < argc-3 )
-        {
-            ttag_t  id;
-            FILE    *fp;
-            char    *text;
-            int     len;
-
-            if( atoi(argv[arg_index+1]) > 0 )
-                id = atoi(argv[arg_index+1]);
-            else
-                id = field_name_to_id(argv[arg_index+1]);
-
-            if( id < 1 )
-            {
-                fprintf( stderr, "Field name %s not recognised.\n",
-                         argv[arg_index+1] );
-                exit( -3 );
-            }
-
-            fp = fopen( argv[arg_index+2], "rt" );
-            if( fp == NULL )
-            {
-                perror( argv[arg_index+2] );
-                continue;
-            }
-
-            text = (char *) malloc(66000);
-            len = fread( text, 1, 65535, fp );
-            text[len] = '\0';
-
-            fclose( fp );
-
-            if( TIFFSetField( tiff, id, text ) != 1 )
-            {
-                fprintf( stderr, "Failed to set %s=%s\n", 
-                         argv[arg_index+1], 
-                         argv[arg_index+2] );
-            }
-            free( text );
-            arg_index += 2;
-        }
-        else
-        {
-            fprintf( stderr, "Unrecognised option: %s\n",
-                     argv[arg_index] );
-            usage();
-        }
-    }
-
-#ifdef notdef
-    tiff->tif_header.tiff_diroff = 0;
-    tiff->tif_diroff = 0;
-#endif
-
-    TIFFRewriteDirectory(tiff);
-    TIFFClose(tiff);
-    return (0);
-}
-
-static ttag_t field_name_to_id( const char * name )
-
-{
-    if( strstr(name, "DESCRIPTION") != NULL 
-        || strstr(name, "description") != NULL )
-        return TIFFTAG_IMAGEDESCRIPTION;
-
-    else if( strstr(name, "SOFTWARE") != NULL 
-        || strstr(name, "software") != NULL )
-        return TIFFTAG_SOFTWARE;
-
-    else if( strstr(name, "COPYRIGHT") != NULL 
-        || strstr(name, "copyright") != NULL )
-        return TIFFTAG_COPYRIGHT;
-
-    else
-        return -1;
-}
diff --git a/tkimg1.3/libtiff/tools/tiffsplit.c b/tkimg1.3/libtiff/tools/tiffsplit.c
deleted file mode 100644
index 4291afa..0000000
--- a/tkimg1.3/libtiff/tools/tiffsplit.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/libtiff/tools/tiffsplit.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/*
- * Copyright (c) 1992-1997 Sam Leffler
- * Copyright (c) 1992-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-#define	streq(a,b)	(strcmp(a,b) == 0)
-#define	CopyField(tag, v) \
-    if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
-#define	CopyField2(tag, v1, v2) \
-    if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
-#define	CopyField3(tag, v1, v2, v3) \
-    if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
-
-static	char fname[1024+1];
-
-static	int tiffcp(TIFF*, TIFF*);
-static	void newfilename(void);
-static	int cpStrips(TIFF*, TIFF*);
-static	int cpTiles(TIFF*, TIFF*);
-
-int
-main(int argc, char* argv[])
-{
-	TIFF *in, *out;
-
-	if (argc < 2) {
-		fprintf(stderr, "usage: tiffsplit input.tif [prefix]\n");
-		return (-3);
-	}
-	if (argc > 2)
-		strcpy(fname, argv[2]);
-	in = TIFFOpen(argv[1], "r");
-	if (in != NULL) {
-		do {
-			char path[1024+1];
-			newfilename();
-			strcpy(path, fname);
-			strcat(path, ".tif");
-			out = TIFFOpen(path, "w");
-			if (out == NULL)
-				return (-2);
-			if (!tiffcp(in, out))
-				return (-1);
-			TIFFClose(out);
-		} while (TIFFReadDirectory(in));
-		(void) TIFFClose(in);
-	}
-	return (0);
-}
-
-static void
-newfilename(void)
-{
-	static int first = 1;
-	static long lastTurn;
-	static long fnum;
-	static short defname;
-	static char *fpnt;
-
-	if (first) {
-		if (fname[0]) {
-			fpnt = fname + strlen(fname);
-			defname = 0;
-		} else {
-			fname[0] = 'x';
-			fpnt = fname + 1;
-			defname = 1;
-		}
-		first = 0;
-	}
-#define	MAXFILES	17576
-	if (fnum == MAXFILES) {
-		if (!defname || fname[0] == 'z') {
-			fprintf(stderr, "tiffsplit: too many files.\n");
-			exit(1);
-		}
-		fname[0]++;
-		fnum = 0;
-	}
-	if (fnum % 676 == 0) {
-		if (fnum != 0) {
-			//advance to next letter every 676 pages
-			//condition for 'z'++ will be covered above
-			fpnt[0]++;
-		} else {
-			//set to 'a' if we are on the very first file
-			fpnt[0] = 'a';
-		}
-		//set the value of the last turning point
-		lastTurn = fnum;
-	}
-	//start from 0 every 676 times (provided by lastTurn)
-	//this keeps us within a-z boundaries
-	fpnt[1] = (fnum - lastTurn) / 26 + 'a';
-	//cycle last letter every file, from a-z, then repeat
-	fpnt[2] = fnum % 26 + 'a';
-	fnum++;
-}
-
-static int
-tiffcp(TIFF* in, TIFF* out)
-{
-	short bitspersample, samplesperpixel, shortv, *shortav;
-	uint32 w, l;
-	float floatv;
-	char *stringv;
-	uint32 longv;
-
-	CopyField(TIFFTAG_SUBFILETYPE, longv);
-	CopyField(TIFFTAG_TILEWIDTH, w);
-	CopyField(TIFFTAG_TILELENGTH, l);
-	CopyField(TIFFTAG_IMAGEWIDTH, w);
-	CopyField(TIFFTAG_IMAGELENGTH, l);
-	CopyField(TIFFTAG_BITSPERSAMPLE, bitspersample);
-	CopyField(TIFFTAG_COMPRESSION, shortv);
-	CopyField(TIFFTAG_PREDICTOR, shortv);
-	CopyField(TIFFTAG_PHOTOMETRIC, shortv);
-	CopyField(TIFFTAG_THRESHHOLDING, shortv);
-	CopyField(TIFFTAG_FILLORDER, shortv);
-	CopyField(TIFFTAG_ORIENTATION, shortv);
-	CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel);
-	CopyField(TIFFTAG_MINSAMPLEVALUE, shortv);
-	CopyField(TIFFTAG_MAXSAMPLEVALUE, shortv);
-	CopyField(TIFFTAG_XRESOLUTION, floatv);
-	CopyField(TIFFTAG_YRESOLUTION, floatv);
-	CopyField(TIFFTAG_GROUP3OPTIONS, longv);
-	CopyField(TIFFTAG_GROUP4OPTIONS, longv);
-	CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
-	CopyField(TIFFTAG_PLANARCONFIG, shortv);
-	CopyField(TIFFTAG_ROWSPERSTRIP, longv);
-	CopyField(TIFFTAG_XPOSITION, floatv);
-	CopyField(TIFFTAG_YPOSITION, floatv);
-	CopyField(TIFFTAG_IMAGEDEPTH, longv);
-	CopyField(TIFFTAG_TILEDEPTH, longv);
-	CopyField(TIFFTAG_SAMPLEFORMAT, longv);
-	CopyField2(TIFFTAG_EXTRASAMPLES, shortv, shortav);
-	{ uint16 *red, *green, *blue;
-	  CopyField3(TIFFTAG_COLORMAP, red, green, blue);
-	}
-	{ uint16 shortv2;
-	  CopyField2(TIFFTAG_PAGENUMBER, shortv, shortv2);
-	}
-	CopyField(TIFFTAG_ARTIST, stringv);
-	CopyField(TIFFTAG_IMAGEDESCRIPTION, stringv);
-	CopyField(TIFFTAG_MAKE, stringv);
-	CopyField(TIFFTAG_MODEL, stringv);
-	CopyField(TIFFTAG_SOFTWARE, stringv);
-	CopyField(TIFFTAG_DATETIME, stringv);
-	CopyField(TIFFTAG_HOSTCOMPUTER, stringv);
-	CopyField(TIFFTAG_PAGENAME, stringv);
-	CopyField(TIFFTAG_DOCUMENTNAME, stringv);
-	if (TIFFIsTiled(in))
-		return (cpTiles(in, out));
-	else
-		return (cpStrips(in, out));
-}
-
-static int
-cpStrips(TIFF* in, TIFF* out)
-{
-	tsize_t bufsize  = TIFFStripSize(in);
-	unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
-
-	if (buf) {
-		tstrip_t s, ns = TIFFNumberOfStrips(in);
-		uint32 *bytecounts;
-
-		TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts);
-		for (s = 0; s < ns; s++) {
-			if (bytecounts[s] > bufsize) {
-				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[s]);
-				if (!buf)
-					return (0);
-				bufsize = bytecounts[s];
-			}
-			if (TIFFReadRawStrip(in, s, buf, bytecounts[s]) < 0 ||
-			    TIFFWriteRawStrip(out, s, buf, bytecounts[s]) < 0) {
-				_TIFFfree(buf);
-				return (0);
-			}
-		}
-		_TIFFfree(buf);
-		return (1);
-	}
-	return (0);
-}
-
-static int
-cpTiles(TIFF* in, TIFF* out)
-{
-	tsize_t bufsize = TIFFTileSize(in);
-	unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
-
-	if (buf) {
-		ttile_t t, nt = TIFFNumberOfTiles(in);
-		uint32 *bytecounts;
-
-		TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts);
-		for (t = 0; t < nt; t++) {
-			if (bytecounts[t] > bufsize) {
-				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[t]);
-				if (!buf)
-					return (0);
-				bufsize = bytecounts[t];
-			}
-			if (TIFFReadRawTile(in, t, buf, bytecounts[t]) < 0 ||
-			    TIFFWriteRawTile(out, t, buf, bytecounts[t]) < 0) {
-				_TIFFfree(buf);
-				return (0);
-			}
-		}
-		_TIFFfree(buf);
-		return (1);
-	}
-	return (0);
-}
diff --git a/tkimg1.3/libtiff/tools/ycbcr.c b/tkimg1.3/libtiff/tools/ycbcr.c
deleted file mode 100644
index 2fdfb0c..0000000
--- a/tkimg1.3/libtiff/tools/ycbcr.c
+++ /dev/null
@@ -1,161 +0,0 @@
-float	ycbcrCoeffs[3] = { .299, .587, .114 };
-/* default coding range is CCIR Rec 601-1 with no headroom/footroom */
-unsigned long refBlackWhite[6] = { 0, 255, 128, 255, 128, 255 };
-
-#define	LumaRed		ycbcrCoeffs[0]
-#define	LumaGreen	ycbcrCoeffs[1]
-#define	LumaBlue	ycbcrCoeffs[2]
-
-long	eRtotal = 0;
-long	eGtotal = 0;
-long	eBtotal = 0;
-long	preveRtotal = 0;
-long	preveGtotal = 0;
-long	preveBtotal = 0;
-unsigned long AbseRtotal = 0;
-unsigned long AbseGtotal = 0;
-unsigned long AbseBtotal = 0;
-unsigned long eCodes = 0;
-unsigned long preveCodes = 0;
-unsigned long eBits = 0;
-unsigned long preveBits = 0;
-
-static	void setupLumaTables();
-static int abs(int v) { return (v < 0 ? -v : v); }
-static double pct(int v,double range) { return (v*100. / range); }
-static void check(int R, int G, int B);
-
-float	D1, D2;
-float	D3, D4;
-float	D5, D6;
-
-int
-main(int argc, char* argv)
-{
-    int R, G, B;
-
-    if (argc > 1) {
-	refBlackWhite[0] = 16;
-	refBlackWhite[1] = 235;
-	refBlackWhite[2] = 128;
-	refBlackWhite[3] = 240;
-	refBlackWhite[4] = 128;
-	refBlackWhite[5] = 240;
-    }
-    D3 = 2 - 2*LumaRed;
-    D4 = 2 - 2*LumaBlue;
-    D1 = 1. / D3;
-    D2 = 1. / D4;
-    D5 = D3*LumaRed / LumaGreen;
-    D6 = D4*LumaBlue / LumaGreen;
-    setupLumaTables();
-    for (R = 0; R < 256; R++) {
-	for (G = 0; G < 256; G++)
-	    for (B = 0; B < 256; B++)
-		check(R, G, B);
-	printf("[%3u] c %u/%u b %u/%u (R %u/%d/%u G %u/%d/%u B %u/%d/%u)\n"
-	    , R
-	    , eCodes - preveCodes, eCodes
-	    , eBits - preveBits, eBits
-	    , abs(AbseRtotal - preveRtotal), eRtotal , AbseRtotal
-	    , abs(AbseGtotal - preveGtotal), eGtotal , AbseGtotal
-	    , abs(AbseBtotal - preveBtotal), eBtotal , AbseBtotal
-	);
-	preveRtotal = AbseRtotal;
-	preveGtotal = AbseGtotal;
-	preveBtotal = AbseBtotal;
-	preveCodes = eCodes;
-	preveBits = eBits;
-    }
-    printf("%u total codes\n", 256*256*256);
-    printf("total error: %u codes %u bits (R %d/%u G %d/%u B %d/%u)\n"
-	, eCodes
-	, eBits
-	, eRtotal , AbseRtotal
-	, eGtotal , AbseGtotal
-	, eBtotal , AbseBtotal
-    );
-    return (0);
-}
-
-float	*lumaRed;
-float	*lumaGreen;
-float	*lumaBlue;
-
-static float*
-setupLuma(float c)
-{
-    float *v = (float *)_TIFFmalloc(256 * sizeof (float));
-    int i;
-    for (i = 0; i < 256; i++)
-	v[i] = c * i;
-    return (v);
-}
-
-static void
-setupLumaTables(void)
-{
-    lumaRed = setupLuma(LumaRed);
-    lumaGreen = setupLuma(LumaGreen);
-    lumaBlue = setupLuma(LumaBlue);
-}
-
-static unsigned
-V2Code(float f, unsigned long RB, unsigned long RW, int CR)
-{
-    unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5);
-    return (c > 255 ? 255 : c);
-}
-
-#define	Code2V(c, RB, RW, CR)	((((c)-(int)RB)*(float)CR)/(float)(RW-RB))
-
-#define	CLAMP(f,min,max) \
-    (int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)
-
-static
-void
-check(int R, int G, int B)
-{
-    float Y, Cb, Cr;
-    int iY, iCb, iCr;
-    float rY, rCb, rCr;
-    float rR, rG, rB;
-    int eR, eG, eB;
-
-    Y = lumaRed[R] + lumaGreen[G] + lumaBlue[B];
-    Cb = (B - Y)*D2;
-    Cr = (R - Y)*D1;
-    iY = V2Code(Y, refBlackWhite[0], refBlackWhite[1], 255);
-    iCb = V2Code(Cb, refBlackWhite[2], refBlackWhite[3], 127);
-    iCr = V2Code(Cr, refBlackWhite[4], refBlackWhite[5], 127);
-    rCb = Code2V(iCb, refBlackWhite[2], refBlackWhite[3], 127);
-    rCr = Code2V(iCr, refBlackWhite[4], refBlackWhite[5], 127);
-    rY = Code2V(iY, refBlackWhite[0], refBlackWhite[1], 255);
-    rR = rY + rCr*D3;
-    rB = rY + rCb*D4;
-    rG = rY - rCb*D6 - rCr*D5;
-    eR = R - CLAMP(rR,0,255);
-    eG = G - CLAMP(rG,0,255);
-    eB = B - CLAMP(rB,0,255);
-    if (abs(eR) > 1 || abs(eG) > 1 || abs(eB) > 1) {
-	printf("R %u G %u B %u", R, G, B);
-	printf(" Y %g Cb %g Cr %g", Y, Cb, Cr);
-	printf(" iY %u iCb %u iCr %u", iY, iCb, iCr);
-	printf("\n -> Y %g Cb %g Cr %g", rY, rCb, rCr);
-	printf(" R %g (%u) G %g (%u) B %g (%u) E=[%d %d %d])\n"
-	    , rR, CLAMP(rR,0,255)
-	    , rG, CLAMP(rG,0,255)
-	    , rB, CLAMP(rB,0,255)
-	    , eR, eG, eB
-	);
-    }
-    eRtotal += eR;
-    eGtotal += eG;
-    eBtotal += eB;
-    AbseRtotal += abs(eR);
-    AbseGtotal += abs(eG);
-    AbseBtotal += abs(eB);
-    if (eR | eG | eB)
-	eCodes++;
-    eBits += abs(eR) + abs(eG) + abs(eB);
-}
diff --git a/tkimg1.3/libz/ChangeLog b/tkimg1.3/libz/ChangeLog
deleted file mode 100644
index cc127cb..0000000
--- a/tkimg1.3/libz/ChangeLog
+++ /dev/null
@@ -1,722 +0,0 @@
-
-                ChangeLog file for zlib
-
-Changes in 1.2.1 (17 November 2003)
-- Remove a tab in contrib/gzappend/gzappend.c
-- Update some interfaces in contrib for new zlib functions
-- Update zlib version number in some contrib entries
-- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta]
-- Support shared libraries on Hurd and KFreeBSD [Brown]
-- Fix error in NO_DIVIDE option of adler32.c
-
-Changes in 1.2.0.8 (4 November 2003)
-- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas
-- Add experimental NO_DIVIDE #define in adler32.c
-    - Possibly faster on some processors (let me know if it is)
-- Correct Z_BLOCK to not return on first inflate call if no wrap
-- Fix strm->data_type on inflate() return to correctly indicate EOB
-- Add deflatePrime() function for appending in the middle of a byte
-- Add contrib/gzappend for an example of appending to a stream
-- Update win32/DLL_FAQ.txt [Truta]
-- Delete Turbo C comment in README [Truta]
-- Improve some indentation in zconf.h [Truta]
-- Fix infinite loop on bad input in configure script [Church]
-- Fix gzeof() for concatenated gzip files [Johnson]
-- Add example to contrib/visual-basic.txt [Michael B.]
-- Add -p to mkdir's in Makefile.in [vda]
-- Fix configure to properly detect presence or lack of printf functions
-- Add AS400 support [Monnerat]
-- Add a little Cygwin support [Wilson]
-
-Changes in 1.2.0.7 (21 September 2003)
-- Correct some debug formats in contrib/infback9
-- Cast a type in a debug statement in trees.c
-- Change search and replace delimiter in configure from % to # [Beebe]
-- Update contrib/untgz to 0.2 with various fixes [Truta]
-- Add build support for Amiga [Nikl]
-- Remove some directories in old that have been updated to 1.2
-- Add dylib building for Mac OS X in configure and Makefile.in
-- Remove old distribution stuff from Makefile
-- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X
-- Update links in README
-
-Changes in 1.2.0.6 (13 September 2003)
-- Minor FAQ updates
-- Update contrib/minizip to 1.00 [Vollant]
-- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta]
-- Update POSTINC comment for 68060 [Nikl]
-- Add contrib/infback9 with deflate64 decoding (unsupported)
-- For MVS define NO_vsnprintf and undefine FAR [van Burik]
-- Add pragma for fdopen on MVS [van Burik]
-
-Changes in 1.2.0.5 (8 September 2003)
-- Add OF to inflateBackEnd() declaration in zlib.h
-- Remember start when using gzdopen in the middle of a file
-- Use internal off_t counters in gz* functions to properly handle seeks
-- Perform more rigorous check for distance-too-far in inffast.c
-- Add Z_BLOCK flush option to return from inflate at block boundary
-- Set strm->data_type on return from inflate
-    - Indicate bits unused, if at block boundary, and if in last block
-- Replace size_t with ptrdiff_t in crc32.c, and check for correct size
-- Add condition so old NO_DEFLATE define still works for compatibility
-- FAQ update regarding the Windows DLL [Truta]
-- INDEX update: add qnx entry, remove aix entry [Truta]
-- Install zlib.3 into mandir [Wilson]
-- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta]
-- Adapt the zlib interface to the new DLL convention guidelines [Truta]
-- Introduce ZLIB_WINAPI macro to allow the export of functions using
-  the WINAPI calling convention, for Visual Basic [Vollant, Truta]
-- Update msdos and win32 scripts and makefiles [Truta]
-- Export symbols by name, not by ordinal, in win32/zlib.def [Truta]
-- Add contrib/ada [Anisimkov]
-- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta]
-- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant]
-- Add contrib/masm686 [Truta]
-- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm
-  [Truta, Vollant]
-- Update contrib/delphi; rename to contrib/pascal; add example [Truta]
-- Remove contrib/delphi2; add a new contrib/delphi [Truta]
-- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream,
-  and fix some method prototypes [Truta]
-- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip
-  [Truta]
-- Avoid the use of backslash (\) in contrib/minizip [Vollant]
-- Fix file time handling in contrib/untgz; update makefiles [Truta]
-- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines
-  [Vollant]
-- Remove contrib/vstudio/vc15_16 [Vollant]
-- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta]
-- Update README.contrib [Truta]
-- Invert the assignment order of match_head and s->prev[...] in
-  INSERT_STRING [Truta]
-- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings
-  [Truta]
-- Compare function pointers with 0, not with NULL or Z_NULL [Truta]
-- Fix prototype of syncsearch in inflate.c [Truta]
-- Introduce ASMINF macro to be enabled when using an ASM implementation
-  of inflate_fast [Truta]
-- Change NO_DEFLATE to NO_GZCOMPRESS [Truta]
-- Modify test_gzio in example.c to take a single file name as a
-  parameter [Truta]
-- Exit the example.c program if gzopen fails [Truta]
-- Add type casts around strlen in example.c [Truta]
-- Remove casting to sizeof in minigzip.c; give a proper type
-  to the variable compared with SUFFIX_LEN [Truta]
-- Update definitions of STDC and STDC99 in zconf.h [Truta]
-- Synchronize zconf.h with the new Windows DLL interface [Truta]
-- Use SYS16BIT instead of __32BIT__ to distinguish between
-  16- and 32-bit platforms [Truta]
-- Use far memory allocators in small 16-bit memory models for
-  Turbo C [Truta]
-- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in
-  zlibCompileFlags [Truta]
-- Cygwin has vsnprintf [Wilson]
-- In Windows16, OS_CODE is 0, as in MSDOS [Truta]
-- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson]
-
-Changes in 1.2.0.4 (10 August 2003)
-- Minor FAQ updates
-- Be more strict when checking inflateInit2's windowBits parameter
-- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well
-- Add gzip wrapper option to deflateInit2 using windowBits
-- Add updated QNX rule in configure and qnx directory [Bonnefoy]
-- Make inflate distance-too-far checks more rigorous
-- Clean up FAR usage in inflate
-- Add casting to sizeof() in gzio.c and minigzip.c
-
-Changes in 1.2.0.3 (19 July 2003)
-- Fix silly error in gzungetc() implementation [Vollant]
-- Update contrib/minizip and contrib/vstudio [Vollant]
-- Fix printf format in example.c
-- Correct cdecl support in zconf.in.h [Anisimkov]
-- Minor FAQ updates
-
-Changes in 1.2.0.2 (13 July 2003)
-- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons
-- Attempt to avoid warnings in crc32.c for pointer-int conversion
-- Add AIX to configure, remove aix directory [Bakker]
-- Add some casts to minigzip.c
-- Improve checking after insecure sprintf() or vsprintf() calls
-- Remove #elif's from crc32.c
-- Change leave label to inf_leave in inflate.c and infback.c to avoid
-  library conflicts
-- Remove inflate gzip decoding by default--only enable gzip decoding by
-  special request for stricter backward compatibility
-- Add zlibCompileFlags() function to return compilation information
-- More typecasting in deflate.c to avoid warnings
-- Remove leading underscore from _Capital #defines [Truta]
-- Fix configure to link shared library when testing
-- Add some Windows CE target adjustments [Mai]
-- Remove #define ZLIB_DLL in zconf.h [Vollant]
-- Add zlib.3 [Rodgers]
-- Update RFC URL in deflate.c and algorithm.txt [Mai]
-- Add zlib_dll_FAQ.txt to contrib [Truta]
-- Add UL to some constants [Truta]
-- Update minizip and vstudio [Vollant]
-- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h
-- Expand use of NO_DUMMY_DECL to avoid all dummy structures
-- Added iostream3 to contrib [Schwardt]
-- Replace rewind() with fseek() for WinCE [Truta]
-- Improve setting of zlib format compression level flags
-    - Report 0 for huffman and rle strategies and for level == 0 or 1
-    - Report 2 only for level == 6
-- Only deal with 64K limit when necessary at compile time [Truta]
-- Allow TOO_FAR check to be turned off at compile time [Truta]
-- Add gzclearerr() function [Souza]
-- Add gzungetc() function
-
-Changes in 1.2.0.1 (17 March 2003)
-- Add Z_RLE strategy for run-length encoding [Truta]
-    - When Z_RLE requested, restrict matches to distance one
-    - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE
-- Correct FASTEST compilation to allow level == 0
-- Clean up what gets compiled for FASTEST
-- Incorporate changes to zconf.in.h [Vollant]
-    - Refine detection of Turbo C need for dummy returns
-    - Refine ZLIB_DLL compilation
-    - Include additional header file on VMS for off_t typedef
-- Try to use _vsnprintf where it supplants vsprintf [Vollant]
-- Add some casts in inffast.c
-- Enchance comments in zlib.h on what happens if gzprintf() tries to
-  write more than 4095 bytes before compression
-- Remove unused state from inflateBackEnd()
-- Remove exit(0) from minigzip.c, example.c
-- Get rid of all those darn tabs
-- Add "check" target to Makefile.in that does the same thing as "test"
-- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in
-- Update contrib/inflate86 [Anderson]
-- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant]
-- Add msdos and win32 directories with makefiles [Truta]
-- More additions and improvements to the FAQ
-
-Changes in 1.2.0 (9 March 2003)
-- New and improved inflate code
-    - About 20% faster
-    - Does not allocate 32K window unless and until needed
-    - Automatically detects and decompresses gzip streams
-    - Raw inflate no longer needs an extra dummy byte at end
-    - Added inflateBack functions using a callback interface--even faster
-      than inflate, useful for file utilities (gzip, zip)
-    - Added inflateCopy() function to record state for random access on
-      externally generated deflate streams (e.g. in gzip files)
-    - More readable code (I hope)
-- New and improved crc32()
-    - About 50% faster, thanks to suggestions from Rodney Brown
-- Add deflateBound() and compressBound() functions
-- Fix memory leak in deflateInit2()
-- Permit setting dictionary for raw deflate (for parallel deflate)
-- Fix const declaration for gzwrite()
-- Check for some malloc() failures in gzio.c
-- Fix bug in gzopen() on single-byte file 0x1f
-- Fix bug in gzread() on concatenated file with 0x1f at end of buffer
-  and next buffer doesn't start with 0x8b
-- Fix uncompress() to return Z_DATA_ERROR on truncated input
-- Free memory at end of example.c
-- Remove MAX #define in trees.c (conflicted with some libraries)
-- Fix static const's in deflate.c, gzio.c, and zutil.[ch]
-- Declare malloc() and free() in gzio.c if STDC not defined
-- Use malloc() instead of calloc() in zutil.c if int big enough
-- Define STDC for AIX
-- Add aix/ with approach for compiling shared library on AIX
-- Add HP-UX support for shared libraries in configure
-- Add OpenUNIX support for shared libraries in configure
-- Use $cc instead of gcc to build shared library
-- Make prefix directory if needed when installing
-- Correct Macintosh avoidance of typedef Byte in zconf.h
-- Correct Turbo C memory allocation when under Linux
-- Use libz.a instead of -lz in Makefile (assure use of compiled library)
-- Update configure to check for snprintf or vsnprintf functions and their
-  return value, warn during make if using an insecure function
-- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that
-  is lost when library is used--resolution is to build new zconf.h
-- Documentation improvements (in zlib.h):
-    - Document raw deflate and inflate
-    - Update RFCs URL
-    - Point out that zlib and gzip formats are different
-    - Note that Z_BUF_ERROR is not fatal
-    - Document string limit for gzprintf() and possible buffer overflow
-    - Note requirement on avail_out when flushing
-    - Note permitted values of flush parameter of inflate()
-- Add some FAQs (and even answers) to the FAQ
-- Add contrib/inflate86/ for x86 faster inflate
-- Add contrib/blast/ for PKWare Data Compression Library decompression
-- Add contrib/puff/ simple inflate for deflate format description
-
-Changes in 1.1.4 (11 March 2002)
-- ZFREE was repeated on same allocation on some error conditions.
-  This creates a security problem described in
-  http://www.zlib.org/advisory-2002-03-11.txt
-- Returned incorrect error (Z_MEM_ERROR) on some invalid data
-- Avoid accesses before window for invalid distances with inflate window
-  less than 32K.
-- force windowBits > 8 to avoid a bug in the encoder for a window size
-  of 256 bytes. (A complete fix will be available in 1.1.5).
-
-Changes in 1.1.3 (9 July 1998)
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-- Support gzdopen on Mac with Metrowerks (Jason Linhart)
-- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
-- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
-- avoid some warnings with Borland C (Tom Tanner)
-- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
-- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)
-- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
-- use libdir and includedir in Makefile.in (Tim Mooney)
-- support shared libraries on OSF1 V4 (Tim Mooney)
-- remove so_locations in "make clean"  (Tim Mooney)
-- fix maketree.c compilation error (Glenn, Mark)
-- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
-- new Makefile.riscos (Rich Walker)
-- initialize static descriptors in trees.c for embedded targets (Nick Smith)
-- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
-- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
-- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
-- fix maketree.c to allow clean compilation of inffixed.h (Mark)
-- fix parameter check in deflateCopy (Gunther Nikl)
-- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
-- Many portability patches by Christian Spieler:
-  . zutil.c, zutil.h: added "const" for zmem*
-  . Make_vms.com: fixed some typos
-  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
-  . msdos/Makefile.msc: remove "default rtl link library" info from obj files
-  . msdos/Makefile.*: use model-dependent name for the built zlib library
-  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
-     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
-- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
-- replace __far with _far for better portability (Christian Spieler, Tom Lane)
-- fix test for errno.h in configure (Tim Newsham)
-
-Changes in 1.1.2 (19 March 98)
-- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
-  See http://www.winimage.com/zLibDll/unzip.html
-- preinitialize the inflate tables for fixed codes, to make the code
-  completely thread safe (Mark)
-- some simplifications and slight speed-up to the inflate code (Mark)
-- fix gzeof on non-compressed files (Allan Schrum)
-- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
-- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
-- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
-- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
-- do not wrap extern "C" around system includes (Tom Lane)
-- mention zlib binding for TCL in README (Andreas Kupries)
-- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
-- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
-- allow "configure --prefix $HOME" (Tim Mooney)
-- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
-- move Makefile.sas to amiga/Makefile.sas
-
-Changes in 1.1.1 (27 Feb 98)
-- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)
-- remove block truncation heuristic which had very marginal effect for zlib
-  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
-  compression ratio on some files. This also allows inlining _tr_tally for
-  matches in deflate_slow.
-- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
-
-Changes in 1.1.0 (24 Feb 98)
-- do not return STREAM_END prematurely in inflate (John Bowler)
-- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
-- compile with -DFASTEST to get compression code optimized for speed only
-- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
-- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
-  on Sun but significant on HP)
-
-- add a pointer to experimental unzip library in README (Gilles Vollant)
-- initialize variable gcc in configure (Chris Herborth)
-
-Changes in 1.0.9 (17 Feb 1998)
-- added gzputs and gzgets functions
-- do not clear eof flag in gzseek (Mark Diekhans)
-- fix gzseek for files in transparent mode (Mark Diekhans)
-- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
-- replace EXPORT with ZEXPORT to avoid conflict with other programs
-- added compress2 in zconf.h, zlib.def, zlib.dnt
-- new asm code from Gilles Vollant in contrib/asm386
-- simplify the inflate code (Mark):
- . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
- . ZALLOC the length list in inflate_trees_fixed() instead of using stack
- . ZALLOC the value area for huft_build() instead of using stack
- . Simplify Z_FINISH check in inflate()
-
-- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
-- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
-- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
-  the declaration of FAR (Gilles VOllant)
-- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
-- read_buf buf parameter of type Bytef* instead of charf*
-- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
-- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
-- fix check for presence of directories in "make install" (Ian Willis)
-
-Changes in 1.0.8 (27 Jan 1998)
-- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
-- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
-- added compress2() to allow setting the compression level
-- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
-- use constant arrays for the static trees in trees.c instead of computing
-  them at run time (thanks to Ken Raeburn for this suggestion). To create
-  trees.h, compile with GEN_TREES_H and run "make test".
-- check return code of example in "make test" and display result
-- pass minigzip command line options to file_compress
-- simplifying code of inflateSync to avoid gcc 2.8 bug
-
-- support CC="gcc -Wall" in configure -s (QingLong)
-- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
-- fix test for shared library support to avoid compiler warnings
-- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
-- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
-- do not use fdopen for Metrowerks on Mac (Brad Pettit))
-- add checks for gzputc and gzputc in example.c
-- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
-- use const for the CRC table (Ken Raeburn)
-- fixed "make uninstall" for shared libraries
-- use Tracev instead of Trace in infblock.c
-- in example.c use correct compressed length for test_sync
-- suppress +vnocompatwarnings in configure for HPUX (not always supported)
-
-Changes in 1.0.7 (20 Jan 1998)
-- fix gzseek which was broken in write mode
-- return error for gzseek to negative absolute position
-- fix configure for Linux (Chun-Chung Chen)
-- increase stack space for MSC (Tim Wegner)
-- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
-- define EXPORTVA for gzprintf (Gilles Vollant)
-- added man page zlib.3 (Rick Rodgers)
-- for contrib/untgz, fix makedir() and improve Makefile
-
-- check gzseek in write mode in example.c
-- allocate extra buffer for seeks only if gzseek is actually called
-- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
-- add inflateSyncPoint in zconf.h
-- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
-
-Changes in 1.0.6 (19 Jan 1998)
-- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
-  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
-- Fix a deflate bug occuring only with compression level 0 (thanks to
-  Andy Buckler for finding this one).
-- In minigzip, pass transparently also the first byte for .Z files.
-- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
-- check Z_FINISH in inflate (thanks to Marc Schluper)
-- Implement deflateCopy (thanks to Adam Costello)
-- make static libraries by default in configure, add --shared option.
-- move MSDOS or Windows specific files to directory msdos
-- suppress the notion of partial flush to simplify the interface
-  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
-- suppress history buffer provided by application to simplify the interface
-  (this feature was not implemented anyway in 1.0.4)
-- next_in and avail_in must be initialized before calling inflateInit or
-  inflateInit2
-- add EXPORT in all exported functions (for Windows DLL)
-- added Makefile.nt (thanks to Stephen Williams)
-- added the unsupported "contrib" directory:
-   contrib/asm386/ by Gilles Vollant <info at winimage.com>
-        386 asm code replacing longest_match().
-   contrib/iostream/ by Kevin Ruland <kevin at rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-   contrib/iostream2/  by Tyge Løvset <Tyge.Lovset at cmr.no>
-        Another C++ I/O streams interface
-   contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag at tid.es>
-        A very simple tar.gz file extractor using zlib
-   contrib/visual-basic.txt by Carlos Rios <c_rios at sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
-- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
-  level) in minigzip (thanks to Tom Lane)
-
-- use const for rommable constants in deflate
-- added test for gzseek and gztell in example.c
-- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
-- add undocumented function zError to convert error code to string
-  (for Tim Smithers)
-- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
-- Use default memcpy for Symantec MSDOS compiler.
-- Add EXPORT keyword for check_func (needed for Windows DLL)
-- add current directory to LD_LIBRARY_PATH for "make test"
-- create also a link for libz.so.1
-- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
-- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
-- added -soname for Linux in configure (Chun-Chung Chen,
-- assign numbers to the exported functions in zlib.def (for Windows DLL)
-- add advice in zlib.h for best usage of deflateSetDictionary
-- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
-- allow compilation with ANSI keywords only enabled for TurboC in large model
-- avoid "versionString"[0] (Borland bug)
-- add NEED_DUMMY_RETURN for Borland
-- use variable z_verbose for tracing in debug mode (L. Peter Deutsch).
-- allow compilation with CC
-- defined STDC for OS/2 (David Charlap)
-- limit external names to 8 chars for MVS (Thomas Lund)
-- in minigzip.c, use static buffers only for 16-bit systems
-- fix suffix check for "minigzip -d foo.gz"
-- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
-- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
-- added makelcc.bat for lcc-win32 (Tom St Denis)
-- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
-- Avoid expanded $Id: ChangeLog,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
-- check for unistd.h in configure (for off_t)
-- remove useless check parameter in inflate_blocks_free
-- avoid useless assignment of s->check to itself in inflate_blocks_new
-- do not flush twice in gzclose (thanks to Ken Raeburn)
-- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
-- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
-- work around buggy fclose on pipes for HP/UX
-- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
-- fix configure if CC is already equal to gcc
-
-Changes in 1.0.5 (3 Jan 98)
-- Fix inflate to terminate gracefully when fed corrupted or invalid data
-- Use const for rommable constants in inflate
-- Eliminate memory leaks on error conditions in inflate
-- Removed some vestigial code in inflate
-- Update web address in README
-
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
-  bit, so the decompressor could decompress all the correct data but went
-  on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
-  small and medium models; this makes the library incompatible with previous
-  versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
-  avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
-  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
-  and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-  -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
-     warning C4746: 'inflate_mask' : unsized array treated as  '__far'
-     (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
-  not completely flushed in rare occasions).
-- default window size is same for compression and decompression
-  (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
-  typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
-  was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
-  pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
-  is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
-  (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
-  TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
-  (one's complement) is now done inside crc32(). WARNING: this is
-  incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
-  not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
-  Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
-  if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
-  user-provided history buffer. This is supported only in deflateInit2
-  and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
diff --git a/tkimg1.3/libz/FAQ b/tkimg1.3/libz/FAQ
deleted file mode 100644
index 7115ec3..0000000
--- a/tkimg1.3/libz/FAQ
+++ /dev/null
@@ -1,315 +0,0 @@
-
-                Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page
-http://www.zlib.org which may have more recent information.
-The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. Is zlib Y2K-compliant?
-
-    Yes. zlib doesn't handle dates.
-
- 2. Where can I get a Windows DLL version?
-
-    The zlib sources can be compiled without change to produce a DLL.
-    See the file win32/DLL_FAQ.txt in the zlib distribution.
-    Pointers to the precompiled DLL are found in the zlib web site at
-    http://www.zlib.org.
-
- 3. Where can I get a Visual Basic interface to zlib?
-
-    See
-        * http://www.winimage.com/zLibDll/
-        * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
-        * contrib/visual-basic.txt in the zlib distribution
-
- 4. compress() returns Z_BUF_ERROR
-
-    Make sure that before the call of compress, the length of the compressed
-    buffer is equal to the total size of the compressed buffer and not
-    zero. For Visual Basic, check that this parameter is passed by reference
-    ("as any"), not by value ("as long").
-
- 5. deflate() or inflate() returns Z_BUF_ERROR
-
-    Before making the call, make sure that avail_in and avail_out are not
-    zero. When setting the parameter flush equal to Z_FINISH, also make sure
-    that avail_out is big enough to allow processing all pending input.
-    Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
-    inflate() can be made with more input or output space. A Z_BUF_ERROR
-    may in fact be unavoidable depending on how the functions are used, since
-    it is not possible to tell whether or not there is more output pending
-    when strm.avail_out returns with zero.
-
- 6. Where's the zlib documentation (man pages, etc.)?
-
-    It's in zlib.h for the moment, and Francis S. Lin has converted it to a
-    web page zlib.html. Volunteers to transform this to Unix-style man pages,
-    please contact Jean-loup Gailly (jloup at gzip.org). Examples of zlib usage
-    are in the files example.c and minigzip.c.
-
- 7. Why don't you use GNU autoconf or libtool or ...?
-
-    Because we would like to keep zlib as a very small and simple
-    package. zlib is rather portable and doesn't need much configuration.
-
- 8. I found a bug in zlib.
-
-    Most of the time, such problems are due to an incorrect usage of
-    zlib. Please try to reproduce the problem with a small program and send
-    the corresponding source to us at zlib at gzip.org . Do not send
-    multi-megabyte data files without prior agreement.
-
- 9. Why do I get "undefined reference to gzputc"?
-
-    If "make test" produces something like
-
-       example.o(.text+0x154): undefined reference to `gzputc'
-
-    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
-    /usr/X11R6/lib. Remove any old versions, then do "make install".
-
-10. I need a Delphi interface to zlib.
-
-    See the contrib/delphi directory in the zlib distribution.
-
-11. Can zlib handle .zip archives?
-
-    See the directory contrib/minizip in the zlib distribution.
-
-12. Can zlib handle .Z files?
-
-    No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
-    the code of uncompress on your own.
-
-13. How can I make a Unix shared library?
-
-    make clean
-    ./configure -s
-    make
-
-14. How do I install a shared zlib library on Unix?
-
-    make install
-
-    However, many flavors of Unix come with a shared zlib already installed.
-    Before going to the trouble of compiling a shared version of zlib and
-    trying to install it, you may want to check if it's already there! If you
-    can #include <zlib.h>, it's there. The -lz option will probably link to it.
-
-15. I have a question about OttoPDF
-
-    We are not the authors of OttoPDF. The real author is on the OttoPDF web
-    site Joel Hainley jhainley at myndkryme.com.
-
-16. Why does gzip give an error on a file I make with compress/deflate?
-
-    The compress and deflate functions produce data in the zlib format, which
-    is different and incompatible with the gzip format. The gz* functions in
-    zlib on the other hand use the gzip format. Both the zlib and gzip
-    formats use the same compressed data format internally, but have different
-    headers and trailers around the compressed data.
-
-17. Ok, so why are there two different formats?
-
-    The gzip format was designed to retain the directory information about
-    a single file, such as the name and last modification date. The zlib
-    format on the other hand was designed for in-memory and communication
-    channel applications, and has a much more compact header and trailer and
-    uses a faster integrity check than gzip.
-
-18. Well that's nice, but how do I make a gzip file in memory?
-
-    You can request that deflate write the gzip format instead of the zlib
-    format using deflateInit2(). You can also request that inflate decode
-    the gzip format using inflateInit2(). Read zlib.h for more details.
-
-    Note that you cannot specify special gzip header contents (e.g. a file
-    name or modification date), nor will inflate tell you what was in the
-    gzip header. If you need to customize the header or see what's in it,
-    you can use the raw deflate and inflate operations and the crc32()
-    function and roll your own gzip encoding and decoding. Read the gzip
-    RFC 1952 for details of the header and trailer format.
-
-19. Is zlib thread-safe?
-
-    Yes. However any library routines that zlib uses and any application-
-    provided memory allocation routines must also be thread-safe. zlib's gz*
-    functions use stdio library routines, and most of zlib's functions use the
-    library memory allocation routines by default. zlib's Init functions allow
-    for the application to provide custom memory allocation routines.
-
-    Of course, you should only operate on any given zlib or gzip stream from a
-    single thread at a time.
-
-20. Can I use zlib in my commercial application?
-
-    Yes. Please read the license in zlib.h.
-
-21. Is zlib under the GNU license?
-
-    No. Please read the license in zlib.h.
-
-22. The license says that altered source versions must be "plainly marked". So
-    what exactly do I need to do to meet that requirement?
-
-    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
-    particular, the final version number needs to be changed to "f", and an
-    identification string should be appended to ZLIB_VERSION. Version numbers
-    x.x.x.f are reserved for modifications to zlib by others than the zlib
-    maintainers. For example, if the version of the base zlib you are altering
-    is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
-    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
-    update the version strings in deflate.c and inftrees.c.
-
-    For altered source distributions, you should also note the origin and
-    nature of the changes in zlib.h, as well as in ChangeLog and README, along
-    with the dates of the alterations. The origin should include at least your
-    name (or your company's name), and an email address to contact for help or
-    issues with the library.
-
-    Note that distributing a compiled zlib library along with zlib.h and
-    zconf.h is also a source distribution, and so you should change
-    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
-    in zlib.h as you would for a full source distribution.
-
-23. Will zlib work on a big-endian or little-endian architecture, and can I
-    exchange compressed data between them?
-
-    Yes and yes.
-
-24. Will zlib work on a 64-bit machine?
-
-    It should. It has been tested on 64-bit machines, and has no dependence
-    on any data types being limited to 32-bits in length. If you have any
-    difficulties, please provide a complete problem report to zlib at gzip.org
-
-25. Will zlib decompress data from the PKWare Data Compression Library?
-
-    No. The PKWare DCL uses a completely different compressed data format
-    than does PKZIP and zlib. However, you can look in zlib's contrib/blast
-    directory for a possible solution to your problem.
-
-26. Can I access data randomly in a compressed stream?
-
-    No, not without some preparation. If when compressing you periodically
-    use Z_FULL_FLUSH, carefully write all the pending data at those points,
-    and keep an index of those locations, then you can start decompression
-    at those points. You have to be careful to not use Z_FULL_FLUSH too
-    often, since it can significantly degrade compression.
-
-27. Does zlib work on MVS, OS/390, CICS, etc.?
-
-    We don't know for sure. We have heard occasional reports of success on
-    these systems. If you do use it on one of these, please provide us with
-    a report, instructions, and patches that we can reference when we get
-    these questions. Thanks.
-
-28. Is there some simpler, easier to read version of inflate I can look at
-    to understand the deflate format?
-
-    First off, you should read RFC 1951. Second, yes. Look in zlib's
-    contrib/puff directory.
-
-29. Does zlib infringe on any patents?
-
-    As far as we know, no. In fact, that was originally the whole point behind
-    zlib. Look here for some more information:
-
-    http://www.gzip.org/#faq11
-
-30. Can zlib work with greater than 4 GB of data?
-
-    Yes. inflate() and deflate() will process any amount of data correctly.
-    Each call of inflate() or deflate() is limited to input and output chunks
-    of the maximum value that can be stored in the compiler's "unsigned int"
-    type, but there is no limit to the number of chunks. Note however that the
-    strm.total_in and strm_total_out counters may be limited to 4 GB. These
-    counters are provided as a convenience and are not used internally by
-    inflate() or deflate(). The application can easily set up its own counters
-    updated after each call of inflate() or deflate() to count beyond 4 GB.
-    compress() and uncompress() may be limited to 4 GB, since they operate in a
-    single call. gzseek() and gztell() may be limited to 4 GB depending on how
-    zlib is compiled. See the zlibCompileFlags() function in zlib.h.
-
-    The word "may" appears several times above since there is a 4 GB limit
-    only if the compiler's "long" type is 32 bits. If the compiler's "long"
-    type is 64 bits, then the limit is 16 exabytes.
-
-31. Does zlib have any security vulnerabilities?
-
-    The only one that we are aware of is potentially in gzprintf(). If zlib
-    is compiled to use sprintf() or vsprintf(), then there is no protection
-    against a buffer overflow of a 4K string space, other than the caller of
-    gzprintf() assuring that the output will not exceed 4K. On the other
-    hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
-    normally be the case, then there is no vulnerability. The ./configure
-    script will display warnings if an insecure variation of sprintf() will
-    be used by gzprintf(). Also the zlibCompileFlags() function will return
-    information on what variant of sprintf() is used by gzprintf().
-
-    If you don't have snprintf() or vsnprintf() and would like one, you can
-    find a portable implementation here:
-
-        http://www.ijs.si/software/snprintf/
-
-    Note that you should be using the most recent version of zlib. Versions
-    1.1.3 and before were subject to a double-free vulnerability.
-
-32. Is there a Java version of zlib?
-
-    Probably what you want is to use zlib in Java. zlib is already included
-    as part of the Java SDK in the java.util.zip package. If you really want
-    a version of zlib written in the Java language, look on the zlib home
-    page for links: http://www.zlib.org/
-
-33. I get this or that compiler or source-code scanner warning when I crank it
-    up to maximally-pendantic. Can't you guys write proper code?
-
-    Many years ago, we gave up attempting to avoid warnings on every compiler
-    in the universe. It just got to be a waste of time, and some compilers
-    were downright silly. So now, we simply make sure that the code always
-    works.
-
-34. Will zlib read the (insert any ancient or arcane format here) compressed
-    data format?
-
-    Probably not. Look in the comp.compression FAQ for pointers to various
-    formats and associated software.
-
-35. How can I encrypt/decrypt zip files with zlib?
-
-    zlib doesn't support encryption. The original PKZIP encryption is very weak
-    and can be broken with freely available programs. To get strong encryption,
-    use gpg ( http://www.gnupg.org/ ) which already includes zlib compression.
-    For PKZIP compatible "encryption", look at http://www.info-zip.org/
-
-36. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
-
-    "gzip" is the gzip format, and "deflate" is the zlib format. They should
-    probably have called the second one "zlib" instead to avoid confusion
-    with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
-    correctly points to the zlib specification in RFC 1950 for the "deflate"
-    transfer encoding, there have been reports of servers and browsers that
-    incorrectly produce or expect raw deflate data per the deflate
-    specficiation in RFC 1951, most notably Microsoft. So even though the
-    "deflate" transfer encoding using the zlib format would be the more
-    efficient approach (and in fact exactly what the zlib format was designed
-    for), using the "gzip" transfer encoding is probably more reliable due to
-    an unfortunate choice of name on the part of the HTTP 1.1 authors.
-
-    Bottom line: use the gzip format for HTTP 1.1 encoding.
-
-37. Does zlib support the new "Deflate64" format introduced by PKWare?
-
-    No. PKWare has apparently decided to keep that format proprietary, since
-    they have not documented it as they have previous compression formats.
-    In any case, the compression improvements are so modest compared to other
-    more modern approaches, that it's not worth the effort to implement.
-
-38. Can you please sign these lengthy legal documents and fax them back to us
-    so that we can use your software in our product?
-
-    No. Go away. Shoo.
diff --git a/tkimg1.3/libz/INDEX b/tkimg1.3/libz/INDEX
deleted file mode 100644
index a9de784..0000000
--- a/tkimg1.3/libz/INDEX
+++ /dev/null
@@ -1,48 +0,0 @@
-ChangeLog       history of changes
-FAQ             Frequently Asked Questions about zlib
-INDEX           this file
-Makefile        makefile for Unix (generated by configure)
-Makefile.in     makefile for Unix (template for configure)
-README          guess what
-algorithm.txt   description of the (de)compression algorithm
-configure       configure script for Unix
-zconf.in.h      template for zconf.h (used by configure)
-
-msdos/          makefiles for MSDOS
-old/            makefiles for various architectures and zlib documentation
-                files that have not yet been updated for zlib 1.2.x
-qnx/            makefiles for QNX
-win32/          makefiles for Windows
-
-                zlib public header files (must be kept):
-zconf.h
-zlib.h
-
-                private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-crc32.h
-deflate.c
-deflate.h
-gzio.c
-infback.c
-inffast.c
-inffast.h
-inffixed.h
-inflate.c
-inflate.h
-inftrees.c
-inftrees.h
-trees.c
-trees.h
-uncompr.c
-zutil.c
-zutil.h
-
-                source files for sample programs:
-example.c
-minigzip.c
-
-                unsupported contribution by third parties
-See contrib/README.contrib
diff --git a/tkimg1.3/libz/Makefile b/tkimg1.3/libz/Makefile
deleted file mode 100644
index ab4611b..0000000
--- a/tkimg1.3/libz/Makefile
+++ /dev/null
@@ -1,154 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-#    ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To use the asm code, type:
-#    cp contrib/asm?86/match.S ./match.S
-#    make LOC=-DASMV OBJA=match.o
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-#    make install
-# To install in $HOME instead of /usr/local, use:
-#    make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=libz.a
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-LIBS=libz.a
-SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.1
-SHAREDLIBM=libz.so.1
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-EXE=
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-mandir = ${prefix}/share/man
-man3dir = ${mandir}/man3
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example$(EXE) minigzip$(EXE)
-
-check: test
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
-	$(CPP) match.S > _match.s
-	$(CC) -c _match.s
-	mv _match.o match.o
-	rm -f _match.s
-
-$(SHAREDLIBV): $(OBJS)
-	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(SHAREDLIB) $(SHAREDLIBM)
-	ln -s $@ $(SHAREDLIB)
-	ln -s $@ $(SHAREDLIBM)
-
-example$(EXE): example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip$(EXE): minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
-	- at if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
-	- at if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
-	- at if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
-	- at if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
-	cp zlib.h zconf.h $(includedir)
-	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-	cp $(LIBS) $(libdir)
-	cd $(libdir); chmod 755 $(LIBS)
-	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-	cd $(libdir); if test -f $(SHAREDLIBV); then \
-	  rm -f $(SHAREDLIB) $(SHAREDLIBM); \
-	  ln -s $(SHAREDLIBV) $(SHAREDLIB); \
-	  ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
-	  (ldconfig || true)  >/dev/null 2>&1; \
-	fi
-	cp zlib.3 $(man3dir)
-	chmod 644 $(man3dir)/zlib.3
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
-	cd $(includedir); \
-	cd $(libdir); rm -f libz.a; \
-	if test -f $(SHAREDLIBV); then \
-	  rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
-	fi
-	cd $(man3dir); rm -f zlib.3
-
-mostlyclean: clean
-clean:
-	rm -f *.o *~ example$(EXE) minigzip$(EXE) \
-	   libz.* foo.gz so_locations \
-	   _match.s maketree contrib/infback9/*.o
-
-maintainer-clean: distclean
-distclean: clean
-	cp -p Makefile.in Makefile
-	cp -p zconf.in.h zconf.h
-	rm -f .DS_Store
-
-tags:
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/Makefile.in b/tkimg1.3/libz/Makefile.in
deleted file mode 100644
index ab4611b..0000000
--- a/tkimg1.3/libz/Makefile.in
+++ /dev/null
@@ -1,154 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-#    ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To use the asm code, type:
-#    cp contrib/asm?86/match.S ./match.S
-#    make LOC=-DASMV OBJA=match.o
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-#    make install
-# To install in $HOME instead of /usr/local, use:
-#    make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=libz.a
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-LIBS=libz.a
-SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.1
-SHAREDLIBM=libz.so.1
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-EXE=
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-mandir = ${prefix}/share/man
-man3dir = ${mandir}/man3
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example$(EXE) minigzip$(EXE)
-
-check: test
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
-	$(CPP) match.S > _match.s
-	$(CC) -c _match.s
-	mv _match.o match.o
-	rm -f _match.s
-
-$(SHAREDLIBV): $(OBJS)
-	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(SHAREDLIB) $(SHAREDLIBM)
-	ln -s $@ $(SHAREDLIB)
-	ln -s $@ $(SHAREDLIBM)
-
-example$(EXE): example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip$(EXE): minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
-	- at if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
-	- at if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
-	- at if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
-	- at if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
-	cp zlib.h zconf.h $(includedir)
-	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-	cp $(LIBS) $(libdir)
-	cd $(libdir); chmod 755 $(LIBS)
-	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-	cd $(libdir); if test -f $(SHAREDLIBV); then \
-	  rm -f $(SHAREDLIB) $(SHAREDLIBM); \
-	  ln -s $(SHAREDLIBV) $(SHAREDLIB); \
-	  ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
-	  (ldconfig || true)  >/dev/null 2>&1; \
-	fi
-	cp zlib.3 $(man3dir)
-	chmod 644 $(man3dir)/zlib.3
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
-	cd $(includedir); \
-	cd $(libdir); rm -f libz.a; \
-	if test -f $(SHAREDLIBV); then \
-	  rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
-	fi
-	cd $(man3dir); rm -f zlib.3
-
-mostlyclean: clean
-clean:
-	rm -f *.o *~ example$(EXE) minigzip$(EXE) \
-	   libz.* foo.gz so_locations \
-	   _match.s maketree contrib/infback9/*.o
-
-maintainer-clean: distclean
-distclean: clean
-	cp -p Makefile.in Makefile
-	cp -p zconf.in.h zconf.h
-	rm -f .DS_Store
-
-tags:
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/README b/tkimg1.3/libz/README
deleted file mode 100644
index 0f12054..0000000
--- a/tkimg1.3/libz/README
+++ /dev/null
@@ -1,126 +0,0 @@
-ZLIB DATA COMPRESSION LIBRARY
-
-zlib 1.2.1 is a general purpose data compression library.  All the code is
-thread safe.  The data format used by the zlib library is described by RFCs
-(Request for Comments) 1950 to 1952 in the files
-http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format). These documents are also available in other
-formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib at gzip.org). A usage example
-of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
-compression library itself is composed of all source files except example.c and
-minigzip.c.
-
-To compile all files and run the test program, follow the instructions given at
-the top of Makefile. In short "make test; make install" should work for most
-machines. For Unix: "./configure; make test; make install" For MSDOS, use one
-of the special makefiles such as Makefile.msc. For VMS, use Make_vms.com or
-descrip.mms.
-
-Questions about zlib should be sent to <zlib at gzip.org>, or to Gilles Vollant
-<info at winimage.com> for the Windows DLL version. The zlib home page is
-http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
-please check this site to verify that you have the latest version of zlib;
-otherwise get the latest version and check whether the problem still exists or
-not.
-
-PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
-for help.
-
-Mark Nelson <markn at ieee.org> wrote an article about zlib for the Jan. 1997
-issue of  Dr. Dobb's Journal; a copy of the article is available in
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-
-The changes made in version 1.2.1 are documented in the file ChangeLog.
-
-Unsupported third party contributions are provided in directory "contrib".
-
-A Java implementation of zlib is available in the Java Development Kit
-http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
-See the zlib home page http://www.zlib.org for details.
-
-A Perl interface to zlib written by Paul Marquess <pmqs at cpan.org> is in the
-CPAN (Comprehensive Perl Archive Network) sites
-http://www.cpan.org/modules/by-module/Compress/
-
-A Python interface to zlib written by A.M. Kuchling <amk at magnet.com> is
-available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
-
-A zlib binding for TCL written by Andreas Kupries <a.kupries at westend.com> is
-availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
-
-An experimental package to read and write files in .zip format, written on top
-of zlib by Gilles Vollant <info at winimage.com>, is available in the
-contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- For Windows DLL versions, please see win32/DLL_FAQ.txt
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
-  compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
-  when compiled with cc.
-
-- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
-  necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
-  other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
-
-- For PalmOs, see http://palmzlib.sourceforge.net/
-
-- When building a shared, i.e. dynamic library on Mac OS X, the library must be
-  installed before testing (do "make install" before "make test"), since the
-  library location is specified in the library.
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-2003 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind.  The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes. Please
-read the FAQ for more information on the distribution of modified source
-versions.
diff --git a/tkimg1.3/libz/adler32.c b/tkimg1.3/libz/adler32.c
deleted file mode 100644
index 49c487f..0000000
--- a/tkimg1.3/libz/adler32.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: adler32.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#define BASE 65521UL    /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i)  {s1 += buf[i]; s2 += s1;}
-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf)   DO8(buf,0); DO8(buf,8);
-
-#ifdef NO_DIVIDE
-#  define MOD(a) \
-    do { \
-        if (a >= (BASE << 16)) a -= (BASE << 16); \
-        if (a >= (BASE << 15)) a -= (BASE << 15); \
-        if (a >= (BASE << 14)) a -= (BASE << 14); \
-        if (a >= (BASE << 13)) a -= (BASE << 13); \
-        if (a >= (BASE << 12)) a -= (BASE << 12); \
-        if (a >= (BASE << 11)) a -= (BASE << 11); \
-        if (a >= (BASE << 10)) a -= (BASE << 10); \
-        if (a >= (BASE << 9)) a -= (BASE << 9); \
-        if (a >= (BASE << 8)) a -= (BASE << 8); \
-        if (a >= (BASE << 7)) a -= (BASE << 7); \
-        if (a >= (BASE << 6)) a -= (BASE << 6); \
-        if (a >= (BASE << 5)) a -= (BASE << 5); \
-        if (a >= (BASE << 4)) a -= (BASE << 4); \
-        if (a >= (BASE << 3)) a -= (BASE << 3); \
-        if (a >= (BASE << 2)) a -= (BASE << 2); \
-        if (a >= (BASE << 1)) a -= (BASE << 1); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#else
-#  define MOD(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
-    uLong adler;
-    const Bytef *buf;
-    uInt len;
-{
-    unsigned long s1 = adler & 0xffff;
-    unsigned long s2 = (adler >> 16) & 0xffff;
-    int k;
-
-    if (buf == Z_NULL) return 1L;
-
-    while (len > 0) {
-        k = len < NMAX ? (int)len : NMAX;
-        len -= k;
-        while (k >= 16) {
-            DO16(buf);
-            buf += 16;
-            k -= 16;
-        }
-        if (k != 0) do {
-            s1 += *buf++;
-            s2 += s1;
-        } while (--k);
-        MOD(s1);
-        MOD(s2);
-    }
-    return (s2 << 16) | s1;
-}
diff --git a/tkimg1.3/libz/algorithm.txt b/tkimg1.3/libz/algorithm.txt
deleted file mode 100644
index b022dde..0000000
--- a/tkimg1.3/libz/algorithm.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by gzip (also zip and zlib) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data.  The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length).  Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes.  (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for
-a longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the process of lazy evaluation begins again. Otherwise,
-the original match is kept, and the next match search is attempted only N
-steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-2.1 Introduction
-
-The key question is how to represent a Huffman code (or any prefix code) so
-that you can decode fast.  The most important characteristic is that shorter
-codes are much more common than longer codes, so pay attention to decoding the
-short codes fast, and let the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code.  It gets that many bits from the
-stream, and looks it up in the table.  The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table.  If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code.  However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table.  What inflate() does is
-simply to make the number of bits in the first table a variable, and  then
-to set that variable for the maximum speed.
-
-For inflate, which has 286 possible codes for the literal/length tree, the size
-of the first table is nine bits.  Also the distance trees have 30 possible
-values, and the size of the first table is six bits.  Note that for each of
-those cases, the table ended up one bit longer than the ``average'' code
-length, i.e. the code length of an approximately flat code which would be a
-little more than eight bits for 286 symbols and a little less than five bits
-for 30 symbols.
-
-
-2.2 More details on the inflate table lookup
-
-Ok, you want to know what this cleverly obfuscated inflate tree actually
-looks like.  You are correct that it's not a Huffman tree.  It is simply a
-lookup table for the first, let's say, nine bits of a Huffman symbol.  The
-symbol could be as short as one bit or as long as 15 bits.  If a particular
-symbol is shorter than nine bits, then that symbol's translation is duplicated
-in all those entries that start with that symbol's bits.  For example, if the
-symbol is four bits, then it's duplicated 32 times in a nine-bit table.  If a
-symbol is nine bits long, it appears in the table once.
-
-If the symbol is longer than nine bits, then that entry in the table points
-to another similar table for the remaining bits.  Again, there are duplicated
-entries as needed.  The idea is that most of the time the symbol will be short
-and there will only be one table look up.  (That's whole idea behind data
-compression in the first place.)  For the less frequent long symbols, there
-will be two lookups.  If you had a compression method with really long
-symbols, you could have as many levels of lookups as is efficient.  For
-inflate, two is enough.
-
-So a table entry either points to another table (in which case nine bits in
-the above example are gobbled), or it contains the translation for the symbol
-and the number of bits to gobble.  Then you start again with the next
-ungobbled bit.
-
-You may wonder: why not just have one lookup table for how ever many bits the
-longest symbol is?  The reason is that if you do that, you end up spending
-more time filling in duplicate symbol entries than you do actually decoding.
-At least for deflate's output that generates new trees every several 10's of
-kbytes.  You can imagine that filling in a 2^15 entry table for a 15-bit code
-would take too long if you're only decoding several thousand symbols.  At the
-other extreme, you could make a new table for every bit in the code.  In fact,
-that's essentially a Huffman tree.  But then you spend two much time
-traversing the tree while decoding, even for short symbols.
-
-So the number of bits for the first lookup table is a trade of the time to
-fill out the table vs. the time spent looking at the second level and above of
-the table.
-
-Here is an example, scaled down:
-
-The code being decoded, with 10 symbols, from 1 to 6 bits long:
-
-A: 0
-B: 10
-C: 1100
-D: 11010
-E: 11011
-F: 11100
-G: 11101
-H: 11110
-I: 111110
-J: 111111
-
-Let's make the first table three bits long (eight entries):
-
-000: A,1
-001: A,1
-010: A,1
-011: A,1
-100: B,2
-101: B,2
-110: -> table X (gobble 3 bits)
-111: -> table Y (gobble 3 bits)
-
-Each entry is what the bits decode as and how many bits that is, i.e. how
-many bits to gobble.  Or the entry points to another table, with the number of
-bits to gobble implicit in the size of the table.
-
-Table X is two bits long since the longest code starting with 110 is five bits
-long:
-
-00: C,1
-01: C,1
-10: D,2
-11: E,2
-
-Table Y is three bits long since the longest code starting with 111 is six
-bits long:
-
-000: F,2
-001: F,2
-010: G,2
-011: G,2
-100: H,2
-101: H,2
-110: I,3
-111: J,3
-
-So what we have here are three tables with a total of 20 entries that had to
-be constructed.  That's compared to 64 entries for a single table.  Or
-compared to 16 entries for a Huffman tree (six two entry tables and one four
-entry table).  Assuming that the code ideally represents the probability of
-the symbols, it takes on the average 1.25 lookups per symbol.  That's compared
-to one lookup for the single table, or 1.66 lookups per symbol for the
-Huffman tree.
-
-There, I think that gives you a picture of what's going on.  For inflate, the
-meaning of a particular symbol is often more than just a letter.  It can be a
-byte (a "literal"), or it can be either a length or a distance which
-indicates a base value and a number of bits to fetch after the code that is
-added to the base value.  Or it might be the special end-of-block code.  The
-data structures created in inftrees.c try to encode all that information
-compactly in the tables.
-
-
-Jean-loup Gailly        Mark Adler
-jloup at gzip.org          madler at alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-http://www.ietf.org/rfc/rfc1951.txt
diff --git a/tkimg1.3/libz/amiga/Makefile.pup b/tkimg1.3/libz/amiga/Makefile.pup
deleted file mode 100644
index 3f7e155..0000000
--- a/tkimg1.3/libz/amiga/Makefile.pup
+++ /dev/null
@@ -1,66 +0,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-
-LIBNAME	= libzip.a
-
-CC	= scppc
-CFLAGS	= NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \
-	  OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER
-AR	= ppc-amigaos-ar cr
-RANLIB	= ppc-amigaos-ranlib
-LD	= ppc-amigaos-ld -r
-LDFLAGS	= -o
-LDLIBS	= LIB:scppc.a LIB:end.o
-RM	= delete quiet
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d
-
-$(LIBNAME): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-$(RANLIB) $@
-
-example: example.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-minigzip: minigzip.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-mostlyclean: clean
-clean:
-	$(RM) *.o example minigzip $(LIBNAME) foo.gz
-
-zip:
-	zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
-	  descrip.mms *.[ch]
-
-tgz:
-	cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
-	  zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/amiga/Makefile.sas b/tkimg1.3/libz/amiga/Makefile.sas
deleted file mode 100644
index d6842b8..0000000
--- a/tkimg1.3/libz/amiga/Makefile.sas
+++ /dev/null
@@ -1,65 +0,0 @@
-# SMakefile for zlib
-# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly
-# Osma Ahvenlampi <Osma.Ahvenlampi at hut.fi>
-# Amiga, SAS/C 6.56 & Smake
-
-CC=sc
-CFLAGS=OPT
-#CFLAGS=OPT CPU=68030
-#CFLAGS=DEBUG=LINE
-LDFLAGS=LIB z.lib
-
-SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
-       NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
-       DEF=POSTINC
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: SCOPTIONS example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d 
-
-install: z.lib
-	copy clone zlib.h zconf.h INCLUDE:
-	copy clone z.lib LIB:
-
-z.lib: $(OBJS)
-	oml z.lib r $(OBJS)
-
-example: example.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)
-
-mostlyclean: clean
-clean:
-	-delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS
-
-SCOPTIONS: Makefile.sas
-	copy to $@ <from <
-$(SCOPTIONS)
-<
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/as400/bndsrc b/tkimg1.3/libz/as400/bndsrc
deleted file mode 100644
index 9cf94bb..0000000
--- a/tkimg1.3/libz/as400/bndsrc
+++ /dev/null
@@ -1,132 +0,0 @@
-STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.1.3 entry points.                                    */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      ADLER32      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("adler32")
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compress")
-  EXPORT SYMBOL("compress2")
-
-/********************************************************************/
-/*   *MODULE      CRC32        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("crc32")
-  EXPORT SYMBOL("get_crc_table")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflate")
-  EXPORT SYMBOL("deflateEnd")
-  EXPORT SYMBOL("deflateSetDictionary")
-  EXPORT SYMBOL("deflateCopy")
-  EXPORT SYMBOL("deflateReset")
-  EXPORT SYMBOL("deflateParams")
-  EXPORT SYMBOL("deflatePrime")
-  EXPORT SYMBOL("deflateInit_")
-  EXPORT SYMBOL("deflateInit2_")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzopen")
-  EXPORT SYMBOL("gzdopen")
-  EXPORT SYMBOL("gzsetparams")
-  EXPORT SYMBOL("gzread")
-  EXPORT SYMBOL("gzwrite")
-  EXPORT SYMBOL("gzprintf")
-  EXPORT SYMBOL("gzputs")
-  EXPORT SYMBOL("gzgets")
-  EXPORT SYMBOL("gzputc")
-  EXPORT SYMBOL("gzgetc")
-  EXPORT SYMBOL("gzflush")
-  EXPORT SYMBOL("gzseek")
-  EXPORT SYMBOL("gzrewind")
-  EXPORT SYMBOL("gztell")
-  EXPORT SYMBOL("gzeof")
-  EXPORT SYMBOL("gzclose")
-  EXPORT SYMBOL("gzerror")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflate")
-  EXPORT SYMBOL("inflateEnd")
-  EXPORT SYMBOL("inflateSetDictionary")
-  EXPORT SYMBOL("inflateSync")
-  EXPORT SYMBOL("inflateReset")
-  EXPORT SYMBOL("inflateInit_")
-  EXPORT SYMBOL("inflateInit2_")
-  EXPORT SYMBOL("inflateSyncPoint")
-
-/********************************************************************/
-/*   *MODULE      UNCOMPR      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("uncompress")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibVersion")
-  EXPORT SYMBOL("zError")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.2.1 additional entry points.                         */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compressBound")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflateBound")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzungetc")
-  EXPORT SYMBOL("gzclearerr")
-
-/********************************************************************/
-/*   *MODULE      INFBACK      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateBack")
-  EXPORT SYMBOL("inflateBackEnd")
-  EXPORT SYMBOL("inflateBackInit_")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateCopy")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibCompileFlags")
-
-ENDPGMEXP
diff --git a/tkimg1.3/libz/as400/compile.clp b/tkimg1.3/libz/as400/compile.clp
deleted file mode 100644
index dcd2421..0000000
--- a/tkimg1.3/libz/as400/compile.clp
+++ /dev/null
@@ -1,123 +0,0 @@
-/******************************************************************************/
-/*                                                                            */
-/*  ZLIB                                                                      */
-/*                                                                            */
-/*    Compile sources into modules and link them into a service program.      */
-/*                                                                            */
-/******************************************************************************/
-
-             PGM
-
-/*      Configuration adjustable parameters.                                  */
-
-             DCL        VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Source library. */
-             DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('SOURCES')                      /* Source member file. */
-             DCL        VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('TOOLS')                        /* Control member file. */
-
-             DCL        VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Module library. */
-
-             DCL        VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('LGPL')                         /* Service program library. */
-
-             DCL        VAR(&CFLAGS) TYPE(*CHAR) +
-                          VALUE('OPTIMIZE(40)')                 /* Compile options. */
-
-
-/*      Working storage.                                                      */
-
-             DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300)    /* Command length. */
-             DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)
-
-
-/*      Compile sources into modules.                                         */
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ADLER32)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/COMPRESS)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/CRC32)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/DEFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/GZIO)                  SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFBACK)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFFAST)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFTREES)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/TREES)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/UNCOMPR)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ZUTIL)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-
-/*      Link modules into a service program.                                  */
-
-             CRTSRVPGM  SRVPGM(&SRVLIB/ZLIB) +
-                          MODULE(&MODLIB/ADLER32     &MODLIB/COMPRESS    +
-                                 &MODLIB/CRC32       &MODLIB/DEFLATE     +
-                                 &MODLIB/GZIO        &MODLIB/INFBACK     +
-                                 &MODLIB/INFFAST     &MODLIB/INFLATE     +
-                                 &MODLIB/INFTREES    &MODLIB/TREES       +
-                                 &MODLIB/UNCOMPR     &MODLIB/ZUTIL)      +
-                          SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
-                          TEXT('ZLIB 1.2.1') TGTRLS(V4R4M0)
-
-             ENDPGM
diff --git a/tkimg1.3/libz/as400/readme.txt b/tkimg1.3/libz/as400/readme.txt
deleted file mode 100644
index eef7cb2..0000000
--- a/tkimg1.3/libz/as400/readme.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-        ZLIB version 1.2.1 for AS400 installation instructions
-
-I) From an AS400 *SAVF file:
-
-1)      Unpacking archive to an AS400 save file
-
-On the AS400:
-
-_       Create the ZLIB AS400 library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-_       Create a work save file, for example:
-
-                CRTSAVF FILE(ZLIB/ZLIBSAVF)
-
-On a PC connected to the target AS400:
-
-_       Unpack the save file image to a PC file "ZLIBSAVF"
-_       Upload this file into the save file on the AS400, for example
-                using ftp in BINARY mode.
-
-
-2)      Populating the ZLIB AS400 source library
-
-On the AS400:
-
-_       Extract the saved objects into the ZLIB AS400 library using:
-
-RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
-
-
-3)      Customize installation:
-
-_       Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
-                according to the comments.
-
-_       Compile this member with:
-
-        CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
-
-
-4)      Compile and generate the service program:
-
-_       This can now be done by executing:
-
-        CALL PGM(ZLIB/COMPILE)
-
-
-
-II) From the original source distribution:
-
-1)      On the AS400, create the source library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-2)      Create the source files:
-
-        CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
-        CRTSRCPF FILE(ZLIB/H)       RCDLEN(112) TEXT('ZLIB library includes')
-        CRTSRCPF FILE(ZLIB/TOOLS)   RCDLEN(112) TEXT('ZLIB library control utilities')
-
-3)      From the machine hosting the distribution files, upload them (with
-                FTP in text mode, for example) according to the following table:
-
-    Original    AS400   AS400    AS400 AS400
-    file        file    member   type  description
-                SOURCES                Original ZLIB C subprogram sources
-    adler32.c           ADLER32  C     ZLIB - Compute the Adler-32 checksum of a dta strm
-    compress.c          COMPRESS C     ZLIB - Compress a memory buffer
-    crc32.c             CRC32    C     ZLIB - Compute the CRC-32 of a data stream
-    deflate.c           DEFLATE  C     ZLIB - Compress data using the deflation algorithm
-    gzio.c              GZIO     C     ZLIB - IO on .gz files
-    infback.c           INFBACK  C     ZLIB - Inflate using a callback interface
-    inffast.c           INFFAST  C     ZLIB - Fast proc. literals & length/distance pairs
-    inflate.c           INFLATE  C     ZLIB - Interface to inflate modules
-    inftrees.c          INFTREES C     ZLIB - Generate Huffman trees for efficient decode
-    trees.c             TREES    C     ZLIB - Output deflated data using Huffman coding
-    uncompr.c           UNCOMPR  C     ZLIB - Decompress a memory buffer
-    zutil.c             ZUTIL    C     ZLIB - Target dependent utility functions
-                H                      Original ZLIB C and ILE/RPG include files
-    crc32.h             CRC32    C     ZLIB - CRC32 tables
-    deflate.h           DEFLATE  C     ZLIB - Internal compression state
-    inffast.h           INFFAST  C     ZLIB - Header to use inffast.c
-    inffixed.h          INFFIXED C     ZLIB - Table for decoding fixed codes
-    inflate.h           INFLATE  C     ZLIB - Internal inflate state definitions
-    inftrees.h          INFTREES C     ZLIB - Header to use inftrees.c
-    trees.h             TREES    C     ZLIB - Created automatically with -DGEN_TREES_H
-    zconf.h             ZCONF    C     ZLIB - Compression library configuration
-    zlib.h              ZLIB     C     ZLIB - Compression library C user interface
-    as400/zlib.inc      ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
-    zutil.h             ZUTIL    C     ZLIB - Internal interface and configuration
-                TOOLS                  Building source software & AS/400 README
-    as400/bndsrc        BNDSRC         Entry point exportation list
-    as400/compile.clp   COMPILE  CLP   Compile sources & generate service program
-    as400/readme.txt    README   TXT   Installation instructions
-
-4)      Continue as in I)3).
-
-
-
-
-Notes:  For AS400 ILE RPG programmers, a /copy member defining the ZLIB
-                API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
-                Please read comments in this member for more information.
-
-        Remember that most foreign textual data are ASCII coded: this
-                implementation does not handle conversion from/to ASCII, so
-                text data code conversions must be done explicitely.
-
-        Always open zipped files in binary mode.
diff --git a/tkimg1.3/libz/as400/zlib.inc b/tkimg1.3/libz/as400/zlib.inc
deleted file mode 100644
index 03c6cf0..0000000
--- a/tkimg1.3/libz/as400/zlib.inc
+++ /dev/null
@@ -1,327 +0,0 @@
-      *  ZLIB.INC - Interface to the general purpose compression library
-      *
-      *  ILE RPG400 version by Patrick Monnerat, DATASPHERE.
-      *  Version 1.2.1
-      *
-      *
-      *  WARNING:
-      *     Procedures inflateInit(), inflateInit2(), deflateInit(),
-      *         deflateInit2() and inflateBackInit() need to be called with
-      *         two additional arguments:
-      *         the package version string and the stream control structure.
-      *         size. This is needed because RPG lacks some macro feature.
-      *         Call these procedures as:
-      *             inflateInit(...: ZLIB_VERSION: %size(z_stream))
-      *
-      /if not defined(ZLIB_H_)
-      /define ZLIB_H_
-      *
-      **************************************************************************
-      *                               Constants
-      **************************************************************************
-      *
-     D ZLIB_VERSION    C                   '1.2.1'                            Header's version
-     D ZLIB_VERNUM     C                   X'1210'
-      *
-     D Z_NO_FLUSH      C                   0
-     D Z_SYNC_FLUSH    C                   2
-     D Z_FULL_FLUSH    C                   3
-     D Z_FINISH        C                   4
-     D Z_BLOCK         C                   5
-      *
-     D Z_OK            C                   0
-     D Z_STREAM_END    C                   1
-     D Z_NEED_DICT     C                   2
-     D Z_ERRNO         C                   -1
-     D Z_STREAM_ERROR  C                   -2
-     D Z_DATA_ERROR    C                   -3
-     D Z_MEM_ERROR     C                   -4
-     D Z_BUF_ERROR     C                   -5
-     DZ_VERSION_ERROR  C                   -6
-      *
-     D Z_NO_COMPRESSION...
-     D                 C                   0
-     D Z_BEST_SPEED    C                   1
-     D Z_BEST_COMPRESSION...
-     D                 C                   9
-     D Z_DEFAULT_COMPRESSION...
-     D                 C                   -1
-      *
-     D Z_FILTERED      C                   1
-     D Z_HUFFMAN_ONLY  C                   2
-     D Z_RLE           C                   3
-     D Z_DEFAULT_STRATEGY...
-     D                 C                   0
-      *
-     D Z_BINARY        C                   0
-     D Z_ASCII         C                   1
-     D Z_UNKNOWN       C                   2
-      *
-     D Z_DEFLATED      C                   8
-      *
-     D Z_NULL          C                   0
-      *
-      **************************************************************************
-      *                                 Types
-      **************************************************************************
-      *
-     D z_streamp       S               *                                        Stream struct ptr
-     D gzFile          S               *                                        File pointer
-     D z_off_t         S             10i 0                                      Stream offsets
-      *
-      **************************************************************************
-      *                               Structures
-      **************************************************************************
-      *
-      *  The GZIP encode/decode stream support structure.
-      *
-     D z_stream        DS                  align based(z_streamp)
-     D  zs_next_in                     *                                        Next input byte
-     D  zs_avail_in                  10U 0                                      Byte cnt at next_in
-     D  zs_total_in                  10U 0                                      Total bytes read
-     D  zs_next_out                    *                                        Output buffer ptr
-     D  zs_avail_out                 10U 0                                      Room left @ next_out
-     D  zs_total_out                 10U 0                                      Total bytes written
-     D  zs_msg                         *                                        Last errmsg or null
-     D  zs_state                       *                                        Internal state
-     D  zs_zalloc                      *   procptr                              Int. state allocator
-     D  zs_free                        *   procptr                              Int. state dealloc.
-     D  zs_opaque                      *                                        Private alloc. data
-     D  zs_data_type                 10i 0                                      ASC/BIN best guess
-     D  zs_adler                     10u 0                                      Uncompr. adler32 val
-     D                               10U 0                                      Reserved
-     D                               10U 0                                      Ptr. alignment
-      *
-      **************************************************************************
-      *                     Utility function prototypes
-      **************************************************************************
-      *
-     D compress        PR            10I 0 extproc('compress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10u 0 value                                Source length
-      *
-     D compress2       PR            10I 0 extproc('compress2')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-     D  level                        10I 0 value                                Compression level
-      *
-     D compressBound   PR            10U 0 extproc('compressBound')
-     D  sourceLen                    10U 0 value
-      *
-     D uncompress      PR            10I 0 extproc('uncompress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-      *
-     D gzopen          PR                  extproc('gzopen')
-     D                                     like(gzFile)
-     D  path                           *   value options(*string)               File pathname
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzdopen         PR                  extproc('gzdopen')
-     D                                     like(gzFile)
-     D  fd                           10i 0 value                                File descriptor
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzsetparams     PR            10I 0 extproc('gzsetparams')
-     D  file                               value like(gzFile)                   File pointer
-     D  level                        10I 0 value
-     D  strategy                     10i 0 value
-      *
-     D gzread          PR            10I 0 extproc('gzread')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzwrite         PR            10I 0 extproc('gzwrite')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    const options(*varsize)              Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzputs          PR            10I 0 extproc('gzputs')
-     D  file                               value like(gzFile)                   File pointer
-     D  s                              *   value options(*string)               String to output
-      *
-     D gzgets          PR              *   extproc('gzgets')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Read buffer
-     D  len                          10i 0 value                                Buffer length
-      *
-     D gzflush         PR            10i 0 extproc('gzflush')
-     D  file                               value like(gzFile)                   File pointer
-     D  flush                        10I 0 value                                Type of flush
-      *
-     D gzseek          PR                  extproc('gzseek')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-     D  offset                             value like(z_off_t)                  Offset
-     D  whence                       10i 0 value                                Origin
-      *
-     D gzrewind        PR            10i 0 extproc('gzrewind')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gztell          PR                  extproc('gztell')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzeof           PR            10i 0 extproc('gzeof')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzclose         PR            10i 0 extproc('gzclose')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzerror         PR              *   extproc('gzerror')                   Error string
-     D  file                               value like(gzFile)                   File pointer
-     D  errnum                       10I 0                                      Error code
-      *
-     D gzclearerr      PR                  extproc('gzclearerr')
-     D  file                               value like(gzFile)                   File pointer
-      *
-      **************************************************************************
-      *                        Basic function prototypes
-      **************************************************************************
-      *
-     D zlibVersion     PR              *   extproc('zlibVersion')               Version string
-      *
-     D deflateInit     PR            10I 0 extproc('deflateInit_')              Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflate         PR            10I 0 extproc('deflate')                   Compress data
-     D  strm                               like(z_stream)                       Compression stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D deflateEnd      PR            10I 0 extproc('deflateEnd')                Termin. compression
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D inflateInit     PR            10I 0 extproc('inflateInit_')              Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflate         PR            10I 0 extproc('inflate')                   Expand data
-     D  strm                               like(z_stream)                       Expansion stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D inflateEnd      PR            10I 0 extproc('inflateEnd')                Termin. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-      **************************************************************************
-      *                        Advanced function prototypes
-      **************************************************************************
-      *
-     D deflateInit2    PR            10I 0 extproc('deflateInit2_')             Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  method                       10I 0 value                                Compression method
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  memLevel                     10I 0 value                                Mem/cmpress tradeoff
-     D  strategy                     10I 0 value                                Compression stategy
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflateSetDictionary...
-     D                 PR            10I 0 extproc('deflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Compression stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D deflateCopy     PR            10I 0 extproc('deflateCopy')               Compress strm 2 strm
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D deflateReset    PR            10I 0 extproc('deflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D deflateParams   PR            10I 0 extproc('deflateParams')             Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  strategy                     10I 0 value                                Compression stategy
-      *
-     D deflateBound    PR            10U 0 extproc('deflateBound')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  sourcelen                    10U 0 value                                Compression level
-      *
-     D deflatePrime    PR            10I 0 extproc('deflatePrime')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  bits                         10I 0 value                                Number of bits to insert
-     D  value                        10I 0 value                                Bits to insert
-      *
-     D inflateInit2    PR            10I 0 extproc('inflateInit2_')             Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateSetDictionary...
-     D                 PR            10I 0 extproc('inflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Expansion stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D inflateSync     PR            10I 0 extproc('inflateSync')               Sync. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateCopy     PR            10I 0 extproc('inflateCopy')
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D inflateReset    PR            10I 0 extproc('inflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateBackInit...
-     D                 PR            10I 0 extproc('inflateBackInit_')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                Log2(buffer size)
-     D  window                    32767    options(*varsize)                    Buffer
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateBack     PR            10I 0 extproc('inflateBack')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  in                             *   value procptr                        Input function
-     D  in_desc                        *   value                                Input descriptor
-     D  out                            *   value procptr                        Output function
-     D  out_desc                       *   value                                Output descriptor
-      *
-     D inflateBackEnd  PR            10I 0 extproc('inflateBackEnd')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D zlibCompileFlags...
-     D                 PR            10U 0 extproc('zlibCompileFlags')
-      *
-      **************************************************************************
-      *                        Checksum function prototypes
-      **************************************************************************
-      *
-     D adler32         PR            10U 0 extproc('adler32')                   New checksum
-     D  adler                        10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-     D crc32           PR            10U 0 extproc('crc32')                     New checksum
-     D  crc                          10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-      **************************************************************************
-      *                     Miscellaneous function prototypes
-      **************************************************************************
-      *
-     D zError          PR              *   extproc('zError')                    Error string
-     D  err                          10I 0 value                                Error code
-      *
-     D inflateSyncPoint...
-     D                 PR            10I 0 extproc('inflateSyncPoint')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D get_crc_table   PR              *   extproc('get_crc_table')             Ptr to ulongs
-      *
-      /endif
diff --git a/tkimg1.3/libz/compress.c b/tkimg1.3/libz/compress.c
deleted file mode 100644
index a19df20..0000000
--- a/tkimg1.3/libz/compress.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2002 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: compress.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-    int level;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-    stream.opaque = (voidpf)0;
-
-    err = deflateInit(&stream, level);
-    if (err != Z_OK) return err;
-
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = deflateEnd(&stream);
-    return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
-
-/* ===========================================================================
-     If the default memLevel or windowBits for deflateInit() is changed, then
-   this function needs to be updated.
- */
-uLong ZEXPORT compressBound (sourceLen)
-    uLong sourceLen;
-{
-    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
-}
diff --git a/tkimg1.3/libz/configure b/tkimg1.3/libz/configure
deleted file mode 100755
index d698479..0000000
--- a/tkimg1.3/libz/configure
+++ /dev/null
@@ -1,445 +0,0 @@
-#!/bin/sh
-# configure script for zlib. This script is needed only if
-# you wish to build a shared library and your system supports them,
-# of if you need special compiler, flags or install directory.
-# Otherwise, you can just use directly "make test; make install"
-#
-# To create a shared library, use "configure --shared"; by default a static
-# library is created. If the primitive shared library support provided here
-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
-#
-# To impose specific compiler or flags or install directory, use for example:
-#    prefix=$HOME CC=cc CFLAGS="-O4" ./configure
-# or for csh/tcsh users:
-#    (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
-# LDSHARED is the command to be used to create a shared library
-
-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
-# If you have problems, try without defining CC and CFLAGS before reporting
-# an error.
-
-LIBS=libz.a
-LDFLAGS="-L. ${LIBS}"
-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar rc"}
-RANLIB=${RANLIB-"ranlib"}
-prefix=${prefix-/usr/local}
-exec_prefix=${exec_prefix-'${prefix}'}
-libdir=${libdir-'${exec_prefix}/lib'}
-includedir=${includedir-'${prefix}/include'}
-mandir=${mandir-'${prefix}/share/man'}
-shared_ext='.so'
-shared=0
-gcc=0
-old_cc="$CC"
-old_cflags="$CFLAGS"
-
-while test $# -ge 1
-do
-case "$1" in
-    -h* | --h*)
-      echo 'usage:'
-      echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
-      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
-        exit 0;;
-    -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
-    -p* | --p*) prefix="$2"; shift; shift;;
-    -e* | --e*) exec_prefix="$2"; shift; shift;;
-    -l* | --l*) libdir="$2"; shift; shift;;
-    -i* | --i*) includedir="$2"; shift; shift;;
-    -s* | --s*) shared=1; shift;;
-    *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
-    esac
-done
-
-test=ztest$$
-cat > $test.c <<EOF
-extern int getchar();
-int hello() {return getchar();}
-EOF
-
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
-cflags=${CFLAGS-"-O3"}
-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
-case "$cc" in
-  *gcc*) gcc=1;;
-esac
-
-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
-  CC="$cc"
-  SFLAGS=${CFLAGS-"-fPIC -O3"}
-  CFLAGS="$cflags"
-  case `(uname -s || echo unknown) 2>/dev/null` in
-  Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
-  CYGWIN* | Cygwin* | cygwin* )
-             EXE='.exe';;
-  QNX*)  # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
-         # (alain.bonnefoy at icbt.com)
-                 LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
-  HP-UX*)        LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
-                 shared_ext='.sl'
-                 SHAREDLIB='libz.sl';;
-  Darwin*)   shared_ext='.dylib'
-             SHAREDLIB=libz$shared_ext
-             SHAREDLIBV=libz.$VER$shared_ext
-             SHAREDLIBM=libz.$VER1$shared_ext
-             LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name /usr/lib/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"}
-             libdir='/usr/lib'
-             includedir='/usr/include';;
-  *)             LDSHARED=${LDSHARED-"$cc -shared"};;
-  esac
-else
-  # find system name and corresponding cc options
-  CC=${CC-cc}
-  case `(uname -sr || echo unknown) 2>/dev/null` in
-  HP-UX*)    SFLAGS=${CFLAGS-"-O +z"}
-             CFLAGS=${CFLAGS-"-O"}
-#            LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
-             LDSHARED=${LDSHARED-"ld -b"}
-             shared_ext='.sl'
-             SHAREDLIB='libz.sl';;
-  IRIX*)     SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
-             CFLAGS=${CFLAGS-"-ansi -O2"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
-  OSF1*)     SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  QNX*)      SFLAGS=${CFLAGS-"-4 -O"}
-             CFLAGS=${CFLAGS-"-4 -O"}
-             LDSHARED=${LDSHARED-"cc"}
-             RANLIB=${RANLIB-"true"}
-             AR="cc -A";;
-  SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
-             CFLAGS=${CFLAGS-"-O3"}
-             LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
-  SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
-             CFLAGS=${CFLAGS-"-fast -xcg89"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
-             CFLAGS=${CFLAGS-"-O2"}
-             LDSHARED=${LDSHARED-"ld"};;
-  UNIX_System_V\ 4.2.0)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  UNIX_SV\ 4.2MP)
-             SFLAGS=${CFLAGS-"-Kconform_pic -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  OpenUNIX\ 5)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  AIX*)  # Courtesy of dbakker at arrayasolutions.com
-             SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             LDSHARED=${LDSHARED-"xlc -G"};;
-  # send working options for other systems to support at gzip.org
-  *)         SFLAGS=${CFLAGS-"-O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  esac
-fi
-
-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
-
-if test $shared -eq 1; then
-  echo Checking for shared library support...
-  # we must test in two steps (cc then ld), required at least on SunOS 4.x
-  if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
-     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-    CFLAGS="$SFLAGS"
-    LIBS="$SHAREDLIBV"
-    echo Building shared library $SHAREDLIBV with $CC.
-  elif test -z "$old_cc" -a -z "$old_cflags"; then
-    echo No shared library support.
-    shared=0;
-  else
-    echo 'No shared library support; try without defining CC and CFLAGS'
-    shared=0;
-  fi
-fi
-if test $shared -eq 0; then
-  LDSHARED="$CC"
-  echo Building static library $LIBS version $VER with $CC.
-else
-  LDFLAGS="-L. ${SHAREDLIBV}"
-fi
-
-cat > $test.c <<EOF
-#include <unistd.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
-  echo "Checking for unistd.h... Yes."
-else
-  cp -p zconf.in.h zconf.h
-  echo "Checking for unistd.h... No."
-fi
-
-cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-#include "zconf.h"
-
-int main()
-{
-#ifndef STDC
-  choke me
-#endif
-
-  return 0;
-}
-EOF
-
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
-
-  cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return 0;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for vsnprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsnprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
-      echo "Checking for return value of vsnprintf()... No."
-      echo "  WARNING: apparently vsnprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_vsnprintf"
-    echo "Checking for vsnprintf() in stdio.h... No."
-    echo "  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsprintf(buf, fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsprintf_void"
-      echo "Checking for return value of vsprintf()... No."
-      echo "  WARNING: apparently vsprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-else
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
-
-  cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  snprintf(buf, sizeof(buf), "%s", "foo");
-  return 0;
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for snprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return snprintf(buf, sizeof(buf), "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of snprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_snprintf_void"
-      echo "Checking for return value of snprintf()... No."
-      echo "  WARNING: apparently snprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_snprintf"
-    echo "Checking for snprintf() in stdio.h... No."
-    echo "  WARNING: snprintf() not found, falling back to sprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return sprintf(buf, "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of sprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_sprintf_void"
-      echo "Checking for return value of sprintf()... No."
-      echo "  WARNING: apparently sprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-fi
-
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking for errno.h... Yes."
-else
-  echo "Checking for errno.h... No."
-  CFLAGS="$CFLAGS -DNO_ERRNO_H"
-fi
-
-cat > $test.c <<EOF
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
-  return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
-}
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  CFLAGS="$CFLAGS -DUSE_MMAP"
-  echo Checking for mmap support... Yes.
-else
-  echo Checking for mmap support... No.
-fi
-
-CPP=${CPP-"$CC -E"}
-case $CFLAGS in
-  *ASMV*)
-    if test "`nm $test.o | grep _hello`" = ""; then
-      CPP="$CPP -DNO_UNDERLINE"
-      echo Checking for underline in external names... No.
-    else
-      echo Checking for underline in external names... Yes.
-    fi;;
-esac
-
-rm -f $test.[co] $test $test$shared_ext
-
-# udpate Makefile
-sed < Makefile.in "
-/^CC *=/s#=.*#=$CC#
-/^CFLAGS *=/s#=.*#=$CFLAGS#
-/^CPP *=/s#=.*#=$CPP#
-/^LDSHARED *=/s#=.*#=$LDSHARED#
-/^LIBS *=/s#=.*#=$LIBS#
-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
-/^AR *=/s#=.*#=$AR#
-/^RANLIB *=/s#=.*#=$RANLIB#
-/^EXE *=/s#=.*#=$EXE#
-/^prefix *=/s#=.*#=$prefix#
-/^exec_prefix *=/s#=.*#=$exec_prefix#
-/^libdir *=/s#=.*#=$libdir#
-/^includedir *=/s#=.*#=$includedir#
-/^mandir *=/s#=.*#=$mandir#
-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
-" > Makefile
diff --git a/tkimg1.3/libz/contrib/README.contrib b/tkimg1.3/libz/contrib/README.contrib
deleted file mode 100644
index 8860f31..0000000
--- a/tkimg1.3/libz/contrib/README.contrib
+++ /dev/null
@@ -1,70 +0,0 @@
-All files under this contrib directory are UNSUPPORTED. There were
-provided by users of zlib and were not tested by the authors of zlib.
-Use at your own risk. Please contact the authors of the contributions
-for help about these, not the zlib authors. Thanks.
-
-
-ada/        by Dmitriy Anisimkov <anisimkov at yahoo.com>
-        Support for Ada
-        See http://zlib-ada.sourceforge.net/
-
-asm586/
-asm686/     by Brian Raiter <breadbox at muppetlabs.com>
-        asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
-        See http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-blast/      by Mark Adler <madler at alumni.caltech.edu>
-        Decompressor for output of PKWare Data Compression Library (DCL)
-
-delphi/     by Cosmin Truta <cosmint at cs.ubbcluj.ro>
-        Support for Delphi and C++ Builder
-
-gzappend/   by Mark Adler <madler at alumni.caltech.edu>
-        append to a gzip file -- illustrates the use of Z_BLOCK
-
-infback9/   by Mark Adler <madler at alumni.caltech.edu>
-        Unsupported diffs to infback to decode the deflate64 format
-
-inflate86/  by Chris Anderson <christop at charm.net>
-        Tuned x86 gcc asm code to replace inflate_fast()
-
-iostream/   by Kevin Ruland <kevin at rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-
-iostream2/  by Tyge Løvset <Tyge.Lovset at cmr.no>
-        Another C++ I/O streams interface
-
-iostream3/  by Ludwig Schwardt <schwardt at sun.ac.za>
-            and Kevin Ruland <kevin at rodin.wustl.edu>
-        Yet another C++ I/O streams interface
-
-masm686/    by Dan Higdon <hdan at kinesoft.com>
-            and Chuck Walbourn <chuckw at kinesoft.com>
-        asm code for Pentium Pro/PII, using the MASM syntax
-
-masmx86/    by Gilles Vollant <info at winimage.com>
-        x86 asm code to replace longest_match() and inflate_fast(),
-        for Visual C++ and MASM
-
-minizip/    by Gilles Vollant <info at winimage.com>
-        Mini zip and unzip based on zlib
-        See http://www.winimage.com/zLibDll/unzip.html
-
-pascal/     by Bob Dellaca <bobdl at xtra.co.nz> et al.
-        Support for Pascal
-
-puff/       by Mark Adler <madler at alumni.caltech.edu>
-        Small, low memory usage inflate.  Also serves to provide an
-        unambiguous description of the deflate format.
-
-testzlib/   by Gilles Vollant <info at winimage.com>
-        Example of the use of zlib
-
-untgz/      by "Pedro A. Aranda Guti\irrez" <paag at tid.es>
-        A very simple tar.gz file extractor using zlib
-
-visual-basic.txt by Carlos Rios <c_rios at sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB
-
-vstudio/    by Gilles Vollant <info at winimage.com>
-        Building zlib with Visual Studio .NET
diff --git a/tkimg1.3/libz/contrib/ada/mtest.adb b/tkimg1.3/libz/contrib/ada/mtest.adb
deleted file mode 100644
index 8ffed52..0000000
--- a/tkimg1.3/libz/contrib/ada/mtest.adb
+++ /dev/null
@@ -1,153 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
---  Continuous test for ZLib multithreading. If the test is fail
---  Wou should provide thread safe allocation routines for the Z_Stream.
---
---  $Id: mtest.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-with ZLib;
-with Ada.Streams;
-with Ada.Numerics.Discrete_Random;
-with Ada.Text_IO;
-with Ada.Exceptions;
-with Ada.Task_Identification;
-
-procedure MTest is
-   use Ada.Streams;
-   use ZLib;
-
-   Stop : Boolean := False;
-
-   pragma Atomic (Stop);
-
-   subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
-
-   package Random_Elements is
-      new Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-   task type Test_Task;
-
-   task body Test_Task is
-      Buffer : Stream_Element_Array (1 .. 100_000);
-      Gen : Random_Elements.Generator;
-
-      Buffer_First  : Stream_Element_Offset;
-      Compare_First : Stream_Element_Offset;
-
-      Deflate : Filter_Type;
-      Inflate : Filter_Type;
-
-      procedure Further (Item : in Stream_Element_Array);
-
-      procedure Read_Buffer
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-
-      -------------
-      -- Further --
-      -------------
-
-      procedure Further (Item : in Stream_Element_Array) is
-
-         procedure Compare (Item : in Stream_Element_Array);
-
-         -------------
-         -- Compare --
-         -------------
-
-         procedure Compare (Item : in Stream_Element_Array) is
-            Next_First : Stream_Element_Offset := Compare_First + Item'Length;
-         begin
-            if Buffer (Compare_First .. Next_First - 1) /= Item then
-               raise Program_Error;
-            end if;
-
-            Compare_First := Next_First;
-         end Compare;
-
-         procedure Compare_Write is new ZLib.Write (Write => Compare);
-      begin
-         Compare_Write (Inflate, Item, No_Flush);
-      end Further;
-
-      -----------------
-      -- Read_Buffer --
-      -----------------
-
-      procedure Read_Buffer
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset)
-      is
-         Buff_Diff   : Stream_Element_Offset := Buffer'Last - Buffer_First;
-         Next_First : Stream_Element_Offset;
-      begin
-         if Item'Length <= Buff_Diff then
-            Last := Item'Last;
-
-            Next_First := Buffer_First + Item'Length;
-
-            Item := Buffer (Buffer_First .. Next_First - 1);
-
-            Buffer_First := Next_First;
-         else
-            Last := Item'First + Buff_Diff;
-            Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last);
-            Buffer_First := Buffer'Last + 1;
-         end if;
-      end Read_Buffer;
-
-      procedure Translate is new Generic_Translate
-                                   (Data_In  => Read_Buffer,
-                                    Data_Out => Further);
-
-   begin
-      Random_Elements.Reset (Gen);
-
-      Buffer := (others => 20);
-
-      Main : loop
-         for J in Buffer'Range loop
-            Buffer (J) := Random_Elements.Random (Gen);
-
-            Deflate_Init (Deflate);
-            Inflate_Init (Inflate);
-
-            Buffer_First  := Buffer'First;
-            Compare_First := Buffer'First;
-
-            Translate (Deflate);
-
-            if Compare_First /= Buffer'Last + 1 then
-               raise Program_Error;
-            end if;
-
-            Ada.Text_IO.Put_Line
-              (Ada.Task_Identification.Image
-                 (Ada.Task_Identification.Current_Task)
-               & Stream_Element_Offset'Image (J)
-               & ZLib.Count'Image (Total_Out (Deflate)));
-
-            Close (Deflate);
-            Close (Inflate);
-
-            exit Main when Stop;
-         end loop;
-      end loop Main;
-   exception
-      when E : others =>
-         Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
-         Stop := True;
-   end Test_Task;
-
-   Test : array (1 .. 4) of Test_Task;
-
-   pragma Unreferenced (Test);
-
-begin
-   null;
-end MTest;
diff --git a/tkimg1.3/libz/contrib/ada/read.adb b/tkimg1.3/libz/contrib/ada/read.adb
deleted file mode 100644
index be2b6a8..0000000
--- a/tkimg1.3/libz/contrib/ada/read.adb
+++ /dev/null
@@ -1,151 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: read.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
---  Test/demo program for the generic read interface.
-
-with Ada.Numerics.Discrete_Random;
-with Ada.Streams;
-with Ada.Text_IO;
-
-with ZLib;
-
-procedure Read is
-
-   use Ada.Streams;
-
-   ------------------------------------
-   --  Test configuration parameters --
-   ------------------------------------
-
-   File_Size   : Stream_Element_Offset := 100_000;
-
-   Continuous  : constant Boolean          := False;
-   --  If this constant is True, the test would be repeated again and again,
-   --  with increment File_Size for every iteration.
-
-   Header      : constant ZLib.Header_Type := ZLib.Default;
-   --  Do not use Header other than Default in ZLib versions 1.1.4 and older.
-
-   Init_Random : constant := 8;
-   --  We are using the same random sequence, in case of we catch bug,
-   --  so we would be able to reproduce it.
-
-   -- End --
-
-   Pack_Size : Stream_Element_Offset;
-   Offset    : Stream_Element_Offset;
-
-   Filter     : ZLib.Filter_Type;
-
-   subtype Visible_Symbols
-      is Stream_Element range 16#20# .. 16#7E#;
-
-   package Random_Elements is new
-      Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-   Gen : Random_Elements.Generator;
-   Period  : constant Stream_Element_Offset := 200;
-   --  Period constant variable for random generator not to be very random.
-   --  Bigger period, harder random.
-
-   Read_Buffer : Stream_Element_Array (1 .. 2048);
-   Read_First  : Stream_Element_Offset;
-   Read_Last   : Stream_Element_Offset;
-
-   procedure Reset;
-
-   procedure Read
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Read
-   --  reading data from the File_In.
-
-   procedure Read is new ZLib.Read (Read, Read_Buffer, Read_First, Read_Last);
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset) is
-   begin
-      Last := Stream_Element_Offset'Min
-               (Item'Last,
-                Item'First + File_Size - Offset);
-
-      for J in Item'First .. Last loop
-         if J < Item'First + Period then
-            Item (J) := Random_Elements.Random (Gen);
-         else
-            Item (J) := Item (J - Period);
-         end if;
-
-         Offset   := Offset + 1;
-      end loop;
-   end Read;
-
-   -----------
-   -- Reset --
-   -----------
-
-   procedure Reset is
-   begin
-      Random_Elements.Reset (Gen, Init_Random);
-      Pack_Size := 0;
-      Offset := 1;
-      Read_First := Read_Buffer'Last + 1;
-   end Reset;
-
-begin
-   Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
-
-   loop
-      for Level in ZLib.Compression_Level'Range loop
-
-         Ada.Text_IO.Put ("Level ="
-            & ZLib.Compression_Level'Image (Level));
-
-         --  Deflate using generic instantiation.
-
-         ZLib.Deflate_Init
-               (Filter,
-                Level,
-                Header => Header);
-
-         Reset;
-
-         Ada.Text_IO.Put
-           (Stream_Element_Offset'Image (File_Size) & " ->");
-
-         loop
-            declare
-               Buffer : Stream_Element_Array (1 .. 1024);
-               Last   : Stream_Element_Offset;
-            begin
-               Read (Filter, Buffer, Last);
-
-               Pack_Size := Pack_Size + Last - Buffer'First + 1;
-
-               exit when Last < Buffer'Last;
-            end;
-         end loop;
-
-         Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));
-
-         ZLib.Close (Filter);
-      end loop;
-
-      exit when not Continuous;
-
-      File_Size := File_Size + 1;
-   end loop;
-end Read;
diff --git a/tkimg1.3/libz/contrib/ada/readme.txt b/tkimg1.3/libz/contrib/ada/readme.txt
deleted file mode 100644
index ad02c22..0000000
--- a/tkimg1.3/libz/contrib/ada/readme.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
-			ZLib for Ada thick binding (ZLib.Ada)
-			Release 1.2
-
-ZLib.Ada is a thick binding interface to the popular ZLib data
-compression library, available at http://www.gzip.org/zlib/.
-It provides Ada-style access to the ZLib C library.
-
-
-	Here are the main changes since ZLib.Ada 1.1:
-
-- The default header type has a name "Default" now. Auto is used only for
-  automatic GZip/ZLib header detection.
-
-- Added test for multitasking mtest.adb.
-
-- Added GNAT project file zlib.gpr.
-
-
-	How to build ZLib.Ada under GNAT
-
-You should have the ZLib library already build on your computer, before
-building ZLib.Ada. Make the directory of ZLib.Ada sources current and
-issue the command:
-
-  gnatmake test -largs -L<directory where libz.a is> -lz
-
-Or use the GNAT project file build for GNAT 3.15 or later:
-
-  gnatmake -Pzlib.gpr -L<directory where libz.a is>
-
-
-	How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2
-
-1. Make a project with all *.ads and *.adb files from the distribution.
-2. Build the libz.a library from the ZLib C sources.
-3. Rename libz.a to z.lib.
-4. Add the library z.lib to the project.
-5. Add the libc.lib library from the ObjectAda distribution to the project.
-6. Build the executable using test.adb as a main procedure.
-
-
-	How to use ZLib.Ada
-
-The source files test.adb and read.adb are small demo programs that show
-the main functionality of ZLib.Ada.
-
-The routines from the package specifications are commented.
-
-
-Homepage: http://zlib-ada.sourceforge.net/
-Author: Dmitriy Anisimkov <anisimkov at yahoo.com>
diff --git a/tkimg1.3/libz/contrib/ada/test.adb b/tkimg1.3/libz/contrib/ada/test.adb
deleted file mode 100644
index d616ffc..0000000
--- a/tkimg1.3/libz/contrib/ada/test.adb
+++ /dev/null
@@ -1,463 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: test.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
---  The program has a few aims.
---  1. Test ZLib.Ada95 thick binding functionality.
---  2. Show the example of use main functionality of the ZLib.Ada95 binding.
---  3. Build this program automatically compile all ZLib.Ada95 packages under
---     GNAT Ada95 compiler.
-
-with ZLib.Streams;
-with Ada.Streams.Stream_IO;
-with Ada.Numerics.Discrete_Random;
-
-with Ada.Text_IO;
-
-with Ada.Calendar;
-
-procedure Test is
-
-   use Ada.Streams;
-   use Stream_IO;
-
-   ------------------------------------
-   --  Test configuration parameters --
-   ------------------------------------
-
-   File_Size   : Count   := 100_000;
-   Continuous  : constant Boolean := False;
-
-   Header      : constant ZLib.Header_Type := ZLib.Default;
-                                              --  ZLib.None;
-                                              --  ZLib.Auto;
-                                              --  ZLib.GZip;
-   --  Do not use Header other then Default in ZLib versions 1.1.4
-   --  and older.
-
-   Strategy    : constant ZLib.Strategy_Type := ZLib.Default_Strategy;
-   Init_Random : constant := 10;
-
-   -- End --
-
-   In_File_Name  : constant String := "testzlib.in";
-   --  Name of the input file
-
-   Z_File_Name   : constant String := "testzlib.zlb";
-   --  Name of the compressed file.
-
-   Out_File_Name : constant String := "testzlib.out";
-   --  Name of the decompressed file.
-
-   File_In   : File_Type;
-   File_Out  : File_Type;
-   File_Back : File_Type;
-   File_Z    : ZLib.Streams.Stream_Type;
-
-   Filter : ZLib.Filter_Type;
-
-   Time_Stamp : Ada.Calendar.Time;
-
-   procedure Generate_File;
-   --  Generate file of spetsified size with some random data.
-   --  The random data is repeatable, for the good compression.
-
-   procedure Compare_Streams
-     (Left, Right : in out Root_Stream_Type'Class);
-   --  The procedure compearing data in 2 streams.
-   --  It is for compare data before and after compression/decompression.
-
-   procedure Compare_Files (Left, Right : String);
-   --  Compare files. Based on the Compare_Streams.
-
-   procedure Copy_Streams
-     (Source, Target : in out Root_Stream_Type'Class;
-      Buffer_Size    : in     Stream_Element_Offset := 1024);
-   --  Copying data from one stream to another. It is for test stream
-   --  interface of the library.
-
-   procedure Data_In
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Generic_Translate.
-   --  reading data from the File_In.
-
-   procedure Data_Out (Item : in Stream_Element_Array);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Generic_Translate.
-   --  writing data to the File_Out.
-
-   procedure Stamp;
-   --  Store the timestamp to the local variable.
-
-   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);
-   --  Print the time statistic with the message.
-
-   procedure Translate is new ZLib.Generic_Translate
-                                (Data_In  => Data_In,
-                                 Data_Out => Data_Out);
-   --  This procedure is moving data from File_In to File_Out
-   --  with compression or decompression, depend on initialization of
-   --  Filter parameter.
-
-   -------------------
-   -- Compare_Files --
-   -------------------
-
-   procedure Compare_Files (Left, Right : String) is
-      Left_File, Right_File : File_Type;
-   begin
-      Open (Left_File, In_File, Left);
-      Open (Right_File, In_File, Right);
-      Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);
-      Close (Left_File);
-      Close (Right_File);
-   end Compare_Files;
-
-   ---------------------
-   -- Compare_Streams --
-   ---------------------
-
-   procedure Compare_Streams
-     (Left, Right : in out Ada.Streams.Root_Stream_Type'Class)
-   is
-      Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);
-      Left_Last, Right_Last : Stream_Element_Offset;
-   begin
-      loop
-         Read (Left, Left_Buffer, Left_Last);
-         Read (Right, Right_Buffer, Right_Last);
-
-         if Left_Last /= Right_Last then
-            Ada.Text_IO.Put_Line ("Compare error :"
-              & Stream_Element_Offset'Image (Left_Last)
-              & " /= "
-              & Stream_Element_Offset'Image (Right_Last));
-
-            raise Constraint_Error;
-
-         elsif Left_Buffer (0 .. Left_Last)
-               /= Right_Buffer (0 .. Right_Last)
-         then
-            Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal.");
-            raise Constraint_Error;
-
-         end if;
-
-         exit when Left_Last < Left_Buffer'Last;
-      end loop;
-   end Compare_Streams;
-
-   ------------------
-   -- Copy_Streams --
-   ------------------
-
-   procedure Copy_Streams
-     (Source, Target : in out Ada.Streams.Root_Stream_Type'Class;
-      Buffer_Size    : in     Stream_Element_Offset := 1024)
-   is
-      Buffer : Stream_Element_Array (1 .. Buffer_Size);
-      Last   : Stream_Element_Offset;
-   begin
-      loop
-         Read  (Source, Buffer, Last);
-         Write (Target, Buffer (1 .. Last));
-
-         exit when Last < Buffer'Last;
-      end loop;
-   end Copy_Streams;
-
-   -------------
-   -- Data_In --
-   -------------
-
-   procedure Data_In
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset) is
-   begin
-      Read (File_In, Item, Last);
-   end Data_In;
-
-   --------------
-   -- Data_Out --
-   --------------
-
-   procedure Data_Out (Item : in Stream_Element_Array) is
-   begin
-      Write (File_Out, Item);
-   end Data_Out;
-
-   -------------------
-   -- Generate_File --
-   -------------------
-
-   procedure Generate_File is
-      subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
-
-      package Random_Elements is
-         new Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-      Gen    : Random_Elements.Generator;
-      Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;
-
-      Buffer_Count : constant Count := File_Size / Buffer'Length;
-      --  Number of same buffers in the packet.
-
-      Density : constant Count := 30; --  from 0 to Buffer'Length - 2;
-
-      procedure Fill_Buffer (J, D : in Count);
-      --  Change the part of the buffer.
-
-      -----------------
-      -- Fill_Buffer --
-      -----------------
-
-      procedure Fill_Buffer (J, D : in Count) is
-      begin
-         for K in 0 .. D loop
-            Buffer
-              (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))
-             := Random_Elements.Random (Gen);
-
-         end loop;
-      end Fill_Buffer;
-
-   begin
-      Random_Elements.Reset (Gen, Init_Random);
-
-      Create (File_In, Out_File, In_File_Name);
-
-      Fill_Buffer (1, Buffer'Length - 2);
-
-      for J in 1 .. Buffer_Count loop
-         Write (File_In, Buffer);
-
-         Fill_Buffer (J, Density);
-      end loop;
-
-      --  fill remain size.
-
-      Write
-        (File_In,
-         Buffer
-           (1 .. Stream_Element_Offset
-                   (File_Size - Buffer'Length * Buffer_Count)));
-
-      Flush (File_In);
-      Close (File_In);
-   end Generate_File;
-
-   ---------------------
-   -- Print_Statistic --
-   ---------------------
-
-   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is
-      use Ada.Calendar;
-      use Ada.Text_IO;
-
-      package Count_IO is new Integer_IO (ZLib.Count);
-
-      Curr_Dur : Duration := Clock - Time_Stamp;
-   begin
-      Put (Msg);
-
-      Set_Col (20);
-      Ada.Text_IO.Put ("size =");
-
-      Count_IO.Put
-        (Data_Size,
-         Width => Stream_IO.Count'Image (File_Size)'Length);
-
-      Put_Line (" duration =" & Duration'Image (Curr_Dur));
-   end Print_Statistic;
-
-   -----------
-   -- Stamp --
-   -----------
-
-   procedure Stamp is
-   begin
-      Time_Stamp := Ada.Calendar.Clock;
-   end Stamp;
-
-begin
-   Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
-
-   loop
-      Generate_File;
-
-      for Level in ZLib.Compression_Level'Range loop
-
-         Ada.Text_IO.Put_Line ("Level ="
-            & ZLib.Compression_Level'Image (Level));
-
-         --  Test generic interface.
-         Open   (File_In, In_File, In_File_Name);
-         Create (File_Out, Out_File, Z_File_Name);
-
-         Stamp;
-
-         --  Deflate using generic instantiation.
-
-         ZLib.Deflate_Init
-               (Filter   => Filter,
-                Level    => Level,
-                Strategy => Strategy,
-                Header   => Header);
-
-         Translate (Filter);
-         Print_Statistic ("Generic compress", ZLib.Total_Out (Filter));
-         ZLib.Close (Filter);
-
-         Close (File_In);
-         Close (File_Out);
-
-         Open   (File_In, In_File, Z_File_Name);
-         Create (File_Out, Out_File, Out_File_Name);
-
-         Stamp;
-
-         --  Inflate using generic instantiation.
-
-         ZLib.Inflate_Init (Filter, Header => Header);
-
-         Translate (Filter);
-         Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter));
-
-         ZLib.Close (Filter);
-
-         Close (File_In);
-         Close (File_Out);
-
-         Compare_Files (In_File_Name, Out_File_Name);
-
-         --  Test stream interface.
-
-         --  Compress to the back stream.
-
-         Open   (File_In, In_File, In_File_Name);
-         Create (File_Back, Out_File, Z_File_Name);
-
-         Stamp;
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.Out_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => True,
-            Level           => Level,
-            Strategy        => Strategy,
-            Header          => Header);
-
-         Copy_Streams
-           (Source => Stream (File_In).all,
-            Target => File_Z);
-
-         --  Flushing internal buffers to the back stream.
-
-         ZLib.Streams.Flush (File_Z, ZLib.Finish);
-
-         Print_Statistic ("Write compress",
-                          ZLib.Streams.Write_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-
-         Close (File_In);
-         Close (File_Back);
-
-         --  Compare reading from original file and from
-         --  decompression stream.
-
-         Open (File_In,   In_File, In_File_Name);
-         Open (File_Back, In_File, Z_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.In_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => True,
-            Header          => Header);
-
-         Stamp;
-         Compare_Streams (Stream (File_In).all, File_Z);
-
-         Print_Statistic ("Read decompress",
-                          ZLib.Streams.Read_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-         Close (File_In);
-         Close (File_Back);
-
-         --  Compress by reading from compression stream.
-
-         Open (File_Back, In_File, In_File_Name);
-         Create (File_Out, Out_File, Z_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.In_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => False,
-            Level           => Level,
-            Strategy        => Strategy,
-            Header          => Header);
-
-         Stamp;
-         Copy_Streams
-           (Source => File_Z,
-            Target => Stream (File_Out).all);
-
-         Print_Statistic ("Read compress",
-                          ZLib.Streams.Read_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-
-         Close (File_Out);
-         Close (File_Back);
-
-         --  Decompress to decompression stream.
-
-         Open   (File_In,   In_File, Z_File_Name);
-         Create (File_Back, Out_File, Out_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.Out_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => False,
-            Header          => Header);
-
-         Stamp;
-
-         Copy_Streams
-           (Source => Stream (File_In).all,
-            Target => File_Z);
-
-         Print_Statistic ("Write decompress",
-                          ZLib.Streams.Write_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-         Close (File_In);
-         Close (File_Back);
-
-         Compare_Files (In_File_Name, Out_File_Name);
-      end loop;
-
-      Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok.");
-
-      exit when not Continuous;
-
-      File_Size := File_Size + 1;
-   end loop;
-end Test;
diff --git a/tkimg1.3/libz/contrib/ada/zlib-streams.adb b/tkimg1.3/libz/contrib/ada/zlib-streams.adb
deleted file mode 100644
index dc6a285..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib-streams.adb
+++ /dev/null
@@ -1,215 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-streams.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-with Ada.Unchecked_Deallocation;
-
-package body ZLib.Streams is
-
-   -----------
-   -- Close --
-   -----------
-
-   procedure Close (Stream : in out Stream_Type) is
-      procedure Free is new Ada.Unchecked_Deallocation
-         (Stream_Element_Array, Buffer_Access);
-   begin
-      if Stream.Mode = Out_Stream or Stream.Mode = Duplex then
-         --  We should flush the data written by the writer.
-
-         Flush (Stream, Finish);
-
-         Close (Stream.Writer);
-      end if;
-
-      if Stream.Mode = In_Stream or Stream.Mode = Duplex then
-         Close (Stream.Reader);
-         Free (Stream.Buffer);
-      end if;
-   end Close;
-
-   ------------
-   -- Create --
-   ------------
-
-   procedure Create
-     (Stream            :    out Stream_Type;
-      Mode              : in     Stream_Mode;
-      Back              : in     Stream_Access;
-      Back_Compressed   : in     Boolean;
-      Level             : in     Compression_Level := Default_Compression;
-      Strategy          : in     Strategy_Type     := Default_Strategy;
-      Header            : in     Header_Type       := Default;
-      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size;
-      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size)
-   is
-
-      subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size);
-
-      procedure Init_Filter
-         (Filter   : in out Filter_Type;
-          Compress : in     Boolean);
-
-      -----------------
-      -- Init_Filter --
-      -----------------
-
-      procedure Init_Filter
-         (Filter   : in out Filter_Type;
-          Compress : in     Boolean) is
-      begin
-         if Compress then
-            Deflate_Init
-              (Filter, Level, Strategy, Header => Header);
-         else
-            Inflate_Init (Filter, Header => Header);
-         end if;
-      end Init_Filter;
-
-   begin
-      Stream.Back := Back;
-      Stream.Mode := Mode;
-
-      if Mode = Out_Stream or Mode = Duplex then
-         Init_Filter (Stream.Writer, Back_Compressed);
-         Stream.Buffer_Size := Write_Buffer_Size;
-      else
-         Stream.Buffer_Size := 0;
-      end if;
-
-      if Mode = In_Stream or Mode = Duplex then
-         Init_Filter (Stream.Reader, not Back_Compressed);
-
-         Stream.Buffer     := new Buffer_Subtype;
-         Stream.Rest_First := Stream.Buffer'Last + 1;
-      end if;
-   end Create;
-
-   -----------
-   -- Flush --
-   -----------
-
-   procedure Flush
-     (Stream : in out Stream_Type;
-      Mode   : in     Flush_Mode := Sync_Flush)
-   is
-      Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size);
-      Last   : Stream_Element_Offset;
-   begin
-      loop
-         Flush (Stream.Writer, Buffer, Last, Mode);
-
-         Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last));
-
-         exit when Last < Buffer'Last;
-      end loop;
-   end Flush;
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Stream : in out Stream_Type;
-      Item   :    out Stream_Element_Array;
-      Last   :    out Stream_Element_Offset)
-   is
-
-      procedure Read
-        (Item : out Stream_Element_Array;
-         Last : out Stream_Element_Offset);
-
-      ----------
-      -- Read --
-      ----------
-
-      procedure Read
-        (Item : out Stream_Element_Array;
-         Last : out Stream_Element_Offset) is
-      begin
-         Ada.Streams.Read (Stream.Back.all, Item, Last);
-      end Read;
-
-      procedure Read is new ZLib.Read
-         (Read       => Read,
-          Buffer     => Stream.Buffer.all,
-          Rest_First => Stream.Rest_First,
-          Rest_Last  => Stream.Rest_Last);
-
-   begin
-      Read (Stream.Reader, Item, Last);
-   end Read;
-
-   -------------------
-   -- Read_Total_In --
-   -------------------
-
-   function Read_Total_In (Stream : in Stream_Type) return Count is
-   begin
-      return Total_In (Stream.Reader);
-   end Read_Total_In;
-
-   --------------------
-   -- Read_Total_Out --
-   --------------------
-
-   function Read_Total_Out (Stream : in Stream_Type) return Count is
-   begin
-      return Total_Out (Stream.Reader);
-   end Read_Total_Out;
-
-   -----------
-   -- Write --
-   -----------
-
-   procedure Write
-     (Stream : in out Stream_Type;
-      Item   : in     Stream_Element_Array)
-   is
-
-      procedure Write (Item : in Stream_Element_Array);
-
-      -----------
-      -- Write --
-      -----------
-
-      procedure Write (Item : in Stream_Element_Array) is
-      begin
-         Ada.Streams.Write (Stream.Back.all, Item);
-      end Write;
-
-      procedure Write is new ZLib.Write
-         (Write       => Write,
-          Buffer_Size => Stream.Buffer_Size);
-
-   begin
-      Write (Stream.Writer, Item, No_Flush);
-   end Write;
-
-   --------------------
-   -- Write_Total_In --
-   --------------------
-
-   function Write_Total_In (Stream : in Stream_Type) return Count is
-   begin
-      return Total_In (Stream.Writer);
-   end Write_Total_In;
-
-   ---------------------
-   -- Write_Total_Out --
-   ---------------------
-
-   function Write_Total_Out (Stream : in Stream_Type) return Count is
-   begin
-      return Total_Out (Stream.Writer);
-   end Write_Total_Out;
-
-end ZLib.Streams;
diff --git a/tkimg1.3/libz/contrib/ada/zlib-streams.ads b/tkimg1.3/libz/contrib/ada/zlib-streams.ads
deleted file mode 100644
index 012e28e..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib-streams.ads
+++ /dev/null
@@ -1,112 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-streams.ads,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package ZLib.Streams is
-
-   type Stream_Mode is (In_Stream, Out_Stream, Duplex);
-
-   type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
-
-   type Stream_Type is
-      new Ada.Streams.Root_Stream_Type with private;
-
-   procedure Read
-     (Stream : in out Stream_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset);
-
-   procedure Write
-     (Stream : in out Stream_Type;
-      Item   : in     Ada.Streams.Stream_Element_Array);
-
-   procedure Flush
-     (Stream : in out Stream_Type;
-      Mode   : in     Flush_Mode := Sync_Flush);
-   --  Flush the written data to the back stream,
-   --  all data placed to the compressor is flushing to the Back stream.
-   --  Should not be used untill necessary, becouse it is decreasing
-   --  compression.
-
-   function Read_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_In);
-   --  Return total number of bytes read from back stream so far.
-
-   function Read_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_Out);
-   --  Return total number of bytes read so far.
-
-   function Write_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_In);
-   --  Return total number of bytes written so far.
-
-   function Write_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_Out);
-   --  Return total number of bytes written to the back stream.
-
-   procedure Create
-     (Stream            :    out Stream_Type;
-      Mode              : in     Stream_Mode;
-      Back              : in     Stream_Access;
-      Back_Compressed   : in     Boolean;
-      Level             : in     Compression_Level := Default_Compression;
-      Strategy          : in     Strategy_Type     := Default_Strategy;
-      Header            : in     Header_Type       := Default;
-      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size;
-      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size);
-   --  Create the Comression/Decompression stream.
-   --  If mode is In_Stream then Write operation is disabled.
-   --  If mode is Out_Stream then Read operation is disabled.
-
-   --  If Back_Compressed is true then
-   --  Data written to the Stream is compressing to the Back stream
-   --  and data read from the Stream is decompressed data from the Back stream.
-
-   --  If Back_Compressed is false then
-   --  Data written to the Stream is decompressing to the Back stream
-   --  and data read from the Stream is compressed data from the Back stream.
-
-   --  !!! When the Need_Header is False ZLib-Ada is using undocumented
-   --  ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
-
-   procedure Close (Stream : in out Stream_Type);
-
-private
-
-   use Ada.Streams;
-
-   type Buffer_Access is access all Stream_Element_Array;
-
-   type Stream_Type
-     is new Root_Stream_Type with
-   record
-      Mode       : Stream_Mode;
-
-      Buffer     : Buffer_Access;
-      Rest_First : Stream_Element_Offset;
-      Rest_Last  : Stream_Element_Offset;
-      --  Buffer for Read operation.
-      --  We need to have this buffer in the record
-      --  becouse not all read data from back stream
-      --  could be processed during the read operation.
-
-      Buffer_Size : Stream_Element_Offset;
-      --  Buffer size for write operation.
-      --  We do not need to have this buffer
-      --  in the record becouse all data could be
-      --  processed in the write operation.
-
-      Back       : Stream_Access;
-      Reader     : Filter_Type;
-      Writer     : Filter_Type;
-   end record;
-
-end ZLib.Streams;
diff --git a/tkimg1.3/libz/contrib/ada/zlib-thin.adb b/tkimg1.3/libz/contrib/ada/zlib-thin.adb
deleted file mode 100644
index 11ce00d..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib-thin.adb
+++ /dev/null
@@ -1,185 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-thin.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package body ZLib.Thin is
-
-   ZLIB_VERSION : constant Chars_Ptr :=
-      Interfaces.C.Strings.New_String ("1.1.4");
-
-   Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
-
-   --------------
-   -- Avail_In --
-   --------------
-
-   function Avail_In (Strm : in Z_Stream) return UInt is
-   begin
-      return Strm.Avail_In;
-   end Avail_In;
-
-   ---------------
-   -- Avail_Out --
-   ---------------
-
-   function Avail_Out (Strm : in Z_Stream) return UInt is
-   begin
-      return Strm.Avail_Out;
-   end Avail_Out;
-
-   ------------------
-   -- Deflate_Init --
-   ------------------
-
-   function Deflate_Init
-     (strm  : in Z_Streamp;
-      level : in Int := Z_DEFAULT_COMPRESSION)
-      return  Int is
-   begin
-      return deflateInit (strm, level, ZLIB_VERSION, Z_Stream_Size);
-   end Deflate_Init;
-
-   function Deflate_Init
-     (strm       : Z_Streamp;
-      level      : Int;
-      method     : Int;
-      windowBits : Int;
-      memLevel   : Int;
-      strategy   : Int)
-      return       Int is
-   begin
-      return deflateInit2
-               (strm,
-                level,
-                method,
-                windowBits,
-                memLevel,
-                strategy,
-                ZLIB_VERSION,
-                Z_Stream_Size);
-   end Deflate_Init;
-
-   ------------------
-   -- Inflate_Init --
-   ------------------
-
-   function Inflate_Init (strm : Z_Streamp) return Int is
-   begin
-      return inflateInit (strm, ZLIB_VERSION, Z_Stream_Size);
-   end Inflate_Init;
-
-   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
-   begin
-      return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
-   end Inflate_Init;
-
-   function Last_Error_Message (Strm : in Z_Stream) return String is
-      use Interfaces.C.Strings;
-   begin
-      if Strm.msg = Null_Ptr then
-         return "";
-      else
-         return Value (Strm.msg);
-      end if;
-   end Last_Error_Message;
-
-   -------------
-   -- Need_In --
-   -------------
-
-   function Need_In (strm : Z_Stream) return Boolean is
-   begin
-      return strm.Avail_In = 0;
-   end Need_In;
-
-   --------------
-   -- Need_Out --
-   --------------
-
-   function Need_Out (strm : Z_Stream) return Boolean is
-   begin
-      return strm.Avail_Out = 0;
-   end Need_Out;
-
-   ------------
-   -- Set_In --
-   ------------
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt) is
-   begin
-      Strm.Next_In  := Buffer;
-      Strm.Avail_In := Size;
-   end Set_In;
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt) is
-   begin
-      Set_In (Strm, Bytes.To_Pointer (Buffer), Size);
-   end Set_In;
-
-   ------------------
-   -- Set_Mem_Func --
-   ------------------
-
-   procedure Set_Mem_Func
-     (Strm   : in out Z_Stream;
-      Opaque : in Voidp;
-      Alloc  : in alloc_func;
-      Free   : in free_func) is
-   begin
-      Strm.opaque := Opaque;
-      Strm.zalloc := Alloc;
-      Strm.zfree  := Free;
-   end Set_Mem_Func;
-
-   -------------
-   -- Set_Out --
-   -------------
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt) is
-   begin
-      Strm.Next_Out  := Buffer;
-      Strm.Avail_Out := Size;
-   end Set_Out;
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt) is
-   begin
-      Set_Out (Strm, Bytes.To_Pointer (Buffer), Size);
-   end Set_Out;
-
-   --------------
-   -- Total_In --
-   --------------
-
-   function Total_In (Strm : in Z_Stream) return ULong is
-   begin
-      return Strm.Total_In;
-   end Total_In;
-
-   ---------------
-   -- Total_Out --
-   ---------------
-
-   function Total_Out (Strm : in Z_Stream) return ULong is
-   begin
-      return Strm.Total_Out;
-   end Total_Out;
-
-end ZLib.Thin;
diff --git a/tkimg1.3/libz/contrib/ada/zlib-thin.ads b/tkimg1.3/libz/contrib/ada/zlib-thin.ads
deleted file mode 100644
index d994eb7..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib-thin.ads
+++ /dev/null
@@ -1,485 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-thin.ads,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-with Interfaces.C.Strings;
-with System.Address_To_Access_Conversions;
-
-private package ZLib.Thin is
-
-   --  From zconf.h
-
-   MAX_MEM_LEVEL : constant := 9;         --  zconf.h:105
-                                          --  zconf.h:105
-   MAX_WBITS : constant := 15;      --  zconf.h:115
-                                    --  32K LZ77 window
-                                    --  zconf.h:115
-   SEEK_SET : constant := 8#0000#;  --  zconf.h:244
-                                    --  Seek from beginning of file.
-                                    --  zconf.h:244
-   SEEK_CUR : constant := 1;        --  zconf.h:245
-                                    --  Seek from current position.
-                                    --  zconf.h:245
-   SEEK_END : constant := 2;        --  zconf.h:246
-                                    --  Set file pointer to EOF plus "offset"
-                                    --  zconf.h:246
-
-   type Byte is new Interfaces.C.unsigned_char; --  8 bits
-                                                --  zconf.h:214
-   type UInt is new Interfaces.C.unsigned;      --  16 bits or more
-                                                --  zconf.h:216
-   type Int is new Interfaces.C.int;
-
-   type ULong is new Interfaces.C.unsigned;     --  32 bits or more
-                                                --  zconf.h:217
-   subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
-
-   type ULong_Access is access ULong;
-   type Int_Access is access Int;
-   subtype Voidp is System.Address;            --  zconf.h:232
-
-   package Bytes is new System.Address_To_Access_Conversions (Byte);
-
-   subtype Byte_Access is Bytes.Object_Pointer;
-
-   --  end from zconf
-
-   Z_NO_FLUSH : constant := 8#0000#;   --  zlib.h:125
-                                       --  zlib.h:125
-   Z_PARTIAL_FLUSH : constant := 1;       --  zlib.h:126
-                                          --  will be removed, use
-                                          --  Z_SYNC_FLUSH instead
-                                          --  zlib.h:126
-   Z_SYNC_FLUSH : constant := 2;       --  zlib.h:127
-                                       --  zlib.h:127
-   Z_FULL_FLUSH : constant := 3;       --  zlib.h:128
-                                       --  zlib.h:128
-   Z_FINISH : constant := 4;        --  zlib.h:129
-                                    --  zlib.h:129
-   Z_OK : constant := 8#0000#;   --  zlib.h:132
-                                 --  zlib.h:132
-   Z_STREAM_END : constant := 1;       --  zlib.h:133
-                                       --  zlib.h:133
-   Z_NEED_DICT : constant := 2;        --  zlib.h:134
-                                       --  zlib.h:134
-   Z_ERRNO : constant := -1;        --  zlib.h:135
-                                    --  zlib.h:135
-   Z_STREAM_ERROR : constant := -2;       --  zlib.h:136
-                                          --  zlib.h:136
-   Z_DATA_ERROR : constant := -3;      --  zlib.h:137
-                                       --  zlib.h:137
-   Z_MEM_ERROR : constant := -4;       --  zlib.h:138
-                                       --  zlib.h:138
-   Z_BUF_ERROR : constant := -5;       --  zlib.h:139
-                                       --  zlib.h:139
-   Z_VERSION_ERROR : constant := -6;      --  zlib.h:140
-                                          --  zlib.h:140
-   Z_NO_COMPRESSION : constant := 8#0000#;   --  zlib.h:145
-                                             --  zlib.h:145
-   Z_BEST_SPEED : constant := 1;       --  zlib.h:146
-                                       --  zlib.h:146
-   Z_BEST_COMPRESSION : constant := 9;       --  zlib.h:147
-                                             --  zlib.h:147
-   Z_DEFAULT_COMPRESSION : constant := -1;      --  zlib.h:148
-                                                --  zlib.h:148
-   Z_FILTERED : constant := 1;      --  zlib.h:151
-                                    --  zlib.h:151
-   Z_HUFFMAN_ONLY : constant := 2;        --  zlib.h:152
-                                          --  zlib.h:152
-   Z_DEFAULT_STRATEGY : constant := 8#0000#; --  zlib.h:153
-                                             --  zlib.h:153
-   Z_BINARY : constant := 8#0000#;  --  zlib.h:156
-                                    --  zlib.h:156
-   Z_ASCII : constant := 1;      --  zlib.h:157
-                                 --  zlib.h:157
-   Z_UNKNOWN : constant := 2;       --  zlib.h:158
-                                    --  zlib.h:158
-   Z_DEFLATED : constant := 8;      --  zlib.h:161
-                                    --  zlib.h:161
-   Z_NULL : constant := 8#0000#; --  zlib.h:164
-                                 --  for initializing zalloc, zfree, opaque
-                                 --  zlib.h:164
-   type gzFile is new Voidp;                  --  zlib.h:646
-
-   type Z_Stream is private;
-
-   type Z_Streamp is access all Z_Stream;     --  zlib.h:89
-
-   type alloc_func is access function
-     (Opaque : Voidp;
-      Items  : UInt;
-      Size   : UInt)
-      return Voidp; --  zlib.h:63
-
-   type free_func is access procedure (opaque : Voidp; address : Voidp);
-
-   function zlibVersion return Chars_Ptr;
-
-   function Deflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function DeflateEnd (strm : Z_Streamp) return Int;
-
-   function Inflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function InflateEnd (strm : Z_Streamp) return Int;
-
-   function deflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int;
-
-   function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
-   --  zlib.h:478
-
-   function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
-
-   function deflateParams
-     (strm     : Z_Streamp;
-      level    : Int;
-      strategy : Int)
-      return     Int;       -- zlib.h:506
-
-   function inflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int; --  zlib.h:548
-
-   function inflateSync (strm : Z_Streamp) return Int;  --  zlib.h:565
-
-   function inflateReset (strm : Z_Streamp) return Int; --  zlib.h:580
-
-   function compress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;           -- zlib.h:601
-
-   function compress2
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong;
-      level     : Int)
-      return      Int;          -- zlib.h:615
-
-   function uncompress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;
-
-   function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
-
-   function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
-
-   function gzsetparams
-     (file     : gzFile;
-      level    : Int;
-      strategy : Int)
-      return     Int;
-
-   function gzread
-     (file : gzFile;
-      buf  : Voidp;
-      len  : UInt)
-      return Int;
-
-   function gzwrite
-     (file : in gzFile;
-      buf  : in Voidp;
-      len  : in UInt)
-      return Int;
-
-   function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
-
-   function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
-
-   function gzgets
-     (file : gzFile;
-      buf  : Chars_Ptr;
-      len  : Int)
-      return Chars_Ptr;
-
-   function gzputc (file : gzFile; char : Int) return Int;
-
-   function gzgetc (file : gzFile) return Int;
-
-   function gzflush (file : gzFile; flush : Int) return Int;
-
-   function gzseek
-     (file   : gzFile;
-      offset : Int;
-      whence : Int)
-      return   Int;
-
-   function gzrewind (file : gzFile) return Int;
-
-   function gztell (file : gzFile) return Int;
-
-   function gzeof (file : gzFile) return Int;
-
-   function gzclose (file : gzFile) return Int;
-
-   function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
-
-   function adler32
-     (adler : ULong;
-      buf   : Byte_Access;
-      len   : UInt)
-      return  ULong;
-
-   function crc32
-     (crc  : ULong;
-      buf  : Byte_Access;
-      len  : UInt)
-      return ULong;
-
-   function deflateInit
-     (strm        : Z_Streamp;
-      level       : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function Deflate_Init
-     (strm  : in Z_Streamp;
-      level : in Int := Z_DEFAULT_COMPRESSION)
-      return  Int;
-   pragma Inline (Deflate_Init);
-
-   function deflateInit2
-     (strm        : Z_Streamp;
-      level       : Int;
-      method      : Int;
-      windowBits  : Int;
-      memLevel    : Int;
-      strategy    : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function Deflate_Init
-     (strm       : Z_Streamp;
-      level      : Int;
-      method     : Int;
-      windowBits : Int;
-      memLevel   : Int;
-      strategy   : Int)
-      return       Int;
-   pragma Inline (Deflate_Init);
-
-   function inflateInit
-     (strm        : Z_Streamp;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function Inflate_Init (strm : Z_Streamp) return Int;
-   pragma Inline (Inflate_Init);
-
-   function inflateInit2
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-
-   function inflateBackInit
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      window      : in Byte_Access;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-   --  Size of window have to be 2**windowBits.
-
-   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
-   pragma Inline (Inflate_Init);
-
-   function zError (err : Int) return Chars_Ptr;
-
-   function inflateSyncPoint (z : Z_Streamp) return Int;
-
-   function get_crc_table return ULong_Access;
-
-   --  Interface to the available fields of the z_stream structure.
-   --  The application must update next_in and avail_in when avail_in has
-   --  dropped to zero. It must update next_out and avail_out when avail_out
-   --  has dropped to zero. The application must initialize zalloc, zfree and
-   --  opaque before calling the init function.
-
-   function Need_In (strm : in Z_Stream) return Boolean;
-   --  return true when we do not need to setup Next_In and Avail_In fields.
-   pragma Inline (Need_In);
-
-   function Need_Out (strm : in Z_Stream) return Boolean;
-   --  return true when we do not need to setup Next_Out and Avail_Out field.
-   pragma Inline (Need_Out);
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt);
-   pragma Inline (Set_In);
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_In);
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt);
-   pragma Inline (Set_Out);
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_Out);
-
-   procedure Set_Mem_Func
-     (Strm   : in out Z_Stream;
-      Opaque : in Voidp;
-      Alloc  : in alloc_func;
-      Free   : in free_func);
-   pragma Inline (Set_Mem_Func);
-
-   function Last_Error_Message (Strm : in Z_Stream) return String;
-   pragma Inline (Last_Error_Message);
-
-   function Avail_Out (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_Out);
-
-   function Avail_In (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_In);
-
-   function Total_In (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_In);
-
-   function Total_Out (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_Out);
-
-   function inflateCopy
-     (dest   : in Z_Streamp;
-      Source : in Z_Streamp)
-      return Int;
-
-   function compressBound (Source_Len : in ULong) return ULong;
-
-   function deflateBound
-     (Strm       : in Z_Streamp;
-      Source_Len : in ULong)
-      return     ULong;
-
-   function gzungetc (C : in Int; File : in  gzFile) return Int;
-
-   function zlibCompileFlags return ULong;
-
-   function deflatePrime
-     (strm     : Z_Streamp;
-      bits     : Int;
-      value    : Int)
-      return     Int;
-
-private
-
-   type Z_Stream is record            -- zlib.h:68
-      Next_In   : Byte_Access;        -- next input byte
-      Avail_In  : UInt       := 0;    -- number of bytes available at next_in
-      Total_In  : ULong      := 0;    -- total nb of input bytes read so far
-      Next_Out  : Byte_Access;        -- next output byte should be put there
-      Avail_Out : UInt       := 0;    -- remaining free space at next_out
-      Total_Out : ULong      := 0;    -- total nb of bytes output so far
-      msg       : Chars_Ptr;          -- last error message, NULL if no error
-      state     : Voidp;              -- not visible by applications
-      zalloc    : alloc_func := null; -- used to allocate the internal state
-      zfree     : free_func  := null; -- used to free the internal state
-      opaque    : Voidp;              -- private data object passed to
-                                      --  zalloc and zfree
-      data_type : Int;                -- best guess about the data type:
-                                      --  ascii or binary
-      adler     : ULong;              -- adler32 value of the uncompressed
-                                      --  data
-      reserved  : ULong;              -- reserved for future use
-   end record;
-
-   pragma Convention (C, Z_Stream);
-
-   pragma Import (C, zlibVersion, "zlibVersion");
-   pragma Import (C, Deflate, "deflate");
-   pragma Import (C, DeflateEnd, "deflateEnd");
-   pragma Import (C, Inflate, "inflate");
-   pragma Import (C, InflateEnd, "inflateEnd");
-   pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
-   pragma Import (C, deflateCopy, "deflateCopy");
-   pragma Import (C, deflateReset, "deflateReset");
-   pragma Import (C, deflateParams, "deflateParams");
-   pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
-   pragma Import (C, inflateSync, "inflateSync");
-   pragma Import (C, inflateReset, "inflateReset");
-   pragma Import (C, compress, "compress");
-   pragma Import (C, compress2, "compress2");
-   pragma Import (C, uncompress, "uncompress");
-   pragma Import (C, gzopen, "gzopen");
-   pragma Import (C, gzdopen, "gzdopen");
-   pragma Import (C, gzsetparams, "gzsetparams");
-   pragma Import (C, gzread, "gzread");
-   pragma Import (C, gzwrite, "gzwrite");
-   pragma Import (C, gzprintf, "gzprintf");
-   pragma Import (C, gzputs, "gzputs");
-   pragma Import (C, gzgets, "gzgets");
-   pragma Import (C, gzputc, "gzputc");
-   pragma Import (C, gzgetc, "gzgetc");
-   pragma Import (C, gzflush, "gzflush");
-   pragma Import (C, gzseek, "gzseek");
-   pragma Import (C, gzrewind, "gzrewind");
-   pragma Import (C, gztell, "gztell");
-   pragma Import (C, gzeof, "gzeof");
-   pragma Import (C, gzclose, "gzclose");
-   pragma Import (C, gzerror, "gzerror");
-   pragma Import (C, adler32, "adler32");
-   pragma Import (C, crc32, "crc32");
-   pragma Import (C, deflateInit, "deflateInit_");
-   pragma Import (C, inflateInit, "inflateInit_");
-   pragma Import (C, deflateInit2, "deflateInit2_");
-   pragma Import (C, inflateInit2, "inflateInit2_");
-   pragma Import (C, zError, "zError");
-   pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
-   pragma Import (C, get_crc_table, "get_crc_table");
-
-   --  added in zlib 1.2.1:
-
-   pragma Import (C, inflateCopy, "inflateCopy");
-   pragma Import (C, compressBound, "compressBound");
-   pragma Import (C, deflateBound, "deflateBound");
-   pragma Import (C, gzungetc, "gzungetc");
-   pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
-   pragma Import (C, deflatePrime, "deflatePrime");
-
-   pragma Import (C, inflateBackInit, "inflateBackInit_");
-
-   --  I stopped binding the inflateBack routines, becouse realize that
-   --  it does not support zlib and gzip headers for now, and have no
-   --  symmetric deflateBack routines.
-   --  ZLib-Ada is symmetric regarding deflate/inflate data transformation
-   --  and has a similar generic callback interface for the
-   --  deflate/inflate transformation based on the regular Deflate/Inflate
-   --  routines.
-
-   --  pragma Import (C, inflateBack, "inflateBack");
-   --  pragma Import (C, inflateBackEnd, "inflateBackEnd");
-
-end ZLib.Thin;
diff --git a/tkimg1.3/libz/contrib/ada/zlib.adb b/tkimg1.3/libz/contrib/ada/zlib.adb
deleted file mode 100644
index 875bc44..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib.adb
+++ /dev/null
@@ -1,674 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib.adb,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-with Ada.Exceptions;
-with Ada.Unchecked_Conversion;
-with Ada.Unchecked_Deallocation;
-
-with Interfaces.C.Strings;
-
-with ZLib.Thin;
-
-package body ZLib is
-
-   use type Thin.Int;
-
-   type Z_Stream is new Thin.Z_Stream;
-
-   type Return_Code_Enum is
-      (OK,
-       STREAM_END,
-       NEED_DICT,
-       ERRNO,
-       STREAM_ERROR,
-       DATA_ERROR,
-       MEM_ERROR,
-       BUF_ERROR,
-       VERSION_ERROR);
-
-   type Flate_Step_Function is access
-     function (Strm : Thin.Z_Streamp; flush : Thin.Int) return Thin.Int;
-   pragma Convention (C, Flate_Step_Function);
-
-   type Flate_End_Function is access
-      function (Ctrm : in Thin.Z_Streamp) return Thin.Int;
-   pragma Convention (C, Flate_End_Function);
-
-   type Flate_Type is record
-      Step : Flate_Step_Function;
-      Done : Flate_End_Function;
-   end record;
-
-   subtype Footer_Array is Stream_Element_Array (1 .. 8);
-
-   Simple_GZip_Header : constant Stream_Element_Array (1 .. 10)
-     := (16#1f#, 16#8b#,                 --  Magic header
-         16#08#,                         --  Z_DEFLATED
-         16#00#,                         --  Flags
-         16#00#, 16#00#, 16#00#, 16#00#, --  Time
-         16#00#,                         --  XFlags
-         16#03#                          --  OS code
-        );
-   --  The simplest gzip header is not for informational, but just for
-   --  gzip format compatibility.
-   --  Note that some code below is using assumption
-   --  Simple_GZip_Header'Last > Footer_Array'Last, so do not make
-   --  Simple_GZip_Header'Last <= Footer_Array'Last.
-
-   Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum
-     := (0 => OK,
-         1 => STREAM_END,
-         2 => NEED_DICT,
-        -1 => ERRNO,
-        -2 => STREAM_ERROR,
-        -3 => DATA_ERROR,
-        -4 => MEM_ERROR,
-        -5 => BUF_ERROR,
-        -6 => VERSION_ERROR);
-
-   Flate : constant array (Boolean) of Flate_Type
-     := (True  => (Step => Thin.Deflate'Access,
-                   Done => Thin.DeflateEnd'Access),
-         False => (Step => Thin.Inflate'Access,
-                   Done => Thin.InflateEnd'Access));
-
-   Flush_Finish : constant array (Boolean) of Flush_Mode
-     := (True => Finish, False => No_Flush);
-
-   procedure Raise_Error (Stream : Z_Stream);
-   pragma Inline (Raise_Error);
-
-   procedure Raise_Error (Message : String);
-   pragma Inline (Raise_Error);
-
-   procedure Check_Error (Stream : Z_Stream; Code : Thin.Int);
-
-   procedure Free is new Ada.Unchecked_Deallocation
-      (Z_Stream, Z_Stream_Access);
-
-   function To_Thin_Access is new Ada.Unchecked_Conversion
-     (Z_Stream_Access, Thin.Z_Streamp);
-
-   procedure Translate_GZip
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  Separate translate routine for make gzip header.
-
-   procedure Translate_Auto
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  translate routine without additional headers.
-
-   -----------------
-   -- Check_Error --
-   -----------------
-
-   procedure Check_Error (Stream : Z_Stream; Code : Thin.Int) is
-      use type Thin.Int;
-   begin
-      if Code /= Thin.Z_OK then
-         Raise_Error
-            (Return_Code_Enum'Image (Return_Code (Code))
-              & ": " & Last_Error_Message (Stream));
-      end if;
-   end Check_Error;
-
-   -----------
-   -- Close --
-   -----------
-
-   procedure Close
-     (Filter       : in out Filter_Type;
-      Ignore_Error : in     Boolean := False)
-   is
-      Code : Thin.Int;
-   begin
-      Code := Flate (Filter.Compression).Done
-          (To_Thin_Access (Filter.Strm));
-
-      Filter.Opened := False;
-
-      if Ignore_Error or else Code = Thin.Z_OK then
-         Free (Filter.Strm);
-      else
-         declare
-            Error_Message : constant String
-              := Last_Error_Message (Filter.Strm.all);
-         begin
-            Free (Filter.Strm);
-            Ada.Exceptions.Raise_Exception
-               (ZLib_Error'Identity,
-                Return_Code_Enum'Image (Return_Code (Code))
-                & ": " & Error_Message);
-         end;
-      end if;
-   end Close;
-
-   -----------
-   -- CRC32 --
-   -----------
-
-   function CRC32
-     (CRC  : in Unsigned_32;
-      Data : in Ada.Streams.Stream_Element_Array)
-      return Unsigned_32
-   is
-      use Thin;
-   begin
-      return Unsigned_32 (crc32
-        (ULong (CRC),
-         Bytes.To_Pointer (Data'Address),
-         Data'Length));
-   end CRC32;
-
-   procedure CRC32
-     (CRC  : in out Unsigned_32;
-      Data : in     Ada.Streams.Stream_Element_Array) is
-   begin
-      CRC := CRC32 (CRC, Data);
-   end CRC32;
-
-   ------------------
-   -- Deflate_Init --
-   ------------------
-
-   procedure Deflate_Init
-     (Filter       : in out Filter_Type;
-      Level        : in     Compression_Level  := Default_Compression;
-      Strategy     : in     Strategy_Type      := Default_Strategy;
-      Method       : in     Compression_Method := Deflated;
-      Window_Bits  : in     Window_Bits_Type   := 15;
-      Memory_Level : in     Memory_Level_Type  := 8;
-      Header       : in     Header_Type        := Default)
-   is
-      use type Thin.Int;
-      Win_Bits : Thin.Int := Thin.Int (Window_Bits);
-   begin
-      --  We allow ZLib to make header only in case of default header type.
-      --  Otherwise we would either do header by ourselfs, or do not do
-      --  header at all.
-
-      if Header = None or else Header = GZip then
-         Win_Bits := -Win_Bits;
-      end if;
-
-      --  For the GZip CRC calculation and make headers.
-
-      if Header = GZip then
-         Filter.CRC    := 0;
-         Filter.Offset := Simple_GZip_Header'First;
-      else
-         Filter.Offset := Simple_GZip_Header'Last + 1;
-      end if;
-
-      Filter.Strm := new Z_Stream;
-      Filter.Compression := True;
-      Filter.Stream_End  := False;
-      Filter.Opened      := True;
-      Filter.Header      := Header;
-
-      if Thin.Deflate_Init
-           (To_Thin_Access (Filter.Strm),
-            Level      => Thin.Int (Level),
-            method     => Thin.Int (Method),
-            windowBits => Win_Bits,
-            memLevel   => Thin.Int (Memory_Level),
-            strategy   => Thin.Int (Strategy)) /= Thin.Z_OK
-      then
-         Raise_Error (Filter.Strm.all);
-      end if;
-   end Deflate_Init;
-
-   -----------
-   -- Flush --
-   -----------
-
-   procedure Flush
-     (Filter    : in out Filter_Type;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      No_Data : Stream_Element_Array := (1 .. 0 => 0);
-      Last    : Stream_Element_Offset;
-   begin
-      Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush);
-   end Flush;
-
-   -----------------------
-   -- Generic_Translate --
-   -----------------------
-
-   procedure Generic_Translate
-     (Filter : in out ZLib.Filter_Type;
-      In_Buffer_Size  : Integer := Default_Buffer_Size;
-      Out_Buffer_Size : Integer := Default_Buffer_Size)
-   is
-      In_Buffer : Stream_Element_Array
-         (1 .. Stream_Element_Offset (In_Buffer_Size));
-      Out_Buffer : Stream_Element_Array
-        (1 .. Stream_Element_Offset (Out_Buffer_Size));
-      Last : Stream_Element_Offset;
-      In_Last : Stream_Element_Offset;
-      In_First : Stream_Element_Offset;
-      Out_Last : Stream_Element_Offset;
-   begin
-      Main : loop
-         Data_In (In_Buffer, Last);
-
-         In_First := In_Buffer'First;
-
-         loop
-            Translate
-              (Filter,
-               In_Buffer (In_First .. Last),
-               In_Last,
-               Out_Buffer,
-               Out_Last,
-               Flush_Finish (Last < In_Buffer'First));
-
-            Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last));
-
-            exit Main when Stream_End (Filter);
-
-            --  The end of in buffer.
-            exit when In_Last = Last;
-
-            In_First := In_Last + 1;
-         end loop;
-      end loop Main;
-
-   end Generic_Translate;
-
-   ------------------
-   -- Inflate_Init --
-   ------------------
-
-   procedure Inflate_Init
-     (Filter      : in out Filter_Type;
-      Window_Bits : in     Window_Bits_Type := 15;
-      Header      : in     Header_Type      := Default)
-   is
-      use type Thin.Int;
-      Win_Bits : Thin.Int := Thin.Int (Window_Bits);
-
-      procedure Check_Version;
-      --  Check the latest header types compatibility.
-
-      procedure Check_Version is
-      begin
-         if Version <= "1.1.4" then
-            Raise_Error
-              ("Inflate header type " & Header_Type'Image (Header)
-               & " incompatible with ZLib version " & Version);
-         end if;
-      end Check_Version;
-
-   begin
-      case Header is
-         when None =>
-            Check_Version;
-
-            --  Inflate data without headers determined
-            --  by negative Win_Bits.
-
-            Win_Bits := -Win_Bits;
-         when GZip =>
-            Check_Version;
-
-            --  Inflate gzip data defined by flag 16.
-
-            Win_Bits := Win_Bits + 16;
-         when Auto =>
-            Check_Version;
-
-            --  Inflate with automatic detection
-            --  of gzip or native header defined by flag 32.
-
-            Win_Bits := Win_Bits + 32;
-         when Default => null;
-      end case;
-
-      Filter.Strm := new Z_Stream;
-      Filter.Compression := False;
-      Filter.Stream_End  := False;
-      Filter.Opened      := True;
-      Filter.Header      := Header;
-
-      if Thin.Inflate_Init
-         (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK
-      then
-         Raise_Error (Filter.Strm.all);
-      end if;
-   end Inflate_Init;
-
-   -----------------
-   -- Raise_Error --
-   -----------------
-
-   procedure Raise_Error (Message : String) is
-   begin
-      Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message);
-   end Raise_Error;
-
-   procedure Raise_Error (Stream : Z_Stream) is
-   begin
-      Raise_Error (Last_Error_Message (Stream));
-   end Raise_Error;
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Filter : in out Filter_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset)
-   is
-      In_Last    : Stream_Element_Offset;
-      Item_First : Ada.Streams.Stream_Element_Offset := Item'First;
-
-   begin
-      pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1);
-
-      loop
-         if Rest_First > Buffer'Last then
-            Read (Buffer, Rest_Last);
-            Rest_First := Buffer'First;
-         end if;
-
-         pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last);
-
-         Translate
-           (Filter   => Filter,
-            In_Data  => Buffer (Rest_First .. Rest_Last),
-            In_Last  => In_Last,
-            Out_Data => Item (Item_First .. Item'Last),
-            Out_Last => Last,
-            Flush    => Flush_Finish (Rest_Last < Rest_First));
-
-         Rest_First := In_Last + 1;
-
-         exit when Last = Item'Last or else Stream_End (Filter);
-
-         Item_First := Last + 1;
-      end loop;
-   end Read;
-
-   ----------------
-   -- Stream_End --
-   ----------------
-
-   function Stream_End (Filter : in Filter_Type) return Boolean is
-   begin
-      if Filter.Header = GZip and Filter.Compression then
-         return Filter.Stream_End
-            and then Filter.Offset = Footer_Array'Last + 1;
-      else
-         return Filter.Stream_End;
-      end if;
-   end Stream_End;
-
-   --------------
-   -- Total_In --
-   --------------
-
-   function Total_In (Filter : in Filter_Type) return Count is
-   begin
-      return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all));
-   end Total_In;
-
-   ---------------
-   -- Total_Out --
-   ---------------
-
-   function Total_Out (Filter : in Filter_Type) return Count is
-   begin
-      return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all));
-   end Total_Out;
-
-   ---------------
-   -- Translate --
-   ---------------
-
-   procedure Translate
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode) is
-   begin
-      if Filter.Header = GZip and then Filter.Compression then
-         Translate_GZip
-           (Filter   => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-      else
-         Translate_Auto
-           (Filter   => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-      end if;
-   end Translate;
-
-   --------------------
-   -- Translate_Auto --
-   --------------------
-
-   procedure Translate_Auto
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      use type Thin.Int;
-      Code : Thin.Int;
-
-   begin
-      if Filter.Opened = False then
-         raise ZLib_Error;
-      end if;
-
-      if Out_Data'Length = 0 then
-         raise Constraint_Error;
-      end if;
-
-      Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length);
-      Set_In  (Filter.Strm.all, In_Data'Address, In_Data'Length);
-
-      Code := Flate (Filter.Compression).Step
-        (To_Thin_Access (Filter.Strm),
-         Thin.Int (Flush));
-
-      if Code = Thin.Z_STREAM_END then
-         Filter.Stream_End := True;
-      else
-         Check_Error (Filter.Strm.all, Code);
-      end if;
-
-      In_Last  := In_Data'Last
-         - Stream_Element_Offset (Avail_In (Filter.Strm.all));
-      Out_Last := Out_Data'Last
-         - Stream_Element_Offset (Avail_Out (Filter.Strm.all));
-
-   end Translate_Auto;
-
-   --------------------
-   -- Translate_GZip --
-   --------------------
-
-   procedure Translate_GZip
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      Out_First  : Stream_Element_Offset;
-
-      procedure Add_Data (Data : in Stream_Element_Array);
-      --  Add data to stream from the Filter.Offset till necessary,
-      --  used for add gzip headr/footer.
-
-      procedure Put_32
-        (Item : in out Stream_Element_Array;
-         Data : in     Unsigned_32);
-      pragma Inline (Put_32);
-
-      --------------
-      -- Add_Data --
-      --------------
-
-      procedure Add_Data (Data : in Stream_Element_Array) is
-         Data_First : Stream_Element_Offset renames Filter.Offset;
-         Data_Last  : Stream_Element_Offset;
-         Data_Len   : Stream_Element_Offset; --  -1
-         Out_Len    : Stream_Element_Offset; --  -1
-      begin
-         Out_First := Out_Last + 1;
-
-         if Data_First > Data'Last then
-            return;
-         end if;
-
-         Data_Len  := Data'Last     - Data_First;
-         Out_Len   := Out_Data'Last - Out_First;
-
-         if Data_Len <= Out_Len then
-            Out_Last  := Out_First  + Data_Len;
-            Data_Last := Data'Last;
-         else
-            Out_Last  := Out_Data'Last;
-            Data_Last := Data_First + Out_Len;
-         end if;
-
-         Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last);
-
-         Data_First := Data_Last + 1;
-         Out_First  := Out_Last + 1;
-      end Add_Data;
-
-      ------------
-      -- Put_32 --
-      ------------
-
-      procedure Put_32
-        (Item : in out Stream_Element_Array;
-         Data : in     Unsigned_32)
-      is
-         D : Unsigned_32 := Data;
-      begin
-         for J in Item'First .. Item'First + 3 loop
-            Item (J) := Stream_Element (D and 16#FF#);
-            D := Shift_Right (D, 8);
-         end loop;
-      end Put_32;
-
-   begin
-      Out_Last := Out_Data'First - 1;
-
-      if not Filter.Stream_End then
-         Add_Data (Simple_GZip_Header);
-
-         Translate_Auto
-           (Filter => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data (Out_First .. Out_Data'Last),
-            Out_Last => Out_Last,
-            Flush    => Flush);
-
-         CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last));
-
-      end if;
-
-      if Filter.Stream_End and then Out_Last <= Out_Data'Last then
-         --  This detection method would work only when
-         --  Simple_GZip_Header'Last > Footer_Array'Last
-
-         if Filter.Offset = Simple_GZip_Header'Last + 1 then
-            Filter.Offset := Footer_Array'First;
-         end if;
-
-         declare
-            Footer : Footer_Array;
-         begin
-            Put_32 (Footer, Filter.CRC);
-            Put_32 (Footer (Footer'First + 4 .. Footer'Last),
-                    Unsigned_32 (Total_In (Filter)));
-            Add_Data (Footer);
-         end;
-      end if;
-   end Translate_GZip;
-
-   -------------
-   -- Version --
-   -------------
-
-   function Version return String is
-   begin
-      return Interfaces.C.Strings.Value (Thin.zlibVersion);
-   end Version;
-
-   -----------
-   -- Write --
-   -----------
-
-   procedure Write
-     (Filter : in out Filter_Type;
-      Item   : in     Ada.Streams.Stream_Element_Array;
-      Flush  : in     Flush_Mode)
-   is
-      Buffer : Stream_Element_Array (1 .. Buffer_Size);
-      In_Last, Out_Last : Stream_Element_Offset;
-      In_First : Stream_Element_Offset := Item'First;
-   begin
-      if Item'Length = 0 and Flush = No_Flush then
-         return;
-      end if;
-
-      loop
-         Translate
-           (Filter => Filter,
-            In_Data  => Item (In_First .. Item'Last),
-            In_Last  => In_Last,
-            Out_Data => Buffer,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-
-         if Out_Last >= Buffer'First then
-            Write (Buffer (1 .. Out_Last));
-         end if;
-
-         exit when In_Last = Item'Last or Stream_End (Filter);
-
-         In_First := In_Last + 1;
-      end loop;
-   end Write;
-
-end ZLib;
diff --git a/tkimg1.3/libz/contrib/ada/zlib.ads b/tkimg1.3/libz/contrib/ada/zlib.ads
deleted file mode 100644
index f855ffd..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib.ads
+++ /dev/null
@@ -1,311 +0,0 @@
-------------------------------------------------------------------------------
---                      ZLib for Ada thick binding.                         --
---                                                                          --
---              Copyright (C) 2002-2003 Dmitriy Anisimkov                   --
---                                                                          --
---  This library is free software; you can redistribute it and/or modify    --
---  it under the terms of the GNU General Public License as published by    --
---  the Free Software Foundation; either version 2 of the License, or (at   --
---  your option) any later version.                                         --
---                                                                          --
---  This library is distributed in the hope that it will be useful, but     --
---  WITHOUT ANY WARRANTY; without even the implied warranty of              --
---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       --
---  General Public License for more details.                                --
---                                                                          --
---  You should have received a copy of the GNU General Public License       --
---  along with this library; if not, write to the Free Software Foundation, --
---  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.          --
---                                                                          --
---  As a special exception, if other files instantiate generics from this   --
---  unit, or you link this unit with other files to produce an executable,  --
---  this  unit  does not  by itself cause  the resulting executable to be   --
---  covered by the GNU General Public License. This exception does not      --
---  however invalidate any other reasons why the executable file  might be  --
---  covered by the  GNU Public License.                                     --
-------------------------------------------------------------------------------
-
---  $Id: zlib.ads,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-with Ada.Streams;
-
-with Interfaces;
-
-package ZLib is
-
-   ZLib_Error : exception;
-
-   type Compression_Level is new Integer range -1 .. 9;
-
-   type Flush_Mode is private;
-
-   type Compression_Method is private;
-
-   type Window_Bits_Type is new Integer range 8 .. 15;
-
-   type Memory_Level_Type is new Integer range 1 .. 9;
-
-   type Unsigned_32 is new Interfaces.Unsigned_32;
-
-   type Strategy_Type is private;
-
-   type Header_Type is (None, Auto, Default, GZip);
-   --  Header type usage have a some limitation for inflate.
-   --  See comment for Inflate_Init.
-
-   subtype Count is Ada.Streams.Stream_Element_Count;
-
-   ----------------------------------
-   -- Compression method constants --
-   ----------------------------------
-
-   Deflated : constant Compression_Method;
-   --  Only one method allowed in this ZLib version.
-
-   ---------------------------------
-   -- Compression level constants --
-   ---------------------------------
-
-   No_Compression      : constant Compression_Level := 0;
-   Best_Speed          : constant Compression_Level := 1;
-   Best_Compression    : constant Compression_Level := 9;
-   Default_Compression : constant Compression_Level := -1;
-
-   --------------------------
-   -- Flush mode constants --
-   --------------------------
-
-   No_Flush      : constant Flush_Mode;
-   --  Regular way for compression, no flush
-
-   Partial_Flush : constant Flush_Mode;
-   --  will be removed, use Z_SYNC_FLUSH instead
-
-   Sync_Flush    : constant Flush_Mode;
-   --  all pending output is flushed to the output buffer and the output
-   --  is aligned on a byte boundary, so that the decompressor can get all
-   --  input data available so far. (In particular avail_in is zero after the
-   --  call if enough output space has been provided  before the call.)
-   --  Flushing may degrade compression for some compression algorithms and so
-   --  it should be used only when necessary.
-
-   Full_Flush    : constant Flush_Mode;
-   --  all output is flushed as with SYNC_FLUSH, and the compression state
-   --  is reset so that decompression can restart from this point if previous
-   --  compressed data has been damaged or if random access is desired. Using
-   --  FULL_FLUSH too often can seriously degrade the compression.
-
-   Finish        : constant Flush_Mode;
-   --  Just for tell the compressor that input data is complete.
-
-   ------------------------------------
-   -- Compression strategy constants --
-   ------------------------------------
-
-   --  RLE stategy could be used only in version 1.2.0 and later.
-
-   Filtered         : constant Strategy_Type;
-   Huffman_Only     : constant Strategy_Type;
-   RLE              : constant Strategy_Type;
-   Default_Strategy : constant Strategy_Type;
-
-   Default_Buffer_Size : constant := 4096;
-
-   type Filter_Type is limited private;
-   --  The filter is for compression and for decompression.
-   --  The usage of the type is depend of its initialization.
-
-   function Version return String;
-   pragma Inline (Version);
-   --  Return string representation of the ZLib version.
-
-   procedure Deflate_Init
-     (Filter       : in out Filter_Type;
-      Level        : in     Compression_Level  := Default_Compression;
-      Strategy     : in     Strategy_Type      := Default_Strategy;
-      Method       : in     Compression_Method := Deflated;
-      Window_Bits  : in     Window_Bits_Type   := 15;
-      Memory_Level : in     Memory_Level_Type  := 8;
-      Header       : in     Header_Type        := Default);
-   --  Compressor initialization.
-   --  When Header parameter is Auto or Default, then default zlib header
-   --  would be provided for compressed data.
-   --  When Header is GZip, then gzip header would be set instead of
-   --  default header.
-   --  When Header is None, no header would be set for compressed data.
-
-   procedure Inflate_Init
-     (Filter      : in out Filter_Type;
-      Window_Bits : in     Window_Bits_Type := 15;
-      Header      : in     Header_Type      := Default);
-   --  Decompressor initialization.
-   --  Default header type mean that ZLib default header is expecting in the
-   --  input compressed stream.
-   --  Header type None mean that no header is expecting in the input stream.
-   --  GZip header type mean that GZip header is expecting in the
-   --  input compressed stream.
-   --  Auto header type mean that header type (GZip or Native) would be
-   --  detected automatically in the input stream.
-   --  Note that header types parameter values None, GZip and Auto is
-   --  supporting for inflate routine only in ZLib versions 1.2.0.2 and later.
-   --  Deflate_Init is supporting all header types.
-
-   procedure Close
-     (Filter       : in out Filter_Type;
-      Ignore_Error : in     Boolean := False);
-   --  Closing the compression or decompressor.
-   --  If stream is closing before the complete and Ignore_Error is False,
-   --  The exception would be raised.
-
-   generic
-      with procedure Data_In
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-      with procedure Data_Out
-        (Item : in Ada.Streams.Stream_Element_Array);
-   procedure Generic_Translate
-     (Filter          : in out Filter_Type;
-      In_Buffer_Size  : in     Integer := Default_Buffer_Size;
-      Out_Buffer_Size : in     Integer := Default_Buffer_Size);
-   --  Compressing/decompressing data arrived from Data_In routine
-   --  to the Data_Out routine. User should provide Data_In and Data_Out
-   --  for compression/decompression data flow.
-   --  Compression or decompression depend on initialization of Filter.
-
-   function Total_In (Filter : in Filter_Type) return Count;
-   pragma Inline (Total_In);
-   --  Return total number of input bytes read so far.
-
-   function Total_Out (Filter : in Filter_Type) return Count;
-   pragma Inline (Total_Out);
-   --  Return total number of bytes output so far.
-
-   function CRC32
-     (CRC    : in Unsigned_32;
-      Data   : in Ada.Streams.Stream_Element_Array)
-      return Unsigned_32;
-   pragma Inline (CRC32);
-   --  Calculate CRC32, it could be necessary for make gzip format.
-
-   procedure CRC32
-     (CRC  : in out Unsigned_32;
-      Data : in     Ada.Streams.Stream_Element_Array);
-   pragma Inline (CRC32);
-   --  Calculate CRC32, it could be necessary for make gzip format.
-
-   -------------------------------------------------
-   --  Below is more complex low level routines.  --
-   -------------------------------------------------
-
-   procedure Translate
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  Compressing/decompressing the datas from In_Data buffer to the
-   --  Out_Data buffer.
-   --  In_Data is incoming data portion,
-   --  In_Last is the index of last element from In_Data accepted by the
-   --  Filter.
-   --  Out_Data is the buffer for output data from the filter.
-   --  Out_Last is the last element of the received data from Filter.
-   --  To tell the filter that incoming data is complete put the
-   --  Flush parameter to FINISH.
-
-   function Stream_End (Filter : in Filter_Type) return Boolean;
-   pragma Inline (Stream_End);
-   --  Return the true when the stream is complete.
-
-   procedure Flush
-     (Filter    : in out Filter_Type;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   pragma Inline (Flush);
-   --  Flushing the data from the compressor.
-
-   generic
-      with procedure Write
-        (Item : in Ada.Streams.Stream_Element_Array);
-      --  User should provide this routine for accept
-      --  compressed/decompressed data.
-
-      Buffer_Size : in Ada.Streams.Stream_Element_Offset
-         := Default_Buffer_Size;
-      --  Buffer size for Write user routine.
-
-   procedure Write
-     (Filter  : in out Filter_Type;
-      Item    : in     Ada.Streams.Stream_Element_Array;
-      Flush   : in     Flush_Mode);
-   --  Compressing/Decompressing data from Item to the
-   --  generic parameter procedure Write.
-   --  Output buffer size could be set in Buffer_Size generic parameter.
-
-   generic
-      with procedure Read
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-      --  User should provide data for compression/decompression
-      --  thru this routine.
-
-      Buffer : in out Ada.Streams.Stream_Element_Array;
-      --  Buffer for keep remaining data from the previous
-      --  back read.
-
-      Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset;
-      --  Rest_First have to be initialized to Buffer'Last + 1
-      --  before usage.
-
-   procedure Read
-     (Filter : in out Filter_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset);
-   --  Compressing/Decompressing data from generic parameter
-   --  procedure Read to the Item.
-   --  User should provide Buffer for the operation
-   --  and Rest_First variable first time initialized to the Buffer'Last + 1.
-
-private
-
-   use Ada.Streams;
-
-   type Flush_Mode is new Integer range 0 .. 4;
-
-   type Compression_Method is new Integer range 8 .. 8;
-
-   type Strategy_Type is new Integer range 0 .. 3;
-
-   No_Flush      : constant Flush_Mode := 0;
-   Sync_Flush    : constant Flush_Mode := 2;
-   Full_Flush    : constant Flush_Mode := 3;
-   Finish        : constant Flush_Mode := 4;
-   Partial_Flush : constant Flush_Mode := 1;
-   --  will be removed, use Z_SYNC_FLUSH instead
-
-   Filtered         : constant Strategy_Type := 1;
-   Huffman_Only     : constant Strategy_Type := 2;
-   RLE              : constant Strategy_Type := 3;
-   Default_Strategy : constant Strategy_Type := 0;
-
-   Deflated : constant Compression_Method := 8;
-
-   type Z_Stream;
-
-   type Z_Stream_Access is access all Z_Stream;
-
-   type Filter_Type is record
-      Strm        : Z_Stream_Access;
-      Compression : Boolean;
-      Stream_End  : Boolean;
-      Header      : Header_Type;
-      CRC         : Unsigned_32;
-      Offset      : Stream_Element_Offset;
-      --  Offset for gzip header/footer output.
-
-      Opened      : Boolean := False;
-   end record;
-
-end ZLib;
diff --git a/tkimg1.3/libz/contrib/ada/zlib.gpr b/tkimg1.3/libz/contrib/ada/zlib.gpr
deleted file mode 100644
index 0f58985..0000000
--- a/tkimg1.3/libz/contrib/ada/zlib.gpr
+++ /dev/null
@@ -1,21 +0,0 @@
-project Zlib is
-
-   for Languages use ("Ada");
-   for Source_Dirs use (".");
-   for Object_Dir use ".";
-   for Main use ("test.adb", "mtest.adb", "read.adb");
-
-   package Compiler is
-      for Default_Switches ("ada") use ("-gnatwbcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst");
-   end Compiler;
-
-   package Linker is
-      for Default_Switches ("ada") use ("-lz");
-   end Linker;
-
-   package Builder is
-      for Default_Switches ("ada") use ("-s", "-gnatQ");
-   end Builder;
-
-end Zlib;
-
diff --git a/tkimg1.3/libz/contrib/asm586/README.586 b/tkimg1.3/libz/contrib/asm586/README.586
deleted file mode 100644
index 6bb78f3..0000000
--- a/tkimg1.3/libz/contrib/asm586/README.586
+++ /dev/null
@@ -1,43 +0,0 @@
-This is a patched version of zlib modified to use
-Pentium-optimized assembly code in the deflation algorithm. The files
-changed/added by this patch are:
-
-README.586
-match.S
-
-The effectiveness of these modifications is a bit marginal, as the the
-program's bottleneck seems to be mostly L1-cache contention, for which
-there is no real way to work around without rewriting the basic
-algorithm. The speedup on average is around 5-10% (which is generally
-less than the amount of variance between subsequent executions).
-However, when used at level 9 compression, the cache contention can
-drop enough for the assembly version to achieve 10-20% speedup (and
-sometimes more, depending on the amount of overall redundancy in the
-files). Even here, though, cache contention can still be the limiting
-factor, depending on the nature of the program using the zlib library.
-This may also mean that better improvements will be seen on a Pentium
-with MMX, which suffers much less from L1-cache contention, but I have
-not yet verified this.
-
-Note that this code has been tailored for the Pentium in particular,
-and will not perform well on the Pentium Pro (due to the use of a
-partial register in the inner loop).
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox at muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
diff --git a/tkimg1.3/libz/contrib/asm586/match.S b/tkimg1.3/libz/contrib/asm586/match.S
deleted file mode 100644
index 8f16140..0000000
--- a/tkimg1.3/libz/contrib/asm586/match.S
+++ /dev/null
@@ -1,354 +0,0 @@
-/* match.s -- Pentium-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define	match_init	_match_init
-#define	longest_match	_longest_match
-#endif
-
-#define	MAX_MATCH	(258)
-#define	MIN_MATCH	(3)
-#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
-#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define	wmask			0	/* local copy of s->wmask	*/
-#define	window			4	/* local copy of s->window	*/
-#define	windowbestlen		8	/* s->window + bestlen		*/
-#define	chainlenscanend		12	/* high word: current chain len	*/
-					/* low word: last bytes sought	*/
-#define	scanstart		16	/* first two bytes of string	*/
-#define	scanalign		20	/* dword-misalignment of string	*/
-#define	nicematch		24	/* a good enough match size	*/
-#define	bestlen			28	/* size of best match so far	*/
-#define	scan			32	/* ptr to string wanting match	*/
-
-#define	LocalVarsSize		(36)
-/*	saved ebx		36 */
-/*	saved edi		40 */
-/*	saved esi		44 */
-/*	saved ebp		48 */
-/*	return address		52 */
-#define	deflatestate		56	/* the function arguments	*/
-#define	curmatch		60
-
-/* Offsets for fields in the deflate_state structure. These numbers
- * are calculated from the definition of deflate_state, with the
- * assumption that the compiler will dword-align the fields. (Thus,
- * changing the definition of deflate_state could easily cause this
- * program to crash horribly, without so much as a warning at
- * compile time. Sigh.)
- */
-#define	dsWSize			36
-#define	dsWMask			44
-#define	dsWindow		48
-#define	dsPrev			56
-#define	dsMatchLen		88
-#define	dsPrevMatch		92
-#define	dsStrStart		100
-#define	dsMatchStart		104
-#define	dsLookahead		108
-#define	dsPrevLen		112
-#define	dsMaxChainLen		116
-#define	dsGoodMatch		132
-#define	dsNiceMatch		136
-
-
-.file "match.S"
-
-.globl	match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to	*/
-/* make room for our stack frame.					*/
-
-		pushl	%ebp
-		pushl	%edi
-		pushl	%esi
-		pushl	%ebx
-		subl	$LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match		*/
-/* throughout the entire function. %edx will hold the pointer to the	*/
-/* deflate_state structure during the function's setup (before		*/
-/* entering the main loop).						*/
-
-		movl	deflatestate(%esp), %edx
-		movl	curmatch(%esp), %ecx
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
-
-		movl	dsNiceMatch(%edx), %eax
-		movl	dsLookahead(%edx), %ebx
-		cmpl	%eax, %ebx
-		jl	LookaheadLess
-		movl	%eax, %ebx
-LookaheadLess:	movl	%ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;			*/
-
-		movl	dsWindow(%edx), %esi
-		movl	%esi, window(%esp)
-		movl	dsStrStart(%edx), %ebp
-		lea	(%esi,%ebp), %edi
-		movl	%edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being		*/
-/* dword-aligned.							*/
-
-		movl	%edi, %eax
-		negl	%eax
-		andl	$3, %eax
-		movl	%eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
-
-		movl	dsWSize(%edx), %eax
-		subl	$MIN_LOOKAHEAD, %eax
-		subl	%eax, %ebp
-		jg	LimitPositive
-		xorl	%ebp, %ebp
-LimitPositive:
-
-/* unsigned chain_length = s->max_chain_length;				*/
-/* if (s->prev_length >= s->good_match) {				*/
-/*     chain_length >>= 2;						*/
-/* }									*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	dsGoodMatch(%edx), %ebx
-		cmpl	%ebx, %eax
-		movl	dsMaxChainLen(%edx), %ebx
-		jl	LastMatchGood
-		shrl	$2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can	*/
-/* use the sign flag instead of the zero flag for the exit test.	*/
-/* It is then shifted into the high word, to make room for the scanend	*/
-/* scanend value, which it will always accompany.			*/
-
-		decl	%ebx
-		shll	$16, %ebx
-
-/* int best_len = s->prev_length;					*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	%eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi.	*/
-
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;				*/
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
-
-		movw	(%edi), %bx
-		movw	%bx, scanstart(%esp)
-		movw	-1(%edi,%eax), %bx
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Posf *prev = s->prev;						*/
-/* uInt wmask = s->w_mask;						*/
-
-		movl	dsPrev(%edx), %edi
-		movl	dsWMask(%edx), %edx
-		mov	%edx, wmask(%esp)
-
-/* Jump into the main loop.						*/
-
-		jmp	LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend)
- * %ecx = curmatch
- * %edx = curmatch & wmask
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- *
- * Two optimization notes on the choice of instructions:
- *
- * The first instruction uses a 16-bit address, which costs an extra,
- * unpairable cycle. This is cheaper than doing a 32-bit access and
- * zeroing the high word, due to the 3-cycle misalignment penalty which
- * would occur half the time. This also turns out to be cheaper than
- * doing two separate 8-bit accesses, as the memory is so rarely in the
- * L1 cache.
- *
- * The window buffer, however, apparently spends a lot of time in the
- * cache, and so it is faster to retrieve the word at the end of the
- * match string with two 8-bit loads. The instructions that test the
- * word at the beginning of the match string, however, are executed
- * much less frequently, and there it was cheaper to use 16-bit
- * instructions, which avoided the necessity of saving off and
- * subsequently reloading one of the other registers.
- */
-LookupLoop:
-							/* 1 U & V  */
-		movw	(%edi,%edx,2), %cx		/* 2 U pipe */
-		movl	wmask(%esp), %edx		/* 2 V pipe */
-		cmpl	%ebp, %ecx			/* 3 U pipe */
-		jbe	LeaveNow			/* 3 V pipe */
-		subl	$0x00010000, %ebx		/* 4 U pipe */
-		js	LeaveNow			/* 4 V pipe */
-LoopEntry:	movb	-1(%esi,%ecx), %al		/* 5 U pipe */
-		andl	%ecx, %edx			/* 5 V pipe */
-		cmpb	%bl, %al			/* 6 U pipe */
-		jnz	LookupLoop			/* 6 V pipe */
-		movb	(%esi,%ecx), %ah
-		cmpb	%bh, %ah
-		jnz	LookupLoop
-		movl	window(%esp), %eax
-		movw	(%eax,%ecx), %ax
-		cmpw	scanstart(%esp), %ax
-		jnz	LookupLoop
-
-/* Store the current value of chainlen.					*/
-
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we	*/
-/* are hoping to match it up with. In actuality, %esi and %edi are	*/
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
-/* initialized to -(MAX_MATCH_8 - scanalign).				*/
-
-		movl	window(%esp), %esi
-		movl	scan(%esp), %edi
-		addl	%ecx, %esi
-		movl	scanalign(%esp), %eax
-		movl	$(-MAX_MATCH_8), %edx
-		lea	MAX_MATCH_8(%edi,%eax), %edi
-		lea	MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-		movl	(%esi,%edx), %eax
-		movl	(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps
-		movl	4(%esi,%edx), %eax
-		movl	4(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps4
-		addl	$8, %edx
-		jnz	LoopCmps
-		jmp	LenMaximum
-LeaveLoopCmps4:	addl	$4, %edx
-LeaveLoopCmps:	testl	$0x0000FFFF, %eax
-		jnz	LenLower
-		addl	$2, %edx
-		shrl	$16, %eax
-LenLower:	subb	$1, %al
-		adcl	$0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
-/* then automatically accept it as the best possible match and leave.	*/
-
-		lea	(%edi,%edx), %eax
-		movl	scan(%esp), %edi
-		subl	%edi, %eax
-		cmpl	$MAX_MATCH, %eax
-		jge	LenMaximum
-
-/* If the length of the match is not longer than the best match we	*/
-/* have so far, then forget it and return to the lookup loop.		*/
-
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		cmpl	%ebx, %eax
-		jg	LongerMatch
-		movl	chainlenscanend(%esp), %ebx
-		movl	windowbestlen(%esp), %esi
-		movl	dsPrev(%edx), %edi
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/*         s->match_start = cur_match;					*/
-/*         best_len = len;						*/
-/*         if (len >= nice_match) break;				*/
-/*         scan_end = *(ushf*)(scan+best_len-1);			*/
-
-LongerMatch:	movl	nicematch(%esp), %ebx
-		movl	%eax, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-		cmpl	%ebx, %eax
-		jge	LeaveNow
-		movl	window(%esp), %esi
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-		movl	chainlenscanend(%esp), %ebx
-		movw	-1(%edi,%eax), %bx
-		movl	dsPrev(%edx), %edi
-		movl	%ebx, chainlenscanend(%esp)
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/* Accept the current string, with the maximum possible length.		*/
-
-LenMaximum:	movl	deflatestate(%esp), %edx
-		movl	$MAX_MATCH, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
-/* return s->lookahead;							*/
-
-LeaveNow:
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		movl	dsLookahead(%edx), %eax
-		cmpl	%eax, %ebx
-		jg	LookaheadRet
-		movl	%ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.			*/
-
-		addl	$LocalVarsSize, %esp
-		popl	%ebx
-		popl	%esi
-		popl	%edi
-		popl	%ebp
-match_init:	ret
diff --git a/tkimg1.3/libz/contrib/asm686/README.686 b/tkimg1.3/libz/contrib/asm686/README.686
deleted file mode 100644
index a593f23..0000000
--- a/tkimg1.3/libz/contrib/asm686/README.686
+++ /dev/null
@@ -1,34 +0,0 @@
-This is a patched version of zlib, modified to use
-Pentium-Pro-optimized assembly code in the deflation algorithm. The
-files changed/added by this patch are:
-
-README.686
-match.S
-
-The speedup that this patch provides varies, depending on whether the
-compiler used to build the original version of zlib falls afoul of the
-PPro's speed traps. My own tests show a speedup of around 10-20% at
-the default compression level, and 20-30% using -9, against a version
-compiled using gcc 2.7.2.3. Your mileage may vary.
-
-Note that this code has been tailored for the PPro/PII in particular,
-and will not perform particuarly well on a Pentium.
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox at muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
diff --git a/tkimg1.3/libz/contrib/asm686/match.S b/tkimg1.3/libz/contrib/asm686/match.S
deleted file mode 100644
index 8e86c33..0000000
--- a/tkimg1.3/libz/contrib/asm686/match.S
+++ /dev/null
@@ -1,327 +0,0 @@
-/* match.s -- Pentium-Pro-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define	match_init	_match_init
-#define	longest_match	_longest_match
-#endif
-
-#define	MAX_MATCH	(258)
-#define	MIN_MATCH	(3)
-#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
-#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define	chainlenwmask		0	/* high word: current chain len	*/
-					/* low word: s->wmask		*/
-#define	window			4	/* local copy of s->window	*/
-#define	windowbestlen		8	/* s->window + bestlen		*/
-#define	scanstart		16	/* first two bytes of string	*/
-#define	scanend			12	/* last two bytes of string	*/
-#define	scanalign		20	/* dword-misalignment of string	*/
-#define	nicematch		24	/* a good enough match size	*/
-#define	bestlen			28	/* size of best match so far	*/
-#define	scan			32	/* ptr to string wanting match	*/
-
-#define	LocalVarsSize		(36)
-/*	saved ebx		36 */
-/*	saved edi		40 */
-/*	saved esi		44 */
-/*	saved ebp		48 */
-/*	return address		52 */
-#define	deflatestate		56	/* the function arguments	*/
-#define	curmatch		60
-
-/* Offsets for fields in the deflate_state structure. These numbers
- * are calculated from the definition of deflate_state, with the
- * assumption that the compiler will dword-align the fields. (Thus,
- * changing the definition of deflate_state could easily cause this
- * program to crash horribly, without so much as a warning at
- * compile time. Sigh.)
- */
-#define	dsWSize			36
-#define	dsWMask			44
-#define	dsWindow		48
-#define	dsPrev			56
-#define	dsMatchLen		88
-#define	dsPrevMatch		92
-#define	dsStrStart		100
-#define	dsMatchStart		104
-#define	dsLookahead		108
-#define	dsPrevLen		112
-#define	dsMaxChainLen		116
-#define	dsGoodMatch		132
-#define	dsNiceMatch		136
-
-
-.file "match.S"
-
-.globl	match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to	*/
-/* make room for our stack frame.					*/
-
-		pushl	%ebp
-		pushl	%edi
-		pushl	%esi
-		pushl	%ebx
-		subl	$LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match		*/
-/* throughout the entire function. %edx will hold the pointer to the	*/
-/* deflate_state structure during the function's setup (before		*/
-/* entering the main loop).						*/
-
-		movl	deflatestate(%esp), %edx
-		movl	curmatch(%esp), %ecx
-
-/* uInt wmask = s->w_mask;						*/
-/* unsigned chain_length = s->max_chain_length;				*/
-/* if (s->prev_length >= s->good_match) {				*/
-/*     chain_length >>= 2;						*/
-/* }									*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	dsGoodMatch(%edx), %ebx
-		cmpl	%ebx, %eax
-		movl	dsWMask(%edx), %eax
-		movl	dsMaxChainLen(%edx), %ebx
-		jl	LastMatchGood
-		shrl	$2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can	*/
-/* use the sign flag instead of the zero flag for the exit test.	*/
-/* It is then shifted into the high word, to make room for the wmask	*/
-/* value, which it will always accompany.				*/
-
-		decl	%ebx
-		shll	$16, %ebx
-		orl	%eax, %ebx
-		movl	%ebx, chainlenwmask(%esp)
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
-
-		movl	dsNiceMatch(%edx), %eax
-		movl	dsLookahead(%edx), %ebx
-		cmpl	%eax, %ebx
-		jl	LookaheadLess
-		movl	%eax, %ebx
-LookaheadLess:	movl	%ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;			*/
-
-		movl	dsWindow(%edx), %esi
-		movl	%esi, window(%esp)
-		movl	dsStrStart(%edx), %ebp
-		lea	(%esi,%ebp), %edi
-		movl	%edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being		*/
-/* dword-aligned.							*/
-
-		movl	%edi, %eax
-		negl	%eax
-		andl	$3, %eax
-		movl	%eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
-
-		movl	dsWSize(%edx), %eax
-		subl	$MIN_LOOKAHEAD, %eax
-		subl	%eax, %ebp
-		jg	LimitPositive
-		xorl	%ebp, %ebp
-LimitPositive:
-
-/* int best_len = s->prev_length;					*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	%eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi.	*/
-
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;				*/
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
-/* Posf *prev = s->prev;						*/
-
-		movzwl	(%edi), %ebx
-		movl	%ebx, scanstart(%esp)
-		movzwl	-1(%edi,%eax), %ebx
-		movl	%ebx, scanend(%esp)
-		movl	dsPrev(%edx), %edi
-
-/* Jump into the main loop.						*/
-
-		movl	chainlenwmask(%esp), %edx
-		jmp	LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = scanend
- * %ecx = curmatch
- * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- */
-LookupLoop:
-		andl	%edx, %ecx
-		movzwl	(%edi,%ecx,2), %ecx
-		cmpl	%ebp, %ecx
-		jbe	LeaveNow
-		subl	$0x00010000, %edx
-		js	LeaveNow
-LoopEntry:	movzwl	-1(%esi,%ecx), %eax
-		cmpl	%ebx, %eax
-		jnz	LookupLoop
-		movl	window(%esp), %eax
-		movzwl	(%eax,%ecx), %eax
-		cmpl	scanstart(%esp), %eax
-		jnz	LookupLoop
-
-/* Store the current value of chainlen.					*/
-
-		movl	%edx, chainlenwmask(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we	*/
-/* are hoping to match it up with. In actuality, %esi and %edi are	*/
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
-/* initialized to -(MAX_MATCH_8 - scanalign).				*/
-
-		movl	window(%esp), %esi
-		movl	scan(%esp), %edi
-		addl	%ecx, %esi
-		movl	scanalign(%esp), %eax
-		movl	$(-MAX_MATCH_8), %edx
-		lea	MAX_MATCH_8(%edi,%eax), %edi
-		lea	MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-		movl	(%esi,%edx), %eax
-		xorl	(%edi,%edx), %eax
-		jnz	LeaveLoopCmps
-		movl	4(%esi,%edx), %eax
-		xorl	4(%edi,%edx), %eax
-		jnz	LeaveLoopCmps4
-		addl	$8, %edx
-		jnz	LoopCmps
-		jmp	LenMaximum
-LeaveLoopCmps4:	addl	$4, %edx
-LeaveLoopCmps:	testl	$0x0000FFFF, %eax
-		jnz	LenLower
-		addl	$2, %edx
-		shrl	$16, %eax
-LenLower:	subb	$1, %al
-		adcl	$0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
-/* then automatically accept it as the best possible match and leave.	*/
-
-		lea	(%edi,%edx), %eax
-		movl	scan(%esp), %edi
-		subl	%edi, %eax
-		cmpl	$MAX_MATCH, %eax
-		jge	LenMaximum
-
-/* If the length of the match is not longer than the best match we	*/
-/* have so far, then forget it and return to the lookup loop.		*/
-
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		cmpl	%ebx, %eax
-		jg	LongerMatch
-		movl	windowbestlen(%esp), %esi
-		movl	dsPrev(%edx), %edi
-		movl	scanend(%esp), %ebx
-		movl	chainlenwmask(%esp), %edx
-		jmp	LookupLoop
-
-/*         s->match_start = cur_match;					*/
-/*         best_len = len;						*/
-/*         if (len >= nice_match) break;				*/
-/*         scan_end = *(ushf*)(scan+best_len-1);			*/
-
-LongerMatch:	movl	nicematch(%esp), %ebx
-		movl	%eax, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-		cmpl	%ebx, %eax
-		jge	LeaveNow
-		movl	window(%esp), %esi
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-		movzwl	-1(%edi,%eax), %ebx
-		movl	dsPrev(%edx), %edi
-		movl	%ebx, scanend(%esp)
-		movl	chainlenwmask(%esp), %edx
-		jmp	LookupLoop
-
-/* Accept the current string, with the maximum possible length.		*/
-
-LenMaximum:	movl	deflatestate(%esp), %edx
-		movl	$MAX_MATCH, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
-/* return s->lookahead;							*/
-
-LeaveNow:
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		movl	dsLookahead(%edx), %eax
-		cmpl	%eax, %ebx
-		jg	LookaheadRet
-		movl	%ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.			*/
-
-		addl	$LocalVarsSize, %esp
-		popl	%ebx
-		popl	%esi
-		popl	%edi
-		popl	%ebp
-match_init:	ret
diff --git a/tkimg1.3/libz/contrib/blast/Makefile b/tkimg1.3/libz/contrib/blast/Makefile
deleted file mode 100644
index 9be80ba..0000000
--- a/tkimg1.3/libz/contrib/blast/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-blast: blast.c blast.h
-	cc -DTEST -o blast blast.c
-
-test: blast
-	blast < test.pk | cmp - test.txt
-
-clean:
-	rm -f blast blast.o
diff --git a/tkimg1.3/libz/contrib/blast/README b/tkimg1.3/libz/contrib/blast/README
deleted file mode 100644
index e3a60b3..0000000
--- a/tkimg1.3/libz/contrib/blast/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Read blast.h for purpose and usage.
-
-Mark Adler
-madler at alumni.caltech.edu
diff --git a/tkimg1.3/libz/contrib/blast/blast.c b/tkimg1.3/libz/contrib/blast/blast.c
deleted file mode 100644
index 4ce697a..0000000
--- a/tkimg1.3/libz/contrib/blast/blast.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/* blast.c
- * Copyright (C) 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in blast.h
- * version 1.1, 16 Feb 2003
- *
- * blast.c decompresses data compressed by the PKWare Compression Library.
- * This function provides functionality similar to the explode() function of
- * the PKWare library, hence the name "blast".
- *
- * This decompressor is based on the excellent format description provided by
- * Ben Rudiak-Gould in comp.compression on August 13, 2001.  Interestingly, the
- * example Ben provided in the post is incorrect.  The distance 110001 should
- * instead be 111000.  When corrected, the example byte stream becomes:
- *
- *    00 04 82 24 25 8f 80 7f
- *
- * which decompresses to "AIAIAIAIAIAIA" (without the quotes).
- */
-
-/*
- * Change history:
- *
- * 1.0  12 Feb 2003     - First version
- * 1.1  16 Feb 2003     - Fixed distance check for > 4 GB uncompressed data
- */
-
-#include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
-#include "blast.h"              /* prototype for blast() */
-
-#define local static            /* for local function definitions */
-#define MAXBITS 13              /* maximum code length */
-#define MAXWIN 4096             /* maximum window size */
-
-/* input and output state */
-struct state {
-    /* input state */
-    blast_in infun;             /* input function provided by user */
-    void *inhow;                /* opaque information passed to infun() */
-    unsigned char *in;          /* next input location */
-    unsigned left;              /* available input at in */
-    int bitbuf;                 /* bit buffer */
-    int bitcnt;                 /* number of bits in bit buffer */
-
-    /* input limit error return state for bits() and decode() */
-    jmp_buf env;
-
-    /* output state */
-    blast_out outfun;           /* output function provided by user */
-    void *outhow;               /* opaque information passed to outfun() */
-    unsigned next;              /* index of next write location in out[] */
-    int first;                  /* true to check distances (for first 4K) */
-    unsigned char out[MAXWIN];  /* output buffer and sliding window */
-};
-
-/*
- * Return need bits from the input stream.  This always leaves less than
- * eight bits in the buffer.  bits() works properly for need == 0.
- *
- * Format notes:
- *
- * - Bits are stored in bytes from the least significant bit to the most
- *   significant bit.  Therefore bits are dropped from the bottom of the bit
- *   buffer, using shift right, and new bytes are appended to the top of the
- *   bit buffer, using shift left.
- */
-local int bits(struct state *s, int need)
-{
-    int val;            /* bit accumulator */
-
-    /* load at least need bits into val */
-    val = s->bitbuf;
-    while (s->bitcnt < need) {
-        if (s->left == 0) {
-            s->left = s->infun(s->inhow, &(s->in));
-            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
-        }
-        val |= (int)(*(s->in)++) << s->bitcnt;          /* load eight bits */
-        s->left--;
-        s->bitcnt += 8;
-    }
-
-    /* drop need bits and update buffer, always zero to seven bits left */
-    s->bitbuf = val >> need;
-    s->bitcnt -= need;
-
-    /* return need bits, zeroing the bits above that */
-    return val & ((1 << need) - 1);
-}
-
-/*
- * Huffman code decoding tables.  count[1..MAXBITS] is the number of symbols of
- * each length, which for a canonical code are stepped through in order.
- * symbol[] are the symbol values in canonical order, where the number of
- * entries is the sum of the counts in count[].  The decoding process can be
- * seen in the function decode() below.
- */
-struct huffman {
-    short *count;       /* number of symbols of each length */
-    short *symbol;      /* canonically ordered symbols */
-};
-
-/*
- * Decode a code from the stream s using huffman table h.  Return the symbol or
- * a negative value if there is an error.  If all of the lengths are zero, i.e.
- * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
- *
- * Format notes:
- *
- * - The codes as stored in the compressed data are bit-reversed relative to
- *   a simple integer ordering of codes of the same lengths.  Hence below the
- *   bits are pulled from the compressed data one at a time and used to
- *   build the code value reversed from what is in the stream in order to
- *   permit simple integer comparisons for decoding.
- *
- * - The first code for the shortest length is all ones.  Subsequent codes of
- *   the same length are simply integer decrements of the previous code.  When
- *   moving up a length, a one bit is appended to the code.  For a complete
- *   code, the last code of the longest length will be all zeros.  To support
- *   this ordering, the bits pulled during decoding are inverted to apply the
- *   more "natural" ordering starting with all zeros and incrementing.
- */
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-    int bitbuf;         /* bits from stream */
-    int left;           /* bits left in next or left to process */
-    short *next;        /* next number of codes */
-
-    bitbuf = s->bitbuf;
-    left = s->bitcnt;
-    code = first = index = 0;
-    len = 1;
-    next = h->count + 1;
-    while (1) {
-        while (left--) {
-            code |= (bitbuf & 1) ^ 1;   /* invert code */
-            bitbuf >>= 1;
-            count = *next++;
-            if (code < first + count) { /* if length len, return symbol */
-                s->bitbuf = bitbuf;
-                s->bitcnt = (s->bitcnt - len) & 7;
-                return h->symbol[index + (code - first)];
-            }
-            index += count;             /* else update for next length */
-            first += count;
-            first <<= 1;
-            code <<= 1;
-            len++;
-        }
-        left = (MAXBITS+1) - len;
-        if (left == 0) break;
-        if (s->left == 0) {
-            s->left = s->infun(s->inhow, &(s->in));
-            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
-        }
-        bitbuf = *(s->in)++;
-        s->left--;
-        if (left > 8) left = 8;
-    }
-    return -9;                          /* ran out of codes */
-}
-
-/*
- * Given a list of repeated code lengths rep[0..n-1], where each byte is a
- * count (high four bits + 1) and a code length (low four bits), generate the
- * list of code lengths.  This compaction reduces the size of the object code.
- * Then given the list of code lengths length[0..n-1] representing a canonical
- * Huffman code for n symbols, construct the tables required to decode those
- * codes.  Those tables are the number of codes of each length, and the symbols
- * sorted by length, retaining their original order within each length.  The
- * return value is zero for a complete code set, negative for an over-
- * subscribed code set, and positive for an incomplete code set.  The tables
- * can be used if the return value is zero or positive, but they cannot be used
- * if the return value is negative.  If the return value is zero, it is not
- * possible for decode() using that table to return an error--any stream of
- * enough bits will resolve to a symbol.  If the return value is positive, then
- * it is possible for decode() using that table to return an error for received
- * codes past the end of the incomplete lengths.
- */
-local int construct(struct huffman *h, const unsigned char *rep, int n)
-{
-    int symbol;         /* current symbol when stepping through length[] */
-    int len;            /* current length when stepping through h->count[] */
-    int left;           /* number of possible codes left of current length */
-    short offs[MAXBITS+1];      /* offsets in symbol table for each length */
-    short length[256];  /* code lengths */
-
-    /* convert compact repeat counts into symbol bit length list */
-    symbol = 0;
-    do {
-        len = *rep++;
-        left = (len >> 4) + 1;
-        len &= 15;
-        do {
-            length[symbol++] = len;
-        } while (--left);
-    } while (--n);
-    n = symbol;
-
-    /* count number of codes of each length */
-    for (len = 0; len <= MAXBITS; len++)
-        h->count[len] = 0;
-    for (symbol = 0; symbol < n; symbol++)
-        (h->count[length[symbol]])++;   /* assumes lengths are within bounds */
-    if (h->count[0] == n)               /* no codes! */
-        return 0;                       /* complete, but decode() will fail */
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;                           /* one possible code of zero length */
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;                     /* one more bit, double codes left */
-        left -= h->count[len];          /* deduct count from possible codes */
-        if (left < 0) return left;      /* over-subscribed--return negative */
-    }                                   /* left > 0 means incomplete */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + h->count[len];
-
-    /*
-     * put symbols in table sorted by length, by symbol order within each
-     * length
-     */
-    for (symbol = 0; symbol < n; symbol++)
-        if (length[symbol] != 0)
-            h->symbol[offs[length[symbol]]++] = symbol;
-
-    /* return zero for complete set, positive for incomplete set */
-    return left;
-}
-
-/*
- * Decode PKWare Compression Library stream.
- *
- * Format notes:
- *
- * - First byte is 0 if literals are uncoded or 1 if they are coded.  Second
- *   byte is 4, 5, or 6 for the number of extra bits in the distance code.
- *   This is the base-2 logarithm of the dictionary size minus six.
- *
- * - Compressed data is a combination of literals and length/distance pairs
- *   terminated by an end code.  Literals are either Huffman coded or
- *   uncoded bytes.  A length/distance pair is a coded length followed by a
- *   coded distance to represent a string that occurs earlier in the
- *   uncompressed data that occurs again at the current location.
- *
- * - A bit preceding a literal or length/distance pair indicates which comes
- *   next, 0 for literals, 1 for length/distance.
- *
- * - If literals are uncoded, then the next eight bits are the literal, in the
- *   normal bit order in th stream, i.e. no bit-reversal is needed. Similarly,
- *   no bit reversal is needed for either the length extra bits or the distance
- *   extra bits.
- *
- * - Literal bytes are simply written to the output.  A length/distance pair is
- *   an instruction to copy previously uncompressed bytes to the output.  The
- *   copy is from distance bytes back in the output stream, copying for length
- *   bytes.
- *
- * - Distances pointing before the beginning of the output data are not
- *   permitted.
- *
- * - Overlapped copies, where the length is greater than the distance, are
- *   allowed and common.  For example, a distance of one and a length of 518
- *   simply copies the last byte 518 times.  A distance of four and a length of
- *   twelve copies the last four bytes three times.  A simple forward copy
- *   ignoring whether the length is greater than the distance or not implements
- *   this correctly.
- */
-local int decomp(struct state *s)
-{
-    int lit;            /* true if literals are coded */
-    int dict;           /* log2(dictionary size) - 6 */
-    int symbol;         /* decoded symbol, extra bits for distance */
-    int len;            /* length for copy */
-    int dist;           /* distance for copy */
-    int copy;           /* copy counter */
-    unsigned char *from, *to;   /* copy pointers */
-    static int virgin = 1;                              /* build tables once */
-    static short litcnt[MAXBITS+1], litsym[256];        /* litcode memory */
-    static short lencnt[MAXBITS+1], lensym[16];         /* lencode memory */
-    static short distcnt[MAXBITS+1], distsym[64];       /* distcode memory */
-    static struct huffman litcode = {litcnt, litsym};   /* length code */
-    static struct huffman lencode = {lencnt, lensym};   /* length code */
-    static struct huffman distcode = {distcnt, distsym};/* distance code */
-        /* bit lengths of literal codes */
-    static const unsigned char litlen[] = {
-        11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8,
-        9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5,
-        7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12,
-        8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27,
-        44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45,
-        44, 173};
-        /* bit lengths of length codes 0..15 */
-    static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23};
-        /* bit lengths of distance codes 0..63 */
-    static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248};
-    static const short base[16] = {     /* base for length codes */
-        3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264};
-    static const char extra[16] = {     /* extra bits for length codes */
-        0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8};
-
-    /* set up decoding tables (once--might not be thread-safe) */
-    if (virgin) {
-        construct(&litcode, litlen, sizeof(litlen));
-        construct(&lencode, lenlen, sizeof(lenlen));
-        construct(&distcode, distlen, sizeof(distlen));
-        virgin = 0;
-    }
-
-    /* read header */
-    lit = bits(s, 8);
-    if (lit > 1) return -1;
-    dict = bits(s, 8);
-    if (dict < 4 || dict > 6) return -2;
-
-    /* decode literals and length/distance pairs */
-    do {
-        if (bits(s, 1)) {
-            /* get length */
-            symbol = decode(s, &lencode);
-            len = base[symbol] + bits(s, extra[symbol]);
-            if (len == 519) break;              /* end code */
-
-            /* get distance */
-            symbol = len == 2 ? 2 : dict;
-            dist = decode(s, &distcode) << symbol;
-            dist += bits(s, symbol);
-            dist++;
-            if (s->first && dist > s->next)
-                return -3;              /* distance too far back */
-
-            /* copy length bytes from distance bytes back */
-            do {
-                to = s->out + s->next;
-                from = to - dist;
-                copy = MAXWIN;
-                if (s->next < dist) {
-                    from += copy;
-                    copy = dist;
-                }
-                copy -= s->next;
-                if (copy > len) copy = len;
-                len -= copy;
-                s->next += copy;
-                do {
-                    *to++ = *from++;
-                } while (--copy);
-                if (s->next == MAXWIN) {
-                    if (s->outfun(s->outhow, s->out, s->next)) return 1;
-                    s->next = 0;
-                    s->first = 0;
-                }
-            } while (len != 0);
-        }
-        else {
-            /* get literal and write it */
-            symbol = lit ? decode(s, &litcode) : bits(s, 8);
-            s->out[s->next++] = symbol;
-            if (s->next == MAXWIN) {
-                if (s->outfun(s->outhow, s->out, s->next)) return 1;
-                s->next = 0;
-                s->first = 0;
-            }
-        }
-    } while (1);
-    return 0;
-}
-
-/* See comments in blast.h */
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow)
-{
-    struct state s;             /* input/output state */
-    int err;                    /* return value */
-
-    /* initialize input state */
-    s.infun = infun;
-    s.inhow = inhow;
-    s.left = 0;
-    s.bitbuf = 0;
-    s.bitcnt = 0;
-
-    /* initialize output state */
-    s.outfun = outfun;
-    s.outhow = outhow;
-    s.next = 0;
-    s.first = 1;
-
-    /* return if bits() or decode() tries to read past available input */
-    if (setjmp(s.env) != 0)             /* if came back here via longjmp(), */
-        err = 2;                        /*  then skip decomp(), return error */
-    else
-        err = decomp(&s);               /* decompress */
-
-    /* write any leftover output and update the error code if needed */
-    if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0)
-        err = 1;
-    return err;
-}
-
-#ifdef TEST
-/* Example of how to use blast() */
-#include <stdio.h>
-#include <stdlib.h>
-
-#define CHUNK 16384
-
-local unsigned inf(void *how, unsigned char **buf)
-{
-    static unsigned char hold[CHUNK];
-
-    *buf = hold;
-    return fread(hold, 1, CHUNK, (FILE *)how);
-}
-
-local int outf(void *how, unsigned char *buf, unsigned len)
-{
-    return fwrite(buf, 1, len, (FILE *)how) != len;
-}
-
-/* Decompress a PKWare Compression Library stream from stdin to stdout */
-int main(void)
-{
-    int ret, n;
-
-    /* decompress to stdout */
-    ret = blast(inf, stdin, outf, stdout);
-    if (ret != 0) fprintf(stderr, "blast error: %d\n", ret);
-
-    /* see if there are any leftover bytes */
-    n = 0;
-    while (getchar() != EOF) n++;
-    if (n) fprintf(stderr, "blast warning: %d unused bytes of input\n", n);
-
-    /* return blast() error code */
-    return ret;
-}
-#endif
diff --git a/tkimg1.3/libz/contrib/blast/blast.h b/tkimg1.3/libz/contrib/blast/blast.h
deleted file mode 100644
index ce9e541..0000000
--- a/tkimg1.3/libz/contrib/blast/blast.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* blast.h -- interface for blast.c
-  Copyright (C) 2003 Mark Adler
-  version 1.1, 16 Feb 2003
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-
-/*
- * blast() decompresses the PKWare Data Compression Library (DCL) compressed
- * format.  It provides the same functionality as the explode() function in
- * that library.  (Note: PKWare overused the "implode" verb, and the format
- * used by their library implode() function is completely different and
- * incompatible with the implode compression method supported by PKZIP.)
- */
-
-
-typedef unsigned (*blast_in)(void *how, unsigned char **buf);
-typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len);
-/* Definitions for input/output functions passed to blast().  See below for
- * what the provided functions need to do.
- */
-
-
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow);
-/* Decompress input to output using the provided infun() and outfun() calls.
- * On success, the return value of blast() is zero.  If there is an error in
- * the source data, i.e. it is not in the proper format, then a negative value
- * is returned.  If there is not enough input available or there is not enough
- * output space, then a positive error is returned.
- *
- * The input function is invoked: len = infun(how, &buf), where buf is set by
- * infun() to point to the input buffer, and infun() returns the number of
- * available bytes there.  If infun() returns zero, then blast() returns with
- * an input error.  (blast() only asks for input if it needs it.)  inhow is for
- * use by the application to pass an input descriptor to infun(), if desired.
- *
- * The output function is invoked: err = outfun(how, buf, len), where the bytes
- * to be written are buf[0..len-1].  If err is not zero, then blast() returns
- * with an output error.  outfun() is always called with len <= 4096.  outhow
- * is for use by the application to pass an output descriptor to outfun(), if
- * desired.
- *
- * The return codes are:
- *
- *   2:  ran out of input before completing decompression
- *   1:  output error before completing decompression
- *   0:  successful decompression
- *  -1:  literal flag not zero or one
- *  -2:  dictionary size not in 4..6
- *  -3:  distance is too far back
- *
- * At the bottom of blast.c is an example program that uses blast() that can be
- * compiled to produce a command-line decompression filter by defining TEST.
- */
diff --git a/tkimg1.3/libz/contrib/blast/test.pk b/tkimg1.3/libz/contrib/blast/test.pk
deleted file mode 100644
index be10b2b..0000000
Binary files a/tkimg1.3/libz/contrib/blast/test.pk and /dev/null differ
diff --git a/tkimg1.3/libz/contrib/blast/test.txt b/tkimg1.3/libz/contrib/blast/test.txt
deleted file mode 100644
index bfdf1c5..0000000
--- a/tkimg1.3/libz/contrib/blast/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-AIAIAIAIAIAIA
\ No newline at end of file
diff --git a/tkimg1.3/libz/contrib/delphi/ZLib.pas b/tkimg1.3/libz/contrib/delphi/ZLib.pas
deleted file mode 100644
index 61ffd08..0000000
--- a/tkimg1.3/libz/contrib/delphi/ZLib.pas
+++ /dev/null
@@ -1,557 +0,0 @@
-{*******************************************************}
-{                                                       }
-{       Borland Delphi Supplemental Components          }
-{       ZLIB Data Compression Interface Unit            }
-{                                                       }
-{       Copyright (c) 1997,99 Borland Corporation       }
-{                                                       }
-{*******************************************************}
-
-{ Updated for zlib 1.2.x by Cosmin Truta <cosmint at cs.ubbcluj.ro> }
-
-unit ZLib;
-
-interface
-
-uses SysUtils, Classes;
-
-type
-  TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
-  TFree = procedure (AppData, Block: Pointer); cdecl;
-
-  // Internal structure.  Ignore.
-  TZStreamRec = packed record
-    next_in: PChar;       // next input byte
-    avail_in: Integer;    // number of bytes available at next_in
-    total_in: Longint;    // total nb of input bytes read so far
-
-    next_out: PChar;      // next output byte should be put here
-    avail_out: Integer;   // remaining free space at next_out
-    total_out: Longint;   // total nb of bytes output so far
-
-    msg: PChar;           // last error message, NULL if no error
-    internal: Pointer;    // not visible by applications
-
-    zalloc: TAlloc;       // used to allocate the internal state
-    zfree: TFree;         // used to free the internal state
-    AppData: Pointer;     // private data object passed to zalloc and zfree
-
-    data_type: Integer;   // best guess about the data type: ascii or binary
-    adler: Longint;       // adler32 value of the uncompressed data
-    reserved: Longint;    // reserved for future use
-  end;
-
-  // Abstract ancestor class
-  TCustomZlibStream = class(TStream)
-  private
-    FStrm: TStream;
-    FStrmPos: Integer;
-    FOnProgress: TNotifyEvent;
-    FZRec: TZStreamRec;
-    FBuffer: array [Word] of Char;
-  protected
-    procedure Progress(Sender: TObject); dynamic;
-    property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
-    constructor Create(Strm: TStream);
-  end;
-
-{ TCompressionStream compresses data on the fly as data is written to it, and
-  stores the compressed data to another stream.
-
-  TCompressionStream is write-only and strictly sequential. Reading from the
-  stream will raise an exception. Using Seek to move the stream pointer
-  will raise an exception.
-
-  Output data is cached internally, written to the output stream only when
-  the internal output buffer is full.  All pending output data is flushed
-  when the stream is destroyed.
-
-  The Position property returns the number of uncompressed bytes of
-  data that have been written to the stream so far.
-
-  CompressionRate returns the on-the-fly percentage by which the original
-  data has been compressed:  (1 - (CompressedBytes / UncompressedBytes)) * 100
-  If raw data size = 100 and compressed data size = 25, the CompressionRate
-  is 75%
-
-  The OnProgress event is called each time the output buffer is filled and
-  written to the output stream.  This is useful for updating a progress
-  indicator when you are writing a large chunk of data to the compression
-  stream in a single call.}
-
-
-  TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
-  TCompressionStream = class(TCustomZlibStream)
-  private
-    function GetCompressionRate: Single;
-  public
-    constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream);
-    destructor Destroy; override;
-    function Read(var Buffer; Count: Longint): Longint; override;
-    function Write(const Buffer; Count: Longint): Longint; override;
-    function Seek(Offset: Longint; Origin: Word): Longint; override;
-    property CompressionRate: Single read GetCompressionRate;
-    property OnProgress;
-  end;
-
-{ TDecompressionStream decompresses data on the fly as data is read from it.
-
-  Compressed data comes from a separate source stream.  TDecompressionStream
-  is read-only and unidirectional; you can seek forward in the stream, but not
-  backwards.  The special case of setting the stream position to zero is
-  allowed.  Seeking forward decompresses data until the requested position in
-  the uncompressed data has been reached.  Seeking backwards, seeking relative
-  to the end of the stream, requesting the size of the stream, and writing to
-  the stream will raise an exception.
-
-  The Position property returns the number of bytes of uncompressed data that
-  have been read from the stream so far.
-
-  The OnProgress event is called each time the internal input buffer of
-  compressed data is exhausted and the next block is read from the input stream.
-  This is useful for updating a progress indicator when you are reading a
-  large chunk of data from the decompression stream in a single call.}
-
-  TDecompressionStream = class(TCustomZlibStream)
-  public
-    constructor Create(Source: TStream);
-    destructor Destroy; override;
-    function Read(var Buffer; Count: Longint): Longint; override;
-    function Write(const Buffer; Count: Longint): Longint; override;
-    function Seek(Offset: Longint; Origin: Word): Longint; override;
-    property OnProgress;
-  end;
-
-
-
-{ CompressBuf compresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-  Out: OutBuf = ptr to newly allocated buffer containing decompressed data
-       OutBytes = number of bytes in OutBuf   }
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
-                      out OutBuf: Pointer; out OutBytes: Integer);
-
-
-{ DecompressBuf decompresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-       OutEstimate = zero, or est. size of the decompressed data
-  Out: OutBuf = ptr to newly allocated buffer containing decompressed data
-       OutBytes = number of bytes in OutBuf   }
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
- OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-
-{ DecompressToUserBuf decompresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-  Out: OutBuf = ptr to user-allocated buffer to contain decompressed data
-       BufSize = number of bytes in OutBuf   }
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
-  const OutBuf: Pointer; BufSize: Integer);
-
-const
-  zlib_version = '1.2.1';
-
-type
-  EZlibError = class(Exception);
-  ECompressionError = class(EZlibError);
-  EDecompressionError = class(EZlibError);
-
-implementation
-
-uses ZLibConst;
-
-const
-  Z_NO_FLUSH      = 0;
-  Z_PARTIAL_FLUSH = 1;
-  Z_SYNC_FLUSH    = 2;
-  Z_FULL_FLUSH    = 3;
-  Z_FINISH        = 4;
-
-  Z_OK            = 0;
-  Z_STREAM_END    = 1;
-  Z_NEED_DICT     = 2;
-  Z_ERRNO         = (-1);
-  Z_STREAM_ERROR  = (-2);
-  Z_DATA_ERROR    = (-3);
-  Z_MEM_ERROR     = (-4);
-  Z_BUF_ERROR     = (-5);
-  Z_VERSION_ERROR = (-6);
-
-  Z_NO_COMPRESSION       =   0;
-  Z_BEST_SPEED           =   1;
-  Z_BEST_COMPRESSION     =   9;
-  Z_DEFAULT_COMPRESSION  = (-1);
-
-  Z_FILTERED            = 1;
-  Z_HUFFMAN_ONLY        = 2;
-  Z_RLE                 = 3;
-  Z_DEFAULT_STRATEGY    = 0;
-
-  Z_BINARY   = 0;
-  Z_ASCII    = 1;
-  Z_UNKNOWN  = 2;
-
-  Z_DEFLATED = 8;
-
-
-{$L adler32.obj}
-{$L compress.obj}
-{$L crc32.obj}
-{$L deflate.obj}
-{$L infback.obj}
-{$L inffast.obj}
-{$L inflate.obj}
-{$L inftrees.obj}
-{$L trees.obj}
-{$L uncompr.obj}
-{$L zutil.obj}
-
-procedure adler32; external;
-procedure compressBound; external;
-procedure crc32; external;
-procedure deflateInit2_; external;
-procedure deflateParams; external;
-
-function _malloc(Size: Integer): Pointer; cdecl;
-begin
-  Result := AllocMem(Size);
-end;
-
-procedure _free(Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
-begin
-  FillChar(P^, count, B);
-end;
-
-procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
-begin
-  Move(source^, dest^, count);
-end;
-
-
-
-// deflate compresses data
-function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
-  recsize: Integer): Integer; external;
-function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function deflateEnd(var strm: TZStreamRec): Integer; external;
-
-// inflate decompresses data
-function inflateInit_(var strm: TZStreamRec; version: PChar;
-  recsize: Integer): Integer; external;
-function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function inflateEnd(var strm: TZStreamRec): Integer; external;
-function inflateReset(var strm: TZStreamRec): Integer; external;
-
-
-function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
-begin
-//  GetMem(Result, Items*Size);
-  Result := AllocMem(Items * Size);
-end;
-
-procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-{function zlibCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise EZlibError.Create('error');    //!!
-end;}
-
-function CCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise ECompressionError.Create('error'); //!!
-end;
-
-function DCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise EDecompressionError.Create('error');  //!!
-end;
-
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
-                      out OutBuf: Pointer; out OutBytes: Integer);
-var
-  strm: TZStreamRec;
-  P: Pointer;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
-  GetMem(OutBuf, OutBytes);
-  try
-    strm.next_in := InBuf;
-    strm.avail_in := InBytes;
-    strm.next_out := OutBuf;
-    strm.avail_out := OutBytes;
-    CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm)));
-    try
-      while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
-      begin
-        P := OutBuf;
-        Inc(OutBytes, 256);
-        ReallocMem(OutBuf, OutBytes);
-        strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
-        strm.avail_out := 256;
-      end;
-    finally
-      CCheck(deflateEnd(strm));
-    end;
-    ReallocMem(OutBuf, strm.total_out);
-    OutBytes := strm.total_out;
-  except
-    FreeMem(OutBuf);
-    raise
-  end;
-end;
-
-
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
-  OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-var
-  strm: TZStreamRec;
-  P: Pointer;
-  BufInc: Integer;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  BufInc := (InBytes + 255) and not 255;
-  if OutEstimate = 0 then
-    OutBytes := BufInc
-  else
-    OutBytes := OutEstimate;
-  GetMem(OutBuf, OutBytes);
-  try
-    strm.next_in := InBuf;
-    strm.avail_in := InBytes;
-    strm.next_out := OutBuf;
-    strm.avail_out := OutBytes;
-    DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
-    try
-      while DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END do
-      begin
-        P := OutBuf;
-        Inc(OutBytes, BufInc);
-        ReallocMem(OutBuf, OutBytes);
-        strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
-        strm.avail_out := BufInc;
-      end;
-    finally
-      DCheck(inflateEnd(strm));
-    end;
-    ReallocMem(OutBuf, strm.total_out);
-    OutBytes := strm.total_out;
-  except
-    FreeMem(OutBuf);
-    raise
-  end;
-end;
-
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
-  const OutBuf: Pointer; BufSize: Integer);
-var
-  strm: TZStreamRec;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  strm.next_in := InBuf;
-  strm.avail_in := InBytes;
-  strm.next_out := OutBuf;
-  strm.avail_out := BufSize;
-  DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
-  try
-    if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then
-      raise EZlibError.CreateRes(@sTargetBufferTooSmall);
-  finally
-    DCheck(inflateEnd(strm));
-  end;
-end;
-
-// TCustomZlibStream
-
-constructor TCustomZLibStream.Create(Strm: TStream);
-begin
-  inherited Create;
-  FStrm := Strm;
-  FStrmPos := Strm.Position;
-  FZRec.zalloc := zlibAllocMem;
-  FZRec.zfree := zlibFreeMem;
-end;
-
-procedure TCustomZLibStream.Progress(Sender: TObject);
-begin
-  if Assigned(FOnProgress) then FOnProgress(Sender);
-end;
-
-
-// TCompressionStream
-
-constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
-  Dest: TStream);
-const
-  Levels: array [TCompressionLevel] of ShortInt =
-    (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
-begin
-  inherited Create(Dest);
-  FZRec.next_out := FBuffer;
-  FZRec.avail_out := sizeof(FBuffer);
-  CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec)));
-end;
-
-destructor TCompressionStream.Destroy;
-begin
-  FZRec.next_in := nil;
-  FZRec.avail_in := 0;
-  try
-    if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-    while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
-      and (FZRec.avail_out = 0) do
-    begin
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
-      FZRec.next_out := FBuffer;
-      FZRec.avail_out := sizeof(FBuffer);
-    end;
-    if FZRec.avail_out < sizeof(FBuffer) then
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
-  finally
-    deflateEnd(FZRec);
-  end;
-  inherited Destroy;
-end;
-
-function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
-  raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
-  FZRec.next_in := @Buffer;
-  FZRec.avail_in := Count;
-  if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-  while (FZRec.avail_in > 0) do
-  begin
-    CCheck(deflate(FZRec, 0));
-    if FZRec.avail_out = 0 then
-    begin
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
-      FZRec.next_out := FBuffer;
-      FZRec.avail_out := sizeof(FBuffer);
-      FStrmPos := FStrm.Position;
-      Progress(Self);
-    end;
-  end;
-  Result := Count;
-end;
-
-function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-begin
-  if (Offset = 0) and (Origin = soFromCurrent) then
-    Result := FZRec.total_in
-  else
-    raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.GetCompressionRate: Single;
-begin
-  if FZRec.total_in = 0 then
-    Result := 0
-  else
-    Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0;
-end;
-
-
-// TDecompressionStream
-
-constructor TDecompressionStream.Create(Source: TStream);
-begin
-  inherited Create(Source);
-  FZRec.next_in := FBuffer;
-  FZRec.avail_in := 0;
-  DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec)));
-end;
-
-destructor TDecompressionStream.Destroy;
-begin
-  FStrm.Seek(-FZRec.avail_in, 1);
-  inflateEnd(FZRec);
-  inherited Destroy;
-end;
-
-function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
-  FZRec.next_out := @Buffer;
-  FZRec.avail_out := Count;
-  if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-  while (FZRec.avail_out > 0) do
-  begin
-    if FZRec.avail_in = 0 then
-    begin
-      FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer));
-      if FZRec.avail_in = 0 then
-      begin
-        Result := Count - FZRec.avail_out;
-        Exit;
-      end;
-          FZRec.next_in := FBuffer;
-      FStrmPos := FStrm.Position;
-      Progress(Self);
-    end;
-    CCheck(inflate(FZRec, 0));
-  end;
-  Result := Count;
-end;
-
-function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
-  raise EDecompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-var
-  I: Integer;
-  Buf: array [0..4095] of Char;
-begin
-  if (Offset = 0) and (Origin = soFromBeginning) then
-  begin
-    DCheck(inflateReset(FZRec));
-    FZRec.next_in := FBuffer;
-    FZRec.avail_in := 0;
-    FStrm.Position := 0;
-    FStrmPos := 0;
-  end
-  else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
-          ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
-  begin
-    if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
-    if Offset > 0 then
-    begin
-      for I := 1 to Offset div sizeof(Buf) do
-        ReadBuffer(Buf, sizeof(Buf));
-      ReadBuffer(Buf, Offset mod sizeof(Buf));
-    end;
-  end
-  else
-    raise EDecompressionError.CreateRes(@sInvalidStreamOp);
-  Result := FZRec.total_out;
-end;
-
-
-end.
diff --git a/tkimg1.3/libz/contrib/delphi/ZLibConst.pas b/tkimg1.3/libz/contrib/delphi/ZLibConst.pas
deleted file mode 100644
index cdfe136..0000000
--- a/tkimg1.3/libz/contrib/delphi/ZLibConst.pas
+++ /dev/null
@@ -1,11 +0,0 @@
-unit ZLibConst;
-
-interface
-
-resourcestring
-  sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';
-  sInvalidStreamOp = 'Invalid stream operation';
-
-implementation
-
-end.
diff --git a/tkimg1.3/libz/contrib/delphi/readme.txt b/tkimg1.3/libz/contrib/delphi/readme.txt
deleted file mode 100644
index 2dc9a8b..0000000
--- a/tkimg1.3/libz/contrib/delphi/readme.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Overview
-========
-
-This directory contains an update to the ZLib interface unit,
-distributed by Borland as a Delphi supplemental component.
-
-The original ZLib unit is Copyright (c) 1997,99 Borland Corp.,
-and is based on zlib version 1.0.4.  There are a series of bugs
-and security problems associated with that old zlib version, and
-we recommend the users to update their ZLib unit.
-
-
-Summary of modifications
-========================
-
-- Improved makefile, adapted to zlib version 1.2.1.
-
-- Some field types from TZStreamRec are changed from Integer to
-  Longint, for consistency with the zlib.h header, and for 64-bit
-  readiness.
-
-- The zlib_version constant is updated.
-
-- The new Z_RLE strategy has its corresponding symbolic constant.
-
-- The allocation and deallocation functions and function types
-  (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl,
-  and _malloc and _free are added as C RTL stubs.  As a result,
-  the original C sources of zlib can be compiled out of the box,
-  and linked to the ZLib unit.
-
-
-Suggestions for improvements
-============================
-
-Currently, the ZLib unit provides only a limited wrapper around
-the zlib library, and much of the original zlib functionality is
-missing.  Handling compressed file formats like ZIP/GZIP or PNG
-cannot be implemented without having this functionality.
-Applications that handle these formats are either using their own,
-duplicated code, or not using the ZLib unit at all.
-
-Here are a few suggestions:
-
-- Checksum class wrappers around adler32() and crc32(), similar
-  to the Java classes that implement the java.util.zip.Checksum
-  interface.
-
-- The ability to read and write raw deflate streams, without the
-  zlib stream header and trailer.  Raw deflate streams are used
-  in the ZIP file format.
-
-- The ability to read and write gzip streams, used in the GZIP
-  file format, and normally produced by the gzip program.
-
-- The ability to select a different compression strategy, useful
-  to PNG and MNG image compression, and to multimedia compression
-  in general.  Besides the compression level
-
-    TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
-  which, in fact, could have used the 'z' prefix and avoided
-  TColor-like symbols
-
-    TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax);
-
-  there could be a compression strategy
-
-    TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle);
-
-- ZIP and GZIP stream handling via TStreams.
-
-
---
-Cosmin Truta <cosmint at cs.ubbcluj.ro>
diff --git a/tkimg1.3/libz/contrib/delphi/zlibd32.mak b/tkimg1.3/libz/contrib/delphi/zlibd32.mak
deleted file mode 100644
index 88fafa0..0000000
--- a/tkimg1.3/libz/contrib/delphi/zlibd32.mak
+++ /dev/null
@@ -1,93 +0,0 @@
-# Makefile for zlib
-# For use with Delphi and C++ Builder under Win32
-# Updated for zlib 1.2.x by Cosmin Truta
-
-# ------------ Borland C++ ------------
-
-# This project uses the Delphi (fastcall/register) calling convention:
-LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
-
-CC = bcc32
-LD = bcc32
-AR = tlib
-# do not use "-pr" in CFLAGS
-CFLAGS = -a -d -k- -O2 $(LOC)
-LDFLAGS =
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
-
diff --git a/tkimg1.3/libz/contrib/gzappend/gzappend.c b/tkimg1.3/libz/contrib/gzappend/gzappend.c
deleted file mode 100644
index f2e9e4f..0000000
--- a/tkimg1.3/libz/contrib/gzappend/gzappend.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* gzappend -- command to append to a gzip file
-
-  Copyright (C) 2003 Mark Adler, all rights reserved
-  version 1.1, 4 Nov 2003
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0  19 Oct 2003     - First version
- * 1.1   4 Nov 2003     - Expand and clarify some comments and notes
- *                      - Add version and copyright to help
- *                      - Send help to stdout instead of stderr
- *                      - Add some preemptive typecasts
- *                      - Add L to constants in lseek() calls
- *                      - Remove some debugging information in error messages
- *                      - Use new data_type definition for zlib 1.2.1
- *                      - Simplfy and unify file operations
- *                      - Finish off gzip file in gztack()
- *                      - Use deflatePrime() instead of adding empty blocks
- *                      - Keep gzip file clean on appended file read errors
- *                      - Use in-place rotate instead of auxiliary buffer
- *                        (Why you ask?  Because it was fun to write!)
- */
-
-/*
-   gzappend takes a gzip file and appends to it, compressing files from the
-   command line or data from stdin.  The gzip file is written to directly, to
-   avoid copying that file, in case it's large.  Note that this results in the
-   unfriendly behavior that if gzappend fails, the gzip file is corrupted.
-
-   This program was written to illustrate the use of the new Z_BLOCK option of
-   zlib 1.2.1's inflate() function.  This option returns from inflate() at each
-   block boundary to facilitate locating and modifying the last block bit at
-   the start of the final deflate block.  Also whether using Z_BLOCK or not,
-   another required feature of zlib 1.2.1 is that inflate() now provides the
-   number of unusued bits in the last input byte used.  gzappend will not work
-   with versions of zlib earlier than 1.2.1.
-
-   gzappend first decompresses the gzip file internally, discarding all but
-   the last 32K of uncompressed data, and noting the location of the last block
-   bit and the number of unused bits in the last byte of the compressed data.
-   The gzip trailer containing the CRC-32 and length of the uncompressed data
-   is verified.  This trailer will be later overwritten.
-
-   Then the last block bit is cleared by seeking back in the file and rewriting
-   the byte that contains it.  Seeking forward, the last byte of the compressed
-   data is saved along with the number of unused bits to initialize deflate.
-
-   A deflate process is initialized, using the last 32K of the uncompressed
-   data from the gzip file to initialize the dictionary.  If the total
-   uncompressed data was less than 32K, then all of it is used to initialize
-   the dictionary.  The deflate output bit buffer is also initialized with the
-   last bits from the original deflate stream.  From here on, the data to
-   append is simply compressed using deflate, and written to the gzip file.
-   When that is complete, the new CRC-32 and uncompressed length are written
-   as the trailer of the gzip file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "zlib.h"
-
-#define local static
-#define LGCHUNK 14
-#define CHUNK (1U << LGCHUNK)
-#define DSIZE 32768U
-
-/* print an error message and terminate with extreme prejudice */
-local void bye(char *msg1, char *msg2)
-{
-    fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2);
-    exit(1);
-}
-
-/* return the greatest common divisor of a and b using Euclid's algorithm,
-   modified to be fast when one argument much greater than the other, and
-   coded to avoid unnecessary swapping */
-local unsigned gcd(unsigned a, unsigned b)
-{
-    unsigned c;
-
-    while (a && b)
-        if (a > b) {
-            c = b;
-            while (a - c >= c)
-                c <<= 1;
-            a -= c;
-        }
-        else {
-            c = a;
-            while (b - c >= c)
-                c <<= 1;
-            b -= c;
-        }
-    return a + b;
-}
-
-/* rotate list[0..len-1] left by rot positions, in place */
-local void rotate(unsigned char *list, unsigned len, unsigned rot)
-{
-    unsigned char tmp;
-    unsigned cycles;
-    unsigned char *start, *last, *to, *from;
-
-    /* normalize rot and handle degenerate cases */
-    if (len < 2) return;
-    if (rot >= len) rot %= len;
-    if (rot == 0) return;
-
-    /* pointer to last entry in list */
-    last = list + (len - 1);
-
-    /* do simple left shift by one */
-    if (rot == 1) {
-        tmp = *list;
-        memcpy(list, list + 1, len - 1);
-        *last = tmp;
-        return;
-    }
-
-    /* do simple right shift by one */
-    if (rot == len - 1) {
-        tmp = *last;
-        memmove(list + 1, list, len - 1);
-        *list = tmp;
-        return;
-    }
-
-    /* otherwise do rotate as a set of cycles in place */
-    cycles = gcd(len, rot);             /* number of cycles */
-    do {
-        start = from = list + cycles;   /* start index is arbitrary */
-        tmp = *from;                    /* save entry to be overwritten */
-        for (;;) {
-            to = from;                  /* next step in cycle */
-            from += rot;                /* go right rot positions */
-            if (from > last) from -= len;   /* (pointer better not wrap) */
-            if (from == start) break;   /* all but one shifted */
-            *to = *from;                /* shift left */
-        }
-        *to = tmp;                      /* complete the circle */
-    } while (--cycles);
-}
-
-/* structure for gzip file read operations */
-typedef struct {
-    int fd;                     /* file descriptor */
-    int size;                   /* 1 << size is bytes in buf */
-    unsigned left;              /* bytes available at next */
-    unsigned char *buf;         /* buffer */
-    unsigned char *next;        /* next byte in buffer */
-    char *name;                 /* file name for error messages */
-} file;
-
-/* reload buffer */
-local int readin(file *in)
-{
-    int len;
-
-    len = read(in->fd, in->buf, 1 << in->size);
-    if (len == -1) bye("error reading ", in->name);
-    in->left = (unsigned)len;
-    in->next = in->buf;
-    return len;
-}
-
-/* read from file in, exit if end-of-file */
-local int readmore(file *in)
-{
-    if (readin(in) == 0) bye("unexpected end of ", in->name);
-    return 0;
-}
-
-#define read1(in) (in->left == 0 ? readmore(in) : 0, \
-                   in->left--, *(in->next)++)
-
-/* skip over n bytes of in */
-local void skip(file *in, unsigned n)
-{
-    unsigned bypass;
-
-    if (n > in->left) {
-        n -= in->left;
-        bypass = n & ~((1U << in->size) - 1);
-        if (bypass) {
-            if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1)
-                bye("seeking ", in->name);
-            n -= bypass;
-        }
-        readmore(in);
-        if (n > in->left)
-            bye("unexpected end of ", in->name);
-    }
-    in->left -= n;
-    in->next += n;
-}
-
-/* read a four-byte unsigned integer, little-endian, from in */
-unsigned long read4(file *in)
-{
-    unsigned long val;
-
-    val = read1(in);
-    val += (unsigned)read1(in) << 8;
-    val += (unsigned long)read1(in) << 16;
-    val += (unsigned long)read1(in) << 24;
-    return val;
-}
-
-/* skip over gzip header */
-local void gzheader(file *in)
-{
-    int flags;
-    unsigned n;
-
-    if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file");
-    if (read1(in) != 8) bye("unknown compression method in", in->name);
-    flags = read1(in);
-    if (flags & 0xe0) bye("unknown header flags set in", in->name);
-    skip(in, 6);
-    if (flags & 4) {
-        n = read1(in);
-        n += (unsigned)(read1(in)) << 8;
-        skip(in, n);
-    }
-    if (flags & 8) while (read1(in) != 0) ;
-    if (flags & 16) while (read1(in) != 0) ;
-    if (flags & 2) skip(in, 2);
-}
-
-/* decompress gzip file "name", return strm with a deflate stream ready to
-   continue compression of the data in the gzip file, and return a file
-   descriptor pointing to where to write the compressed data -- the deflate
-   stream is initialized to compress using level "level" */
-local int gzscan(char *name, z_stream *strm, int level)
-{
-    int ret, lastbit, left, full;
-    unsigned have;
-    unsigned long crc, tot;
-    unsigned char *window;
-    off_t lastoff, end;
-    file gz;
-
-    /* open gzip file */
-    gz.name = name;
-    gz.fd = open(name, O_RDWR, 0);
-    if (gz.fd == -1) bye("cannot open ", name);
-    gz.buf = malloc(CHUNK);
-    if (gz.buf == NULL) bye("out of memory", "");
-    gz.size = LGCHUNK;
-    gz.left = 0;
-
-    /* skip gzip header */
-    gzheader(&gz);
-
-    /* prepare to decompress */
-    window = malloc(DSIZE);
-    if (window == NULL) bye("out of memory", "");
-    strm->zalloc = Z_NULL;
-    strm->zfree = Z_NULL;
-    strm->opaque = Z_NULL;
-    ret = inflateInit2(strm, -15);
-    if (ret != Z_OK) bye("out of memory", " or library mismatch");
-
-    /* decompress the deflate stream, saving append information */
-    lastbit = 0;
-    lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-    left = 0;
-    strm->avail_in = gz.left;
-    strm->next_in = gz.next;
-    crc = crc32(0L, Z_NULL, 0);
-    have = full = 0;
-    do {
-        /* if needed, get more input */
-        if (strm->avail_in == 0) {
-            readmore(&gz);
-            strm->avail_in = gz.left;
-            strm->next_in = gz.next;
-        }
-
-        /* set up output to next available section of sliding window */
-        strm->avail_out = DSIZE - have;
-        strm->next_out = window + have;
-
-        /* inflate and check for errors */
-        ret = inflate(strm, Z_BLOCK);
-        if (ret == Z_STREAM_ERROR) bye("internal stream error!", "");
-        if (ret == Z_MEM_ERROR) bye("out of memory", "");
-        if (ret == Z_DATA_ERROR)
-            bye("invalid compressed data--format violated in", name);
-
-        /* update crc and sliding window pointer */
-        crc = crc32(crc, window + have, DSIZE - have - strm->avail_out);
-        if (strm->avail_out)
-            have = DSIZE - strm->avail_out;
-        else {
-            have = 0;
-            full = 1;
-        }
-
-        /* process end of block */
-        if (strm->data_type & 128) {
-            if (strm->data_type & 64)
-                left = strm->data_type & 0x1f;
-            else {
-                lastbit = strm->data_type & 0x1f;
-                lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in;
-            }
-        }
-    } while (ret != Z_STREAM_END);
-    inflateEnd(strm);
-    gz.left = strm->avail_in;
-    gz.next = strm->next_in;
-
-    /* save the location of the end of the compressed data */
-    end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-
-    /* check gzip trailer and save total for deflate */
-    if (crc != read4(&gz))
-        bye("invalid compressed data--crc mismatch in ", name);
-    tot = strm->total_out;
-    if ((tot & 0xffffffffUL) != read4(&gz))
-        bye("invalid compressed data--length mismatch in", name);
-
-    /* if not at end of file, warn */
-    if (gz.left || readin(&gz))
-        fprintf(stderr,
-            "gzappend warning: junk at end of gzip file overwritten\n");
-
-    /* clear last block bit */
-    lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET);
-    if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-    *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7)));
-    lseek(gz.fd, -1L, SEEK_CUR);
-    if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name);
-
-    /* if window wrapped, build dictionary from window by rotating */
-    if (full) {
-        rotate(window, DSIZE, have);
-        have = DSIZE;
-    }
-
-    /* set up deflate stream with window, crc, total_in, and leftover bits */
-    ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
-    if (ret != Z_OK) bye("out of memory", "");
-    deflateSetDictionary(strm, window, have);
-    strm->adler = crc;
-    strm->total_in = tot;
-    if (left) {
-        lseek(gz.fd, --end, SEEK_SET);
-        if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-        deflatePrime(strm, 8 - left, *gz.buf);
-    }
-    lseek(gz.fd, end, SEEK_SET);
-
-    /* clean up and return */
-    free(window);
-    free(gz.buf);
-    return gz.fd;
-}
-
-/* append file "name" to gzip file gd using deflate stream strm -- if last
-   is true, then finish off the deflate stream at the end */
-local void gztack(char *name, int gd, z_stream *strm, int last)
-{
-    int fd, len, ret;
-    unsigned left;
-    unsigned char *in, *out;
-
-    /* open file to compress and append */
-    fd = 0;
-    if (name != NULL) {
-        fd = open(name, O_RDONLY, 0);
-        if (fd == -1)
-            fprintf(stderr, "gzappend warning: %s not found, skipping ...\n",
-                    name);
-    }
-
-    /* allocate buffers */
-    in = fd == -1 ? NULL : malloc(CHUNK);
-    out = malloc(CHUNK);
-    if (out == NULL) bye("out of memory", "");
-
-    /* compress input file and append to gzip file */
-    do {
-        /* get more input */
-        len = fd == -1 ? 0 : read(fd, in, CHUNK);
-        if (len == -1) {
-            fprintf(stderr,
-                    "gzappend warning: error reading %s, skipping rest ...\n",
-                    name);
-            len = 0;
-        }
-        strm->avail_in = (unsigned)len;
-        strm->next_in = in;
-        if (len) strm->adler = crc32(strm->adler, in, (unsigned)len);
-
-        /* compress and write all available output */
-        do {
-            strm->avail_out = CHUNK;
-            strm->next_out = out;
-            ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH);
-            left = CHUNK - strm->avail_out;
-            while (left) {
-                len = write(gd, out + CHUNK - strm->avail_out - left, left);
-                if (len == -1) bye("writing gzip file", "");
-                left -= (unsigned)len;
-            }
-        } while (strm->avail_out == 0 && ret != Z_STREAM_END);
-    } while (len != 0);
-
-    /* write trailer after last entry */
-    if (last) {
-        deflateEnd(strm);
-        out[0] = (unsigned char)(strm->adler);
-        out[1] = (unsigned char)(strm->adler >> 8);
-        out[2] = (unsigned char)(strm->adler >> 16);
-        out[3] = (unsigned char)(strm->adler >> 24);
-        out[4] = (unsigned char)(strm->total_in);
-        out[5] = (unsigned char)(strm->total_in >> 8);
-        out[6] = (unsigned char)(strm->total_in >> 16);
-        out[7] = (unsigned char)(strm->total_in >> 24);
-        len = 8;
-        do {
-            ret = write(gd, out + 8 - len, len);
-            if (ret == -1) bye("writing gzip file", "");
-            len -= ret;
-        } while (len);
-        close(gd);
-    }
-
-    /* clean up and return */
-    free(out);
-    if (in != NULL) free(in);
-    if (fd > 0) close(fd);
-}
-
-/* process the compression level option if present, scan the gzip file, and
-   append the specified files, or append the data from stdin if no other file
-   names are provided on the command line -- the gzip file must be writable
-   and seekable */
-int main(int argc, char **argv)
-{
-    int gd, level;
-    z_stream strm;
-
-    /* ignore command name */
-    argv++;
-
-    /* provide usage if no arguments */
-    if (*argv == NULL) {
-        printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n");
-        printf(
-            "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n");
-        return 0;
-    }
-
-    /* set compression level */
-    level = Z_DEFAULT_COMPRESSION;
-    if (argv[0][0] == '-') {
-        if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0)
-            bye("invalid compression level", "");
-        level = argv[0][1] - '0';
-        if (*++argv == NULL) bye("no gzip file name after options", "");
-    }
-
-    /* prepare to append to gzip file */
-    gd = gzscan(*argv++, &strm, level);
-
-    /* append files on command line, or from stdin if none */
-    if (*argv == NULL)
-        gztack(NULL, gd, &strm, 1);
-    else
-        do {
-            gztack(*argv, gd, &strm, argv[1] == NULL);
-        } while (*++argv != NULL);
-    return 0;
-}
diff --git a/tkimg1.3/libz/contrib/infback9/README b/tkimg1.3/libz/contrib/infback9/README
deleted file mode 100644
index e75ed13..0000000
--- a/tkimg1.3/libz/contrib/infback9/README
+++ /dev/null
@@ -1 +0,0 @@
-See infback9.h for what this is and how to use it.
diff --git a/tkimg1.3/libz/contrib/infback9/infback9.c b/tkimg1.3/libz/contrib/infback9/infback9.c
deleted file mode 100644
index 34a95fc..0000000
--- a/tkimg1.3/libz/contrib/infback9/infback9.c
+++ /dev/null
@@ -1,605 +0,0 @@
-/* infback9.c -- inflate deflate64 data using a call-back interface
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infback9.h"
-#include "inftree9.h"
-#include "inflate9.h"
-
-#define WSIZE 65536UL
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   window is a user-supplied window and output buffer that is 64K bytes.
- */
-int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
-z_stream FAR *strm;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (voidpf)state;
-    state->window = window;
-    return Z_OK;
-}
-
-/*
-   Build and output length and distance decoding tables for fixed code
-   decoding.
- */
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-void makefixed9(void)
-{
-    unsigned sym, bits, low, size;
-    code *next, *lenfix, *distfix;
-    struct inflate_state state;
-    code fixed[544];
-
-    /* literal/length table */
-    sym = 0;
-    while (sym < 144) state.lens[sym++] = 8;
-    while (sym < 256) state.lens[sym++] = 9;
-    while (sym < 280) state.lens[sym++] = 7;
-    while (sym < 288) state.lens[sym++] = 8;
-    next = fixed;
-    lenfix = next;
-    bits = 9;
-    inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work);
-
-    /* distance table */
-    sym = 0;
-    while (sym < 32) state.lens[sym++] = 5;
-    distfix = next;
-    bits = 5;
-    inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work);
-
-    /* write tables */
-    puts("    /* inffix9.h -- table for decoding deflate64 fixed codes");
-    puts("     * Generated automatically by makefixed9().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits,
-               lenfix[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 5) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits,
-               distfix[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/* Macros for inflateBack(): */
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n <= 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = window; \
-            left = WSIZE; \
-            wrap = 1; \
-            if (out(out_desc, put, (unsigned)left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
-z_stream FAR *strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have;              /* available input */
-    unsigned long left;         /* available output */
-    inflate_mode mode;          /* current inflate mode */
-    int lastblock;              /* true if processing last block */
-    int wrap;                   /* true if the window has wrapped */
-    unsigned long write;        /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned extra;             /* extra bits needed */
-    unsigned long length;       /* literal or length of data to copy */
-    unsigned long offset;       /* distance back to copy string from */
-    unsigned long copy;         /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-#include "inffix9.h"
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    mode = TYPE;
-    lastblock = 0;
-    write = 0;
-    wrap = 0;
-    window = state->window;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = window;
-    left = WSIZE;
-    lencode = Z_NULL;
-    distcode = Z_NULL;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (lastblock) {
-                BYTEBITS();
-                mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            lastblock = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                lencode = lenfix;
-                lenbits = 9;
-                distcode = distfix;
-                distbits = 5;
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = LEN;                     /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                mode = BAD;
-                break;
-            }
-            length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %lu\n",
-                    length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (length != 0) {
-                copy = length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-            if (state->nlen > 286) {
-                strm->msg = (char *)"too many length symbols";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            lencode = (code const FAR *)(state->next);
-            lenbits = 7;
-            ret = inflate_table9(CODES, state->lens, 19, &(state->next),
-                                &(lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = lencode[BITS(lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* build code tables */
-            state->next = state->codes;
-            lencode = (code const FAR *)(state->next);
-            lenbits = 9;
-            ret = inflate_table9(LENS, state->lens, state->nlen,
-                            &(state->next), &(lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                mode = BAD;
-                break;
-            }
-            distcode = (code const FAR *)(state->next);
-            distbits = 6;
-            ret = inflate_table9(DISTS, state->lens + state->nlen,
-                            state->ndist, &(state->next), &(distbits),
-                            state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            mode = LEN;
-
-        case LEN:
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                this = lencode[BITS(lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            length = (unsigned)this.val;
-
-            /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                ROOM();
-                *put++ = (unsigned char)(length);
-                left--;
-                mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            extra = (unsigned)(this.op) & 31;
-            if (extra != 0) {
-                NEEDBITS(extra);
-                length += BITS(extra);
-                DROPBITS(extra);
-            }
-            Tracevv((stderr, "inflate:         length %lu\n", length));
-
-            /* get distance code */
-            for (;;) {
-                this = distcode[BITS(distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                mode = BAD;
-                break;
-            }
-            offset = (unsigned)this.val;
-
-            /* get distance extra bits, if any */
-            extra = (unsigned)(this.op) & 15;
-            if (extra != 0) {
-                NEEDBITS(extra);
-                offset += BITS(extra);
-                DROPBITS(extra);
-            }
-            if (offset > WSIZE - (wrap ? 0: left)) {
-                strm->msg = (char *)"invalid distance too far back";
-                mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %lu\n", offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = WSIZE - offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - offset;
-                    copy = left;
-                }
-                if (copy > length) copy = length;
-                length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < WSIZE) {
-                if (out(out_desc, window, (unsigned)(WSIZE - left)))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBack9End(strm)
-z_stream FAR *strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
diff --git a/tkimg1.3/libz/contrib/infback9/infback9.h b/tkimg1.3/libz/contrib/infback9/infback9.h
deleted file mode 100644
index 10bf58c..0000000
--- a/tkimg1.3/libz/contrib/infback9/infback9.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* infback9.h -- header for using inflateBack9 functions
- * Copyright (C) 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * This header file and associated patches provide a decoder for PKWare's
- * undocumented deflate64 compression method (method 9).  Use with infback9.c,
- * inftree9.h, inftree9.c, and inffix9.h.  These patches are not supported.
- * This should be compiled with zlib, since it uses zutil.h and zutil.o.
- * This code has not yet been tested on 16-bit architectures.  See the
- * comments in zlib.h for inflateBack() usage.  These functions are used
- * identically, except that there is no windowBits parameter, and a 64K
- * window must be provided.  Also if int's are 16 bits, then a zero for
- * the third parameter of the "out" function actually means 65536UL.
- * zlib.h must be included before this header file.
- */
-
-ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
-ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define inflateBack9Init(strm, window) \
-        inflateBack9Init_((strm), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
diff --git a/tkimg1.3/libz/contrib/infback9/inffix9.h b/tkimg1.3/libz/contrib/infback9/inffix9.h
deleted file mode 100644
index ee5671d..0000000
--- a/tkimg1.3/libz/contrib/infback9/inffix9.h
+++ /dev/null
@@ -1,107 +0,0 @@
-    /* inffix9.h -- table for decoding deflate64 fixed codes
-     * Generated automatically by makefixed9().
-     */
-
-    /* WARNING: this file should *not* be used by applications.
-       It is part of the implementation of this library and is
-       subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112},
-        {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160},
-        {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88},
-        {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208},
-        {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136},
-        {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227},
-        {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},
-        {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124},
-        {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184},
-        {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82},
-        {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196},
-        {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130},
-        {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106},
-        {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},
-        {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118},
-        {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94},
-        {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220},
-        {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131},
-        {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97},
-        {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226},
-        {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121},
-        {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178},
-        {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85},
-        {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},
-        {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154},
-        {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109},
-        {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250},
-        {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115},
-        {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166},
-        {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214},
-        {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},
-        {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0},
-        {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103},
-        {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238},
-        {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127},
-        {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},
-        {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193},
-        {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145},
-        {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104},
-        {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241},
-        {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169},
-        {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92},
-        {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217},
-        {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140},
-        {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163},
-        {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98},
-        {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122},
-        {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181},
-        {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86},
-        {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205},
-        {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134},
-        {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157},
-        {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},
-        {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113},
-        {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89},
-        {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211},
-        {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137},
-        {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3},
-        {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101},
-        {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},
-        {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125},
-        {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187},
-        {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83},
-        {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199},
-        {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151},
-        {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107},
-        {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247},
-        {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119},
-        {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175},
-        {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95},
-        {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},
-        {0,8,79},{0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5},
-        {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513},
-        {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129},
-        {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145},
-        {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4},
-        {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073},
-        {134,5,193},{142,5,49153}
-    };
diff --git a/tkimg1.3/libz/contrib/infback9/inflate9.h b/tkimg1.3/libz/contrib/infback9/inflate9.h
deleted file mode 100644
index ee9a793..0000000
--- a/tkimg1.3/libz/contrib/infback9/inflate9.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* inflate9.h -- internal inflate state definition
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-            LEN,        /* i: waiting for length/lit code */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD         /* got a data error -- remain here until reset */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to the BAD mode -- not shown for clarity)
-
-    Read deflate blocks:
-            TYPE -> STORED or TABLE or LEN or DONE
-            STORED -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN
-    Read deflate codes:
-                LEN -> LEN or TYPE
- */
-
-/* state maintained between inflate() calls.  Approximately 7K bytes. */
-struct inflate_state {
-        /* sliding window */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-};
diff --git a/tkimg1.3/libz/contrib/infback9/inftree9.c b/tkimg1.3/libz/contrib/infback9/inftree9.c
deleted file mode 100644
index fe76a1b..0000000
--- a/tkimg1.3/libz/contrib/infback9/inftree9.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* inftree9.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftree9.h"
-
-#define MAXBITS 15
-
-const char inflate9_copyright[] =
-   " inflate9 1.2.1 Copyright 1995-2003 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int inflate_table9(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code this;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17,
-        19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115,
-        131, 163, 195, 227, 3, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
-        130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
-        133, 133, 133, 133, 144, 76, 66};
-    static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
-        65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
-        4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153};
-    static const unsigned short dext[32] = { /* Distance codes 0..31 extra */
-        128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132,
-        133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
-        139, 139, 140, 140, 141, 141, 142, 142};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) return -1;            /* no codes! */
-    for (min = 1; min <= MAXBITS; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || (codes - count[0] != 1)))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        this.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            this.op = (unsigned char)0;
-            this.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            this.op = (unsigned char)(extra[work[sym]]);
-            this.val = base[work[sym]];
-        }
-        else {
-            this.op = (unsigned char)(32 + 64);         /* end of block */
-            this.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = this;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += 1U << curr;
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /*
-       Fill in rest of table for incomplete codes.  This loop is similar to the
-       loop above in incrementing huff for table indices.  It is assumed that
-       len is equal to curr + drop, so there is no loop needed to increment
-       through high index bits.  When the current sub-table is filled, the loop
-       drops back to the root table to fill in any remaining entries there.
-     */
-    this.op = (unsigned char)64;                /* invalid code marker */
-    this.bits = (unsigned char)(len - drop);
-    this.val = (unsigned short)0;
-    while (huff != 0) {
-        /* when done with sub-table, drop back to root table */
-        if (drop != 0 && (huff & mask) != low) {
-            drop = 0;
-            len = root;
-            next = *table;
-            curr = root;
-            this.bits = (unsigned char)len;
-        }
-
-        /* put invalid code marker in table */
-        next[huff >> drop] = this;
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
diff --git a/tkimg1.3/libz/contrib/infback9/inftree9.h b/tkimg1.3/libz/contrib/infback9/inftree9.h
deleted file mode 100644
index 6a699a7..0000000
--- a/tkimg1.3/libz/contrib/infback9/inftree9.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* inftree9.h -- header to use inftree9.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    100eeeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1004 code structures (850 for length/literals
-   and 154 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 1440
-#define MAXD 154
-
-/* Type of code to build for inftable() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
diff --git a/tkimg1.3/libz/contrib/inflate86/inffas86.c b/tkimg1.3/libz/contrib/inflate86/inffas86.c
deleted file mode 100644
index 4534693..0000000
--- a/tkimg1.3/libz/contrib/inflate86/inffas86.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/* inffas86.c is a hand tuned assembler version of
- *
- * inffast.c -- fast decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <christop at charm.net>
- * Please use the copyright conditions above.
- *
- * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
- * the gcc -S output of zlib-1.2.0/inffast.c.  Zlib-1.2.0 is in beta release at
- * the moment.  I have successfully compiled and tested this code with gcc2.96,
- * gcc3.2, icc5.0, msvc6.0.  It is very close to the speed of inffast.S
- * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
- * enabled.  I will attempt to merge the MMX code into this version.  Newer
- * versions of this and inffast.S can be found at
- * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* Mark Adler's comments from inffast.c: */
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    struct inffast_ar {
-      void *esp;                  /* esp save */
-      unsigned char FAR *in;      /* local strm->next_in */
-      unsigned char FAR *last;    /* while in < last, enough input available */
-      unsigned char FAR *out;     /* local strm->next_out */
-      unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
-      unsigned char FAR *end;     /* while out < end, enough space available */
-      unsigned wsize;             /* window size or zero if not using window */
-      unsigned write;             /* window write index */
-      unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
-      unsigned long hold;         /* local strm->hold */
-      unsigned bits;              /* local strm->bits */
-      code const FAR *lcode;      /* local strm->lencode */
-      code const FAR *dcode;      /* local strm->distcode */
-      unsigned lmask;             /* mask for first level of length codes */
-      unsigned dmask;             /* mask for first level of distance codes */
-      unsigned len;               /* match length, unused bytes */
-      unsigned dist;              /* match distance */
-      unsigned status;            /* this is set when state changes */
-    } ar;
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    ar.in = strm->next_in;
-    ar.last = ar.in + (strm->avail_in - 5);
-    ar.out = strm->next_out;
-    ar.beg = ar.out - (start - strm->avail_out);
-    ar.end = ar.out + (strm->avail_out - 257);
-    ar.wsize = state->wsize;
-    ar.write = state->write;
-    ar.window = state->window;
-    ar.hold = state->hold;
-    ar.bits = state->bits;
-    ar.lcode = state->lencode;
-    ar.dcode = state->distcode;
-    ar.lmask = (1U << state->lenbits) - 1;
-    ar.dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-
-    /* align in on 2 byte boundary */
-    if (((unsigned long)(void *)ar.in & 0x1) != 0) {
-        ar.hold += (unsigned long)*ar.in++ << ar.bits;
-        ar.bits += 8;
-    }
-
-#if defined( __GNUC__ ) || defined( __ICC )
-    __asm__ __volatile__ (
-"        leal    %0, %%eax\n"
-"        pushf\n"
-"        pushl   %%ebp\n"
-"        movl    %%esp, (%%eax)\n"
-"        movl    %%eax, %%esp\n"
-"        movl    4(%%esp), %%esi\n"       /* esi = in */
-"        movl    12(%%esp), %%edi\n"      /* edi = out */
-"        movl    36(%%esp), %%edx\n"      /* edx = hold */
-"        movl    40(%%esp), %%ebx\n"      /* ebx = bits */
-"        movl    44(%%esp), %%ebp\n"      /* ebp = lcode */
-
-"        cld\n"
-"        jmp     .L_do_loop\n"
-
-".L_while_test:\n"
-"        cmpl    %%edi, 20(%%esp)\n"
-"        jbe     .L_break_loop\n"
-"        cmpl    %%esi, 8(%%esp)\n"
-"        jbe     .L_break_loop\n"
-
-".L_do_loop:\n"
-"        cmpb    $15, %%bl\n"
-"        ja      .L_get_length_code\n"    /* if (15 < bits) */
-
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"        /* hold |= *((ushort *)in)++ << bits */
-
-".L_get_length_code:\n"
-"        movl    52(%%esp), %%eax\n"      /* eax = lmask */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        movl    (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[hold & lmask] */
-
-".L_dolen:\n"
-"        movb    %%ah, %%cl\n"            /* cl = this.bits */
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrl    %%cl, %%edx\n"           /* hold >>= this.bits */
-
-"        testb   %%al, %%al\n"
-"        jnz     .L_test_for_length_base\n" /* if (op != 0) 45.7% */
-
-"        shrl    $16, %%eax\n"            /* output this.val char */
-"        stosb\n"
-"        jmp     .L_while_test\n"
-
-".L_test_for_length_base:\n"
-"        movl    %%eax, %%ecx\n"          /* len = this */
-"        shrl    $16, %%ecx\n"            /* len = this.val */
-"        movl    %%ecx, 60(%%esp)\n"      /* len = this */
-"        movb    %%al, %%cl\n"
-
-"        testb   $16, %%al\n"
-"        jz      .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_decode_distance\n"    /* if (!op) */
-"        cmpb    %%cl, %%bl\n"
-"        jae     .L_add_bits_to_len\n"    /* if (op <= bits) */
-
-"        movb    %%cl, %%ch\n"            /* stash op in ch, freeing cl */
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"         /* hold |= *((ushort *)in)++ << bits */
-"        movb    %%ch, %%cl\n"            /* move op back to ecx */
-
-".L_add_bits_to_len:\n"
-"        movl    $1, %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        subb    %%cl, %%bl\n"
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrl    %%cl, %%edx\n"
-"        addl    %%eax, 60(%%esp)\n"      /* len += hold & mask[op] */
-
-".L_decode_distance:\n"
-"        cmpb    $15, %%bl\n"
-"        ja      .L_get_distance_code\n"  /* if (15 < bits) */
-
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"         /* hold |= *((ushort *)in)++ << bits */
-
-".L_get_distance_code:\n"
-"        movl    56(%%esp), %%eax\n"      /* eax = dmask */
-"        movl    48(%%esp), %%ecx\n"      /* ecx = dcode */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        movl    (%%ecx,%%eax,4), %%eax\n"/* eax = dcode[hold & dmask] */
-
-".L_dodist:\n"
-"        movl    %%eax, %%ebp\n"          /* dist = this */
-"        shrl    $16, %%ebp\n"            /* dist = this.val */
-"        movb    %%ah, %%cl\n"
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrl    %%cl, %%edx\n"           /* hold >>= this.bits */
-"        movb    %%al, %%cl\n"            /* cl = this.op */
-
-"        testb   $16, %%al\n"             /* if ((op & 16) == 0) */
-"        jz      .L_test_for_second_level_dist\n"
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_check_dist_one\n"
-"        cmpb    %%cl, %%bl\n"
-"        jae     .L_add_bits_to_dist\n"   /* if (op <= bits) 97.6% */
-
-"        movb    %%cl, %%ch\n"            /* stash op in ch, freeing cl */
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"        /* hold |= *((ushort *)in)++ << bits */
-"        movb    %%ch, %%cl\n"            /* move op back to ecx */
-
-".L_add_bits_to_dist:\n"
-"        movl    $1, %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"                 /* (1 << op) - 1 */
-"        subb    %%cl, %%bl\n"
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrl    %%cl, %%edx\n"
-"        addl    %%eax, %%ebp\n"          /* dist += hold & ((1 << op) - 1) */
-
-".L_check_window:\n"
-"        movl    %%esi, 4(%%esp)\n"       /* save in so from can use it's reg */
-"        movl    %%edi, %%eax\n"
-"        subl    16(%%esp), %%eax\n"      /* nbytes = out - beg */
-
-"        cmpl    %%ebp, %%eax\n"
-"        jb      .L_clip_window\n"        /* if (dist > nbytes) 4.2% */
-
-"        movl    60(%%esp), %%ecx\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"          /* from = out - dist */
-
-"        subl    $3, %%ecx\n"             /* copy from to out */
-"        movb    (%%esi), %%al\n"
-"        movb    %%al, (%%edi)\n"
-"        movb    1(%%esi), %%al\n"
-"        movb    2(%%esi), %%ah\n"
-"        addl    $3, %%esi\n"
-"        movb    %%al, 1(%%edi)\n"
-"        movb    %%ah, 2(%%edi)\n"
-"        addl    $3, %%edi\n"
-"        rep     movsb\n"
-
-"        movl    4(%%esp), %%esi\n"      /* move in back to %esi, toss from */
-"        movl    44(%%esp), %%ebp\n"     /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".L_check_dist_one:\n"
-"        cmpl    $1, %%ebp\n"            /* if dist 1, is a memset */
-"        jne     .L_check_window\n"
-"        cmpl    %%edi, 16(%%esp)\n"
-"        je      .L_check_window\n"
-
-"        decl    %%edi\n"
-"        movl    60(%%esp), %%ecx\n"
-"        movb    (%%edi), %%al\n"
-"        subl    $3, %%ecx\n"
-
-"        movb    %%al, 1(%%edi)\n"       /* memset out with from[-1] */
-"        movb    %%al, 2(%%edi)\n"
-"        movb    %%al, 3(%%edi)\n"
-"        addl    $4, %%edi\n"
-"        rep     stosb\n"
-"        movl    44(%%esp), %%ebp\n"      /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".L_test_for_second_level_length:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */
-
-"        movl    $1, %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    60(%%esp), %%eax\n"     /* eax += this.val */
-"        movl    (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/
-"        jmp     .L_dolen\n"
-
-".L_test_for_second_level_dist:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_invalid_distance_code\n" /* if ((op & 64) != 0) */
-
-"        movl    $1, %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    %%ebp, %%eax\n"         /* eax += this.val */
-"        movl    48(%%esp), %%ecx\n"     /* ecx = dcode */
-"        movl    (%%ecx,%%eax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/
-"        jmp     .L_dodist\n"
-
-".L_clip_window:\n"
-"        movl    %%eax, %%ecx\n"
-"        movl    24(%%esp), %%eax\n"     /* prepare for dist compare */
-"        negl    %%ecx\n"                /* nbytes = -nbytes */
-"        movl    32(%%esp), %%esi\n"     /* from = window */
-
-"        cmpl    %%ebp, %%eax\n"
-"        jb      .L_invalid_distance_too_far\n" /* if (dist > wsize) */
-
-"        addl    %%ebp, %%ecx\n"         /* nbytes = dist - nbytes */
-"        cmpl    $0, 28(%%esp)\n"
-"        jne     .L_wrap_around_window\n" /* if (write != 0) */
-
-"        subl    %%ecx, %%eax\n"
-"        addl    %%eax, %%esi\n"         /* from += wsize - nbytes */
-
-"        movl    60(%%esp), %%eax\n"
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy1\n"          /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy1\n"
-
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy1\n"          /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy1\n"
-
-".L_wrap_around_window:\n"
-"        movl    28(%%esp), %%eax\n"
-"        cmpl    %%eax, %%ecx\n"
-"        jbe     .L_contiguous_in_window\n" /* if (write >= nbytes) */
-
-"        addl    24(%%esp), %%esi\n"
-"        addl    %%eax, %%esi\n"
-"        subl    %%ecx, %%esi\n"         /* from += wsize + write - nbytes */
-"        subl    %%eax, %%ecx\n"         /* nbytes -= write */
-
-"        movl    60(%%esp), %%eax\n"
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy1\n"          /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    32(%%esp), %%esi\n"     /* from = window */
-"        movl    28(%%esp), %%ecx\n"     /* nbytes = write */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy1\n"          /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy1\n"
-
-".L_contiguous_in_window:\n"
-"        addl    %%eax, %%esi\n"
-"        subl    %%ecx, %%esi\n"         /* from += write - nbytes */
-
-"        movl    60(%%esp), %%eax\n"
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy1\n"          /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-
-".L_do_copy1:\n"
-"        movl    %%eax, %%ecx\n"
-"        rep     movsb\n"
-
-"        movl    4(%%esp), %%esi\n"      /* move in back to %esi, toss from */
-"        movl    44(%%esp), %%ebp\n"     /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".L_test_for_end_of_block:\n"
-"        testb   $32, %%al\n"
-"        jz      .L_invalid_literal_length_code\n"
-"        movl    $1, 68(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_literal_length_code:\n"
-"        movl    $2, 68(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_code:\n"
-"        movl    $3, 68(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_too_far:\n"
-"        movl    4(%%esp), %%esi\n"
-"        movl    $4, 68(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_break_loop:\n"
-"        movl    $0, 68(%%esp)\n"
-
-".L_break_loop_with_status:\n"
-/* put in, out, bits, and hold back into ar and pop esp */
-"        movl    %%esi, 4(%%esp)\n"
-"        movl    %%edi, 12(%%esp)\n"
-"        movl    %%ebx, 40(%%esp)\n"
-"        movl    %%edx, 36(%%esp)\n"
-"        movl    (%%esp), %%esp\n"
-"        popl    %%ebp\n"
-"        popf\n"
-          :
-          : "m" (ar)
-          : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"
-    );
-#elif defined( _MSC_VER )
-    __asm {
-	lea	eax, ar
-	pushfd
-	push	ebp
-	mov	[eax], esp
-	mov	esp, eax
-	mov	esi, [esp+4]       /* esi = in */
-	mov	edi, [esp+12]      /* edi = out */
-	mov	edx, [esp+36]      /* edx = hold */
-	mov	ebx, [esp+40]      /* ebx = bits */
-	mov	ebp, [esp+44]      /* ebp = lcode */
-
-	cld
-	jmp	L_do_loop
-
-L_while_test:
-	cmp	[esp+20], edi
-	jbe	L_break_loop
-	cmp	[esp+8], esi
-	jbe	L_break_loop
-
-L_do_loop:
-	cmp	bl, 15
-	ja	L_get_length_code    /* if (15 < bits) */
-
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax        /* hold |= *((ushort *)in)++ << bits */
-
-L_get_length_code:
-	mov	eax, [esp+52]      /* eax = lmask */
-	and	eax, edx          /* eax &= hold */
-	mov	eax, [ebp+eax*4] /* eax = lcode[hold & lmask] */
-
-L_dolen:
-	mov	cl, ah            /* cl = this.bits */
-	sub	bl, ah            /* bits -= this.bits */
-	shr	edx, cl           /* hold >>= this.bits */
-
-	test	al, al
-	jnz	L_test_for_length_base /* if (op != 0) 45.7% */
-
-	shr	eax, 16            /* output this.val char */
-	stosb
-	jmp	L_while_test
-
-L_test_for_length_base:
-	mov	ecx, eax          /* len = this */
-	shr	ecx, 16            /* len = this.val */
-	mov	[esp+60], ecx      /* len = this */
-	mov	cl, al
-
-	test	al, 16
-	jz	L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
-	and	cl, 15             /* op &= 15 */
-	jz	L_decode_distance    /* if (!op) */
-	cmp	bl, cl
-	jae	L_add_bits_to_len    /* if (op <= bits) */
-
-	mov	ch, cl            /* stash op in ch, freeing cl */
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax         /* hold |= *((ushort *)in)++ << bits */
-	mov	cl, ch            /* move op back to ecx */
-
-L_add_bits_to_len:
-	mov	eax, 1
-	shl	eax, cl
-	dec	eax
-	sub	bl, cl
-	and	eax, edx          /* eax &= hold */
-	shr	edx, cl
-	add	[esp+60], eax      /* len += hold & mask[op] */
-
-L_decode_distance:
-	cmp	bl, 15
-	ja	L_get_distance_code  /* if (15 < bits) */
-
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax         /* hold |= *((ushort *)in)++ << bits */
-
-L_get_distance_code:
-	mov	eax, [esp+56]      /* eax = dmask */
-	mov	ecx, [esp+48]      /* ecx = dcode */
-	and	eax, edx          /* eax &= hold */
-	mov	eax, [ecx+eax*4]/* eax = dcode[hold & dmask] */
-
-L_dodist:
-	mov	ebp, eax          /* dist = this */
-	shr	ebp, 16            /* dist = this.val */
-	mov	cl, ah
-	sub	bl, ah            /* bits -= this.bits */
-	shr	edx, cl           /* hold >>= this.bits */
-	mov	cl, al            /* cl = this.op */
-
-	test	al, 16             /* if ((op & 16) == 0) */
-	jz	L_test_for_second_level_dist
-	and	cl, 15             /* op &= 15 */
-	jz	L_check_dist_one
-	cmp	bl, cl
-	jae	L_add_bits_to_dist   /* if (op <= bits) 97.6% */
-
-	mov	ch, cl            /* stash op in ch, freeing cl */
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax        /* hold |= *((ushort *)in)++ << bits */
-	mov	cl, ch            /* move op back to ecx */
-
-L_add_bits_to_dist:
-	mov	eax, 1
-	shl	eax, cl
-	dec	eax                 /* (1 << op) - 1 */
-	sub	bl, cl
-	and	eax, edx          /* eax &= hold */
-	shr	edx, cl
-	add	ebp, eax          /* dist += hold & ((1 << op) - 1) */
-
-L_check_window:
-	mov	[esp+4], esi       /* save in so from can use it's reg */
-	mov	eax, edi
-	sub	eax, [esp+16]      /* nbytes = out - beg */
-
-	cmp	eax, ebp
-	jb	L_clip_window        /* if (dist > nbytes) 4.2% */
-
-	mov	ecx, [esp+60]
-	mov	esi, edi
-	sub	esi, ebp          /* from = out - dist */
-
-	sub	ecx, 3             /* copy from to out */
-	mov	al, [esi]
-	mov	[edi], al
-	mov	al, [esi+1]
-	mov	ah, [esi+2]
-	add	esi, 3
-	mov	[edi+1], al
-	mov	[edi+2], ah
-	add	edi, 3
-	rep     movsb
-
-	mov	esi, [esp+4]      /* move in back to %esi, toss from */
-	mov	ebp, [esp+44]     /* ebp = lcode */
-	jmp	L_while_test
-
-L_check_dist_one:
-	cmp	ebp, 1            /* if dist 1, is a memset */
-	jne	L_check_window
-	cmp	[esp+16], edi
-	je	L_check_window
-
-	dec	edi
-	mov	ecx, [esp+60]
-	mov	al, [edi]
-	sub	ecx, 3
-
-	mov	[edi+1], al       /* memset out with from[-1] */
-	mov	[edi+2], al
-	mov	[edi+3], al
-	add	edi, 4
-	rep     stosb
-	mov	ebp, [esp+44]      /* ebp = lcode */
-	jmp	L_while_test
-
-L_test_for_second_level_length:
-	test	al, 64
-	jnz	L_test_for_end_of_block /* if ((op & 64) != 0) */
-
-	mov	eax, 1
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         /* eax &= hold */
-	add	eax, [esp+60]     /* eax += this.val */
-	mov	eax, [ebp+eax*4] /* eax = lcode[val+(hold&mask[op])]*/
-	jmp	L_dolen
-
-L_test_for_second_level_dist:
-	test	al, 64
-	jnz	L_invalid_distance_code /* if ((op & 64) != 0) */
-
-	mov	eax, 1
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         /* eax &= hold */
-	add	eax, ebp         /* eax += this.val */
-	mov	ecx, [esp+48]     /* ecx = dcode */
-	mov	eax, [ecx+eax*4] /* eax = dcode[val+(hold&mask[op])]*/
-	jmp	L_dodist
-
-L_clip_window:
-	mov	ecx, eax
-	mov	eax, [esp+24]     /* prepare for dist compare */
-	neg	ecx                /* nbytes = -nbytes */
-	mov	esi, [esp+32]     /* from = window */
-
-	cmp	eax, ebp
-	jb	L_invalid_distance_too_far /* if (dist > wsize) */
-
-	add	ecx, ebp         /* nbytes = dist - nbytes */
-	cmp	dword ptr [esp+28], 0
-	jne	L_wrap_around_window /* if (write != 0) */
-
-	sub	eax, ecx
-	add	esi, eax         /* from += wsize - nbytes */
-
-	mov	eax, [esp+60]
-	cmp	eax, ecx
-	jbe	L_do_copy1          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy1
-
-	cmp	eax, ecx
-	jbe	L_do_copy1          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy1
-
-L_wrap_around_window:
-	mov	eax, [esp+28]
-	cmp	ecx, eax
-	jbe	L_contiguous_in_window /* if (write >= nbytes) */
-
-	add	esi, [esp+24]
-	add	esi, eax
-	sub	esi, ecx         /* from += wsize + write - nbytes */
-	sub	ecx, eax         /* nbytes -= write */
-
-	mov	eax, [esp+60]
-	cmp	eax, ecx
-	jbe	L_do_copy1          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, [esp+32]     /* from = window */
-	mov	ecx, [esp+28]     /* nbytes = write */
-	cmp	eax, ecx
-	jbe	L_do_copy1          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy1
-
-L_contiguous_in_window:
-	add	esi, eax
-	sub	esi, ecx         /* from += write - nbytes */
-
-	mov	eax, [esp+60]
-	cmp	eax, ecx
-	jbe	L_do_copy1          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-
-L_do_copy1:
-	mov	ecx, eax
-	rep     movsb
-
-	mov	esi, [esp+4]      /* move in back to %esi, toss from */
-	mov	ebp, [esp+44]     /* ebp = lcode */
-	jmp	L_while_test
-
-L_test_for_end_of_block:
-	test	al, 32
-	jz	L_invalid_literal_length_code
-	mov	dword ptr [esp+68], 1
-	jmp	L_break_loop_with_status
-
-L_invalid_literal_length_code:
-	mov	dword ptr [esp+68], 2
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_code:
-	mov	dword ptr [esp+68], 3
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_too_far:
-	mov	esi, [esp+4]
-	mov	dword ptr [esp+68], 4
-	jmp	L_break_loop_with_status
-
-L_break_loop:
-	mov	dword ptr [esp+68], 0
-
-L_break_loop_with_status:
-/* put in, out, bits, and hold back into ar and pop esp */
-	mov	[esp+4], esi
-	mov	[esp+12], edi
-	mov	[esp+40], ebx
-	mov	[esp+36], edx
-	mov	esp, [esp]
-	pop	ebp
-	popfd
-    }
-#endif
-
-    if (ar.status > 1) {
-        if (ar.status == 2)
-            strm->msg = "invalid literal/length code";
-        else if (ar.status == 3)
-            strm->msg = "invalid distance code";
-        else
-            strm->msg = "invalid distance too far back";
-        state->mode = BAD;
-    }
-    else if ( ar.status == 1 ) {
-        state->mode = TYPE;
-    }
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    ar.len = ar.bits >> 3;
-    ar.in -= ar.len;
-    ar.bits -= ar.len << 3;
-    ar.hold &= (1U << ar.bits) - 1;
-
-    /* update state and return */
-    strm->next_in = ar.in;
-    strm->next_out = ar.out;
-    strm->avail_in = (unsigned)(ar.in < ar.last ? 5 + (ar.last - ar.in) :
-                                                  5 - (ar.in - ar.last));
-    strm->avail_out = (unsigned)(ar.out < ar.end ? 257 + (ar.end - ar.out) :
-                                                   257 - (ar.out - ar.end));
-    state->hold = ar.hold;
-    state->bits = ar.bits;
-    return;
-}
-
diff --git a/tkimg1.3/libz/contrib/inflate86/inffast.S b/tkimg1.3/libz/contrib/inflate86/inffast.S
deleted file mode 100644
index f9bffd5..0000000
--- a/tkimg1.3/libz/contrib/inflate86/inffast.S
+++ /dev/null
@@ -1,1377 +0,0 @@
-/*
- * inffast.S is a hand tuned assembler version of:
- *
- * inffast.c -- fast decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <christop at charm.net>
- * Please use the copyright conditions above.
- *
- * This version (Jan-23-2003) of inflate_fast was coded and tested under
- * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution.  On that
- * machine, I found that gzip style archives decompressed about 20% faster than
- * the gcc-3.2 -O3 -fomit-frame-pointer compiled version.  Your results will
- * depend on how large of a buffer is used for z_stream.next_in & next_out
- * (8K-32K worked best for my 256K cpu cache) and how much overhead there is in
- * stream processing I/O and crc32/addler32.  In my case, this routine used
- * 70% of the cpu time and crc32 used 20%.
- *
- * I am confident that this version will work in the general case, but I have
- * not tested a wide variety of datasets or a wide variety of platforms.
- *
- * Jan-24-2003 -- Added -DUSE_MMX define for slightly faster inflating.
- * It should be a runtime flag instead of compile time flag...
- *
- * Jan-26-2003 -- Added runtime check for MMX support with cpuid instruction.
- * With -DUSE_MMX, only MMX code is compiled.  With -DNO_MMX, only non-MMX code
- * is compiled.  Without either option, runtime detection is enabled.  Runtime
- * detection should work on all modern cpus and the recomended algorithm (flip
- * ID bit on eflags and then use the cpuid instruction) is used in many
- * multimedia applications.  Tested under win2k with gcc-2.95 and gas-2.12
- * distributed with cygwin3.  Compiling with gcc-2.95 -c inffast.S -o
- * inffast.obj generates a COFF object which can then be linked with MSVC++
- * compiled code.  Tested under FreeBSD 4.7 with gcc-2.95.
- *
- * Jan-28-2003 -- Tested Athlon XP... MMX mode is slower than no MMX (and
- * slower than compiler generated code).  Adjusted cpuid check to use the MMX
- * code only for Pentiums < P4 until I have more data on the P4.  Speed
- * improvment is only about 15% on the Athlon when compared with code generated
- * with MSVC++.  Not sure yet, but I think the P4 will also be slower using the
- * MMX mode because many of it's x86 ALU instructions execute in .5 cycles and
- * have less latency than MMX ops.  Added code to buffer the last 11 bytes of
- * the input stream since the MMX code grabs bits in chunks of 32, which
- * differs from the inffast.c algorithm.  I don't think there would have been
- * read overruns where a page boundary was crossed (a segfault), but there
- * could have been overruns when next_in ends on unaligned memory (unintialized
- * memory read).
- *
- * Mar-13-2003 -- P4 MMX is slightly slower than P4 NO_MMX.  I created a C
- * version of the non-MMX code so that it doesn't depend on zstrm and zstate
- * structure offsets which are hard coded in this file.  This was last tested
- * with zlib-1.2.0 which is currently in beta testing, newer versions of this
- * and inffas86.c can be found at http://www.eetbeetee.com/zlib/ and
- * http://www.charm.net/~christop/zlib/
- */
-
-
-/*
- * if you have underscore linking problems (_inflate_fast undefined), try
- * using -DGAS_COFF
- */
-#if ! defined( GAS_COFF ) && ! defined( GAS_ELF )
-
-#if defined( WIN32 ) || defined( __CYGWIN__ )
-#define GAS_COFF /* windows object format */
-#else
-#define GAS_ELF
-#endif
-
-#endif /* ! GAS_COFF && ! GAS_ELF */
-
-
-#if defined( GAS_COFF )
-
-/* coff externals have underscores */
-#define inflate_fast _inflate_fast
-#define inflate_fast_use_mmx _inflate_fast_use_mmx
-
-#endif /* GAS_COFF */
-
-
-.file "inffast.S"
-
-.globl inflate_fast
-
-.text
-.align 4,0
-.L_invalid_literal_length_code_msg:
-.string "invalid literal/length code"
-
-.align 4,0
-.L_invalid_distance_code_msg:
-.string "invalid distance code"
-
-.align 4,0
-.L_invalid_distance_too_far_msg:
-.string "invalid distance too far back"
-
-#if ! defined( NO_MMX )
-.align 4,0
-.L_mask: /* mask[N] = ( 1 << N ) - 1 */
-.long 0
-.long 1
-.long 3
-.long 7
-.long 15
-.long 31
-.long 63
-.long 127
-.long 255
-.long 511
-.long 1023
-.long 2047
-.long 4095
-.long 8191
-.long 16383
-.long 32767
-.long 65535
-.long 131071
-.long 262143
-.long 524287
-.long 1048575
-.long 2097151
-.long 4194303
-.long 8388607
-.long 16777215
-.long 33554431
-.long 67108863
-.long 134217727
-.long 268435455
-.long 536870911
-.long 1073741823
-.long 2147483647
-.long 4294967295
-#endif /* NO_MMX */
-
-.text
-
-/*
- * struct z_stream offsets, in zlib.h
- */
-#define next_in_strm   0   /* strm->next_in */
-#define avail_in_strm  4   /* strm->avail_in */
-#define next_out_strm  12  /* strm->next_out */
-#define avail_out_strm 16  /* strm->avail_out */
-#define msg_strm       24  /* strm->msg */
-#define state_strm     28  /* strm->state */
-
-/*
- * struct inflate_state offsets, in inflate.h
- */
-#define mode_state     0   /* state->mode */
-#define wsize_state    32  /* state->wsize */
-#define write_state    40  /* state->write */
-#define window_state   44  /* state->window */
-#define hold_state     48  /* state->hold */
-#define bits_state     52  /* state->bits */
-#define lencode_state  68  /* state->lencode */
-#define distcode_state 72  /* state->distcode */
-#define lenbits_state  76  /* state->lenbits */
-#define distbits_state 80  /* state->distbits */
-
-/*
- * inflate_fast's activation record
- */
-#define local_var_size 64 /* how much local space for vars */
-#define strm_sp        88 /* first arg: z_stream * (local_var_size + 24) */
-#define start_sp       92 /* second arg: unsigned int (local_var_size + 28) */
-
-/*
- * offsets for local vars on stack
- */
-#define out            60  /* unsigned char* */
-#define window         56  /* unsigned char* */
-#define wsize          52  /* unsigned int */
-#define write          48  /* unsigned int */
-#define in             44  /* unsigned char* */
-#define beg            40  /* unsigned char* */
-#define buf            28  /* char[ 12 ] */
-#define len            24  /* unsigned int */
-#define last           20  /* unsigned char* */
-#define end            16  /* unsigned char* */
-#define dcode          12  /* code* */
-#define lcode           8  /* code* */
-#define dmask           4  /* unsigned int */
-#define lmask           0  /* unsigned int */
-
-/*
- * typedef enum inflate_mode consts, in inflate.h
- */
-#ifndef NO_GUNZIP
-#define GUNZIP
-#endif
-
-#ifdef GUNZIP
-#define INFLATE_MODE_TYPE 11  /* state->mode flags enum-ed in inflate.h */
-#define INFLATE_MODE_BAD  26
-#else
-#define INFLATE_MODE_TYPE 3
-#define INFLATE_MODE_BAD  17
-#endif
-
-
-#if ! defined( USE_MMX ) && ! defined( NO_MMX )
-
-#define RUN_TIME_MMX
-
-#define CHECK_MMX    1
-#define DO_USE_MMX   2
-#define DONT_USE_MMX 3
-
-.globl inflate_fast_use_mmx
-
-.data
-
-.align 4,0
-inflate_fast_use_mmx: /* integer flag for run time control 1=check,2=mmx,3=no */
-.long CHECK_MMX
-
-#if defined( GAS_ELF )
-/* elf info */
-.type   inflate_fast_use_mmx, at object
-.size   inflate_fast_use_mmx,4
-#endif
-
-#endif /* RUN_TIME_MMX */
-
-#if defined( GAS_COFF )
-/* coff info: scl 2 = extern, type 32 = function */
-.def inflate_fast; .scl 2; .type 32; .endef
-#endif
-
-.text
-
-.align 32,0x90
-inflate_fast:
-        pushl   %edi
-        pushl   %esi
-        pushl   %ebp
-        pushl   %ebx
-        pushf   /* save eflags (strm_sp, state_sp assumes this is 32 bits) */
-        subl    $local_var_size, %esp
-        cld
-
-#define strm_r  %esi
-#define state_r %edi
-
-        movl    strm_sp(%esp), strm_r
-        movl    state_strm(strm_r), state_r
-
-        /* in = strm->next_in;
-         * out = strm->next_out;
-         * last = in + strm->avail_in - 11;
-         * beg = out - (start - strm->avail_out);
-         * end = out + (strm->avail_out - 257);
-         */
-        movl    avail_in_strm(strm_r), %edx
-        movl    next_in_strm(strm_r), %eax
-
-        addl    %eax, %edx      /* avail_in += next_in */
-        subl    $11, %edx       /* avail_in -= 11 */
-
-        movl    %eax, in(%esp)
-        movl    %edx, last(%esp)
-
-        movl    start_sp(%esp), %ebp
-        movl    avail_out_strm(strm_r), %ecx
-        movl    next_out_strm(strm_r), %ebx
-
-        subl    %ecx, %ebp      /* start -= avail_out */
-        negl    %ebp            /* start = -start */
-        addl    %ebx, %ebp      /* start += next_out */
-
-        subl    $257, %ecx      /* avail_out -= 257 */
-        addl    %ebx, %ecx      /* avail_out += out */
-
-        movl    %ebx, out(%esp)
-        movl    %ebp, beg(%esp)
-        movl    %ecx, end(%esp)
-
-        /* wsize = state->wsize;
-         * write = state->write;
-         * window = state->window;
-         * hold = state->hold;
-         * bits = state->bits;
-         * lcode = state->lencode;
-         * dcode = state->distcode;
-         * lmask = ( 1 << state->lenbits ) - 1;
-         * dmask = ( 1 << state->distbits ) - 1;
-         */
-
-        movl    lencode_state(state_r), %eax
-        movl    distcode_state(state_r), %ecx
-
-        movl    %eax, lcode(%esp)
-        movl    %ecx, dcode(%esp)
-
-        movl    $1, %eax
-        movl    lenbits_state(state_r), %ecx
-        shll    %cl, %eax
-        decl    %eax
-        movl    %eax, lmask(%esp)
-
-        movl    $1, %eax
-        movl    distbits_state(state_r), %ecx
-        shll    %cl, %eax
-        decl    %eax
-        movl    %eax, dmask(%esp)
-
-        movl    wsize_state(state_r), %eax
-        movl    write_state(state_r), %ecx
-        movl    window_state(state_r), %edx
-
-        movl    %eax, wsize(%esp)
-        movl    %ecx, write(%esp)
-        movl    %edx, window(%esp)
-
-        movl    hold_state(state_r), %ebp
-        movl    bits_state(state_r), %ebx
-
-#undef strm_r
-#undef state_r
-
-#define in_r       %esi
-#define from_r     %esi
-#define out_r      %edi
-
-        movl    in(%esp), in_r
-        movl    last(%esp), %ecx
-        cmpl    in_r, %ecx
-        ja      .L_align_long           /* if in < last */
-
-        addl    $11, %ecx               /* ecx = &in[ avail_in ] */
-        subl    in_r, %ecx              /* ecx = avail_in */
-        movl    $12, %eax
-        subl    %ecx, %eax              /* eax = 12 - avail_in */
-        leal    buf(%esp), %edi
-        rep     movsb                   /* memcpy( buf, in, avail_in ) */
-        movl    %eax, %ecx
-        xorl    %eax, %eax
-        rep     stosb         /* memset( &buf[ avail_in ], 0, 12 - avail_in ) */
-        leal    buf(%esp), in_r         /* in = buf */
-        movl    in_r, last(%esp)        /* last = in, do just one iteration */
-        jmp     .L_is_aligned
-
-        /* align in_r on long boundary */
-.L_align_long:
-        testl   $3, in_r
-        jz      .L_is_aligned
-        xorl    %eax, %eax
-        movb    (in_r), %al
-        incl    in_r
-        movl    %ebx, %ecx
-        addl    $8, %ebx
-        shll    %cl, %eax
-        orl     %eax, %ebp
-        jmp     .L_align_long
-
-.L_is_aligned:
-        movl    out(%esp), out_r
-
-#if defined( NO_MMX )
-        jmp     .L_do_loop
-#endif
-
-#if defined( USE_MMX )
-        jmp     .L_init_mmx
-#endif
-
-/*** Runtime MMX check ***/
-
-#if defined( RUN_TIME_MMX )
-.L_check_mmx:
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        je      .L_init_mmx
-        ja      .L_do_loop /* > 2 */
-
-        pushl   %eax
-        pushl   %ebx
-        pushl   %ecx
-        pushl   %edx
-        pushf
-        movl    (%esp), %eax      /* copy eflags to eax */
-        xorl    $0x200000, (%esp) /* try toggling ID bit of eflags (bit 21)
-                                   * to see if cpu supports cpuid...
-                                   * ID bit method not supported by NexGen but
-                                   * bios may load a cpuid instruction and
-                                   * cpuid may be disabled on Cyrix 5-6x86 */
-        popf
-        pushf
-        popl    %edx              /* copy new eflags to edx */
-        xorl    %eax, %edx        /* test if ID bit is flipped */
-        jz      .L_dont_use_mmx   /* not flipped if zero */
-        xorl    %eax, %eax
-        cpuid
-        cmpl    $0x756e6547, %ebx /* check for GenuineIntel in ebx,ecx,edx */
-        jne     .L_dont_use_mmx
-        cmpl    $0x6c65746e, %ecx
-        jne     .L_dont_use_mmx
-        cmpl    $0x49656e69, %edx
-        jne     .L_dont_use_mmx
-        movl    $1, %eax
-        cpuid                     /* get cpu features */
-        shrl    $8, %eax
-        andl    $15, %eax
-        cmpl    $6, %eax          /* check for Pentium family, is 0xf for P4 */
-        jne     .L_dont_use_mmx
-        testl   $0x800000, %edx   /* test if MMX feature is set (bit 23) */
-        jnz     .L_use_mmx
-        jmp     .L_dont_use_mmx
-.L_use_mmx:
-        movl    $DO_USE_MMX, inflate_fast_use_mmx
-        jmp     .L_check_mmx_pop
-.L_dont_use_mmx:
-        movl    $DONT_USE_MMX, inflate_fast_use_mmx
-.L_check_mmx_pop:
-        popl    %edx
-        popl    %ecx
-        popl    %ebx
-        popl    %eax
-        jmp     .L_check_mmx
-#endif
-
-
-/*** Non-MMX code ***/
-
-#if defined ( NO_MMX ) || defined( RUN_TIME_MMX )
-
-#define hold_r     %ebp
-#define bits_r     %bl
-#define bitslong_r %ebx
-
-.align 32,0x90
-.L_while_test:
-        /* while (in < last && out < end)
-         */
-        cmpl    out_r, end(%esp)
-        jbe     .L_break_loop           /* if (out >= end) */
-
-        cmpl    in_r, last(%esp)
-        jbe     .L_break_loop
-
-.L_do_loop:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *
-         * do {
-         *   if (bits < 15) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   this = lcode[hold & lmask]
-         */
-        cmpb    $15, bits_r
-        ja      .L_get_length_code      /* if (15 < bits) */
-
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-
-.L_get_length_code:
-        movl    lmask(%esp), %edx       /* edx = lmask */
-        movl    lcode(%esp), %ecx       /* ecx = lcode */
-        andl    hold_r, %edx            /* edx &= hold */
-        movl    (%ecx,%edx,4), %eax     /* eax = lcode[hold & lmask] */
-
-.L_dolen:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *
-         * dolen:
-         *    bits -= this.bits;
-         *    hold >>= this.bits
-         */
-        movb    %ah, %cl                /* cl = this.bits */
-        subb    %ah, bits_r             /* bits -= this.bits */
-        shrl    %cl, hold_r             /* hold >>= this.bits */
-
-        /* check if op is a literal
-         * if (op == 0) {
-         *    PUP(out) = this.val;
-         *  }
-         */
-        testb   %al, %al
-        jnz     .L_test_for_length_base /* if (op != 0) 45.7% */
-
-        shrl    $16, %eax               /* output this.val char */
-        stosb
-        jmp     .L_while_test
-
-.L_test_for_length_base:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = len
-         *
-         * else if (op & 16) {
-         *   len = this.val
-         *   op &= 15
-         *   if (op) {
-         *     if (op > bits) {
-         *       hold |= *((unsigned short *)in)++ << bits;
-         *       bits += 16
-         *     }
-         *     len += hold & mask[op];
-         *     bits -= op;
-         *     hold >>= op;
-         *   }
-         */
-#define len_r %edx
-        movl    %eax, len_r             /* len = this */
-        shrl    $16, len_r              /* len = this.val */
-        movb    %al, %cl
-
-        testb   $16, %al
-        jz      .L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
-        andb    $15, %cl                /* op &= 15 */
-        jz      .L_save_len             /* if (!op) */
-        cmpb    %cl, bits_r
-        jae     .L_add_bits_to_len      /* if (op <= bits) */
-
-        movb    %cl, %ch                /* stash op in ch, freeing cl */
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-        movb    %ch, %cl                /* move op back to ecx */
-
-.L_add_bits_to_len:
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        subb    %cl, bits_r
-        andl    hold_r, %eax            /* eax &= hold */
-        shrl    %cl, hold_r
-        addl    %eax, len_r             /* len += hold & mask[op] */
-
-.L_save_len:
-        movl    len_r, len(%esp)        /* save len */
-#undef  len_r
-
-.L_decode_distance:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *
-         *   if (bits < 15) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   this = dcode[hold & dmask];
-         * dodist:
-         *   bits -= this.bits;
-         *   hold >>= this.bits;
-         *   op = this.op;
-         */
-
-        cmpb    $15, bits_r
-        ja      .L_get_distance_code    /* if (15 < bits) */
-
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-
-.L_get_distance_code:
-        movl    dmask(%esp), %edx       /* edx = dmask */
-        movl    dcode(%esp), %ecx       /* ecx = dcode */
-        andl    hold_r, %edx            /* edx &= hold */
-        movl    (%ecx,%edx,4), %eax     /* eax = dcode[hold & dmask] */
-
-#define dist_r %edx
-.L_dodist:
-        movl    %eax, dist_r            /* dist = this */
-        shrl    $16, dist_r             /* dist = this.val */
-        movb    %ah, %cl
-        subb    %ah, bits_r             /* bits -= this.bits */
-        shrl    %cl, hold_r             /* hold >>= this.bits */
-
-        /* if (op & 16) {
-         *   dist = this.val
-         *   op &= 15
-         *   if (op > bits) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   dist += hold & mask[op];
-         *   bits -= op;
-         *   hold >>= op;
-         */
-        movb    %al, %cl                /* cl = this.op */
-
-        testb   $16, %al                /* if ((op & 16) == 0) */
-        jz      .L_test_for_second_level_dist
-        andb    $15, %cl                /* op &= 15 */
-        jz      .L_check_dist_one
-        cmpb    %cl, bits_r
-        jae     .L_add_bits_to_dist     /* if (op <= bits) 97.6% */
-
-        movb    %cl, %ch                /* stash op in ch, freeing cl */
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-        movb    %ch, %cl                /* move op back to ecx */
-
-.L_add_bits_to_dist:
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax                    /* (1 << op) - 1 */
-        subb    %cl, bits_r
-        andl    hold_r, %eax            /* eax &= hold */
-        shrl    %cl, hold_r
-        addl    %eax, dist_r            /* dist += hold & ((1 << op) - 1) */
-        jmp     .L_check_window
-
-.L_check_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes
-         *
-         * nbytes = out - beg;
-         * if (dist <= nbytes) {
-         *   from = out - dist;
-         *   do {
-         *     PUP(out) = PUP(from);
-         *   } while (--len > 0) {
-         * }
-         */
-
-        movl    in_r, in(%esp)          /* save in so from can use it's reg */
-        movl    out_r, %eax
-        subl    beg(%esp), %eax         /* nbytes = out - beg */
-
-        cmpl    dist_r, %eax
-        jb      .L_clip_window          /* if (dist > nbytes) 4.2% */
-
-        movl    len(%esp), %ecx
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-        subl    $3, %ecx
-        movb    (from_r), %al
-        movb    %al, (out_r)
-        movb    1(from_r), %al
-        movb    2(from_r), %dl
-        addl    $3, from_r
-        movb    %al, 1(out_r)
-        movb    %dl, 2(out_r)
-        addl    $3, out_r
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        jmp     .L_while_test
-
-.align 16,0x90
-.L_check_dist_one:
-        cmpl    $1, dist_r
-        jne     .L_check_window
-        cmpl    out_r, beg(%esp)
-        je      .L_check_window
-
-        decl    out_r
-        movl    len(%esp), %ecx
-        movb    (out_r), %al
-        subl    $3, %ecx
-
-        movb    %al, 1(out_r)
-        movb    %al, 2(out_r)
-        movb    %al, 3(out_r)
-        addl    $4, out_r
-        rep     stosb
-
-        jmp     .L_while_test
-
-.align 16,0x90
-.L_test_for_second_level_length:
-        /* else if ((op & 64) == 0) {
-         *   this = lcode[this.val + (hold & mask[op])];
-         * }
-         */
-        testb   $64, %al
-        jnz     .L_test_for_end_of_block  /* if ((op & 64) != 0) */
-
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        andl    hold_r, %eax            /* eax &= hold */
-        addl    %edx, %eax              /* eax += this.val */
-        movl    lcode(%esp), %edx       /* edx = lcode */
-        movl    (%edx,%eax,4), %eax     /* eax = lcode[val + (hold&mask[op])] */
-        jmp     .L_dolen
-
-.align 16,0x90
-.L_test_for_second_level_dist:
-        /* else if ((op & 64) == 0) {
-         *   this = dcode[this.val + (hold & mask[op])];
-         * }
-         */
-        testb   $64, %al
-        jnz     .L_invalid_distance_code  /* if ((op & 64) != 0) */
-
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        andl    hold_r, %eax            /* eax &= hold */
-        addl    %edx, %eax              /* eax += this.val */
-        movl    dcode(%esp), %edx       /* edx = dcode */
-        movl    (%edx,%eax,4), %eax     /* eax = dcode[val + (hold&mask[op])] */
-        jmp     .L_dodist
-
-.align 16,0x90
-.L_clip_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes
-         *
-         * else {
-         *   if (dist > wsize) {
-         *     invalid distance
-         *   }
-         *   from = window;
-         *   nbytes = dist - nbytes;
-         *   if (write == 0) {
-         *     from += wsize - nbytes;
-         */
-#define nbytes_r %ecx
-        movl    %eax, nbytes_r
-        movl    wsize(%esp), %eax       /* prepare for dist compare */
-        negl    nbytes_r                /* nbytes = -nbytes */
-        movl    window(%esp), from_r    /* from = window */
-
-        cmpl    dist_r, %eax
-        jb      .L_invalid_distance_too_far /* if (dist > wsize) */
-
-        addl    dist_r, nbytes_r        /* nbytes = dist - nbytes */
-        cmpl    $0, write(%esp)
-        jne     .L_wrap_around_window   /* if (write != 0) */
-
-        subl    nbytes_r, %eax
-        addl    %eax, from_r            /* from += wsize - nbytes */
-
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = len
-         *
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = out - dist;
-         *     }
-         *   }
-         */
-#define len_r %eax
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-.L_wrap_around_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = write, %eax = len
-         *
-         *   else if (write < nbytes) {
-         *     from += wsize + write - nbytes;
-         *     nbytes -= write;
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = window;
-         *       nbytes = write;
-         *       if (nbytes < len) {
-         *         len -= nbytes;
-         *         do {
-         *           PUP(out) = PUP(from);
-         *         } while(--nbytes);
-         *         from = out - dist;
-         *       }
-         *     }
-         *   }
-         */
-#define write_r %eax
-        movl    write(%esp), write_r
-        cmpl    write_r, nbytes_r
-        jbe     .L_contiguous_in_window /* if (write >= nbytes) */
-
-        addl    wsize(%esp), from_r
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += wsize + write - nbytes */
-        subl    write_r, nbytes_r       /* nbytes -= write */
-#undef write_r
-
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    window(%esp), from_r    /* from = window */
-        movl    write(%esp), nbytes_r   /* nbytes = write */
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-.L_contiguous_in_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = write, %eax = len
-         *
-         *   else {
-         *     from += write - nbytes;
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = out - dist;
-         *     }
-         *   }
-         */
-#define write_r %eax
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += write - nbytes */
-#undef write_r
-
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-.L_do_copy1:
-        /* regs: %esi = from, %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *       %eax = len
-         *
-         *     while (len > 0) {
-         *       PUP(out) = PUP(from);
-         *       len--;
-         *     }
-         *   }
-         * } while (in < last && out < end);
-         */
-#undef nbytes_r
-#define in_r %esi
-        movl    len_r, %ecx
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        jmp     .L_while_test
-
-#undef len_r
-#undef dist_r
-
-#endif /* NO_MMX || RUN_TIME_MMX */
-
-
-/*** MMX code ***/
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-.align 32,0x90
-.L_init_mmx:
-        emms
-
-#undef  bits_r
-#undef  bitslong_r
-#define bitslong_r %ebp
-#define hold_mm    %mm0
-        movd    %ebp, hold_mm
-        movl    %ebx, bitslong_r
-
-#define used_mm   %mm1
-#define dmask2_mm %mm2
-#define lmask2_mm %mm3
-#define lmask_mm  %mm4
-#define dmask_mm  %mm5
-#define tmp_mm    %mm6
-
-        movd    lmask(%esp), lmask_mm
-        movq    lmask_mm, lmask2_mm
-        movd    dmask(%esp), dmask_mm
-        movq    dmask_mm, dmask2_mm
-        pxor    used_mm, used_mm
-        movl    lcode(%esp), %ebx       /* ebx = lcode */
-        jmp     .L_do_loop_mmx
-
-.align 32,0x90
-.L_while_test_mmx:
-        /* while (in < last && out < end)
-         */
-        cmpl    out_r, end(%esp)
-        jbe     .L_break_loop           /* if (out >= end) */
-
-        cmpl    in_r, last(%esp)
-        jbe     .L_break_loop
-
-.L_do_loop_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-
-        cmpl    $32, bitslong_r
-        ja      .L_get_length_code_mmx  /* if (32 < bits) */
-
-        movd    bitslong_r, tmp_mm
-        movd    (in_r), %mm7
-        addl    $4, in_r
-        psllq   tmp_mm, %mm7
-        addl    $32, bitslong_r
-        por     %mm7, hold_mm           /* hold_mm |= *((uint *)in)++ << bits */
-
-.L_get_length_code_mmx:
-        pand    hold_mm, lmask_mm
-        movd    lmask_mm, %eax
-        movq    lmask2_mm, lmask_mm
-        movl    (%ebx,%eax,4), %eax     /* eax = lcode[hold & lmask] */
-
-.L_dolen_mmx:
-        movzbl  %ah, %ecx               /* ecx = this.bits */
-        movd    %ecx, used_mm
-        subl    %ecx, bitslong_r        /* bits -= this.bits */
-
-        testb   %al, %al
-        jnz     .L_test_for_length_base_mmx /* if (op != 0) 45.7% */
-
-        shrl    $16, %eax               /* output this.val char */
-        stosb
-        jmp     .L_while_test_mmx
-
-.L_test_for_length_base_mmx:
-#define len_r  %edx
-        movl    %eax, len_r             /* len = this */
-        shrl    $16, len_r              /* len = this.val */
-
-        testb   $16, %al
-        jz      .L_test_for_second_level_length_mmx /* if ((op & 16) == 0) 8% */
-        andl    $15, %eax               /* op &= 15 */
-        jz      .L_decode_distance_mmx  /* if (!op) */
-
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    %eax, used_mm
-        movd    hold_mm, %ecx
-        subl    %eax, bitslong_r
-        andl    .L_mask(,%eax,4), %ecx
-        addl    %ecx, len_r             /* len += hold & mask[op] */
-
-.L_decode_distance_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-
-        cmpl    $32, bitslong_r
-        ja      .L_get_dist_code_mmx    /* if (32 < bits) */
-
-        movd    bitslong_r, tmp_mm
-        movd    (in_r), %mm7
-        addl    $4, in_r
-        psllq   tmp_mm, %mm7
-        addl    $32, bitslong_r
-        por     %mm7, hold_mm           /* hold_mm |= *((uint *)in)++ << bits */
-
-.L_get_dist_code_mmx:
-        movl    dcode(%esp), %ebx       /* ebx = dcode */
-        pand    hold_mm, dmask_mm
-        movd    dmask_mm, %eax
-        movq    dmask2_mm, dmask_mm
-        movl    (%ebx,%eax,4), %eax     /* eax = dcode[hold & lmask] */
-
-.L_dodist_mmx:
-#define dist_r %ebx
-        movzbl  %ah, %ecx               /* ecx = this.bits */
-        movl    %eax, dist_r
-        shrl    $16, dist_r             /* dist  = this.val */
-        subl    %ecx, bitslong_r        /* bits -= this.bits */
-        movd    %ecx, used_mm
-
-        testb   $16, %al                /* if ((op & 16) == 0) */
-        jz      .L_test_for_second_level_dist_mmx
-        andl    $15, %eax               /* op &= 15 */
-        jz      .L_check_dist_one_mmx
-
-.L_add_bits_to_dist_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    %eax, used_mm           /* save bit length of current op */
-        movd    hold_mm, %ecx           /* get the next bits on input stream */
-        subl    %eax, bitslong_r        /* bits -= op bits */
-        andl    .L_mask(,%eax,4), %ecx  /* ecx   = hold & mask[op] */
-        addl    %ecx, dist_r            /* dist += hold & mask[op] */
-
-.L_check_window_mmx:
-        movl    in_r, in(%esp)          /* save in so from can use it's reg */
-        movl    out_r, %eax
-        subl    beg(%esp), %eax         /* nbytes = out - beg */
-
-        cmpl    dist_r, %eax
-        jb      .L_clip_window_mmx      /* if (dist > nbytes) 4.2% */
-
-        movl    len_r, %ecx
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-        subl    $3, %ecx
-        movb    (from_r), %al
-        movb    %al, (out_r)
-        movb    1(from_r), %al
-        movb    2(from_r), %dl
-        addl    $3, from_r
-        movb    %al, 1(out_r)
-        movb    %dl, 2(out_r)
-        addl    $3, out_r
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-.align 16,0x90
-.L_check_dist_one_mmx:
-        cmpl    $1, dist_r
-        jne     .L_check_window_mmx
-        cmpl    out_r, beg(%esp)
-        je      .L_check_window_mmx
-
-        decl    out_r
-        movl    len_r, %ecx
-        movb    (out_r), %al
-        subl    $3, %ecx
-
-        movb    %al, 1(out_r)
-        movb    %al, 2(out_r)
-        movb    %al, 3(out_r)
-        addl    $4, out_r
-        rep     stosb
-
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-.align 16,0x90
-.L_test_for_second_level_length_mmx:
-        testb   $64, %al
-        jnz     .L_test_for_end_of_block  /* if ((op & 64) != 0) */
-
-        andl    $15, %eax
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ecx
-        andl    .L_mask(,%eax,4), %ecx
-        addl    len_r, %ecx
-        movl    (%ebx,%ecx,4), %eax     /* eax = lcode[hold & lmask] */
-        jmp     .L_dolen_mmx
-
-.align 16,0x90
-.L_test_for_second_level_dist_mmx:
-        testb   $64, %al
-        jnz     .L_invalid_distance_code  /* if ((op & 64) != 0) */
-
-        andl    $15, %eax
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ecx
-        andl    .L_mask(,%eax,4), %ecx
-        movl    dcode(%esp), %eax       /* ecx = dcode */
-        addl    dist_r, %ecx
-        movl    (%eax,%ecx,4), %eax     /* eax = lcode[hold & lmask] */
-        jmp     .L_dodist_mmx
-
-.align 16,0x90
-.L_clip_window_mmx:
-#define nbytes_r %ecx
-        movl    %eax, nbytes_r
-        movl    wsize(%esp), %eax       /* prepare for dist compare */
-        negl    nbytes_r                /* nbytes = -nbytes */
-        movl    window(%esp), from_r    /* from = window */
-
-        cmpl    dist_r, %eax
-        jb      .L_invalid_distance_too_far /* if (dist > wsize) */
-
-        addl    dist_r, nbytes_r        /* nbytes = dist - nbytes */
-        cmpl    $0, write(%esp)
-        jne     .L_wrap_around_window_mmx /* if (write != 0) */
-
-        subl    nbytes_r, %eax
-        addl    %eax, from_r            /* from += wsize - nbytes */
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-.L_wrap_around_window_mmx:
-#define write_r %eax
-        movl    write(%esp), write_r
-        cmpl    write_r, nbytes_r
-        jbe     .L_contiguous_in_window_mmx /* if (write >= nbytes) */
-
-        addl    wsize(%esp), from_r
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += wsize + write - nbytes */
-        subl    write_r, nbytes_r       /* nbytes -= write */
-#undef write_r
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    window(%esp), from_r    /* from = window */
-        movl    write(%esp), nbytes_r   /* nbytes = write */
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-.L_contiguous_in_window_mmx:
-#define write_r %eax
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += write - nbytes */
-#undef write_r
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-.L_do_copy1_mmx:
-#undef nbytes_r
-#define in_r %esi
-        movl    len_r, %ecx
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-#undef hold_r
-#undef bitslong_r
-
-#endif /* USE_MMX || RUN_TIME_MMX */
-
-
-/*** USE_MMX, NO_MMX, and RUNTIME_MMX from here on ***/
-
-.L_invalid_distance_code:
-        /* else {
-         *   strm->msg = "invalid distance code";
-         *   state->mode = BAD;
-         * }
-         */
-        movl    $.L_invalid_distance_code_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_test_for_end_of_block:
-        /* else if (op & 32) {
-         *   state->mode = TYPE;
-         *   break;
-         * }
-         */
-        testb   $32, %al
-        jz      .L_invalid_literal_length_code  /* if ((op & 32) == 0) */
-
-        movl    $0, %ecx
-        movl    $INFLATE_MODE_TYPE, %edx
-        jmp     .L_update_stream_state
-
-.L_invalid_literal_length_code:
-        /* else {
-         *   strm->msg = "invalid literal/length code";
-         *   state->mode = BAD;
-         * }
-         */
-        movl    $.L_invalid_literal_length_code_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_invalid_distance_too_far:
-        /* strm->msg = "invalid distance too far back";
-         * state->mode = BAD;
-         */
-        movl    in(%esp), in_r          /* from_r has in's reg, put in back */
-        movl    $.L_invalid_distance_too_far_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_update_stream_state:
-        /* set strm->msg = %ecx, strm->state->mode = %edx */
-        movl    strm_sp(%esp), %eax
-        testl   %ecx, %ecx              /* if (msg != NULL) */
-        jz      .L_skip_msg
-        movl    %ecx, msg_strm(%eax)    /* strm->msg = msg */
-.L_skip_msg:
-        movl    state_strm(%eax), %eax  /* state = strm->state */
-        movl    %edx, mode_state(%eax)  /* state->mode = edx (BAD | TYPE) */
-        jmp     .L_break_loop
-
-.align 32,0x90
-.L_break_loop:
-
-/*
- * Regs:
- *
- * bits = %ebp when mmx, and in %ebx when non-mmx
- * hold = %hold_mm when mmx, and in %ebp when non-mmx
- * in   = %esi
- * out  = %edi
- */
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-#if defined( RUN_TIME_MMX )
-
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        jne     .L_update_next_in
-
-#endif /* RUN_TIME_MMX */
-
-        movl    %ebp, %ebx
-
-.L_update_next_in:
-
-#endif
-
-#define strm_r  %eax
-#define state_r %edx
-
-        /* len = bits >> 3;
-         * in -= len;
-         * bits -= len << 3;
-         * hold &= (1U << bits) - 1;
-         * state->hold = hold;
-         * state->bits = bits;
-         * strm->next_in = in;
-         * strm->next_out = out;
-         */
-        movl    strm_sp(%esp), strm_r
-        movl    %ebx, %ecx
-        movl    state_strm(strm_r), state_r
-        shrl    $3, %ecx
-        subl    %ecx, in_r
-        shll    $3, %ecx
-        subl    %ecx, %ebx
-        movl    out_r, next_out_strm(strm_r)
-        movl    %ebx, bits_state(state_r)
-        movl    %ebx, %ecx
-
-        leal    buf(%esp), %ebx
-        cmpl    %ebx, last(%esp)
-        jne     .L_buf_not_used         /* if buf != last */
-
-        subl    %ebx, in_r              /* in -= buf */
-        movl    next_in_strm(strm_r), %ebx
-        movl    %ebx, last(%esp)        /* last = strm->next_in */
-        addl    %ebx, in_r              /* in += strm->next_in */
-        movl    avail_in_strm(strm_r), %ebx
-        subl    $11, %ebx
-        addl    %ebx, last(%esp)    /* last = &strm->next_in[ avail_in - 11 ] */
-
-.L_buf_not_used:
-        movl    in_r, next_in_strm(strm_r)
-
-        movl    $1, %ebx
-        shll    %cl, %ebx
-        decl    %ebx
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-#if defined( RUN_TIME_MMX )
-
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        jne     .L_update_hold
-
-#endif /* RUN_TIME_MMX */
-
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ebp
-
-        emms
-
-.L_update_hold:
-
-#endif /* USE_MMX || RUN_TIME_MMX */
-
-        andl    %ebx, %ebp
-        movl    %ebp, hold_state(state_r)
-
-#define last_r %ebx
-
-        /* strm->avail_in = in < last ? 11 + (last - in) : 11 - (in - last) */
-        movl    last(%esp), last_r
-        cmpl    in_r, last_r
-        jbe     .L_last_is_smaller     /* if (in >= last) */
-
-        subl    in_r, last_r           /* last -= in */
-        addl    $11, last_r            /* last += 11 */
-        movl    last_r, avail_in_strm(strm_r)
-        jmp     .L_fixup_out
-.L_last_is_smaller:
-        subl    last_r, in_r           /* in -= last */
-        negl    in_r                   /* in = -in */
-        addl    $11, in_r              /* in += 11 */
-        movl    in_r, avail_in_strm(strm_r)
-
-#undef last_r
-#define end_r %ebx
-
-.L_fixup_out:
-        /* strm->avail_out = out < end ? 257 + (end - out) : 257 - (out - end)*/
-        movl    end(%esp), end_r
-        cmpl    out_r, end_r
-        jbe     .L_end_is_smaller      /* if (out >= end) */
-
-        subl    out_r, end_r           /* end -= out */
-        addl    $257, end_r            /* end += 257 */
-        movl    end_r, avail_out_strm(strm_r)
-        jmp     .L_done
-.L_end_is_smaller:
-        subl    end_r, out_r           /* out -= end */
-        negl    out_r                  /* out = -out */
-        addl    $257, out_r            /* out += 257 */
-        movl    out_r, avail_out_strm(strm_r)
-
-#undef end_r
-#undef strm_r
-#undef state_r
-
-.L_done:
-        addl    $local_var_size, %esp
-        popf
-        popl    %ebx
-        popl    %ebp
-        popl    %esi
-        popl    %edi
-        ret
-
-#if defined( GAS_ELF )
-/* elf info */
-.type inflate_fast, at function
-.size inflate_fast,.-inflate_fast
-#endif
diff --git a/tkimg1.3/libz/contrib/iostream/test.cpp b/tkimg1.3/libz/contrib/iostream/test.cpp
deleted file mode 100644
index 7d265b3..0000000
--- a/tkimg1.3/libz/contrib/iostream/test.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#include "zfstream.h"
-
-int main() {
-
-  // Construct a stream object with this filebuffer.  Anything sent
-  // to this stream will go to standard out.
-  gzofstream os( 1, ios::out );
-
-  // This text is getting compressed and sent to stdout.
-  // To prove this, run 'test | zcat'.
-  os << "Hello, Mommy" << endl;
-
-  os << setcompressionlevel( Z_NO_COMPRESSION );
-  os << "hello, hello, hi, ho!" << endl;
-
-  setcompressionlevel( os, Z_DEFAULT_COMPRESSION )
-    << "I'm compressing again" << endl;
-
-  os.close();
-
-  return 0;
-
-}
diff --git a/tkimg1.3/libz/contrib/iostream/zfstream.cpp b/tkimg1.3/libz/contrib/iostream/zfstream.cpp
deleted file mode 100644
index d0cd85f..0000000
--- a/tkimg1.3/libz/contrib/iostream/zfstream.cpp
+++ /dev/null
@@ -1,329 +0,0 @@
-
-#include "zfstream.h"
-
-gzfilebuf::gzfilebuf() :
-  file(NULL),
-  mode(0),
-  own_file_descriptor(0)
-{ }
-
-gzfilebuf::~gzfilebuf() {
-
-  sync();
-  if ( own_file_descriptor )
-    close();
-
-}
-
-gzfilebuf *gzfilebuf::open( const char *name,
-                            int io_mode ) {
-
-  if ( is_open() )
-    return NULL;
-
-  char char_mode[10];
-  char *p = char_mode;
-
-  if ( io_mode & ios::in ) {
-    mode = ios::in;
-    *p++ = 'r';
-  } else if ( io_mode & ios::app ) {
-    mode = ios::app;
-    *p++ = 'a';
-  } else {
-    mode = ios::out;
-    *p++ = 'w';
-  }
-
-  if ( io_mode & ios::binary ) {
-    mode |= ios::binary;
-    *p++ = 'b';
-  }
-
-  // Hard code the compression level
-  if ( io_mode & (ios::out|ios::app )) {
-    *p++ = '9';
-  }
-
-  // Put the end-of-string indicator
-  *p = '\0';
-
-  if ( (file = gzopen(name, char_mode)) == NULL )
-    return NULL;
-
-  own_file_descriptor = 1;
-
-  return this;
-
-}
-
-gzfilebuf *gzfilebuf::attach( int file_descriptor,
-                              int io_mode ) {
-
-  if ( is_open() )
-    return NULL;
-
-  char char_mode[10];
-  char *p = char_mode;
-
-  if ( io_mode & ios::in ) {
-    mode = ios::in;
-    *p++ = 'r';
-  } else if ( io_mode & ios::app ) {
-    mode = ios::app;
-    *p++ = 'a';
-  } else {
-    mode = ios::out;
-    *p++ = 'w';
-  }
-
-  if ( io_mode & ios::binary ) {
-    mode |= ios::binary;
-    *p++ = 'b';
-  }
-
-  // Hard code the compression level
-  if ( io_mode & (ios::out|ios::app )) {
-    *p++ = '9';
-  }
-
-  // Put the end-of-string indicator
-  *p = '\0';
-
-  if ( (file = gzdopen(file_descriptor, char_mode)) == NULL )
-    return NULL;
-
-  own_file_descriptor = 0;
-
-  return this;
-
-}
-
-gzfilebuf *gzfilebuf::close() {
-
-  if ( is_open() ) {
-
-    sync();
-    gzclose( file );
-    file = NULL;
-
-  }
-
-  return this;
-
-}
-
-int gzfilebuf::setcompressionlevel( int comp_level ) {
-
-  return gzsetparams(file, comp_level, -2);
-
-}
-
-int gzfilebuf::setcompressionstrategy( int comp_strategy ) {
-
-  return gzsetparams(file, -2, comp_strategy);
-
-}
-
-
-streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) {
-
-  return streampos(EOF);
-
-}
-
-int gzfilebuf::underflow() {
-
-  // If the file hasn't been opened for reading, error.
-  if ( !is_open() || !(mode & ios::in) )
-    return EOF;
-
-  // if a buffer doesn't exists, allocate one.
-  if ( !base() ) {
-
-    if ( (allocate()) == EOF )
-      return EOF;
-    setp(0,0);
-
-  } else {
-
-    if ( in_avail() )
-      return (unsigned char) *gptr();
-
-    if ( out_waiting() ) {
-      if ( flushbuf() == EOF )
-        return EOF;
-    }
-
-  }
-
-  // Attempt to fill the buffer.
-
-  int result = fillbuf();
-  if ( result == EOF ) {
-    // disable get area
-    setg(0,0,0);
-    return EOF;
-  }
-
-  return (unsigned char) *gptr();
-
-}
-
-int gzfilebuf::overflow( int c ) {
-
-  if ( !is_open() || !(mode & ios::out) )
-    return EOF;
-
-  if ( !base() ) {
-    if ( allocate() == EOF )
-      return EOF;
-    setg(0,0,0);
-  } else {
-    if (in_avail()) {
-        return EOF;
-    }
-    if (out_waiting()) {
-      if (flushbuf() == EOF)
-        return EOF;
-    }
-  }
-
-  int bl = blen();
-  setp( base(), base() + bl);
-
-  if ( c != EOF ) {
-
-    *pptr() = c;
-    pbump(1);
-
-  }
-
-  return 0;
-
-}
-
-int gzfilebuf::sync() {
-
-  if ( !is_open() )
-    return EOF;
-
-  if ( out_waiting() )
-    return flushbuf();
-
-  return 0;
-
-}
-
-int gzfilebuf::flushbuf() {
-
-  int n;
-  char *q;
-
-  q = pbase();
-  n = pptr() - q;
-
-  if ( gzwrite( file, q, n) < n )
-    return EOF;
-
-  setp(0,0);
-
-  return 0;
-
-}
-
-int gzfilebuf::fillbuf() {
-
-  int required;
-  char *p;
-
-  p = base();
-
-  required = blen();
-
-  int t = gzread( file, p, required );
-
-  if ( t <= 0) return EOF;
-
-  setg( base(), base(), base()+t);
-
-  return t;
-
-}
-
-gzfilestream_common::gzfilestream_common() :
-  ios( gzfilestream_common::rdbuf() )
-{ }
-
-gzfilestream_common::~gzfilestream_common()
-{ }
-
-void gzfilestream_common::attach( int fd, int io_mode ) {
-
-  if ( !buffer.attach( fd, io_mode) )
-    clear( ios::failbit | ios::badbit );
-  else
-    clear();
-
-}
-
-void gzfilestream_common::open( const char *name, int io_mode ) {
-
-  if ( !buffer.open( name, io_mode ) )
-    clear( ios::failbit | ios::badbit );
-  else
-    clear();
-
-}
-
-void gzfilestream_common::close() {
-
-  if ( !buffer.close() )
-    clear( ios::failbit | ios::badbit );
-
-}
-
-gzfilebuf *gzfilestream_common::rdbuf()
-{
-  return &buffer;
-}
-
-gzifstream::gzifstream() :
-  ios( gzfilestream_common::rdbuf() )
-{
-  clear( ios::badbit );
-}
-
-gzifstream::gzifstream( const char *name, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::open( name, io_mode );
-}
-
-gzifstream::gzifstream( int fd, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::attach( fd, io_mode );
-}
-
-gzifstream::~gzifstream() { }
-
-gzofstream::gzofstream() :
-  ios( gzfilestream_common::rdbuf() )
-{
-  clear( ios::badbit );
-}
-
-gzofstream::gzofstream( const char *name, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::open( name, io_mode );
-}
-
-gzofstream::gzofstream( int fd, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::attach( fd, io_mode );
-}
-
-gzofstream::~gzofstream() { }
diff --git a/tkimg1.3/libz/contrib/iostream/zfstream.h b/tkimg1.3/libz/contrib/iostream/zfstream.h
deleted file mode 100644
index ed79098..0000000
--- a/tkimg1.3/libz/contrib/iostream/zfstream.h
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#ifndef zfstream_h
-#define zfstream_h
-
-#include <fstream.h>
-#include "zlib.h"
-
-class gzfilebuf : public streambuf {
-
-public:
-
-  gzfilebuf( );
-  virtual ~gzfilebuf();
-
-  gzfilebuf *open( const char *name, int io_mode );
-  gzfilebuf *attach( int file_descriptor, int io_mode );
-  gzfilebuf *close();
-
-  int setcompressionlevel( int comp_level );
-  int setcompressionstrategy( int comp_strategy );
-
-  inline int is_open() const { return (file !=NULL); }
-
-  virtual streampos seekoff( streamoff, ios::seek_dir, int );
-
-  virtual int sync();
-
-protected:
-
-  virtual int underflow();
-  virtual int overflow( int = EOF );
-
-private:
-
-  gzFile file;
-  short mode;
-  short own_file_descriptor;
-
-  int flushbuf();
-  int fillbuf();
-
-};
-
-class gzfilestream_common : virtual public ios {
-
-  friend class gzifstream;
-  friend class gzofstream;
-  friend gzofstream &setcompressionlevel( gzofstream &, int );
-  friend gzofstream &setcompressionstrategy( gzofstream &, int );
-
-public:
-  virtual ~gzfilestream_common();
-
-  void attach( int fd, int io_mode );
-  void open( const char *name, int io_mode );
-  void close();
-
-protected:
-  gzfilestream_common();
-
-private:
-  gzfilebuf *rdbuf();
-
-  gzfilebuf buffer;
-
-};
-
-class gzifstream : public gzfilestream_common, public istream {
-
-public:
-
-  gzifstream();
-  gzifstream( const char *name, int io_mode = ios::in );
-  gzifstream( int fd, int io_mode = ios::in );
-
-  virtual ~gzifstream();
-
-};
-
-class gzofstream : public gzfilestream_common, public ostream {
-
-public:
-
-  gzofstream();
-  gzofstream( const char *name, int io_mode = ios::out );
-  gzofstream( int fd, int io_mode = ios::out );
-
-  virtual ~gzofstream();
-
-};
-
-template<class T> class gzomanip {
-  friend gzofstream &operator<<(gzofstream &, const gzomanip<T> &);
-public:
-  gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { }
-private:
-  gzofstream &(*func)(gzofstream &, T);
-  T val;
-};
-
-template<class T> gzofstream &operator<<(gzofstream &s, const gzomanip<T> &m)
-{
-  return (*m.func)(s, m.val);
-}
-
-inline gzofstream &setcompressionlevel( gzofstream &s, int l )
-{
-  (s.rdbuf())->setcompressionlevel(l);
-  return s;
-}
-
-inline gzofstream &setcompressionstrategy( gzofstream &s, int l )
-{
-  (s.rdbuf())->setcompressionstrategy(l);
-  return s;
-}
-
-inline gzomanip<int> setcompressionlevel(int l)
-{
-  return gzomanip<int>(&setcompressionlevel,l);
-}
-
-inline gzomanip<int> setcompressionstrategy(int l)
-{
-  return gzomanip<int>(&setcompressionstrategy,l);
-}
-
-#endif
diff --git a/tkimg1.3/libz/contrib/iostream2/zstream.h b/tkimg1.3/libz/contrib/iostream2/zstream.h
deleted file mode 100644
index 1f5e66f..0000000
--- a/tkimg1.3/libz/contrib/iostream2/zstream.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Christian Michelsen Research AS
- * Advanced Computing
- * Fantoftvegen 38, 5036 BERGEN, Norway
- * http://www.cmr.no
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Christian Michelsen Research AS makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef ZSTREAM__H
-#define ZSTREAM__H
-
-/*
- * zstream.h - C++ interface to the 'zlib' general purpose compression library
- * $Id: zstream.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- */
-
-#include <strstream.h>
-#include <string.h>
-#include <stdio.h>
-#include "zlib.h"
-
-#if defined(_WIN32)
-#   include <fcntl.h>
-#   include <io.h>
-#   define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#   define SET_BINARY_MODE(file)
-#endif
-
-class zstringlen {
-public:
-    zstringlen(class izstream&);
-    zstringlen(class ozstream&, const char*);
-    size_t value() const { return val.word; }
-private:
-    struct Val { unsigned char byte; size_t word; } val;
-};
-
-//  ----------------------------- izstream -----------------------------
-
-class izstream
-{
-    public:
-        izstream() : m_fp(0) {}
-        izstream(FILE* fp) : m_fp(0) { open(fp); }
-        izstream(const char* name) : m_fp(0) { open(name); }
-        ~izstream() { close(); }
-
-        /* Opens a gzip (.gz) file for reading.
-         * open() can be used to read a file which is not in gzip format;
-         * in this case read() will directly read from the file without
-         * decompression. errno can be checked to distinguish two error
-         * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
-         */
-        void open(const char* name) {
-            if (m_fp) close();
-            m_fp = ::gzopen(name, "rb");
-        }
-
-        void open(FILE* fp) {
-            SET_BINARY_MODE(fp);
-            if (m_fp) close();
-            m_fp = ::gzdopen(fileno(fp), "rb");
-        }
-
-        /* Flushes all pending input if necessary, closes the compressed file
-         * and deallocates all the (de)compression state. The return value is
-         * the zlib error number (see function error() below).
-         */
-        int close() {
-            int r = ::gzclose(m_fp);
-            m_fp = 0; return r;
-        }
-
-        /* Binary read the given number of bytes from the compressed file.
-         */
-        int read(void* buf, size_t len) {
-            return ::gzread(m_fp, buf, len);
-        }
-
-        /* Returns the error message for the last error which occurred on the
-         * given compressed file. errnum is set to zlib error number. If an
-         * error occurred in the file system and not in the compression library,
-         * errnum is set to Z_ERRNO and the application may consult errno
-         * to get the exact error code.
-         */
-        const char* error(int* errnum) {
-            return ::gzerror(m_fp, errnum);
-        }
-
-        gzFile fp() { return m_fp; }
-
-    private:
-        gzFile m_fp;
-};
-
-/*
- * Binary read the given (array of) object(s) from the compressed file.
- * If the input file was not in gzip format, read() copies the objects number
- * of bytes into the buffer.
- * returns the number of uncompressed bytes actually read
- * (0 for end of file, -1 for error).
- */
-template <class T, class Items>
-inline int read(izstream& zs, T* x, Items items) {
-    return ::gzread(zs.fp(), x, items*sizeof(T));
-}
-
-/*
- * Binary input with the '>' operator.
- */
-template <class T>
-inline izstream& operator>(izstream& zs, T& x) {
-    ::gzread(zs.fp(), &x, sizeof(T));
-    return zs;
-}
-
-
-inline zstringlen::zstringlen(izstream& zs) {
-    zs > val.byte;
-    if (val.byte == 255) zs > val.word;
-    else val.word = val.byte;
-}
-
-/*
- * Read length of string + the string with the '>' operator.
- */
-inline izstream& operator>(izstream& zs, char* x) {
-    zstringlen len(zs);
-    ::gzread(zs.fp(), x, len.value());
-    x[len.value()] = '\0';
-    return zs;
-}
-
-inline char* read_string(izstream& zs) {
-    zstringlen len(zs);
-    char* x = new char[len.value()+1];
-    ::gzread(zs.fp(), x, len.value());
-    x[len.value()] = '\0';
-    return x;
-}
-
-// ----------------------------- ozstream -----------------------------
-
-class ozstream
-{
-    public:
-        ozstream() : m_fp(0), m_os(0) {
-        }
-        ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)
-            : m_fp(0), m_os(0) {
-            open(fp, level);
-        }
-        ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)
-            : m_fp(0), m_os(0) {
-            open(name, level);
-        }
-        ~ozstream() {
-            close();
-        }
-
-        /* Opens a gzip (.gz) file for writing.
-         * The compression level parameter should be in 0..9
-         * errno can be checked to distinguish two error cases
-         * (if errno is zero, the zlib error is Z_MEM_ERROR).
-         */
-        void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
-            char mode[4] = "wb\0";
-            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
-            if (m_fp) close();
-            m_fp = ::gzopen(name, mode);
-        }
-
-        /* open from a FILE pointer.
-         */
-        void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
-            SET_BINARY_MODE(fp);
-            char mode[4] = "wb\0";
-            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
-            if (m_fp) close();
-            m_fp = ::gzdopen(fileno(fp), mode);
-        }
-
-        /* Flushes all pending output if necessary, closes the compressed file
-         * and deallocates all the (de)compression state. The return value is
-         * the zlib error number (see function error() below).
-         */
-        int close() {
-            if (m_os) {
-                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
-                delete[] m_os->str(); delete m_os; m_os = 0;
-            }
-            int r = ::gzclose(m_fp); m_fp = 0; return r;
-        }
-
-        /* Binary write the given number of bytes into the compressed file.
-         */
-        int write(const void* buf, size_t len) {
-            return ::gzwrite(m_fp, (voidp) buf, len);
-        }
-
-        /* Flushes all pending output into the compressed file. The parameter
-         * _flush is as in the deflate() function. The return value is the zlib
-         * error number (see function gzerror below). flush() returns Z_OK if
-         * the flush_ parameter is Z_FINISH and all output could be flushed.
-         * flush() should be called only when strictly necessary because it can
-         * degrade compression.
-         */
-        int flush(int _flush) {
-            os_flush();
-            return ::gzflush(m_fp, _flush);
-        }
-
-        /* Returns the error message for the last error which occurred on the
-         * given compressed file. errnum is set to zlib error number. If an
-         * error occurred in the file system and not in the compression library,
-         * errnum is set to Z_ERRNO and the application may consult errno
-         * to get the exact error code.
-         */
-        const char* error(int* errnum) {
-            return ::gzerror(m_fp, errnum);
-        }
-
-        gzFile fp() { return m_fp; }
-
-        ostream& os() {
-            if (m_os == 0) m_os = new ostrstream;
-            return *m_os;
-        }
-
-        void os_flush() {
-            if (m_os && m_os->pcount()>0) {
-                ostrstream* oss = new ostrstream;
-                oss->fill(m_os->fill());
-                oss->flags(m_os->flags());
-                oss->precision(m_os->precision());
-                oss->width(m_os->width());
-                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
-                delete[] m_os->str(); delete m_os; m_os = oss;
-            }
-        }
-
-    private:
-        gzFile m_fp;
-        ostrstream* m_os;
-};
-
-/*
- * Binary write the given (array of) object(s) into the compressed file.
- * returns the number of uncompressed bytes actually written
- * (0 in case of error).
- */
-template <class T, class Items>
-inline int write(ozstream& zs, const T* x, Items items) {
-    return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));
-}
-
-/*
- * Binary output with the '<' operator.
- */
-template <class T>
-inline ozstream& operator<(ozstream& zs, const T& x) {
-    ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
-    return zs;
-}
-
-inline zstringlen::zstringlen(ozstream& zs, const char* x) {
-    val.byte = 255;  val.word = ::strlen(x);
-    if (val.word < 255) zs < (val.byte = val.word);
-    else zs < val;
-}
-
-/*
- * Write length of string + the string with the '<' operator.
- */
-inline ozstream& operator<(ozstream& zs, const char* x) {
-    zstringlen len(zs, x);
-    ::gzwrite(zs.fp(), (voidp) x, len.value());
-    return zs;
-}
-
-#ifdef _MSC_VER
-inline ozstream& operator<(ozstream& zs, char* const& x) {
-    return zs < (const char*) x;
-}
-#endif
-
-/*
- * Ascii write with the << operator;
- */
-template <class T>
-inline ostream& operator<<(ozstream& zs, const T& x) {
-    zs.os_flush();
-    return zs.os() << x;
-}
-
-#endif
diff --git a/tkimg1.3/libz/contrib/iostream2/zstream_test.cpp b/tkimg1.3/libz/contrib/iostream2/zstream_test.cpp
deleted file mode 100644
index 6273f62..0000000
--- a/tkimg1.3/libz/contrib/iostream2/zstream_test.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "zstream.h"
-#include <math.h>
-#include <stdlib.h>
-#include <iomanip.h>
-
-void main() {
-    char h[256] = "Hello";
-    char* g = "Goodbye";
-    ozstream out("temp.gz");
-    out < "This works well" < h < g;
-    out.close();
-
-    izstream in("temp.gz"); // read it back
-    char *x = read_string(in), *y = new char[256], z[256];
-    in > y > z;
-    in.close();
-    cout << x << endl << y << endl << z << endl;
-
-    out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results
-    out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl;
-    out << z << endl << y << endl << x << endl;
-    out << 1.1234567890123456789 << endl;
-
-    delete[] x; delete[] y;
-}
diff --git a/tkimg1.3/libz/contrib/iostream3/README b/tkimg1.3/libz/contrib/iostream3/README
deleted file mode 100644
index f7b319a..0000000
--- a/tkimg1.3/libz/contrib/iostream3/README
+++ /dev/null
@@ -1,35 +0,0 @@
-These classes provide a C++ stream interface to the zlib library. It allows you
-to do things like:
-
-  gzofstream outf("blah.gz");
-  outf << "These go into the gzip file " << 123 << endl;
-
-It does this by deriving a specialized stream buffer for gzipped files, which is
-the way Stroustrup would have done it. :->
-
-The gzifstream and gzofstream classes were originally written by Kevin Ruland
-and made available in the zlib contrib/iostream directory. The older version still
-compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
-this version.
-
-The new classes are as standard-compliant as possible, closely following the
-approach of the standard library's fstream classes. It compiles under gcc versions
-3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
-library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
-from the previous one in the following respects:
-- added showmanyc
-- added setbuf, with support for unbuffered output via setbuf(0,0)
-- a few bug fixes of stream behavior
-- gzipped output file opened with default compression level instead of maximum level
-- setcompressionlevel()/strategy() members replaced by single setcompression()
-
-The code is provided "as is", with the permission to use, copy, modify, distribute
-and sell it for any purpose without fee.
-
-Ludwig Schwardt
-<schwardt at sun.ac.za>
-
-DSP Lab
-Electrical & Electronic Engineering Department
-University of Stellenbosch
-South Africa
diff --git a/tkimg1.3/libz/contrib/iostream3/TODO b/tkimg1.3/libz/contrib/iostream3/TODO
deleted file mode 100644
index 7032f97..0000000
--- a/tkimg1.3/libz/contrib/iostream3/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-Possible upgrades to gzfilebuf:
-
-- The ability to do putback (e.g. putbackfail)
-
-- The ability to seek (zlib supports this, but could be slow/tricky)
-
-- Simultaneous read/write access (does it make sense?)
-
-- Support for ios_base::ate open mode
-
-- Locale support?
-
-- Check public interface to see which calls give problems
-  (due to dependence on library internals)
-
-- Override operator<<(ostream&, gzfilebuf*) to allow direct copying
-  of stream buffer to stream ( i.e. os << is.rdbuf(); )
diff --git a/tkimg1.3/libz/contrib/iostream3/test.cc b/tkimg1.3/libz/contrib/iostream3/test.cc
deleted file mode 100644
index 9423533..0000000
--- a/tkimg1.3/libz/contrib/iostream3/test.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Test program for gzifstream and gzofstream
- *
- * by Ludwig Schwardt <schwardt at sun.ac.za>
- * original version by Kevin Ruland <kevin at rodin.wustl.edu>
- */
-
-#include "zfstream.h"
-#include <iostream>      // for cout
-
-int main() {
-
-  gzofstream outf;
-  gzifstream inf;
-  char buf[80];
-
-  outf.open("test1.txt.gz");
-  outf << "The quick brown fox sidestepped the lazy canine\n"
-       << 1.3 << "\nPlan " << 9 << std::endl;
-  outf.close();
-  std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n"
-            << "The quick brown fox sidestepped the lazy canine\n"
-            << 1.3 << "\nPlan " << 9 << std::endl;
-
-  std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n";
-  inf.open("test1.txt.gz");
-  while (inf.getline(buf,80,'\n')) {
-    std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
-  }
-  inf.close();
-
-  outf.rdbuf()->pubsetbuf(0,0);
-  outf.open("test2.txt.gz");
-  outf << setcompression(Z_NO_COMPRESSION)
-       << "The quick brown fox sidestepped the lazy canine\n"
-       << 1.3 << "\nPlan " << 9 << std::endl;
-  outf.close();
-  std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form";
-
-  std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n";
-  inf.rdbuf()->pubsetbuf(0,0);
-  inf.open("test2.txt.gz");
-  while (inf.getline(buf,80,'\n')) {
-    std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
-  }
-  inf.close();
-
-  return 0;
-
-}
diff --git a/tkimg1.3/libz/contrib/iostream3/zfstream.cc b/tkimg1.3/libz/contrib/iostream3/zfstream.cc
deleted file mode 100644
index 94eb933..0000000
--- a/tkimg1.3/libz/contrib/iostream3/zfstream.cc
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <schwardt at sun.ac.za>
- * original version by Kevin Ruland <kevin at rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#include "zfstream.h"
-#include <cstring>          // for strcpy, strcat, strlen (mode strings)
-#include <cstdio>           // for BUFSIZ
-
-// Internal buffer sizes (default and "unbuffered" versions)
-#define BIGBUFSIZE BUFSIZ
-#define SMALLBUFSIZE 1
-
-/*****************************************************************************/
-
-// Default constructor
-gzfilebuf::gzfilebuf()
-: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false),
-  buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
-{
-  // No buffers to start with
-  this->disable_buffer();
-}
-
-// Destructor
-gzfilebuf::~gzfilebuf()
-{
-  // Sync output buffer and close only if responsible for file
-  // (i.e. attached streams should be left open at this stage)
-  this->sync();
-  if (own_fd)
-    this->close();
-  // Make sure internal buffer is deallocated
-  this->disable_buffer();
-}
-
-// Set compression level and strategy
-int
-gzfilebuf::setcompression(int comp_level,
-                          int comp_strategy)
-{
-  return gzsetparams(file, comp_level, comp_strategy);
-}
-
-// Open gzipped file
-gzfilebuf*
-gzfilebuf::open(const char *name,
-                std::ios_base::openmode mode)
-{
-  // Fail if file already open
-  if (this->is_open())
-    return NULL;
-  // Don't support simultaneous read/write access (yet)
-  if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
-
-  // Build mode string for gzopen and check it [27.8.1.3.2]
-  char char_mode[6] = "\0\0\0\0\0";
-  if (!this->open_mode(mode, char_mode))
-    return NULL;
-
-  // Attempt to open file
-  if ((file = gzopen(name, char_mode)) == NULL)
-    return NULL;
-
-  // On success, allocate internal buffer and set flags
-  this->enable_buffer();
-  io_mode = mode;
-  own_fd = true;
-  return this;
-}
-
-// Attach to gzipped file
-gzfilebuf*
-gzfilebuf::attach(int fd,
-                  std::ios_base::openmode mode)
-{
-  // Fail if file already open
-  if (this->is_open())
-    return NULL;
-  // Don't support simultaneous read/write access (yet)
-  if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
-
-  // Build mode string for gzdopen and check it [27.8.1.3.2]
-  char char_mode[6] = "\0\0\0\0\0";
-  if (!this->open_mode(mode, char_mode))
-    return NULL;
-
-  // Attempt to attach to file
-  if ((file = gzdopen(fd, char_mode)) == NULL)
-    return NULL;
-
-  // On success, allocate internal buffer and set flags
-  this->enable_buffer();
-  io_mode = mode;
-  own_fd = false;
-  return this;
-}
-
-// Close gzipped file
-gzfilebuf*
-gzfilebuf::close()
-{
-  // Fail immediately if no file is open
-  if (!this->is_open())
-    return NULL;
-  // Assume success
-  gzfilebuf* retval = this;
-  // Attempt to sync and close gzipped file
-  if (this->sync() == -1)
-    retval = NULL;
-  if (gzclose(file) < 0)
-    retval = NULL;
-  // File is now gone anyway (postcondition [27.8.1.3.8])
-  file = NULL;
-  own_fd = false;
-  // Destroy internal buffer if it exists
-  this->disable_buffer();
-  return retval;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Convert int open mode to mode string
-bool
-gzfilebuf::open_mode(std::ios_base::openmode mode,
-                     char* c_mode) const
-{
-  bool testb = mode & std::ios_base::binary;
-  bool testi = mode & std::ios_base::in;
-  bool testo = mode & std::ios_base::out;
-  bool testt = mode & std::ios_base::trunc;
-  bool testa = mode & std::ios_base::app;
-
-  // Check for valid flag combinations - see [27.8.1.3.2] (Table 92)
-  // Original zfstream hardcoded the compression level to maximum here...
-  // Double the time for less than 1% size improvement seems
-  // excessive though - keeping it at the default level
-  // To change back, just append "9" to the next three mode strings
-  if (!testi && testo && !testt && !testa)
-    strcpy(c_mode, "w");
-  if (!testi && testo && !testt && testa)
-    strcpy(c_mode, "a");
-  if (!testi && testo && testt && !testa)
-    strcpy(c_mode, "w");
-  if (testi && !testo && !testt && !testa)
-    strcpy(c_mode, "r");
-  // No read/write mode yet
-//  if (testi && testo && !testt && !testa)
-//    strcpy(c_mode, "r+");
-//  if (testi && testo && testt && !testa)
-//    strcpy(c_mode, "w+");
-
-  // Mode string should be empty for invalid combination of flags
-  if (strlen(c_mode) == 0)
-    return false;
-  if (testb)
-    strcat(c_mode, "b");
-  return true;
-}
-
-// Determine number of characters in internal get buffer
-std::streamsize
-gzfilebuf::showmanyc()
-{
-  // Calls to underflow will fail if file not opened for reading
-  if (!this->is_open() || !(io_mode & std::ios_base::in))
-    return -1;
-  // Make sure get area is in use
-  if (this->gptr() && (this->gptr() < this->egptr()))
-    return std::streamsize(this->egptr() - this->gptr());
-  else
-    return 0;
-}
-
-// Fill get area from gzipped file
-gzfilebuf::int_type
-gzfilebuf::underflow()
-{
-  // If something is left in the get area by chance, return it
-  // (this shouldn't normally happen, as underflow is only supposed
-  // to be called when gptr >= egptr, but it serves as error check)
-  if (this->gptr() && (this->gptr() < this->egptr()))
-    return traits_type::to_int_type(*(this->gptr()));
-
-  // If the file hasn't been opened for reading, produce error
-  if (!this->is_open() || !(io_mode & std::ios_base::in))
-    return traits_type::eof();
-
-  // Attempt to fill internal buffer from gzipped file
-  // (buffer must be guaranteed to exist...)
-  int bytes_read = gzread(file, buffer, buffer_size);
-  // Indicates error or EOF
-  if (bytes_read <= 0)
-  {
-    // Reset get area
-    this->setg(buffer, buffer, buffer);
-    return traits_type::eof();
-  }
-  // Make all bytes read from file available as get area
-  this->setg(buffer, buffer, buffer + bytes_read);
-
-  // Return next character in get area
-  return traits_type::to_int_type(*(this->gptr()));
-}
-
-// Write put area to gzipped file
-gzfilebuf::int_type
-gzfilebuf::overflow(int_type c)
-{
-  // Determine whether put area is in use
-  if (this->pbase())
-  {
-    // Double-check pointer range
-    if (this->pptr() > this->epptr() || this->pptr() < this->pbase())
-      return traits_type::eof();
-    // Add extra character to buffer if not EOF
-    if (!traits_type::eq_int_type(c, traits_type::eof()))
-    {
-      *(this->pptr()) = traits_type::to_char_type(c);
-      this->pbump(1);
-    }
-    // Number of characters to write to file
-    int bytes_to_write = this->pptr() - this->pbase();
-    // Overflow doesn't fail if nothing is to be written
-    if (bytes_to_write > 0)
-    {
-      // If the file hasn't been opened for writing, produce error
-      if (!this->is_open() || !(io_mode & std::ios_base::out))
-        return traits_type::eof();
-      // If gzipped file won't accept all bytes written to it, fail
-      if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write)
-        return traits_type::eof();
-      // Reset next pointer to point to pbase on success
-      this->pbump(-bytes_to_write);
-    }
-  }
-  // Write extra character to file if not EOF
-  else if (!traits_type::eq_int_type(c, traits_type::eof()))
-  {
-    // If the file hasn't been opened for writing, produce error
-    if (!this->is_open() || !(io_mode & std::ios_base::out))
-      return traits_type::eof();
-    // Impromptu char buffer (allows "unbuffered" output)
-    char_type last_char = traits_type::to_char_type(c);
-    // If gzipped file won't accept this character, fail
-    if (gzwrite(file, &last_char, 1) != 1)
-      return traits_type::eof();
-  }
-
-  // If you got here, you have succeeded (even if c was EOF)
-  // The return value should therefore be non-EOF
-  if (traits_type::eq_int_type(c, traits_type::eof()))
-    return traits_type::not_eof(c);
-  else
-    return c;
-}
-
-// Assign new buffer
-std::streambuf*
-gzfilebuf::setbuf(char_type* p,
-                  std::streamsize n)
-{
-  // First make sure stuff is sync'ed, for safety
-  if (this->sync() == -1)
-    return NULL;
-  // If buffering is turned off on purpose via setbuf(0,0), still allocate one...
-  // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at
-  // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
-  // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems)
-  if (!p || !n)
-  {
-    // Replace existing buffer (if any) with small internal buffer
-    this->disable_buffer();
-    buffer = NULL;
-    buffer_size = 0;
-    own_buffer = true;
-    this->enable_buffer();
-  }
-  else
-  {
-    // Replace existing buffer (if any) with external buffer
-    this->disable_buffer();
-    buffer = p;
-    buffer_size = n;
-    own_buffer = false;
-    this->enable_buffer();
-  }
-  return this;
-}
-
-// Write put area to gzipped file (i.e. ensures that put area is empty)
-int
-gzfilebuf::sync()
-{
-  return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Allocate internal buffer
-void
-gzfilebuf::enable_buffer()
-{
-  // If internal buffer required, allocate one
-  if (own_buffer && !buffer)
-  {
-    // Check for buffered vs. "unbuffered"
-    if (buffer_size > 0)
-    {
-      // Allocate internal buffer
-      buffer = new char_type[buffer_size];
-      // Get area starts empty and will be expanded by underflow as need arises
-      this->setg(buffer, buffer, buffer);
-      // Setup entire internal buffer as put area.
-      // The one-past-end pointer actually points to the last element of the buffer,
-      // so that overflow(c) can safely add the extra character c to the sequence.
-      // These pointers remain in place for the duration of the buffer
-      this->setp(buffer, buffer + buffer_size - 1);
-    }
-    else
-    {
-      // Even in "unbuffered" case, (small?) get buffer is still required
-      buffer_size = SMALLBUFSIZE;
-      buffer = new char_type[buffer_size];
-      this->setg(buffer, buffer, buffer);
-      // "Unbuffered" means no put buffer
-      this->setp(0, 0);
-    }
-  }
-  else
-  {
-    // If buffer already allocated, reset buffer pointers just to make sure no
-    // stale chars are lying around
-    this->setg(buffer, buffer, buffer);
-    this->setp(buffer, buffer + buffer_size - 1);
-  }
-}
-
-// Destroy internal buffer
-void
-gzfilebuf::disable_buffer()
-{
-  // If internal buffer exists, deallocate it
-  if (own_buffer && buffer)
-  {
-    // Preserve unbuffered status by zeroing size
-    if (!this->pbase())
-      buffer_size = 0;
-    delete[] buffer;
-    buffer = NULL;
-    this->setg(0, 0, 0);
-    this->setp(0, 0);
-  }
-  else
-  {
-    // Reset buffer pointers to initial state if external buffer exists
-    this->setg(buffer, buffer, buffer);
-    if (buffer)
-      this->setp(buffer, buffer + buffer_size - 1);
-    else
-      this->setp(0, 0);
-  }
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzifstream::gzifstream()
-: std::istream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzifstream::gzifstream(const char* name,
-                       std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
-  this->init(&sb);
-  this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzifstream::gzifstream(int fd,
-                       std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
-  this->init(&sb);
-  this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzifstream::open(const char* name,
-                 std::ios_base::openmode mode)
-{
-  if (!sb.open(name, mode | std::ios_base::in))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzifstream::attach(int fd,
-                   std::ios_base::openmode mode)
-{
-  if (!sb.attach(fd, mode | std::ios_base::in))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Close file
-void
-gzifstream::close()
-{
-  if (!sb.close())
-    this->setstate(std::ios_base::failbit);
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzofstream::gzofstream()
-: std::ostream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzofstream::gzofstream(const char* name,
-                       std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
-  this->init(&sb);
-  this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzofstream::gzofstream(int fd,
-                       std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
-  this->init(&sb);
-  this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzofstream::open(const char* name,
-                 std::ios_base::openmode mode)
-{
-  if (!sb.open(name, mode | std::ios_base::out))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzofstream::attach(int fd,
-                   std::ios_base::openmode mode)
-{
-  if (!sb.attach(fd, mode | std::ios_base::out))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Close file
-void
-gzofstream::close()
-{
-  if (!sb.close())
-    this->setstate(std::ios_base::failbit);
-}
diff --git a/tkimg1.3/libz/contrib/iostream3/zfstream.h b/tkimg1.3/libz/contrib/iostream3/zfstream.h
deleted file mode 100644
index 8574479..0000000
--- a/tkimg1.3/libz/contrib/iostream3/zfstream.h
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <schwardt at sun.ac.za>
- * original version by Kevin Ruland <kevin at rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#ifndef ZFSTREAM_H
-#define ZFSTREAM_H
-
-#include <istream>  // not iostream, since we don't need cin/cout
-#include <ostream>
-#include "zlib.h"
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file stream buffer class.
- *
- *  This class implements basic_filebuf for gzipped files. It doesn't yet support
- *  seeking (allowed by zlib but slow/limited), putback and read/write access
- *  (tricky). Otherwise, it attempts to be a drop-in replacement for the standard
- *  file streambuf.
-*/
-class gzfilebuf : public std::streambuf
-{
-public:
-  //  Default constructor.
-  gzfilebuf();
-
-  //  Destructor.
-  virtual
-  ~gzfilebuf();
-
-  /**
-   *  @brief  Set compression level and strategy on the fly.
-   *  @param  comp_level  Compression level (see zlib.h for allowed values)
-   *  @param  comp_strategy  Compression strategy (see zlib.h for allowed values)
-   *  @return  Z_OK on success, Z_STREAM_ERROR otherwise.
-   *
-   *  Unfortunately, these parameters cannot be modified separately, as the
-   *  previous zfstream version assumed. Since the strategy is seldom changed,
-   *  it can default and setcompression(level) then becomes like the old
-   *  setcompressionlevel(level).
-  */
-  int
-  setcompression(int comp_level,
-                 int comp_strategy = Z_DEFAULT_STRATEGY);
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() const { return (file != NULL); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  open(const char* name,
-       std::ios_base::openmode mode);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  attach(int fd,
-         std::ios_base::openmode mode);
-
-  /**
-   *  @brief  Close gzipped file.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  close();
-
-protected:
-  /**
-   *  @brief  Convert ios open mode int to mode string used by zlib.
-   *  @return  True if valid mode flag combination.
-  */
-  bool
-  open_mode(std::ios_base::openmode mode,
-            char* c_mode) const;
-
-  /**
-   *  @brief  Number of characters available in stream buffer.
-   *  @return  Number of characters.
-   *
-   *  This indicates number of characters in get area of stream buffer.
-   *  These characters can be read without accessing the gzipped file.
-  */
-  virtual std::streamsize
-  showmanyc();
-
-  /**
-   *  @brief  Fill get area from gzipped file.
-   *  @return  First character in get area on success, EOF on error.
-   *
-   *  This actually reads characters from gzipped file to stream
-   *  buffer. Always buffered.
-  */
-  virtual int_type
-  underflow();
-
-  /**
-   *  @brief  Write put area to gzipped file.
-   *  @param  c  Extra character to add to buffer contents.
-   *  @return  Non-EOF on success, EOF on error.
-   *
-   *  This actually writes characters in stream buffer to
-   *  gzipped file. With unbuffered output this is done one
-   *  character at a time.
-  */
-  virtual int_type
-  overflow(int_type c = traits_type::eof());
-
-  /**
-   *  @brief  Installs external stream buffer.
-   *  @param  p  Pointer to char buffer.
-   *  @param  n  Size of external buffer.
-   *  @return  @c this on success, NULL on failure.
-   *
-   *  Call setbuf(0,0) to enable unbuffered output.
-  */
-  virtual std::streambuf*
-  setbuf(char_type* p,
-         std::streamsize n);
-
-  /**
-   *  @brief  Flush stream buffer to file.
-   *  @return  0 on success, -1 on error.
-   *
-   *  This calls underflow(EOF) to do the job.
-  */
-  virtual int
-  sync();
-
-//
-// Some future enhancements
-//
-//  virtual int_type uflow();
-//  virtual int_type pbackfail(int_type c = traits_type::eof());
-//  virtual pos_type
-//  seekoff(off_type off,
-//          std::ios_base::seekdir way,
-//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-//  virtual pos_type
-//  seekpos(pos_type sp,
-//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-
-private:
-  /**
-   *  @brief  Allocate internal buffer.
-   *
-   *  This function is safe to call multiple times. It will ensure
-   *  that a proper internal buffer exists if it is required. If the
-   *  buffer already exists or is external, the buffer pointers will be
-   *  reset to their original state.
-  */
-  void
-  enable_buffer();
-
-  /**
-   *  @brief  Destroy internal buffer.
-   *
-   *  This function is safe to call multiple times. It will ensure
-   *  that the internal buffer is deallocated if it exists. In any
-   *  case, it will also reset the buffer pointers.
-  */
-  void
-  disable_buffer();
-
-  /**
-   *  Underlying file pointer.
-  */
-  gzFile file;
-
-  /**
-   *  Mode in which file was opened.
-  */
-  std::ios_base::openmode io_mode;
-
-  /**
-   *  @brief  True if this object owns file descriptor.
-   *
-   *  This makes the class responsible for closing the file
-   *  upon destruction.
-  */
-  bool own_fd;
-
-  /**
-   *  @brief  Stream buffer.
-   *
-   *  For simplicity this remains allocated on the free store for the
-   *  entire life span of the gzfilebuf object, unless replaced by setbuf.
-  */
-  char_type* buffer;
-
-  /**
-   *  @brief  Stream buffer size.
-   *
-   *  Defaults to system default buffer size (typically 8192 bytes).
-   *  Modified by setbuf.
-  */
-  std::streamsize buffer_size;
-
-  /**
-   *  @brief  True if this object owns stream buffer.
-   *
-   *  This makes the class responsible for deleting the buffer
-   *  upon destruction.
-  */
-  bool own_buffer;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file input stream class.
- *
- *  This class implements ifstream for gzipped files. Seeking and putback
- *  is not supported yet.
-*/
-class gzifstream : public std::istream
-{
-public:
-  //  Default constructor
-  gzifstream();
-
-  /**
-   *  @brief  Construct stream on gzipped file to be opened.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-  */
-  explicit
-  gzifstream(const char* name,
-             std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Construct stream on already open gzipped file.
-   *  @param  fd    File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-  */
-  explicit
-  gzifstream(int fd,
-             std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  Obtain underlying stream buffer.
-  */
-  gzfilebuf*
-  rdbuf() const
-  { return const_cast<gzfilebuf*>(&sb); }
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() { return sb.is_open(); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-   *
-   *  Stream will be in state good() if file opens successfully;
-   *  otherwise in state fail(). This differs from the behavior of
-   *  ifstream, which never sets the state to good() and therefore
-   *  won't allow you to reuse the stream for a second file unless
-   *  you manually clear() the state. The choice is a matter of
-   *  convenience.
-  */
-  void
-  open(const char* name,
-       std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-   *
-   *  Stream will be in state good() if attach succeeded; otherwise
-   *  in state fail().
-  */
-  void
-  attach(int fd,
-         std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Close gzipped file.
-   *
-   *  Stream will be in state fail() if close failed.
-  */
-  void
-  close();
-
-private:
-  /**
-   *  Underlying stream buffer.
-  */
-  gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file output stream class.
- *
- *  This class implements ofstream for gzipped files. Seeking and putback
- *  is not supported yet.
-*/
-class gzofstream : public std::ostream
-{
-public:
-  //  Default constructor
-  gzofstream();
-
-  /**
-   *  @brief  Construct stream on gzipped file to be opened.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-  */
-  explicit
-  gzofstream(const char* name,
-             std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Construct stream on already open gzipped file.
-   *  @param  fd    File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-  */
-  explicit
-  gzofstream(int fd,
-             std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  Obtain underlying stream buffer.
-  */
-  gzfilebuf*
-  rdbuf() const
-  { return const_cast<gzfilebuf*>(&sb); }
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() { return sb.is_open(); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-   *
-   *  Stream will be in state good() if file opens successfully;
-   *  otherwise in state fail(). This differs from the behavior of
-   *  ofstream, which never sets the state to good() and therefore
-   *  won't allow you to reuse the stream for a second file unless
-   *  you manually clear() the state. The choice is a matter of
-   *  convenience.
-  */
-  void
-  open(const char* name,
-       std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-   *
-   *  Stream will be in state good() if attach succeeded; otherwise
-   *  in state fail().
-  */
-  void
-  attach(int fd,
-         std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Close gzipped file.
-   *
-   *  Stream will be in state fail() if close failed.
-  */
-  void
-  close();
-
-private:
-  /**
-   *  Underlying stream buffer.
-  */
-  gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file output stream manipulator class.
- *
- *  This class defines a two-argument manipulator for gzofstream. It is used
- *  as base for the setcompression(int,int) manipulator.
-*/
-template<typename T1, typename T2>
-  class gzomanip2
-  {
-  public:
-    // Allows insertor to peek at internals
-    template <typename Ta, typename Tb>
-      friend gzofstream&
-      operator<<(gzofstream&,
-                 const gzomanip2<Ta,Tb>&);
-
-    // Constructor
-    gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2),
-              T1 v1,
-              T2 v2);
-  private:
-    // Underlying manipulator function
-    gzofstream&
-    (*func)(gzofstream&, T1, T2);
-
-    // Arguments for manipulator function
-    T1 val1;
-    T2 val2;
-  };
-
-/*****************************************************************************/
-
-// Manipulator function thunks through to stream buffer
-inline gzofstream&
-setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY)
-{
-  (gzs.rdbuf())->setcompression(l, s);
-  return gzs;
-}
-
-// Manipulator constructor stores arguments
-template<typename T1, typename T2>
-  inline
-  gzomanip2<T1,T2>::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2),
-                              T1 v1,
-                              T2 v2)
-  : func(f), val1(v1), val2(v2)
-  { }
-
-// Insertor applies underlying manipulator function to stream
-template<typename T1, typename T2>
-  inline gzofstream&
-  operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
-  { return (*m.func)(s, m.val1, m.val2); }
-
-// Insert this onto stream to simplify setting of compression level
-inline gzomanip2<int,int>
-setcompression(int l, int s = Z_DEFAULT_STRATEGY)
-{ return gzomanip2<int,int>(&setcompression, l, s); }
-
-#endif // ZFSTREAM_H
diff --git a/tkimg1.3/libz/contrib/masm686/match.asm b/tkimg1.3/libz/contrib/masm686/match.asm
deleted file mode 100644
index 2287804..0000000
--- a/tkimg1.3/libz/contrib/masm686/match.asm
+++ /dev/null
@@ -1,408 +0,0 @@
-
-; match.asm -- Pentium-Pro optimized version of longest_match()
-;
-; Updated for zlib 1.1.3 and converted to MASM 6.1x
-; Copyright (C) 2000 Dan Higdon <hdan at kinesoft.com>
-;                    and Chuck Walbourn <chuckw at kinesoft.com>
-; Corrections by Cosmin Truta <cosmint at cs.ubbcluj.ro>
-;
-; This is free software; you can redistribute it and/or modify it
-; under the terms of the GNU General Public License.
-
-; Based on match.S
-; Written for zlib 1.1.2
-; Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
-
-	.686P
-	.MODEL	FLAT
-
-;===========================================================================
-; EQUATES
-;===========================================================================
-
-MAX_MATCH	EQU 258
-MIN_MATCH	EQU 3
-MIN_LOOKAHEAD	EQU (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8	EQU ((MAX_MATCH + 7) AND (NOT 7))
-
-;===========================================================================
-; STRUCTURES
-;===========================================================================
-
-; This STRUCT assumes a 4-byte alignment
-
-DEFLATE_STATE	STRUCT
-ds_strm			dd ?
-ds_status		dd ?
-ds_pending_buf		dd ?
-ds_pending_buf_size	dd ?
-ds_pending_out		dd ?
-ds_pending		dd ?
-ds_wrap			dd ?
-ds_data_type		db ?
-ds_method		db ?
-			db ?	; padding
-			db ?	; padding
-ds_last_flush		dd ?
-ds_w_size		dd ?	; used
-ds_w_bits		dd ?
-ds_w_mask		dd ?	; used
-ds_window		dd ?	; used
-ds_window_size		dd ?
-ds_prev			dd ?	; used
-ds_head			dd ?
-ds_ins_h		dd ?
-ds_hash_size		dd ?
-ds_hash_bits		dd ?
-ds_hash_mask		dd ?
-ds_hash_shift		dd ?
-ds_block_start		dd ?
-ds_match_length		dd ?	; used
-ds_prev_match		dd ?	; used
-ds_match_available	dd ?
-ds_strstart		dd ?	; used
-ds_match_start		dd ?	; used
-ds_lookahead		dd ?	; used
-ds_prev_length		dd ?	; used
-ds_max_chain_length	dd ?	; used
-ds_max_laxy_match	dd ?
-ds_level		dd ?
-ds_strategy		dd ?
-ds_good_match		dd ?	; used
-ds_nice_match		dd ?	; used
-
-; Don't need anymore of the struct for match
-DEFLATE_STATE	ENDS
-
-;===========================================================================
-; CODE
-;===========================================================================
-_TEXT	SEGMENT
-
-;---------------------------------------------------------------------------
-; match_init
-;---------------------------------------------------------------------------
-	ALIGN	4
-PUBLIC	_match_init
-_match_init	PROC
-	; no initialization needed
-	ret
-_match_init	ENDP
-
-;---------------------------------------------------------------------------
-; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-;---------------------------------------------------------------------------
-	ALIGN	4
-
-PUBLIC	_longest_match
-_longest_match	PROC
-
-; Since this code uses EBP for a scratch register, the stack frame must
-; be manually constructed and referenced relative to the ESP register.
-
-; Stack image
-; Variables
-chainlenwmask	=  0	; high word: current chain len
-			; low word: s->wmask
-window		=  4	; local copy of s->window
-windowbestlen	=  8	; s->window + bestlen
-scanend		= 12	; last two bytes of string
-scanstart	= 16	; first two bytes of string
-scanalign	= 20	; dword-misalignment of string
-nicematch	= 24	; a good enough match size
-bestlen		= 28	; size of best match so far
-scan		= 32	; ptr to string wanting match
-varsize		= 36	; number of bytes (also offset to last saved register)
-
-; Saved Registers (actually pushed into place)
-ebx_save	= 36
-edi_save	= 40
-esi_save	= 44
-ebp_save	= 48
-
-; Parameters
-retaddr		= 52
-deflatestate	= 56
-curmatch	= 60
-
-; Save registers that the compiler may be using
-	push	ebp
-	push	edi
-	push	esi
-	push	ebx
-
-; Allocate local variable space
-	sub	esp,varsize
-
-; Retrieve the function arguments. ecx will hold cur_match
-; throughout the entire function. edx will hold the pointer to the
-; deflate_state structure during the function's setup (before
-; entering the main loop).
-
-	mov	edx, [esp+deflatestate]
-ASSUME	edx:PTR DEFLATE_STATE
-
-	mov	ecx, [esp+curmatch]
-
-; uInt wmask = s->w_mask;
-; unsigned chain_length = s->max_chain_length;
-; if (s->prev_length >= s->good_match) {
-;     chain_length >>= 2;
-; }
-
-	mov	eax, [edx].ds_prev_length
-	mov	ebx, [edx].ds_good_match
-	cmp	eax, ebx
-	mov	eax, [edx].ds_w_mask
-	mov	ebx, [edx].ds_max_chain_length
-	jl	SHORT LastMatchGood
-	shr	ebx, 2
-LastMatchGood:
-
-; chainlen is decremented once beforehand so that the function can
-; use the sign flag instead of the zero flag for the exit test.
-; It is then shifted into the high word, to make room for the wmask
-; value, which it will always accompany.
-
-	dec	ebx
-	shl	ebx, 16
-	or	ebx, eax
-	mov	[esp+chainlenwmask], ebx
-
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-	mov	eax, [edx].ds_nice_match
-	mov	ebx, [edx].ds_lookahead
-	cmp	ebx, eax
-	jl	SHORT LookaheadLess
-	mov	ebx, eax
-LookaheadLess:
-	mov	[esp+nicematch], ebx
-
-;/* register Bytef *scan = s->window + s->strstart;                     */
-
-	mov	esi, [edx].ds_window
-	mov	[esp+window], esi
-	mov	ebp, [edx].ds_strstart
-	lea	edi, [esi+ebp]
-	mov	[esp+scan],edi
-
-;/* Determine how many bytes the scan ptr is off from being             */
-;/* dword-aligned.                                                      */
-
-	mov	eax, edi
-	neg	eax
-	and	eax, 3
-	mov	[esp+scanalign], eax
-
-;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */
-;/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */
-
-	mov	eax, [edx].ds_w_size
-	sub	eax, MIN_LOOKAHEAD
-	sub	ebp, eax
-	jg	SHORT LimitPositive
-	xor	ebp, ebp
-LimitPositive:
-
-;/* int best_len = s->prev_length;                                      */
-
-	mov	eax, [edx].ds_prev_length
-	mov	[esp+bestlen], eax
-
-;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
-
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-
-;/* register ush scan_start = *(ushf*)scan;                             */
-;/* register ush scan_end   = *(ushf*)(scan+best_len-1);                */
-;/* Posf *prev = s->prev;                                               */
-
-	movzx	ebx, WORD PTR[edi]
-	mov	[esp+scanstart], ebx
-	movzx	ebx, WORD PTR[eax+edi-1]
-	mov	[esp+scanend], ebx
-	mov	edi, [edx].ds_prev
-
-;/* Jump into the main loop.                                            */
-
-	mov	edx, [esp+chainlenwmask]
-	jmp	SHORT LoopEntry
-
-;/* do {
-; *     match = s->window + cur_match;
-; *     if (*(ushf*)(match+best_len-1) != scan_end ||
-; *         *(ushf*)match != scan_start) continue;
-; *     [...]
-; * } while ((cur_match = prev[cur_match & wmask]) > limit
-; *          && --chain_length != 0);
-; *
-; * Here is the inner loop of the function. The function will spend the
-; * majority of its time in this loop, and majority of that time will
-; * be spent in the first ten instructions.
-; *
-; * Within this loop:
-; * %ebx = scanend
-; * %ecx = curmatch
-; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-; * %esi = windowbestlen - i.e., (window + bestlen)
-; * %edi = prev
-; * %ebp = limit
-; */
-
-	ALIGN	4
-LookupLoop:
-	and	ecx, edx
-	movzx	ecx, WORD PTR[edi+ecx*2]
-	cmp	ecx, ebp
-	jbe	LeaveNow
-	sub	edx, 000010000H
-	js	LeaveNow
-
-LoopEntry:
-	movzx	eax, WORD PTR[esi+ecx-1]
-	cmp	eax, ebx
-	jnz	SHORT LookupLoop
-
-	mov	eax, [esp+window]
-	movzx	eax, WORD PTR[eax+ecx]
-	cmp	eax, [esp+scanstart]
-	jnz	SHORT LookupLoop
-
-;/* Store the current value of chainlen.                                */
-
-	mov	[esp+chainlenwmask], edx
-
-;/* Point %edi to the string under scrutiny, and %esi to the string we  */
-;/* are hoping to match it up with. In actuality, %esi and %edi are     */
-;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */
-;/* initialized to -(MAX_MATCH_8 - scanalign).                          */
-
-	mov	esi, [esp+window]
-	mov	edi, [esp+scan]
-	add	esi, ecx
-	mov	eax, [esp+scanalign]
-	mov	edx, -MAX_MATCH_8
-	lea	edi, [edi+eax+MAX_MATCH_8]
-	lea	esi, [esi+eax+MAX_MATCH_8]
-
-;/* Test the strings for equality, 8 bytes at a time. At the end,
-; * adjust %edx so that it is offset to the exact byte that mismatched.
-; *
-; * We already know at this point that the first three bytes of the
-; * strings match each other, and they can be safely passed over before
-; * starting the compare loop. So what this code does is skip over 0-3
-; * bytes, as much as necessary in order to dword-align the %edi
-; * pointer. (%esi will still be misaligned three times out of four.)
-; *
-; * It should be confessed that this loop usually does not represent
-; * much of the total running time. Replacing it with a more
-; * straightforward "rep cmpsb" would not drastically degrade
-; * performance.
-; */
-
-LoopCmps:
-	mov	eax, DWORD PTR[esi+edx]
-	xor	eax, DWORD PTR[edi+edx]
-	jnz	SHORT LeaveLoopCmps
-
-	mov	eax, DWORD PTR[esi+edx+4]
-	xor	eax, DWORD PTR[edi+edx+4]
-	jnz	SHORT LeaveLoopCmps4
-
-	add	edx, 8
-	jnz	SHORT LoopCmps
-	jmp	LenMaximum
-	ALIGN	4
-
-LeaveLoopCmps4:
-	add	edx, 4
-
-LeaveLoopCmps:
-	test	eax, 00000FFFFH
-	jnz	SHORT LenLower
-
-	add	edx, 2
-	shr	eax, 16
-
-LenLower:
-	sub	al, 1
-	adc	edx, 0
-
-;/* Calculate the length of the match. If it is longer than MAX_MATCH,  */
-;/* then automatically accept it as the best possible match and leave.  */
-
-	lea	eax, [edi+edx]
-	mov	edi, [esp+scan]
-	sub	eax, edi
-	cmp	eax, MAX_MATCH
-	jge	SHORT LenMaximum
-
-;/* If the length of the match is not longer than the best match we     */
-;/* have so far, then forget it and return to the lookup loop.          */
-
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	cmp	eax, ebx
-	jg	SHORT LongerMatch
-	mov	esi, [esp+windowbestlen]
-	mov	edi, [edx].ds_prev
-	mov	ebx, [esp+scanend]
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/*         s->match_start = cur_match;                                 */
-;/*         best_len = len;                                             */
-;/*         if (len >= nice_match) break;                               */
-;/*         scan_end = *(ushf*)(scan+best_len-1);                       */
-
-LongerMatch:
-	mov	ebx, [esp+nicematch]
-	mov	[esp+bestlen], eax
-	mov	[edx].ds_match_start, ecx
-	cmp	eax, ebx
-	jge	SHORT LeaveNow
-	mov	esi, [esp+window]
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-	movzx	ebx, WORD PTR[edi+eax-1]
-	mov	edi, [edx].ds_prev
-	mov	[esp+scanend], ebx
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/* Accept the current string, with the maximum possible length.        */
-
-LenMaximum:
-	mov	edx, [esp+deflatestate]
-	mov	DWORD PTR[esp+bestlen], MAX_MATCH
-	mov	[edx].ds_match_start, ecx
-
-;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */
-;/* return s->lookahead;                                                */
-
-LeaveNow:
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	mov	eax, [edx].ds_lookahead
-	cmp	ebx, eax
-	jg	SHORT LookaheadRet
-	mov	eax, ebx
-LookaheadRet:
-
-; Restore the stack and return from whence we came.
-
-	add	esp, varsize
-	pop	ebx
-	pop	esi
-	pop	edi
-	pop	ebp
-	ret
-
-_longest_match	ENDP
-
-_TEXT	ENDS
-END
diff --git a/tkimg1.3/libz/contrib/masmx86/gvmat32.asm b/tkimg1.3/libz/contrib/masmx86/gvmat32.asm
deleted file mode 100644
index ec360e6..0000000
--- a/tkimg1.3/libz/contrib/masmx86/gvmat32.asm
+++ /dev/null
@@ -1,905 +0,0 @@
-;
-; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
-; File written by Gilles Vollant, by modifiying the longest_match
-;  from Jean-loup Gailly in deflate.c
-; It need wmask == 0x7fff
-;     (assembly code is faster with a fixed wmask)
-;
-; For Visual C++ 4.2 and ML 6.11c (version in directory \MASM611C of Win95 DDK)
-;   I compile with : "ml /coff /Zi /c gvmat32.asm"
-;
-
-;uInt longest_match_7fff(s, cur_match)
-;    deflate_state *s;
-;    IPos cur_match;                             /* current match */
-
-	NbStack         equ     76
-	cur_match       equ     dword ptr[esp+NbStack-0]
-	str_s           equ     dword ptr[esp+NbStack-4]
-; 5 dword on top (ret,ebp,esi,edi,ebx)
-	adrret          equ     dword ptr[esp+NbStack-8]
-	pushebp         equ     dword ptr[esp+NbStack-12]
-	pushedi         equ     dword ptr[esp+NbStack-16]
-	pushesi         equ     dword ptr[esp+NbStack-20]
-	pushebx         equ     dword ptr[esp+NbStack-24]
-
-	chain_length    equ     dword ptr [esp+NbStack-28]
-	limit           equ     dword ptr [esp+NbStack-32]
-	best_len        equ     dword ptr [esp+NbStack-36]
-	window          equ     dword ptr [esp+NbStack-40]
-	prev            equ     dword ptr [esp+NbStack-44]
-	scan_start      equ      word ptr [esp+NbStack-48]
-	wmask           equ     dword ptr [esp+NbStack-52]
-	match_start_ptr equ     dword ptr [esp+NbStack-56]
-	nice_match      equ     dword ptr [esp+NbStack-60]
-	scan            equ     dword ptr [esp+NbStack-64]
-
-	windowlen       equ     dword ptr [esp+NbStack-68]
-	match_start     equ     dword ptr [esp+NbStack-72]
-	strend          equ     dword ptr [esp+NbStack-76]
-	NbStackAdd      equ     (NbStack-24)
-
-    .386p
-
-    name    gvmatch
-    .MODEL  FLAT
-
-
-
-;  all the +4 offsets are due to the addition of pending_buf_size (in zlib
-;  in the deflate_state structure since the asm code was first written
-;  (if you compile with zlib 1.0.4 or older, remove the +4).
-;  Note : these value are good with a 8 bytes boundary pack structure
-    dep_chain_length    equ     70h+4
-    dep_window          equ     2ch+4
-    dep_strstart        equ     60h+4
-    dep_prev_length     equ     6ch+4
-    dep_nice_match      equ     84h+4
-    dep_w_size          equ     20h+4
-    dep_prev            equ     34h+4
-    dep_w_mask          equ     28h+4
-    dep_good_match      equ     80h+4
-    dep_match_start     equ     64h+4
-    dep_lookahead       equ     68h+4
-
-
-_TEXT                   segment
-
-IFDEF NOUNDERLINE
-			public  longest_match_7fff
-			public  longest_match_686
-;                        public  match_init
-ELSE
-			public  _longest_match_7fff
-			public  _longest_match_686
-;                        public  _match_init
-ENDIF
-
-    MAX_MATCH           equ     258
-    MIN_MATCH           equ     3
-    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
-
-
-
-IFDEF NOUNDERLINE
-;match_init      proc near
-;                ret
-;match_init      endp
-ELSE
-;_match_init     proc near
-;                ret
-;_match_init     endp
-ENDIF
-
-
-IFDEF NOUNDERLINE
-longest_match_7fff   proc near
-ELSE
-_longest_match_7fff  proc near
-ENDIF
-
-	mov     edx,[esp+4]
-
-
-
-	push    ebp
-	push    edi
-	push    esi
-	push    ebx
-
-	sub     esp,NbStackAdd
-
-; initialize or check the variables used in match.asm.
-	mov     ebp,edx
-
-; chain_length = s->max_chain_length
-; if (prev_length>=good_match) chain_length >>= 2
-	mov     edx,[ebp+dep_chain_length]
-	mov     ebx,[ebp+dep_prev_length]
-	cmp     [ebp+dep_good_match],ebx
-	ja      noshr
-	shr     edx,2
-noshr:
-; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop
-	inc     edx
-	mov     edi,[ebp+dep_nice_match]
-	mov     chain_length,edx
-	mov     eax,[ebp+dep_lookahead]
-	cmp     eax,edi
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-	jae     nolookaheadnicematch
-	mov     edi,eax
-nolookaheadnicematch:
-; best_len = s->prev_length
-	mov     best_len,ebx
-
-; window = s->window
-	mov     esi,[ebp+dep_window]
-	mov     ecx,[ebp+dep_strstart]
-	mov     window,esi
-
-	mov     nice_match,edi
-; scan = window + strstart
-	add     esi,ecx
-	mov     scan,esi
-; dx = *window
-	mov     dx,word ptr [esi]
-; bx = *(window+best_len-1)
-	mov     bx,word ptr [esi+ebx-1]
-	add     esi,MAX_MATCH-1
-; scan_start = *scan
-	mov     scan_start,dx
-; strend = scan + MAX_MATCH-1
-	mov     strend,esi
-; bx = scan_end = *(window+best_len-1)
-
-;    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;        s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-	mov     esi,[ebp+dep_w_size]
-	sub     esi,MIN_LOOKAHEAD
-; here esi = MAX_DIST(s)
-	sub     ecx,esi
-	ja      nodist
-	xor     ecx,ecx
-nodist:
-	mov     limit,ecx
-
-; prev = s->prev
-	mov     edx,[ebp+dep_prev]
-	mov     prev,edx
-
-;
-	mov     edx,dword ptr [ebp+dep_match_start]
-	mov     bp,scan_start
-	mov     eax,cur_match
-	mov     match_start,edx
-
-	mov     edx,window
-	mov     edi,edx
-	add     edi,best_len
-	mov     esi,prev
-	dec     edi
-; windowlen = window + best_len -1
-	mov     windowlen,edi
-
-	jmp     beginloop2
-	align   4
-
-; here, in the loop
-;       eax = ax = cur_match
-;       ecx = limit
-;        bx = scan_end
-;        bp = scan_start
-;       edi = windowlen (window + best_len -1)
-;       esi = prev
-
-
-;// here; chain_length <=16
-normalbeg0add16:
-	add     chain_length,16
-	jz      exitloop
-normalbeg0:
-	cmp     word ptr[edi+eax],bx
-	je      normalbeg2noroll
-rcontlabnoroll:
-; cur_match = prev[cur_match & wmask]
-	and     eax,7fffh
-	mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-	cmp     ecx,eax
-	jnb     exitloop
-; if --chain_length != 0, go to exitloop
-	dec     chain_length
-	jnz     normalbeg0
-	jmp     exitloop
-
-normalbeg2noroll:
-; if (scan_start==*(cur_match+window)) goto normalbeg2
-	cmp     bp,word ptr[edx+eax]
-	jne     rcontlabnoroll
-	jmp     normalbeg2
-
-contloop3:
-	mov     edi,windowlen
-
-; cur_match = prev[cur_match & wmask]
-	and     eax,7fffh
-	mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-	cmp     ecx,eax
-jnbexitloopshort1:
-	jnb     exitloop
-; if --chain_length != 0, go to exitloop
-
-
-; begin the main loop
-beginloop2:
-	sub     chain_length,16+1
-; if chain_length <=16, don't use the unrolled loop
-	jna     normalbeg0add16
-
-do16:
-	cmp     word ptr[edi+eax],bx
-	je      normalbeg2dc0
-
-maccn   MACRO   lab
-	and     eax,7fffh
-	mov     ax,word ptr[esi+eax*2]
-	cmp     ecx,eax
-	jnb     exitloop
-	cmp     word ptr[edi+eax],bx
-	je      lab
-	ENDM
-
-rcontloop0:
-	maccn   normalbeg2dc1
-
-rcontloop1:
-	maccn   normalbeg2dc2
-
-rcontloop2:
-	maccn   normalbeg2dc3
-
-rcontloop3:
-	maccn   normalbeg2dc4
-
-rcontloop4:
-	maccn   normalbeg2dc5
-
-rcontloop5:
-	maccn   normalbeg2dc6
-
-rcontloop6:
-	maccn   normalbeg2dc7
-
-rcontloop7:
-	maccn   normalbeg2dc8
-
-rcontloop8:
-	maccn   normalbeg2dc9
-
-rcontloop9:
-	maccn   normalbeg2dc10
-
-rcontloop10:
-	maccn   short normalbeg2dc11
-
-rcontloop11:
-	maccn   short normalbeg2dc12
-
-rcontloop12:
-	maccn   short normalbeg2dc13
-
-rcontloop13:
-	maccn   short normalbeg2dc14
-
-rcontloop14:
-	maccn   short normalbeg2dc15
-
-rcontloop15:
-	and     eax,7fffh
-	mov     ax,word ptr[esi+eax*2]
-	cmp     ecx,eax
-	jnb     exitloop
-
-	sub     chain_length,16
-	ja      do16
-	jmp     normalbeg0add16
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-normbeg MACRO   rcontlab,valsub
-; if we are here, we know that *(match+best_len-1) == scan_end
-	cmp     bp,word ptr[edx+eax]
-; if (match != scan_start) goto rcontlab
-	jne     rcontlab
-; calculate the good chain_length, and we'll compare scan and match string
-	add     chain_length,16-valsub
-	jmp     iseq
-	ENDM
-
-
-normalbeg2dc11:
-	normbeg rcontloop11,11
-
-normalbeg2dc12:
-	normbeg short rcontloop12,12
-
-normalbeg2dc13:
-	normbeg short rcontloop13,13
-
-normalbeg2dc14:
-	normbeg short rcontloop14,14
-
-normalbeg2dc15:
-	normbeg short rcontloop15,15
-
-normalbeg2dc10:
-	normbeg rcontloop10,10
-
-normalbeg2dc9:
-	normbeg rcontloop9,9
-
-normalbeg2dc8:
-	normbeg rcontloop8,8
-
-normalbeg2dc7:
-	normbeg rcontloop7,7
-
-normalbeg2dc6:
-	normbeg rcontloop6,6
-
-normalbeg2dc5:
-	normbeg rcontloop5,5
-
-normalbeg2dc4:
-	normbeg rcontloop4,4
-
-normalbeg2dc3:
-	normbeg rcontloop3,3
-
-normalbeg2dc2:
-	normbeg rcontloop2,2
-
-normalbeg2dc1:
-	normbeg rcontloop1,1
-
-normalbeg2dc0:
-	normbeg rcontloop0,0
-
-
-; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end
-
-normalbeg2:
-	mov     edi,window
-
-	cmp     bp,word ptr[edi+eax]
-	jne     contloop3                   ; if *(ushf*)match != scan_start, continue
-
-iseq:
-; if we are here, we know that *(match+best_len-1) == scan_end
-; and (match == scan_start)
-
-	mov     edi,edx
-	mov     esi,scan                    ; esi = scan
-	add     edi,eax                     ; edi = window + cur_match = match
-
-	mov     edx,[esi+3]                 ; compare manually dword at match+3
-	xor     edx,[edi+3]                 ; and scan +3
-
-	jz      begincompare                ; if equal, go to long compare
-
-; we will determine the unmatch byte and calculate len (in esi)
-	or      dl,dl
-	je      eq1rr
-	mov     esi,3
-	jmp     trfinval
-eq1rr:
-	or      dx,dx
-	je      eq1
-
-	mov     esi,4
-	jmp     trfinval
-eq1:
-	and     edx,0ffffffh
-	jz      eq11
-	mov     esi,5
-	jmp     trfinval
-eq11:
-	mov     esi,6
-	jmp     trfinval
-
-begincompare:
-	; here we now scan and match begin same
-	add     edi,6
-	add     esi,6
-	mov     ecx,(MAX_MATCH-(2+4))/4     ; scan for at most MAX_MATCH bytes
-	repe    cmpsd                       ; loop until mismatch
-
-	je      trfin                       ; go to trfin if not unmatch
-; we determine the unmatch byte
-	sub     esi,4
-	mov     edx,[edi-4]
-	xor     edx,[esi]
-
-	or      dl,dl
-	jnz     trfin
-	inc     esi
-
-	or      dx,dx
-	jnz     trfin
-	inc     esi
-
-	and     edx,0ffffffh
-	jnz     trfin
-	inc     esi
-
-trfin:
-	sub     esi,scan          ; esi = len
-trfinval:
-; here we have finised compare, and esi contain len of equal string
-	cmp     esi,best_len        ; if len > best_len, go newbestlen
-	ja      short newbestlen
-; now we restore edx, ecx and esi, for the big loop
-	mov     esi,prev
-	mov     ecx,limit
-	mov     edx,window
-	jmp     contloop3
-
-newbestlen:
-	mov     best_len,esi        ; len become best_len
-
-	mov     match_start,eax     ; save new position as match_start
-	cmp     esi,nice_match      ; if best_len >= nice_match, exit
-	jae     exitloop
-	mov     ecx,scan
-	mov     edx,window          ; restore edx=window
-	add     ecx,esi
-	add     esi,edx
-
-	dec     esi
-	mov     windowlen,esi       ; windowlen = window + best_len-1
-	mov     bx,[ecx-1]          ; bx = *(scan+best_len-1) = scan_end
-
-; now we restore ecx and esi, for the big loop :
-	mov     esi,prev
-	mov     ecx,limit
-	jmp     contloop3
-
-exitloop:
-; exit : s->match_start=match_start
-	mov     ebx,match_start
-	mov     ebp,str_s
-	mov     ecx,best_len
-	mov     dword ptr [ebp+dep_match_start],ebx
-	mov     eax,dword ptr [ebp+dep_lookahead]
-	cmp     ecx,eax
-	ja      minexlo
-	mov     eax,ecx
-minexlo:
-; return min(best_len,s->lookahead)
-
-; restore stack and register ebx,esi,edi,ebp
-	add     esp,NbStackAdd
-
-	pop     ebx
-	pop     esi
-	pop     edi
-	pop     ebp
-	ret
-InfoAuthor:
-; please don't remove this string !
-; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary!
-	db     0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah
-
-
-
-IFDEF NOUNDERLINE
-longest_match_7fff   endp
-ELSE
-_longest_match_7fff  endp
-ENDIF
-
-
-IFDEF NOUNDERLINE
-cpudetect32     proc near
-ELSE
-_cpudetect32    proc near
-ENDIF
-
-	push	ebx
-
-	pushfd                  ; push original EFLAGS
-	pop     eax             ; get original EFLAGS
-	mov     ecx, eax        ; save original EFLAGS
-	xor     eax, 40000h     ; flip AC bit in EFLAGS
-	push    eax             ; save new EFLAGS value on stack
-	popfd                   ; replace current EFLAGS value
-	pushfd                  ; get new EFLAGS
-	pop     eax             ; store new EFLAGS in EAX
-	xor     eax, ecx        ; can’t toggle AC bit, processor=80386
-	jz      end_cpu_is_386  ; jump if 80386 processor
-	push    ecx
-	popfd                   ; restore AC bit in EFLAGS first
-
-	pushfd
-	pushfd
-	pop     ecx
-
-	mov     eax, ecx        ; get original EFLAGS
-	xor     eax, 200000h    ; flip ID bit in EFLAGS
-	push    eax             ; save new EFLAGS value on stack
-	popfd                   ; replace current EFLAGS value
-	pushfd                  ; get new EFLAGS
-	pop		eax	            ; store new EFLAGS in EAX
-	popfd                   ; restore original EFLAGS
-	xor		eax, ecx        ; can’t toggle ID bit,
-	je		is_old_486		; processor=old
-
-	mov     eax,1
-	db      0fh,0a2h        ;CPUID
-
-exitcpudetect:
-	pop	ebx
-	ret
-
-end_cpu_is_386:
-	mov     eax,0300h
-	jmp     exitcpudetect
-
-is_old_486:
-	mov     eax,0400h
-	jmp     exitcpudetect
-
-IFDEF NOUNDERLINE
-cpudetect32     endp
-ELSE
-_cpudetect32    endp
-ENDIF
-
-
-
-
-MAX_MATCH       equ     258
-MIN_MATCH       equ     3
-MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)
-
-
-;;; stack frame offsets
-
-chainlenwmask	equ  esp + 0	; high word: current chain len
-					; low word: s->wmask
-window		equ  esp + 4	; local copy of s->window
-windowbestlen	equ  esp + 8	; s->window + bestlen
-scanstart	equ  esp + 16	; first two bytes of string
-scanend		equ  esp + 12	; last two bytes of string
-scanalign	equ  esp + 20	; dword-misalignment of string
-nicematch	equ  esp + 24	; a good enough match size
-bestlen		equ  esp + 28	; size of best match so far
-scan		equ  esp + 32	; ptr to string wanting match
-
-LocalVarsSize	equ 36
-;	saved ebx	byte esp + 36
-;	saved edi	byte esp + 40
-;	saved esi	byte esp + 44
-;	saved ebp	byte esp + 48
-;	return address	byte esp + 52
-deflatestate	equ  esp + 56	; the function arguments
-curmatch	equ  esp + 60
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-dsWSize		equ 36
-dsWMask		equ 44
-dsWindow	equ 48
-dsPrev		equ 56
-dsMatchLen	equ 88
-dsPrevMatch	equ 92
-dsStrStart	equ 100
-dsMatchStart	equ 104
-dsLookahead	equ 108
-dsPrevLen	equ 112
-dsMaxChainLen	equ 116
-dsGoodMatch	equ 132
-dsNiceMatch	equ 136
-
-
-;;; match.asm -- Pentium-Pro-optimized version of longest_match()
-;;; Written for zlib 1.1.2
-;;; Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
-;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
-;;;
-;;; This is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License.
-
-;GLOBAL	_longest_match, _match_init
-
-
-;SECTION	.text
-
-;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-
-;_longest_match:
-IFDEF NOUNDERLINE
-longest_match_686   proc near
-ELSE
-_longest_match_686  proc near
-ENDIF
-
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-		push	ebp
-		push	edi
-		push	esi
-		push	ebx
-		sub	esp, LocalVarsSize
-
-;;; Retrieve the function arguments. ecx will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-		mov	edx, [deflatestate]
-		mov	ecx, [curmatch]
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;;     chain_length >>= 2;
-;;; }
-
-		mov	eax, [edx + dsPrevLen]
-		mov	ebx, [edx + dsGoodMatch]
-		cmp	eax, ebx
-		mov	eax, [edx + dsWMask]
-		mov	ebx, [edx + dsMaxChainLen]
-		jl	LastMatchGood
-		shr	ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
-		dec	ebx
-		shl	ebx, 16
-		or	ebx, eax
-		mov	[chainlenwmask], ebx
-
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-		mov	eax, [edx + dsNiceMatch]
-		mov	ebx, [edx + dsLookahead]
-		cmp	ebx, eax
-		jl	LookaheadLess
-		mov	ebx, eax
-LookaheadLess:	mov	[nicematch], ebx
-
-;;; register Bytef *scan = s->window + s->strstart;
-
-		mov	esi, [edx + dsWindow]
-		mov	[window], esi
-		mov	ebp, [edx + dsStrStart]
-		lea	edi, [esi + ebp]
-		mov	[scan], edi
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
-		mov	eax, edi
-		neg	eax
-		and	eax, 3
-		mov	[scanalign], eax
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-		mov	eax, [edx + dsWSize]
-		sub	eax, MIN_LOOKAHEAD
-		sub	ebp, eax
-		jg	LimitPositive
-		xor	ebp, ebp
-LimitPositive:
-
-;;; int best_len = s->prev_length;
-
-		mov	eax, [edx + dsPrevLen]
-		mov	[bestlen], eax
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
-		add	esi, eax
-		mov	[windowbestlen], esi
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
-		movzx	ebx, word ptr [edi]
-		mov	[scanstart], ebx
-		movzx	ebx, word ptr [edi + eax - 1]
-		mov	[scanend], ebx
-		mov	edi, [edx + dsPrev]
-
-;;; Jump into the main loop.
-
-		mov	edx, [chainlenwmask]
-		jmp	short LoopEntry
-
-align 4
-
-;;; do {
-;;;     match = s->window + cur_match;
-;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
-;;;         *(ushf*)match != scan_start) continue;
-;;;     [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;;          && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; ecx = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
-		and	ecx, edx
-		movzx	ecx, word ptr [edi + ecx*2]
-		cmp	ecx, ebp
-		jbe	LeaveNow
-		sub	edx, 00010000h
-		js	LeaveNow
-LoopEntry:	movzx	eax, word ptr [esi + ecx - 1]
-		cmp	eax, ebx
-		jnz	LookupLoop
-		mov	eax, [window]
-		movzx	eax, word ptr [eax + ecx]
-		cmp	eax, [scanstart]
-		jnz	LookupLoop
-
-;;; Store the current value of chainlen.
-
-		mov	[chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
-		mov	esi, [window]
-		mov	edi, [scan]
-		add	esi, ecx
-		mov	eax, [scanalign]
-		mov	edx, 0fffffef8h; -(MAX_MATCH_8)
-		lea	edi, [edi + eax + 0108h] ;MAX_MATCH_8]
-		lea	esi, [esi + eax + 0108h] ;MAX_MATCH_8]
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust edx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (esi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-LoopCmps:
-		mov	eax, [esi + edx]
-		xor	eax, [edi + edx]
-		jnz	LeaveLoopCmps
-		mov	eax, [esi + edx + 4]
-		xor	eax, [edi + edx + 4]
-		jnz	LeaveLoopCmps4
-		add	edx, 8
-		jnz	LoopCmps
-		jmp	short LenMaximum
-LeaveLoopCmps4:	add	edx, 4
-LeaveLoopCmps:	test	eax, 0000FFFFh
-		jnz	LenLower
-		add	edx,  2
-		shr	eax, 16
-LenLower:	sub	al, 1
-		adc	edx, 0
-
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
-		lea	eax, [edi + edx]
-		mov	edi, [scan]
-		sub	eax, edi
-		cmp	eax, MAX_MATCH
-		jge	LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-
-		mov	edx, [deflatestate]
-		mov	ebx, [bestlen]
-		cmp	eax, ebx
-		jg	LongerMatch
-		mov	esi, [windowbestlen]
-		mov	edi, [edx + dsPrev]
-		mov	ebx, [scanend]
-		mov	edx, [chainlenwmask]
-		jmp	LookupLoop
-
-;;;         s->match_start = cur_match;
-;;;         best_len = len;
-;;;         if (len >= nice_match) break;
-;;;         scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:	mov	ebx, [nicematch]
-		mov	[bestlen], eax
-		mov	[edx + dsMatchStart], ecx
-		cmp	eax, ebx
-		jge	LeaveNow
-		mov	esi, [window]
-		add	esi, eax
-		mov	[windowbestlen], esi
-		movzx	ebx, word ptr [edi + eax - 1]
-		mov	edi, [edx + dsPrev]
-		mov	[scanend], ebx
-		mov	edx, [chainlenwmask]
-		jmp	LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum:	mov	edx, [deflatestate]
-		mov	dword ptr [bestlen], MAX_MATCH
-		mov	[edx + dsMatchStart], ecx
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-		mov	edx, [deflatestate]
-		mov	ebx, [bestlen]
-		mov	eax, [edx + dsLookahead]
-		cmp	ebx, eax
-		jg	LookaheadRet
-		mov	eax, ebx
-LookaheadRet:
-
-;;; Restore the stack and return from whence we came.
-
-		add	esp, LocalVarsSize
-		pop	ebx
-		pop	esi
-		pop	edi
-		pop	ebp
-
-		ret
-; please don't remove this string !
-; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!
-	db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
-
-IFDEF NOUNDERLINE
-longest_match_686   endp
-ELSE
-_longest_match_686  endp
-ENDIF
-
-_TEXT   ends
-end
diff --git a/tkimg1.3/libz/contrib/masmx86/gvmat32c.c b/tkimg1.3/libz/contrib/masmx86/gvmat32c.c
deleted file mode 100644
index 9ed25f3..0000000
--- a/tkimg1.3/libz/contrib/masmx86/gvmat32c.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86
- * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
- * File written by Gilles Vollant, by modifiying the longest_match
- *  from Jean-loup Gailly in deflate.c
- *  it prepare all parameters and call the assembly longest_match_gvasm
- *  longest_match execute standard C code is wmask != 0x7fff
- *     (assembly code is faster with a fixed wmask)
- *
- */
-
-#include "deflate.h"
-
-#ifdef ASMV
-#define NIL 0
-
-#define UNALIGNED_OK
-
-
-/* if your C compiler don't add underline before function name,
-        define ADD_UNDERLINE_ASMFUNC */
-#ifdef ADD_UNDERLINE_ASMFUNC
-#define longest_match_7fff _longest_match_7fff
-#define longest_match_686  _longest_match_686
-#define cpudetect32        _cpudetect32
-#endif
-
-
-
-void match_init()
-{
-}
-
-unsigned long cpudetect32();
-
-uInt longest_match_c(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-
-uInt longest_match_7fff(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-uInt longest_match_686(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-uInt longest_match(
-    deflate_state *s,
-    IPos cur_match)                             /* current match */
-{
-    static uInt iIsPPro=2;
-
-    if ((s->w_mask == 0x7fff) && (iIsPPro==0))
-        return longest_match_7fff(s,cur_match);
-
-    if (iIsPPro==1)
-        return longest_match_686(s,cur_match);
-
-    if (iIsPPro==2)
-        iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
-
-    return longest_match_c(s,cur_match);
-}
-
-
-
-uInt longest_match_c(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2:
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-
-#endif /* ASMV */
diff --git a/tkimg1.3/libz/contrib/masmx86/inffas32.asm b/tkimg1.3/libz/contrib/masmx86/inffas32.asm
deleted file mode 100644
index 7d76e1c..0000000
--- a/tkimg1.3/libz/contrib/masmx86/inffas32.asm
+++ /dev/null
@@ -1,1033 +0,0 @@
-; 75 "inffast.S"
-;FILE "inffast.S"
-
-;;;GLOBAL _inflate_fast
-
-;;;SECTION .text
-
-
-
-	.586p
-	.mmx
-
-	name	inflate_fast_x86
-	.MODEL	FLAT
-
-_DATA			segment
-inflate_fast_use_mmx:
-	dd	1
-
-
-_TEXT			segment
-PUBLIC _inflate_fast
-
-ALIGN 4
-_inflate_fast:
-	jmp inflate_fast_entry
-
-
-
-ALIGN 4
-	db	'Fast decoding Code from Chris Anderson'
-	db	0
-
-ALIGN 4
-invalid_literal_length_code_msg:
-	db	'invalid literal/length code'
-	db	0
-
-ALIGN 4
-invalid_distance_code_msg:
-	db	'invalid distance code'
-	db	0
-
-ALIGN 4
-invalid_distance_too_far_msg:
-	db	'invalid distance too far back'
-	db	0
-
-
-ALIGN 4
-inflate_fast_mask:
-dd	0
-dd	1
-dd	3
-dd	7
-dd	15
-dd	31
-dd	63
-dd	127
-dd	255
-dd	511
-dd	1023
-dd	2047
-dd	4095
-dd	8191
-dd	16383
-dd	32767
-dd	65535
-dd	131071
-dd	262143
-dd	524287
-dd	1048575
-dd	2097151
-dd	4194303
-dd	8388607
-dd	16777215
-dd	33554431
-dd	67108863
-dd	134217727
-dd	268435455
-dd	536870911
-dd	1073741823
-dd	2147483647
-dd	4294967295
-
-
-
-mode_state	 equ	0	;/* state->mode	*/
-wsize_state	 equ	32	;/* state->wsize */
-write_state	 equ	(36+4)	;/* state->write */
-window_state	 equ	(40+4)	;/* state->window */
-hold_state	 equ	(44+4)	;/* state->hold	*/
-bits_state	 equ	(48+4)	;/* state->bits	*/
-lencode_state	 equ	(64+4)	;/* state->lencode */
-distcode_state	 equ	(68+4)	;/* state->distcode */
-lenbits_state	 equ	(72+4)	;/* state->lenbits */
-distbits_state	 equ	(76+4)	;/* state->distbits */
-
-
-;;SECTION .text
-; 205 "inffast.S"
-;GLOBAL	inflate_fast_use_mmx
-
-;SECTION .data
-
-
-; GLOBAL inflate_fast_use_mmx:object
-;.size inflate_fast_use_mmx, 4
-; 226 "inffast.S"
-;SECTION .text
-
-ALIGN 4
-inflate_fast_entry:
-	push  edi
-	push  esi
-	push  ebp
-	push  ebx
-	pushfd
-	sub  esp,64
-	cld
-
-
-
-
-	mov  esi, [esp+88]
-	mov  edi, [esi+28]
-
-
-
-
-
-
-
-	mov  edx, [esi+4]
-	mov  eax, [esi+0]
-
-	add  edx,eax
-	sub  edx,11
-
-	mov  [esp+44],eax
-	mov  [esp+20],edx
-
-	mov  ebp, [esp+92]
-	mov  ecx, [esi+16]
-	mov  ebx, [esi+12]
-
-	sub  ebp,ecx
-	neg  ebp
-	add  ebp,ebx
-
-	sub  ecx,257
-	add  ecx,ebx
-
-	mov  [esp+60],ebx
-	mov  [esp+40],ebp
-	mov  [esp+16],ecx
-; 285 "inffast.S"
-	mov  eax, [edi+lencode_state]
-	mov  ecx, [edi+distcode_state]
-
-	mov  [esp+8],eax
-	mov  [esp+12],ecx
-
-	mov  eax,1
-	mov  ecx, [edi+lenbits_state]
-	shl  eax,cl
-	dec  eax
-	mov  [esp+0],eax
-
-	mov  eax,1
-	mov  ecx, [edi+distbits_state]
-	shl  eax,cl
-	dec  eax
-	mov  [esp+4],eax
-
-	mov  eax, [edi+wsize_state]
-	mov  ecx, [edi+write_state]
-	mov  edx, [edi+window_state]
-
-	mov  [esp+52],eax
-	mov  [esp+48],ecx
-	mov  [esp+56],edx
-
-	mov  ebp, [edi+hold_state]
-	mov  ebx, [edi+bits_state]
-; 321 "inffast.S"
-	mov  esi, [esp+44]
-	mov  ecx, [esp+20]
-	cmp  ecx,esi
-	ja   L_align_long
-
-	add  ecx,11
-	sub  ecx,esi
-	mov  eax,12
-	sub  eax,ecx
-	lea  edi, [esp+28]
-	rep movsb
-	mov  ecx,eax
-	xor  eax,eax
-	rep stosb
-	lea  esi, [esp+28]
-	mov  [esp+20],esi
-	jmp  L_is_aligned
-
-
-L_align_long:
-	test  esi,3
-	jz   L_is_aligned
-	xor  eax,eax
-	mov  al, [esi]
-	inc  esi
-	mov  ecx,ebx
-	add  ebx,8
-	shl  eax,cl
-	or  ebp,eax
-	jmp L_align_long
-
-L_is_aligned:
-	mov  edi, [esp+60]
-; 366 "inffast.S"
-L_check_mmx:
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	je   L_init_mmx
-	ja   L_do_loop
-
-	push  eax
-	push  ebx
-	push  ecx
-	push  edx
-	pushfd
-	mov  eax, [esp]
-	xor  dword ptr [esp],0200000h
-
-
-
-
-	popfd
-	pushfd
-	pop  edx
-	xor  edx,eax
-	jz   L_dont_use_mmx
-	xor  eax,eax
-	cpuid
-	cmp  ebx,0756e6547h
-	jne  L_dont_use_mmx
-	cmp  ecx,06c65746eh
-	jne  L_dont_use_mmx
-	cmp  edx,049656e69h
-	jne  L_dont_use_mmx
-	mov  eax,1
-	cpuid
-	shr  eax,8
-	and  eax,15
-	cmp  eax,6
-	jne  L_dont_use_mmx
-	test  edx,0800000h
-	jnz  L_use_mmx
-	jmp  L_dont_use_mmx
-L_use_mmx:
-	mov  dword ptr [inflate_fast_use_mmx],2
-	jmp  L_check_mmx_pop
-L_dont_use_mmx:
-	mov  dword ptr [inflate_fast_use_mmx],3
-L_check_mmx_pop:
-	pop  edx
-	pop  ecx
-	pop  ebx
-	pop  eax
-	jmp  L_check_mmx
-; 426 "inffast.S"
-ALIGN 4
-L_do_loop:
-; 437 "inffast.S"
-	cmp  bl,15
-	ja   L_get_length_code
-
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-
-L_get_length_code:
-	mov  edx, [esp+0]
-	mov  ecx, [esp+8]
-	and  edx,ebp
-	mov  eax, [ecx+edx*4]
-
-L_dolen:
-
-
-
-
-
-
-	mov  cl,ah
-	sub  bl,ah
-	shr  ebp,cl
-
-
-
-
-
-
-	test  al,al
-	jnz   L_test_for_length_base
-
-	shr  eax,16
-	stosb
-
-L_while_test:
-
-
-	cmp  [esp+16],edi
-	jbe  L_break_loop
-
-	cmp  [esp+20],esi
-	ja   L_do_loop
-	jmp  L_break_loop
-
-L_test_for_length_base:
-; 502 "inffast.S"
-	mov  edx,eax
-	shr  edx,16
-	mov  cl,al
-
-	test  al,16
-	jz   L_test_for_second_level_length
-	and  cl,15
-	jz   L_save_len
-	cmp  bl,cl
-	jae  L_add_bits_to_len
-
-	mov  ch,cl
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-	mov  cl,ch
-
-L_add_bits_to_len:
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	sub  bl,cl
-	and  eax,ebp
-	shr  ebp,cl
-	add  edx,eax
-
-L_save_len:
-	mov  [esp+24],edx
-
-
-L_decode_distance:
-; 549 "inffast.S"
-	cmp  bl,15
-	ja   L_get_distance_code
-
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-
-L_get_distance_code:
-	mov  edx, [esp+4]
-	mov  ecx, [esp+12]
-	and  edx,ebp
-	mov  eax, [ecx+edx*4]
-
-
-L_dodist:
-	mov  edx,eax
-	shr  edx,16
-	mov  cl,ah
-	sub  bl,ah
-	shr  ebp,cl
-; 584 "inffast.S"
-	mov  cl,al
-
-	test  al,16
-	jz  L_test_for_second_level_dist
-	and  cl,15
-	jz  L_check_dist_one
-	cmp  bl,cl
-	jae  L_add_bits_to_dist
-
-	mov  ch,cl
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-	mov  cl,ch
-
-L_add_bits_to_dist:
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	sub  bl,cl
-	and  eax,ebp
-	shr  ebp,cl
-	add  edx,eax
-	jmp  L_check_window
-
-L_check_window:
-; 625 "inffast.S"
-	mov  [esp+44],esi
-	mov  eax,edi
-	sub  eax, [esp+40]
-
-	cmp  eax,edx
-	jb   L_clip_window
-
-	mov  ecx, [esp+24]
-	mov  esi,edi
-	sub  esi,edx
-
-	sub  ecx,3
-	mov  al, [esi]
-	mov  [edi],al
-	mov  al, [esi+1]
-	mov  dl, [esi+2]
-	add  esi,3
-	mov  [edi+1],al
-	mov  [edi+2],dl
-	add  edi,3
-	rep movsb
-
-	mov  esi, [esp+44]
-	jmp  L_while_test
-
-ALIGN 4
-L_check_dist_one:
-	cmp  edx,1
-	jne  L_check_window
-	cmp  [esp+40],edi
-	je  L_check_window
-
-	dec  edi
-	mov  ecx, [esp+24]
-	mov  al, [edi]
-	sub  ecx,3
-
-	mov  [edi+1],al
-	mov  [edi+2],al
-	mov  [edi+3],al
-	add  edi,4
-	rep stosb
-
-	jmp  L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
-
-
-
-
-	test  al,64
-	jnz   L_test_for_end_of_block
-
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	and  eax,ebp
-	add  eax,edx
-	mov  edx, [esp+8]
-	mov  eax, [edx+eax*4]
-	jmp  L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
-
-
-
-
-	test  al,64
-	jnz   L_invalid_distance_code
-
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	and  eax,ebp
-	add  eax,edx
-	mov  edx, [esp+12]
-	mov  eax, [edx+eax*4]
-	jmp  L_dodist
-
-ALIGN 4
-L_clip_window:
-; 721 "inffast.S"
-	mov  ecx,eax
-	mov  eax, [esp+52]
-	neg  ecx
-	mov  esi, [esp+56]
-
-	cmp  eax,edx
-	jb   L_invalid_distance_too_far
-
-	add  ecx,edx
-	cmp  dword ptr [esp+48],0
-	jne  L_wrap_around_window
-
-	sub  eax,ecx
-	add  esi,eax
-; 749 "inffast.S"
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-L_wrap_around_window:
-; 793 "inffast.S"
-	mov  eax, [esp+48]
-	cmp  ecx,eax
-	jbe  L_contiguous_in_window
-
-	add  esi, [esp+52]
-	add  esi,eax
-	sub  esi,ecx
-	sub  ecx,eax
-
-
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi, [esp+56]
-	mov  ecx, [esp+48]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-L_contiguous_in_window:
-; 836 "inffast.S"
-	add  esi,eax
-	sub  esi,ecx
-
-
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-
-L_do_copy1:
-; 862 "inffast.S"
-	mov  ecx,eax
-	rep movsb
-
-	mov  esi, [esp+44]
-	jmp  L_while_test
-; 878 "inffast.S"
-ALIGN 4
-L_init_mmx:
-	emms
-
-
-
-
-
-	movd mm0,ebp
-	mov  ebp,ebx
-; 896 "inffast.S"
-	movd mm4,[esp+0]
-	movq mm3,mm4
-	movd mm5,[esp+4]
-	movq mm2,mm5
-	pxor mm1,mm1
-	mov  ebx, [esp+8]
-	jmp  L_do_loop_mmx
-
-ALIGN 4
-L_do_loop_mmx:
-	psrlq mm0,mm1
-
-	cmp  ebp,32
-	ja  L_get_length_code_mmx
-
-	movd mm6,ebp
-	movd mm7,[esi]
-	add  esi,4
-	psllq mm7,mm6
-	add  ebp,32
-	por mm0,mm7
-
-L_get_length_code_mmx:
-	pand mm4,mm0
-	movd eax,mm4
-	movq mm4,mm3
-	mov  eax, [ebx+eax*4]
-
-L_dolen_mmx:
-	movzx  ecx,ah
-	movd mm1,ecx
-	sub  ebp,ecx
-
-	test  al,al
-	jnz L_test_for_length_base_mmx
-
-	shr  eax,16
-	stosb
-
-L_while_test_mmx:
-
-
-	cmp  [esp+16],edi
-	jbe L_break_loop
-
-	cmp  [esp+20],esi
-	ja L_do_loop_mmx
-	jmp L_break_loop
-
-L_test_for_length_base_mmx:
-
-	mov  edx,eax
-	shr  edx,16
-
-	test  al,16
-	jz  L_test_for_second_level_length_mmx
-	and  eax,15
-	jz L_decode_distance_mmx
-
-	psrlq mm0,mm1
-	movd mm1,eax
-	movd ecx,mm0
-	sub  ebp,eax
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  edx,ecx
-
-L_decode_distance_mmx:
-	psrlq mm0,mm1
-
-	cmp  ebp,32
-	ja L_get_dist_code_mmx
-
-	movd mm6,ebp
-	movd mm7,[esi]
-	add  esi,4
-	psllq mm7,mm6
-	add  ebp,32
-	por mm0,mm7
-
-L_get_dist_code_mmx:
-	mov  ebx, [esp+12]
-	pand mm5,mm0
-	movd eax,mm5
-	movq mm5,mm2
-	mov  eax, [ebx+eax*4]
-
-L_dodist_mmx:
-
-	movzx  ecx,ah
-	mov  ebx,eax
-	shr  ebx,16
-	sub  ebp,ecx
-	movd mm1,ecx
-
-	test  al,16
-	jz L_test_for_second_level_dist_mmx
-	and  eax,15
-	jz L_check_dist_one_mmx
-
-L_add_bits_to_dist_mmx:
-	psrlq mm0,mm1
-	movd mm1,eax
-	movd ecx,mm0
-	sub  ebp,eax
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  ebx,ecx
-
-L_check_window_mmx:
-	mov  [esp+44],esi
-	mov  eax,edi
-	sub  eax, [esp+40]
-
-	cmp  eax,ebx
-	jb L_clip_window_mmx
-
-	mov  ecx,edx
-	mov  esi,edi
-	sub  esi,ebx
-
-	sub  ecx,3
-	mov  al, [esi]
-	mov  [edi],al
-	mov  al, [esi+1]
-	mov  dl, [esi+2]
-	add  esi,3
-	mov  [edi+1],al
-	mov  [edi+2],dl
-	add  edi,3
-	rep movsb
-
-	mov  esi, [esp+44]
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-
-ALIGN 4
-L_check_dist_one_mmx:
-	cmp  ebx,1
-	jne  L_check_window_mmx
-	cmp  [esp+40],edi
-	je   L_check_window_mmx
-
-	dec  edi
-	mov  ecx,edx
-	mov  al, [edi]
-	sub  ecx,3
-
-	mov  [edi+1],al
-	mov  [edi+2],al
-	mov  [edi+3],al
-	add  edi,4
-	rep stosb
-
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-
-ALIGN 4
-L_test_for_second_level_length_mmx:
-	test  al,64
-	jnz L_test_for_end_of_block
-
-	and  eax,15
-	psrlq mm0,mm1
-	movd ecx,mm0
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  ecx,edx
-	mov  eax, [ebx+ecx*4]
-	jmp L_dolen_mmx
-
-ALIGN 4
-L_test_for_second_level_dist_mmx:
-	test  al,64
-	jnz L_invalid_distance_code
-
-	and  eax,15
-	psrlq mm0,mm1
-	movd ecx,mm0
-	and  ecx, [inflate_fast_mask+eax*4]
-	mov  eax, [esp+12]
-	add  ecx,ebx
-	mov  eax, [eax+ecx*4]
-	jmp  L_dodist_mmx
-
-ALIGN 4
-L_clip_window_mmx:
-
-	mov  ecx,eax
-	mov  eax, [esp+52]
-	neg  ecx
-	mov  esi, [esp+56]
-
-	cmp  eax,ebx
-	jb  L_invalid_distance_too_far
-
-	add  ecx,ebx
-	cmp  dword ptr [esp+48],0
-	jne  L_wrap_around_window_mmx
-
-	sub  eax,ecx
-	add  esi,eax
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-L_wrap_around_window_mmx:
-
-	mov  eax, [esp+48]
-	cmp  ecx,eax
-	jbe  L_contiguous_in_window_mmx
-
-	add  esi, [esp+52]
-	add  esi,eax
-	sub  esi,ecx
-	sub  ecx,eax
-
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi, [esp+56]
-	mov  ecx, [esp+48]
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-L_contiguous_in_window_mmx:
-
-	add  esi,eax
-	sub  esi,ecx
-
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-
-L_do_copy1_mmx:
-
-
-	mov  ecx,edx
-	rep movsb
-
-	mov  esi, [esp+44]
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-; 1174 "inffast.S"
-L_invalid_distance_code:
-
-
-
-
-
-	mov  ecx, invalid_distance_code_msg
-	mov  edx,26
-	jmp  L_update_stream_state
-
-L_test_for_end_of_block:
-
-
-
-
-
-	test  al,32
-	jz  L_invalid_literal_length_code
-
-	mov  ecx,0
-	mov  edx,11
-	jmp  L_update_stream_state
-
-L_invalid_literal_length_code:
-
-
-
-
-
-	mov  ecx, invalid_literal_length_code_msg
-	mov  edx,26
-	jmp  L_update_stream_state
-
-L_invalid_distance_too_far:
-
-
-
-	mov  esi, [esp+44]
-	mov  ecx, invalid_distance_too_far_msg
-	mov  edx,26
-	jmp  L_update_stream_state
-
-L_update_stream_state:
-
-	mov  eax, [esp+88]
-	test  ecx,ecx
-	jz  L_skip_msg
-	mov  [eax+24],ecx
-L_skip_msg:
-	mov  eax, [eax+28]
-	mov  [eax+mode_state],edx
-	jmp  L_break_loop
-
-ALIGN 4
-L_break_loop:
-; 1243 "inffast.S"
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	jne  L_update_next_in
-
-
-
-	mov  ebx,ebp
-
-L_update_next_in:
-; 1266 "inffast.S"
-	mov  eax, [esp+88]
-	mov  ecx,ebx
-	mov  edx, [eax+28]
-	shr  ecx,3
-	sub  esi,ecx
-	shl  ecx,3
-	sub  ebx,ecx
-	mov  [eax+12],edi
-	mov  [edx+bits_state],ebx
-	mov  ecx,ebx
-
-	lea  ebx, [esp+28]
-	cmp  [esp+20],ebx
-	jne  L_buf_not_used
-
-	sub  esi,ebx
-	mov  ebx, [eax+0]
-	mov  [esp+20],ebx
-	add  esi,ebx
-	mov  ebx, [eax+4]
-	sub  ebx,11
-	add  [esp+20],ebx
-
-L_buf_not_used:
-	mov  [eax+0],esi
-
-	mov  ebx,1
-	shl  ebx,cl
-	dec  ebx
-
-
-
-
-
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	jne  L_update_hold
-
-
-
-	psrlq mm0,mm1
-	movd ebp,mm0
-
-	emms
-
-L_update_hold:
-
-
-
-	and  ebp,ebx
-	mov  [edx+hold_state],ebp
-
-
-
-
-	mov  ebx, [esp+20]
-	cmp  ebx,esi
-	jbe  L_last_is_smaller
-
-	sub  ebx,esi
-	add  ebx,11
-	mov  [eax+4],ebx
-	jmp  L_fixup_out
-L_last_is_smaller:
-	sub  esi,ebx
-	neg  esi
-	add  esi,11
-	mov  [eax+4],esi
-
-
-
-
-L_fixup_out:
-
-	mov  ebx, [esp+16]
-	cmp  ebx,edi
-	jbe  L_end_is_smaller
-
-	sub  ebx,edi
-	add  ebx,257
-	mov  [eax+16],ebx
-	jmp  L_done
-L_end_is_smaller:
-	sub  edi,ebx
-	neg  edi
-	add  edi,257
-	mov  [eax+16],edi
-
-
-
-
-
-L_done:
-	add  esp,64
-	popfd
-	pop  ebx
-	pop  ebp
-	pop  esi
-	pop  edi
-	ret
-
-
-
-
-_TEXT	ends
-end
diff --git a/tkimg1.3/libz/contrib/masmx86/mkasm.bat b/tkimg1.3/libz/contrib/masmx86/mkasm.bat
deleted file mode 100755
index f3fa0a0..0000000
--- a/tkimg1.3/libz/contrib/masmx86/mkasm.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-cl /I..\.. /O2 /c gvmat32c.c
-ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm
diff --git a/tkimg1.3/libz/contrib/masmx86/readme.txt b/tkimg1.3/libz/contrib/masmx86/readme.txt
deleted file mode 100644
index 7b57167..0000000
--- a/tkimg1.3/libz/contrib/masmx86/readme.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast().
-
-
-Use instructions
-----------------
-Copy these files into the zlib source directory, then run the
-appropriate makefile, as suggested below.
-
-
-Build instructions
-------------------
-* With Microsoft C and MASM:
-nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj"
-
-* With Borland C and TASM:
-make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj"
-
diff --git a/tkimg1.3/libz/contrib/minizip/ChangeLogUnzip b/tkimg1.3/libz/contrib/minizip/ChangeLogUnzip
deleted file mode 100644
index d7d4b6b..0000000
--- a/tkimg1.3/libz/contrib/minizip/ChangeLogUnzip
+++ /dev/null
@@ -1,55 +0,0 @@
-Change in 1.00: (10 sept 03)
-- rename to 1.00
-- cosmetic code change
-
-Change in 0.22: (19 May 03)
-- crypting support (unless you define NOCRYPT)
-- append file in existing zipfile
-
-Change in 0.21: (10 Mar 03)
-- bug fixes
-
-Change in 0.17: (27 Jan 02)
-- bug fixes
-
-Change in 0.16: (19 Jan 02)
-- Support of ioapi for virtualize zip file access
-
-Change in 0.15: (19 Mar 98)
-- fix memory leak in minizip.c
-
-Change in 0.14: (10 Mar 98)
-- fix bugs in minizip.c sample for zipping big file
-- fix problem in month in date handling
-- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for
-    comment handling
-
-Change in 0.13: (6 Mar 98)
-- fix bugs in zip.c
-- add real minizip sample
-
-Change in 0.12: (4 Mar 98)
-- add zip.c and zip.h for creates .zip file
-- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly)
-- fix miniunz.c for file without specific record for directory
-
-Change in 0.11: (3 Mar 98)
-- fix bug in unzGetCurrentFileInfo for get extra field and comment
-- enhance miniunz sample, remove the bad unztst.c sample
-
-Change in 0.10: (2 Mar 98)
-- fix bug in unzReadCurrentFile
-- rename unzip* to unz* function and structure
-- remove Windows-like hungary notation variable name
-- modify some structure in unzip.h
-- add somes comment in source
-- remove unzipGetcCurrentFile function
-- replace ZUNZEXPORT by ZEXPORT
-- add unzGetLocalExtrafield for get the local extrafield info
-- add a new sample, miniunz.c
-
-Change in 0.4: (25 Feb 98)
-- suppress the type unzipFileInZip.
-  Only on file in the zipfile can be open at the same time
-- fix somes typo in code
-- added tm_unz structure in unzip_file_info (date/time in readable format)
diff --git a/tkimg1.3/libz/contrib/minizip/Makefile b/tkimg1.3/libz/contrib/minizip/Makefile
deleted file mode 100644
index 84eaad2..0000000
--- a/tkimg1.3/libz/contrib/minizip/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-CC=cc
-CFLAGS=-O -I../..
-
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
-
-.c.o:
-	$(CC) -c $(CFLAGS) $*.c
-
-all: miniunz minizip
-
-miniunz:  $(UNZ_OBJS)
-	$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
-
-minizip:  $(ZIP_OBJS)
-	$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
-
-test:	miniunz minizip
-	./minizip test readme.txt
-	./miniunz -l test.zip
-	mv readme.txt readme.old
-	./miniunz test.zip
-
-clean:
-	/bin/rm -f *.o *~ minizip miniunz
diff --git a/tkimg1.3/libz/contrib/minizip/crypt.h b/tkimg1.3/libz/contrib/minizip/crypt.h
deleted file mode 100644
index 9c7a89c..0000000
--- a/tkimg1.3/libz/contrib/minizip/crypt.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-
-   This code is a modified version of crypting code in Infozip distribution
-
-   The encryption/decryption parts of this source code (as opposed to the
-   non-echoing password parts) were originally written in Europe.  The
-   whole source package can be freely distributed, including from the USA.
-   (Prior to January 2000, re-export from the US was a violation of US law.)
-
-   This encryption code is a direct transcription of the algorithm from
-   Roger Schlafly, described by Phil Katz in the file appnote.txt.  This
-   file (appnote.txt) is distributed with the PKZIP program (even in the
-   version without encryption capabilities).
-
-   If you don't need crypting in your application, just define symbols
-   NOCRYPT and NOUNCRYPT.
-
-   This code support the "Traditional PKWARE Encryption".
-
-   The new AES encryption added on Zip format by Winzip (see the page
-   http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
-   Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
-{
-    unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an
-                     * unpredictable manner on 16-bit systems; not a problem
-                     * with any known compiler so far, though */
-
-    temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
-    return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
-{
-    (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
-    (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
-    (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
-    {
-      register int keyshift = (int)((*(pkeys+1)) >> 24);
-      (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
-    }
-    return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
-{
-    *(pkeys+0) = 305419896L;
-    *(pkeys+1) = 591751049L;
-    *(pkeys+2) = 878082192L;
-    while (*passwd != '\0') {
-        update_keys(pkeys,pcrc_32_tab,(int)*passwd);
-        passwd++;
-    }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
-    (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
-    (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN  12
-   /* "last resort" source for second part of crypt seed pattern */
-#  ifndef ZCR_SEED2
-#    define ZCR_SEED2 3141592654UL     /* use PI as default pattern */
-#  endif
-
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
-    const char *passwd;         /* password string */
-    unsigned char *buf;         /* where to write header */
-    int bufSize;
-    unsigned long* pkeys;
-    const unsigned long* pcrc_32_tab;
-    unsigned long crcForCrypting;
-{
-    int n;                       /* index in random header */
-    int t;                       /* temporary */
-    int c;                       /* random byte */
-    unsigned char header[RAND_HEAD_LEN-2]; /* random header */
-    static unsigned calls = 0;   /* ensure different random header each time */
-
-    if (bufSize<RAND_HEAD_LEN)
-      return 0;
-
-    /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
-     * output of rand() to get less predictability, since rand() is
-     * often poorly implemented.
-     */
-    if (++calls == 1)
-    {
-        srand((unsigned)(time(NULL) ^ ZCR_SEED2));
-    }
-    init_keys(passwd, pkeys, pcrc_32_tab);
-    for (n = 0; n < RAND_HEAD_LEN-2; n++)
-    {
-        c = (rand() >> 7) & 0xff;
-        header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
-    }
-    /* Encrypt random header (last two bytes is high word of crc) */
-    init_keys(passwd, pkeys, pcrc_32_tab);
-    for (n = 0; n < RAND_HEAD_LEN-2; n++)
-    {
-        buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
-    }
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
-    return n;
-}
-
-#endif
diff --git a/tkimg1.3/libz/contrib/minizip/ioapi.c b/tkimg1.3/libz/contrib/minizip/ioapi.c
deleted file mode 100644
index 80443b7..0000000
--- a/tkimg1.3/libz/contrib/minizip/ioapi.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-
-
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR    1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END    2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET    0
-#endif
-
-voidpf ZCALLBACK fopen_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
-
-uLong ZCALLBACK fread_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
-
-uLong ZCALLBACK fwrite_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
-
-long ZCALLBACK ftell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-long ZCALLBACK fseek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
-
-int ZCALLBACK fclose_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-int ZCALLBACK ferror_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
-{
-    FILE* file = NULL;
-    const char* mode_fopen = NULL;
-    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
-        mode_fopen = "rb";
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
-        mode_fopen = "r+b";
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
-        mode_fopen = "wb";
-
-    if ((filename!=NULL) && (mode_fopen != NULL))
-        file = fopen(filename, mode_fopen);
-    return file;
-}
-
-
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
-{
-    uLong ret;
-    ret = fread(buf, 1, (size_t)size, (FILE *)stream);
-    return ret;
-}
-
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
-{
-    uLong ret;
-    ret = fwrite(buf, 1, (size_t)size, (FILE *)stream);
-    return ret;
-}
-
-long ZCALLBACK ftell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    long ret;
-    ret = ftell((FILE *)stream);
-    return ret;
-}
-
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
-{
-    int fseek_origin=0;
-    long ret;
-    switch (origin)
-    {
-    case ZLIB_FILEFUNC_SEEK_CUR :
-        fseek_origin = SEEK_CUR;
-        break;
-    case ZLIB_FILEFUNC_SEEK_END :
-        fseek_origin = SEEK_END;
-        break;
-    case ZLIB_FILEFUNC_SEEK_SET :
-        fseek_origin = SEEK_SET;
-        break;
-    default: return -1;
-    }
-    ret = 0;
-    fseek((FILE *)stream, offset, fseek_origin);
-    return ret;
-}
-
-int ZCALLBACK fclose_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret;
-    ret = fclose((FILE *)stream);
-    return ret;
-}
-
-int ZCALLBACK ferror_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret;
-    ret = ferror((FILE *)stream);
-    return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
-  zlib_filefunc_def* pzlib_filefunc_def;
-{
-    pzlib_filefunc_def->zopen_file = fopen_file_func;
-    pzlib_filefunc_def->zread_file = fread_file_func;
-    pzlib_filefunc_def->zwrite_file = fwrite_file_func;
-    pzlib_filefunc_def->ztell_file = ftell_file_func;
-    pzlib_filefunc_def->zseek_file = fseek_file_func;
-    pzlib_filefunc_def->zclose_file = fclose_file_func;
-    pzlib_filefunc_def->zerror_file = ferror_file_func;
-    pzlib_filefunc_def->opaque = NULL;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/ioapi.h b/tkimg1.3/libz/contrib/minizip/ioapi.h
deleted file mode 100644
index 6bc2a2c..0000000
--- a/tkimg1.3/libz/contrib/minizip/ioapi.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-*/
-
-#ifndef _ZLIBIOAPI_H
-#define _ZLIBIOAPI_H
-
-
-#define ZLIB_FILEFUNC_SEEK_CUR (1)
-#define ZLIB_FILEFUNC_SEEK_END (2)
-#define ZLIB_FILEFUNC_SEEK_SET (0)
-
-#define ZLIB_FILEFUNC_MODE_READ      (1)
-#define ZLIB_FILEFUNC_MODE_WRITE     (2)
-#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
-
-#define ZLIB_FILEFUNC_MODE_EXISTING (4)
-#define ZLIB_FILEFUNC_MODE_CREATE   (8)
-
-
-#ifndef ZCALLBACK
-
-#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
-#define ZCALLBACK CALLBACK
-#else
-#define ZCALLBACK
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong  (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong  (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long   (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long   (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int    (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int    (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef struct zlib_filefunc_def_s
-{
-    open_file_func      zopen_file;
-    read_file_func      zread_file;
-    write_file_func     zwrite_file;
-    tell_file_func      ztell_file;
-    seek_file_func      zseek_file;
-    close_file_func     zclose_file;
-    testerror_file_func zerror_file;
-    voidpf              opaque;
-} zlib_filefunc_def;
-
-
-
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
-#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
-#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
-#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
-#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/tkimg1.3/libz/contrib/minizip/iowin32.c b/tkimg1.3/libz/contrib/minizip/iowin32.c
deleted file mode 100644
index 02b27cb..0000000
--- a/tkimg1.3/libz/contrib/minizip/iowin32.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* iowin32.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
-
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-*/
-
-#include <stdlib.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-#include "iowin32.h"
-
-#ifndef INVALID_HANDLE_VALUE
-#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
-#endif
-
-#ifndef INVALID_SET_FILE_POINTER
-#define INVALID_SET_FILE_POINTER ((DWORD)-1)
-#endif
-
-voidpf ZCALLBACK win32_open_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
-
-uLong ZCALLBACK win32_read_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
-
-uLong ZCALLBACK win32_write_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
-
-long ZCALLBACK win32_tell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-long ZCALLBACK win32_seek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
-
-int ZCALLBACK win32_close_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-int ZCALLBACK win32_error_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-typedef struct
-{
-    HANDLE hf;
-    int error;
-} WIN32FILE_IOWIN;
-
-voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
-{
-    const char* mode_fopen = NULL;
-    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
-    HANDLE hFile = 0;
-    voidpf ret=NULL;
-
-    dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0;
-
-    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
-    {
-        dwDesiredAccess = GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
-        dwShareMode = FILE_SHARE_READ;
-    }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
-    {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
-    }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
-    {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = CREATE_ALWAYS;
-    }
-
-    if ((filename!=NULL) && (dwDesiredAccess != 0))
-        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL,
-                      dwCreationDisposition, dwFlagsAndAttributes, NULL);
-
-    if (hFile == INVALID_HANDLE_VALUE)
-        hFile = NULL;
-
-    if (hFile != NULL)
-    {
-        WIN32FILE_IOWIN w32fiow;
-        w32fiow.hf = hFile;
-        w32fiow.error = 0;
-        ret = malloc(sizeof(WIN32FILE_IOWIN));
-        if (ret==NULL)
-            CloseHandle(hFile);
-        else *((WIN32FILE_IOWIN*)ret) = w32fiow;
-    }
-    return ret;
-}
-
-
-uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
-{
-    uLong ret=0;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    if (hFile != NULL)
-        if (!ReadFile(hFile, buf, size, &ret, NULL))
-        {
-            DWORD dwErr = GetLastError();
-            if (dwErr == ERROR_HANDLE_EOF)
-                dwErr = 0;
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-        }
-
-    return ret;
-}
-
-
-uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
-{
-    uLong ret=0;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-
-    if (hFile !=NULL)
-        if (!WriteFile(hFile, buf, size, &ret, NULL))
-        {
-            DWORD dwErr = GetLastError();
-            if (dwErr == ERROR_HANDLE_EOF)
-                dwErr = 0;
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-        }
-
-    return ret;
-}
-
-long ZCALLBACK win32_tell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    long ret=-1;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    if (hFile != NULL)
-    {
-        DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
-        if (dwSet == INVALID_SET_FILE_POINTER)
-        {
-            DWORD dwErr = GetLastError();
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-            ret = -1;
-        }
-        else
-            ret=(long)dwSet;
-    }
-    return ret;
-}
-
-long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
-{
-    DWORD dwMoveMethod=0xFFFFFFFF;
-    HANDLE hFile = NULL;
-
-    long ret=-1;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    switch (origin)
-    {
-    case ZLIB_FILEFUNC_SEEK_CUR :
-        dwMoveMethod = FILE_CURRENT;
-        break;
-    case ZLIB_FILEFUNC_SEEK_END :
-        dwMoveMethod = FILE_END;
-        break;
-    case ZLIB_FILEFUNC_SEEK_SET :
-        dwMoveMethod = FILE_BEGIN;
-        break;
-    default: return -1;
-    }
-
-    if (hFile != NULL)
-    {
-        DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod);
-        if (dwSet == INVALID_SET_FILE_POINTER)
-        {
-            DWORD dwErr = GetLastError();
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-            ret = -1;
-        }
-        else
-            ret=0;
-    }
-    return ret;
-}
-
-int ZCALLBACK win32_close_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret=-1;
-
-    if (stream!=NULL)
-    {
-        HANDLE hFile;
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-        if (hFile != NULL)
-        {
-            CloseHandle(hFile);
-            ret=0;
-        }
-        free(stream);
-    }
-    return ret;
-}
-
-int ZCALLBACK win32_error_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret=-1;
-    if (stream!=NULL)
-    {
-        ret = ((WIN32FILE_IOWIN*)stream) -> error;
-    }
-    return ret;
-}
-
-void fill_win32_filefunc (pzlib_filefunc_def)
-  zlib_filefunc_def* pzlib_filefunc_def;
-{
-    pzlib_filefunc_def->zopen_file = win32_open_file_func;
-    pzlib_filefunc_def->zread_file = win32_read_file_func;
-    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
-    pzlib_filefunc_def->ztell_file = win32_tell_file_func;
-    pzlib_filefunc_def->zseek_file = win32_seek_file_func;
-    pzlib_filefunc_def->zclose_file = win32_close_file_func;
-    pzlib_filefunc_def->zerror_file = win32_error_file_func;
-    pzlib_filefunc_def->opaque=NULL;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/iowin32.h b/tkimg1.3/libz/contrib/minizip/iowin32.h
deleted file mode 100644
index c0ebd50..0000000
--- a/tkimg1.3/libz/contrib/minizip/iowin32.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* iowin32.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
-
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-*/
-
-#include <windows.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/tkimg1.3/libz/contrib/minizip/miniunz.c b/tkimg1.3/libz/contrib/minizip/miniunz.c
deleted file mode 100644
index c8cf81e..0000000
--- a/tkimg1.3/libz/contrib/minizip/miniunz.c
+++ /dev/null
@@ -1,556 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#ifdef unix
-# include <unistd.h>
-# include <utime.h>
-#else
-# include <direct.h>
-# include <io.h>
-#endif
-
-#include "unzip.h"
-
-#define CASESENSITIVITY (0)
-#define WRITEBUFFERSIZE (8192)
-#define MAXFILENAME (256)
-
-#ifdef WIN32
-#define USEWIN32IOAPI
-#include "iowin32.h"
-#endif
-/*
-  mini unzip, demo of unzip package
-
-  usage :
-  Usage : miniunz [-exvlo] file.zip [file_to_extract]
-
-  list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT
-    if it exists
-*/
-
-
-/* change_file_date : change the date/time of a file
-    filename : the filename of the file where date/time must be modified
-    dosdate : the new date at the MSDos format (4 bytes)
-    tmu_date : the SAME new date at the tm_unz format */
-void change_file_date(filename,dosdate,tmu_date)
-    const char *filename;
-    uLong dosdate;
-    tm_unz tmu_date;
-{
-#ifdef WIN32
-  HANDLE hFile;
-  FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
-
-  hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE,
-                      0,NULL,OPEN_EXISTING,0,NULL);
-  GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
-  DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
-  LocalFileTimeToFileTime(&ftLocal,&ftm);
-  SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
-  CloseHandle(hFile);
-#else
-#ifdef unix
-  struct utimbuf ut;
-  struct tm newdate;
-  newdate.tm_sec = tmu_date.tm_sec;
-  newdate.tm_min=tmu_date.tm_min;
-  newdate.tm_hour=tmu_date.tm_hour;
-  newdate.tm_mday=tmu_date.tm_mday;
-  newdate.tm_mon=tmu_date.tm_mon;
-  if (tmu_date.tm_year > 1900)
-      newdate.tm_year=tmu_date.tm_year - 1900;
-  else
-      newdate.tm_year=tmu_date.tm_year ;
-  newdate.tm_isdst=-1;
-
-  ut.actime=ut.modtime=mktime(&newdate);
-  utime(filename,&ut);
-#endif
-#endif
-}
-
-
-/* mymkdir and change_file_date are not 100 % portable
-   As I don't know well Unix, I wait feedback for the unix portion */
-
-int mymkdir(dirname)
-    const char* dirname;
-{
-    int ret=0;
-#ifdef WIN32
-    ret = mkdir(dirname);
-#else
-#ifdef unix
-    ret = mkdir (dirname,0775);
-#endif
-#endif
-    return ret;
-}
-
-int makedir (newdir)
-    char *newdir;
-{
-  char *buffer ;
-  char *p;
-  int  len = (int)strlen(newdir);
-
-  if (len <= 0)
-    return 0;
-
-  buffer = (char*)malloc(len+1);
-  strcpy(buffer,newdir);
-
-  if (buffer[len-1] == '/') {
-    buffer[len-1] = '\0';
-  }
-  if (mymkdir(buffer) == 0)
-    {
-      free(buffer);
-      return 1;
-    }
-
-  p = buffer+1;
-  while (1)
-    {
-      char hold;
-
-      while(*p && *p != '\\' && *p != '/')
-        p++;
-      hold = *p;
-      *p = 0;
-      if ((mymkdir(buffer) == -1) && (errno == ENOENT))
-        {
-          printf("couldn't create directory %s\n",buffer);
-          free(buffer);
-          return 0;
-        }
-      if (hold == 0)
-        break;
-      *p++ = hold;
-    }
-  free(buffer);
-  return 1;
-}
-
-void do_banner()
-{
-    printf("MiniUnz 1.00, demo of zLib + Unz package written by Gilles Vollant\n");
-    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
-}
-
-void do_help()
-{
-    printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.]\n\n" \
-           "  -e  Extract without pathname (junk paths)\n" \
-           "  -x  Extract with pathname\n" \
-           "  -v  list files\n" \
-           "  -l  list files\n" \
-           "  -o  overwrite files without prompting\n" \
-           "  -p  extract crypted file using password\n\n");
-}
-
-
-int do_list(uf)
-    unzFile uf;
-{
-    uLong i;
-    unz_global_info gi;
-    int err;
-
-    err = unzGetGlobalInfo (uf,&gi);
-    if (err!=UNZ_OK)
-        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
-    printf(" Length  Method   Size  Ratio   Date    Time   CRC-32     Name\n");
-    printf(" ------  ------   ----  -----   ----    ----   ------     ----\n");
-    for (i=0;i<gi.number_entry;i++)
-    {
-        char filename_inzip[256];
-        unz_file_info file_info;
-        uLong ratio=0;
-        const char *string_method;
-        char charCrypt=' ';
-        err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
-        if (err!=UNZ_OK)
-        {
-            printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
-            break;
-        }
-        if (file_info.uncompressed_size>0)
-            ratio = (file_info.compressed_size*100)/file_info.uncompressed_size;
-
-        /* display a '*' if the file is crypted */
-        if ((file_info.flag & 1) != 0)
-            charCrypt='*';
-
-        if (file_info.compression_method==0)
-            string_method="Stored";
-        else
-        if (file_info.compression_method==Z_DEFLATED)
-        {
-            uInt iLevel=(uInt)((file_info.flag & 0x6)/2);
-            if (iLevel==0)
-              string_method="Defl:N";
-            else if (iLevel==1)
-              string_method="Defl:X";
-            else if ((iLevel==2) || (iLevel==3))
-              string_method="Defl:F"; /* 2:fast , 3 : extra fast*/
-        }
-        else
-            string_method="Unkn. ";
-
-        printf("%7lu  %6s%c%7lu %3lu%%  %2.2lu-%2.2lu-%2.2lu  %2.2lu:%2.2lu  %8.8lx   %s\n",
-                file_info.uncompressed_size,string_method,
-                charCrypt,
-                file_info.compressed_size,
-                ratio,
-                (uLong)file_info.tmu_date.tm_mon + 1,
-                (uLong)file_info.tmu_date.tm_mday,
-                (uLong)file_info.tmu_date.tm_year % 100,
-                (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min,
-                (uLong)file_info.crc,filename_inzip);
-        if ((i+1)<gi.number_entry)
-        {
-            err = unzGoToNextFile(uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzGoToNextFile\n",err);
-                break;
-            }
-        }
-    }
-
-    return 0;
-}
-
-
-int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
-    unzFile uf;
-    const int* popt_extract_without_path;
-    int* popt_overwrite;
-    const char* password;
-{
-    char filename_inzip[256];
-    char* filename_withoutpath;
-    char* p;
-    int err=UNZ_OK;
-    FILE *fout=NULL;
-    void* buf;
-    uInt size_buf;
-
-    unz_file_info file_info;
-    uLong ratio=0;
-    err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
-
-    if (err!=UNZ_OK)
-    {
-        printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
-        return err;
-    }
-
-    size_buf = WRITEBUFFERSIZE;
-    buf = (void*)malloc(size_buf);
-    if (buf==NULL)
-    {
-        printf("Error allocating memory\n");
-        return UNZ_INTERNALERROR;
-    }
-
-    p = filename_withoutpath = filename_inzip;
-    while ((*p) != '\0')
-    {
-        if (((*p)=='/') || ((*p)=='\\'))
-            filename_withoutpath = p+1;
-        p++;
-    }
-
-    if ((*filename_withoutpath)=='\0')
-    {
-        if ((*popt_extract_without_path)==0)
-        {
-            printf("creating directory: %s\n",filename_inzip);
-            mymkdir(filename_inzip);
-        }
-    }
-    else
-    {
-        const char* write_filename;
-        int skip=0;
-
-        if ((*popt_extract_without_path)==0)
-            write_filename = filename_inzip;
-        else
-            write_filename = filename_withoutpath;
-
-        err = unzOpenCurrentFilePassword(uf,password);
-        if (err!=UNZ_OK)
-        {
-            printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err);
-        }
-
-        if (((*popt_overwrite)==0) && (err==UNZ_OK))
-        {
-            char rep=0;
-            FILE* ftestexist;
-            ftestexist = fopen(write_filename,"rb");
-            if (ftestexist!=NULL)
-            {
-                fclose(ftestexist);
-                do
-                {
-                    char answer[128];
-                    printf("The file %s exist. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
-                    scanf("%1s",answer);
-                    rep = answer[0] ;
-                    if ((rep>='a') && (rep<='z'))
-                        rep -= 0x20;
-                }
-                while ((rep!='Y') && (rep!='N') && (rep!='A'));
-            }
-
-            if (rep == 'N')
-                skip = 1;
-
-            if (rep == 'A')
-                *popt_overwrite=1;
-        }
-
-        if ((skip==0) && (err==UNZ_OK))
-        {
-            fout=fopen(write_filename,"wb");
-
-            /* some zipfile don't contain directory alone before file */
-            if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
-                                (filename_withoutpath!=(char*)filename_inzip))
-            {
-                char c=*(filename_withoutpath-1);
-                *(filename_withoutpath-1)='\0';
-                makedir(write_filename);
-                *(filename_withoutpath-1)=c;
-                fout=fopen(write_filename,"wb");
-            }
-
-            if (fout==NULL)
-            {
-                printf("error opening %s\n",write_filename);
-            }
-        }
-
-        if (fout!=NULL)
-        {
-            printf(" extracting: %s\n",write_filename);
-
-            do
-            {
-                err = unzReadCurrentFile(uf,buf,size_buf);
-                if (err<0)
-                {
-                    printf("error %d with zipfile in unzReadCurrentFile\n",err);
-                    break;
-                }
-                if (err>0)
-                    if (fwrite(buf,err,1,fout)!=1)
-                    {
-                        printf("error in writing extracted file\n");
-                        err=UNZ_ERRNO;
-                        break;
-                    }
-            }
-            while (err>0);
-            if (fout)
-                    fclose(fout);
-
-            if (err==0)
-                change_file_date(write_filename,file_info.dosDate,
-                                 file_info.tmu_date);
-        }
-
-        if (err==UNZ_OK)
-        {
-            err = unzCloseCurrentFile (uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzCloseCurrentFile\n",err);
-            }
-        }
-        else
-            unzCloseCurrentFile(uf); /* don't lose the error */
-    }
-
-    free(buf);
-    return err;
-}
-
-
-int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
-    unzFile uf;
-    int opt_extract_without_path;
-    int opt_overwrite;
-    const char* password;
-{
-    uLong i;
-    unz_global_info gi;
-    int err;
-    FILE* fout=NULL;
-
-    err = unzGetGlobalInfo (uf,&gi);
-    if (err!=UNZ_OK)
-        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
-
-    for (i=0;i<gi.number_entry;i++)
-    {
-        if (do_extract_currentfile(uf,&opt_extract_without_path,
-                                      &opt_overwrite,
-                                      password) != UNZ_OK)
-            break;
-
-        if ((i+1)<gi.number_entry)
-        {
-            err = unzGoToNextFile(uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzGoToNextFile\n",err);
-                break;
-            }
-        }
-    }
-
-    return 0;
-}
-
-int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
-    unzFile uf;
-    const char* filename;
-    int opt_extract_without_path;
-    int opt_overwrite;
-    const char* password;
-{
-    int err = UNZ_OK;
-    if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
-    {
-        printf("file %s not found in the zipfile\n",filename);
-        return 2;
-    }
-
-    if (do_extract_currentfile(uf,&opt_extract_without_path,
-                                      &opt_overwrite,
-                                      password) == UNZ_OK)
-        return 0;
-    else
-        return 1;
-}
-
-
-int main(argc,argv)
-    int argc;
-    char *argv[];
-{
-    const char *zipfilename=NULL;
-    const char *filename_to_extract=NULL;
-    const char *password=NULL;
-    char filename_try[MAXFILENAME+16] = "";
-    int i;
-    int opt_do_list=0;
-    int opt_do_extract=1;
-    int opt_do_extract_withoutpath=0;
-    int opt_overwrite=0;
-    unzFile uf=NULL;
-
-    do_banner();
-    if (argc==1)
-    {
-        do_help();
-        return 0;
-    }
-    else
-    {
-        for (i=1;i<argc;i++)
-        {
-            if ((*argv[i])=='-')
-            {
-                const char *p=argv[i]+1;
-
-                while ((*p)!='\0')
-                {
-                    char c=*(p++);;
-                    if ((c=='l') || (c=='L'))
-                        opt_do_list = 1;
-                    if ((c=='v') || (c=='V'))
-                        opt_do_list = 1;
-                    if ((c=='x') || (c=='X'))
-                        opt_do_extract = 1;
-                    if ((c=='e') || (c=='E'))
-                        opt_do_extract = opt_do_extract_withoutpath = 1;
-                    if ((c=='o') || (c=='O'))
-                        opt_overwrite=1;
-                    if (((c=='p') || (c=='P')) && (i+1<argc))
-                    {
-                        password=argv[i+1];
-                        i++;
-                    }
-                }
-            }
-            else
-            {
-                if (zipfilename == NULL)
-                    zipfilename = argv[i];
-                else if (filename_to_extract==NULL)
-                        filename_to_extract = argv[i] ;
-            }
-        }
-    }
-
-    if (zipfilename!=NULL)
-    {
-
-#        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
-#        endif
-
-        strncpy(filename_try, zipfilename,MAXFILENAME-1);
-        /* strncpy doesnt append the trailing NULL, of the string is too long. */
-        filename_try[ MAXFILENAME ] = '\0';
-
-#        ifdef USEWIN32IOAPI
-        fill_win32_filefunc(&ffunc);
-        uf = unzOpen2(zipfilename,&ffunc);
-#        else
-        uf = unzOpen(zipfilename);
-#        endif
-        if (uf==NULL)
-        {
-            strcat(filename_try,".zip");
-#            ifdef USEWIN32IOAPI
-            uf = unzOpen2(filename_try,&ffunc);
-#            else
-            uf = unzOpen(filename_try);
-#            endif
-        }
-    }
-
-    if (uf==NULL)
-    {
-        printf("Cannot open %s or %s.zip\n",zipfilename,zipfilename);
-        return 1;
-    }
-    printf("%s opened\n",filename_try);
-
-    if (opt_do_list==1)
-        return do_list(uf);
-    else if (opt_do_extract==1)
-    {
-        if (filename_to_extract == NULL)
-            return do_extract(uf,opt_do_extract_withoutpath,opt_overwrite,password);
-        else
-            return do_extract_onefile(uf,filename_to_extract,
-                                      opt_do_extract_withoutpath,opt_overwrite,password);
-    }
-    unzCloseCurrentFile(uf);
-
-    return 0;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/minizip.c b/tkimg1.3/libz/contrib/minizip/minizip.c
deleted file mode 100644
index 5746f5c..0000000
--- a/tkimg1.3/libz/contrib/minizip/minizip.c
+++ /dev/null
@@ -1,397 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#ifdef unix
-# include <unistd.h>
-# include <utime.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-#else
-# include <direct.h>
-# include <io.h>
-#endif
-
-#include "zip.h"
-
-#ifdef WIN32
-#define USEWIN32IOAPI
-#include "iowin32.h"
-#endif
-
-
-
-#define WRITEBUFFERSIZE (16384)
-#define MAXFILENAME (256)
-
-#ifdef WIN32
-uLong filetime(f, tmzip, dt)
-    char *f;                /* name of file to get info on */
-    tm_zip *tmzip;             /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-  int ret = 0;
-  {
-      FILETIME ftLocal;
-      HANDLE hFind;
-      WIN32_FIND_DATA  ff32;
-
-      hFind = FindFirstFile(f,&ff32);
-      if (hFind != INVALID_HANDLE_VALUE)
-      {
-        FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
-        FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
-        FindClose(hFind);
-        ret = 1;
-      }
-  }
-  return ret;
-}
-#else
-#ifdef unix
-uLong filetime(f, tmzip, dt)
-    char *f;                /* name of file to get info on */
-    tm_zip *tmzip;             /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-  int ret=0;
-  struct stat s;        /* results of stat() */
-  struct tm* filedate;
-  time_t tm_t=0;
-
-  if (strcmp(f,"-")!=0)
-  {
-    char name[MAXFILENAME+1];
-    int len = strlen(f);
-
-    strncpy(name, f,MAXFILENAME-1);
-    /* strncpy doesnt append the trailing NULL, of the string is too long. */
-    name[ MAXFILENAME ] = '\0';
-
-    if (name[len - 1] == '/')
-      name[len - 1] = '\0';
-    /* not all systems allow stat'ing a file with / appended */
-    if (stat(name,&s)==0)
-    {
-      tm_t = s.st_mtime;
-      ret = 1;
-    }
-  }
-  filedate = localtime(&tm_t);
-
-  tmzip->tm_sec  = filedate->tm_sec;
-  tmzip->tm_min  = filedate->tm_min;
-  tmzip->tm_hour = filedate->tm_hour;
-  tmzip->tm_mday = filedate->tm_mday;
-  tmzip->tm_mon  = filedate->tm_mon ;
-  tmzip->tm_year = filedate->tm_year;
-
-  return ret;
-}
-#else
-uLong filetime(f, tmzip, dt)
-    char *f;                /* name of file to get info on */
-    tm_zip *tmzip;             /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-    return 0;
-}
-#endif
-#endif
-
-
-
-
-int check_exist_file(filename)
-    const char* filename;
-{
-    FILE* ftestexist;
-    int ret = 1;
-    ftestexist = fopen(filename,"rb");
-    if (ftestexist==NULL)
-        ret = 0;
-    else
-        fclose(ftestexist);
-    return ret;
-}
-
-void do_banner()
-{
-    printf("MiniZip 1.00, demo of zLib + Zip package written by Gilles Vollant\n");
-    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
-}
-
-void do_help()
-{
-    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \
-           "  -o  Overwrite existing file.zip\n" \
-           "  -a  Append to existing file.zip\n" \
-           "  -0  Store only\n" \
-           "  -1  Compress faster\n" \
-           "  -9  Compress better\n\n");
-}
-
-/* calculate the CRC32 of a file,
-   because to encrypt a file, we need known the CRC32 of the file before */
-int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
-{
-   unsigned long calculate_crc=0;
-   int err=ZIP_OK;
-   FILE * fin = fopen(filenameinzip,"rb");
-   unsigned long size_read = 0;
-   unsigned long total_read = 0;
-   if (fin==NULL)
-   {
-       err = ZIP_ERRNO;
-   }
-
-    if (err == ZIP_OK)
-        do
-        {
-            err = ZIP_OK;
-            size_read = (int)fread(buf,1,size_buf,fin);
-            if (size_read < size_buf)
-                if (feof(fin)==0)
-            {
-                printf("error in reading %s\n",filenameinzip);
-                err = ZIP_ERRNO;
-            }
-
-            if (size_read>0)
-                calculate_crc = crc32(calculate_crc,buf,size_read);
-            total_read += size_read;
-
-        } while ((err == ZIP_OK) && (size_read>0));
-
-    if (fin)
-        fclose(fin);
-
-    *result_crc=calculate_crc;
-    printf("file %s crc %x\n",filenameinzip,calculate_crc);
-    return err;
-}
-
-int main(argc,argv)
-    int argc;
-    char *argv[];
-{
-    int i;
-    int opt_overwrite=0;
-    int opt_compress_level=Z_DEFAULT_COMPRESSION;
-    int zipfilenamearg = 0;
-    char filename_try[MAXFILENAME+16];
-    int zipok;
-    int err=0;
-    int size_buf=0;
-    void* buf=NULL;
-    const char* password=NULL;
-
-
-    do_banner();
-    if (argc==1)
-    {
-        do_help();
-        return 0;
-    }
-    else
-    {
-        for (i=1;i<argc;i++)
-        {
-            if ((*argv[i])=='-')
-            {
-                const char *p=argv[i]+1;
-
-                while ((*p)!='\0')
-                {
-                    char c=*(p++);;
-                    if ((c=='o') || (c=='O'))
-                        opt_overwrite = 1;
-                    if ((c=='a') || (c=='A'))
-                        opt_overwrite = 2;
-                    if ((c>='0') && (c<='9'))
-                        opt_compress_level = c-'0';
-
-                    if (((c=='p') || (c=='P')) && (i+1<argc))
-                    {
-                        password=argv[i+1];
-                        i++;
-                    }
-                }
-            }
-            else
-                if (zipfilenamearg == 0)
-                    zipfilenamearg = i ;
-        }
-    }
-
-    size_buf = WRITEBUFFERSIZE;
-    buf = (void*)malloc(size_buf);
-    if (buf==NULL)
-    {
-        printf("Error allocating memory\n");
-        return ZIP_INTERNALERROR;
-    }
-
-    if (zipfilenamearg==0)
-        zipok=0;
-    else
-    {
-        int i,len;
-        int dot_found=0;
-
-        zipok = 1 ;
-        strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
-        /* strncpy doesnt append the trailing NULL, of the string is too long. */
-        filename_try[ MAXFILENAME ] = '\0';
-
-        len=(int)strlen(filename_try);
-        for (i=0;i<len;i++)
-            if (filename_try[i]=='.')
-                dot_found=1;
-
-        if (dot_found==0)
-            strcat(filename_try,".zip");
-
-        if (opt_overwrite==2)
-        {
-            /* if the file don't exist, we not append file */
-            if (check_exist_file(filename_try)==0)
-                opt_overwrite=1;
-        }
-        else
-        if (opt_overwrite==0)
-            if (check_exist_file(filename_try)!=0)
-            {
-                char rep=0;
-                do
-                {
-                    char answer[128];
-                    printf("The file %s exist. Overwrite ? [y]es, [n]o, [a]ppend : ",filename_try);
-                    scanf("%1s",answer);
-                    rep = answer[0] ;
-                    if ((rep>='a') && (rep<='z'))
-                        rep -= 0x20;
-                }
-                while ((rep!='Y') && (rep!='N') && (rep!='A'));
-                if (rep=='N')
-                    zipok = 0;
-                if (rep=='A')
-                    opt_overwrite = 2;
-            }
-    }
-
-    if (zipok==1)
-    {
-        zipFile zf;
-        int errclose;
-#        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
-        fill_win32_filefunc(&ffunc);
-        zf = zipOpen2(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
-#        else
-        zf = zipOpen(filename_try,(opt_overwrite==2) ? 2 : 0);
-#        endif
-
-        if (zf == NULL)
-        {
-            printf("error opening %s\n",filename_try);
-            err= ZIP_ERRNO;
-        }
-        else
-            printf("creating %s\n",filename_try);
-
-        for (i=zipfilenamearg+1;(i<argc) && (err==ZIP_OK);i++)
-        {
-            if (((*(argv[i]))!='-') && ((*(argv[i]))!='/'))
-            {
-                FILE * fin;
-                int size_read;
-                const char* filenameinzip = argv[i];
-                zip_fileinfo zi;
-                unsigned long crcFile=0;
-
-                zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
-                zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
-                zi.dosDate = 0;
-                zi.internal_fa = 0;
-                zi.external_fa = 0;
-                filetime(filenameinzip,&zi.tmz_date,&zi.dosDate);
-
-/*
-                err = zipOpenNewFileInZip(zf,filenameinzip,&zi,
-                                 NULL,0,NULL,0,NULL / * comment * /,
-                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
-                                 opt_compress_level);
-*/
-                if ((password != NULL) && (err==ZIP_OK))
-                    err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
-
-                err = zipOpenNewFileInZip3(zf,filenameinzip,&zi,
-                                 NULL,0,NULL,0,NULL /* comment*/,
-                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
-                                 opt_compress_level,0,
-                                 /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */
-                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 password,crcFile);
-
-                if (err != ZIP_OK)
-                    printf("error in opening %s in zipfile\n",filenameinzip);
-                else
-                {
-                    fin = fopen(filenameinzip,"rb");
-                    if (fin==NULL)
-                    {
-                        err=ZIP_ERRNO;
-                        printf("error in opening %s for reading\n",filenameinzip);
-                    }
-                }
-
-                if (err == ZIP_OK)
-                    do
-                    {
-                        err = ZIP_OK;
-                        size_read = (int)fread(buf,1,size_buf,fin);
-                        if (size_read < size_buf)
-                            if (feof(fin)==0)
-                        {
-                            printf("error in reading %s\n",filenameinzip);
-                            err = ZIP_ERRNO;
-                        }
-
-                        if (size_read>0)
-                        {
-                            err = zipWriteInFileInZip (zf,buf,size_read);
-                            if (err<0)
-                            {
-                                printf("error in writing %s in the zipfile\n",
-                                                 filenameinzip);
-                            }
-
-                        }
-                    } while ((err == ZIP_OK) && (size_read>0));
-
-                if (fin)
-                    fclose(fin);
-
-                if (err<0)
-                    err=ZIP_ERRNO;
-                else
-                {
-                    err = zipCloseFileInZip(zf);
-                    if (err!=ZIP_OK)
-                        printf("error in closing %s in the zipfile\n",
-                                    filenameinzip);
-                }
-            }
-        }
-        errclose = zipClose(zf,NULL);
-        if (errclose != ZIP_OK)
-            printf("error in closing %s\n",filename_try);
-   }
-
-    free(buf);
-    return 0;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/unzip.c b/tkimg1.3/libz/contrib/minizip/unzip.c
deleted file mode 100644
index f08f624..0000000
--- a/tkimg1.3/libz/contrib/minizip/unzip.c
+++ /dev/null
@@ -1,1546 +0,0 @@
-/* unzip.c -- IO for uncompress .zip files using zlib
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-
-   Read unzip.h for more info
-*/
-
-/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-compatibility with older software. The following is from the original crypt.c. Code
-woven in by Terry Thorsen 1/2003.
-*/
-/*
-  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.
-
-  See the accompanying file LICENSE, version 2000-Apr-09 or later
-  (the contents of which are also included in zip.h) for terms of use.
-  If, for some reason, all these files are missing, the Info-ZIP license
-  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
-*/
-/*
-  crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]
-
-  The encryption/decryption parts of this source code (as opposed to the
-  non-echoing password parts) were originally written in Europe.  The
-  whole source package can be freely distributed, including from the USA.
-  (Prior to January 2000, re-export from the US was a violation of US law.)
- */
-
-/*
-  This encryption code is a direct transcription of the algorithm from
-  Roger Schlafly, described by Phil Katz in the file appnote.txt.  This
-  file (appnote.txt) is distributed with the PKZIP program (even in the
-  version without encryption capabilities).
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-
-#ifndef CASESENSITIVITYDEFAULT_NO
-#  if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
-#    define CASESENSITIVITYDEFAULT_NO
-#  endif
-#endif
-
-
-#ifndef UNZ_BUFSIZE
-#define UNZ_BUFSIZE (16384)
-#endif
-
-#ifndef UNZ_MAXFILENAMEINZIP
-#define UNZ_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-
-
-
-
-const char unz_copyright[] =
-   " unzip 1.00 Copyright 1998-2003 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-/* unz_file_info_interntal contain internal info about a file in zipfile*/
-typedef struct unz_file_info_internal_s
-{
-    uLong offset_curfile;/* relative offset of local header 4 bytes */
-} unz_file_info_internal;
-
-
-/* file_in_zip_read_info_s contain internal information about a file in zipfile,
-    when reading and decompress it */
-typedef struct
-{
-    char  *read_buffer;         /* internal buffer for compressed data */
-    z_stream stream;            /* zLib stream structure for inflate */
-
-    uLong pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/
-    uLong stream_initialised;   /* flag set if stream structure is initialised*/
-
-    uLong offset_local_extrafield;/* offset of the local extra field */
-    uInt  size_local_extrafield;/* size of the local extra field */
-    uLong pos_local_extrafield;   /* position in the local extra field in read*/
-
-    uLong crc32;                /* crc32 of all data uncompressed */
-    uLong crc32_wait;           /* crc32 we must obtain after decompress all */
-    uLong rest_read_compressed; /* number of byte to be decompressed */
-    uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    uLong compression_method;   /* compression method (0==store) */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-    int   raw;
-} file_in_zip_read_info_s;
-
-
-/* unz_s contain internal information about the zipfile
-*/
-typedef struct
-{
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    unz_global_info gi;       /* public global information */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-    uLong num_file;             /* number of the current file in the zipfile*/
-    uLong pos_in_central_dir;   /* pos of the current file in the central dir*/
-    uLong current_file_ok;      /* flag about the usability of the current file*/
-    uLong central_pos;          /* position of the beginning of the central dir*/
-
-    uLong size_central_dir;     /* size of the central directory  */
-    uLong offset_central_dir;   /* offset of start of central directory with
-                                   respect to the starting disk number */
-
-    unz_file_info cur_file_info; /* public info about the current file in zip*/
-    unz_file_info_internal cur_file_info_internal; /* private info about it*/
-    file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
-                                        file if we are decompressing it */
-    int encrypted;
-#    ifndef NOUNCRYPT
-    unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
-#    endif
-} unz_s;
-
-
-#ifndef NOUNCRYPT
-#include "crypt.h"
-#endif
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-
-
-local int unzlocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    int *pi));
-
-local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
-{
-    unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
-    if (err==1)
-    {
-        *pi = (int)c;
-        return UNZ_OK;
-    }
-    else
-    {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
-            return UNZ_ERRNO;
-        else
-            return UNZ_EOF;
-    }
-}
-
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int unzlocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==UNZ_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-local int unzlocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<16;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<24;
-
-    if (err==UNZ_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-
-/* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
-    const char* fileName1;
-    const char* fileName2;
-{
-    for (;;)
-    {
-        char c1=*(fileName1++);
-        char c2=*(fileName2++);
-        if ((c1>='a') && (c1<='z'))
-            c1 -= 0x20;
-        if ((c2>='a') && (c2<='z'))
-            c2 -= 0x20;
-        if (c1=='\0')
-            return ((c2=='\0') ? 0 : -1);
-        if (c2=='\0')
-            return 1;
-        if (c1<c2)
-            return -1;
-        if (c1>c2)
-            return 1;
-    }
-}
-
-
-#ifdef  CASESENSITIVITYDEFAULT_NO
-#define CASESENSITIVITYDEFAULTVALUE 2
-#else
-#define CASESENSITIVITYDEFAULTVALUE 1
-#endif
-
-#ifndef STRCMPCASENOSENTIVEFUNCTION
-#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
-#endif
-
-/*
-   Compare two filename (fileName1,fileName2).
-   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                                                or strcasecmp)
-   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-        (like 1 on Unix, 2 on Windows)
-
-*/
-extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
-    const char* fileName1;
-    const char* fileName2;
-    int iCaseSensitivity;
-{
-    if (iCaseSensitivity==0)
-        iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
-
-    if (iCaseSensitivity==1)
-        return strcmp(fileName1,fileName2);
-
-    return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-
-/*
-  Locate the Central directory of a zipfile (at the end, just before
-    the global comment)
-*/
-local uLong unzlocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
-
-local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-{
-    unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
-
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
-
-
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
-    if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
-
-    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
-    if (buf==NULL)
-        return 0;
-
-    uBackRead = 4;
-    while (uBackRead<uMaxBack)
-    {
-        uLong uReadSize,uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead+=BUFREADCOMMENT;
-        uReadPos = uSizeFile-uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            break;
-
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-            break;
-
-        for (i=(int)uReadSize-3; (i--)>0;)
-            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound!=0)
-            break;
-    }
-    TRYFREE(buf);
-    return uPosFound;
-}
-
-/*
-  Open a Zip file. path contain the full pathname (by example,
-     on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
-     "zlib/zlib114.zip".
-     If the zipfile cannot be opened (file doesn't exist or in not valid), the
-       return value is NULL.
-     Else, the return value is a unzFile Handle, usable with other function
-       of this unzip package.
-*/
-extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
-    const char *path;
-    zlib_filefunc_def* pzlib_filefunc_def;
-{
-    unz_s us;
-    unz_s *s;
-    uLong central_pos,uL;
-
-    uLong number_disk;          /* number of the current dist, used for
-                                   spaning ZIP, unsupported, always 0*/
-    uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                   for spaning ZIP, unsupported, always 0*/
-    uLong number_entry_CD;      /* total number of entries in
-                                   the central dir
-                                   (same than number_entry on nospan) */
-
-    int err=UNZ_OK;
-
-    if (unz_copyright[0]!=' ')
-        return NULL;
-
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&us.z_filefunc);
-    else
-        us.z_filefunc = *pzlib_filefunc_def;
-
-    us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
-                                                 path,
-                                                 ZLIB_FILEFUNC_MODE_READ |
-                                                 ZLIB_FILEFUNC_MODE_EXISTING);
-    if (us.filestream==NULL)
-        return NULL;
-
-    central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
-    if (central_pos==0)
-        err=UNZ_ERRNO;
-
-    if (ZSEEK(us.z_filefunc, us.filestream,
-                                      central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        err=UNZ_ERRNO;
-
-    /* the signature, already checked */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* number of this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* number of the disk with the start of the central directory */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* total number of entries in the central dir on this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* total number of entries in the central dir */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if ((number_entry_CD!=us.gi.number_entry) ||
-        (number_disk_with_CD!=0) ||
-        (number_disk!=0))
-        err=UNZ_BADZIPFILE;
-
-    /* size of the central directory */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* offset of start of central directory with respect to the
-          starting disk number */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* zipfile comment length */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
-        (err==UNZ_OK))
-        err=UNZ_BADZIPFILE;
-
-    if (err!=UNZ_OK)
-    {
-        ZCLOSE(us.z_filefunc, us.filestream);
-        return NULL;
-    }
-
-    us.byte_before_the_zipfile = central_pos -
-                            (us.offset_central_dir+us.size_central_dir);
-    us.central_pos = central_pos;
-    us.pfile_in_zip_read = NULL;
-    us.encrypted = 0;
-
-
-    s=(unz_s*)ALLOC(sizeof(unz_s));
-    *s=us;
-    unzGoToFirstFile((unzFile)s);
-    return (unzFile)s;
-}
-
-
-extern unzFile ZEXPORT unzOpen (path)
-    const char *path;
-{
-    return unzOpen2(path, NULL);
-}
-
-/*
-  Close a ZipFile opened with unzipOpen.
-  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
-    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
-  return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzClose (file)
-    unzFile file;
-{
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    if (s->pfile_in_zip_read!=NULL)
-        unzCloseCurrentFile(file);
-
-    ZCLOSE(s->z_filefunc, s->filestream);
-    TRYFREE(s);
-    return UNZ_OK;
-}
-
-
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
-    unzFile file;
-    unz_global_info *pglobal_info;
-{
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    *pglobal_info=s->gi;
-    return UNZ_OK;
-}
-
-
-/*
-   Translate date/time from Dos format to tm_unz (readable more easilty)
-*/
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
-    uLong ulDosDate;
-    tm_unz* ptm;
-{
-    uLong uDate;
-    uDate = (uLong)(ulDosDate>>16);
-    ptm->tm_mday = (uInt)(uDate&0x1f) ;
-    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
-    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
-
-    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
-    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;
-    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;
-}
-
-/*
-  Get Info about the current file in the zipfile, with internal only info
-*/
-local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
-                                                  unz_file_info *pfile_info,
-                                                  unz_file_info_internal
-                                                  *pfile_info_internal,
-                                                  char *szFileName,
-                                                  uLong fileNameBufferSize,
-                                                  void *extraField,
-                                                  uLong extraFieldBufferSize,
-                                                  char *szComment,
-                                                  uLong commentBufferSize));
-
-local int unzlocal_GetCurrentFileInfoInternal (file,
-                                              pfile_info,
-                                              pfile_info_internal,
-                                              szFileName, fileNameBufferSize,
-                                              extraField, extraFieldBufferSize,
-                                              szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    unz_file_info_internal *pfile_info_internal;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
-{
-    unz_s* s;
-    unz_file_info file_info;
-    unz_file_info_internal file_info_internal;
-    int err=UNZ_OK;
-    uLong uMagic;
-    long lSeek=0;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (ZSEEK(s->z_filefunc, s->filestream,
-              s->pos_in_central_dir+s->byte_before_the_zipfile,
-              ZLIB_FILEFUNC_SEEK_SET)!=0)
-        err=UNZ_ERRNO;
-
-
-    /* we check the magic */
-    if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
-            err=UNZ_ERRNO;
-        else if (uMagic!=0x02014b50)
-            err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    lSeek+=file_info.size_filename;
-    if ((err==UNZ_OK) && (szFileName!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_filename<fileNameBufferSize)
-        {
-            *(szFileName+file_info.size_filename)='\0';
-            uSizeRead = file_info.size_filename;
-        }
-        else
-            uSizeRead = fileNameBufferSize;
-
-        if ((file_info.size_filename>0) && (fileNameBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek -= uSizeRead;
-    }
-
-
-    if ((err==UNZ_OK) && (extraField!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_file_extra<extraFieldBufferSize)
-            uSizeRead = file_info.size_file_extra;
-        else
-            uSizeRead = extraFieldBufferSize;
-
-        if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
-                lSeek=0;
-            else
-                err=UNZ_ERRNO;
-        if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek += file_info.size_file_extra - uSizeRead;
-    }
-    else
-        lSeek+=file_info.size_file_extra;
-
-
-    if ((err==UNZ_OK) && (szComment!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_file_comment<commentBufferSize)
-        {
-            *(szComment+file_info.size_file_comment)='\0';
-            uSizeRead = file_info.size_file_comment;
-        }
-        else
-            uSizeRead = commentBufferSize;
-
-        if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
-                lSeek=0;
-            else
-                err=UNZ_ERRNO;
-        if ((file_info.size_file_comment>0) && (commentBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek+=file_info.size_file_comment - uSizeRead;
-    }
-    else
-        lSeek+=file_info.size_file_comment;
-
-    if ((err==UNZ_OK) && (pfile_info!=NULL))
-        *pfile_info=file_info;
-
-    if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
-        *pfile_info_internal=file_info_internal;
-
-    return err;
-}
-
-
-
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem.
-*/
-extern int ZEXPORT unzGetCurrentFileInfo (file,
-                                          pfile_info,
-                                          szFileName, fileNameBufferSize,
-                                          extraField, extraFieldBufferSize,
-                                          szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
-{
-    return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
-                                                szFileName,fileNameBufferSize,
-                                                extraField,extraFieldBufferSize,
-                                                szComment,commentBufferSize);
-}
-
-/*
-  Set the current file of the zipfile to the first file.
-  return UNZ_OK if there is no problem
-*/
-extern int ZEXPORT unzGoToFirstFile (file)
-    unzFile file;
-{
-    int err=UNZ_OK;
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    s->pos_in_central_dir=s->offset_central_dir;
-    s->num_file=0;
-    err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                             &s->cur_file_info_internal,
-                                             NULL,0,NULL,0,NULL,0);
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-/*
-  Set the current file of the zipfile to the next file.
-  return UNZ_OK if there is no problem
-  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-extern int ZEXPORT unzGoToNextFile (file)
-    unzFile file;
-{
-    unz_s* s;
-    int err;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-    if (s->num_file+1==s->gi.number_entry)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
-            s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
-    s->num_file++;
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                               &s->cur_file_info_internal,
-                                               NULL,0,NULL,0,NULL,0);
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-
-/*
-  Try locate the file szFileName in the zipfile.
-  For the iCaseSensitivity signification, see unzipStringFileNameCompare
-
-  return value :
-  UNZ_OK if the file is found. It becomes the current file.
-  UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
-    unzFile file;
-    const char *szFileName;
-    int iCaseSensitivity;
-{
-    unz_s* s;
-    int err;
-
-    /* We remember the 'current' position in the file so that we can jump
-     * back there if we fail.
-     */
-    unz_file_info cur_file_infoSaved;
-    unz_file_info_internal cur_file_info_internalSaved;
-    uLong num_fileSaved;
-    uLong pos_in_central_dirSaved;
-
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-
-    if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
-        return UNZ_PARAMERROR;
-
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    /* Save the current state */
-    num_fileSaved = s->num_file;
-    pos_in_central_dirSaved = s->pos_in_central_dir;
-    cur_file_infoSaved = s->cur_file_info;
-    cur_file_info_internalSaved = s->cur_file_info_internal;
-
-    err = unzGoToFirstFile(file);
-
-    while (err == UNZ_OK)
-    {
-        char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
-        err = unzGetCurrentFileInfo(file,NULL,
-                                    szCurrentFileName,sizeof(szCurrentFileName)-1,
-                                    NULL,0,NULL,0);
-        if (err == UNZ_OK)
-        {
-            if (unzStringFileNameCompare(szCurrentFileName,
-                                            szFileName,iCaseSensitivity)==0)
-                return UNZ_OK;
-            err = unzGoToNextFile(file);
-        }
-    }
-
-    /* We failed, so restore the state of the 'current file' to where we
-     * were.
-     */
-    s->num_file = num_fileSaved ;
-    s->pos_in_central_dir = pos_in_central_dirSaved ;
-    s->cur_file_info = cur_file_infoSaved;
-    s->cur_file_info_internal = cur_file_info_internalSaved;
-    return err;
-}
-
-
-/*
-///////////////////////////////////////////
-// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
-// I need random access
-//
-// Further optimization could be realized by adding an ability
-// to cache the directory in memory. The goal being a single
-// comprehensive file read to put the file I need in a memory.
-*/
-
-/*
-typedef struct unz_file_pos_s
-{
-    uLong pos_in_zip_directory;   // offset in file
-    uLong num_of_file;            // # of file
-} unz_file_pos;
-*/
-
-extern int ZEXPORT unzGetFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
-{
-    unz_s* s;
-
-    if (file==NULL || file_pos==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    file_pos->pos_in_zip_directory  = s->pos_in_central_dir;
-    file_pos->num_of_file           = s->num_file;
-
-    return UNZ_OK;
-}
-
-extern int ZEXPORT unzGoToFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
-{
-    unz_s* s;
-    int err;
-
-    if (file==NULL || file_pos==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    /* jump to the right spot */
-    s->pos_in_central_dir = file_pos->pos_in_zip_directory;
-    s->num_file           = file_pos->num_of_file;
-
-    /* set the current file */
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                               &s->cur_file_info_internal,
-                                               NULL,0,NULL,0,NULL,0);
-    /* return results */
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-/*
-// Unzip Helper Functions - should be here?
-///////////////////////////////////////////
-*/
-
-/*
-  Read the local header of the current zipfile
-  Check the coherency of the local header and info in the end of central
-        directory about this file
-  store in *piSizeVar the size of extra info in local header
-        (filename and size of extra field data)
-*/
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
-                                                    poffset_local_extrafield,
-                                                    psize_local_extrafield)
-    unz_s* s;
-    uInt* piSizeVar;
-    uLong *poffset_local_extrafield;
-    uInt  *psize_local_extrafield;
-{
-    uLong uMagic,uData,uFlags;
-    uLong size_filename;
-    uLong size_extra_field;
-    int err=UNZ_OK;
-
-    *piSizeVar = 0;
-    *poffset_local_extrafield = 0;
-    *psize_local_extrafield = 0;
-
-    if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
-                                s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-
-    if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
-            err=UNZ_ERRNO;
-        else if (uMagic!=0x04034b50)
-            err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
-        err=UNZ_ERRNO;
-/*
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
-        err=UNZ_BADZIPFILE;
-*/
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
-        err=UNZ_BADZIPFILE;
-
-    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
-                         (s->cur_file_info.compression_method!=Z_DEFLATED))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
-        err=UNZ_BADZIPFILE;
-
-    *piSizeVar += (uInt)size_filename;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
-        err=UNZ_ERRNO;
-    *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
-                                    SIZEZIPLOCALHEADER + size_filename;
-    *psize_local_extrafield = (uInt)size_extra_field;
-
-    *piSizeVar += (uInt)size_extra_field;
-
-    return err;
-}
-
-/*
-  Open for reading data the current file in the zipfile.
-  If there is no error and the file is opened, the return value is UNZ_OK.
-*/
-extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
-    const char* password;
-{
-    int err=UNZ_OK;
-    uInt iSizeVar;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    uLong offset_local_extrafield;  /* offset of the local extra field */
-    uInt  size_local_extrafield;    /* size of the local extra field */
-#    ifndef NOUNCRYPT
-    char source[12];
-#    else
-    if (password != NULL)
-        return UNZ_PARAMERROR;
-#    endif
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_PARAMERROR;
-
-    if (s->pfile_in_zip_read != NULL)
-        unzCloseCurrentFile(file);
-
-    if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
-                &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
-        return UNZ_BADZIPFILE;
-
-    pfile_in_zip_read_info = (file_in_zip_read_info_s*)
-                                        ALLOC(sizeof(file_in_zip_read_info_s));
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_INTERNALERROR;
-
-    pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
-    pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
-    pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
-    pfile_in_zip_read_info->pos_local_extrafield=0;
-    pfile_in_zip_read_info->raw=raw;
-
-    if (pfile_in_zip_read_info->read_buffer==NULL)
-    {
-        TRYFREE(pfile_in_zip_read_info);
-        return UNZ_INTERNALERROR;
-    }
-
-    pfile_in_zip_read_info->stream_initialised=0;
-
-    if (method!=NULL)
-        *method = (int)s->cur_file_info.compression_method;
-
-    if (level!=NULL)
-    {
-        *level = 6;
-        switch (s->cur_file_info.flag & 0x06)
-        {
-          case 6 : *level = 1; break;
-          case 4 : *level = 2; break;
-          case 2 : *level = 9; break;
-        }
-    }
-
-    if ((s->cur_file_info.compression_method!=0) &&
-        (s->cur_file_info.compression_method!=Z_DEFLATED))
-        err=UNZ_BADZIPFILE;
-
-    pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
-    pfile_in_zip_read_info->crc32=0;
-    pfile_in_zip_read_info->compression_method =
-            s->cur_file_info.compression_method;
-    pfile_in_zip_read_info->filestream=s->filestream;
-    pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
-    pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
-
-    pfile_in_zip_read_info->stream.total_out = 0;
-
-    if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
-        (!raw))
-    {
-      pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
-      pfile_in_zip_read_info->stream.zfree = (free_func)0;
-      pfile_in_zip_read_info->stream.opaque = (voidpf)0;
-      pfile_in_zip_read_info->stream.next_in = (voidpf)0;
-      pfile_in_zip_read_info->stream.avail_in = 0;
-
-      err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
-      if (err == Z_OK)
-        pfile_in_zip_read_info->stream_initialised=1;
-      else
-        return err;
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END.
-         * In unzip, i don't wait absolutely Z_STREAM_END because I known the
-         * size of both compressed and uncompressed data
-         */
-    }
-    pfile_in_zip_read_info->rest_read_compressed =
-            s->cur_file_info.compressed_size ;
-    pfile_in_zip_read_info->rest_read_uncompressed =
-            s->cur_file_info.uncompressed_size ;
-
-
-    pfile_in_zip_read_info->pos_in_zipfile =
-            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
-              iSizeVar;
-
-    pfile_in_zip_read_info->stream.avail_in = (uInt)0;
-
-    s->pfile_in_zip_read = pfile_in_zip_read_info;
-
-#    ifndef NOUNCRYPT
-    if (password != NULL)
-    {
-        int i;
-        s->pcrc_32_tab = get_crc_table();
-        init_keys(password,s->keys,s->pcrc_32_tab);
-        if (ZSEEK(s->z_filefunc, s->filestream,
-                  s->pfile_in_zip_read->pos_in_zipfile +
-                     s->pfile_in_zip_read->byte_before_the_zipfile,
-                  SEEK_SET)!=0)
-            return UNZ_INTERNALERROR;
-        if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
-            return UNZ_INTERNALERROR;
-
-        for (i = 0; i<12; i++)
-            zdecode(s->keys,s->pcrc_32_tab,source[i]);
-
-        s->pfile_in_zip_read->pos_in_zipfile+=12;
-        s->encrypted=1;
-    }
-#    endif
-
-
-    return UNZ_OK;
-}
-
-extern int ZEXPORT unzOpenCurrentFile (file)
-    unzFile file;
-{
-    return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
-}
-
-extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
-    unzFile file;
-    const char* password;
-{
-    return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
-}
-
-extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
-{
-    return unzOpenCurrentFile3(file, method, level, raw, NULL);
-}
-
-/*
-  Read bytes from the current file.
-  buf contain buffer where data must be copied
-  len the size of buf.
-
-  return the number of byte copied if somes bytes are copied
-  return 0 if the end of file was reached
-  return <0 with error code if there is an error
-    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
-{
-    int err=UNZ_OK;
-    uInt iRead = 0;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-
-    if ((pfile_in_zip_read_info->read_buffer == NULL))
-        return UNZ_END_OF_LIST_OF_FILE;
-    if (len==0)
-        return 0;
-
-    pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
-
-    pfile_in_zip_read_info->stream.avail_out = (uInt)len;
-
-    if (len>pfile_in_zip_read_info->rest_read_uncompressed)
-        pfile_in_zip_read_info->stream.avail_out =
-          (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
-
-    while (pfile_in_zip_read_info->stream.avail_out>0)
-    {
-        if ((pfile_in_zip_read_info->stream.avail_in==0) &&
-            (pfile_in_zip_read_info->rest_read_compressed>0))
-        {
-            uInt uReadThis = UNZ_BUFSIZE;
-            if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
-                uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
-            if (uReadThis == 0)
-                return UNZ_EOF;
-            if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
-                      pfile_in_zip_read_info->filestream,
-                      pfile_in_zip_read_info->pos_in_zipfile +
-                         pfile_in_zip_read_info->byte_before_the_zipfile,
-                         ZLIB_FILEFUNC_SEEK_SET)!=0)
-                return UNZ_ERRNO;
-            if (ZREAD(pfile_in_zip_read_info->z_filefunc,
-                      pfile_in_zip_read_info->filestream,
-                      pfile_in_zip_read_info->read_buffer,
-                      uReadThis)!=uReadThis)
-                return UNZ_ERRNO;
-
-
-#            ifndef NOUNCRYPT
-            if(s->encrypted)
-            {
-                uInt i;
-                for(i=0;i<uReadThis;i++)
-                  pfile_in_zip_read_info->read_buffer[i] =
-                      zdecode(s->keys,s->pcrc_32_tab,
-                              pfile_in_zip_read_info->read_buffer[i]);
-            }
-#            endif
-
-
-            pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
-
-            pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
-
-            pfile_in_zip_read_info->stream.next_in =
-                (Bytef*)pfile_in_zip_read_info->read_buffer;
-            pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
-        }
-
-        if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
-        {
-            uInt uDoCopy,i ;
-
-            if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                return (iRead==0) ? UNZ_EOF : iRead;
-
-            if (pfile_in_zip_read_info->stream.avail_out <
-                            pfile_in_zip_read_info->stream.avail_in)
-                uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
-            else
-                uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
-
-            for (i=0;i<uDoCopy;i++)
-                *(pfile_in_zip_read_info->stream.next_out+i) =
-                        *(pfile_in_zip_read_info->stream.next_in+i);
-
-            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
-                                pfile_in_zip_read_info->stream.next_out,
-                                uDoCopy);
-            pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
-            pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
-            pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
-            pfile_in_zip_read_info->stream.next_out += uDoCopy;
-            pfile_in_zip_read_info->stream.next_in += uDoCopy;
-            pfile_in_zip_read_info->stream.total_out += uDoCopy;
-            iRead += uDoCopy;
-        }
-        else
-        {
-            uLong uTotalOutBefore,uTotalOutAfter;
-            const Bytef *bufBefore;
-            uLong uOutThis;
-            int flush=Z_SYNC_FLUSH;
-
-            uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
-            bufBefore = pfile_in_zip_read_info->stream.next_out;
-
-            /*
-            if ((pfile_in_zip_read_info->rest_read_uncompressed ==
-                     pfile_in_zip_read_info->stream.avail_out) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                flush = Z_FINISH;
-            */
-            err=inflate(&pfile_in_zip_read_info->stream,flush);
-
-            uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
-            uOutThis = uTotalOutAfter-uTotalOutBefore;
-
-            pfile_in_zip_read_info->crc32 =
-                crc32(pfile_in_zip_read_info->crc32,bufBefore,
-                        (uInt)(uOutThis));
-
-            pfile_in_zip_read_info->rest_read_uncompressed -=
-                uOutThis;
-
-            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
-
-            if (err==Z_STREAM_END)
-                return (iRead==0) ? UNZ_EOF : iRead;
-            if (err!=Z_OK)
-                break;
-        }
-    }
-
-    if (err==Z_OK)
-        return iRead;
-    return err;
-}
-
-
-/*
-  Give the current position in uncompressed data
-*/
-extern z_off_t ZEXPORT unztell (file)
-    unzFile file;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    return (z_off_t)pfile_in_zip_read_info->stream.total_out;
-}
-
-
-/*
-  return 1 if the end of file was reached, 0 elsewhere
-*/
-extern int ZEXPORT unzeof (file)
-    unzFile file;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
-        return 1;
-    else
-        return 0;
-}
-
-
-
-/*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
-
-  if buf==NULL, it return the size of the local extra field that can be read
-
-  if buf!=NULL, len is the size of the buffer, the extra header is copied in
-    buf.
-  the return value is the number of bytes copied in buf, or (if <0)
-    the error code
-*/
-extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    uInt read_now;
-    uLong size_to_read;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
-                pfile_in_zip_read_info->pos_local_extrafield);
-
-    if (buf==NULL)
-        return (int)size_to_read;
-
-    if (len>size_to_read)
-        read_now = (uInt)size_to_read;
-    else
-        read_now = (uInt)len ;
-
-    if (read_now==0)
-        return 0;
-
-    if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
-              pfile_in_zip_read_info->filestream,
-              pfile_in_zip_read_info->offset_local_extrafield +
-              pfile_in_zip_read_info->pos_local_extrafield,
-              ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-    if (ZREAD(pfile_in_zip_read_info->z_filefunc,
-              pfile_in_zip_read_info->filestream,
-              buf,size_to_read)!=size_to_read)
-        return UNZ_ERRNO;
-
-    return (int)read_now;
-}
-
-/*
-  Close the file in zip opened with unzipOpenCurrentFile
-  Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-extern int ZEXPORT unzCloseCurrentFile (file)
-    unzFile file;
-{
-    int err=UNZ_OK;
-
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-
-    if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
-        (!pfile_in_zip_read_info->raw))
-    {
-        if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
-            err=UNZ_CRCERROR;
-    }
-
-
-    TRYFREE(pfile_in_zip_read_info->read_buffer);
-    pfile_in_zip_read_info->read_buffer = NULL;
-    if (pfile_in_zip_read_info->stream_initialised)
-        inflateEnd(&pfile_in_zip_read_info->stream);
-
-    pfile_in_zip_read_info->stream_initialised = 0;
-    TRYFREE(pfile_in_zip_read_info);
-
-    s->pfile_in_zip_read=NULL;
-
-    return err;
-}
-
-
-/*
-  Get the global comment string of the ZipFile, in the szComment buffer.
-  uSizeBuf is the size of the szComment buffer.
-  return the number of byte copied or an error code <0
-*/
-extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
-    unzFile file;
-    char *szComment;
-    uLong uSizeBuf;
-{
-    int err=UNZ_OK;
-    unz_s* s;
-    uLong uReadThis ;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    uReadThis = uSizeBuf;
-    if (uReadThis>s->gi.size_comment)
-        uReadThis = s->gi.size_comment;
-
-    if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-    if (uReadThis>0)
-    {
-      *szComment='\0';
-      if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
-        return UNZ_ERRNO;
-    }
-
-    if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
-        *(szComment+s->gi.size_comment)='\0';
-    return (int)uReadThis;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/unzip.h b/tkimg1.3/libz/contrib/minizip/unzip.h
deleted file mode 100644
index 4e50979..0000000
--- a/tkimg1.3/libz/contrib/minizip/unzip.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/* unzip.h -- IO for uncompress .zip files using zlib
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-
-   This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
-   Encryption and multi volume ZipFile (span) are not supported.
-   Old compressions used by old PKZip 1.x are not supported
-
-
-   I WAIT FEEDBACK at mail info at winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
-
-   Condition of use and distribution are the same than zlib :
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-
-*/
-
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _unz_H
-#define _unz_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
-    from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
-#else
-typedef voidp unzFile;
-#endif
-
-
-#define UNZ_OK                          (0)
-#define UNZ_END_OF_LIST_OF_FILE         (-100)
-#define UNZ_ERRNO                       (Z_ERRNO)
-#define UNZ_EOF                         (0)
-#define UNZ_PARAMERROR                  (-102)
-#define UNZ_BADZIPFILE                  (-103)
-#define UNZ_INTERNALERROR               (-104)
-#define UNZ_CRCERROR                    (-105)
-
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
-    uInt tm_sec;            /* seconds after the minute - [0,59] */
-    uInt tm_min;            /* minutes after the hour - [0,59] */
-    uInt tm_hour;           /* hours since midnight - [0,23] */
-    uInt tm_mday;           /* day of the month - [1,31] */
-    uInt tm_mon;            /* months since January - [0,11] */
-    uInt tm_year;           /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
-   These data comes from the end of central dir */
-typedef struct unz_global_info_s
-{
-    uLong number_entry;         /* total number of entries in
-                       the central dir on this disk */
-    uLong size_comment;         /* size of the global comment of the zipfile */
-} unz_global_info;
-
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info_s
-{
-    uLong version;              /* version made by                 2 bytes */
-    uLong version_needed;       /* version needed to extract       2 bytes */
-    uLong flag;                 /* general purpose bit flag        2 bytes */
-    uLong compression_method;   /* compression method              2 bytes */
-    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */
-    uLong crc;                  /* crc-32                          4 bytes */
-    uLong compressed_size;      /* compressed size                 4 bytes */
-    uLong uncompressed_size;    /* uncompressed size               4 bytes */
-    uLong size_filename;        /* filename length                 2 bytes */
-    uLong size_file_extra;      /* extra field length              2 bytes */
-    uLong size_file_comment;    /* file comment length             2 bytes */
-
-    uLong disk_num_start;       /* disk number start               2 bytes */
-    uLong internal_fa;          /* internal file attributes        2 bytes */
-    uLong external_fa;          /* external file attributes        4 bytes */
-
-    tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
-                                                 const char* fileName2,
-                                                 int iCaseSensitivity));
-/*
-   Compare two filename (fileName1,fileName2).
-   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                or strcasecmp)
-   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-    (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-/*
-  Open a Zip file. path contain the full pathname (by example,
-     on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
-     "zlib/zlib113.zip".
-     If the zipfile cannot be opened (file don't exist or in not valid), the
-       return value is NULL.
-     Else, the return value is a unzFile Handle, usable with other function
-       of this unzip package.
-*/
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
-                                    zlib_filefunc_def* pzlib_filefunc_def));
-/*
-   Open a Zip file, like unzOpen, but provide a set of file low level API
-      for read/write the zip file (see ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
-  Close a ZipFile opened with unzipOpen.
-  If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
-    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
-  return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
-                                        unz_global_info *pglobal_info));
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
-                                           char *szComment,
-                                           uLong uSizeBuf));
-/*
-  Get the global comment string of the ZipFile, in the szComment buffer.
-  uSizeBuf is the size of the szComment buffer.
-  return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the first file.
-  return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the next file.
-  return UNZ_OK if there is no problem
-  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
-                     const char *szFileName,
-                     int iCaseSensitivity));
-/*
-  Try locate the file szFileName in the zipfile.
-  For the iCaseSensitivity signification, see unzStringFileNameCompare
-
-  return value :
-  UNZ_OK if the file is found. It becomes the current file.
-  UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
-    uLong pos_in_zip_directory;   /* offset in zip file directory */
-    uLong num_of_file;            /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
-                         unz_file_info *pfile_info,
-                         char *szFileName,
-                         uLong fileNameBufferSize,
-                         void *extraField,
-                         uLong extraFieldBufferSize,
-                         char *szComment,
-                         uLong commentBufferSize));
-/*
-  Get Info about the current file
-  if pfile_info!=NULL, the *pfile_info structure will contain somes info about
-        the current file
-  if szFileName!=NULL, the filemane string will be copied in szFileName
-            (fileNameBufferSize is the size of the buffer)
-  if extraField!=NULL, the extra field information will be copied in extraField
-            (extraFieldBufferSize is the size of the buffer).
-            This is the Central-header version of the extra field
-  if szComment!=NULL, the comment string of the file will be copied in szComment
-            (commentBufferSize is the size of the buffer)
-*/
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
-   from it, and close it (you can close it before reading all the file)
-   */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
-  Open for reading data the current file in the zipfile.
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
-                                                  const char* password));
-/*
-  Open for reading data the current file in the zipfile.
-  password is a crypting password
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw,
-                                           const char* password));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
-  Close the file in zip opened with unzOpenCurrentFile
-  Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
-                      voidp buf,
-                      unsigned len));
-/*
-  Read bytes from the current file (opened by unzOpenCurrentFile)
-  buf contain buffer where data must be copied
-  len the size of buf.
-
-  return the number of byte copied if somes bytes are copied
-  return 0 if the end of file was reached
-  return <0 with error code if there is an error
-    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-/*
-  Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
-  return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
-                                             voidp buf,
-                                             unsigned len));
-/*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
-
-  if buf==NULL, it return the size of the local extra field
-
-  if buf!=NULL, len is the size of the buffer, the extra header is copied in
-    buf.
-  the return value is the number of bytes copied in buf, or (if <0)
-    the error code
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _unz_H */
diff --git a/tkimg1.3/libz/contrib/minizip/zip.c b/tkimg1.3/libz/contrib/minizip/zip.c
deleted file mode 100644
index 1a713e5..0000000
--- a/tkimg1.3/libz/contrib/minizip/zip.c
+++ /dev/null
@@ -1,1170 +0,0 @@
-/* zip.c -- IO on .zip files using zlib
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-
-   Read zip.h for more info
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include "zlib.h"
-#include "zip.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-#ifndef VERSIONMADEBY
-# define VERSIONMADEBY   (0x0) /* platform depedent */
-#endif
-
-#ifndef Z_BUFSIZE
-#define Z_BUFSIZE (16384)
-#endif
-
-#ifndef Z_MAXFILENAMEINZIP
-#define Z_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-/*
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-*/
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR    1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END    2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET    0
-#endif
-
-#ifndef DEF_MEM_LEVEL
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-#endif
-const char zip_copyright[] =
-   " zip 1.00 Copyright 1998-2003 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-
-#define SIZEDATA_INDATABLOCK (4096-(4*4))
-
-#define LOCALHEADERMAGIC    (0x04034b50)
-#define CENTRALHEADERMAGIC  (0x02014b50)
-#define ENDHEADERMAGIC      (0x06054b50)
-
-#define FLAG_LOCALHEADER_OFFSET (0x06)
-#define CRC_LOCALHEADER_OFFSET  (0x0e)
-
-#define SIZECENTRALHEADER (0x2e) /* 46 */
-
-typedef struct linkedlist_datablock_internal_s
-{
-  struct linkedlist_datablock_internal_s* next_datablock;
-  uLong  avail_in_this_block;
-  uLong  filled_in_this_block;
-  uLong  unused; /* for future use and alignement */
-  unsigned char data[SIZEDATA_INDATABLOCK];
-} linkedlist_datablock_internal;
-
-typedef struct linkedlist_data_s
-{
-    linkedlist_datablock_internal* first_block;
-    linkedlist_datablock_internal* last_block;
-} linkedlist_data;
-
-
-typedef struct
-{
-    z_stream stream;            /* zLib stream structure for inflate */
-    int  stream_initialised;    /* 1 is stream is initialised */
-    uInt pos_in_buffered_data;  /* last written byte in buffered_data */
-
-    uLong pos_local_header;     /* offset of the local header of the file
-                                     currenty writing */
-    char* central_header;       /* central header data for the current file */
-    uLong size_centralheader;   /* size of the central header for cur file */
-    uLong flag;                 /* flag of the file currently writing */
-
-    int  method;                /* compression method of file currenty wr.*/
-    int  raw;                   /* 1 for directly writing raw data */
-    Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/
-    uLong dosDate;
-    uLong crc32;
-    int  encrypt;
-#ifndef NOCRYPT
-    unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
-    int crypt_header_size;
-#endif
-} curfile_info;
-
-typedef struct
-{
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    linkedlist_data central_dir;/* datablock with central dir in construction*/
-    int  in_opened_file_inzip;  /* 1 if a file in the zip is currently writ.*/
-    curfile_info ci;            /* info on the file curretly writing */
-
-    uLong begin_pos;            /* position of the beginning of the zipfile */
-    uLong add_position_when_writting_offset;
-    uLong number_entry;
-} zip_internal;
-
-
-
-#ifndef NOCRYPT
-#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-#include "crypt.h"
-#endif
-
-local linkedlist_datablock_internal* allocate_new_datablock()
-{
-    linkedlist_datablock_internal* ldi;
-    ldi = (linkedlist_datablock_internal*)
-                 ALLOC(sizeof(linkedlist_datablock_internal));
-    if (ldi!=NULL)
-    {
-        ldi->next_datablock = NULL ;
-        ldi->filled_in_this_block = 0 ;
-        ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ;
-    }
-    return ldi;
-}
-
-local void free_datablock(ldi)
-    linkedlist_datablock_internal* ldi;
-{
-    while (ldi!=NULL)
-    {
-        linkedlist_datablock_internal* ldinext = ldi->next_datablock;
-        TRYFREE(ldi);
-        ldi = ldinext;
-    }
-}
-
-local void init_linkedlist(ll)
-    linkedlist_data* ll;
-{
-    ll->first_block = ll->last_block = NULL;
-}
-
-local void free_linkedlist(ll)
-    linkedlist_data* ll;
-{
-    free_datablock(ll->first_block);
-    ll->first_block = ll->last_block = NULL;
-}
-
-
-local int add_data_in_datablock(ll,buf,len)
-    linkedlist_data* ll;
-    const void* buf;
-    uLong len;
-{
-    linkedlist_datablock_internal* ldi;
-    const unsigned char* from_copy;
-
-    if (ll==NULL)
-        return ZIP_INTERNALERROR;
-
-    if (ll->last_block == NULL)
-    {
-        ll->first_block = ll->last_block = allocate_new_datablock();
-        if (ll->first_block == NULL)
-            return ZIP_INTERNALERROR;
-    }
-
-    ldi = ll->last_block;
-    from_copy = (unsigned char*)buf;
-
-    while (len>0)
-    {
-        uInt copy_this;
-        uInt i;
-        unsigned char* to_copy;
-
-        if (ldi->avail_in_this_block==0)
-        {
-            ldi->next_datablock = allocate_new_datablock();
-            if (ldi->next_datablock == NULL)
-                return ZIP_INTERNALERROR;
-            ldi = ldi->next_datablock ;
-            ll->last_block = ldi;
-        }
-
-        if (ldi->avail_in_this_block < len)
-            copy_this = (uInt)ldi->avail_in_this_block;
-        else
-            copy_this = (uInt)len;
-
-        to_copy = &(ldi->data[ldi->filled_in_this_block]);
-
-        for (i=0;i<copy_this;i++)
-            *(to_copy+i)=*(from_copy+i);
-
-        ldi->filled_in_this_block += copy_this;
-        ldi->avail_in_this_block -= copy_this;
-        from_copy += copy_this ;
-        len -= copy_this;
-    }
-    return ZIP_OK;
-}
-
-
-
-/****************************************************************************/
-
-#ifndef NO_ADDFILEINEXISTINGZIP
-/* ===========================================================================
-   Inputs a long in LSB order to the given file
-   nbByte == 1, 2 or 4 (byte, short or long)
-*/
-
-local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def,
-                                voidpf filestream, uLong x, int nbByte));
-local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong x;
-    int nbByte;
-{
-    unsigned char buf[4];
-    int n;
-    for (n = 0; n < nbByte; n++) {
-        buf[n] = (unsigned char)(x & 0xff);
-        x >>= 8;
-    }
-    if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
-        return ZIP_ERRNO;
-    else
-        return ZIP_OK;
-}
-
-local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte));
-local void ziplocal_putValue_inmemory (dest, x, nbByte)
-    void* dest;
-    uLong x;
-    int nbByte;
-{
-    unsigned char* buf=(unsigned char*)dest;
-    int n;
-    for (n = 0; n < nbByte; n++) {
-        buf[n] = (unsigned char)(x & 0xff);
-        x >>= 8;
-    }
-}
-/****************************************************************************/
-
-
-local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
-    const tm_zip* ptm;
-    uLong dosDate;
-{
-    uLong year = (uLong)ptm->tm_year;
-    if (year>1980)
-        year-=1980;
-    else if (year>80)
-        year-=80;
-    return
-      (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
-        ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
-}
-
-
-/****************************************************************************/
-
-local int ziplocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    int *pi));
-
-local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
-{
-    unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
-    if (err==1)
-    {
-        *pi = (int)c;
-        return ZIP_OK;
-    }
-    else
-    {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
-            return ZIP_ERRNO;
-        else
-            return ZIP_EOF;
-    }
-}
-
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int ziplocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==ZIP_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-local int ziplocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<16;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<24;
-
-    if (err==ZIP_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-/*
-  Locate the Central directory of a zipfile (at the end, just before
-    the global comment)
-*/
-local uLong ziplocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
-
-local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-{
-    unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
-
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
-
-
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
-    if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
-
-    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
-    if (buf==NULL)
-        return 0;
-
-    uBackRead = 4;
-    while (uBackRead<uMaxBack)
-    {
-        uLong uReadSize,uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead+=BUFREADCOMMENT;
-        uReadPos = uSizeFile-uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            break;
-
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-            break;
-
-        for (i=(int)uReadSize-3; (i--)>0;)
-            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound!=0)
-            break;
-    }
-    TRYFREE(buf);
-    return uPosFound;
-}
-#endif /* !NO_ADDFILEINEXISTINGZIP*/
-
-/************************************************************/
-extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def)
-    const char *pathname;
-    int append;
-    zipcharpc* globalcomment;
-    zlib_filefunc_def* pzlib_filefunc_def;
-{
-    zip_internal ziinit;
-    zip_internal* zi;
-    int err=ZIP_OK;
-
-
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&ziinit.z_filefunc);
-    else
-        ziinit.z_filefunc = *pzlib_filefunc_def;
-
-    ziinit.filestream = (*(ziinit.z_filefunc.zopen_file))
-                 (ziinit.z_filefunc.opaque,
-                  pathname,
-                  (append == APPEND_STATUS_CREATE) ?
-                  (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
-                    (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));
-
-    if (ziinit.filestream == NULL)
-        return NULL;
-    ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream);
-    ziinit.in_opened_file_inzip = 0;
-    ziinit.ci.stream_initialised = 0;
-    ziinit.number_entry = 0;
-    ziinit.add_position_when_writting_offset = 0;
-    init_linkedlist(&(ziinit.central_dir));
-
-
-    zi = (zip_internal*)ALLOC(sizeof(zip_internal));
-    if (zi==NULL)
-    {
-        ZCLOSE(ziinit.z_filefunc,ziinit.filestream);
-        return NULL;
-    }
-
-    /* now we add file in a zipfile */
-#    ifndef NO_ADDFILEINEXISTINGZIP
-    if (append == APPEND_STATUS_ADDINZIP)
-    {
-        uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-
-        uLong size_central_dir;     /* size of the central directory  */
-        uLong offset_central_dir;   /* offset of start of central directory */
-        uLong central_pos,uL;
-
-        uLong number_disk;          /* number of the current dist, used for
-                                    spaning ZIP, unsupported, always 0*/
-        uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                    for spaning ZIP, unsupported, always 0*/
-        uLong number_entry;
-        uLong number_entry_CD;      /* total number of entries in
-                                    the central dir
-                                    (same than number_entry on nospan) */
-        uLong size_comment;
-
-        central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream);
-        if (central_pos==0)
-            err=ZIP_ERRNO;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                                        central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
-
-        /* the signature, already checked */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of the disk with the start of the central directory */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir on this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((number_entry_CD!=number_entry) ||
-            (number_disk_with_CD!=0) ||
-            (number_disk!=0))
-            err=ZIP_BADZIPFILE;
-
-        /* size of the central directory */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* offset of start of central directory with respect to the
-            starting disk number */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* zipfile comment length */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((central_pos<offset_central_dir+size_central_dir) &&
-            (err==ZIP_OK))
-            err=ZIP_BADZIPFILE;
-
-        if (err!=ZIP_OK)
-        {
-            ZCLOSE(ziinit.z_filefunc, ziinit.filestream);
-            return NULL;
-        }
-
-        byte_before_the_zipfile = central_pos -
-                                (offset_central_dir+size_central_dir);
-        ziinit.add_position_when_writting_offset = byte_before_the_zipfile ;
-
-        {
-            uLong size_central_dir_to_read = size_central_dir;
-            size_t buf_size = SIZEDATA_INDATABLOCK;
-            void* buf_read = (void*)ALLOC(buf_size);
-            if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir + byte_before_the_zipfile,
-                  ZLIB_FILEFUNC_SEEK_SET) != 0)
-                  err=ZIP_ERRNO;
-
-            while ((size_central_dir_to_read>0) && (err==ZIP_OK))
-            {
-                uLong read_this = SIZEDATA_INDATABLOCK;
-                if (read_this > size_central_dir_to_read)
-                    read_this = size_central_dir_to_read;
-                if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this)
-                    err=ZIP_ERRNO;
-
-                if (err==ZIP_OK)
-                    err = add_data_in_datablock(&ziinit.central_dir,buf_read,
-                                                (uLong)read_this);
-                size_central_dir_to_read-=read_this;
-            }
-            TRYFREE(buf_read);
-        }
-        ziinit.begin_pos = byte_before_the_zipfile;
-        ziinit.number_entry = number_entry_CD;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
-    }
-#    endif /* !NO_ADDFILEINEXISTINGZIP*/
-
-    if (err != ZIP_OK)
-    {
-        TRYFREE(zi);
-        return NULL;
-    }
-    else
-    {
-        *zi = ziinit;
-        return (zipFile)zi;
-    }
-}
-
-extern zipFile ZEXPORT zipOpen (pathname, append)
-    const char *pathname;
-    int append;
-{
-    return zipOpen2(pathname,append,NULL,NULL);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
-                                         extrafield_local, size_extrafield_local,
-                                         extrafield_global, size_extrafield_global,
-                                         comment, method, level, raw,
-                                         windowBits, memLevel, strategy,
-                                         password, crcForCrypting)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
-    int windowBits;
-    int memLevel;
-    int strategy;
-    const char* password;
-    uLong crcForCrypting;
-{
-    zip_internal* zi;
-    uInt size_filename;
-    uInt size_comment;
-    uInt i;
-    int err = ZIP_OK;
-
-#    ifdef NOCRYPT
-    if (password != NULL)
-        return ZIP_PARAMERROR;
-#    endif
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    if ((method!=0) && (method!=Z_DEFLATED))
-        return ZIP_PARAMERROR;
-
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 1)
-    {
-        err = zipCloseFileInZip (file);
-        if (err != ZIP_OK)
-            return err;
-    }
-
-
-    if (filename==NULL)
-        filename="-";
-
-    if (comment==NULL)
-        size_comment = 0;
-    else
-        size_comment = strlen(comment);
-
-    size_filename = strlen(filename);
-
-    if (zipfi == NULL)
-        zi->ci.dosDate = 0;
-    else
-    {
-        if (zipfi->dosDate != 0)
-            zi->ci.dosDate = zipfi->dosDate;
-        else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate);
-    }
-
-    zi->ci.flag = 0;
-    if ((level==8) || (level==9))
-      zi->ci.flag |= 2;
-    if ((level==2))
-      zi->ci.flag |= 4;
-    if ((level==1))
-      zi->ci.flag |= 6;
-    if (password != NULL)
-      zi->ci.flag |= 1;
-
-    zi->ci.crc32 = 0;
-    zi->ci.method = method;
-    zi->ci.encrypt = 0;
-    zi->ci.stream_initialised = 0;
-    zi->ci.pos_in_buffered_data = 0;
-    zi->ci.raw = raw;
-    zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ;
-    zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename +
-                                      size_extrafield_global + size_comment;
-    zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader);
-
-    ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
-    /* version info */
-    ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
-
-    if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
-    else
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
-
-    if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
-    else
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
-
-    ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4);
-
-    for (i=0;i<size_filename;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
-
-    for (i=0;i<size_extrafield_global;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =
-              *(((const char*)extrafield_global)+i);
-
-    for (i=0;i<size_comment;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+
-              size_extrafield_global+i) = *(comment+i);
-    if (zi->ci.central_header == NULL)
-        return ZIP_INTERNALERROR;
-
-    /* write the local header */
-    err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2);
-
-    if ((err==ZIP_OK) && (size_filename>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
-                err = ZIP_ERRNO;
-
-    if ((err==ZIP_OK) && (size_extrafield_local>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local)
-                                                                           !=size_extrafield_local)
-                err = ZIP_ERRNO;
-
-    zi->ci.stream.avail_in = (uInt)0;
-    zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-    zi->ci.stream.next_out = zi->ci.buffered_data;
-    zi->ci.stream.total_in = 0;
-    zi->ci.stream.total_out = 0;
-
-    if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-    {
-        zi->ci.stream.zalloc = (alloc_func)0;
-        zi->ci.stream.zfree = (free_func)0;
-        zi->ci.stream.opaque = (voidpf)0;
-
-        if (windowBits>0)
-            windowBits = -windowBits;
-
-        err = deflateInit2(&zi->ci.stream, level,
-               Z_DEFLATED, windowBits, memLevel, strategy);
-
-        if (err==Z_OK)
-            zi->ci.stream_initialised = 1;
-    }
-#    ifndef NOCRYPT
-    zi->ci.crypt_header_size = 0;
-    if ((err==Z_OK) && (password != NULL))
-    {
-        unsigned char bufHead[RAND_HEAD_LEN];
-        unsigned int sizeHead;
-        zi->ci.encrypt = 1;
-        zi->ci.pcrc_32_tab = get_crc_table();
-        /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/
-
-        sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);
-        zi->ci.crypt_header_size = sizeHead;
-
-        if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
-                err = ZIP_ERRNO;
-    }
-#    endif
-
-    if (err==Z_OK)
-        zi->in_opened_file_inzip = 1;
-    return err;
-}
-
-extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level, raw)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
-{
-    return zipOpenNewFileInZip3 (file, filename, zipfi,
-                                 extrafield_local, size_extrafield_local,
-                                 extrafield_global, size_extrafield_global,
-                                 comment, method, level, raw,
-                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 NULL, 0);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-{
-    return zipOpenNewFileInZip2 (file, filename, zipfi,
-                                 extrafield_local, size_extrafield_local,
-                                 extrafield_global, size_extrafield_global,
-                                 comment, method, level, 0);
-}
-
-local int zipFlushWriteBuffer(zi)
-  zip_internal* zi;
-{
-    int err=ZIP_OK;
-
-    if (zi->ci.encrypt != 0)
-    {
-#ifndef NOCRYPT
-        uInt i;
-        int t;
-        for (i=0;i<zi->ci.pos_in_buffered_data;i++)
-            zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab,
-                                       zi->ci.buffered_data[i],t);
-#endif
-    }
-    if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data)
-                                                                    !=zi->ci.pos_in_buffered_data)
-      err = ZIP_ERRNO;
-    zi->ci.pos_in_buffered_data = 0;
-    return err;
-}
-
-extern int ZEXPORT zipWriteInFileInZip (file, buf, len)
-    zipFile file;
-    const void* buf;
-    unsigned len;
-{
-    zip_internal* zi;
-    int err=ZIP_OK;
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 0)
-        return ZIP_PARAMERROR;
-
-    zi->ci.stream.next_in = (void*)buf;
-    zi->ci.stream.avail_in = len;
-    zi->ci.crc32 = crc32(zi->ci.crc32,buf,len);
-
-    while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
-    {
-        if (zi->ci.stream.avail_out == 0)
-        {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
-        }
-
-
-        if(err != ZIP_OK)
-            break;
-
-        if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-        {
-            uLong uTotalOutBefore = zi->ci.stream.total_out;
-            err=deflate(&zi->ci.stream,  Z_NO_FLUSH);
-            zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
-
-        }
-        else
-        {
-            uInt copy_this,i;
-            if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
-                copy_this = zi->ci.stream.avail_in;
-            else
-                copy_this = zi->ci.stream.avail_out;
-            for (i=0;i<copy_this;i++)
-                *(((char*)zi->ci.stream.next_out)+i) =
-                    *(((const char*)zi->ci.stream.next_in)+i);
-            {
-                zi->ci.stream.avail_in -= copy_this;
-                zi->ci.stream.avail_out-= copy_this;
-                zi->ci.stream.next_in+= copy_this;
-                zi->ci.stream.next_out+= copy_this;
-                zi->ci.stream.total_in+= copy_this;
-                zi->ci.stream.total_out+= copy_this;
-                zi->ci.pos_in_buffered_data += copy_this;
-            }
-        }
-    }
-
-    return err;
-}
-
-extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32)
-    zipFile file;
-    uLong uncompressed_size;
-    uLong crc32;
-{
-    zip_internal* zi;
-    uLong compressed_size;
-    int err=ZIP_OK;
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 0)
-        return ZIP_PARAMERROR;
-    zi->ci.stream.avail_in = 0;
-
-    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-        while (err==ZIP_OK)
-    {
-        uLong uTotalOutBefore;
-        if (zi->ci.stream.avail_out == 0)
-        {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
-        }
-        uTotalOutBefore = zi->ci.stream.total_out;
-        err=deflate(&zi->ci.stream,  Z_FINISH);
-        zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
-    }
-
-    if (err==Z_STREAM_END)
-        err=ZIP_OK; /* this is normal */
-
-    if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
-        if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
-            err = ZIP_ERRNO;
-
-    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-    {
-        err=deflateEnd(&zi->ci.stream);
-        zi->ci.stream_initialised = 0;
-    }
-
-    if (!zi->ci.raw)
-    {
-        crc32 = (uLong)zi->ci.crc32;
-        uncompressed_size = (uLong)zi->ci.stream.total_in;
-    }
-    compressed_size = (uLong)zi->ci.stream.total_out;
-#    ifndef NOCRYPT
-    compressed_size += zi->ci.crypt_header_size;
-#    endif
-
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,
-                                compressed_size,4); /*compr size*/
-    if (zi->ci.stream.data_type == Z_ASCII)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,
-                                uncompressed_size,4); /*uncompr size*/
-
-    if (err==ZIP_OK)
-        err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header,
-                                       (uLong)zi->ci.size_centralheader);
-    free(zi->ci.central_header);
-
-    if (err==ZIP_OK)
-    {
-        long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err = ZIP_ERRNO;
-
-        if (err==ZIP_OK)
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
-
-        if (err==ZIP_OK) /* compressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
-
-        if (err==ZIP_OK) /* uncompressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
-
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err = ZIP_ERRNO;
-    }
-
-    zi->number_entry ++;
-    zi->in_opened_file_inzip = 0;
-
-    return err;
-}
-
-extern int ZEXPORT zipCloseFileInZip (file)
-    zipFile file;
-{
-    return zipCloseFileInZipRaw (file,0,0);
-}
-
-extern int ZEXPORT zipClose (file, global_comment)
-    zipFile file;
-    const char* global_comment;
-{
-    zip_internal* zi;
-    int err = 0;
-    uLong size_centraldir = 0;
-    uLong centraldir_pos_inzip ;
-    uInt size_global_comment;
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 1)
-    {
-        err = zipCloseFileInZip (file);
-    }
-
-    if (global_comment==NULL)
-        size_global_comment = 0;
-    else
-        size_global_comment = strlen(global_comment);
-
-
-    centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
-    if (err==ZIP_OK)
-    {
-        linkedlist_datablock_internal* ldi = zi->central_dir.first_block ;
-        while (ldi!=NULL)
-        {
-            if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))
-                if (ZWRITE(zi->z_filefunc,zi->filestream,
-                           ldi->data,ldi->filled_in_this_block)
-                              !=ldi->filled_in_this_block )
-                    err = ZIP_ERRNO;
-
-            size_centraldir += ldi->filled_in_this_block;
-            ldi = ldi->next_datablock;
-        }
-    }
-    free_datablock(zi->central_dir.first_block);
-
-    if (err==ZIP_OK) /* Magic End */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
-
-    if (err==ZIP_OK) /* number of this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* number of the disk with the start of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
-
-    if (err==ZIP_OK) /* total number of entries in the central dir */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
-
-    if (err==ZIP_OK) /* size of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
-
-    if (err==ZIP_OK) /* offset of start of central directory with respect to the
-                            starting disk number */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,
-                                (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);
-
-    if (err==ZIP_OK) /* zipfile comment length */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
-
-    if ((err==ZIP_OK) && (size_global_comment>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,
-                   global_comment,size_global_comment) != size_global_comment)
-                err = ZIP_ERRNO;
-
-    if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0)
-        if (err == ZIP_OK)
-            err = ZIP_ERRNO;
-
-    TRYFREE(zi);
-
-    return err;
-}
diff --git a/tkimg1.3/libz/contrib/minizip/zip.h b/tkimg1.3/libz/contrib/minizip/zip.h
deleted file mode 100644
index c37ea21..0000000
--- a/tkimg1.3/libz/contrib/minizip/zip.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/* zip.h -- IO for compress .zip files using zlib
-   Version 1.00, September 10th, 2003
-
-   Copyright (C) 1998-2003 Gilles Vollant
-
-   This unzip package allow creates .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
-   Encryption and multi volume ZipFile (span) are not supported.
-   Old compressions used by old PKZip 1.x are not supported
-
-  For uncompress .zip file, look at unzip.h
-
-
-   I WAIT FEEDBACK at mail info at winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.html for evolution
-
-   Condition of use and distribution are the same than zlib :
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-
-*/
-
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _zip_H
-#define _zip_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
-    from (void*) without cast */
-typedef struct TagzipFile__ { int unused; } zipFile__;
-typedef zipFile__ *zipFile;
-#else
-typedef voidp zipFile;
-#endif
-
-#define ZIP_OK                          (0)
-#define ZIP_EOF                         (0)
-#define ZIP_ERRNO                       (Z_ERRNO)
-#define ZIP_PARAMERROR                  (-102)
-#define ZIP_BADZIPFILE                  (-103)
-#define ZIP_INTERNALERROR               (-104)
-
-#ifndef DEF_MEM_LEVEL
-#  if MAX_MEM_LEVEL >= 8
-#    define DEF_MEM_LEVEL 8
-#  else
-#    define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#  endif
-#endif
-/* default memLevel */
-
-/* tm_zip contain date/time info */
-typedef struct tm_zip_s
-{
-    uInt tm_sec;            /* seconds after the minute - [0,59] */
-    uInt tm_min;            /* minutes after the hour - [0,59] */
-    uInt tm_hour;           /* hours since midnight - [0,23] */
-    uInt tm_mday;           /* day of the month - [1,31] */
-    uInt tm_mon;            /* months since January - [0,11] */
-    uInt tm_year;           /* years - [1980..2044] */
-} tm_zip;
-
-typedef struct
-{
-    tm_zip      tmz_date;       /* date in understandable format           */
-    uLong       dosDate;       /* if dos_date == 0, tmu_date is used      */
-/*    uLong       flag;        */   /* general purpose bit flag        2 bytes */
-
-    uLong       internal_fa;    /* internal file attributes        2 bytes */
-    uLong       external_fa;    /* external file attributes        4 bytes */
-} zip_fileinfo;
-
-typedef const char* zipcharpc;
-
-
-#define APPEND_STATUS_CREATE        (0)
-#define APPEND_STATUS_CREATEAFTER   (1)
-#define APPEND_STATUS_ADDINZIP      (2)
-
-extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
-/*
-  Create a zipfile.
-     pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
-       an Unix computer "zlib/zlib113.zip".
-     if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
-       will be created at the end of the file.
-         (useful if the file contain a self extractor code)
-     if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
-       add files in existing zip (be sure you don't add file that doesn't exist)
-     If the zipfile cannot be opened, the return value is NULL.
-     Else, the return value is a zipFile Handle, usable with other function
-       of this zip package.
-*/
-
-/* Note : there is no delete function into a zipfile.
-   If you want delete file into a zipfile, you must open a zipfile, and create another
-   Of couse, you can use RAW reading and writing to copy the file you did not want delte
-*/
-
-extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
-                                   int append,
-                                   zipcharpc* globalcomment,
-                                   zlib_filefunc_def* pzlib_filefunc_def));
-
-extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
-                       const char* filename,
-                       const zip_fileinfo* zipfi,
-                       const void* extrafield_local,
-                       uInt size_extrafield_local,
-                       const void* extrafield_global,
-                       uInt size_extrafield_global,
-                       const char* comment,
-                       int method,
-                       int level));
-/*
-  Open a file in the ZIP for writing.
-  filename : the filename in zip (if NULL, '-' without quote will be used
-  *zipfi contain supplemental information
-  if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
-    contains the extrafield data the the local header
-  if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
-    contains the extrafield data the the local header
-  if comment != NULL, comment contain the comment string
-  method contain the compression method (0 for store, Z_DEFLATED for deflate)
-  level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
-*/
-
-
-extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
-                                            const char* filename,
-                                            const zip_fileinfo* zipfi,
-                                            const void* extrafield_local,
-                                            uInt size_extrafield_local,
-                                            const void* extrafield_global,
-                                            uInt size_extrafield_global,
-                                            const char* comment,
-                                            int method,
-                                            int level,
-                                            int raw));
-
-/*
-  Same than zipOpenNewFileInZip, except if raw=1, we write raw file
- */
-
-extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
-                                            const char* filename,
-                                            const zip_fileinfo* zipfi,
-                                            const void* extrafield_local,
-                                            uInt size_extrafield_local,
-                                            const void* extrafield_global,
-                                            uInt size_extrafield_global,
-                                            const char* comment,
-                                            int method,
-                                            int level,
-                                            int raw,
-                                            int windowBits,
-                                            int memLevel,
-                                            int strategy,
-                                            const char* password,
-                                            uLong crcForCtypting));
-
-/*
-  Same than zipOpenNewFileInZip2, except
-    windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
-    password : crypting password (NULL for no crypting)
-    crcForCtypting : crc of file to compress (needed for crypting)
- */
-
-
-extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
-                       const void* buf,
-                       unsigned len));
-/*
-  Write data in the zipfile
-*/
-
-extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
-/*
-  Close the current file in the zipfile
-*/
-
-
-extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
-                                            uLong uncompressed_size,
-                                            uLong crc32));
-/*
-  Close the current file in the zipfile, for fiel opened with
-    parameter raw=1 in zipOpenNewFileInZip2
-  uncompressed_size and crc32 are value for the uncompressed size
-*/
-
-extern int ZEXPORT zipClose OF((zipFile file,
-                const char* global_comment));
-/*
-  Close the zipfile
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _zip_H */
diff --git a/tkimg1.3/libz/contrib/pascal/example.pas b/tkimg1.3/libz/contrib/pascal/example.pas
deleted file mode 100644
index 5518b36..0000000
--- a/tkimg1.3/libz/contrib/pascal/example.pas
+++ /dev/null
@@ -1,599 +0,0 @@
-(* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Pascal translation
- * Copyright (C) 1998 by Jacques Nomssi Nzali.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *
- * Adaptation to the zlibpas interface
- * Copyright (C) 2003 by Cosmin Truta.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *)
-
-program example;
-
-{$DEFINE TEST_COMPRESS}
-{DO NOT $DEFINE TEST_GZIO}
-{$DEFINE TEST_DEFLATE}
-{$DEFINE TEST_INFLATE}
-{$DEFINE TEST_FLUSH}
-{$DEFINE TEST_SYNC}
-{$DEFINE TEST_DICT}
-
-uses SysUtils, zlibpas;
-
-const TESTFILE = 'foo.gz';
-
-(* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- *)
-const hello: PChar = 'hello, hello!';
-
-const dictionary: PChar = 'hello';
-
-var dictId: LongInt; (* Adler32 value of the dictionary *)
-
-procedure CHECK_ERR(err: Integer; msg: String);
-begin
-  if err <> Z_OK then
-  begin
-    WriteLn(msg, ' error: ', err);
-    Halt(1);
-  end;
-end;
-
-procedure EXIT_ERR(const msg: String);
-begin
-  WriteLn('Error: ', msg);
-  Halt(1);
-end;
-
-(* ===========================================================================
- * Test compress and uncompress
- *)
-{$IFDEF TEST_COMPRESS}
-procedure test_compress(compr: Pointer; comprLen: LongInt;
-                        uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    len: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  err := compress(compr, comprLen, hello, len);
-  CHECK_ERR(err, 'compress');
-
-  StrCopy(PChar(uncompr), 'garbage');
-
-  err := uncompress(uncompr, uncomprLen, compr, comprLen);
-  CHECK_ERR(err, 'uncompress');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad uncompress')
-  else
-    WriteLn('uncompress(): ', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test read/write of .gz files
- *)
-{$IFDEF TEST_GZIO}
-procedure test_gzio(const fname: PChar; (* compressed file name *)
-                    uncompr: Pointer;
-                    uncomprLen: LongInt);
-var err: Integer;
-    len: Integer;
-    zfile: gzFile;
-    pos: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  zfile := gzopen(fname, 'wb');
-  if zfile = NIL then
-  begin
-    WriteLn('gzopen error');
-    Halt(1);
-  end;
-  gzputc(zfile, 'h');
-  if gzputs(zfile, 'ello') <> 4 then
-  begin
-    WriteLn('gzputs err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$IFDEF GZ_FORMAT_STRING}
-  if gzprintf(zfile, ', %s!', 'hello') <> 8 then
-  begin
-    WriteLn('gzprintf err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$ELSE}
-  if gzputs(zfile, ', hello!') <> 8 then
-  begin
-    WriteLn('gzputs err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$ENDIF}
-  gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *)
-  gzclose(zfile);
-
-  zfile := gzopen(fname, 'rb');
-  if zfile = NIL then
-  begin
-    WriteLn('gzopen error');
-    Halt(1);
-  end;
-
-  StrCopy(PChar(uncompr), 'garbage');
-
-  if gzread(zfile, uncompr, uncomprLen) <> len then
-  begin
-    WriteLn('gzread err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  if StrComp(PChar(uncompr), hello) <> 0 then
-  begin
-    WriteLn('bad gzread: ', PChar(uncompr));
-    Halt(1);
-  end
-  else
-    WriteLn('gzread(): ', PChar(uncompr));
-
-  pos := gzseek(zfile, -8, SEEK_CUR);
-  if (pos <> 6) or (gztell(zfile) <> pos) then
-  begin
-    WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile));
-    Halt(1);
-  end;
-
-  if gzgetc(zfile) <> ' ' then
-  begin
-    WriteLn('gzgetc error');
-    Halt(1);
-  end;
-
-  if gzungetc(' ', zfile) <> ' ' then
-  begin
-    WriteLn('gzungetc error');
-    Halt(1);
-  end;
-
-  gzgets(zfile, PChar(uncompr), uncomprLen);
-  uncomprLen := StrLen(PChar(uncompr));
-  if uncomprLen <> 7 then (* " hello!" *)
-  begin
-    WriteLn('gzgets err after gzseek: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  if StrComp(PChar(uncompr), hello + 6) <> 0 then
-  begin
-    WriteLn('bad gzgets after gzseek');
-    Halt(1);
-  end
-  else
-    WriteLn('gzgets() after gzseek: ', PChar(uncompr));
-
-  gzclose(zfile);
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with small buffers
- *)
-{$IFDEF TEST_DEFLATE}
-procedure test_deflate(compr: Pointer; comprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-    len: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_in := hello;
-  c_stream.next_out := compr;
-
-  while (c_stream.total_in <> len) and
-        (c_stream.total_out < comprLen) do
-  begin
-    c_stream.avail_out := 1; { force small buffers }
-    c_stream.avail_in := 1;
-    err := deflate(c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, 'deflate');
-  end;
-
-  (* Finish the stream, still forcing small buffers: *)
-  while TRUE do
-  begin
-    c_stream.avail_out := 1;
-    err := deflate(c_stream, Z_FINISH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'deflate');
-  end;
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with small buffers
- *)
-{$IFDEF TEST_INFLATE}
-procedure test_inflate(compr: Pointer; comprLen : LongInt;
-                       uncompr: Pointer; uncomprLen : LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := 0;
-  d_stream.next_out := uncompr;
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  while (d_stream.total_out < uncomprLen) and
-        (d_stream.total_in < comprLen) do
-  begin
-    d_stream.avail_out := 1; (* force small buffers *)
-    d_stream.avail_in := 1;
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'inflate');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad inflate')
-  else
-    WriteLn('inflate(): ', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with large buffers and dynamic change of compression level
- *)
-{$IFDEF TEST_DEFLATE}
-procedure test_large_deflate(compr: Pointer; comprLen: LongInt;
-                             uncompr: Pointer; uncomprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-begin
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_BEST_SPEED);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_out := compr;
-  c_stream.avail_out := Integer(comprLen);
-
-  (* At this point, uncompr is still mostly zeroes, so it should compress
-   * very well:
-   *)
-  c_stream.next_in := uncompr;
-  c_stream.avail_in := Integer(uncomprLen);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-  if c_stream.avail_in <> 0 then
-    EXIT_ERR('deflate not greedy');
-
-  (* Feed in already compressed data and switch to no compression: *)
-  deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-  c_stream.next_in := compr;
-  c_stream.avail_in := Integer(comprLen div 2);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  (* Switch back to compressing mode: *)
-  deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-  c_stream.next_in := uncompr;
-  c_stream.avail_in := Integer(uncomprLen);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    EXIT_ERR('deflate should report Z_STREAM_END');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with large buffers
- *)
-{$IFDEF TEST_INFLATE}
-procedure test_large_inflate(compr: Pointer; comprLen: LongInt;
-                             uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := Integer(comprLen);
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  while TRUE do
-  begin
-    d_stream.next_out := uncompr;            (* discard the output *)
-    d_stream.avail_out := Integer(uncomprLen);
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'large inflate');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then
-  begin
-    WriteLn('bad large inflate: ', d_stream.total_out);
-    Halt(1);
-  end
-  else
-    WriteLn('large_inflate(): OK');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with full flush
- *)
-{$IFDEF TEST_FLUSH}
-procedure test_flush(compr: Pointer; var comprLen : LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-    len: Integer;
-begin
-  len := StrLen(hello)+1;
-
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_in := hello;
-  c_stream.next_out := compr;
-  c_stream.avail_in := 3;
-  c_stream.avail_out := Integer(comprLen);
-  err := deflate(c_stream, Z_FULL_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *)
-  c_stream.avail_in := len - 3;
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    CHECK_ERR(err, 'deflate');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-
-  comprLen := c_stream.total_out;
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflateSync()
- *)
-{$IFDEF TEST_SYNC}
-procedure test_sync(compr: Pointer; comprLen: LongInt;
-                    uncompr: Pointer; uncomprLen : LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := 2; (* just read the zlib header *)
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  d_stream.next_out := uncompr;
-  d_stream.avail_out := Integer(uncomprLen);
-
-  inflate(d_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'inflate');
-
-  d_stream.avail_in := Integer(comprLen-2);   (* read all compressed data *)
-  err := inflateSync(d_stream);               (* but skip the damaged part *)
-  CHECK_ERR(err, 'inflateSync');
-
-  err := inflate(d_stream, Z_FINISH);
-  if err <> Z_DATA_ERROR then
-    EXIT_ERR('inflate should report DATA_ERROR');
-    (* Because of incorrect adler32 *)
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  WriteLn('after inflateSync(): hel', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with preset dictionary
- *)
-{$IFDEF TEST_DICT}
-procedure test_dict_deflate(compr: Pointer; comprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-begin
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_BEST_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary));
-  CHECK_ERR(err, 'deflateSetDictionary');
-
-  dictId := c_stream.adler;
-  c_stream.next_out := compr;
-  c_stream.avail_out := Integer(comprLen);
-
-  c_stream.next_in := hello;
-  c_stream.avail_in := StrLen(hello)+1;
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    EXIT_ERR('deflate should report Z_STREAM_END');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with a preset dictionary
- *)
-{$IFDEF TEST_DICT}
-procedure test_dict_inflate(compr: Pointer; comprLen: LongInt;
-                            uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := Integer(comprLen);
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  d_stream.next_out := uncompr;
-  d_stream.avail_out := Integer(uncomprLen);
-
-  while TRUE do
-  begin
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    if err = Z_NEED_DICT then
-    begin
-      if d_stream.adler <> dictId then
-        EXIT_ERR('unexpected dictionary');
-      err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary));
-    end;
-    CHECK_ERR(err, 'inflate with dict');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad inflate with dict')
-  else
-    WriteLn('inflate with dictionary: ', PChar(uncompr));
-end;
-{$ENDIF}
-
-var compr, uncompr: Pointer;
-    comprLen, uncomprLen: LongInt;
-
-begin
-  if zlibVersion^ <> ZLIB_VERSION[1] then
-    EXIT_ERR('Incompatible zlib version');
-
-  WriteLn('zlib version: ', zlibVersion);
-  WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags]));
-
-  comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *)
-  uncomprLen := comprLen;
-  GetMem(compr, comprLen);
-  GetMem(uncompr, uncomprLen);
-  if (compr = NIL) or (uncompr = NIL) then
-    EXIT_ERR('Out of memory');
-  (* compr and uncompr are cleared to avoid reading uninitialized
-   * data and to ensure that uncompr compresses well.
-   *)
-  FillChar(compr^, comprLen, 0);
-  FillChar(uncompr^, uncomprLen, 0);
-
-  {$IFDEF TEST_COMPRESS}
-  WriteLn('** Testing compress');
-  test_compress(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_GZIO}
-  WriteLn('** Testing gzio');
-  if ParamCount >= 1 then
-    test_gzio(ParamStr(1), uncompr, uncomprLen)
-  else
-    test_gzio(TESTFILE, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_DEFLATE}
-  WriteLn('** Testing deflate with small buffers');
-  test_deflate(compr, comprLen);
-  {$ENDIF}
-  {$IFDEF TEST_INFLATE}
-  WriteLn('** Testing inflate with small buffers');
-  test_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_DEFLATE}
-  WriteLn('** Testing deflate with large buffers');
-  test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-  {$IFDEF TEST_INFLATE}
-  WriteLn('** Testing inflate with large buffers');
-  test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_FLUSH}
-  WriteLn('** Testing deflate with full flush');
-  test_flush(compr, comprLen);
-  {$ENDIF}
-  {$IFDEF TEST_SYNC}
-  WriteLn('** Testing inflateSync');
-  test_sync(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-  comprLen := uncomprLen;
-
-  {$IFDEF TEST_DICT}
-  WriteLn('** Testing deflate and inflate with preset dictionary');
-  test_dict_deflate(compr, comprLen);
-  test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  FreeMem(compr, comprLen);
-  FreeMem(uncompr, uncomprLen);
-end.
diff --git a/tkimg1.3/libz/contrib/pascal/readme.txt b/tkimg1.3/libz/contrib/pascal/readme.txt
deleted file mode 100644
index 60e87c8..0000000
--- a/tkimg1.3/libz/contrib/pascal/readme.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-
-This directory contains a Pascal (Delphi, Kylix) interface to the
-zlib data compression library.
-
-
-Directory listing
-=================
-
-zlibd32.mak     makefile for Borland C++
-example.pas     usage example of zlib
-zlibpas.pas     the Pascal interface to zlib
-readme.txt      this file
-
-
-Compatibility notes
-===================
-
-- Although the name "zlib" would have been more normal for the
-  zlibpas unit, this name is already taken by Borland's ZLib unit.
-  This is somehow unfortunate, because that unit is not a genuine
-  interface to the full-fledged zlib functionality, but a suite of
-  class wrappers around zlib streams.  Other essential features,
-  such as checksums, are missing.
-  It would have been more appropriate for that unit to have a name
-  like "ZStreams", or something similar.
-
-- The C and zlib-supplied types int, uInt, long, uLong, etc. are
-  translated directly into Pascal types of similar sizes (Integer,
-  LongInt, etc.), to avoid namespace pollution.  In particular,
-  there is no conversion of unsigned int into a Pascal unsigned
-  integer.  The Word type is non-portable and has the same size
-  (16 bits) both in a 16-bit and in a 32-bit environment, unlike
-  Integer.  Even if there is a 32-bit Cardinal type, there is no
-  real need for unsigned int in zlib under a 32-bit environment.
-
-- Except for the callbacks, the zlib function interfaces are
-  assuming the calling convention normally used in Pascal
-  (__pascal for DOS and Windows16, __fastcall for Windows32).
-  Since the cdecl keyword is used, the old Turbo Pascal does
-  not work with this interface.
-
-- The gz* function interfaces are not translated, to avoid
-  interfacing problems with the C runtime library.  Besides,
-    gzprintf(gzFile file, const char *format, ...)
-  cannot be translated into Pascal.
-
-
-Legal issues
-============
-
-The zlibpas interface is:
-  Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler.
-  Copyright (C) 1998 by Bob Dellaca.
-  Copyright (C) 2003 by Cosmin Truta.
-
-The example program is:
-  Copyright (C) 1995-2003 by Jean-loup Gailly.
-  Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali.
-  Copyright (C) 2003 by Cosmin Truta.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
diff --git a/tkimg1.3/libz/contrib/pascal/zlibd32.mak b/tkimg1.3/libz/contrib/pascal/zlibd32.mak
deleted file mode 100644
index 88fafa0..0000000
--- a/tkimg1.3/libz/contrib/pascal/zlibd32.mak
+++ /dev/null
@@ -1,93 +0,0 @@
-# Makefile for zlib
-# For use with Delphi and C++ Builder under Win32
-# Updated for zlib 1.2.x by Cosmin Truta
-
-# ------------ Borland C++ ------------
-
-# This project uses the Delphi (fastcall/register) calling convention:
-LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
-
-CC = bcc32
-LD = bcc32
-AR = tlib
-# do not use "-pr" in CFLAGS
-CFLAGS = -a -d -k- -O2 $(LOC)
-LDFLAGS =
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
-
diff --git a/tkimg1.3/libz/contrib/pascal/zlibpas.pas b/tkimg1.3/libz/contrib/pascal/zlibpas.pas
deleted file mode 100644
index 6d5ebe0..0000000
--- a/tkimg1.3/libz/contrib/pascal/zlibpas.pas
+++ /dev/null
@@ -1,236 +0,0 @@
-(* zlibpas -- Pascal interface to the zlib data compression library
- *
- * Copyright (C) 2003 Cosmin Truta.
- * Derived from original sources by Bob Dellaca.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *)
-
-unit zlibpas;
-
-interface
-
-const
-  ZLIB_VERSION = '1.2.1';
-
-type
-  alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
-                 cdecl;
-  free_func  = procedure(opaque, address: Pointer);
-                 cdecl;
-
-  in_func    = function(opaque: Pointer; var buf: PByte): Integer;
-                 cdecl;
-  out_func   = function(opaque: Pointer; buf: PByte; size: Integer): Integer;
-                 cdecl;
-
-  z_streamp = ^z_stream;
-  z_stream = packed record
-    next_in: PChar;       (* next input byte *)
-    avail_in: Integer;    (* number of bytes available at next_in *)
-    total_in: LongInt;    (* total nb of input bytes read so far *)
-
-    next_out: PChar;      (* next output byte should be put there *)
-    avail_out: Integer;   (* remaining free space at next_out *)
-    total_out: LongInt;   (* total nb of bytes output so far *)
-
-    msg: PChar;           (* last error message, NULL if no error *)
-    state: Pointer;       (* not visible by applications *)
-
-    zalloc: alloc_func;   (* used to allocate the internal state *)
-    zfree: free_func;     (* used to free the internal state *)
-    opaque: Pointer;      (* private data object passed to zalloc and zfree *)
-
-    data_type: Integer;   (* best guess about the data type: ascii or binary *)
-    adler: LongInt;       (* adler32 value of the uncompressed data *)
-    reserved: LongInt;    (* reserved for future use *)
-  end;
-
-(* constants *)
-const
-  Z_NO_FLUSH      = 0;
-  Z_PARTIAL_FLUSH = 1;
-  Z_SYNC_FLUSH    = 2;
-  Z_FULL_FLUSH    = 3;
-  Z_FINISH        = 4;
-
-  Z_OK            =  0;
-  Z_STREAM_END    =  1;
-  Z_NEED_DICT     =  2;
-  Z_ERRNO         = -1;
-  Z_STREAM_ERROR  = -2;
-  Z_DATA_ERROR    = -3;
-  Z_MEM_ERROR     = -4;
-  Z_BUF_ERROR     = -5;
-  Z_VERSION_ERROR = -6;
-
-  Z_NO_COMPRESSION       =  0;
-  Z_BEST_SPEED           =  1;
-  Z_BEST_COMPRESSION     =  9;
-  Z_DEFAULT_COMPRESSION  = -1;
-
-  Z_FILTERED            = 1;
-  Z_HUFFMAN_ONLY        = 2;
-  Z_RLE                 = 3;
-  Z_DEFAULT_STRATEGY    = 0;
-
-  Z_BINARY   = 0;
-  Z_ASCII    = 1;
-  Z_UNKNOWN  = 2;
-
-  Z_DEFLATED = 8;
-
-(* basic functions *)
-function zlibVersion: PChar;
-function deflateInit(var strm: z_stream; level: Integer): Integer;
-function deflate(var strm: z_stream; flush: Integer): Integer;
-function deflateEnd(var strm: z_stream): Integer;
-function inflateInit(var strm: z_stream): Integer;
-function inflate(var strm: z_stream; flush: Integer): Integer;
-function inflateEnd(var strm: z_stream): Integer;
-
-(* advanced functions *)
-function deflateInit2(var strm: z_stream; level, method, windowBits,
-                      memLevel, strategy: Integer): Integer;
-function deflateSetDictionary(var strm: z_stream; const dictionary: PChar;
-                              dictLength: Integer): Integer;
-function deflateCopy(var dest, source: z_stream): Integer;
-function deflateReset(var strm: z_stream): Integer;
-function deflateParams(var strm: z_stream; level, strategy: Integer): Integer;
-function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt;
-function deflatePrime(var strm: z_stream; bits, value: Integer): Integer;
-function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
-function inflateSetDictionary(var strm: z_stream; const dictionary: PChar;
-                              dictLength: Integer): Integer;
-function inflateSync(var strm: z_stream): Integer;
-function inflateCopy(var dest, source: z_stream): Integer;
-function inflateReset(var strm: z_stream): Integer;
-function inflateBackInit(var strm: z_stream;
-                         windowBits: Integer; window: PChar): Integer;
-function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer;
-                     out_fn: out_func; out_desc: Pointer): Integer;
-function inflateBackEnd(var strm: z_stream): Integer;
-function zlibCompileFlags: LongInt;
-
-(* utility functions *)
-function compress(dest: PChar; var destLen: LongInt;
-                  const source: PChar; sourceLen: LongInt): Integer;
-function compress2(dest: PChar; var destLen: LongInt;
-                  const source: PChar; sourceLen: LongInt;
-                  level: Integer): Integer;
-function compressBound(sourceLen: LongInt): LongInt;
-function uncompress(dest: PChar; var destLen: LongInt;
-                    const source: PChar; sourceLen: LongInt): Integer;
-
-(* checksum functions *)
-function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt;
-function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt;
-
-(* various hacks, don't look :) *)
-function deflateInit_(var strm: z_stream; level: Integer;
-                      const version: PChar; stream_size: Integer): Integer;
-function inflateInit_(var strm: z_stream; const version: PChar;
-                      stream_size: Integer): Integer;
-function deflateInit2_(var strm: z_stream;
-                       level, method, windowBits, memLevel, strategy: Integer;
-                       const version: PChar; stream_size: Integer): Integer;
-function inflateInit2_(var strm: z_stream; windowBits: Integer;
-                       const version: PChar; stream_size: Integer): Integer;
-function inflateBackInit_(var strm: z_stream;
-                          windowBits: Integer; window: PChar;
-                          const version: PChar; stream_size: Integer): Integer;
-
-
-implementation
-
-{$L adler32.obj}
-{$L compress.obj}
-{$L crc32.obj}
-{$L deflate.obj}
-{$L infback.obj}
-{$L inffast.obj}
-{$L inflate.obj}
-{$L inftrees.obj}
-{$L trees.obj}
-{$L uncompr.obj}
-{$L zutil.obj}
-
-function adler32; external;
-function compress; external;
-function compress2; external;
-function compressBound; external;
-function crc32; external;
-function deflate; external;
-function deflateBound; external;
-function deflateCopy; external;
-function deflateEnd; external;
-function deflateInit_; external;
-function deflateInit2_; external;
-function deflateParams; external;
-function deflatePrime; external;
-function deflateReset; external;
-function deflateSetDictionary; external;
-function inflate; external;
-function inflateBack; external;
-function inflateBackEnd; external;
-function inflateBackInit_; external;
-function inflateCopy; external;
-function inflateEnd; external;
-function inflateInit_; external;
-function inflateInit2_; external;
-function inflateReset; external;
-function inflateSetDictionary; external;
-function inflateSync; external;
-function uncompress; external;
-function zlibCompileFlags; external;
-function zlibVersion; external;
-
-function deflateInit(var strm: z_stream; level: Integer): Integer;
-begin
-  Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel,
-                      strategy: Integer): Integer;
-begin
-  Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                          ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateInit(var strm: z_stream): Integer;
-begin
-  Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
-begin
-  Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateBackInit(var strm: z_stream;
-                         windowBits: Integer; window: PChar): Integer;
-begin
-  Result := inflateBackInit_(strm, windowBits, window,
-                             ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function _malloc(Size: Integer): Pointer; cdecl;
-begin
-  GetMem(Result, Size);
-end;
-
-procedure _free(Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
-begin
-  FillChar(P^, count, B);
-end;
-
-procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
-begin
-  Move(source^, dest^, count);
-end;
-
-end.
diff --git a/tkimg1.3/libz/contrib/puff/Makefile b/tkimg1.3/libz/contrib/puff/Makefile
deleted file mode 100644
index b6b6940..0000000
--- a/tkimg1.3/libz/contrib/puff/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-puff: puff.c puff.h
-	cc -DTEST -o puff puff.c
-
-test: puff
-	puff zeros.raw
-
-clean:
-	rm -f puff puff.o
diff --git a/tkimg1.3/libz/contrib/puff/README b/tkimg1.3/libz/contrib/puff/README
deleted file mode 100644
index bbc4cb5..0000000
--- a/tkimg1.3/libz/contrib/puff/README
+++ /dev/null
@@ -1,63 +0,0 @@
-Puff -- A Simple Inflate
-3 Mar 2003
-Mark Adler
-madler at alumni.caltech.edu
-
-What this is --
-
-puff.c provides the routine puff() to decompress the deflate data format.  It
-does so more slowly than zlib, but the code is about one-fifth the size of the
-inflate code in zlib, and written to be very easy to read.
-
-Why I wrote this --
-
-puff.c was written to document the deflate format unambiguously, by virtue of
-being working C code.  It is meant to supplement RFC 1951, which formally
-describes the deflate format.  I have received many questions on details of the
-deflate format, and I hope that reading this code will answer those questions.
-puff.c is heavily commented with details of the deflate format, especially
-those little nooks and cranies of the format that might not be obvious from a
-specification.
-
-puff.c may also be useful in applications where code size or memory usage is a
-very limited resource, and speed is not as important.
-
-How to use it --
-
-Well, most likely you should just be reading puff.c and using zlib for actual
-applications, but if you must ...
-
-Include puff.h in your code, which provides this prototype:
-
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen);     /* amount of input available */
-
-Then you can call puff() to decompress a deflate stream that is in memory in
-its entirety at source, to a sufficiently sized block of memory for the
-decompressed data at dest.  puff() is the only external symbol in puff.c  The
-only C library functions that puff.c needs are setjmp() and longjmp(), which
-are used to simplify error checking in the code to improve readabilty.  puff.c
-does no memory allocation, and uses less than 2K bytes off of the stack.
-
-If destlen is not enough space for the uncompressed data, then inflate will
-return an error without writing more than destlen bytes.  Note that this means
-that in order to decompress the deflate data successfully, you need to know
-the size of the uncompressed data ahead of time.
-
-If needed, puff() can determine the size of the uncompressed data with no
-output space.  This is done by passing dest equal to (unsigned char *)0.  Then
-the initial value of *destlen is ignored and *destlen is set to the length of
-the uncompressed data.  So if the size of the uncompressed data is not known,
-then two passes of puff() can be used--first to determine the size, and second
-to do the actual inflation after allocating the appropriate memory.  Not
-pretty, but it works.  (This is one of the reasons you should be using zlib.)
-
-The deflate format is self-terminating.  If the deflate stream does not end
-in *sourcelen bytes, puff() will return an error without reading at or past
-endsource.
-
-On return, *sourcelen is updated to the amount of input data consumed, and
-*destlen is updated to the size of the uncompressed data.  See the comments
-in puff.c for the possible return codes for puff().
diff --git a/tkimg1.3/libz/contrib/puff/puff.c b/tkimg1.3/libz/contrib/puff/puff.c
deleted file mode 100644
index 7a8116b..0000000
--- a/tkimg1.3/libz/contrib/puff/puff.c
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- * puff.c
- * Copyright (C) 2002, 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in puff.h
- * version 1.7, 3 Mar 2003
- *
- * puff.c is a simple inflate written to be an unambiguous way to specify the
- * deflate format.  It is not written for speed but rather simplicity.  As a
- * side benefit, this code might actually be useful when small code is more
- * important than speed, such as bootstrap applications.  For typical deflate
- * data, zlib's inflate() is about four times as fast as puff().  zlib's
- * inflate compiles to around 20K on my machine, whereas puff.c compiles to
- * around 4K on my machine (a PowerPC using GNU cc).  If the faster decode()
- * function here is used, then puff() is only twice as slow as zlib's
- * inflate().
- *
- * All dynamically allocated memory comes from the stack.  The stack required
- * is less than 2K bytes.  This code is compatible with 16-bit int's and
- * assumes that long's are at least 32 bits.  puff.c uses the short data type,
- * assumed to be 16 bits, for arrays in order to to conserve memory.  The code
- * works whether integers are stored big endian or little endian.
- *
- * In the comments below are "Format notes" that describe the inflate process
- * and document some of the less obvious aspects of the format.  This source
- * code is meant to supplement RFC 1951, which formally describes the deflate
- * format:
- *
- *    http://www.zlib.org/rfc-deflate.html
- */
-
-/*
- * Change history:
- *
- * 1.0  10 Feb 2002     - First version
- * 1.1  17 Feb 2002     - Clarifications of some comments and notes
- *                      - Update puff() dest and source pointers on negative
- *                        errors to facilitate debugging deflators
- *                      - Remove longest from struct huffman -- not needed
- *                      - Simplify offs[] index in construct()
- *                      - Add input size and checking, using longjmp() to
- *                        maintain easy readability
- *                      - Use short data type for large arrays
- *                      - Use pointers instead of long to specify source and
- *                        destination sizes to avoid arbitrary 4 GB limits
- * 1.2  17 Mar 2002     - Add faster version of decode(), doubles speed (!),
- *                        but leave simple version for readabilty
- *                      - Make sure invalid distances detected if pointers
- *                        are 16 bits
- *                      - Fix fixed codes table error
- *                      - Provide a scanning mode for determining size of
- *                        uncompressed data
- * 1.3  20 Mar 2002     - Go back to lengths for puff() parameters [Jean-loup]
- *                      - Add a puff.h file for the interface
- *                      - Add braces in puff() for else do [Jean-loup]
- *                      - Use indexes instead of pointers for readability
- * 1.4  31 Mar 2002     - Simplify construct() code set check
- *                      - Fix some comments
- *                      - Add FIXLCODES #define
- * 1.5   6 Apr 2002     - Minor comment fixes
- * 1.6   7 Aug 2002     - Minor format changes
- * 1.7   3 Mar 2003     - Added test code for distribution
- *                      - Added zlib-like license
- */
-
-#include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
-#include "puff.h"               /* prototype for puff() */
-
-#define local static            /* for local function definitions */
-#define NIL ((unsigned char *)0)        /* for no output option */
-
-/*
- * Maximums for allocations and loops.  It is not useful to change these --
- * they are fixed by the deflate format.
- */
-#define MAXBITS 15              /* maximum bits in a code */
-#define MAXLCODES 286           /* maximum number of literal/length codes */
-#define MAXDCODES 30            /* maximum number of distance codes */
-#define MAXCODES (MAXLCODES+MAXDCODES)  /* maximum codes lengths to read */
-#define FIXLCODES 288           /* number of fixed literal/length codes */
-
-/* input and output state */
-struct state {
-    /* output state */
-    unsigned char *out;         /* output buffer */
-    unsigned long outlen;       /* available space at out */
-    unsigned long outcnt;       /* bytes written to out so far */
-
-    /* input state */
-    unsigned char *in;          /* input buffer */
-    unsigned long inlen;        /* available input at in */
-    unsigned long incnt;        /* bytes read so far */
-    int bitbuf;                 /* bit buffer */
-    int bitcnt;                 /* number of bits in bit buffer */
-
-    /* input limit error return state for bits() and decode() */
-    jmp_buf env;
-};
-
-/*
- * Return need bits from the input stream.  This always leaves less than
- * eight bits in the buffer.  bits() works properly for need == 0.
- *
- * Format notes:
- *
- * - Bits are stored in bytes from the least significant bit to the most
- *   significant bit.  Therefore bits are dropped from the bottom of the bit
- *   buffer, using shift right, and new bytes are appended to the top of the
- *   bit buffer, using shift left.
- */
-local int bits(struct state *s, int need)
-{
-    long val;           /* bit accumulator (can use up to 20 bits) */
-
-    /* load at least need bits into val */
-    val = s->bitbuf;
-    while (s->bitcnt < need) {
-        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
-        val |= (long)(s->in[s->incnt++]) << s->bitcnt;  /* load eight bits */
-        s->bitcnt += 8;
-    }
-
-    /* drop need bits and update buffer, always zero to seven bits left */
-    s->bitbuf = (int)(val >> need);
-    s->bitcnt -= need;
-
-    /* return need bits, zeroing the bits above that */
-    return (int)(val & ((1L << need) - 1));
-}
-
-/*
- * Process a stored block.
- *
- * Format notes:
- *
- * - After the two-bit stored block type (00), the stored block length and
- *   stored bytes are byte-aligned for fast copying.  Therefore any leftover
- *   bits in the byte that has the last bit of the type, as many as seven, are
- *   discarded.  The value of the discarded bits are not defined and should not
- *   be checked against any expectation.
- *
- * - The second inverted copy of the stored block length does not have to be
- *   checked, but it's probably a good idea to do so anyway.
- *
- * - A stored block can have zero length.  This is sometimes used to byte-align
- *   subsets of the compressed data for random access or partial recovery.
- */
-local int stored(struct state *s)
-{
-    unsigned len;       /* length of stored block */
-
-    /* discard leftover bits from current byte (assumes s->bitcnt < 8) */
-    s->bitbuf = 0;
-    s->bitcnt = 0;
-
-    /* get length and check against its one's complement */
-    if (s->incnt + 4 > s->inlen) return 2;      /* not enough input */
-    len = s->in[s->incnt++];
-    len |= s->in[s->incnt++] << 8;
-    if (s->in[s->incnt++] != (~len & 0xff) ||
-        s->in[s->incnt++] != ((~len >> 8) & 0xff))
-        return -2;                              /* didn't match complement! */
-
-    /* copy len bytes from in to out */
-    if (s->incnt + len > s->inlen) return 2;    /* not enough input */
-    if (s->out != NIL) {
-        if (s->outcnt + len > s->outlen)
-            return 1;                           /* not enough output space */
-        while (len--)
-            s->out[s->outcnt++] = s->in[s->incnt++];
-    }
-    else {                                      /* just scanning */
-        s->outcnt += len;
-        s->incnt += len;
-    }
-
-    /* done with a valid stored block */
-    return 0;
-}
-
-/*
- * Huffman code decoding tables.  count[1..MAXBITS] is the number of symbols of
- * each length, which for a canonical code are stepped through in order.
- * symbol[] are the symbol values in canonical order, where the number of
- * entries is the sum of the counts in count[].  The decoding process can be
- * seen in the function decode() below.
- */
-struct huffman {
-    short *count;       /* number of symbols of each length */
-    short *symbol;      /* canonically ordered symbols */
-};
-
-/*
- * Decode a code from the stream s using huffman table h.  Return the symbol or
- * a negative value if there is an error.  If all of the lengths are zero, i.e.
- * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
- *
- * Format notes:
- *
- * - The codes as stored in the compressed data are bit-reversed relative to
- *   a simple integer ordering of codes of the same lengths.  Hence below the
- *   bits are pulled from the compressed data one at a time and used to
- *   build the code value reversed from what is in the stream in order to
- *   permit simple integer comparisons for decoding.  A table-based decoding
- *   scheme (as used in zlib) does not need to do this reversal.
- *
- * - The first code for the shortest length is all zeros.  Subsequent codes of
- *   the same length are simply integer increments of the previous code.  When
- *   moving up a length, a zero bit is appended to the code.  For a complete
- *   code, the last code of the longest length will be all ones.
- *
- * - Incomplete codes are handled by this decoder, since they are permitted
- *   in the deflate format.  See the format notes for fixed() and dynamic().
- */
-#ifdef SLOW
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-
-    code = first = index = 0;
-    for (len = 1; len <= MAXBITS; len++) {
-        code |= bits(s, 1);             /* get next bit */
-        count = h->count[len];
-        if (code < first + count)       /* if length len, return symbol */
-            return h->symbol[index + (code - first)];
-        index += count;                 /* else update for next length */
-        first += count;
-        first <<= 1;
-        code <<= 1;
-    }
-    return -9;                          /* ran out of codes */
-}
-
-/*
- * A faster version of decode() for real applications of this code.   It's not
- * as readable, but it makes puff() twice as fast.  And it only makes the code
- * a few percent larger.
- */
-#else /* !SLOW */
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-    int bitbuf;         /* bits from stream */
-    int left;           /* bits left in next or left to process */
-    short *next;        /* next number of codes */
-
-    bitbuf = s->bitbuf;
-    left = s->bitcnt;
-    code = first = index = 0;
-    len = 1;
-    next = h->count + 1;
-    while (1) {
-        while (left--) {
-            code |= bitbuf & 1;
-            bitbuf >>= 1;
-            count = *next++;
-            if (code < first + count) { /* if length len, return symbol */
-                s->bitbuf = bitbuf;
-                s->bitcnt = (s->bitcnt - len) & 7;
-                return h->symbol[index + (code - first)];
-            }
-            index += count;             /* else update for next length */
-            first += count;
-            first <<= 1;
-            code <<= 1;
-            len++;
-        }
-        left = (MAXBITS+1) - len;
-        if (left == 0) break;
-        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
-        bitbuf = s->in[s->incnt++];
-        if (left > 8) left = 8;
-    }
-    return -9;                          /* ran out of codes */
-}
-#endif /* SLOW */
-
-/*
- * Given the list of code lengths length[0..n-1] representing a canonical
- * Huffman code for n symbols, construct the tables required to decode those
- * codes.  Those tables are the number of codes of each length, and the symbols
- * sorted by length, retaining their original order within each length.  The
- * return value is zero for a complete code set, negative for an over-
- * subscribed code set, and positive for an incomplete code set.  The tables
- * can be used if the return value is zero or positive, but they cannot be used
- * if the return value is negative.  If the return value is zero, it is not
- * possible for decode() using that table to return an error--any stream of
- * enough bits will resolve to a symbol.  If the return value is positive, then
- * it is possible for decode() using that table to return an error for received
- * codes past the end of the incomplete lengths.
- *
- * Not used by decode(), but used for error checking, h->count[0] is the number
- * of the n symbols not in the code.  So n - h->count[0] is the number of
- * codes.  This is useful for checking for incomplete codes that have more than
- * one symbol, which is an error in a dynamic block.
- *
- * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS
- * This is assured by the construction of the length arrays in dynamic() and
- * fixed() and is not verified by construct().
- *
- * Format notes:
- *
- * - Permitted and expected examples of incomplete codes are one of the fixed
- *   codes and any code with a single symbol which in deflate is coded as one
- *   bit instead of zero bits.  See the format notes for fixed() and dynamic().
- *
- * - Within a given code length, the symbols are kept in ascending order for
- *   the code bits definition.
- */
-local int construct(struct huffman *h, short *length, int n)
-{
-    int symbol;         /* current symbol when stepping through length[] */
-    int len;            /* current length when stepping through h->count[] */
-    int left;           /* number of possible codes left of current length */
-    short offs[MAXBITS+1];      /* offsets in symbol table for each length */
-
-    /* count number of codes of each length */
-    for (len = 0; len <= MAXBITS; len++)
-        h->count[len] = 0;
-    for (symbol = 0; symbol < n; symbol++)
-        (h->count[length[symbol]])++;   /* assumes lengths are within bounds */
-    if (h->count[0] == n)               /* no codes! */
-        return 0;                       /* complete, but decode() will fail */
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;                           /* one possible code of zero length */
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;                     /* one more bit, double codes left */
-        left -= h->count[len];          /* deduct count from possible codes */
-        if (left < 0) return left;      /* over-subscribed--return negative */
-    }                                   /* left > 0 means incomplete */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + h->count[len];
-
-    /*
-     * put symbols in table sorted by length, by symbol order within each
-     * length
-     */
-    for (symbol = 0; symbol < n; symbol++)
-        if (length[symbol] != 0)
-            h->symbol[offs[length[symbol]]++] = symbol;
-
-    /* return zero for complete set, positive for incomplete set */
-    return left;
-}
-
-/*
- * Decode literal/length and distance codes until an end-of-block code.
- *
- * Format notes:
- *
- * - Compressed data that is after the block type if fixed or after the code
- *   description if dynamic is a combination of literals and length/distance
- *   pairs terminated by and end-of-block code.  Literals are simply Huffman
- *   coded bytes.  A length/distance pair is a coded length followed by a
- *   coded distance to represent a string that occurs earlier in the
- *   uncompressed data that occurs again at the current location.
- *
- * - Literals, lengths, and the end-of-block code are combined into a single
- *   code of up to 286 symbols.  They are 256 literals (0..255), 29 length
- *   symbols (257..285), and the end-of-block symbol (256).
- *
- * - There are 256 possible lengths (3..258), and so 29 symbols are not enough
- *   to represent all of those.  Lengths 3..10 and 258 are in fact represented
- *   by just a length symbol.  Lengths 11..257 are represented as a symbol and
- *   some number of extra bits that are added as an integer to the base length
- *   of the length symbol.  The number of extra bits is determined by the base
- *   length symbol.  These are in the static arrays below, lens[] for the base
- *   lengths and lext[] for the corresponding number of extra bits.
- *
- * - The reason that 258 gets its own symbol is that the longest length is used
- *   often in highly redundant files.  Note that 258 can also be coded as the
- *   base value 227 plus the maximum extra value of 31.  While a good deflate
- *   should never do this, it is not an error, and should be decoded properly.
- *
- * - If a length is decoded, including its extra bits if any, then it is
- *   followed a distance code.  There are up to 30 distance symbols.  Again
- *   there are many more possible distances (1..32768), so extra bits are added
- *   to a base value represented by the symbol.  The distances 1..4 get their
- *   own symbol, but the rest require extra bits.  The base distances and
- *   corresponding number of extra bits are below in the static arrays dist[]
- *   and dext[].
- *
- * - Literal bytes are simply written to the output.  A length/distance pair is
- *   an instruction to copy previously uncompressed bytes to the output.  The
- *   copy is from distance bytes back in the output stream, copying for length
- *   bytes.
- *
- * - Distances pointing before the beginning of the output data are not
- *   permitted.
- *
- * - Overlapped copies, where the length is greater than the distance, are
- *   allowed and common.  For example, a distance of one and a length of 258
- *   simply copies the last byte 258 times.  A distance of four and a length of
- *   twelve copies the last four bytes three times.  A simple forward copy
- *   ignoring whether the length is greater than the distance or not implements
- *   this correctly.  You should not use memcpy() since its behavior is not
- *   defined for overlapped arrays.  You should not use memmove() or bcopy()
- *   since though their behavior -is- defined for overlapping arrays, it is
- *   defined to do the wrong thing in this case.
- */
-local int codes(struct state *s,
-                struct huffman *lencode,
-                struct huffman *distcode)
-{
-    int symbol;         /* decoded symbol */
-    int len;            /* length for copy */
-    unsigned dist;      /* distance for copy */
-    static const short lens[29] = { /* Size base for length codes 257..285 */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258};
-    static const short lext[29] = { /* Extra bits for length codes 257..285 */
-        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
-        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
-    static const short dists[30] = { /* Offset base for distance codes 0..29 */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577};
-    static const short dext[30] = { /* Extra bits for distance codes 0..29 */
-        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
-        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
-        12, 12, 13, 13};
-
-    /* decode literals and length/distance pairs */
-    do {
-        symbol = decode(s, lencode);
-        if (symbol < 0) return symbol;  /* invalid symbol */
-        if (symbol < 256) {             /* literal: symbol is the byte */
-            /* write out the literal */
-            if (s->out != NIL) {
-                if (s->outcnt == s->outlen) return 1;
-                s->out[s->outcnt] = symbol;
-            }
-            s->outcnt++;
-        }
-        else if (symbol > 256) {        /* length */
-            /* get and compute length */
-            symbol -= 257;
-            if (symbol >= 29) return -9;        /* invalid fixed code */
-            len = lens[symbol] + bits(s, lext[symbol]);
-
-            /* get and check distance */
-            symbol = decode(s, distcode);
-            if (symbol < 0) return symbol;      /* invalid symbol */
-            dist = dists[symbol] + bits(s, dext[symbol]);
-            if (dist > s->outcnt)
-                return -10;     /* distance too far back */
-
-            /* copy length bytes from distance bytes back */
-            if (s->out != NIL) {
-                if (s->outcnt + len > s->outlen) return 1;
-                while (len--) {
-                    s->out[s->outcnt] = s->out[s->outcnt - dist];
-                    s->outcnt++;
-                }
-            }
-            else
-                s->outcnt += len;
-        }
-    } while (symbol != 256);            /* end of block symbol */
-
-    /* done with a valid fixed or dynamic block */
-    return 0;
-}
-
-/*
- * Process a fixed codes block.
- *
- * Format notes:
- *
- * - This block type can be useful for compressing small amounts of data for
- *   which the size of the code descriptions in a dynamic block exceeds the
- *   benefit of custom codes for that block.  For fixed codes, no bits are
- *   spent on code descriptions.  Instead the code lengths for literal/length
- *   codes and distance codes are fixed.  The specific lengths for each symbol
- *   can be seen in the "for" loops below.
- *
- * - The literal/length code is complete, but has two symbols that are invalid
- *   and should result in an error if received.  This cannot be implemented
- *   simply as an incomplete code since those two symbols are in the "middle"
- *   of the code.  They are eight bits long and the longest literal/length\
- *   code is nine bits.  Therefore the code must be constructed with those
- *   symbols, and the invalid symbols must be detected after decoding.
- *
- * - The fixed distance codes also have two invalid symbols that should result
- *   in an error if received.  Since all of the distance codes are the same
- *   length, this can be implemented as an incomplete code.  Then the invalid
- *   codes are detected while decoding.
- */
-local int fixed(struct state *s)
-{
-    static int virgin = 1;
-    static short lencnt[MAXBITS+1], lensym[FIXLCODES];
-    static short distcnt[MAXBITS+1], distsym[MAXDCODES];
-    static struct huffman lencode = {lencnt, lensym};
-    static struct huffman distcode = {distcnt, distsym};
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        int symbol;
-        short lengths[FIXLCODES];
-
-        /* literal/length table */
-        for (symbol = 0; symbol < 144; symbol++)
-            lengths[symbol] = 8;
-        for (; symbol < 256; symbol++)
-            lengths[symbol] = 9;
-        for (; symbol < 280; symbol++)
-            lengths[symbol] = 7;
-        for (; symbol < FIXLCODES; symbol++)
-            lengths[symbol] = 8;
-        construct(&lencode, lengths, FIXLCODES);
-
-        /* distance table */
-        for (symbol = 0; symbol < MAXDCODES; symbol++)
-            lengths[symbol] = 5;
-        construct(&distcode, lengths, MAXDCODES);
-
-        /* do this just once */
-        virgin = 0;
-    }
-
-    /* decode data until end-of-block code */
-    return codes(s, &lencode, &distcode);
-}
-
-/*
- * Process a dynamic codes block.
- *
- * Format notes:
- *
- * - A dynamic block starts with a description of the literal/length and
- *   distance codes for that block.  New dynamic blocks allow the compressor to
- *   rapidly adapt to changing data with new codes optimized for that data.
- *
- * - The codes used by the deflate format are "canonical", which means that
- *   the actual bits of the codes are generated in an unambiguous way simply
- *   from the number of bits in each code.  Therefore the code descriptions
- *   are simply a list of code lengths for each symbol.
- *
- * - The code lengths are stored in order for the symbols, so lengths are
- *   provided for each of the literal/length symbols, and for each of the
- *   distance symbols.
- *
- * - If a symbol is not used in the block, this is represented by a zero as
- *   as the code length.  This does not mean a zero-length code, but rather
- *   that no code should be created for this symbol.  There is no way in the
- *   deflate format to represent a zero-length code.
- *
- * - The maximum number of bits in a code is 15, so the possible lengths for
- *   any code are 1..15.
- *
- * - The fact that a length of zero is not permitted for a code has an
- *   interesting consequence.  Normally if only one symbol is used for a given
- *   code, then in fact that code could be represented with zero bits.  However
- *   in deflate, that code has to be at least one bit.  So for example, if
- *   only a single distance base symbol appears in a block, then it will be
- *   represented by a single code of length one, in particular one 0 bit.  This
- *   is an incomplete code, since if a 1 bit is received, it has no meaning,
- *   and should result in an error.  So incomplete distance codes of one symbol
- *   should be permitted, and the receipt of invalid codes should be handled.
- *
- * - It is also possible to have a single literal/length code, but that code
- *   must be the end-of-block code, since every dynamic block has one.  This
- *   is not the most efficient way to create an empty block (an empty fixed
- *   block is fewer bits), but it is allowed by the format.  So incomplete
- *   literal/length codes of one symbol should also be permitted.
- *
- * - The list of up to 286 length/literal lengths and up to 30 distance lengths
- *   are themselves compressed using Huffman codes and run-length encoding.  In
- *   the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
- *   that length, and the symbols 16, 17, and 18 are run-length instructions.
- *   Each of 16, 17, and 18 are follwed by extra bits to define the length of
- *   the run.  16 copies the last length 3 to 6 times.  17 represents 3 to 10
- *   zero lengths, and 18 represents 11 to 138 zero lengths.  Unused symbols
- *   are common, hence the special coding for zero lengths.
- *
- * - The symbols for 0..18 are Huffman coded, and so that code must be
- *   described first.  This is simply a sequence of up to 19 three-bit values
- *   representing no code (0) or the code length for that symbol (1..7).
- *
- * - A dynamic block starts with three fixed-size counts from which is computed
- *   the number of literal/length code lengths, the number of distance code
- *   lengths, and the number of code length code lengths (ok, you come up with
- *   a better name!) in the code descriptions.  For the literal/length and
- *   distance codes, lengths after those provided are considered zero, i.e. no
- *   code.  The code length code lengths are received in a permuted order (see
- *   the order[] array below) to make a short code length code length list more
- *   likely.  As it turns out, very short and very long codes are less likely
- *   to be seen in a dynamic code description, hence what may appear initially
- *   to be a peculiar ordering.
- *
- * - Given the number of literal/length code lengths (nlen) and distance code
- *   lengths (ndist), then they are treated as one long list of nlen + ndist
- *   code lengths.  Therefore run-length coding can and often does cross the
- *   boundary between the two sets of lengths.
- *
- * - So to summarize, the code description at the start of a dynamic block is
- *   three counts for the number of code lengths for the literal/length codes,
- *   the distance codes, and the code length codes.  This is followed by the
- *   code length code lengths, three bits each.  This is used to construct the
- *   code length code which is used to read the remainder of the lengths.  Then
- *   the literal/length code lengths and distance lengths are read as a single
- *   set of lengths using the code length codes.  Codes are constructed from
- *   the resulting two sets of lengths, and then finally you can start
- *   decoding actual compressed data in the block.
- *
- * - For reference, a "typical" size for the code description in a dynamic
- *   block is around 80 bytes.
- */
-local int dynamic(struct state *s)
-{
-    int nlen, ndist, ncode;             /* number of lengths in descriptor */
-    int index;                          /* index of lengths[] */
-    int err;                            /* construct() return value */
-    short lengths[MAXCODES];            /* descriptor code lengths */
-    short lencnt[MAXBITS+1], lensym[MAXLCODES];         /* lencode memory */
-    short distcnt[MAXBITS+1], distsym[MAXDCODES];       /* distcode memory */
-    struct huffman lencode = {lencnt, lensym};          /* length code */
-    struct huffman distcode = {distcnt, distsym};       /* distance code */
-    static const short order[19] =      /* permutation of code length codes */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* get number of lengths in each table, check lengths */
-    nlen = bits(s, 5) + 257;
-    ndist = bits(s, 5) + 1;
-    ncode = bits(s, 4) + 4;
-    if (nlen > MAXLCODES || ndist > MAXDCODES)
-        return -3;                      /* bad counts */
-
-    /* read code length code lengths (really), missing lengths are zero */
-    for (index = 0; index < ncode; index++)
-        lengths[order[index]] = bits(s, 3);
-    for (; index < 19; index++)
-        lengths[order[index]] = 0;
-
-    /* build huffman table for code lengths codes (use lencode temporarily) */
-    err = construct(&lencode, lengths, 19);
-    if (err != 0) return -4;            /* require complete code set here */
-
-    /* read length/literal and distance code length tables */
-    index = 0;
-    while (index < nlen + ndist) {
-        int symbol;             /* decoded value */
-        int len;                /* last length to repeat */
-
-        symbol = decode(s, &lencode);
-        if (symbol < 16)                /* length in 0..15 */
-            lengths[index++] = symbol;
-        else {                          /* repeat instruction */
-            len = 0;                    /* assume repeating zeros */
-            if (symbol == 16) {         /* repeat last length 3..6 times */
-                if (index == 0) return -5;      /* no last length! */
-                len = lengths[index - 1];       /* last length */
-                symbol = 3 + bits(s, 2);
-            }
-            else if (symbol == 17)      /* repeat zero 3..10 times */
-                symbol = 3 + bits(s, 3);
-            else                        /* == 18, repeat zero 11..138 times */
-                symbol = 11 + bits(s, 7);
-            if (index + symbol > nlen + ndist)
-                return -6;              /* too many lengths! */
-            while (symbol--)            /* repeat last or zero symbol times */
-                lengths[index++] = len;
-        }
-    }
-
-    /* build huffman table for literal/length codes */
-    err = construct(&lencode, lengths, nlen);
-    if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1))
-        return -7;      /* only allow incomplete codes if just one code */
-
-    /* build huffman table for distance codes */
-    err = construct(&distcode, lengths + nlen, ndist);
-    if (err < 0 || (err > 0 && ndist - distcode.count[0] != 1))
-        return -8;      /* only allow incomplete codes if just one code */
-
-    /* decode data until end-of-block code */
-    return codes(s, &lencode, &distcode);
-}
-
-/*
- * Inflate source to dest.  On return, destlen and sourcelen are updated to the
- * size of the uncompressed data and the size of the deflate data respectively.
- * On success, the return value of puff() is zero.  If there is an error in the
- * source data, i.e. it is not in the deflate format, then a negative value is
- * returned.  If there is not enough input available or there is not enough
- * output space, then a positive error is returned.  In that case, destlen and
- * sourcelen are not updated to facilitate retrying from the beginning with the
- * provision of more input data or more output space.  In the case of invalid
- * inflate data (a negative error), the dest and source pointers are updated to
- * facilitate the debugging of deflators.
- *
- * puff() also has a mode to determine the size of the uncompressed output with
- * no output written.  For this dest must be (unsigned char *)0.  In this case,
- * the input value of *destlen is ignored, and on return *destlen is set to the
- * size of the uncompressed output.
- *
- * The return codes are:
- *
- *   2:  available inflate data did not terminate
- *   1:  output space exhausted before completing inflate
- *   0:  successful inflate
- *  -1:  invalid block type (type == 3)
- *  -2:  stored block length did not match one's complement
- *  -3:  dynamic block code description: too many length or distance codes
- *  -4:  dynamic block code description: code lengths codes incomplete
- *  -5:  dynamic block code description: repeat lengths with no first length
- *  -6:  dynamic block code description: repeat more than specified lengths
- *  -7:  dynamic block code description: invalid literal/length code lengths
- *  -8:  dynamic block code description: invalid distance code lengths
- *  -9:  invalid literal/length or distance code in fixed or dynamic block
- * -10:  distance is too far back in fixed or dynamic block
- *
- * Format notes:
- *
- * - Three bits are read for each block to determine the kind of block and
- *   whether or not it is the last block.  Then the block is decoded and the
- *   process repeated if it was not the last block.
- *
- * - The leftover bits in the last byte of the deflate data after the last
- *   block (if it was a fixed or dynamic block) are undefined and have no
- *   expected values to check.
- */
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen)      /* amount of input available */
-{
-    struct state s;             /* input/output state */
-    int last, type;             /* block information */
-    int err;                    /* return value */
-
-    /* initialize output state */
-    s.out = dest;
-    s.outlen = *destlen;                /* ignored if dest is NIL */
-    s.outcnt = 0;
-
-    /* initialize input state */
-    s.in = source;
-    s.inlen = *sourcelen;
-    s.incnt = 0;
-    s.bitbuf = 0;
-    s.bitcnt = 0;
-
-    /* return if bits() or decode() tries to read past available input */
-    if (setjmp(s.env) != 0)             /* if came back here via longjmp() */
-        err = 2;                        /* then skip do-loop, return error */
-    else {
-        /* process blocks until last block or error */
-        do {
-            last = bits(&s, 1);         /* one if last block */
-            type = bits(&s, 2);         /* block type 0..3 */
-            err = type == 0 ? stored(&s) :
-                  (type == 1 ? fixed(&s) :
-                   (type == 2 ? dynamic(&s) :
-                    -1));               /* type == 3, invalid */
-            if (err != 0) break;        /* return with error */
-        } while (!last);
-    }
-
-    /* update the lengths and return */
-    if (err <= 0) {
-        *destlen = s.outcnt;
-        *sourcelen = s.incnt;
-    }
-    return err;
-}
-
-#ifdef TEST
-/* Example of how to use puff() */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-local unsigned char *yank(char *name, unsigned long *len)
-{
-    unsigned long size;
-    unsigned char *buf;
-    FILE *in;
-    struct stat s;
-
-    *len = 0;
-    if (stat(name, &s)) return NULL;
-    if ((s.st_mode & S_IFMT) != S_IFREG) return NULL;
-    size = (unsigned long)(s.st_size);
-    if (size == 0 || (off_t)size != s.st_size) return NULL;
-    in = fopen(name, "r");
-    if (in == NULL) return NULL;
-    buf = malloc(size);
-    if (buf != NULL && fread(buf, 1, size, in) != size) {
-        free(buf);
-        buf = NULL;
-    }
-    fclose(in);
-    *len = size;
-    return buf;
-}
-
-int main(int argc, char **argv)
-{
-    int ret;
-    unsigned char *source;
-    unsigned long len, sourcelen, destlen;
-
-    if (argc < 2) return 2;
-    source = yank(argv[1], &len);
-    if (source == NULL) return 2;
-    sourcelen = len;
-    ret = puff(NIL, &destlen, source, &sourcelen);
-    if (ret)
-        printf("puff() failed with return code %d\n", ret);
-    else {
-        printf("puff() succeeded uncompressing %lu bytes\n", destlen);
-        if (sourcelen < len) printf("%lu compressed bytes unused\n",
-                                    len - sourcelen);
-    }
-    free(source);
-    return ret;
-}
-#endif
diff --git a/tkimg1.3/libz/contrib/puff/puff.h b/tkimg1.3/libz/contrib/puff/puff.h
deleted file mode 100644
index ef61252..0000000
--- a/tkimg1.3/libz/contrib/puff/puff.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* puff.h
-  Copyright (C) 2002, 2003 Mark Adler, all rights reserved
-  version 1.7, 3 Mar 2002
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-
-/*
- * See puff.c for purpose and usage.
- */
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen);     /* amount of input available */
diff --git a/tkimg1.3/libz/contrib/puff/zeros.raw b/tkimg1.3/libz/contrib/puff/zeros.raw
deleted file mode 100644
index 637b7be..0000000
Binary files a/tkimg1.3/libz/contrib/puff/zeros.raw and /dev/null differ
diff --git a/tkimg1.3/libz/contrib/testzlib/testzlib.c b/tkimg1.3/libz/contrib/testzlib/testzlib.c
deleted file mode 100644
index fdabc5c..0000000
--- a/tkimg1.3/libz/contrib/testzlib/testzlib.c
+++ /dev/null
@@ -1,149 +0,0 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#include "zlib.h"
-
-int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
-{
-    FILE* stream;
-    void* ptr;
-    int retVal=1;
-    stream=fopen(filename, "rb");
-    if (stream==NULL)
-        return 0;
-
-    fseek(stream,0,SEEK_END);
-
-    *plFileSize=ftell(stream);
-    fseek(stream,0,SEEK_SET);
-    ptr=malloc((*plFileSize)+1);
-    if (ptr==NULL)
-        retVal=0;
-    else
-    {
-        if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
-            retVal=0;
-    }
-    fclose(stream);
-    *pFilePtr=ptr;
-    return retVal;
-}
-
-int main(int argc, char *argv[])
-{
-    int BlockSizeCompress=0x8000;
-    int BlockSizeUncompress=0x8000;
-    int cprLevel=Z_DEFAULT_COMPRESSION ;
-    long lFileSize;
-    unsigned char* FilePtr;
-    long lBufferSizeCpr;
-    long lBufferSizeUncpr;
-    long lCompressedSize=0;
-    unsigned char* CprPtr;
-    unsigned char* UncprPtr;
-    long lSizeCpr,lSizeUncpr;
-    DWORD dwGetTick;
-
-    if (argc<=1)
-    {
-        printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
-        return 0;
-    }
-
-    if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
-    {
-        printf("error reading %s\n",argv[1]);
-        return 1;
-    }
-    else printf("file %s read, %u bytes\n",argv[1],lFileSize);
-
-    if (argc>=3)
-        BlockSizeCompress=atol(argv[2]);
-
-    if (argc>=4)
-        BlockSizeUncompress=atol(argv[3]);
-
-    if (argc>=5)
-        cprLevel=(int)atol(argv[4]);
-
-    lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
-    lBufferSizeUncpr = lBufferSizeCpr;
-
-    CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
-    UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
-
-    dwGetTick=GetTickCount();
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lFileSize;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        deflateInit(&zcpr,cprLevel);
-
-        zcpr.next_in = FilePtr;
-        zcpr.next_out = CprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
-            zcpr.avail_out = BlockSizeCompress;
-            ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeCpr=zcpr.total_out;
-        deflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        printf("total compress size = %u, in %u step\n",lSizeCpr,step);
-        printf("time = %u msec = %f sec\n\n",dwGetTick,dwGetTick/(double)1000.);
-    }
-
-    dwGetTick=GetTickCount();
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lSizeCpr;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        inflateInit(&zcpr);
-
-        zcpr.next_in = CprPtr;
-        zcpr.next_out = UncprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
-            zcpr.avail_out = BlockSizeUncompress;
-            ret=inflate(&zcpr,Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeUncpr=zcpr.total_out;
-        inflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
-        printf("time = %u msec = %f sec\n\n",dwGetTick,dwGetTick/(double)1000.);
-    }
-
-    if (lSizeUncpr==lFileSize)
-    {
-        if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
-            printf("compare ok\n");
-
-    }
-
-    return 0;
-
-}
diff --git a/tkimg1.3/libz/contrib/testzlib/testzlib.sln b/tkimg1.3/libz/contrib/testzlib/testzlib.sln
deleted file mode 100644
index 86da716..0000000
--- a/tkimg1.3/libz/contrib/testzlib/testzlib.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug
-		ConfigName.1 = Release
-	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
diff --git a/tkimg1.3/libz/contrib/testzlib/testzlib.vcproj b/tkimg1.3/libz/contrib/testzlib/testzlib.vcproj
deleted file mode 100644
index bd9b39b..0000000
--- a/tkimg1.3/libz/contrib/testzlib/testzlib.vcproj
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="testzlib"
-	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="testzlib.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/tkimg1.3/libz/contrib/untgz/Makefile b/tkimg1.3/libz/contrib/untgz/Makefile
deleted file mode 100644
index b54266f..0000000
--- a/tkimg1.3/libz/contrib/untgz/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-CC=cc
-CFLAGS=-g
-
-untgz: untgz.o ../../libz.a
-	$(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz
-
-untgz.o: untgz.c ../../zlib.h
-	$(CC) $(CFLAGS) -c -I../.. untgz.c
-
-../../libz.a:
-	cd ../..; ./configure; make
-
-clean:
-	rm -f untgz untgz.o *~
diff --git a/tkimg1.3/libz/contrib/untgz/Makefile.msc b/tkimg1.3/libz/contrib/untgz/Makefile.msc
deleted file mode 100644
index 77b8602..0000000
--- a/tkimg1.3/libz/contrib/untgz/Makefile.msc
+++ /dev/null
@@ -1,17 +0,0 @@
-CC=cl
-CFLAGS=-MD
-
-untgz.exe: untgz.obj ..\..\zlib.lib
-	$(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib
-
-untgz.obj: untgz.c ..\..\zlib.h
-	$(CC) $(CFLAGS) -c -I..\.. untgz.c
-
-..\..\zlib.lib:
-	cd ..\..
-	$(MAKE) -f win32\makefile.msc
-	cd contrib\untgz
-
-clean:
-	-del untgz.obj
-	-del untgz.exe
diff --git a/tkimg1.3/libz/contrib/untgz/untgz.c b/tkimg1.3/libz/contrib/untgz/untgz.c
deleted file mode 100644
index d748b69..0000000
--- a/tkimg1.3/libz/contrib/untgz/untgz.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * untgz.c -- Display contents and extract files from a gzip'd TAR file
- *
- * written by "Pedro A. Aranda Guti\irrez" <paag at tid.es>
- * adaptation to Unix by Jean-loup Gailly <jloup at gzip.org>
- * various fixes by Cosmin Truta <cosmint at cs.ubbcluj.ro>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-
-#include "zlib.h"
-
-#ifdef unix
-# include <unistd.h>
-#else
-# include <direct.h>
-# include <io.h>
-#endif
-
-#ifdef WIN32
-#include <windows.h>
-#  ifndef F_OK
-#    define F_OK  0
-#  endif
-#  define mkdir(dirname,mode)   _mkdir(dirname)
-#  ifdef _MSC_VER
-#    define strdup(str)         _strdup(str)
-#    define access(path,mode)   _access(path,mode)
-#  endif
-#else
-#  include <utime.h>
-#endif
-
-
-/* values used in typeflag field */
-
-#define REGTYPE  '0'            /* regular file */
-#define AREGTYPE '\0'           /* regular file */
-#define LNKTYPE  '1'            /* link */
-#define SYMTYPE  '2'            /* reserved */
-#define CHRTYPE  '3'            /* character special */
-#define BLKTYPE  '4'            /* block special */
-#define DIRTYPE  '5'            /* directory */
-#define FIFOTYPE '6'            /* FIFO special */
-#define CONTTYPE '7'            /* reserved */
-
-#define BLOCKSIZE 512
-
-struct tar_header
-{                               /* byte offset */
-  char name[100];               /*   0 */
-  char mode[8];                 /* 100 */
-  char uid[8];                  /* 108 */
-  char gid[8];                  /* 116 */
-  char size[12];                /* 124 */
-  char mtime[12];               /* 136 */
-  char chksum[8];               /* 148 */
-  char typeflag;                /* 156 */
-  char linkname[100];           /* 157 */
-  char magic[6];                /* 257 */
-  char version[2];              /* 263 */
-  char uname[32];               /* 265 */
-  char gname[32];               /* 297 */
-  char devmajor[8];             /* 329 */
-  char devminor[8];             /* 337 */
-  char prefix[155];             /* 345 */
-                                /* 500 */
-};
-
-union tar_buffer {
-  char               buffer[BLOCKSIZE];
-  struct tar_header  header;
-};
-
-enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID };
-
-char *TGZfname          OF((const char *));
-void TGZnotfound        OF((const char *));
-
-int getoct              OF((char *, int));
-char *strtime           OF((time_t *));
-int setfiletime         OF((char *, time_t));
-int ExprMatch           OF((char *, char *));
-
-int makedir             OF((char *));
-int matchname           OF((int, int, char **, char *));
-
-void error              OF((const char *));
-int tar                 OF((gzFile, int, int, int, char **));
-
-void help               OF((int));
-int main                OF((int, char **));
-
-char *prog;
-
-const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL };
-
-/* return the file name of the TGZ archive */
-/* or NULL if it does not exist */
-
-char *TGZfname (const char *arcname)
-{
-  static char buffer[1024];
-  int origlen,i;
-
-  strcpy(buffer,arcname);
-  origlen = strlen(buffer);
-
-  for (i=0; TGZsuffix[i]; i++)
-    {
-       strcpy(buffer+origlen,TGZsuffix[i]);
-       if (access(buffer,F_OK) == 0)
-         return buffer;
-    }
-  return NULL;
-}
-
-
-/* error message for the filename */
-
-void TGZnotfound (const char *arcname)
-{
-  int i;
-
-  fprintf(stderr,"%s: Couldn't find ",prog);
-  for (i=0;TGZsuffix[i];i++)
-    fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n",
-            arcname,
-            TGZsuffix[i]);
-  exit(1);
-}
-
-
-/* convert octal digits to int */
-/* on error return -1 */
-
-int getoct (char *p,int width)
-{
-  int result = 0;
-  char c;
-
-  while (width--)
-    {
-      c = *p++;
-      if (c == 0)
-        break;
-      if (c == ' ')
-        continue;
-      if (c < '0' || c > '7')
-        return -1;
-      result = result * 8 + (c - '0');
-    }
-  return result;
-}
-
-
-/* convert time_t to string */
-/* use the "YYYY/MM/DD hh:mm:ss" format */
-
-char *strtime (time_t *t)
-{
-  struct tm   *local;
-  static char result[32];
-
-  local = localtime(t);
-  sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d",
-          local->tm_year+1900, local->tm_mon+1, local->tm_mday,
-          local->tm_hour, local->tm_min, local->tm_sec);
-  return result;
-}
-
-
-/* set file time */
-
-int setfiletime (char *fname,time_t ftime)
-{
-#ifdef WIN32
-  static int isWinNT = -1;
-  SYSTEMTIME st;
-  FILETIME locft, modft;
-  struct tm *loctm;
-  HANDLE hFile;
-  int result;
-
-  loctm = localtime(&ftime);
-  if (loctm == NULL)
-    return -1;
-
-  st.wYear         = (WORD)loctm->tm_year + 1900;
-  st.wMonth        = (WORD)loctm->tm_mon + 1;
-  st.wDayOfWeek    = (WORD)loctm->tm_wday;
-  st.wDay          = (WORD)loctm->tm_mday;
-  st.wHour         = (WORD)loctm->tm_hour;
-  st.wMinute       = (WORD)loctm->tm_min;
-  st.wSecond       = (WORD)loctm->tm_sec;
-  st.wMilliseconds = 0;
-  if (!SystemTimeToFileTime(&st, &locft) ||
-      !LocalFileTimeToFileTime(&locft, &modft))
-    return -1;
-
-  if (isWinNT < 0)
-    isWinNT = (GetVersion() < 0x80000000) ? 1 : 0;
-  hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
-                     (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0),
-                     NULL);
-  if (hFile == INVALID_HANDLE_VALUE)
-    return -1;
-  result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1;
-  CloseHandle(hFile);
-  return result;
-#else
-  struct utimbuf settime;
-
-  settime.actime = settime.modtime = ftime;
-  return utime(fname,&settime);
-#endif
-}
-
-
-/* regular expression matching */
-
-#define ISSPECIAL(c) (((c) == '*') || ((c) == '/'))
-
-int ExprMatch (char *string,char *expr)
-{
-  while (1)
-    {
-      if (ISSPECIAL(*expr))
-        {
-          if (*expr == '/')
-            {
-              if (*string != '\\' && *string != '/')
-                return 0;
-              string ++; expr++;
-            }
-          else if (*expr == '*')
-            {
-              if (*expr ++ == 0)
-                return 1;
-              while (*++string != *expr)
-                if (*string == 0)
-                  return 0;
-            }
-        }
-      else
-        {
-          if (*string != *expr)
-            return 0;
-          if (*expr++ == 0)
-            return 1;
-          string++;
-        }
-    }
-}
-
-
-/* recursive mkdir */
-/* abort on ENOENT; ignore other errors like "directory already exists" */
-/* return 1 if OK */
-/*        0 on error */
-
-int makedir (char *newdir)
-{
-  char *buffer = strdup(newdir);
-  char *p;
-  int  len = strlen(buffer);
-
-  if (len <= 0) {
-    free(buffer);
-    return 0;
-  }
-  if (buffer[len-1] == '/') {
-    buffer[len-1] = '\0';
-  }
-  if (mkdir(buffer, 0755) == 0)
-    {
-      free(buffer);
-      return 1;
-    }
-
-  p = buffer+1;
-  while (1)
-    {
-      char hold;
-
-      while(*p && *p != '\\' && *p != '/')
-        p++;
-      hold = *p;
-      *p = 0;
-      if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT))
-        {
-          fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer);
-          free(buffer);
-          return 0;
-        }
-      if (hold == 0)
-        break;
-      *p++ = hold;
-    }
-  free(buffer);
-  return 1;
-}
-
-
-int matchname (int arg,int argc,char **argv,char *fname)
-{
-  if (arg == argc)      /* no arguments given (untgz tgzarchive) */
-    return 1;
-
-  while (arg < argc)
-    if (ExprMatch(fname,argv[arg++]))
-      return 1;
-
-  return 0; /* ignore this for the moment being */
-}
-
-
-/* tar file list or extract */
-
-int tar (gzFile in,int action,int arg,int argc,char **argv)
-{
-  union  tar_buffer buffer;
-  int    len;
-  int    err;
-  int    getheader = 1;
-  int    remaining = 0;
-  FILE   *outfile = NULL;
-  char   fname[BLOCKSIZE];
-  int    tarmode;
-  time_t tartime;
-
-  if (action == TGZ_LIST)
-    printf("    date      time     size                       file\n"
-           " ---------- -------- --------- -------------------------------------\n");
-  while (1)
-    {
-      len = gzread(in, &buffer, BLOCKSIZE);
-      if (len < 0)
-        error(gzerror(in, &err));
-      /*
-       * Always expect complete blocks to process
-       * the tar information.
-       */
-      if (len != BLOCKSIZE)
-        {
-          action = TGZ_INVALID; /* force error exit */
-          remaining = 0;        /* force I/O cleanup */
-        }
-
-      /*
-       * If we have to get a tar header
-       */
-      if (getheader == 1)
-        {
-          /*
-           * if we met the end of the tar
-           * or the end-of-tar block,
-           * we are done
-           */
-          if ((len == 0) || (buffer.header.name[0] == 0)) break;
-
-          tarmode = getoct(buffer.header.mode,8);
-          tartime = (time_t)getoct(buffer.header.mtime,12);
-          if (tarmode == -1 || tartime == (time_t)-1)
-            {
-              buffer.header.name[0] = 0;
-              action = TGZ_INVALID;
-            }
-
-          strcpy(fname,buffer.header.name);
-
-          switch (buffer.header.typeflag)
-            {
-            case DIRTYPE:
-              if (action == TGZ_LIST)
-                printf(" %s     <dir> %s\n",strtime(&tartime),fname);
-              if (action == TGZ_EXTRACT)
-                {
-                  makedir(fname);
-                  setfiletime(fname,tartime);
-                }
-              break;
-            case REGTYPE:
-            case AREGTYPE:
-              remaining = getoct(buffer.header.size,12);
-              if (remaining == -1)
-                {
-                  action = TGZ_INVALID;
-                  break;
-                }
-              if (action == TGZ_LIST)
-                printf(" %s %9d %s\n",strtime(&tartime),remaining,fname);
-              else if (action == TGZ_EXTRACT)
-                {
-                  if (matchname(arg,argc,argv,fname))
-                    {
-                      outfile = fopen(fname,"wb");
-                      if (outfile == NULL) {
-                        /* try creating directory */
-                        char *p = strrchr(fname, '/');
-                        if (p != NULL) {
-                          *p = '\0';
-                          makedir(fname);
-                          *p = '/';
-                          outfile = fopen(fname,"wb");
-                        }
-                      }
-                      if (outfile != NULL)
-                        printf("Extracting %s\n",fname);
-                      else
-                        fprintf(stderr, "%s: Couldn't create %s",prog,fname);
-                    }
-                  else
-                    outfile = NULL;
-                }
-              getheader = 0;
-              break;
-            default:
-              if (action == TGZ_LIST)
-                printf(" %s     <---> %s\n",strtime(&tartime),fname);
-              break;
-            }
-        }
-      else
-        {
-          unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining;
-
-          if (outfile != NULL)
-            {
-              if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes)
-                {
-                  fprintf(stderr,"%s: Error writing %s -- skipping\n",prog,fname);
-                  fclose(outfile);
-                  outfile = NULL;
-                  remove(fname);
-                }
-            }
-          remaining -= bytes;
-        }
-
-      if (remaining == 0)
-        {
-          getheader = 1;
-          if (outfile != NULL)
-            {
-              fclose(outfile);
-              outfile = NULL;
-              if (action != TGZ_INVALID)
-                setfiletime(fname,tartime);
-            }
-        }
-
-      /*
-       * Abandon if errors are found
-       */
-      if (action == TGZ_INVALID)
-        {
-          error("broken archive");
-          break;
-        }
-    }
-
-  if (gzclose(in) != Z_OK)
-    error("failed gzclose");
-
-  return 0;
-}
-
-
-/* ============================================================ */
-
-void help(int exitval)
-{
-  printf("untgz version 0.2\n"
-         "  using zlib version %s\n\n",
-         zlibVersion());
-  printf("Usage: untgz file.tgz            extract all files\n"
-         "       untgz file.tgz fname ...  extract selected files\n"
-         "       untgz -l file.tgz         list archive contents\n"
-         "       untgz -h                  display this help\n");
-  exit(exitval);
-}
-
-void error(const char *msg)
-{
-  fprintf(stderr, "%s: %s\n", prog, msg);
-  exit(1);
-}
-
-
-/* ============================================================ */
-
-#if defined(WIN32) && defined(__GNUC__)
-int _CRT_glob = 0;      /* disable argument globbing in MinGW */
-#endif
-
-int main(int argc,char **argv)
-{
-    int         action = TGZ_EXTRACT;
-    int         arg = 1;
-    char        *TGZfile;
-    gzFile      *f;
-
-    prog = strrchr(argv[0],'\\');
-    if (prog == NULL)
-      {
-        prog = strrchr(argv[0],'/');
-        if (prog == NULL)
-          {
-            prog = strrchr(argv[0],':');
-            if (prog == NULL)
-              prog = argv[0];
-            else
-              prog++;
-          }
-        else
-          prog++;
-      }
-    else
-      prog++;
-
-    if (argc == 1)
-      help(0);
-
-    if (strcmp(argv[arg],"-l") == 0)
-      {
-        action = TGZ_LIST;
-        if (argc == ++arg)
-          help(0);
-      }
-    else if (strcmp(argv[arg],"-h") == 0)
-      {
-        help(0);
-      }
-
-    if ((TGZfile = TGZfname(argv[arg])) == NULL)
-      TGZnotfound(argv[arg]);
-
-    ++arg;
-    if ((action == TGZ_LIST) && (arg != argc))
-      help(1);
-
-/*
- *  Process the TGZ file
- */
-    switch(action)
-      {
-      case TGZ_LIST:
-      case TGZ_EXTRACT:
-        f = gzopen(TGZfile,"rb");
-        if (f == NULL)
-          {
-            fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile);
-            return 1;
-          }
-        exit(tar(f, action, arg, argc, argv));
-      break;
-
-      default:
-        error("Unknown option");
-        exit(1);
-      }
-
-    return 0;
-}
diff --git a/tkimg1.3/libz/contrib/visual-basic.txt b/tkimg1.3/libz/contrib/visual-basic.txt
deleted file mode 100644
index 57efe58..0000000
--- a/tkimg1.3/libz/contrib/visual-basic.txt
+++ /dev/null
@@ -1,160 +0,0 @@
-See below some functions declarations for Visual Basic.
-
-Frequently Asked Question:
-
-Q: Each time I use the compress function I get the -5 error (not enough
-   room in the output buffer).
-
-A: Make sure that the length of the compressed buffer is passed by
-   reference ("as any"), not by value ("as long"). Also check that
-   before the call of compress this length is equal to the total size of
-   the compressed buffer and not zero.
-
-
-From: "Jon Caruana" <jon-net at usa.net>
-Subject: Re: How to port zlib declares to vb?
-Date: Mon, 28 Oct 1996 18:33:03 -0600
-
-Got the answer! (I haven't had time to check this but it's what I got, and
-looks correct):
-
-He has the following routines working:
-        compress
-        uncompress
-        gzopen
-        gzwrite
-        gzread
-        gzclose
-
-Declares follow: (Quoted from Carlos Rios <c_rios at sonda.cl>, in Vb4 form)
-
-#If Win16 Then   'Use Win16 calls.
-Declare Function compress Lib "ZLIB.DLL" (ByVal compr As
-        String, comprLen As Any, ByVal buf As String, ByVal buflen
-        As Long) As Integer
-Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr
-        As String, uncomprLen As Any, ByVal compr As String, ByVal
-        lcompr As Long) As Integer
-Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As
-        String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As
-        Long) As Integer
-#Else
-Declare Function compress Lib "ZLIB32.DLL"
-        (ByVal compr As String, comprLen As Any, ByVal buf As
-        String, ByVal buflen As Long) As Integer
-Declare Function uncompress Lib "ZLIB32.DLL"
-        (ByVal uncompr As String, uncomprLen As Any, ByVal compr As
-        String, ByVal lcompr As Long) As Long
-Declare Function gzopen Lib "ZLIB32.DLL"
-        (ByVal file As String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzwrite Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzclose Lib "ZLIB32.DLL"
-        (ByVal file As Long) As Long
-#End If
-
--Jon Caruana
-jon-net at usa.net
-Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member
-
-
-Here is another example from Michael <michael_borgsys at hotmail.com> that he
-says conforms to the VB guidelines, and that solves the problem of not
-knowing the uncompressed size by storing it at the end of the file:
-
-'Calling the functions:
-'bracket meaning: <parameter> [optional] {Range of possible values}
-'Call subCompressFile(<path with filename to compress> [, <path with
-filename to write to>, [level of compression {1..9}]])
-'Call subUncompressFile(<path with filename to compress>)
-
-Option Explicit
-Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller'
-Private Const SUCCESS As Long = 0
-Private Const strFilExt As String = ".cpr"
-Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long,
-ByVal level As Integer) As Long
-Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long)
-As Long
-
-Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal
-strargCprFilPth As String, Optional ByVal intLvl As Integer = 9)
-    Dim strCprPth As String
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim bytaryOri() As Byte
-    Dim bytaryCpr() As Byte
-    lngOriSiz = FileLen(strargOriFilPth)
-    ReDim bytaryOri(lngOriSiz - 1)
-    Open strargOriFilPth For Binary Access Read As #1
-        Get #1, , bytaryOri()
-    Close #1
-    strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth)
-'Select file path and name
-    strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) =
-strFilExt, "", strFilExt) 'Add file extension if not exists
-    lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit
-more space then original file size
-    ReDim bytaryCpr(lngCprSiz - 1)
-    If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) =
-SUCCESS Then
-        lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100
-        ReDim Preserve bytaryCpr(lngCprSiz - 1)
-        Open strCprPth For Binary Access Write As #1
-            Put #1, , bytaryCpr()
-            Put #1, , lngOriSiz 'Add the the original size value to the end
-(last 4 bytes)
-        Close #1
-    Else
-        MsgBox "Compression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-
-Public Sub subUncompressFile(ByVal strargFilPth As String)
-    Dim bytaryCpr() As Byte
-    Dim bytaryOri() As Byte
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim strOriPth As String
-    lngCprSiz = FileLen(strargFilPth)
-    ReDim bytaryCpr(lngCprSiz - 1)
-    Open strargFilPth For Binary Access Read As #1
-        Get #1, , bytaryCpr()
-    Close #1
-    'Read the original file size value:
-    lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _
-              + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _
-              + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _
-              + bytaryCpr(lngCprSiz - 4)
-    ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value
-    ReDim bytaryOri(lngOriSiz - 1)
-    If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS
-Then
-        strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt))
-        Open strOriPth For Binary Access Write As #1
-            Put #1, , bytaryOri()
-        Close #1
-    Else
-        MsgBox "Uncompression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-Public Property Get lngPercentSmaller() As Long
-    lngPercentSmaller = lngpvtPcnSml
-End Property
diff --git a/tkimg1.3/libz/contrib/vstudio/readme.txt b/tkimg1.3/libz/contrib/vstudio/readme.txt
deleted file mode 100644
index 3a4b85c..0000000
--- a/tkimg1.3/libz/contrib/vstudio/readme.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Building instructions for the DLL versions of Zlib 1.21
-=======================================================
-
-This directory contains projects that build zlib and minizip using
-Microsoft Visual C++ 7.0/7.1.
-
-You don't need to build these projects yourself. You can download the
-binaries from:
-  http://www.winimage.com/zLibDll
-
-More information can be found at this site.
-
-
-Build instructions
-------------------
-- Unzip zlib*.zip and copy the files from contrib\vstudio\vc7,
-  from contrib\vstudio\masmx86 and from contrib\minizip into the same
-  directory.
-- Download the crtdll library from
-    http://www.winimage.com/zLibDll/crtdll.zip
-  Unzip crtdll.zip to extract crtdll.lib.
-- If you are using x86, use the Release target.
-- Open zlibvc.sln with Microsoft Visual C++ 7.0 or 7.1
-  (Visual Studio .Net 2002 or 2003).
-
-
-Important
----------
-- To use zlibwapi.dll in your application, you must define the
-  macro ZLIB_WINAPI when compiling your application's source files.
-
-
-Additional notes
-----------------
-- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built
-  by Gilles Vollant from the zlib 1.1.x sources, and distributed at
-    http://www.winimage.com/zLibDll
-  It uses the WINAPI calling convention for the exported functions, and
-  includes the minizip functionality. If your application needs that
-  particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll.
-
-- The new DLL was renamed because there exist several incompatible
-  versions of zlib.dll on the Internet.
-
-- There is also an official DLL build of zlib, named zlib1.dll. This one
-  is exporting the functions using the CDECL convention. See the file
-  win32\DLL_FAQ.txt found in this zlib distribution.
-
-- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol
-  has a slightly different effect. To avoid compatibility problems, do
-  not define it here.
-
-
-Gilles Vollant
-info at winimage.com
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/miniunz.vcproj b/tkimg1.3/libz/contrib/vstudio/vc7/miniunz.vcproj
deleted file mode 100644
index 935c250..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/miniunz.vcproj
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="miniunz"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="miniunz.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/minizip.vcproj b/tkimg1.3/libz/contrib/vstudio/vc7/minizip.vcproj
deleted file mode 100644
index e6f9107..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/minizip.vcproj
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="minizip"
-	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="minizip.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/zlib.rc b/tkimg1.3/libz/contrib/vstudio/vc7/zlib.rc
deleted file mode 100644
index 6c51679..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/zlib.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1  1
-IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-  FILEVERSION	 1,2,1,0
-  PRODUCTVERSION 1,2,1,0
-  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
-  FILEFLAGS	0
-  FILEOS	VOS_DOS_WINDOWS32
-  FILETYPE	VFT_DLL
-  FILESUBTYPE	0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-
-    BEGIN
-      VALUE "FileDescription", "zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.1.0\0"
-      VALUE "InternalName",	"zlib\0"
-      VALUE "OriginalFilename",	"zlib.dll\0"
-      VALUE "ProductName",	"ZLib.DLL\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/zlibstat.vcproj b/tkimg1.3/libz/contrib/vstudio/vc7/zlibstat.vcproj
deleted file mode 100644
index eb182f7..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/zlibstat.vcproj
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibstat"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\zlibstatDebug"
-			IntermediateDirectory=".\zlibstatDebug"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="5"
-				PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatDebug/"
-				ObjectFile=".\zlibstatDebug/"
-				ProgramDataBaseFileName=".\zlibstatDebug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibstatDebug\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibsta0"
-			IntermediateDirectory=".\zlibsta0"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibsta0/zlibstat.pch"
-				AssemblerListingLocation=".\zlibsta0/"
-				ObjectFile=".\zlibsta0/"
-				ProgramDataBaseFileName=".\zlibsta0/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibsta0\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\zlibstat"
-			IntermediateDirectory=".\zlibstat"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;ASMV;ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstat/"
-				ObjectFile=".\zlibstat/"
-				ProgramDataBaseFileName=".\zlibstat/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="gvmat32.obj inffas32.obj /NODEFAULTLIB "
-				OutputFile=".\zlibstat\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="zlibstatWithoutAsm"
-			IntermediateDirectory="zlibstatWithoutAsm"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatWithoutAsm/"
-				ObjectFile=".\zlibstatWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibstatWithoutAsm/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /NODEFAULTLIB "
-				OutputFile=".\zlibstatWithoutAsm\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="">
-			<File
-				RelativePath=".\adler32.c">
-			</File>
-			<File
-				RelativePath=".\compress.c">
-			</File>
-			<File
-				RelativePath=".\crc32.c">
-			</File>
-			<File
-				RelativePath=".\deflate.c">
-			</File>
-			<File
-				RelativePath=".\gvmat32c.c">
-			</File>
-			<File
-				RelativePath=".\gzio.c">
-			</File>
-			<File
-				RelativePath=".\infback.c">
-			</File>
-			<File
-				RelativePath=".\inffast.c">
-			</File>
-			<File
-				RelativePath=".\inflate.c">
-			</File>
-			<File
-				RelativePath=".\inftrees.c">
-			</File>
-			<File
-				RelativePath=".\ioapi.c">
-			</File>
-			<File
-				RelativePath=".\trees.c">
-			</File>
-			<File
-				RelativePath=".\uncompr.c">
-			</File>
-			<File
-				RelativePath=".\unzip.c">
-			</File>
-			<File
-				RelativePath=".\zip.c">
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath=".\zutil.c">
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.def b/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.def
deleted file mode 100644
index 6bc26c4..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.def
+++ /dev/null
@@ -1,92 +0,0 @@
-
-VERSION		1.21
-
-HEAPSIZE	1048576,8192
-
-EXPORTS
-        adler32                                  @1
-        compress                                 @2
-        crc32                                    @3
-        deflate                                  @4
-        deflateCopy                              @5
-        deflateEnd                               @6
-        deflateInit2_                            @7
-        deflateInit_                             @8
-        deflateParams                            @9
-        deflateReset                             @10
-        deflateSetDictionary                     @11
-        gzclose                                  @12
-        gzdopen                                  @13
-        gzerror                                  @14
-        gzflush                                  @15
-        gzopen                                   @16
-        gzread                                   @17
-        gzwrite                                  @18
-        inflate                                  @19
-        inflateEnd                               @20
-        inflateInit2_                            @21
-        inflateInit_                             @22
-        inflateReset                             @23
-        inflateSetDictionary                     @24
-        inflateSync                              @25
-        uncompress                               @26
-        zlibVersion                              @27
-        gzprintf                                 @28
-        gzputc                                   @29
-        gzgetc                                   @30
-        gzseek                                   @31
-        gzrewind                                 @32
-        gztell                                   @33
-        gzeof                                    @34
-        gzsetparams                              @35
-        zError                                   @36
-        inflateSyncPoint                         @37
-        get_crc_table                            @38
-        compress2                                @39
-        gzputs                                   @40
-        gzgets                                   @41
-        inflateCopy                              @42
-        inflateBackInit_                         @43
-        inflateBack                              @44
-        inflateBackEnd                           @45
-        compressBound                            @46
-        deflateBound                             @47
-        gzclearerr                               @48
-        gzungetc                                 @49
-        zlibCompileFlags                         @50
-        deflatePrime                             @51
-
-        unzOpen                                  @61
-        unzClose                                 @62
-        unzGetGlobalInfo                         @63
-        unzGetCurrentFileInfo                    @64
-        unzGoToFirstFile                         @65
-        unzGoToNextFile                          @66
-        unzOpenCurrentFile                       @67
-        unzReadCurrentFile                       @68
-        unzOpenCurrentFile3                      @69
-        unztell                                  @70
-        unzeof                                   @71
-        unzCloseCurrentFile                      @72
-        unzGetGlobalComment                      @73
-        unzStringFileNameCompare                 @74
-        unzLocateFile                            @75
-        unzGetLocalExtrafield                    @76
-        unzOpen2                                 @77
-        unzOpenCurrentFile2                      @78
-        unzOpenCurrentFilePassword               @79
-
-        zipOpen                                  @80
-        zipOpenNewFileInZip                      @81
-        zipWriteInFileInZip                      @82
-        zipCloseFileInZip                        @83
-        zipClose                                 @84
-        zipOpenNewFileInZip2                     @86
-        zipCloseFileInZipRaw                     @87
-        zipOpen2                                 @88
-        zipOpenNewFileInZip3                     @89
-
-        unzGetFilePos                            @100
-        unzGoToFilePos                           @101
-
-        fill_win32_filefunc                      @110
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.sln b/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.sln
deleted file mode 100644
index 5a007ff..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.sln
+++ /dev/null
@@ -1,66 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug
-		ConfigName.1 = Release
-		ConfigName.2 = ReleaseAxp
-		ConfigName.3 = ReleaseWithoutAsm
-		ConfigName.4 = ReleaseWithoutCrtdll
-	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.ActiveCfg = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.Build.0 = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.ActiveCfg = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.Build.0 = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.ActiveCfg = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.Build.0 = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.ActiveCfg = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.Build.0 = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseWithoutCrtdll|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.Build.0 = ReleaseWithoutCrtdll|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
diff --git a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.vcproj b/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.vcproj
deleted file mode 100644
index 4e57bcd..0000000
--- a/tkimg1.3/libz/contrib/vstudio/vc7/zlibvc.vcproj
+++ /dev/null
@@ -1,436 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibvc"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\DebugDll"
-			IntermediateDirectory=".\DebugDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="1"
-				PrecompiledHeaderFile=".\DebugDll/zlibvc.pch"
-				AssemblerListingLocation=".\DebugDll/"
-				ObjectFile=".\DebugDll/"
-				ProgramDataBaseFileName=".\DebugDll/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="gvmat32.obj inffas32.obj"
-				OutputFile=".\DebugDll\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\DebugDll/zlibwapi.pdb"
-				SubSystem="2"
-				ImportLibrary=".\DebugDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\DebugDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory=".\zlibDllWithoutAsm"
-			IntermediateDirectory=".\zlibDllWithoutAsm"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutAsm/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutAsm/"
-				ObjectFile=".\zlibDllWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibDllWithoutAsm/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile=".\zlibDllWithoutAsm\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutAsm/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutAsm/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutAsm/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutAsm/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutCrtdll|Win32"
-			OutputDirectory=".\zlibDllWithoutCrtDll"
-			IntermediateDirectory=".\zlibDllWithoutCrtDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutCrtDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutCrtDll/"
-				ObjectFile=".\zlibDllWithoutCrtDll/"
-				ProgramDataBaseFileName=".\zlibDllWithoutCrtDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="gvmat32.obj inffas32.obj "
-				OutputFile=".\zlibDllWithoutCrtDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="FALSE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutCrtDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutCrtDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutCrtDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutCrtDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibvc__"
-			IntermediateDirectory=".\zlibvc__"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibvc__/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibvc__/"
-				ObjectFile=".\zlibvc__/"
-				ProgramDataBaseFileName=".\zlibvc__/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile="zlibvc__\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibvc__/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibvc__/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary=".\zlibvc__/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibvc__/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\ReleaseDll"
-			IntermediateDirectory=".\ReleaseDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\ReleaseDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\ReleaseDll/"
-				ObjectFile=".\ReleaseDll/"
-				ProgramDataBaseFileName=".\ReleaseDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="gvmat32.obj inffas32.obj crtdll.lib"
-				OutputFile=".\ReleaseDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\ReleaseDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\ReleaseDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\ReleaseDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Release/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
-			<File
-				RelativePath=".\adler32.c">
-			</File>
-			<File
-				RelativePath=".\compress.c">
-			</File>
-			<File
-				RelativePath=".\crc32.c">
-			</File>
-			<File
-				RelativePath=".\deflate.c">
-			</File>
-			<File
-				RelativePath=".\gvmat32c.c">
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="TRUE">
-					<Tool
-						Name="VCCLCompilerTool"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\gzio.c">
-			</File>
-			<File
-				RelativePath=".\infback.c">
-			</File>
-			<File
-				RelativePath=".\inffast.c">
-			</File>
-			<File
-				RelativePath=".\inflate.c">
-			</File>
-			<File
-				RelativePath=".\inftrees.c">
-			</File>
-			<File
-				RelativePath=".\ioapi.c">
-			</File>
-			<File
-				RelativePath=".\iowin32.c">
-			</File>
-			<File
-				RelativePath=".\trees.c">
-			</File>
-			<File
-				RelativePath=".\uncompr.c">
-			</File>
-			<File
-				RelativePath=".\unzip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath=".\zutil.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;fi;fd">
-			<File
-				RelativePath=".\deflate.h">
-			</File>
-			<File
-				RelativePath=".\infblock.h">
-			</File>
-			<File
-				RelativePath=".\infcodes.h">
-			</File>
-			<File
-				RelativePath=".\inffast.h">
-			</File>
-			<File
-				RelativePath=".\inftrees.h">
-			</File>
-			<File
-				RelativePath=".\infutil.h">
-			</File>
-			<File
-				RelativePath=".\zconf.h">
-			</File>
-			<File
-				RelativePath=".\zlib.h">
-			</File>
-			<File
-				RelativePath=".\zutil.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/tkimg1.3/libz/crc32.c b/tkimg1.3/libz/crc32.c
deleted file mode 100644
index 96cf60c..0000000
--- a/tkimg1.3/libz/crc32.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64 at csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors.  This results about a factor
- * of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id: crc32.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#ifdef MAKECRCH
-#  include <stdio.h>
-#  ifndef DYNAMIC_CRC_TABLE
-#    define DYNAMIC_CRC_TABLE
-#  endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h"      /* for STDC and FAR definitions */
-
-#define local static
-
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-#  ifdef STDC           /* need ANSI C limits.h to determine sizes */
-#    include <limits.h>
-#    define BYFOUR
-#    if (UINT_MAX == 0xffffffffUL)
-       typedef unsigned int u4;
-#    else
-#      if (ULONG_MAX == 0xffffffffUL)
-         typedef unsigned long u4;
-#      else
-#        if (USHRT_MAX == 0xffffffffUL)
-           typedef unsigned short u4;
-#        else
-#          undef BYFOUR     /* can't find a four-byte integer type! */
-#        endif
-#      endif
-#    endif
-#  endif /* STDC */
-#endif /* !NOBYFOUR */
-
-/* Definitions for doing the crc four data bytes at a time. */
-#ifdef BYFOUR
-#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
-                (((w)&0xff00)<<8)+(((w)&0xff)<<24))
-   local unsigned long crc32_little OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-   local unsigned long crc32_big OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-#  define TBLS 8
-#else
-#  define TBLS 1
-#endif /* BYFOUR */
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
-   local void write_table OF((FILE *, const unsigned long FAR *));
-#endif /* MAKECRCH */
-
-/*
-  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
-  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
-  Polynomials over GF(2) are represented in binary, one bit per coefficient,
-  with the lowest powers in the most significant bit.  Then adding polynomials
-  is just exclusive-or, and multiplying a polynomial by x is a right shift by
-  one.  If we call the above polynomial p, and represent a byte as the
-  polynomial q, also with the lowest power in the most significant bit (so the
-  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
-  where a mod b means the remainder after dividing a by b.
-
-  This calculation is done using the shift-register method of multiplying and
-  taking the remainder.  The register is initialized to zero, and for each
-  incoming bit, x^32 is added mod p to the register if the bit is a one (where
-  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
-  x (which is shifting right by one and adding x^32 mod p if the bit shifted
-  out is a one).  We start with the highest power (least significant bit) of
-  q and repeat for all eight bits of q.
-
-  The first table is simply the CRC of all possible eight bit values.  This is
-  all the information needed to generate CRCs on data a byte at a time for all
-  combinations of CRC register values and incoming bytes.  The remaining tables
-  allow for word-at-a-time CRC calculation for both big-endian and little-
-  endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
-    unsigned long c;
-    int n, k;
-    unsigned long poly;            /* polynomial exclusive-or pattern */
-    /* terms of polynomial defining this crc (except x^32): */
-    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
-    /* make exclusive-or pattern from polynomial (0xedb88320UL) */
-    poly = 0UL;
-    for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
-        poly |= 1UL << (31 - p[n]);
-
-    /* generate a crc for every 8-bit value */
-    for (n = 0; n < 256; n++) {
-        c = (unsigned long)n;
-        for (k = 0; k < 8; k++)
-            c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-        crc_table[0][n] = c;
-    }
-
-#ifdef BYFOUR
-    /* generate crc for each value followed by one, two, and three zeros, and
-       then the byte reversal of those as well as the first table */
-    for (n = 0; n < 256; n++) {
-        c = crc_table[0][n];
-        crc_table[4][n] = REV(c);
-        for (k = 1; k < 4; k++) {
-            c = crc_table[0][c & 0xff] ^ (c >> 8);
-            crc_table[k][n] = c;
-            crc_table[k + 4][n] = REV(c);
-        }
-    }
-#endif /* BYFOUR */
-
-  crc_table_empty = 0;
-
-#ifdef MAKECRCH
-    /* write out CRC tables to crc32.h */
-    {
-        FILE *out;
-
-        out = fopen("crc32.h", "w");
-        if (out == NULL) return;
-        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
-        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
-        fprintf(out, "local const unsigned long FAR ");
-        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
-        write_table(out, crc_table[0]);
-#  ifdef BYFOUR
-        fprintf(out, "#ifdef BYFOUR\n");
-        for (k = 1; k < 8; k++) {
-            fprintf(out, "  },\n  {\n");
-            write_table(out, crc_table[k]);
-        }
-        fprintf(out, "#endif\n");
-#  endif /* BYFOUR */
-        fprintf(out, "  }\n};\n");
-        fclose(out);
-    }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
-    FILE *out;
-    const unsigned long FAR *table;
-{
-    int n;
-
-    for (n = 0; n < 256; n++)
-        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ", table[n],
-                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const unsigned long FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
-  if (crc_table_empty) make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-  return (const unsigned long FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
-    if (sizeof(void *) == sizeof(ptrdiff_t)) {
-        u4 endian;
-
-        endian = 1;
-        if (*((unsigned char *)(&endian)))
-            return crc32_little(crc, buf, len);
-        else
-            return crc32_big(crc, buf, len);
-    }
-#endif /* BYFOUR */
-    crc = crc ^ 0xffffffffUL;
-    while (len >= 8) {
-        DO8;
-        len -= 8;
-    }
-    if (len) do {
-        DO1;
-    } while (--len);
-    return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
-        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
-            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = (u4)crc;
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)buf;
-    while (len >= 32) {
-        DOLIT32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOLIT4;
-        len -= 4;
-    }
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
-        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
-            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = REV((u4)crc);
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)buf;
-    buf4--;
-    while (len >= 32) {
-        DOBIG32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOBIG4;
-        len -= 4;
-    }
-    buf4++;
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)(REV(c));
-}
-
-#endif /* BYFOUR */
diff --git a/tkimg1.3/libz/crc32.h b/tkimg1.3/libz/crc32.h
deleted file mode 100644
index 8053b61..0000000
--- a/tkimg1.3/libz/crc32.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const unsigned long FAR crc_table[TBLS][256] =
-{
-  {
-    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
-    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
-    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
-    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
-    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
-    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
-    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
-    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
-    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
-    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
-    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
-    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
-    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
-    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
-    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
-    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
-    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
-    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
-    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
-    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
-    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
-    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
-    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
-    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
-    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
-    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
-    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
-    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
-    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
-    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
-    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
-    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
-    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
-    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
-    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
-    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
-    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
-    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
-    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
-    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
-    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
-    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
-    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
-    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
-    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
-    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
-    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
-    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
-    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
-    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
-    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
-    0x2d02ef8dUL
-#ifdef BYFOUR
-  },
-  {
-    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
-    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
-    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
-    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
-    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
-    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
-    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
-    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
-    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
-    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
-    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
-    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
-    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
-    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
-    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
-    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
-    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
-    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
-    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
-    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
-    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
-    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
-    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
-    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
-    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
-    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
-    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
-    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
-    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
-    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
-    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
-    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
-    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
-    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
-    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
-    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
-    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
-    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
-    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
-    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
-    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
-    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
-    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
-    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
-    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
-    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
-    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
-    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
-    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
-    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
-    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
-    0x9324fd72UL
-  },
-  {
-    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
-    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
-    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
-    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
-    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
-    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
-    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
-    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
-    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
-    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
-    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
-    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
-    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
-    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
-    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
-    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
-    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
-    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
-    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
-    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
-    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
-    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
-    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
-    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
-    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
-    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
-    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
-    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
-    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
-    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
-    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
-    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
-    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
-    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
-    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
-    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
-    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
-    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
-    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
-    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
-    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
-    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
-    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
-    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
-    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
-    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
-    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
-    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
-    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
-    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
-    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
-    0xbe9834edUL
-  },
-  {
-    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
-    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
-    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
-    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
-    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
-    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
-    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
-    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
-    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
-    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
-    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
-    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
-    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
-    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
-    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
-    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
-    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
-    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
-    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
-    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
-    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
-    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
-    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
-    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
-    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
-    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
-    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
-    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
-    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
-    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
-    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
-    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
-    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
-    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
-    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
-    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
-    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
-    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
-    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
-    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
-    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
-    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
-    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
-    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
-    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
-    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
-    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
-    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
-    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
-    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
-    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
-    0xde0506f1UL
-  },
-  {
-    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
-    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
-    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
-    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
-    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
-    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
-    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
-    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
-    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
-    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
-    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
-    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
-    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
-    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
-    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
-    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
-    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
-    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
-    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
-    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
-    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
-    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
-    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
-    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
-    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
-    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
-    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
-    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
-    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
-    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
-    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
-    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
-    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
-    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
-    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
-    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
-    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
-    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
-    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
-    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
-    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
-    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
-    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
-    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
-    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
-    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
-    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
-    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
-    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
-    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
-    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
-    0x8def022dUL
-  },
-  {
-    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
-    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
-    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
-    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
-    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
-    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
-    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
-    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
-    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
-    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
-    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
-    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
-    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
-    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
-    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
-    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
-    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
-    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
-    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
-    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
-    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
-    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
-    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
-    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
-    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
-    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
-    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
-    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
-    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
-    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
-    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
-    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
-    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
-    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
-    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
-    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
-    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
-    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
-    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
-    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
-    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
-    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
-    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
-    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
-    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
-    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
-    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
-    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
-    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
-    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
-    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
-    0x72fd2493UL
-  },
-  {
-    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
-    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
-    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
-    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
-    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
-    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
-    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
-    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
-    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
-    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
-    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
-    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
-    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
-    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
-    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
-    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
-    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
-    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
-    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
-    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
-    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
-    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
-    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
-    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
-    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
-    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
-    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
-    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
-    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
-    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
-    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
-    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
-    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
-    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
-    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
-    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
-    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
-    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
-    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
-    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
-    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
-    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
-    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
-    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
-    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
-    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
-    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
-    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
-    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
-    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
-    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
-    0xed3498beUL
-  },
-  {
-    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
-    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
-    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
-    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
-    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
-    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
-    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
-    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
-    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
-    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
-    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
-    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
-    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
-    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
-    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
-    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
-    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
-    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
-    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
-    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
-    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
-    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
-    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
-    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
-    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
-    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
-    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
-    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
-    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
-    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
-    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
-    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
-    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
-    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
-    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
-    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
-    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
-    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
-    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
-    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
-    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
-    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
-    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
-    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
-    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
-    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
-    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
-    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
-    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
-    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
-    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
-    0xf10605deUL
-#endif
-  }
-};
diff --git a/tkimg1.3/libz/deflate.c b/tkimg1.3/libz/deflate.c
deleted file mode 100644
index 4afedec..0000000
--- a/tkimg1.3/libz/deflate.c
+++ /dev/null
@@ -1,1502 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process depends on being able to identify portions
- *      of the input text which are identical to earlier input (within a
- *      sliding window trailing behind the input currently being processed).
- *
- *      The most straightforward technique turns out to be the fastest for
- *      most input files: try all possible matches and select the longest.
- *      The key feature of this algorithm is that insertions into the string
- *      dictionary are very simple and thus fast, and deletions are avoided
- *      completely. Insertions are performed at each input character, whereas
- *      string matches are performed only when the previous match ends. So it
- *      is preferable to spend more time in matches to allow very fast string
- *      insertions and avoid deletions. The matching algorithm for small
- *      strings is inspired from that of Rabin & Karp. A brute force approach
- *      is used to find longer strings when a small match has been found.
- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- *      (by Leonid Broukhis).
- *         A previous version of this file used a more sophisticated algorithm
- *      (by Fiala and Greene) which is guaranteed to run in linear amortized
- *      time, but has a larger average cost, uses more memory and is patented.
- *      However the F&G algorithm may be faster for some highly redundant
- *      files if the parameter max_chain_length (described below) is too large.
- *
- *  ACKNOWLEDGEMENTS
- *
- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- *      I found it in 'freeze' written by Leonid Broukhis.
- *      Thanks to many people for bug reports and testing.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- *      Available in http://www.ietf.org/rfc/rfc1951.txt
- *
- *      A description of the Rabin and Karp algorithm is given in the book
- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- *      Fiala,E.R., and Greene,D.H.
- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id: deflate.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
-   " deflate 1.2.1 Copyright 1995-2003 Jean-loup Gailly ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- *  Function prototypes.
- */
-typedef enum {
-    need_more,      /* block not completed, need more input or more output */
-    block_done,     /* block flush performed */
-    finish_started, /* finish started, need only more output at next deflate */
-    finish_done     /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window    OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast   OF((deflate_state *s, int flush));
-#ifndef FASTEST
-local block_state deflate_slow   OF((deflate_state *s, int flush));
-#endif
-local void lm_init        OF((deflate_state *s));
-local void putShortMSB    OF((deflate_state *s, uInt b));
-local void flush_pending  OF((z_streamp strm));
-local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
-#ifdef ASMV
-      void match_init OF((void)); /* asm code initialization */
-      uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
-
-#ifdef DEBUG
-local  void check_match OF((deflate_state *s, IPos start, IPos match,
-                            int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-#  define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
-   ush good_length; /* reduce lazy search above this match length */
-   ush max_lazy;    /* do not perform lazy search above this match length */
-   ush nice_length; /* quit search above this match length */
-   ush max_chain;
-   compress_func func;
-} config;
-
-#ifdef FASTEST
-local const config configuration_table[2] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}}; /* max speed, no lazy matches */
-#else
-local const config configuration_table[10] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* max speed, no lazy matches */
-/* 2 */ {4,    5, 16,    8, deflate_fast},
-/* 3 */ {4,    6, 32,   32, deflate_fast},
-
-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */
-/* 5 */ {8,   16, 32,   32, deflate_slow},
-/* 6 */ {8,   16, 128, 128, deflate_slow},
-/* 7 */ {8,   32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
-#endif
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
- *    input characters, so that a running hash key can be computed from the
- *    previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
- *    input characters and the first MIN_MATCH bytes of str are valid
- *    (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
-    s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamp strm;
-    int level;
-    const char *version;
-    int stream_size;
-{
-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
-                         Z_DEFAULT_STRATEGY, version, stream_size);
-    /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                  version, stream_size)
-    z_streamp strm;
-    int  level;
-    int  method;
-    int  windowBits;
-    int  memLevel;
-    int  strategy;
-    const char *version;
-    int stream_size;
-{
-    deflate_state *s;
-    int wrap = 1;
-    static const char my_version[] = ZLIB_VERSION;
-
-    ushf *overlay;
-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
-     * output size for (length,distance) codes is <= 24 bits.
-     */
-
-    if (version == Z_NULL || version[0] != my_version[0] ||
-        stream_size != sizeof(z_stream)) {
-        return Z_VERSION_ERROR;
-    }
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->msg = Z_NULL;
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-
-    if (windowBits < 0) { /* suppress zlib wrapper */
-        wrap = 0;
-        windowBits = -windowBits;
-    }
-#ifdef GZIP
-    else if (windowBits > 15) {
-        wrap = 2;       /* write gzip wrapper instead */
-        windowBits -= 16;
-    }
-#endif
-    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-        strategy < 0 || strategy > Z_RLE) {
-        return Z_STREAM_ERROR;
-    }
-    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
-    if (s == Z_NULL) return Z_MEM_ERROR;
-    strm->state = (struct internal_state FAR *)s;
-    s->strm = strm;
-
-    s->wrap = wrap;
-    s->w_bits = windowBits;
-    s->w_size = 1 << s->w_bits;
-    s->w_mask = s->w_size - 1;
-
-    s->hash_bits = memLevel + 7;
-    s->hash_size = 1 << s->hash_bits;
-    s->hash_mask = s->hash_size - 1;
-    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
-    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
-
-    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
-    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
-        s->pending_buf == Z_NULL) {
-        s->status = FINISH_STATE;
-        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
-        deflateEnd (strm);
-        return Z_MEM_ERROR;
-    }
-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
-    s->level = level;
-    s->strategy = strategy;
-    s->method = (Byte)method;
-
-    return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamp strm;
-    const Bytef *dictionary;
-    uInt  dictLength;
-{
-    deflate_state *s;
-    uInt length = dictLength;
-    uInt n;
-    IPos hash_head = 0;
-
-    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
-        strm->state->wrap == 2 ||
-        (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
-        return Z_STREAM_ERROR;
-
-    s = strm->state;
-    if (s->wrap)
-        strm->adler = adler32(strm->adler, dictionary, dictLength);
-
-    if (length < MIN_MATCH) return Z_OK;
-    if (length > MAX_DIST(s)) {
-        length = MAX_DIST(s);
-#ifndef USE_DICT_HEAD
-        dictionary += dictLength - length; /* use the tail of the dictionary */
-#endif
-    }
-    zmemcpy(s->window, dictionary, length);
-    s->strstart = length;
-    s->block_start = (long)length;
-
-    /* Insert all strings in the hash table (except for the last two bytes).
-     * s->lookahead stays null, so s->ins_h will be recomputed at the next
-     * call of fill_window.
-     */
-    s->ins_h = s->window[0];
-    UPDATE_HASH(s, s->ins_h, s->window[1]);
-    for (n = 0; n <= length - MIN_MATCH; n++) {
-        INSERT_STRING(s, n, hash_head);
-    }
-    if (hash_head) hash_head = 0;  /* to make compiler happy */
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
-    z_streamp strm;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
-        return Z_STREAM_ERROR;
-    }
-
-    strm->total_in = strm->total_out = 0;
-    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-    strm->data_type = Z_UNKNOWN;
-
-    s = (deflate_state *)strm->state;
-    s->pending = 0;
-    s->pending_out = s->pending_buf;
-
-    if (s->wrap < 0) {
-        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
-    }
-    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
-    strm->adler =
-#ifdef GZIP
-        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
-#endif
-        adler32(0L, Z_NULL, 0);
-    s->last_flush = Z_NO_FLUSH;
-
-    _tr_init(s);
-    lm_init(s);
-
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
-    z_streamp strm;
-    int bits;
-    int value;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    strm->state->bi_valid = bits;
-    strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamp strm;
-    int level;
-    int strategy;
-{
-    deflate_state *s;
-    compress_func func;
-    int err = Z_OK;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_RLE) {
-        return Z_STREAM_ERROR;
-    }
-    func = configuration_table[s->level].func;
-
-    if (func != configuration_table[level].func && strm->total_in != 0) {
-        /* Flush the last buffer: */
-        err = deflate(strm, Z_PARTIAL_FLUSH);
-    }
-    if (s->level != level) {
-        s->level = level;
-        s->max_lazy_match   = configuration_table[level].max_lazy;
-        s->good_match       = configuration_table[level].good_length;
-        s->nice_match       = configuration_table[level].nice_length;
-        s->max_chain_length = configuration_table[level].max_chain;
-    }
-    s->strategy = strategy;
-    return err;
-}
-
-/* =========================================================================
- * For the default windowBits of 15 and memLevel of 8, this function returns
- * a close to exact, as well as small, upper bound on the compressed size.
- * They are coded as constants here for a reason--if the #define's are
- * changed, then this function needs to be changed as well.  The return
- * value for 15 and 8 only works for those exact settings.
- *
- * For any setting other than those defaults for windowBits and memLevel,
- * the value returned is a conservative worst case for the maximum expansion
- * resulting from using fixed blocks instead of stored blocks, which deflate
- * can emit on compressed data for some combinations of the parameters.
- *
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
- */
-uLong ZEXPORT deflateBound(strm, sourceLen)
-    z_streamp strm;
-    uLong sourceLen;
-{
-    deflate_state *s;
-    uLong destLen;
-
-    /* conservative upper bound */
-    destLen = sourceLen +
-              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
-
-    /* if can't get parameters, return conservative bound */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return destLen;
-
-    /* if not default parameters, return conservative bound */
-    s = strm->state;
-    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
-        return destLen;
-
-    /* default settings: return tight bound for that case */
-    return compressBound(sourceLen);
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
-    deflate_state *s;
-    uInt b;
-{
-    put_byte(s, (Byte)(b >> 8));
-    put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
-    z_streamp strm;
-{
-    unsigned len = strm->state->pending;
-
-    if (len > strm->avail_out) len = strm->avail_out;
-    if (len == 0) return;
-
-    zmemcpy(strm->next_out, strm->state->pending_out, len);
-    strm->next_out  += len;
-    strm->state->pending_out  += len;
-    strm->total_out += len;
-    strm->avail_out  -= len;
-    strm->state->pending -= len;
-    if (strm->state->pending == 0) {
-        strm->state->pending_out = strm->state->pending_buf;
-    }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
-    z_streamp strm;
-    int flush;
-{
-    int old_flush; /* value of flush param for previous deflate call */
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        flush > Z_FINISH || flush < 0) {
-        return Z_STREAM_ERROR;
-    }
-    s = strm->state;
-
-    if (strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
-        (s->status == FINISH_STATE && flush != Z_FINISH)) {
-        ERR_RETURN(strm, Z_STREAM_ERROR);
-    }
-    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
-    s->strm = strm; /* just in case */
-    old_flush = s->last_flush;
-    s->last_flush = flush;
-
-    /* Write the header */
-    if (s->status == INIT_STATE) {
-#ifdef GZIP
-        if (s->wrap == 2) {
-            put_byte(s, 31);
-            put_byte(s, 139);
-            put_byte(s, 8);
-            put_byte(s, 0);
-            put_byte(s, 0);
-            put_byte(s, 0);
-            put_byte(s, 0);
-            put_byte(s, 0);
-            put_byte(s, s->level == 9 ? 2 :
-                        (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                         4 : 0));
-            put_byte(s, 255);
-            s->status = BUSY_STATE;
-            strm->adler = crc32(0L, Z_NULL, 0);
-        }
-        else
-#endif
-        {
-            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
-            uInt level_flags;
-
-            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
-                level_flags = 0;
-            else if (s->level < 6)
-                level_flags = 1;
-            else if (s->level == 6)
-                level_flags = 2;
-            else
-                level_flags = 3;
-            header |= (level_flags << 6);
-            if (s->strstart != 0) header |= PRESET_DICT;
-            header += 31 - (header % 31);
-
-            s->status = BUSY_STATE;
-            putShortMSB(s, header);
-
-            /* Save the adler32 of the preset dictionary: */
-            if (s->strstart != 0) {
-                putShortMSB(s, (uInt)(strm->adler >> 16));
-                putShortMSB(s, (uInt)(strm->adler & 0xffff));
-            }
-            strm->adler = adler32(0L, Z_NULL, 0);
-        }
-    }
-
-    /* Flush as much pending output as possible */
-    if (s->pending != 0) {
-        flush_pending(strm);
-        if (strm->avail_out == 0) {
-            /* Since avail_out is 0, deflate will be called again with
-             * more output space, but possibly with both pending and
-             * avail_in equal to zero. There won't be anything to do,
-             * but this is not an error situation so make sure we
-             * return OK instead of BUF_ERROR at next call of deflate:
-             */
-            s->last_flush = -1;
-            return Z_OK;
-        }
-
-    /* Make sure there is something to do and avoid duplicate consecutive
-     * flushes. For repeated and useless calls with Z_FINISH, we keep
-     * returning Z_STREAM_END instead of Z_BUF_ERROR.
-     */
-    } else if (strm->avail_in == 0 && flush <= old_flush &&
-               flush != Z_FINISH) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* User must not provide more input after the first FINISH: */
-    if (s->status == FINISH_STATE && strm->avail_in != 0) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* Start a new block or continue the current one.
-     */
-    if (strm->avail_in != 0 || s->lookahead != 0 ||
-        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
-        block_state bstate;
-
-        bstate = (*(configuration_table[s->level].func))(s, flush);
-
-        if (bstate == finish_started || bstate == finish_done) {
-            s->status = FINISH_STATE;
-        }
-        if (bstate == need_more || bstate == finish_started) {
-            if (strm->avail_out == 0) {
-                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
-            }
-            return Z_OK;
-            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
-             * of deflate should use the same flush parameter to make sure
-             * that the flush is complete. So we don't have to output an
-             * empty block here, this will be done at next call. This also
-             * ensures that for a very small output buffer, we emit at most
-             * one empty block.
-             */
-        }
-        if (bstate == block_done) {
-            if (flush == Z_PARTIAL_FLUSH) {
-                _tr_align(s);
-            } else { /* FULL_FLUSH or SYNC_FLUSH */
-                _tr_stored_block(s, (char*)0, 0L, 0);
-                /* For a full flush, this empty block will be recognized
-                 * as a special marker by inflate_sync().
-                 */
-                if (flush == Z_FULL_FLUSH) {
-                    CLEAR_HASH(s);             /* forget history */
-                }
-            }
-            flush_pending(strm);
-            if (strm->avail_out == 0) {
-              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
-              return Z_OK;
-            }
-        }
-    }
-    Assert(strm->avail_out > 0, "bug2");
-
-    if (flush != Z_FINISH) return Z_OK;
-    if (s->wrap <= 0) return Z_STREAM_END;
-
-    /* Write the trailer */
-#ifdef GZIP
-    if (s->wrap == 2) {
-        put_byte(s, (Byte)(strm->adler & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
-        put_byte(s, (Byte)(strm->total_in & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
-    }
-    else
-#endif
-    {
-        putShortMSB(s, (uInt)(strm->adler >> 16));
-        putShortMSB(s, (uInt)(strm->adler & 0xffff));
-    }
-    flush_pending(strm);
-    /* If avail_out is zero, the application will call deflate again
-     * to flush the rest.
-     */
-    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
-    z_streamp strm;
-{
-    int status;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
-    status = strm->state->status;
-    if (status != INIT_STATE && status != BUSY_STATE &&
-        status != FINISH_STATE) {
-      return Z_STREAM_ERROR;
-    }
-
-    /* Deallocate in reverse order of allocations: */
-    TRY_FREE(strm, strm->state->pending_buf);
-    TRY_FREE(strm, strm->state->head);
-    TRY_FREE(strm, strm->state->prev);
-    TRY_FREE(strm, strm->state->window);
-
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-
-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
-    z_streamp dest;
-    z_streamp source;
-{
-#ifdef MAXSEG_64K
-    return Z_STREAM_ERROR;
-#else
-    deflate_state *ds;
-    deflate_state *ss;
-    ushf *overlay;
-
-
-    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
-        return Z_STREAM_ERROR;
-    }
-
-    ss = source->state;
-
-    *dest = *source;
-
-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
-    if (ds == Z_NULL) return Z_MEM_ERROR;
-    dest->state = (struct internal_state FAR *) ds;
-    *ds = *ss;
-    ds->strm = dest;
-
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
-
-    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
-        ds->pending_buf == Z_NULL) {
-        deflateEnd (dest);
-        return Z_MEM_ERROR;
-    }
-    /* following zmemcpy do not work for 16-bit MSDOS */
-    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
-    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
-    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
-    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
-    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
-    ds->l_desc.dyn_tree = ds->dyn_ltree;
-    ds->d_desc.dyn_tree = ds->dyn_dtree;
-    ds->bl_desc.dyn_tree = ds->bl_tree;
-
-    return Z_OK;
-#endif /* MAXSEG_64K */
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read.  All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
-    z_streamp strm;
-    Bytef *buf;
-    unsigned size;
-{
-    unsigned len = strm->avail_in;
-
-    if (len > size) len = size;
-    if (len == 0) return 0;
-
-    strm->avail_in  -= len;
-
-    if (strm->state->wrap == 1) {
-        strm->adler = adler32(strm->adler, strm->next_in, len);
-    }
-#ifdef GZIP
-    else if (strm->state->wrap == 2) {
-        strm->adler = crc32(strm->adler, strm->next_in, len);
-    }
-#endif
-    zmemcpy(buf, strm->next_in, len);
-    strm->next_in  += len;
-    strm->total_in += len;
-
-    return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
-    deflate_state *s;
-{
-    s->window_size = (ulg)2L*s->w_size;
-
-    CLEAR_HASH(s);
-
-    /* Set the default configuration parameters:
-     */
-    s->max_lazy_match   = configuration_table[s->level].max_lazy;
-    s->good_match       = configuration_table[s->level].good_length;
-    s->nice_match       = configuration_table[s->level].nice_length;
-    s->max_chain_length = configuration_table[s->level].max_chain;
-
-    s->strstart = 0;
-    s->block_start = 0L;
-    s->lookahead = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    s->ins_h = 0;
-#ifdef ASMV
-    match_init(); /* initialize the asm code */
-#endif
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2:
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-#endif /* ASMV */
-#endif /* FASTEST */
-
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
- */
-local uInt longest_match_fast(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    Assert(cur_match < s->strstart, "no future");
-
-    match = s->window + cur_match;
-
-    /* Return failure if the match length is less than 2:
-     */
-    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
-    /* The check at best_len-1 can be removed because it will be made
-     * again later. (This heuristic is not always a win.)
-     * It is not necessary to compare scan[2] and match[2] since they
-     * are always equal when the other bytes match, given that
-     * the hash keys are equal and that HASH_BITS >= 8.
-     */
-    scan += 2, match += 2;
-    Assert(*scan == *match, "match[2]?");
-
-    /* We check for insufficient lookahead only every 8th comparison;
-     * the 256th check will be made at strstart+258.
-     */
-    do {
-    } while (*++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             scan < strend);
-
-    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-    len = MAX_MATCH - (int)(strend - scan);
-
-    if (len < MIN_MATCH) return MIN_MATCH - 1;
-
-    s->match_start = cur_match;
-    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
-}
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
-    deflate_state *s;
-    IPos start, match;
-    int length;
-{
-    /* check that the match is indeed a match */
-    if (zmemcmp(s->window + match,
-                s->window + start, length) != EQUAL) {
-        fprintf(stderr, " start %u, match %u, length %d\n",
-                start, match, length);
-        do {
-            fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
-        } while (--length != 0);
-        z_error("invalid match");
-    }
-    if (z_verbose > 1) {
-        fprintf(stderr,"\\[%d,%d]", start-match, length);
-        do { putc(s->window[start++], stderr); } while (--length != 0);
-    }
-}
-#else
-#  define check_match(s, start, match, length)
-#endif /* DEBUG */
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- *    At least one byte has been read, or avail_in == 0; reads are
- *    performed for at least two bytes (required for the zip translate_eol
- *    option -- not supported here).
- */
-local void fill_window(s)
-    deflate_state *s;
-{
-    register unsigned n, m;
-    register Posf *p;
-    unsigned more;    /* Amount of free space at the end of the window. */
-    uInt wsize = s->w_size;
-
-    do {
-        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
-        /* Deal with !@#$% 64K limit: */
-        if (sizeof(int) <= 2) {
-            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
-                more = wsize;
-
-            } else if (more == (unsigned)(-1)) {
-                /* Very unlikely, but possible on 16 bit machine if
-                 * strstart == 0 && lookahead == 1 (input done a byte at time)
-                 */
-                more--;
-            }
-        }
-
-        /* If the window is almost full and there is insufficient lookahead,
-         * move the upper half to the lower one to make room in the upper half.
-         */
-        if (s->strstart >= wsize+MAX_DIST(s)) {
-
-            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
-            s->match_start -= wsize;
-            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
-            s->block_start -= (long) wsize;
-
-            /* Slide the hash table (could be avoided with 32 bit values
-               at the expense of memory usage). We slide even when level == 0
-               to keep the hash table consistent if we switch back to level > 0
-               later. (Using level 0 permanently is not an optimal usage of
-               zlib, so we don't care about this pathological case.)
-             */
-            n = s->hash_size;
-            p = &s->head[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-            } while (--n);
-
-            n = wsize;
-#ifndef FASTEST
-            p = &s->prev[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-                /* If n is not on any hash chain, prev[n] is garbage but
-                 * its value will never be used.
-                 */
-            } while (--n);
-#endif
-            more += wsize;
-        }
-        if (s->strm->avail_in == 0) return;
-
-        /* If there was no sliding:
-         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
-         *    more == window_size - lookahead - strstart
-         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
-         * => more >= window_size - 2*WSIZE + 2
-         * In the BIG_MEM or MMAP case (not yet supported),
-         *   window_size == input_size + MIN_LOOKAHEAD  &&
-         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
-         * Otherwise, window_size == 2*WSIZE so more >= 2.
-         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
-         */
-        Assert(more >= 2, "more < 2");
-
-        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
-        s->lookahead += n;
-
-        /* Initialize the hash value now that we have some input: */
-        if (s->lookahead >= MIN_MATCH) {
-            s->ins_h = s->window[s->strstart];
-            UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-            Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-        }
-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
-         * but this is not important since only literal bytes will be emitted.
-         */
-
-    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
-   _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
-                (ulg)((long)s->strstart - s->block_start), \
-                (eof)); \
-   s->block_start = s->strstart; \
-   flush_pending(s->strm); \
-   Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
-   FLUSH_BLOCK_ONLY(s, eof); \
-   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
-     * to pending_buf_size, and each stored block has a 5 byte header:
-     */
-    ulg max_block_size = 0xffff;
-    ulg max_start;
-
-    if (max_block_size > s->pending_buf_size - 5) {
-        max_block_size = s->pending_buf_size - 5;
-    }
-
-    /* Copy as much as possible from input to output: */
-    for (;;) {
-        /* Fill the window as much as possible: */
-        if (s->lookahead <= 1) {
-
-            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
-                   s->block_start >= (long)s->w_size, "slide too late");
-
-            fill_window(s);
-            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-        Assert(s->block_start >= 0L, "block gone");
-
-        s->strstart += s->lookahead;
-        s->lookahead = 0;
-
-        /* Emit a stored block if pending_buf will be full: */
-        max_start = s->block_start + max_block_size;
-        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
-            /* strstart == 0 is possible when wraparound on 16-bit machine */
-            s->lookahead = (uInt)(s->strstart - max_start);
-            s->strstart = (uInt)max_start;
-            FLUSH_BLOCK(s, 0);
-        }
-        /* Flush if we may have to slide, otherwise block_start may become
-         * negative and the data will be gone:
-         */
-        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
-            FLUSH_BLOCK(s, 0);
-        }
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL; /* head of the hash chain */
-    int bflush;           /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         * At this point we have always match_length < MIN_MATCH
-         */
-        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-#ifdef FASTEST
-            if ((s->strategy < Z_HUFFMAN_ONLY) ||
-                (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#else
-            if (s->strategy < Z_HUFFMAN_ONLY) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#endif
-            /* longest_match() or longest_match_fast() sets match_start */
-        }
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->match_start, s->match_length);
-
-            _tr_tally_dist(s, s->strstart - s->match_start,
-                           s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-
-            /* Insert new strings in the hash table only if the match length
-             * is not too large. This saves time but degrades compression.
-             */
-#ifndef FASTEST
-            if (s->match_length <= s->max_insert_length &&
-                s->lookahead >= MIN_MATCH) {
-                s->match_length--; /* string at strstart already in table */
-                do {
-                    s->strstart++;
-                    INSERT_STRING(s, s->strstart, hash_head);
-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
-                     * always MIN_MATCH bytes ahead.
-                     */
-                } while (--s->match_length != 0);
-                s->strstart++;
-            } else
-#endif
-            {
-                s->strstart += s->match_length;
-                s->match_length = 0;
-                s->ins_h = s->window[s->strstart];
-                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-                Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
-                 * matter since it will be recomputed at next deflate call.
-                 */
-            }
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL;    /* head of hash chain */
-    int bflush;              /* set if current block must be flushed */
-
-    /* Process the input block. */
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         */
-        s->prev_length = s->match_length, s->prev_match = s->match_start;
-        s->match_length = MIN_MATCH-1;
-
-        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
-            s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            if (s->strategy < Z_HUFFMAN_ONLY) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-            /* longest_match() or longest_match_fast() sets match_start */
-
-            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
-                || (s->match_length == MIN_MATCH &&
-                    s->strstart - s->match_start > TOO_FAR)
-#endif
-                )) {
-
-                /* If prev_match is also MIN_MATCH, match_start is garbage
-                 * but we will ignore the current match anyway.
-                 */
-                s->match_length = MIN_MATCH-1;
-            }
-        }
-        /* If there was a match at the previous step and the current
-         * match is not better, output the previous match:
-         */
-        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
-            /* Do not insert strings in hash table beyond this. */
-
-            check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
-            _tr_tally_dist(s, s->strstart -1 - s->prev_match,
-                           s->prev_length - MIN_MATCH, bflush);
-
-            /* Insert in hash table all strings up to the end of the match.
-             * strstart-1 and strstart are already inserted. If there is not
-             * enough lookahead, the last two strings are not inserted in
-             * the hash table.
-             */
-            s->lookahead -= s->prev_length-1;
-            s->prev_length -= 2;
-            do {
-                if (++s->strstart <= max_insert) {
-                    INSERT_STRING(s, s->strstart, hash_head);
-                }
-            } while (--s->prev_length != 0);
-            s->match_available = 0;
-            s->match_length = MIN_MATCH-1;
-            s->strstart++;
-
-            if (bflush) FLUSH_BLOCK(s, 0);
-
-        } else if (s->match_available) {
-            /* If there was no match at the previous position, output a
-             * single literal. If there was a match but the current match
-             * is longer, truncate the previous match to a single literal.
-             */
-            Tracevv((stderr,"%c", s->window[s->strstart-1]));
-            _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-            if (bflush) {
-                FLUSH_BLOCK_ONLY(s, 0);
-            }
-            s->strstart++;
-            s->lookahead--;
-            if (s->strm->avail_out == 0) return need_more;
-        } else {
-            /* There is no previous match to compare with, wait for
-             * the next step to decide.
-             */
-            s->match_available = 1;
-            s->strstart++;
-            s->lookahead--;
-        }
-    }
-    Assert (flush != Z_NO_FLUSH, "no flush?");
-    if (s->match_available) {
-        Tracevv((stderr,"%c", s->window[s->strstart-1]));
-        _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-        s->match_available = 0;
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif /* FASTEST */
diff --git a/tkimg1.3/libz/deflate.h b/tkimg1.3/libz/deflate.h
deleted file mode 100644
index 200c606..0000000
--- a/tkimg1.3/libz/deflate.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2002 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: deflate.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip encoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE    42
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    int   pending;       /* nb of bytes in the pending buffer */
-    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
-    Byte  data_type;     /* UNKNOWN, BINARY or ASCII */
-    Byte  method;        /* STORED (for zip only) or DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to supress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    int last_eob_len;   /* bit length of EOB code for last block */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-        /* in trees.c */
-void _tr_init         OF((deflate_state *s));
-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-void _tr_align        OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch _length_code[];
-  extern uch _dist_code[];
-#else
-  extern const uch _length_code[];
-  extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
diff --git a/tkimg1.3/libz/example.c b/tkimg1.3/libz/example.c
deleted file mode 100644
index 9598971..0000000
--- a/tkimg1.3/libz/example.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: example.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#else
-   extern void exit  OF((int));
-#endif
-
-#if defined(VMS) || defined(RISCOS)
-#  define TESTFILE "foo-gz"
-#else
-#  define TESTFILE "foo.gz"
-#endif
-
-#define CHECK_ERR(err, msg) { \
-    if (err != Z_OK) { \
-        fprintf(stderr, "%s error: %d\n", msg, err); \
-        exit(1); \
-    } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress      OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_gzio          OF((const char *fname,
-                            Byte *uncompr, uLong uncomprLen));
-void test_deflate       OF((Byte *compr, uLong comprLen));
-void test_inflate       OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_flush         OF((Byte *compr, uLong *comprLen));
-void test_sync          OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-int  main               OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    err = compress(compr, &comprLen, (const Bytef*)hello, len);
-    CHECK_ERR(err, "compress");
-
-    strcpy((char*)uncompr, "garbage");
-
-    err = uncompress(uncompr, &uncomprLen, compr, comprLen);
-    CHECK_ERR(err, "uncompress");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad uncompress\n");
-        exit(1);
-    } else {
-        printf("uncompress(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(fname, uncompr, uncomprLen)
-    const char *fname; /* compressed file name */
-    Byte *uncompr;
-    uLong uncomprLen;
-{
-#ifdef NO_GZCOMPRESS
-    fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
-#else
-    int err;
-    int len = (int)strlen(hello)+1;
-    gzFile file;
-    z_off_t pos;
-
-    file = gzopen(fname, "wb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    gzputc(file, 'h');
-    if (gzputs(file, "ello") != 4) {
-        fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (gzprintf(file, ", %s!", "hello") != 8) {
-        fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-    gzclose(file);
-
-    file = gzopen(fname, "rb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    strcpy((char*)uncompr, "garbage");
-
-    if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
-        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-        exit(1);
-    } else {
-        printf("gzread(): %s\n", (char*)uncompr);
-    }
-
-    pos = gzseek(file, -8L, SEEK_CUR);
-    if (pos != 6 || gztell(file) != pos) {
-        fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-                (long)pos, (long)gztell(file));
-        exit(1);
-    }
-
-    if (gzgetc(file) != ' ') {
-        fprintf(stderr, "gzgetc error\n");
-        exit(1);
-    }
-
-    if (gzungetc(' ', file) != ' ') {
-        fprintf(stderr, "gzungetc error\n");
-        exit(1);
-    }
-
-    gzgets(file, (char*)uncompr, (int)uncomprLen);
-    if (strlen((char*)uncompr) != 7) { /* " hello!" */
-        fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello + 6)) {
-        fprintf(stderr, "bad gzgets after gzseek\n");
-        exit(1);
-    } else {
-        printf("gzgets() after gzseek: %s\n", (char*)uncompr);
-    }
-
-    gzclose(file);
-#endif
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-
-    while (c_stream.total_in != len && c_stream.total_out < comprLen) {
-        c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
-        err = deflate(&c_stream, Z_NO_FLUSH);
-        CHECK_ERR(err, "deflate");
-    }
-    /* Finish the stream, still forcing small buffers: */
-    for (;;) {
-        c_stream.avail_out = 1;
-        err = deflate(&c_stream, Z_FINISH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "deflate");
-    }
-
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 0;
-    d_stream.next_out = uncompr;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
-        d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate\n");
-        exit(1);
-    } else {
-        printf("inflate(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_SPEED);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    /* At this point, uncompr is still mostly zeroes, so it should compress
-     * very well:
-     */
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-    if (c_stream.avail_in != 0) {
-        fprintf(stderr, "deflate not greedy\n");
-        exit(1);
-    }
-
-    /* Feed in already compressed data and switch to no compression: */
-    deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-    c_stream.next_in = compr;
-    c_stream.avail_in = (uInt)comprLen/2;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    /* Switch back to compressing mode: */
-    deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    for (;;) {
-        d_stream.next_out = uncompr;            /* discard the output */
-        d_stream.avail_out = (uInt)uncomprLen;
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "large inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-        fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-        exit(1);
-    } else {
-        printf("large_inflate(): OK\n");
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
-    Byte *compr;
-    uLong *comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uInt len = (uInt)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-    c_stream.avail_in = 3;
-    c_stream.avail_out = (uInt)*comprLen;
-    err = deflate(&c_stream, Z_FULL_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    compr[3]++; /* force an error in first compressed block */
-    c_stream.avail_in = len - 3;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        CHECK_ERR(err, "deflate");
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-
-    *comprLen = c_stream.total_out;
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 2; /* just read the zlib header */
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    inflate(&d_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "inflate");
-
-    d_stream.avail_in = (uInt)comprLen-2;   /* read all compressed data */
-    err = inflateSync(&d_stream);           /* but skip the damaged part */
-    CHECK_ERR(err, "inflateSync");
-
-    err = inflate(&d_stream, Z_FINISH);
-    if (err != Z_DATA_ERROR) {
-        fprintf(stderr, "inflate should report DATA_ERROR\n");
-        /* Because of incorrect adler32 */
-        exit(1);
-    }
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    printf("after inflateSync(): hel%s\n", (char *)uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    err = deflateSetDictionary(&c_stream,
-                               (const Bytef*)dictionary, sizeof(dictionary));
-    CHECK_ERR(err, "deflateSetDictionary");
-
-    dictId = c_stream.adler;
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    c_stream.next_in = (Bytef*)hello;
-    c_stream.avail_in = (uInt)strlen(hello)+1;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    for (;;) {
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        if (err == Z_NEED_DICT) {
-            if (d_stream.adler != dictId) {
-                fprintf(stderr, "unexpected dictionary");
-                exit(1);
-            }
-            err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-                                       sizeof(dictionary));
-        }
-        CHECK_ERR(err, "inflate with dict");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate with dict\n");
-        exit(1);
-    } else {
-        printf("inflate with dictionary: %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Usage:  example [output.gz  [input.gz]]
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    Byte *compr, *uncompr;
-    uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
-    uLong uncomprLen = comprLen;
-    static const char* myVersion = ZLIB_VERSION;
-
-    if (zlibVersion()[0] != myVersion[0]) {
-        fprintf(stderr, "incompatible zlib version\n");
-        exit(1);
-
-    } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
-        fprintf(stderr, "warning: different zlib version\n");
-    }
-
-    printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
-            ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
-
-    compr    = (Byte*)calloc((uInt)comprLen, 1);
-    uncompr  = (Byte*)calloc((uInt)uncomprLen, 1);
-    /* compr and uncompr are cleared to avoid reading uninitialized
-     * data and to ensure that uncompr compresses well.
-     */
-    if (compr == Z_NULL || uncompr == Z_NULL) {
-        printf("out of memory\n");
-        exit(1);
-    }
-    test_compress(compr, comprLen, uncompr, uncomprLen);
-
-    test_gzio((argc > 1 ? argv[1] : TESTFILE),
-              uncompr, uncomprLen);
-
-    test_deflate(compr, comprLen);
-    test_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-    test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_flush(compr, &comprLen);
-    test_sync(compr, comprLen, uncompr, uncomprLen);
-    comprLen = uncomprLen;
-
-    test_dict_deflate(compr, comprLen);
-    test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    free(compr);
-    free(uncompr);
-
-    return 0;
-}
diff --git a/tkimg1.3/libz/gzio.c b/tkimg1.3/libz/gzio.c
deleted file mode 100644
index a74cf17..0000000
--- a/tkimg1.3/libz/gzio.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
- */
-
-/* @(#) $Id: gzio.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-#ifdef NO_DEFLATE       /* for compatiblity with old definition */
-#  define NO_GZCOMPRESS
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef Z_BUFSIZE
-#  ifdef MAXSEG_64K
-#    define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-#  else
-#    define Z_BUFSIZE 16384
-#  endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-#  define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#ifdef __MVS__
-#  pragma map (fdopen , "\174\174FDOPEN")
-   FILE *fdopen(int, const char *);
-#endif
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME    0x08 /* bit 3 set: original file name present */
-#define COMMENT      0x10 /* bit 4 set: file comment present */
-#define RESERVED     0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
-    z_stream stream;
-    int      z_err;   /* error code for last stream operation */
-    int      z_eof;   /* set if end of input file */
-    FILE     *file;   /* .gz file */
-    Byte     *inbuf;  /* input buffer */
-    Byte     *outbuf; /* output buffer */
-    uLong    crc;     /* crc32 of uncompressed data */
-    char     *msg;    /* error message */
-    char     *path;   /* path name for debugging only */
-    int      transparent; /* 1 if input file is not a .gz file */
-    char     mode;    /* 'w' or 'r' */
-    z_off_t  start;   /* start of compressed data in file (header skipped) */
-    z_off_t  in;      /* bytes into deflate or inflate */
-    z_off_t  out;     /* bytes out of deflate or inflate */
-    int      back;    /* one character push-back */
-    int      last;    /* true if push-back is last character */
-} gz_stream;
-
-
-local gzFile gz_open      OF((const char *path, const char *mode, int  fd));
-local int do_flush        OF((gzFile file, int flush));
-local int    get_byte     OF((gz_stream *s));
-local void   check_header OF((gz_stream *s));
-local int    destroy      OF((gz_stream *s));
-local void   putLong      OF((FILE *file, uLong x));
-local uLong  getLong      OF((gz_stream *s));
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb"). The file is given either by file descriptor
-   or path name (if fd == -1).
-     gz_open returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
-    const char *path;
-    const char *mode;
-    int  fd;
-{
-    int err;
-    int level = Z_DEFAULT_COMPRESSION; /* compression level */
-    int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
-    char *p = (char*)mode;
-    gz_stream *s;
-    char fmode[80]; /* copy of mode, without the compression level */
-    char *m = fmode;
-
-    if (!path || !mode) return Z_NULL;
-
-    s = (gz_stream *)ALLOC(sizeof(gz_stream));
-    if (!s) return Z_NULL;
-
-    s->stream.zalloc = (alloc_func)0;
-    s->stream.zfree = (free_func)0;
-    s->stream.opaque = (voidpf)0;
-    s->stream.next_in = s->inbuf = Z_NULL;
-    s->stream.next_out = s->outbuf = Z_NULL;
-    s->stream.avail_in = s->stream.avail_out = 0;
-    s->file = NULL;
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->in = 0;
-    s->out = 0;
-    s->back = EOF;
-    s->crc = crc32(0L, Z_NULL, 0);
-    s->msg = NULL;
-    s->transparent = 0;
-
-    s->path = (char*)ALLOC(strlen(path)+1);
-    if (s->path == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    strcpy(s->path, path); /* do this early for debugging */
-
-    s->mode = '\0';
-    do {
-        if (*p == 'r') s->mode = 'r';
-        if (*p == 'w' || *p == 'a') s->mode = 'w';
-        if (*p >= '0' && *p <= '9') {
-            level = *p - '0';
-        } else if (*p == 'f') {
-          strategy = Z_FILTERED;
-        } else if (*p == 'h') {
-          strategy = Z_HUFFMAN_ONLY;
-        } else if (*p == 'R') {
-          strategy = Z_RLE;
-        } else {
-            *m++ = *p; /* copy the mode */
-        }
-    } while (*p++ && m != fmode + sizeof(fmode));
-    if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        err = Z_STREAM_ERROR;
-#else
-        err = deflateInit2(&(s->stream), level,
-                           Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
-        /* windowBits is passed < 0 to suppress zlib header */
-
-        s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
-        if (err != Z_OK || s->outbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    } else {
-        s->stream.next_in  = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
-        err = inflateInit2(&(s->stream), -MAX_WBITS);
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
-         * present after the compressed stream.
-         */
-        if (err != Z_OK || s->inbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    }
-    s->stream.avail_out = Z_BUFSIZE;
-
-    errno = 0;
-    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
-    if (s->file == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    if (s->mode == 'w') {
-        /* Write a very simple .gz header:
-         */
-        fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
-             Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
-        s->start = 10L;
-        /* We use 10L instead of ftell(s->file) to because ftell causes an
-         * fflush on some systems. This version of the library doesn't use
-         * start anyway in write mode, so this initialization is not
-         * necessary.
-         */
-    } else {
-        check_header(s); /* skip the .gz header */
-        s->start = ftell(s->file) - s->stream.avail_in;
-    }
-
-    return (gzFile)s;
-}
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile ZEXPORT gzopen (path, mode)
-    const char *path;
-    const char *mode;
-{
-    return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
-     Associate a gzFile with the file descriptor fd. fd is not dup'ed here
-   to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
-    int fd;
-    const char *mode;
-{
-    char name[20];
-
-    if (fd < 0) return (gzFile)Z_NULL;
-    sprintf(name, "<fd:%d>", fd); /* for debugging */
-
-    return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
-    gzFile file;
-    int level;
-    int strategy;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    /* Make room to allow flushing */
-    if (s->stream.avail_out == 0) {
-
-        s->stream.next_out = s->outbuf;
-        if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-            s->z_err = Z_ERRNO;
-        }
-        s->stream.avail_out = Z_BUFSIZE;
-    }
-
-    return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
-    gz_stream *s;
-{
-    if (s->z_eof) return EOF;
-    if (s->stream.avail_in == 0) {
-        errno = 0;
-        s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-        if (s->stream.avail_in == 0) {
-            s->z_eof = 1;
-            if (ferror(s->file)) s->z_err = Z_ERRNO;
-            return EOF;
-        }
-        s->stream.next_in = s->inbuf;
-    }
-    s->stream.avail_in--;
-    return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
-      Check the gzip header of a gz_stream opened for reading. Set the stream
-    mode to transparent if the gzip magic header is not present; set s->err
-    to Z_DATA_ERROR if the magic header is present but the rest of the header
-    is incorrect.
-    IN assertion: the stream s has already been created sucessfully;
-       s->stream.avail_in is zero for the first time, but may be non-zero
-       for concatenated .gz files.
-*/
-local void check_header(s)
-    gz_stream *s;
-{
-    int method; /* method byte */
-    int flags;  /* flags byte */
-    uInt len;
-    int c;
-
-    /* Assure two bytes in the buffer so we can peek ahead -- handle case
-       where first byte of header is at the end of the buffer after the last
-       gzip segment */
-    len = s->stream.avail_in;
-    if (len < 2) {
-        if (len) s->inbuf[0] = s->stream.next_in[0];
-        errno = 0;
-        len = fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
-        if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
-        s->stream.avail_in += len;
-        s->stream.next_in = s->inbuf;
-        if (s->stream.avail_in < 2) {
-            s->transparent = s->stream.avail_in;
-            return;
-        }
-    }
-
-    /* Peek ahead to check the gzip magic header */
-    if (s->stream.next_in[0] != gz_magic[0] ||
-        s->stream.next_in[1] != gz_magic[1]) {
-        s->transparent = 1;
-        return;
-    }
-    s->stream.avail_in -= 2;
-    s->stream.next_in += 2;
-
-    /* Check the rest of the gzip header */
-    method = get_byte(s);
-    flags = get_byte(s);
-    if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-        s->z_err = Z_DATA_ERROR;
-        return;
-    }
-
-    /* Discard time, xflags and OS code: */
-    for (len = 0; len < 6; len++) (void)get_byte(s);
-
-    if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-        len  =  (uInt)get_byte(s);
-        len += ((uInt)get_byte(s))<<8;
-        /* len is garbage if EOF but the loop below will quit anyway */
-        while (len-- != 0 && get_byte(s) != EOF) ;
-    }
-    if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-        for (len = 0; len < 2; len++) (void)get_byte(s);
-    }
-    s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
-   Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
-    gz_stream *s;
-{
-    int err = Z_OK;
-
-    if (!s) return Z_STREAM_ERROR;
-
-    TRYFREE(s->msg);
-
-    if (s->stream.state != NULL) {
-        if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-            err = Z_STREAM_ERROR;
-#else
-            err = deflateEnd(&(s->stream));
-#endif
-        } else if (s->mode == 'r') {
-            err = inflateEnd(&(s->stream));
-        }
-    }
-    if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
-        if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
-            err = Z_ERRNO;
-    }
-    if (s->z_err < 0) err = s->z_err;
-
-    TRYFREE(s->inbuf);
-    TRYFREE(s->outbuf);
-    TRYFREE(s->path);
-    TRYFREE(s);
-    return err;
-}
-
-/* ===========================================================================
-     Reads the given number of uncompressed bytes from the compressed file.
-   gzread returns the number of bytes actually read (0 for end of file).
-*/
-int ZEXPORT gzread (file, buf, len)
-    gzFile file;
-    voidp buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-    Bytef *start = (Bytef*)buf; /* starting point for crc computation */
-    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
-    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
-    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
-    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */
-
-    next_out = (Byte*)buf;
-    s->stream.next_out = (Bytef*)buf;
-    s->stream.avail_out = len;
-
-    if (s->stream.avail_out && s->back != EOF) {
-        *next_out++ = s->back;
-        s->stream.next_out++;
-        s->stream.avail_out--;
-        s->back = EOF;
-        s->out++;
-        if (s->last) {
-            s->z_err = Z_STREAM_END;
-            return 1;
-        }
-    }
-
-    while (s->stream.avail_out != 0) {
-
-        if (s->transparent) {
-            /* Copy first the lookahead bytes: */
-            uInt n = s->stream.avail_in;
-            if (n > s->stream.avail_out) n = s->stream.avail_out;
-            if (n > 0) {
-                zmemcpy(s->stream.next_out, s->stream.next_in, n);
-                next_out += n;
-                s->stream.next_out = next_out;
-                s->stream.next_in   += n;
-                s->stream.avail_out -= n;
-                s->stream.avail_in  -= n;
-            }
-            if (s->stream.avail_out > 0) {
-                s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,
-                                             s->file);
-            }
-            len -= s->stream.avail_out;
-            s->in  += len;
-            s->out += len;
-            if (len == 0) s->z_eof = 1;
-            return (int)len;
-        }
-        if (s->stream.avail_in == 0 && !s->z_eof) {
-
-            errno = 0;
-            s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-            if (s->stream.avail_in == 0) {
-                s->z_eof = 1;
-                if (ferror(s->file)) {
-                    s->z_err = Z_ERRNO;
-                    break;
-                }
-            }
-            s->stream.next_in = s->inbuf;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-
-        if (s->z_err == Z_STREAM_END) {
-            /* Check CRC and original size */
-            s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-            start = s->stream.next_out;
-
-            if (getLong(s) != s->crc) {
-                s->z_err = Z_DATA_ERROR;
-            } else {
-                (void)getLong(s);
-                /* The uncompressed length returned by above getlong() may be
-                 * different from s->out in case of concatenated .gz files.
-                 * Check for such files:
-                 */
-                check_header(s);
-                if (s->z_err == Z_OK) {
-                    inflateReset(&(s->stream));
-                    s->crc = crc32(0L, Z_NULL, 0);
-                }
-            }
-        }
-        if (s->z_err != Z_OK || s->z_eof) break;
-    }
-    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
-    return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
-    gzFile file;
-{
-    unsigned char c;
-
-    return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
-      Push one byte back onto the stream.
-*/
-int ZEXPORT gzungetc(c, file)
-    int c;
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;
-    s->back = c;
-    s->out--;
-    s->last = (s->z_err == Z_STREAM_END);
-    if (s->last) s->z_err = Z_OK;
-    s->z_eof = 0;
-    return c;
-}
-
-
-/* ===========================================================================
-      Reads bytes from the compressed file until len-1 characters are
-   read, or a newline character is read and transferred to buf, or an
-   end-of-file condition is encountered.  The string is then terminated
-   with a null character.
-      gzgets returns buf, or Z_NULL in case of error.
-
-      The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
-    gzFile file;
-    char *buf;
-    int len;
-{
-    char *b = buf;
-    if (buf == Z_NULL || len <= 0) return Z_NULL;
-
-    while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
-    *buf = '\0';
-    return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_GZCOMPRESS
-/* ===========================================================================
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
-    gzFile file;
-    voidpc buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.next_in = (Bytef*)buf;
-    s->stream.avail_in = len;
-
-    while (s->stream.avail_in != 0) {
-
-        if (s->stream.avail_out == 0) {
-
-            s->stream.next_out = s->outbuf;
-            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-                s->z_err = Z_ERRNO;
-                break;
-            }
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-        if (s->z_err != Z_OK) break;
-    }
-    s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
-    return (int)(len - s->stream.avail_in);
-}
-
-
-/* ===========================================================================
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    va_list va;
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-    va_start(va, format);
-#ifdef NO_vsnprintf
-#  ifdef HAS_vsprintf_void
-    (void)vsprintf(buf, format, va);
-    va_end(va);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = vsprintf(buf, format, va);
-    va_end(va);
-#  endif
-#else
-#  ifdef HAS_vsnprintf_void
-    (void)vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-    len = strlen(buf);
-#  else
-    len = vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-#  endif
-#endif
-    if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-                       a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-    gzFile file;
-    const char *format;
-    int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-        a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-#ifdef NO_snprintf
-#  ifdef HAS_sprintf_void
-    sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-            a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-                a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#else
-#  ifdef HAS_snprintf_void
-    snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    len = strlen(buf);
-#  else
-    len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-                 a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#endif
-    if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
-    gzFile file;
-    int c;
-{
-    unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
-    return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
-    gzFile file;
-    const char *s;
-{
-    return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
-    gzFile file;
-    int flush;
-{
-    uInt len;
-    int done = 0;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.avail_in = 0; /* should be zero already anyway */
-
-    for (;;) {
-        len = Z_BUFSIZE - s->stream.avail_out;
-
-        if (len != 0) {
-            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
-                s->z_err = Z_ERRNO;
-                return Z_ERRNO;
-            }
-            s->stream.next_out = s->outbuf;
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        if (done) break;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), flush);
-        s->out -= s->stream.avail_out;
-
-        /* Ignore the second of two consecutive flushes: */
-        if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
-        /* deflate has finished flushing only when it hasn't used up
-         * all the available space in the output buffer:
-         */
-        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
-        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
-    }
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
-     gzFile file;
-     int flush;
-{
-    gz_stream *s = (gz_stream*)file;
-    int err = do_flush (file, flush);
-
-    if (err) return err;
-    fflush(s->file);
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_GZCOMPRESS */
-
-/* ===========================================================================
-      Sets the starting position for the next gzread or gzwrite on the given
-   compressed file. The offset represents a number of bytes in the
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error.
-      SEEK_END is not implemented, returns error.
-      In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
-    gzFile file;
-    z_off_t offset;
-    int whence;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || whence == SEEK_END ||
-        s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-        return -1L;
-    }
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return -1L;
-#else
-        if (whence == SEEK_SET) {
-            offset -= s->in;
-        }
-        if (offset < 0) return -1L;
-
-        /* At this point, offset is the number of zero bytes to write. */
-        if (s->inbuf == Z_NULL) {
-            s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-            if (s->inbuf == Z_NULL) return -1L;
-            zmemzero(s->inbuf, Z_BUFSIZE);
-        }
-        while (offset > 0)  {
-            uInt size = Z_BUFSIZE;
-            if (offset < Z_BUFSIZE) size = (uInt)offset;
-
-            size = gzwrite(file, s->inbuf, size);
-            if (size == 0) return -1L;
-
-            offset -= size;
-        }
-        return s->in;
-#endif
-    }
-    /* Rest of function is for reading only */
-
-    /* compute absolute position */
-    if (whence == SEEK_CUR) {
-        offset += s->out;
-    }
-    if (offset < 0) return -1L;
-
-    if (s->transparent) {
-        /* map to fseek */
-        s->back = EOF;
-        s->stream.avail_in = 0;
-        s->stream.next_in = s->inbuf;
-        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
-        s->in = s->out = offset;
-        return offset;
-    }
-
-    /* For a negative seek, rewind and use positive seek */
-    if (offset >= s->out) {
-        offset -= s->out;
-    } else if (gzrewind(file) < 0) {
-        return -1L;
-    }
-    /* offset is now the number of bytes to skip. */
-
-    if (offset != 0 && s->outbuf == Z_NULL) {
-        s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-        if (s->outbuf == Z_NULL) return -1L;
-    }
-    if (offset && s->back != EOF) {
-        s->back = EOF;
-        s->out++;
-        offset--;
-        if (s->last) s->z_err = Z_STREAM_END;
-    }
-    while (offset > 0)  {
-        int size = Z_BUFSIZE;
-        if (offset < Z_BUFSIZE) size = (int)offset;
-
-        size = gzread(file, s->outbuf, (uInt)size);
-        if (size <= 0) return -1L;
-        offset -= size;
-    }
-    return s->out;
-}
-
-/* ===========================================================================
-     Rewinds input file.
-*/
-int ZEXPORT gzrewind (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r') return -1;
-
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->back = EOF;
-    s->stream.avail_in = 0;
-    s->stream.next_in = s->inbuf;
-    s->crc = crc32(0L, Z_NULL, 0);
-    if (!s->transparent) (void)inflateReset(&s->stream);
-    s->in = 0;
-    s->out = 0;
-    return fseek(s->file, s->start, SEEK_SET);
-}
-
-/* ===========================================================================
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
-    gzFile file;
-{
-    return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    /* With concatenated compressed files that can have embedded
-     * crc trailers, z_eof is no longer the only/best indicator of EOF
-     * on a gz_stream. Handle end-of-stream error explicitly here.
-     */
-    if (s == NULL || s->mode != 'r') return 0;
-    if (s->z_eof) return 1;
-    return s->z_err == Z_STREAM_END;
-}
-
-/* ===========================================================================
-   Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
-    FILE *file;
-    uLong x;
-{
-    int n;
-    for (n = 0; n < 4; n++) {
-        fputc((int)(x & 0xff), file);
-        x >>= 8;
-    }
-}
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets z_err in case
-   of error.
-*/
-local uLong getLong (s)
-    gz_stream *s;
-{
-    uLong x = (uLong)get_byte(s);
-    int c;
-
-    x += ((uLong)get_byte(s))<<8;
-    x += ((uLong)get_byte(s))<<16;
-    c = get_byte(s);
-    if (c == EOF) s->z_err = Z_DATA_ERROR;
-    x += ((uLong)c)<<24;
-    return x;
-}
-
-/* ===========================================================================
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state.
-*/
-int ZEXPORT gzclose (file)
-    gzFile file;
-{
-    int err;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return Z_STREAM_ERROR;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return Z_STREAM_ERROR;
-#else
-        err = do_flush (file, Z_FINISH);
-        if (err != Z_OK) return destroy((gz_stream*)file);
-
-        putLong (s->file, s->crc);
-        putLong (s->file, (uLong)(s->in & 0xffffffff));
-#endif
-    }
-    return destroy((gz_stream*)file);
-}
-
-/* ===========================================================================
-     Returns the error message for the last error which occured on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occured in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-const char * ZEXPORT gzerror (file, errnum)
-    gzFile file;
-    int *errnum;
-{
-    char *m;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) {
-        *errnum = Z_STREAM_ERROR;
-        return (const char*)ERR_MSG(Z_STREAM_ERROR);
-    }
-    *errnum = s->z_err;
-    if (*errnum == Z_OK) return (const char*)"";
-
-    m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
-    if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
-    TRYFREE(s->msg);
-    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
-    if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
-    strcpy(s->msg, s->path);
-    strcat(s->msg, ": ");
-    strcat(s->msg, m);
-    return (const char*)s->msg;
-}
-
-/* ===========================================================================
-     Clear the error and end-of-file flags, and do the same for the real file.
-*/
-void ZEXPORT gzclearerr (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return;
-    if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;
-    s->z_eof = 0;
-    clearerr(s->file);
-}
diff --git a/tkimg1.3/libz/infback.c b/tkimg1.3/libz/infback.c
deleted file mode 100644
index 110b03b..0000000
--- a/tkimg1.3/libz/infback.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
-   This code is largely copied from inflate.c.  Normally either infback.o or
-   inflate.o would be linked into an application--not both.  The interface
-   with inffast.c is retained so that optimized assembler-coded versions of
-   inflate_fast() can be used with either inflate.c or infback.c.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   windowBits is in the range 8..15, and window is a user-supplied
-   window and output buffer that is 2**windowBits bytes.
- */
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_stream FAR *strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL ||
-        windowBits < 8 || windowBits > 15)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (voidpf)state;
-    state->wbits = windowBits;
-    state->wsize = 1U << windowBits;
-    state->window = window;
-    state->write = 0;
-    state->whave = 0;
-    return Z_OK;
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-/* Macros for inflateBack(): */
-
-/* Load returned state from inflate_fast() */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Set state from registers for inflate_fast() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = state->window; \
-            left = state->wsize; \
-            state->whave = left; \
-            if (out(out_desc, put, left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_stream FAR *strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    state->mode = TYPE;
-    state->last = 0;
-    state->whave = 0;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = state->window;
-    left = state->wsize;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (state->mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (state->last) {
-                BYTEBITS();
-                state->mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (state->length != 0) {
-                copy = state->length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-
-        case LEN:
-            /* use inflate_fast() if we have enough input and output */
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                if (state->whave < state->wsize)
-                    state->whave = state->wsize - left;
-                inflate_fast(strm, state->wsize);
-                LOAD();
-                break;
-            }
-
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-
-            /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                ROOM();
-                *put++ = (unsigned char)(state->length);
-                left--;
-                state->mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-
-            /* get distance code */
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-
-            /* get distance extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            if (state->offset > state->wsize - (state->whave < state->wsize ?
-                                                left : 0)) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = state->wsize - state->offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - state->offset;
-                    copy = left;
-                }
-                if (copy > state->length) copy = state->length;
-                state->length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (state->length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < state->wsize) {
-                if (out(out_desc, state->window, state->wsize - left))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBackEnd(strm)
-z_stream FAR *strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
diff --git a/tkimg1.3/libz/inffast.c b/tkimg1.3/libz/inffast.c
deleted file mode 100644
index c716440..0000000
--- a/tkimg1.3/libz/inffast.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
-   Based on testing to date,
-   Pre-increment preferred for:
-   - PowerPC G3 (Adler)
-   - MIPS R5000 (Randers-Pehrson)
-   Post-increment preferred for:
-   - none
-   No measurable difference:
-   - Pentium III (Anderson)
-   - 68060 (Nikl)
- */
-#ifdef POSTINC
-#  define OFF 0
-#  define PUP(a) *(a)++
-#else
-#  define OFF 1
-#  define PUP(a) *++(a)
-#endif
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *in;      /* local strm->next_in */
-    unsigned char FAR *last;    /* while in < last, enough input available */
-    unsigned char FAR *out;     /* local strm->next_out */
-    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
-    unsigned char FAR *end;     /* while out < end, enough space available */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
-    unsigned long hold;         /* local strm->hold */
-    unsigned bits;              /* local strm->bits */
-    code const FAR *lcode;      /* local strm->lencode */
-    code const FAR *dcode;      /* local strm->distcode */
-    unsigned lmask;             /* mask for first level of length codes */
-    unsigned dmask;             /* mask for first level of distance codes */
-    code this;                  /* retrieved table entry */
-    unsigned op;                /* code bits, operation, extra bits, or */
-                                /*  window position, window bytes to copy */
-    unsigned len;               /* match length, unused bytes */
-    unsigned dist;              /* match distance */
-    unsigned char FAR *from;    /* where to copy match from */
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    in = strm->next_in - OFF;
-    last = in + (strm->avail_in - 5);
-    out = strm->next_out - OFF;
-    beg = out - (start - strm->avail_out);
-    end = out + (strm->avail_out - 257);
-    wsize = state->wsize;
-    whave = state->whave;
-    write = state->write;
-    window = state->window;
-    hold = state->hold;
-    bits = state->bits;
-    lcode = state->lencode;
-    dcode = state->distcode;
-    lmask = (1U << state->lenbits) - 1;
-    dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-    do {
-        if (bits < 15) {
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-        }
-        this = lcode[hold & lmask];
-      dolen:
-        op = (unsigned)(this.bits);
-        hold >>= op;
-        bits -= op;
-        op = (unsigned)(this.op);
-        if (op == 0) {                          /* literal */
-            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                    "inflate:         literal '%c'\n" :
-                    "inflate:         literal 0x%02x\n", this.val));
-            PUP(out) = (unsigned char)(this.val);
-        }
-        else if (op & 16) {                     /* length base */
-            len = (unsigned)(this.val);
-            op &= 15;                           /* number of extra bits */
-            if (op) {
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                }
-                len += (unsigned)hold & ((1U << op) - 1);
-                hold >>= op;
-                bits -= op;
-            }
-            Tracevv((stderr, "inflate:         length %u\n", len));
-            if (bits < 15) {
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-            }
-            this = dcode[hold & dmask];
-          dodist:
-            op = (unsigned)(this.bits);
-            hold >>= op;
-            bits -= op;
-            op = (unsigned)(this.op);
-            if (op & 16) {                      /* distance base */
-                dist = (unsigned)(this.val);
-                op &= 15;                       /* number of extra bits */
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                    if (bits < op) {
-                        hold += (unsigned long)(PUP(in)) << bits;
-                        bits += 8;
-                    }
-                }
-                dist += (unsigned)hold & ((1U << op) - 1);
-                hold >>= op;
-                bits -= op;
-                Tracevv((stderr, "inflate:         distance %u\n", dist));
-                op = (unsigned)(out - beg);     /* max distance in output */
-                if (dist > op) {                /* see if copy from window */
-                    op = dist - op;             /* distance back in window */
-                    if (op > whave) {
-                        strm->msg = (char *)"invalid distance too far back";
-                        state->mode = BAD;
-                        break;
-                    }
-                    from = window - OFF;
-                    if (write == 0) {           /* very common case */
-                        from += wsize - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    else if (write < op) {      /* wrap around window */
-                        from += wsize + write - op;
-                        op -= write;
-                        if (op < len) {         /* some from end of window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = window - OFF;
-                            if (write < len) {  /* some from start of window */
-                                op = write;
-                                len -= op;
-                                do {
-                                    PUP(out) = PUP(from);
-                                } while (--op);
-                                from = out - dist;      /* rest from output */
-                            }
-                        }
-                    }
-                    else {                      /* contiguous in window */
-                        from += write - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    while (len > 2) {
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    }
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-                else {
-                    from = out - dist;          /* copy direct from output */
-                    do {                        /* minimum length is three */
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    } while (len > 2);
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-            }
-            else if ((op & 64) == 0) {          /* 2nd level distance code */
-                this = dcode[this.val + (hold & ((1U << op) - 1))];
-                goto dodist;
-            }
-            else {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-        }
-        else if ((op & 64) == 0) {              /* 2nd level length code */
-            this = lcode[this.val + (hold & ((1U << op) - 1))];
-            goto dolen;
-        }
-        else if (op & 32) {                     /* end-of-block */
-            Tracevv((stderr, "inflate:         end of block\n"));
-            state->mode = TYPE;
-            break;
-        }
-        else {
-            strm->msg = (char *)"invalid literal/length code";
-            state->mode = BAD;
-            break;
-        }
-    } while (in < last && out < end);
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    len = bits >> 3;
-    in -= len;
-    bits -= len << 3;
-    hold &= (1U << bits) - 1;
-
-    /* update state and return */
-    strm->next_in = in + OFF;
-    strm->next_out = out + OFF;
-    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
-    strm->avail_out = (unsigned)(out < end ?
-                                 257 + (end - out) : 257 - (out - end));
-    state->hold = hold;
-    state->bits = bits;
-    return;
-}
-
-/*
-   inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
-   - Using bit fields for code structure
-   - Different op definition to avoid & for extra bits (do & for table bits)
-   - Three separate decoding do-loops for direct, window, and write == 0
-   - Special case for distance > 1 copies to do overlapped load and store copy
-   - Explicit branch predictions (based on measured branch probabilities)
-   - Deferring match copy and interspersed it with decoding subsequent codes
-   - Swapping literal/length else
-   - Swapping window/direct else
-   - Larger unrolled copy loops (three is about right)
-   - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
diff --git a/tkimg1.3/libz/inffast.h b/tkimg1.3/libz/inffast.h
deleted file mode 100644
index 1e88d2d..0000000
--- a/tkimg1.3/libz/inffast.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-void inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/tkimg1.3/libz/inffixed.h b/tkimg1.3/libz/inffixed.h
deleted file mode 100644
index 75ed4b5..0000000
--- a/tkimg1.3/libz/inffixed.h
+++ /dev/null
@@ -1,94 +0,0 @@
-    /* inffixed.h -- table for decoding fixed codes
-     * Generated automatically by makefixed().
-     */
-
-    /* WARNING: this file should *not* be used by applications. It
-       is part of the implementation of the compression library and
-       is subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
-        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
-        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
-        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
-        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
-        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
-        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
-        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
-        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
-        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
-        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
-        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
-        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
-        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
-        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
-        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
-        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
-        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
-        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
-        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
-        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
-        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
-        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
-        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
-        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
-        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
-        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
-        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
-        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
-        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
-        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
-        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
-        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
-        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
-        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
-        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
-        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
-        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
-        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
-        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
-        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
-        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
-        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
-        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
-        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
-        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
-        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
-        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
-        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
-        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
-        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
-        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
-        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
-        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
-        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
-        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
-        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
-        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
-        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
-        {0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
-        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
-        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
-        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
-        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
-        {22,5,193},{64,5,0}
-    };
diff --git a/tkimg1.3/libz/inflate.c b/tkimg1.3/libz/inflate.c
deleted file mode 100644
index a53b5c7..0000000
--- a/tkimg1.3/libz/inflate.c
+++ /dev/null
@@ -1,1270 +0,0 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0    24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- *   creation of window when not needed, minimize use of window when it is
- *   needed, make inffast.c even faster, implement gzip decoding, and to
- *   improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1    25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2    4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- *   to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3    22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- *   buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4    1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- *   source file infback.c to provide a call-back interface to inflate for
- *   programs like gzip and unzip -- uses window as output buffer to avoid
- *   window copying
- *
- * 1.2.beta5    1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- *   input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6    4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- *   make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7    27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0        9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- *   for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- *   and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-#  ifndef BUILDFIXED
-#    define BUILDFIXED
-#  endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
-#ifdef BUILDFIXED
-   void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
-                              unsigned len));
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    strm->total_in = strm->total_out = state->total = 0;
-    strm->msg = Z_NULL;
-    state->mode = HEAD;
-    state->last = 0;
-    state->havedict = 0;
-    state->wsize = 0;
-    state->whave = 0;
-    state->hold = 0;
-    state->bits = 0;
-    state->lencode = state->distcode = state->next = state->codes;
-    Tracev((stderr, "inflate: reset\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)
-            ZALLOC(strm, 1, sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (voidpf)state;
-    if (windowBits < 0) {
-        state->wrap = 0;
-        windowBits = -windowBits;
-    }
-    else {
-        state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
-        if (windowBits < 48) windowBits &= 15;
-#endif
-    }
-    if (windowBits < 8 || windowBits > 15) {
-        ZFREE(strm, state);
-        strm->state = Z_NULL;
-        return Z_STREAM_ERROR;
-    }
-    state->wbits = (unsigned)windowBits;
-    state->window = Z_NULL;
-    return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
-    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
-   Write out the inffixed.h that is #include'd above.  Defining MAKEFIXED also
-   defines BUILDFIXED, so the tables are built on the fly.  makefixed() writes
-   those tables to stdout, which would be piped to inffixed.h.  A small program
-   can simply call makefixed to do this:
-
-    void makefixed(void);
-
-    int main(void)
-    {
-        makefixed();
-        return 0;
-    }
-
-   Then that can be linked with zlib built with MAKEFIXED defined and run:
-
-    a.out > inffixed.h
- */
-void makefixed()
-{
-    unsigned low, size;
-    struct inflate_state state;
-
-    fixedtables(&state);
-    puts("    /* inffixed.h -- table for decoding fixed codes");
-    puts("     * Generated automatically by makefixed().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 7) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
-               state.lencode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
-               state.distcode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/*
-   Update the window with the last wsize (normally 32K) bytes written before
-   returning.  If window does not exist yet, create it.  This is only called
-   when a window is already in use, or when output has been written during this
-   inflate call, but the end of the deflate stream has not been reached yet.
-   It is also called to create a window for dictionary data when a dictionary
-   is loaded.
-
-   Providing output buffers larger than 32K to inflate() should provide a speed
-   advantage, since only the last 32K of output is copied to the sliding window
-   upon return from inflate(), and since all distances after the first 32K of
-   output will fall in the output data, making match copies simpler and faster.
-   The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
-{
-    struct inflate_state FAR *state;
-    unsigned copy, dist;
-
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* if it hasn't been done already, allocate space for the window */
-    if (state->window == Z_NULL) {
-        state->window = (unsigned char FAR *)
-                        ZALLOC(strm, 1U << state->wbits,
-                               sizeof(unsigned char));
-        if (state->window == Z_NULL) return 1;
-    }
-
-    /* if window not in use yet, initialize */
-    if (state->wsize == 0) {
-        state->wsize = 1U << state->wbits;
-        state->write = 0;
-        state->whave = 0;
-    }
-
-    /* copy state->wsize or less output bytes into the circular window */
-    copy = out - strm->avail_out;
-    if (copy >= state->wsize) {
-        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
-        state->write = 0;
-        state->whave = state->wsize;
-    }
-    else {
-        dist = state->wsize - state->write;
-        if (dist > copy) dist = copy;
-        zmemcpy(state->window + state->write, strm->next_out - copy, dist);
-        copy -= dist;
-        if (copy) {
-            zmemcpy(state->window, strm->next_out - copy, copy);
-            state->write = copy;
-            state->whave = state->wsize;
-        }
-        else {
-            state->write += dist;
-            if (state->write == state->wsize) state->write = 0;
-            if (state->whave < state->wsize) state->whave += dist;
-        }
-    }
-    return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-#  define UPDATE(check, buf, len) \
-    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-#  define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-#  define CRC2(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        check = crc32(check, hbuf, 2); \
-    } while (0)
-
-#  define CRC4(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        hbuf[2] = (unsigned char)((word) >> 16); \
-        hbuf[3] = (unsigned char)((word) >> 24); \
-        check = crc32(check, hbuf, 4); \
-    } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
-   if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        if (have == 0) goto inf_leave; \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
-    ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-     (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-/*
-   inflate() uses a state machine to process as much input data and generate as
-   much output data as possible before returning.  The state machine is
-   structured roughly as follows:
-
-    for (;;) switch (state) {
-    ...
-    case STATEn:
-        if (not enough input data or output space to make progress)
-            return;
-        ... make progress ...
-        state = STATEm;
-        break;
-    ...
-    }
-
-   so when inflate() is called again, the same case is attempted again, and
-   if the appropriate resources are provided, the machine proceeds to the
-   next state.  The NEEDBITS() macro is usually the way the state evaluates
-   whether it can proceed or should return.  NEEDBITS() does the return if
-   the requested bits are not available.  The typical use of the BITS macros
-   is:
-
-        NEEDBITS(n);
-        ... do something with BITS(n) ...
-        DROPBITS(n);
-
-   where NEEDBITS(n) either returns from inflate() if there isn't enough
-   input left to load n bits into the accumulator, or it continues.  BITS(n)
-   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
-   the low n bits off the accumulator.  INITBITS() clears the accumulator
-   and sets the number of available bits to zero.  BYTEBITS() discards just
-   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
-   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
-   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
-   if there is no input available.  The decoding of variable length codes uses
-   PULLBYTE() directly in order to pull just enough bytes to decode the next
-   code, and no more.
-
-   Some states loop until they get enough input, making sure that enough
-   state information is maintained to continue the loop where it left off
-   if NEEDBITS() returns in the loop.  For example, want, need, and keep
-   would all have to actually be part of the saved state in case NEEDBITS()
-   returns:
-
-    case STATEw:
-        while (want < need) {
-            NEEDBITS(n);
-            keep[want++] = BITS(n);
-            DROPBITS(n);
-        }
-        state = STATEx;
-    case STATEx:
-
-   As shown above, if the next state is also the next case, then the break
-   is omitted.
-
-   A state may also return if there is not enough output space available to
-   complete that state.  Those states are copying stored data, writing a
-   literal byte, and copying a matching string.
-
-   When returning, a "goto inf_leave" is used to update the total counters,
-   update the check value, and determine whether any progress has been made
-   during that inflate() call in order to return the proper return code.
-   Progress is defined as a change in either strm->avail_in or strm->avail_out.
-   When there is a window, goto inf_leave will update the window with the last
-   output written.  If a goto inf_leave occurs in the middle of decompression
-   and there is no window currently, goto inf_leave will create one and copy
-   output to the window for the next call of inflate().
-
-   In this implementation, the flush parameter of inflate() only affects the
-   return code (per zlib.h).  inflate() always writes as much as possible to
-   strm->next_out, given the space available and the provided input--the effect
-   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
-   the allocation of and copying into a sliding window until necessary, which
-   provides the effect documented in zlib.h for Z_FINISH when the entire input
-   stream available.  So the only thing the flush parameter actually does is:
-   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
-   will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned in, out;           /* save starting available input and output */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-#ifdef GUNZIP
-    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
-#endif
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0))
-        return Z_STREAM_ERROR;
-
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
-    LOAD();
-    in = have;
-    out = left;
-    ret = Z_OK;
-    for (;;)
-        switch (state->mode) {
-        case HEAD:
-            if (state->wrap == 0) {
-                state->mode = TYPEDO;
-                break;
-            }
-            NEEDBITS(16);
-#ifdef GUNZIP
-            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
-                state->check = crc32(0L, Z_NULL, 0);
-                CRC2(state->check, hold);
-                INITBITS();
-                state->mode = FLAGS;
-                break;
-            }
-            state->flags = 0;           /* expect zlib header */
-            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
-#else
-            if (
-#endif
-                ((BITS(8) << 8) + (hold >> 8)) % 31) {
-                strm->msg = (char *)"incorrect header check";
-                state->mode = BAD;
-                break;
-            }
-            if (BITS(4) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            DROPBITS(4);
-            if (BITS(4) + 8 > state->wbits) {
-                strm->msg = (char *)"invalid window size";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:   zlib header ok\n"));
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = hold & 0x200 ? DICTID : TYPE;
-            INITBITS();
-            break;
-#ifdef GUNZIP
-        case FLAGS:
-            NEEDBITS(16);
-            state->flags = (int)(hold);
-            if ((state->flags & 0xff) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            if (state->flags & 0xe000) {
-                strm->msg = (char *)"unknown header flags set";
-                state->mode = BAD;
-                break;
-            }
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = TIME;
-        case TIME:
-            NEEDBITS(32);
-            if (state->flags & 0x0200) CRC4(state->check, hold);
-            INITBITS();
-            state->mode = OS;
-        case OS:
-            NEEDBITS(16);
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = EXLEN;
-        case EXLEN:
-            if (state->flags & 0x0400) {
-                NEEDBITS(16);
-                state->length = (unsigned)(hold);
-                if (state->flags & 0x0200) CRC2(state->check, hold);
-                INITBITS();
-            }
-            state->mode = EXTRA;
-        case EXTRA:
-            if (state->flags & 0x0400) {
-                copy = state->length;
-                if (copy > have) copy = have;
-                if (copy) {
-                    if (state->flags & 0x0200)
-                        state->check = crc32(state->check, next, copy);
-                    have -= copy;
-                    next += copy;
-                    state->length -= copy;
-                }
-                if (state->length) goto inf_leave;
-            }
-            state->mode = NAME;
-        case NAME:
-            if (state->flags & 0x0800) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                } while (len && copy < have);
-                if (state->flags & 0x02000)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            state->mode = COMMENT;
-        case COMMENT:
-            if (state->flags & 0x1000) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                } while (len && copy < have);
-                if (state->flags & 0x02000)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            state->mode = HCRC;
-        case HCRC:
-            if (state->flags & 0x0200) {
-                NEEDBITS(16);
-                if (hold != (state->check & 0xffff)) {
-                    strm->msg = (char *)"header crc mismatch";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-            }
-            strm->adler = state->check = crc32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-            break;
-#endif
-        case DICTID:
-            NEEDBITS(32);
-            strm->adler = state->check = REVERSE(hold);
-            INITBITS();
-            state->mode = DICT;
-        case DICT:
-            if (state->havedict == 0) {
-                RESTORE();
-                return Z_NEED_DICT;
-            }
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-        case TYPE:
-            if (flush == Z_BLOCK) goto inf_leave;
-        case TYPEDO:
-            if (state->last) {
-                BYTEBITS();
-                state->mode = CHECK;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-        case STORED:
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-            state->mode = COPY;
-        case COPY:
-            copy = state->length;
-            if (copy) {
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                if (copy == 0) goto inf_leave;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-                break;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-        case TABLE:
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-            state->have = 0;
-            state->mode = LENLENS;
-        case LENLENS:
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-            state->have = 0;
-            state->mode = CODELENS;
-        case CODELENS:
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = state->lens[state->have - 1];
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-        case LEN:
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                inflate_fast(strm, out);
-                LOAD();
-                break;
-            }
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-            if ((int)(this.op) == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                state->mode = LIT;
-                break;
-            }
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = LENEXT;
-        case LENEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-            state->mode = DIST;
-        case DIST:
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = DISTEXT;
-        case DISTEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            if (state->offset > state->whave + out - left) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-            state->mode = MATCH;
-        case MATCH:
-            if (left == 0) goto inf_leave;
-            copy = out - left;
-            if (state->offset > copy) {         /* copy from window */
-                copy = state->offset - copy;
-                if (copy > state->write) {
-                    copy -= state->write;
-                    from = state->window + (state->wsize - copy);
-                }
-                else
-                    from = state->window + (state->write - copy);
-                if (copy > state->length) copy = state->length;
-            }
-            else {                              /* copy from output */
-                from = put - state->offset;
-                copy = state->length;
-            }
-            if (copy > left) copy = left;
-            left -= copy;
-            state->length -= copy;
-            do {
-                *put++ = *from++;
-            } while (--copy);
-            if (state->length == 0) state->mode = LEN;
-            break;
-        case LIT:
-            if (left == 0) goto inf_leave;
-            *put++ = (unsigned char)(state->length);
-            left--;
-            state->mode = LEN;
-            break;
-        case CHECK:
-            if (state->wrap) {
-                NEEDBITS(32);
-                out -= left;
-                strm->total_out += out;
-                state->total += out;
-                if (out)
-                    strm->adler = state->check =
-                        UPDATE(state->check, put - out, out);
-                out = left;
-                if ((
-#ifdef GUNZIP
-                     state->flags ? hold :
-#endif
-                     REVERSE(hold)) != state->check) {
-                    strm->msg = (char *)"incorrect data check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   check matches trailer\n"));
-            }
-#ifdef GUNZIP
-            state->mode = LENGTH;
-        case LENGTH:
-            if (state->wrap && state->flags) {
-                NEEDBITS(32);
-                if (hold != (state->total & 0xffffffffUL)) {
-                    strm->msg = (char *)"incorrect length check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   length matches trailer\n"));
-            }
-#endif
-            state->mode = DONE;
-        case DONE:
-            ret = Z_STREAM_END;
-            goto inf_leave;
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-        case MEM:
-            return Z_MEM_ERROR;
-        case SYNC:
-        default:
-            return Z_STREAM_ERROR;
-        }
-
-    /*
-       Return from inflate(), updating the total counts and the check value.
-       If there was no progress during the inflate() call, return a buffer
-       error.  Call updatewindow() to create and/or update the window state.
-       Note: a memory error from inflate() is non-recoverable.
-     */
-  inf_leave:
-    RESTORE();
-    if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
-        if (updatewindow(strm, out)) {
-            state->mode = MEM;
-            return Z_MEM_ERROR;
-        }
-    in -= strm->avail_in;
-    out -= strm->avail_out;
-    strm->total_in += in;
-    strm->total_out += out;
-    state->total += out;
-    if (state->wrap && out)
-        strm->adler = state->check =
-            UPDATE(state->check, strm->next_out - out, out);
-    strm->data_type = state->bits + (state->last ? 64 : 0) +
-                      (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
-    return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
-    struct inflate_state FAR *state;
-    unsigned long id;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->mode != DICT) return Z_STREAM_ERROR;
-
-    /* check for correct dictionary id */
-    id = adler32(0L, Z_NULL, 0);
-    id = adler32(id, dictionary, dictLength);
-    if (id != state->check) return Z_DATA_ERROR;
-
-    /* copy dictionary to window */
-    if (updatewindow(strm, strm->avail_out)) {
-        state->mode = MEM;
-        return Z_MEM_ERROR;
-    }
-    if (dictLength > state->wsize) {
-        zmemcpy(state->window, dictionary + dictLength - state->wsize,
-                state->wsize);
-        state->whave = state->wsize;
-    }
-    else {
-        zmemcpy(state->window + state->wsize - dictLength, dictionary,
-                dictLength);
-        state->whave = dictLength;
-    }
-    state->havedict = 1;
-    Tracev((stderr, "inflate:   dictionary set\n"));
-    return Z_OK;
-}
-
-/*
-   Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
-   or when out of input.  When called, *have is the number of pattern bytes
-   found in order so far, in 0..3.  On return *have is updated to the new
-   state.  If on return *have equals four, then the pattern was found and the
-   return value is how many bytes were read including the last byte of the
-   pattern.  If *have is less than four, then the pattern has not been found
-   yet and the return value is len.  In the latter case, syncsearch() can be
-   called again with more data and the *have state.  *have is initialized to
-   zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
-{
-    unsigned got;
-    unsigned next;
-
-    got = *have;
-    next = 0;
-    while (next < len && got < 4) {
-        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
-            got++;
-        else if (buf[next])
-            got = 0;
-        else
-            got = 4 - got;
-        next++;
-    }
-    *have = got;
-    return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
-    unsigned len;               /* number of bytes to look at or looked at */
-    unsigned long in, out;      /* temporary to save total_in and total_out */
-    unsigned char buf[4];       /* to restore bit buffer to byte string */
-    struct inflate_state FAR *state;
-
-    /* check parameters */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
-    /* if first time, start search in bit buffer */
-    if (state->mode != SYNC) {
-        state->mode = SYNC;
-        state->hold <<= state->bits & 7;
-        state->bits -= state->bits & 7;
-        len = 0;
-        while (state->bits >= 8) {
-            buf[len++] = (unsigned char)(state->hold);
-            state->hold >>= 8;
-            state->bits -= 8;
-        }
-        state->have = 0;
-        syncsearch(&(state->have), buf, len);
-    }
-
-    /* search available input */
-    len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
-    strm->avail_in -= len;
-    strm->next_in += len;
-    strm->total_in += len;
-
-    /* return no joy or set up to restart inflate() on a new block */
-    if (state->have != 4) return Z_DATA_ERROR;
-    in = strm->total_in;  out = strm->total_out;
-    inflateReset(strm);
-    strm->total_in = in;  strm->total_out = out;
-    state->mode = TYPE;
-    return Z_OK;
-}
-
-/*
-   Returns true if inflate is currently at the end of a block generated by
-   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
-   implementation to provide an additional safety check. PPP uses
-   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
-   block. When decompressing, PPP checks that at the end of input packet,
-   inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
-    struct inflate_state FAR *state;
-    struct inflate_state FAR *copy;
-    unsigned char FAR *window;
-
-    /* check input */
-    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
-        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)source->state;
-
-    /* allocate space */
-    copy = (struct inflate_state FAR *)
-           ZALLOC(source, 1, sizeof(struct inflate_state));
-    if (copy == Z_NULL) return Z_MEM_ERROR;
-    window = Z_NULL;
-    if (state->window != Z_NULL) {
-        window = (unsigned char FAR *)
-                 ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
-        if (window == Z_NULL) {
-            ZFREE(source, copy);
-            return Z_MEM_ERROR;
-        }
-    }
-
-    /* copy state */
-    *dest = *source;
-    *copy = *state;
-    copy->lencode = copy->codes + (state->lencode - state->codes);
-    copy->distcode = copy->codes + (state->distcode - state->codes);
-    copy->next = copy->codes + (state->next - state->codes);
-    if (window != Z_NULL)
-        zmemcpy(window, state->window, 1U << state->wbits);
-    copy->window = window;
-    dest->state = (voidpf)copy;
-    return Z_OK;
-}
diff --git a/tkimg1.3/libz/inflate.h b/tkimg1.3/libz/inflate.h
deleted file mode 100644
index 9a12c8f..0000000
--- a/tkimg1.3/libz/inflate.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip decoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-    HEAD,       /* i: waiting for magic header */
-#ifdef GUNZIP
-    FLAGS,      /* i: waiting for method and flags (gzip) */
-    TIME,       /* i: waiting for modification time (gzip) */
-    OS,         /* i: waiting for extra flags and operating system (gzip) */
-    EXLEN,      /* i: waiting for extra length (gzip) */
-    EXTRA,      /* i: waiting for extra bytes (gzip) */
-    NAME,       /* i: waiting for end of file name (gzip) */
-    COMMENT,    /* i: waiting for end of comment (gzip) */
-    HCRC,       /* i: waiting for header crc (gzip) */
-#endif
-    DICTID,     /* i: waiting for dictionary check value */
-    DICT,       /* waiting for inflateSetDictionary() call */
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        COPY,       /* i/o: waiting for input or output to copy stored block */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-        LENLENS,    /* i: waiting for code length code lengths */
-        CODELENS,   /* i: waiting for length/lit and distance code lengths */
-            LEN,        /* i: waiting for length/lit code */
-            LENEXT,     /* i: waiting for length extra bits */
-            DIST,       /* i: waiting for distance code */
-            DISTEXT,    /* i: waiting for distance extra bits */
-            MATCH,      /* o: waiting for output space to copy string */
-            LIT,        /* o: waiting for output space to write literal */
-    CHECK,      /* i: waiting for 32-bit check value */
-#ifdef GUNZIP
-    LENGTH,     /* i: waiting for 32-bit length (gzip) */
-#endif
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD,        /* got a data error -- remain here until reset */
-    MEM,        /* got an inflate() memory error -- remain here until reset */
-    SYNC        /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to the BAD or MEM mode -- not shown for clarity)
-
-    Process header:
-        HEAD -> (gzip) or (zlib)
-        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
-        NAME -> COMMENT -> HCRC -> TYPE
-        (zlib) -> DICTID or TYPE
-        DICTID -> DICT -> TYPE
-    Read deflate blocks:
-            TYPE -> STORED or TABLE or LEN or CHECK
-            STORED -> COPY -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN
-    Read deflate codes:
-                LEN -> LENEXT or LIT or TYPE
-                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
-                LIT -> LEN
-    Process trailer:
-        CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls.  Approximately 7K bytes. */
-struct inflate_state {
-    inflate_mode mode;          /* current inflate mode */
-    int last;                   /* true if processing last block */
-    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
-    int havedict;               /* true if dictionary provided */
-    int flags;                  /* gzip header method and flags (0 if zlib) */
-    unsigned long check;        /* protected copy of check value */
-    unsigned long total;        /* protected copy of output count */
-        /* sliding window */
-    unsigned wbits;             /* log base 2 of requested window size */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* bit accumulator */
-    unsigned long hold;         /* input bit accumulator */
-    unsigned bits;              /* number of bits in "in" */
-        /* for string and stored block copying */
-    unsigned length;            /* literal or length of data to copy */
-    unsigned offset;            /* distance back to copy string from */
-        /* for table and code decoding */
-    unsigned extra;             /* extra bits needed */
-        /* fixed and dynamic code tables */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-};
diff --git a/tkimg1.3/libz/inftrees.c b/tkimg1.3/libz/inftrees.c
deleted file mode 100644
index 3bb5639..0000000
--- a/tkimg1.3/libz/inftrees.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
-   " inflate 1.2.1 Copyright 1995-2003 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code this;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 76, 66};
-    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577, 0, 0};
-    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
-        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
-        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
-        28, 28, 29, 29, 64, 64};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) return -1;            /* no codes! */
-    for (min = 1; min <= MAXBITS; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || (codes - count[0] != 1)))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        this.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            this.op = (unsigned char)0;
-            this.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            this.op = (unsigned char)(extra[work[sym]]);
-            this.val = base[work[sym]];
-        }
-        else {
-            this.op = (unsigned char)(32 + 64);         /* end of block */
-            this.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = this;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += 1U << curr;
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /*
-       Fill in rest of table for incomplete codes.  This loop is similar to the
-       loop above in incrementing huff for table indices.  It is assumed that
-       len is equal to curr + drop, so there is no loop needed to increment
-       through high index bits.  When the current sub-table is filled, the loop
-       drops back to the root table to fill in any remaining entries there.
-     */
-    this.op = (unsigned char)64;                /* invalid code marker */
-    this.bits = (unsigned char)(len - drop);
-    this.val = (unsigned short)0;
-    while (huff != 0) {
-        /* when done with sub-table, drop back to root table */
-        if (drop != 0 && (huff & mask) != low) {
-            drop = 0;
-            len = root;
-            next = *table;
-            curr = root;
-            this.bits = (unsigned char)len;
-        }
-
-        /* put invalid code marker in table */
-        next[huff >> drop] = this;
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
diff --git a/tkimg1.3/libz/inftrees.h b/tkimg1.3/libz/inftrees.h
deleted file mode 100644
index 82d365a..0000000
--- a/tkimg1.3/libz/inftrees.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    0001eeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1004 code structures (850 for length/literals
-   and 154 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 1440
-#define MAXD 154
-
-/* Type of code to build for inftable() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
diff --git a/tkimg1.3/libz/minigzip.c b/tkimg1.3/libz/minigzip.c
deleted file mode 100644
index 0d14997..0000000
--- a/tkimg1.3/libz/minigzip.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-2002 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * minigzip is a minimal implementation of the gzip utility. This is
- * only an example of using zlib and isn't meant to replace the
- * full-featured gzip. No attempt is made to deal with file systems
- * limiting names to 14 or 8+3 characters, etc... Error checking is
- * very limited. So use minigzip only for testing; use gzip for the
- * real thing. On MSDOS, use only on file names without extension
- * or in pipe mode.
- */
-
-/* @(#) $Id: minigzip.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#else
-   extern void exit  OF((int));
-#endif
-
-#ifdef USE_MMAP
-#  include <sys/types.h>
-#  include <sys/mman.h>
-#  include <sys/stat.h>
-#endif
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
-#  include <fcntl.h>
-#  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#  define SET_BINARY_MODE(file)
-#endif
-
-#ifdef VMS
-#  define unlink delete
-#  define GZ_SUFFIX "-gz"
-#endif
-#ifdef RISCOS
-#  define unlink remove
-#  define GZ_SUFFIX "-gz"
-#  define fileno(file) file->__file
-#endif
-#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#  include <unix.h> /* for fileno */
-#endif
-
-#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
-  extern int unlink OF((const char *));
-#endif
-
-#ifndef GZ_SUFFIX
-#  define GZ_SUFFIX ".gz"
-#endif
-#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)
-
-#define BUFLEN      16384
-#define MAX_NAME_LEN 1024
-
-#ifdef MAXSEG_64K
-#  define local static
-   /* Needed for systems with limitation on stack size. */
-#else
-#  define local
-#endif
-
-char *prog;
-
-void error            OF((const char *msg));
-void gz_compress      OF((FILE   *in, gzFile out));
-#ifdef USE_MMAP
-int  gz_compress_mmap OF((FILE   *in, gzFile out));
-#endif
-void gz_uncompress    OF((gzFile in, FILE   *out));
-void file_compress    OF((char  *file, char *mode));
-void file_uncompress  OF((char  *file));
-int  main             OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Display error message and exit
- */
-void error(msg)
-    const char *msg;
-{
-    fprintf(stderr, "%s: %s\n", prog, msg);
-    exit(1);
-}
-
-/* ===========================================================================
- * Compress input to output then close both files.
- */
-
-void gz_compress(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-#ifdef USE_MMAP
-    /* Try first compressing with mmap. If mmap fails (minigzip used in a
-     * pipe), use the normal fread loop.
-     */
-    if (gz_compress_mmap(in, out) == Z_OK) return;
-#endif
-    for (;;) {
-        len = (int)fread(buf, 1, sizeof(buf), in);
-        if (ferror(in)) {
-            perror("fread");
-            exit(1);
-        }
-        if (len == 0) break;
-
-        if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
-    }
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-}
-
-#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech at eso.org> */
-
-/* Try compressing the input file at once using mmap. Return Z_OK if
- * if success, Z_ERRNO otherwise.
- */
-int gz_compress_mmap(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    int len;
-    int err;
-    int ifd = fileno(in);
-    caddr_t buf;    /* mmap'ed buffer for the entire input file */
-    off_t buf_len;  /* length of the input file */
-    struct stat sb;
-
-    /* Determine the size of the file, needed for mmap: */
-    if (fstat(ifd, &sb) < 0) return Z_ERRNO;
-    buf_len = sb.st_size;
-    if (buf_len <= 0) return Z_ERRNO;
-
-    /* Now do the actual mmap: */
-    buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
-    if (buf == (caddr_t)(-1)) return Z_ERRNO;
-
-    /* Compress the whole file at once: */
-    len = gzwrite(out, (char *)buf, (unsigned)buf_len);
-
-    if (len != (int)buf_len) error(gzerror(out, &err));
-
-    munmap(buf, buf_len);
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-    return Z_OK;
-}
-#endif /* USE_MMAP */
-
-/* ===========================================================================
- * Uncompress input to output then close both files.
- */
-void gz_uncompress(in, out)
-    gzFile in;
-    FILE   *out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-    for (;;) {
-        len = gzread(in, buf, sizeof(buf));
-        if (len < 0) error (gzerror(in, &err));
-        if (len == 0) break;
-
-        if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-            error("failed fwrite");
-        }
-    }
-    if (fclose(out)) error("failed fclose");
-
-    if (gzclose(in) != Z_OK) error("failed gzclose");
-}
-
-
-/* ===========================================================================
- * Compress the given file: create a corresponding .gz file and remove the
- * original.
- */
-void file_compress(file, mode)
-    char  *file;
-    char  *mode;
-{
-    local char outfile[MAX_NAME_LEN];
-    FILE  *in;
-    gzFile out;
-
-    strcpy(outfile, file);
-    strcat(outfile, GZ_SUFFIX);
-
-    in = fopen(file, "rb");
-    if (in == NULL) {
-        perror(file);
-        exit(1);
-    }
-    out = gzopen(outfile, mode);
-    if (out == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-        exit(1);
-    }
-    gz_compress(in, out);
-
-    unlink(file);
-}
-
-
-/* ===========================================================================
- * Uncompress the given file and remove the original.
- */
-void file_uncompress(file)
-    char  *file;
-{
-    local char buf[MAX_NAME_LEN];
-    char *infile, *outfile;
-    FILE  *out;
-    gzFile in;
-    uInt len = (uInt)strlen(file);
-
-    strcpy(buf, file);
-
-    if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
-        infile = file;
-        outfile = buf;
-        outfile[len-3] = '\0';
-    } else {
-        outfile = file;
-        infile = buf;
-        strcat(infile, GZ_SUFFIX);
-    }
-    in = gzopen(infile, "rb");
-    if (in == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-        exit(1);
-    }
-    out = fopen(outfile, "wb");
-    if (out == NULL) {
-        perror(file);
-        exit(1);
-    }
-
-    gz_uncompress(in, out);
-
-    unlink(infile);
-}
-
-
-/* ===========================================================================
- * Usage:  minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
- *   -d : decompress
- *   -f : compress with Z_FILTERED
- *   -h : compress with Z_HUFFMAN_ONLY
- *   -r : compress with Z_RLE
- *   -1 to -9 : compression level
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    int uncompr = 0;
-    gzFile file;
-    char outmode[20];
-
-    strcpy(outmode, "wb6 ");
-
-    prog = argv[0];
-    argc--, argv++;
-
-    while (argc > 0) {
-      if (strcmp(*argv, "-d") == 0)
-        uncompr = 1;
-      else if (strcmp(*argv, "-f") == 0)
-        outmode[3] = 'f';
-      else if (strcmp(*argv, "-h") == 0)
-        outmode[3] = 'h';
-      else if (strcmp(*argv, "-r") == 0)
-        outmode[3] = 'R';
-      else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-               (*argv)[2] == 0)
-        outmode[2] = (*argv)[1];
-      else
-        break;
-      argc--, argv++;
-    }
-    if (argc == 0) {
-        SET_BINARY_MODE(stdin);
-        SET_BINARY_MODE(stdout);
-        if (uncompr) {
-            file = gzdopen(fileno(stdin), "rb");
-            if (file == NULL) error("can't gzdopen stdin");
-            gz_uncompress(file, stdout);
-        } else {
-            file = gzdopen(fileno(stdout), outmode);
-            if (file == NULL) error("can't gzdopen stdout");
-            gz_compress(stdin, file);
-        }
-    } else {
-        do {
-            if (uncompr) {
-                file_uncompress(*argv);
-            } else {
-                file_compress(*argv, outmode);
-            }
-        } while (argv++, --argc);
-    }
-    return 0;
-}
diff --git a/tkimg1.3/libz/msdos/Makefile.bor b/tkimg1.3/libz/msdos/Makefile.bor
deleted file mode 100644
index 8f8132d..0000000
--- a/tkimg1.3/libz/msdos/Makefile.bor
+++ /dev/null
@@ -1,109 +0,0 @@
-# Makefile for zlib
-# Borland C++
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.bor"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C++, Borland C++ ------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# memory model: one of s, m, c, l (small, medium, compact, large)
-MODEL=l
-
-# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
-CC=bcc
-LD=bcc
-AR=tlib
-
-# compiler flags
-# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
-CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
-
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/tkimg1.3/libz/msdos/Makefile.dj2 b/tkimg1.3/libz/msdos/Makefile.dj2
deleted file mode 100644
index 283d1d9..0000000
--- a/tkimg1.3/libz/msdos/Makefile.dj2
+++ /dev/null
@@ -1,104 +0,0 @@
-# Makefile for zlib.  Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.dj2;  make test -fmakefile.dj2
-#
-# To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
-#
-#    make install -fmakefile.dj2
-#
-# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as
-# in the sample below if the pattern of the DJGPP distribution is to
-# be followed.  Remember that, while <sp>'es around <=> are ignored in
-# makefiles, they are *not* in batch files or in djgpp.env.
-# - - - - -
-# [make]
-# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include
-# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib
-# BUTT=-m486
-# - - - - -
-# Alternately, these variables may be defined below, overriding the values
-# in djgpp.env, as
-# INCLUDE_PATH=c:\usr\include
-# LIBRARY_PATH=c:\usr\lib
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lz
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=libz.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-check: test
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
-
-.PHONY : uninstall clean
-
-install: $(INCL) $(LIBS)
-	- at if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
-	- at if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
-	$(INSTALL) zlib.h $(INCLUDE_PATH)
-	$(INSTALL) zconf.h $(INCLUDE_PATH)
-	$(INSTALL) libz.a $(LIBRARY_PATH)
-
-uninstall:
-	$(RM) $(INCLUDE_PATH)\zlib.h
-	$(RM) $(INCLUDE_PATH)\zconf.h
-	$(RM) $(LIBRARY_PATH)\libz.a
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) libz.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/tkimg1.3/libz/msdos/Makefile.emx b/tkimg1.3/libz/msdos/Makefile.emx
deleted file mode 100644
index ed4c31f..0000000
--- a/tkimg1.3/libz/msdos/Makefile.emx
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/tkimg1.3/libz/msdos/Makefile.msc b/tkimg1.3/libz/msdos/Makefile.msc
deleted file mode 100644
index b8fc665..0000000
--- a/tkimg1.3/libz/msdos/Makefile.msc
+++ /dev/null
@@ -1,106 +0,0 @@
-# Makefile for zlib
-# Microsoft C 5.1 or later
-# Last updated: 19-Mar-2003
-
-# To use, do "make makefile.msc"
-# To compile in small model, set below: MODEL=S
-
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------- Microsoft C 5.1 and later -------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# Memory model: one of S, M, C, L (small, medium, compact, large)
-MODEL=L
-
-CC=cl
-CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC)
-#-Ox generates bad code with MSC 5.1
-LIB_CFLAGS=-Zl $(CFLAGS)
-
-LD=link
-LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode
-# "/farcall/packcode" are only useful for `large code' memory models
-# but should be a "no-op" for small code models.
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-
-
-# targets
-all:  $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(LIB_CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	if exist $(ZLIB_LIB) del $(ZLIB_LIB)
-	lib $(ZLIB_LIB) $(OBJ1);
-	lib $(ZLIB_LIB) $(OBJ2);
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB);
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB);
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.map
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/tkimg1.3/libz/msdos/Makefile.tc b/tkimg1.3/libz/msdos/Makefile.tc
deleted file mode 100644
index 480750a..0000000
--- a/tkimg1.3/libz/msdos/Makefile.tc
+++ /dev/null
@@ -1,94 +0,0 @@
-# Makefile for zlib
-# Turbo C 2.01, Turbo C++ 1.01
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.tc"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to CFLAGS below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
-MODEL=l
-CC=tcc
-LD=tcc
-AR=tlib
-# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-CFLAGS=-O2 -G -Z -m$(MODEL)
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/tkimg1.3/libz/old/Make_vms.com b/tkimg1.3/libz/old/Make_vms.com
deleted file mode 100755
index 4fe3013..0000000
--- a/tkimg1.3/libz/old/Make_vms.com
+++ /dev/null
@@ -1,115 +0,0 @@
-$! make libz under VMS
-$! written by Martin P.J. Zinser <m.zinser at gsi.de>
-$!
-$! Look for the compiler used
-$!
-$ ccopt = ""
-$ if f$getsyi("HW_MODEL").ge.1024
-$ then
-$  ccopt = "/prefix=all"+ccopt
-$  comp  = "__decc__=1"
-$  if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ else
-$  if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
-$   then
-$    comp  = "__vaxc__=1"
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$   else
-$    if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
-$    ccopt = "/decc/prefix=all"+ccopt
-$    comp  = "__decc__=1"
-$  endif
-$ endif
-$!
-$! Build the thing plain or with mms
-$!
-$ write sys$output "Compiling Zlib sources ..."
-$ if f$search("SYS$SYSTEM:MMS.EXE").eqs.""
-$  then
-$   dele example.obj;*,minigzip.obj;*
-$   CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
-                adler32.c zlib.h zconf.h
-$   CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
-                compress.c zlib.h zconf.h
-$   CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
-                crc32.c zlib.h zconf.h
-$   CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
-                deflate.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" -
-                gzio.c zutil.h zlib.h zconf.h
-$   CALL MAKE infblock.OBJ "CC ''CCOPT' infblock" -
-                infblock.c zutil.h zlib.h zconf.h infblock.h
-$   CALL MAKE infcodes.OBJ "CC ''CCOPT' infcodes" -
-                infcodes.c zutil.h zlib.h zconf.h inftrees.h
-$   CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
-                inffast.c zutil.h zlib.h zconf.h inffast.h
-$   CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
-                inflate.c zutil.h zlib.h zconf.h infblock.h
-$   CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
-                inftrees.c zutil.h zlib.h zconf.h inftrees.h
-$   CALL MAKE infutil.OBJ "CC ''CCOPT' infutil" -
-                infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
-$   CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
-                trees.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
-                uncompr.c zlib.h zconf.h
-$   CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
-                zutil.c zutil.h zlib.h zconf.h
-$   write sys$output "Building Zlib ..."
-$   CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
-$   write sys$output "Building example..."
-$   CALL MAKE example.OBJ "CC ''CCOPT' example" -
-                example.c zlib.h zconf.h
-$   call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
-$   write sys$output "Building minigzip..."
-$   CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
-                minigzip.c zlib.h zconf.h
-$   call make minigzip.exe -
-                "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
-                minigzip.obj libz.olb
-$  else
-$   mms/macro=('comp')
-$  endif
-$ write sys$output "Zlib build completed"
-$ exit
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
diff --git a/tkimg1.3/libz/old/Makefile.riscos b/tkimg1.3/libz/old/Makefile.riscos
deleted file mode 100644
index d97f449..0000000
--- a/tkimg1.3/libz/old/Makefile.riscos
+++ /dev/null
@@ -1,151 +0,0 @@
-# Project:   zlib_1_03
-# Patched for zlib 1.1.2 rw at shadow.org.uk 19980430
-# test works out-of-the-box, installs `somewhere' on demand
-
-# Toolflags:
-CCflags = -c -depend !Depend -IC: -g -throwback  -DRISCOS  -fah 
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@ 
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags = 
-LibFileflags = -c -l -o $@ 
-Squeezeflags = -o $@
-
-# change the line below to where _you_ want the library installed.
-libdest = lib:zlib
-
-# Final targets:
- at .lib:   @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \
-        @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \
-        @.o.uncompr @.o.zutil 
-        LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \
-        @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \
-        @.o.trees @.o.uncompr @.o.zutil 
-test:   @.minigzip @.example @.lib
-	@copy @.lib @.libc  A~C~DF~L~N~P~Q~RS~TV
-	@echo running tests: hang on.
-	@/@.minigzip -f -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -f -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -1 libc
-	@/@.minigzip -d libc-gz
-	@diff @.lib @.libc
-	@echo that should have reported '@.lib and @.libc identical' if you have diff.
-	@/@.example @.fred @.fred
-	@echo that will have given lots of hello!'s.
-
- at .minigzip:   @.o.minigzip @.lib C:o.Stubs 
-        Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs 
- at .example:   @.o.example @.lib C:o.Stubs 
-        Link $(Linkflags) @.o.example @.lib C:o.Stubs
-
-install: @.lib
-	cdir $(libdest)
-	cdir $(libdest).h
-	@copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV
-	@copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV
-	@copy @.lib $(libdest).lib  A~C~DF~L~N~P~Q~RS~TV
-	@echo okay, installed zlib in $(libdest)
-
-clean:; remove @.minigzip
-	remove @.example
-	remove @.libc
-	-wipe @.o.* F~r~cV
-	remove @.fred
-
-# User-editable dependencies:
-.c.o:
-        cc $(ccflags) -o $@ $<
-
-# Static dependencies:
-
-# Dynamic dependencies:
-o.example:	c.example
-o.example:	h.zlib
-o.example:	h.zconf
-o.minigzip:	c.minigzip
-o.minigzip:	h.zlib
-o.minigzip:	h.zconf
-o.adler32:	c.adler32
-o.adler32:	h.zlib
-o.adler32:	h.zconf
-o.compress:	c.compress
-o.compress:	h.zlib
-o.compress:	h.zconf
-o.crc32:	c.crc32
-o.crc32:	h.zlib
-o.crc32:	h.zconf
-o.deflate:	c.deflate
-o.deflate:	h.deflate
-o.deflate:	h.zutil
-o.deflate:	h.zlib
-o.deflate:	h.zconf
-o.gzio:	c.gzio
-o.gzio:	h.zutil
-o.gzio:	h.zlib
-o.gzio:	h.zconf
-o.infblock:	c.infblock
-o.infblock:	h.zutil
-o.infblock:	h.zlib
-o.infblock:	h.zconf
-o.infblock:	h.infblock
-o.infblock:	h.inftrees
-o.infblock:	h.infcodes
-o.infblock:	h.infutil
-o.infcodes:	c.infcodes
-o.infcodes:	h.zutil
-o.infcodes:	h.zlib
-o.infcodes:	h.zconf
-o.infcodes:	h.inftrees
-o.infcodes:	h.infblock
-o.infcodes:	h.infcodes
-o.infcodes:	h.infutil
-o.infcodes:	h.inffast
-o.inffast:	c.inffast
-o.inffast:	h.zutil
-o.inffast:	h.zlib
-o.inffast:	h.zconf
-o.inffast:	h.inftrees
-o.inffast:	h.infblock
-o.inffast:	h.infcodes
-o.inffast:	h.infutil
-o.inffast:	h.inffast
-o.inflate:	c.inflate
-o.inflate:	h.zutil
-o.inflate:	h.zlib
-o.inflate:	h.zconf
-o.inflate:	h.infblock
-o.inftrees:	c.inftrees
-o.inftrees:	h.zutil
-o.inftrees:	h.zlib
-o.inftrees:	h.zconf
-o.inftrees:	h.inftrees
-o.inftrees:	h.inffixed
-o.infutil:	c.infutil
-o.infutil:	h.zutil
-o.infutil:	h.zlib
-o.infutil:	h.zconf
-o.infutil:	h.infblock
-o.infutil:	h.inftrees
-o.infutil:	h.infcodes
-o.infutil:	h.infutil
-o.trees:	c.trees
-o.trees:	h.deflate
-o.trees:	h.zutil
-o.trees:	h.zlib
-o.trees:	h.zconf
-o.trees:	h.trees
-o.uncompr:	c.uncompr
-o.uncompr:	h.zlib
-o.uncompr:	h.zconf
-o.zutil:	c.zutil
-o.zutil:	h.zutil
-o.zutil:	h.zlib
-o.zutil:	h.zconf
diff --git a/tkimg1.3/libz/old/README b/tkimg1.3/libz/old/README
deleted file mode 100644
index 06ebe3d..0000000
--- a/tkimg1.3/libz/old/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains files that have not been updated for zlib 1.2.1
-
-(Volunteers are encouraged to help clean this up.  Thanks.)
diff --git a/tkimg1.3/libz/old/descrip.mms b/tkimg1.3/libz/old/descrip.mms
deleted file mode 100644
index 7066da5..0000000
--- a/tkimg1.3/libz/old/descrip.mms
+++ /dev/null
@@ -1,48 +0,0 @@
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser <m.zinser at gsi.de>
-
-cc_defs =
-c_deb =
-
-.ifdef __DECC__
-pref = /prefix=all
-.endif
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\
-       deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\
-       inftrees.obj, infcodes.obj, infutil.obj, inffast.obj
-
-CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
-
-all : example.exe minigzip.exe
-        @ write sys$output " Example applications available"
-libz.olb : libz.olb($(OBJS))
-	@ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
-              link example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
-              link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
-	delete *.obj;*,libz.olb;*
-
-
-# Other dependencies.
-adler32.obj : zutil.h zlib.h zconf.h
-compress.obj : zlib.h zconf.h
-crc32.obj : zutil.h zlib.h zconf.h
-deflate.obj : deflate.h zutil.h zlib.h zconf.h
-example.obj : zlib.h zconf.h
-gzio.obj : zutil.h zlib.h zconf.h
-infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
-inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
-inflate.obj : zutil.h zlib.h zconf.h infblock.h
-inftrees.obj : zutil.h zlib.h zconf.h inftrees.h
-infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h
-minigzip.obj : zlib.h zconf.h
-trees.obj : deflate.h zutil.h zlib.h zconf.h
-uncompr.obj : zlib.h zconf.h
-zutil.obj : zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/old/os2/Makefile.os2 b/tkimg1.3/libz/old/os2/Makefile.os2
deleted file mode 100644
index a105aaa..0000000
--- a/tkimg1.3/libz/old/os2/Makefile.os2
+++ /dev/null
@@ -1,136 +0,0 @@
-# Makefile for zlib under OS/2 using GCC (PGCC)
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-#   cp Makefile.os2 ..
-#   cd ..
-#   make -f Makefile.os2 test
-
-# This makefile will build a static library z.lib, a shared library
-# z.dll and a import library zdll.lib. You can use either z.lib or
-# zdll.lib by specifying either -lz or -lzdll on gcc's command line
-
-CC=gcc -Zomf -s
-
-CFLAGS=-O6 -Wall
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-#################### BUG WARNING: #####################
-## infcodes.c hits a bug in pgcc-1.0, so you have to use either
-## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem)
-## This bug is reportedly fixed in pgcc >1.0, but this was not tested
-CFLAGS+=-fno-force-mem
-
-LDFLAGS=-s -L. -lzdll -Zcrtdll
-LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll
-
-VER=1.1.0
-ZLIB=z.lib
-SHAREDLIB=z.dll
-SHAREDLIBIMP=zdll.lib
-LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
-
-AR=emxomfar cr
-IMPLIB=emximp
-RANLIB=echo
-TAR=tar
-SHELL=bash
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
-  algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
-  nt/Makefile.nt nt/zlib.dnt  contrib/README.contrib contrib/*.txt \
-  contrib/asm386/*.asm contrib/asm386/*.c \
-  contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \
-  contrib/iostream/*.h  contrib/iostream2/*.h contrib/iostream2/*.cpp \
-  contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32
-
-all: example.exe minigzip.exe
-
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-$(ZLIB): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-$(SHAREDLIB): $(OBJS) os2/z.def
-	$(LDSHARED) -o $@ $^
-
-$(SHAREDLIBIMP): os2/z.def
-	$(IMPLIB) -o $@ $^
-
-example.exe: example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip.exe: minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-clean:
-	rm -f *.o *~ example minigzip libz.a libz.so* foo.gz
-
-distclean:	clean
-
-zip:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	zip -ul9 zlib$$v $(DISTFILES)
-	mv Makefile~ Makefile
-
-dist:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	rm -f $$d.tar.gz; \
-	if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
-	files=""; \
-	for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
-	cd ..; \
-	GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
-	if test ! -d $$d; then rm -f $$d; fi
-	mv Makefile~ Makefile
-
-tags:
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
-infcodes.o: zutil.h zlib.h zconf.h
-infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h
-inffast.o: infblock.h infcodes.h infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/old/os2/zlib.def b/tkimg1.3/libz/old/os2/zlib.def
deleted file mode 100644
index 4c753f1..0000000
--- a/tkimg1.3/libz/old/os2/zlib.def
+++ /dev/null
@@ -1,51 +0,0 @@
-;
-; Slightly modified version of ../nt/zlib.dnt :-)
-;
-
-LIBRARY		Z
-DESCRIPTION	"Zlib compression library for OS/2"
-CODE		PRELOAD MOVEABLE DISCARDABLE
-DATA		PRELOAD MOVEABLE MULTIPLE
-
-EXPORTS
-    adler32
-    compress
-    crc32
-    deflate
-    deflateCopy
-    deflateEnd
-    deflateInit2_
-    deflateInit_
-    deflateParams
-    deflateReset
-    deflateSetDictionary
-    gzclose
-    gzdopen
-    gzerror
-    gzflush
-    gzopen
-    gzread
-    gzwrite
-    inflate
-    inflateEnd
-    inflateInit2_
-    inflateInit_
-    inflateReset
-    inflateSetDictionary
-    inflateSync
-    uncompress
-    zlibVersion
-    gzprintf
-    gzputc
-    gzgetc
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzsetparams
-    zError
-    inflateSyncPoint
-    get_crc_table
-    compress2
-    gzputs
-    gzgets
diff --git a/tkimg1.3/libz/old/zlib.html b/tkimg1.3/libz/old/zlib.html
deleted file mode 100644
index 8c1b190..0000000
--- a/tkimg1.3/libz/old/zlib.html
+++ /dev/null
@@ -1,971 +0,0 @@
-<html>
-<head>
- <title>
- zlib general purpose compression library version 1.1.4
- </title>
-</head>
-<body bgcolor="White" text="Black" vlink="Red" alink="Navy" link="Red">
-<!-- background="zlibbg.gif" -->
-
-<h1> zlib 1.1.4 Manual </h1>
-<hr>
-<a name="Contents"><h2>Contents</h2>
-<ol type="I">
-<li> <a href="#Prologue">Prologue</a>
-<li> <a href="#Introduction">Introduction</a>
-<li> <a href="#Utility functions">Utility functions</a>
-<li> <a href="#Basic functions">Basic functions</a>
-<li> <a href="#Advanced functions">Advanced functions</a>
-<li> <a href="#Constants">Constants</a>
-<li> <a href="#struct z_stream_s">struct z_stream_s</a>
-<li> <a href="#Checksum functions">Checksum functions</a>
-<li> <a href="#Misc">Misc</a>
-</ol>
-<hr>
-<a name="Prologue"><h2> Prologue </h2>
-  'zlib' general purpose compression library version 1.1.4, March 11th, 2002
-  <p>
-  Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
-  <p>
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-  <p>
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-  <ol>
-   <li> The origin of this software must not be misrepresented ; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-   <li> Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-   <li> This notice may not be removed or altered from any source distribution.
-  </ol>
-
-  <dl>
-  <dt>Jean-loup Gailly
-  <dd><a href="mailto:jloup at gzip.org">jloup at gzip.org</a>
-  <dt>Mark Adler
-  <dd><a href="mailto:madler at alumni.caltech.edu">madler at alumni.caltech.edu</a>
-  </dl>
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files
-  <a href="ftp://ds.internic.net/rfc/rfc1950.txt">
-  ftp://ds.internic.net/rfc/rfc1950.txt </a>
-  (zlib format),
-  <a href="ftp://ds.internic.net/rfc/rfc1951.txt">
-  rfc1951.txt </a>
-  (<a href="#deflate">deflate</a> format) and
-  <a href="ftp://ds.internic.net/rfc/rfc1952.txt">
-  rfc1952.txt </a>
-  (gzip format).
-  <p>
-  This manual is converted from zlib.h by
-  <a href="mailto:piaip at csie.ntu.edu.tw"> piaip </a>
-  <p>
-  Visit <a href="http://ftp.cdrom.com/pub/infozip/zlib/">
-  http://ftp.cdrom.com/pub/infozip/zlib/</a>
-  for the official zlib web page.
-  <p>
-
-<hr>
-<a name="Introduction"><h2> Introduction </h2>
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-  <p>
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-  <p>
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio.
-  <p>
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-  <p>
-
-<hr>
-<a name="Utility functions"><h2> Utility functions </h2>
-     The following utility functions are implemented on top of the
-   <a href="#Basic functions">basic stream-oriented functions</a>.
-   To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-<h3> Function list </h3>
-<ul>
-<li> int  <a href="#compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> int  <a href="#compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
-<li> int  <a href="#uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> typedef voidp gzFile;
-<li>  gzFile  <a href="#gzopen">gzopen</a>  (const char *path, const char *mode);
-<li> gzFile  <a href="#gzdopen">gzdopen</a>  (int fd, const char *mode);
-<li> int  <a href="#gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);
-<li> int     <a href="#gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);
-<li> int     <a href="#gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);
-<li> int VA   <a href="#gzprintf">gzprintf</a> (gzFile file, const char *format, ...);
-<li> int  <a href="#gzputs">gzputs</a> (gzFile file, const char *s);
-<li> char *  <a href="#gzgets">gzgets</a> (gzFile file, char *buf, int len);
-<li> int     <a href="#gzputc">gzputc</a> (gzFile file, int c);
-<li> int     <a href="#gzgetc">gzgetc</a> (gzFile file);
-<li> int     <a href="#gzflush">gzflush</a> (gzFile file, int flush);
-<li> z_off_t     <a href="#gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);
-<li> z_off_t     <a href="#gztell">gztell</a> (gzFile file);
-<li> int     <a href="#gzrewind">gzrewind</a> (gzFile file);
-<li> int  <a href="#gzeof">gzeof</a> (gzFile file);
-<li> int     <a href="#gzclose">gzclose</a> (gzFile file);
-<li> const char *  <a href="#gzerror">gzerror</a> (gzFile file, int *errnum);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> int  <a name="compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least 0.1% larger than
-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-   compressed buffer.<p>
-     This function can be used to <a href="#compress">compress</a> a whole file at once if the
-   input file is mmap'ed.<p>
-     <a href="#compress">compress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer.<p>
-
-<font color="Blue"><dt> int  <a name="compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);</font>
-<dd>
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in <a href="#deflateInit">deflateInit</a>.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-   <p>
-
-     <a href="#compress2">compress2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output buffer,
-   <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the level parameter is invalid.
-   <p>
-
-<font color="Blue"><dt> int  <a name="uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer. <p>
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-   <p>
-
-     <a href="#uncompress">uncompress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer, or <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was corrupted.
-   <p>
-
-<dt> typedef voidp gzFile;
-<dd> <p>
-
-<font color="Blue"><dt>  gzFile  <a name="gzopen">gzopen</a>  (const char *path, const char *mode);</font>
-<dd>
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h". (See the description
-   of <a href="#deflateInit2">deflateInit2</a> for more information about the strategy parameter.)
-   <p>
-
-     <a href="#gzopen">gzopen</a> can be used to read a file which is not in gzip format ; in this
-   case <a href="#gzread">gzread</a> will directly read from the file without decompression.
-   <p>
-
-     <a href="#gzopen">gzopen</a> returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression <a href="#state">state</a> ; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a>).
-   <p>
-
-<font color="Blue"><dt> gzFile  <a name="gzdopen">gzdopen</a>  (int fd, const char *mode);</font>
-<dd>
-     <a href="#gzdopen">gzdopen</a>() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in <a href="#gzopen">gzopen</a>.
-   <p>
-     The next call of <a href="#gzclose">gzclose</a> on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use <a href="#gzdopen">gzdopen</a>(dup(fd), mode).
-   <p>
-     <a href="#gzdopen">gzdopen</a> returns NULL if there was insufficient memory to allocate
-   the (de)compression <a href="#state">state</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level or strategy. See the description
-   of <a href="#deflateInit2">deflateInit2</a> for the meaning of these parameters.
-   <p>
-     <a href="#gzsetparams">gzsetparams</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the file was not
-   opened for writing.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);</font>
-<dd>
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, <a href="#gzread">gzread</a> copies the given number
-   of bytes into the buffer.
-   <p>
-     <a href="#gzread">gzread</a> returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error).
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);</font>
-<dd>
-     Writes the given number of uncompressed bytes into the compressed file.
-   <a href="#gzwrite">gzwrite</a> returns the number of uncompressed bytes actually written
-   (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int VA   <a name="gzprintf">gzprintf</a> (gzFile file, const char *format, ...);</font>
-<dd>
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. <a href="#gzprintf">gzprintf</a> returns the number of
-   uncompressed bytes actually written (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzputs">gzputs</a> (gzFile file, const char *s);</font>
-<dd>
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-   <p>
-      <a href="#gzputs">gzputs</a> returns the number of characters written, or -1 in case of error.
-      <p>
-
-<font color="Blue"><dt> char *  <a name="gzgets">gzgets</a> (gzFile file, char *buf, int len);</font>
-<dd>
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-   <p>
-      <a href="#gzgets">gzgets</a> returns buf, or <a href="#Z_NULL">Z_NULL</a> in case of error.
-      <p>
-
-<font color="Blue"><dt> int     <a name="gzputc">gzputc</a> (gzFile file, int c);</font>
-<dd>
-      Writes c, converted to an unsigned char, into the compressed file.
-   <a href="#gzputc">gzputc</a> returns the value that was written, or -1 in case of error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzgetc">gzgetc</a> (gzFile file);</font>
-<dd>
-      Reads one byte from the compressed file. <a href="#gzgetc">gzgetc</a> returns this byte
-   or -1 in case of end of file or error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzflush">gzflush</a> (gzFile file, int flush);</font>
-<dd>
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the <a href="#deflate">deflate</a>() function. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below). <a href="#gzflush">gzflush</a> returns <a href="#Z_OK">Z_OK</a> if
-   the flush parameter is <a href="#Z_FINISH">Z_FINISH</a> and all output could be flushed.
-   <p>
-     <a href="#gzflush">gzflush</a> should be called only when strictly necessary because it can
-   degrade compression.
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);</font>
-<dd>
-      Sets the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-   <p>
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported ; <a href="#gzseek">gzseek</a> then compresses a sequence of zeroes up to the new
-   starting position.
-   <p>
-      <a href="#gzseek">gzseek</a> returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzrewind">gzrewind</a> (gzFile file);</font>
-<dd>
-     Rewinds the given file. This function is supported only for reading.
-     <p>
-   <a href="#gzrewind">gzrewind</a>(file) is equivalent to (int)<a href="#gzseek">gzseek</a>(file, 0L, SEEK_SET)
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gztell">gztell</a> (gzFile file);</font>
-<dd>
-     Returns the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-   <p>
-
-   <a href="#gztell">gztell</a>(file) is equivalent to <a href="#gzseek">gzseek</a>(file, 0L, SEEK_CUR)
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzeof">gzeof</a> (gzFile file);</font>
-<dd>
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzclose">gzclose</a> (gzFile file);</font>
-<dd>
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression <a href="#state">state</a>. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below).
-   <p>
-
-<font color="Blue"><dt> const char *  <a name="gzerror">gzerror</a> (gzFile file, int *errnum);</font>
-<dd>
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to <a href="#Z_ERRNO">Z_ERRNO</a> and the application may consult errno
-   to get the exact error code.
-   <p>
-</dl>
-<hr>
-<a name="Basic functions"><h2> Basic functions </h2>
-<h3> Function list </h3>
-<ul>
-<li>  const char *  <a href="#zlibVersion">zlibVersion</a> (void);
-<li>  int  <a href="#deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);
-<li>  int  <a href="#deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-</ul>
-
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  const char *  <a name="zlibVersion">zlibVersion</a> (void);</font>
-<dd> The application can compare <a href="#zlibVersion">zlibVersion</a> and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);</font>
-<dd>
-     Initializes the internal stream <a href="#state">state</a> for compression. The fields
-   <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by the caller.
-   If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#deflateInit">deflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     The compression level must be <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   <p>
-
-   <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a> requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-   <p>
-
-     <a href="#deflateInit">deflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if level is not a valid compression level,
-   <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version (<a href="#zlib_version">zlib_version</a>) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit">deflateInit</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().
-   <p>
-
-<font color="Blue"><dt>  int  <a name="deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#deflate">deflate</a> compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.<p>
-
-    The detailed semantics are as follows. <a href="#deflate">deflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Compress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> are updated and
-    processing will resume at this point for the next call of <a href="#deflate">deflate</a>().
-
-  <li>
-    Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a>
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-  </ul> <p>
-
-  Before the call of <a href="#deflate">deflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> accordingly ; <a href="#avail_out">avail_out</a>
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (<a href="#avail_out">avail_out</a> == 0), or after each call of <a href="#deflate">deflate</a>(). If <a href="#deflate">deflate</a> returns <a href="#Z_OK">Z_OK</a>
-  and with zero <a href="#avail_out">avail_out</a>, it must be called again after making room in the
-  output buffer because there might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  <a href="#avail_in">avail_in</a> is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-  <p>
-
-    If flush is set to <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>, all output is flushed as with
-  <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, and the compression <a href="#state">state</a> is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a> too often can seriously degrade
-  the compression.
-  <p>
-
-    If <a href="#deflate">deflate</a> returns with <a href="#avail_out">avail_out</a> == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  <a href="#avail_out">avail_out</a>), until the flush is complete (<a href="#deflate">deflate</a> returns with non-zero
-  <a href="#avail_out">avail_out</a>).
-  <p>
-
-    If the parameter flush is set to <a href="#Z_FINISH">Z_FINISH</a>, pending input is processed,
-  pending output is flushed and <a href="#deflate">deflate</a> returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> if there
-  was enough output space ; if <a href="#deflate">deflate</a> returns with <a href="#Z_OK">Z_OK</a>, this function must be
-  called again with <a href="#Z_FINISH">Z_FINISH</a> and more output space (updated <a href="#avail_out">avail_out</a>) but no
-  more input data, until it returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> or an error. After
-  <a href="#deflate">deflate</a> has returned <a href="#Z_STREAM_END">Z_STREAM_END</a>, the only possible operations on the
-  stream are <a href="#deflateReset">deflateReset</a> or <a href="#deflateEnd">deflateEnd</a>.
-  <p>
-
-    <a href="#Z_FINISH">Z_FINISH</a> can be used immediately after <a href="#deflateInit">deflateInit</a> if all the compression
-  is to be done in a single step. In this case, <a href="#avail_out">avail_out</a> must be at least
-  0.1% larger than <a href="#avail_in">avail_in</a> plus 12 bytes.  If <a href="#deflate">deflate</a> does not return
-  <a href="#Z_STREAM_END">Z_STREAM_END</a>, then it must be called again as described above.
-  <p>
-
-    <a href="#deflate">deflate</a>() sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all input read
-  so far (that is, <a href="#total_in">total_in</a> bytes).
-  <p>
-
-    <a href="#deflate">deflate</a>() may update <a href="#data_type">data_type</a> if it can make a good guess about
-  the input data type (<a href="#Z_ASCII">Z_ASCII</a> or <a href="#Z_BINARY">Z_BINARY</a>). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-  <p>
-
-    <a href="#deflate">deflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input
-  processed or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if all input has been
-  consumed and all output has been produced (only when flush is set to
-  <a href="#Z_FINISH">Z_FINISH</a>), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a> was inconsistent (for example
-  if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible
-  (for example <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> was zero).
-  <p>
-
-<font color="Blue"><dt>  int  <a name="deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#deflateEnd">deflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the
-   stream <a href="#state">state</a> was inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   <a href="#msg">msg</a> may be set but then points to a static string (which must not be
-   deallocated).
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-	Initializes the internal stream <a href="#state">state</a> for decompression. The fields
-   <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller. If <a href="#next_in">next_in</a> is not <a href="#Z_NULL">Z_NULL</a> and <a href="#avail_in">avail_in</a> is large enough (the exact
-   value depends on the compression method), <a href="#inflateInit">inflateInit</a> determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly ; otherwise the allocation will be deferred to the first call of
-   <a href="#inflate">inflate</a>.  If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#inflateInit">inflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     <a href="#inflateInit">inflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version is incompatible with the
-   version assumed by the caller.  <a href="#msg">msg</a> is set to null if there is no error
-   message. <a href="#inflateInit">inflateInit</a> does not perform any decompression apart from reading
-   the zlib header if present: this will be done by <a href="#inflate">inflate</a>().  (So <a href="#next_in">next_in</a> and
-   <a href="#avail_in">avail_in</a> may be modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#inflate">inflate</a> decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may some
-  introduce some output latency (reading input without producing any output)
-  except when forced to flush.
-  <p>
-
-  The detailed semantics are as follows. <a href="#inflate">inflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Decompress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> is updated and processing
-    will resume at this point for the next call of <a href="#inflate">inflate</a>().
-
-  <li> Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and
-    <a href="#avail_out">avail_out</a> accordingly.  <a href="#inflate">inflate</a>() provides as much output as possible,
-    until there is no more input data or no more space in the output buffer
-    (see below about the flush parameter).
-  </ul> <p>
-
-  Before the call of <a href="#inflate">inflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (<a href="#avail_out">avail_out</a> == 0), or after each
-  call of <a href="#inflate">inflate</a>(). If <a href="#inflate">inflate</a> returns <a href="#Z_OK">Z_OK</a> and with zero <a href="#avail_out">avail_out</a>, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, <a href="#inflate">inflate</a> flushes as much
-  output as possible to the output buffer. The flushing behavior of <a href="#inflate">inflate</a> is
-  not specified for values of the flush parameter other than <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>
-  and <a href="#Z_FINISH">Z_FINISH</a>, but the current implementation actually flushes as much output
-  as possible anyway.
-  <p>
-
-    <a href="#inflate">inflate</a>() should normally be called until it returns <a href="#Z_STREAM_END">Z_STREAM_END</a> or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of <a href="#inflate">inflate</a>), the parameter flush should be set to
-  <a href="#Z_FINISH">Z_FINISH</a>. In this case all pending input is processed and all pending
-  output is flushed ; <a href="#avail_out">avail_out</a> must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be <a href="#inflateEnd">inflateEnd</a> to deallocate the decompression <a href="#state">state</a>. The use of <a href="#Z_FINISH">Z_FINISH</a>
-  is never required, but can be used to inform <a href="#inflate">inflate</a> that a faster routine
-  may be used for the single <a href="#inflate">inflate</a>() call.
-  <p>
-
-     If a preset dictionary is needed at this point (see <a href="#inflateSetDictionary">inflateSetDictionary</a>
-  below), <a href="#inflate">inflate</a> sets strm-<a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of the
-  dictionary chosen by the compressor and returns <a href="#Z_NEED_DICT">Z_NEED_DICT</a> ; otherwise
-  it sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all output produced
-  so far (that is, <a href="#total_out">total_out</a> bytes) and returns <a href="#Z_OK">Z_OK</a>, <a href="#Z_STREAM_END">Z_STREAM_END</a> or
-  an error code as described below. At the end of the stream, <a href="#inflate">inflate</a>()
-  checks that its computed <a href="#adler32">adler32</a> checksum is equal to that saved by the
-  compressor and returns <a href="#Z_STREAM_END">Z_STREAM_END</a> only if the checksum is correct.
-  <p>
-
-    <a href="#inflate">inflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input processed
-  or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if the end of the compressed data has
-  been reached and all uncompressed output has been produced, <a href="#Z_NEED_DICT">Z_NEED_DICT</a> if a
-  preset dictionary is needed at this point, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect
-  <a href="#adler32">adler32</a> checksum), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent
-  (for example if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-  enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible or if there was not
-  enough room in the output buffer when <a href="#Z_FINISH">Z_FINISH</a> is used. In the <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a>
-  case, the application may then call <a href="#inflateSync">inflateSync</a> to look for a good
-  compression block.
-  <p>
-
-<font color="Blue"><dt>  int  <a name="inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#inflateEnd">inflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a>
-   was inconsistent. In the error case, <a href="#msg">msg</a> may be set but then points to a
-   static string (which must not be deallocated).
-</dl>
-<hr>
-<a name="Advanced functions"><h2> Advanced functions </h2>
-    The following functions are needed only in some special applications.
-<h3> Function list </h3>
-<ul>
-<li>  int  <a href="#deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm,
-<li> int  <a href="#deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);
-<li> int  <a href="#deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);
-<li> int  <a href="#inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);
-<li>  int  <a href="#inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  int  <a name="deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  level, int  method, int  windowBits, int  memLevel, int  strategy);</font>
-
-<dd> This is another version of <a href="#deflateInit">deflateInit</a> with more compression options. The
-   fields <a href="#next_in">next_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller.<p>
-
-     The method parameter is the compression method. It must be <a href="#Z_DEFLATED">Z_DEFLATED</a> in
-   this version of the library.<p>
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   <a href="#deflateInit">deflateInit</a> is used instead.<p>
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression <a href="#state">state</a>. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio ; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.<p>
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value <a href="#Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a> for normal data, <a href="#Z_FILTERED">Z_FILTERED</a> for data produced by a
-   filter (or predictor), or <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a> to force Huffman encoding only (no
-   string match).  Filtered data consists mostly of small values with a
-   somewhat random distribution. In this case, the compression algorithm is
-   tuned to <a href="#compress">compress</a> them better. The effect of <a href="#Z_FILTERED">Z_FILTERED</a> is to force more
-   Huffman coding and less string matching ; it is somewhat intermediate
-   between Z_DEFAULT and <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>. The strategy parameter only affects
-   the compression ratio but not the correctness of the compressed output even
-   if it is not set appropriately.<p>
-
-      <a href="#deflateInit2">deflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as an invalid
-   method). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit2">deflateInit2</a> does
-   not perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after <a href="#deflateInit">deflateInit</a>, <a href="#deflateInit2">deflateInit2</a> or <a href="#deflateReset">deflateReset</a>, before any
-   call of <a href="#deflate">deflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#inflateSetDictionary">inflateSetDictionary</a>).<p>
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy ; the data can then be compressed better than
-   with the default empty dictionary.<p>
-
-     Depending on the size of the compression data structures selected by
-   <a href="#deflateInit">deflateInit</a> or <a href="#deflateInit2">deflateInit2</a>, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   <a href="#deflate">deflate</a> or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.<p>
-
-     Upon return of this function, strm-&gt <a href="#adler">adler</a> is set to the Adler32 value
-   of the dictionary ; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The Adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.)<p>
-
-     <a href="#deflateSetDictionary">deflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent (for example if <a href="#deflate">deflate</a> has already been called for this stream
-   or if the compression method is bsort). <a href="#deflateSetDictionary">deflateSetDictionary</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);</font>
-<dd>
-     Sets the destination stream as a complete copy of the source stream.<p>
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling <a href="#deflateEnd">deflateEnd</a>.  Note that <a href="#deflateCopy">deflateCopy</a> duplicates the internal
-   compression <a href="#state">state</a> which can be quite large, so this strategy is slow and
-   can consume lots of memory.<p>
-
-     <a href="#deflateCopy">deflateCopy</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source stream <a href="#state">state</a> was inconsistent
-   (such as <a href="#zalloc">zalloc</a> being NULL). <a href="#msg">msg</a> is left unchanged in both source and
-   destination.<p>
-
-<font color="Blue"><dt> int  <a name="deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>     This function is equivalent to <a href="#deflateEnd">deflateEnd</a> followed by <a href="#deflateInit">deflateInit</a>,
-   but does not free and reallocate all the internal compression <a href="#state">state</a>.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by <a href="#deflateInit2">deflateInit2</a>.<p>
-
-      <a href="#deflateReset">deflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).<p>
-
-<font color="Blue"><dt> int  <a name="deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in <a href="#deflateInit2">deflateInit2</a>.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of <a href="#deflate">deflate</a>().<p>
-
-     Before the call of <a href="#deflateParams">deflateParams</a>, the stream <a href="#state">state</a> must be set as for
-   a call of <a href="#deflate">deflate</a>(), since the currently available input may have to
-   be compressed and flushed. In particular, strm-&gt <a href="#avail_out">avail_out</a> must be
-   non-zero.<p>
-
-     <a href="#deflateParams">deflateParams</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent or if a parameter was invalid, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-   if strm-&gtavail_out was zero.<p>
-
-<font color="Blue"><dt> int  <a name="inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);</font>
-
-<dd>     This is another version of <a href="#inflateInit">inflateInit</a> with an extra parameter. The
-   fields <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized
-   before by the caller.<p>
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if <a href="#inflateInit">inflateInit</a> is used
-   instead. If a compressed stream with a larger window size is given as
-   input, <a href="#inflate">inflate</a>() will return with the error code <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> instead of
-   trying to allocate a larger window.<p>
-
-      <a href="#inflateInit2">inflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as a negative
-   memLevel). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#inflateInit2">inflateInit2</a>
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by <a href="#inflate">inflate</a>(). (So <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> may be
-   modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)<p>
-
-<font color="Blue"><dt>  int  <a name="inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of <a href="#inflate">inflate</a>
-   if this call returned <a href="#Z_NEED_DICT">Z_NEED_DICT</a>. The dictionary chosen by the compressor
-   can be determined from the Adler32 value returned by this call of
-   <a href="#inflate">inflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#deflateSetDictionary">deflateSetDictionary</a>).<p>
-
-     <a href="#inflateSetDictionary">inflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the given dictionary doesn't match the
-   expected one (incorrect Adler32 value). <a href="#inflateSetDictionary">inflateSetDictionary</a> does not
-   perform any decompression: this will be done by subsequent calls of
-   <a href="#inflate">inflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-
-<dd>    Skips invalid compressed data until a full flush point (see above the
-  description of <a href="#deflate">deflate</a> with <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>) can be found, or until all
-  available input is skipped. No output is provided.<p>
-
-    <a href="#inflateSync">inflateSync</a> returns <a href="#Z_OK">Z_OK</a> if a full flush point has been found, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-  if no more input was provided, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if no flush point has been found,
-  or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of <a href="#total_in">total_in</a> which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call <a href="#inflateSync">inflateSync</a>, providing more input each time,
-  until success or end of the input data.<p>
-
-<font color="Blue"><dt> int  <a name="inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     This function is equivalent to <a href="#inflateEnd">inflateEnd</a> followed by <a href="#inflateInit">inflateInit</a>,
-   but does not free and reallocate all the internal decompression <a href="#state">state</a>.
-   The stream will keep attributes that may have been set by <a href="#inflateInit2">inflateInit2</a>.
-   <p>
-
-      <a href="#inflateReset">inflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).
-   <p>
-</dl>
-
-<hr>
-<a name="Checksum functions"><h2> Checksum functions </h2>
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-<h3> Function list </h3>
-<ul>
-<li> uLong  <a href="#adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);
-<li> uLong  <a href="#crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> uLong  <a name="adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   <p>
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-   <pre>
-
-     uLong <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(<a href="#adler">adler</a>, buffer, length);
-     }
-     if (<a href="#adler">adler</a> != original_adler) error();
-   </pre>
-
-<font color="Blue"><dt> uLong  <a name="crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-   <pre>
-
-     uLong crc = <a href="#crc32">crc32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = <a href="#crc32">crc32</a>(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-   </pre>
-</dl>
-<hr>
-<a name="struct z_stream_s"><h2> struct z_stream_s </h2>
-<font color="Blue">
-<a name="z_stream_s">
-<pre>
-typedef struct z_stream_s {
-    Bytef    *<a name="next_in">next_in</a>;  /* next input byte */
-    uInt     <a name="avail_in">avail_in</a>;  /* number of bytes available at <a href="#next_in">next_in</a> */
-    uLong    <a name="total_in">total_in</a>;  /* total nb of input bytes read so far */
-
-    Bytef    *<a name="next_out">next_out</a>; /* next output byte should be put there */
-    uInt     <a name="avail_out">avail_out</a>; /* remaining free space at <a href="#next_out">next_out</a> */
-    uLong    <a name="total_out">total_out</a>; /* total nb of bytes output so far */
-
-    char     *<a name="msg">msg</a>;      /* last error message, NULL if no error */
-    struct internal_state FAR *<a name="state">state</a>; /* not visible by applications */
-
-    alloc_func <a name="zalloc">zalloc</a>;  /* used to allocate the internal <a href="#state">state</a> */
-    free_func  <a name="zfree">zfree</a>;   /* used to free the internal <a href="#state">state</a> */
-    voidpf     <a name="opaque">opaque</a>;  /* private data object passed to <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> */
-
-    int     <a name="data_type">data_type</a>;  /* best guess about the data type: ascii or binary */
-    uLong   <a name="adler">adler</a>;      /* <a href="#adler32">adler32</a> value of the uncompressed data */
-    uLong   <a name="reserved">reserved</a>;   /* <a href="#reserved">reserved</a> for future use */
-} <a href="#z_stream_s">z_stream</a> ;
-
-typedef <a href="#z_stream_s">z_stream</a> FAR * <a name="z_streamp">z_streamp</a>;  ÿ
-</pre>
-</font>
-   The application must update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> when <a href="#avail_in">avail_in</a> has
-   dropped to zero. It must update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> when <a href="#avail_out">avail_out</a>
-   has dropped to zero. The application must initialize <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and
-   <a href="#opaque">opaque</a> before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application. <p>
-
-   The <a href="#opaque">opaque</a> value provided by the application will be passed as the first
-   parameter for calls of <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a>. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   <a href="#opaque">opaque</a> value. <p>
-
-   <a href="#zalloc">zalloc</a> must return <a href="#Z_NULL">Z_NULL</a> if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be
-   thread safe. <p>
-
-   On 16-bit systems, the functions <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by <a href="#zalloc">zalloc</a> for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-   <p>
-
-   The fields <a href="#total_in">total_in</a> and <a href="#total_out">total_out</a> can be used for statistics or
-   progress reports. After compression, <a href="#total_in">total_in</a> holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step). <p>
-
-<hr>
-<a name="Constants"><h2> Constants </h2>
-<font color="Blue">
-<pre>
-#define <a name="Z_NO_FLUSH">Z_NO_FLUSH</a>      0
-#define <a name="Z_PARTIAL_FLUSH">Z_PARTIAL_FLUSH</a> 1
-	/* will be removed, use <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a> instead */
-#define <a name="Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>    2
-#define <a name="Z_FULL_FLUSH">Z_FULL_FLUSH</a>    3
-#define <a name="Z_FINISH">Z_FINISH</a>        4
-/* Allowed flush values ; see <a href="#deflate">deflate</a>() below for details */
-
-#define <a name="Z_OK">Z_OK</a>            0
-#define <a name="Z_STREAM_END">Z_STREAM_END</a>    1
-#define <a name="Z_NEED_DICT">Z_NEED_DICT</a>     2
-#define <a name="Z_ERRNO">Z_ERRNO</a>        (-1)
-#define <a name="Z_STREAM_ERROR">Z_STREAM_ERROR</a> (-2)
-#define <a name="Z_DATA_ERROR">Z_DATA_ERROR</a>   (-3)
-#define <a name="Z_MEM_ERROR">Z_MEM_ERROR</a>    (-4)
-#define <a name="Z_BUF_ERROR">Z_BUF_ERROR</a>    (-5)
-#define <a name="Z_VERSION_ERROR">Z_VERSION_ERROR</a> (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define <a name="Z_NO_COMPRESSION">Z_NO_COMPRESSION</a>         0
-#define <a name="Z_BEST_SPEED">Z_BEST_SPEED</a>             1
-#define <a name="Z_BEST_COMPRESSION">Z_BEST_COMPRESSION</a>       9
-#define <a name="Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>  (-1)
-/* compression levels */
-
-#define <a name="Z_FILTERED">Z_FILTERED</a>            1
-#define <a name="Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>        2
-#define <a name="Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a>    0
-/* compression strategy ; see <a href="#deflateInit2">deflateInit2</a>() below for details */
-
-#define <a name="Z_BINARY">Z_BINARY</a>   0
-#define <a name="Z_ASCII">Z_ASCII</a>    1
-#define <a name="Z_UNKNOWN">Z_UNKNOWN</a>  2
-/* Possible values of the <a href="#data_type">data_type</a> field */
-
-#define <a name="Z_DEFLATED">Z_DEFLATED</a>   8
-/* The <a href="#deflate">deflate</a> compression method (the only one supported in this version) */
-
-#define <a name="Z_NULL">Z_NULL</a>  0  /* for initializing <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a>, <a href="#opaque">opaque</a> */
-
-#define <a name="zlib_version">zlib_version</a> <a href="#zlibVersion">zlibVersion</a>()
-/* for compatibility with versions less than 1.0.2 */
-</pre>
-</font>
-
-<hr>
-<a name="Misc"><h2> Misc </h2>
- <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a> are macros to allow checking the zlib version
- and the compiler's view of <a href="#z_stream_s">z_stream</a>.
- <p>
- Other functions:
- <dl>
- <font color="Blue"><dt> const char   *  <a name="zError">zError</a>           (int err);</font>
- <font color="Blue"><dt> int             <a name="inflateSyncPoint">inflateSyncPoint</a> (<a href="#z_streamp">z_streamp</a> z);</font>
- <font color="Blue"><dt> const uLongf *  <a name="get_crc_table">get_crc_table</a>    (void);</font>
- </dl>
- <hr>
- <font size="-1">
- Last update: Wed Oct 13 20:42:34 1999<br>
- piapi at csie.ntu.edu.tw
- </font>
-
-</body>
-</html>
diff --git a/tkimg1.3/libz/qnx/package.qpg b/tkimg1.3/libz/qnx/package.qpg
deleted file mode 100644
index 2b7d951..0000000
--- a/tkimg1.3/libz/qnx/package.qpg
+++ /dev/null
@@ -1,141 +0,0 @@
-<QPG:Generation>
-   <QPG:Options>
-      <QPG:User unattended="no" verbosity="2" listfiles="yes"/>
-      <QPG:Defaults type="qnx_package"/>
-      <QPG:Source></QPG:Source>
-      <QPG:Release number="+"/>
-      <QPG:Build></QPG:Build>
-      <QPG:FileSorting strip="yes"/>
-      <QPG:Package targets="combine"/>
-      <QPG:Repository generate="yes"/>
-      <QPG:FinalDir></QPG:FinalDir>
-      <QPG:Cleanup></QPG:Cleanup>
-   </QPG:Options>
-
-   <QPG:Responsible>
-      <QPG:Company></QPG:Company>
-      <QPG:Department></QPG:Department>
-      <QPG:Group></QPG:Group>
-      <QPG:Team></QPG:Team>
-      <QPG:Employee></QPG:Employee>
-      <QPG:EmailAddress></QPG:EmailAddress>
-   </QPG:Responsible>
-
-   <QPG:Values>
-      <QPG:Files>
-         <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../libz.so.1.2.1" install="/opt/lib/" user="root:bin" permission="644"/>
-         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.1"/>
-         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.1"/>
-         <QPG:Add file="../libz.so.1.2.1" install="/opt/lib/" component="slib"/>
-      </QPG:Files>
-
-      <QPG:PackageFilter>
-         <QPM:PackageManifest>
-            <QPM:PackageDescription>
-               <QPM:PackageType>Library</QPM:PackageType>
-               <QPM:PackageReleaseNotes></QPM:PackageReleaseNotes>
-               <QPM:PackageReleaseUrgency>Medium</QPM:PackageReleaseUrgency>
-               <QPM:PackageRepository></QPM:PackageRepository>
-               <QPM:FileVersion>2.0</QPM:FileVersion>
-            </QPM:PackageDescription>
-
-            <QPM:ProductDescription>
-               <QPM:ProductName>zlib</QPM:ProductName>
-               <QPM:ProductIdentifier>zlib</QPM:ProductIdentifier>
-               <QPM:ProductEmail>alain.bonnefoy at icbt.com</QPM:ProductEmail>
-               <QPM:VendorName>Public</QPM:VendorName>
-               <QPM:VendorInstallName>public</QPM:VendorInstallName>
-               <QPM:VendorURL>www.gzip.org/zlib</QPM:VendorURL>
-               <QPM:VendorEmbedURL></QPM:VendorEmbedURL>
-               <QPM:VendorEmail></QPM:VendorEmail>
-               <QPM:AuthorName>Jean-Loup Gailly,Mark Adler</QPM:AuthorName>
-               <QPM:AuthorURL>www.gzip.org/zlib</QPM:AuthorURL>
-               <QPM:AuthorEmbedURL></QPM:AuthorEmbedURL>
-               <QPM:AuthorEmail>zlib at gzip.org</QPM:AuthorEmail>
-               <QPM:ProductIconSmall></QPM:ProductIconSmall>
-               <QPM:ProductIconLarge></QPM:ProductIconLarge>
-               <QPM:ProductDescriptionShort>A massively spiffy yet delicately unobtrusive compression library.</QPM:ProductDescriptionShort>
-               <QPM:ProductDescriptionLong>zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system.</QPM:ProductDescriptionLong>
-               <QPM:ProductDescriptionURL>http://www.gzip.org/zlib</QPM:ProductDescriptionURL>
-               <QPM:ProductDescriptionEmbedURL></QPM:ProductDescriptionEmbedURL>
-            </QPM:ProductDescription>
-
-            <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.1</QPM:ReleaseVersion>
-               <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
-               <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
-               <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
-               <QPM:ReleaseNoteMajor></QPM:ReleaseNoteMajor>
-               <QPM:ExcludeCountries>
-                  <QPM:Country></QPM:Country>
-               </QPM:ExcludeCountries>
-
-               <QPM:ReleaseCopyright>No License</QPM:ReleaseCopyright>
-            </QPM:ReleaseDescription>
-
-            <QPM:ContentDescription>
-               <QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
-               <QPM:ContentKeyword>zlib,compression</QPM:ContentKeyword>
-               <QPM:TargetOS>qnx6</QPM:TargetOS>
-               <QPM:HostOS>qnx6</QPM:HostOS>
-               <QPM:DisplayEnvironment xmlmultiple="true">None</QPM:DisplayEnvironment>
-               <QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience>
-            </QPM:ContentDescription>
-         </QPM:PackageManifest>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter proc="none" target="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationDependencies>
-               <QPM:ProductRequirements></QPM:ProductRequirements>
-            </QPM:ProductInstallationDependencies>
-
-            <QPM:ProductInstallationProcedure>
-               <QPM:Script xmlmultiple="true">
-                  <QPM:ScriptName></QPM:ScriptName>
-                  <QPM:ScriptType>Install</QPM:ScriptType>
-                  <QPM:ScriptTiming>Post</QPM:ScriptTiming>
-                  <QPM:ScriptBlocking>No</QPM:ScriptBlocking>
-                  <QPM:ScriptResult>Ignore</QPM:ScriptResult>
-                  <QPM:ShortDescription></QPM:ShortDescription>
-                  <QPM:UseBinaries>No</QPM:UseBinaries>
-                  <QPM:Priority>Optional</QPM:Priority>
-               </QPM:Script>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-         
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-         
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="dev">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib-dev</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-         
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-   </QPG:Values>
-</QPG:Generation>
diff --git a/tkimg1.3/libz/tcl/ChangeLog b/tkimg1.3/libz/tcl/ChangeLog
deleted file mode 100644
index 5b884fb..0000000
--- a/tkimg1.3/libz/tcl/ChangeLog
+++ /dev/null
@@ -1,25 +0,0 @@
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* zlibtcl.h: Updated the hardwired version information in this
-	  header file.
-
-2004-08-13  Andreas Kupries  <andreask at activestate.com>
-
-	* libz/tcl: Changed version of wrapper to 1.2.1, synchronized to
-	  version of libz.
-
-2004-08-12  Andreas Kupries  <andreask at activestate.com>
-
-	* libz:     Updated zlib from version 1.1.3 to 1.2.1.
-	* libz/tcl: Updated to handle the new version of zlib.
-
-2002-11-18  Andreas Kupries  <andreask at activestate.com>
-
-	* Configure and build ok for all platforms available to me at AS.
-
-2002-11-13  Andreas Kupries  <andreask at activestate.com>
-
-	* Start of logging.
-
-	* libz/tcl/: New directory, packaging of support library for
-	  tcl.
diff --git a/tkimg1.3/libz/tcl/Makefile.in b/tkimg1.3/libz/tcl/Makefile.in
deleted file mode 100644
index 6a1b6ad..0000000
--- a/tkimg1.3/libz/tcl/Makefile.in
+++ /dev/null
@@ -1,530 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for zlibtcl TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 1999 Scriptics Corporation.
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-zlibtcl_SOURCES	=		\
-		zlibtcl.c		\
-		zlibtclStubInit.c	\
-		zlibtclStubLib.c	\
-		$(zlib_Sources)		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-zlib_Sources	=						\
-		adler32.c	compress.c	crc32.c		\
-		deflate.c	gzio.c		infback.c	\
-		inffast.c	inflate.c	inftrees.c	\
-		trees.c		uncompr.c	zutil.c
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "zlibtcl_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-zlibtcl_OBJECTS		= $(zlibtcl_SOURCES:.c=. at OBJEXT@)
-zlibtcl_LIB_FILE	= @zlibtcl_LIB_FILE@
-
-zlibtclstub_OBJECTS	= zlibtclStubLib.$(OBJEXT)
-zlibtclstub_LIB_FILE	= @zlibtclstub_LIB_FILE@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	$(srcdir)/zlibtcl.h		\
-			$(srcdir)/zlibtclDecls.h	\
-			$(srcdir)/zlibtclDeclsMask.h	\
-			$(srcdir)/zlibtclDeclsUnmask.h
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-INCLUDES	= -I$(srcdir) @TCL_INCLUDES@
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile zlibtclConfig.sh pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(PACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-	@mkdir -p $(DESTDIR)$(includedir)
-	@echo "Installing header files in $(DESTDIR)$(includedir)"
-	@for i in $(GENERIC_HDRS) ; do \
-	    echo "Installing $$i" ; \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(TCLSH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo The support package "'zlibtcl'" cannot be tested separately.
-	@echo Test the packages "'tkimg::png'" and "'tkimg::tiff'" to exercise its functionality.
-
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-#	$(testshell)	\
-#		-load 'load ./$(zlibtcl_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(zlibtcl_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(TCLSH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(TCLSH) $(SCRIPT)
-
-gdb:
-	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-	-rm -f $($(PACKAGE)stub_LIB_FILE)
-	${MAKE_STUB_LIB}
-	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# zlibtcl.$(OBJEXT): $(srcdir)/generic/zlibtcl.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/zlibtcl.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/..
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -f $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-	$(INSTALL_DATA) zlibtclConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/zlibtcl.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-zlibtcl_DECLS = \
-	$(srcdir)/zlibtcl.decls
-
-checkstubs:
-	- at for i in `nm -p $(zlibtcl_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(zlibtcl_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/libz/tcl/aclocal.m4 b/tkimg1.3/libz/tcl/aclocal.m4
deleted file mode 100644
index 0b05739..0000000
--- a/tkimg1.3/libz/tcl/aclocal.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,tclconfig/tcl.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/libz/tcl/configure b/tkimg1.3/libz/tcl/configure
deleted file mode 100755
index 142ade4..0000000
--- a/tkimg1.3/libz/tcl/configure
+++ /dev/null
@@ -1,5640 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'zlibtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./zlibtcl.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in tclconfig $srcdir/tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in tclconfig $srcdir/tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=zlibtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=2
-PATCHLEVEL=1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-ZLIBTCL_VERSION=${VERSION}
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define ZLIBTCL_VERSION "${ZLIBTCL_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1436: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1448: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1517: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1591: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1683: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1688 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1716: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1721 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1745: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1794 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1864: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1915: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1958 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1994: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2022: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2061: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2097: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2155: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2189: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2222: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2248: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2285: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2292 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2307 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2342 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2395: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2401 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2420 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2451: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2486: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2492 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2521: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2560: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2562 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2609: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2614 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2646: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2683: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2688 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2720: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2725 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2757: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2839: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2844 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2872 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:2912: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2917 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2949: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2991: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3031: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3081: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3086 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3144: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_zlibtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_zlibtcl 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3269: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3277 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3317: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3325 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3364: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3372 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3409: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3451: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3459 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3510: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3515 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3566: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3571 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3624: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:3662: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:3708: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:3722: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:3743: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3772: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3780 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3835: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:3992: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4000 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4093: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4101 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4177: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4185 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4316: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4321 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4383: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4388 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4448: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4453 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4485: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4487 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:4822: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 4825 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:4878: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 4880 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:4898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:4916: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 4918 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:4954: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4956 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5098: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:5245: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    #--------------------------------------------------------------------
-    # These are for zlibtclConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/zlibtcl${VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval zlibtcl_LIB_FLAG="-lzlibtcl${VERSION}${DBGX}"
-    else
-	eval zlibtcl_LIB_FLAG="-lzlibtcl`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    zlibtcl_BUILD_LIB_SPEC="-L`pwd` ${zlibtcl_LIB_FLAG}"
-    zlibtcl_LIB_SPEC="-L${pkglibdir} ${zlibtcl_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval zlibtcl_STUB_LIB_FLAG="-lzlibtclstub${VERSION}${DBGX}"
-    else
-	eval zlibtcl_STUB_LIB_FLAG="-lzlibtclstub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    zlibtcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${zlibtcl_STUB_LIB_FLAG}"
-    zlibtcl_STUB_LIB_SPEC="-L${pkglibdir} ${zlibtcl_STUB_LIB_FLAG}"
-    zlibtcl_BUILD_STUB_LIB_PATH="`pwd`/${zlibtclstub_LIB_FILE}"
-    zlibtcl_STUB_LIB_PATH="${pkglibdir}/${zlibtclstub_LIB_FILE}"
-
-    
-    
-    
-    
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl zlibtclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ZLIBTCL_VERSION@%$ZLIBTCL_VERSION%g
-s%@zlibtcl_LIB_FILE@%$zlibtcl_LIB_FILE%g
-s%@zlibtclstub_LIB_FILE@%$zlibtclstub_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@zlibtcl_BUILD_LIB_SPEC@%$zlibtcl_BUILD_LIB_SPEC%g
-s%@zlibtcl_LIB_SPEC@%$zlibtcl_LIB_SPEC%g
-s%@zlibtcl_BUILD_STUB_LIB_SPEC@%$zlibtcl_BUILD_STUB_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_SPEC@%$zlibtcl_STUB_LIB_SPEC%g
-s%@zlibtcl_BUILD_STUB_LIB_PATH@%$zlibtcl_BUILD_STUB_LIB_PATH%g
-s%@zlibtcl_STUB_LIB_PATH@%$zlibtcl_STUB_LIB_PATH%g
-s%@MAJOR_VERSION@%$MAJOR_VERSION%g
-s%@MINOR_VERSION@%$MINOR_VERSION%g
-s%@PATCHLEVEL@%$PATCHLEVEL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl zlibtclConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libz/tcl/configure.in b/tkimg1.3/libz/tcl/configure.in
deleted file mode 100644
index 438f92b..0000000
--- a/tkimg1.3/libz/tcl/configure.in
+++ /dev/null
@@ -1,197 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'zlibtcl', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./zlibtcl.c)
-
-AC_CONFIG_AUX_DIR(tclconfig)
-CONFIGDIR=${srcdir}/tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=zlibtcl
-
-MAJOR_VERSION=1
-MINOR_VERSION=2
-PATCHLEVEL=1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
-ZLIBTCL_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(ZLIBTCL_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(zlibtcl_LIB_FILE)
-AC_SUBST(zlibtclstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(ZLIBTCL_VERSION, "${ZLIBTCL_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_zlibtcl in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_zlibtcl)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES=""
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_EXPORT_CONFIG(zlibtcl)
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl zlibtclConfig.sh])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/libz/tcl/pkgIndex.tcl.in b/tkimg1.3/libz/tcl/pkgIndex.tcl.in
deleted file mode 100644
index 9342231..0000000
--- a/tkimg1.3/libz/tcl/pkgIndex.tcl.in
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @zlibtcl_LIB_FILE@]]
-
-# distinguish static and dyn variants, later.
-if {0} {
-package ifneeded @PACKAGE@ @VERSION@ [string map [list @dir@ $dir] \
-"if {[catch {load [file join @dir@ @zlibtcl_LIB_FILE@]}]} {
-    load [file join @dir@ @zlibtcl_LIB_FILE@]
-}"]
-}
diff --git a/tkimg1.3/libz/tcl/tclconfig/ChangeLog b/tkimg1.3/libz/tcl/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/libz/tcl/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/libz/tcl/tclconfig/README.txt b/tkimg1.3/libz/tcl/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/libz/tcl/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/libz/tcl/tclconfig/install-sh b/tkimg1.3/libz/tcl/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/libz/tcl/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/libz/tcl/tclconfig/tcl.m4 b/tkimg1.3/libz/tcl/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/libz/tcl/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/libz/tcl/tools/genStubs.tcl b/tkimg1.3/libz/tcl/tools/genStubs.tcl
deleted file mode 100644
index 3571fe4..0000000
--- a/tkimg1.3/libz/tcl/tools/genStubs.tcl
+++ /dev/null
@@ -1,935 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package require Tcl 8
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3 && [llength $args] != 4} {
-	puts stderr "wrong # args: declare $args"
-    }
-    if {[llength $args] == 3} {
-	lassign $args index platformList decl
-	set supressorList {}
-    } else {
-	lassign $args index platformList supressorList decl
-    }
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) [list $decl $supressorList]
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "Only one argument is allowed in varargs form: $decl"
-	}
-	set arg [parseArg [lindex $argList 0]]
-	if {$arg == "" || ([llength $arg] != 2)} {
-	    puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-	    return
-	}
-	set args [list TCL_VARARGS $arg]
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    set decl [lindex $decl 0]
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    set decl [lindex $decl 0] ; # ignore supressors here.
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    lassign $decl decl suppressors
-    if {[llength $suppressors] > 0} {
-	set sup [list]
-	foreach s $suppressors {
-	    if {[llength $s] > 1} {
-		# Note that elements in the sublist can be negated!
-		set and [list]
-		foreach i $s {
-		    if {[string match !* $i]} {
-			lappend and "!defined([string range $i 1 end])"
-		    } else {
-			lappend and "defined($i)"
-		    }
-		}
-		lappend sup "[join $and " && "]"
-	    } else {
-		if {[string match !* $s]} {
-		    lappend sup "!defined([string range $s 1 end])"
-		} else {
-		    lappend sup "defined($s)"
-		}
-	    }
-	}
-	append text "#if " [join $sup " || "] "\n"
-	append text "    NULL, /* " $index " */\n"
-	append text "#else  /* " [join $suppressors] " */\n"
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-	append text "#endif /* " [join $suppressors] " */\n"
-    } else {
-	append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    }
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/libz/tcl/zlib.h b/tkimg1.3/libz/tcl/zlib.h
deleted file mode 100644
index 71af07f..0000000
--- a/tkimg1.3/libz/tcl/zlib.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
- * Redirect the zlib definitions through the stub definitions of the
- * binding. A wrapper for a support library using zlib has to use this
- * header to ensure usage of the stub macros during the compilation of
- * the support library itself. In this way we avoid the need for
- * changing the original sources.
- *
- * This header has to be avoided when building the libz wrapper itself.
- */
-
-#include "zlibtclDecls.h"
diff --git a/tkimg1.3/libz/tcl/zlibtcl.c b/tkimg1.3/libz/tcl/zlibtcl.c
deleted file mode 100644
index ed0308b..0000000
--- a/tkimg1.3/libz/tcl/zlibtcl.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * zlibtcl.c --
- *
- *  Generic interface to XML parsers.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: zlibtcl.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- */
-
-#include "zlibtcl.h"
-
-#define TCL_DOES_STUBS \
-    (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
-    (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
-
-/*
- * Declarations for externally visible functions.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_zlibtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_ZLIBTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-EXTERN int Zlibtcl_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Zlibtcl_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-/*
- * Prototypes for procedures defined later in this file:
- */
-
-/*
- *----------------------------------------------------------------------------
- *
- * Zlibtcl_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Zlibtcl_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-#if TCL_DOES_STUBS
-  extern ZlibtclStubs zlibtclStubs;
-#endif
-
-#ifdef USE_TCL_STUBS
-  if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-    return TCL_ERROR;
-  }
-#endif
-
-#if TCL_DOES_STUBS
-  if (Tcl_PkgProvideEx(interp, PACKAGE_NAME, ZLIBTCL_VERSION,
-		       (ClientData) &zlibtclStubs) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#else
-  if (Tcl_PkgProvide(interp, PACKAGE_NAME, ZLIBTCL_VERSION) != TCL_OK) {
-    return TCL_ERROR;
-  }
-#endif
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Zlibtcl_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Zlibtcl_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Zlibtcl_Init(interp);
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Zlibtcl_XXX --
- *
- *  Wrappers around the zlib functionality.
- *
- * Results:
- *  Depends on function.
- *
- * Side effects:
- *  Depends on function.
- *
- *----------------------------------------------------------------------------
- */
-
-/*
- * No wrappers are required. Due to intelligent definition of the stub
- * table using the function names of the libz sources the stub table
- * contains jumps to the actual functionality.
- */
diff --git a/tkimg1.3/libz/tcl/zlibtcl.decls b/tkimg1.3/libz/tcl/zlibtcl.decls
deleted file mode 100644
index c2afad1..0000000
--- a/tkimg1.3/libz/tcl/zlibtcl.decls
+++ /dev/null
@@ -1,168 +0,0 @@
-# zlibtcl.decls -- -*- tcl -*-
-#
-# This file contains the declarations for all supported public functions
-# that are exported by the ZLIBTCL library via the stubs table. This file
-# is used to generate the zlibtclDecls.h/zlibtclStubsLib.c/zlibtclStubsInit.c
-# files.
-#	
-
-# Declare each of the functions in the public BLT interface.  Note that
-# the an index should never be reused for a different function in order
-# to preserve backwards compatibility.
-
-library zlibtcl
-
-# Define the ZLIBTCL interface:
-
-interface zlibtcl
-#hooks {}
-
-#########################################################################
-###  Misc. interfaces
-
-declare 0 generic {
-    CONST char* zlibVersion (void)
-}
-
-declare 1 generic {
-    CONST char* zError (int err)
-}
-
-declare 2 generic {
-    uLong crc32 (uLong crc, const Bytef *buf, uInt len)
-}
-
-declare 3 generic {
-    uLong adler32 (uLong adler, const Bytef *buf, uInt len)
-}
-
-#########################################################################
-###  Deflate = Compression
-
-declare 10 generic {
-    int deflateInit_ (z_streamp stream, int level, const char* version, int stream_size)
-}
-declare 11 generic {
-    int deflateInit2_ (z_streamp stream, int level, 
-	int method, int windowBits, int memLevel, int strategy,
-	const char* version, int stream_size)
-}
-declare 12 generic {
-    int deflate (z_streamp stream, int flush)
-}
-declare 13 generic {
-    int deflateEnd (z_streamp stream)
-}
-declare 14 generic {
-    int deflateSetDictionary (z_streamp stream, CONST Bytef* dict, uInt dictLength)
-}
-declare 15 generic {
-    int deflateCopy (z_streamp dst, z_streamp src)
-}
-declare 16 generic {
-    int deflateReset (z_streamp stream)
-}
-declare 17 generic {
-    int deflateParams (z_streamp stream, int level, int strategy)
-}
-
-#########################################################################
-
-declare 18 generic {
-    int compress (Bytef *dest, uLongf *destLen, CONST Bytef *source, uLong sourceLen)
-}
-declare 19 generic {
-    int compress2 (Bytef *dest, uLongf *destLen, CONST Bytef *source, uLong sourceLen, int level)
-}
-
-#########################################################################
-###  Inflate = Decompression
-
-declare 20 generic {
-    int inflateInit_ (z_streamp stream, const char* version, int stream_size)
-}
-declare 21 generic {
-    int inflateInit2_ (z_streamp stream, int windowBits, const char* version,
-			int stream_size)
-}
-declare 22 generic {
-    int inflate (z_streamp stream, int flush)
-}
-declare 23 generic {
-    int inflateEnd (z_streamp stream)
-}
-declare 24 generic {
-    int inflateSetDictionary (z_streamp stream, CONST Bytef* dict, uInt dictLength)
-}
-declare 25 generic {
-    int inflateSync (z_streamp stream)
-}
-declare 26 generic {
-    int inflateReset (z_streamp stream)
-}
-
-#########################################################################
-
-declare 27 generic {
-    int uncompress (Bytef *dest, uLongf *destLen, CONST Bytef *source, uLong sourceLen)
-}
-
-#########################################################################
-## gz'ip layer
-
-declare 30 generic {
-    gzFile gzopen  (const char *path, const char *mode)
-}
-declare 31 generic {
-    gzFile gzdopen  (int fd, const char *mode)
-}
-declare 32 generic {
-    int gzsetparams (gzFile file, int level, int strategy)
-}
-declare 33 generic {
-    int gzread  (gzFile file, voidp buf, unsigned len)
-}
-declare 34 generic {
-    int gzwrite (gzFile file, const voidpc buf, unsigned len)
-}
-# gzprintf - signature cannot be handled by current stubs mechanism
-if {0} {
-    declare 35 generic {
-	int gzprintf (gzFile file, const char *format, ...)
-    }
-}
-declare 36 generic {
-    int gzputs (gzFile file, const char *s)
-}
-declare 37 generic {
-    char* gzgets (gzFile file, char *buf, int len)
-}
-declare 38 generic {
-    int gzputc (gzFile file, int c)
-}
-declare 39 generic {
-    int gzgetc (gzFile file)
-}
-declare 40 generic {
-    int gzflush (gzFile file, int flush)
-}
-declare 41 generic {
-    z_off_t gzseek (gzFile file, z_off_t offset, int whence)
-}
-declare 42 generic {
-    int gzrewind (gzFile file)
-}
-declare 43 generic {
-    z_off_t gztell (gzFile file)
-}
-declare 44 generic {
-    int gzeof (gzFile file)
-}
-declare 45 generic {
-    int gzclose (gzFile file)
-}
-declare 46 generic {
-    const char* gzerror (gzFile file, int *errnum)
-}
-
-#########################################################################
diff --git a/tkimg1.3/libz/tcl/zlibtcl.h b/tkimg1.3/libz/tcl/zlibtcl.h
deleted file mode 100644
index ee74da6..0000000
--- a/tkimg1.3/libz/tcl/zlibtcl.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * zlibtcl.h --
- *
- *	Interface to libz.
- *
- * Copyright (c) 2002-2004 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * Zveno Pty Ltd makes this software and associated documentation
- * available free of charge for any purpose.  You may make copies
- * of the software but you must include all of this notice on any copy.
- *
- * Zveno Pty Ltd does not warrant that this software is error free
- * or fit for any purpose.  Zveno Pty Ltd disclaims any liability for
- * all claims, expenses, losses, damages and costs any user may incur
- * as a result of using, copying or modifying the software.
- *
- * $Id: zlibtcl.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- */
-
-#ifndef __ZLIBTCL_H__
-#define __ZLIBTCL_H__
-
-#include "tcl.h"
-
-#define ZLIBTCL_MAJOR_VERSION	1
-#define ZLIBTCL_MINOR_VERSION	2
-#define ZLIBTCL_RELEASE_LEVEL	TCL_RELEASE
-#define ZLIBTCL_RELEASE_SERIAL	1
-
-#define ZLIBTCL_VERSION		"1.2.1"
-#define ZLIBTCL_PATCH_LEVEL	"1.2.1"
-
-/*
- * Used to block the rest of this header file from resource compilers so
- * we can just get the version info.
- */
-#ifndef RC_INVOKED
-
-/* TIP 27 update. If CONST84 is not defined we are compiling against a
- * core before 8.4 and have to disable some CONST'ness.
- */
-
-#ifndef CONST84
-#   define CONST84
-#endif
-
-/*
- * Fix the Borland bug that's in the EXTERN macro from tcl.h.
- */
-#ifndef TCL_EXTERN
-#   undef DLLIMPORT
-#   undef DLLEXPORT
-#   if defined(STATIC_BUILD)
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
-#	define DLLIMPORT __declspec(dllimport)
-#	define DLLEXPORT __declspec(dllexport)
-#   elif defined(__BORLANDC__)
-#	define OLDBORLAND 1
-#	define DLLIMPORT __import
-#	define DLLEXPORT __export
-#   else
-#	define DLLIMPORT
-#	define DLLEXPORT
-#   endif
-    /* Avoid name mangling from C++ compilers. */
-#   ifdef __cplusplus
-#	define TCL_EXTRNC extern "C"
-#   else
-#	define TCL_EXTRNC extern
-#   endif
-    /* Pre-5.5 Borland requires the attributes be placed after the */
-    /* return type. */
-#   ifdef OLDBORLAND
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
-#   else
-#	define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
-#   endif
-#endif
-
-
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_zlibtcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_ZLIBTCL_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- *----------------------------------------------------------------------------
- * C API for Zlibtcl generic layer
- *----------------------------------------------------------------------------
- */
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for publically accessible routines
- *----------------------------------------------------------------------------
- */
-
-#include "zlibtclDecls.h"
-
-/*
- *----------------------------------------------------------------------------
- * Function prototypes for stub initialization.
- *----------------------------------------------------------------------------
- */
-
-#ifdef USE_ZLIBTCL_STUBS
-EXTERN CONST char *
-Zlibtcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
-#else
-
-/*
- * When not using stubs, make it a macro.
- */
-
-#define Zlibtcl_InitStubs(interp, version, exact) \
-    Tcl_PkgRequire(interp, "zlibtcl", version, exact)
-#endif
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif /* RC_INVOKED */
-#endif /* __ZLIBTCL_H__ */
diff --git a/tkimg1.3/libz/tcl/zlibtclConfig.sh.in b/tkimg1.3/libz/tcl/zlibtclConfig.sh.in
deleted file mode 100644
index b9cd2ca..0000000
--- a/tkimg1.3/libz/tcl/zlibtclConfig.sh.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# zlibtclConfig.sh --
-# 
-# This shell script (for sh) is generated automatically by zlibtcl's
-# configure script.  It will create shell variables for most of
-# the configuration options discovered by the configure script.
-# This script is intended to be included by the configure scripts
-# for zlibtcl extensions so that they don't have to figure this all
-# out for themselves.  This file does not duplicate information
-# already provided by tclConfig.sh, so you may need to use that
-# file in addition to this one.
-#
-# The information in this file is specific to a single platform.
-
-# zlibtcl's version number.
-zlibtcl_VERSION='@VERSION@'
-zlibtcl_MAJOR_VERSION='@MAJOR_VERSION@'
-zlibtcl_MINOR_VERSION='@MINOR_VERSION@'
-zlibtcl_RELEASE_LEVEL='@PATCHLEVEL@'
-
-# The name of the zlibtcl library (may be either a .a file or a shared library):
-zlibtcl_LIB_FILE=@zlibtcl_LIB_FILE@
-
-# String to pass to linker to pick up the zlibtcl library from its
-# build directory.
-zlibtcl_BUILD_LIB_SPEC='@zlibtcl_BUILD_LIB_SPEC@'
-
-# String to pass to linker to pick up the zlibtcl library from its
-# installed directory.
-zlibtcl_LIB_SPEC='@zlibtcl_LIB_SPEC@'
-
-# The name of the zlibtcl stub library (a .a file):
-zlibtcl_STUB_LIB_FILE=@zlibtclstub_LIB_FILE@
-
-# String to pass to linker to pick up the zlibtcl stub library from its
-# build directory.
-zlibtcl_BUILD_STUB_LIB_SPEC='@zlibtcl_BUILD_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the zlibtcl stub library from its
-# installed directory.
-zlibtcl_STUB_LIB_SPEC='@zlibtcl_STUB_LIB_SPEC@'
-
-# String to pass to linker to pick up the zlibtcl stub library from its
-# build directory.
-zlibtcl_BUILD_STUB_LIB_PATH='@zlibtcl_BUILD_STUB_LIB_PATH@'
-
-# String to pass to linker to pick up the zlibtcl stub library from its
-# installed directory.
-zlibtcl_STUB_LIB_PATH='@zlibtcl_STUB_LIB_PATH@'
-
-# Location of the top-level source directories from which zlibtcl
-# was built.  This is the directory that contains generic, unix, etc.
-# If zlibtcl was compiled in a different place than the directory
-# containing the source files, this points to the location of the
-# sources, not the location where zlibtcl was compiled. This can
-# be relative to the build directory.
-
-zlibtcl_SRC_DIR='@srcdir@'
diff --git a/tkimg1.3/libz/tcl/zlibtclDecls.h b/tkimg1.3/libz/tcl/zlibtclDecls.h
deleted file mode 100644
index e020054..0000000
--- a/tkimg1.3/libz/tcl/zlibtclDecls.h
+++ /dev/null
@@ -1,373 +0,0 @@
-
-/*
- * zlibtclDecls.h --
- *
- *	Declarations of functions in the platform independent public ZLIBTCL API.
- *
- */
-
-#ifndef _ZLIBTCLDECLS
-#define _ZLIBTCLDECLS
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the zlibtcl.decls script.
- */
-
-#include <tcl.h>
-#include <zlibtclDeclsMask.h>
-#include <../zlib.h>
-#include <zlibtclDeclsUnmask.h>
-
-/* !BEGIN!: Do not edit below this line. */
-
-/*
- * Exported function declarations:
- */
-
-/* 0 */
-EXTERN CONST char*	zlibVersion _ANSI_ARGS_((void));
-/* 1 */
-EXTERN CONST char*	zError _ANSI_ARGS_((int err));
-/* 2 */
-EXTERN uLong		crc32 _ANSI_ARGS_((uLong crc, const Bytef * buf, 
-				uInt len));
-/* 3 */
-EXTERN uLong		adler32 _ANSI_ARGS_((uLong adler, const Bytef * buf, 
-				uInt len));
-/* Slot 4 is reserved */
-/* Slot 5 is reserved */
-/* Slot 6 is reserved */
-/* Slot 7 is reserved */
-/* Slot 8 is reserved */
-/* Slot 9 is reserved */
-/* 10 */
-EXTERN int		deflateInit_ _ANSI_ARGS_((z_streamp stream, 
-				int level, const char* version, 
-				int stream_size));
-/* 11 */
-EXTERN int		deflateInit2_ _ANSI_ARGS_((z_streamp stream, 
-				int level, int method, int windowBits, 
-				int memLevel, int strategy, 
-				const char* version, int stream_size));
-/* 12 */
-EXTERN int		deflate _ANSI_ARGS_((z_streamp stream, int flush));
-/* 13 */
-EXTERN int		deflateEnd _ANSI_ARGS_((z_streamp stream));
-/* 14 */
-EXTERN int		deflateSetDictionary _ANSI_ARGS_((z_streamp stream, 
-				CONST Bytef* dict, uInt dictLength));
-/* 15 */
-EXTERN int		deflateCopy _ANSI_ARGS_((z_streamp dst, 
-				z_streamp src));
-/* 16 */
-EXTERN int		deflateReset _ANSI_ARGS_((z_streamp stream));
-/* 17 */
-EXTERN int		deflateParams _ANSI_ARGS_((z_streamp stream, 
-				int level, int strategy));
-/* 18 */
-EXTERN int		compress _ANSI_ARGS_((Bytef * dest, uLongf * destLen, 
-				CONST Bytef * source, uLong sourceLen));
-/* 19 */
-EXTERN int		compress2 _ANSI_ARGS_((Bytef * dest, 
-				uLongf * destLen, CONST Bytef * source, 
-				uLong sourceLen, int level));
-/* 20 */
-EXTERN int		inflateInit_ _ANSI_ARGS_((z_streamp stream, 
-				const char* version, int stream_size));
-/* 21 */
-EXTERN int		inflateInit2_ _ANSI_ARGS_((z_streamp stream, 
-				int windowBits, const char* version, 
-				int stream_size));
-/* 22 */
-EXTERN int		inflate _ANSI_ARGS_((z_streamp stream, int flush));
-/* 23 */
-EXTERN int		inflateEnd _ANSI_ARGS_((z_streamp stream));
-/* 24 */
-EXTERN int		inflateSetDictionary _ANSI_ARGS_((z_streamp stream, 
-				CONST Bytef* dict, uInt dictLength));
-/* 25 */
-EXTERN int		inflateSync _ANSI_ARGS_((z_streamp stream));
-/* 26 */
-EXTERN int		inflateReset _ANSI_ARGS_((z_streamp stream));
-/* 27 */
-EXTERN int		uncompress _ANSI_ARGS_((Bytef * dest, 
-				uLongf * destLen, CONST Bytef * source, 
-				uLong sourceLen));
-/* Slot 28 is reserved */
-/* Slot 29 is reserved */
-/* 30 */
-EXTERN gzFile		gzopen _ANSI_ARGS_((const char * path, 
-				const char * mode));
-/* 31 */
-EXTERN gzFile		gzdopen _ANSI_ARGS_((int fd, const char * mode));
-/* 32 */
-EXTERN int		gzsetparams _ANSI_ARGS_((gzFile file, int level, 
-				int strategy));
-/* 33 */
-EXTERN int		gzread _ANSI_ARGS_((gzFile file, voidp buf, 
-				unsigned len));
-/* 34 */
-EXTERN int		gzwrite _ANSI_ARGS_((gzFile file, const voidpc buf, 
-				unsigned len));
-/* Slot 35 is reserved */
-/* 36 */
-EXTERN int		gzputs _ANSI_ARGS_((gzFile file, const char * s));
-/* 37 */
-EXTERN char*		gzgets _ANSI_ARGS_((gzFile file, char * buf, int len));
-/* 38 */
-EXTERN int		gzputc _ANSI_ARGS_((gzFile file, int c));
-/* 39 */
-EXTERN int		gzgetc _ANSI_ARGS_((gzFile file));
-/* 40 */
-EXTERN int		gzflush _ANSI_ARGS_((gzFile file, int flush));
-/* 41 */
-EXTERN z_off_t		gzseek _ANSI_ARGS_((gzFile file, z_off_t offset, 
-				int whence));
-/* 42 */
-EXTERN int		gzrewind _ANSI_ARGS_((gzFile file));
-/* 43 */
-EXTERN z_off_t		gztell _ANSI_ARGS_((gzFile file));
-/* 44 */
-EXTERN int		gzeof _ANSI_ARGS_((gzFile file));
-/* 45 */
-EXTERN int		gzclose _ANSI_ARGS_((gzFile file));
-/* 46 */
-EXTERN const char*	gzerror _ANSI_ARGS_((gzFile file, int * errnum));
-
-typedef struct ZlibtclStubs {
-    int magic;
-    struct ZlibtclStubHooks *hooks;
-
-    CONST char* (*zlibVersion) _ANSI_ARGS_((void)); /* 0 */
-    CONST char* (*zError) _ANSI_ARGS_((int err)); /* 1 */
-    uLong (*crc32) _ANSI_ARGS_((uLong crc, const Bytef * buf, uInt len)); /* 2 */
-    uLong (*adler32) _ANSI_ARGS_((uLong adler, const Bytef * buf, uInt len)); /* 3 */
-    void *reserved4;
-    void *reserved5;
-    void *reserved6;
-    void *reserved7;
-    void *reserved8;
-    void *reserved9;
-    int (*deflateInit_) _ANSI_ARGS_((z_streamp stream, int level, const char* version, int stream_size)); /* 10 */
-    int (*deflateInit2_) _ANSI_ARGS_((z_streamp stream, int level, int method, int windowBits, int memLevel, int strategy, const char* version, int stream_size)); /* 11 */
-    int (*deflate) _ANSI_ARGS_((z_streamp stream, int flush)); /* 12 */
-    int (*deflateEnd) _ANSI_ARGS_((z_streamp stream)); /* 13 */
-    int (*deflateSetDictionary) _ANSI_ARGS_((z_streamp stream, CONST Bytef* dict, uInt dictLength)); /* 14 */
-    int (*deflateCopy) _ANSI_ARGS_((z_streamp dst, z_streamp src)); /* 15 */
-    int (*deflateReset) _ANSI_ARGS_((z_streamp stream)); /* 16 */
-    int (*deflateParams) _ANSI_ARGS_((z_streamp stream, int level, int strategy)); /* 17 */
-    int (*compress) _ANSI_ARGS_((Bytef * dest, uLongf * destLen, CONST Bytef * source, uLong sourceLen)); /* 18 */
-    int (*compress2) _ANSI_ARGS_((Bytef * dest, uLongf * destLen, CONST Bytef * source, uLong sourceLen, int level)); /* 19 */
-    int (*inflateInit_) _ANSI_ARGS_((z_streamp stream, const char* version, int stream_size)); /* 20 */
-    int (*inflateInit2_) _ANSI_ARGS_((z_streamp stream, int windowBits, const char* version, int stream_size)); /* 21 */
-    int (*inflate) _ANSI_ARGS_((z_streamp stream, int flush)); /* 22 */
-    int (*inflateEnd) _ANSI_ARGS_((z_streamp stream)); /* 23 */
-    int (*inflateSetDictionary) _ANSI_ARGS_((z_streamp stream, CONST Bytef* dict, uInt dictLength)); /* 24 */
-    int (*inflateSync) _ANSI_ARGS_((z_streamp stream)); /* 25 */
-    int (*inflateReset) _ANSI_ARGS_((z_streamp stream)); /* 26 */
-    int (*uncompress) _ANSI_ARGS_((Bytef * dest, uLongf * destLen, CONST Bytef * source, uLong sourceLen)); /* 27 */
-    void *reserved28;
-    void *reserved29;
-    gzFile (*gzopen) _ANSI_ARGS_((const char * path, const char * mode)); /* 30 */
-    gzFile (*gzdopen) _ANSI_ARGS_((int fd, const char * mode)); /* 31 */
-    int (*gzsetparams) _ANSI_ARGS_((gzFile file, int level, int strategy)); /* 32 */
-    int (*gzread) _ANSI_ARGS_((gzFile file, voidp buf, unsigned len)); /* 33 */
-    int (*gzwrite) _ANSI_ARGS_((gzFile file, const voidpc buf, unsigned len)); /* 34 */
-    void *reserved35;
-    int (*gzputs) _ANSI_ARGS_((gzFile file, const char * s)); /* 36 */
-    char* (*gzgets) _ANSI_ARGS_((gzFile file, char * buf, int len)); /* 37 */
-    int (*gzputc) _ANSI_ARGS_((gzFile file, int c)); /* 38 */
-    int (*gzgetc) _ANSI_ARGS_((gzFile file)); /* 39 */
-    int (*gzflush) _ANSI_ARGS_((gzFile file, int flush)); /* 40 */
-    z_off_t (*gzseek) _ANSI_ARGS_((gzFile file, z_off_t offset, int whence)); /* 41 */
-    int (*gzrewind) _ANSI_ARGS_((gzFile file)); /* 42 */
-    z_off_t (*gztell) _ANSI_ARGS_((gzFile file)); /* 43 */
-    int (*gzeof) _ANSI_ARGS_((gzFile file)); /* 44 */
-    int (*gzclose) _ANSI_ARGS_((gzFile file)); /* 45 */
-    const char* (*gzerror) _ANSI_ARGS_((gzFile file, int * errnum)); /* 46 */
-} ZlibtclStubs;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern ZlibtclStubs *zlibtclStubsPtr;
-#ifdef __cplusplus
-}
-#endif
-
-#if defined(USE_ZLIBTCL_STUBS) && !defined(USE_ZLIBTCL_STUB_PROCS)
-
-/*
- * Inline function declarations:
- */
-
-#ifndef zlibVersion
-#define zlibVersion \
-	(zlibtclStubsPtr->zlibVersion) /* 0 */
-#endif
-#ifndef zError
-#define zError \
-	(zlibtclStubsPtr->zError) /* 1 */
-#endif
-#ifndef crc32
-#define crc32 \
-	(zlibtclStubsPtr->crc32) /* 2 */
-#endif
-#ifndef adler32
-#define adler32 \
-	(zlibtclStubsPtr->adler32) /* 3 */
-#endif
-/* Slot 4 is reserved */
-/* Slot 5 is reserved */
-/* Slot 6 is reserved */
-/* Slot 7 is reserved */
-/* Slot 8 is reserved */
-/* Slot 9 is reserved */
-#ifndef deflateInit_
-#define deflateInit_ \
-	(zlibtclStubsPtr->deflateInit_) /* 10 */
-#endif
-#ifndef deflateInit2_
-#define deflateInit2_ \
-	(zlibtclStubsPtr->deflateInit2_) /* 11 */
-#endif
-#ifndef deflate
-#define deflate \
-	(zlibtclStubsPtr->deflate) /* 12 */
-#endif
-#ifndef deflateEnd
-#define deflateEnd \
-	(zlibtclStubsPtr->deflateEnd) /* 13 */
-#endif
-#ifndef deflateSetDictionary
-#define deflateSetDictionary \
-	(zlibtclStubsPtr->deflateSetDictionary) /* 14 */
-#endif
-#ifndef deflateCopy
-#define deflateCopy \
-	(zlibtclStubsPtr->deflateCopy) /* 15 */
-#endif
-#ifndef deflateReset
-#define deflateReset \
-	(zlibtclStubsPtr->deflateReset) /* 16 */
-#endif
-#ifndef deflateParams
-#define deflateParams \
-	(zlibtclStubsPtr->deflateParams) /* 17 */
-#endif
-#ifndef compress
-#define compress \
-	(zlibtclStubsPtr->compress) /* 18 */
-#endif
-#ifndef compress2
-#define compress2 \
-	(zlibtclStubsPtr->compress2) /* 19 */
-#endif
-#ifndef inflateInit_
-#define inflateInit_ \
-	(zlibtclStubsPtr->inflateInit_) /* 20 */
-#endif
-#ifndef inflateInit2_
-#define inflateInit2_ \
-	(zlibtclStubsPtr->inflateInit2_) /* 21 */
-#endif
-#ifndef inflate
-#define inflate \
-	(zlibtclStubsPtr->inflate) /* 22 */
-#endif
-#ifndef inflateEnd
-#define inflateEnd \
-	(zlibtclStubsPtr->inflateEnd) /* 23 */
-#endif
-#ifndef inflateSetDictionary
-#define inflateSetDictionary \
-	(zlibtclStubsPtr->inflateSetDictionary) /* 24 */
-#endif
-#ifndef inflateSync
-#define inflateSync \
-	(zlibtclStubsPtr->inflateSync) /* 25 */
-#endif
-#ifndef inflateReset
-#define inflateReset \
-	(zlibtclStubsPtr->inflateReset) /* 26 */
-#endif
-#ifndef uncompress
-#define uncompress \
-	(zlibtclStubsPtr->uncompress) /* 27 */
-#endif
-/* Slot 28 is reserved */
-/* Slot 29 is reserved */
-#ifndef gzopen
-#define gzopen \
-	(zlibtclStubsPtr->gzopen) /* 30 */
-#endif
-#ifndef gzdopen
-#define gzdopen \
-	(zlibtclStubsPtr->gzdopen) /* 31 */
-#endif
-#ifndef gzsetparams
-#define gzsetparams \
-	(zlibtclStubsPtr->gzsetparams) /* 32 */
-#endif
-#ifndef gzread
-#define gzread \
-	(zlibtclStubsPtr->gzread) /* 33 */
-#endif
-#ifndef gzwrite
-#define gzwrite \
-	(zlibtclStubsPtr->gzwrite) /* 34 */
-#endif
-/* Slot 35 is reserved */
-#ifndef gzputs
-#define gzputs \
-	(zlibtclStubsPtr->gzputs) /* 36 */
-#endif
-#ifndef gzgets
-#define gzgets \
-	(zlibtclStubsPtr->gzgets) /* 37 */
-#endif
-#ifndef gzputc
-#define gzputc \
-	(zlibtclStubsPtr->gzputc) /* 38 */
-#endif
-#ifndef gzgetc
-#define gzgetc \
-	(zlibtclStubsPtr->gzgetc) /* 39 */
-#endif
-#ifndef gzflush
-#define gzflush \
-	(zlibtclStubsPtr->gzflush) /* 40 */
-#endif
-#ifndef gzseek
-#define gzseek \
-	(zlibtclStubsPtr->gzseek) /* 41 */
-#endif
-#ifndef gzrewind
-#define gzrewind \
-	(zlibtclStubsPtr->gzrewind) /* 42 */
-#endif
-#ifndef gztell
-#define gztell \
-	(zlibtclStubsPtr->gztell) /* 43 */
-#endif
-#ifndef gzeof
-#define gzeof \
-	(zlibtclStubsPtr->gzeof) /* 44 */
-#endif
-#ifndef gzclose
-#define gzclose \
-	(zlibtclStubsPtr->gzclose) /* 45 */
-#endif
-#ifndef gzerror
-#define gzerror \
-	(zlibtclStubsPtr->gzerror) /* 46 */
-#endif
-
-#endif /* defined(USE_ZLIBTCL_STUBS) && !defined(USE_ZLIBTCL_STUB_PROCS) */
-
-/* !END!: Do not edit above this line. */
-
-#endif /* _ZLIBTCLDECLS */
-
diff --git a/tkimg1.3/libz/tcl/zlibtclDeclsMask.h b/tkimg1.3/libz/tcl/zlibtclDeclsMask.h
deleted file mode 100644
index d75b0cf..0000000
--- a/tkimg1.3/libz/tcl/zlibtclDeclsMask.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifdef WIN32
-/*
- * While the definitions in the original header are technically the
- * same as the definitions in 'zlibDecls.h' on Windows they are not,
- * in a small detail: DLLEXPORT vs. DLLIMPORT. As our artificial
- * definitions do the right thing we use the macro definitions below
- * to move the original definitionsd out of the way. We do retain the
- * inclusion of all the type definitions, etc.
- */
-#define zlibVersion	__mask_zlibVersion
-#define zError	__mask_zError
-#define crc32	__mask_crc32
-#define adler32	__mask_adler32
-#define deflateInit_	__mask_deflateInit_
-#define deflateInit2_	__mask_deflateInit2_
-#define deflate	__mask_deflate
-#define deflateEnd	__mask_deflateEnd
-#define deflateSetDictionary	__mask_deflateSetDictionary
-#define deflateCopy	__mask_deflateCopy
-#define deflateReset	__mask_deflateReset
-#define deflateParams	__mask_deflateParams
-#define compress	__mask_compress
-#define compress2	__mask_compress2
-#define inflateInit_	__mask_inflateInit_
-#define inflateInit2_	__mask_inflateInit2_
-#define inflate	__mask_inflate
-#define inflateEnd	__mask_inflateEnd
-#define inflateSetDictionary	__mask_inflateSetDictionary
-#define inflateSync	__mask_inflateSync
-#define inflateReset	__mask_inflateReset
-#define uncompress	__mask_uncompress
-#define gzopen	__mask_gzopen
-#define gzdopen	__mask_gzdopen
-#define gzsetparams	__mask_gzsetparams
-#define gzread	__mask_gzread
-#define gzwrite	__mask_gzwrite
-#define gzputs	__mask_gzputs
-#define gzgets	__mask_gzgets
-#define gzputc	__mask_gzputc
-#define gzgetc	__mask_gzgetc
-#define gzflush	__mask_gzflush
-#define gzseek	__mask_gzseek
-#define gzrewind	__mask_gzrewind
-#define gztell	__mask_gztell
-#define gzeof	__mask_gzeof
-#define gzclose	__mask_gzclose
-#define gzerror	__mask_gzerror
-#endif /* WIN32 */
diff --git a/tkimg1.3/libz/tcl/zlibtclDeclsUnmask.h b/tkimg1.3/libz/tcl/zlibtclDeclsUnmask.h
deleted file mode 100644
index 6c5c2f6..0000000
--- a/tkimg1.3/libz/tcl/zlibtclDeclsUnmask.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifdef WIN32
-/* Restore the usage of the original names */
-#undef zlibVersion
-#undef zError
-#undef crc32
-#undef adler32
-#undef deflateInit_
-#undef deflateInit2_
-#undef deflate
-#undef deflateEnd
-#undef deflateSetDictionary
-#undef deflateCopy
-#undef deflateReset
-#undef deflateParams
-#undef compress
-#undef compress2
-#undef inflateInit_
-#undef inflateInit2_
-#undef inflate
-#undef inflateEnd
-#undef inflateSetDictionary
-#undef inflateSync
-#undef inflateReset
-#undef uncompress
-#undef gzopen
-#undef gzdopen
-#undef gzsetparams
-#undef gzread
-#undef gzwrite
-#undef gzputs
-#undef gzgets
-#undef gzputc
-#undef gzgetc
-#undef gzflush
-#undef gzseek
-#undef gzrewind
-#undef gztell
-#undef gzeof
-#undef gzclose
-#undef gzerror
-#endif /* WIN32 */
diff --git a/tkimg1.3/libz/tcl/zlibtclStubInit.c b/tkimg1.3/libz/tcl/zlibtclStubInit.c
deleted file mode 100644
index d3e1e83..0000000
--- a/tkimg1.3/libz/tcl/zlibtclStubInit.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* 
- * zlibtclStubInit.c --
- */
-
-#include "zlibtcl.h"
-
-/*
- * Remove macros that will interfere with the definitions below.
- */
-
-
-/*
- * WARNING: The contents of this file is automatically generated by the
- * genStubs.tcl script. Any modifications to the function declarations
- * below should be made in the zlibtcl.decls script.
- */
-
-/* !BEGIN!: Do not edit below this line. */
-
-ZlibtclStubs zlibtclStubs = {
-    TCL_STUB_MAGIC,
-    NULL,
-    zlibVersion, /* 0 */
-    zError, /* 1 */
-    crc32, /* 2 */
-    adler32, /* 3 */
-    NULL, /* 4 */
-    NULL, /* 5 */
-    NULL, /* 6 */
-    NULL, /* 7 */
-    NULL, /* 8 */
-    NULL, /* 9 */
-    deflateInit_, /* 10 */
-    deflateInit2_, /* 11 */
-    deflate, /* 12 */
-    deflateEnd, /* 13 */
-    deflateSetDictionary, /* 14 */
-    deflateCopy, /* 15 */
-    deflateReset, /* 16 */
-    deflateParams, /* 17 */
-    compress, /* 18 */
-    compress2, /* 19 */
-    inflateInit_, /* 20 */
-    inflateInit2_, /* 21 */
-    inflate, /* 22 */
-    inflateEnd, /* 23 */
-    inflateSetDictionary, /* 24 */
-    inflateSync, /* 25 */
-    inflateReset, /* 26 */
-    uncompress, /* 27 */
-    NULL, /* 28 */
-    NULL, /* 29 */
-    gzopen, /* 30 */
-    gzdopen, /* 31 */
-    gzsetparams, /* 32 */
-    gzread, /* 33 */
-    gzwrite, /* 34 */
-    NULL, /* 35 */
-    gzputs, /* 36 */
-    gzgets, /* 37 */
-    gzputc, /* 38 */
-    gzgetc, /* 39 */
-    gzflush, /* 40 */
-    gzseek, /* 41 */
-    gzrewind, /* 42 */
-    gztell, /* 43 */
-    gzeof, /* 44 */
-    gzclose, /* 45 */
-    gzerror, /* 46 */
-};
-
-/* !END!: Do not edit above this line. */
diff --git a/tkimg1.3/libz/tcl/zlibtclStubLib.c b/tkimg1.3/libz/tcl/zlibtclStubLib.c
deleted file mode 100644
index 9e471bc..0000000
--- a/tkimg1.3/libz/tcl/zlibtclStubLib.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
- * zlibtclStubLib.c --
- *
- *	Stub object that will be statically linked into extensions that wish
- *	to access the ZLIBTCL API.
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: zlibtclStubLib.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- */
-
-#ifndef USE_TCL_STUBS
-#define USE_TCL_STUBS
-#endif
-
-#include "zlibtcl.h"
-
-ZlibtclStubs *zlibtclStubsPtr;
-
-/*
- *----------------------------------------------------------------------
- *
- * Zlibtcl_InitStubs --
- *
- *	Checks that the correct version of Blt is loaded and that it
- *	supports stubs. It then initialises the stub table pointers.
- *
- * Results:
- *	The actual version of BLT that satisfies the request, or
- *	NULL to indicate that an error occurred.
- *
- * Side effects:
- *	Sets the stub table pointers.
- *
- *----------------------------------------------------------------------
- */
-
-#ifdef Zlibtcl_InitStubs
-#undef Zlibtcl_InitStubs
-#endif
-
-CONST char *
-Zlibtcl_InitStubs(interp, version, exact)
-    Tcl_Interp *interp;
-    CONST char *version;
-    int exact;
-{
-    CONST char *result;
-
-    /* HACK: de-CONST 'version' if compiled against 8.3.
-     * The API has no CONST despite not modifying the argument
-     * And a debug build with high warning-level on windows
-     * will abort the compilation.
-     */
-
-#if ((TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)))
-#define UNCONST (char*)
-#else
-#define UNCONST 
-#endif
-
-    result = Tcl_PkgRequireEx(interp, PACKAGE_NAME, UNCONST version, exact,
-		(ClientData *) &zlibtclStubsPtr);
-    if (!result || !zlibtclStubsPtr) {
-        return (char *) NULL;
-    }
-
-    return result;
-}
-#undef UNCONST
diff --git a/tkimg1.3/libz/trees.c b/tkimg1.3/libz/trees.c
deleted file mode 100644
index 6c0dbc2..0000000
--- a/tkimg1.3/libz/trees.c
+++ /dev/null
@@ -1,1215 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2003 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process uses several Huffman trees. The more
- *      common source values are represented by shorter bit sequences.
- *
- *      Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values).  The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- *      Storer, James A.
- *          Data Compression:  Methods and Theory, pp. 49-50.
- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.
- *
- *      Sedgewick, R.
- *          Algorithms, p290.
- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id: trees.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6      16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10    17
-/* repeat a zero length 3-10 times  (3 bits of repeat count) */
-
-#define REPZ_11_138  18
-/* repeat a zero length 11-138 times  (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN  512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-#  include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
-    const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
-    int     extra_base;          /* base index for extra_bits */
-    int     elems;               /* max number of elements in the tree */
-    int     max_length;          /* max bit length for the codes */
-};
-
-local static_tree_desc  static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc  static_d_desc =
-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
-
-local static_tree_desc  static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block     OF((deflate_state *s));
-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));
-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree     OF((deflate_state *s, tree_desc *desc));
-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local int  build_bl_tree  OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
-                              int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
-                              ct_data *dtree));
-local void set_data_type  OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup      OF((deflate_state *s));
-local void bi_flush       OF((deflate_state *s));
-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
-                              int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-   /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-#  define send_code(s, c, tree) \
-     { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-       send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
-    put_byte(s, (uch)((w) & 0xff)); \
-    put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits      OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
-    deflate_state *s;
-    int value;  /* value to send */
-    int length; /* number of bits */
-{
-    Tracevv((stderr," l %2d v %4x ", length, value));
-    Assert(length > 0 && length <= 15, "invalid length");
-    s->bits_sent += (ulg)length;
-
-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
-     * unused bits in value.
-     */
-    if (s->bi_valid > (int)Buf_size - length) {
-        s->bi_buf |= (value << s->bi_valid);
-        put_short(s, s->bi_buf);
-        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
-        s->bi_valid += length - Buf_size;
-    } else {
-        s->bi_buf |= value << s->bi_valid;
-        s->bi_valid += length;
-    }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
-  if (s->bi_valid > (int)Buf_size - len) {\
-    int val = value;\
-    s->bi_buf |= (val << s->bi_valid);\
-    put_short(s, s->bi_buf);\
-    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
-    s->bi_valid += len - Buf_size;\
-  } else {\
-    s->bi_buf |= (value) << s->bi_valid;\
-    s->bi_valid += len;\
-  }\
-}
-#endif /* DEBUG */
-
-
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
-    static int static_init_done = 0;
-    int n;        /* iterates over tree elements */
-    int bits;     /* bit counter */
-    int length;   /* length value */
-    int code;     /* code value */
-    int dist;     /* distance index */
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    if (static_init_done) return;
-
-    /* For some embedded targets, global variables are not initialized: */
-    static_l_desc.static_tree = static_ltree;
-    static_l_desc.extra_bits = extra_lbits;
-    static_d_desc.static_tree = static_dtree;
-    static_d_desc.extra_bits = extra_dbits;
-    static_bl_desc.extra_bits = extra_blbits;
-
-    /* Initialize the mapping length (0..255) -> length code (0..28) */
-    length = 0;
-    for (code = 0; code < LENGTH_CODES-1; code++) {
-        base_length[code] = length;
-        for (n = 0; n < (1<<extra_lbits[code]); n++) {
-            _length_code[length++] = (uch)code;
-        }
-    }
-    Assert (length == 256, "tr_static_init: length != 256");
-    /* Note that the length 255 (match length 258) can be represented
-     * in two different ways: code 284 + 5 bits or code 285, so we
-     * overwrite length_code[255] to use the best encoding:
-     */
-    _length_code[length-1] = (uch)code;
-
-    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
-    dist = 0;
-    for (code = 0 ; code < 16; code++) {
-        base_dist[code] = dist;
-        for (n = 0; n < (1<<extra_dbits[code]); n++) {
-            _dist_code[dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: dist != 256");
-    dist >>= 7; /* from now on, all distances are divided by 128 */
-    for ( ; code < D_CODES; code++) {
-        base_dist[code] = dist << 7;
-        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
-            _dist_code[256 + dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
-    /* Construct the codes of the static literal tree */
-    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
-    n = 0;
-    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
-    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
-    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
-    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
-    /* Codes 286 and 287 do not exist, but we must include them in the
-     * tree construction to get a canonical Huffman tree (longest code
-     * all ones)
-     */
-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
-    /* The static distance tree is trivial: */
-    for (n = 0; n < D_CODES; n++) {
-        static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
-    }
-    static_init_done = 1;
-
-#  ifdef GEN_TREES_H
-    gen_trees_header();
-#  endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-#  ifndef DEBUG
-#    include <stdio.h>
-#  endif
-
-#  define SEPARATOR(i, last, width) \
-      ((i) == (last)? "\n};\n\n" :    \
-       ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
-    FILE *header = fopen("trees.h", "w");
-    int i;
-
-    Assert (header != NULL, "Can't open trees.h");
-    fprintf(header,
-            "/* header created automatically with -DGEN_TREES_H */\n\n");
-
-    fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
-    for (i = 0; i < L_CODES+2; i++) {
-        fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
-                static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
-    }
-
-    fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
-                static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
-    }
-
-    fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
-    for (i = 0; i < DIST_CODE_LEN; i++) {
-        fprintf(header, "%2u%s", _dist_code[i],
-                SEPARATOR(i, DIST_CODE_LEN-1, 20));
-    }
-
-    fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
-    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
-        fprintf(header, "%2u%s", _length_code[i],
-                SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
-    }
-
-    fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
-    for (i = 0; i < LENGTH_CODES; i++) {
-        fprintf(header, "%1u%s", base_length[i],
-                SEPARATOR(i, LENGTH_CODES-1, 20));
-    }
-
-    fprintf(header, "local const int base_dist[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "%5u%s", base_dist[i],
-                SEPARATOR(i, D_CODES-1, 10));
-    }
-
-    fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
-    deflate_state *s;
-{
-    tr_static_init();
-
-    s->l_desc.dyn_tree = s->dyn_ltree;
-    s->l_desc.stat_desc = &static_l_desc;
-
-    s->d_desc.dyn_tree = s->dyn_dtree;
-    s->d_desc.stat_desc = &static_d_desc;
-
-    s->bl_desc.dyn_tree = s->bl_tree;
-    s->bl_desc.stat_desc = &static_bl_desc;
-
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
-    s->compressed_len = 0L;
-    s->bits_sent = 0L;
-#endif
-
-    /* Initialize the first block of the first file: */
-    init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
-    deflate_state *s;
-{
-    int n; /* iterates over tree elements */
-
-    /* Initialize the trees. */
-    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
-    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
-    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
-    s->dyn_ltree[END_BLOCK].Freq = 1;
-    s->opt_len = s->static_len = 0L;
-    s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
-    top = s->heap[SMALLEST]; \
-    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
-    pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
-   (tree[n].Freq < tree[m].Freq || \
-   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
-    deflate_state *s;
-    ct_data *tree;  /* the tree to restore */
-    int k;               /* node to move down */
-{
-    int v = s->heap[k];
-    int j = k << 1;  /* left son of k */
-    while (j <= s->heap_len) {
-        /* Set j to the smallest of the two sons: */
-        if (j < s->heap_len &&
-            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
-            j++;
-        }
-        /* Exit if v is smaller than both sons */
-        if (smaller(tree, v, s->heap[j], s->depth)) break;
-
-        /* Exchange v with the smallest son */
-        s->heap[k] = s->heap[j];  k = j;
-
-        /* And continue down the tree, setting j to the left son of k */
-        j <<= 1;
-    }
-    s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- *    above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- *     array bl_count contains the frequencies for each bit length.
- *     The length opt_len is updated; static_len is also updated if stree is
- *     not null.
- */
-local void gen_bitlen(s, desc)
-    deflate_state *s;
-    tree_desc *desc;    /* the tree descriptor */
-{
-    ct_data *tree        = desc->dyn_tree;
-    int max_code         = desc->max_code;
-    const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
-    int base             = desc->stat_desc->extra_base;
-    int max_length       = desc->stat_desc->max_length;
-    int h;              /* heap index */
-    int n, m;           /* iterate over the tree elements */
-    int bits;           /* bit length */
-    int xbits;          /* extra bits */
-    ush f;              /* frequency */
-    int overflow = 0;   /* number of elements with bit length too large */
-
-    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
-    /* In a first pass, compute the optimal bit lengths (which may
-     * overflow in the case of the bit length tree).
-     */
-    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
-    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
-        n = s->heap[h];
-        bits = tree[tree[n].Dad].Len + 1;
-        if (bits > max_length) bits = max_length, overflow++;
-        tree[n].Len = (ush)bits;
-        /* We overwrite tree[n].Dad which is no longer needed */
-
-        if (n > max_code) continue; /* not a leaf node */
-
-        s->bl_count[bits]++;
-        xbits = 0;
-        if (n >= base) xbits = extra[n-base];
-        f = tree[n].Freq;
-        s->opt_len += (ulg)f * (bits + xbits);
-        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
-    }
-    if (overflow == 0) return;
-
-    Trace((stderr,"\nbit length overflow\n"));
-    /* This happens for example on obj2 and pic of the Calgary corpus */
-
-    /* Find the first bit length which could increase: */
-    do {
-        bits = max_length-1;
-        while (s->bl_count[bits] == 0) bits--;
-        s->bl_count[bits]--;      /* move one leaf down the tree */
-        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
-        s->bl_count[max_length]--;
-        /* The brother of the overflow item also moves one step up,
-         * but this does not affect bl_count[max_length]
-         */
-        overflow -= 2;
-    } while (overflow > 0);
-
-    /* Now recompute all bit lengths, scanning in increasing frequency.
-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
-     * lengths instead of fixing only the wrong ones. This idea is taken
-     * from 'ar' written by Haruhiko Okumura.)
-     */
-    for (bits = max_length; bits != 0; bits--) {
-        n = s->bl_count[bits];
-        while (n != 0) {
-            m = s->heap[--h];
-            if (m > max_code) continue;
-            if (tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
-                s->opt_len += ((long)bits - (long)tree[m].Len)
-                              *(long)tree[m].Freq;
-                tree[m].Len = (ush)bits;
-            }
-            n--;
-        }
-    }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- *     zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
-    ct_data *tree;             /* the tree to decorate */
-    int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
-{
-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
-    ush code = 0;              /* running code value */
-    int bits;                  /* bit index */
-    int n;                     /* code index */
-
-    /* The distribution counts are first used to generate the code values
-     * without bit reversal.
-     */
-    for (bits = 1; bits <= MAX_BITS; bits++) {
-        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
-    }
-    /* Check that the bit counts in bl_count are consistent. The last code
-     * must be all ones.
-     */
-    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
-            "inconsistent bit counts");
-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
-    for (n = 0;  n <= max_code; n++) {
-        int len = tree[n].Len;
-        if (len == 0) continue;
-        /* Now reverse the bits */
-        tree[n].Code = bi_reverse(next_code[len]++, len);
-
-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
-    }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- *     and corresponding code. The length opt_len is updated; static_len is
- *     also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
-    deflate_state *s;
-    tree_desc *desc; /* the tree descriptor */
-{
-    ct_data *tree         = desc->dyn_tree;
-    const ct_data *stree  = desc->stat_desc->static_tree;
-    int elems             = desc->stat_desc->elems;
-    int n, m;          /* iterate over heap elements */
-    int max_code = -1; /* largest code with non zero frequency */
-    int node;          /* new node being created */
-
-    /* Construct the initial heap, with least frequent element in
-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
-     * heap[0] is not used.
-     */
-    s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
-    for (n = 0; n < elems; n++) {
-        if (tree[n].Freq != 0) {
-            s->heap[++(s->heap_len)] = max_code = n;
-            s->depth[n] = 0;
-        } else {
-            tree[n].Len = 0;
-        }
-    }
-
-    /* The pkzip format requires that at least one distance code exists,
-     * and that at least one bit should be sent even if there is only one
-     * possible code. So to avoid special checks later on we force at least
-     * two codes of non zero frequency.
-     */
-    while (s->heap_len < 2) {
-        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
-        tree[node].Freq = 1;
-        s->depth[node] = 0;
-        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
-        /* node is 0 or 1 so it does not have extra bits */
-    }
-    desc->max_code = max_code;
-
-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
-     * establish sub-heaps of increasing lengths:
-     */
-    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
-    /* Construct the Huffman tree by repeatedly combining the least two
-     * frequent nodes.
-     */
-    node = elems;              /* next internal node of the tree */
-    do {
-        pqremove(s, tree, n);  /* n = node of least frequency */
-        m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
-        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
-        s->heap[--(s->heap_max)] = m;
-
-        /* Create a new node father of n and m */
-        tree[node].Freq = tree[n].Freq + tree[m].Freq;
-        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
-                                s->depth[n] : s->depth[m]) + 1);
-        tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
-        if (tree == s->bl_tree) {
-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
-        }
-#endif
-        /* and insert the new node in the heap */
-        s->heap[SMALLEST] = node++;
-        pqdownheap(s, tree, SMALLEST);
-
-    } while (s->heap_len >= 2);
-
-    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
-    /* At this point, the fields freq and dad are set. We can now
-     * generate the bit lengths.
-     */
-    gen_bitlen(s, (tree_desc *)desc);
-
-    /* The field len is now set, we can generate the bit codes */
-    gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree;   /* the tree to be scanned */
-    int max_code;    /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    if (nextlen == 0) max_count = 138, min_count = 3;
-    tree[max_code+1].Len = (ush)0xffff; /* guard */
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            s->bl_tree[curlen].Freq += count;
-        } else if (curlen != 0) {
-            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
-            s->bl_tree[REP_3_6].Freq++;
-        } else if (count <= 10) {
-            s->bl_tree[REPZ_3_10].Freq++;
-        } else {
-            s->bl_tree[REPZ_11_138].Freq++;
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree; /* the tree to be scanned */
-    int max_code;       /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    /* tree[max_code+1].Len = -1; */  /* guard already set */
-    if (nextlen == 0) max_count = 138, min_count = 3;
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
-        } else if (curlen != 0) {
-            if (curlen != prevlen) {
-                send_code(s, curlen, s->bl_tree); count--;
-            }
-            Assert(count >= 3 && count <= 6, " 3_6?");
-            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
-        } else if (count <= 10) {
-            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
-        } else {
-            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
-    deflate_state *s;
-{
-    int max_blindex;  /* index of last bit length code of non zero freq */
-
-    /* Determine the bit length frequencies for literal and distance trees */
-    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
-    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
-    /* Build the bit length tree: */
-    build_tree(s, (tree_desc *)(&(s->bl_desc)));
-    /* opt_len now includes the length of the tree representations, except
-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
-     */
-
-    /* Determine the number of bit length codes to send. The pkzip format
-     * requires that at least 4 bit length codes be sent. (appnote.txt says
-     * 3 but the actual value used is 4.)
-     */
-    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
-        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
-    }
-    /* Update opt_len to include the bit length tree and counts */
-    s->opt_len += 3*(max_blindex+1) + 5+5+4;
-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
-            s->opt_len, s->static_len));
-
-    return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
-    deflate_state *s;
-    int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
-    int rank;                    /* index in bl_order */
-
-    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
-    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
-            "too many codes");
-    Tracev((stderr, "\nbl counts: "));
-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
-    send_bits(s, dcodes-1,   5);
-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
-    for (rank = 0; rank < blcodes; rank++) {
-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
-        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
-    }
-    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
-    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
-    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
-#ifdef DEBUG
-    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
-    s->compressed_len += (stored_len + 4) << 3;
-#endif
-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
-    deflate_state *s;
-{
-    send_bits(s, STATIC_TREES<<1, 3);
-    send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
-    bi_flush(s);
-    /* Of the 10 bits for the empty block, we have already sent
-     * (10 - bi_valid) bits. The lookahead for the last real code (before
-     * the EOB of the previous block) was thus at least one plus the length
-     * of the EOB plus what we have just sent of the empty static block.
-     */
-    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
-        send_bits(s, STATIC_TREES<<1, 3);
-        send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-        s->compressed_len += 10L;
-#endif
-        bi_flush(s);
-    }
-    s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void _tr_flush_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
-    int max_blindex = 0;  /* index of last bit length code of non zero freq */
-
-    /* Build the Huffman trees unless a stored block is forced */
-    if (s->level > 0) {
-
-         /* Check if the file is ascii or binary */
-        if (s->data_type == Z_UNKNOWN) set_data_type(s);
-
-        /* Construct the literal and distance trees */
-        build_tree(s, (tree_desc *)(&(s->l_desc)));
-        Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-
-        build_tree(s, (tree_desc *)(&(s->d_desc)));
-        Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-        /* At this point, opt_len and static_len are the total bit lengths of
-         * the compressed block data, excluding the tree representations.
-         */
-
-        /* Build the bit length tree for the above two trees, and get the index
-         * in bl_order of the last bit length code to send.
-         */
-        max_blindex = build_bl_tree(s);
-
-        /* Determine the best encoding. Compute the block lengths in bytes. */
-        opt_lenb = (s->opt_len+3+7)>>3;
-        static_lenb = (s->static_len+3+7)>>3;
-
-        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
-                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
-                s->last_lit));
-
-        if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
-    } else {
-        Assert(buf != (char*)0, "lost buf");
-        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
-    }
-
-#ifdef FORCE_STORED
-    if (buf != (char*)0) { /* force stored block */
-#else
-    if (stored_len+4 <= opt_lenb && buf != (char*)0) {
-                       /* 4: two words for the lengths */
-#endif
-        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
-         * Otherwise we can't have processed more than WSIZE input bytes since
-         * the last block flush, because compression would have been
-         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
-         * transform a block into a stored block.
-         */
-        _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
-    } else if (static_lenb >= 0) { /* force static trees */
-#else
-    } else if (static_lenb == opt_lenb) {
-#endif
-        send_bits(s, (STATIC_TREES<<1)+eof, 3);
-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->static_len;
-#endif
-    } else {
-        send_bits(s, (DYN_TREES<<1)+eof, 3);
-        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
-                       max_blindex+1);
-        compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->opt_len;
-#endif
-    }
-    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-    /* The above check is made mod 2^32, for files larger than 512 MB
-     * and uLong implemented on 32 bits.
-     */
-    init_block(s);
-
-    if (eof) {
-        bi_windup(s);
-#ifdef DEBUG
-        s->compressed_len += 7;  /* align on byte boundary */
-#endif
-    }
-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*eof));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
-    deflate_state *s;
-    unsigned dist;  /* distance of matched string */
-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
-    s->d_buf[s->last_lit] = (ush)dist;
-    s->l_buf[s->last_lit++] = (uch)lc;
-    if (dist == 0) {
-        /* lc is the unmatched char */
-        s->dyn_ltree[lc].Freq++;
-    } else {
-        s->matches++;
-        /* Here, lc is the match length - MIN_MATCH */
-        dist--;             /* dist = match distance - 1 */
-        Assert((ush)dist < (ush)MAX_DIST(s) &&
-               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
-               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
-
-        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
-        s->dyn_dtree[d_code(dist)].Freq++;
-    }
-
-#ifdef TRUNCATE_BLOCK
-    /* Try to guess if it is profitable to stop the current block here */
-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
-        /* Compute an upper bound for the compressed length */
-        ulg out_length = (ulg)s->last_lit*8L;
-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
-        int dcode;
-        for (dcode = 0; dcode < D_CODES; dcode++) {
-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
-                (5L+extra_dbits[dcode]);
-        }
-        out_length >>= 3;
-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-               s->last_lit, in_length, out_length,
-               100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
-    }
-#endif
-    return (s->last_lit == s->lit_bufsize-1);
-    /* We avoid equality with lit_bufsize because of wraparound at 64K
-     * on 16 bit machines and because stored blocks are restricted to
-     * 64K-1 bytes.
-     */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
-    deflate_state *s;
-    ct_data *ltree; /* literal tree */
-    ct_data *dtree; /* distance tree */
-{
-    unsigned dist;      /* distance of matched string */
-    int lc;             /* match length or unmatched char (if dist == 0) */
-    unsigned lx = 0;    /* running index in l_buf */
-    unsigned code;      /* the code to send */
-    int extra;          /* number of extra bits to send */
-
-    if (s->last_lit != 0) do {
-        dist = s->d_buf[lx];
-        lc = s->l_buf[lx++];
-        if (dist == 0) {
-            send_code(s, lc, ltree); /* send a literal byte */
-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
-        } else {
-            /* Here, lc is the match length - MIN_MATCH */
-            code = _length_code[lc];
-            send_code(s, code+LITERALS+1, ltree); /* send the length code */
-            extra = extra_lbits[code];
-            if (extra != 0) {
-                lc -= base_length[code];
-                send_bits(s, lc, extra);       /* send the extra length bits */
-            }
-            dist--; /* dist is now the match distance - 1 */
-            code = d_code(dist);
-            Assert (code < D_CODES, "bad d_code");
-
-            send_code(s, code, dtree);       /* send the distance code */
-            extra = extra_dbits[code];
-            if (extra != 0) {
-                dist -= base_dist[code];
-                send_bits(s, dist, extra);   /* send the extra distance bits */
-            }
-        } /* literal or match pair ? */
-
-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
-        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
-               "pendingBuf overflow");
-
-    } while (lx < s->last_lit);
-
-    send_code(s, END_BLOCK, ltree);
-    s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to ASCII or BINARY, using a crude approximation:
- * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise.
- * IN assertion: the fields freq of dyn_ltree are set and the total of all
- * frequencies does not exceed 64K (to fit in an int on 16 bit machines).
- */
-local void set_data_type(s)
-    deflate_state *s;
-{
-    int n = 0;
-    unsigned ascii_freq = 0;
-    unsigned bin_freq = 0;
-    while (n < 7)        bin_freq += s->dyn_ltree[n++].Freq;
-    while (n < 128)    ascii_freq += s->dyn_ltree[n++].Freq;
-    while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;
-    s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII);
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
-    unsigned code; /* the value to invert */
-    int len;       /* its bit length */
-{
-    register unsigned res = 0;
-    do {
-        res |= code & 1;
-        code >>= 1, res <<= 1;
-    } while (--len > 0);
-    return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
-    deflate_state *s;
-{
-    if (s->bi_valid == 16) {
-        put_short(s, s->bi_buf);
-        s->bi_buf = 0;
-        s->bi_valid = 0;
-    } else if (s->bi_valid >= 8) {
-        put_byte(s, (Byte)s->bi_buf);
-        s->bi_buf >>= 8;
-        s->bi_valid -= 8;
-    }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
-    deflate_state *s;
-{
-    if (s->bi_valid > 8) {
-        put_short(s, s->bi_buf);
-    } else if (s->bi_valid > 0) {
-        put_byte(s, (Byte)s->bi_buf);
-    }
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
-    deflate_state *s;
-    charf    *buf;    /* the input data */
-    unsigned len;     /* its length */
-    int      header;  /* true if block header must be written */
-{
-    bi_windup(s);        /* align on byte boundary */
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-
-    if (header) {
-        put_short(s, (ush)len);
-        put_short(s, (ush)~len);
-#ifdef DEBUG
-        s->bits_sent += 2*16;
-#endif
-    }
-#ifdef DEBUG
-    s->bits_sent += (ulg)len<<3;
-#endif
-    while (len--) {
-        put_byte(s, *buf++);
-    }
-}
diff --git a/tkimg1.3/libz/trees.h b/tkimg1.3/libz/trees.h
deleted file mode 100644
index 72facf9..0000000
--- a/tkimg1.3/libz/trees.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
diff --git a/tkimg1.3/libz/uncompr.c b/tkimg1.3/libz/uncompr.c
deleted file mode 100644
index c638324..0000000
--- a/tkimg1.3/libz/uncompr.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: uncompr.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-
-    err = inflateInit(&stream);
-    if (err != Z_OK) return err;
-
-    err = inflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        inflateEnd(&stream);
-        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
-            return Z_DATA_ERROR;
-        return err;
-    }
-    *destLen = stream.total_out;
-
-    err = inflateEnd(&stream);
-    return err;
-}
diff --git a/tkimg1.3/libz/win32/DLL_FAQ.txt b/tkimg1.3/libz/win32/DLL_FAQ.txt
deleted file mode 100644
index 80b6b42..0000000
--- a/tkimg1.3/libz/win32/DLL_FAQ.txt
+++ /dev/null
@@ -1,371 +0,0 @@
-
-            Frequently Asked Questions about ZLIB1.DLL
-
-
-This document describes the design, the rationale, and the usage
-of the official DLL build of zlib, named ZLIB1.DLL.  If you have
-general questions about zlib, you should see the file "FAQ" found
-in the zlib distribution, or at the following location:
-  http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. What is ZLIB1.DLL, and how can I get it?
-
-  - ZLIB1.DLL is the official build of zlib as a DLL.
-    (Please remark the symbol '1' in the name.)
-
-    Pointers to a precompiled ZLIB1.DLL can be found in the zlib
-    web site at:
-      http://www.zlib.org/
-
-    Applications that link to ZLIB1.DLL can rely on the following
-    specification:
-
-    * The exported symbols are exclusively defined in the source
-      files "zlib.h" and "zlib.def", found in an official zlib
-      source distribution.
-    * The symbols are exported by name, not by ordinal.
-    * The exported names are undecorated.
-    * The calling convention of functions is "C" (CDECL).
-    * The ZLIB1.DLL binary is linked to MSVCRT.DLL.
-
-    The archive in which ZLIB1.DLL is bundled contains compiled
-    test programs that must run with a valid build of ZLIB1.DLL.
-    It is recommended to download the prebuilt DLL from the zlib
-    web site, instead of building it yourself, to avoid potential
-    incompatibilities that could be introduced by your compiler
-    and build settings.  If you do build the DLL yourself, please
-    make sure that it complies with all the above requirements,
-    and it runs with the precompiled test programs, bundled with
-    the original ZLIB1.DLL distribution and available at the zlib
-    web site.
-
-    If, for any reason, you need to build an incompatible DLL,
-    please use a different name.
-
-
- 2. Why did you change the name of the DLL to ZLIB1.DLL?
-    What happened to the old ZLIB.DLL?
-
-  - The old ZLIB.DLL, built from zlib-1.1.x and earlier, required
-    compilation settings that were incompatible to those used by a
-    static build.  The DLL settings were supposed to be enabled by
-    defining the macro ZLIB_DLL, before including "zlib.h".
-    Incorrect handling of this macro was silently accepted at
-    build time, resulting in two major problems:
-
-    * ZLIB_DLL was missing from the old makefile.  When building
-      the DLL, not all people added it to the build options.  In
-      consequence, incompatible incarnations of ZLIB.DLL started
-      to circulate around the net.
-
-    * When switching from using the static library to using the
-      DLL, applications had to define the ZLIB_DLL macro and
-      to recompile all the sources that contained calls to zlib
-      functions.  Failure to do so resulted in creating binaries
-      that were unable to run with the official ZLIB.DLL build.
-
-    The only possible solution that we could foresee was to make a
-    binary-incompatible change in the DLL interfacing, in order to
-    remove the dependency on the ZLIB_DLL macro, and to release
-    the new DLL under a different name.
-
-    We chose the name ZLIB1.DLL, where '1' indicates the major
-    zlib version number.  We hope that we will not have to break
-    the binary compatibility again, at least not as long as the
-    zlib-1.x series will last.
-
-    There is still a ZLIB_DLL macro, that can trigger a more
-    efficient build and use of the DLL, but compatibility no
-    longer dependents on it.
-
-
- 3. Can I build ZLIB.DLL from the new zlib sources, and replace
-    an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
-
-  - In principle, you can do it by assigning calling convention
-    keywords to the macros ZEXPORT and ZEXPORTVA.  In practice,
-    it depends on what you mean by "an old ZLIB.DLL", because
-    the old DLL exists in several mutually-incompatible versions.
-
-    If you have a compiled application that works with a certain
-    ZLIB.DLL without any known security issues, there is hardly
-    a need to rebuild the DLL from new sources only to link it to
-    the old app binary.  But if you really want to do it, you have
-    to find out first what kind of calling convention uses your
-    particular ZLIB.DLL build, and to use the same one in the new
-    build.  If you don't know what this is all about, you might be
-    better off if you would just forget it.
-
-
- 4. Can I compile my application using the new zlib interface, and
-    link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or
-    earlier?
-
-  - The official answer is "no"; the real answer depends again on
-    what kind of ZLIB.DLL you have.  Even if you are lucky, this
-    course of action is unreliable.
-
-    If you rebuild your application and you intend to use a newer
-    version of zlib (post- 1.1.4), it is strongly recommended to
-    link it to the new ZLIB1.DLL.
-
-
- 5. Why are the zlib symbols exported by name, and not by ordinal?
-
-  - Although exporting symbols by ordinal is a little faster, it
-    is risky.  Any single glitch in the maintenance or use of the
-    DEF file that contains the ordinals can result in incompatible
-    builds and frustrating crashes.  Simply put, the benefits of
-    exporting symbols by ordinal do not justify the risks.
-
-    Technically, it should be possible to maintain ordinals in
-    the DEF file, and still export the symbols by name.  Ordinals
-    exist in every DLL, and even if the dynamic linking performed
-    at the DLL startup is searching for names, ordinals serve as
-    hints, for a faster name lookup.  However, if the DEF file
-    contains ordinals, the Microsoft linker automatically builds
-    an implib that will cause the executables linked to it to use
-    those ordinals, and not the names.  It is interesting to
-    notice that the GNU linker for Win32 does not suffer from this
-    problem.
-
-    It is possible to avoid the DEF file if the exported symbols
-    are accompanied by a "__declspec(dllexport)" attribute in the
-    source files.  You can do this in zlib by predefining the
-    ZLIB_DLL macro.
-
-
- 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling
-    convention.  Why not use the STDCALL convention?
-    STDCALL is the standard convention in Win32, and I need it in
-    my Visual Basic project!
-
-    (For readability, we use CDECL to refer to the convention
-     triggered by the "__cdecl" keyword, STDCALL to refer to
-     the convention triggered by "__stdcall", and FASTCALL to
-     refer to the convention triggered by "__fastcall".)
-
-  - Most of the native Windows API functions (without varargs) use
-    indeed the WINAPI convention (which translates to STDCALL in
-    Win32), but the standard C functions use CDECL.  If a user
-    application is intrinsically tied to the Windows API (e.g.
-    it calls native Windows API functions such as CreateFile()),
-    sometimes it makes sense to decorate its own functions with
-    WINAPI.  But if ANSI C or POSIX portability is a goal (e.g.
-    it calls standard C functions such as fopen()), it is not a
-    sound decision to request the inclusion of <windows.h>, or to
-    use non-ANSI constructs, for the sole purpose to make the user
-    functions STDCALL-able.
-
-    The functionality offered by zlib is not in the category of
-    "Windows functionality", but is more like "C functionality".
-
-    Technically, STDCALL is not bad; in fact, it is slightly
-    faster than CDECL, and it works with variable-argument
-    functions, just like CDECL.  It is unfortunate that, in spite
-    of using STDCALL in the Windows API, it is not the default
-    convention used by the C compilers that run under Windows.
-    The roots of the problem reside deep inside the unsafety of
-    the K&R-style function prototypes, where the argument types
-    are not specified; but that is another story for another day.
-
-    The fact that remains is that CDECL is the default convention.
-    Even if an explicit convention (such as STDCALL or FASTCALL)
-    is hard-coded into the function prototypes inside C headers,
-    problems may appear.  One problem, for example, deals with the
-    necessity to expose the convention in users' callbacks.
-
-    The calling convention issues are also important when using
-    zlib in other programming languages.  Some of them, like Ada
-    (GNAT) and Fortran (GNU G77), have C bindings implemented
-    initially on Unix, and relying on the C calling convention.
-    On the other hand, the pre- .NET versions of Microsoft Visual
-    Basic require STDCALL, while Borland Delphi prefers (although
-    it does not require) FASTCALL.
-
-    In fairness to all possible uses of zlib outside the C
-    programming language, we choose the default "C" convention.
-    Anyone interested in different bindings or conventions is
-    encouraged to maintain specialized projects.  The "contrib/"
-    directory from the zlib distribution already holds a couple
-    of foreign bindings, such as Ada, C++, and Delphi.
-
-
- 7. I need a DLL for my Visual Basic project.  What can I do?
-
-  - Define the ZLIB_WINAPI macro before including "zlib.h", when
-    building both the DLL and the user application (except that
-    you don't need to define anything when using the DLL in Visual
-    Basic).  The ZLIB_WINAPI macro will switch on the WINAPI
-    (STDCALL) convention.  The name of this DLL must be different
-    than the official ZLIB1.DLL.
-
-    Gilles Vollant has contributed a build named ZLIBWAPI.DLL,
-    with the ZLIB_WINAPI macro turned on, and with the minizip
-    functionality built in.  For more information, please read
-    the notes inside "contrib/vstudio/readme.txt", found in the
-    zlib distribution.
-
-
- 8. If my application uses ZLIB1.DLL, should I link it to
-    MSVCRT.DLL?  Why?
-
-  - It is not required, but it is recommended to link your
-    application to MSVCRT.DLL, if it uses ZLIB1.DLL.
-
-    The executables (.EXE, .DLL, etc.) that are involved in the
-    same process and are using the C run-time library (i.e. they
-    are calling standard C functions), must link to the same
-    library.  There are several libraries in the Win32 system:
-    CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc.
-    Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that
-    depend on it should also be linked to MSVCRT.DLL.
-
-
- 9. Why are you saying that ZLIB1.DLL and my application must be
-    linked to the same C run-time (CRT) library?  I linked my
-    application and my DLLs to different C libraries (e.g. my
-    application to a static library, and my DLLs to MSVCRT.DLL),
-    and everything works fine.
-
-  - If a user library invokes only pure Win32 API (accessible via
-    <windows.h> and the related headers), its DLL build will work
-    in any context.  But if this library invokes standard C API,
-    things get more complicated.
-
-    There is a single Win32 library in a Win32 system.  Every
-    function in this library resides in a single DLL module, that
-    is safe to call from anywhere.  On the other hand, there are
-    multiple versions of the C library, and each of them has its
-    own separate internal state.  Standalone executables and user
-    DLLs that call standard C functions must link to a C run-time
-    (CRT) library, be it static or shared (DLL).  Intermixing
-    occurs when an executable (not necessarily standalone) and a
-    DLL are linked to different CRTs, and both are running in the
-    same process.
-
-    Intermixing multiple CRTs is possible, as long as their
-    internal states are kept intact.  The Microsoft Knowledge Base
-    articles KB94248 "HOWTO: Use the C Run-Time" and KB140584
-    "HOWTO: Link with the Correct C Run-Time (CRT) Library"
-    mention the potential problems raised by intermixing.
-
-    If intermixing works for you, it's because your application
-    and DLLs are avoiding the corruption of each of the CRTs'
-    internal states, maybe by careful design, or maybe by fortune.
-
-    Also note that linking ZLIB1.DLL to non-Microsoft CRTs (such
-    as those provided by Borland) raises similar problems.
-
-
-10. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
-
-  - MSVCRT.DLL exists on every Windows 95 with a new service pack
-    installed, or with Microsoft Internet Explorer 4 or later, and
-    on all other Windows 4.x or later (Windows 98, Windows NT 4,
-    or later).  It is freely distributable; if not present in the
-    system, it can be downloaded from Microsoft or from other
-    software provider for free.
-
-    The fact that MSVCRT.DLL does not exist on a virgin Windows 95
-    is not so problematic.  The number of Windows 95 installations
-    is rapidly decreasing, Microsoft stopped supporting it a long
-    time ago, and many recent applications from various vendors,
-    including Microsoft, do not even run on it.  Furthermore, no
-    serious user should run Windows 95 without a proper update
-    installed.
-
-    There is also the fact that the mainstream C compilers for
-    Windows are Microsoft Visual C++ 6.0, and gcc/MinGW.  Both
-    are producing executables that link to MSVCRT.DLL by default,
-    without offering other dynamic CRTs as alternatives easy to
-    select by users.
-
-
-11. Why are you not linking ZLIB1.DLL to
-    <<my favorite C run-time library>> ?
-
-  - We considered and abandoned the following alternatives:
-
-    * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or
-      LIBCMT.LIB) is not a good option.  People are using the DLL
-      mainly to save disk space.  If you are linking your program
-      to a static C library, you may as well consider linking zlib
-      in statically, too.
-
-    * Linking ZLIB1.DLL to CRTDLL.DLL looks very appealing,
-      because CRTDLL.DLL is present on every Win32 installation.
-      Unfortunately, it has a series of problems: it raises
-      difficulties when using it with C++ code, it does not work
-      with 64-bit file offsets, (and so on...), and Microsoft
-      discontinued its support a long time ago.
-
-    * Linking ZLIB1.DLL to MSVCR70.DLL, supplied with the
-      Microsoft .NET platform and Visual C++ 7.0 or newer, is not
-      a good option.  Although it is available for free download
-      and distribution, its presence is scarce on today's Win32
-      installations.  If it will ever become more popular than
-      MSVCRT.DLL and will be pre-installed on the future Win32
-      systems, we will probably think again about it.
-
-    * Linking ZLIB1.DLL to NTDLL.DLL is not possible.
-      NTDLL.DLL exports only a part of the C library, and only on
-      Windows NT systems.
-
-
-12. I need to link my own DLL build to a CRT different than
-    MSVCRT.DLL.  What can I do?
-
-  - Feel free to rebuild the DLL from the zlib sources, and link
-    it the way you want.  You should, however, clearly state that
-    your build is unofficial.  You should give it a different file
-    name, and/or install it in a private directory that can be
-    accessed by your application only, and is not visible to the
-    others (e.g. it's not in the SYSTEM or the SYSTEM32 directory,
-    and it's not in the PATH).  Otherwise, your build may clash
-    with applications that link to the official build.
-
-    For example, in Cygwin, zlib is linked to the Cygwin runtime
-    CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
-
-
-13. May I include additional pieces of code that I find useful,
-    link them in ZLIB1.DLL, and export them?
-
-  - No.  A legitimate build of ZLIB1.DLL must not include code
-    that does not originate from the official zlib source code.
-    But you can make your own private DLL build, under a different
-    file name, as suggested in the previous answer.
-
-    For example, in Borland Delphi and C++ Builder, zlib is a part
-    of the standard VCL library.  If an application links to VCL
-    dynamically, the name of the distributable binary (VCLxx.DLL)
-    does not posess any danger of clashing with a legitimate but
-    incompatible ZLIB1.DLL.
-
-
-14. May I remove some functionality out of ZLIB1.DLL, by enabling
-    macros like NO_GZCOMPRESS or NO_GZIP at compile time?
-
-  - No.  A legitimate build of ZLIB1.DLL must provide the complete
-    zlib functionality, as implemented in the official zlib source
-    code.  But you can make your own private DLL build, under a
-    different file name, as suggested in the previous answer.
-
-
-15. I made my own ZLIB1.DLL build.  Can I test it for compliance?
-
-  - We prefer that you download the official DLL from the zlib
-    web site.  If you need something peculiar from this DLL, you
-    can send your suggestion to the zlib mailing list.
-
-    However, in case you do rebuild the DLL yourself, you can run
-    it with the test programs found in the DLL distribution.
-    Running these test programs is not a guarantee of compliance,
-    but a failure can imply a detected problem.
-
-**
-
-This document is written and maintained by
-Cosmin Truta <cosmint at cs.ubbcluj.ro>
diff --git a/tkimg1.3/libz/win32/Makefile.bor b/tkimg1.3/libz/win32/Makefile.bor
deleted file mode 100644
index b802519..0000000
--- a/tkimg1.3/libz/win32/Makefile.bor
+++ /dev/null
@@ -1,107 +0,0 @@
-# Makefile for zlib
-# Borland C++ for Win32
-#
-# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003
-# Last updated: 28-Aug-2003
-#
-# Usage:
-#  make -f win32/Makefile.bor
-#  make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
-
-# ------------ Borland C++ ------------
-
-# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
-# added to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-CC = bcc32
-AS = bcc32
-LD = bcc32
-AR = tlib
-CFLAGS  = -a -d -k- -O2 $(LOC)
-ASFLAGS = $(LOC)
-LDFLAGS = $(LOC)
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1  = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2  = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-#OBJA =
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-#OBJPA=
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-	$(AR) $(ZLIB_LIB) $(OBJPA)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
diff --git a/tkimg1.3/libz/win32/Makefile.emx b/tkimg1.3/libz/win32/Makefile.emx
deleted file mode 100644
index 7b08424..0000000
--- a/tkimg1.3/libz/win32/Makefile.emx
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for zlib.  Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc -Zwin32
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/tkimg1.3/libz/win32/Makefile.gcc b/tkimg1.3/libz/win32/Makefile.gcc
deleted file mode 100644
index 62a8430..0000000
--- a/tkimg1.3/libz/win32/Makefile.gcc
+++ /dev/null
@@ -1,141 +0,0 @@
-# Makefile for zlib, derived from Makefile.dj2.
-# Modified for mingw32 by C. Spieler, 6/16/98.
-# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
-# Last updated: 1-Aug-2003.
-# Tested under Cygwin and MinGW.
-
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.gcc;  make test testdll -fmakefile.gcc
-#
-# To use the asm code, type:
-#   cp contrib/asm?86/match.S ./match.S
-#   make LOC=-DASMV OBJA=match.o -fmakefile.gcc
-#
-# To install libz.a, zconf.h and zlib.h in the system directories, type:
-#
-#   make install -fmakefile.gcc
-
-# Note:
-# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
-# the DLL name should be changed from "zlib1.dll".
-
-STATICLIB = libz.a
-SHAREDLIB = zlib1.dll
-IMPLIB    = libzdll.a
-
-#LOC = -DASMV
-#LOC = -DDEBUG -g
-
-CC = gcc
-CFLAGS = $(LOC) -O3 -Wall
-
-AS = $(CC)
-ASFLAGS = $(LOC) -Wall
-
-LD = $(CC)
-LDFLAGS = $(LOC) -s
-
-AR = ar
-ARFLAGS = rcs
-
-RC = windres
-RCFLAGS = --define GCC_WINDRES
-
-CP = cp -fp
-# If GNU install is available, replace $(CP) with install.
-INSTALL = $(CP)
-RM = rm -f
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
-       inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-OBJA =
-
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
-
-test: example minigzip
-	./example
-	echo hello world | ./minigzip | ./minigzip -d
-
-testdll: example_d minigzip_d
-	./example_d
-	echo hello world | ./minigzip_d | ./minigzip_d -d
-
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-.S.o:
-	$(AS) $(ASFLAGS) -c -o $@ $<
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
-	dllwrap --driver-name $(CC) --def win32/zlib.def \
-	  --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
-	strip $@
-
-example: example.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
-
-minigzip: minigzip.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
-
-example_d: example.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
-
-minigzip_d: minigzip.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
-
-zlibrc.o: win32/zlib1.rc
-	$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
-
-
-# INCLUDE_PATH and LIBRARY_PATH must be set.
-
-.PHONY: install uninstall clean
-
-install: zlib.h zconf.h $(LIB)
-	- at if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
-	- at if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
-	-$(INSTALL) zlib.h $(INCLUDE_PATH)
-	-$(INSTALL) zconf.h $(INCLUDE_PATH)
-	-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-	-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
-
-uninstall:
-	-$(RM) $(INCLUDE_PATH)/zlib.h
-	-$(RM) $(INCLUDE_PATH)/zconf.h
-	-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
-	-$(RM) $(LIBRARY_PATH)/$(IMPLIB)
-
-clean:
-	-$(RM) $(STATICLIB)
-	-$(RM) $(SHAREDLIB)
-	-$(RM) $(IMPLIB)
-	-$(RM) *.o
-	-$(RM) *.exe
-	-$(RM) foo.gz
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/tkimg1.3/libz/win32/Makefile.msc b/tkimg1.3/libz/win32/Makefile.msc
deleted file mode 100644
index 528ecaa..0000000
--- a/tkimg1.3/libz/win32/Makefile.msc
+++ /dev/null
@@ -1,126 +0,0 @@
-# Makefile for zlib -- Microsoft (Visual) C
-#
-# Authors:
-#   Cosmin Truta, 11-Mar-2003
-#   Christian Spieler, 19-Mar-2003
-#
-# Last updated:
-#   Cosmin Truta, 27-Aug-2003
-#
-# Usage:
-#   nmake -f win32/Makefile.msc            (standard build)
-#   nmake -f win32/Makefile.msc LOC=-DFOO  (nonstandard build)
-#   nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj  (use ASM code)
-
-
-# optional build flags
-LOC =
-
-
-# variables
-STATICLIB = zlib.lib
-SHAREDLIB = zlib1.dll
-IMPLIB    = zdll.lib
-
-CC = cl
-AS = ml
-LD = link
-AR = lib
-RC = rc
-CFLAGS  = -nologo -MD -O2 $(LOC)
-ASFLAGS = -coff
-LDFLAGS = -nologo -release
-ARFLAGS = -nologo
-RCFLAGS = /dWIN32 /r
-
-OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
-       inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJA =
-
-
-# targets
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
-     example.exe minigzip.exe example_d.exe minigzip_d.exe
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
-	$(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
-	  -out:$@ $(OBJS) $(OBJA) zlib1.res
-
-example.exe: example.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) example.obj $(STATICLIB)
-
-minigzip.exe: minigzip.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
-
-example_d.exe: example.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
-
-minigzip_d.exe: minigzip.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-zlib1.res: win32/zlib1.rc
-	$(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-testdll: example_d.exe minigzip_d.exe
-	example_d
-	echo hello world | minigzip_d | minigzip_d -d
-
-
-# cleanup
-clean:
-	-del $(STATICLIB)
-	-del $(SHAREDLIB)
-	-del $(IMPLIB)
-	-del *.obj
-	-del *.res
-	-del *.exp
-	-del *.exe
-	-del foo.gz
diff --git a/tkimg1.3/libz/win32/zlib.def b/tkimg1.3/libz/win32/zlib.def
deleted file mode 100644
index a47cbc1..0000000
--- a/tkimg1.3/libz/win32/zlib.def
+++ /dev/null
@@ -1,60 +0,0 @@
-LIBRARY
-; zlib data compression library
-
-EXPORTS
-; basic functions
-    zlibVersion
-    deflate
-    deflateEnd
-    inflate
-    inflateEnd
-; advanced functions
-    deflateSetDictionary
-    deflateCopy
-    deflateReset
-    deflateParams
-    deflateBound
-    deflatePrime
-    inflateSetDictionary
-    inflateSync
-    inflateCopy
-    inflateReset
-    inflateBack
-    inflateBackEnd
-    zlibCompileFlags
-; utility functions
-    compress
-    compress2
-    compressBound
-    uncompress
-    gzopen
-    gzdopen
-    gzsetparams
-    gzread
-    gzwrite
-    gzprintf
-    gzputs
-    gzgets
-    gzputc
-    gzgetc
-    gzungetc
-    gzflush
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzclose
-    gzerror
-    gzclearerr
-; checksum functions
-    adler32
-    crc32
-; various hacks, don't look :)
-    deflateInit_
-    deflateInit2_
-    inflateInit_
-    inflateInit2_
-    inflateBackInit_
-    inflateSyncPoint
-    get_crc_table
-    zError
diff --git a/tkimg1.3/libz/win32/zlib1.rc b/tkimg1.3/libz/win32/zlib1.rc
deleted file mode 100644
index 326375d..0000000
--- a/tkimg1.3/libz/win32/zlib1.rc
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <windows.h>
-
-#ifdef GCC_WINDRES
-VS_VERSION_INFO		VERSIONINFO
-#else
-VS_VERSION_INFO		VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-#endif
-  FILEVERSION		1,2,1,0
-  PRODUCTVERSION	1,2,1,0
-  FILEFLAGSMASK		VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
-  FILEFLAGS		1
-#else
-  FILEFLAGS		0
-#endif
-  FILEOS		VOS_DOS_WINDOWS32
-  FILETYPE		VFT_DLL
-  FILESUBTYPE		0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-    BEGIN
-      VALUE "FileDescription",	"zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.1\0"
-      VALUE "InternalName",	"zlib1.dll\0"
-      VALUE "LegalCopyright",	"(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-      VALUE "OriginalFilename",	"zlib1.dll\0"
-      VALUE "ProductName",	"zlib\0"
-      VALUE "ProductVersion",	"1.2.1\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
diff --git a/tkimg1.3/libz/zconf.h b/tkimg1.3/libz/zconf.h
deleted file mode 100644
index 9945a97..0000000
--- a/tkimg1.3/libz/zconf.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_  z_deflateInit_
-#  define deflate       z_deflate
-#  define deflateEnd    z_deflateEnd
-#  define inflateInit_  z_inflateInit_
-#  define inflate       z_inflate
-#  define inflateEnd    z_inflateEnd
-#  define deflateInit2_ z_deflateInit2_
-#  define deflateSetDictionary z_deflateSetDictionary
-#  define deflateCopy   z_deflateCopy
-#  define deflateReset  z_deflateReset
-#  define deflatePrime  z_deflatePrime
-#  define deflateParams z_deflateParams
-#  define deflateBound  z_deflateBound
-#  define inflateInit2_ z_inflateInit2_
-#  define inflateSetDictionary z_inflateSetDictionary
-#  define inflateSync   z_inflateSync
-#  define inflateSyncPoint z_inflateSyncPoint
-#  define inflateCopy   z_inflateCopy
-#  define inflateReset  z_inflateReset
-#  define compress      z_compress
-#  define compress2     z_compress2
-#  define compressBound z_compressBound
-#  define uncompress    z_uncompress
-#  define adler32       z_adler32
-#  define crc32         z_crc32
-#  define get_crc_table z_get_crc_table
-
-#  define Byte          z_Byte
-#  define uInt          z_uInt
-#  define uLong         z_uLong
-#  define Bytef         z_Bytef
-#  define charf         z_charf
-#  define intf          z_intf
-#  define uIntf         z_uIntf
-#  define uLongf        z_uLongf
-#  define voidpf        z_voidpf
-#  define voidp         z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-#  define WIN32
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t  off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define  z_off_t long
-#endif
-
-#if defined(__OS400__)
-#define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/tkimg1.3/libz/zconf.in.h b/tkimg1.3/libz/zconf.in.h
deleted file mode 100644
index 420b656..0000000
--- a/tkimg1.3/libz/zconf.in.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.in.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_  z_deflateInit_
-#  define deflate       z_deflate
-#  define deflateEnd    z_deflateEnd
-#  define inflateInit_  z_inflateInit_
-#  define inflate       z_inflate
-#  define inflateEnd    z_inflateEnd
-#  define deflateInit2_ z_deflateInit2_
-#  define deflateSetDictionary z_deflateSetDictionary
-#  define deflateCopy   z_deflateCopy
-#  define deflateReset  z_deflateReset
-#  define deflatePrime  z_deflatePrime
-#  define deflateParams z_deflateParams
-#  define deflateBound  z_deflateBound
-#  define inflateInit2_ z_inflateInit2_
-#  define inflateSetDictionary z_inflateSetDictionary
-#  define inflateSync   z_inflateSync
-#  define inflateSyncPoint z_inflateSyncPoint
-#  define inflateCopy   z_inflateCopy
-#  define inflateReset  z_inflateReset
-#  define compress      z_compress
-#  define compress2     z_compress2
-#  define compressBound z_compressBound
-#  define uncompress    z_uncompress
-#  define adler32       z_adler32
-#  define crc32         z_crc32
-#  define get_crc_table z_get_crc_table
-
-#  define Byte          z_Byte
-#  define uInt          z_uInt
-#  define uLong         z_uLong
-#  define Bytef         z_Bytef
-#  define charf         z_charf
-#  define intf          z_intf
-#  define uIntf         z_uIntf
-#  define uLongf        z_uLongf
-#  define voidpf        z_voidpf
-#  define voidp         z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-#  define WIN32
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t  off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define  z_off_t long
-#endif
-
-#if defined(__OS400__)
-#define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/tkimg1.3/libz/zlib.3 b/tkimg1.3/libz/zlib.3
deleted file mode 100644
index 8900984..0000000
--- a/tkimg1.3/libz/zlib.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.TH ZLIB 3 "17 November 2003"
-.SH NAME
-zlib \- compression/decompression library
-.SH SYNOPSIS
-[see
-.I zlib.h
-for full description]
-.SH DESCRIPTION
-The
-.I zlib
-library is a general purpose data compression library.
-The code is thread safe.
-It provides in-memory compression and decompression functions,
-including integrity checks of the uncompressed data.
-This version of the library supports only one compression method (deflation)
-but other algorithms will be added later
-and will have the same stream interface.
-.LP
-Compression can be done in a single step if the buffers are large enough
-(for example if an input file is mmap'ed),
-or can be done by repeated calls of the compression function.
-In the latter case,
-the application must provide more input and/or consume the output
-(providing more output space) before each call.
-.LP
-The library also supports reading and writing files in
-.IR gzip (1)
-(.gz) format
-with an interface similar to that of stdio.
-.LP
-The library does not install any signal handler.
-The decoder checks the consistency of the compressed data,
-so the library should never crash even in case of corrupted input.
-.LP
-All functions of the compression library are documented in the file
-.IR zlib.h .
-The distribution source includes examples of use of the library
-in the files
-.I example.c
-and
-.IR minigzip.c .
-.LP
-Changes to this version are documented in the file
-.I ChangeLog
-that accompanies the source,
-and are concerned primarily with bug fixes and portability enhancements.
-.LP
-A Java implementation of
-.I zlib
-is available in the Java Development Kit 1.1:
-.IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-.LP
-A Perl interface to
-.IR zlib ,
-written by Paul Marquess (pmqs at cpan.org),
-is available at CPAN (Comprehensive Perl Archive Network) sites,
-including:
-.IP
-http://www.cpan.org/modules/by-module/Compress/
-.LP
-A Python interface to
-.IR zlib ,
-written by A.M. Kuchling (amk at magnet.com),
-is available in Python 1.5 and later versions:
-.IP
-http://www.python.org/doc/lib/module-zlib.html
-.LP
-A
-.I zlib
-binding for
-.IR tcl (1),
-written by Andreas Kupries (a.kupries at westend.com),
-is availlable at:
-.IP
-http://www.westend.com/~kupries/doc/trf/man/man.html
-.LP
-An experimental package to read and write files in .zip format,
-written on top of
-.I zlib
-by Gilles Vollant (info at winimage.com),
-is available at:
-.IP
-http://www.winimage.com/zLibDll/unzip.html
-and also in the
-.I contrib/minizip
-directory of the main
-.I zlib
-web site.
-.SH "SEE ALSO"
-The
-.I zlib
-web site can be found at either of these locations:
-.IP
-http://www.zlib.org
-.br
-http://www.gzip.org/zlib/
-.LP
-The data format used by the zlib library is described by RFC
-(Request for Comments) 1950 to 1952 in the files:
-.IP
-http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
-.br
-http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
-.br
-http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-.LP
-Mark Nelson (markn at ieee.org) wrote an article about
-.I zlib
-for the Jan. 1997 issue of  Dr. Dobb's Journal;
-a copy of the article is available at:
-.IP
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-.SH "REPORTING PROBLEMS"
-Before reporting a problem,
-please check the
-.I zlib
-web site to verify that you have the latest version of
-.IR zlib ;
-otherwise,
-obtain the latest version and see if the problem still exists.
-Please read the
-.I zlib
-FAQ at:
-.IP
-http://www.gzip.org/zlib/zlib_faq.html
-.LP
-before asking for help.
-Send questions and/or comments to zlib at gzip.org,
-or (for the Windows DLL version) to Gilles Vollant (info at winimage.com).
-.SH AUTHORS
-Version 1.2.1
-Copyright (C) 1995-2003 Jean-loup Gailly (jloup at gzip.org)
-and Mark Adler (madler at alumni.caltech.edu).
-.LP
-This software is provided "as-is,"
-without any express or implied warranty.
-In no event will the authors be held liable for any damages
-arising from the use of this software.
-See the distribution directory with respect to requirements
-governing redistribution.
-The deflate format used by
-.I zlib
-was defined by Phil Katz.
-The deflate and
-.I zlib
-specifications were written by L. Peter Deutsch.
-Thanks to all the people who reported problems and suggested various
-improvements in
-.IR zlib ;
-who are too numerous to cite here.
-.LP
-UNIX manual page by R. P. C. Rodgers,
-U.S. National Library of Medicine (rodgers at nlm.nih.gov).
-.\" end of man page
diff --git a/tkimg1.3/libz/zlib.h b/tkimg1.3/libz/zlib.h
deleted file mode 100644
index 92edf96..0000000
--- a/tkimg1.3/libz/zlib.h
+++ /dev/null
@@ -1,1200 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.1, November 17th, 2003
-
-  Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.1"
-#define ZLIB_VERNUM 0x1210
-
-/*
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The compressed data format used by the in-memory functions is the zlib
-  format, which is a zlib wrapper documented in RFC 1950, wrapped around a
-  deflate stream, which is itself documented in RFC 1951.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-     The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-     This library does not provide any functions to write gzip files in memory.
-  However such functions could be easily written using zlib's deflate function,
-  the documentation in the gzip RFC, and the examples in gzio.c.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: ascii or binary */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_ASCII    1
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  the compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  the value returned by deflateBound (see below). If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update data_type if it can make a good guess about
-  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
-  Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer. Z_BLOCK requests that inflate() stop
-  if and when it get to the next deflate block boundary. When decoding the zlib
-  or gzip format, this will cause inflate() to return immediately after the
-  header and before the first block. When doing a raw inflate, inflate() will
-  go ahead and process the first block, and will return when it gets to the end
-  of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64
-  if inflate() is currently decoding the last block in the deflate stream,
-  plus 128 if inflate() returned immediately after decoding an end-of-block
-  code or decoding the complete header up to just before the first byte of the
-  deflate stream. The end-of-block will not be indicated until all of the
-  uncompressed data from that block has been written to strm->next_out.  The
-  number of unused bits may in general be greater than seven, except when
-  bit 7 of data_type is set, in which case the number of unused bits will be
-  less than eight.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster approach
-  may be used for the single inflate() call.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call. So the only effect of the flush parameter in this implementation
-  is on the return value of inflate(), as noted below, or when it returns early
-  because Z_BLOCK is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm-adler to the adler32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the adler32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below. At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() will decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically.  Any information
-  contained in the gzip header is not retained, so applications that need that
-  information should instead use raw inflate, see inflateInit2() below, or
-  inflateBack() and perform their own processing of the gzip header and
-  trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing. If Z_DATA_ERROR is returned, the application may then
-  call inflateSync() to look for a good compression block if a partial recovery
-  of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer). It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
-   determines the window size. deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding. Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper. The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero),
-   no header crc, and the operating system will be set to 255 (unknown).
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding). Filtered data consists mostly of small values with a somewhat
-   random distribution. In this case, the compression algorithm is tuned to
-   compress them better. The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
-   Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
-   parameter only affects the compression ratio but not the correctness of the
-   compressed output even if it is not set appropriately.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit()
-   or deflateInit2().  This would be used to allocate an output buffer
-   for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-  is that this function is used to start off the deflate output with the
-  bits leftover from a previous deflate stream when appending to it.  As such,
-  this function can only be used for raw deflate, and must be used before the
-  first deflate() call after a deflateInit2() or deflateReset().  bits must be
-  less than or equal to 16, and that many of the least significant bits of
-  value will be inserted in the output.
-
-      deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used. If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
-   determines the window size. inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream. This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values. If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is. Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding. Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
-   memLevel). msg is set to null if there is no error message.  inflateInit2
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by inflate(). (So next_in and avail_in may be
-   modified, but next_out and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate
-   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by this call of
-   inflate. The compressor and decompressor must use exactly the same
-   dictionary (see deflateSetDictionary).
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_stream FAR *strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the paramaters are invalid, Z_MEM_ERROR if the internal state could not
-   be allocated, or Z_VERSION_ERROR if the version of the library does not
-   match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_stream FAR *strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is more efficient than inflate() for
-   file i/o applications in that it avoids copying between the output and the
-   sliding window by simply making the window itself the output buffer.  This
-   function trusts the application to not change the output buffer passed by
-   the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free
-   the allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects
-   only the raw deflate stream to decompress.  This is different from the
-   normal behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format
-   error in the deflate stream (in which case strm->msg is set to indicate the
-   nature of the error), or Z_STREAM_ERROR if the stream was not properly
-   initialized.  In the case of Z_BUF_ERROR, an input or output error can be
-   distinguished using strm->next_in which will be Z_NULL only if in() returned
-   an error.  If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
-   out() returning non-zero.  (in() will always be called before out(), so
-   strm->next_in is assured to be defined if out() returns non-zero.)  Note
-   that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_stream FAR *strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least the value returned
-   by compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before
-   a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h", or 'R' for run-length encoding
-   as in "wb1R". (See the description of deflateInit2 for more information
-   about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
-                                   voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).  The number of
-   uncompressed bytes written is limited to 4095. The caller should assure that
-   this limit is not exceeded. If it is exceeded, then gzprintf() will return
-   return an error (0) with nothing written. In this case, there may also be a
-   buffer overflow with unpredictable consequences, which is possible only if
-   zlib was compiled with the insecure functions sprintf() or vsprintf()
-   because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));
-/*
-      Push one character back onto the stream to be read again later.
-   Only one character of push-back is allowed.  gzungetc() returns the
-   character pushed, or -1 on failure.  gzungetc() will fail if a
-   character has been pushed but not read yet, or if c is -1. The pushed
-   character will be discarded if the stream is repositioned with gzseek()
-   or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-                                      z_off_t offset, int whence));
-/*
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file. This is analogous to the
-   clearerr() function in stdio. This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_stream FAR *strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int err));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/tkimg1.3/libz/zutil.c b/tkimg1.3/libz/zutil.c
deleted file mode 100644
index aa80a1c..0000000
--- a/tkimg1.3/libz/zutil.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zutil.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#include "zutil.h"
-
-#ifndef NO_DUMMY_DECL
-struct internal_state      {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef STDC
-extern void exit OF((int));
-#endif
-
-const char * const z_errmsg[10] = {
-"need dictionary",     /* Z_NEED_DICT       2  */
-"stream end",          /* Z_STREAM_END      1  */
-"",                    /* Z_OK              0  */
-"file error",          /* Z_ERRNO         (-1) */
-"stream error",        /* Z_STREAM_ERROR  (-2) */
-"data error",          /* Z_DATA_ERROR    (-3) */
-"insufficient memory", /* Z_MEM_ERROR     (-4) */
-"buffer error",        /* Z_BUF_ERROR     (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
-    return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
-    uLong flags;
-
-    flags = 0;
-    switch (sizeof(uInt)) {
-    case 2:     break;
-    case 4:     flags += 1;     break;
-    case 8:     flags += 2;     break;
-    default:    flags += 3;
-    }
-    switch (sizeof(uLong)) {
-    case 2:     break;
-    case 4:     flags += 1 << 2;        break;
-    case 8:     flags += 2 << 2;        break;
-    default:    flags += 3 << 2;
-    }
-    switch (sizeof(voidpf)) {
-    case 2:     break;
-    case 4:     flags += 1 << 4;        break;
-    case 8:     flags += 2 << 4;        break;
-    default:    flags += 3 << 4;
-    }
-    switch (sizeof(z_off_t)) {
-    case 2:     break;
-    case 4:     flags += 1 << 6;        break;
-    case 8:     flags += 2 << 6;        break;
-    default:    flags += 3 << 6;
-    }
-#ifdef DEBUG
-    flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
-    flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
-    flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
-    flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
-    flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
-    flags += 1 << 16;
-#endif
-#ifdef NO_GZIP
-    flags += 1 << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
-    flags += 1 << 20;
-#endif
-#ifdef FASTEST
-    flags += 1 << 21;
-#endif
-#ifdef STDC
-#  ifdef NO_vsnprintf
-        flags += 1 << 25;
-#    ifdef HAS_vsprintf_void
-        flags += 1 << 26;
-#    endif
-#  else
-#    ifdef HAS_vsnprintf_void
-        flags += 1 << 26;
-#    endif
-#  endif
-#else
-        flags += 1 << 24;
-#  ifdef NO_snprintf
-        flags += 1 << 25;
-#    ifdef HAS_sprintf_void
-        flags += 1 << 26;
-#    endif
-#  else
-#    ifdef HAS_snprintf_void
-        flags += 1 << 26;
-#    endif
-#  endif
-#endif
-    return flags;
-}
-
-#ifdef DEBUG
-
-#  ifndef verbose
-#    define verbose 0
-#  endif
-int z_verbose = verbose;
-
-void z_error (m)
-    char *m;
-{
-    fprintf(stderr, "%s\n", m);
-    exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
-    int err;
-{
-    return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
-    /* does not exist on WCE */
-    int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
-    Bytef* dest;
-    const Bytef* source;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = *source++; /* ??? to be unrolled */
-    } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
-    const Bytef* s1;
-    const Bytef* s2;
-    uInt  len;
-{
-    uInt j;
-
-    for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
-    }
-    return 0;
-}
-
-void zmemzero(dest, len)
-    Bytef* dest;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = 0;  /* ??? to be unrolled */
-    } while (--len != 0);
-}
-#endif
-
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
-    voidpf org_ptr;
-    voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    voidpf buf = opaque; /* just to make some compilers happy */
-    ulg bsize = (ulg)items*size;
-
-    /* If we allocate less than 65520 bytes, we assume that farmalloc
-     * will return a usable pointer which doesn't have to be normalized.
-     */
-    if (bsize < 65520L) {
-        buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
-    } else {
-        buf = farmalloc(bsize + 16L);
-    }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
-    table[next_ptr].org_ptr = buf;
-
-    /* Normalize the pointer to seg:0 */
-    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
-    *(ush*)&buf = 0;
-    table[next_ptr++].new_ptr = buf;
-    return buf;
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    int n;
-    if (*(ush*)&ptr != 0) { /* object < 64K */
-        farfree(ptr);
-        return;
-    }
-    /* Find the original pointer */
-    for (n = 0; n < next_ptr; n++) {
-        if (ptr != table[n].new_ptr) continue;
-
-        farfree(table[n].org_ptr);
-        while (++n < next_ptr) {
-            table[n-1] = table[n];
-        }
-        next_ptr--;
-        return;
-    }
-    ptr = opaque; /* just to make some compilers happy */
-    Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-#  define _halloc  halloc
-#  define _hfree   hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    return _halloc((long)items, size);
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern voidp  calloc OF((uInt items, uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
-    voidpf opaque;
-    unsigned items;
-    unsigned size;
-{
-    if (opaque) items += size - size; /* make compiler happy */
-    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
-                              (voidpf)calloc(items, size);
-}
-
-void  zcfree (opaque, ptr)
-    voidpf opaque;
-    voidpf ptr;
-{
-    free(ptr);
-    if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
diff --git a/tkimg1.3/libz/zutil.h b/tkimg1.3/libz/zutil.h
deleted file mode 100644
index 41a2fb2..0000000
--- a/tkimg1.3/libz/zutil.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-#  define OS_CODE  0x00
-#  if defined(__TURBOC__) || defined(__BORLANDC__)
-#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-       /* Allow compilation with ANSI keywords only enabled */
-       void _Cdecl farfree( void *block );
-       void *_Cdecl farmalloc( unsigned long nbytes );
-#    else
-#      include <alloc.h>
-#    endif
-#  else /* MSC or DJGPP */
-#    include <malloc.h>
-#  endif
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#    include <unix.h> /* for fdopen */
-#  else
-#    ifndef fdopen
-#      define fdopen(fd,mode) NULL /* No fdopen() */
-#    endif
-#  endif
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#ifdef WIN32
-#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
-#    define OS_CODE  0x0b
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-#  if defined(_WIN32_WCE)
-#    define fdopen(fd,mode) NULL /* No fdopen() */
-#    ifndef _PTRDIFF_T_DEFINED
-       typedef int ptrdiff_t;
-#      define _PTRDIFF_T_DEFINED
-#    endif
-#  else
-#    define fdopen(fd,type)  _fdopen(fd,type)
-#  endif
-#endif
-
-        /* common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#if defined(__CYGWIN__)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#ifndef HAVE_VSNPRINTF
-#  ifdef MSDOS
-     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
-        but for now we just assume it doesn't. */
-#    define NO_vsnprintf
-#  endif
-#  ifdef __TURBOC__
-#    define NO_vsnprintf
-#  endif
-#  ifdef WIN32
-     /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-#    if !defined(vsnprintf) && !defined(NO_vsnprintf)
-#      define vsnprintf _vsnprintf
-#    endif
-#  endif
-#  ifdef __SASC
-#    define NO_vsnprintf
-#  endif
-#endif
-
-#ifdef HAVE_STRERROR
-   extern char *strerror OF((int));
-#  define zstrerror(errnum) strerror(errnum)
-#else
-#  define zstrerror(errnum) ""
-#endif
-
-#if defined(pyr)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-   extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int z_verbose;
-   extern void z_error    OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void   zcfree  OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* ZUTIL_H */
diff --git a/tkimg1.3/license.terms b/tkimg1.3/license.terms
deleted file mode 100644
index 7f515fe..0000000
--- a/tkimg1.3/license.terms
+++ /dev/null
@@ -1,41 +0,0 @@
-This software is copyrighted by Jan Nijtmans (the maintainer)
-and a lot of other people who contributed code (most notably
-Andreas Kupries, Thomas G. Lane, Ioi K. Lam, Mario Weilguni
-and Roger E Critchlow Jr).
-The following terms apply to all files associated with the
-software unless explicitly disclaimed in individual files.
-
-The authors hereby grant permission to use, copy, modify, distribute,
-and license this software and its documentation for any purpose, provided
-that existing copyright notices are retained in all copies and that this
-notice is included verbatim in any distributions. No written agreement,
-license, or royalty fee is required for any of the authorized uses.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
-FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
-DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
-IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
-NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
-MODIFICATIONS.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license. 
diff --git a/tkimg1.3/pcx/ChangeLog b/tkimg1.3/pcx/ChangeLog
deleted file mode 100644
index ff5b4ba..0000000
--- a/tkimg1.3/pcx/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/pcx: PCX photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/pcx/Makefile.in b/tkimg1.3/pcx/Makefile.in
deleted file mode 100644
index 12cebdf..0000000
--- a/tkimg1.3/pcx/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgpcx TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgpcx_SOURCES	=	\
-		pcx.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgpcx_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgpcx_OBJECTS	= $(tkimgpcx_SOURCES:.c=. at OBJEXT@)
-tkimgpcx_LIB_FILE	= @tkimgpcx_LIB_FILE@
-
-## tkimgpcxstub_OBJECTS	= tkimgpcxStubLib.$(OBJEXT)
-## tkimgpcxstub_LIB_FILE= @tkimgpcxstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgpcx_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgpcx_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgpcx.$(OBJEXT): $(srcdir)/generic/tkimgpcx.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgpcx.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgpcx/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgpcxConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgpcx.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgpcx_DECLS = \
-	$(srcdir)/tkimgpcx.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgpcx_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgpcx_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/pcx/aclocal.m4 b/tkimg1.3/pcx/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/pcx/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/pcx/configure b/tkimg1.3/pcx/configure
deleted file mode 100755
index c1756cb..0000000
--- a/tkimg1.3/pcx/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpcx', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./pcx.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpcx
-DPACKAGE="img::pcx"
-PHIMGTYPE="pcx"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPCX_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgpcxstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGPCX_VERSION "${TKIMGPCX_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
- 	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgpcx in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgpcx 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGPCX_VERSION@%$TKIMGPCX_VERSION%g
-s%@tkimgpcx_LIB_FILE@%$tkimgpcx_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/pcx/configure.in b/tkimg1.3/pcx/configure.in
deleted file mode 100644
index 62540d4..0000000
--- a/tkimg1.3/pcx/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpcx', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./pcx.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpcx
-DPACKAGE="img::pcx"
-PHIMGTYPE="pcx"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPCX_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGPCX_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgpcx_LIB_FILE)
-#AC_SUBST(tkimgpcxstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGPCX_VERSION, "${TKIMGPCX_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgpcx in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgpcx)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/pcx/pcx.c b/tkimg1.3/pcx/pcx.c
deleted file mode 100644
index 27435a2..0000000
--- a/tkimg1.3/pcx/pcx.c
+++ /dev/null
@@ -1,861 +0,0 @@
-/* STARTHEADER
- *
- * File :       pcx.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Die Feb 20 14:27:18 CET 2001
- *
- * Copyright :  (C) 2001-2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for PaintBrush's PCX file format.
- *
- * The following image types are supported:
- *
- *  1-bit pixels: Black and White.
- *  8-bit pixels: Grayscale or indexed.
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- *  1-bit | Yes   | Yes   | No    | No    |
- *  8-bit | Yes   | Yes   | No    | No    |
- * 24-bit | Yes   | Yes   | Yes   | Yes   |
- *
- * All images types may be either uncompressed or run-length encoded.
- *
- *
- * The following format options are available:
- *
- * Read  PCX image: "pcx -verbose <bool>"
- * Write PCX image: "pcx -verbose <bool> -compression <type>"
- *
- * -verbose <bool>:     If set to true, additional information about the file
- *                      format is printed to stdout. Default is "false".
- * -compression <type>: Set the compression mode to either "none" or "rle".
- *			Default is "rle".
- *
- * Notes: 
- *
- * - Part of this code was taken from the "pcx" GIMP plugin:
- *
- *  >> pcx.c GIMP plug-in for loading & saving PCX files
- *  >>
- *  >> This code is based in parts on code by Francisco Bustamante, but the
- *  >> largest portion of the code has been rewritten and is now maintained
- *  >> occasionally by Nick Lamb njl195 at zepler.org.uk
- *
- * ENDHEADER
- *
- * $Id: pcx.c,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* #define DEBUG_LOCAL */
-
-/* Some defines and typedefs. */
-#define TRUE  1
-#define FALSE 0
-typedef unsigned char Boln;	/* Boolean value: TRUE or FALSE */
-typedef unsigned char UByte;	/* Unsigned  8 bit integer */
-typedef char  Byte;		/* Signed    8 bit integer */
-typedef unsigned short UShort;	/* Unsigned 16 bit integer */
-typedef short Short;		/* Signed   16 bit integer */
-typedef int Int;		/* Signed   32 bit integer */
-
-typedef struct {
-  UByte manufacturer;
-  UByte version;
-  UByte compression;
-  UByte bpp;
-  Short x1;
-  Short y1;
-  Short x2;
-  Short y2;
-  Short hdpi;
-  Short vdpi;
-  UByte colormap[48];
-  UByte reserved;
-  UByte planes;
-  Short bytesperline;
-  Short color;
-  UByte filler[58];
-} PCXHEADER;
-
-/* OPA TODO: Change from ANSI-C arguments to _ANSI_ARGS_ macro. */
-
-/* This function determines at runtime, whether we have to swap bytes.
-   The PCX image format expects data to be in Intel (Little-endian) format. */
-
-static int isIntel (void)
-{
-    char order[] = { 1, 2, 3, 4}; 
-    unsigned long val = (unsigned long)*((short *)order);
-    /* On Intel (little-endian) systems this value is equal to 513.
-       On big-endian systems this value equals 258. */
-    return (val == 513);
-}
-
-#define htoqs(x) qtohs(x)
-static UShort qtohs (UShort x)
-{
-    if (!isIntel ()) {
-	return ((UShort)((((UShort)(x) & 0x00ff) << 8) | \
-			 (((UShort)(x) & 0xff00) >> 8)));
-    } else {
-	return x;
-    }
-}
-
-/* Read 1 byte, representing an unsigned integer number. */
-
-#if defined (DEBUG_LOCAL)
-static Boln readUByte (tkimg_MFile *handle, UByte *b)
-{
-    char buf[1];
-    if (1 != tkimg_Read (handle, buf, 1))
-        return FALSE;
-    *b = buf[0];
-    return TRUE;
-}
-#else
-    /* Use this macro for better performance, esp. when reading RLE files. */
-    #define readUByte(h,b) (1 == tkimg_Read((h),(b),1))
-#endif
-
-/* Write 1 byte, representing an unsigned integer to a file. */
-
-static Boln writeUByte (tkimg_MFile *handle, UByte b)
-{
-    UByte buf[1];
-    buf[0] = b;
-    if (1 != tkimg_Write (handle, (CONST char *)buf, 1))
-        return FALSE;
-    return TRUE;
-}
-
-static Boln read_pcx_header (tkimg_MFile *ifp, PCXHEADER *pcxhdr)
-{
-    if (tkimg_Read (ifp, (char *)pcxhdr, 128) != 128) {
-	return FALSE;
-    }
-
-    if (pcxhdr->manufacturer != 10) {
-	return FALSE;
-    }
-    if (pcxhdr->bpp != 1 && pcxhdr->bpp != 8) {
-        return FALSE;
-    }
-    if (pcxhdr->planes != 1 && pcxhdr->planes != 3 && pcxhdr->planes != 4) {
-        return FALSE;
-    }
-    return TRUE;
-}
-
-#define OUT Tcl_WriteChars (outChan, str, -1)
-static void printImgInfo (PCXHEADER *ph, CONST char *filename, CONST char *msg)
-{
-    Tcl_Channel outChan;
-    char str[256];
-    Int width, height;
-
-    outChan = Tcl_GetStdChannel (TCL_STDOUT);
-    if (!outChan) {
-        return;
-    }
-    width  = qtohs (ph->x2) - qtohs (ph->x1) + 1;
-    height = qtohs (ph->y2) - qtohs (ph->y1) + 1;
-
-    sprintf (str, "%s %s\n", msg, filename);                                 OUT;
-    sprintf (str, "\tSize in pixel   : %d x %d\n", width, height);           OUT;
-    sprintf (str, "\tNo. of channels : %d\n", ph->planes);                   OUT;
-    sprintf (str, "\tBytes per pixel : %d\n", ph->bpp);                      OUT;
-    sprintf (str, "\tRLE compression : %s\n", ph->compression? "yes": "no"); OUT;
-    Tcl_Flush (outChan);
-}
-#undef OUT
-
-static Boln readline (tkimg_MFile *handle, UByte *buffer, Int bytes, Int compr) 
-{
-    static UByte count = 0, value = 0;
-
-    if (compr) {
-	while (bytes--) {
-	    if (count == 0) {
-	        if (!readUByte (handle, &value)) {
-		    return FALSE;
-		}
-	        if (value < 0xc0) {
-		    count = 1;
-		} else {
-		    count = value - 0xc0;
-		    if (!readUByte (handle, &value)) {
-			return FALSE;
-		    }
-		}
-	    }
-	    count--;
-	    *(buffer++) = value;
-	}
-    } else {
-	if (bytes != tkimg_Read (handle, (char *)buffer, bytes)) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-static Boln writeline (tkimg_MFile *handle, UByte *buffer, Int bytes) 
-{
-    UByte value, count;
-    UByte *finish = buffer + bytes;
-
-    while (buffer < finish) {
-        value = *(buffer++);
-        count = 1;
-      
-        while (buffer < finish && count < 63 && *buffer == value) {
-	    count++;
-            buffer++;
-	}
-
-        if (value < 0xc0 && count == 1) {
-	    if (!writeUByte (handle, value)) {
-		return FALSE;
-	    }
-	} else {
-	    if (!writeUByte (handle, 0xc0 + count)) {
-		return FALSE;
-	    }
-	    if (!writeUByte (handle, value)) {
-		return FALSE;
-	    }
-	}
-    }
-    return TRUE;
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-                  included already in Tk_PhotoImageBlock */
-} myblock;
-#define block bl.ck
-
-static Boln load_8 (Tcl_Interp *interp, tkimg_MFile *ifp,
-                    Tk_PhotoHandle imageHandle, int destX, int destY,
-                    int width, int height, int srcX, int srcY,
-                    int fileWidth, int fileHeight, int bytesPerLine, int compr)
-{
-    Int x, y;
-    Int stopY, outY;
-    myblock bl;
-    UByte *line, *buffer, *indBuf, *indBufPtr;
-    UByte cmap[768], sepChar;
-
-    line   = (UByte *) ckalloc (fileWidth);
-    buffer = (UByte *) ckalloc (fileWidth * 3);
-    indBuf = (UByte *) ckalloc (fileWidth * fileHeight);
-    indBufPtr = indBuf;
-
-    block.pixelSize = 3;
-    block.pitch = fileWidth * 3;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 0;
- 
-    block.pixelPtr = buffer + srcX * 3;
- 
-    stopY = srcY + height;
-    outY  = destY;
- 
-    /* Read in the whole image data as indices. */
-    for (y=0; y<stopY; y++) {
-        if (!readline (ifp, line, bytesPerLine, compr)) {
-	    ckfree ((char *) line);
-	    ckfree ((char *) buffer);
-	    ckfree ((char *) indBuf);
-	    return FALSE;
-	}
-        memcpy (indBufPtr, line, fileWidth);
-	indBufPtr += fileWidth;
-    }
-    /* Read the colormap: 256 entries */
-    if ((tkimg_Read (ifp, (char *)&sepChar, 1) != 1) ||
-        (tkimg_Read (ifp, (char *)&cmap, 768) != 768)) {
-	ckfree ((char *) line);
-	ckfree ((char *) buffer);
-	ckfree ((char *) indBuf);
-	return FALSE;
-    }
-
-    for (y=srcY; y<stopY; y++) {
-        for (x=0; x<fileWidth; x++) {
-            buffer[x * 3 + 0] = cmap[indBuf[y*fileWidth + x]*3 + 0 ];
-            buffer[x * 3 + 1] = cmap[indBuf[y*fileWidth + x]*3 + 1 ];
-            buffer[x * 3 + 2] = cmap[indBuf[y*fileWidth + x]*3 + 2 ];
-        }
-        tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-        outY++;
-    }
-    ckfree ((char *) line);
-    ckfree ((char *) buffer);
-    ckfree ((char *) indBuf);
-    return TRUE;
-}
-
-static Boln load_24 (Tcl_Interp *interp, tkimg_MFile *ifp,
-                     Tk_PhotoHandle imageHandle, int destX, int destY,
-                     int width, int height, int srcX, int srcY,
-                     int fileWidth, int fileHeight, int bytesPerLine, int compr)
-{
-    Int x, y, c;
-    Int stopY, outY;
-    myblock bl;
-    UByte *line, *buffer;
-
-    line   = (UByte *) ckalloc (bytesPerLine);
-    buffer = (UByte *) ckalloc (fileWidth * 3);
-
-    block.pixelSize = 3;
-    block.pitch = fileWidth * 3;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 0;
-
-    block.pixelPtr = buffer + srcX * 3;
-
-    stopY = srcY + height;
-    outY  = destY;
-
-    for (y=0; y<stopY; y++) {
-	for (c=0; c<3; c++) {
-	    if (!readline (ifp, line, bytesPerLine, compr)) {
-		ckfree ((char *) line);
-		ckfree ((char *) buffer);
-		return FALSE;
-	    }
-	    for (x=0; x<fileWidth; x++) {
-	        buffer[x * 3 + c] = line[x];
-	    }
-	}
-	if (y >= srcY) {
-	    tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-	    outY++;
-	}
-    }
-    ckfree ((char *) line);
-    ckfree ((char *) buffer);
-    return TRUE;
-}
-
-static Boln load_1 (Tcl_Interp *interp, tkimg_MFile *ifp,
-                    Tk_PhotoHandle imageHandle, int destX, int destY,
-                    int width, int height, int srcX, int srcY,
-                    int fileWidth, int fileHeight, int bytesPerLine, int compr)
-{
-    Int x, y;
-    Int stopY, outY;
-    myblock bl;
-    UByte *line, *buffer;
-
-    line   = (UByte *) ckalloc (fileWidth);
-    buffer = (UByte *) ckalloc (fileWidth * 1);
-
-    block.pixelSize = 1;
-    block.pitch = fileWidth * 1;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 0;
-    block.offset[2] = 0;
-    block.offset[3] = 0;
- 
-    block.pixelPtr = buffer + srcX * 1;
- 
-    stopY = srcY + height;
-    outY  = destY;
-
-    for (y=0; y<stopY; y++) {
-        if (!readline (ifp, line, bytesPerLine, compr)) {
-	    ckfree ((char *) line);
-	    ckfree ((char *) buffer);
-            return FALSE;
-        }
-        for (x=0; x<fileWidth; x++) {
-	    if (line[x/8] & (128 >> (x%8))) {
-	        buffer[x] = 255;
-	    } else {
-	        buffer[x] = 0;
-	    }
-	}
-        if (y >= srcY) {
-            tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-            outY++;
-        }
-    }
-    ckfree ((char *) line);
-    ckfree ((char *) buffer);
-    return TRUE;
-}
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int   ParseFormatOpts _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-                 int *comp, int *verb, int *matte));
-static int   CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	         int *heightPtr, PCXHEADER *pcxHeaderPtr));
-static int   CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	         CONST char *filename, Tcl_Obj *format,
-	         Tk_PhotoHandle imageHandle, int destX, int destY,
-		 int width, int height, int srcX, int srcY));
-static int   CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, 
-                 CONST char *filename, Tcl_Obj *format,
-                 tkimg_MFile *handle, Tk_PhotoImageBlock *blockPtr));
-
-static int ParseFormatOpts (interp, format, comp, verb, matte)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    int *comp;
-    int *verb;
-    int *matte;
-{
-    static char *pcxOptions[] = {"-compression", "-verbose", "-matte"};
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *compression, *verbose, *transp;
-
-    *comp = 1;
-    *verb = 0;
-    *matte = 1;
-    if (tkimg_ListObjGetElements (interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	compression = "rle";
-	verbose     = "0";
-	transp      = "1";
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj (interp, objv[i], pcxOptions,
-		    "format option", 0, &index) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult (interp, "No value for option \"",
-			Tcl_GetStringFromObj (objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    compression = Tcl_GetStringFromObj(objv[i], (int *) NULL);
-		    break;
-		case 1:
-		    verbose = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-		case 2:
-		    transp = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-	    }
-	}
-
-	c = compression[0]; length = strlen (compression);
-	if ((c == 'n') && (!strncmp (compression, "none", length))) {
-	    *comp = 0;
-	} else if ((c == 'r') && (!strncmp (compression, "rle",length))) {
-	    *comp = 1;
-	} else {
-	    Tcl_AppendResult (interp, "invalid compression mode \"",
-		    compression, "\": should be rle or none", (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-	c = verbose[0]; length = strlen (verbose);
-	if (!strncmp (verbose, "1", length) || \
-	    !strncmp (verbose, "true", length) || \
-	    !strncmp (verbose, "on", length)) {
-	    *verb = 1;
-	} else if (!strncmp (verbose, "0", length) || \
-	    !strncmp (verbose, "false", length) || \
-	    !strncmp (verbose, "off", length)) {
-	    *verb = 0;
-	} else {
-	    Tcl_AppendResult (interp, "invalid verbose mode \"", verbose, 
-                              "\": should be 1 or 0, on or off, true or false",
-			      (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-        c = transp[0]; length = strlen (transp);
-        if (!strncmp (transp, "1", length) || \
-            !strncmp (transp, "true", length) || \
-            !strncmp (transp, "on", length)) {
-            *matte = 1;
-        } else if (!strncmp (transp, "0", length) || \
-            !strncmp (transp, "false", length) || \
-            !strncmp (transp, "off", length)) {
-            *matte = 0;
-        } else {
-            Tcl_AppendResult (interp, "invalid alpha (matte) mode \"", verbose,
-                              "\": should be 1 or 0, on or off, true or false",
-                              (char *) NULL);
-            return TCL_ERROR;
-        }   
-    }
-    return TCL_OK;
-}
-
-static int ChnMatch (interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc (&interp, &chan, &filename, &format,
-                         &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc (&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, 10, &handle)) {
-	return 0;
-    }
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, pcxHeaderPtr)
-    tkimg_MFile *handle;
-    int   *widthPtr;
-    int   *heightPtr;
-    PCXHEADER *pcxHeaderPtr;
-{
-    PCXHEADER ph;
-    Int offset_x, offset_y;
-
-    if (!read_pcx_header (handle, &ph))
-	return 0;
-
-    offset_x = qtohs (ph.x1);
-    offset_y = qtohs (ph.y1);
-
-    if (offset_x < 0 || offset_y < 0)
-	return 0;
-
-    *widthPtr  = qtohs (ph.x2) - offset_x + 1;
-    *heightPtr = qtohs (ph.y2) - offset_y + 1;      
-
-    if (*widthPtr < 1 || *heightPtr < 1)
-	return 0;
-
-    if (pcxHeaderPtr)
-	*pcxHeaderPtr = ph;
-    return 1;
-}
-
-static int ChnRead (interp, chan, filename, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *filename;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-			         * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format,
-		       imageHandle, destX, destY,
-		       width, height, srcX, srcY);
-}
-
-static int ObjRead (interp, data, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit (data, 10, &handle);
-    return CommonRead (interp, &handle, "InlineData", format, imageHandle,
-		       destX, destY, width, height, srcX, srcY);
-}
-
-static int CommonRead (interp, handle, filename, format, imageHandle,
-		       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;        /* The image file, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-			         * in image being read. */
-{
-    int nchan;
-    int fileWidth, fileHeight;
-    int outWidth, outHeight;
-    int retCode = TCL_OK;
-    PCXHEADER ph;
-    UByte *pcxcolmap = NULL;
-    int compr, verbose, matte;
-    char errMsg[200];
-
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    CommonMatch (handle, &fileWidth, &fileHeight, &ph);
-    if (verbose)
-        printImgInfo (&ph, filename, "Reading image:");
-
-    if ((srcX + width) > fileWidth) {
-	outWidth = fileWidth - srcX;
-    } else {
-	outWidth = width;
-    }
-    if ((srcY + height) > fileHeight) {
-	outHeight = fileHeight - srcY;
-    } else {
-	outHeight = height;
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    if (ph.compression)
-	tkimg_ReadBuffer (1);
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    nchan = ph.planes;
-
-    if (ph.planes == 1 && ph.bpp == 1) {
-        if (!load_1 (interp, handle, imageHandle, destX, destY,
-                     outWidth, outHeight, srcX, srcY, fileWidth, fileHeight,
-                     qtohs (ph.bytesperline), ph.compression))
-	    retCode = TCL_ERROR;
-    } else if (ph.planes == 4 && ph.bpp == 1) {
-	Tcl_AppendResult (interp, "Format (4 channels, 1 bit per channel) ",
-                          "is not supported yet.", (char *)NULL);
-	retCode = TCL_ERROR;
-    } else if (ph.planes == 1 && ph.bpp == 8) {
-        if (!load_8 (interp, handle, imageHandle, destX, destY,
-                     outWidth, outHeight, srcX, srcY, fileWidth, fileHeight,
-                     qtohs (ph.bytesperline), ph.compression))
-	    retCode = TCL_ERROR;
-    } else if (ph.planes == 3 && ph.bpp == 8) {
-        if (!load_24 (interp, handle, imageHandle, destX, destY,
-                      outWidth, outHeight, srcX, srcY, fileWidth, fileHeight,
-                      qtohs (ph.bytesperline), ph.compression))
-	    retCode = TCL_ERROR;
-    } else {
-	sprintf (errMsg, "Image has invalid channel/bpp combination: (%d, %d)",
-			  ph.planes, ph.bpp);
-	Tcl_AppendResult (interp, errMsg, (char *)NULL);
-	retCode = TCL_ERROR;
-    }
-    tkimg_ReadBuffer (0);
-    return retCode;
-}
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel (interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, filename, format, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc (&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit(dataPtr, &handle);
-    result = CommonWrite (interp, "InlineData", format, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult (interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, filename, format, handle, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int     x, y, nchan, nBytes;
-    int     redOffset, greenOffset, blueOffset, alphaOffset; 
-    UByte   *pixelPtr, *pixRowPtr;
-    PCXHEADER ph;
-    UByte *row;
-    int compr, verbose, matte; /* Format options */
-    char errMsg[200];
-
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    redOffset   = 0;
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset  = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-
-    if (alphaOffset < blockPtr->offset[2]) {
-        alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-        alphaOffset -= blockPtr->offset[0];
-    } else {
-        alphaOffset = 0;   
-    }
-
-    nchan   = 3;
-    nBytes  = blockPtr->width * nchan;
-
-    /* Fill the PCX header struct and write the header to the channel. */
-    memset (&ph, 0, sizeof (PCXHEADER));
-    ph.manufacturer = 0x0a;
-    ph.version = 5;
-    ph.compression = compr; 
-    ph.bpp = 8;
-    ph.planes = 3;
-    ph.color = htoqs (1);
-    ph.bytesperline = htoqs (blockPtr->width);
-    ph.x1 = htoqs (0);
-    ph.y1 = htoqs (0);
-    ph.x2 = htoqs (blockPtr->width  - 1);
-    ph.y2 = htoqs (blockPtr->height - 1);
-
-    ph.hdpi = htoqs (300);
-    ph.vdpi = htoqs (300);
-    ph.reserved = 0;
-
-    if (tkimg_Write (handle, (CONST char *)&ph, 128) != 128) {
-	Tcl_AppendResult (interp, "Can't write PCX header.", (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    row = (UByte *) ckalloc (nBytes);
-    /* Now write out the image data. */
-    pixRowPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    if (!compr) {
-	for (y=0; y<blockPtr->height; y++) {
-	    pixelPtr = pixRowPtr;
-	    for (x=0; x<blockPtr->width; x++) {
-		row[x + 0*blockPtr->width] = pixelPtr[redOffset];
-		row[x + 1*blockPtr->width] = pixelPtr[greenOffset];
-		row[x + 2*blockPtr->width] = pixelPtr[blueOffset];
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	    if (nBytes != tkimg_Write (handle, (CONST char *)row, nBytes)) {
-		sprintf (errMsg, "Can't write %d bytes to image file.", nBytes); 
-		Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-		ckfree ((char *)row);
-		return TCL_ERROR;
-	    }
-	    pixRowPtr += blockPtr->pitch;
-	}
-    } else { 			/* RLE compression */
-	for (y = 0; y < blockPtr->height; y++) {
-	    pixelPtr = pixRowPtr;
-	    for (x = 0; x < blockPtr->width; x++) {
-		row[x + 0*blockPtr->width] = pixelPtr[redOffset];
-		row[x + 1*blockPtr->width] = pixelPtr[greenOffset];
-		row[x + 2*blockPtr->width] = pixelPtr[blueOffset];
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	    if (!writeline (handle, row, nBytes)) {
-		sprintf (errMsg, "Can't write %d bytes to image file.", nBytes); 
-		Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-		ckfree ((char *)row);
-		return TCL_ERROR;
-	    }
-	    pixRowPtr += blockPtr->pitch;
-	}
-    }
-    if (verbose)
-        printImgInfo (&ph, filename, "Saving image:");
-    ckfree ((char *)row);
-    return TCL_OK;
-}
diff --git a/tkimg1.3/pcx/pkgIndex.tcl.in b/tkimg1.3/pcx/pkgIndex.tcl.in
deleted file mode 100644
index d330e4e..0000000
--- a/tkimg1.3/pcx/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgpcx_LIB_FILE@]]
diff --git a/tkimg1.3/pcx/readme b/tkimg1.3/pcx/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/pcx/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/pcx/tests/all.tcl b/tkimg1.3/pcx/tests/all.tcl
deleted file mode 100644
index c73f236..0000000
--- a/tkimg1.3/pcx/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/pcx/tests/hori.pcx b/tkimg1.3/pcx/tests/hori.pcx
deleted file mode 100644
index 5828573..0000000
Binary files a/tkimg1.3/pcx/tests/hori.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/hori_bw.pcx b/tkimg1.3/pcx/tests/hori_bw.pcx
deleted file mode 100644
index 4e4f32a..0000000
Binary files a/tkimg1.3/pcx/tests/hori_bw.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/hori_bwmask.pcx b/tkimg1.3/pcx/tests/hori_bwmask.pcx
deleted file mode 100644
index 4e4f32a..0000000
Binary files a/tkimg1.3/pcx/tests/hori_bwmask.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/hori_grey8.pcx b/tkimg1.3/pcx/tests/hori_grey8.pcx
deleted file mode 100644
index ff8c568..0000000
Binary files a/tkimg1.3/pcx/tests/hori_grey8.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/hori_ind8.pcx b/tkimg1.3/pcx/tests/hori_ind8.pcx
deleted file mode 100644
index 34ff8f4..0000000
Binary files a/tkimg1.3/pcx/tests/hori_ind8.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/hori_rle.pcx b/tkimg1.3/pcx/tests/hori_rle.pcx
deleted file mode 100644
index 0d9e36e..0000000
Binary files a/tkimg1.3/pcx/tests/hori_rle.pcx and /dev/null differ
diff --git a/tkimg1.3/pcx/tests/pcx.test b/tkimg1.3/pcx/tests/pcx.test
deleted file mode 100644
index e19803d..0000000
--- a/tkimg1.3/pcx/tests/pcx.test
+++ /dev/null
@@ -1,77 +0,0 @@
-# This file is a Tcl script to test out PCX reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::pcx [package require img::pcx]"
-
-set pcxdata \
-{CgUBCAAAAABRAAsALAEsAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAADUgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAADB/wDE/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDC/wDE
-/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDH/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDC/wDE
-/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDH/wDC/wDC/wDC/wDE
-/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC/wDC/wDE/wDC/wDC/wDC
-/wDH/wDC/wDC/wDB/8H/ygDJ/8QAwf/HAMH/AML/AML/zADC/wDC/wDC/8YAwf/FAMn/AML/
-ygDJ/8QAwf/HAMH/AML/AML/zADC/wDC/wDC/8YAwf/FAMn/AML/ygDJ/8QAwf/HAMH/AML/
-AML/zADC/wDC/wDC/8YAwf/FAMn/AMH/wf/KAMn/wwDB/wDB/8IAwf/CAMH/AMP/AML/wwDB
-/8IAwf/CAMH/wgDF/wDD/8IAwf8Awv/CAML/AMb/AML/AML/ygDJ/8MAwf8Awf/CAMH/wgDB
-/wDD/wDC/8MAwf/CAMH/wgDB/8IAxf8Aw//CAMH/AML/wgDC/wDG/wDC/wDC/8oAyf/DAMH/
-AMH/wgDB/8IAwf8Aw/8Awv/DAMH/wgDB/8IAwf/CAMX/AMP/wgDB/wDC/8IAwv8Axv8Awv8A
-wf/B/8oAyf8Awf8Awv/CAML/wgDB/wDD/wDC/8wAxf8Aw/8Awv8Aw/8Awv8Axv8Awv8Awv/K
-AMn/AMH/AML/wgDC/8IAwf8Aw/8Awv/MAMX/AMP/AML/AMP/AML/AMb/AML/AML/ygDJ/wDB
-/wDC/8IAwv/CAMH/AMP/AML/zADF/wDD/wDC/wDD/wDC/wDG/wDC/wDB/8H/ygDJ/84Awv8A
-wv/MAML/AML/AML/xgDB/8UAyf/CAMH/ygDJ/84Awv8Awv/MAML/AML/AML/xgDB/8UAyf/C
-AMH/ygDJ/84Awv8Awv/MAML/AML/AML/xgDB/8UAyf/CAMH/ygDJ/8gAwf/CAMH/wgDB/8IA
-wv/GAMH/wgDB/8IAwv8Aw/8Awf/DAMH/wgDB/8IAwf/CAMP/AML/AML/AML/ygDJ/8gAwf/C
-AMH/wgDB/8IAwv/GAMH/wgDB/8IAwv8Aw/8Awf/DAMH/wgDB/8IAwf/CAMP/AML/AML/AML/
-ygDJ/8gAwf/CAMH/wgDB/8IAwv/GAMH/wgDB/8IAwv8Aw/8Awf/DAMH/wgDB/8IAwf/CAMP/
-AML/AML/AMH/wf/KAMn/AMH/wgDE/8MAyf/LAML/AMb/AMn/AMn/AML/ygDJ/wDB/8IAxP/D
-AMn/ywDC/wDG/wDJ/wDJ/wDC/8oAyf8Awf/CAMT/wwDJ/8sAwv8Axv8Ayf8Ayf8Awf/B/8oA
-yf/LAML/AML/AML/yQDB/8IAwv8Awv8Awv/DAMH/wgDB/8IAwf/CAMn/AML/ygDJ/8sAwv8A
-wv8Awv/JAMH/wgDC/wDC/wDC/8MAwf/CAMH/wgDB/8IAyf8Awv/KAMn/ywDC/wDC/wDC/8kA
-wf/CAML/AML/AML/wwDB/8IAwf/CAMH/wgDJ/wDB/8H/ygDJ/8sAwf/CAMH/zQDB/8IAwf8A
-wf8Awv8Awv/FAMH/wgDB/8MAxf8Awv8Awv/KAMn/ywDB/8IAwf/NAMH/wgDB/wDB/wDC/wDC
-/8UAwf/CAMH/wwDF/wDC/wDC/8oAyf/LAMH/wgDB/80Awf/CAMH/AMH/AML/AML/xQDB/8IA
-wf/DAMX/AML/AMH/wf/KAMn/AMH/AML/wgDC/8IAxf8Awv/MAML/AMb/AML/AMb/AMn/AML/
-ygDJ/wDB/wDC/8IAwv/CAMX/AML/zADC/wDG/wDC/wDG/wDJ/wDC/8oAyf8Awf8Awv/CAML/
-wgDF/wDC/8wAwv8Axv8Awv8Axv8Ayf8Awf/B//8A0QDC//8A0QDC//8A0QDB/8H/AMH/wgDB
-/8IAwf8Awv8Awv8Awf/CAMH/wgDB/8IAwf8Awv8Awv8Awf/CAMH/wgDB/8IAwf8Awv8Awv8A
-wf/CAMH/wgDB/wDC/wDC/wDC/wDB/8IAwf/CAMH/AML/AML/AML/AMH/wgDB/8IAwf8Awv8A
-wv8Awf/CAMH/wgDB/8IAwf8Awv8Awv8Awf/CAMH/wgDB/8IAwf8Awv8Awv8Awf/CAMH/wgDB
-/wDC/wDC/wDC/wDB/8IAwf/CAMH/AML/AML/AML/AMH/wgDB/8IAwf8Awv8Awv8Awf/CAMH/
-wgDB/8IAwf8Awv8Awv8Awf/CAMH/wgDB/8IAwf8Awv8Awv8Awf/CAMH/wgDB/wDC/wDC/wDC
-/wDB/8IAwf/CAMH/AML/AML/AMH/}
-
-
-test pcx-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory hori_bw.pcx]
-    i data -format pcx
-} $pcxdata
-test pcx-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $pcxdata
-    set data [i data -format pcx]
-} $pcxdata
-test pcx-1.3 {} {
-    i blank
-    i put $pcxdata
-    set data [i data -format pcx]
-} $pcxdata
-test pcx-1.4 {} {
-    i blank
-    i put $pcxdata -format pcx
-    set data [i data -format pcx]
-} $pcxdata
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test pcx-2.0 {Binary I/O with PCX images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory hori_bw.pcx] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/pixmap/ChangeLog b/tkimg1.3/pixmap/ChangeLog
deleted file mode 100644
index 60a60ff..0000000
--- a/tkimg1.3/pixmap/ChangeLog
+++ /dev/null
@@ -1,8 +0,0 @@
-2002-12-09  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* pixmap.c (Tkimgpixmap_Init): Had to be changed to use '1.3' too.
-
-2002-12-03  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/pixmap: PIXMAP image type.
diff --git a/tkimg1.3/pixmap/Makefile.in b/tkimg1.3/pixmap/Makefile.in
deleted file mode 100644
index 2fa70df..0000000
--- a/tkimg1.3/pixmap/Makefile.in
+++ /dev/null
@@ -1,546 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgpixmap TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgpixmap_SOURCES	=	\
-		pixmap.c	\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= pixmapWin.c
-UNIX_SOURCES	= pixmapUnix.c
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgpixmap_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgpixmap_OBJECTS	= $(tkimgpixmap_SOURCES:.c=. at OBJEXT@)
-tkimgpixmap_LIB_FILE	= @tkimgpixmap_LIB_FILE@
-
-## tkimgpixmapstub_OBJECTS	= tkimgpixmapStubLib.$(OBJEXT)
-## tkimgpixmapstub_LIB_FILE= @tkimgpixmapstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CYGPATH		= @CYGPATH@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-TK_TOP_DIR_NATIVE	= @TK_TOP_DIR_NATIVE@
-
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= -I$(srcdir) -I. \
-		-I$(tkimg_SRC_PATH)		\
-		@TCL_INCLUDES@ @TK_INCLUDES@ \
-		$(X11_INCLUDES)	\
-		-I"`$(CYGPATH) $(includedir)`"
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Pixmaps .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo No testsuite yet.
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgpixmap_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgpixmap_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgpixmap.$(OBJEXT): $(srcdir)/generic/tkimgpixmap.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgpixmap.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgpixmap/'		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Pixmaps this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgpixmapConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Pixmaps.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgpixmap.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgpixmap_DECLS = \
-	$(srcdir)/tkimgpixmap.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgpixmap_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgpixmap_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/pixmap/README b/tkimg1.3/pixmap/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/pixmap/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/pixmap/aclocal.m4 b/tkimg1.3/pixmap/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/pixmap/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/pixmap/configure b/tkimg1.3/pixmap/configure
deleted file mode 100755
index f246b75..0000000
--- a/tkimg1.3/pixmap/configure
+++ /dev/null
@@ -1,6510 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpixmap', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./pixmap.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Pixmaps).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpixmap
-DPACKAGE="img::pixmap"
-PHIMGTYPE="pixmap"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPIXMAP_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgpixmapstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGPIXMAP_VERSION "${TKIMGPIXMAP_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "pixmaps".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-# This module is special. On pixmaps it requires access to the
-# internal headers of Tk and thus tcl to implement its functionality
-# (TkWinReleaseDrawableDC).
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    
-    echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6
-echo "configure:3454: checking for Tcl private include files" >&5
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    
-    
-    
-    
-    
-    
-    
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    
-    echo "$ac_t""Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" 1>&6
-
-    
-    echo $ac_n "checking for Tk private include files""... $ac_c" 1>&6
-echo "configure:3490: checking for Tk private include files" >&5
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    
-    
-    
-    
-    
-    
-
-    
-    echo "$ac_t""Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" 1>&6
-
-else
-    
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3524: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-    
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3587: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-fi
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Pixmaps (BUILD_tkimgpixmap in this
-# case) so that we create the export library with the dll.
-#
-# Pixmaps creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgpixmap 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3713: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3721 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3761: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3808: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3816 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3853: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3895: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3903 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3954: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3959 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4010: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4015 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:4068: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4106: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4152: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4166: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4187: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4216: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4224 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4279: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4436: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4444 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4537: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4545 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4621: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4629 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4760: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4765 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4827: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4832 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4892: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4897 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4929: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4931 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5266: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5322: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5324 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5360: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5362 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5398: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5400 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5542: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5600: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5662 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5736 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5833 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5858: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5861 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5902: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5922: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5930 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6089: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6121: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGPIXMAP_VERSION@%$TKIMGPIXMAP_VERSION%g
-s%@tkimgpixmap_LIB_FILE@%$tkimgpixmap_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_TOP_DIR_NATIVE@%$TCL_TOP_DIR_NATIVE%g
-s%@TCL_GENERIC_DIR_NATIVE@%$TCL_GENERIC_DIR_NATIVE%g
-s%@TCL_UNIX_DIR_NATIVE@%$TCL_UNIX_DIR_NATIVE%g
-s%@TCL_WIN_DIR_NATIVE@%$TCL_WIN_DIR_NATIVE%g
-s%@TCL_BMAP_DIR_NATIVE@%$TCL_BMAP_DIR_NATIVE%g
-s%@TCL_TOOL_DIR_NATIVE@%$TCL_TOOL_DIR_NATIVE%g
-s%@TCL_PLATFORM_DIR_NATIVE@%$TCL_PLATFORM_DIR_NATIVE%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_TOP_DIR_NATIVE@%$TK_TOP_DIR_NATIVE%g
-s%@TK_UNIX_DIR_NATIVE@%$TK_UNIX_DIR_NATIVE%g
-s%@TK_WIN_DIR_NATIVE@%$TK_WIN_DIR_NATIVE%g
-s%@TK_GENERIC_DIR_NATIVE@%$TK_GENERIC_DIR_NATIVE%g
-s%@TK_XLIB_DIR_NATIVE@%$TK_XLIB_DIR_NATIVE%g
-s%@TK_PLATFORM_DIR_NATIVE@%$TK_PLATFORM_DIR_NATIVE%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/pixmap/configure.in b/tkimg1.3/pixmap/configure.in
deleted file mode 100644
index 558cd99..0000000
--- a/tkimg1.3/pixmap/configure.in
+++ /dev/null
@@ -1,233 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpixmap', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./pixmap.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Pixmaps).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpixmap
-DPACKAGE="img::pixmap"
-PHIMGTYPE="pixmap"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPIXMAP_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGPIXMAP_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgpixmap_LIB_FILE)
-#AC_SUBST(tkimgpixmapstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGPIXMAP_VERSION, "${TKIMGPIXMAP_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "pixmaps".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-# This module is special. On pixmaps it requires access to the
-# internal headers of Tk and thus tcl to implement its functionality
-# (TkWinReleaseDrawableDC).
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    TEA_PRIVATE_TCL_HEADERS
-    TEA_PRIVATE_TK_HEADERS
-else
-    TEA_PUBLIC_TCL_HEADERS
-    TEA_PUBLIC_TK_HEADERS
-fi
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Pixmaps (BUILD_tkimgpixmap in this
-# case) so that we create the export library with the dll.
-#
-# Pixmaps creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgpixmap)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/pixmap/pixmap.c b/tkimg1.3/pixmap/pixmap.c
deleted file mode 100644
index fe38230..0000000
--- a/tkimg1.3/pixmap/pixmap.c
+++ /dev/null
@@ -1,1307 +0,0 @@
-/*
- * tkImgPmap.c --
- *
- *	This file implements images of type "pixmap" for Tk.
- *
- * Copyright (c) 1996, Expert Interface Technologies
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pixmapInt.h>
-#include <tkimg.h>
-
-#if defined(__WIN32__) && !defined (__GNUC__)
-#define strncasecmp strnicmp
-#endif
-
-#ifndef MAC_TCL
-#include <sys/types.h>
-#include <sys/stat.h>
-#endif
-
-#ifndef TCL_STUB_MAGIC
-EXTERN void		panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
-#endif
-
-#define UCHAR(c) ((unsigned char) (c))
-
-/*
- * Prototypes for procedures used only locally in this file:
- */
-
-static int		TkimgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
-			    char *name, int argc, Tcl_Obj *objv[],
-			    Tk_ImageType *typePtr, Tk_ImageMaster master,
-			    ClientData *clientDataPtr));
-static ClientData	TkimgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
-			    ClientData clientData));
-static void		TkimgXpmDisplay _ANSI_ARGS_((ClientData clientData,
-			    Display *display, Drawable drawable, 
-			    int imageX, int imageY, int width, int height,
-			    int drawableX, int drawableY));
-static void		TkimgXpmFree _ANSI_ARGS_((ClientData clientData,
-			    Display *display));
-static void		TkimgXpmDelete _ANSI_ARGS_((ClientData clientData));
-static int		TkimgXpmCmd _ANSI_ARGS_((ClientData clientData,
-			    Tcl_Interp *interp, int argc, CONST84 char **argv));
-static void		TkimgXpmCmdDeletedProc _ANSI_ARGS_((
-			    ClientData clientData));
-static void		TkimgXpmConfigureInstance _ANSI_ARGS_((
-			    PixmapInstance *instancePtr));
-static int		TkimgXpmConfigureMaster _ANSI_ARGS_((
-			    PixmapMaster *masterPtr, int argc, CONST84 char **argv,
-			    int flags));
-static int		TkimgXpmGetData _ANSI_ARGS_((Tcl_Interp *interp,
-			    PixmapMaster *masterPtr));
-static CONST84 char **	TkimgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
-			    char * string, int * numLines_return));
-static CONST84 char **	TkimgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
-			    char * string, int * numLines_return));
-static void 		TkimgXpmGetPixmapFromData _ANSI_ARGS_((
-			    Tcl_Interp * interp,
-			    PixmapMaster *masterPtr,
-			    PixmapInstance *instancePtr));
-static char *		GetType _ANSI_ARGS_((char * colorDefn,
-			    int  * type_ret));
-static char *		GetColor _ANSI_ARGS_((char * colorDefn,
-			    char * colorName, int * type_ret));
-
-/*
- * Information used for parsing configuration specs:
- */
-
-static Tk_ConfigSpec configSpecs[] = {
-    {TK_CONFIG_STRING, "-data", (char *) NULL, (char *) NULL,
-	(char *) NULL, Tk_Offset(PixmapMaster, dataString), TK_CONFIG_NULL_OK},
-    {TK_CONFIG_STRING, "-file", (char *) NULL, (char *) NULL,
-	(char *) NULL, Tk_Offset(PixmapMaster, fileString), TK_CONFIG_NULL_OK},
-    {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
-	(char *) NULL, 0, 0}
-};
-
-Tk_ImageType imgPixmapImageType = {
-    "pixmap",				/* name */
-    (Tk_ImageCreateProc *) TkimgXpmCreate,/* createProc */
-    TkimgXpmGet,				/* getProc */
-    TkimgXpmDisplay,			/* displayProc */
-    TkimgXpmFree,				/* freeProc */
-    TkimgXpmDelete,			/* deleteProc */
-#ifdef TK_CONFIG_OBJS
-    (Tk_ImagePostscriptProc *) NULL,	/* postscriptProc */
-#endif
-    (Tk_ImageType *) NULL		/* nextPtr */
-};
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmCreate --
- *
- *	This procedure is called by the Tk image code to create "pixmap"
- *	images.
- *
- * Results:
- *	A standard Tcl result.
- *
- * Side effects:
- *	The data structure for a new image is allocated.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-TkimgXpmCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
-    Tcl_Interp *interp;		/* Interpreter for application containing
-				 * image. */
-    char *name;			/* Name to use for image. */
-    int argc;			/* Number of arguments. */
-    Tcl_Obj *objv[];		/* Argument strings for options (doesn't
-				 * include image name or type). */
-    Tk_ImageType *typePtr;	/* Pointer to our type record (not used). */
-    Tk_ImageMaster master;	/* Token for image, to be used by us in
-				 * later callbacks. */
-    ClientData *clientDataPtr;	/* Store manager's token for image here;
-				 * it will be returned in later callbacks. */
-{
-    PixmapMaster *masterPtr;
-    int i;
-    char *argvbuf[10];
-    CONST84 char **args = (CONST84 char **) argvbuf;
-
-    /*
-     * Convert the objc/objv arguments into string equivalent.
-     */
-    if (argc > 10) {
-	args = (CONST84 char **) ckalloc(argc * sizeof(char *));
-    }
-    for (i = 0; i < argc; i++) {
-	args[i] = tkimg_GetStringFromObj(objv[i], NULL);
-    }
-
-    masterPtr = (PixmapMaster *) ckalloc(sizeof(PixmapMaster));
-    masterPtr->tkMaster = master;
-    masterPtr->interp = interp;
-    masterPtr->imageCmd = Tcl_CreateCommand(interp, name, TkimgXpmCmd,
-	    (ClientData) masterPtr, TkimgXpmCmdDeletedProc);
-
-    masterPtr->fileString = NULL;
-    masterPtr->dataString = NULL;
-    masterPtr->data = NULL;
-    masterPtr->isDataAlloced = 0;
-    masterPtr->instancePtr = NULL;
-
-    if (TkimgXpmConfigureMaster(masterPtr, argc, args, 0) != TCL_OK) {
-	TkimgXpmDelete((ClientData) masterPtr);
-	if (args != ((CONST84 char **) argvbuf)) {
-	    ckfree((char *) args);
-	}
-	return TCL_ERROR;
-    }
-    *clientDataPtr = (ClientData) masterPtr;
-    if (args != ((CONST84 char **) argvbuf)) {
-	ckfree((char *) args);
-    }
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmConfigureMaster --
- *
- *	This procedure is called when a pixmap image is created or
- *	reconfigured.  It process configuration options and resets
- *	any instances of the image.
- *
- * Results:
- *	A standard Tcl return value.  If TCL_ERROR is returned then
- *	an error message is left in masterPtr->interp->result.
- *
- * Side effects:
- *	Existing instances of the image will be redisplayed to match
- *	the new configuration options.
- *
- *	If any error occurs, the state of *masterPtr is restored to
- *	previous state.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-TkimgXpmConfigureMaster(masterPtr, argc, argv, flags)
-    PixmapMaster *masterPtr;	/* Pointer to data structure describing
-				 * overall pixmap image to (reconfigure). */
-    int argc;			/* Number of entries in argv. */
-    CONST84 char **argv;	/* Pairs of configuration options for image. */
-    int flags;			/* Flags to pass to Tk_ConfigureWidget,
-				 * such as TK_CONFIG_ARGV_ONLY. */
-{
-    PixmapInstance *instancePtr;
-    char * oldData, * oldFile;
-
-    oldData = masterPtr->dataString;
-    oldFile = masterPtr->fileString;
-
-    if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),
-	    configSpecs, argc, argv, (char *) masterPtr, flags)
-	    != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    if (masterPtr->dataString != NULL ||
-	masterPtr->fileString != NULL) {
-	if (TkimgXpmGetData(masterPtr->interp, masterPtr) != TCL_OK) {
-	    goto error;
-	}
-    } else {
-	Tcl_AppendResult(masterPtr->interp,
-	    "must specify one of -data or -file", NULL);
-	goto error;
-    }
-
-    /*
-     * Cycle through all of the instances of this image, regenerating
-     * the information for each instance.  Then force the image to be
-     * redisplayed everywhere that it is used.
-     */
-    for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
-	instancePtr = instancePtr->nextPtr) {
-	TkimgXpmConfigureInstance(instancePtr);
-    }
-
-    if (masterPtr->data) {
-	Tk_ImageChanged(masterPtr->tkMaster, 0, 0,
-	    masterPtr->size[0], masterPtr->size[1],
-	    masterPtr->size[0], masterPtr->size[1]);
-    } else {
-	Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0, 0, 0);
-    }
-
-    return TCL_OK;
-
-  error:
-    /* Restore it to the original (possible valid) mode */
-    if (masterPtr->dataString && masterPtr->dataString != oldData) {
-	ckfree(masterPtr->dataString);
-    }
-    if (masterPtr->fileString && masterPtr->fileString != oldFile) {
-	ckfree(masterPtr->fileString);
-    }
-    masterPtr->dataString = oldData;
-    masterPtr->fileString = oldFile;
-    return TCL_ERROR;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmGetData --
- *
- *	Given a file name or ASCII string, this procedure parses the
- *	file or string contents to produce binary data for a pixmap.
- *
- * Results:
- *	If the pixmap description was parsed successfully then the data
- *	is read into an array of strings. This array will later be used
- *	to create X Pixmaps for each instance.
- *
- * Side effects:
- *	The masterPtr->data array is allocated when successful. Contents of
- *	*masterPtr is changed only when successful.
- *----------------------------------------------------------------------
- */
-
-static int
-TkimgXpmGetData(interp, masterPtr)
-    Tcl_Interp *interp;			/* For reporting errors. */
-    PixmapMaster *masterPtr;
-{
-    CONST84 char ** data = NULL;
-    int  isAllocated = 0;		/* do we need to free "data"? */
-    int listArgc;
-    CONST84 char ** listArgv = NULL;
-    int numLines;
-    int size[2];
-    int cpp;
-    int ncolors;
-    int code = TCL_OK;
-
-    if (masterPtr->fileString != NULL) {
-	if (Tcl_IsSafe(interp)) {
-	    Tcl_AppendResult(interp, "can't get image from a file in a",
-		    " safe interpreter", (char *) NULL);
-	    return TCL_ERROR;
-	}
-	data = TkimgXpmGetDataFromFile(interp, masterPtr->fileString, &numLines);
-	isAllocated = 1;
-    }
-    else if (masterPtr->dataString != NULL) {
-	data = TkimgXpmGetDataFromString(interp,masterPtr->dataString,&numLines);
-	isAllocated = 1;
-    }
-    else {
-	/* Should have been enforced by TkimgXpmConfigureMaster() */
-	panic("TkimgXpmGetData(): -data and -file are all NULL");
-    }
-
-    if (data == NULL) {
-	/* nothing has been allocated yet. Don't need to goto done */
-	return TCL_ERROR;
-    }
-
-    /* Parse the first line of the data and get info about this pixmap */
-    if (Tcl_SplitList(interp, data[0], &listArgc, &listArgv) != TCL_OK) {
-	code = TCL_ERROR; goto done;
-    }
-
-    if (listArgc < 4) {	/* file format error */
-	code = TCL_ERROR; goto done;
-    }
-
-    if (Tcl_GetInt(interp, listArgv[0], &size[0]) != TCL_OK) {
-	code = TCL_ERROR; goto done;
-    }
-    if (Tcl_GetInt(interp, listArgv[1], &size[1]) != TCL_OK) {
-	code = TCL_ERROR; goto done;
-    }
-    if (Tcl_GetInt(interp, listArgv[2], &ncolors) != TCL_OK) {
-	code = TCL_ERROR; goto done;
-    }
-    if (Tcl_GetInt(interp, listArgv[3], &cpp) != TCL_OK) {
-	code = TCL_ERROR; goto done;
-    }
-
-    if (isAllocated) {
-	if (numLines != size[1] + ncolors + 1) {
-	    /* the number of lines read from the file/data
-	     * is not the same as specified in the data
-	     */
-	    code = TCL_ERROR; goto done;
-	}
-    }
-
-  done:
-    if (code == TCL_OK) {
-	if (masterPtr->isDataAlloced && masterPtr->data) {
-	    ckfree((char*)masterPtr->data);
-	}
-	masterPtr->isDataAlloced = isAllocated;
-	masterPtr->data = (char **) data;
-	masterPtr->size[0] = size[0];
-	masterPtr->size[1] = size[1];
-	masterPtr->cpp = cpp;
-	masterPtr->ncolors = ncolors;
-    } else {
-	if (isAllocated && data) {
-	    ckfree((char*)data);
-	}
-
-	Tcl_ResetResult(interp);
-	Tcl_AppendResult(interp, "File format error", NULL);
-    }
-
-    if (listArgv) {
-	ckfree((char*)listArgv);
-    }
-		   
-    return code;
-}
-
-
-static CONST84 char **
-TkimgXpmGetDataFromString(interp, string, numLines_return)
-    Tcl_Interp * interp;
-    char * string;
-    int * numLines_return;
-{
-    int quoted;
-    char * p, * list;
-    int numLines;
-    CONST84 char ** data;
-
-    /* skip the leading blanks (leading blanks are not defined in the
-     * the XPM definition, but skipping them shouldn't hurt. Also, the ability
-     * to skip the leading blanks is good for using in-line XPM data in TCL
-     * scripts
-     */
-    while (isspace(UCHAR(*string))) {
-	++ string;
-    }
-
-    /* parse the header */
-    if (strncmp("/* XPM", string, 6) != 0) {
-	goto error;
-    }
-
-    /* strip the comments */
-    for (quoted = 0, p=string; *p;) {
-	if (!quoted) {
-	    if (*p == '"') {
-		quoted = 1;
-		++ p;
-		continue;
-	    }
-
-	    if (*p == '/' && *(p+1) == '*') {
-		*p++ = ' ';
-		*p++ = ' ';
-		while (1) {
-		    if (*p == 0) {
-			break;
-		    }
-		    if (*p == '*' && *(p+1) == '/') {
-			*p++ = ' ';
-			*p++ = ' ';
-			break;
-		    }
-		    *p++ = ' ';
-		}
-		continue;
-	    }
-	    ++ p;
-	} else {
-	    if (*p == '"') {
-		quoted = 0;
-	    }
-	    ++ p;
-	}
-    }
-
-    /* Search for the opening brace */
-    for (p=string; *p;) {
-	if (*p != '{') {
-	    ++ p;
-	} else {
-	    ++p;
-	    break;
-	}
-    }
-
-    /* Change the buffer in to a proper TCL list */
-    quoted = 0;
-    list = p;
-
-    while (*p) {
-	if (!quoted) {
-	    if (*p == '"') {
-		quoted = 1;
-		++ p;
-		continue;
-	    }
-
-	    if (isspace(UCHAR(*p))) {
-		*p = ' ';
-	    }
-	    else if (*p == ',') {
-		*p = ' ';
-	    }
-	    else if (*p == '}') {
-		*p = 0;
-		break;
-	    }
-	    ++p;
-	}
-	else {
-	    if (*p == '"') {
-		quoted = 0;
-	    }
-	    ++ p;
-	}
-    }
-
-    /* The following code depends on the fact that Tcl_SplitList
-     * strips away double quoates inside a list: ie:
-     * if string == "\"1\" \"2\"" then
-     *		list[0] = "1"
-     *		list[1] = "2"
-     * and NOT
-     *
-     *		list[0] = "\"1\""
-     *		list[1] = "\"2\""
-     */
-    if (Tcl_SplitList(interp, list, &numLines, &data) != TCL_OK) {
-	goto error;
-    } else {
-	if (numLines == 0) {
-	    /* error: empty data? */
-	    if (data != NULL) {
-		ckfree((char*)data);
-		goto error;
-	    }
-	}
-	* numLines_return = numLines;
-	return data;
-    }
-
-  error:
-    Tcl_AppendResult(interp, "File format error", NULL);
-    return (CONST84 char**) NULL;
-}
-
-
-static CONST84 char **
-TkimgXpmGetDataFromFile(interp, fileName, numLines_return)
-    Tcl_Interp * interp;
-    char * fileName;
-    int * numLines_return;
-{
-    Tcl_Channel chan;
-    int size;
-    CONST84 char ** data = (CONST84 char **) NULL;
-    char *cmdBuffer = NULL;
-
-    chan = tkimg_OpenFileChannel(interp, fileName, 0);
-    if (!chan) {
-	return (CONST84 char **) NULL;
-    }
-
-    size = Tcl_Seek(chan, 0, SEEK_END);
-    if (size > 0) {
-	Tcl_Seek(chan, 0, SEEK_SET);
-	cmdBuffer = (char *) ckalloc(size+1);
-	size = Tcl_Read(chan, cmdBuffer, size);
-    }
-    if (Tcl_Close(interp, chan) != TCL_OK) {
-	goto error;
-    }
-    if (size < 0) {
-	Tcl_AppendResult(interp, fileName, ": ",
-		Tcl_PosixError(interp), (char *)NULL);
-	goto error;
-    }
-    cmdBuffer[size] = 0;
-
-    data = TkimgXpmGetDataFromString(interp, cmdBuffer, numLines_return);
-    error:
-    if (cmdBuffer) {
-	ckfree(cmdBuffer);
-    }
-    return data;
-}
-
-
-static char *
-GetType(colorDefn, type_ret)
-    char * colorDefn;
-    int  * type_ret;
-{
-    char * p = colorDefn;
-
-    /* skip white spaces */
-    while (*p && isspace(UCHAR(*p))) {
-	p ++;
-    }
-
-    /* parse the type */
-    if (p[0] != '\0' && p[0] == 'm' &&
-	p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_MONO;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 'g' &&
-	     p[1] != '\0' && p[1] == '4' &&
-	     p[2] != '\0' && isspace(UCHAR(p[2]))) {
-	*type_ret = XPM_GRAY_4;
-	p += 3;
-    }
-    else if (p[0] != '\0' && p[0] == 'g' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_GRAY;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 'c' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_COLOR;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 's' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_SYMBOLIC;
-	p += 2;
-    }
-    else {
-	*type_ret = XPM_UNKNOWN;
-	return NULL;
-    }
-
-    return p;
-}
-
-/*
- * colorName is guaranteed to be big enough
- */
-
-static char *
-GetColor(colorDefn, colorName, type_ret)
-    char * colorDefn;
-    char * colorName;		/* if found, name is copied to this array */
-    int  * type_ret;
-{
-    int type;
-    char * p;
-
-    if (!colorDefn) {
-	return NULL;
-    }
-
-    if ((colorDefn = GetType(colorDefn, &type)) == NULL) {
-	/* unknown type */
-	return NULL;
-    }
-    else {
-	*type_ret = type;
-    }
-
-    /* skip white spaces */
-    while (*colorDefn && isspace(UCHAR(*colorDefn))) {
-	colorDefn ++;
-    }
-
-    p = colorName;
-
-    while (1) {
-	int dummy;
-
-	while (*colorDefn && !isspace(UCHAR(*colorDefn))) {
-	    *p++ = *colorDefn++;
-	}
-
-	if (!*colorDefn) {
-	    break;
-	}
-
-	if (GetType(colorDefn, &dummy) == NULL) {
-	    /* the next string should also be considered as a part of a color
-	     * name */
-	    
-	    while (*colorDefn && isspace(UCHAR(*colorDefn))) {
-		*p++ = *colorDefn++;
-	    }
-	} else {
-	    break;
-	}
-	if (!*colorDefn) {
-	    break;
-	}
-    }
-
-    /* Mark the end of the colorName */
-    *p = '\0';
-
-    return colorDefn;
-}
-
-/*----------------------------------------------------------------------
- * TkimgXpmGetPixmapFromData --
- *
- *	Creates a pixmap for an image instance.
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmGetPixmapFromData(interp, masterPtr, instancePtr)
-    Tcl_Interp * interp;
-    PixmapMaster *masterPtr;
-    PixmapInstance *instancePtr;
-{
-    XImage * image = NULL, * mask = NULL;
-    int depth, i, j, k, lOffset, isTransp = 0, isMono;
-    ColorStruct * colors;
-
-    depth = Tk_Depth(instancePtr->tkwin);
-
-    switch ((Tk_Visual(instancePtr->tkwin))->class) {
-      case StaticGray:
-      case GrayScale:
-	isMono = 1;
-	break;
-      default:
-	isMono = 0;
-    }
-
-    TkimgXpmAllocTmpBuffer(masterPtr, instancePtr, &image, &mask);
-
-    /*
-     * Parse the colors
-     */
-    lOffset = 1;
-    colors = (ColorStruct*)ckalloc(sizeof(ColorStruct)*masterPtr->ncolors);
-
-    /*
-     * Initialize the color structures
-     */
-    for (i=0; i<masterPtr->ncolors; i++) {
-	colors[i].colorPtr = NULL;
-	if (masterPtr->cpp == 1) {
-	    colors[i].c = 0;
-	} else {
-	    colors[i].cstring = (char*)ckalloc(masterPtr->cpp);
-	    colors[i].cstring[0] = 0;
-	}
-    }
-
-    for (i=0; i<masterPtr->ncolors; i++) {
-	char * colorDefn;		/* the color definition line */
-	char * colorName;		/* temp place to hold the color name
-					 * defined for one type of visual */
-	char * useName;			/* the color name used for this
-					 * color. If there are many names
-					 * defined, choose the name that is
-					 * "best" for the target visual
-					 */
-	int found;
-
-	colorDefn = masterPtr->data[i+lOffset]+masterPtr->cpp;
-	colorName = (char*)ckalloc(strlen(colorDefn));
-	useName   = (char*)ckalloc(strlen(colorDefn));
-	found     = 0;
-
-	while (colorDefn && *colorDefn) {
-	    int type;
-
-	    if ((colorDefn=GetColor(colorDefn, colorName, &type)) == NULL) {
-		break;
-	    }
-	    if (colorName[0] == '\0') {
-		continue;
-	    }
-
-	    switch (type) {
-	      case XPM_MONO:
-		if (isMono && depth == 1) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_GRAY_4:
-		if (isMono && depth == 4) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_GRAY:
-		if (isMono && depth > 4) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_COLOR:
-		if (!isMono) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	    }
-	    if (type != XPM_SYMBOLIC && type != XPM_UNKNOWN) {
-		if (!found) {			/* use this color as default */
-		    strcpy(useName, colorName);
-		    found = 1;
-		}
-	    }
-	}
-
-      gotcolor:
-	if (masterPtr->cpp == 1) {
-	    colors[i].c = masterPtr->data[i+lOffset][0];
-	} else {
-	    strncpy(colors[i].cstring, masterPtr->data[i+lOffset],
-		(size_t)masterPtr->cpp);
-	} 
-
-	if (found) {
-	    if (strncasecmp(useName, "none", 5) != 0) {
-		colors[i].colorPtr = Tk_GetColor(interp,
-		    instancePtr->tkwin, Tk_GetUid(useName));
-		if (colors[i].colorPtr == NULL) {
-		    colors[i].colorPtr = Tk_GetColor(interp,
-			instancePtr->tkwin, Tk_GetUid("black"));
-		}
-	    }
-	} else {
-	    colors[i].colorPtr = Tk_GetColor(interp,
-		instancePtr->tkwin, Tk_GetUid("black"));
-	}
-
-	ckfree(colorName);
-	ckfree(useName);
-    }
-
-    lOffset += masterPtr->ncolors;
-
-    /*
-     * Parse the main body of the image
-     */
-    for (i=0; i<masterPtr->size[1]; i++) {
-	char * p = masterPtr->data[i+lOffset];
-
-	for (j=0; j<masterPtr->size[0]; j++) {
-	    if (masterPtr->cpp == 1) {
-		for (k=0; k<masterPtr->ncolors; k++) {
-		    if (*p == colors[k].c) {
-			TkimgXpmSetPixel(instancePtr, image, mask, j, i,
-			        colors[k].colorPtr, &isTransp);
-			break;
-		    }
-		}
-		if (*p) {
-		    p++;
-		}
-	    } else {
-		for (k=0; k<masterPtr->ncolors; k++) {
-		    if (strncmp(p, colors[k].cstring, 
-			    (size_t)masterPtr->cpp) == 0) {
-			TkimgXpmSetPixel(instancePtr, image, mask, j, i,
-			        colors[k].colorPtr, &isTransp);
-			break;
-		    }
-		}
-		for (k=0; *p && k<masterPtr->cpp; k++) {
-		    p++;
-		}
-	    }
-	}
-    }
-
-    instancePtr->colors = colors;
-
-    TkimgXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp);
-    TkimgXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmConfigureInstance --
- *
- *	This procedure is called to create displaying information for
- *	a pixmap image instance based on the configuration information
- *	in the master.  It is invoked both when new instances are
- *	created and when the master is reconfigured.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Generates errors via Tk_BackgroundError if there are problems
- *	in setting up the instance.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmConfigureInstance(instancePtr)
-    PixmapInstance *instancePtr;	/* Instance to reconfigure. */
-{
-    PixmapMaster *masterPtr = instancePtr->masterPtr;
-
-    if (instancePtr->pixmap != None) {
-	Tk_FreePixmap(Tk_Display(instancePtr->tkwin), instancePtr->pixmap);
-    }
-    TkimgXpmFreeInstanceData(instancePtr, 0);
-
-    if (instancePtr->colors != NULL) {
-	int i;
-	for (i=0; i<masterPtr->ncolors; i++) {
-	    if (instancePtr->colors[i].colorPtr != NULL) {
-		Tk_FreeColor(instancePtr->colors[i].colorPtr);
-	    }
-	    if (masterPtr->cpp != 1) {
-		ckfree(instancePtr->colors[i].cstring);
-	    }
-	}
-	ckfree((char*)instancePtr->colors);
-    }
-
-    if (Tk_WindowId(instancePtr->tkwin) == None) {
-	Tk_MakeWindowExist(instancePtr->tkwin);
-    }
-
-    /*
-     * Assumption: masterPtr->data is always non NULL (enfored by
-     * TkimgXpmConfigureMaster()). Also, the data must be in a valid
-     * format (partially enforced by TkimgXpmConfigureMaster(), see comments
-     * inside that function).
-     */
-    TkimgXpmGetPixmapFromData(masterPtr->interp, masterPtr, instancePtr);
-}
-
-/*
- *--------------------------------------------------------------
- *
- * TkimgXpmCmd --
- *
- *	This procedure is invoked to process the Tcl command
- *	that corresponds to an image managed by this module.
- *	See the user documentation for details on what it does.
- *
- * Results:
- *	A standard Tcl result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *--------------------------------------------------------------
- */
-
-static int
-TkimgXpmCmd(clientData, interp, argc, argv)
-    ClientData clientData;	/* Information about button widget. */
-    Tcl_Interp *interp;		/* Current interpreter. */
-    int argc;			/* Number of arguments. */
-    CONST84 char **argv;	/* Argument strings. */
-{
-    PixmapMaster *masterPtr = (PixmapMaster *) clientData;
-    int c, code;
-    size_t length;
-
-    if (argc < 2) {
-	Tcl_AppendResult(interp, "wrong # args: should be \"",
-		argv[0], " option ?arg arg ...?\"",
-		(char *) NULL);
-	return TCL_ERROR;
-    }
-    c = argv[1][0];
-    length = strlen(argv[1]);
-
-    if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)
-	    && (length >= 2)) {
-	if (argc != 3) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		    argv[0], " cget option\"",
-		    (char *) NULL);
-	    return TCL_ERROR;
-	}
-	return Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs,
-		(char *) masterPtr, argv[2], 0);
-    } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)
-	    && (length >= 2)) {
-	if (argc == 2) {
-	    code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
-		    configSpecs, (char *) masterPtr, (char *) NULL, 0);
-	} else if (argc == 3) {
-	    code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
-		    configSpecs, (char *) masterPtr, argv[2], 0);
-	} else {
-	    code = TkimgXpmConfigureMaster(masterPtr, argc-2, argv+2,
-		    TK_CONFIG_ARGV_ONLY);
-	}
-	return code;
-    } else if ((c == 'r') && (strncmp(argv[1], "refcount", length) == 0)) {
-	/*
-	 * The "refcount" command is for debugging only
-	 */
-	PixmapInstance *instancePtr;
-	int count = 0;
-	char buff[30];
-
-	if (argc != 1) {
-	    Tcl_AppendResult(interp, "wrong # args: should be \"",
-		    argv[0], "\"", (char *) NULL);
-	    return TCL_ERROR;
-	}
-	for (instancePtr=masterPtr->instancePtr; instancePtr;
-	     instancePtr = instancePtr->nextPtr) {
-	    count += instancePtr->refCount;
-	}
-	sprintf(buff, "%d", count);
-	Tcl_AppendResult(interp, buff, (char *) NULL);
-	return TCL_OK;
-    } else {
-	Tcl_AppendResult(interp, "bad option \"", argv[1],
-	    "\": must be cget, configure or refcount", (char *) NULL);
-	return TCL_ERROR;
-    }
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmGet --
- *
- *	This procedure is called for each use of a pixmap image in a
- *	widget.
- *
- * Results:
- *	The return value is a token for the instance, which is passed
- *	back to us in calls to TkimgXpmDisplay and TkimgXpmFre.
- *
- * Side effects:
- *	A data structure is set up for the instance (or, an existing
- *	instance is re-used for the new one).
- *
- *----------------------------------------------------------------------
- */
-
-static ClientData
-TkimgXpmGet(tkwin, masterData)
-    Tk_Window tkwin;		/* Window in which the instance will be
-				 * used. */
-    ClientData masterData;	/* Pointer to our master structure for the
-				 * image. */
-{
-    PixmapMaster *masterPtr = (PixmapMaster *) masterData;
-    PixmapInstance *instancePtr;
-
-    /*
-     * See if there is already an instance for this window.  If so
-     * then just re-use it.
-     */
-
-    for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
-	    instancePtr = instancePtr->nextPtr) {
-	if (instancePtr->tkwin == tkwin) {
-	    instancePtr->refCount++;
-	    return (ClientData) instancePtr;
-	}
-    }
-
-    /*
-     * The image isn't already in use in this window.  Make a new
-     * instance of the image.
-     */
-    instancePtr = (PixmapInstance *) ckalloc(sizeof(PixmapInstance));
-    instancePtr->refCount = 1;
-    instancePtr->masterPtr = masterPtr;
-    instancePtr->tkwin = tkwin;
-    instancePtr->pixmap = None;
-    instancePtr->nextPtr = masterPtr->instancePtr;
-    instancePtr->colors = NULL;
-    masterPtr->instancePtr = instancePtr;
-
-    TkimgInitPixmapInstance(masterPtr, instancePtr);
-    TkimgXpmConfigureInstance(instancePtr);
-
-    /*
-     * If this is the first instance, must set the size of the image.
-     */
-    if (instancePtr->nextPtr == NULL) {
-	if (masterPtr->data) {
-	    Tk_ImageChanged(masterPtr->tkMaster, 0, 0,
-	        masterPtr->size[0], masterPtr->size[1],
-	        masterPtr->size[0], masterPtr->size[1]);
-	} else {
-	    Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0, 0, 0);
-	}
-    }
-
-    return (ClientData) instancePtr;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmDisplay --
- *
- *	This procedure is invoked to draw a pixmap image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	A portion of the image gets rendered in a pixmap or window.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmDisplay(clientData, display, drawable, imageX, imageY, width,
-	height, drawableX, drawableY)
-    ClientData clientData;	/* Pointer to PixmapInstance structure for
-				 * for instance to be displayed. */
-    Display *display;		/* Display on which to draw image. */
-    Drawable drawable;		/* Pixmap or window in which to draw image. */
-    int imageX, imageY;		/* Upper-left corner of region within image
-				 * to draw. */
-    int width, height;		/* Dimensions of region within image to draw.*/
-    int drawableX, drawableY;	/* Coordinates within drawable that
-				 * correspond to imageX and imageY. */
-{
-    TkimgpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
-	height, drawableX, drawableY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmFree --
- *
- *	This procedure is called when a widget ceases to use a
- *	particular instance of an image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Internal data structures get cleaned up.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmFree(clientData, display)
-    ClientData clientData;	/* Pointer to PixmapInstance structure for
-				 * for instance to be displayed. */
-    Display *display;		/* Display containing window that used image.*/
-{
-    PixmapInstance *instancePtr = (PixmapInstance *) clientData;
-    PixmapInstance *prevPtr;
-
-    instancePtr->refCount--;
-    if (instancePtr->refCount > 0) {
-	return;
-    }
-
-    /*
-     * There are no more uses of the image within this widget.  Free
-     * the instance structure.
-     */
-    if (instancePtr->pixmap != None) {
-	Tk_FreePixmap(display, instancePtr->pixmap);
-    }
-    TkimgXpmFreeInstanceData(instancePtr, 1);
-
-    if (instancePtr->colors != NULL) {
-	int i;
-	for (i=0; i<instancePtr->masterPtr->ncolors; i++) {
-	    if (instancePtr->colors[i].colorPtr != NULL) {
-		Tk_FreeColor(instancePtr->colors[i].colorPtr);
-	    }
-	    if (instancePtr->masterPtr->cpp != 1) {
-		ckfree(instancePtr->colors[i].cstring);
-	    }
-	}
-	ckfree((char*)instancePtr->colors);
-    }
-
-    if (instancePtr->masterPtr->instancePtr == instancePtr) {
-	instancePtr->masterPtr->instancePtr = instancePtr->nextPtr;
-    } else {
-	for (prevPtr = instancePtr->masterPtr->instancePtr;
-		prevPtr->nextPtr != instancePtr; prevPtr = prevPtr->nextPtr) {
-	    /* Empty loop body */
-	}
-	prevPtr->nextPtr = instancePtr->nextPtr;
-    }
-    ckfree((char *) instancePtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmDelete --
- *
- *	This procedure is called by the image code to delete the
- *	master structure for an image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	Resources associated with the image get freed.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmDelete(masterData)
-    ClientData masterData;	/* Pointer to PixmapMaster structure for
-				 * image.  Must not have any more instances. */
-{
-    PixmapMaster *masterPtr = (PixmapMaster *) masterData;
-
-    if (masterPtr->instancePtr != NULL) {
-	panic("tried to delete pixmap image when instances still exist");
-    }
-    masterPtr->tkMaster = NULL;
-    if (masterPtr->imageCmd != NULL) {
-	Tcl_DeleteCommand(masterPtr->interp,
-		Tcl_GetCommandName(masterPtr->interp, masterPtr->imageCmd));
-    }
-    if (masterPtr->isDataAlloced && masterPtr->data != NULL) {
-	ckfree((char*)masterPtr->data);
-	masterPtr->data = NULL;
-    }
-
-    Tk_FreeOptions(configSpecs, (char *) masterPtr, (Display *) NULL, 0);
-    ckfree((char *) masterPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkimgXpmCmdDeletedProc --
- *
- *	This procedure is invoked when the image command for an image
- *	is deleted.  It deletes the image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	The image is deleted.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-TkimgXpmCmdDeletedProc(clientData)
-    ClientData clientData;	/* Pointer to PixmapMaster structure for
-				 * image. */
-{
-    PixmapMaster *masterPtr = (PixmapMaster *) clientData;
-
-    masterPtr->imageCmd = NULL;
-    if (masterPtr->tkMaster != NULL) {
-	Tk_DeleteImage(masterPtr->interp, Tk_NameOfImage(masterPtr->tkMaster));
-    }
-}
-
-/*
- * Package management. Initialization of stub information. 
- */
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tkimgpixmap_Init --
- *
- *  Initialisation routine for loadable module
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter, loads package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tkimgpixmap_Init (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-  static int initialized = 0;
-
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-#ifdef USE_TK_STUBS
-    if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-#ifdef USE_TKIMG_STUBS
-    if (Tkimg_InitStubs(interp, "1.3", 0) == NULL) {
-        return TCL_ERROR;
-    }
-#endif
-
-#ifndef TCL_MAC
-    if (!initialized) {
-	Tk_CreateImageType(&imgPixmapImageType);
-	initialized = 1;
-    }
-#endif
-
-    /*
-     * At last provide the package ...
-     */
-
-    if (Tcl_PkgProvide(interp, PACKAGE_NAME, VERSION) != TCL_OK) {
-        return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------------
- *
- * Tkimgpixmap_SafeInit --
- *
- *  Initialisation routine for loadable module in a safe interpreter.
- *
- * Results:
- *  None.
- *
- * Side effects:
- *  Creates commands in the interpreter,
- *  loads xml package.
- *
- *----------------------------------------------------------------------------
- */
-
-int
-Tkimgpixmap_SafeInit (interp)
-      Tcl_Interp *interp; /* Interpreter to initialise. */
-{
-    return Tkimgpixmap_Init (interp);
-}
-
diff --git a/tkimg1.3/pixmap/pixmapInt.h b/tkimg1.3/pixmap/pixmapInt.h
deleted file mode 100644
index 5c47112..0000000
--- a/tkimg1.3/pixmap/pixmapInt.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * pixmapInt.h --
- *
- *	Generic header file for the pixmap image type. This is NOT a public
- *	header file!
- *
- * Copyright (c) 1996, Expert Interface Technologies
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#ifndef _TKIMG_PIXMAP_INT_H_
-#define _TKIMG_PIXMAP_INT_H_
-
-#include "tk.h"
-
-#ifndef CONST84
-#define CONST84
-#endif
-
-/*
- * These macros are used to control whether functions are being declared for
- * import or export in Windows, 
- * They map to no-op declarations on non-Windows systems.
- * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
- * The default build on windows is for a DLL, which causes the DLLIMPORT
- * and DLLEXPORT macros to be nonempty. To build a static library, the
- * macro STATIC_BUILD should be defined before the inclusion of tcl.h
- *
- * If a function is being declared while it is being built
- * to be included in a shared library, then it should have the DLLEXPORT
- * storage class.  If is being declared for use by a module that is going to
- * link against the shared library, then it should have the DLLIMPORT storage
- * class.  If the symbol is beind declared for a static build or for use from a
- * stub library, then the storage class should be empty.
- *
- * The convention is that a macro called BUILD_xxxx, where xxxx is the
- * name of a library we are building, is set on the compile line for sources
- * that are to be placed in the library.  When this macro is set, the
- * storage class will be set to DLLEXPORT.  At the end of the header file, the
- * storage class will be reset to DLLIMPORt.
- */
-
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_tkimgpixmap
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_TKIMGPIXMAP_STUBS
-#  define TCL_STORAGE_CLASS
-# else
-#  define TCL_STORAGE_CLASS DLLIMPORT
-# endif
-#endif
-
-/*
- * Constants
- */
-
-#define XPM_MONO		1
-#define XPM_GRAY_4		2
-#define XPM_GRAY		3
-#define XPM_COLOR		4
-#define XPM_SYMBOLIC		5
-#define XPM_UNKNOWN		6
-
-/*
- * The following data structure represents the master for a pixmap
- * image:
- */
-
-typedef struct PixmapMaster {
-    Tk_ImageMaster tkMaster;	/* Tk's token for image master.  NULL means
-				 * the image is being deleted. */
-    Tcl_Interp *interp;		/* Interpreter for application that is
-				 * using image. */
-    Tcl_Command imageCmd;	/* Token for image command (used to delete
-				 * it when the image goes away).  NULL means
-				 * the image command has already been
-				 * deleted. */
-    char *fileString;		/* Value of -file option (malloc'ed).
-				 * valid only if the -file option is specified
-				 */
-    char *dataString;		/* Value of -data option (malloc'ed).
-				 * valid only if the -data option is specified
-				 */
-				/* First in list of all instances associated
-				 * with this master. */
-    int size[2];		/* width and height */
-    int ncolors;		/* number of colors */
-    int cpp;			/* characters per pixel */
-    char ** data;		/* The data that defines this pixmap 
-				 * image (array of strings). It is
-				 * converted into an X Pixmap when this
-				 * image is instanciated
-				 */
-    int isDataAlloced;		/* False iff the data is got from
-				 * the -id switch */
-    struct PixmapInstance *instancePtr;
-} PixmapMaster;
-
-typedef struct ColorStruct {
-    char c;			/* This is used if CPP is one */
-    char * cstring;		/* This is used if CPP is bigger than one */
-    XColor * colorPtr;
-} ColorStruct;
-
-/*----------------------------------------------------------------------
- * PixmapInstance --
- *
- *	Represents all of the instances of an image that lie within a
- *	particular window:
- *
- *	%% ToDo
- *	Currently one instance is created for each window that uses
- *	this pixmap.  This is usually OK because pixmaps are usually
- *	not shared or only shared by a small number of windows. To
- *	improve resource allocation, we can create an instance for
- *	each (Display x Visual x Depth) combo. This will usually
- *	reduce the number of instances to one.
- *----------------------------------------------------------------------
- */
-typedef struct PixmapInstance {
-    int refCount;		/* Number of instances that share this
-				 * data structure. */
-    PixmapMaster *masterPtr;	/* Pointer to master for image. */
-    Tk_Window tkwin;		/* Window in which the instances will be
-				 * displayed. */
-    Pixmap pixmap;		/* The pixmap to display. */
-    struct PixmapInstance *nextPtr;
-				/* Next in list of all instance structures
-				 * associated with masterPtr (NULL means
-				 * end of list).
-				 */
-    ColorStruct * colors;
-    ClientData clientData;	/* Place holder for platform specific
-				 * instance data */
-} PixmapInstance;
-
-/*
- * Functions exported by the platform specific parts for use by the
- * generic part of the implementation
- */
-
-EXTERN void 	TkimgInitPixmapInstance _ANSI_ARGS_((
-			    PixmapMaster *masterPtr,
-			    PixmapInstance *instancePtr));
-EXTERN void 	TkimgXpmAllocTmpBuffer _ANSI_ARGS_((
-			    PixmapMaster * masterPtr,
-			    PixmapInstance * instancePtr,
-			    XImage ** imagePtr, XImage ** maskPtr));
-EXTERN void 	TkimgXpmFreeTmpBuffer _ANSI_ARGS_((
-			    PixmapMaster * masterPtr,
-			    PixmapInstance * instancePtr,
-			    XImage * image, XImage * mask));
-EXTERN void 	TkimgXpmSetPixel _ANSI_ARGS_((
-			    PixmapInstance * instancePtr, XImage * image,
-			    XImage * mask, int x, int y, XColor * colorPtr,
-			    int * isTranspPtr));
-EXTERN void 	TkimgXpmRealizePixmap _ANSI_ARGS_((
-			    PixmapMaster * masterPtr,
-			    PixmapInstance * instancePtr,
-			    XImage * image, XImage * mask, int isTransp));
-EXTERN void 	TkimgXpmFreeInstanceData _ANSI_ARGS_((
-			    PixmapInstance *instancePtr, int delete));
-EXTERN void 	TkimgpXpmDisplay _ANSI_ARGS_((ClientData clientData,
-			    Display *display, Drawable drawable,
-			    int imageX, int imageY, int width, int height,
-			    int drawableX, int drawableY));
-
-/*
- * Declarations of internal functions, which are exported for tcl package management.
- */
-
-EXTERN int Tkimgpixmap_Init     _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Tkimgpixmap_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-
-
-#undef  TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
-
-#endif
diff --git a/tkimg1.3/pixmap/pixmapUnix.c b/tkimg1.3/pixmap/pixmapUnix.c
deleted file mode 100644
index e78bd45..0000000
--- a/tkimg1.3/pixmap/pixmapUnix.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * tkUnixPmap.c --
- *
- *	Implement the Unix specific function calls for the pixmap
- *	image type.
- *
- * Copyright (c) 1996, Expert Interface Technologies
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#include <tk.h>
-#include <stdlib.h>
-#include <pixmapInt.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef MAC_OSX_TK
-#define XPutImage
-#endif
-
-typedef struct PixmapData {
-    Pixmap mask;		/* Mask: only display pixmap pixels where
-				 * there are 1's here. */
-    GC gc;			/* Graphics context for displaying pixmap.
-				 * None means there was an error while
-				 * setting up the instance, so it cannot
-				 * be displayed. */
-} PixmapData;
-
-
-/*----------------------------------------------------------------------
- * TkimgInitPixmapInstance --
- *
- *	Initializes the platform-specific data of a pixmap instance
- *
- *----------------------------------------------------------------------
- */
-
-void
-TkimgInitPixmapInstance(masterPtr, instancePtr)
-    PixmapMaster *masterPtr;	/* Pointer to master for image. */
-    PixmapInstance *instancePtr;/* The pixmap instance. */
-{
-    PixmapData * dataPtr;
-
-    dataPtr = (PixmapData *)ckalloc(sizeof(PixmapData));
-    dataPtr->mask = None;
-    dataPtr->gc = None;
-
-    instancePtr->clientData = (ClientData)dataPtr;
-}
-
-/*----------------------------------------------------------------------
- * TkimgXpmAllocTmpBuffer --
- *
- *	Allocate a temporary space to draw the image.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TkimgXpmAllocTmpBuffer(masterPtr, instancePtr, imagePtr, maskPtr)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage ** imagePtr;
-    XImage ** maskPtr;
-{
-    int pad;
-    XImage * image = NULL, * mask = NULL;
-    Display *display = Tk_Display(instancePtr->tkwin);
-    int depth;
-
-    depth = Tk_Depth(instancePtr->tkwin);
-
-    if (depth > 16) {
-	pad = 32;
-    } else if (depth > 8) {
-	pad = 16;
-    } else {
-	pad = 8;
-    }
-
-    /*
-     * Create the XImage structures to store the temporary image
-     */
-    image = XCreateImage(display,
-	Tk_Visual(instancePtr->tkwin),
-	depth, ZPixmap, 0, 0,
-	masterPtr->size[0], masterPtr->size[1], pad, 0);
-    image->data =
-      (char *)ckalloc(image->bytes_per_line * masterPtr->size[1]);
-
-    mask  = XCreateImage(display,
-	Tk_Visual(instancePtr->tkwin),
-	1, XYPixmap, 0, 0,
-	masterPtr->size[0], masterPtr->size[1], pad, 0);
-
-    mask->data =
-      (char *)ckalloc(mask->bytes_per_line  * masterPtr->size[1]);
-
-    *imagePtr = image;
-    *maskPtr = mask;
-}
-
-void
-TkimgXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-{
-    if (image) {
-	ckfree((char*)image->data);
-	image->data = NULL;
-	XDestroyImage(image);
-    }
-    if (mask) {
-	ckfree((char*)mask->data);
-	mask->data = NULL;
-	XDestroyImage(mask);
-    }
-}
-
-/*----------------------------------------------------------------------
- * TkimgXpmSetPixel --
- *
- *	Sets the pixel at the given (x,y) coordinate to be the given
- *	color.
- *----------------------------------------------------------------------
- */
-void
-TkimgXpmSetPixel(instancePtr, image, mask, x, y, colorPtr, isTranspPtr)
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-    int x;
-    int y;
-    XColor * colorPtr;
-    int * isTranspPtr;
-{
-    if (colorPtr != NULL) {
-	XPutPixel(image, x, y, colorPtr->pixel);
-	XPutPixel(mask,  x, y, 1);
-    } else {
-	XPutPixel(mask,  x, y, 0);
-	*isTranspPtr = 1;
-    }
-}
-
-/*----------------------------------------------------------------------
- * TkimgXpmRealizePixmap --
- *
- *	On Unix: 	Create the pixmap from the buffer.
- *	On Windows:	Free the mask if there are no transparent pixels.
- *----------------------------------------------------------------------
- */
-
-void
-TkimgXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-    int isTransp;
-{
-    Display *display = Tk_Display(instancePtr->tkwin);
-    int depth = Tk_Depth(instancePtr->tkwin);
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-    unsigned int gcMask;
-    XGCValues gcValues;
-    GC gc;
-
-    instancePtr->pixmap = Tk_GetPixmap(display,
-	Tk_WindowId(instancePtr->tkwin),
-	masterPtr->size[0], masterPtr->size[1], depth);
-
-    gc = Tk_GetGC(instancePtr->tkwin, 0, NULL);
-
-    XPutImage(display, instancePtr->pixmap,
-	gc, image, 0, 0, 0, 0, masterPtr->size[0], masterPtr->size[1]);
-
-    Tk_FreeGC(display, gc);
-
-    if (isTransp) {
-	/*
-	 * There are transparent pixels. We need a mask.
-	 */
-	dataPtr->mask = Tk_GetPixmap(display,
-	    Tk_WindowId(instancePtr->tkwin),
-	    masterPtr->size[0], masterPtr->size[1], 1);
-	gc = XCreateGC(display, dataPtr->mask, 0, NULL);
-	XPutImage(display, dataPtr->mask,
-	    gc, mask,  0, 0, 0, 0, masterPtr->size[0], masterPtr->size[1]);
-	XFreeGC(display, gc);
-    } else {
-	dataPtr->mask = None;
-    }
-
-    /*
-     * Allocate a GC for drawing this instance (mask is not used if there
-     * is no transparent pixels inside the image).
-     */
-    if (dataPtr->mask != None) {
-	gcMask = GCGraphicsExposures|GCClipMask;
-    } else {
-	gcMask = GCGraphicsExposures;
-    }
-    gcValues.graphics_exposures = False;
-    gcValues.clip_mask = dataPtr->mask;
-    
-    gc = Tk_GetGC(instancePtr->tkwin, gcMask, &gcValues);
-    dataPtr->gc = gc;
-}
-
-void
-TkimgXpmFreeInstanceData(instancePtr, delete)
-    PixmapInstance *instancePtr;	/* Pixmap instance. */
-    int delete;				/* Should the instance data structure
-					 * be deleted as well? */
-{
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-
-    if (dataPtr->mask != None) {
-	Tk_FreePixmap(Tk_Display(instancePtr->tkwin), dataPtr->mask);
-	dataPtr->mask = None;
-    }
-    if (dataPtr->gc != None) {
-	Tk_FreeGC(Tk_Display(instancePtr->tkwin), dataPtr->gc);
-	dataPtr->gc = None;
-    }
-    if (delete) {
-	ckfree((char*)dataPtr);
-	instancePtr->clientData = NULL;
-    }
-}
-
-void
-TkimgpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
-	height, drawableX, drawableY)
-    ClientData clientData;	/* Pointer to PixmapInstance structure for
-				 * for instance to be displayed. */
-    Display *display;		/* Display on which to draw image. */
-    Drawable drawable;		/* Pixmap or window in which to draw image. */
-    int imageX, imageY;		/* Upper-left corner of region within image
-				 * to draw. */
-    int width, height;		/* Dimensions of region within image to draw.*/
-    int drawableX, drawableY;	/* Coordinates within drawable that
-				 * correspond to imageX and imageY. */
-{
-    PixmapInstance *instancePtr = (PixmapInstance *) clientData;
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-
-    /*
-     * If there's no graphics context, it means that an error occurred
-     * while creating the image instance so it can't be displayed.
-     */
-    if (dataPtr->gc == None) {
-	return;
-    }
-
-    /*
-     * We always use clipping: modify the clip origin within
-     * the graphics context to line up with the image's origin.
-     * Then draw the image and reset the clip origin.
-     */
-    XSetClipOrigin(display, dataPtr->gc, drawableX - imageX,
-	drawableY - imageY);
-    XCopyArea(display, instancePtr->pixmap, drawable, dataPtr->gc,
-	imageX, imageY, (unsigned) width, (unsigned) height,
-	drawableX, drawableY);
-    XSetClipOrigin(display, dataPtr->gc, 0, 0);
-}
-
diff --git a/tkimg1.3/pixmap/pixmapWin.c b/tkimg1.3/pixmap/pixmapWin.c
deleted file mode 100644
index e6a63db..0000000
--- a/tkimg1.3/pixmap/pixmapWin.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- *imgWinPmap.c --
- *
- *	Implement the Windows specific function calls for the pixmap
- *	image type.
- *
- * Copyright (c) 1996, Expert Interface Technologies
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- */
-
-#include <windows.h>
-#include "tkInt.h"
-#include "tkWinInt.h"
-#include <stdlib.h>
-#include <pixmapInt.h>
-/* #include "imgInt.h" */ /* ---- what is used ?? */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef struct PixmapData {
-    HDC bitmapDC;               /* Bitmap used on Windows platforms */
-    HDC maskDC;                 /* Mask used on Windows platforms */
-    HBITMAP bitmap, bitmapOld;
-    HBITMAP maskBm, maskBmOld;
-} PixmapData;
-
-static void		CopyTransparent _ANSI_ARGS_((Display* display,
-			    HDC srcDC, Drawable dest,
-			    int src_x, int src_y, int width,
-			    int height, int dest_x, int dest_y,
-			    HDC maskDC));
-
-
-/*----------------------------------------------------------------------
- * TkimgInitPixmapInstance --
- *
- *	Initializes the platform-specific data of a pixmap instance
- *
- *----------------------------------------------------------------------
- */
-
-void
-TkimgInitPixmapInstance(masterPtr, instancePtr)
-    PixmapMaster *masterPtr;	/* Pointer to master for image. */
-    PixmapInstance *instancePtr;/* The pixmap instance. */
-{
-    PixmapData * dataPtr;
-
-    dataPtr = (PixmapData *)ckalloc(sizeof(PixmapData));
-    dataPtr->maskDC = NULL;
-    dataPtr->bitmapDC = NULL;
-
-    instancePtr->clientData = (ClientData)dataPtr;
-}
-
-
-/*----------------------------------------------------------------------
- * TkimgXpmAllocTmpBuffer --
- *
- *	Allocate a temporary space to draw the image.
- *
- *----------------------------------------------------------------------
- */
-void
-TkimgXpmAllocTmpBuffer(masterPtr, instancePtr, imagePtr, maskPtr)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage ** imagePtr;
-    XImage ** maskPtr;
-{
-    XImage * image = NULL, * mask = NULL;
-    Display *display = Tk_Display(instancePtr->tkwin);
-    int depth;
-
-    depth = Tk_Depth(instancePtr->tkwin);
-
-    instancePtr->pixmap = Tk_GetPixmap(display,
-	Tk_WindowId(instancePtr->tkwin),
-	masterPtr->size[0], masterPtr->size[1], depth);
-
-    mask = (XImage*)ckalloc(sizeof(XImage));
-
-    mask->width = masterPtr->size[0];
-    mask->height = masterPtr->size[1];
-    mask->bytes_per_line = (mask->width+7)/8;
-
-    mask->data =
-      (char *)ckalloc(mask->bytes_per_line  * masterPtr->size[1]);
-
-    *imagePtr = image;
-    *maskPtr = mask;
-}
-
-
-void
-TkimgXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-{
-    if (image) {
-	ckfree((char*)image->data);
-	image->data = NULL;
-	XDestroyImage(image);
-    }
-    if (mask) {
-	ckfree((char*)mask->data);
-	mask->data = NULL;
-	ckfree((char*)mask);
-    }
-}
-
-
-/*----------------------------------------------------------------------
- * TkimgXpmSetPixel --
- *
- *	Sets the pixel at the given (x,y) coordinate to be the given
- *	color.
- *----------------------------------------------------------------------
- */
-void
-TkimgXpmSetPixel(instancePtr, image, mask, x, y, colorPtr, isTranspPtr)
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-    int x;
-    int y;
-    XColor * colorPtr;
-    int * isTranspPtr;
-{
-    char * p;
-    int n;
-    GC gc;
-    XGCValues gcValues;
-    Display *display = Tk_Display(instancePtr->tkwin);
-
-    if (colorPtr != NULL) {
-	gcValues.foreground = colorPtr->pixel;
-	gc = Tk_GetGC(instancePtr->tkwin, GCForeground, &gcValues);
-	XDrawRectangle(display, instancePtr->pixmap, gc, x, y, 1, 1);
-	Tk_FreeGC(display, gc);
-    }
-
-    p = mask->data;
-    p+= y*(mask->bytes_per_line);
-    p+= x/8;
-    n = x%8;
-
-    if (colorPtr != NULL) {
-	*p |=  (1 << (7-n));
-    } else {
-	*p &= ~(1 << (7-n));
-	*isTranspPtr = 1;
-    }
-}
-
-/*----------------------------------------------------------------------
- * TkimgXpmRealizePixmap --
- *
- *	On Unix: 	Create the pixmap from the buffer.
- *	On Windows:	Free the mask if there are no transparent pixels.
- *----------------------------------------------------------------------
- */
-void
-TkimgXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp)
-    PixmapMaster * masterPtr;
-    PixmapInstance * instancePtr;
-    XImage * image;
-    XImage * mask;
-{
-    Display *display = Tk_Display(instancePtr->tkwin);
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-    HDC dc, bitmapDC;
-    TkWinDCState dcState;
-    HBITMAP bitmap, bitmapOld;
-    int w, h;
-
-    w = masterPtr->size[0];
-    h = masterPtr->size[1];
-
-    dc = TkWinGetDrawableDC(display, instancePtr->pixmap, &dcState);
-    bitmapDC = CreateCompatibleDC(dc);
-
-    bitmap = CreateCompatibleBitmap(dc, w, h);
-    bitmapOld = SelectObject(bitmapDC, bitmap);
-
-    BitBlt(bitmapDC, 0, 0, w, h, dc, 0, 0, SRCCOPY);
-
-    if (isTransp) {
-	HDC maskDC;
-	HBITMAP maskBm, maskBmOld;
-
-	/*
-	 * There are transparent pixels. We need a mask.
-	 */
-	maskDC = CreateCompatibleDC(dc);
-	maskBm = CreateBitmap(w, h, 1, 1, (CONST VOID*)mask->data);
-	maskBmOld = SelectObject(maskDC, maskBm);
-
-	BitBlt(bitmapDC, 0, 0, w, h, maskDC, 0, 0, SRCAND);
-	BitBlt(maskDC,   0, 0, w, h, maskDC, 0, 0, NOTSRCCOPY);
-
-	TkWinReleaseDrawableDC(instancePtr->pixmap, dc, &dcState);
-	dataPtr->maskDC = maskDC;
-	dataPtr->maskBm = maskBm;
-	dataPtr->maskBmOld = maskBmOld;
-    } else {
-	dataPtr->maskDC = NULL;
-    }
-    dataPtr->bitmapDC = bitmapDC;
-    dataPtr->bitmap = bitmap;
-    dataPtr->bitmapOld = bitmapOld;
-}
-
-void
-TkimgXpmFreeInstanceData(instancePtr, delete)
-    PixmapInstance *instancePtr;	/* Pixmap instance. */
-    int delete;				/* Should the instance data structure
-					 * be deleted as well? */
-{
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-
-    if (dataPtr->maskDC != NULL) {
-	DeleteObject(SelectObject(dataPtr->maskDC,
-	    dataPtr->maskBmOld));
-	DeleteDC(dataPtr->maskDC);
-	dataPtr->maskDC = NULL;
-    }
-    if (dataPtr->bitmapDC != NULL) {
-	DeleteObject(SelectObject(dataPtr->bitmapDC,
-	    dataPtr->bitmapOld));
-	DeleteDC(dataPtr->bitmapDC);
-	dataPtr->bitmapDC = NULL;
-    }
-    if (delete) {
-	ckfree((char*)dataPtr);
-	instancePtr->clientData = NULL;
-    }
-}
-
-void
-TkimgpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
-	height, drawableX, drawableY)
-    ClientData clientData;	/* Pointer to PixmapInstance structure for
-				 * for instance to be displayed. */
-    Display *display;		/* Display on which to draw image. */
-    Drawable drawable;		/* Pixmap or window in which to draw image. */
-    int imageX, imageY;		/* Upper-left corner of region within image
-				 * to draw. */
-    int width, height;		/* Dimensions of region within image to draw.*/
-    int drawableX, drawableY;	/* Coordinates within drawable that
-				 * correspond to imageX and imageY. */
-{
-    PixmapInstance *instancePtr = (PixmapInstance *) clientData;
-    PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
-
-    CopyTransparent(display, dataPtr->bitmapDC, drawable,
-	imageX, imageY, width, height,
-	drawableX, drawableY, dataPtr->maskDC);
-}
-
-static void
-CopyTransparent(display, srcDC, dest, src_x, src_y, width, height, dest_x,
-        dest_y,	maskDC)
-    Display* display;
-    HDC srcDC;
-    Drawable dest;
-    int src_x;
-    int src_y;
-    int width;
-    int height;
-    int dest_x;
-    int dest_y;
-    HDC maskDC;
-{
-    HDC destDC;
-    TkWinDCState destState;
-
-    destDC = TkWinGetDrawableDC(display, dest, &destState);
-
-    if (maskDC) {
-	BitBlt(destDC, dest_x, dest_y, width, height, maskDC, src_x, src_y,
-	    SRCAND);
-	BitBlt(destDC, dest_x, dest_y, width, height, srcDC, src_x, src_y,
-	    SRCPAINT);
-    } else {
-	BitBlt(destDC, dest_x, dest_y, width, height, srcDC, src_x, src_y,
-	    SRCCOPY);
-    }
-
-    TkWinReleaseDrawableDC(dest, destDC, &destState);
-}
-
diff --git a/tkimg1.3/pixmap/pkgIndex.tcl.in b/tkimg1.3/pixmap/pkgIndex.tcl.in
deleted file mode 100644
index ee2ea70..0000000
--- a/tkimg1.3/pixmap/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgpixmap_LIB_FILE@]]
diff --git a/tkimg1.3/pixmap/tests/all.tcl b/tkimg1.3/pixmap/tests/all.tcl
deleted file mode 100644
index c73f236..0000000
--- a/tkimg1.3/pixmap/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/pixmap/tests/pixmap.test b/tkimg1.3/pixmap/tests/pixmap.test
deleted file mode 100644
index eb5fd1a..0000000
--- a/tkimg1.3/pixmap/tests/pixmap.test
+++ /dev/null
@@ -1,53 +0,0 @@
-# This file is a Tcl script to test out BMP reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::bmp [package require img::bmp]"
-
-set bmpdata \
-{Qk12AgAAAAAAADYAAAAoAAAAEAAAAAwAAAABABgAAAAAAEACAABtCwAAbQsAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2dnZ2dnZ2dnZAAAAgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-gP/wgP/wAAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/w
-AAAA2dnZ2dnZ2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ
-2dnZ2dnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2dnZ2dnZ2dnZ
-2dnZAAAAgP/wgP/wgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ
-AAAAgP/wgP/wgP/wgP/wAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZAAAA
-AAAAAAAAAAAA2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ}
-
-
-test bmp-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.bmp]
-    i data -format bmp
-} $bmpdata
-test bmp-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $bmpdata
-    set data [i data -format bmp]
-} $bmpdata
-test bmp-1.3 {} {
-    i blank
-    i put $bmpdata
-    set data [i data -format bmp]
-} $bmpdata
-test bmp-1.4 {} {
-    i blank
-    i put $bmpdata -format bmp
-    set data [i data -format bmp]
-} $bmpdata
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test bmp-2.0 {Binary I/O with BMP images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.bmp] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/png/ChangeLog b/tkimg1.3/png/ChangeLog
deleted file mode 100644
index a966c09..0000000
--- a/tkimg1.3/png/ChangeLog
+++ /dev/null
@@ -1,14 +0,0 @@
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* png.c: Replaced the hardwired version number of wrapper pngtcl
-	  with macro PNGTCL_VERSION.
-
-2002-12-06  Andreas Kupries  <andreask at activestate.com>
-
-	* png.c (SetupPngLibrary): Missed return TCL_OK for success. This
-	  prevented the loading of this handler.
-
-2002-11-20  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/png: PNG photo image type.
diff --git a/tkimg1.3/png/Makefile.in b/tkimg1.3/png/Makefile.in
deleted file mode 100644
index 606473f..0000000
--- a/tkimg1.3/png/Makefile.in
+++ /dev/null
@@ -1,560 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgpng TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgpng_SOURCES	=	\
-		png.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgpng_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgpng_OBJECTS	= $(tkimgpng_SOURCES:.c=. at OBJEXT@)
-tkimgpng_LIB_FILE	= @tkimgpng_LIB_FILE@
-
-## tkimgpngstub_OBJECTS	= tkimgpngStubLib.$(OBJEXT)
-## tkimgpngstub_LIB_FILE= @tkimgpngstub_LIB_FILE@
-
-pngtcl_SRC_PATH		= @pngtcl_SRC_PATH@
-pngtcl_BUILD_PATH	= @pngtcl_BUILD_PATH@
-pngtcl_VERSION		= @pngtcl_VERSION@
-
-zlibtcl_SRC_PATH	= @zlibtcl_SRC_PATH@
-zlibtcl_BUILD_PATH	= @zlibtcl_BUILD_PATH@
-zlibtcl_VERSION		= @zlibtcl_VERSION@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#tkimgpng_NEW_VAR	= @tkimgpng_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	=			\
-		-I$(tkimg_SRC_PATH)		\
-		-I$(pngtcl_SRC_PATH)	\
-		-I$(pngtcl_BUILD_PATH)	\
-		-I$(zlibtcl_SRC_PATH)	\
-		-I$(zlibtcl_BUILD_PATH)	\
-		-I. -I$(srcdir)		\
-		@TCL_INCLUDES@		\
-		@TK_INCLUDES@		\
-		$(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"	\
-		-DPNGTCL_VERSION=\"$(pngtcl_VERSION)\"	\
-		-DPNGTCL_VERSION=\"$(zlibtcl_VERSION)\"
-
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgpng_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgpng_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgpng.$(OBJEXT): $(srcdir)/generic/tkimgpng.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgpng.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgpng/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgpngConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgpng.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgpng_DECLS = \
-	$(srcdir)/tkimgpng.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgpng_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgpng_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/png/README b/tkimg1.3/png/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/png/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/png/aclocal.m4 b/tkimg1.3/png/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/png/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/png/configure b/tkimg1.3/png/configure
deleted file mode 100755
index 758d6c3..0000000
--- a/tkimg1.3/png/configure
+++ /dev/null
@@ -1,6753 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpng', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-pngtcl              directory containing pngtcl configuration (pngtclConfig.sh)"
-ac_help="$ac_help
-  --with-zlibtcl              directory containing zlibtcl configuration (zlibtclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./png.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpng
-DPACKAGE="img::png"
-PHIMGTYPE="png"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPNG_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgpngstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGPNG_VERSION "${TKIMGPNG_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1458: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1470: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1540: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1614: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1689: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1761: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1847: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1852 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1880: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1885 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1909: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1924 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1941 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1958 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1998: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2028: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2111: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2122 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2153: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2158: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2186: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2225: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2229 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2261: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2319: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2353: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2386: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2412: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2449: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2456 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2471 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2506 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2521 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2559: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2565 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2584 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2615: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2621 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2650: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2656 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2685: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2691 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2724: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2726 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2773: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2778 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2810: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2815 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2847: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2852 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2884: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2889 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2921: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2926 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2968 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2982 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:3003: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3050 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3076: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3081 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3113: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3118 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3155: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3160 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3195: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3200 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3245: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3250 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3314: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3383: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-    #
-    # Ok, lets find the pngtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-pngtcl
-    #
-
-    if test x"${no_pngtcl}" = x ; then
-	# we reset no_pngtcl in case something fails here
-	no_pngtcl=true
-	# Check whether --with-pngtcl or --without-pngtcl was given.
-if test "${with_pngtcl+set}" = set; then
-  withval="$with_pngtcl"
-  with_pngtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for pngtcl configuration""... $ac_c" 1>&6
-echo "configure:3436: checking for pngtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_pngtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-pngtcl was specified.
-	    if test x"${with_pngtclconfig}" != x ; then
-		if test -f "${with_pngtclconfig}/pngtclConfig.sh" ; then
-		    ac_cv_c_pngtclconfig=`(cd ${with_pngtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_pngtclconfig} directory doesn't contain pngtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private pngtcl installation
-	    if test x"${ac_cv_c_pngtclconfig}" = x ; then
-		for i in \
-			../pngtcl \
-			`ls -dr ../pngtcl[8-9].[0-9]* 2>/dev/null` \
-			../../pngtcl \
-			`ls -dr ../../pngtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../pngtcl \
-			`ls -dr ../../../pngtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../pngtcl \
-			`ls -dr ${srcdir}/../pngtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/pngtclConfig.sh" ; then
-			ac_cv_c_pngtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/pngtclConfig.sh" ; then
-			ac_cv_c_pngtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_pngtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/pngtclConfig.sh" ; then
-			ac_cv_c_pngtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_pngtclconfig}" = x ; then
-	    pngtcl_BIN_DIR="# no pngtcl configs found"
-	    echo "configure: warning: "Cannot find pngtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_pngtcl=
-	    pngtcl_BIN_DIR=${ac_cv_c_pngtclconfig}
-	    echo "$ac_t""found $pngtcl_BIN_DIR/pngtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${pngtcl_BIN_DIR}/pngtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3505: checking for existence of ${pngtcl_BIN_DIR}/pngtclConfig.sh" >&5
-
-    if test -f "${pngtcl_BIN_DIR}/pngtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${pngtcl_BIN_DIR}/pngtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the pngtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable pngtcl_LIB_SPEC will be set to the value
-    # of pngtcl_BUILD_LIB_SPEC. An extension should make use of pngtcl_LIB_SPEC
-    # instead of pngtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${pngtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for pngtcl" 1>&2
-        pngtcl_LIB_SPEC=${pngtcl_BUILD_LIB_SPEC}
-        pngtcl_STUB_LIB_SPEC=${pngtcl_BUILD_STUB_LIB_SPEC}
-        pngtcl_STUB_LIB_PATH=${pngtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-    #
-    # Ok, lets find the zlibtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-zlibtcl
-    #
-
-    if test x"${no_zlibtcl}" = x ; then
-	# we reset no_zlibtcl in case something fails here
-	no_zlibtcl=true
-	# Check whether --with-zlibtcl or --without-zlibtcl was given.
-if test "${with_zlibtcl+set}" = set; then
-  withval="$with_zlibtcl"
-  with_zlibtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for zlibtcl configuration""... $ac_c" 1>&6
-echo "configure:3559: checking for zlibtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_zlibtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-zlibtcl was specified.
-	    if test x"${with_zlibtclconfig}" != x ; then
-		if test -f "${with_zlibtclconfig}/zlibtclConfig.sh" ; then
-		    ac_cv_c_zlibtclconfig=`(cd ${with_zlibtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private zlibtcl installation
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in \
-			../zlibtcl \
-			`ls -dr ../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../zlibtcl \
-			`ls -dr ../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../zlibtcl \
-			`ls -dr ../../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../zlibtcl \
-			`ls -dr ${srcdir}/../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-	    zlibtcl_BIN_DIR="# no zlibtcl configs found"
-	    echo "configure: warning: "Cannot find zlibtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_zlibtcl=
-	    zlibtcl_BIN_DIR=${ac_cv_c_zlibtclconfig}
-	    echo "$ac_t""found $zlibtcl_BIN_DIR/zlibtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3628: checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh" >&5
-
-    if test -f "${zlibtcl_BIN_DIR}/zlibtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${zlibtcl_BIN_DIR}/zlibtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the zlibtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable zlibtcl_LIB_SPEC will be set to the value
-    # of zlibtcl_BUILD_LIB_SPEC. An extension should make use of zlibtcl_LIB_SPEC
-    # instead of zlibtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${zlibtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for zlibtcl" 1>&2
-        zlibtcl_LIB_SPEC=${zlibtcl_BUILD_LIB_SPEC}
-        zlibtcl_STUB_LIB_SPEC=${zlibtcl_BUILD_STUB_LIB_SPEC}
-        zlibtcl_STUB_LIB_PATH=${zlibtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'pngtcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $pngtcl_SRC_DIR in
-/*)	pngtcl_SRC_PATH=$pngtcl_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
- 	pngtcl_SRC_PATH="`dirname $pngtcl_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	pngtcl_SRC_PATH="`dirname $pngtcl_BUILD_STUB_LIB_PATH`/$pngtcl_SRC_DIR"
-esac
-
-pngtcl_BUILD_PATH="`dirname $pngtcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    pngtcl_SRC_PATH="\"`$CYGPATH $pngtcl_SRC_PATH`\""
-    pngtcl_BUILD_PATH="\"`$CYGPATH $pngtcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'zlibtcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $zlibtcl_SRC_DIR in
-/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
-	;;
-\.)     # SRC_DIR top level, splice with BUILD_PATH
-	zlibtcl_SRC_PATH=`dirname $zlibtcl_BUILD_STUB_LIB_PATH`
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	zlibtcl_SRC_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR"
-esac
-
-zlibtcl_BUILD_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    zlibtcl_SRC_PATH="\"`$CYGPATH $zlibtcl_SRC_PATH`\""
-    zlibtcl_BUILD_PATH="\"`$CYGPATH $zlibtcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3746: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3809: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgpng in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgpng 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3935: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3943 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3983: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3991 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:4030: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4038 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:4075: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4083 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:4117: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4125 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4176: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4181 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4232: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4237 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:4290: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4328: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4374: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4388: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4409: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4438: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4446 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4501: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4658: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4666 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4759: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4767 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4843: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4851 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4982: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4987 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:5049: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5054 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5114: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5119 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5151: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5153 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5488: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5491 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5544: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5546 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5582: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5584 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5620: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5622 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5764: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5822: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5884 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5958 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 6055 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:6080: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 6083 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:6124: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:6144: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6152 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:6163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_PNGTCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_ZLIBTCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${pngtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${pngtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6321: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6353: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGPNG_VERSION@%$TKIMGPNG_VERSION%g
-s%@tkimgpng_LIB_FILE@%$tkimgpng_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@pngtcl_VERSION@%$pngtcl_VERSION%g
-s%@pngtcl_SRC_DIR@%$pngtcl_SRC_DIR%g
-s%@pngtcl_LIB_FILE@%$pngtcl_LIB_FILE%g
-s%@pngtcl_LIB_SPEC@%$pngtcl_LIB_SPEC%g
-s%@pngtcl_STUB_LIB_FILE@%$pngtcl_STUB_LIB_FILE%g
-s%@pngtcl_STUB_LIB_SPEC@%$pngtcl_STUB_LIB_SPEC%g
-s%@pngtcl_STUB_LIB_PATH@%$pngtcl_STUB_LIB_PATH%g
-s%@zlibtcl_VERSION@%$zlibtcl_VERSION%g
-s%@zlibtcl_SRC_DIR@%$zlibtcl_SRC_DIR%g
-s%@zlibtcl_LIB_FILE@%$zlibtcl_LIB_FILE%g
-s%@zlibtcl_LIB_SPEC@%$zlibtcl_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_FILE@%$zlibtcl_STUB_LIB_FILE%g
-s%@zlibtcl_STUB_LIB_SPEC@%$zlibtcl_STUB_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_PATH@%$zlibtcl_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@pngtcl_SRC_PATH@%$pngtcl_SRC_PATH%g
-s%@pngtcl_BUILD_PATH@%$pngtcl_BUILD_PATH%g
-s%@zlibtcl_SRC_PATH@%$zlibtcl_SRC_PATH%g
-s%@zlibtcl_BUILD_PATH@%$zlibtcl_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/png/configure.in b/tkimg1.3/png/configure.in
deleted file mode 100644
index cc8487a..0000000
--- a/tkimg1.3/png/configure.in
+++ /dev/null
@@ -1,240 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:11 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgpng', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./png.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgpng
-DPACKAGE="img::png"
-PHIMGTYPE="png"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPNG_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGPNG_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgpng_LIB_FILE)
-#AC_SUBST(tkimgpngstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGPNG_VERSION, "${TKIMGPNG_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-
-TEA_PATH_CONFIG(pngtcl)
-TEA_LOAD_CONFIG(pngtcl)
-AC_SUBST(pngtcl_VERSION)
-
-TEA_PATH_CONFIG(zlibtcl)
-TEA_LOAD_CONFIG(zlibtcl)
-AC_SUBST(zlibtcl_VERSION)
-
-IMG_SRCPATH(tkimg)
-IMG_SRCPATH(pngtcl)
-IMG_SRCPATH(zlibtcl)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgpng in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgpng)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-AC_DEFINE(USE_PNGTCL_STUBS)
-AC_DEFINE(USE_ZLIBTCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${pngtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${pngtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/png/pkgIndex.tcl.in b/tkimg1.3/png/pkgIndex.tcl.in
deleted file mode 100644
index 814e5d0..0000000
--- a/tkimg1.3/png/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgpng_LIB_FILE@]]
diff --git a/tkimg1.3/png/png.c b/tkimg1.3/png/png.c
deleted file mode 100644
index b083882..0000000
--- a/tkimg1.3/png/png.c
+++ /dev/null
@@ -1,614 +0,0 @@
-/*
- * png.c --
- *
- *  PNG photo image type, Tcl/Tk package
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * This Tk image format handler reads and writes PNG files in the standard
- * JFIF file format.  ("PNG" should be the format name.)  It can also read
- * and write strings containing base64-encoded PNG data.
- *
- * Author : Jan Nijtmans *
- * Date   : 2/13/97        *
- * Original implementation : Joel Crisp     *
- *
- * $Id: png.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include <tcl.h>
-#include <pngtcl.h>
-#include <string.h>
-#include <stdlib.h>
-
-static int SetupPngLibrary _ANSI_ARGS_ ((Tcl_Interp *interp));
-
-#define MORE_INITIALIZATION \
-    if (SetupPngLibrary (interp) != TCL_OK) { return TCL_ERROR; }
-
-#include "init.c"
-
-
-
-#define COMPRESS_THRESHOLD 1024
-
-typedef struct png_text_struct_compat
-{
-   int  compression;       /* compression value:
-                             -1: tEXt, none
-                              0: zTXt, deflate
-                              1: iTXt, none
-                              2: iTXt, deflate  */
-   png_charp key;          /* keyword, 1-79 character description of "text" */
-   png_charp text;         /* comment, may be an empty string (ie "")
-                              or a NULL pointer */
-   png_size_t text_length; /* length of the text string */
-   png_size_t itxt_length; /* length of the itxt string */
-   png_charp lang;         /* language code, 0-79 characters
-                              or a NULL pointer */
-   png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more
-                              chars or a NULL pointer */
-} png_text_compat;
-
-typedef struct cleanup_info {
-    Tcl_Interp *interp;
-    jmp_buf jmpbuf;
-} cleanup_info;
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int CommonMatchPNG _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	int *heightPtr));
-
-static int CommonReadPNG _ANSI_ARGS_((png_structp png_ptr,
-        Tcl_Interp* interp, Tcl_Obj *format,
-	Tk_PhotoHandle imageHandle, int destX, int destY, int width,
-	int height, int srcX, int srcY));
-
-static int CommonWritePNG _ANSI_ARGS_((Tcl_Interp *interp, png_structp png_ptr,
-	png_infop info_ptr, Tcl_Obj *format,
-	Tk_PhotoImageBlock *blockPtr));
-
-static void tk_png_error _ANSI_ARGS_((png_structp, png_const_charp));
-
-static void tk_png_warning _ANSI_ARGS_((png_structp, png_const_charp));
-
-static int load_png_library _ANSI_ARGS_((Tcl_Interp *interp));
-
-/*
- * These functions are used for all Input/Output.
- */
-
-static void	tk_png_read _ANSI_ARGS_((png_structp, png_bytep,
-		    png_size_t));
-
-static void	tk_png_write _ANSI_ARGS_((png_structp, png_bytep,
-		    png_size_t));
-
-static void	tk_png_flush _ANSI_ARGS_((png_structp));
-
-/*
- *
- */
-
-static int
-SetupPngLibrary (interp)
-    Tcl_Interp *interp;
-{
-    if (Pngtcl_InitStubs(interp, PNGTCL_VERSION, 0) == NULL) {
-        return TCL_ERROR;
-    }
-    return TCL_OK;
-}
-
-static void
-tk_png_error(png_ptr, error_msg)
-    png_structp png_ptr;
-    png_const_charp error_msg;
-{
-    cleanup_info *info = (cleanup_info *) png_get_error_ptr(png_ptr);
-    Tcl_AppendResult(info->interp, error_msg, (char *) NULL);
-    longjmp(info->jmpbuf,1);
-}
-
-static void
-tk_png_warning(png_ptr, error_msg)
-    png_structp png_ptr;
-    png_const_charp error_msg;
-{
-    return;
-}
-
-static void
-tk_png_read(png_ptr, data, length)
-    png_structp png_ptr;
-    png_bytep data;
-    png_size_t length;
-{
-    if (tkimg_Read((tkimg_MFile *) png_get_progressive_ptr(png_ptr),
-	    (char *) data, (size_t) length) != (int) length) {
-	png_error(png_ptr, "Read Error");
-    }
-}
-
-static void
-tk_png_write(png_ptr, data, length)
-    png_structp png_ptr;
-    png_bytep data;
-    png_size_t length;
-{
-    if (tkimg_Write((tkimg_MFile *) png_get_progressive_ptr(png_ptr),
-	    (char *) data, (size_t) length) != (int) length) {
-	png_error(png_ptr, "Write Error");
-    }
-}
-
-static void
-tk_png_flush(png_ptr)
-    png_structp png_ptr;
-{
-}
-
-static int
-ChnMatch (interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatchPNG(&handle, widthPtr, heightPtr);
-}
-
-static int
-ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data,'\211',&handle)) {
-	return 0;
-    }
-    return CommonMatchPNG(&handle, widthPtr, heightPtr);
-}
-
-static int
-CommonMatchPNG(handle, widthPtr, heightPtr)
-    tkimg_MFile *handle;
-    int *widthPtr, *heightPtr;
-{
-    unsigned char buf[8];
-
-    if ((tkimg_Read(handle, (char *) buf, 8) != 8)
-	    || (strncmp("\211\120\116\107\15\12\32\12", (char *) buf, 8) != 0)
-	    || (tkimg_Read(handle, (char *) buf, 8) != 8)
-	    || (strncmp("\111\110\104\122", (char *) buf+4, 4) != 0)
-	    || (tkimg_Read(handle, (char *) buf, 8) != 8)) {
-	return 0;
-    }
-    *widthPtr = (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + buf[3];
-    *heightPtr = (buf[4]<<24) + (buf[5]<<16) + (buf[6]<<8) + buf[7];
-    return 1;
-}
-
-static int
-ChnRead (interp, chan, fileName, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    png_structp png_ptr;
-    tkimg_MFile handle;
-    cleanup_info cleanup;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    cleanup.interp = interp;
-
-    png_ptr=png_create_read_struct(PNG_LIBPNG_VER_STRING,
-	    (png_voidp) &cleanup,tk_png_error,tk_png_warning);
-    if (!png_ptr) return(0); 
-
-    png_set_read_fn(png_ptr, (png_voidp) &handle, tk_png_read);
-
-    return CommonReadPNG(png_ptr, interp, format, imageHandle, destX, destY,
-	    width, height, srcX, srcY);
-}
-
-static int
-ObjRead (interp, dataObj, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *dataObj;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    png_structp png_ptr;
-    tkimg_MFile handle;
-    cleanup_info cleanup;
-
-    cleanup.interp = interp;
-
-    png_ptr=png_create_read_struct(PNG_LIBPNG_VER_STRING,
-	    (png_voidp) &cleanup,tk_png_error,tk_png_warning);
-    if (!png_ptr) return TCL_ERROR; 
-
-    tkimg_ReadInit(dataObj,'\211',&handle);
-
-    png_set_read_fn(png_ptr,(png_voidp) &handle, tk_png_read);
-
-    return CommonReadPNG(png_ptr, interp, format, imageHandle, destX, destY,
-	    width, height, srcX, srcY);
-}
-
-static int
-CommonReadPNG(png_ptr, interp, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    png_structp png_ptr;
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-#define block bl.ck
-    png_infop info_ptr;
-    png_infop end_info;
-    char **png_data = NULL;
-    myblock bl;
-    unsigned int I;
-    png_uint_32 info_width, info_height;
-    int bit_depth, color_type, interlace_type;
-    int intent;
-
-    info_ptr=png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-	png_destroy_read_struct(&png_ptr,NULL,NULL);
-	return(TCL_ERROR);
-    }
-
-    end_info=png_create_info_struct(png_ptr);
-    if (!end_info) {
-	png_destroy_read_struct(&png_ptr,&info_ptr,NULL);
-	return(TCL_ERROR);
-    }
-
-    if (setjmp((((cleanup_info *) png_get_error_ptr(png_ptr))->jmpbuf))) {
-	if (png_data) {
-	    ckfree((char *)png_data);
-	}
-	png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
-	return TCL_ERROR;
-    }
-
-    png_read_info(png_ptr,info_ptr);
-
-    png_get_IHDR(png_ptr, info_ptr, &info_width, &info_height, &bit_depth,
-	&color_type, &interlace_type, (int *) NULL, (int *) NULL);
-
-    if ((srcX + width) > (int) info_width) {
-	width = info_width - srcX;
-    }
-    if ((srcY + height) > (int) info_height) {
-	height = info_height - srcY;
-    }
-    if ((width <= 0) || (height <= 0)
-	|| (srcX >= (int) info_width)
-	|| (srcY >= (int) info_height)) {
-	return TCL_OK;
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    Tk_PhotoGetImage(imageHandle, &block);
-
-    if (png_set_strip_16 != NULL) {
-	png_set_strip_16(png_ptr);
-    } else if (bit_depth == 16) {
-	block.offset[1] = 2;
-	block.offset[2] = 4;
-    }
-
-    if (png_set_expand != NULL) {
-	png_set_expand(png_ptr);
-    }
-
-    png_read_update_info(png_ptr,info_ptr);
-    block.pixelSize = png_get_channels(png_ptr, info_ptr);
-    block.pitch = png_get_rowbytes(png_ptr, info_ptr);
-
-    if ((color_type & PNG_COLOR_MASK_COLOR) == 0) {
-	/* grayscale image */
-	block.offset[1] = 0;
-	block.offset[2] = 0;
-    }
-    block.width = width;
-    block.height = height;
-
-    if ((color_type & PNG_COLOR_MASK_ALPHA)
-	    || png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
-	/* with alpha channel */
-	block.offset[3] = block.pixelSize - 1;
-    } else {
-	/* without alpha channel */
-	block.offset[3] = 0;
-    }
-
-    if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) {
-	png_set_sRGB(png_ptr, info_ptr, intent);
-    } else if (png_get_gAMA) {
-	double gamma;
-	if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
-	    gamma = 0.45455;
-	}
-	png_set_gamma(png_ptr, 1.0, gamma);
-    }
-
-    png_data= (char **) ckalloc(sizeof(char *) * info_height +
-	    info_height * block.pitch);
-
-    for(I=0;I<info_height;I++) {
-	png_data[I]= ((char *) png_data) + (sizeof(char *) * info_height +
-		I * block.pitch);
-    }
-    block.pixelPtr=(unsigned char *) (png_data[srcY]+srcX*block.pixelSize);
-
-    png_read_image(png_ptr,(png_bytepp) png_data);
-
-    tkimg_PhotoPutBlock(imageHandle,&block,destX,destY,width,height);
-
-    ckfree((char *) png_data);
-    png_destroy_read_struct(&png_ptr,&info_ptr,&end_info);
-
-    return(TCL_OK);
-}
-
-static int
-ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    png_structp png_ptr;
-    png_infop info_ptr;
-    tkimg_MFile handle;
-    int result;
-    cleanup_info cleanup;
-    Tcl_Channel chan = (Tcl_Channel) NULL;
-
-    chan = tkimg_OpenFileChannel(interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    cleanup.interp = interp;
-
-    png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING,
-	    (png_voidp) &cleanup,tk_png_error,tk_png_warning);
-    if (!png_ptr) {
-	Tcl_Close(NULL, chan);
-	return TCL_ERROR;
-    }
-
-    info_ptr=png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-	png_destroy_write_struct(&png_ptr,NULL);
-	Tcl_Close(NULL, chan);
-	return TCL_ERROR;
-    }
-
-    png_set_write_fn(png_ptr,(png_voidp) &handle, tk_png_write, tk_png_flush);
-
-    result = CommonWritePNG(interp, png_ptr, info_ptr, format, blockPtr);
-    Tcl_Close(NULL, chan);
-    return result;
-}
-
-static int
-StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    png_structp png_ptr;
-    png_infop info_ptr;
-    tkimg_MFile handle;
-    int result;
-    cleanup_info cleanup;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    cleanup.interp = interp;
-
-    png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING,
-	    (png_voidp) &cleanup, tk_png_error, tk_png_warning);
-    if (!png_ptr) {
-	return TCL_ERROR;
-    }
-
-    info_ptr = png_create_info_struct(png_ptr);
-    if (!info_ptr) {
-	png_destroy_write_struct(&png_ptr,NULL);
-	return TCL_ERROR;
-    }
-
-    png_set_write_fn(png_ptr, (png_voidp) &handle, tk_png_write, tk_png_flush);
-
-    tkimg_WriteInit(dataPtr, &handle);
-
-    result = CommonWritePNG(interp, png_ptr, info_ptr, format, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-static int
-CommonWritePNG(interp, png_ptr, info_ptr, format, blockPtr)
-    Tcl_Interp *interp;
-    png_structp png_ptr;
-    png_infop info_ptr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int greenOffset, blueOffset, alphaOffset;
-    int tagcount = 0;
-    Tcl_Obj **tags = (Tcl_Obj **) NULL;
-    int I, pass, number_passes, color_type;  
-    int newPixelSize;
-    png_bytep row_pointers = (png_bytep) NULL;
-
-    if (tkimg_ListObjGetElements(interp, format, &tagcount, &tags) != TCL_OK) {
-	return TCL_ERROR;
-    }
-    tagcount = (tagcount > 1) ? (tagcount/2 - 1) : 0;
-
-    if (setjmp((((cleanup_info *) png_get_error_ptr(png_ptr))->jmpbuf))) {
-	if (row_pointers) {
-	    ckfree((char *) row_pointers);
-	}
-	png_destroy_write_struct(&png_ptr,&info_ptr);
-	return TCL_ERROR;
-    }
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[2]) {
-	alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-
-    if (greenOffset || blueOffset) {
-	color_type = PNG_COLOR_TYPE_RGB;
-	newPixelSize = 3;
-    } else {
-	color_type = PNG_COLOR_TYPE_GRAY;
-	newPixelSize = 1;
-    }
-    if (alphaOffset) {
-	color_type |= PNG_COLOR_MASK_ALPHA;
-	newPixelSize++;
-#if 0 /* The function png_set_filler doesn't seem to work; don't known why :-( */
-    } else if ((blockPtr->pixelSize==4) && (newPixelSize == 3)
-	    && (png_set_filler != NULL)) {
-	/*
-	 * The set_filler() function doesn't need to be called
-	 * because the code below can handle all necessary
-	 * re-allocation of memory. Only it is more economically
-	 * to let the PNG library do that, which is only
-	 * possible with v0.95 and higher.
-	 */
-	png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
-	newPixelSize++;
-#endif
-    }
-
-    png_set_IHDR(png_ptr, info_ptr, blockPtr->width, blockPtr->height, 8,
-	    color_type, PNG_INTERLACE_ADAM7, PNG_COMPRESSION_TYPE_BASE,
-	    PNG_FILTER_TYPE_BASE);
-
-    if (png_set_gAMA) {
-	png_set_gAMA(png_ptr, info_ptr, 1.0);
-    }
-
-    if (tagcount > 0) {
-	png_text_compat text;
-	for(I=0;I<tagcount;I++) {
-	    int length;
-	    text.key = Tcl_GetStringFromObj(tags[2*I+1], (int *) NULL);
-	    text.text = Tcl_GetStringFromObj(tags[2*I+2], &length);
-	    text.text_length = length;
-	    if (text.text_length>COMPRESS_THRESHOLD) { 
-		text.compression = PNG_TEXT_COMPRESSION_zTXt;
-	    } else {
-		text.compression = PNG_TEXT_COMPRESSION_NONE;
-	    }
-	    text.lang = NULL;
-	    png_set_text(png_ptr, info_ptr, (png_text *) &text, 1);
-        }
-    }
-    png_write_info(png_ptr,info_ptr);
-
-    number_passes = png_set_interlace_handling(png_ptr);
-
-    if (blockPtr->pixelSize != newPixelSize) {
-	int J, oldPixelSize;
-	png_bytep src, dst;
-	oldPixelSize = blockPtr->pixelSize;
-	row_pointers = (png_bytep)
-		ckalloc(blockPtr->width * newPixelSize);
-	for (pass = 0; pass < number_passes; pass++) {
-	    for(I=0; I<blockPtr->height; I++) {
-		src = (png_bytep) blockPtr->pixelPtr
-			+ I * blockPtr->pitch + blockPtr->offset[0];
-		dst = row_pointers;
-		for (J = blockPtr->width; J > 0; J--) {
-		    memcpy(dst, src, newPixelSize);
-		    src += oldPixelSize;
-		    dst += newPixelSize;
-		}
-		png_write_row(png_ptr, row_pointers);
-	    }
-	}
-	ckfree((char *) row_pointers);
-	row_pointers = NULL;
-    } else {
-	for (pass = 0; pass < number_passes; pass++) {
-	    for(I=0;I<blockPtr->height;I++) {
-		png_write_row(png_ptr, (png_bytep) blockPtr->pixelPtr
-			+ I * blockPtr->pitch + blockPtr->offset[0]);
-	    }
-	}
-    }
-    png_write_end(png_ptr,NULL);
-    png_destroy_write_struct(&png_ptr,&info_ptr);
-
-    return(TCL_OK);
-}
diff --git a/tkimg1.3/png/tests/all.tcl b/tkimg1.3/png/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/png/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/png/tests/folder.png b/tkimg1.3/png/tests/folder.png
deleted file mode 100644
index 8e31c72..0000000
Binary files a/tkimg1.3/png/tests/folder.png and /dev/null differ
diff --git a/tkimg1.3/png/tests/png.test b/tkimg1.3/png/tests/png.test
deleted file mode 100644
index f104bad..0000000
--- a/tkimg1.3/png/tests/png.test
+++ /dev/null
@@ -1,45 +0,0 @@
-# This file is a Tcl script to test out PNG reading and writing.
-# It is organized in the standard fasion for Tcl tests.
-#
-
-puts "img::png [package require img::png]"
-
-set pngdata \
-{iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAIAAAGTgppAAAAABGdBTUEAAYagMeiWXwAAAHxJ
-REFUeJyVUMERgDAIC54D+HMDmanbuI0zxQ38uYE+uALW66N5UUISqJCE4X52ACBZS2umPkCS
-pPjAdZYJCUJy3Q57LLK7vURChdEfeWulqh4dRLa6zhJEE+B0N2OcEFtGVXNYvrQV9JwauH7G
-76f+WCQGurv2MCwYvuEFQANGc1+HFcEAAAAASUVORK5CYII=}
-
-test png-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.png]
-    i data -format png
-} $pngdata
-test png-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $pngdata
-    set data [i data -format png]
-} $pngdata
-test png-1.3 {} {
-    i blank
-    i put $data
-    set data [i data -format png]
-} $pngdata
-test png-1.4 {} {
-    i blank
-    i put $data -format png
-    set data [i data -format png]
-} $pngdata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test png-2.0 {Binary I/O with PNG images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.png] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/ppm/ChangeLog b/tkimg1.3/ppm/ChangeLog
deleted file mode 100644
index 435f3fb..0000000
--- a/tkimg1.3/ppm/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/ppm: PPM photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/ppm/Makefile.in b/tkimg1.3/ppm/Makefile.in
deleted file mode 100644
index 4e95f7f..0000000
--- a/tkimg1.3/ppm/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgppm TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgppm_SOURCES	=	\
-		ppm.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgppm_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgppm_OBJECTS	= $(tkimgppm_SOURCES:.c=. at OBJEXT@)
-tkimgppm_LIB_FILE	= @tkimgppm_LIB_FILE@
-
-## tkimgppmstub_OBJECTS	= tkimgppmStubLib.$(OBJEXT)
-## tkimgppmstub_LIB_FILE= @tkimgppmstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgppm_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgppm_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgppm.$(OBJEXT): $(srcdir)/generic/tkimgppm.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgppm.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgppm/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgppmConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgppm.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgppm_DECLS = \
-	$(srcdir)/tkimgppm.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgppm_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgppm_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/ppm/aclocal.m4 b/tkimg1.3/ppm/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/ppm/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/ppm/configure b/tkimg1.3/ppm/configure
deleted file mode 100755
index b90f1fd..0000000
--- a/tkimg1.3/ppm/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgppm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./ppm.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgppm
-DPACKAGE="img::ppm"
-PHIMGTYPE="ppm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPPM_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgppmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGPPM_VERSION "${TKIMGPPM_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgppm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgppm 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGPPM_VERSION@%$TKIMGPPM_VERSION%g
-s%@tkimgppm_LIB_FILE@%$tkimgppm_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ppm/configure.in b/tkimg1.3/ppm/configure.in
deleted file mode 100644
index eaecda0..0000000
--- a/tkimg1.3/ppm/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgppm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./ppm.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgppm
-DPACKAGE="img::ppm"
-PHIMGTYPE="ppm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPPM_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGPPM_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgppm_LIB_FILE)
-#AC_SUBST(tkimgppmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGPPM_VERSION, "${TKIMGPPM_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgppm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgppm)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ppm/pkgIndex.tcl.in b/tkimg1.3/ppm/pkgIndex.tcl.in
deleted file mode 100644
index c960077..0000000
--- a/tkimg1.3/ppm/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgppm_LIB_FILE@]]
diff --git a/tkimg1.3/ppm/ppm.c b/tkimg1.3/ppm/ppm.c
deleted file mode 100644
index c583e1b..0000000
--- a/tkimg1.3/ppm/ppm.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/* STARTHEADER
- *
- * File :       ppm.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Mon Jan 22 21:32:48 CET 2001
- *
- * Copyright :  (C) 2001-2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for the PPM RAW image file format.
- *
- * The following image types are supported:
- *
- *  8-bit pixels: Grayscale, also known as PGM.
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- *  8-bit | Yes   | Yes   | Yes   | Yes   |
- * 24-bit | Yes   | Yes   | Yes   | Yes   |
- *
- * PPM Ascii format is not supported yet.
- *
- *
- * No format options are available.
- *
- * Notes: 
- *
- * - Part of this code was taken from Tk's tkImgPPM.c:
- *
- *  >> tkImgPPM.c --
- *  >>
- *  >>	A photo image file handler for PPM (Portable PixMap) files.
- *  >>
- *  >> Copyright (c) 1994 The Australian National University.
- *  >> Copyright (c) 1994-1997 Sun Microsystems, Inc.
- *  >>
- *  >> See the file "license.terms" for information on usage and redistribution
- *  >> of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *  >>
- *  >> Author: Paul Mackerras (paulus at cs.anu.edu.au),
- *  >>	   Department of Computer Science,
- *  >>	   Australian National University.
- *
- * ENDHEADER
- *
- * $Id: ppm.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* #define DEBUG_LOCAL */
-
-/*
- * The maximum amount of memory to allocate for data read from the
- * file.  If we need more than this, we do it in pieces.
- */
-
-#define MAX_MEMORY	10000		/* don't allocate > 10KB */
-
-/*
- * Define PGM and PPM, i.e. gray images and color images.
- */
-
-#define PGM 1
-#define PPM 2
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-                int *heightPtr, int *maxIntensityPtr));
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-                CONST char *filename, Tcl_Obj *format,
-                Tk_PhotoHandle imageHandle, int destX, int destY,
-                int width, int height, int srcX, int srcY));
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp,
-                CONST char *filename, Tcl_Obj *format,
-                tkimg_MFile *handle, Tk_PhotoImageBlock *blockPtr));
-static int ReadPPMFileHeader _ANSI_ARGS_((tkimg_MFile *handle,
-		int *widthPtr, int *heightPtr, int *maxIntensityPtr));
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a file contains image data in PPM format.
- *
- * Results:
- *	The return value is >0 if the first characters in file "f" look
- *	like PPM data, and 0 otherwise.
- *
- * Side effects:
- *	The access position in f may change.
- *
- *----------------------------------------------------------------------
- */
-
-static int ChnMatch (interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image file, open for reading. */
-    CONST char *filename;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw PPM file. */
-{
-    tkimg_MFile handle;
-    int   dummy;
-
-    tkimg_FixChanMatchProc (&interp, &chan, &filename, &format,
-                         &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;    
-
-    return CommonMatch (&handle, widthPtr, heightPtr, &dummy);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-    int   dummy;
-
-    tkimg_FixObjMatchProc (&interp, &data, &format, &widthPtr, &heightPtr);
-
-    tkimg_ReadInit(data, 'P', &handle);
-    return CommonMatch (&handle, widthPtr, heightPtr, &dummy);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, maxIntensityPtr)
-    tkimg_MFile *handle;
-    int *widthPtr;
-    int *heightPtr;
-    int *maxIntensityPtr;
-{
-    return ReadPPMFileHeader (handle, widthPtr, heightPtr, maxIntensityPtr);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnRead --
- *
- *	This procedure is called by the photo image type to read
- *	PPM format data from a file and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- * Side effects:
- *	The access position in file f is changed, and new data is
- *	added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int ChnRead (interp, chan, filename, format, imageHandle, 
-                    destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image file, open for reading. */
-    CONST char *filename;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format, imageHandle,
-                       destX, destY, width, height, srcX, srcY);
-}
-
-static int ObjRead (interp, data, format, imageHandle,
-                    destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit (data, 'P', &handle);
-    return CommonRead (interp, &handle, "InlineData", format, imageHandle,
-                       destX, destY, width, height, srcX, srcY);
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-                  included already in Tk_PhotoImageBlock */
-} myblock;
-#define block bl.ck
-
-static int CommonRead (interp, handle, filename, format, imageHandle, 
-                       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;		/* The image file, open for reading. */
-    CONST char *filename;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    int fileWidth, fileHeight, maxIntensity;
-    int nLines, nBytes, h, type, count;
-    unsigned char *pixelPtr;
-    myblock bl;
-
-    type = ReadPPMFileHeader (handle, &fileWidth, &fileHeight, &maxIntensity);
-    if (type == 0) {
-	Tcl_AppendResult (interp, "couldn't read raw PPM header from file \"",
-			  filename, "\"", NULL);
-	return TCL_ERROR;
-    }
-
-    if ((fileWidth <= 0) || (fileHeight <= 0)) {
-	Tcl_AppendResult (interp, "PPM image file \"", filename,
-			  "\" has dimension(s) <= 0", (char *) NULL);
-	return TCL_ERROR;
-    }
-    if ((maxIntensity <= 0) || (maxIntensity >= 256)) {
-	char buffer[TCL_INTEGER_SPACE];
-
-	sprintf(buffer, "%d", maxIntensity);
-	Tcl_AppendResult (interp, "PPM image file \"", filename,
-			  "\" has bad maximum intensity value ", buffer,
-			  (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    if (type == PGM) {
-        block.pixelSize = 1;
-        block.offset[0] = 0;
-	block.offset[1] = 0;
-	block.offset[2] = 0;
-    }
-    else {
-        block.pixelSize = 3;
-        block.offset[0] = 0;
-	block.offset[1] = 1;
-	block.offset[2] = 2;
-    }
-    block.offset[3] = 0;
-    block.width = width;
-    block.pitch = block.pixelSize * fileWidth;
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    if (srcY > 0) {
- 	/* Don't read the whole image. Skip first "srcY" lines. */
-	pixelPtr = (unsigned char *) ckalloc((unsigned) block.pitch);
-	for (h=0; h<srcY; h++) {
-	    if (block.pitch != tkimg_Read (handle, pixelPtr, block.pitch)) {
-		Tcl_AppendResult (interp, "Error reading PPM image file \"",
-				  filename, "\": ", (char *) NULL);
-		ckfree((char *) pixelPtr);
-		return TCL_ERROR;
-	    }
-	}
-	ckfree ((char *)pixelPtr);
-    }
-
-    nLines = (MAX_MEMORY + block.pitch - 1) / block.pitch;
-    if (nLines > height) {
-	nLines = height;
-    }
-    if (nLines <= 0) {
-	nLines = 1;
-    }
-    nBytes = nLines * block.pitch;
-    pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes);
-    block.pixelPtr = pixelPtr + srcX * block.pixelSize;
-
-    for (h = height; h > 0; h -= nLines) {
-	if (nLines > h) {
-	    nLines = h;
-	    nBytes = nLines * block.pitch;
-	}
-	count = tkimg_Read (handle, (char *) pixelPtr, nBytes);
-	if (count != nBytes) {
-	    Tcl_AppendResult (interp, "Error reading PPM image file \"",
-		    filename, "\": ", (char *) NULL);
-	    ckfree((char *) pixelPtr);
-	    return TCL_ERROR;
-	}
-	if (maxIntensity != 255) {
-	    unsigned char *p;
-
-	    for (p = pixelPtr; count > 0; count--, p++) {
-		*p = (((int) *p) * 255)/maxIntensity;
-	    }
-	}
-	block.height = nLines;
-	tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, destY, width, nLines);
-	destY += nLines;
-    }
-
-    ckfree((char *) pixelPtr);
-    return TCL_OK;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnWrite --
- *
- *	This procedure is invoked to write image data to a file in PPM
- *	format.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in the interp's result.
- *
- * Side effects:
- *	Data is written to the file given by "filename".
- *
- *----------------------------------------------------------------------
- */
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel (interp, filename, 0644);
-    if (!chan) {
-        return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, filename, format, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-        return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc (&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit (dataPtr, &handle);
-    result = CommonWrite (interp, "InlineData", format, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-        Tcl_DStringResult (interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, filename, format, handle, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int w, h;
-    int redOff, greenOff, blueOff, nBytes;
-    unsigned char *scanline, *scanlinePtr;
-    unsigned char *pixelPtr, *pixLinePtr;
-    char header[16 + TCL_INTEGER_SPACE * 2];
-
-    sprintf (header, "P6\n%d %d\n255\n", blockPtr->width, blockPtr->height);
-    if (tkimg_Write (handle, header, strlen (header)) != strlen (header)) {
-	goto writeerror;
-    }
-	
-    pixLinePtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    redOff     = 0;
-    greenOff   = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOff    = blockPtr->offset[2] - blockPtr->offset[0];
-
-    nBytes = blockPtr->width * 3; /* Only RGB images allowed. */
-    scanline = (unsigned char *) ckalloc((unsigned) nBytes);
-    for (h = blockPtr->height; h > 0; h--) {
-	pixelPtr = pixLinePtr;
-	scanlinePtr = scanline;
-	for (w = blockPtr->width; w > 0; w--) {
-	    *(scanlinePtr++) = pixelPtr[redOff];	
-	    *(scanlinePtr++) = pixelPtr[greenOff];	
-	    *(scanlinePtr++) = pixelPtr[blueOff];	
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (tkimg_Write (handle, (char *) scanline, nBytes) != nBytes) {
-	    goto writeerror;
-	}
-	pixLinePtr += blockPtr->pitch;
-    }
-    ckfree ((char *) scanline);
-    return TCL_OK;
-
- writeerror:
-    Tcl_AppendResult (interp, "Error writing \"", filename, "\": ", 
-                      (char *) NULL);
-    return TCL_ERROR;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ReadPPMFileHeader --
- *
- *	This procedure reads the PPM header from the beginning of a
- *	PPM file and returns information from the header.
- *
- * Results:
- *	The return value is PGM if file "f" appears to start with
- *	a valid PGM header, PPM if "f" appears to start with a valid
- *      PPM header, and 0 otherwise.  If the header is valid,
- *	then *widthPtr and *heightPtr are modified to hold the
- *	dimensions of the image and *maxIntensityPtr is modified to
- *	hold the value of a "fully on" intensity value.
- *
- * Side effects:
- *	The access position in f advances.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ReadPPMFileHeader (handle, widthPtr, heightPtr, maxIntensityPtr)
-    tkimg_MFile *handle;	/* Image file to read the header from */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here. */
-    int *maxIntensityPtr;	/* The maximum intensity value for
-				 * the image is stored here. */
-{
-#define BUFFER_SIZE 1000
-    char buffer[BUFFER_SIZE];
-    int i, numFields;
-    int type = 0;
-    char c;
-
-    /*
-     * Read 4 space-separated fields from the file, ignoring
-     * comments (any line that starts with "#").
-     */
-
-    if (tkimg_Read (handle, &c, 1) != 1) {
-	return 0;
-    }
-    i = 0;
-    for (numFields = 0; numFields < 4; numFields++) {
-	/*
-	 * Skip comments and white space.
-	 */
-
-	while (1) {
-	    while (isspace((unsigned char)c)) {
-		if (tkimg_Read(handle, &c, 1) != 1) {
-		    return 0;
-		}
-	    }
-	    if (c != '#') {
-		break;
-	    }
-	    do {
-		if (tkimg_Read(handle, &c, 1) != 1) {
-		    return 0;
-		}
-	    } while (c != '\n');
-	}
-
-	/*
-	 * Read a field (everything up to the next white space).
-	 */
-
-	while (!isspace((unsigned char)c)) {
-	    if (i < (BUFFER_SIZE-2)) {
-		buffer[i] = c;
-		i++;
-	    }
-	    if (tkimg_Read(handle, &c, 1) != 1) {
-		goto done;
-	    }
-	}
-	if (i < (BUFFER_SIZE-1)) {
-	    buffer[i] = ' ';
-	    i++;
-	}
-    }
-    done:
-    buffer[i] = 0;
-
-    /*
-     * Parse the fields, which are: id, width, height, maxIntensity.
-     */
-
-    if (strncmp(buffer, "P6 ", 3) == 0) {
-	type = PPM;
-    } else if (strncmp(buffer, "P5 ", 3) == 0) {
-	type = PGM;
-    } else {
-	return 0;
-    }
-    if (sscanf(buffer+3, "%d %d %d", widthPtr, heightPtr, maxIntensityPtr)
-	    != 3) {
-	return 0;
-    }
-    return type;
-}
diff --git a/tkimg1.3/ppm/readme b/tkimg1.3/ppm/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/ppm/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/ppm/tests/all.tcl b/tkimg1.3/ppm/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/ppm/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/ppm/tests/hori_ascii.ppm b/tkimg1.3/ppm/tests/hori_ascii.ppm
deleted file mode 100644
index 75fb4fd..0000000
--- a/tkimg1.3/ppm/tests/hori_ascii.ppm
+++ /dev/null
@@ -1,2956 +0,0 @@
-P3
-# CREATOR: The GIMP's PNM Filter Version 1.0
-82 12
-255
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-255
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-255
-0
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-0
-0
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-255
-255
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
-223
-219
-223
diff --git a/tkimg1.3/ppm/tests/hori_raw.ppm b/tkimg1.3/ppm/tests/hori_raw.ppm
deleted file mode 100644
index a2a65dd..0000000
Binary files a/tkimg1.3/ppm/tests/hori_raw.ppm and /dev/null differ
diff --git a/tkimg1.3/ppm/tests/ppm.test b/tkimg1.3/ppm/tests/ppm.test
deleted file mode 100644
index bd55496..0000000
--- a/tkimg1.3/ppm/tests/ppm.test
+++ /dev/null
@@ -1,96 +0,0 @@
-# This file is a Tcl script to test out PPM reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::ppm [package require img::ppm]"
-
-set ppmdata \
-{UDYKODIgMTIKMjU1Ct/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b3wAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////////////////////////////wAAAP8A
-AP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/
-AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD//wD//wD//wD//wD//wD//wD/
-/wD//wD//wAAAP8A//8A//8A//8A//8A//8A//8A//8A//8A/wAAAP//AP//AP//AP//AP//
-AP//AP//AP//AP//AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//
-/////////////////////////////////wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8A
-AAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA
-/wAA/wAA/wAAAAD//wD//wD//wD//wD//wD//wD//wD//wD//wAAAP8A//8A//8A//8A//8A
-//8A//8A//8A//8A/wAAAP//AP//AP//AP//AP//AP//AP//AP//AP//AAAAAN/b39/b3wAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////
-/wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/
-AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD//wD//wD//wD//wD/
-/wD//wD//wD//wD//wAAAP8A//8A//8A//8A//8A//8A//8A//8A//8A/wAAAP//AP//AP//
-AP//AP//AP//AP//AP//AP//AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAP///////////////////////////////////wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8A
-AP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA
-/wAA/wAA/wAA/wAA/wAAAAD//wD//wD//wD//wD//wD//wD//wD//wD//wAAAP8A//8A//8A
-//8A//8A//8A//8A//8A//8A/wAAAP//AP//AP//AP//AP//AP//AP//AP//AP//AAAAAN/b
-39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////
-/////////wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/
-AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD//wD//wD/
-/wD//wD//wD//wD//wD//wD//wAAAP8A//8A//8A//8A//8A//8A//8A//8A//8A/wAAAP//
-AP//AP//AP//AP//AP//AP//AP//AP//AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAP///////////////////////////////////wAAAP8AAP8AAP8AAP8AAP8A
-AP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA
-/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD//wD//wD//wD//wD//wD//wD//wD//wD//wAAAP8A
-//8A//8A//8A//8A//8A//8A//8A//8A/wAAAP//AP//AP//AP//AP//AP//AP//AP//AP//
-AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////
-/////////////////wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/
-AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD/
-/wD//wD//wD//wD//wD//wD//wD//wD//wAAAP8A//8A//8A//8A//8A//8A//8A//8A//8A
-/wAAAP//AP//AP//AP//AP//AP//AP//AP//AP//AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAP///////////////////////////////////wAAAP8AAP8AAP8A
-AP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA
-/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAD//wD//wD//wD//wD//wD//wD//wD//wD/
-/wAAAP8A//8A//8A//8A//8A//8A//8A//8A//8A/wAAAP//AP//AP//AP//AP//AP//AP//
-AP//AP//AAAAAN/b39/b3wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////
-/////////////////////////wAAAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAP8AAAAAAAD/
-AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA
-/wAAAAD//wD//wD//wD//wD//wD//wD//wD//wD//wAAAP8A//8A//8A//8A//8A//8A//8A
-//8A//8A/wAAAP//AP//AP//AP//AP//AP//AP//AP//AP//AAAAAN/b39/b3wAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAN/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b
-39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b39/b3w==}
-
-
-test ppm-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory hori_raw.ppm]
-    i data -format ppm
-} $ppmdata
-test ppm-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $ppmdata
-    set data [i data -format ppm]
-} $ppmdata
-test ppm-1.3 {} {
-    i blank
-    i put $ppmdata
-    set data [i data -format ppm]
-} $ppmdata
-test ppm-1.4 {} {
-    i blank
-    i put $ppmdata -format ppm
-    set data [i data -format ppm]
-} $ppmdata
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test ppm-2.0 {Binary I/O with PPM images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory hori_raw.ppm] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/ppm/tests/teapot.ppm b/tkimg1.3/ppm/tests/teapot.ppm
deleted file mode 100644
index b8ab85f..0000000
--- a/tkimg1.3/ppm/tests/teapot.ppm
+++ /dev/null
@@ -1,31 +0,0 @@
-P6
-256 256
-255
-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[7 eOLjQLmSMoTMnSMlRMhPL_9 \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀnSMtVMzYN~[N~[N\N\O€\O€]O€]O€]O€]O€\O€\O}[NyYNtVM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-wXN}[N€]O„^O†_O†`O‡`Oˆ`Oˆ`OˆaO‰aO‰aO‰aO‰aO‰aO‰aOˆaOˆ`O†_Oƒ^O\N\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaMLyYN…_O‰aP‹bPcPŽcPŽdPŽdPdPdPdPdPdPdPdPeP‘eP’eP’eP‘ePdPcP…_OpUM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN…_OdP“fP•gQ–hQ˜hQ˜iQ™iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœjQœjQœjQ›jQœjQ™iQ“fP‡`O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJiQL‹bP—hQkQ¡mR¤nR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦pR¨pS©qSªqS«rS¬rS«rS©qS¤oRœjQ€]O\KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀfOLrUMcPŸlR©qS¯tS²uTµwT·xT¸xT¹yTºyT»zT»zU¼zU¼zU¼zU»zUºyT¸xT¶wT¯tS¡mR‰aOhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àa0	cNLqUM€\O”fQ¦pS²wVºzV¿|VÂ}VÄVÆVÇ€VÉ‚WÌ…[Տeæ w÷³‹êª…Ĉg§qT“fQ{ZNYIK9\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀO1{G#‘JkRMqUMtVN–iS¨v\·€d¹bµzZ±vU°uT®sSªqS¤nRœjQ’eP„^OrUMHh>!T4\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-V5wE"~I#†M%U+¥e7²l:°g2®b*­a(­`(©^(¥])¡^-›]1ŠS,qC$`9 R3G-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@)J/i>!pA"tD"wF$yH&xH&tE$wE#yG%}M+ƒT4S5mE*Z7!K/B*;'\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‰aO¦oR½{UÇ€VÏ…X<(F-a: e<!h>!j@#k@$h>"d<!c=$hD-fF2[<)K0@);'5$Ë‚VÇ€V¿|U_LKYIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À…_O·xTÉ‚Wó«€ûµ‹Ö’k¼|X×>µf-¨^(¡Z'šW&–T&œN>)F-J/b; g>#nD(jB&c<!b=%jH2_A/I0!<(8&5$”J¥Y’S%8&;'?)E,<:HA=HE?IJAISFJYIKXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À£nRÁ}UܘqÊŠe±vU²e,™V&¥V†C
€@|>y<u:r9o7l6
-j5
-h4
-g3
-5$D,K/b; h>"wM1tK.e="a<#cA,U8&E-<(9&.!a0	b1	c1				
-
-+3#@)46G<:HMCIXHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀU*´vT¿~X¸{YÃk+›W&‰N$|>u:p8k5
-f3
-a0	_/	].	[-	I¡\*ª_(‘LkRMmSMmSMnSMnSMD,R3W5mA"|O0|P1j?"c<!a=%Y7"N1F,;'NCJNCJNDJODJODJODJh>!a: X/K%         &4$+2F=;HPEJL&\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸlR¶xT­sTµd)ŠO$w;m6
-g3
-a0	Z-	\/T*Q(ŠHµm8kRMmSMnTMoTMpTMpUM15G15G05G04G04GpUMpTM5^9 d<!yF#O+€N,rC#qB"pB#k?"a: Z7 6ODJPDJPEJQEJQEJREJREJREJRFJSFJSFJSFJSFJe<!X/                - '0FªqS–gQ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À“fP¯tS mRR%Bf3
-^/	V+Q(L&I$r9 TlRMnSM46G47G47G46G46G46G46G46G36G36G25G25G15G04G/4F.3F   oA"ˆN$‹O%S)ŒR)”T&”T%‘R%ŠO$€J#xE# PDJQEJREJRFJSFJTFJTFJTGJUGJUGJUGJUGJVGJVGJVGJVGJVGJVGJY6N'                t;‹O$dP¥oRdP\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À¨pSkQ“S%x=[-	R)I$E"@    ”M¦]'pTM68G78G78G78G78G78G78G78G78G68G67G67G57G57G47G36G36G25Gp98eOLpUMtVMn7·f+½i,¾i*¿i*¾h*…B
ˆ`O~[NqUM[-	‰HUGJUGJVGJVGJVHJWHJWHJWHKWHKXHKXHKXHKXHKXHKXIKXIKXIKXIKXIKh>!Y0           W+].	s=‡M$dPŸlR\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀoTM¥oRdPvE"V+K%A 99   †F¤['qUMtVM99H:9H:9H:9H:9H:9H:9H:9H:9H:9H99H99H99H99H99H99H:9H;:H>;HB=HPDJ\JKmSMwXN|ZN°y[ᦆ֘uº{W¹yU¿€]Á„b­tU£nR—hQˆaO{ZNvWNtVMvXNwXNyYNzYN{ZN|ZN}[N}[N~[N~[N~[N~[N~[N~[N~[N}[N}[N{ZNzYNxXN…L$f3
-   I$L&P(U*\.	€J#\O›jQ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀžkR‰aOo9
L&C!:4   f3
-X&pUMuWMwXNxXN<:H<:H<:H<:H<;H<;H<;H<;H=;H=;H=;H=;H>;H>;H?<H@<HA=HC>HG at ILBIREJ[JKcNLjQL§pR±uTºzUÃ~VȁWË‚XÖŽcäsÒŽe¼{V²vT¨pSžkR•gQŒbP†_O‚^O]O€\O€\O€\O€\O€]O]O]O]O]O]O]O]O]O]O]O€\O€\O~\N}[N|ZNxXN•T%H$   G#K%Q(W+zG#nTM˜iQ\À\À\À\À\À\À\À\À\À\À\À\ÀdOLrUMuWNwXNyYN{ZN}[N{ZNwXNsVM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àˆ`OcPnA"M&@ 8F#   m6
-›W&rVMvWNyYNzYN|ZN}[N}[N><H?<H?<H?<H?<H?<H@<H@<H@<HA=HA=HB=HC>HE?IG at IIAIKBIODJSFJWHK—hQŸlR§pR°b(¾i*Én+Ù|7Û|6Ïr,Íq+Êp-Ãl+»g)±b(®sS§pS lRšiQ•gQePcPŠaPˆaO‡`O‡`O†_O†_O…_O…_O…_O…_O…_O…_O…_O„_O„^O„^Oƒ^Oƒ^O‚]O]O€\O~[N{ZN•T%   F#B!Y,L&U*~I#„^O†`O\À\À\À\ÀcNLrUMzYN\O„^Oˆ`OŠbPŒcPdPeP’fP“fP“fQ“fQ”fQ‘ePcP‰aP~[N \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’fPsVM^/	C!7
      ŽQ%tVMwXNzYN|ZN}[N\N\O€\O]O]O‚]O‚]OA=HB=HB=HB>HC>HC>ID?IE?IF at IG@IIAIKBIŒcPdP’eP–gQšiQŸlR£nR¤\'´d)¿i*Æm+Îs/Ïs/Êo+Én+Ål*¾i*ºg)³c(ª_(ªqS¦oR¡mRkQ™iQ•gQ“fP‘ePŽdPcPŒbP‹bPŠbPŠaP‰aP‰aO‰aOˆaOˆ`Oˆ`O‡`O‡`O‡`O†`O†_O…_O„^Oƒ^O‚]O\O}[N›Q  D"?D"K%_/	kRL’fPODJSFJ†_OŠbPŽcP‘eP“fQ–gQ™iQœjQžkR lR¡mR£nR¤nR¥oR¥oR¥oR¤nR¢mRŸlRšiQ‘eP…_O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀB+‘ePI#L&90   y<šPxXN{ZN}[N\N€\O]O‚]Oƒ^Oƒ^O„^O„_O…_O…_O†_O†`O‡`O‡`Oˆ`O‰aOŠaP‹bPŒbPcPŽdP‘eP“fP•gQ˜hQšiQžkR¢mR¡Z'«_(¶e)½h)Âk*Çn,Çn,Æm*Æl*Áj*ºf)¶e)²c(«_(¦]'§pR¤nR¡mRžkR›jQ™iQ–gQ”gQ“fP‘ePdPdPŽdPŽcPcPŒcPŒbP‹bP‹bP‹bPŠbPŠaP‰aP‰aO‰aOˆ`O‡`O†_O…_Oƒ^O]Oª_(@   B!I$B!N'w=‘eP`LKbNLeOLkR mR£nR¥oR§pSªqS¬rS®sS¯tS°tS°tS±uS±uS°tS¯tS­sSªrS§pS¢mRšjQŒbPjQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‹bPpTME"5         ‡M$tVM{ZN}[N\O]O‚^Oƒ^O„_O…_O†_O†`O‡`Oˆ`Oˆ`O‰aO‰aPŠaPŠbP‹bPŒbPcPŽcPdPdP’eP“fP•gQ—hQ™iQ›jQkR lR¢mR¡Z'¬`(µd)ºg)ÇgÀj*Àj*¾i*¿i*»g)µd)²c(¯a(ª_(¤\'§pR¥oR¢nR mRžkRœjQšiQ˜iQ—hQ•gQ”gQ“fP’eP‘eP‘ePdPdPdPŽcPŽcPcPcPŒcPŒbP‹bP‹bPŠbPŠaP‰aOˆ`O†_O„^O\NœQ    @ <G#_LKŽcPlSMnTMpUMsVM°tS²uT³vTµwT¶wT¶xT¶xT¶wTµwT´vT²uT¯tS¬sSªqS§pS¤oR¢nRžkR˜hQ‹bPeOL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN\NJ%0      1ŽJvWN}[N\O]Oƒ^O…_O†_O†`O‡`Oˆ`O‰aO‰aPŠaPŠbP‹bPŒbPŒbPcPŽcPŽdPdPdP‘eP’eP”fQ•gQ–gQ˜hQ™iQ›jQkQŸlR¡mRžY&¦]'­`(³c(·e)Àc¸\¸\¹\º]»]¶^®a(¬`(©^'£['¢['¥oR£nR¡mR lRžkRœkQ›jQšiQ˜iQ—hQ–gQ•gQ”gQ”fQ“fP’eP’eP‘eP‘ePdPdPdPdPŽdPŽcPcPcPŒbP‹bPŠaPˆaO†`O]O˜O      G#7F#uWMƒ^OwXNxXNzYN{ZN|ZN¹yT¸yT·xT´wT±uT­sS¨pS¡mRœjQ•gQdPŒbP‰aP‰aPŒbPŽcP‘ePcP|ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[JKŠbP^/	101|>wXN}[N]Oƒ^O…_O‡`O‡`OˆaO‰aPŠaP‹bP‹bPŒbPŒcPcPŽcPŽcPdPdPdP‘eP’eP“fP”fQ•gQ–gQ—hQ˜hQ™iQ›jQœkQžkRŸlR mRžY&¦]'­`(±b(·[ÇgÉiÉhÅfÂdÃe¿c«Uª_(§]'£[' Z'¤nR£nR¡mR mRŸlRžkRkQœjQšjQšiQ™iQ˜hQ—hQ–gQ•gQ•gQ”fQ”fQ“fP“fP’eP’eP‘eP‘ePePdPdPdPŽcPcPŒbPŠbPˆ`Oƒ^O‰D
     4M&dPnSM|[N|[O|[OzZOxXNªrS¢nR˜hQŽcPƒ^OvXNiQL^KKRFJMCJJAIKBISFJ\JKnSMxYN†_O€\OaMK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀB!qUMŠaPC!/00a0	uWN}[N‚]O…_O†`Oˆ`O‰aPŠaP‹bPŒbPŒcPcPŽcPŽcPdPdPdP‘eP‘eP’eP“fP“fQ”fQ•gQ–gQ—hQ˜hQ™iQ™iQ›jQœjQkRžlRŸlRœX&¢['¨^'¬`(´ZÂdÄfÈiÆgÂd¿c¿c¼a¸_©T¥\'£[' Z'ŸY&£nR¢mR¡mR lRŸlRžkRkQœjQ›jQšjQšiQ™iQ˜hQ—hQ—hQ–hQ–gQ•gQ•gQ”gQ”fQ”fQ“fQ“fP’fP’eP‘eP‘ePdPdPŽcPŒbP‰aOƒ^Ox<       :ŠaP]Oj8sVMmSMfOL^KKUGJIAIQEJ?<H*1F(
-
-	
-@%<-$G?@…pfdNLuWM\NdNL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTFJvWN‰aP./01„E}[N]O…_Oˆ`O‰aP‹bPŒbPcPcPŽcPdPdPdPeP‘eP’eP’eP“fP“fQ”fQ•gQ•gQ–gQ–hQ—hQ˜hQ™iQšiQ›jQœjQkQkRžlRŸlRžY&¤\'¨^'µ^½bÀcÃeÇi ÄgÀc½b¼a¹`µ^´]¯X¢[' Z'žY&¢mR¡mR¡mR lRŸlRŸlRžkRkQœkQœjQ›jQšjQšiQ™iQ™iQ˜iQ˜hQ—hQ—hQ—hQ–gQ–gQ•gQ•gQ•gQ”fQ”fQ“fQ“fP’eP‘ePdPcP‰aP—O            ‡`O‡`OoTMQEJC>IeZY638* B\À\À\À\À\À,4	.G1!\TU¡ƒrsVM{ZN`MK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[JKyYNŒbP/0      ˆN$]O…_Oˆ`O‹bPŒbPcPŽcPdPdPdP‘eP‘eP’eP’fP“fP“fQ”fQ”gQ•gQ–gQ–gQ—hQ—hQ˜hQ™iQ™iQšiQ›jQœjQœkQkRžkRŸlRœO¡Z'¥\'©^'­V¼a¾bÁeÆi!Ãf¾b»a¹`·_³]²\µZ¢[' Z'ŸY&œQ¡mR¡mR mR lRŸlRŸlRžkRkRkQœkQœjQ›jQ›jQšjQšiQšiQ™iQ™iQ˜iQ˜hQ˜hQ—hQ—hQ—hQ–hQ–gQ–gQ•gQ•gQ”fQ’fPdPcPšW&            dPŠaPrUM
- B\À\À\À\À\À\À\À\À\À\À%7!!C*F#P){dYœze»p€\OgPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ`LKvWNŠaPm6
-   X,uWM‚]O‡`OŠbPcPŽdPdPdP‘eP’eP’fP“fP“fQ”fQ”gQ•gQ•gQ–gQ–gQ—hQ—hQ˜hQ˜iQ™iQ™iQšiQ›jQ›jQœjQœkQkQžkRžlRŸlR¢Z'¤\'§]'·_¹`¼a½bÁeÅi"Áe¼aº`·_¶_²]²\±\«Y¡Z' Z'¡Z'¡mR¡mR mR lR lRŸlRŸlRžlRžkRžkRkRkQœkQœjQœjQ›jQ›jQ›jQšjQšiQšiQšiQ™iQ™iQ™iQ˜iQ˜hQ˜hQ—hQ–gQ•gQ“fQdP†_Oq8         –gQˆ`OuWM”T%\À\À\À\À\À\À\À\À\À\À B B!!T,c5ƒF‚T3È›~Æ“qƒ^OfOL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXHK_LKsVM‡`OcP      	’S%]OŠbPcPdP‘eP’eP“fP“fQ”fQ”gQ•gQ•gQ–gQ–gQ—hQ—hQ—hQ˜hQ˜iQ™iQ™iQšiQšiQ›jQ›jQœjQœjQkQkRžkRžlRŸlRŸlR¥\'¦]'¨^'­Vº`»a½bÁfÄi"Àe»a¹`·_¶_³]±\±\¤R¢Z'¢Z'£['¡mR¡mR¡mR¡mR mR lR lRŸlRŸlRŸlRžlRžkRžkRkRkRkQkQœjQœjQœjQœjQœjQ›jQ›jQ›jQ›jQšjQšiQ™iQ™iQ˜hQ–gQ‘eP§Sq8      ‰aO•gQ‡`OtVMœX&\À\À\À\À\À\À\À\À\À\À B B Bl@!{A…L$›Y'½†a“fPˆaO]KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀODJ[JKaMKqUM\OcPƒ^O      vE"‚]OŠaPdP‘eP“fP”fQ•gQ•gQ–gQ–hQ—hQ—hQ˜hQ˜hQ˜iQ™iQ™iQ™iQšiQšjQ›jQ›jQœjQœjQœkQkQkRžkRžkRŸlRŸlRŸlR lR©^'©^'ª_(®W»a¼a¾cÂg Äi"¿e»a¹`·_¶_³^±\±\¤R£['£['§]'¢mR¢mR¡mR¡mR¡mR¡mR mR lR lR lR lRŸlRŸlRŸlRŸlRžlRžlRžkRžkRžkRžkRkRkRkRkRkQkQkQœjQœjQšiQ˜hQ’ePšW&M&   oTMšiQ‘eP…_OtVMmSMdOL\À\À\À\À\À\À\À\À\À B B B‘J Z'ª_(œkQ™iQ‡`OSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTFJ\JKcNLlRMzYN‡`O’ePzZN   	 \Nˆ`OdP“fQ•gQ–gQ—hQ˜hQ˜hQ™iQ™iQ™iQšiQšiQšiQ›jQ›jQ›jQœjQœjQœjQœkQkQkRžkRžkRžlRŸlRŸlRŸlR lR lR mR®a(­`(¬`(¶[½a½b¿dÃh!Äi"¿d»a¹`¸_¶_µ^²]³]¦S¤\'§]'«_(¢nR¢mR¢mR¢mR¢mR¢mR¢mR¡mR¡mR¡mR¡mR¡mR mR mR mR mR lR lR lR lR lR lR lR lR lRŸlRŸlR lRŸlRžkRœkQ™iQePt:      kQ˜hQcP€]OtVMlSMa2
\À\À\À\À\À\À\À\À\À B B
-$5 ¬`(¶e)£nRœjQƒ^OJAI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXIK^KKdNLhPLuWM‚]OŒbP”fQeP
m6
-†`OŽcP“fQ—hQ˜hQ™iQšiQšjQ›jQ›jQ›jQœjQœjQœjQœkQkQkQkRžkRžkRžkRžlRŸlRŸlRŸlR lR lR lR¡mR¡mR¡mR¡mRºg)³c(²c(±b(­V¿cÂeÅi!Åi!Àd¼bº`¹`·_·_¶^¢Q§]'ª_(­`(¹f)£nR£nR£nR£nR£nR£nR£nR¢nR¢nR¢nR¢nR¢nR¢nR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR¢mR¢mR£nR¢mR¢mR¡mR mRkR—hQˆGa0	ŠbP mRœjQ“fQ‰aP}[NrUMmSM…L$\À\À\À\À\À\À\À\À B B
#C, 8&H.Z7 §pR›jQ{ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJ[JK`LKdNLhQLqUM{ZN…_OŽcP–gQ—hQ   
-‹bP‘eP–hQšiQ›jQœjQkQkQkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlR lR lR lR mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢nR£nRÀj*ºg)·e)¶d)Âd°XÅgÅhÂe¿c½b½b¾bªU­`(®a(¯a(³c(¾i*¤oR¤oR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¥oR¥oR¤nR¡mR›jQŽQ%Z-	œjQ£nRŸlR—hQŽdP…_OuWMpTMnSMkRLa: \À\À\À\À\À\À\À B B&D2
@*S6#G at IPDJ˜hQmSM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ]KKbMLeOLiQLlRMvWN\OˆaO‘eP—hQœjQ•gQ oTM•gQ™iQkQŸlRŸlR lR mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR£nR£nR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nRÆl*Ãl+¾j+¹g)¸f)¶e)µd)¶e)¶e)·e)·e)¸f)¾i*Ìs0Ðs.¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦pR§pR§pR§pR§pR§pS§pS¨pS¨qS©qS©qS©qS¨pS©qS§pS¤nRŸlR‘I˜hQ§pR¥oR¡mRšiQ’ePŠaP€\OsVMpTMnTMlRM–X)\À\À\À\À\À\À\À B%C)D$;J/[8"LBITGJYIKWHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK_LKcNLgPLjQLlRMpUMzYNƒ^O‹bP‘eP˜hQkQŸlR”fQ- —hQ›jQŸlR¢mR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦oR¦oR¦oR¦pR¦pR§pRàpßy-Ûw-Ûw-Þy.â{-ãu§pS§pS§pS§pS§pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨qS©qS©qS©qS©qS©qS©qS©qSªqSªrS«rS«rS¬rS¬rS¬rS¬rS¬sS«rSªqS¦oRšiQ™iQ©qSªqS§pR¡mRœjQ•gQcP„_O{ZNtVMpUMoTMmSMjQL_9 \À\À\À\À\À B"C(D#*A$[<)d<!QEJWHKXHKD>I\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JKaMKeOLhPLkRLmSMoTMuWM}[N…_O‹bP’eP˜hQžkR¢mR£nRžkR!-EkR¡mR¤nR¥oR¦pR§pR§pS§pS§pS§pS§pS§pS§pS§pR§pS§pS§pS§pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨qS¨qS¨qS©qS©qS©qS©qS©qS©qS©qS©qS©qS©qS©qSªqSªqSªqSªqSªrS«rS«rS«rS«rS«rS«rS¬rS¬rS¬rS¬sS­sS®sS®sS¯tS¯tS¯tS¯tS°tS°uS°tS®sS«rS£nR¦oR®sS­sS«rS§pR¢mRœjQ–gQdPˆaO\OyYNuWMqUMoTMnSMkRLo8
\À\À\À\À\À B'D+E$(1J/jH1NCJUGJYIKUGJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXHK]KKbNLfOLiQLkRMmSMoTMqUMxXN\N†_OŒbP’fP˜hQkQ¡mR¥oR§pS¦pR˜hQ¢mR¥oR¨pSªqS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rSªrSªrSªrS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS¬rS¬rS¬rS¬rS¬rS¬rS¬rS¬sS¬sS­sS­sS­sS­sS­sS­sS®sS®sS®sS®sS®tS¯tS°tS°uS±uS±uT±uT²uT²uT²uT´vTµwT´vT³vT²uT¯tS¢mR¯tS±uT±uS®tS«rS§pR¢mRkQ—hQ‘ePŠaPƒ^O\N{ZNvXNqUMpTMnSMlRMP%\À\À\À\À B#C*E$.E- .!G$Y:%d<"SFJYIKZIKNCJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀPDJZIK_LKdNLgPLjQLlRMnSMpTMqUMuWMyYN€\O†`OcP’fP—hQœjQ¡mR¥oR¨qS«rS«rSªrS mR «rS­sS¯tS°tS°tS°tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS®tS®sS®sS®sS®sS®sS®sS®sS®sS®sS®tS®tS®tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS°tS°tS°tS±uS±uS±uT²uT²vT³vT³vT´vT´vT´wTµwTµwTµwT·xT·xT¸xT¸yT¸yU·xU¥\'©qS³vTµwTµwT´vT±uT®tTªrS¦oR¡mRkQ˜hQ’eP‹bP‡`Oƒ^O€\O|ZNxXNtVMpTMoTMmSMjQLh7\À\À\À B(D"-E*1F, 4#K)pL5PEJWHK[JKXHK:9H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUGJ\JKaMLeOLhPLkRLmSMoTMpUMrVMvWNyYN|ZN]O‡`OŒcP‘eP—hQ›jQ lR¤nR§pSªqS­sS¯tS°uS¯tS­sS mR^/	²vT³vT´vT´wTµwT´wT´vT³vT´vT´vT´vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT´vT´vT´vT´vT´wTµwTµwTµwTµwT¶wT¶wT¶xT·xT·xT·xT¸xT¸xT¸xT¹yTºyT»zU¼zU½{U½{V½|V•gQ¬rSµwT¸xT¹yU¹yU¹zV·yVµxV±vU­tT©qS¥oS mRœjQ—hQ’ePcPŠbP‡`O„_O]O}[NyYNuWMpUMoTMmSMkRL}H#\À\À&D -E(1F/!2#8	W7"iA&UGJ[JK\JKREJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMCIXIK^KKcNLfOLiQLkRMmSMoTMqUMsVMwXNzYN}[N€\Oƒ^O‡`OŒbP‘eP–gQšjQžkR¢mR¥oR©qS¬rS¯tS±uS³vT´vTµwT´wT²uT­sS lR«_(¹yT¹yTºyTºyTºyTºyTºyT¹yT¹yT¸yT¸xT¸xT¸xT¸xT¸xT¸xT¸yT¸yT¸yT¸yT¹yT¹yT¹yT¹yT¹yT¹yT¹yTºyTºyTºyTºyTºzT»zT¼zU¼{U½{U¾{U¾|U¿|UÀ}VÁ~VÂWÀY™iQ«rSµwT¹yT¼zU½|V¿}XÁ€Z]Á]¾€]»~[¶zY±wW¬tU¨qS¤nSŸlR›jQ–gQ“fPePŽcP‹bPˆ`O…_O‚]O~\NzZNvXNqUMoTMnSMlRMiQLg=!\À
-!C+E'0F.4F7%8%U/lG.SFJZIK]KKZIKB=H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀREJZJK`LKdNLgPLjQLlRMnSMpTMqUMtWMxXN{ZN~[N]O„^O†`O‰aO‹bPdP•gQ™iQœkQ lR¤nR§pSªrS­sS¯tT²uT´vT¶wT·xT¹yT¹yTºyTºyT¹yT¶xT´vT¬rS¢nR—hQ¿|U¿|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ}UÀ}UÁ}UÁ}UÁ}UÁ}UÂ}UÂ~UÃ~UÃ~VÃ~VÄVÅ€WƁX®a(ŸlRªrS´vT¸yT¼zU¾|UÁ~VÃXÆ‚[Ɇ_΋dÓ‘jÔ“mÔ“nБlÊŒhĆd½_¶{[°vWªsU¦pS¢nRžkRšiQ˜hQ•gQ“fQ‘ePdPŒbP‰aO†_Oƒ^O€\O|ZNxXNsVMpTMnTMmSMjQL€C B)D&/F-3F47G6%>"Y7 kA$YIK]KK^KKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\KKbMLeOLhPLkRLmSMnTMpTMrUMuWNyYN|ZN\N‚]O„_O‡`OŠaPŒbPŽcPeP“fP—hQ›jQžlR¢nR¥oS©qT¬sT¯uU²vU´wV¶xV¸yV¹yUºzU»zU¼{U½{U¾{U¾|U¿|U¿|U¿|U¿|U¾{U½{U¼{U¼zU»zTºyT¹yT¸xTµwT³vT´vT´vT´vT´wT´wTµwT·xT¹yTºzT¼zU½{U¾{U¿|UÀ|UÂ}UÄVÅ€WÇ‚YÉ„\͈_ÑŒdÙ”láuç£|쩂ſt명榁ޟ{Õ—sËŽl†d¹^³yZ­uW¨qU¤oSŸlRžkRœjQšiQ˜hQ–gQ”fQ‘ePdPcPŠaP‡`O„^O]O}[NyYNuWMpTMoTMmSMkRLgPL&D#.E,3F46G;'<(D"iB(VGJ]KK`LK[JKB>H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRMmSMoTMqUMsVMvXNzYN}[N€\O‚^O…_Oˆ`OŠaPŒcPdP‘eP“fQ•gQ—hQ™iQkR mS¤oT¨rU¬tW°wY´zZ¸}\»]¾€^À^Á‚^‚^\Á€ZÁYÁXÁ~WÁ~WÂ~VÂ~VÂ~VÃ~VÃ~UÃ~UÄ~UÄ~UÄUÄUÅVÅVÅVÅVÆVÆ€VÆ€VÇ€WǁWÈ‚XɃZË…[͇^ЊaӍdØ’iÜ—nâtè£zó¯‡ø´û¸‘üº“û¹“÷¶ñ±Œé©…à¡~Ö˜vˏmÇf»€`´z[®vX©rU¥pT£oS¢nS lRžkRœkRšjQ˜iQ–hQ”fQ’ePdPcP‹bPˆ`O…_O‚]O~[NzYNvWNpTMoTMnSMkRMhQLo7,2F36G99HC+@ ]8 nA"\JK`ML_LKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_OˆaO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRžlR mS£oU§rW¬vZ²{]¹€a¿…fÅŠjˏnГqÓ•sÕ–sÕ–rÕ–qÕ”oÓ’mяjύgÍŠcˈaɆ^È„\Ç‚[ƁYÅ€XÅ€WÅWÅWÅVÅVÅWÅ€WÆ€WǁXÈ‚YɃ[Ê…\͇_ÏŠaҍeÕ‘hÙ•mÝ™qávä¡zç¤}꧀멃몄騃奀ߠ|Ù›wÓ•ȑmƉh¿„c¸~^²yZ®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRœkR›jQ™iQ—hQ•gQ“fPePŽcP‹bPˆaO…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQL~I#26G99G?<HA*E$	i@$ZIKaMLbML[JK;:H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀWHJ]KKbMLeOLhPLjRLlSMnTMpTMrUMuWMxXN{ZN~\N]O„^O†`O‰aO‹bPŽcPdP’eP”fQ–gQ˜hQšiQœkRžlS mT£oU¦rWªuZ¯y]´~aºƒfŠlË’sÔšzÜ¡€ã§†è«‰ë®‹í¯Œí®‹ë¬ˆè¨„ã£~ßžyÚ™tÖ•oҐjÎŒfˈbÈ…_ƃ\ŁZÄ€YÃXÂWÂ~WÂ~WÂ~WÃXÀXÄ€YŁZƃ\Ç…^Ɇ`ˈbÌŠdÍ‹f΍gÎŽiÎŽjÎŽjÍŽjËŒiljgÆd¿ƒaº^¸}]¶|\´{[²yZ°xY®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRkR›jQ™iQ—hQ•gQ“fP‘ePŽdPŒbP‰aO†_Oƒ^O€\O|ZNxXNtVMpTMnSMmSMjQLgPL99G?<HG-E&b;!YIK`MLdOM`LKNCJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸlRºyTÄ~UÊ‚XʃYÄXº{W­tUšW'¢[(—hQ lRcP€\OhQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRLmSMoTMqUMrVMvWNyYN|ZN\N‚]O„_O‡`O‰aPŒbPŽcPdP’fP”gQ–hQ˜iQšjRœkRžlS¡nT¤pU§sW«vZ°z]µb»„gŠlÉ‘sИyØžÞ¤…㩊譍챐ﳑﳑ뭊穅⣀ݞzؘtÒ“n΍iɉdÆ…`Â]Á€[¿~Y¾}X½|W½|V¼{V¼{V¼{V¼{V¼{V¼|W¼|W½}X½}Y½~Z½~Z¼~Z»}[º}[º}[º~\º~\º~]º~]¹~]¸~]·}]¶|\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS mRŸlRkR›jQšiQ˜hQ–gQ“fQ‘ePdPŒcPŠaP‡`O„^O]O}[NyYNuWNpTMnTMmSMkRLhPL|H$D>IQ2P+XHK_LLfQOcNLXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À©qSºyTÃ~VΈ`遲ޜv¾€]ªqS–LŽG|>g3
-S)?*%.—hQ—hQ‘eP‡`OuWM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMoTMqUMsVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽdP‘eP“fP•gQ—hQ˜iQšjRœkRŸlS¡nT¤pV§sX«vZ°z^¶b¼…gËmÊ’sјzØŸ€Þ¤…㩊譍ꯏ및ꯎ謋娇ं۞|Ö™wÑ“qÌŽlljgÃ…bÀ‚_½\»}Zº{X¹zW¸yV·yU·xU·xU·xT·xT·xU·xU·xU·yV·yV·yW¸zW¸{X¹{Y¹|Zº}[º}[º}\º~\¹~]¹~]¸}]·|\µ{\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS¡mRŸlRkRœjQšiQ˜hQ–gQ”fQ’ePdPcPŠbP‡`O…_O‚]O~[NzZNvWNrUMoTMmSMlRMiQLeOLJAIJ(h>!]KKfQOgQN_LKD>I\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À™iQ°tS¸yT¼{UÂYÎŒeï­ˆô´Õ—u¶|\ Z'™LˆD
|>               ’eP¦oR¨qS¦oR¡mRšjQ‘eP„^OhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀWHJ\KKaMLeOLhPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_Oˆ`OŠbPcPdP‘eP“fQ•gQ—hQ™iQ›jRkRŸmS¢nT¤qV¨sX¬w[±{_¶€c½†hÄŒnË’tÒ™zØŸ€Þ¥…㩉筍ꯎꯎꮍ竊䧆ߣÛž|Õ˜vГpËŽkljfÃ…bÀ‚_½\»}Yº{X¸zW¸yV·xU·xU·xT¶xT¶xT¶xU¶xU·xU·xU·yV·yV·zW¸zX¸{Y¹|Y¹|Z¹}[¹}[¹}\¹}\¸}\·}\¶|\µ{[³zZ²yZ°wY®vX¬tWªsV¨rU¦pT¤oS£nS¡mRŸlRžkRœjQšiQ˜hQ–gQ”fQ’ePdPŽcP‹bPˆ`O…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQLfOLJ(V.]KKePNkUQcNLQEJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‚]O¡mR©qS¬rS°tS³vTµwT·xUº{WĆbÒ“qךxʏo
-               K«rS´vT¶wT´vT²uT®sSªqS¤nRkQ•gQˆ`OuWNY,\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^KKbNLfOLhQLkRLmSMoTMpUMrUMuWMxXN{ZN~[N]O„^O†_O‰aO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRkRŸmS¢oT¥qV¨tX­w[±|_·d½†iÄŒnË“tÒ™zØŸ€Þ¥…㩉笌鮎ꮎ魌檉㧅ߢ€Ú{Õ—uÏ’pˍjƈfÂ…b¿^½\»|Y¹{X¸zV·yV·xU·xU¶xT¶xT¶xT¶xU¶xU¶xU¶xU·yV·yV·yW¸zW¸{X¸{Y¸|Z¹|Z¹|[¹}[¸}\¸}\·|\¶|[µ{[³zZ±xY°wX®vX¬tWªsV¨rU¦pT¥oS£nS¡mRŸlRžkRœjQšjQ˜iQ—hQ”gQ’fPdPŽcP‹bP‰aO†_Oƒ^O€\O|ZNxXNtVMoTMnSMlRMjQLgPLzG#\JKcOMoXUgPMZIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’fP”gQ•gQ—hQ™iQkQ lR¤nR§pRªqS¬sS¯tS      :"r<zYN­sS¹yT¾|UÁ~WÆ„^ËŠeË‹gƈe¾‚aµz[­tV¦pS¢mRkQ–gQŠbPzYNkRL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRFJZJK`LKcNLfPLiQLkRMmSMoTMqUMrVMvWNyYN|ZN\N]O„^O‡`O‰aO‹bPcPdP’eP”fQ–gQ—hQ™iQ›jRlR mS¢oU¥qV©tY­x\²|`¸d¾‡iōoË“uÒ™{ÙŸ€Þ¥…㩉笌鮍鮍謋婈⦄ޡÙœzÔ—tÏ‘oÊŒjƈe„a¿^½~[»|Y¹{X¸zV·yV·xU¶xU¶xT¶xT¶xT¶xT¶xU¶xU¶xU¶xV·yV·yW·zW·zX¸{Y¸{Y¸|Z¸|Z¸|[¸|[·|[·|[¶{[´z[³yZ±xY°wX®vW¬tWªsV¨rU¦pT¥oS£nS¡mRŸlRžkRœkRšjQ™iQ—hQ•gQ“fP‘ePŽdPŒbP‰aP†`Oƒ^O€]O}[NyYNuWNqUMnSMlSMkRLhPLcNLbNLpYVlUP`LK>;H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À›jQ‡`O{ZN©^'¨^'­`(·e)½h)Ãk*Êo+±b(£nRºyTÃ~UǁXҍdãŸwò°‰ñ°‹è©…ÝŸ}Ô˜vȍm¾„eµ}_®x[°y\®x[«tW§qT¡mRœjQ–gQ‹bP}[NlRM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\JKaMKdNLgPLjQLlRMnSMpTMqUMsVMvXNzYN|[N\O‚]O…_O‡`O‰aPŒbPŽcPdP’eP”fQ–gQ˜hQšiQœjRžlS mS£oU¦rW©uY®x\³|`¸d¾‡jōoÌ“uÒš{Ù €Þ¥…㩉欋譍譌竊婇᥃ݠ~Ø›yÓ–tΑoÊŒjňe„a¿^¼~[º|Y¹{W¸zV·yV·xU¶xU¶xT¶xT¶xT¶xT¶xU¶xU¶xU¶xU¶xV·yV·yW·zX·zX¸{Y¸{Z¸{Z·|Z·|[·|[¶{[µ{[´zZ³yZ±xY¯wX®uW¬tVªsV¨rU¦pT¥oS£nS¡mR lRžkRœkR›jQ™iQ—hQ•gQ“fQ‘ePdPŒcPŠaP‡`O„^O]O~[NzYNvWNrUMnSMmSMkRLiQLeOLoXUu]XdOLKBI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À:9H\N–hQ¸}\¯uU­sT¯tT¯tS¨qS¤nR£nR¢nRŸlR›jQšiQ˜hQ—hQ–gQ”fQ’eP‘eP—hQœkR mS¥pUªtX«uY¨sW¦qU mS›jQ•gQƒB’S%jQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLBIXHK^KKbMLeOLhPLjRLlSMnSMpTMqUMtVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽcPeP’fP”fQ–gQ˜hQšiRœkRžlS nT£pU¦rWªuY®y]³}`¹‚e¿ˆjÅŽpÌ”vÓš{Ù Þ¤…⨉櫋笌笋櫊䨆ंܟ~ךxÒ•sΐnÉŒiŇeÁ„a¾€^¼~[º|Y¹{W¸yV·yV·xU¶xU¶xT¶wT¶wT¶wT¶xT¶xU¶xU¶xU¶xV¶yV¶yW·zW·zX·zY·{Y·{Z·{Z·{Z¶{Z¶{ZµzZ³yZ²yY±xY¯vX­uW¬tVªsU¨rU¦pT¥oS£nS¡mR lRžlRkR›jQ™iQ—hQ•gQ“fQ‘ePdPcPŠaP‡`O…_O‚]O\N{ZNwXNsVMnSMmSMkRMiQLfOL_LKhQMUGJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À (6BFP>=DKHMqjk€trwf`~kc„ndŠqesete¯Ž{w`¡v[\N†_OcP“fP˜iQœjRŸlS£oT¦qV¥qV£oTžlR™iQº^‡`OQ%hPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJZIK_LKcNLfOLiQLkRLmSMoTMpUMrUMuWMxXN{ZN~[N€]Oƒ^O…_Oˆ`OŠaPŒcPŽdP‘eP“fP”gQ–hQ˜iQšjRœkRžlS¡nT£pU¦rWªuZ®y]³}a¹‚e¿ˆkÆŽpÌ”vÓš{ÙŸ€Þ¤…⨈媊櫋櫊婈⦅ߣÛž}ÖšxÑ•r͐mÈ‹ićdÁƒa¾€]¼~[º|Y¹zW¸yV·yU¶xU¶xU¶wT¶wT¶wT¶wT¶wT¶xU¶xU¶xU¶xU¶xV¶yV¶yW¶zX·zX·zY¶zY¶{Y¶{Z¶{ZµzZ´zZ³yY²xY°wX¯vX­uW«tVªsU¨rU¦pT¥oS£nS¡mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ‘ePdPcP‹bPˆ`O…_O‚]O\O|ZNxXNtVMoTMmSMlRMjQLgPLbML[JK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À%5 (6$/79CEEKjgkrc_›…{‘uf±{Ÿw_ºq]Oˆ`OŽcP”fQ˜hQ›jRžlR¡nT¢oT¡nTkR˜hQŽdP¦]'ŽQ%\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUGJ[JK`MKdNLgPLiQLkRMmSMoTMqUMrUMuWNxXN{ZN~[N]Oƒ^O†_Oˆ`OŠbPcPdP£['µd)•gQ—hQ˜iQšjRœkRžlS¡nT£pU§rWªvZ¯y]´~aºƒfÀˆkÆŽpÌ”vÓš{ØŸ€Ý¤„ᧇ䩉媊媉䨇᥄ޡ€Ú|Õ˜wДȑmÈŠhĆdÀƒ`¾€]»}[º|Y¸zW·yV·xU¶xU¶xU¶wTµwTµwTµwTµwTµwUµwUµxUµxUµxV¶xV¶yW¶yW¶yX¶zX¶zY¶zYµzYµzY´zY´yY²yY±xY°wX®vW­uW«tVªsU¨qU¦pT¥oS£nS¢mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ’ePdPcP‹bPˆaO†_Oƒ^O€\O|[NxYNtWMpUMmSMlRMjQLgPLcNLA;=\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À#*6+.8;:AHEJmgjd\]‡pe«}œxc w^»pƒ^OŠaP‘eP–gQšiQžlR mS¢nT mS›jR•gQ»h*œX&ˆM$\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀC+WHJ]KKaMLdOLgPLjQLlRMnSMoTMqUMrVMvWNyYN|ZN\N]O„^O†_OˆaO‹bPcPžY&«_(³c(•gQ—hQ™iQšjRœkRŸlS¡nT¤pV§sX«vZ¯z^´~bºƒfÀ‰kÆŽpÌ”vÒš{ØŸ€Ý£„ই㩉䩉䩈⧆ःܠØœ{Ô—vÏ“qËŽlljgÆcÀ‚`½]»}Z¹{Y¸zW·yV¶xU¶xU¶wUµwTµwTµwTµwTµwTµwTµwUµwUµxUµxVµxVµxVµyWµyWµyXµyXµyYµzY´yY´yY³yY²xY±wX°wX®vW­uV«tVªrU¨qU¦pT¥oS£nS¢mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ’ePdPŽcP‹bP‰aO†_Oƒ^O€\O}[NyYNuWNqUMmSMlRMjQLhPLdNL\1\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À+.775;ICFphhŠztŠre¯}Ÿya¢vZ]OŠaP‘eP–gQšiQkRŸlS¡nTžlS™iQÌq.¯b*“S%zG#\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMCJXHK^KKbMLeOLhPLjRLlSMnSMpTMqUMsVMvWNyYN|ZN\N‚]O„^O†`O‰aO‹bP—U&¥\'¯a(»g)Ìr/—hQ™iQ›jRkRŸmS¡nT¤pV§sX«v[¯z^´~bºƒfÀ‰kÆŽpÌ”vÒ™{מÜ£ƒà¦†â¨ˆã¨ˆã¨‡á¦…Þ£‚ÛŸ~×›yÓ–uÎ’pʍkƉgÂ…c¿‚_½]»}Z¹{X¸zW·yV¶xU¶xUµwTµwTµwTµwTµwTµwTµwTµwUµwUµwUµxUµxVµxVµxWµyWµyWµyXµyX´yX´yY³yY³xX²xX°wX¯vW®uW¬tV«sV©rU¨qT¦pT¥oS£nS¡mR mRžlRkR›jQšiQ˜hQ–gQ”fQ’ePdPŽcPŒbP‰aO†`Oƒ^O€]O}[NzYNvWNrUMmSMlRMjQLhQLeOL_LK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À,)/ZTVXON„uq‡od®}Ÿyb»s]OŠaPeP•gQšiQkRžlRŸlSœkR–hQ»g*¤\(ŽQ%`LK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À B B_LKcNLfOLiQLkRLmSMoTMpTMrUMtVMwXNzYN}[N\O‚]O„_O‡`O‰aOQ%ŸY&©^'±b(¾i*Õ{8—hQ™iQ›jRkRŸmS¡nT¤qV§sX«v[°z^µ~bºƒfÀ‰kÆŽpÌ”vÒ™{מÛ¢ƒß¥…ᧇ⧇ᦆऄݢÚž}ÖšxÒ•tÍ‘oÉŒjňfÂ…b¿_¼\º}Z¹{X·zW·yV¶xU¶xUµwTµwTµwTµwTµwTµwTµwTµwT´wU´wU´wU´xVµxVµxVµxW´xW´yW´yX´yX³xX³xX²xX±wX°wW¯vW­uW¬tV«sU©rU§qT¦pT¤oS£nS¡mR mRžlRkR›jQšiQ˜hQ–gQ”gQ’fPdPŽcPŒbP‰aP‡`O„^O]O~[N{ZNvXNrVMnSMlRMjRLhQLeOLaML+O+O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀHFLXQRTJH~pm‚la¬Ž}Ÿzc»t¤tT‰aPdP•gQšiQœjRžlRžlS›jRÖ|:´e*˜V&ˆN$\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À B B`LKdNLgPLiQLkRMmSMoTMpUMrUMtVMwXNzYN}[N€\O‚]O…_O‡`O‰aPšW&£['«_(´d)Âl,݃@Òt.™iQ›jRkRŸmS¡oU¤qV¨sX«w[°z^µbºƒgÀ‰kÆŽpÌ”uÑ™z֝~Ú¡‚Þ¤„ॆআॅޣ‚Ü ؝{Õ™wÑ”s̐nÈŒjňfÁ„b¾_¼~\º|Z¸{X·yW¶yV¶xUµwUµwTµwTµwTµwT´wT´wT´wT´wT´wU´wU´wU´wU´wV´xV´xV´xW´xW³xW³xW³xX²xX±wX°wW¯vW®uW­uV¬tVªsU©rU§qT¦pT¤oS£nS¡mR lRžlRkR›jQšiQ˜hQ–hQ”gQ’fPdPŽcPŒbPŠaP‡`O„^O]O~[N{ZNwXNsVMoTMlRMjRLiQLfOLbML+O+O‚+O‚+O‚\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À6./fZXeVRHAIZIKiQLuWM¤tU‰aOdP–gQšjQkRžlRkR˜iQÄn/¬b,‘R%rC"\À\À\À\À\À\À\À\À\À\À\À\À"Fx"Fx!Fx!Fx B B BdNLgPLjQLlRMmSMoTMqUMrUMtWMwXNzZN}[N€\O‚^O…_O‡`O“S%X&¥\'®a(·g+Ês2Ó{9Àj*™iQ›jRkSŸmS¢oU¤qV¨sX«w[°z^µbº„gÀ‰kÆŽpË“uИyÕœ}Ù Ü¢ƒÞ¤„ߤ„Þ£ƒÝ¡ÚŸ~×›zÓ—vÏ“rˏmÇ‹ićeÀƒa¾€^»~\¹|Z¸zX·yW¶xVµxUµwUµwTµwT´wT´wT´wT´wT´wT´wT´wT´wU´wU´wU´wU´wV³wV³xV³xW³xW²wW²wW±wW±wW°vW¯vW®uV¬tV«sUªsU¨rT§qT¦pT¤oS£nS¡mR lRžlRkR›jQšiQ˜hQ–gQ”gQ’fPePŽcPŒbPŠaP‡`O„_O]O~\N{ZNxXNsVMoTMlRMjRLiQLfPLbNL	+O‚+O‚+P‚+P‚+P‚\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@89dWT@<HE?IXHKiQLvWN‚]O‹bP’eP˜hQœjQžlRžlRœkRÍp+·f* [)ŠO$\À\À\À\À\À\À\À\À:^:^:^:^"Fx"Fx"Fx B B B BeOLhPLjQLlRMnSMoTMqUMrUMuWMxXN{ZN~[N€\Oƒ^O…_O‹O$˜V& Z'§]'²d+ºg+Õ}<¼h*—hQ™iQ›jRkSŸmS¢oU¤qV¨tY¬w[°z_µbºƒg¿ˆkōpÊ’tЗyÔ›}ØŸ€Û¡‚Ý£ƒÝ£ƒÜ¢‚Û ؝|ÕšyÒ–uÎ’pÊŽlÆŠhÆdÀƒa½€^»~[¹|Y¸zX¶yW¶xVµxUµwU´wT´wT´wT´vT´vT´vT´vT´vT´vT³vT³wU³wU³wU³wU³wV³wV³wV²wV²wW±wW±wW°vW¯vW®uV­uV¬tV«sUªrU¨qT§qT¥pS¤oS£nS¡mR lRžlRkR›jQ™iQ˜hQ–gQ”gQ’fPePŽdPŒbPŠaP‡`O…_O‚]O\N|ZNxXNtVMpTMlRMjRLiQLgPLcNL\JK+P‚+P‚+P‚+P‚+P‚+P‚,P‚\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀD::hZUC>IIAI\JKlRMyYN„^OcP”gQ™iQkRžlRžkR™iRÍt3±d-’S%I#\À\À\À:^‘:^‘:^‘:^‘:^:^:^:^:^"Fx"Fx B B B BeOLhPLjRLlSMnSMpTMqUMrVMuWMxXN{ZN~[N€]Oƒ^O…_O“S%›W&¢['©^(¹k2½i+Ó{:•gQ—hQ™iQ›jRkSŸmT¢oU¤qV¨tY¬w[°{_µbºƒf¿ˆkčoÊ’tÏ–xÓš|ם~Ù €Û¡Û¡Û €Ùž~×›{Ô˜wДs̐oÉŒkʼngÂ…c¿‚`¼]º}[¸{Y·zX¶yVµxVµwU´wU´wT´wT´vT´vT´vT´vT³vT³vT³vT³vT³vU³vU³vU³wU²wU²wV²wV²wV±wV±vV°vV°vV¯uV®uV­tV¬tUªsU©rU¨qT§pT¥pS¤oS¢nS¡mR lRžlRkR›jQ™iQ˜hQ–gQ”gQ’fPePŽdPŒbPŠaPˆ`O…_O‚]O\N|ZNxYNtWMpTMlRMjRLiQLgPLcNL_LK+P‚+P‚+P‚,P‚,P‚,P‚,P‚,P‚Nr¤\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À]QNl\VG at IMCI_LKoTM|ZN†`OdP–gQšjQkRžlRœkR—hQºh*¤^,ŒP%X3:_‘:_‘:_‘:_‘:_‘:_‘:_‘:_‘:^‘:^‘:^‘:^‘"Fx B B B BfOLiQLkRLmSMnTMpTMqUMrVMuWNxYN{ZN~[N€]Oƒ^OŽP%—U&X&£['¬`)½n4Ãn/Àj*•gQ—hQ™iQ›jRkSŸmT¢oU¤qW¨tY«w[°z^´~b¹ƒf¿ˆjÄŒoÉ‘sΕwÒ™{Õœ}ØžÙŸ€ÚŸ€Ùž~ל|ÕšyÒ—vÏ“rˏnÇ‹jĈfÁ„c¾`¼]¹}[¸{Y·zW¶xVµxU´wU´wT´wT´vT´vT³vT³vT³vT³vT³vT³vT³vT³vT²vU²vU²vU²vU²vU±vV±vV±vV°vV°vV¯uV®uV­uV¬tU«sUªrU©rT¨qT¦pT¥oS£oS¢nS¡mRŸlRžkRœkR›jQ™iQ˜hQ–gQ”gQ“fPePŽdPŒbPŠaPˆ`O…_O‚]O\N|ZNyYNuWMpUMlRMjQLiQLgPLdNL_LK,P‚,P‚,P‚,P‚,P‚Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaSOD>IJAIQEJbNLrUM~[NˆaO‘eP—hQœjQžkRŸlR›jRÌs0²e,“T&ƒK$;_‘;_‘;_‘;_‘;_‘;_‘;_‘:_‘:_‘:_‘:_‘:_‘:_‘ B B B BgPLiQLkRLmSMoTMpTMqUMsVMuWNxYN{ZN~[N]O‡M$“S%™V&ŸY&¥\'±e-¹j/Ñz:”fQ•gQ—hQ™iR›jRkSŸmT¢oU¤qW¨tY«w[¯z^´~b¹ƒf¾‡jÃŒnȐrÍ”vјyÔ›|֝~מ~Øž~ם}Õ›{Ó˜xЕtÍ’qÊŽmÆŠiÇeÀ„b½_»~\¹|Z·{Y¶yWµxVµxU´wU´wT´vT³vT³vT³vT³vT³vT³vT³vT³vT²vT²vT²vT²vU²vU²vU±vU±vU±vU°vV°vV¯uV®uV®uV­tU¬sU«sUªrU¨qT§qT¦pS¥oS£nS¢nR¡mRŸlRžkRœkR›jQ™iQ˜hQ–gQ”gQ’fPePŽdPŒbPŠaPˆ`O…_O‚]O\O|ZNyYNuWMqUMlSMjQLhQLfPLdNL_LK,P‚,P‚Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀdUOG at IMCITFJeOLtWM€]O‹bP“fP™iQkRŸlRkR™iQ¾j,©c/P%[JK;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘ B B B BgPLiQLkRMmSMoTMpTMqUMsVMvWNyYN{ZN~[N|H#ŽQ%•T%›W& Z'¦]'ºm5¸f*Ív5”fQ•gQ—hQ™iR›jRkSŸmT¡oU¤qW§sY«v[¯z^³~b¸‚e½‡i‹nǏqË“uÏ–xÒ™zÔ›|Öœ}Öœ|Õ›{Ô™yÑ–vÏ“s̐oȍlʼnh†e¿ƒa¼€_º~\¸|Z·zX¶yWµxV´wU´wU³vT³vT³vT³vT³vT³vT³vT²vT²vT²vT²vT²vT²vT±vT±vU±vU±vU°uU°uU°uU¯uU®uU®tU­tU¬tU«sUªrU©rT¨qT§pT¥pS¤oS£nS¢mR mRŸlRžkRœjR›jQ™iQ—hQ–gQ”fQ’fPePŽcPŒbPŠaPˆ`O…_O‚^O\O|ZNyYNuWNqUMmSMjQLhQLfPLdNL`LKNr¤Nr¤Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À2#TB<JBIODJXHKiQLxXN„^OŽcP–gQ›jQžlRŸlRœkRËo,³d+•U'…L$;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘ B B B BgPLiQLkRMmSMoTMpUMrUMsVMtVMyYN|ZN~[N‹O$’S%—U&œX&¢['©_(Às;»h+º`“fQ•gQ—hQ™iR›jRkSŸmT¡oU¤qW§sY«v[¯z^³}a¸‚e¼†iÁŠmÅŽpÊ’tÍ•wЗyÒ™zÓš{ÔšzÓ™yÑ—wÏ”tÍ’qʏnÇ‹jĈgÁ…d¾‚a»^¹}\¸{Z¶zXµyW´xV´wU³wU³vT³vT³vT³vT²vT²vT²vT²vT²uT²uT²uT±uT±uT±uT±uT°uU°uU°uU¯uU¯uU®uU®tU­tU¬tU¬sU«sUªrT©qT§qT¦pS¥oS¤oS£nS¡mR mRŸlRkRœjQšjQ™iQ—hQ–gQ”fQ’ePdPŽcPŒbPŠaPˆ`O…_O‚]O\O|ZNyYNuWNqUMmSMiQLhPLfOLdNL`LKkPANr¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À#Gy#GybSNP<3NCJRFJ^LKoTM}[N‰aO‘eP™iQkQŸlRžlR™iQÂm-¯g2Q%]8 ;_’;_’;_’;_’;_’;_’;_’;_‘;_‘;_‘!2 B B B BgPLjQLlRMmSMoTMpUMrUMsVMtVMyYN|ZN‡M$Q%”T%™V&žY&£['­b+¾q8Çr3’eP“fQ•gQ—hQ™iRšjRœkSŸmT¡oU¤qV§sYªv[®y^²}a·d»…hÀ‰lčoȐrË“uΖwЗxјyјxÑ—wÏ•uÍ’rːpȍlÅŠi‡f¿„c½`º~]¹|[·{Y¶yXµxW´wV³wU³vU³vT²vT²vT²vT²uT²uT²uT²uT²uT±uT±uT±uT±uT±uT°uT°uT°uT¯uU¯uU®tU®tU­tU­tU¬sU«sTªrT©rT¨qT§qT¦pS¥oS¤oS¢nS¡mR lRžlRkRœjQšiQ™iQ—hQ•gQ”fQ’ePdPŽcPŒbPŠaP‡`O…_O‚]O\N|ZNyYNvWNqUMmSMiQLhPLfOLdNL`LKZIKNs¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦Os¦Ot¦Ot¦Ot¦\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d–@d–#Gy#Gy#Gy#Gy#GyhVPKBIQEJUGJeOLtVM]OŒbP”gQ›jQŸlRŸlRkR–gQ´d*™X)ˆN$;`’;`’;`’;`’;`’;`’;`’"Gy"Gy"Gy!2 B B B B BjQLlRMnSMoTMpUMrUMsVMtVMyYN‚K$ŒP%’S%–U&›W&ŸY&¥\'µi2·h.Îx8‘eP“fQ•gQ—hQ˜iQšjRœkSžmT¡nU¤qV§sXªv[®y]²|`¶€dº„g¿ˆkËnƏqÊ’sÌ”uΕvÏ–wÏ–vΕuÍ“sË‘qÉŽnÆ‹kÈhÁ…e¾ƒb¼€_º~]¸|[¶zYµyW´xV³wV³wU³vT²vT²vT²uT²uT²uT²uT±uT±uT±uT±uT±uT°uT°uT°uT°uT¯uT¯tT¯tT®tT®tT­tT­tT¬sT«sT«rTªrT©qT¨qT§pS¦pS¤oS£nS¢nR¡mRŸlRžkRkR›jQšiQ˜iQ—hQ•gQ“fQ’ePdPŽcPŒbP‰aP‡`O…_O‚]O\N|ZNyYNuWNqUMmSMiQLgPLfOLcNL`MKZIKOs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦Os¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀvšÌvšÌvšÌvšÌ#Gy#Gy#Gy#Gy#Gy#Gy#Gy#GyYE<NDJTFJYIKkRLyYN…_OdP—hQkQŸlRŸlR›jRÆo.²h2‘R%c; <`’<`’#Gy#Gy#Gy#Gy"Gy"Gy"Gy* B B B B BjQLlRMnSMoTMqUMrUMsVMtVM~I#‰N$R%”T%˜V&œX&¡Z'§^(¼q9¶e*Àj+‘eP“fQ•gQ–hQ˜iQšjRœkSžmT¡nU£pV¦sX©uZ­x]±|`µc¹ƒf½‡jÁŠmōpȐrÊ’tÌ“uÍ”uÍ“tÌ’sË‘qɏoÇŒlÄŠi‡f¿„d½‚a»^¹}\·{Z¶zX´xW´wV³wU²vU²vT²vT²uT²uT±uT±uT±uT±uT±uT±uT±uT°uT°uT°tT°tT¯tT¯tT¯tT®tT®tT­tT­sT¬sT¬sT«rTªrT©rT¨qT§pS¦pS¥oS¤oS£nS¢mR mRŸlRžkRœkR›jQšiQ˜hQ–hQ•gQ“fQ‘ePdPŽcP‹bP‰aO‡`O„_O‚]O\N|ZNyYNuWNqUMmSMhQLgPLeOLcNL`LKZIK,Pƒ,PƒOs¥Os¥Os¥Os¥Os¦Os¦Os¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀvšÌvšÌvšÍvšÍvšÍvšÍ=a“#Gy#Gy#Gy#Gy#Gy#Gy#Gy#GygUOT>3REJVGJ`LKpTM}[N‰aO’ePšiQžkR lRžlR˜hQ·e)¢^.P%^8 #Gy#Gy#Gy#Gy#Gy#Gy#Gy#Gy* B B B B BjQLlRMnSMoTMpUMrUMsVMxF#‡M$ŽQ%’S%–U&šW&žY&¢['ªa+¿s;¹g+dP‘eP“fQ”gQ–hQ˜iQšjRœkSžlS nU£pV¦rX©uZ¬x]°{_´~b¸‚e¼…iÀ‰kÃŒnÆŽpȐrÊ‘sË’sË‘rʐqɏoǍmÅ‹kÈhÀ…e¾ƒb¼€`º~^¸|[¶{ZµyX´xW³wV²vU²vU²vT±uT±uT±uT±uT±uT±uT±uT±uT°uT°uT°tT°tT¯tT¯tT¯tT¯tT®tT®tT­sT­sT¬sT¬sT«rTªrT©rT©qT¨qS§pS¦pS¥oS£nS¢nR¡mR lRŸlRkRœjQ›jQ™iQ˜hQ–gQ•gQ“fP‘ePdPcP‹bP‰aO‡`O„^O‚]O\N|ZNxXNuWMqUMmSMhPLgPLeOLcNL`LKZIK,Pƒ,Pƒ,QƒOs¦Os¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀvšÍvšÍv›Ív›Ív›Ív›Ív›Íw›Íw›Í=a“=a“=a“#Gy#Gy#Gy#Gy#Gy#Gy#Gy#GymYPODJUGJXIKeOLtWM‚]OcP•gQœjQ lR mRkRÈp.´g0”T&ˆN$]8 #Gy#Gy#Gy#Gy#Gy#Gy#Gy* B B B B BjQLlRMnSMoTMpUMrUMv>„L$ŒP%‘R%•T%˜V&œX& Z'¤\'°f0¹m5Äq3dP‘eP“fQ”gQ–gQ˜hQ™jR›kSlS nT¢pV¥rX¨tZ«w\¯z_³}a·dº„g¾‡jÁŠlÄŒnÆŽpǏqȏqȏpÇŽoƍmÅ‹kÉiÁ‡g¿„d½‚aº_¸}]·|[µzY´yX³xW³wV²vU²vU±uT±uT±uT±uT±uT±uT°uS°uS°tS°tS°tS¯tS¯tT¯tT¯tT®tT®tT®sT­sT­sT¬sT¬sT«rTªrTªrT©qT¨qS§pS¦pS¥oS¤oS£nS¢mR¡mRŸlRžlRkRœjQšjQ™iQ—hQ–gQ”fQ’fP‘ePdPcP‹bP‰aO†`O„^O]O~\N{ZNxXNuWMqUMiQLgPLfOLeOLbNL_LKZIK,Qƒ,Qƒ,Qƒ,Qƒ,QƒOt¦Pt¦Pt¦Pt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àv›Ív›Ív›Ív›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Í=a“=a“=a“=a“=a“#Gz#Gz#Gz#Gz#Gz#Gz#GzgUOS=2RFJWHJ[JKlRMzYN†`OeP˜iQžkR mRŸlR™iQ¼h*°h4‘R%ˆN$^9 [JK#Gy#Gy#Gy#Gy#Gy* B B B B BjQLlRMnSMoTMpUMI#†L$‹O$Q%“S%—U&šW&X&¡Z'¦](·l5´f,Èt5dPeP’fP”fQ–gQ—hQ™iR›kRlSŸmT¢oV¤qW§tY«v[®y^±|aµc¸‚f¼…h¿ˆkÁŠlÃŒnōnōoōnÅŒmÄ‹k‰iÁ‡g¿…e½ƒc»€`¹~^·|\¶{Z´yY³xW²wV²vU±vU±uT±uT±uT°uT°uT°tS°tS°tS°tS°tS¯tS¯tS¯tS¯tS®tS®tS®sS­sT­sT­sT¬sT¬rT«rTªrTªrS©qS¨qS§pS¦pS¦oS¥oS¤nS¢nR¡mR mRŸlRžkRkR›jQšiQ˜iQ—hQ•gQ”fQ’ePePdPcPŠbPˆ`O†_Oƒ^O]O~[N{ZNxXNtVMqUMhPLgPLfOLdNLbML_LKbE6,Qƒ,Qƒ,Qƒ,Qƒ-Qƒ-Qƒ-QƒPt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Q„-Q„-Q„\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d–w›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Îw›Îw›Î=a”=a”=a”=a”=a”=a”=a“#Hz#Gz#Gz#Gz#Gz#Gz#GzmYPPDJUGJYIKbMLqUM\NŠbP”fQ›jQŸlR¡mRžlRËp,µe+ \+R%ˆN$b; ]8 [7 XHKO+N1L/L/L/K/K/e<!€J#{=‚J$…L$ˆN$ŠO$ŽP%’S%•T%˜V&œX&ŸY&£['ª`+¸m7´d)½h*ŽdPdP’eP”fQ•gQ—hQ™iR›jRlSŸmT¡oU¤qW§sYªv[­x]°{`´~b·eº„g½†i¿ˆjÁ‰lŠlËlÊlŠkÁˆiÀ‡h¿…f½ƒc»a¹_¸}]¶{[µzY³xX²wW²wV±vU±uU°uT°uT°uT°tT°tT°tS°tS¯tS¯tS¯tS¯tS¯tS®tS®tS®sS®sS­sS­sS¬sS¬sS«rS«rSªrSªrS©qS¨qS¨qS§pS¦pS¥oS¤oS£nR¢nR¡mR lRŸlRkRœjQ›jQ™iQ˜hQ–hQ•gQ“fQ’ePdPŽcPŒbPŠaPˆ`O…_Oƒ^O€]O~[NzZNwXNtVMpTMgPLfOLeOLcNLaMK^KKbE6,Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-QƒPt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Q„-Q„-Q„-Q„-Q„-Q„-Q„-R„-R„\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d–@d–@d—@d—@d—@d—w›Íw›Íw›Íw›Îw›Îw›ÎwœÎwœÎwœÎwœÎwœÎxœÎxœÎ=b”=b”=b”=b”=b”=b”=b”=b”#Hz#Hz#Hz#Hz=a”=a”gUOS=2RFJWHKZJKiQLvXN„^OŽcP—hQkR mR mRœkRÄm-¶j3™W(R%ŠO$e<!c; a: ^9 ]8 [7 X6X6X6‚K$†M$¬_(yF#—U&ˆN$‰N$‹O$P%R%“S%—U&šW&X&¡Z'¤\(­d.¶j2·f*ŒbPŽcPdP‘eP“fQ•gQ—hQ˜iRšjRœkSžmT¡nU£pW¦sX©uZ¬w\¯z_²}aµc¸‚e»„g½†i¿‡jÀˆjÀˆjÀˆjÀ‡i¿†g¾…f½ƒd»b¹€`¸~^¶|\µzZ´yY²xX²wW±vV±uU°uU°uT°tT¯tT¯tT¯tS¯tS¯tS¯tS¯tS¯tS®tS®sS®sS®sS­sS­sS­sS¬sS¬rS«rS«rSªrSªrS©qS©qS¨qS§pS¦pS¥oS¤oS£nR¢nR¡mR mRŸlRžkRkR›jQšiQ™iQ—hQ–gQ”gQ“fP‘ePdPŽcPŒbP‰aP‡`O…_O‚^O€\O}[NzYNwXNsVMoTMgPLfOLdOLcNL`MK]KKaE6-Qƒ-Qƒ-QƒPt¦Pt¦Pt¦Pt¦Pt¦Pt§Pt§Pt§-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Q„-Q„-Q„-Q„-Q„-Q„-Q„-R„-R„-R„-R„-R„-R„-R„\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d—@d—@d—@d—@d—@d—@e—@e—@e—@e—@e—wœÎwœÎwœÎxœÎxœÎxœÎxœÎxœÎxœÎxœÎxœÎ>b”>b”>b”>b”>b”>b”>b”>b”=b”=b”=b”=b”=b”=b”=b”=b”YE<bJ>UGJYIK_LKnSM|ZNˆ`O’ePšiQŸlR¡mR mR™iQºg*´j4šW'‘R%ŽQ%h>!g=!f=!d<!c; b; `: ˆN$­`(±b(´d)¸f)|H#œX&œX&›W&Q%‘R%•T%˜V&›W&žY&¢['¦](®d.³e,Àn1ŒbPŽcPdP‘eP“fQ”gQ–hQ˜iRšjR›kSžlT nU¢pV¥rX§tZªv\­y^°{`³~b¶€d¹‚e»„g¼…h½†h¾†h¾†h¾…g½„f¼ƒd»b¹€a¸~_¶|]µ{[´yZ³xX²wW±vV°vU°uU°uT¯tT¯tT¯tT¯tS¯tS¯tS¯tS®tS®tS®sS®sS®sS­sS­sS­sS¬sS¬sS¬rS«rS«rSªrSªqS©qS©qS¨qS§pS¦pS¦oS¥oS¤nR£nR¢mR¡mR lRŸlRkRœkQ›jQšiQ˜iQ—hQ•gQ”fQ’fP‘ePdPcP‹bP‰aO‡`O„^O‚]O\O}[NyYNvWNrVMoTMfOLeOLdNLbML`LK\KKaE6Pt¦Pt¦Pt¦Pt¦Pt¦Pt§Pt§Pt§Pu§Pu§Pu§Qu§Qu§-Qƒ-Qƒ-Q„-Q„-Q„-Q„-Q„-Q„-R„-R„-R„-R„-R„-R„-R„-R„-R„.R„.R„~¢Ô~¢Ô\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d—@d—@d—@e—@e—@e—@e—@e—@e—@e—@e—Ae—Ae—Ae—xœÎxœÎxœÎxœÎxœÎxœÎxœÎxœÏxœÏxœÏ>b”>b”>b”>b”>b”>b”>b”$Hz$Hz$Hz$Hz$Hz>b”>b”>b”>b”>b”gVOS=2RFJWHK[JKeOLsVM€]OŒbP•gQœjQ lR¡mRžlRÌr/¹g*²h2–U&“S%‘R%Q%ŽQ%ŒP%£['¨]'¬`(°b(´d)¸f)»g)¾i*Áj*I#¡Z'¡Z' Z' Z'¡Z'£['¤['¥\'¦]'ª_)±d,³d)Äq3‹bPcPdP‘eP’fQ”fQ–gQ—hQ™iR›kSlSŸmU¡oV¤qW¦sY©u[¬x]¯z^±|`´~b¶€d¸‚eºƒf»„f»„f¼„f»ƒe»‚dºb¹€a·~_¶}^µ{\´zZ³yY²wX±wW°vV°uU¯uU¯tT¯tT¯tT®tS®tS®tS®sS®sS®sS®sS®sS­sS­sS­sS­sS¬sS¬rS¬rS«rS«rSªrSªqS©qS©qS¨pS§pS¦pS¦oS¥oS¤oR£nR¢nR¡mR mRŸlRžkRkRœjQšjQ™iQ˜hQ–hQ•gQ“fQ’ePdPŽcPŒcPŠbPˆ`O†_O„^O]O\N|ZNyYNuWNrUMnSMjQLdNLcNLaMK_LK[JK`D6Pt¦Pt¦Pt§Pt§Pt§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§-Q„-Q„-Q„-R„-R„-R„-R„-R„-R„-R„-R„-R„.R„.R„Rv¨Rv¨Rv¨~¢Ô~¢Ô~¢Ô~¢Ô\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@e—@e—@e—@e—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—xœÏxœÏxœÏxÏxÏxÏxÏyÏyÏ>b•>b”>b”$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>b”>b”>b”>b”>b”YD<W?3UGJYIK\JKjRLxXN„_OdP—hQkR mR¡mRkRÈp.¹h,°f/¢[(žX&X&¡Z'¥\'©^'­`(²c(¶e)ºg)¾i*Áj*Äl*Çm*Êo+¤\'¤\'¤\'¤\'¥\'¦]'§]'©^'ª_(­a)±c*µe*¼i+‹bPcPŽdPdP’eP“fQ•gQ—hQ˜iRšjRœkSžmT nU£pW¥rX¨tZªv[­x]¯z_²|`´~b¶€c·d¸d¹‚d¹d¹c¸€b¸a·~_¶}^´{\³z[²yZ±xX°wW°vV¯uU¯uU®tT®tT®tT®tT®sS®sS®sS®sS­sS­sS­sS­sS­sS­sS¬sS¬rS¬rS«rS«rSªrSªqSªqS©qS¨qS¨pS§pS§pS¦oS¥oS¤oR£nR¢nR¢mR¡mR lRžlRkRœkQ›jQšiQ˜iQ—hQ–gQ”fQ“fP‘ePdPcPŒbPŠaPˆ`O…_Oƒ^O€]O~[N{ZNxXNtWMqUMmSMiQLcNLbML`LK^KKbR_D5Pt§Pt§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨-R„-R„-R„-R„-R„-R„-R„.R„.R„Rv¨Rv¨Rv¨Rv¨Rv¨~¢Õ~¢Õ~¢Õ~¢Õ~¢Õ~¢Õ~¢Õ~¢Õ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—yÏyÏyÏyÏyÏyÏyÏAe˜$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>b”>b”>b”>b”Q@:R<2fL at WHJZJKaMKoTM|ZNˆ`O‘eP™iQŸlR¡mR¡mRœjRÇo-»i-´h0«`)§]'¨]'¬`(°b(´d)¸f)¼h)Àj*Ãk*Æm*Én+Ìp+Ïq+Òr,§]'§]'§]'¨^'ª_(«_(¬`(­`(¯b)²c)ºi.ˆ`OŠaPŒbPŽcPdP‘eP“fQ”gQ–hQ˜iRšjR›kSlTŸnU¢oV¤qW¦sY©uZ«w\­y]°{_²|`³}aµ~b¶b¶b¶b¶a¶~`µ}_µ|^´{]³z[²yZ±xY°wX¯vW¯uV®uU®tU®tT­tT­sT­sS­sS­sS­sS­sS­sS­sS­sS¬sS¬rS¬rS¬rS«rS«rS«rSªrSªqS©qS©qS¨qS¨pS§pS¦pS¦oS¥oR¤oR¤nR£nR¢mR¡mR lRŸlRžkRkRœjQšjQ™iQ˜hQ–hQ•gQ“fQ’ePdPdPcP‹bP‰aO‡`O…_O‚]O\O}[NzYNwXNtVMpTMlRMhPLcNLaMK_LK]KKbR]C5Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨-R„-R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae˜Ae˜Ae˜Ae˜yÏyÏyÏAf˜Af˜Af˜$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>b•>b•>b”>b”WD<V>3TFJXHK[JKfOLsVM€]O‹bP”gQœjQ lR¡mR mRœkRÅm,½i,ºj/²d+±c)²c(¶e)ºf)¾h*Áj*Ål*Én+Ëo+Îq+Ñr+Ós,Õt,ƒK$ª^(ª_(«_(¬`(®a(¯a)°b)³d*¶f+¾m1‡`O‰aP‹bPcPdPeP’fQ”fQ•gQ—hR™iR›kSlTŸmT¡oV£pW¥rX§tY©v[¬w\®y]¯z^±{_²|`³}`´}`´}`´}_´|^³{^³{\²z[±yZ°xY°wX¯vW®uV®tU­tU­tT­sT­sT­sS­sS¬sS¬sS¬sS¬rS¬rS¬rS¬rS¬rS«rS«rS«rS«rSªrSªqSªqS©qS©qS¨qS¨pS§pS¦pS¦oS¥oR¤oR¤nR£nR¢mR¡mR mRŸlRžlRkRœjQ›jQšiQ˜iQ—hQ–gQ”fQ“fP‘ePdPŽcPŒbPŠaPˆ`O†_O„^O]O\N|ZNyYNvWNsVMoTMkRLgPLbML`LK^KK\JK~aR[B5Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe—Ae—Ae—Ae—Ae—Ae—Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Af˜Af˜Af˜yÐAf˜Af˜Af˜Af˜Af˜Bf˜$H{$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>c•>c•>b•>b•O?:[E<dK?UGJYIK\KKjRLxXN„^OŽcP—hQkQ lR¡mR mRÒt.Êq.Àj+¿k-¼i,¼h*¼h*Àj*Âk*Ål*Én+Íp+Ðq+Òs,Ôt,×u,Ùv,Ûw,¬`(¬`(­a)¯b)±c*²d+µf+·g,»k0¾m1‡`O‰aO‹bPŒcPŽcPdP‘eP“fQ•gQ–hQ˜iRšjRœkSlTŸnU¡oV¤qW¦sX¨tZªv[¬w\­y]¯z^°z^±{^²{^²{^²{^²z]±z\±y[°xZ¯wY¯vX®vW®uV­tV­tU¬sT¬sT¬sT¬sT¬sS¬rS¬rS¬rS¬rS¬rS«rS«rS«rS«rS«rS«rSªrSªqSªqS©qS©qS¨qS¨pS¨pS§pS¦pS¦oR¥oR¤oR¤nR£nR¢mR¡mR mRŸlRžlRkRœkQ›jQšiQ™iQ˜hQ–gQ•gQ“fQ’ePePdPcP‹bP‰aP‡`O…_Oƒ^O€\O~[N{ZNxYNuWNqUMmSMiQLeOLaMK_LK]KKlN>|aRZA5-QƒQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„Rv¨Rv¨Rv©Rv©Rv©Rw©£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe˜Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Af˜Af˜Af˜Af˜Af˜yžÐyžÐyžÐzžÐzžÐzžÐBf˜Bf˜Bf˜Bf˜Bf˜$H{$H{$H{$H{$H{$H{$H{$H{$H{$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>c•>c•>c•>c•VC<T=3}cVWHJZIKaMLoTM|ZN‡`OeP˜hQkQ lR¢nR¢nSÓt.Òv2Åm+Äl+Ãl+Ål+Æm+Én+Ëo+Íp+Ðr+Ós,Öu,×u,Ùv,Ûw-Ýx-ßy-¯b*¯c+²e,µg-¸i/ºk0½m2Àp4ºi-†_Oˆ`OŠaPŒbPcPdP‘eP’fQ”fQ•gQ—hR™iRšjSœlTžmT nU¢pV¤qW¦sY¨tZªv[«w[­x\®y]¯y]¯y]°y]°y\°y\¯x[¯xZ®wY®vX­uW­uW­tV¬tU¬sU¬sT«sT«rT«rS«rS«rS«rS«rS«rS«rS«rS«rS«rSªrSªqSªqSªqS©qS©qS©qS¨pS¨pS§pS§pS¦pR¦oR¥oR¤oR¤nR£nR¢mR¡mR mR lRŸlRžkRkQ›jQšjQ™iQ˜hQ—hQ•gQ”fQ“fP‘ePdPŽcPŒbPŠaPˆ`O†_O„^O‚]O\O}[NzYNwXNtVMpTMlRMhPLdNL`LK^KKmO?kN>^C6W at 5-Q„-Q„Qu§Qu§Qu§Qu§Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„Rv©Rw©Rw©Rw©¤Ö¤Ö¤Ö¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö¤Ö¤Ö¤Ö\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAf˜Af˜Af˜Af˜Af˜Af˜Af˜Af˜zžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐBf˜Bf˜Bf˜Bf˜$I{$I{$I{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$Hz$Hz$Hz$Hz$HzYE<W?4gYXHKZJKfOLsVM\N‰aO‘eP™iQkR¡mR£nS¢nS¡mSÚ|7Ïs/Êo,Êo,Íp+Ïq+Ñr,Ós,Õt,Øv,Úw-Üx-Ýy-ßz.à{/â|/²e-´g/·j1»m3¿o5¿o5Ãr7¿n3³c)…_O‡`O‰aP‹bPcPŽdPdP’eQ“fQ•gQ–hQ˜iR™jR›kSlTŸmU¡oV¢pV¤qW¦sX¨tY©uZªv[«w[¬w[­w[­w[®w[®wZ­wZ­vY­vX¬uW¬tW¬tV«sU«sU«sT«rT«rT«rSªrSªrSªrSªrSªrSªrSªqSªqSªqSªqSªqS©qS©qS©qS©qS¨pS¨pS§pS§pS¦pR¦oR¥oR¥oR¤nR£nR£nR¢mR¡mR mR lRŸlRžkRkQœjQ›jQšiQ˜iQ—hQ–gQ•gQ“fQ’ePdPŽdPcP‹bP‰aO‡`O…_Oƒ^O]O~[N{ZNyYNvWNsVMoTMkRLgPLbML^LKnP?lO?iM>\C6T>4-Q„-Q„-Q„-R„Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„Rw©Sw©€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›Ei›\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAf˜Af˜Bf˜Bf˜Bf˜zžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑBf˜Bf˜Bf˜$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$H{$H{$H{$H{?c•?c•?c•?c•$H{$H{$H{SB;R<2zbVUGJXIK[JK[JKuWN€\OŠaP’fP™iQŸlR¡mR£nS£nS¥pTà€9Þ9Õw2Öw0Öv/Öv.Ùx/Üz0Þz0á|1ã~2æ€3è5éƒ6ë…8ë…8ºm4¼o7¾q8Äu;Ãs9Ãs8ºj0‚]O„^O†_Oˆ`OŠaPŒbPcPdP‘eP’fQ”fQ•gQ—hR™iRšjSœkSlTŸnU¡oV¢pV¤qW¦rX§sY¨tY©uYªuZ«uZ«vZ«vY«uY«uX«uX«tW«tV«sVªsUªsUªrTªrTªrTªrSªqSªqSªqSªqSªqS©qS©qS©qS©qS©qS©qS©qS©qS¨qS¨pS¨pS§pS§pR§pR¦oR¦oR¥oR¥oR¤nR£nR£nR¢mR¡mR mR lRŸlRžkRkRœjQ›jQšiQ™iQ—hQ–gQ•gQ”fQ’eP‘ePdPcPŒbPŠaPˆ`O†_O„^O‚]O\O}[NzYNwXNtVMqUMnSMiQLeOL`LK]KKmP?kN?|aSZA5P<4-R„-R„-R„-R„-R„-R„Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×Ei›Ei›Ei›Ei›Ei›Ei›Ei›\À\À\À\À\À\À\À\À\À\À\À\ÀBf˜zžÐzžÐzžÐzžÐzžÐzžÐzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑBf™Bf™Bf™%I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{?c–?c–?c–?c–?c–?c•?c•?c•?c•$H{$H{$H{jXP^H=}dXUGJXHKZIKkRLwXN‚]O‹bP”fQšiQžkR mR£nS¥pT¨qU¨rUç…;ç†>ì‰?è†<å‚9ê†;î‰=ðŠ=ðŠ>ôŽAø‘Dü•Hÿ˜Kù’E¿r:Àt;Àt;Át<Ãt:½n4´f,]Oƒ^O…_O‡`O‰aO‹bPŒcPŽcPdP‘eP“fQ”gQ–hQ˜iR™jR›kSœlSžmTŸnU¡oV¢pV¤qW¥rW¦rX§sX¨tX©tX©tX©tX©tXªtWªsW©sV©sV©rU©rU©rT©qT©qT©qS©qS©qS©qS©qS©qS©qS©qS©qS¨qS¨qS¨pS¨pS¨pS¨pS§pS§pS§pR¦pR¦oR¦oR¥oR¥oR¤nR¤nR£nR¢nR¢mR¡mR mR lRŸlRžkRkRœjQ›jQšiQ™iQ˜hQ–hQ•gQ”fQ’fP‘ePdPŽcPŒcP‹bP‰aO‡`O…_Oƒ^O]O~[N{ZNyYNvWNsVMpTMlRMgPLcNL†gUƒeUlO?~bT{`SW at 5-R„-R„-R„-R„-R„-R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R….R…Ei›Ei›Ei›€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›\À\À\À\À\À\À\À\À\À\ÀzžÑzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒBg™Bg™Bg™%I{%I{%I{%I{%I{%I{%I{@d–?d–?d–?d–?d–?d–?d–?d–?d–?c–?c–?c–?c–$I{$I{L=:WD<v_T€gZuZLWHKYIKmSMyYNƒ^OcP”fQ™iQœkQ mR¤nS§pT¨qT«sV°wXë…8õCú•Iú•Jÿ›Nÿ Rÿ¡Tÿ¢Uÿ£Vÿ§Zÿ«_ÿŸSÁu=Át=¿s;½q9½o6¶h.¯a)€\O‚]O„_O†_Oˆ`OŠaP‹bPcPdPeP’eQ“fQ•gQ–hR˜iR™jR›kSœlTžmTŸnU¡oU¢pV£pV¤qW¥rW¦rW§rW§rW§rW¨rW¨rV¨rV¨rU¨rU¨qU¨qT¨qT¨qT¨qS¨qS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS§pS§pS§pS§pR§pR§pR¦oR¦oR¦oR¥oR¥oR¤oR¤nR£nR£nR¢mR¢mR¡mR lRŸlRŸlRžkRkQœjQ›jQšiQ™iQ˜hQ—hQ•gQ”fQ“fP‘ePdPŽdPcP‹bPŠaPˆ`O†_O„^O]O\O}[NzYNwXNtWMqUMnSMjQLeOL‰iV„fU‚eUcT|bTcK>`KA-R„-R„-R„.R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R….R….R….R…EiœEiœEiœEiœEiœEiœ¥×¥×¥×¥×¥×¥×¥×EiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœ\À\À\À\À\À\À\À\ÀzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒ{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| ÒCg™Cg™%I{%I{%I{@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–?d–?d–?d–?d–?d–?d–$I{$I{dUPYE<xaVlSGw]OVHJbMLoTMzYN„^O¬vR’eP˜hQœjQ¡mR£nR¦pS§qT­uV³yZµ{[º^¾‚aÁ…cÊŒiΏlÑ’nÿ§Xÿ¬_ÿ­aÿžSÿŸU½q:ºn7¸k3µh0¯c*©^(\N]Oƒ^O…_O‡`O‰aOŠbPŒbPŽcPdP‘eP’fQ”fQ•gQ—hR˜iR™jR›kSœlSžmTŸmT nU¡oU£pV£pV¤qV¥qV¥qV¦qV¦qV¦qU¦qU¦qU¦qT§qT§pT§pT§pS§pS§pS§pS§pS§pS§pS§pS§pS§pR§pR§pR§pR¦pR¦pR¦oR¦oR¦oR¥oR¥oR¥oR¤oR¤nR£nR£nR¢nR¢mR¡mR¡mR lRŸlRžlRžkRkQœjQ›jQšiQ™iQ˜hQ—hQ•gQ”fQ“fP’ePdPdPcPŒbPŠaPˆ`O†_O„^O‚]O€\O~[N{ZNyYNvWNrVMoTMlRM|WBwUAˆhVƒfVlO@~cTzaTaI>XG at -R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©.R„.R„.R„.R„.R„.R„.R„.R„.R….R….R….R….R….R….S…EiœEiœEiœEjœEjœEjœEjœEjœ¥×¥×¥×EjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEiœEiœEiœ\À\À\À\À\À\À{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| ÒCg™@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–?d–$I{$I{RA;P<3zcXnVIuh™~pdNLpUMÁ”w¬zZ«vS‘eP–gQœjQžlR¡mR¤oS§pT­uV¯vW±xY¶|\¼€_ÆdƉgÈŠhÊŒiÌŽkΏlÿRñF¶k4²g1¯d-­b+ª_(¢Z'}[N€\O‚]O„^O†_Oˆ`O‰aP‹bPcPŽcPdP‘eQ’fQ”gQ•gQ—hR˜iR™jR›kSœkSlTžmT nT¡nU¡oU¢oU£pU¤pU¤pU¤pU¥pU¥pT¥pT¥pT¥pT¥pS¥pS¥oS¦oS¦oS¦oS¦oS¦oS¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¥oR¥oR¥oR¥oR¤oR¤nR¤nR£nR£nR¢nR¢mR¡mR¡mR lRŸlRŸlRžkRkRœkQœjQ›jQšiQ™iQ˜hQ—hQ•gQ”gQ“fP’ePePdPcPŒbPŠbP‰aO‡`O…_Oƒ^O]O~\N|[NzYNwXNtVMpUM—pY”oXzWBuUB…gVlP at jO@|bUx`TcMB3!.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©.R„.R„.R„.R„.R….R….R….R….R….S….S….S…EjœEjœEjœEjœEjœEjœEjœEjœEjœ¦Ø¦ØEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœ\À\À\À\ÀBg™{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| ÒCg™Cg™Cg™Cg™|¡Ó@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–%I{;0/SB;R=4fODpXL‘xkš€r˜vbº“zÀ”x«{[ÏldP•gQ™iQ›jQŸlR£nR¦pS¨qTªrT¬tU°wWµ{Z¸}\¸|\¸}\¹~]»]å}+Ý~6­d.ªa+¨_)§^(¤\'zYN|ZN~\N€]Oƒ^O„_O†_Oˆ`OŠaP‹bPcPŽdPdP‘eQ“fQ”gQ•gQ—hR˜iR™jRšjSœkSlSžlTŸmT mT nT¡nT¢nT¢oT£oT£oT£oT£oT¤oS¤oS¤oS¤oS¤oS¤oS¤oS¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¤oR¤oR¤nR¤nR¤nR£nR£nR£nR¢mR¢mR¡mR¡mR lR lRŸlRžlRžkRkQœjQ›jQšjQ™iQ™iQ˜hQ—hQ•gQ”gQ“fQ’ePePdPŽcPŒbPŠbP‰aO‡`O…_Oƒ^O]O\N}[NzZNxXNuWMrUM™rZ–pY|XCxVCsTBmQAkOA~cVzaU`I>\IARv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©.R….R….R….R….R….S….S….S….S…FjœFjœFjœFjœFjœFjœFjœFjœ‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦ØFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœ\À\ÀBg™{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ó| ÓCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™}¡Ó@e—@e—@e—@e—@e—@e—@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–%I{<1/J82^I at gQFqYN‘xl™€s—vc¢{d¿”yª{\«wUči‘eP•gQ˜hQkQ mR¢mR¤nR¥oS§pSªrT¬tU¬tU¬tU¬tU­tU®tUÒt.ƒL&¤](¢['¡Z'žY&xYN{ZN}[N\N]Oƒ^O…_O‡`OˆaOŠaPŒbPcPdPeP‘eQ“fQ”gQ•gQ—hR˜iR™iRšjR›kSœkSlSžlSŸmSŸmS mS nS¡nS¡nS¢nS¢nS¢nS¢nS£nS£nS£nR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR£nR£nR£nR£nR£nR¢nR¢mR¢mR¡mR¡mR¡mR lR lRŸlRžlRžkRkRœkQœjQ›jQšiQ™iQ˜iQ—hQ–hQ•gQ”fQ“fP’ePePdPŽcPŒbP‹bP‰aO‡`O†_O„^O‚]O\O}[N{ZNxYNvWNsVM›s[˜rZ~ZDnYŒkYqSBkPAiOA|cVbK?\G>NB?Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©.S….S….S….S….S….S…FjœFjœFjœFjœFjœFjœ‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦ØFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœCg™Cg™| Ò| Ò| Ò| Ò| Ò| Ó| Ó| Ó| Ó|¡Ó|¡ÓCg™Cg™Cg™Cg™Cg™Cg™Cg™CgšCgšCgšCgšCgš}¡ÓAe—Ae—Ae—@e—@e—@e—@e—@e—@e—@e—@e—@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–%I{@d–@d–<1/H72\I at ePGpYNxm˜€t–vc¡{e¾”zÁ“u‘p«wU¬uQ‘eP•gQ™iQšjQœjQžlR¡mR£nR¤nR¤oR¤oR¤oR¤oR¤oRÇgb;  Z'žY&›W&“S%vXNyYN{ZN~[N€\O‚]Oƒ^O…_O‡`O‰aOŠaPŒbPcPdPdP‘eQ“fQ”gQ•gQ–hQ˜iR™iRšjR›jR›kSœkSlSžlSžlSŸlSŸmS mS mS¡mS¡mS¡mR¡mR¢mR¢mR¢mR¢mR¢nR¢nR¢nR£nR£nR£nR£nR£nR¢nR¢nR¢mR¢mR¢mR¢mR¡mR¡mR¡mR mR lRŸlRŸlRžlRžkRkRkQœjQ›jQ›jQšiQ™iQ˜hQ—hQ–gQ•gQ”fQ“fP‘ePdPdPcPŒbP‹bP‰aO‡`O†_O„^O‚]O€\O}[N{ZNyYNvXNtVMu\„]E€[E’oZŽmZŠkYnRBjOB}cVdL@`I?XGARv¨Rv¨Rv¨Rv¨Rv©Rv©Rw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwª.S….S….S….S…/S…FjœFjœFjœFjœ‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦ÙFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœ‚¦Ù‚¦ÙCg™Cg™| Ó| Ó|¡Ó|¡Ó|¡Ó|¡Ó|¡ÓCg™Cg™Cg™Cg™CgšCgšCgšCgšCgšCgšCgšCgšChšChšChšChšChš}¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—@e—@e—@e—@e—@e—@e—@e—@d—%I{%I{%I{%I{%I{@d–@d–<10F61o]Vye]„oeŽxmœ‚u”udŸ{e¥}d¨|aÀ’tÁpÏl¬uQdP’eP”fQ–gQ˜iQ›jQœjQœjQœjQœjQœkQœkQkQ_9 œX&™V&•T%rUMuWMwXNzYN|ZN~[N€\O‚]O„^O…_O‡`O‰aOŠbPŒbPcPŽdPdP‘eQ’fQ”fQ•gQ–hQ—hR˜iR™iRšjR›jRœkRœkRkRlRžlRžlRŸlRŸlRŸlR lR mR mR mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR mR lR lRŸlRŸlRŸlRžkRžkRkRkQœjQ›jQ›jQšiQ™iQ˜iQ—hQ–hQ•gQ”gQ“fQ’fP‘ePdPdPcPŒbPŠbP‰aO‡`O†_O„^O‚]O€\O~[N{ZNyYNwXNtVMrUM†^F‚]F”q\o[ŒlZqTD€fX}dWeMAbK at O=6NB at Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxª/S…/S…FjœFjœFjœƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœƒ§Ùƒ§Ùƒ§Ùƒ§ÙCg™Cg™Cg™}¡Ó}¡Ó}¡ÓCg™CgšCgšCgšCgšCgšCgšCgšChšChšChšChšChšChšChšChšChšChšDhšDhšDhš~¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—%I{%I{%I{%I{%I{%I{%I{%I{%I{@d—@d—E:9D61m\Vwe]lXOuaX„k_¨‹z±|¡|e¥|c§|`©z]ªyXnÏlÄŽkÄŽidP’eP“fP“fP“fP’fP“fP“fP“fP[7 —U&”T%P%pTMsVMuWMxXNzYN|ZN~[N€\O‚]O„^O†_O‡`O‰aOŠbPŒbPcPŽdPdP‘eP’eQ“fQ”gQ•gQ–hQ—hQ˜iR™iRšjR›jR›jRœkRœkRkRkRžkRžlRžlRŸlRŸlRŸlRŸlR lR lR lR lR lR lR lR lR lR lR lR lR lRŸlRŸlRŸlRŸlRžkRžkRkRkQœkQœjQ›jQ›jQšiQ™iQ˜iQ˜hQ—hQ–gQ•gQ”fQ“fP’eP‘ePdPŽdPcPŒbPŠbP‰aO‡`O…_O„^O‚]O€\O~[N|ZNyYNwXNuWMrUM‡`G„^G–r]|ZFxXFtVEgY~eY{cXbLA[H?REA.R„.R„Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSxªSxªSxªSxªTxªTxªTxªƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙFjFjFjFjFjFjFjFjFjFjFjƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙCg™Cgš}¡Ó}¡ÓCgšCgšCgšCgšChšChšChšChšChšChšChšChšChšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš~¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—%I|%I|%I|%I{%I{%I{%I{%I{%I{%I{%I{%I{%I{%I{@e—@e—B99B51k[Vud]iWPr_Wye] †yªŒ|²}¡|e¤|c¾’w¨{^¨z\©yZÁp«xW«wU«wU«wU«wUÃŽlÃŽlÂŽlÂŽlkD(’S%ŒP%nSMoTMqUMsVMvWNxXNzYN|ZN~[N€\O‚]O„^O†_O‡`O‰aOŠaP‹bPcPŽcPdPeP’eQ“fQ”fQ•gQ–gQ–hQ—hQ˜iQ™iR™iRšjR›jR›jRœjRœkRœkRkRkRkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRžlRžkRžkRžkRkRkQkQœkQœjQ›jQ›jQšjQšiQ™iQ˜iQ˜hQ—hQ–gQ•gQ”gQ“fQ’fP‘ePePdPŽcPcP‹bPŠaPˆaO‡`O…_Oƒ^O‚]O€\O~[N|ZNyYNwXNuWMrUMŸw_œv_˜t^~\GzYGvWF†j[fZ|dYybX\I at VGB5/2.R„.R„.R„.R„Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªSxªTxªTxªTxªTxªFkFkFkFkƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§ÚFkFkFkFkFkFkFkFkƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Ú}¡Ó}¡Ó}¡Ô}¡ÔChšChšChšChšChšChšChšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš~£ÕAe˜Ae˜Ae˜Ae˜Ae˜%J|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I{%I{%I{%I{%I{%I{@e—@e—<68?31gYVpa\bRMjYTq`Z€j`¡‡z«}²‘}¶’|¸’{º’z»’x¼’w§z^¿‘t¿‘s¿‘s¿s¿r¿r¾r¾r°h2‹O$„L$mSMnSMnTMoTMtVMvWNxXNzYN|ZN~[N€\O‚]O„^O…_O‡`OˆaOŠaP‹bPŒcPŽcPdPdP‘eP’eQ“fQ”fQ•gQ–gQ–hQ—hQ˜hQ˜iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœkQœkQkQkRkRkRkRkRkRkRkRkRkQkQkQœkQœjQœjQœjQ›jQ›jQšjQšiQ™iQ™iQ˜hQ—hQ—hQ–gQ•gQ•gQ”fQ“fP’eP‘ePdPdPcPŒbP‹bP‰aPˆ`O†`O…_Oƒ^O]O€\O~[N|ZNyYNwXNtWM£z` y`w`šu_€]I|[HwXGˆl\ƒi[}eZycYr_WjZU;23.R„.R„.R„.R„.R….R….R…Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxª/S…/S…GkGkGkGkGkGkGkƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨ÚGkGkGkƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Ú}¢Ô}¢Ô}¢Ô}¢Ô~¢ÔDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš£ÕAf˜%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I{%I{Ae—Ae—Ae—?89H=<gZXpb_aSPi[Vud]˜‚x£‰{‘uf•wf™yf²|´‘|¶‘{¸‘y¸‘y¡zb¡zb¡za¡ya¡ya¡ya^=%“V)kRLlRMmSMmSMnSMoTMoTMvWNxXNzYN|ZN~[N€\O‚]Oƒ^O…_O†`Oˆ`O‰aPŠbPŒbPcPŽdPdPeP‘eP’fQ“fQ”fQ•gQ•gQ–hQ—hQ—hQ˜hQ˜iQ™iQ™iQšiQšiQšjQ›jQ›jQ›jQ›jQ›jQœjQœjQœjQœjQœjQœjQœjQ›jQ›jQ›jQ›jQ›jQšjQšiQšiQ™iQ™iQ˜iQ˜hQ—hQ—hQ–gQ•gQ”gQ”fQ“fP’eP‘ePdPdPŽcPcP‹bPŠaP‰aO‡`O†_O„^Oƒ^O]O\O}[N{ZNyYNwXNtVM¤{b¡zaŸxaœwa‚_J~\IyZItWH…j]g[dNDr`Xj[VOCB.R„.R„.R„.R….R….R….R….R….S…Sw©Sw©SwªSwªSxªSxªSxªSxªTxªTxªTxªTxª/S…/S…/S…GkGkGkGkGkGkGkGkGk„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨ÚGk„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú~¢Ô~¢Ô~¢Ô~¢Ô~¢Ô~¢ÔDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDh›Dh›Dh›Dh›£Õ£Õ£ÕDh›%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I|%I|%I|%I|Ae—Ae—Ae—4285.0G??g\[XMK`TRg[YŠyt{h`lb‡odŒre‘uf”vf–wf–we–we­{¬{¬{¬Œz¬ŒzbD.‰T+\EkRLkRMlRMmSMnSMnSMsVMvWNxXNzYN|ZN~[N€\O]Oƒ^O„_O†_O‡`OˆaOŠaP‹bPŒcPcPŽdPdPeP‘eP’fQ“fQ”fQ•gQ•gQ–gQ–hQ—hQ—hQ˜hQ˜hQ˜iQ™iQ™iQ™iQšiQšiQšiQšiQšiQšiQšiQšiQšiQšiQšiQšiQšiQ™iQ™iQ™iQ˜iQ˜hQ˜hQ—hQ—hQ–gQ•gQ•gQ”fQ“fQ“fP’eP‘ePdPdPŽcPcPŒbPŠbP‰aPˆ`O‡`O…_O„^O‚]O€]O\N}[N{ZNyYNvXNtVMŽfLŒdL‰cL†bL™vb–ta‘r`Œo_pVHkSGcOE]KDj[WNCB   .R….R….R….R….R….S….S….S….S….S….S…SxªSxªSxªSxªTxªTxªTxª/S…/S…/S…/S…/S…GkGkGkGkGkGkGkGkGkGkGkGk„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨ÚGkGkGkGkGk„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú~¢Ô~¢Ô~¢Ô~¢Ô~¢Õ~¢ÕDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDh›Dh›Dh›Dh›Dh›Dh›Dh›£Õ£Ö£Ö£Ö£Ö¤Ö¤ÖDi›&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|Ae—Ae—Ae—-*.3-0G at Ae\]jabs`Ssjk|qoƒvrtd_{halcƒmcƒmc„nc„nc›„y›„yœ„yœ„y\A.~ZE€[F]Gƒ^GkRLlRMlSMmSMqUMsVMuWNwXNyYN{ZN}[N\O]O‚]O„^O…_O†`Oˆ`O‰aPŠaP‹bPŒcPcPŽdPdPdP‘eP’eP“fQ“fQ”fQ”gQ•gQ•gQ–gQ–hQ—hQ—hQ—hQ˜hQ˜hQ˜hQ˜iQ˜iQ™iQ™iQ™iQ™iQ™iQ˜iQ˜iQ˜hQ˜hQ˜hQ—hQ—hQ—hQ–gQ–gQ•gQ•gQ”fQ“fQ“fP’eP‘eP‘ePdPdPŽcPcPŒbP‹bPŠaPˆaO‡`O†_O…_Oƒ^O]O\O~[N|ZNzYNxXNvWNsVMgNfMŠdM‡cMšwc—ub“sbŽparWIkSHbOF]KEj\X_UT@<?.R….R….R….R….S….S….S….S….S….S…/S…/S…/S…/S…TxªTxªTxª/S…/S…/S…/S…/S…/S…GkGkGkGkGkGkGkGkGkGkGkGkGkGkGk„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©ÛGkžGkžGkžGkžGkžGkžGkžGkžGkž„©Û„©Û„©Û„©Û„©Û„©Û„©Û„©Û~¢Õ~£Õ~£Õ~£Õ~£Õ~£Õ£ÕDhšDhšDhšDhšDh›Dh›Dh›Dh›Dh›Dh›Dh›Di›Di›£Ö£Ö£Ö¤Ö¤Ö¤Ö¤Ö¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›&J|&J|&J|&J|&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I|('.,*/>:?YUY`QGfVLudXjeitlm{po|qp}rp~rpsqsq€tqŒr_=1+xJ)’o[~[F€\G‚^H„_I…`IkRLlRMnSMpTMrVMuWMwXNyYN{ZN}[N~\N€\O‚]Oƒ^O„_O†_O‡`Oˆ`O‰aPŠbP‹bPŒcPcPŽcPdPdPeP‘eP’eP’fP“fQ“fQ”fQ”gQ•gQ•gQ•gQ–gQ–gQ–gQ–hQ–hQ—hQ—hQ—hQ—hQ—hQ–hQ–hQ–gQ–gQ–gQ•gQ•gQ•gQ”fQ”fQ“fQ“fP’eP‘eP‘ePdPdPŽdPŽcPcPŒbP‹bPŠaP‰aO‡`O†_O…_Oƒ^O‚]O€\O~\N}[N{ZNyYNwXNuWM“iOhOŽgO‹eOžze›yd—wd”tcrbtYKjTIaOG[KFj]Y^UU?;@.R….R….S….S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…GkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkž…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û…©Û…©Û£Õ£Õ£Õ£Õ£Õ£Õ£Õ£ÕDh›Dh›Dh›Dh›Di›Di›Di›Di›Di›¤Ö¤Ö¤Ö¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|Af˜Ae˜Ae˜%J|%J|%J|%I|%I|%I|%I|   #-#%.()1MEAQIEUMI]SL]TM=4.1+(=.#6,&5( 1%"ŒlYn[“p\•r]]Hƒ_I…`JœwažybkRLmSMpTMrUMtVMvWNxXNzYN|ZN}[N\N€]O‚]Oƒ^O…_O†_O‡`OˆaO‰aPŠaP‹bPŒbPcPŽcPŽdPdPdPeP‘eP‘eP’eP’fP“fP“fQ“fQ”fQ”fQ”fQ”gQ”gQ•gQ•gQ•gQ•gQ•gQ”gQ”fQ”fQ”fQ”fQ“fQ“fP“fP’eP’eP‘eP‘ePdPdPdPŽcPcPŒcPŒbP‹bPŠaP‰aO‡`O†_O…_Oƒ^O‚]O]O\O}[N|ZNzYNxXNvWN¬‚gªg¨€ghPŒfPŸ|fœzf˜xe”vdscsYLiTK_NHYKFh\Z]UV=;@.R….S….S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxª/S…/S…/S…/S…GlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û£Õ£Õ£Õ£Õ£Õ£Õ£Ö£ÖDi›Di›Di›Di›Di›Di›¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×Ei›&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Af˜Af˜Af˜Af˜Af˜%J|%J|%J|%J|%J|%J|%I|%I|%I|,
+,!.! "`E6†iYŒlZo\“q]•s^^J™va›wbycŸzd {e¤}foTMqUMsVMuWNwXNyYN{ZN|ZN~[N\O]O‚]Oƒ^O…_O†_O‡`Oˆ`O‰aOŠaP‹bPŒbPŒcPcPŽcPŽdPdPdPdPeP‘eP‘eP‘eP’eP’eP’eP’eP’fP’fP’fP“fP’fP’fP’fP’eP’eP’eP‘eP‘eP‘ePePdPdPdPŽdPŽcPcPŒcPŒbP‹bPŠaP‰aOˆ`O‡`O†_O…_Oƒ^O‚]O]O\O~[N|[N{ZNyYNwXN®ƒi¬ƒiª‚i¨i¦€hŒhR‰fQ†dQ‚bP•wfx]Oˆpdkbtd_m`]OEDG?A;:@.S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTx«Tx«Tx«Ty«/S†GlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž…ªÜ…ªÜ…ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž…ªÜ…ªÜ£Ö£Ö£Ö£Ö¤Ö¤Ö¤Ö¤Ö¤ÖEi›€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×€¥×€¥×€¥×Bg™Bg™Bg™Bg™Bg™&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Af˜Af˜%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I|   
+,YA5jPBpSD‹l[o]’q^–t`‚_Kšwbœycžze {f¡}g¤h¨i”lSrVMtWMvWNxXNyYN{ZN|[N~[N\O]O‚]Oƒ^O„_O…_O†`O‡`Oˆ`O‰aPŠaP‹bP‹bPŒbPcPcPŽcPŽcPdPdPdPdPdPdPdPdPePePePePePdPdPdPdPdPdPdPŽcPŽcPcPcPŒbP‹bP‹bPŠaP‰aOˆ`O‡`O†`O…_O„^Oƒ^O‚]O€]O\O~[N|[N{ZNyYNxXN°…j®„j¬„jªƒj¨‚j¦€jŒhSŠgS†eRƒcR|`QŒsf…oe}jcrd`k_]LCDC=@,,3(4F(4F.S….S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«…ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžChšChš¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›Ei›€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|#5H71O;3V?4iOBoSDsVFo]{[I^Kƒ`L…bN‡dOŸ{f }g¢~h¥€j’kT•mU˜oVšqWrWwXNxXNzYN{ZN}[N~[N\O€]O‚]Oƒ^O„^O…_O…_O†`O‡`Oˆ`O‰aO‰aPŠaP‹bP‹bPŒbPŒbPŒcPcPcPcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPcPcPcPŒcPŒbP‹bP‹bP‹bPŠaP‰aP‰aOˆ`O‡`O†_O…_O„_O„^Oƒ^O]O€\O\N~[N|ZN{ZNyYN›oTšoT™oT—nT¬„lªƒl¨‚ljUŒiTŠhT†fT€cSvi‰rgnfyidqdah^^HBD?<@)+3OZkMYk(5F(5F(5F/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Ty«Uy«†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžDhšDhšDhšChš&K}&K}&K}&K}&K}&K}ChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|&J|&J|&J|&J|&J|Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|A99N?;L:2T>4gNBlRD‡k\‹n^z[J~^LaN…cO‡dP‰fQŠgRŒhTjU’lV•nW˜pXšrXsY¶‹q¸qºŽr¼r½r¿s©z[©z[ªz[«{[¬{[¬{ZÅ“rÅ’qÅ’qÅ’pÅ’pÅ‘o­yV­xV¬xU¬wT¬wTŠaPŠbP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bPŠaPŠaPŠaP‰aP‰aOˆaOˆ`O‡`O‡`O†_O…_O„^Oƒ^O‚^O‚]O]O€\O~\N}[N|ZNzYNpTœpU›pUšpU˜oV—oV•nV“mV‘lVkVŒjVˆhVƒfU~cUuj†qh~mfugdkaad\^E at D98?$(2minffm^blV^lMYk(5F(5F/S…TxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Uy«Uy«†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}ChšChšChšChšChšChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|Ae˜Ae˜;GY<68I=:I82Q=4XA6~fZ„j\‰m^p`|]L€`NƒcP†eQˆgS¡j£€l¦‚m©„n•oX˜qYšrZt[¶Œr¸sºs¼t½t¾‘t¨z]©{]ª{]«{\«{\¬{\¬{[Ä“sÄ“rÄ’rÄ’qÄ’pÄ‘p¬yWĐoÐnÏmÏlÂŽlÂŽkÁkˆaOˆaOˆaOˆaOˆaOˆaOˆaOˆ`Oˆ`O‡`O‡`O‡`O†`O†_O…_O…_O„_O„^Oƒ^O‚]O]O€]O\O~\N}[N|ZN¶‰l¶‰lµˆmœqV›qVšqV™pW˜pW–oW¬…nª…n§„n¤‚nŸ€n›~n€eW‘xlŠtk‚piykfodcf_`JDG@>C*,5$1MYktr~tstmolinadmX_lNZkMZkTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«ÝHlŸHlŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸ†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšChšChšChšChšChšChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™&J}&J}&J}Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Af˜Af˜Af˜Af˜;GY;GY;GY1'!D:9N?;N;3]I?zdY€h[†l^‹oasc“ue€bQ„dR‡fT l¢m¦ƒn©…o«‡p®ˆq±Šr³‹sžv] w]¹u»u¼‘u¾‘u¿’v¨{^©{^ª|^«|]«|]«{\¬{\¬{[¬{[¬zZ«zZ«yY«yX«xXonnÁŽmÁŽm¨uT¨uS§tS§tS§tR¦sR¦sQ…_O…_O…_O„^O„^Oƒ^Oƒ^O‚^O‚]O]O€]O¢rS¡rS¡rS¸‰k·‰l·‰l¶‰m¶‰mµ‰m´‰n³‰n›qWšqX™qX®‡o­‡o«†p¨…p¤ƒp pœp—}o{cXv`Vp]U}nishfhaba\_DAF::B$)4 MYkMYkMYkŒtctq\QPPIKFDI;>H/8GMZkTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸHmŸHmŸImŸImŸImŸImŸImŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšChšChšChšChšChšChšChšChšCgšCgš&K}&K}&K}&K}&J}&J}Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;GY;GY;GY;GY;,#I=:H82YF?^JA|e[‚j]ˆn`Œqcte”wg—yiš|k~l €n£‚o¤ƒp¦…q­‰s°Šs›u]žv^Ÿw^¡x_£y_¤z_¥z_¦{_¿“w¿“wÀ“vÁ“vÁ“v“u“u“tª{\ª{\ªz[ªzZªyZªyY©xXÁpÀo¨wW¨vV§vV§uU¦uU¦uT¥tT½Œl¼‹k¼‹k¼‹k»‹k»‹kºŠk¢sT¢rT¢rT¡rT¡rT¡rU rU rV·Šn¶ŠnµŠnµŠo´Šo³‰o²‰p±‰p™qY®ˆq¬‡qª†r§…r¤„r ‚rœ€q€gZ{dYvaXp^WiYU`TRVNOb]aEBH<<D36@MYkMYkMYkMYkMZk-.1W>+[NL^SQWNNKFJ?AI2:HTx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝImŸImŸImŸImŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšChš&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}CgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;HY;HY;HY;HY;GY3("D::B41RB=YG at wcZ}g\ƒk_‡nbŒrdug}aRdT„gV‡iX‰kY¢ƒq¤„r¥…s§†t‘p^’q^Ÿw` x`¢y`£z`¤za¥{a½“x¾“x¿“w¿“wÀ“wÀ“vÀ“vÀ“vÀ“uÀ’uÀ’tÀ‘sÀ‘sÀ‘r¿r¿q¿q¾p¾Žp¾Žo½Žo¥vW¼n¼Œn»Œn»Œn»ŒnºŒnº‹m¢tV¡sV¡sV¡sV sV sWŸsWŸsXžsXµŠpµŠp´ŠpœsY›sYšrZ˜r[–r\”q\‘p]¦†t£„tŸƒsœs€h\{e[vbYo^XhZV`USXPQNJMECJRS[47A+((MYkMYkMYkMZk(5F(5F(5FOHJT=+YML_SRZQQMGJABI2:H/T†Uy«Uy«Uy«Uy«Uy«Uy«‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬Þ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}CgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™&J|&J|Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;HY;HY;HY;HY>DM>DM;HY89<:+#9&B52I94ZHAxd[}g^k`†nc‹rey_R}bTeVƒgX…iYˆk[Šl\Œn]o^¥‡v§ˆvšvaœwažxa yb¢zb¤{b¤{a¼“x½“x¦|a§|a§|`§{`§{_§{_§{^§z^¾‘u¾‘t¾‘t¾s½s½r½r¥wZ¤wZ¤vY¤vY£vY£uX¢uX¢uX¢uX¹Œp¸Œp¸Œp·Œp·‹p¶‹p¶‹pµ‹qµ‹qtZ›t[šs\™s\˜s]–r]”r^’q^p^o^Šn^‡l^ƒj^h]{f\ub[n^YgZW_UTWPQOKOEEKST]JNY>=?JJIMYkMYk(5F(5F(5F(5F(5F)5G)5GK=4S<*XMLbWVYPPLGJ at AI/T†/T†Uy«Uy«Uy«‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸIm ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞIm Im Im Im Im Im Im Im ˆ¬Þˆ¬Þˆ¬Þˆ¬Þ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Dh›Dh›Dh›Dh›DhšDhšDhšDhš'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}ChšChšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|&J|&J|&J|&J|Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜;HY;HY;HY;HY;HY;HYCIR>DMCIR;HYCIR.$0"8&?*G/V=+w[F{g^€kanXMs\Px_S{bU~dWfYƒhZ†j\ˆl]Šm^¢…v§ˆwªŠx­Œy¯y±Žz´zµz·‘z¹’z£{b£{b¤{b¥{b¥{a¥{a¥{`¥{`¥z_¥z_¥z^¼‘u¥y]¤y]¤x]¤x\£w\£w[¢w[¢v[¢v[¡v[¡v[¸r·r¶r¶ŒsµŒs´Œs´Œs²Œt±‹u°‹u˜t^–s_•s_“r_’r`q`p`¡…wž„v›‚v—€u“~twd]sb[l^ZeYW]TUUORLJOYYaRU^JOZ>>@!$)RXaMYk39B-3<-3<(5F)5G)5G)5G)5G)5GFDJK9*^K=YONg\\TLMIFJ:>I0T†0T†ImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞIm Im In In In In In In ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßIn In In In In ˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ß'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Di›Di›Dh›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}ChšChšChšChšChšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™&J}&J}&J}&J}&J|&J|&J|&J|&J|Bg™Bg™Bg™Bg™Bg™Bf™Bf™<HZ<HZ<HZ<HZ;HY;HYCIR>EM>EMCIR;HY;HYCIRCIR)6&8&@*H0I1!\B0}_JhTKjM8q[Pt]Sw`U{cW~eYg[ƒi\…k^‡m_Ÿ…v¢†w¥ˆx¨Šyª‹z­z¯Ž{±{²{³{´{žzdŸzd zc zc¡zc¸‘y¸‘y¸‘y¸‘x¸x¸x·w·w·w·wŸw_Ÿw_žw_µŽv´Žv³v²v²w±w°Œw¯Œw®Œw­‹w«‹xªŠx¨‰x¦‰x¥ˆx£‡x¡†xž…x›ƒw—v’~vŽ|t‰ys„vrh\YcXX[TUSNRIHOUXaNS^JFE>>A')+"%(4:C(5F(5F3:B3:B-3<-3<)5G)5G)5G)5G)5G)5GE:4O:*TKLbXWcZZPIKDCJIm Im Im Im ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßIn In In In In In Jn Jn Jn Jn Jn ˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn ‰­ß‰­ß‰­ß‰­ßˆ­ßˆ­ßˆ­ßˆ­ß'K~'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšChšChšChšChšChšChšCgšCgšCgšCgš&K}&K}&J}&J}&J}&J}&J}&J}&J}&J}&J|&J|&J|Cg™Cg™Cg™Bg™Bg™Bg™<HZ<HZ<HZ<HZ<HZMS\CIR>EMCIRCIRCIR888DGNCJRCIRBBB(0 8&<)G0M5"X at 0z^K†bFŠkUlXPp[Rs^TvaVzcX}fZg\i]™u›‚v„wŸ†x¢‡y¥‰z§Šz©‹{ªŒ{•ve–ve—we˜we°|°|±{²{²{²{²{²{±z±z±Žz±Žz±Žz°Žy™vb˜vb—vb–ub•ub•uc”tc“tc’sbscrcqc¢‡y †y…y›„x˜‚x•w’w|uˆytƒvs~sqyooslmVQTOLR[\dQU`KHHAAD:<@68; & Z`i-4<%');AJ4:C4:C4:C-4<)5G)5G)5G)5G)6G)6G at 84H8-N?5YPQmccoghd`dIn In In In In In ˆ¬ßˆ¬ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~Ei›Ei›Ei›Ei›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšChšChšChš&K}&K}&K}&K}&K}&K}&K}&K}&J}&J}&J}&J}&J}&J}&J}&J}&J}Cg™Cg™Cg™Cg™<IZ<IZ<HZ<HZ<HZ<HZ?EN?ENCJRCJRCJRCJRCJRUU\CJRCJRBDG''''''(. 9(:(B-O8'kUFt[IˆhQyic}leog…rjˆtl‹wnypzq‘|s|g]~h_€j`ka‚la‡ob‰pcŠqdŒrdrdŽsete‘te’ue©Œ|©Œ|ªŒ|ªŒ|ªŒ|ªŒ|ªŒ|©Œ|’ue’ud’ud‘tdtdsdŽsdrdŒrd‹qdŠqd‰pc‡oc„nc™ƒy–‚y“€x~w}wŠ{v‡yu‚vs}srxopqknkgkdbhGGOVYcPLLBCF;>B9;>68;    Z`iZ`iMZk)5G4:C-4<4:C4:C-4<;BJ)5G)6G)6G)6G)6G)6GC6-L;.leg„{{ypqhbeVYcJn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­àJn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡‰­à‰­à‰­à‰­à‰­à'L~'L~'L~'L~'L~'L~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhš'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&J}&J}&J}&J}&J}&J}Cg™Cg™Cg™<IZ<IZ<IZ<IZ<IZ<IZ?ENDJSDJSDJS?EN?EN?EN<HZ04?'.6'.6&(+'''''',)1#7&;)M8)S;+mVG…dKseawhc{kfnh‚pj„rl†tmˆvotaZvc[wd]yf^zg_{h`|i`~ja€kblbƒmc„nc†od‡pd‡pdˆpdˆpdˆpeŸ‡{ˆpeˆpeˆpeˆpeˆpd†od…od„ndƒmd‚mc€lckc}jc|jbyhb}wŠ{w‡yv„wu€ut}sryqqunpojmhfkKKRDFOD><535=AG=?D?AD<?B&(+"$'          KRZTZcMZkKOVRYaSYb.4=.4=4:C.4=4:C)6G)6G)6G)6G)6G)6GWMFaRGhbe{su…}}kde_^dJn Jn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ßJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®à‰®àJo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Š®àŠ®à‰®à‰®àFjœFjœFjFjFj'L~EiœEiœEiœEiœEi›Ei›Ei›Ei›Ei›Ei›Ei›'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Dhš'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&J}&J}&J}&J}Cg™>==<IZ<IZ<IZ<IZ<IZMT\DJS?ENDJS?EN?EN?EN")1")1C5+//3(.7&),'''''''''"""
., 7(8'A1&F4(L8*oXIw]Jpdasfcvhexkg{mi~oj€qll\Xn^Yp`Zpa[qa\rb]rc^sc^sd_ue`wf`xgayhayhayhbxy‘y‘y‘y‘yy~ywgbvfateasd`qd`pc`nb_la_€ut|ssxqrunpZUXVRWROUMMSHIRIC at 967-/3'+0(*-ACF?AD;=@#%(            JMPU[dSYbKPVW]fY`hSYbSYb.4=4;C4:C.4=)6G)6G)6GCPaCPaCPaFED]PGdaesmoŠ‚ƒmefb_dJn Jn Jn Jn Jn Jn Jn Jn Jn¡‰­àJn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Ko¡Š®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Š®àŠ®àFjFjƒ§Ùƒ§Ùƒ§Ùƒ§Úƒ§Úƒ§Úƒ§Úƒ¨ÚEiœEiœEiœEiœEiœEiœEi›Ei›'K~'K~'K~'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Dh›Dh›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&J}@K[=IZ<IZ<IZ<IZ<IZNT]DJS?ENDJS#)2#)2#)2#)2#)2'.6A4+028(.7'),)))######"""6$nP?
.+>1(B3)B2&F4'E4)gTGlXJs^OzcTzaPqfethgvjhbVTcWUdXVeYWfZXg[Yh\Zi]Zi][j^\€us€ususts~tt~tt}tt|st{stut~tt|sszrsyqrwpquoqsmpqloXTXTQWPOULLSSJEA<:=99757335./2113)+.'),)+.8:="(   3 at Q               JMPV\eT[cNZlNZlZ`iZ`iZ`iZ`iSYbY`h4;C.4=)6GCPaCPaCPaCPaCPaEQbZOGa_emhkŠƒ„nfgeaeJn¡Jn¡Jn¡Jn¡Jn¡Jn¡Š®àŠ®àŠ®àŠ®àŠ®àJo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Š®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡ƒ§Úƒ§Úƒ§Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨ÚEjœEiœEiœEiœEiœ'L~'L~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}Di›Di›Di›Di›Dh›Dh›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}$.>=I[=I[<IZ<IZ<IZ?FN'.6#)2#)2#)2#)2#)2#)2(.7#)2,=@<A348)/8"$'"$'######""""	kF+;(
"6*#5*">2)>0&A2'C3(I8-^OFbRHfUJjXMq^RwcVzfYfRDfQCdN at zdTqijrjksklrklrklrklqjmpjmpjmojmojmnimmimkhliflscYm`Xg\VbYT^VRE>;A<:>98:77645:873220/0,-/)+.*,/#%( &      15;5BS                  KKKJMP]dlU[dNZlNZlZ`iTZcZaiZaiZ`iZ`iSZbŽ”LS[V]eDPbDPbDPbDPbDPbDPbWMF^^diei®”†…rkeaeJo¡Jo¡Jo¡Jo¡Š®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Š¯áŠ¯áŠ¯áŠ¯áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡ƒ¨Úƒ¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨ÛGk'L~'L~'L~'L~'L~'L~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Di›Di›Di›Di›Di›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}%/> ,>=I[=I[ ,> ,>#)2(.7#)2(.7#)2#)2#)2#)2(.7(.7(.767 at D>A214$+3#%("$'###""""""&&&888888cB*}\I@!%+%!5*$:/(;0)<1*>3+ at 4+>1(bUKN at 6OA6L=3QB8M?4_RKaTLbUMcVNcVNcVObVOaVOaUO`UO_UO^UO^TO\SOYRNWPNUOMWPKYSOWRN;63953:76755333,/2'),%(+"%(!'			   "&,KXi04:                  JMP]_b^emU[dNZlNZlT[cU[dU[dU[d[aj•ž•ž•žˆŽ—–¥W]fDPbDPbDPbDPbDPbDPb‘nSž…w—|m¨‚ƒqjKo¡Ko¡Ko¡Š®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨Û„¨Û„¨Û„¨Û„©Û„©Û„©Û„©ÛGkGkGkGkGkGk'L~'L~'L~'L~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Di›Di›'K}'K}'K}'K}HlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}*2? ->=I[=I[ ,> ,> ,>#)2#)2#)2(.7(.7#)2#)2(.7(.7(.7(.7/28:79G at A<89',4#%(#%(######""""""8888888887'vS:‹jW;) 
-
&3#.$-% .% .& /&!,#,#@70A71XNHXNHWNHWNHZRLYQLYQLXQLWQLWPLUOLSNLQMKOLJMJJ0//.-.,,-&(+"(!'			   15;6CT37=                        MMMKMP^ad_enY`hNZlNZlU\dV\eŠ‘™Š™Š™–Ÿ–Ÿ–ž•ž“œ—¦Œ’›ƒ¡DQbDQbDQbDQbDQbMUc¤ƒ‘ylŸ‡|€oiKo¡Š¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áKo¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢‹¯â‹¯â‹¯â‹¯âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨Û„¨Û„¨Û„©Û„©Û„©Û„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©ÛGkžGkžGkžGkžGkžGkžGkžGkžGkž…©Û…©Ü…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}'K}'K}'K}'K}'K}HO\=J[=J[=J[ -> ,> ,>(.7#)2#)2(.7(.7(.7#)2(.7(.7(/7(/7)/8/28114H7,99 at .05&,5$&)$$$######"""(((8888888888888884"nO9„gXˆjZE/ ( -"

-%' %$#" ! !$


						   48>7CU:GX                           JJJLLLKMPagp_enNZlLPV˜Ÿ§Œ’›Œ’›Œ’›‹’š‹‘šŠ‘™‘— –Ÿ–Ÿ–Ÿ“œ“œ—¦„¢„¢DQbDQbDQbDQbNVc…uo‡rjѼ³º«§‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áKp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢„¨Û„¨Û„¨Û„©Û„©Û„©Û„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGkžGkžGkžGlžGlžGlž…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}DhšDhšDhšIP\=J[=J[=J[=J[ -> ->(.7#)2#)2(.7(.7(.7#)2(.7(/7(/7)/8)/8)/803966:E?AC>A856,07%'*%')$$$######(((DDDBBB8888888880 cF1w]OcS{`QS;+57'


* 															  	
	;?E7CU;HY=I[                                 JJJMMMKMPacfbhq‘— ƒ¡ƒ¡‘— “œ“œ“œŒ“›Œ’›Œ’›‹‘š‘— ‘— —Ÿ™Ÿ¨”œ“œ“œ„‘¢„‘¢„‘¢„‘¢EQcHScNVd´¨§¿®¨Èµ®¯‘‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°â‹°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Œ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Ü…©Ü…©ÜGlžGlž…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÝHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž‡«Ý‡«ÝDhšDhšDhšDhš=J[=J[=J[=J[=J[=J[ ->(/7#)2#)2(.7(.7(.7#*2(/7)/8)/8)/8)/8)08*0903:56:88 at KBB=;@348*08&(+'(*%%%$$$(((EEE(((&&&   ">-"bF3oXMs[Ow]Py^PqbpXMdH5R<,Q;, &%%#'-"'-&3DS_qP\nR_p>J\?K]<AG                                          %%%DDDACF˜š™Ÿ¨Ÿ¦®„¢„¢„¢’™¡•žŽ•Ž”Ž”“œ“œŒ’›Œ’›’˜¡š ©™ ¨™Ÿ¨Ž”Ž”“œ„‘¢„‘¢„‘¢„‘¢…‘£‰“£Ž–¤¬¥§º¬¨À¯©‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Œ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãLq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜGlžGlž†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«ÝHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝDhšDhš=J[=J[=J[=J[=J[=J[=J[(/739B#)2(.7(/7(/7#*2$*3)/8)/8)/8)08*09+19(-5*.5/16437D>AG at B::@66:-29'),)'%BBBFFFEEE)))))))))&&&               																					                                          @@@FFFACFZ\_[ajagp„¢„¢„¢ž¥­Ÿ¦®—¦–¥–ž•žŽ•Ž””œ“œ‘— —Ÿ›¡ªš ©™ ¨Ž•Ž”Ž”…‘£…‘£…‘£EQcGRcKTdPWd­¥§¿¯ª‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãLp£Lp£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Œ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£…©Û…©Û…©Û…©Û…©Û…©Û…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHlžHlžHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«ÞŸ>J\>J\=J[=J[=J[=J[FLU39B#*2(/7)/7)/8$*3$*3$*3)/8)08*09*09*19',5(-5*.6.17338@<=G at BH@BXW]UUXLPWFHKDFHKKKHHH+++%%%%%%$$$###!!!!!!777777777777777777777AAAFFFACFACF\^aeltbhqDQbDQbDQbŸ¥®¡§°¡§°¡§°¡§°—¦–Ÿ”š£”š£“™¢’™¡’˜¡‘˜ ‘— ›¡ª›¡ªš ©•ž™Ÿ¨Ž”ERcERcERcERcHScLUdRXd|njŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬ÞŽŸŽŸŽŸŽŸ>J\=J[=J[FLUFLU(/7(/7*08*08%+3$*3$+3$+3*09*09*19&,5&,5'-6).6*/7-18NPURRVXUVc]^f^_[X]\XYTUZLQYKMPFHJ)))(((&&&%%%%%%$$$$$$###!!!!!!!!!777777777BBBEEEACGADGFIL\ckZ`iTZcDQbDQbDQbagpbiqcircir¢©±¢¨±¡¨°¡§°•œ¤•›¤”›£”š£“™¢’™¡’˜¡œ¢«œ¢«›¡ªš¡©•žY`hY_hERcERcERcGSdJTdNVdTYeLp¢Lp¢Œ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£±ã±ã±ã±ä±ä±ä±ä±ä±ä±ä±ä±ä±ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²äMq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞŽŸŽŸŽŸŽŸŽŸŽŸŽŸFLUFLUFLU)/8+08+08&+3&+3%+4%+4%+4*19+1:&,5'-5'-6(.6FLTHMTINUKOVOQWSTXYWX`[^lbac]_f_\a_aY\aRX_,.1*,.*+-***((('''&&&%%%%%%$$$$$$$$$###!!!!!!!!!!!!!!!%%%%%%%%%%%%"""""""""KKKJJJFFFGIL]_b^dm\bkV]eDQbEQcEQcEQccirdjsdksektdjsdjscir£©²¢¨±¢¨±–œ¥•œ¤•›¤”›£”š£“™¢’™¡£¬œ¢«›¢ª[ajZ`iOU^ERcERcFRdFRdITdLUdPWeVZeLp£Lq£Lq£Lq£±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ä±ä±ä±ä±ä±ä²ä²ä²äMq£²ä²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äMr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«ÞHmŸHmŸHmŸ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞŽŸŽŸŽŸŽŸ‚Ž ‚Ž ‚Ž ‚Ž ”›£Š™ŠŽ•-18,18',3',4',4&,4%,4+1:,2:'-5DJSEKSEKTFLTFLUHMUINVKOWLPWQSYTUZWWZpjje^`offb\_h`]eaaCCG8;A27?-/2+-/.+)******)))((('''&&&&&&%%%%%%$$$$$$$$$$$$$$$$$$######???EEEEEEEEE((((((###&&&%%%HJMHJMHJMHJM_en]dlZ`i_enEQcEQcEQcEQcbhqektflufluflufluektektdksdjscjr£©²¢©±¢¨±–œ¥•œ¤•›¤”›£”š£“™¢£¬\ckQW`[ajZaiOU^FRdFRdFRdHSdKUdNVeRXeX\fLq£Mq£Mq£Mq£Mq£±ã±ã±ã±ã±ã±ä±ä±ä±ä±ä²ä²ä²ä²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äMr¤Mr¤Mr¤Mr¤Mr¤Ž²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬ÞHmŸHmŸHmŸHmŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ”›£Š‘™‹•‹•PT[KOVJOV(-4(-4'-5'-5JOXEKSEKSEKTFLTFLTGMUGMUHNVIOWKPWLQXMRYPTZTV[\]a_^asljd^azporjkE at CLEBIEFEDG29A28A17@135,.1+-0+,/./1..0'),)))++++++++++++***FFFFFFACFACFEEEACFACFŠŒJLOJLOKQZ_en]clY_hU[dEQcEQcEQcEQcEQcagp[aj\bk\bkgnvgnvgmvgmvfluflueltektdksdjscjrcir¢©±—¦–œ¥•œ¤•›¤TZcSYbRYaRXaQW`[bj[ajZ`iFSdFSdGSdJTdLVePXeTZfZ]fMq£Mq£Mq£Mq£Mq£Mq£Mq£²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Ž²åŽ²åŽ²åŽ²åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³å³å³å³å³å³å³å³åNr¤Nr¤Nr¤Nr¤Nr¤³å³å†ªÜ†ªÜ†ªÝHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ­ß‚Ž ‚Ž ‚Ž ‚Ž ‚ ‚ ‚ ‚ ‚ …Œ”’•šŒ•‘”›LPVLPWKPW‹—‹—‹˜•‹‘™FLTFLTFLUGMUGMUHMVHNVINWIOWKPXLQYMRYNSZTX`X[a[]b]^c__ccacib`JDGi__aYYPJLD at C=;AKEDTQR@?A>>A;<A17 at 06?/6>/5>.4=-4<IOXHOWMS\•›¤•›¤”š£­²¹­±¸¦¬µ™Ÿ¨–œ¥QX`EQcEQcEQcEQcEQcEQc`fo[bj\bk]cl]dl^dm^dm]dlhnwhnwgnvgmvgmvfluflueltektdksdjscircir—ž¦—¦V\eU[d_fn^emSYbRXaQX`[bjPV_OV^FSdGSdITeLVeNWeRYfW[f\^gMq£Mq£Mq£Mq£Mq¤Mq¤Mq¤Mq¤Ž²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²åŽ²åŽ²åŽ²åŽ²åNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³å³åNs¥³å³å³å³åHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHmŸHmŸHmŸ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ß‰­ß‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‹‘š”–›Ž–Ž––—Œ—Œ—Œ‘˜Œ‘˜‘–ž‘—ž’š’š“›“›Ž“œŽ”œ”••žJPXJPXKQYQW_RW_SX`TY`UZaW[bZ]c\^c^_dCDHDDHTRSWQO@=BNHKbYZ^VWUNPMGJFAEgcgcaf¡ ¥¡Ÿ¥ Ÿ¥ Ÿ¥ Ÿ¥Ÿž¥Ÿž¥ŸŸ¥…‘£…‘£…‘£…‘£…‘£…‘£…‘£EQc`go[aj]cl]cl^dm^em_en_en_en_en^em^dm^dmioxhnwhnwgnvgmvgmvfluflueltektdjsdjscir˜ž§W]fagp`go`fo_enSYbRXa\ck[bj[ajFSdGSdITeKUeNWeQXfTZfY]g``gMq¤Mq¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Nr¤Ž²åŽ²åŽ²åŽ²åŽ²åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³å³å³åNr¤Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥Nr¥Nr¥Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥³å³å³å³å³å³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ³æ´æ´æ´æ´æ´æ´æ´æ´æOs¥Os¥´æ´æ´æHlžHlžHlžHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ƒ¡ƒ¡‘’–PRWOQWTW\Ž‘—Ž‘˜”—žŽ’˜Ž’™“—ž“˜Ÿ“˜ŸŽ“›Ž“›”œ”œ•••ž–ž‘–Ÿ‘—Ÿ’— —¥—¦™ž¦™Ÿ§šŸ§› ¨œ¡¨œ¡©¢©Ÿ£ª`dkbek^af_ag`bgabgiko_en^emhnw·´¶«§¨¶±± ¦¯ ¦¯ ¦¯ ¦¯”š£”š£¡¨°¤«³§­¶©¯¸©¯¸ž¤­ž¥­Ÿ¥® ¦¯`fo`fo`fo`fo`fo`fo`fo_fn_fn_en_en^em^dm^dmioxhowhnwgnvgmvgmvflufluektekt¥«´™Ÿ¨£©²£©²ahpagp`foTZcSYbRYa\ck\bkPV_GSeITeKUeMWePXfSZfW[f\^gdbhMr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤³å³å³å³å³å³å³å³å³åNr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æOs¥Os¥Os¥Os¥Os¥´æ´æHlžHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸImŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßƒ¡ƒ¡ƒ¡ƒ¡ƒ¡ƒ¡ƒ¡CPaCPaOVbRSWQRWPRWUW]•˜ž•˜ž•˜Ÿ•™Ÿ”˜Ÿ•™ •™ •™¡•œ•œ•–‘–ž‘–ž‘—Ÿ‘—Ÿ’— —¥˜¦˜ž¦˜ž¦™ž§™Ÿ§™Ÿ§š ¨› ¨›¡©š ©š ©U[dU\dW]eW]eX]eV\e–œ¥–œ¥–œ¥¡§°¡§°¬²»¬²»¬²»¬²»¬²»¬²»¬²»¬²»¬³»¬³»­³¼­³¼¡¨°¡¨°¡¨°¡¨°¡¨°agpagp`go`go`fo`fo`fo`fo_fn_en_en^em^dmioxioxhowhnwgnvgmvgmv§­¶¦¬µ¦¬µš ©¤«³¤ª³£©²¢¨±¡¨°`foTZcSZbRYaQX`\bkGSeITeKUeMWfPXfSYfV[gZ]g_`hNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥³å³å³å³å³å³æNs¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æOs¦Os¦Os¦Os¦Os¦Os¦Os¦Os¦Os¦HlŸHlŸHlŸHlŸHlŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸIm Im Im Im ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­à€€ƒ¡ƒ¡ƒ¡CPaCPaCPaCPaCPaQWcYY\XX\RSXWX]bdi—™Ÿ—™Ÿ—š ¢¥«¢¥¬–š¡–š¡–›¢—›¢’–ž’—ž’—Ÿ’—Ÿ’˜ “˜ ˜¥˜ž¦˜ž¦˜ž§™Ÿ§™Ÿ§™Ÿ¨™Ÿ¨™ ¨š ¨š ¨š ©š ©•›¤U[dU[dU[d•œ¤•›¤•›¤•›¤•›¤”›£¡¨°¢¨±­³¼­³¼­³¼­³¼­³¼­³¼­³¼­³¼­³¼­³¼­³¼¢¨±¢¨±¢¨±¢¨±¢¨±¡¨°agpagpagp`go`go`fo`fo`fo_fn_en_en_enipxioxioxhowhnw¨®·¨®·œ¢«›¢ª›¡ªš ©¥«´¤ª³£©²¢©±¡¨°¡§°TZcSYbRYa\ck\bjIUeKVeMWfOXfRYfU[gX\g\^gcbhNr¤Nr¤Nr¤Nr¤Nr¥Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥Ns¥Ns¥Os¥´æ´æOs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦Os¦Os¦Os¦Os¦Os¦Os¦Ot¦Ot¦´ç´ç´çµçµçµçµçµçµçµçµçµçµçµçµçµçPt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦\ÀHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸIm Im Im Im Im Im Im Im Im Im ‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰­à‰®à‰®à‰®àƒ¡ƒ¡ƒ¡KQZFLUFMUCPaCPaCPaCPaSXcRWcddgddhddiceicej˜š ˜› £¦¬£¦¬£§­¤§®¤§®˜œ£˜œ£“˜Ÿ“˜Ÿ“˜ ”™ ”™¡™ž¦™Ÿ§™Ÿ§™Ÿ§™Ÿ§™Ÿ¨™Ÿ¨š ¨š ¨š ©š ©š ©š ©š ©U[d•›¤•›¤•›¤•›¤•›¤”›£¡§°¡§°¡¨°­³¼­³¼­³¼­³¼­³¼­´¼­´¼­´¼­´¼­´¼­´¼­´¼¢¨±¢¨±¢¨±¢¨±¢¨±¢¨±¢¨±¢¨±agpagpagp`go`fo`fo`fo_fn_en_enjpyipxiox©°¸©¯¸¤¬£¬œ£«œ¢«›¡ªš¡©¥«´¤ª³£ª²¢©±¢¨±–œ¥•›¤SYbRXa]ckIUeKVfMWfOXfQYfT[gX\g[^h_`hgdiNr¥Nr¥Ns¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥´æOs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦Os¦Os¦Os¦Os¦Ot¦Ot¦Ot¦Ot¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µçPt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦\ÀHmŸHmŸHmŸHmŸHmŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬ßˆ¬ßˆ­ßImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸIm Im Im Im Im Im Im Im Im Im In In In In In In In ‰­à‰®à‰®à‰®à‰®à‰®à‰®à‰®àŠ®àŠ®àƒ¡CPaCPaKQZFMUKRZKRZCPaCPaCPaCPaUYcTXcRWceeheeieeiefjefkšœ¡¥§¬¥§­¥¨®¥¨®¥©¯¦©¯¦©°¦ª±›Ÿ¦›Ÿ§•š¡šŸ§šŸ§› §› ¨› ¨› ¨› ¨› ©› ©š ©š ©š ©š¡©Z`iZ`iZ`iU[d ¦¯ ¦¯ §¯¡§°¡§°¡§°¡¨°­³¼­³¼­³¼­³¼­³¼­´¼­´¼­´¼®´½®´½®´½®´½®´½®´½¢©±¢©±¢©±¢¨±¢¨±¢¨±¢¨±¢¨±agpagpagp`go`fo`fo`fo_fn_enjpyª±¹ª°¹ž¥­ž¤­ž¤­£¬£¬œ¢«›¢ª›¡ª¥«´¤ª³£ª²£©²¢¨±¡§° ¦¯”š£“™¢JUfKVfMWfOXfRYgTZgW\g[^h^`hcbijfiNs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥´æ´æ´æ´ç´çOs¦Os¦Os¦Ot¦Ot¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦‘µç‘µç‘µè‘µè‘µè‘µè‘µè‘µè‘µèPt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pt§\À\ÀImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ­ßˆ­ßˆ­ßˆ­ßˆ­ß‰­ßImŸImŸImŸImŸImŸIm Im Im Im Im Im Im Im Im Im In In In In In In In In In In In In Jn Jn ‰®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àCPaCPaT[cKQZFMUKRZKRZLR[GMV at BDCPaDPbWZcVYcTXcSXcgfi\[_ggjggkfgl§¨­§¨­§©®§©¯§ª¯§ª°§ª±§«±¨«²¡§¡¨¨¬³¨­´¨­´¨­µ©®µ©®¶©®¶©¯·©¯·©¯·ª¯¸ioxioxipxjpyjpyjqy`fo §¯¡§°¡§°¡§°¡¨°­³¼­³¼­³¼­´¼­´¼­´¼®´½®´½®´½®´½®´½®´½®´½®´½®´½£©²£©²£©²£©²¢©±¢©±¢©±¢¨±¢¨±agpagpagp`go`fo`fo §¯ ¦¯«±ºŸ¦®Ÿ¥®Ÿ¥®ž¤­ž¤­¤¬£¬œ¢«›¢ª¦¬µ¥«´¤«³£ª²¢©±¡¨° §¯”›£”š¢‹–§—§NWfPXgRYgT[gW\gZ]h^_hbaigdimgjOs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦´çµçµçµçµçµç‘µç‘µç‘µçPt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt§Pt§Pt§Pt§Pt§Pt§Pt§Pu§Pu§Pu§Pu§’¶è’¶è’¶è’¶è’¶èPu§Pu§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§\À\ÀImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßIm Im Im Im Im Im Im Im In In In In In In In In In In In In In Jn Jn Jn Jn Jn Jn Jn Jn Š®àŠ®àŠ®àŠ®àJn Jn CPaCPaU[dKRZGMVLR[LR[LR[GMVGNVHNWDPbDPbY[dWZdVZdUYcTYchgi]\_hhkhhl]^b©©®©ª¯©ª¯©«°©«±©¬±©¬²©¬³ª­³ª­´ª®´ª®µª®µª®¶ª¯¶ª¯¶ª¯·ª°·jowjpxjpxjpxjpyjpykqykqzkqzkqz`fo¡§°¡¨°¢¨±­³¼­³¼­´¼­´¼®´½®´½®´½®´½®´½®´½®´½®´½®µ½®µ½®µ½®µ½®´½£©²£©²£©²£©²£©²£©²¢©±¢©±¢¨±agpagpagp¡¨°¡§°¬²»¬²» ¦¯ ¦¯Ÿ¦®Ÿ¥®ž¥­ž¤­¤¬£¬œ¢«›¢ª¦¬µ¥«´¤ª³˜ž§—¦¡¨° §¯¡¦®Œ—§˜§™¨‘™¨RZgU[gW\hZ^h]_haaiecijfjOs¥Os¥Os¥Os¦Os¦Os¦Os¦Ot¦Ot¦‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µçPt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt§Pt§Pt§Pt§Pt§Pt§Pu§Pu§Pu§Pu§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§’¶è’¶èQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§\À\À\ÀImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßIm Im In In In In In In In In In In In In In Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Š®àJn Jn Jn CPaCPaCPaKRZV\eGMVLR[LR[LR[GNVHNWHOWIOXIOXDPb[\dZ[dX[dWZdVZdUYd_]__]`jil_^b__c  ¤««°«¬°«¬±«­²«­³«®³ £© £© ¤ª¬¯µ¬¯¶¬°¶¬°·¬°·lpwlpwlpxlqxlqylqylqylqylqzlrzlrzlr{lr{agp­³¼­³¼­´¼®´½®´½®´½®´½®´½®µ½®µ½®µ½®µ½¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾£ª²£©²£©²£©²£©²£©²£©²¢©±¢©±¢¨±¢¨±¢¨±­³¼¬³»¬²»¬²»«²º ¦¯Ÿ¦®Ÿ¥®ž¥­ž¤­£¬£¬œ¢«›¡ª¥¬´™ ¨˜Ÿ§˜ž§¢¨±¡§°¢§¯—¨Ž˜¨™¨‘š¨“›¨–œ©W\hZ^h]_i`aidciiejmgjOs¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è‘¶èPt§Pu§Pu§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§’·éQu§Qu§Qu§Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨\À\À\ÀImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­àIn In In In In In In In Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Š®áŠ®áJn Jn AFLCPaDPbLR[LR[V]eLR[LR[LS[HNWHOWIOXIPXJPYKQZBFL^]d\]d[\dY[dX[dWZdVZd`^``_akjma`ca`d¡¡¥­­±­­²­®²­®³­¯´¢¤©¢¤ª¢¥ª¢¥«­°·mpvmpwmqwmqxmqxmqxmrymrymrymrzmrzmrzmr{ms{ms{ms{ahpms|®´½®´½®´½®´½®µ½®µ½¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾£ª²£ª²£ª²£©²£©²£©²£©²ahpagplr{­³¼­³¼¬³»¬²»¬²»«²º ¦¯Ÿ¥®Ÿ¥®ž¤­ž¤­£¬œ£«œ¢«¦¬µš ©™Ÿ¨˜ž§¢©±—¥£¨°˜¨™¨š¨’›©”œ©–©™ž©›Ÿªž¡ª`aiccihejlgjpikPt¦Pt¦Pt¦Pt¦Pt¦‘µç‘µè‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶èQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨“·é“·é“·é“·éQv¨Qv¨Qv¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨\À\À\À\ÀImŸImŸImŸImŸImŸImŸImŸIm Im ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰­à‰®à‰®à‰®à‰®àIn In In Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Š®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áJn DPbDPbLR[LR[W]fLR[LS[MS\HNWIOXIPXJPYKQZLR[PRUQSVDQb^^e]]e\]eZ\dY[dX[dWZdb_ab`bb`cbad£¢¥££¦®®²¯¯³¯¯´¤¥©¤¥ª¤¦ª¤¦«cekcfkoqwoqworxorxoryoryosyoszoszoszns{ns{ns{ns{chpchqchqchqnt|®µ½®µ½¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¤ª³£ª²£ª²£©²£©²bhqms|ms|ls{lr{lr{­³¼¬³»¬²»¬²»«±ºŸ¦®Ÿ¥®ž¥­ž¤­£¬£¬œ¢«¦­µš¡©™ ¨™Ÿ¨˜ž§˜ž¦˜¨Ž˜¨™¨‘š©“›©•œ©—©™žª›Ÿªž¡ª¡¢«¥¤«gejlgkohkPt¦Pt¦Pt¦Pt¦‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’¶é’·é’·éQu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨“·é“·ê“·ê“·ê“·ê“·ê“·ê“·êRv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨\À\À\À\À\ÀIm Im Im Im Im Im ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰­à‰®à‰®à‰®à‰®à‰®à‰®à‰®àŠ®àŠ®àŠ®àŠ®àJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Š¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á„‘¢DPbDPbV\eW]fLR[GNVHNWHOWIOXJPYQW`RXaSYbRYaTUXTUXBFLa_e`^e^^e]]e\]eZ\eY[eX[dW[dnlmomndbd¥£¦¥¤§¥¥¨±°´¦¦©eeiefjefkefkegleglegmpsxpsypsypszptzptzpt{pt{pt{pt{pt|diqdiqdiqdiqdiqdiqot}¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯¶¾¯¶¾¯¶¾¯¶¾¯¶¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾£ª²bhqbhqms|ms|ms|ls{lr{lr{krzkqzkqz¬²»«²º«±ºŸ¥®Ÿ¥®ž¤­¤¬¨®·§®¶§­¶›¡ªš ©™Ÿ¨™Ÿ§™ž¦Ž˜¨™©š©’›©”œ©–©˜žªšŸªœ ªŸ¡«¢£«¥¤«¨¦¬¬¨¬nhkqjkPt¦Pt§’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·éQv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸êRv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©Rv©\À\À\À\À\ÀIm Im Im ‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰®à‰®à‰®à‰®à‰®à‰®à‰®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Š¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á„‘¢„‘¢„‘¢U\dV]eLS[HNWHNWIOXOU^JQYQW`RYaTZcagpacfmjiflugnvaVPb`ea_e_^e^^e]]e[]eZ\eZ\eY[epmnpnoece¦¥§§¥¨fehffigfjggjggkgglghlghmghmghnrtyrtzrtzrtzru{ru{ru{qu{fjpfjqfjqejqejqejqejqejrdjrou}°¶¾¯µ¾¯µ¾¯¶¾¯¶¾¯¶¾¯¶¾¯¶¾¯¶¾¯¶¾¯¶¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾mt|bhqms|ms|ms|ls{ls{lr{lr{krzkqzkqzjqyjpy«±ºŸ¥®Ÿ¥®ž¤­©¯¸¨®·§®¶§­¶›¡ªš ©¥«³šŸ§˜¨™©š©‘š©“›©•œª—ª™žª›Ÿª «Ÿ¢«¢£«¥¥¬©¦¬¬¨¬¯ª­²«­Pu§’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“·êRv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ëSw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©\À\À\À\À\À\À‰­à‰­à‰­à‰­à‰®à‰®à‰®à‰®à‰®à‰®à‰®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn ‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á„‘¢„‘¢…‘£…‘£LR[GNVHNWHNWIOXOU^[ajRXaSYbU[dahpcirektgmvioxjpyBGMbWPc`fb`f`_e_^e^^e]]e\]e[\eZ\eY[erop³°²gegsqssqtsruhgjhhkhhlhhlhimhimhinhjnhjosuzsu{su{sv{hjphkqgkqgkqgkqgkqgkqfkrfkrfjrfjrejrpu}±·¾±¶¾±¶¾°¶¾°¶¾°¶¾¯¶¾¯¶¾¯µ¾¯µ¾¯µ¾¯µ¾¯µ¾mt|bhqbhqbhqms|ls{ls{lr{lr{krzkqzkqzjqyjpyjpyioxioxž¥­©¯¸©¯¸¨®·§®¶§­¶¦¬µ¦¬´¦«³›Ÿ§Ž™©š©‘š©“›©”œª–ª—žª™Ÿªœ «ž¡« ¢«£¤¬¥¥¬©§¬¬¨­¯ª­±«­sklQu§Qu§’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“¸ê“¸ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸êRv©Rv©Rv©Rv©Rv©Rw©Rw©Rw©Rw©Rw©Rw©”¸ë”¸ë”¸ë”¸ë”¹ë”¹ë”¹ë”¹ë”¹ë”¹ë”¹ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ëSw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©\À\À\À\À\À\À‰®à‰®à‰®à‰®à‰®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áJn Jn Jn Jn Jn Jn Jn Jn Jn Jn¡Jn¡‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â…‘£…‘£…‘£…‘£—ž¦HNWHNWIOXOU^\bk]cl^emU\dbhqdjsfluhnwipxkqzlr{ahpeXPdWPdafc`fa`f`_f__f^^e]^ež¦œž¦›¦´±±µ±²ifgtrsurtusuutvjiljiljimjjmjjnjjnjkojkojkpikpikpikpikqikqikqhkqhkqhkqhkrgkrgkrgkrgkrfkrqv}²·¾²·¾²·¾±¶¾±¶¾°¶¾¯µ¾¯µ¾¯µ¾¯µ¾bhqbhqbhqahpahpagpagplr{lr{krzkqzkqzjqyjpyjpyioxiox]cl\ckgnv¨¯·¨®·§­¶¦­µ›¡©¦¬´§¬³Ž™©š©‘š©’›ª”œª•ª—žª™žªšŸ«œ «Ÿ¢«¡£¬¤¤¬¦¦¬©§­­©­°ª­pjlrklulmQu§Qu§Qu§“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“¸ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ëRw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ëSwªSwªSwªSxªSxªSxªSxªSxªSxªSxª\À\À\À\À\À\À\ÀŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áJn Jn Jn Jn¡Jn¡Jn¡Jn¡‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹°â…‘£…‘£…‘£…’£…’£Ž”‰˜NT]OV^[bj]cl_enagpX^gdksfmuhnwjpykrzagpbhqahphZQfYQgcfebfdafc`fb`f¢¡§¡ §ŸŸ§žŸ§ž§ž§œž§«§¨jghkgivsuvtvvtwvuwkjmkjmkknkknkkovwzvw{vw{vw{klpjlqjlqjlqjlqilqilqilqhkrhkrhkrhkrgkrgkrfkr³·¾²·¾²·¾²¶¾±¶¾¯µ¾bhqbhqahpahpbhpagpagp`go`go`fokqzkqzjqyjpyjpyipxioxiox]cl\ck\bk[bjfmuflu§­¶›¡ª›¡©™©Ž™©š©‘šª’›ª“œª•ª—žª˜ž«šŸ«œ «ž¡« ¢¬¢¤¬¥¥¬§¦­ª¨­­©­nilpjlrklulmQu§Qu¨Qu¨Qu¨Qv¨“·é“·ê“·ê“¸ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¸ë”¸ë”¹ë”¹ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ëSw©Sw©Sw©Sw©Sw©Sw©•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•¹ì•¹ì•¹ì•¹ì•¹ì•ºì•ºì•ºì•ºì•ºì•ºì•ºì•ºì•ºì•ºì•ºìTxªTxªTxªTxªTxªTxªTxªTxª\À\À\À\À\À\À\ÀŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áJn¡Jn¡Jn¡Jn¡‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°â†’£‡’£‡“£…’£…’£‰˜™ ¨š¡©[aj]cl_enagpX^gZ`i\bkioxjqylr{ahpbhqahpagp_fnj[QiZQhcg¨¤¨§£¨¥¢§¤¢§£¡§¢¡§¡ §  §ŸŸ§žŸ§Ÿ§ž§kghlhiwtuxuvxuwxvxxvxmkmxwyxwzxwzxw{ww{ww{ww{wx|klqklqklqjlqjlqjlqjlqilqikqhkqhkqhkqgkqgjq³·¾³·¾§«²eiqeipdipdipchpchpbhobgoagoafo_en_en_enjpyipxioxiox]cl]cl\bk\bk[aj[ajfluZ`iY_hZ_h™©Ž™©šª‘›ª’›ª“œª•ª–«˜ž«™Ÿ«› «¡¬Ÿ¢¬¡£¬£¤­¦¦­©§­«©®lhlnilpjlrkmtlmwnmQv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¸ë”¹ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ìSxªSxª•¹ì•ºì•ºì•ºì•ºì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºìTxªTxªTxªTxªTxªTxªTxª\À\À\À\À\À\À\À\ÀŠ®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áJo¡‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âŒ°âŒ°â…’£‰”¤‰”¤‰”¤‰”¤…’£…’£š ©›¢ªQX`_emagpY_gZai\bk^dm`folr{ahpahpchpbgolqyhnwl\Q®“­“«¥¨ª¥¨¨¤¨§£¨¦£¨¥¢¨£¢¨£¡¨¢¡¨¡ ¨  §Ÿ §žŸ§\]fmiimijmjknjknklnkmnkmywyywzywzyx{xx{xx{xx{xx{wx|llpklpklqklqjlqjlqjkqikqikqhkpsv|sv|su|ru{fipfipeipeiodhodhocgocgnbgnbfnafn^dm^dm]dliox]cl^cl]ck]bk\bj[aj[aifltektY_hX_gIVgMXhNXh‘›ª’›ª”œª•«–ž«˜ž«™Ÿ«› «¡¬Ÿ¢¬¡£¬£¤­¥¥­¨§®«©®lhmojmqjmpjmskmtlmvmmRv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©”¸ê”¸ë”¸ë”¸ë”¹ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•¹ì•¹ì•ºì•ºì•ºì•ºì•ºì–ºìTxª–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–ºí–ºí–ºí–ºí–ºí–ºí–»í–»í–»í–»í–»í–»í–»í–»íTy«Ty«Ty«Ty«Ty«\À\À\À\À\À\À\À\ÀŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áJo¡Jo¡Jo¡‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°â‹•¤Œ•¤Œ•¤‹•¤‹•¤†’¤†’¤›¡ª£¬—œ£choZ_g\ai^dk^dm`folr{ls{agpdipchomqx­±·š ©Ÿ¢¨³ ”±Ÿ”­§©¬¦©«¦¨ª¥¨©¤¨§¤¨¦£¨¥£¨¤¢¨£¢¨¢¡¨¢¡¨¡¡¨  ¨]^f]^f\^fzvvzvwoklokmolmolnnlnzxzzxzyxzyx{yx{xx{xx{xx{llpllpklpklpvw{uw{uv{tv{tv{µ·¼µ·¼´¶¼ruzfiofhnehnehndgncgmcgmbfmbfmaellpxlpwkpwkov^cj^cj]bj]bihmugltgltfksKWhKWhOYhPYhQZhR[iS[iU\i˜ž«™Ÿ«š «œ¡¬¡¬ £¬¢¤­¤¥­¦¦®©¨®«©¯limojmrknslmtlmrkmvmmvmnyonRv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Rw©”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•¹ì•¹ì•ºì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºìTxªTxªTxªTxªTxª–ºí–ºí–ºí–ºí–ºí–»í–»í–»í–»í–»í–»í–»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»íUy«Uy«Uy«Uy«\À\À\À\À\À\À\À\À\ÀŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯âJo¡Jo¡Jo¡Jo¡Jo¡‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°â†’¤Ž–¤Ž–¤Ž–¥Ž–¥–¥–¥†’¤†’¤™œ¢›ž¥¡§^bi`dkbfmdhokrzlr{lr{qt{psy°³¹®±·¡£©°¯³˜¦µ¢”º¤–¹¤–¯¨©®§©­§©¬¦©ª¥©©¥©¨¤©§¤©¦£©¥£©¤¢¨£¢¨¢¢¨¡¡¨__g^_g^_g]^g{vv{ww{wxolmolmolmolnzxzzxzzxzyxzyxzmlomlollolkowwzvwzvvz·¸¼··¼¶·¼¶·»µ¶»µ¶»´¶»rtyqsyegmegmdglorxoqwnqwmqwmpvlpvlovkouknu_bijntimtimthlsNXhNXhPZhQZhR[iS[iT\iU\iW]iX^jY^j[_jž¢¬ £¬¡£­£¤­¥¦­¨§®ª©¯­ª¯njnpkorlotmnumnvmnvnnwnnxnnyonRv©Rv©Rw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©•¹ë•¹ë•¹ë•¹ì•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºíTx«Tx«Tx«Ty«Ty«Ty«Ty«Ty«—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»î—»î—»î—»î—»î—»î—»î—»î—»î—»î—»î—»î—¼îUy¬Uy¬\À\À\À\À\À\À\À\À\À‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹¯âJo¡Jo¡Jo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Œ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ã—¥˜¥˜¥˜¥˜¥—¥—¥—¥Ž—¥œž¤ž¡¦¬®´®±¶dglfhnru{krzsu{rtz§©®¥§¬£¥ª­®³¥£¥œž§“™¦¹¤•Âª™Ä¬›Â©˜±©ª°¨ª¯¨ª­§ª¬§ª«¦ªª¦©©¥©¨¥©§¤©¦¤©¥£©¤£©baga`g``g``g__g^_g]_gpkkpklpll{wx{wx{wyzwynlmnlnnlnmknmknlknlkn­¬¯¬¬¯¸·»··º··º¶¶ºµ¶ºµµº´µ¹¨©®fglegkefkdfkoqvoqvnpunpumoumou`ci`bh_bh_bhPYhPYhQZhRZiS[iT[iU\iV]iW]iX^jY^jZ_j[_j\`j^ak`bkack¥¦­§§®©¨®«©¯®«°okormpunpvopwoownoxnnxonyonzon{pn{poRw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxª•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–ºí–»í–»í–»í–»í—»íTy«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«—»í—»í—»î—»î—»î—»î—»î—¼î—¼î—¼î—¼î—¼î—¼î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼îVz¬\À\À\À\À\À\À\À\À\À\À‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Œ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã‘˜¥“™¥“™¥’™¥’™¥’™¥‘˜¥‘˜¥‘˜¥‘˜¥¢£¨¯±µ²³¸rtyhjotv{µ·¼©ª¯¨©­±²·¯°´¢¢¦š§ŸŸ§£¢¨§¤¨—›§È®›Ï³ Ï³ŸÇ«—³ªª²©ª°©ª¯©«¯¨«®¨«­§«¬§ªª¦ª©¥ª¨¥ª§¤ª¦¤ªdbhcbhbahaaha`h``h_`g__g^_g]_gokkokk{wxzwxzwxzwxyvxmjl®¬®®¬®­«®¸·¹¸·¹·¶¹·¶¹«ª­ª©­©©¬©©¬¨¨¬¨¨¬efjeeideioptoptnotbchachabgS[hS[hS[iT[iU\iU\iV\iW]iW]iX^jY^jZ_j[_j\`j]aj_ak`bkbckcdkeelgfligm­«°°¬±qlptoqwpryqrzqqzppzppzpozpo{po|po|qo|qoSw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxª–ºì–ºì–ºì–ºí–ºí–ºí–»í–»í–»í–»í—»í—»í—»í—»í—»í—»íUy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uy¬Uz¬˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï\À\À\À\À\À\À\À\À\À\À‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°â‹°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Œ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ãŒ‡„”š¦•š¦•š¦•š¦”š¦”š¦“š¦“™¦“™¦“™¦“™¦²³·µµ¹««¯«¬°«¬°¶¶º¨©¬²²¶¤¤§²°±Ÿ§¢¡¨¦£¨ª¥©¯¨ªµ««Í±Òµ Ò³žÐ°šµ««´««´««³««²ª¬±ª¬±ª¬°ª¬®©¬­¨¬¬§««§«ª¦«©¦«fciechdbhcbhbahbahaahaah``h_`h_`h^_h]_hzvvzvv»·¸¯«¬®«¬®«¬­«¬¹¶¸¸¶¸¸¶¸·µ··µ·¶´·ª¨«©¨«¨§ª´³¶³³¶qptppsV\iV\iV\iU\iU\iV\iV]iW]iX]iX^iY^jZ_jZ_j[_j\`j]`j^aj_ak`bkbckcckddkeelgfligmkinnjoqlp¶°³wpszst}tu~tt}ss}rr|rq|qp}qo}qo~qo~ro~roSw©Sw©Sw©SwªSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTxªTx«–»í–»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»í—»îUy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uy¬Uz¬Uz¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬˜¼î˜¼î˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜¼ï˜½ï˜½ï˜½ï˜½ï˜½ï˜½ï˜½ï˜½ï˜½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï\À\À\À\À\À\À\À\À\À\À\À\À‹¯â‹°â‹°â‹°â‹°â‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Œ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ã±ã±ã±ã±ã”š¦–›¦—›¦—›¦—›¦–›¦–›¦–›¦–›¦•›¦•›¦•›¦TYeSYekjmvvy·¶¹ª©¬³²µ¥£¦œž§  ¨¥£¨©¥©­§©²ªªº¯®Å¸µÄ¬›Ò³œÒ±™Ò±˜Ñ°˜·¬«¶¬«¶¬¬µ¬­µ­­µ­®´­®³­¯²¬®±«®°«®¯ª­­©­¬¨¬iejhejfdieciecidbicbicbhbahaahaah¢¢ª¡¢ª¡¢ª ¢ª ¢ª ¡ªŸ¡ªŸ¡ªž¡ªž¡ªž¡ª¡« « «œ «œ «œ «› «› «› «Y^iX^iY^iY^iY^iZ^iZ_i[_j\_j\`j]`j^aj^aj_aj`bkabkbckcdkddkfelgflhfljgmkhmnjnplo¶°³º³µ½¶·À¸¹Â¹º‚xx‚wvvu€ustrsqrprpsp€sp€sp€spSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«—»í—»í—»í—»î—»î—»î—¼î—¼î—¼î—¼îUy¬Uy¬Uz¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ï\À\À\À\À\À\À\À\À\À\À\À\À\À‹°â‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Œ±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã—›¦˜œ¦™œ¦™œ¦™œ§™œ§˜œ§˜œ§˜œ§˜œ§VZeVZeVZeVZeVZeVZeVZe˜œ§˜œ§Ÿ ¨£¢¨§¤©¬¦©°¨ª¶¬«¿³°Ì¾¹ÛÊÄ¢—Ò±™Ô¬Î®˜Ñ°˜¶£•¸­¬¸­¬¸®­¸®®¸¯¯¸°°¸°±¸°²·°²¶°²µ¯²´®±²­°°¬¯milkgljfkhejgejfdjfdieci¦¥«¥¤«¤¤«¤¤«¤¤«££«££«¢£«¢£«¡£«¡¢« ¢« ¢« ¢«Ÿ¢«Ÿ¢«Ÿ¢«ž¡«ž¡«ž¡«ž¡«ž¡«Ÿ¢¬]`j]`j^`j^aj^aj_aj`aj`bjabkbckcckcdkddkedkfelgflifljglkhmmimnjnpkosmp¹²µ½¶·Á¹ºÅ¼¼È¾¾Ê¿¾É¾½È½»Ç»¹ƒwu‚ustrtqtptp‚tp‚tp‚tpSxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼îUz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­Vz­Vz­V{­V{­V{­V{­V{­W{­W{­™½ï™½ï™½ï™½ð™½ð™½ð™½ð™½ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ð™¾ðš¾ðš¾ðš¾ð\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ä±ä±ä±ä™œ§š§›§›§›§›§›§Y\eY\eX\eX\eX\fX\fX\fX\fX\fY\fY\f¡¡¨¦£©ª¦©®¨ª³ªªº¯­Å·´ÓþâÏÈäÏÅÜźֲ˜Åª—ɬ—Ì®˜Ù²”¿¨™¹®¬¹®­º¯­º°¯»±±¼³³½´´½µ¶½¶·½¶·¼µ·º´¶¹³µ·±´rmqpkoojnmimkhl¬©®«¨­ª§¬©¦¬¨¦¬§¥¬¦¥¬¦¥¬¥¥«¥¤«¤¤«¤¤«£¤«£¤«££¬¢£¬¢£¬¢£¬¡£¬¡£¬ £¬ £¬¢¤¬£¤¬£¤¬¤¤¬bcjbckcckcckddkedkeekfekgelhflifljgljglkhmmimnjmpknrlotnpwpr½µ¶À¸¹Å¼¼ÊÀ¿ÎÃÂÐÄÂÏÃÁοÌÀ½Ê¾»É¼¸Çº¶„vrƒuqƒuqƒupƒup„uq„uqTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬Uz¬˜¼î˜¼î˜¼î˜¼îVz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­Vz­Vz­V{­V{­V{­V{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­š¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ð\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŒ°âŒ°âŒ°âKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢±ã±ã±ã±ã±ä±ä±ä±ä±ä²ä²ä²ä²ä›ž§œž§œž§ž§ž§[]f[]f[]f[]f[]f[]f[]f[]f[]f[]f[]f[]fa`g¨¤©­§ª±©ª·¬«¾²¯Ë¼·ÙÇÁäÐÈßɾÙÀ³ê½›½¯¬¼¯¬Ä¥ŒË­˜Ñ°™Ó³œ»®¬º¯­»¯­»°®¼±°½³²¿µ´Á¸·ÃººÄ»¼Å¼½Ä½¾Ã¼½Áº¼¾¸ºztvxru·²µµ°´³®²±­±¯«°­ª¯¬©®«¨­ª¨­©§­©§¬¨¦¬§¦¬§¦¬¦¦¬¦¥¬¦¦¬§¦¬§¦¬§¦¬§¦­§¦­§¦­§¦­¨¦­¨§­©§­©§­ª¨­hfkhfkiflifljglkgllhllhlmimnimojmpjmqknsmovopyqr|st¹¹Æ¼¼ÊÀ¿ÏÄÂÓÈÅÕÉÆÕÈÆÔÇÄÒÅÂÐÃÀÎÁ½Ì¾ºÊ¼¸Éº¶È¹´…vq…vq…vq…vq…vq…vqTxªTx«Tx«Tx«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬˜½ïVz¬Vz¬Vz¬Vz­Vz­Vz­V{­V{­V{­V{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{®W{®W{®W{®W|®W|®W|®W|®W|®š¾ðš¾ðš¾ðš¾ñš¾ñš¾ñš¾ñš¾ñš¾ñš¿ñš¿ñš¿ñš¿ñš¿ñš¿ñš¿ñ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢±ä±ä±ä±ä²ä²ä²ä²ä²äŽ²äŽ²äŽ²ä˜œ§Ÿ§žŸ¨]^f]^f]^f]^f]^f]^f]^f]^f]^f]^f]^f]^f]^f]^fdbghdhmfh³ª«º®¬Ãµ°ÑÀºßÌÄâÍÃÛ÷ؾ°ÝÀ¯¾°¬¾°¬½°¬½°¬½¯¬Í®˜Õ²™¼¯¬¼¯­¼¯­¼°®½±¯¾²°À´³Á¶µÄ¹¸Æ½¼É¿¿ËÂÂÌÃÄÌÄň‚†€Æ¿Áý¿Àº¼½·ººµ¸·²¶´°´³®²±­±°¬°¯«¯¯ª¯®ª®­©®­©­¬©­¬©­¬©­¬©­¬©­¬©­¬©­¬©­­©®­©®­©®®ª®®ª®®ª®¯ª®¯«®nilnilnilojmpjmqkmrkmslntmnvnowopzqq}sswvǽ¼ÌÁ¿ÑÅÃÕÉÇØÌÉÚÍÊÚÍÊÚÍÉÙËÇ×ÉÅÔÆÂÒÿÏÀ¼Í¾¹Ë¼·ÊºµÉº´É¹´‡wq‡wq‡wq‡wqTx«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬™½ï™½ï™½ïV{­V{­V{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{­W{®W{®W{®W{®W|®W|®W|®W|®W|®X|®X|®X|®X|®X|®X|®X|®X|®X|®›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²ä›ž§]^f^^f^_f^_f^_f__f__f__f__f__g__g__g__g__g__gfchkehoghtjizmjƶ±ÔüâÍÄÞǼٿ²Û¾¯àÁ°¿°¬¿°¬¿°¬¾°¬¾°¬¾°­¾°­½°­½°­¾°­¾±­¾±®¿²®À³°Á´±Ã¶´Å¹¶È»¹Ë¿¼ËÁÀŒ‚‚Ž……‡‡’‰ˆ’ˆˆÒÉÉÐÇÇÍÄÅÉÁž¿Âº¼¾·¹¼µ·º³µ¸±´·°²µ¯±´®°³­°²¬¯²¬¯²¬¯²¬®²¬®²¬®²¬®²¬®²¬®²¬®²¬¯³¬¯³­¯´­¯´­¯µ®¯µ®¯slmtlmumnvnnwnoyoo{qp|rrtsvu…zxÌÀ¾ÒÅÂ×ÊÆÚÍÉÝÏËÞÐÍßÑÍßÑÍßÐÌÝÎÊÛÌÇØÉÄÕÅÀÒ½ϿºÍ½¸Ì¼¶Ë»µËº´Ëº´Ëº´‰xrˆxrUy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­™½ï™½ï™½ð™½ð™¾ð™¾ðW{­W{­W{­W{­W{­W{­W{®W{®W{®W|®W|®W|®W|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|¯X|¯X|¯X|¯X}¯X}¯›¿ñ›¿ñ›¿ò›¿ò›¿ò›¿ò›¿ò›¿ò›¿ò\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀKo¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Ž²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äLp£[]f^^f__f``f``g``ga`ga`ga`ga`ga`ga`gbagbagbaghdhmfiqiivki|ok†vp”‚záÌÂÛ¶پ°ÞÀ¯´æ´æ¿±­¿±­¿±­¿±­À±­À²­À²­À²­¾°­À²­À²­À²®Á²®Á³¯Â´°Ã¶²Å·´Çº¶ˆzw‹~zŽ~‘„…„—Šˆ˜ŒŠ™‹ÚÏÍÙÎÌ×ÌÊÓÉÈÐÆÅÌÂÂÉ¿¿Æ½¼ÃººÁ¸¸¿¶¶½´´»²³º±²¹°±¸°°¸¯°¸¯°¸¯°¸¯¯¸¯¯¸¯¯¸¯¯¸¯¯¸¯°¹°°º°°º°°»±°»±±¼²±zpo|qo}rptr‚us„xu‡{x‹~{ÑÄÀÖÈÄÙËÇÝÎÊßÑÍâÓÏãÔÐäÕÐäÕÐãÓÎáÑÌÞÎÉÛËÅØÇÁÕľÒÁ»Ð¿¸Î½·Î¼µÍ¼µÍ»µÍ»µÍ»µÍ»µˆxrUy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­V{­W{­™½ð™¾ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðW{®W{®W|®W|®W|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|®X|¯X|¯X|¯X|¯X}¯X}¯X}¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯œÀòœÀòœÀòœÀòœÀòœÀòœÀò\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀKo¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Ž²äŽ²äŽ²äŽ²äŽ²äŽ²äLp£Lp£Lq£Lq£]^f__f``ga`gbagbagcagcagcagcagdbgdbhdbhechieiogisjixljpk‰xq–ƒzž‡}ÚÀ³Û¿¯â°´æ´æ´æ¿±­À±­Á²­Â²­Â²­Â³­Â³­Â³®Â³®Â³®Â³®Ã³®Ã³®Ã´¯Ã´¯Äµ±ƒtp…vr‡xt‰{wŒ~z}’„€•‡ƒ—‰…™‹‡ÜÎÊÜÏËÜÏËÛÎËÙÌÉÖÉÇÓÇÅÑÄÂο˿½È¼ºÆº¸Ä¸¶Â¶µÀµ´À´³¿´²¾³±¾³±¾²±¾²±¾²±½²°¾²±¾³±¿³±À³±À´±Áµ²Âµ²Ã¶³Ä·´„vs†xu‰{wŒ~y€|ÔÆÁ×ÈÄÚËÇÞÎÉáÒÍäÔÏæÖÑèØÒèØÒè×ÑæÖÐäÓÍáÐÊÝÌÆÚÉÂמԼÒÀ¹Ð¾·Ï½¶Ï½µÏ¼µÏ¼µÏ¼µÎ¼µÍ¼µ˜¼îUy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­V{­W{­W{­W{­š¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¾ñš¿ñš¿ñX|®X|®X|®X|®X|®X|®X|®X|®X|¯X|¯X|¯X}¯X}¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y}°Y}°œÀòœÀòœÀó\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀKp¢Kp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Ž²åŽ²åŽ²åLq£Lq£Lq£Lq£Lq£Lq£__fa`gb`gcagcagdbgdbgebgebhfchfchhdihejlgkqikukjzmj€qkŠxq˜ƒzœ„y—}oš}m´æ´æ´æ´æ´æ´çÀ±­Â²­Ã³®Ã³®Ä´®Ä´®Ä´®Å´®Ä´®Å´®Å´®Å´®ƒrlƒsmƒsn„to…up‡wqˆys‹{v}x€{’ƒ~”…€–‡‚˜ˆ„ÛÌÇÛÌÈÛÌÇÚËÇÙÊÆ×ÉÄÕÇÂÓÅÀÑþÏÁ¼Í¿»Ë½¹É»·Ç¹¶Æ¸µÅ·´Å·³Ä¶²Ä¶²Ä¶²Ãµ²Ãµ²Ä¶²Ä¶²Å·²Æ·³Ç¸³È¹´ÉºµÊ»¶Ì¼¸Î¾¹~y€{ÕÆÀØÈÃÜËÆßÎÉáÑËäÔÎç×ÑéØÒêÙÓëÙÓêØÒè×ÐæÔÎãÑÊßÍÆÜÊÂÙÆ¿ÖüÔÁºÒ¿¸Ñ¾·Ñ¾¶Ñ¾¶Ñ½¶Ð½¶Ð½¶Ï½¶˜¼î˜¼ï˜¼ï˜½ïVz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­V{­W{­W{­W{­W{­W{­W{­š¾ðš¾ðš¾ðš¾ñš¾ñš¾ñš¿ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñX|¯X|¯X|¯X}¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y}°Y~°Y~°Y~°Y~°Y~°Y~°Z~°Z~°Z~°Z~°Z~°\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lq£Ž³åLq£Lq£Lq£Lq£Mq£Mq£Mq£Mq£``gbagcagdbgebgfchfchgchgdhhdijfjlhlpjnumnxml|olqkŠwp™ƒyš‚v—|n›}nNr¤Nr¤´ç´ç´çµçµçµçÁ²­Ä³®Å´®Å´®Æµ®Æµ®Æµ®Æµ¯Çµ¯„sl„sl…sm…sm…tm…tn†uo‡vpˆwqŠys‹{u}wy‘{“ƒ}•„~–…€ÙÉÃÙÉÃÙÉÃØÈÃ×ÇÂÖÆÁÔÄ¿ÓýÑÁ¼ÐÀºÎ¾¹Ì½·Ë¼¶Ê»µÊº´É¹´É¹³È¸³È¸³È¸³È¸³È¸³É¹³Ê¹´Êº´Ë»µÌ¼¶Î½·Ï¿¹ÑÀºÓ¼“‚|–…ÜËÄßÍÇâÐÊåÓÌçÕÏéØÑëÙÒìÚÓìÚÓëÙÑé×ÏçÔÍäÒÊáÎÆÝÊÂÚÇ¿ØļÖºÔÁ¸Ó¿·Ó¿¶Ò¿¶Ò¾¶Ò¾¶Ò¾¶Ñ¾¶˜½ï˜½ï™½ï™½ï™½ï™½ïVz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{­W{­W{­W{®š¾ñš¾ñš¿ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›Àò›ÀòY}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y}°Y~°Y~°Y~°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lq£Lq£Lq£Lq£Ž³åŽ³å³åMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£a`gcagdbgebhfchgchhdhidhjeikgjnjmqmpzrr}rq~qn‚rlŠwo—wšu—|n›~nNr¤Nr¤Nr¤Nr¤µçµç‘µç‘µç‘µç‘µçÄ´®Å´®Æµ®Çµ¯È¶¯È¶¯†tl†tm†tm†tm†tm‡tm‡tm‡un‡unˆvo‰woŠxp‹yrŒzsŽ|u}w‘x’€y“{”‚{×Å¿×Æ¿×Æ¿ÖÅ¿ÕľÔýÓ¼ÒÁ»ÑÀ¹Ð¿¸Î½·Í¼¶Í¼µÌ»µÌ»´Ëº´Ëº´Ëº³Ëº³Ëº´Ìº´Ì»´Í¼µÎ½¶Ï¾·Ñ¿¸ÒÀ¹Ô»“z–„}˜†›‰‚žŒ„äÑÊæÔÌéÖÎêØÐìÙÑíÚÒìÙÑëØÐêÖÎçÔËåÑÉâÎÆÞÊÂÛÇ¿Ùż×úÖÁ¸ÕÀ·ÔÀ·ÔÀ¶Ô¿¶Ô¿¶Ó¿¶Ò¿¶™½ï™½ï™½ï™½ï™½ï™½ï™½ð™½ðV{­W{­W{­W{­W{­W{­W{­W{®W{®W|®W|®š¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòY}¯Y}¯Y}°Y}°Y~°Y~°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z~±Z~±Z±Z±Z±\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lq£Lq£Lq£Lq£Lq£³å³å³å³å³å³å³åMq£Mq£Mq£Mq£Mq£Mq£Mq£a`gdbgfchfchhdhhdhjehkfilgjpknups~vw‚wvƒuq„smŠvn•ušu—|nNr¤Nr¤Nr¤Nr¤Nr¥Nr¥Nr¥‘µç‘µç‘µç‘µç‘µç›–•Åµ¯Ç¶¯È¶¯‡tm‡tm‡umˆumˆumˆumˆumˆum‰um‰vn‰vn‰vnŠwoŠwo‹xpŒyqzrŽ{s|t}v‘~w’w’€xÕûÕüÕûÕ»ÔºÓÁºÓÀ¹Ò¿¸Ñ¿·Ð¾¶Ï½¶Ï½µÎ¼µÎ¼´Î¼´Î»´Î»´Î¼´Î¼´Ï¼µÐ½¶Ñ¾¶Ò¿·ÓÀ¸Õº“€y•‚z—„|š‡‰ŸŒ„¢Ž†¤ˆéÕÍë×ÎìØÏìØÏìØÏë×ÎéÕÌçÓÊåÐÇâÍÄßÊÁÝȾÚżÙú×¹ÖÁ¸ÖÁ·ÖÀ·ÖÀ·ÕÀ·ÕÀ·ÔÀ·Ñ¾·™½ï™½ï™½ð™¾ð™¾ð™¾ðš¾ðš¾ðš¾ðW{­W{­W{­W{®W|®W|®W|®X|®›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóœÁóÁóZ~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z~±Z±Z±Z±Z±Z±[±[±[±[±[±\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Mq£³å³å³å³å³å³å³å³å³å³åMq£Mq£Mq£Mq£Mq£[QIbagebhgchhdhidhjehkfimgjqkmwqs~wz‰~}ˆ{w†uo‰vm“}r™t—|nNr¤Nr¤Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥‘µç‘µç‘µè‘µè‘¶è‘¶è€ql…sl†tm‡umˆum‰um‰vm‰vmŠvmŠvnŠvnŠvnŠvn‹wn‹wn‹woŒxoŒxoŒypyqŽzqŽ{r{s|t‘}t‘}u‘~uÔÁ¸ÔÁ¸ÔÁ¸ÔÀ¸ÔÀ¸ÓÀ·Ó¿·Ò¿¶Ò¾¶Ñ¾µÑ½µÑ½µÐ½µÐ½´Ð½´Ñ½µÑ½µÑ¾µÒ¾¶Ó¿·ÔÀ·ÕÁ¹”€w•x—ƒz™…|›‡~‰€ ‹‚¢„¤†¥‘ˆ§’‰ëÖÍëÖÍëÖÌêÕËèÓÉæÑÇäÏÅâÌÃàÊÀÝȾÛƼÚĺÙùظ׸×Á·×Á·×Á·ÖÁ·ÖÁ·ÔÀ·™½ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¾ñW|®W|®X|®X|®X|®›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁóZ~°Z~°Z~±Z~±Z~±Z±Z±Z±Z±[±[±[±[±[±[±[±[±[±[±[±[±\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Mq£Mq£Mq£³å³å³å³å³å³å³å³æ³æ³æ³æ´æMq£Mq£Mq¤Mq¤Mq¤]^gcahechgdhiehjeikfimgioikvoq€yzŽƒ‚‚‹{u‰vnzp™t—|nNr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥‘¶è‘¶è‘¶èOs¥Os¥Os¥ƒrl†tmˆum‰vmŠvmŠvn‹wn‹wnŒwnŒwnŒwnŒwnŒxnxnxoxoxoŽyoŽypŽzpzq{q{r|r‘|s‘|s‘}sÔÀ¶ÔÀ¶Ô¿¶Ô¿¶Ô¿¶Ô¿¶Ó¿¶Ó¾µÓ¾µÓ¾µÓ¾µÓ¾µÓ¾µÓ¾µÓ¾µÔ¿¶Ô¿¶ÕÀ·ÖÁ·”v•€w—x˜ƒyš…{›†}ˆ~ŸŠ€¡Œ‚£ƒ¤…¦†¦†§‘‡éÔÉéÓÈçÑÇæÏÅäÎÃâÌÁàÊ¿ÞȽÜÆ»ÛźÚĹÙøÙøٸٸظظ×Á¸ÕÁ¸š¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñX|®X|®›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÁôÂôÂôÂôžÂôZ±[±[±[±[±[±[±[±[±[±[±[²[²[²[²[€²[€²[€²\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLp£Lp£Lp£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Mq£Mq£Mq£Mq£Mq£³å³å³å³å³å³æ³æ³æ³æ´æ´æ´æ´æ´æ´æ´æMq¤Mq¤Mr¤Mr¤^_gdbhfchhdhjeilfimgiohjslm|uw‡€—Š‡‘|‹xpŽyo™€t—}o•{nNs¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¦Os¦Ot¦Ot¦…smˆum‰vm‹vn‹wnŒwnxnxnxnŽxnŽxoŽxoŽyoyoyoyoyozpzpzp{q‘{q‘{q‘|r’|r’|r’|rÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÕ¿µÖÀ¶ÖÀ¶×Á·”t•u–€v˜‚w™ƒxš„zœ†{‡}Ÿ‰~ Š¢‹£Œ‚¤ƒ¥Žƒ¥Žƒ¥Žƒ¤ƒæÏÄåÎÃãÌÁâËÀàɾßȽÝÆ»ÜźÛĹÛĸÚøÚøÚøÚøÙøظÖÁ¸š¾ðš¾ðš¾ðš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿òX|¯X|¯›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂô[±[±[±[²[²[²[€²[€²[€²[€²\€²\€²\€²\€²\€²\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLq£Lq£Lq£Lq£Lq£Lq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£³å³å³æ³æ³æ³æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æMr¤Mr¤Nr¤_`gdbhgdhieikfimgiohjqjkxpq„|}–Šˆ˜‰„}vŽxn•}r˜~q”{nNs¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥’¶è’¶è’¶èOs¦Ot¦Ot¦Ot¦Pt¦Pt¦†tm‰vn‹wnŒwnxnŽxnŽxnyoyoyoyozozozo‘zo‘zp‘zp‘{p‘{p’{p’{q’|q’|q“|q“|q“|r“|rÖ¿µÖÀµÖÀµÖÀµÖÀµÖÀµÖÀµÖÀµ×Àµ×Àµ×Àµ×Á¶ØÁ¶•~t–t—€u—v˜vš‚w›„xœ…z†{ž‡| ˆ}¡‰~¢Š¢‹€£‹€£Œ€£Œ€£‹€¢‹¡‰~ãË¿âʾáɽßȼÞÇ»ÝƺÝŹÜĹÜĸÜĸÛĸÛĸÛøÚøظš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòX}¯X}¯Y}¯Y}¯œÀòœÀòœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõ[€²\€²\€²\€²\€²\€²\€²\€²\€²\€²\€²\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£³æ³æ³æ³æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æNr¤Nr¤Nr¤``hechhdijeilfingipijtlm~uv‹ƒƒœŽŠ–„~yp’{o™r•{nOs¥Os¥Os¥Os¥Os¥Os¥Os¥Os¥’¶è’¶è’¶è’¶è’¶è’¶éOt¦Pt¦Pt¦Pt¦Pt¦Pt¦Pt¦ˆun‹wnŒxnŽxnŽyoyoyozo‘zo‘zo‘zo’{o’{p’{p’{p“{p“{p“|p“|p“|q”|q”|q”}q”}q”}q”}r•}rØÀµØÀµØÀµØÀµØÁµØÁµØÁµÙÁµÙÁ¶ÙÁ¶—s—s—€t˜€t™u™vš‚v›ƒwœ„x…yž†zŸ‡{ ˆ|¡‰}¡‰}¢‰}¢Š~¢Š}¢‰}¡‰}¡ˆ| ‡{Ÿ†záȼàÈ»ßÇ»ßƺÞƹÞŹÝŹÝŹÝŹÜĹÜĹÛĹÙùš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòY}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°œÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃö\€²\€²\€²\€³\€³\€³\³\³\³\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£³æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´ç´ç´ç´çµçµçNr¤Nr¤aahechheikfimgiohjrjkxop†}|™Œ‰œ‹†’~vyn˜r—|oYTROs¥Os¥Os¥Os¥Os¥Os¥’¶è’¶è’¶è’¶é’¶é’·é’·é’·é“·éPt¦Pt¦Pt¦Pt¦Pt¦Pt§Pt§‰vnŒxnŽxoyozo‘zo‘zo’{o’{p“{p“{p“|p”|p”|p”|p”|p•|q•}q•}q•}q•}q–}q–}q–~q–~r–~rÙÁµÚÁµÚÁµÚÁµÚÁµÚµÚ¶—s˜s˜s˜€s™€t™tšuš‚u›‚vœƒvœ„w„xž…yŸ†yŸ†z ‡{¡ˆ{¡ˆ{¡ˆ{¡ˆ{¡ˆ{¡ˆ{ ‡{ ‡zŸ†yž…xž„xàǺàǺßƺßƹßƹÞƹÞŹÞŹÝŹÜŹÚĹ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòY}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Y~°Z~°ÁóÁóÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄöŸÄö Äö Äö Äö Äö\³\³]³]³]³]³\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMq£Mq£Mq£Mq£Mq£´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´ç´ç´çµçµçµçµçµç‘µç‘µç‘µçNr¤aahfciieilfingjpijtlm}tu…ƒžŠ˜…~zp”|p˜q’znOs¥Os¥Os¥Os¥Os¦’¶è’¶è’¶é’¶é’·é’·é’·é“·é“·é“·é“·é“·éPt¦Pt¦Pt§Pt§Pu§Pu§Pu§Šwnxoyozo‘zo’{p“{p“|p”|p”|p•|p•}p•}q–}q–}q–}q–}q—~q—~q—~q—~q—~r—~r˜r˜r˜r۵۵ܶܶ™s™€s™€sš€sš€sštšt›t›‚uœ‚uœƒvƒvž„wž„wŸ…xŸ†x †y †y¡‡z¡‡z¡‡z¡‡z¡‡y ‡y †yŸ†xŸ…xž…wž„wž„wàǺàǺàƹàƹßƹßƹÞƹÝŹÜĹ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòY}¯Y}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°žÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Ä÷ Å÷]³]³\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMq£Mq£´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´ç´ç´ç´çµçµçµçµç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µçX\gbahfdiieilgjohjqjkvno…{{˜‹ˆŒ…“v’zo™r–|oOs¥Os¥Os¦Os¦’¶é’¶é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·êPu§Pu§Pu§Qu§Qu§Qu§Qu§ŒxoŽyozo’{p“{p“|p”|p•|p•}p–}q–}q—~q—~q—~q—~q˜~q˜~q˜r™r™r™r™r™r™€rš€rš€rÝöš€sš€sš€s›s›s›t›tœ‚tœ‚tœ‚u‚uƒužƒvž„vŸ„vŸ…wŸ…w …x †x †x¡†x¡†y¡†y¡†x¡†x †x †x …wŸ…wŸ…wŸ„wž„wž„váǺáǺàǺàǺßƺÞƺÝź›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóY}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z±Z±[±žÂôžÂõžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Ä÷ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´æ´ç´ç´ç´çµçµçµçµç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè¡«bbigdijeimgjohjskl{rrŽƒŽŠ˜…~‘{q•|p˜~qynOs¦’¶é’¶é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“¸ê“¸ê“¸êQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§xozp‘{p“{p”|p•}p–}q–}q—~q—~q˜~q˜~q˜q™r™r™ršrš€rš€rš€rš€r›€r›€s›sßĶßĶœsœsœsœ‚s‚t‚t‚t‚tžƒtžƒužƒuž„uŸ„vŸ„v …v …w …w¡…w¡†w¡†x¡†x¡†x¡†x¡†x¡†x¡†x †w …w …w …wŸ…wŸ…wŸ„wŸ„wâȺáǺàǺßǺÞƺÚĺœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóY}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z±Z±[±[±[±[±[±ŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À´æ´æ´æ´æ´æ´ç´ç´ç´çµçµçµçµçµç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘¶è‘¶è ¢«cbigdijfjmgjpikvmn‚yy–‰†Œ†”v’zo˜r–|o’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸êQu§Qu§Qu§Qu§Qu¨Qu¨Qv¨Qv¨Žyp‘zp“{p”|q•}q–}q—~q—~q˜~q™q™ršrš€rš€r›€r›€r›€r›rœsœsœsàŶàŶàŶàÅ·áÅ·‚tž‚tž‚tžƒtžƒtŸƒtŸƒuŸƒuŸ„uŸ„u „u „v …v¡…v¡…v¡…w¡†w¡†w¢†w¢†w¢†w¢†w¢†w¡†w¡†w¡†w¡†w¡…w¡…w …w …w …wŸ…wŸ…wáȺàǺßƺœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóY}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[±[²[²[€²[€²\€²ŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Åø¡Æø¡Æø¡Æø\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À´ç´ç´ç´çµçµçµçµçµç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è ¢«¦¥¬hdikfjnhjrjlyqr‚ŽŠ™†‘{q•|pÜ´Լ±“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ëQu¨Qu¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨zp’{p”|q•}q–~q—~q˜q™r™rš€rš€r›€r›€rœrœsœss‚sáŶáÅ·áÅ·áÆ·âÆ·âÆ·âÆ·âÆ·ŸƒtŸƒtŸƒt „u „u „u „u „u¡…u¡…v¡…v¢…v¢…v¢†v¢†w¢†w¢†w¢†w£†w£†w¢†w¢†w¢†w¢†w¢†w¢†w¢†w¡†w¡†w¡†w …w …wŸ…wž„wàÇ»œÀòœÀòœÀóœÁóœÁóÁóÁóY~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[±[²[€²[€²\€²\€²\€²\€²\€²\€² Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àµçµçµç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’‰¡£¬§¦¬«¨­lgjohktlnvw—‹ˆžŽˆ”€wÕ¾²ÛµÙÀ³Ê¸°“·é“·é“·é“·é“·ê“·ê“·ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¹ë”¹ë•¹ë•¹ëQv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨zp“|q•}q–~q—~r˜r™rš€r›€r›€rœsœss‚s‚sáÅ·âÆ·âÆ·âÆ·âÆ·ãÆ·ãÇ·ãÇ·ãǸäǸäǸ¡„u¡„u¡„u¡…u¡…u¢…u¢…u¢…v¢…v¢†v£†v£†v£†w£†w£†w£‡w£‡w£‡w£‡w£‡w£‡w£‡w£‡w£‡w£†w¢†w¢†w¢†w¡†x¡†x …xŸ…x„xY}¯œÁóœÁóÁóÁóÁóÁóZ~°Z~°Z~°Z~°Z~°Z~±Z~±Z±Z±[±[±[±[±[±[²[²[€²[€²\€²\€²\€²\€²\€²\€³\€³\³\³]³ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶èšŸ«¢£¬§¦¬«¨­lgjpikwoq‰àÒÎÜÊÃÔ¿µØÀ³Üõ־²“·é“·é“·ê“·ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ëRv¨Rv¨Rv¨Rv¨Rv¨Rv©Rw©Rw©“|q”|q–~r—~r˜rš€rš€r›rœss‚sž‚sáÆ·âÆ·âÆ·ãÆ·ãÇ·ãÇ·äÇ·äǸäǸäȸåȸåȸåȸåȸ¢…u¢…u¢…u£…u£†v£†v£†v£†v¤†v¤†v¤‡w¤‡w¤‡w¤‡w¤‡w¤‡w¤‡w¤‡w¤‡w¤‡w¤‡x¤‡x¤‡x£‡x£‡x£‡x¢†x¡†x¡†xŸ…xY}¯Y}¯Y}¯Y}°ÁóÁóÁôZ~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[²[€²[€²\€²\€²\€²\€²\€²\€³\€³\³\³]³]³]³]³]³¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‘µç‘µç‘µç‘µç‘µç‘µè‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’·éœ¡«£¤¬¨¦­¬©­°ª®rkmÀ¸¹ØÍËáÒÍ×ûԾ³ÛµÚÁ´Ð»±“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ìRv¨Rv¨Rv©Rv©Rw©Rw©Sw©Sw©Sw©Sw©•}r—~r˜rš€r›€sœsœs‚sáÅ·âÆ·âÆ·ãÆ·ãÇ·äÇ·äǸäǸåȸåȸåȸæȸæȸæɹæɹæɹçɹ£†v¤†v¤†v¤†v¤†v¤‡v¤‡v¥‡w¥‡w¥‡w¥‡w¥‡w¥‡w¥ˆw¥ˆw¥ˆx¥ˆx¥ˆx¥ˆx¥ˆx¤ˆx¤‡x¤‡x£‡x£‡x¢‡x¡†x †xY}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[²[€²\€²\€²\€²\€²\€²\€²\€³\³\³]³]³]³]³]³]³]´]‚´]‚´^‚´¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‘µè‘µè‘µè‘¶è‘¶è‘¶è‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’¶é’·é’·é’·é“·é”œ«¡¬£¤¬¨§­¬©®mhkunqÉÁÂßÒÏÛÊÄÓ¾µØÀ´Ýöؿ²“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì–ºì–ºìRw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwª˜r™€sš€sœsàÅ·áÅ·âÆ·âÆ·ãÇ·ãǸäǸäȸåȸåȸæȸæɸæɹçɹçɹçɹçʹèʹèʹèʹ¥‡v¥‡v¥‡v¥‡v¥‡w¥‡w¦ˆw¦ˆw¦ˆw¦ˆw¦ˆw¦ˆw¦ˆx¦ˆx¦ˆx¦ˆx¦ˆx¥ˆx¥ˆx¥ˆx¥ˆx¤ˆx¤‡x£‡x¢‡xY}¯Y}°Y~°Y~°Z~°Z~°žÂôžÂôžÂôZ~±Z±Z±[±[±[±[±[±[²[²[€²\€²\€²\€²\€²\€²\€³\€³\³\³]³]³]³]³]³]´]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù£Çù£Çù£Çú\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‘¶è‘¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é—ž«Ÿ¢¬¤¥­edjifknilzsuÔÊÉÝÏÊÔÁºÔ¾³ÛöÛÁ´Ô½²”¸ê”¸ê”¸ê”¸ê”¸ê”¸ë”¸ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºìSw©Sw©Sw©Sw©Sw©SwªSwªSxªSxªTxªTxªTxªÞÄ·ßÅ·àÅ·áÆ·âÆ·ãǸãǸäǸåȸåȸæȸæɸæɹçɹçɹèʹèʹèʹèʹéʺé˺é˺¦‡v¦‡v¦ˆw¦ˆw¦ˆw¦ˆw§ˆw§ˆw§ˆw§ˆx§ˆx§‰x§‰x§‰x§‰x¦‰x¦‰x¦‰x¦ˆx¥ˆx¥ˆy¤ˆy¤ˆyY}°Y}°Y~°Y~°Z~°Z~°žÂôžÂôžÂôžÂôžÂõžÃõ[±[±[±[±[²[²[€²\€²\€²\€²\€²\€²\€³\€³\³\³]³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ^ƒµ_ƒµ£Çù£Çù£Çù£Çù£Çù£Çù£Çú£Çú£Èú£Èú\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶è’¶é’¶é’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·é™«™Ÿ¬\_iabjfdjjfkpkn~xz•‰‡ÖÆÁÒ½´ØÀµÝÄ·ØÀ³”¸ê”¸ê”¸ë”¸ë”¸ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»íSw©Sw©SwªSwªSxªSxªTxªTxªTxª—¼î˜¼î˜¼î˜¼îàÅ·áÆ·âƸãǸäǸäȸåȸæɹæɹçɹçɹèʹèʹèʹéʺé˺é˺é˺ê˺ê˺ê̺§ˆw§ˆw§ˆw§ˆw§‰w§‰w§‰x§‰x§‰x§‰x¨‰x§‰x§‰x§‰x§‰x§‰y¦‰y¦‰y¦‰y¦‰yY}°Y~°Y~°Z~°Z~°Z~°žÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõ[²[²[€²[€²\€²\€²\€²\€²\€³\€³\³\³]³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚µ^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ£Çú£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’¶è’¶è’¶è’¶é’¶é’¶é’¶é’·é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·êPt¦PYhW]i]`ibbjfekkgltnrˆ€’„€{tÓ¾´ÜĸÛµվ³”¸ë”¹ë”¹ë”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í—»í—»í—»íSwªSxªSxªTxªTxªTxªTxª˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ïçɸãǸäȸåȹæɹæɹçɹçʹèʹèʺéʺé˺é˺ê˺ê˺ê̺ëÌ»ëÌ»ëÌ»ëÌ»¨‰w¨‰w¨‰x¨‰x¨‰x¨‰x¨‰x¨‰x¨‰x¨Šx¨Šy¨Šy¨‰y§‰y§‰y§ŠyY}°Y}°Y~°Z~°Z~°Z~°Z~°žÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄö\€²\€²\€²\€²\€²\€³\³\³]³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶_„¶`„¶¤Èú¤Èú¤Èú¤Èú¤Èú\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’¶é’¶é’·é’·é’·é’·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“¸êPt¦Pt¦JVhRZhX]i]`jbcjgekmimwruŠ~Œ|wŒypÙ·ÝÄ·ÙÀ³”¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í—»í—»í—»í—»í—»í—»í—»îTxªTxªTxªTxª˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ï˜½ï™½ï™½ï™½ï™½ï™½ïéÁ¤æɹæɹçʹèʺèʺé˺é˺ê˺ê˺ê̺ëÌ»ëÌ»ëÌ»ìÍ»ìÍ»ìÍ»ìÍ»¨‰x©‰x©Šx©Šx©Šx©Šx©Šy©Šy©Šy©Šy¨Šyª‹yY}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°žÂôžÂõžÂõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö\€²\€³\³\³]³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„·¤Èû¤Éû\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“¸ê“¸ê“¸ê“¸êPt¦Pt§Pt§JVhMXhT[iY^i^ajccjgeknjo}uw‡zw‰xq‘{rš‚vÛÁµÖ¿³•¹ë•¹ë•¹ë•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í–»í—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î˜¼îTxª˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ï˜½ï™½ï™½ï™½ï™½ï™½ï™½ð™½ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðì̺é˺ê˺êÌ»ëÌ»ëÌ»ëÌ»ìÍ»ìÍ»ìÍ»ìͼíͼíμíμ©Šx©Šx©Šx©Šy©Šyª‹y­ŒyY}¯Y}¯Y}°Y}°Y~°Z~°Z~°Z~°Z~°Z~°Z~±žÂõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Ä÷ Ä÷ Å÷]³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À“·é“·é“·é“·é“·é“·é“·é“·ê“·ê“·ê“·ê“¸ê“¸ê“¸ê“¸ê”¸ê”¸êPt§Pt§Pt§Pu§JVhJVhOYiU\iZ_j_ajcckhflpkput…vqŒxp˜w˜€s–}p•¹ë•¹ë•¹ë•¹ì•¹ì•ºì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í–»í—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î˜¼î˜¼î˜¼îTxªTx«˜¼î˜¼ï˜½ï˜½ï™½ï™½ï™½ï™½ï™½ï™½ï™½ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò•“’óмóѼóѽóѽôѽœÀòœÀóX}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±žÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Ä÷ Ä÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„·`„·`…·`…·a…·a…·a…·\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À“·é“·ê“·ê“·ê“·ê“¸ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸êPt§Pu§Pu§Pu§Pu§Pu§JWhJWhJWhQZiV]i[_j`bkddkhglunp€sq‡vp”uš‚v—~qQv¨•¹ì•¹ì•ºì•ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í—»í—»í—»í—»í—»í—»í—»í—»î—¼î—¼î—¼î˜¼î˜¼î˜¼î˜¼îTx«Tx«Ty«Ty«Uy«™½ï™½ï™½ï™½ï™½ï™½ï™½ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¾ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóÁóY}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~±Z±žÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Ä÷ Ä÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…·\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À“¸ê“¸ê“¸ê“¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸êPu§Pu§Pu§Pu§Qu§Qu§Qu§JWhJWhJWhJWhR[iW]j\`jabkedknjmzpo„to|t›„y—~qRv¨Rv¨Rv¨–ºì–ºì–ºì–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í–»í—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼îTx«Ty«Ty«Uy«Uy«Uy«Uy«™½ï™½ï™½ï™½ð™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóÁóÁóÁóÁóÁóÁôY~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±ŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄö Äö Äö Äö Äö Äö Ä÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…·a…¸a†¸\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸ê”¸êPu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§JWhJWhJWhKWiKWiS\iX^j]`kackgeltlnro‹yr›…z˜rIMSRv¨Rv¨Rv¨–ºì–ºì–ºì–ºì–ºí–ºí–»í–»í—»í—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼îTx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬™¾ð™¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóÁóÁóÁóÁôÂôÂôžÂôžÂôZ~°Z~°Z~°Z~±Z~±Z±ŸÃõŸÃõŸÃõŸÃõŸÃöŸÄö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„·`„·`…·`…·a…·a…·a…·a…·a…·a…¸a†¸a†¸\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À”¸ê”¸ê”¸ê”¸ê”¸ë”¸ëQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§KWiKWiKWiKWiKWiOZiT\jY_j^akbcknimzon†vp™…|˜€s›€qRv¨Rv¨Rv©Rv©Rw©–ºí–»í–»í–»í—»í—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ïTx«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬š¾ðš¾ðš¾ðš¾ðš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóÁóÁóÁóÁôÁôÂôžÂôžÂôžÂôžÂôžÂôžÂõZ~±Z±Z±ŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…¸a…¸a†¸a†¸b†¸\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À”¸ë”¹ëQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨KWiKWiKWiKWiKWiMXiQ[jV]jZ_k_akbclumn‚tp—„|™€tœ€rRv©Rv©Rw©Rw©Rw©Sw©Sw©—»í—»í—»í—»í—»í—»í—»î—»î—¼î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ïTy«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬š¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóÁóÁóÁóÁóÁóÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõ[±ŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Çú£Èú¤Èú¤Èú`„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…¸a…¸a†¸b†¸b†¸b†¸\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨KWiKWiKXiKXiKXiKXiNYjS\jW^k\`k_bkqkm~ro•ƒ{™‚vRw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©—»í—»í—»í—»î—»î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ïTy«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõŸÃõŸÃõŸÃõŸÃõ[±ŸÃöŸÄö Äö Äö Äö Äö Äö Ä÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù£Çù£Çù£Çù£Çù£Çú£Çú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Èû`„¶`„·`…·`…·a…·a…·a…·a…·a…¸a…¸a†¸b†¸b†¸b†¸b†¸b†¸\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQu§Qu§Qu¨Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨KXiKXiKXiKXiKXiKXiLXiPZjT]jY_k]akmim{po’z™uRw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwª—¼î—¼î—¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ï˜½ïTy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­V{­V{­W{­W{­›¿ñ›¿ñ›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóÁóÁóÁóÁôÁôÂôžÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõ[±[±[²[€² Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Èû¤Éû¥Éû¥Éû¥Éûa…·a…·a…·a…·a…¸a…¸a†¸b†¸b†¸b†¸b†¸b†¸b†¹\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQv¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨KXiKXiKXiKXiKXiKXiLXjMYjQ[jV]kZ`kigmwnn•ƒ|¤…sSw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSxªSxªSxªTxª˜¼î˜¼î˜¼î˜¼î˜¼î˜¼ï˜¼ï˜½ï˜½ï˜½ï™½ïUy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­›ÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóÁóÁóÁóÁóÁóÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃö[±[±[²[€²\€²\€²\€² Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú¤Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êüa…·a…¸a†¸b†¸b†¸b†¸b†¸b†¸b†¹b‡¹\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨KXiKXiLXjLXjLXjLXjLXjOZjS\kW^kigmtpsSw©Sw©Sw©Sw©Sw©Sw©SwªSwªSxªSxªSxªTxªTxªTxªTxª˜¼î˜¼î˜¼ï˜¼ï˜½ï˜½ï™½ï™½ï™½ïUy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{®W{®W|®W|®œÀòœÀòœÀóœÀóœÁóÁóÁóÁóÁóÁóÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃö[±[²[²[€²\€²\€²\€²\€²\€³\€³¡Å÷¡Å÷¡Åø¡Åø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¦Êü¦Êü¦Êü¦Êüb†¸b†¸b†¸b†¸b†¹b‡¹b‡¹c‡¹\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©LXjLXjLXjLXjLXjMYjR[kW^k]alro‚sSw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTx«˜½ï˜½ï™½ï™½ï™½ï™½ïUy«Uy«Uy«Uy«Uy«Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­V{­V{­W{­W{­W{­W{­W{­W{­W{®W|®W|®X|®X|®X|®œÀóœÁóœÁóÁóÁóÁóÁóÁôÁôÂôžÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄö[±[²[€²[€²\€²\€²\€²\€²\€³\³\³]³]³¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëýb†¹b‡¹b‡¹c‡¹c‡¹\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRv¨Rv¨Rv©Rv©Rv©Rw©Rw©LYjLYjLYjLYjT]kZ_lhfm„uqSw©Sw©Sw©Sw©SwªSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«™½ï™½ï™½ïUy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{®W{®W|®W|®X|®X|®X|®X|®X|®X|¯ÁóÁóÁóÁóÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄö[±[²[€²\€²\€²\€²\€²\€²\€³\³]³]³]³]³]³]´¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëýc‡¹c‡¹\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRw©Rw©Rw©Rw©Sw©Sw©Sw©ddmaclupr“‚{Sw©Sw©Sw©SwªSwªSxªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«™½ðUy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{­W{®W|®W|®X|®X|®X|®X|®X|®X|¯X|¯X}¯Y}¯Y}¯ÁôÂôÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö[²[²[€²\€²\€²\€²\€²\€³\€³\³]³]³]³]³]´]‚´]‚´^‚´^‚´¢Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«™¾ð™¾ðUy¬Uy¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{­W{®W|®W|®X|®X|®X|®X|®X|®X|®X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯žÂôžÂôžÂôžÂôžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö[²[€²[€²\€²\€²\€²\€²\€³\³\³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«™¾ðš¾ðš¾ðš¾ðš¾ðVz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz­Vz­V{­V{­W{­W{­W{­W{­W{­W{­W{®W{®W|®W|®X|®X|®X|®X|®X|®X|¯X|¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Y~°žÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄö Äö Äö Äö[€²\€²\€²\€²\€²\€²\€³\³]³]³]³]³]³]´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSwªSwªSwªSxªSxªSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬š¾ðš¾ðš¾ðš¾ðš¾ðš¾ðš¾ñVz¬Vz¬Vz¬Vz­Vz­V{­V{­V{­W{­W{­W{­W{­W{­W{®W{®W|®W|®X|®X|®X|®X|®X|®X|¯X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°ŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö[€²\€²\€²\€²\€²\€³\€³\³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSxªSxªTxªTxªTxªTxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬š¾ðš¾ðš¾ðš¾ðš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñVz­V{­V{­V{­W{­W{­W{­W{­W{­W{­W{®W|®W|®X|®X|®X|®X|®X|®X|®X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~±Z~±ŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö[€²\€²\€²\€²\€²\€³\³\³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶¤Éû¥Éû¥Éû¥Éû¥Éü¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTxªTxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬š¾ðš¾ðš¾ñš¾ñš¿ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñW{­W{­W{­W{­W{­W{­W{®W|®W|®W|®X|®X|®X|®X|®X|®X|¯X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[± Äö Äö Äö Äö Äö\€²\€²\€²\€²\€²\€³\³]³]³]³]³]³]´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„·¥Éû¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uz¬Uz¬Uz¬š¾ðš¾ñš¾ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›ÀòW{­W{­W{­W{®W{®W|®W|®X|®X|®X|®X|®X|®X|¯X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z±[±[±[±[±[±[² Äö Ä÷\€²\€²\€²\€²\€³\³\³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ©Íÿ©Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬Uz¬Vz¬Vz¬š¾ñš¿ñš¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòW{®W|®W|®X|®X|®X|®X|®X|®X|®X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[²[²[€²\€²\€²\€²\€²\€²\€³\³\³]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„·`…·a…·a…·a…·a…·a…¸¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUy«Uy«Uy«Uy«Uy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬š¿ñš¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóX|®X|®X|®X|®X|®X|®X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z±[±[±[±[±[±[²[€²[€²\€²¡Å÷¡Å÷¡Å÷\€³\€³\³]³]³]³]³]´]´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„·`„·`…·a…·a…·a…·a…·a…¸a†¸b†¸b†¸§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ©Íÿ©Íÿ©Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUy«Uy«Uy«Uy«Uy¬Uy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬š¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóÁóÁóX|®X|®X|¯X|¯X}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[€²[€²\€²\€²¡Å÷¡Å÷¡Å÷¡Åø¡Æø]³]³]³]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…¸a…¸a†¸b†¸b†¸b†¸b†¸b†¹§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUy¬Uy¬Uz¬Uz¬Uz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁóÁóX}¯X}¯Y}¯Y}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[€²[€²\€²\€²\€²¡Å÷¡Å÷¡Åø¡Åø¡Æø¢Æø¢Æø¢Æø]³]´]‚´]‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„·`…·a…·a…·a…·a…·a…¸a†¸a†¸b†¸b†¸b†¸b†¹b†¹b‡¹c‡¹c‡¹¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Îÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬Vz¬›¿ñ›¿ñ›¿ñ›¿ñ›¿ò›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôY}¯Y}¯Y}¯Y}¯Y}°Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~±Z~±Z±Z±[±[±[±[±[²[²[€²[€²\€²\€²\€²¡Å÷¡Å÷¡Åø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„·`„·`…·a…·a…·a…·a…·a…¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹b‡¹c‡¹c‡¹c‡¹c‡ºcˆº¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Îÿ©Îÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVz¬Vz¬Vz¬Vz¬Vz¬Vz­›¿ñ›¿ñ›¿ò›¿ò›Àò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôžÂôžÂôžÂôžÂôY}¯Y}°Y~°Y~°Z~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[€²[€²\€²\€²\€²\€²¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºcˆºdˆº©Íÿ©Íÿ©Íÿ©ÎÿªÎÿªÎÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVz­Vz­Vz­V{­›¿ò›¿ò›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõZ~°Z~°Z~°Z~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[²[€²\€²\€²\€²\€²\€²¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„·`…·a…·a…·a…·a…·a…¸a†¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºdˆºdˆºdˆºdˆºdˆ»©ÎÿªÎÿªÎÿ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀV{­›Àò›ÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõŸÃõŸÃõZ~°Z~°Z~°Z~±Z±Z±[±[±[±[±[±[²[²[€²[€²\€²\€²\€²\€²\€³¡Åø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú¤Èú¤Èú¤Èú_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„·`…·a…·a…·a…·a…·a…¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹b‡¹c‡¹c‡¹c‡¹c‡ºc‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀœÀòœÀòœÀòœÀòœÀòœÀòœÀóœÀóœÀóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöZ~±Z±Z±[±[±[±[±[±[²[€²[€²\€²\€²\€²\€²\€²\€³¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû_„¶`„¶`„¶`„¶`„¶`„·`…·`…·a…·a…·a…·a…·a…¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºcˆºdˆºdˆºdˆºdˆ»d‰»d‰»e‰»e‰»\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀœÀòœÀóœÀóœÁóœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö[±[±[±[±[²[€²[€²\€²\€²\€²\€²\€²\€³\€³¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû`„¶`„¶`„¶`„·`…·a…·a…·a…·a…·a…¸a†¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀœÁóœÁóÁóÁóÁóÁóÁóÁóÁóÁôÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö[±[²[²[€²[€²\€²\€²\€²\€²\€²\€³\³\³¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çú£Çú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü`„·`…·a…·a…·a…·a…·a…¸a†¸a†¸b†¸b†¸b†¸b†¹b‡¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀÁóÁóÁóÁóÁôÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷[€²\€²\€²\€²\€²\€²\€³\³\³]³¢Æø¢Æø¢Æù¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¦Êü¦Êü¦Êüa…·a…·a…·a…¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹b‡¹c‡¹c‡¹c‡¹c‡ºcˆºcˆºdˆºdˆºdˆºdˆ»d‰»d‰»e‰»e‰»e‰»e‰¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀÁôÁôÂôÂôÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷\€²\€²\€³\³\³]³]³¢Æø¢Æù¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëýa†¸a†¸b†¸b†¸b†¸b†¸b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»e‰¼eŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀžÂôžÂôžÂôžÂôžÂôžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø\€³\³]³]³]³¢Æù¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëýb†¸b†¸b†¸b†¹b†¹b‡¹c‡¹c‡¹c‡¹c‡¹c‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»e‰¼eŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀžÂôžÂõžÂõžÃõžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÄöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø]³]³¢Æù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþb†¹b‡¹b‡¹c‡¹c‡¹c‡¹c‡ºcˆºcˆºdˆºdˆºdˆºdˆ»dˆ»d‰»e‰»e‰»e‰»e‰»e‰¼eŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀžÃõžÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù]³£Çù£Çù£Çù£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþc‡¹c‡¹c‡¹c‡ºcˆºcˆºdˆºdˆºdˆºdˆ»d‰»d‰»e‰»e‰»e‰»e‰¼eŠ¼eŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸÃõŸÃõŸÃõŸÃõŸÃöŸÃöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Ä÷ Ä÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù]´]‚´]‚´£Çù£Çù£Çú£Èú£Èú¤Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿc‡ºcˆºdˆºdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»e‰¼eŠ¼fŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸÃöŸÄöŸÄöŸÄö Äö Äö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù]‚´]‚´^‚´^‚´^‚´^‚´£Èú¤Èú¤Èú¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿdˆºdˆºdˆºdˆ»d‰»e‰»e‰»e‰»e‰»e‰¼eŠ¼fŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À Äö Äö Äö Äö Äö Äö Ä÷ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù£Çù£Çù^‚´^‚´^‚´^‚´^‚´^‚µ^‚µ¤Èú¤Èú¤Èú¤Èû¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Îÿ©Îÿdˆ»d‰»d‰»e‰»e‰»e‰»e‰¼eŠ¼eŠ¼fŠ¼fŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À Äö Ä÷ Ä÷ Å÷ Å÷ Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù^‚´^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ¤Éû¤Éû¥Éû¥Éû¥Éû¥Éû¥Éü¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©ÎÿªÎÿªÎÿªÎÿªÎÿe‰»e‰»e‰»e‰¼eŠ¼fŠ¼fŠ¼fŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú^‚´^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶¥Éû¥Éû¥Éü¥Éü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©ÎÿªÎÿªÎÿªÎÿªÎÿªÎÿªÏÿªÏÿ«Ïÿe‰¼eŠ¼fŠ¼fŠ¼fŠ¼fŠ¼\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À¡Å÷¡Å÷¡Å÷¡Åø¡Åø¡Æø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù£Çù£Çú£Èú^‚´^‚´^‚´^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶¥Éü¥Êü¥Êü¦Êü¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Îÿ©ÎÿªÎÿªÎÿªÎÿªÎÿªÎÿªÏÿ«Ïÿ«Ïÿ«Ïÿ«Ïÿ«ÏÿfŠ¼fŠ¼fŠ½fŠ½\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À¡Æø¡Æø¡Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æø¢Æù¢Æù¢Çù¢Çù£Çù£Çù£Çù£Çù£Çù£Çú£Çú£Èú£Èú^‚´^‚µ^‚µ^ƒµ^ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒµ_ƒ¶_„¶_„¶`„¶`„¶`„¶`„¶`„¶¦Êü¦Êü¦Êü¦Êý¦Ëý¦Ëý§Ëý§Ëý§Ëý§Ëý§Ëþ§Ìþ§Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìþ¨Ìÿ¨Íÿ¨Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©Íÿ©ÎÿªÎÿªÎÿªÎÿªÎÿªÎÿªÏÿªÏÿ«Ïÿ«Ïÿ«Ïÿ«Ïÿ«Ðÿ«Ðÿ¬ÐÿfŠ½f‹½\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À
\ No newline at end of file
diff --git a/tkimg1.3/ppm/tests/testimg.ppm b/tkimg1.3/ppm/tests/testimg.ppm
deleted file mode 100644
index 9d81ce2..0000000
--- a/tkimg1.3/ppm/tests/testimg.ppm
+++ /dev/null
@@ -1,4 +0,0 @@
-P6
-227 149
-255
-0/-0/-10.21/51.51.62/62/83/83/:3-:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)2-)/*$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:7.A:0B<0D>2F at 4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b at 4nB5}E6‹H8™G9£F7¯G:¸G9¾E:ÅG;ÇG>ÊG?ËH@ÐE@çFLíCLëDKëEIîCIïBDñ>Bô=Aø;A÷:@ô:?ð<?é?@â@>×?<ËA7»=/µ@.µ@.´?-´?-³@-²?-¯@-­@,ªA,¦A-¢B,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1©B3³D3¼D4¿D4¹?0µA2¬F8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:<jBC|IHMM•OOŸW[ªdnªoƒŸt”{£‡®€†º~ˆ½sy­`a‘TKvPDhSJgOG^MH^TQbfdo|}‚‘™ž˜£©Ÿ¢¨šž “’{|lfgUXWEQNEUR[UQbUQb0/-0/-10.10.40-51.62/62/83/83/:3-:3-:3-:3-:3-:3-91.91.80-80-80-80-91.91.80-80-80-80-80-80-80-80-6.+6.+5-*5-*5-*4,)4,)4,)5-*5-*5-*5-*5-*5-*5-*3.*0+%0-&0-&1.'2/(30)41*41*63,63,74-74-85.96/:70:7. at 9/A;/C=1E?3H at 3IA4JB5JB5LC4LC4MA1MA1MA1NB2OC3QD4P>0U?1^A3jC4xD6„E4’E5œC3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ð<?é?@àA>Õ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-­@,©@+¦A-¡A+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1«A3µD4½C4¿D5»A2·C6¬F8œI;…G:l at 3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤aj¥l}rŽ‘{¢†€®…¹{„»ou©[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H at 5H@3H at 3I@1I at 1K?1K?1K?/L at 0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,­@,ª?-§@-¥@,¡A+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=™J=G;h at 4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚¹u~·fm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L at 0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@—K>|F:b at 4L:.A7- at 85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}y«x}µowµ`f¢QR‹LEyL at pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8. at 9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I at 1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,­>-¬>-¬>-ª?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ at tE;Z>2E9-<5+ at 93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n at 3sB;yKK€Zeƒg€p—zxªu{·ks´_d¦TT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7- at 7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n at 0v>-{<+‚;)Œ;*”=,œ@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96- at 93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||²w|¼nu»dh¯[[¡RMLB~OArL at hI=cH>`HB^ECX at BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H at 3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š</‹>.‹=0Œ?/’C2˜B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC7<?6>93 at 72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]jƒs‰€«…„¾~ƒÇtzÆmp½ce¯VSšLC‚K?qI<gG;cE>_FB]DBW?AN;?H:BE>HGDMHGQIGQHJRGNVKUXM^ZOaYNaXO++++++,,,,,,.,-/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-*2,,1++1++0**0**1++1++2,,0**0**0**0**0**0**0**0**2,,2,,2,,1++1++0**0**0**2,,2,,2,,2,,2,,2,,2,,2,,3/,30+30+30+30+30+30+30+41,41,52-63.63.74/85085092,:3+;4,<5->5.>5.>5.>5,B8/B8.E8/E8/G:1I=1J>2I?3FC4FC4JB5OA4TA2\@2b>0j<-q<.w9*}8)…8(Œ:,•=/›B4¤B5²F:ºE;ÁF>ÊG?ÔG@ÞFAçCAîB@í;;ë;;ç>;ßB;ÑD:¿D4¯@-¤>(¦A-¦A-¥@,¥@.¥@.¤?-¤?-¤>/¢>.Ÿ@.œ?.˜?-•>+‘?*>)>+>->->-Œ=,Œ=.‹<-‹<-Š=-Š=-ˆ<.ˆ<.ˆ<.ˆ</‡>/ˆ>1‹?1‘D2–C1¢B4­C6ºC;ÁD>ÁD>»EA¹PL²[T¥e\‘f]u_T[UIGMACI?<92?82>71;6094.74-63.43.43.34.24/13./4..3-.3-.3--3/-3/-3/-3/.3/.3/02/02///-00.22022010.0/-0/-3/,8,,;,)C0*K70S<6^IHtbn‡z”Š¶ŒÆ„ˆÏz€ÌrxÆik¶WWŸID„E=nG<dD<aC>^CAY at CV@DP>EKGQRKWUQ^WU`XS_UR^TT^SY_S^[LaZJaZJ,-/,-/,-/,.-------.-+.-+/.,/.,1-*0,)0,)0,)/+(/+(/+*/+*/+*/+*/+*/+*/+*0,+/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+1-,1-,2.-1-,1-,1-,1-,1-,1-,1-,1-,0,)1-*2.+3/,3/,3/,3/,3/,3/,3/,3/,3/,40-51.62/74/80-92,:3-;4.=4/>5.>5.>5.?4.?5,B5-C6.D7/F90G:1F<2G?4H at 5J@6P?5T>3X<1^90b6+m9.t8-|8+ƒ9,;/“=0˜?1ž>0§A3­A4µC8¾E:ÊG=ÔG>ÞE?åC@è@?êBAæDAÚE>ÈD8·B1ªA.¢B,¢A.¡@-¢?,¢>.¡=-¡=-¢>. ?/œ<,š=,˜<-•>-“=,=+Ž=*Œ>*‹<+‹<+Š=-‰<,‰<,‰<,ˆ:-‡;-‰=/†</†</‡=0ˆ>3ˆ@2‰A5‹A4‘E5—D4£E9±I>ºG@»D>»EA¸MG´ZR¯f_£qf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“»”–ϐ•Ùƒ‰ÓtzÆjn·_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†</…=/…=1ƒ=1„>2†@6‡A7ˆB6“G9—E7£G<¯J@¸IB¸GA·LF³TN±d\ªqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““¹”—ʐ–Ô„‹ÏyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~Žv†yr€qfteZeT[ZE`Z at b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>¬KD²KF³LG²SM®`V­sg¦qŒz‘Ž{‚‰ws€ocqbXcUNRDMN at HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”±’—¿•Ç„ŽÃ}‰»{‰¶|‹²}Œ«}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹¡”‘¨˜¥”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JC®LI®QL­]Vªj^§€o¡yšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO at EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““£–°Œ•¶ƒ²¯…™²¤¶’¨³“¨«¤£Œ ž‡ž˜‚™}˜‰œ‹ˆ£”°š˜±›”­—‹£…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1. at 2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’</Ž<.‹<-‰<,‰<,ˆ<,‡;+†:*†:*†:*ƒ:+ƒ:+‚:,€:.€:0€<1€=4?6‚B9ƒD=‡F@ˆH?‘KA’H=šG?£LE¨PL¨XQ©f]¦vh¢Œw›™€•¤‡Œ£‡†ƒ~‘}t‚qjue\eRV_LNUCEL:?F6<@27:/68-01)00(.-(/,'/+(/+*1-,2.-1-,1-,1-,1-,1-,/.,1-,/.,2.-0/-2.-0/-0/-0/-0/-2-18,:5)51++66,GL8`hQzƒpˆ’‡—–š ™¥†–£‡›¢ª©›¹± À³˜·¨š¶§›·¨˜·¥‘±œ‰«’‰«±”’³–•´•­ˆ¢…„›{’xgzdTbIQT9VU9XW;,03,03,03,03./1./1//////....../.,.-+.-+.-+-,*-,*-+,-+,-+,,*++)**()*()*()+)*+)*+)*+)*+)*+)*+)*+)*,*+,*++)*+)*+)**()*()*(),*+,*+,*+-+,.,-.,-/-./-./+*/+*0,+0,+/+*/+*.*)-)(0,+0,+/+*0,+1-,2.-3/.40/:12:12;31<42=32<21<20;1/=20<1/>0->0-?1. at 2/A4.?4. at 51@72 at 93A:4B94C84F74H5/Q51X5/a6/l8-u9.€</†>0‹=1“?5•>5“?5“?4•B4šB4 C4¥D4¬B5°D8´E:±E;ªB7¡?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`Z©pe¤ƒrœ”}–¡ƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS at BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yŽ›Š‘ž”Ÿš‹ž˜¥——´ž¢Å¥©Î­¥É­¦Ê°§Ë±¤È¬—¾Ÿ‹³‘ˆ°²Ž²Ž²¬Š„¡‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93 at 72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1¦@4ªB7ªB9¥@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JF¡SO¨]X©hb©{n¤Žy™œ’§†‰¬‹‚ªˆ€¡„™€~‹wxnjxadr[ZhQQ]IITCCL;>D6<?467/44,30+0+'1()1()2)*4+,2)*2)*2)*2)*2)*0**0**0**1++1++0,+0,+0,+0,+0,+1+-6)25)-4-%46!AH&Wc;q€W‚’mœ} †¢Œ‹¡Š¨‰•¸Ž È”¤Ð©Ó«¨Ò®§Ñ­¡Ë¥“½—…¯‡‚¬„‡°†ˆ®…Œ±ˆ‹«†Ÿ{{”tqˆk_sWM]BIO3JM0KK/./1,01./1./1.0/.0/.0////00.00.00.0/-0/-0/+/.,1-,2.-1-,1-,0,+/+,,*++)*+)*+)*+)*+)*+)*+)*+)*+),+)*+),+)*-(,*(),())'()'((&'*()+)*,*+,+)-+,.-+/.,/.,-,*-,*/+*/+*.*)-)(,(',('1-,2-*2-*2-*3.+4/,50-61.;31;31<42<42=31<20;1/;1/<1/<1/=/.=/.=/,>0-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z</‡=2‹=3‹?2Œ@2Ž@3@1’?1•=/˜</œ>2¢B6¡C7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹</Š;.ˆ:-ˆ:-†:,„;,‚:+‚:+:*~;*~;+|:*}9,|:.€>2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”¡…ª‰‰¬‹ƒ¨‡€¡„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžz¡~ˆ¡zŠ§{‘¶‚›ÄˆŸËŸÉ™žÇÆš˜Á•Œ·Š‚­€…®‚Œµ‰„«‰®…‰©‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k at 0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡¦‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6 at 93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#<?*V\@pzX‹gœu‹sŒ¡vŒ¦wŠ¨v‰ªuŽ´{™¿†ŸÁ¾–ºŠ³ƒˆ®}…«|ƒª{…ª~ƒ¨}ƒ¦~€ž|y”ur‰mh|cYkUMZFIQ<CH4?B//0*01+01+01+12,12,21,32-43.43.74/74/63.52-50,50,7/,7/,6.,6.,3.+2-*0,+0,+0,-/-./-0--/-,1+*/)*.)(-.)//(//(//(//)-/)-.*+.*+/+*/+*.-).-)./*./*./)./*.....0....../.,/.,1-*3.+5-*5.(7.)8/(:/);0*<2)=3*>5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹</‹>.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„¥†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C at 7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€™¹‡–¶„“³Œ®{†«x‚¨w‚¨yƒ¨|ƒ¦|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6- at 7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-, at .*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x at 1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆª‰ªŒ©ŒŽ¥‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€¥q‡¬x¯|‹­zˆªx„©v§v§u¦w¦y¤y€¢}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+ at 6-@6-A7.B8/A8/B90A8/A81 at 70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„©‡‡ª‰‹ªŠ‹¦‡‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz m¥r‚§t€¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31 at 51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒ£~§‚‚ª…‚¬†©„¥€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkz¢nx lwŸmx ny£s{¥u{¥w|£wyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60 at 51@51?40>3/>31?42 at 53?53 at 72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,¡LE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹£ˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3 at 6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnx¢rz¤vy¢vyŸvvštw™vu”rokj…fc|^UlON\ECC7 at 91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96 at 85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84 at 93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81 at 70@72?61?61 at 72@72A83?74 at 85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€</~<.|=.{=.|>/|>/}>/=/†9/1+¢<8ÍlfÙ~y­ZTŒC<ˆLAN at tJ<qM=pQ?qR at tS@zWD‚[J~eOmsOo{U„y[˜u_©oc¶mf¾qk½wo»‚w±Œz§—~žŸ€–¡¡~…y…™vˆ‘r‹rˆ‘r„“r€–r|–sx“pt’pm‹ii„edx\]kQV^GMP;ED0B;+ at 3+?2,;0*70*30)00(./'./)/0*2/*6,+:*+>(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw ty¢xxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5 at 707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83 at 72@72A83B94A:4?82 at 93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x at 3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&³=;ì|zý•’Åhc–G@‰K at xH:nM<jQ=fT>hV>lX at t[E`L€hPysQ„wUžt\´l^É__ÓV\ÙQ[×T\äouÙzx̆|À~µ•€«•}£’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R</O4-M1-I0,D/*>/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ<d^FgeLilOnuVm{Xl~Xk„Zg„Vg‡Vm]p•bq–br™duit›lo™ko–jr™mwvyŸxwšyt–us”uu”usqoŠki„ea|[TmMM]BMN at KB9F=69:49:49:49:49:4:;5=<7=<7=<7=<7@=8@=8A>9B?:D?;D?;E@<E@<E@:D?9D?9C>8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83 at 72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L at 2N@3N at 5N@7N at 7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80 at 93@93<5/MD=M@:K:3T at 9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;¦ND¤PE¨VJ«YK¥OB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ÈHIèbaÅEDÍWUáyv«VO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|Û€}Ûƒ؉‚Ãv½wº„x¶†x²ˆx­Šw¨‹y¥Œxš€o™~m˜xi“oabY„UM{IBxA>u:<i.2d02a11P&'G%#L0-M51G4.E2,D1-F1.F.,G+*K--Q6/YH4`W:f_BgdEkoNu|Zu„]oYlƒWl‡Zp]r’as•bu—dw™fv›hr–js˜os—qq•os•tw™xz˜|y–zx•ysrm‡jk„fi‚dazZTmMO_DNO?SK at PG>9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@<E@:E@:D?9D?9E>8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83 at 93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L at 2L@2N at 3N@3N at 5N@7M?6J=4I<3H;2E;2E;2C:1B90 at 91@91 at 91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NH¡PL¢OG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0£C5›?0™@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò<RðIZëP^åQ]ãS]àXbÛbiÕflÔjnÒmqÏqrÍutÉxwÇywÊ||ÉyzÈvxÇqtÆkrÅfnÅakÃ_kÅ`n³S_¥KUšGQDK†EIm69HT1-M0*H1+J6/K81K:2O>6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G at 8F?7JA:I at 9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M at 0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD<R3.j23ŽAG­LWÃU`Ë]fÆ_b›B>—I?–LAœNB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+˜7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMR­KL–A>‚71{8/v6,x2*„1-œ37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh…ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’£—¨–˜©™–¦™‘¢’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA<BA<DA<DA<DA<DA<E@<E@<GB<GB<GB<FA;FA;FB9HA9HA9LC<KB9JA8I at 7H>5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5 at 91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D</F<0F=.J>0K?/M at 0M@0M@/M at 0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?¾T`ÙTeæUfãUcËJOŸ30–:/‘>0™A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&­3(¶97º9=½7>¼7<¿<BÆJLÄTS¾XS™?7Œ4*‰,%61ÃHKÜOWâAQÛ3@Þ:9Í.*Ó84È74ÆE@È]U©WKWFwW at veI~pSpQ„fJdK©o[ÕuiîSWüDP÷;Jø9Iþ=Nÿ@Qÿ:Lù4Hÿ?Sþ9Mú4Ký3Ký1Jÿ/Iÿ0Nÿ6Sÿ3Tý4Vý6Wú7Wø9Zø=\÷>^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•£Šœ©•£®¦±¡¬´§±¹®°·°«µ­¡«¢” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA<BA<DA<DA<DA<EB=FA=FA=FC<FC<GB<HC=HD;HD;JC;JC9LC:KB9KA8J at 6J=4I=1H<0G;/E;/E;/E;/E;1E;1E;1D;2D;2 at 9/@9/@91?80<71;60;60:5/;7.;7.;7.<8-?8.A;/C;0D</G=1G>/K?1M at 0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6E·&+¨1)7(’:&—<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2­?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[P–UC{N9‚bI†kP„`F’[F­fTËrdçmhêEKò:Dê9Cç<DçBHçFKèGLêFMôJSòBMò9Iö5Hù2Gý/Fÿ2Lÿ8Rÿ9Vÿ9Xÿ:Xý:Zþ;]ÿ=_ÿ@bÿAeÿCiþDkþDmýBmüCoüCoüBqýBoÿGpÿ@hÿGmÿMpòIhéOkå[rÙcs½YcŽ?D`&$Q+"V at 3VO=IL7 at D-RJ3eYCujV€{gŽy™œ‹•œŒˆ“ƒ‚Ž€‰—ˆ›Œ™ˆ‡’‚Š“‚—žŽ¤¨™²¶§¸¼®¿Á¶ÀÁ¹ÂýÅÆÁÃÃþ¾¾°µ±¢©¢—Œy‡vi{e\sYTmORfJQ[BUZCW\F560560671782893:;5=<7>=8@?:@?:C@;DA<EB=EB=GB>GB>GD=GD=HC=ID>IE<IE<KD:LE;LC:KC8LB8KA5L at 4K?3J>2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0 at 91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D</E=0H?0J>0L?/M at 0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQÞ8FÔ3;½++­1'¡8%˜:!—9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2­?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(Þ</Í,"Ð71¾3,°7/Ég\¸l\ŽWC‡ZCƒV?‰R=©\LÎlaágbäTTðEKñ=Fä;@Ù=>ÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eý<hý>jý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘¦§Ÿ¡¦Ÿ–œ˜•ž›ž§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DA<FC>HC?HC?GD=HE>ID>ID>JF=JF=MF<MF<ME:LD9MC9MC7NB6MA3N at 3MA3JA2JA2I@1H?0G=1F<0D<1D<1C:1C:1A:2 at 91?82?82<71<71<8/<8-<8-<8-@:.A;/D</E=0H?0K?1M at 0NA0P@0P at 0O@-O?/O=1O=1M=0L</I;0F:.E8/C9/B:/A;/A:0?;0?=1@>2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#œ=!™;›< ¡=#¥;%¤6%ž6) 8-¢6,¥4,­81·@:¸C<²@6±B7­A4¨</¦8+¯:0¼C8ÃD=Å@7Ã>-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBŠM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿ<gÿ>kÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aƒCAg6/hB7sUJye\Œ}v£–­£¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£ˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DA<FC<GD=HE>HE>HE>HE<JF=JF;KG;KG;NH:MG;MG;ME:MD;MD;MD=NC?NC=MC7MD5KB3JA2H>2G=1E=2D;2C:1C:3A:2A:4 at 93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H at 5I?3L at 2MA1NA0P@0O at -O@-L?/L>1M=0L;1J91I81E80C90 at 9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ÊZY®86«.*²1+®.%­2#¬9&¬B*ªF,¦D'£A&£A&¢<#Ÿ9# 9*£;0¦:0¦7.­<4¶C<·E;°@5«=0¨</©;.¬<0»E9ÆLAÅE<¼8,¿6$Í:(Ý;.æ3,ñ+*ù(+ý&+û%'ø**õ.+ï2,ë4,è3*å3)ä2(à3%à:*Ñ2Ü?0Î6)È8-Â?5³A6Ñl`¿gY¥RB¨OAËcZçhbæRRêAFóBJë>Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþ<Tþ9Tÿ8Uÿ9Zÿ:^ÿ;cÿ>iÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg…ÿe‚÷]wï_xçh{Üp}Æqx§gg^X{ZQ—~wª™’¾°­Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH at HH>HH<JH;KJ8LK7ML8NK8MJ9JF:GD;JFCNIMNIPGDOD?ENE>LC4J at 4KA5MC9LB8F=4B90E<5C:5 at 93?74 at 85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D at 7G@6J at 4L@0O at -O@+L?,G at .F?/I;0K81M53K65J88F;9B?:6904</9D4:A/69$?=(bC1¼j^¹JA¦7,¥5)§7+¥5'¥7&¨=+£8$¥<&ª@*­@)¬=)¬9&®6%«6%¤6'¡7)¢8*¦<.ª@2¬B4¬B2¬A1©>,«=,­<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°</²<0ÊL@ÔKCÜGCá>?ë<A÷?Gý?Iù;GþDQüCQþDRÿDUý@Vü<Uÿ<ZÿBdÿFkÿAjú;gõ:gö<mùCsýIyÿKzÿMyÿMtøPsðOpçMiêMjüYxÿgˆÿ_ƒõGlöWwè_yÃ^n½{‡a^xp§‘„»§œÑÄ»ÝÖÐÝÜÚÜÛàÞÜçâÛëæ×ìëØîñÙñöÝó÷âó÷çôõëôôîòùôñùôðùñïöíîóèìîãééÞäæÝâÖÐÔÍÉÊ»º¸£¥ ‹‰yƒxr}op{k}†sxlv}k0./1/0320542653762873872:94;:5==5??7AA7CC9DD8EE;HH>HH>HH<JH9KJ6LK6MM5NM8KJ8KI=KJEPPRWU`YXjVTjRO`OIKMD?H?:F=8G>9H?:F=8B;5D:8A96?74?74 at 85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G at 6J@4M at 0O@-P?+L@*B?,B?.F<0H:1J65I56F35 at 65@<9:=6;>5@@4E<-J9)^B4€L>®QB«;- 2#¡6&£:'ž7$ž9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô</Ø:.à8/ç4-î1-ô.+ô.+ñ0+ê4)á7(×:'Õ:$Þ<'Ù6#Õ8%Ô=*Ì;*Á5&Ä:/ÏF<ÑF?ÚIDéOMóPQôGIð;@õ:AøCHåBEÚDCÒBAÅ>8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°–‰Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆų²®ž¡šŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH at KH>GG=EE<A@:<C:;?:7<74<73=82>93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L at 0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FE£;0¢2$Ÿ1 ¤9'¥<)ž7$ž8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾</²<.¬<.©9+©9+«<+­>-­>-­<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿa€ýUvñCdûIkÿTvÜ?\ÍI`Ø{…¸||aC;|n®ŽÕ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹­®¨¢¥ž£™£—£«žž¦—›£–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HE<JF;KH9MJ9PK8OM8QL8OL;LJ>QPL^]bmlzzz’‚¡€‚¨€€¦{u—rkŠe_{YSmTLdMEZG at PB<HD?F@;?<87;63;60<8/=9.;8/:70991;;3>;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾</µ:+°8*¯9+±;-¬4&½?3ÑH@ÙHCÝB@å@DóFLýNUð?Eð?EöBMþHUþHWüBWú@XüA^ÿAcÿCfÿFmÿIrÿMyÿO|ÿL{ÿIyÿDvÿN~ÿR}þKrøMoÿVuÿUu÷MjðFcïKfÒ>VádtþŸ§ÓŽd92lJ>¥ynÐ¥œõÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨¹“ϐƎ‹À‡ƒ¶{w©pmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1></?<+B=*C<)G?,J?+K@,LA/M at 0M?2L at 4K>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$­:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0À</º;,·9*´:+¶<-¹?0µ9-¿<2É@:ÒC?ÛCBãDHíJOöOVì?Eí>CòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ–¢ÿµ¼óžŽHFk.)¦kcÍ–óÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B at 4JD8ME8OH8RK;TK:TM;SL<RKAQLIZW^li|~Œ¸–™Ì™žØšžÞ™˜Ú”‘ÔŒŠÉ†…¿~µxv§nk–fe‡]ZwVTiMKYDAJ><?;:8;74762555457664872<:.?<+C>*F@*G?*H at +IA,IB0IA4HB6HA9G@:K=<I;;C9:=77875384/83/917<574+C1']80~C=–GCž>?ž51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿ’žÿ‹•ôƒ‰Ç`d§MMµjgΏŠï¼¸ÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛßØÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚¦‘•Åš ÚŸ¦ê¢©ñ¡¥ïž ë™›å•˜Ý”•Ö‘ʉ‰½‚ƒ±zy¡rq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACB<FD>LCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)¥>/©>,«>*¬?+­@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefȃ~嫧ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL<WK?TICSJM^Xfpmˆ‚„«‘—Ëœ¤ã£­õ§°ýª±ÿ¦¬ú¡§ó ¤îŸ£ê¡á™›Ö•–Ì’’ĉˆ´yyŸji‹`]|XUpRPhOMeNJcKG^FBS@=H?:>?:6@<1A>/C@/CB0BC3BD7?D=>D@<ED;BJ>CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À</Ä>2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vqל˜úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I at 7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ê— ãžªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«èŸ¡Ú™šÒÁ±tr¡he’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4 at B5BE:?D=<B>:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWU¦VM¦M?Ÿ@.œ9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieʏ‹ç¶²øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”â›¦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ã˜˜ØŒŠÉ€»uq®ie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}¢‡}Ÿ’}œ {š¥pŠ¤`u¬Yi¶VaºQU¸HF°@4¬;)¬<&­='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_—^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YI<YJCWKKXP]b^ysuœ…ŠÂ™Ü˜¤ð «úª³þ­µþ¯·ÿ±¹ÿ³ºÿ´»ÿµ¹ÿµ¹ÿ¯²ù¬¬ô££ë™—àŽÓƒ€Çxu¼sm³k`¢i]›cZ‘]W…VRwNKhEDV@@L85<A<@KABL at BQ>BZEJpW]‚cs˜r—¥z§®«²{£¸vœÀp“ÂcƒÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OF˜mfÁ˜”ݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D at 4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I at 7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ºŒ–Ô•¡é©õ¨°ù©±ù­³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«­ø¥§òŸžê—–⌋ׂÍ}yÅum¶pgªf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]d«fx¿kÉnšËo˜ÉiÈ`ƒÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$­6"­5$®5$³5&¶7(¼8+Ã;-È</Ó@6×@7Ú@6Ü?6Þ=5Þ93Ý6.Û4,Ó.(Ò-'Ó.(Ø3-á:4ã<4á81Ü5-Ü5-Ð,"Í)Ù7,âB6Ü?0Ð4%Ë.éF7óI<ýH?ü<7ô-*ñ#%õ')û/2ñ-.ë/.ä2.Þ3,Ú1*×0*Ö/)Ó0'Ó7*Ò9+Ö:+Ø<-Ú>/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È</Ä;+Ã:*Ã:*Â:*Â:*Á9+¾9*Â<0Â>2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©ˆÍ«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F at 4D=3C<2?80>7/=6.=6.=60>71 at 93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚±Š“Î’Ÿãš¦î¦®÷©¯ù­°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïšœé“•âŠŒÙ†…уÉ{u»mk¬dež_a’Y[„RQsNHbWFY_CQmBLEM˜MT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\žla}fVXH9kXJ”|r½ œÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ<OI;MG9KE9IC7G at 6G@6B;3A:2 at 91?80?82?82A:4@;5B?8EB9KE9MF6PE3RE2UF3UH7YLCUKLZScii…|«‰“È“žÞš¤ë¦¬ø©¬û¬­ý­°ÿ®±ÿ®±þ­°ý­°ý©¬ù§ª÷¤¨ò¢¦ðŸ£íšžè•™ã’”Þ’’Ú‰ŠÍ|€Àsx²ou©mpigŽj_}y_x‚WjŽP_£O\»S\ÍT]ÖPWÛHRå@Qè?RäCRÜDPÖCKÏ@DÊ9<É46äJLçIJáAAÕ74Î95ÎA8ÈD8¾>1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ</Ã>/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöw€íksÞXañ`mñ`mìboïs}숊́|ªth™yjskXON:_VGƒqg¯–’ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL<QK=OI;MG9KE7JD8IC7E>4D=3B;3A:2 at 93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜¢ç¤§ö¦§ú«©ü«¬þ¬­ÿ­®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è›¢æ™žâ’šÛ‹“Ò†ÊƒÂ„ˆ·ƒ¨ˆyšmˆšcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}€ñ‡‰èwyÚ_dñgtþm|óeuëlwö‘•ì¢ŸÄ”Š¢|hjUHQ<WUFth\¤ŒˆÛ¿¾òÕÙùãæÿóöÿúüþþÿüýÿþûÿÿüÿÿúÿÿøýÿÿûùÿõ÷ýóýÿ÷ÿÿøÿýöÿý÷ÿÿöÿùïõïáòìÜúõáÿýçÿýäÿþâÿÿçýþìùúì÷÷ëVO?TN>SK>PJ<OG:LF8LD7JD8H at 5F@4E<3B;1B92A:2C:3A<6C at 9DD:JF:MG7OG2QF0TH2UH5UI=QGEWQ]jh€~‚¨Œ”Å“Ø™¢çŸ ò£ ÷¦£ú§§ý¨ªÿ©«þ©¬ý§­û¥«õ£ªò£§î¢§ë¤©í¦©î¥¨í£§î˜ è”¡å”Ÿß”Ÿ×•›Íš•¾ Œ¯ªƒ ¥e´]pÂQcÐIWÜBNå>Fë<Aì<<ê?8ãA4ÜE4ÔI4ÊI3ÂF.¿B,Â?-âSEÞD<Ý97æ>>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ù‹ö†…éqsøryÿy†õaqàXföˆ‘ÿ´´Ð®¢ ›‡]jPDR9QT?jbU›ˆÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO at WP@WN?UN>TK<RK;RI:PH;MC7KC6KA5H at 3H>2G?2H>2F at 4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜Ÿç£¤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤­ü¡ªõ¡©ñ¡¨ì¥¨íª©ï­©ó±©ö¬©ø ©ø—§ò’¡â–ŸÖ¦£Î¶ž¾¹…œ¸gz¿L]ÑERß>Mç;Gç<Dæ=Bà@@à@@â>?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æ<?á=>Ú<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}…ùZlücwßbpû¬¯¶ªš}‘u]rQJY:LR8snZ¥•ˆË·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO at XO@VM>UL=TK<SJ;RI:NE6MD5LC4KB3JA2JA2JA2IA4GC8HD9LF8OH6RJ5SK4VK7TK:XNEULMYUckhƒ{}¦†ŒÀ•Ó–šáŸžìŸñžžôžŸù¢ýŸ¦ÿ ªÿ¡¬û ¬ô «íŸ§è¢¥è¥¤ê©£í« î¤Ÿï §÷š¦ðœ¡á£œÐ±˜À¿ªÂq„ÄTbÑCOâ<Fì8Aï7?ê:=å<?Ü@AÛACà<CÚ9?ÚADË;;ÌB?Ê@=Á31åOPæCFè?Dê;Bç8?â8;Û89Õ:8Ï;7ÔE?Æ=5Å<4ÌG>ÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦“jŒkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJ<VJ<SG9RF8QE7OC5OC5OC5OC5MC7JC9JF;MG9PI7SK6VK5VK7TK:WMCVMNZWbkiy{¡…‰¹‹‘Ë‘–Ö˜˜Þ™™ã˜™éšî› ô£÷Ÿ§ø ©ô ªï¨èœ¤ãœ¢àžŸàžá™ã›™â–›ßššÚ¤•Ð±ŒÀ¿‚¬Çr“ÉYqÇBS×ALß>Dã=?å==å<?ã=?á>Aá>Cà<C×8=Õ?AÏA@ÊC?Ã<8Ä96éWWàBCä>Bè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñœ¡£œŠa€`UoHOd=W`Aww]­¥’áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN at YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KG<OI;RK9TL7WL6WL8WK;VLBUMK\V`jh~yy›‚…²ŠÂ”Γ•Ò•”Ö••Û–˜ã˜›è˜žìš¢í›£ëœ¥è˜¢ß–ŸÚ•›Õ”˜Õ“—Ö’“Ö‘Ò…„½‘ƒ¶¥}±·s¢ÈfÒVzÕGaÔ<KÞAJàBCÞCAàB?áAAä?Cç>Eç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À</ÇE7ÄE6½>/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.­<.°</°<-±;-¶>.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXkë’– •ƒ_zYQlCSh?\gEy|_°ª”çÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN at YM?YM?YM?WK=VJ<UI;UI;TH:UI;UI;SI=OG<OI=QI<SL:UM8XM7YL9XL<UKAUKI\U]hexut“|~¥…‡·ŒÂŽÃÈ’ϐ”Ô’•Ü“—à”˜ß•šÞ•Ü’›ÖŽ”ΉÇ…‹Å‡Ã}ƒÁ~¸}tŸŽp”¨gÁ\„ÖNvâAcè:Uê9KæAGàECÜGAÛGCßEEæAGî<Jí=JæBI×>@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,­<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUh懍£“ƒg]YtI^uIhwPˆf³²–èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN at ZN@YM?YM?YM?XL>XL>WK=VJ<VJ<WK=WK=XL>QI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}¥„…±†‰´‡‰¹Š‹Á‹ÈŽÏŽŽÔÕÓ”Ó‹ÊƒˆÀ|¸u|²ov­io«ljœ€lˆ“cy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+­<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~ƒ¬—†ykmˆ]o‰ZyŠ`—r¶·˜ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö­¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YL<YL<XK;XK;XK;YL<YL<YM?SI?TJ>UL=XL<YN:ZM:ZM:YN<YM?ULEXOR_Wbd_sjfsoyy|~¤~€©‚²ƒ„¼††Æˆ‡Ë‰ˆÌ‰ˆÊˆˆÈƒƒ¿|}µvw­pq§kl¤fg l`Ž‚`q•V^³N^ÒJ^ì@X÷6Kþ3Fþ9Có?BéD@áHBÞICâFIéBJò=Nï>NÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-­=/®>0­=/«<+«<+­<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷<YêKaÝt{µš‰žz}˜k{—f‚•h‘u¬²ŽËÌ­ààÄéìÑîöÞåóÙÙíÑÏæÉÅÞÀ¼Õ·´Ë®ªÈ¤šÁ”–™Ã“¡È™§Ë¬Ë¡µÎ§ÁÒ°ÎÙ»ÙÝÄåãÎìåÕïáÖëÚÒçÒÍãÐÊàÏÈÚÌÃÕǾ[N>ZM=ZM=ZM=ZM=ZM=YL<YL<ZM=YL<YL<XK;XK;YL<ZM=ZL?VJ>VJ>XL>YN<ZM<ZM:ZM:ZM<[OAWMDWML\RZ^Xfb]qjfspwv–xxœ|{§~µ„¿…‚ň‚ȉ„Ç‚}¿y·zu­xq§vo¥tk¢pg za‹„QZ™HE³EHÓHOîBNø:Fþ6Aþ9@õ==îA=æD?ãEBäCHèAKî=Më?MØ?BÑGDÅA<ÃG?²9.³:/ÑUKÃ>5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò  ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,­9*­9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzƒÿ‰ÿy€ôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº‹™©„‚žn~šg—hœq¡©‚´º–ÈÍ­ÕܽÌÙ»ÁÔ´²Ì©§ÂŸž¼˜š¶–²Œ±†‰³†µ~¹„•À‹œÂŸÄ‘¨Å™²È¡¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZL?ZM=[N=]M=^O<\O<\O>YM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{u³ƒ~ÁŠƒÉŠƒÇˆÀŠ~¼ˆy²ƒr¨†r§t«‡l£†\„HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°</²<0ÀD8ÒMDÇ61Ô;6Í2.Ì3.ÖC;Ç?3µ6'»>,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyƒõq|ÿ|„ýw€út}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´•€’¡zƒm}™f~”c‡—j”Ÿwž¦ ¨ƒœ¨„’£Š£|€Ÿvzšqyšo|r vƒ¤u‚­wƒ³y‹¸‘¼„“¾†—¾‡œ¾Œ¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZM=\L=]M=]N;^O<\O<\O>]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxp¬€y¼‡€ÄŠÄ€Á~ºt«Œn¢—q¤¡u¨šjž™W{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|„øv€þ|„üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®Žw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸk¬t„±vŠ·|»}¼“¼‚–½†›»‰›µ†¡³‹­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\L<ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<\L=\L=]K=]M=]N;^O<^O<\O<_RA]QA\PD[NFZOK[PN]QS]RZ_SgcXvh]…kb‘sk¤vµ†}¾‰}½—…Á™€·›v©žpž®u¢ºv¥µi˜±Rt¸<D¾5-º4+À<0ËC7ÓE9ÛC8ä?9ñ=<÷:>ù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+­9*©8(­9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dð<Eé5>ä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿˆû|ƒû|ƒûyûx€ÿwÿsÿn}ÿgvû`pü[mõG^ÿ<Zÿ>\ìFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~£mƒ¬r„²tˆ¶x‹¹y‹¹y¹z‘º~”º“±•¬€›©†©­’ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{·ˆ{³™…º¥…´¯€ª¸z¡ÆxŸÑuœÌcŒÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ<Aú=Dø?GðAHâAFÒ@AÆ?<¿?6¶<1¯9+«:*ª9)®8*¼>0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò<Ió9Gè)8í*8ñ-9ô0:ñ27ê01á+*×(%Ø0-Ú72Ô2/åC@ÿspõVSÝ>;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À</¿9-À:/Å<2åXQÜMGÊ70Ç0)×<7ÞA:Ú;5ß<5ç>9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿ„ˆý~…øy€øy€üyÿx‚ÿt‚ÿn}ýetù^n÷VhóE\ý8Vÿ<ZîH\ÇYZŠlRcrG\tB\yCdzIl}PtVvƒXrXoWm‡ZlŽ\o•buh{¤l¨o„ªq…«p…­q…±tˆ´u‰·v‰·v‰·v‹¸w¹z‘´|«{’¤|›¤…­«–¾²¤È·¯Ç¸µ´«®¡ž¥—’™[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]L<^K<^K<^M=^M;_N<^O<^O<^O<^N>^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xr¢w¨ƒv¤”}§¬†«Â‰©Î‚žÚw”ál‰ÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}öw~üyÿx‚ÿsƒÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWh<Yq?[vCfyKn~QtVx…Zyˆ_wŒay•exšhz m|§qªr„«r…«p†©o‡­rˆ°t‰³tˆµt‡µt…·r‰¸t‹¸w¶{Ž¬xŽ£x™¤‚­­•À¹§ÎÀµÒÄÁ¼¹À¨ª¶œœ¨ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:[K;[K;\L<\L<]L<^K<^K<^K<_L=^M;_N<^O<^O<]N;]N;^O<_O?_O?`P at aQAbPFbNPcN]_Pe`Usga…to—{t}q—v–®ƒŸÌ‹¡Û‚–ær…ëduéPdé;Rù3Lÿ<QûERéDKÕ?@Î@>ÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î</Í<+Ë:)Ä;(´;&­:%¯<)³>-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}÷xýz‚ÿx‚ÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€©o‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµp…·r‰¸t‹µv‰¬tŽ¥wš¨„°´™ÈïØ̾ÚÑÌÂÂÌ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aP<bOAeMMdMW`O_aUmgb€uq’|v˜€s‘uŽ­€”͆”ß~‡îqyùclúP[ú;Mÿ*Fÿ2Qÿ<Sñ<Mà<E×@EÕCDÔBCÜCEàBCäADâBDÞDBÔC>É@8¾>3¸>1¯9+¨7'©:)­<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆ</Æ:-È:.É7*Í6+Õ8/Õ4,Þ7/æ93è62é1/è/,î1/õ15ÿ2Cÿ0Eÿ-Fÿ*Bÿ%@ÿ#=ü 9ö 8÷'Aõ+Eõ.Mõ/Pó+Pô)Tÿ2`ÿAhóCXÿ`mÿhuøVeíKZñL\ëBUÚ2Cë@RÝ7CÉ-1º((±.$«8&¥?&¨@'¸?.¼:,ÝYMá]QÍG>ÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿˆŠÿƒ‡ùzû|ƒÿ{†ÿx„ÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„¦t§r}¨p¨n©mƒ©l…©l…¨n‡«n…­o…¯o°l€²k‚¶n…·r‡³t‡­t§wœ¬…²¹šÈƯ×νÙÒÌ»¿Ê¤¬¿’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–«•Æ„’Ú}…ðuzþlmÿY[ýDLþ/Iÿ5Rÿ<Uó<Né?LãCKÝBHÖ=@ÛACÜ@AÞ@AÛA?ØC?ÐA9Ç>4½=0µ?1¬;+©8(­<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(›?&œ>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%­9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿ‰‹ÿ‡Šû€…þ†ÿ}ˆÿv„ÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹¥vŒ¬z†«wªr~§m|¥i}¥g¥g‚¦i‚¥k‚¨mƒ«m‚¬l®h~°i³j„¶o‰¶s‰¯rŽ¬x™°„­»˜¿Å©ËʵËͶ½Åžªº‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P at bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ²ƒ©¥‡©¾ˆ Ð‚’ây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ<Gå>Fá<Bß<?Ú<=Ö<:Ï>9Ê=4Á;0¸:,§6&¯A0­<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&™2!™6#š;'Ÿ<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼</³9,­/#«(³-$Ã9/ÒC;ØH?äPFßE=Ú70Ý0*ç0,ò21ù13ý14÷/1ö01ö01ó0.ò0.í2-æ5-Ý9/Õ=0¾2%À>1¹=3Ö_Yésqÿû„†û‡Šÿ„Œÿxˆÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€¡jƒ¦n‚¨o€§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~­g®f±gƒ³i‡µm‹´r°vŽ®|™´‰§½™±Á¤²Á®¦²°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡»‡ŠÁž•Ê£‹»«£¹xÓyƒê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À</·<,«<+ª?-©8(²:,ÁA6Å<4Ç61Ô<7Ò50Ö5-×5*Ø4(Ù8&Û:&Û;%Ú9'Ý6.æA;ëMDáI<Ð>/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,™/)(’(ž-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾</·=2Ó^Wévsÿù…ˆø…Šÿ‚Šÿt…ÿf|ÿ\vÿXtÿQoþIhü@aó:Zñ?_áI`ÁS\{?7RF.M_9ZvCe‡Ks•Yxœ_wb{¡f}¥i}¦j|¥i|¥i|¤h{£e{¡d{¡d}¡c~¢e|£j}¦l}©l}ªi|«e}­c¯c‚±c…°h‡²kˆ¯pˆ«s‹«|¬„ª‡Œ¢‹x‡€dppR^^]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8^K:_N>aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†sv£|ƒº‚ŠËŠÔ˜‘× ŠÊª‚´¹}ŸÏ€“䄆îvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>-­>-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#œ' š%©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿ“’û‡Šúƒ‰ý~‰ÿr‚ÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{£g{£gy¢fy¢fy¡cx byŸby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`‡²jŠµn‹²s‰¬t†¦w‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~µ†Ê…ŒÚŒŽáŽ‡×Ÿ‹Ó­ŠÄ³€©½yŽÌ{Þzò‚wÿsrÿcgùU\ôMTõGPôCMò>Gï<Bå6;à88Û97Ô<7Í@6ÅA4¼A1·?.«:*­>-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿ“’üˆ‹ý‰þz‡ýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wby¡ez¢fw dv awŸavž`xŸ`xŸ`{Ÿaz cz¢fz£gz§fz§bz¨`z¨]|«]~­_†²g‹´nŒ³tŠ­s†¦u€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN at XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}«z‚Á‡Ò„ŠàŠ‹å“ãŒÚ „¿žuŸ l‚¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï<Bê7=æ5;á78Ý98Ö=7ÎA7ÆB5½B0¸@/­7)´@3¯:0°;1ÈRHÕ\QÉMC»;0¾90Á7-Ì9/Ö>3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿ’‘ÿˆŒÿ‰ÿw…úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcy¡cx buŸ`uŸ`u_vž_wž_xŸ`{Ÿaz¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^€¬a…¯g‡®m‡ªp…¥sƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨w¶zƒÄ~†Ï„‰Ú‹ŒÞ–Ü™ŠÍ›…¶¢ƒ£ª„‘«~yŸl[šQ>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿˆÿ|ˆÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{Ÿaz¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_ƒ­e…¬k‡©m‰§s‰¥u„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~¡|¥}w£{u¥xv§sy©s}°x¸{„¿~†Ä„‰ÉŽÎ”“Íš“Ç •½«›µ¼¦²É­©Å¦”ªˆmœfJœE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ë<Aç6<â-6Ý)2á1;ç<DðLSý]eÿksÿjsú`jöZgùXh÷[fôddèZVèWTØ@=Ï10Ô44Ó33áC@ãJEéRKêSLáJAÙ?7Ø93Û81ã33ó.7ÿ0>ÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿŠŠÿ‡ÿv†þi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX at ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_‚¬d„«h†¨l‡¥o†¢q€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P at ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwµw|¾x€Á}…Ä‚ˆÄ…ŠÁ¿—–¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»–Ьˆ¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà<Cþ[`ÿouÞ=Bÿ}‚ÿmqêQTÔ>@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿ‡ˆÿ†Žÿp‚ücxñ\pôXn÷OiûBbÿ9aÿ<döAbäRg°QWd/'WD3GG/RT<U^?btLiQq‹[v’_z˜b|dxœ_r™Zn—Un—Un—Uo˜Vr™Zt›\w›]wž]wž[x¡[y£[w£Xv¢Wv¢Uw£Ty¥Xz¤Z~¦_¦c¡d~œf{—frŒ]i‚X`vRZoPRgH\L<^N>`P@`P at _O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|¥~€±€¹}ºxz·rs´lo¶twÈv{Ì€ƒÊ‹Æ–—䤾²°»¼¹´ËƳÓÌ°ÙϬÛϧÜÏ£ÝУÙ˜٘Ѩˆ¸€g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~„ÿ~†ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿ˜šþ{ƒÿm€ÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]zž^u—[m‹Ub~MXrCSj>AW0?U/<R,[K;^N>`P@`P@`P at _O?`P at aQAbRB`P at _O?`P at bRBcSCbRB`P at fVG_QF\OG^TSaZad`omkƒvw–wy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~Õ‰‰Ó˜˜Î¨§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔǛӼš»œ€©}dÅ‹wÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿ“ûs}ÿfzÿ^vùWo÷OiùFfû?bü<cô@cåOh¹KVx;8L2#<:#<B(EG/OS8VdA`rJnƒXu_v“]t“Xq“Vp”Tk’Ok”Pl•Qm–Rp—Vr™Xsš[sšYt›XuWuŸWuŸWtžTržQqRpœQn˜Pl”NhŒLbFXu?Ni6F]/@W+ at W-@W-AX.YL<[N>^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}ׇ„Ý—”Û©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡ËÃœ¸¯©››ƒk¨ƒp§o`œRGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿƒˆølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\<YkEg|Qr‰[tZqUmRkOiMi‘Ki’Lk”Pm–Tn—Up—Xq˜WuœYuWtœUrœTpšRm—Mk•Mj”LeGaˆE[AUt;Li3E`-AX*>U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xz£z|­w|´sy·mr´bi¯]d¬ag±lr¾x{ʉ‰ß•‘夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îê­îè¬éâ«ãÛªÚÓ©Ë¡»¶™¥¥›™„“ˆv˜q™rc›bW³i`Ïrmû‹‰õutê[]æLNèCGí@Dì<?é;<ß:8Û<8ÞE?ÓC;Ã:0º:/°6)§1#¿I;ÛaRêk\ÛSEÉ:,Ì4'Ô6+×4-Ù42ñMKþZXíKFÙ80Ö3*Û4+Þ2(ß.&á,%á,%Þ-%Ü1)Ú6,Ù;0×?4Â/'Ä4,Î:6ÙCBßFHàEIäGNêMVñQ]öVbøXbù\eÿgpÿmuôYaÞ;@ê17ñ.4ò-6ð+4ë%2ì(4û=IÿS_í?IèAIêGLôQVÿY`ÿX]ôGMä68á53ä73ê;8ò@>ô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿy€øgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P at _RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xw¡xz«y{´sy·jr³`g­[c«_g°jr»v|Æ€„Γ•àžžä­®ç»½æËÉßÔÓØÝÛÎáßÆåá¾æâ¼äß¹à׶ÚеÎƱ¾µ¦­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meºoi扄î~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn at ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~ǁ‡ÑˆŒÓ™Ý£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþŹ¹´¨¬£šŠ‹†x{tyvquleleogŽa[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo at YpB]rG^uG[sCYtAXs at NB2QE5UI9WK;XL<ZN>\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wx¦vw­pu¯jo¯ah¬^f®_g°em¶pxÀ}…͉Ø—Ø™ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦˜¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M at 0JC0@F,AO.K[6Xj at bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu at JC3MF6QH9TK<WK=YM?\O?^QAdWFeXGdXHbVF_UIaWMg^Ulcfwr‰yušxvžtsŸrr¤tu­lp¯bg©Za©_e¯fl¸ms¿v|ȁ‡Ó“Ý—œÞ›¡Õ §Ó©­Ú®³Ý±´Ý²´Û´´Ú¶´Ûµ±Ö³­Ñ®§É«¡ÄªžÂ¤˜¼™‹¯ˆ~™|x†dbgiefcYZj[X{c_yVP’c]ŠNF¢UM½`XÖkcñwrÿzÿzwÿnjþa\÷TOéGBîOIÝB=ÞG@êWOº,"¾1'¾4'Ç>.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨yw©pp¦gg£`a¢\_¤`b­fhµopÀyzÌ„‚֍‹ß–’眙栞ݡ¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ Ó¥žÑ£Í¢šÉ¢™ÈŸ–ٍ»Ž‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPµXPÁZSØkdìyrù‚|ÿ‹†ùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿ<gø>cçNj¯IV^$"D, ?:'HE4PM<PI9EB1>C/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC<JE?PE?TG>[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtp¢pm¢gfŸaaŸ]^¡\\¤ed°kjºtrÅ}{φ‚ٍ‰à”Žæ˜“å›–Ùœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ñž–Ñœ”Íœ“Ê›’ÇšÄ“‰»ˆ®‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RºYRÁXRÓfaàqjãvoí~wý‡…ÿ‡…÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb‰8?S*$A5'69(;<,B at 1DA0@?-=B.>G,=CKP'\b<eoJhvRezQd~Od‚LaƒFa†Aa‰@cŒ@gDiŽHkMl‘Nl‘KjGhHf‹FgŠJf‰If…JdƒHfƒKdIdHd€FeGeGfEb~A]€>_„?b‡B69.:<1??7DA:KB;OE<VH=YL<^O<\O<\SB^WMc]]helom{sq‰so”qk™jf˜c`•\[”ZZ˜\] \_¦hjµno¿wxÊ€Ò†„ØŠˆÜ‹à‘ŽÝ“Ó“‘Г‘Г‘Ò”Ñ“ŽÑ“ŒÐ’‹Î•ŒÍ“‹Ç”‹Ä”‹À“‹¾Œ„³ƒz¥€r•|ewu^fi[[d[Vd[RfXKrVH„TH£ZQ½`YÉ\YÏYWÛcbákißokãvqûŠ„ÿŠ†ÿ…ÿ}y÷nhîaXÄ4+À2&Ä8)Á:'À9&À9%Â9&Æ;(Ì:+Ð:,Ö:-Ó5)Î5'Ð8*Ô>/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE<VJ<XL<YM=YQD^WOc^bigron€roŒrm•jg”`^WW‹TUŽWX˜\_¢ac­ln»rsÃ{|΂ƒÕˆ†ÙŠˆÛŒˆÜŠ×ŽÒÎŒÏŽ‹Ð‰ÑŽˆÐŽ†Ï…Ώ…ÊŽ…Ə…Á‡¼‡¶‰‚¬€xoŒ€_p|Y`lXYd[T^_Q_\IjWF}SEžUL¾\YÐY[ÙX\äcgçkkáplåxsì}vízsþƒ~ÿ†ÿ{õkaÉ<2Ä8)Â;(¿:'¿;&¾:%Á:&Å:'È9)Î8*Ø:.Ô6*Î5'Î8)Ñ>.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe€0=J C1-11'.6'4=,=B.B at +B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cªfj´orÁuxÉ|Ђ…Ö†‡Ù‡ˆØŠ‰Ù‹ŠÖ‹ŒÏ‹ŠÌŠ‰Í‰‡Ð‰…ш„ÑŠƒÑ‰‚ÐŒ„Ï‹„ȍ…Á†º†°‡¥~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ‚{ÿ‡~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…S£lª¾‹¨¾Ž¥wo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD<NH<NG=OJDWSR_^ffeugggf†ba‰[YŠQQ…NO‡RS“[^£ei³lo¾uwÊz|сփ…؆‡Ù†‡×ˆ‡Õ‰‰Ó‡ˆË†‡È†…Ë…ƒÎ…€Ð…€Ò‡Ò‡€Ð…ÒŒ…ˍ…ÁŒ…¸‹…«„{v|jz„VcPVnUQd^P[eMXbIb^EsXCOE´WRÐUZÚSZç\cèagågjèpoìyræqh÷|tósjþxmæ\QÄ;+¾5#Â;'Á=(Á=(Ã<(Ä;(È;)Ë9*Ï7*Ö5+Ø7-Ô:.Î:,Ç:)Ä8'Æ:)Ê=,Ï=.Ö@2ÙA4Ö>1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:…TŸ®w©Á‡µÎ—¯Ç“’®}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IE<HE<KHCRPQ[[eabtbb|``‚_^ˆZXŠTTŠTT\] gi³psÄvxÍ{Ø~‚Ûƒ„Þ„†Ý„…؃„Ö…„Ô†…у†Ë‚…ȃƒË‚Íƒ€Ñ…€Ôˆ€Õˆ€Ó…Ò‹„È‹ƒ¾‹ƒ²‰‚¤|“wp€veo~U[|PQnUNf_O]eMZdIaaGq]E‰TF­]TÈZ[ÔVZâ[aæ]déaeîllõzsírj÷xoÞYPå[PÒD8Ã5'Ç:)Å:'Ä<&Å='È=(Ê;*Í:*Ð8*Ô6*Ó0'Ô3)Ò8,Í;,Ç;*Â;(À;(Ã<)È;*ÕC4áK=ÞH:Ó=/Ê4&É5'Í;,È9)È9)È9+È9)Ê8+Ê8)Ë7+Ë7)Í6+Ò<.×?4Ø@3Ú@6ÛA5×:1Ò1)Ü0.å14î49õ6>ù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚P¢§q±ÅŠ¯ËŽ°Ì’¦Ã’®}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD<GFBOOQZZd_ap^`y\\~`_‰\ZŒYX‘\\šgg­qsÀz|р܁„ႅ䅆ㄅჃہ‚Õƒ‚Òƒ‚΄‡Ìƒ†É„„̃‚Î…‚Ó‡‚ÖŠ‚׌ƒÔ…ÐŒƒÄ‹‚·Š‚«…›xˆsnuqbevWUtSLjVKf_MbfM_eIcbFp^FzQ?[M·ZSÅSR×VZâW\êY`òce÷rmñnf÷qhÑD;ÔA7Å1%È4&ÔC2Ç9%Ç:&É;'Í<)Ð:+Ó:,Ø8,Ù7,Ï,#Î0%Î6)Ë<,Ç@-Á>*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<?ÿ\fÿQhÿIfÿ9]ÿ=hù.]ý<hé;\å\p¦LV^..G83BC><89?48E26C41=:)>E&FU*bs?›a­½±ËŒ«É‹¦Ã‹º„Ž¬z{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE at JLKORYVXeZ\s]^}YX‚[Y‹^]–ee£nn¶wxȁ؄…⌌ðŠŠì†‡ä‚‚Ü€€Ö‚€Óƒ‚΀ƒÈ„ǃƒË„„ΆƒÐˆƒÓ‹„ÒŒ„ÏŠ€ÅŠ€¼‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î</Ç8(Ê;+É:)È9(Ç8'È7&É6&Ë5&Ì4&Ð7)×;.Ü>2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78 at -1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚¬ÊŒŸ¾‚˜¶€”²~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utº~·‡ß‹ŒéïŒŒð‰‰ë…„ ؀~Ҁς‚Ì…†É†‡È‡ˆË‰ˆÎ‹ˆÏŒ†Î†ÌŽ…ÈŠ€¼‰±†|¡‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æš¹}š¹€š¶ƒ©xrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1 at B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zx·…ƒÎ‹ßêŽïŽŒíŠ‰ç‡„߁Ó|Ë}ȀƅLjˆÆŠŠÊŒŠÉŒŠÉŒˆÅŒ„¿‹‚·‰€­†|¡€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Î</Ä6(Ä;+¾6&Æ:)Ç:)Ç:)É:*Ê8)Ë7)Ì6(Í3'Õ9-Õ7,Ö3*×3*Ú3+ß6/å:3é<8ð<=í49ë07ì18î3<í4<ë7@ê=CÝ7;áAAìNKøYUýZUúQLïB>å84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa‚89e?6R at 2DA09=,57)>6+K9/E-#R=,g]Bˆ_’«t—»{–Áz–¿{”³xœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™Ms¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zw¬„‚ÃŒ‰Ö‘ã”‘ꓐ뎋≅قÌ|Ã|¿€~½„‚Á†…Á‰ˆÂŠÃ‹ˆ¿‰…¸‡®…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,­8&­8'³;-«+"Ã54ý`gÿTdúG\ð<Uë=XçG_áOdÒO_´SZvGAXH9KD2FE1BE0=?*:8#;3?3PG*nkHŠ“f•¬t‘´tŽ·s‘ºxž»…¡¸Š§}l‚[K_:AW0Lc7Wr?_{@dƒ@iŠCk‘Fi‘Hg‘GdHeŽJb‡Bc†Bd‡EgŠHjMlOm‘Qn’Rj‘Pj‘Nj’Lh’Jg‘Gi“Gm—KpœOv¥Wv¦Zx¨\78(68*66,56.56056067/68+;>-=@- at C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}²ˆ†ÇŒŠÓ•’ᔑ␍܋‡Ó„Ä}º|µ|³~·„º‡„¹‰…·Š„²†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ð<?ê69ä15ä5:èBFíMOÿxwÿqnñ`[ÝJCÑ83Ñ2.Ü73ç@:à93à91à72à72â62ã73å76å76æ68ç79ê7;ë8<ë8>ë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g<xT‹™f‘¤m©n²r—¹}Ÿ¶ˆ’§€u†dRcC?P0BS1Oa9Vl=b{Be‚BiŠCjEi’Fe‘FbHcŽGb‡Bf†CgŠHiŒJkŽNmPn’Ro“Sj‘Nk’Oj“Mi“Ki“Ij–InšKržOv¥Wv§Xw¨Y?=.=>.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{y¡ƒ€·‡…ďŒÑŒÓŠÏŠ…ǃº~y¯zw¦yv¥{v¬|y®€|®ƒ}©ƒ}£x—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À</¶8)²:)®;)ª;(©<(¨;'¥:&¥:(¥<) 9( ;) 9*¢6*µ>8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H at +;567>O%Lf6lŠTw”\„›e‰šd›f£k”­t˜°|ƒ•mn}\Q`C<J09F,AP1O_;Wj=czDe‚Bj‹Dk‘Fi’Fe‘FaFcŽGcˆCi‰FjKlMlOlOm‘Qn’Rm”Qm•Om–Pl–Lk—Jm™JrŸNs¢Q{¬]{¬]z«\DA0DB3DB6CC9CC;CC;BB6BC3DF0EH-GJ-JM2ON9RQ?TREUSD\ZC\\D\]Oaaaihxrq{z¦~µ†‚¿ˆƒÃˆ„Á„º{®ys¡to—om•plžrn¡vpžwršwr’to…skzrinmb`l_Wj\Qk[Lm\Lo\Mo\Kq[Mq[No\Nm]Nl_Om`Os`Oz_N†ZMŸ_S¤PE®B8º;2Æ6-Î1(Ö2)Ý5,â70á6/á4-à3,à4*Ý5(Ø7%Ô9%Ï:"Ê="É=$Ê>'Í<)Ò;*Õ9,Ï;-¿@-±<(¬5!®3!º8(Ä<.Ê:/Î5-Ø93ðNIñTMÙB9ÌB5¾?.¦1³<(¾<,Á9+Á7*Â6)Å7+É9.Ï;1Ô;3áD=ãA<ä?;ç>;é=;é;:è88ç85ç85æ95æ74é;:ôJJÿ\[ÿdcøc_Ì=9Á82½4.Ã81ÕA=ÞE@ß=;Ù42â;5â;3â94â94ä84å84ç77é77ê69ë7:ë6;ë8<ë8>è7=è7=é6:ë7:é69æ89à;9Û>9Ñ>6Æ<1¾<.³8)®;)ª;(¦;'¤;(£:'£:' 9&¡>+–7%œ=+š9)š2'ÃPKíkmî\fìP^éJ\ßHWÍKS¹RS¤[R’cQ€jUJM8DL7JB/H9$B7FH#Up=g“V~³o‚³qƒ¥h}’YƒYŽ–c‰—d|Œ_XfCGT89E-6B*:D,=J0JX7Wh>e|Fh‚Cl‹ElFi“Gc‘Fa‘GaGf‹FlŒImNn‘OlOkŽNkOm‘Qp—Tq™Sp™SpšPo›NqNt£Rw¦U|­^z­^y¬]IC3JD6IE9IE:IG;IG;HF9HG5IH3JJ2LL2NN4RP;TQ>XRDYTA]Y>[Z>\YH^[Tdahnk~xs“}x {§ƒ}«…­ƒ|¦}wunoi…kg‚ieˆjf‹mhˆmi‚mh|lfrkbgj`^g]Th\Nh[Kk\In]Kq_Kq_Kp]Lp]Np]Op]Ns]Ow]N~]N‡\L’XL¡UH¤F<«9/º7-Ê7/Ó6-Ú6-Þ6-ß6/ß4-ß4,ß4,ß7,Ý7)Ø6'Ñ6$Ï:$Ì<$Ê<&Ë='Î;)Ñ;*Ó:,Î<-¾A/¯<'¨3!¬3 ¶9'Á=.É;/Ì8.Ì2*àA;ø[TàI@ÐD7ÊF7«2¹>,ÊF7ÌB5Ê@3Ë?2Í?3ÔA7ÜE<ãF?â@;â=9ã:7â64ã54ä65å97å<9ä?9à=6Ü:5ß@:êMHêQLÓ@9¸)#¸-&¾5-É>7Ñ@;Ö>9Ú;8ã;;ç==â96â96â96ä86å95ç:6é99ê::ê88ê88ë8;ë8;é9<è8;ç7:ç7:é6:æ68â88Þ:8Ö=8Ì=5Â<1¹;-®9(ª;*¦;)¢;( ;'ž;&Ÿ:(›:'˜?-Œ5"™=.˜8*—/&Í\X÷y|ßX_æXdÚQ[ÊKR¹LO©VPž`UgU€nVPW8?J*<;C=UQ+lvDƒ¢f”Á~‡¼v†¸s|žan‚Mu~Q‚‡^u}V[b@;D)4<%5=(=D2<E29C+CP2Ue>g{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UN<VO=WP>XQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*À</Ã9.È5+Î5-Ô:0ÛC8ÝK>ÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&¼LJämoçloÍVZ½LNµNOªQM¢UO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸ¼yœ½x’µs~ah€L\mCYdBT]BHP9?D0:=, at C2<@1:>0<C3:C0AN2Rd>]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNr¡Pt£Rv§UyªYzª^y¦cm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO at YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5¿QP×eeÑ^a·MM¬NL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯n¥¾|™²pˆ bj‚HauBTe;JX7FP7?H59?158-:</AB4=?4:=2=A3:C0 at M3Rd>^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp Ls¢Qu¦Tx©Xx©Xx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.­:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%­5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:1­7+¥7(¡;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=¹SOÀWT¸PO«IF¢MHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“¦n¤¹€«À‡ž³{|[[o<?R$AS+AP/?L2:C06<.69058/9;. at A3=?49<1=A39B/@M3Qc=`vGi…Js’Or–Np”Jm–Jm•Nk”Np”Tq•Uo–Sn–Pl”Kl•Il—Hn™IpLpLpŸNu¤Sx©Xyª[u¦Wq X_‰JVEOx>aXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL at PM>TN at UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Î</Ó:2Þ65à24Û12Ý34à88å;<ê=?ì<>î7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ªPH¬MG©LG¦QLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™©x­½Ž¦¸ˆ¡ts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2Pb<awHj†Kt“Ps—Or–Lo˜Lo—Pm—Op—Ts˜Up˜Ro—Pm–Jm–Hn™Jp›KqžMrŸNt£Sy¨X{¬]w§[mSe’M[…FS|BNw=cZKcZKcZKcZKcZKcZKcZKcZKcZKcZKd[Ld[Le\Mf]Nf]Nf]Lf^Gg_Hh`IiaLiaNi`Oh_Pg^Oj`Ti`Qi`Qh_Nh_Nh`Mh`MhaNd^N`ZL[UGVPBPM>NK:NK:NK:PM<RO>TQ at VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"š4›7 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(­:(­:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=5­7-£5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QI¡NFžNG¡WN˜UL’XLZN\N]R”`U—aWhW‰f˜¥z©€Žj]kHDS42@&$2-:&0;*5=.9?3<?4=?4:;3::099->?1;=28;0;?18A.>K1Pb<bxIk‡Lu”Qt˜Ps—MqšNq™Ro™QršSršSršQp™Mm—Km˜Ip›LsžOt Qv¢Sx§Y{©^z¨_qŸVd’JY†C]†JW~GRyBe\Me\Me\Me\Me\Me\Me\Me\Me\Mf]Nf]Nf]Ng^Og^Oh_Ph_Ng_Jh`IiaLjbMjbOjbOjaPjaPjaPiaNh`Mh`Kh`Kh`IiaJjbKf_Mb]J^XHXRBSM=MJ9KH7IH6KJ8LK9LM;NO=PQ?QTASVESVE[YL^VIcQEzXN¡ha¶eaÄVUÖQRÙ@Cß:>Ü87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$™6•5›;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OA£YNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2<?6 at A9?A6<<077+89+>?1:<17:/:>07 at -=J0Oa;bxIk‡Lu”Qu™Qt˜NqšNršSpšRršQsœPr›Op™Kn™Jp›LsžOv¡Ry¥X{§Zz¨]x¦]qŸWg”O]ŠEX‚B`‡NY€ISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IM<HO?JN?PQCXRF[OCiRDƒYM–VL°SLÔZYÛIJâ?Bá99Ú72Ï;1Â?-´B*³<$É:)Ó7(Ô8)Ó:*Õ9*Ó:*Ó:*Ó:*Ò9)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á=0µ=/¬=,£<)˜8 4•9 ¡A)­C-¶A/¿=/À6+Â/%Ç0'Ð6.Þ:8è59î6>ì;Aê@CæAEàBCÜ@AÙ??Í12Ð66Ó:<Ñ=;É;9¾71µ4.­4)ª<-¥>+¥>+¥@,¥>+¤>(¦;'©:'ª7%²7'¼8+Å8.Ì70Ô94Ü=9æ>;é:7ì95ì95ë:4é;4è;4å=4â>4àB7ÝC9ÚC<ÕB;ÏA=Ê?<Ç=;¿>9±<3©:/¢8+œ6(˜7'”8)‘:):(‹=)‰<*‡<)ƒ:'‚9(€7&6%}6$x3#x5%…B2˜UEWK”PCPD•ZL“YMZN\Q\Q’[T•\U˜[VŽbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG<CD6@>/;9*78*=>0:<17:/:>06?,=J0N`:awHk‡Lu”Qu™Qt˜Nr›OršSpšPq›OrNqœMp›LošKrNu¡Ty¥X«`~©az¥]qœUf‘L_‰G]‡E^ˆIb‰PY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PM<ML:EF4DG4DH7DH7BI9BK:BK:CJ:IK>SQDSPAXL<eK:tE5•H>ÂYSÙROàDEà::Ü75Õ;3Ê>/º=)µ8"É:)Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á;0¶:.­<,§>+™9#3“7Ÿ?'£9#°;)À>0Æ<1Ì8.Ð7/Ù<5ã?=ì=Bî?DéCEâDCØ@?Ê;7À50»1.¹/,¼51¾:6»<6³:2ª8.¤8,¡:+¡=-Ÿ>+ ?,¡@-¡@-¡A+£>*¦=*©;*­:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G2<E43=2-7.1817>6BE<GJ?HI;BC1?>*;:&78(=>09;069.:>06?,<I/N`:awHj†Ku”Qt˜Pt˜Nr›OršSpšPqœMqœLqœLp›Kp›LsžOw£V{§\‚­e€«dx£\j•P]‡EYƒA^ˆHePcŠQZJSzCi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj`Wj`Wj`Wj`Wj`Vj`Vj`TjaRjaRjaPjaPjbOjbOjbOjbMjbMg_Jg_Jf^Ie_Ib]IZXCSP=ML:HI7EH7AE6 at D5?E7?G8?G8>F7GK=IK=AE4KJ6\Q;aE/ƒJ9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)š7"”5•7œ9"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7 at +2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.Pb<cyJlˆMu”Qs—Or–Lp™MršSq›QpLqžKrŸNrŸNsŸPv¢U{§\ªb‚­fx£^j“O`‰G^‡Ea‰JfŽPhTd‰S[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj_Yj_[j_[j_Yj_Yj`Wj`Vj`Tj`TjaRjaRjaRjaRjaRjaPjaPh`Mh`Kg_Jg_Jd]J^YEUR?ON:IJ:EH7BD6 at D5?E7>F7>F7=E6 at F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/Ÿ6#–1–1›2¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*<H4OXGYbQ_fTW\FJN7BE*??#<<"9:(=>0:<19<1<@25>+;H.Pb<dzKlˆMu”Qt˜Pr–LqšNršSq›Qs OrŸLpLqžMt Qx¤W|§_ªc{¦aošUcŒJ]†Da‰JeNeNc‹Od‰S[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Uj_[j^^j^^j_]j_Yj`Wj`Vj`Tj`Tj`Tj`Tj`Tj`Tj`Tj`Vj`TlaOk`LiaNiaNf_La\HYVCSR>MK<HI9DF8AE6AE6?F6>D6<D5=F57 at -@H1IK3F?%W?'‡ZC·s`¶VJÙbZðebìTSæFHëGHæCDØ;6Ë7+É:*É:,É:*Ë9,Ê8)È6)È6'Ê8+Ë7)Ë7+Ë7)Ë7+Ì8*Ì8,Ë8.Â3-¾5/¶6-­3(¡0"ž/ 1 §3$¼A2ÇC7ÖG?áLFçLGéJFåFBßD@×CAÏDAÁ@:±;1¤</¡A1œE4˜E3“D3‘D4B2ŠA0…@0‚A/~A.@.†:*‹9+‹:)Š;*‹<+<+Ž=*<*–?.–=-›;+9* 8+¥9-©;.®9/¸:.¾90Á;0Ä>3Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆH<OB‘SH’RI’OI™TO™SQšVSš]Z“YU[Tl[}X~‰^€‹alxRLX46D#=J.LZ at eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,<I/Pb<dzKm‰Nv•Rt˜Ps—MqšNršSpšPu¢Qp LnLpŸOu¤Vy§\}¨`|§`p™UfM\„E\„EeŒMiQfN_…HcˆRZLSxEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Vk`\k__k`^k`\k`ZkaXkaWkaUkaUkaUkaUkaUkaWkaWkaXkaWnbRmbPjbOjbOhaNe^K_ZGYVERO>MK<GH:DF8CE7BD6 at D5<C3<H49B-FJ3LF0O:%qL9šcOª^N¡A5ÆSLçc_ð^^íSUëJOéDHáAAÌ91Ç9-Å7+Å7+È8-Ê:/Ë;0Í:0Ñ>4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/¢<0ª:/­8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`<crQetU\iKNX=CL1?E+>B)=A(;='78(:;-79.9<1=A37 at -<I/Oa;bxIlˆMv•Ru™Qt˜Nr›OršSo›Pq OožMožMs¢Rz¨]|ªaz¥^u [cŒJ^‡E[ƒD_‡HgŽOj‘PfL`‡Hb‡QY~KRwDi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Tk`Zk`\k`ZkaXkaWkaUkbSkbSkbSkbSkbSkaUkaWkaWkaXkaWocUnbRkbQkbQkbQhaOd]M`ZJXRBRO>NK<IG8GE6DE5BC3>B1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9-Ÿ9- :,¡9,¢8+¢8*¢8*Ÿ8)œ8)˜8(”8)9*Œ:,‰:-‡;-„:-‚:,9+€8*}8)}7+|8+{9+z8,y9-x:-v8+q5*o5)q7+t9+ŒH;I<‰I=„I;…K?ŒRF“WM˜XO˜QMœUQ˜RP“VQ’`YˆbWƒg[†zdnrQZi at JY0AR(IZ0Wi?dvNj|VXiEL[:?L.:D)<D,>C-<A-:=,89+:;-68-8;0>B47 at -;H.L^8_uFi…Jt“Pt˜Pt˜Nr›Os›TpœQnMmžLp¡Pw¨Y|ªaz¨`rXi“QZƒA\„EaˆIeŒMgŽMgŽKhJfŠLc†PY{IRtBi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkaUlbYlbYlbYlbVlbVlcRlcRldQldQldQlcRlcTlbVlbXlbXlbXocUnbRkbQlcRlcRkbQg`Pd]M^WGYSCSM?MJ;KH9GE6EB3?B/;H.?H-OC-a=-ƒE:«XR´NJž,+²:9¹=;ÓSRòpnþvvñehëX^ð^_ãUQÚPFÔG@ÐC:ÑD=ÔG>ÖGAÖG?ÙHCÚJBÜHDÝJCÞJFÞKDàKGàKGâHHáGIÜHHÙGGÖHD×HDØGBÛFBàBAäABæBAèBBçCBäB@ßA>ÛA?ÛJGÊC?¹<6®>3¢@3˜A0A0C3ŠA2ˆ@1‡?1…=1‚<0€<1=1=1;1;1ƒ:3;1;1€</€<1=/€</€=-<-€;,‚:,9*‚8+ƒ7)Œ:.8.‘9-”:/—;.š=.ž</Ÿ>.™9)–9(“:*:+Š;,‡;+„;,‚:+‚:,9+7)~6({5){5){5)z6)x6*x8,w9,s8*p4)o5)r:-v<0‹M@‰K<„J<‚M=…QC‹VH’XM—WN“NI™TO—VR•\Ue\{^PfVF`^GEO->N)?O(J\2_rEk~QexKXj at M_7@Q-6E&7D*=F1=D4:>07;-8:,:;-68-8;0>B47 at -9F,I[5[qBeFr‘Ns—Os—Mr›Os›TpœQmœLo Os¤Ux¨\z¨`s [i“Q`ŠHYB^†GeŒMgŽMfJeGgŒGhŒLa„NXzHQsAi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbXlbVlbVlcRlcRldOldOldMldMldMldOldQlcRlcTlbVlbVocUmaSkbSlcTmdUlcTi`Qf_Ob[K^WGXQARL<OI9JG6IC3AC.:G+ at F*U at +xG9£PL´HH¶8<º39ÈAEÄ?@ÊJIßb`ñqpðnpçbeâZ\ÛQNÕLDÏD?ÍB;ÏD?ÐE>ÐB>Í@9ÒC?ÒC=ÔC@ÕD?×CAØD@ÙECÚDCÝADÝADÞDFÝGHßIHàJIãIIåGHçACêADìBEìBEçAAâ@>Û=:Õ=:ÚFFÉ=<¹83°;2¦@4˜?1‘>0@1Š</Š<0‰;1ˆ:0‡81†93…:4„;4;3€<3:4€<3<3}=1}=3|<0|<0|=.|=.{<-|:,{9)z8*{7*‚:.ƒ9.‡9-‰9.9.‘;.•<.–=-’9)‘:):*Š;*‡;+ƒ<*€;+~;*€8*€8,~6*}5)|4(z4(z4*y5*u2)v6,v8-r6+o3)o5*s:/x at 3ŠPB†N?N=‚Q@…VF‰XIŽUJ‘RI’OI—TN“TO‘\VŠfZn[JPK7EK1AN0KZ9WgC`rJgyOdzLVl>G]/AV-7H$1@!6B*=F5<D98=67:39;.;<.68-9<1?C57 at -7D*FX2Vl=a}BoŽKq•Ms—Mr›OtœUqRožPq¢Qu¦Wv¦Zs¡Yj—RbŒJ[…E^†H`ˆIcŠKeŒKfJfŽHf‹Fe‰I`ƒMWyGPr at i`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbVlcTlcTlcRldQldOldOldMldMldOldOldQlcRlcTlcTlcTnbTmaSmaSmaSmdUlcTjaRg`Pd]M`YIZSCUN>PK8MH5ID1DC. at F*DD([B,ˆTG¯\X«>A¬/3ÎINÆ?EÀ;>»;<ÄFGØZ[ãefÛY[ÌGHÑJGÐEBÍB?ÐB>ÔFBÔFBÐB>É>7ÏD=ÏD=ÒD@ÔEAÖEBÙECÚDEÝDFÞ?Cß@DÞBEßEEáGGàFFàBCá>?èBDé@Cè>Aç=>ä>>ãA?áC@ßECÖBBÅ98¶50°;4¦?6š>3=/?2ˆ</‡:0‡:0‡81‡83‡83ˆ94ˆ;5‚92€:2€:2;2~<0~<0|<0|<0x8,y9-z:.z:.{<-{<-z;,z;,};/9/€7.7,„6*…5*†7*†7(Š8*ˆ9*ˆ;+…<-„<-€=,~<,};+}9,}7-|6,y5*z4*x4)x4)x5,r2(u5+v8-r6+n4)n5*t;0xB6ŠUG„PB€O@„SDˆWIŒVJŒRGNG•TN”UN‹RK„XMdSeZDGK2=J,IX9ZkIgxTcxQYnESh=Nc8J_4:L&0?,95>)=C5<B8:<79<5;=2;=079.9<1?C58?-8B)EU1Uh;azCnŠMr“Nr–NršQsSqRr Uu£Xv¤[t¢ZošUfN^ˆH[ƒDdŒNa‰K`‡HcŠIfJgŽKeŠEa…E`ƒMWyGPr at i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbQkbQkbQkbQlcRlcRlcRlcRlcTlcTlcTnbTk]Pp`QtdWrdWnbVj`Th`ShbTgaSgaQc]M[VCVQ=SN8NH2GA)KG,I?$bI3‘gW¶xm»le¸YW¹OO¶BE½BEÂDGÈFHÍHKÐJKÒLMÓKMÏEEÐDEÓEDÖFEÕFBÒC=ÎC<ÏF<ÈD8ÉE9ÊE<ÌE?ÒD@×CCÚADÛ?CáBFâBDáCDàDEàDEáFDãEDäDDãCCäB@ä@?ã?>ã?>â@=â@=ÞC?ÓB?Å>:¶93ª70Ÿ:0—=2Ž>3†>2ƒ?2?3=2;3„93†93ˆ81ˆ92…;0„<.„<.ƒ;-;/€:.€:.€:.~:-~:-~:-~:-};/};/};/};/}90}90~80~8.€7.€7.€7.~8,€8,~8,}9,|8-{9-z8,x8,x8,x8.x8.w7-v8-v6,t6+s5*q5+m1'r6,n4)m3(o6+m4)q8-I=…SH…SJ†RGˆRH‹PHQJ”QK•RL“TMTK‰[N‚cQo_HYU:MV7O_;j~YbxQYoHUjCRg at Mb;IY5CR17D&4>#2:#6;'<>0 at B5@@6<>358-39-4:.7:/9=/;?.=B,<E(S_;arFn†Rs‘Ur•QršSsSrUužZ~§e~§ep˜YbŠK^†G^†H^„G`†IbˆKdŠMfNeŒMcŠK`‡H^„G_‚LTvDKm;i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrbSqaRrbUqcVrfZogZmeXjdVgcWkhYoiYlgThcOc^H[U=RL4PJ0H>%Q?)kP=XG„NBˆE=“D?±WV¸TT»QQÀPOÀNMÁMMÂLJÃKJÐTTÈHGÂ=>Ä=:ÐB@ÓEAÏB;Ç>4ÊD9ÉE9ËF=ÍG>ÔFBØDDÜAEÝAEáBFáCDáCDâDEâDCáFDáFDáFDàEAßD@àB?ßA>àA=àA=àA=ÞC?ÔE?ÈC<º>6¬:0 90”:/Š<0‚<0€A2~@3~>4<3ƒ:3†91ˆ81‰90‡;.…<-„;,„;,ƒ;-‚:,‚:,‚:,9-9-9-9-~:/~:/~:/~:/}90}90}90}90}90}90|90|90|90z:0z:0y9/y9/y9/w9.w9.w8/w8/t8.s7-r6,r6,p6+p6+k1&q7,m4)l3(o6+l3(p7,~H>„RI…SLˆQJ‹PJQL”PM•QN”SOŠOG…SH€[K{ePsiPhkLfqQgxT^tMXnGPf?La:K_:K\:GV7CP4<F-8@)6;'7:)<=/?@2>>2;=04:03;05;16<0:</<?.>A,>D*Q[9^mDkRpŒRp“Sq™RsSsžVxŸ^|¢exžak‘T`†I]ƒF]ƒF\‚E`†Ia‡Jc‰Le‹NdŠMbˆK`†I^„I]LRtBIk9i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTqdTo_Pm]Pm_RqeYog\ldYhbVfbWpl`{xi~{jyizubpiVe`JTT<FF.C>(MB.S@/U8(]7*l=3n70u91~;5‡@:’IB›PJ¥XP­ZR»^YºSN·GE¼B?ÈDBÑFCÓD@Ï@:ÐA;ÐC<ÒE>ÔG@ÖGCÚFFÛEFÞDFßCDßCDßCDßCDàDEßEEßECßECÞDBÞDBÜD?ÛC>ÜC=ÜC=ÜC=ÛC>ÖE@ÎE?ÃB<³>5¢:1”8-ˆ9,ƒ;-‚@2@1~>2=1ƒ:1†91‡81ˆ:0‡;.„;,„;,„;,‚:,‚:,€:.€:.9-9-~:/~:/~:/~:/~:/~:/}90}90}90}90|90{8/{8/{8/{;1{;1z:0y;0x:/x:/x:/x:/t8.t8.s7-s7-r6,q5+o5*o5*j1&o6+m4)k2'l6*i3'm7+}G=‡PI‡PI‹PJŽQL‘RM’SN”UP‘VPŒWO‡[P~^OtbNoiQorUlwYfwUQeBK_:EY6DU3EV6GV9GT8ER8?I0<D-9>*7;*:<.<>0;=/9;.6<25=26<26<0:</<>0=@-=C)MW5Zi at f|MlˆNn‘Qq™RuŸUtŸWz¡`w`n”Wc‰L\‚E\‚E\‚EZ€C_…Ha‡JbˆKdŠMc‰La‡J_…H]ƒH[}JPr at Gi7i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrdWoaTm_Rk_SkaWlcZle[jf]jf]xtiˆ„x‘•’Œ~‰‚r}zg`cNOT>DG2FE1HC0F=,L<,VC4P9+R6*V4*Y5)\6+a9/e=1m=1ŠKBSJ®UO¶NK¼FDÆABÒDCØFFÔ@>ÕA?ÖB>ÖE@ÙECÚFDÛEDÝEDÞDDßCDßCDÞDDÞDDÝEDÝEBÞFCÛFBÚEAÙD>ØE>×D<×D<ÙD=ØE>ÔD<ÓF?ÉF>ºA8§;1˜8,Œ9+…<-ƒ@0@1~?0=/ƒ:1„:/‡9/ˆ:.„:-„;,„;,ƒ:+‚:,‚:,9-9-9-9-~:/~:/~:/~:/~:/~:/}90|90}90{8/{8/{8/{8/x8.{;1y;0y;0y;0x:/x:/x:/v:/s7-s7-s7-r6,q5+o5*o5*m4)j1&o6+l3(h2&k5)h2&l6*|F<ŠOGŒOJPKRMSN‘VPWPŒZQ‰]R…aUy_PiZGd_IdhO\fKN]@EU8AQ4=M0<K.?M3CQ7FR:GS;BL4>G2:A/9=,9=.9=.8<-7;-7=36=56;46<2:<1;=/<?,<A*JS4Ve>bxIj†Ln‘Qs›Tw¡Wx¢Z{¢ar˜[e‹N\‚EZ€C\‚E\‚EZ€C_…H`†Ia‡JbˆKa‡J`†I^„G]ƒHY{HNp>Eg5haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTrfXth\sg[mcYjaXle]snhzwp~w† ”¨¥œ«§œ¨¤™£‘™–‡z{kcfSOR?GJ7EH5BE2BE2EH5KL<JH9GD5D>0A9,A7+ at 6*F4(S5*qB8ŒPHŸPK¯IG¿GIÌEIÓBEÖ@BÙ@BÚBAÛCBÚEAÚEAÜDAÜDAÞDDÞDFÞDFÞDFÞDDÝEDÝEDÚDCÚFB×FAÖF>ÔE=ÔE=ÓF=ÔE=ÕF>ÔA:ÓC;ÎE=ÁB9®>3ž9-‘;.Š</„?0?/€>.€=-;/„:-†:-‡;.„:-ƒ;-‚:,‚:,‚:,9+9-9-~:/~:/~:/~:/}:1}:1}:1}:1|91z:1|91y90y90x8/x8/v7.y:1y:1x90v:0v:0u9/u9/t:/r7/q6.q6.p5-o4,n3+n3+m4+j1(m7-j4*h2(j4*f2'j6+}D;NGNHQJTLUOŽWPŠYRƒ[Q{YMv\OkZJ]UBYXDY^HOYA?K3:H/7E.4B+5A+8D.=I3CL7EN9BK6?H5<E2:A/8?/7>.5<,4:,5<45<56;56;49;0:</;>-;@)GP1Ra:`vGi…Ko’RuVy£Yy£[xŸ`n‘W`ƒIZ}C[~D^G^G]€F`ƒIa„Jb…Kb…Ka„J`ƒI_‚H^IW|ILp at Bf6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTkaUndZpf\lcZkd\rmg„|‘Œ§£ µ±®ÄÁ¼ÉÆÁÉľÅÀºÀ¹±¹²¨¤œˆ‚rfcTPQ?FI8>E3;D1:F28E38E38C2:B3<B4 at C8CE:GE9>4(P:/e?6€EA¡PO¿X[ÊQVÊCIÕFJ×EFÚFFÛEDÝEBÞDBÝD?ÞCAÞDDÞDFÞDFÞDFÜDCÜDCÜDCÚDCÙEA×FAÕF@ÓF=ÒE<ÐF<ÑG=ÔE=Ô?8Õ@9ÐC:ÆC9¶A7¥=0–=/Œ=.†>/‚?/>.€=-<-ƒ;-„:-…;.‚:,‚:,‚:,‚:,9+:+9-~8,~:/~:/~:/~:/}:1}:1}:1}:1z:1z:1y90y90x8/v7.v7.t8.w8/u9/u9/s9.t8.s9.r8-r8-q6.q6.p5-o4,n3+m4+l3*j4*h2(l6,i3)f2'h4)e1&i5*{B9ŽMG’MH‘PJTLVO‡XNYO|\Qs\Nk[L`WFVSBPSBJQ?@I64@,3<+2;*09(09(2;*5>-9B1<E4?H7?H5>G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDi„Mp“SwŸYy£Yw¡Yq˜Yf‰OZ}CX{A\E]€F]€F^G`ƒI`ƒI`ƒI`ƒI`ƒI_‚H^G]€JV{HJn at Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upjˆ…€Ÿžš°°®ÃÂÀÓÒÐâáßçæäçãàãÞÚÞÖÓÙÎÈμ²¸¥——‡zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84ˆHH¯]_Å`dÊWZÍQSÓNO×MKÛKJÞHGáFDãDAâBBßCDÞDFÞDFÝCEÝCEÜBDÜBBÛCBÚDCØD@ÕD?ÓF?ÒE<ÐF<ÐG=ÔE=Ù@:Ù@:ÑB:ÈC:¼C:¬@4™;/Œ9+‰=/ƒ>.>-€=,<,ƒ;,ƒ;,„<-‚:,‚:,‚:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MG’MH‘PJŽULˆXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7<I7;F56C13@,1>-.800621622717829;0:<.:?)?H+KY5[qChƒLq“Vwž[w¡YsœVgP^IUx at WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„¡ œ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢‘}ub^\GKM7CH2AI2AI4 at G5BD7AA7B=9C97?:69<5>?7B71J.+d66QR³giÆnmÀ\\ÇZWÐVS×QNÜLKâHHæCDåBCßCFÝDFÝDFÝCEÝCEÜBDÜBBÜBBÜDCÙCB×C?ÓD>ÒE>ÐF<ÐF<ÔE=ÜC=ÛA9ÒB:ÊD;¿E:°A6œ:-‹5&Š</…=.‚=-€=,<,<,ƒ<*„<-‚:,‚:,‚:,:+9-~8,}9.}9.~:/~:/}:1}:1}:1}:1}:1{;1y:1w;1x90u9/t8.s9.r8-q7,r8-q8-p7,n8,p7,m7+o6+o6+o6-o6-n5,m4+l3*j4*i3)h4)f2'k7,h4)c1&e3(b0%e3(xB8ŽMG’OIŽRJŠUMƒXOzZOq[Mh\LZTDIJ:?C4>D69A208+/7*6<247058157247025.06,08-19,6A3:E5=J9>K9<I77F32A,1>-,6..400511606718:/:<.:?+<E*IW4YoAg‚Mp’Vv\užXp™U`†IX{CSv>WzB[~FY|DY|D\G_‚J_‚J^I^I^I]€H]€H]LStIHhA?]7icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldWibZgd]vsn“’Ž¯¯­ÄÆÅÚÜÛêîïóôöö÷ùüüþÿÿÿÿÿýÿûúü÷ôýòì÷áÔòØÇàʵƶŸª ‡ˆ„ibbFEH-DH/CG0FE1GD5F<3C60F42H:9>=9>?:B:7I75cGF’jjÅ“’è­©Ò‹‡ÇtnÀ]XÆSPÕONßJLçFKéFKßEGßIKÚDFÔ;>Ø>@áGIàDGÖ:=Ú@@Ú@@ÙA@ÖB>ÔC>ÑB<ÐA;ÑA9ÞC>ÛA9Ó@9ÊA9¾B8°@5Ÿ:.8*Œ=0‡>/ƒ>.>-€=,<+=*<,:+9-9-~8,~8.|8-|8-|8-|90|90|90|90z:1z:1z:1z:1y=5w<4w;3u:2t91q8/p7.p7.o6-m7-m7-l8-m7-l8-m7-m7-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)]-#`0&_/%b2(s>6ŒOJPKˆQJRJ}YMv_QfYITN>DE5>E5:C25 at 04</3;04:04:068378366446135016//6..6+.9+2=-6C2:G6:I68G44C.1?.*4+,2.-2..3-45/79.:</:?+6>&DR1WlCh‚Rs”]wž_r›Wk”R[~DXyDTu at Tu@WxCZ{F[|GZ{F^JbƒNbƒN^J\}H_€K`L^~MTsJFd@<W4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldYgd]onj†…ƒ¤¤¢ÁÃÂÖÚÛêîï÷ûü÷ûþøüÿüýÿþþþÿÿýÿþúÿüùÿúóÿðàûëÔíßÅ×ͲÀ»¤£„‚ƒcgjKLQ3GJ/EC.GB/H>2I:3L95K<9?:7BA?MHE]RPyjg£Ž‹Î²®èÅ¿ÿ×Ñ쳪͂|Àc^ÊVVØRSßHMÚADÖDEÕEEØHHÜJKÛEFÕ<>Ö<>ÛACÙ??Ù??ÙA@×A@ÖB>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05 at 03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu at Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼ÄŸ ¨ƒ‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<2“9.Ž<0‰=0ƒ>/>.=-~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5YmJk„Zw—fwœfl“Z_‡KWxCWuCTr at Tr@VtBXvDYwEYwEZxF]{I_}K]{I]{I_}K^|JZwKPgJAW at 3I2icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVneVneVmg[jkfƒ‡ˆ£§¨¹¾ÁÐÕØåíïóûýõýÿûÿÿûÿÿüÿÿüþûýþùþýøÿþ÷ÿÿóøýæôýÞî÷ØæòÎÝéÃÎÚ´¶Á™¡«†€‡efmLMQ6FH0HJ5KI:HD9D at 7OGDj`_‹€¤š™·¯¬ËÆÂÞÛÔêæÝúñèÿûñÿ÷íÿÝÕû¶±åŽÊcd°@?ÃPKÉTMÉPHÃF@ÈGBÔMJÖKHÐ@?Ò>>Ó??Õ?>ÕA?ÕA?ÓB?ÓB=ÓB=Ö>9Õ@:ÒC=ÌE?ÀE>²A9¢=5•;2Ž<1‰=0ƒ>/>.=/~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/~;2~;2|<3{;2{;2{;2z;4x<4r90o9/o9/m9.l8-k7,j6+h6+i7,i7,i7,h8,h8,h8,h8,h8,m;2l7/j5-i7.j8/j8/f4+a1'e5+a2(].$a2(b3)Y* a2(yNE\VvWRiNGWC:I<3@:.:;-8<.08)/:*3;.4</5=25;169069079468368349238139/19.19..9+/:,0=,2?.5B17E4;H6<I89C87?428.-3'.0%/1$24&48'4<'ER8]pPr‹d{šnwœifXU|ESsATr at Sq?Sq?Tr at UsAVtBVtBWuC[yG]{I\zH^|J_}K\zHWrIJ^E<M;.?-gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVofWofWng]qqo‡Œ¤©¬·¿ÂÍÕØãíïòüþôþÿøÿÿúÿÿûÿüýÿúüýõúüñùùíöøêöÿèóÿäðýáîùÙéôÒÞèÅÊÒ­¶¾™£}‚bY]BGL5FK7FJ9CG9AC8c^X…}z«¡ŸÁ·µÌÂÁ×ÏÍæáÝñîéú÷ðüõëÿñæÿòéÿôìÿåß騤·hc¦LAµPDÁYNÇ[QÆQH¿D=ÂA<ËDAË@=Î@>Ð@?ÑA@ÒC?ÑC?ÑC?ÒC=Ó?;ÒA<ÐE@ÉE@½C>¯@9 >5•=3Ž<1‰<2ƒ=1=0=1~<.=/=/~:/~:/~:/}9.|90{8/{8/{8/|<3|<3|<3{;2z;4y:3y:3w;3n70m80l7/l7/k6.h6-h6-h6-i7.h8.h8.g8.g8.g8.g8.h8.k92h6/f4-g5.i70h70e4-b1*c2+b3+_0(]1(]1(V*!b6-{ULtYRaNHN?8A7.=6,;9-9;.9<139-3;.5;/6<06<07:/58-47.69049238139/39/2:/19.19,.9+.9+/:,0;-3>.6C2:E5<G7=E8:B55;/06(02%/1$13%15$2:%GS;buWwk|›rq•g\‚QJp=Oo>Qn>Qn>Qn>Qn>Qn>Sp at Sp@WtD[xH]zJ]zJ_|L_|LZwGRlECU?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š «µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°’ŽregOMP;GK:FM=GOBKQG{{sŸš”ž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×ËØ“ƒ¸eS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG at E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2<D5:C28?/5;-46)24'13%04%07%HT>ex\umt’lf‰_RwKBh9Kk<Nk;Pm=Pm=Nk;Nk;Ol<Qn>VsCZwG]zJ^{K_|L_|LVsCNg@<J9/:2$.&gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXqhYoh^hikmtz…Œ”£¬±¿ÈÍÓÞâåðòðüüòüûõþùøÿ÷úÿöüÿòúýìøùçö÷çööê÷÷ëú÷èüöæýõâ÷ìÖçØÃÕƯÀ±šž“}un[ZWFPQCSVK[bZeld•˜²²¨ÕÎÆèÝÙóããúêëÿñôÿ÷ùÿþûþýùùúôøúïüüðÿÿóÿÿñÿûêÿæÑñª”¼o[©VD®RCµPD»LA¿JAÂG?ÆE?ÉE@ÊE@ÊE>ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI at nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj<Ol>UrDYvH[xJ]zL^{M\yKQn at G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠ¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²›¢—|ubb_NXZL]cWmwn|†}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½p›QD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l at 5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B1<E4=D4;A38<.26'-4$2;*JVBcr[h|a]vXOmKFfAAa:Hd;Kh<Nk?Nk?Kh<Jg9Li=Nk=TqEWtHZwK[xL]zNZvMNjAC[;2>4*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–ž¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹›˜˜|qtY_dMbkXr}l„‚‘›´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿêåا £`X›D=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26 at 58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=Je<Je:Lg>Oj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸—‘–vkqUYaI_kUtoŒ˜Š§œ¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uŸKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j at 0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34 at 66B66B66B45B16C1CP>P]IR`IIW at AO6BP7EU:Jb at Jd?Ke at Ke>Ic<Hc:Id;Je<SnEXrK\vQ]wT[tTTmOC\>6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy`kpZt{iˆŸ§œ®µ­ÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆØž”L=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24 at 46B47D38E3?L:ER>CQ:;I28F->L3DT9J_ at Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚ž¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØؼÇÇ«²±•¡¡‰‘“}“€œž‘ª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹p•P@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4š=6–A<?;‡@<@:}@;z?9y at 9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV at i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14 at 25A36C2:G5<I78E12?+2@)8F/>N4DX<E]=K`AJb at K`?G_;H^:F^:SiEXpN`uV^uXZnSLcI9M4):(%.+%*.$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVlgTkiTnmYop`tum…‡†¤§¬¿ÄÊÎÕÛæðòûÿÿûÿÿûüþýþÿÿþÿþýûÿÿýÿÿûþýø÷øðïðèçêßàæÚÞåÕçëÚêïÛíðÛìðÙîîÖèèÐÚØ¿Ìʱ½§·µ ±®¶´§Á¾µÉÈÃÒÓÎÙÙ×èèæòòðúúøüüúýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿþüÿüÿÿüÿÿûúüû÷ýÿùþÿøþÿôÿÿíÿþìøßËÅœŠbP–J:¥L<´P@¼L>¿@7ÆC;ÅF?¿D=±>;¦:7ž:8™>;‘=;Š?<„@=}@=xA<tB;rC;rC;q?6s>6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5 at T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓκÌƶËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ”¤kX¢[GªWE­L;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9š;9•=<?=…?=}@;wB<rC;oD;oD;p?8q?6q?6q?6q?6p>5o?5o?5o at 6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f at 5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3 at O8BT:GW<H[?M]BM`DUeJ\oSdtZ`rZXgRGXE4B1$2%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVliVlkVkmXkn]lrhy}• ®·¾ÒÛàêóøûÿÿùþÿùúþþÿÿÿþÿúù÷ÿÿûþýøùùññóèéëÞãçØßæÖàèÓäéÒçíÓèìÓçéÑèèÐçåÎàÛÇ×оÚÓÃÙÑÆÞÔËæÝØîäãóéêúñôÿùûúù÷þþüÿÿýýýûýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿùøÿúùÿþýüÿý÷ÿþîÿùñÿÿòÿýõÿúóùëÿýíÿúèôλ«wbQ:ª\H²N>¸J=¹I>¸I@´G@¯D>¥=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE<p?8q?8q?8q?8q?8q?8p?8p?8qB:pA9n?7l=5i=4j>5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d at 4cA5cA5_C5ZE4_N<gVBhWCcS<^O8[O5\R7]V<]Y>nlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15 at 04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍ×­•©oY¨WD®Q@¬O>¯OA±OB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o at 8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d at 4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F2<I5 at N7FT=JX?R`I[hTanZ\iWQ^MBN@/;/",#+1-(.,&,,heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[mgWqn[kmWknYkr`jrgpyv‡‘“Ÿª°»ÄÉÐÙÞêïóöûþüýÿþÿÿÿþÿþýùÿÿúþþöúúðöøëôöèðôãêñßçïØðöÚíòÔëîÑììÒèæÑáÜÉÝÕÈÞÔÊáÔÎèÚÙòääúëîþòôÿ÷ûÿùÿÿüÿÿýþþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþÿúÿþúÿþúþþüýÿþûÿÿúÿÿúÿÿûÿÿþÿÿÿÿýÿûõÿûñÿüìÿûåÿóÛÿêѺ‚i¦bK—O9ŸT?¨ZF£RAJ: M?Ž<0‹=0†>2=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q at 9q@9q at 9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4</5;14:04:04:039/39/39/39/39/39/28.17-17-17-06,16016005/05//4./4./4./4.,1+,1+,1+,1+,1+,1++0*+0*.5.-4--4-,3,-4--4,.5-.5-+2*-4,07/5=29A6=E8?G<?J<7B25@/3>-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI<F;/9.)3*)/+(.*'-+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[khWonZjlVknYkr`jtiq|x‰”–£®´¾ÇÌÒÛàëðô÷üÿýþÿþÿÿÿþüþýùÿÿúþþôûûï÷ùëô÷æðõáêòÝèíÖêïÑæëËäçÊææÌãáÌßÙÉÞÔÊßÔÎçÙØíßßöçêûïóÿôøÿ÷ûÿúþÿüÿÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüûÿúûÿúýÿüýþÿþýÿÿüÿÿüÿÿûÿÿüÿÿüÿÿûùÿüõÿþñÿÿíÿûåÿòÙÿëÑà±—§u\‘[C–ZBšYCšVC™R@ŽG5‹F6ˆE4ƒD3|C2wB0s@/o>/u at 8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.<H2 at L6LXDS_KYdTWbRLVK=G<1;2+5,+2+*0,)/+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]ne\mg[khWmlXimVjoYktaiuiq}yŠ˜™¥²¸¿ÊÐÔÝâíòö÷üÿüýÿýÿþÿþüþýøÿÿ÷ýýóúûí÷úéô÷äïôÞçïØåëÑâçÉÞáÂÝÝÁÞÞÆÞÛÈÝ×ËàÕÏäÙ×îââóçëúîòÿôøÿ÷ûÿùüÿúýÿýýÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿüøÿüûÿþþþþÿüÿÿúÿÿùÿÿøÿÿùÿÿúÿÿúúÿýøÿÿöÿÿóýÿïÿúæÿôÜÿøàÿìÓ㿧¬‚j‡YB…Q;’[F—]IS?F2u>)r>)s at +tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S at RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=B<AH@@K=>K:<I78E34A-2?+3A*5C,DQ=KXDQ^MQ^MHTH<H<2>4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M at sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b at 4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H- at F*<B&<A#FI,XY:deFmmQxx\tv^[_F at C.6;%8 at +<C19?39?59?58>48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'<I5BO;HUCIVEDPB;G;2>4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶š…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX at JL4GM3<E*<F+?H+AG+AF(DG*MN/TU6xw[{z^nnVUU=CB.?A,>A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9 at O<@O:<K67F/4C,2A*6E.:I4 at O<BP??M>8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹ŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,<F+<F+?H+DJ.EJ,DG*HI*LM.yx\tsWfdMTR;LI6KJ6FE3<=-<?49?59?59?58>48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7 at O:?N7<K49H18G05D-8G0<K6>M:<J97E61?2-9-+5,-4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWjlWhmVhrZfs_cqdhys…——¥·»ÇÒØÚãêðõûøýÿüýÿýÿþÿÿýÿþùÿÿõÿÿòÿÿðüÿìøûæïôÝâëÐÝãÇÕÕ¹Î̳ÉÄ°ÊÄ´ÐÉ¿ÚÒÏéàãöíòÿ÷ÿÿúÿÿýÿÿþÿÿÿýýÿúüÿøüÿøýÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþÿüÿÿüÿþýÿýÿþúÿúøÿùøÿõøÿóøÿóøÿõüÿøýÿúÿýþÿüÿÿüÿÿûÿý÷ÿÿúÿÿüÿÿýÿÿþÿþýûûûóúøìÿÿñÿÿïÿÿíÿþíÿýíÿöçÿîàýêÛúãÑÿæÐãÊ´¥xt^GeO8bL5\H0^J2\J2\J2]K3]K3^L4^L4\M6YN8WO:WO:VP:UO9SN8PN7NN6MO7PT;`fLfoTU^CEO4AK0<F+?I.?I.CL/HN2HM/FI,OP1YX:qmRjfKa\F[V at YTATQ>MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7<N4:L2:L25G/7I1:L6<M::K96G70 at 3-;.,6--4,,3+cdRcdRdeSefTgeVhfWigXigXhfWifWifWifWifWifWifWkeWkeWkeWldYle[md]mf\kg[jiWikVhmWhrZgt`dqgj{u‰›ª¼ÀÍØÞàçíôùÿúÿÿûÿÿýÿüþÿúþþöúúîúûíúûéøúåóöáêî×ßãÊÙÜÁÓѸÌDZž¬Æ¾±ÌüÖÎËæÝàôêòþ÷ÿÿúÿÿþÿÿÿÿþþþýÿúüÿúüÿúýÿüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüÿþüÿþüÿþüÿýþÿüÿÿüÿÿýÿýÿþûÿüøÿù÷ÿ÷÷ÿõøÿöùÿöüÿøÿÿûÿþýÿüÿÿûÿÿúÿÿúÿÿûÿÿüÿÿþÿþýÿûýüüþûþÿúùúòúüñýûïþúîÿùìÿûìÿýïÿýìÿðÛÿûâìÜÞŽu`P7RB)XH/XH.[M3[M3ZN4ZN4[O5[O5\P6[Q8UO7TO9TO9QO8PN7NN6KM5IM4JN5LR8S\APY<@I,;F(AL.?J,DM0EN1JQ2MR4JM0LL0YY=kjNhdIb^E^ZA_ZD`[GZUAQO:KJ8AB4 at B5@B5>A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5<N6<N87H51B0.<--7,.5--4,]eN^fO_gP`hQdiUfiVgjWijXfgUhgUheVheVjdVkeWkeYlfXlfXkhYmg[kg\mf^jf[ieYgeVghVfkUenYbo]dqhsƒ€–¨¬¹ÈÏÒÛââéïò÷û÷üÿùýüüþùüÿöüþñ÷øêùúêø÷åòñÝîíÙëêÖàßÊ×Ò¾×ϼËÀ®½´¥½³©Â·±ÌÂÁÛÒ×êàèúóûüöÿþûÿÿþÿþýÿüýÿüþýüþýþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüþýùþýùÿüùÿýúÿþûÿþûÿþÿÿýþÿüýÿýþÿÿÿþÿýýÿüûýøÿÿûüý÷ÿýøÿþúÿýøÿúöÿ÷ôÿùùÿúÿÿüÿÿýÿÿÿÿÿÿÿýÿüýÿþüþýþÿÿÿÿÿÿþüÿþùÿþóÿþîÿýêÿýæúôÜÿúàçàƏˆlUN2WN1TK.SJ+WN1WN1UN1UN1TO2TO2TN4SO4QM2RN5QO6PP6MO7KO6HM6GL5JP6FO4AJ-=F'>H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y at XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69 at 88@58?79A69 at 8:B7:A9:B79 at 8:B7;B:<D9=D<>E=8B:8B:7A88 at 56>14</39/271.40/51-7/-9-.;)0@&6G'7M';V+:W+;U0;T4;R8=P:>O<>P::L6 at R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzŠ‰œ«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿ­Á´¤¹­¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàÇ‹‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TW<UU=VV>WU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B at 3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68 at 58@59A69A6:B7:B7:B7:B7:B7;C8<D9=E:<F;=G?<H><F;;F6<D5:B39?38=67>74>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?<R=;L::K8=O9DV<K^BM`BL`DH\@:Q71D.+5*+2*)0(ZgM[hN\hP^jRbjSdlUglXilYijXijXkhYkhYlfXmgYnf[nhZmgYkhYkg[jf[jf]ieZhfZfgWhiWejTdmZgtco|sŽ¬³¶ÄÍÍÖÝÞæéñöúøþþúþýùþøøûòôøêóôæðñßêé×áàÌÜÙÆ×ÔÁÐ˸ÇÀ®¿³£½° ¼°¤Ã¶®ËÀ¼ÕËÊãØÞëäëüôÿý÷ÿþûÿÿþÿþýÿüýÿüýÿýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿýúÿüùÿüùÿüøÿüøÿýüÿüûÿûüÿüýÿþÿÿþÿÿýþþüýÿþýÿþûÿýûüóîêßÙâÕÍëÝÔ÷ìæÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿýçÿþãû÷ÞþüããßƉ…jPK.QL.QK+QK+TN.UO/TO1UP2TP3SO2QP4PO3QM2ON2PN5MP5MO7JP6IN7FN6HQ6FO2CL/CM+FM,JQ/OU1SY5QY2W_8jpJy[qvVY^@KO4MP5QQ9QQ9RP9SQ8TR9UT8YU:ZV;XR:VP:RM:NI6HE6DB5CA5?A6<=59?5:@69A67B47B47D37D3:B7:B79A69A69A69A6:B7:B7:B7:B7:B7:B7;C8<D9>F;<F;?IA>J@?I>>I9?G8>F7>D8=B;>E>9C;6 at 74B19I/BV3Pg=XrB^J[}JXuIMhECZ at 9O:6G54E2<N8EW=NaESfHSgKNbF at W=6I3/9./6.-4,ZgM[hN\hP^jRblTemVhmYinZklZklZlj[liZnhZnhZog\oi[liZkhYjfZjf[ie\ieZhfZfgWfgUbgQajWerao|s~Ž–¥¬«¹ÂÇÐ×Úáçîó÷öüüøüûõúôóöíîòäéêÜãäÒÜÛÉÓÒ¾Î˸ÉƳþ«½¶¤Ã·§Ç¹¬ÍÁµÖÉÁßÔÐéßÞóèîøñøýõÿþøÿÿüÿþýÿýüÿüýÿüþýýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüþýûÿþüÿýúÿýúÿýúÿüùÿû÷ÿû÷ÿýüÿüûþúûÿûüÿýþÿþÿÿýþþüýÿüûÿþûÿýûýôïíâÜæÙÑðâÙüñëÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿüæÿüáþùãÿþçäßÉŠ†mPJ0RM0SL/SM-TN.UO/UP2UP2TP3SO2PO3ON2PL1NM1OM4LO4LN6JP6JO8HP8JS8GP3GP3IS1MT3OV4V\8\d=grHtUˆ“i›s…lnuTZaBRV;LN6NN6MM5NL5OM6RP7WS:YU<ZT>XR<TO<QL9KH9GE8EC7 at B7=>6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?<H>>H=>I9?G8>F7>D8=B;=D=9C;6 at 74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2 at R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸ¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâÌŒˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’¦sŸ±›ª’¡zˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8<D9=E:>F;=G<=G?<H>=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu at RtAPmAE`=9P6-C.+<*+<)1C-<N4H[?PcERfJNbF at W=5H2,6++2*'.&
\ No newline at end of file
diff --git a/tkimg1.3/ps/ChangeLog b/tkimg1.3/ps/ChangeLog
deleted file mode 100644
index 7875d8e..0000000
--- a/tkimg1.3/ps/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-2002-11-26  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/ps: PS + PDF photo image type.
diff --git a/tkimg1.3/ps/Makefile.in b/tkimg1.3/ps/Makefile.in
deleted file mode 100644
index 692b1dc..0000000
--- a/tkimg1.3/ps/Makefile.in
+++ /dev/null
@@ -1,545 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgps TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgps_SOURCES	=	\
-		ps.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgps_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgps_OBJECTS		= $(tkimgps_SOURCES:.c=. at OBJEXT@)
-tkimgps_LIB_FILE	= @tkimgps_LIB_FILE@
-
-## tkimgpsstub_OBJECTS	= tkimgpsStubLib.$(OBJEXT)
-## tkimgpsstub_LIB_FILE= @tkimgpsstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-PHIMGTYPE_BETA	= @PHIMGTYPE_BETA@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo No testsuite yet.
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgps_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgps_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgps.$(OBJEXT): $(srcdir)/generic/tkimgps.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgps.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgps/'			\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'		\
-	-e	's/%PHIMGTYPE_BETA%/"$(PHIMGTYPE_BETA)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgpsConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgps.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgps_DECLS = \
-	$(srcdir)/tkimgps.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgps_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgps_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/ps/README b/tkimg1.3/ps/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/ps/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/ps/aclocal.m4 b/tkimg1.3/ps/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/ps/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/ps/configure b/tkimg1.3/ps/configure
deleted file mode 100755
index cd37bfc..0000000
--- a/tkimg1.3/ps/configure
+++ /dev/null
@@ -1,6425 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgps', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./ps.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgps
-DPACKAGE="img::ps"
-PHIMGTYPE="ps"
-PHIMGTYPE_BETA="pdf"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPS_VERSION=${VERSION}
-
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgpsstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGPS_VERSION "${TKIMGPS_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1456: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1538: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1612: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1687: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1759: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1845: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1850 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1878: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1883 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1907: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1922 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1939 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1956 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1996: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2026: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2077: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2120 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2156: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2184: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2223: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2227 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2259: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2317: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2351: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2384: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2410: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2447: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2454 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2469 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2504 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2557: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2563 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2582 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2613: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2648: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2654 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2683: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2689 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2722: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2724 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2771: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2776 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2808: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2813 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2845: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2850 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2882: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2887 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2919: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2924 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2966 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:3001: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3006 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3048 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3074: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3079 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3111: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3116 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3153: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3158 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3193: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3198 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3243: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3248 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3312: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3381: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3451: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3514: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgps in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgps 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3640: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3688: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3696 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3735: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3743 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3780: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3788 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3822: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3830 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3881: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3886 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3937: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3942 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3995: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4033: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4079: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4093: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4114: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4143: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4151 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4206: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4363: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4371 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4464: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4472 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4548: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4556 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4687: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4692 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4754: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4759 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4819: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4824 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4856: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4858 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5193: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5196 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5249: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5251 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5287: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5289 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5325: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5327 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5469: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5527: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5589 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5663 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5785: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5788 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5829: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5849: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5857 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6016: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6048: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@PHIMGTYPE_BETA@%$PHIMGTYPE_BETA%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGPS_VERSION@%$TKIMGPS_VERSION%g
-s%@tkimgps_LIB_FILE@%$tkimgps_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ps/configure.in b/tkimg1.3/ps/configure.in
deleted file mode 100644
index 8f66fdb..0000000
--- a/tkimg1.3/ps/configure.in
+++ /dev/null
@@ -1,227 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgps', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./ps.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgps
-DPACKAGE="img::ps"
-PHIMGTYPE="ps"
-PHIMGTYPE_BETA="pdf"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGPS_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(PHIMGTYPE_BETA)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGPS_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgps_LIB_FILE)
-#AC_SUBST(tkimgpsstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGPS_VERSION, "${TKIMGPS_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgps in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgps)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/ps/pkgIndex.tcl.in b/tkimg1.3/ps/pkgIndex.tcl.in
deleted file mode 100644
index 383f3bb..0000000
--- a/tkimg1.3/ps/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgps_LIB_FILE@]]
diff --git a/tkimg1.3/ps/ps.c b/tkimg1.3/ps/ps.c
deleted file mode 100644
index 2019345..0000000
--- a/tkimg1.3/ps/ps.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * ps.c --
- *
- *  PS + PDF photo image type, Tcl/Tk package
- *
- * Author : Jan Nijtmans *
- * Date   : 7/24/97        *
- *
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries at users.sourceforge.net>
- *
- * $Id: ps.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-/*
- * Activate second 'format' definition in init.c
- * share all functions except for the matching
- */
-#define SECOND_FORMAT
-#define SECOND_CHNREAD	ChnRead
-#define SECOND_OBJREAD	ObjRead
-#define SECOND_CHNWRITE	ChnWrite
-#define SECOND_STRWRITE	StringWrite
-
-#include "init.c"
-
-
-#include <string.h>
-#include <stdlib.h>
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int CommonMatchPS _ANSI_ARGS_((tkimg_MFile *handle, Tcl_Obj *format,
-	int *widthPtr, int *heightPtr));
-
-static int CommonMatchPDF _ANSI_ARGS_((tkimg_MFile *handle, Tcl_Obj *format,
-	int *widthPtr, int *heightPtr));
-
-static int parseFormat _ANSI_ARGS_((Tcl_Obj *format, int *zoomx,
-	int *zoomy));
-
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	Tcl_Obj *format, Tk_PhotoHandle imageHandle, int destX, int destY,
-	int width, int height, int srcX, int srcY));
-
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
-
-
-
-static int
-parseFormat(format, zoomx, zoomy)
-     Tcl_Obj *format;
-     int *zoomx;
-     int *zoomy;
-{
-    int objc, i, length, index = 0;
-    Tcl_Obj **objv = NULL;
-    char *p;
-    double zx = 1.0, zy = 1.0;
-
-    if (!format) {
-	*zoomx = (int) (72 * zx + 0.5);
-	*zoomy = (int) (72 * zy + 0.5);
-    }
-
-    if (tkimg_ListObjGetElements((Tcl_Interp*) NULL, format, &objc, &objv) != TCL_OK) {
-	return -1;
-    }
-    for (i=1; i<objc; i++) {
-	p = Tcl_GetStringFromObj(objv[i], &length);
-	if ((p[0] == '-') && ((i+1)<objc)) {
-	    if (length < 2) {
-		index = -1; break;
-	    }
-	    if (!strncmp(p,"-index", length)) {
-		if (Tcl_GetIntFromObj((Tcl_Interp *) NULL, objv[++i], &index) != TCL_OK) {
-		    index = -1; break;
-		}
-	    } else if (!strncmp(p, "-zoom", length)) {
-		if (Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, objv[++i], &zx) != TCL_OK) {
-		    index = -1; break;
-		}
-		if (i > objc) {
-		    zy = zx;
-		} else {
-		    p = Tcl_GetStringFromObj(objv[i+1], &length);
-		    if (p[0] != '-') {
-			if (Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, objv[++i], &zy) != TCL_OK) {
-			    index = -1; break;
-			}
-		    } else {
-			zy = zx;
-		    }
-		}
-	    } else {
-		index = -1; break;
-	    }
-	} else {
-	    if (Tcl_GetIntFromObj((Tcl_Interp *) NULL, objv[++i], &index) != TCL_OK) {
-		index = -1; break;
-	    }
-	}
-    }
-    if (!index) {
-	*zoomx = (int) (72 * zx + 0.5);
-	*zoomy = (int) (72 * zy + 0.5);
-    }
-    return index;
-}
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatchPS(&handle, format, widthPtr, heightPtr);
-}
-
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    handle.data = tkimg_GetStringFromObj(data, &handle.length);
-    handle.state = IMG_STRING;
-
-    return CommonMatchPS(&handle, format, widthPtr, heightPtr);
-}
-
-static int
-CommonMatchPS(handle, format, widthPtr, heightPtr)
-    tkimg_MFile *handle;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    unsigned char buf[41];
-
-    if ((tkimg_Read(handle, (char *) buf, 11) != 11)
-	    || (strncmp("%!PS-Adobe-", (char *) buf, 11) != 0)) {
-	return 0;
-    }
-    while (tkimg_Read(handle,(char *) buf, 1) == 1) {
-	if (buf[0] == '%' &&
-		(tkimg_Read(handle, (char *) buf, 2) == 2) &&
-		(!memcmp(buf, "%B", 2) &&
-		(tkimg_Read(handle, (char *) buf, 11) == 11) &&
-		(!memcmp(buf, "oundingBox:", 11)) &&
-		(tkimg_Read(handle, (char *) buf, 40) == 40))) {
-	    int w, h, zoomx, zoomy;
-	    char *p = buf;
-	    buf[41] = 0;
-	    w = - (int) strtoul(p, &p, 0);
-	    h = - (int) strtoul(p, &p, 0);
-	    w += strtoul(p, &p, 0);
-	    h += strtoul(p, &p, 0);
-	    if (parseFormat(format, &zoomx, &zoomy) >= 0) {
-		w = (w * zoomx + 36) / 72;
-		h = (h * zoomy + 36) / 72;
-	    }
-	    if ((w <= 0) || (h <= 0)) return 0;
-	    *widthPtr = w;
-	    *heightPtr = h;
-	    return 1;
-	}
-    }
-    return 0;
-}
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead(interp, &handle, format, imageHandle, destX, destY,
-	    width, height, srcX, srcY);
-}
-
-static int
-ObjRead(interp, data, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit(data,'%',&handle);
-
-    return CommonRead(interp, &handle, format, imageHandle, 
-	    destX, destY, width, height, srcX, srcY);
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead(interp, handle, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-#ifndef MAC_TCL
-    char *argv[10];
-    int len, i, j, fileWidth, fileHeight, maxintensity, index;
-    char *p, type;
-    unsigned char buffer[1025], *line = NULL, *line3 = NULL;
-	char zoom[64], papersize[64];
-    Tcl_Channel chan;
-    Tcl_DString dstring;
-    myblock bl;
-    int zoomx, zoomy;
-
-    index = parseFormat(format, &zoomx, &zoomy);
-    if (index < 0) {
-	Tcl_AppendResult(interp, "invalid format: \"",
-		tkimg_GetStringFromObj(format, NULL), "\"", (char *) NULL);
-	return TCL_ERROR;
-    }
-    sprintf(zoom, "-r%dx%d", zoomx, zoomy);
-
-    len = tkimg_Read(handle, buffer, 1024);
-    buffer[1024] = 0;
-    p = strstr(buffer,"%%BoundingBox:");
-    fileHeight = height + srcY;
-    if (p) {
-	/* postscript */
-	p += 14;
-	srcX += (strtoul(p, &p, 0) * zoomx + 36) / 72;
-	fileHeight += (strtoul(p, &p, 0) * zoomy + 36) / 72;
-	strtoul(p, &p, 0);
-	srcY -= (strtoul(p, &p, 0) * zoomy + 36) / 72;
-    } else {
-	/* pdf */
-
-	/*
-	 * Extract the pixel position of the upper left corner
-	 * of the image from the file. How to do that????
-	 * For now I just assume A4-size with 72 pixels/inch.
-	 */
-	srcX += (0 * zoomx + 36) / 72;
-	srcY -= (792 * zoomy + 36) /72;
-    }
-
-    sprintf(papersize, "-g%dx%d", srcX+width, fileHeight);
-
-    argv[0] = "gs";
-    argv[1] = "-sDEVICE=ppmraw";
-    argv[2] = zoom;
-    argv[3] = papersize;
-    argv[4] = "-q";
-    argv[5] = "-dNOPAUSE";
-    argv[6] = "-sOutputFile=-";
-    argv[7] = "-";
-
-    chan = Tcl_OpenCommandChannel(interp, 8, argv,
-	    TCL_STDIN|TCL_STDOUT|TCL_STDERR|TCL_ENFORCE_MODE);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-    if (Tcl_SetChannelOption(interp, chan, "-translation", "binary") != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    while (len > 0) {
-	Tcl_Write(chan, (char *) buffer, 1024);
-	len = tkimg_Read(handle, buffer, 1024);
-    }
-    Tcl_Write(chan,"\nquit\n", 6);
-    Tcl_Flush(chan);
-
-    Tcl_DStringInit(&dstring);
-    len = Tcl_Gets(chan, &dstring);
-    p = Tcl_DStringValue(&dstring);
-    type = p[1];
-    if ((p[0] != 'P') || (type < '4') || (type > '6')) {
-	Tcl_AppendResult(interp, "gs error: \"",
-		p, "\"",(char *) NULL);
-	return TCL_ERROR;
-    }
-    do {
-	Tcl_DStringSetLength(&dstring, 0);
-	Tcl_Gets(chan, &dstring);
-	p = Tcl_DStringValue(&dstring);
-    } while (p[0] == '#');
-    fileWidth = strtoul(p, &p, 0);
-    srcY += (fileHeight = strtoul(p, &p, 0));
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)) {
-	Tcl_Close(interp, chan);
-	Tcl_DStringFree(&dstring);
-	return TCL_OK;
-    }
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    maxintensity = strtoul(p, &p, 0);
-    if ((type != '4') && !maxintensity) {
-	Tcl_DStringSetLength(&dstring, 0);
-	Tcl_Gets(chan, &dstring);
-	p = Tcl_DStringValue(&dstring);
-	maxintensity = strtoul(p, &p, 0);
-    }
-    Tcl_DStringFree(&dstring);
-    line3 = (unsigned char *) ckalloc(3 * fileWidth);
-    block.pixelSize = 1;
-    block.pitch = block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 0;
-    block.offset[2] = 0;
-    block.offset[3] = 0;
-    switch(type) {
-	case '4':
-	    i = (fileWidth+7)/8;
-	    line = (unsigned char *) ckalloc(i);
-	    while (srcY-- > 0) {
-		Tcl_Read(chan,(char *) line, i);
-	    }
-	    block.pixelPtr = line3;
-	    while (height--) {
-	        Tcl_Read(chan, (char *) line, i);
-	        for (j = 0; j < width; j++) {
-		    line3[j] = ((line[(j+srcX)/8]>>(7-(j+srcX)%8) & 1)) ? 0 : 255;
-	        }
-		tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, destY++, width, 1);
-	    }
-	    break;
-	case '5':
-	    line = (unsigned char *) ckalloc(fileWidth);
-	    while (srcY-- > 0) {
-		Tcl_Read(chan, (char *) line, fileWidth);
-	    }
-	    block.pixelPtr = line + srcX;
-	    while (height--) {
-		unsigned char *c = block.pixelPtr;
-		Tcl_Read(chan, (char *) line, fileWidth);
-		if (maxintensity != 255) {
-		    for (j = width; j > 0; j--) {
-			*c = (((int)*c) * maxintensity) / 255;
-			c++;
-		    }
-		}
-		tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY++, width, 1);
-	    }
-	    break;
-	case '6':
-	    i = 3 * fileWidth;
-	    line = NULL;
-	    while (srcY-- > 0) {
-		Tcl_Read(chan, (char *) line3, i);
-	    }
-	    block.pixelPtr = line3 + (3 * srcX);
-	    block.pixelSize = 3;
-	    block.offset[1] = 1;
-	    block.offset[2] = 2;
-	    while (height--) {
-		unsigned char *c = block.pixelPtr;
-		Tcl_Read(chan, (char *) line3, i);
-		if (maxintensity != 255) {
-		    for (j = (3 * width - 1); j >= 0; j--) {
-			*c = (((int)*c) * maxintensity) / 255;
-			c++;
-		    }
-		}
-		tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY++, width, 1);
-	    }
-	    break;
-    }
-    if (line) {
-	ckfree((char *) line);
-    }
-    ckfree((char *) line3);
-    Tcl_Close(interp, chan);
-    Tcl_ResetResult(interp);
-    return TCL_OK;
-#else
-    Tcl_AppendResult(interp, "Cannot read postscript file: not implemented",
-	    (char *) NULL);
-    return TCL_ERROR;
-#endif
-}
-
-static int
-ChnWrite(interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel(interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite(interp, &handle, format, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int
-StringWrite(interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-    tkimg_WriteInit(dataPtr, &handle);
-    result = CommonWrite(interp, &handle, format, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-static int
-CommonWrite(interp, handle, format, blockPtr)
-    Tcl_Interp *interp;
-    tkimg_MFile *handle;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    return TCL_OK;
-}
-
-
-static int
-ChnMatchBeta (interp, chan, fileName, format, widthPtr, heightPtr) /* PDF */
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatchPDF(&handle, format, widthPtr, heightPtr);
-}
-
-static int
-ObjMatchBeta(interp, data, format, widthPtr, heightPtr) /* PDF */
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, '%', &handle)) {
-	return 0;
-    }
-
-    return CommonMatchPDF(&handle, format, widthPtr, heightPtr);
-}
-
-static int
-CommonMatchPDF(handle, format, widthPtr, heightPtr)
-    tkimg_MFile *handle;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    unsigned char buf[41];
-    int zoomx, zoomy, w, h;
-
-    if ((tkimg_Read(handle, (char *) buf, 5) != 5)
-	    || (strncmp("%PDF-", (char *) buf, 5) != 0)) {
-	return 0;
-    }
-
-    /* Here w and h should be set to the bounding box of the pdf
-     * data. But I don't know how to extract that from the file.
-     * For now I just assume A4-size with 72 pixels/inch. If anyone
-     * has a better idea, please mail to <j.nijtmans at chello.nl>.
-     */
-
-    w = 612/10;
-    h = 792/10;
-
-    if (parseFormat(format, &zoomx, &zoomy) >= 0) {
-	w = (w * zoomx + 36) / 72;
-	h = (h * zoomy + 36) / 72;
-    }
-    if ((w <= 0) || (h <= 0)) return 0;
-    *widthPtr = w;
-    *heightPtr = h;
-    return 1;
-}
diff --git a/tkimg1.3/ps/tests/all.tcl b/tkimg1.3/ps/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/ps/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/ps/tests/folder.ps b/tkimg1.3/ps/tests/folder.ps
deleted file mode 100644
index 895af4b..0000000
--- a/tkimg1.3/ps/tests/folder.ps
+++ /dev/null
@@ -1,137 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Title: folder.ps
-%%Creator: Jan Nijtmans
-%%BoundingBox: 0 615 16 627
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-%%Page: 1 1
-% remember original state
-/origstate save def
-% build a temporary dictionary
-20 dict begin
-% define space for color conversions
-/grays 16 string def  % space for gray scale line
-/npixls 0 def
-/rgbindx 0 def
-% lower left corner
-0 615 translate
-% size of image (on paper, in 1/72inch coords)
-15.98400 12.02400 scale
-% define 'colorimage' if it isn't defined
-%   ('colortogray' and 'mergeprocs' come from xwd2ps
-%     via xgrab)
-/colorimage where   % do we know about 'colorimage'?
-  { pop }           % yes: pop off the 'dict' returned
-  {                 % no:  define one
-    /colortogray {  % define an RGB->I function
-      /rgbdata exch store    % call input 'rgbdata'
-      rgbdata length 3 idiv
-      /npixls exch store
-      /rgbindx 0 store
-      0 1 npixls 1 sub {
-        grays exch
-        rgbdata rgbindx       get 20 mul    % Red
-        rgbdata rgbindx 1 add get 32 mul    % Green
-        rgbdata rgbindx 2 add get 12 mul    % Blue
-        add add 64 idiv      % I = .5G + .31R + .18B
-        put
-        /rgbindx rgbindx 3 add store
-      } for
-      grays 0 npixls getinterval
-    } bind def
-
-    % Utility procedure for colorimage operator.
-    % This procedure takes two procedures off the
-    % stack and merges them into a single procedure.
-
-    /mergeprocs { % def
-      dup length
-      3 -1 roll
-      dup
-      length
-      dup
-      5 1 roll
-      3 -1 roll
-      add
-      array cvx
-      dup
-      3 -1 roll
-      0 exch
-      putinterval
-      dup
-      4 2 roll
-      putinterval
-    } bind def
-
-    /colorimage { % def
-      pop pop     % remove 'false 3' operands
-      {colortogray} mergeprocs
-      image
-    } bind def
-  } ifelse          % end of 'false' case
-% define the colormap
-/cmap 9 string def
-% load up the colormap
-currentfile cmap readhexstring
-ffffff 000000 f0ff80 
-pop pop   % lose return values from readhexstring
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
-  /buffer 1 string def
-  /rgbval 3 string def
-  /block  384 string def
-
-  % proc to read a block from file, and return RGB data
-  { currentfile buffer readhexstring pop
-    /bcount exch 0 get store
-    bcount 128 ge
-    {  % it's a non-run block
-      0 1 bcount 128 sub
-      { currentfile buffer readhexstring pop pop
-
-        % look up value in color map
-        /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
-        % and put it in position i*3 in block
-        block exch 3 mul rgbval putinterval
-      } for
-      block  0  bcount 127 sub 3 mul  getinterval
-    }
-
-    { % else it's a run block
-      currentfile buffer readhexstring pop pop
-
-      % look up value in colormap
-      /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
-      0 1 bcount { block exch 3 mul rgbval putinterval } for
-
-      block 0 bcount 1 add 3 mul getinterval
-    } ifelse
-  } % end of proc
-  false 3 colorimage
-} bind def
-16 12 8			% dimensions of data
-[16 0 0 -12 0 12]		% mapping matrix
-rlecmapimage
-020003010800
-010081010202028101000600
-8200010204028101000500
-0c010200
-81010209028101000100
-81010209028101000100
-81010209028101000100
-81010209028101000100
-81010209028101000100
-81010209028101000100
-81010209028101000100
-0c010200
-%
-showpage
-% stop using temporary dictionary
-end
-% restore original state
-origstate restore
-%%Trailer
diff --git a/tkimg1.3/ps/tests/logo.pdf b/tkimg1.3/ps/tests/logo.pdf
deleted file mode 100644
index c1533a2..0000000
Binary files a/tkimg1.3/ps/tests/logo.pdf and /dev/null differ
diff --git a/tkimg1.3/ps/tests/test.ps b/tkimg1.3/ps/tests/test.ps
deleted file mode 100644
index 3553d71..0000000
--- a/tkimg1.3/ps/tests/test.ps
+++ /dev/null
@@ -1,426 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Tk Canvas Widget
-%%For: Jan Nijtmans,,,,
-%%Title: Window .c
-%%CreationDate: Sun Mar  5 10:20:51 2000
-%%BoundingBox: 163 296 450 497
-%%Pages: 1
-%%DocumentData: Clean7Bit
-%%Orientation: Portrait
-%%EndComments
-
-%%BeginProlog
-50 dict begin
-
-% This is a standard prolog for Postscript generated by Tk's canvas
-% widget.
-% RCS: @(#) $Id: test.ps,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-% The definitions below just define all of the variables used in
-% any of the procedures here.  This is needed for obscure reasons
-% explained on p. 716 of the Postscript manual (Section H.2.7,
-% "Initializing Variables," in the section on Encapsulated Postscript).
-
-/baseline 0 def
-/stipimage 0 def
-/height 0 def
-/justify 0 def
-/lineLength 0 def
-/spacing 0 def
-/stipple 0 def
-/strings 0 def
-/xoffset 0 def
-/yoffset 0 def
-/tmpstip null def
-
-% Define the array ISOLatin1Encoding (which specifies how characters are
-% encoded for ISO-8859-1 fonts), if it isn't already present (Postscript
-% level 2 is supposed to define it, but level 1 doesn't).
-
-systemdict /ISOLatin1Encoding known not {
-    /ISOLatin1Encoding [
-	/space /space /space /space /space /space /space /space
-	/space /space /space /space /space /space /space /space
-	/space /space /space /space /space /space /space /space
-	/space /space /space /space /space /space /space /space
-	/space /exclam /quotedbl /numbersign /dollar /percent /ampersand
-	    /quoteright
-	/parenleft /parenright /asterisk /plus /comma /minus /period /slash
-	/zero /one /two /three /four /five /six /seven
-	/eight /nine /colon /semicolon /less /equal /greater /question
-	/at /A /B /C /D /E /F /G
-	/H /I /J /K /L /M /N /O
-	/P /Q /R /S /T /U /V /W
-	/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
-	/quoteleft /a /b /c /d /e /f /g
-	/h /i /j /k /l /m /n /o
-	/p /q /r /s /t /u /v /w
-	/x /y /z /braceleft /bar /braceright /asciitilde /space
-	/space /space /space /space /space /space /space /space
-	/space /space /space /space /space /space /space /space
-	/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
-	/dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron
-	/space /exclamdown /cent /sterling /currency /yen /brokenbar /section
-	/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen
-	    /registered /macron
-	/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
-	    /periodcentered
-	/cedillar /onesuperior /ordmasculine /guillemotright /onequarter
-	    /onehalf /threequarters /questiondown
-	/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
-	/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex
-	    /Idieresis
-	/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
-	/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
-	    /germandbls
-	/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
-	/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
-	    /idieresis
-	/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide
-	/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn
-	    /ydieresis
-    ] def
-} if
-
-% font ISOEncode font
-% This procedure changes the encoding of a font from the default
-% Postscript encoding to ISOLatin1.  It's typically invoked just
-% before invoking "setfont".  The body of this procedure comes from
-% Section 5.6.1 of the Postscript book.
-
-/ISOEncode {
-    dup length dict begin
-	{1 index /FID ne {def} {pop pop} ifelse} forall
-	/Encoding ISOLatin1Encoding def
-	currentdict
-    end
-
-    % I'm not sure why it's necessary to use "definefont" on this new
-    % font, but it seems to be important; just use the name "Temporary"
-    % for the font.
-
-    /Temporary exch definefont
-} bind def
-
-% StrokeClip
-%
-% This procedure converts the current path into a clip area under
-% the assumption of stroking.  It's a bit tricky because some Postscript
-% interpreters get errors during strokepath for dashed lines.  If
-% this happens then turn off dashes and try again.
-
-/StrokeClip {
-    {strokepath} stopped {
-	(This Postscript printer gets limitcheck overflows when) =
-	(stippling dashed lines;  lines will be printed solid instead.) =
-	[] 0 setdash strokepath} if
-    clip
-} bind def
-
-% desiredSize EvenPixels closestSize
-%
-% The procedure below is used for stippling.  Given the optimal size
-% of a dot in a stipple pattern in the current user coordinate system,
-% compute the closest size that is an exact multiple of the device's
-% pixel size.  This allows stipple patterns to be displayed without
-% aliasing effects.
-
-/EvenPixels {
-    % Compute exact number of device pixels per stipple dot.
-    dup 0 matrix currentmatrix dtransform
-    dup mul exch dup mul add sqrt
-
-    % Round to an integer, make sure the number is at least 1, and compute
-    % user coord distance corresponding to this.
-    dup round dup 1 lt {pop 1} if
-    exch div mul
-} bind def
-
-% width height string StippleFill --
-%
-% Given a path already set up and a clipping region generated from
-% it, this procedure will fill the clipping region with a stipple
-% pattern.  "String" contains a proper image description of the
-% stipple pattern and "width" and "height" give its dimensions.  Each
-% stipple dot is assumed to be about one unit across in the current
-% user coordinate system.  This procedure trashes the graphics state.
-
-/StippleFill {
-    % The following code is needed to work around a NeWSprint bug.
-
-    /tmpstip 1 index def
-
-    % Change the scaling so that one user unit in user coordinates
-    % corresponds to the size of one stipple dot.
-    1 EvenPixels dup scale
-
-    % Compute the bounding box occupied by the path (which is now
-    % the clipping region), and round the lower coordinates down
-    % to the nearest starting point for the stipple pattern.  Be
-    % careful about negative numbers, since the rounding works
-    % differently on them.
-
-    pathbbox
-    4 2 roll
-    5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
-    6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
-
-    % Stack now: width height string y1 y2 x1 x2
-    % Below is a doubly-nested for loop to iterate across this area
-    % in units of the stipple pattern size, going up columns then
-    % across rows, blasting out a stipple-pattern-sized rectangle at
-    % each position
-
-    6 index exch {
-	2 index 5 index 3 index {
-	    % Stack now: width height string y1 y2 x y
-
-	    gsave
-	    1 index exch translate
-	    5 index 5 index true matrix tmpstip imagemask
-	    grestore
-	} for
-	pop
-    } for
-    pop pop pop pop pop
-} bind def
-
-% -- AdjustColor --
-% Given a color value already set for output by the caller, adjusts
-% that value to a grayscale or mono value if requested by the CL
-% variable.
-
-/AdjustColor {
-    CL 2 lt {
-	currentgray
-	CL 0 eq {
-	    .5 lt {0} {1} ifelse
-	} if
-	setgray
-    } if
-} bind def
-
-% x y strings spacing xoffset yoffset justify stipple DrawText --
-% This procedure does all of the real work of drawing text.  The
-% color and font must already have been set by the caller, and the
-% following arguments must be on the stack:
-%
-% x, y -	Coordinates at which to draw text.
-% strings -	An array of strings, one for each line of the text item,
-%		in order from top to bottom.
-% spacing -	Spacing between lines.
-% xoffset -	Horizontal offset for text bbox relative to x and y: 0 for
-%		nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se.
-% yoffset -	Vertical offset for text bbox relative to x and y: 0 for
-%		nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se.
-% justify -	0 for left justification, 0.5 for center, 1 for right justify.
-% stipple -	Boolean value indicating whether or not text is to be
-%		drawn in stippled fashion.  If text is stippled,
-%		procedure StippleText must have been defined to call
-%		StippleFill in the right way.
-%
-% Also, when this procedure is invoked, the color and font must already
-% have been set for the text.
-
-/DrawText {
-    /stipple exch def
-    /justify exch def
-    /yoffset exch def
-    /xoffset exch def
-    /spacing exch def
-    /strings exch def
-
-    % First scan through all of the text to find the widest line.
-
-    /lineLength 0 def
-    strings {
-	stringwidth pop
-	dup lineLength gt {/lineLength exch def} {pop} ifelse
-	newpath
-    } forall
-
-    % Compute the baseline offset and the actual font height.
-
-    0 0 moveto (TXygqPZ) false charpath
-    pathbbox dup /baseline exch def
-    exch pop exch sub /height exch def pop
-    newpath
-
-    % Translate coordinates first so that the origin is at the upper-left
-    % corner of the text's bounding box. Remember that x and y for
-    % positioning are still on the stack.
-
-    translate
-    lineLength xoffset mul
-    strings length 1 sub spacing mul height add yoffset mul translate
-
-    % Now use the baseline and justification information to translate so
-    % that the origin is at the baseline and positioning point for the
-    % first line of text.
-
-    justify lineLength mul baseline neg translate
-
-    % Iterate over each of the lines to output it.  For each line,
-    % compute its width again so it can be properly justified, then
-    % display it.
-
-    strings {
-	dup stringwidth pop
-	justify neg mul 0 moveto
-	stipple {
-
-	    % The text is stippled, so turn it into a path and print
-	    % by calling StippledText, which in turn calls StippleFill.
-	    % Unfortunately, many Postscript interpreters will get
-	    % overflow errors if we try to do the whole string at
-	    % once, so do it a character at a time.
-
-	    gsave
-	    /char (X) def
-	    {
-		char 0 3 -1 roll put
-		currentpoint
-		gsave
-		char true charpath clip StippleText
-		grestore
-		char stringwidth translate
-		moveto
-	    } forall
-	    grestore
-	} {show} ifelse
-	0 spacing neg translate
-    } forall
-} bind def
-
-%%EndProlog
-%%BeginSetup
-/CL 2 def
-%%EndSetup
-
-%%Page: 1 1
-save
-306.0 396.0 translate
-0.9606 0.9606 scale
--148 -104 translate
-0 209 moveto 297 209 lineto 297 0 lineto 0 0 lineto closepath clip newpath
-gsave
-2 195 translate
-/TkPhoto { 
-  gsave 
-  32 dict begin 
-  /tinteger exch def 
-  /transparent 1 string def 
-  transparent 0 tinteger put 
-  /olddict exch def 
-  olddict /DataSource get dup type /filetype ne { 
-    olddict /DataSource 3 -1 roll 
-    0 () /SubFileDecode filter put 
-  } { 
-    pop 
-  } ifelse 
-  /newdict olddict maxlength dict def 
-  olddict newdict copy pop 
-  /w newdict /Width get def 
-  /crpp newdict /Decode get length 2 idiv def 
-  /str w string def 
-  /pix w crpp mul string def 
-  /substrlen 2 w log 2 log div floor exp cvi def 
-  /substrs [ 
-  { 
-     substrlen string 
-     0 1 substrlen 1 sub { 
-       1 index exch tinteger put 
-     } for 
-     /substrlen substrlen 2 idiv def 
-     substrlen 0 eq {exit} if 
-  } loop 
-  ] def 
-  /h newdict /Height get def 
-  1 w div 1 h div matrix scale 
-  olddict /ImageMatrix get exch matrix concatmatrix 
-  matrix invertmatrix concat 
-  newdict /Height 1 put 
-  newdict /DataSource pix put 
-  /mat [w 0 0 h 0 0] def 
-  newdict /ImageMatrix mat put 
-  0 1 h 1 sub { 
-    mat 5 3 -1 roll neg put 
-    olddict /DataSource get str readstring pop pop 
-    /tail str def 
-    /x 0 def 
-    olddict /DataSource get pix readstring pop pop 
-    { 
-      tail transparent search dup /done exch not def 
-      {exch pop exch pop} if 
-      /w1 exch length def 
-      w1 0 ne { 
-        newdict /DataSource  pix x crpp mul w1 crpp mul getinterval put 
-        newdict /Width w1 put 
-        mat 4 x neg put 
-        /x x w1 add def 
-        newdict image 
-        /tail tail w1 tail length w1 sub getinterval def 
-      } if 
-      done {exit} if 
-      tail substrs { 
-        anchorsearch {pop} if 
-      } forall 
-      /tail exch def 
-      tail length 0 eq {exit} if 
-      /x w tail length sub def 
-    } loop 
-  } for 
-  end 
-  grestore 
-} bind def 
-
-
-
-%%0 -12 translate
-gsave
-16  12 scale
-/DeviceRGB setcolorspace
-
-<<
-  /ImageType 1
-  /Width 16
-  /Height 12
-  /BitsPerComponent 8
-  /DataSource currentfile /ASCIIHexDecode filter
-  /ImageMatrix [16 0 0 -12 0 12]
-  /Decode [0 1 0 1 0 1]
->>
-1 TkPhoto
-010101FFFFFFFF010101010101010101000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-0000000101FFFFFFFFFFFF0101010101010101000000000000000000F0FF80
-F0FF80F0FF80F0FF80000000000000000000000000000000000000000000
-00000000000001FFFFFFFFFFFFFFFF01010101010101000000000000F0FF80
-F0FF80F0FF80F0FF80F0FF80F0FF80000000000000000000000000000000
-000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF010101000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF010101000000
-F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF0101
-01000000F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF
-FF010101000000F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80F0FF80000000000000000000000000FFFFFFFFFFFFFFFFFF
-FFFFFFFF010101000000F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80F0FF80F0FF80000000000000000000000000FFFFFFFFFFFF
-FFFFFFFFFFFFFF010101000000F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80F0FF80F0FF80F0FF80000000000000000000000000FFFFFF
-FFFFFFFFFFFFFFFFFFFF010101000000F0FF80F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80000000000000000000000000
-FFFFFFFFFFFFFFFFFFFFFFFFFF010101000000F0FF80F0FF80F0FF80F0FF80
-F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80F0FF80000000000000000000
-000000FFFFFFFFFFFFFFFFFFFFFFFFFF010101000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000>
- grestore
-grestore
-restore showpage
-
-%%Trailer
-end
-%%EOF
diff --git a/tkimg1.3/sgi/ChangeLog b/tkimg1.3/sgi/ChangeLog
deleted file mode 100644
index 8016e4f..0000000
--- a/tkimg1.3/sgi/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/sgi: SGI photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/sgi/Makefile.in b/tkimg1.3/sgi/Makefile.in
deleted file mode 100644
index 8d43815..0000000
--- a/tkimg1.3/sgi/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgsgi TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgsgi_SOURCES	=	\
-		sgi.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgsgi_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgsgi_OBJECTS	= $(tkimgsgi_SOURCES:.c=. at OBJEXT@)
-tkimgsgi_LIB_FILE	= @tkimgsgi_LIB_FILE@
-
-## tkimgsgistub_OBJECTS	= tkimgsgiStubLib.$(OBJEXT)
-## tkimgsgistub_LIB_FILE= @tkimgsgistub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgsgi_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgsgi_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgsgi.$(OBJEXT): $(srcdir)/generic/tkimgsgi.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgsgi.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgsgi/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgsgiConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgsgi.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgsgi_DECLS = \
-	$(srcdir)/tkimgsgi.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgsgi_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgsgi_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/sgi/aclocal.m4 b/tkimg1.3/sgi/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/sgi/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/sgi/configure b/tkimg1.3/sgi/configure
deleted file mode 100755
index 6e12fed..0000000
--- a/tkimg1.3/sgi/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgsgi', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./sgi.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgsgi
-DPACKAGE="img::sgi"
-PHIMGTYPE="sgi"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGSGI_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgsgistub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGSGI_VERSION "${TKIMGSGI_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgsgi in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgsgi 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGSGI_VERSION@%$TKIMGSGI_VERSION%g
-s%@tkimgsgi_LIB_FILE@%$tkimgsgi_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/sgi/configure.in b/tkimg1.3/sgi/configure.in
deleted file mode 100644
index b0f511e..0000000
--- a/tkimg1.3/sgi/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgsgi', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./sgi.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgsgi
-DPACKAGE="img::sgi"
-PHIMGTYPE="sgi"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGSGI_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGSGI_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgsgi_LIB_FILE)
-#AC_SUBST(tkimgsgistub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGSGI_VERSION, "${TKIMGSGI_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgsgi in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgsgi)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/sgi/pkgIndex.tcl.in b/tkimg1.3/sgi/pkgIndex.tcl.in
deleted file mode 100644
index 80fbad8..0000000
--- a/tkimg1.3/sgi/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgsgi_LIB_FILE@]]
diff --git a/tkimg1.3/sgi/readme b/tkimg1.3/sgi/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/sgi/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/sgi/sgi.c b/tkimg1.3/sgi/sgi.c
deleted file mode 100644
index 6f32cbd..0000000
--- a/tkimg1.3/sgi/sgi.c
+++ /dev/null
@@ -1,1782 +0,0 @@
-/* STARTHEADER
- *
- * File :       sgi.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Wed Nov 22 21:45:17 CET 2000
- *
- * Copyright :  (C) 2000-2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for Silicon Graphics' native file format.
- *
- * The following image types are supported:
- *
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- * 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- * 48-bit pixels: True-color (RGB, each channel 16 bit).
- * 64-bit pixels: True-color with alpha channel (RGBA, each channel 16 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- * 24-bit | Yes   | Yes*  | Yes   | Yes*  |
- * 32-bit | Yes   | Yes*  | Yes   | Yes*  |
- * 48-bit | Yes   | Yes*  | No    | No    |
- * 64-bit | Yes   | Yes*  | No    | No    |
- *
- * *: Implemented by reading/writing from/to a temporary file. This will
- *    be slow for larger images.
- *
- * All images types may be either uncompressed or run-length encoded.
- *
- *
- * The following format options are available:
- *
- * Read  SGI image: "sgi -matte <bool> -verbose <bool>"
- * Write SGI image: "sgi -matte <bool> -verbose <bool> -compression <type>"
- *
- * -matte <bool>:       If set to false, a matte (alpha) channel is ignored 
- *                      during reading or writing. Default is true.
- * -verbose <bool>:     If set to true, additional information about the file
- *                      format is printed to stdout. Default is false.
- * -compression <type>: Set the compression mode to either "none" or "rle".
- *                      Default is "rle".
- *
- * Notes: 
- *
- * - Parts of this code are taken from Paul Haeberli's original 
- *   image library code, written in 1984.
- *
- * - Due to the heavy use of file seeks in Haeberli's code and the behaviour
- *   of Tcl_Seek on Windows when writing to files (sounds like smashing your
- *   HD), there is some workaround to use fseek and fwrite instead.
- *   See "#define TCLSEEK_WORKAROUND".
- *
- * ENDHEADER
- *
- * $Id: sgi.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-/* #define DEBUG_LOCAL */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* OPA TODO: Change from ANSI-C arguments to _ANSI_ARGS_ macro. */
-
-#if defined (WIN32)
-    #define TCLSEEK_WORKAROUND
-#endif
-
-#if defined (TCLSEEK_WORKAROUND)
-    static int ioMode = 0; /* Needed for Windows patch */
-
-    static int MyWrite (FILE *chan, char *buf, int size) 
-    {
-	if (1 == fwrite (buf, size, 1, chan)) {
-	    return size;
-	} else {
-	    return -1;
-	}
-    }
-
-    static int MyClose (Tcl_Interp *interp, FILE *chan) 
-    {
-	if (0 == fclose (chan)) {
-	    return TCL_OK;
-	} else {
-	    return TCL_ERROR;
-	}
-    }
-
-    static int MySeek (Tcl_Channel chan, int offset, int seekMode) 
-    {
-	if (ioMode == 0) { /* Read mode */
-	    return Tcl_Seek (chan, offset, seekMode);
-	} else {
-	    return fseek (chan, offset, seekMode);
-	}
-    }
-
-    #define MYCHANNEL FILE*
-    #define Tcl_Seek  MySeek
-    #define Tcl_Write MyWrite
-    #define MYCLOSE   MyClose
-#else
-    #define MYCHANNEL Tcl_Channel
-    #define MYCLOSE   Tcl_Close
-#endif
-
-/* Some defines and typedefs for compatibility reasons. */
-#define TRUE  1
-#define FALSE 0
-typedef unsigned char Boln;	/* Boolean value: TRUE or FALSE */
-typedef unsigned char UByte;	/* Unsigned  8 bit integer */
-typedef char  Byte;		/* Signed    8 bit integer */
-typedef short Short;		/* Signed   16 bit integer */
-typedef unsigned short UShort;	/* Unsigned 16 bit integer */
-typedef long Int;		/* Signed   32 bit integer */
-typedef unsigned long UInt;	/* Unsigned 32 bit integer */
-
-
-/* Start of original code from SGI image library, slightly modified. */
-
-#define IMAGIC        0x01DA
-
-/* colormap of images */
-#define CM_NORMAL               0       /* file contains rows of values which
-                                         * are either RGB values (zsize == 3)
-                                         * or greyramp values (zsize == 1) */
-#define CM_DITHERED             1
-#define CM_SCREEN               2       /* file contains data which is a screen
-                                         * image; getrow returns buffer which
-                                         * can be displayed directly with
-                                         * writepixels */
-#define CM_COLORMAP             3       /* a colormap file */
-
-#define TYPEMASK                0xff00
-#define BPPMASK                 0x00ff
-#define ITYPE_UNCOMPRESSED      0x0000
-#define ITYPE_RLE               0x0100
-#define ISRLE(type)             (((type) & 0xff00) == ITYPE_RLE)
-#define ISUNCOMPRESSED(type)    (((type) & 0xff00) == ITYPE_UNCOMPRESSED)
-#define BPP(type)               ((type) & BPPMASK)
-#define RLE(bpp)                (ITYPE_RLE | (bpp))
-#define UNCOMPRESSED(bpp)       (ITYPE_UNCOMPRESSED | (bpp))
-#define IBUFSIZE(pixels)        ((pixels+(pixels>>6))<<2)
-#define RLE_NOP                 0x00
-
-#define ierror(p)               (((p)->flags&_IOERR)!=0)
-#define ifileno(p)              ((p)->file)
-#define getpix(p)               (--(p)->cnt>=0 ? *(p)->ptr++ : ifilbuf(p))
-#define putpix(p,x)             (--(p)->cnt>=0 \
-                                    ? ((int)(*(p)->ptr++=(unsigned)(x))) \
-                                    : iflsbuf(p,(unsigned)(x)))
-
-typedef struct {
-    UShort    imagic;         /* stuff saved on disk . . */
-    UShort    type;
-    UShort    dim;
-    UShort    xsize;
-    UShort    ysize;
-    UShort    zsize;
-    UInt      min;
-    UInt      max;
-    UInt      wastebytes;
-    char      name[80];
-    UInt      colormap; 
-
-    MYCHANNEL file;	/* Stuff not stored in the file. */
-    UShort    flags;
-    Short     dorev;
-    Short     x;
-    Short     y;
-    Short     z;
-    Short     cnt;
-    UShort    *ptr;
-    UShort    *base;
-    UShort    *tmpbuf;
-    UInt      offset;
-    UInt      rleend;         /* for rle images */
-    UInt      *rowstart;      /* for rle images */
-    Int       *rowsize;       /* for rle images */ 
-    char      dummy[512-156];
-} IMAGE;
-
-#if !defined (_IOWRT)
-    #define _IOWRT  1
-#endif
-#if !defined (_IOREAD)
-    #define _IOREAD 2
-#endif
-#if !defined (_IORW)
-    #define _IORW   4
-#endif
-#if !defined (_IOERR)
-    #define _IOERR  8
-#endif
-#if !defined (_IOEOF)
-    #define _IOEOF 16
-#endif
-
-static int img_badrow(IMAGE *image, unsigned int y, unsigned int z);
-static int img_write(IMAGE *image, char *buffer,int count);
-static int iflush(IMAGE *image);
-static unsigned short *ibufalloc(IMAGE *image);
-static unsigned long img_optseek(IMAGE *image, unsigned long offset);
-static int imgopen(int, MYCHANNEL, IMAGE *, char *,unsigned int, unsigned int,
-		unsigned int, unsigned int, unsigned int);
-static int getrow(IMAGE *image, unsigned short *buffer,
-		unsigned int y, unsigned int z);
-static int putrow(IMAGE *image, unsigned short *buffer,
-		unsigned int y, unsigned int z);
-
-/*	error handler for the image library.  If the iseterror() routine
-	has been called, sprintf's the args into a string and calls the
-	error function.  Otherwise calls fprintf with the args and then
-	exit.  This allows 'old' programs to assume that no errors
-	ever need be worried about, while programs that know how and
-	want to can handle the errors themselves.  Olson, 11/88
-*/
-static void i_errhdlr(fmt, a1, a2, a3, a4)  /* most args currently used is 2 */
-char *fmt;
-{
-    /* fprintf(stderr, fmt); */
-    return;
-}
-
-/*
- *	isetname and isetcolormap -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static void isetname(IMAGE *image, char *name)
-{
-    strncpy(image->name,name,80);
-}
-
-static void isetcolormap(IMAGE *image, int colormap)
-{
-    image->colormap = colormap;
-}
-
-static void cvtshorts( buffer, n)
-register unsigned short buffer[];
-register long n;
-{
-    register short i;
-    register long nshorts = n>>1;
-    register unsigned short swrd;
-
-    for(i=0; i<nshorts; i++) {
-	swrd = *buffer;
-	*buffer++ = (swrd>>8) | (swrd<<8);
-    }
-}
-
-static void cvtlongs( buffer, n)
-register long buffer[];
-register long n;
-{
-    register short i;
-    register long nlongs = n>>2;
-    register long lwrd;
-    Byte *bytePtr;
-
-    bytePtr = (Byte *) buffer;
-    for(i=0; i<nlongs; i++) {
-	lwrd = buffer[i];
-	*bytePtr = (Byte) (lwrd >> 24); bytePtr++;
-	*bytePtr = (Byte) (lwrd >> 16); bytePtr++;
-	*bytePtr = (Byte) (lwrd >> 8);  bytePtr++;
-	*bytePtr = (Byte) (lwrd);       bytePtr++;
-    }
-}
-
-static void cvtimage( buffer )
-long buffer[];
-{
-    cvtshorts((unsigned short *)buffer,12);
-    cvtlongs(buffer+3,12);
-}
-
-/*
- *	iopen -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static unsigned short *ibufalloc(IMAGE *image)
-{
-    return (unsigned short *)malloc(IBUFSIZE(image->xsize));
-}
-
-static int imgOpenRead (MYCHANNEL file, IMAGE *image, char *mode)
-{
-    #if defined (TCLSEEK_WORKAROUND)
-	ioMode = 0;
-    #endif
-    return imgopen (0, file, image, mode, 0, 0, 0, 0, 0);
-}
-
-static int imgOpenWrite (MYCHANNEL file, IMAGE *image, char *mode,
-                     unsigned int type, unsigned int dim, 
-                     unsigned int xsize, unsigned int ysize, unsigned int zsize)
-{
-    #if defined (TCLSEEK_WORKAROUND)
-	ioMode = 1;
-    #endif
-    return imgopen (0, file, image, mode, type, dim, xsize, ysize, zsize);
-}
-
-static int imgopen(int f, MYCHANNEL file, IMAGE *image, char *mode,
-		unsigned int type, unsigned int dim,
-		unsigned int xsize, unsigned int ysize, unsigned int zsize)
-{
-    register int rw;
-    int tablesize;
-    register int i, max;
-
-    rw = mode[1] == '+';
-    if(rw) {
-	i_errhdlr("iopen: read/write mode not supported\n");
-	return 0;
-    }
-    if (*mode=='w') {
-	image->type = type;
-	image->xsize = xsize;
-	image->ysize = 1;
-	image->zsize = 1;
-	if (dim>1)
-	    image->ysize = ysize;
-	if (dim>2)
-	    image->zsize = zsize;
-	if(image->zsize == 1) {
-	    image->dim = 2;
-	    if(image->ysize == 1)
-		image->dim = 1;
-	} else {
-	    image->dim = 3;
-	}
-	image->min = 10000000;
-	image->max = 0;
-	isetname(image,"no name"); 
-	image->wastebytes = 0;
-	if (sizeof (IMAGE) != Tcl_Write (file, (char *)image, sizeof(IMAGE))) {
-	    i_errhdlr("iopen: error on write of image header\n");
-	    return 0;
-	}
-    } else {
-	if (sizeof (IMAGE) != Tcl_Read (file, (char *)image,
-					sizeof(IMAGE))) {
-	    i_errhdlr("iopen: error on read of image header\n");
-	    return 0;
-	}
-	if( ((image->imagic>>8) | ((image->imagic&0xff)<<8)) == IMAGIC ) {
-	    image->dorev = 1;
-	    cvtimage((long *)image);
-	} else
-	    image->dorev = 0;
-	if (image->imagic != IMAGIC) {
-	    i_errhdlr("iopen: bad magic in image file %x\n",image->imagic);
-	    return 0;
-	}
-    }
-    if (rw)
-	image->flags = _IORW;
-    else if (*mode != 'r')
-	image->flags = _IOWRT;
-    else
-	image->flags = _IOREAD;
-    if(ISRLE(image->type)) {
-	tablesize = image->ysize*image->zsize*sizeof(long);
-	image->rowstart = (unsigned long *)malloc(tablesize);
-	image->rowsize = (long *)malloc(tablesize);
-	if( image->rowstart == 0 || image->rowsize == 0 ) {
-	    i_errhdlr("iopen: error on table alloc\n");
-	    return 0;
-	}
-	image->rleend = 512L+2*tablesize;
-	if (*mode=='w') {
-	    max = image->ysize*image->zsize;
-	    for(i=0; i<max; i++) {
-		image->rowstart[i] = 0;
-		image->rowsize[i] = -1;
-	    }
-	} else {
-	    tablesize = image->ysize*image->zsize*sizeof(long);
-	    Tcl_Seek (file, 512L, 0);
-	    if (tablesize != Tcl_Read (file, (char *)image->rowstart, tablesize)) {
-		i_errhdlr("iopen: error on read of rowstart\n");
-		return 0;
-	    }
-	    if(image->dorev)
-		cvtlongs(image->rowstart,tablesize);
-	    if (Tcl_Read (file, (char *)image->rowsize, tablesize) != tablesize) {
-		i_errhdlr("iopen: error on read of rowsize\n");
-		return 0;
-	    }
-	    if(image->dorev)
-		cvtlongs(image->rowsize,tablesize);
-	}
-    }
-    image->cnt = 0;
-    image->ptr = 0;
-    image->base = 0;
-    if( (image->tmpbuf = ibufalloc(image)) == 0 ) {	
-	i_errhdlr("iopen: error on tmpbuf alloc %d\n",image->xsize);
-	return 0;
-    }
-    image->x = image->y = image->z = 0;
-    image->file = file;
-    image->offset = 512L;			/* set up for img_optseek */
-    Tcl_Seek (image->file, 512L, 0);
-    return 1;
-}
-
-
-static long reverse(lwrd) 
-register unsigned long lwrd;
-{
-    return ((lwrd>>24) 		| 
-	   ((lwrd>>8) & 0xff00) 	|
-	   ((lwrd<<8) & 0xff0000) |
-	   (lwrd<<24) 		);
-}
-
-/*
- *	iclose and iflush -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static int iclose(IMAGE *image)
-{
-    long tablesize;
-
-    iflush(image);
-    img_optseek(image, 0);
-    if (image->flags&_IOWRT) {
-	if(image->dorev)
-	    cvtimage((long *)image);
-	if (img_write(image,(char *)image,sizeof(IMAGE)) != sizeof(IMAGE)) {
-	    i_errhdlr("iclose: error on write of image header\n");
-	    return EOF;
-	}
-	if(image->dorev)
-	    cvtimage((long *)image);
-	if(ISRLE(image->type)) {
-	    img_optseek(image, 512L);
-	    tablesize = image->ysize*image->zsize*sizeof(long);
-	    if(image->dorev)
-		cvtlongs(image->rowstart,tablesize);
-	    if (img_write(image,(char *)(image->rowstart),tablesize) != tablesize) {
-		i_errhdlr("iclose: error on write of rowstart\n");
-		return EOF;
-	    }
-	    if(image->dorev)
-		cvtlongs(image->rowsize,tablesize);
-	    if (img_write(image,(char *)(image->rowsize),tablesize) != tablesize) {
-		i_errhdlr("iclose: error on write of rowsize\n");
-		return EOF;
-	    }
-	}
-    }
-    if(image->base) {
-	free(image->base);
-	image->base = 0;
-    }
-    if(image->tmpbuf) {
-	free(image->tmpbuf);
-	image->tmpbuf = 0;
-    }
-    if(ISRLE(image->type)) {
-	free(image->rowstart);
-	image->rowstart = 0;
-	free(image->rowsize);
-	image->rowsize = 0;
-    }
-    return 0;
-}
-
-static int iflush(IMAGE *image)
-{
-    unsigned short *base;
-
-    if ( (image->flags&_IOWRT)
-     && (base=image->base)!=NULL && (image->ptr-base)>0) {
-	    if (putrow(image, base, image->y,image->z)!=image->xsize) {
-		    image->flags |= _IOERR;
-		    return(EOF);
-	    }
-    }
-    return(0);
-}
-
-/*
- *	ifilbuf -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static int ifilbuf(IMAGE *image)
-{
-    if ((image->flags&_IOREAD) == 0)
-	return(EOF);
-    if (image->base==NULL) {
-	if ((image->base = ibufalloc(image)) == NULL) {
-	    i_errhdlr("can't alloc image buffer\n");
-	    return EOF;
-	}
-    }
-    image->cnt = getrow(image,image->base,image->y,image->z);
-    image->ptr = image->base;
-    if (--image->cnt < 0) {
-	if (image->cnt == -1) {
-	    image->flags |= _IOEOF;
-	    if (image->flags & _IORW)
-		image->flags &= ~_IOREAD;
-	} else
-	    image->flags |= _IOERR;
-	image->cnt = 0;
-	return -1;
-    }
-    if(++image->y >= image->ysize) {
-	image->y = 0;
-	if(++image->z >= image->zsize) {
-	    image->z = image->zsize-1;
-	    image->flags |= _IOEOF;
-	    return -1;
-	}
-    }
-    return *image->ptr++ & 0xffff;
-}
-
-/*
- *	iflsbuf -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static unsigned int iflsbuf(IMAGE *image, unsigned int c)
-{
-    register unsigned short *base;
-    register int n, rn;
-
-    if ((image->flags&_IOWRT)==0)
-	return(EOF);
-    if ((base=image->base)==NULL) {
-	if ((image->base=base=ibufalloc(image)) == NULL) {
-	    i_errhdlr("flsbuf: error on buf alloc\n");
-	    return EOF;
-	}
-	rn = n = 0;
-    } else if ((rn = n = image->ptr - base) > 0)  {
-	n = putrow(image,base,image->y,image->z);
-	if(++image->y >= image->ysize) {
-	    image->y = 0;
-	    if(++image->z >= image->zsize) {
-		image->z = image->zsize-1;
-		image->flags |= _IOEOF;
-		return -1;
-	    }
-	}
-    }
-    image->cnt = image->xsize-1;
-    *base++ = c;
-    image->ptr = base;
-    if (rn != n) {
-	image->flags |= _IOERR;
-	return(EOF);
-    }
-    return(c);
-}
-
-
-/*
- *	img_seek, img_write, img_read, img_optseek -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static unsigned long img_seek(IMAGE *image, unsigned int y, unsigned int z)
-{
-    if(img_badrow(image,y,z)) {
-	i_errhdlr("img_seek: row number out of range\n");
-	return EOF;
-    }
-    image->x = 0;
-    image->y = y;
-    image->z = z;
-    if(ISUNCOMPRESSED(image->type)) {
-	switch(image->dim) {
-	    case 1:
-		return img_optseek(image, 512L);
-	    case 2: 
-		return img_optseek(image,512L+(y*image->xsize)*BPP(image->type));
-	    case 3: 
-		return img_optseek(image,
-		    512L+(y*image->xsize+z*image->xsize*image->ysize)*
-							BPP(image->type));
-	    default:
-		i_errhdlr("img_seek: weird dim\n");
-		break;
-	}
-    } else if(ISRLE(image->type)) {
-	switch(image->dim) {
-	    case 1:
-		return img_optseek(image, image->rowstart[0]);
-	    case 2: 
-		return img_optseek(image, image->rowstart[y]);
-	    case 3: 
-		return img_optseek(image, image->rowstart[y+z*image->ysize]);
-	    default:
-		i_errhdlr("img_seek: weird dim\n");
-		break;
-	}
-    } else 
-	i_errhdlr("img_seek: weird image type\n");
-    return((unsigned long)-1);
-}
-
-static int img_badrow(IMAGE *image, unsigned int y, unsigned int z)
-{
-    if(y>=image->ysize || z>=image->zsize)
-	return 1;
-    else
-        return 0;
-}
-
-static int img_write(IMAGE *image, char *buffer,int count)
-{
-    int retval;
-
-    retval = Tcl_Write (image->file, buffer, count);
-    if(retval == count)
-	image->offset += count;
-    else
-	image->offset = -1;
-    return retval;
-}
-
-static int img_read(IMAGE *image, char *buffer, int count)
-{
-    int retval;
-
-    retval = Tcl_Read (image->file, buffer, count);
-    if (retval == count)
-	image->offset += count;
-    else
-	image->offset = -1;
-    return retval;
-}
-
-static unsigned long img_optseek(IMAGE *image, unsigned long offset)
-{
-    if(image->offset != offset) {
-       image->offset = offset;
-       return ((unsigned long) Tcl_Seek (image->file,offset,0));
-   }
-   return offset;
-}
-
-/*
- *	getpix and putpix -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-#undef getpix
-#undef putpix
-
-static int getpix(IMAGE *image)
-{
-    if(--(image)->cnt>=0)
-    	return (int)(*(image)->ptr++);
-    else
-	return ifilbuf(image);
-}
-
-static unsigned int putpix(IMAGE *image, unsigned int pix)
-{
-    if(--(image)->cnt>=0)
-        return (unsigned int)(*(image)->ptr++ = pix);
-    else
-	return iflsbuf(image,pix);
-}
-
-/*
- *	img_getrowsize, img_setrowsize, img_rle_compact, img_rle_expand -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static long img_getrowsize(IMAGE *image)
-{
-    switch(image->dim) {
-	case 1:
-	    return image->rowsize[0];
-	case 2:
-	    return image->rowsize[image->y];
-	case 3:
-	    return image->rowsize[image->y+image->z*image->ysize];
-    }
-    return -1;
-}
-
-static void img_setrowsize(IMAGE *image, long cnt, long y, long z)
-{
-    long *sizeptr;
-
-    if(img_badrow(image,y,z)) 
-	return;
-    switch(image->dim) {
-	case 1:
-	    sizeptr = &image->rowsize[0];
-	    image->rowstart[0] = image->rleend;
-	    break;
-	case 2:
-	    sizeptr = &image->rowsize[y];
-	    image->rowstart[y] = image->rleend;
-	    break;
-	case 3:
-	    sizeptr = &image->rowsize[y+z*image->ysize];
-	    image->rowstart[y+z*image->ysize] = image->rleend;
-	    break;
-        default:
-	    i_errhdlr ("img_setrowsize: bad dim: %d\n", image->dim);
-	    return;
-    }	
-    if(*sizeptr != -1) 
-	image->wastebytes += *sizeptr;
-    *sizeptr = cnt;
-    image->rleend += cnt;
-}
-
-#define docompact 							\
-	while(iptr<ibufend) {						\
-	    sptr = iptr;						\
-	    iptr += 2;							\
-	    while((iptr<ibufend)&&((iptr[-2]!=iptr[-1])||(iptr[-1]!=iptr[0])))\
-		iptr++;							\
-	    iptr -= 2;							\
-	    count = iptr-sptr;						\
-	    while(count) {						\
-		todo = count>126 ? 126:count; 				\
-		count -= todo;						\
-		*optr++ = 0x80|todo;					\
-		while(todo--)						\
-		    *optr++ = *sptr++;					\
-	    }								\
-	    sptr = iptr;						\
-	    cc = *iptr++;						\
-	    while( (iptr<ibufend) && (*iptr == cc) )			\
-		iptr++;							\
-	    count = iptr-sptr;						\
-	    while(count) {						\
-		todo = count>126 ? 126:count; 				\
-		count -= todo;						\
-		*optr++ = todo;						\
-		*optr++ = cc;						\
-	    }								\
-	}								\
-	*optr++ = 0;
-
-static int img_rle_compact(unsigned short *expbuf, int ibpp,
-			unsigned short *rlebuf, int obpp, int cnt)
-{
-    if(ibpp == 1 && obpp == 1) {
-	register unsigned char *iptr = (unsigned char *)expbuf;
-	register unsigned char *ibufend = iptr+cnt;
-	register unsigned char *sptr;
-	register unsigned char *optr = (unsigned char *)rlebuf;
-	register short todo, cc;
-	register long count;
-
-	docompact;
-	return optr - (unsigned char *)rlebuf;
-    } else if(ibpp == 1 && obpp == 2) {
-	register unsigned char *iptr = (unsigned char *)expbuf;
-	register unsigned char *ibufend = iptr+cnt;
-	register unsigned char *sptr;
-	register unsigned short *optr = rlebuf;
-	register short todo, cc;
-	register long count;
-
-	docompact;
-	return optr - rlebuf;
-    } else if(ibpp == 2 && obpp == 1) {
-	register unsigned short *iptr = expbuf;
-	register unsigned short *ibufend = iptr+cnt;
-	register unsigned short *sptr;
-	register unsigned char *optr = (unsigned char *)rlebuf;
-	register short todo, cc;
-	register long count;
-
-	docompact;
-	return optr - (unsigned char *)rlebuf;
-    } else if(ibpp == 2 && obpp == 2) {
-	register unsigned short *iptr = expbuf;
-	register unsigned short *ibufend = iptr+cnt;
-	register unsigned short *sptr;
-	register unsigned short *optr = rlebuf;
-	register short todo, cc;
-	register long count;
-
-	docompact;
-	return optr - rlebuf;
-    } else  {
-	i_errhdlr("rle_compact: bad bpp: %d %d\n",ibpp,obpp);
-	return 0;
-    }
-}
-
-#define doexpand				\
-	while(1) {				\
-	    pixel = *iptr++;			\
-	    if ( !(count = (pixel & 0x7f)) )	\
-		return;				\
-	    if(pixel & 0x80) {			\
-	       while(count--)			\
-		    *optr++ = *iptr++;		\
-	    } else {				\
-	       pixel = *iptr++;			\
-	       while(count--)			\
-		    *optr++ = pixel;		\
-	    }					\
-	}
-
-static void img_rle_expand(unsigned short *rlebuf, int ibpp,
-			unsigned short *expbuf, int obpp)
-{
-    if(ibpp == 1 && obpp == 1) {
-	register unsigned char *iptr = (unsigned char *)rlebuf;
-	register unsigned char *optr = (unsigned char *)expbuf;
-	register unsigned short pixel,count;
-
-	doexpand;
-    } else if(ibpp == 1 && obpp == 2) {
-	register unsigned char *iptr = (unsigned char *)rlebuf;
-	register unsigned short *optr = expbuf;
-	register unsigned short pixel,count;
-
-	doexpand;
-    } else if(ibpp == 2 && obpp == 1) {
-	register unsigned short *iptr = rlebuf;
-	register unsigned char  *optr = (unsigned char *)expbuf;
-	register unsigned short pixel,count;
-
-	doexpand;
-    } else if(ibpp == 2 && obpp == 2) {
-	register unsigned short *iptr = rlebuf;
-	register unsigned short *optr = expbuf;
-	register unsigned short pixel,count;
-
-	doexpand;
-    } else 
-	i_errhdlr("rle_expand: bad bpp: %d %d\n",ibpp,obpp);
-}
-
-/*
- *	putrow, getrow -
- *
- *				Paul Haeberli - 1984
- *
- */
-
-static int putrow(IMAGE *image, unsigned short *buffer,
-		unsigned int y, unsigned int z) 
-{
-    register unsigned short 	*sptr;
-    register unsigned char      *cptr;
-    register unsigned int x;
-    register unsigned long min, max;
-    register long cnt;
-
-    if( !(image->flags & (_IORW|_IOWRT)) )
-	return -1;
-    if(image->dim<3)
-	z = 0;
-    if(image->dim<2)
-	y = 0;
-    if(ISUNCOMPRESSED(image->type)) {
-	switch(BPP(image->type)) {
-	    case 1: 
-		min = image->min;
-		max = image->max;
-		cptr = (unsigned char *)image->tmpbuf;
-		sptr = buffer;
-		for(x=image->xsize; x--;) { 
-		    *cptr = *sptr++;
-		    if (*cptr > max) max = *cptr;
-		    if (*cptr < min) min = *cptr;
-		    cptr++;
-		}
-		image->min = min;
-		image->max = max;
-		img_seek(image,y,z);
-		cnt = image->xsize;
-		if (img_write(image,(char *)(image->tmpbuf),cnt) != cnt)
-		    return -1;
-		else
-		    return cnt;
-		/* NOTREACHED */
-
-	    case 2: 
-		min = image->min;
-		max = image->max;
-		sptr = buffer;
-		for(x=image->xsize; x--;) { 
-		    if (*sptr > max) max = *sptr;
-		    if (*sptr < min) min = *sptr;
-		    sptr++;
-		}
-		image->min = min;
-		image->max = max;
-		img_seek(image,y,z);
-		cnt = image->xsize<<1;
-		if(image->dorev)	
-		    cvtshorts(buffer,cnt);
-		if (img_write(image,(char *)(buffer),cnt) != cnt) {
-		    if(image->dorev)	
-			cvtshorts(buffer,cnt);
-		    return -1;
-		} else {
-		    if(image->dorev)	
-			cvtshorts(buffer,cnt);
-		    return image->xsize;
-		}
-		/* NOTREACHED */
-
-	    default:
-		i_errhdlr("putrow: weird bpp\n");
-	}
-    } else if(ISRLE(image->type)) {
-	switch(BPP(image->type)) {
-	    case 1: 
-		min = image->min;
-		max = image->max;
-		sptr = buffer;
-		for(x=image->xsize; x--;) { 
-		    if (*sptr > max) max = *sptr;
-		    if (*sptr < min) min = *sptr;
-		    sptr++;
-		}
-		image->min = min;
-		image->max = max;
-		cnt = img_rle_compact(buffer,2,image->tmpbuf,1,image->xsize);
-		img_setrowsize(image,cnt,y,z);
-		img_seek(image,y,z);
-		if (img_write(image,(char *)(image->tmpbuf),cnt) != cnt)
-		    return -1;
-		else
-		    return image->xsize;
-		/* NOTREACHED */
-
-	    case 2: 
-		min = image->min;
-		max = image->max;
-		sptr = buffer;
-		for(x=image->xsize; x--;) { 
-		    if (*sptr > max) max = *sptr;
-		    if (*sptr < min) min = *sptr;
-		    sptr++;
-		}
-		image->min = min;
-		image->max = max;
-		cnt = img_rle_compact(buffer,2,image->tmpbuf,2,image->xsize);
-		cnt <<= 1;
-		img_setrowsize(image,cnt,y,z);
-		img_seek(image,y,z);
-		if(image->dorev)
-		    cvtshorts(image->tmpbuf,cnt);
-		if (img_write(image,(char *)(image->tmpbuf),cnt) != cnt) {
-		    if(image->dorev)
-			cvtshorts(image->tmpbuf,cnt);
-		    return -1;
-		} else {
-		    if(image->dorev)
-			cvtshorts(image->tmpbuf,cnt);
-		    return image->xsize;
-		}
-		/* NOTREACHED */
-
-	    default:
-		i_errhdlr("putrow: weird bpp\n");
-	}
-    } else 
-	i_errhdlr("putrow: weird image type\n");
-    return(-1);
-}
-
-static int getrow(IMAGE *image, unsigned short *buffer,
-		unsigned int y, unsigned int z)
-{
-    register short i;
-    register unsigned char *cptr;
-    register unsigned short *sptr;
-    register short cnt; 
-
-    if( !(image->flags & (_IORW|_IOREAD)) )
-	return -1;
-    if(image->dim<3)
-	z = 0;
-    if(image->dim<2)
-	y = 0;
-    img_seek(image, y, z);
-    if(ISUNCOMPRESSED(image->type)) {
-	switch(BPP(image->type)) {
-	    case 1: 
-		if (img_read(image,(char *)image->tmpbuf,image->xsize) 
-							    != image->xsize)
-		    return -1;
-		else {
-		    cptr = (unsigned char *)image->tmpbuf;
-		    sptr = buffer;
-		    for(i=image->xsize; i--;)
-			*sptr++ = *cptr++;
-		}
-		return image->xsize;
-		/* NOTREACHED */
-
-	    case 2: 
-		cnt = image->xsize<<1; 
-		if (img_read(image,(char *)(buffer),cnt) != cnt)
-		    return -1;
-		else {
-		    if(image->dorev)
-			cvtshorts(buffer,cnt);
-		    return image->xsize;
-		}
-		/* NOTREACHED */
-
-	    default:
-		i_errhdlr("getrow: weird bpp\n");
-		break;
-	}
-    } else if(ISRLE(image->type)) {
-	switch(BPP(image->type)) {
-	    case 1: 
-		if( (cnt = img_getrowsize(image)) == -1 )
-		    return -1;
-		if( img_read(image,(char *)(image->tmpbuf),cnt) != cnt )
-		    return -1;
-		else {
-		    img_rle_expand(image->tmpbuf,1,buffer,2);
-		    return image->xsize;
-		}
-		/* NOTREACHED */
-
-	    case 2: 
-		if( (cnt = img_getrowsize(image)) == -1 )
-		    return -1;
-		if( cnt != img_read(image,(char *)(image->tmpbuf),cnt) )
-		    return -1;
-		else {
-		    if(image->dorev)
-			cvtshorts(image->tmpbuf,cnt);
-		    img_rle_expand(image->tmpbuf,2,buffer,2);
-		    return image->xsize;
-		}
-		/* NOTREACHED */
-
-	    default:
-		i_errhdlr("getrow: weird bpp\n");
-		break;
-	}
-    } else 
-	i_errhdlr("getrow: weird image type\n");
-    return -1;
-}
-
-/* End of original SGI image code */
-
-/* Structure to hold information about the SGI file being processed. */
-typedef struct {
-    IMAGE th;
-    UByte *red,		/* Pointers to step through scanlines */
-	  *green,
-	  *blue,
-	  *matte;
-    UByte *redScan,	/* Buffer for one scanline: Red   channel */
-	  *greenScan,	/* Buffer for one scanline: Green channel */
-	  *blueScan,	/* Buffer for one scanline: Blue  channel */
-	  *matteScan;	/* Buffer for one scanline: Matte channel */
-    UByte *scanline;
-    unsigned short *pixbuf;
-} SGIFILE;
-
-/* This function determines at runtime, whether we have to switch bytes.
-   The SGI image format expects data to be in big-endian format. */
- 
-static int isIntel (void)
-{
-    char order[] = { 1, 2, 3, 4};
-    unsigned long val = (unsigned long)*((short *)order);
-    /* On Intel (little-endian) systems this value is equal to 513.
-       On big-endian systems this value equals 258. */
-    return (val == 513);
-}
-
-static void sgiClose (SGIFILE *tf)
-{
-    if (tf->redScan)   ckfree ((char *)tf->redScan);
-    if (tf->greenScan) ckfree ((char *)tf->greenScan);
-    if (tf->blueScan)  ckfree ((char *)tf->blueScan);
-    if (tf->matteScan) ckfree ((char *)tf->matteScan);
-    if (tf->pixbuf)    ckfree ((char *)tf->pixbuf);
-    return;
-}
-
-#define OUT Tcl_WriteChars (outChan, str, -1)
-static void printImgInfo (IMAGE *th, CONST char *filename, CONST char *msg)
-{
-    Tcl_Channel outChan;
-    char str[256];
-
-    outChan = Tcl_GetStdChannel (TCL_STDOUT);
-    if (!outChan) {
-        return;
-    }
-    sprintf (str, "%s %s\n", msg, filename);                                      OUT;
-    sprintf (str, "\tSize in pixel      : %d x %d\n", th->xsize, th->ysize);      OUT;
-    sprintf (str, "\tNo. of channels    : %d\n", (th->zsize));                    OUT;
-    sprintf (str, "\tBytes per pixel    : %d\n", BPP(th->type));                  OUT;
-    sprintf (str, "\tCompression        : %s\n", ISRLE(th->type)? "RLE": "None"); OUT;
-    Tcl_Flush (outChan);
-}
-#undef OUT
-static Boln readHeader (tkimg_MFile *handle, IMAGE *th)
-{
-    if (sizeof (IMAGE) != tkimg_Read (handle, (char *)th, sizeof(IMAGE))) {
-	return FALSE;
-    }
-										    if( ((th->imagic>>8) | ((th->imagic&0xff)<<8)) == IMAGIC ) {
-	th->dorev = 1;
-	cvtimage((long *)th);
-    } else {
-	th->dorev = 0;
-    }
-    if (th->imagic != IMAGIC) {
-	return FALSE;
-    }
-
-    return TRUE;
-}
-
-static Boln writeHeader (tkimg_MFile *handle, IMAGE *th, UInt type, UInt dim,
-                         UInt xsize, UInt ysize, UInt zsize)
-{
-    if (!imgOpenWrite ((MYCHANNEL)handle->data, th, "w",
-                       type, dim, xsize, ysize, zsize))
-	return FALSE;
-    return TRUE;
-}
-
-static Boln readChannel (SGIFILE *tf, UByte *dest, Int sgichn, Int nchan,
-			 Int y, Int n)
-{
-    unsigned short *src = tf->pixbuf;
-    unsigned short *stop = src + n;
-
-    if (-1 == getrow (&tf->th, tf->pixbuf, y, sgichn))
-	return FALSE;
-
-    dest += sgichn;
-    switch (BPP(tf->th.type)) {
-	case 1:	{	/* 8-bit pixel values */
-	    while (src < stop) {
-		*dest = *(src++);
-		dest += nchan;
-	    }
-	    break;
-	}
-	case 2: {	/* 16-bit values will be linearly mapped to 8-bit. */
-	    while (src < stop) {
-		*dest = *(src++) >> 8;
-		dest += nchan;
-	    }
-	    break;
-	}
-    }
-    return TRUE;
-}
-
-static Boln sgiReadScan (Tcl_Interp *interp, tkimg_MFile *handle,
-                         SGIFILE *tf, Int y)
-{
-    Int nchan;
-
-    nchan = tf->th.zsize;
-
-    /* Read 1. channel: This is either the red or brightness channel. */
-    if (!readChannel (tf, tf->scanline, 0, nchan, y, tf->th.xsize)) {
-        return FALSE;
-    }
-
-    if ( nchan >= 3) {
-	/* This is either a RGB or RGBA image. Read green and blue channels. */
-        if (!readChannel (tf, tf->scanline, 1, nchan, y, tf->th.xsize) ||
-	    !readChannel (tf, tf->scanline, 2, nchan, y, tf->th.xsize))
-	    return FALSE;
-    }
-    if (nchan > 3 || nchan == 2) {
-        /* If nchan is 2, we have a brightness-alpha image, if nchan is 4, we
-           have RGBA. */
-        if (!readChannel (tf, tf->scanline, nchan == 2? 1: 3, nchan, 
-                          y, tf->th.xsize))
-            return FALSE; 
-    }
-    return TRUE;
-}
-
-static Boln writeChannel (SGIFILE *tf, UByte *src, Int sgichn, Int y, Int n)
-{
-    unsigned short *dest = tf->pixbuf;
-    UByte *stop = src + n;
-
-    while (src < stop)
-	*(dest++) = *(src++);
-
-    if (-1 == putrow (&tf->th, tf->pixbuf, y, sgichn))
-	return FALSE;
-
-    return TRUE;
-}
-
-static Boln sgiWriteScan (Tcl_Interp *interp, tkimg_MFile *handle,
-                          SGIFILE *tf, Int y)
-{
-    if (!writeChannel (tf, tf->redScan,   0, y, tf->th.xsize) ||
-        !writeChannel (tf, tf->greenScan, 1, y, tf->th.xsize) ||
-        !writeChannel (tf, tf->blueScan,  2, y, tf->th.xsize))
-        return FALSE;
-
-    if (tf->th.zsize > 3)
-        if (!writeChannel (tf, tf->matteScan, 3, y, tf->th.xsize))
-            return FALSE; 
-    return TRUE;
-}
-
-/* 
- * Here is the start of the standard functions needed for every image format.
- */
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int   ParseFormatOpts _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-                 int *comp, int *verb, int *matte));
-static int   CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	         int *heightPtr, IMAGE *sgiHeaderPtr));
-static int   CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-                 CONST char *filename, Tcl_Obj *format,
-	         Tk_PhotoHandle imageHandle, int destX, int destY,
-                 int width, int height, int srcX, int srcY));
-static int   CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, 
-                 CONST char *filename, Tcl_Obj *format,
-	         tkimg_MFile *handle, Tk_PhotoImageBlock *blockPtr));
-
-static int ParseFormatOpts (interp, format, comp, verb, matte)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    int *comp;
-    int *verb;
-    int *matte;
-{
-    static char *sgiOptions[] = {"-compression", "-verbose", "-matte"};
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *compression, *verbose, *transp;
-
-    *comp  = 1;
-    *verb  = 0;
-    *matte = 1;
-
-    if (tkimg_ListObjGetElements (interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	compression = "rle";
-	verbose     = "0";
-	transp      = "1";
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj (interp, objv[i], sgiOptions,
-		    "format option", 0, &index) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult (interp, "No value for option \"",
-			Tcl_GetStringFromObj (objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    compression = Tcl_GetStringFromObj(objv[i], (int *) NULL);
-		    break;
-		case 1:
-		    verbose = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-		case 2:
-		    transp = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-	    }
-	}
-
-	c = compression[0]; length = strlen (compression);
-	if ((c == 'n') && (!strncmp (compression, "none", length))) {
-	    *comp = ITYPE_UNCOMPRESSED;
-	} else if ((c == 'r') && (!strncmp (compression, "rle",length))) {
-	    *comp = ITYPE_RLE;
-	} else {
-	    Tcl_AppendResult (interp, "invalid compression mode \"",
-		    compression, "\": should be rle or none", (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-	c = verbose[0]; length = strlen (verbose);
-	if (!strncmp (verbose, "1", length) || \
-	    !strncmp (verbose, "true", length) || \
-	    !strncmp (verbose, "on", length)) {
-	    *verb = 1;
-	} else if (!strncmp (verbose, "0", length) || \
-	    !strncmp (verbose, "false", length) || \
-	    !strncmp (verbose, "off", length)) {
-	    *verb = 0;
-	} else {
-	    Tcl_AppendResult (interp, "invalid verbose mode \"", verbose, 
-                              "\": should be 1 or 0, on or off, true or false",
-			      (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-	c = transp[0]; length = strlen (transp);
-	if (!strncmp (transp, "1", length) || \
-	    !strncmp (transp, "true", length) || \
-	    !strncmp (transp, "on", length)) {
-	    *matte = 1;
-	} else if (!strncmp (transp, "0", length) || \
-	    !strncmp (transp, "false", length) || \
-	    !strncmp (transp, "off", length)) {
-	    *matte = 0;
-	} else {
-	    Tcl_AppendResult (interp, "invalid alpha (matte) mode \"", verbose, 
-                              "\": should be 1 or 0, on or off, true or false",
-			      (char *) NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int ChnMatch (interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
- 
-    tkimg_FixChanMatchProc (&interp, &chan, &filename, &format,
-			 &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc (&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, '\001', &handle)) {
-        return 0;
-    }
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, sgiHeaderPtr)
-    tkimg_MFile *handle;
-    int *widthPtr;
-    int *heightPtr;
-    IMAGE *sgiHeaderPtr;
-{
-    IMAGE th;
-
-    if (!sgiHeaderPtr) {
-	if (!readHeader (handle, &th))
-	    return 0;
-    } else {
-	if (!imgOpenRead ((MYCHANNEL)handle->data, &th, "r"))
-	    return 0;
-    }
-
-    if (th.xsize <= 0 || th.ysize <= 0)
-	return 0;
-
-    *widthPtr  = th.xsize;
-    *heightPtr = th.ysize;
-    if (sgiHeaderPtr)
-	*sgiHeaderPtr = th;
-    return 1;
-}
-
-static int ChnRead (interp, chan, filename, format, imageHandle,
-	               destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format,
-                       imageHandle, destX, destY,
-		       width, height, srcX, srcY);
-}
-
-#define BUFLEN 2048
-
-static int ObjRead (interp, data, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-    char tempFileName[256];
-    char buffer[BUFLEN];
-    MYCHANNEL outchan;
-    Tcl_Channel inchan;
-    int count, retVal;
-
-    tkimg_ReadInit (data, '\001', &handle);
-
-    tmpnam(tempFileName);
-#if defined (TCLSEEK_WORKAROUND)
-    outchan = fopen (tempFileName, "wb");
-#else
-    outchan = tkimg_OpenFileChannel (interp, tempFileName, 0644);
-#endif
-    if (!outchan) {
-	return TCL_ERROR;
-    }
-
-    count = tkimg_Read (&handle, buffer, BUFLEN);
-    while (count == BUFLEN) {
-	Tcl_Write (outchan, buffer, count);
-	count = tkimg_Read (&handle, buffer, BUFLEN);
-    }
-    if (count>0) {
-	Tcl_Write (outchan, buffer, count);
-    }
-    if (MYCLOSE (interp, outchan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-
-    inchan = tkimg_OpenFileChannel (interp, tempFileName, 0);
-    if (!inchan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) inchan;
-    handle.state = IMG_CHAN;
-
-    retVal = CommonRead (interp, &handle, tempFileName, format, imageHandle,
-                            destX, destY, width, height, srcX, srcY);
-    if (Tcl_Close (interp, inchan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    remove (tempFileName);
-    return retVal;
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int CommonRead (interp, handle, filename, format, imageHandle,
-                       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;        /* The image file, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-                                 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-                                 * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-                                 * in image being read. */
-{
-    myblock bl;
-    Int y, nchan;
-    int fileWidth, fileHeight;
-    int stopY, outY, outWidth, outHeight;
-    SGIFILE tf;
-    int compr, verbose, matte;
-
-    memset (&tf, 0, sizeof (SGIFILE));
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    CommonMatch (handle, &fileWidth, &fileHeight, &tf.th);
-    if (verbose)
-	printImgInfo (&tf.th, filename, "Reading image:");
-
-    if ((srcX + width) > fileWidth) {
-	outWidth = fileWidth - srcX;
-    } else {
-	outWidth = width;
-    }
-    if ((srcY + height) > fileHeight) {
-	outHeight = fileHeight - srcY;
-    } else {
-	outHeight = height;
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    nchan = tf.th.zsize;
-
-    tf.pixbuf   = (UShort *) ckalloc (fileWidth * nchan * sizeof (UShort));
-    tf.scanline = (UByte  *) ckalloc (fileWidth * nchan);
-
-    block.pixelSize = nchan;
-    block.pitch = fileWidth * nchan;
-    block.width = outWidth;
-    block.height = 1;
-    switch (nchan) {
-	case 1: /* Brightness */
-	case 2: /* Brightness + Matte */
-	    block.offset[0] = 0;
-	    block.offset[1] = 0;
-	    block.offset[2] = 0;
-	    block.offset[3] = matte? 1: 0;
-	    break;
-	case 3: /* RGB */
-	case 4: /* RGB + Matte */
-	    block.offset[0] = 0;
-	    block.offset[1] = 1;
-	    block.offset[2] = 2;
-	    block.offset[3] = matte? 3: 0;
-	    break;
-	default:
-	    printf ("Invalid number of channels: %d\n", nchan);
-	    return TCL_ERROR;
-	    break;
-    }
-    block.pixelPtr = tf.scanline + srcX * nchan;
-
-    stopY = srcY + outHeight;
-    outY = destY;
-
-    for (y=0; y<stopY; y++) {
-	sgiReadScan (interp, handle, &tf, fileHeight-1-y);
-	if (y >= srcY) {
-	    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, outY, outWidth, 1);
-	    outY++;
-	}
-    }
-    sgiClose (&tf);
-    return TCL_OK ;
-}
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    MYCHANNEL chan;
-    tkimg_MFile handle;
-    int result;
-
-#if defined (TCLSEEK_WORKAROUND)
-    chan = fopen (filename, "wb");
-#else
-    chan = tkimg_OpenFileChannel (interp, filename, 0644);
-#endif
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, filename, format, &handle, blockPtr);
-    if (MYCLOSE(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-    Tcl_Channel inchan;
-    MYCHANNEL outchan;
-    char tempFileName[256];
-    char buffer[BUFLEN];
-    int count;
-
-    tkimg_FixStringWriteProc (&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tmpnam(tempFileName);
-#if defined (TCLSEEK_WORKAROUND)
-    outchan = fopen (tempFileName, "wb");
-#else
-    outchan = tkimg_OpenFileChannel (interp, tempFileName, 0644);
-#endif
-    if (!outchan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) outchan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, tempFileName, format, &handle, blockPtr);
-    if (MYCLOSE (interp, outchan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-
-    tkimg_WriteInit(dataPtr, &handle);
-
-    inchan = tkimg_OpenFileChannel (interp, tempFileName, 0);
-    if (!inchan) {
-	return TCL_ERROR;
-    }
-
-    count = Tcl_Read (inchan, buffer, BUFLEN);
-    while (count == BUFLEN) {
-	tkimg_Write (&handle, buffer, count);
-	count = Tcl_Read (inchan, buffer, BUFLEN);
-    }
-    if (count>0) {
-	tkimg_Write (&handle, buffer, count);
-    }
-    if (Tcl_Close (interp, inchan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    remove (tempFileName);
-    tkimg_Putc (IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult (interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, filename, format, handle, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Int     x, y, bpp, nchan;
-    Int     redOffset, greenOffset, blueOffset, alphaOffset;
-    UByte   *pixelPtr, *rowPixPtr;
-    SGIFILE tf;
-    int compr, verbose, matte; /* Format options */
-
-    memset (&tf, 0, sizeof (SGIFILE));
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    bpp = 1;
-
-    redOffset   = 0;
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset  = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-
-    if (alphaOffset < blockPtr->offset[2]) {
-	alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-    nchan = ((matte && alphaOffset)? 4: 3);
-
-    tf.redScan   = (UByte *)  ckalloc (blockPtr->width);
-    tf.greenScan = (UByte *)  ckalloc (blockPtr->width);
-    tf.blueScan  = (UByte *)  ckalloc (blockPtr->width);
-    tf.matteScan = (UByte *)  ckalloc (blockPtr->width);
-    tf.pixbuf    = (UShort *) ckalloc (blockPtr->width * sizeof (UShort));
-    tf.th.imagic = IMAGIC;
-    tf.th.dorev  = isIntel();
-
-    if (!writeHeader (handle, &tf.th,
-                      compr? RLE(bpp): UNCOMPRESSED(bpp),
-                      nchan, blockPtr->width, blockPtr->height, nchan)) {
-	return TCL_ERROR;
-    }
-
-    rowPixPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    for (y = blockPtr->height -1; y >=0; y--) {
-	tf.red = tf.redScan;
-	tf.green = tf.greenScan;
-	tf.blue = tf.blueScan;
-	tf.matte = tf.matteScan;
-	pixelPtr = rowPixPtr;
-	for (x = 0; x < blockPtr->width; x++) {
-	    *(tf.red++)   = pixelPtr[redOffset];
-	    *(tf.green++) = pixelPtr[greenOffset];
-	    *(tf.blue++)  = pixelPtr[blueOffset];
-	    if (nchan == 4) {	
-                /* Have a matte channel and write it. */
-		*(tf.matte++) = pixelPtr[alphaOffset];
-	    }
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (!sgiWriteScan (interp, handle, &tf, y)) {
-	    sgiClose (&tf);
-	    return TCL_ERROR;
-	}
-	rowPixPtr += blockPtr->pitch;
-    }
-    if (verbose)
-        printImgInfo (&tf.th, filename, "Saving image:");
-
-    iclose (&tf.th);
-    sgiClose (&tf);
-    return TCL_OK;
-}
diff --git a/tkimg1.3/sgi/tests/all.tcl b/tkimg1.3/sgi/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/sgi/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/sgi/tests/folder.rgb b/tkimg1.3/sgi/tests/folder.rgb
deleted file mode 100644
index 1324216..0000000
Binary files a/tkimg1.3/sgi/tests/folder.rgb and /dev/null differ
diff --git a/tkimg1.3/sgi/tests/sgi.test b/tkimg1.3/sgi/tests/sgi.test
deleted file mode 100644
index cc04ee1..0000000
--- a/tkimg1.3/sgi/tests/sgi.test
+++ /dev/null
@@ -1,63 +0,0 @@
-# This file is a Tcl script to test out SGI reading and writing.
-# It is organized in the standard fasion for Tcl tests.
-#
-
-puts "img::sgi [package require img::sgi]"
-
-set sgidata \
-{AdoBAQADABAADAADAAAAAAAAAP8AAAAAbm8gbmFtZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-4FASCAEAAQAAAAAAAgAAAAAAAAAAAAAAOBkSCAAAAABPBAAACBgSCKAYEggAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAEJQAABAoAAAPvAAAD1AAAA7kAAAOe
-AAADgwAAA3QAAANWAAADNQAAAyAAAARFAAAELgAABBMAAAP4AAAD3QAAA8IAAAOnAAADjAAA
-A3kAAANgAAADQAAAAycAAARKAAAENwAABBwAAAQBAAAD5gAAA8sAAAOwAAADlQAAA34AAANq
-AAADSwAAAy4AAAAFAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAA
-AAcAAAAFAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAAAAcAAAAF
-AAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAAAAcD2QQACdkAA9kE
-AAnZAAPZBAAJ2QCD2dkABPCBAAjZAIPZ2QAE/4EACNkAg9nZAASAgQAI2QCC2QAG8IEAB9kA
-gtkABv+BAAfZAILZAAaAgQAH2QANAAPZAA0AA9kADQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCB
-AAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCB
-AAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCB
-AAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QCBAAvwgQAD2QCBAAv/gQAD2QCB
-AAuAgQAD2QANAAPZAA0AA9kADQAD2QA=}
-
-test sgi-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.rgb]
-    i data -format sgi
-} $sgidata
-test sgi-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $sgidata
-    set data [i data -format sgi]
-} $sgidata
-test sgi-1.3 {} {
-    i blank
-    i put $data
-    set data [i data -format sgi]
-} $sgidata
-test sgi-1.4 {} {
-    i blank
-    i put $data -format sgi
-    set data [i data -format sgi]
-} $sgidata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-
-test sgi-2.0 {Binary I/O with SGI images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.rgb] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/sun/ChangeLog b/tkimg1.3/sun/ChangeLog
deleted file mode 100644
index b8e7042..0000000
--- a/tkimg1.3/sun/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/sun: SUN photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/sun/Makefile.in b/tkimg1.3/sun/Makefile.in
deleted file mode 100644
index 55fff31..0000000
--- a/tkimg1.3/sun/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgsun TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgsun_SOURCES	=	\
-		sun.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgsun_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgsun_OBJECTS	= $(tkimgsun_SOURCES:.c=. at OBJEXT@)
-tkimgsun_LIB_FILE	= @tkimgsun_LIB_FILE@
-
-## tkimgsunstub_OBJECTS	= tkimgsunStubLib.$(OBJEXT)
-## tkimgsunstub_LIB_FILE= @tkimgsunstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgsun_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgsun_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgsun.$(OBJEXT): $(srcdir)/generic/tkimgsun.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgsun.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgsun/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgsunConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgsun.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgsun_DECLS = \
-	$(srcdir)/tkimgsun.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgsun_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgsun_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/sun/aclocal.m4 b/tkimg1.3/sun/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/sun/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/sun/configure b/tkimg1.3/sun/configure
deleted file mode 100755
index dc202db..0000000
--- a/tkimg1.3/sun/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgsun', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./sun.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgsun
-DPACKAGE="img::sun"
-PHIMGTYPE="sun"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGSUN_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgsunstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGSUN_VERSION "${TKIMGSUN_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgsun in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgsun 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGSUN_VERSION@%$TKIMGSUN_VERSION%g
-s%@tkimgsun_LIB_FILE@%$tkimgsun_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/sun/configure.in b/tkimg1.3/sun/configure.in
deleted file mode 100644
index 0a4d174..0000000
--- a/tkimg1.3/sun/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgsun', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./sun.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgsun
-DPACKAGE="img::sun"
-PHIMGTYPE="sun"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGSUN_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGSUN_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgsun_LIB_FILE)
-#AC_SUBST(tkimgsunstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGSUN_VERSION, "${TKIMGSUN_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgsun in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgsun)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/sun/pkgIndex.tcl.in b/tkimg1.3/sun/pkgIndex.tcl.in
deleted file mode 100644
index 73425e6..0000000
--- a/tkimg1.3/sun/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgsun_LIB_FILE@]]
diff --git a/tkimg1.3/sun/readme b/tkimg1.3/sun/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/sun/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/sun/sun.c b/tkimg1.3/sun/sun.c
deleted file mode 100644
index b358409..0000000
--- a/tkimg1.3/sun/sun.c
+++ /dev/null
@@ -1,1293 +0,0 @@
-/* STARTHEADER
- *
- * File :       sun.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Mon Jan 22 21:32:48 CET 2001
- *
- * Copyright :  (C) 2001-2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for SUN's Raster file format.
- *
- * The following image types are supported:
- *
- *  1-bit pixels: Black and White.
- *  8-bit pixels: Grayscale or indexed.
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- * 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- *  1-bit | Yes   | Yes   | No    | No    |
- *  8-bit | Yes   | Yes   | No    | No    |
- * 24-bit | Yes   | Yes   | Yes   | Yes   |
- * 32-bit | Yes   | Yes   | Yes   | Yes   |
- *
- * All images types may be either uncompressed or run-length encoded.
- *
- *
- * The following format options are available:
- *
- * Read  SUN image: "sun -matte <bool> -verbose <bool>"
- * Write SUN image: "sun -matte <bool> -verbose <bool> -compression <type>"
- *
- * -matte <bool>:       If set to false, a matte (alpha) channel is ignored 
- *                      during reading or writing. Default is true.
- * -verbose <bool>:     If set to true, additional information about the file
- *                      format is printed to stdout. Default is false.
- * -compression <type>: Set the compression mode to either "none" or "rle".
- * 			Default is "rle".
- *
- * Notes: 
- *
- * - The "UNIX" encoding of SUN's "imagetool" is not supported.
- *
- * - Part of this code was taken from the "sunras" GIMP plugin:
- *
- *  >> The GIMP -- an image manipulation program
- *  >> Copyright (C) 1995 Spencer Kimball and Peter Mattis
- *  >> SUN raster reading and writing code Copyright (C) 1996 Peter Kirchgessner
- *  >> (email: pkirchg at aol.com, WWW: http://members.aol.com/pkirchg)
- *
- * ENDHEADER
- *
- * $Id: sun.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* #define DEBUG_LOCAL */
-
-/* Some defines and typedefs. */
-#define TRUE  1
-#define FALSE 0
-typedef unsigned char  Boln;	/* Boolean value: TRUE or FALSE */
-typedef char           Byte;	/* Signed    8 bit integer */
-typedef unsigned char  UByte;	/* Unsigned  8 bit integer */
-typedef unsigned short UShort;	/* Unsigned 16 bit integer */
-typedef unsigned int   UInt;	/* Unsigned 32 bit integer */
-
-/* SunRaster magic number */
-#define RAS_MAGIC 0x59a66a95
-
-/* Supported SunRaster types */
-#define RAS_TYPE_STD 1    /* Standard uncompressed format */
-#define RAS_TYPE_RLE 2    /* Runlength compression format */
-
-/* The SunRaster header structure */
-typedef struct {
-  UInt ras_magic;    /* Magic Number */
-  UInt ras_width;    /* Width */
-  UInt ras_height;   /* Height */
-  UInt ras_depth;    /* Number of bits per pixel (1,8,24,32) */
-  UInt ras_length;   /* Length of image data (but may also be 0) */
-  UInt ras_type;     /* Encoding */
-  UInt ras_maptype;  /* Type of colormap */
-  UInt ras_maplength;/* Number of bytes for colormap */
-} SUNHEADER;
-
-/* Buffer for run-length encoding and decoding. */
-typedef struct {
-    int val;   /* The value that is to be repeated */
-    int n;     /* How many times it is repeated */
-} RLEBUF;
-
-/* Forward declarations of static functions. */
-static void byte2bit (UByte *byteline, int width, UByte *bitline, int invert);
-
-static void rle_startread (tkimg_MFile *ifp);
-static int rle_fread (char *ptr, int sz, int nelem, tkimg_MFile *ifp);
-static int sun_fread (char *ptr, int sz, int nelem, tkimg_MFile *ifp);
-static int rle_fgetc (tkimg_MFile *ifp);
-static int sun_getc (tkimg_MFile *ifp);
-#define rle_getc(fp) ((rlebuf.n > 0) ? (rlebuf.n)--,rlebuf.val : rle_fgetc (fp))
-
-static void rle_startwrite (tkimg_MFile *ofp);
-static int rle_fwrite (char *ptr, int sz, int nelem, tkimg_MFile *ofp);
-static int rle_fputc (int val, tkimg_MFile *ofp);
-static int rle_putrun (int n, int val, tkimg_MFile *ofp);
-static void rle_endwrite (tkimg_MFile *ofp);
-
-static Boln read_sun_header  (tkimg_MFile *ifp, SUNHEADER *sunhdr);
-static Boln write_sun_header (tkimg_MFile *ofp, SUNHEADER *sunhdr);
-static Boln read_sun_cols  (tkimg_MFile *ifp, SUNHEADER *sunhdr, UByte *colormap);
-static Boln write_sun_cols (tkimg_MFile *ofp, SUNHEADER *sunhdr, UByte *colormap);
-
-static RLEBUF 
-	rlebuf;
-
-/* OPA TODO: Change from ANSI-C arguments to _ANSI_ARGS_ macro. */
-
-#if defined (DEBUG_LOCAL)
-static Boln readUByte (tkimg_MFile *handle, UByte *b)
-{
-    char buf[1];
-    if (1 != tkimg_Read (handle, buf, 1))
-        return FALSE;
-    *b = buf[0];
-    return TRUE;
-}
-#else
-    /* Use this macro for better performance, esp. when reading RLE files. */
-    #define readUByte(h,b) (1 == tkimg_Read((h),(b),1))
-#endif
-
-static Boln writeUByte (tkimg_MFile *handle, UByte b)
-{
-    UByte buf[1];
-    buf[0] = b;
-    if (1 != tkimg_Write (handle, (CONST char *)buf, 1))
-        return FALSE;
-    return TRUE;
-}
-
-static Boln readUInt (tkimg_MFile *ifp, UInt *i)
-{
-    UByte buf[4];
-    UInt  c;
-
-    if (4 != tkimg_Read (ifp, (char *)buf, 4)) {
-	return FALSE;
-    }
-
-    c  = (((UInt)(buf[0])) << 24);
-    c |= (((UInt)(buf[1])) << 16);
-    c |= (((UInt)(buf[2])) << 8);
-    c |=  ((UInt)(buf[3]));
-    *i = c;
-    return TRUE;
-}
-
-static Boln writeUInt (tkimg_MFile *ofp, UInt c)
-{
-    UByte buf[4];
-
-    buf[0] = (c >> 24) & 0xff;
-    buf[1] = (c >> 16) & 0xff;
-    buf[2] = (c >>  8) & 0xff;
-    buf[3] = (c      ) & 0xff;
-    if (4 != tkimg_Write (ofp, (CONST char *)buf, 4)) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-/* Convert n bytes of 0/1 to a line of bits */
-static void byte2bit (UByte *byteline, int width,
-                      UByte *bitline, int invert)
-{
-    UByte bitval;
-    UByte rest[8];
-
-    while (width >= 8) {
-	bitval = 0;
-        if (*(byteline++)) bitval |= 0x80;
-        if (*(byteline++)) bitval |= 0x40;
-        if (*(byteline++)) bitval |= 0x20;
-        if (*(byteline++)) bitval |= 0x10;
-        if (*(byteline++)) bitval |= 0x08;
-        if (*(byteline++)) bitval |= 0x04;
-        if (*(byteline++)) bitval |= 0x02;
-        if (*(byteline++)) bitval |= 0x01;
-        *(bitline++) = invert ? ~bitval : bitval;
-        width -= 8;
-    }
-    if (width > 0) {
-       memset (rest, 0, 8);
-       memcpy (rest, byteline, width);
-       bitval = 0;
-       byteline = rest;
-       if (*(byteline++)) bitval |= 0x80;
-       if (*(byteline++)) bitval |= 0x40;
-       if (*(byteline++)) bitval |= 0x20;
-       if (*(byteline++)) bitval |= 0x10;
-       if (*(byteline++)) bitval |= 0x08;
-       if (*(byteline++)) bitval |= 0x04;
-       if (*(byteline++)) bitval |= 0x02;
-       *bitline = invert ? ~bitval : bitval;
-    }
-}
-
-/* Start reading Runlength Encoded Data */
-static void rle_startread (tkimg_MFile *ifp)
-{
-    (void) ifp;
-    rlebuf.val = rlebuf.n = 0;
-}
-
-/* Read pixels from RLE-stream */
-static int rle_fread (char *ptr, int sz, int nelem, tkimg_MFile *ifp)
-{
-    int elem_read, cnt, val, err = 0;
-
-    for (elem_read = 0; elem_read < nelem; elem_read++)
-    {
-        for (cnt = 0; cnt < sz; cnt++)
-	{
-	    val = rle_getc (ifp);
-	    if (val < 0) {
-                err = 1;
-                break; 
-	    }
-	    *(ptr++) = (char)val;
-        }
-        if (err)
-	    break;
-    }
-    return elem_read;
-}
-
-/* Read uncompressed pixels from input stream "ifp" */
-static int sun_fread (char *ptr, int sz, int nelem, tkimg_MFile *ifp)
-{
-    if (nelem*sz != tkimg_Read (ifp, ptr, nelem*sz)) {
-	return -1;
-    }
-    return nelem;
-}
-
-/* Get one pixel from RLE-stream */
-static int rle_fgetc (tkimg_MFile *ifp)
-{ 
-    UByte flag, runcnt, runval;
-
-    if (rlebuf.n > 0)    /* Something in the buffer ? */
-    {
-       (rlebuf.n)--;
-       return rlebuf.val;
-    }
-
-    /* Nothing in the buffer. We have to read something */
-    if (!readUByte (ifp, &flag))
-	return -1;
-    if (flag != 0x80) return flag;    /* Single byte run ? */
-
-    if (!readUByte (ifp, &runcnt))
-	return -1;
-    if (runcnt == 0) return (0x80);     /* Single 0x80 ? */
-
-    /* The run */
-    if (!readUByte (ifp, &runval)) 
-	return -1;
-    rlebuf.n = runcnt;
-    rlebuf.val = runval;
-    return runval;
-}
-
-/* Read one byte from input stream "ifp" */
-static int sun_getc (tkimg_MFile *ifp)
-{ 
-    UByte val;
-    if (!readUByte (ifp, &val))
-	return -1;
-    return val;
-}
-
-/* Start writing Runlength Encoded Data */
-static void rle_startwrite (tkimg_MFile *ofp)
-{
-    (void) ofp;
-    rlebuf.val = 0;
-    rlebuf.n   = 0;
-}
-
-/* Write uncompressed elements to RLE-stream */
-static int rle_fwrite (char *ptr, int sz, int nelem, tkimg_MFile *ofp)
-{
-    int elem_write, cnt, val, err = 0;
-    UByte *pixels = (UByte *)ptr;
-
-    for (elem_write = 0; elem_write < nelem; elem_write++) {
-	for (cnt = 0; cnt < sz; cnt++) {
-	    val = rle_fputc (*(pixels++), ofp);
-	    if (val < 0) {
-		err = 1;
-		break; 
-	    }
-        }
-        if (err) 
-	    break;
-    }
-    return elem_write;
-}
-
-/* Write uncompressed character to RLE-stream */
-static int rle_fputc (int val, tkimg_MFile *ofp)
-{
-    int retval;
-
-    if (rlebuf.n == 0) {   /* Nothing in the buffer ? Save the value */
-	rlebuf.n   = 1;
-	rlebuf.val = val;
-	return val;
-    }
-
-    /* Something in the buffer */
-    if (rlebuf.val == val) {   /* Same value in the buffer ? */
-	rlebuf.n++;
-	if (rlebuf.n == 257) { /* Can not be encoded in a single run ? */
-	    retval = rle_putrun (256, rlebuf.val, ofp);
-	    if (retval < 0)
-                return retval;
-	    rlebuf.n -= 256;
-	}
-	return val;
-    }
-
-    /* Something different in the buffer ? Write out the run */
-    retval = rle_putrun (rlebuf.n, rlebuf.val, ofp);
-    if (retval < 0) 
-        return retval;
-
-    /* Save the new value */
-    rlebuf.n = 1;
-    return (rlebuf.val = val);
-}
-
-/* Write out a run with 0 < n < 257 */
-static int rle_putrun (int n, int val, tkimg_MFile *ofp)
-{
-    int retval = 1,
-        flag   = 0x80;
-
-    /* Useful to write a 3 byte run ? */
-    if ((n > 2) || ((n == 2) && (val == flag))) {
-	if (!writeUByte (ofp, flag) ||
-	    !writeUByte (ofp, n-1) ||
-            !writeUByte (ofp, val)) {
-	    retval = -1;
-	}
-    }
-    else if (n == 2) {
-        /* Write two single runs (could not be value 0x80) */
-	if (!writeUByte (ofp, val) || !writeUByte (ofp, val)) {
-	    retval = -1;
-	}
-    } else { 		/* Write a single run */
-	if (val == flag) {
-	    if (!writeUByte (ofp, flag) || !writeUByte (ofp, 0)) {
-		retval = -1;
-	    }
-	} else {
-	    if (!writeUByte (ofp, val)) {
-		retval = -1;
-	    }
-	}
-    }
-
-    return ((retval < 0) ? retval : val);
-}
-
-/* End writing Runlength Encoded Data */
-static void rle_endwrite (tkimg_MFile *ofp)
-{
-    if (rlebuf.n > 0) {
-	rle_putrun (rlebuf.n, rlebuf.val, ofp);
-	rlebuf.val = rlebuf.n = 0; 	/* Clear RLE-buffer */
-    }
-}
-
-#define OUT Tcl_WriteChars (outChan, str, -1)
-static void printImgInfo (SUNHEADER *sh, CONST char *filename, CONST char *msg)
-{
-    Tcl_Channel outChan;
-    char str[256];
-    UInt type = sh->ras_type;
-
-    outChan = Tcl_GetStdChannel (TCL_STDOUT);
-    if (!outChan) {
-        return;
-    }
-
-    sprintf (str, "%s %s\n", msg, filename);                                       OUT;
-    sprintf (str, "\tSize in pixel   : %d x %d\n", sh->ras_width, sh->ras_height); OUT;
-    sprintf (str, "\tDepth of pixels : %d\n", sh->ras_depth);                      OUT;
-    sprintf (str, "\tCompression     : %s\n", (type == RAS_TYPE_STD? "None":
-				              (type == RAS_TYPE_RLE? "RLE":
-					                             "Unknown"))); OUT;
-    sprintf (str, "\tColormap type   : %d\n", sh->ras_maptype);                    OUT;
-    Tcl_Flush (outChan);
-}
-#undef OUT
-
-static Boln read_sun_header (tkimg_MFile *ifp, SUNHEADER *sunhdr)
-{
-    int  i;
-    UInt *cp;
-
-    cp = (UInt *)sunhdr;
-
-    /* Read in all 32-bit values of the header and check for byte order */
-    for (i=0; i<sizeof(SUNHEADER) / sizeof(sunhdr->ras_magic); i++) {
-	if (!readUInt (ifp, cp))
-	    return FALSE;
-	cp++;
-    }
-    if (sunhdr->ras_magic != RAS_MAGIC)
-	return FALSE;
-    return TRUE;
-}
-
-/* Write out a SUN-fileheader */
-static Boln write_sun_header (tkimg_MFile *ofp, SUNHEADER *sunhdr)
-{
-    int i, hdr_entries;
-    UInt *cp;
-
-    cp = (UInt *)sunhdr;
-
-    hdr_entries = sizeof (SUNHEADER)/sizeof(sunhdr->ras_magic);
-    /* Write out all 32-bit values of the header and check for byte order */
-    for (i=0; i<hdr_entries; i++) {
-	if (!writeUInt (ofp, *(cp++))) {
-	    return FALSE;
-	}
-    }
-    return TRUE;
-}
-
-/* Read the sun colourmap */
-static Boln read_sun_cols (tkimg_MFile *ifp, SUNHEADER *sunhdr, UByte *colormap)
-{
-    int ncols;
-
-    /* Read in SUN-raster Colormap */
-    ncols = sunhdr->ras_maplength / 3;
-    if (ncols <= 0)
-	return FALSE;
-
-    if (3*ncols != tkimg_Read (ifp, (char *)colormap, 3*ncols)) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-/* Write a sun colourmap */
-static Boln write_sun_cols (tkimg_MFile *ofp, SUNHEADER *sunhdr, UByte *colormap)
-{
-    int ncols;
-
-    ncols = sunhdr->ras_maplength / 3;
-    if (3*ncols != tkimg_Write (ofp, (CONST char *)colormap, 3*ncols)) {
-	return FALSE;
-    }
-    return TRUE;
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-#define block bl.ck
-
-/* Load SUN Raster file with depth 1 */
-static Boln load_sun_d1 (Tcl_Interp *interp, tkimg_MFile *ifp, 
-                         Tk_PhotoHandle imageHandle, int destX, int destY,
-                         int width, int height, int srcX, int srcY, 
-			 int fileWidth, int fileHeight, int type)
-{
-    UByte *dest, bit2byte[256*8];
-    UByte *pixbuf;
-    myblock bl;
-    int pix8;
-    int linepad;
-    int x, y;
-    int stopY, outY;
-    int i, j;
-    int err = 0, rle;
-    char errMsg[200];
-
-    pixbuf = (UByte *) ckalloc (fileWidth);
-    if (!pixbuf) {
-	sprintf (errMsg, "Can't allocate memory of size %d", fileWidth); 
-	Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	return TCL_ERROR;
-    }
-
-    block.pixelSize = 1;
-    block.pitch     = fileWidth;
-    block.width     = width;
-    block.height    = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 0;
-    block.offset[2] = 0;
-    block.offset[3] = 0;
-    block.pixelPtr  = pixbuf + srcX;
-
-    rle = (type == RAS_TYPE_RLE);
-    linepad = ((fileWidth+7)/8) % 2; 	/* Check for 16bit align */
-
-    if (rle)
-	rle_startread (ifp);
-
-    /* Get an array for mapping 8 bits in a byte to 8 bytes */
-    dest = bit2byte;
-    for (j=0; j<256; j++) {
-	for (i=7; i>=0; i--) {
-	    *(dest++) = ((j & (1 << i)) == 0) * 255;
-	}
-    }
-
-    stopY = srcY + height;
-    outY = destY;
-
-    for (y=0; y<stopY; y++) {
-	dest = pixbuf;
-	x = fileWidth;
-	while (x >= 8) {
-	    pix8 = rle ? rle_getc (ifp) : sun_getc (ifp);
-	    if (pix8 < 0) { err = 1; pix8 = 0; }
-
-	    memcpy (dest, bit2byte + pix8*8, 8);
-	    dest += 8;
-	    x -= 8;
-	}
-
-	if (x>0) {
-	    pix8 = rle ? rle_getc (ifp) : sun_getc (ifp);
-	    if (pix8 < 0) { err = 1; pix8 = 0; }
-
-	    memcpy (dest, bit2byte + pix8*8, x);
-	    dest += x;
-	}
-
-	if (linepad)
-	    err |= ((rle ? rle_getc (ifp) : sun_getc (ifp)) < 0);
-
-	if (err) {
-	    sprintf (errMsg, "Unexpected EOF while reading scanline %d", y);
-	    Tcl_AppendResult (interp, errMsg, (char *) NULL);
-	    return FALSE;
-        }
-	if (y >= srcY) {
-	    tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-	    outY++;
-	}
-    }
-    return TRUE;
-}
-
-/* Load SUN Raster file with depth 8 */
-static Boln load_sun_d8 (Tcl_Interp *interp, tkimg_MFile *ifp,
-                         Tk_PhotoHandle imageHandle, int destX, int destY,
-                         int width, int height, int srcX, int srcY,
-                         int fileWidth, int fileHeight,
-			 int type, UByte *suncolmap, int maplength)
-{
-    UByte *dest, *indData = NULL, *src;
-    UByte *pixbuf = NULL;
-    myblock bl;
-    int linepad;
-    int x, y;
-    int stopY, outY;
-    int ncols;
-    int greyscale, nchan;
-    int err, rle;
-    char errMsg[200];
-
-    rle     = (type == RAS_TYPE_RLE);
-    linepad = fileWidth % 2;
-    ncols   = maplength / 3;
-
-    /* Check, if it's a greyscale or color indexed image. */
-    greyscale = 1;
-    nchan     = 1;
-    if ((ncols > 0) && (suncolmap != NULL)) {
-	greyscale = 0;
-	nchan     = 3;
-    }
-
-    if (!greyscale) {
-	pixbuf = (UByte *) ckalloc (fileWidth * nchan);
-	if (!pixbuf) {
-	    sprintf (errMsg, "Can't allocate memory of size %d",
-			      fileWidth * nchan); 
-	    Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	    if (suncolmap)
-		ckfree ((char *)suncolmap);
-	    return TCL_ERROR;
-	}
-    }
-
-    /* This buffer contains either the color indices or the greyscale value. */
-    indData = (UByte *)ckalloc (fileWidth * sizeof (UByte));
-    if (!indData) {
-	sprintf (errMsg, "Can't allocate memory of size %d",
-			  fileWidth * sizeof (UByte)); 
-	Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	return TCL_ERROR;
-    }
-
-    block.pixelSize = nchan;
-    block.pitch     = fileWidth * nchan;
-    block.width     = width;
-    block.height    = 1;
-    block.offset[0] = 0;
-    block.offset[1] = greyscale? 0: 1;
-    block.offset[2] = greyscale? 0: 2;
-    block.offset[3] = 0;
-    block.pixelPtr  = (greyscale?
-	              (indData + srcX * nchan):
-		      (pixbuf + srcX * nchan));
-
-    if (rle) 
-	rle_startread (ifp);  /* Initialize RLE-buffer */
-
-    stopY = srcY + height;
-    outY = destY;
-
-    for (y=0; y<stopY; y++) {
-	src  = indData;
-	memset ((char *)src, 0, fileWidth);
-	err = ((rle ? rle_fread ((char *)src, 1, fileWidth, ifp) :
-		      sun_fread ((char *)src, 1, fileWidth, ifp)) != fileWidth);
-	if (err && (y != height -1)) {
-	    sprintf (errMsg, "Unexpected EOF while reading scanline %d", y);
-	    Tcl_AppendResult (interp, errMsg, (char *) NULL);
-	    ckfree ((char *)indData);
-	    return FALSE;
-	}
-	if (linepad) {
-	    err = ((rle ? rle_getc (ifp) : sun_getc (ifp)) < 0);
-	    if (err) {
-		sprintf (errMsg, "Unexpected EOF while reading scanline %d", y);
-		Tcl_AppendResult (interp, errMsg, (char *) NULL);
-		ckfree ((char *)indData);
-		return FALSE;
-	    }
-	}
-
-	if (!greyscale) {
-	    src  = indData;
-	    dest = pixbuf;
-	    for (x=0; x<width; x++) {
-		*dest++ = suncolmap[*src];
-		*dest++ = suncolmap[*src + ncols];
-		*dest++ = suncolmap[*src + 2*ncols];
-		src++;
-	    }
-	}
-
-	if (y >= srcY) {
-	    tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-	    outY++;
-	}
-    }
-    ckfree ((char *)indData);
-    return TRUE;
-}
-
-/* Load SUN Raster file with true color image: depth = 24 or 32 */
-
-static Boln load_rgb (Tcl_Interp *interp, tkimg_MFile *ifp,
-                      Tk_PhotoHandle imageHandle, int destX, int destY,
-                      int width, int height, int srcX, int srcY,
-		      int fileWidth, int fileHeight, 
-		      int nchan, int type, int showMatte)
-{
-    UByte *dest, tmp;
-    UByte *pixbuf;
-    myblock bl;
-    int linepad;
-    int x, y;
-    int stopY, outY;
-    int err, rle;
-    char errMsg[200];
-
-    pixbuf = (UByte *) ckalloc (fileWidth * nchan);
-    if (!pixbuf) {
-	sprintf (errMsg, "Can't allocate memory of size %d",
-                          fileWidth * nchan); 
-	Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	return TCL_ERROR;
-    }
-
-    block.pixelSize = nchan;
-    block.pitch = fileWidth * nchan;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = (nchan == 4 && showMatte? 3: 0);
-
-    block.pixelPtr = pixbuf + srcX * nchan;
-
-    rle     = (type == RAS_TYPE_RLE);
-    linepad = (fileWidth*nchan) % 2;
-
-    if (rle)
-        rle_startread (ifp);  	/* Initialize RLE-buffer */
-
-    stopY = srcY + height;
-    outY  = destY;
-
-    for (y=0; y<stopY; y++) {
-	dest = pixbuf;
-	memset ((char *)dest, 0, nchan*fileWidth);
-	err = ((rle ? rle_fread ((char *)dest, nchan, fileWidth, ifp) :
-		      sun_fread ((char *)dest, nchan, fileWidth, ifp)) != fileWidth);
-	if (err && (y != height -1)) {
-	    sprintf (errMsg, "Unexpected EOF while reading scanline %d", y);
-	    Tcl_AppendResult (interp, errMsg, (char *) NULL);
-	    ckfree ((char *)pixbuf);
-	    return FALSE;
-	}
-	if (linepad) {
-	    err = ((rle ? rle_getc (ifp) : sun_getc (ifp)) < 0);
-	    if (err) {
-		sprintf (errMsg, "Unexpected EOF while reading scanline %d", y);
-		Tcl_AppendResult (interp, errMsg, (char *) NULL);
-		ckfree ((char *)pixbuf);
-		return FALSE;
-	    }
-	}
-
-	if (y >= srcY) {
-	    dest = pixbuf + srcX * nchan;
-	    if (type != 3) {
-		if (nchan == 3) {		/* GBR Format. Swap to RGB. */
-		    for (x=0; x<width; x++) {
-			tmp = dest[0];
-			dest[0] = dest[2];
-			dest[2] = tmp;
-
-			dest += 3;
-		    }
-		} else { 			/* AGBR Format. Swap to RGBA. */
-		    for (x=0; x<width; x++) {
-			tmp = dest[0];
-			dest[0] = dest[3];
-			dest[3] = tmp;
-
-			tmp = dest[1];
-			dest[1] = dest[2];
-			dest[2] = tmp;
-
-			dest += 4;
-		    }
-		}
-	    }
-	    tkimg_PhotoPutBlockTk (interp, imageHandle, &block, destX, outY, width, 1);
-	    outY++;
-	}
-    }
-    ckfree ((char *)pixbuf);
-    return TRUE;
-}
-
-/* 
- * Here is the start of the standard functions needed for every image format.
- */
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int   ParseFormatOpts _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-                 int *comp, int *verb, int *matte));
-static int   CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	         int *heightPtr, SUNHEADER *sunHeaderPtr));
-static int   CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	         CONST char *filename, Tcl_Obj *format,
-	         Tk_PhotoHandle imageHandle, int destX, int destY,
-		 int width, int height, int srcX, int srcY));
-static int   CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, 
-                 CONST char *filename, Tcl_Obj *format,
-                 tkimg_MFile *handle, Tk_PhotoImageBlock *blockPtr));
-
-static int ParseFormatOpts (interp, format, comp, verb, matte)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    int *comp;
-    int *verb;
-    int *matte;
-{
-    static char *sunOptions[] = {"-compression", "-verbose", "-matte"};
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *compression, *verbose, *transp;
-
-    *comp = 1;
-    *verb = 0;
-    *matte = 1;
-    if (tkimg_ListObjGetElements (interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	compression = "rle";
-	verbose     = "0";
-	transp      = "1";
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj (interp, objv[i], sunOptions,
-		    "format option", 0, &index) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult (interp, "No value for option \"",
-			Tcl_GetStringFromObj (objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    compression = Tcl_GetStringFromObj(objv[i], (int *) NULL);
-		    break;
-		case 1:
-		    verbose = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-		case 2:
-		    transp = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-	    }
-	}
-
-	c = compression[0]; length = strlen (compression);
-	if ((c == 'n') && (!strncmp (compression, "none", length))) {
-	    *comp = 0;
-	} else if ((c == 'r') && (!strncmp (compression, "rle",length))) {
-	    *comp = 1;
-	} else {
-	    Tcl_AppendResult (interp, "invalid compression mode \"",
-		    compression, "\": should be rle or none", (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-	c = verbose[0]; length = strlen (verbose);
-	if (!strncmp (verbose, "1", length) || \
-	    !strncmp (verbose, "true", length) || \
-	    !strncmp (verbose, "on", length)) {
-	    *verb = 1;
-	} else if (!strncmp (verbose, "0", length) || \
-	    !strncmp (verbose, "false", length) || \
-	    !strncmp (verbose, "off", length)) {
-	    *verb = 0;
-	} else {
-	    Tcl_AppendResult (interp, "invalid verbose mode \"", verbose, 
-                              "\": should be 1 or 0, on or off, true or false",
-			      (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-        c = transp[0]; length = strlen (transp);
-        if (!strncmp (transp, "1", length) || \
-            !strncmp (transp, "true", length) || \
-            !strncmp (transp, "on", length)) {
-            *matte = 1;
-        } else if (!strncmp (transp, "0", length) || \
-            !strncmp (transp, "false", length) || \
-            !strncmp (transp, "off", length)) {
-            *matte = 0;
-        } else {
-            Tcl_AppendResult (interp, "invalid alpha (matte) mode \"", verbose,
-                              "\": should be 1 or 0, on or off, true or false",
-                              (char *) NULL);
-            return TCL_ERROR;
-        }   
-    }
-    return TCL_OK;
-}
-
-static int ChnMatch (interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    #if defined (DEBUG_LOCAL)
-	printf ("ChnMatch\n"); fflush (stdout);
-    #endif
- 
-    tkimg_FixChanMatchProc (&interp, &chan, &filename, &format,
-                         &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    #if defined (DEBUG_LOCAL)
-        printf ("ObjMatch\n"); fflush (stdout);
-    #endif
-
-    tkimg_FixObjMatchProc (&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, 'Y', &handle)) {
-	return 0;
-    }
-    return CommonMatch(&handle, widthPtr, heightPtr, NULL);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, sunHeaderPtr)
-    tkimg_MFile *handle;
-    int   *widthPtr;
-    int   *heightPtr;
-    SUNHEADER *sunHeaderPtr;
-{
-    SUNHEADER sh;
-
-    if (!read_sun_header (handle, &sh))
-	return 0;
-
-    *widthPtr  = sh.ras_width;
-    *heightPtr = sh.ras_height;
-    if (sunHeaderPtr)
-	*sunHeaderPtr = sh;
-    return 1;
-}
-
-static int ChnRead (interp, chan, filename, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *filename;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-			         * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format,
-		       imageHandle, destX, destY,
-		       width, height, srcX, srcY);
-}
-
-static int ObjRead (interp, data, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    tkimg_ReadInit (data, 'Y', &handle);
-    return CommonRead (interp, &handle, "InlineData", format, imageHandle,
-		       destX, destY, width, height, srcX, srcY);
-}
-
-static int CommonRead (interp, handle, filename, format, imageHandle,
-		       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;        /* The image file, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-			         * in image being read. */
-{
-    int nchan;
-    int fileWidth, fileHeight;
-    int outWidth, outHeight;
-    int retCode = TCL_OK;
-    SUNHEADER sh;
-    UByte *suncolmap = NULL;
-    int compr, verbose, matte;
-    char errMsg[200];
-
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    CommonMatch (handle, &fileWidth, &fileHeight, &sh);
-    if (verbose)
-        printImgInfo (&sh, filename, "Reading image:");
-
-    if ((srcX + width) > fileWidth) {
-	outWidth = fileWidth - srcX;
-    } else {
-	outWidth = width;
-    }
-    if ((srcY + height) > fileHeight) {
-	outHeight = fileHeight - srcY;
-    } else {
-	outHeight = height;
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    if (sh.ras_type > 5) {
-	sprintf (errMsg, "Unknown Sun Raster type: %d", sh.ras_type); 
-	Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	return TCL_ERROR;
-    }
-
-    if (sh.ras_type == RAS_TYPE_RLE)
-	tkimg_ReadBuffer (1);
-
-    /* Is there a RGB colourmap ? */
-    if ((sh.ras_maptype == 1) && (sh.ras_maplength > 0)) {
-	suncolmap = (UByte *)ckalloc (sh.ras_maplength);
-	if (!suncolmap) {
-	    sprintf (errMsg, "Can't allocate memory of size %d",
-			      sh.ras_maplength); 
-	    Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-	    tkimg_ReadBuffer (0);
-            return TCL_ERROR;
-	}
-
-	if (!read_sun_cols (handle, &sh, suncolmap)) {
-	    Tcl_AppendResult (interp, "Unable to read color map", (char *)NULL);
-	    ckfree ((char *)suncolmap);
-	    tkimg_ReadBuffer (0);
-            return TCL_ERROR;
-	}
-	#if defined(DEBUG)
-        {
-	    int j, ncols;
-	    printf ("Colormap values:\n");
-	    ncols = sh.ras_maplength/3;
-	    for (j=0; j < ncols; j++)
-		printf ("Entry 0x%08x: 0x%04x,  0x%04x, 0x%04x\n",
-                       j,suncolmap[j],suncolmap[j+ncols],suncolmap[j+2*ncols]);
-	}
-	#endif
-    } else if (sh.ras_maplength > 0) {
-	UByte dummy[1];
-	int d, length;
-
-	/* This type of colourmap is not supported. Ignore it. */
-	length = (sizeof (SUNHEADER)/sizeof (UInt)) * 4 + sh.ras_maplength;
-	for (d=0; d<length; d++) {
-	    readUByte (handle, dummy);
-	}
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    nchan = (sh.ras_depth == 32? 4: 3);
-
-    switch (sh.ras_depth)
-    {
-	case 1:    /* 2 colors B/W */
-            if (!load_sun_d1 (interp, handle, imageHandle, destX, destY,
-			      outWidth, outHeight, srcX, srcY, 
-			      fileWidth, fileHeight, sh.ras_type))
-		retCode = TCL_ERROR;
-	    break;
-
-	case 8:    /* 256 colours */
-            if (!load_sun_d8 (interp, handle, imageHandle, destX, destY, 
-			      outWidth, outHeight, srcX, srcY,
-			      fileWidth, fileHeight, sh.ras_type, 
-			      suncolmap, sh.ras_maplength))
-		retCode = TCL_ERROR;
-	    break;
-
-	case 24:   /* True color */
-	case 32:   /* True color with matte channel */
-            if (!load_rgb (interp, handle, imageHandle, destX, destY,
-			   outWidth, outHeight, srcX, srcY,
-			   fileWidth, fileHeight,
-			   nchan, sh.ras_type, matte))
-		retCode = TCL_ERROR;
-	    break;
-
-	default:
-	    sprintf (errMsg, "Image has invalid pixel depth: %d", sh.ras_depth);
-	    Tcl_AppendResult (interp, errMsg, (char *)NULL);
-	    retCode = TCL_ERROR;
-	    break;
-    }
-    if (suncolmap)
-	ckfree ((char *)suncolmap);
-    tkimg_ReadBuffer (0);
-    return retCode;
-}
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel (interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, filename, format, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc (&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit(dataPtr, &handle);
-    result = CommonWrite (interp, "InlineData", format, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult (interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, filename, format, handle, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int     x, y, nchan, nBytes, linepad;
-    int     redOffset, greenOffset, blueOffset, alphaOffset; 
-    UByte   *pixelPtr, *pixRowPtr;
-    SUNHEADER sh;
-    UByte *row, *rowPtr;
-    int compr, verbose, matte; /* Format options */
-    char errMsg[200];
-
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-        return TCL_ERROR;
-    }
-
-    redOffset   = 0;
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset  = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-
-    if (alphaOffset < blockPtr->offset[2]) {
-        alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-        alphaOffset -= blockPtr->offset[0];
-    } else {
-        alphaOffset = 0;   
-    }
-
-    nchan   = ((matte && alphaOffset)? 4: 3);
-    nBytes  = blockPtr->width * nchan;
-    linepad = nBytes % 2;
-
-    /* Fill the Sun header struct and write the header to the channel. */
-    sh.ras_magic     = RAS_MAGIC;
-    sh.ras_width     = blockPtr->width;
-    sh.ras_height    = blockPtr->height;
-    sh.ras_depth     = 8 * nchan;
-    sh.ras_length    = (nBytes + linepad) * blockPtr->height;
-    sh.ras_type      = (compr) ? RAS_TYPE_RLE : RAS_TYPE_STD;
-    sh.ras_maptype   = 0;   		/* No colourmap */
-    sh.ras_maplength = 0; 		/* Length of colourmap */
-
-    write_sun_header (handle, &sh);
-
-    /* Now write out the image data. */
-    pixRowPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    if (!compr) {
-	row = (UByte *) ckalloc (nBytes);
-	if (!row) {
-	    sprintf (errMsg, "Can't allocate memory of size %d", nBytes);
-	    Tcl_AppendResult (interp, errMsg, (char *)NULL);
-            return TCL_ERROR;
-	}
-	for (y=0; y<blockPtr->height; y++) {
-	    rowPtr = row;
-	    pixelPtr = pixRowPtr;
-	    for (x=0; x<blockPtr->width; x++) {
-		if (nchan == 4) {
-		    /* Have a matte channel and write it. */
-		    *(rowPtr++) = pixelPtr[alphaOffset];
-		}
-		*(rowPtr++) = pixelPtr[blueOffset];
-		*(rowPtr++) = pixelPtr[greenOffset];
-		*(rowPtr++) = pixelPtr[redOffset];
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	    if (nBytes != tkimg_Write (handle, (CONST char *)row, nBytes)) {
-		sprintf (errMsg, "Can't write %d bytes to image file", nBytes);
-		Tcl_AppendResult (interp, errMsg, (char *)NULL); 
-		ckfree ((char *)row);
-		return TCL_ERROR;
-	    }
-	    for (x=0; x<linepad; x++) {
-		writeUByte (handle, 0);
-	    }
-	    pixRowPtr += blockPtr->pitch;
-	}
-	ckfree ((char *)row);
-    } else { 			/* RLE compression */
-	rle_startwrite (handle);
-	for (y = 0; y < blockPtr->height; y++) {
-	    pixelPtr = pixRowPtr;
-	    for (x = 0; x < blockPtr->width; x++) {
-		if (nchan == 4) {
-		    /* Have a matte channel and write it. */
-		    rle_fputc (pixelPtr[alphaOffset], handle);
-		}
-		rle_fputc (pixelPtr[blueOffset], handle);
-		rle_fputc (pixelPtr[greenOffset], handle);
-		rle_fputc (pixelPtr[redOffset], handle);
-		pixelPtr += blockPtr->pixelSize;
-	    }
-	    for (x=0; x<linepad; x++) {
-		rle_fputc (0, handle);
-	    }
-	    pixRowPtr += blockPtr->pitch;
-	}
-	rle_endwrite (handle);
-    }
-    if (verbose)
-        printImgInfo (&sh, filename, "Saving image:");
-    return TCL_OK;
-}
diff --git a/tkimg1.3/sun/tests/all.tcl b/tkimg1.3/sun/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/sun/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/sun/tests/folder.ras b/tkimg1.3/sun/tests/folder.ras
deleted file mode 100644
index b94cde5..0000000
Binary files a/tkimg1.3/sun/tests/folder.ras and /dev/null differ
diff --git a/tkimg1.3/sun/tests/sun.test b/tkimg1.3/sun/tests/sun.test
deleted file mode 100644
index 2146c64..0000000
--- a/tkimg1.3/sun/tests/sun.test
+++ /dev/null
@@ -1,50 +0,0 @@
-# This file is a Tcl script to test out SUN reading and writing.
-# It is organized in the standard fasion for Tcl tests.
-#
-
-puts "img::sun [package require img::sun]"
-
-set sundata \
-{WaZqlQAAABAAAAAMAAAAGAAAAkAAAAACAAAAAAAAAACACNmACwCAINmAAgCAAP/wgAD/8IAA
-//CAAP/wgAIAgBrZgAIAgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAIAgBTZgCYAgAjZgAIA
-gAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAgCACNmAAgCA
-AP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IACAIAI2YACAIAA
-//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAIAgAjZgAIAgAD/
-8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAgCACNmAAgCAAP/w
-gAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IACAIAI2YACAIAA//CA
-AP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAIAgAjZgAIAgAD/8IAA
-//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAP/wgAD/8IAA//CAAgCACNmAJgCACNk=}
-
-test sun-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.ras]
-    i data -format sun
-} $sundata
-test sun-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $sundata
-    set data [i data -format sun]
-} $sundata
-test sun-1.3 {} {
-    i blank
-    i put $data
-    set data [i data -format sun]
-} $sundata
-test sun-1.4 {} {
-    i blank
-    i put $data -format sun
-    set data [i data -format sun]
-} $sundata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test sun-2.0 {Binary I/O with SUN images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.ras] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/tclconfig/ChangeLog b/tkimg1.3/tclconfig/ChangeLog
deleted file mode 100644
index 4d4fdcb..0000000
--- a/tkimg1.3/tclconfig/ChangeLog
+++ /dev/null
@@ -1,142 +0,0 @@
-2002-07-20  Zoran Vasiljevic  <zoran at archiware.com>
-
-	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
-	Also, fixes some indentation issues with "--with-XXX" options.
-
-2002-04-23  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
-	use new threaded allocatory by default on Unix for Tcl 8.4.
-	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
-
-2002-04-22  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
-	we can use autoconf 2.5x as well as 2.13.  This prevents us from
-	being able to warn against the use of cygwin gcc at configure
-	time, but allows autoconf 2.5x, which is what is shipped with most
-	newer systems.
-
-2002-04-11  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: Enabled COFF as well as CV style debug info with
-	--enable-symbols to allow Dr. Watson users to see function info.
-	More info on debugging levels can be obtained at:
-	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-
-2002-04-03  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
-	Scriptics, which is no more.  TEA represents a better, independent
-	prefix that won't need changing.
-	Added preliminary mingw gcc support. [Patch #538772]
-	Added TEA_PREFIX macro that handles defaulting the prefix and
-	exec_prefix vars to those used by Tcl if none were specified.
-	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
-	check and several other basic AC_PROG checks needed for making
-	executables.  This greatly simplifies user's configure.in files.
-	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
-	ELF stuff on AIX-5-ia64.
-	Updated TEA_ENABLE_THREADS to take an optional arg to allow
-	switching it on by default (for Thread) and add sanity checking to
-	warn the user if configuring threads incompatibly.
-
-2002-03-29  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
-	Removed --enable-64bit support for AIX-4 because it wasn't correct.
-	Added -MT or -MD Windows linker switches to properly support
-	symbols-enabled builds.
-
-2002-03-28  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
-	instead of calling it as that inlines it each time in shell code.
-	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
-	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
-	A few changes to support itcl (and perhaps others):
-	Added support for making your own stub libraries to SC_MAKE_LIB.
-	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
-	and find that ${pkg}Config.sh file.  itk uses this for itcl.
-
-2002-03-27  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
-	build dir setup.
-	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
-	Added XLIBSW onto LIBS when it is defined.
-	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
-	instead to not rely as much on tclConfig.sh cached info.
-	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
-	These move towards making TEA much more independent of *Config.sh.
-
-2002-03-19  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
-	SHLIB_SUFFIX defines for Win.
-	(SC_PATH_X): made this only do the check on unix platforms. 
-
-2002-03-12  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* README.txt: updated to reflect fewer files
-
-2002-03-06  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* config.guess (removed):
-	* config.sub (removed): removed unnecessary files
-
-	* installFile.tcl (removed):
-	* mkinstalldirs (removed): these aren't really necessary for
-	making TEA work
-
-	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
-	check /usr(/local)/include for includes on Windows when not using
-	gcc
-
-2002-03-05  Jeff Hobbs  <jeffh at ActiveState.com>
-
-	* tcl.m4: added warnings on Windows, removed RELPATH define and
-	added TCL_LIBS to MAKE_LIB macro.
-
-	This import represents 2.0.0, or a new start at attempting to
-	make TEA much easier for C extension developers.
-
-	**** moved from tclpro project to core tcl project, ****
-	**** renamed to 'tclconfig'                         ****
-
-2001-03-15    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added updating of the modification time of
-	  the target file whether we overwrote it or decided that it
-	  hadn't changed.  This was necessary for us to be able to
-	  determine whether or not a module install touched the file.
-
-2001-03-08    Karl Lehenbauer <karl at procplace.com>
-
-	* installFile.tcl: Added support for converting new-style (1.1+) 
-	  Cygnus drive paths to Tcl-style.
-
-2001-01-15    <brent.welch at interwoven.com>
-
-	* tcl.m4: Added FreeBSD clause.
-
-2001-01-03    <brent.welch at interwoven.com>
-
-	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
-	for exec-prefix.
-
-2000-12-01    <brent.welch at interwoven.com>
-
-	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
-	so we don't need to modify the autoconf installation.
-	* config.guess:
-	* config.sub:
-	* installFile.tcl:
-	Added files from the itcl config subdirectory,
-	which should go away.
-
-2000-7-29    <welch at ajubasolutions.com>
-
-	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
-	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
-	change from $(srcdir) to $(srcdir)/..
diff --git a/tkimg1.3/tclconfig/README.txt b/tkimg1.3/tclconfig/README.txt
deleted file mode 100644
index 9055a58..0000000
--- a/tkimg1.3/tclconfig/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-These files comprise the basic building blocks for a Tcl Extension
-Architecture (TEA) extension.  For more information on TEA see:
-
-	http://www.tcl.tk/doc/tea/
-
-This package is part of the Tcl project at SourceForge, and latest
-sources should be available there:
-
-	http://tcl.sourceforge.net/
-
-This package is a freely available open source package.  You can do
-virtually anything you like with it, such as modifying it, redistributing
-it, and selling it either in whole or in part.
-
-CONTENTS
-========
-The following is a short description of the files you will find in
-the sample extension.
-
-README.txt	This file
-
-install-sh	Program used for copying binaries and script files
-		to their install locations.
-
-tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
-		aclocal.m4 to define SC_* macros.
diff --git a/tkimg1.3/tclconfig/img.m4 b/tkimg1.3/tclconfig/img.m4
deleted file mode 100644
index f224231..0000000
--- a/tkimg1.3/tclconfig/img.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# m4 configure macros specific to Img.
-#
-
-AC_DEFUN(IMG_SRCPATH, [
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module '$1' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case [$]$1_SRC_DIR in
-/*)	$1_SRC_PATH=[$]$1_SRC_DIR
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	$1_SRC_PATH="`dirname [$]$1_BUILD_STUB_LIB_PATH`/[$]$1_SRC_DIR"
-esac
-
-$1_BUILD_PATH="`dirname [$]$1_BUILD_STUB_LIB_PATH`"
-
-if test "[$]{TEA_PLATFORM}" = "windows" ; then
-    $1_SRC_PATH="\"`[$]CYGPATH [$]$1_SRC_PATH`\""
-    $1_BUILD_PATH="\"`[$]CYGPATH [$]$1_BUILD_PATH`\""
-fi
-
-AC_SUBST($1_SRC_PATH)
-AC_SUBST($1_BUILD_PATH)
-])
diff --git a/tkimg1.3/tclconfig/install-sh b/tkimg1.3/tclconfig/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/tclconfig/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/tclconfig/tcl.m4 b/tkimg1.3/tclconfig/tcl.m4
deleted file mode 100644
index f61db8b..0000000
--- a/tkimg1.3/tclconfig/tcl.m4
+++ /dev/null
@@ -1,3252 +0,0 @@
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TCLCONFIG, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG])
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	AC_ARG_WITH(tcl, [  --with-tcl              directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
-	AC_MSG_CHECKING([for Tcl configuration])
-	AC_CACHE_VAL(ac_cv_c_tclconfig,[
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    AC_MSG_WARN("Cannot find Tcl configuration definitions")
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_TKCONFIG, [
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	AC_ARG_WITH(tk, [  --with-tk               directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
-	AC_MSG_CHECKING([for Tk configuration])
-	AC_CACHE_VAL(ac_cv_c_tkconfig,[
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    AC_MSG_WARN("Cannot find Tk configuration definitions")
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
-	fi
-    fi
-
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TCLCONFIG, [
-    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
-    AC_SUBST(TCL_LIB_SPEC)
-
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-
-    #AC_SUBST(TCL_DBGX)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_TKCONFIG, [
-    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        AC_MSG_RESULT([loading])
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    AC_SUBST(TK_VERSION)
-    AC_SUBST(TK_BIN_DIR)
-    AC_SUBST(TK_SRC_DIR)
-
-    AC_SUBST(TK_LIB_FILE)
-    AC_SUBST(TK_LIB_FLAG)
-    AC_SUBST(TK_LIB_SPEC)
-
-    AC_SUBST(TK_STUB_LIB_FILE)
-    AC_SUBST(TK_STUB_LIB_FLAG)
-    AC_SUBST(TK_STUB_LIB_SPEC)
-
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SHARED, [
-    AC_MSG_CHECKING([how to build libraries])
-    AC_ARG_ENABLE(shared,
-	[  --enable-shared         build and link with shared libraries [--enable-shared]],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	AC_MSG_RESULT([shared])
-	SHARED_BUILD=1
-    else
-	AC_MSG_RESULT([static])
-	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
-    fi
-    AC_SUBST(SHARED_BUILD)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_THREADS, [
-    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
-	[tcl_ok=$enableval], [tcl_ok=$1])
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    AC_DEFINE(USE_THREAD_ALLOC)
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_THREAD_SAFE)
-	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		AC_CHECK_LIB(pthread, __pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		AC_CHECK_LIB(pthreads, pthread_mutex_init,
-		    tcl_ok=yes, tcl_ok=no)
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    AC_CHECK_LIB(c, pthread_mutex_init,
-			tcl_ok=yes, tcl_ok=no)
-		    if test "$tcl_ok" = "no"; then
-			AC_CHECK_LIB(c_r, pthread_mutex_init,
-			    tcl_ok=yes, tcl_ok=no)
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    AC_CHECK_FUNCS(pthread_attr_setstacksize)
-	    LIBS=$ac_saved_libs
-	    AC_CHECK_FUNCS(readdir_r)
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    AC_MSG_CHECKING([for building with threads])
-    if test "${TCL_THREADS}" = "1"; then
-	AC_DEFINE(TCL_THREADS)
-	AC_MSG_RESULT([yes])
-    else
-	AC_MSG_RESULT([no (default)])
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		AC_MSG_WARN([
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled.])
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		AC_MSG_WARN([
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled.])
-	    fi
-	    ;;
-    esac
-    AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_SYMBOLS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS])
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	AC_MSG_RESULT([no])
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    AC_MSG_RESULT([yes (standard debugging)])
-	fi
-    fi
-
-    AC_SUBST(TCL_DBGX)
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    AC_MSG_RESULT([enabled symbols mem debugging])
-	else
-	    AC_MSG_RESULT([enabled $tcl_ok debugging])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_ENABLE_LANGINFO, [
-    AC_ARG_ENABLE(langinfo,
-	[  --enable-langinfo	  use nl_langinfo if possible to determine
-			  encoding at startup, otherwise use old heuristic],
-	[langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-	if test "$langinfo_ok" = "yes"; then
-	    AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-	fi
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-	AC_TRY_COMPILE([#include <langinfo.h>],
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
-	if test "$langinfo_ok" = "no"; then
-	    langinfo_ok="no (could not compile with nl_langinfo)";
-	fi
-	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
-	fi
-    fi
-    AC_MSG_RESULT([$langinfo_ok])
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_CONFIG_CFLAGS, [
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS])
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is enabled])
-    AC_ARG_ENABLE(64bit,[  --enable-64bit          enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
-    AC_MSG_RESULT([$do64bit])
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
-    AC_ARG_ENABLE(64bit-vis,[  --enable-64bit-vis      enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    AC_MSG_CHECKING([system version (for dynamic loading)])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    AC_MSG_RESULT([unknown (can't find uname command)])
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    AC_MSG_RESULT([$system])
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
-dnl AC_CHECK_TOOL(AR, ar, :)
-    AC_CHECK_PROG(AR, ar, ar)
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		AC_MSG_RESULT([Using $CC for compiling with threads])
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            AC_MSG_WARN([64bit mode not supported by gcc])
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		AC_CHECK_HEADER(dld.h, [
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""])
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    AC_CHECK_HEADER(dlfcn.h, [
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		AC_MSG_CHECKING([for ELF])
-		AC_EGREP_CPP(yes, [
-#ifdef __ELF__
-	yes
-#endif
-		],
-		    AC_MSG_RESULT([yes])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
-		    AC_MSG_RESULT([no])
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		)
-	    ], [
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    ])
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-arch ppc -pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export $@:'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[[0-6]]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    AC_MSG_WARN("64bit mode not supported with GCC on $system")
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    AC_MSG_WARN("64bit mode only supported sparcv9 system")
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    AC_MSG_CHECKING([for ld accepts -Bexport flag])
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    AC_TRY_LINK(, [int i;], found=yes, found=no)
-	    LDFLAGS=$hold_ldflags
-	    AC_MSG_RESULT([$found])
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	AC_MSG_CHECKING([sys/exec.h])
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    ], tcl_ok=usable, tcl_ok=unusable)
-	AC_MSG_RESULT([$tcl_ok])
-	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
-	else
-	    AC_MSG_CHECKING([a.out.h])
-	    AC_TRY_COMPILE([#include <a.out.h>],[
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    ], tcl_ok=usable, tcl_ok=unusable)
-	    AC_MSG_RESULT([$tcl_ok])
-	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
-	    else
-		AC_MSG_CHECKING([sys/exec_aout.h])
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		], tcl_ok=usable, tcl_ok=unusable)
-		AC_MSG_RESULT([$tcl_ok])
-		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
-	[tcl_ok=$enableval], [tcl_ok=yes])
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    AC_SUBST(DL_LIBS)
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-    AC_SUBST(EXTRA_CFLAGS)
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-    AC_SUBST(SHLIB_CFLAGS)
-    AC_SUBST(SHLIB_LDFLAGS)
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(LDFLAGS_DEBUG)
-    AC_SUBST(LDFLAGS_OPTIMIZE)
-])
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_SERIAL_PORT, [
-    AC_CHECK_HEADERS(sys/modem.h)
-    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
-    AC_CACHE_VAL(tcl_cv_api_serial, [
-    AC_TRY_RUN([
-#include <termios.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termio.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi
-    if test $tcl_cv_api_serial = no ; then
-	AC_TRY_RUN([
-#include <termios.h>
-#include <errno.h>
-
-int main() {
-    struct termios t;
-    if (tcgetattr(0, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	cfsetospeed(&t, 0);
-	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <termio.h>
-#include <errno.h>
-
-int main() {
-    struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
-	return 0;
-    }
-    return 1;
-    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
-    fi
-    if test $tcl_cv_api_serial = no; then
-	AC_TRY_RUN([
-#include <sgtty.h>
-#include <errno.h>
-
-int main() {
-    struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0
-	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
-	t.sg_ospeed = 0;
-	t.sg_flags |= ODDP | EVENP | RAW;
-	return 0;
-    }
-    return 1;
-}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
-    fi])
-    case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
-    esac
-    AC_MSG_RESULT([$tcl_cv_api_serial])
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
-    AC_MSG_CHECKING([dirent.h])
-    AC_TRY_LINK([#include <sys/types.h>
-#include <dirent.h>], [
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-], tcl_ok=yes, tcl_ok=no)
-
-    if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
-    fi
-
-    AC_MSG_RESULT([$tcl_ok])
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
-    AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
-    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
-    fi
-    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
-    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
-    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    AC_HAVE_HEADERS(unistd.h sys/param.h)
-
-])
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_X, [
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_PATH_UNIX_X
-    fi
-])
-
-AC_DEFUN(TEA_PATH_UNIX_X, [
-    AC_PATH_X
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	AC_MSG_CHECKING([for X11 header files])
-	XINCLUDES="# no special path needed"
-	AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    AC_MSG_RESULT([$i])
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	AC_MSG_RESULT([could not find any!])
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	AC_MSG_CHECKING([for X11 libraries])
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		AC_MSG_RESULT([$i])
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
-    fi
-    if test "$XLIBSW" = nope ; then
-	AC_MSG_RESULT([could not find any!  Using -lX11.])
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BLOCKING_STYLE, [
-    AC_CHECK_HEADERS(sys/ioctl.h)
-    AC_CHECK_HEADERS(sys/filio.h)
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	fi
-    fi
-    case $system in
-	# There used to be code here to use FIONBIO under AIX.  However, it
-	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
-	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
-	# code (JO, 5/31/97).
-
-	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
-	    AC_MSG_RESULT([FIONBIO])
-	    ;;
-	*)
-	    AC_MSG_RESULT([O_NONBLOCK])
-	    ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TIME_HANDLER, [
-    AC_CHECK_HEADERS(sys/time.h)
-    AC_HEADER_TIME
-    AC_STRUCT_TIMEZONE
-
-    AC_CHECK_FUNCS(gmtime_r localtime_r)
-
-    AC_MSG_CHECKING([tm_tzadj in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
-    fi
-
-    AC_MSG_CHECKING([tm_gmtoff in struct tm])
-    AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
-    AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_MSG_CHECKING([long timezone variable])
-    AC_CACHE_VAL(tcl_cv_var_timezone,
-	AC_TRY_COMPILE([#include <time.h>],
-	    [extern long timezone;
-	    timezone += 1;
-	    exit (0);],
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
-    AC_MSG_RESULT([$tcl_cv_timezone_long])
-    if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
-    else
-	#
-	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-	#
-	AC_MSG_CHECKING([time_t timezone variable])
-	AC_CACHE_VAL(tcl_cv_timezone_time,
-	    AC_TRY_COMPILE([#include <time.h>],
-		[extern time_t timezone;
-		timezone += 1;
-		exit (0);],
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
-	AC_MSG_RESULT([$tcl_cv_timezone_time])
-	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_BUGGY_STRTOD, [
-    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
-    if test "$tcl_strtod" = 1; then
-	AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
-	AC_TRY_RUN([
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
-	if test "$tcl_ok" = 1; then
-	    AC_MSG_RESULT([ok])
-	else
-	    AC_MSG_RESULT([buggy])
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    AC_DEFINE(strtod, fixstrtod)
-	fi
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_LINK_LIBS, [
-    #--------------------------------------------------------------------
-    # On a few very rare systems, all of the libm.a stuff is
-    # already in libc.a.  Set compiler flags accordingly.
-    # Also, Linux requires the "ieee" library for math to work
-    # right (and it must appear before "-lm").
-    #--------------------------------------------------------------------
-
-    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-    #--------------------------------------------------------------------
-    # Interactive UNIX requires -linet instead of -lsocket, plus it
-    # needs net/errno.h to define the socket-related error codes.
-    #--------------------------------------------------------------------
-
-    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
-
-    #--------------------------------------------------------------------
-    #	Check for the existence of the -lsocket and -lnsl libraries.
-    #	The order here is important, so that they end up in the right
-    #	order in the command line generated by make.  Here are some
-    #	special considerations:
-    #	1. Use "connect" and "accept" to check for -lsocket, and
-    #	   "gethostbyname" to check for -lnsl.
-    #	2. Use each function name only once:  can't redo a check because
-    #	   autoconf caches the results of the last check and won't redo it.
-    #	3. Use -lnsl and -lsocket only if they supply procedures that
-    #	   aren't already present in the normal libraries.  This is because
-    #	   IRIX 5.2 has libraries, but they aren't needed and they're
-    #	   bogus:  they goof up name resolution if used.
-    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
-    #	   To get around this problem, check for both libraries together
-    #	   if -lsocket doesn't work by itself.
-    #--------------------------------------------------------------------
-
-    tcl_checkBoth=0
-    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
-    if test "$tcl_checkSocket" = 1; then
-	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
-	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
-    fi
-    if test "$tcl_checkBoth" = 1; then
-	tk_oldLibs=$LIBS
-	LIBS="$LIBS -lsocket -lnsl"
-	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
-    fi
-    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
-	    [LIBS="$LIBS -lnsl"])])
-    
-    # Don't perform the eval of the libraries here because DL_LIBS
-    # won't be set until we call TEA_CONFIG_CFLAGS
-
-    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(MATH_LIBS)
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_EARLY_FLAG,[
-    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
-	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
-	    AC_TRY_COMPILE([[#define ]$1[ 1
-]$2], $3,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
-		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
-    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
-	tcl_flags="$tcl_flags $1"
-    fi
-])
-
-AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
-    AC_MSG_CHECKING([for required early compiler flags])
-    tcl_flags=""
-    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
-	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
-	[struct stat64 buf; int i = stat64("/", &buf);])
-    if test "x${tcl_flags}" = "x" ; then
-	AC_MSG_RESULT([none])
-    else
-	AC_MSG_RESULT([${tcl_flags}])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
-    AC_MSG_CHECKING([for 64-bit integer type])
-    AC_CACHE_VAL(tcl_cv_type_64bit,[
-	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		], tcl_cv_type_64bit="long long"))])
-    if test "${tcl_cv_type_64bit}" = none ; then
-	AC_MSG_RESULT([using long])
-    else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
-	AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-	# Now check for auxiliary declarations
-	AC_MSG_CHECKING([for struct dirent64])
-	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
-	    AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
-
-	AC_MSG_CHECKING([for struct stat64])
-	AC_CACHE_VAL(tcl_cv_struct_stat64,[
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
-],
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
-	fi
-	AC_MSG_RESULT([${tcl_cv_struct_stat64}])
-
-	AC_MSG_CHECKING([for off64_t])
-	AC_CACHE_VAL(tcl_cv_type_off64_t,[
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
-],
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
-	fi
-	AC_MSG_RESULT([${tcl_cv_type_off64_t}])
-    fi
-])
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_INIT, [
-    AC_MSG_CHECKING([for correct TEA configuration])
-    if test x"${PACKAGE}" = x ; then
-	AC_MSG_ERROR([
-The PACKAGE variable must be defined by your TEA configure.in])
-    fi
-    AC_MSG_RESULT([ok])
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    AC_SUBST(EXEEXT)
-    AC_SUBST(CYGPATH)
-])
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_PREFIX, [
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    AC_MSG_WARN([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    AC_MSG_WARN([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-AC_DEFUN(TEA_SETUP_COMPILER, [
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    AC_PROG_CC
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	AC_MSG_CHECKING([if the compiler understands -pipe])
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
-	    AC_MSG_RESULT([no]))
-    fi
-
-    AC_PROG_INSTALL
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_PROG_RANLIB
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    AC_OBJEXT
-    AC_EXEEXT
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    TEA_TCL_EARLY_FLAGS
-    TEA_TCL_64BIT_FLAGS
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	TEA_MISSING_POSIX_HEADERS
-	TEA_BUGGY_STRTOD
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_MAKE_LIB, [
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    AC_SUBST(MAKE_LIB)
-    AC_SUBST(MAKE_SHARED_LIB)
-    AC_SUBST(MAKE_STATIC_LIB)
-    AC_SUBST(MAKE_STUB_LIB)
-])
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LIB_SPEC, [
-    AC_MSG_CHECKING([for $1 library])
-
-    # Look in exec-prefix for the library (defined by TEA_PREFIX).
-
-    tea_lib_name_dir="${exec_prefix}/lib"
-
-    # Or in a user-specified location.
-
-    if test x"$2" != x ; then
-	tea_extra_lib_dir=$2
-    else
-	tea_extra_lib_dir=NONE
-    fi
-
-    for i in \
-	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
-	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
-	if test -f "$i" ; then
-	    tea_lib_name_dir=`dirname $i`
-	    $1_LIB_NAME=`basename $i`
-	    $1_LIB_PATH_NAME=$i
-	    break
-	fi
-    done
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
-    else
-	# Strip off the leading "lib" and trailing ".a" or ".so"
-
-	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
-	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
-    fi
-
-    if test "x${$1_LIB_NAME}" = x ; then
-	AC_MSG_ERROR([not found])
-    else
-	AC_MSG_RESULT([${$1_LIB_SPEC}])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-    AC_SUBST(TCL_GENERIC_DIR_NATIVE)
-    AC_SUBST(TCL_UNIX_DIR_NATIVE)
-    AC_SUBST(TCL_WIN_DIR_NATIVE)
-    AC_SUBST(TCL_BMAP_DIR_NATIVE)
-    AC_SUBST(TCL_TOOL_DIR_NATIVE)
-    AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [
-    AC_MSG_CHECKING([for Tcl public headers])
-
-    AC_ARG_WITH(tclinclude, [  --with-tclinclude      directory containing the public Tcl header files], with_tclinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tclh, [
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tclh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TCL_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk private include files])
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_UNIX_DIR_NATIVE)
-    AC_SUBST(TK_WIN_DIR_NATIVE)
-    AC_SUBST(TK_GENERIC_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-    AC_SUBST(TK_PLATFORM_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
-])
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
-    AC_MSG_CHECKING([for Tk public headers])
-
-    AC_ARG_WITH(tkinclude, [  --with-tkinclude      directory containing the public Tk header files.], with_tkinclude=${withval})
-
-    AC_CACHE_VAL(ac_cv_c_tkh, [
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    ])
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
-    else
-	AC_MSG_RESULT([${ac_cv_c_tkh}])
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    AC_SUBST(TK_INCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_TCLSH, [
-    AC_MSG_CHECKING([for tclsh])
-
-    AC_CACHE_VAL(ac_cv_path_tclsh, [
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	AC_MSG_RESULT([$TCLSH_PROG])
-    else
-	AC_MSG_ERROR([No tclsh found in PATH:  $search_path])
-    fi
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PROG_WISH, [
-    AC_MSG_CHECKING([for wish])
-
-    AC_CACHE_VAL(ac_cv_path_wish, [
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    ])
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	AC_MSG_RESULT([$WISH_PROG])
-    else
-	AC_MSG_ERROR([No wish found in PATH:  $search_path])
-    fi
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_PATH_CONFIG, [
-    #
-    # Ok, lets find the $1 configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-$1
-    #
-
-    if test x"${no_$1}" = x ; then
-	# we reset no_$1 in case something fails here
-	no_$1=true
-	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
-	AC_MSG_CHECKING([for $1 configuration])
-	AC_CACHE_VAL(ac_cv_c_$1config,[
-
-	    # First check to see if --with-$1 was specified.
-	    if test x"${with_$1config}" != x ; then
-		if test -f "${with_$1config}/$1Config.sh" ; then
-		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
-		else
-		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
-		fi
-	    fi
-
-	    # then check for a private $1 installation
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in \
-			../$1 \
-			`ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../$1 \
-			`ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			../../../$1 \
-			`ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			${srcdir}/../$1 \
-			`ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_$1config}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/$1Config.sh" ; then
-			ac_cv_c_$1config=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	])
-
-	if test x"${ac_cv_c_$1config}" = x ; then
-	    $1_BIN_DIR="# no $1 configs found"
-	    AC_MSG_WARN("Cannot find $1 configuration definitions")
-	    exit 0
-	else
-	    no_$1=
-	    $1_BIN_DIR=${ac_cv_c_$1config}
-	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
-	fi
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_LOAD_CONFIG, [
-    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
-
-    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
-        AC_MSG_RESULT([loading])
-	. ${$1_BIN_DIR}/$1Config.sh
-    else
-        AC_MSG_RESULT([file not found])
-    fi
-
-    #
-    # If the $1_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable $1_LIB_SPEC will be set to the value
-    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
-    # instead of $1_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${$1_BIN_DIR}/Makefile ; then
-	AC_MSG_WARN([Found Makefile - using build library specs for $1])
-        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
-        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
-        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
-    fi
-
-    AC_SUBST($1_VERSION)
-    AC_SUBST($1_SRC_DIR)
-
-    AC_SUBST($1_LIB_FILE)
-    AC_SUBST($1_LIB_SPEC)
-
-    AC_SUBST($1_STUB_LIB_FILE)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_PATH)
-])
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN(TEA_EXPORT_CONFIG, [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${VERSION}"
-    if test "[$]{TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_LIB_FLAG="-l$1${VERSION}${DBGX}"
-    else
-	eval $1_LIB_FLAG="-l$1`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-	eval $1_STUB_LIB_FLAG="-l$1stub${VERSION}${DBGX}"
-    else
-	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{$1stub_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{$1stub_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
diff --git a/tkimg1.3/tests/all.tcl b/tkimg1.3/tests/all.tcl
deleted file mode 100755
index 93befa6..0000000
--- a/tkimg1.3/tests/all.tcl
+++ /dev/null
@@ -1,54 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# This file contains a top-level script to run all of the Tcl
-# tests.  Execute it by invoking "source all.test" when running tcltest
-# in this directory.
-#
-# Copyright (c) 1998-2000 by Scriptics Corporation.
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-if {[lsearch [namespace children] ::tcltest] == -1} {
-    package require tcltest
-    namespace import ::tcltest::*
-}
-
-proc run_tests {} {
-    set chan $::tcltest::outputChannel
-
-    puts $chan "Tests running in interp:       [info nameofexecutable]"
-    puts $chan "Tests running with pwd:        [pwd]"
-    puts $chan "Tests running in working dir:  $::tcltest::testsDirectory"
-
-    if {[llength $::tcltest::skip] > 0} {
-	puts $chan "Skipping tests that match:            $::tcltest::skip"
-    }
-    if {[llength $::tcltest::match] > 0} {
-	puts $chan "Only running tests that match:        $::tcltest::match"
-    }
-    if {[llength $::tcltest::skipFiles] > 0} {
-	puts $chan "Skipping test files that match:       $::tcltest::skipFiles"
-    }
-    if {[llength $::tcltest::matchFiles] > 0} {
-	puts $chan "Only sourcing test files that match:  $::tcltest::matchFiles"
-    }
-
-    set timeCmd {clock format [clock seconds]}
-    puts $chan "Tests began at [eval $timeCmd]"
-
-    # source each of the specified tests
-    foreach file [lsort [::tcltest::getMatchingFiles]] {
-	set tail [file tail $file]
-	puts $chan $tail
-	if {[catch {source $file} msg]} {
-	    puts $chan $msg
-	}
-    }
-
-    # cleanup
-    puts $chan "\nTests ended at [eval $timeCmd]"
-    ::tcltest::cleanupTests 1
-    return
-}
diff --git a/tkimg1.3/tga/ChangeLog b/tkimg1.3/tga/ChangeLog
deleted file mode 100644
index 12397e5..0000000
--- a/tkimg1.3/tga/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/tga: TGA photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net>
diff --git a/tkimg1.3/tga/Makefile.in b/tkimg1.3/tga/Makefile.in
deleted file mode 100644
index 4c56fd3..0000000
--- a/tkimg1.3/tga/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgtga TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgtga_SOURCES	=	\
-		tga.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgtga_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgtga_OBJECTS	= $(tkimgtga_SOURCES:.c=. at OBJEXT@)
-tkimgtga_LIB_FILE	= @tkimgtga_LIB_FILE@
-
-## tkimgtgastub_OBJECTS	= tkimgtgaStubLib.$(OBJEXT)
-## tkimgtgastub_LIB_FILE= @tkimgtgastub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgtga_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgtga_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgtga.$(OBJEXT): $(srcdir)/generic/tkimgtga.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgtga.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgtga/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgtgaConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgtga.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgtga_DECLS = \
-	$(srcdir)/tkimgtga.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgtga_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgtga_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/tga/aclocal.m4 b/tkimg1.3/tga/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/tga/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/tga/configure b/tkimg1.3/tga/configure
deleted file mode 100755
index 1336485..0000000
--- a/tkimg1.3/tga/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgtga', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./tga.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgtga
-DPACKAGE="img::tga"
-PHIMGTYPE="tga"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGTGA_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgtgastub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGTGA_VERSION "${TKIMGTGA_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgtga in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgtga 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGTGA_VERSION@%$TKIMGTGA_VERSION%g
-s%@tkimgtga_LIB_FILE@%$tkimgtga_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/tga/configure.in b/tkimg1.3/tga/configure.in
deleted file mode 100644
index 3cae9da..0000000
--- a/tkimg1.3/tga/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgtga', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./tga.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgtga
-DPACKAGE="img::tga"
-PHIMGTYPE="tga"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGTGA_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGTGA_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgtga_LIB_FILE)
-#AC_SUBST(tkimgtgastub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGTGA_VERSION, "${TKIMGTGA_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgtga in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgtga)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/tga/pkgIndex.tcl.in b/tkimg1.3/tga/pkgIndex.tcl.in
deleted file mode 100644
index 93aa17d..0000000
--- a/tkimg1.3/tga/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgtga_LIB_FILE@]]
diff --git a/tkimg1.3/tga/readme b/tkimg1.3/tga/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/tga/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/tga/tests/all.tcl b/tkimg1.3/tga/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/tga/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/tga/tests/hori.tga b/tkimg1.3/tga/tests/hori.tga
deleted file mode 100644
index 6213cf9..0000000
Binary files a/tkimg1.3/tga/tests/hori.tga and /dev/null differ
diff --git a/tkimg1.3/tga/tests/tga.test b/tkimg1.3/tga/tests/tga.test
deleted file mode 100644
index 9cc676f..0000000
--- a/tkimg1.3/tga/tests/tga.test
+++ /dev/null
@@ -1,53 +0,0 @@
-# This file is a Tcl script to test out TGA reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::tga [package require img::tga]"
-
-set tgadata \
-{AAAKAAAAAAAAAAAAUgAMABgg0d/b3wDf29+JAAAAiP///wAAAACIAAD/AAAAAIgA/wAAAAAA
-iP8AAAAAAACI//8AAAAAAIj/AP8AAAAAiAD//wEAAADf298A39vfiQAAAIj///8AAAAAiAAA
-/wAAAACIAP8AAAAAAIj/AAAAAAAAiP//AAAAAACI/wD/AAAAAIgA//8BAAAA39vfAN/b34kA
-AACI////AAAAAIgAAP8AAAAAiAD/AAAAAACI/wAAAAAAAIj//wAAAAAAiP8A/wAAAACIAP//
-AQAAAN/b3wDf29+JAAAAiP///wAAAACIAAD/AAAAAIgA/wAAAAAAiP8AAAAAAACI//8AAAAA
-AIj/AP8AAAAAiAD//wEAAADf298A39vfiQAAAIj///8AAAAAiAAA/wAAAACIAP8AAAAAAIj/
-AAAAAAAAiP//AAAAAACI/wD/AAAAAIgA//8BAAAA39vfAN/b34kAAACI////AAAAAIgAAP8A
-AAAAiAD/AAAAAACI/wAAAAAAAIj//wAAAAAAiP8A/wAAAACIAP//AQAAAN/b3wDf29+JAAAA
-iP///wAAAACIAAD/AAAAAIgA/wAAAAAAiP8AAAAAAACI//8AAAAAAIj/AP8AAAAAiAD//wEA
-AADf298A39vfiQAAAIj///8AAAAAiAAA/wAAAACIAP8AAAAAAIj/AAAAAAAAiP//AAAAAACI
-/wD/AAAAAIgA//8BAAAA39vfAN/b34kAAACI////AAAAAIgAAP8AAAAAiAD/AAAAAACI/wAA
-AAAAAIj//wAAAAAAiP8A/wAAAACIAP//AQAAAN/b3wDf29/PAAAAAN/b39Hf298=}
-
-
-test tga-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory hori.tga]
-    i data -format tga
-} $tgadata
-test tga-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $tgadata
-    set data [i data -format tga]
-} $tgadata
-test tga-1.3 {} {
-    i blank
-    i put $tgadata
-    set data [i data -format tga]
-} $tgadata
-test tga-1.4 {} {
-    i blank
-    i put $tgadata -format tga
-    set data [i data -format tga]
-} $tgadata
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test tga-2.0 {Binary I/O with TGA images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory hori.tga] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
diff --git a/tkimg1.3/tga/tga.c b/tkimg1.3/tga/tga.c
deleted file mode 100644
index 02b3241..0000000
--- a/tkimg1.3/tga/tga.c
+++ /dev/null
@@ -1,1015 +0,0 @@
-/* STARTHEADER
- *
- * File :       tga.c
- *
- * Author :     Paul Obermeier (paul at poSoft.de)
- *
- * Date :       Wed Nov 22 21:45:17 CET 2000
- *
- * Copyright :  (C) 2000-2002 Paul Obermeier
- *
- * Description :
- *
- * A photo image handler for Truevision's TARGA file format.
- *
- * The following image types are supported:
- *
- * 24-bit pixels: True-color (RGB, each channel 8 bit).
- * 32-bit pixels: True-color with alpha channel (RGBA, each channel 8 bit).
- *
- * List of currently supported features:
- *
- * Type   |     Read      |     Write     |
- *        | -file | -data | -file | -data |
- * ----------------------------------------
- * 24-bit | Yes   | Yes   | Yes   | Yes   |
- * 32-bit | Yes   | Yes   | Yes   | Yes   |
- *
- * All images types may be either uncompressed (Targa-Type 2) or
- * run-length encoded (Targa-Type 10).
- *
- *
- * The following format options are available:
- *
- * Read  TGA image: "tga -matte <bool> -verbose <bool>"
- * Write TGA image: "tga -matte <bool> -verbose <bool> -compression <type>"
- *
- * -matte <bool>:       If set to false, a matte (alpha) channel is ignored 
- *                      during reading or writing. Default is true.
- * -verbose <bool>:     If set to true, additional information about the file
- *                      format is printed to stdout. Default is false.
- * -compression <type>: Set the compression mode to either "none" or "rle".
- * 			Default is "rle".
- *
- * Notes: 
- * 
- * - As Targa files do not have a "magic number" somewhere in the file header,
- *   it is difficult to automatically recognize this format.
- *   Therefore it should be specified as one of the first entries in the list of
- *   package require tkimg::*.
- *
- * ENDHEADER
- *
- * $Id: tga.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* #define DEBUG_LOCAL */
-
-/* Some defines and typedefs. */
-#define TRUE  1
-#define FALSE 0
-typedef unsigned char Boln;	/* Boolean value: TRUE or FALSE */
-typedef unsigned char UByte;	/* Unsigned  8 bit integer */
-typedef char  Byte;		/* Signed    8 bit integer */
-typedef short Short;		/* Signed   16 bit integer */
-typedef int Int;		/* Signed   32 bit integer */
-
-/* Supported TARGA version numbers */
-#define TGA_RGB_UNCOMP	 2
-#define TGA_RGB_COMP	10
-
-/* Macros needed for run-length encoding. */
-#define TGA_MODE_SAME	0
-#define TGA_MODE_DIFF	1
-#define MINRUN   3
-#define MAXRUN 127
-
-/* Macros for acessing header fields */
-#define ENC_LEFT_RIGHT(imgdes) (((imgdes >> 4) & 0x1)? FALSE: TRUE)
-#define ENC_TOP_BOTTOM(imgdes) (((imgdes >> 5) & 0x1)? TRUE: FALSE)
-#define NCHAN(pixsize)         ((pixsize == 24) ? 3: 4)
-#define IS_COMPRESSED(imgtyp)  ((imgtyp == TGA_RGB_COMP)? TRUE: FALSE)
-
-/* The Targa header structure */
-typedef struct {
-    UByte numid;
-    UByte maptyp;
-    UByte imgtyp;
-    Short maporig;
-    Short mapsize;
-    UByte mapbits;
-    Short xorig;
-    Short yorig;
-    Short xsize;
-    Short ysize;
-    UByte pixsize;
-    UByte imgdes;
-} TGAHEADER;
-
-/* Structure to hold information about the Targa file being processed. */
-typedef struct {
-    TGAHEADER th;
-    Int   scanrest,	/* Number of pixels belonging to next scanline */
-	  scanmode;	/* Current compression mode */
-    UByte *red,		/* Pointers to step through scanlines */
-	  *green,
-	  *blue,
-	  *matte;
-    UByte *redScan,	/* Buffer for one scanline: Red   channel */
-	  *greenScan,	/* Buffer for one scanline: Green channel */
-	  *blueScan,	/* Buffer for one scanline: Blue  channel */
-	  *matteScan;	/* Buffer for one scanline: Matte channel */
-    UByte *pixbuf;
-    #if defined (DEBUG_LOCAL)
-	Int total;
-    #endif      
-} TGAFILE;
-
-/* OPA TODO: Change from ANSI-C arguments to _ANSI_ARGS_ macro. */
-
-static void tgaClose (TGAFILE *tf)
-{
-    if (tf->redScan)   ckfree ((char *)tf->redScan);
-    if (tf->greenScan) ckfree ((char *)tf->greenScan);
-    if (tf->blueScan)  ckfree ((char *)tf->blueScan);
-    if (tf->matteScan) ckfree ((char *)tf->matteScan);
-    if (tf->pixbuf)    ckfree ((char *)tf->pixbuf);
-    return;
-}
-
-static Boln readError (Tcl_Interp *interp)
-{
-    Tcl_AppendResult(interp, "Unexpected end of file", (char *) NULL); 
-    return FALSE;
-}
-
-static Boln writeError (Tcl_Interp *interp)
-{
-    Tcl_AppendResult(interp, "Error writing to file", (char *) NULL); 
-    return FALSE;
-}
-
-/* Read 1 byte, representing an unsigned integer number. */
-
-static Boln readUByte (tkimg_MFile *handle, UByte *b)
-{
-    char buf[1];
-    if (1 != tkimg_Read (handle, buf, 1))
-        return FALSE;
-    *b = buf[0];
-    return TRUE;
-}
-
-/* Read 2 bytes, representing a short integer in the form <LowByte, HighByte>,
-   from a file and convert them into the current machine's format. */
-
-static Boln readShort (tkimg_MFile *handle, Short *s)
-{
-    char buf[2];
-    if (2 != tkimg_Read (handle, buf, 2))
-        return FALSE;
-    *s = (buf[0] & 0xFF) | (buf[1] << 8);
-    return TRUE;
-}
-
-/* Write a byte, representing an unsigned integer to a file. */
-
-static Boln writeUByte (tkimg_MFile *handle, UByte b)
-{
-    UByte buf[1];
-    buf[0] = b;
-    if (1 != tkimg_Write (handle, (CONST char *)buf, 1))
-        return FALSE;
-    return TRUE;
-}
-
-/* Write a byte, representing a signed integer to a file. */
-
-static Boln writeByte (tkimg_MFile *handle, Byte b)
-{
-    Byte buf[1];
-    buf[0] = b;
-    if (1 != tkimg_Write (handle, buf, 1))
-        return FALSE;
-    return TRUE;
-}
-
-/* Convert a short integer number into the format <LowByte, HighByte> (an array
-   of 2 bytes) and write the array to a file. */
-
-static Boln writeShort (tkimg_MFile *handle, Short s)
-{
-    Byte buf[2];
-    buf[0] = s;
-    buf[1] = s >> 8;
-    if (2 != tkimg_Write (handle, buf, 2))
-        return FALSE;
-    return TRUE;
-}
-
-#define OUT Tcl_WriteChars (outChan, str, -1)
-static void printImgInfo (TGAHEADER *th, CONST char *filename, CONST char *msg)
-{
-    Tcl_Channel outChan;
-    char str[256];
-
-    outChan = Tcl_GetStdChannel (TCL_STDOUT);
-    if (!outChan) {
-        return;
-    }
-
-    sprintf (str, "%s %s\n", msg, filename);                                   OUT;
-    sprintf (str, "\tSize in pixel      : %d x %d\n", th->xsize, th->ysize);   OUT;
-    sprintf (str, "\tNo. of channels    : %d\n", NCHAN(th->pixsize));          OUT;
-    sprintf (str, "\tCompression        : %s\n", 
-		IS_COMPRESSED(th->imgtyp)? "RLE": "None");                     OUT;
-    sprintf (str, "\tVertical encoding  : %s\n",
-		ENC_TOP_BOTTOM(th->imgdes)? "Top -> Bottom": "Bottom -> Top"); OUT;
-    sprintf (str, "\tHorizontal encoding: %s\n",
-		ENC_LEFT_RIGHT(th->imgdes)? "Left -> Right": "Right -> Left"); OUT;
-    Tcl_Flush (outChan);
-}
-#undef OUT
-static Boln readHeader (tkimg_MFile *handle, TGAHEADER *th)
-{
-    Int i;
-    UByte dummy;
-
-    if (!readUByte (handle, &th->numid) ||
-	!readUByte (handle, &th->maptyp) ||
-	!readUByte (handle, &th->imgtyp) ||
-	!readShort (handle, &th->maporig) ||
-	!readShort (handle, &th->mapsize) ||
-	!readUByte (handle, &th->mapbits) ||
-	!readShort (handle, &th->xorig) ||
-	!readShort (handle, &th->yorig) ||
-	!readShort (handle, &th->xsize) ||
-	!readShort (handle, &th->ysize) ||
-	!readUByte (handle, &th->pixsize) ||
-	!readUByte (handle, &th->imgdes))
-	return FALSE;
-
-    /* Try to find out if this file can possibly be a TARGA pixel file. */
-    if (!((th->imgtyp == TGA_RGB_UNCOMP || th->imgtyp == TGA_RGB_COMP) &&
-	  (th->pixsize == 24 || th->pixsize == 32))) {
-	return FALSE;
-    }
-
-    for ( i=0; i<th->numid; i++) {
-	if (!readUByte (handle, &dummy))
-	    return FALSE;
-    }
-
-    if (th->xsize < 1 || th->ysize < 1) {
-	return FALSE;
-    }
-
-    /* Skip colormap data, if present. */
-    if (th->mapsize > 0)
-    {	Int   mapbytes;
-	switch (th->mapbits)
-	{
-	    case 15:
-	    case 16:
-		mapbytes = 2 * th->mapsize;
-		break;
-	    case 24:
-		mapbytes = 3 * th->mapsize;
-		break;
-	    case 32:
-		mapbytes = 4 * th->mapsize;
-		break;
-	    default:
-		return FALSE;
-	}
-	while (mapbytes--)
-	    if (!readUByte (handle, &dummy))
-		return FALSE;
-    }
-    return TRUE;
-}
-
-static Boln writeHeader (tkimg_MFile *handle, TGAHEADER *th)
-{
-    if (!writeUByte (handle, th->numid) ||
-	!writeUByte (handle, th->maptyp) ||
-	!writeUByte (handle, th->imgtyp) ||
-	!writeShort (handle, th->maporig) ||
-	!writeShort (handle, th->mapsize) ||
-	!writeUByte (handle, th->mapbits) ||
-	!writeShort (handle, th->xorig) ||
-	!writeShort (handle, th->yorig) ||
-	!writeShort (handle, th->xsize) ||
-	!writeShort (handle, th->ysize) ||
-	!writeUByte (handle, th->pixsize) ||
-	!writeUByte (handle, th->imgdes))
-	return FALSE;
-    return TRUE;
-}
-
-/* A pixel is represented by 3 or 4 bytes in the order Blue/Green/Red/Alpha. 
-   We are converting the order into standard RGBA order. 
-   Note that TARGA allows pixel values to be compressed across scanline
-   boundaries. 
-*/
-
-/* Read the value of a pixel from "handle" and assume it must be repeated "n"
-   times.
-*/
-
-static Boln readRlePixel (Tcl_Interp *interp, tkimg_MFile *handle, UByte **pixBufPtr,
-                          Int *countPtr, Int stop, Int n, TGAFILE *tf)
-{
-    Int i, count, nchan;
-    UByte localBuf[4];
-
-    nchan = NCHAN(tf->th.pixsize);
-    if (nchan != tkimg_Read (handle, (char *)localBuf, nchan))
-	return readError (interp);
-    count = *countPtr;
-    for (i=0; i<n; i++)
-    {
-	#if defined (DEBUG_LOCAL)
-	    tf->total++;
-	#endif
-	(*pixBufPtr)[0] = localBuf[2];
-	(*pixBufPtr)[1] = localBuf[1];
-	(*pixBufPtr)[2] = localBuf[0];
-	if (nchan == 4)
-	    (*pixBufPtr)[3] = localBuf[3];
-	(*pixBufPtr) += nchan;
-	count++;
-
-	if (count == stop)
-	{   /* Scanline is filled with pixel values.
-	       Determine the number of pixels to keep for next scanline. */
-	    tf->scanrest = n - i - 1;
-	    *countPtr = count;
-	    return TRUE;
-	}
-    }
-    *countPtr = count;
-    return TRUE;
-}
-
-/* The channels of scan line number "y" are read. */
-
-static Boln tgaReadScan (Tcl_Interp *interp, tkimg_MFile *handle,
-                         TGAFILE *tf, Int y)
-{
-    Int   nchan;
-    Int   count, stop;
-    UByte localBuf[4];
-    UByte *pixBufPtr;
-
-    count = 0;
-    stop  = tf->th.xsize;
-    nchan = NCHAN(tf->th.pixsize);
-    pixBufPtr = tf->pixbuf;
-
-    #if defined (DEBUG_LOCAL)
-	tf->total = 0;
-    #endif
-
-    if (IS_COMPRESSED (tf->th.imgtyp)) {
-	Byte cbuf[1];
-	Int  pix, numpix;
-	/* While there are pixels left from the previous scanline,
-	   either fill the current scanline with the pixel value
-	   still stored in "pixbuf" (TGA_MODE_SAME) or read in the
-	   appropriate number of pixel values (TGA_MODE_DIFF). */
-	while (tf->scanrest) {
-	    if (tf->scanmode == TGA_MODE_DIFF) {   
-		if (nchan != tkimg_Read (handle, (char *)localBuf, nchan))
-		    return readError (interp);
-	    }
-	    #if defined (DEBUG_LOCAL)
-		tf->total++;
-	    #endif
-	    *pixBufPtr++ = localBuf[2];
-	    *pixBufPtr++ = localBuf[1];
-	    *pixBufPtr++ = localBuf[0];
-	    if (nchan == 4)
-		*pixBufPtr++ = localBuf[3];
-	    count++;
-
-	    tf->scanrest--;
-	    /* If the image is small, the compression might go over several
-	       scanlines. */
-	    if (count == stop)
-		return TRUE;
-	}
-
-	/* Read the byte telling us the compression mode and the compression
-	   count. Then read the pixel values till a scanline is filled. */
-	do {
-	    if (1 != tkimg_Read (handle, cbuf, 1))
-		return readError (interp);
-	    numpix = (cbuf[0] & 0x7F) + 1;
-
-	    if ((cbuf[0] & 0x80) != 0x80) {
-		tf->scanmode = TGA_MODE_DIFF;
-		for (pix=0; pix<numpix; pix++) {
-		    if (!readRlePixel (interp, handle, &pixBufPtr,
-				       &count, stop, 1, tf))
-			return FALSE;
-		    if (count == stop) {
-			tf->scanrest = numpix - pix - 1;
-			break;
-		    }
-		}
-	    } else {
-		tf->scanmode = TGA_MODE_SAME;
-		if (!readRlePixel (interp, handle, &pixBufPtr, 
-				   &count, stop, numpix, tf))
-		    return FALSE;
-	    }
-	} while (count < stop);
-
-	#if defined (DEBUG_LOCAL)
-	    printf ("\tScanline %d: Pixels: %d Rest: %d\n", 
-		    y, tf->total, tf->scanrest);
-	#endif
-    } else {
-	/* Read uncompressed pixel data. */
-	Int   i, bytesPerLine;
-	UByte curPix;
-	
-	bytesPerLine = nchan * tf->th.xsize;
-	if (bytesPerLine != tkimg_Read (handle, (char *)tf->pixbuf, bytesPerLine))
-	    return readError (interp);
-
-	for (i=0; i<stop; i++) {
-	    curPix = pixBufPtr[2];
-	    pixBufPtr[2] = pixBufPtr[0];
-	    pixBufPtr[0] = curPix;
-	    pixBufPtr += nchan;
-	}
-    }
-    return TRUE;
-}
-
-static Boln writePixel (tkimg_MFile *handle, UByte b, UByte g,
-			UByte r, UByte m, Int nchan)
-{
-    UByte buf[4];
-    buf[0] = b;
-    buf[1] = g;
-    buf[2] = r;
-    buf[3] = m;
-    if (nchan != tkimg_Write (handle, (CONST char *)buf, nchan))
-	return FALSE;
-    return TRUE;
-}
-
-static Boln tgaWriteScan (Tcl_Interp *interp, tkimg_MFile *handle,
-			  TGAFILE *tf, Int y)
-{
-    UByte *stop, *red_end, *green_end, *blue_end, *matte_end;
-    Int nchan;
-
-    tf->red = tf->redScan;
-    tf->green = tf->greenScan;
-    tf->blue = tf->blueScan;
-    tf->matte = tf->matteScan;
-    stop = tf->red + tf->th.xsize;
-    nchan = NCHAN (tf->th.pixsize);
-
-    /* Write the scanline data to the file. */
-    if (! IS_COMPRESSED (tf->th.imgtyp)) {
-	while (tf->red < stop)
-	{
-	    if (!writePixel (handle, *tf->blue, *tf->green, *tf->red, *tf->matte, nchan))
-		return FALSE;
-	    tf->blue++;
-	    tf->green++;
-	    tf->red++;
-	    tf->matte++;
-	}
-    }
-    else	/* Run-length Compression */
-    {
-	red_end = tf->red + 1;
-	green_end = tf->green + 1;
-	blue_end = tf->blue + 1;
-	matte_end = tf->matte + 1;
-	while (tf->red < stop)
-	{
-	    while (red_end < stop &&
-		   *tf->red == *red_end &&
-		   *tf->green == *green_end &&
-		   *tf->blue == *blue_end &&
-		   red_end - tf->red - 1 < MAXRUN)
-	    {
-		if (nchan == 4)
-		{
-		    if (*tf->matte != *matte_end)
-			break;
-		}
-		red_end++;
-		green_end++;
-		blue_end++;
-		matte_end++;
-	    }
-	    if (red_end - tf->red >= MINRUN)
-	    {	/* Found a run of compressable data */
-		if (!writeByte (handle, (Byte)(((red_end - tf->red)-1)|0x80)) ||
-		    !writePixel (handle, *tf->blue, *tf->green, *tf->red, *tf->matte, nchan))
-		    return FALSE;
-		tf->red = red_end;
-		tf->green = green_end;
-		tf->blue = blue_end;
-		tf->matte = matte_end;
-	    }
-	    else
-	    {	/* Found a run of uncompressable data */
-		while (red_end < stop &&
-		       ((red_end + 1 >= stop ||
-			*red_end != *(red_end + 1)) ||
-			(red_end + 2 >= stop ||
-			*(red_end + 1) != *(red_end + 2))) &&
-		       ((green_end + 1 >= stop ||
-			*green_end != *(green_end + 1)) ||
-			(green_end + 2 >= stop ||
-			*(green_end + 1) != *(green_end + 2))) &&
-		       ((blue_end + 1 >= stop ||
-			*blue_end != *(blue_end + 1)) ||
-			(blue_end + 2 >= stop ||
-			*(blue_end + 1) != *(blue_end + 2))) &&
-			red_end - tf->red < MAXRUN)
-		{
-		    if (nchan == 4)
-		    {
-		        if (! ((matte_end + 1 >= stop ||
-			       *matte_end != *(matte_end + 1)) ||
-			       (matte_end + 2 >= stop ||
-			       *(matte_end + 1) != *(matte_end + 2))))
-			    break;
-		    }
-		    red_end++;
-		    green_end++;
-		    blue_end++;
-		    matte_end++;
-		}
-		if (!writeByte (handle, (Byte)((red_end - tf->red) - 1)))
-		    return FALSE;
-		while (tf->red < red_end)
-		{
-		    if (!writePixel (handle, *tf->blue, *tf->green, *tf->red, *tf->matte, nchan))
-			return FALSE;
-		    tf->red++;
-		    tf->green++;
-		    tf->blue++;
-		    tf->matte++;
-		}
-	    }
-	    red_end++;
-	    green_end++;
-	    blue_end++;
-	    matte_end++;
-	}
-    }
-    return TRUE;
-}
-
-/* 
- * Here is the start of the standard functions needed for every image format.
- */
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int ParseFormatOpts _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-               int *comp, int *verb, int *matte));
-static int CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widthPtr,
-	       int *heightPtr, TGAHEADER *tgaHeaderPtr));
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-	       CONST char *filename, Tcl_Obj *format,
-	       Tk_PhotoHandle imageHandle, int destX, int destY,
-	       int width, int height, int srcX, int srcY));
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp,
-	       CONST char *filename, Tcl_Obj *format,   
-	       tkimg_MFile *handle, Tk_PhotoImageBlock *blockPtr));
-
-static int ParseFormatOpts (interp, format, comp, verb, matte)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    int *comp;
-    int *verb;
-    int *matte;
-{
-    static char *tgaOptions[] = {"-compression", "-verbose", "-matte"};
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *compression, *verbose, *transp;
-
-    *comp = TGA_RGB_COMP;
-    *verb = 0;
-    *matte = 1;
-    if (tkimg_ListObjGetElements (interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	compression = "rle";
-	verbose     = "0";
-	transp      = "1";
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj (interp, objv[i], tgaOptions,
-		    "format option", 0, &index) != TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult (interp, "No value for option \"",
-			Tcl_GetStringFromObj (objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    compression = Tcl_GetStringFromObj(objv[i], (int *) NULL);
-		    break;
-		case 1:
-		    verbose = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-		case 2:
-		    transp = Tcl_GetStringFromObj(objv[i], (int *) NULL); 
-		    break;
-	    }
-	}
-
-	c = compression[0]; length = strlen (compression);
-	if ((c == 'n') && (!strncmp (compression, "none", length))) {
-	    *comp = TGA_RGB_UNCOMP;
-	} else if ((c == 'r') && (!strncmp (compression, "rle",length))) {
-	    *comp = TGA_RGB_COMP;
-	} else {
-	    Tcl_AppendResult (interp, "invalid compression mode \"",
-		    compression, "\": should be rle or none", (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-	c = verbose[0]; length = strlen (verbose);
-	if (!strncmp (verbose, "1", length) || \
-	    !strncmp (verbose, "true", length) || \
-	    !strncmp (verbose, "on", length)) {
-	    *verb = 1;
-	} else if (!strncmp (verbose, "0", length) || \
-	    !strncmp (verbose, "false", length) || \
-	    !strncmp (verbose, "off", length)) {
-	    *verb = 0;
-	} else {
-	    Tcl_AppendResult (interp, "invalid verbose mode \"", verbose, 
-                              "\": should be 1 or 0, on or off, true or false",
-			      (char *) NULL);
-	    return TCL_ERROR;
-	}
-
-        c = transp[0]; length = strlen (transp);
-        if (!strncmp (transp, "1", length) || \
-            !strncmp (transp, "true", length) || \
-            !strncmp (transp, "on", length)) {
-            *matte = 1;
-        } else if (!strncmp (transp, "0", length) || \
-            !strncmp (transp, "false", length) || \
-            !strncmp (transp, "off", length)) {
-            *matte = 0;
-        } else {
-            Tcl_AppendResult (interp, "invalid alpha (matte) mode \"", verbose,
-                              "\": should be 1 or 0, on or off, true or false",
-                              (char *) NULL);
-            return TCL_ERROR;
-        }   
-    }
-    return TCL_OK;
-}
-
-static int ChnMatch (interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc (&interp, &chan, &filename, &format,
-                            &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL);
-}
-
-static int ObjMatch (interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc (&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit (data, 0, &handle)) {
-        tkimg_ReadInit (data, '*', &handle);
-    }
-    return CommonMatch (&handle, widthPtr, heightPtr, NULL);
-}
-
-static int CommonMatch (handle, widthPtr, heightPtr, tgaHeaderPtr)
-    tkimg_MFile *handle;
-    int *widthPtr;
-    int *heightPtr;
-    TGAHEADER *tgaHeaderPtr;
-{
-    TGAHEADER th;
-
-    if (!readHeader (handle, &th))
-	return 0;
-
-    *widthPtr  = th.xsize;
-    *heightPtr = th.ysize;
-    if (tgaHeaderPtr)
-	*tgaHeaderPtr = th;
-    return 1;
-}
-
-static int ChnRead (interp, chan, filename, format, imageHandle,
-                    destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;           /* The image channel, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-			         * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonRead (interp, &handle, filename, format, imageHandle,
-                       destX, destY, width, height, srcX, srcY);
-}
-
-static int ObjRead (interp, data, format, imageHandle,
-	            destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    tkimg_MFile handle;
-
-    if (!tkimg_ReadInit (data, 0, &handle)) {
-        tkimg_ReadInit (data, '*', &handle);
-    }
-    return CommonRead (interp, &handle, "InlineData", format, imageHandle,
-                       destX, destY, width, height, srcX, srcY);
-}
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int CommonRead (interp, handle, filename, format, imageHandle,
-                       destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;         /* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;        /* The image file, open for reading. */
-    CONST char *filename;       /* The name of the image file. */
-    Tcl_Obj *format;            /* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle; /* The photo image to write into. */
-    int destX, destY;           /* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;          /* Dimensions of block of photo image to
-			         * be written to. */
-    int srcX, srcY;             /* Coordinates of top-left pixel to be used
-			         * in image being read. */
-{
-    myblock bl;
-    Int y, nchan;
-    int fileWidth, fileHeight;
-    int stopY, outY, outWidth, outHeight;
-    TGAFILE tf;
-    int compr, verbose, matte;
-    char errMsg[200];
-     
-    memset (&tf, 0, sizeof (TGAFILE));
-    if (ParseFormatOpts (interp, format, &compr, &verbose, &matte) != TCL_OK) {
-	return TCL_ERROR;
-    } 
-
-    CommonMatch (handle, &fileWidth, &fileHeight, &tf.th);
-    if (verbose)
-	printImgInfo (&tf.th, filename, "Reading image:");
-
-    if ((srcX + width) > fileWidth) {
-	outWidth = fileWidth - srcX;
-    } else {
-	outWidth = width;
-    }
-    if ((srcY + height) > fileHeight) {
-	outHeight = fileHeight - srcY;
-    } else {
-	outHeight = height;
-    }
-    if ((outWidth <= 0) || (outHeight <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    if (IS_COMPRESSED (tf.th.imgtyp)) {
-	tkimg_ReadBuffer (1);
-    }
-
-    tf.scanmode = TGA_MODE_DIFF;
-    tkimg_PhotoExpand(imageHandle, interp, destX + outWidth, destY + outHeight);
-
-    nchan = NCHAN (tf.th.pixsize);
-
-    tf.pixbuf = (UByte *) ckalloc (fileWidth * nchan);
-    if (!tf.pixbuf) {
-	sprintf (errMsg, "Can't allocate memory of size %d", fileWidth * nchan);
-	Tcl_AppendResult (interp, errMsg, (char *)NULL);
-	tkimg_ReadBuffer (0);
-	return TCL_ERROR;
-    }
-
-    block.pixelSize = nchan;
-    block.pitch = fileWidth * nchan;
-    block.width = outWidth;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = (nchan == 4 && matte? 3: 0);
-    block.pixelPtr = tf.pixbuf + srcX * nchan;
-
-    stopY = srcY + outHeight;
-
-    if (ENC_TOP_BOTTOM (tf.th.imgdes)) {
-	outY = destY;
-	for (y=0; y<stopY; y++) {
-	    tgaReadScan (interp, handle, &tf, y);
-	    if (y >= srcY) {
-		tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, outY, width, 1);
-		outY++;
-	    }
-	}
-    } else {
-	outY = destY + outHeight - 1;
-	for (y=fileHeight-1; y>=0; y--) {
-	    tgaReadScan (interp, handle, &tf, y);
-	    if (y >= srcY && y < stopY) {
-		tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, outY, width, 1);
-		outY--;
-	    }
-	}
-    }
-    tgaClose (&tf);
-    tkimg_ReadBuffer (0);
-    return TCL_OK ;
-}
-
-static int ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan;
-    tkimg_MFile handle;
-    int result;
-
-    chan = tkimg_OpenFileChannel (interp, filename, 0644);
-    if (!chan) {
-	return TCL_ERROR;
-    }
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    result = CommonWrite (interp, filename, format, &handle, blockPtr);
-    if (Tcl_Close(interp, chan) == TCL_ERROR) {
-	return TCL_ERROR;
-    }
-    return result;
-}
-
-static int StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    tkimg_MFile handle;
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc (&data, &interp, &dataPtr, &format, &blockPtr);
-
-    tkimg_WriteInit (dataPtr, &handle);
-    result = CommonWrite (interp, "InlineData", format, &handle, blockPtr);
-    tkimg_Putc(IMG_DONE, &handle);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult (interp, dataPtr);
-    }
-    return result;
-}
-
-static int CommonWrite (interp, filename, format, handle, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    tkimg_MFile *handle;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Int     x, y, nchan;
-    Int     redOffset, greenOffset, blueOffset, alphaOffset; 
-    UByte   *pixelPtr, *rowPixPtr;
-    TGAFILE tf;
-    int compr, verbose, matte; /* Format options */
-    char errMsg[200];
-
-    memset (&tf, 0, sizeof (TGAFILE));
-    if (ParseFormatOpts(interp, format, &compr, &verbose, &matte) != TCL_OK) {
-	return TCL_ERROR;
-    }
-
-    redOffset   = 0;
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset  = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-
-    if (alphaOffset < blockPtr->offset[2]) {
-        alphaOffset = blockPtr->offset[2];
-    }
-    if (++alphaOffset < blockPtr->pixelSize) {
-        alphaOffset -= blockPtr->offset[0];
-    } else {
-        alphaOffset = 0;   
-    }
-
-    nchan = ((matte && alphaOffset)? 4: 3);
-
-    tf.redScan   = (UByte *) ckalloc (blockPtr->width);
-    tf.greenScan = (UByte *) ckalloc (blockPtr->width);
-    tf.blueScan  = (UByte *) ckalloc (blockPtr->width);
-    tf.matteScan = (UByte *) ckalloc (blockPtr->width);
-    if (!tf.redScan || !tf.greenScan || !tf.blueScan || !tf.matteScan) {
-	sprintf (errMsg, "Can't allocate memory of size %d", blockPtr->width);
-	Tcl_AppendResult (interp, errMsg, (char *)NULL);
-	return TCL_ERROR;
-    }
-
-    /* Fill the targa header struct and write the header to the channel. */
-    tf.th.pixsize = nchan * 8;
-    tf.th.xsize = blockPtr->width;
-    tf.th.ysize = blockPtr->height;
-    tf.th.imgdes = (1 << 5);    	/* Top->Bottom, Left->Right encoding */
-    tf.th.imgtyp = compr;		/* Uncompressed or RLE-compressed */
-
-    if (!writeHeader (handle, &tf.th)) {
-	return TCL_ERROR;
-    }
-
-    rowPixPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    for (y = 0; y < blockPtr->height; y++) {
-	tf.red = tf.redScan;
-	tf.green = tf.greenScan;
-	tf.blue = tf.blueScan;
-	tf.matte = tf.matteScan;
-	pixelPtr = rowPixPtr;
-	for (x = 0; x < blockPtr->width; x++) {
-	    *(tf.red++)   = pixelPtr[redOffset];
-	    *(tf.green++) = pixelPtr[greenOffset];
-	    *(tf.blue++)  = pixelPtr[blueOffset];
-	    if (nchan == 4) {
-		/* Have a matte channel and write it. */
-		*(tf.matte++) = pixelPtr[alphaOffset];
-	    }
-	    pixelPtr += blockPtr->pixelSize;
-	}
-	if (!tgaWriteScan (interp, handle, &tf, y)) {
-	    tgaClose (&tf);
-	    return TCL_ERROR;
-	}
-	rowPixPtr += blockPtr->pitch;
-    }
-    if (verbose)
-        printImgInfo (&tf.th, filename, "Saving image:");
-    tgaClose (&tf);
-    return TCL_OK;
-}
diff --git a/tkimg1.3/tiff/ChangeLog b/tkimg1.3/tiff/ChangeLog
deleted file mode 100644
index f668f34..0000000
--- a/tkimg1.3/tiff/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2004-08-16  Andreas Kupries  <andreask at activestate.com>
-
-	* tiff.c (SetupTiffLibrary): Replaced the hardwired version number
-	  of wrapper tifftcl with macro TIFFTCL_VERSION.
-
-2002-11-26  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* tiff.c: Now compiles, with extended tifftcl (see there).
-	* tiffZip.c: Compiles.
-	* tiffJpeg.c: Compiles.
-	* tiffPixar.c: Compiles.
-	* Compiles ok, library loads ok.
-
-	* Start of logging.
-	* tkimg/tiff: TIFF photo image type.
diff --git a/tkimg1.3/tiff/Makefile.in b/tkimg1.3/tiff/Makefile.in
deleted file mode 100644
index 6471bda..0000000
--- a/tkimg1.3/tiff/Makefile.in
+++ /dev/null
@@ -1,572 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgtiff TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.2 2007/01/03 23:00:27 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgtiff_SOURCES	=	\
-		tiff.c		\
-		tiffZip.c	\
-		tiffJpeg.c	\
-		tiffPixar.c	\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgtiff_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgtiff_OBJECTS	= $(tkimgtiff_SOURCES:.c=. at OBJEXT@)
-tkimgtiff_LIB_FILE	= @tkimgtiff_LIB_FILE@
-
-## tkimgtiffstub_OBJECTS	= tkimgtiffStubLib.$(OBJEXT)
-## tkimgtiffstub_LIB_FILE= @tkimgtiffstub_LIB_FILE@
-
-tifftcl_SRC_PATH	= @tifftcl_SRC_PATH@
-tifftcl_BUILD_PATH	= @tifftcl_BUILD_PATH@
-tifftcl_VERSION		= @tifftcl_VERSION@
-
-jpegtcl_SRC_PATH	= @jpegtcl_SRC_PATH@
-jpegtcl_BUILD_PATH	= @jpegtcl_BUILD_PATH@
-jpegtcl_VERSION		= @jpegtcl_VERSION@
-
-zlibtcl_SRC_PATH	= @zlibtcl_SRC_PATH@
-zlibtcl_BUILD_PATH	= @zlibtcl_BUILD_PATH@
-zlibtcl_VERSION		= @zlibtcl_VERSION@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	=				\
-		-I$(tkimg_SRC_PATH)		\
-		-I$(tifftcl_SRC_PATH)		\
- 		-I$(tifftcl_BUILD_PATH)/..	\
-		-I$(tifftcl_BUILD_PATH)/libtiff	\
-		-I$(jpegtcl_SRC_PATH)		\
-		-I$(jpegtcl_BUILD_PATH)/libjpeg	\
- 		-I$(jpegtcl_BUILD_PATH)/libjpeg/libjpeg	\
-		-I$(zlibtcl_SRC_PATH)		\
-		-I$(zlibtcl_BUILD_PATH)		\
-		-I. -I$(srcdir)			\
-		@TCL_INCLUDES@			\
-		@TK_INCLUDES@			\
-		$(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"	\
-		-DTIFFTCL_VERSION=\"$(tifftcl_VERSION)\"	\
-		-DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\"	\
-		-DZLIBTCL_VERSION=\"$(zlibtcl_VERSION)\"
-
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgtiff_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgtiff_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgtiff.$(OBJEXT): $(srcdir)/generic/tkimgtiff.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgtiff.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgtiff/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgtiffConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgtiff.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgtiff_DECLS = \
-	$(srcdir)/tkimgtiff.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgtiff_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgtiff_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/tiff/README b/tkimg1.3/tiff/README
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/tiff/README
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/tiff/aclocal.m4 b/tkimg1.3/tiff/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/tiff/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/tiff/configure b/tkimg1.3/tiff/configure
deleted file mode 100755
index 90fdc7c..0000000
--- a/tkimg1.3/tiff/configure
+++ /dev/null
@@ -1,6921 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgtiff', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tifftcl              directory containing tifftcl configuration (tifftclConfig.sh)"
-ac_help="$ac_help
-  --with-jpegtcl              directory containing jpegtcl configuration (jpegtclConfig.sh)"
-ac_help="$ac_help
-  --with-zlibtcl              directory containing zlibtcl configuration (zlibtclConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./tiff.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgtiff
-DPACKAGE="img::tiff"
-PHIMGTYPE="tiff"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGTIFF_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgtiffstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGTIFF_VERSION "${TKIMGTIFF_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1460: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1472: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1542: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1616: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1691: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1763: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1849: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1854 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1882: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1887 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1911: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1926 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1943 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1960 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2000: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2030: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2081: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2113: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2124 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2155: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2160: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2188: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2227: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2231 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2263: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2321: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2355: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2388: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2414: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2451: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2458 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2473 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2561: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2567 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2586 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2617: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2623 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2652: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2658 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2687: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2693 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2726: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2728 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2775: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2780 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2812: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2817 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2849: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2854 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2886: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2891 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2923: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2928 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2956 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2984 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:3005: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3038 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3052 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3078: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3115: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3120 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3157: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3162 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3197: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3202 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3247: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3316: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3385: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-    #
-    # Ok, lets find the tifftcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tifftcl
-    #
-
-    if test x"${no_tifftcl}" = x ; then
-	# we reset no_tifftcl in case something fails here
-	no_tifftcl=true
-	# Check whether --with-tifftcl or --without-tifftcl was given.
-if test "${with_tifftcl+set}" = set; then
-  withval="$with_tifftcl"
-  with_tifftclconfig=${withval}
-fi
-
-	echo $ac_n "checking for tifftcl configuration""... $ac_c" 1>&6
-echo "configure:3438: checking for tifftcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tifftclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tifftcl was specified.
-	    if test x"${with_tifftclconfig}" != x ; then
-		if test -f "${with_tifftclconfig}/tifftclConfig.sh" ; then
-		    ac_cv_c_tifftclconfig=`(cd ${with_tifftclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tifftclconfig} directory doesn't contain tifftclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tifftcl installation
-	    if test x"${ac_cv_c_tifftclconfig}" = x ; then
-		for i in \
-			../tifftcl \
-			`ls -dr ../tifftcl[8-9].[0-9]* 2>/dev/null` \
-			../../tifftcl \
-			`ls -dr ../../tifftcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tifftcl \
-			`ls -dr ../../../tifftcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tifftcl \
-			`ls -dr ${srcdir}/../tifftcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tifftclConfig.sh" ; then
-			ac_cv_c_tifftclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tifftclConfig.sh" ; then
-			ac_cv_c_tifftclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tifftclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tifftclConfig.sh" ; then
-			ac_cv_c_tifftclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tifftclconfig}" = x ; then
-	    tifftcl_BIN_DIR="# no tifftcl configs found"
-	    echo "configure: warning: "Cannot find tifftcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tifftcl=
-	    tifftcl_BIN_DIR=${ac_cv_c_tifftclconfig}
-	    echo "$ac_t""found $tifftcl_BIN_DIR/tifftclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tifftcl_BIN_DIR}/tifftclConfig.sh""... $ac_c" 1>&6
-echo "configure:3507: checking for existence of ${tifftcl_BIN_DIR}/tifftclConfig.sh" >&5
-
-    if test -f "${tifftcl_BIN_DIR}/tifftclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tifftcl_BIN_DIR}/tifftclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tifftcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tifftcl_LIB_SPEC will be set to the value
-    # of tifftcl_BUILD_LIB_SPEC. An extension should make use of tifftcl_LIB_SPEC
-    # instead of tifftcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tifftcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tifftcl" 1>&2
-        tifftcl_LIB_SPEC=${tifftcl_BUILD_LIB_SPEC}
-        tifftcl_STUB_LIB_SPEC=${tifftcl_BUILD_STUB_LIB_SPEC}
-        tifftcl_STUB_LIB_PATH=${tifftcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-    #
-    # Ok, lets find the jpegtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-jpegtcl
-    #
-
-    if test x"${no_jpegtcl}" = x ; then
-	# we reset no_jpegtcl in case something fails here
-	no_jpegtcl=true
-	# Check whether --with-jpegtcl or --without-jpegtcl was given.
-if test "${with_jpegtcl+set}" = set; then
-  withval="$with_jpegtcl"
-  with_jpegtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for jpegtcl configuration""... $ac_c" 1>&6
-echo "configure:3561: checking for jpegtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_jpegtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-jpegtcl was specified.
-	    if test x"${with_jpegtclconfig}" != x ; then
-		if test -f "${with_jpegtclconfig}/jpegtclConfig.sh" ; then
-		    ac_cv_c_jpegtclconfig=`(cd ${with_jpegtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_jpegtclconfig} directory doesn't contain jpegtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private jpegtcl installation
-	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-		for i in \
-			../jpegtcl \
-			`ls -dr ../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			../../jpegtcl \
-			`ls -dr ../../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../jpegtcl \
-			`ls -dr ../../../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../jpegtcl \
-			`ls -dr ${srcdir}/../jpegtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/jpegtclConfig.sh" ; then
-			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_jpegtclconfig}" = x ; then
-	    jpegtcl_BIN_DIR="# no jpegtcl configs found"
-	    echo "configure: warning: "Cannot find jpegtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_jpegtcl=
-	    jpegtcl_BIN_DIR=${ac_cv_c_jpegtclconfig}
-	    echo "$ac_t""found $jpegtcl_BIN_DIR/jpegtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3630: checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh" >&5
-
-    if test -f "${jpegtcl_BIN_DIR}/jpegtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${jpegtcl_BIN_DIR}/jpegtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the jpegtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable jpegtcl_LIB_SPEC will be set to the value
-    # of jpegtcl_BUILD_LIB_SPEC. An extension should make use of jpegtcl_LIB_SPEC
-    # instead of jpegtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${jpegtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for jpegtcl" 1>&2
-        jpegtcl_LIB_SPEC=${jpegtcl_BUILD_LIB_SPEC}
-        jpegtcl_STUB_LIB_SPEC=${jpegtcl_BUILD_STUB_LIB_SPEC}
-        jpegtcl_STUB_LIB_PATH=${jpegtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-    #
-    # Ok, lets find the zlibtcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-zlibtcl
-    #
-
-    if test x"${no_zlibtcl}" = x ; then
-	# we reset no_zlibtcl in case something fails here
-	no_zlibtcl=true
-	# Check whether --with-zlibtcl or --without-zlibtcl was given.
-if test "${with_zlibtcl+set}" = set; then
-  withval="$with_zlibtcl"
-  with_zlibtclconfig=${withval}
-fi
-
-	echo $ac_n "checking for zlibtcl configuration""... $ac_c" 1>&6
-echo "configure:3684: checking for zlibtcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_zlibtclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-zlibtcl was specified.
-	    if test x"${with_zlibtclconfig}" != x ; then
-		if test -f "${with_zlibtclconfig}/zlibtclConfig.sh" ; then
-		    ac_cv_c_zlibtclconfig=`(cd ${with_zlibtclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private zlibtcl installation
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in \
-			../zlibtcl \
-			`ls -dr ../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../zlibtcl \
-			`ls -dr ../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			../../../zlibtcl \
-			`ls -dr ../../../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../zlibtcl \
-			`ls -dr ${srcdir}/../zlibtcl[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/zlibtclConfig.sh" ; then
-			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_zlibtclconfig}" = x ; then
-	    zlibtcl_BIN_DIR="# no zlibtcl configs found"
-	    echo "configure: warning: "Cannot find zlibtcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_zlibtcl=
-	    zlibtcl_BIN_DIR=${ac_cv_c_zlibtclconfig}
-	    echo "$ac_t""found $zlibtcl_BIN_DIR/zlibtclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh""... $ac_c" 1>&6
-echo "configure:3753: checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh" >&5
-
-    if test -f "${zlibtcl_BIN_DIR}/zlibtclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${zlibtcl_BIN_DIR}/zlibtclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the zlibtcl_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable zlibtcl_LIB_SPEC will be set to the value
-    # of zlibtcl_BUILD_LIB_SPEC. An extension should make use of zlibtcl_LIB_SPEC
-    # instead of zlibtcl_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${zlibtcl_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for zlibtcl" 1>&2
-        zlibtcl_LIB_SPEC=${zlibtcl_BUILD_LIB_SPEC}
-        zlibtcl_STUB_LIB_SPEC=${zlibtcl_BUILD_STUB_LIB_SPEC}
-        zlibtcl_STUB_LIB_PATH=${zlibtcl_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tifftcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tifftcl_SRC_DIR in
-/*)	tifftcl_SRC_PATH=$tifftcl_SRC_DIR
-	;;
-\.)	# SRC_DIR relative, splice with BUILD_PATH
-	tifftcl_SRC_PATH="`dirname $tifftcl_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tifftcl_SRC_PATH="`dirname $tifftcl_BUILD_STUB_LIB_PATH`/$tifftcl_SRC_DIR"
-esac
-
-tifftcl_BUILD_PATH="`dirname $tifftcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tifftcl_SRC_PATH="\"`$CYGPATH $tifftcl_SRC_PATH`\""
-    tifftcl_BUILD_PATH="\"`$CYGPATH $tifftcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'jpegtcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $jpegtcl_SRC_DIR in
-/*)	jpegtcl_SRC_PATH=$jpegtcl_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
- 	jpegtcl_SRC_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	jpegtcl_SRC_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`/$jpegtcl_SRC_DIR"
-esac
-
-jpegtcl_BUILD_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    jpegtcl_SRC_PATH="\"`$CYGPATH $jpegtcl_SRC_PATH`\""
-    jpegtcl_BUILD_PATH="\"`$CYGPATH $jpegtcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'zlibtcl' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $zlibtcl_SRC_DIR in
-/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
-	;;
-\.)     # SRC_DIR top level, splice with BUILD_PATH
-	zlibtcl_SRC_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`"
- 	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	zlibtcl_SRC_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR"
-esac
-
-zlibtcl_BUILD_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    zlibtcl_SRC_PATH="\"`$CYGPATH $zlibtcl_SRC_PATH`\""
-    zlibtcl_BUILD_PATH="\"`$CYGPATH $zlibtcl_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3894: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3957: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgtiff in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgtiff 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:4083: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4091 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:4131: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4139 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:4178: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4186 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:4223: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4231 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:4265: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4273 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4324: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4329 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4380: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4385 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:4438: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4476: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4522: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4536: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4557: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4586: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4594 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4649: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4806: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4814 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4907: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4915 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4991: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4999 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:5130: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5135 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:5197: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5202 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5262: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5267 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5299: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5301 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5636: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5639 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5692: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5694 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5730: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5732 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5768: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5770 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5912: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5970: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 6032 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6106 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 6203 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:6228: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 6231 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:6272: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:6292: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6300 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TIFFTCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_JPEGTCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_ZLIBTCL_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tifftcl_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6477: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6509: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGTIFF_VERSION@%$TKIMGTIFF_VERSION%g
-s%@tkimgtiff_LIB_FILE@%$tkimgtiff_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tifftcl_VERSION@%$tifftcl_VERSION%g
-s%@tifftcl_SRC_DIR@%$tifftcl_SRC_DIR%g
-s%@tifftcl_LIB_FILE@%$tifftcl_LIB_FILE%g
-s%@tifftcl_LIB_SPEC@%$tifftcl_LIB_SPEC%g
-s%@tifftcl_STUB_LIB_FILE@%$tifftcl_STUB_LIB_FILE%g
-s%@tifftcl_STUB_LIB_SPEC@%$tifftcl_STUB_LIB_SPEC%g
-s%@tifftcl_STUB_LIB_PATH@%$tifftcl_STUB_LIB_PATH%g
-s%@jpegtcl_VERSION@%$jpegtcl_VERSION%g
-s%@jpegtcl_SRC_DIR@%$jpegtcl_SRC_DIR%g
-s%@jpegtcl_LIB_FILE@%$jpegtcl_LIB_FILE%g
-s%@jpegtcl_LIB_SPEC@%$jpegtcl_LIB_SPEC%g
-s%@jpegtcl_STUB_LIB_FILE@%$jpegtcl_STUB_LIB_FILE%g
-s%@jpegtcl_STUB_LIB_SPEC@%$jpegtcl_STUB_LIB_SPEC%g
-s%@jpegtcl_STUB_LIB_PATH@%$jpegtcl_STUB_LIB_PATH%g
-s%@zlibtcl_VERSION@%$zlibtcl_VERSION%g
-s%@zlibtcl_SRC_DIR@%$zlibtcl_SRC_DIR%g
-s%@zlibtcl_LIB_FILE@%$zlibtcl_LIB_FILE%g
-s%@zlibtcl_LIB_SPEC@%$zlibtcl_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_FILE@%$zlibtcl_STUB_LIB_FILE%g
-s%@zlibtcl_STUB_LIB_SPEC@%$zlibtcl_STUB_LIB_SPEC%g
-s%@zlibtcl_STUB_LIB_PATH@%$zlibtcl_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@tifftcl_SRC_PATH@%$tifftcl_SRC_PATH%g
-s%@tifftcl_BUILD_PATH@%$tifftcl_BUILD_PATH%g
-s%@jpegtcl_SRC_PATH@%$jpegtcl_SRC_PATH%g
-s%@jpegtcl_BUILD_PATH@%$jpegtcl_BUILD_PATH%g
-s%@zlibtcl_SRC_PATH@%$zlibtcl_SRC_PATH%g
-s%@zlibtcl_BUILD_PATH@%$zlibtcl_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/tiff/configure.in b/tkimg1.3/tiff/configure.in
deleted file mode 100644
index 04b0507..0000000
--- a/tkimg1.3/tiff/configure.in
+++ /dev/null
@@ -1,250 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgtiff', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./tiff.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgtiff
-DPACKAGE="img::tiff"
-PHIMGTYPE="tiff"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGTIFF_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGTIFF_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgtiff_LIB_FILE)
-#AC_SUBST(tkimgtiffstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGTIFF_VERSION, "${TKIMGTIFF_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-
-TEA_PATH_CONFIG(tifftcl)
-TEA_LOAD_CONFIG(tifftcl)
-AC_SUBST(tifftcl_VERSION)
-
-TEA_PATH_CONFIG(jpegtcl)
-TEA_LOAD_CONFIG(jpegtcl)
-AC_SUBST(jpegtcl_VERSION)
-
-TEA_PATH_CONFIG(zlibtcl)
-TEA_LOAD_CONFIG(zlibtcl)
-AC_SUBST(zlibtcl_VERSION)
-
-IMG_SRCPATH(tkimg)
-IMG_SRCPATH(tifftcl)
-IMG_SRCPATH(jpegtcl)
-IMG_SRCPATH(zlibtcl)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgtiff in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgtiff)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-AC_DEFINE(USE_TIFFTCL_STUBS)
-AC_DEFINE(USE_JPEGTCL_STUBS)
-AC_DEFINE(USE_ZLIBTCL_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tifftcl_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/tiff/pkgIndex.tcl.in b/tkimg1.3/tiff/pkgIndex.tcl.in
deleted file mode 100644
index a8538a9..0000000
--- a/tkimg1.3/tiff/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgtiff_LIB_FILE@]]
diff --git a/tkimg1.3/tiff/tests/all.tcl b/tkimg1.3/tiff/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/tiff/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/tiff/tests/folder.tif b/tkimg1.3/tiff/tests/folder.tif
deleted file mode 100644
index 22a1496..0000000
Binary files a/tkimg1.3/tiff/tests/folder.tif and /dev/null differ
diff --git a/tkimg1.3/tiff/tests/tiff.test b/tkimg1.3/tiff/tests/tiff.test
deleted file mode 100644
index 8778fbc..0000000
--- a/tkimg1.3/tiff/tests/tiff.test
+++ /dev/null
@@ -1,52 +0,0 @@
-# This file is a Tcl script to test out TIFF reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::tiff [package require img::tiff]"
-
-set tiffdata \
-{TU0AKgAAAkgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AADw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw
-/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
-/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
-/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
-/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAA
-AAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAA
-AAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAAB
-ABAAAAEBAAMAAAABAAwAAAECAAMAAAADAAAC9gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAER
-AAQAAAABAAAACAESAAMAAAABAAEAAAEVAAMAAAABAAMAAAEWAAMAAAABAAwAAAEXAAQAAAAB
-AAACQAEaAAUAAAABAAAC/AEbAAUAAAABAAADBAEcAAMAAAABAAEAAAEoAAMAAAABAAIAAAAA
-AAAACAAIAAgSwAAAAAQAABLAAAAABAAA}
-
-test tiff-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.tif]
-} i
-test tiff-1.2 {} {
-    catch {image delete i}
-    image create photo i
-    i put $tiffdata
-    i data -format {tiff -byteorder bigendian}
-} $tiffdata
-test tiff-1.3 {} {
-    i blank
-    i put $tiffdata -format tiff
-    i data -format {tiff -byteorder bigendian}
-} $tiffdata
-
-if {[info tclversion] < 8.0} {
-    return
-}
-
-test tiff-2.0 {Binary I/O with TIFF images} {
-    i blank
-    set f [open [file join $tcltest::testsDirectory folder.tif] r]
-    fconfigure $f -translation binary
-    set return [catch {i put [read $f]} msg]
-    close $f
-    lappend return $msg
-} {0 {}}
-
diff --git a/tkimg1.3/tiff/tiff.c b/tkimg1.3/tiff/tiff.c
deleted file mode 100644
index da0f807..0000000
--- a/tkimg1.3/tiff/tiff.c
+++ /dev/null
@@ -1,972 +0,0 @@
-/*
- * tiff.c --
- *
- * A photo image file handler for TIFF files.
- *
- * Uses the libtiff.so library, which is dynamically
- * loaded only when used.
- */
-
-/* Author : Jan Nijtmans */
-/* Date   : 7/16/97      */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include <tcl.h>
-#include <tifftcl.h>
-#include <jpegtcl.h>
-#include <zlibtcl.h>
-
-static int SetupTiffLibrary _ANSI_ARGS_ ((Tcl_Interp *interp));
-
-#define MORE_INITIALIZATION \
-    if (SetupTiffLibrary (interp) != TCL_OK) { return TCL_ERROR; }
-
-#include "init.c"
-
-#include <tiffInt.h>
-
-
-extern int unlink _ANSI_ARGS_((CONST char *));
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int getint _ANSI_ARGS_((unsigned char *buf, TIFFDataType format,
-	int order));
-
-static int CommonMatch _ANSI_ARGS_((tkimg_MFile *handle, int *widhtPtr,
-	int *heightPtr));
-
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp, TIFF *tif,
-	Tcl_Obj *format, Tk_PhotoHandle imageHandle, int destX, int destY,
-	int width, int height, int srcX, int srcY));
-
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, TIFF *tif,
-	int comp, Tk_PhotoImageBlock *blockPtr));
-
-static int ParseWriteFormat _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *format,
-	int *comp, char **mode));
-
-static void  _TIFFerr    _ANSI_ARGS_((CONST char *, CONST char *, va_list));
-static void  _TIFFwarn   _ANSI_ARGS_((CONST char *, CONST char *, va_list));
-
-/*
- * The functions for the TIFF input handler
- */
-
-static int     mapDummy _ANSI_ARGS_((thandle_t, tdata_t *, toff_t *));
-static void    unMapDummy _ANSI_ARGS_((thandle_t, tdata_t, toff_t));
-static int     closeDummy _ANSI_ARGS_((thandle_t));
-static tsize_t writeDummy _ANSI_ARGS_((thandle_t, tdata_t, tsize_t));
-
-static tsize_t readMFile _ANSI_ARGS_((thandle_t, tdata_t, tsize_t));
-static toff_t  seekMFile _ANSI_ARGS_((thandle_t, toff_t, int));
-static toff_t  sizeMFile _ANSI_ARGS_((thandle_t));
-
-static tsize_t readString _ANSI_ARGS_((thandle_t, tdata_t, tsize_t));
-static tsize_t writeString _ANSI_ARGS_((thandle_t, tdata_t, tsize_t));
-static toff_t  seekString _ANSI_ARGS_((thandle_t, toff_t, int));
-static toff_t  sizeString _ANSI_ARGS_((thandle_t));
-
-
-static char *errorMessage = NULL;
-
-static int
-SetupTiffLibrary (interp)
-    Tcl_Interp *interp;
-{
-    static int initialized = 0;
-
-    if (Tifftcl_InitStubs(interp, TIFFTCL_VERSION, 0) == NULL) {
-        return TCL_ERROR;
-    }
-
-    if (errorMessage) {
-	ckfree(errorMessage);
-	errorMessage = NULL;
-    }
-    if (TIFFSetErrorHandler != NULL) {
-        TIFFSetErrorHandler(_TIFFerr);
-    }
-    if (TIFFSetWarningHandler != NULL) {
-	TIFFSetWarningHandler(_TIFFwarn);
-    }
-
-    /*
-     * Initialize jpeg and zlib too, for use by the CODEC's we register
-     * with the base TIFF library in this package.
-     */
-
-    if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
-        return TCL_ERROR;
-    }
-
-    if (!initialized) {
-	initialized = 1;
-	if (
-	    TIFFRegisterCODEC   && TIFFError        && TIFFPredictorInit &&
-	    TIFFMergeFieldInfo  && TIFFFlushData1   && _TIFFNoPostDecode &&
-	    TIFFTileRowSize     && TIFFScanlineSize && _TIFFsetByteArray &&
-	    TIFFVSetField       && TIFFSwabArrayOfShort
-	    ) {
-
-	  if (Zlibtcl_InitStubs(interp, "1.0", 0) == NULL) {
-	    return TCL_ERROR;
-	  }
-	  TIFFRegisterCODEC (COMPRESSION_DEFLATE,  "Deflate",  TkimgTIFFInitZip);
-
-	  if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
-	    return TCL_ERROR;
-	  }
-	  TIFFRegisterCODEC (COMPRESSION_JPEG,     "JPEG",     TkimgTIFFInitJpeg);
-	  TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TkimgTIFFInitPixar);
-	}
-    }
-    return TCL_OK;
-}
-
-
-
-static int
-getint(buf, format, order)
-    unsigned char *buf;
-    TIFFDataType format;
-    int order;
-{
-    int result;
-
-    switch (format) {
-	case TIFF_BYTE:
-	    result = buf[0]; break;
-	case TIFF_SHORT:
-	    result = (buf[order]<<8) + buf[1-order]; break;
-	case TIFF_LONG:
-	    if (order) {
-		result = (buf[3]<<24) + (buf[2]<<16) + (buf[1]<<8) + buf[0];
-	    } else {
-		result = (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + buf[3];
-	    }; break;
-	default:
-	    result = -1;
-    }
-    return result;
-}
-
-
-static void
-_TIFFerr(module, fmt, ap)
-     CONST char *module;
-     CONST char *fmt;
-     va_list     ap;
-{
-  char buf [2048];
-  char *cp = buf;
-
-  if (module != NULL) {
-    sprintf(cp, "%s: ", module);
-    cp += strlen(module) + 2;
-  }
-
-  vsprintf(cp, fmt, ap);
-  if (errorMessage) {
-    ckfree(errorMessage);
-  }
-  errorMessage = (char *) ckalloc(strlen(buf)+1);
-  strcpy(errorMessage, buf);
-}
-
-/* warnings are not processed in Tcl */
-static void
-_TIFFwarn(module, fmt, ap)
-     CONST char *module;
-     CONST char *fmt;
-     va_list     ap;
-{
-}
-
-static int
-mapDummy(fd, base, size)
-    thandle_t fd;
-    tdata_t *base;
-    toff_t *size;
-{
-    return (toff_t) 0;
-}
-
-static void
-unMapDummy(fd, base, size)
-    thandle_t fd;
-    tdata_t base;
-    toff_t size;
-{
-}
-
-static int
-closeDummy(fd)
-    thandle_t fd;
-{
-    return 0;
-}
-
-static tsize_t
-writeDummy(fd, data, size)
-    thandle_t fd;
-    tdata_t data;
-    tsize_t size;
-{
-   return size;
-}
-
-static tsize_t
-readMFile(fd, data, size)
-    thandle_t fd;
-    tdata_t data;
-    tsize_t size;
-{
-    return (tsize_t) tkimg_Read((tkimg_MFile *) fd, (char *) data, (int) size) ;
-}
-
-static toff_t
-seekMFile(fd, off, whence)
-    thandle_t fd;
-    toff_t off;
-    int whence;
-{
-    return Tcl_Seek((Tcl_Channel) ((tkimg_MFile *) fd)->data, (int) off, whence);
-}
-
-static toff_t
-sizeMFile(fd)
-    thandle_t fd;
-{
-    int fsize;
-    return (fsize = Tcl_Seek((Tcl_Channel) ((tkimg_MFile *) fd)->data,
-	    (int) 0, SEEK_END)) < 0 ? 0 : (toff_t) fsize;
-}
-
-/*
- * In the following functions "handle" is used differently for speed reasons:
- *
- *	handle.buffer   (writing only) dstring used for writing.
- *	handle.data	pointer to first character
- *	handle.lenght	size of data
- *	handle.state	"file" position pointer.
- *
- * After a read, only the position pointer is adapted, not the other fields.
- */
-
-static tsize_t
-readString(fd, data, size)
-    thandle_t fd;
-    tdata_t data;
-    tsize_t size;
-{
-    register tkimg_MFile *handle = (tkimg_MFile *) fd;
-
-    if ((size + handle->state) > handle->length) {
-	size = handle->length - handle->state;
-    }
-    if (size) {
-	memcpy((char *) data, handle->data + handle->state, (size_t) size);
-	handle->state += size;
-    }
-    return size;
-}
-
-static tsize_t
-writeString(fd, data, size)
-    thandle_t fd;
-    tdata_t data;
-    tsize_t size;
-{
-    register tkimg_MFile *handle = (tkimg_MFile *) fd;
-
-    if (handle->state + size > handle->length) {
-	handle->length = handle->state + size;
-	Tcl_DStringSetLength(handle->buffer, handle->length);
-	handle->data = Tcl_DStringValue(handle->buffer);
-    }
-    memcpy(handle->data + handle->state, (char *) data, (size_t) size);
-    handle->state += size;
-    return size;
-}
-
-static toff_t
-seekString(fd, off, whence)
-    thandle_t fd;
-    toff_t off;
-    int whence;
-{
-    register tkimg_MFile *handle = (tkimg_MFile *) fd;
-
-    switch (whence) {
-	case SEEK_SET:
-	    handle->state = (int) off;
-	    break;
-	case SEEK_CUR:
-	    handle->state += (int) off;
-	    break;
-	case SEEK_END:
-	    handle->state = handle->length + (int) off;
-	    break;
-    }
-    if (handle->state < 0) {
-	handle->state = 0;
-	return -1;
-    }
-    return (toff_t) handle->state;
-}
-
-static toff_t
-sizeString(fd)
-    thandle_t fd;
-{
-    return ((tkimg_MFile *) fd)->length;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatchTIFF --
- *
- *  This procedure is invoked by the photo image type to see if
- *  a string contains image data in TIFF format.
- *
- * Results:
- *  The return value is 1 if the first characters in the string
- *  is like TIFF data, and 0 otherwise.
- *
- * Side effects:
- *  the size of the image is placed in widthPre and heightPtr.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;		/* the object containing the image data */
-    Tcl_Obj *format;		/* the image format string */
-    int *widthPtr;		/* where to put the string width */
-    int *heightPtr;		/* where to put the string height */
-{
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    if (!tkimg_ReadInit(data, '\111', &handle) &&
-	    !tkimg_ReadInit(data, '\115', &handle)) {
-	return 0;
-    }
-
-    return CommonMatch(&handle, widthPtr, heightPtr);
-}
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return CommonMatch(&handle, widthPtr, heightPtr);
-}
-
-static int
-CommonMatch(handle, widthPtr, heightPtr)
-    tkimg_MFile *handle;
-    int *widthPtr, *heightPtr;
-{
-    unsigned char buf[4096];
-    int i, j, order, w = 0, h = 0;
-
-    i = tkimg_Read(handle, (char *) buf, 8);
-    order = (buf[0] == '\111');
-    if ((i != 8) || (buf[0] != buf[1])
-	    || ((buf[0] != '\111') && (buf[0] != '\115'))
-	    || (getint(buf+2,TIFF_SHORT,order) != 42)) {
-	return 0;
-    }
-    i = getint(buf+4,TIFF_LONG,order);
-
-    while (i > 4104) {
-	i -= 4096;
-	tkimg_Read(handle, (char *) buf, 4096);
-    }
-    if (i>8) {
-        tkimg_Read(handle, (char *) buf, i-8);
-    }
-    tkimg_Read(handle, (char *) buf, 2);
-    i = getint(buf,TIFF_SHORT,order);
-    while (i--) {
-	tkimg_Read(handle, (char *) buf, 12);
-	if (buf[order]!=1) continue;
-	j = getint(buf+2,TIFF_SHORT,order);
-	j = getint(buf+8, (TIFFDataType) j, order);
-	if (buf[1-order]==0) {
-	    w = j;
-	    if (h>0) break;
-	} else if (buf[1-order]==1) {
-	    h = j;
-	    if (w>0) break;
-	}
-    }
-
-    if ((w <= 0) || (h <= 0)) {
-	return 0;
-    }
-    *widthPtr = w;
-    *heightPtr = h;
-    return 1;
-}
-
-static int
-ObjRead(interp, data, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;			/* object containing the image */
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    TIFF *tif;
-    char tempFileName[256];
-    int count, result;
-    tkimg_MFile handle;
-    char buffer[1024];
-    char *dataPtr = NULL;
-
-    if (!tkimg_ReadInit(data, '\115', &handle)) {
-	    tkimg_ReadInit(data, '\111', &handle);
-    }
-
-    if (TIFFClientOpen) {
-	tempFileName[0] = 0;
-	if (handle.state != IMG_STRING) {
-	    dataPtr = ckalloc((handle.length*3)/4 + 2);
-	    handle.length = tkimg_Read(&handle, dataPtr, handle.length);
-	    handle.data = dataPtr;
-	}
-	handle.state = 0;
-	tif = TIFFClientOpen("inline data", "r", (thandle_t) &handle,
-		readString, writeString, seekString, closeDummy,
-		sizeString, mapDummy, unMapDummy);
-    } else {
-	Tcl_Channel outchan;
-	tmpnam(tempFileName);
-	outchan = tkimg_OpenFileChannel(interp, tempFileName, 0644);
-	if (!outchan) {
-	    return TCL_ERROR;
-	}
-
-	count = tkimg_Read(&handle, buffer, 1024);
-	while (count == 1024) {
-	    Tcl_Write(outchan, buffer, count);
-	    count = tkimg_Read(&handle, buffer, 1024);
-	}
-	if (count>0){
-	    Tcl_Write(outchan, buffer, count);
-	}
-	if (Tcl_Close(interp, outchan) == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-	tif = TIFFOpen(tempFileName, "r");
-    }
-
-    if (tif != NULL) {
-	result = CommonRead(interp, tif, format, imageHandle,
-		destX, destY, width, height, srcX, srcY);
-    } else {
-	result = TCL_ERROR;
-    }
-    if (tempFileName[0]) {
-	unlink(tempFileName);
-    }
-    if (result == TCL_ERROR) {
-	Tcl_AppendResult(interp, errorMessage, (char *) NULL);
-	ckfree(errorMessage);
-	errorMessage = NULL;
-    }
-    if (dataPtr) {
-	ckfree(dataPtr);
-    }
-    return result;
-}
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    TIFF *tif;
-    char tempFileName[256];
-    int count, result;
-    char buffer[1024];
-
-    if (TIFFClientOpen) {
-	tkimg_MFile handle;
-	tempFileName[0] = 0;
-	handle.data = (char *) chan;
-	handle.state = IMG_CHAN;
-	tif = TIFFClientOpen(fileName, "r", (thandle_t) &handle,
-		readMFile, writeDummy, seekMFile, closeDummy,
-		sizeMFile, mapDummy, unMapDummy);
-    } else {
-	Tcl_Channel outchan;
-	tmpnam(tempFileName);
-	outchan = tkimg_OpenFileChannel(interp, tempFileName, 0644);
-	if (!outchan) {
-	    return TCL_ERROR;
-	}
-
-	count = Tcl_Read(chan, buffer, 1024);
-	while (count == 1024) {
-	    Tcl_Write(outchan, buffer, count);
-	    count = Tcl_Read(chan, buffer, 1024);
-	}
-	if (count>0){
-	    Tcl_Write(outchan, buffer, count);
-	}
-	if (Tcl_Close(interp, outchan) == TCL_ERROR) {
-	    return TCL_ERROR;
-	}
-
-	tif = TIFFOpen(tempFileName, "r");
-    }
-    if (tif) {
-	result = CommonRead(interp, tif, format, imageHandle,
-		destX, destY, width, height, srcX, srcY);
-    } else {
-	result = TCL_ERROR;
-    }
-    if (tempFileName[0]) {
-	unlink(tempFileName);
-    }
-    if (result == TCL_ERROR) {
-	Tcl_AppendResult(interp, errorMessage, (char *) NULL);
-	ckfree(errorMessage);
-	errorMessage = 0;
-    }
-    return result;
-}
-
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], if not included already
-		  in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead(interp, tif, format, imageHandle,
-	destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    TIFF *tif;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    myblock bl;
-    unsigned char *pixelPtr = block.pixelPtr;
-    uint32 w, h;
-    size_t npixels;
-    uint32 *raster;
-
-#ifdef WORDS_BIGENDIAN
-    block.offset[0] = 3;
-    block.offset[1] = 2;
-    block.offset[2] = 1;
-    block.offset[3] = 0;
-#else
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 3;
-#endif
-    block.pixelSize = sizeof (uint32);
-
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-    npixels = w * h;
-
-    raster = (uint32*) TkimgTIFFmalloc(npixels * sizeof (uint32));
-    block.width = w;
-    block.height = h;
-    block.pitch = - (block.pixelSize * (int) w);
-    block.pixelPtr = ((unsigned char *) raster) + ((1-h) * block.pitch);
-    if (raster == NULL) {
-	printf("cannot malloc\n");
-	return TCL_ERROR;
-    }
-
-    if (!TIFFReadRGBAImage(tif, w, h, raster, 0) || errorMessage) {
-        TkimgTIFFfree (raster);
-	if (errorMessage) {
-	    Tcl_AppendResult(interp, errorMessage, (char *) NULL);
-	    ckfree(errorMessage);
-	    errorMessage = NULL;
-	}
-	return TCL_ERROR;
-    }
-
-    pixelPtr = block.pixelPtr += srcY * block.pitch
-	    + srcX * block.pixelSize;
-    block.offset[3] = block.offset[0]; /* don't use transparency */
-    tkimg_PhotoPutBlock(imageHandle, &block, destX,
-			destY, width, height);
-
-    TkimgTIFFfree (raster);
-    TIFFClose(tif);
-    return TCL_OK;
-}
-
-static int
-StringWrite(interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    TIFF *tif;
-    int result, comp;
-    tkimg_MFile handle;
-    char tempFileName[256];
-    Tcl_DString dstring;
-    char *mode;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    if (ParseWriteFormat(interp, format, &comp, &mode) != TCL_OK) {
-    	return TCL_ERROR;
-    }
-
-    if (TIFFClientOpen) {
-	tempFileName[0] = 0;
-	Tcl_DStringInit(&dstring);
-	tkimg_WriteInit(&dstring, &handle);
-	tif = TIFFClientOpen("inline data", mode, (thandle_t) &handle,
-		readString, writeString, seekString, closeDummy,
-		sizeString, mapDummy, unMapDummy);
-    } else {
-	tmpnam(tempFileName);
-	tif = TIFFOpen(tempFileName,mode);
-    }
-
-    result = CommonWrite(interp, tif, comp, blockPtr);
-    TIFFClose(tif);
-
-    if (result != TCL_OK) {
-	if (tempFileName[0]) {
-	    unlink(tempFileName);
-	}
-	Tcl_AppendResult(interp, errorMessage, (char *) NULL);
-	ckfree(errorMessage);
-	errorMessage = NULL;
-	return TCL_ERROR;
-    }
-
-    if (tempFileName[0]) {
-	Tcl_Channel inchan;
-	char buffer[1024];
-	inchan = tkimg_OpenFileChannel(interp, tempFileName, 0644);
-	if (!inchan) {
-	    return TCL_ERROR;
-	}
-	tkimg_WriteInit(dataPtr, &handle);
-
-	result = Tcl_Read(inchan, buffer, 1024);
-	while ((result == TCL_OK) && !Tcl_Eof(inchan)) {
-	    tkimg_Write(&handle, buffer, result);
-	    result = Tcl_Read(inchan, buffer, 1024);
-	}
-	if (result == TCL_OK) {
-	    tkimg_Write(&handle, buffer, result);
-	    result = Tcl_Close(interp, inchan);
-	}
-	unlink(tempFileName);
-    } else {
-	int length = handle.length;
-	tkimg_WriteInit(dataPtr, &handle);
-	tkimg_Write(&handle, Tcl_DStringValue(&dstring), length);
-	Tcl_DStringFree(&dstring);
-    }
-    tkimg_Putc(IMG_DONE, &handle);
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-static int
-ChnWrite(interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    TIFF *tif;
-    int result, comp;
-    Tcl_DString nameBuffer; 
-    char *fullname, *mode;
-
-    if (!(fullname=Tcl_TranslateFileName(interp, filename, &nameBuffer))) {
-	return TCL_ERROR;
-    }
-
-    if (ParseWriteFormat(interp, format, &comp, &mode) != TCL_OK) {
-	Tcl_DStringFree(&nameBuffer);
-    	return TCL_ERROR;
-    }
-
-    if (!(tif = TIFFOpen(fullname, mode))) {
-	Tcl_AppendResult(interp, filename, ": ", Tcl_PosixError(interp),
-		(char *)NULL);
-	Tcl_DStringFree(&nameBuffer);
-	return TCL_ERROR;
-    }
-
-    Tcl_DStringFree(&nameBuffer);
-
-    result = CommonWrite(interp, tif, comp, blockPtr);
-    TIFFClose(tif);
-    return result;
-}
-
-static int
-ParseWriteFormat(interp, format, comp, mode)
-    Tcl_Interp *interp;
-    Tcl_Obj *format;
-    int *comp;
-    char **mode;
-{
-    static CONST84 char *tiffWriteOptions[] = {
-      "-compression",
-      "-byteorder",
-      NULL
-    };
-    int objc, length, c, i, index;
-    Tcl_Obj **objv;
-    char *compression, *byteorder;
-
-    *comp = COMPRESSION_NONE;
-    *mode = "w";
-    if (tkimg_ListObjGetElements(interp, format, &objc, &objv) != TCL_OK)
-	return TCL_ERROR;
-    if (objc) {
-	compression = "none";
-	byteorder = "";
-	for (i=1; i<objc; i++) {
-	    if (Tcl_GetIndexFromObj(interp, objv[i], tiffWriteOptions,
-		    "format option", 0, &index) !=TCL_OK) {
-		return TCL_ERROR;
-	    }
-	    if (++i >= objc) {
-		Tcl_AppendResult(interp, "No value for option \"",
-			Tcl_GetStringFromObj(objv[--i], (int *) NULL),
-			"\"", (char *) NULL);
-		return TCL_ERROR;
-	    }
-	    switch(index) {
-		case 0:
-		    compression = Tcl_GetStringFromObj(objv[i], (int *) NULL); break;
-		case 1:
-		    byteorder = Tcl_GetStringFromObj(objv[i], (int *) NULL); break;
-	    }
-	}
-	c = compression[0]; length = strlen(compression);
-	if ((c == 'n') && (!strncmp(compression,"none",length))) {
-	    *comp = COMPRESSION_NONE;
-	} else if ((c == 'd') && (!strncmp(compression,"deflate",length))) {
-	    *comp = COMPRESSION_DEFLATE;
-	} else if ((c == 'j') && (!strncmp(compression,"jpeg",length))) {
-	    *comp = COMPRESSION_JPEG;
-	} else if ((c == 'l') && (!strncmp(compression,"logluv",length))) {
-	    *comp = COMPRESSION_SGILOG;
-/* disabled, because of patented lzw-algorithm.
-	} else if ((c == 'l') && (length>1) && (!strncmp(compression,"lzw",length))) {
-	    *comp = COMPRESSION_LZW;
-*/
-	} else if ((c == 'p') && (length>1) && (!strncmp(compression,"packbits",length))) {
-	    *comp = COMPRESSION_PACKBITS;
-	} else if ((c == 'p') && (length>1) && (!strncmp(compression,"pixarlog",length))) {
-	    *comp = COMPRESSION_PIXARLOG;
-	} else {
-	    Tcl_AppendResult(interp, "invalid compression mode \"",
-		     compression,"\": should be deflate, jpeg, logluv, lzw, ",
-		    "packbits, pixarlog, or none", (char *) NULL);
-	    return TCL_ERROR;
-	}
-	c = byteorder[0]; length = strlen(byteorder);
-	if (c == 0) {
-	    *mode = "w";
-	} else if ((c == 's') && (!strncmp(byteorder,"smallendian", length))) {
-	    *mode = "wl";
-	} else if ((c == 'l') && (!strncmp(byteorder,"littleendian", length))) {
-	    *mode = "wl";
-	} else if ((c == 'b') && (!strncmp(byteorder,"bigendian", length))) {
-	    *mode = "wb";
-	} else if ((c == 'n') && (!strncmp(byteorder,"network", length))) {
-	    *mode = "wb";
-	} else {
-	    Tcl_AppendResult(interp, "invalid byteorder \"",
-		     byteorder,"\": should be bigendian, littleendian",
-		    "network, smallendian, or {}", (char *) NULL);
-	    return TCL_ERROR;
-	}
-    }
-    return TCL_OK;
-}
-
-static int
-CommonWrite(interp, tif, comp, blockPtr)
-    Tcl_Interp *interp;
-    TIFF *tif;
-    int comp;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int numsamples;
-    unsigned char *data = NULL;
-
-    TIFFSetField(tif, TIFFTAG_IMAGEWIDTH,  blockPtr->width);
-    TIFFSetField(tif, TIFFTAG_IMAGELENGTH, blockPtr->height);
-    TIFFSetField(tif, TIFFTAG_COMPRESSION, comp);
-
-    TIFFSetField(tif, TIFFTAG_PLANARCONFIG,    PLANARCONFIG_CONTIG);
-    TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-    TIFFSetField(tif, TIFFTAG_ORIENTATION,     ORIENTATION_TOPLEFT);
-    TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,    blockPtr->height);
-
-    TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, (int)2);
-    TIFFSetField(tif, TIFFTAG_XRESOLUTION,    (float)1200.0);
-    TIFFSetField(tif, TIFFTAG_YRESOLUTION,    (float)1200.0);
-
-    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE,   8);
-    if ((blockPtr->offset[0] == blockPtr->offset[1])
-	    && (blockPtr->offset[0] == blockPtr->offset[2])) {
-	numsamples = 1;
-	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-	TIFFSetField(tif, TIFFTAG_PHOTOMETRIC,     PHOTOMETRIC_MINISBLACK);
-    } else {
-	numsamples = 3;
-	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
-	TIFFSetField(tif, TIFFTAG_PHOTOMETRIC,     PHOTOMETRIC_RGB);
-    }
-
-    if ((blockPtr->pitch == numsamples * blockPtr->width)
-	    && (blockPtr->pixelSize == numsamples)) {
-	data = blockPtr->pixelPtr;
-    } else {
-	unsigned char *srcPtr, *dstPtr, *rowPtr;
-	int greenOffset, blueOffset, alphaOffset, x, y;
-	dstPtr = data = (unsigned char *) ckalloc(numsamples *
-		blockPtr->width * blockPtr->height);
-	rowPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-	greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-	blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-	alphaOffset =  blockPtr->offset[0];
-	if (alphaOffset < blockPtr->offset[2]) {
-	    alphaOffset = blockPtr->offset[2];
-	}
-	if (++alphaOffset < blockPtr->pixelSize) {
-	    alphaOffset -= blockPtr->offset[0];
-	} else {
-	    alphaOffset = 0;
-	}
-	if (blueOffset || greenOffset) {
-	    for (y = blockPtr->height; y > 0; y--) {
-		srcPtr = rowPtr;
-		for (x = blockPtr->width; x>0; x--) {
-		    if (alphaOffset && !srcPtr[alphaOffset]) {
-			*dstPtr++ = 0xd9;
-			*dstPtr++ = 0xd9;
-			*dstPtr++ = 0xd9;
-		    } else {
-			*dstPtr++ = srcPtr[0];
-			*dstPtr++ = srcPtr[greenOffset];
-			*dstPtr++ = srcPtr[blueOffset];
-		    }
-		    srcPtr += blockPtr->pixelSize;
-		}
-		rowPtr += blockPtr->pitch;
-	    }
-	} else {
-	    for (y = blockPtr->height; y > 0; y--) {
-		srcPtr = rowPtr;
-		for (x = blockPtr->width; x>0; x--) {
-		    *dstPtr++ = srcPtr[0];
-		    srcPtr += blockPtr->pixelSize;
-		}
-		rowPtr += blockPtr->pitch;
-	    }
-	}
-    }
-
-    TIFFWriteEncodedStrip(tif, 0, data,
-	    numsamples * blockPtr->width * blockPtr->height);
-    if (data != blockPtr->pixelPtr) {
-	ckfree((char *) data);
-    }
-
-    return TCL_OK;
-}
-
-void
-TkimgTIFFfree (data)
-    tdata_t data;
-{
-    if (_TIFFfree) {
-	_TIFFfree(data);
-    } else {
-	ckfree((char *) data);
-    }
-}
-
-tdata_t
-TkimgTIFFmalloc(size)
-    tsize_t size;
-{
-    if (_TIFFmalloc) {
-	return _TIFFmalloc(size);
-    } else {
-	return ckalloc(size);
-    }
-}
-
-tdata_t
-TkimgTIFFrealloc(data, size)
-    tdata_t data;
-    tsize_t size;
-{
-    if (_TIFFrealloc) {
-	return _TIFFrealloc(data, size);
-    } else {
-	return ckrealloc(data, size);
-    }
-}
diff --git a/tkimg1.3/tiff/tiffInt.h b/tkimg1.3/tiff/tiffInt.h
deleted file mode 100644
index 3eb15ce..0000000
--- a/tkimg1.3/tiff/tiffInt.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * tiffInit.h --
- */
-
-#include <tifftcl.h>
-
-/*
- * Declarations shared between the .c files of the TIFF format handler.
- */
-
-extern int     TkimgTIFFInitZip   _ANSI_ARGS_((TIFF *, int));
-extern int     TkimgTIFFInitJpeg  _ANSI_ARGS_((TIFF *, int));
-extern int     TkimgTIFFInitPixar _ANSI_ARGS_((TIFF *, int));
-
-extern void    TkimgTIFFfree    _ANSI_ARGS_((tdata_t data));
-extern tdata_t TkimgTIFFmalloc  _ANSI_ARGS_((tsize_t size));
-extern tdata_t TkimgTIFFrealloc _ANSI_ARGS_((tdata_t data, tsize_t size));
-
-#ifndef CONST84
-#define CONST84
-#endif
diff --git a/tkimg1.3/tiff/tiffJpeg.c b/tkimg1.3/tiff/tiffJpeg.c
deleted file mode 100644
index 0d04059..0000000
--- a/tkimg1.3/tiff/tiffJpeg.c
+++ /dev/null
@@ -1,1670 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/tiff/tiffJpeg.c,v 1.2 2007/01/03 23:03:04 joye Exp $ */
-
-/*
- * Copyright (c) 1994-1996 Sam Leffler
- * Copyright (c) 1994-1996 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffInt.h"
-#include <assert.h>
-#include <setjmp.h>
-#include "jpegtcl.h"
-
-/*
- * TIFF Library
- *
- * JPEG Compression support per TIFF Technical Note #2
- * (*not* per the original TIFF 6.0 spec).
- *
- * This file is simply an interface to the libjpeg library written by
- * the Independent JPEG Group.  You need release 5 or later of the IJG
- * code, which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
- *
- * Contributed by Tom Lane <tgl at sss.pgh.pa.us>.
- */
-
-/*
- * On some machines it may be worthwhile to use _setjmp or sigsetjmp
- * in place of plain setjmp.  These macros will make it easier.
- */
-#define SETJMP(jbuf)		setjmp(jbuf)
-#define LONGJMP(jbuf,code)	longjmp(jbuf,code)
-#define JMP_BUF			jmp_buf
-
-typedef struct jpeg_destination_mgr jpeg_destination_mgr;
-typedef struct jpeg_source_mgr jpeg_source_mgr;
-typedef	struct jpeg_error_mgr jpeg_error_mgr;
-
-/*
- * State block for each open TIFF file using
- * libjpeg to do JPEG compression/decompression.
- *
- * libjpeg's visible state is either a jpeg_compress_struct
- * or jpeg_decompress_struct depending on which way we
- * are going.  comm can be used to refer to the fields
- * which are common to both.
- *
- * NB: cinfo is required to be the first member of JPEGState,
- *     so we can safely cast JPEGState* -> jpeg_xxx_struct*
- *     and vice versa!
- */
-typedef	struct {
-  union {
-    struct jpeg_compress_struct c;
-    struct jpeg_decompress_struct d;
-    struct jpeg_common_struct comm;
-  } cinfo;			/* NB: must be first */
-  jpeg_error_mgr	err;		/* libjpeg error manager */
-  JMP_BUF		exit_jmpbuf;	/* for catching libjpeg failures */
-  /*
-   * The following two members could be a union, but
-   * they're small enough that it's not worth the effort.
-   */
-  jpeg_destination_mgr dest;	/* data dest for compression */
-  jpeg_source_mgr	src;		/* data source for decompression */
-					/* private state */
-  TIFF*		tif;		/* back link needed by some code */
-  uint16		photometric;	/* copy of PhotometricInterpretation */
-  uint16		h_sampling;	/* luminance sampling factors */
-  uint16		v_sampling;
-  tsize_t		bytesperline;	/* decompressed bytes per scanline */
-  /* pointers to intermediate buffers when processing downsampled data */
-  JSAMPARRAY	ds_buffer[MAX_COMPONENTS];
-  int		scancount;	/* number of "scanlines" accumulated */
-  int		samplesperclump;
-
-  TIFFVGetMethod	vgetparent;	/* super-class method */
-  TIFFVSetMethod	vsetparent;	/* super-class method */
-  TIFFStripMethod	defsparent;	/* super-class method */
-  TIFFTileMethod	deftparent;	/* super-class method */
-					/* pseudo-tag fields */
-  void*		jpegtables;	/* JPEGTables tag value, or NULL */
-  uint32	jpegtables_length; /* number of bytes in same */
-  int		jpegquality;	/* Compression quality level */
-  int		jpegcolormode;	/* Auto RGB<=>YCbCr convert? */
-  int		jpegtablesmode;	/* What to put in JPEGTables */
-} JPEGState;
-
-#define	JState(tif)	((JPEGState*)(tif)->tif_data)
-
-static	int JPEGDecode    _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-static	int JPEGDecodeRaw _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-static	int JPEGEncode    _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-static	int JPEGEncodeRaw _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-
-#define	FIELD_JPEGTABLES	(FIELD_CODEC+0)
-
-static const TIFFFieldInfo jpegFieldInfo[] = {
-    { TIFFTAG_JPEGTABLES,	 -1,-1,	TIFF_UNDEFINED,	FIELD_JPEGTABLES,
-      FALSE,	TRUE,	"JPEGTables" },
-    { TIFFTAG_JPEGQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-    { TIFFTAG_JPEGCOLORMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-    { TIFFTAG_JPEGTABLESMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-/*
- * libjpeg interface layer.
- *
- * We use setjmp/longjmp to return control to libtiff
- * when a fatal error is encountered within the JPEG
- * library.  We also direct libjpeg error and warning
- * messages through the appropriate libtiff handlers.
- */
-
-/*
- * Error handling routines (these replace corresponding
- * IJG routines from jerror.c).  These are used for both
- * compression and decompression.
- */
-
-static void TIFFjpeg_error_exit _ANSI_ARGS_((j_common_ptr));
-static void TIFFjpeg_output_message _ANSI_ARGS_((j_common_ptr));
-static int  TIFFjpeg_create_compress _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_create_decompress _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_set_defaults _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_set_colorspace _ANSI_ARGS_((JPEGState*, J_COLOR_SPACE));
-static int  TIFFjpeg_set_quality _ANSI_ARGS_((JPEGState*, int, boolean));
-static int  TIFFjpeg_suppress_tables _ANSI_ARGS_((JPEGState*, boolean));
-static int  TIFFjpeg_start_compress _ANSI_ARGS_((JPEGState*, boolean));
-static int  TIFFjpeg_write_scanlines _ANSI_ARGS_((JPEGState*, JSAMPARRAY, int));
-static int  TIFFjpeg_write_raw_data _ANSI_ARGS_((JPEGState*, JSAMPIMAGE, int));
-static int  TIFFjpeg_finish_compress _ANSI_ARGS_((JPEGState* sp));
-static int  TIFFjpeg_write_tables _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_read_header _ANSI_ARGS_((JPEGState*, boolean));
-static int  TIFFjpeg_start_decompress _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_read_scanlines _ANSI_ARGS_((JPEGState*, JSAMPARRAY, int));
-static int  TIFFjpeg_read_raw_data _ANSI_ARGS_((JPEGState*, JSAMPIMAGE, int));
-static int  TIFFjpeg_finish_decompress _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_abort _ANSI_ARGS_((JPEGState*));
-static int  TIFFjpeg_destroy _ANSI_ARGS_((JPEGState*));
-static JSAMPARRAY TIFFjpeg_alloc_sarray _ANSI_ARGS_((JPEGState*,
-	int, JDIMENSION, JDIMENSION));
-static void TIFFjpeg_data_dest _ANSI_ARGS_((JPEGState*, TIFF*));
-static int  TIFFjpeg_tables_dest _ANSI_ARGS_((JPEGState*, TIFF*));
-static void TIFFjpeg_data_src _ANSI_ARGS_((JPEGState*, TIFF*));
-static void TIFFjpeg_tables_src _ANSI_ARGS_((JPEGState*, TIFF*));
-
-static void    std_init_destination    _ANSI_ARGS_((j_compress_ptr));
-static boolean std_empty_output_buffer _ANSI_ARGS_((j_compress_ptr));
-static void    std_term_destination    _ANSI_ARGS_((j_compress_ptr));
-static void    tables_init_destination _ANSI_ARGS_((j_compress_ptr));
-static boolean tables_empty_output_buffer _ANSI_ARGS_((j_compress_ptr));
-static void    tables_term_destination _ANSI_ARGS_((j_compress_ptr));
-static void    std_init_source _ANSI_ARGS_((j_decompress_ptr));
-static boolean std_fill_input_buffer _ANSI_ARGS_((j_decompress_ptr));
-static void    std_skip_input_data _ANSI_ARGS_((j_decompress_ptr, long));
-static void    std_term_source _ANSI_ARGS_((j_decompress_ptr));
-static void    tables_init_source _ANSI_ARGS_((j_decompress_ptr));
-static int alloc_downsampled_buffers _ANSI_ARGS_((TIFF*,
-	jpeg_component_info*, int));
-
-static int JPEGSetupDecode _ANSI_ARGS_((TIFF* tif));
-static int JPEGSetupEncode _ANSI_ARGS_((TIFF* tif));
-static int JPEGEncode _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-static int JPEGEncodeRaw _ANSI_ARGS_((TIFF*, tidata_t, tsize_t, tsample_t));
-static int JPEGPostEncode _ANSI_ARGS_((TIFF* tif));
-static void JPEGCleanup _ANSI_ARGS_((TIFF*));
-static int JPEGVSetField _ANSI_ARGS_((TIFF* tif, ttag_t tag, va_list ap));
-static int JPEGVGetField _ANSI_ARGS_((TIFF* tif, ttag_t tag, va_list ap));
-static uint32 JPEGDefaultStripSize _ANSI_ARGS_((TIFF*, uint32));
-static void JPEGDefaultTileSize _ANSI_ARGS_((TIFF*, uint32*, uint32*));
-
-
-static void
-TIFFjpeg_error_exit(cinfo)
-    j_common_ptr cinfo;
-{
-    JPEGState *sp = (JPEGState *) cinfo;	/* NB: cinfo assumed first */
-    char buffer[JMSG_LENGTH_MAX];
-
-    (*cinfo->err->format_message) (cinfo, buffer);
-    TIFFError("JPEGLib", buffer);		/* display the error message */
-    jpeg_abort(cinfo);			/* clean up libjpeg state */
-    LONGJMP(sp->exit_jmpbuf, 1);		/* return to libtiff caller */
-}
-
-/*
- * This routine is invoked only for warning messages,
- * since error_exit does its own thing and trace_level
- * is never set > 0.
- */
-
-static void
-TIFFjpeg_output_message(cinfo)
-    j_common_ptr cinfo;
-{
-}
-
-/*
- * Interface routines.  This layer of routines exists
- * primarily to limit side-effects from using setjmp.
- * Also, normal/error returns are converted into return
- * values per libtiff practice.
- */
-#define	CALLJPEG(sp, fail, op)	(SETJMP((sp)->exit_jmpbuf) ? (fail) : (op))
-#define	CALLVJPEGG(sp, op)	CALLJPEG(sp, 0, ((op),1))
-#define	CALLVJPEG(sp, op) (SETJMP((sp)->exit_jmpbuf) ? 0 : ((op),1))
-
-
-static int
-TIFFjpeg_create_compress(sp)
-    JPEGState* sp;
-{
-    /* initialize JPEG error handling */
-    sp->cinfo.c.err = jpeg_std_error(&sp->err);
-    sp->err.error_exit = TIFFjpeg_error_exit;
-    sp->err.output_message = TIFFjpeg_output_message;
-
-    return CALLVJPEG(sp, jpeg_CreateCompress(&sp->cinfo.c, JPEG_LIB_VERSION,
-			(size_t) sizeof(struct jpeg_compress_struct)));
-}
-
-
-static int
-TIFFjpeg_create_decompress(sp)
-    JPEGState* sp;
-{
-	/* initialize JPEG error handling */
-	sp->cinfo.d.err = jpeg_std_error(&sp->err);
-	sp->err.error_exit = TIFFjpeg_error_exit;
-	sp->err.output_message = TIFFjpeg_output_message;
-
-	return CALLVJPEG(sp, jpeg_CreateDecompress(&sp->cinfo.d, JPEG_LIB_VERSION,
-		(size_t) sizeof(struct jpeg_decompress_struct)));
-}
-
-
-static int
-TIFFjpeg_set_defaults(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_set_defaults(&sp->cinfo.c));
-}
-
-
-static int
-TIFFjpeg_set_colorspace(sp, colorspace)
-    JPEGState* sp;
-    J_COLOR_SPACE colorspace;
-{
-    return CALLVJPEG(sp, jpeg_set_colorspace(&sp->cinfo.c, colorspace));
-}
-
-
-static int
-TIFFjpeg_set_quality(sp, quality, force_baseline)
-    JPEGState* sp;
-    int quality;
-    boolean force_baseline;
-{
-    return CALLVJPEG(sp,
-     jpeg_set_quality(&sp->cinfo.c, quality, force_baseline));
-}
-
-
-static int
-TIFFjpeg_suppress_tables(sp, suppress)
-    JPEGState* sp;
-    boolean suppress;
-{
-    return CALLVJPEG(sp, jpeg_suppress_tables(&sp->cinfo.c, suppress));
-}
-
-static int
-TIFFjpeg_start_compress(sp, write_all_tables)
-    JPEGState* sp;
-    boolean write_all_tables;
-{
-    return CALLVJPEG(sp,
-     jpeg_start_compress(&sp->cinfo.c, write_all_tables));
-}
-
-static int
-TIFFjpeg_write_scanlines(sp, scanlines, num_lines)
-    JPEGState* sp;
-    JSAMPARRAY scanlines;
-    int num_lines;
-{
-    return CALLJPEG(sp, -1, (int) jpeg_write_scanlines(&sp->cinfo.c,
-	  scanlines, (JDIMENSION) num_lines));
-}
-
-
-static int
-TIFFjpeg_write_raw_data(sp, data, num_lines)
-    JPEGState* sp;
-    JSAMPIMAGE data;
-    int num_lines;
-{
-	return CALLJPEG(sp, -1, (int) jpeg_write_raw_data(&sp->cinfo.c,
-	    data, (JDIMENSION) num_lines));
-}
-
-
-static int
-TIFFjpeg_finish_compress(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_finish_compress(&sp->cinfo.c));
-}
-
-
-static int
-TIFFjpeg_write_tables(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_write_tables(&sp->cinfo.c));
-}
-
-
-static int
-TIFFjpeg_read_header(sp, require_image)
-    JPEGState* sp;
-    boolean require_image;
-{
-    return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image));
-}
-
-static int
-TIFFjpeg_start_decompress(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d));
-}
-
-
-static int
-TIFFjpeg_read_scanlines(sp, scanlines, max_lines)
-    JPEGState* sp;
-    JSAMPARRAY scanlines;
-    int max_lines;
-{
-    return CALLJPEG(sp, -1, (int) jpeg_read_scanlines(&sp->cinfo.d,
-	    scanlines, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_read_raw_data(sp, data, max_lines)
-    JPEGState* sp;
-    JSAMPIMAGE data;
-    int max_lines;
-{
-    return CALLJPEG(sp, -1, (int) jpeg_read_raw_data(&sp->cinfo.d,
-	    data, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_finish_decompress(sp)
-    JPEGState* sp;
-{
-    return CALLJPEG(sp, -1, (int) jpeg_finish_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_abort(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_abort(&sp->cinfo.comm));
-}
-
-static int
-TIFFjpeg_destroy(sp)
-    JPEGState* sp;
-{
-    return CALLVJPEG(sp, jpeg_destroy(&sp->cinfo.comm));
-}
-
-static JSAMPARRAY
-TIFFjpeg_alloc_sarray(sp, pool_id, samplesperrow, numrows)
-    JPEGState* sp;
-    int pool_id;
-    JDIMENSION samplesperrow;
-    JDIMENSION numrows;
-{
-	return CALLJPEG(sp, (JSAMPARRAY) NULL,
-	    (*sp->cinfo.comm.mem->alloc_sarray)
-		(&sp->cinfo.comm, pool_id, samplesperrow, numrows));
-}
-
-/*
- * JPEG library destination data manager.
- * These routines direct compressed data from libjpeg into the
- * libtiff output buffer.
- */
-
-static void
-std_init_destination(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-    TIFF* tif = sp->tif;
-
-    sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-    sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-}
-
-static boolean
-std_empty_output_buffer(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-    TIFF* tif = sp->tif;
-
-    /* the entire buffer has been filled */
-    tif->tif_rawcc = tif->tif_rawdatasize;
-    TIFFFlushData1(tif);
-    sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-    sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-
-    return (TRUE);
-}
-
-static void
-std_term_destination(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-    TIFF* tif = sp->tif;
-
-    tif->tif_rawcp = (tidata_t) sp->dest.next_output_byte;
-    tif->tif_rawcc =
-      tif->tif_rawdatasize - (tsize_t) sp->dest.free_in_buffer;
-    /* NB: libtiff does the final buffer flush */
-}
-
-static void
-TIFFjpeg_data_dest(sp, tif)
-    JPEGState* sp;
-    TIFF* tif;
-{
-    (void) tif;
-    sp->cinfo.c.dest = &sp->dest;
-    sp->dest.init_destination = std_init_destination;
-    sp->dest.empty_output_buffer = std_empty_output_buffer;
-    sp->dest.term_destination = std_term_destination;
-}
-
-/*
- * Alternate destination manager for outputting to JPEGTables field.
- */
-
-static void
-tables_init_destination(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-
-    /* while building, jpegtables_length is allocated buffer size */
-    sp->dest.next_output_byte = (JOCTET*) sp->jpegtables;
-    sp->dest.free_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static boolean
-tables_empty_output_buffer(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-    void* newbuf;
-
-    /* the entire buffer has been filled; enlarge it by 1000 bytes */
-    newbuf = TkimgTIFFrealloc((tdata_t) sp->jpegtables,
-			      (tsize_t) (sp->jpegtables_length + 1000));
-    if (newbuf == NULL)
-      ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 100);
-    sp->dest.next_output_byte = (JOCTET*) newbuf + sp->jpegtables_length;
-    sp->dest.free_in_buffer = (size_t) 1000;
-    sp->jpegtables = newbuf;
-    sp->jpegtables_length += 1000;
-    return (TRUE);
-}
-
-static void
-tables_term_destination(cinfo)
-    j_compress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-
-    /* set tables length to number of bytes actually emitted */
-    sp->jpegtables_length -= sp->dest.free_in_buffer;
-}
-
-static int
-TIFFjpeg_tables_dest(sp, tif)
-    JPEGState* sp;
-    TIFF* tif;
-{
-    (void) tif;
-    /*
-     * Allocate a working buffer for building tables.
-     * Initial size is 1000 bytes, which is usually adequate.
-     */
-    if (sp->jpegtables) {
-        TkimgTIFFfree(sp->jpegtables);
-    }
-    sp->jpegtables_length = 1000;
-    sp->jpegtables = (void*) TkimgTIFFmalloc((tsize_t) sp->jpegtables_length);
-    if (sp->jpegtables == NULL) {
-        sp->jpegtables_length = 0;
-	TIFFError("TIFFjpeg_tables_dest", "No space for JPEGTables");
-      return (0);
-    }
-    sp->cinfo.c.dest = &sp->dest;
-    sp->dest.init_destination = tables_init_destination;
-    sp->dest.empty_output_buffer = tables_empty_output_buffer;
-    sp->dest.term_destination = tables_term_destination;
-    return (1);
-}
-
-/*
- * JPEG library source data manager.
- * These routines supply compressed data to libjpeg.
- */
-
-static void
-std_init_source(cinfo)
-    j_decompress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-    TIFF* tif = sp->tif;
-
-    sp->src.next_input_byte = (const JOCTET*) tif->tif_rawdata;
-    sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc;
-}
-
-static boolean
-std_fill_input_buffer(cinfo)
-    j_decompress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState* ) cinfo;
-    static const JOCTET dummy_EOI[2] = { 0xFF, JPEG_EOI };
-
-    /*
-     * Should never get here since entire strip/tile is
-     * read into memory before the decompressor is called,
-     * and thus was supplied by init_source.
-     */
-    WARNMS(cinfo, JWRN_JPEG_EOF);
-    /* insert a fake EOI marker */
-    sp->src.next_input_byte = dummy_EOI;
-    sp->src.bytes_in_buffer = 2;
-    return (TRUE);
-}
-
-static void
-std_skip_input_data(cinfo, num_bytes)
-    j_decompress_ptr cinfo;
-    long num_bytes;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-
-    if (num_bytes > 0) {
-      if (num_bytes > (long) sp->src.bytes_in_buffer) {
-	/* oops, buffer overrun */
-	(void) std_fill_input_buffer(cinfo);
-      } else {
-	sp->src.next_input_byte += (size_t) num_bytes;
-	sp->src.bytes_in_buffer -= (size_t) num_bytes;
-      }
-    }
-}
-
-static void
-std_term_source(cinfo)
-    j_decompress_ptr cinfo;
-{
-    /* No work necessary here */
-    /* Or must we update tif->tif_rawcp, tif->tif_rawcc ??? */
-    /* (if so, need empty tables_term_source!) */
-    (void) cinfo;
-}
-
-static void
-TIFFjpeg_data_src(sp, tif)
-    JPEGState* sp;
-    TIFF* tif;
-{
-    (void) tif;
-    sp->cinfo.d.src = &sp->src;
-    sp->src.init_source = std_init_source;
-    sp->src.fill_input_buffer = std_fill_input_buffer;
-    sp->src.skip_input_data = std_skip_input_data;
-    sp->src.resync_to_restart = jpeg_resync_to_restart;
-    sp->src.term_source = std_term_source;
-    sp->src.bytes_in_buffer = 0;		/* for safety */
-    sp->src.next_input_byte = NULL;
-}
-
-/*
- * Alternate source manager for reading from JPEGTables.
- * We can share all the code except for the init routine.
- */
-
-static void
-tables_init_source(cinfo)
-    j_decompress_ptr cinfo;
-{
-    JPEGState* sp = (JPEGState*) cinfo;
-
-    sp->src.next_input_byte = (const JOCTET*) sp->jpegtables;
-    sp->src.bytes_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static void
-TIFFjpeg_tables_src(sp, tif)
-    JPEGState* sp;
-    TIFF* tif;
-{
-    TIFFjpeg_data_src(sp, tif);
-    sp->src.init_source = tables_init_source;
-}
-
-/*
- * Allocate downsampled-data buffers needed for downsampled I/O.
- * We use values computed in jpeg_start_compress or jpeg_start_decompress.
- * We use libjpeg's allocator so that buffers will be released automatically
- * when done with strip/tile.
- * This is also a handy place to compute samplesperclump, bytesperline.
- */
-
-static int
-alloc_downsampled_buffers(tif, comp_info, num_components)
-    TIFF* tif;
-    jpeg_component_info* comp_info;
-    int num_components;
-{
-	JPEGState* sp = JState(tif);
-	int ci;
-	jpeg_component_info* compptr;
-	JSAMPARRAY buf;
-	int samples_per_clump = 0;
-
-	for (ci = 0, compptr = comp_info; ci < num_components;
-	     ci++, compptr++) {
-		samples_per_clump += compptr->h_samp_factor *
-			compptr->v_samp_factor;
-		buf = TIFFjpeg_alloc_sarray(sp, JPOOL_IMAGE,
-				compptr->width_in_blocks * DCTSIZE,
-				(JDIMENSION) (compptr->v_samp_factor*DCTSIZE));
-		if (buf == NULL)
-			return (0);
-		sp->ds_buffer[ci] = buf;
-	}
-	sp->samplesperclump = samples_per_clump;
-	/* Cb,Cr both have sampling factors 1 */
-	/* so downsampled width of Cb is # of clumps per line */
-	sp->bytesperline = sizeof(JSAMPLE) * samples_per_clump *
-		comp_info[1].downsampled_width;
-	return (1);
-}
-
-
-/*
- * JPEG Decoding.
- */
-
-static int
-JPEGSetupDecode(tif)
-    TIFF* tif;
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-
-	/* Read JPEGTables if it is present */
-	if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) {
-		TIFFjpeg_tables_src(sp, tif);
-		if(TIFFjpeg_read_header(sp,FALSE) != JPEG_HEADER_TABLES_ONLY) {
-			TIFFError("JPEGSetupDecode", "Bogus JPEGTables field");
-			return (0);
-		}
-	}
-
-	/* Grab parameters that are same for all strips/tiles */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		break;
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-
-	/* Set up for reading normal data */
-	TIFFjpeg_data_src(sp, tif);
-	tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */
-	return (1);
-}
-
-/*
- * Set up for decoding a strip or tile.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-JPEGPreDecode (
-    TIFF* tif,
-    tsample_t s)
-#else
-JPEGPreDecode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static char module[] = "JPEGPreDecode";
-	uint32 segment_width, segment_height;
-	int downsampled_output;
-	int ci;
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-	/*
-	 * Reset decoder state from any previous strip/tile,
-	 * in case application didn't read the whole strip.
-	 */
-	if (!TIFFjpeg_abort(sp))
-		return (0);
-	/*
-	 * Read the header for this strip/tile.
-	 */
-	if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK)
-		return (0);
-	/*
-	 * Check image parameters and set decompression parameters.
-	 */
-	if (isTiled(tif)) {
-		segment_width = td->td_tilewidth;
-		segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		segment_width = td->td_imagewidth;
-		segment_height = td->td_imagelength - tif->tif_row;
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/*
-		 * For PC 2, scale down the expected strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (sp->cinfo.d.image_width != segment_width ||
-	    sp->cinfo.d.image_height != segment_height) {
-		TIFFError(module, "Improper JPEG strip/tile size");
-		return (0);
-	}
-	if (sp->cinfo.d.num_components !=
-	    (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	     td->td_samplesperpixel : 1)) {
-		TIFFError(module, "Improper JPEG component count");
-		return (0);
-	}
-	if (sp->cinfo.d.data_precision != td->td_bitspersample) {
-		TIFFError(module, "Improper JPEG data precision");
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		/* Component 0 should have expected sampling factors */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
-			TIFFError(module, "Improper JPEG sampling factors");
-			return (0);
-		}
-		/* Rest should have sampling factors 1,1 */
-		for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
-			if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 ||
-			    sp->cinfo.d.comp_info[ci].v_samp_factor != 1) {
-				TIFFError(module, "Improper JPEG sampling factors");
-				return (0);
-			}
-		}
-	} else {
-		/* PC 2's single component should have sampling factors 1,1 */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != 1 ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != 1) {
-			TIFFError(module, "Improper JPEG sampling factors");
-			return (0);
-		}
-	}
-	downsampled_output = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    sp->photometric == PHOTOMETRIC_YCBCR &&
-	    sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-		/* Convert YCbCr to RGB */
-		sp->cinfo.d.jpeg_color_space = JCS_YCbCr;
-		sp->cinfo.d.out_color_space = JCS_RGB;
-	} else {
-		/* Suppress colorspace handling */
-		sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN;
-		sp->cinfo.d.out_color_space = JCS_UNKNOWN;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-		    (sp->h_sampling != 1 || sp->v_sampling != 1))
-			downsampled_output = TRUE;
-		/* XXX what about up-sampling? */
-	}
-	if (downsampled_output) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.d.raw_data_out = TRUE;
-		tif->tif_decoderow = JPEGDecodeRaw;
-		tif->tif_decodestrip = JPEGDecodeRaw;
-		tif->tif_decodetile = JPEGDecodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.d.raw_data_out = FALSE;
-		tif->tif_decoderow = JPEGDecode;
-		tif->tif_decodestrip = JPEGDecode;
-		tif->tif_decodetile = JPEGDecode;
-	}
-	/* Start JPEG decompressor */
-	if (!TIFFjpeg_start_decompress(sp))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_output) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.d.comp_info,
-					       sp->cinfo.d.num_components))
-			return (0);
-		sp->scancount = DCTSIZE;	/* mark buffer empty */
-	}
-	return (1);
-}
-
-/*
- * Decode a chunk of pixels.
- * "Standard" case: returned data is not downsampled.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-JPEGDecode (
-    TIFF* tif,
-    tidata_t buf,
-    tsize_t cc,
-    tsample_t s)
-#else
-JPEGDecode(tif, buf, cc, s)
-    TIFF* tif;
-    tidata_t buf;
-    tsize_t cc;
-    tsample_t s;
-#endif
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-	JSAMPROW bufptr[1];
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be read in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-
-	while (nrows-- > 0) {
-		bufptr[0] = (JSAMPROW) buf;
-		if (TIFFjpeg_read_scanlines(sp, bufptr, 1) != 1)
-			return (0);
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	/* Close down the decompressor if we've finished the strip or tile. */
-	if (sp->cinfo.d.output_scanline == sp->cinfo.d.output_height) {
-		if (TIFFjpeg_finish_decompress(sp) != TRUE)
-			return (0);
-	}
-	return (1);
-}
-
-/*
- * Decode a chunk of pixels.
- * Returned data is downsampled per sampling factors.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-JPEGDecodeRaw (
-    TIFF* tif,
-    tidata_t buf,
-    tsize_t cc,
-    tsample_t s)
-#else
-JPEGDecodeRaw(tif, buf, cc, s)
-    TIFF* tif;
-    tidata_t buf;
-    tsize_t cc;
-    tsample_t s;
-#endif
-{
-	JPEGState *sp = JState(tif);
-	JSAMPLE* inptr;
-	JSAMPLE* outptr;
-	tsize_t nrows;
-	JDIMENSION clumps_per_line, nclump;
-	int clumpoffset, ci, xpos, ypos;
-	jpeg_component_info* compptr;
-	int samples_per_clump = sp->samplesperclump;
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be read in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-
-	/* Cb,Cr both have sampling factors 1, so this is correct */
-	clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
-
-	while (nrows-- > 0) {
-		/* Reload downsampled-data buffer if needed */
-		if (sp->scancount >= DCTSIZE) {
-			int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE;
-			if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n) != n)
-				return (0);
-			sp->scancount = 0;
-			/* Close down the decompressor if done. */
-			if (sp->cinfo.d.output_scanline >=
-			    sp->cinfo.d.output_height) {
-				if (TIFFjpeg_finish_decompress(sp) != TRUE)
-					return (0);
-			}
-		}
-		/*
-		 * Fastest way to unseparate the data is to make one pass
-		 * over the scanline for each row of each component.
-		 */
-		clumpoffset = 0;		/* first sample in clump */
-		for (ci = 0, compptr = sp->cinfo.d.comp_info;
-		     ci < sp->cinfo.d.num_components;
-		     ci++, compptr++) {
-		    int hsamp = compptr->h_samp_factor;
-		    int vsamp = compptr->v_samp_factor;
-		    for (ypos = 0; ypos < vsamp; ypos++) {
-			inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-			outptr = ((JSAMPLE*) buf) + clumpoffset;
-			if (hsamp == 1) {
-			    /* fast path for at least Cb and Cr */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				outptr[0] = *inptr++;
-				outptr += samples_per_clump;
-			    }
-			} else {
-			    /* general case */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				for (xpos = 0; xpos < hsamp; xpos++)
-				    outptr[xpos] = *inptr++;
-				outptr += samples_per_clump;
-			    }
-			}
-			clumpoffset += hsamp;
-		    }
-		}
-		sp->scancount++;
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-
-/*
- * JPEG Encoding.
- */
-
-static void unsuppress_quant_table _ANSI_ARGS_((JPEGState*, int));
-static void
-unsuppress_quant_table(sp, tblno)
-    JPEGState* sp;
-    int tblno;
-{
-	JQUANT_TBL* qtbl;
-
-	if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL)
-		qtbl->sent_table = FALSE;
-}
-
-static void unsuppress_huff_table _ANSI_ARGS_((JPEGState*, int));
-static void
-unsuppress_huff_table(sp, tblno)
-    JPEGState* sp;
-    int tblno;
-{
-	JHUFF_TBL* htbl;
-
-	if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-	if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-}
-
-static int prepare_JPEGTables _ANSI_ARGS_((TIFF*));
-static int
-prepare_JPEGTables(tif)
-    TIFF* tif;
-{
-	JPEGState* sp = JState(tif);
-
-	/* Initialize quant tables for current quality setting */
-	if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-		return (0);
-	/* Mark only the tables we want for output */
-	/* NB: chrominance tables are currently used only with YCbCr */
-	if (!TIFFjpeg_suppress_tables(sp, TRUE))
-		return (0);
-	if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) {
-		unsuppress_quant_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) {
-		unsuppress_huff_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_huff_table(sp, 1);
-	}
-	/* Direct libjpeg output into jpegtables */
-	if (!TIFFjpeg_tables_dest(sp, tif))
-		return (0);
-	/* Emit tables-only datastream */
-	if (!TIFFjpeg_write_tables(sp))
-		return (0);
-
-	return (1);
-}
-
-static int
-JPEGSetupEncode(tif)
-    TIFF* tif;
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static char module[] = "JPEGSetupEncode";
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-
-	/*
-	 * Initialize all JPEG parameters to default values.
-	 * Note that jpeg_set_defaults needs legal values for
-	 * in_color_space and input_components.
-	 */
-	sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-	sp->cinfo.c.input_components = 1;
-	if (!TIFFjpeg_set_defaults(sp))
-		return (0);
-	/* Set per-file parameters */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		/*
-		 * A ReferenceBlackWhite field *must* be present since the
-		 * default value is inappropriate for YCbCr.  Fill in the
-		 * proper value if application didn't set it.
-		 */
-#ifdef COLORIMETRY_SUPPORT
-		if (!TIFFFieldSet(tif, FIELD_REFBLACKWHITE)) {
-			float refbw[6];
-			long top = 1L << td->td_bitspersample;
-			refbw[0] = 0;
-			refbw[1] = (float)(top-1L);
-			refbw[2] = (float)(top>>1);
-			refbw[3] = refbw[1];
-			refbw[4] = refbw[2];
-			refbw[5] = refbw[1];
-			TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refbw);
-		}
-#endif
-		break;
-	case PHOTOMETRIC_PALETTE:		/* disallowed by Tech Note */
-	case PHOTOMETRIC_MASK:
-		TIFFError(module,
-			  "PhotometricInterpretation %d not allowed for JPEG",
-			  (int) sp->photometric);
-		return (0);
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-	
-	/* Verify miscellaneous parameters */
-
-	/*
-	 * This would need work if libtiff ever supports different
-	 * depths for different components, or if libjpeg ever supports
-	 * run-time selection of depth.  Neither is imminent.
-	 */
-	if (td->td_bitspersample != BITS_IN_JSAMPLE) {
-		TIFFError(module, "BitsPerSample %d not allowed for JPEG",
-			  (int) td->td_bitspersample);
-		return (0);
-	}
-	sp->cinfo.c.data_precision = td->td_bitspersample;
-	if (isTiled(tif)) {
-		if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile height must be multiple of %d",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-		if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile width must be multiple of %d",
-				  sp->h_sampling * DCTSIZE);
-			return (0);
-		}
-	} else {
-		if (td->td_rowsperstrip < td->td_imagelength &&
-		    (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "RowsPerStrip must be multiple of %d for JPEG",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-	}
-
-	/* Create a JPEGTables field if appropriate */
-	if (sp->jpegtablesmode & (JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF)) {
-		if (!prepare_JPEGTables(tif))
-			return (0);
-		/* Mark the field present */
-		/* Can't use TIFFSetField since BEENWRITING is already set! */
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		tif->tif_flags |= TIFF_DIRTYDIRECT;
-	} else {
-		/* We do not support application-supplied JPEGTables, */
-		/* so mark the field not present */
-		TIFFClrFieldBit(tif, FIELD_JPEGTABLES);
-	}
-
-	/* Direct libjpeg output to libtiff's output buffer */
-	TIFFjpeg_data_dest(sp, tif);
-
-	return (1);
-}
-
-/*
- * Set encoding state at the start of a strip or tile.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-JPEGPreEncode (
-    TIFF* tif,
-    tsample_t s)
-#else
-JPEGPreEncode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static char module[] = "JPEGPreEncode";
-	uint32 segment_width, segment_height;
-	int downsampled_input;
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-	/*
-	 * Set encoding parameters for this strip/tile.
-	 */
-	if (isTiled(tif)) {
-		segment_width = td->td_tilewidth;
-		segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		segment_width = td->td_imagewidth;
-		segment_height = td->td_imagelength - tif->tif_row;
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/* for PC 2, scale down the strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (segment_width > 65535 || segment_height > 65535) {
-		TIFFError(module, "Strip/tile too large for JPEG");
-		return (0);
-	}
-	sp->cinfo.c.image_width = segment_width;
-	sp->cinfo.c.image_height = segment_height;
-	downsampled_input = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		sp->cinfo.c.input_components = td->td_samplesperpixel;
-		if (sp->photometric == PHOTOMETRIC_YCBCR) {
-			if (sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-				sp->cinfo.c.in_color_space = JCS_RGB;
-			} else {
-				sp->cinfo.c.in_color_space = JCS_YCbCr;
-				if (sp->h_sampling != 1 || sp->v_sampling != 1)
-					downsampled_input = TRUE;
-			}
-			if (!TIFFjpeg_set_colorspace(sp, JCS_YCbCr))
-				return (0);
-			/*
-			 * Set Y sampling factors;
-			 * we assume jpeg_set_colorspace() set the rest to 1
-			 */
-			sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
-			sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
-		} else {
-			sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-			if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-				return (0);
-			/* jpeg_set_colorspace set all sampling factors to 1 */
-		}
-	} else {
-		sp->cinfo.c.input_components = 1;
-		sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-		if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-			return (0);
-		sp->cinfo.c.comp_info[0].component_id = s;
-		/* jpeg_set_colorspace() set sampling factors to 1 */
-		if (sp->photometric == PHOTOMETRIC_YCBCR && s > 0) {
-			sp->cinfo.c.comp_info[0].quant_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].dc_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
-		}
-	}
-	/* ensure libjpeg won't write any extraneous markers */
-	sp->cinfo.c.write_JFIF_header = FALSE;
-	sp->cinfo.c.write_Adobe_marker = FALSE;
-	/* set up table handling correctly */
-	if (! (sp->jpegtablesmode & JPEGTABLESMODE_QUANT)) {
-		if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-			return (0);
-		unsuppress_quant_table(sp, 0);
-		unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF)
-		sp->cinfo.c.optimize_coding = FALSE;
-	else
-		sp->cinfo.c.optimize_coding = TRUE;
-	if (downsampled_input) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.c.raw_data_in = TRUE;
-		tif->tif_encoderow = JPEGEncodeRaw;
-		tif->tif_encodestrip = JPEGEncodeRaw;
-		tif->tif_encodetile = JPEGEncodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.c.raw_data_in = FALSE;
-		tif->tif_encoderow = JPEGEncode;
-		tif->tif_encodestrip = JPEGEncode;
-		tif->tif_encodetile = JPEGEncode;
-	}
-	/* Start JPEG compressor */
-	if (!TIFFjpeg_start_compress(sp, FALSE))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_input) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.c.comp_info,
-					       sp->cinfo.c.num_components))
-			return (0);
-	}
-	sp->scancount = 0;
-
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * "Standard" case: incoming data is not downsampled.
- */
-
-static int
-JPEGEncode(tif, buf, cc, s)
-    TIFF* tif;
-    tidata_t buf;
-    tsize_t cc;
-    tsample_t s;
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-	JSAMPROW bufptr[1];
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-
-	while (nrows-- > 0) {
-		bufptr[0] = (JSAMPROW) buf;
-		if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)
-			return (0);
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * Incoming data is expected to be downsampled per sampling factors.
- */
-
-static int
-JPEGEncodeRaw(tif, buf, cc, s)
-    TIFF* tif;
-    tidata_t buf;
-    tsize_t cc;
-    tsample_t s;
-{
-	JPEGState *sp = JState(tif);
-	JSAMPLE* inptr;
-	JSAMPLE* outptr;
-	tsize_t nrows;
-	JDIMENSION clumps_per_line, nclump;
-	int clumpoffset, ci, xpos, ypos;
-	jpeg_component_info* compptr;
-	int samples_per_clump = sp->samplesperclump;
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-
-	/* Cb,Cr both have sampling factors 1, so this is correct */
-	clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width;
-
-	while (nrows-- > 0) {
-		/*
-		 * Fastest way to separate the data is to make one pass
-		 * over the scanline for each row of each component.
-		 */
-		clumpoffset = 0;		/* first sample in clump */
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-		    int hsamp = compptr->h_samp_factor;
-		    int vsamp = compptr->v_samp_factor;
-		    int padding = (int) (compptr->width_in_blocks * DCTSIZE -
-					 clumps_per_line * hsamp);
-		    for (ypos = 0; ypos < vsamp; ypos++) {
-			inptr = ((JSAMPLE*) buf) + clumpoffset;
-			outptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-			if (hsamp == 1) {
-			    /* fast path for at least Cb and Cr */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				*outptr++ = inptr[0];
-				inptr += samples_per_clump;
-			    }
-			} else {
-			    /* general case */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				for (xpos = 0; xpos < hsamp; xpos++)
-				    *outptr++ = inptr[xpos];
-				inptr += samples_per_clump;
-			    }
-			}
-			/* pad each scanline as needed */
-			for (xpos = 0; xpos < padding; xpos++) {
-			    *outptr = outptr[-1];
-			    outptr++;
-			}
-			clumpoffset += hsamp;
-		    }
-		}
-		sp->scancount++;
-		if (sp->scancount >= DCTSIZE) {
-			int n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-			if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-				return (0);
-			sp->scancount = 0;
-		}
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Finish up at the end of a strip or tile.
- */
-
-static int
-JPEGPostEncode(tif)
-    TIFF* tif;
-{
-	JPEGState *sp = JState(tif);
-
-	if (sp->scancount > 0) {
-		/*
-		 * Need to emit a partial bufferload of downsampled data.
-		 * Pad the data vertically.
-		 */
-		int ci, ypos, n;
-		jpeg_component_info* compptr;
-
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-			int vsamp = compptr->v_samp_factor;
-			tsize_t row_width = compptr->width_in_blocks * DCTSIZE
-				* sizeof(JSAMPLE);
-			for (ypos = sp->scancount * vsamp;
-			     ypos < DCTSIZE * vsamp; ypos++) {
-				_TIFFmemcpy((tdata_t)sp->ds_buffer[ci][ypos],
-					    (tdata_t)sp->ds_buffer[ci][ypos-1],
-					    row_width);
-
-			}
-		}
-		n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-		if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-			return (0);
-	}
-
-	return (TIFFjpeg_finish_compress(JState(tif)));
-}
-
-static void
-JPEGCleanup(tif)
-    TIFF* tif;
-{
-	if (tif->tif_data) {
-		JPEGState *sp = JState(tif);
-		TIFFjpeg_destroy(sp);		/* release libjpeg resources */
-		if (sp->jpegtables) {		/* tag value */
-			TkimgTIFFfree(sp->jpegtables);
-		}
-		TkimgTIFFfree(tif->tif_data);	/* release local state */
-		tif->tif_data = NULL;
-	}
-}
-
-
-static int
-JPEGVSetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-	uint32 v32;
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0) {
-			/* XXX */
-			return (0);
-		}
-		_TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*),
-		    (long) v32);
-		sp->jpegtables_length = v32;
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		sp->jpegquality = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGCOLORMODE:
-		sp->jpegcolormode = va_arg(ap, int);
-		/*
-		 * Mark whether returned data is up-sampled or not
-		 * so TIFFStripSize and TIFFTileSize return values
-		 * that reflect the true amount of data.
-		 */
-		tif->tif_flags &= ~TIFF_UPSAMPLED;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		    if (td->td_photometric == PHOTOMETRIC_YCBCR &&
-		      sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-			tif->tif_flags |= TIFF_UPSAMPLED;
-		    } else {
-			if (td->td_ycbcrsubsampling[0] != 1 ||
-			    td->td_ycbcrsubsampling[1] != 1)
-			    ; /* XXX what about up-sampling? */
-		    }
-		}
-		/*
-		 * Must recalculate cached tile size
-		 * in case sampling state changed.
-		 */
-		tif->tif_tilesize = TIFFTileSize(tif);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGTABLESMODE:
-		sp->jpegtablesmode = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-
-static int
-JPEGVGetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-	JPEGState* sp = JState(tif);
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		/* u_short is bogus --- should be uint32 ??? */
-		/* TIFFWriteNormalTag needs fixed  XXX */
-		*va_arg(ap, u_short*) = (u_short) sp->jpegtables_length;
-		*va_arg(ap, void**) = sp->jpegtables;
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		*va_arg(ap, int*) = sp->jpegquality;
-		break;
-	case TIFFTAG_JPEGCOLORMODE:
-		*va_arg(ap, int*) = sp->jpegcolormode;
-		break;
-	case TIFFTAG_JPEGTABLESMODE:
-		*va_arg(ap, int*) = sp->jpegtablesmode;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static uint32
-JPEGDefaultStripSize(tif, s)
-    TIFF* tif;
-    uint32 s;
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	s = (*sp->defsparent)(tif, s);
-	if (s < td->td_imagelength)
-		s = TIFFroundup(s, td->td_ycbcrsubsampling[1] * DCTSIZE);
-	return (s);
-}
-
-static void
-JPEGDefaultTileSize(tif, tw, th)
-    TIFF* tif;
-    uint32* tw;
-    uint32* th;
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	(*sp->deftparent)(tif, tw, th);
-	*tw = TIFFroundup(*tw, td->td_ycbcrsubsampling[0] * DCTSIZE);
-	*th = TIFFroundup(*th, td->td_ycbcrsubsampling[1] * DCTSIZE);
-}
-
-int
-TkimgTIFFInitJpeg(handle, scheme)
-    TIFF* handle;
-    int scheme;
-{
-    TIFF *tif = (TIFF *) handle;
-    JPEGState* sp;
-
-    assert(scheme == COMPRESSION_JPEG);
-
-    /*
-     * We assume here that package jpegtcl is loaded and its stub
-     * table initialized. This happens in tiff.c, just before the
-     * codec is registered.
-     */
-
-    /*
-     * Allocate state block so tag methods have storage to record values.
-     */
-    tif->tif_data = (tidata_t) TkimgTIFFmalloc(sizeof (JPEGState));
-    if (tif->tif_data == NULL) {
-      TIFFError("TIFFInitJPEG", "No space for JPEG state block");
-      return (0);
-    }
-    sp = JState(tif);
-    sp->tif = tif;				/* back link */
-
-    /*
-     * Merge codec-specific tag information and
-     * override parent get/set field methods.
-     */
-    _TIFFMergeFieldInfo(tif, jpegFieldInfo, N(jpegFieldInfo));
-    sp->vgetparent = tif->tif_tagmethods.vgetfield;
-    tif->tif_tagmethods.vgetfield = JPEGVGetField;	/* hook for codec tags */
-    sp->vsetparent = tif->tif_tagmethods.vsetfield;
-    tif->tif_tagmethods.vsetfield = JPEGVSetField;	/* hook for codec tags */
-
-    /* Default values for codec-specific fields */
-    sp->jpegtables = NULL;
-    sp->jpegtables_length = 0;
-    sp->jpegquality = 75;			/* Default IJG quality */
-    sp->jpegcolormode = JPEGCOLORMODE_RAW;
-    sp->jpegtablesmode = JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF;
-
-    /*
-     * Install codec methods.
-     */
-    tif->tif_setupdecode = JPEGSetupDecode;
-    tif->tif_predecode = JPEGPreDecode;
-    tif->tif_decoderow = JPEGDecode;
-    tif->tif_decodestrip = JPEGDecode;
-    tif->tif_decodetile = JPEGDecode;
-    tif->tif_setupencode = JPEGSetupEncode;
-    tif->tif_preencode = JPEGPreEncode;
-    tif->tif_postencode = JPEGPostEncode;
-    tif->tif_encoderow = JPEGEncode;
-    tif->tif_encodestrip = JPEGEncode;
-    tif->tif_encodetile = JPEGEncode;
-    tif->tif_cleanup = JPEGCleanup;
-    sp->defsparent = tif->tif_defstripsize;
-    tif->tif_defstripsize = JPEGDefaultStripSize;
-    sp->deftparent = tif->tif_deftilesize;
-    tif->tif_deftilesize = JPEGDefaultTileSize;
-    tif->tif_flags |= TIFF_NOBITREV;	/* no bit reversal, please */
-
-    /*
-     * Initialize libjpeg.
-     */
-    if (tif->tif_mode == O_RDONLY) {
-      if (!TIFFjpeg_create_decompress(sp))
-	return (0);
-    } else {
-      if (!TIFFjpeg_create_compress(sp))
-	return (0);
-    }
-
-    return (1);
-}
diff --git a/tkimg1.3/tiff/tiffPixar.c b/tkimg1.3/tiff/tiffPixar.c
deleted file mode 100644
index 3fa9898..0000000
--- a/tkimg1.3/tiff/tiffPixar.c
+++ /dev/null
@@ -1,1430 +0,0 @@
-/*
- * Copyright (c) 1996-1997 Sam Leffler
- * Copyright (c) 1996 Pixar
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Pixar, Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffInt.h"
-
-/*
- * TIFF Library.
- * PixarLog Compression Support
- *
- * Contributed by Dan McCoy.
- *
- * PixarLog film support uses the TIFF library to store companded
- * 11 bit values into a tiff file, which are compressed using the 
- * zip compressor.  
- *
- * The codec can take as input and produce as output 32-bit IEEE float values 
- * as well as 16-bit or 8-bit unsigned integer values.
- *
- * On writing any of the above are converted into the internal
- * 11-bit log format.   In the case of  8 and 16 bit values, the
- * input is assumed to be unsigned linear color values that represent
- * the range 0-1.  In the case of IEEE values, the 0-1 range is assumed to
- * be the normal linear color range, in addition over 1 values are
- * accepted up to a value of about 25.0 to encode "hot" hightlights and such.
- * The encoding is lossless for 8-bit values, slightly lossy for the
- * other bit depths.  The actual color precision should be better
- * than the human eye can perceive with extra room to allow for
- * error introduced by further image computation.  As with any quantized
- * color format, it is possible to perform image calculations which
- * expose the quantization error. This format should certainly be less 
- * susceptable to such errors than standard 8-bit encodings, but more
- * susceptable than straight 16-bit or 32-bit encodings.
- *
- * On reading the internal format is converted to the desired output format.
- * The program can request which format it desires by setting the internal
- * pseudo tag TIFFTAG_PIXARLOGDATAFMT to one of these possible values:
- *  PIXARLOGDATAFMT_FLOAT     = provide IEEE float values.
- *  PIXARLOGDATAFMT_16BIT     = provide unsigned 16-bit integer values
- *  PIXARLOGDATAFMT_8BIT      = provide unsigned 8-bit integer values
- *
- * alternately PIXARLOGDATAFMT_8BITABGR provides unsigned 8-bit integer
- * values with the difference that if there are exactly three or four channels
- * (rgb or rgba) it swaps the channel order (bgr or abgr).
- *
- * PIXARLOGDATAFMT_11BITLOG provides the internal encoding directly
- * packed in 16-bit values.   However no tools are supplied for interpreting
- * these values.
- *
- * "hot" (over 1.0) areas written in floating point get clamped to
- * 1.0 in the integer data types.
- *
- * When the file is closed after writing, the bit depth and sample format
- * are set always to appear as if 8-bit data has been written into it.
- * That way a naive program unaware of the particulars of the encoding
- * gets the format it is most likely able to handle.
- *
- * The codec does it's own horizontal differencing step on the coded
- * values so the libraries predictor stuff should be turned off.
- * The codec also handle byte swapping the encoded values as necessary
- * since the library does not have the information necessary
- * to know the bit depth of the raw unencoded buffer.
- * 
- */
-
-#include "zlibtcl.h"
-
-#include <assert.h>
-#include <math.h>
-
-/* Tables for converting to/from 11 bit coded values */
-
-#define  TSIZE	 2048		/* decode table size (11-bit tokens) */
-#define  TSIZEP1 2049		/* Plus one for slop */
-#define  ONE	 1250		/* token value of 1.0 exactly */
-#define  RATIO	 1.004		/* nominal ratio for log part */
-
-#define CODE_MASK 0x7ff         /* 11 bits. */
-
-static float  Fltsize;
-static float  LogK1, LogK2;
-
-#define REPEAT(n, op)   { int i; i=n; do { i--; op; } while (i>0); }
-
-static void
-horizontalAccumulateF(wp, n, stride, op, ToLinearF)
-    uint16 *wp;
-    int n;
-    int stride;
-    float *op; 
-    float *ToLinearF;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    t3 = ToLinearF[ca = wp[3]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		t3 = ToLinearF[(ca += wp[3]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinearF[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinearF[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate12(wp, n, stride, op, ToLinearF)
-    uint16 *wp;
-    int n;
-    int stride;
-    int16 *op;
-    float *ToLinearF;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-#define SCALE12 2048.0
-#define CLAMP12(t) (((t) < 3071) ? (uint16) (t) : 3071)
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    t3 = ToLinearF[ca = wp[3]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    op[3] = CLAMP12(t3);
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		t3 = ToLinearF[(ca += wp[3]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-		op[3] = CLAMP12(t3);
-	    }
-	} else {
-	    REPEAT(stride, t0 = ToLinearF[*wp&mask] * SCALE12;
-                           *op = CLAMP12(t0); wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; t0 = ToLinearF[wp[stride]&mask]*SCALE12;
-		    *op = CLAMP12(t0);  wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate16(wp, n, stride, op, ToLinear16)
-    uint16 *wp;
-    int n;
-    int stride;
-    uint16 *op;
-    uint16 *ToLinear16;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    op[3] = ToLinear16[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-		op[3] = ToLinear16[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear16[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear16[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/* 
- * Returns the log encoded 11-bit values with the horizontal
- * differencing undone.
- */
-static void
-horizontalAccumulate11(wp, n, stride, op)
-    uint16 *wp;
-    int n;
-    int stride;
-    uint16 *op;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];  op[2] = cb = wp[2];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-	    }
-	} else if (stride == 4) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];
-	    op[2] = cb = wp[2];  op[3] = ca = wp[3];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-		op[3] = (ca += wp[3]) & mask;
-	    } 
-	} else {
-	    REPEAT(stride, *op = *wp&mask; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = *wp&mask; wp++; op++)
-	    	n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate8(wp, n, stride, op, ToLinear8)
-    uint16 *wp;
-    int n;
-    int stride;
-    unsigned char *op;
-    unsigned char *ToLinear8;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 3;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    op[3] = ToLinear8[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-		op[3] = ToLinear8[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-
-static void
-horizontalAccumulate8abgr(wp, n, stride, op, ToLinear8)
-    uint16 *wp;
-    int n;
-    int stride;
-    unsigned char *op;
-    unsigned char *ToLinear8;
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register unsigned char  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = 0;
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 4;
-		op[0] = 0;
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinear8[ca = wp[3]];
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		t0 = ToLinear8[(ca += wp[3]) & mask];
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/*
- * State block for each open TIFF
- * file using PixarLog compression/decompression.
- */
-typedef	struct {
-	TIFFPredictorState	predict;
-	z_stream		stream;
-	uint16			*tbuf; 
-	uint16			stride;
-	int			state;
-	int			user_datafmt;
-	int			quality;
-#define PLSTATE_INIT 1
-
-	TIFFVSetMethod		vgetparent;	/* super-class method */
-	TIFFVSetMethod		vsetparent;	/* super-class method */
-
-	float *ToLinearF;
-	uint16 *ToLinear16;
-	unsigned char *ToLinear8;
-	uint16  *FromLT2;
-	uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-	uint16  *From8;
-	
-} PixarLogState;
-
-static int
-PixarLogMakeTables(sp)
-    PixarLogState *sp;
-{
-
-/*
- *    We make several tables here to convert between various external
- *    representations (float, 16-bit, and 8-bit) and the internal
- *    11-bit companded representation.  The 11-bit representation has two
- *    distinct regions.  A linear bottom end up through .018316 in steps
- *    of about .000073, and a region of constant ratio up to about 25.
- *    These floating point numbers are stored in the main table ToLinearF. 
- *    All other tables are derived from this one.  The tables (and the
- *    ratios) are continuous at the internal seam.
- */
-
-    int  nlin, lt2size;
-    int  i, j;
-    double  b, c, linstep;
-    double  v;
-    float *ToLinearF;
-    uint16 *ToLinear16;
-    unsigned char *ToLinear8;
-    uint16  *FromLT2;
-    uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-    uint16  *From8;
-
-    c = log(RATIO);	
-    nlin = 1./c;	/* nlin must be an integer */
-    c = 1./nlin;
-    b = exp(-c*ONE);	/* multiplicative scale factor [b*exp(c*ONE) = 1] */
-    linstep = b*c*exp(1.);
-
-    LogK1 = 1./c;	/* if (v >= 2)  token = k1*log(v*k2) */
-    LogK2 = 1./b;
-    lt2size = (2./linstep)+1;
-
-    FromLT2    = (uint16 *)        TkimgTIFFmalloc (lt2size*sizeof(uint16));
-    From14     = (uint16 *)        TkimgTIFFmalloc (16384*sizeof(uint16));
-    From8      = (uint16 *)        TkimgTIFFmalloc (256*sizeof(uint16));
-    ToLinearF  = (float *)         TkimgTIFFmalloc (TSIZEP1 * sizeof(float));
-    ToLinear16 = (uint16 *)        TkimgTIFFmalloc (TSIZEP1 * sizeof(uint16));
-    ToLinear8  = (unsigned char *) TkimgTIFFmalloc (TSIZEP1 * sizeof(unsigned char));
-
-    if (FromLT2 == NULL || From14  == NULL || From8   == NULL ||
-	 ToLinearF == NULL || ToLinear16 == NULL || ToLinear8 == NULL) {
-	if (FromLT2) TkimgTIFFfree(FromLT2);
-	if (From14) TkimgTIFFfree(From14);
-	if (From8) TkimgTIFFfree(From8);
-	if (ToLinearF) TkimgTIFFfree(ToLinearF);
-	if (ToLinear16) TkimgTIFFfree(ToLinear16);
-	if (ToLinear8) TkimgTIFFfree(ToLinear8);
-	sp->FromLT2 = NULL;
-	sp->From14 = NULL;
-	sp->From8 = NULL;
-	sp->ToLinearF = NULL;
-	sp->ToLinear16 = NULL;
-	sp->ToLinear8 = NULL;
-	return 0;
-    }
-
-    j = 0;
-
-    for (i = 0; i < nlin; i++)  {
-	v = i * linstep;
-	ToLinearF[j++] = v;
-    }
-
-    for (i = nlin; i < TSIZE; i++)
-	ToLinearF[j++] = b*exp(c*i);
-
-    ToLinearF[2048] = ToLinearF[2047];
-
-    for (i = 0; i < TSIZEP1; i++)  {
-	v = ToLinearF[i]*65535.0 + 0.5;
-	ToLinear16[i] = (v > 65535.0) ? 65535 : v;
-	v = ToLinearF[i]*255.0  + 0.5;
-	ToLinear8[i]  = (v > 255.0) ? 255 : v;
-    }
-
-    j = 0;
-    for (i = 0; i < lt2size; i++)  {
-	if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	FromLT2[i] = j;
-    }
-
-    /*
-     * Since we lose info anyway on 16-bit data, we set up a 14-bit
-     * table and shift 16-bit values down two bits on input.
-     * saves a little table space.
-     */
-    j = 0;
-    for (i = 0; i < 16384; i++)  {
-	while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From14[i] = j;
-    }
-
-    j = 0;
-    for (i = 0; i < 256; i++)  {
-	while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From8[i] = j;
-    }
-
-    Fltsize = lt2size/2;
-
-    sp->ToLinearF = ToLinearF;
-    sp->ToLinear16 = ToLinear16;
-    sp->ToLinear8 = ToLinear8;
-    sp->FromLT2 = FromLT2;
-    sp->From14 = From14;
-    sp->From8 = From8;
-
-    return 1;
-}
-
-#define	DecoderState(tif)	((PixarLogState*) (tif)->tif_data)
-#define	EncoderState(tif)	((PixarLogState*) (tif)->tif_data)
-
-#define N(a)   (sizeof(a)/sizeof(a[0]))
-#define PIXARLOGDATAFMT_UNKNOWN	-1
-
-static int
-PixarLogGuessDataFmt(td)
-    TIFFDirectory *td;
-{
-	int guess = PIXARLOGDATAFMT_UNKNOWN;
-	int format = td->td_sampleformat;
-
-	/* If the user didn't tell us his datafmt,
-	 * take our best guess from the bitspersample.
-	 */
-	switch (td->td_bitspersample) {
-	 case 32:
-		if (format == SAMPLEFORMAT_IEEEFP)
-			guess = PIXARLOGDATAFMT_FLOAT;
-		break;
-	 case 16:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_16BIT;
-		break;
-	 case 12:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_INT)
-			guess = PIXARLOGDATAFMT_12BITPICIO;
-		break;
-	 case 11:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_11BITLOG;
-		break;
-	 case 8:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_8BIT;
-		break;
-	}
-
-	return guess;
-}
-
-static int
-PixarLogSetupDecode(tif)
-    TIFF* tif;
-{
-    TIFFDirectory *td = &tif->tif_dir;
-    PixarLogState* sp = DecoderState(tif);
-    static const char module[] = "PixarLogSetupDecode";
-
-    assert(sp != NULL);
-
-    /* Make sure no byte swapping happens on the data
-     * after decompression. */
-    tif->tif_postdecode = _TIFFNoPostDecode;
-
-    /* for some reason, we can't do this in TIFFInitPixarLog */
-
-    sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-		  td->td_samplesperpixel : 1);
-
-    sp->tbuf = (uint16 *) TkimgTIFFmalloc(sp->stride * 
-		  td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-
-    if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-        sp->user_datafmt = PixarLogGuessDataFmt(td);
-
-    if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-        TIFFError(module, 
-		  "PixarLog compression can't handle bits depth/data format combination (depth: %d)", 
-		  td->td_bitspersample);
-	return (0);
-    }
-
-    if (inflateInit(&sp->stream) != Z_OK) {
-        TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-	return (0);
-    } else {
-        sp->state |= PLSTATE_INIT;
-	return (1);
-    }
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-#ifdef _USING_PROTOTYPES_
-PixarLogPreDecode (
-    TIFF* tif,
-    tsample_t s)
-#else
-PixarLogPreDecode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-    PixarLogState* sp = DecoderState(tif);
-
-    (void) s;
-    assert(sp != NULL);
-    sp->stream.next_in = tif->tif_rawdata;
-    sp->stream.avail_in = tif->tif_rawcc;
-    return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-#ifdef _USING_PROTOTYPES_
-PixarLogDecode(
-    TIFF* tif,
-    tidata_t op,
-    tsize_t occ,
-    tsample_t s)
-#else
-PixarLogDecode(tif, op, occ, s)
-    TIFF* tif;
-    tidata_t op;
-    tsize_t occ;
-    tsample_t s;
-#endif
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = DecoderState(tif);
-	static const char module[] = "PixarLogDecode";
-	int i, nsamples, llen;
-	uint16 *up;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		nsamples = occ / sizeof(float);	/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		nsamples = occ / sizeof(uint16); /* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		nsamples = occ;
-		break;
-	default:
-	    TIFFError(tif->tif_name,
-		      "%d bit input not supported in PixarLog",
-		      td->td_bitspersample);
-	    return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = (unsigned char *) sp->tbuf;
-	sp->stream.avail_out = nsamples * sizeof(uint16);
-	do {
-		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-		if (state == Z_STREAM_END) {
-			break;			/* XXX */
-		}
-		if (state == Z_DATA_ERROR) {
-		    TIFFError(module,
-			      "%s: Decoding error at scanline %d, %s",
-			      tif->tif_name, tif->tif_row, sp->stream.msg);
-		    if (inflateSync(&sp->stream) != Z_OK)
-		      return (0);
-		    continue;
-		}
-		if (state != Z_OK) {
-		    TIFFError(module, "%s: zlib error: %s",
-			      tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (sp->stream.avail_out > 0);
-
-	/* hopefully, we got all the bytes we needed */
-	if (sp->stream.avail_out != 0) {
-	    TIFFError(module,
-		      "%s: Not enough data at scanline %d (short %d bytes)",
-		      tif->tif_name, tif->tif_row, sp->stream.avail_out);
-	    return (0);
-	}
-
-	up = sp->tbuf;
-	/* Swap bytes in the data if from a different endian machine. */
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabArrayOfShort(up, nsamples);
-
-	for (i = 0; i < nsamples; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalAccumulateF(up, llen, sp->stride,
-					(float *)op, sp->ToLinearF);
-			op += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalAccumulate16(up, llen, sp->stride,
-					(uint16 *)op, sp->ToLinear16);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_12BITPICIO:
-			horizontalAccumulate12(up, llen, sp->stride,
-					(int16 *)op, sp->ToLinearF);
-			op += llen * sizeof(int16);
-			break;
-		case PIXARLOGDATAFMT_11BITLOG:
-			horizontalAccumulate11(up, llen, sp->stride,
-					(uint16 *)op);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalAccumulate8(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		case PIXARLOGDATAFMT_8BITABGR:
-			horizontalAccumulate8abgr(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		default:
-		    TIFFError(tif->tif_name,
-			      "PixarLogDecode: unsupported bits/sample: %d", 
-			      td->td_bitspersample);
-		    return (0);
-		}
-	}
-
-	return (1);
-}
-
-static int
-PixarLogSetupEncode(tif)
-    TIFF* tif;
-{
-    TIFFDirectory *td = &tif->tif_dir;
-    PixarLogState* sp = EncoderState(tif);
-    static const char module[] = "PixarLogSetupEncode";
-
-    assert(sp != NULL);
-
-    /* for some reason, we can't do this in TIFFInitPixarLog */
-
-    sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-		  td->td_samplesperpixel : 1);
-
-    sp->tbuf = (uint16 *) TkimgTIFFmalloc(sp->stride * 
-		  td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-
-    if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-        sp->user_datafmt = PixarLogGuessDataFmt(td);
-
-    if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-        TIFFError(module,
-		  "PixarLog compression can't handle %d bit linear encodings",
-		  td->td_bitspersample);
-	return (0);
-    }
-
-    if (deflateInit(&sp->stream, sp->quality) != Z_OK) {
-        TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-	return (0);
-    } else {
-        sp->state |= PLSTATE_INIT;
-	return (1);
-    }
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-#ifdef _USING_PROTOTYPES_
-PixarLogPreEncode (
-    TIFF* tif,
-    tsample_t s)
-#else
-PixarLogPreEncode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-	PixarLogState *sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = tif->tif_rawdata;
-	sp->stream.avail_out = tif->tif_rawdatasize;
-	return (deflateReset(&sp->stream) == Z_OK);
-}
-
-static void
-horizontalDifferenceF(ip, n, stride, wp, FromLT2)
-    float *ip;
-    int n;
-    int stride;
-    uint16 *wp;
-    uint16 *FromLT2;
-{
-
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-    register float  fltsize = Fltsize;
-
-#define  CLAMP(v) ( (v<(float)0.)   ? 0				\
-		  : (v<(float)2.)   ? FromLT2[(int)(v*fltsize)]	\
-		  : (v>(float)24.2) ? 2047			\
-		  : LogK1*log(v*LogK2) + 0.5 )
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-static void
-horizontalDifference16(ip, n, stride, wp, From14)
-    unsigned short *ip;
-    int n;
-    int stride;
-    unsigned short *wp;
-    uint16 *From14;
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-/* assumption is unsigned pixel values */
-#undef   CLAMP
-#define  CLAMP(v) From14[(v) >> 2]
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-
-static void
-horizontalDifference8(ip, n, stride, wp, From8)
-    unsigned char *ip;
-    int n;
-    int stride;
-    unsigned short *wp;
-    uint16 *From8;
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-#undef	 CLAMP
-#define  CLAMP(v) (From8[(v)])
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		r1 = CLAMP(ip[3]); wp[3] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[4]); wp[4] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[5]); wp[5] = (b1-b2) & mask; b2 = b1;
-		wp += 3;
-		ip += 3;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		r1 = CLAMP(ip[4]); wp[4] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[5]); wp[5] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[6]); wp[6] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[7]); wp[7] = (a1-a2) & mask; a2 = a1;
-		wp += 4;
-		ip += 4;
-	    }
-	} else {
-	    wp += n + stride - 1;	/* point to last one */
-	    ip += n + stride - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-/*
- * Encode a chunk of pixels.
- */
-static	int
-#ifdef _USING_PROTOTYPES_
-PixarLogEncode(
-    TIFF* tif,
-    tidata_t bp,
-    tsize_t cc,
-    tsample_t s)
-#else
-PixarLogEncode(tif, bp, cc, s)
-    TIFF* tif;
-    tidata_t bp;
-    tsize_t cc;
-    tsample_t s;
-#endif
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogEncode";
-	int 	i, n, llen;
-	unsigned short * up;
-
-	(void) s;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		n = cc / sizeof(float);		/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		n = cc / sizeof(uint16);	/* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		n = cc;
-		break;
-	default:
-		TIFFError(tif->tif_name,
-			"%d bit input not supported in PixarLog",
-			td->td_bitspersample);
-		return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalDifferenceF((float *)bp, llen, 
-				sp->stride, up, sp->FromLT2);
-			bp += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalDifference16((uint16 *)bp, llen, 
-				sp->stride, up, sp->From14);
-			bp += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalDifference8((unsigned char *)bp, llen, 
-				sp->stride, up, sp->From8);
-			bp += llen * sizeof(unsigned char);
-			break;
-		default:
-			TIFFError(tif->tif_name,
-				"%d bit input not supported in PixarLog",
-				td->td_bitspersample);
-			return 0;
-		}
-	}
- 
-	sp->stream.next_in = (unsigned char *) sp->tbuf;
-	sp->stream.avail_in = n * sizeof(uint16);
-
-	do {
-		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-			TIFFError(module, "%s: Encoder error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-		if (sp->stream.avail_out == 0) {
-			tif->tif_rawcc = tif->tif_rawdatasize;
-			TIFFFlushData1(tif);
-			sp->stream.next_out = tif->tif_rawdata;
-			sp->stream.avail_out = tif->tif_rawdatasize;
-		}
-	} while (sp->stream.avail_in > 0);
-	return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-
-static int
-PixarLogPostEncode(tif)
-    TIFF* tif;
-{
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogPostEncode";
-	int state;
-
-	sp->stream.avail_in = 0;
-
-	do {
-		state = deflate(&sp->stream, Z_FINISH);
-		switch (state) {
-		case Z_STREAM_END:
-		case Z_OK:
-		    if (sp->stream.avail_out != tif->tif_rawdatasize) {
-			    tif->tif_rawcc =
-				tif->tif_rawdatasize - sp->stream.avail_out;
-			    TIFFFlushData1(tif);
-			    sp->stream.next_out = tif->tif_rawdata;
-			    sp->stream.avail_out = tif->tif_rawdatasize;
-		    }
-		    break;
-		default:
-		    TIFFError(module, "%s: zlib error: %s",
-			tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (state != Z_STREAM_END);
-	return (1);
-}
-
-static void
-PixarLogClose(tif)
-    TIFF* tif;
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	/* In a really sneaky maneuver, on close, we covertly modify both
-	 * bitspersample and sampleformat in the directory to indicate
-	 * 8-bit linear.  This way, the decode "just works" even for
-	 * readers that don't know about PixarLog, or how to set
-	 * the PIXARLOGDATFMT pseudo-tag.
-	 */
-	td->td_bitspersample = 8;
-	td->td_sampleformat = SAMPLEFORMAT_UINT;
-}
-
-static void
-PixarLogCleanup(tif)
-    TIFF* tif;
-{
-	PixarLogState* sp = (PixarLogState*) tif->tif_data;
-
-	if (sp) {
-		if (sp->FromLT2) TkimgTIFFfree(sp->FromLT2);
-		if (sp->From14) TkimgTIFFfree(sp->From14);
-		if (sp->From8) TkimgTIFFfree(sp->From8);
-		if (sp->ToLinearF) TkimgTIFFfree(sp->ToLinearF);
-		if (sp->ToLinear16) TkimgTIFFfree(sp->ToLinear16);
-		if (sp->ToLinear8) TkimgTIFFfree(sp->ToLinear8);
-		if (sp->state&PLSTATE_INIT) {
-		  if (tif->tif_mode == O_RDONLY) {
-		    inflateEnd(&sp->stream);
-		  } else {
-		    deflateEnd(&sp->stream);
-		  }
-		}
-		if (sp->tbuf) {
-		  TkimgTIFFfree(sp->tbuf);
-		}
-		TkimgTIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-PixarLogVSetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-    int result;
-    static const char module[] = "PixarLogVSetField";
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-		sp->quality = va_arg(ap, int);
-		if (tif->tif_mode != O_RDONLY && (sp->state&PLSTATE_INIT)) {
-			if (deflateParams(&sp->stream,
-			    sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) {
-				TIFFError(module, "%s: zlib error: %s",
-					tif->tif_name, sp->stream.msg);
-				return (0);
-			}
-		}
-		return (1);
-     case TIFFTAG_PIXARLOGDATAFMT:
-	sp->user_datafmt = va_arg(ap, int);
-	/* Tweak the TIFF header so that the rest of libtiff knows what
-	 * size of data will be passed between app and library, and
-	 * assume that the app knows what it is doing and is not
-	 * confused by these header manipulations...
-	 */
-	switch (sp->user_datafmt) {
-	 case PIXARLOGDATAFMT_8BIT:
-	 case PIXARLOGDATAFMT_8BITABGR:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_11BITLOG:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_12BITPICIO:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
-	    break;
-	 case PIXARLOGDATAFMT_16BIT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_FLOAT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 32);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
-	    break;
-	}
-	/*
-	 * Must recalculate sizes should bits/sample change.
-	 */
-	tif->tif_tilesize     = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	result = 1;		/* NB: pseudo tag */
-	break;
-     default:
-	result = (*sp->vsetparent)(tif, tag, ap);
-    }
-    return (result);
-}
-
-static int
-PixarLogVGetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-	*va_arg(ap, int*) = sp->quality;
-	break;
-     case TIFFTAG_PIXARLOGDATAFMT:
-	*va_arg(ap, int*) = sp->user_datafmt;
-	break;
-     default:
-	return (*sp->vgetparent)(tif, tag, ap);
-    }
-    return (1);
-}
-
-static voidpf
-PixarLogAlloc(opaque, items, size)
-    voidpf opaque;
-    uInt items;
-    uInt size;
-{
-    return (voidpf) TkimgTIFFmalloc((tsize_t)(items * size));
-}
-
-static void
-PixarLogFree(opaque, address)
-    voidpf opaque;
-    voidpf address;
-{
-    TkimgTIFFfree((tdata_t) address);
-}
-
-static const TIFFFieldInfo pixarlogFieldInfo[] = {
-    {TIFFTAG_PIXARLOGDATAFMT,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""},
-    {TIFFTAG_PIXARLOGQUALITY,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""}
-};
-
-int
-TkimgTIFFInitPixar(handle, scheme)
-    TIFF * handle;
-    int scheme;
-{
-    TIFF* tif = (TIFF *) handle;
-    PixarLogState* sp;
-
-    assert(scheme == COMPRESSION_PIXARLOG);
-
-    /*
-     * We assume here that package zlibtcl is loaded and its stub
-     * table initialized. This happens in tiff.c, just before the
-     * codec is registered.
-     */
-
-    /*
-     * Allocate state block so tag methods have storage to record values.
-     */
-
-    tif->tif_data = (tidata_t) TkimgTIFFmalloc(sizeof (PixarLogState));
-    if (tif->tif_data == NULL)
-      goto bad;
-
-    sp = (PixarLogState*) tif->tif_data;
-    memset(sp, 0, sizeof (*sp));
-    sp->stream.data_type = Z_BINARY;
-    sp->stream.zalloc    = PixarLogAlloc;
-    sp->stream.zfree     = PixarLogFree;
-    sp->user_datafmt     = PIXARLOGDATAFMT_UNKNOWN;
-
-    /*
-     * Install codec methods.
-     */
-
-    tif->tif_setupdecode = PixarLogSetupDecode;
-    tif->tif_predecode = PixarLogPreDecode;
-    tif->tif_decoderow = PixarLogDecode;
-    tif->tif_decodestrip = PixarLogDecode;
-    tif->tif_decodetile = PixarLogDecode;
-    tif->tif_setupencode = PixarLogSetupEncode;
-    tif->tif_preencode = PixarLogPreEncode;
-    tif->tif_postencode = PixarLogPostEncode;
-    tif->tif_encoderow = PixarLogEncode;
-    tif->tif_encodestrip = PixarLogEncode;
-    tif->tif_encodetile = PixarLogEncode;
-    tif->tif_close = PixarLogClose;
-    tif->tif_cleanup = PixarLogCleanup;
-
-    /* Override SetField so we can handle our private pseudo-tag */
-    _TIFFMergeFieldInfo(tif, pixarlogFieldInfo, N(pixarlogFieldInfo));
-    sp->vgetparent = tif->tif_tagmethods.vgetfield;
-    tif->tif_tagmethods.vgetfield = PixarLogVGetField;   /* hook for codec tags */
-    sp->vsetparent = tif->tif_tagmethods.vsetfield;
-    tif->tif_tagmethods.vsetfield = PixarLogVSetField;   /* hook for codec tags */
-
-    /* Default values for codec-specific fields */
-    sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
-    sp->state = 0;
-
-    /* we don't wish to use the predictor, 
-     * the default is none, which predictor value 1
-     */
-    (void) TIFFPredictorInit(tif);
-
-    /*
-     * build the companding tables 
-     */
-    PixarLogMakeTables(sp);
-    return (1);
-bad:
-    TIFFError("TIFFInitPixarLog", "No space for PixarLog state block");
-    return (0);
-}
diff --git a/tkimg1.3/tiff/tiffZip.c b/tkimg1.3/tiff/tiffZip.c
deleted file mode 100644
index 67808d8..0000000
--- a/tkimg1.3/tiff/tiffZip.c
+++ /dev/null
@@ -1,463 +0,0 @@
-/* $Header: /proj/rd/cvsroot/saods9/tkimg1.3/tiff/tiffZip.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $ */
-
-/*
- * Copyright (c) 1995-1996 Sam Leffler
- * Copyright (c) 1995-1996 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffInt.h"
-
-/*
- * TIFF Library.
- *
- * ZIP (aka Deflate) Compression Support
- *
- * This file is simply an interface to the zlib library written by
- * Jean-loup Gailly and Mark Adler.  You must use version 1.0 or later
- * of the library: this code assumes the 1.0 API and also depends on
- * the ability to write the zlib header multiple times (one per strip)
- * which was not possible with versions prior to 0.95.  Note also that
- * older versions of this codec avoided this bug by supressing the header
- * entirely.  This means that files written with the old library cannot
- * be read; they should be converted to a different compression scheme
- * and then reconverted.
- *
- * The data format used by the zlib library is described in the files
- * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the
- * directory ftp://ftp.uu.net/pub/archiving/zip/doc.  The library was
- * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
- */
-
-#include <zlibtcl.h>
-#include <assert.h>
-
-
-/*
- * Sigh, ZLIB_VERSION is defined as a string so there's no
- * way to do a proper check here.  Instead we guess based
- * on the presence of defines that were added between the
- * 0.95 and 1.0 distributions.
- */
-#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED)
-#error "Antiquated ZLIB software; you must use version 1.0 or later"
-#endif
-
-/*
- * State block for each open TIFF
- * file using ZIP compression/decompression.
- */
-typedef	struct {
-  TIFFPredictorState predict;
-  z_stream	stream;
-  int		zipquality;		/* compression level */
-  int		state;			/* state flags */
-#define	ZSTATE_INIT	0x1		/* zlib setup successfully */
-
-  TIFFVGetMethod	vgetparent;		/* super-class method */
-  TIFFVSetMethod	vsetparent;		/* super-class method */
-} ZIPState;
-
-#define	ZState(tif)		((ZIPState*) (tif)->tif_data)
-#define	DecoderState(tif)	ZState(tif)
-#define	EncoderState(tif)	ZState(tif)
-
-static int ZIPSetupDecode _ANSI_ARGS_((TIFF* tif));
-
-static int
-ZIPSetupDecode(tif)
-    TIFF* tif;
-{
-    ZIPState* sp = DecoderState(tif);
-    static char module[] = "ZIPSetupDecode";
-
-    assert(sp != NULL);
-    if (inflateInit(&sp->stream) != Z_OK) {
-        TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-	return (0);
-    } else {
-        sp->state |= ZSTATE_INIT;
-	return (1);
-    }
-}
-
-/*
- * Setup state for decoding a strip.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-ZIPPreDecode (
-    TIFF* tif,
-    tsample_t s)
-#else
-ZIPPreDecode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-    ZIPState* sp = DecoderState(tif);
-
-    (void) s;
-    assert(sp != NULL);
-    sp->stream.next_in = tif->tif_rawdata;
-    sp->stream.avail_in = tif->tif_rawcc;
-    return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-#ifdef _USING_PROTOTYPES_
-ZIPDecode (
-    TIFF* tif,
-    tidata_t op,
-    tsize_t occ,
-    tsample_t s)
-#else
-ZIPDecode(tif, op, occ, s)
-    TIFF* tif;
-    tidata_t op;
-    tsize_t occ;
-    tsample_t s;
-#endif
-{
-    ZIPState* sp = DecoderState(tif);
-    static char module[] = "ZIPDecode";
-
-    (void) s;
-    assert(sp != NULL);
-    sp->stream.next_out = op;
-    sp->stream.avail_out = occ;
-    do {
-        int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-	if (state == Z_STREAM_END)
-	    break;
-	if (state == Z_DATA_ERROR) {
-	    TIFFError(module,
-		      "%s: Decoding error at scanline %d, %s",
-		      tif->tif_name, tif->tif_row, sp->stream.msg);
-	    if (inflateSync(&sp->stream) != Z_OK)
-	        return (0);
-	    continue;
-	}
-	if (state != Z_OK) {
-	    TIFFError(module, "%s: zlib error: %s",
-		      tif->tif_name, sp->stream.msg);
-	    return (0);
-	}
-    } while (sp->stream.avail_out > 0);
-    if (sp->stream.avail_out != 0) {
-        TIFFError(module,
-		  "%s: Not enough data at scanline %d (short %d bytes)",
-		  tif->tif_name, tif->tif_row, sp->stream.avail_out);
-	return (0);
-    }
-    return (1);
-}
-
-static int
-#ifdef _USING_PROTOTYPES_
-ZIPSetupEncode (
-    TIFF* tif)
-#else
-ZIPSetupEncode(tif)
-    TIFF* tif;
-#endif
-{
-    ZIPState* sp = EncoderState(tif);
-    static char module[] = "ZIPSetupEncode";
-
-    assert(sp != NULL);
-    if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
-        TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-        return (0);
-    } else {
-        sp->state |= ZSTATE_INIT;
-        return (1);
-    }
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-ZIPPreEncode (
-    TIFF* tif,
-    tsample_t s)
-#else
-ZIPPreEncode(tif, s)
-    TIFF* tif;
-    tsample_t s;
-#endif
-{
-    ZIPState *sp = EncoderState(tif);
-
-    (void) s;
-    assert(sp != NULL);
-    sp->stream.next_out = tif->tif_rawdata;
-    sp->stream.avail_out = tif->tif_rawdatasize;
-    return (deflateReset(&sp->stream) == Z_OK);
-}
-
-/*
- * Encode a chunk of pixels.
- */
-
-static int
-#ifdef _USING_PROTOTYPES_
-ZIPEncode (TIFF* tif,
-    tidata_t bp,
-    tsize_t cc,
-    tsample_t s)
-#else
-ZIPEncode(tif, bp, cc, s)
-    TIFF* tif;
-    tidata_t bp;
-    tsize_t cc;
-    tsample_t s;
-#endif
-{
-    ZIPState *sp = EncoderState(tif);
-    static char module[] = "ZIPEncode";
-
-    (void) s;
-    sp->stream.next_in = bp;
-    sp->stream.avail_in = cc;
-    do {
-        if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-	    TIFFError(module, "%s: Encoder error: %s",
-			 tif->tif_name, sp->stream.msg);
-	    return (0);
-	}
-	if (sp->stream.avail_out == 0) {
-	    tif->tif_rawcc = tif->tif_rawdatasize;
-	    TIFFFlushData1(tif);
-	    sp->stream.next_out = tif->tif_rawdata;
-	    sp->stream.avail_out = tif->tif_rawdatasize;
-	}
-    } while (sp->stream.avail_in > 0);
-    return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-
-static int ZIPPostEncode _ANSI_ARGS_((TIFF* tif));
-
-static int
-ZIPPostEncode(tif)
-    TIFF* tif;
-{
-    ZIPState *sp = EncoderState(tif);
-    static char module[] = "ZIPPostEncode";
-    int state;
-
-    sp->stream.avail_in = 0;
-    do {
-        state = deflate(&sp->stream, Z_FINISH);
-	switch (state) {
-	case Z_STREAM_END:
-	case Z_OK:
-	    if ((int) sp->stream.avail_out != tif->tif_rawdatasize) {
-	        tif->tif_rawcc =
-		  tif->tif_rawdatasize - sp->stream.avail_out;
-		TIFFFlushData1(tif);
-		sp->stream.next_out = tif->tif_rawdata;
-		sp->stream.avail_out = tif->tif_rawdatasize;
-	    }
-	    break;
-	default:
-	    TIFFError(module, "%s: zlib error: %s",
-			 tif->tif_name, sp->stream.msg);
-	    return (0);
-	}
-    } while (state != Z_STREAM_END);
-    return (1);
-}
-
-static void ZIPCleanup _ANSI_ARGS_((TIFF* tif));
-
-static void
-ZIPCleanup(tif)
-    TIFF* tif;
-{
-    ZIPState* sp = ZState(tif);
-    if (sp) {
-        if (tif->tif_mode == O_RDONLY) {
-	    inflateEnd(&sp->stream);
-	} else {
-	    deflateEnd(&sp->stream);
-	}
-	TkimgTIFFfree(sp);
-	tif->tif_data = NULL;
-    }
-}
-
-static int ZIPVSetField _ANSI_ARGS_((TIFF* tif, ttag_t tag, va_list ap));
-
-static int
-ZIPVSetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-    ZIPState* sp = ZState(tif);
-    static char module[] = "ZIPVSetField";
-
-    switch (tag) {
-    case TIFFTAG_ZIPQUALITY:
-        sp->zipquality = va_arg(ap, int);
-	if (tif->tif_mode != O_RDONLY && (sp->state&ZSTATE_INIT)) {
-	    if (deflateParams(&sp->stream,
-			      sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
-	        TIFFError(module, "%s: zlib error: %s",
-			     tif->tif_name, sp->stream.msg);
-		return (0);
-	    }
-	}
-	return (1);
-    default:
-        return (*sp->vsetparent)(tif, tag, ap);
-    }
-    /*NOTREACHED*/
-}
-
-static int ZIPVGetField _ANSI_ARGS_((TIFF* tif, ttag_t tag, va_list ap));
-
-static int
-ZIPVGetField(tif, tag, ap)
-    TIFF* tif;
-    ttag_t tag;
-    va_list ap;
-{
-    ZIPState* sp = ZState(tif);
-
-    switch (tag) {
-    case TIFFTAG_ZIPQUALITY:
-        *va_arg(ap, int*) = sp->zipquality;
-	break;
-    default:
-        return (*sp->vgetparent)(tif, tag, ap);
-    }
-    return (1);
-}
-
-static CONST TIFFFieldInfo zipFieldInfo[] = {
-    { TIFFTAG_ZIPQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-static voidpf
-ZipAlloc(opaque, items, size)
-    voidpf opaque;
-    uInt items;
-    uInt size;
-{
-    return (voidpf) TkimgTIFFmalloc((tsize_t)(items * size));
-}
-
-static void
-ZipFree(opaque, address)
-    voidpf opaque;
-    voidpf address;
-{
-    TkimgTIFFfree((tdata_t) address);
-}
-
-int
-TkimgTIFFInitZip(handle, scheme)
-    TIFF * handle;
-    int scheme;
-{
-    TIFF* tif = (TIFF *) handle;
-    ZIPState* sp;
-    assert(scheme == COMPRESSION_DEFLATE);
-
-    /*
-     * We assume here that package zlibtcl is loaded and its stub
-     * table initialized. This happens in tiff.c, just before the
-     * codec is registered.
-     */
-
-    /*
-     * Allocate state block so tag methods have storage to record values.
-     */
-
-    tif->tif_data = (tidata_t) TkimgTIFFmalloc(sizeof (ZIPState));
-    if (tif->tif_data == NULL) {
-      goto bad;
-    }
-
-    sp = ZState(tif);
-    sp->stream.zalloc    = ZipAlloc;
-    sp->stream.zfree     = ZipFree;
-    sp->stream.opaque    = NULL;
-    sp->stream.data_type = Z_BINARY;
-
-    /*
-     * Merge codec-specific tag information and
-     * override parent get/set field methods.
-     */
-
-    _TIFFMergeFieldInfo(tif, (CONST VOID *) zipFieldInfo, N(zipFieldInfo));
-    sp->vgetparent     = tif->tif_tagmethods.vgetfield;
-    tif->tif_tagmethods.vgetfield = ZIPVGetField;	/* hook for codec tags */
-    sp->vsetparent     = tif->tif_tagmethods.vsetfield;
-    tif->tif_tagmethods.vsetfield = ZIPVSetField;	/* hook for codec tags */
-
-    /*
-     * Default values for codec-specific fields
-     */
-
-    sp->zipquality = Z_DEFAULT_COMPRESSION;	/* default comp. level */
-    sp->state = 0;
-
-    /*
-     * Install codec methods.
-     */
-
-    tif->tif_setupdecode = ZIPSetupDecode;
-    tif->tif_predecode   = ZIPPreDecode;
-    tif->tif_decoderow   = ZIPDecode;
-    tif->tif_decodestrip = ZIPDecode;
-    tif->tif_decodetile  = ZIPDecode;
-    tif->tif_setupencode = ZIPSetupEncode;
-    tif->tif_preencode   = ZIPPreEncode;
-    tif->tif_postencode  = ZIPPostEncode;
-    tif->tif_encoderow   = ZIPEncode;
-    tif->tif_encodestrip = ZIPEncode;
-    tif->tif_encodetile  = ZIPEncode;
-    tif->tif_cleanup     = ZIPCleanup;
-
-    /*
-     * Setup predictor setup.
-     */
-
-    (void) TIFFPredictorInit(tif);
-    return (1);
- bad:
-    TIFFError("TIFFInitZIP", "No space for ZIP state block");
-    return (0);
-}
diff --git a/tkimg1.3/tools/genStubs.tcl b/tkimg1.3/tools/genStubs.tcl
deleted file mode 100644
index 44978b6..0000000
--- a/tkimg1.3/tools/genStubs.tcl
+++ /dev/null
@@ -1,894 +0,0 @@
-# genStubs.tcl --
-#
-#	This script generates a set of stub files for a given
-#	interface.  
-#	
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# 
-# RCS: @(#) $Id: genStubs.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-namespace eval genStubs {
-    # libraryName --
-    #
-    #	The name of the entire library.  This value is used to compute
-    #	the USE_*_STUB_PROCS macro and the name of the init file.
-
-    variable libraryName "UNKNOWN"
-
-    # interfaces --
-    #
-    #	An array indexed by interface name that is used to maintain
-    #   the set of valid interfaces.  The value is empty.
-
-    array set interfaces {}
-
-    # curName --
-    #
-    #	The name of the interface currently being defined.
-
-    variable curName "UNKNOWN"
-
-    # hooks --
-    #
-    #	An array indexed by interface name that contains the set of
-    #	subinterfaces that should be defined for a given interface.
-
-    array set hooks {}
-
-    # stubs --
-    #
-    #	This three dimensional array is indexed first by interface name,
-    #	second by platform name, and third by a numeric offset or the
-    #	constant "lastNum".  The lastNum entry contains the largest
-    #	numeric offset used for a given interface/platform combo.  Each
-    #	numeric offset contains the C function specification that
-    #	should be used for the given entry in the stub table.  The spec
-    #	consists of a list in the form returned by parseDecl.
-
-    array set stubs {}
-
-    # outDir --
-    #
-    #	The directory where the generated files should be placed.
-
-    variable outDir .
-}
-
-# genStubs::library --
-#
-#	This function is used in the declarations file to set the name
-#	of the library that the interfaces are associated with (e.g. "tcl").
-#	This value will be used to define the inline conditional macro.
-#
-# Arguments:
-#	name	The library name.
-#
-# Results:
-#	None.
-
-proc genStubs::library {name} {
-    variable libraryName $name
-}
-
-# genStubs::interface --
-#
-#	This function is used in the declarations file to set the name
-#	of the interface currently being defined.
-#
-# Arguments:
-#	name	The name of the interface.
-#
-# Results:
-#	None.
-
-proc genStubs::interface {name} {
-    variable curName $name
-    variable interfaces
-
-    set interfaces($name) {}
-    return
-}
-
-# genStubs::hooks --
-#
-#	This function defines the subinterface hooks for the current
-#	interface.
-#
-# Arguments:
-#	names	The ordered list of interfaces that are reachable through the
-#		hook vector.
-#
-# Results:
-#	None.
-
-proc genStubs::hooks {names} {
-    variable curName
-    variable hooks
-
-    set hooks($curName) $names
-    return
-}
-
-# genStubs::declare --
-#
-#	This function is used in the declarations file to declare a new
-#	interface entry.
-#
-# Arguments:
-#	index		The index number of the interface.
-#	platform	The platform the interface belongs to.  Should be one
-#			of generic, win, unix, or mac.
-#	decl		The C function declaration, or {} for an undefined
-#			entry.
-#
-# Results:
-#	None.
-
-proc genStubs::declare {args} {
-    variable stubs
-    variable curName
-
-    if {[llength $args] != 3} {
-	puts stderr "wrong # args: declare $args"
-    }
-    lassign $args index platformList decl
-
-    # Check for duplicate declarations, then add the declaration and
-    # bump the lastNum counter if necessary.
-
-    foreach platform $platformList {
-	if {[info exists stubs($curName,$platform,$index)]} {
-	    puts stderr "Duplicate entry: declare $args"
-	}
-    }
-    regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
-    set decl [parseDecl $decl]
-
-    foreach platform $platformList {
-	if {$decl != ""} {
-	    set stubs($curName,$platform,$index) $decl
-	    if {![info exists stubs($curName,$platform,lastNum)] \
-		    || ($index > $stubs($curName,$platform,lastNum))} {
-		set stubs($curName,$platform,lastNum) $index
-	    }
-	}
-    }
-    return
-}
-
-# genStubs::rewriteFile --
-#
-#	This function replaces the machine generated portion of the
-#	specified file with new contents.  It looks for the !BEGIN! and
-#	!END! comments to determine where to place the new text.
-#
-# Arguments:
-#	file	The name of the file to modify.
-#	text	The new text to place in the file.
-#
-# Results:
-#	None.
-
-proc genStubs::rewriteFile {file text} {
-    if {![file exist $file]} {
-	puts stderr "Cannot find file: $file"
-	return
-    }
-    set in [open ${file} r]
-    set out [open ${file}.new w]
-
-    # Always write out the file with LF termination
-    fconfigure $out -translation lf
-
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!BEGIN!} $line]} {
-	    break
-	}
-	puts $out $line
-    }
-    puts $out "/* !BEGIN!: Do not edit below this line. */"
-    puts $out $text
-    while {![eof $in]} {
-	set line [gets $in]
-	if {[regexp {!END!} $line]} {
-	    break
-	}
-    }
-    puts $out "/* !END!: Do not edit above this line. */"
-    puts -nonewline $out [read $in]
-    close $in
-    close $out
-    file rename -force ${file}.new ${file}
-    return
-}
-
-# genStubs::addPlatformGuard --
-#
-#	Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-#	plat	Platform to test.
-#
-# Results:
-#	Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat text} {
-    switch $plat {
-	win {
-	    return "#ifdef __WIN32__\n${text}#endif /* __WIN32__ */\n"
-	}
-	unix {
-	    return "#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */\n${text}#endif /* UNIX */\n"
-	}		    
-	mac {
-	    return "#ifdef MAC_TCL\n${text}#endif /* MAC_TCL */\n"
-	}
-    }
-    return "$text"
-}
-
-# genStubs::emitSlots --
-#
-#	Generate the stub table slots for the given interface.  If there
-#	are no generic slots, then one table is generated for each
-#	platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitSlots {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    forAllStubs $name makeSlot 1 text {"    void *reserved$i;\n"}
-    return
-}
-
-# genStubs::parseDecl --
-#
-#	Parse a C function declaration into its component parts.
-#
-# Arguments:
-#	decl	The function declaration.
-#
-# Results:
-#	Returns a list of the form {returnType name args}.  The args
-#	element consists of a list of type/name pairs, or a single
-#	element "void".  If the function declaration is malformed
-#	then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
-    if {![regexp {^(.*)\((.*)\)$} $decl all prefix args]} {
-	puts stderr "Malformed declaration: $decl"
-	return
-    }
-    set prefix [string trim $prefix]
-    if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
-	puts stderr "Bad return type: $decl"
-	return
-    }
-    set rtype [string trim $rtype]
-    foreach arg [split $args ,] {
-	lappend argList [string trim $arg]
-    }
-    if {![string compare [lindex $argList end] "..."]} {
-	if {[llength $argList] != 2} {
-	    puts stderr "Only one argument is allowed in varargs form: $decl"
-	}
-	set arg [parseArg [lindex $argList 0]]
-	if {$arg == "" || ([llength $arg] != 2)} {
-	    puts stderr "Bad argument: '[lindex $argList 0]' in '$decl'"
-	    return
-	}
-	set args [list TCL_VARARGS $arg]
-    } else {
-	set args {}
-	foreach arg $argList {
-	    set argInfo [parseArg $arg]
-	    if {![string compare $argInfo "void"]} {
-		lappend args "void"
-		break
-	    } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
-		lappend args $argInfo
-	    } else {
-		puts stderr "Bad argument: '$arg' in '$decl'"
-		return
-	    }
-	}
-    }
-    return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-#	This function parses a function argument into a type and name.
-#
-# Arguments:
-#	arg	The argument to parse.
-#
-# Results:
-#	Returns a list of type and name with an optional third array
-#	indicator.  If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
-    if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
-	if {$arg == "void"} {
-	    return $arg
-	} else {
-	    return
-	}
-    }
-    set result [list [string trim $type] $name]
-    if {$array != ""} {
-	lappend result $array
-    }
-    return $result
-}
-
-# genStubs::makeDecl --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
-    lassign $decl rtype fname args
-
-    append text "/* $index */\n"
-    set line "EXTERN $rtype"
-    set count [expr {2 - ([string length $line] / 8)}]
-    append line [string range "\t\t\t" 0 $count]
-    set pad [expr {24 - [string length $line]}]
-    if {$pad <= 0} {
-	append line " "
-	set pad 0
-    }
-    append line "$fname _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append line "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append line "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append line $sep
-		set next {}
-		append next [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		if {[string length $line] + [string length $next] \
-			+ $pad > 76} {
-		    append text $line \n
-		    set line "\t\t\t\t"
-		    set pad 28
-		}
-		append line $next
-		set sep ", "
-	    }
-	    append line ")"
-	}
-    }
-    append text $line
-    
-    append text ");\n"
-    return $text
-}
-
-# genStubs::makeMacro --
-#
-#	Generate the inline macro for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "#ifndef $fname\n#define $fname"
-    set arg1 [lindex $args 0]
-    set argList ""
-    switch -exact $arg1 {
-	void {
-	    set argList "()"
-	}
-	TCL_VARARGS {
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append argList $sep [lindex $arg 1]
-		set sep ", "
-	    }
-	    append argList ")"
-	}
-    }
-    append text " \\\n\t(${name}StubsPtr->$lfname)"
-    append text " /* $index */\n#endif\n"
-    return $text
-}
-
-# genStubs::makeStub --
-#
-#	Emits a stub function definition.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted stub function definition.
-
-proc genStubs::makeStub {name decl index} {
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    append text "/* Slot $index */\n" $rtype "\n" $fname
-
-    set arg1 [lindex $args 0]
-
-    if {![string compare $arg1 "TCL_VARARGS"]} {
-	lassign [lindex $args 1] type argName 
-	append text " TCL_VARARGS_DEF($type,$argName)\n\{\n"
-	append text "    " $type " var;\n    va_list argList;\n"
-	if {[string compare $rtype "void"]} {
-	    append text "    " $rtype " resultValue;\n"
-	}
-	append text "\n    var = (" $type ") TCL_VARARGS_START(" \
-		$type "," $argName ",argList);\n\n    "
-	if {[string compare $rtype "void"]} {
-	    append text "resultValue = "
-	}
-	append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n"
-	append text "    va_end(argList);\n"
-	if {[string compare $rtype "void"]} {
-	    append text "return resultValue;\n"
-	}
-	append text "\}\n\n"
-	return $text
-    }
-
-    if {![string compare $arg1 "void"]} {
-	set argList "()"
-	set argDecls ""
-    } else {
-	set argList ""
-	set sep "("
-	foreach arg $args {
-	    append argList $sep [lindex $arg 1]
-	    append argDecls "    " [lindex $arg 0] " " \
-		    [lindex $arg 1] [lindex $arg 2] ";\n"
-	    set sep ", "
-	}
-	append argList ")"
-    }
-    append text $argList "\n" $argDecls "{\n    "
-    if {[string compare $rtype "void"]} {
-	append text "return "
-    }
-    append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n"
-    return $text
-}
-
-# genStubs::makeSlot --
-#
-#	Generate the stub table entry for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
-    lassign $decl rtype fname args
-
-    set lfname [string tolower [string index $fname 0]]
-    append lfname [string range $fname 1 end]
-
-    set text "    "
-    append text $rtype " (*" $lfname ") _ANSI_ARGS_("
-
-    set arg1 [lindex $args 0]
-    switch -exact $arg1 {
-	void {
-	    append text "(void)"
-	}
-	TCL_VARARGS {
-	    set arg [lindex $args 1]
-	    append text "TCL_VARARGS([lindex $arg 0],[lindex $arg 1])"
-	}
-	default {
-	    set sep "("
-	    foreach arg $args {
-		append text $sep [lindex $arg 0] " " [lindex $arg 1] \
-			[lindex $arg 2]
-		set sep ", "
-	    }
-	    append text ")"
-	}
-    }
-    
-    append text "); /* $index */\n"
-    return $text
-}
-
-# genStubs::makeInit --
-#
-#	Generate the prototype for a function.
-#
-# Arguments:
-#	name	The interface name.
-#	decl	The function declaration.
-#	index	The slot index for this function.
-#
-# Results:
-#	Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
-    append text "    " [lindex $decl 1] ", /* " $index " */\n"
-    return $text
-}
-
-# genStubs::forAllStubs --
-#
-#	This function iterates over all of the platforms and invokes
-#	a callback for each slot.  The result of the callback is then
-#	placed inside appropriate platform guards.
-#
-# Arguments:
-#	name		The interface name.
-#	slotProc	The proc to invoke to handle the slot.  It will
-#			have the interface name, the declaration,  and
-#			the index appended.
-#	onAll		If 1, emit the skip string even if there are
-#			definitions for one or more platforms.
-#	textVar		The variable to use for output.
-#	skipString	The string to emit if a slot is skipped.  This
-#			string will be subst'ed in the loop so "$i" can
-#			be used to substitute the index value.
-#
-# Results:
-#	None.
-
-proc genStubs::forAllStubs {name slotProc onAll textVar \
-	{skipString {"/* Slot $i is reserved */\n"}}} {
-    variable stubs
-    upvar $textVar text
-
-    set plats [array names stubs $name,*,lastNum]
-    if {[info exists stubs($name,generic,lastNum)]} {
-	# Emit integrated stubs block
-	set lastNum -1
-	foreach plat [array names stubs $name,*,lastNum] {
-	    if {$stubs($plat) > $lastNum} {
-		set lastNum $stubs($plat)
-	    }
-	}
-	for {set i 0} {$i <= $lastNum} {incr i} {
-	    set slots [array names stubs $name,*,$i]
-	    set emit 0
-	    if {[info exists stubs($name,generic,$i)]} {
-		if {[llength $slots] > 1} {
-		    puts stderr "platform entry duplicates generic entry: $i"
-		}
-		append text [$slotProc $name $stubs($name,generic,$i) $i]
-		set emit 1
-	    } elseif {[llength $slots] > 0} {
-		foreach plat {unix win mac} {
-		    if {[info exists stubs($name,$plat,$i)]} {
-			append text [addPlatformGuard $plat \
-				[$slotProc $name $stubs($name,$plat,$i) $i]]
-			set emit 1
-		    } elseif {$onAll} {
-			append text [eval {addPlatformGuard $plat} $skipString]
-			set emit 1
-		    }
-		}
-	    }
-	    if {$emit == 0} {
-		eval {append text} $skipString
-	    }
-	}
-	
-    } else {
-	# Emit separate stubs blocks per platform
-	foreach plat {unix win mac} {
-	    if {[info exists stubs($name,$plat,lastNum)]} {
-		set lastNum $stubs($name,$plat,lastNum)
-		set temp {}
-		for {set i 0} {$i <= $lastNum} {incr i} {
-		    if {![info exists stubs($name,$plat,$i)]} {
-			eval {append temp} $skipString
-		    } else {
-			append temp [$slotProc $name $stubs($name,$plat,$i) $i]
-		    }
-		}
-		append text [addPlatformGuard $plat $temp]
-	    }
-	}
-    }
-
-}
-
-# genStubs::emitDeclarations --
-#
-#	This function emits the function declarations for this interface.
-#
-# Arguments:
-#	name	The interface name.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitDeclarations {name textVar} {
-    variable stubs
-    upvar $textVar text
-
-    append text "\n/*\n * Exported function declarations:\n */\n\n"
-    forAllStubs $name makeDecl 0 text
-    return
-}
-
-# genStubs::emitMacros --
-#
-#	This function emits the inline macros for an interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#	textVar	The variable to use for output.
-#
-# Results:
-#	None.
-
-proc genStubs::emitMacros {name textVar} {
-    variable stubs
-    variable libraryName
-    upvar $textVar text
-
-    set upName [string toupper $libraryName]
-    append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
-    append text "\n/*\n * Inline function declarations:\n */\n\n"
-    
-    forAllStubs $name makeMacro 0 text
-
-    append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
-    return
-}
-
-# genStubs::emitHeader --
-#
-#	This function emits the body of the <name>Decls.h file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitHeader {name} {
-    variable outDir
-    variable hooks
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    emitDeclarations $name text
-
-    if {[info exists hooks($name)]} {
-	append text "\ntypedef struct ${capName}StubHooks {\n"
-	foreach hook $hooks($name) {
-	    set capHook [string toupper [string index $hook 0]]
-	    append capHook [string range $hook 1 end]
-	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
-	}
-	append text "} ${capName}StubHooks;\n"
-    }
-    append text "\ntypedef struct ${capName}Stubs {\n"
-    append text "    int magic;\n"
-    append text "    struct ${capName}StubHooks *hooks;\n\n"
-
-    emitSlots $name text
-
-    append text "} ${capName}Stubs;\n"
-
-    append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-    append text "extern ${capName}Stubs *${name}StubsPtr;\n"
-    append text "#ifdef __cplusplus\n}\n#endif\n"
-
-    emitMacros $name text
-
-    rewriteFile [file join $outDir ${name}Decls.h] $text
-    return
-}
-
-# genStubs::emitStubs --
-#
-#	This function emits the body of the <name>Stubs.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitStubs {name} {
-    variable outDir
-
-    append text "\n/*\n * Exported stub functions:\n */\n\n"
-    forAllStubs $name makeStub 0 text
-
-    rewriteFile [file join $outDir ${name}Stubs.c] $text
-    return    
-}
-
-# genStubs::emitInit --
-#
-#	Generate the table initializers for an interface.
-#
-# Arguments:
-#	name		The name of the interface to initialize.
-#	textVar		The variable to use for output.
-#
-# Results:
-#	Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
-    variable stubs
-    variable hooks
-    upvar $textVar text
-
-    set capName [string toupper [string index $name 0]]
-    append capName [string range $name 1 end]
-
-    if {[info exists hooks($name)]} {
- 	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
-	set sep "    "
-	foreach sub $hooks($name) {
-	    append text $sep "&${sub}Stubs"
-	    set sep ",\n    "
-	}
-	append text "\n\};\n"
-    }
-    append text "\n${capName}Stubs ${name}Stubs = \{\n"
-    append text "    TCL_STUB_MAGIC,\n"
-    if {[info exists hooks($name)]} {
-	append text "    &${name}StubHooks,\n"
-    } else {
-	append text "    NULL,\n"
-    }
-    
-    forAllStubs $name makeInit 1 text {"    NULL, /* $i */\n"}
-
-    append text "\};\n"
-    return
-}
-
-# genStubs::emitInits --
-#
-#	This function emits the body of the <name>StubInit.c file for
-#	the specified interface.
-#
-# Arguments:
-#	name	The name of the interface being emitted.
-#
-# Results:
-#	None.
-
-proc genStubs::emitInits {} {
-    variable hooks
-    variable outDir
-    variable libraryName
-    variable interfaces
-
-    # Assuming that dependencies only go one level deep, we need to emit
-    # all of the leaves first to avoid needing forward declarations.
-
-    set leaves {}
-    set roots {}
-    foreach name [lsort [array names interfaces]] {
-	if {[info exists hooks($name)]} {
-	    lappend roots $name
-	} else {
-	    lappend leaves $name
-	}
-    }
-    foreach name $leaves {
-	emitInit $name text
-    }
-    foreach name $roots {
-	emitInit $name text
-    }
-
-    rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-#	This is the main entry point.
-#
-# Arguments:
-#	None.
-#
-# Results:
-#	None.
-
-proc genStubs::init {} {
-    global argv argv0
-    variable outDir
-    variable interfaces
-
-    if {[llength $argv] < 2} {
-	puts stderr "usage: $argv0 outDir declFile ?declFile...?"
-	exit 1
-    }
-
-    set outDir [lindex $argv 0]
-
-    foreach file [lrange $argv 1 end] {
-	source $file
-    }
-
-    foreach name [lsort [array names interfaces]] {
-	puts "Emitting $name"
-	emitHeader $name
-    }
-
-    emitInits
-}
-
-# lassign --
-#
-#	This function emulates the TclX lassign command.
-#
-# Arguments:
-#	valueList	A list containing the values to be assigned.
-#	args		The list of variables to be assigned.
-#
-# Results:
-#	Returns any values that were not assigned to variables.
-
-proc lassign {valueList args} {
-  if {[llength $args] == 0} {
-      error "wrong # args: lassign list varname ?varname..?"
-  }
-
-  uplevel [list foreach $args $valueList {break}]
-  return [lrange $valueList [llength $args] end]
-}
-
-genStubs::init
diff --git a/tkimg1.3/tools/install-sh b/tkimg1.3/tools/install-sh
deleted file mode 100755
index 0ff4b6a..0000000
--- a/tkimg1.3/tools/install-sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
diff --git a/tkimg1.3/tools/install.tcl b/tkimg1.3/tools/install.tcl
deleted file mode 100755
index bbb1256..0000000
--- a/tkimg1.3/tools/install.tcl
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/bin/sh
-# The next line restarts using wish8.0 \
-exec wish8.0 $0 ${1+"$@"}
-#
-# Initialization of some global variables
-
-eval destroy [winfo children .]
-
-switch -glob [info sharedlibextension] {
-    .so* {
-	set libs [list libpng.so.2.1.0 libjpeg.so.62.0.0 libtiff.so.3.4.37 \
-		libz.so.1.1.3 libttf.so.1.2.0 libungif.so.3.1.0]
-    }
-    ..a {
-	set libs [list libpng.a libjpeg.a libtiff.a libz.a libttf.a libungif.a]
-    }
-    .dll {
-	set libs [list png.lib jpeg62.lib tiff.lib zlib.lib ttf.lib ungif.lib]
-	set dll [list png.dll jpeg62.dll tiff.dll zlib.dll ttf.dll ungif.dll]
-    }
-    * {
-	set libs [list libpng[info sharedlibextension] libjpeg[info sharedlibextension] \
-		libtiff[info sharedlibextension] libz[info sharedlibextension] \
-		libttf[info sharedlibextension] libungif[info sharedlibextension]]
-    }
-}
-
-if [info exists env(PATH)] {
-    if [string compare $tcl_platform(platform) windows] {
-	set dirs [split $env(PATH) :]
-    } else {
-	set dirs [split $env(PATH) \;]
-    }
-} else {
-    set dirs "/usr/local/lib /usr/lib /lib"
-}
-
-foreach dir "$dirs C:/WINDOWS/* C:/WINNT/*" {
-   foreach d [list $dir [file join [file dirname $dir] lib]] {
-	set x [glob -nocomplain [file join $d \{lib,\}tcl\[78\]*[info sharedlibextension]*]]
-	if [string compare $x {}] break
-    }
-    if [string compare $x {}] break
-}
-
-
-label .f1 -text "Where should the following files be installed?"
-pack .f1
-proc line {f label default} {
-    frame $f
-    label $f.l -text $label
-    entry $f.e -width 50
-    $f.e insert end $default
-    pack $f.l -side left
-    pack $f.e -side right
-    pack $f -expand y -fill both
-}
-set prefix [file dirname [file dirname $tk_library]]
-
-if [string compare $tcl_platform(platform) windows] {
-    set imglibs [lindex [file split $x] end]
-    if [string match libtcl?.?[info sharedlibextension]* $imglibs] {
-	set imglibs libimg1.2[info sharedlibextension]
-    } else {
-	set imglibs libimg12[info sharedlibextension]
-    }
-} else {
-    set x [lindex $x 0]
-    set systemdll [file dirname $x]
-    set imglibs [list img1280.dll img1281.dll]
-    line .f2 "system dll's" $systemdll
-}
-line .f3 "system libraries"  [file join $prefix lib]
-line .f4 "system headers" [file join $prefix include]
-line .f5 "Img 1.2 files" [file join $prefix lib Img1.2]
-frame .f6
-button .f6.install -text Install -command Install
-button .f6.exit -text Exit -command "destroy ."
-pack .f6.install .f6.exit -side left -fill both -expand y
-pack .f6 -fill both -expand y
-
-proc Copy {src dst} {
-    if [file exists $src] {
-	file delete -force [file join $dst $src]
-	puts_stdout "copying $src to $dst"
-	file copy $src $dst
-	return 1
-    }
-    return 0
-}
-
-proc Install {} {
-    global libs dll tcl_platform imglibs
-    if [winfo exists .t] {
-	raise .t
-    } else {
-	toplevel .t
-	frame .t.f
-	button .t.f.d -text dismiss -command [list destroy .t]
-	pack .t.f.d -side left
-	pack .t.f -side top -fill x
-	text .t.t -yscrollcommand [list .t.s set]
-	scrollbar .t.s -command [list .t.t yview]
-	pack .t.t .t.s -side left -expand y -fill both
-    }
-    .t.t delete 1.0 end
-    proc puts_stdout args {
-	.t.t insert end "[lindex $args 0]\n"
-	.t.t see end
-	update
-    }
-    .t.t see end
-    if ![string compare $tcl_platform(platform) windows] {
-	set dir [.f2.e get]
-	foreach lib $dll {
-	    Copy $lib $dir
-	}
-    }
-    set dir [.f3.e get]
-    foreach lib $libs {
-	if {[Copy $lib $dir] && ![string compare [info sharedlibextension] .so]} {
-	    while {[string compare .so [set ext [file extension $lib]]]} {
-		file delete [set file [file join $dir [file rootname $lib]]]
-		puts_stdout "ln -s $lib $file"
-		exec ln -s $lib $file
-		set lib [file rootname $lib]
-	    }
-	}
-    }
-    set dir [.f4.e get]
-    foreach lib [list zlib.h zconf.h png.h pngconf.h jpeglib.h jconfig.h \
-		jmorecfg.h jerror.h tiff.h tiffio.h tiffconf.h freetype.h gif_lib.h] {
-	Copy $lib $dir
-    }
-    set dir [.f5.e get]
-    catch {file mkdir $dir}
-    foreach lib "$imglibs pkgIndex.tcl" {
-	Copy $lib $dir
-    }
-    puts_stdout "---------- installation complete ----------"
-}
diff --git a/tkimg1.3/tools/ldAout.tcl b/tkimg1.3/tools/ldAout.tcl
deleted file mode 100644
index 74968c5..0000000
--- a/tkimg1.3/tools/ldAout.tcl
+++ /dev/null
@@ -1,240 +0,0 @@
-# ldAout.tcl --
-#
-#	This "tclldAout" procedure in this script acts as a replacement
-#	for the "ld" command when linking an object file that will be
-#	loaded dynamically into Tcl or Tk using pseudo-static linking.
-#
-# Parameters:
-#	The arguments to the script are the command line options for
-#	an "ld" command.
-#
-# Results:
-#	The "ld" command is parsed, and the "-o" option determines the
-#	module name.  ".a" and ".o" options are accumulated.
-#	The input archives and object files are examined with the "nm"
-#	command to determine whether the modules initialization
-#	entry and safe initialization entry are present.  A trivial
-#	C function that locates the entries is composed, compiled, and
-#	its .o file placed before all others in the command; then
-#	"ld" is executed to bind the objects together.
-#
-# SCCS: @(#) ldAout.tcl 1.11 96/09/17 09:02:20
-#
-# Copyright (c) 1995, by General Electric Company. All rights reserved.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# This work was supported in part by the ARPA Manufacturing Automation
-# and Design Engineering (MADE) Initiative through ARPA contract
-# F33615-94-C-4400.
-#
-
-proc tclLdAout {{cc {}} {shlib_suffix {}} {shlib_cflags none}} {
-  global env
-  global argv
-
-  if {$cc==""} {
-    set cc $env(CC)
-  }
-
-  # if only two parameters are supplied there is assumed that the
-  # only shlib_suffix is missing. This parameter is anyway available
-  # as "info sharedlibextension" too, so there is no need to transfer
-  # 3 parameters to the function tclLdAout. For compatibility, this
-  # function now accepts both 2 and 3 parameters.
-
-  if {$shlib_suffix==""} {
-    set shlib_cflags $env(SHLIB_CFLAGS)
-  } else {
-    if {$shlib_cflags=="none"} {
-      set shlib_cflags $shlib_suffix
-    }
-  }
-
-  # seenDotO is nonzero if a .o or .a file has been seen
-
-  set seenDotO 0
-
-  # minusO is nonzero if the last command line argument was "-o".
-
-  set minusO 0
-
-  # head has command line arguments up to but not including the first
-  # .o or .a file. tail has the rest of the arguments.
-
-  set head {}
-  set tail {}
-
-  # nmCommand is the "nm" command that lists global symbols from the
-  # object files.
-
-  set nmCommand {|nm -g}
-
-  # entryProtos is the table of prototypes found in the
-  # module.
-
-  set entryProtos {}
-
-  # entryPoints is the table of entries found in the
-  # module.
-
-  set entryPoints {}
-
-  # libraries is the list of -L and -l flags to the linker.
-
-  set libraries {}
-  set libdirs {}
-
-  # Process command line arguments
-
-  foreach a $argv {
-    if {!$minusO && [regexp {\.[ao]$} $a]} {
-      set seenDotO 1
-      lappend nmCommand $a
-    }
-    if {$minusO} {
-      set outputFile $a
-      set minusO 0
-    } elseif {![string compare $a -o]} {
-      set minusO 1
-    }
-    if [regexp {^-[lL]} $a] {
-	lappend libraries $a
-	if [regexp {^-L} $a] {
-	    lappend libdirs [string range $a 2 end]
-	}
-    } elseif {$seenDotO} {
-	lappend tail $a
-    } else {
-	lappend head $a
-    }
-  }
-  lappend libdirs /lib /usr/lib
-
-  # MIPS -- If there are corresponding G0 libraries, replace the
-  # ordinary ones with the G0 ones.
-
-  set libs {}
-  foreach lib $libraries {
-      if [regexp {^-l} $lib] {
-	  set lname [string range $lib 2 end]
-	  foreach dir $libdirs {
-	      if [file exists [file join $dir lib${lname}_G0.a]] {
-		  set lname ${lname}_G0
-		  break
-	      }
-	  }
-	  lappend libs -l$lname
-      } else {
-	  lappend libs $lib
-      }
-  }
-  set libraries $libs
-
-  # Extract the module name from the "-o" option
-
-  if {![info exists outputFile]} {
-    error "-o option must be supplied to link a Tcl load module"
-  }
-  set m [file tail $outputFile]
-  if [regexp {\.a$} $outputFile] {
-    set shlib_suffix .a
-  } else {
-    set shlib_suffix ""
-  }
-  if [regexp {\..*$} $outputFile match] {
-    set l [expr [string length $m] - [string length $match]]
-  } else {
-    error "Output file does not appear to have a suffix"
-  }
-  set modName [string tolower [string range $m 0 [expr $l-1]]]
-  if [regexp {^lib} $modName] {
-    set modName [string range $modName 3 end]
-  }
-  if [regexp {[0-9\.]*$} $modName match] {
-    set modName [string range $modName 0 [expr [string length $modName]-[string length $match]-1]]
-  }
-  set modName "[string toupper [string index $modName 0]][string range $modName 1 end]"
-  
-  # Catalog initialization entry points found in the module
-
-  set f [open $nmCommand r]
-  while {[gets $f l] >= 0} {
-    if [regexp {[0-9A-Fa-f]+ T[ 	]*(((Img_)|(g?z)|(adler32)|((un)?compress)|(crc32)|((in)|(de)flate)|(png_)|(jpeg_)|(_?TIFF)|(TT_))[a-zA-Z0-9_]*)} $l trash symbol] {
-      append entryProtos {extern int } $symbol { (); } \n
-      append entryPoints {  } \{ { "} $symbol {", } $symbol { } \} , \n
-    }
-  }
-  close $f
-
-  if {$entryPoints==""} {
-    error "No entry point found in objects"
-  }
-
-  # Compose a C function that resolves the entry points and
-  # embeds the required libraries in the object code.
-
-  set C {#include <string.h>}
-  append C \n
-  append C {char TclLoadLibraries_} $modName { [] =} \n
-  append C {  "@LIBS: } $libraries {";} \n
-  append C $entryProtos
-  append C {static struct } \{ \n
-  append C {  char * name;} \n
-  append C {  int (*value)();} \n
-  append C \} {dictionary [] = } \{ \n
-  append C $entryPoints
-  append C \{  0, 0 \} \n \} \; \n
-  append C {typedef struct Tcl_Interp Tcl_Interp;} \n
-  append C {typedef int Tcl_PackageInitProc (Tcl_Interp *);} \n
-  append C {Tcl_PackageInitProc *} \n
-  append C TclLoadDictionary_ $modName { (symbol)} \n
-  append C {    char * symbol;} \n
-  append C {{
-    int i;
-    for (i = 0; dictionary [i] . name != 0; ++i) {
-      if (!strcmp (symbol, dictionary [i] . name)) {
-	return dictionary [i].value;
-      }
-    }
-    return 0;
-}} \n
-
-  # Write the C module and compile it
-
-  set cFile tcl$modName.c
-  set f [open $cFile w]
-  puts -nonewline $f $C
-  close $f
-  set ccCommand "$cc -c $shlib_cflags $cFile"
-  puts stderr $ccCommand
-  eval exec $ccCommand
-
-  # Now compose and execute the ld command that packages the module
-
-  if {$shlib_suffix == ".a"} {
-    set ldCommand "ar cr $outputFile"
-    regsub { -o} $tail {} tail
-  } else {
-  set ldCommand ld
-  foreach item $head {
-    lappend ldCommand $item
-  }
-  }
-  lappend ldCommand tcl$modName.o
-  foreach item $tail {
-    lappend ldCommand $item
-  }
-  puts stderr $ldCommand
-  if [catch "exec $ldCommand" msg] {
-    puts stderr $msg
-  }
-  if {$shlib_suffix == ".a"} {
-    exec ranlib $outputFile
-  }
-
-  # Clean up working files
-
-  exec /bin/rm $cFile [file rootname $cFile].o
-}
diff --git a/tkimg1.3/tools/mkinstalldirs b/tkimg1.3/tools/mkinstalldirs
deleted file mode 100755
index 91f6d04..0000000
--- a/tkimg1.3/tools/mkinstalldirs
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Last modified: 1994-03-25
-# Public domain
-
-errstatus=0
-
-for file in ${1+"$@"} ; do 
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d in ${1+"$@"} ; do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/tkimg1.3/window/ChangeLog b/tkimg1.3/window/ChangeLog
deleted file mode 100644
index 2a529b2..0000000
--- a/tkimg1.3/window/ChangeLog
+++ /dev/null
@@ -1,10 +0,0 @@
-2002-12-03  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Makefile.in (CYGPATH): Added this variable. Is substituted by
-	  configure. The miss caused problems on Linux (empty backtick).
-
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/window: WINDOW photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net> using the original Img sources.
diff --git a/tkimg1.3/window/Makefile.in b/tkimg1.3/window/Makefile.in
deleted file mode 100644
index 0ec9426..0000000
--- a/tkimg1.3/window/Makefile.in
+++ /dev/null
@@ -1,547 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgwindow TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgwindow_SOURCES	=	\
-		window.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgwindow_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgwindow_OBJECTS	= $(tkimgwindow_SOURCES:.c=. at OBJEXT@)
-tkimgwindow_LIB_FILE	= @tkimgwindow_LIB_FILE@
-
-## tkimgwindowstub_OBJECTS	= tkimgwindowStubLib.$(OBJEXT)
-## tkimgwindowstub_LIB_FILE= @tkimgwindowstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CYGPATH		= @CYGPATH@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-TK_TOP_DIR_NATIVE	= @TK_TOP_DIR_NATIVE@
-
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES) \
-		-I"`$(CYGPATH) $(includedir)`"
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	@echo No testsuite yet.
-#	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgwindow_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgwindow_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgwindow.$(OBJEXT): $(srcdir)/generic/tkimgwindow.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgwindow.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgwindow/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgwindowConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgwindow.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgwindow_DECLS = \
-	$(srcdir)/tkimgwindow.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgwindow_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgwindow_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/window/aclocal.m4 b/tkimg1.3/window/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/window/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/window/configure b/tkimg1.3/window/configure
deleted file mode 100755
index 71d98db..0000000
--- a/tkimg1.3/window/configure
+++ /dev/null
@@ -1,6510 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgwindow', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./window.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgwindow
-DPACKAGE="img::window"
-PHIMGTYPE="window"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGWINDOW_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgwindowstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGWINDOW_VERSION "${TKIMGWINDOW_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-# This module is special. On windows it requires access to the
-# internal headers of Tk and thus tcl to implement its functionality
-# (TkWinReleaseDrawableDC).
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    
-    echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6
-echo "configure:3454: checking for Tcl private include files" >&5
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
-	TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
-	TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
-	TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
-	TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
-	TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
-	TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
-	TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-    else
-	TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
-	TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
-	TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
-	TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
-	TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
-	TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
-	TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
-	TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-    fi
-
-    
-    
-    
-    
-    
-    
-    
-
-    TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-    
-    echo "$ac_t""Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" 1>&6
-
-    
-    echo $ac_n "checking for Tk private include files""... $ac_c" 1>&6
-echo "configure:3490: checking for Tk private include files" >&5
-
-    if test "${TEA_PLATFORM}" = "windows"; then
-	TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
-	TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
-	TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
-	TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
-	TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
-	TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
-    else
-	TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)'
-	TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
-	TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
-	TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
-	TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
-	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-    fi
-
-    
-    
-    
-    
-    
-    
-
-    
-    echo "$ac_t""Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" 1>&6
-
-else
-    
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3524: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-    
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3587: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-fi
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgwindow in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgwindow 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3713: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3721 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3761: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3808: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3816 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3853: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3895: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3903 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3954: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3959 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4010: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4015 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:4068: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4106: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4152: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4166: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4187: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4216: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4224 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4279: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4436: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4444 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4537: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4545 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4621: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4629 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4760: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4765 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4827: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4832 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4892: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4897 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4929: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4931 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5266: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5322: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5324 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5360: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5362 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5398: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5400 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5542: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5600: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5662 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5736 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5833 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5858: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5861 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5902: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5922: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5930 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6089: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6121: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGWINDOW_VERSION@%$TKIMGWINDOW_VERSION%g
-s%@tkimgwindow_LIB_FILE@%$tkimgwindow_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_TOP_DIR_NATIVE@%$TCL_TOP_DIR_NATIVE%g
-s%@TCL_GENERIC_DIR_NATIVE@%$TCL_GENERIC_DIR_NATIVE%g
-s%@TCL_UNIX_DIR_NATIVE@%$TCL_UNIX_DIR_NATIVE%g
-s%@TCL_WIN_DIR_NATIVE@%$TCL_WIN_DIR_NATIVE%g
-s%@TCL_BMAP_DIR_NATIVE@%$TCL_BMAP_DIR_NATIVE%g
-s%@TCL_TOOL_DIR_NATIVE@%$TCL_TOOL_DIR_NATIVE%g
-s%@TCL_PLATFORM_DIR_NATIVE@%$TCL_PLATFORM_DIR_NATIVE%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_TOP_DIR_NATIVE@%$TK_TOP_DIR_NATIVE%g
-s%@TK_UNIX_DIR_NATIVE@%$TK_UNIX_DIR_NATIVE%g
-s%@TK_WIN_DIR_NATIVE@%$TK_WIN_DIR_NATIVE%g
-s%@TK_GENERIC_DIR_NATIVE@%$TK_GENERIC_DIR_NATIVE%g
-s%@TK_XLIB_DIR_NATIVE@%$TK_XLIB_DIR_NATIVE%g
-s%@TK_PLATFORM_DIR_NATIVE@%$TK_PLATFORM_DIR_NATIVE%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/window/configure.in b/tkimg1.3/window/configure.in
deleted file mode 100644
index d2eca8d..0000000
--- a/tkimg1.3/window/configure.in
+++ /dev/null
@@ -1,233 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgwindow', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./window.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgwindow
-DPACKAGE="img::window"
-PHIMGTYPE="window"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGWINDOW_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGWINDOW_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgwindow_LIB_FILE)
-#AC_SUBST(tkimgwindowstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGWINDOW_VERSION, "${TKIMGWINDOW_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-# This module is special. On windows it requires access to the
-# internal headers of Tk and thus tcl to implement its functionality
-# (TkWinReleaseDrawableDC).
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    TEA_PRIVATE_TCL_HEADERS
-    TEA_PRIVATE_TK_HEADERS
-else
-    TEA_PUBLIC_TCL_HEADERS
-    TEA_PUBLIC_TK_HEADERS
-fi
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgwindow in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgwindow)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/window/pkgIndex.tcl.in b/tkimg1.3/window/pkgIndex.tcl.in
deleted file mode 100644
index ab230c1..0000000
--- a/tkimg1.3/window/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgwindow_LIB_FILE@]]
diff --git a/tkimg1.3/window/readme b/tkimg1.3/window/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/window/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/window/tests/all.tcl b/tkimg1.3/window/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/window/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/window/window.c b/tkimg1.3/window/window.c
deleted file mode 100644
index f6a5429..0000000
--- a/tkimg1.3/window/window.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * imgWindow.c --
- *
- * A photo image file handler to put the content of a window in a photo.
- *
- * Author : Jan Nijtmans
- *
- * $Id: window.c,v 1.2 2007/01/03 23:07:13 joye Exp $
- *
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-#ifdef __CYGWIN32__
-#define __WIN32__
-#endif
-
-#include "X11/Xutil.h"
-#ifndef	__WIN32__
-#   include "X11/Xproto.h"
-#else
-#   include <windows.h>
-#   include "X11/Xlib.h"
-#   include "tkInt.h"
-#   include "tkWinInt.h"
-#   include "X11/Xfuncproto.h"
-#   undef X_GetImage
-#endif
-
-/*
- * The format record for the Win data format:
- */
-
-#ifdef X_GetImage
-static int xerrorhandler _ANSI_ARGS_((ClientData clientData,
-	                              XErrorEvent *e));
-#endif
-
-typedef struct ColormapData {	/* Hold color information for a window */
-    int separated;		/* Whether to use separate color bands */
-    int color;			/* Whether window is color or black/white */
-    int ncolors;		/* Number of color values stored */
-    XColor *colors;		/* Pixel value -> RGB mappings */
-    int red_mask, green_mask, blue_mask;	/* Masks and shifts for each */
-    int red_shift, green_shift, blue_shift;	/* color band */
-} ColormapData;
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-#define UCHAR(c) ((unsigned char) (c))
-/*
- *--------------------------------------------------------------
- *
- * xerrorhandler --
- *
- *	This is a dummy function to catch X11 errors during an
- *	attempt to convert a window to a photo image.
- *
- * Results:
- *	None.
- *
- * Side effects:
- *	None.
- *
- *--------------------------------------------------------------
- */
-
-#ifdef X_GetImage
-static int
-xerrorhandler(clientData, e)
-    ClientData clientData;
-    XErrorEvent *e;
-{
-    return 0;
-}
-#endif
-
-/* OPA TODO: Must be a better way to specify non-existing format functions. */
-static int
-ChnRead (interp, chan, fileName, format, imageHandle,
-         destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    return 0;
-}
-
-static int
-ChnWrite (interp, filename, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *filename;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    return 0;
-}
-
-static int
-StringWrite (interp, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    return 0;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a file contains image data in WINDOW format.
- *
- * Results:
- *	The return value is always 0, because a window cannot be
- *	read from a file.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-static int ChnMatch(interp, chan, filename, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
-    CONST char *filename;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    return 0;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatch --
- *
- *  This procedure is invoked by the photo image type to see if
- *  an object contains image data which can be read from a window.
- *
- * Results:
- *  The return value is 1 if data contains a valid window name.
- *
- * Side effects:
- *  the size of the image is placed in widthPtr and heightPtr.
- *
- *----------------------------------------------------------------------
- */
-
-static int ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    int *widthPtr, *heightPtr;
-{
-    Tk_Window tkwin;
-    char *name;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    name = tkimg_GetStringFromObj(data, NULL);
-
-    if (interp && name && (name[0] == '.') &&
-        ((name[1] == 0) || islower(UCHAR(name[1])))) {
-	tkwin = Tk_MainWindow(interp);
-	if (tkwin == NULL) {
-	    return 0;
-	}
-	tkwin = Tk_NameToWindow(interp, name, tkwin);
-	if (tkwin == NULL) {
-	    *widthPtr = *heightPtr = 0;
-	    return 1;
-	}
-	*widthPtr =  Tk_Width(tkwin);
-	*heightPtr = Tk_Height(tkwin);
-	return 1;
-    }
-    return 0;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjRead --
- *
- *	This procedure is called by the photo image type to read
- *	the contents of a window and give it to the photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	new data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], in case it is not
-		  included already in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int ObjRead(interp, data, format, imageHandle,
-                   destX, destY, width, height, srcX, srcY)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;
-    Tcl_Obj *format;
-    Tk_PhotoHandle imageHandle;
-    int destX, destY;
-    int width, height;
-    int srcX, srcY;
-{
-    myblock bl;
-    Tk_Window tkwin;
-    int fileWidth, fileHeight, i, depth, ncolors, nBytes, x, y;
-    char *name;
-#ifndef	__WIN32__
-    XImage *ximage;
-    ColormapData cdata;
-#else
-#   undef XGetPixel
-#   define XGetPixel(P,X,Y) GetPixel(P, X, Y)
-    TkWinDCState DCi;
-    HDC			ximage;
-#endif
-    Colormap cmap;
-    Visual *visual;
-    unsigned char *p;
-#ifdef X_GetImage
-    Tk_ErrorHandler	handle;
-#endif
-    int green, blue;
-
-    name = tkimg_GetStringFromObj(data, NULL);
-
-    tkwin = Tk_NameToWindow(interp, name, Tk_MainWindow(interp));
-
-    if (!tkwin) {
-	Tcl_AppendResult(interp, "Window \"", name,"\" doesn't exist", (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    if (!Tk_WindowId(tkwin)) {
-	Tcl_AppendResult(interp, "Window \"", name,"\" is not mapped", (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    fileWidth = Tk_Width(tkwin);
-    fileHeight = Tk_Height(tkwin);
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)) {
-	return TCL_OK;
-    }
-
-    /*
-     * If the window is off the screen it will generate an BadMatch/XError
-     * We catch any BadMatch errors here
-     */
-
-#ifdef X_GetImage
-    handle = Tk_CreateErrorHandler(Tk_Display(tkwin), BadMatch,
-	    X_GetImage, -1, xerrorhandler, (ClientData) tkwin);
-#endif
-
-#ifndef	__WIN32__
-    /*
-     * Generate an XImage from the window.  We can then read pixel 
-     * values out of the XImage.
-     */
-
-    ximage = XGetImage(Tk_Display(tkwin), Tk_WindowId(tkwin), srcX, srcY,
-	width, height, AllPlanes, ZPixmap);
-
-#ifdef X_GetImage
-    Tk_DeleteErrorHandler(handle);
-#endif
-
-    if (ximage == (XImage*) NULL) {
-	Tcl_AppendResult(interp, "Window \"", name,
-		"\" cannot be transformed into a pixmap (possibly obscured?)",
-		(char *) NULL);
-	return TCL_ERROR;
-    }
-#else
-    ximage = TkWinGetDrawableDC(Tk_Display(tkwin), Tk_WindowId(tkwin), &DCi);
-#endif
-
-    depth = Tk_Depth(tkwin);
-    visual = Tk_Visual(tkwin);
-#ifndef	__WIN32__
-    cmap = Tk_Colormap(tkwin);
-
-    /*
-     * Obtain information about the colormap, ie the mapping between
-     * pixel values and RGB values.  The code below should work
-     * for all Visual types.
-     */
-
-    ncolors = visual->map_entries;
-    cdata.colors = (XColor *) ckalloc(sizeof(XColor) * ncolors);
-    cdata.ncolors = ncolors;
-    if (visual->class == DirectColor || visual->class == TrueColor) {
-	cdata.separated = 1;
-	cdata.red_mask = visual->red_mask;
-	cdata.green_mask = visual->green_mask;
-	cdata.blue_mask = visual->blue_mask;
-	cdata.red_shift = 0;
-	cdata.green_shift = 0;
-	cdata.blue_shift = 0;
-	while ((0x0001 & (cdata.red_mask >> cdata.red_shift)) == 0)
-	    cdata.red_shift ++;
-	while ((0x0001 & (cdata.green_mask >> cdata.green_shift)) == 0)
-	    cdata.green_shift ++;
-	while ((0x0001 & (cdata.blue_mask >> cdata.blue_shift)) == 0)
-	    cdata.blue_shift ++;
-	for (i = 0; i < ncolors; i ++)
-	    cdata.colors[i].pixel =
-		    ((i << cdata.red_shift) & cdata.red_mask) |
-		    ((i << cdata.green_shift) & cdata.green_mask) |
-		    ((i << cdata.blue_shift) & cdata.blue_mask);
-    } else {
-	cdata.separated=0;
-	for (i = 0; i < ncolors; i ++) cdata.colors[i].pixel = i;
-    }
-    cdata.color = !(visual->class == StaticGray || visual->class == GrayScale);
-
-    XQueryColors(Tk_Display(tkwin), cmap, cdata.colors, ncolors);
-#endif
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-    block.offset[0] = 0;
-    block.offset[3] = 0;
-#ifndef	__WIN32__
-    if (cdata.color) {
-#endif
-	block.pixelSize = 3;
-	block.offset[1] = green = 1;
-	block.offset[2] = blue = 2;
-#ifndef	__WIN32__
-    } else {
-	block.pixelSize = 1;
-	block.offset[1] = green = 0;
-	block.offset[2] = blue = 0;
-    }
-#endif
-    block.width = width;
-    block.height = height;
-    block.pitch = block.pixelSize * width;
-    nBytes = block.pitch * height;
-    block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes);
-
-    p = block.pixelPtr;
-    for (y = 0; y<height; y++) {
-	for (x = 0; x<width; x++) {
-	    unsigned long pixel = XGetPixel(ximage, x, y);
-#ifndef	__WIN32__
-	    if (cdata.separated) {
-		int r = (pixel & cdata.red_mask) >> cdata.red_shift;
-		p[0] = cdata.colors[r].red >> 8;
-		if (cdata.color) {
-		    int g = (pixel & cdata.green_mask) >> cdata.green_shift;
-		    int b = (pixel & cdata.blue_mask) >> cdata.blue_shift;
-		    p[1] = cdata.colors[g].green >> 8;
-		    p[2] = cdata.colors[b].blue >> 8;
-		}
-	    } else {
-		p[0] = cdata.colors[pixel].red >> 8;
-		if (cdata.color) {
-		    p[1] = cdata.colors[pixel].green >> 8;
-		    p[2] = cdata.colors[pixel].blue >> 8;
-		}
-	    }
-#else
-	    p[0] = GetRValue(pixel);
-	    p[1] = GetGValue(pixel);
-	    p[2] = GetBValue(pixel);
-#endif
-	    p += block.pixelSize;
-	}
-    }
-
-    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY, width, height);
-
-#ifndef	__WIN32__
-    XDestroyImage(ximage);
-    ckfree((char *) cdata.colors);
-#else
-#   undef XGetPixel
-    TkWinReleaseDrawableDC(Tk_WindowId(tkwin), ximage, &DCi);
-#endif
-    ckfree((char *) block.pixelPtr);
-    return TCL_OK;
-}
diff --git a/tkimg1.3/xbm/ChangeLog b/tkimg1.3/xbm/ChangeLog
deleted file mode 100644
index d6bd9eb..0000000
--- a/tkimg1.3/xbm/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/xbm: XBM photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net> using the original Img sources.
diff --git a/tkimg1.3/xbm/Makefile.in b/tkimg1.3/xbm/Makefile.in
deleted file mode 100644
index 9a2f4ca..0000000
--- a/tkimg1.3/xbm/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgxbm TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgxbm_SOURCES	=	\
-		xbm.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgxbm_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgxbm_OBJECTS	= $(tkimgxbm_SOURCES:.c=. at OBJEXT@)
-tkimgxbm_LIB_FILE	= @tkimgxbm_LIB_FILE@
-
-## tkimgxbmstub_OBJECTS	= tkimgxbmStubLib.$(OBJEXT)
-## tkimgxbmstub_LIB_FILE= @tkimgxbmstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgxbm_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgxbm_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgxbm.$(OBJEXT): $(srcdir)/generic/tkimgxbm.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgxbm.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgxbm/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgxbmConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgxbm.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgxbm_DECLS = \
-	$(srcdir)/tkimgxbm.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgxbm_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgxbm_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/xbm/aclocal.m4 b/tkimg1.3/xbm/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/xbm/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/xbm/configure b/tkimg1.3/xbm/configure
deleted file mode 100755
index 155459a..0000000
--- a/tkimg1.3/xbm/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgxbm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./xbm.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgxbm
-DPACKAGE="img::xbm"
-PHIMGTYPE="xbm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGXBM_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgxbmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGXBM_VERSION "${TKIMGXBM_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgxbm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgxbm 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGXBM_VERSION@%$TKIMGXBM_VERSION%g
-s%@tkimgxbm_LIB_FILE@%$tkimgxbm_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/xbm/configure.in b/tkimg1.3/xbm/configure.in
deleted file mode 100644
index d90cc22..0000000
--- a/tkimg1.3/xbm/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgxbm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./xbm.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgxbm
-DPACKAGE="img::xbm"
-PHIMGTYPE="xbm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGXBM_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGXBM_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgxbm_LIB_FILE)
-#AC_SUBST(tkimgxbmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGXBM_VERSION, "${TKIMGXBM_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgxbm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgxbm)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/xbm/pkgIndex.tcl.in b/tkimg1.3/xbm/pkgIndex.tcl.in
deleted file mode 100644
index 3b23360..0000000
--- a/tkimg1.3/xbm/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgxbm_LIB_FILE@]]
diff --git a/tkimg1.3/xbm/readme b/tkimg1.3/xbm/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/xbm/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/xbm/tests/all.tcl b/tkimg1.3/xbm/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/xbm/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/xbm/tests/folder.xbm b/tkimg1.3/xbm/tests/folder.xbm
deleted file mode 100644
index 6a519f6..0000000
--- a/tkimg1.3/xbm/tests/folder.xbm
+++ /dev/null
@@ -1,5 +0,0 @@
-#define folder_width 16
-#define folder_height 12
-static char folder_bits[] = {
- 0x78,0x00,0x86,0x55,0x02,0x01,0xff,0x5f,0x01,0x30,0x01,0x50,0x01,0x10,0x01,
- 0x50,0x01,0x10,0x01,0x50,0x01,0x30,0xff,0x1f};
diff --git a/tkimg1.3/xbm/tests/xbm.test b/tkimg1.3/xbm/tests/xbm.test
deleted file mode 100644
index 8c1375e..0000000
--- a/tkimg1.3/xbm/tests/xbm.test
+++ /dev/null
@@ -1,26 +0,0 @@
-# This file is a Tcl script to test out XBM reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::xbm [package require img::xbm]"
-
-test xbm-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.xbm]
-    i data -format xbm
-} {#define InlineData_width 16
-#define InlineData_height 12
-static char InlineData_bits[] = {
-  0x78, 0x00,
-  0x86, 0x55,
-  0x02, 0x01,
-  0xff, 0x5f,
-  0x01, 0x30,
-  0x01, 0x50,
-  0x01, 0x10,
-  0x01, 0x50,
-  0x01, 0x10,
-  0x01, 0x50,
-  0x01, 0x30,
-  0xff, 0x1f};
-}
diff --git a/tkimg1.3/xbm/xbm.c b/tkimg1.3/xbm/xbm.c
deleted file mode 100644
index f8562d7..0000000
--- a/tkimg1.3/xbm/xbm.c
+++ /dev/null
@@ -1,688 +0,0 @@
-/*
- * imgXBM.c --
- *
- *	A photo image file handler for XBM files.
- *
- * Written by:
- *	Jan Nijtmans
- *	CMG Oost-Nederland B.V.
- *	email: j.nijtmans at chello.nl (private)
- *	       jan.nijtmans at cmg.nl (work)
- *	url:   http://purl.oclc.org/net/nijtmans/
- *
- * <paul at poSoft.de> Paul Obermeier
- * Feb 2001:
- *      - Bugfix  in CommonWrite: const char *fileName was overwritten. 
- *
- * $Id: xbm.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- *
- */
-
-#include <string.h>
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-/* constants used only in this file */
-
-#define MAX_BUFFER 4096
-
-/*
- * The following data structure is used to describe the state of
- * parsing a bitmap file or string.  It is used for communication
- * between TkGetBitmapData and NextBitmapWord.
- */
-
-#define MAX_WORD_LENGTH 100
-typedef struct ParseInfo {
-    tkimg_MFile handle;
-    char word[MAX_WORD_LENGTH+1];
-				/* Current word of bitmap data, NULL
-				 * terminated. */
-    int wordLength;		/* Number of non-NULL bytes in word. */
-} ParseInfo;
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int CommonRead _ANSI_ARGS_((Tcl_Interp *interp,
-		ParseInfo *parseInfo,
-		Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-		int destX, int destY, int width, int height,
-		int srcX, int srcY));
-static int CommonWrite _ANSI_ARGS_((Tcl_Interp *interp,
-		CONST char *fileName, Tcl_DString *dataPtr,
-		Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
-
-static int ReadXBMFileHeader _ANSI_ARGS_((ParseInfo *parseInfo,
-		int *widthPtr, int *heightPtr));
-static int NextBitmapWord _ANSI_ARGS_((ParseInfo *parseInfoPtr));
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a datastring contains image data in XBM format.
- *
- * Results:
- *	The return value is >0 if the first characters in data look
- *	like XBM data, and 0 otherwise.
- *
- * Side effects:
- *	none
- *
- *----------------------------------------------------------------------
- */
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;		/* The data supplied by the image */
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw XBM file. */
-{
-    ParseInfo parseInfo;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    parseInfo.handle.data = tkimg_GetStringFromObj(data, &parseInfo.handle.length);
-    parseInfo.handle.state = IMG_STRING;
-
-    return ReadXBMFileHeader(&parseInfo, widthPtr, heightPtr);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a channel contains image data in XBM format.
- *
- * Results:
- *	The return value is >0 if the first characters in channel "chan"
- *	look like XBM data, and 0 otherwise.
- *
- * Side effects:
- *	The access position in chan may change.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw XBM file. */
-{
-    ParseInfo parseInfo;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    parseInfo.handle.data = (char *) chan;
-    parseInfo.handle.state = IMG_CHAN;
-
-    return ReadXBMFileHeader(&parseInfo, widthPtr, heightPtr);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonRead --
- *
- *	This procedure is called by the photo image type to read
- *	XBM format data from a file or string and write it into a
- *	given photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	The access position in file f is changed (if read from file)
- *	and new data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], if not included already
-		  in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead(interp, parseInfo, format, imageHandle, destX, destY,
-	   width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    ParseInfo *parseInfo;
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    myblock bl;
-    int fileWidth, fileHeight;
-    int numBytes, row, col, value, i;
-    unsigned char *data, *pixelPtr;
-    char *end;
-
-    ReadXBMFileHeader(parseInfo, &fileWidth, &fileHeight);
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    numBytes = ((fileWidth+7)/8)*32;
-    block.width = fileWidth;
-    block.height = 1;
-    block.pixelSize = 4;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = 3;
-
-    data = (unsigned char *) ckalloc((unsigned) numBytes);
-    block.pixelPtr = data + srcX*4;
-    for (row = 0; row < srcY + height; row++) {
-	pixelPtr = data;
-        for (col = 0; col<(numBytes/32); col++) {
-	    if (NextBitmapWord(parseInfo) != TCL_OK) {
-		ckfree((char *) data);
-		return TCL_ERROR;
-	    }
-	    value = (int) strtol(parseInfo->word, &end, 0);
-	    if (end == parseInfo->word) {
-	    	ckfree((char *) data);
-	    	return TCL_ERROR;
-	    }
-	    for (i=0; i<8; i++) {
-	        *pixelPtr++ = 0;
-	        *pixelPtr++ = 0;
-	        *pixelPtr++ = 0;
-	        *pixelPtr++ = (value & 0x1)? 255:0;
-	  	value >>= 1;
-	    }
-	}
-	if (row >= srcY) {
-	    tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX, destY++, width, 1);
-	}
-    }
-    ckfree((char *) data);
-    return TCL_OK;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnRead --
- *
- *	This procedure is called by the photo image type to read
- *	XBM format data from a channel and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	The access position in channel chan is changed, and new data is
- *	added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    ParseInfo parseInfo;
-
-    parseInfo.handle.data = (char *) chan;
-    parseInfo.handle.state = IMG_CHAN;
-
-    return CommonRead(interp, &parseInfo, format, imageHandle,
-		destX, destY, width, height, srcX, srcY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjRead --
- *
- *	This procedure is called by the photo image type to read
- *	XBM format data from a string and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	New data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjRead(interp, data, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Obj *data;
-    Tcl_Obj *format;		/* User-specified format string, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    ParseInfo parseInfo;
-    parseInfo.handle.data = tkimg_GetStringFromObj(data, &parseInfo.handle.length);
-    parseInfo.handle.state = IMG_STRING;
-
-    return CommonRead(interp, &parseInfo, format, imageHandle,
-		destX, destY, width, height, srcX, srcY);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * ReadXBMFileHeader --
- *
- *	This procedure reads the XBM header from the beginning of a
- *	XBM file and returns information from the header.
- *
- * Results:
- *	The return value is 1 if file "f" appears to start with a valid
- *      XBM header, and 0 otherwise.  If the header is valid,
- *	then *widthPtr and *heightPtr are modified to hold the
- *	dimensions of the image and *numColors holds the number of
- *	colors and byteSize the number of bytes used for 1 pixel.
- *
- * Side effects:
- *	The access position in f advances.
- *
- *----------------------------------------------------------------------
- */
-
-#define UCHAR(c) ((unsigned char) (c))
-
-/*
- *----------------------------------------------------------------------
- *
- * NextBitmapWord --
- *
- *	This procedure retrieves the next word of information (stuff
- *	between commas or white space) from a bitmap description.
- *
- * Results:
- *	Returns TCL_OK if all went well.  In this case the next word,
- *	and its length, will be availble in *parseInfoPtr.  If the end
- *	of the bitmap description was reached then TCL_ERROR is returned.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-NextBitmapWord(parseInfoPtr)
-    ParseInfo *parseInfoPtr;		/* Describes what we're reading
-					 * and where we are in it. */
-{
-    char *dst, buf;
-    int num;
-
-    parseInfoPtr->wordLength = 0;
-    dst = parseInfoPtr->word;
-
-    for (num=tkimg_Read(&parseInfoPtr->handle,&buf,1); isspace(UCHAR(buf)) || (buf == ',');
-	    num=tkimg_Read(&parseInfoPtr->handle,&buf,1)) {
-	if (num == 0) {
-	    return TCL_ERROR;
-	}
-    }
-    for ( ; !isspace(UCHAR(buf)) && (buf != ',') && (num != 0);
-	    num=tkimg_Read(&parseInfoPtr->handle,&buf,1)) {
-	*dst = buf;
-	dst++;
-	parseInfoPtr->wordLength++;
-	if (num == 0 || parseInfoPtr->wordLength > MAX_WORD_LENGTH) {
-	    return TCL_ERROR;
-	}
-    }
-
-    if (parseInfoPtr->wordLength == 0) {
-	return TCL_ERROR;
-    }
-    parseInfoPtr->word[parseInfoPtr->wordLength] = 0;
-    return TCL_OK;
-}
-
-static int
-ReadXBMFileHeader(pi, widthPtr, heightPtr)
-    ParseInfo *pi;
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here. */
-{
-    int width, height, hotX, hotY;
-    char *end;
-
-    /*
-     * Parse the lines that define the dimensions of the bitmap,
-     * plus the first line that defines the bitmap data (it declares
-     * the name of a data variable but doesn't include any actual
-     * data).  These lines look something like the following:
-     *
-     *		#define foo_width 16
-     *		#define foo_height 16
-     *		#define foo_x_hot 3
-     *		#define foo_y_hot 3
-     *		static char foo_bits[] = {
-     *
-     * The x_hot and y_hot lines may or may not be present.  It's
-     * important to check for "char" in the last line, in order to
-     * reject old X10-style bitmaps that used shorts.
-     */
-
-    width = 0;
-    height = 0;
-    hotX = -1;
-    hotY = -1;
-    while (1) {
-	if (NextBitmapWord(pi) != TCL_OK) {
-	    return 0;
-	}
-	if ((pi->wordLength >= 6) && (pi->word[pi->wordLength-6] == '_')
-		&& (strcmp(pi->word+pi->wordLength-6, "_width") == 0)) {
-	    if (NextBitmapWord(pi) != TCL_OK) {
-		return 0;
-	    }
-	    width = strtol(pi->word, &end, 0);
-	    if ((end == pi->word) || (*end != 0)) {
-		return 0;
-	    }
-	} else if ((pi->wordLength >= 7) && (pi->word[pi->wordLength-7] == '_')
-		&& (strcmp(pi->word+pi->wordLength-7, "_height") == 0)) {
-	    if (NextBitmapWord(pi) != TCL_OK) {
-		return 0;
-	    }
-	    height = strtol(pi->word, &end, 0);
-	    if ((end == pi->word) || (*end != 0)) {
-		return 0;
-	    }
-	} else if ((pi->wordLength >= 6) && (pi->word[pi->wordLength-6] == '_')
-		&& (strcmp(pi->word+pi->wordLength-6, "_x_hot") == 0)) {
-	    if (NextBitmapWord(pi) != TCL_OK) {
-		return 0;
-	    }
-	    hotX = strtol(pi->word, &end, 0);
-	    if ((end == pi->word) || (*end != 0)) {
-		return 0;
-	    }
-	} else if ((pi->wordLength >= 6) && (pi->word[pi->wordLength-6] == '_')
-		&& (strcmp(pi->word+pi->wordLength-6, "_y_hot") == 0)) {
-	    if (NextBitmapWord(pi) != TCL_OK) {
-		return 0;
-	    }
-	    hotY = strtol(pi->word, &end, 0);
-	    if ((end == pi->word) || (*end != 0)) {
-		return 0;
-	    }
-	} else if ((pi->word[0] == 'c') && (strcmp(pi->word, "char") == 0)) {
-	    while (1) {
-		if (NextBitmapWord(pi) != TCL_OK) {
-		    return 0;
-		}
-		if ((pi->word[0] == '{') && (pi->word[1] == 0)) {
-		    goto getData;
-		}
-	    }
-	} else if ((pi->word[0] == '{') && (pi->word[1] == 0)) {
-
-	    return 0;
-	}
-    }
-
-getData:
-    *widthPtr = width;
-    *heightPtr = height;
-    return 1;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnWrite
- *
- *	Writes a XBM image to a file. Just calls CommonWrite
- *      with appropriate arguments.
- *
- * Results:
- *	Returns the return value of CommonWrite
- *
- * Side effects:
- *	A file is (hopefully) created on success.
- *
- *----------------------------------------------------------------------
- */
-static int
-ChnWrite(interp, fileName, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    return CommonWrite(interp, fileName, (Tcl_DString *)NULL, format, blockPtr);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * StringWrite
- *
- *	Writes a XBM image to a string. Just calls CommonWrite
- *      with appropriate arguments.
- *
- * Results:
- *	Returns the return value of CommonWrite
- *
- * Side effects:
- *	The Tcl_DString dataPtr is modified on success.
- *
- *----------------------------------------------------------------------
- */
-static int	        
-StringWrite(interp, dataPtr, format, blockPtr) 
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int result;
-    Tcl_DString data;
-
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-
-    result = CommonWrite(interp, "InlineData", dataPtr, format, blockPtr);
-
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-
-/*
- * Yes, I know these macros are dangerous. But it should work fine
- */
-#define WRITE(buf) { if (chan) Tcl_Write(chan, buf, -1); else Tcl_DStringAppend(dataPtr, buf, -1);}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonWrite
- *
- *	This procedure writes a XBM image to the file filename 
- *      (if filename != NULL) or to dataPtr.
- *
- * Results:
- *	Returns TCL_OK on success, or TCL_ERROR on error.
- *
- * Side effects:
- *	varies (see StringWrite and ChnWrite)
- *
- *----------------------------------------------------------------------
- */
-static int
-CommonWrite(interp, fileName, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;    
-    Tk_PhotoImageBlock *blockPtr;
-{
-    Tcl_Channel chan = (Tcl_Channel) NULL;
-    char buffer[256];           
-    unsigned char *pp;
-    int x, y, i, value, mask;
-    int sep = ' ';
-    int alphaOffset;
-    char *p = (char *) NULL;
-    char *imgName;
-    static CONST char header[] =
-"#define %s_width %d\n\
-#define %s_height %d\n\
-static char %s_bits[] = {\n";  
-
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[1]) alphaOffset = blockPtr->offset[1];
-    if (alphaOffset < blockPtr->offset[2]) alphaOffset = blockPtr->offset[2];
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-
-
-    /* open the output file (if needed) */
-    if (!dataPtr) {
-      chan = Tcl_OpenFileChannel(interp, (char *) fileName, "w", 0644);
-      if (!chan) {
-	return TCL_ERROR;
-      }
-    }
-
-    /* compute image name */
-    imgName = (char*)ckalloc(strlen(fileName)+1);
-    memcpy (imgName, fileName, strlen(fileName)+1);
-    p = strrchr(imgName, '/');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strrchr(imgName, '\\');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strrchr(imgName, ':');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strchr(imgName, '.');
-    if (p) {
-	*p = 0;
-    }
-    
-    sprintf(buffer, header, imgName, blockPtr->width, imgName,
-	    blockPtr->height, imgName);
-    WRITE(buffer);
-
-    /* write image itself */
-    pp = blockPtr->pixelPtr + blockPtr->offset[0];
-    sep = ' ';
-    for (y = 0; y < blockPtr->height; y++) {
-	value = 0;
-	mask  = 1;
-	for (x = 0; x < blockPtr->width; x++) {
-	    if (!alphaOffset || pp[alphaOffset]) {
-		value |= mask;
-	    } else {
-		/* make transparent pixel */
-	    }
-	    pp += blockPtr->pixelSize;	
-	    i++;
-	    mask <<= 1;
-	    if (mask >= 256)
-             {
-	      sprintf(buffer,"%c 0x%02x",sep,value);
-	      WRITE(buffer);
-              value = 0;
-	      mask = 1;
-	      sep = ',';
-             }
-	}          
-	if (mask != 1) {
-	      sprintf(buffer,"%c 0x%02x",sep, value);
-	      WRITE(buffer);
-	}
-
-	if (y == blockPtr->height - 1) {
-	    WRITE("};\n");
-	} else {
-	    WRITE(",\n");
-	    sep = ' ';
-	}
-    }
-
-    /* close the channel */
-    if (chan) {
-	Tcl_Close(interp, chan);
-    }
-    return TCL_OK;
-}
diff --git a/tkimg1.3/xpm/ChangeLog b/tkimg1.3/xpm/ChangeLog
deleted file mode 100644
index c0f63b5..0000000
--- a/tkimg1.3/xpm/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2002-11-25  Andreas Kupries <andreas_kupries at users.sourceforge.net>
-
-	* Start of logging.
-	* tkimg/xpm: XPM photo image type. Provided by Paul Obermeier
-	  <obermeier at users.sourceforge.net> using the original Img sources.
diff --git a/tkimg1.3/xpm/Makefile.in b/tkimg1.3/xpm/Makefile.in
deleted file mode 100644
index 61dc26e..0000000
--- a/tkimg1.3/xpm/Makefile.in
+++ /dev/null
@@ -1,542 +0,0 @@
-# Makefile.in --
-#
-#	This file is a Makefile for tkimgxpm TEA Extension.  If it has the name
-#	"Makefile.in" then it is a template for a Makefile;  to generate the
-#	actual Makefile, run "./configure", which is a configuration script
-#	generated by the "autoconf" program (constructs like "@foo@" will get
-#	replaced in the actual Makefile.
-#
-# Copyright (c) 2002 ActiveState SRL.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: Makefile.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
-# appropriate for your platform.  It is not important to specify the
-# directory, as long as it is the $(srcdir) or in the generic, win or
-# unix subdirectory.
-#========================================================================
-
-tkimgxpm_SOURCES	=	\
-		xpm.c		\
-		@EXTRA_SOURCES@
-
-WIN_SOURCES	= 
-UNIX_SOURCES	= 
-
-#========================================================================
-# Identify the object files.  This replaces .c with .$(OBJEXT) for all
-# the named source files.   These objects are created and linked into the
-# final library.  In these do not correspond directly to the source files
-# above, you will need to enumerate the object files here.
-# Normally we would use $(OBJEXT), but certain make executables won't do
-# the extra macro in a macro conversion properly.
-#
-# "tkimgxpm_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-tkimgxpm_OBJECTS	= $(tkimgxpm_SOURCES:.c=. at OBJEXT@)
-tkimgxpm_LIB_FILE	= @tkimgxpm_LIB_FILE@
-
-## tkimgxpmstub_OBJECTS	= tkimgxpmStubLib.$(OBJEXT)
-## tkimgxpmstub_LIB_FILE= @tkimgxpmstub_LIB_FILE@
-
-tkimg_SRC_PATH		= @tkimg_SRC_PATH@
-tkimg_BUILD_PATH	= @tkimg_BUILD_PATH@
-tkimg_VERSION		= @tkimg_VERSION@
-
-#========================================================================
-# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-#RUNTIME_SOURCES =
-
-#========================================================================
-# This is a list of header files to be installed
-#========================================================================
-
-GENERIC_HDRS	=	
-
-#========================================================================
-# This is a list of script files to be installed
-#========================================================================
-
-GENERIC_SCRIPTS	=
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-#ZLIBSUPPORT_NEW_VAR	= @ZLIBSUPPORT_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line need to be changed.  Please
-# check the TARGETS section below to make sure the make targets are
-# correct.
-#========================================================================
-
-#========================================================================
-# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES	= $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE)
-BINARIES	= $(lib_BINARIES)
-
-SHELL		= @SHELL@
-
-srcdir		= @srcdir@
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-
-bindir		= @bindir@
-libdir		= @libdir@
-datadir		= @datadir@
-mandir		= @mandir@
-includedir	= @includedir@
-
-DESTDIR		=
-
-PKG_DIR		= $(PACKAGE)$(VERSION)
-pkgdatadir	= $(datadir)/$(PKG_DIR)
-pkglibdir	= $(libdir)/$(PKG_DIR)
-pkgincludedir	= $(includedir)/$(PKG_DIR)
-
-top_builddir	= .
-
-INSTALL		= @INSTALL@
-INSTALL_PROGRAM	= @INSTALL_PROGRAM@
-INSTALL_DATA	= @INSTALL_DATA@
-INSTALL_SCRIPT	= @INSTALL_SCRIPT@
-
-PHIMGTYPE	= @PHIMGTYPE@
-DPACKAGE	= @DPACKAGE@
-PACKAGE		= @PACKAGE@
-VERSION		= @VERSION@
-CC		= @CC@
-CFLAGS_DEBUG	= @CFLAGS_DEBUG@
-CFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@
-CLEANFILES	= @CLEANFILES@
-EXEEXT		= @EXEEXT@
-LDFLAGS_DEBUG	= @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB	= @MAKE_LIB@
-MAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
-MAKE_STUB_LIB	= @MAKE_STUB_LIB@
-OBJEXT		= @OBJEXT@
-RANLIB		= @RANLIB@
-SHLIB_CFLAGS	= @SHLIB_CFLAGS@
-SHLIB_LD	= @SHLIB_LD@
-SHLIB_LDFLAGS	= @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
-STLIB_LD	= @STLIB_LD@
-TCL_DEFS	= @TCL_DEFS@
-TCL_BIN_DIR	= @TCL_BIN_DIR@
-TCL_SRC_DIR	= @TCL_SRC_DIR@
-TK_BIN_DIR	= @TK_BIN_DIR@
-TK_SRC_DIR	= @TK_SRC_DIR@
-# This is necessary for packages that use private Tcl headers
-#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
-# Not used, but retained for reference of what libs Tcl required
-TCL_LIBS	= @TCL_LIBS@
-TK_LIBS		= @TK_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing.  The other environment variables allow us
-# to test against an uninstalled Tcl.  Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
-		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
-		  LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
-		  LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
-		  SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
-		  PATH="$(EXTRA_PATH):$(PATH)" \
-		  TCLLIBPATH="$(top_builddir)"
-TCLSH_PROG	= @TCLSH_PROG@
-WISH_PROG	= @WISH_PROG@
-TCLSH		= $(TCLSH_ENV) $(TCLSH_PROG)
-WISH		= $(TCLSH_ENV) $(WISH_PROG)
-SHARED_BUILD	= @SHARED_BUILD@
-
-# Note: TK_XINCLUDES may contain a shell comment. When using a
-# separate variable this comment turns into a Makefile comment, the
-# variable is empty. Inserting the value in place introduces a comment
-# into the compiler command line, cutting of the command.
-X11_INCLUDES	= @TK_XINCLUDES@
-
-INCLUDES	= \
-		-I$(tkimg_SRC_PATH)		\
-		-I$(srcdir) -I. @TCL_INCLUDES@ @TK_INCLUDES@ $(X11_INCLUDES)
-
-EXTRA_CFLAGS	= $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
-
-DEFS		= $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-
-CPPFLAGS	= @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
-LIBS		= @LIBS@
-AR		= ar
-CFLAGS		= @CFLAGS@
-COMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS.  Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target inclues executable programs and
-# platform-dependent libraries.  Modify these targets so that they install
-# the various pieces of your package.  The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-doc:
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-	if test "x$(SHARED_BUILD)" = "x1"; then \
-	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
-	fi
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-#========================================================================
-
-install-libraries: libraries
-##	@mkdir -p $(DESTDIR)$(includedir)
-##	@echo "Installing header files in $(DESTDIR)$(includedir)"
-##	@for i in $(GENERIC_HDRS) ; do \
-##	    echo "Installing $$i" ; \
-##	    $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
-##	done;
-##	@for p in $(GENERIC_SCRIPTS); do \
-##	  if test -f $$p; then \
-##	    echo "Installing $$p"; \
-##	    $(INSTALL_DATA) $$p $(pkglibdir); \
-##	  else :; fi; \
-##	done
-##	@echo "libraries done"
-
-#========================================================================
-# Install documentation.  Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
-
-
-testshell	=	$(WISH_PROG) $(srcdir)/testshell
-
-test: binaries libraries
-	$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-#	$(testshell)	\
-#		-load 'load ./$(tkimgxpm_LIB_FILE)' \
-#		-testdir $(srcdir)/tea.tests
-#
-#test: binaries libraries
-#	echo load ./$(tkimgxpm_LIB_FILE) \; cd $(srcdir)/tests \; source all | $(WISH) $(TESTFLAGS)
-
-
-shell: binaries libraries
-	@$(WISH) $(SCRIPT)
-
-gdb:
-	$(WISH_ENV) gdb $(WISH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above.  That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
-# library.  In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$($(PACKAGE)_LIB_FILE): init.c $($(PACKAGE)_OBJECTS)
-	-rm -f $($(PACKAGE)_LIB_FILE)
-	${MAKE_LIB}
-	$(RANLIB) $($(PACKAGE)_LIB_FILE)
-
-# $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS)
-# 	-rm -f $($(PACKAGE)stub_LIB_FILE)
-# 	${MAKE_STUB_LIB}
-# 	$(RANLIB) $($(PACKAGE)stub_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension.  If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# tkimgxpm.$(OBJEXT): $(srcdir)/generic/tkimgxpm.c
-# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimgxpm.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir)
-
-.c.$(OBJEXT):
-	$(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-init.c:	$(srcdir)/../init.c
-	sed < `@CYGPATH@ $(srcdir)/../init.c` > $@	\
-	-e	's/@CPACKAGE@/Tkimgxpm/'		\
-	-e	's/%PACKAGE%/$(PACKAGE)/'		\
-	-e	"s/%PACKAGE_UP%/`echo $(PACKAGE)| tr 'a-z' 'A-Z'`/"		\
-	-e	's/%PHIMGTYPE%/"$(PHIMGTYPE)"/'
-
-#========================================================================
-# Create the pkgIndex.tcl file.
-# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
-# you may find that you need to customize the package.  If so, either
-# modify the -hand version, or create a pkgIndex.tcl.in file and have
-# the configure script output the pkgIndex.tcl by editing configure.in.
-#========================================================================
-#
-# The configure generates the index, nothing to be done here.
-#
-#pkgIndex.tcl:
-#	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH)
-#
-# pkgIndex.tcl-hand:
-#	(echo 'package ifneeded $(PACKAGE) $(VERSION) \
-#	    [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
-#	) > pkgIndex.tcl
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT	= /tmp/dist
-DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
-
-dist-clean:
-	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean doc
-	mkdir -p $(DIST_DIR)
-	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
-		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-		$(DIST_DIR)/
-	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-
-	mkdir $(DIST_DIR)/tclconfig
-	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
-		$(DIST_DIR)/tclconfig/
-	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
-	chmod +x $(DIST_DIR)/tclconfig/install-sh
-
-	-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
-	for p in $$list; do \
-	    if test -d $(srcdir)/$$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-
-	-list='doc'; \
-	for p in $$list; do \
-	    if test -d $$p ; then \
-		mkdir -p $(DIST_DIR)/$$p; \
-		cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
-	    fi; \
-	done
-	-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
-	rm -rf $(DIST_DIR)/htdocs
-
-	(cd $(DIST_ROOT); $(COMPRESS);)
-
-dist_orig:
-	rm -rf $(PKG_DIR)*
-	ls -d $(srcdir)/* > __FILES
-	mkdir $(PKG_DIR)
-	cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
-	rm __FILES
-	find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
-	cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-	-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-	-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-	-zip -r $(PKG_DIR).zip $(PKG_DIR)
-	rm -rf $(PKG_DIR)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
-# variable in configure.in
-#========================================================================
-
-clean:  
-	-test -z "$(BINARIES)" || rm -f $(BINARIES)
-	-rm -f *.$(OBJEXT) core *.core
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
-	-rm -f *.tab.c
-	-rm -rf $(CONFIG_CLEAN_FILES)
-	-rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries.  On Windows this includes both .dll and
-# .lib files.  Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries:
-	@mkdir -p $(DESTDIR)$(pkglibdir)
-	@list='$(lib_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
-	    echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
-	    ext=`echo $$p|sed -e "s/.*\.//"`; \
-	    if test "x$$ext" = "xdll"; then \
-		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
-		if test -f $$lib; then \
-		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
-	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
-		fi; \
-	    fi; \
-	  fi; \
-	done
-	@list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  if test -f $(srcdir)/library/$$p; then \
-	    echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
-	    $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
-	  fi; \
-	done
-##	$(INSTALL_DATA) tkimgxpmConfig.sh $(DESTDIR)$(libdir)
-
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries:
-	@mkdir -p $(DESTDIR)$(bindir)
-	@list='$(bin_BINARIES)'; for p in $$list; do \
-	  if test -f $$p; then \
-	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
-	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
-	  fi; \
-	done
-
-.SUFFIXES: .c .$(OBJEXT)
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) \
-	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
-	list='$(lib_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(RUNTIME_SOURCES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
-	done
-	list='$(bin_BINARIES)'; for p in $$list; do \
-	  rm -f $(DESTDIR)$(bindir)/$$p; \
-	done
-
-#========================================================================
-#
-# Target to regenerate header files and stub files from the *.decls tables.
-#
-#========================================================================
-
-## Reminder how to create stubs without configuring the package
-##
-##	$(MAKE) SHELL=/bin/sh TCLSH_PROG=tclsh srcdir=. genstubs
-
-genstubs:
-	$(TCLSH_PROG)	\
-		$(srcdir)/tools/genStubs.tcl $(srcdir)	\
-		$(srcdir)/tkimgxpm.decls
-
-#========================================================================
-#
-# Target to check that all exported functions have an entry in the stubs
-# tables.
-#
-#========================================================================
-
-tkimgxpm_DECLS = \
-	$(srcdir)/tkimgxpm.decls
-
-checkstubs:
-	- at for i in `nm -p $(tkimgxpm_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
-		| sort -n`; do \
-		match=0; \
-		for j in $(tkimgxpm_DECLS); do \
-		    if [ `grep -c $$i $$j` -gt 0 ]; then \
-			match=1; \
-		    fi; \
-		done; \
-		if [ $$match -eq 0 ]; then echo $$i; fi \
-	done
-
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tkimg1.3/xpm/aclocal.m4 b/tkimg1.3/xpm/aclocal.m4
deleted file mode 100644
index a26c1c0..0000000
--- a/tkimg1.3/xpm/aclocal.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Include the TEA standard macro set
-#
-
-builtin(include,../tclconfig/tcl.m4)
-builtin(include,../tclconfig/img.m4)
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
diff --git a/tkimg1.3/xpm/configure b/tkimg1.3/xpm/configure
deleted file mode 100755
index 909fb82..0000000
--- a/tkimg1.3/xpm/configure
+++ /dev/null
@@ -1,6422 +0,0 @@
-#! /bin/sh
-
-# From configure.in Id: configure.in
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgxpm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-#
-# Include the TEA standard macro set
-#
-
-# tcl.m4 --
-#
-#	This file provides a set of autoconf macros to help TEA-enable
-#	a Tcl extension.
-#
-# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#------------------------------------------------------------------------
-# TEA_PATH_TCLCONFIG --
-#
-#	Locate the tclConfig.sh file and perform a sanity check on
-#	the Tcl compile flags
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tcl=...
-#
-#	Defines the following vars:
-#		TCL_BIN_DIR	Full path to the directory containing
-#				the tclConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_TKCONFIG --
-#
-#	Locate the tkConfig.sh file
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-tk=...
-#
-#	Defines the following vars:
-#		TK_BIN_DIR	Full path to the directory containing
-#				the tkConfig.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TCLCONFIG --
-#
-#	Load the tclConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TCL_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		TCL_BIN_DIR
-#		TCL_SRC_DIR
-#		TCL_LIB_FILE
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_TKCONFIG --
-#
-#	Load the tkConfig.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		TK_BIN_DIR
-#
-# Results:
-#
-#	Sets the following vars that should be in tkConfig.sh:
-#		TK_BIN_DIR
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SHARED --
-#
-#	Allows the building of shared libraries
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-shared=yes|no
-#
-#	Defines the following vars:
-#		STATIC_BUILD	Used for building import/export libraries
-#				on Windows.
-#
-#	Sets the following vars:
-#		SHARED_BUILD	Value of 1 or 0
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_THREADS --
-#
-#	Specify if thread support should be enabled.  If "yes" is
-#	specified as an arg (optional), threads are enabled by default.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-threads
-#
-#	Sets the following vars:
-#		THREADS_LIBS	Thread library(s)
-#
-#	Defines the following vars:
-#		TCL_THREADS
-#		_REENTRANT
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_SYMBOLS --
-#
-#	Specify if debugging symbols should be used
-#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
-#
-# Arguments:
-#	none
-#	
-#	Requires the following vars to be set:
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-symbols
-#
-#	Defines the following vars:
-#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
-#				Sets to CFLAGS_OPTIMIZE if false
-#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
-#				Sets to LDFLAGS_OPTIMIZE if false
-#		DBGX		Debug library extension
-#
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_ENABLE_LANGINFO --
-#
-#	Allows use of modern nl_langinfo check for better l10n.
-#	This is only relevant for Unix.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--enable-langinfo=yes|no (default is yes)
-#
-#	Defines the following vars:
-#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
-#
-#------------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_CFLAGS
-#
-#	Try to determine the proper flags to pass to the compiler
-#	for building shared libraries and other such nonsense.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines the following vars:
-#
-#       DL_OBJS -       Name of the object file that implements dynamic
-#                       loading for Tcl on this system.
-#       DL_LIBS -       Library file(s) to include in tclsh and other base
-#                       applications in order for the "load" command to work.
-#       LDFLAGS -      Flags to pass to the compiler when linking object
-#                       files into an executable application binary such
-#                       as tclsh.
-#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
-#                       that tell the run-time dynamic linker where to look
-#                       for shared libraries such as libtcl.so.  Depends on
-#                       the variable LIB_RUNTIME_DIR in the Makefile.
-#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
-#                       of a shared library (may request position-independent
-#                       code, among other things).
-#       SHLIB_LD -      Base command to use for combining object files
-#                       into a shared library.
-#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-#                       creating shared libraries.  This symbol typically
-#                       goes at the end of the "ld" commands that build
-#                       shared libraries. The value of the symbol is
-#                       "${LIBS}" if all of the dependent libraries should
-#                       be specified when creating a shared library.  If
-#                       dependent libraries should not be specified (as on
-#                       SunOS 4.x, where they cause the link to fail, or in
-#                       general if Tcl and Tk aren't themselves shared
-#                       libraries), then this symbol has an empty string
-#                       as its value.
-#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
-#                       extensions.  An empty string means we don't know how
-#                       to use shared libraries on this platform.
-#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
-#                       as libtcl7.8.so or libtcl7.8.a.
-#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
-#                       in the shared library name, using the $VERSION variable
-#                       to put the version in the right place.  This is used
-#                       by platforms that need non-standard library names.
-#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
-#                       to have a version after the .so, and ${VERSION}.a
-#                       on AIX, since the Tcl shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${VERSION}${SHLIB_SUFFIX}.
-#       TCL_NEEDS_EXP_FILE -
-#                       1 means that an export file is needed to link to a
-#                       shared library.
-#       TCL_EXP_FILE -  The name of the installed export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#       TCL_BUILD_EXP_FILE -
-#                       The name of the built export / import file which
-#                       should be used to link to the Tcl shared library.
-#                       Empty if Tcl is unshared.
-#	CFLAGS_DEBUG -
-#			Flags used when running the compiler in debug mode
-#	CFLAGS_OPTIMIZE -
-#			Flags used when running the compiler in optimize mode
-#	EXTRA_CFLAGS -
-#			Extra CFLAGS to pass to the compiler
-#
-#	Subst's the following vars:
-#		DL_LIBS
-#		CFLAGS_DEBUG
-#		CFLAGS_OPTIMIZE
-#		CFLAGS_WARNING
-#
-#		STLIB_LD
-#		SHLIB_LD
-#		SHLIB_CFLAGS
-#		SHLIB_LDFLAGS
-#		LDFLAGS_DEBUG
-#		LDFLAGS_OPTIMIZE
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_SERIAL_PORT
-#
-#	Determine which interface to use to talk to the serial port.
-#	Note that #include lines must begin in leftmost column for
-#	some compilers to recognize them as preprocessor directives,
-#	and some build environments have stdin not pointing at a
-#	pseudo-terminal (usually /dev/null instead.)
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines only one of the following vars:
-#		HAVE_SYS_MODEM_H
-#		USE_TERMIOS
-#		USE_TERMIO
-#		USE_SGTTY
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#	Supply substitutes for missing POSIX header files.  Special
-#	notes:
-#	    - stdlib.h doesn't define strtol, strtoul, or
-#	      strtod insome versions of SunOS
-#	    - some versions of string.h don't declare procedures such
-#	      as strstr
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		NO_DIRENT_H
-#		NO_ERRNO_H
-#		NO_VALUES_H
-#		NO_LIMITS_H
-#		NO_STDLIB_H
-#		NO_STRING_H
-#		NO_SYS_WAIT_H
-#		NO_DLFCN_H
-#		HAVE_UNISTD_H
-#		HAVE_SYS_PARAM_H
-#
-#		HAVE_STRING_H ?
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_PATH_X
-#
-#	Locate the X11 header files and the X11 library archive.  Try
-#	the ac_path_x macro first, but if it doesn't find the X stuff
-#	(e.g. because there's no xmkmf program) then check through
-#	a list of possible directories.  Under some conditions the
-#	autoconf macro will return an include directory that contains
-#	no include files, so double-check its result just to be safe.
-#
-#	This should be called after TEA_CONFIG_CFLAGS as setting the
-#	LIBS line can confuse some configure macro magic.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Sets the following vars:
-#		XINCLUDES
-#		XLIBSW
-#		LIBS (appends to)
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_BLOCKING_STYLE
-#
-#	The statements below check for systems where POSIX-style
-#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
-#	On these systems (mostly older ones), use the old BSD-style
-#	FIONBIO approach instead.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		HAVE_SYS_IOCTL_H
-#		HAVE_SYS_FILIO_H
-#		USE_FIONBIO
-#		O_NONBLOCK
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANLDER
-#
-#	Checks how the system deals with time.h, what time structures
-#	are used on the system, and what fields the structures have.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Defines some of the following vars:
-#		USE_DELTA_FOR_TZ
-#		HAVE_TM_GMTOFF
-#		HAVE_TM_TZADJ
-#		HAVE_TIMEZONE_VAR
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_BUGGY_STRTOD
-#
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" (provided by Tcl) that corrects the error.
-#	Also, on Compaq's Tru64 Unix 5.0,
-#	strtod(" ") returns 0.0 instead of a failure to convert.
-#
-# Arguments:
-#	none
-#	
-# Results:
-#
-#	Might defines some of the following vars:
-#		strtod (=fixstrtod)
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_LINK_LIBS
-#
-#	Search for the libraries needed to link the Tcl shell.
-#	Things like the math library (-lm) and socket stuff (-lsocket vs.
-#	-lnsl) are dealt with here.
-#
-# Arguments:
-#	Requires the following vars to be set in the Makefile:
-#		DL_LIBS
-#		LIBS
-#		MATH_LIBS
-#	
-# Results:
-#
-#	Subst's the following var:
-#		TCL_LIBS
-#		MATH_LIBS
-#
-#	Might append to the following vars:
-#		LIBS
-#
-#	Might define the following vars:
-#		HAVE_NET_ERRNO_H
-#
-#--------------------------------------------------------------------
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_EARLY_FLAGS
-#
-#	Check for what flags are needed to be passed so the correct OS
-#	features are available.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		_ISOC99_SOURCE
-#		_LARGEFILE64_SOURCE
-#
-#--------------------------------------------------------------------
-
-
-
-
-
-#--------------------------------------------------------------------
-# TEA_TCL_64BIT_FLAGS
-#
-#	Check for what is defined in the way of 64-bit features.
-#
-# Arguments:
-#	None
-#	
-# Results:
-#
-#	Might define the following vars:
-#		TCL_WIDE_INT_IS_LONG
-#		TCL_WIDE_INT_TYPE
-#		HAVE_STRUCT_DIRENT64
-#		HAVE_STRUCT_STAT64
-#		HAVE_TYPE_OFF64_T
-#
-#--------------------------------------------------------------------
-
-
-
-##
-## Here ends the standard Tcl configuration bits and starts the
-## TEA specific functions
-##
-
-#------------------------------------------------------------------------
-# TEA_INIT --
-#
-#	Init various Tcl Extension Architecture (TEA) variables.
-#	This should be the first called TEA_* macro.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Defines and substs the following vars:
-#		CYGPATH
-#		EXEEXT
-#	Defines only:
-#		TEA_INITED
-#		TEA_PLATFORM (windows or unix)
-#
-# "cygpath" is used on windows to generate native path names for include
-# files. These variables should only be used with the compiler and linker
-# since they generate native path names.
-#
-# EXEEXT
-#	Select the executable extension based on the host type.  This
-#	is a lightweight replacement for AC_EXEEXT that doesn't require
-#	a compiler.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PREFIX --
-#
-#	Handle the --prefix=... option by defaulting to what Tcl gave
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	If --prefix or --exec-prefix was not specified, $prefix and
-#	$exec_prefix will be set to the values given to Tcl when it was
-#	configured.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_CC --
-#
-#	Do compiler checks the way we want.  This is just a replacement
-#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Sets up CC var and other standard bits we need to make executables.
-#------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------
-# TEA_MAKE_LIB --
-#
-#	Generate a line that can be used to build a shared/unshared library
-#	in a platform independent manner.
-#
-# Arguments:
-#	none
-#
-#	Requires:
-#
-# Results:
-#
-#	Defines the following vars:
-#	CFLAGS -	Done late here to note disturb other AC macros
-#       MAKE_LIB -      Command to execute to build the Tcl library;
-#                       differs depending on whether or not Tcl is being
-#                       compiled as a shared library.
-#	MAKE_SHARED_LIB	Makefile rule for building a shared library
-#	MAKE_STATIC_LIB	Makefile rule for building a static library
-#	MAKE_STUB_LIB	Makefile rule for building a stub library
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LIB_SPEC --
-#
-#	Compute the name of an existing object library located in libdir
-#	from the given base name and produce the appropriate linker flags.
-#
-# Arguments:
-#	basename	The base name of the library without version
-#			numbers, extensions, or "lib" prefixes.
-#	extra_dir	Extra directory in which to search for the
-#			library.  This location is used first, then
-#			$prefix/$exec-prefix, then some defaults.
-#
-# Requires:
-#	TEA_INIT and TEA_PREFIX must be called first.
-#
-# Results:
-#
-#	Defines the following vars:
-#		${basename}_LIB_NAME	The computed library name.
-#		${basename}_LIB_SPEC	The computed linker flags.
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TCL_HEADERS --
-#
-#	Locate the private Tcl include files
-#
-# Arguments:
-#
-#	Requires:
-#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TCL_TOP_DIR_NATIVE
-#		TCL_GENERIC_DIR_NATIVE
-#		TCL_UNIX_DIR_NATIVE
-#		TCL_WIN_DIR_NATIVE
-#		TCL_BMAP_DIR_NATIVE
-#		TCL_TOOL_DIR_NATIVE
-#		TCL_PLATFORM_DIR_NATIVE
-#		TCL_BIN_DIR_NATIVE
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TCL_HEADERS --
-#
-#	Locate the installed public Tcl header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tclinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TCL_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PRIVATE_TK_HEADERS --
-#
-#	Locate the private Tk include files
-#
-# Arguments:
-#
-#	Requires:
-#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
-#				 already been called.
-#
-# Results:
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PUBLIC_TK_HEADERS --
-#
-#	Locate the installed public Tk header files
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#	CYGPATH must be set
-#
-# Results:
-#
-#	Adds a --with-tkinclude switch to configure.
-#	Result is cached.
-#
-#	Substs the following vars:
-#		TK_INCLUDES
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#	Locate a tclsh shell in the following directories:
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		TCLSH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#	Locate a wish shell in the following directories:
-#		${TK_BIN_DIR}		${TK_BIN_DIR}/../bin
-#		${TCL_BIN_DIR}		${TCL_BIN_DIR}/../bin
-#		${exec_prefix}/bin	${prefix}/bin
-#		${PATH}
-#
-# Arguments
-#	none
-#
-# Results
-#	Subst's the following values:
-#		WISH_PROG
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_PATH_CONFIG --
-#
-#	Locate the ${1}Config.sh file and perform a sanity check on
-#	the ${1} compile flags.  These are used by packages like
-#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
-#
-# Arguments:
-#	none
-#
-# Results:
-#
-#	Adds the following arguments to configure:
-#		--with-$1=...
-#
-#	Defines the following vars:
-#		$1_BIN_DIR	Full path to the directory containing
-#				the $1Config.sh file
-#------------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG --
-#
-#	Load the $1Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1_BIN_DIR
-#
-# Results:
-#
-#	Subst the following vars:
-#		$1_SRC_DIR
-#		$1_LIB_FILE
-#		$1_LIB_SPEC
-#
-#------------------------------------------------------------------------
-
-
-
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#	Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#	
-#	Requires the following vars to be set:
-#		$1
-#
-# Results:
-#	Subst the following vars:
-#
-#------------------------------------------------------------------------
-
-
-
-#
-# m4 configure macros specific to Img.
-#
-
-
-
-
-#
-# Add here whatever m4 macros you want to define for your package
-#
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
-ac_help="$ac_help
-  --with-tk               directory containing tk configuration (tkConfig.sh)"
-ac_help="$ac_help
-  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)"
-ac_help="$ac_help
-  --with-tclinclude      directory containing the public Tcl header files"
-ac_help="$ac_help
-  --with-tkinclude      directory containing the public Tk header files."
-ac_help="$ac_help
-  --enable-threads        build with threads"
-ac_help="$ac_help
-  --enable-shared         build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
-  --enable-64bit          enable 64bit support (where applicable)"
-ac_help="$ac_help
-  --enable-64bit-vis      enable 64bit Sparc VIS support"
-ac_help="$ac_help
-  --disable-load          disallow dynamic loading and "load" command"
-ac_help="$ac_help
-  --enable-symbols        build with debugging symbols [--disable-symbols]"
-ac_help="$ac_help
-  --with-x                use the X Window System"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=./xpm.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../tclconfig $srcdir/../tclconfig; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ../tclconfig $srcdir/../tclconfig" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-CONFIGDIR=${srcdir}/../tclconfig
-
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgxpm
-DPACKAGE="img::xpm"
-PHIMGTYPE="xpm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGXPM_VERSION=${VERSION}
-
-
-
-
-
-
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-
-#AC_SUBST(tkimgxpmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-
-eval cat >> confdefs.h <<EOF
-#define TKIMGXPM_VERSION "${TKIMGXPM_VERSION}"
-EOF
-
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6
-echo "configure:1454: checking for correct TEA configuration" >&5
-    if test x"${PACKAGE}" = x ; then
-	{ echo "configure: error: 
-The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""ok" 1>&6
-    TEA_INITED=ok
-    case "`uname -s`" in
-	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
-	    # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CYGPATH"; then
-  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CYGPATH="cygpath -w"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
-fi
-fi
-CYGPATH="$ac_cv_prog_CYGPATH"
-if test -n "$CYGPATH"; then
-  echo "$ac_t""$CYGPATH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
-	    ;;
-	*)
-	    CYGPATH=echo
-	    EXEEXT=""
-	    TEA_PLATFORM="unix"
-	    ;;
-    esac
-
-    # Check if exec_prefix is set. If not use fall back to prefix
-    if test x$exec_prefix = xNONE ; then exec_prefix=$prefix ; fi
-
-    
-    
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before PATH_TCLCONFIG" 1>&2; exit 1; }
-    fi
-    #
-    # Ok, lets find the tcl configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcl
-    #
-
-    if test x"${no_tcl}" = x ; then
-	# we reset no_tcl in case something fails here
-	no_tcl=true
-	# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
-  withval="$with_tcl"
-  with_tclconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:1536: checking for Tcl configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tcl was specified.
-	    if test x"${with_tclconfig}" != x ; then
-		if test -f "${with_tclconfig}/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tcl installation
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			../tcl \
-			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../tcl \
-			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
-			../../../tcl \
-			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tclConfig.sh" ; then
-			ac_cv_c_tclconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tclconfig}" = x ; then
-		for i in \
-			${srcdir}/../tcl \
-			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tclConfig.sh" ; then
-		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
-		    break
-		fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tclconfig}" = x ; then
-	    TCL_BIN_DIR="# no Tcl configs found"
-	    echo "configure: warning: "Cannot find Tcl configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tcl=
-	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
-	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1610: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
-
-    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TCL_BIN_DIR/tclConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the TCL_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TCL_LIB_SPEC will be set to the value
-    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
-    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TCL_BIN_DIR/Makefile ; then
-        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
-        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
-        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TCL_DBGX substitution
-    #
-
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    #AC_SUBST(TCL_DBGX)
-    
-    
-    
-    
-    
-    #AC_SUBST(TCL_BUILD_LIB_SPEC)
-    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-
-
-
-    #
-    # Ok, lets find the tk configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tk
-    #
-
-    if test x"${no_tk}" = x ; then
-	# we reset no_tk in case something fails here
-	no_tk=true
-	# Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
-  withval="$with_tk"
-  with_tkconfig=${withval}
-fi
-
-	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:1685: checking for Tk configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkconfig was specified.
-	    if test x"${with_tkconfig}" != x ; then
-		if test -f "${with_tkconfig}/tkConfig.sh" ; then
-		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private Tk library
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			../tk \
-			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
-			../../tk \
-			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
-			../../../tk \
-			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	    # check in a few other private locations
-	    if test x"${ac_cv_c_tkconfig}" = x ; then
-		for i in \
-			${srcdir}/../tk \
-			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
-		    if test -f "$i/unix/tkConfig.sh" ; then
-			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-	if test x"${ac_cv_c_tkconfig}" = x ; then
-	    TK_BIN_DIR="# no Tk configs found"
-	    echo "configure: warning: "Cannot find Tk configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tk=
-	    TK_BIN_DIR=${ac_cv_c_tkconfig}
-	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
-	fi
-    fi
-
-
-
-    echo $ac_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1757: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-
-    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. $TK_BIN_DIR/tkConfig.sh
-    else
-        echo "$ac_t""could not find ${TK_BIN_DIR}/tkConfig.sh" 1>&6
-    fi
-
-    #
-    # If the TK_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable TK_LIB_SPEC will be set to the value
-    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
-    # instead of TK_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f $TK_BIN_DIR/Makefile ; then
-        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
-        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
-        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
-    fi
-
-    #
-    # eval is required to do the TK_DBGX substitution
-    #
-
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-    
-
-    
-    
-
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-
-    # Should be AC_MSG_NOTICE, but that requires autoconf 2.50
-    if test "${prefix}" = "NONE"; then
-	prefix_default=yes
-	if test x"${TCL_PREFIX}" != x; then
-	    echo "configure: warning: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" 1>&2
-	    prefix=${TCL_PREFIX}
-	else
-	    prefix=/usr/local
-	fi
-    fi
-    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
-	if test x"${TCL_EXEC_PREFIX}" != x; then
-	    echo "configure: warning: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" 1>&2
-	    exec_prefix=${TCL_EXEC_PREFIX}
-	else
-	    exec_prefix=$prefix
-	fi
-    fi
-
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1876: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1905: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1920 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1937 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1954 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-
-    # If the user did not set CFLAGS, set it now to keep
-    # the AC_PROG_CC macro from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-	CFLAGS=""
-    fi
-
-    # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2118 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2154: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2182: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-
-    #------------------------------------------------------------------------
-    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
-    # It makes compiling go faster.  (This is only a performance feature.)
-    #------------------------------------------------------------------------
-
-    if test -z "$no_pipe" -a -n "$GCC"; then
-	echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:2221: checking if the compiler understands -pipe" >&5
-	OLDCC="$CC"
-	CC="$CC -pipe"
-	cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CC="$OLDCC"
-	    echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-    fi
-
-    # Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2257: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2315: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2349: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-    #--------------------------------------------------------------------
-    # Determines the correct binary file extension (.o, .obj, .exe etc.)
-    #--------------------------------------------------------------------
-
-    echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2382: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  for ac_file in conftest.*; do
-    case $ac_file in
-    *.c) ;;
-    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
-    esac
-  done
-else
-  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-    
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2408: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-    #--------------------------------------------------------------------
-    # Common compiler flag setup
-    #--------------------------------------------------------------------
-
-    
-    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:2445: checking for required early compiler flags" >&5
-    tcl_flags=""
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
-#include "confdefs.h"
-#define _ISOC99_SOURCE 1
-#include <stdlib.h>
-int main() {
-char *p = (char *)strtoll; char *q = (char *)strtoull;
-; return 0; }
-EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__isoc99_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _ISOC99_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _ISOC99_SOURCE"
-    fi
-
-    
-    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
-#include "confdefs.h"
-#define _LARGEFILE64_SOURCE 1
-#include <sys/stat.h>
-int main() {
-struct stat64 buf; int i = stat64("/", &buf);
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_flag__largefile64_source=no
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
-    fi
-
-    if test "x${tcl_flags}" = "x" ; then
-	echo "$ac_t""none" 1>&6
-    else
-	echo "$ac_t""${tcl_flags}" 1>&6
-    fi
-
-    
-    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:2555: checking for 64-bit integer type" >&5
-    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-
-int main() {
-__int64 value = (__int64) 0;
-; return 0; }
-EOF
-if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_64bit=__int64
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-		int main() {exit(!(sizeof(long long) > sizeof(long)));}
-		
-EOF
-if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_cv_type_64bit="long long"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
-
-fi
-rm -f conftest*
-fi
-
-    if test "${tcl_cv_type_64bit}" = none ; then
-	echo "$ac_t""using long" 1>&6
-    else
-	cat >> confdefs.h <<EOF
-#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
-EOF
-
-	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
-
-	# Now check for auxiliary declarations
-	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:2611: checking for struct dirent64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2617 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/dirent.h>
-int main() {
-struct dirent64 p;
-; return 0; }
-EOF
-if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_dirent64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_DIRENT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
-
-	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:2646: checking for struct stat64" >&5
-	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
-#include "confdefs.h"
-#include <sys/stat.h>
-int main() {
-struct stat64 p;
-
-; return 0; }
-EOF
-if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_struct_stat64=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_struct_stat64=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_STAT64 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
-
-	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:2681: checking for off64_t" >&5
-	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	    cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-off64_t offset;
-
-; return 0; }
-EOF
-if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_cv_type_off64_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_cv_type_off64_t=no
-fi
-rm -f conftest*
-fi
-
-	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_OFF64_T 1
-EOF
-
-	fi
-	echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6
-    fi
-
-    #TEA_C_BIGENDIAN
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
-echo "configure:2720: checking dirent.h" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 2722 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <dirent.h>
-int main() {
-
-#ifndef _POSIX_SOURCE
-#   ifdef __Lynx__
-	/*
-	 * Generate compilation error to make the test fail:  Lynx headers
-	 * are only valid if really in the POSIX environment.
-	 */
-
-	missing_procedure();
-#   endif
-#endif
-DIR *d;
-struct dirent *entryPtr;
-char *p;
-d = opendir("foobar");
-entryPtr = readdir(d);
-p = entryPtr->d_name;
-closedir(d);
-
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  tcl_ok=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=no
-fi
-rm -f conftest*
-
-    if test $tcl_ok = no; then
-	cat >> confdefs.h <<\EOF
-#define NO_DIRENT_H 1
-EOF
-
-    fi
-
-    echo "$ac_t""$tcl_ok" 1>&6
-    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:2769: checking for errno.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
-#include "confdefs.h"
-#include <errno.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_ERRNO_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for float.h""... $ac_c" 1>&6
-echo "configure:2806: checking for float.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
-#include "confdefs.h"
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_FLOAT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for values.h""... $ac_c" 1>&6
-echo "configure:2843: checking for values.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
-#include <values.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_VALUES_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2880: checking for limits.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_LIMITS_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:2917: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtol" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtoul" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 2978 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strtod" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
-EOF
-
-    fi
-    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:2999: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=0
-fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strstr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-    cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "strerror" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  tcl_ok=0
-fi
-rm -f conftest*
-
-
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
-
-    if test $tcl_ok = 0; then
-	cat >> confdefs.h <<\EOF
-#define NO_STRING_H 1
-EOF
-
-    fi
-
-    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
-echo "configure:3072: checking for sys/wait.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3077 "configure"
-#include "confdefs.h"
-#include <sys/wait.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_SYS_WAIT_H 1
-EOF
-
-fi
-
-    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:3109: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_DLFCN_H 1
-EOF
-
-fi
-
-
-    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
-    for ac_hdr in unistd.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3151: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-	
-    echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:3191: checking for strtod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strtod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_strtod=1
-else
-  echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:3241: checking for Solaris2.4/Tru64 strtod bugs" >&5
-	if test "$cross_compiling" = yes; then
-  tcl_ok=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
-#include "confdefs.h"
-
-	    extern double strtod();
-	    int main()
-	    {
-		char *string = "NaN", *spaceString = " ";
-		char *term;
-		double value;
-		value = strtod(string, &term);
-		if ((term != string) && (term[-1] == 0)) {
-		    exit(1);
-		}
-		value = strtod(spaceString, &term);
-		if (term == (spaceString+1)) {
-		    exit(1);
-		}
-		exit(0);
-	    }
-EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  tcl_ok=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  tcl_ok=0
-fi
-rm -fr conftest*
-fi
-
-	if test "$tcl_ok" = 1; then
-	    echo "$ac_t""ok" 1>&6
-	else
-	    echo "$ac_t""buggy" 1>&6
-	    LIBOBJS="$LIBOBJS fixstrtod.o"
-	    cat >> confdefs.h <<\EOF
-#define strtod fixstrtod
-EOF
-
-	fi
-    fi
-
-    fi
-
-
-
-    #
-    # Ok, lets find the tkimg configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tkimg
-    #
-
-    if test x"${no_tkimg}" = x ; then
-	# we reset no_tkimg in case something fails here
-	no_tkimg=true
-	# Check whether --with-tkimg or --without-tkimg was given.
-if test "${with_tkimg+set}" = set; then
-  withval="$with_tkimg"
-  with_tkimgconfig=${withval}
-fi
-
-	echo $ac_n "checking for tkimg configuration""... $ac_c" 1>&6
-echo "configure:3310: checking for tkimg configuration" >&5
-	if eval "test \"`echo '$''{'ac_cv_c_tkimgconfig'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-
-	    # First check to see if --with-tkimg was specified.
-	    if test x"${with_tkimgconfig}" != x ; then
-		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
-		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
-		else
-		    { echo "configure: error: ${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" 1>&2; exit 1; }
-		fi
-	    fi
-
-	    # then check for a private tkimg installation
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in \
-			../tkimg \
-			`ls -dr ../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../tkimg \
-			`ls -dr ../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			../../../tkimg \
-			`ls -dr ../../../tkimg[8-9].[0-9]* 2>/dev/null` \
-			${srcdir}/../tkimg \
-			`ls -dr ${srcdir}/../tkimg[8-9].[0-9]* 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		    if test -f "$i/unix/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
-			break
-		    fi
-		done
-	    fi
-
-	    # check in a few common install locations
-	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
-		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
-			`ls -d ${prefix}/lib 2>/dev/null` \
-			`ls -d /usr/local/lib 2>/dev/null` \
-			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
-			; do
-		    if test -f "$i/tkimgConfig.sh" ; then
-			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
-			break
-		    fi
-		done
-	    fi
-	
-fi
-
-
-	if test x"${ac_cv_c_tkimgconfig}" = x ; then
-	    tkimg_BIN_DIR="# no tkimg configs found"
-	    echo "configure: warning: "Cannot find tkimg configuration definitions"" 1>&2
-	    exit 0
-	else
-	    no_tkimg=
-	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
-	    echo "$ac_t""found $tkimg_BIN_DIR/tkimgConfig.sh" 1>&6
-	fi
-    fi
-
-
-    echo $ac_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh""... $ac_c" 1>&6
-echo "configure:3379: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
-
-    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
-        echo "$ac_t""loading" 1>&6
-	. ${tkimg_BIN_DIR}/tkimgConfig.sh
-    else
-        echo "$ac_t""file not found" 1>&6
-    fi
-
-    #
-    # If the tkimg_BIN_DIR is the build directory (not the install directory),
-    # then set the common variable name to the value of the build variables.
-    # For example, the variable tkimg_LIB_SPEC will be set to the value
-    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
-    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f ${tkimg_BIN_DIR}/Makefile ; then
-	echo "configure: warning: Found Makefile - using build library specs for tkimg" 1>&2
-        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
-        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
-        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
-    fi
-
-    
-    
-
-    
-    
-
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Compute an absolute path to the src directory of module 'tkimg' so
-# that we are able to find its headers even if they are not installed.
-#--------------------------------------------------------------------
-
-case $tkimg_SRC_DIR in
-/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
-	;;
-\.)	# SRC_DIR top level, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-	;;
-*)	# SRC_DIR relative, splice with BUILD_PATH
-	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
-esac
-
-tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    tkimg_SRC_PATH="\"`$CYGPATH $tkimg_SRC_PATH`\""
-    tkimg_BUILD_PATH="\"`$CYGPATH $tkimg_BUILD_PATH`\""
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
-echo "configure:3449: checking for Tcl public headers" >&5
-
-    # Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tclinclude, if it was given
-
-	if test x"${with_tclinclude}" != x ; then
-	    if test -f "${with_tclinclude}/tcl.h" ; then
-		ac_cv_c_tclh=${with_tclinclude}
-	    else
-		{ echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tcl.h" ; then
-		    ac_cv_c_tclh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
-
-    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-
-    echo $ac_n "checking for Tk public headers""... $ac_c" 1>&6
-echo "configure:3512: checking for Tk public headers" >&5
-
-    # Check whether --with-tkinclude or --without-tkinclude was given.
-if test "${with_tkinclude+set}" = set; then
-  withval="$with_tkinclude"
-  with_tkinclude=${withval}
-fi
-
-
-    if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	# Use the value from --with-tkinclude, if it was given
-
-	if test x"${with_tkinclude}" != x ; then
-	    if test -f "${with_tkinclude}/tk.h" ; then
-		ac_cv_c_tkh=${with_tkinclude}
-	    else
-		{ echo "configure: error: ${with_tkinclude} directory does not contain tk.h" 1>&2; exit 1; }
-	    fi
-	else
-	    # Check order: pkg --prefix location, Tcl's --prefix location,
-	    # directory of tclConfig.sh, and Tcl source directory.
-	    # Looking in the source dir is not ideal, but OK.
-
-	    eval "temp_includedir=${includedir}"
-	    list="`ls -d ${temp_includedir}      2>/dev/null` \
-		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
-		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
-		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
-	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-		list="$list /usr/local/include /usr/include"
-	    fi
-	    for i in $list ; do
-		if test -f "$i/tk.h" ; then
-		    ac_cv_c_tkh=$i
-		    break
-		fi
-	    done
-	fi
-    
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tkh}" = x ; then
-	{ echo "configure: error: tk.h not found.  Please specify its location with --with-tkinclude" 1>&2; exit 1; }
-    else
-	echo "$ac_t""${ac_cv_c_tkh}" 1>&6
-    fi
-
-    # Convert to a native path and substitute into the output files.
-
-    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
-
-    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
-
-    
-
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgxpm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    cat >> confdefs.h <<\EOF
-#define BUILD_tkimgxpm 1
-EOF
-
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-
-    # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
-  enableval="$enable_threads"
-  tcl_ok=$enableval
-else
-  tcl_ok=
-fi
-
-
-    if test "$tcl_ok" = "yes"; then
-	TCL_THREADS=1
-
-	if test "${TEA_PLATFORM}" != "windows" ; then
-	    # We are always OK on Windows, so check what this platform wants.
-	    cat >> confdefs.h <<\EOF
-#define USE_THREAD_ALLOC 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-	    echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3638: checking for pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "no"; then
-		# Check a little harder for __pthread_mutex_init in the
-		# same library, as some systems hide it there until
-		# pthread.h is defined.	 We could alternatively do an
-		# AC_TRY_COMPILE with pthread.h, but that will work with
-		# libpthread really doesn't exist, like AIX 4.2.
-		# [Bug: 4359]
-		echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3686: checking for __pthread_mutex_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char __pthread_mutex_init();
-
-int main() {
-__pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    fi
-	    
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthread"
-	    else
-		echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:3733: checking for pthread_mutex_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3741 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "yes"; then
-		    # The space is needed
-		    THREADS_LIBS=" -lpthreads"
-		else
-		    echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:3778: checking for pthread_mutex_init in -lc" >&5
-ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "no"; then
-			echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3820: checking for pthread_mutex_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-			if test "$tcl_ok" = "yes"; then
-			    # The space is needed
-			    THREADS_LIBS=" -pthread"
-			else
-			    TCL_THREADS=0
-			    echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2
-			fi
-		    fi
-		fi
-	    fi
-
-	    # Does the pthread-implementation provide
-	    # 'pthread_attr_setstacksize' ?
-
-	    ac_saved_libs=$LIBS
-	    LIBS="$LIBS $THREADS_LIBS"
-	    for ac_func in pthread_attr_setstacksize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3879: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	    LIBS=$ac_saved_libs
-	    for ac_func in readdir_r
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3935: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-	fi
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:3993: checking for building with threads" >&5
-    if test "${TCL_THREADS}" = "1"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
-
-	echo "$ac_t""yes" 1>&6
-    else
-	echo "$ac_t""no (default)" 1>&6
-    fi
-    # TCL_THREADS sanity checking.  See if our request for building with
-    # threads is the same as the way Tcl was built.  If not, warn the user.
-    case ${TCL_DEFS} in
-	*THREADS=1*)
-	    if test "${TCL_THREADS}" = "0"; then
-		echo "configure: warning: 
-    Building ${PACKAGE} without threads enabled, but building against a Tcl
-    that IS thread-enabled." 1>&2
-	    fi
-	    ;;
-	*)
-	    if test "${TCL_THREADS}" = "1"; then
-		echo "configure: warning: 
-    --enable-threads requested, but attempting building against a Tcl
-    that is NOT thread-enabled." 1>&2
-	    fi
-	    ;;
-    esac
-    
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:4031: checking how to build libraries" >&5
-    # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${enable_shared+set}" = set; then
-	enableval="$enable_shared"
-	tcl_ok=$enableval
-    else
-	tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-	echo "$ac_t""shared" 1>&6
-	SHARED_BUILD=1
-    else
-	echo "$ac_t""static" 1>&6
-	SHARED_BUILD=0
-	cat >> confdefs.h <<\EOF
-#define STATIC_BUILD 1
-EOF
-
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before CONFIG_CFLAGS" 1>&2; exit 1; }
-    fi
-
-    # Step 0: Enable 64 bit support?
-
-    echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6
-echo "configure:4077: checking if 64bit support is enabled" >&5
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
-else
-  do64bit=no
-fi
-
-    echo "$ac_t""$do64bit" 1>&6
- 
-    # Step 0.b: Enable Solaris 64 bit VIS support?
-
-    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:4091: checking if 64bit Sparc VIS support is requested" >&5
-    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
-  enableval="$enable_64bit_vis"
-  do64bitVIS=$enableval
-else
-  do64bitVIS=no
-fi
-
-    echo "$ac_t""$do64bitVIS" 1>&6
-
-    if test "$do64bitVIS" = "yes"; then
-	# Force 64bit on with VIS
-	do64bit=yes
-    fi
-
-    # Step 1: set the variable "system" to hold the name and version number
-    # for the system.  This can usually be done via the "uname" command, but
-    # there are a few systems, like Next, where this doesn't work.
-
-    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:4112: checking system version (for dynamic loading)" >&5
-    if test -f /usr/lib/NextStep/software_version; then
-	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-    else
-	system=`uname -s`-`uname -r`
-	if test "$?" -ne 0 ; then
-	    echo "$ac_t""unknown (can't find uname command)" 1>&6
-	    system=unknown
-	else
-	    # Special check for weird MP-RAS system (uname returns weird
-	    # results, and the version is kept in special file).
-	
-	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print }' /etc/.relid`
-	    fi
-	    if test "`uname -s`" = "AIX" ; then
-		system=AIX-`uname -v`.`uname -r`
-	    fi
-	    if test "${TEA_PLATFORM}" = "windows" ; then
-		system=windows
-	    fi
-	    echo "$ac_t""$system" 1>&6
-	fi
-    fi
-
-    # Step 2: check for existence of -ldl library.  This is needed because
-    # Linux can use either -ldl or -ldld for dynamic loading.
-
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4141: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4149 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_dl=yes
-else
-  echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-    # Step 3: set configuration options based on system name and version.
-
-    do64bit_ok=no
-    EXTRA_CFLAGS=""
-    TCL_EXPORT_FILE_SUFFIX=""
-    UNSHARED_LIB_SUFFIX=""
-    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    CFLAGS_OPTIMIZE=-O
-    if test "$GCC" = "yes" ; then
-	CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-    else
-	CFLAGS_WARNING=""
-    fi
-    TCL_NEEDS_EXP_FILE=0
-    TCL_BUILD_EXP_FILE=""
-    TCL_EXP_FILE=""
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4204: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    STLIB_LD='${AR} cr'
-    case $system in
-	windows)
-	    # This is a 2-stage check to make sure we have the 64-bit SDK
-	    # We have to know where the SDK is installed.
-	    if test "$do64bit" = "yes" ; then
-		if test "x${MSSDK}x" = "xx" ; then
-		    MSSDK="C:/Progra~1/Microsoft SDK"
-		fi
-		# In order to work in the tortured autoconf environment,
-		# we need to ensure that this path has no spaces
-		MSSDK=`cygpath -w -s "$MSSDK" | sed -e 's!\\\!/!g'`
-		if test ! -d "${MSSDK}/bin/win64" ; then
-		    echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
-		    do64bit="no"
-		else
-		    do64bit_ok="yes"
-		fi
-	    fi
-
-	    if test "$GCC" != "yes" ; then
-	        if test "${SHARED_BUILD}" = "0" ; then
-		    runtime=-MT
-	        else
-		    runtime=-MD
-	        fi
-
-                if test "$do64bit" = "yes" ; then
-		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
-		    export CC="${MSSDK}/Bin/Win64/cl.exe \
-	                -I${MSSDK}/Include/prerelease \
-                        -I${MSSDK}/Include/Win64/crt \
-	                -I${MSSDK}/Include"
-		    export RC="${MSSDK}/bin/rc.exe"
-		    export lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
-	                -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
-		    export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
-		    export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
-		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}"
-	        else
-		    RC="rc"
-		    STLIB_LD="lib -nologo"
-    		    LINKBIN="link -link50compat"
-		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
-		    CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
-		fi
-	    fi
-
-	    if test "$GCC" = "yes"; then
-		# mingw gcc mode
-		RC="windres"
-		CFLAGS_DEBUG="-g"
-		CFLAGS_OPTIMIZE="-O2"
-		SHLIB_LD="$CC -shared"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
-		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
-	    else
-		SHLIB_LD="${LINKBIN} -dll -nologo"
-		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
-		EXTRA_CFLAGS="-YX"
-		# For information on what debugtype is most useful, see:
-		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
-		# This essentially turns it all on.
-		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
-		LDFLAGS_OPTIMIZE="-release"
-		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
-		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
-		PATHTYPE=-w
-	    fi
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dll"
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
-
-	    TCL_LIB_VERSIONS_OK=nodots
-	    # Bogus to avoid getting this turned off
-	    DL_OBJS="tclLoadNone.obj"
-    	    ;;
-	AIX-*)
-	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
-		# AIX requires the _r compiler when gcc isn't being used
-		if test "${CC}" != "cc_r" ; then
-		    CC=${CC}_r
-		fi
-		echo "$ac_t""Using $CC for compiling with threads" 1>&6
-	    fi
-	    LIBS="$LIBS -lc"
-	    SHLIB_CFLAGS=""
-	    SHLIB_SUFFIX=".so"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    if test "`uname -m`" = "ia64" ; then
-		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		# AIX-5 has dl* in libc.so
-		DL_LIBS=""
-		if test "$GCC" = "yes" ; then
-		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-		else
-		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-		fi
-	    else
-		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
-		DL_LIBS="-ldl"
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		TCL_NEEDS_EXP_FILE=1
-		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
-	    fi
-	    DL_OBJS="tclLoadDl.o"
-	    LDFLAGS=""
-
-	    # AIX v<=4.1 has some different flags than 4.2+
-	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
-		LIBOBJS="$LIBOBJS tclLoadAix.o"
-		DL_LIBS="-lld"
-	    fi
-
-	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
-	    # non-blocking file IO.  This library has to be linked in after
-	    # the MATH_LIBS or it breaks the pow() function.  The way to
-	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
-	    # This library also supplies gettimeofday.
-	    #
-	    # AIX does not have a timezone field in struct tm. When the AIX
-	    # bsd library is used, the timezone global and the gettimeofday
-	    # methods are to be avoided for timezone deduction instead, we
-	    # deduce the timezone by comparing the localtime result on a
-	    # known GMT value.
-
-	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4361: checking for gettimeofday in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4369 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
-EOF
-if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  libbsd=yes
-else
-  echo "$ac_t""no" 1>&6
-libbsd=no
-fi
-
-	    if test $libbsd = yes; then
-	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >> confdefs.h <<\EOF
-#define USE_DELTA_FOR_TZ 1
-EOF
-
-	    fi
-
-	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
-	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
-		if test "$GCC" = "yes" ; then
-		    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-		else 
-		    do64bit_ok=yes
-		    EXTRA_CFLAGS="-q64"
-		    LDFLAGS="-q64"
-		    RANLIB="${RANLIB} -X64"
-		    AR="${AR} -X64"
-		    SHLIB_LDFLAGS="-b64"
-		fi
-	    fi
-	    ;;
-	BSD/OS-2.1*|BSD/OS-3*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="shlicc -r"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	BSD/OS-4.*)
-	    SHLIB_CFLAGS="-export-dynamic -fPIC"
-	    SHLIB_LD="cc -shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	dgux*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	HP-UX-*.11.*)
-	    # Use updated header definitions where possible
-	    cat >> confdefs.h <<\EOF
-#define _XOPEN_SOURCE_EXTENDED 1
-EOF
-
-
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4462: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4470 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS='${LIBS}'
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-
-	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-	    #EXTRA_CFLAGS="+DAportable"
-
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		if test "$GCC" = "yes" ; then
-		    hpux_arch=`${CC} -dumpmachine`
-		    case $hpux_arch in
-			hppa64*)
-			    # 64-bit gcc in use.  Fix flags for GNU ld.
-			    do64bit_ok=yes
-			    SHLIB_LD="${CC} -shared"
-			    SHLIB_LD_LIBS=""
-			    LD_SEARCH_FLAGS=''
-			    ;;
-			*)
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			    ;;
-		    esac
-		else
-		    do64bit_ok=yes
-		    if test "`uname -m`" = "ia64" ; then
-			EXTRA_CFLAGS="+DD64"
-			LDFLAGS="+DD64 $LDFLAGS"
-		    else
-			EXTRA_CFLAGS="+DA2.0W"
-			LDFLAGS="+DA2.0W $LDFLAGS"
-		    fi
-		fi
-	    fi
-	    ;;
-	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	    SHLIB_SUFFIX=".sl"
-	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4546: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  tcl_ok=yes
-else
-  echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = yes; then
-		SHLIB_CFLAGS="+z"
-		SHLIB_LD="ld -b"
-		SHLIB_LD_LIBS=""
-		DL_OBJS="tclLoadShl.o"
-		DL_LIBS="-ldld"
-		LDFLAGS="-Wl,-E"
-		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-	    fi
-	    ;;
-	IRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-	    ;;
-	IRIX-5.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    EXTRA_CFLAGS=""
-	    LDFLAGS=""
-	    ;;
-	IRIX-6.*|IRIX64-6.5*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "$GCC" = "yes" ; then
-		EXTRA_CFLAGS="-mabi=n32"
-		LDFLAGS="-mabi=n32"
-	    else
-		case $system in
-		    IRIX-6.3)
-			# Use to build 6.2 compatible binaries on 6.3.
-			EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
-			;;
-		    *)
-			EXTRA_CFLAGS="-n32"
-			;;
-		esac
-		LDFLAGS="-n32"
-	    fi
-	    ;;
-	IRIX64-6.*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld -n32 -shared -rdata_shared"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-
-	    # Check to enable 64-bit flags for compiler/linker
-
-	    if test "$do64bit" = "yes" ; then
-	        if test "$GCC" = "yes" ; then
-	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
-	        else
-	            do64bit_ok=yes
-	            SHLIB_LD="ld -64 -shared -rdata_shared"
-	            EXTRA_CFLAGS="-64"
-	            LDFLAGS="-64"
-	        fi
-	    fi
-	    ;;
-	Linux*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
-	    # when you inline the string and math operations.  Turn this off to
-	    # get rid of the warnings.
-
-	    CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4685: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS="tclLoadDld.o"
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-
-	    # The combo of gcc + glibc has a bug related
-	    # to inlining of functions like strtod(). The
-	    # -fno-builtin flag should address this problem
-	    # but it does not work. The -fno-inline flag
-	    # is kind of overkill but it works.
-	    # Disable inlining only when one of the
-	    # files in compat/*.c is being linked in.
-	    if test x"${LIBOBJS}" != x ; then
-	        EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
-	    fi
-
-	    ;;
-	GNU*)
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-
-	    if test "$have_dl" = yes; then
-		SHLIB_LD="${CC} -shared"
-		DL_OBJS=""
-		DL_LIBS="-ldl"
-		LDFLAGS="-rdynamic"
-		LD_SEARCH_FLAGS=""
-	    else
-		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:4752: checking for dld.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4757 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		    SHLIB_LD="ld -shared"
-		    DL_OBJS=""
-		    DL_LIBS="-ldld"
-		    LDFLAGS=""
-		    LD_SEARCH_FLAGS=""
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	    fi
-	    if test "`uname -m`" = "alpha" ; then
-		EXTRA_CFLAGS="-mieee"
-	    fi
-	    ;;
-	MP-RAS-02*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	MP-RAS-*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS="-Wl,-Bexport"
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
-	    # Not available on all versions:  check for include file.
-	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4817: checking for dlfcn.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4822 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-		# NetBSD/SPARC needs -fPIC, -fpic will not do.
-		SHLIB_CFLAGS="-fPIC"
-		SHLIB_LD="ld -Bshareable -x"
-		SHLIB_LD_LIBS=""
-		SHLIB_SUFFIX=".so"
-		DL_OBJS="tclLoadDl.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:4854: checking for ELF" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 4856 "configure"
-#include "confdefs.h"
-
-#ifdef __ELF__
-	yes
-#endif
-		
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-else
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-		
-fi
-rm -f conftest*
-
-	    
-else
-  echo "$ac_t""no" 1>&6
-
-		SHLIB_CFLAGS=""
-		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
-		SHLIB_LD_LIBS='${LIBS}'
-		SHLIB_SUFFIX=".a"
-		DL_OBJS="tclLoadAout.o"
-		DL_LIBS=""
-		LDFLAGS=""
-		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    
-fi
-
-
-	    # FreeBSD doesn't handle version numbers with dots.
-
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	FreeBSD-*)
-	    # FreeBSD 3.* and greater have ELF.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS="-export-dynamic"
-	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    if test "${TCL_THREADS}" = "1" ; then
-		# The -pthread needs to go in the CFLAGS, not LIBS
-		LIBS=`echo $LIBS | sed s/-pthread//`
-		EXTRA_CFLAGS="-pthread"
-	    	LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	    case $system in
-	    FreeBSD-3.*)
-	    	# FreeBSD-3 doesn't handle version numbers with dots.
-	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
-	    	TCL_LIB_VERSIONS_OK=nodots
-		;;
-	    esac
-	    ;;
-	Rhapsody-*|Darwin-*)
-	    SHLIB_CFLAGS="-fno-common"
-	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".dylib"
-	    DL_OBJS="tclLoadDyld.o"
-	    DL_LIBS=""
-	    LDFLAGS="-prebind"
-	    LD_SEARCH_FLAGS=""
-	    CFLAGS_OPTIMIZE="-O3"
-	    EXTRA_CFLAGS="-pipe"
-	    ;;
-	NEXTSTEP-*)
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="cc -nostdlib -r"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadNext.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >> confdefs.h <<\EOF
-#define _OE_SOCKETS 1
-EOF
-  # needed in sys/socket.h
-	    ;;      
-	OSF1-1.0|OSF1-1.1|OSF1-1.2)
-	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	    SHLIB_CFLAGS=""
-	    # Hack: make package name same as library name
-	    SHLIB_LD='ld -R -export :'
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadOSF.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-1.*)
-	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	    SHLIB_CFLAGS="-fPIC"
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD="ld -shared"
-	    else
-	        SHLIB_LD="ld -non_shared"
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	OSF1-V*)
-	    # Digital OSF/1
-	    SHLIB_CFLAGS=""
-	    if test "$SHARED_BUILD" = "1" ; then
-	        SHLIB_LD='ld -shared -expect_unresolved "*"'
-	    else
-	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-	    fi
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
-	    if test "${TCL_THREADS}" = "1" ; then
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-		EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-		LIBS=`echo $LIBS | sed s/-lpthreads//`
-		if test "$GCC" = "yes" ; then
-		    LIBS="$LIBS -lpthread -lmach -lexc"
-		else
-		    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
-		    LDFLAGS="-pthread"
-		fi
-	    fi
-
-	    ;;
-	QNX-6*)
-	    # QNX RTP
-	    # This may work for all QNX, but it was only reported for v6.
-	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -Bshareable -x"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    # dlopen is in -lc on QNX
-	    DL_LIBS=""
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	RISCos-*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".a"
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    ;;
-	SCO_SV-3.2*)
-	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
-	    # this test works, since "uname -s" was non-standard in 3.2.4 and
-	    # below.
-	    if test "$GCC" = "yes" ; then
-	    	SHLIB_CFLAGS="-fPIC -melf"
-	    	LDFLAGS="-melf -Wl,-Bexport"
-	    else
-	    	SHLIB_CFLAGS="-Kpic -belf"
-	    	LDFLAGS="-belf -Wl,-Bexport"
-	    fi
-	    SHLIB_LD="ld -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SINIX*5.4*)
-	    SHLIB_CFLAGS="-K PIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS=""
-	    ;;
-	SunOS-4*)
-	    SHLIB_CFLAGS="-PIC"
-	    SHLIB_LD="ld"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-
-	    # SunOS can't handle version numbers with dots in them in library
-	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
-	    # requires an extra version number at the end of .so file names.
-	    # So, the library has to have a name like libtcl75.so.1.0
-
-	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
-	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
-	    TCL_LIB_VERSIONS_OK=nodots
-	    ;;
-	SunOS-5.[0-6]*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    LDFLAGS=""
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	SunOS-5*)
-
-	    # Note: If _REENTRANT isn't defined, then Solaris
-	    # won't define thread-safe library routines.
-
-	    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-	    cat >> confdefs.h <<\EOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-EOF
-
-
-	    SHLIB_CFLAGS="-KPIC"
-	    LDFLAGS=""
-    
-	    # Check to enable 64-bit flags for compiler/linker
-	    if test "$do64bit" = "yes" ; then
-		arch=`isainfo`
-		if test "$arch" = "sparcv9 sparc" ; then
-			if test "$GCC" = "yes" ; then
-			    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
-			else
-			    do64bit_ok=yes
-			    if test "$do64bitVIS" = "yes" ; then
-				EXTRA_CFLAGS="-xarch=v9a"
-			    	LDFLAGS="-xarch=v9a"
-			    else
-				EXTRA_CFLAGS="-xarch=v9"
-			    	LDFLAGS="-xarch=v9"
-			    fi
-			fi
-		else
-		    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
-		fi
-	    fi
-	    
-	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
-	    # symbols when dynamically loaded into tclsh.
-
-	    SHLIB_LD_LIBS='${LIBS}'
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    if test "$GCC" = "yes" ; then
-		SHLIB_LD="$CC -shared"
-		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-	    else
-		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-	    fi
-	    ;;
-	ULTRIX-4.*)
-	    SHLIB_CFLAGS="-G 0"
-	    SHLIB_SUFFIX=".a"
-	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
-	    SHLIB_LD_LIBS='${LIBS}'
-	    DL_OBJS="tclLoadAout.o"
-	    DL_LIBS=""
-	    LDFLAGS="-Wl,-D,08000000"
-	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-	    if test "$GCC" != "yes" ; then
-		EXTRA_CFLAGS="-DHAVE_TZSET -std1"
-	    fi
-	    ;;
-	UNIX_SV* | UnixWare-5*)
-	    SHLIB_CFLAGS="-KPIC"
-	    SHLIB_LD="cc -G"
-	    SHLIB_LD_LIBS=""
-	    SHLIB_SUFFIX=".so"
-	    DL_OBJS="tclLoadDl.o"
-	    DL_LIBS="-ldl"
-	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-	    # that don't grok the -Bexport option.  Test that it does.
-	    hold_ldflags=$LDFLAGS
-	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5191: checking for ld accepts -Bexport flag" >&5
-	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
-	    cat > conftest.$ac_ext <<EOF
-#line 5194 "configure"
-#include "confdefs.h"
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  found=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  found=no
-fi
-rm -f conftest*
-	    LDFLAGS=$hold_ldflags
-	    echo "$ac_t""$found" 1>&6
-	    if test $found = yes; then
-	    LDFLAGS="-Wl,-Bexport"
-	    else
-	    LDFLAGS=""
-	    fi
-	    LD_SEARCH_FLAGS=""
-	    ;;
-    esac
-
-    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    echo "configure: warning: "64bit support being disabled -- don\'t know magic for this platform"" 1>&2
-    fi
-
-    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
-    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
-    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
-    # to determine which of several header files defines the a.out file
-    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
-    # support only a file format that is more or less version-7-compatible. 
-    # In particular,
-    #	- a.out files must begin with `struct exec'.
-    #	- the N_TXTOFF on the `struct exec' must compute the seek address
-    #	  of the text segment
-    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
-    #	  and a_entry fields.
-    # The following compilation should succeed if and only if either sys/exec.h
-    # or a.out.h is usable for the purpose.
-    #
-    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
-    # `struct exec' includes a second header that contains information that
-    # duplicates the v7 fields that are needed.
-
-    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
-	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5247: checking sys/exec.h" >&5
-	cat > conftest.$ac_ext <<EOF
-#line 5249 "configure"
-#include "confdefs.h"
-#include <sys/exec.h>
-int main() {
-
-	    struct exec foo;
-	    unsigned long seek;
-	    int flag;
-#if defined(__mips) || defined(mips)
-	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-	    seek = N_TXTOFF (foo);
-#endif
-	    flag = (foo.a_magic == OMAGIC);
-	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-    
-; return 0; }
-EOF
-if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	echo "$ac_t""$tcl_ok" 1>&6
-	if test $tcl_ok = usable; then
-	    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_H 1
-EOF
-
-	else
-	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5285: checking a.out.h" >&5
-	    cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
-#include "confdefs.h"
-#include <a.out.h>
-int main() {
-
-		struct exec foo;
-		unsigned long seek;
-		int flag;
-#if defined(__mips) || defined(mips)
-		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		seek = N_TXTOFF (foo);
-#endif
-		flag = (foo.a_magic == OMAGIC);
-		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-	    
-; return 0; }
-EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-	    echo "$ac_t""$tcl_ok" 1>&6
-	    if test $tcl_ok = usable; then
-		cat >> confdefs.h <<\EOF
-#define USE_A_OUT_H 1
-EOF
-
-	    else
-		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5323: checking sys/exec_aout.h" >&5
-		cat > conftest.$ac_ext <<EOF
-#line 5325 "configure"
-#include "confdefs.h"
-#include <sys/exec_aout.h>
-int main() {
-
-		    struct exec foo;
-		    unsigned long seek;
-		    int flag;
-#if defined(__mips) || defined(mips)
-		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
-#else
-		    seek = N_TXTOFF (foo);
-#endif
-		    flag = (foo.a_midmag == OMAGIC);
-		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-		
-; return 0; }
-EOF
-if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  tcl_ok=usable
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  tcl_ok=unusable
-fi
-rm -f conftest*
-		echo "$ac_t""$tcl_ok" 1>&6
-		if test $tcl_ok = usable; then
-		    cat >> confdefs.h <<\EOF
-#define USE_SYS_EXEC_AOUT_H 1
-EOF
-
-		else
-		    DL_OBJS=""
-		fi
-	    fi
-	fi
-    fi
-
-    # Step 5: disable dynamic loading if requested via a command-line switch.
-
-    # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
-  enableval="$enable_load"
-  tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-    if test "$tcl_ok" = "no"; then
-	DL_OBJS=""
-    fi
-
-    if test "x$DL_OBJS" != "x" ; then
-	BUILD_DLTEST="\$(DLTEST_TARGETS)"
-    else
-	echo "Can't figure out how to do dynamic loading or shared libraries"
-	echo "on this system."
-	SHLIB_CFLAGS=""
-	SHLIB_LD=""
-	SHLIB_SUFFIX=""
-	DL_OBJS="tclLoadNone.o"
-	DL_LIBS=""
-	LDFLAGS=""
-	LD_SEARCH_FLAGS=""
-	BUILD_DLTEST=""
-    fi
-
-    # If we're running gcc, then change the C flags for compiling shared
-    # libraries to the right flags for gcc, instead of those for the
-    # standard manufacturer compiler.
-
-    if test "$DL_OBJS" != "tclLoadNone.o" ; then
-	if test "$GCC" = "yes" ; then
-	    case $system in
-		AIX-*)
-		    ;;
-		BSD/OS*)
-		    ;;
-		IRIX*)
-		    ;;
-		NetBSD-*|FreeBSD-*|OpenBSD-*)
-		    ;;
-		Rhapsody-*|Darwin-*)
-		    ;;
-		RISCos-*)
-		    ;;
-		SCO_SV-3.2*)
-		    ;;
-		ULTRIX-4.*)
-		    ;;
-		windows)
-		    ;;
-		*)
-		    SHLIB_CFLAGS="-fPIC"
-		    ;;
-	    esac
-	fi
-    fi
-
-    if test "$SHARED_LIB_SUFFIX" = "" ; then
-	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
-    fi
-    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
-	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
-    fi
-
-    
-    
-    
-    
-    
-
-    SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)'
-    
-    
-    
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-    if test x"${TEA_INITED}" = x ; then
-	# Can't refer to exact macro name or it will be substituted
-	{ echo "configure: error: Must call TEA INIT before ENABLE_SYMBOLS" 1>&2; exit 1; }
-    fi
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	tcl_dbgx=d
-    else
-	tcl_dbgx=g
-    fi
-
-    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5467: checking for build with symbols" >&5
-    # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  tcl_ok=$enableval
-else
-  tcl_ok=no
-fi
-
-    if test "$tcl_ok" = "no"; then
-	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-	DBGX=""
-	TCL_DBGX=""
-	echo "$ac_t""no" 1>&6
-    else
-	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
-	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
-	DBGX=${tcl_dbgx}
-	TCL_DBGX=${tcl_dbgx}
-	if test "$tcl_ok" = "yes"; then
-	    echo "$ac_t""yes (standard debugging)" 1>&6
-	fi
-    fi
-
-    
-    
-    
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >> confdefs.h <<\EOF
-#define TCL_MEM_DEBUG 1
-EOF
-
-    fi
-
-    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
-	if test "$tcl_ok" = "all"; then
-	    echo "$ac_t""enabled symbols mem debugging" 1>&6
-	else
-	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "unix" ; then
-	
-    # If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5525: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
-  withval="$with_x"
-  :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
-    # Both variables are already set.
-    have_x=yes
-  else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
-  cd conftestdir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat > Imakefile <<'EOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-        test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case "$ac_im_incroot" in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
-    esac
-    case "$ac_im_usrlibdir" in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
-    esac
-  fi
-  cd ..
-  rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
-    /usr/X11/lib          \
-    /usr/X11R6/lib        \
-    /usr/X11R5/lib        \
-    /usr/X11R4/lib        \
-                          \
-    /usr/lib/X11          \
-    /usr/lib/X11R6        \
-    /usr/lib/X11R5        \
-    /usr/lib/X11R4        \
-                          \
-    /usr/local/X11/lib    \
-    /usr/local/X11R6/lib  \
-    /usr/local/X11R5/lib  \
-    /usr/local/X11R4/lib  \
-                          \
-    /usr/local/lib/X11    \
-    /usr/local/lib/X11R6  \
-    /usr/local/lib/X11R5  \
-    /usr/local/lib/X11R4  \
-                          \
-    /usr/X386/lib         \
-    /usr/x386/lib         \
-    /usr/XFree86/lib/X11  \
-                          \
-    /usr/lib              \
-    /usr/local/lib        \
-    /usr/unsupported/lib  \
-    /usr/athena/lib       \
-    /usr/local/x11r5/lib  \
-    /usr/lpp/Xamples/lib  \
-    /lib/usr/lib/X11	  \
-                          \
-    /usr/openwin/lib      \
-    /usr/openwin/share/lib \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
-  # Didn't find X anywhere.  Cache the known absence of X.
-  ac_cv_have_x="have_x=no"
-else
-  # Record where we found X for the cache.
-  ac_cv_have_x="have_x=yes \
-	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-  fi
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  echo "$ac_t""$have_x" 1>&6
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes \
-		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-    not_really_there=""
-    if test "$no_x" = ""; then
-	if test "$x_includes" = ""; then
-	    cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
-#include "confdefs.h"
-#include <X11/XIntrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  not_really_there="yes"
-fi
-rm -f conftest*
-	else
-	    if test ! -r $x_includes/X11/Intrinsic.h; then
-		not_really_there="yes"
-	    fi
-	fi
-    fi
-    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
-	echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:5783: checking for X11 header files" >&5
-	XINCLUDES="# no special path needed"
-	cat > conftest.$ac_ext <<EOF
-#line 5786 "configure"
-#include "confdefs.h"
-#include <X11/Intrinsic.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  XINCLUDES="nope"
-fi
-rm -f conftest*
-	if test "$XINCLUDES" = nope; then
-	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
-	    for i in $dirs ; do
-		if test -r $i/X11/Intrinsic.h; then
-		    echo "$ac_t""$i" 1>&6
-		    XINCLUDES=" -I$i"
-		    break
-		fi
-	    done
-	fi
-    else
-	if test "$x_includes" != ""; then
-	    XINCLUDES=-I$x_includes
-	else
-	    XINCLUDES="# no special path needed"
-	fi
-    fi
-    if test "$XINCLUDES" = nope; then
-	echo "$ac_t""could not find any!" 1>&6
-	XINCLUDES="# no include files found"
-    fi
-
-    if test "$no_x" = yes; then
-	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5827: checking for X11 libraries" >&5
-	XLIBSW=nope
-	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
-	for i in $dirs ; do
-	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
-		echo "$ac_t""$i" 1>&6
-		XLIBSW="-L$i -lX11"
-		x_libraries="$i"
-		break
-	    fi
-	done
-    else
-	if test "$x_libraries" = ""; then
-	    XLIBSW=-lX11
-	else
-	    XLIBSW="-L$x_libraries -lX11"
-	fi
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5847: checking for XCreateWindow in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lXwindow  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5855 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char XCreateWindow();
-
-int main() {
-XCreateWindow()
-; return 0; }
-EOF
-if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  XLIBSW=-lXwindow
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-    if test "$XLIBSW" = nope ; then
-	echo "$ac_t""could not find any!  Using -lX11." 1>&6
-	XLIBSW=-lX11
-    fi
-    if test x"${XLIBSW}" != x ; then
-	LIBS="${LIBS} ${XLIBSW}"
-    fi
-
-    fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-cat >> confdefs.h <<\EOF
-#define USE_TCL_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TK_STUBS 1
-EOF
-
-cat >> confdefs.h <<\EOF
-#define USE_TKIMG_STUBS 1
-EOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
-	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    else
-	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)_OBJECTS)"
-	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$(PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
-	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(\$(PACKAGE)stub_OBJECTS)"
-    fi
-
-    if test "${SHARED_BUILD}" = "1" ; then
-	MAKE_LIB="${MAKE_SHARED_LIB} "
-    else
-	MAKE_LIB="${MAKE_STATIC_LIB} "
-    fi
-
-    #--------------------------------------------------------------------
-    # Shared libraries and static libraries have different names.
-    # Use the double eval to make sure the ${DBGX} in the suffix is
-    # substituted.
-    #--------------------------------------------------------------------
-
-    if test "${TEA_PLATFORM}" = "windows" ; then
-	if test "${SHARED_BUILD}" = "1" ; then
-	    # We force the unresolved linking of symbols that are really in
-	    # the private libraries of Tcl and Tk.
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    else
-	if test "${SHARED_BUILD}" = "1" ; then
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
-	    if test x"${TK_BIN_DIR}" != x ; then
-		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
-	    fi
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
-	    RANLIB=:
-	else
-	    eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
-	fi
-	# Some packages build there own stubs libraries
-	eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
-    fi
-
-    # These are escaped so that only CFLAGS is picked up at configure time.
-    # The other values will be substituted at make time.
-    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
-    if test "${SHARED_BUILD}" = "1" ; then
-	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
-    fi
-
-    
-    
-    
-    
-
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-
-    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:6014: checking for tclsh" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_tclsh" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_tclsh=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_tclsh" ; then
-	TCLSH_PROG=$ac_cv_path_tclsh
-	echo "$ac_t""$TCLSH_PROG" 1>&6
-    else
-	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-    echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:6046: checking for wish" >&5
-
-    if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-	search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
-	for dir in $search_path ; do
-	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
-		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
-		if test x"$ac_cv_path_wish" = x ; then
-		    if test -f "$j" ; then
-			ac_cv_path_wish=$j
-			break
-		    fi
-		fi
-	    done
-	done
-    
-fi
-
-
-    if test -f "$ac_cv_path_wish" ; then
-	WISH_PROG=$ac_cv_path_wish
-	echo "$ac_t""$WISH_PROG" 1>&6
-    else
-	{ echo "configure: error: No wish found in PATH:  $search_path" 1>&2; exit 1; }
-    fi
-    
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CONFIGDIR@%$CONFIGDIR%g
-s%@PACKAGE@%$PACKAGE%g
-s%@DPACKAGE@%$DPACKAGE%g
-s%@PHIMGTYPE@%$PHIMGTYPE%g
-s%@VERSION@%$VERSION%g
-s%@TKIMGXPM_VERSION@%$TKIMGXPM_VERSION%g
-s%@tkimgxpm_LIB_FILE@%$tkimgxpm_LIB_FILE%g
-s%@CYGPATH@%$CYGPATH%g
-s%@EXEEXT@%$EXEEXT%g
-s%@TCL_VERSION@%$TCL_VERSION%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TK_VERSION@%$TK_VERSION%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-s%@TK_SRC_DIR@%$TK_SRC_DIR%g
-s%@TK_LIB_FILE@%$TK_LIB_FILE%g
-s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
-s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
-s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
-s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
-s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
-s%@TK_LIBS@%$TK_LIBS%g
-s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@CPP@%$CPP%g
-s%@tkimg_VERSION@%$tkimg_VERSION%g
-s%@tkimg_SRC_DIR@%$tkimg_SRC_DIR%g
-s%@tkimg_LIB_FILE@%$tkimg_LIB_FILE%g
-s%@tkimg_LIB_SPEC@%$tkimg_LIB_SPEC%g
-s%@tkimg_STUB_LIB_FILE@%$tkimg_STUB_LIB_FILE%g
-s%@tkimg_STUB_LIB_SPEC@%$tkimg_STUB_LIB_SPEC%g
-s%@tkimg_STUB_LIB_PATH@%$tkimg_STUB_LIB_PATH%g
-s%@tkimg_SRC_PATH@%$tkimg_SRC_PATH%g
-s%@tkimg_BUILD_PATH@%$tkimg_BUILD_PATH%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g
-s%@TCL_THREADS@%$TCL_THREADS%g
-s%@SHARED_BUILD@%$SHARED_BUILD%g
-s%@AR@%$AR%g
-s%@DL_LIBS@%$DL_LIBS%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
-s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
-s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
-s%@MAKE_LIB@%$MAKE_LIB%g
-s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
-s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
-s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/xpm/configure.in b/tkimg1.3/xpm/configure.in
deleted file mode 100644
index 9dc9a51..0000000
--- a/tkimg1.3/xpm/configure.in
+++ /dev/null
@@ -1,225 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-AC_REVISION($Id: configure.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $)
-
-#--------------------------------------------------------------------
-# Configure script for package 'tkimgxpm', as distributed at November 20, 2001.
-# TEA compliant.
-#--------------------------------------------------------------------
-
-#--------------------------------------------------------------------
-# This very first macro is used to verify that the configure script can 
-# find the sources.  The argument to AC_INIT is a unique filename for
-# this package.
-#--------------------------------------------------------------------
-
-AC_INIT(./xpm.c)
-
-AC_CONFIG_AUX_DIR(../tclconfig)
-CONFIGDIR=${srcdir}/../tclconfig
-AC_SUBST(CONFIGDIR)
-
-#--------------------------------------------------------------------
-# Setting our package name and version numbers.  The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows).  The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=tkimgxpm
-DPACKAGE="img::xpm"
-PHIMGTYPE="xpm"
-
-MAJOR_VERSION=1
-MINOR_VERSION=3
-PATCHLEVEL=
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
-TKIMGXPM_VERSION=${VERSION}
-
-AC_SUBST(PACKAGE)
-AC_SUBST(DPACKAGE)
-AC_SUBST(PHIMGTYPE)
-AC_SUBST(VERSION)
-AC_SUBST(TKIMGXPM_VERSION)
-
-# This package name must be replaced statically for AC_SUBST to work
-# Substitute stub_LIB_FILE if your package creates a stub library too.
-AC_SUBST(tkimgxpm_LIB_FILE)
-#AC_SUBST(tkimgxpmstub_LIB_FILE)
-
-#--------------------------------------------------------------------
-# This was placed here so that we can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-eval AC_DEFINE_UNQUOTED(TKIMGXPM_VERSION, "${TKIMGXPM_VERSION}")
-
-#--------------------------------------------------------------------
-# Call TEA_INIT as the first TEA_ macro to set up initial vars.
-# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
-#--------------------------------------------------------------------
-
-TEA_INIT
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-TEA_PATH_TCLCONFIG
-TEA_LOAD_TCLCONFIG
-
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
-
-#-----------------------------------------------------------------------
-# Handle the --prefix=... option by defaulting to what Tcl gave.
-# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
-#-----------------------------------------------------------------------
-
-TEA_PREFIX
-
-#-----------------------------------------------------------------------
-# Standard compiler checks.
-# This sets up CC by using the CC env var, or looks for gcc otherwise.
-# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
-# the basic setup necessary to compile executables.
-#-----------------------------------------------------------------------
-
-TEA_SETUP_COMPILER
-
-TEA_PATH_CONFIG(tkimg)
-TEA_LOAD_CONFIG(tkimg)
-IMG_SRCPATH(tkimg)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Choose which headers you need.  Extension authors should try very
-# hard to only rely on the Tcl public header files.  Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-TEA_PUBLIC_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# We have to define a special symbol for Windows (BUILD_tkimgxpm in this
-# case) so that we create the export library with the dll.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# We can add more files to clean if our extension creates any extra
-# files in the future.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-    AC_DEFINE(BUILD_tkimgxpm)
-    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch init.c"
-    EXTRA_SOURCES='$(WIN_SOURCES)'
-else
-    CLEANFILES="init.c"
-    EXTRA_SOURCES='$(UNIX_SOURCES)'
-fi
-AC_SUBST(CLEANFILES)
-AC_SUBST(EXTRA_SOURCES)
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_THREADS
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SHARED
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-TEA_CONFIG_CFLAGS
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-TEA_ENABLE_SYMBOLS
-
-#--------------------------------------------------------------------
-# For Unix/Tk builds, make sure that the X libraries/headers are found.
-# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
-#--------------------------------------------------------------------
-
-TEA_PATH_X
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-AC_DEFINE(USE_TCL_STUBS)
-AC_DEFINE(USE_TK_STUBS)
-AC_DEFINE(USE_TKIMG_STUBS)
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-TEA_MAKE_LIB
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
-else
-    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
-fi
-
-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
-
-#--------------------------------------------------------------------
-# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
-# file during the install process.  Don't run the TCLSH_PROG through
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-# Add WISH as well if this is a Tk extension.
-#--------------------------------------------------------------------
-
-TEA_PROG_TCLSH
-TEA_PROG_WISH
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-AC_OUTPUT([Makefile pkgIndex.tcl])
-
-#--------------------------------------------------------------------
diff --git a/tkimg1.3/xpm/pkgIndex.tcl.in b/tkimg1.3/xpm/pkgIndex.tcl.in
deleted file mode 100644
index 5dd3c0e..0000000
--- a/tkimg1.3/xpm/pkgIndex.tcl.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# Tcl package index file - handcrafted
-#
-# $Id: pkgIndex.tcl.in,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-package ifneeded "@DPACKAGE@" @VERSION@ [list load [file join $dir @tkimgxpm_LIB_FILE@]]
diff --git a/tkimg1.3/xpm/readme b/tkimg1.3/xpm/readme
deleted file mode 100644
index 6749d42..0000000
--- a/tkimg1.3/xpm/readme
+++ /dev/null
@@ -1,2 +0,0 @@
-
-No notes.
diff --git a/tkimg1.3/xpm/tests/all.tcl b/tkimg1.3/xpm/tests/all.tcl
deleted file mode 100644
index 2cd7ffd..0000000
--- a/tkimg1.3/xpm/tests/all.tcl
+++ /dev/null
@@ -1,24 +0,0 @@
-# all.tcl -- -*- tcl -*-
-#
-# Import common functionality, then run the tests in this directory.
-#
-# Copyright (c) 2002         Andreas Kupries <andreas_kupries at users.sourceforge.net>
-# All rights reserved.
-# 
-# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
-
-set _pwd  [pwd]
-cd  [file dirname [file join [pwd] [info script]]]
-set _here [pwd]
-cd $_pwd
-source [file join [file dirname [file dirname $_here]] tests all.tcl]
-unset _pwd _here
-
-set ::tcltest::testSingleFile false
-set ::tcltest::testsDirectory [file dirname [info script]]
-
-# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
-
-run_tests
-return
diff --git a/tkimg1.3/xpm/tests/folder.xpm b/tkimg1.3/xpm/tests/folder.xpm
deleted file mode 100644
index 44ba7ae..0000000
--- a/tkimg1.3/xpm/tests/folder.xpm
+++ /dev/null
@@ -1,18 +0,0 @@
-/* XPM */
-static char * folder[] = {
-"16 12 3 1",
-"  s None c None",
-". c #000000",
-"# c #f0ff80",
-"   ....         ",
-"  .####.        ",
-" .######.       ",
-".............   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".............   "};
\ No newline at end of file
diff --git a/tkimg1.3/xpm/tests/xpm.test b/tkimg1.3/xpm/tests/xpm.test
deleted file mode 100644
index c458e89..0000000
--- a/tkimg1.3/xpm/tests/xpm.test
+++ /dev/null
@@ -1,46 +0,0 @@
-# This file is a Tcl script to test out GIF reading and writing.
-# It is organized in the standard fashion for Tcl tests.
-#
-
-puts "img::xpm [package require img::xpm]"
-
-set xpmdata \
-{/* XPM */
-static char * InlineData[] = {
-"16 12 3 1",
-"  s None c None",
-". c #000000",
-"# c #f0ff80",
-"   ....         ",
-"  .####.        ",
-" .######.       ",
-".............   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".###########.   ",
-".............   "};}
-
-test xpm-1.1 {} {
-    catch {image delete i}
-    image create photo i -file [file join $tcltest::testsDirectory folder.xpm]
-    i data -format xpm
-} $xpmdata
-test xpm-1.2 {} {
-    catch {image delete i}
-    image create photo i -data $xpmdata
-    set data [i data -format xpm]
-} $xpmdata
-test xpm-1.3 {} {
-    i blank
-    i put $data
-    set data [i data -format xpm]
-} $xpmdata
-test xpm-1.4 {} {
-    i blank
-    i put $data -format xpm
-    set data [i data -format xpm]
-} $xpmdata
diff --git a/tkimg1.3/xpm/xpm.c b/tkimg1.3/xpm/xpm.c
deleted file mode 100644
index 5590bd6..0000000
--- a/tkimg1.3/xpm/xpm.c
+++ /dev/null
@@ -1,1060 +0,0 @@
-/*
- * xpm.c --
- *
- *	A photo image file handler for XPM files.
- *
- * Written by:
- *	Jan Nijtmans
- *	CMG Oost-Nederland B.V.
- *	email: j.nijtmans at chello.nl (private)
- *	       jan.nijtmans at cmg.nl (work)
- *	url:   http://purl.oclc.org/net/nijtmans/
- *
- * (with some code stolen from the XPM image type and the GIF handler)
- *
- * <mweilguni at sime.com> Mario Weilguni
- * Jan 1997:
- *      - fixed a bug when reading images with invalid color tables 
- *        (if a pixelchar is not in the colormap)
- *      - added FileWriteXPM, StringWriteXPM and WriteXPM.
- *      - modified FileReadXPM, ReadXPM and added StringReadXPM
- *        This makes the XPM reader complete :-)
- *
- * <paul at poSoft.de> Paul Obermeier
- * Jan 2001:
- *      - Bugfix  in CommonWriteXPM: const char *fileName was overwritten.
- *      - Bugfix  in CommonWriteXPM: If used with "-from" option, dumped core.
- *      - Improve in CommonWriteXPM: Greater channel buffersize for better
- *                                   Win98 (i.e. FAT32) performance. 
- *      - Improve in ChnRead: Better performance by using ReadBuffer.
- *
- * $Id: xpm.c,v 1.1.1.1 2007/01/03 20:47:12 joye Exp $
- */
-
-/*
- * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
- */
-
-#include "init.c"
-
-
-#if defined(__WIN32__) && !defined(__GNUC__)
-#define strncasecmp strnicmp
-#else
-extern VOID *	memcpy _ANSI_ARGS_((VOID *s1, CONST VOID *s2,
-			    size_t nChars));
-#endif
-
-#ifndef MAC_TCL
-#include <sys/types.h>
-#endif
-
-extern char *	strchr _ANSI_ARGS_((CONST char *string, int c));
-extern char *	strcpy _ANSI_ARGS_((char *s1, CONST char *s2));
-extern size_t	strlen _ANSI_ARGS_((CONST char *string));
-extern int	strncasecmp _ANSI_ARGS_((CONST char *s1,
-			    CONST char *s2, size_t n));
-extern int	strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
-			    size_t nChars));
-extern char *	strrchr _ANSI_ARGS_((CONST char *string, int c));
-extern char *	strstr _ANSI_ARGS_((CONST char *string,
-			    CONST char *substring));
-
-/* constants used only in this file */
-
-#define XPM_MONO		1
-#define XPM_GRAY_4		2
-#define XPM_GRAY		3
-#define XPM_COLOR		4
-#define XPM_SYMBOLIC		5
-#define XPM_UNKNOWN		6
-
-#define MAX_BUFFER 4096
-
-/*
- * Prototypes for local procedures defined in this file:
- */
-
-static int	CommonRead _ANSI_ARGS_((Tcl_Interp *interp, tkimg_MFile *handle,
-		    Tcl_Obj *format, Tk_PhotoHandle imageHandle,
-		    int destX, int destY, int width, int height,
-		    int srcX, int srcY));
-static int	CommonWrite _ANSI_ARGS_((Tcl_Interp *interp, CONST char *fileName,
-		    Tcl_DString *dataPtr, Tcl_Obj *format,
-		    Tk_PhotoImageBlock *blockPtr));
-
-static int	ReadXPMFileHeader _ANSI_ARGS_((tkimg_MFile *handle,
-		int *widthPtr, int *heightPtr, int *numColors, int *byteSize));
-static char *	GetType _ANSI_ARGS_((char *colorDefn, int *type_ret));
-static char *	GetColor _ANSI_ARGS_((char *colorDefn, char *colorName, int *type_ret));
-static char *	Gets _ANSI_ARGS_((tkimg_MFile *handle, char *buffer, int size));
-
-/*
- *----------------------------------------------------------------------
- * Gets
- *
- *      Allows other routines to get their data from channels, files as well
- *      as Tcl_DStrings.
- *
- * Results:
- *      same as fgets: NULL pointer on any error, otherwise
- *      it returns buffer
- *
- * Side effects:
- *      The access position of the file changes OR
- *      The access pointer dataPtr->p is changed
- *
- *----------------------------------------------------------------------
- */
-
-static char *
-Gets(handle, buffer, size)
-    tkimg_MFile *handle;
-    char *buffer;
-    int size;
-{
-    char *p;
-
-    /* read data from tkimg_MFile */
-    p = buffer;
-    while ((tkimg_Read(handle, p, 1) == 1)) {
-	if (--size <= 0) {
-	    *p = 0; return buffer;
-	}
-	if (*p++ == '\n') {
-	    *p = 0;
-	    return buffer;
-	}
-    }
-    *p = 0;
-    return (p != buffer) ? buffer :(char *) NULL;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a datastring contains image data in XPM format.
- *
- * Results:
- *	The return value is >0 if the first characters in data look
- *	like XPM data, and 0 otherwise.
- *
- * Side effects:
- *	none
- *
- *----------------------------------------------------------------------
- */
-static int
-ObjMatch(interp, data, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Obj *data;		/* The data supplied by the image */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw XPM file. */
-{
-    int numColors, byteSize;
-    tkimg_MFile handle;
-
-    tkimg_FixObjMatchProc(&interp, &data, &format, &widthPtr, &heightPtr);
-
-    handle.data = tkimg_GetStringFromObj(data, &handle.length);
-    handle.state = IMG_STRING;
-
-    return ReadXPMFileHeader(&handle, widthPtr, heightPtr, &numColors, &byteSize);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnMatch --
- *
- *	This procedure is invoked by the photo image type to see if
- *	a file contains image data in XPM format.
- *
- * Results:
- *	The return value is >0 if the first characters in channel "chan"
- *	look like XPM data, and 0 otherwise.
- *
- * Side effects:
- *	The access position in chan may change.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnMatch(interp, chan, fileName, format, widthPtr, heightPtr)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here if the file is a valid
-				 * raw XPM file. */
-{
-    int numColors, byteSize;
-    tkimg_MFile handle;
-
-    tkimg_FixChanMatchProc(&interp, &chan, &fileName, &format, &widthPtr, &heightPtr);
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    return ReadXPMFileHeader(&handle, widthPtr, heightPtr, &numColors, &byteSize);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonRead --
- *
- *	This procedure is called by the photo image type to read
- *	XPM format data from a file or string and write it into a
- *	given photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	The access position in file f is changed (if read from file)
- *	and new data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-typedef struct myblock {
-    Tk_PhotoImageBlock ck;
-    int dummy; /* extra space for offset[3], if not included already
-		  in Tk_PhotoImageBlock */
-} myblock;
-
-#define block bl.ck
-
-static int
-CommonRead(interp, handle, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    tkimg_MFile *handle;	/* The image channel, open for reading. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    int fileWidth = 0, fileHeight = 0, numColors = 0, byteSize = 0;
-    int h, type;
-    int nchan, matte = 1;
-    unsigned char *pixelPtr;
-    myblock bl;
-    Tcl_HashTable colorTable;
-    Tk_Window tkwin = Tk_MainWindow(interp);
-    Display *display = Tk_Display(tkwin);
-    Colormap colormap = Tk_Colormap(tkwin);
-    int depth = Tk_Depth(tkwin);
-    char *p;
-    char buffer[MAX_BUFFER];
-    int i, isMono;
-    int color1;
-    unsigned int data;
-    Tcl_HashEntry *hPtr;
-
-    Tcl_InitHashTable(&colorTable, TCL_ONE_WORD_KEYS);
-
-    switch ((Tk_Visual(tkwin))->class) {
-      case StaticGray:
-      case GrayScale:
-	isMono = 1;
-	break;
-      default:
-	isMono = 0;
-    }
-
-    type = ReadXPMFileHeader(handle, &fileWidth, &fileHeight, &numColors, &byteSize);
-    if (type == 0) {
-	Tcl_AppendResult(interp, "couldn't read raw XPM header", NULL);
-	return TCL_ERROR;
-    }
-    if ((fileWidth <= 0) || (fileHeight <= 0)) {
-	Tcl_AppendResult(interp, "XPM image file has dimension(s) <= 0",
-		(char *) NULL);
-	return TCL_ERROR;
-    }
-    if ((byteSize < 1) || (byteSize > 4)) {
-	Tcl_AppendResult(interp, "XPM image file has invalid byte size ",
-		"(should be 1, 2, 3 or 4)", (char *) NULL);
-	return TCL_ERROR;
-    }
-
-    if ((srcX + width) > fileWidth) {
-	width = fileWidth - srcX;
-    }
-    if ((srcY + height) > fileHeight) {
-	height = fileHeight - srcY;
-    }
-    if ((width <= 0) || (height <= 0)
-	|| (srcX >= fileWidth) || (srcY >= fileHeight)) {
-	return TCL_OK;
-    }
-
-    for (i=0; i<numColors; i++) {
-	char * colorDefn;		/* the color definition line */
-	char * colorName;		/* temp place to hold the color name
-					 * defined for one type of visual */
-	char * useName;			/* the color name used for this
-					 * color. If there are many names
-					 * defined, choose the name that is
-					 * "best" for the target visual
-					 */
-	XColor color;
-	int found;
-
-	p = Gets(handle, buffer,MAX_BUFFER);
-	while (((p = strchr(p,'\"')) == NULL)) {
-	    p = Gets(handle, buffer,MAX_BUFFER);
-	    if (p == NULL) {
-		return TCL_ERROR;
-	    }
-	    p = buffer;
-	}
-	colorDefn = p + byteSize + 1;
-	colorName = (char*)ckalloc(strlen(colorDefn)+1);
-	useName   = (char*)ckalloc(strlen(colorDefn)+1);
-	found     = 0;
-	color1 = 0;
-	data = 0;
-
-	while (colorDefn && *colorDefn) {
-	    int type;
-
-	    if ((colorDefn=GetColor(colorDefn, colorName, &type)) == NULL) {
-		break;
-	    }
-	    if (colorName[0] == '\0') {
-		continue;
-	    }
-
-	    switch (type) {
-	      case XPM_MONO:
-		if (isMono && depth == 1) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_GRAY_4:
-		if (isMono && depth == 4) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_GRAY:
-		if (isMono && depth > 4) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	      case XPM_COLOR:
-		if (!isMono) {
-		    strcpy(useName, colorName);
-		    found = 1; goto gotcolor;
-		}
-		break;
-	    }
-	    if (type != XPM_SYMBOLIC && type != XPM_UNKNOWN) {
-		if (!found) {			/* use this color as default */
-		    strcpy(useName, colorName);
-		    found = 1;
-		}
-	    }
-	}
-
-      gotcolor:
-
-	memcpy(&color1, p+1, byteSize);
-	p = useName;
-	while ((*p != 0) && (*p != '"') && (*p != ' ') && (*p != '\t')) {
-	    p++;
-	}
-	*p = 0;
-
-	data = 0;
-	if (strncasecmp(useName, "none",4)) {
-	  if (XParseColor(display, colormap, useName, &color) == 0) {
-	    color.red = color.green = color.blue = 0;
-	  }
-	  ((unsigned char *) &data)[0] = color.red>>8;
-	  ((unsigned char *) &data)[1] = color.green>>8;
-	  ((unsigned char *) &data)[2] = color.blue>>8;
-	  ((unsigned char *) &data)[3] = 255;
-	}
-
-	hPtr = Tcl_CreateHashEntry(&colorTable, (char *) color1, &found);
-	Tcl_SetHashValue(hPtr, (char *) data);
-
-	ckfree(colorName);
-	ckfree(useName);
-    }
-
-    Tk_PhotoGetImage(imageHandle, &block);
-
-    nchan = block.pixelSize;
-    block.pitch = nchan * fileWidth;
-    block.width = width;
-    block.height = 1;
-    block.offset[0] = 0;
-    block.offset[1] = 1;
-    block.offset[2] = 2;
-    block.offset[3] = (nchan == 4 && matte? 3: 0);
-    block.pixelPtr = (unsigned char *) ckalloc((unsigned) nchan * width);
-
-    tkimg_PhotoExpand(imageHandle, interp, destX + width, destY + height);
-
-    i = srcY;
-    while (i-- > 0) {
-	p = Gets(handle, buffer,MAX_BUFFER);
-	while (((p = strchr(p,'\"')) == NULL)) {
-	    p = Gets(handle, buffer,MAX_BUFFER);
-	    if (p == NULL) {
-		return TCL_ERROR;
-	    }
-	    p = buffer;
-	}
-    }
-
-
-    for (h = height; h > 0; h--) {
-	p = Gets(handle, buffer,MAX_BUFFER);
-	while (((p = strchr(p,'\"')) == NULL)) {
-	    p = Gets(handle, buffer,MAX_BUFFER);
-	    if (p == NULL) {
-		return TCL_ERROR;
-	    }
-	    p = buffer;
-	}
-	p += byteSize * srcX + 1;
-	pixelPtr = block.pixelPtr;
-	
-	for (i = 0; i < width; ) {
-	    unsigned int col;
-
-	    memcpy((char *) &color1, p, byteSize);
-	    hPtr = Tcl_FindHashEntry(&colorTable, (char *) color1);
-
-	    /* 
-	     * if hPtr == NULL, we have an invalid color entry in the XPM 
-	     * file. We use transparant as default color
-	     */
-	    if (hPtr != (Tcl_HashEntry *)NULL) 
-	        col = (int)Tcl_GetHashValue(hPtr);
-	    else 
-	        col = (int)0;
-	    
-	    /*
-	     * we've found a non-transparent pixel, let's search the next
-	     * transparent pixel and copy this block to the image
-	     */
-	    if (col) {
-	        int len = 0, j;
-		
-		j = i;
-		pixelPtr = block.pixelPtr;
-		do {
-		    memcpy(pixelPtr, &col, block.pixelSize);
-		    pixelPtr += block.pixelSize;
-		    i++;
-		    len++;
-		    p += byteSize;
-		    
-		    if (i < width) {
-		        memcpy((char *) &color1, p, byteSize);
-			hPtr = Tcl_FindHashEntry(&colorTable, (char *) color1);
-			if (hPtr != (Tcl_HashEntry *)NULL) 
-			    col = (int)Tcl_GetHashValue(hPtr);
-			else 
-			    col = (int)0;
-		    }
-		} while ((i < width) && col);
-		tkimg_PhotoPutBlockTk(interp, imageHandle, &block, destX+j, destY, len, 1);
-	    } else {
-	        p += byteSize;
-	        i++;
-	    }
-	}
-	destY++;
-    }
-
-    Tcl_DeleteHashTable(&colorTable);
-
-    ckfree((char *) block.pixelPtr);
-    return TCL_OK;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnRead --
- *
- *	This procedure is called by the photo image type to read
- *	XPM format data from a channel and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	The access position in channel chan is changed, and new
- *	data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ChnRead(interp, chan, fileName, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Channel chan;		/* The image channel, open for reading. */
-    CONST char *fileName;	/* The name of the image file. */
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-    int retVal;
-
-    handle.data = (char *) chan;
-    handle.state = IMG_CHAN;
-
-    tkimg_ReadBuffer (1);
-    retVal = CommonRead (interp, &handle, format, imageHandle,
-		         destX, destY, width, height, srcX, srcY);
-    tkimg_ReadBuffer (0);
-    return retVal;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ObjRead --
- *
- *	This procedure is called by the photo image type to read
- *	XPM format data from a string and write it into a given
- *	photo image.
- *
- * Results:
- *	A standard TCL completion code.  If TCL_ERROR is returned
- *	then an error message is left in interp->result.
- *
- * Side effects:
- *	New data is added to the image given by imageHandle.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ObjRead(interp, data, format, imageHandle, destX, destY,
-	width, height, srcX, srcY)
-    Tcl_Interp *interp;		/* Interpreter to use for reporting errors. */
-    Tcl_Obj *data;
-    Tcl_Obj *format;		/* User-specified format object, or NULL. */
-    Tk_PhotoHandle imageHandle;	/* The photo image to write into. */
-    int destX, destY;		/* Coordinates of top-left pixel in
-				 * photo image to be written to. */
-    int width, height;		/* Dimensions of block of photo image to
-				 * be written to. */
-    int srcX, srcY;		/* Coordinates of top-left pixel to be used
-				 * in image being read. */
-{
-    tkimg_MFile handle;
-
-    handle.data = tkimg_GetStringFromObj(data, &handle.length);
-    handle.state = IMG_STRING;
-
-    return CommonRead(interp, &handle, format, imageHandle,
-	    destX, destY, width, height, srcX, srcY);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ReadXPMFileHeader --
- *
- *	This procedure reads the XPM header from the beginning of a
- *	XPM file and returns information from the header.
- *
- * Results:
- *	The return value is 1 if file "f" appears to start with a valid
- *      XPM header, and 0 otherwise.  If the header is valid,
- *	then *widthPtr and *heightPtr are modified to hold the
- *	dimensions of the image and *numColors holds the number of
- *	colors and byteSize the number of bytes used for 1 pixel.
- *
- * Side effects:
- *	The access position in f advances.
- *
- *----------------------------------------------------------------------
- */
-
-#define UCHAR(c) ((unsigned char) (c))
-
-static int
-ReadXPMFileHeader(handle, widthPtr, heightPtr, numColors, byteSize)
-    tkimg_MFile *handle;		/* handle to read the header from */
-    int *widthPtr, *heightPtr;	/* The dimensions of the image are
-				 * returned here. */
-    int *numColors;		/* the number of colors is returned here */
-    int *byteSize;		/* number of bytes per pixel */
-{
-    char buffer[MAX_BUFFER];
-    char *p;
-
-    p = Gets(handle, buffer,MAX_BUFFER);
-    if (p == NULL) {
-	return 0;
-    }
-    p = buffer;
-    while (*p && isspace(UCHAR(*p))) {
-	p++;
-    }
-    if (strncmp("/* XPM", p, 6) != 0) {
-	return 0;
-    }
-    while ((p = strchr(p,'{')) == NULL) {
-	p = Gets(handle, buffer,MAX_BUFFER);
-	if (p == NULL) {
-	    return 0;
-	}
-	p = buffer;
-    }
-    while ((p = strchr(p,'"')) == NULL) {
-	p = Gets(handle, buffer,MAX_BUFFER);
-	if (p == NULL) {
-	    return 0;
-	}
-	p = buffer;
-    }
-    p++;
-    while (p && *p && isspace(UCHAR(*p))) {
-	p++;
-    }
-    *widthPtr = strtoul(p, &p, 0);
-    if (p == NULL || *widthPtr <= 0) {
-	return 0;
-    }
-    while (p && *p && isspace(UCHAR(*p))) {
-	p++;
-    }
-    *heightPtr = strtoul(p, &p, 0);
-    if (p == NULL || *heightPtr <= 0) {
-	return 0;
-    }
-    while (p && *p && isspace(UCHAR(*p))) {
-	p++;
-    }
-    *numColors = strtoul(p, &p, 0);
-    if (p == NULL) {
-	return 0;
-    }
-    while (p && *p && isspace(UCHAR(*p))) {
-	p++;
-    }
-    *byteSize = strtoul(p, &p, 0);
-    if (p == NULL) {
-	return 0;
-    }
-    return 1;
-}
-
-static char * GetType(colorDefn, type_ret)
-    char * colorDefn;
-    int  * type_ret;
-{
-    char * p = colorDefn;
-
-    /* skip white spaces */
-    while (*p && isspace(UCHAR(*p))) {
-	p ++;
-    }
-
-    /* parse the type */
-    if (p[0] != '\0' && p[0] == 'm' &&
-	p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_MONO;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 'g' &&
-	     p[1] != '\0' && p[1] == '4' &&
-	     p[2] != '\0' && isspace(UCHAR(p[2]))) {
-	*type_ret = XPM_GRAY_4;
-	p += 3;
-    }
-    else if (p[0] != '\0' && p[0] == 'g' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_GRAY;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 'c' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_COLOR;
-	p += 2;
-    }
-    else if (p[0] != '\0' && p[0] == 's' &&
-	     p[1] != '\0' && isspace(UCHAR(p[1]))) {
-	*type_ret = XPM_SYMBOLIC;
-	p += 2;
-    }
-    else {
-	*type_ret = XPM_UNKNOWN;
-	return NULL;
-    }
-
-    return p;
-}
-
-/* colorName is guaranteed to be big enough */
-static char * GetColor(colorDefn, colorName, type_ret)
-    char * colorDefn;
-    char * colorName;		/* if found, name is copied to this array */
-    int  * type_ret;
-{
-    int type;
-    char * p;
-
-    if (!colorDefn) {
-	return NULL;
-    }
-
-    if ((colorDefn = GetType(colorDefn, &type)) == NULL) {
-	/* unknown type */
-	return NULL;
-    }
-    else {
-	*type_ret = type;
-    }
-
-    /* skip white spaces */
-    while (*colorDefn && isspace(UCHAR(*colorDefn))) {
-	colorDefn ++;
-    }
-
-    p = colorName;
-
-    while (1) {
-	int dummy;
-
-	while (*colorDefn && !isspace(UCHAR(*colorDefn))) {
-	    *p++ = *colorDefn++;
-	}
-
-	if (!*colorDefn) {
-	    break;
-	}
-
-	if (GetType(colorDefn, &dummy) == NULL) {
-	    /* the next string should also be considered as a part of a color
-	     * name */
-	    
-	    while (*colorDefn && isspace(UCHAR(*colorDefn))) {
-		*p++ = *colorDefn++;
-	    }
-	} else {
-	    break;
-	}
-	if (!*colorDefn) {
-	    break;
-	}
-    }
-
-    /* Mark the end of the colorName */
-    *p = '\0';
-
-    return colorDefn;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * ChnWrite
- *
- *	Writes a XPM image to a file. Just calls CommonWrite
- *      with appropriate arguments.
- *
- * Results:
- *	Returns the return value of CommonWrite
- *
- * Side effects:
- *	A file is (hopefully) created on success.
- *
- *----------------------------------------------------------------------
- */
-static int
-ChnWrite(interp, fileName, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    return CommonWrite(interp, fileName, (Tcl_DString *)NULL, format, blockPtr);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * StringWrite
- *
- *	Writes a XPM image to a string. Just calls CommonWrite
- *      with appropriate arguments.
- *
- * Results:
- *	Returns the return value of CommonWrite
- *
- * Side effects:
- *	The Tcl_DString dataPtr is modified on success.
- *
- *----------------------------------------------------------------------
- */
-static int	        
-StringWrite(interp, dataPtr, format, blockPtr) 
-    Tcl_Interp *interp;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int result;
-    Tcl_DString data;
-    tkimg_FixStringWriteProc(&data, &interp, &dataPtr, &format, &blockPtr);
-    result = CommonWrite(interp, "InlineData", dataPtr, format, blockPtr);
-    if ((result == TCL_OK) && (dataPtr == &data)) {
-	Tcl_DStringResult(interp, dataPtr);
-    }
-    return result;
-}
-
-
-/*
- * Yes, I know these macros are dangerous. But it should work fine
- */
-#define WRITE(buf) { if (!dataPtr) Tcl_Write(chan, buf, -1); else Tcl_DStringAppend(dataPtr, buf, -1);}
-
-/*
- *----------------------------------------------------------------------
- *
- * CommonWrite
- *
- *	This procedure writes a XPM image to the file filename 
- *      (if filename != NULL) or to dataPtr.
- *
- * Results:
- *	Returns TCL_OK on success, or TCL_ERROR on error.
- *      Possible failures are:
- *      1. cannot access file (permissions or path not found)
- *      2. TkPhotoGetMask fails to retrieve the region mask
- *         for the image (should not happen)
- *
- * Side effects:
- *	varies (see StringWrite and ChnWrite)
- *
- *----------------------------------------------------------------------
- */
-static int
-CommonWrite(interp, fileName, dataPtr, format, blockPtr)
-    Tcl_Interp *interp;
-    CONST char *fileName;
-    Tcl_DString *dataPtr;
-    Tcl_Obj *format;    
-    Tk_PhotoImageBlock *blockPtr;
-{
-    int x, y, i;
-    int found;
-    Tcl_Channel chan = (Tcl_Channel) NULL;
-    Tcl_HashTable colors;
-    Tcl_HashEntry *entry;
-    Tcl_HashSearch search;
-    unsigned char *pp;
-    unsigned char *pixelPtr, *rowPixPtr;
-    int ncolors, chars_per_pixel;
-    int greenOffset, blueOffset, alphaOffset;
-    union {
-	ClientData value;
-	char component[3];
-    } col;
-    union {
-	ClientData value;
-	char component[5];
-    } temp;
-    char buffer[256], *p, *imgName;
-
-    /*
-     * xpm_chars[] must be 64 chars long
-     */
-    static char xpm_chars[] =
-	    ".#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-
-    greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
-    blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-    alphaOffset = blockPtr->offset[0];
-    if (alphaOffset < blockPtr->offset[1]) alphaOffset = blockPtr->offset[1];
-    if (alphaOffset < blockPtr->offset[2]) alphaOffset = blockPtr->offset[2];
-    if (++alphaOffset < blockPtr->pixelSize) {
-	alphaOffset -= blockPtr->offset[0];
-    } else {
-	alphaOffset = 0;
-    }
-
-    /* open the output file (if needed) */
-    if (!dataPtr) {
-      chan = Tcl_OpenFileChannel(interp, (char *) fileName, "w", 0644);
-      if (!chan) {
-	return TCL_ERROR;
-      }
-      if (Tcl_SetChannelOption (interp, chan, "-buffersize", "131072") != TCL_OK) {
-        Tcl_Close(interp, chan);
-        return TCL_ERROR;
-      }
-    }
-
-    /* compute image name */
-
-    imgName = (char*)ckalloc(strlen(fileName)+1);
-    memcpy (imgName, fileName, strlen(fileName)+1);
-    p = strrchr(imgName, '/');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strrchr(imgName, '\\');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strrchr(imgName, ':');
-    if (p) {
-	imgName = p+1;
-    }
-    p = strchr(imgName, '.');
-    if (p) {
-	*p = 0;
-    }
-    sprintf(buffer, "/* XPM */\nstatic char * %s[] = {\n", imgName);
-    WRITE(buffer);
-
-    /*
-     * Compute size of colortable
-     */
-    Tcl_InitHashTable(&colors, TCL_ONE_WORD_KEYS);
-    ncolors = 0;
-    col.value = 0;
-    for (y = 0; y < blockPtr->height; y++) {
-	pp = blockPtr->pixelPtr + y * blockPtr->pitch + blockPtr->offset[0];
-	for (x = blockPtr->width; x >0; x--) {
-	    if (!alphaOffset || pp[alphaOffset]) {
-		col.component[0] = pp[0];
-		col.component[1] = pp[greenOffset];
-		col.component[2] = pp[blueOffset];
-		if (Tcl_FindHashEntry(&colors, (char *) col.value) == NULL) {
-		    ncolors++;
-		    entry = Tcl_CreateHashEntry(&colors, (char *) col.value,
-		    	    &found);
-		}
-	    }
-	    pp += blockPtr->pixelSize;
-	}
-    }
-
-    /* compute number of characters per pixel */
-    chars_per_pixel = 1;
-    i = ncolors;
-    while(i > 64) {
-	chars_per_pixel++;
-	i /= 64;
-    }
-
-    /* write image info into XPM */
-    sprintf(buffer, "\"%d %d %d %d\",\n", blockPtr->width, blockPtr->height,
-	    ncolors+(alphaOffset != 0), chars_per_pixel);
-    WRITE(buffer);
-
-    /* write transparent color id if transparency is available*/
-    if (alphaOffset) {
-	strcpy(temp.component, "    ");
-	temp.component[chars_per_pixel] = 0;
- 	sprintf(buffer, "\"%s s None c None\",\n", temp.component);
-	WRITE(buffer);
-    }
-
-    /* write colormap strings */
-    entry = Tcl_FirstHashEntry(&colors, &search); 
-    y = 0;
-    temp.component[chars_per_pixel] = 0;
-    while(entry) {
-	/* compute a color identifier for color #y */
-	for (i = 0, x = y++; i < chars_per_pixel; i++, x /= 64) 
-	    temp.component[i] = xpm_chars[x & 63];
-
-	/* 
-	 * and put it in the hashtable 
-	 * this is a little bit tricky
-	 */
-	Tcl_SetHashValue(entry, (char *) temp.value);
-	pp = (unsigned char *)&entry->key.oneWordValue;
-	sprintf(buffer, "\"%s c #%02x%02x%02x\",\n", 
-		temp.component, pp[0], pp[1], pp[2]);
-	WRITE(buffer);
-	entry = Tcl_NextHashEntry(&search);
-    }
-
-    /* write image itself */
-    rowPixPtr = blockPtr->pixelPtr + blockPtr->offset[0];
-    buffer[chars_per_pixel] = 0;
-    for (y = 0; y < blockPtr->height; y++) {
-	WRITE("\"");
-	pixelPtr = rowPixPtr;
-	for (x = 0; x < blockPtr->width; x++) {
-	    if (!alphaOffset || pixelPtr[alphaOffset]) {
-		col.component[0] = pixelPtr[0];
-		col.component[1] = pixelPtr[greenOffset];
-		col.component[2] = pixelPtr[blueOffset];
-		entry = Tcl_FindHashEntry(&colors, (char *) col.value);
-		temp.value = Tcl_GetHashValue(entry);
-		memcpy(buffer, temp.component, chars_per_pixel);
-	    } else {
-		/* make transparent pixel */
-		memcpy(buffer, "    ", chars_per_pixel);
-	    }
-	    pixelPtr += blockPtr->pixelSize;	
-	    WRITE(buffer);
-	}
-	if (y == blockPtr->height - 1) {
-	    WRITE("\"};");
-	} else {
-	    WRITE("\",\n");
-	}
-	rowPixPtr += blockPtr->pitch;
-    }
-
-    /* Delete the hash table */
-    Tcl_DeleteHashTable(&colors);    
-
-    /* close the file */
-    if (chan) {
-	Tcl_Close(interp, chan);
-    }
-    return TCL_OK;
-}

-- 
image display tool for astronomy



More information about the debian-science-commits mailing list